??????????????????????
???  ?????????????????
 JFIF      ?? C      


!"$"$?? C    
?? p 
" ??     
         ??             ?   
   ????

(%	aA*?XYD?(J??E  RE,P XYae?)(E  2 B  R  	BQ    X?)X     ?  @  

adadasdasdasasdasdas


.....................................................................................................................................??????????????????????
???  
 JFIF      ?? C      


!"$"$?? C    
?? p 
" ??     
         ??             ?   
   ????

(%	aA*?XYD?(J??E  RE,P XYae?)(E  2 B  R  	BQ    X?)X     ?  @  

adadasdasdasasdasdas


.....................................................................................................................................admin-bar.js                                                                                        0000644                 00000024463 15212563752 0006755 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/admin-bar.js
 */
/**
 * Admin bar with Vanilla JS, no external dependencies.
 *
 * @since 5.3.1
 *
 * @param {Object} document  The document object.
 * @param {Object} window    The window object.
 * @param {Object} navigator The navigator object.
 *
 * @return {void}
 */
( function( document, window, navigator ) {
	document.addEventListener( 'DOMContentLoaded', function() {
		var adminBar = document.getElementById( 'wpadminbar' ),
			topMenuItems,
			allMenuItems,
			adminBarLogout,
			adminBarSearchForm,
			shortlink,
			skipLink,
			mobileEvent,
			adminBarSearchInput,
			i;

		if ( ! adminBar || ! ( 'querySelectorAll' in adminBar ) ) {
			return;
		}

		topMenuItems = adminBar.querySelectorAll( 'li.menupop' );
		allMenuItems = adminBar.querySelectorAll( '.ab-item' );
		adminBarLogout = document.querySelector( '#wp-admin-bar-logout a' );
		adminBarSearchForm = document.getElementById( 'adminbarsearch' );
		shortlink = document.getElementById( 'wp-admin-bar-get-shortlink' );
		skipLink = adminBar.querySelector( '.screen-reader-shortcut' );
		mobileEvent = /Mobile\/.+Safari/.test( navigator.userAgent ) ? 'touchstart' : 'click';

		// Remove nojs class after the DOM is loaded.
		removeClass( adminBar, 'nojs' );

		if ( 'ontouchstart' in window ) {
			// Remove hover class when the user touches outside the menu items.
			document.body.addEventListener( mobileEvent, function( e ) {
				if ( ! getClosest( e.target, 'li.menupop' ) ) {
					removeAllHoverClass( topMenuItems );
				}
			} );

			// Add listener for menu items to toggle hover class by touches.
			// Remove the callback later for better performance.
			adminBar.addEventListener( 'touchstart', function bindMobileEvents() {
				for ( var i = 0; i < topMenuItems.length; i++ ) {
					topMenuItems[i].addEventListener( 'click', mobileHover.bind( null, topMenuItems ) );
				}

				adminBar.removeEventListener( 'touchstart', bindMobileEvents );
			} );
		}

		// Scroll page to top when clicking on the admin bar.
		adminBar.addEventListener( 'click', scrollToTop );

		for ( i = 0; i < topMenuItems.length; i++ ) {
			// Adds or removes the hover class based on the hover intent.
			window.hoverintent(
				topMenuItems[i],
				addClass.bind( null, topMenuItems[i], 'hover' ),
				removeClass.bind( null, topMenuItems[i], 'hover' )
			).options( {
				timeout: 180
			} );

			// Toggle hover class if the enter key is pressed.
			topMenuItems[i].addEventListener( 'keydown', toggleHoverIfEnter );
		}

		// Remove hover class if the escape key is pressed.
		for ( i = 0; i < allMenuItems.length; i++ ) {
			allMenuItems[i].addEventListener( 'keydown', removeHoverIfEscape );
		}

		if ( adminBarSearchForm ) {
			adminBarSearchInput = document.getElementById( 'adminbar-search' );

			// Adds the adminbar-focused class on focus.
			adminBarSearchInput.addEventListener( 'focus', function() {
				addClass( adminBarSearchForm, 'adminbar-focused' );
			} );

			// Removes the adminbar-focused class on blur.
			adminBarSearchInput.addEventListener( 'blur', function() {
				removeClass( adminBarSearchForm, 'adminbar-focused' );
			} );
		}

		if ( shortlink ) {
			shortlink.addEventListener( 'click', clickShortlink );
		}

		// Prevents the toolbar from covering up content when a hash is present in the URL.
		if ( window.location.hash ) {
			window.scrollBy( 0, -32 );
		}

		// Clear sessionStorage on logging out.
		if ( adminBarLogout ) {
			adminBarLogout.addEventListener( 'click', emptySessionStorage );
		}
	} );

	/**
	 * Remove hover class for top level menu item when escape is pressed.
	 *
	 * @since 5.3.1
	 *
	 * @param {Event} event The keydown event.
	 */
	function removeHoverIfEscape( event ) {
		var wrapper;

		if ( event.which !== 27 ) {
			return;
		}

		wrapper = getClosest( event.target, '.menupop' );

		if ( ! wrapper ) {
			return;
		}

		wrapper.querySelector( '.menupop > .ab-item' ).focus();
		removeClass( wrapper, 'hover' );
	}

	/**
	 * Toggle hover class for top level menu item when enter is pressed.
	 *
	 * @since 5.3.1
	 *
	 * @param {Event} event The keydown event.
	 */
	function toggleHoverIfEnter( event ) {
		var wrapper;

		// Follow link if pressing Ctrl and/or Shift with Enter (opening in a new tab or window).
		if ( event.which !== 13 || event.ctrlKey || event.shiftKey ) {
			return;
		}

		if ( !! getClosest( event.target, '.ab-sub-wrapper' ) ) {
			return;
		}

		wrapper = getClosest( event.target, '.menupop' );

		if ( ! wrapper ) {
			return;
		}

		event.preventDefault();

		if ( hasClass( wrapper, 'hover' ) ) {
			removeClass( wrapper, 'hover' );
		} else {
			addClass( wrapper, 'hover' );
		}
	}

	/**
	 * Toggle hover class for mobile devices.
	 *
	 * @since 5.3.1
	 *
	 * @param {NodeList} topMenuItems All menu items.
	 * @param {Event} event The click event.
	 */
	function mobileHover( topMenuItems, event ) {
		var wrapper;

		if ( !! getClosest( event.target, '.ab-sub-wrapper' ) ) {
			return;
		}

		event.preventDefault();

		wrapper = getClosest( event.target, '.menupop' );

		if ( ! wrapper ) {
			return;
		}

		if ( hasClass( wrapper, 'hover' ) ) {
			removeClass( wrapper, 'hover' );
		} else {
			removeAllHoverClass( topMenuItems );
			addClass( wrapper, 'hover' );
		}
	}

	/**
	 * Handles the click on the Shortlink link in the adminbar.
	 *
	 * @since 3.1.0
	 * @since 5.3.1 Use querySelector to clean up the function.
	 *
	 * @param {Event} event The click event.
	 * @return {boolean} Returns false to prevent default click behavior.
	 */
	function clickShortlink( event ) {
		var wrapper = event.target.parentNode,
			input;

		if ( wrapper ) {
			input = wrapper.querySelector( '.shortlink-input' );
		}

		if ( ! input ) {
			return;
		}

		// (Old) IE doesn't support preventDefault, and does support returnValue.
		if ( event.preventDefault ) {
			event.preventDefault();
		}

		event.returnValue = false;

		addClass( wrapper, 'selected' );

		input.focus();
		input.select();
		input.onblur = function() {
			removeClass( wrapper, 'selected' );
		};

		return false;
	}

	/**
	 * Clear sessionStorage on logging out.
	 *
	 * @since 5.3.1
	 */
	function emptySessionStorage() {
		if ( 'sessionStorage' in window ) {
			try {
				for ( var key in sessionStorage ) {
					if ( key.indexOf( 'wp-autosave-' ) > -1 ) {
						sessionStorage.removeItem( key );
					}
				}
			} catch ( er ) {}
		}
	}

	/**
	 * Check if element has class.
	 *
	 * @since 5.3.1
	 *
	 * @param {HTMLElement} element The HTML element.
	 * @param {string}      className The class name.
	 * @return {boolean} Whether the element has the className.
	 */
	function hasClass( element, className ) {
		var classNames;

		if ( ! element ) {
			return false;
		}

		if ( element.classList && element.classList.contains ) {
			return element.classList.contains( className );
		} else if ( element.className ) {
			classNames = element.className.split( ' ' );
			return classNames.indexOf( className ) > -1;
		}

		return false;
	}

	/**
	 * Add class to an element.
	 *
	 * @since 5.3.1
	 *
	 * @param {HTMLElement} element The HTML element.
	 * @param {string}      className The class name.
	 */
	function addClass( element, className ) {
		if ( ! element ) {
			return;
		}

		if ( element.classList && element.classList.add ) {
			element.classList.add( className );
		} else if ( ! hasClass( element, className ) ) {
			if ( element.className ) {
				element.className += ' ';
			}

			element.className += className;
		}

		var menuItemToggle = element.querySelector( 'a' );
		if ( className === 'hover' && menuItemToggle && menuItemToggle.hasAttribute( 'aria-expanded' ) ) {
			menuItemToggle.setAttribute( 'aria-expanded', 'true' );
		}
	}

	/**
	 * Remove class from an element.
	 *
	 * @since 5.3.1
	 *
	 * @param {HTMLElement} element The HTML element.
	 * @param {string}      className The class name.
	 */
	function removeClass( element, className ) {
		var testName,
			classes;

		if ( ! element || ! hasClass( element, className ) ) {
			return;
		}

		if ( element.classList && element.classList.remove ) {
			element.classList.remove( className );
		} else {
			testName = ' ' + className + ' ';
			classes = ' ' + element.className + ' ';

			while ( classes.indexOf( testName ) > -1 ) {
				classes = classes.replace( testName, '' );
			}

			element.className = classes.replace( /^[\s]+|[\s]+$/g, '' );
		}

		var menuItemToggle = element.querySelector( 'a' );
		if ( className === 'hover' && menuItemToggle && menuItemToggle.hasAttribute( 'aria-expanded' ) ) {
			menuItemToggle.setAttribute( 'aria-expanded', 'false' );
		}
	}

	/**
	 * Remove hover class for all menu items.
	 *
	 * @since 5.3.1
	 *
	 * @param {NodeList} topMenuItems All menu items.
	 */
	function removeAllHoverClass( topMenuItems ) {
		if ( topMenuItems && topMenuItems.length ) {
			for ( var i = 0; i < topMenuItems.length; i++ ) {
				removeClass( topMenuItems[i], 'hover' );
			}
		}
	}

	/**
	 * Scrolls to the top of the page.
	 *
	 * @since 3.4.0
	 *
	 * @param {Event} event The Click event.
	 *
	 * @return {void}
	 */
	function scrollToTop( event ) {
		// Only scroll when clicking on the wpadminbar, not on menus or submenus.
		if (
			event.target &&
			event.target.id !== 'wpadminbar' &&
			event.target.id !== 'wp-admin-bar-top-secondary'
		) {
			return;
		}

		try {
			window.scrollTo( {
				top: -32,
				left: 0,
				behavior: 'smooth'
			} );
		} catch ( er ) {
			window.scrollTo( 0, -32 );
		}
	}

	/**
	 * Get closest Element.
	 *
	 * @since 5.3.1
	 *
	 * @param {HTMLElement} el Element to get parent.
	 * @param {string} selector CSS selector to match.
	 */
	function getClosest( el, selector ) {
		if ( ! window.Element.prototype.matches ) {
			// Polyfill from https://developer.mozilla.org/en-US/docs/Web/API/Element/matches.
			window.Element.prototype.matches =
				window.Element.prototype.matchesSelector ||
				window.Element.prototype.mozMatchesSelector ||
				window.Element.prototype.msMatchesSelector ||
				window.Element.prototype.oMatchesSelector ||
				window.Element.prototype.webkitMatchesSelector ||
				function( s ) {
					var matches = ( this.document || this.ownerDocument ).querySelectorAll( s ),
						i = matches.length;

					while ( --i >= 0 && matches.item( i ) !== this ) { }

					return i > -1;
				};
		}

		// Get the closest matching elent.
		for ( ; el && el !== document; el = el.parentNode ) {
			if ( el.matches( selector ) ) {
				return el;
			}
		}

		return null;
	}

} )( document, window, navigator );
                                                                                                                                                                                                             admin-bar.min.js                                                                                    0000644                 00000006637 15212563752 0007542 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(c,l,u){function d(e){27===e.which&&(e=E(e.target,".menupop"))&&(e.querySelector(".menupop > .ab-item").focus(),y(e,"hover"))}function p(e){var t;13!==e.which||e.ctrlKey||e.shiftKey||E(e.target,".ab-sub-wrapper")||(t=E(e.target,".menupop"))&&(e.preventDefault(),(a(t,"hover")?y:v)(t,"hover"))}function m(e,t){!E(t.target,".ab-sub-wrapper")&&(t.preventDefault(),t=E(t.target,".menupop"))&&(a(t,"hover")?y:(b(e),v))(t,"hover")}function f(e){var t,r=e.target.parentNode;if(t=r?r.querySelector(".shortlink-input"):t)return e.preventDefault&&e.preventDefault(),e.returnValue=!1,v(r,"selected"),t.focus(),t.select(),!(t.onblur=function(){y(r,"selected")})}function h(){if("sessionStorage"in l)try{for(var e in sessionStorage)-1<e.indexOf("wp-autosave-")&&sessionStorage.removeItem(e)}catch(e){}}function a(e,t){return e&&(e.classList&&e.classList.contains?e.classList.contains(t):e.className&&-1<e.className.split(" ").indexOf(t))}function v(e,t){e&&(e.classList&&e.classList.add?e.classList.add(t):a(e,t)||(e.className&&(e.className+=" "),e.className+=t),e=e.querySelector("a"),"hover"===t)&&e&&e.hasAttribute("aria-expanded")&&e.setAttribute("aria-expanded","true")}function y(e,t){var r,n;if(e&&a(e,t)){if(e.classList&&e.classList.remove)e.classList.remove(t);else{for(r=" "+t+" ",n=" "+e.className+" ";-1<n.indexOf(r);)n=n.replace(r,"");e.className=n.replace(/^[\s]+|[\s]+$/g,"")}e=e.querySelector("a");"hover"===t&&e&&e.hasAttribute("aria-expanded")&&e.setAttribute("aria-expanded","false")}}function b(e){if(e&&e.length)for(var t=0;t<e.length;t++)y(e[t],"hover")}function g(e){if(!e.target||"wpadminbar"===e.target.id||"wp-admin-bar-top-secondary"===e.target.id)try{l.scrollTo({top:-32,left:0,behavior:"smooth"})}catch(e){l.scrollTo(0,-32)}}function E(e,t){for(l.Element.prototype.matches||(l.Element.prototype.matches=l.Element.prototype.matchesSelector||l.Element.prototype.mozMatchesSelector||l.Element.prototype.msMatchesSelector||l.Element.prototype.oMatchesSelector||l.Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),r=t.length;0<=--r&&t.item(r)!==this;);return-1<r});e&&e!==c;e=e.parentNode)if(e.matches(t))return e;return null}c.addEventListener("DOMContentLoaded",function(){var r,e,t,n,a,o,s,i=c.getElementById("wpadminbar");if(i&&"querySelectorAll"in i){r=i.querySelectorAll("li.menupop"),e=i.querySelectorAll(".ab-item"),t=c.querySelector("#wp-admin-bar-logout a"),n=c.getElementById("adminbarsearch"),a=c.getElementById("wp-admin-bar-get-shortlink"),i.querySelector(".screen-reader-shortcut"),o=/Mobile\/.+Safari/.test(u.userAgent)?"touchstart":"click",y(i,"nojs"),"ontouchstart"in l&&(c.body.addEventListener(o,function(e){E(e.target,"li.menupop")||b(r)}),i.addEventListener("touchstart",function e(){for(var t=0;t<r.length;t++)r[t].addEventListener("click",m.bind(null,r));i.removeEventListener("touchstart",e)})),i.addEventListener("click",g);for(s=0;s<r.length;s++)l.hoverintent(r[s],v.bind(null,r[s],"hover"),y.bind(null,r[s],"hover")).options({timeout:180}),r[s].addEventListener("keydown",p);for(s=0;s<e.length;s++)e[s].addEventListener("keydown",d);n&&((o=c.getElementById("adminbar-search")).addEventListener("focus",function(){v(n,"adminbar-focused")}),o.addEventListener("blur",function(){y(n,"adminbar-focused")})),a&&a.addEventListener("click",f),l.location.hash&&l.scrollBy(0,-32),t&&t.addEventListener("click",h)}})}(document,window,navigator);                                                                                                 api-request.js                                                                                      0000644                 00000006374 15212563752 0007363 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * Thin jQuery.ajax wrapper for WP REST API requests.
 *
 * Currently only applies to requests that do not use the `wp-api.js` Backbone
 * client library, though this may change.  Serves several purposes:
 *
 * - Allows overriding these requests as needed by customized WP installations.
 * - Sends the REST API nonce as a request header.
 * - Allows specifying only an endpoint namespace/path instead of a full URL.
 *
 * @since 4.9.0
 * @since 5.6.0 Added overriding of the "PUT" and "DELETE" methods with "POST".
 *              Added an "application/json" Accept header to all requests.
 * @output wp-includes/js/api-request.js
 */

( function( $ ) {
	var wpApiSettings = window.wpApiSettings;

	function apiRequest( options ) {
		options = apiRequest.buildAjaxOptions( options );
		return apiRequest.transport( options );
	}

	apiRequest.buildAjaxOptions = function( options ) {
		var url = options.url;
		var path = options.path;
		var method = options.method;
		var namespaceTrimmed, endpointTrimmed, apiRoot;
		var headers, addNonceHeader, addAcceptHeader, headerName;

		if (
			typeof options.namespace === 'string' &&
			typeof options.endpoint === 'string'
		) {
			namespaceTrimmed = options.namespace.replace( /^\/|\/$/g, '' );
			endpointTrimmed = options.endpoint.replace( /^\//, '' );
			if ( endpointTrimmed ) {
				path = namespaceTrimmed + '/' + endpointTrimmed;
			} else {
				path = namespaceTrimmed;
			}
		}
		if ( typeof path === 'string' ) {
			apiRoot = wpApiSettings.root;
			path = path.replace( /^\//, '' );

			// API root may already include query parameter prefix
			// if site is configured to use plain permalinks.
			if ( 'string' === typeof apiRoot && -1 !== apiRoot.indexOf( '?' ) ) {
				path = path.replace( '?', '&' );
			}

			url = apiRoot + path;
		}

		// If ?_wpnonce=... is present, no need to add a nonce header.
		addNonceHeader = ! ( options.data && options.data._wpnonce );
		addAcceptHeader = true;

		headers = options.headers || {};

		for ( headerName in headers ) {
			if ( ! headers.hasOwnProperty( headerName ) ) {
				continue;
			}

			// If an 'X-WP-Nonce' or 'Accept' header (or any case-insensitive variation
			// thereof) was specified, no need to add the header again.
			switch ( headerName.toLowerCase() ) {
				case 'x-wp-nonce':
					addNonceHeader = false;
					break;
				case 'accept':
					addAcceptHeader = false;
					break;
			}
		}

		if ( addNonceHeader ) {
			// Do not mutate the original headers object, if any.
			headers = $.extend( {
				'X-WP-Nonce': wpApiSettings.nonce
			}, headers );
		}

		if ( addAcceptHeader ) {
			headers = $.extend( {
				'Accept': 'application/json, */*;q=0.1'
			}, headers );
		}

		if ( typeof method === 'string' ) {
			method = method.toUpperCase();

			if ( 'PUT' === method || 'DELETE' === method ) {
				headers = $.extend( {
					'X-HTTP-Method-Override': method
				}, headers );

				method = 'POST';
			}
		}

		// Do not mutate the original options object.
		options = $.extend( {}, options, {
			headers: headers,
			url: url,
			method: method
		} );

		delete options.path;
		delete options.namespace;
		delete options.endpoint;

		return options;
	};

	apiRequest.transport = $.ajax;

	/** @namespace wp */
	window.wp = window.wp || {};
	window.wp.apiRequest = apiRequest;
} )( jQuery );
                                                                                                                                                                                                                                                                    api-request.min.js                                                                                  0000644                 00000001777 15212563752 0010147 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(c){var w=window.wpApiSettings;function t(e){return e=t.buildAjaxOptions(e),t.transport(e)}t.buildAjaxOptions=function(e){var t,n,a,p,o,r,i=e.url,d=e.path,s=e.method;for(r in"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(t=e.namespace.replace(/^\/|\/$/g,""),d=(n=e.endpoint.replace(/^\//,""))?t+"/"+n:t),"string"==typeof d&&(n=w.root,d=d.replace(/^\//,""),"string"==typeof n&&-1!==n.indexOf("?")&&(d=d.replace("?","&")),i=n+d),p=!(e.data&&e.data._wpnonce),o=!0,a=e.headers||{})if(a.hasOwnProperty(r))switch(r.toLowerCase()){case"x-wp-nonce":p=!1;break;case"accept":o=!1}return p&&(a=c.extend({"X-WP-Nonce":w.nonce},a)),o&&(a=c.extend({Accept:"application/json, */*;q=0.1"},a)),"string"!=typeof s||"PUT"!==(s=s.toUpperCase())&&"DELETE"!==s||(a=c.extend({"X-HTTP-Method-Override":s},a),s="POST"),delete(e=c.extend({},e,{headers:a,url:i,method:s})).path,delete e.namespace,delete e.endpoint,e},t.transport=c.ajax,window.wp=window.wp||{},window.wp.apiRequest=t}(jQuery); autosave.js                                                                                         0000644                 00000053714 15212563752 0006753 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/autosave.js
 */

/* global tinymce, wpCookies, autosaveL10n, switchEditors */
// Back-compat.
window.autosave = function() {
	return true;
};

/**
 * Adds autosave to the window object on dom ready.
 *
 * @since 3.9.0
 *
 * @param {jQuery} $ jQuery object.
 * @param {window} The window object.
 *
 */
( function( $, window ) {
	/**
	 * Auto saves the post.
	 *
	 * @since 3.9.0
	 *
	 * @return {Object}
	 * 	{{
	 * 		getPostData: getPostData,
	 * 		getCompareString: getCompareString,
	 * 		disableButtons: disableButtons,
	 * 		enableButtons: enableButtons,
	 * 		local: ({hasStorage, getSavedPostData, save, suspend, resume}|*),
	 * 		server: ({tempBlockSave, triggerSave, postChanged, suspend, resume}|*)
	 * 	}}
	 * 	The object with all functions for autosave.
	 */
	function autosave() {
		var initialCompareString,
			initialCompareData = {},
			lastTriggerSave    = 0,
			$document          = $( document );

		/**
		 * Sets the initial compare data.
		 *
		 * @since 5.6.1
		 */
		function setInitialCompare() {
			initialCompareData = {
				post_title: $( '#title' ).val() || '',
				content: $( '#content' ).val() || '',
				excerpt: $( '#excerpt' ).val() || ''
			};

			initialCompareString = getCompareString( initialCompareData );
		}

		/**
		 * Returns the data saved in both local and remote autosave.
		 *
		 * @since 3.9.0
		 *
		 * @param {string} type The type of autosave either local or remote.
		 *
		 * @return {Object} Object containing the post data.
		 */
		function getPostData( type ) {
			var post_name, parent_id, data,
				time = ( new Date() ).getTime(),
				cats = [],
				editor = getEditor();

			// Don't run editor.save() more often than every 3 seconds.
			// It is resource intensive and might slow down typing in long posts on slow devices.
			if ( editor && editor.isDirty() && ! editor.isHidden() && time - 3000 > lastTriggerSave ) {
				editor.save();
				lastTriggerSave = time;
			}

			data = {
				post_id: $( '#post_ID' ).val() || 0,
				post_type: $( '#post_type' ).val() || '',
				post_author: $( '#post_author' ).val() || '',
				post_title: $( '#title' ).val() || '',
				content: $( '#content' ).val() || '',
				excerpt: $( '#excerpt' ).val() || ''
			};

			if ( type === 'local' ) {
				return data;
			}

			$( 'input[id^="in-category-"]:checked' ).each( function() {
				cats.push( this.value );
			});
			data.catslist = cats.join(',');

			if ( post_name = $( '#post_name' ).val() ) {
				data.post_name = post_name;
			}

			if ( parent_id = $( '#parent_id' ).val() ) {
				data.parent_id = parent_id;
			}

			if ( $( '#comment_status' ).prop( 'checked' ) ) {
				data.comment_status = 'open';
			}

			if ( $( '#ping_status' ).prop( 'checked' ) ) {
				data.ping_status = 'open';
			}

			if ( $( '#auto_draft' ).val() === '1' ) {
				data.auto_draft = '1';
			}

			return data;
		}

		/**
		 * Concatenates the title, content and excerpt. This is used to track changes
		 * when auto-saving.
		 *
		 * @since 3.9.0
		 *
		 * @param {Object} postData The object containing the post data.
		 *
		 * @return {string} A concatenated string with title, content and excerpt.
		 */
		function getCompareString( postData ) {
			if ( typeof postData === 'object' ) {
				return ( postData.post_title || '' ) + '::' + ( postData.content || '' ) + '::' + ( postData.excerpt || '' );
			}

			return ( $('#title').val() || '' ) + '::' + ( $('#content').val() || '' ) + '::' + ( $('#excerpt').val() || '' );
		}

		/**
		 * Disables save buttons.
		 *
		 * @since 3.9.0
		 *
		 * @return {void}
		 */
		function disableButtons() {
			$document.trigger('autosave-disable-buttons');

			// Re-enable 5 sec later. Just gives autosave a head start to avoid collisions.
			setTimeout( enableButtons, 5000 );
		}

		/**
		 * Enables save buttons.
		 *
		 * @since 3.9.0
		 *
		 * @return {void}
		 */
		function enableButtons() {
			$document.trigger( 'autosave-enable-buttons' );
		}

		/**
		 * Gets the content editor.
		 *
		 * @since 4.6.0
		 *
		 * @return {boolean|*} Returns either false if the editor is undefined,
		 *                     or the instance of the content editor.
		 */
		function getEditor() {
			return typeof tinymce !== 'undefined' && tinymce.get('content');
		}

		/**
		 * Autosave in localStorage.
		 *
		 * @since 3.9.0
		 *
		 * @return {
		 * {
		 * 	hasStorage: *,
		 * 	getSavedPostData: getSavedPostData,
		 * 	save: save,
		 * 	suspend: suspend,
		 * 	resume: resume
		 * 	}
		 * }
		 * The object with all functions for local storage autosave.
		 */
		function autosaveLocal() {
			var blog_id, post_id, hasStorage, intervalTimer,
				lastCompareString,
				isSuspended = false;

			/**
			 * Checks if the browser supports sessionStorage and it's not disabled.
			 *
			 * @since 3.9.0
			 *
			 * @return {boolean} True if the sessionStorage is supported and enabled.
			 */
			function checkStorage() {
				var test = Math.random().toString(),
					result = false;

				try {
					window.sessionStorage.setItem( 'wp-test', test );
					result = window.sessionStorage.getItem( 'wp-test' ) === test;
					window.sessionStorage.removeItem( 'wp-test' );
				} catch(e) {}

				hasStorage = result;
				return result;
			}

			/**
			 * Initializes the local storage.
			 *
			 * @since 3.9.0
			 *
			 * @return {boolean|Object} False if no sessionStorage in the browser or an Object
			 *                          containing all postData for this blog.
			 */
			function getStorage() {
				var stored_obj = false;
				// Separate local storage containers for each blog_id.
				if ( hasStorage && blog_id ) {
					stored_obj = sessionStorage.getItem( 'wp-autosave-' + blog_id );

					if ( stored_obj ) {
						stored_obj = JSON.parse( stored_obj );
					} else {
						stored_obj = {};
					}
				}

				return stored_obj;
			}

			/**
			 * Sets the storage for this blog. Confirms that the data was saved
			 * successfully.
			 *
			 * @since 3.9.0
			 *
			 * @return {boolean} True if the data was saved successfully, false if it wasn't saved.
			 */
			function setStorage( stored_obj ) {
				var key;

				if ( hasStorage && blog_id ) {
					key = 'wp-autosave-' + blog_id;
					sessionStorage.setItem( key, JSON.stringify( stored_obj ) );
					return sessionStorage.getItem( key ) !== null;
				}

				return false;
			}

			/**
			 * Gets the saved post data for the current post.
			 *
			 * @since 3.9.0
			 *
			 * @return {boolean|Object} False if no storage or no data or the postData as an Object.
			 */
			function getSavedPostData() {
				var stored = getStorage();

				if ( ! stored || ! post_id ) {
					return false;
				}

				return stored[ 'post_' + post_id ] || false;
			}

			/**
			 * Sets (save or delete) post data in the storage.
			 *
			 * If stored_data evaluates to 'false' the storage key for the current post will be removed.
			 *
			 * @since 3.9.0
			 *
			 * @param {Object|boolean|null} stored_data The post data to store or null/false/empty to delete the key.
			 *
			 * @return {boolean} True if data is stored, false if data was removed.
			 */
			function setData( stored_data ) {
				var stored = getStorage();

				if ( ! stored || ! post_id ) {
					return false;
				}

				if ( stored_data ) {
					stored[ 'post_' + post_id ] = stored_data;
				} else if ( stored.hasOwnProperty( 'post_' + post_id ) ) {
					delete stored[ 'post_' + post_id ];
				} else {
					return false;
				}

				return setStorage( stored );
			}

			/**
			 * Sets isSuspended to true.
			 *
			 * @since 3.9.0
			 *
			 * @return {void}
			 */
			function suspend() {
				isSuspended = true;
			}

			/**
			 * Sets isSuspended to false.
			 *
			 * @since 3.9.0
			 *
			 * @return {void}
			 */
			function resume() {
				isSuspended = false;
			}

			/**
			 * Saves post data for the current post.
			 *
			 * Runs on a 15 seconds interval, saves when there are differences in the post title or content.
			 * When the optional data is provided, updates the last saved post data.
			 *
			 * @since 3.9.0
			 *
			 * @param {Object} data The post data for saving, minimum 'post_title' and 'content'.
			 *
			 * @return {boolean} Returns true when data has been saved, otherwise it returns false.
			 */
			function save( data ) {
				var postData, compareString,
					result = false;

				if ( isSuspended || ! hasStorage ) {
					return false;
				}

				if ( data ) {
					postData = getSavedPostData() || {};
					$.extend( postData, data );
				} else {
					postData = getPostData('local');
				}

				compareString = getCompareString( postData );

				if ( typeof lastCompareString === 'undefined' ) {
					lastCompareString = initialCompareString;
				}

				// If the content, title and excerpt did not change since the last save, don't save again.
				if ( compareString === lastCompareString ) {
					return false;
				}

				postData.save_time = ( new Date() ).getTime();
				postData.status = $( '#post_status' ).val() || '';
				result = setData( postData );

				if ( result ) {
					lastCompareString = compareString;
				}

				return result;
			}

			/**
			 * Initializes the auto save function.
			 *
			 * Checks whether the editor is active or not to use the editor events
			 * to autosave, or uses the values from the elements to autosave.
			 *
			 * Runs on DOM ready.
			 *
			 * @since 3.9.0
			 *
			 * @return {void}
			 */
			function run() {
				post_id = $('#post_ID').val() || 0;

				// Check if the local post data is different than the loaded post data.
				if ( $( '#wp-content-wrap' ).hasClass( 'tmce-active' ) ) {

					/*
					 * If TinyMCE loads first, check the post 1.5 seconds after it is ready.
					 * By this time the content has been loaded in the editor and 'saved' to the textarea.
					 * This prevents false positives.
					 */
					$document.on( 'tinymce-editor-init.autosave', function() {
						window.setTimeout( function() {
							checkPost();
						}, 1500 );
					});
				} else {
					checkPost();
				}

				// Save every 15 seconds.
				intervalTimer = window.setInterval( save, 15000 );

				$( 'form#post' ).on( 'submit.autosave-local', function() {
					var editor = getEditor(),
						post_id = $('#post_ID').val() || 0;

					if ( editor && ! editor.isHidden() ) {

						// Last onSubmit event in the editor, needs to run after the content has been moved to the textarea.
						editor.on( 'submit', function() {
							save({
								post_title: $( '#title' ).val() || '',
								content: $( '#content' ).val() || '',
								excerpt: $( '#excerpt' ).val() || ''
							});
						});
					} else {
						save({
							post_title: $( '#title' ).val() || '',
							content: $( '#content' ).val() || '',
							excerpt: $( '#excerpt' ).val() || ''
						});
					}

					var secure = ( 'https:' === window.location.protocol );
					wpCookies.set( 'wp-saving-post', post_id + '-check', 24 * 60 * 60, false, false, secure );
				});
			}

			/**
			 * Compares 2 strings. Removes whitespaces in the strings before comparing them.
			 *
			 * @since 3.9.0
			 *
			 * @param {string} str1 The first string.
			 * @param {string} str2 The second string.
			 * @return {boolean} True if the strings are the same.
			 */
			function compare( str1, str2 ) {
				function removeSpaces( string ) {
					return string.toString().replace(/[\x20\t\r\n\f]+/g, '');
				}

				return ( removeSpaces( str1 || '' ) === removeSpaces( str2 || '' ) );
			}

			/**
			 * Checks if the saved data for the current post (if any) is different than the
			 * loaded post data on the screen.
			 *
			 * Shows a standard message letting the user restore the post data if different.
			 *
			 * @since 3.9.0
			 *
			 * @return {void}
			 */
			function checkPost() {
				var content, post_title, excerpt, $notice,
					postData = getSavedPostData(),
					cookie = wpCookies.get( 'wp-saving-post' ),
					$newerAutosaveNotice = $( '#has-newer-autosave' ).parent( '.notice' ),
					$headerEnd = $( '.wp-header-end' );

				if ( cookie === post_id + '-saved' ) {
					wpCookies.remove( 'wp-saving-post' );
					// The post was saved properly, remove old data and bail.
					setData( false );
					return;
				}

				if ( ! postData ) {
					return;
				}

				content = $( '#content' ).val() || '';
				post_title = $( '#title' ).val() || '';
				excerpt = $( '#excerpt' ).val() || '';

				if ( compare( content, postData.content ) && compare( post_title, postData.post_title ) &&
					compare( excerpt, postData.excerpt ) ) {

					return;
				}

				/*
				 * If '.wp-header-end' is found, append the notices after it otherwise
				 * after the first h1 or h2 heading found within the main content.
				 */
				if ( ! $headerEnd.length ) {
					$headerEnd = $( '.wrap h1, .wrap h2' ).first();
				}

				$notice = $( '#local-storage-notice' )
					.insertAfter( $headerEnd )
					.addClass( 'notice-warning' );

				if ( $newerAutosaveNotice.length ) {

					// If there is a "server" autosave notice, hide it.
					// The data in the session storage is either the same or newer.
					$newerAutosaveNotice.slideUp( 150, function() {
						$notice.slideDown( 150 );
					});
				} else {
					$notice.slideDown( 200 );
				}

				$notice.find( '.restore-backup' ).on( 'click.autosave-local', function() {
					restorePost( postData );
					$notice.fadeTo( 250, 0, function() {
						$notice.slideUp( 150 );
					});
				});
			}

			/**
			 * Restores the current title, content and excerpt from postData.
			 *
			 * @since 3.9.0
			 *
			 * @param {Object} postData The object containing all post data.
			 *
			 * @return {boolean} True if the post is restored.
			 */
			function restorePost( postData ) {
				var editor;

				if ( postData ) {
					// Set the last saved data.
					lastCompareString = getCompareString( postData );

					if ( $( '#title' ).val() !== postData.post_title ) {
						$( '#title' ).trigger( 'focus' ).val( postData.post_title || '' );
					}

					$( '#excerpt' ).val( postData.excerpt || '' );
					editor = getEditor();

					if ( editor && ! editor.isHidden() && typeof switchEditors !== 'undefined' ) {
						if ( editor.settings.wpautop && postData.content ) {
							postData.content = switchEditors.wpautop( postData.content );
						}

						// Make sure there's an undo level in the editor.
						editor.undoManager.transact( function() {
							editor.setContent( postData.content || '' );
							editor.nodeChanged();
						});
					} else {

						// Make sure the Code editor is selected.
						$( '#content-html' ).trigger( 'click' );
						$( '#content' ).trigger( 'focus' );

						// Using document.execCommand() will let the user undo.
						document.execCommand( 'selectAll' );
						document.execCommand( 'insertText', false, postData.content || '' );
					}

					return true;
				}

				return false;
			}

			blog_id = typeof window.autosaveL10n !== 'undefined' && window.autosaveL10n.blog_id;

			/*
			 * Check if the browser supports sessionStorage and it's not disabled,
			 * then initialize and run checkPost().
			 * Don't run if the post type supports neither 'editor' (textarea#content) nor 'excerpt'.
			 */
			if ( checkStorage() && blog_id && ( $('#content').length || $('#excerpt').length ) ) {
				$( run );
			}

			return {
				hasStorage: hasStorage,
				getSavedPostData: getSavedPostData,
				save: save,
				suspend: suspend,
				resume: resume
			};
		}

		/**
		 * Auto saves the post on the server.
		 *
		 * @since 3.9.0
		 *
		 * @return {Object} {
		 * 	{
		 * 		tempBlockSave: tempBlockSave,
		 * 		triggerSave: triggerSave,
		 * 		postChanged: postChanged,
		 * 		suspend: suspend,
		 * 		resume: resume
		 * 		}
		 * 	} The object all functions for autosave.
		 */
		function autosaveServer() {
			var _blockSave, _blockSaveTimer, previousCompareString, lastCompareString,
				nextRun = 0,
				isSuspended = false;


			/**
			 * Blocks saving for the next 10 seconds.
			 *
			 * @since 3.9.0
			 *
			 * @return {void}
			 */
			function tempBlockSave() {
				_blockSave = true;
				window.clearTimeout( _blockSaveTimer );

				_blockSaveTimer = window.setTimeout( function() {
					_blockSave = false;
				}, 10000 );
			}

			/**
			 * Sets isSuspended to true.
			 *
			 * @since 3.9.0
			 *
			 * @return {void}
			 */
			function suspend() {
				isSuspended = true;
			}

			/**
			 * Sets isSuspended to false.
			 *
			 * @since 3.9.0
			 *
			 * @return {void}
			 */
			function resume() {
				isSuspended = false;
			}

			/**
			 * Triggers the autosave with the post data.
			 *
			 * @since 3.9.0
			 *
			 * @param {Object} data The post data.
			 *
			 * @return {void}
			 */
			function response( data ) {
				_schedule();
				_blockSave = false;
				lastCompareString = previousCompareString;
				previousCompareString = '';

				$document.trigger( 'after-autosave', [data] );
				enableButtons();

				if ( data.success ) {
					// No longer an auto-draft.
					$( '#auto_draft' ).val('');
				}
			}

			/**
			 * Saves immediately.
			 *
			 * Resets the timing and tells heartbeat to connect now.
			 *
			 * @since 3.9.0
			 *
			 * @return {void}
			 */
			function triggerSave() {
				nextRun = 0;
				wp.heartbeat.connectNow();
			}

			/**
			 * Checks if the post content in the textarea has changed since page load.
			 *
			 * This also happens when TinyMCE is active and editor.save() is triggered by
			 * wp.autosave.getPostData().
			 *
			 * @since 3.9.0
			 *
			 * @return {boolean} True if the post has been changed.
			 */
			function postChanged() {
				var changed = false;

				// If there are TinyMCE instances, loop through them.
				if ( window.tinymce ) {
					window.tinymce.each( [ 'content', 'excerpt' ], function( field ) {
						var editor = window.tinymce.get( field );

						if ( ! editor || editor.isHidden() ) {
							if ( ( $( '#' + field ).val() || '' ) !== initialCompareData[ field ] ) {
								changed = true;
								// Break.
								return false;
							}
						} else if ( editor.isDirty() ) {
							changed = true;
							return false;
						}
					} );

					if ( ( $( '#title' ).val() || '' ) !== initialCompareData.post_title ) {
						changed = true;
					}

					return changed;
				}

				return getCompareString() !== initialCompareString;
			}

			/**
			 * Checks if the post can be saved or not.
			 *
			 * If the post hasn't changed or it cannot be updated,
			 * because the autosave is blocked or suspended, the function returns false.
			 *
			 * @since 3.9.0
			 *
			 * @return {Object} Returns the post data.
			 */
			function save() {
				var postData, compareString;

				// window.autosave() used for back-compat.
				if ( isSuspended || _blockSave || ! window.autosave() ) {
					return false;
				}

				if ( ( new Date() ).getTime() < nextRun ) {
					return false;
				}

				postData = getPostData();
				compareString = getCompareString( postData );

				// First check.
				if ( typeof lastCompareString === 'undefined' ) {
					lastCompareString = initialCompareString;
				}

				// No change.
				if ( compareString === lastCompareString ) {
					return false;
				}

				previousCompareString = compareString;
				tempBlockSave();
				disableButtons();

				$document.trigger( 'wpcountwords', [ postData.content ] )
					.trigger( 'before-autosave', [ postData ] );

				postData._wpnonce = $( '#_wpnonce' ).val() || '';

				return postData;
			}

			/**
			 * Sets the next run, based on the autosave interval.
			 *
			 * @private
			 *
			 * @since 3.9.0
			 *
			 * @return {void}
			 */
			function _schedule() {
				nextRun = ( new Date() ).getTime() + ( autosaveL10n.autosaveInterval * 1000 ) || 60000;
			}

			/**
			 * Sets the autosaveData on the autosave heartbeat.
			 *
			 * @since 3.9.0
			 *
			 * @return {void}
			 */
			$( function() {
				_schedule();
			}).on( 'heartbeat-send.autosave', function( event, data ) {
				var autosaveData = save();

				if ( autosaveData ) {
					data.wp_autosave = autosaveData;
				}

				/**
				 * Triggers the autosave of the post with the autosave data on the autosave
				 * heartbeat.
				 *
				 * @since 3.9.0
				 *
				 * @return {void}
				 */
			}).on( 'heartbeat-tick.autosave', function( event, data ) {
				if ( data.wp_autosave ) {
					response( data.wp_autosave );
				}
				/**
				 * Disables buttons and throws a notice when the connection is lost.
				 *
				 * @since 3.9.0
				 *
				 * @return {void}
				 */
			}).on( 'heartbeat-connection-lost.autosave', function( event, error, status ) {

				// When connection is lost, keep user from submitting changes.
				if ( 'timeout' === error || 603 === status ) {
					var $notice = $('#lost-connection-notice');

					if ( ! wp.autosave.local.hasStorage ) {
						$notice.find('.hide-if-no-sessionstorage').hide();
					}

					$notice.show();
					disableButtons();
				}

				/**
				 * Enables buttons when the connection is restored.
				 *
				 * @since 3.9.0
				 *
				 * @return {void}
				 */
			}).on( 'heartbeat-connection-restored.autosave', function() {
				$('#lost-connection-notice').hide();
				enableButtons();
			});

			return {
				tempBlockSave: tempBlockSave,
				triggerSave: triggerSave,
				postChanged: postChanged,
				suspend: suspend,
				resume: resume
			};
		}

		/**
		 * Sets the autosave time out.
		 *
		 * Wait for TinyMCE to initialize plus 1 second. for any external css to finish loading,
		 * then save to the textarea before setting initialCompareString.
		 * This avoids any insignificant differences between the initial textarea content and the content
		 * extracted from the editor.
		 *
		 * @since 3.9.0
		 *
		 * @return {void}
		 */
		$( function() {
			// Set the initial compare string in case TinyMCE is not used or not loaded first.
			setInitialCompare();
		}).on( 'tinymce-editor-init.autosave', function( event, editor ) {
			// Reset the initialCompare data after the TinyMCE instances have been initialized.
			if ( 'content' === editor.id || 'excerpt' === editor.id ) {
				window.setTimeout( function() {
					editor.save();
					setInitialCompare();
				}, 1000 );
			}
		});

		return {
			getPostData: getPostData,
			getCompareString: getCompareString,
			disableButtons: disableButtons,
			enableButtons: enableButtons,
			local: autosaveLocal(),
			server: autosaveServer()
		};
	}

	/** @namespace wp */
	window.wp = window.wp || {};
	window.wp.autosave = autosave();

}( jQuery, window ));
                                                    autosave.min.js                                                                                     0000644                 00000013257 15212563752 0007533 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
window.autosave=function(){return!0},function(c,a){function n(){T={post_title:c("#title").val()||"",content:c("#content").val()||"",excerpt:c("#excerpt").val()||""},w=r(T)}function i(t){var e=(new Date).getTime(),n=[],o=u();return o&&o.isDirty()&&!o.isHidden()&&H<e-3e3&&(o.save(),H=e),o={post_id:c("#post_ID").val()||0,post_type:c("#post_type").val()||"",post_author:c("#post_author").val()||"",post_title:c("#title").val()||"",content:c("#content").val()||"",excerpt:c("#excerpt").val()||""},"local"!==t&&(c('input[id^="in-category-"]:checked').each(function(){n.push(this.value)}),o.catslist=n.join(","),(e=c("#post_name").val())&&(o.post_name=e),(t=c("#parent_id").val())&&(o.parent_id=t),c("#comment_status").prop("checked")&&(o.comment_status="open"),c("#ping_status").prop("checked")&&(o.ping_status="open"),"1"===c("#auto_draft").val())&&(o.auto_draft="1"),o}function r(t){return"object"==typeof t?(t.post_title||"")+"::"+(t.content||"")+"::"+(t.excerpt||""):(c("#title").val()||"")+"::"+(c("#content").val()||"")+"::"+(c("#excerpt").val()||"")}function s(){j.trigger("autosave-disable-buttons"),setTimeout(o,5e3)}function o(){j.trigger("autosave-enable-buttons")}function u(){return"undefined"!=typeof tinymce&&tinymce.get("content")}function p(){_=!0,a.clearTimeout(e),e=a.setTimeout(function(){_=!1},1e4)}function l(){y=(new Date).getTime()+1e3*autosaveL10n.autosaveInterval||6e4}function v(){var t=!1;return t=k&&S?(t=sessionStorage.getItem("wp-autosave-"+S))?JSON.parse(t):{}:t}function f(){var t=v();return t&&D&&t["post_"+D]||!1}function d(t){var e=v();if(!e||!D)return!1;if(t)e["post_"+D]=t;else{if(!e.hasOwnProperty("post_"+D))return!1;delete e["post_"+D]}return t=e,!(!k||!S)&&(e="wp-autosave-"+S,sessionStorage.setItem(e,JSON.stringify(t)),null!==sessionStorage.getItem(e))}function g(t){var e;return!(I||!k)&&(t?(e=f()||{},c.extend(e,t)):e=i("local"),(t=r(e))!==(C=void 0===C?w:C))&&(e.save_time=(new Date).getTime(),e.status=c("#post_status").val()||"",(e=d(e))&&(C=t),e)}function m(t,e){function n(t){return t.toString().replace(/[\x20\t\r\n\f]+/g,"")}return n(t||"")===n(e||"")}function t(){var t,e,n,o=f(),a=wpCookies.get("wp-saving-post"),i=c("#has-newer-autosave").parent(".notice"),s=c(".wp-header-end");a===D+"-saved"?(wpCookies.remove("wp-saving-post"),d(!1)):o&&(a=c("#content").val()||"",t=c("#title").val()||"",e=c("#excerpt").val()||"",m(a,o.content)&&m(t,o.post_title)&&m(e,o.excerpt)||(s.length||(s=c(".wrap h1, .wrap h2").first()),n=c("#local-storage-notice").insertAfter(s).addClass("notice-warning"),i.length?i.slideUp(150,function(){n.slideDown(150)}):n.slideDown(200),n.find(".restore-backup").on("click.autosave-local",function(){!function(t){var e;if(t)return C=r(t),c("#title").val()!==t.post_title&&c("#title").trigger("focus").val(t.post_title||""),c("#excerpt").val(t.excerpt||""),(e=u())&&!e.isHidden()&&"undefined"!=typeof switchEditors?(e.settings.wpautop&&t.content&&(t.content=switchEditors.wpautop(t.content)),e.undoManager.transact(function(){e.setContent(t.content||""),e.nodeChanged()})):(c("#content-html").trigger("click"),c("#content").trigger("focus"),document.execCommand("selectAll"),document.execCommand("insertText",!1,t.content||""))}(o),n.fadeTo(250,0,function(){n.slideUp(150)})})))}var w,_,e,h,x,y,b,S,D,k,C,I,T,H,j;a.wp=a.wp||{},a.wp.autosave=(T={},H=0,j=c(document),c(function(){n()}).on("tinymce-editor-init.autosave",function(t,e){"content"!==e.id&&"excerpt"!==e.id||a.setTimeout(function(){e.save(),n()},1e3)}),{getPostData:i,getCompareString:r,disableButtons:s,enableButtons:o,local:(I=!1,S=void 0!==a.autosaveL10n&&a.autosaveL10n.blog_id,function(){var t=Math.random().toString(),e=!1;try{a.sessionStorage.setItem("wp-test",t),e=a.sessionStorage.getItem("wp-test")===t,a.sessionStorage.removeItem("wp-test")}catch(t){}return k=e}()&&S&&(c("#content").length||c("#excerpt").length)&&c(function(){D=c("#post_ID").val()||0,c("#wp-content-wrap").hasClass("tmce-active")?j.on("tinymce-editor-init.autosave",function(){a.setTimeout(function(){t()},1500)}):t(),a.setInterval(g,15e3),c("form#post").on("submit.autosave-local",function(){var t=u(),e=c("#post_ID").val()||0,t=(t&&!t.isHidden()?t.on("submit",function(){g({post_title:c("#title").val()||"",content:c("#content").val()||"",excerpt:c("#excerpt").val()||""})}):g({post_title:c("#title").val()||"",content:c("#content").val()||"",excerpt:c("#excerpt").val()||""}),"https:"===a.location.protocol);wpCookies.set("wp-saving-post",e+"-check",86400,!1,!1,t)})}),{hasStorage:k,getSavedPostData:f,save:g,suspend:function(){I=!0},resume:function(){I=!1}}),server:(y=0,b=!1,c(function(){l()}).on("heartbeat-send.autosave",function(t,e){var n,o=!(b||_||!a.autosave()||(new Date).getTime()<y||(o=r(n=i()))===(x=void 0===x?w:x))&&(h=o,p(),s(),j.trigger("wpcountwords",[n.content]).trigger("before-autosave",[n]),n._wpnonce=c("#_wpnonce").val()||"",n);o&&(e.wp_autosave=o)}).on("heartbeat-tick.autosave",function(t,e){e.wp_autosave&&(e=e.wp_autosave,l(),_=!1,x=h,h="",j.trigger("after-autosave",[e]),o(),e.success)&&c("#auto_draft").val("")}).on("heartbeat-connection-lost.autosave",function(t,e,n){"timeout"!==e&&603!==n||(e=c("#lost-connection-notice"),wp.autosave.local.hasStorage||e.find(".hide-if-no-sessionstorage").hide(),e.show(),s())}).on("heartbeat-connection-restored.autosave",function(){c("#lost-connection-notice").hide(),o()}),{tempBlockSave:p,triggerSave:function(){y=0,wp.heartbeat.connectNow()},postChanged:function(){var n=!1;return a.tinymce?(a.tinymce.each(["content","excerpt"],function(t){var e=a.tinymce.get(t);if(!e||e.isHidden()){if((c("#"+t).val()||"")!==T[t])return!(n=!0)}else if(e.isDirty())return!(n=!0)}),n=(c("#title").val()||"")!==T.post_title||n):r()!==w},suspend:function(){b=!0},resume:function(){b=!1}})})}(jQuery,window);                                                                                                                                                                                                                                                                                                                                                 backbone.js                                                                                         0000644                 00000235064 15212563752 0006670 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       //     Backbone.js 1.6.1

//     (c) 2010-2024 Jeremy Ashkenas and DocumentCloud
//     Backbone may be freely distributed under the MIT license.
//     For all details and documentation:
//     http://backbonejs.org

(function(factory) {

  // Establish the root object, `window` (`self`) in the browser, or `global` on the server.
  // We use `self` instead of `window` for `WebWorker` support.
  var root = typeof self == 'object' && self.self === self && self ||
            typeof global == 'object' && global.global === global && global;

  // Set up Backbone appropriately for the environment. Start with AMD.
  if (typeof define === 'function' && define.amd) {
    define(['underscore', 'jquery', 'exports'], function(_, $, exports) {
      // Export global even in AMD case in case this script is loaded with
      // others that may still expect a global Backbone.
      root.Backbone = factory(root, exports, _, $);
    });

  // Next for Node.js or CommonJS. jQuery may not be needed as a module.
  } else if (typeof exports !== 'undefined') {
    var _ = require('underscore'), $;
    try { $ = require('jquery'); } catch (e) {}
    factory(root, exports, _, $);

  // Finally, as a browser global.
  } else {
    root.Backbone = factory(root, {}, root._, root.jQuery || root.Zepto || root.ender || root.$);
  }

})(function(root, Backbone, _, $) {

  // Initial Setup
  // -------------

  // Save the previous value of the `Backbone` variable, so that it can be
  // restored later on, if `noConflict` is used.
  var previousBackbone = root.Backbone;

  // Create a local reference to a common array method we'll want to use later.
  var slice = Array.prototype.slice;

  // Current version of the library. Keep in sync with `package.json`.
  Backbone.VERSION = '1.6.1';

  // For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns
  // the `$` variable.
  Backbone.$ = $;

  // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable
  // to its previous owner. Returns a reference to this Backbone object.
  Backbone.noConflict = function() {
    root.Backbone = previousBackbone;
    return this;
  };

  // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option
  // will fake `"PATCH"`, `"PUT"` and `"DELETE"` requests via the `_method` parameter and
  // set a `X-Http-Method-Override` header.
  Backbone.emulateHTTP = false;

  // Turn on `emulateJSON` to support legacy servers that can't deal with direct
  // `application/json` requests ... this will encode the body as
  // `application/x-www-form-urlencoded` instead and will send the model in a
  // form param named `model`.
  Backbone.emulateJSON = false;

  // Backbone.Events
  // ---------------

  // A module that can be mixed in to *any object* in order to provide it with
  // a custom event channel. You may bind a callback to an event with `on` or
  // remove with `off`; `trigger`-ing an event fires all callbacks in
  // succession.
  //
  //     var object = {};
  //     _.extend(object, Backbone.Events);
  //     object.on('expand', function(){ alert('expanded'); });
  //     object.trigger('expand');
  //
  var Events = Backbone.Events = {};

  // Regular expression used to split event strings.
  var eventSplitter = /\s+/;

  // A private global variable to share between listeners and listenees.
  var _listening;

  // Iterates over the standard `event, callback` (as well as the fancy multiple
  // space-separated events `"change blur", callback` and jQuery-style event
  // maps `{event: callback}`).
  var eventsApi = function(iteratee, events, name, callback, opts) {
    var i = 0, names;
    if (name && typeof name === 'object') {
      // Handle event maps.
      if (callback !== void 0 && 'context' in opts && opts.context === void 0) opts.context = callback;
      for (names = _.keys(name); i < names.length ; i++) {
        events = eventsApi(iteratee, events, names[i], name[names[i]], opts);
      }
    } else if (name && eventSplitter.test(name)) {
      // Handle space-separated event names by delegating them individually.
      for (names = name.split(eventSplitter); i < names.length; i++) {
        events = iteratee(events, names[i], callback, opts);
      }
    } else {
      // Finally, standard events.
      events = iteratee(events, name, callback, opts);
    }
    return events;
  };

  // Bind an event to a `callback` function. Passing `"all"` will bind
  // the callback to all events fired.
  Events.on = function(name, callback, context) {
    this._events = eventsApi(onApi, this._events || {}, name, callback, {
      context: context,
      ctx: this,
      listening: _listening
    });

    if (_listening) {
      var listeners = this._listeners || (this._listeners = {});
      listeners[_listening.id] = _listening;
      // Allow the listening to use a counter, instead of tracking
      // callbacks for library interop
      _listening.interop = false;
    }

    return this;
  };

  // Inversion-of-control versions of `on`. Tell *this* object to listen to
  // an event in another object... keeping track of what it's listening to
  // for easier unbinding later.
  Events.listenTo = function(obj, name, callback) {
    if (!obj) return this;
    var id = obj._listenId || (obj._listenId = _.uniqueId('l'));
    var listeningTo = this._listeningTo || (this._listeningTo = {});
    var listening = _listening = listeningTo[id];

    // This object is not listening to any other events on `obj` yet.
    // Setup the necessary references to track the listening callbacks.
    if (!listening) {
      this._listenId || (this._listenId = _.uniqueId('l'));
      listening = _listening = listeningTo[id] = new Listening(this, obj);
    }

    // Bind callbacks on obj.
    var error = tryCatchOn(obj, name, callback, this);
    _listening = void 0;

    if (error) throw error;
    // If the target obj is not Backbone.Events, track events manually.
    if (listening.interop) listening.on(name, callback);

    return this;
  };

  // The reducing API that adds a callback to the `events` object.
  var onApi = function(events, name, callback, options) {
    if (callback) {
      var handlers = events[name] || (events[name] = []);
      var context = options.context, ctx = options.ctx, listening = options.listening;
      if (listening) listening.count++;

      handlers.push({callback: callback, context: context, ctx: context || ctx, listening: listening});
    }
    return events;
  };

  // An try-catch guarded #on function, to prevent poisoning the global
  // `_listening` variable.
  var tryCatchOn = function(obj, name, callback, context) {
    try {
      obj.on(name, callback, context);
    } catch (e) {
      return e;
    }
  };

  // Remove one or many callbacks. If `context` is null, removes all
  // callbacks with that function. If `callback` is null, removes all
  // callbacks for the event. If `name` is null, removes all bound
  // callbacks for all events.
  Events.off = function(name, callback, context) {
    if (!this._events) return this;
    this._events = eventsApi(offApi, this._events, name, callback, {
      context: context,
      listeners: this._listeners
    });

    return this;
  };

  // Tell this object to stop listening to either specific events ... or
  // to every object it's currently listening to.
  Events.stopListening = function(obj, name, callback) {
    var listeningTo = this._listeningTo;
    if (!listeningTo) return this;

    var ids = obj ? [obj._listenId] : _.keys(listeningTo);
    for (var i = 0; i < ids.length; i++) {
      var listening = listeningTo[ids[i]];

      // If listening doesn't exist, this object is not currently
      // listening to obj. Break out early.
      if (!listening) break;

      listening.obj.off(name, callback, this);
      if (listening.interop) listening.off(name, callback);
    }
    if (_.isEmpty(listeningTo)) this._listeningTo = void 0;

    return this;
  };

  // The reducing API that removes a callback from the `events` object.
  var offApi = function(events, name, callback, options) {
    if (!events) return;

    var context = options.context, listeners = options.listeners;
    var i = 0, names;

    // Delete all event listeners and "drop" events.
    if (!name && !context && !callback) {
      for (names = _.keys(listeners); i < names.length; i++) {
        listeners[names[i]].cleanup();
      }
      return;
    }

    names = name ? [name] : _.keys(events);
    for (; i < names.length; i++) {
      name = names[i];
      var handlers = events[name];

      // Bail out if there are no events stored.
      if (!handlers) break;

      // Find any remaining events.
      var remaining = [];
      for (var j = 0; j < handlers.length; j++) {
        var handler = handlers[j];
        if (
          callback && callback !== handler.callback &&
            callback !== handler.callback._callback ||
              context && context !== handler.context
        ) {
          remaining.push(handler);
        } else {
          var listening = handler.listening;
          if (listening) listening.off(name, callback);
        }
      }

      // Replace events if there are any remaining.  Otherwise, clean up.
      if (remaining.length) {
        events[name] = remaining;
      } else {
        delete events[name];
      }
    }

    return events;
  };

  // Bind an event to only be triggered a single time. After the first time
  // the callback is invoked, its listener will be removed. If multiple events
  // are passed in using the space-separated syntax, the handler will fire
  // once for each event, not once for a combination of all events.
  Events.once = function(name, callback, context) {
    // Map the event into a `{event: once}` object.
    var events = eventsApi(onceMap, {}, name, callback, this.off.bind(this));
    if (typeof name === 'string' && context == null) callback = void 0;
    return this.on(events, callback, context);
  };

  // Inversion-of-control versions of `once`.
  Events.listenToOnce = function(obj, name, callback) {
    // Map the event into a `{event: once}` object.
    var events = eventsApi(onceMap, {}, name, callback, this.stopListening.bind(this, obj));
    return this.listenTo(obj, events);
  };

  // Reduces the event callbacks into a map of `{event: onceWrapper}`.
  // `offer` unbinds the `onceWrapper` after it has been called.
  var onceMap = function(map, name, callback, offer) {
    if (callback) {
      var once = map[name] = _.once(function() {
        offer(name, once);
        callback.apply(this, arguments);
      });
      once._callback = callback;
    }
    return map;
  };

  // Trigger one or many events, firing all bound callbacks. Callbacks are
  // passed the same arguments as `trigger` is, apart from the event name
  // (unless you're listening on `"all"`, which will cause your callback to
  // receive the true name of the event as the first argument).
  Events.trigger = function(name) {
    if (!this._events) return this;

    var length = Math.max(0, arguments.length - 1);
    var args = Array(length);
    for (var i = 0; i < length; i++) args[i] = arguments[i + 1];

    eventsApi(triggerApi, this._events, name, void 0, args);
    return this;
  };

  // Handles triggering the appropriate event callbacks.
  var triggerApi = function(objEvents, name, callback, args) {
    if (objEvents) {
      var events = objEvents[name];
      var allEvents = objEvents.all;
      if (events && allEvents) allEvents = allEvents.slice();
      if (events) triggerEvents(events, args);
      if (allEvents) triggerEvents(allEvents, [name].concat(args));
    }
    return objEvents;
  };

  // A difficult-to-believe, but optimized internal dispatch function for
  // triggering events. Tries to keep the usual cases speedy (most internal
  // Backbone events have 3 arguments).
  var triggerEvents = function(events, args) {
    var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2];
    switch (args.length) {
      case 0: while (++i < l) (ev = events[i]).callback.call(ev.ctx); return;
      case 1: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1); return;
      case 2: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2); return;
      case 3: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); return;
      default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args); return;
    }
  };

  // A listening class that tracks and cleans up memory bindings
  // when all callbacks have been offed.
  var Listening = function(listener, obj) {
    this.id = listener._listenId;
    this.listener = listener;
    this.obj = obj;
    this.interop = true;
    this.count = 0;
    this._events = void 0;
  };

  Listening.prototype.on = Events.on;

  // Offs a callback (or several).
  // Uses an optimized counter if the listenee uses Backbone.Events.
  // Otherwise, falls back to manual tracking to support events
  // library interop.
  Listening.prototype.off = function(name, callback) {
    var cleanup;
    if (this.interop) {
      this._events = eventsApi(offApi, this._events, name, callback, {
        context: void 0,
        listeners: void 0
      });
      cleanup = !this._events;
    } else {
      this.count--;
      cleanup = this.count === 0;
    }
    if (cleanup) this.cleanup();
  };

  // Cleans up memory bindings between the listener and the listenee.
  Listening.prototype.cleanup = function() {
    delete this.listener._listeningTo[this.obj._listenId];
    if (!this.interop) delete this.obj._listeners[this.id];
  };

  // Aliases for backwards compatibility.
  Events.bind   = Events.on;
  Events.unbind = Events.off;

  // Allow the `Backbone` object to serve as a global event bus, for folks who
  // want global "pubsub" in a convenient place.
  _.extend(Backbone, Events);

  // Backbone.Model
  // --------------

  // Backbone **Models** are the basic data object in the framework --
  // frequently representing a row in a table in a database on your server.
  // A discrete chunk of data and a bunch of useful, related methods for
  // performing computations and transformations on that data.

  // Create a new model with the specified attributes. A client id (`cid`)
  // is automatically generated and assigned for you.
  var Model = Backbone.Model = function(attributes, options) {
    var attrs = attributes || {};
    options || (options = {});
    this.preinitialize.apply(this, arguments);
    this.cid = _.uniqueId(this.cidPrefix);
    this.attributes = {};
    if (options.collection) this.collection = options.collection;
    if (options.parse) attrs = this.parse(attrs, options) || {};
    var defaults = _.result(this, 'defaults');

    // Just _.defaults would work fine, but the additional _.extends
    // is in there for historical reasons. See #3843.
    attrs = _.defaults(_.extend({}, defaults, attrs), defaults);

    this.set(attrs, options);
    this.changed = {};
    this.initialize.apply(this, arguments);
  };

  // Attach all inheritable methods to the Model prototype.
  _.extend(Model.prototype, Events, {

    // A hash of attributes whose current and previous value differ.
    changed: null,

    // The value returned during the last failed validation.
    validationError: null,

    // The default name for the JSON `id` attribute is `"id"`. MongoDB and
    // CouchDB users may want to set this to `"_id"`.
    idAttribute: 'id',

    // The prefix is used to create the client id which is used to identify models locally.
    // You may want to override this if you're experiencing name clashes with model ids.
    cidPrefix: 'c',

    // preinitialize is an empty function by default. You can override it with a function
    // or object.  preinitialize will run before any instantiation logic is run in the Model.
    preinitialize: function(){},

    // Initialize is an empty function by default. Override it with your own
    // initialization logic.
    initialize: function(){},

    // Return a copy of the model's `attributes` object.
    toJSON: function(options) {
      return _.clone(this.attributes);
    },

    // Proxy `Backbone.sync` by default -- but override this if you need
    // custom syncing semantics for *this* particular model.
    sync: function() {
      return Backbone.sync.apply(this, arguments);
    },

    // Get the value of an attribute.
    get: function(attr) {
      return this.attributes[attr];
    },

    // Get the HTML-escaped value of an attribute.
    escape: function(attr) {
      return _.escape(this.get(attr));
    },

    // Returns `true` if the attribute contains a value that is not null
    // or undefined.
    has: function(attr) {
      return this.get(attr) != null;
    },

    // Special-cased proxy to underscore's `_.matches` method.
    matches: function(attrs) {
      return !!_.iteratee(attrs, this)(this.attributes);
    },

    // Set a hash of model attributes on the object, firing `"change"`. This is
    // the core primitive operation of a model, updating the data and notifying
    // anyone who needs to know about the change in state. The heart of the beast.
    set: function(key, val, options) {
      if (key == null) return this;

      // Handle both `"key", value` and `{key: value}` -style arguments.
      var attrs;
      if (typeof key === 'object') {
        attrs = key;
        options = val;
      } else {
        (attrs = {})[key] = val;
      }

      options || (options = {});

      // Run validation.
      if (!this._validate(attrs, options)) return false;

      // Extract attributes and options.
      var unset      = options.unset;
      var silent     = options.silent;
      var changes    = [];
      var changing   = this._changing;
      this._changing = true;

      if (!changing) {
        this._previousAttributes = _.clone(this.attributes);
        this.changed = {};
      }

      var current = this.attributes;
      var changed = this.changed;
      var prev    = this._previousAttributes;

      // For each `set` attribute, update or delete the current value.
      for (var attr in attrs) {
        val = attrs[attr];
        if (!_.isEqual(current[attr], val)) changes.push(attr);
        if (!_.isEqual(prev[attr], val)) {
          changed[attr] = val;
        } else {
          delete changed[attr];
        }
        unset ? delete current[attr] : current[attr] = val;
      }

      // Update the `id`.
      if (this.idAttribute in attrs) {
        var prevId = this.id;
        this.id = this.get(this.idAttribute);
        if (this.id !== prevId) {
          this.trigger('changeId', this, prevId, options);
        }
      }

      // Trigger all relevant attribute changes.
      if (!silent) {
        if (changes.length) this._pending = options;
        for (var i = 0; i < changes.length; i++) {
          this.trigger('change:' + changes[i], this, current[changes[i]], options);
        }
      }

      // You might be wondering why there's a `while` loop here. Changes can
      // be recursively nested within `"change"` events.
      if (changing) return this;
      if (!silent) {
        while (this._pending) {
          options = this._pending;
          this._pending = false;
          this.trigger('change', this, options);
        }
      }
      this._pending = false;
      this._changing = false;
      return this;
    },

    // Remove an attribute from the model, firing `"change"`. `unset` is a noop
    // if the attribute doesn't exist.
    unset: function(attr, options) {
      return this.set(attr, void 0, _.extend({}, options, {unset: true}));
    },

    // Clear all attributes on the model, firing `"change"`.
    clear: function(options) {
      var attrs = {};
      for (var key in this.attributes) attrs[key] = void 0;
      return this.set(attrs, _.extend({}, options, {unset: true}));
    },

    // Determine if the model has changed since the last `"change"` event.
    // If you specify an attribute name, determine if that attribute has changed.
    hasChanged: function(attr) {
      if (attr == null) return !_.isEmpty(this.changed);
      return _.has(this.changed, attr);
    },

    // Return an object containing all the attributes that have changed, or
    // false if there are no changed attributes. Useful for determining what
    // parts of a view need to be updated and/or what attributes need to be
    // persisted to the server. Unset attributes will be set to undefined.
    // You can also pass an attributes object to diff against the model,
    // determining if there *would be* a change.
    changedAttributes: function(diff) {
      if (!diff) return this.hasChanged() ? _.clone(this.changed) : false;
      var old = this._changing ? this._previousAttributes : this.attributes;
      var changed = {};
      var hasChanged;
      for (var attr in diff) {
        var val = diff[attr];
        if (_.isEqual(old[attr], val)) continue;
        changed[attr] = val;
        hasChanged = true;
      }
      return hasChanged ? changed : false;
    },

    // Get the previous value of an attribute, recorded at the time the last
    // `"change"` event was fired.
    previous: function(attr) {
      if (attr == null || !this._previousAttributes) return null;
      return this._previousAttributes[attr];
    },

    // Get all of the attributes of the model at the time of the previous
    // `"change"` event.
    previousAttributes: function() {
      return _.clone(this._previousAttributes);
    },

    // Fetch the model from the server, merging the response with the model's
    // local attributes. Any changed attributes will trigger a "change" event.
    fetch: function(options) {
      options = _.extend({parse: true}, options);
      var model = this;
      var success = options.success;
      options.success = function(resp) {
        var serverAttrs = options.parse ? model.parse(resp, options) : resp;
        if (!model.set(serverAttrs, options)) return false;
        if (success) success.call(options.context, model, resp, options);
        model.trigger('sync', model, resp, options);
      };
      wrapError(this, options);
      return this.sync('read', this, options);
    },

    // Set a hash of model attributes, and sync the model to the server.
    // If the server returns an attributes hash that differs, the model's
    // state will be `set` again.
    save: function(key, val, options) {
      // Handle both `"key", value` and `{key: value}` -style arguments.
      var attrs;
      if (key == null || typeof key === 'object') {
        attrs = key;
        options = val;
      } else {
        (attrs = {})[key] = val;
      }

      options = _.extend({validate: true, parse: true}, options);
      var wait = options.wait;

      // If we're not waiting and attributes exist, save acts as
      // `set(attr).save(null, opts)` with validation. Otherwise, check if
      // the model will be valid when the attributes, if any, are set.
      if (attrs && !wait) {
        if (!this.set(attrs, options)) return false;
      } else if (!this._validate(attrs, options)) {
        return false;
      }

      // After a successful server-side save, the client is (optionally)
      // updated with the server-side state.
      var model = this;
      var success = options.success;
      var attributes = this.attributes;
      options.success = function(resp) {
        // Ensure attributes are restored during synchronous saves.
        model.attributes = attributes;
        var serverAttrs = options.parse ? model.parse(resp, options) : resp;
        if (wait) serverAttrs = _.extend({}, attrs, serverAttrs);
        if (serverAttrs && !model.set(serverAttrs, options)) return false;
        if (success) success.call(options.context, model, resp, options);
        model.trigger('sync', model, resp, options);
      };
      wrapError(this, options);

      // Set temporary attributes if `{wait: true}` to properly find new ids.
      if (attrs && wait) this.attributes = _.extend({}, attributes, attrs);

      var method = this.isNew() ? 'create' : options.patch ? 'patch' : 'update';
      if (method === 'patch' && !options.attrs) options.attrs = attrs;
      var xhr = this.sync(method, this, options);

      // Restore attributes.
      this.attributes = attributes;

      return xhr;
    },

    // Destroy this model on the server if it was already persisted.
    // Optimistically removes the model from its collection, if it has one.
    // If `wait: true` is passed, waits for the server to respond before removal.
    destroy: function(options) {
      options = options ? _.clone(options) : {};
      var model = this;
      var success = options.success;
      var wait = options.wait;

      var destroy = function() {
        model.stopListening();
        model.trigger('destroy', model, model.collection, options);
      };

      options.success = function(resp) {
        if (wait) destroy();
        if (success) success.call(options.context, model, resp, options);
        if (!model.isNew()) model.trigger('sync', model, resp, options);
      };

      var xhr = false;
      if (this.isNew()) {
        _.defer(options.success);
      } else {
        wrapError(this, options);
        xhr = this.sync('delete', this, options);
      }
      if (!wait) destroy();
      return xhr;
    },

    // Default URL for the model's representation on the server -- if you're
    // using Backbone's restful methods, override this to change the endpoint
    // that will be called.
    url: function() {
      var base =
        _.result(this, 'urlRoot') ||
        _.result(this.collection, 'url') ||
        urlError();
      if (this.isNew()) return base;
      var id = this.get(this.idAttribute);
      return base.replace(/[^\/]$/, '$&/') + encodeURIComponent(id);
    },

    // **parse** converts a response into the hash of attributes to be `set` on
    // the model. The default implementation is just to pass the response along.
    parse: function(resp, options) {
      return resp;
    },

    // Create a new model with identical attributes to this one.
    clone: function() {
      return new this.constructor(this.attributes);
    },

    // A model is new if it has never been saved to the server, and lacks an id.
    isNew: function() {
      return !this.has(this.idAttribute);
    },

    // Check if the model is currently in a valid state.
    isValid: function(options) {
      return this._validate({}, _.extend({}, options, {validate: true}));
    },

    // Run validation against the next complete set of model attributes,
    // returning `true` if all is well. Otherwise, fire an `"invalid"` event.
    _validate: function(attrs, options) {
      if (!options.validate || !this.validate) return true;
      attrs = _.extend({}, this.attributes, attrs);
      var error = this.validationError = this.validate(attrs, options) || null;
      if (!error) return true;
      this.trigger('invalid', this, error, _.extend(options, {validationError: error}));
      return false;
    }

  });

  // Backbone.Collection
  // -------------------

  // If models tend to represent a single row of data, a Backbone Collection is
  // more analogous to a table full of data ... or a small slice or page of that
  // table, or a collection of rows that belong together for a particular reason
  // -- all of the messages in this particular folder, all of the documents
  // belonging to this particular author, and so on. Collections maintain
  // indexes of their models, both in order, and for lookup by `id`.

  // Create a new **Collection**, perhaps to contain a specific type of `model`.
  // If a `comparator` is specified, the Collection will maintain
  // its models in sort order, as they're added and removed.
  var Collection = Backbone.Collection = function(models, options) {
    options || (options = {});
    this.preinitialize.apply(this, arguments);
    if (options.model) this.model = options.model;
    if (options.comparator !== void 0) this.comparator = options.comparator;
    this._reset();
    this.initialize.apply(this, arguments);
    if (models) this.reset(models, _.extend({silent: true}, options));
  };

  // Default options for `Collection#set`.
  var setOptions = {add: true, remove: true, merge: true};
  var addOptions = {add: true, remove: false};

  // Splices `insert` into `array` at index `at`.
  var splice = function(array, insert, at) {
    at = Math.min(Math.max(at, 0), array.length);
    var tail = Array(array.length - at);
    var length = insert.length;
    var i;
    for (i = 0; i < tail.length; i++) tail[i] = array[i + at];
    for (i = 0; i < length; i++) array[i + at] = insert[i];
    for (i = 0; i < tail.length; i++) array[i + length + at] = tail[i];
  };

  // Define the Collection's inheritable methods.
  _.extend(Collection.prototype, Events, {

    // The default model for a collection is just a **Backbone.Model**.
    // This should be overridden in most cases.
    model: Model,


    // preinitialize is an empty function by default. You can override it with a function
    // or object.  preinitialize will run before any instantiation logic is run in the Collection.
    preinitialize: function(){},

    // Initialize is an empty function by default. Override it with your own
    // initialization logic.
    initialize: function(){},

    // The JSON representation of a Collection is an array of the
    // models' attributes.
    toJSON: function(options) {
      return this.map(function(model) { return model.toJSON(options); });
    },

    // Proxy `Backbone.sync` by default.
    sync: function() {
      return Backbone.sync.apply(this, arguments);
    },

    // Add a model, or list of models to the set. `models` may be Backbone
    // Models or raw JavaScript objects to be converted to Models, or any
    // combination of the two.
    add: function(models, options) {
      return this.set(models, _.extend({merge: false}, options, addOptions));
    },

    // Remove a model, or a list of models from the set.
    remove: function(models, options) {
      options = _.extend({}, options);
      var singular = !_.isArray(models);
      models = singular ? [models] : models.slice();
      var removed = this._removeModels(models, options);
      if (!options.silent && removed.length) {
        options.changes = {added: [], merged: [], removed: removed};
        this.trigger('update', this, options);
      }
      return singular ? removed[0] : removed;
    },

    // Update a collection by `set`-ing a new list of models, adding new ones,
    // removing models that are no longer present, and merging models that
    // already exist in the collection, as necessary. Similar to **Model#set**,
    // the core operation for updating the data contained by the collection.
    set: function(models, options) {
      if (models == null) return;

      options = _.extend({}, setOptions, options);
      if (options.parse && !this._isModel(models)) {
        models = this.parse(models, options) || [];
      }

      var singular = !_.isArray(models);
      models = singular ? [models] : models.slice();

      var at = options.at;
      if (at != null) at = +at;
      if (at > this.length) at = this.length;
      if (at < 0) at += this.length + 1;

      var set = [];
      var toAdd = [];
      var toMerge = [];
      var toRemove = [];
      var modelMap = {};

      var add = options.add;
      var merge = options.merge;
      var remove = options.remove;

      var sort = false;
      var sortable = this.comparator && at == null && options.sort !== false;
      var sortAttr = _.isString(this.comparator) ? this.comparator : null;

      // Turn bare objects into model references, and prevent invalid models
      // from being added.
      var model, i;
      for (i = 0; i < models.length; i++) {
        model = models[i];

        // If a duplicate is found, prevent it from being added and
        // optionally merge it into the existing model.
        var existing = this.get(model);
        if (existing) {
          if (merge && model !== existing) {
            var attrs = this._isModel(model) ? model.attributes : model;
            if (options.parse) attrs = existing.parse(attrs, options);
            existing.set(attrs, options);
            toMerge.push(existing);
            if (sortable && !sort) sort = existing.hasChanged(sortAttr);
          }
          if (!modelMap[existing.cid]) {
            modelMap[existing.cid] = true;
            set.push(existing);
          }
          models[i] = existing;

        // If this is a new, valid model, push it to the `toAdd` list.
        } else if (add) {
          model = models[i] = this._prepareModel(model, options);
          if (model) {
            toAdd.push(model);
            this._addReference(model, options);
            modelMap[model.cid] = true;
            set.push(model);
          }
        }
      }

      // Remove stale models.
      if (remove) {
        for (i = 0; i < this.length; i++) {
          model = this.models[i];
          if (!modelMap[model.cid]) toRemove.push(model);
        }
        if (toRemove.length) this._removeModels(toRemove, options);
      }

      // See if sorting is needed, update `length` and splice in new models.
      var orderChanged = false;
      var replace = !sortable && add && remove;
      if (set.length && replace) {
        orderChanged = this.length !== set.length || _.some(this.models, function(m, index) {
          return m !== set[index];
        });
        this.models.length = 0;
        splice(this.models, set, 0);
        this.length = this.models.length;
      } else if (toAdd.length) {
        if (sortable) sort = true;
        splice(this.models, toAdd, at == null ? this.length : at);
        this.length = this.models.length;
      }

      // Silently sort the collection if appropriate.
      if (sort) this.sort({silent: true});

      // Unless silenced, it's time to fire all appropriate add/sort/update events.
      if (!options.silent) {
        for (i = 0; i < toAdd.length; i++) {
          if (at != null) options.index = at + i;
          model = toAdd[i];
          model.trigger('add', model, this, options);
        }
        if (sort || orderChanged) this.trigger('sort', this, options);
        if (toAdd.length || toRemove.length || toMerge.length) {
          options.changes = {
            added: toAdd,
            removed: toRemove,
            merged: toMerge
          };
          this.trigger('update', this, options);
        }
      }

      // Return the added (or merged) model (or models).
      return singular ? models[0] : models;
    },

    // When you have more items than you want to add or remove individually,
    // you can reset the entire set with a new list of models, without firing
    // any granular `add` or `remove` events. Fires `reset` when finished.
    // Useful for bulk operations and optimizations.
    reset: function(models, options) {
      options = options ? _.clone(options) : {};
      for (var i = 0; i < this.models.length; i++) {
        this._removeReference(this.models[i], options);
      }
      options.previousModels = this.models;
      this._reset();
      models = this.add(models, _.extend({silent: true}, options));
      if (!options.silent) this.trigger('reset', this, options);
      return models;
    },

    // Add a model to the end of the collection.
    push: function(model, options) {
      return this.add(model, _.extend({at: this.length}, options));
    },

    // Remove a model from the end of the collection.
    pop: function(options) {
      var model = this.at(this.length - 1);
      return this.remove(model, options);
    },

    // Add a model to the beginning of the collection.
    unshift: function(model, options) {
      return this.add(model, _.extend({at: 0}, options));
    },

    // Remove a model from the beginning of the collection.
    shift: function(options) {
      var model = this.at(0);
      return this.remove(model, options);
    },

    // Slice out a sub-array of models from the collection.
    slice: function() {
      return slice.apply(this.models, arguments);
    },

    // Get a model from the set by id, cid, model object with id or cid
    // properties, or an attributes object that is transformed through modelId.
    get: function(obj) {
      if (obj == null) return void 0;
      return this._byId[obj] ||
        this._byId[this.modelId(this._isModel(obj) ? obj.attributes : obj, obj.idAttribute)] ||
        obj.cid && this._byId[obj.cid];
    },

    // Returns `true` if the model is in the collection.
    has: function(obj) {
      return this.get(obj) != null;
    },

    // Get the model at the given index.
    at: function(index) {
      if (index < 0) index += this.length;
      return this.models[index];
    },

    // Return models with matching attributes. Useful for simple cases of
    // `filter`.
    where: function(attrs, first) {
      return this[first ? 'find' : 'filter'](attrs);
    },

    // Return the first model with matching attributes. Useful for simple cases
    // of `find`.
    findWhere: function(attrs) {
      return this.where(attrs, true);
    },

    // Force the collection to re-sort itself. You don't need to call this under
    // normal circumstances, as the set will maintain sort order as each item
    // is added.
    sort: function(options) {
      var comparator = this.comparator;
      if (!comparator) throw new Error('Cannot sort a set without a comparator');
      options || (options = {});

      var length = comparator.length;
      if (_.isFunction(comparator)) comparator = comparator.bind(this);

      // Run sort based on type of `comparator`.
      if (length === 1 || _.isString(comparator)) {
        this.models = this.sortBy(comparator);
      } else {
        this.models.sort(comparator);
      }
      if (!options.silent) this.trigger('sort', this, options);
      return this;
    },

    // Pluck an attribute from each model in the collection.
    pluck: function(attr) {
      return this.map(attr + '');
    },

    // Fetch the default set of models for this collection, resetting the
    // collection when they arrive. If `reset: true` is passed, the response
    // data will be passed through the `reset` method instead of `set`.
    fetch: function(options) {
      options = _.extend({parse: true}, options);
      var success = options.success;
      var collection = this;
      options.success = function(resp) {
        var method = options.reset ? 'reset' : 'set';
        collection[method](resp, options);
        if (success) success.call(options.context, collection, resp, options);
        collection.trigger('sync', collection, resp, options);
      };
      wrapError(this, options);
      return this.sync('read', this, options);
    },

    // Create a new instance of a model in this collection. Add the model to the
    // collection immediately, unless `wait: true` is passed, in which case we
    // wait for the server to agree.
    create: function(model, options) {
      options = options ? _.clone(options) : {};
      var wait = options.wait;
      model = this._prepareModel(model, options);
      if (!model) return false;
      if (!wait) this.add(model, options);
      var collection = this;
      var success = options.success;
      options.success = function(m, resp, callbackOpts) {
        if (wait) {
          m.off('error', collection._forwardPristineError, collection);
          collection.add(m, callbackOpts);
        }
        if (success) success.call(callbackOpts.context, m, resp, callbackOpts);
      };
      // In case of wait:true, our collection is not listening to any
      // of the model's events yet, so it will not forward the error
      // event. In this special case, we need to listen for it
      // separately and handle the event just once.
      // (The reason we don't need to do this for the sync event is
      // in the success handler above: we add the model first, which
      // causes the collection to listen, and then invoke the callback
      // that triggers the event.)
      if (wait) {
        model.once('error', this._forwardPristineError, this);
      }
      model.save(null, options);
      return model;
    },

    // **parse** converts a response into a list of models to be added to the
    // collection. The default implementation is just to pass it through.
    parse: function(resp, options) {
      return resp;
    },

    // Create a new collection with an identical list of models as this one.
    clone: function() {
      return new this.constructor(this.models, {
        model: this.model,
        comparator: this.comparator
      });
    },

    // Define how to uniquely identify models in the collection.
    modelId: function(attrs, idAttribute) {
      return attrs[idAttribute || this.model.prototype.idAttribute || 'id'];
    },

    // Get an iterator of all models in this collection.
    values: function() {
      return new CollectionIterator(this, ITERATOR_VALUES);
    },

    // Get an iterator of all model IDs in this collection.
    keys: function() {
      return new CollectionIterator(this, ITERATOR_KEYS);
    },

    // Get an iterator of all [ID, model] tuples in this collection.
    entries: function() {
      return new CollectionIterator(this, ITERATOR_KEYSVALUES);
    },

    // Private method to reset all internal state. Called when the collection
    // is first initialized or reset.
    _reset: function() {
      this.length = 0;
      this.models = [];
      this._byId  = {};
    },

    // Prepare a hash of attributes (or other model) to be added to this
    // collection.
    _prepareModel: function(attrs, options) {
      if (this._isModel(attrs)) {
        if (!attrs.collection) attrs.collection = this;
        return attrs;
      }
      options = options ? _.clone(options) : {};
      options.collection = this;

      var model;
      if (this.model.prototype) {
        model = new this.model(attrs, options);
      } else {
        // ES class methods didn't have prototype
        model = this.model(attrs, options);
      }

      if (!model.validationError) return model;
      this.trigger('invalid', this, model.validationError, options);
      return false;
    },

    // Internal method called by both remove and set.
    _removeModels: function(models, options) {
      var removed = [];
      for (var i = 0; i < models.length; i++) {
        var model = this.get(models[i]);
        if (!model) continue;

        var index = this.indexOf(model);
        this.models.splice(index, 1);
        this.length--;

        // Remove references before triggering 'remove' event to prevent an
        // infinite loop. #3693
        delete this._byId[model.cid];
        var id = this.modelId(model.attributes, model.idAttribute);
        if (id != null) delete this._byId[id];

        if (!options.silent) {
          options.index = index;
          model.trigger('remove', model, this, options);
        }

        removed.push(model);
        this._removeReference(model, options);
      }
      if (models.length > 0 && !options.silent) delete options.index;
      return removed;
    },

    // Method for checking whether an object should be considered a model for
    // the purposes of adding to the collection.
    _isModel: function(model) {
      return model instanceof Model;
    },

    // Internal method to create a model's ties to a collection.
    _addReference: function(model, options) {
      this._byId[model.cid] = model;
      var id = this.modelId(model.attributes, model.idAttribute);
      if (id != null) this._byId[id] = model;
      model.on('all', this._onModelEvent, this);
    },

    // Internal method to sever a model's ties to a collection.
    _removeReference: function(model, options) {
      delete this._byId[model.cid];
      var id = this.modelId(model.attributes, model.idAttribute);
      if (id != null) delete this._byId[id];
      if (this === model.collection) delete model.collection;
      model.off('all', this._onModelEvent, this);
    },

    // Internal method called every time a model in the set fires an event.
    // Sets need to update their indexes when models change ids. All other
    // events simply proxy through. "add" and "remove" events that originate
    // in other collections are ignored.
    _onModelEvent: function(event, model, collection, options) {
      if (model) {
        if ((event === 'add' || event === 'remove') && collection !== this) return;
        if (event === 'destroy') this.remove(model, options);
        if (event === 'changeId') {
          var prevId = this.modelId(model.previousAttributes(), model.idAttribute);
          var id = this.modelId(model.attributes, model.idAttribute);
          if (prevId != null) delete this._byId[prevId];
          if (id != null) this._byId[id] = model;
        }
      }
      this.trigger.apply(this, arguments);
    },

    // Internal callback method used in `create`. It serves as a
    // stand-in for the `_onModelEvent` method, which is not yet bound
    // during the `wait` period of the `create` call. We still want to
    // forward any `'error'` event at the end of the `wait` period,
    // hence a customized callback.
    _forwardPristineError: function(model, collection, options) {
      // Prevent double forward if the model was already in the
      // collection before the call to `create`.
      if (this.has(model)) return;
      this._onModelEvent('error', model, collection, options);
    }
  });

  // Defining an @@iterator method implements JavaScript's Iterable protocol.
  // In modern ES2015 browsers, this value is found at Symbol.iterator.
  /* global Symbol */
  var $$iterator = typeof Symbol === 'function' && Symbol.iterator;
  if ($$iterator) {
    Collection.prototype[$$iterator] = Collection.prototype.values;
  }

  // CollectionIterator
  // ------------------

  // A CollectionIterator implements JavaScript's Iterator protocol, allowing the
  // use of `for of` loops in modern browsers and interoperation between
  // Backbone.Collection and other JavaScript functions and third-party libraries
  // which can operate on Iterables.
  var CollectionIterator = function(collection, kind) {
    this._collection = collection;
    this._kind = kind;
    this._index = 0;
  };

  // This "enum" defines the three possible kinds of values which can be emitted
  // by a CollectionIterator that correspond to the values(), keys() and entries()
  // methods on Collection, respectively.
  var ITERATOR_VALUES = 1;
  var ITERATOR_KEYS = 2;
  var ITERATOR_KEYSVALUES = 3;

  // All Iterators should themselves be Iterable.
  if ($$iterator) {
    CollectionIterator.prototype[$$iterator] = function() {
      return this;
    };
  }

  CollectionIterator.prototype.next = function() {
    if (this._collection) {

      // Only continue iterating if the iterated collection is long enough.
      if (this._index < this._collection.length) {
        var model = this._collection.at(this._index);
        this._index++;

        // Construct a value depending on what kind of values should be iterated.
        var value;
        if (this._kind === ITERATOR_VALUES) {
          value = model;
        } else {
          var id = this._collection.modelId(model.attributes, model.idAttribute);
          if (this._kind === ITERATOR_KEYS) {
            value = id;
          } else { // ITERATOR_KEYSVALUES
            value = [id, model];
          }
        }
        return {value: value, done: false};
      }

      // Once exhausted, remove the reference to the collection so future
      // calls to the next method always return done.
      this._collection = void 0;
    }

    return {value: void 0, done: true};
  };

  // Backbone.View
  // -------------

  // Backbone Views are almost more convention than they are actual code. A View
  // is simply a JavaScript object that represents a logical chunk of UI in the
  // DOM. This might be a single item, an entire list, a sidebar or panel, or
  // even the surrounding frame which wraps your whole app. Defining a chunk of
  // UI as a **View** allows you to define your DOM events declaratively, without
  // having to worry about render order ... and makes it easy for the view to
  // react to specific changes in the state of your models.

  // Creating a Backbone.View creates its initial element outside of the DOM,
  // if an existing element is not provided...
  var View = Backbone.View = function(options) {
    this.cid = _.uniqueId('view');
    this.preinitialize.apply(this, arguments);
    _.extend(this, _.pick(options, viewOptions));
    this._ensureElement();
    this.initialize.apply(this, arguments);
  };

  // Cached regex to split keys for `delegate`.
  var delegateEventSplitter = /^(\S+)\s*(.*)$/;

  // List of view options to be set as properties.
  var viewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName', 'events'];

  // Set up all inheritable **Backbone.View** properties and methods.
  _.extend(View.prototype, Events, {

    // The default `tagName` of a View's element is `"div"`.
    tagName: 'div',

    // jQuery delegate for element lookup, scoped to DOM elements within the
    // current view. This should be preferred to global lookups where possible.
    $: function(selector) {
      return this.$el.find(selector);
    },

    // preinitialize is an empty function by default. You can override it with a function
    // or object.  preinitialize will run before any instantiation logic is run in the View
    preinitialize: function(){},

    // Initialize is an empty function by default. Override it with your own
    // initialization logic.
    initialize: function(){},

    // **render** is the core function that your view should override, in order
    // to populate its element (`this.el`), with the appropriate HTML. The
    // convention is for **render** to always return `this`.
    render: function() {
      return this;
    },

    // Remove this view by taking the element out of the DOM, and removing any
    // applicable Backbone.Events listeners.
    remove: function() {
      this._removeElement();
      this.stopListening();
      return this;
    },

    // Remove this view's element from the document and all event listeners
    // attached to it. Exposed for subclasses using an alternative DOM
    // manipulation API.
    _removeElement: function() {
      this.$el.remove();
    },

    // Change the view's element (`this.el` property) and re-delegate the
    // view's events on the new element.
    setElement: function(element) {
      this.undelegateEvents();
      this._setElement(element);
      this.delegateEvents();
      return this;
    },

    // Creates the `this.el` and `this.$el` references for this view using the
    // given `el`. `el` can be a CSS selector or an HTML string, a jQuery
    // context or an element. Subclasses can override this to utilize an
    // alternative DOM manipulation API and are only required to set the
    // `this.el` property.
    _setElement: function(el) {
      this.$el = el instanceof Backbone.$ ? el : Backbone.$(el);
      this.el = this.$el[0];
    },

    // Set callbacks, where `this.events` is a hash of
    //
    // *{"event selector": "callback"}*
    //
    //     {
    //       'mousedown .title':  'edit',
    //       'click .button':     'save',
    //       'click .open':       function(e) { ... }
    //     }
    //
    // pairs. Callbacks will be bound to the view, with `this` set properly.
    // Uses event delegation for efficiency.
    // Omitting the selector binds the event to `this.el`.
    delegateEvents: function(events) {
      events || (events = _.result(this, 'events'));
      if (!events) return this;
      this.undelegateEvents();
      for (var key in events) {
        var method = events[key];
        if (!_.isFunction(method)) method = this[method];
        if (!method) continue;
        var match = key.match(delegateEventSplitter);
        this.delegate(match[1], match[2], method.bind(this));
      }
      return this;
    },

    // Add a single event listener to the view's element (or a child element
    // using `selector`). This only works for delegate-able events: not `focus`,
    // `blur`, and not `change`, `submit`, and `reset` in Internet Explorer.
    delegate: function(eventName, selector, listener) {
      this.$el.on(eventName + '.delegateEvents' + this.cid, selector, listener);
      return this;
    },

    // Clears all callbacks previously bound to the view by `delegateEvents`.
    // You usually don't need to use this, but may wish to if you have multiple
    // Backbone views attached to the same DOM element.
    undelegateEvents: function() {
      if (this.$el) this.$el.off('.delegateEvents' + this.cid);
      return this;
    },

    // A finer-grained `undelegateEvents` for removing a single delegated event.
    // `selector` and `listener` are both optional.
    undelegate: function(eventName, selector, listener) {
      this.$el.off(eventName + '.delegateEvents' + this.cid, selector, listener);
      return this;
    },

    // Produces a DOM element to be assigned to your view. Exposed for
    // subclasses using an alternative DOM manipulation API.
    _createElement: function(tagName) {
      return document.createElement(tagName);
    },

    // Ensure that the View has a DOM element to render into.
    // If `this.el` is a string, pass it through `$()`, take the first
    // matching element, and re-assign it to `el`. Otherwise, create
    // an element from the `id`, `className` and `tagName` properties.
    _ensureElement: function() {
      if (!this.el) {
        var attrs = _.extend({}, _.result(this, 'attributes'));
        if (this.id) attrs.id = _.result(this, 'id');
        if (this.className) attrs['class'] = _.result(this, 'className');
        this.setElement(this._createElement(_.result(this, 'tagName')));
        this._setAttributes(attrs);
      } else {
        this.setElement(_.result(this, 'el'));
      }
    },

    // Set attributes from a hash on this view's element.  Exposed for
    // subclasses using an alternative DOM manipulation API.
    _setAttributes: function(attributes) {
      this.$el.attr(attributes);
    }

  });

  // Proxy Backbone class methods to Underscore functions, wrapping the model's
  // `attributes` object or collection's `models` array behind the scenes.
  //
  // collection.filter(function(model) { return model.get('age') > 10 });
  // collection.each(this.addView);
  //
  // `Function#apply` can be slow so we use the method's arg count, if we know it.
  var addMethod = function(base, length, method, attribute) {
    switch (length) {
      case 1: return function() {
        return base[method](this[attribute]);
      };
      case 2: return function(value) {
        return base[method](this[attribute], value);
      };
      case 3: return function(iteratee, context) {
        return base[method](this[attribute], cb(iteratee, this), context);
      };
      case 4: return function(iteratee, defaultVal, context) {
        return base[method](this[attribute], cb(iteratee, this), defaultVal, context);
      };
      default: return function() {
        var args = slice.call(arguments);
        args.unshift(this[attribute]);
        return base[method].apply(base, args);
      };
    }
  };

  var addUnderscoreMethods = function(Class, base, methods, attribute) {
    _.each(methods, function(length, method) {
      if (base[method]) Class.prototype[method] = addMethod(base, length, method, attribute);
    });
  };

  // Support `collection.sortBy('attr')` and `collection.findWhere({id: 1})`.
  var cb = function(iteratee, instance) {
    if (_.isFunction(iteratee)) return iteratee;
    if (_.isObject(iteratee) && !instance._isModel(iteratee)) return modelMatcher(iteratee);
    if (_.isString(iteratee)) return function(model) { return model.get(iteratee); };
    return iteratee;
  };
  var modelMatcher = function(attrs) {
    var matcher = _.matches(attrs);
    return function(model) {
      return matcher(model.attributes);
    };
  };

  // Underscore methods that we want to implement on the Collection.
  // 90% of the core usefulness of Backbone Collections is actually implemented
  // right here:
  var collectionMethods = {forEach: 3, each: 3, map: 3, collect: 3, reduce: 0,
    foldl: 0, inject: 0, reduceRight: 0, foldr: 0, find: 3, detect: 3, filter: 3,
    select: 3, reject: 3, every: 3, all: 3, some: 3, any: 3, include: 3, includes: 3,
    contains: 3, invoke: 0, max: 3, min: 3, toArray: 1, size: 1, first: 3,
    head: 3, take: 3, initial: 3, rest: 3, tail: 3, drop: 3, last: 3,
    without: 0, difference: 0, indexOf: 3, shuffle: 1, lastIndexOf: 3,
    isEmpty: 1, chain: 1, sample: 3, partition: 3, groupBy: 3, countBy: 3,
    sortBy: 3, indexBy: 3, findIndex: 3, findLastIndex: 3};


  // Underscore methods that we want to implement on the Model, mapped to the
  // number of arguments they take.
  var modelMethods = {keys: 1, values: 1, pairs: 1, invert: 1, pick: 0,
    omit: 0, chain: 1, isEmpty: 1};

  // Mix in each Underscore method as a proxy to `Collection#models`.

  _.each([
    [Collection, collectionMethods, 'models'],
    [Model, modelMethods, 'attributes']
  ], function(config) {
    var Base = config[0],
        methods = config[1],
        attribute = config[2];

    Base.mixin = function(obj) {
      var mappings = _.reduce(_.functions(obj), function(memo, name) {
        memo[name] = 0;
        return memo;
      }, {});
      addUnderscoreMethods(Base, obj, mappings, attribute);
    };

    addUnderscoreMethods(Base, _, methods, attribute);
  });

  // Backbone.sync
  // -------------

  // Override this function to change the manner in which Backbone persists
  // models to the server. You will be passed the type of request, and the
  // model in question. By default, makes a RESTful Ajax request
  // to the model's `url()`. Some possible customizations could be:
  //
  // * Use `setTimeout` to batch rapid-fire updates into a single request.
  // * Send up the models as XML instead of JSON.
  // * Persist models via WebSockets instead of Ajax.
  //
  // Turn on `Backbone.emulateHTTP` in order to send `PUT` and `DELETE` requests
  // as `POST`, with a `_method` parameter containing the true HTTP method,
  // as well as all requests with the body as `application/x-www-form-urlencoded`
  // instead of `application/json` with the model in a param named `model`.
  // Useful when interfacing with server-side languages like **PHP** that make
  // it difficult to read the body of `PUT` requests.
  Backbone.sync = function(method, model, options) {
    var type = methodMap[method];

    // Default options, unless specified.
    _.defaults(options || (options = {}), {
      emulateHTTP: Backbone.emulateHTTP,
      emulateJSON: Backbone.emulateJSON
    });

    // Default JSON-request options.
    var params = {type: type, dataType: 'json'};

    // Ensure that we have a URL.
    if (!options.url) {
      params.url = _.result(model, 'url') || urlError();
    }

    // Ensure that we have the appropriate request data.
    if (options.data == null && model && (method === 'create' || method === 'update' || method === 'patch')) {
      params.contentType = 'application/json';
      params.data = JSON.stringify(options.attrs || model.toJSON(options));
    }

    // For older servers, emulate JSON by encoding the request into an HTML-form.
    if (options.emulateJSON) {
      params.contentType = 'application/x-www-form-urlencoded';
      params.data = params.data ? {model: params.data} : {};
    }

    // For older servers, emulate HTTP by mimicking the HTTP method with `_method`
    // And an `X-HTTP-Method-Override` header.
    if (options.emulateHTTP && (type === 'PUT' || type === 'DELETE' || type === 'PATCH')) {
      params.type = 'POST';
      if (options.emulateJSON) params.data._method = type;
      var beforeSend = options.beforeSend;
      options.beforeSend = function(xhr) {
        xhr.setRequestHeader('X-HTTP-Method-Override', type);
        if (beforeSend) return beforeSend.apply(this, arguments);
      };
    }

    // Don't process data on a non-GET request.
    if (params.type !== 'GET' && !options.emulateJSON) {
      params.processData = false;
    }

    // Pass along `textStatus` and `errorThrown` from jQuery.
    var error = options.error;
    options.error = function(xhr, textStatus, errorThrown) {
      options.textStatus = textStatus;
      options.errorThrown = errorThrown;
      if (error) error.call(options.context, xhr, textStatus, errorThrown);
    };

    // Make the request, allowing the user to override any Ajax options.
    var xhr = options.xhr = Backbone.ajax(_.extend(params, options));
    model.trigger('request', model, xhr, options);
    return xhr;
  };

  // Map from CRUD to HTTP for our default `Backbone.sync` implementation.
  var methodMap = {
    'create': 'POST',
    'update': 'PUT',
    'patch': 'PATCH',
    'delete': 'DELETE',
    'read': 'GET'
  };

  // Set the default implementation of `Backbone.ajax` to proxy through to `$`.
  // Override this if you'd like to use a different library.
  Backbone.ajax = function() {
    return Backbone.$.ajax.apply(Backbone.$, arguments);
  };

  // Backbone.Router
  // ---------------

  // Routers map faux-URLs to actions, and fire events when routes are
  // matched. Creating a new one sets its `routes` hash, if not set statically.
  var Router = Backbone.Router = function(options) {
    options || (options = {});
    this.preinitialize.apply(this, arguments);
    if (options.routes) this.routes = options.routes;
    this._bindRoutes();
    this.initialize.apply(this, arguments);
  };

  // Cached regular expressions for matching named param parts and splatted
  // parts of route strings.
  var optionalParam = /\((.*?)\)/g;
  var namedParam    = /(\(\?)?:\w+/g;
  var splatParam    = /\*\w+/g;
  var escapeRegExp  = /[\-{}\[\]+?.,\\\^$|#\s]/g;

  // Set up all inheritable **Backbone.Router** properties and methods.
  _.extend(Router.prototype, Events, {

    // preinitialize is an empty function by default. You can override it with a function
    // or object.  preinitialize will run before any instantiation logic is run in the Router.
    preinitialize: function(){},

    // Initialize is an empty function by default. Override it with your own
    // initialization logic.
    initialize: function(){},

    // Manually bind a single named route to a callback. For example:
    //
    //     this.route('search/:query/p:num', 'search', function(query, num) {
    //       ...
    //     });
    //
    route: function(route, name, callback) {
      if (!_.isRegExp(route)) route = this._routeToRegExp(route);
      if (_.isFunction(name)) {
        callback = name;
        name = '';
      }
      if (!callback) callback = this[name];
      var router = this;
      Backbone.history.route(route, function(fragment) {
        var args = router._extractParameters(route, fragment);
        if (router.execute(callback, args, name) !== false) {
          router.trigger.apply(router, ['route:' + name].concat(args));
          router.trigger('route', name, args);
          Backbone.history.trigger('route', router, name, args);
        }
      });
      return this;
    },

    // Execute a route handler with the provided parameters.  This is an
    // excellent place to do pre-route setup or post-route cleanup.
    execute: function(callback, args, name) {
      if (callback) callback.apply(this, args);
    },

    // Simple proxy to `Backbone.history` to save a fragment into the history.
    navigate: function(fragment, options) {
      Backbone.history.navigate(fragment, options);
      return this;
    },

    // Bind all defined routes to `Backbone.history`. We have to reverse the
    // order of the routes here to support behavior where the most general
    // routes can be defined at the bottom of the route map.
    _bindRoutes: function() {
      if (!this.routes) return;
      this.routes = _.result(this, 'routes');
      var route, routes = _.keys(this.routes);
      while ((route = routes.pop()) != null) {
        this.route(route, this.routes[route]);
      }
    },

    // Convert a route string into a regular expression, suitable for matching
    // against the current location hash.
    _routeToRegExp: function(route) {
      route = route.replace(escapeRegExp, '\\$&')
      .replace(optionalParam, '(?:$1)?')
      .replace(namedParam, function(match, optional) {
        return optional ? match : '([^/?]+)';
      })
      .replace(splatParam, '([^?]*?)');
      return new RegExp('^' + route + '(?:\\?([\\s\\S]*))?$');
    },

    // Given a route, and a URL fragment that it matches, return the array of
    // extracted decoded parameters. Empty or unmatched parameters will be
    // treated as `null` to normalize cross-browser behavior.
    _extractParameters: function(route, fragment) {
      var params = route.exec(fragment).slice(1);
      return _.map(params, function(param, i) {
        // Don't decode the search params.
        if (i === params.length - 1) return param || null;
        return param ? decodeURIComponent(param) : null;
      });
    }

  });

  // Backbone.History
  // ----------------

  // Handles cross-browser history management, based on either
  // [pushState](http://diveintohtml5.info/history.html) and real URLs, or
  // [onhashchange](https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange)
  // and URL fragments. If the browser supports neither (old IE, natch),
  // falls back to polling.
  var History = Backbone.History = function() {
    this.handlers = [];
    this.checkUrl = this.checkUrl.bind(this);

    // Ensure that `History` can be used outside of the browser.
    if (typeof window !== 'undefined') {
      this.location = window.location;
      this.history = window.history;
    }
  };

  // Cached regex for stripping a leading hash/slash and trailing space.
  var routeStripper = /^[#\/]|\s+$/g;

  // Cached regex for stripping leading and trailing slashes.
  var rootStripper = /^\/+|\/+$/g;

  // Cached regex for stripping urls of hash.
  var pathStripper = /#.*$/;

  // Has the history handling already been started?
  History.started = false;

  // Set up all inheritable **Backbone.History** properties and methods.
  _.extend(History.prototype, Events, {

    // The default interval to poll for hash changes, if necessary, is
    // twenty times a second.
    interval: 50,

    // Are we at the app root?
    atRoot: function() {
      var path = this.location.pathname.replace(/[^\/]$/, '$&/');
      return path === this.root && !this.getSearch();
    },

    // Does the pathname match the root?
    matchRoot: function() {
      var path = this.decodeFragment(this.location.pathname);
      var rootPath = path.slice(0, this.root.length - 1) + '/';
      return rootPath === this.root;
    },

    // Unicode characters in `location.pathname` are percent encoded so they're
    // decoded for comparison. `%25` should not be decoded since it may be part
    // of an encoded parameter.
    decodeFragment: function(fragment) {
      return decodeURI(fragment.replace(/%25/g, '%2525'));
    },

    // In IE6, the hash fragment and search params are incorrect if the
    // fragment contains `?`.
    getSearch: function() {
      var match = this.location.href.replace(/#.*/, '').match(/\?.+/);
      return match ? match[0] : '';
    },

    // Gets the true hash value. Cannot use location.hash directly due to bug
    // in Firefox where location.hash will always be decoded.
    getHash: function(window) {
      var match = (window || this).location.href.match(/#(.*)$/);
      return match ? match[1] : '';
    },

    // Get the pathname and search params, without the root.
    getPath: function() {
      var path = this.decodeFragment(
        this.location.pathname + this.getSearch()
      ).slice(this.root.length - 1);
      return path.charAt(0) === '/' ? path.slice(1) : path;
    },

    // Get the cross-browser normalized URL fragment from the path or hash.
    getFragment: function(fragment) {
      if (fragment == null) {
        if (this._usePushState || !this._wantsHashChange) {
          fragment = this.getPath();
        } else {
          fragment = this.getHash();
        }
      }
      return fragment.replace(routeStripper, '');
    },

    // Start the hash change handling, returning `true` if the current URL matches
    // an existing route, and `false` otherwise.
    start: function(options) {
      if (History.started) throw new Error('Backbone.history has already been started');
      History.started = true;

      // Figure out the initial configuration. Do we need an iframe?
      // Is pushState desired ... is it available?
      this.options          = _.extend({root: '/'}, this.options, options);
      this.root             = this.options.root;
      this._trailingSlash   = this.options.trailingSlash;
      this._wantsHashChange = this.options.hashChange !== false;
      this._hasHashChange   = 'onhashchange' in window && (document.documentMode === void 0 || document.documentMode > 7);
      this._useHashChange   = this._wantsHashChange && this._hasHashChange;
      this._wantsPushState  = !!this.options.pushState;
      this._hasPushState    = !!(this.history && this.history.pushState);
      this._usePushState    = this._wantsPushState && this._hasPushState;
      this.fragment         = this.getFragment();

      // Normalize root to always include a leading and trailing slash.
      this.root = ('/' + this.root + '/').replace(rootStripper, '/');

      // Transition from hashChange to pushState or vice versa if both are
      // requested.
      if (this._wantsHashChange && this._wantsPushState) {

        // If we've started off with a route from a `pushState`-enabled
        // browser, but we're currently in a browser that doesn't support it...
        if (!this._hasPushState && !this.atRoot()) {
          var rootPath = this.root.slice(0, -1) || '/';
          this.location.replace(rootPath + '#' + this.getPath());
          // Return immediately as browser will do redirect to new url
          return true;

        // Or if we've started out with a hash-based route, but we're currently
        // in a browser where it could be `pushState`-based instead...
        } else if (this._hasPushState && this.atRoot()) {
          this.navigate(this.getHash(), {replace: true});
        }

      }

      // Proxy an iframe to handle location events if the browser doesn't
      // support the `hashchange` event, HTML5 history, or the user wants
      // `hashChange` but not `pushState`.
      if (!this._hasHashChange && this._wantsHashChange && !this._usePushState) {
        this.iframe = document.createElement('iframe');
        this.iframe.src = 'javascript:0';
        this.iframe.style.display = 'none';
        this.iframe.tabIndex = -1;
        var body = document.body;
        // Using `appendChild` will throw on IE < 9 if the document is not ready.
        var iWindow = body.insertBefore(this.iframe, body.firstChild).contentWindow;
        iWindow.document.open();
        iWindow.document.close();
        iWindow.location.hash = '#' + this.fragment;
      }

      // Add a cross-platform `addEventListener` shim for older browsers.
      var addEventListener = window.addEventListener || function(eventName, listener) {
        return attachEvent('on' + eventName, listener);
      };

      // Depending on whether we're using pushState or hashes, and whether
      // 'onhashchange' is supported, determine how we check the URL state.
      if (this._usePushState) {
        addEventListener('popstate', this.checkUrl, false);
      } else if (this._useHashChange && !this.iframe) {
        addEventListener('hashchange', this.checkUrl, false);
      } else if (this._wantsHashChange) {
        this._checkUrlInterval = setInterval(this.checkUrl, this.interval);
      }

      if (!this.options.silent) return this.loadUrl();
    },

    // Disable Backbone.history, perhaps temporarily. Not useful in a real app,
    // but possibly useful for unit testing Routers.
    stop: function() {
      // Add a cross-platform `removeEventListener` shim for older browsers.
      var removeEventListener = window.removeEventListener || function(eventName, listener) {
        return detachEvent('on' + eventName, listener);
      };

      // Remove window listeners.
      if (this._usePushState) {
        removeEventListener('popstate', this.checkUrl, false);
      } else if (this._useHashChange && !this.iframe) {
        removeEventListener('hashchange', this.checkUrl, false);
      }

      // Clean up the iframe if necessary.
      if (this.iframe) {
        document.body.removeChild(this.iframe);
        this.iframe = null;
      }

      // Some environments will throw when clearing an undefined interval.
      if (this._checkUrlInterval) clearInterval(this._checkUrlInterval);
      History.started = false;
    },

    // Add a route to be tested when the fragment changes. Routes added later
    // may override previous routes.
    route: function(route, callback) {
      this.handlers.unshift({route: route, callback: callback});
    },

    // Checks the current URL to see if it has changed, and if it has,
    // calls `loadUrl`, normalizing across the hidden iframe.
    checkUrl: function(e) {
      var current = this.getFragment();

      // If the user pressed the back button, the iframe's hash will have
      // changed and we should use that for comparison.
      if (current === this.fragment && this.iframe) {
        current = this.getHash(this.iframe.contentWindow);
      }

      if (current === this.fragment) {
        if (!this.matchRoot()) return this.notfound();
        return false;
      }
      if (this.iframe) this.navigate(current);
      this.loadUrl();
    },

    // Attempt to load the current URL fragment. If a route succeeds with a
    // match, returns `true`. If no defined routes matches the fragment,
    // returns `false`.
    loadUrl: function(fragment) {
      // If the root doesn't match, no routes can match either.
      if (!this.matchRoot()) return this.notfound();
      fragment = this.fragment = this.getFragment(fragment);
      return _.some(this.handlers, function(handler) {
        if (handler.route.test(fragment)) {
          handler.callback(fragment);
          return true;
        }
      }) || this.notfound();
    },

    // When no route could be matched, this method is called internally to
    // trigger the `'notfound'` event. It returns `false` so that it can be used
    // in tail position.
    notfound: function() {
      this.trigger('notfound');
      return false;
    },

    // Save a fragment into the hash history, or replace the URL state if the
    // 'replace' option is passed. You are responsible for properly URL-encoding
    // the fragment in advance.
    //
    // The options object can contain `trigger: true` if you wish to have the
    // route callback be fired (not usually desirable), or `replace: true`, if
    // you wish to modify the current URL without adding an entry to the history.
    navigate: function(fragment, options) {
      if (!History.started) return false;
      if (!options || options === true) options = {trigger: !!options};

      // Normalize the fragment.
      fragment = this.getFragment(fragment || '');

      // Strip trailing slash on the root unless _trailingSlash is true
      var rootPath = this.root;
      if (!this._trailingSlash && (fragment === '' || fragment.charAt(0) === '?')) {
        rootPath = rootPath.slice(0, -1) || '/';
      }
      var url = rootPath + fragment;

      // Strip the fragment of the query and hash for matching.
      fragment = fragment.replace(pathStripper, '');

      // Decode for matching.
      var decodedFragment = this.decodeFragment(fragment);

      if (this.fragment === decodedFragment) return;
      this.fragment = decodedFragment;

      // If pushState is available, we use it to set the fragment as a real URL.
      if (this._usePushState) {
        this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url);

      // If hash changes haven't been explicitly disabled, update the hash
      // fragment to store history.
      } else if (this._wantsHashChange) {
        this._updateHash(this.location, fragment, options.replace);
        if (this.iframe && fragment !== this.getHash(this.iframe.contentWindow)) {
          var iWindow = this.iframe.contentWindow;

          // Opening and closing the iframe tricks IE7 and earlier to push a
          // history entry on hash-tag change.  When replace is true, we don't
          // want this.
          if (!options.replace) {
            iWindow.document.open();
            iWindow.document.close();
          }

          this._updateHash(iWindow.location, fragment, options.replace);
        }

      // If you've told us that you explicitly don't want fallback hashchange-
      // based history, then `navigate` becomes a page refresh.
      } else {
        return this.location.assign(url);
      }
      if (options.trigger) return this.loadUrl(fragment);
    },

    // Update the hash location, either replacing the current entry, or adding
    // a new one to the browser history.
    _updateHash: function(location, fragment, replace) {
      if (replace) {
        var href = location.href.replace(/(javascript:|#).*$/, '');
        location.replace(href + '#' + fragment);
      } else {
        // Some browsers require that `hash` contains a leading #.
        location.hash = '#' + fragment;
      }
    }

  });

  // Create the default Backbone.history.
  Backbone.history = new History;

  // Helpers
  // -------

  // Helper function to correctly set up the prototype chain for subclasses.
  // Similar to `goog.inherits`, but uses a hash of prototype properties and
  // class properties to be extended.
  var extend = function(protoProps, staticProps) {
    var parent = this;
    var child;

    // The constructor function for the new subclass is either defined by you
    // (the "constructor" property in your `extend` definition), or defaulted
    // by us to simply call the parent constructor.
    if (protoProps && _.has(protoProps, 'constructor')) {
      child = protoProps.constructor;
    } else {
      child = function(){ return parent.apply(this, arguments); };
    }

    // Add static properties to the constructor function, if supplied.
    _.extend(child, parent, staticProps);

    // Set the prototype chain to inherit from `parent`, without calling
    // `parent`'s constructor function and add the prototype properties.
    child.prototype = _.create(parent.prototype, protoProps);
    child.prototype.constructor = child;

    // Set a convenience property in case the parent's prototype is needed
    // later.
    child.__super__ = parent.prototype;

    return child;
  };

  // Set up inheritance for the model, collection, router, view and history.
  Model.extend = Collection.extend = Router.extend = View.extend = History.extend = extend;

  // Throw an error when a URL is needed, and none is supplied.
  var urlError = function() {
    throw new Error('A "url" property or function must be specified');
  };

  // Wrap an optional error callback with a fallback error event.
  var wrapError = function(model, options) {
    var error = options.error;
    options.error = function(resp) {
      if (error) error.call(options.context, model, resp, options);
      model.trigger('error', model, resp, options);
    };
  };

  // Provide useful information when things go wrong. This method is not meant
  // to be used directly; it merely provides the necessary introspection for the
  // external `debugInfo` function.
  Backbone._debug = function() {
    return {root: root, _: _};
  };

  return Backbone;
});
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            backbone.min.js                                                                                     0000644                 00000057372 15212563752 0007456 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(n){var s="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global;if("function"==typeof define&&define.amd)define(["underscore","jquery","exports"],function(t,e,i){s.Backbone=n(s,i,t,e)});else if("undefined"!=typeof exports){var t,e=require("underscore");try{t=require("jquery")}catch(t){}n(s,exports,e,t)}else s.Backbone=n(s,{},s._,s.jQuery||s.Zepto||s.ender||s.$)}(function(t,h,b,e){function a(t,e,i,n,s){var r,o=0;if(i&&"object"==typeof i){void 0!==n&&"context"in s&&void 0===s.context&&(s.context=n);for(r=b.keys(i);o<r.length;o++)e=a(t,e,r[o],i[r[o]],s)}else if(i&&l.test(i))for(r=i.split(l);o<r.length;o++)e=t(e,r[o],n,s);else e=t(e,i,n,s);return e}function x(t,e,i){i=Math.min(Math.max(i,0),t.length);for(var n=Array(t.length-i),s=e.length,r=0;r<n.length;r++)n[r]=t[r+i];for(r=0;r<s;r++)t[r+i]=e[r];for(r=0;r<n.length;r++)t[r+s+i]=n[r]}function s(i,n,t,s){b.each(t,function(t,e){n[e]&&(i.prototype[e]=function(n,t,s,r){switch(t){case 1:return function(){return n[s](this[r])};case 2:return function(t){return n[s](this[r],t)};case 3:return function(t,e){return n[s](this[r],T(t,this),e)};case 4:return function(t,e,i){return n[s](this[r],T(t,this),e,i)};default:return function(){var t=u.call(arguments);return t.unshift(this[r]),n[s].apply(n,t)}}}(n,t,e,s))})}var o,i=t.Backbone,u=Array.prototype.slice,e=(h.VERSION="1.6.1",h.$=e,h.noConflict=function(){return t.Backbone=i,this},h.emulateHTTP=!1,h.emulateJSON=!1,h.Events={}),l=/\s+/,n=(e.on=function(t,e,i){return this._events=a(n,this._events||{},t,e,{context:i,ctx:this,listening:o}),o&&(((this._listeners||(this._listeners={}))[o.id]=o).interop=!1),this},e.listenTo=function(t,e,i){if(t){var n=t._listenId||(t._listenId=b.uniqueId("l")),s=this._listeningTo||(this._listeningTo={}),r=o=s[n],s=(r||(this._listenId||(this._listenId=b.uniqueId("l")),r=o=s[n]=new g(this,t)),c(t,e,i,this));if(o=void 0,s)throw s;r.interop&&r.on(e,i)}return this},function(t,e,i,n){var s,r;return i&&(e=t[e]||(t[e]=[]),s=n.context,r=n.ctx,(n=n.listening)&&n.count++,e.push({callback:i,context:s,ctx:s||r,listening:n})),t}),c=function(t,e,i,n){try{t.on(e,i,n)}catch(t){return t}},r=(e.off=function(t,e,i){return this._events&&(this._events=a(r,this._events,t,e,{context:i,listeners:this._listeners})),this},e.stopListening=function(t,e,i){var n=this._listeningTo;if(n){for(var s=t?[t._listenId]:b.keys(n),r=0;r<s.length;r++){var o=n[s[r]];if(!o)break;o.obj.off(e,i,this),o.interop&&o.off(e,i)}b.isEmpty(n)&&(this._listeningTo=void 0)}return this},function(t,e,i,n){if(t){var s,r=n.context,o=n.listeners,h=0;if(e||r||i){for(s=e?[e]:b.keys(t);h<s.length;h++){var a=t[e=s[h]];if(!a)break;for(var u=[],l=0;l<a.length;l++){var c=a[l];i&&i!==c.callback&&i!==c.callback._callback||r&&r!==c.context?u.push(c):(c=c.listening)&&c.off(e,i)}u.length?t[e]=u:delete t[e]}return t}for(s=b.keys(o);h<s.length;h++)o[s[h]].cleanup()}}),d=(e.once=function(t,e,i){var n=a(d,{},t,e,this.off.bind(this));return this.on(n,e="string"==typeof t&&null==i?void 0:e,i)},e.listenToOnce=function(t,e,i){e=a(d,{},e,i,this.stopListening.bind(this,t));return this.listenTo(t,e)},function(t,e,i,n){var s;return i&&((s=t[e]=b.once(function(){n(e,s),i.apply(this,arguments)}))._callback=i),t}),f=(e.trigger=function(t){if(this._events){for(var e=Math.max(0,arguments.length-1),i=Array(e),n=0;n<e;n++)i[n]=arguments[n+1];a(f,this._events,t,void 0,i)}return this},function(t,e,i,n){var s,r;return t&&(s=t[e],r=t.all,s&&(r=r&&r.slice()),s&&p(s,n),r)&&p(r,[e].concat(n)),t}),p=function(t,e){var i,n=-1,s=t.length,r=e[0],o=e[1],h=e[2];switch(e.length){case 0:for(;++n<s;)(i=t[n]).callback.call(i.ctx);return;case 1:for(;++n<s;)(i=t[n]).callback.call(i.ctx,r);return;case 2:for(;++n<s;)(i=t[n]).callback.call(i.ctx,r,o);return;case 3:for(;++n<s;)(i=t[n]).callback.call(i.ctx,r,o,h);return;default:for(;++n<s;)(i=t[n]).callback.apply(i.ctx,e);return}},g=function(t,e){this.id=t._listenId,this.listener=t,this.obj=e,this.interop=!0,this.count=0,this._events=void 0},v=(g.prototype.on=e.on,g.prototype.off=function(t,e){t=this.interop?(this._events=a(r,this._events,t,e,{context:void 0,listeners:void 0}),!this._events):(this.count--,0===this.count);t&&this.cleanup()},g.prototype.cleanup=function(){delete this.listener._listeningTo[this.obj._listenId],this.interop||delete this.obj._listeners[this.id]},e.bind=e.on,e.unbind=e.off,b.extend(h,e),h.Model=function(t,e){var i=t||{},n=(e=e||{},this.preinitialize.apply(this,arguments),this.cid=b.uniqueId(this.cidPrefix),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(i=this.parse(i,e)||{}),b.result(this,"defaults")),i=b.defaults(b.extend({},n,i),n);this.set(i,e),this.changed={},this.initialize.apply(this,arguments)}),m=(b.extend(v.prototype,e,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",preinitialize:function(){},initialize:function(){},toJSON:function(t){return b.clone(this.attributes)},sync:function(){return h.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return b.escape(this.get(t))},has:function(t){return null!=this.get(t)},matches:function(t){return!!b.iteratee(t,this)(this.attributes)},set:function(t,e,i){if(null!=t){var n;if("object"==typeof t?(n=t,i=e):(n={})[t]=e,!this._validate(n,i=i||{}))return!1;var s,r,o=i.unset,t=i.silent,h=[],a=this._changing,u=(this._changing=!0,a||(this._previousAttributes=b.clone(this.attributes),this.changed={}),this.attributes),l=this.changed,c=this._previousAttributes;for(s in n)e=n[s],b.isEqual(u[s],e)||h.push(s),b.isEqual(c[s],e)?delete l[s]:l[s]=e,o?delete u[s]:u[s]=e;if(this.idAttribute in n&&(r=this.id,this.id=this.get(this.idAttribute),this.id!==r)&&this.trigger("changeId",this,r,i),!t){h.length&&(this._pending=i);for(var d=0;d<h.length;d++)this.trigger("change:"+h[d],this,u[h[d]],i)}if(!a){if(!t)for(;this._pending;)i=this._pending,this._pending=!1,this.trigger("change",this,i);this._pending=!1,this._changing=!1}}return this},unset:function(t,e){return this.set(t,void 0,b.extend({},e,{unset:!0}))},clear:function(t){var e,i={};for(e in this.attributes)i[e]=void 0;return this.set(i,b.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!b.isEmpty(this.changed):b.has(this.changed,t)},changedAttributes:function(t){if(!t)return!!this.hasChanged()&&b.clone(this.changed);var e,i,n=this._changing?this._previousAttributes:this.attributes,s={};for(i in t){var r=t[i];b.isEqual(n[i],r)||(s[i]=r,e=!0)}return!!e&&s},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return b.clone(this._previousAttributes)},fetch:function(i){i=b.extend({parse:!0},i);var n=this,s=i.success;return i.success=function(t){var e=i.parse?n.parse(t,i):t;if(!n.set(e,i))return!1;s&&s.call(i.context,n,t,i),n.trigger("sync",n,t,i)},N(this,i),this.sync("read",this,i)},save:function(t,e,i){null==t||"object"==typeof t?(n=t,i=e):(n={})[t]=e;var n,s=(i=b.extend({validate:!0,parse:!0},i)).wait;if(n&&!s){if(!this.set(n,i))return!1}else if(!this._validate(n,i))return!1;var r=this,o=i.success,h=this.attributes,t=(i.success=function(t){r.attributes=h;var e=i.parse?r.parse(t,i):t;if((e=s?b.extend({},n,e):e)&&!r.set(e,i))return!1;o&&o.call(i.context,r,t,i),r.trigger("sync",r,t,i)},N(this,i),n&&s&&(this.attributes=b.extend({},h,n)),this.isNew()?"create":i.patch?"patch":"update"),e=("patch"!=t||i.attrs||(i.attrs=n),this.sync(t,this,i));return this.attributes=h,e},destroy:function(e){e=e?b.clone(e):{};function i(){n.stopListening(),n.trigger("destroy",n,n.collection,e)}var n=this,s=e.success,r=e.wait,t=!(e.success=function(t){r&&i(),s&&s.call(e.context,n,t,e),n.isNew()||n.trigger("sync",n,t,e)});return this.isNew()?b.defer(e.success):(N(this,e),t=this.sync("delete",this,e)),r||i(),t},url:function(){var t,e=b.result(this,"urlRoot")||b.result(this.collection,"url")||M();return this.isNew()?e:(t=this.get(this.idAttribute),e.replace(/[^\/]$/,"$&/")+encodeURIComponent(t))},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},b.extend({},t,{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=b.extend({},this.attributes,t);t=this.validationError=this.validate(t,e)||null;return!t||(this.trigger("invalid",this,t,b.extend(e,{validationError:t})),!1)}}),h.Collection=function(t,e){e=e||{},this.preinitialize.apply(this,arguments),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,b.extend({silent:!0},e))}),w={add:!0,remove:!0,merge:!0},_={add:!0,remove:!1},y=(b.extend(m.prototype,e,{model:v,preinitialize:function(){},initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return h.sync.apply(this,arguments)},add:function(t,e){return this.set(t,b.extend({merge:!1},e,_))},remove:function(t,e){e=b.extend({},e);var i=!b.isArray(t),t=(t=i?[t]:t.slice(),this._removeModels(t,e));return!e.silent&&t.length&&(e.changes={added:[],merged:[],removed:t},this.trigger("update",this,e)),i?t[0]:t},set:function(t,e){if(null!=t){(e=b.extend({},w,e)).parse&&!this._isModel(t)&&(t=this.parse(t,e)||[]);for(var i=!b.isArray(t),n=(t=i?[t]:t.slice(),e.at),s=((n=(n=null!=n?+n:n)>this.length?this.length:n)<0&&(n+=this.length+1),[]),r=[],o=[],h=[],a={},u=e.add,l=e.merge,c=e.remove,d=!1,f=this.comparator&&null==n&&!1!==e.sort,p=b.isString(this.comparator)?this.comparator:null,g=0;g<t.length;g++){var v,m=t[g],_=this.get(m);_?(l&&m!==_&&(v=this._isModel(m)?m.attributes:m,e.parse&&(v=_.parse(v,e)),_.set(v,e),o.push(_),f)&&!d&&(d=_.hasChanged(p)),a[_.cid]||(a[_.cid]=!0,s.push(_)),t[g]=_):u&&(m=t[g]=this._prepareModel(m,e))&&(r.push(m),this._addReference(m,e),a[m.cid]=!0,s.push(m))}if(c){for(g=0;g<this.length;g++)a[(m=this.models[g]).cid]||h.push(m);h.length&&this._removeModels(h,e)}var y=!1;if(s.length&&(!f&&u&&c)?(y=this.length!==s.length||b.some(this.models,function(t,e){return t!==s[e]}),this.models.length=0,x(this.models,s,0),this.length=this.models.length):r.length&&(f&&(d=!0),x(this.models,r,null==n?this.length:n),this.length=this.models.length),d&&this.sort({silent:!0}),!e.silent){for(g=0;g<r.length;g++)null!=n&&(e.index=n+g),(m=r[g]).trigger("add",m,this,e);(d||y)&&this.trigger("sort",this,e),(r.length||h.length||o.length)&&(e.changes={added:r,removed:h,merged:o},this.trigger("update",this,e))}return i?t[0]:t}},reset:function(t,e){e=e?b.clone(e):{};for(var i=0;i<this.models.length;i++)this._removeReference(this.models[i],e);return e.previousModels=this.models,this._reset(),t=this.add(t,b.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,b.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,b.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return u.apply(this.models,arguments)},get:function(t){if(null!=t)return this._byId[t]||this._byId[this.modelId(this._isModel(t)?t.attributes:t,t.idAttribute)]||t.cid&&this._byId[t.cid]},has:function(t){return null!=this.get(t)},at:function(t){return t<0&&(t+=this.length),this.models[t]},where:function(t,e){return this[e?"find":"filter"](t)},findWhere:function(t){return this.where(t,!0)},sort:function(t){var e=this.comparator;if(!e)throw new Error("Cannot sort a set without a comparator");t=t||{};var i=e.length;return b.isFunction(e)&&(e=e.bind(this)),1===i||b.isString(e)?this.models=this.sortBy(e):this.models.sort(e),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return this.map(t+"")},fetch:function(i){var n=(i=b.extend({parse:!0},i)).success,s=this;return i.success=function(t){var e=i.reset?"reset":"set";s[e](t,i),n&&n.call(i.context,s,t,i),s.trigger("sync",s,t,i)},N(this,i),this.sync("read",this,i)},create:function(t,e){var n=(e=e?b.clone(e):{}).wait;if(!(t=this._prepareModel(t,e)))return!1;n||this.add(t,e);var s=this,r=e.success;return e.success=function(t,e,i){n&&(t.off("error",s._forwardPristineError,s),s.add(t,i)),r&&r.call(i.context,t,e,i)},n&&t.once("error",this._forwardPristineError,this),t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t,e){return t[e||this.model.prototype.idAttribute||"id"]},values:function(){return new E(this,S)},keys:function(){return new E(this,I)},entries:function(){return new E(this,k)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){return this._isModel(t)?(t.collection||(t.collection=this),t):(t=((e=e?b.clone(e):{}).collection=this).model.prototype?new this.model(t,e):this.model(t,e)).validationError?(this.trigger("invalid",this,t.validationError,e),!1):t},_removeModels:function(t,e){for(var i=[],n=0;n<t.length;n++){var s,r,o=this.get(t[n]);o&&(s=this.indexOf(o),this.models.splice(s,1),this.length--,delete this._byId[o.cid],null!=(r=this.modelId(o.attributes,o.idAttribute))&&delete this._byId[r],e.silent||(e.index=s,o.trigger("remove",o,this,e)),i.push(o),this._removeReference(o,e))}return 0<t.length&&!e.silent&&delete e.index,i},_isModel:function(t){return t instanceof v},_addReference:function(t,e){this._byId[t.cid]=t;var i=this.modelId(t.attributes,t.idAttribute);null!=i&&(this._byId[i]=t),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var i=this.modelId(t.attributes,t.idAttribute);null!=i&&delete this._byId[i],this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,n){if(e){if(("add"===t||"remove"===t)&&i!==this)return;var s,r;"destroy"===t&&this.remove(e,n),"changeId"===t&&(s=this.modelId(e.previousAttributes(),e.idAttribute),r=this.modelId(e.attributes,e.idAttribute),null!=s&&delete this._byId[s],null!=r)&&(this._byId[r]=e)}this.trigger.apply(this,arguments)},_forwardPristineError:function(t,e,i){this.has(t)||this._onModelEvent("error",t,e,i)}}),"function"==typeof Symbol&&Symbol.iterator),E=(y&&(m.prototype[y]=m.prototype.values),function(t,e){this._collection=t,this._kind=e,this._index=0}),S=1,I=2,k=3,y=(y&&(E.prototype[y]=function(){return this}),E.prototype.next=function(){if(this._collection){var t,e;if(this._index<this._collection.length)return t=this._collection.at(this._index),this._index++,{value:this._kind===S?t:(e=this._collection.modelId(t.attributes,t.idAttribute),this._kind===I?e:[e,t]),done:!1};this._collection=void 0}return{value:void 0,done:!0}},h.View=function(t){this.cid=b.uniqueId("view"),this.preinitialize.apply(this,arguments),b.extend(this,b.pick(t,P)),this._ensureElement(),this.initialize.apply(this,arguments)}),A=/^(\S+)\s*(.*)$/,P=["model","collection","el","id","attributes","className","tagName","events"],T=(b.extend(y.prototype,e,{tagName:"div",$:function(t){return this.$el.find(t)},preinitialize:function(){},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(t){return this.undelegateEvents(),this._setElement(t),this.delegateEvents(),this},_setElement:function(t){this.$el=t instanceof h.$?t:h.$(t),this.el=this.$el[0]},delegateEvents:function(t){if(t=t||b.result(this,"events"))for(var e in this.undelegateEvents(),t){var i=t[e];(i=b.isFunction(i)?i:this[i])&&(e=e.match(A),this.delegate(e[1],e[2],i.bind(this)))}return this},delegate:function(t,e,i){return this.$el.on(t+".delegateEvents"+this.cid,e,i),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(t,e,i){return this.$el.off(t+".delegateEvents"+this.cid,e,i),this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){var t;this.el?this.setElement(b.result(this,"el")):(t=b.extend({},b.result(this,"attributes")),this.id&&(t.id=b.result(this,"id")),this.className&&(t.class=b.result(this,"className")),this.setElement(this._createElement(b.result(this,"tagName"))),this._setAttributes(t))},_setAttributes:function(t){this.$el.attr(t)}}),function(e,t){return b.isFunction(e)?e:b.isObject(e)&&!t._isModel(e)?H(e):b.isString(e)?function(t){return t.get(e)}:e}),H=function(t){var e=b.matches(t);return function(t){return e(t.attributes)}},$=(b.each([[m,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},"models"],[v,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes"]],function(t){var i=t[0],e=t[1],n=t[2];i.mixin=function(t){var e=b.reduce(b.functions(t),function(t,e){return t[e]=0,t},{});s(i,t,e,n)},s(i,b,e,n)}),h.sync=function(t,e,n){var i,s=$[t],r=(b.defaults(n=n||{},{emulateHTTP:h.emulateHTTP,emulateJSON:h.emulateJSON}),{type:s,dataType:"json"}),o=(n.url||(r.url=b.result(e,"url")||M()),null!=n.data||!e||"create"!==t&&"update"!==t&&"patch"!==t||(r.contentType="application/json",r.data=JSON.stringify(n.attrs||e.toJSON(n))),n.emulateJSON&&(r.contentType="application/x-www-form-urlencoded",r.data=r.data?{model:r.data}:{}),!n.emulateHTTP||"PUT"!==s&&"DELETE"!==s&&"PATCH"!==s||(r.type="POST",n.emulateJSON&&(r.data._method=s),i=n.beforeSend,n.beforeSend=function(t){if(t.setRequestHeader("X-HTTP-Method-Override",s),i)return i.apply(this,arguments)}),"GET"===r.type||n.emulateJSON||(r.processData=!1),n.error),t=(n.error=function(t,e,i){n.textStatus=e,n.errorThrown=i,o&&o.call(n.context,t,e,i)},n.xhr=h.ajax(b.extend(r,n)));return e.trigger("request",e,t,n),t},{create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"}),C=(h.ajax=function(){return h.$.ajax.apply(h.$,arguments)},h.Router=function(t){t=t||{},this.preinitialize.apply(this,arguments),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)}),j=/\((.*?)\)/g,O=/(\(\?)?:\w+/g,U=/\*\w+/g,z=/[\-{}\[\]+?.,\\\^$|#\s]/g,R=(b.extend(C.prototype,e,{preinitialize:function(){},initialize:function(){},route:function(e,i,n){b.isRegExp(e)||(e=this._routeToRegExp(e)),b.isFunction(i)&&(n=i,i=""),n=n||this[i];var s=this;return h.history.route(e,function(t){t=s._extractParameters(e,t);!1!==s.execute(n,t,i)&&(s.trigger.apply(s,["route:"+i].concat(t)),s.trigger("route",i,t),h.history.trigger("route",s,i,t))}),this},execute:function(t,e,i){t&&t.apply(this,e)},navigate:function(t,e){return h.history.navigate(t,e),this},_bindRoutes:function(){if(this.routes){this.routes=b.result(this,"routes");for(var t,e=b.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(z,"\\$&").replace(j,"(?:$1)?").replace(O,function(t,e){return e?t:"([^/?]+)"}).replace(U,"([^?]*?)"),new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var i=t.exec(e).slice(1);return b.map(i,function(t,e){return e===i.length-1?t||null:t?decodeURIComponent(t):null})}}),h.History=function(){this.handlers=[],this.checkUrl=this.checkUrl.bind(this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)}),q=/^[#\/]|\s+$/g,F=/^\/+|\/+$/g,B=/#.*$/,M=(R.started=!1,b.extend(R.prototype,e,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+"/"===this.root},decodeFragment:function(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){t=(t||this).location.href.match(/#(.*)$/);return t?t[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===t.charAt(0)?t.slice(1):t},getFragment:function(t){return(t=null==t?this._usePushState||!this._wantsHashChange?this.getPath():this.getHash():t).replace(q,"")},start:function(t){if(R.started)throw new Error("Backbone.history has already been started");if(R.started=!0,this.options=b.extend({root:"/"},this.options,t),this.root=this.options.root,this._trailingSlash=this.options.trailingSlash,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||7<document.documentMode),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(F,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot())return t=this.root.slice(0,-1)||"/",this.location.replace(t+"#"+this.getPath()),!0;this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}this._hasHashChange||!this._wantsHashChange||this._usePushState||(this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1,(t=(t=document.body).insertBefore(this.iframe,t.firstChild).contentWindow).document.open(),t.document.close(),t.location.hash="#"+this.fragment);t=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?t("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),R.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if((e=e===this.fragment&&this.iframe?this.getHash(this.iframe.contentWindow):e)===this.fragment)return!this.matchRoot()&&this.notfound();this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(e){return this.matchRoot()&&(e=this.fragment=this.getFragment(e),b.some(this.handlers,function(t){if(t.route.test(e))return t.callback(e),!0}))||this.notfound()},notfound:function(){return this.trigger("notfound"),!1},navigate:function(t,e){if(!R.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var i=this.root,i=(i=this._trailingSlash||""!==t&&"?"!==t.charAt(0)?i:i.slice(0,-1)||"/")+t,n=(t=t.replace(B,""),this.decodeFragment(t));if(this.fragment!==n){if(this.fragment=n,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,i);else{if(!this._wantsHashChange)return this.location.assign(i);this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)&&(n=this.iframe.contentWindow,e.replace||(n.document.open(),n.document.close()),this._updateHash(n.location,t,e.replace))}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,i){i?(i=t.href.replace(/(javascript:|#).*$/,""),t.replace(i+"#"+e)):t.hash="#"+e}}),h.history=new R,v.extend=m.extend=C.extend=y.extend=R.extend=function(t,e){var i=this,n=t&&b.has(t,"constructor")?t.constructor:function(){return i.apply(this,arguments)};return b.extend(n,i,e),n.prototype=b.create(i.prototype,t),(n.prototype.constructor=n).__super__=i.prototype,n},function(){throw new Error('A "url" property or function must be specified')}),N=function(e,i){var n=i.error;i.error=function(t){n&&n.call(i.context,e,t,i),e.trigger("error",e,t,i)}};return h._debug=function(){return{root:t,_:b}},h});                                                                                                                                                                                                                                                                      clipboard.js                                                                                        0000644                 00000064267 15212563752 0007070 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * clipboard.js v2.0.11
 * https://clipboardjs.com/
 *
 * Licensed MIT Â© Zeno Rocha
 */
(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory();
	else if(typeof define === 'function' && define.amd)
		define([], factory);
	else if(typeof exports === 'object')
		exports["ClipboardJS"] = factory();
	else
		root["ClipboardJS"] = factory();
})(this, function() {
return /******/ (function() { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ 686:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "default": function() { return /* binding */ clipboard; }
});

// EXTERNAL MODULE: ./node_modules/tiny-emitter/index.js
var tiny_emitter = __webpack_require__(279);
var tiny_emitter_default = /*#__PURE__*/__webpack_require__.n(tiny_emitter);
// EXTERNAL MODULE: ./node_modules/good-listener/src/listen.js
var listen = __webpack_require__(370);
var listen_default = /*#__PURE__*/__webpack_require__.n(listen);
// EXTERNAL MODULE: ./node_modules/select/src/select.js
var src_select = __webpack_require__(817);
var select_default = /*#__PURE__*/__webpack_require__.n(src_select);
;// CONCATENATED MODULE: ./src/common/command.js
/**
 * Executes a given operation type.
 * @param {String} type
 * @return {Boolean}
 */
function command(type) {
  try {
    return document.execCommand(type);
  } catch (err) {
    return false;
  }
}
;// CONCATENATED MODULE: ./src/actions/cut.js


/**
 * Cut action wrapper.
 * @param {String|HTMLElement} target
 * @return {String}
 */

var ClipboardActionCut = function ClipboardActionCut(target) {
  var selectedText = select_default()(target);
  command('cut');
  return selectedText;
};

/* harmony default export */ var actions_cut = (ClipboardActionCut);
;// CONCATENATED MODULE: ./src/common/create-fake-element.js
/**
 * Creates a fake textarea element with a value.
 * @param {String} value
 * @return {HTMLElement}
 */
function createFakeElement(value) {
  var isRTL = document.documentElement.getAttribute('dir') === 'rtl';
  var fakeElement = document.createElement('textarea'); // Prevent zooming on iOS

  fakeElement.style.fontSize = '12pt'; // Reset box model

  fakeElement.style.border = '0';
  fakeElement.style.padding = '0';
  fakeElement.style.margin = '0'; // Move element out of screen horizontally

  fakeElement.style.position = 'absolute';
  fakeElement.style[isRTL ? 'right' : 'left'] = '-9999px'; // Move element to the same position vertically

  var yPosition = window.pageYOffset || document.documentElement.scrollTop;
  fakeElement.style.top = "".concat(yPosition, "px");
  fakeElement.setAttribute('readonly', '');
  fakeElement.value = value;
  return fakeElement;
}
;// CONCATENATED MODULE: ./src/actions/copy.js



/**
 * Create fake copy action wrapper using a fake element.
 * @param {String} target
 * @param {Object} options
 * @return {String}
 */

var fakeCopyAction = function fakeCopyAction(value, options) {
  var fakeElement = createFakeElement(value);
  options.container.appendChild(fakeElement);
  var selectedText = select_default()(fakeElement);
  command('copy');
  fakeElement.remove();
  return selectedText;
};
/**
 * Copy action wrapper.
 * @param {String|HTMLElement} target
 * @param {Object} options
 * @return {String}
 */


var ClipboardActionCopy = function ClipboardActionCopy(target) {
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
    container: document.body
  };
  var selectedText = '';

  if (typeof target === 'string') {
    selectedText = fakeCopyAction(target, options);
  } else if (target instanceof HTMLInputElement && !['text', 'search', 'url', 'tel', 'password'].includes(target === null || target === void 0 ? void 0 : target.type)) {
    // If input type doesn't support `setSelectionRange`. Simulate it. https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
    selectedText = fakeCopyAction(target.value, options);
  } else {
    selectedText = select_default()(target);
    command('copy');
  }

  return selectedText;
};

/* harmony default export */ var actions_copy = (ClipboardActionCopy);
;// CONCATENATED MODULE: ./src/actions/default.js
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }



/**
 * Inner function which performs selection from either `text` or `target`
 * properties and then executes copy or cut operations.
 * @param {Object} options
 */

var ClipboardActionDefault = function ClipboardActionDefault() {
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  // Defines base properties passed from constructor.
  var _options$action = options.action,
      action = _options$action === void 0 ? 'copy' : _options$action,
      container = options.container,
      target = options.target,
      text = options.text; // Sets the `action` to be performed which can be either 'copy' or 'cut'.

  if (action !== 'copy' && action !== 'cut') {
    throw new Error('Invalid "action" value, use either "copy" or "cut"');
  } // Sets the `target` property using an element that will be have its content copied.


  if (target !== undefined) {
    if (target && _typeof(target) === 'object' && target.nodeType === 1) {
      if (action === 'copy' && target.hasAttribute('disabled')) {
        throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');
      }

      if (action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) {
        throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');
      }
    } else {
      throw new Error('Invalid "target" value, use a valid Element');
    }
  } // Define selection strategy based on `text` property.


  if (text) {
    return actions_copy(text, {
      container: container
    });
  } // Defines which selection strategy based on `target` property.


  if (target) {
    return action === 'cut' ? actions_cut(target) : actions_copy(target, {
      container: container
    });
  }
};

/* harmony default export */ var actions_default = (ClipboardActionDefault);
;// CONCATENATED MODULE: ./src/clipboard.js
function clipboard_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { clipboard_typeof = function _typeof(obj) { return typeof obj; }; } else { clipboard_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return clipboard_typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (clipboard_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }






/**
 * Helper function to retrieve attribute value.
 * @param {String} suffix
 * @param {Element} element
 */

function getAttributeValue(suffix, element) {
  var attribute = "data-clipboard-".concat(suffix);

  if (!element.hasAttribute(attribute)) {
    return;
  }

  return element.getAttribute(attribute);
}
/**
 * Base class which takes one or more elements, adds event listeners to them,
 * and instantiates a new `ClipboardAction` on each click.
 */


var Clipboard = /*#__PURE__*/function (_Emitter) {
  _inherits(Clipboard, _Emitter);

  var _super = _createSuper(Clipboard);

  /**
   * @param {String|HTMLElement|HTMLCollection|NodeList} trigger
   * @param {Object} options
   */
  function Clipboard(trigger, options) {
    var _this;

    _classCallCheck(this, Clipboard);

    _this = _super.call(this);

    _this.resolveOptions(options);

    _this.listenClick(trigger);

    return _this;
  }
  /**
   * Defines if attributes would be resolved using internal setter functions
   * or custom functions that were passed in the constructor.
   * @param {Object} options
   */


  _createClass(Clipboard, [{
    key: "resolveOptions",
    value: function resolveOptions() {
      var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
      this.action = typeof options.action === 'function' ? options.action : this.defaultAction;
      this.target = typeof options.target === 'function' ? options.target : this.defaultTarget;
      this.text = typeof options.text === 'function' ? options.text : this.defaultText;
      this.container = clipboard_typeof(options.container) === 'object' ? options.container : document.body;
    }
    /**
     * Adds a click event listener to the passed trigger.
     * @param {String|HTMLElement|HTMLCollection|NodeList} trigger
     */

  }, {
    key: "listenClick",
    value: function listenClick(trigger) {
      var _this2 = this;

      this.listener = listen_default()(trigger, 'click', function (e) {
        return _this2.onClick(e);
      });
    }
    /**
     * Defines a new `ClipboardAction` on each click event.
     * @param {Event} e
     */

  }, {
    key: "onClick",
    value: function onClick(e) {
      var trigger = e.delegateTarget || e.currentTarget;
      var action = this.action(trigger) || 'copy';
      var text = actions_default({
        action: action,
        container: this.container,
        target: this.target(trigger),
        text: this.text(trigger)
      }); // Fires an event based on the copy operation result.

      this.emit(text ? 'success' : 'error', {
        action: action,
        text: text,
        trigger: trigger,
        clearSelection: function clearSelection() {
          if (trigger) {
            trigger.focus();
          }

          window.getSelection().removeAllRanges();
        }
      });
    }
    /**
     * Default `action` lookup function.
     * @param {Element} trigger
     */

  }, {
    key: "defaultAction",
    value: function defaultAction(trigger) {
      return getAttributeValue('action', trigger);
    }
    /**
     * Default `target` lookup function.
     * @param {Element} trigger
     */

  }, {
    key: "defaultTarget",
    value: function defaultTarget(trigger) {
      var selector = getAttributeValue('target', trigger);

      if (selector) {
        return document.querySelector(selector);
      }
    }
    /**
     * Allow fire programmatically a copy action
     * @param {String|HTMLElement} target
     * @param {Object} options
     * @returns Text copied.
     */

  }, {
    key: "defaultText",

    /**
     * Default `text` lookup function.
     * @param {Element} trigger
     */
    value: function defaultText(trigger) {
      return getAttributeValue('text', trigger);
    }
    /**
     * Destroy lifecycle.
     */

  }, {
    key: "destroy",
    value: function destroy() {
      this.listener.destroy();
    }
  }], [{
    key: "copy",
    value: function copy(target) {
      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
        container: document.body
      };
      return actions_copy(target, options);
    }
    /**
     * Allow fire programmatically a cut action
     * @param {String|HTMLElement} target
     * @returns Text cutted.
     */

  }, {
    key: "cut",
    value: function cut(target) {
      return actions_cut(target);
    }
    /**
     * Returns the support of the given action, or all actions if no action is
     * given.
     * @param {String} [action]
     */

  }, {
    key: "isSupported",
    value: function isSupported() {
      var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut'];
      var actions = typeof action === 'string' ? [action] : action;
      var support = !!document.queryCommandSupported;
      actions.forEach(function (action) {
        support = support && !!document.queryCommandSupported(action);
      });
      return support;
    }
  }]);

  return Clipboard;
}((tiny_emitter_default()));

/* harmony default export */ var clipboard = (Clipboard);

/***/ }),

/***/ 828:
/***/ (function(module) {

var DOCUMENT_NODE_TYPE = 9;

/**
 * A polyfill for Element.matches()
 */
if (typeof Element !== 'undefined' && !Element.prototype.matches) {
    var proto = Element.prototype;

    proto.matches = proto.matchesSelector ||
                    proto.mozMatchesSelector ||
                    proto.msMatchesSelector ||
                    proto.oMatchesSelector ||
                    proto.webkitMatchesSelector;
}

/**
 * Finds the closest parent that matches a selector.
 *
 * @param {Element} element
 * @param {String} selector
 * @return {Function}
 */
function closest (element, selector) {
    while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {
        if (typeof element.matches === 'function' &&
            element.matches(selector)) {
          return element;
        }
        element = element.parentNode;
    }
}

module.exports = closest;


/***/ }),

/***/ 438:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var closest = __webpack_require__(828);

/**
 * Delegates event to a selector.
 *
 * @param {Element} element
 * @param {String} selector
 * @param {String} type
 * @param {Function} callback
 * @param {Boolean} useCapture
 * @return {Object}
 */
function _delegate(element, selector, type, callback, useCapture) {
    var listenerFn = listener.apply(this, arguments);

    element.addEventListener(type, listenerFn, useCapture);

    return {
        destroy: function() {
            element.removeEventListener(type, listenerFn, useCapture);
        }
    }
}

/**
 * Delegates event to a selector.
 *
 * @param {Element|String|Array} [elements]
 * @param {String} selector
 * @param {String} type
 * @param {Function} callback
 * @param {Boolean} useCapture
 * @return {Object}
 */
function delegate(elements, selector, type, callback, useCapture) {
    // Handle the regular Element usage
    if (typeof elements.addEventListener === 'function') {
        return _delegate.apply(null, arguments);
    }

    // Handle Element-less usage, it defaults to global delegation
    if (typeof type === 'function') {
        // Use `document` as the first parameter, then apply arguments
        // This is a short way to .unshift `arguments` without running into deoptimizations
        return _delegate.bind(null, document).apply(null, arguments);
    }

    // Handle Selector-based usage
    if (typeof elements === 'string') {
        elements = document.querySelectorAll(elements);
    }

    // Handle Array-like based usage
    return Array.prototype.map.call(elements, function (element) {
        return _delegate(element, selector, type, callback, useCapture);
    });
}

/**
 * Finds closest match and invokes callback.
 *
 * @param {Element} element
 * @param {String} selector
 * @param {String} type
 * @param {Function} callback
 * @return {Function}
 */
function listener(element, selector, type, callback) {
    return function(e) {
        e.delegateTarget = closest(e.target, selector);

        if (e.delegateTarget) {
            callback.call(element, e);
        }
    }
}

module.exports = delegate;


/***/ }),

/***/ 879:
/***/ (function(__unused_webpack_module, exports) {

/**
 * Check if argument is a HTML element.
 *
 * @param {Object} value
 * @return {Boolean}
 */
exports.node = function(value) {
    return value !== undefined
        && value instanceof HTMLElement
        && value.nodeType === 1;
};

/**
 * Check if argument is a list of HTML elements.
 *
 * @param {Object} value
 * @return {Boolean}
 */
exports.nodeList = function(value) {
    var type = Object.prototype.toString.call(value);

    return value !== undefined
        && (type === '[object NodeList]' || type === '[object HTMLCollection]')
        && ('length' in value)
        && (value.length === 0 || exports.node(value[0]));
};

/**
 * Check if argument is a string.
 *
 * @param {Object} value
 * @return {Boolean}
 */
exports.string = function(value) {
    return typeof value === 'string'
        || value instanceof String;
};

/**
 * Check if argument is a function.
 *
 * @param {Object} value
 * @return {Boolean}
 */
exports.fn = function(value) {
    var type = Object.prototype.toString.call(value);

    return type === '[object Function]';
};


/***/ }),

/***/ 370:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var is = __webpack_require__(879);
var delegate = __webpack_require__(438);

/**
 * Validates all params and calls the right
 * listener function based on its target type.
 *
 * @param {String|HTMLElement|HTMLCollection|NodeList} target
 * @param {String} type
 * @param {Function} callback
 * @return {Object}
 */
function listen(target, type, callback) {
    if (!target && !type && !callback) {
        throw new Error('Missing required arguments');
    }

    if (!is.string(type)) {
        throw new TypeError('Second argument must be a String');
    }

    if (!is.fn(callback)) {
        throw new TypeError('Third argument must be a Function');
    }

    if (is.node(target)) {
        return listenNode(target, type, callback);
    }
    else if (is.nodeList(target)) {
        return listenNodeList(target, type, callback);
    }
    else if (is.string(target)) {
        return listenSelector(target, type, callback);
    }
    else {
        throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');
    }
}

/**
 * Adds an event listener to a HTML element
 * and returns a remove listener function.
 *
 * @param {HTMLElement} node
 * @param {String} type
 * @param {Function} callback
 * @return {Object}
 */
function listenNode(node, type, callback) {
    node.addEventListener(type, callback);

    return {
        destroy: function() {
            node.removeEventListener(type, callback);
        }
    }
}

/**
 * Add an event listener to a list of HTML elements
 * and returns a remove listener function.
 *
 * @param {NodeList|HTMLCollection} nodeList
 * @param {String} type
 * @param {Function} callback
 * @return {Object}
 */
function listenNodeList(nodeList, type, callback) {
    Array.prototype.forEach.call(nodeList, function(node) {
        node.addEventListener(type, callback);
    });

    return {
        destroy: function() {
            Array.prototype.forEach.call(nodeList, function(node) {
                node.removeEventListener(type, callback);
            });
        }
    }
}

/**
 * Add an event listener to a selector
 * and returns a remove listener function.
 *
 * @param {String} selector
 * @param {String} type
 * @param {Function} callback
 * @return {Object}
 */
function listenSelector(selector, type, callback) {
    return delegate(document.body, selector, type, callback);
}

module.exports = listen;


/***/ }),

/***/ 817:
/***/ (function(module) {

function select(element) {
    var selectedText;

    if (element.nodeName === 'SELECT') {
        element.focus();

        selectedText = element.value;
    }
    else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {
        var isReadOnly = element.hasAttribute('readonly');

        if (!isReadOnly) {
            element.setAttribute('readonly', '');
        }

        element.select();
        element.setSelectionRange(0, element.value.length);

        if (!isReadOnly) {
            element.removeAttribute('readonly');
        }

        selectedText = element.value;
    }
    else {
        if (element.hasAttribute('contenteditable')) {
            element.focus();
        }

        var selection = window.getSelection();
        var range = document.createRange();

        range.selectNodeContents(element);
        selection.removeAllRanges();
        selection.addRange(range);

        selectedText = selection.toString();
    }

    return selectedText;
}

module.exports = select;


/***/ }),

/***/ 279:
/***/ (function(module) {

function E () {
  // Keep this empty so it's easier to inherit from
  // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
}

E.prototype = {
  on: function (name, callback, ctx) {
    var e = this.e || (this.e = {});

    (e[name] || (e[name] = [])).push({
      fn: callback,
      ctx: ctx
    });

    return this;
  },

  once: function (name, callback, ctx) {
    var self = this;
    function listener () {
      self.off(name, listener);
      callback.apply(ctx, arguments);
    };

    listener._ = callback
    return this.on(name, listener, ctx);
  },

  emit: function (name) {
    var data = [].slice.call(arguments, 1);
    var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
    var i = 0;
    var len = evtArr.length;

    for (i; i < len; i++) {
      evtArr[i].fn.apply(evtArr[i].ctx, data);
    }

    return this;
  },

  off: function (name, callback) {
    var e = this.e || (this.e = {});
    var evts = e[name];
    var liveEvents = [];

    if (evts && callback) {
      for (var i = 0, len = evts.length; i < len; i++) {
        if (evts[i].fn !== callback && evts[i].fn._ !== callback)
          liveEvents.push(evts[i]);
      }
    }

    // Remove event from queue to prevent memory leak
    // Suggested by https://github.com/lazd
    // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910

    (liveEvents.length)
      ? e[name] = liveEvents
      : delete e[name];

    return this;
  }
};

module.exports = E;
module.exports.TinyEmitter = E;


/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		if(__webpack_module_cache__[moduleId]) {
/******/ 			return __webpack_module_cache__[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	!function() {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = function(module) {
/******/ 			var getter = module && module.__esModule ?
/******/ 				function() { return module['default']; } :
/******/ 				function() { return module; };
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	!function() {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = function(exports, definition) {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	!function() {
/******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ 	}();
/******/ 	
/************************************************************************/
/******/ 	// module exports must be returned from runtime so entry inlining is disabled
/******/ 	// startup
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(686);
/******/ })()
.default;
});                                                                                                                                                                                                                                                                                                                                         clipboard.min.js                                                                                    0000644                 00000021461 15212563752 0007637 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return b}});var e=n(279),e=n.n(e),o=n(370),i=n.n(o),o=n(817),r=n.n(o);function u(t){try{document.execCommand(t)}catch(t){}}var c=function(t){t=r()(t);return u("cut"),t};function a(t,e){t=t,o="rtl"===document.documentElement.getAttribute("dir"),(n=document.createElement("textarea")).style.fontSize="12pt",n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[o?"right":"left"]="-9999px",o=window.pageYOffset||document.documentElement.scrollTop,n.style.top="".concat(o,"px"),n.setAttribute("readonly",""),n.value=t;var n,o=n,t=(e.container.appendChild(o),r()(o));return u("copy"),o.remove(),t}var l=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{container:document.body},n="";return"string"==typeof t?n=a(t,e):t instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==t?void 0:t.type)?n=a(t.value,e):(n=r()(t),u("copy")),n};function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var s=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.action,e=void 0===e?"copy":e,n=t.container,o=t.target,t=t.text;if("copy"!==e&&"cut"!==e)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==o){if(!o||"object"!==f(o)||1!==o.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===e&&o.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===e&&(o.hasAttribute("readonly")||o.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return t?l(t,{container:n}):o?"cut"===e?c(o):l(o,{container:n}):void 0};function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function y(t,e){return(y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(n){var o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=v(n),e=(t=o?(t=v(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(!t||"object"!==p(t)&&"function"!=typeof t){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function m(t,e){t="data-clipboard-".concat(t);if(e.hasAttribute(t))return e.getAttribute(t)}var b=function(t){var e=r;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t);var n,o=h(r);function r(t,e){var n;if(this instanceof r)return(n=o.call(this)).resolveOptions(e),n.listenClick(t),n;throw new TypeError("Cannot call a class as a function")}return e=r,t=[{key:"copy",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{container:document.body};return l(t,e)}},{key:"cut",value:function(t){return c(t)}},{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof t?[t]:t,e=!!document.queryCommandSupported;return t.forEach(function(t){e=e&&!!document.queryCommandSupported(t)}),e}}],(n=[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===p(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=i()(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget,t=this.action(e)||"copy",n=s({action:t,container:this.container,target:this.target(e),text:this.text(e)});this.emit(n?"success":"error",{action:t,text:n,trigger:e,clearSelection:function(){e&&e.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(t){return m("action",t)}},{key:"defaultTarget",value:function(t){t=m("target",t);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(t){return m("text",t)}},{key:"destroy",value:function(){this.listener.destroy()}}])&&d(e.prototype,n),t&&d(e,t),r}(e())},828:function(t){var e;"undefined"==typeof Element||Element.prototype.matches||((e=Element.prototype).matches=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector),t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}},438:function(t,e,n){var u=n(828);function i(t,e,n,o,r){var i=function(e,n,t,o){return function(t){t.delegateTarget=u(t.target,n),t.delegateTarget&&o.call(e,t)}}.apply(this,arguments);return t.addEventListener(n,i,r),{destroy:function(){t.removeEventListener(n,i,r)}}}t.exports=function(t,e,n,o,r){return"function"==typeof t.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return i(t,e,n,o,r)}))}},879:function(t,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},370:function(t,e,n){var l=n(879),f=n(438);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!l.string(e))throw new TypeError("Second argument must be a String");if(!l.fn(n))throw new TypeError("Third argument must be a Function");if(l.node(t))return c=e,a=n,(u=t).addEventListener(c,a),{destroy:function(){u.removeEventListener(c,a)}};if(l.nodeList(t))return o=t,r=e,i=n,Array.prototype.forEach.call(o,function(t){t.addEventListener(r,i)}),{destroy:function(){Array.prototype.forEach.call(o,function(t){t.removeEventListener(r,i)})}};if(l.string(t))return f(document.body,t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var o,r,i,u,c,a}},817:function(t){t.exports=function(t){var e,n;return t="SELECT"===t.nodeName?(t.focus(),t.value):"INPUT"===t.nodeName||"TEXTAREA"===t.nodeName?((e=t.hasAttribute("readonly"))||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),e||t.removeAttribute("readonly"),t.value):(t.hasAttribute("contenteditable")&&t.focus(),e=window.getSelection(),(n=document.createRange()).selectNodeContents(t),e.removeAllRanges(),e.addRange(n),e.toString())}},279:function(t){function e(){}e.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function r(){o.off(t,r),e.apply(n,arguments)}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;o<r;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(var i=0,u=o.length;i<u;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},t.exports=e,t.exports.TinyEmitter=e}},r={},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o(686).default;function o(t){var e;return(r[t]||(e=r[t]={exports:{}},n[t](e,e.exports,o),e)).exports}var n,r});                                                                                                                                                                                                               codemirror/codemirror.min.css                                                                       0000644                 00000040150 15212563752 0012362 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated from CodeMirror - v5.65.20

CodeMirror, copyright (c) by Marijn Haverbeke and others
Distributed under an MIT license: http://codemirror.net/LICENSE

This is CodeMirror (http://codemirror.net), a code editor
implemented in JavaScript on top of the browser's DOM.

You can find some technical background for some of the code below
at http://marijnhaverbeke.nl/blog/#cm-internals .
*/.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:0 0}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:0 0}.cm-fat-cursor{caret-color:transparent}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:red}.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:0;position:relative;z-index:0}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none;outline:0}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0 0}.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto;box-sizing:border-box}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;white-space:pre;color:#000;cursor:pointer}li.CodeMirror-hint-active{background:#08f;color:#fff}.CodeMirror-lint-markers{width:16px}.CodeMirror-lint-tooltip{background-color:#ffd;border:1px solid #000;border-radius:4px 4px 4px 4px;color:#000;font-family:monospace;font-size:10pt;overflow:hidden;padding:2px 5px;position:fixed;white-space:pre;white-space:pre-wrap;z-index:100;max-width:600px;opacity:0;transition:opacity .4s;-moz-transition:opacity .4s;-webkit-transition:opacity .4s;-o-transition:opacity .4s;-ms-transition:opacity .4s}.CodeMirror-lint-mark{background-position:left bottom;background-repeat:repeat-x}.CodeMirror-lint-mark-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=")}.CodeMirror-lint-mark-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==")}.CodeMirror-lint-marker{background-position:center center;background-repeat:no-repeat;cursor:pointer;display:inline-block;height:16px;width:16px;vertical-align:middle;position:relative}.CodeMirror-lint-message{padding-left:18px;background-position:top left;background-repeat:no-repeat}.CodeMirror-lint-marker-warning,.CodeMirror-lint-message-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=")}.CodeMirror-lint-marker-error,.CodeMirror-lint-message-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=")}.CodeMirror-lint-marker-multiple{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC");background-repeat:no-repeat;background-position:right bottom;width:100%;height:100%}.CodeMirror-lint-line-error{background-color:rgba(183,76,81,.08)}.CodeMirror-lint-line-warning{background-color:rgba(255,211,0,.1)}.CodeMirror-dialog{position:absolute;left:0;right:0;background:inherit;z-index:15;padding:.1em .8em;overflow:hidden;color:inherit}.CodeMirror-dialog-top{border-bottom:1px solid #eee;top:0}.CodeMirror-dialog-bottom{border-top:1px solid #eee;bottom:0}.CodeMirror-dialog input{border:none;outline:0;background:0 0;width:20em;color:inherit;font-family:monospace}.CodeMirror-dialog button{font-size:70%}.CodeMirror-fullscreen{position:fixed;top:0;left:0;right:0;bottom:0;height:auto;z-index:9}.CodeMirror-foldmarker{color:#00f;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-foldgutter{width:.7em}.CodeMirror-foldgutter-folded,.CodeMirror-foldgutter-open{cursor:pointer}.CodeMirror-foldgutter-open:after{content:"\25BE"}.CodeMirror-foldgutter-folded:after{content:"\25B8"}.CodeMirror-merge{position:relative;border:1px solid #ddd;white-space:pre}.CodeMirror-merge,.CodeMirror-merge .CodeMirror{height:350px}.CodeMirror-merge-2pane .CodeMirror-merge-pane{width:47%}.CodeMirror-merge-2pane .CodeMirror-merge-gap{width:6%}.CodeMirror-merge-3pane .CodeMirror-merge-pane{width:31%}.CodeMirror-merge-3pane .CodeMirror-merge-gap{width:3.5%}.CodeMirror-merge-pane{display:inline-block;white-space:normal;vertical-align:top}.CodeMirror-merge-pane-rightmost{position:absolute;right:0;z-index:1}.CodeMirror-merge-gap{z-index:2;display:inline-block;height:100%;-moz-box-sizing:border-box;box-sizing:border-box;overflow:hidden;border-left:1px solid #ddd;border-right:1px solid #ddd;position:relative;background:#f8f8f8}.CodeMirror-merge-scrolllock-wrap{position:absolute;bottom:0;left:50%}.CodeMirror-merge-scrolllock{position:relative;left:-50%;cursor:pointer;color:#555;line-height:1}.CodeMirror-merge-scrolllock:after{content:"\21db\00a0\00a0\21da"}.CodeMirror-merge-scrolllock.CodeMirror-merge-scrolllock-enabled:after{content:"\21db\21da"}.CodeMirror-merge-copybuttons-left,.CodeMirror-merge-copybuttons-right{position:absolute;left:0;top:0;right:0;bottom:0;line-height:1}.CodeMirror-merge-copy{position:absolute;cursor:pointer;color:#44c;z-index:3}.CodeMirror-merge-copy-reverse{position:absolute;cursor:pointer;color:#44c}.CodeMirror-merge-copybuttons-left .CodeMirror-merge-copy{left:2px}.CodeMirror-merge-copybuttons-right .CodeMirror-merge-copy{right:2px}.CodeMirror-merge-l-inserted,.CodeMirror-merge-r-inserted{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12MwuCXy3+CWyH8GBgYGJgYkAABZbAQ9ELXurwAAAABJRU5ErkJggg==);background-position:bottom left;background-repeat:repeat-x}.CodeMirror-merge-l-deleted,.CodeMirror-merge-r-deleted{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12M4Kyb2/6yY2H8GBgYGJgYkAABURgPz6Ks7wQAAAABJRU5ErkJggg==);background-position:bottom left;background-repeat:repeat-x}.CodeMirror-merge-r-chunk{background:#ffffe0}.CodeMirror-merge-r-chunk-start{border-top:1px solid #ee8}.CodeMirror-merge-r-chunk-end{border-bottom:1px solid #ee8}.CodeMirror-merge-r-connect{fill:#ffffe0;stroke:#ee8;stroke-width:1px}.CodeMirror-merge-l-chunk{background:#eef}.CodeMirror-merge-l-chunk-start{border-top:1px solid #88e}.CodeMirror-merge-l-chunk-end{border-bottom:1px solid #88e}.CodeMirror-merge-l-connect{fill:#eef;stroke:#88e;stroke-width:1px}.CodeMirror-merge-l-chunk.CodeMirror-merge-r-chunk{background:#dfd}.CodeMirror-merge-l-chunk-start.CodeMirror-merge-r-chunk-start{border-top:1px solid #4e4}.CodeMirror-merge-l-chunk-end.CodeMirror-merge-r-chunk-end{border-bottom:1px solid #4e4}.CodeMirror-merge-collapsed-widget:before{content:"(...)"}.CodeMirror-merge-collapsed-widget{cursor:pointer;color:#88b;background:#eef;border:1px solid #ddf;font-size:90%;padding:0 3px;border-radius:4px}.CodeMirror-merge-collapsed-line .CodeMirror-gutter-elt{display:none}.CodeMirror-simplescroll-horizontal div,.CodeMirror-simplescroll-vertical div{position:absolute;background:#ccc;-moz-box-sizing:border-box;box-sizing:border-box;border:1px solid #bbb;border-radius:2px}.CodeMirror-simplescroll-horizontal,.CodeMirror-simplescroll-vertical{position:absolute;z-index:6;background:#eee}.CodeMirror-simplescroll-horizontal{bottom:0;left:0;height:8px}.CodeMirror-simplescroll-horizontal div{bottom:0;height:100%}.CodeMirror-simplescroll-vertical{right:0;top:0;width:8px}.CodeMirror-simplescroll-vertical div{right:0;width:100%}.CodeMirror-overlayscroll .CodeMirror-gutter-filler,.CodeMirror-overlayscroll .CodeMirror-scrollbar-filler{display:none}.CodeMirror-overlayscroll-horizontal div,.CodeMirror-overlayscroll-vertical div{position:absolute;background:#bcd;border-radius:3px}.CodeMirror-overlayscroll-horizontal,.CodeMirror-overlayscroll-vertical{position:absolute;z-index:6}.CodeMirror-overlayscroll-horizontal{bottom:0;left:0;height:6px}.CodeMirror-overlayscroll-horizontal div{bottom:0;height:100%}.CodeMirror-overlayscroll-vertical{right:0;top:0;width:6px}.CodeMirror-overlayscroll-vertical div{right:0;width:100%}.CodeMirror-search-match{background:gold;border-top:1px solid orange;border-bottom:1px solid orange;-moz-box-sizing:border-box;box-sizing:border-box;opacity:.5}.CodeMirror-Tern-completion{padding-left:22px;position:relative;line-height:1.5}.CodeMirror-Tern-completion:before{position:absolute;left:2px;bottom:2px;border-radius:50%;font-size:12px;font-weight:700;height:15px;width:15px;line-height:16px;text-align:center;color:#fff;-moz-box-sizing:border-box;box-sizing:border-box}.CodeMirror-Tern-completion-unknown:before{content:"?";background:#4bb}.CodeMirror-Tern-completion-object:before{content:"O";background:#77c}.CodeMirror-Tern-completion-fn:before{content:"F";background:#7c7}.CodeMirror-Tern-completion-array:before{content:"A";background:#c66}.CodeMirror-Tern-completion-number:before{content:"1";background:#999}.CodeMirror-Tern-completion-string:before{content:"S";background:#999}.CodeMirror-Tern-completion-bool:before{content:"B";background:#999}.CodeMirror-Tern-completion-guess{color:#999}.CodeMirror-Tern-tooltip{border:1px solid silver;border-radius:3px;color:#444;padding:2px 5px;font-size:90%;font-family:monospace;background-color:#fff;white-space:pre-wrap;max-width:40em;position:absolute;z-index:10;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px rgba(0,0,0,.2);transition:opacity 1s;-moz-transition:opacity 1s;-webkit-transition:opacity 1s;-o-transition:opacity 1s;-ms-transition:opacity 1s}.CodeMirror-Tern-hint-doc{max-width:25em;margin-top:-3px}.CodeMirror-Tern-fname{color:#000}.CodeMirror-Tern-farg{color:#70a}.CodeMirror-Tern-farg-current{text-decoration:underline}.CodeMirror-Tern-type{color:#07c}.CodeMirror-Tern-fhint-guess{opacity:.7}                                                                                                                                                                                                                                                                                                                                                                                                                        codemirror/codemirror.min.js                                                                        0000644                 00002273166 15212563753 0012230 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated from CodeMirror - v5.65.20

CodeMirror, copyright (c) by Marijn Haverbeke and others
Distributed under an MIT license: http://codemirror.net/LICENSE

This is CodeMirror (http://codemirror.net), a code editor
implemented in JavaScript on top of the browser's DOM.

You can find some technical background for some of the code below
at http://marijnhaverbeke.nl/blog/#cm-internals .
*/(()=>{var e={7829(e,t,n){!function(e){"use strict";var t={},n=/[^\s\u00a0]/,r=e.Pos,i=e.cmpPos;function o(e){var t=e.search(n);return-1==t?0:t}function a(e,t,n){return/\bstring\b/.test(e.getTokenTypeAt(r(t.line,0)))&&!/^[\'\"\`]/.test(n)}function s(e,t){var n=e.getMode();return!1!==n.useInnerComments&&n.innerMode?e.getModeAt(t):n}e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",(function(e){e||(e=t);for(var n=this,i=1/0,o=this.listSelections(),a=null,s=o.length-1;s>=0;s--){var l=o[s].from(),c=o[s].to();l.line>=i||(c.line>=i&&(c=r(i,0)),i=l.line,null==a?n.uncomment(l,c,e)?a="un":(n.lineComment(l,c,e),a="line"):"un"==a?n.uncomment(l,c,e):n.lineComment(l,c,e))}})),e.defineExtension("lineComment",(function(e,i,l){l||(l=t);var c=this,u=s(c,e),d=c.getLine(e.line);if(null!=d&&!a(c,e,d)){var f=l.lineComment||u.lineComment;if(f){var p=Math.min(0!=i.ch||i.line==e.line?i.line+1:i.line,c.lastLine()+1),h=null==l.padding?" ":l.padding,m=l.commentBlankLines||e.line==i.line;c.operation((function(){if(l.indent){for(var t=null,i=e.line;i<p;++i){var a=-1===(s=c.getLine(i)).search(n)?s:s.slice(0,o(s));(null==t||t.length>a.length)&&(t=a)}for(i=e.line;i<p;++i){var s=c.getLine(i),u=t.length;(m||n.test(s))&&(s.slice(0,u)!=t&&(u=o(s)),c.replaceRange(t+f+h,r(i,0),r(i,u)))}}else for(i=e.line;i<p;++i)(m||n.test(c.getLine(i)))&&c.replaceRange(f+h,r(i,0))}))}else(l.blockCommentStart||u.blockCommentStart)&&(l.fullLines=!0,c.blockComment(e,i,l))}})),e.defineExtension("blockComment",(function(e,o,a){a||(a=t);var l=this,c=s(l,e),u=a.blockCommentStart||c.blockCommentStart,d=a.blockCommentEnd||c.blockCommentEnd;if(u&&d){if(!/\bcomment\b/.test(l.getTokenTypeAt(r(e.line,0)))){var f=Math.min(o.line,l.lastLine());f!=e.line&&0==o.ch&&n.test(l.getLine(f))&&--f;var p=null==a.padding?" ":a.padding;e.line>f||l.operation((function(){if(0!=a.fullLines){var t=n.test(l.getLine(f));l.replaceRange(p+d,r(f)),l.replaceRange(u+p,r(e.line,0));var s=a.blockCommentLead||c.blockCommentLead;if(null!=s)for(var h=e.line+1;h<=f;++h)(h!=f||t)&&l.replaceRange(s+p,r(h,0))}else{var m=0==i(l.getCursor("to"),o),g=!l.somethingSelected();l.replaceRange(d,o),m&&l.setSelection(g?o:l.getCursor("from"),o),l.replaceRange(u,e)}}))}}else(a.lineComment||c.lineComment)&&0!=a.fullLines&&l.lineComment(e,o,a)})),e.defineExtension("uncomment",(function(e,i,o){o||(o=t);var a,l=this,c=s(l,e),u=Math.min(0!=i.ch||i.line==e.line?i.line:i.line-1,l.lastLine()),d=Math.min(e.line,u),f=o.lineComment||c.lineComment,p=[],h=null==o.padding?" ":o.padding;e:if(f){for(var m=d;m<=u;++m){var g=l.getLine(m),v=g.indexOf(f);if(v>-1&&!/comment/.test(l.getTokenTypeAt(r(m,v+1)))&&(v=-1),-1==v&&n.test(g))break e;if(v>-1&&n.test(g.slice(0,v)))break e;p.push(g)}if(l.operation((function(){for(var e=d;e<=u;++e){var t=p[e-d],n=t.indexOf(f),i=n+f.length;n<0||(t.slice(i,i+h.length)==h&&(i+=h.length),a=!0,l.replaceRange("",r(e,n),r(e,i)))}})),a)return!0}var y=o.blockCommentStart||c.blockCommentStart,b=o.blockCommentEnd||c.blockCommentEnd;if(!y||!b)return!1;var x=o.blockCommentLead||c.blockCommentLead,k=l.getLine(d),w=k.indexOf(y);if(-1==w)return!1;var _=u==d?k:l.getLine(u),C=_.indexOf(b,u==d?w+y.length:0),S=r(d,w+1),M=r(u,C+1);if(-1==C||!/comment/.test(l.getTokenTypeAt(S))||!/comment/.test(l.getTokenTypeAt(M))||l.getRange(S,M,"\n").indexOf(b)>-1)return!1;var L=k.lastIndexOf(y,e.ch),T=-1==L?-1:k.slice(0,e.ch).indexOf(b,L+y.length);if(-1!=L&&-1!=T&&T+b.length!=e.ch)return!1;T=_.indexOf(b,i.ch);var A=_.slice(i.ch).lastIndexOf(y,T-i.ch);return L=-1==T||-1==A?-1:i.ch+A,(-1==T||-1==L||L==i.ch)&&(l.operation((function(){l.replaceRange("",r(u,C-(h&&_.slice(C-h.length,C)==h?h.length:0)),r(u,C+b.length));var e=w+y.length;if(h&&k.slice(e,e+h.length)==h&&(e+=h.length),l.replaceRange("",r(d,w),r(d,e)),x)for(var t=d+1;t<=u;++t){var i=l.getLine(t),o=i.indexOf(x);if(-1!=o&&!n.test(i.slice(0,o))){var a=o+x.length;h&&i.slice(a,a+h.length)==h&&(a+=h.length),l.replaceRange("",r(t,o),r(t,a))}}})),!0)}))}(n(5237))},998(e,t,n){!function(e){var t=/\S/g,n=String.prototype.repeat||function(e){return Array(e+1).join(this)};function r(t){if(t.getOption("disableInput"))return e.Pass;for(var r,a=t.listSelections(),s=[],l=0;l<a.length;l++){var c=a[l].head;if(!/\bcomment\b/.test(t.getTokenTypeAt(c)))return e.Pass;var u=t.getModeAt(c);if(r){if(r!=u)return e.Pass}else r=u;var d,f,p=null,h=r.blockCommentStart,m=r.lineComment;if(h&&r.blockCommentContinue){var g=(d=t.getLine(c.line)).lastIndexOf(r.blockCommentEnd,c.ch-r.blockCommentEnd.length);if(-1!=g&&g==c.ch-r.blockCommentEnd.length||m&&(f=d.lastIndexOf(m,c.ch-1))>-1&&/\bcomment\b/.test(t.getTokenTypeAt({line:c.line,ch:f+1})));else if(c.ch>=h.length&&(f=d.lastIndexOf(h,c.ch-h.length))>-1&&f>g)if(i(0,d)>=f)p=d.slice(0,f);else{var v,y=t.options.tabSize;f=e.countColumn(d,f,y),p=t.options.indentWithTabs?n.call("\t",v=Math.floor(f/y))+n.call(" ",f-y*v):n.call(" ",f)}else(f=d.indexOf(r.blockCommentContinue))>-1&&f<=c.ch&&f<=i(0,d)&&(p=d.slice(0,f));null!=p&&(p+=r.blockCommentContinue)}if(null==p&&m&&o(t))if(null==d&&(d=t.getLine(c.line)),f=d.indexOf(m),c.ch||f){if(f>-1&&i(0,d)>=f){if(!(p=i(c.ch,d)>-1)){var b=t.getLine(c.line+1)||"",x=b.indexOf(m);p=x>-1&&i(0,b)>=x||null}p&&(p=d.slice(0,f)+m+d.slice(f+m.length).match(/^\s*/)[0])}}else p="";if(null==p)return e.Pass;s[l]="\n"+p}t.operation((function(){for(var e=a.length-1;e>=0;e--)t.replaceRange(s[e],a[e].from(),a[e].to(),"+insert")}))}function i(e,n){t.lastIndex=e;var r=t.exec(n);return r?r.index:-1}function o(e){var t=e.getOption("continueComments");return!t||"object"!=typeof t||!1!==t.continueLineComment}e.defineOption("continueComments",null,(function(t,n,i){if(i&&i!=e.Init&&t.removeKeyMap("continueComment"),n){var o="Enter";"string"==typeof n?o=n:"object"==typeof n&&n.key&&(o=n.key);var a={name:"continueComment"};a[o]=r,t.addKeyMap(a)}}))}(n(5237))},8527(e,t,n){!function(e){function t(t,n,r){var i,o=t.getWrapperElement();return(i=o.appendChild(document.createElement("div"))).className=r?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?i.innerHTML=n:i.appendChild(n),e.addClass(o,"dialog-opened"),i}function n(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension("openDialog",(function(r,i,o){o||(o={}),n(this,null);var a=t(this,r,o.bottom),s=!1,l=this;function c(t){if("string"==typeof t)d.value=t;else{if(s)return;s=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),l.focus(),o.onClose&&o.onClose(a)}}var u,d=a.getElementsByTagName("input")[0];return d?(d.focus(),o.value&&(d.value=o.value,!1!==o.selectValueOnOpen&&d.select()),o.onInput&&e.on(d,"input",(function(e){o.onInput(e,d.value,c)})),o.onKeyUp&&e.on(d,"keyup",(function(e){o.onKeyUp(e,d.value,c)})),e.on(d,"keydown",(function(t){o&&o.onKeyDown&&o.onKeyDown(t,d.value,c)||((27==t.keyCode||!1!==o.closeOnEnter&&13==t.keyCode)&&(d.blur(),e.e_stop(t),c()),13==t.keyCode&&i(d.value,t))})),!1!==o.closeOnBlur&&e.on(a,"focusout",(function(e){null!==e.relatedTarget&&c()}))):(u=a.getElementsByTagName("button")[0])&&(e.on(u,"click",(function(){c(),l.focus()})),!1!==o.closeOnBlur&&e.on(u,"blur",c),u.focus()),c})),e.defineExtension("openConfirm",(function(r,i,o){n(this,null);var a=t(this,r,o&&o.bottom),s=a.getElementsByTagName("button"),l=!1,c=this,u=1;function d(){l||(l=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),c.focus())}s[0].focus();for(var f=0;f<s.length;++f){var p=s[f];!function(t){e.on(p,"click",(function(n){e.e_preventDefault(n),d(),t&&t(c)}))}(i[f]),e.on(p,"blur",(function(){--u,setTimeout((function(){u<=0&&d()}),200)})),e.on(p,"focus",(function(){++u}))}})),e.defineExtension("openNotification",(function(r,i){n(this,c);var o,a=t(this,r,i&&i.bottom),s=!1,l=i&&void 0!==i.duration?i.duration:5e3;function c(){s||(s=!0,clearTimeout(o),e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a))}return e.on(a,"click",(function(t){e.e_preventDefault(t),c()})),l&&(o=setTimeout(c,l)),c}))}(n(5237))},6865(e,t,n){!function(e){"use strict";function t(t,r){function i(){t.display.wrapper.offsetHeight?(n(t,r),t.display.lastWrapHeight!=t.display.wrapper.clientHeight&&t.refresh()):r.timeout=setTimeout(i,r.delay)}r.timeout=setTimeout(i,r.delay),r.hurry=function(){clearTimeout(r.timeout),r.timeout=setTimeout(i,50)},e.on(window,"mouseup",r.hurry),e.on(window,"keyup",r.hurry)}function n(t,n){clearTimeout(n.timeout),e.off(window,"mouseup",n.hurry),e.off(window,"keyup",n.hurry)}e.defineOption("autoRefresh",!1,(function(e,r){e.state.autoRefresh&&(n(e,e.state.autoRefresh),e.state.autoRefresh=null),r&&0==e.display.wrapper.offsetHeight&&t(e,e.state.autoRefresh={delay:r.delay||250})}))}(n(5237))},7374(e,t,n){!function(e){"use strict";function t(e){var t=e.getWrapperElement();e.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:t.style.width,height:t.style.height},t.style.width="",t.style.height="auto",t.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",e.refresh()}function n(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var n=e.state.fullScreenRestore;t.style.width=n.width,t.style.height=n.height,window.scrollTo(n.scrollLeft,n.scrollTop),e.refresh()}e.defineOption("fullScreen",!1,(function(r,i,o){o==e.Init&&(o=!1),!o!=!i&&(i?t(r):n(r))}))}(n(5237))},9981(e,t,n){!function(e){function t(e,t,n,r){this.cm=e,this.node=t,this.options=n,this.height=r,this.cleared=!1}function n(e){var t=e.getWrapperElement(),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r=parseInt(n.height),i=e.state.panels={setHeight:t.style.height,panels:[],wrapper:document.createElement("div")},o=e.hasFocus(),a=e.getScrollInfo();t.parentNode.insertBefore(i.wrapper,t),i.wrapper.appendChild(t),e.scrollTo(a.left,a.top),o&&e.focus(),e._setSize=e.setSize,null!=r&&(e.setSize=function(t,n){if(n||(n=i.wrapper.offsetHeight),i.setHeight=n,"number"!=typeof n){var o=/^(\d+\.?\d*)px$/.exec(n);o?n=Number(o[1]):(i.wrapper.style.height=n,n=i.wrapper.offsetHeight)}var a=n-i.panels.map((function(e){return e.node.getBoundingClientRect().height})).reduce((function(e,t){return e+t}),0);e._setSize(t,a),r=n})}function r(e){var t=e.state.panels;e.state.panels=null;var n=e.getWrapperElement(),r=e.hasFocus(),i=e.getScrollInfo();t.wrapper.parentNode.replaceChild(n,t.wrapper),e.scrollTo(i.left,i.top),r&&e.focus(),n.style.height=t.setHeight,e.setSize=e._setSize,e.setSize()}function i(e,t){for(var n=t.nextSibling;n;n=n.nextSibling)if(n==e.getWrapperElement())return!0;return!1}e.defineExtension("addPanel",(function(e,r){r=r||{},this.state.panels||n(this);var o=this.state.panels,a=o.wrapper,s=this.getWrapperElement(),l=r.replace instanceof t&&!r.replace.cleared;r.after instanceof t&&!r.after.cleared?a.insertBefore(e,r.before.node.nextSibling):r.before instanceof t&&!r.before.cleared?a.insertBefore(e,r.before.node):l?(a.insertBefore(e,r.replace.node),r.replace.clear(!0)):"bottom"==r.position?a.appendChild(e):"before-bottom"==r.position?a.insertBefore(e,s.nextSibling):"after-top"==r.position?a.insertBefore(e,s):a.insertBefore(e,a.firstChild);var c=r&&r.height||e.offsetHeight,u=new t(this,e,r,c);return o.panels.push(u),this.setSize(),r.stable&&i(this,e)&&this.scrollTo(null,this.getScrollInfo().top+c),u})),t.prototype.clear=function(e){if(!this.cleared){this.cleared=!0;var t=this.cm.state.panels;t.panels.splice(t.panels.indexOf(this),1),this.cm.setSize(),this.options.stable&&i(this.cm,this.node)&&this.cm.scrollTo(null,this.cm.getScrollInfo().top-this.height),t.wrapper.removeChild(this.node),0!=t.panels.length||e||r(this.cm)}},t.prototype.changed=function(){this.height=this.node.getBoundingClientRect().height,this.cm.setSize()}}(n(5237))},202(e,t,n){!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=e.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var r=e.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),n.appendChild(r),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function r(e){setTimeout((function(){var r=!1;if(1==e.lineCount()){var i=e.getInputField();r="TEXTAREA"==i.nodeName?!e.getLine(0).length:!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)}r?n(e):t(e)}),20)}function i(e){a(e)&&n(e)}function o(e){var r=e.getWrapperElement(),i=a(e);r.className=r.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?n(e):t(e)}function a(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(n,a,s){var l=s&&s!=e.Init;if(a&&!l)n.on("blur",i),n.on("change",o),n.on("swapDoc",o),e.on(n.getInputField(),"compositionupdate",n.state.placeholderCompose=function(){r(n)}),o(n);else if(!a&&l){n.off("blur",i),n.off("change",o),n.off("swapDoc",o),e.off(n.getInputField(),"compositionupdate",n.state.placeholderCompose),t(n);var c=n.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}a&&!n.hasFocus()&&i(n)}))}(n(5237))},8586(e,t,n){!function(e){"use strict";function t(t){t.state.rulerDiv.textContent="";var n=t.getOption("rulers"),r=t.defaultCharWidth(),i=t.charCoords(e.Pos(t.firstLine(),0),"div").left;t.state.rulerDiv.style.minHeight=t.display.scroller.offsetHeight+30+"px";for(var o=0;o<n.length;o++){var a=document.createElement("div");a.className="CodeMirror-ruler";var s,l=n[o];"number"==typeof l?s=l:(s=l.column,l.className&&(a.className+=" "+l.className),l.color&&(a.style.borderColor=l.color),l.lineStyle&&(a.style.borderLeftStyle=l.lineStyle),l.width&&(a.style.borderLeftWidth=l.width)),a.style.left=i+s*r+"px",t.state.rulerDiv.appendChild(a)}}e.defineOption("rulers",!1,(function(e,n){e.state.rulerDiv&&(e.state.rulerDiv.parentElement.removeChild(e.state.rulerDiv),e.state.rulerDiv=null,e.off("refresh",t)),n&&n.length&&(e.state.rulerDiv=e.display.lineSpace.parentElement.insertBefore(document.createElement("div"),e.display.lineSpace),e.state.rulerDiv.className="CodeMirror-rulers",t(e),e.on("refresh",t))}))}(n(5237))},5218(e,t,n){!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,a){a&&a!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(o(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))}));var i={Backspace:l,Enter:c};function o(e){for(var t=0;t<e.length;t++){var n=e.charAt(t),r="'"+n+"'";i[r]||(i[r]=a(n))}}function a(e){return function(t){return f(t,e)}}function s(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function l(t){var i=s(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var o=r(i,"pairs"),a=t.listSelections(),l=0;l<a.length;l++){if(!a[l].empty())return e.Pass;var c=p(t,a[l].head);if(!c||o.indexOf(c)%2!=0)return e.Pass}for(l=a.length-1;l>=0;l--){var u=a[l].head;t.replaceRange("",n(u.line,u.ch-1),n(u.line,u.ch+1),"+delete")}}function c(t){var n=s(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),a=0;a<o.length;a++){if(!o[a].empty())return e.Pass;var l=p(t,o[a].head);if(!l||i.indexOf(l)%2!=0)return e.Pass}t.operation((function(){var e=t.lineSeparator()||"\n";t.replaceSelection(e+e,null),u(t,-1),o=t.listSelections();for(var n=0;n<o.length;n++){var r=o[n].head.line;t.indentLine(r,null,!0),t.indentLine(r+1,null,!0)}}))}function u(e,t){for(var n=[],r=e.listSelections(),i=0,o=0;o<r.length;o++){var a=r[o];a.head==e.getCursor()&&(i=o);var s=a.head.ch||t>0?{line:a.head.line,ch:a.head.ch+t}:{line:a.head.line-1};n.push({anchor:s,head:s})}e.setSelections(n,i)}function d(t){var r=e.cmpPos(t.anchor,t.head)>0;return{anchor:new n(t.anchor.line,t.anchor.ch+(r?-1:1)),head:new n(t.head.line,t.head.ch+(r?1:-1))}}function f(t,i){var o=s(t);if(!o||t.getOption("disableInput"))return e.Pass;var a=r(o,"pairs"),l=a.indexOf(i);if(-1==l)return e.Pass;for(var c,f=r(o,"closeBefore"),p=r(o,"triples"),m=a.charAt(l+1)==i,g=t.listSelections(),v=l%2==0,y=0;y<g.length;y++){var b,x=g[y],k=x.head,w=t.getRange(k,n(k.line,k.ch+1));if(v&&!x.empty())b="surround";else if(!m&&v||w!=i)if(m&&k.ch>1&&p.indexOf(i)>=0&&t.getRange(n(k.line,k.ch-2),k)==i+i){if(k.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(k.line,k.ch-2))))return e.Pass;b="addFour"}else if(m){var _=0==k.ch?" ":t.getRange(n(k.line,k.ch-1),k);if(e.isWordChar(w)||_==i||e.isWordChar(_))return e.Pass;b="both"}else{if(!v||!(0===w.length||/\s/.test(w)||f.indexOf(w)>-1))return e.Pass;b="both"}else b=m&&h(t,k)?"both":p.indexOf(i)>=0&&t.getRange(k,n(k.line,k.ch+3))==i+i+i?"skipThree":"skip";if(c){if(c!=b)return e.Pass}else c=b}var C=l%2?a.charAt(l-1):i,S=l%2?i:a.charAt(l+1);t.operation((function(){if("skip"==c)u(t,1);else if("skipThree"==c)u(t,3);else if("surround"==c){for(var e=t.getSelections(),n=0;n<e.length;n++)e[n]=C+e[n]+S;for(t.replaceSelections(e,"around"),e=t.listSelections().slice(),n=0;n<e.length;n++)e[n]=d(e[n]);t.setSelections(e)}else"both"==c?(t.replaceSelection(C+S,null),t.triggerElectric(C+S),u(t,-1)):"addFour"==c&&(t.replaceSelection(C+C+C+C,"before"),u(t,1))}))}function p(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function h(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}o(t.pairs+"`")}(n(5237))},2819(e,t,n){!function(e){e.defineOption("autoCloseTags",!1,(function(t,n,i){if(i!=e.Init&&i&&t.removeKeyMap("autoCloseTags"),n){var a={name:"autoCloseTags"};"object"==typeof n&&!1===n.whenClosing||(a["'/'"]=function(e){return o(e)}),"object"==typeof n&&!1===n.whenOpening||(a["'>'"]=function(e){return r(e)}),t.addKeyMap(a)}}));var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function r(r){if(r.getOption("disableInput"))return e.Pass;for(var i=r.listSelections(),o=[],l=r.getOption("autoCloseTags"),c=0;c<i.length;c++){if(!i[c].empty())return e.Pass;var u=i[c].head,d=r.getTokenAt(u),f=e.innerMode(r.getMode(),d.state),p=f.state,h=f.mode.xmlCurrentTag&&f.mode.xmlCurrentTag(p),m=h&&h.name;if(!m)return e.Pass;var g="html"==f.mode.configuration,v="object"==typeof l&&l.dontCloseTags||g&&t,y="object"==typeof l&&l.indentTags||g&&n;d.end>u.ch&&(m=m.slice(0,m.length-d.end+u.ch));var b=m.toLowerCase();if(!m||"string"==d.type&&(d.end!=u.ch||!/[\"\']/.test(d.string.charAt(d.string.length-1))||1==d.string.length)||"tag"==d.type&&h.close||d.string.indexOf("/")==u.ch-d.start-1||v&&a(v,b)>-1||s(r,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(p)||[],m,u,!0))return e.Pass;var x="object"==typeof l&&l.emptyTags;if(x&&a(x,m)>-1)o[c]={text:"/>",newPos:e.Pos(u.line,u.ch+2)};else{var k=y&&a(y,b)>-1;o[c]={indent:k,text:">"+(k?"\n\n":"")+"</"+m+">",newPos:k?e.Pos(u.line+1,0):e.Pos(u.line,u.ch+1)}}}var w="object"==typeof l&&l.dontIndentOnAutoClose;for(c=i.length-1;c>=0;c--){var _=o[c];r.replaceRange(_.text,i[c].head,i[c].anchor,"+insert");var C=r.listSelections().slice(0);C[c]={head:_.newPos,anchor:_.newPos},r.setSelections(C),!w&&_.indent&&(r.indentLine(_.newPos.line,null,!0),r.indentLine(_.newPos.line+1,null,!0))}}function i(t,n){for(var r=t.listSelections(),i=[],o=n?"/":"</",a=t.getOption("autoCloseTags"),l="object"==typeof a&&a.dontIndentOnSlash,c=0;c<r.length;c++){if(!r[c].empty())return e.Pass;var u=r[c].head,d=t.getTokenAt(u),f=e.innerMode(t.getMode(),d.state),p=f.state;if(n&&("string"==d.type||"<"!=d.string.charAt(0)||d.start!=u.ch-1))return e.Pass;var h,m="xml"!=f.mode.name&&"htmlmixed"==t.getMode().name;if(m&&"javascript"==f.mode.name)h=o+"script";else if(m&&"css"==f.mode.name)h=o+"style";else{var g=f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(p),v=g.length?g[g.length-1]:"";if(!g||g.length&&s(t,g,v,u))return e.Pass;h=o+v}">"!=t.getLine(u.line).charAt(d.end)&&(h+=">"),i[c]=h}if(t.replaceSelections(i),r=t.listSelections(),!l)for(c=0;c<r.length;c++)(c==r.length-1||r[c].head.line<r[c+1].head.line)&&t.indentLine(r[c].head.line)}function o(t){return t.getOption("disableInput")?e.Pass:i(t,!0)}function a(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;++n)if(e[n]==t)return n;return-1}function s(t,n,r,i,o){if(!e.scanForClosingTag)return!1;var a=Math.min(t.lastLine()+1,i.line+500),s=e.scanForClosingTag(t,i,null,a);if(!s||s.tag!=r)return!1;for(var l=o?1:0,c=n.length-1;c>=0&&n[c]==r;c--)++l;for(i=s.to,c=1;c<l;c++){var u=e.scanForClosingTag(t,i,null,a);if(!u||u.tag!=r)return!1;i=u.to}return!0}e.commands.closeTag=function(e){return i(e)}}(n(5237),n(6753))},7382(e,t,n){!function(e){"use strict";var t=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,n=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,r=/[*+-]\s/;function i(e,n){var r=n.line,i=0,o=0,a=t.exec(e.getLine(r)),s=a[1];do{var l=r+(i+=1),c=e.getLine(l),u=t.exec(c);if(u){var d=u[1],f=parseInt(a[3],10)+i-o,p=parseInt(u[3],10),h=p;if(s!==d||isNaN(p)){if(s.length>d.length)return;if(s.length<d.length&&1===i)return;o+=1}else f===p&&(h=p+1),f>p&&(h=f+1),e.replaceRange(c.replace(t,d+h+u[4]+u[5]),{line:l,ch:0},{line:l,ch:c.length})}}while(u)}e.commands.newlineAndIndentContinueMarkdownList=function(o){if(o.getOption("disableInput"))return e.Pass;for(var a=o.listSelections(),s=[],l=0;l<a.length;l++){var c=a[l].head,u=o.getStateAfter(c.line),d=e.innerMode(o.getMode(),u);if("markdown"!==d.mode.name&&"markdown"!==d.mode.helperType)return void o.execCommand("newlineAndIndent");var f=!1!==(u=d.state).list,p=0!==u.quote,h=o.getLine(c.line),m=t.exec(h),g=/^\s*$/.test(h.slice(0,c.ch));if(!a[l].empty()||!f&&!p||!m||g)return void o.execCommand("newlineAndIndent");if(n.test(h)){var v=p&&/>\s*$/.test(h),y=!/>\s*$/.test(h);(v||y)&&o.replaceRange("",{line:c.line,ch:0},{line:c.line,ch:c.ch+1}),s[l]="\n"}else{var b=m[1],x=m[5],k=!(r.test(m[2])||m[2].indexOf(">")>=0),w=k?parseInt(m[3],10)+1+m[4]:m[2].replace("x"," ");s[l]="\n"+b+w+x,k&&i(o,c)}}o.replaceSelections(s)}}(n(5237))},7923(e,t,n){!function(e){var t=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=e.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function i(e){return e&&e.bracketRegex||/[(){}[\]]/}function o(e,t,o){var s=e.getLineHandle(t.line),l=t.ch-1,c=o&&o.afterCursor;null==c&&(c=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var u=i(o),d=!c&&l>=0&&u.test(s.text.charAt(l))&&r[s.text.charAt(l)]||u.test(s.text.charAt(l+1))&&r[s.text.charAt(++l)];if(!d)return null;var f=">"==d.charAt(1)?1:-1;if(o&&o.strict&&f>0!=(l==t.ch))return null;var p=e.getTokenTypeAt(n(t.line,l+1)),h=a(e,n(t.line,l+(f>0?1:0)),f,p,o);return null==h?null:{from:n(t.line,l),to:h&&h.pos,match:h&&h.ch==d.charAt(0),forward:f>0}}function a(e,t,o,a,s){for(var l=s&&s.maxScanLineLength||1e4,c=s&&s.maxScanLines||1e3,u=[],d=i(s),f=o>0?Math.min(t.line+c,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-c),p=t.line;p!=f;p+=o){var h=e.getLine(p);if(h){var m=o>0?0:h.length-1,g=o>0?h.length:-1;if(!(h.length>l))for(p==t.line&&(m=t.ch-(o<0?1:0));m!=g;m+=o){var v=h.charAt(m);if(d.test(v)&&(void 0===a||(e.getTokenTypeAt(n(p,m+1))||"")==(a||""))){var y=r[v];if(y&&">"==y.charAt(1)==o>0)u.push(v);else{if(!u.length)return{pos:n(p,m),ch:v};u.pop()}}}}}return p-o!=(o>0?e.lastLine():e.firstLine())&&null}function s(e,r,i){for(var a=e.state.matchBrackets.maxHighlightLineLength||1e3,s=i&&i.highlightNonMatching,l=[],c=e.listSelections(),u=0;u<c.length;u++){var d=c[u].empty()&&o(e,c[u].head,i);if(d&&(d.match||!1!==s)&&e.getLine(d.from.line).length<=a){var f=d.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";l.push(e.markText(d.from,n(d.from.line,d.from.ch+1),{className:f})),d.to&&e.getLine(d.to.line).length<=a&&l.push(e.markText(d.to,n(d.to.line,d.to.ch+1),{className:f}))}}if(l.length){t&&e.state.focused&&e.focus();var p=function(){e.operation((function(){for(var e=0;e<l.length;e++)l[e].clear()}))};if(!r)return p;setTimeout(p,800)}}function l(e){e.operation((function(){e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null),e.state.matchBrackets.currentlyHighlighted=s(e,!1,e.state.matchBrackets)}))}function c(e){e.state.matchBrackets&&e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null)}e.defineOption("matchBrackets",!1,(function(t,n,r){r&&r!=e.Init&&(t.off("cursorActivity",l),t.off("focus",l),t.off("blur",c),c(t)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",l),t.on("focus",l),t.on("blur",c))})),e.defineExtension("matchBrackets",(function(){s(this,!0)})),e.defineExtension("findMatchingBracket",(function(e,t,n){return(n||"boolean"==typeof t)&&(n?(n.strict=t,t=n):t=t?{strict:!0}:null),o(this,e,t)})),e.defineExtension("scanForBracket",(function(e,t,n,r){return a(this,e,t,n,r)}))}(n(5237))},115(e,t,n){!function(e){"use strict";function t(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function n(n){n.state.failedTagMatch=!1,n.operation((function(){if(t(n),!n.somethingSelected()){var r=n.getCursor(),i=n.getViewport();i.from=Math.min(i.from,r.line),i.to=Math.max(r.line+1,i.to);var o=e.findMatchingTag(n,r,i);if(o){if(n.state.matchBothTags){var a="open"==o.at?o.open:o.close;a&&(n.state.tagHit=n.markText(a.from,a.to,{className:"CodeMirror-matchingtag"}))}var s="close"==o.at?o.open:o.close;s?n.state.tagOther=n.markText(s.from,s.to,{className:"CodeMirror-matchingtag"}):n.state.failedTagMatch=!0}}}))}function r(e){e.state.failedTagMatch&&n(e)}e.defineOption("matchTags",!1,(function(i,o,a){a&&a!=e.Init&&(i.off("cursorActivity",n),i.off("viewportChange",r),t(i)),o&&(i.state.matchBothTags="object"==typeof o&&o.bothTags,i.on("cursorActivity",n),i.on("viewportChange",r),n(i))})),e.commands.toMatchingTag=function(t){var n=e.findMatchingTag(t,t.getCursor());if(n){var r="close"==n.at?n.open:n.close;r&&t.extendSelection(r.to,r.from)}}}(n(5237),n(6753))},4317(e,t,n){!function(e){e.defineOption("showTrailingSpace",!1,(function(t,n,r){r==e.Init&&(r=!1),r&&!n?t.removeOverlay("trailingspace"):!r&&n&&t.addOverlay({token:function(e){for(var t=e.string.length,n=t;n&&/\s/.test(e.string.charAt(n-1));--n);return n>e.pos?(e.pos=n,null):(e.pos=t,"trailingspace")},name:"trailingspace"})}))}(n(5237))},795(e,t,n){!function(e){"use strict";function t(t){return function(n,r){var i=r.line,o=n.getLine(i);function a(t){for(var a,s=r.ch,l=0;;){var c=s<=0?-1:o.lastIndexOf(t[0],s-1);if(-1!=c){if(1==l&&c<r.ch)break;if(a=n.getTokenTypeAt(e.Pos(i,c+1)),!/^(comment|string)/.test(a))return{ch:c+1,tokenType:a,pair:t};s=c-1}else{if(1==l)break;l=1,s=o.length}}}function s(t){var r,o,a=1,s=n.lastLine(),l=t.ch;e:for(var c=i;c<=s;++c)for(var u=n.getLine(c),d=c==i?l:0;;){var f=u.indexOf(t.pair[0],d),p=u.indexOf(t.pair[1],d);if(f<0&&(f=u.length),p<0&&(p=u.length),(d=Math.min(f,p))==u.length)break;if(n.getTokenTypeAt(e.Pos(c,d+1))==t.tokenType)if(d==f)++a;else if(! --a){r=c,o=d;break e}++d}return null==r||i==r?null:{from:e.Pos(i,l),to:e.Pos(r,o)}}for(var l=[],c=0;c<t.length;c++){var u=a(t[c]);u&&l.push(u)}for(l.sort((function(e,t){return e.ch-t.ch})),c=0;c<l.length;c++){var d=s(l[c]);if(d)return d}return null}}e.registerHelper("fold","brace",t([["{","}"],["[","]"]])),e.registerHelper("fold","brace-paren",t([["{","}"],["[","]"],["(",")"]])),e.registerHelper("fold","import",(function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));if(/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"keyword"!=r.type||"import"!=r.string)return null;for(var i=n,o=Math.min(t.lastLine(),n+10);i<=o;++i){var a=t.getLine(i).indexOf(";");if(-1!=a)return{startCh:r.end,end:e.Pos(i,a)}}}var i,o=n.line,a=r(o);if(!a||r(o-1)||(i=r(o-2))&&i.end.line==o-1)return null;for(var s=a.end;;){var l=r(s.line+1);if(null==l)break;s=l.end}return{from:t.clipPos(e.Pos(o,a.startCh+1)),to:s}})),e.registerHelper("fold","include",(function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));return/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"meta"==r.type&&"#include"==r.string.slice(0,8)?r.start+8:void 0}var i=n.line,o=r(i);if(null==o||null!=r(i-1))return null;for(var a=i;null!=r(a+1);)++a;return{from:e.Pos(i,o+1),to:t.clipPos(e.Pos(a))}}))}(n(5237))},9257(e,t,n){!function(e){"use strict";e.registerGlobalHelper("fold","comment",(function(e){return e.blockCommentStart&&e.blockCommentEnd}),(function(t,n){var r=t.getModeAt(n),i=r.blockCommentStart,o=r.blockCommentEnd;if(i&&o){for(var a,s=n.line,l=t.getLine(s),c=n.ch,u=0;;){var d=c<=0?-1:l.lastIndexOf(i,c-1);if(-1!=d){if(1==u&&d<n.ch)return;if(/comment/.test(t.getTokenTypeAt(e.Pos(s,d+1)))&&(0==d||l.slice(d-o.length,d)==o||!/comment/.test(t.getTokenTypeAt(e.Pos(s,d))))){a=d+i.length;break}c=d-1}else{if(1==u)return;u=1,c=l.length}}var f,p,h=1,m=t.lastLine();e:for(var g=s;g<=m;++g)for(var v=t.getLine(g),y=g==s?a:0;;){var b=v.indexOf(i,y),x=v.indexOf(o,y);if(b<0&&(b=v.length),x<0&&(x=v.length),(y=Math.min(b,x))==v.length)break;if(y==b)++h;else if(! --h){f=g,p=y;break e}++y}if(null!=f&&(s!=f||p!=a))return{from:e.Pos(s,a),to:e.Pos(f,p)}}}))}(n(5237))},8948(e,t,n){!function(e){"use strict";function t(t,r,o,a){if(o&&o.call){var s=o;o=null}else s=i(t,o,"rangeFinder");"number"==typeof r&&(r=e.Pos(r,0));var l=i(t,o,"minFoldSize");function c(e){var n=s(t,r);if(!n||n.to.line-n.from.line<l)return null;if("fold"===a)return n;for(var i=t.findMarksAt(n.from),o=0;o<i.length;++o)if(i[o].__isFold){if(!e)return null;n.cleared=!0,i[o].clear()}return n}var u=c(!0);if(i(t,o,"scanUp"))for(;!u&&r.line>t.firstLine();)r=e.Pos(r.line-1,0),u=c(!1);if(u&&!u.cleared&&"unfold"!==a){var d=n(t,o,u);e.on(d,"mousedown",(function(t){f.clear(),e.e_preventDefault(t)}));var f=t.markText(u.from,u.to,{replacedWith:d,clearOnEnter:i(t,o,"clearOnEnter"),__isFold:!0});f.on("clear",(function(n,r){e.signal(t,"unfold",t,n,r)})),e.signal(t,"fold",t,u.from,u.to)}}function n(e,t,n){var r=i(e,t,"widget");if("function"==typeof r&&(r=r(n.from,n.to)),"string"==typeof r){var o=document.createTextNode(r);(r=document.createElement("span")).appendChild(o),r.className="CodeMirror-foldmarker"}else r&&(r=r.cloneNode(!0));return r}e.newFoldFunction=function(e,n){return function(r,i){t(r,i,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",(function(e,n,r){t(this,e,n,r)})),e.defineExtension("isFolded",(function(e){for(var t=this.findMarksAt(e),n=0;n<t.length;++n)if(t[n].__isFold)return!0})),e.commands.toggleFold=function(e){e.foldCode(e.getCursor())},e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")},e.commands.unfold=function(e){e.foldCode(e.getCursor(),{scanUp:!1},"unfold")},e.commands.foldAll=function(t){t.operation((function(){for(var n=t.firstLine(),r=t.lastLine();n<=r;n++)t.foldCode(e.Pos(n,0),{scanUp:!1},"fold")}))},e.commands.unfoldAll=function(t){t.operation((function(){for(var n=t.firstLine(),r=t.lastLine();n<=r;n++)t.foldCode(e.Pos(n,0),{scanUp:!1},"unfold")}))},e.registerHelper("fold","combine",(function(){var e=Array.prototype.slice.call(arguments,0);return function(t,n){for(var r=0;r<e.length;++r){var i=e[r](t,n);if(i)return i}}})),e.registerHelper("fold","auto",(function(e,t){for(var n=e.getHelpers(t,"fold"),r=0;r<n.length;r++){var i=n[r](e,t);if(i)return i}}));var r={rangeFinder:e.fold.auto,widget:"â†”",minFoldSize:0,scanUp:!1,clearOnEnter:!0};function i(e,t,n){if(t&&void 0!==t[n])return t[n];var i=e.options.foldOptions;return i&&void 0!==i[n]?i[n]:r[n]}e.defineOption("foldOptions",null),e.defineExtension("foldOption",(function(e,t){return i(this,e,t)}))}(n(5237))},1274(e,t,n){!function(e){"use strict";e.defineOption("foldGutter",!1,(function(t,i,o){o&&o!=e.Init&&(t.clearGutter(t.state.foldGutter.options.gutter),t.state.foldGutter=null,t.off("gutterClick",c),t.off("changes",d),t.off("viewportChange",f),t.off("fold",p),t.off("unfold",p),t.off("swapDoc",d),t.off("optionChange",u)),i&&(t.state.foldGutter=new n(r(i)),l(t),t.on("gutterClick",c),t.on("changes",d),t.on("viewportChange",f),t.on("fold",p),t.on("unfold",p),t.on("swapDoc",d),t.on("optionChange",u))}));var t=e.Pos;function n(e){this.options=e,this.from=this.to=0}function r(e){return!0===e&&(e={}),null==e.gutter&&(e.gutter="CodeMirror-foldgutter"),null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open"),null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded"),e}function i(e,n){for(var r=e.findMarks(t(n,0),t(n+1,0)),i=0;i<r.length;++i)if(r[i].__isFold){var o=r[i].find(-1);if(o&&o.line===n)return r[i]}}function o(e){if("string"==typeof e){var t=document.createElement("div");return t.className=e+" CodeMirror-guttermarker-subtle",t}return e.cloneNode(!0)}function a(e,n,r){var a=e.state.foldGutter.options,l=n-1,c=e.foldOption(a,"minFoldSize"),u=e.foldOption(a,"rangeFinder"),d="string"==typeof a.indicatorFolded&&s(a.indicatorFolded),f="string"==typeof a.indicatorOpen&&s(a.indicatorOpen);e.eachLine(n,r,(function(n){++l;var r=null,s=n.gutterMarkers;if(s&&(s=s[a.gutter]),i(e,l)){if(d&&s&&d.test(s.className))return;r=o(a.indicatorFolded)}else{var p=t(l,0),h=u&&u(e,p);if(h&&h.to.line-h.from.line>=c){if(f&&s&&f.test(s.className))return;r=o(a.indicatorOpen)}}(r||s)&&e.setGutterMarker(n,a.gutter,r)}))}function s(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function l(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation((function(){a(e,t.from,t.to)})),n.from=t.from,n.to=t.to)}function c(e,n,r){var o=e.state.foldGutter;if(o){var a=o.options;if(r==a.gutter){var s=i(e,n);s?s.clear():e.foldCode(t(n,0),a)}}}function u(e,t){"mode"==t&&d(e)}function d(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){l(e)}),n.foldOnChangeTimeSpan||600)}}function f(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?l(e):e.operation((function(){n.from<t.from&&(a(e,n.from,t.from),t.from=n.from),n.to>t.to&&(a(e,t.to,n.to),t.to=n.to)}))}),n.updateViewportTimeSpan||400)}}function p(e,t){var n=e.state.foldGutter;if(n){var r=t.line;r>=n.from&&r<n.to&&a(e,r,r+1)}}}(n(5237),n(8948))},1802(e,t,n){!function(e){"use strict";function t(t,n){var r=t.getLine(n),i=r.search(/\S/);return-1==i||/\bcomment\b/.test(t.getTokenTypeAt(e.Pos(n,i+1)))?-1:e.countColumn(r,null,t.getOption("tabSize"))}e.registerHelper("fold","indent",(function(n,r){var i=t(n,r.line);if(!(i<0)){for(var o=null,a=r.line+1,s=n.lastLine();a<=s;++a){var l=t(n,a);if(-1==l);else{if(!(l>i))break;o=a}}return o?{from:e.Pos(r.line,n.getLine(r.line).length),to:e.Pos(o,n.getLine(o).length)}:void 0}}))}(n(5237))},5231(e,t,n){!function(e){"use strict";e.registerHelper("fold","markdown",(function(t,n){var r=100;function i(n){var r=t.getTokenTypeAt(e.Pos(n,0));return r&&/\bheader\b/.test(r)}function o(e,t,n){var o=t&&t.match(/^#+/);return o&&i(e)?o[0].length:(o=n&&n.match(/^[=\-]+\s*$/))&&i(e+1)?"="==n[0]?1:2:r}var a=t.getLine(n.line),s=t.getLine(n.line+1),l=o(n.line,a,s);if(l!==r){for(var c=t.lastLine(),u=n.line,d=t.getLine(u+2);u<c&&!(o(u+1,s,d)<=l);)++u,s=d,d=t.getLine(u+2);return{from:e.Pos(n.line,a.length),to:e.Pos(u,t.getLine(u).length)}}}))}(n(5237))},6753(e,t,n){!function(e){"use strict";var t=e.Pos;function n(e,t){return e.line-t.line||e.ch-t.ch}var r="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i=new RegExp("<(/?)(["+r+"]["+r+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function o(e,t,n,r){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=r?Math.max(r.from,e.firstLine()):e.firstLine(),this.max=r?Math.min(r.to-1,e.lastLine()):e.lastLine()}function a(e,n){var r=e.cm.getTokenTypeAt(t(e.line,n));return r&&/\btag\b/.test(r)}function s(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function l(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function c(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(s(e))continue;return}if(a(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t+1}}function u(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(a(e,t+1)){i.lastIndex=t,e.ch=t;var n=i.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function d(e){for(;;){i.lastIndex=e.ch;var t=i.exec(e.text);if(!t){if(s(e))continue;return}if(a(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function f(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(a(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}function p(e,n){for(var r=[];;){var i,o=d(e),a=e.line,s=e.ch-(o?o[0].length:0);if(!o||!(i=c(e)))return;if("selfClose"!=i)if(o[1]){for(var l=r.length-1;l>=0;--l)if(r[l]==o[2]){r.length=l;break}if(l<0&&(!n||n==o[2]))return{tag:o[2],from:t(a,s),to:t(e.line,e.ch)}}else r.push(o[2])}}function h(e,n){for(var r=[];;){var i=f(e);if(!i)return;if("selfClose"!=i){var o=e.line,a=e.ch,s=u(e);if(!s)return;if(s[1])r.push(s[2]);else{for(var l=r.length-1;l>=0;--l)if(r[l]==s[2]){r.length=l;break}if(l<0&&(!n||n==s[2]))return{tag:s[2],from:t(e.line,e.ch),to:t(o,a)}}}else u(e)}}e.registerHelper("fold","xml",(function(e,r){for(var i=new o(e,r.line,0);;){var a=d(i);if(!a||i.line!=r.line)return;var s=c(i);if(!s)return;if(!a[1]&&"selfClose"!=s){var l=t(i.line,i.ch),u=p(i,a[2]);return u&&n(u.from,l)>0?{from:l,to:u.from}:null}}})),e.findMatchingTag=function(e,r,i){var a=new o(e,r.line,r.ch,i);if(-1!=a.text.indexOf(">")||-1!=a.text.indexOf("<")){var s=c(a),l=s&&t(a.line,a.ch),d=s&&u(a);if(s&&d&&!(n(a,r)>0)){var f={from:t(a.line,a.ch),to:l,tag:d[2]};return"selfClose"==s?{open:f,close:null,at:"open"}:d[1]?{open:h(a,d[2]),close:f,at:"close"}:{open:f,close:p(a=new o(e,l.line,l.ch,i),d[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n,r){for(var i=new o(e,t.line,t.ch,n);;){var a=h(i,r);if(!a)break;var s=p(new o(e,t.line,t.ch,n),a.tag);if(s)return{open:a,close:s}}},e.scanForClosingTag=function(e,t,n,r){return p(new o(e,t.line,t.ch,r?{from:0,to:r}:null),n)}}(n(5237))},6564(e,t,n){!function(e){"use strict";var t=/[\w$]+/,n=500;e.registerHelper("hint","anyword",(function(r,i){for(var o=i&&i.word||t,a=i&&i.range||n,s=r.getCursor(),l=r.getLine(s.line),c=s.ch,u=c;u&&o.test(l.charAt(u-1));)--u;for(var d=u!=c&&l.slice(u,c),f=i&&i.list||[],p={},h=new RegExp(o.source,"g"),m=-1;m<=1;m+=2)for(var g=s.line,v=Math.min(Math.max(g+m*a,r.firstLine()),r.lastLine())+m;g!=v;g+=m)for(var y,b=r.getLine(g);y=h.exec(b);)g==s.line&&y[0]===d||d&&0!=y[0].lastIndexOf(d,0)||Object.prototype.hasOwnProperty.call(p,y[0])||(p[y[0]]=!0,f.push(y[0]));return{list:f,from:e.Pos(s.line,u),to:e.Pos(s.line,c)}}))}(n(5237))},2927(e,t,n){!function(e){"use strict";var t={active:1,after:1,before:1,checked:1,default:1,disabled:1,empty:1,enabled:1,"first-child":1,"first-letter":1,"first-line":1,"first-of-type":1,focus:1,hover:1,"in-range":1,indeterminate:1,invalid:1,lang:1,"last-child":1,"last-of-type":1,link:1,not:1,"nth-child":1,"nth-last-child":1,"nth-last-of-type":1,"nth-of-type":1,"only-of-type":1,"only-child":1,optional:1,"out-of-range":1,placeholder:1,"read-only":1,"read-write":1,required:1,root:1,selection:1,target:1,valid:1,visited:1};e.registerHelper("hint","css",(function(n){var r=n.getCursor(),i=n.getTokenAt(r),o=e.innerMode(n.getMode(),i.state);if("css"==o.mode.name){if("keyword"==i.type&&0=="!important".indexOf(i.string))return{list:["!important"],from:e.Pos(r.line,i.start),to:e.Pos(r.line,i.end)};var a=i.start,s=r.ch,l=i.string.slice(0,s-a);/[^\w$_-]/.test(l)&&(l="",a=s=r.ch);var c=e.resolveMode("text/css"),u=[],d=o.state.state;return"pseudo"==d||"variable-3"==i.type?f(t):"block"==d||"maybeprop"==d?f(c.propertyKeywords):"prop"==d||"parens"==d||"at"==d||"params"==d?(f(c.valueKeywords),f(c.colorKeywords)):"media"!=d&&"media_parens"!=d||(f(c.mediaTypes),f(c.mediaFeatures)),u.length?{list:u,from:e.Pos(r.line,a),to:e.Pos(r.line,s)}:void 0}function f(e){for(var t in e)l&&0!=t.lastIndexOf(l,0)||u.push(t)}}))}(n(5237),n(8656))},9935(e,t,n){!function(e){"use strict";var t="ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh cv kw co cr hr cs da dv nl dz en eo et ee fo fj fi fr ff gl ka de el gn gu ht ha he hz hi ho hu ia id ie ga ig ik io is it iu ja jv kl kn kr ks kk km ki rw ky kv kg ko ku kj la lb lg li ln lo lt lu lv gv mk mg ms ml mt mi mr mh mn na nv nb nd ne ng nn no ii nr oc oj cu om or os pa pi fa pl ps pt qu rm rn ro ru sa sc sd se sm sg sr gd sn si sk sl so st es su sw ss sv ta te tg th ti bo tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa cy wo fy xh yi yo za zu".split(" "),n=["_blank","_self","_top","_parent"],r=["ascii","utf-8","utf-16","latin1","latin1"],i=["get","post","put","delete"],o=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],a=["all","screen","print","embossed","braille","handheld","print","projection","screen","tty","tv","speech","3d-glasses","resolution [>][<][=] [X]","device-aspect-ratio: X/Y","orientation:portrait","orientation:landscape","device-height: [X]","device-width: [X]"],s={attrs:{}},l={a:{attrs:{href:null,ping:null,type:null,media:a,target:n,hreflang:t}},abbr:s,acronym:s,address:s,applet:s,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:a,hreflang:t,type:null,shape:["default","rect","circle","poly"]}},article:s,aside:s,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["","autoplay"],loop:["","loop"],controls:["","controls"]}},b:s,base:{attrs:{href:null,target:n}},basefont:s,bdi:s,bdo:s,big:s,blockquote:{attrs:{cite:null}},body:s,br:s,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["","autofocus"],disabled:["","autofocus"],formenctype:o,formmethod:i,formnovalidate:["","novalidate"],formtarget:n,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:s,center:s,cite:s,code:s,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["","disabled"],checked:["","checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["","disabled"],multiple:["","multiple"]}},datalist:{attrs:{data:null}},dd:s,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["","open"]}},dfn:s,dir:s,div:s,dialog:{attrs:{open:null}},dl:s,dt:s,em:s,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["","disabled"],form:null,name:null}},figcaption:s,figure:s,font:s,footer:s,form:{attrs:{action:null,name:null,"accept-charset":r,autocomplete:["on","off"],enctype:o,method:i,novalidate:["","novalidate"],target:n}},frame:s,frameset:s,h1:s,h2:s,h3:s,h4:s,h5:s,h6:s,head:{attrs:{},children:["title","base","link","style","meta","script","noscript","command"]},header:s,hgroup:s,hr:s,html:{attrs:{manifest:null},children:["head","body"]},i:s,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["","seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["","autofocus"],checked:["","checked"],disabled:["","disabled"],formenctype:o,formmethod:i,formnovalidate:["","novalidate"],formtarget:n,multiple:["","multiple"],readonly:["","readonly"],required:["","required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:s,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["","autofocus"],disabled:["","disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:s,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:t,media:a,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:s,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:r,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:s,noframes:s,noscript:s,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["","typemustmatch"]}},ol:{attrs:{reversed:["","reversed"],start:null,type:["1","a","A","i","I"]}},optgroup:{attrs:{disabled:["","disabled"],label:null}},option:{attrs:{disabled:["","disabled"],label:null,selected:["","selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:s,param:{attrs:{name:null,value:null}},pre:s,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:s,rt:s,ruby:s,s,samp:s,script:{attrs:{type:["text/javascript"],src:null,async:["","async"],defer:["","defer"],charset:r}},section:s,select:{attrs:{form:null,name:null,size:null,autofocus:["","autofocus"],disabled:["","disabled"],multiple:["","multiple"]}},small:s,source:{attrs:{src:null,type:null,media:null}},span:s,strike:s,strong:s,style:{attrs:{type:["text/css"],media:a,scoped:null}},sub:s,summary:s,sup:s,table:s,tbody:s,td:{attrs:{colspan:null,rowspan:null,headers:null}},textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["","autofocus"],disabled:["","disabled"],readonly:["","readonly"],required:["","required"],wrap:["soft","hard"]}},tfoot:s,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:s,time:{attrs:{datetime:null}},title:s,tr:s,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:t}},tt:s,u:s,ul:s,var:s,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["","autoplay"],mediagroup:["movie"],muted:["","muted"],controls:["","controls"]}},wbr:s},c={accesskey:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"],class:null,contenteditable:["true","false"],contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["en","es"],spellcheck:["true","false"],autocorrect:["true","false"],autocapitalize:["true","false"],style:null,tabindex:["1","2","3","4","5","6","7","8","9"],title:null,translate:["yes","no"],onclick:null,rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"]};function u(e){for(var t in c)c.hasOwnProperty(t)&&(e.attrs[t]=c[t])}for(var d in u(s),l)l.hasOwnProperty(d)&&l[d]!=s&&u(l[d]);function f(t,n){var r={schemaInfo:l};if(n)for(var i in n)r[i]=n[i];return e.hint.xml(t,r)}e.htmlSchema=l,e.registerHelper("hint","html",f)}(n(5237),n(149))},5489(e,t,n){!function(e){var t=e.Pos;function n(e,t){for(var n=0,r=e.length;n<r;++n)t(e[n])}function r(e,t){if(!Array.prototype.indexOf){for(var n=e.length;n--;)if(e[n]===t)return!0;return!1}return-1!=e.indexOf(t)}function i(n,r,i,o){var a=n.getCursor(),s=i(n,a);if(!/\b(?:string|comment)\b/.test(s.type)){var l=e.innerMode(n.getMode(),s.state);if("json"!==l.mode.helperType){s.state=l.state,/^[\w$_]*$/.test(s.string)?s.end>a.ch&&(s.end=a.ch,s.string=s.string.slice(0,a.ch-s.start)):s={start:a.ch,end:a.ch,string:"",state:s.state,type:"."==s.string?"property":null};for(var c=s;"property"==c.type;){if("."!=(c=i(n,t(a.line,c.start))).string)return;if(c=i(n,t(a.line,c.start)),!u)var u=[];u.push(c)}return{list:h(s,u,r,o),from:t(a.line,s.start),to:t(a.line,s.end)}}}}function o(e,t){return i(e,d,(function(e,t){return e.getTokenAt(t)}),t)}function a(e,t){var n=e.getTokenAt(t);return t.ch==n.start+1&&"."==n.string.charAt(0)?(n.end=n.start,n.string=".",n.type="property"):/^\.[\w$_]*$/.test(n.string)&&(n.type="property",n.start++,n.string=n.string.replace(/\./,"")),n}function s(e,t){return i(e,f,a,t)}e.registerHelper("hint","javascript",o),e.registerHelper("hint","coffeescript",s);var l="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),c="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),u="prototype apply call bind".split(" "),d="break case catch class const continue debugger default delete do else export extends false finally for function if in import instanceof new null return super switch this throw true try typeof var void while with yield".split(" "),f="and break catch class continue delete do else extends false finally for if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes".split(" ");function p(e,t){if(Object.getOwnPropertyNames&&Object.getPrototypeOf)for(var n=e;n;n=Object.getPrototypeOf(n))Object.getOwnPropertyNames(n).forEach(t);else for(var r in e)t(r)}function h(e,t,i,o){var a=[],s=e.string,d=o&&o.globalScope||window;function f(e){0!=e.lastIndexOf(s,0)||r(a,e)||a.push(e)}function h(e){"string"==typeof e?n(l,f):e instanceof Array?n(c,f):e instanceof Function&&n(u,f),p(e,f)}if(t&&t.length){var m,g=t.pop();for(g.type&&0===g.type.indexOf("variable")?(o&&o.additionalContext&&(m=o.additionalContext[g.string]),o&&!1===o.useGlobalScope||(m=m||d[g.string])):"string"==g.type?m="":"atom"==g.type?m=1:"function"==g.type&&(null==d.jQuery||"$"!=g.string&&"jQuery"!=g.string||"function"!=typeof d.jQuery?null!=d._&&"_"==g.string&&"function"==typeof d._&&(m=d._()):m=d.jQuery());null!=m&&t.length;)m=m[t.pop().string];null!=m&&h(m)}else{for(var v=e.state.localVars;v;v=v.next)f(v.name);for(var y=e.state.context;y;y=y.prev)for(v=y.vars;v;v=v.next)f(v.name);for(v=e.state.globalVars;v;v=v.next)f(v.name);if(o&&null!=o.additionalContext)for(var b in o.additionalContext)f(b);o&&!1===o.useGlobalScope||h(d),n(i,f)}return a}}(n(5237))},9751(e,t,n){!function(e){"use strict";var t="CodeMirror-hint",n="CodeMirror-hint-active";function r(e,t){if(this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}}e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var i in n)r[i]=n[i];return e.showHint(r)},e.defineExtension("showHint",(function(t){t=a(this,this.getCursor("start"),t);var n=this.listSelections();if(!(n.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var i=0;i<n.length;i++)if(n[i].head.line!=n[i].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var o=this.state.completionActive=new r(this,t);o.options.hint&&(e.signal(this,"startCompletion",this),o.update(!0))}})),e.defineExtension("closeHint",(function(){this.state.completionActive&&this.state.completionActive.close()}));var i=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},o=window.cancelAnimationFrame||clearTimeout;function a(e,t,n){var r=e.options.hintOptions,i={};for(var o in h)i[o]=h[o];if(r)for(var o in r)void 0!==r[o]&&(i[o]=r[o]);if(n)for(var o in n)void 0!==n[o]&&(i[o]=n[o]);return i.hint.resolve&&(i.hint=i.hint.resolve(e,t)),i}function s(e){return"string"==typeof e?e:e.text}function l(e,t){var n={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(1-t.menuSize(),!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close};/Mac/.test(navigator.platform)&&(n["Ctrl-P"]=function(){t.moveFocus(-1)},n["Ctrl-N"]=function(){t.moveFocus(1)});var r=e.options.customKeys,i=r?{}:n;function o(e,r){var o;o="string"!=typeof r?function(e){return r(e,t)}:n.hasOwnProperty(r)?n[r]:r,i[e]=o}if(r)for(var a in r)r.hasOwnProperty(a)&&o(a,r[a]);var s=e.options.extraKeys;if(s)for(var a in s)s.hasOwnProperty(a)&&o(a,s[a]);return i}function c(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function u(r,i){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=r,this.data=i,this.picked=!1;var o=this,a=r.cm,u=a.getInputField().ownerDocument,d=u.defaultView||u.parentWindow,f=this.hints=u.createElement("ul");f.setAttribute("role","listbox"),f.setAttribute("aria-expanded","true"),f.id=this.id;var p=r.cm.options.theme;f.className="CodeMirror-hints "+p,this.selectedHint=i.selectedHint||0;for(var h=i.list,m=0;m<h.length;++m){var g=f.appendChild(u.createElement("li")),v=h[m],y=t+(m!=this.selectedHint?"":" "+n);null!=v.className&&(y=v.className+" "+y),g.className=y,m==this.selectedHint&&g.setAttribute("aria-selected","true"),g.id=this.id+"-"+m,g.setAttribute("role","option"),v.render?v.render(g,i,v):g.appendChild(u.createTextNode(v.displayText||s(v))),g.hintId=m}var b=r.options.container||u.body,x=a.cursorCoords(r.options.alignWithWord?i.from:null),k=x.left,w=x.bottom,_=!0,C=0,S=0;if(b!==u.body){var M=-1!==["absolute","relative","fixed"].indexOf(d.getComputedStyle(b).position)?b:b.offsetParent,L=M.getBoundingClientRect(),T=u.body.getBoundingClientRect();C=L.left-T.left-M.scrollLeft,S=L.top-T.top-M.scrollTop}f.style.left=k-C+"px",f.style.top=w-S+"px";var A=d.innerWidth||Math.max(u.body.offsetWidth,u.documentElement.offsetWidth),O=d.innerHeight||Math.max(u.body.offsetHeight,u.documentElement.offsetHeight);b.appendChild(f),a.getInputField().setAttribute("aria-autocomplete","list"),a.getInputField().setAttribute("aria-owns",this.id),a.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var E,N=r.options.moveOnOverlap?f.getBoundingClientRect():new DOMRect,P=!!r.options.paddingForScrollbar&&f.scrollHeight>f.clientHeight+1;if(setTimeout((function(){E=a.getScrollInfo()})),N.bottom-O>0){var F=N.bottom-N.top,D=N.top-(x.bottom-x.top)-2;O-N.top<D?(F>D&&(f.style.height=(F=D)+"px"),f.style.top=(w=x.top-F)-S+"px",_=!1):f.style.height=O-N.top-2+"px"}var z,I=N.right-A;if(P&&(I+=a.display.nativeBarWidth),I>0&&(N.right-N.left>A&&(f.style.width=A-5+"px",I-=N.right-N.left-A),f.style.left=(k=Math.max(x.left-I-C,0))+"px"),P)for(var R=f.firstChild;R;R=R.nextSibling)R.style.paddingRight=a.display.nativeBarWidth+"px";a.addKeyMap(this.keyMap=l(r,{moveFocus:function(e,t){o.changeActive(o.selectedHint+e,t)},setFocus:function(e){o.changeActive(e)},menuSize:function(){return o.screenAmount()},length:h.length,close:function(){r.close()},pick:function(){o.pick()},data:i})),r.options.closeOnUnfocus&&(a.on("blur",this.onBlur=function(){z=setTimeout((function(){r.close()}),100)}),a.on("focus",this.onFocus=function(){clearTimeout(z)})),a.on("scroll",this.onScroll=function(){var e=a.getScrollInfo(),t=a.getWrapperElement().getBoundingClientRect();E||(E=a.getScrollInfo());var n=w+E.top-e.top,i=n-(d.pageYOffset||(u.documentElement||u.body).scrollTop);if(_||(i+=f.offsetHeight),i<=t.top||i>=t.bottom)return r.close();f.style.top=n+"px",f.style.left=k+E.left-e.left+"px"}),e.on(f,"dblclick",(function(e){var t=c(f,e.target||e.srcElement);t&&null!=t.hintId&&(o.changeActive(t.hintId),o.pick())})),e.on(f,"click",(function(e){var t=c(f,e.target||e.srcElement);t&&null!=t.hintId&&(o.changeActive(t.hintId),r.options.completeOnSingleClick&&o.pick())})),e.on(f,"mousedown",(function(){setTimeout((function(){a.focus()}),20)}));var q=this.getSelectedHintRange();return 0===q.from&&0===q.to||this.scrollToActive(),e.signal(i,"select",h[this.selectedHint],f.childNodes[this.selectedHint]),!0}function d(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r<t.length;r++)t[r].supportsSelection&&n.push(t[r]);return n}function f(e,t,n,r){if(e.async)e(t,r,n);else{var i=e(t,n);i&&i.then?i.then(r):r(i)}}function p(t,n){var r,i=t.getHelpers(n,"hint");if(i.length){var o=function(e,t,n){var r=d(e,i);function o(i){if(i==r.length)return t(null);f(r[i],e,n,(function(e){e&&e.list.length>0?t(e):o(i+1)}))}o(0)};return o.async=!0,o.supportsSelection=!0,o}return(r=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:r})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}r.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var r=t.list[n],i=this;this.cm.operation((function(){r.hint?r.hint(i.cm,t,r):i.cm.replaceRange(s(r),r.from||t.from,r.to||t.to,"complete"),e.signal(t,"pick",r),i.cm.scrollIntoView()})),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(o(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),n=this.cm.getLine(t.line);if(t.line!=this.startPos.line||n.length-t.ch!=this.startLen-this.startPos.ch||t.ch<e.ch||this.cm.somethingSelected()||!t.ch||this.options.closeCharacters.test(n.charAt(t.ch-1)))this.close();else{var r=this;this.debounce=i((function(){r.update()})),this.widget&&this.widget.disable()}},update:function(e){if(null!=this.tick){var t=this,n=++this.tick;f(this.options.hint,this.cm,this.options,(function(r){t.tick==n&&t.finishUpdate(r,e)}))}},finishUpdate:function(t,n){this.data&&e.signal(this.data,"update");var r=this.widget&&this.widget.picked||n&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=t,t&&t.list.length&&(r&&1==t.list.length?this.pick(t,0):(this.widget=new u(this,t),e.signal(t,"shown")))}},u.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var e=this.completion.cm.getInputField();e.removeAttribute("aria-activedescendant"),e.removeAttribute("aria-owns");var t=this.completion.cm;this.completion.options.closeOnUnfocus&&(t.off("blur",this.onBlur),t.off("focus",this.onFocus)),t.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var e=this;this.keyMap={Enter:function(){e.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,r){if(t>=this.data.list.length?t=r?this.data.list.length-1:0:t<0&&(t=r?0:this.data.list.length-1),this.selectedHint!=t){var i=this.hints.childNodes[this.selectedHint];i&&(i.className=i.className.replace(" "+n,""),i.removeAttribute("aria-selected")),(i=this.hints.childNodes[this.selectedHint=t]).className+=" "+n,i.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",i.id),this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],i)}},scrollToActive:function(){var e=this.getSelectedHintRange(),t=this.hints.childNodes[e.from],n=this.hints.childNodes[e.to],r=this.hints.firstChild;t.offsetTop<this.hints.scrollTop?this.hints.scrollTop=t.offsetTop-r.offsetTop:n.offsetTop+n.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+r.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var e=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-e),to:Math.min(this.data.list.length-1,this.selectedHint+e)}}},e.registerHelper("hint","auto",{resolve:p}),e.registerHelper("hint","fromList",(function(t,n){var r,i=t.getCursor(),o=t.getTokenAt(i),a=e.Pos(i.line,o.start),s=i;o.start<i.ch&&/\w/.test(o.string.charAt(i.ch-o.start-1))?r=o.string.substr(0,i.ch-o.start):(r="",a=i);for(var l=[],c=0;c<n.words.length;c++){var u=n.words[c];u.slice(0,r.length)==r&&l.push(u)}if(l.length)return{list:l,from:a,to:s}})),e.commands.autocomplete=e.showHint;var h={hint:e.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};e.defineOption("hintOptions",null)}(n(5237))},9102(e,t,n){!function(e){"use strict";var t,n,r,i,o={QUERY_DIV:";",ALIAS_KEYWORD:"AS"},a=e.Pos,s=e.cmpPos;function l(e){return"[object Array]"==Object.prototype.toString.call(e)}function c(t,n){return t.getModeAt(t.getCursor()).config[n]||e.resolveMode("text/x-sql")[n]}function u(e){return c(e,"keywords")||[]}function d(e){return c(e,"identifierQuote")||"`"}function f(e){return"string"==typeof e?e:e.text}function p(e,t){return l(t)&&(t={columns:t}),t.text||(t.text=e),t}function h(e){var t={};if(l(e))for(var n=e.length-1;n>=0;n--){var r=e[n];t[f(r).toUpperCase()]=p(f(r),r)}else if(e)for(var i in e)t[i.toUpperCase()]=p(i,e[i]);return t}function m(e){return t[e.toUpperCase()]}function g(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function v(e,t){var n=e.length,r=f(t).substr(0,n);return e.toUpperCase()===r.toUpperCase()}function y(e,t,n,r){if(l(n))for(var i=0;i<n.length;i++)v(t,n[i])&&e.push(r(n[i]));else for(var o in n)if(n.hasOwnProperty(o)){var a=n[o];v(t,a=a&&!0!==a?a.displayText?{text:a.text,displayText:a.displayText}:a.text:o)&&e.push(r(a))}}function b(e){"."==e.charAt(0)&&(e=e.substr(1));for(var t=e.split(i+i),n=0;n<t.length;n++)t[n]=t[n].replace(new RegExp(i,"g"),"");return t.join(i)}function x(e){for(var t=f(e).split("."),n=0;n<t.length;n++)t[n]=i+t[n].replace(new RegExp(i,"g"),i+i)+i;var r=t.join(".");return"string"==typeof e?r:((e=g(e)).text=r,e)}function k(e,r,o,s){for(var l=!1,c=[],u=r.start,d=!0;d;)d="."==r.string.charAt(0),l=l||r.string.charAt(0)==i,u=r.start,c.unshift(b(r.string)),"."==(r=s.getTokenAt(a(e.line,r.start))).string&&(d=!0,r=s.getTokenAt(a(e.line,r.start)));var f=c.join(".");y(o,f,t,(function(e){return l?x(e):e})),y(o,f,n,(function(e){return l?x(e):e})),f=c.pop();var p=c.join("."),h=!1,v=p;if(!m(p)){var k=p;(p=_(p,s))!==k&&(h=!0)}var w=m(p);return w&&w.columns&&(w=w.columns),w&&y(o,f,w,(function(e){var t=p;return 1==h&&(t=v),"string"==typeof e?e=t+"."+e:(e=g(e)).text=t+"."+e.text,l?x(e):e})),u}function w(e,t){for(var n=e.split(/\s+/),r=0;r<n.length;r++)n[r]&&t(n[r].replace(/[`,;]/g,""))}function _(e,t){for(var n=t.doc,r=n.getValue(),i=e.toUpperCase(),l="",c="",u=[],d={start:a(0,0),end:a(t.lastLine(),t.getLineHandle(t.lastLine()).length)},f=r.indexOf(o.QUERY_DIV);-1!=f;)u.push(n.posFromIndex(f)),f=r.indexOf(o.QUERY_DIV,f+1);u.unshift(a(0,0)),u.push(a(t.lastLine(),t.getLineHandle(t.lastLine()).text.length));for(var p=null,h=t.getCursor(),g=0;g<u.length;g++){if((null==p||s(h,p)>0)&&s(h,u[g])<=0){d={start:p,end:u[g]};break}p=u[g]}if(d.start){var v=n.getRange(d.start,d.end,!1);for(g=0;g<v.length&&(w(v[g],(function(e){var t=e.toUpperCase();t===i&&m(l)&&(c=l),t!==o.ALIAS_KEYWORD&&(l=e)})),!c);g++);}return c}e.registerHelper("hint","sql",(function(e,o){t=h(o&&o.tables);var s=o&&o.defaultTable,l=o&&o.disableKeywords;n=s&&m(s),r=u(e),i=d(e),s&&!n&&(n=_(s,e)),(n=n||[]).columns&&(n=n.columns);var c,f,p,g=e.getCursor(),v=[],b=e.getTokenAt(g);if(b.end>g.ch&&(b.end=g.ch,b.string=b.string.slice(0,g.ch-b.start)),b.string.match(/^[.`"'\w@][\w$#]*$/g)?(p=b.string,c=b.start,f=b.end):(c=f=g.ch,p=""),"."==p.charAt(0)||p.charAt(0)==i)c=k(g,b,v,e);else{var x=function(e,t){return"object"==typeof e?e.className=t:e={text:e,className:t},e};y(v,p,n,(function(e){return x(e,"CodeMirror-hint-table CodeMirror-hint-default-table")})),y(v,p,t,(function(e){return x(e,"CodeMirror-hint-table")})),l||y(v,p,r,(function(e){return x(e.toUpperCase(),"CodeMirror-hint-keyword")}))}return{list:v,from:a(g.line,c),to:a(g.line,f)}}))}(n(5237),n(9532))},149(e,t,n){!function(e){"use strict";var t=e.Pos;function n(e,t,n){return n?e.indexOf(t)>=0:0==e.lastIndexOf(t,0)}function r(r,i){var o=i&&i.schemaInfo,a=i&&i.quoteChar||'"',s=i&&i.matchInMiddle;if(o){var l=r.getCursor(),c=r.getTokenAt(l);if(c.end>l.ch&&(c.end=l.ch,c.string=c.string.slice(0,l.ch-c.start)),(b=e.innerMode(r.getMode(),c.state)).mode.xmlCurrentTag){var u,d,f=[],p=!1,h=/\btag\b/.test(c.type)&&!/>$/.test(c.string),m=h&&/^\w/.test(c.string);if(m){var g=r.getLine(l.line).slice(Math.max(0,c.start-2),c.start),v=/<\/$/.test(g)?"close":/<$/.test(g)?"open":null;v&&(d=c.start-("close"==v?2:1))}else h&&"<"==c.string?v="open":h&&"</"==c.string&&(v="close");var y=b.mode.xmlCurrentTag(b.state);if(!h&&!y||v){m&&(u=c.string),p=v;var b,x=b.mode.xmlCurrentContext?b.mode.xmlCurrentContext(b.state):[],k=(b=x.length&&x[x.length-1])&&o[b],w=b?k&&k.children:o["!top"];if(w&&"close"!=v)for(var _=0;_<w.length;++_)u&&!n(w[_],u,s)||f.push("<"+w[_]);else if("close"!=v)for(var C in o)!o.hasOwnProperty(C)||"!top"==C||"!attrs"==C||u&&!n(C,u,s)||f.push("<"+C);b&&(!u||"close"==v&&n(b,u,s))&&f.push("</"+b+">")}else{var S=(k=y&&o[y.name])&&k.attrs,M=o["!attrs"];if(!S&&!M)return;if(S){if(M){var L={};for(var T in M)M.hasOwnProperty(T)&&(L[T]=M[T]);for(var T in S)S.hasOwnProperty(T)&&(L[T]=S[T]);S=L}}else S=M;if("string"==c.type||"="==c.string){var A,O=(g=r.getRange(t(l.line,Math.max(0,l.ch-60)),t(l.line,"string"==c.type?c.start:c.end))).match(/([^\s\u00a0=<>\"\']+)=$/);if(!O||!S.hasOwnProperty(O[1])||!(A=S[O[1]]))return;if("function"==typeof A&&(A=A.call(this,r)),"string"==c.type){u=c.string;var E=0;/['"]/.test(c.string.charAt(0))&&(a=c.string.charAt(0),u=c.string.slice(1),E++);var N=c.string.length;if(/['"]/.test(c.string.charAt(N-1))&&(a=c.string.charAt(N-1),u=c.string.substr(E,N-2)),E){var P=r.getLine(l.line);P.length>c.end&&P.charAt(c.end)==a&&c.end++}p=!0}var F=function(e){if(e)for(var t=0;t<e.length;++t)u&&!n(e[t],u,s)||f.push(a+e[t]+a);return z()};return A&&A.then?A.then(F):F(A)}for(var D in"attribute"==c.type&&(u=c.string,p=!0),S)!S.hasOwnProperty(D)||u&&!n(D,u,s)||f.push(D)}return z()}}function z(){return{list:f,from:p?t(l.line,null==d?c.start:d):l,to:p?t(l.line,c.end):l}}}e.registerHelper("hint","xml",r)}(n(5237))},9279(e,t,n){!function(e){"use strict";e.registerHelper("lint","css",(function(t,n){var r=[];if(!window.CSSLint)return window.console&&window.console.error("Error: window.CSSLint not defined, CodeMirror CSS linting cannot run."),r;for(var i=CSSLint.verify(t,n).messages,o=null,a=0;a<i.length;a++){var s=(o=i[a]).line-1,l=o.line-1,c=o.col-1,u=o.col;r.push({from:e.Pos(s,c),to:e.Pos(l,u),message:o.message,severity:o.type})}return r}))}(n(5237))},6015(e,t,n){!function(e,t){"use strict";var n={"tagname-lowercase":!0,"attr-lowercase":!0,"attr-value-double-quotes":!0,"doctype-first":!1,"tag-pair":!0,"spec-char-escape":!0,"id-unique":!0,"src-not-empty":!0,"attr-no-duplication":!0};e.registerHelper("lint","html",(function(r,i){var o=[];if(t&&!t.verify&&(t=void 0!==t.default?t.default:t.HTMLHint),t||(t=window.HTMLHint),!t)return window.console&&window.console.error("Error: HTMLHint not found, not defined on window, or not available through define/require, CodeMirror HTML linting cannot run."),o;for(var a=t.verify(r,i&&i.rules||n),s=0;s<a.length;s++){var l=a[s],c=l.line-1,u=l.line-1,d=l.col-1,f=l.col;o.push({from:e.Pos(c,d),to:e.Pos(u,f),message:l.message,severity:l.type})}return o}))}(n(5237),n(6899))},2154(e,t,n){!function(e){"use strict";e.registerHelper("lint","json",(function(t){var n=[];if(!window.jsonlint)return window.console&&window.console.error("Error: window.jsonlint not defined, CodeMirror JSON linting cannot run."),n;var r=window.jsonlint.parser||window.jsonlint;r.parseError=function(t,r){var i=r.loc;n.push({from:e.Pos(i.first_line-1,i.first_column),to:e.Pos(i.last_line-1,i.last_column),message:t})};try{r.parse(t)}catch(e){}return n}))}(n(5237))},1561(e,t,n){!function(e){"use strict";var t="CodeMirror-lint-markers",n="CodeMirror-lint-line-";function r(t,n,r){var i=document.createElement("div");function o(t){if(!i.parentNode)return e.off(document,"mousemove",o);var n=Math.max(0,t.clientY-i.offsetHeight-5),r=Math.max(0,Math.min(t.clientX+5,i.ownerDocument.defaultView.innerWidth-i.offsetWidth));i.style.top=n+"px",i.style.left=r+"px"}return i.className="CodeMirror-lint-tooltip cm-s-"+t.options.theme,i.appendChild(r.cloneNode(!0)),t.state.lint.options.selfContain?t.getWrapperElement().appendChild(i):document.body.appendChild(i),e.on(document,"mousemove",o),o(n),null!=i.style.opacity&&(i.style.opacity=1),i}function i(e){e.parentNode&&e.parentNode.removeChild(e)}function o(e){e.parentNode&&(null==e.style.opacity&&i(e),e.style.opacity=0,setTimeout((function(){i(e)}),600))}function a(t,n,i,a){var s=r(t,n,i);function l(){e.off(a,"mouseout",l),s&&(o(s),s=null)}var c=setInterval((function(){if(s)for(var e=a;;e=e.parentNode){if(e&&11==e.nodeType&&(e=e.host),e==document.body)return;if(!e){l();break}}if(!s)return clearInterval(c)}),400);e.on(a,"mouseout",l)}function s(e,t,n){for(var r in this.marked=[],t instanceof Function&&(t={getAnnotations:t}),t&&!0!==t||(t={}),this.options={},this.linterOptions=t.options||{},l)this.options[r]=l[r];for(var r in t)l.hasOwnProperty(r)?null!=t[r]&&(this.options[r]=t[r]):t.options||(this.linterOptions[r]=t[r]);this.timeout=null,this.hasGutter=n,this.onMouseOver=function(t){x(e,t)},this.waitingFor=0}var l={highlightLines:!1,tooltips:!0,delay:500,lintOnChange:!0,getAnnotations:null,async:!1,selfContain:null,formatAnnotation:null,onUpdateLinting:null};function c(e){var n=e.state.lint;n.hasGutter&&e.clearGutter(t),n.options.highlightLines&&u(e);for(var r=0;r<n.marked.length;++r)n.marked[r].clear();n.marked.length=0}function u(e){e.eachLine((function(t){var n=t.wrapClass&&/\bCodeMirror-lint-line-\w+\b/.exec(t.wrapClass);n&&e.removeLineClass(t,"wrap",n[0])}))}function d(t,n,r,i,o){var s=document.createElement("div"),l=s;return s.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+r,i&&((l=s.appendChild(document.createElement("div"))).className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),0!=o&&e.on(l,"mouseover",(function(e){a(t,e,n,l)})),s}function f(e,t){return"error"==e?e:t}function p(e){for(var t=[],n=0;n<e.length;++n){var r=e[n],i=r.from.line;(t[i]||(t[i]=[])).push(r)}return t}function h(e){var t=e.severity;t||(t="error");var n=document.createElement("div");return n.className="CodeMirror-lint-message CodeMirror-lint-message-"+t,void 0!==e.messageHTML?n.innerHTML=e.messageHTML:n.appendChild(document.createTextNode(e.message)),n}function m(t,n){var r=t.state.lint,i=++r.waitingFor;function o(){i=-1,t.off("change",o)}t.on("change",o),n(t.getValue(),(function(n,a){t.off("change",o),r.waitingFor==i&&(a&&n instanceof e&&(n=a),t.operation((function(){v(t,n)})))}),r.linterOptions,t)}function g(t){var n=t.state.lint;if(n){var r=n.options,i=r.getAnnotations||t.getHelper(e.Pos(0,0),"lint");if(i)if(r.async||i.async)m(t,i);else{var o=i(t.getValue(),n.linterOptions,t);if(!o)return;o.then?o.then((function(e){t.operation((function(){v(t,e)}))})):t.operation((function(){v(t,o)}))}}}function v(e,r){var i=e.state.lint;if(i){var o=i.options;c(e);for(var a=p(r),s=0;s<a.length;++s){var l=a[s];if(l){for(var u=null,m=i.hasGutter&&document.createDocumentFragment(),g=0;g<l.length;++g){var v=l[g],y=v.severity;y||(y="error"),u=f(u,y),o.formatAnnotation&&(v=o.formatAnnotation(v)),i.hasGutter&&m.appendChild(h(v)),v.to&&i.marked.push(e.markText(v.from,v.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+y,__annotation:v}))}i.hasGutter&&e.setGutterMarker(s,t,d(e,m,u,l.length>1,o.tooltips)),o.highlightLines&&e.addLineClass(s,"wrap",n+u)}}o.onUpdateLinting&&o.onUpdateLinting(r,a,e)}}function y(e){var t=e.state.lint;t&&(clearTimeout(t.timeout),t.timeout=setTimeout((function(){g(e)}),t.options.delay))}function b(e,t,n){for(var r=n.target||n.srcElement,i=document.createDocumentFragment(),o=0;o<t.length;o++){var s=t[o];i.appendChild(h(s))}a(e,n,i,r)}function x(e,t){var n=t.target||t.srcElement;if(/\bCodeMirror-lint-mark-/.test(n.className)){for(var r=n.getBoundingClientRect(),i=(r.left+r.right)/2,o=(r.top+r.bottom)/2,a=e.findMarksAt(e.coordsChar({left:i,top:o},"client")),s=[],l=0;l<a.length;++l){var c=a[l].__annotation;c&&s.push(c)}s.length&&b(e,s,t)}}e.defineOption("lint",!1,(function(n,r,i){if(i&&i!=e.Init&&(c(n),!1!==n.state.lint.options.lintOnChange&&n.off("change",y),e.off(n.getWrapperElement(),"mouseover",n.state.lint.onMouseOver),clearTimeout(n.state.lint.timeout),delete n.state.lint),r){for(var o=n.getOption("gutters"),a=!1,l=0;l<o.length;++l)o[l]==t&&(a=!0);var u=n.state.lint=new s(n,r,a);u.options.lintOnChange&&n.on("change",y),0!=u.options.tooltips&&"gutter"!=u.options.tooltips&&e.on(n.getWrapperElement(),"mouseover",u.onMouseOver),g(n)}})),e.defineExtension("performLint",(function(){g(this)}))}(n(5237))},1909(e,t,n){!function(e){"use strict";var t=e.Pos,n="http://www.w3.org/2000/svg";function r(e,t){this.mv=e,this.type=t,this.classes="left"==t?{chunk:"CodeMirror-merge-l-chunk",start:"CodeMirror-merge-l-chunk-start",end:"CodeMirror-merge-l-chunk-end",insert:"CodeMirror-merge-l-inserted",del:"CodeMirror-merge-l-deleted",connect:"CodeMirror-merge-l-connect"}:{chunk:"CodeMirror-merge-r-chunk",start:"CodeMirror-merge-r-chunk-start",end:"CodeMirror-merge-r-chunk-end",insert:"CodeMirror-merge-r-inserted",del:"CodeMirror-merge-r-deleted",connect:"CodeMirror-merge-r-connect"}}function i(t){t.diffOutOfDate&&(t.diff=O(t.orig.getValue(),t.edit.getValue(),t.mv.options.ignoreWhitespace),t.chunks=E(t.diff),t.diffOutOfDate=!1,e.signal(t.edit,"updateDiff",t.diff))}r.prototype={constructor:r,init:function(t,n,r){this.edit=this.mv.edit,(this.edit.state.diffViews||(this.edit.state.diffViews=[])).push(this),this.orig=e(t,j({value:n,readOnly:!this.mv.options.allowEditingOriginals},j(r))),"align"==this.mv.options.connect&&(this.edit.state.trackAlignable||(this.edit.state.trackAlignable=new V(this.edit)),this.orig.state.trackAlignable=new V(this.orig)),this.lockButton.title=this.edit.phrase("Toggle locked scrolling"),this.lockButton.setAttribute("aria-label",this.lockButton.title),this.orig.state.diffViews=[this];var i=r.chunkClassLocation||"background";"[object Array]"!=Object.prototype.toString.call(i)&&(i=[i]),this.classes.classLocation=i,this.diff=O(A(n),A(r.value),this.mv.options.ignoreWhitespace),this.chunks=E(this.diff),this.diffOutOfDate=this.dealigned=!1,this.needsScrollSync=null,this.showDifferences=!1!==r.showDifferences},registerEvents:function(e){this.forceUpdate=a(this),u(this,!0,!1),s(this,e)},setShowDifferences:function(e){(e=!1!==e)!=this.showDifferences&&(this.showDifferences=e,this.forceUpdate("full"))}};var o=!1;function a(t){var n,r={from:0,to:0,marked:[]},a={from:0,to:0,marked:[]},s=!1;function c(e){o=!0,s=!1,"full"==e&&(t.svg&&B(t.svg),t.copyButtons&&B(t.copyButtons),f(t.edit,r.marked,t.classes),f(t.orig,a.marked,t.classes),r.from=r.to=a.from=a.to=0),i(t),t.showDifferences&&(p(t.edit,t.diff,r,DIFF_INSERT,t.classes),p(t.orig,t.diff,a,DIFF_DELETE,t.classes)),"align"==t.mv.options.connect&&k(t),g(t),null!=t.needsScrollSync&&l(t,t.needsScrollSync),o=!1}function u(e){o||(t.dealigned=!0,d(e))}function d(e){o||s||(clearTimeout(n),!0===e&&(s=!0),n=setTimeout(c,!0===e?20:250))}function h(e,n){t.diffOutOfDate||(t.diffOutOfDate=!0,r.from=r.to=a.from=a.to=0),u(n.text.length-1!=n.to.line-n.from.line)}function m(){t.diffOutOfDate=!0,t.dealigned=!0,c("full")}return t.edit.on("change",h),t.orig.on("change",h),t.edit.on("swapDoc",m),t.orig.on("swapDoc",m),"align"==t.mv.options.connect&&(e.on(t.edit.state.trackAlignable,"realign",u),e.on(t.orig.state.trackAlignable,"realign",u)),t.edit.on("viewportChange",(function(){d(!1)})),t.orig.on("viewportChange",(function(){d(!1)})),c(),c}function s(e,t){e.edit.on("scroll",(function(){l(e,!0)&&g(e)})),e.orig.on("scroll",(function(){l(e,!1)&&g(e),t&&l(t,!0)&&g(t)}))}function l(e,t){if(e.diffOutOfDate)return e.lockScroll&&null==e.needsScrollSync&&(e.needsScrollSync=t),!1;if(e.needsScrollSync=null,!e.lockScroll)return!0;var n,r,i=+new Date;if(t?(n=e.edit,r=e.orig):(n=e.orig,r=e.edit),n.state.scrollSetBy==e&&(n.state.scrollSetAt||0)+250>i)return!1;var o=n.getScrollInfo();if("align"==e.mv.options.connect)g=o.top;else{var a,s,l=.5*o.clientHeight,u=o.top+l,d=n.lineAtHeight(u,"local"),f=F(e.chunks,d,t),p=c(n,t?f.edit:f.orig),h=c(r,t?f.orig:f.edit),m=(u-p.top)/(p.bot-p.top),g=h.top-l+m*(h.bot-h.top);if(g>o.top&&(s=o.top/l)<1)g=g*s+o.top*(1-s);else if((a=o.height-o.clientHeight-o.top)<l){var v=r.getScrollInfo();v.height-v.clientHeight-g>a&&(s=a/l)<1&&(g=g*s+(v.height-v.clientHeight-a)*(1-s))}}return r.scrollTo(o.left,g),r.state.scrollSetAt=i,r.state.scrollSetBy=e,!0}function c(e,t){var n=t.after;return null==n&&(n=e.lastLine()+1),{top:e.heightAtLine(t.before||0,"local"),bot:e.heightAtLine(n,"local")}}function u(t,n,r){t.lockScroll=n,n&&0!=r&&l(t,DIFF_INSERT)&&g(t),(n?e.addClass:e.rmClass)(t.lockButton,"CodeMirror-merge-scrolllock-enabled")}function d(e,t,n){for(var r=n.classLocation,i=0;i<r.length;i++)e.removeLineClass(t,r[i],n.chunk),e.removeLineClass(t,r[i],n.start),e.removeLineClass(t,r[i],n.end)}function f(t,n,r){for(var i=0;i<n.length;++i){var o=n[i];o instanceof e.TextMarker?o.clear():o.parent&&d(t,o,r)}n.length=0}function p(e,t,n,r,i){var o=e.getViewport();e.operation((function(){n.from==n.to||o.from-n.to>20||n.from-o.to>20?(f(e,n.marked,i),m(e,t,r,n.marked,o.from,o.to,i),n.from=o.from,n.to=o.to):(o.from<n.from&&(m(e,t,r,n.marked,o.from,n.from,i),n.from=o.from),o.to>n.to&&(m(e,t,r,n.marked,n.to,o.to,i),n.to=o.to))}))}function h(e,t,n,r,i,o){for(var a=n.classLocation,s=e.getLineHandle(t),l=0;l<a.length;l++)r&&e.addLineClass(s,a[l],n.chunk),i&&e.addLineClass(s,a[l],n.start),o&&e.addLineClass(s,a[l],n.end);return s}function m(e,n,r,i,o,a,s){var l=t(0,0),c=t(o,0),u=e.clipPos(t(a-1)),d=r==DIFF_DELETE?s.del:s.insert;function f(t,n){for(var r=Math.max(o,t),l=Math.min(a,n),c=r;c<l;++c)i.push(h(e,c,s,!0,c==t,c==n-1));t==n&&r==n&&l==n&&(r?i.push(h(e,r-1,s,!1,!1,!0)):i.push(h(e,r,s,!1,!0,!1)))}for(var p=0,m=!1,g=0;g<n.length;++g){var v=n[g],y=v[0],b=v[1];if(y==DIFF_EQUAL){var x=l.line+(P(n,g)?0:1);W(l,b);var k=l.line+(N(n,g)?1:0);k>x&&(m&&(f(p,x),m=!1),p=k)}else if(m=!0,y==r){var w=W(l,b,!0),_=X(c,l),C=G(u,w);Q(_,C)||i.push(e.markText(_,C,{className:d})),l=w}}m&&f(p,l.line+1)}function g(e){if(e.showDifferences){if(e.svg){B(e.svg);var t=e.gap.offsetWidth;H(e.svg,"width",t,"height",e.gap.offsetHeight)}e.copyButtons&&B(e.copyButtons);for(var n=e.edit.getViewport(),r=e.orig.getViewport(),i=e.mv.wrap.getBoundingClientRect().top,o=i-e.edit.getScrollerElement().getBoundingClientRect().top+e.edit.getScrollInfo().top,a=i-e.orig.getScrollerElement().getBoundingClientRect().top+e.orig.getScrollInfo().top,s=0;s<e.chunks.length;s++){var l=e.chunks[s];l.editFrom<=n.to&&l.editTo>=n.from&&l.origFrom<=r.to&&l.origTo>=r.from&&C(e,l,a,o,t)}}}function v(e,t){for(var n=0,r=0,i=0;i<t.length;i++){var o=t[i];if(o.editTo>e&&o.editFrom<=e)return null;if(o.editFrom>e)break;n=o.editTo,r=o.origTo}return r+(e-n)}function y(e,t,n){for(var r=e.state.trackAlignable,i=e.firstLine(),o=0,a=[],s=0;;s++){for(var l=t[s],c=l?n?l.origFrom:l.editFrom:1e9;o<r.alignable.length;o+=2){var u=r.alignable[o]+1;if(!(u<=i)){if(!(u<=c))break;a.push(u)}}if(!l)break;a.push(i=n?l.origTo:l.editTo)}return a}function b(e,t,n,r){var i=0,o=0,a=0,s=0;e:for(;;i++){var l=e[i],c=t[o];if(!l&&null==c)break;for(var u=l?l[0]:1e9,d=null==c?1e9:c;a<n.length;){var f=n[a];if(f.origFrom<=d&&f.origTo>d){o++,i--;continue e}if(f.editTo>u){if(f.editFrom<=u)continue e;break}s+=f.origTo-f.origFrom-(f.editTo-f.editFrom),a++}if(u==d-s)l[r]=d,o++;else if(u<d-s)l[r]=u+s;else{var p=[d-s,null,null];p[r]=d,e.splice(i,0,p),o++}}}function x(e,t){var n=y(e.edit,e.chunks,!1),r=[];if(t)for(var i=0,o=0;i<t.chunks.length;i++){for(var a=t.chunks[i].editTo;o<n.length&&n[o]<a;)o++;o!=n.length&&n[o]==a||n.splice(o++,0,a)}for(i=0;i<n.length;i++)r.push([n[i],null,null]);return b(r,y(e.orig,e.chunks,!0),e.chunks,1),t&&b(r,y(t.orig,t.chunks,!0),t.chunks,2),r}function k(e,t){if(e.dealigned||t){if(!e.orig.curOp)return e.orig.operation((function(){k(e,t)}));e.dealigned=!1;var n=e.mv.left==e?e.mv.right:e.mv.left;n&&(i(n),n.dealigned=!1);for(var r=x(e,n),o=e.mv.aligners,a=0;a<o.length;a++)o[a].clear();o.length=0;var s=[e.edit,e.orig],l=[],c=[];for(n&&s.push(n.orig),a=0;a<s.length;a++)l.push(s[a].getScrollInfo().top),c.push(-s[a].getScrollerElement().getBoundingClientRect().top);(c[0]!=c[1]||3==s.length&&c[1]!=c[2])&&w(s,c,[0,0,0],o);for(var u=0;u<r.length;u++)w(s,c,r[u],o);for(a=0;a<s.length;a++)s[a].scrollTo(null,l[a])}}function w(e,t,n,r){for(var i=-1e8,o=[],a=0;a<e.length;a++)if(null!=n[a]){var s=e[a].heightAtLine(n[a],"local")-t[a];o[a]=s,i=Math.max(i,s)}for(a=0;a<e.length;a++)if(null!=n[a]){var l=i-o[a];l>1&&r.push(_(e[a],n[a],l))}}function _(e,t,n){var r=!0;t>e.lastLine()&&(t--,r=!1);var i=document.createElement("div");return i.className="CodeMirror-merge-spacer",i.style.height=n+"px",i.style.minWidth="1px",e.addLineWidget(t,i,{height:n,above:r,mergeSpacer:!0,handleMouseEvents:!0})}function C(e,t,r,i,o){var a="left"==e.type,s=e.orig.heightAtLine(t.origFrom,"local",!0)-r;if(e.svg){var l=s,c=e.edit.heightAtLine(t.editFrom,"local",!0)-i;if(a){var u=l;l=c,c=u}var d=e.orig.heightAtLine(t.origTo,"local",!0)-r,f=e.edit.heightAtLine(t.editTo,"local",!0)-i;a&&(u=d,d=f,f=u);var p=" C "+o/2+" "+c+" "+o/2+" "+l+" "+(o+2)+" "+l,h=" C "+o/2+" "+d+" "+o/2+" "+f+" -1 "+f;H(e.svg.appendChild(document.createElementNS(n,"path")),"d","M -1 "+c+p+" L "+(o+2)+" "+d+h+" z","class",e.classes.connect)}if(e.copyButtons){var m=e.copyButtons.appendChild(q("div","left"==e.type?"â‡":"â‡œ","CodeMirror-merge-copy")),g=e.mv.options.allowEditingOriginals;if(m.title=e.edit.phrase(g?"Push to left":"Revert chunk"),m.chunk=t,m.style.top=(t.origTo>t.origFrom?s:e.edit.heightAtLine(t.editFrom,"local")-i)+"px",m.setAttribute("role","button"),m.setAttribute("tabindex","0"),m.setAttribute("aria-label",m.title),g){var v=e.edit.heightAtLine(t.editFrom,"local")-i,y=e.copyButtons.appendChild(q("div","right"==e.type?"â‡":"â‡œ","CodeMirror-merge-copy-reverse"));y.title="Push to right",y.chunk={editFrom:t.origFrom,editTo:t.origTo,origFrom:t.editFrom,origTo:t.editTo},y.style.top=v+"px","right"==e.type?y.style.left="2px":y.style.right="2px",y.setAttribute("role","button"),y.setAttribute("tabindex","0"),y.setAttribute("aria-label",y.title)}}}function S(e,n,r,i){if(!e.diffOutOfDate){var o=i.origTo>r.lastLine()?t(i.origFrom-1):t(i.origFrom,0),a=t(i.origTo,0),s=i.editTo>n.lastLine()?t(i.editFrom-1):t(i.editFrom,0),l=t(i.editTo,0),c=e.mv.options.revertChunk;c?c(e.mv,r,o,a,n,s,l):n.replaceRange(r.getRange(o,a),s,l)}}var M,L=e.MergeView=function(t,n){if(!(this instanceof L))return new L(t,n);this.options=n;var i=n.origLeft,o=null==n.origRight?n.orig:n.origRight,a=null!=i,s=null!=o,l=1+(a?1:0)+(s?1:0),c=[],u=this.left=null,d=this.right=null,f=this;if(a){u=this.left=new r(this,"left");var p=q("div",null,"CodeMirror-merge-pane CodeMirror-merge-left");c.push(p),c.push(T(u))}var h=q("div",null,"CodeMirror-merge-pane CodeMirror-merge-editor");if(c.push(h),s){d=this.right=new r(this,"right"),c.push(T(d));var m=q("div",null,"CodeMirror-merge-pane CodeMirror-merge-right");c.push(m)}(s?m:h).className+=" CodeMirror-merge-pane-rightmost",c.push(q("div",null,null,"height: 0; clear: both;"));var v=this.wrap=t.appendChild(q("div",c,"CodeMirror-merge CodeMirror-merge-"+l+"pane"));this.edit=e(h,j(n)),u&&u.init(p,i,n),d&&d.init(m,o,n),n.collapseIdentical&&this.editor().operation((function(){R(f,n.collapseIdentical)})),"align"==n.connect&&(this.aligners=[],k(this.left||this.right,!0)),u&&u.registerEvents(d),d&&d.registerEvents(u);var y=function(){u&&g(u),d&&g(d)};e.on(window,"resize",y);var b=setInterval((function(){for(var t=v.parentNode;t&&t!=document.body;t=t.parentNode);t||(clearInterval(b),e.off(window,"resize",y))}),5e3)};function T(t){var r=t.lockButton=q("div",null,"CodeMirror-merge-scrolllock");r.setAttribute("role","button"),r.setAttribute("tabindex","0");var i=q("div",[r],"CodeMirror-merge-scrolllock-wrap");e.on(r,"click",(function(){u(t,!t.lockScroll)})),e.on(r,"keyup",(function(e){("Enter"===e.key||"Space"===e.code)&&u(t,!t.lockScroll)}));var o=[i];if(!1!==t.mv.options.revertButtons){t.copyButtons=q("div",null,"CodeMirror-merge-copybuttons-"+t.type);var a=function(e){var n=e.target||e.srcElement;n.chunk&&("CodeMirror-merge-copy-reverse"!=n.className?S(t,t.edit,t.orig,n.chunk):S(t,t.orig,t.edit,n.chunk))};e.on(t.copyButtons,"click",a),e.on(t.copyButtons,"keyup",(function(e){("Enter"===e.key||"Space"===e.code)&&a(e)})),o.unshift(t.copyButtons)}if("align"!=t.mv.options.connect){var s=document.createElementNS&&document.createElementNS(n,"svg");s&&!s.createSVGRect&&(s=null),t.svg=s,s&&o.push(s)}return t.gap=q("div",o,"CodeMirror-merge-gap")}function A(e){return"string"==typeof e?e:e.getValue()}function O(e,t,n){M||(M=new diff_match_patch);for(var r=M.diff_main(e,t),i=0;i<r.length;++i){var o=r[i];(n?/[^ \t]/.test(o[1]):o[1])?i&&r[i-1][0]==o[0]&&(r.splice(i--,1),r[i][1]+=o[1]):r.splice(i--,1)}return r}function E(e){var n=[];if(!e.length)return n;for(var r=0,i=0,o=t(0,0),a=t(0,0),s=0;s<e.length;++s){var l=e[s],c=l[0];if(c==DIFF_EQUAL){var u=!P(e,s)||o.line<r||a.line<i?1:0,d=o.line+u,f=a.line+u;W(o,l[1],null,a);var p=N(e,s)?1:0,h=o.line+p,m=a.line+p;h>d&&(s&&n.push({origFrom:i,origTo:f,editFrom:r,editTo:d}),r=h,i=m)}else W(c==DIFF_INSERT?o:a,l[1])}return(r<=o.line||i<=a.line)&&n.push({origFrom:i,origTo:a.line+1,editFrom:r,editTo:o.line+1}),n}function N(e,t){if(t==e.length-1)return!0;var n=e[t+1][1];return!(1==n.length&&t<e.length-2||10!=n.charCodeAt(0))&&(t==e.length-2||((n=e[t+2][1]).length>1||t==e.length-3)&&10==n.charCodeAt(0))}function P(e,t){if(0==t)return!0;var n=e[t-1][1];return 10==n.charCodeAt(n.length-1)&&(1==t||10==(n=e[t-2][1]).charCodeAt(n.length-1))}function F(e,t,n){for(var r,i,o,a,s=0;s<e.length;s++){var l=e[s],c=n?l.editFrom:l.origFrom,u=n?l.editTo:l.origTo;null==i&&(c>t?(i=l.editFrom,a=l.origFrom):u>t&&(i=l.editTo,a=l.origTo)),u<=t?(r=l.editTo,o=l.origTo):c<=t&&(r=l.editFrom,o=l.origFrom)}return{edit:{before:r,after:i},orig:{before:o,after:a}}}function D(n,r,i){n.addLineClass(r,"wrap","CodeMirror-merge-collapsed-line");var o=document.createElement("span");o.className="CodeMirror-merge-collapsed-widget",o.title=n.phrase("Identical text collapsed. Click to expand.");var a=n.markText(t(r,0),t(i-1),{inclusiveLeft:!0,inclusiveRight:!0,replacedWith:o,clearOnEnter:!0});function s(){a.clear(),n.removeLineClass(r,"wrap","CodeMirror-merge-collapsed-line")}return a.explicitlyCleared&&s(),e.on(o,"click",s),a.on("clear",s),e.on(o,"click",s),{mark:a,clear:s}}function z(e,t){var n=[];function r(){for(var e=0;e<n.length;e++)n[e].clear()}for(var i=0;i<t.length;i++){var o=t[i],a=D(o.cm,o.line,o.line+e);n.push(a),a.mark.on("clear",r)}return n[0].mark}function I(e,t,n,r){for(var i=0;i<e.chunks.length;i++)for(var o=e.chunks[i],a=o.editFrom-t;a<o.editTo+t;a++){var s=a+n;s>=0&&s<r.length&&(r[s]=!1)}}function R(e,t){"number"!=typeof t&&(t=2);for(var n=[],r=e.editor(),i=r.firstLine(),o=i,a=r.lastLine();o<=a;o++)n.push(!0);e.left&&I(e.left,t,i,n),e.right&&I(e.right,t,i,n);for(var s=0;s<n.length;s++)if(n[s]){for(var l=s+i,c=1;s<n.length-1&&n[s+1];s++,c++);if(c>t){var u=[{line:l,cm:r}];e.left&&u.push({line:v(l,e.left.chunks),cm:e.left.orig}),e.right&&u.push({line:v(l,e.right.chunks),cm:e.right.orig});var d=z(c,u);e.options.onCollapse&&e.options.onCollapse(e,l,c,d)}}}function q(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function B(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild)}function H(e){for(var t=1;t<arguments.length;t+=2)e.setAttribute(arguments[t],arguments[t+1])}function j(e,t){for(var n in t||(t={}),e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function W(e,n,r,i){for(var o=r?t(e.line,e.ch):e,a=0;;){var s=n.indexOf("\n",a);if(-1==s)break;++o.line,i&&++i.line,a=s+1}return o.ch=(a?0:o.ch)+(n.length-a),i&&(i.ch=(a?0:i.ch)+(n.length-a)),o}L.prototype={constructor:L,editor:function(){return this.edit},rightOriginal:function(){return this.right&&this.right.orig},leftOriginal:function(){return this.left&&this.left.orig},setShowDifferences:function(e){this.right&&this.right.setShowDifferences(e),this.left&&this.left.setShowDifferences(e)},rightChunks:function(){if(this.right)return i(this.right),this.right.chunks},leftChunks:function(){if(this.left)return i(this.left),this.left.chunks}};var K=1,U=2,$=4;function V(e){this.cm=e,this.alignable=[],this.height=e.doc.height;var t=this;e.on("markerAdded",(function(e,n){if(n.collapsed){var r=n.find(1);null!=r&&t.set(r.line,$)}})),e.on("markerCleared",(function(e,n,r,i){null!=i&&n.collapsed&&t.check(i,$,t.hasMarker)})),e.on("markerChanged",this.signal.bind(this)),e.on("lineWidgetAdded",(function(e,n,r){n.mergeSpacer||(n.above?t.set(r-1,U):t.set(r,K))})),e.on("lineWidgetCleared",(function(e,n,r){n.mergeSpacer||(n.above?t.check(r-1,U,t.hasWidgetBelow):t.check(r,K,t.hasWidget))})),e.on("lineWidgetChanged",this.signal.bind(this)),e.on("change",(function(e,n){var r=n.from.line,i=n.to.line-n.from.line,o=n.text.length-1,a=r+o;(i||o)&&t.map(r,i,o),t.check(a,$,t.hasMarker),(i||o)&&t.check(n.from.line,$,t.hasMarker)})),e.on("viewportChange",(function(){t.cm.doc.height!=t.height&&t.signal()}))}function G(e,t){return(e.line-t.line||e.ch-t.ch)<0?e:t}function X(e,t){return(e.line-t.line||e.ch-t.ch)>0?e:t}function Q(e,t){return e.line==t.line&&e.ch==t.ch}function Y(e,t,n){for(var r=e.length-1;r>=0;r--){var i=e[r],o=(n?i.origTo:i.editTo)-1;if(o<t)return o}}function J(e,t,n){for(var r=0;r<e.length;r++){var i=e[r],o=n?i.origFrom:i.editFrom;if(o>t)return o}}function Z(t,n){var r=null,o=t.state.diffViews,a=t.getCursor().line;if(o)for(var s=0;s<o.length;s++){var l=o[s],c=t==l.orig;i(l);var u=n<0?Y(l.chunks,a,c):J(l.chunks,a,c);null==u||null!=r&&!(n<0?u>r:u<r)||(r=u)}if(null==r)return e.Pass;t.setCursor(r,0)}V.prototype={signal:function(){e.signal(this,"realign"),this.height=this.cm.doc.height},set:function(e,t){for(var n=-1;n<this.alignable.length;n+=2){var r=this.alignable[n]-e;if(0==r){if((this.alignable[n+1]&t)==t)return;return this.alignable[n+1]|=t,void this.signal()}if(r>0)break}this.signal(),this.alignable.splice(n,0,e,t)},find:function(e){for(var t=0;t<this.alignable.length;t+=2)if(this.alignable[t]==e)return t;return-1},check:function(e,t,n){var r=this.find(e);if(-1!=r&&this.alignable[r+1]&t&&!n.call(this,e)){this.signal();var i=this.alignable[r+1]&~t;i?this.alignable[r+1]=i:this.alignable.splice(r,2)}},hasMarker:function(e){var t=this.cm.getLineHandle(e);if(t.markedSpans)for(var n=0;n<t.markedSpans.length;n++)if(t.markedSpans[n].marker.collapsed&&null!=t.markedSpans[n].to)return!0;return!1},hasWidget:function(e){var t=this.cm.getLineHandle(e);if(t.widgets)for(var n=0;n<t.widgets.length;n++)if(!t.widgets[n].above&&!t.widgets[n].mergeSpacer)return!0;return!1},hasWidgetBelow:function(e){if(e==this.cm.lastLine())return!1;var t=this.cm.getLineHandle(e+1);if(t.widgets)for(var n=0;n<t.widgets.length;n++)if(t.widgets[n].above&&!t.widgets[n].mergeSpacer)return!0;return!1},map:function(e,t,n){for(var r=n-t,i=e+t,o=-1,a=-1,s=0;s<this.alignable.length;s+=2){var l=this.alignable[s];l==e&&this.alignable[s+1]&U&&(o=s),l==i&&this.alignable[s+1]&U&&(a=s),l<=e||(l<i?this.alignable.splice(s--,2):this.alignable[s]+=r)}if(o>-1){var c=this.alignable[o+1];c==U?this.alignable.splice(o,2):this.alignable[o+1]=c&~U}a>-1&&n&&this.set(e+n,U)}},e.commands.goNextDiff=function(e){return Z(e,1)},e.commands.goPrevDiff=function(e){return Z(e,-1)}}(n(5237))},4285(e,t,n){!function(e,t){e.modeURL||(e.modeURL="../mode/%N/%N.js");var r={};function i(e,t){var n=t;return function(){0==--n&&e()}}function o(t,n,r){var o=e.modes[t],a=o&&o.dependencies;if(!a)return n();for(var s=[],l=0;l<a.length;++l)e.modes.hasOwnProperty(a[l])||s.push(a[l]);if(!s.length)return n();var c=i(n,s.length);for(l=0;l<s.length;++l)e.requireMode(s[l],c,r)}e.requireMode=function(i,a,s){if("string"!=typeof i&&(i=i.name),e.modes.hasOwnProperty(i))return o(i,a,s);if(r.hasOwnProperty(i))return r[i].push(a);var l=s&&s.path?s.path(i):e.modeURL.replace(/%N/g,i);if(s&&s.loadMode)s.loadMode(l,(function(){o(i,a,s)}));else if("plain"==t){var c=document.createElement("script");c.src=l;var u=document.getElementsByTagName("script")[0],d=r[i]=[a];e.on(c,"load",(function(){o(i,(function(){for(var e=0;e<d.length;++e)d[e]()}),s)})),u.parentNode.insertBefore(c,u)}else"cjs"==t?(n(4301)(l),a()):"amd"==t&&requirejs([l],a)},e.autoLoadMode=function(t,n,r){e.modes.hasOwnProperty(n)||e.requireMode(n,(function(){t.setOption("mode",t.getOption("mode"))}),r)}}(n(5237),"cjs")},7340(e,t,n){!function(e){"use strict";e.multiplexingMode=function(t){var n=Array.prototype.slice.call(arguments,1);function r(e,t,n,r){if("string"==typeof t){var i=e.indexOf(t,n);return r&&i>-1?i+t.length:i}var o=t.exec(n?e.slice(n):e);return o?o.index+n+(r?o[0].length:0):-1}return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null,startingInner:!1}},copyState:function(n){return{outer:e.copyState(t,n.outer),innerActive:n.innerActive,inner:n.innerActive&&e.copyState(n.innerActive.mode,n.inner),startingInner:n.startingInner}},token:function(i,o){if(o.innerActive){var a=o.innerActive;if(c=i.string,!a.close&&i.sol())return o.innerActive=o.inner=null,this.token(i,o);if((d=a.close&&!o.startingInner?r(c,a.close,i.pos,a.parseDelimiters):-1)==i.pos&&!a.parseDelimiters)return i.match(a.close),o.innerActive=o.inner=null,a.delimStyle&&a.delimStyle+" "+a.delimStyle+"-close";d>-1&&(i.string=c.slice(0,d));var s=a.mode.token(i,o.inner);return d>-1?i.string=c:i.pos>i.start&&(o.startingInner=!1),d==i.pos&&a.parseDelimiters&&(o.innerActive=o.inner=null),a.innerStyle&&(s=s?s+" "+a.innerStyle:a.innerStyle),s}for(var l=1/0,c=i.string,u=0;u<n.length;++u){var d,f=n[u];if((d=r(c,f.open,i.pos))==i.pos){f.parseDelimiters||i.match(f.open),o.startingInner=!!f.parseDelimiters,o.innerActive=f;var p=0;if(t.indent){var h=t.indent(o.outer,"","");h!==e.Pass&&(p=h)}return o.inner=e.startState(f.mode,p),f.delimStyle&&f.delimStyle+" "+f.delimStyle+"-open"}-1!=d&&d<l&&(l=d)}l!=1/0&&(i.string=c.slice(0,l));var m=t.token(i,o.outer);return l!=1/0&&(i.string=c),m},indent:function(n,r,i){var o=n.innerActive?n.innerActive.mode:t;return o.indent?o.indent(n.innerActive?n.inner:n.outer,r,i):e.Pass},blankLine:function(r){var i=r.innerActive?r.innerActive.mode:t;if(i.blankLine&&i.blankLine(r.innerActive?r.inner:r.outer),r.innerActive)"\n"===r.innerActive.close&&(r.innerActive=r.inner=null);else for(var o=0;o<n.length;++o){var a=n[o];"\n"===a.open&&(r.innerActive=a,r.inner=e.startState(a.mode,i.indent?i.indent(r.outer,"",""):0))}},electricChars:t.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode:t}}}}}(n(5237))},2580(e,t,n){!function(e){"use strict";e.overlayMode=function(t,n,r){return{startState:function(){return{base:e.startState(t),overlay:e.startState(n),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(r){return{base:e.copyState(t,r.base),overlay:e.copyState(n,r.overlay),basePos:r.basePos,baseCur:null,overlayPos:r.overlayPos,overlayCur:null}},token:function(e,i){return(e!=i.streamSeen||Math.min(i.basePos,i.overlayPos)<e.start)&&(i.streamSeen=e,i.basePos=i.overlayPos=e.start),e.start==i.basePos&&(i.baseCur=t.token(e,i.base),i.basePos=e.pos),e.start==i.overlayPos&&(e.pos=e.start,i.overlayCur=n.token(e,i.overlay),i.overlayPos=e.pos),e.pos=Math.min(i.basePos,i.overlayPos),null==i.overlayCur?i.baseCur:null!=i.baseCur&&i.overlay.combineTokens||r&&null==i.overlay.combineTokens?i.baseCur+" "+i.overlayCur:i.overlayCur},indent:t.indent&&function(e,n,r){return t.indent(e.base,n,r)},electricChars:t.electricChars,innerMode:function(e){return{state:e.base,mode:t}},blankLine:function(e){var i,o;return t.blankLine&&(i=t.blankLine(e.base)),n.blankLine&&(o=n.blankLine(e.overlay)),null==o?i:r&&null!=i?i+" "+o:o}}}}(n(5237))},4856(e,t,n){!function(e){"use strict";function t(e,t){if(!e.hasOwnProperty(t))throw new Error("Undefined state "+t+" in simple mode")}function n(e,t){if(!e)return/(?:)/;var n="";return e instanceof RegExp?(e.ignoreCase&&(n="i"),e.unicode&&(n+="u"),e=e.source):e=String(e),new RegExp((!1===t?"":"^")+"(?:"+e+")",n)}function r(e){if(!e)return null;if(e.apply)return e;if("string"==typeof e)return e.replace(/\./g," ");for(var t=[],n=0;n<e.length;n++)t.push(e[n]&&e[n].replace(/\./g," "));return t}function i(e,i){(e.next||e.push)&&t(i,e.next||e.push),this.regex=n(e.regex),this.token=r(e.token),this.data=e}function o(e,t){return function(n,r){if(r.pending){var i=r.pending.shift();return 0==r.pending.length&&(r.pending=null),n.pos+=i.text.length,i.token}if(r.local){if(r.local.end&&n.match(r.local.end)){var o=r.local.endToken||null;return r.local=r.localState=null,o}var a;return o=r.local.mode.token(n,r.localState),r.local.endScan&&(a=r.local.endScan.exec(n.current()))&&(n.pos=n.start+a.index),o}for(var l=e[r.state],c=0;c<l.length;c++){var u=l[c],d=(!u.data.sol||n.sol())&&n.match(u.regex);if(d){u.data.next?r.state=u.data.next:u.data.push?((r.stack||(r.stack=[])).push(r.state),r.state=u.data.push):u.data.pop&&r.stack&&r.stack.length&&(r.state=r.stack.pop()),u.data.mode&&s(t,r,u.data.mode,u.token),u.data.indent&&r.indent.push(n.indentation()+t.indentUnit),u.data.dedent&&r.indent.pop();var f=u.token;if(f&&f.apply&&(f=f(d)),d.length>2&&u.token&&"string"!=typeof u.token){for(var p=2;p<d.length;p++)d[p]&&(r.pending||(r.pending=[])).push({text:d[p],token:u.token[p-1]});return n.backUp(d[0].length-(d[1]?d[1].length:0)),f[0]}return f&&f.join?f[0]:f}}return n.next(),null}}function a(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;var n=0;for(var r in e)if(e.hasOwnProperty(r)){if(!t.hasOwnProperty(r)||!a(e[r],t[r]))return!1;n++}for(var r in t)t.hasOwnProperty(r)&&n--;return 0==n}function s(t,r,i,o){var s;if(i.persistent)for(var l=r.persistentStates;l&&!s;l=l.next)(i.spec?a(i.spec,l.spec):i.mode==l.mode)&&(s=l);var c=s?s.mode:i.mode||e.getMode(t,i.spec),u=s?s.state:e.startState(c);i.persistent&&!s&&(r.persistentStates={mode:c,spec:i.spec,state:u,next:r.persistentStates}),r.localState=u,r.local={mode:c,end:i.end&&n(i.end),endScan:i.end&&!1!==i.forceEnd&&n(i.end,!1),endToken:o&&o.join?o[o.length-1]:o}}function l(e,t){for(var n=0;n<t.length;n++)if(t[n]===e)return!0}function c(t,n){return function(r,i,o){if(r.local&&r.local.mode.indent)return r.local.mode.indent(r.localState,i,o);if(null==r.indent||r.local||n.dontIndentStates&&l(r.state,n.dontIndentStates)>-1)return e.Pass;var a=r.indent.length-1,s=t[r.state];e:for(;;){for(var c=0;c<s.length;c++){var u=s[c];if(u.data.dedent&&!1!==u.data.dedentIfLineStart){var d=u.regex.exec(i);if(d&&d[0]){a--,(u.next||u.push)&&(s=t[u.next||u.push]),i=i.slice(d[0].length);continue e}}}break}return a<0?0:r.indent[a]}}e.defineSimpleMode=function(t,n){e.defineMode(t,(function(t){return e.simpleMode(t,n)}))},e.simpleMode=function(n,r){t(r,"start");var a={},s=r.meta||{},l=!1;for(var u in r)if(u!=s&&r.hasOwnProperty(u))for(var d=a[u]=[],f=r[u],p=0;p<f.length;p++){var h=f[p];d.push(new i(h,r)),(h.indent||h.dedent)&&(l=!0)}var m={startState:function(){return{state:"start",pending:null,local:null,localState:null,indent:l?[]:null}},copyState:function(t){var n={state:t.state,pending:t.pending,local:t.local,localState:null,indent:t.indent&&t.indent.slice(0)};t.localState&&(n.localState=e.copyState(t.local.mode,t.localState)),t.stack&&(n.stack=t.stack.slice(0));for(var r=t.persistentStates;r;r=r.next)n.persistentStates={mode:r.mode,spec:r.spec,state:r.state==t.localState?n.localState:e.copyState(r.mode,r.state),next:n.persistentStates};return n},token:o(a,n),innerMode:function(e){return e.local&&{mode:e.local.mode,state:e.localState}},indent:c(a,s)};if(s)for(var g in s)s.hasOwnProperty(g)&&(m[g]=s[g]);return m}}(n(5237))},4301(e){function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4301,e.exports=t},1660(e,t,n){!function(e){"use strict";var t=/^(p|li|div|h\\d|pre|blockquote|td)$/;function n(e,r){if(3==e.nodeType)return r.push(e.nodeValue);for(var i=e.firstChild;i;i=i.nextSibling)n(i,r),t.test(e.nodeType)&&r.push("\n")}e.colorize=function(t,r){t||(t=document.body.getElementsByTagName("pre"));for(var i=0;i<t.length;++i){var o=t[i],a=o.getAttribute("data-lang")||r;if(a){var s=[];n(o,s),o.textContent="",e.runMode(s.join(""),a,o),o.className+=" cm-s-default"}}}}(n(5237),n(7453))},4089(e,t,n){!function(){"use strict";function e(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function t(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,a=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}function r(){}var i=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};i.prototype.eol=function(){return this.pos>=this.string.length},i.prototype.sol=function(){return this.pos==this.lineStart},i.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},i.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},i.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},i.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},i.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},i.prototype.skipToEnd=function(){this.pos=this.string.length},i.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},i.prototype.backUp=function(e){this.pos-=e},i.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=t(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?t(this.string,this.lineStart,this.tabSize):0)},i.prototype.indentation=function(){return t(this.string,null,this.tabSize)-(this.lineStart?t(this.string,this.lineStart,this.tabSize):0)},i.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},i.prototype.current=function(){return this.string.slice(this.start,this.pos)},i.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},i.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},i.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var o={},a={};function s(t){if("string"==typeof t&&a.hasOwnProperty(t))t=a[t];else if(t&&"string"==typeof t.name&&a.hasOwnProperty(t.name)){var n=a[t.name];"string"==typeof n&&(n={name:n}),i=n,o=t,Object.create?l=Object.create(i):(r.prototype=i,l=new r),o&&e(o,l),(t=l).name=n.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return s("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return s("application/json")}var i,o,l;return"string"==typeof t?{name:t}:t||{name:"null"}}var l={};var c={__proto__:null,modes:o,mimeModes:a,defineMode:function(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),o[e]=t},defineMIME:function(e,t){a[e]=t},resolveMode:s,getMode:function e(t,n){n=s(n);var r=o[n.name];if(!r)return e(t,"text/plain");var i=r(t,n);if(l.hasOwnProperty(n.name)){var a=l[n.name];for(var c in a)a.hasOwnProperty(c)&&(i.hasOwnProperty(c)&&(i["_"+c]=i[c]),i[c]=a[c])}if(i.name=n.name,n.helperType&&(i.helperType=n.helperType),n.modeProps)for(var u in n.modeProps)i[u]=n.modeProps[u];return i},modeExtensions:l,extendMode:function(t,n){e(n,l.hasOwnProperty(t)?l[t]:l[t]={})},copyState:function(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n},innerMode:function(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}},startState:function(e,t,n){return!e.startState||e.startState(t,n)}},u="undefined"!=typeof globalThis?globalThis:window;for(var d in u.CodeMirror={},CodeMirror.StringStream=i,c)CodeMirror[d]=c[d];CodeMirror.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),CodeMirror.defineMIME("text/plain","null"),CodeMirror.registerHelper=CodeMirror.registerGlobalHelper=Math.min,CodeMirror.splitLines=function(e){return e.split(/\r?\n|\r/)},CodeMirror.countColumn=t,CodeMirror.defaults={indentUnit:2},function(e){e.runMode=function(t,n,r,i){var o=e.getMode(e.defaults,n),a=i&&i.tabSize||e.defaults.tabSize;if(r.appendChild){var s=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<9),l=r,c=0;l.textContent="",r=function(e,t){if("\n"==e)return l.appendChild(document.createTextNode(s?"\r":e)),void(c=0);for(var n="",r=0;;){var i=e.indexOf("\t",r);if(-1==i){n+=e.slice(r),c+=e.length-r;break}c+=i-r,n+=e.slice(r,i);var o=a-c%a;c+=o;for(var u=0;u<o;++u)n+=" ";r=i+1}if(t){var d=l.appendChild(document.createElement("span"));d.className="cm-"+t.replace(/ +/g," cm-"),d.appendChild(document.createTextNode(n))}else l.appendChild(document.createTextNode(n))}}for(var u=e.splitLines(t),d=i&&i.state||e.startState(o),f=0,p=u.length;f<p;++f){f&&r("\n");var h=new e.StringStream(u[f],null,{lookAhead:function(e){return u[f+e]},baseToken:function(){}});for(!h.string&&o.blankLine&&o.blankLine(d);!h.eol();){var m=o.token(h,d);r(h.current(),m,f,h.start,d,o),h.start=h.pos}}}}(n(5237))}()},7453(e,t,n){!function(e){"use strict";e.runMode=function(t,n,r,i){var o=e.getMode(e.defaults,n),a=i&&i.tabSize||e.defaults.tabSize;if(r.appendChild){var s=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<9),l=r,c=0;l.textContent="",r=function(e,t){if("\n"==e)return l.appendChild(document.createTextNode(s?"\r":e)),void(c=0);for(var n="",r=0;;){var i=e.indexOf("\t",r);if(-1==i){n+=e.slice(r),c+=e.length-r;break}c+=i-r,n+=e.slice(r,i);var o=a-c%a;c+=o;for(var u=0;u<o;++u)n+=" ";r=i+1}if(t){var d=l.appendChild(document.createElement("span"));d.className="cm-"+t.replace(/ +/g," cm-"),d.appendChild(document.createTextNode(n))}else l.appendChild(document.createTextNode(n))}}for(var u=e.splitLines(t),d=i&&i.state||e.startState(o),f=0,p=u.length;f<p;++f){f&&r("\n");var h=new e.StringStream(u[f],null,{lookAhead:function(e){return u[f+e]},baseToken:function(){}});for(!h.string&&o.blankLine&&o.blankLine(d);!h.eol();){var m=o.token(h,d);r(h.current(),m,f,h.start,d,o),h.start=h.pos}}}}(n(5237))},3004(e,t,n){!function(e){"use strict";function t(e,t){function n(e){clearTimeout(r.doRedraw),r.doRedraw=setTimeout((function(){r.redraw()}),e)}this.cm=e,this.options=t,this.buttonHeight=t.scrollButtonHeight||e.getOption("scrollButtonHeight"),this.annotations=[],this.doRedraw=this.doUpdate=null,this.div=e.getWrapperElement().appendChild(document.createElement("div")),this.div.style.cssText="position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none",this.computeScale();var r=this;e.on("refresh",this.resizeHandler=function(){clearTimeout(r.doUpdate),r.doUpdate=setTimeout((function(){r.computeScale()&&n(20)}),100)}),e.on("markerAdded",this.resizeHandler),e.on("markerCleared",this.resizeHandler),!1!==t.listenForChanges&&e.on("changes",this.changeHandler=function(){n(250)})}e.defineExtension("annotateScrollbar",(function(e){return"string"==typeof e&&(e={className:e}),new t(this,e)})),e.defineOption("scrollButtonHeight",0),t.prototype.computeScale=function(){var e=this.cm,t=(e.getWrapperElement().clientHeight-e.display.barHeight-2*this.buttonHeight)/e.getScrollerElement().scrollHeight;if(t!=this.hScale)return this.hScale=t,!0},t.prototype.update=function(e){this.annotations=e,this.redraw()},t.prototype.redraw=function(e){!1!==e&&this.computeScale();var t=this.cm,n=this.hScale,r=document.createDocumentFragment(),i=this.annotations,o=t.getOption("lineWrapping"),a=o&&1.5*t.defaultTextHeight(),s=null,l=null;function c(e,n){if(s!=e.line){s=e.line,l=t.getLineHandle(e.line);var r=t.getLineHandleVisualStart(l);r!=l&&(s=t.getLineNumber(r),l=r)}return l.widgets&&l.widgets.length||o&&l.height>a?t.charCoords(e,"local")[n?"top":"bottom"]:t.heightAtLine(l,"local")+(n?0:l.height)}var u=t.lastLine();if(t.display.barWidth)for(var d,f=0;f<i.length;f++){var p=i[f];if(!(p.to.line>u)){for(var h=d||c(p.from,!0)*n,m=c(p.to,!1)*n;f<i.length-1&&!(i[f+1].to.line>u)&&!((d=c(i[f+1].from,!0)*n)>m+.9);)m=c((p=i[++f]).to,!1)*n;if(m!=h){var g=Math.max(m-h,3),v=r.appendChild(document.createElement("div"));v.style.cssText="position: absolute; right: 0px; width: "+Math.max(t.display.barWidth-1,2)+"px; top: "+(h+this.buttonHeight)+"px; height: "+g+"px",v.className=this.options.className,p.id&&v.setAttribute("annotation-id",p.id)}}}this.div.textContent="",this.div.appendChild(r)},t.prototype.clear=function(){this.cm.off("refresh",this.resizeHandler),this.cm.off("markerAdded",this.resizeHandler),this.cm.off("markerCleared",this.resizeHandler),this.changeHandler&&this.cm.off("changes",this.changeHandler),this.div.parentNode.removeChild(this.div)}}(n(5237))},6272(e,t,n){!function(e){"use strict";function t(t,r){e.changeEnd(r).line==t.lastLine()&&n(t)}function n(e){var t="";e.lineCount()>1&&(t=e.display.scroller.clientHeight-30-e.getLineHandle(e.lastLine()).height+"px"),e.state.scrollPastEndPadding!=t&&(e.state.scrollPastEndPadding=t,e.display.lineSpace.parentNode.style.paddingBottom=t,e.off("refresh",n),e.setSize(),e.on("refresh",n))}e.defineOption("scrollPastEnd",!1,(function(r,i,o){o&&o!=e.Init&&(r.off("change",t),r.off("refresh",n),r.display.lineSpace.parentNode.style.paddingBottom="",r.state.scrollPastEndPadding=null),i&&(r.on("change",t),r.on("refresh",n),n(r))}))}(n(5237))},5841(e,t,n){!function(e){"use strict";function t(t,n,r){this.orientation=n,this.scroll=r,this.screen=this.total=this.size=1,this.pos=0,this.node=document.createElement("div"),this.node.className=t+"-"+n,this.inner=this.node.appendChild(document.createElement("div"));var i=this;function o(t){var n=e.wheelEventPixels(t)["horizontal"==i.orientation?"x":"y"],r=i.pos;i.moveTo(i.pos+n),i.pos!=r&&e.e_preventDefault(t)}e.on(this.inner,"mousedown",(function(t){if(1==t.which){e.e_preventDefault(t);var n="horizontal"==i.orientation?"pageX":"pageY",r=t[n],o=i.pos;e.on(document,"mousemove",s),e.on(document,"mouseup",a)}function a(){e.off(document,"mousemove",s),e.off(document,"mouseup",a)}function s(e){if(1!=e.which)return a();i.moveTo(o+(e[n]-r)*(i.total/i.size))}})),e.on(this.node,"click",(function(t){e.e_preventDefault(t);var n,r=i.inner.getBoundingClientRect();n="horizontal"==i.orientation?t.clientX<r.left?-1:t.clientX>r.right?1:0:t.clientY<r.top?-1:t.clientY>r.bottom?1:0,i.moveTo(i.pos+n*i.screen)})),e.on(this.node,"mousewheel",o),e.on(this.node,"DOMMouseScroll",o)}t.prototype.setPos=function(e,t){return e<0&&(e=0),e>this.total-this.screen&&(e=this.total-this.screen),!(!t&&e==this.pos||(this.pos=e,this.inner.style["horizontal"==this.orientation?"left":"top"]=e*(this.size/this.total)+"px",0))},t.prototype.moveTo=function(e){this.setPos(e)&&this.scroll(e,this.orientation)};var n=10;function r(e,n,r){this.addClass=e,this.horiz=new t(e,"horizontal",r),n(this.horiz.node),this.vert=new t(e,"vertical",r),n(this.vert.node),this.width=null}t.prototype.update=function(e,t,r){var i=this.screen!=t||this.total!=e||this.size!=r;i&&(this.screen=t,this.total=e,this.size=r);var o=this.screen*(this.size/this.total);o<n&&(this.size-=n-o,o=n),this.inner.style["horizontal"==this.orientation?"width":"height"]=o+"px",this.setPos(this.pos,i)},r.prototype.update=function(e){if(null==this.width){var t=window.getComputedStyle?window.getComputedStyle(this.horiz.node):this.horiz.node.currentStyle;t&&(this.width=parseInt(t.height))}var n=this.width||0,r=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1;return this.vert.node.style.display=i?"block":"none",this.horiz.node.style.display=r?"block":"none",i&&(this.vert.update(e.scrollHeight,e.clientHeight,e.viewHeight-(r?n:0)),this.vert.node.style.bottom=r?n+"px":"0"),r&&(this.horiz.update(e.scrollWidth,e.clientWidth,e.viewWidth-(i?n:0)-e.barLeft),this.horiz.node.style.right=i?n+"px":"0",this.horiz.node.style.left=e.barLeft+"px"),{right:i?n:0,bottom:r?n:0}},r.prototype.setScrollTop=function(e){this.vert.setPos(e)},r.prototype.setScrollLeft=function(e){this.horiz.setPos(e)},r.prototype.clear=function(){var e=this.horiz.node.parentNode;e.removeChild(this.horiz.node),e.removeChild(this.vert.node)},e.scrollbarModel.simple=function(e,t){return new r("CodeMirror-simplescroll",e,t)},e.scrollbarModel.overlay=function(e,t){return new r("CodeMirror-overlayscroll",e,t)}}(n(5237))},8820(e,t,n){!function(e){"use strict";function t(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):i(prompt(n,r))}function n(e){return e.phrase("Jump to line:")+' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+e.phrase("(Use line:column or scroll% syntax)")+"</span>"}function r(e,t){var n=Number(t);return/^[-+]/.test(t)?e.getCursor().line+n:n-1}e.defineOption("search",{bottom:!1}),e.commands.jumpToLine=function(e){var i=e.getCursor();t(e,n(e),e.phrase("Jump to line:"),i.line+1+":"+i.ch,(function(t){var n;if(t)if(n=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(t))e.setCursor(r(e,n[1]),Number(n[2]));else if(n=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(t)){var o=Math.round(e.lineCount()*Number(n[1])/100);/^[-+]/.test(n[1])&&(o=i.line+o+1),e.setCursor(o-1,i.ch)}else(n=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(t))&&e.setCursor(r(e,n[1]),i.ch)}))},e.keyMap.default["Alt-G"]="jumpToLine"}(n(5237),n(8527))},6700(e,t,n){!function(e){"use strict";var t={style:"matchhighlight",minChars:2,delay:100,wordsOnly:!1,annotateScrollbar:!1,showToken:!1,trim:!0};function n(e){for(var n in this.options={},t)this.options[n]=(e&&e.hasOwnProperty(n)?e:t)[n];this.overlay=this.timeout=null,this.matchesonscroll=null,this.active=!1}function r(e){var t=e.state.matchHighlighter;(t.active||e.hasFocus())&&o(e,t)}function i(e){var t=e.state.matchHighlighter;t.active||(t.active=!0,o(e,t))}function o(e,t){clearTimeout(t.timeout),t.timeout=setTimeout((function(){l(e)}),t.options.delay)}function a(e,t,n,r){var i=e.state.matchHighlighter;if(e.addOverlay(i.overlay=d(t,n,r)),i.options.annotateScrollbar&&e.showMatchesOnScrollbar){var o=n?new RegExp((/\w/.test(t.charAt(0))?"\\b":"")+t.replace(/[\\\[.+*?(){|^$]/g,"\\$&")+(/\w/.test(t.charAt(t.length-1))?"\\b":"")):t;i.matchesonscroll=e.showMatchesOnScrollbar(o,!1,{className:"CodeMirror-selection-highlight-scrollbar"})}}function s(e){var t=e.state.matchHighlighter;t.overlay&&(e.removeOverlay(t.overlay),t.overlay=null,t.matchesonscroll&&(t.matchesonscroll.clear(),t.matchesonscroll=null))}function l(e){e.operation((function(){var t=e.state.matchHighlighter;if(s(e),e.somethingSelected()||!t.options.showToken){var n=e.getCursor("from"),r=e.getCursor("to");if(n.line==r.line&&(!t.options.wordsOnly||c(e,n,r))){var i=e.getRange(n,r);t.options.trim&&(i=i.replace(/^\s+|\s+$/g,"")),i.length>=t.options.minChars&&a(e,i,!1,t.options.style)}}else{for(var o=!0===t.options.showToken?/[\w$]/:t.options.showToken,l=e.getCursor(),u=e.getLine(l.line),d=l.ch,f=d;d&&o.test(u.charAt(d-1));)--d;for(;f<u.length&&o.test(u.charAt(f));)++f;d<f&&a(e,u.slice(d,f),o,t.options.style)}}))}function c(e,t,n){if(null!==e.getRange(t,n).match(/^\w+$/)){if(t.ch>0){var r={line:t.line,ch:t.ch-1};if(null===e.getRange(r,t).match(/\W/))return!1}return!(n.ch<e.getLine(t.line).length&&(r={line:n.line,ch:n.ch+1},null===e.getRange(n,r).match(/\W/)))}return!1}function u(e,t){return!(e.start&&t.test(e.string.charAt(e.start-1))||e.pos!=e.string.length&&t.test(e.string.charAt(e.pos)))}function d(e,t,n){return{token:function(r){if(r.match(e)&&(!t||u(r,t)))return n;r.next(),r.skipTo(e.charAt(0))||r.skipToEnd()}}}e.defineOption("highlightSelectionMatches",!1,(function(t,o,a){if(a&&a!=e.Init&&(s(t),clearTimeout(t.state.matchHighlighter.timeout),t.state.matchHighlighter=null,t.off("cursorActivity",r),t.off("focus",i)),o){var c=t.state.matchHighlighter=new n(o);t.hasFocus()?(c.active=!0,l(t)):t.on("focus",i),t.on("cursorActivity",r)}}))}(n(5237),n(6685))},6685(e,t,n){!function(e){"use strict";function t(e,t,n,r){this.cm=e,this.options=r;var i={listenForChanges:!1};for(var o in r)i[o]=r[o];i.className||(i.className="CodeMirror-search-match"),this.annotation=e.annotateScrollbar(i),this.query=t,this.caseFold=n,this.gap={from:e.firstLine(),to:e.lastLine()+1},this.matches=[],this.update=null,this.findMatches(),this.annotation.update(this.matches);var a=this;e.on("change",this.changeHandler=function(e,t){a.onChange(t)})}e.defineExtension("showMatchesOnScrollbar",(function(e,n,r){return"string"==typeof r&&(r={className:r}),r||(r={}),new t(this,e,n,r)}));var n=1e3;function r(e,t,n){return e<=t?e:Math.max(t,e+n)}t.prototype.findMatches=function(){if(this.gap){for(var t=0;t<this.matches.length&&!((o=this.matches[t]).from.line>=this.gap.to);t++)o.to.line>=this.gap.from&&this.matches.splice(t--,1);for(var r=this.cm.getSearchCursor(this.query,e.Pos(this.gap.from,0),{caseFold:this.caseFold,multiline:this.options.multiline}),i=this.options&&this.options.maxMatches||n;r.findNext();){var o;if((o={from:r.from(),to:r.to()}).from.line>=this.gap.to)break;if(this.matches.splice(t++,0,o),this.matches.length>i)break}this.gap=null}},t.prototype.onChange=function(t){var n=t.from.line,i=e.changeEnd(t).line,o=i-t.to.line;if(this.gap?(this.gap.from=Math.min(r(this.gap.from,n,o),t.from.line),this.gap.to=Math.max(r(this.gap.to,n,o),t.from.line)):this.gap={from:t.from.line,to:i+1},o)for(var a=0;a<this.matches.length;a++){var s=this.matches[a],l=r(s.from.line,n,o);l!=s.from.line&&(s.from=e.Pos(l,s.from.ch));var c=r(s.to.line,n,o);c!=s.to.line&&(s.to=e.Pos(c,s.to.ch))}clearTimeout(this.update);var u=this;this.update=setTimeout((function(){u.updateAfterChange()}),250)},t.prototype.updateAfterChange=function(){this.findMatches(),this.annotation.update(this.matches)},t.prototype.clear=function(){this.cm.off("change",this.changeHandler),this.annotation.clear()}}(n(5237),n(3653),n(3004))},6895(e,t,n){!function(e){"use strict";function t(e,t){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(t){e.lastIndex=t.pos;var n=e.exec(t.string);if(n&&n.index==t.pos)return t.pos+=n[0].length||1,"searching";n?t.pos=n.index:t.skipToEnd()}}}function n(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function r(e){return e.state.search||(e.state.search=new n)}function i(e){return"string"==typeof e&&e==e.toLowerCase()}function o(e,t,n){return e.getSearchCursor(t,n,{caseFold:i(t),multiline:!0})}function a(e,t,n,r,i){e.openDialog(t,r,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){h(e)},onKeyDown:i,bottom:e.options.search.bottom})}function s(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):i(prompt(n,r))}function l(e,t,n,r){e.openConfirm?e.openConfirm(t,r):confirm(n)&&r[0]()}function c(e){return e.replace(/\\([nrt\\])/g,(function(e,t){return"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"==t?"\\":e}))}function u(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],-1==t[2].indexOf("i")?"":"i")}catch(e){}else e=c(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function d(e,n,r){n.queryText=r,n.query=u(r),e.removeOverlay(n.overlay,i(n.query)),n.overlay=t(n.query,i(n.query)),e.addOverlay(n.overlay),e.showMatchesOnScrollbar&&(n.annotate&&(n.annotate.clear(),n.annotate=null),n.annotate=e.showMatchesOnScrollbar(n.query,i(n.query)))}function f(t,n,i,o){var l=r(t);if(l.query)return p(t,n);var c=t.getSelection()||l.lastQuery;if(c instanceof RegExp&&"x^"==c.source&&(c=null),i&&t.openDialog){var u=null,f=function(n,r){e.e_stop(r),n&&(n!=l.queryText&&(d(t,l,n),l.posFrom=l.posTo=t.getCursor()),u&&(u.style.opacity=1),p(t,r.shiftKey,(function(e,n){var r;n.line<3&&document.querySelector&&(r=t.display.wrapper.querySelector(".CodeMirror-dialog"))&&r.getBoundingClientRect().bottom-4>t.cursorCoords(n,"window").top&&((u=r).style.opacity=.4)})))};a(t,g(t),c,f,(function(n,i){var o=e.keyName(n),a=t.getOption("extraKeys"),s=a&&a[o]||e.keyMap[t.getOption("keyMap")][o];"findNext"==s||"findPrev"==s||"findPersistentNext"==s||"findPersistentPrev"==s?(e.e_stop(n),d(t,r(t),i),t.execCommand(s)):"find"!=s&&"findPersistent"!=s||(e.e_stop(n),f(i,n))})),o&&c&&(d(t,l,c),p(t,n))}else s(t,g(t),"Search for:",c,(function(e){e&&!l.query&&t.operation((function(){d(t,l,e),l.posFrom=l.posTo=t.getCursor(),p(t,n)}))}))}function p(t,n,i){t.operation((function(){var a=r(t),s=o(t,a.query,n?a.posFrom:a.posTo);(s.find(n)||(s=o(t,a.query,n?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0))).find(n))&&(t.setSelection(s.from(),s.to()),t.scrollIntoView({from:s.from(),to:s.to()},20),a.posFrom=s.from(),a.posTo=s.to(),i&&i(s.from(),s.to()))}))}function h(e){e.operation((function(){var t=r(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))}))}function m(e,t){var n=e?document.createElement(e):document.createDocumentFragment();for(var r in t)n[r]=t[r];for(var i=2;i<arguments.length;i++){var o=arguments[i];n.appendChild("string"==typeof o?document.createTextNode(o):o)}return n}function g(e){var t=m("label",{className:"CodeMirror-search-label"},e.phrase("Search:"),m("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field",id:"CodeMirror-search-field"}));return t.setAttribute("for","CodeMirror-search-field"),m("",null,t," ",m("span",{style:"color: #666",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function v(e){return m("",null," ",m("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",m("span",{style:"color: #666",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function y(e){return m("",null,m("span",{className:"CodeMirror-search-label"},e.phrase("With:"))," ",m("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"}))}function b(e){return m("",null,m("span",{className:"CodeMirror-search-label"},e.phrase("Replace?"))," ",m("button",{},e.phrase("Yes"))," ",m("button",{},e.phrase("No"))," ",m("button",{},e.phrase("All"))," ",m("button",{},e.phrase("Stop")))}function x(e,t,n){e.operation((function(){for(var r=o(e,t);r.findNext();)if("string"!=typeof t){var i=e.getRange(r.from(),r.to()).match(t);r.replace(n.replace(/\$(\d)/g,(function(e,t){return i[t]})))}else r.replace(n)}))}function k(e,t){if(!e.getOption("readOnly")){var n=e.getSelection()||r(e).lastQuery,i=t?e.phrase("Replace all:"):e.phrase("Replace:"),a=m("",null,m("span",{className:"CodeMirror-search-label"},i),v(e));s(e,a,i,n,(function(n){n&&(n=u(n),s(e,y(e),e.phrase("Replace with:"),"",(function(r){if(r=c(r),t)x(e,n,r);else{h(e);var i=o(e,n,e.getCursor("from")),a=function(){var t,c=i.from();!(t=i.findNext())&&(i=o(e,n),!(t=i.findNext())||c&&i.from().line==c.line&&i.from().ch==c.ch)||(e.setSelection(i.from(),i.to()),e.scrollIntoView({from:i.from(),to:i.to()}),l(e,b(e),e.phrase("Replace?"),[function(){s(t)},a,function(){x(e,n,r)}]))},s=function(e){i.replace("string"==typeof n?r:r.replace(/\$(\d)/g,(function(t,n){return e[n]}))),a()};a()}})))}))}}e.defineOption("search",{bottom:!1}),e.commands.find=function(e){h(e),f(e)},e.commands.findPersistent=function(e){h(e),f(e,!1,!0)},e.commands.findPersistentNext=function(e){f(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){f(e,!0,!0,!0)},e.commands.findNext=f,e.commands.findPrev=function(e){f(e,!0)},e.commands.clearSearch=h,e.commands.replace=k,e.commands.replaceAll=function(e){k(e,!0)}}(n(5237),n(3653),n(8527))},3653(e,t,n){!function(e){"use strict";var t,n,r=e.Pos;function i(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function o(e,t){for(var n=i(e),r=n,o=0;o<t.length;o++)-1==r.indexOf(t.charAt(o))&&(r+=t.charAt(o));return n==r?e:new RegExp(e.source,r)}function a(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function s(e,t,n){t=o(t,"g");for(var i=n.line,a=n.ch,s=e.lastLine();i<=s;i++,a=0){t.lastIndex=a;var l=e.getLine(i),c=t.exec(l);if(c)return{from:r(i,c.index),to:r(i,c.index+c[0].length),match:c}}}function l(e,t,n){if(!a(t))return s(e,t,n);t=o(t,"gm");for(var i,l=1,c=n.line,u=e.lastLine();c<=u;){for(var d=0;d<l&&!(c>u);d++){var f=e.getLine(c++);i=null==i?f:i+"\n"+f}l*=2,t.lastIndex=n.ch;var p=t.exec(i);if(p){var h=i.slice(0,p.index).split("\n"),m=p[0].split("\n"),g=n.line+h.length-1,v=h[h.length-1].length;return{from:r(g,v),to:r(g+m.length-1,1==m.length?v+m[0].length:m[m.length-1].length),match:p}}}}function c(e,t,n){for(var r,i=0;i<=e.length;){t.lastIndex=i;var o=t.exec(e);if(!o)break;var a=o.index+o[0].length;if(a>e.length-n)break;(!r||a>r.index+r[0].length)&&(r=o),i=o.index+1}return r}function u(e,t,n){t=o(t,"g");for(var i=n.line,a=n.ch,s=e.firstLine();i>=s;i--,a=-1){var l=e.getLine(i),u=c(l,t,a<0?0:l.length-a);if(u)return{from:r(i,u.index),to:r(i,u.index+u[0].length),match:u}}}function d(e,t,n){if(!a(t))return u(e,t,n);t=o(t,"gm");for(var i,s=1,l=e.getLine(n.line).length-n.ch,d=n.line,f=e.firstLine();d>=f;){for(var p=0;p<s&&d>=f;p++){var h=e.getLine(d--);i=null==i?h:h+"\n"+i}s*=2;var m=c(i,t,l);if(m){var g=i.slice(0,m.index).split("\n"),v=m[0].split("\n"),y=d+g.length,b=g[g.length-1].length;return{from:r(y,b),to:r(y+v.length-1,1==v.length?b+v[0].length:v[v.length-1].length),match:m}}}}function f(e,t,n,r){if(e.length==t.length)return n;for(var i=0,o=n+Math.max(0,e.length-t.length);;){if(i==o)return i;var a=i+o>>1,s=r(e.slice(0,a)).length;if(s==n)return a;s>n?o=a:i=a+1}}function p(e,i,o,a){if(!i.length)return null;var s=a?t:n,l=s(i).split(/\r|\n\r?/);e:for(var c=o.line,u=o.ch,d=e.lastLine()+1-l.length;c<=d;c++,u=0){var p=e.getLine(c).slice(u),h=s(p);if(1==l.length){var m=h.indexOf(l[0]);if(-1==m)continue e;return o=f(p,h,m,s)+u,{from:r(c,f(p,h,m,s)+u),to:r(c,f(p,h,m+l[0].length,s)+u)}}var g=h.length-l[0].length;if(h.slice(g)==l[0]){for(var v=1;v<l.length-1;v++)if(s(e.getLine(c+v))!=l[v])continue e;var y=e.getLine(c+l.length-1),b=s(y),x=l[l.length-1];if(b.slice(0,x.length)==x)return{from:r(c,f(p,h,g,s)+u),to:r(c+l.length-1,f(y,b,x.length,s))}}}}function h(e,i,o,a){if(!i.length)return null;var s=a?t:n,l=s(i).split(/\r|\n\r?/);e:for(var c=o.line,u=o.ch,d=e.firstLine()-1+l.length;c>=d;c--,u=-1){var p=e.getLine(c);u>-1&&(p=p.slice(0,u));var h=s(p);if(1==l.length){var m=h.lastIndexOf(l[0]);if(-1==m)continue e;return{from:r(c,f(p,h,m,s)),to:r(c,f(p,h,m+l[0].length,s))}}var g=l[l.length-1];if(h.slice(0,g.length)==g){var v=1;for(o=c-l.length+1;v<l.length-1;v++)if(s(e.getLine(o+v))!=l[v])continue e;var y=e.getLine(c+1-l.length),b=s(y);if(b.slice(b.length-l[0].length)==l[0])return{from:r(c+1-l.length,f(y,b,y.length-l[0].length,s)),to:r(c,f(p,h,g.length,s))}}}}function m(e,t,n,i){var a;this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=e,n=n?e.clipPos(n):r(0,0),this.pos={from:n,to:n},"object"==typeof i?a=i.caseFold:(a=i,i=null),"string"==typeof t?(null==a&&(a=!1),this.matches=function(n,r){return(n?h:p)(e,t,r,a)}):(t=o(t,"gm"),i&&!1===i.multiline?this.matches=function(n,r){return(n?u:s)(e,t,r)}:this.matches=function(n,r){return(n?d:l)(e,t,r)})}String.prototype.normalize?(t=function(e){return e.normalize("NFD").toLowerCase()},n=function(e){return e.normalize("NFD")}):(t=function(e){return e.toLowerCase()},n=function(e){return e}),m.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){var n=this.doc.clipPos(t?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(n=r(n.line,n.ch),t?(n.ch--,n.ch<0&&(n.line--,n.ch=(this.doc.getLine(n.line)||"").length)):(n.ch++,n.ch>(this.doc.getLine(n.line)||"").length&&(n.ch=0,n.line++)),0!=e.cmpPos(n,this.doc.clipPos(n))))return this.atOccurrence=!1;var i=this.matches(t,n);if(this.afterEmptyMatch=i&&0==e.cmpPos(i.from,i.to),i)return this.pos=i,this.atOccurrence=!0,this.pos.match||!0;var o=r(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:o,to:o},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,n){if(this.atOccurrence){var i=e.splitLines(t);this.doc.replaceRange(i,this.pos.from,this.pos.to,n),this.pos.to=r(this.pos.from.line+i.length-1,i[i.length-1].length+(1==i.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",(function(e,t,n){return new m(this.doc,e,t,n)})),e.defineDocExtension("getSearchCursor",(function(e,t,n){return new m(this,e,t,n)})),e.defineExtension("selectMatches",(function(t,n){for(var r=[],i=this.getSearchCursor(t,this.getCursor("from"),n);i.findNext()&&!(e.cmpPos(i.to(),this.getCursor("to"))>0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)}))}(n(5237))},436(e,t,n){!function(e){"use strict";var t="CodeMirror-activeline",n="CodeMirror-activeline-background",r="CodeMirror-activeline-gutter";function i(e){for(var i=0;i<e.state.activeLines.length;i++)e.removeLineClass(e.state.activeLines[i],"wrap",t),e.removeLineClass(e.state.activeLines[i],"background",n),e.removeLineClass(e.state.activeLines[i],"gutter",r)}function o(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function a(e,a){for(var s=[],l=0;l<a.length;l++){var c=a[l],u=e.getOption("styleActiveLine");if("object"==typeof u&&u.nonEmpty?c.anchor.line==c.head.line:c.empty()){var d=e.getLineHandleVisualStart(c.head.line);s[s.length-1]!=d&&s.push(d)}}o(e.state.activeLines,s)||e.operation((function(){i(e);for(var o=0;o<s.length;o++)e.addLineClass(s[o],"wrap",t),e.addLineClass(s[o],"background",n),e.addLineClass(s[o],"gutter",r);e.state.activeLines=s}))}function s(e,t){a(e,t.ranges)}e.defineOption("styleActiveLine",!1,(function(t,n,r){var o=r!=e.Init&&r;n!=o&&(o&&(t.off("beforeSelectionChange",s),i(t),delete t.state.activeLines),n&&(t.state.activeLines=[],a(t,t.listSelections()),t.on("beforeSelectionChange",s)))}))}(n(5237))},9533(e,t,n){!function(e){"use strict";function t(e){e.state.markedSelection&&e.operation((function(){c(e)}))}function n(e){e.state.markedSelection&&e.state.markedSelection.length&&e.operation((function(){s(e)}))}e.defineOption("styleSelectedText",!1,(function(r,i,o){var a=o&&o!=e.Init;i&&!a?(r.state.markedSelection=[],r.state.markedSelectionStyle="string"==typeof i?i:"CodeMirror-selectedtext",l(r),r.on("cursorActivity",t),r.on("change",n)):!i&&a&&(r.off("cursorActivity",t),r.off("change",n),s(r),r.state.markedSelection=r.state.markedSelectionStyle=null)}));var r=8,i=e.Pos,o=e.cmpPos;function a(e,t,n,a){if(0!=o(t,n))for(var s=e.state.markedSelection,l=e.state.markedSelectionStyle,c=t.line;;){var u=c==t.line?t:i(c,0),d=c+r,f=d>=n.line,p=f?n:i(d,0),h=e.markText(u,p,{className:l});if(null==a?s.push(h):s.splice(a++,0,h),f)break;c=d}}function s(e){for(var t=e.state.markedSelection,n=0;n<t.length;++n)t[n].clear();t.length=0}function l(e){s(e);for(var t=e.listSelections(),n=0;n<t.length;n++)a(e,t[n].from(),t[n].to())}function c(e){if(!e.somethingSelected())return s(e);if(e.listSelections().length>1)return l(e);var t=e.getCursor("start"),n=e.getCursor("end"),i=e.state.markedSelection;if(!i.length)return a(e,t,n);var c=i[0].find(),u=i[i.length-1].find();if(!c||!u||n.line-t.line<=r||o(t,u.to)>=0||o(n,c.from)<=0)return l(e);for(;o(t,c.from)>0;)i.shift().clear(),c=i[0].find();for(o(t,c.from)<0&&(c.to.line-t.line<r?(i.shift().clear(),a(e,t,c.to,0)):a(e,t,c.from,0));o(n,u.to)<0;)i.pop().clear(),u=i[i.length-1].find();o(n,u.to)>0&&(n.line-u.from.line<r?(i.pop().clear(),a(e,u.from,n)):a(e,u.to,n))}}(n(5237))},6209(e,t,n){!function(e){"use strict";function t(e,t){var n=e.state.selectionPointer;(null==t.buttons?t.which:t.buttons)?n.mouseX=n.mouseY=null:(n.mouseX=t.clientX,n.mouseY=t.clientY),i(e)}function n(e,t){if(!e.getWrapperElement().contains(t.relatedTarget)){var n=e.state.selectionPointer;n.mouseX=n.mouseY=null,i(e)}}function r(e){e.state.selectionPointer.rects=null,i(e)}function i(e){e.state.selectionPointer.willUpdate||(e.state.selectionPointer.willUpdate=!0,setTimeout((function(){o(e),e.state.selectionPointer.willUpdate=!1}),50))}function o(e){var t=e.state.selectionPointer;if(t){if(null==t.rects&&null!=t.mouseX&&(t.rects=[],e.somethingSelected()))for(var n=e.display.selectionDiv.firstChild;n;n=n.nextSibling)t.rects.push(n.getBoundingClientRect());var r=!1;if(null!=t.mouseX)for(var i=0;i<t.rects.length;i++){var o=t.rects[i];o.left<=t.mouseX&&o.right>=t.mouseX&&o.top<=t.mouseY&&o.bottom>=t.mouseY&&(r=!0)}var a=r?t.value:"";e.display.lineDiv.style.cursor!=a&&(e.display.lineDiv.style.cursor=a)}}e.defineOption("selectionPointer",!1,(function(i,o){var a=i.state.selectionPointer;a&&(e.off(i.getWrapperElement(),"mousemove",a.mousemove),e.off(i.getWrapperElement(),"mouseout",a.mouseout),e.off(window,"scroll",a.windowScroll),i.off("cursorActivity",r),i.off("scroll",r),i.state.selectionPointer=null,i.display.lineDiv.style.cursor=""),o&&(a=i.state.selectionPointer={value:"string"==typeof o?o:"default",mousemove:function(e){t(i,e)},mouseout:function(e){n(i,e)},windowScroll:function(){r(i)},rects:null,mouseX:null,mouseY:null,willUpdate:!1},e.on(i.getWrapperElement(),"mousemove",a.mousemove),e.on(i.getWrapperElement(),"mouseout",a.mouseout),e.on(window,"scroll",a.windowScroll),i.on("cursorActivity",r),i.on("scroll",r))}))}(n(5237))},6666(e,t,n){!function(e){"use strict";e.TernServer=function(e){var t=this;this.options=e||{};var n=this.options.plugins||(this.options.plugins={});n.doc_comment||(n.doc_comment=!0),this.docs=Object.create(null),this.options.useWorker?this.server=new I(this):this.server=new tern.Server({getFile:function(e,n){return i(t,e,n)},async:!0,defs:this.options.defs||[],plugins:n}),this.trackChange=function(e,n){s(t,e,n)},this.cachedArgHints=null,this.activeArgHints=null,this.jumpStack=[],this.getHint=function(e,n){return c(t,e,n)},this.getHint.async=!0},e.TernServer.prototype={addDoc:function(t,n){var r={doc:n,name:t,changed:null};return this.server.addFile(t,z(this,r)),e.on(n,"change",this.trackChange),this.docs[t]=r},delDoc:function(t){var n=a(this,t);n&&(e.off(n.doc,"change",this.trackChange),delete this.docs[n.name],this.server.delFile(n.name))},hideDoc:function(e){D(this);var t=a(this,e);t&&t.changed&&l(this,t)},complete:function(e){e.showHint({hint:this.getHint})},showType:function(e,t,n){d(this,e,t,"type",n)},showDocs:function(e,t,n){d(this,e,t,"documentation",n)},updateArgHints:function(e){f(this,e)},jumpToDef:function(e){m(this,e)},jumpBack:function(e){g(this,e)},rename:function(e){x(this,e)},selectName:function(e){k(this,e)},request:function(e,t,n,r){var i=this,a=o(this,e.getDoc()),s=C(this,a,t,r),l=s.query&&this.options.queryOptions&&this.options.queryOptions[s.query.type];if(l)for(var c in l)s.query[c]=l[c];this.server.request(s,(function(e,r){!e&&i.options.responseFilter&&(r=i.options.responseFilter(a,t,s,e,r)),n(e,r)}))},destroy:function(){D(this),this.worker&&(this.worker.terminate(),this.worker=null)}};var t=e.Pos,n="CodeMirror-Tern-",r=250;function i(e,t,n){var r=e.docs[t];r?n(z(e,r)):e.options.getFile?e.options.getFile(t,n):n(null)}function o(e,t,n){for(var r in e.docs){var i=e.docs[r];if(i.doc==t)return i}if(!n)for(var o=0;;++o)if(r="[doc"+(o||"")+"]",!e.docs[r]){n=r;break}return e.addDoc(n,t)}function a(t,n){return"string"==typeof n?t.docs[n]:(n instanceof e&&(n=n.getDoc()),n instanceof e.Doc?o(t,n):void 0)}function s(e,t,n){var i=o(e,t),a=e.cachedArgHints;a&&a.doc==t&&M(a.start,n.to)>=0&&(e.cachedArgHints=null);var s=i.changed;null==s&&(i.changed=s={from:n.from.line,to:n.from.line});var c=n.from.line+(n.text.length-1);n.from.line<s.to&&(s.to=s.to-(n.to.line-c)),c>=s.to&&(s.to=c+1),s.from>n.from.line&&(s.from=n.from.line),t.lineCount()>r&&n.to-s.from>100&&setTimeout((function(){i.changed&&i.changed.to-i.changed.from>100&&l(e,i)}),200)}function l(e,t){e.server.request({files:[{type:"full",name:t.name,text:z(e,t)}]},(function(e){e?window.console.error(e):t.changed=null}))}function c(r,i,o){r.request(i,{type:"completions",types:!0,docs:!0,urls:!0},(function(a,s){if(a)return F(r,i,a);var l=[],c="",d=s.start,f=s.end;'["'==i.getRange(t(d.line,d.ch-2),d)&&'"]'!=i.getRange(f,t(f.line,f.ch+2))&&(c='"]');for(var p=0;p<s.completions.length;++p){var h=s.completions[p],m=u(h.type);s.guess&&(m+=" "+n+"guess"),l.push({text:h.name+c,displayText:h.displayName||h.name,className:m,data:h})}var g={from:d,to:f,list:l},v=null;e.on(g,"close",(function(){N(v)})),e.on(g,"update",(function(){N(v)})),e.on(g,"select",(function(e,t){N(v);var o=r.options.completionTip?r.options.completionTip(e.data):e.data.doc;o&&(v=E(t.parentNode.getBoundingClientRect().right+window.pageXOffset,t.getBoundingClientRect().top+window.pageYOffset,o,i,n+"hint-doc"))})),o(g)}))}function u(e){var t;return t="?"==e?"unknown":"number"==e||"string"==e||"bool"==e?e:/^fn\(/.test(e)?"fn":/^\[/.test(e)?"array":"object",n+"completion "+n+"completion-"+t}function d(e,t,n,r,i){e.request(t,r,(function(n,r){if(n)return F(e,t,n);if(e.options.typeTip)var o=e.options.typeTip(r);else if(o=L("span",null,L("strong",null,r.type||"not found")),r.doc&&o.appendChild(document.createTextNode(" â€” "+r.doc)),r.url){o.appendChild(document.createTextNode(" "));var a=o.appendChild(L("a",null,"[docs]"));a.href=r.url,a.target="_blank"}A(t,o,e),i&&i()}),n)}function f(n,r){if(D(n),!r.somethingSelected()){var i=r.getTokenAt(r.getCursor()).state,o=e.innerMode(r.getMode(),i);if("javascript"==o.mode.name){var a=o.state.lexical;if("call"==a.info){for(var s,l=a.pos||0,c=r.getOption("tabSize"),u=r.getCursor().line,d=Math.max(0,u-9),f=!1;u>=d;--u){for(var m=r.getLine(u),g=0,v=0;;){var y=m.indexOf("\t",v);if(-1==y)break;g+=c-(y+g)%c-1,v=y+1}if(s=a.column-g,"("==m.charAt(s)){f=!0;break}}if(f){var b=t(u,s),x=n.cachedArgHints;if(x&&x.doc==r.getDoc()&&0==M(b,x.start))return p(n,r,l);n.request(r,{type:"type",preferFunction:!0,end:b},(function(e,t){!e&&t.type&&/^fn\(/.test(t.type)&&(n.cachedArgHints={start:b,type:h(t.type),name:t.exprName||t.name||"fn",guess:t.guess,doc:r.getDoc()},p(n,r,l))}))}}}}}function p(e,t,r){D(e);for(var i=e.cachedArgHints,o=i.type,a=L("span",i.guess?n+"fhint-guess":null,L("span",n+"fname",i.name),"("),s=0;s<o.args.length;++s){s&&a.appendChild(document.createTextNode(", "));var l=o.args[s];a.appendChild(L("span",n+"farg"+(s==r?" "+n+"farg-current":""),l.name||"?")),"?"!=l.type&&(a.appendChild(document.createTextNode(":Â ")),a.appendChild(L("span",n+"type",l.type)))}a.appendChild(document.createTextNode(o.rettype?") ->Â ":")")),o.rettype&&a.appendChild(L("span",n+"type",o.rettype));var c=t.cursorCoords(null,"page"),u=e.activeArgHints=E(c.right+1,c.bottom,a,t);setTimeout((function(){u.clear=O(t,(function(){e.activeArgHints==u&&D(e)}))}),20)}function h(e){var t=[],n=3;function r(t){for(var r=0,i=n;;){var o=e.charAt(n);if(t.test(o)&&!r)return e.slice(i,n);/[{\[\(]/.test(o)?++r:/[}\]\)]/.test(o)&&--r,++n}}if(")"!=e.charAt(n))for(;;){var i=e.slice(n).match(/^([^, \(\[\{]+): /);if(i&&(n+=i[0].length,i=i[1]),t.push({name:i,type:r(/[\),]/)}),")"==e.charAt(n))break;n+=2}var o=e.slice(n).match(/^\) -> (.*)$/);return{args:t,rettype:o&&o[1]}}function m(e,t){function n(n){var r={type:"definition",variable:n||null},i=o(e,t.getDoc());e.server.request(C(e,i,r),(function(n,r){if(n)return F(e,t,n);if(r.file||!r.url){if(r.file){var o,a=e.docs[r.file];if(a&&(o=y(a.doc,r)))return e.jumpStack.push({file:i.name,start:t.getCursor("from"),end:t.getCursor("to")}),void v(e,i,a,o.start,o.end)}F(e,t,"Could not find a definition.")}else window.open(r.url)}))}b(t)?n():T(t,"Jump to variable",(function(e){e&&n(e)}))}function g(e,t){var n=e.jumpStack.pop(),r=n&&e.docs[n.file];r&&v(e,o(e,t.getDoc()),r,n.start,n.end)}function v(e,t,n,r,i){n.doc.setSelection(r,i),t!=n&&e.options.switchToDoc&&(D(e),e.options.switchToDoc(n.name,n.doc))}function y(e,n){for(var r=n.context.slice(0,n.contextOffset).split("\n"),i=n.start.line-(r.length-1),o=t(i,(1==r.length?n.start.ch:e.getLine(i).length)-r[0].length),a=e.getLine(i).slice(o.ch),s=i+1;s<e.lineCount()&&a.length<n.context.length;++s)a+="\n"+e.getLine(s);if(a.slice(0,n.context.length)==n.context)return n;for(var l,c=e.getSearchCursor(n.context,0,!1),u=1/0;c.findNext();){var d=c.from(),f=1e4*Math.abs(d.line-o.line);f||(f=Math.abs(d.ch-o.ch)),f<u&&(l=d,u=f)}if(!l)return null;if(1==r.length?l.ch+=r[0].length:l=t(l.line+(r.length-1),r[r.length-1].length),n.start.line==n.end.line)var p=t(l.line,l.ch+(n.end.ch-n.start.ch));else p=t(l.line+(n.end.line-n.start.line),n.end.ch);return{start:l,end:p}}function b(e){var t=e.getCursor("end"),n=e.getTokenAt(t);return!(n.start<t.ch&&"comment"==n.type)&&/[\w)\]]/.test(e.getLine(t.line).slice(Math.max(t.ch-1,0),t.ch+1))}function x(e,t){var n=t.getTokenAt(t.getCursor());if(!/\w/.test(n.string))return F(e,t,"Not at a variable");T(t,"New name for "+n.string,(function(n){e.request(t,{type:"rename",newName:n,fullDocs:!0},(function(n,r){if(n)return F(e,t,n);_(e,r.changes)}))}))}function k(e,t){var n=o(e,t.doc).name;e.request(t,{type:"refs"},(function(r,i){if(r)return F(e,t,r);for(var o=[],a=0,s=t.getCursor(),l=0;l<i.refs.length;l++){var c=i.refs[l];c.file==n&&(o.push({anchor:c.start,head:c.end}),M(s,c.start)>=0&&M(s,c.end)<=0&&(a=o.length-1))}t.setSelections(o,a)}))}var w=0;function _(e,t){for(var n=Object.create(null),r=0;r<t.length;++r)(n[(l=t[r]).file]||(n[l.file]=[])).push(l);for(var i in n){var o=e.docs[i],a=n[i];if(o){a.sort((function(e,t){return M(t.start,e.start)}));var s="*rename"+ ++w;for(r=0;r<a.length;++r){var l=a[r];o.doc.replaceRange(l.text,l.start,l.end,s)}}}}function C(e,n,i,o){var a=[],s=0,l=!i.fullDocs;l||delete i.fullDocs,"string"==typeof i&&(i={type:i}),i.lineCharPositions=!0,null==i.end&&(i.end=o||n.doc.getCursor("end"),n.doc.somethingSelected()&&(i.start=n.doc.getCursor("start")));var c=i.start||i.end;for(var u in n.changed?n.doc.lineCount()>r&&!1!==l&&n.changed.to-n.changed.from<100&&n.changed.from<=c.line&&n.changed.to>i.end.line?(a.push(S(n,c,i.end)),i.file="#0",s=a[0].offsetLines,null!=i.start&&(i.start=t(i.start.line- -s,i.start.ch)),i.end=t(i.end.line-s,i.end.ch)):(a.push({type:"full",name:n.name,text:z(e,n)}),i.file=n.name,n.changed=null):i.file=n.name,e.docs){var d=e.docs[u];d.changed&&d!=n&&(a.push({type:"full",name:d.name,text:z(e,d)}),d.changed=null)}return{query:i,files:a}}function S(n,r,i){for(var o,a=n.doc,s=null,l=null,c=4,u=r.line-1,d=Math.max(0,u-50);u>=d;--u){var f=a.getLine(u);if(!(f.search(/\bfunction\b/)<0)){var p=e.countColumn(f,null,c);null!=s&&s<=p||(s=p,l=u)}}null==l&&(l=d);var h=Math.min(a.lastLine(),i.line+20);if(null==s||s==e.countColumn(a.getLine(r.line),null,c))o=h;else for(o=i.line+1;o<h&&!((p=e.countColumn(a.getLine(o),null,c))<=s);++o);var m=t(l,0);return{type:"part",name:n.name,offsetLines:m.line,text:a.getRange(m,t(o,i.line==o?null:0))}}var M=e.cmpPos;function L(e,t){var n=document.createElement(e);t&&(n.className=t);for(var r=2;r<arguments.length;++r){var i=arguments[r];"string"==typeof i&&(i=document.createTextNode(i)),n.appendChild(i)}return n}function T(e,t,n){if(e.openDialog){var r=document.createDocumentFragment();r.appendChild(document.createTextNode(t+": "));var i=document.createElement("input");i.type="text",r.appendChild(i),e.openDialog(r,n)}else n(prompt(t,""))}function A(t,n,r){t.state.ternTooltip&&N(t.state.ternTooltip);var i=t.cursorCoords(),o=t.state.ternTooltip=E(i.right+1,i.bottom,n,t);function a(){c=!0,l||s()}function s(){t.state.ternTooltip=null,o.parentNode&&P(o),u()}var l=!1,c=!1;e.on(o,"mousemove",(function(){l=!0})),e.on(o,"mouseout",(function(t){var n=t.relatedTarget||t.toElement;n&&e.contains(o,n)||(c?s():l=!1)})),setTimeout(a,r.options.hintDelay?r.options.hintDelay:1700);var u=O(t,s)}function O(e,t){return e.on("cursorActivity",t),e.on("blur",t),e.on("scroll",t),e.on("setDoc",t),function(){e.off("cursorActivity",t),e.off("blur",t),e.off("scroll",t),e.off("setDoc",t)}}function E(e,t,r,i,o){var a=L("div",n+"tooltip "+(o||""),r);a.style.left=e+"px",a.style.top=t+"px",(((i.options||{}).hintOptions||{}).container||document.body).appendChild(a);var s=i.cursorCoords(),l=window.innerWidth,c=window.innerHeight,u=a.getBoundingClientRect(),d=document.querySelector(".CodeMirror-hints"),f=u.bottom-c,p=u.right-l;if(d&&p>0&&(a.style.left=0,u=a.getBoundingClientRect(),a.style.left=(e=e-d.offsetWidth-u.width)+"px",p=u.right-l),f>0){var h=u.bottom-u.top;s.top-(s.bottom-u.top)-h>0?a.style.top=s.top-h+"px":h>c&&(a.style.height=c-5+"px",a.style.top=s.bottom-u.top+"px")}return p>0&&(u.right-u.left>l&&(a.style.width=l-5+"px",p-=u.right-u.left-l),a.style.left=e-p+"px"),a}function N(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function P(e){e.style.opacity="0",setTimeout((function(){N(e)}),1100)}function F(e,t,n){e.options.showError?e.options.showError(t,n):A(t,String(n),e)}function D(e){e.activeArgHints&&(e.activeArgHints.clear&&e.activeArgHints.clear(),N(e.activeArgHints),e.activeArgHints=null)}function z(e,t){var n=t.doc.getValue();return e.options.fileFilter&&(n=e.options.fileFilter(n,t.name,t.doc)),n}function I(e){var t=e.worker=new Worker(e.options.workerScript);t.postMessage({type:"init",defs:e.options.defs,plugins:e.options.plugins,scripts:e.options.workerDeps});var n=0,r={};function o(e,i){i&&(e.id=++n,r[n]=i),t.postMessage(e)}t.onmessage=function(t){var n=t.data;"getFile"==n.type?i(e,n.name,(function(e,t){o({type:"getFile",err:String(e),text:t,id:n.id})})):"debug"==n.type?window.console.log(n.message):n.id&&r[n.id]&&(r[n.id](n.err,n.body),delete r[n.id])},t.onerror=function(e){for(var t in r)r[t](e);r={}},this.addFile=function(e,t){o({type:"add",name:e,text:t})},this.delFile=function(e){o({type:"del",name:e})},this.request=function(e,t){o({type:"req",body:e},t)}}}(n(5237))},7604(){var e;var t=0,n={};function r(e,r){postMessage({type:"getFile",name:e,id:++t}),n[t]=r}},3874(e,t,n){!function(e){"use strict";var t=e.Pos;function n(e,t,n){for(var r=n.paragraphStart||e.getHelper(t,"paragraphStart"),i=t.line,o=e.firstLine();i>o;--i){var a=e.getLine(i);if(r&&r.test(a))break;if(!/\S/.test(a)){++i;break}}for(var s=n.paragraphEnd||e.getHelper(t,"paragraphEnd"),l=t.line+1,c=e.lastLine();l<=c;++l){if(a=e.getLine(l),s&&s.test(a)){++l;break}if(!/\S/.test(a))break}return{from:i,to:l}}function r(e,t,n,r,i){for(var o=t;o<e.length&&" "==e.charAt(o);)o++;for(;o>0&&!n.test(e.slice(o-1,o+1));--o);if(!i&&o<=e.match(/^[ \t]*/)[0].length)for(o=t+1;o<e.length-1&&!n.test(e.slice(o-1,o+1));++o);for(var a=!0;;a=!1){var s=o;if(r)for(;" "==e.charAt(s-1);)--s;if(0!=s||!a)return{from:s,to:o};o=t}}function i(n,i,o,a){i=n.clipPos(i),o=n.clipPos(o);var s=a.column||80,l=a.wrapOn||/\s\S|-[^\.\d]/,c=!1!==a.forceBreak,u=!1!==a.killTrailingSpace,d=[],f="",p=i.line,h=n.getRange(i,o,!1);if(!h.length)return null;var m=h[0].match(/^[ \t]*/)[0];m.length>=s&&(s=m.length+1);for(var g=0;g<h.length;++g){var v=h[g],y=f.length,b=0;f&&v&&!l.test(f.charAt(f.length-1)+v.charAt(0))&&(f+=" ",b=1);var x="";if(g&&(x=v.match(/^\s*/)[0],v=v.slice(x.length)),f+=v,g){var k=f.length>s&&m==x&&r(f,s,l,u,c);k&&k.from==y&&k.to==y+b?(f=m+v,++p):d.push({text:[b?" ":""],from:t(p,y),to:t(p+1,x.length)})}for(;f.length>s;){var w=r(f,s,l,u,c);if(!(w.from!=w.to||c&&m!==f.slice(0,w.to)))break;d.push({text:["",m],from:t(p,w.from),to:t(p,w.to)}),f=m+f.slice(w.to),++p}}return d.length&&n.operation((function(){for(var t=0;t<d.length;++t){var r=d[t];(r.text||e.cmpPos(r.from,r.to))&&n.replaceRange(r.text,r.from,r.to)}})),d.length?{from:d[0].from,to:e.changeEnd(d[d.length-1])}:null}e.defineExtension("wrapParagraph",(function(e,r){r=r||{},e||(e=this.getCursor());var o=n(this,e,r);return i(this,t(o.from,0),t(o.to-1),r)})),e.commands.wrapLines=function(e){e.operation((function(){for(var r=e.listSelections(),o=e.lastLine()+1,a=r.length-1;a>=0;a--){var s,l=r[a];if(l.empty()){var c=n(e,l.head,{});s={from:t(c.from,0),to:t(c.to-1)}}else s={from:l.from(),to:l.to()};s.to.line>=o||(o=s.from.line,i(e,s.from,s.to,{}))}}))},e.defineExtension("wrapRange",(function(e,t,n){return i(this,e,t,n||{})})),e.defineExtension("wrapParagraphsInRange",(function(e,r,o){o=o||{};for(var a=this,s=[],l=e.line;l<=r.line;){var c=n(a,t(l,0),o);s.push(c),l=c.to}var u=!1;return s.length&&a.operation((function(){for(var e=s.length-1;e>=0;--e)u=u||i(a,t(s[e].from,0),t(s[e].to-1),o)})),u}))}(n(5237))},3944(e,t,n){!function(e){"use strict";var t=e.commands,n=e.Pos;function r(e,t){return e.line==t.line&&e.ch==t.ch}var i=[];function o(e){i.push(e),i.length>50&&i.shift()}function a(e){if(!i.length)return o(e);i[i.length-1]+=e}function s(e){return i[i.length-(e?Math.min(e,1):1)]||""}function l(){return i.length>1&&i.pop(),s()}var c=null;function u(e,t,n,i,s){null==s&&(s=e.getRange(t,n)),"grow"==i&&c&&c.cm==e&&r(t,c.pos)&&e.isClean(c.gen)?a(s):!1!==i&&o(s),e.replaceRange("",t,n,"+delete"),c="grow"==i?{cm:e,pos:t,gen:e.changeGeneration()}:null}function d(e,t,n){return e.findPosH(t,n,"char",!0)}function f(e,t,n){return e.findPosH(t,n,"word",!0)}function p(e,t,n){return e.findPosV(t,n,"line",e.doc.sel.goalColumn)}function h(e,t,n){return e.findPosV(t,n,"page",e.doc.sel.goalColumn)}function m(e,t,r){for(var i=t.line,o=e.getLine(i),a=/\S/.test(r<0?o.slice(0,t.ch):o.slice(t.ch)),s=e.firstLine(),l=e.lastLine();;){if((i+=r)<s||i>l)return e.clipPos(n(i-r,r<0?0:null));if(o=e.getLine(i),/\S/.test(o))a=!0;else if(a)return n(i,0)}}function g(e,t,r){for(var i=t.line,o=t.ch,a=e.getLine(t.line),s=!1;;){var l=a.charAt(o+(r<0?-1:0));if(l){if(s&&/[!?.]/.test(l))return n(i,o+(r>0?1:0));s||(s=/\w/.test(l)),o+=r}else{if(i==(r<0?e.firstLine():e.lastLine()))return n(i,o);if(a=e.getLine(i+r),!/\S/.test(a))return n(i,o);i+=r,o=r<0?a.length:0}}}function v(e,t,i){var o;if(e.findMatchingBracket&&(o=e.findMatchingBracket(t,{strict:!0}))&&o.match&&(o.forward?1:-1)==i)return i>0?n(o.to.line,o.to.ch+1):o.to;for(var a=!0;;a=!1){var s=e.getTokenAt(t),l=n(t.line,i<0?s.start:s.end);if(!(a&&i>0&&s.end==t.ch)&&/\w/.test(s.string))return l;var c=e.findPosH(l,i,"char");if(r(l,c))return t;t=c}}function y(e,t){var n=e.state.emacsPrefix;return n?(L(e),"-"==n?-1:Number(n)):t?null:1}function b(e){var t="string"==typeof e?function(t){t.execCommand(e)}:e;return function(e){var n=y(e);t(e);for(var r=1;r<n;++r)t(e)}}function x(e,t,n,i){var o=y(e);o<0&&(i=-i,o=-o);for(var a=0;a<o;++a){var s=n(e,t,i);if(r(s,t))break;t=s}return t}function k(e,t){var n=function(n){n.extendSelection(x(n,n.getCursor(),e,t))};return n.motion=!0,n}function w(e,t,n,r){for(var i,o=e.listSelections(),a=o.length;a--;)u(e,i=o[a].head,x(e,i,t,n),r)}function _(e,t){if(e.somethingSelected()){for(var n,r=e.listSelections(),i=r.length;i--;)u(e,(n=r[i]).anchor,n.head,t);return!0}}function C(e,t){e.state.emacsPrefix?"-"!=t&&(e.state.emacsPrefix+=t):(e.state.emacsPrefix=t,e.on("keyHandled",M),e.on("inputRead",T))}var S={"Alt-G":!0,"Ctrl-X":!0,"Ctrl-Q":!0,"Ctrl-U":!0};function M(e,t){e.state.emacsPrefixMap||S.hasOwnProperty(t)||L(e)}function L(e){e.state.emacsPrefix=null,e.off("keyHandled",M),e.off("inputRead",T)}function T(e,t){var n=y(e);if(n>1&&"+input"==t.origin){for(var r=t.text.join("\n"),i="",o=1;o<n;++o)i+=r;e.replaceSelection(i)}}function A(e,t){("string"!=typeof t||!/^\d$/.test(t)&&"Ctrl-U"!=t)&&(e.removeKeyMap(z),e.state.emacsPrefixMap=!1,e.off("keyHandled",A),e.off("inputRead",A))}function O(e){e.setExtending(!1),e.setCursor(e.getCursor())}function E(e){var t=document.createDocumentFragment(),n=document.createElement("input");return n.setAttribute("type","text"),n.style.width="10em",t.appendChild(document.createTextNode(e+": ")),t.appendChild(n),t}function N(e,t,n){e.openDialog?e.openDialog(E(t),n,{bottom:!0}):n(prompt(t,""))}function P(e,t){var n=e.getCursor(),r=e.findPosH(n,1,"word");e.replaceRange(t(e.getRange(n,r)),n,r),e.setCursor(r)}function F(e){for(var t=e.getCursor(),r=t.line,i=t.ch,o=[];r>=e.firstLine();){for(var a=e.getLine(r),s=null==i?a.length:i;s>0;)if(")"==(i=a.charAt(--s)))o.push("(");else if("]"==i)o.push("[");else if("}"==i)o.push("{");else if(/[\(\{\[]/.test(i)&&(!o.length||o.pop()!=i))return e.extendSelection(n(r,s));--r,i=null}}t.setMark=function(e){e.setCursor(e.getCursor()),e.setExtending(!e.getExtending()),e.on("change",(function(){e.setExtending(!1)}))},t.killRegion=function(e){u(e,e.getCursor("start"),e.getCursor("end"),!0)},t.killLineEmacs=b((function(e){var t=e.getCursor(),r=e.clipPos(n(t.line)),i=e.getRange(t,r);/\S/.test(i)||(i+="\n",r=n(t.line+1,0)),u(e,t,r,"grow",i)})),t.killRingSave=function(e){o(e.getSelection()),O(e)},t.yank=function(e){var t=e.getCursor();e.replaceRange(s(y(e)),t,t,"paste"),e.setSelection(t,e.getCursor())},t.yankPop=function(e){e.replaceSelection(l(),"around","paste")},t.forwardChar=k(d,1),t.backwardChar=k(d,-1),t.deleteChar=function(e){w(e,d,1,!1)},t.deleteForwardChar=function(e){_(e,!1)||w(e,d,1,!1)},t.deleteBackwardChar=function(e){_(e,!1)||w(e,d,-1,!1)},t.forwardWord=k(f,1),t.backwardWord=k(f,-1),t.killWord=function(e){w(e,f,1,"grow")},t.backwardKillWord=function(e){w(e,f,-1,"grow")},t.nextLine=k(p,1),t.previousLine=k(p,-1),t.scrollDownCommand=k(h,-1),t.scrollUpCommand=k(h,1),t.backwardParagraph=k(m,-1),t.forwardParagraph=k(m,1),t.backwardSentence=k(g,-1),t.forwardSentence=k(g,1),t.killSentence=function(e){w(e,g,1,"grow")},t.backwardKillSentence=function(e){u(e,e.getCursor(),g(e,e.getCursor(),1),"grow")},t.killSexp=function(e){w(e,v,1,"grow")},t.backwardKillSexp=function(e){w(e,v,-1,"grow")},t.forwardSexp=k(v,1),t.backwardSexp=k(v,-1),t.markSexp=function(e){var t=e.getCursor();e.setSelection(x(e,t,v,1),t)},t.transposeSexps=function(e){var t=v(e,e.getCursor(),-1),n=v(e,t,1),r=v(e,n,1),i=v(e,r,-1);e.replaceRange(e.getRange(i,r)+e.getRange(n,i)+e.getRange(t,n),t,r)},t.backwardUpList=b(F),t.justOneSpace=function(e){for(var t=e.getCursor(),r=t.ch,i=t.ch,o=e.getLine(t.line);r&&/\s/.test(o.charAt(r-1));)--r;for(;i<o.length&&/\s/.test(o.charAt(i));)++i;e.replaceRange(" ",n(t.line,r),n(t.line,i))},t.openLine=b((function(e){e.replaceSelection("\n","start")})),t.transposeCharsRepeatable=b((function(e){e.execCommand("transposeChars")})),t.capitalizeWord=b((function(e){P(e,(function(e){var t=e.search(/\w/);return-1==t?e:e.slice(0,t)+e.charAt(t).toUpperCase()+e.slice(t+1).toLowerCase()}))})),t.upcaseWord=b((function(e){P(e,(function(e){return e.toUpperCase()}))})),t.downcaseWord=b((function(e){P(e,(function(e){return e.toLowerCase()}))})),t.undoRepeatable=b("undo"),t.keyboardQuit=function(e){e.execCommand("clearSearch"),O(e)},t.newline=b((function(e){e.replaceSelection("\n","end")})),t.gotoLine=function(e){var t=y(e,!0);if(null!=t&&t>0)return e.setCursor(t-1);N(e,"Goto line",(function(t){var n;t&&!isNaN(n=Number(t))&&n==(0|n)&&n>0&&e.setCursor(n-1)}))},t.indentRigidly=function(e){e.indentSelection(y(e,!0)||e.getOption("indentUnit"))},t.exchangePointAndMark=function(e){e.setSelection(e.getCursor("head"),e.getCursor("anchor"))},t.quotedInsertTab=b("insertTab"),t.universalArgument=function(e){e.state.emacsPrefixMap=!0,e.addKeyMap(z),e.on("keyHandled",A),e.on("inputRead",A)},e.emacs={kill:u,killRegion:_,repeated:b};var D=e.keyMap.emacs=e.normalizeKeyMap({"Ctrl-W":"killRegion","Ctrl-K":"killLineEmacs","Alt-W":"killRingSave","Ctrl-Y":"yank","Alt-Y":"yankPop","Ctrl-Space":"setMark","Ctrl-Shift-2":"setMark","Ctrl-F":"forwardChar","Ctrl-B":"backwardChar",Right:"forwardChar",Left:"backwardChar","Ctrl-D":"deleteChar",Delete:"deleteForwardChar","Ctrl-H":"deleteBackwardChar",Backspace:"deleteBackwardChar","Alt-F":"forwardWord","Alt-B":"backwardWord","Alt-Right":"forwardWord","Alt-Left":"backwardWord","Alt-D":"killWord","Alt-Backspace":"backwardKillWord","Ctrl-N":"nextLine","Ctrl-P":"previousLine",Down:"nextLine",Up:"previousLine","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd",End:"goLineEnd",Home:"goLineStart","Alt-V":"scrollDownCommand","Ctrl-V":"scrollUpCommand",PageUp:"scrollDownCommand",PageDown:"scrollUpCommand","Ctrl-Up":"backwardParagraph","Ctrl-Down":"forwardParagraph","Alt-{":"backwardParagraph","Alt-}":"forwardParagraph","Alt-A":"backwardSentence","Alt-E":"forwardSentence","Alt-K":"killSentence","Ctrl-X Delete":"backwardKillSentence","Ctrl-Alt-K":"killSexp","Ctrl-Alt-Backspace":"backwardKillSexp","Ctrl-Alt-F":"forwardSexp","Ctrl-Alt-B":"backwardSexp","Shift-Ctrl-Alt-2":"markSexp","Ctrl-Alt-T":"transposeSexps","Ctrl-Alt-U":"backwardUpList","Alt-Space":"justOneSpace","Ctrl-O":"openLine","Ctrl-T":"transposeCharsRepeatable","Alt-C":"capitalizeWord","Alt-U":"upcaseWord","Alt-L":"downcaseWord","Alt-;":"toggleComment","Ctrl-/":"undoRepeatable","Shift-Ctrl--":"undoRepeatable","Ctrl-Z":"undoRepeatable","Cmd-Z":"undoRepeatable","Ctrl-X U":"undoRepeatable","Shift-Ctrl-Z":"redo","Shift-Alt-,":"goDocStart","Shift-Alt-.":"goDocEnd","Ctrl-S":"findPersistentNext","Ctrl-R":"findPersistentPrev","Ctrl-G":"keyboardQuit","Shift-Alt-5":"replace","Alt-/":"autocomplete",Enter:"newlineAndIndent","Ctrl-J":"newline",Tab:"indentAuto","Alt-G G":"gotoLine","Ctrl-X Tab":"indentRigidly","Ctrl-X Ctrl-X":"exchangePointAndMark","Ctrl-X Ctrl-S":"save","Ctrl-X Ctrl-W":"save","Ctrl-X S":"saveAll","Ctrl-X F":"open","Ctrl-X K":"close","Ctrl-X H":"selectAll","Ctrl-Q Tab":"quotedInsertTab","Ctrl-U":"universalArgument",fallthrough:"default"}),z={"Ctrl-G":L};function I(e){z[e]=function(t){C(t,e)},D["Ctrl-"+e]=function(t){C(t,e)},S["Ctrl-"+e]=!0}for(var R=0;R<10;++R)I(String(R));I("-")}(n(5237))},8208(e,t,n){!function(e){"use strict";var t=e.commands,n=e.Pos;function r(t,r,i){if(i<0&&0==r.ch)return t.clipPos(n(r.line-1));var o=t.getLine(r.line);if(i>0&&r.ch>=o.length)return t.clipPos(n(r.line+1,0));for(var a,s="start",l=r.ch,c=l,u=i<0?0:o.length,d=0;c!=u;c+=i,d++){var f=o.charAt(i<0?c-1:c),p="_"!=f&&e.isWordChar(f)?"w":"o";if("w"==p&&f.toUpperCase()==f&&(p="W"),"start"==s)"o"!=p?(s="in",a=p):l=c+i;else if("in"==s&&a!=p){if("w"==a&&"W"==p&&i<0&&c--,"W"==a&&"w"==p&&i>0){if(c==l+1){a="w";continue}c--}break}}return n(r.line,c)}function i(e,t){e.extendSelectionsBy((function(n){return e.display.shift||e.doc.extend||n.empty()?r(e.doc,n.head,t):t<0?n.from():n.to()}))}function o(t,r){if(t.isReadOnly())return e.Pass;t.operation((function(){for(var e=t.listSelections().length,i=[],o=-1,a=0;a<e;a++){var s=t.listSelections()[a].head;if(!(s.line<=o)){var l=n(s.line+(r?0:1),0);t.replaceRange("\n",l,null,"+insertLine"),t.indentLine(l.line,null,!0),i.push({head:l,anchor:l}),o=s.line+1}}t.setSelections(i)})),t.execCommand("indentAuto")}function a(t,r){for(var i=r.ch,o=i,a=t.getLine(r.line);i&&e.isWordChar(a.charAt(i-1));)--i;for(;o<a.length&&e.isWordChar(a.charAt(o));)++o;return{from:n(r.line,i),to:n(r.line,o),word:a.slice(i,o)}}function s(e,t){for(var n=e.listSelections(),r=[],i=0;i<n.length;i++){var o=n[i],a=e.findPosV(o.anchor,t,"line",o.anchor.goalColumn),s=e.findPosV(o.head,t,"line",o.head.goalColumn);a.goalColumn=null!=o.anchor.goalColumn?o.anchor.goalColumn:e.cursorCoords(o.anchor,"div").left,s.goalColumn=null!=o.head.goalColumn?o.head.goalColumn:e.cursorCoords(o.head,"div").left;var l={anchor:a,head:s};r.push(o),r.push(l)}e.setSelections(r)}function l(t,n,r){for(var i=0;i<t.length;i++)if(0==e.cmpPos(t[i].from(),n)&&0==e.cmpPos(t[i].to(),r))return!0;return!1}t.goSubwordLeft=function(e){i(e,-1)},t.goSubwordRight=function(e){i(e,1)},t.scrollLineUp=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top+t.clientHeight,"local");e.getCursor().line>=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},t.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=n&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},t.splitSelectionByLine=function(e){for(var t=e.listSelections(),r=[],i=0;i<t.length;i++)for(var o=t[i].from(),a=t[i].to(),s=o.line;s<=a.line;++s)a.line>o.line&&s==a.line&&0==a.ch||r.push({anchor:s==o.line?o:n(s,0),head:s==a.line?a:n(s)});e.setSelections(r,0)},t.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},t.selectLine=function(e){for(var t=e.listSelections(),r=[],i=0;i<t.length;i++){var o=t[i];r.push({anchor:n(o.from().line,0),head:n(o.to().line+1,0)})}e.setSelections(r)},t.insertLineAfter=function(e){return o(e,!1)},t.insertLineBefore=function(e){return o(e,!0)},t.selectNextOccurrence=function(t){var r=t.getCursor("from"),i=t.getCursor("to"),o=t.state.sublimeFindFullWord==t.doc.sel;if(0==e.cmpPos(r,i)){var s=a(t,r);if(!s.word)return;t.setSelection(s.from,s.to),o=!0}else{var c=t.getRange(r,i),u=o?new RegExp("\\b"+c+"\\b"):c,d=t.getSearchCursor(u,i),f=d.findNext();if(f||(f=(d=t.getSearchCursor(u,n(t.firstLine(),0))).findNext()),!f||l(t.listSelections(),d.from(),d.to()))return;t.addSelection(d.from(),d.to())}o&&(t.state.sublimeFindFullWord=t.doc.sel)},t.skipAndSelectNextOccurrence=function(n){var r=n.getCursor("anchor"),i=n.getCursor("head");t.selectNextOccurrence(n),0!=e.cmpPos(r,i)&&n.doc.setSelections(n.doc.listSelections().filter((function(e){return e.anchor!=r||e.head!=i})))},t.addCursorToPrevLine=function(e){s(e,-1)},t.addCursorToNextLine=function(e){s(e,1)};var c="(){}[]";function u(t){for(var r=t.listSelections(),i=[],o=0;o<r.length;o++){var a=r[o],s=a.head,l=t.scanForBracket(s,-1);if(!l)return!1;for(;;){var u=t.scanForBracket(s,1);if(!u)return!1;if(u.ch==c.charAt(c.indexOf(l.ch)+1)){var d=n(l.pos.line,l.pos.ch+1);if(0!=e.cmpPos(d,a.from())||0!=e.cmpPos(u.pos,a.to())){i.push({anchor:d,head:u.pos});break}if(!(l=t.scanForBracket(l.pos,-1)))return!1}s=n(u.pos.line,u.pos.ch+1)}}return t.setSelections(i),!0}function d(e){return e?/\bpunctuation\b/.test(e)?e:void 0:null}function f(t,r,i){if(t.isReadOnly())return e.Pass;for(var o,a=t.listSelections(),s=[],l=0;l<a.length;l++){var c=a[l];if(!c.empty()){for(var u=c.from().line,d=c.to().line;l<a.length-1&&a[l+1].from().line==d;)d=a[++l].to().line;a[l].to().ch||d--,s.push(u,d)}}s.length?o=!0:s.push(t.firstLine(),t.lastLine()),t.operation((function(){for(var e=[],a=0;a<s.length;a+=2){var l=s[a],c=s[a+1],u=n(l,0),d=n(c),f=t.getRange(u,d,!1);r?f.sort((function(e,t){return e<t?-i:e==t?0:i})):f.sort((function(e,t){var n=e.toUpperCase(),r=t.toUpperCase();return n!=r&&(e=n,t=r),e<t?-i:e==t?0:i})),t.replaceRange(f,u,d),o&&e.push({anchor:u,head:n(c+1,0)})}o&&t.setSelections(e,0)}))}function p(t,n){t.operation((function(){for(var r=t.listSelections(),i=[],o=[],s=0;s<r.length;s++)(c=r[s]).empty()?(i.push(s),o.push("")):o.push(n(t.getRange(c.from(),c.to())));var l;for(t.replaceSelections(o,"around","case"),s=i.length-1;s>=0;s--){var c=r[i[s]];if(!(l&&e.cmpPos(c.head,l)>0)){var u=a(t,c.head);l=u.from,t.replaceRange(n(u.word),u.from,u.to)}}}))}function h(t){var n=t.getCursor("from"),r=t.getCursor("to");if(0==e.cmpPos(n,r)){var i=a(t,n);if(!i.word)return;n=i.from,r=i.to}return{from:n,to:r,query:t.getRange(n,r),word:i}}function m(e,t){var r=h(e);if(r){var i=r.query,o=e.getSearchCursor(i,t?r.to:r.from);(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):(o=e.getSearchCursor(i,t?n(e.firstLine(),0):e.clipPos(n(e.lastLine()))),(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):r.word&&e.setSelection(r.from,r.to))}}t.selectScope=function(e){u(e)||e.execCommand("selectAll")},t.selectBetweenBrackets=function(t){if(!u(t))return e.Pass},t.goToBracket=function(t){t.extendSelectionsBy((function(r){var i=t.scanForBracket(r.head,1,d(t.getTokenTypeAt(r.head)));if(i&&0!=e.cmpPos(i.pos,r.head))return i.pos;var o=t.scanForBracket(r.head,-1,d(t.getTokenTypeAt(n(r.head.line,r.head.ch+1))));return o&&n(o.pos.line,o.pos.ch+1)||r.head}))},t.swapLineUp=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),i=[],o=t.firstLine()-1,a=[],s=0;s<r.length;s++){var l=r[s],c=l.from().line-1,u=l.to().line;a.push({anchor:n(l.anchor.line-1,l.anchor.ch),head:n(l.head.line-1,l.head.ch)}),0!=l.to().ch||l.empty()||--u,c>o?i.push(c,u):i.length&&(i[i.length-1]=u),o=u}t.operation((function(){for(var e=0;e<i.length;e+=2){var r=i[e],o=i[e+1],s=t.getLine(r);t.replaceRange("",n(r,0),n(r+1,0),"+swapLine"),o>t.lastLine()?t.replaceRange("\n"+s,n(t.lastLine()),null,"+swapLine"):t.replaceRange(s+"\n",n(o,0),null,"+swapLine")}t.setSelections(a),t.scrollIntoView()}))},t.swapLineDown=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),i=[],o=t.lastLine()+1,a=r.length-1;a>=0;a--){var s=r[a],l=s.to().line+1,c=s.from().line;0!=s.to().ch||s.empty()||l--,l<o?i.push(l,c):i.length&&(i[i.length-1]=c),o=c}t.operation((function(){for(var e=i.length-2;e>=0;e-=2){var r=i[e],o=i[e+1],a=t.getLine(r);r==t.lastLine()?t.replaceRange("",n(r-1),n(r),"+swapLine"):t.replaceRange("",n(r,0),n(r+1,0),"+swapLine"),t.replaceRange(a+"\n",n(o,0),null,"+swapLine")}t.scrollIntoView()}))},t.toggleCommentIndented=function(e){e.toggleComment({indent:!0})},t.joinLines=function(e){for(var t=e.listSelections(),r=[],i=0;i<t.length;i++){for(var o=t[i],a=o.from(),s=a.line,l=o.to().line;i<t.length-1&&t[i+1].from().line==l;)l=t[++i].to().line;r.push({start:s,end:l,anchor:!o.empty()&&a})}e.operation((function(){for(var t=0,i=[],o=0;o<r.length;o++){for(var a,s=r[o],l=s.anchor&&n(s.anchor.line-t,s.anchor.ch),c=s.start;c<=s.end;c++){var u=c-t;c==s.end&&(a=n(u,e.getLine(u).length+1)),u<e.lastLine()&&(e.replaceRange(" ",n(u),n(u+1,/^\s*/.exec(e.getLine(u+1))[0].length)),++t)}i.push({anchor:l||a,head:a})}e.setSelections(i,0)}))},t.duplicateLine=function(e){e.operation((function(){for(var t=e.listSelections().length,r=0;r<t;r++){var i=e.listSelections()[r];i.empty()?e.replaceRange(e.getLine(i.head.line)+"\n",n(i.head.line,0)):e.replaceRange(e.getRange(i.from(),i.to()),i.from())}e.scrollIntoView()}))},t.sortLines=function(e){f(e,!0,1)},t.reverseSortLines=function(e){f(e,!0,-1)},t.sortLinesInsensitive=function(e){f(e,!1,1)},t.reverseSortLinesInsensitive=function(e){f(e,!1,-1)},t.nextBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){var n=t.shift(),r=n.find();if(r)return t.push(n),e.setSelection(r.from,r.to)}},t.prevBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){t.unshift(t.pop());var n=t[t.length-1].find();if(n)return e.setSelection(n.from,n.to);t.pop()}},t.toggleBookmark=function(e){for(var t=e.listSelections(),n=e.state.sublimeBookmarks||(e.state.sublimeBookmarks=[]),r=0;r<t.length;r++){for(var i=t[r].from(),o=t[r].to(),a=t[r].empty()?e.findMarksAt(i):e.findMarks(i,o),s=0;s<a.length;s++)if(a[s].sublimeBookmark){a[s].clear();for(var l=0;l<n.length;l++)n[l]==a[s]&&n.splice(l--,1);break}s==a.length&&n.push(e.markText(i,o,{sublimeBookmark:!0,clearWhenEmpty:!1}))}},t.clearBookmarks=function(e){var t=e.state.sublimeBookmarks;if(t)for(var n=0;n<t.length;n++)t[n].clear();t.length=0},t.selectBookmarks=function(e){var t=e.state.sublimeBookmarks,n=[];if(t)for(var r=0;r<t.length;r++){var i=t[r].find();i?n.push({anchor:i.from,head:i.to}):t.splice(r--,0)}n.length&&e.setSelections(n,0)},t.smartBackspace=function(t){if(t.somethingSelected())return e.Pass;t.operation((function(){for(var r=t.listSelections(),i=t.getOption("indentUnit"),o=r.length-1;o>=0;o--){var a=r[o].head,s=t.getRange({line:a.line,ch:0},a),l=e.countColumn(s,null,t.getOption("tabSize")),c=t.findPosH(a,-1,"char",!1);if(s&&!/\S/.test(s)&&l%i==0){var u=new n(a.line,e.findColumn(s,l-i,i));u.ch!=a.ch&&(c=u)}t.replaceRange("",c,a,"+delete")}}))},t.delLineRight=function(e){e.operation((function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange("",t[r].anchor,n(t[r].to().line),"+delete");e.scrollIntoView()}))},t.upcaseAtCursor=function(e){p(e,(function(e){return e.toUpperCase()}))},t.downcaseAtCursor=function(e){p(e,(function(e){return e.toLowerCase()}))},t.setSublimeMark=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},t.selectToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},t.deleteToSublimeMark=function(t){var n=t.state.sublimeMark&&t.state.sublimeMark.find();if(n){var r=t.getCursor(),i=n;if(e.cmpPos(r,i)>0){var o=i;i=r,r=o}t.state.sublimeKilled=t.getRange(r,i),t.replaceRange("",r,i)}},t.swapWithSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},t.sublimeYank=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},t.showInCenter=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)},t.findUnder=function(e){m(e,!0)},t.findUnderPrevious=function(e){m(e,!1)},t.findAllUnder=function(e){var t=h(e);if(t){for(var n=e.getSearchCursor(t.query),r=[],i=-1;n.findNext();)r.push({anchor:n.from(),head:n.to()}),n.from().line<=t.from.line&&n.from().ch<=t.from.ch&&i++;e.setSelections(r,i)}};var g=e.keyMap;g.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F5:"sortLines","Shift-F5":"reverseSortLines","Cmd-F5":"sortLinesInsensitive","Shift-Cmd-F5":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-D":"skipAndSelectNextOccurrence","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-1":"foldAll","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},e.normalizeKeyMap(g.macSublime),g.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Shift-F9":"reverseSortLines","Ctrl-F9":"sortLinesInsensitive","Shift-Ctrl-F9":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-D":"skipAndSelectNextOccurrence","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-1":"foldAll","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},e.normalizeKeyMap(g.pcSublime);var v=g.default==g.macDefault;g.sublime=v?g.macSublime:g.pcSublime}(n(5237),n(3653),n(7923))},1275(e,t,n){!function(e){"use strict";function t(e){var t=e.Pos;function n(e,n){var r=e.state.vim;if(!r||r.insertMode)return n.head;var i=r.sel.head;return i?r.visualBlock&&n.head.line!=i.line?void 0:n.from()!=n.anchor||n.empty()||n.head.line!=i.line||n.head.ch==i.ch?n.head:new t(n.head.line,n.head.ch-1):n.head}var r=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"g<Up>",type:"keyToKey",toKeys:"gk"},{keys:"g<Down>",type:"keyToKey",toKeys:"gj"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"<Del>",type:"keyToKey",toKeys:"x",context:"normal"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-u>",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<character>",type:"action",action:"replayMacro"},{keys:"q<character>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<character>",type:"action",action:"setMark"},{keys:'"<character>',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<character>",type:"motion",motion:"textObjectManipulation"},{keys:"i<character>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],i=r.length,o=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"global",shortName:"g"}];function a(t){t.setOption("disableInput",!0),t.setOption("showCursorWhenSelecting",!1),e.signal(t,"vim-mode-change",{mode:"normal"}),t.on("cursorActivity",Bt),j(t),e.on(t.getInputField(),"paste",h(t))}function s(t){t.setOption("disableInput",!1),t.off("cursorActivity",Bt),e.off(t.getInputField(),"paste",h(t)),t.state.vim=null,bt&&clearTimeout(bt)}function l(t,n){this==e.keyMap.vim&&(t.options.$customCursor=null,e.rmClass(t.getWrapperElement(),"cm-fat-cursor")),n&&n.attach==c||s(t)}function c(t,r){this==e.keyMap.vim&&(t.curOp&&(t.curOp.selectionChanged=!0),t.options.$customCursor=n,e.addClass(t.getWrapperElement(),"cm-fat-cursor")),r&&r.attach==c||a(t)}function u(t,n){if(n){if(this[t])return this[t];var r=p(t);if(!r)return!1;var i=K.findKey(n,r);return"function"==typeof i&&e.signal(n,"vim-keypress",r),i}}e.defineOption("vimMode",!1,(function(t,n,r){n&&"vim"!=t.getOption("keyMap")?t.setOption("keyMap","vim"):!n&&r!=e.Init&&/^vim/.test(t.getOption("keyMap"))&&t.setOption("keyMap","default")}));var d={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A",CapsLock:""},f={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"};function p(e){if("'"==e.charAt(0))return e.charAt(1);var t=e.split(/-(?!$)/),n=t[t.length-1];if(1==t.length&&1==t[0].length)return!1;if(2==t.length&&"Shift"==t[0]&&1==n.length)return!1;for(var r=!1,i=0;i<t.length;i++){var o=t[i];o in d?t[i]=d[o]:r=!0,o in f&&(t[i]=f[o])}return!!r&&(A(n)&&(t[t.length-1]=n.toLowerCase()),"<"+t.join("-")+">")}function h(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(se(e.getCursor(),0,1)),re.enterInsertMode(e,{},t))}),t.onPasteFn}var m=/[\d]/,g=[e.isWordChar,function(t){return t&&!e.isWordChar(t)&&!/\s/.test(t)}],v=[function(e){return/\S/.test(e)}];function y(e,t){for(var n=[],r=e;r<e+t;r++)n.push(String.fromCharCode(r));return n}var b,x=y(65,26),k=y(97,26),w=y(48,10),_=[].concat(x,k,w,["<",">"]),C=[].concat(x,k,w,["-",'"',".",":","_","/"]);try{b=new RegExp("^[\\p{Lu}]$","u")}catch(e){b=/^[A-Z]$/}function S(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function M(e){return/^[a-z]$/.test(e)}function L(e){return-1!="()[]{}".indexOf(e)}function T(e){return m.test(e)}function A(e){return b.test(e)}function O(e){return/^\s*$/.test(e)}function E(e){return-1!=".?!".indexOf(e)}function N(e,t){for(var n=0;n<t.length;n++)if(t[n]==e)return!0;return!1}var P={};function F(e,t,n,r,i){if(void 0===t&&!i)throw Error("defaultValue is required unless callback is provided");if(n||(n="string"),P[e]={type:n,defaultValue:t,callback:i},r)for(var o=0;o<r.length;o++)P[r[o]]=P[e];t&&D(e,t)}function D(e,t,n,r){var i=P[e],o=(r=r||{}).scope;if(!i)return new Error("Unknown option: "+e);if("boolean"==i.type){if(t&&!0!==t)return new Error("Invalid argument: "+e+"="+t);!1!==t&&(t=!0)}i.callback?("local"!==o&&i.callback(t,void 0),"global"!==o&&n&&i.callback(t,n)):("local"!==o&&(i.value="boolean"==i.type?!!t:t),"global"!==o&&n&&(n.state.vim.options[e]={value:t}))}function z(e,t,n){var r=P[e],i=(n=n||{}).scope;if(!r)return new Error("Unknown option: "+e);if(r.callback){var o=t&&r.callback(void 0,t);return"global"!==i&&void 0!==o?o:"local"!==i?r.callback():void 0}return((o="global"!==i&&t&&t.state.vim.options[e])||"local"!==i&&r||{}).value}F("filetype",void 0,"string",["ft"],(function(e,t){if(void 0!==t){if(void 0===e)return"null"==(n=t.getOption("mode"))?"":n;var n=""==e?"null":e;t.setOption("mode",n)}}));var I,R,q=function(){var e=100,t=-1,n=0,r=0,i=new Array(e);function o(o,a,s){var l=i[t%e];function c(n){var r=++t%e,a=i[r];a&&a.clear(),i[r]=o.setBookmark(n)}if(l){var u=l.find();u&&!pe(u,a)&&c(a)}else c(a);c(s),n=t,(r=t-e+1)<0&&(r=0)}function a(o,a){(t+=a)>n?t=n:t<r&&(t=r);var s=i[(e+t)%e];if(s&&!s.find()){var l,c=a>0?1:-1,u=o.getCursor();do{if((s=i[(e+(t+=c))%e])&&(l=s.find())&&!pe(u,l))break}while(t<n&&t>r)}return s}function s(e,n){var r=t,i=a(e,n);return t=r,i&&i.find()}return{cachedCursor:void 0,add:o,find:s,move:a}},B=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};function H(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=B()}function j(e){return e.state.vim||(e.state.vim={inputState:new U,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),e.state.vim}function W(){for(var e in I={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:q(),macroModeState:new H,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new X({}),searchHistoryController:new Q,exCommandHistoryController:new Q},P){var t=P[e];t.value=t.defaultValue}}H.prototype={exitMacroRecordMode:function(){var e=I.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1},enterMacroRecordMode:function(e,t){var n=I.registerController.getRegister(t);if(n){if(n.clear(),this.latestRegister=t,e.openDialog){var r=ft("span",{class:"cm-vim-message"},"recording @"+t);this.onRecordingDone=e.openDialog(r,null,{bottom:!0})}this.isRecording=!0}}};var K={enterVimMode:a,buildKeyMap:function(){},getRegisterController:function(){return I.registerController},resetVimGlobalState_:W,getVimGlobalState_:function(){return I},maybeInitVimState_:j,suppressErrorLogging:!1,InsertModeKey:jt,map:function(e,t,n){Ot.map(e,t,n)},unmap:function(e,t){return Ot.unmap(e,t)},noremap:function(e,t,n){function o(e){return e?[e]:["normal","insert","visual"]}for(var a=o(n),s=r.length,l=s-i;l<s&&a.length;l++){var c=r[l];if(!(c.keys!=t||n&&c.context&&c.context!==n||"ex"===c.type.substr(0,2)||"key"===c.type.substr(0,3))){var u={};for(var d in c)u[d]=c[d];u.keys=e,n&&!u.context&&(u.context=n),this._mapCommand(u);var f=o(c.context);a=a.filter((function(e){return-1===f.indexOf(e)}))}}},mapclear:function(e){var t=r.length,n=i,o=r.slice(0,t-n);if(r=r.slice(t-n),e)for(var a=o.length-1;a>=0;a--){var s=o[a];if(e!==s.context)if(s.context)this._mapCommand(s);else{var l=["normal","insert","visual"];for(var c in l)if(l[c]!==e){var u={};for(var d in s)u[d]=s[d];u.context=l[c],this._mapCommand(u)}}}},setOption:D,getOption:z,defineOption:F,defineEx:function(e,t,n){if(t){if(0!==e.indexOf(t))throw new Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered')}else t=e;At[e]=n,Ot.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,n){var r=this.findKey(e,t,n);if("function"==typeof r)return r()},multiSelectHandleKey:Vt,findKey:function(e,t,n){var i,o=j(e);function a(){var r=I.macroModeState;if(r.isRecording){if("q"==t)return r.exitMacroRecordMode(),$(e),!0;"mapping"!=n&&zt(r,t)}}function s(){if("<Esc>"==t){if(o.visualMode)Ee(e);else{if(!o.insertMode)return;Nt(e)}return $(e),!0}}function l(n){for(var r;n;)r=/<\w+-.+?>|<\w+>|./.exec(n),t=r[0],n=n.substring(r.index+t.length),K.handleKey(e,t,"mapping")}function c(){if(s())return!0;for(var n=o.inputState.keyBuffer=o.inputState.keyBuffer+t,i=1==t.length,a=Y.matchCommand(n,r,o.inputState,"insert");n.length>1&&"full"!=a.type;){n=o.inputState.keyBuffer=n.slice(1);var l=Y.matchCommand(n,r,o.inputState,"insert");"none"!=l.type&&(a=l)}if("none"==a.type)return $(e),!1;if("partial"==a.type)return R&&window.clearTimeout(R),R=window.setTimeout((function(){o.insertMode&&o.inputState.keyBuffer&&$(e)}),z("insertModeEscKeysTimeout")),!i;if(R&&window.clearTimeout(R),i){for(var c=e.listSelections(),u=0;u<c.length;u++){var d=c[u].head;e.replaceRange("",se(d,0,-(n.length-1)),d,"+input")}I.macroModeState.lastInsertModeChanges.changes.pop()}return $(e),a.command}function u(){if(a()||s())return!0;var n=o.inputState.keyBuffer=o.inputState.keyBuffer+t;if(/^[1-9]\d*$/.test(n))return!0;var i=/^(\d*)(.*)$/.exec(n);if(!i)return $(e),!1;var l=o.visualMode?"visual":"normal",c=i[2]||i[1];o.inputState.operatorShortcut&&o.inputState.operatorShortcut.slice(-1)==c&&(c=o.inputState.operatorShortcut);var u=Y.matchCommand(c,r,o.inputState,l);return"none"==u.type?($(e),!1):"partial"==u.type||("clear"==u.type?($(e),!0):(o.inputState.keyBuffer="",(i=/^(\d*)(.*)$/.exec(n))[1]&&"0"!=i[1]&&o.inputState.pushRepeatDigit(i[1]),u.command))}return!1===(i=o.insertMode?c():u())?o.insertMode||1!==t.length?void 0:function(){return!0}:!0===i?function(){return!0}:function(){return e.operation((function(){e.curOp.isVimOp=!0;try{"keyToKey"==i.type?l(i.toKeys):Y.processCommand(e,o,i)}catch(t){throw e.state.vim=void 0,j(e),K.suppressErrorLogging||console.log(t),t}return!0}))}},handleEx:function(e,t){Ot.processCommand(e,t)},defineMotion:Z,defineAction:ie,defineOperator:ne,mapCommand:Ft,_mapCommand:Pt,defineRegister:G,exitVisualMode:Ee,exitInsertMode:Nt};function U(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}function $(t,n){t.state.vim.inputState=new U,e.signal(t,"vim-command-done",n)}function V(e,t,n){this.clear(),this.keyBuffer=[e||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!t,this.blockwise=!!n}function G(e,t){var n=I.registerController.registers;if(!e||1!=e.length)throw Error("Register name must be 1 character");if(n[e])throw Error("Register already defined "+e);n[e]=t,C.push(e)}function X(e){this.registers=e,this.unnamedRegister=e['"']=new V,e["."]=new V,e[":"]=new V,e["/"]=new V}function Q(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}U.prototype.pushRepeatDigit=function(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)},U.prototype.getRepeat=function(){var e=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(e=1,this.prefixRepeat.length>0&&(e*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(e*=parseInt(this.motionRepeat.join(""),10))),e},V.prototype={setText:function(e,t,n){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!n},pushText:function(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(B(e))},pushSearchQuery:function(e){this.searchQueries.push(e)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},X.prototype={pushText:function(e,t,n,r,i){if("_"!==e){r&&"\n"!==n.charAt(n.length-1)&&(n+="\n");var o=this.isValidRegister(e)?this.getRegister(e):null;if(o)A(e)?o.pushText(n,r):o.setText(n,r,i),this.unnamedRegister.setText(o.toString(),r);else{switch(t){case"yank":this.registers[0]=new V(n,r,i);break;case"delete":case"change":-1==n.indexOf("\n")?this.registers["-"]=new V(n,r):(this.shiftNumericRegisters_(),this.registers[1]=new V(n,r))}this.unnamedRegister.setText(n,r,i)}}},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new V),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&N(e,C)},shiftNumericRegisters_:function(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}},Q.prototype={nextMatch:function(e,t){var n=this.historyBuffer,r=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var i=this.iterator+r;t?i>=0:i<n.length;i+=r)for(var o=n[i],a=0;a<=o.length;a++)if(this.initialPrefix==o.substring(0,a))return this.iterator=i,o;return i>=n.length?(this.iterator=n.length,this.initialPrefix):i<0?e:void 0},pushInput:function(e){var t=this.historyBuffer.indexOf(e);t>-1&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Y={matchCommand:function(e,t,n,r){var i,o=le(e,t,r,n);if(!o.full&&!o.partial)return{type:"none"};if(!o.full&&o.partial)return{type:"partial"};for(var a=0;a<o.full.length;a++){var s=o.full[a];i||(i=s)}if("<character>"==i.keys.slice(-11)){var l=ue(e);if(!l||l.length>1)return{type:"clear"};n.selectedCharacter=l}return{type:"full",command:i}},processCommand:function(e,t,n){switch(t.inputState.repeatOverride=n.repeatOverride,n.type){case"motion":this.processMotion(e,t,n);break;case"operator":this.processOperator(e,t,n);break;case"operatorMotion":this.processOperatorMotion(e,t,n);break;case"action":this.processAction(e,t,n);break;case"search":this.processSearch(e,t,n);break;case"ex":case"keyToEx":this.processEx(e,t,n)}},processMotion:function(e,t,n){t.inputState.motion=n.motion,t.inputState.motionArgs=ae(n.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,n){var r=t.inputState;if(r.operator){if(r.operator==n.operator)return r.motion="expandToLine",r.motionArgs={linewise:!0},void this.evalInput(e,t);$(e)}r.operator=n.operator,r.operatorArgs=ae(n.operatorArgs),n.keys.length>1&&(r.operatorShortcut=n.keys),n.exitVisualBlock&&(t.visualBlock=!1,Te(e)),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,n){var r=t.visualMode,i=ae(n.operatorMotionArgs);i&&r&&i.visualLine&&(t.visualLine=!0),this.processOperator(e,t,n),r||this.processMotion(e,t,n)},processAction:function(e,t,n){var r=t.inputState,i=r.getRepeat(),o=!!i,a=ae(n.actionArgs)||{};r.selectedCharacter&&(a.selectedCharacter=r.selectedCharacter),n.operator&&this.processOperator(e,t,n),n.motion&&this.processMotion(e,t,n),(n.motion||n.operator)&&this.evalInput(e,t),a.repeat=i||1,a.repeatIsExplicit=o,a.registerName=r.registerName,$(e),t.lastMotion=null,n.isEdit&&this.recordLastEdit(t,r,n),re[n.action](e,a,t)},processSearch:function(t,n,r){if(t.getSearchCursor){var i=r.searchArgs.forward,o=r.searchArgs.wholeWordOnly;tt(t).setReversed(!i);var a=i?"/":"?",s=tt(t).getQuery(),l=t.getScrollInfo();switch(r.searchArgs.querySrc){case"prompt":var c=I.macroModeState;c.isPlaying?p(f=c.replaySearchQueries.shift(),!0,!1):mt(t,{onClose:h,prefix:a,desc:"(JavaScript regexp)",onKeyUp:m,onKeyDown:g});break;case"wordUnderCursor":var u=De(t,!1,!0,!1,!0),d=!0;if(u||(u=De(t,!1,!0,!1,!1),d=!1),!u)return;var f=t.getLine(u.start.line).substring(u.start.ch,u.end.ch);f=d&&o?"\\b"+f+"\\b":xe(f),I.jumpList.cachedCursor=t.getCursor(),t.setCursor(u.start),p(f,!0,!1)}}function p(e,i,o){I.searchHistoryController.pushInput(e),I.searchHistoryController.reset();try{vt(t,e,i,o)}catch(n){return pt(t,"Invalid regex: "+e),void $(t)}Y.processMotion(t,n,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:r.searchArgs.toJumplist}})}function h(e){t.scrollTo(l.left,l.top),p(e,!0,!0);var n=I.macroModeState;n.isRecording&&Rt(n,e)}function m(n,r,o){var a,s,c,u=e.keyName(n);"Up"==u||"Down"==u?(a="Up"==u,s=n.target?n.target.selectionEnd:0,o(r=I.searchHistoryController.nextMatch(r,a)||""),s&&n.target&&(n.target.selectionEnd=n.target.selectionStart=Math.min(s,n.target.value.length))):"Left"!=u&&"Right"!=u&&"Ctrl"!=u&&"Alt"!=u&&"Shift"!=u&&I.searchHistoryController.reset();try{c=vt(t,r,!0,!0)}catch(n){}c?t.scrollIntoView(kt(t,!i,c),30):(_t(t),t.scrollTo(l.left,l.top))}function g(n,r,i){var o=e.keyName(n);"Esc"==o||"Ctrl-C"==o||"Ctrl-["==o||"Backspace"==o&&""==r?(I.searchHistoryController.pushInput(r),I.searchHistoryController.reset(),vt(t,s),_t(t),t.scrollTo(l.left,l.top),e.e_stop(n),$(t),i(),t.focus()):"Up"==o||"Down"==o?e.e_stop(n):"Ctrl-U"==o&&(e.e_stop(n),i(""))}},processEx:function(t,n,r){function i(e){I.exCommandHistoryController.pushInput(e),I.exCommandHistoryController.reset(),Ot.processCommand(t,e),$(t)}function o(n,r,i){var o,a,s=e.keyName(n);("Esc"==s||"Ctrl-C"==s||"Ctrl-["==s||"Backspace"==s&&""==r)&&(I.exCommandHistoryController.pushInput(r),I.exCommandHistoryController.reset(),e.e_stop(n),$(t),i(),t.focus()),"Up"==s||"Down"==s?(e.e_stop(n),o="Up"==s,a=n.target?n.target.selectionEnd:0,i(r=I.exCommandHistoryController.nextMatch(r,o)||""),a&&n.target&&(n.target.selectionEnd=n.target.selectionStart=Math.min(a,n.target.value.length))):"Ctrl-U"==s?(e.e_stop(n),i("")):"Left"!=s&&"Right"!=s&&"Ctrl"!=s&&"Alt"!=s&&"Shift"!=s&&I.exCommandHistoryController.reset()}"keyToEx"==r.type?Ot.processCommand(t,r.exArgs.input):n.visualMode?mt(t,{onClose:i,prefix:":",value:"'<,'>",onKeyDown:o,selectValueOnOpen:!1}):mt(t,{onClose:i,prefix:":",onKeyDown:o})},evalInput:function(e,n){var r,i,o,a=n.inputState,s=a.motion,l=a.motionArgs||{},c=a.operator,u=a.operatorArgs||{},d=a.registerName,f=n.sel,p=fe(n.visualMode?oe(e,f.head):e.getCursor("head")),h=fe(n.visualMode?oe(e,f.anchor):e.getCursor("anchor")),m=fe(p),g=fe(h);if(c&&this.recordLastEdit(n,a),(o=void 0!==a.repeatOverride?a.repeatOverride:a.getRepeat())>0&&l.explicitRepeat?l.repeatIsExplicit=!0:(l.noRepeat||!l.explicitRepeat&&0===o)&&(o=1,l.repeatIsExplicit=!1),a.selectedCharacter&&(l.selectedCharacter=u.selectedCharacter=a.selectedCharacter),l.repeat=o,$(e),s){var v=J[s](e,p,l,n,a);if(n.lastMotion=J[s],!v)return;if(l.toJumplist){var y=I.jumpList,b=y.cachedCursor;b?(Ie(e,b,v),delete y.cachedCursor):Ie(e,p,v)}v instanceof Array?(i=v[0],r=v[1]):r=v,r||(r=fe(p)),n.visualMode?(n.visualBlock&&r.ch===1/0||(r=oe(e,r)),i&&(i=oe(e,i)),i=i||g,f.anchor=i,f.head=r,Te(e),Ve(e,n,"<",he(i,r)?i:r),Ve(e,n,">",he(i,r)?r:i)):c||(r=oe(e,r),e.setCursor(r.line,r.ch))}if(c){if(u.lastSel){i=g;var x=u.lastSel,k=Math.abs(x.head.line-x.anchor.line),w=Math.abs(x.head.ch-x.anchor.ch);r=x.visualLine?new t(g.line+k,g.ch):x.visualBlock?new t(g.line+k,g.ch+w):x.head.line==x.anchor.line?new t(g.line,g.ch+w):new t(g.line+k,g.ch),n.visualMode=!0,n.visualLine=x.visualLine,n.visualBlock=x.visualBlock,f=n.sel={anchor:i,head:r},Te(e)}else n.visualMode&&(u.lastSel={anchor:fe(f.anchor),head:fe(f.head),visualBlock:n.visualBlock,visualLine:n.visualLine});var _,C,S,M,L;if(n.visualMode){if(_=me(f.head,f.anchor),C=ge(f.head,f.anchor),S=n.visualLine||u.linewise,L=Ae(e,{anchor:_,head:C},M=n.visualBlock?"block":S?"line":"char"),S){var T=L.ranges;if("block"==M)for(var A=0;A<T.length;A++)T[A].head.ch=ye(e,T[A].head.line);else"line"==M&&(T[0].head=new t(T[0].head.line+1,0))}}else{if(_=fe(i||g),he(C=fe(r||m),_)){var O=_;_=C,C=O}(S=l.linewise||u.linewise)?Pe(e,_,C):l.forward&&Ne(e,_,C),L=Ae(e,{anchor:_,head:C},M="char",!l.inclusive||S)}e.setSelections(L.ranges,L.primary),n.lastMotion=null,u.repeat=o,u.registerName=d,u.linewise=S;var E=te[c](e,u,L.ranges,g,r);n.visualMode&&Ee(e,null!=E),E&&e.setCursor(E)}},recordLastEdit:function(e,t,n){var r=I.macroModeState;r.isPlaying||(e.lastEditInputState=t,e.lastEditActionCommand=n,r.lastInsertModeChanges.changes=[],r.lastInsertModeChanges.expectCursorActivityForChange=!1,r.lastInsertModeChanges.visualBlock=e.visualBlock?e.sel.head.line-e.sel.anchor.line:0)}},J={moveToTopLine:function(e,n,r){var i=St(e).top+r.repeat-1;return new t(i,Fe(e.getLine(i)))},moveToMiddleLine:function(e){var n=St(e),r=Math.floor(.5*(n.top+n.bottom));return new t(r,Fe(e.getLine(r)))},moveToBottomLine:function(e,n,r){var i=St(e).bottom-r.repeat+1;return new t(i,Fe(e.getLine(i)))},expandToLine:function(e,n,r){return new t(n.line+r.repeat-1,1/0)},findNext:function(e,t,n){var r=tt(e),i=r.getQuery();if(i){var o=!n.forward;return o=r.isReversed()?!o:o,xt(e,i),kt(e,o,i,n.repeat)}},findAndSelectNextInclusive:function(n,r,i,o,a){var s=tt(n),l=s.getQuery();if(l){var c=!i.forward,u=wt(n,c=s.isReversed()?!c:c,l,i.repeat,o);if(u){if(a.operator)return u;var d=u[0],f=new t(u[1].line,u[1].ch-1);if(o.visualMode){(o.visualLine||o.visualBlock)&&(o.visualLine=!1,o.visualBlock=!1,e.signal(n,"vim-mode-change",{mode:"visual",subMode:""}));var p=o.sel.anchor;if(p)return s.isReversed()?i.forward?[p,d]:[p,f]:i.forward?[p,f]:[p,d]}else o.visualMode=!0,o.visualLine=!1,o.visualBlock=!1,e.signal(n,"vim-mode-change",{mode:"visual",subMode:""});return c?[f,d]:[d,f]}}},goToMark:function(e,t,n,r){var i=Mt(e,r,n.selectedCharacter);return i?n.linewise?{line:i.line,ch:Fe(e.getLine(i.line))}:i:null},moveToOtherHighlightedEnd:function(e,n,r,i){if(i.visualBlock&&r.sameLine){var o=i.sel;return[oe(e,new t(o.anchor.line,o.head.ch)),oe(e,new t(o.head.line,o.anchor.ch))]}return[i.sel.head,i.sel.anchor]},jumpToMark:function(e,n,r,i){for(var o=n,a=0;a<r.repeat;a++){var s=o;for(var l in i.marks)if(M(l)){var c=i.marks[l].find();if(!((r.forward?he(c,s):he(s,c))||r.linewise&&c.line==s.line)){var u=pe(s,o),d=r.forward?ve(s,c,o):ve(o,c,s);(u||d)&&(o=c)}}}return r.linewise&&(o=new t(o.line,Fe(e.getLine(o.line)))),o},moveByCharacters:function(e,n,r){var i=n,o=r.repeat,a=r.forward?i.ch+o:i.ch-o;return new t(i.line,a)},moveByLines:function(e,n,r,i){var o=n,a=o.ch;switch(i.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:a=i.lastHPos;break;default:i.lastHPos=a}var s=r.repeat+(r.repeatOffset||0),l=r.forward?o.line+s:o.line-s,c=e.firstLine(),u=e.lastLine(),d=e.findPosV(o,r.forward?s:-s,"line",i.lastHSPos);return(r.forward?d.line>l:d.line<l)&&(l=d.line,a=d.ch),l<c&&o.line==c?this.moveToStartOfLine(e,n,r,i):l>u&&o.line==u?Ke(e,n,r,i,!0):(r.toFirstChar&&(a=Fe(e.getLine(l)),i.lastHPos=a),i.lastHSPos=e.charCoords(new t(l,a),"div").left,new t(l,a))},moveByDisplayLines:function(e,n,r,i){var o=n;switch(i.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:i.lastHSPos=e.charCoords(o,"div").left}var a=r.repeat;if((l=e.findPosV(o,r.forward?a:-a,"line",i.lastHSPos)).hitSide)if(r.forward)var s={top:e.charCoords(l,"div").top+8,left:i.lastHSPos},l=e.coordsChar(s,"div");else{var c=e.charCoords(new t(e.firstLine(),0),"div");c.left=i.lastHSPos,l=e.coordsChar(c,"div")}return i.lastHPos=l.ch,l},moveByPage:function(e,t,n){var r=t,i=n.repeat;return e.findPosV(r,n.forward?i:-i,"page")},moveByParagraph:function(e,t,n){var r=n.forward?1:-1;return Xe(e,t,n.repeat,r)},moveBySentence:function(e,t,n){var r=n.forward?1:-1;return Ye(e,t,n.repeat,r)},moveByScroll:function(e,t,n,r){var i=e.getScrollInfo(),o=null,a=n.repeat;a||(a=i.clientHeight/(2*e.defaultTextHeight()));var s=e.charCoords(t,"local");if(n.repeat=a,!(o=J.moveByDisplayLines(e,t,n,r)))return null;var l=e.charCoords(o,"local");return e.scrollTo(null,i.top+l.top-s.top),o},moveByWords:function(e,t,n){return We(e,t,n.repeat,!!n.forward,!!n.wordEnd,!!n.bigWord)},moveTillCharacter:function(e,t,n){var r=Ue(e,n.repeat,n.forward,n.selectedCharacter),i=n.forward?-1:1;return Re(i,n),r?(r.ch+=i,r):null},moveToCharacter:function(e,t,n){var r=n.repeat;return Re(0,n),Ue(e,r,n.forward,n.selectedCharacter)||t},moveToSymbol:function(e,t,n){return He(e,n.repeat,n.forward,n.selectedCharacter)||t},moveToColumn:function(e,t,n,r){var i=n.repeat;return r.lastHPos=i-1,r.lastHSPos=e.charCoords(t,"div").left,$e(e,i)},moveToEol:function(e,t,n,r){return Ke(e,t,n,r,!1)},moveToFirstNonWhiteSpaceCharacter:function(e,n){var r=n;return new t(r.line,Fe(e.getLine(r.line)))},moveToMatchedSymbol:function(e,n){for(var r,i=n,o=i.line,a=i.ch,s=e.getLine(o);a<s.length;a++)if((r=s.charAt(a))&&L(r)){var l=e.getTokenTypeAt(new t(o,a+1));if("string"!==l&&"comment"!==l)break}if(a<s.length){var c="<"===a||">"===a?/[(){}[\]<>]/:/[(){}[\]]/;return e.findMatchingBracket(new t(o,a),{bracketRegex:c}).to}return i},moveToStartOfLine:function(e,n){return new t(n.line,0)},moveToLineOrEdgeOfDocument:function(e,n,r){var i=r.forward?e.lastLine():e.firstLine();return r.repeatIsExplicit&&(i=r.repeat-e.getOption("firstLineNumber")),new t(i,Fe(e.getLine(i)))},moveToStartOfDisplayLine:function(e){return e.execCommand("goLineLeft"),e.getCursor()},moveToEndOfDisplayLine:function(e){e.execCommand("goLineRight");var t=e.getCursor();return"before"==t.sticky&&t.ch--,t},textObjectManipulation:function(e,t,n,r){var i={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},o={"'":!0,'"':!0,"`":!0},a=n.selectedCharacter;"b"==a?a="(":"B"==a&&(a="{");var s,l=!n.textObjectInner;if(i[a])s=Je(e,t,a,l);else if(o[a])s=Ze(e,t,a,l);else if("W"===a)s=De(e,l,!0,!0);else if("w"===a)s=De(e,l,!0,!1);else if("p"===a)if(s=Xe(e,t,n.repeat,0,l),n.linewise=!0,r.visualMode)r.visualLine||(r.visualLine=!0);else{var c=r.inputState.operatorArgs;c&&(c.linewise=!0),s.end.line--}else if("t"===a)s=ze(e,t,l);else{if("s"!==a)return null;var u=e.getLine(t.line);t.ch>0&&E(u[t.ch])&&(t.ch-=1);var d=Qe(e,t,n.repeat,1,l),f=Qe(e,t,n.repeat,-1,l);O(e.getLine(f.line)[f.ch])&&O(e.getLine(d.line)[d.ch-1])&&(f={line:f.line,ch:f.ch+1}),s={start:f,end:d}}return e.state.vim.visualMode?Le(e,s.start,s.end):[s.start,s.end]},repeatLastCharacterSearch:function(e,t,n){var r=I.lastCharacterSearch,i=n.repeat,o=n.forward===r.forward,a=(r.increment?1:0)*(o?-1:1);e.moveH(-a,"char"),n.inclusive=!!o;var s=Ue(e,i,o,r.selectedCharacter);return s?(s.ch+=a,s):(e.moveH(a,"char"),t)}};function Z(e,t){J[e]=t}function ee(e,t){for(var n=[],r=0;r<t;r++)n.push(e);return n}var te={change:function(n,r,i){var o,a,s=n.state.vim,l=i[0].anchor,c=i[0].head;if(s.visualMode)if(r.fullLine)c.ch=Number.MAX_VALUE,c.line--,n.setSelection(l,c),a=n.getSelection(),n.replaceSelection(""),o=l;else{a=n.getSelection();var u=ee("",i.length);n.replaceSelections(u),o=me(i[0].head,i[0].anchor)}else{a=n.getRange(l,c);var d=s.lastEditInputState||{};if("moveByWords"==d.motion&&!O(a)){var f=/\s+$/.exec(a);f&&d.motionArgs&&d.motionArgs.forward&&(c=se(c,0,-f[0].length),a=a.slice(0,-f[0].length))}var p=new t(l.line-1,Number.MAX_VALUE),h=n.firstLine()==n.lastLine();c.line>n.lastLine()&&r.linewise&&!h?n.replaceRange("",p,c):n.replaceRange("",l,c),r.linewise&&(h||(n.setCursor(p),e.commands.newlineAndIndent(n)),l.ch=Number.MAX_VALUE),o=l}I.registerController.pushText(r.registerName,"change",a,r.linewise,i.length>1),re.enterInsertMode(n,{head:o},n.state.vim)},delete:function(e,n,r){var i,o,a=e.state.vim;if(a.visualBlock){o=e.getSelection();var s=ee("",r.length);e.replaceSelections(s),i=me(r[0].head,r[0].anchor)}else{var l=r[0].anchor,c=r[0].head;n.linewise&&c.line!=e.firstLine()&&l.line==e.lastLine()&&l.line==c.line-1&&(l.line==e.firstLine()?l.ch=0:l=new t(l.line-1,ye(e,l.line-1))),o=e.getRange(l,c),e.replaceRange("",l,c),i=l,n.linewise&&(i=J.moveToFirstNonWhiteSpaceCharacter(e,l))}return I.registerController.pushText(n.registerName,"delete",o,n.linewise,a.visualBlock),oe(e,i)},indent:function(e,t,n){var r=e.state.vim;if(e.indentMore)for(var i=r.visualMode?t.repeat:1,o=0;o<i;o++)t.indentRight?e.indentMore():e.indentLess();else{var a=n[0].anchor.line,s=r.visualBlock?n[n.length-1].anchor.line:n[0].head.line;i=r.visualMode?t.repeat:1,t.linewise&&s--;for(var l=a;l<=s;l++)for(o=0;o<i;o++)e.indentLine(l,t.indentRight)}return J.moveToFirstNonWhiteSpaceCharacter(e,n[0].anchor)},indentAuto:function(e,t,n){return e.execCommand("indentAuto"),J.moveToFirstNonWhiteSpaceCharacter(e,n[0].anchor)},changeCase:function(e,t,n,r,i){for(var o=e.getSelections(),a=[],s=t.toLower,l=0;l<o.length;l++){var c=o[l],u="";if(!0===s)u=c.toLowerCase();else if(!1===s)u=c.toUpperCase();else for(var d=0;d<c.length;d++){var f=c.charAt(d);u+=A(f)?f.toLowerCase():f.toUpperCase()}a.push(u)}return e.replaceSelections(a),t.shouldMoveCursor?i:!e.state.vim.visualMode&&t.linewise&&n[0].anchor.line+1==n[0].head.line?J.moveToFirstNonWhiteSpaceCharacter(e,r):t.linewise?r:me(n[0].anchor,n[0].head)},yank:function(e,t,n,r){var i=e.state.vim,o=e.getSelection(),a=i.visualMode?me(i.sel.anchor,i.sel.head,n[0].head,n[0].anchor):r;return I.registerController.pushText(t.registerName,"yank",o,t.linewise,i.visualBlock),a}};function ne(e,t){te[e]=t}var re={jumpListWalk:function(e,t,n){if(!n.visualMode){var r=t.repeat,i=t.forward,o=I.jumpList.move(e,i?r:-r),a=o?o.find():void 0;a=a||e.getCursor(),e.setCursor(a)}},scroll:function(e,t,n){if(!n.visualMode){var r=t.repeat||1,i=e.defaultTextHeight(),o=e.getScrollInfo().top,a=i*r,s=t.forward?o+a:o-a,l=fe(e.getCursor()),c=e.charCoords(l,"local");if(t.forward)s>c.top?(l.line+=(s-c.top)/i,l.line=Math.ceil(l.line),e.setCursor(l),c=e.charCoords(l,"local"),e.scrollTo(null,c.top)):e.scrollTo(null,s);else{var u=s+e.getScrollInfo().clientHeight;u<c.bottom?(l.line-=(c.bottom-u)/i,l.line=Math.floor(l.line),e.setCursor(l),c=e.charCoords(l,"local"),e.scrollTo(null,c.bottom-e.getScrollInfo().clientHeight)):e.scrollTo(null,s)}}},scrollToCursor:function(e,n){var r=e.getCursor().line,i=e.charCoords(new t(r,0),"local"),o=e.getScrollInfo().clientHeight,a=i.top;switch(n.position){case"center":a=i.bottom-o/2;break;case"bottom":var s=new t(r,e.getLine(r).length-1);a=a-o+(e.charCoords(s,"local").bottom-a)}e.scrollTo(null,a)},replayMacro:function(e,t,n){var r=t.selectedCharacter,i=t.repeat,o=I.macroModeState;for("@"==r?r=o.latestRegister:o.latestRegister=r;i--;)Dt(e,n,o,r)},enterMacroRecordMode:function(e,t){var n=I.macroModeState,r=t.selectedCharacter;I.registerController.isValidRegister(r)&&n.enterMacroRecordMode(e,r)},toggleOverwrite:function(t){t.state.overwrite?(t.toggleOverwrite(!1),t.setOption("keyMap","vim-insert"),e.signal(t,"vim-mode-change",{mode:"insert"})):(t.toggleOverwrite(!0),t.setOption("keyMap","vim-replace"),e.signal(t,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(n,r,i){if(!n.getOption("readOnly")){i.insertMode=!0,i.insertModeRepeat=r&&r.repeat||1;var o=r?r.insertAt:null,a=i.sel,s=r.head||n.getCursor("head"),l=n.listSelections().length;if("eol"==o)s=new t(s.line,ye(n,s.line));else if("bol"==o)s=new t(s.line,0);else if("charAfter"==o)s=se(s,0,1);else if("firstNonBlank"==o)s=J.moveToFirstNonWhiteSpaceCharacter(n,s);else if("startOfSelectedArea"==o){if(!i.visualMode)return;i.visualBlock?(s=new t(Math.min(a.head.line,a.anchor.line),Math.min(a.head.ch,a.anchor.ch)),l=Math.abs(a.head.line-a.anchor.line)+1):s=a.head.line<a.anchor.line?a.head:new t(a.anchor.line,0)}else if("endOfSelectedArea"==o){if(!i.visualMode)return;i.visualBlock?(s=new t(Math.min(a.head.line,a.anchor.line),Math.max(a.head.ch,a.anchor.ch)+1),l=Math.abs(a.head.line-a.anchor.line)+1):s=a.head.line>=a.anchor.line?se(a.head,0,1):new t(a.anchor.line,0)}else if("inplace"==o){if(i.visualMode)return}else"lastEdit"==o&&(s=Lt(n)||s);n.setOption("disableInput",!1),r&&r.replace?(n.toggleOverwrite(!0),n.setOption("keyMap","vim-replace"),e.signal(n,"vim-mode-change",{mode:"replace"})):(n.toggleOverwrite(!1),n.setOption("keyMap","vim-insert"),e.signal(n,"vim-mode-change",{mode:"insert"})),I.macroModeState.isPlaying||(n.on("change",qt),e.on(n.getInputField(),"keydown",Wt)),i.visualMode&&Ee(n),_e(n,s,l)}},toggleVisualMode:function(n,r,i){var o,a=r.repeat,s=n.getCursor();i.visualMode?i.visualLine^r.linewise||i.visualBlock^r.blockwise?(i.visualLine=!!r.linewise,i.visualBlock=!!r.blockwise,e.signal(n,"vim-mode-change",{mode:"visual",subMode:i.visualLine?"linewise":i.visualBlock?"blockwise":""}),Te(n)):Ee(n):(i.visualMode=!0,i.visualLine=!!r.linewise,i.visualBlock=!!r.blockwise,o=oe(n,new t(s.line,s.ch+a-1)),i.sel={anchor:s,head:o},e.signal(n,"vim-mode-change",{mode:"visual",subMode:i.visualLine?"linewise":i.visualBlock?"blockwise":""}),Te(n),Ve(n,i,"<",me(s,o)),Ve(n,i,">",ge(s,o)))},reselectLastSelection:function(t,n,r){var i=r.lastSelection;if(r.visualMode&&Me(t,r),i){var o=i.anchorMark.find(),a=i.headMark.find();if(!o||!a)return;r.sel={anchor:o,head:a},r.visualMode=!0,r.visualLine=i.visualLine,r.visualBlock=i.visualBlock,Te(t),Ve(t,r,"<",me(o,a)),Ve(t,r,">",ge(o,a)),e.signal(t,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""})}},joinLines:function(e,n,r){var i,o;if(r.visualMode){if(i=e.getCursor("anchor"),he(o=e.getCursor("head"),i)){var a=o;o=i,i=a}o.ch=ye(e,o.line)-1}else{var s=Math.max(n.repeat,2);i=e.getCursor(),o=oe(e,new t(i.line+s-1,1/0))}for(var l=0,c=i.line;c<o.line;c++){l=ye(e,i.line),a=new t(i.line+1,ye(e,i.line+1));var u=e.getRange(i,a);u=n.keepSpaces?u.replace(/\n\r?/g,""):u.replace(/\n\s*/g," "),e.replaceRange(u,i,a)}var d=new t(i.line,l);r.visualMode&&Ee(e,!1),e.setCursor(d)},newLineAndEnterInsertMode:function(n,r,i){i.insertMode=!0;var o=fe(n.getCursor());o.line!==n.firstLine()||r.after?(o.line=r.after?o.line:o.line-1,o.ch=ye(n,o.line),n.setCursor(o),(e.commands.newlineAndIndentContinueComment||e.commands.newlineAndIndent)(n)):(n.replaceRange("\n",new t(n.firstLine(),0)),n.setCursor(n.firstLine(),0)),this.enterInsertMode(n,{repeat:r.repeat},i)},paste:function(e,n,r){var i=fe(e.getCursor()),o=I.registerController.getRegister(n.registerName);if(p=o.toString()){if(n.matchIndent){var a=e.getOption("tabSize"),s=function(e){var t=e.split("\t").length-1,n=e.split(" ").length-1;return t*a+1*n},l=e.getLine(e.getCursor().line),c=s(l.match(/^\s*/)[0]),u=p.replace(/\n$/,""),d=p!==u,f=s(p.match(/^\s*/)[0]),p=u.replace(/^\s*/gm,(function(t){var n=c+(s(t)-f);if(n<0)return"";if(e.getOption("indentWithTabs")){var r=Math.floor(n/a);return Array(r+1).join("\t")}return Array(n+1).join(" ")}));p+=d?"\n":""}n.repeat>1&&(p=Array(n.repeat+1).join(p));var h,m,g=o.linewise,v=o.blockwise;if(v){p=p.split("\n"),g&&p.pop();for(var y=0;y<p.length;y++)p[y]=""==p[y]?" ":p[y];i.ch+=n.after?1:0,i.ch=Math.min(ye(e,i.line),i.ch)}else g?r.visualMode?p=r.visualLine?p.slice(0,-1):"\n"+p.slice(0,p.length-1)+"\n":n.after?(p="\n"+p.slice(0,p.length-1),i.ch=ye(e,i.line)):i.ch=0:i.ch+=n.after?1:0;if(r.visualMode){var b;r.lastPastedText=p;var x=Se(e,r),k=x[0],w=x[1],_=e.getSelection(),C=e.listSelections(),S=new Array(C.length).join("1").split("1");r.lastSelection&&(b=r.lastSelection.headMark.find()),I.registerController.unnamedRegister.setText(_),v?(e.replaceSelections(S),w=new t(k.line+p.length-1,k.ch),e.setCursor(k),we(e,w),e.replaceSelections(p),h=k):r.visualBlock?(e.replaceSelections(S),e.setCursor(k),e.replaceRange(p,k,k),h=k):(e.replaceRange(p,k,w),h=e.posFromIndex(e.indexFromPos(k)+p.length-1)),b&&(r.lastSelection.headMark=e.setBookmark(b)),g&&(h.ch=0)}else if(v){for(e.setCursor(i),y=0;y<p.length;y++){var M=i.line+y;M>e.lastLine()&&e.replaceRange("\n",new t(M,0)),ye(e,M)<i.ch&&ke(e,M,i.ch)}e.setCursor(i),we(e,new t(i.line+p.length-1,i.ch)),e.replaceSelections(p),h=i}else e.replaceRange(p,i),g&&n.after?h=new t(i.line+1,Fe(e.getLine(i.line+1))):g&&!n.after?h=new t(i.line,Fe(e.getLine(i.line))):!g&&n.after?(m=e.indexFromPos(i),h=e.posFromIndex(m+p.length-1)):(m=e.indexFromPos(i),h=e.posFromIndex(m+p.length));r.visualMode&&Ee(e,!1),e.setCursor(h)}},undo:function(t,n){t.operation((function(){de(t,e.commands.undo,n.repeat)(),t.setCursor(t.getCursor("anchor"))}))},redo:function(t,n){de(t,e.commands.redo,n.repeat)()},setRegister:function(e,t,n){n.inputState.registerName=t.selectedCharacter},setMark:function(e,t,n){Ve(e,n,t.selectedCharacter,e.getCursor())},replace:function(n,r,i){var o,a,s=r.selectedCharacter,l=n.getCursor(),c=n.listSelections();if(i.visualMode)l=n.getCursor("start"),a=n.getCursor("end");else{var u=n.getLine(l.line);(o=l.ch+r.repeat)>u.length&&(o=u.length),a=new t(l.line,o)}if("\n"==s)i.visualMode||n.replaceRange("",l,a),(e.commands.newlineAndIndentContinueComment||e.commands.newlineAndIndent)(n);else{var d=n.getRange(l,a);if(d=d.replace(/[^\n]/g,s),i.visualBlock){var f=new Array(n.getOption("tabSize")+1).join(" ");d=(d=n.getSelection()).replace(/\t/g,f).replace(/[^\n]/g,s).split("\n"),n.replaceSelections(d)}else n.replaceRange(d,l,a);i.visualMode?(l=he(c[0].anchor,c[0].head)?c[0].anchor:c[0].head,n.setCursor(l),Ee(n,!1)):n.setCursor(se(a,0,-1))}},incrementNumberToken:function(e,n){for(var r,i,o,a,s=e.getCursor(),l=e.getLine(s.line),c=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi;null!==(r=c.exec(l))&&(o=(i=r.index)+r[0].length,!(s.ch<o)););if((n.backtrack||!(o<=s.ch))&&r){var u=r[2]||r[4],d=r[3]||r[5],f=n.increase?1:-1,p={"0b":2,0:8,"":10,"0x":16}[u.toLowerCase()];a=(parseInt(r[1]+d,p)+f*n.repeat).toString(p);var h=u?new Array(d.length-a.length+1+r[1].length).join("0"):"";a="-"===a.charAt(0)?"-"+u+h+a.substr(1):u+h+a;var m=new t(s.line,i),g=new t(s.line,o);e.replaceRange(a,m,g),e.setCursor(new t(s.line,i+a.length-1))}},repeatLastEdit:function(e,t,n){if(n.lastEditInputState){var r=t.repeat;r&&t.repeatIsExplicit?n.lastEditInputState.repeatOverride=r:r=n.lastEditInputState.repeatOverride||r,Kt(e,n,r,!1)}},indent:function(e,t){e.indentLine(e.getCursor().line,t.indentRight)},exitInsertMode:Nt};function ie(e,t){re[e]=t}function oe(e,n){var r=e.state.vim,i=r.insertMode||r.visualMode,o=Math.min(Math.max(e.firstLine(),n.line),e.lastLine()),a=ye(e,o)-1+!!i,s=Math.min(Math.max(0,n.ch),a);return new t(o,s)}function ae(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function se(e,n,r){return"object"==typeof n&&(r=n.ch,n=n.line),new t(e.line+n,e.ch+r)}function le(e,t,n,r){for(var i,o=[],a=[],s=0;s<t.length;s++){var l=t[s];"insert"==n&&"insert"!=l.context||l.context&&l.context!=n||r.operator&&"action"==l.type||!(i=ce(e,l.keys))||("partial"==i&&o.push(l),"full"==i&&a.push(l))}return{partial:o.length&&o,full:a.length&&a}}function ce(e,t){if("<character>"==t.slice(-11)){var n=t.length-11,r=e.slice(0,n),i=t.slice(0,n);return r==i&&e.length>n?"full":0==i.indexOf(r)&&"partial"}return e==t?"full":0==t.indexOf(e)&&"partial"}function ue(e){var t=/^.*(<[^>]+>)$/.exec(e),n=t?t[1]:e.slice(-1);if(n.length>1)switch(n){case"<CR>":n="\n";break;case"<Space>":n=" ";break;default:n=""}return n}function de(e,t,n){return function(){for(var r=0;r<n;r++)t(e)}}function fe(e){return new t(e.line,e.ch)}function pe(e,t){return e.ch==t.ch&&e.line==t.line}function he(e,t){return e.line<t.line||e.line==t.line&&e.ch<t.ch}function me(e,t){return arguments.length>2&&(t=me.apply(void 0,Array.prototype.slice.call(arguments,1))),he(e,t)?e:t}function ge(e,t){return arguments.length>2&&(t=ge.apply(void 0,Array.prototype.slice.call(arguments,1))),he(e,t)?t:e}function ve(e,t,n){var r=he(e,t),i=he(t,n);return r&&i}function ye(e,t){return e.getLine(t).length}function be(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function xe(e){return e.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function ke(e,n,r){var i=ye(e,n),o=new Array(r-i+1).join(" ");e.setCursor(new t(n,i)),e.replaceRange(o,e.getCursor())}function we(e,n){var r=[],i=e.listSelections(),o=fe(e.clipPos(n)),a=!pe(n,o),s=Ce(i,e.getCursor("head")),l=pe(i[s].head,i[s].anchor),c=i.length-1,u=c-s>s?c:0,d=i[u].anchor,f=Math.min(d.line,o.line),p=Math.max(d.line,o.line),h=d.ch,m=o.ch,g=i[u].head.ch-h,v=m-h;g>0&&v<=0?(h++,a||m--):g<0&&v>=0?(h--,l||m++):g<0&&-1==v&&(h--,m++);for(var y=f;y<=p;y++){var b={anchor:new t(y,h),head:new t(y,m)};r.push(b)}return e.setSelections(r),n.ch=m,d.ch=h,d}function _e(e,t,n){for(var r=[],i=0;i<n;i++){var o=se(t,i,0);r.push({anchor:o,head:o})}e.setSelections(r,0)}function Ce(e,t,n){for(var r=0;r<e.length;r++){var i="head"!=n&&pe(e[r].anchor,t),o="anchor"!=n&&pe(e[r].head,t);if(i||o)return r}return-1}function Se(e,n){var r=n.lastSelection,i=function(){var t=e.listSelections(),n=t[0],r=t[t.length-1];return[he(n.anchor,n.head)?n.anchor:n.head,he(r.anchor,r.head)?r.head:r.anchor]},o=function(){var n=e.getCursor(),i=e.getCursor(),o=r.visualBlock;if(o){var a=o.width,s=o.height;i=new t(n.line+s,n.ch+a);for(var l=[],c=n.line;c<i.line;c++){var u={anchor:new t(c,n.ch),head:new t(c,i.ch)};l.push(u)}e.setSelections(l)}else{var d=r.anchorMark.find(),f=r.headMark.find(),p=f.line-d.line,h=f.ch-d.ch;i={line:i.line+p,ch:p?i.ch:h+i.ch},r.visualLine&&(n=new t(n.line,0),i=new t(i.line,ye(e,i.line))),e.setSelection(n,i)}return[n,i]};return n.visualMode?i():o()}function Me(e,t){var n=t.sel.anchor,r=t.sel.head;t.lastPastedText&&(r=e.posFromIndex(e.indexFromPos(n)+t.lastPastedText.length),t.lastPastedText=null),t.lastSelection={anchorMark:e.setBookmark(n),headMark:e.setBookmark(r),anchor:fe(n),head:fe(r),visualMode:t.visualMode,visualLine:t.visualLine,visualBlock:t.visualBlock}}function Le(e,n,r){var i,o=e.state.vim.sel,a=o.head,s=o.anchor;return he(r,n)&&(i=r,r=n,n=i),he(a,s)?(a=me(n,a),s=ge(s,r)):(s=me(n,s),-1==(a=se(a=ge(a,r),0,-1)).ch&&a.line!=e.firstLine()&&(a=new t(a.line-1,ye(e,a.line-1)))),[s,a]}function Te(e,t,n){var r=e.state.vim,i=Ae(e,t=t||r.sel,n=n||r.visualLine?"line":r.visualBlock?"block":"char");e.setSelections(i.ranges,i.primary)}function Ae(e,n,r,i){var o=fe(n.head),a=fe(n.anchor);if("char"==r){var s=i||he(n.head,n.anchor)?0:1,l=he(n.head,n.anchor)?1:0;return o=se(n.head,0,s),{ranges:[{anchor:a=se(n.anchor,0,l),head:o}],primary:0}}if("line"==r){if(he(n.head,n.anchor))o.ch=0,a.ch=ye(e,a.line);else{a.ch=0;var c=e.lastLine();o.line>c&&(o.line=c),o.ch=ye(e,o.line)}return{ranges:[{anchor:a,head:o}],primary:0}}if("block"==r){var u=Math.min(a.line,o.line),d=a.ch,f=Math.max(a.line,o.line),p=o.ch;d<p?p+=1:d+=1;for(var h=f-u+1,m=o.line==u?0:h-1,g=[],v=0;v<h;v++)g.push({anchor:new t(u+v,d),head:new t(u+v,p)});return{ranges:g,primary:m}}}function Oe(e){var t=e.getCursor("head");return 1==e.getSelection().length&&(t=me(t,e.getCursor("anchor"))),t}function Ee(t,n){var r=t.state.vim;!1!==n&&t.setCursor(oe(t,r.sel.head)),Me(t,r),r.visualMode=!1,r.visualLine=!1,r.visualBlock=!1,r.insertMode||e.signal(t,"vim-mode-change",{mode:"normal"})}function Ne(e,t,n){var r=e.getRange(t,n);if(/\n\s*$/.test(r)){var i=r.split("\n");i.pop();for(var o=i.pop();i.length>0&&o&&O(o);o=i.pop())n.line--,n.ch=0;o?(n.line--,n.ch=ye(e,n.line)):n.ch=0}}function Pe(e,t,n){t.ch=0,n.ch=0,n.line++}function Fe(e){if(!e)return 0;var t=e.search(/\S/);return-1==t?e.length:t}function De(e,n,r,i,o){for(var a=Oe(e),s=e.getLine(a.line),l=a.ch,c=o?g[0]:v[0];!c(s.charAt(l));)if(++l>=s.length)return null;i?c=v[0]:(c=g[0])(s.charAt(l))||(c=g[1]);for(var u=l,d=l;c(s.charAt(u))&&u<s.length;)u++;for(;c(s.charAt(d))&&d>=0;)d--;if(d++,n){for(var f=u;/\s/.test(s.charAt(u))&&u<s.length;)u++;if(f==u){for(var p=d;/\s/.test(s.charAt(d-1))&&d>0;)d--;d||(d=p)}}return{start:new t(a.line,d),end:new t(a.line,u)}}function ze(t,n,r){var i=n;if(!e.findMatchingTag||!e.findEnclosingTag)return{start:i,end:i};var o=e.findMatchingTag(t,n)||e.findEnclosingTag(t,n);return o&&o.open&&o.close?r?{start:o.open.from,end:o.close.to}:{start:o.open.to,end:o.close.from}:{start:i,end:i}}function Ie(e,t,n){pe(t,n)||I.jumpList.add(e,t,n)}function Re(e,t){I.lastCharacterSearch.increment=e,I.lastCharacterSearch.forward=t.forward,I.lastCharacterSearch.selectedCharacter=t.selectedCharacter}var qe={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},Be={bracket:{isComplete:function(e){if(e.nextCh===e.symb){if(e.depth++,e.depth>=1)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return 0===e.index&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t="*"===e.lastCh&&"/"===e.nextCh;return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb="m"===e.symb?"{":"}",e.reverseSymb="{"===e.symb?"}":"{"},isComplete:function(e){return e.nextCh===e.symb}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if("#"===e.nextCh){var t=e.lineText.match(/^#(\w+)/)[1];if("endif"===t){if(e.forward&&0===e.depth)return!0;e.depth++}else if("if"===t){if(!e.forward&&0===e.depth)return!0;e.depth--}if("else"===t&&0===e.depth)return!0}return!1}}};function He(e,n,r,i){var o=fe(e.getCursor()),a=r?1:-1,s=r?e.lineCount():-1,l=o.ch,c=o.line,u=e.getLine(c),d={lineText:u,nextCh:u.charAt(l),lastCh:null,index:l,symb:i,reverseSymb:(r?{")":"(","}":"{"}:{"(":")","{":"}"})[i],forward:r,depth:0,curMoveThrough:!1},f=qe[i];if(!f)return o;var p=Be[f].init,h=Be[f].isComplete;for(p&&p(d);c!==s&&n;){if(d.index+=a,d.nextCh=d.lineText.charAt(d.index),!d.nextCh){if(c+=a,d.lineText=e.getLine(c)||"",a>0)d.index=0;else{var m=d.lineText.length;d.index=m>0?m-1:0}d.nextCh=d.lineText.charAt(d.index)}h(d)&&(o.line=c,o.ch=d.index,n--)}return d.nextCh||d.curMoveThrough?new t(c,d.index):o}function je(e,t,n,r,i){var o=t.line,a=t.ch,s=e.getLine(o),l=n?1:-1,c=r?v:g;if(i&&""==s){if(o+=l,s=e.getLine(o),!S(e,o))return null;a=n?0:s.length}for(;;){if(i&&""==s)return{from:0,to:0,line:o};for(var u=l>0?s.length:-1,d=u,f=u;a!=u;){for(var p=!1,h=0;h<c.length&&!p;++h)if(c[h](s.charAt(a))){for(d=a;a!=u&&c[h](s.charAt(a));)a+=l;if(p=d!=(f=a),d==t.ch&&o==t.line&&f==d+l)continue;return{from:Math.min(d,f+1),to:Math.max(d,f),line:o}}p||(a+=l)}if(!S(e,o+=l))return null;s=e.getLine(o),a=l>0?0:s.length}}function We(e,n,r,i,o,a){var s=fe(n),l=[];(i&&!o||!i&&o)&&r++;for(var c=!(i&&o),u=0;u<r;u++){var d=je(e,n,i,a,c);if(!d){var f=ye(e,e.lastLine());l.push(i?{line:e.lastLine(),from:f,to:f}:{line:0,from:0,to:0});break}l.push(d),n=new t(d.line,i?d.to-1:d.from)}var p=l.length!=r,h=l[0],m=l.pop();return i&&!o?(p||h.from==s.ch&&h.line==s.line||(m=l.pop()),new t(m.line,m.from)):i&&o?new t(m.line,m.to-1):!i&&o?(p||h.to==s.ch&&h.line==s.line||(m=l.pop()),new t(m.line,m.to)):new t(m.line,m.from)}function Ke(e,n,r,i,o){var a=new t(n.line+r.repeat-1,1/0),s=e.clipPos(a);return s.ch--,o||(i.lastHPos=1/0,i.lastHSPos=e.charCoords(s,"div").left),a}function Ue(e,n,r,i){for(var o,a=e.getCursor(),s=a.ch,l=0;l<n;l++){if(-1==(o=Ge(s,e.getLine(a.line),i,r,!0)))return null;s=o}return new t(e.getCursor().line,o)}function $e(e,n){var r=e.getCursor().line;return oe(e,new t(r,n-1))}function Ve(e,t,n,r){N(n,_)&&(t.marks[n]&&t.marks[n].clear(),t.marks[n]=e.setBookmark(r))}function Ge(e,t,n,r,i){var o;return r?-1==(o=t.indexOf(n,e+1))||i||(o-=1):-1==(o=t.lastIndexOf(n,e-1))||i||(o+=1),o}function Xe(e,n,r,i,o){var a,s=n.line,l=e.firstLine(),c=e.lastLine(),u=s;function d(t){return!e.getLine(t)}function f(e,t,n){return n?d(e)!=d(e+t):!d(e)&&d(e+t)}if(i){for(;l<=u&&u<=c&&r>0;)f(u,i)&&r--,u+=i;return new t(u,0)}var p=e.state.vim;if(p.visualLine&&f(s,1,!0)){var h=p.sel.anchor;f(h.line,-1,!0)&&(o&&h.line==s||(s+=1))}var m=d(s);for(u=s;u<=c&&r;u++)f(u,1,!0)&&(o&&d(u)==m||r--);for(a=new t(u,0),u>c&&!m?m=!0:o=!1,u=s;u>l&&(o&&d(u)!=m&&u!=s||!f(u,-1,!0));u--);return{start:new t(u,0),end:a}}function Qe(e,n,r,i,o){function a(e){e.pos+e.dir<0||e.pos+e.dir>=e.line.length?e.line=null:e.pos+=e.dir}function s(e,t,n,r){var i={line:e.getLine(t),ln:t,pos:n,dir:r};if(""===i.line)return{ln:i.ln,pos:i.pos};var s=i.pos;for(a(i);null!==i.line;){if(s=i.pos,E(i.line[i.pos])){if(o){for(a(i);null!==i.line&&O(i.line[i.pos]);)s=i.pos,a(i);return{ln:i.ln,pos:s+1}}return{ln:i.ln,pos:i.pos+1}}a(i)}return{ln:i.ln,pos:s+1}}function l(e,t,n,r){var i=e.getLine(t),s={line:i,ln:t,pos:n,dir:r};if(""===s.line)return{ln:s.ln,pos:s.pos};var l=s.pos;for(a(s);null!==s.line;){if(O(s.line[s.pos])||E(s.line[s.pos])){if(E(s.line[s.pos]))return o&&O(s.line[s.pos+1])?{ln:s.ln,pos:s.pos+1}:{ln:s.ln,pos:l}}else l=s.pos;a(s)}return s.line=i,o&&O(s.line[s.pos])?{ln:s.ln,pos:s.pos}:{ln:s.ln,pos:l}}for(var c={ln:n.line,pos:n.ch};r>0;)c=i<0?l(e,c.ln,c.pos,i):s(e,c.ln,c.pos,i),r--;return new t(c.ln,c.pos)}function Ye(e,n,r,i){function o(e,t){if(t.pos+t.dir<0||t.pos+t.dir>=t.line.length){if(t.ln+=t.dir,!S(e,t.ln))return t.line=null,t.ln=null,void(t.pos=null);t.line=e.getLine(t.ln),t.pos=t.dir>0?0:t.line.length-1}else t.pos+=t.dir}function a(e,t,n,r){var i=""===(c=e.getLine(t)),a={line:c,ln:t,pos:n,dir:r},s={ln:a.ln,pos:a.pos},l=""===a.line;for(o(e,a);null!==a.line;){if(s.ln=a.ln,s.pos=a.pos,""===a.line&&!l)return{ln:a.ln,pos:a.pos};if(i&&""!==a.line&&!O(a.line[a.pos]))return{ln:a.ln,pos:a.pos};!E(a.line[a.pos])||i||a.pos!==a.line.length-1&&!O(a.line[a.pos+1])||(i=!0),o(e,a)}var c=e.getLine(s.ln);s.pos=0;for(var u=c.length-1;u>=0;--u)if(!O(c[u])){s.pos=u;break}return s}function s(e,t,n,r){var i={line:l=e.getLine(t),ln:t,pos:n,dir:r},a={ln:i.ln,pos:null},s=""===i.line;for(o(e,i);null!==i.line;){if(""===i.line&&!s)return null!==a.pos?a:{ln:i.ln,pos:i.pos};if(E(i.line[i.pos])&&null!==a.pos&&(i.ln!==a.ln||i.pos+1!==a.pos))return a;""===i.line||O(i.line[i.pos])||(s=!1,a={ln:i.ln,pos:i.pos}),o(e,i)}var l=e.getLine(a.ln);a.pos=0;for(var c=0;c<l.length;++c)if(!O(l[c])){a.pos=c;break}return a}for(var l={ln:n.line,pos:n.ch};r>0;)l=i<0?s(e,l.ln,l.pos,i):a(e,l.ln,l.pos,i),r--;return new t(l.ln,l.pos)}function Je(e,n,r,i){var o,a,s=n,l={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[r],c={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[r],u=e.getLine(s.line).charAt(s.ch)===c?1:0;if(o=e.scanForBracket(new t(s.line,s.ch+u),-1,void 0,{bracketRegex:l}),a=e.scanForBracket(new t(s.line,s.ch+u),1,void 0,{bracketRegex:l}),!o||!a)return{start:s,end:s};if(o=o.pos,a=a.pos,o.line==a.line&&o.ch>a.ch||o.line>a.line){var d=o;o=a,a=d}return i?a.ch+=1:o.ch+=1,{start:o,end:a}}function Ze(e,n,r,i){var o,a,s,l,c=fe(n),u=e.getLine(c.line).split(""),d=u.indexOf(r);if(c.ch<d?c.ch=d:d<c.ch&&u[c.ch]==r&&(a=c.ch,--c.ch),u[c.ch]!=r||a)for(s=c.ch;s>-1&&!o;s--)u[s]==r&&(o=s+1);else o=c.ch+1;if(o&&!a)for(s=o,l=u.length;s<l&&!a;s++)u[s]==r&&(a=s);return o&&a?(i&&(--o,++a),{start:new t(c.line,o),end:new t(c.line,a)}):{start:c,end:c}}function et(){}function tt(e){var t=e.state.vim;return t.searchState_||(t.searchState_=new et)}function nt(e){return it(e,"/")}function rt(e){return ot(e,"/")}function it(e,t){var n=ot(e,t)||[];if(!n.length)return[];var r=[];if(0===n[0]){for(var i=0;i<n.length;i++)"number"==typeof n[i]&&r.push(e.substring(n[i]+1,n[i+1]));return r}}function ot(e,t){t||(t="/");for(var n=!1,r=[],i=0;i<e.length;i++){var o=e.charAt(i);n||o!=t||r.push(i),n=!n&&"\\"==o}return r}function at(e){for(var t="|(){",n="}",r=!1,i=[],o=-1;o<e.length;o++){var a=e.charAt(o)||"",s=e.charAt(o+1)||"",l=s&&-1!=t.indexOf(s);r?("\\"===a&&l||i.push(a),r=!1):"\\"===a?(r=!0,s&&-1!=n.indexOf(s)&&(l=!0),l&&"\\"!==s||i.push(a)):(i.push(a),l&&"\\"!==s&&i.push("\\"))}return i.join("")}F("pcre",!0,"boolean"),et.prototype={getQuery:function(){return I.query},setQuery:function(e){I.query=e},getOverlay:function(){return this.searchOverlay},setOverlay:function(e){this.searchOverlay=e},isReversed:function(){return I.isReversed},setReversed:function(e){I.isReversed=e},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(e){this.annotate=e}};var st={"\\n":"\n","\\r":"\r","\\t":"\t"};function lt(e){for(var t=!1,n=[],r=-1;r<e.length;r++){var i=e.charAt(r)||"",o=e.charAt(r+1)||"";st[i+o]?(n.push(st[i+o]),r++):t?(n.push(i),t=!1):"\\"===i?(t=!0,T(o)||"$"===o?n.push("$"):"/"!==o&&"\\"!==o&&n.push("\\")):("$"===i&&n.push("$"),n.push(i),"/"===o&&n.push("\\"))}return n.join("")}var ct={"\\/":"/","\\\\":"\\","\\n":"\n","\\r":"\r","\\t":"\t","\\&":"&"};function ut(t){for(var n=new e.StringStream(t),r=[];!n.eol();){for(;n.peek()&&"\\"!=n.peek();)r.push(n.next());var i=!1;for(var o in ct)if(n.match(o,!0)){i=!0,r.push(ct[o]);break}i||r.push(n.next())}return r.join("")}function dt(e,t,n){if(I.registerController.getRegister("/").setText(e),e instanceof RegExp)return e;var r,i,o=rt(e);return o.length?(r=e.substring(0,o[0]),i=-1!=e.substring(o[0]).indexOf("i")):r=e,r?(z("pcre")||(r=at(r)),n&&(t=/^[^A-Z]*$/.test(r)),new RegExp(r,t||i?"im":"m")):null}function ft(e){"string"==typeof e&&(e=document.createElement(e));for(var t,n=1;n<arguments.length;n++)if(t=arguments[n])if("object"!=typeof t&&(t=document.createTextNode(t)),t.nodeType)e.appendChild(t);else for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&("$"===r[0]?e.style[r.slice(1)]=t[r]:e.setAttribute(r,t[r]));return e}function pt(e,t){var n=ft("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},t);e.openNotification?e.openNotification(n,{bottom:!0,duration:5e3}):alert(n.innerText)}function ht(e,t){return ft(document.createDocumentFragment(),ft("span",{$fontFamily:"monospace",$whiteSpace:"pre"},e,ft("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false"})),t&&ft("span",{$color:"#888"},t))}function mt(e,t){var n=ht(t.prefix,t.desc);if(e.openDialog)e.openDialog(n,t.onClose,{onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:t.value});else{var r="";"string"!=typeof t.prefix&&t.prefix&&(r+=t.prefix.textContent),t.desc&&(r+=" "+t.desc),t.onClose(prompt(r,""))}}function gt(e,t){if(e instanceof RegExp&&t instanceof RegExp){for(var n=["global","multiline","ignoreCase","source"],r=0;r<n.length;r++){var i=n[r];if(e[i]!==t[i])return!1}return!0}return!1}function vt(e,t,n,r){if(t){var i=tt(e),o=dt(t,!!n,!!r);if(o)return xt(e,o),gt(o,i.getQuery())||i.setQuery(o),o}}function yt(e){if("^"==e.source.charAt(0))var t=!0;return{token:function(n){if(!t||n.sol()){var r=n.match(e,!1);if(r)return 0==r[0].length?(n.next(),"searching"):n.sol()||(n.backUp(1),e.exec(n.next()+r[0]))?(n.match(e),"searching"):(n.next(),null);for(;!n.eol()&&(n.next(),!n.match(e,!1)););}else n.skipToEnd()},query:e}}var bt=0;function xt(e,t){clearTimeout(bt),bt=setTimeout((function(){if(e.state.vim){var n=tt(e),r=n.getOverlay();r&&t==r.query||(r&&e.removeOverlay(r),r=yt(t),e.addOverlay(r),e.showMatchesOnScrollbar&&(n.getScrollbarAnnotate()&&n.getScrollbarAnnotate().clear(),n.setScrollbarAnnotate(e.showMatchesOnScrollbar(t))),n.setOverlay(r))}}),50)}function kt(e,n,r,i){return void 0===i&&(i=1),e.operation((function(){for(var o=e.getCursor(),a=e.getSearchCursor(r,o),s=0;s<i;s++){var l=a.find(n);if(0==s&&l&&pe(a.from(),o)){var c=n?a.from():a.to();(l=a.find(n))&&!l[0]&&pe(a.from(),c)&&e.getLine(c.line).length==c.ch&&(l=a.find(n))}if(!l&&!(a=e.getSearchCursor(r,n?new t(e.lastLine()):new t(e.firstLine(),0))).find(n))return}return a.from()}))}function wt(e,n,r,i,o){return void 0===i&&(i=1),e.operation((function(){var a=e.getCursor(),s=e.getSearchCursor(r,a),l=s.find(!n);!o.visualMode&&l&&pe(s.from(),a)&&s.find(!n);for(var c=0;c<i;c++)if(!(l=s.find(n))&&!(s=e.getSearchCursor(r,n?new t(e.lastLine()):new t(e.firstLine(),0))).find(n))return;return[s.from(),s.to()]}))}function _t(e){var t=tt(e);e.removeOverlay(tt(e).getOverlay()),t.setOverlay(null),t.getScrollbarAnnotate()&&(t.getScrollbarAnnotate().clear(),t.setScrollbarAnnotate(null))}function Ct(e,t,n){return"number"!=typeof e&&(e=e.line),t instanceof Array?N(e,t):"number"==typeof n?e>=t&&e<=n:e==t}function St(e){var t=e.getScrollInfo(),n=6,r=10,i=e.coordsChar({left:0,top:n+t.top},"local"),o=t.clientHeight-r+t.top,a=e.coordsChar({left:0,top:o},"local");return{top:i.line,bottom:a.line}}function Mt(e,n,r){if("'"==r||"`"==r)return I.jumpList.find(e,-1)||new t(0,0);if("."==r)return Lt(e);var i=n.marks[r];return i&&i.find()}function Lt(e){for(var t=e.doc.history.done,n=t.length;n--;)if(t[n].changes)return fe(t[n].changes[0].to)}var Tt=function(){this.buildCommandMap_()};Tt.prototype={processCommand:function(e,t,n){var r=this;e.operation((function(){e.curOp.isVimOp=!0,r._processCommand(e,t,n)}))},_processCommand:function(t,n,r){var i=t.state.vim,o=I.registerController.getRegister(":"),a=o.toString();i.visualMode&&Ee(t);var s=new e.StringStream(n);o.setText(n);var l,c,u=r||{};u.input=n;try{this.parseInput_(t,s,u)}catch(e){throw pt(t,e.toString()),e}if(u.commandName){if(l=this.matchCommand_(u.commandName)){if(c=l.name,l.excludeFromCommandHistory&&o.setText(a),this.parseCommandArgs_(s,u,l),"exToKey"==l.type){for(var d=0;d<l.toKeys.length;d++)K.handleKey(t,l.toKeys[d],"mapping");return}if("exToEx"==l.type)return void this.processCommand(t,l.toInput)}}else void 0!==u.line&&(c="move");if(c)try{At[c](t,u),l&&l.possiblyAsync||!u.callback||u.callback()}catch(e){throw pt(t,e.toString()),e}else pt(t,'Not an editor command ":'+n+'"')},parseInput_:function(e,t,n){t.eatWhile(":"),t.eat("%")?(n.line=e.firstLine(),n.lineEnd=e.lastLine()):(n.line=this.parseLineSpec_(e,t),void 0!==n.line&&t.eat(",")&&(n.lineEnd=this.parseLineSpec_(e,t)));var r=t.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return n.commandName=r?r[1]:t.match(/.*/)[0],n},parseLineSpec_:function(e,t){var n=t.match(/^(\d+)/);if(n)return parseInt(n[1],10)-1;switch(t.next()){case".":return this.parseLineSpecOffset_(t,e.getCursor().line);case"$":return this.parseLineSpecOffset_(t,e.lastLine());case"'":var r=t.next(),i=Mt(e,e.state.vim,r);if(!i)throw new Error("Mark not set");return this.parseLineSpecOffset_(t,i.line);case"-":case"+":return t.backUp(1),this.parseLineSpecOffset_(t,e.getCursor().line);default:return void t.backUp(1)}},parseLineSpecOffset_:function(e,t){var n=e.match(/^([+-])?(\d+)/);if(n){var r=parseInt(n[2],10);"-"==n[1]?t-=r:t+=r}return t},parseCommandArgs_:function(e,t,n){if(!e.eol()){t.argString=e.match(/.*/)[0];var r=n.argDelimiter||/\s+/,i=be(t.argString).split(r);i.length&&i[0]&&(t.args=i)}},matchCommand_:function(e){for(var t=e.length;t>0;t--){var n=e.substring(0,t);if(this.commandMap_[n]){var r=this.commandMap_[n];if(0===r.name.indexOf(e))return r}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e<o.length;e++){var t=o[e],n=t.shortName||t.name;this.commandMap_[n]=t}},map:function(e,t,n){if(":"!=e&&":"==e.charAt(0)){if(n)throw Error("Mode not supported for ex mappings");var i=e.substring(1);":"!=t&&":"==t.charAt(0)?this.commandMap_[i]={name:i,type:"exToEx",toInput:t.substring(1),user:!0}:this.commandMap_[i]={name:i,type:"exToKey",toKeys:t,user:!0}}else if(":"!=t&&":"==t.charAt(0)){var o={keys:e,type:"keyToEx",exArgs:{input:t.substring(1)}};n&&(o.context=n),r.unshift(o)}else o={keys:e,type:"keyToKey",toKeys:t},n&&(o.context=n),r.unshift(o)},unmap:function(e,t){if(":"!=e&&":"==e.charAt(0)){if(t)throw Error("Mode not supported for ex mappings");var n=e.substring(1);if(this.commandMap_[n]&&this.commandMap_[n].user)return delete this.commandMap_[n],!0}else for(var i=e,o=0;o<r.length;o++)if(i==r[o].keys&&r[o].context===t)return r.splice(o,1),!0}};var At={colorscheme:function(e,t){!t.args||t.args.length<1?pt(e,e.getOption("theme")):e.setOption("theme",t.args[0])},map:function(e,t,n){var r=t.args;!r||r.length<2?e&&pt(e,"Invalid mapping: "+t.input):Ot.map(r[0],r[1],n)},imap:function(e,t){this.map(e,t,"insert")},nmap:function(e,t){this.map(e,t,"normal")},vmap:function(e,t){this.map(e,t,"visual")},unmap:function(e,t,n){var r=t.args;(!r||r.length<1||!Ot.unmap(r[0],n))&&e&&pt(e,"No such mapping: "+t.input)},move:function(e,t){Y.processCommand(e,e.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:t.line+1})},set:function(e,t){var n=t.args,r=t.setCfg||{};if(!n||n.length<1)e&&pt(e,"Invalid mapping: "+t.input);else{var i=n[0].split("="),o=i[0],a=i[1],s=!1;if("?"==o.charAt(o.length-1)){if(a)throw Error("Trailing characters: "+t.argString);o=o.substring(0,o.length-1),s=!0}void 0===a&&"no"==o.substring(0,2)&&(o=o.substring(2),a=!1);var l=P[o]&&"boolean"==P[o].type;if(l&&null==a&&(a=!0),!l&&void 0===a||s){var c=z(o,e,r);c instanceof Error?pt(e,c.message):pt(e,!0===c||!1===c?" "+(c?"":"no")+o:"  "+o+"="+c)}else{var u=D(o,a,e,r);u instanceof Error&&pt(e,u.message)}}},setlocal:function(e,t){t.setCfg={scope:"local"},this.set(e,t)},setglobal:function(e,t){t.setCfg={scope:"global"},this.set(e,t)},registers:function(e,t){var n=t.args,r=I.registerController.registers,i="----------Registers----------\n\n";if(n){n=n.join("");for(var o=0;o<n.length;o++)a=n.charAt(o),I.registerController.isValidRegister(a)&&(i+='"'+a+"    "+(r[a]||new V).toString()+"\n")}else for(var a in r){var s=r[a].toString();s.length&&(i+='"'+a+"    "+s+"\n")}pt(e,i)},sort:function(n,r){var i,o,a,s,l;function c(){if(r.argString){var t=new e.StringStream(r.argString);if(t.eat("!")&&(i=!0),t.eol())return;if(!t.eatSpace())return"Invalid arguments";var n=t.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!n&&!t.eol())return"Invalid arguments";if(n[1]){o=-1!=n[1].indexOf("i"),a=-1!=n[1].indexOf("u");var c=-1!=n[1].indexOf("d")||-1!=n[1].indexOf("n")&&1,u=-1!=n[1].indexOf("x")&&1,d=-1!=n[1].indexOf("o")&&1;if(c+u+d>1)return"Invalid arguments";s=(c?"decimal":u&&"hex")||d&&"octal"}n[2]&&(l=new RegExp(n[2].substr(1,n[2].length-2),o?"i":""))}}var u=c();if(u)pt(n,u+": "+r.argString);else{var d=r.line||n.firstLine(),f=r.lineEnd||r.line||n.lastLine();if(d!=f){var p=new t(d,0),h=new t(f,ye(n,f)),m=n.getRange(p,h).split("\n"),g=l||("decimal"==s?/(-?)([\d]+)/:"hex"==s?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==s?/([0-7]+)/:null),v="decimal"==s?10:"hex"==s?16:"octal"==s?8:null,y=[],b=[];if(s||l)for(var x=0;x<m.length;x++){var k=l?m[x].match(l):null;k&&""!=k[0]?y.push(k):!l&&g.exec(m[x])?y.push(m[x]):b.push(m[x])}else b=m;if(y.sort(l?S:C),l)for(x=0;x<y.length;x++)y[x]=y[x].input;else s||b.sort(C);if(m=i?y.concat(b):b.concat(y),a){var w,_=m;for(m=[],x=0;x<_.length;x++)_[x]!=w&&m.push(_[x]),w=_[x]}n.replaceRange(m.join("\n"),p,h)}}function C(e,t){var n;i&&(n=e,e=t,t=n),o&&(e=e.toLowerCase(),t=t.toLowerCase());var r=s&&g.exec(e),a=s&&g.exec(t);return r?(r=parseInt((r[1]+r[2]).toLowerCase(),v))-(a=parseInt((a[1]+a[2]).toLowerCase(),v)):e<t?-1:1}function S(e,t){var n;return i&&(n=e,e=t,t=n),o&&(e[0]=e[0].toLowerCase(),t[0]=t[0].toLowerCase()),e[0]<t[0]?-1:1}},vglobal:function(e,t){this.global(e,t)},global:function(e,t){var n=t.argString;if(n){var r,i="v"===t.commandName[0],o=void 0!==t.line?t.line:e.firstLine(),a=t.lineEnd||t.line||e.lastLine(),s=nt(n),l=n;if(s.length&&(l=s[0],r=s.slice(1,s.length).join("/")),l)try{vt(e,l,!0,!0)}catch(t){return void pt(e,"Invalid regex: "+l)}for(var c=tt(e).getQuery(),u=[],d=o;d<=a;d++){var f=e.getLineHandle(d);c.test(f.text)!==i&&u.push(r?f:f.text)}if(r){var p=0,h=function(){if(p<u.length){var t=u[p++],n=e.getLineNumber(t);if(null==n)return void h();var i=n+1+r;Ot.processCommand(e,i,{callback:h})}};h()}else pt(e,u.join("\n"))}else pt(e,"Regular Expression missing from global")},substitute:function(e,n){if(!e.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var r,i,o,a,s=n.argString,l=s?it(s,s[0]):[],c="",u=!1,d=!1;if(l.length)r=l[0],z("pcre")&&""!==r&&(r=new RegExp(r).source),void 0!==(c=l[1])&&(c=z("pcre")?ut(c.replace(/([^\\])&/g,"$1$$&")):lt(c),I.lastSubstituteReplacePart=c),i=l[2]?l[2].split(" "):[];else if(s&&s.length)return void pt(e,"Substitutions should be of the form :s/pattern/replace/");if(i&&(o=i[0],a=parseInt(i[1]),o&&(-1!=o.indexOf("c")&&(u=!0),-1!=o.indexOf("g")&&(d=!0),r=z("pcre")?r+"/"+o:r.replace(/\//g,"\\/")+"/"+o)),r)try{vt(e,r,!0,!0)}catch(t){return void pt(e,"Invalid regex: "+r)}if(void 0!==(c=c||I.lastSubstituteReplacePart)){var f=tt(e).getQuery(),p=void 0!==n.line?n.line:e.getCursor().line,h=n.lineEnd||p;p==e.firstLine()&&h==e.lastLine()&&(h=1/0),a&&(h=(p=h)+a-1);var m=oe(e,new t(p,0)),g=e.getSearchCursor(f,m);Et(e,u,d,p,h,g,f,c,n.callback)}else pt(e,"No previous substitute regular expression")},redo:e.commands.redo,undo:e.commands.undo,write:function(t){e.commands.save?e.commands.save(t):t.save&&t.save()},nohlsearch:function(e){_t(e)},yank:function(e){var t=fe(e.getCursor()).line,n=e.getLine(t);I.registerController.pushText("0","yank",n,!0,!0)},delmarks:function(t,n){if(n.argString&&be(n.argString))for(var r=t.state.vim,i=new e.StringStream(be(n.argString));!i.eol();){i.eatSpace();var o=i.pos;if(!i.match(/[a-zA-Z]/,!1))return void pt(t,"Invalid argument: "+n.argString.substring(o));var a=i.next();if(i.match("-",!0)){if(!i.match(/[a-zA-Z]/,!1))return void pt(t,"Invalid argument: "+n.argString.substring(o));var s=a,l=i.next();if(!(M(s)&&M(l)||A(s)&&A(l)))return void pt(t,"Invalid argument: "+s+"-");var c=s.charCodeAt(0),u=l.charCodeAt(0);if(c>=u)return void pt(t,"Invalid argument: "+n.argString.substring(o));for(var d=0;d<=u-c;d++){var f=String.fromCharCode(c+d);delete r.marks[f]}}else delete r.marks[a]}else pt(t,"Argument required")}},Ot=new Tt;function Et(t,n,r,i,o,a,s,l,c){t.state.vim.exMode=!0;var u,d,f,p=!1;function h(){t.operation((function(){for(;!p;)m(),v();y()}))}function m(){var e=t.getRange(a.from(),a.to()).replace(s,l),n=a.to().line;a.replace(e),d=a.to().line,o+=d-n,f=d<n}function g(){var e=u&&fe(a.to()),t=a.findNext();return t&&!t[0]&&e&&pe(a.from(),e)&&(t=a.findNext()),t}function v(){for(;g()&&Ct(a.from(),i,o);)if(r||a.from().line!=d||f)return t.scrollIntoView(a.from(),30),t.setSelection(a.from(),a.to()),u=a.from(),void(p=!1);p=!0}function y(e){if(e&&e(),t.focus(),u){t.setCursor(u);var n=t.state.vim;n.exMode=!1,n.lastHPos=n.lastHSPos=u.ch}c&&c()}function b(n,r,i){switch(e.e_stop(n),e.keyName(n)){case"Y":m(),v();break;case"N":v();break;case"A":var o=c;c=void 0,t.operation(h),c=o;break;case"L":m();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":y(i)}return p&&y(i),!0}if(v(),!p)return n?void mt(t,{prefix:ft("span","replace with ",ft("strong",l)," (y/n/a/q/l)"),onKeyDown:b}):(h(),void(c&&c()));pt(t,"No matches for "+s.source)}function Nt(t){var n=t.state.vim,r=I.macroModeState,i=I.registerController.getRegister("."),o=r.isPlaying,a=r.lastInsertModeChanges;o||(t.off("change",qt),e.off(t.getInputField(),"keydown",Wt)),!o&&n.insertModeRepeat>1&&(Kt(t,n,n.insertModeRepeat-1,!0),n.lastEditInputState.repeatOverride=n.insertModeRepeat),delete n.insertModeRepeat,n.insertMode=!1,t.setCursor(t.getCursor().line,t.getCursor().ch-1),t.setOption("keyMap","vim"),t.setOption("disableInput",!0),t.toggleOverwrite(!1),i.setText(a.changes.join("")),e.signal(t,"vim-mode-change",{mode:"normal"}),r.isRecording&&It(r)}function Pt(e){r.unshift(e)}function Ft(e,t,n,r,i){var o={keys:e,type:t};for(var a in o[t]=n,o[t+"Args"]=r,i)o[a]=i[a];Pt(o)}function Dt(e,t,n,r){var i=I.registerController.getRegister(r);if(":"==r)return i.keyBuffer[0]&&Ot.processCommand(e,i.keyBuffer[0]),void(n.isPlaying=!1);var o=i.keyBuffer,a=0;n.isPlaying=!0,n.replaySearchQueries=i.searchQueries.slice(0);for(var s=0;s<o.length;s++)for(var l,c,u=o[s];u;)if(c=(l=/<\w+-.+?>|<\w+>|./.exec(u))[0],u=u.substring(l.index+c.length),K.handleKey(e,c,"macro"),t.insertMode){var d=i.insertModeChanges[a++].changes;I.macroModeState.lastInsertModeChanges.changes=d,Ut(e,d,1),Nt(e)}n.isPlaying=!1}function zt(e,t){if(!e.isPlaying){var n=e.latestRegister,r=I.registerController.getRegister(n);r&&r.pushText(t)}}function It(e){if(!e.isPlaying){var t=e.latestRegister,n=I.registerController.getRegister(t);n&&n.pushInsertModeChanges&&n.pushInsertModeChanges(e.lastInsertModeChanges)}}function Rt(e,t){if(!e.isPlaying){var n=e.latestRegister,r=I.registerController.getRegister(n);r&&r.pushSearchQuery&&r.pushSearchQuery(t)}}function qt(e,t){var n=I.macroModeState,r=n.lastInsertModeChanges;if(!n.isPlaying)for(;t;){if(r.expectCursorActivityForChange=!0,r.ignoreCount>1)r.ignoreCount--;else if("+input"==t.origin||"paste"==t.origin||void 0===t.origin){var i=e.listSelections().length;i>1&&(r.ignoreCount=i);var o=t.text.join("\n");r.maybeReset&&(r.changes=[],r.maybeReset=!1),o&&(e.state.overwrite&&!/\n/.test(o)?r.changes.push([o]):r.changes.push(o))}t=t.next}}function Bt(e){var t=e.state.vim;if(t.insertMode){var n=I.macroModeState;if(n.isPlaying)return;var r=n.lastInsertModeChanges;r.expectCursorActivityForChange?r.expectCursorActivityForChange=!1:r.maybeReset=!0}else e.curOp.isVimOp||Ht(e,t)}function Ht(t,n){var r=t.getCursor("anchor"),i=t.getCursor("head");if(n.visualMode&&!t.somethingSelected()?Ee(t,!1):n.visualMode||n.insertMode||!t.somethingSelected()||(n.visualMode=!0,n.visualLine=!1,e.signal(t,"vim-mode-change",{mode:"visual"})),n.visualMode){var o=he(i,r)?0:-1,a=he(i,r)?-1:0;i=se(i,0,o),r=se(r,0,a),n.sel={anchor:r,head:i},Ve(t,n,"<",me(i,r)),Ve(t,n,">",ge(i,r))}else n.insertMode||(n.lastHPos=t.getCursor().ch)}function jt(e){this.keyName=e}function Wt(t){var n=I.macroModeState.lastInsertModeChanges,r=e.keyName(t);function i(){return n.maybeReset&&(n.changes=[],n.maybeReset=!1),n.changes.push(new jt(r)),!0}r&&(-1==r.indexOf("Delete")&&-1==r.indexOf("Backspace")||e.lookupKey(r,"vim-insert",i))}function Kt(e,t,n,r){var i=I.macroModeState;i.isPlaying=!0;var o=!!t.lastEditActionCommand,a=t.inputState;function s(){o?Y.processAction(e,t,t.lastEditActionCommand):Y.evalInput(e,t)}function l(n){if(i.lastInsertModeChanges.changes.length>0){n=t.lastEditActionCommand?n:1;var r=i.lastInsertModeChanges;Ut(e,r.changes,n)}}if(t.inputState=t.lastEditInputState,o&&t.lastEditActionCommand.interlaceInsertRepeat)for(var c=0;c<n;c++)s(),l(1);else r||s(),l(n);t.inputState=a,t.insertMode&&!r&&Nt(e),i.isPlaying=!1}function Ut(t,n,r){function i(n){return"string"==typeof n?e.commands[n](t):n(t),!0}var o=t.getCursor("head"),a=I.macroModeState.lastInsertModeChanges.visualBlock;a&&(_e(t,o,a+1),r=t.listSelections().length,t.setCursor(o));for(var s=0;s<r;s++){a&&t.setCursor(se(o,s,0));for(var l=0;l<n.length;l++){var c=n[l];if(c instanceof jt)e.lookupKey(c.keyName,"vim-insert",i);else if("string"==typeof c)t.replaceSelection(c);else{var u=t.getCursor(),d=se(u,0,c[0].length);t.replaceRange(c[0],u,d),t.setCursor(d)}}}a&&t.setCursor(se(o,0,1))}function $t(e){var t=new e.constructor;return Object.keys(e).forEach((function(n){var r=e[n];Array.isArray(r)?r=r.slice():r&&"object"==typeof r&&r.constructor!=Object&&(r=$t(r)),t[n]=r})),e.sel&&(t.sel={head:e.sel.head&&fe(e.sel.head),anchor:e.sel.anchor&&fe(e.sel.anchor)}),t}function Vt(e,t,n){var r=!1,i=K.maybeInitVimState_(e),o=i.visualBlock||i.wasInVisualBlock,a=e.isInMultiSelectMode();if(i.wasInVisualBlock&&!a?i.wasInVisualBlock=!1:a&&i.visualBlock&&(i.wasInVisualBlock=!0),"<Esc>"!=t||i.insertMode||i.visualMode||!a||"<Esc>"!=i.status)if(o||!a||e.inVirtualSelectionMode)r=K.handleKey(e,t,n);else{var s=$t(i);e.operation((function(){e.curOp.isVimOp=!0,e.forEachSelection((function(){var i=e.getCursor("head"),o=e.getCursor("anchor"),a=he(i,o)?0:-1,l=he(i,o)?-1:0;i=se(i,0,a),o=se(o,0,l),e.state.vim.sel.head=i,e.state.vim.sel.anchor=o,r=K.handleKey(e,t,n),e.virtualSelection&&(e.state.vim=$t(s))})),e.curOp.cursorActivity&&!r&&(e.curOp.cursorActivity=!1),e.state.vim=i}),!0)}else $(e);return!r||i.visualMode||i.insert||i.visualMode==e.somethingSelected()||Ht(e,i),r}return e.keyMap.vim={attach:c,detach:l,call:u},F("insertModeEscKeysTimeout",200,"number"),e.keyMap["vim-insert"]={fallthrough:["default"],attach:c,detach:l,call:u},e.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:c,detach:l,call:u},W(),K}function n(e){return e.Vim=t(e),e.Vim}e.Vim=n(e)}(n(5237),n(3653),n(8527),n(7923))},5237(e){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!o&&/Chrome\/(\d+)/.exec(e),d=u&&+u[1],f=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),m=/PhantomJS/.test(e),g=p&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),v=/Android/.test(e),y=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=g||/Mac/.test(t),x=/\bCrOS\b/.test(e),k=/win/i.test(t),w=f&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(f=!1,l=!0);var _=b&&(c||f&&(null==w||w<12.11)),C=n||a&&s>=9;function S(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var M,L=function(e,t){var n=e.className,r=S(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function T(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function A(e,t){return T(e).appendChild(t)}function O(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function E(e,t,n,r){var i=O(e,t,n,r);return i.setAttribute("role","presentation"),i}function N(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function P(e){var t,n=e.ownerDocument||e;try{t=e.activeElement}catch(e){t=n.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function F(e,t){var n=e.className;S(t).test(n)||(e.className+=(n?" ":"")+t)}function D(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!S(n[r]).test(t)&&(t+=" "+n[r]);return t}M=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var z=function(e){e.select()};function I(e){return e.display.wrapper.ownerDocument}function R(e){return q(e.display.wrapper)}function q(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function B(e){return I(e).defaultView}function H(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function j(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function W(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,a=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}g?z=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(z=function(e){try{e.select()}catch(e){}});var K=function(){this.id=null,this.f=null,this.time=0,this.handler=H(this.onTimeout,this)};function U(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}K.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},K.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var $=50,V={toString:function(){return"CodeMirror.Pass"}},G={scroll:!1},X={origin:"*mouse"},Q={origin:"+move"};function Y(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var J=[""];function Z(e){for(;J.length<=e;)J.push(ee(J)+" ");return J[e]}function ee(e){return e[e.length-1]}function te(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function ne(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function re(){}function ie(e,t){var n;return Object.create?n=Object.create(e):(re.prototype=e,n=new re),t&&j(t,n),n}var oe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ae(e){return/\w/.test(e)||e>"Â€"&&(e.toUpperCase()!=e.toLowerCase()||oe.test(e))}function se(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ae(e))||t.test(e):ae(e)}function le(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ce=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ue(e){return e.charCodeAt(0)>=768&&ce.test(e)}function de(e,t,n){for(;(n<0?t>0:t<e.length)&&ue(e.charAt(t));)t+=n;return t}function fe(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function pe(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var he=null;function me(e,t,n){var r;he=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:he=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:he=i)}return null!=r?r:he}var ge=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,s=/[1n]/;function l(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var c="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!r.test(e))return!1;for(var u=e.length,d=[],f=0;f<u;++f)d.push(n(e.charCodeAt(f)));for(var p=0,h=c;p<u;++p){var m=d[p];"m"==m?d[p]=h:h=m}for(var g=0,v=c;g<u;++g){var y=d[g];"1"==y&&"r"==v?d[g]="n":o.test(y)&&(v=y,"r"==y&&(d[g]="R"))}for(var b=1,x=d[0];b<u-1;++b){var k=d[b];"+"==k&&"1"==x&&"1"==d[b+1]?d[b]="1":","!=k||x!=d[b+1]||"1"!=x&&"n"!=x||(d[b]=x),x=k}for(var w=0;w<u;++w){var _=d[w];if(","==_)d[w]="N";else if("%"==_){var C=void 0;for(C=w+1;C<u&&"%"==d[C];++C);for(var S=w&&"!"==d[w-1]||C<u&&"1"==d[C]?"1":"N",M=w;M<C;++M)d[M]=S;w=C-1}}for(var L=0,T=c;L<u;++L){var A=d[L];"L"==T&&"1"==A?d[L]="L":o.test(A)&&(T=A)}for(var O=0;O<u;++O)if(i.test(d[O])){var E=void 0;for(E=O+1;E<u&&i.test(d[E]);++E);for(var N="L"==(O?d[O-1]:c),P=N==("L"==(E<u?d[E]:c))?N?"L":"R":c,F=O;F<E;++F)d[F]=P;O=E-1}for(var D,z=[],I=0;I<u;)if(a.test(d[I])){var R=I;for(++I;I<u&&a.test(d[I]);++I);z.push(new l(0,R,I))}else{var q=I,B=z.length,H="rtl"==t?1:0;for(++I;I<u&&"L"!=d[I];++I);for(var j=q;j<I;)if(s.test(d[j])){q<j&&(z.splice(B,0,new l(1,q,j)),B+=H);var W=j;for(++j;j<I&&s.test(d[j]);++j);z.splice(B,0,new l(2,W,j)),B+=H,q=j}else++j;q<I&&z.splice(B,0,new l(1,q,I))}return"ltr"==t&&(1==z[0].level&&(D=e.match(/^\s+/))&&(z[0].from=D[0].length,z.unshift(new l(0,0,D[0].length))),1==ee(z).level&&(D=e.match(/\s+$/))&&(ee(z).to-=D[0].length,z.push(new l(0,u-D[0].length,u)))),"rtl"==t?z.reverse():z}}();function ve(e,t){var n=e.order;return null==n&&(n=e.order=ge(e.text,t)),n}var ye=[],be=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||ye).concat(n)}};function xe(e,t){return e._handlers&&e._handlers[t]||ye}function ke(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=U(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function we(e,t){var n=xe(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function _e(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),we(e,n||t.type,e,t),Ae(t)||t.codemirrorIgnore}function Ce(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==U(n,t[r])&&n.push(t[r])}function Se(e,t){return xe(e,t).length>0}function Me(e){e.prototype.on=function(e,t){be(this,e,t)},e.prototype.off=function(e,t){ke(this,e,t)}}function Le(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Te(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ae(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Oe(e){Le(e),Te(e)}function Ee(e){return e.target||e.srcElement}function Ne(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var Pe,Fe,De=function(){if(a&&s<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function ze(e){if(null==Pe){var t=O("span","â€‹");A(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Pe=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=Pe?O("span","â€‹"):O("span","Â ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ie(e){if(null!=Fe)return Fe;var t=A(e,document.createTextNode("AØ®A")),n=M(t,0,1).getBoundingClientRect(),r=M(t,1,2).getBoundingClientRect();return T(e),!(!n||n.left==n.right)&&(Fe=r.right-n.right<3)}var Re,qe=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Be=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},He="oncopy"in(Re=O("div"))||(Re.setAttribute("oncopy","return;"),"function"==typeof Re.oncopy),je=null;function We(e){if(null!=je)return je;var t=A(e,O("span","x")),n=t.getBoundingClientRect(),r=M(t,0,1).getBoundingClientRect();return je=Math.abs(n.left-r.left)>1}var Ke={},Ue={};function $e(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ke[e]=t}function Ve(e,t){Ue[e]=t}function Ge(e){if("string"==typeof e&&Ue.hasOwnProperty(e))e=Ue[e];else if(e&&"string"==typeof e.name&&Ue.hasOwnProperty(e.name)){var t=Ue[e.name];"string"==typeof t&&(t={name:t}),(e=ie(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ge("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ge("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Xe(e,t){t=Ge(t);var n=Ke[t.name];if(!n)return Xe(e,"text/plain");var r=n(e,t);if(Qe.hasOwnProperty(t.name)){var i=Qe[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var Qe={};function Ye(e,t){j(t,Qe.hasOwnProperty(e)?Qe[e]:Qe[e]={})}function Je(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ze(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function et(e,t,n){return!e.startState||e.startState(t,n)}var tt=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function nt(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function rt(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,(function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i})),r}function it(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function ot(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function at(e){if(null==e.parent)return null;for(var t=e.parent,n=U(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function st(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var s=e.lines[a].height;if(t<s)break;t-=s}return n+a}function lt(e,t){return t>=e.first&&t<e.first+e.size}function ct(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ut(e,t,n){if(void 0===n&&(n=null),!(this instanceof ut))return new ut(e,t,n);this.line=e,this.ch=t,this.sticky=n}function dt(e,t){return e.line-t.line||e.ch-t.ch}function ft(e,t){return e.sticky==t.sticky&&0==dt(e,t)}function pt(e){return ut(e.line,e.ch)}function ht(e,t){return dt(e,t)<0?t:e}function mt(e,t){return dt(e,t)<0?e:t}function gt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function vt(e,t){if(t.line<e.first)return ut(e.first,0);var n=e.first+e.size-1;return t.line>n?ut(n,nt(e,n).text.length):yt(t,nt(e,t.line).text.length)}function yt(e,t){var n=e.ch;return null==n||n>t?ut(e.line,t):n<0?ut(e.line,0):e}function bt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=vt(e,t[r]);return n}tt.prototype.eol=function(){return this.pos>=this.string.length},tt.prototype.sol=function(){return this.pos==this.lineStart},tt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},tt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},tt.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},tt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},tt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},tt.prototype.skipToEnd=function(){this.pos=this.string.length},tt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},tt.prototype.backUp=function(e){this.pos-=e},tt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=W(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?W(this.string,this.lineStart,this.tabSize):0)},tt.prototype.indentation=function(){return W(this.string,null,this.tabSize)-(this.lineStart?W(this.string,this.lineStart,this.tabSize):0)},tt.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},tt.prototype.current=function(){return this.string.slice(this.start,this.pos)},tt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},tt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},tt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var xt=function(e,t){this.state=e,this.lookAhead=t},kt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function wt(e,t,n,r){var i=[e.state.modeGen],o={};Et(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,c=0;n.state=!0,Et(e,t.text,s.mode,n,(function(e,t){for(var n=l;c<e;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;n<l;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"overlay "+t}}),o),n.state=a,n.baseTokens=null,n.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)s(l);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function _t(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Ct(e,at(t)),i=t.text.length>e.options.maxHighlightLength&&Je(e.doc.mode,r.state),o=wt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Ct(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new kt(r,!0,t);var o=Nt(e,t,n),a=o>r.first&&nt(r,o-1).stateAfter,s=a?kt.fromSaved(r,a,o):new kt(r,et(r.mode),o);return r.iter(o,t,(function(n){St(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?s.save():null,s.nextLine()})),n&&(r.modeFrontier=s.line),s}function St(e,t,n,r){var i=e.doc.mode,o=new tt(t,e.options.tabSize,n);for(o.start=o.pos=r||0,""==t&&Mt(i,n.state);!o.eol();)Lt(i,o,n.state),o.start=o.pos}function Mt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Ze(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function Lt(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=Ze(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}kt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},kt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},kt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},kt.fromSaved=function(e,t,n){return t instanceof xt?new kt(e,Je(e.mode,t.state),n,t.lookAhead):new kt(e,Je(e.mode,t),n)},kt.prototype.save=function(e){var t=!1!==e?Je(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new xt(t,this.maxLookAhead):t};var Tt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function At(e,t,n,r){var i,o,a=e.doc,s=a.mode,l=nt(a,(t=vt(a,t)).line),c=Ct(e,t.line,n),u=new tt(l.text,e.options.tabSize,c);for(r&&(o=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=Lt(s,u,c.state),r&&o.push(new Tt(u,i,Je(a.mode,c.state)));return r?o:new Tt(u,i,c.state)}function Ot(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Et(e,t,n,r,i,o,a){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,c=0,u=null,d=new tt(t,e.options.tabSize,r),f=e.options.addModeClass&&[null];for(""==t&&Ot(Mt(n,r.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(s=!1,a&&St(e,t,r,d.pos),d.pos=t.length,l=null):l=Ot(Lt(n,d,r.state,f),o),f){var p=f[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||u!=l){for(;c<d.start;)i(c=Math.min(d.start,c+5e3),u);u=l}d.start=d.pos}for(;c<d.pos;){var h=Math.min(d.pos,c+5e3);i(h,u),c=h}}function Nt(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var l=nt(o,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof xt?c.lookAhead:0)<=o.modeFrontier))return s;var u=W(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}function Pt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=nt(e,r).stateAfter;if(i&&(!(i instanceof xt)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var Ft=!1,Dt=!1;function zt(){Ft=!0}function It(){Dt=!0}function Rt(e,t,n){this.marker=e,this.from=t,this.to=n}function qt(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Bt(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Ht(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}function jt(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new Rt(a,o.from,s?null:o.to))}}return r}function Wt(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new Rt(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return r}function Kt(e,t){if(t.full)return null;var n=lt(e,t.from.line)&&nt(e,t.from.line).markedSpans,r=lt(e,t.to.line)&&nt(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=0==dt(t.from,t.to),s=jt(n,i,a),l=Wt(r,o,a),c=1==t.text.length,u=ee(t.text).length+(c?i:0);if(s)for(var d=0;d<s.length;++d){var f=s[d];if(null==f.to){var p=qt(l,f.marker);p?c&&(f.to=null==p.to?null:p.to+u):f.to=i}}if(l)for(var h=0;h<l.length;++h){var m=l[h];null!=m.to&&(m.to+=u),null==m.from?qt(s,m.marker)||(m.from=u,c&&(s||(s=[])).push(m)):(m.from+=u,c&&(s||(s=[])).push(m))}s&&(s=Ut(s)),l&&l!=s&&(l=Ut(l));var g=[s];if(!c){var v,y=t.text.length-2;if(y>0&&s)for(var b=0;b<s.length;++b)null==s[b].to&&(v||(v=[])).push(new Rt(s[b].marker,null,null));for(var x=0;x<y;++x)g.push(v);g.push(l)}return g}function Ut(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function $t(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=U(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var a=r[o],s=a.find(0),l=0;l<i.length;++l){var c=i[l];if(!(dt(c.to,s.from)<0||dt(c.from,s.to)>0)){var u=[l,1],d=dt(c.from,s.from),f=dt(c.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(f>0||!a.inclusiveRight&&!f)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}function Vt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Gt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Xt(e){return e.inclusiveLeft?-1:0}function Qt(e){return e.inclusiveRight?1:0}function Yt(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=dt(r.from,i.from)||Xt(e)-Xt(t);if(o)return-o;var a=dt(r.to,i.to)||Qt(e)-Qt(t);return a||t.id-e.id}function Jt(e,t){var n,r=Dt&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||Yt(n,i.marker)<0)&&(n=i.marker);return n}function Zt(e){return Jt(e,!0)}function en(e){return Jt(e,!1)}function tn(e,t){var n,r=Dt&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||Yt(n,o.marker)<0)&&(n=o.marker)}return n}function nn(e,t,n,r,i){var o=nt(e,t),a=Dt&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var c=l.marker.find(0),u=dt(c.from,n)||Xt(l.marker)-Xt(i),d=dt(c.to,r)||Qt(l.marker)-Qt(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?dt(c.to,n)>=0:dt(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?dt(c.from,r)<=0:dt(c.from,r)<0)))return!0}}}function rn(e){for(var t;t=Zt(e);)e=t.find(-1,!0).line;return e}function on(e){for(var t;t=en(e);)e=t.find(1,!0).line;return e}function an(e){for(var t,n;t=en(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function sn(e,t){var n=nt(e,t),r=rn(n);return n==r?t:at(r)}function ln(e,t){if(t>e.lastLine())return t;var n,r=nt(e,t);if(!cn(e,r))return t;for(;n=en(r);)r=n.find(1,!0).line;return at(r)+1}function cn(e,t){var n=Dt&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&un(e,t,r))return!0}}function un(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return un(e,r.line,qt(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&un(e,t,i))return!0}function dn(e){for(var t=0,n=(e=rn(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(var a=0;a<o.children.length;++a){var s=o.children[a];if(s==n)break;t+=s.height}return t}function fn(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Zt(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=en(r);){var o=t.find(0,!0);n-=r.text.length-o.from.ch,n+=(r=o.to.line).text.length-o.to.ch}return n}function pn(e){var t=e.display,n=e.doc;t.maxLine=nt(n,n.first),t.maxLineLength=fn(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=fn(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var hn=function(e,t,n){this.text=e,Gt(this,t),this.height=n?n(this):1};function mn(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Vt(e),Gt(e,n);var i=r?r(e):1;i!=e.height&&ot(e,i)}function gn(e){e.parent=null,Vt(e)}hn.prototype.lineNo=function(){return at(this)},Me(hn);var vn={},yn={};function bn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?yn:vn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function xn(e,t){var n=E("span",null,null,l?"padding-right: .1px":null),r={pre:E("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=wn,Ie(e.display.measure)&&(a=ve(o,e.doc.direction))&&(r.addToken=Cn(r.addToken,a)),r.map=[],Mn(o,r,_t(e,o,t!=e.display.externalMeasured&&at(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=D(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=D(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(ze(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return we(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=D(r.pre.className,r.textClass||"")),r}function kn(e){var t=O("span","â€¢","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function wn(e,t,n,r,i,o,l){if(t){var c,u=e.splitSpaces?_n(t,e.trailingSpace):t,d=e.cm.state.specialChars,f=!1;if(d.test(t)){c=document.createDocumentFragment();for(var p=0;;){d.lastIndex=p;var h=d.exec(t),m=h?h.index-p:t.length-p;if(m){var g=document.createTextNode(u.slice(p,p+m));a&&s<9?c.appendChild(O("span",[g])):c.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!h)break;p+=m+1;var v=void 0;if("\t"==h[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(v=c.appendChild(O("span",Z(b),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=b}else"\r"==h[0]||"\n"==h[0]?((v=c.appendChild(O("span","\r"==h[0]?"â":"â¤","cm-invalidchar"))).setAttribute("cm-text",h[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),a&&s<9?c.appendChild(O("span",[v])):c.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),a&&s<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||i||f||o||l){var x=n||"";r&&(x+=r),i&&(x+=i);var k=O("span",[c],x,o);if(l)for(var w in l)l.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&k.setAttribute(w,l[w]);return e.content.appendChild(k)}e.content.appendChild(c)}}function _n(e,t){if(e.length>1&&!/  /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o="Â "),r+=o,n=" "==o}return r}function Cn(e,t){return function(n,r,i,o,a,s,l){i=i?i+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var d=void 0,f=0;f<t.length&&!((d=t[f]).to>c&&d.from<=c);f++);if(d.to>=u)return e(n,r,i,o,a,s,l);e(n,r.slice(0,d.to-c),i,o,null,s,l),o=null,r=r.slice(d.to-c),c=d.to}}}function Sn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Mn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,c,u,d,f,p=i.length,h=0,m=1,g="",v=0;;){if(v==h){l=c=u=s="",f=null,d=null,v=1/0;for(var y=[],b=void 0,x=0;x<r.length;++x){var k=r[x],w=k.marker;if("bookmark"==w.type&&k.from==h&&w.widgetNode)y.push(w);else if(k.from<=h&&(null==k.to||k.to>h||w.collapsed&&k.to==h&&k.from==h)){if(null!=k.to&&k.to!=h&&v>k.to&&(v=k.to,c=""),w.className&&(l+=" "+w.className),w.css&&(s=(s?s+";":"")+w.css),w.startStyle&&k.from==h&&(u+=" "+w.startStyle),w.endStyle&&k.to==v&&(b||(b=[])).push(w.endStyle,k.to),w.title&&((f||(f={})).title=w.title),w.attributes)for(var _ in w.attributes)(f||(f={}))[_]=w.attributes[_];w.collapsed&&(!d||Yt(d.marker,w)<0)&&(d=k)}else k.from>h&&v>k.from&&(v=k.from)}if(b)for(var C=0;C<b.length;C+=2)b[C+1]==v&&(c+=" "+b[C]);if(!d||d.from==h)for(var S=0;S<y.length;++S)Sn(t,0,y[S]);if(d&&(d.from||0)==h){if(Sn(t,(null==d.to?p+1:d.to)-h,d.marker,null==d.from),null==d.to)return;d.to==h&&(d=!1)}}if(h>=p)break;for(var M=Math.min(p,v);;){if(g){var L=h+g.length;if(!d){var T=L>M?g.slice(0,M-h):g;t.addToken(t,T,a?a+l:l,u,h+T.length==v?c:"",s,f)}if(L>=M){g=g.slice(M-h),h=M;break}h=L,u=""}g=i.slice(o,o=n[m++]),a=bn(n[m++],t.cm.options)}}else for(var A=1;A<n.length;A+=2)t.addToken(t,i.slice(o,o=n[A]),bn(n[A+1],t.cm.options))}function Ln(e,t,n){this.line=t,this.rest=an(t),this.size=this.rest?at(ee(this.rest))-n+1:1,this.node=this.text=null,this.hidden=cn(e,t)}function Tn(e,t,n){for(var r,i=[],o=t;o<n;o=r){var a=new Ln(e.doc,nt(e.doc,o),o);r=o+a.size,i.push(a)}return i}var An=null;function On(e){An?An.ops.push(e):e.ownsGroup=An={ops:[e],delayedCallbacks:[]}}function En(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function Nn(e,t){var n=e.ownsGroup;if(n)try{En(n)}finally{An=null,t(n)}}var Pn=null;function Fn(e,t){var n=xe(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);An?r=An.delayedCallbacks:Pn?r=Pn:(r=Pn=[],setTimeout(Dn,0));for(var o=function(e){r.push((function(){return n[e].apply(null,i)}))},a=0;a<n.length;++a)o(a)}}function Dn(){var e=Pn;Pn=null;for(var t=0;t<e.length;++t)e[t]()}function zn(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?Bn(e,t):"gutter"==o?jn(e,t,n,r):"class"==o?Hn(e,t):"widget"==o&&Wn(e,t,r)}t.changes=null}function In(e){return e.node==e.text&&(e.node=O("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&s<8&&(e.node.style.zIndex=2)),e.node}function Rn(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=In(t);t.background=r.insertBefore(O("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function qn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):xn(e,t)}function Bn(e,t){var n=t.text.className,r=qn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Hn(e,t)):n&&(t.text.className=n)}function Hn(e,t){Rn(e,t),t.line.wrapClass?In(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function jn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=In(t);t.gutterBackground=O("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=In(t),s=t.gutter=O("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(s.setAttribute("aria-hidden","true"),e.display.input.setUneditable(s),a.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(O("div",ct(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var l=0;l<e.display.gutterSpecs.length;++l){var c=e.display.gutterSpecs[l].className,u=o.hasOwnProperty(c)&&o[c];u&&s.appendChild(O("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function Wn(e,t,n){t.alignable&&(t.alignable=null);for(var r=S("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);Un(e,t,n)}function Kn(e,t,n,r){var i=qn(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Hn(e,t),jn(e,t,n,r),Un(e,t,r),t.node}function Un(e,t,n){if($n(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)$n(e,t.rest[r],t,n,!1)}function $n(e,t,n,r,i){if(t.widgets)for(var o=In(n),a=0,s=t.widgets;a<s.length;++a){var l=s[a],c=O("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),Vn(l,c,n,r),e.display.input.setUneditable(c),i&&l.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),Fn(l,"redraw")}}function Vn(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function Gn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!N(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),A(t.display.measure,O("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Xn(e,t){for(var n=Ee(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Qn(e){return e.lineSpace.offsetTop}function Yn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Jn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=A(e.measure,O("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function Zn(e){return $-e.display.nativeBarWidth}function er(e){return e.display.scroller.clientWidth-Zn(e)-e.display.barWidth}function tr(e){return e.display.scroller.clientHeight-Zn(e)-e.display.barHeight}function nr(e,t,n){var r=e.options.lineWrapping,i=r&&er(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],c=a[s+1];Math.abs(l.bottom-c.bottom)>2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function rr(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(at(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function ir(e,t){var n=at(t=rn(t)),r=e.display.externalMeasured=new Ln(e.doc,t,n);r.lineN=n;var i=r.built=xn(e,r);return r.text=i.pre,A(e.display.lineMeasure,i.pre),r}function or(e,t,n,r){return lr(e,sr(e,t),n,r)}function ar(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Hr(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function sr(e,t){var n=at(t),r=ar(e,n);r&&!r.text?r=null:r&&r.changes&&(zn(e,r,n,zr(e)),e.curOp.forceUpdate=!0),r||(r=ir(e,t));var i=rr(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function lr(e,t,n,r,i){t.before&&(n=-1);var o,a=n+(r||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(nr(e,t.view,t.rect),t.hasHeights=!0),(o=pr(e,t,n,r)).bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var cr,ur={left:0,right:0,top:0,bottom:0};function dr(e,t,n){for(var r,i,o,a,s,l,c=0;c<e.length;c+=3)if(s=e[c],l=e[c+1],t<s?(i=0,o=1,a="left"):t<l?o=1+(i=t-s):(c==e.length-3||t==l&&e[c+3]>t)&&(i=(o=l-s)-1,t>=l&&(a="right")),null!=i){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==n&&i==l-s)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)r=e[(c+=3)+2],a="right";break}return{node:r,start:i,end:o,collapse:a,coverStart:s,coverEnd:l}}function fr(e,t){var n=ur;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function pr(e,t,n,r){var i,o=dr(t.map,n,r),l=o.node,c=o.start,u=o.end,d=o.collapse;if(3==l.nodeType){for(var f=0;f<4;f++){for(;c&&ue(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u<o.coverEnd&&ue(t.line.text.charAt(o.coverStart+u));)++u;if((i=a&&s<9&&0==c&&u==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():fr(M(l,c,u).getClientRects(),r)).left||i.right||0==c)break;u=c,c-=1,d="right"}a&&s<11&&(i=hr(e.display.measure,i))}else{var p;c>0&&(d=r="right"),i=e.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==r?p.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var h=l.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+Dr(e.display),top:h.top,bottom:h.bottom}:ur}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(v<y[b]);b++);var x=b?y[b-1]:0,k=y[b],w={left:("right"==d?i.right:i.left)-t.rect.left,right:("left"==d?i.left:i.right)-t.rect.left,top:x,bottom:k};return i.left||i.right||(w.bogus=!0),e.options.singleCursorHeightPerLine||(w.rtop=m,w.rbottom=g),w}function hr(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!We(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function mr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function gr(e){e.display.externalMeasure=null,T(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)mr(e.display.view[t])}function vr(e){gr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function yr(e){return u&&v?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function br(e){return u&&v?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function xr(e){var t=rn(e).widgets,n=0;if(t)for(var r=0;r<t.length;++r)t[r].above&&(n+=Gn(t[r]));return n}function kr(e,t,n,r,i){if(!i){var o=xr(t);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var a=dn(t);if("local"==r?a+=Qn(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==r?0:br(I(e)));var l=s.left+("window"==r?0:yr(I(e)));n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function wr(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=yr(I(e)),i-=br(I(e));else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:i-a.top}}function _r(e,t,n,r,i){return r||(r=nt(e.doc,t.line)),kr(e,r,or(e,r,t.ch,i),n)}function Cr(e,t,n,r,i,o){function a(t,a){var s=lr(e,i,t,a?"right":"left",o);return a?s.left=s.right:s.right=s.left,kr(e,r,s,n)}r=r||nt(e.doc,t.line),i||(i=sr(e,r));var s=ve(r,e.doc.direction),l=t.ch,c=t.sticky;if(l>=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(e,t,n){return a(n?e-1:e,1==s[t].level!=n)}var d=me(s,l,c),f=he,p=u(l,d,"before"==c);return null!=f&&(p.other=u(l,f,"before"!=c)),p}function Sr(e,t){var n=0;t=vt(e.doc,t),e.options.lineWrapping||(n=Dr(e.display)*t.ch);var r=nt(e.doc,t.line),i=dn(r)+Qn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Mr(e,t,n,r,i){var o=ut(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Lr(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Mr(r.first,0,null,-1,-1);var i=st(r,n),o=r.first+r.size-1;if(i>o)return Mr(r.first+r.size-1,nt(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=nt(r,i);;){var s=Er(e,a,i,t,n),l=tn(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;a=nt(r,i=c.line)}}function Tr(e,t,n,r){r-=xr(t);var i=t.text.length,o=fe((function(t){return lr(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=fe((function(t){return lr(e,n,t).top>r}),o,i)}}function Ar(e,t,n,r){return n||(n=sr(e,t)),Tr(e,t,n,kr(e,t,lr(e,n,r),"line").top)}function Or(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Er(e,t,n,r,i){i-=dn(t);var o=sr(e,t),a=xr(t),s=0,l=t.text.length,c=!0,u=ve(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?Pr:Nr)(e,t,n,o,u,r,i);s=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var f,p,h=null,m=null,g=fe((function(t){var n=lr(e,o,t);return n.top+=a,n.bottom+=a,!!Or(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(h=t,m=n),!0)}),s,l),v=!1;if(m){var y=r-m.left<m.right-r,b=y==c;g=h+(b?0:1),p=b?"after":"before",f=y?m.left:m.right}else{c||g!=l&&g!=s||g++,p=0==g?"after":g==t.text.length?"before":lr(e,o,g-(c?1:0)).bottom+a<=i==c?"after":"before";var x=Cr(e,ut(n,g,p),"line",t,o);f=x.left,v=i<x.top?-1:i>=x.bottom?1:0}return Mr(n,g=de(t.text,g,1),p,v,r-f)}function Nr(e,t,n,r,i,o,a){var s=fe((function(s){var l=i[s],c=1!=l.level;return Or(Cr(e,ut(n,c?l.to:l.from,c?"before":"after"),"line",t,r),o,a,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=Cr(e,ut(n,c?l.from:l.to,c?"after":"before"),"line",t,r);Or(u,o,a,!0)&&u.top>a&&(l=i[s-1])}return l}function Pr(e,t,n,r,i,o,a){var s=Tr(e,t,r,a),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,f=0;f<i.length;f++){var p=i[f];if(!(p.from>=c||p.to<=l)){var h=lr(e,r,1!=p.level?Math.min(c,p.to)-1:Math.max(l,p.from)).right,m=h<o?o-h+1e9:h-o;(!u||d>m)&&(u=p,d=m)}}return u||(u=i[i.length-1]),u.from<l&&(u={from:l,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function Fr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==cr){cr=O("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)cr.appendChild(document.createTextNode("x")),cr.appendChild(O("br"));cr.appendChild(document.createTextNode("x"))}A(e.measure,cr);var n=cr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),T(e.measure),n||1}function Dr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),n=O("pre",[t],"CodeMirror-line-like");A(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function zr(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:Ir(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Ir(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Rr(e){var t=Fr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Dr(e.display)-3);return function(i){if(cn(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function qr(e){var t=e.doc,n=Rr(e);t.iter((function(e){var t=n(e);t!=e.height&&ot(e,t)}))}function Br(e,t,n,r){var i=e.display;if(!n&&"true"==Ee(t).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(e){return null}var l,c=Lr(e,o,a);if(r&&c.xRel>0&&(l=nt(e.doc,c.line).text).length==c.ch){var u=W(l,l.length,e.options.tabSize)-l.length;c=ut(c.line,Math.max(0,Math.round((o-Jn(e.display).left)/Dr(e.display))-u))}return c}function Hr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function jr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Dt&&sn(e.doc,t)<i.viewTo&&Kr(e);else if(n<=i.viewFrom)Dt&&ln(e.doc,n+r)>i.viewFrom?Kr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Kr(e);else if(t<=i.viewFrom){var o=Ur(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Kr(e)}else if(n>=i.viewTo){var a=Ur(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Kr(e)}else{var s=Ur(e,t,t,-1),l=Ur(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(Tn(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):Kr(e)}var c=i.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(i.externalMeasured=null))}function Wr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[Hr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==U(a,n)&&a.push(n)}}}function Kr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ur(e,t,n,r){var i,o=Hr(e,t),a=e.display.view;if(!Dt||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l<o;l++)s+=a[l].size;if(s!=t){if(r>0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;sn(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function $r(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Tn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Tn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Hr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(Tn(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Hr(e,n)))),r.viewTo=n}function Vr(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function Gr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Xr(e,t){void 0===t&&(t=!0);var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),a=e.options.$customCursor;a&&(t=!0);for(var s=0;s<n.sel.ranges.length;s++)if(t||s!=n.sel.primIndex){var l=n.sel.ranges[s];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var c=l.empty();if(a){var u=a(e,l);u&&Qr(e,u,i)}else(c||e.options.showCursorWhenSelecting)&&Qr(e,l.head,i);c||Jr(e,l,o)}}return r}function Qr(e,t,n){var r=Cr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(O("div","Â ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var o=_r(e,t,"div",null,null),a=o.right-o.left;i.style.width=(a>0?a:e.defaultCharWidth())+"px"}if(r.other){var s=n.appendChild(O("div","Â ","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=r.other.left+"px",s.style.top=r.other.top+"px",s.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function Yr(e,t){return e.top-t.top||e.left-t.left}function Jr(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),a=Jn(e.display),s=a.left,l=Math.max(r.sizerWidth,er(e)-r.sizer.offsetLeft)-a.right,c="ltr"==i.direction;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(O("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n                             top: "+t+"px; width: "+(null==n?l-e:n)+"px;\n                             height: "+(r-t)+"px"))}function d(t,n,r){var o,a,d=nt(i,t),f=d.text.length;function p(n,r){return _r(e,ut(t,n),"div",d,r)}function h(t,n,r){var i=Ar(e,d,null,t),o="ltr"==n==("after"==r)?"left":"right";return p("after"==r?i.begin:i.end-(/\s/.test(d.text.charAt(i.end-1))?2:1),o)[o]}var m=ve(d,i.direction);return pe(m,n||0,null==r?f:r,(function(e,t,i,d){var g="ltr"==i,v=p(e,g?"left":"right"),y=p(t-1,g?"right":"left"),b=null==n&&0==e,x=null==r&&t==f,k=0==d,w=!m||d==m.length-1;if(y.top-v.top<=3){var _=(c?x:b)&&w,C=(c?b:x)&&k?s:(g?v:y).left,S=_?l:(g?y:v).right;u(C,v.top,S-C,v.bottom)}else{var M,L,T,A;g?(M=c&&b&&k?s:v.left,L=c?l:h(e,i,"before"),T=c?s:h(t,i,"after"),A=c&&x&&w?l:y.right):(M=c?h(e,i,"before"):s,L=!c&&b&&k?l:v.right,T=!c&&x&&w?s:y.left,A=c?h(t,i,"after"):l),u(M,v.top,L-M,v.bottom),v.bottom<y.top&&u(s,v.bottom,null,y.top),u(T,y.top,A-T,y.bottom)}(!o||Yr(v,o)<0)&&(o=v),Yr(y,o)<0&&(o=y),(!a||Yr(v,a)<0)&&(a=v),Yr(y,a)<0&&(a=y)})),{start:o,end:a}}var f=t.from(),p=t.to();if(f.line==p.line)d(f.line,f.ch,p.ch);else{var h=nt(i,f.line),m=nt(i,p.line),g=rn(h)==rn(m),v=d(f.line,f.ch,g?h.text.length+1:null).end,y=d(p.line,g?0:null,p.ch).start;g&&(v.top<y.top-2?(u(v.right,v.top,null,v.bottom),u(s,y.top,y.left,y.bottom)):u(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&u(s,v.bottom,null,y.top)}n.appendChild(o)}function Zr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||ri(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function ei(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ni(e))}function ti(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&ri(e))}),100)}function ni(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(we(e,"focus",e,t),e.state.focused=!0,F(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Zr(e))}function ri(e,t){e.state.delayingBlurEvent||(e.state.focused&&(we(e,"blur",e,t),e.state.focused=!1,L(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function ii(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l<t.view.length;l++){var c=t.view[l],u=e.options.lineWrapping,d=void 0,f=0;if(!c.hidden){if(i+=c.line.height,a&&s<8){var p=c.node.offsetTop+c.node.offsetHeight;d=p-n,n=p}else{var h=c.node.getBoundingClientRect();d=h.bottom-h.top,!u&&c.text.firstChild&&(f=c.text.firstChild.getBoundingClientRect().right-h.left-1)}var m=c.line.height-d;if((m>.005||m<-.005)&&(i<r&&(o-=m),ot(c.line,d),oi(c.line),c.rest))for(var g=0;g<c.rest.length;g++)oi(c.rest[g]);if(f>e.display.sizerWidth){var v=Math.ceil(f/Dr(e.display));v>e.display.maxLineLength&&(e.display.maxLineLength=v,e.display.maxLine=c.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function oi(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function ai(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Qn(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=st(t,r),a=st(t,i);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<o?(o=s,a=st(t,dn(nt(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(o=st(t,dn(nt(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function si(e,t){if(!_e(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,o=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),null!=i&&!m){var a=O("div","â€‹",null,"position: absolute;\n                         top: "+(t.top-n.viewOffset-Qn(e.display))+"px;\n                         height: "+(t.bottom-t.top+Zn(e)+n.barHeight)+"px;\n                         left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}function li(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?ut(t.line,t.ch+1,"before"):t,t=t.ch?ut(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var a=!1,s=Cr(e,t),l=n&&n!=t?Cr(e,n):s,c=ui(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(vi(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(bi(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}function ci(e,t){var n=ui(e,t);null!=n.scrollTop&&vi(e,n.scrollTop),null!=n.scrollLeft&&bi(e,n.scrollLeft)}function ui(e,t){var n=e.display,r=Fr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=tr(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Yn(n),l=t.top<r,c=t.bottom>s-r;if(t.top<i)a.scrollTop=l?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(c?s:t.bottom)-o);u!=i&&(a.scrollTop=u)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,p=er(e)-n.gutters.offsetWidth,h=t.right-t.left>p;return h&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.left<f?a.scrollLeft=Math.max(0,t.left+d-(h?0:10)):t.right>p+f-3&&(a.scrollLeft=t.right+(h?0:10)-p),a}function di(e,t){null!=t&&(mi(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function fi(e){mi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function pi(e,t,n){null==t&&null==n||mi(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function hi(e,t){mi(e),e.curOp.scrollToPos=t}function mi(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,gi(e,Sr(e,t.from),Sr(e,t.to),t.margin))}function gi(e,t,n,r){var i=ui(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});pi(e,i.scrollLeft,i.scrollTop)}function vi(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||Gi(e,{top:t}),yi(e,t,!0),n&&Gi(e),Bi(e,100))}function yi(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function bi(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,Ji(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function xi(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Yn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Zn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var ki=function(e,t,n){this.cm=n;var r=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),be(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),be(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ki.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},ki.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ki.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ki.prototype.zeroWidthHack=function(){var e=b&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new K,this.disableVert=new K},ki.prototype.enableZeroWidthBar=function(e,t,n){function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.visibility="hidden":t.set(1e3,r)}e.style.visibility="",t.set(1e3,r)},ki.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var wi=function(){};function _i(e,t){t||(t=xi(e));var n=e.display.barWidth,r=e.display.barHeight;Ci(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&ii(e),Ci(e,xi(e)),n=e.display.barWidth,r=e.display.barHeight}function Ci(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}wi.prototype.update=function(){return{bottom:0,right:0}},wi.prototype.setScrollLeft=function(){},wi.prototype.setScrollTop=function(){},wi.prototype.clear=function(){};var Si={native:ki,null:wi};function Mi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&L(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Si[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),be(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?bi(e,t):vi(e,t)}),e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var Li=0;function Ti(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Li,markArrays:null},On(e.curOp)}function Ai(e){var t=e.curOp;t&&Nn(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;Oi(e)}))}function Oi(e){for(var t=e.ops,n=0;n<t.length;n++)Ei(t[n]);for(var r=0;r<t.length;r++)Ni(t[r]);for(var i=0;i<t.length;i++)Pi(t[i]);for(var o=0;o<t.length;o++)Fi(t[o]);for(var a=0;a<t.length;a++)Di(t[a])}function Ei(e){var t=e.cm,n=t.display;Wi(t),e.updateMaxLine&&pn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ji(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ni(e){e.updatedDisplay=e.mustUpdate&&$i(e.cm,e.update)}function Pi(e){var t=e.cm,n=t.display;e.updatedDisplay&&ii(t),e.barMeasure=xi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=or(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Zn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-er(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Fi(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&bi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==P(R(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&_i(t,e.barMeasure),e.updatedDisplay&&Yi(t,e.barMeasure),e.selectionChanged&&Zr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&ei(e.cm)}function Di(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&Vi(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&yi(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&bi(t,e.scrollLeft,!0,!0),e.scrollToPos&&si(t,li(t,vt(r,e.scrollToPos.from),vt(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a<i.length;++a)i[a].lines.length||we(i[a],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&we(o[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&we(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function zi(e,t){if(e.curOp)return t();Ti(e);try{return t()}finally{Ai(e)}}function Ii(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Ti(e);try{return t.apply(e,arguments)}finally{Ai(e)}}}function Ri(e){return function(){if(this.curOp)return e.apply(this,arguments);Ti(this);try{return e.apply(this,arguments)}finally{Ai(this)}}}function qi(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Ti(t);try{return e.apply(this,arguments)}finally{Ai(t)}}}function Bi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,H(Hi,e))}function Hi(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=Ct(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(r.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?Je(t.mode,r.state):null,l=wt(e,o,r,!0);s&&(r.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!d&&f<a.length;++f)d=a[f]!=o.styles[f];d&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&St(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return Bi(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&zi(e,(function(){for(var t=0;t<i.length;t++)Wr(e,i[t],"text")}))}}var ji=function(e,t,n){var r=e.display;this.viewport=t,this.visible=ai(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=er(e),this.force=n,this.dims=zr(e),this.events=[]};function Wi(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Zn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Zn(e)+"px",t.scrollbarsClipped=!0)}function Ki(e){if(e.hasFocus())return null;var t=P(R(e));if(!t||!N(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=B(e).getSelection();r.anchorNode&&r.extend&&N(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function Ui(e){if(e&&e.activeElt&&e.activeElt!=P(q(e.activeElt))&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&N(document.body,e.anchorNode)&&N(document.body,e.focusNode))){var t=e.activeElt.ownerDocument,n=t.defaultView.getSelection(),r=t.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),n.removeAllRanges(),n.addRange(r),n.extend(e.focusNode,e.focusOffset)}}function $i(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return Kr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Vr(e))return!1;Zi(e)&&(Kr(e),t.dims=zr(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Dt&&(o=sn(e.doc,o),a=ln(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;$r(e,o,a),n.viewOffset=dn(nt(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=Vr(e);if(!s&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Ki(e);return l>4&&(n.lineDiv.style.display="none"),Xi(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Ui(c),T(n.cursorDiv),T(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Bi(e,400)),n.updateLineNumbers=null,!0}function Vi(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=er(e))r&&(t.visible=ai(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Yn(e.display)-tr(e),n.top)}),t.visible=ai(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!$i(e,t))break;ii(e);var i=xi(e);Gr(e),_i(e,i),Yi(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Gi(e,t){var n=new ji(e,t);if($i(e,n)){ii(e),Vi(e,n);var r=xi(e);Gr(e),_i(e,r),Yi(e,r),n.finish()}}function Xi(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(t){var n=t.nextSibling;return l&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,d=0;d<c.length;d++){var f=c[d];if(f.hidden);else if(f.node&&f.node.parentNode==o){for(;a!=f.node;)a=s(a);var p=i&&null!=t&&t<=u&&f.lineNumber;f.changes&&(U(f.changes,"gutter")>-1&&(p=!1),zn(e,f,u,n)),p&&(T(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(ct(e.options,u)))),a=f.node.nextSibling}else{var h=Kn(e,f,u,n);o.insertBefore(h,a)}u+=f.size}for(;a;)a=s(a)}function Qi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Fn(e,"gutterChanged",e)}function Yi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Zn(e)+"px"}function Ji(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=Ir(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function Zi(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=ct(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(O("div",[O("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",Qi(e.display),!0}return!1}function eo(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e[i],a=null;if("string"!=typeof o&&(a=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;r=!0}n.push({className:o,style:a})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function to(e){var t=e.gutters,n=e.gutterSpecs;T(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,a=i.style,s=t.appendChild(O("div",null,"CodeMirror-gutter "+o));a&&(s.style.cssText=a),"CodeMirror-linenumbers"==o&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",Qi(e)}function no(e){to(e.display),jr(e),Ji(e)}function ro(e,t,r,i){var o=this;this.input=r,o.scrollbarFiller=O("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=O("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=E("div",null,"CodeMirror-code"),o.selectionDiv=O("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=O("div",null,"CodeMirror-cursors"),o.measure=O("div",null,"CodeMirror-measure"),o.lineMeasure=O("div",null,"CodeMirror-measure"),o.lineSpace=E("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var c=E("div",[o.lineSpace],"CodeMirror-lines");o.mover=O("div",[c],null,"position: relative"),o.sizer=O("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=O("div",null,null,"position: absolute; height: "+$+"px; width: 1px;"),o.gutters=O("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=O("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=O("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),u&&105===d&&(o.wrapper.style.clipPath="inset(0px)"),o.wrapper.setAttribute("translate","no"),a&&s<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),l||n&&y||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=eo(i.gutters,i.lineNumbers),to(o),r.init(o)}ji.prototype.signal=function(e,t){Se(e,t)&&this.events.push(arguments)},ji.prototype.finish=function(){for(var e=0;e<this.events.length;e++)we.apply(null,this.events[e])};var io=0,oo=null;function ao(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function so(e){var t=ao(e);return t.x*=oo,t.y*=oo,t}function lo(e,t){u&&102==d&&(null==e.display.chromeScrollHack?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout((function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""}),100));var r=ao(t),i=r.x,o=r.y,a=oo;0===t.deltaMode&&(i=t.deltaX,o=t.deltaY,a=1);var s=e.display,c=s.scroller,p=c.scrollWidth>c.clientWidth,h=c.scrollHeight>c.clientHeight;if(i&&p||o&&h){if(o&&b&&l)e:for(var m=t.target,g=s.view;m!=c;m=m.parentNode)for(var v=0;v<g.length;v++)if(g[v].node==m){e.display.currentWheelTarget=m;break e}if(i&&!n&&!f&&null!=a)return o&&h&&vi(e,Math.max(0,c.scrollTop+o*a)),bi(e,Math.max(0,c.scrollLeft+i*a)),(!o||o&&h)&&Le(t),void(s.wheelStartX=null);if(o&&null!=a){var y=o*a,x=e.doc.scrollTop,k=x+s.wrapper.clientHeight;y<0?x=Math.max(0,x+y-50):k=Math.min(e.doc.height,k+y+50),Gi(e,{top:x,bottom:k})}io<20&&0!==t.deltaMode&&(null==s.wheelStartX?(s.wheelStartX=c.scrollLeft,s.wheelStartY=c.scrollTop,s.wheelDX=i,s.wheelDY=o,setTimeout((function(){if(null!=s.wheelStartX){var e=c.scrollLeft-s.wheelStartX,t=c.scrollTop-s.wheelStartY,n=t&&s.wheelDY&&t/s.wheelDY||e&&s.wheelDX&&e/s.wheelDX;s.wheelStartX=s.wheelStartY=null,n&&(oo=(oo*io+n)/(io+1),++io)}}),200)):(s.wheelDX+=i,s.wheelDY+=o))}}a?oo=-.53:n?oo=15:u?oo=-.7:p&&(oo=-1/3);var co=function(e,t){this.ranges=e,this.primIndex=t};co.prototype.primary=function(){return this.ranges[this.primIndex]},co.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!ft(n.anchor,r.anchor)||!ft(n.head,r.head))return!1}return!0},co.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new uo(pt(this.ranges[t].anchor),pt(this.ranges[t].head));return new co(e,this.primIndex)},co.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},co.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(dt(t,r.from())>=0&&dt(e,r.to())<=0)return n}return-1};var uo=function(e,t){this.anchor=e,this.head=t};function fo(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return dt(e.from(),t.from())})),n=U(t,i);for(var o=1;o<t.length;o++){var a=t[o],s=t[o-1],l=dt(s.to(),a.from());if(r&&!a.empty()?l>0:l>=0){var c=mt(s.from(),a.from()),u=ht(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,t.splice(--o,2,new uo(d?u:c,d?c:u))}}return new co(t,n)}function po(e,t){return new co([new uo(e,t||e)],0)}function ho(e){return e.text?ut(e.from.line+e.text.length-1,ee(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function mo(e,t){if(dt(e,t.from)<0)return e;if(dt(e,t.to)<=0)return ho(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=ho(t).ch-t.to.ch),ut(n,r)}function go(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new uo(mo(i.anchor,t),mo(i.head,t)))}return fo(e.cm,n,e.sel.primIndex)}function vo(e,t,n){return e.line==t.line?ut(n.line,e.ch-t.ch+n.ch):ut(n.line+(e.line-t.line),e.ch)}function yo(e,t,n){for(var r=[],i=ut(e.first,0),o=i,a=0;a<t.length;a++){var s=t[a],l=vo(s.from,i,o),c=vo(ho(s),i,o);if(i=s.to,o=c,"around"==n){var u=e.sel.ranges[a],d=dt(u.head,u.anchor)<0;r[a]=new uo(d?c:l,d?l:c)}else r[a]=new uo(l,l)}return new co(r,e.sel.primIndex)}function bo(e){e.doc.mode=Xe(e.options,e.doc.modeOption),xo(e)}function xo(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Bi(e,100),e.state.modeGen++,e.curOp&&jr(e)}function ko(e,t){return 0==t.from.ch&&0==t.to.ch&&""==ee(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function wo(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){mn(e,n,i,r),Fn(e,"change",e,t)}function a(e,t){for(var n=[],o=e;o<t;++o)n.push(new hn(c[o],i(o),r));return n}var s=t.from,l=t.to,c=t.text,u=nt(e,s.line),d=nt(e,l.line),f=ee(c),p=i(c.length-1),h=l.line-s.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(ko(e,t)){var m=a(0,c.length-1);o(d,d.text,p),h&&e.remove(s.line,h),m.length&&e.insert(s.line,m)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,s.ch)+f+u.text.slice(l.ch),p);else{var g=a(1,c.length-1);g.push(new hn(f+u.text.slice(l.ch),p,r)),o(u,u.text.slice(0,s.ch)+c[0],i(0)),e.insert(s.line+1,g)}else if(1==c.length)o(u,u.text.slice(0,s.ch)+c[0]+d.text.slice(l.ch),i(0)),e.remove(s.line+1,h);else{o(u,u.text.slice(0,s.ch)+c[0],i(0)),o(d,f+d.text.slice(l.ch),p);var v=a(1,c.length-1);h>1&&e.remove(s.line+1,h-1),e.insert(s.line+1,v)}Fn(e,"change",e,t)}function _o(e,t,n){function r(e,i,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var s=e.linked[a];if(s.doc!=i){var l=o&&s.sharedHist;n&&!l||(t(s.doc,l),r(s.doc,e,l))}}}r(e,null,!0)}function Co(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,qr(e),bo(e),So(e),e.options.direction=t.direction,e.options.lineWrapping||pn(e),e.options.mode=t.modeOption,jr(e)}function So(e){("rtl"==e.doc.direction?F:L)(e.display.lineDiv,"CodeMirror-rtl")}function Mo(e){zi(e,(function(){So(e),jr(e)}))}function Lo(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function To(e,t){var n={from:pt(t.from),to:ho(t),text:rt(e,t.from,t.to)};return Do(e,n,t.from.line,t.to.line+1),_o(e,(function(e){return Do(e,n,t.from.line,t.to.line+1)}),!0),n}function Ao(e){for(;e.length&&ee(e).ranges;)e.pop()}function Oo(e,t){return t?(Ao(e.done),ee(e.done)):e.done.length&&!ee(e.done).ranges?ee(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),ee(e.done)):void 0}function Eo(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=Oo(i,i.lastOp==r)))a=ee(o.changes),0==dt(t.from,t.to)&&0==dt(t.from,a.to)?a.to=ho(t):o.changes.push(To(e,t));else{var l=ee(i.done);for(l&&l.ranges||Fo(e.sel,i.done),o={changes:[To(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||we(e,"historyAdded")}function No(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Po(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||No(e,o,ee(i.done),t))?i.done[i.done.length-1]=t:Fo(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Ao(i.undone)}function Fo(e,t){var n=ee(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Do(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function zo(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Io(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(zo(n[i]));return r}function Ro(e,t){var n=Io(e,t),r=Kt(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],a=r[i];if(o&&a)e:for(var s=0;s<a.length;++s){for(var l=a[s],c=0;c<o.length;++c)if(o[c].marker==l.marker)continue e;o.push(l)}else a&&(n[i]=a)}return n}function qo(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)r.push(n?co.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];r.push({changes:s});for(var l=0;l<a.length;++l){var c=a[l],u=void 0;if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&U(t,Number(u[1]))>-1&&(ee(s)[d]=c[d],delete c[d])}}}return r}function Bo(e,t,n,r){if(r){var i=e.anchor;if(n){var o=dt(t,i)<0;o!=dt(n,i)<0?(i=t,t=n):o!=dt(t,n)<0&&(t=n)}return new uo(i,t)}return new uo(n||t,t)}function Ho(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Vo(e,new co([Bo(e.sel.primary(),t,n,i)],0),r)}function jo(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=Bo(e.sel.ranges[o],t[o],null,i);Vo(e,fo(e.cm,r,e.sel.primIndex),n)}function Wo(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,Vo(e,fo(e.cm,i,e.sel.primIndex),r)}function Ko(e,t,n,r){Vo(e,po(t,n),r)}function Uo(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new uo(vt(e,t[n].anchor),vt(e,t[n].head))},origin:n&&n.origin};return we(e,"beforeSelectionChange",e,r),e.cm&&we(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?fo(e.cm,r.ranges,r.ranges.length-1):t}function $o(e,t,n){var r=e.history.done,i=ee(r);i&&i.ranges?(r[r.length-1]=t,Go(e,t,n)):Vo(e,t,n)}function Vo(e,t,n){Go(e,t,n),Po(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function Go(e,t,n){(Se(e,"beforeSelectionChange")||e.cm&&Se(e.cm,"beforeSelectionChange"))&&(t=Uo(e,t,n));var r=n&&n.bias||(dt(t.primary().head,e.sel.primary().head)<0?-1:1);Xo(e,Yo(e,t,r,!0)),n&&!1===n.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||fi(e.cm)}function Xo(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Ce(e.cm)),Fn(e,"cursorActivity",e))}function Qo(e){Xo(e,Yo(e,e.sel,null,!1))}function Yo(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],l=Zo(e,a.anchor,s&&s.anchor,n,r),c=a.head==a.anchor?l:Zo(e,a.head,s&&s.head,n,r);(i||l!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new uo(l,c))}return i?fo(e.cm,i,t.primIndex):t}function Jo(e,t,n,r,i){var o=nt(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var s=o.markedSpans[a],l=s.marker,c="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,u="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==s.from||(c?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(u?s.to>=t.ch:s.to>t.ch))){if(i&&(we(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var d=l.find(r<0?1:-1),f=void 0;if((r<0?u:c)&&(d=ea(e,d,-r,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(f=dt(d,n))&&(r<0?f<0:f>0))return Jo(e,d,t,r,i)}var p=l.find(r<0?-1:1);return(r<0?c:u)&&(p=ea(e,p,r,p.line==t.line?o:null)),p?Jo(e,p,t,r,i):null}}return t}function Zo(e,t,n,r,i){var o=r||1,a=Jo(e,t,n,o,i)||!i&&Jo(e,t,n,o,!0)||Jo(e,t,n,-o,i)||!i&&Jo(e,t,n,-o,!0);return a||(e.cantEdit=!0,ut(e.first,0))}function ea(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?vt(e,ut(t.line-1)):null:n>0&&t.ch==(r||nt(e,t.line)).text.length?t.line<e.first+e.size-1?ut(t.line+1,0):null:new ut(t.line,t.ch+n)}function ta(e){e.setSelection(ut(e.firstLine(),0),ut(e.lastLine()),G)}function na(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,o){t&&(r.from=vt(e,t)),n&&(r.to=vt(e,n)),i&&(r.text=i),void 0!==o&&(r.origin=o)}),we(e,"beforeChange",e,r),e.cm&&we(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function ra(e,t,n){if(e.cm){if(!e.cm.curOp)return Ii(e.cm,ra)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(Se(e,"beforeChange")||e.cm&&Se(e.cm,"beforeChange"))||(t=na(e,t,!0))){var r=Ft&&!n&&$t(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)ia(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else ia(e,t)}}function ia(e,t){if(1!=t.text.length||""!=t.text[0]||0!=dt(t.from,t.to)){var n=go(e,t);Eo(e,t,n,e.cm?e.cm.curOp.id:NaN),sa(e,t,n,Kt(e,t));var r=[];_o(e,(function(e,n){n||-1!=U(r,e.history)||(fa(e.history,t),r.push(e.history)),sa(e,t,null,Kt(e,t))}))}}function oa(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,a=e.sel,s="undo"==t?o.done:o.undone,l="undo"==t?o.undone:o.done,c=0;c<s.length&&(i=s[c],n?!i.ranges||i.equals(e.sel):i.ranges);c++);if(c!=s.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(i=s.pop()).ranges){if(r)return void s.push(i);break}if(Fo(i,l),n&&!i.equals(e.sel))return void Vo(e,i,{clearRedo:!1});a=i}var u=[];Fo(a,l),l.push({changes:u,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var d=Se(e,"beforeChange")||e.cm&&Se(e.cm,"beforeChange"),f=function(n){var r=i.changes[n];if(r.origin=t,d&&!na(e,r,!1))return s.length=0,{};u.push(To(e,r));var o=n?go(e,r):ee(s);sa(e,r,o,Ro(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:ho(r)});var a=[];_o(e,(function(e,t){t||-1!=U(a,e.history)||(fa(e.history,r),a.push(e.history)),sa(e,r,null,Ro(e,r))}))},p=i.changes.length-1;p>=0;--p){var h=f(p);if(h)return h.v}}}}function aa(e,t){if(0!=t&&(e.first+=t,e.sel=new co(te(e.sel.ranges,(function(e){return new uo(ut(e.anchor.line+t,e.anchor.ch),ut(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){jr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Wr(e.cm,r,"gutter")}}function sa(e,t,n,r){if(e.cm&&!e.cm.curOp)return Ii(e.cm,sa)(e,t,n,r);if(t.to.line<e.first)aa(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);aa(e,i),t={from:ut(e.first,0),to:ut(t.to.line+i,t.to.ch),text:[ee(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:ut(o,nt(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=rt(e,t.from,t.to),n||(n=go(e,t)),e.cm?la(e.cm,t,r):wo(e,t,r),Go(e,n,G),e.cantEdit&&Zo(e,ut(e.firstLine(),0))&&(e.cantEdit=!1)}}function la(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=at(rn(nt(r,o.line))),r.iter(l,a.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&Ce(e),wo(r,t,n,Rr(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,(function(e){var t=fn(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),Pt(r,o.line),Bi(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?jr(e):o.line!=a.line||1!=t.text.length||ko(e.doc,t)?jr(e,o.line,a.line+1,c):Wr(e,o.line,"text");var u=Se(e,"changes"),d=Se(e,"change");if(d||u){var f={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&Fn(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function ca(e,t,n,r,i){var o;r||(r=n),dt(r,n)<0&&(n=(o=[r,n])[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),ra(e,{from:n,to:r,text:t,origin:i})}function ua(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function da(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)ua(o.ranges[s].anchor,t,n,r),ua(o.ranges[s].head,t,n,r)}else{for(var l=0;l<o.changes.length;++l){var c=o.changes[l];if(n<c.from.line)c.from=ut(c.from.line+r,c.from.ch),c.to=ut(c.to.line+r,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function fa(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;da(e.done,n,r,i),da(e.undone,n,r,i)}function pa(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=nt(e,gt(e,t)):i=at(t),null==i?null:(r(o,i)&&e.cm&&Wr(e.cm,i,n),o)}function ha(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function ma(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}uo.prototype.from=function(){return mt(this.anchor,this.head)},uo.prototype.to=function(){return ht(this.anchor,this.head)},uo.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},ha.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,gn(i),Fn(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},ma.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ha))){var s=[];this.collapse(s),this.children=[new ha(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,s=a;s<i.lines.length;){var l=new ha(i.lines.slice(s,s+=25));i.height-=l.height,this.children.splice(++r,0,l),l.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new ma(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=U(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new ma(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var ga=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function va(e,t,n){dn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&di(e,n)}function ya(e,t,n,r){var i=new ga(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),pa(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!cn(e,t)){var r=dn(t)<e.scrollTop;ot(t,t.height+Gn(i)),r&&di(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&Fn(o,"lineWidgetAdded",o,i,"number"==typeof t?t:at(t)),i}ga.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=at(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=Gn(this);ot(n,Math.max(0,n.height-o)),e&&(zi(e,(function(){va(e,n,-o),Wr(e,r,"widget")})),Fn(e,"lineWidgetCleared",e,this,r))}},ga.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=Gn(this)-t;i&&(cn(this.doc,r)||ot(r,r.height+i),n&&zi(n,(function(){n.curOp.forceUpdate=!0,va(n,r,i),Fn(n,"lineWidgetChanged",n,e,at(r))})))},Me(ga);var ba=0,xa=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ba};function ka(e,t,n,r,i){if(r&&r.shared)return _a(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return Ii(e.cm,ka)(e,t,n,r,i);var o=new xa(e,i),a=dt(t,n);if(r&&j(r,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=E("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(nn(e,t.line,t,n,o)||t.line!=n.line&&nn(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");It()}o.addToHistory&&Eo(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(r){c&&o.collapsed&&!c.options.lineWrapping&&rn(r)==c.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&ot(r,0),Ht(r,new Rt(o,l==t.line?t.ch:null,l==n.line?n.ch:null),e.cm&&e.cm.curOp),++l})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){cn(e,t)&&ot(t,0)})),o.clearOnEnter&&be(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(zt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ba,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)jr(c,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=t.line;u<=n.line;u++)Wr(c,u,"text");o.atomic&&Qo(c.doc),Fn(c,"markerAdded",c,o)}return o}xa.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Ti(e),Se(this,"clear")){var n=this.find();n&&Fn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],s=qt(a.markedSpans,this);e&&!this.collapsed?Wr(e,at(a),"text"):e&&(null!=s.to&&(i=at(a)),null!=s.from&&(r=at(a))),a.markedSpans=Bt(a.markedSpans,s),null==s.from&&this.collapsed&&!cn(this.doc,a)&&e&&ot(a,Fr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=rn(this.lines[l]),u=fn(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&jr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Qo(e.doc)),e&&Fn(e,"markerCleared",e,this,r,i),t&&Ai(e),this.parent&&this.parent.clear()}},xa.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=qt(o.markedSpans,this);if(null!=a.from&&(n=ut(t?o:at(o),a.from),-1==e))return n;if(null!=a.to&&(r=ut(t?o:at(o),a.to),1==e))return r}return n&&{from:n,to:r}},xa.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&zi(r,(function(){var i=t.line,o=at(t.line),a=ar(r,o);if(a&&(mr(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!cn(n.doc,i)&&null!=n.height){var s=n.height;n.height=null;var l=Gn(n)-s;l&&ot(i,i.height+l)}Fn(r,"markerChanged",r,e)}))},xa.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=U(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},xa.prototype.detachLine=function(e){if(this.lines.splice(U(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Me(xa);var wa=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function _a(e,t,n,r,i){(r=j(r)).shared=!1;var o=[ka(e,t,n,r,i)],a=o[0],s=r.widgetNode;return _o(e,(function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(ka(e,vt(e,t),vt(e,n),r,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;a=ee(o)})),new wa(o,a)}function Ca(e){return e.findMarks(ut(e.first,0),e.clipPos(ut(e.lastLine())),(function(e){return e.parent}))}function Sa(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(dt(o,a)){var s=ka(e,o,a,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}function Ma(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];_o(n.primary.doc,(function(e){return r.push(e)}));for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==U(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}},n=0;n<e.length;n++)t(n)}wa.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Fn(this,"clear")}},wa.prototype.find=function(e,t){return this.primary.find(e,t)},Me(wa);var La=0,Ta=function(e,t,n,r,i){if(!(this instanceof Ta))return new Ta(e,t,n,r,i);null==n&&(n=0),ma.call(this,[new ha([new hn("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=ut(n,0);this.sel=po(o),this.history=new Lo(null),this.id=++La,this.modeOption=t,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),wo(this,{from:o,to:o,text:e}),Vo(this,po(o),G)};Ta.prototype=ie(ma.prototype,{constructor:Ta,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=it(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:qi((function(e){var t=ut(this.first,0),n=this.first+this.size-1;ra(this,{from:t,to:ut(n,nt(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&pi(this.cm,0,0),Vo(this,po(t),G)})),replaceRange:function(e,t,n,r){ca(this,e,t=vt(this,t),n=n?vt(this,n):t,r)},getRange:function(e,t,n){var r=rt(this,vt(this,e),vt(this,t));return!1===n?r:""===n?r.join(""):r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(lt(this,e))return nt(this,e)},getLineNumber:function(e){return at(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=nt(this,e)),rn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return vt(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:qi((function(e,t,n){Ko(this,vt(this,"number"==typeof e?ut(e,t||0):e),null,n)})),setSelection:qi((function(e,t,n){Ko(this,vt(this,e),vt(this,t||e),n)})),extendSelection:qi((function(e,t,n){Ho(this,vt(this,e),t&&vt(this,t),n)})),extendSelections:qi((function(e,t){jo(this,bt(this,e),t)})),extendSelectionsBy:qi((function(e,t){jo(this,bt(this,te(this.sel.ranges,e)),t)})),setSelections:qi((function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new uo(vt(this,e[i].anchor),vt(this,e[i].head||e[i].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Vo(this,fo(this.cm,r,t),n)}})),addSelection:qi((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new uo(vt(this,e),vt(this,t||e))),Vo(this,fo(this.cm,r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=rt(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=rt(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:qi((function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];r[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:n}}for(var s=t&&"end"!=t&&yo(this,r,t),l=r.length-1;l>=0;l--)ra(this,r[l]);s?$o(this,s):this.cm&&fi(this.cm)})),undo:qi((function(){oa(this,"undo")})),redo:qi((function(){oa(this,"redo")})),undoSelection:qi((function(){oa(this,"undo",!0)})),redoSelection:qi((function(){oa(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Lo(this.history),_o(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:qo(this.history.done),undone:qo(this.history.undone)}},setHistory:function(e){var t=this.history=new Lo(this.history);t.done=qo(e.done.slice(0),null,!0),t.undone=qo(e.undone.slice(0),null,!0)},setGutterMarker:qi((function(e,t,n){return pa(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&le(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:qi((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&pa(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,le(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!lt(this,e))return null;if(t=e,!(e=nt(this,e)))return null}else if(null==(t=at(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:qi((function(e,t,n){return pa(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(S(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:qi((function(e,t,n){return pa(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(S(n));if(!o)return!1;var a=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0}))})),addLineWidget:qi((function(e,t,n){return ya(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return ka(this,vt(this,e),vt(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return ka(this,e=vt(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=nt(this,(e=vt(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=vt(this,e),t=vt(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];null!=l.to&&i==e.line&&e.ch>=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n})),vt(this,ut(n,t))},indexFromPos:function(e){var t=(e=vt(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new Ta(it(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new Ta(it(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Sa(r,Ca(this)),r},unlinkDoc:function(e){if(e instanceof js&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Ma(Ca(this));break}if(e.history==this.history){var n=[e.id];_o(e,(function(e){return n.push(e.id)}),!0),e.history=new Lo(null),e.history.done=qo(this.history.done,n),e.history.undone=qo(this.history.undone,n)}},iterLinkedDocs:function(e){_o(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):qe(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:qi((function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&Mo(this.cm))}))}),Ta.prototype.eachLine=Ta.prototype.iter;var Aa=0;function Oa(e){var t=this;if(Pa(t),!_e(t,e)&&!Xn(t.display,e)){Le(e),a&&(Aa=+new Date);var n=Br(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),s=0,l=function(){++s==i&&Ii(t,(function(){var e={from:n=vt(t.doc,n),to:n,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};ra(t.doc,e),$o(t.doc,po(vt(t.doc,n),vt(t.doc,ho(e))))}))()},c=function(e,n){if(t.options.allowDropFileTypes&&-1==U(t.options.allowDropFileTypes,e.type))l();else{var r=new FileReader;r.onerror=function(){return l()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[n]=e),l()},r.readAsText(e)}},u=0;u<r.length;u++)c(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),Go(t.doc,po(n,n)),f)for(var p=0;p<f.length;++p)ca(t.doc,"",f[p].anchor,f[p].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Ea(e,t){if(a&&(!e.state.draggingText||+new Date-Aa<100))Oe(t);else if(!_e(e,t)&&!Xn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!p)){var n=O("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",f&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),f&&n.parentNode.removeChild(n)}}function Na(e,t){var n=Br(e,t);if(n){var r=document.createDocumentFragment();Qr(e,n,r),e.display.dragCursor||(e.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),A(e.display.dragCursor,r)}}function Pa(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Fa(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var Da=!1;function za(){Da||(Ia(),Da=!0)}function Ia(){var e;be(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Fa(Ra)}),100))})),be(window,"blur",(function(){return Fa(ri)}))}function Ra(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var qa={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ba=0;Ba<10;Ba++)qa[Ba+48]=qa[Ba+96]=String(Ba);for(var Ha=65;Ha<=90;Ha++)qa[Ha]=String.fromCharCode(Ha);for(var ja=1;ja<=12;ja++)qa[ja+111]=qa[ja+63235]="F"+ja;var Wa={};function Ka(e){var t,n,r,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var a=0;a<o.length-1;a++){var s=o[a];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Ua(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=te(n.split(" "),Ka),o=0;o<i.length;o++){var a=void 0,s=void 0;o==i.length-1?(s=i.join(" "),a=r):(s=i.slice(0,o+1).join(" "),a="...");var l=t[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[n]}for(var c in t)e[c]=t[c];return e}function $a(e,t,n,r){var i=(t=Qa(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return $a(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var a=$a(e,t.fallthrough[o],n,r);if(a)return a}}}function Va(e){var t="string"==typeof e?e:qa[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Ga(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(_?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(_?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function Xa(e,t){if(f&&34==e.keyCode&&e.char)return!1;var n=qa[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),Ga(n,e,t))}function Qa(e){return"string"==typeof e?Wa[e]:e}function Ya(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&dt(o.from,ee(r).to)<=0;){var a=r.pop();if(dt(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}zi(e,(function(){for(var t=r.length-1;t>=0;t--)ca(e.doc,"",r[t].from,r[t].to,"+delete");fi(e)}))}function Ja(e,t,n){var r=de(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Za(e,t,n){var r=Ja(e,t.ch,n);return null==r?null:new ut(t.line,r,n<0?"after":"before")}function es(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ve(n,t.doc.direction);if(o){var a,s=i<0?ee(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=sr(t,n);a=i<0?n.text.length-1:0;var u=lr(t,c,a).top;a=fe((function(e){return lr(t,c,e).top==u}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Ja(n,a,1))}else a=i<0?s.to:s.from;return new ut(r,a,l)}}return new ut(r,i<0?n.text.length:0,i<0?"before":"after")}function ts(e,t,n,r){var i=ve(t,e.doc.direction);if(!i)return Za(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=me(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from<n.ch))return Za(t,n,r);var s,l=function(e,n){return Ja(t,e instanceof ut?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(s=s||sr(e,t),Ar(e,t,s,n)):{begin:0,end:t.text.length}},u=c("before"==n.sticky?l(n,-1):n.ch);if("rtl"==e.doc.direction||1==a.level){var d=1==a.level==r<0,f=l(n,d?1:-1);if(null!=f&&(d?f<=a.to&&f<=u.end:f>=a.from&&f>=u.begin)){var p=d?"before":"after";return new ut(n.line,f,p)}}var h=function(e,t,r){for(var o=function(e,t){return t?new ut(n.line,l(e,1),"before"):new ut(n.line,e,"after")};e>=0&&e<i.length;e+=t){var a=i[e],s=t>0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c<a.to)return o(c,s);if(c=s?a.from:l(a.to,-1),r.begin<=c&&c<r.end)return o(c,s)}},m=h(o+r,r,u);if(m)return m;var g=r>0?u.end:l(u.begin,-1);return null==g||r>0&&g==t.text.length||!(m=h(r>0?0:i.length-1,r,c(g)))?null:m}Wa.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Wa.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Wa.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Wa.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Wa.default=b?Wa.macDefault:Wa.pcDefault;var ns={selectAll:ta,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),G)},killLine:function(e){return Ya(e,(function(t){if(t.empty()){var n=nt(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:ut(t.head.line+1,0)}:{from:t.head,to:ut(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Ya(e,(function(t){return{from:ut(t.from().line,0),to:vt(e.doc,ut(t.to().line+1,0))}}))},delLineLeft:function(e){return Ya(e,(function(e){return{from:ut(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Ya(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Ya(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(ut(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ut(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return rs(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return os(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return is(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),Q)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),Q)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?os(e,t.head):r}),Q)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),a=W(e.getLine(o.line),o.ch,r);t.push(Z(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return zi(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=nt(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new ut(i.line,i.ch-1)),i.ch>0)i=new ut(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ut(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=nt(e.doc,i.line-1).text;a&&(i=new ut(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),ut(i.line-1,a.length-1),i,"+transpose"))}n.push(new uo(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return zi(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);fi(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function rs(e,t){var n=nt(e.doc,t),r=rn(n);return r!=n&&(t=at(r)),es(!0,e,r,t,1)}function is(e,t){var n=nt(e.doc,t),r=on(n);return r!=n&&(t=at(r)),es(!0,e,n,t,-1)}function os(e,t){var n=rs(e,t.line),r=nt(e.doc,n.line),i=ve(r,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(n.ch,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return ut(n.line,a?0:o,n.sticky)}return n}function as(e,t,n){if("string"==typeof t&&!(t=ns[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=V}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function ss(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=$a(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&$a(t,e.options.extraKeys,n,e)||$a(t,e.options.keyMap,n,e)}var ls=new K;function cs(e,t,n,r){var i=e.state.keySeq;if(i){if(Va(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:ls.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),us(e,i+" "+t,n,r))return!0}return us(e,t,n,r)}function us(e,t,n,r){var i=ss(e,t,r);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&Fn(e,"keyHandled",e,t,n),"handled"!=i&&"multi"!=i||(Le(n),Zr(e)),!!i}function ds(e,t){var n=Xa(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?cs(e,"Shift-"+n,t,(function(t){return as(e,t,!0)}))||cs(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return as(e,t)})):cs(e,n,t,(function(t){return as(e,t)})))}function fs(e,t,n){return cs(e,"'"+n+"'",t,(function(t){return as(e,t,!0)}))}var ps=null;function hs(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=P(R(t)),_e(t,e)))){a&&s<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var i=ds(t,e);f&&(ps=i?r:null,i||88!=r||He||!(b?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!b&&!i&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||ms(t)}}function ms(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(L(t,"CodeMirror-crosshair"),ke(document,"keyup",n),ke(document,"mouseover",n))}F(t,"CodeMirror-crosshair"),be(document,"keyup",n),be(document,"mouseover",n)}function gs(e){16==e.keyCode&&(this.doc.sel.shift=!1),_e(this,e)}function vs(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||Xn(t.display,e)||_e(t,e)||e.ctrlKey&&!e.altKey||b&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(f&&n==ps)return ps=null,void Le(e);if(!f||e.which&&!(e.which<10)||!ds(t,e)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(fs(t,e,i)||t.display.input.onKeyPress(e))}}}var ys,bs,xs=400,ks=function(e,t,n){this.time=e,this.pos=t,this.button=n};function ws(e,t){var n=+new Date;return bs&&bs.compare(n,e,t)?(ys=bs=null,"triple"):ys&&ys.compare(n,e,t)?(bs=new ks(n,e,t),ys=null,"double"):(ys=new ks(n,e,t),bs=null,"single")}function _s(e){var t=this,n=t.display;if(!(_e(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,Xn(n,e))l||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!Ns(t,e)){var r=Br(t,e),i=Ne(e),o=r?ws(r,i):"single";B(t).focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),r&&Cs(t,i,r,o,e)||(1==i?r?Ms(t,r,o,e):Ee(e)==n.scroller&&Le(e):2==i?(r&&Ho(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(C?t.display.input.onContextMenu(e):ti(t)))}}function Cs(e,t,n,r,i){var o="Click";return"double"==r?o="Double"+o:"triple"==r&&(o="Triple"+o),cs(e,Ga(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,(function(t){if("string"==typeof t&&(t=ns[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=V}finally{e.state.suppressEdits=!1}return r}))}function Ss(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(null==i.unit){var o=x?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),null==i.addNew&&(i.addNew=b?n.metaKey:n.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(b?n.altKey:n.ctrlKey)),i}function Ms(e,t,n,r){a?setTimeout(H(ei,e),0):e.curOp.focus=P(R(e));var i,o=Ss(e,n,r),s=e.doc.sel;e.options.dragDrop&&De&&!e.isReadOnly()&&"single"==n&&(i=s.contains(t))>-1&&(dt((i=s.ranges[i]).from(),t)<0||t.xRel>0)&&(dt(i.to(),t)>0||t.xRel<0)?Ls(e,r,t,o):As(e,r,t,o)}function Ls(e,t,n,r){var i=e.display,o=!1,c=Ii(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:ti(e)),ke(i.wrapper.ownerDocument,"mouseup",c),ke(i.wrapper.ownerDocument,"mousemove",u),ke(i.scroller,"dragstart",d),ke(i.scroller,"drop",c),o||(Le(t),r.addNew||Ho(e.doc,n,null,null,r.extend),l&&!p||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return o=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,be(i.wrapper.ownerDocument,"mouseup",c),be(i.wrapper.ownerDocument,"mousemove",u),be(i.scroller,"dragstart",d),be(i.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Ts(e,t,n){if("char"==n)return new uo(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new uo(ut(t.line,0),vt(e.doc,ut(t.line+1,0)));var r=n(e,t);return new uo(r.from,r.to)}function As(e,t,n,r){a&&ti(e);var i=e.display,o=e.doc;Le(t);var s,l,c=o.sel,u=c.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),s=l>-1?u[l]:new uo(n,n)):(s=o.sel.primary(),l=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new uo(n,n)),n=Br(e,t,!0,!0),l=-1;else{var d=Ts(e,n,r.unit);s=r.extend?Bo(s,d.anchor,d.head,r.extend):d}r.addNew?-1==l?(l=u.length,Vo(o,fo(e,u.concat([s]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==r.unit&&!r.extend?(Vo(o,fo(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=o.sel):Wo(o,l,s,X):(l=0,Vo(o,new co([s],0),X),c=o.sel);var f=n;function p(t){if(0!=dt(f,t))if(f=t,"rectangle"==r.unit){for(var i=[],a=e.options.tabSize,u=W(nt(o,n.line).text,n.ch,a),d=W(nt(o,t.line).text,t.ch,a),p=Math.min(u,d),h=Math.max(u,d),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=nt(o,m).text,y=Y(v,p,a);p==h?i.push(new uo(ut(m,y),ut(m,y))):v.length>y&&i.push(new uo(ut(m,y),ut(m,Y(v,h,a))))}i.length||i.push(new uo(n,n)),Vo(o,fo(e,c.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,x=s,k=Ts(e,t,r.unit),w=x.anchor;dt(k.anchor,w)>0?(b=k.head,w=mt(x.from(),k.anchor)):(b=k.anchor,w=ht(x.to(),k.head));var _=c.ranges.slice(0);_[l]=Os(e,new uo(vt(o,w),b)),Vo(o,fo(e,_,l),X)}}var h=i.wrapper.getBoundingClientRect(),m=0;function g(t){var n=++m,a=Br(e,t,!0,"rectangle"==r.unit);if(a)if(0!=dt(a,f)){e.curOp.focus=P(R(e)),p(a);var s=ai(i,o);(a.line>=s.to||a.line<s.from)&&setTimeout(Ii(e,(function(){m==n&&g(t)})),150)}else{var l=t.clientY<h.top?-20:t.clientY>h.bottom?20:0;l&&setTimeout(Ii(e,(function(){m==n&&(i.scroller.scrollTop+=l,g(t))})),50)}}function v(t){e.state.selectingText=!1,m=1/0,t&&(Le(t),i.input.focus()),ke(i.wrapper.ownerDocument,"mousemove",y),ke(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var y=Ii(e,(function(e){0!==e.buttons&&Ne(e)?g(e):v(e)})),b=Ii(e,v);e.state.selectingText=b,be(i.wrapper.ownerDocument,"mousemove",y),be(i.wrapper.ownerDocument,"mouseup",b)}function Os(e,t){var n=t.anchor,r=t.head,i=nt(e.doc,n.line);if(0==dt(n,r)&&n.sticky==r.sticky)return t;var o=ve(i);if(!o)return t;var a=me(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=me(o,r.ch,r.sticky),d=u-a||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var f=o[c+(l?-1:0)],p=l==(1==f.level),h=p?f.from:f.to,m=p?"after":"before";return n.ch==h&&n.sticky==m?t:new uo(new ut(n.line,h,m),r)}function Es(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Le(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!Se(e,n))return Ae(t);o-=s.top-a.viewOffset;for(var l=0;l<e.display.gutterSpecs.length;++l){var c=a.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=i)return we(e,n,e,st(e.doc,o),e.display.gutterSpecs[l].className,t),Ae(t)}}function Ns(e,t){return Es(e,t,"gutterClick",!0)}function Ps(e,t){Xn(e.display,t)||Fs(e,t)||_e(e,t,"contextmenu")||C||e.display.input.onContextMenu(t)}function Fs(e,t){return!!Se(e,"gutterContextMenu")&&Es(e,t,"gutterContextMenu",!1)}function Ds(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),vr(e)}ks.prototype.compare=function(e,t,n){return this.time+xs>e&&0==dt(t,this.pos)&&n==this.button};var zs={toString:function(){return"CodeMirror.Init"}},Is={},Rs={};function qs(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=zs&&i(e,t,n)}:i)}e.defineOption=n,e.Init=zs,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,bo(e)}),!0),n("indentUnit",2,bo,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){xo(e),vr(e),jr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(ut(r,o))}r++}));for(var i=n.length-1;i>=0;i--)ca(e.doc,t,n[i],ut(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=zs&&e.refresh()})),n("specialCharPlaceholder",kn,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",y?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!k),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){Ds(e),no(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Qa(t),i=n!=zs&&Qa(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Hs,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=eo(t,e.options.lineNumbers),no(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Ir(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return _i(e)}),!0),n("scrollbarStyle","native",(function(e){Mi(e),_i(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=eo(e.options.gutters,t),no(e)}),!0),n("firstLineNumber",1,no,!0),n("lineNumberFormatter",(function(e){return e}),no,!0),n("showCursorWhenSelecting",!1,Gr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(ri(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Bs),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Gr,!0),n("singleCursorHeightPerLine",!0,Gr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,xo,!0),n("addModeClass",!1,xo,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,xo,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}function Bs(e,t,n){if(!t!=!(n&&n!=zs)){var r=e.display.dragFunctions,i=t?be:ke;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Hs(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(L(e.display.wrapper,"CodeMirror-wrap"),pn(e)),qr(e),jr(e),vr(e),setTimeout((function(){return _i(e)}),100)}function js(e,t){var n=this;if(!(this instanceof js))return new js(e,t);this.options=t=t?j(t):{},j(Is,t,!1);var r=t.value;"string"==typeof r?r=new Ta(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new js.inputStyles[t.inputStyle](this),o=this.display=new ro(e,r,i,t);for(var c in o.wrapper.CodeMirror=this,Ds(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Mi(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new K,keySeq:null,specialChars:null},t.autofocus&&!y&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),Ws(this),za(),Ti(this),this.curOp.forceUpdate=!0,Co(this,r),t.autofocus&&!y||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&ni(n)}),20):ri(this),Rs)Rs.hasOwnProperty(c)&&Rs[c](this,t[c],zs);Zi(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Ks.length;++u)Ks[u](this);Ai(this),l&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Ws(e){var t=e.display;be(t.scroller,"mousedown",Ii(e,_s)),be(t.scroller,"dblclick",a&&s<11?Ii(e,(function(t){if(!_e(e,t)){var n=Br(e,t);if(n&&!Ns(e,t)&&!Xn(e.display,t)){Le(t);var r=e.findWordAt(n);Ho(e.doc,r.anchor,r.head)}}})):function(t){return _e(e,t)||Le(t)}),be(t.scroller,"contextmenu",(function(t){return Ps(e,t)})),be(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||Ps(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function o(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function l(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}be(t.scroller,"touchstart",(function(i){if(!_e(e,i)&&!o(i)&&!Ns(e,i)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),be(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),be(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!Xn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,a=e.coordsChar(t.activeTouch,"page");o=!r.prev||l(r,r.prev)?new uo(a,a):!r.prev.prev||l(r,r.prev.prev)?e.findWordAt(a):new uo(ut(a.line,0),vt(e.doc,ut(a.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),Le(n)}i()})),be(t.scroller,"touchcancel",i),be(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(vi(e,t.scroller.scrollTop),bi(e,t.scroller.scrollLeft,!0),we(e,"scroll",e))})),be(t.scroller,"mousewheel",(function(t){return lo(e,t)})),be(t.scroller,"DOMMouseScroll",(function(t){return lo(e,t)})),be(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){_e(e,t)||Oe(t)},over:function(t){_e(e,t)||(Na(e,t),Oe(t))},start:function(t){return Ea(e,t)},drop:Ii(e,Oa),leave:function(t){_e(e,t)||Pa(e)}};var c=t.input.getField();be(c,"keyup",(function(t){return gs.call(e,t)})),be(c,"keydown",Ii(e,hs)),be(c,"keypress",Ii(e,vs)),be(c,"focus",(function(t){return ni(e,t)})),be(c,"blur",(function(t){return ri(e,t)}))}js.defaults=Is,js.optionHandlers=Rs;var Ks=[];function Us(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=Ct(e,t).state:n="prev");var a=e.options.tabSize,s=nt(o,t),l=W(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((c=o.mode.indent(i,s.text.slice(u.length),s.text))==V||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?W(nt(o,t-1).text,null,a):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",f=0;if(e.options.indentWithTabs)for(var p=Math.floor(c/a);p;--p)f+=a,d+="\t";if(f<c&&(d+=Z(c-f)),d!=u)return ca(o,d,ut(t,0),ut(t,u.length),"+input"),s.stateAfter=null,!0;for(var h=0;h<o.sel.ranges.length;h++){var m=o.sel.ranges[h];if(m.head.line==t&&m.head.ch<u.length){var g=ut(t,u.length);Wo(o,h,new uo(g,g));break}}}js.defineInitHook=function(e){return Ks.push(e)};var $s=null;function Vs(e){$s=e}function Gs(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var a=+new Date-200,s="paste"==i||e.state.pasteIncoming>a,l=qe(t),c=null;if(s&&r.ranges.length>1)if($s&&$s.text.join("\n")==t){if(r.ranges.length%$s.text.length==0){c=[];for(var u=0;u<$s.text.length;u++)c.push(o.splitLines($s.text[u]))}}else l.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=te(l,(function(e){return[e]})));for(var d=e.curOp.updateInput,f=r.ranges.length-1;f>=0;f--){var p=r.ranges[f],h=p.from(),m=p.to();p.empty()&&(n&&n>0?h=ut(h.line,h.ch-n):e.state.overwrite&&!s?m=ut(m.line,Math.min(nt(o,m.line).text.length,m.ch+ee(l).length)):s&&$s&&$s.lineWise&&$s.text.join("\n")==l.join("\n")&&(h=m=ut(h.line,0)));var g={from:h,to:m,text:c?c[f%c.length]:l,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};ra(e.doc,g),Fn(e,"inputRead",e,g)}t&&!s&&Qs(e,t),fi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Xs(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||zi(t,(function(){return Gs(t,n,0,null,"paste")})),!0}function Qs(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){a=Us(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(nt(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Us(e,i.head.line,"smart"));a&&Fn(e,"electricInput",e,i.head.line)}}}function Ys(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:ut(i,0),head:ut(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function Js(e,t,n,r){e.setAttribute("autocorrect",n?"on":"off"),e.setAttribute("autocapitalize",r?"on":"off"),e.setAttribute("spellcheck",!!t)}function Zs(){var e=O("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=O("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),t}function el(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){B(this).focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&Ii(this,t[e])(this,n,i),we(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Qa(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:Ri((function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");ne(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,jr(this)})),removeOverlay:Ri((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void jr(this)}})),indentLine:Ri((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),lt(this.doc,e)&&Us(this,e,t,n)})),indentSelection:Ri((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Us(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&fi(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l<n;++l)Us(this,l,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[r].from().ch>0&&Wo(this.doc,r,new uo(o,c[r].to()),G)}}})),getTokenAt:function(e,t){return At(this,e,t)},getLineTokens:function(e,t){return At(this,ut(e),t,!0)},getTokenTypeAt:function(e){e=vt(this.doc,e);var t,n=_t(this,nt(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]<o)){t=n[2*a+2];break}r=a+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&r.push(i[o[t]]);else if(o[t])for(var a=0;a<o[t].length;a++){var s=i[o[t][a]];s&&r.push(s)}else o.helperType&&i[o.helperType]?r.push(i[o.helperType]):i[o.name]&&r.push(i[o.name]);for(var l=0;l<i._global.length;l++){var c=i._global[l];c.pred(o,this)&&-1==U(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(e,t){var n=this.doc;return Ct(this,(e=gt(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return Cr(this,null==e?n.head:"object"==typeof e?vt(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return _r(this,vt(this.doc,e),t||"page")},coordsChar:function(e,t){return Lr(this,(e=wr(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=wr(this,{top:e,left:0},t||"page").top,st(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),r=nt(this.doc,e)}else r=e;return kr(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-dn(r):0)},defaultTextHeight:function(){return Fr(this.display)},defaultCharWidth:function(){return Dr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display,a=(e=Cr(this,vt(this.doc,e))).bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>c&&(s=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&ci(this,{left:s,top:a,right:s+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:Ri(hs),triggerOnKeyPress:Ri(vs),triggerOnKeyUp:gs,triggerOnMouseDown:Ri(_s),execCommand:function(e){if(ns.hasOwnProperty(e))return ns[e].call(null,this)},triggerElectric:Ri((function(e){Qs(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=vt(this.doc,e),a=0;a<t&&!(o=tl(this.doc,o,i,n,r)).hitSide;++a);return o},moveH:Ri((function(e,t){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?tl(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),Q)})),deleteH:Ri((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Ya(this,(function(n){var i=tl(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}}))})),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var a=vt(this.doc,e),s=0;s<t;++s){var l=Cr(this,a,"div");if(null==o?o=l.left:l.left=o,(a=nl(this,l,i,n)).hitSide)break}return a},moveV:Ri((function(e,t){var n=this,r=this.doc,i=[],o=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(a){if(o)return e<0?a.from():a.to();var s=Cr(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),i.push(s.left);var l=nl(n,s,e,t);return"page"==t&&a==r.sel.primary()&&di(n,_r(n,l,"div").top-s.top),l}),Q),i.length)for(var a=0;a<r.sel.ranges.length;a++)r.sel.ranges[a].goalColumn=i[a]})),findWordAt:function(e){var t=nt(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var o=t.charAt(n),a=se(o,i)?function(e){return se(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!se(e)};n>0&&a(t.charAt(n-1));)--n;for(;r<t.length&&a(t.charAt(r));)++r}return new uo(ut(e.line,n),ut(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?F(this.display.cursorDiv,"CodeMirror-overwrite"):L(this.display.cursorDiv,"CodeMirror-overwrite"),we(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==P(R(this))},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Ri((function(e,t){pi(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Zn(this)-this.display.barHeight,width:e.scrollWidth-Zn(this)-this.display.barWidth,clientHeight:tr(this),clientWidth:er(this)}},scrollIntoView:Ri((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:ut(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?hi(this,e):gi(this,e.from,e.to,e.margin)})),setSize:Ri((function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&gr(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Wr(n,i,"widget");break}++i})),this.curOp.forceUpdate=!0,we(this,"refresh",this)})),operation:function(e){return zi(this,e)},startOperation:function(){return Ti(this)},endOperation:function(){return Ai(this)},refresh:Ri((function(){var e=this.display.cachedTextHeight;jr(this),this.curOp.forceUpdate=!0,vr(this),pi(this,this.doc.scrollLeft,this.doc.scrollTop),Qi(this.display),(null==e||Math.abs(e-Fr(this.display))>.5||this.options.lineWrapping)&&qr(this),we(this,"refresh",this)})),swapDoc:Ri((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Co(this,e),vr(this),this.display.input.reset(),pi(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Fn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Me(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}function tl(e,t,n,r,i){var o=t,a=n,s=nt(e,t.line),l=i&&"rtl"==e.direction?-n:n;function c(){var n=t.line+l;return!(n<e.first||n>=e.first+e.size)&&(t=new ut(n,t.ch,t.sticky),s=nt(e,n))}function u(o){var a;if("codepoint"==r){var u=s.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(u))a=null;else{var d=n>0?u>=55296&&u<56320:u>=56320&&u<57343;a=new ut(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(d?2:1))),-n)}}else a=i?ts(e.cm,s,t,n):Za(s,t,n);if(null==a){if(o||!c())return!1;t=es(i,e.cm,s,t.line,l)}else t=a;return!0}if("char"==r||"codepoint"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var d=null,f="group"==r,p=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(n<0)||u(!h);h=!1){var m=s.text.charAt(t.ch)||"\n",g=se(m,p)?"w":f&&"\n"==m?"n":!f||/\s/.test(m)?null:"p";if(!f||h||g||(g="s"),d&&d!=g){n<0&&(n=1,u(),t.sticky="after");break}if(g&&(d=g),n>0&&!u(!h))break}var v=Zo(e,t,o,a,!0);return ft(o,v)&&(v.hitSide=!0),v}function nl(e,t,n,r){var i,o,a=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,B(e).innerHeight||a(e).documentElement.clientHeight),c=Math.max(l-.5*Fr(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=Lr(e,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var rl=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new K,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function il(e,t){var n=ar(e,t.line);if(!n||n.hidden)return null;var r=nt(e.doc,t.line),i=rr(n,r,t.line),o=ve(r,e.doc.direction),a="left";o&&(a=me(o,t.ch)%2?"right":"left");var s=dr(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function ol(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function al(e,t){return t&&(e.bad=!0),e}function sl(e,t,n,r,i){var o="",a=!1,s=e.doc.lineSeparator(),l=!1;function c(e){return function(t){return t.id==e}}function u(){a&&(o+=s,l&&(o+=s),a=l=!1)}function d(e){e&&(u(),o+=e)}function f(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void d(n);var o,p=t.getAttribute("cm-marker");if(p){var h=e.findMarks(ut(r,0),ut(i+1,0),c(+p));return void(h.length&&(o=h[0].find(0))&&d(rt(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;m&&u();for(var g=0;g<t.childNodes.length;g++)f(t.childNodes[g]);/^(pre|p)$/i.test(t.nodeName)&&(l=!0),m&&(a=!0)}else 3==t.nodeType&&d(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;f(t),t!=n;)t=t.nextSibling,l=!1;return o}function ll(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return al(e.clipPos(ut(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return cl(o,t,n)}}function cl(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!N(r,t))return al(ut(at(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?ee(e.rest):e.line;return al(ut(at(o),o.text.length),i)}var a=3==t.nodeType?t:null,s=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,n&&(n=a.nodeValue.length));s.parentNode!=r;)s=s.parentNode;var l=e.measure,c=l.maps;function u(t,n,r){for(var i=-1;i<(c?c.length:0);i++)for(var o=i<0?l.map:c[i],a=0;a<o.length;a+=3){var s=o[a+2];if(s==t||s==n){var u=at(i<0?e.line:e.rest[i]),d=o[a]+r;return(r<0||s!=t)&&(d=o[a+(r?1:0)]),ut(u,d)}}}var d=u(a,s,n);if(d)return al(d,i);for(var f=s.nextSibling,p=a?a.nodeValue.length-n:0;f;f=f.nextSibling){if(d=u(f,f.firstChild,0))return al(ut(d.line,d.ch-p),i);p+=f.textContent.length}for(var h=s.previousSibling,m=n;h;h=h.previousSibling){if(d=u(h,h.firstChild,-1))return al(ut(d.line,d.ch+m),i);m+=h.textContent.length}}rl.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;function o(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function a(e){if(o(e)&&!_e(r,e)){if(r.somethingSelected())Vs({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=Ys(r);Vs({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,G),r.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var a=$s.text.join("\n");if(e.clipboardData.setData("Text",a),e.clipboardData.getData("Text")==a)return void e.preventDefault()}var s=Zs(),l=s.firstChild;Js(l),r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),l.value=$s.text.join("\n");var c=P(q(i));z(l),setTimeout((function(){r.display.lineSpace.removeChild(s),c.focus(),c==i&&n.showPrimarySelection()}),50)}}i.contentEditable=!0,Js(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),be(i,"paste",(function(e){!o(e)||_e(r,e)||Xs(e,r)||s<=11&&setTimeout(Ii(r,(function(){return t.updateFromDOM()})),20)})),be(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),be(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),be(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),be(i,"touchstart",(function(){return n.forceCompositionEnd()})),be(i,"input",(function(){t.composing||t.readFromDOMSoon()})),be(i,"copy",a),be(i,"cut",a)},rl.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},rl.prototype.prepareSelection=function(){var e=Xr(this.cm,!1);return e.focus=P(q(this.div))==this.div,e},rl.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},rl.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},rl.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),o=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var a=ll(t,e.anchorNode,e.anchorOffset),s=ll(t,e.focusNode,e.focusOffset);if(!a||a.bad||!s||s.bad||0!=dt(mt(a,s),i)||0!=dt(ht(a,s),o)){var l=t.display.view,c=i.line>=t.display.viewFrom&&il(t,i)||{node:l[0].measure.map[2],offset:0},u=o.line<t.display.viewTo&&il(t,o);if(!u){var d=l[l.length-1].measure,f=d.maps?d.maps[d.maps.length-1]:d.map;u={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(c&&u){var p,h=e.rangeCount&&e.getRangeAt(0);try{p=M(c.node,c.offset,u.offset,u.node)}catch(e){}p&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),p.collapsed||(e.removeAllRanges(),e.addRange(p))):(e.removeAllRanges(),e.addRange(p)),h&&null==e.anchorNode?e.addRange(h):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},rl.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},rl.prototype.showMultipleSelections=function(e){A(this.cm.display.cursorDiv,e.cursors),A(this.cm.display.selectionDiv,e.selection)},rl.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},rl.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return N(this.div,t)},rl.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&P(q(this.div))==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},rl.prototype.blur=function(){this.div.blur()},rl.prototype.getField=function(){return this.div},rl.prototype.supportsTouch=function(){return!0},rl.prototype.receivedFocus=function(){var e=this,t=this;function n(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,n))}this.selectionInEditor()?setTimeout((function(){return e.pollSelection()}),20):zi(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,n)},rl.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},rl.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(v&&u&&this.cm.display.gutterSpecs.length&&ol(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=ll(t,e.anchorNode,e.anchorOffset),r=ll(t,e.focusNode,e.focusOffset);n&&r&&zi(t,(function(){Vo(t.doc,po(n,r),G),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},rl.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,i=r.display,o=r.doc.sel.primary(),a=o.from(),s=o.to();if(0==a.ch&&a.line>r.firstLine()&&(a=ut(a.line-1,nt(r.doc,a.line-1).length)),s.ch==nt(r.doc,s.line).text.length&&s.line<r.lastLine()&&(s=ut(s.line+1,0)),a.line<i.viewFrom||s.line>i.viewTo-1)return!1;a.line==i.viewFrom||0==(e=Hr(r,a.line))?(t=at(i.view[0].line),n=i.view[0].node):(t=at(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,c,u=Hr(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=at(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(sl(r,n,c,t,l)),f=rt(r.doc,ut(t,0),ut(l,nt(r.doc,l).text.length));d.length>1&&f.length>1;)if(ee(d)==ee(f))d.pop(),f.pop(),l--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var p=0,h=0,m=d[0],g=f[0],v=Math.min(m.length,g.length);p<v&&m.charCodeAt(p)==g.charCodeAt(p);)++p;for(var y=ee(d),b=ee(f),x=Math.min(y.length-(1==d.length?p:0),b.length-(1==f.length?p:0));h<x&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)++h;if(1==d.length&&1==f.length&&t==a.line)for(;p&&p>a.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)p--,h++;d[d.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var k=ut(t,p),w=ut(l,f.length?ee(f).length-h:0);return d.length>1||d[0]||dt(k,w)?(ca(r.doc,d,k,w,"+input"),!0):void 0},rl.prototype.ensurePolled=function(){this.forceCompositionEnd()},rl.prototype.reset=function(){this.forceCompositionEnd()},rl.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},rl.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},rl.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||zi(this.cm,(function(){return jr(e.cm)}))},rl.prototype.setUneditable=function(e){e.contentEditable="false"},rl.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Ii(this.cm,Gs)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},rl.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},rl.prototype.onContextMenu=function(){},rl.prototype.resetPosition=function(){},rl.prototype.needsContentAttribute=!0;var ul=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new K,this.hasSelection=!1,this.composing=null,this.resetting=!1};function dl(e,t){if((t=t?j(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=P(q(e));t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(be(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(ke(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=js((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s}function fl(e){e.off=ke,e.on=be,e.wheelEventPixels=so,e.Doc=Ta,e.splitLines=qe,e.countColumn=W,e.findColumn=Y,e.isWordChar=ae,e.Pass=V,e.signal=we,e.Line=hn,e.changeEnd=ho,e.scrollbarModel=Si,e.Pos=ut,e.cmpPos=dt,e.modes=Ke,e.mimeModes=Ue,e.resolveMode=Ge,e.getMode=Xe,e.modeExtensions=Qe,e.extendMode=Ye,e.copyState=Je,e.startState=et,e.innerMode=Ze,e.commands=ns,e.keyMap=Wa,e.keyName=Xa,e.isModifierKey=Va,e.lookupKey=$a,e.normalizeKeyMap=Ua,e.StringStream=tt,e.SharedTextMarker=wa,e.TextMarker=xa,e.LineWidget=ga,e.e_preventDefault=Le,e.e_stopPropagation=Te,e.e_stop=Oe,e.addClass=F,e.contains=N,e.rmClass=L,e.keyNames=qa}ul.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!_e(r,e)){if(r.somethingSelected())Vs({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Ys(r);Vs({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,G):(n.prevInput="",i.value=t.text.join("\n"),z(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width="0px"),be(i,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),be(i,"paste",(function(e){_e(r,e)||Xs(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),be(i,"cut",o),be(i,"copy",o),be(e.scroller,"paste",(function(t){if(!Xn(e,t)&&!_e(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),be(e.lineSpace,"selectstart",(function(t){Xn(e,t)||Le(t)})),be(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),be(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},ul.prototype.createField=function(e){this.wrapper=Zs(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Js(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},ul.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ul.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Xr(e);if(e.options.moveInputWithCursor){var i=Cr(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},ul.prototype.showSelection=function(e){var t=this.cm.display;A(t.cursorDiv,e.cursors),A(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ul.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&z(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null));this.resetting=!1}},ul.prototype.getField=function(){return this.textarea},ul.prototype.supportsTouch=function(){return!1},ul.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||P(q(this.textarea))!=this.textarea))try{this.textarea.focus()}catch(e){}},ul.prototype.blur=function(){this.textarea.blur()},ul.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ul.prototype.receivedFocus=function(){this.slowPoll()},ul.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},ul.prototype.fastPoll=function(){var e=!1,t=this;function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}t.pollingFast=!0,t.polling.set(20,n)},ul.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Be(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||b&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="â€‹"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l<c&&r.charCodeAt(l)==i.charCodeAt(l);)++l;return zi(t,(function(){Gs(t,i.slice(l),r.length-l,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},ul.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ul.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},ul.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Br(n,e),c=r.scroller.scrollTop;if(o&&!f){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&Ii(n,Vo)(n.doc,po(o),G);var u,d=i.style.cssText,p=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n      top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n      z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=i.ownerDocument.defaultView.scrollY),r.input.focus(),l&&i.ownerDocument.defaultView.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&g(),C){Oe(e);var m=function(){ke(window,"mouseup",m),setTimeout(v,20)};be(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="â€‹"+(e?i.value:"");i.value="â‡š",i.value=o,t.prevInput=e?"":"â€‹",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=d,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&s<9)&&g();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"â€‹"==t.prevInput?Ii(n,ta)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},ul.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},ul.prototype.setUneditable=function(){},ul.prototype.needsContentAttribute=!1,qs(js),el(js);var pl="iter insert remove copy getEditor constructor".split(" ");for(var hl in Ta.prototype)Ta.prototype.hasOwnProperty(hl)&&U(pl,hl)<0&&(js.prototype[hl]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ta.prototype[hl]));return Me(Ta),js.inputStyles={textarea:ul,contenteditable:rl},js.defineMode=function(e){js.defaults.mode||"null"==e||(js.defaults.mode=e),$e.apply(this,arguments)},js.defineMIME=Ve,js.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),js.defineMIME("text/plain","null"),js.defineExtension=function(e,t){js.prototype[e]=t},js.defineDocExtension=function(e,t){Ta.prototype[e]=t},js.fromTextArea=dl,fl(js),js.version="5.65.20",js}()},8712(e,t,n){!function(e){"use strict";function t(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.info=r,this.align=i,this.prev=o}function n(e,n,r,i){var o=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=r&&(o=e.context.indented),e.context=new t(o,n,r,i,null,e.context)}function r(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function i(e,t,n){return"variable"==t.prevToken||"type"==t.prevToken||!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,n))||!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0}function o(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function a(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}function s(e,t){return"function"==typeof e?e(t):e.propertyIsEnumerable(t)}e.defineMode("clike",(function(a,l){var c,u,d=a.indentUnit,f=l.statementIndentUnit||d,p=l.dontAlignCalls,h=l.keywords||{},m=l.types||{},g=l.builtin||{},v=l.blockKeywords||{},y=l.defKeywords||{},b=l.atoms||{},x=l.hooks||{},k=l.multiLineStrings,w=!1!==l.indentStatements,_=!1!==l.indentSwitch,C=l.namespaceSeparator,S=l.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,M=l.numberStart||/[\d\.]/,L=l.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,T=l.isOperatorChar||/[+\-*&%=<>!?|\/]/,A=l.isIdentifierChar||/[\w\$_\xa1-\uffff]/,O=l.isReservedIdentifier||!1;function E(e,t){var n=e.next();if(x[n]){var r=x[n](e,t);if(!1!==r)return r}if('"'==n||"'"==n)return t.tokenize=N(n),t.tokenize(e,t);if(M.test(n)){if(e.backUp(1),e.match(L))return"number";e.next()}if(S.test(n))return c=n,null;if("/"==n){if(e.eat("*"))return t.tokenize=P,P(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(T.test(n)){for(;!e.match(/^\/[\/*]/,!1)&&e.eat(T););return"operator"}if(e.eatWhile(A),C)for(;e.match(C);)e.eatWhile(A);var i=e.current();return s(h,i)?(s(v,i)&&(c="newstatement"),s(y,i)&&(u=!0),"keyword"):s(m,i)?"type":s(g,i)||O&&O(i)?(s(v,i)&&(c="newstatement"),"builtin"):s(b,i)?"atom":"variable"}function N(e){return function(t,n){for(var r,i=!1,o=!1;null!=(r=t.next());){if(r==e&&!i){o=!0;break}i=!i&&"\\"==r}return(o||!i&&!k)&&(n.tokenize=null),"string"}}function P(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=null;break}r="*"==n}return"comment"}function F(e,t){l.typeFirstDefinitions&&e.eol()&&o(t.context)&&(t.typeAtEndOfLine=i(e,t,e.pos))}return{startState:function(e){return{tokenize:null,context:new t((e||0)-d,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var a=t.context;if(e.sol()&&(null==a.align&&(a.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return F(e,t),null;c=u=null;var s=(t.tokenize||E)(e,t);if("comment"==s||"meta"==s)return s;if(null==a.align&&(a.align=!0),";"==c||":"==c||","==c&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)r(t);else if("{"==c)n(t,e.column(),"}");else if("["==c)n(t,e.column(),"]");else if("("==c)n(t,e.column(),")");else if("}"==c){for(;"statement"==a.type;)a=r(t);for("}"==a.type&&(a=r(t));"statement"==a.type;)a=r(t)}else c==a.type?r(t):w&&(("}"==a.type||"top"==a.type)&&";"!=c||"statement"==a.type&&"newstatement"==c)&&n(t,e.column(),"statement",e.current());if("variable"==s&&("def"==t.prevToken||l.typeFirstDefinitions&&i(e,t,e.start)&&o(t.context)&&e.match(/^\s*\(/,!1))&&(s="def"),x.token){var d=x.token(e,t,s);void 0!==d&&(s=d)}return"def"==s&&!1===l.styleDefs&&(s="variable"),t.startOfLine=!1,t.prevToken=u?"def":s||c,F(e,t),s},indent:function(t,n){if(t.tokenize!=E&&null!=t.tokenize||t.typeAtEndOfLine&&o(t.context))return e.Pass;var r=t.context,i=n&&n.charAt(0),a=i==r.type;if("statement"==r.type&&"}"==i&&(r=r.prev),l.dontIndentStatements)for(;"statement"==r.type&&l.dontIndentStatements.test(r.info);)r=r.prev;if(x.indent){var s=x.indent(t,r,n,d);if("number"==typeof s)return s}var c=r.prev&&"switch"==r.prev.info;if(l.allmanIndentation&&/[{(]/.test(i)){for(;"top"!=r.type&&"}"!=r.type;)r=r.prev;return r.indented}return"statement"==r.type?r.indented+("{"==i?0:f):!r.align||p&&")"==r.type?")"!=r.type||a?r.indented+(a?0:d)+(a||!c||/^(?:case|default)\b/.test(n)?0:d):r.indented+f:r.column+(a?0:1)},electricInput:_?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}}));var l="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran",c="alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reinterpret_cast requires static_assert static_cast template this thread_local throw try typeid typename using virtual xor xor_eq",u="bycopy byref in inout oneway out self super atomic nonatomic retain copy readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd @interface @implementation @end @protocol @encode @property @synthesize @dynamic @class @public @package @private @protected @required @optional @try @catch @finally @import @selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available",d="FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION  NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT",f=a("int long char short double float unsigned signed void bool"),p=a("SEL instancetype id Class Protocol BOOL");function h(e){return s(f,e)||/.+_t$/.test(e)}function m(e){return h(e)||s(p,e)}var g="case do else for if switch while struct enum union",v="struct enum union";function y(e,t){if(!t.startOfLine)return!1;for(var n,r=null;n=e.peek();){if("\\"==n&&e.match(/^.$/)){r=y;break}if("/"==n&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=r,"meta"}function b(e,t){return"type"==t.prevToken&&"type"}function x(e){return!(!e||e.length<2||"_"!=e[0]||"_"!=e[1]&&e[1]===e[1].toLowerCase())}function k(e){return e.eatWhile(/[\w\.']/),"number"}function w(e,t){if(e.backUp(1),e.match(/^(?:R|u8R|uR|UR|LR)/)){var n=e.match(/^"([^\s\\()]{0,16})\(/);return!!n&&(t.cpp11RawStringDelim=n[1],t.tokenize=S,S(e,t))}return e.match(/^(?:u8|u|U|L)/)?!!e.match(/^["']/,!1)&&"string":(e.next(),!1)}function _(e){var t=/(\w+)::~?(\w+)$/.exec(e);return t&&t[1]==t[2]}function C(e,t){for(var n;null!=(n=e.next());)if('"'==n&&!e.eat('"')){t.tokenize=null;break}return"string"}function S(e,t){var n=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");return e.match(new RegExp(".*?\\)"+n+'"'))?t.tokenize=null:e.skipToEnd(),"string"}function M(t,n){"string"==typeof t&&(t=[t]);var r=[];function i(e){if(e)for(var t in e)e.hasOwnProperty(t)&&r.push(t)}i(n.keywords),i(n.types),i(n.builtin),i(n.atoms),r.length&&(n.helperType=t[0],e.registerHelper("hintWords",t[0],r));for(var o=0;o<t.length;++o)e.defineMIME(t[o],n)}function L(e,t){for(var n=!1;!e.eol();){if(!n&&e.match('"""')){t.tokenize=null;break}n="\\"==e.next()&&!n}return"string"}function T(e){return function(t,n){for(var r;r=t.next();){if("*"==r&&t.eat("/")){if(1==e){n.tokenize=null;break}return n.tokenize=T(e-1),n.tokenize(t,n)}if("/"==r&&t.eat("*"))return n.tokenize=T(e+1),n.tokenize(t,n)}return"comment"}}function A(e){return function(t,n){for(var r,i=!1,o=!1;!t.eol();){if(!e&&!i&&t.match('"')){o=!0;break}if(e&&t.match('"""')){o=!0;break}r=t.next(),!i&&"$"==r&&t.match("{")&&t.skipTo("}"),i=!i&&"\\"==r&&!e}return!o&&e||(n.tokenize=null),"string"}}M(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:a(l),types:h,blockKeywords:a(g),defKeywords:a(v),typeFirstDefinitions:!0,atoms:a("NULL true false"),isReservedIdentifier:x,hooks:{"#":y,"*":b},modeProps:{fold:["brace","include"]}}),M(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:a(l+" "+c),types:h,blockKeywords:a(g+" class try catch"),defKeywords:a(v+" class namespace"),typeFirstDefinitions:!0,atoms:a("true false NULL nullptr"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,isReservedIdentifier:x,hooks:{"#":y,"*":b,u:w,U:w,L:w,R:w,0:k,1:k,2:k,3:k,4:k,5:k,6:k,7:k,8:k,9:k,token:function(e,t,n){if("variable"==n&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&_(e.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),M("text/x-java",{name:"clike",keywords:a("abstract assert break case catch class const continue default do else enum extends final finally for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface"),types:a("var byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:a("catch class do else finally for if switch try while"),defKeywords:a("class interface enum @interface"),typeFirstDefinitions:!0,atoms:a("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(e){return!e.match("interface",!1)&&(e.eatWhile(/[\w\$_]/),"meta")},'"':function(e,t){return!!e.match(/""$/)&&(t.tokenize=L,t.tokenize(e,t))}},modeProps:{fold:["brace","import"]}}),M("text/x-csharp",{name:"clike",keywords:a("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in init interface internal is lock namespace new operator out override params private protected public readonly record ref required return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),types:a("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),blockKeywords:a("catch class do else finally for foreach if struct switch try while"),defKeywords:a("class interface namespace record struct var"),typeFirstDefinitions:!0,atoms:a("true false null"),hooks:{"@":function(e,t){return e.eat('"')?(t.tokenize=C,C(e,t)):(e.eatWhile(/[\w\$_]/),"meta")}}}),M("text/x-scala",{name:"clike",keywords:a("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble"),types:a("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0,blockKeywords:a("catch class enum do else finally for forSome if match switch try while"),defKeywords:a("class enum def object package trait type val var"),atoms:a("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=L,t.tokenize(e,t))},"'":function(e){return e.match(/^(\\[^'\s]+|[^\\'])'/)?"string-2":(e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom")},"=":function(e,n){var r=n.context;return!("}"!=r.type||!r.align||!e.eat(">"))&&(n.context=new t(r.indented,r.column,r.type,r.info,null,r.prev),"operator")},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=T(1),t.tokenize(e,t))}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}}),M("text/x-kotlin",{name:"clike",keywords:a("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam value"),types:a("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:a("catch class do else finally for if where try while enum"),defKeywords:a("class val var object interface fun"),atoms:a("true false null this"),hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},"*":function(e,t){return"."==t.prevToken?"variable":"operator"},'"':function(e,t){return t.tokenize=A(e.match('""')),t.tokenize(e,t)},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=T(1),t.tokenize(e,t))},indent:function(e,t,n,r){var i=n&&n.charAt(0);return"}"!=e.prevToken&&")"!=e.prevToken||""!=n?"operator"==e.prevToken&&"}"!=n&&"}"!=e.context.type||"variable"==e.prevToken&&"."==i||("}"==e.prevToken||")"==e.prevToken)&&"."==i?2*r+t.indented:t.align&&"}"==t.type?t.indented+(e.context.type==(n||"").charAt(0)?0:r):void 0:e.indented}},modeProps:{closeBrackets:{triples:'"'}}}),M(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:a("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:a("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:a("for while do if else struct"),builtin:a("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:a("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":y},modeProps:{fold:["brace","include"]}}),M("text/x-nesc",{name:"clike",keywords:a(l+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:h,blockKeywords:a(g),atoms:a("null true false"),hooks:{"#":y},modeProps:{fold:["brace","include"]}}),M("text/x-objectivec",{name:"clike",keywords:a(l+" "+u),types:m,builtin:a(d),blockKeywords:a(g+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:a(v+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:a("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:x,hooks:{"#":y,"*":b},modeProps:{fold:["brace","include"]}}),M("text/x-objectivec++",{name:"clike",keywords:a(l+" "+u+" "+c),types:m,builtin:a(d),blockKeywords:a(g+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:a(v+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:a("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:x,hooks:{"#":y,"*":b,u:w,U:w,L:w,R:w,0:k,1:k,2:k,3:k,4:k,5:k,6:k,7:k,8:k,9:k,token:function(e,t,n){if("variable"==n&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&_(e.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),M("text/x-squirrel",{name:"clike",keywords:a("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:h,blockKeywords:a("case catch class else for foreach if switch try while"),defKeywords:a("function local class"),typeFirstDefinitions:!0,atoms:a("true false null"),hooks:{"#":y},modeProps:{fold:["brace","include"]}});var O=null;function E(e){return function(t,n){for(var r,i=!1,o=!1;!t.eol();){if(!i&&t.match('"')&&("single"==e||t.match('""'))){o=!0;break}if(!i&&t.match("``")){O=E(e),o=!0;break}r=t.next(),i="single"==e&&!i&&"\\"==r}return o&&(n.tokenize=null),"string"}}M("text/x-ceylon",{name:"clike",keywords:a("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:a("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:a("class dynamic function interface module object package value"),builtin:a("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:a("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=E(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!O||!e.match("`"))&&(t.tokenize=O,O=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,n){if(("variable"==n||"type"==n)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})}(n(5237))},8656(e,t,n){!function(e){"use strict";function t(e){for(var t={},n=0;n<e.length;++n)t[e[n].toLowerCase()]=!0;return t}e.defineMode("css",(function(t,n){var r=n.inline;n.propertyKeywords||(n=e.resolveMode("text/css"));var i,o,a=t.indentUnit,s=n.tokenHooks,l=n.documentTypes||{},c=n.mediaTypes||{},u=n.mediaFeatures||{},d=n.mediaValueKeywords||{},f=n.propertyKeywords||{},p=n.nonStandardPropertyKeywords||{},h=n.fontProperties||{},m=n.counterDescriptors||{},g=n.colorKeywords||{},v=n.valueKeywords||{},y=n.allowNested,b=n.lineComment,x=!0===n.supportsAtComponent,k=!1!==t.highlightNonStandardPropertyKeywords;function w(e,t){return i=t,e}function _(e,t){var n=e.next();if(s[n]){var r=s[n](e,t);if(!1!==r)return r}return"@"==n?(e.eatWhile(/[\w\\\-]/),w("def",e.current())):"="==n||("~"==n||"|"==n)&&e.eat("=")?w(null,"compare"):'"'==n||"'"==n?(t.tokenize=C(n),t.tokenize(e,t)):"#"==n?(e.eatWhile(/[\w\\\-]/),w("atom","hash")):"!"==n?(e.match(/^\s*\w*/),w("keyword","important")):/\d/.test(n)||"."==n&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),w("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?w(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?w("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?w(null,n):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=S),w("variable callee","variable")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),w("property","word")):w(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),w("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?w("variable-2","variable-definition"):w("variable-2","variable")):e.match(/^\w+-/)?w("meta","meta"):void 0}function C(e){return function(t,n){for(var r,i=!1;null!=(r=t.next());){if(r==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==r}return(r==e||!i&&")"!=e)&&(n.tokenize=null),w("string","string")}}function S(e,t){return e.next(),e.match(/^\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=C(")"),w(null,"(")}function M(e,t,n){this.type=e,this.indent=t,this.prev=n}function L(e,t,n,r){return e.context=new M(n,t.indentation()+(!1===r?0:a),e.context),n}function T(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function A(e,t,n){return N[n.context.type](e,t,n)}function O(e,t,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return A(e,t,n)}function E(e){var t=e.current().toLowerCase();o=v.hasOwnProperty(t)?"atom":g.hasOwnProperty(t)?"keyword":"variable"}var N={top:function(e,t,n){if("{"==e)return L(n,t,"block");if("}"==e&&n.context.prev)return T(n);if(x&&/@component/i.test(e))return L(n,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return L(n,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return L(n,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return L(n,t,"at");if("hash"==e)o="builtin";else if("word"==e)o="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return L(n,t,"interpolation");if(":"==e)return"pseudo";if(y&&"("==e)return L(n,t,"parens")}return n.context.type},block:function(e,t,n){if("word"==e){var r=t.current().toLowerCase();return f.hasOwnProperty(r)?(o="property","maybeprop"):p.hasOwnProperty(r)?(o=k?"string-2":"property","maybeprop"):y?(o=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(o+=" error","maybeprop")}return"meta"==e?"block":y||"hash"!=e&&"qualifier"!=e?N.top(e,t,n):(o="error","block")},maybeprop:function(e,t,n){return":"==e?L(n,t,"prop"):A(e,t,n)},prop:function(e,t,n){if(";"==e)return T(n);if("{"==e&&y)return L(n,t,"propBlock");if("}"==e||"{"==e)return O(e,t,n);if("("==e)return L(n,t,"parens");if("hash"!=e||/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(t.current())){if("word"==e)E(t);else if("interpolation"==e)return L(n,t,"interpolation")}else o+=" error";return"prop"},propBlock:function(e,t,n){return"}"==e?T(n):"word"==e?(o="property","maybeprop"):n.context.type},parens:function(e,t,n){return"{"==e||"}"==e?O(e,t,n):")"==e?T(n):"("==e?L(n,t,"parens"):"interpolation"==e?L(n,t,"interpolation"):("word"==e&&E(t),"parens")},pseudo:function(e,t,n){return"meta"==e?"pseudo":"word"==e?(o="variable-3",n.context.type):A(e,t,n)},documentTypes:function(e,t,n){return"word"==e&&l.hasOwnProperty(t.current())?(o="tag",n.context.type):N.atBlock(e,t,n)},atBlock:function(e,t,n){if("("==e)return L(n,t,"atBlock_parens");if("}"==e||";"==e)return O(e,t,n);if("{"==e)return T(n)&&L(n,t,y?"block":"top");if("interpolation"==e)return L(n,t,"interpolation");if("word"==e){var r=t.current().toLowerCase();o="only"==r||"not"==r||"and"==r||"or"==r?"keyword":c.hasOwnProperty(r)?"attribute":u.hasOwnProperty(r)?"property":d.hasOwnProperty(r)?"keyword":f.hasOwnProperty(r)?"property":p.hasOwnProperty(r)?k?"string-2":"property":v.hasOwnProperty(r)?"atom":g.hasOwnProperty(r)?"keyword":"error"}return n.context.type},atComponentBlock:function(e,t,n){return"}"==e?O(e,t,n):"{"==e?T(n)&&L(n,t,y?"block":"top",!1):("word"==e&&(o="error"),n.context.type)},atBlock_parens:function(e,t,n){return")"==e?T(n):"{"==e||"}"==e?O(e,t,n,2):N.atBlock(e,t,n)},restricted_atBlock_before:function(e,t,n){return"{"==e?L(n,t,"restricted_atBlock"):"word"==e&&"@counter-style"==n.stateArg?(o="variable","restricted_atBlock_before"):A(e,t,n)},restricted_atBlock:function(e,t,n){return"}"==e?(n.stateArg=null,T(n)):"word"==e?(o="@font-face"==n.stateArg&&!h.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==n.stateArg&&!m.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,n){return"word"==e?(o="variable","keyframes"):"{"==e?L(n,t,"top"):A(e,t,n)},at:function(e,t,n){return";"==e?T(n):"{"==e||"}"==e?O(e,t,n):("word"==e?o="tag":"hash"==e&&(o="builtin"),"at")},interpolation:function(e,t,n){return"}"==e?T(n):"{"==e||";"==e?O(e,t,n):("word"==e?o="variable":"variable"!=e&&"("!=e&&")"!=e&&(o="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new M(r?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||_)(e,t);return n&&"object"==typeof n&&(i=n[1],n=n[0]),o=n,"comment"!=i&&(t.state=N[t.state](i,e,t)),o},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),i=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(i=Math.max(0,n.indent-a)):i=(n=n.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:b,fold:"brace"}}));var n=["domain","regexp","url","url-prefix"],r=t(n),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=t(i),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],s=t(a),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],c=t(l),u=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],d=t(u),f=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],p=t(f),h=t(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),m=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),g=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],v=t(g),y=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],b=t(y),x=n.concat(i).concat(a).concat(l).concat(u).concat(f).concat(g).concat(y);function k(e,t){for(var n,r=!1;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}e.registerHelper("hintWords","css",x),e.defineMIME("text/css",{documentTypes:r,mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:h,counterDescriptors:m,colorKeywords:v,valueKeywords:b,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=k,k(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:v,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=k,k(e,t)):["operator","operator"]},":":function(e){return!!e.match(/^\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:v,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=k,k(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:o,mediaFeatures:s,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:h,counterDescriptors:m,colorKeywords:v,valueKeywords:b,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=k,k(e,t))}},name:"css",helperType:"gss"})}(n(5237))},9184(e,t,n){!function(e){"use strict";e.defineMode("diff",(function(){var e={"+":"positive","-":"negative","@":"meta"};return{token:function(t){var n=t.string.search(/[\t ]+?$/);if(!t.sol()||0===n)return t.skipToEnd(),("error "+(e[t.string.charAt(0)]||"")).replace(/ $/,"");var r=e[t.peek()]||t.skipToEnd();return-1===n?t.skipToEnd():t.pos=n,r}}})),e.defineMIME("text/x-diff","diff")}(n(5237))},1764(e,t,n){!function(e){"use strict";var t=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?Â«Â»â€œâ€â€˜â€™]))/i;e.defineMode("gfm",(function(n,r){var i=0;function o(e){return e.code=!1,null}var a={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(e){return{code:e.code,codeBlock:e.codeBlock,ateSpace:e.ateSpace}},token:function(e,n){if(n.combineTokens=null,n.codeBlock)return e.match(/^```+/)?(n.codeBlock=!1,null):(e.skipToEnd(),null);if(e.sol()&&(n.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),n.codeBlock=!0,null;if("`"===e.peek()){e.next();var o=e.pos;e.eatWhile("`");var a=1+e.pos-o;return n.code?a===i&&(n.code=!1):(i=a,n.code=!0),null}if(n.code)return e.next(),null;if(e.eatSpace())return n.ateSpace=!0,null;if((e.sol()||n.ateSpace)&&(n.ateSpace=!1,!1!==r.gitHubSpice)){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return n.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return n.combineTokens=!0,"link"}return e.match(t)&&"]("!=e.string.slice(e.start-2,e.start)&&(0==e.start||/\W/.test(e.string.charAt(e.start-1)))?(n.combineTokens=!0,"link"):(e.next(),null)},blankLine:o},s={taskLists:!0,strikethrough:!0,emoji:!0};for(var l in r)s[l]=r[l];return s.name="markdown",e.overlayMode(e.getMode(n,s),a)}),"markdown"),e.defineMIME("text/x-gfm","gfm")}(n(5237),n(7216),n(2580))},2520(e,t,n){!function(e){"use strict";var t={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function n(e,t,n){var r=e.current(),i=r.search(t);return i>-1?e.backUp(r.length-i):r.match(/<\/?$/)&&(e.backUp(r.length),e.match(t,!1)||e.match(r)),n}var r={};function i(e){var t=r[e];return t||(r[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function o(e,t){var n=e.match(i(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function a(e,t){return new RegExp((t?"^":"")+"</\\s*"+e+"\\s*>","i")}function s(e,t){for(var n in e)for(var r=t[n]||(t[n]=[]),i=e[n],o=i.length-1;o>=0;o--)r.unshift(i[o])}function l(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(!r[0]||r[1].test(o(t,r[0])))return r[2]}}e.defineMode("htmlmixed",(function(r,i){var o=e.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:i.multilineTagIndentFactor,multilineTagIndentPastTag:i.multilineTagIndentPastTag,allowMissingTagName:i.allowMissingTagName}),c={},u=i&&i.tags,d=i&&i.scriptTypes;if(s(t,c),u&&s(u,c),d)for(var f=d.length-1;f>=0;f--)c.script.unshift(["type",d[f].matches,d[f].mode]);function p(t,i){var s,u=o.token(t,i.htmlState),d=/\btag\b/.test(u);if(d&&!/[<>\s\/]/.test(t.current())&&(s=i.htmlState.tagName&&i.htmlState.tagName.toLowerCase())&&c.hasOwnProperty(s))i.inTag=s+" ";else if(i.inTag&&d&&/>$/.test(t.current())){var f=/^([\S]+) (.*)/.exec(i.inTag);i.inTag=null;var h=">"==t.current()&&l(c[f[1]],f[2]),m=e.getMode(r,h),g=a(f[1],!0),v=a(f[1],!1);i.token=function(e,t){return e.match(g,!1)?(t.token=p,t.localState=t.localMode=null,null):n(e,v,t.localMode.token(e,t.localState))},i.localMode=m,i.localState=e.startState(m,o.indent(i.htmlState,"",""))}else i.inTag&&(i.inTag+=t.current(),t.eol()&&(i.inTag+=" "));return u}return{startState:function(){return{token:p,inTag:null,localMode:null,localState:null,htmlState:e.startState(o)}},copyState:function(t){var n;return t.localState&&(n=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:n,htmlState:e.copyState(o,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,n,r){return!t.localMode||/^\s*<\//.test(n)?o.indent(t.htmlState,n,r):t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||o}}}}),"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}(n(5237),n(576),n(6792),n(8656))},5618(e,t,n){!function(e){"use strict";e.defineMode("http",(function(){function e(e,t){return e.skipToEnd(),t.cur=a,"error"}function t(t,r){return t.match(/^HTTP\/\d\.\d/)?(r.cur=n,"keyword"):t.match(/^[A-Z]+/)&&/[ \t]/.test(t.peek())?(r.cur=i,"keyword"):e(t,r)}function n(t,n){var i=t.match(/^\d+/);if(!i)return e(t,n);n.cur=r;var o=Number(i[0]);return o>=100&&o<200?"positive informational":o>=200&&o<300?"positive success":o>=300&&o<400?"positive redirect":o>=400&&o<500?"negative client-error":o>=500&&o<600?"negative server-error":"error"}function r(e,t){return e.skipToEnd(),t.cur=a,null}function i(e,t){return e.eatWhile(/\S/),t.cur=o,"string-2"}function o(t,n){return t.match(/^HTTP\/\d\.\d$/)?(n.cur=a,"keyword"):e(t,n)}function a(e){return e.sol()&&!e.eat(/[ \t]/)?e.match(/^.*?:/)?"atom":(e.skipToEnd(),"error"):(e.skipToEnd(),"string")}function s(e){return e.skipToEnd(),null}return{token:function(e,t){var n=t.cur;return n!=a&&n!=s&&e.eatSpace()?null:n(e,t)},blankLine:function(e){e.cur=s},startState:function(){return{cur:t}}}})),e.defineMIME("message/http","http")}(n(5237))},6792(e,t,n){!function(e){"use strict";e.defineMode("javascript",(function(t,n){var r,i,o=t.indentUnit,a=n.statementIndent,s=n.jsonld,l=n.json||s,c=!1!==n.trackScope,u=n.typescript,d=n.wordCharacters||/[\w$\xa1-\uffff]/,f=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("keyword d"),o=e("operator"),a={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:e("new"),delete:r,void:r,throw:r,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:r,export:e("export"),import:e("import"),extends:r,await:r}}(),p=/[+\-*&%=<>!?|~^@]/,h=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function m(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}function g(e,t,n){return r=e,i=n,t}function v(e,t){var n=e.next();if('"'==n||"'"==n)return t.tokenize=y(n),t.tokenize(e,t);if("."==n&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return g("number","number");if("."==n&&e.match(".."))return g("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return g(n);if("="==n&&e.eat(">"))return g("=>","operator");if("0"==n&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return g("number","number");if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),g("number","number");if("/"==n)return e.eat("*")?(t.tokenize=b,b(e,t)):e.eat("/")?(e.skipToEnd(),g("comment","comment")):it(e,t,1)?(m(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),g("regexp","string-2")):(e.eat("="),g("operator","operator",e.current()));if("`"==n)return t.tokenize=x,x(e,t);if("#"==n&&"!"==e.peek())return e.skipToEnd(),g("meta","meta");if("#"==n&&e.eatWhile(d))return g("variable","property");if("<"==n&&e.match("!--")||"-"==n&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),g("comment","comment");if(p.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-|&?]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),"?"==n&&e.eat(".")?g("."):g("operator","operator",e.current());if(d.test(n)){e.eatWhile(d);var r=e.current();if("."!=t.lastType){if(f.propertyIsEnumerable(r)){var i=f[r];return g(i.type,i.style,r)}if("async"==r&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return g("async","keyword",r)}return g("variable","variable",r)}}function y(e){return function(t,n){var r,i=!1;if(s&&"@"==t.peek()&&t.match(h))return n.tokenize=v,g("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=e||i);)i=!i&&"\\"==r;return i||(n.tokenize=v),g("string","string")}}function b(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=v;break}r="*"==n}return g("comment","comment")}function x(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=v;break}r=!r&&"\\"==n}return g("quasi","string-2",e.current())}var k="([{}])";function w(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(u){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,o=!1,a=n-1;a>=0;--a){var s=e.string.charAt(a),l=k.indexOf(s);if(l>=0&&l<3){if(!i){++a;break}if(0==--i){"("==s&&(o=!0);break}}else if(l>=3&&l<6)++i;else if(d.test(s))o=!0;else if(/["'\/`]/.test(s))for(;;--a){if(0==a)return;if(e.string.charAt(a-1)==s&&"\\"!=e.string.charAt(a-2)){a--;break}}else if(o&&!i){++a;break}}o&&!i&&(t.fatArrowAt=a)}}var _={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function C(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function S(e,t){if(!c)return!1;for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return!0}function M(e,t,n,r,i){var o=e.cc;for(L.state=e,L.stream=i,L.marked=null,L.cc=o,L.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():l?U:W)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return L.marked?L.marked:"variable"==n&&S(e,r)?"variable-2":t}}var L={state:null,column:null,marked:null,cc:null};function T(){for(var e=arguments.length-1;e>=0;e--)L.cc.push(arguments[e])}function A(){return T.apply(null,arguments),!0}function O(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function E(e){var t=L.state;if(L.marked="def",c){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var r=N(e,t.context);if(null!=r)return void(t.context=r)}else if(!O(e,t.localVars))return void(t.localVars=new D(e,t.localVars));n.globalVars&&!O(e,t.globalVars)&&(t.globalVars=new D(e,t.globalVars))}}function N(e,t){if(t){if(t.block){var n=N(e,t.prev);return n?n==t.prev?t:new F(n,t.vars,!0):null}return O(e,t.vars)?t:new F(t.prev,new D(e,t.vars),!1)}return null}function P(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function F(e,t,n){this.prev=e,this.vars=t,this.block=n}function D(e,t){this.name=e,this.next=t}var z=new D("this",new D("arguments",null));function I(){L.state.context=new F(L.state.context,L.state.localVars,!1),L.state.localVars=z}function R(){L.state.context=new F(L.state.context,L.state.localVars,!0),L.state.localVars=null}function q(){L.state.localVars=L.state.context.vars,L.state.context=L.state.context.prev}function B(e,t){var n=function(){var n=L.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new C(r,L.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function H(){var e=L.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function j(e){function t(n){return n==e?A():";"==e||"}"==n||")"==n||"]"==n?T():A(t)}return t}function W(e,t){return"var"==e?A(B("vardef",t),Te,j(";"),H):"keyword a"==e?A(B("form"),V,W,H):"keyword b"==e?A(B("form"),W,H):"keyword d"==e?L.stream.match(/^\s*$/,!1)?A():A(B("stat"),X,j(";"),H):"debugger"==e?A(j(";")):"{"==e?A(B("}"),R,fe,H,q):";"==e?A():"if"==e?("else"==L.state.lexical.info&&L.state.cc[L.state.cc.length-1]==H&&L.state.cc.pop()(),A(B("form"),V,W,H,Fe)):"function"==e?A(Re):"for"==e?A(B("form"),R,De,W,q,H):"class"==e||u&&"interface"==t?(L.marked="keyword",A(B("form","class"==e?e:t),We,H)):"variable"==e?u&&"declare"==t?(L.marked="keyword",A(W)):u&&("module"==t||"enum"==t||"type"==t)&&L.stream.match(/^\s*\w/,!1)?(L.marked="keyword","enum"==t?A(tt):"type"==t?A(Be,j("operator"),ve,j(";")):A(B("form"),Ae,j("{"),B("}"),fe,H,H)):u&&"namespace"==t?(L.marked="keyword",A(B("form"),U,W,H)):u&&"abstract"==t?(L.marked="keyword",A(W)):A(B("stat"),oe):"switch"==e?A(B("form"),V,j("{"),B("}","switch"),R,fe,H,H,q):"case"==e?A(U,j(":")):"default"==e?A(j(":")):"catch"==e?A(B("form"),I,K,W,H,q):"export"==e?A(B("stat"),Ve,H):"import"==e?A(B("stat"),Xe,H):"async"==e?A(W):"@"==t?A(U,W):T(B("stat"),U,j(";"),H)}function K(e){if("("==e)return A(He,j(")"))}function U(e,t){return G(e,t,!1)}function $(e,t){return G(e,t,!0)}function V(e){return"("!=e?T():A(B(")"),X,j(")"),H)}function G(e,t,n){if(L.state.fatArrowAt==L.stream.start){var r=n?te:ee;if("("==e)return A(I,B(")"),ue(He,")"),H,j("=>"),r,q);if("variable"==e)return T(I,Ae,j("=>"),r,q)}var i=n?Y:Q;return _.hasOwnProperty(e)?A(i):"function"==e?A(Re,i):"class"==e||u&&"interface"==t?(L.marked="keyword",A(B("form"),je,H)):"keyword c"==e||"async"==e?A(n?$:U):"("==e?A(B(")"),X,j(")"),H,i):"operator"==e||"spread"==e?A(n?$:U):"["==e?A(B("]"),et,H,i):"{"==e?de(se,"}",null,i):"quasi"==e?T(J,i):"new"==e?A(ne(n)):A()}function X(e){return e.match(/[;\}\)\],]/)?T():T(U)}function Q(e,t){return","==e?A(X):Y(e,t,!1)}function Y(e,t,n){var r=0==n?Q:Y,i=0==n?U:$;return"=>"==e?A(I,n?te:ee,q):"operator"==e?/\+\+|--/.test(t)||u&&"!"==t?A(r):u&&"<"==t&&L.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?A(B(">"),ue(ve,">"),H,r):"?"==t?A(U,j(":"),i):A(i):"quasi"==e?T(J,r):";"!=e?"("==e?de($,")","call",r):"."==e?A(ae,r):"["==e?A(B("]"),X,j("]"),H,r):u&&"as"==t?(L.marked="keyword",A(ve,r)):"regexp"==e?(L.state.lastType=L.marked="operator",L.stream.backUp(L.stream.pos-L.stream.start-1),A(i)):void 0:void 0}function J(e,t){return"quasi"!=e?T():"${"!=t.slice(t.length-2)?A(J):A(X,Z)}function Z(e){if("}"==e)return L.marked="string-2",L.state.tokenize=x,A(J)}function ee(e){return w(L.stream,L.state),T("{"==e?W:U)}function te(e){return w(L.stream,L.state),T("{"==e?W:$)}function ne(e){return function(t){return"."==t?A(e?ie:re):"variable"==t&&u?A(Se,e?Y:Q):T(e?$:U)}}function re(e,t){if("target"==t)return L.marked="keyword",A(Q)}function ie(e,t){if("target"==t)return L.marked="keyword",A(Y)}function oe(e){return":"==e?A(H,W):T(Q,j(";"),H)}function ae(e){if("variable"==e)return L.marked="property",A()}function se(e,t){return"async"==e?(L.marked="property",A(se)):"variable"==e||"keyword"==L.style?(L.marked="property","get"==t||"set"==t?A(le):(u&&L.state.fatArrowAt==L.stream.start&&(n=L.stream.match(/^\s*:\s*/,!1))&&(L.state.fatArrowAt=L.stream.pos+n[0].length),A(ce))):"number"==e||"string"==e?(L.marked=s?"property":L.style+" property",A(ce)):"jsonld-keyword"==e?A(ce):u&&P(t)?(L.marked="keyword",A(se)):"["==e?A(U,pe,j("]"),ce):"spread"==e?A($,ce):"*"==t?(L.marked="keyword",A(se)):":"==e?T(ce):void 0;var n}function le(e){return"variable"!=e?T(ce):(L.marked="property",A(Re))}function ce(e){return":"==e?A($):"("==e?T(Re):void 0}function ue(e,t,n){function r(i,o){if(n?n.indexOf(i)>-1:","==i){var a=L.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),A((function(n,r){return n==t||r==t?T():T(e)}),r)}return i==t||o==t?A():n&&n.indexOf(";")>-1?T(e):A(j(t))}return function(n,i){return n==t||i==t?A():T(e,r)}}function de(e,t,n){for(var r=3;r<arguments.length;r++)L.cc.push(arguments[r]);return A(B(t,n),ue(e,t),H)}function fe(e){return"}"==e?A():T(W,fe)}function pe(e,t){if(u){if(":"==e)return A(ve);if("?"==t)return A(pe)}}function he(e,t){if(u&&(":"==e||"in"==t))return A(ve)}function me(e){if(u&&":"==e)return L.stream.match(/^\s*\w+\s+is\b/,!1)?A(U,ge,ve):A(ve)}function ge(e,t){if("is"==t)return L.marked="keyword",A()}function ve(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(L.marked="keyword",A("typeof"==t?$:ve)):"variable"==e||"void"==t?(L.marked="type",A(Ce)):"|"==t||"&"==t?A(ve):"string"==e||"number"==e||"atom"==e?A(Ce):"["==e?A(B("]"),ue(ve,"]",","),H,Ce):"{"==e?A(B("}"),be,H,Ce):"("==e?A(ue(_e,")"),ye,Ce):"<"==e?A(ue(ve,">"),ve):"quasi"==e?T(ke,Ce):void 0}function ye(e){if("=>"==e)return A(ve)}function be(e){return e.match(/[\}\)\]]/)?A():","==e||";"==e?A(be):T(xe,be)}function xe(e,t){return"variable"==e||"keyword"==L.style?(L.marked="property",A(xe)):"?"==t||"number"==e||"string"==e?A(xe):":"==e?A(ve):"["==e?A(j("variable"),he,j("]"),xe):"("==e?T(qe,xe):e.match(/[;\}\)\],]/)?void 0:A()}function ke(e,t){return"quasi"!=e?T():"${"!=t.slice(t.length-2)?A(ke):A(ve,we)}function we(e){if("}"==e)return L.marked="string-2",L.state.tokenize=x,A(ke)}function _e(e,t){return"variable"==e&&L.stream.match(/^\s*[?:]/,!1)||"?"==t?A(_e):":"==e?A(ve):"spread"==e?A(_e):T(ve)}function Ce(e,t){return"<"==t?A(B(">"),ue(ve,">"),H,Ce):"|"==t||"."==e||"&"==t?A(ve):"["==e?A(ve,j("]"),Ce):"extends"==t||"implements"==t?(L.marked="keyword",A(ve)):"?"==t?A(ve,j(":"),ve):void 0}function Se(e,t){if("<"==t)return A(B(">"),ue(ve,">"),H,Ce)}function Me(){return T(ve,Le)}function Le(e,t){if("="==t)return A(ve)}function Te(e,t){return"enum"==t?(L.marked="keyword",A(tt)):T(Ae,pe,Ne,Pe)}function Ae(e,t){return u&&P(t)?(L.marked="keyword",A(Ae)):"variable"==e?(E(t),A()):"spread"==e?A(Ae):"["==e?de(Ee,"]"):"{"==e?de(Oe,"}"):void 0}function Oe(e,t){return"variable"!=e||L.stream.match(/^\s*:/,!1)?("variable"==e&&(L.marked="property"),"spread"==e?A(Ae):"}"==e?T():"["==e?A(U,j("]"),j(":"),Oe):A(j(":"),Ae,Ne)):(E(t),A(Ne))}function Ee(){return T(Ae,Ne)}function Ne(e,t){if("="==t)return A($)}function Pe(e){if(","==e)return A(Te)}function Fe(e,t){if("keyword b"==e&&"else"==t)return A(B("form","else"),W,H)}function De(e,t){return"await"==t?A(De):"("==e?A(B(")"),ze,H):void 0}function ze(e){return"var"==e?A(Te,Ie):"variable"==e?A(Ie):T(Ie)}function Ie(e,t){return")"==e?A():";"==e?A(Ie):"in"==t||"of"==t?(L.marked="keyword",A(U,Ie)):T(U,Ie)}function Re(e,t){return"*"==t?(L.marked="keyword",A(Re)):"variable"==e?(E(t),A(Re)):"("==e?A(I,B(")"),ue(He,")"),H,me,W,q):u&&"<"==t?A(B(">"),ue(Me,">"),H,Re):void 0}function qe(e,t){return"*"==t?(L.marked="keyword",A(qe)):"variable"==e?(E(t),A(qe)):"("==e?A(I,B(")"),ue(He,")"),H,me,q):u&&"<"==t?A(B(">"),ue(Me,">"),H,qe):void 0}function Be(e,t){return"keyword"==e||"variable"==e?(L.marked="type",A(Be)):"<"==t?A(B(">"),ue(Me,">"),H):void 0}function He(e,t){return"@"==t&&A(U,He),"spread"==e?A(He):u&&P(t)?(L.marked="keyword",A(He)):u&&"this"==e?A(pe,Ne):T(Ae,pe,Ne)}function je(e,t){return"variable"==e?We(e,t):Ke(e,t)}function We(e,t){if("variable"==e)return E(t),A(Ke)}function Ke(e,t){return"<"==t?A(B(">"),ue(Me,">"),H,Ke):"extends"==t||"implements"==t||u&&","==e?("implements"==t&&(L.marked="keyword"),A(u?ve:U,Ke)):"{"==e?A(B("}"),Ue,H):void 0}function Ue(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||u&&P(t))&&L.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1)?(L.marked="keyword",A(Ue)):"variable"==e||"keyword"==L.style?(L.marked="property",A($e,Ue)):"number"==e||"string"==e?A($e,Ue):"["==e?A(U,pe,j("]"),$e,Ue):"*"==t?(L.marked="keyword",A(Ue)):u&&"("==e?T(qe,Ue):";"==e||","==e?A(Ue):"}"==e?A():"@"==t?A(U,Ue):void 0}function $e(e,t){if("!"==t)return A($e);if("?"==t)return A($e);if(":"==e)return A(ve,Ne);if("="==t)return A($);var n=L.state.lexical.prev;return T(n&&"interface"==n.info?qe:Re)}function Ve(e,t){return"*"==t?(L.marked="keyword",A(Ze,j(";"))):"default"==t?(L.marked="keyword",A(U,j(";"))):"{"==e?A(ue(Ge,"}"),Ze,j(";")):T(W)}function Ge(e,t){return"as"==t?(L.marked="keyword",A(j("variable"))):"variable"==e?T($,Ge):void 0}function Xe(e){return"string"==e?A():"("==e?T(U):"."==e?T(Q):T(Qe,Ye,Ze)}function Qe(e,t){return"{"==e?de(Qe,"}"):("variable"==e&&E(t),"*"==t&&(L.marked="keyword"),A(Je))}function Ye(e){if(","==e)return A(Qe,Ye)}function Je(e,t){if("as"==t)return L.marked="keyword",A(Qe)}function Ze(e,t){if("from"==t)return L.marked="keyword",A(U)}function et(e){return"]"==e?A():T(ue($,"]"))}function tt(){return T(B("form"),Ae,j("{"),B("}"),ue(nt,"}"),H,H)}function nt(){return T(Ae,Ne)}function rt(e,t){return"operator"==e.lastType||","==e.lastType||p.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function it(e,t,n){return t.tokenize==v&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return I.lex=R.lex=!0,q.lex=!0,H.lex=!0,{startState:function(e){var t={tokenize:v,lastType:"sof",cc:[],lexical:new C((e||0)-o,0,"block",!1),localVars:n.localVars,context:n.localVars&&new F(null,null,!1),indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),w(e,t)),t.tokenize!=b&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==r?n:(t.lastType="operator"!=r||"++"!=i&&"--"!=i?r:"incdec",M(t,n,r,i,e))},indent:function(t,r){if(t.tokenize==b||t.tokenize==x)return e.Pass;if(t.tokenize!=v)return 0;var i,s=r&&r.charAt(0),l=t.lexical;if(!/^\s*else\b/.test(r))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==H)l=l.prev;else if(u!=Fe&&u!=q)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(i=t.cc[t.cc.length-1])&&(i==Q||i==Y)&&!/^[,\.=+\-*:?[\(]/.test(r));)l=l.prev;a&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var d=l.type,f=s==d;return"vardef"==d?l.indented+("operator"==t.lastType||","==t.lastType?l.info.length+1:0):"form"==d&&"{"==s?l.indented:"form"==d?l.indented+o:"stat"==d?l.indented+(rt(t,r)?a||o:0):"switch"!=l.info||f||0==n.doubleIndentSwitch?l.align?l.column+(f?0:1):l.indented+(f?0:o):l.indented+(/^(?:case|default)\b/.test(r)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:s,jsonMode:l,expressionAllowed:it,skipExpression:function(t){M(t,"atom","atom","true",new e.StringStream("",2,null))}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(n(5237))},9160(e,t,n){!function(e){"use strict";function t(e,t,n,r){this.state=e,this.mode=t,this.depth=n,this.prev=r}function n(r){return new t(e.copyState(r.mode,r.state),r.mode,r.depth,r.prev&&n(r.prev))}e.defineMode("jsx",(function(r,i){var o=e.getMode(r,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),a=e.getMode(r,i&&i.base||"javascript");function s(e){var t=e.tagName;e.tagName=null;var n=o.indent(e,"","");return e.tagName=t,n}function l(e,t){return t.context.mode==o?c(e,t,t.context):u(e,t,t.context)}function c(n,i,c){if(2==c.depth)return n.match(/^.*?\*\//)?c.depth=1:n.skipToEnd(),"comment";if("{"==n.peek()){o.skipAttribute(c.state);var u=s(c.state),d=c.state.context;if(d&&n.match(/^[^>]*>\s*$/,!1)){for(;d.prev&&!d.startOfLine;)d=d.prev;d.startOfLine?u-=r.indentUnit:c.prev.state.lexical&&(u=c.prev.state.lexical.indented)}else 1==c.depth&&(u+=r.indentUnit);return i.context=new t(e.startState(a,u),a,0,i.context),null}if(1==c.depth){if("<"==n.peek())return o.skipAttribute(c.state),i.context=new t(e.startState(o,s(c.state)),o,0,i.context),null;if(n.match("//"))return n.skipToEnd(),"comment";if(n.match("/*"))return c.depth=2,l(n,i)}var f,p=o.token(n,c.state),h=n.current();return/\btag\b/.test(p)?/>$/.test(h)?c.state.context?c.depth=0:i.context=i.context.prev:/^</.test(h)&&(c.depth=1):!p&&(f=h.indexOf("{"))>-1&&n.backUp(h.length-f),p}function u(n,r,i){if("<"==n.peek()&&!n.match(/^<([^<>]|<[^>]*>)+,\s*>/,!1)&&a.expressionAllowed(n,i.state))return r.context=new t(e.startState(o,a.indent(i.state,"","")),o,0,r.context),a.skipExpression(i.state),null;var s=a.token(n,i.state);if(!s&&null!=i.depth){var l=n.current();"{"==l?i.depth++:"}"==l&&0==--i.depth&&(r.context=r.context.prev)}return s}return{startState:function(){return{context:new t(e.startState(a),a)}},copyState:function(e){return{context:n(e.context)}},token:l,indent:function(e,t,n){return e.context.mode.indent(e.context.state,t,n)},innerMode:function(e){return e.context}}}),"xml","javascript"),e.defineMIME("text/jsx","jsx"),e.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})}(n(5237),n(576),n(6792))},7216(e,t,n){!function(e){"use strict";e.defineMode("markdown",(function(t,n){var r=e.getMode(t,"text/html"),i="null"==r.name;function o(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return"null"==i.name?null:i}void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.emoji&&(n.emoji=!1),void 0===n.fencedCodeBlockHighlighting&&(n.fencedCodeBlockHighlighting=!0),void 0===n.fencedCodeBlockDefaultMode&&(n.fencedCodeBlockDefaultMode="text/plain"),void 0===n.xml&&(n.xml=!0),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var a={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var s in a)a.hasOwnProperty(s)&&n.tokenTypeOverrides[s]&&(a[s]=n.tokenTypeOverrides[s]);var l=/^([*\-_])(?:\s*\1){2,}\s*$/,c=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,u=/^\[(x| )\](?=\s)/i,d=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,f=/^ {0,3}(?:\={1,}|-{2,})\s*$/,p=/^[^#!\[\]*_\\<>` "'(~:]+/,h=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,m=/^\s*\[[^\]]+?\]:.*$/,g=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,v="    ";function y(e,t,n){return t.f=t.inline=n,n(e,t)}function b(e,t,n){return t.f=t.block=n,n(e,t)}function x(e){return!e||!/\S/.test(e.string)}function k(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==_){var n=i;if(!n){var o=e.innerMode(r,t.htmlState);n="xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText}n&&(t.f=L,t.block=w,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function w(t,r){var i=t.column()===r.indentation,s=x(r.prevLine.stream),p=r.indentedCode,g=r.prevLine.hr,v=!1!==r.list,b=(r.listStack[r.listStack.length-1]||0)+3;r.indentedCode=!1;var k=r.indentation;if(null===r.indentationDiff&&(r.indentationDiff=r.indentation,v)){for(r.list=null;k<r.listStack[r.listStack.length-1];)r.listStack.pop(),r.listStack.length?r.indentation=r.listStack[r.listStack.length-1]:r.list=!1;!1!==r.list&&(r.indentationDiff=k-r.listStack[r.listStack.length-1])}var w=!(s||g||r.prevLine.header||v&&p||r.prevLine.fencedCodeEnd),_=(!1===r.list||g||s)&&r.indentation<=b&&t.match(l),M=null;if(r.indentationDiff>=4&&(p||r.prevLine.fencedCodeEnd||r.prevLine.header||s))return t.skipToEnd(),r.indentedCode=!0,a.code;if(t.eatSpace())return null;if(i&&r.indentation<=b&&(M=t.match(d))&&M[1].length<=6)return r.quote=0,r.header=M[1].length,r.thisLine.header=!0,n.highlightFormatting&&(r.formatting="header"),r.f=r.inline,S(r);if(r.indentation<=b&&t.eat(">"))return r.quote=i?1:r.quote+1,n.highlightFormatting&&(r.formatting="quote"),t.eatSpace(),S(r);if(!_&&!r.setext&&i&&r.indentation<=b&&(M=t.match(c))){var L=M[1]?"ol":"ul";return r.indentation=k+t.current().length,r.list=!0,r.quote=0,r.listStack.push(r.indentation),r.em=!1,r.strong=!1,r.code=!1,r.strikethrough=!1,n.taskLists&&t.match(u,!1)&&(r.taskList=!0),r.f=r.inline,n.highlightFormatting&&(r.formatting=["list","list-"+L]),S(r)}return i&&r.indentation<=b&&(M=t.match(h,!0))?(r.quote=0,r.fencedEndRE=new RegExp(M[1]+"+ *$"),r.localMode=n.fencedCodeBlockHighlighting&&o(M[2]||n.fencedCodeBlockDefaultMode),r.localMode&&(r.localState=e.startState(r.localMode)),r.f=r.block=C,n.highlightFormatting&&(r.formatting="code-block"),r.code=-1,S(r)):r.setext||!(w&&v||r.quote||!1!==r.list||r.code||_||m.test(t.string))&&(M=t.lookAhead(1))&&(M=M.match(f))?(r.setext?(r.header=r.setext,r.setext=0,t.skipToEnd(),n.highlightFormatting&&(r.formatting="header")):(r.header="="==M[0].charAt(0)?1:2,r.setext=r.header),r.thisLine.header=!0,r.f=r.inline,S(r)):_?(t.skipToEnd(),r.hr=!0,r.thisLine.hr=!0,a.hr):"["===t.peek()?y(t,r,N):y(t,r,r.inline)}function _(t,n){var o=r.token(t,n.htmlState);if(!i){var a=e.innerMode(r,n.htmlState);("xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=L,n.block=w,n.htmlState=null)}return o}function C(e,t){var r,i=t.listStack[t.listStack.length-1]||0,o=t.indentation<i,s=i+3;return t.fencedEndRE&&t.indentation<=s&&(o||e.match(t.fencedEndRE))?(n.highlightFormatting&&(t.formatting="code-block"),o||(r=S(t)),t.localMode=t.localState=null,t.block=w,t.f=L,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,o?b(e,t,t.block):r):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),a.code)}function S(e){var t=[];if(e.formatting){t.push(a.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var r=0;r<e.formatting.length;r++)t.push(a.formatting+"-"+e.formatting[r]),"header"===e.formatting[r]&&t.push(a.formatting+"-"+e.formatting[r]+"-"+e.header),"quote"===e.formatting[r]&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(a.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(a.linkHref,"url"):(e.strong&&t.push(a.strong),e.em&&t.push(a.em),e.strikethrough&&t.push(a.strikethrough),e.emoji&&t.push(a.emoji),e.linkText&&t.push(a.linkText),e.code&&t.push(a.code),e.image&&t.push(a.image),e.imageAltText&&t.push(a.imageAltText,"link"),e.imageMarker&&t.push(a.imageMarker)),e.header&&t.push(a.header,a.header+"-"+e.header),e.quote&&(t.push(a.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(a.quote+"-"+e.quote):t.push(a.quote+"-"+n.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1===i?t.push(a.list2):t.push(a.list3):t.push(a.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function M(e,t){if(e.match(p,!0))return S(t)}function L(t,i){var o=i.text(t,i);if(void 0!==o)return o;if(i.list)return i.list=null,S(i);if(i.taskList)return" "===t.match(u,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting="task"),i.taskList=!1,S(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting="header"),S(i);var s=t.next();if(i.linkTitle){i.linkTitle=!1;var l=s;"("===s&&(l=")");var c="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(t.match(new RegExp(c),!0))return a.linkHref}if("`"===s){var d=i.formatting;n.highlightFormatting&&(i.formatting="code"),t.eatWhile("`");var f=t.current().length;if(0!=i.code||i.quote&&1!=f){if(f==i.code){var p=S(i);return i.code=0,p}return i.formatting=d,S(i)}return i.code=f,S(i)}if(i.code)return S(i);if("\\"===s&&(t.next(),n.highlightFormatting)){var h=S(i),m=a.formatting+"-escape";return h?h+" "+m:m}if("!"===s&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,n.highlightFormatting&&(i.formatting="image"),S(i);if("["===s&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,n.highlightFormatting&&(i.formatting="image"),S(i);if("]"===s&&i.imageAltText){n.highlightFormatting&&(i.formatting="image");var h=S(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=A,h}if("["===s&&!i.image)return i.linkText&&t.match(/^.*?\]/)||(i.linkText=!0,n.highlightFormatting&&(i.formatting="link")),S(i);if("]"===s&&i.linkText){n.highlightFormatting&&(i.formatting="link");var h=S(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?A:L,h}if("<"===s&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=T,n.highlightFormatting&&(i.formatting="link"),(h=S(i))?h+=" ":h="",h+a.linkInline;if("<"===s&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=T,n.highlightFormatting&&(i.formatting="link"),(h=S(i))?h+=" ":h="",h+a.linkEmail;if(n.xml&&"<"===s&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var v=t.string.indexOf(">",t.pos);if(-1!=v){var y=t.string.substring(t.start,v);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(y)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(r),b(t,i,_)}if(n.xml&&"<"===s&&t.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===s||"_"===s){for(var x=1,k=1==t.pos?" ":t.string.charAt(t.pos-2);x<3&&t.eat(s);)x++;var w=t.peek()||" ",C=!/\s/.test(w)&&(!g.test(w)||/\s/.test(k)||g.test(k)),M=!/\s/.test(k)&&(!g.test(k)||/\s/.test(w)||g.test(w)),O=null,E=null;if(x%2&&(i.em||!C||"*"!==s&&M&&!g.test(k)?i.em!=s||!M||"*"!==s&&C&&!g.test(w)||(O=!1):O=!0),x>1&&(i.strong||!C||"*"!==s&&M&&!g.test(k)?i.strong!=s||!M||"*"!==s&&C&&!g.test(w)||(E=!1):E=!0),null!=E||null!=O)return n.highlightFormatting&&(i.formatting=null==O?"strong":null==E?"em":"strong em"),!0===O&&(i.em=s),!0===E&&(i.strong=s),p=S(i),!1===O&&(i.em=!1),!1===E&&(i.strong=!1),p}else if(" "===s&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return S(i);t.backUp(1)}if(n.strikethrough)if("~"===s&&t.eatWhile(s)){if(i.strikethrough)return n.highlightFormatting&&(i.formatting="strikethrough"),p=S(i),i.strikethrough=!1,p;if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting="strikethrough"),S(i)}else if(" "===s&&t.match("~~",!0)){if(" "===t.peek())return S(i);t.backUp(2)}if(n.emoji&&":"===s&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,n.highlightFormatting&&(i.formatting="emoji");var N=S(i);return i.emoji=!1,N}return" "===s&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),S(i)}function T(e,t){if(">"===e.next()){t.f=t.inline=L,n.highlightFormatting&&(t.formatting="link");var r=S(t);return r?r+=" ":r="",r+a.linkInline}return e.match(/^[^>]+/,!0),a.linkInline}function A(e,t){if(e.eatSpace())return null;var r=e.next();return"("===r||"["===r?(t.f=t.inline=E("("===r?")":"]"),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,S(t)):"error"}var O={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function E(e){return function(t,r){if(t.next()===e){r.f=r.inline=L,n.highlightFormatting&&(r.formatting="link-string");var i=S(r);return r.linkHref=!1,i}return t.match(O[e]),r.linkHref=!0,S(r)}}function N(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=P,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,S(t)):y(e,t,L)}function P(e,t){if(e.match("]:",!0)){t.f=t.inline=F,n.highlightFormatting&&(t.formatting="link");var r=S(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),a.linkText}function F(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),t.f=t.inline=L,a.linkHref+" url")}var D={startState:function(){return{f:w,prevLine:{stream:null},thisLine:{stream:null},block:w,htmlState:null,indentation:0,inline:L,text:M,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(r,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return k(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=_)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g,v).length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==_?{state:e.htmlState,mode:r}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:D}},indent:function(t,n,i){return t.block==_&&r.indent?r.indent(t.htmlState,n,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,i):e.Pass},blankLine:k,getType:S,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return D}),"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")}(n(5237),n(576),n(2602))},2602(e,t,n){!function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var t=0;t<e.modeInfo.length;t++){var n=e.modeInfo[t];n.mimes&&(n.mime=n.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.mime==t)return r;if(r.mimes)for(var i=0;i<r.mimes.length;i++)if(r.mimes[i]==t)return r}return/\+xml$/.test(t)?e.findModeByMIME("application/xml"):/\+json$/.test(t)?e.findModeByMIME("application/json"):void 0},e.findModeByExtension=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.ext)for(var i=0;i<r.ext.length;i++)if(r.ext[i]==t)return r}},e.findModeByFileName=function(t){for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.file&&r.file.test(t))return r}var i=t.lastIndexOf("."),o=i>-1&&t.substring(i+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.name.toLowerCase()==t)return r;if(r.alias)for(var i=0;i<r.alias.length;i++)if(r.alias[i].toLowerCase()==t)return r}}}(n(5237))},8460(e,t,n){!function(e){"use strict";e.defineMode("nginx",(function(e){function t(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}var n,r=t("break return rewrite set accept_mutex accept_mutex_delay access_log add_after_body add_before_body add_header addition_types aio alias allow ancient_browser ancient_browser_value auth_basic auth_basic_user_file auth_http auth_http_header auth_http_timeout autoindex autoindex_exact_size autoindex_localtime charset charset_types client_body_buffer_size client_body_in_file_only client_body_in_single_buffer client_body_temp_path client_body_timeout client_header_buffer_size client_header_timeout client_max_body_size connection_pool_size create_full_put_path daemon dav_access dav_methods debug_connection debug_points default_type degradation degrade deny devpoll_changes devpoll_events directio directio_alignment empty_gif env epoll_events error_log eventport_events expires fastcgi_bind fastcgi_buffer_size fastcgi_buffers fastcgi_busy_buffers_size fastcgi_cache fastcgi_cache_key fastcgi_cache_methods fastcgi_cache_min_uses fastcgi_cache_path fastcgi_cache_use_stale fastcgi_cache_valid fastcgi_catch_stderr fastcgi_connect_timeout fastcgi_hide_header fastcgi_ignore_client_abort fastcgi_ignore_headers fastcgi_index fastcgi_intercept_errors fastcgi_max_temp_file_size fastcgi_next_upstream fastcgi_param fastcgi_pass_header fastcgi_pass_request_body fastcgi_pass_request_headers fastcgi_read_timeout fastcgi_send_lowat fastcgi_send_timeout fastcgi_split_path_info fastcgi_store fastcgi_store_access fastcgi_temp_file_write_size fastcgi_temp_path fastcgi_upstream_fail_timeout fastcgi_upstream_max_fails flv geoip_city geoip_country google_perftools_profiles gzip gzip_buffers gzip_comp_level gzip_disable gzip_hash gzip_http_version gzip_min_length gzip_no_buffer gzip_proxied gzip_static gzip_types gzip_vary gzip_window if_modified_since ignore_invalid_headers image_filter image_filter_buffer image_filter_jpeg_quality image_filter_transparency imap_auth imap_capabilities imap_client_buffer index ip_hash keepalive_requests keepalive_timeout kqueue_changes kqueue_events large_client_header_buffers limit_conn limit_conn_log_level limit_rate limit_rate_after limit_req limit_req_log_level limit_req_zone limit_zone lingering_time lingering_timeout lock_file log_format log_not_found log_subrequest map_hash_bucket_size map_hash_max_size master_process memcached_bind memcached_buffer_size memcached_connect_timeout memcached_next_upstream memcached_read_timeout memcached_send_timeout memcached_upstream_fail_timeout memcached_upstream_max_fails merge_slashes min_delete_depth modern_browser modern_browser_value msie_padding msie_refresh multi_accept open_file_cache open_file_cache_errors open_file_cache_events open_file_cache_min_uses open_file_cache_valid open_log_file_cache output_buffers override_charset perl perl_modules perl_require perl_set pid pop3_auth pop3_capabilities port_in_redirect postpone_gzipping postpone_output protocol proxy proxy_bind proxy_buffer proxy_buffer_size proxy_buffering proxy_buffers proxy_busy_buffers_size proxy_cache proxy_cache_key proxy_cache_methods proxy_cache_min_uses proxy_cache_path proxy_cache_use_stale proxy_cache_valid proxy_connect_timeout proxy_headers_hash_bucket_size proxy_headers_hash_max_size proxy_hide_header proxy_ignore_client_abort proxy_ignore_headers proxy_intercept_errors proxy_max_temp_file_size proxy_method proxy_next_upstream proxy_pass_error_message proxy_pass_header proxy_pass_request_body proxy_pass_request_headers proxy_read_timeout proxy_redirect proxy_send_lowat proxy_send_timeout proxy_set_body proxy_set_header proxy_ssl_session_reuse proxy_store proxy_store_access proxy_temp_file_write_size proxy_temp_path proxy_timeout proxy_upstream_fail_timeout proxy_upstream_max_fails random_index read_ahead real_ip_header recursive_error_pages request_pool_size reset_timedout_connection resolver resolver_timeout rewrite_log rtsig_overflow_events rtsig_overflow_test rtsig_overflow_threshold rtsig_signo satisfy secure_link_secret send_lowat send_timeout sendfile sendfile_max_chunk server_name_in_redirect server_names_hash_bucket_size server_names_hash_max_size server_tokens set_real_ip_from smtp_auth smtp_capabilities smtp_client_buffer smtp_greeting_delay so_keepalive source_charset ssi ssi_ignore_recycled_buffers ssi_min_file_chunk ssi_silent_errors ssi_types ssi_value_length ssl ssl_certificate ssl_certificate_key ssl_ciphers ssl_client_certificate ssl_crl ssl_dhparam ssl_engine ssl_prefer_server_ciphers ssl_protocols ssl_session_cache ssl_session_timeout ssl_verify_client ssl_verify_depth starttls stub_status sub_filter sub_filter_once sub_filter_types tcp_nodelay tcp_nopush thread_stack_size timeout timer_resolution types_hash_bucket_size types_hash_max_size underscores_in_headers uninitialized_variable_warn use user userid userid_domain userid_expires userid_mark userid_name userid_p3p userid_path userid_service valid_referers variables_hash_bucket_size variables_hash_max_size worker_connections worker_cpu_affinity worker_priority worker_processes worker_rlimit_core worker_rlimit_nofile worker_rlimit_sigpending worker_threads working_directory xclient xml_entities xslt_stylesheet xslt_typesdrew@li229-23"),i=t("http mail events server types location upstream charset_map limit_except if geo map"),o=t("include root server server_name listen internal proxy_pass memcached_pass fastcgi_pass try_files"),a=e.indentUnit;function s(e,t){return n=t,e}function l(e,t){e.eatWhile(/[\w\$_]/);var n=e.current();if(r.propertyIsEnumerable(n))return"keyword";if(i.propertyIsEnumerable(n))return"variable-2";if(o.propertyIsEnumerable(n))return"string-2";var a=e.next();return"@"==a?(e.eatWhile(/[\w\\\-]/),s("meta",e.current())):"/"==a&&e.eat("*")?(t.tokenize=c,c(e,t)):"<"==a&&e.eat("!")?(t.tokenize=u,u(e,t)):"="!=a?"~"!=a&&"|"!=a||!e.eat("=")?'"'==a||"'"==a?(t.tokenize=d(a),t.tokenize(e,t)):"#"==a?(e.skipToEnd(),s("comment","comment")):"!"==a?(e.match(/^\s*\w*/),s("keyword","important")):/\d/.test(a)?(e.eatWhile(/[\w.%]/),s("number","unit")):/[,.+>*\/]/.test(a)?s(null,"select-op"):/[;{}:\[\]]/.test(a)?s(null,a):(e.eatWhile(/[\w\\\-]/),s("variable","variable")):s(null,"compare"):void s(null,"compare")}function c(e,t){for(var n,r=!1;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=l;break}r="*"==n}return s("comment","comment")}function u(e,t){for(var n,r=0;null!=(n=e.next());){if(r>=2&&">"==n){t.tokenize=l;break}r="-"==n?r+1:0}return s("comment","comment")}function d(e){return function(t,n){for(var r,i=!1;null!=(r=t.next())&&(r!=e||i);)i=!i&&"\\"==r;return i||(n.tokenize=l),s("string","string")}}return{startState:function(e){return{tokenize:l,baseIndent:e||0,stack:[]}},token:function(e,t){if(e.eatSpace())return null;n=null;var r=t.tokenize(e,t),i=t.stack[t.stack.length-1];return"hash"==n&&"rule"==i?r="atom":"variable"==r&&("rule"==i?r="number":i&&"@media{"!=i||(r="tag")),"rule"==i&&/^[\{\};]$/.test(n)&&t.stack.pop(),"{"==n?"@media"==i?t.stack[t.stack.length-1]="@media{":t.stack.push("{"):"}"==n?t.stack.pop():"@media"==n?t.stack.push("@media"):"{"==i&&"comment"!=n&&t.stack.push("rule"),r},indent:function(e,t){var n=e.stack.length;return/^\}/.test(t)&&(n-="rule"==e.stack[e.stack.length-1]?2:1),e.baseIndent+n*a},electricChars:"}"}})),e.defineMIME("text/x-nginx-conf","nginx")}(n(5237))},8e3(e,t,n){!function(e){"use strict";function t(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}function n(e,t,i){return 0==e.length?r(t):function(o,a){for(var s=e[0],l=0;l<s.length;l++)if(o.match(s[l][0]))return a.tokenize=n(e.slice(1),t),s[l][1];return a.tokenize=r(t,i),"string"}}function r(e,t){return function(n,r){return i(n,r,e,t)}}function i(e,t,r,i){if(!1!==i&&e.match("${",!1)||e.match("{$",!1))return t.tokenize=null,"string";if(!1!==i&&e.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/))return e.match("[",!1)&&(t.tokenize=n([[["[",null]],[[/\d[\w\.]*/,"number"],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,"variable-2"],[/[\w\$]+/,"variable"]],[["]",null]]],r,i)),e.match(/^->\w/,!1)&&(t.tokenize=n([[["->",null]],[[/[\w]+/,"variable"]]],r,i)),"variable-2";for(var o=!1;!e.eol()&&(o||!1===i||!e.match("{$",!1)&&!e.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!o&&e.match(r)){t.tokenize=null,t.tokStack.pop(),t.tokStack.pop();break}o="\\"==e.next()&&!o}return"string"}var o="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile enum extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally readonly match",a="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",s="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage memory_get_peak_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";e.registerHelper("hintWords","php",[o,a,s].join(" ").split(" ")),e.registerHelper("wordChars","php",/[\w$]/);var l={name:"clike",helperType:"php",keywords:t(o),blockKeywords:t("catch do else elseif for foreach if switch try while finally"),defKeywords:t("class enum function interface namespace trait"),atoms:t(a),builtin:t(s),multiLineStrings:!0,hooks:{$:function(e){return e.eatWhile(/[\w\$_]/),"variable-2"},"<":function(e,t){var n;if(n=e.match(/^<<\s*/)){var i=e.eat(/['"]/);e.eatWhile(/[\w\.]/);var o=e.current().slice(n[0].length+(i?2:1));if(i&&e.eat(i),o)return(t.tokStack||(t.tokStack=[])).push(o,0),t.tokenize=r(o,"'"!=i),"string"}return!1},"#":function(e){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"},"/":function(e){if(e.eat("/")){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"}return!1},'"':function(e,t){return(t.tokStack||(t.tokStack=[])).push('"',0),t.tokenize=r('"'),"string"},"{":function(e,t){return t.tokStack&&t.tokStack.length&&t.tokStack[t.tokStack.length-1]++,!1},"}":function(e,t){return t.tokStack&&t.tokStack.length>0&&! --t.tokStack[t.tokStack.length-1]&&(t.tokenize=r(t.tokStack[t.tokStack.length-2])),!1}}};e.defineMode("php",(function(t,n){var r=e.getMode(t,n&&n.htmlMode||"text/html"),i=e.getMode(t,l);function o(t,n){var o=n.curMode==i;if(t.sol()&&n.pending&&'"'!=n.pending&&"'"!=n.pending&&(n.pending=null),o)return o&&null==n.php.tokenize&&t.match("?>")?(n.curMode=r,n.curState=n.html,n.php.context.prev||(n.php=null),"meta"):i.token(t,n.curState);if(t.match(/^<\?\w*/))return n.curMode=i,n.php||(n.php=e.startState(i,r.indent(n.html,"",""))),n.curState=n.php,"meta";if('"'==n.pending||"'"==n.pending){for(;!t.eol()&&t.next()!=n.pending;);var a="string"}else n.pending&&t.pos<n.pending.end?(t.pos=n.pending.end,a=n.pending.style):a=r.token(t,n.curState);n.pending&&(n.pending=null);var s,l=t.current(),c=l.search(/<\?/);return-1!=c&&("string"==a&&(s=l.match(/[\'\"]$/))&&!/\?>/.test(l)?n.pending=s[0]:n.pending={end:t.pos,style:a},t.backUp(l.length-c)),a}return{startState:function(){var t=e.startState(r),o=n.startOpen?e.startState(i):null;return{html:t,php:o,curMode:n.startOpen?i:r,curState:n.startOpen?o:t,pending:null}},copyState:function(t){var n,o=t.html,a=e.copyState(r,o),s=t.php,l=s&&e.copyState(i,s);return n=t.curMode==r?a:l,{html:a,php:l,curMode:t.curMode,curState:n,pending:t.pending}},token:o,indent:function(e,t,n){return e.curMode!=i&&/^\s*<\//.test(t)||e.curMode==i&&/^\?>/.test(t)?r.indent(e.html,t,n):e.curMode.indent(e.curState,t,n)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(e){return{state:e.curState,mode:e.curMode}}}}),"htmlmixed","clike"),e.defineMIME("application/x-httpd-php","php"),e.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),e.defineMIME("text/x-php",l)}(n(5237),n(2520),n(8712))},7246(e,t,n){!function(e){"use strict";e.defineMode("sass",(function(t){var n=e.mimeModes["text/css"],r=n.propertyKeywords||{},i=n.colorKeywords||{},o=n.valueKeywords||{},a=n.fontProperties||{};function s(e){return new RegExp("^"+e.join("|"))}var l,c=new RegExp("^"+["true","false","null","auto"].join("|")),u=s(["\\(","\\)","=",">","<","==",">=","<=","\\+","-","\\!=","/","\\*","%","and","or","not",";","\\{","\\}",":"]),d=/^::?[a-zA-Z_][\w\-]*/;function f(e){return!e.peek()||e.match(/\s+$/,!1)}function p(e,t){var n=e.peek();return")"===n?(e.next(),t.tokenizer=b,"operator"):"("===n?(e.next(),e.eatSpace(),"operator"):"'"===n||'"'===n?(t.tokenizer=m(e.next()),"string"):(t.tokenizer=m(")",!1),"string")}function h(e,t){return function(n,r){return n.sol()&&n.indentation()<=e?(r.tokenizer=b,b(n,r)):(t&&n.skipTo("*/")?(n.next(),n.next(),r.tokenizer=b):n.skipToEnd(),"comment")}}function m(e,t){function n(r,i){var o=r.next(),a=r.peek(),s=r.string.charAt(r.pos-2);return"\\"!==o&&a===e||o===e&&"\\"!==s?(o!==e&&t&&r.next(),f(r)&&(i.cursorHalf=0),i.tokenizer=b,"string"):"#"===o&&"{"===a?(i.tokenizer=g(n),r.next(),"operator"):"string"}return null==t&&(t=!0),n}function g(e){return function(t,n){return"}"===t.peek()?(t.next(),n.tokenizer=e,"operator"):b(t,n)}}function v(e){if(0==e.indentCount){e.indentCount++;var n=e.scopes[0].offset+t.indentUnit;e.scopes.unshift({offset:n})}}function y(e){1!=e.scopes.length&&e.scopes.shift()}function b(e,t){var n=e.peek();if(e.match("/*"))return t.tokenizer=h(e.indentation(),!0),t.tokenizer(e,t);if(e.match("//"))return t.tokenizer=h(e.indentation(),!1),t.tokenizer(e,t);if(e.match("#{"))return t.tokenizer=g(b),"operator";if('"'===n||"'"===n)return e.next(),t.tokenizer=m(n),"string";if(t.cursorHalf){if("#"===n&&(e.next(),e.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)))return f(e)&&(t.cursorHalf=0),"number";if(e.match(/^-?[0-9\.]+/))return f(e)&&(t.cursorHalf=0),"number";if(e.match(/^(px|em|in)\b/))return f(e)&&(t.cursorHalf=0),"unit";if(e.match(c))return f(e)&&(t.cursorHalf=0),"keyword";if(e.match(/^url/)&&"("===e.peek())return t.tokenizer=p,f(e)&&(t.cursorHalf=0),"atom";if("$"===n)return e.next(),e.eatWhile(/[\w-]/),f(e)&&(t.cursorHalf=0),"variable-2";if("!"===n)return e.next(),t.cursorHalf=0,e.match(/^[\w]+/)?"keyword":"operator";if(e.match(u))return f(e)&&(t.cursorHalf=0),"operator";if(e.eatWhile(/[\w-]/))return f(e)&&(t.cursorHalf=0),l=e.current().toLowerCase(),o.hasOwnProperty(l)?"atom":i.hasOwnProperty(l)?"keyword":r.hasOwnProperty(l)?(t.prevProp=e.current().toLowerCase(),"property"):"tag";if(f(e))return t.cursorHalf=0,null}else{if("-"===n&&e.match(/^-\w+-/))return"meta";if("."===n){if(e.next(),e.match(/^[\w-]+/))return v(t),"qualifier";if("#"===e.peek())return v(t),"tag"}if("#"===n){if(e.next(),e.match(/^[\w-]+/))return v(t),"builtin";if("#"===e.peek())return v(t),"tag"}if("$"===n)return e.next(),e.eatWhile(/[\w-]/),"variable-2";if(e.match(/^-?[0-9\.]+/))return"number";if(e.match(/^(px|em|in)\b/))return"unit";if(e.match(c))return"keyword";if(e.match(/^url/)&&"("===e.peek())return t.tokenizer=p,"atom";if("="===n&&e.match(/^=[\w-]+/))return v(t),"meta";if("+"===n&&e.match(/^\+[\w-]+/))return"variable-3";if("@"===n&&e.match("@extend")&&(e.match(/\s*[\w]/)||y(t)),e.match(/^@(else if|if|media|else|for|each|while|mixin|function)/))return v(t),"def";if("@"===n)return e.next(),e.eatWhile(/[\w-]/),"def";if(e.eatWhile(/[\w-]/)){if(e.match(/ *: *[\w-\+\$#!\("']/,!1)){l=e.current().toLowerCase();var s=t.prevProp+"-"+l;return r.hasOwnProperty(s)?"property":r.hasOwnProperty(l)?(t.prevProp=l,"property"):a.hasOwnProperty(l)?"property":"tag"}return e.match(/ *:/,!1)?(v(t),t.cursorHalf=1,t.prevProp=e.current().toLowerCase(),"property"):(e.match(/ *,/,!1)||v(t),"tag")}if(":"===n)return e.match(d)?"variable-3":(e.next(),t.cursorHalf=1,"operator")}return e.match(u)?"operator":(e.next(),null)}function x(e,n){e.sol()&&(n.indentCount=0);var r=n.tokenizer(e,n),i=e.current();if("@return"!==i&&"}"!==i||y(n),null!==r){for(var o=e.pos-i.length+t.indentUnit*n.indentCount,a=[],s=0;s<n.scopes.length;s++){var l=n.scopes[s];l.offset<=o&&a.push(l)}n.scopes=a}return r}return{startState:function(){return{tokenizer:b,scopes:[{offset:0,type:"sass"}],indentCount:0,cursorHalf:0,definedVars:[],definedMixins:[]}},token:function(e,t){var n=x(e,t);return t.lastToken={style:n,content:e.current()},n},indent:function(e){return e.scopes[0].offset},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"indent"}}),"css"),e.defineMIME("text/x-sass","sass")}(n(5237),n(8656))},3684(e,t,n){!function(e){"use strict";e.defineMode("shell",(function(){var t={};function n(e,n){for(var r=0;r<n.length;r++)t[n[r]]=e}var r=["true","false"],i=["if","then","do","else","elif","while","until","for","in","esac","fi","fin","fil","done","exit","set","unset","export","function"],o=["ab","awk","bash","beep","cat","cc","cd","chown","chmod","chroot","clear","cp","curl","cut","diff","echo","find","gawk","gcc","get","git","grep","hg","kill","killall","ln","ls","make","mkdir","openssl","mv","nc","nl","node","npm","ping","ps","restart","rm","rmdir","sed","service","sh","shopt","shred","source","sort","sleep","ssh","start","stop","su","sudo","svn","tee","telnet","top","touch","vi","vim","wall","wc","wget","who","write","yes","zsh"];function a(e,n){if(e.eatSpace())return null;var r=e.sol(),i=e.next();if("\\"===i)return e.next(),null;if("'"===i||'"'===i||"`"===i)return n.tokens.unshift(s(i,"`"===i?"quote":"string")),d(e,n);if("#"===i)return r&&e.eat("!")?(e.skipToEnd(),"meta"):(e.skipToEnd(),"comment");if("$"===i)return n.tokens.unshift(c),d(e,n);if("+"===i||"="===i)return"operator";if("-"===i)return e.eat("-"),e.eatWhile(/\w/),"attribute";if("<"==i){if(e.match("<<"))return"operator";var o=e.match(/^<-?\s*['"]?([^'"]*)['"]?/);if(o)return n.tokens.unshift(u(o[1])),"string-2"}if(/\d/.test(i)&&(e.eatWhile(/\d/),e.eol()||!/\w/.test(e.peek())))return"number";e.eatWhile(/[\w-]/);var a=e.current();return"="===e.peek()&&/\w+/.test(a)?"def":t.hasOwnProperty(a)?t[a]:null}function s(e,t){var n="("==e?")":"{"==e?"}":e;return function(r,i){for(var o,a=!1;null!=(o=r.next());){if(o===n&&!a){i.tokens.shift();break}if("$"===o&&!a&&"'"!==e&&r.peek()!=n){a=!0,r.backUp(1),i.tokens.unshift(c);break}if(!a&&e!==n&&o===e)return i.tokens.unshift(s(e,t)),d(r,i);if(!a&&/['"]/.test(o)&&!/['"]/.test(e)){i.tokens.unshift(l(o,"string")),r.backUp(1);break}a=!a&&"\\"===o}return t}}function l(e,t){return function(n,r){return r.tokens[0]=s(e,t),n.next(),d(n,r)}}e.registerHelper("hintWords","shell",r.concat(i,o)),n("atom",r),n("keyword",i),n("builtin",o);var c=function(e,t){t.tokens.length>1&&e.eat("$");var n=e.next();return/['"({]/.test(n)?(t.tokens[0]=s(n,"("==n?"quote":"{"==n?"def":"string"),d(e,t)):(/\d/.test(n)||e.eatWhile(/\w/),t.tokens.shift(),"def")};function u(e){return function(t,n){return t.sol()&&t.string==e&&n.tokens.shift(),t.skipToEnd(),"string-2"}}function d(e,t){return(t.tokens[0]||a)(e,t)}return{startState:function(){return{tokens:[]}},token:function(e,t){return d(e,t)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}})),e.defineMIME("text/x-sh","shell"),e.defineMIME("application/x-sh","shell")}(n(5237))},9532(e,t,n){!function(e){"use strict";function t(e){for(var t;null!=(t=e.next());)if("`"==t&&!e.eat("`"))return"variable-2";return e.backUp(e.current().length-1),e.eatWhile(/\w/)?"variable-2":null}function n(e){for(var t;null!=(t=e.next());)if('"'==t&&!e.eat('"'))return"variable-2";return e.backUp(e.current().length-1),e.eatWhile(/\w/)?"variable-2":null}function r(e){return e.eat("@")&&(e.match("session."),e.match("local."),e.match("global.")),e.eat("'")?(e.match(/^.*'/),"variable-2"):e.eat('"')?(e.match(/^.*"/),"variable-2"):e.eat("`")?(e.match(/^.*`/),"variable-2"):e.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function i(e){return e.eat("N")?"atom":e.match(/^[a-zA-Z.#!?]/)?"variable-2":null}e.defineMode("sql",(function(t,n){var r=n.client||{},i=n.atoms||{false:!0,true:!0,null:!0},l=n.builtin||a(s),c=n.keywords||a(o),u=n.operatorChars||/^[*+\-%<>!=&|~^\/]/,d=n.support||{},f=n.hooks||{},p=n.dateSQL||{date:!0,time:!0,timestamp:!0},h=!1!==n.backslashStringEscapes,m=n.brackets||/^[\{}\(\)\[\]]/,g=n.punctuation||/^[;.,:]/;function v(e,t){var n=e.next();if(f[n]){var o=f[n](e,t);if(!1!==o)return o}if(d.hexNumber&&("0"==n&&e.match(/^[xX][0-9a-fA-F]+/)||("x"==n||"X"==n)&&e.match(/^'[0-9a-fA-F]*'/)))return"number";if(d.binaryNumber&&(("b"==n||"B"==n)&&e.match(/^'[01]*'/)||"0"==n&&e.match(/^b[01]+/)))return"number";if(n.charCodeAt(0)>47&&n.charCodeAt(0)<58)return e.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),d.decimallessFloat&&e.match(/^\.(?!\.)/),"number";if("?"==n&&(e.eatSpace()||e.eol()||e.eat(";")))return"variable-3";if("'"==n||'"'==n&&d.doubleQuote)return t.tokenize=y(n),t.tokenize(e,t);if((d.nCharCast&&("n"==n||"N"==n)||d.charsetCast&&"_"==n&&e.match(/[a-z][a-z0-9]*/i))&&("'"==e.peek()||'"'==e.peek()))return"keyword";if(d.escapeConstant&&("e"==n||"E"==n)&&("'"==e.peek()||'"'==e.peek()&&d.doubleQuote))return t.tokenize=function(e,t){return(t.tokenize=y(e.next(),!0))(e,t)},"keyword";if(d.commentSlashSlash&&"/"==n&&e.eat("/"))return e.skipToEnd(),"comment";if(d.commentHash&&"#"==n||"-"==n&&e.eat("-")&&(!d.commentSpaceRequired||e.eat(" ")))return e.skipToEnd(),"comment";if("/"==n&&e.eat("*"))return t.tokenize=b(1),t.tokenize(e,t);if("."!=n){if(u.test(n))return e.eatWhile(u),"operator";if(m.test(n))return"bracket";if(g.test(n))return e.eatWhile(g),"punctuation";if("{"==n&&(e.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||e.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";e.eatWhile(/^[_\w\d]/);var a=e.current().toLowerCase();return p.hasOwnProperty(a)&&(e.match(/^( )+'[^']*'/)||e.match(/^( )+"[^"]*"/))?"number":i.hasOwnProperty(a)?"atom":l.hasOwnProperty(a)?"type":c.hasOwnProperty(a)?"keyword":r.hasOwnProperty(a)?"builtin":null}return d.zerolessFloat&&e.match(/^(?:\d+(?:e[+-]?\d+)?)/i)?"number":e.match(/^\.+/)?null:e.match(/^[\w\d_$#]+/)?"variable-2":void 0}function y(e,t){return function(n,r){for(var i,o=!1;null!=(i=n.next());){if(i==e&&!o){r.tokenize=v;break}o=(h||t)&&!o&&"\\"==i}return"string"}}function b(e){return function(t,n){var r=t.match(/^.*?(\/\*|\*\/)/);return r?"/*"==r[1]?n.tokenize=b(e+1):n.tokenize=e>1?b(e-1):v:t.skipToEnd(),"comment"}}function x(e,t,n){t.context={prev:t.context,indent:e.indentation(),col:e.column(),type:n}}function k(e){e.indent=e.context.indent,e.context=e.context.prev}return{startState:function(){return{tokenize:v,context:null}},token:function(e,t){if(e.sol()&&t.context&&null==t.context.align&&(t.context.align=!1),t.tokenize==v&&e.eatSpace())return null;var n=t.tokenize(e,t);if("comment"==n)return n;t.context&&null==t.context.align&&(t.context.align=!0);var r=e.current();return"("==r?x(e,t,")"):"["==r?x(e,t,"]"):t.context&&t.context.type==r&&k(t),n},indent:function(n,r){var i=n.context;if(!i)return e.Pass;var o=r.charAt(0)==i.type;return i.align?i.col+(o?0:1):i.indent+(o?0:t.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:d.commentSlashSlash?"//":d.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``",config:n}}));var o="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function a(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}var s="bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric";e.defineMIME("text/x-sql",{name:"sql",keywords:a(o+"begin"),builtin:a(s),atoms:a("false true null unknown"),dateSQL:a("date time timestamp"),support:a("doubleQuote binaryNumber hexNumber")}),e.defineMIME("text/x-mssql",{name:"sql",client:a("$partition binary_checksum checksum connectionproperty context_info current_request_id error_line error_message error_number error_procedure error_severity error_state formatmessage get_filestream_transaction_context getansinull host_id host_name isnull isnumeric min_active_rowversion newid newsequentialid rowcount_big xact_state object_id"),keywords:a(o+"begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec go if use index holdlock nolock nowait paglock readcommitted readcommittedlock readpast readuncommitted repeatableread rowlock serializable snapshot tablock tablockx updlock with"),builtin:a("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "),atoms:a("is not null like and or in left right between inner outer join all any some cross unpivot pivot exists"),operatorChars:/^[*+\-%<>!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:a("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":r}}),e.defineMIME("text/x-mysql",{name:"sql",client:a("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:a(o+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:a("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:a("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:a("date time timestamp"),support:a("decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":r,"`":t,"\\":i}}),e.defineMIME("text/x-mariadb",{name:"sql",client:a("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:a(o+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group group_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:a("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:a("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:a("date time timestamp"),support:a("decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":r,"`":t,"\\":i}}),e.defineMIME("text/x-sqlite",{name:"sql",client:a("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:a(o+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:a("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:a("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:a("date time timestamp datetime"),support:a("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":r,":":r,"?":r,$:r,'"':n,"`":t}}),e.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:a("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:a("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:a("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:a("commentSlashSlash decimallessFloat"),hooks:{}}),e.defineMIME("text/x-plsql",{name:"sql",client:a("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:a("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:a("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:a("date time timestamp"),support:a("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),e.defineMIME("text/x-hive",{name:"sql",keywords:a("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:a("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:a("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:a("date timestamp"),support:a("doubleQuote binaryNumber hexNumber")}),e.defineMIME("text/x-pgsql",{name:"sql",client:a("source"),keywords:a(o+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:a("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time zone timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:a("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,identifierQuote:'"',hooks:{'"':n},dateSQL:a("date time timestamp"),support:a("decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),e.defineMIME("text/x-gql",{name:"sql",keywords:a("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:a("false true"),builtin:a("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),e.defineMIME("text/x-gpsql",{name:"sql",client:a("source"),keywords:a("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:a("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:a("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:a("date time timestamp"),support:a("decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),e.defineMIME("text/x-sparksql",{name:"sql",keywords:a("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:a("abs acos acosh add_months aggregate and any approx_count_distinct approx_percentile array array_contains array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_repeat array_sort array_union arrays_overlap arrays_zip ascii asin asinh assert_true atan atan2 atanh avg base64 between bigint bin binary bit_and bit_count bit_get bit_length bit_or bit_xor bool_and bool_or boolean bround btrim cardinality case cast cbrt ceil ceiling char char_length character_length chr coalesce collect_list collect_set concat concat_ws conv corr cos cosh cot count count_if count_min_sketch covar_pop covar_samp crc32 cume_dist current_catalog current_database current_date current_timestamp current_timezone current_user date date_add date_format date_from_unix_date date_part date_sub date_trunc datediff day dayofmonth dayofweek dayofyear decimal decode degrees delimited dense_rank div double e element_at elt encode every exists exp explode explode_outer expm1 extract factorial filter find_in_set first first_value flatten float floor forall format_number format_string from_csv from_json from_unixtime from_utc_timestamp get_json_object getbit greatest grouping grouping_id hash hex hour hypot if ifnull in initcap inline inline_outer input_file_block_length input_file_block_start input_file_name inputformat instr int isnan isnotnull isnull java_method json_array_length json_object_keys json_tuple kurtosis lag last last_day last_value lcase lead least left length levenshtein like ln locate log log10 log1p log2 lower lpad ltrim make_date make_dt_interval make_interval make_timestamp make_ym_interval map map_concat map_entries map_filter map_from_arrays map_from_entries map_keys map_values map_zip_with max max_by md5 mean min min_by minute mod monotonically_increasing_id month months_between named_struct nanvl negative next_day not now nth_value ntile nullif nvl nvl2 octet_length or outputformat overlay parse_url percent_rank percentile percentile_approx pi pmod posexplode posexplode_outer position positive pow power printf quarter radians raise_error rand randn random rank rcfile reflect regexp regexp_extract regexp_extract_all regexp_like regexp_replace repeat replace reverse right rint rlike round row_number rpad rtrim schema_of_csv schema_of_json second sentences sequence sequencefile serde session_window sha sha1 sha2 shiftleft shiftright shiftrightunsigned shuffle sign signum sin sinh size skewness slice smallint some sort_array soundex space spark_partition_id split sqrt stack std stddev stddev_pop stddev_samp str_to_map string struct substr substring substring_index sum tan tanh textfile timestamp timestamp_micros timestamp_millis timestamp_seconds tinyint to_csv to_date to_json to_timestamp to_unix_timestamp to_utc_timestamp transform transform_keys transform_values translate trim trunc try_add try_divide typeof ucase unbase64 unhex uniontype unix_date unix_micros unix_millis unix_seconds unix_timestamp upper uuid var_pop var_samp variance version weekday weekofyear when width_bucket window xpath xpath_boolean xpath_double xpath_float xpath_int xpath_long xpath_number xpath_short xpath_string xxhash64 year zip_with"),atoms:a("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:a("date time timestamp"),support:a("doubleQuote zerolessFloat")}),e.defineMIME("text/x-esper",{name:"sql",client:a("source"),keywords:a("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:a("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:a("time"),support:a("decimallessFloat zerolessFloat binaryNumber hexNumber")}),e.defineMIME("text/x-trino",{name:"sql",keywords:a("abs absent acos add admin after all all_match alter analyze and any any_match approx_distinct approx_most_frequent approx_percentile approx_set arbitrary array_agg array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_sort array_union arrays_overlap as asc asin at at_timezone atan atan2 authorization avg bar bernoulli beta_cdf between bing_tile bing_tile_at bing_tile_coordinates bing_tile_polygon bing_tile_quadkey bing_tile_zoom_level bing_tiles_around bit_count bitwise_and bitwise_and_agg bitwise_left_shift bitwise_not bitwise_or bitwise_or_agg bitwise_right_shift bitwise_right_shift_arithmetic bitwise_xor bool_and bool_or both by call cardinality cascade case cast catalogs cbrt ceil ceiling char2hexint checksum chr classify coalesce codepoint column columns combinations comment commit committed concat concat_ws conditional constraint contains contains_sequence convex_hull_agg copartition corr cos cosh cosine_similarity count count_if covar_pop covar_samp crc32 create cross cube cume_dist current current_catalog current_date current_groups current_path current_role current_schema current_time current_timestamp current_timezone current_user data date_add date_diff date_format date_parse date_trunc day day_of_month day_of_week day_of_year deallocate default define definer degrees delete dense_rank deny desc describe descriptor distinct distributed dow doy drop e element_at else empty empty_approx_set encoding end error escape evaluate_classifier_predictions every except excluding execute exists exp explain extract false features fetch filter final first first_value flatten floor following for format format_datetime format_number from from_base from_base32 from_base64 from_base64url from_big_endian_32 from_big_endian_64 from_encoded_polyline from_geojson_geometry from_hex from_ieee754_32 from_ieee754_64 from_iso8601_date from_iso8601_timestamp from_iso8601_timestamp_nanos from_unixtime from_unixtime_nanos from_utf8 full functions geometric_mean geometry_from_hadoop_shape geometry_invalid_reason geometry_nearest_points geometry_to_bing_tiles geometry_union geometry_union_agg grant granted grants graphviz great_circle_distance greatest group grouping groups hamming_distance hash_counts having histogram hmac_md5 hmac_sha1 hmac_sha256 hmac_sha512 hour human_readable_seconds if ignore in including index infinity initial inner input insert intersect intersection_cardinality into inverse_beta_cdf inverse_normal_cdf invoker io is is_finite is_infinite is_json_scalar is_nan isolation jaccard_index join json_array json_array_contains json_array_get json_array_length json_exists json_extract json_extract_scalar json_format json_object json_parse json_query json_size json_value keep key keys kurtosis lag last last_day_of_month last_value lateral lead leading learn_classifier learn_libsvm_classifier learn_libsvm_regressor learn_regressor least left length level levenshtein_distance like limit line_interpolate_point line_interpolate_points line_locate_point listagg ln local localtime localtimestamp log log10 log2 logical lower lpad ltrim luhn_check make_set_digest map_agg map_concat map_entries map_filter map_from_entries map_keys map_union map_values map_zip_with match match_recognize matched matches materialized max max_by md5 measures merge merge_set_digest millisecond min min_by minute mod month multimap_agg multimap_from_entries murmur3 nan natural next nfc nfd nfkc nfkd ngrams no none none_match normal_cdf normalize not now nth_value ntile null nullif nulls numeric_histogram object objectid_timestamp of offset omit on one only option or order ordinality outer output over overflow parse_data_size parse_datetime parse_duration partition partitions passing past path pattern per percent_rank permute pi position pow power preceding prepare privileges properties prune qdigest_agg quarter quotes radians rand random range rank read recursive reduce reduce_agg refresh regexp_count regexp_extract regexp_extract_all regexp_like regexp_position regexp_replace regexp_split regr_intercept regr_slope regress rename render repeat repeatable replace reset respect restrict returning reverse revoke rgb right role roles rollback rollup round row_number rows rpad rtrim running scalar schema schemas second security seek select sequence serializable session set sets sha1 sha256 sha512 show shuffle sign simplify_geometry sin skewness skip slice some soundex spatial_partitioning spatial_partitions split split_part split_to_map split_to_multimap spooky_hash_v2_32 spooky_hash_v2_64 sqrt st_area st_asbinary st_astext st_boundary st_buffer st_centroid st_contains st_convexhull st_coorddim st_crosses st_difference st_dimension st_disjoint st_distance st_endpoint st_envelope st_envelopeaspts st_equals st_exteriorring st_geometries st_geometryfromtext st_geometryn st_geometrytype st_geomfrombinary st_interiorringn st_interiorrings st_intersection st_intersects st_isclosed st_isempty st_isring st_issimple st_isvalid st_length st_linefromtext st_linestring st_multipoint st_numgeometries st_numinteriorring st_numpoints st_overlaps st_point st_pointn st_points st_polygon st_relate st_startpoint st_symdifference st_touches st_union st_within st_x st_xmax st_xmin st_y st_ymax st_ymin start starts_with stats stddev stddev_pop stddev_samp string strpos subset substr substring sum system table tables tablesample tan tanh tdigest_agg text then ties timestamp_objectid timezone_hour timezone_minute to to_base to_base32 to_base64 to_base64url to_big_endian_32 to_big_endian_64 to_char to_date to_encoded_polyline to_geojson_geometry to_geometry to_hex to_ieee754_32 to_ieee754_64 to_iso8601 to_milliseconds to_spherical_geography to_timestamp to_unixtime to_utf8 trailing transaction transform transform_keys transform_values translate trim trim_array true truncate try try_cast type typeof uescape unbounded uncommitted unconditional union unique unknown unmatched unnest update upper url_decode url_encode url_extract_fragment url_extract_host url_extract_parameter url_extract_path url_extract_port url_extract_protocol url_extract_query use user using utf16 utf32 utf8 validate value value_at_quantile values values_at_quantiles var_pop var_samp variance verbose version view week week_of_year when where width_bucket wilson_interval_lower wilson_interval_upper window with with_timezone within without word_stem work wrapper write xxhash64 year year_of_week yow zip zip_with"),builtin:a("array bigint bingtile boolean char codepoints color date decimal double function geometry hyperloglog int integer interval ipaddress joniregexp json json2016 jsonpath kdbtree likepattern map model objectid p4hyperloglog precision qdigest re2jregexp real regressor row setdigest smallint sphericalgeography tdigest time timestamp tinyint uuid varbinary varchar zone"),atoms:a("false true null unknown"),operatorChars:/^[[\]|<>=!\-+*/%]/,dateSQL:a("date time timestamp zone"),support:a("decimallessFloat zerolessFloat hexNumber")})}(n(5237))},576(e,t,n){!function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(r,i){var o,a,s=r.indentUnit,l={},c=i.htmlMode?t:n;for(var u in c)l[u]=c[u];for(var u in i)l[u]=i[u];function d(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(h("atom","]]>")):null:e.match("--")?n(h("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(m(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=h("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=f,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function f(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=d,o=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return o="equals",null;if("<"==n){t.tokenize=d,t.state=x,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=p(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function p(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=f;break}return"string"};return t.isInAttribute=!0,t}function h(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=d;break}n.next()}return e}}function m(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=m(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=d;break}return n.tokenize=m(e-1),n.tokenize(t,n)}}return"meta"}}function g(e){return e&&e.toLowerCase()}function v(e,t,n){this.prev=e.context,this.tagName=t||"",this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function y(e){e.context&&(e.context=e.context.prev)}function b(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(g(n))||!l.contextGrabbers[g(n)].hasOwnProperty(g(t)))return;y(e)}}function x(e,t,n){return"openTag"==e?(n.tagStart=t.column(),k):"closeTag"==e?w:x}function k(e,t,n){return"word"==e?(n.tagName=t.current(),a="tag",S):l.allowMissingTagName&&"endTag"==e?(a="tag bracket",S(e,t,n)):(a="error",k)}function w(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(g(n.context.tagName))&&y(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(a="tag",_):(a="tag error",C)}return l.allowMissingTagName&&"endTag"==e?(a="tag bracket",_(e,t,n)):(a="error",C)}function _(e,t,n){return"endTag"!=e?(a="error",_):(y(n),x)}function C(e,t,n){return a="error",_(e,t,n)}function S(e,t,n){if("word"==e)return a="attribute",M;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(g(r))?b(n,r):(b(n,r),n.context=new v(n,r,i==n.indented)),x}return a="error",S}function M(e,t,n){return"equals"==e?L:(l.allowMissing||(a="error"),S(e,t,n))}function L(e,t,n){return"string"==e?T:"word"==e&&l.allowUnquoted?(a="string",S):(a="error",S(e,t,n))}function T(e,t,n){return"string"==e?T:S(e,t,n)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:x,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var n=t.tokenize(e,t);return(n||o)&&"comment"!=n&&(a=null,t.state=t.state(o||n,e,t),a&&(n="error"==a?n+" error":a)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=f&&t.tokenize!=d)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var o=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(o&&o[1])for(;i;){if(i.tagName==o[2]){i=i.prev;break}if(!l.implicitlyClosed.hasOwnProperty(g(i.tagName)))break;i=i.prev}else if(o)for(;i;){var a=l.contextGrabbers[g(i.tagName)];if(!a||!a.hasOwnProperty(g(o[2])))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+s:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==L&&(e.state=S)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(5237))},496(e,t,n){!function(e){"use strict";e.defineMode("yaml",(function(){var e=new RegExp("\\b(("+["true","false","on","off","yes","no"].join(")|(")+"))$","i");return{token:function(t,n){var r=t.peek(),i=n.escaped;if(n.escaped=!1,"#"==r&&(0==t.pos||/\s/.test(t.string.charAt(t.pos-1))))return t.skipToEnd(),"comment";if(t.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(n.literal&&t.indentation()>n.keyCol)return t.skipToEnd(),"string";if(n.literal&&(n.literal=!1),t.sol()){if(n.keyCol=0,n.pair=!1,n.pairStart=!1,t.match("---"))return"def";if(t.match("..."))return"def";if(t.match(/\s*-\s+/))return"meta"}if(t.match(/^(\{|\}|\[|\])/))return"{"==r?n.inlinePairs++:"}"==r?n.inlinePairs--:"["==r?n.inlineList++:n.inlineList--,"meta";if(n.inlineList>0&&!i&&","==r)return t.next(),"meta";if(n.inlinePairs>0&&!i&&","==r)return n.keyCol=0,n.pair=!1,n.pairStart=!1,t.next(),"meta";if(n.pairStart){if(t.match(/^\s*(\||\>)\s*/))return n.literal=!0,"meta";if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(0==n.inlinePairs&&t.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(n.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(t.match(e))return"keyword"}return!n.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^\s,\[\]{}#&*!|>'"%@`])[^#:]*(?=:($|\s))/)?(n.pair=!0,n.keyCol=t.indentation(),"atom"):n.pair&&t.match(/^:\s*/)?(n.pairStart=!0,"meta"):(n.pairStart=!1,n.escaped="\\"==r,t.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}})),e.defineMIME("text/x-yaml","yaml"),e.defineMIME("text/yaml","yaml")}(n(5237))},6899(e){"use strict";e.exports=window.HTMLHint}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=n(5237),t=n.n(e);n(3944),n(8208),n(1275),n(9751),n(6564),n(2927),n(9935),n(5489),n(9102),n(149),n(1561),n(9279),n(6015);function r(e){const t={};return"implied"===e.strict&&(t.impliedStrict=!0),{ecmaVersion:i(e),sourceType:e.module?"module":"script",ecmaFeatures:t}}function i(e){return e.esversion?e.esversion:e.es5?5:e.es3?3:"latest"}t().registerHelper("lint","javascript",(async function(e,n){if(!n.espreeModuleUrl)return[];const i=[];try{(await import(n.espreeModuleUrl)).parse(e,{...r(n),loc:!0})}catch(e){const n=e;if(e instanceof SyntaxError&&"number"==typeof n.lineNumber&&"number"==typeof n.column){const r=n.lineNumber-1;i.push({message:e.message,severity:"error",from:t().Pos(r,n.column-1),to:t().Pos(r,n.column)})}else console.warn("[CodeMirror] Unable to lint JavaScript:",e)}return i}));n(2154),n(7829),n(998),n(6753),n(2580),n(5218),n(2819),n(7382),n(7923),n(115),n(4317),n(8527),n(6865),n(7374),n(9981),n(202),n(8586),n(795),n(9257),n(8948),n(1274),n(1802),n(5231),n(1909),n(4285),n(7340),n(4856),n(7453),n(1660),n(4089),n(3004),n(6272),n(5841),n(6895),n(8820),n(6700),n(6685),n(3653),n(6666),n(7604),n(3874),n(436),n(9533),n(6209),n(2602),n(8712),n(8656),n(9184),n(2520),n(5618),n(6792),n(9160),n(7216),n(1764),n(8460),n(8e3),n(7246),n(3684),n(9532),n(576),n(496);window.wp||(window.wp={}),window.wp.CodeMirror=t()})()})();                                                                                                                                                                                                                                                                                                                                                                                                          codemirror/csslint.js                                                                               0000644                 00001332364 15212563753 0010753 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
CSSLint v1.0.4
Copyright (c) 2016 Nicole Sullivan and Nicholas C. Zakas. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the 'Software'), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

*/

var CSSLint = (function(){
  var module = module || {},
      exports = exports || {};

/*!
Parser-Lib
Copyright (c) 2009-2016 Nicholas C. Zakas. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/* Version v1.1.0, Build time: 6-December-2016 10:31:29 */
var parserlib = (function () {
var require;
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
"use strict";

/* exported Colors */

var Colors = module.exports = {
    __proto__       :null,
    aliceblue       :"#f0f8ff",
    antiquewhite    :"#faebd7",
    aqua            :"#00ffff",
    aquamarine      :"#7fffd4",
    azure           :"#f0ffff",
    beige           :"#f5f5dc",
    bisque          :"#ffe4c4",
    black           :"#000000",
    blanchedalmond  :"#ffebcd",
    blue            :"#0000ff",
    blueviolet      :"#8a2be2",
    brown           :"#a52a2a",
    burlywood       :"#deb887",
    cadetblue       :"#5f9ea0",
    chartreuse      :"#7fff00",
    chocolate       :"#d2691e",
    coral           :"#ff7f50",
    cornflowerblue  :"#6495ed",
    cornsilk        :"#fff8dc",
    crimson         :"#dc143c",
    cyan            :"#00ffff",
    darkblue        :"#00008b",
    darkcyan        :"#008b8b",
    darkgoldenrod   :"#b8860b",
    darkgray        :"#a9a9a9",
    darkgrey        :"#a9a9a9",
    darkgreen       :"#006400",
    darkkhaki       :"#bdb76b",
    darkmagenta     :"#8b008b",
    darkolivegreen  :"#556b2f",
    darkorange      :"#ff8c00",
    darkorchid      :"#9932cc",
    darkred         :"#8b0000",
    darksalmon      :"#e9967a",
    darkseagreen    :"#8fbc8f",
    darkslateblue   :"#483d8b",
    darkslategray   :"#2f4f4f",
    darkslategrey   :"#2f4f4f",
    darkturquoise   :"#00ced1",
    darkviolet      :"#9400d3",
    deeppink        :"#ff1493",
    deepskyblue     :"#00bfff",
    dimgray         :"#696969",
    dimgrey         :"#696969",
    dodgerblue      :"#1e90ff",
    firebrick       :"#b22222",
    floralwhite     :"#fffaf0",
    forestgreen     :"#228b22",
    fuchsia         :"#ff00ff",
    gainsboro       :"#dcdcdc",
    ghostwhite      :"#f8f8ff",
    gold            :"#ffd700",
    goldenrod       :"#daa520",
    gray            :"#808080",
    grey            :"#808080",
    green           :"#008000",
    greenyellow     :"#adff2f",
    honeydew        :"#f0fff0",
    hotpink         :"#ff69b4",
    indianred       :"#cd5c5c",
    indigo          :"#4b0082",
    ivory           :"#fffff0",
    khaki           :"#f0e68c",
    lavender        :"#e6e6fa",
    lavenderblush   :"#fff0f5",
    lawngreen       :"#7cfc00",
    lemonchiffon    :"#fffacd",
    lightblue       :"#add8e6",
    lightcoral      :"#f08080",
    lightcyan       :"#e0ffff",
    lightgoldenrodyellow  :"#fafad2",
    lightgray       :"#d3d3d3",
    lightgrey       :"#d3d3d3",
    lightgreen      :"#90ee90",
    lightpink       :"#ffb6c1",
    lightsalmon     :"#ffa07a",
    lightseagreen   :"#20b2aa",
    lightskyblue    :"#87cefa",
    lightslategray  :"#778899",
    lightslategrey  :"#778899",
    lightsteelblue  :"#b0c4de",
    lightyellow     :"#ffffe0",
    lime            :"#00ff00",
    limegreen       :"#32cd32",
    linen           :"#faf0e6",
    magenta         :"#ff00ff",
    maroon          :"#800000",
    mediumaquamarine:"#66cdaa",
    mediumblue      :"#0000cd",
    mediumorchid    :"#ba55d3",
    mediumpurple    :"#9370d8",
    mediumseagreen  :"#3cb371",
    mediumslateblue :"#7b68ee",
    mediumspringgreen   :"#00fa9a",
    mediumturquoise :"#48d1cc",
    mediumvioletred :"#c71585",
    midnightblue    :"#191970",
    mintcream       :"#f5fffa",
    mistyrose       :"#ffe4e1",
    moccasin        :"#ffe4b5",
    navajowhite     :"#ffdead",
    navy            :"#000080",
    oldlace         :"#fdf5e6",
    olive           :"#808000",
    olivedrab       :"#6b8e23",
    orange          :"#ffa500",
    orangered       :"#ff4500",
    orchid          :"#da70d6",
    palegoldenrod   :"#eee8aa",
    palegreen       :"#98fb98",
    paleturquoise   :"#afeeee",
    palevioletred   :"#d87093",
    papayawhip      :"#ffefd5",
    peachpuff       :"#ffdab9",
    peru            :"#cd853f",
    pink            :"#ffc0cb",
    plum            :"#dda0dd",
    powderblue      :"#b0e0e6",
    purple          :"#800080",
    red             :"#ff0000",
    rosybrown       :"#bc8f8f",
    royalblue       :"#4169e1",
    saddlebrown     :"#8b4513",
    salmon          :"#fa8072",
    sandybrown      :"#f4a460",
    seagreen        :"#2e8b57",
    seashell        :"#fff5ee",
    sienna          :"#a0522d",
    silver          :"#c0c0c0",
    skyblue         :"#87ceeb",
    slateblue       :"#6a5acd",
    slategray       :"#708090",
    slategrey       :"#708090",
    snow            :"#fffafa",
    springgreen     :"#00ff7f",
    steelblue       :"#4682b4",
    tan             :"#d2b48c",
    teal            :"#008080",
    thistle         :"#d8bfd8",
    tomato          :"#ff6347",
    turquoise       :"#40e0d0",
    violet          :"#ee82ee",
    wheat           :"#f5deb3",
    white           :"#ffffff",
    whitesmoke      :"#f5f5f5",
    yellow          :"#ffff00",
    yellowgreen     :"#9acd32",
    //'currentColor' color keyword https://www.w3.org/TR/css3-color/#currentcolor
    currentColor        :"The value of the 'color' property.",
    //CSS2 system colors https://www.w3.org/TR/css3-color/#css2-system
    activeBorder        :"Active window border.",
    activecaption       :"Active window caption.",
    appworkspace        :"Background color of multiple document interface.",
    background          :"Desktop background.",
    buttonface          :"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border.",
    buttonhighlight     :"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border.",
    buttonshadow        :"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border.",
    buttontext          :"Text on push buttons.",
    captiontext         :"Text in caption, size box, and scrollbar arrow box.",
    graytext            :"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.",
    greytext            :"Greyed (disabled) text. This color is set to #000 if the current display driver does not support a solid grey color.",
    highlight           :"Item(s) selected in a control.",
    highlighttext       :"Text of item(s) selected in a control.",
    inactiveborder      :"Inactive window border.",
    inactivecaption     :"Inactive window caption.",
    inactivecaptiontext :"Color of text in an inactive caption.",
    infobackground      :"Background color for tooltip controls.",
    infotext            :"Text color for tooltip controls.",
    menu                :"Menu background.",
    menutext            :"Text in menus.",
    scrollbar           :"Scroll bar gray area.",
    threeddarkshadow    :"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",
    threedface          :"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",
    threedhighlight     :"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",
    threedlightshadow   :"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",
    threedshadow        :"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",
    window              :"Window background.",
    windowframe         :"Window frame.",
    windowtext          :"Text in windows."
};

},{}],2:[function(require,module,exports){
"use strict";

module.exports = Combinator;

var SyntaxUnit = require("../util/SyntaxUnit");

var Parser = require("./Parser");

/**
 * Represents a selector combinator (whitespace, +, >).
 * @namespace parserlib.css
 * @class Combinator
 * @extends parserlib.util.SyntaxUnit
 * @constructor
 * @param {String} text The text representation of the unit.
 * @param {int} line The line of text on which the unit resides.
 * @param {int} col The column of text on which the unit resides.
 */
function Combinator(text, line, col) {

    SyntaxUnit.call(this, text, line, col, Parser.COMBINATOR_TYPE);

    /**
     * The type of modifier.
     * @type String
     * @property type
     */
    this.type = "unknown";

    //pretty simple
    if (/^\s+$/.test(text)) {
        this.type = "descendant";
    } else if (text === ">") {
        this.type = "child";
    } else if (text === "+") {
        this.type = "adjacent-sibling";
    } else if (text === "~") {
        this.type = "sibling";
    }

}

Combinator.prototype = new SyntaxUnit();
Combinator.prototype.constructor = Combinator;


},{"../util/SyntaxUnit":26,"./Parser":6}],3:[function(require,module,exports){
"use strict";

module.exports = Matcher;

var StringReader = require("../util/StringReader");
var SyntaxError = require("../util/SyntaxError");

/**
 * This class implements a combinator library for matcher functions.
 * The combinators are described at:
 * https://developer.mozilla.org/en-US/docs/Web/CSS/Value_definition_syntax#Component_value_combinators
 */
function Matcher(matchFunc, toString) {
    this.match = function(expression) {
        // Save/restore marks to ensure that failed matches always restore
        // the original location in the expression.
        var result;
        expression.mark();
        result = matchFunc(expression);
        if (result) {
            expression.drop();
        } else {
            expression.restore();
        }
        return result;
    };
    this.toString = typeof toString === "function" ? toString : function() {
        return toString;
    };
}

/** Precedence table of combinators. */
Matcher.prec = {
    MOD:    5,
    SEQ:    4,
    ANDAND: 3,
    OROR:   2,
    ALT:    1
};

/** Simple recursive-descent grammar to build matchers from strings. */
Matcher.parse = function(str) {
    var reader, eat, expr, oror, andand, seq, mod, term, result;
    reader = new StringReader(str);
    eat = function(matcher) {
        var result = reader.readMatch(matcher);
        if (result === null) {
            throw new SyntaxError(
                "Expected "+matcher, reader.getLine(), reader.getCol());
        }
        return result;
    };
    expr = function() {
        // expr = oror (" | " oror)*
        var m = [ oror() ];
        while (reader.readMatch(" | ") !== null) {
            m.push(oror());
        }
        return m.length === 1 ? m[0] : Matcher.alt.apply(Matcher, m);
    };
    oror = function() {
        // oror = andand ( " || " andand)*
        var m = [ andand() ];
        while (reader.readMatch(" || ") !== null) {
            m.push(andand());
        }
        return m.length === 1 ? m[0] : Matcher.oror.apply(Matcher, m);
    };
    andand = function() {
        // andand = seq ( " && " seq)*
        var m = [ seq() ];
        while (reader.readMatch(" && ") !== null) {
            m.push(seq());
        }
        return m.length === 1 ? m[0] : Matcher.andand.apply(Matcher, m);
    };
    seq = function() {
        // seq = mod ( " " mod)*
        var m = [ mod() ];
        while (reader.readMatch(/^ (?![&|\]])/) !== null) {
            m.push(mod());
        }
        return m.length === 1 ? m[0] : Matcher.seq.apply(Matcher, m);
    };
    mod = function() {
        // mod = term ( "?" | "*" | "+" | "#" | "{<num>,<num>}" )?
        var m = term();
        if (reader.readMatch("?") !== null) {
            return m.question();
        } else if (reader.readMatch("*") !== null) {
            return m.star();
        } else if (reader.readMatch("+") !== null) {
            return m.plus();
        } else if (reader.readMatch("#") !== null) {
            return m.hash();
        } else if (reader.readMatch(/^\{\s*/) !== null) {
            var min = eat(/^\d+/);
            eat(/^\s*,\s*/);
            var max = eat(/^\d+/);
            eat(/^\s*\}/);
            return m.braces(+min, +max);
        }
        return m;
    };
    term = function() {
        // term = <nt> | literal | "[ " expression " ]"
        if (reader.readMatch("[ ") !== null) {
            var m = expr();
            eat(" ]");
            return m;
        }
        return Matcher.fromType(eat(/^[^ ?*+#{]+/));
    };
    result = expr();
    if (!reader.eof()) {
        throw new SyntaxError(
            "Expected end of string", reader.getLine(), reader.getCol());
    }
    return result;
};

/**
 * Convert a string to a matcher (parsing simple alternations),
 * or do nothing if the argument is already a matcher.
 */
Matcher.cast = function(m) {
    if (m instanceof Matcher) {
        return m;
    }
    return Matcher.parse(m);
};

/**
 * Create a matcher for a single type.
 */
Matcher.fromType = function(type) {
    // Late require of ValidationTypes to break a dependency cycle.
    var ValidationTypes = require("./ValidationTypes");
    return new Matcher(function(expression) {
        return expression.hasNext() && ValidationTypes.isType(expression, type);
    }, type);
};

/**
 * Create a matcher for one or more juxtaposed words, which all must
 * occur, in the given order.
 */
Matcher.seq = function() {
    var ms = Array.prototype.slice.call(arguments).map(Matcher.cast);
    if (ms.length === 1) {
        return ms[0];
    }
    return new Matcher(function(expression) {
        var i, result = true;
        for (i = 0; result && i < ms.length; i++) {
            result = ms[i].match(expression);
        }
        return result;
    }, function(prec) {
        var p = Matcher.prec.SEQ;
        var s = ms.map(function(m) {
            return m.toString(p);
        }).join(" ");
        if (prec > p) {
            s = "[ " + s + " ]";
        }
        return s;
    });
};

/**
 * Create a matcher for one or more alternatives, where exactly one
 * must occur.
 */
Matcher.alt = function() {
    var ms = Array.prototype.slice.call(arguments).map(Matcher.cast);
    if (ms.length === 1) {
        return ms[0];
    }
    return new Matcher(function(expression) {
        var i, result = false;
        for (i = 0; !result && i < ms.length; i++) {
            result = ms[i].match(expression);
        }
        return result;
    }, function(prec) {
        var p = Matcher.prec.ALT;
        var s = ms.map(function(m) {
            return m.toString(p);
        }).join(" | ");
        if (prec > p) {
            s = "[ " + s + " ]";
        }
        return s;
    });
};

/**
 * Create a matcher for two or more options.  This implements the
 * double bar (||) and double ampersand (&&) operators, as well as
 * variants of && where some of the alternatives are optional.
 * This will backtrack through even successful matches to try to
 * maximize the number of items matched.
 */
Matcher.many = function(required) {
    var ms = Array.prototype.slice.call(arguments, 1).reduce(function(acc, v) {
        if (v.expand) {
            // Insert all of the options for the given complex rule as
            // individual options.
            var ValidationTypes = require("./ValidationTypes");
            acc.push.apply(acc, ValidationTypes.complex[v.expand].options);
        } else {
            acc.push(Matcher.cast(v));
        }
        return acc;
    }, []);

    if (required === true) {
        required = ms.map(function() {
            return true;
        });
    }

    var result = new Matcher(function(expression) {
        var seen = [], max = 0, pass = 0;
        var success = function(matchCount) {
            if (pass === 0) {
                max = Math.max(matchCount, max);
                return matchCount === ms.length;
            } else {
                return matchCount === max;
            }
        };
        var tryMatch = function(matchCount) {
            for (var i = 0; i < ms.length; i++) {
                if (seen[i]) {
                    continue;
                }
                expression.mark();
                if (ms[i].match(expression)) {
                    seen[i] = true;
                    // Increase matchCount iff this was a required element
                    // (or if all the elements are optional)
                    if (tryMatch(matchCount + ((required === false || required[i]) ? 1 : 0))) {
                        expression.drop();
                        return true;
                    }
                    // Backtrack: try *not* matching using this rule, and
                    // let's see if it leads to a better overall match.
                    expression.restore();
                    seen[i] = false;
                } else {
                    expression.drop();
                }
            }
            return success(matchCount);
        };
        if (!tryMatch(0)) {
            // Couldn't get a complete match, retrace our steps to make the
            // match with the maximum # of required elements.
            pass++;
            tryMatch(0);
        }

        if (required === false) {
            return max > 0;
        }
        // Use finer-grained specification of which matchers are required.
        for (var i = 0; i < ms.length; i++) {
            if (required[i] && !seen[i]) {
                return false;
            }
        }
        return true;
    }, function(prec) {
        var p = required === false ? Matcher.prec.OROR : Matcher.prec.ANDAND;
        var s = ms.map(function(m, i) {
            if (required !== false && !required[i]) {
                return m.toString(Matcher.prec.MOD) + "?";
            }
            return m.toString(p);
        }).join(required === false ? " || " : " && ");
        if (prec > p) {
            s = "[ " + s + " ]";
        }
        return s;
    });
    result.options = ms;
    return result;
};

/**
 * Create a matcher for two or more options, where all options are
 * mandatory but they may appear in any order.
 */
Matcher.andand = function() {
    var args = Array.prototype.slice.call(arguments);
    args.unshift(true);
    return Matcher.many.apply(Matcher, args);
};

/**
 * Create a matcher for two or more options, where options are
 * optional and may appear in any order, but at least one must be
 * present.
 */
Matcher.oror = function() {
    var args = Array.prototype.slice.call(arguments);
    args.unshift(false);
    return Matcher.many.apply(Matcher, args);
};

/** Instance methods on Matchers. */
Matcher.prototype = {
    constructor: Matcher,
    // These are expected to be overridden in every instance.
    match: function() { throw new Error("unimplemented"); },
    toString: function() { throw new Error("unimplemented"); },
    // This returns a standalone function to do the matching.
    func: function() { return this.match.bind(this); },
    // Basic combinators
    then: function(m) { return Matcher.seq(this, m); },
    or: function(m) { return Matcher.alt(this, m); },
    andand: function(m) { return Matcher.many(true, this, m); },
    oror: function(m) { return Matcher.many(false, this, m); },
    // Component value multipliers
    star: function() { return this.braces(0, Infinity, "*"); },
    plus: function() { return this.braces(1, Infinity, "+"); },
    question: function() { return this.braces(0, 1, "?"); },
    hash: function() {
        return this.braces(1, Infinity, "#", Matcher.cast(","));
    },
    braces: function(min, max, marker, optSep) {
        var m1 = this, m2 = optSep ? optSep.then(this) : this;
        if (!marker) {
            marker = "{" + min + "," + max + "}";
        }
        return new Matcher(function(expression) {
            var result = true, i;
            for (i = 0; i < max; i++) {
                if (i > 0 && optSep) {
                    result = m2.match(expression);
                } else {
                    result = m1.match(expression);
                }
                if (!result) {
                    break;
                }
            }
            return i >= min;
        }, function() {
            return m1.toString(Matcher.prec.MOD) + marker;
        });
    }
};

},{"../util/StringReader":24,"../util/SyntaxError":25,"./ValidationTypes":21}],4:[function(require,module,exports){
"use strict";

module.exports = MediaFeature;

var SyntaxUnit = require("../util/SyntaxUnit");

var Parser = require("./Parser");

/**
 * Represents a media feature, such as max-width:500.
 * @namespace parserlib.css
 * @class MediaFeature
 * @extends parserlib.util.SyntaxUnit
 * @constructor
 * @param {SyntaxUnit} name The name of the feature.
 * @param {SyntaxUnit} value The value of the feature or null if none.
 */
function MediaFeature(name, value) {

    SyntaxUnit.call(this, "(" + name + (value !== null ? ":" + value : "") + ")", name.startLine, name.startCol, Parser.MEDIA_FEATURE_TYPE);

    /**
     * The name of the media feature
     * @type String
     * @property name
     */
    this.name = name;

    /**
     * The value for the feature or null if there is none.
     * @type SyntaxUnit
     * @property value
     */
    this.value = value;
}

MediaFeature.prototype = new SyntaxUnit();
MediaFeature.prototype.constructor = MediaFeature;


},{"../util/SyntaxUnit":26,"./Parser":6}],5:[function(require,module,exports){
"use strict";

module.exports = MediaQuery;

var SyntaxUnit = require("../util/SyntaxUnit");

var Parser = require("./Parser");

/**
 * Represents an individual media query.
 * @namespace parserlib.css
 * @class MediaQuery
 * @extends parserlib.util.SyntaxUnit
 * @constructor
 * @param {String} modifier The modifier "not" or "only" (or null).
 * @param {String} mediaType The type of media (i.e., "print").
 * @param {Array} parts Array of selectors parts making up this selector.
 * @param {int} line The line of text on which the unit resides.
 * @param {int} col The column of text on which the unit resides.
 */
function MediaQuery(modifier, mediaType, features, line, col) {

    SyntaxUnit.call(this, (modifier ? modifier + " ": "") + (mediaType ? mediaType : "") + (mediaType && features.length > 0 ? " and " : "") + features.join(" and "), line, col, Parser.MEDIA_QUERY_TYPE);

    /**
     * The media modifier ("not" or "only")
     * @type String
     * @property modifier
     */
    this.modifier = modifier;

    /**
     * The mediaType (i.e., "print")
     * @type String
     * @property mediaType
     */
    this.mediaType = mediaType;

    /**
     * The parts that make up the selector.
     * @type Array
     * @property features
     */
    this.features = features;

}

MediaQuery.prototype = new SyntaxUnit();
MediaQuery.prototype.constructor = MediaQuery;


},{"../util/SyntaxUnit":26,"./Parser":6}],6:[function(require,module,exports){
"use strict";

module.exports = Parser;

var EventTarget = require("../util/EventTarget");
var SyntaxError = require("../util/SyntaxError");
var SyntaxUnit = require("../util/SyntaxUnit");

var Combinator = require("./Combinator");
var MediaFeature = require("./MediaFeature");
var MediaQuery = require("./MediaQuery");
var PropertyName = require("./PropertyName");
var PropertyValue = require("./PropertyValue");
var PropertyValuePart = require("./PropertyValuePart");
var Selector = require("./Selector");
var SelectorPart = require("./SelectorPart");
var SelectorSubPart = require("./SelectorSubPart");
var TokenStream = require("./TokenStream");
var Tokens = require("./Tokens");
var Validation = require("./Validation");

/**
 * A CSS3 parser.
 * @namespace parserlib.css
 * @class Parser
 * @constructor
 * @param {Object} options (Optional) Various options for the parser:
 *      starHack (true|false) to allow IE6 star hack as valid,
 *      underscoreHack (true|false) to interpret leading underscores
 *      as IE6-7 targeting for known properties, ieFilters (true|false)
 *      to indicate that IE < 8 filters should be accepted and not throw
 *      syntax errors.
 */
function Parser(options) {

    //inherit event functionality
    EventTarget.call(this);


    this.options = options || {};

    this._tokenStream = null;
}

//Static constants
Parser.DEFAULT_TYPE = 0;
Parser.COMBINATOR_TYPE = 1;
Parser.MEDIA_FEATURE_TYPE = 2;
Parser.MEDIA_QUERY_TYPE = 3;
Parser.PROPERTY_NAME_TYPE = 4;
Parser.PROPERTY_VALUE_TYPE = 5;
Parser.PROPERTY_VALUE_PART_TYPE = 6;
Parser.SELECTOR_TYPE = 7;
Parser.SELECTOR_PART_TYPE = 8;
Parser.SELECTOR_SUB_PART_TYPE = 9;

Parser.prototype = function() {

    var proto = new EventTarget(),  //new prototype
        prop,
        additions =  {
            __proto__: null,

            //restore constructor
            constructor: Parser,

            //instance constants - yuck
            DEFAULT_TYPE : 0,
            COMBINATOR_TYPE : 1,
            MEDIA_FEATURE_TYPE : 2,
            MEDIA_QUERY_TYPE : 3,
            PROPERTY_NAME_TYPE : 4,
            PROPERTY_VALUE_TYPE : 5,
            PROPERTY_VALUE_PART_TYPE : 6,
            SELECTOR_TYPE : 7,
            SELECTOR_PART_TYPE : 8,
            SELECTOR_SUB_PART_TYPE : 9,

            //-----------------------------------------------------------------
            // Grammar
            //-----------------------------------------------------------------

            _stylesheet: function() {

                /*
                 * stylesheet
                 *  : [ CHARSET_SYM S* STRING S* ';' ]?
                 *    [S|CDO|CDC]* [ import [S|CDO|CDC]* ]*
                 *    [ namespace [S|CDO|CDC]* ]*
                 *    [ [ ruleset | media | page | font_face | keyframes_rule | supports_rule ] [S|CDO|CDC]* ]*
                 *  ;
                 */

                var tokenStream = this._tokenStream,
                    count,
                    token,
                    tt;

                this.fire("startstylesheet");

                //try to read character set
                this._charset();

                this._skipCruft();

                //try to read imports - may be more than one
                while (tokenStream.peek() === Tokens.IMPORT_SYM) {
                    this._import();
                    this._skipCruft();
                }

                //try to read namespaces - may be more than one
                while (tokenStream.peek() === Tokens.NAMESPACE_SYM) {
                    this._namespace();
                    this._skipCruft();
                }

                //get the next token
                tt = tokenStream.peek();

                //try to read the rest
                while (tt > Tokens.EOF) {

                    try {

                        switch (tt) {
                            case Tokens.MEDIA_SYM:
                                this._media();
                                this._skipCruft();
                                break;
                            case Tokens.PAGE_SYM:
                                this._page();
                                this._skipCruft();
                                break;
                            case Tokens.FONT_FACE_SYM:
                                this._font_face();
                                this._skipCruft();
                                break;
                            case Tokens.KEYFRAMES_SYM:
                                this._keyframes();
                                this._skipCruft();
                                break;
                            case Tokens.VIEWPORT_SYM:
                                this._viewport();
                                this._skipCruft();
                                break;
                            case Tokens.DOCUMENT_SYM:
                                this._document();
                                this._skipCruft();
                                break;
                            case Tokens.SUPPORTS_SYM:
                                this._supports();
                                this._skipCruft();
                                break;
                            case Tokens.UNKNOWN_SYM:  //unknown @ rule
                                tokenStream.get();
                                if (!this.options.strict) {

                                    //fire error event
                                    this.fire({
                                        type:       "error",
                                        error:      null,
                                        message:    "Unknown @ rule: " + tokenStream.LT(0).value + ".",
                                        line:       tokenStream.LT(0).startLine,
                                        col:        tokenStream.LT(0).startCol
                                    });

                                    //skip braces
                                    count=0;
                                    while (tokenStream.advance([Tokens.LBRACE, Tokens.RBRACE]) === Tokens.LBRACE) {
                                        count++;    //keep track of nesting depth
                                    }

                                    while (count) {
                                        tokenStream.advance([Tokens.RBRACE]);
                                        count--;
                                    }

                                } else {
                                    //not a syntax error, rethrow it
                                    throw new SyntaxError("Unknown @ rule.", tokenStream.LT(0).startLine, tokenStream.LT(0).startCol);
                                }
                                break;
                            case Tokens.S:
                                this._readWhitespace();
                                break;
                            default:
                                if (!this._ruleset()) {

                                    //error handling for known issues
                                    switch (tt) {
                                        case Tokens.CHARSET_SYM:
                                            token = tokenStream.LT(1);
                                            this._charset(false);
                                            throw new SyntaxError("@charset not allowed here.", token.startLine, token.startCol);
                                        case Tokens.IMPORT_SYM:
                                            token = tokenStream.LT(1);
                                            this._import(false);
                                            throw new SyntaxError("@import not allowed here.", token.startLine, token.startCol);
                                        case Tokens.NAMESPACE_SYM:
                                            token = tokenStream.LT(1);
                                            this._namespace(false);
                                            throw new SyntaxError("@namespace not allowed here.", token.startLine, token.startCol);
                                        default:
                                            tokenStream.get();  //get the last token
                                            this._unexpectedToken(tokenStream.token());
                                    }

                                }
                        }
                    } catch (ex) {
                        if (ex instanceof SyntaxError && !this.options.strict) {
                            this.fire({
                                type:       "error",
                                error:      ex,
                                message:    ex.message,
                                line:       ex.line,
                                col:        ex.col
                            });
                        } else {
                            throw ex;
                        }
                    }

                    tt = tokenStream.peek();
                }

                if (tt !== Tokens.EOF) {
                    this._unexpectedToken(tokenStream.token());
                }

                this.fire("endstylesheet");
            },

            _charset: function(emit) {
                var tokenStream = this._tokenStream,
                    charset,
                    token,
                    line,
                    col;

                if (tokenStream.match(Tokens.CHARSET_SYM)) {
                    line = tokenStream.token().startLine;
                    col = tokenStream.token().startCol;

                    this._readWhitespace();
                    tokenStream.mustMatch(Tokens.STRING);

                    token = tokenStream.token();
                    charset = token.value;

                    this._readWhitespace();
                    tokenStream.mustMatch(Tokens.SEMICOLON);

                    if (emit !== false) {
                        this.fire({
                            type:   "charset",
                            charset:charset,
                            line:   line,
                            col:    col
                        });
                    }
                }
            },

            _import: function(emit) {
                /*
                 * import
                 *   : IMPORT_SYM S*
                 *    [STRING|URI] S* media_query_list? ';' S*
                 */

                var tokenStream = this._tokenStream,
                    uri,
                    importToken,
                    mediaList   = [];

                //read import symbol
                tokenStream.mustMatch(Tokens.IMPORT_SYM);
                importToken = tokenStream.token();
                this._readWhitespace();

                tokenStream.mustMatch([Tokens.STRING, Tokens.URI]);

                //grab the URI value
                uri = tokenStream.token().value.replace(/^(?:url\()?["']?([^"']+?)["']?\)?$/, "$1");

                this._readWhitespace();

                mediaList = this._media_query_list();

                //must end with a semicolon
                tokenStream.mustMatch(Tokens.SEMICOLON);
                this._readWhitespace();

                if (emit !== false) {
                    this.fire({
                        type:   "import",
                        uri:    uri,
                        media:  mediaList,
                        line:   importToken.startLine,
                        col:    importToken.startCol
                    });
                }

            },

            _namespace: function(emit) {
                /*
                 * namespace
                 *   : NAMESPACE_SYM S* [namespace_prefix S*]? [STRING|URI] S* ';' S*
                 */

                var tokenStream = this._tokenStream,
                    line,
                    col,
                    prefix,
                    uri;

                //read import symbol
                tokenStream.mustMatch(Tokens.NAMESPACE_SYM);
                line = tokenStream.token().startLine;
                col = tokenStream.token().startCol;
                this._readWhitespace();

                //it's a namespace prefix - no _namespace_prefix() method because it's just an IDENT
                if (tokenStream.match(Tokens.IDENT)) {
                    prefix = tokenStream.token().value;
                    this._readWhitespace();
                }

                tokenStream.mustMatch([Tokens.STRING, Tokens.URI]);
                /*if (!tokenStream.match(Tokens.STRING)){
                    tokenStream.mustMatch(Tokens.URI);
                }*/

                //grab the URI value
                uri = tokenStream.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/, "$1");

                this._readWhitespace();

                //must end with a semicolon
                tokenStream.mustMatch(Tokens.SEMICOLON);
                this._readWhitespace();

                if (emit !== false) {
                    this.fire({
                        type:   "namespace",
                        prefix: prefix,
                        uri:    uri,
                        line:   line,
                        col:    col
                    });
                }

            },

            _supports: function(emit) {
                /*
                 * supports_rule
                 *  : SUPPORTS_SYM S* supports_condition S* group_rule_body
                 *  ;
                 */
                var tokenStream = this._tokenStream,
                    line,
                    col;

                if (tokenStream.match(Tokens.SUPPORTS_SYM)) {
                    line = tokenStream.token().startLine;
                    col = tokenStream.token().startCol;

                    this._readWhitespace();
                    this._supports_condition();
                    this._readWhitespace();

                    tokenStream.mustMatch(Tokens.LBRACE);
                    this._readWhitespace();

                    if (emit !== false) {
                        this.fire({
                            type:   "startsupports",
                            line:   line,
                            col:    col
                        });
                    }

                    while (true) {
                        if (!this._ruleset()) {
                            break;
                        }
                    }

                    tokenStream.mustMatch(Tokens.RBRACE);
                    this._readWhitespace();

                    this.fire({
                        type:   "endsupports",
                        line:   line,
                        col:    col
                    });
                }
            },

            _supports_condition: function() {
                /*
                 * supports_condition
                 *  : supports_negation | supports_conjunction | supports_disjunction |
                 *    supports_condition_in_parens
                 *  ;
                 */
                var tokenStream = this._tokenStream,
                    ident;

                if (tokenStream.match(Tokens.IDENT)) {
                    ident = tokenStream.token().value.toLowerCase();

                    if (ident === "not") {
                        tokenStream.mustMatch(Tokens.S);
                        this._supports_condition_in_parens();
                    } else {
                        tokenStream.unget();
                    }
                } else {
                    this._supports_condition_in_parens();
                    this._readWhitespace();

                    while (tokenStream.peek() === Tokens.IDENT) {
                        ident = tokenStream.LT(1).value.toLowerCase();
                        if (ident === "and" || ident === "or") {
                            tokenStream.mustMatch(Tokens.IDENT);
                            this._readWhitespace();
                            this._supports_condition_in_parens();
                            this._readWhitespace();
                        }
                    }
                }
            },

            _supports_condition_in_parens: function() {
                /*
                 * supports_condition_in_parens
                 *  : ( '(' S* supports_condition S* ')' ) | supports_declaration_condition |
                 *    general_enclosed
                 *  ;
                 */
                var tokenStream = this._tokenStream,
                    ident;

                if (tokenStream.match(Tokens.LPAREN)) {
                    this._readWhitespace();
                    if (tokenStream.match(Tokens.IDENT)) {
                        // look ahead for not keyword, if not given, continue with declaration condition.
                        ident = tokenStream.token().value.toLowerCase();
                        if (ident === "not") {
                            this._readWhitespace();
                            this._supports_condition();
                            this._readWhitespace();
                            tokenStream.mustMatch(Tokens.RPAREN);
                        } else {
                            tokenStream.unget();
                            this._supports_declaration_condition(false);
                        }
                    } else {
                        this._supports_condition();
                        this._readWhitespace();
                        tokenStream.mustMatch(Tokens.RPAREN);
                    }
                } else {
                    this._supports_declaration_condition();
                }
            },

            _supports_declaration_condition: function(requireStartParen) {
                /*
                 * supports_declaration_condition
                 *  : '(' S* declaration ')'
                 *  ;
                 */
                var tokenStream = this._tokenStream;

                if (requireStartParen !== false) {
                    tokenStream.mustMatch(Tokens.LPAREN);
                }
                this._readWhitespace();
                this._declaration();
                tokenStream.mustMatch(Tokens.RPAREN);
            },

            _media: function() {
                /*
                 * media
                 *   : MEDIA_SYM S* media_query_list S* '{' S* ruleset* '}' S*
                 *   ;
                 */
                var tokenStream     = this._tokenStream,
                    line,
                    col,
                    mediaList;//       = [];

                //look for @media
                tokenStream.mustMatch(Tokens.MEDIA_SYM);
                line = tokenStream.token().startLine;
                col = tokenStream.token().startCol;

                this._readWhitespace();

                mediaList = this._media_query_list();

                tokenStream.mustMatch(Tokens.LBRACE);
                this._readWhitespace();

                this.fire({
                    type:   "startmedia",
                    media:  mediaList,
                    line:   line,
                    col:    col
                });

                while (true) {
                    if (tokenStream.peek() === Tokens.PAGE_SYM) {
                        this._page();
                    } else if (tokenStream.peek() === Tokens.FONT_FACE_SYM) {
                        this._font_face();
                    } else if (tokenStream.peek() === Tokens.VIEWPORT_SYM) {
                        this._viewport();
                    } else if (tokenStream.peek() === Tokens.DOCUMENT_SYM) {
                        this._document();
                    } else if (tokenStream.peek() === Tokens.SUPPORTS_SYM) {
                        this._supports();
                    } else if (tokenStream.peek() === Tokens.MEDIA_SYM) {
                        this._media();
                    } else if (!this._ruleset()) {
                        break;
                    }
                }

                tokenStream.mustMatch(Tokens.RBRACE);
                this._readWhitespace();

                this.fire({
                    type:   "endmedia",
                    media:  mediaList,
                    line:   line,
                    col:    col
                });
            },


            //CSS3 Media Queries
            _media_query_list: function() {
                /*
                 * media_query_list
                 *   : S* [media_query [ ',' S* media_query ]* ]?
                 *   ;
                 */
                var tokenStream = this._tokenStream,
                    mediaList   = [];


                this._readWhitespace();

                if (tokenStream.peek() === Tokens.IDENT || tokenStream.peek() === Tokens.LPAREN) {
                    mediaList.push(this._media_query());
                }

                while (tokenStream.match(Tokens.COMMA)) {
                    this._readWhitespace();
                    mediaList.push(this._media_query());
                }

                return mediaList;
            },

            /*
             * Note: "expression" in the grammar maps to the _media_expression
             * method.

             */
            _media_query: function() {
                /*
                 * media_query
                 *   : [ONLY | NOT]? S* media_type S* [ AND S* expression ]*
                 *   | expression [ AND S* expression ]*
                 *   ;
                 */
                var tokenStream = this._tokenStream,
                    type        = null,
                    ident       = null,
                    token       = null,
                    expressions = [];

                if (tokenStream.match(Tokens.IDENT)) {
                    ident = tokenStream.token().value.toLowerCase();

                    //since there's no custom tokens for these, need to manually check
                    if (ident !== "only" && ident !== "not") {
                        tokenStream.unget();
                        ident = null;
                    } else {
                        token = tokenStream.token();
                    }
                }

                this._readWhitespace();

                if (tokenStream.peek() === Tokens.IDENT) {
                    type = this._media_type();
                    if (token === null) {
                        token = tokenStream.token();
                    }
                } else if (tokenStream.peek() === Tokens.LPAREN) {
                    if (token === null) {
                        token = tokenStream.LT(1);
                    }
                    expressions.push(this._media_expression());
                }

                if (type === null && expressions.length === 0) {
                    return null;
                } else {
                    this._readWhitespace();
                    while (tokenStream.match(Tokens.IDENT)) {
                        if (tokenStream.token().value.toLowerCase() !== "and") {
                            this._unexpectedToken(tokenStream.token());
                        }

                        this._readWhitespace();
                        expressions.push(this._media_expression());
                    }
                }

                return new MediaQuery(ident, type, expressions, token.startLine, token.startCol);
            },

            //CSS3 Media Queries
            _media_type: function() {
                /*
                 * media_type
                 *   : IDENT
                 *   ;
                 */
                return this._media_feature();
            },

            /**
             * Note: in CSS3 Media Queries, this is called "expression".
             * Renamed here to avoid conflict with CSS3 Selectors
             * definition of "expression". Also note that "expr" in the
             * grammar now maps to "expression" from CSS3 selectors.
             * @method _media_expression
             * @private
             */
            _media_expression: function() {
                /*
                 * expression
                 *  : '(' S* media_feature S* [ ':' S* expr ]? ')' S*
                 *  ;
                 */
                var tokenStream = this._tokenStream,
                    feature     = null,
                    token,
                    expression  = null;

                tokenStream.mustMatch(Tokens.LPAREN);

                feature = this._media_feature();
                this._readWhitespace();

                if (tokenStream.match(Tokens.COLON)) {
                    this._readWhitespace();
                    token = tokenStream.LT(1);
                    expression = this._expression();
                }

                tokenStream.mustMatch(Tokens.RPAREN);
                this._readWhitespace();

                return new MediaFeature(feature, expression ? new SyntaxUnit(expression, token.startLine, token.startCol) : null);
            },

            //CSS3 Media Queries
            _media_feature: function() {
                /*
                 * media_feature
                 *   : IDENT
                 *   ;
                 */
                var tokenStream = this._tokenStream;

                this._readWhitespace();

                tokenStream.mustMatch(Tokens.IDENT);

                return SyntaxUnit.fromToken(tokenStream.token());
            },

            //CSS3 Paged Media
            _page: function() {
                /*
                 * page:
                 *    PAGE_SYM S* IDENT? pseudo_page? S*
                 *    '{' S* [ declaration | margin ]? [ ';' S* [ declaration | margin ]? ]* '}' S*
                 *    ;
                 */
                var tokenStream = this._tokenStream,
                    line,
                    col,
                    identifier  = null,
                    pseudoPage  = null;

                //look for @page
                tokenStream.mustMatch(Tokens.PAGE_SYM);
                line = tokenStream.token().startLine;
                col = tokenStream.token().startCol;

                this._readWhitespace();

                if (tokenStream.match(Tokens.IDENT)) {
                    identifier = tokenStream.token().value;

                    //The value 'auto' may not be used as a page name and MUST be treated as a syntax error.
                    if (identifier.toLowerCase() === "auto") {
                        this._unexpectedToken(tokenStream.token());
                    }
                }

                //see if there's a colon upcoming
                if (tokenStream.peek() === Tokens.COLON) {
                    pseudoPage = this._pseudo_page();
                }

                this._readWhitespace();

                this.fire({
                    type:   "startpage",
                    id:     identifier,
                    pseudo: pseudoPage,
                    line:   line,
                    col:    col
                });

                this._readDeclarations(true, true);

                this.fire({
                    type:   "endpage",
                    id:     identifier,
                    pseudo: pseudoPage,
                    line:   line,
                    col:    col
                });

            },

            //CSS3 Paged Media
            _margin: function() {
                /*
                 * margin :
                 *    margin_sym S* '{' declaration [ ';' S* declaration? ]* '}' S*
                 *    ;
                 */
                var tokenStream = this._tokenStream,
                    line,
                    col,
                    marginSym   = this._margin_sym();

                if (marginSym) {
                    line = tokenStream.token().startLine;
                    col = tokenStream.token().startCol;

                    this.fire({
                        type: "startpagemargin",
                        margin: marginSym,
                        line:   line,
                        col:    col
                    });

                    this._readDeclarations(true);

                    this.fire({
                        type: "endpagemargin",
                        margin: marginSym,
                        line:   line,
                        col:    col
                    });
                    return true;
                } else {
                    return false;
                }
            },

            //CSS3 Paged Media
            _margin_sym: function() {

                /*
                 * margin_sym :
                 *    TOPLEFTCORNER_SYM |
                 *    TOPLEFT_SYM |
                 *    TOPCENTER_SYM |
                 *    TOPRIGHT_SYM |
                 *    TOPRIGHTCORNER_SYM |
                 *    BOTTOMLEFTCORNER_SYM |
                 *    BOTTOMLEFT_SYM |
                 *    BOTTOMCENTER_SYM |
                 *    BOTTOMRIGHT_SYM |
                 *    BOTTOMRIGHTCORNER_SYM |
                 *    LEFTTOP_SYM |
                 *    LEFTMIDDLE_SYM |
                 *    LEFTBOTTOM_SYM |
                 *    RIGHTTOP_SYM |
                 *    RIGHTMIDDLE_SYM |
                 *    RIGHTBOTTOM_SYM
                 *    ;
                 */

                var tokenStream = this._tokenStream;

                if (tokenStream.match([Tokens.TOPLEFTCORNER_SYM, Tokens.TOPLEFT_SYM,
                        Tokens.TOPCENTER_SYM, Tokens.TOPRIGHT_SYM, Tokens.TOPRIGHTCORNER_SYM,
                        Tokens.BOTTOMLEFTCORNER_SYM, Tokens.BOTTOMLEFT_SYM,
                        Tokens.BOTTOMCENTER_SYM, Tokens.BOTTOMRIGHT_SYM,
                        Tokens.BOTTOMRIGHTCORNER_SYM, Tokens.LEFTTOP_SYM,
                        Tokens.LEFTMIDDLE_SYM, Tokens.LEFTBOTTOM_SYM, Tokens.RIGHTTOP_SYM,
                        Tokens.RIGHTMIDDLE_SYM, Tokens.RIGHTBOTTOM_SYM])) {
                    return SyntaxUnit.fromToken(tokenStream.token());
                } else {
                    return null;
                }

            },

            _pseudo_page: function() {
                /*
                 * pseudo_page
                 *   : ':' IDENT
                 *   ;
                 */

                var tokenStream = this._tokenStream;

                tokenStream.mustMatch(Tokens.COLON);
                tokenStream.mustMatch(Tokens.IDENT);

                //TODO: CSS3 Paged Media says only "left", "center", and "right" are allowed

                return tokenStream.token().value;
            },

            _font_face: function() {
                /*
                 * font_face
                 *   : FONT_FACE_SYM S*
                 *     '{' S* declaration [ ';' S* declaration ]* '}' S*
                 *   ;
                 */
                var tokenStream = this._tokenStream,
                    line,
                    col;

                //look for @page
                tokenStream.mustMatch(Tokens.FONT_FACE_SYM);
                line = tokenStream.token().startLine;
                col = tokenStream.token().startCol;

                this._readWhitespace();

                this.fire({
                    type:   "startfontface",
                    line:   line,
                    col:    col
                });

                this._readDeclarations(true);

                this.fire({
                    type:   "endfontface",
                    line:   line,
                    col:    col
                });
            },

            _viewport: function() {
                /*
                 * viewport
                 *   : VIEWPORT_SYM S*
                 *     '{' S* declaration? [ ';' S* declaration? ]* '}' S*
                 *   ;
                 */
                var tokenStream = this._tokenStream,
                    line,
                    col;

                tokenStream.mustMatch(Tokens.VIEWPORT_SYM);
                line = tokenStream.token().startLine;
                col = tokenStream.token().startCol;

                this._readWhitespace();

                this.fire({
                    type:   "startviewport",
                    line:   line,
                    col:    col
                });

                this._readDeclarations(true);

                this.fire({
                    type:   "endviewport",
                    line:   line,
                    col:    col
                });

            },

            _document: function() {
                /*
                 * document
                 *   : DOCUMENT_SYM S*
                 *     _document_function [ ',' S* _document_function ]* S*
                 *     '{' S* ruleset* '}'
                 *   ;
                 */

                var tokenStream = this._tokenStream,
                    token,
                    functions = [],
                    prefix = "";

                tokenStream.mustMatch(Tokens.DOCUMENT_SYM);
                token = tokenStream.token();
                if (/^@\-([^\-]+)\-/.test(token.value)) {
                    prefix = RegExp.$1;
                }

                this._readWhitespace();
                functions.push(this._document_function());

                while (tokenStream.match(Tokens.COMMA)) {
                    this._readWhitespace();
                    functions.push(this._document_function());
                }

                tokenStream.mustMatch(Tokens.LBRACE);
                this._readWhitespace();

                this.fire({
                    type:      "startdocument",
                    functions: functions,
                    prefix:    prefix,
                    line:      token.startLine,
                    col:       token.startCol
                });

                var ok = true;
                while (ok) {
                    switch (tokenStream.peek()) {
                        case Tokens.PAGE_SYM:
                            this._page();
                            break;
                        case Tokens.FONT_FACE_SYM:
                            this._font_face();
                            break;
                        case Tokens.VIEWPORT_SYM:
                            this._viewport();
                            break;
                        case Tokens.MEDIA_SYM:
                            this._media();
                            break;
                        case Tokens.KEYFRAMES_SYM:
                            this._keyframes();
                            break;
                        case Tokens.DOCUMENT_SYM:
                            this._document();
                            break;
                        default:
                            ok = Boolean(this._ruleset());
                    }
                }

                tokenStream.mustMatch(Tokens.RBRACE);
                token = tokenStream.token();
                this._readWhitespace();

                this.fire({
                    type:      "enddocument",
                    functions: functions,
                    prefix:    prefix,
                    line:      token.startLine,
                    col:       token.startCol
                });
            },

            _document_function: function() {
                /*
                 * document_function
                 *   : function | URI S*
                 *   ;
                 */

                var tokenStream = this._tokenStream,
                    value;

                if (tokenStream.match(Tokens.URI)) {
                    value = tokenStream.token().value;
                    this._readWhitespace();
                } else {
                    value = this._function();
                }

                return value;
            },

            _operator: function(inFunction) {

                /*
                 * operator (outside function)
                 *  : '/' S* | ',' S* | /( empty )/
                 * operator (inside function)
                 *  : '/' S* | '+' S* | '*' S* | '-' S* /( empty )/
                 *  ;
                 */

                var tokenStream = this._tokenStream,
                    token       = null;

                if (tokenStream.match([Tokens.SLASH, Tokens.COMMA]) ||
                    (inFunction && tokenStream.match([Tokens.PLUS, Tokens.STAR, Tokens.MINUS]))) {
                    token =  tokenStream.token();
                    this._readWhitespace();
                }
                return token ? PropertyValuePart.fromToken(token) : null;

            },

            _combinator: function() {

                /*
                 * combinator
                 *  : PLUS S* | GREATER S* | TILDE S* | S+
                 *  ;
                 */

                var tokenStream = this._tokenStream,
                    value       = null,
                    token;

                if (tokenStream.match([Tokens.PLUS, Tokens.GREATER, Tokens.TILDE])) {
                    token = tokenStream.token();
                    value = new Combinator(token.value, token.startLine, token.startCol);
                    this._readWhitespace();
                }

                return value;
            },

            _unary_operator: function() {

                /*
                 * unary_operator
                 *  : '-' | '+'
                 *  ;
                 */

                var tokenStream = this._tokenStream;

                if (tokenStream.match([Tokens.MINUS, Tokens.PLUS])) {
                    return tokenStream.token().value;
                } else {
                    return null;
                }
            },

            _property: function() {

                /*
                 * property
                 *   : IDENT S*
                 *   ;
                 */

                var tokenStream = this._tokenStream,
                    value       = null,
                    hack        = null,
                    tokenValue,
                    token,
                    line,
                    col;

                //check for star hack - throws error if not allowed
                if (tokenStream.peek() === Tokens.STAR && this.options.starHack) {
                    tokenStream.get();
                    token = tokenStream.token();
                    hack = token.value;
                    line = token.startLine;
                    col = token.startCol;
                }

                if (tokenStream.match(Tokens.IDENT)) {
                    token = tokenStream.token();
                    tokenValue = token.value;

                    //check for underscore hack - no error if not allowed because it's valid CSS syntax
                    if (tokenValue.charAt(0) === "_" && this.options.underscoreHack) {
                        hack = "_";
                        tokenValue = tokenValue.substring(1);
                    }

                    value = new PropertyName(tokenValue, hack, (line||token.startLine), (col||token.startCol));
                    this._readWhitespace();
                }

                return value;
            },

            //Augmented with CSS3 Selectors
            _ruleset: function() {
                /*
                 * ruleset
                 *   : selectors_group
                 *     '{' S* declaration? [ ';' S* declaration? ]* '}' S*
                 *   ;
                 */

                var tokenStream = this._tokenStream,
                    tt,
                    selectors;


                /*
                 * Error Recovery: If even a single selector fails to parse,
                 * then the entire ruleset should be thrown away.
                 */
                try {
                    selectors = this._selectors_group();
                } catch (ex) {
                    if (ex instanceof SyntaxError && !this.options.strict) {

                        //fire error event
                        this.fire({
                            type:       "error",
                            error:      ex,
                            message:    ex.message,
                            line:       ex.line,
                            col:        ex.col
                        });

                        //skip over everything until closing brace
                        tt = tokenStream.advance([Tokens.RBRACE]);
                        if (tt === Tokens.RBRACE) {
                            //if there's a right brace, the rule is finished so don't do anything
                        } else {
                            //otherwise, rethrow the error because it wasn't handled properly
                            throw ex;
                        }

                    } else {
                        //not a syntax error, rethrow it
                        throw ex;
                    }

                    //trigger parser to continue
                    return true;
                }

                //if it got here, all selectors parsed
                if (selectors) {

                    this.fire({
                        type:       "startrule",
                        selectors:  selectors,
                        line:       selectors[0].line,
                        col:        selectors[0].col
                    });

                    this._readDeclarations(true);

                    this.fire({
                        type:       "endrule",
                        selectors:  selectors,
                        line:       selectors[0].line,
                        col:        selectors[0].col
                    });

                }

                return selectors;

            },

            //CSS3 Selectors
            _selectors_group: function() {

                /*
                 * selectors_group
                 *   : selector [ COMMA S* selector ]*
                 *   ;
                 */
                var tokenStream = this._tokenStream,
                    selectors   = [],
                    selector;

                selector = this._selector();
                if (selector !== null) {

                    selectors.push(selector);
                    while (tokenStream.match(Tokens.COMMA)) {
                        this._readWhitespace();
                        selector = this._selector();
                        if (selector !== null) {
                            selectors.push(selector);
                        } else {
                            this._unexpectedToken(tokenStream.LT(1));
                        }
                    }
                }

                return selectors.length ? selectors : null;
            },

            //CSS3 Selectors
            _selector: function() {
                /*
                 * selector
                 *   : simple_selector_sequence [ combinator simple_selector_sequence ]*
                 *   ;
                 */

                var tokenStream = this._tokenStream,
                    selector    = [],
                    nextSelector = null,
                    combinator  = null,
                    ws          = null;

                //if there's no simple selector, then there's no selector
                nextSelector = this._simple_selector_sequence();
                if (nextSelector === null) {
                    return null;
                }

                selector.push(nextSelector);

                do {

                    //look for a combinator
                    combinator = this._combinator();

                    if (combinator !== null) {
                        selector.push(combinator);
                        nextSelector = this._simple_selector_sequence();

                        //there must be a next selector
                        if (nextSelector === null) {
                            this._unexpectedToken(tokenStream.LT(1));
                        } else {

                            //nextSelector is an instance of SelectorPart
                            selector.push(nextSelector);
                        }
                    } else {

                        //if there's not whitespace, we're done
                        if (this._readWhitespace()) {

                            //add whitespace separator
                            ws = new Combinator(tokenStream.token().value, tokenStream.token().startLine, tokenStream.token().startCol);

                            //combinator is not required
                            combinator = this._combinator();

                            //selector is required if there's a combinator
                            nextSelector = this._simple_selector_sequence();
                            if (nextSelector === null) {
                                if (combinator !== null) {
                                    this._unexpectedToken(tokenStream.LT(1));
                                }
                            } else {

                                if (combinator !== null) {
                                    selector.push(combinator);
                                } else {
                                    selector.push(ws);
                                }

                                selector.push(nextSelector);
                            }
                        } else {
                            break;
                        }

                    }
                } while (true);

                return new Selector(selector, selector[0].line, selector[0].col);
            },

            //CSS3 Selectors
            _simple_selector_sequence: function() {
                /*
                 * simple_selector_sequence
                 *   : [ type_selector | universal ]
                 *     [ HASH | class | attrib | pseudo | negation ]*
                 *   | [ HASH | class | attrib | pseudo | negation ]+
                 *   ;
                 */

                var tokenStream = this._tokenStream,

                    //parts of a simple selector
                    elementName = null,
                    modifiers   = [],

                    //complete selector text
                    selectorText= "",

                    //the different parts after the element name to search for
                    components  = [
                        //HASH
                        function() {
                            return tokenStream.match(Tokens.HASH) ?
                                    new SelectorSubPart(tokenStream.token().value, "id", tokenStream.token().startLine, tokenStream.token().startCol) :
                                    null;
                        },
                        this._class,
                        this._attrib,
                        this._pseudo,
                        this._negation
                    ],
                    i           = 0,
                    len         = components.length,
                    component   = null,
                    line,
                    col;


                //get starting line and column for the selector
                line = tokenStream.LT(1).startLine;
                col = tokenStream.LT(1).startCol;

                elementName = this._type_selector();
                if (!elementName) {
                    elementName = this._universal();
                }

                if (elementName !== null) {
                    selectorText += elementName;
                }

                while (true) {

                    //whitespace means we're done
                    if (tokenStream.peek() === Tokens.S) {
                        break;
                    }

                    //check for each component
                    while (i < len && component === null) {
                        component = components[i++].call(this);
                    }

                    if (component === null) {

                        //we don't have a selector
                        if (selectorText === "") {
                            return null;
                        } else {
                            break;
                        }
                    } else {
                        i = 0;
                        modifiers.push(component);
                        selectorText += component.toString();
                        component = null;
                    }
                }


                return selectorText !== "" ?
                        new SelectorPart(elementName, modifiers, selectorText, line, col) :
                        null;
            },

            //CSS3 Selectors
            _type_selector: function() {
                /*
                 * type_selector
                 *   : [ namespace_prefix ]? element_name
                 *   ;
                 */

                var tokenStream = this._tokenStream,
                    ns          = this._namespace_prefix(),
                    elementName = this._element_name();

                if (!elementName) {
                    /*
                     * Need to back out the namespace that was read due to both
                     * type_selector and universal reading namespace_prefix
                     * first. Kind of hacky, but only way I can figure out
                     * right now how to not change the grammar.
                     */
                    if (ns) {
                        tokenStream.unget();
                        if (ns.length > 1) {
                            tokenStream.unget();
                        }
                    }

                    return null;
                } else {
                    if (ns) {
                        elementName.text = ns + elementName.text;
                        elementName.col -= ns.length;
                    }
                    return elementName;
                }
            },

            //CSS3 Selectors
            _class: function() {
                /*
                 * class
                 *   : '.' IDENT
                 *   ;
                 */

                var tokenStream = this._tokenStream,
                    token;

                if (tokenStream.match(Tokens.DOT)) {
                    tokenStream.mustMatch(Tokens.IDENT);
                    token = tokenStream.token();
                    return new SelectorSubPart("." + token.value, "class", token.startLine, token.startCol - 1);
                } else {
                    return null;
                }

            },

            //CSS3 Selectors
            _element_name: function() {
                /*
                 * element_name
                 *   : IDENT
                 *   ;
                 */

                var tokenStream = this._tokenStream,
                    token;

                if (tokenStream.match(Tokens.IDENT)) {
                    token = tokenStream.token();
                    return new SelectorSubPart(token.value, "elementName", token.startLine, token.startCol);

                } else {
                    return null;
                }
            },

            //CSS3 Selectors
            _namespace_prefix: function() {
                /*
                 * namespace_prefix
                 *   : [ IDENT | '*' ]? '|'
                 *   ;
                 */
                var tokenStream = this._tokenStream,
                    value       = "";

                //verify that this is a namespace prefix
                if (tokenStream.LA(1) === Tokens.PIPE || tokenStream.LA(2) === Tokens.PIPE) {

                    if (tokenStream.match([Tokens.IDENT, Tokens.STAR])) {
                        value += tokenStream.token().value;
                    }

                    tokenStream.mustMatch(Tokens.PIPE);
                    value += "|";

                }

                return value.length ? value : null;
            },

            //CSS3 Selectors
            _universal: function() {
                /*
                 * universal
                 *   : [ namespace_prefix ]? '*'
                 *   ;
                 */
                var tokenStream = this._tokenStream,
                    value       = "",
                    ns;

                ns = this._namespace_prefix();
                if (ns) {
                    value += ns;
                }

                if (tokenStream.match(Tokens.STAR)) {
                    value += "*";
                }

                return value.length ? value : null;

            },

            //CSS3 Selectors
            _attrib: function() {
                /*
                 * attrib
                 *   : '[' S* [ namespace_prefix ]? IDENT S*
                 *         [ [ PREFIXMATCH |
                 *             SUFFIXMATCH |
                 *             SUBSTRINGMATCH |
                 *             '=' |
                 *             INCLUDES |
                 *             DASHMATCH ] S* [ IDENT | STRING ] S*
                 *         ]? ']'
                 *   ;
                 */

                var tokenStream = this._tokenStream,
                    value       = null,
                    ns,
                    token;

                if (tokenStream.match(Tokens.LBRACKET)) {
                    token = tokenStream.token();
                    value = token.value;
                    value += this._readWhitespace();

                    ns = this._namespace_prefix();

                    if (ns) {
                        value += ns;
                    }

                    tokenStream.mustMatch(Tokens.IDENT);
                    value += tokenStream.token().value;
                    value += this._readWhitespace();

                    if (tokenStream.match([Tokens.PREFIXMATCH, Tokens.SUFFIXMATCH, Tokens.SUBSTRINGMATCH,
                            Tokens.EQUALS, Tokens.INCLUDES, Tokens.DASHMATCH])) {

                        value += tokenStream.token().value;
                        value += this._readWhitespace();

                        tokenStream.mustMatch([Tokens.IDENT, Tokens.STRING]);
                        value += tokenStream.token().value;
                        value += this._readWhitespace();
                    }

                    tokenStream.mustMatch(Tokens.RBRACKET);

                    return new SelectorSubPart(value + "]", "attribute", token.startLine, token.startCol);
                } else {
                    return null;
                }
            },

            //CSS3 Selectors
            _pseudo: function() {

                /*
                 * pseudo
                 *   : ':' ':'? [ IDENT | functional_pseudo ]
                 *   ;
                 */

                var tokenStream = this._tokenStream,
                    pseudo      = null,
                    colons      = ":",
                    line,
                    col;

                if (tokenStream.match(Tokens.COLON)) {

                    if (tokenStream.match(Tokens.COLON)) {
                        colons += ":";
                    }

                    if (tokenStream.match(Tokens.IDENT)) {
                        pseudo = tokenStream.token().value;
                        line = tokenStream.token().startLine;
                        col = tokenStream.token().startCol - colons.length;
                    } else if (tokenStream.peek() === Tokens.FUNCTION) {
                        line = tokenStream.LT(1).startLine;
                        col = tokenStream.LT(1).startCol - colons.length;
                        pseudo = this._functional_pseudo();
                    }

                    if (pseudo) {
                        pseudo = new SelectorSubPart(colons + pseudo, "pseudo", line, col);
                    } else {
                        var startLine = tokenStream.LT(1).startLine,
                            startCol  = tokenStream.LT(0).startCol;
                        throw new SyntaxError("Expected a `FUNCTION` or `IDENT` after colon at line " + startLine + ", col " + startCol + ".", startLine, startCol);
                    }
                }

                return pseudo;
            },

            //CSS3 Selectors
            _functional_pseudo: function() {
                /*
                 * functional_pseudo
                 *   : FUNCTION S* expression ')'
                 *   ;
                */

                var tokenStream = this._tokenStream,
                    value = null;

                if (tokenStream.match(Tokens.FUNCTION)) {
                    value = tokenStream.token().value;
                    value += this._readWhitespace();
                    value += this._expression();
                    tokenStream.mustMatch(Tokens.RPAREN);
                    value += ")";
                }

                return value;
            },

            //CSS3 Selectors
            _expression: function() {
                /*
                 * expression
                 *   : [ [ PLUS | '-' | DIMENSION | NUMBER | STRING | IDENT ] S* ]+
                 *   ;
                 */

                var tokenStream = this._tokenStream,
                    value       = "";

                while (tokenStream.match([Tokens.PLUS, Tokens.MINUS, Tokens.DIMENSION,
                        Tokens.NUMBER, Tokens.STRING, Tokens.IDENT, Tokens.LENGTH,
                        Tokens.FREQ, Tokens.ANGLE, Tokens.TIME,
                        Tokens.RESOLUTION, Tokens.SLASH])) {

                    value += tokenStream.token().value;
                    value += this._readWhitespace();
                }

                return value.length ? value : null;

            },

            //CSS3 Selectors
            _negation: function() {
                /*
                 * negation
                 *   : NOT S* negation_arg S* ')'
                 *   ;
                 */

                var tokenStream = this._tokenStream,
                    line,
                    col,
                    value       = "",
                    arg,
                    subpart     = null;

                if (tokenStream.match(Tokens.NOT)) {
                    value = tokenStream.token().value;
                    line = tokenStream.token().startLine;
                    col = tokenStream.token().startCol;
                    value += this._readWhitespace();
                    arg = this._negation_arg();
                    value += arg;
                    value += this._readWhitespace();
                    tokenStream.match(Tokens.RPAREN);
                    value += tokenStream.token().value;

                    subpart = new SelectorSubPart(value, "not", line, col);
                    subpart.args.push(arg);
                }

                return subpart;
            },

            //CSS3 Selectors
            _negation_arg: function() {
                /*
                 * negation_arg
                 *   : type_selector | universal | HASH | class | attrib | pseudo
                 *   ;
                 */

                var tokenStream = this._tokenStream,
                    args        = [
                        this._type_selector,
                        this._universal,
                        function() {
                            return tokenStream.match(Tokens.HASH) ?
                                    new SelectorSubPart(tokenStream.token().value, "id", tokenStream.token().startLine, tokenStream.token().startCol) :
                                    null;
                        },
                        this._class,
                        this._attrib,
                        this._pseudo
                    ],
                    arg         = null,
                    i           = 0,
                    len         = args.length,
                    line,
                    col,
                    part;

                line = tokenStream.LT(1).startLine;
                col = tokenStream.LT(1).startCol;

                while (i < len && arg === null) {

                    arg = args[i].call(this);
                    i++;
                }

                //must be a negation arg
                if (arg === null) {
                    this._unexpectedToken(tokenStream.LT(1));
                }

                //it's an element name
                if (arg.type === "elementName") {
                    part = new SelectorPart(arg, [], arg.toString(), line, col);
                } else {
                    part = new SelectorPart(null, [arg], arg.toString(), line, col);
                }

                return part;
            },

            _declaration: function() {

                /*
                 * declaration
                 *   : property ':' S* expr prio?
                 *   | /( empty )/
                 *   ;
                 */

                var tokenStream = this._tokenStream,
                    property    = null,
                    expr        = null,
                    prio        = null,
                    invalid     = null,
                    propertyName= "";

                property = this._property();
                if (property !== null) {

                    tokenStream.mustMatch(Tokens.COLON);
                    this._readWhitespace();

                    expr = this._expr();

                    //if there's no parts for the value, it's an error
                    if (!expr || expr.length === 0) {
                        this._unexpectedToken(tokenStream.LT(1));
                    }

                    prio = this._prio();

                    /*
                     * If hacks should be allowed, then only check the root
                     * property. If hacks should not be allowed, treat
                     * _property or *property as invalid properties.
                     */
                    propertyName = property.toString();
                    if (this.options.starHack && property.hack === "*" ||
                            this.options.underscoreHack && property.hack === "_") {

                        propertyName = property.text;
                    }

                    try {
                        this._validateProperty(propertyName, expr);
                    } catch (ex) {
                        invalid = ex;
                    }

                    this.fire({
                        type:       "property",
                        property:   property,
                        value:      expr,
                        important:  prio,
                        line:       property.line,
                        col:        property.col,
                        invalid:    invalid
                    });

                    return true;
                } else {
                    return false;
                }
            },

            _prio: function() {
                /*
                 * prio
                 *   : IMPORTANT_SYM S*
                 *   ;
                 */

                var tokenStream = this._tokenStream,
                    result      = tokenStream.match(Tokens.IMPORTANT_SYM);

                this._readWhitespace();
                return result;
            },

            _expr: function(inFunction) {
                /*
                 * expr
                 *   : term [ operator term ]*
                 *   ;
                 */

                var values      = [],
                    //valueParts    = [],
                    value       = null,
                    operator    = null;

                value = this._term(inFunction);
                if (value !== null) {

                    values.push(value);

                    do {
                        operator = this._operator(inFunction);

                        //if there's an operator, keep building up the value parts
                        if (operator) {
                            values.push(operator);
                        } /*else {
                            //if there's not an operator, you have a full value
                            values.push(new PropertyValue(valueParts, valueParts[0].line, valueParts[0].col));
                            valueParts = [];
                        }*/

                        value = this._term(inFunction);

                        if (value === null) {
                            break;
                        } else {
                            values.push(value);
                        }
                    } while (true);
                }

                //cleanup
                /*if (valueParts.length) {
                    values.push(new PropertyValue(valueParts, valueParts[0].line, valueParts[0].col));
                }*/

                return values.length > 0 ? new PropertyValue(values, values[0].line, values[0].col) : null;
            },

            _term: function(inFunction) {

                /*
                 * term
                 *   : unary_operator?
                 *     [ NUMBER S* | PERCENTAGE S* | LENGTH S* | ANGLE S* |
                 *       TIME S* | FREQ S* | function | ie_function ]
                 *   | STRING S* | IDENT S* | URI S* | UNICODERANGE S* | hexcolor
                 *   ;
                 */

                var tokenStream = this._tokenStream,
                    unary       = null,
                    value       = null,
                    endChar     = null,
                    part        = null,
                    token,
                    line,
                    col;

                //returns the operator or null
                unary = this._unary_operator();
                if (unary !== null) {
                    line = tokenStream.token().startLine;
                    col = tokenStream.token().startCol;
                }

                //exception for IE filters
                if (tokenStream.peek() === Tokens.IE_FUNCTION && this.options.ieFilters) {

                    value = this._ie_function();
                    if (unary === null) {
                        line = tokenStream.token().startLine;
                        col = tokenStream.token().startCol;
                    }

                //see if it's a simple block
                } else if (inFunction && tokenStream.match([Tokens.LPAREN, Tokens.LBRACE, Tokens.LBRACKET])) {

                    token = tokenStream.token();
                    endChar = token.endChar;
                    value = token.value + this._expr(inFunction).text;
                    if (unary === null) {
                        line = tokenStream.token().startLine;
                        col = tokenStream.token().startCol;
                    }
                    tokenStream.mustMatch(Tokens.type(endChar));
                    value += endChar;
                    this._readWhitespace();

                //see if there's a simple match
                } else if (tokenStream.match([Tokens.NUMBER, Tokens.PERCENTAGE, Tokens.LENGTH,
                        Tokens.ANGLE, Tokens.TIME,
                        Tokens.FREQ, Tokens.STRING, Tokens.IDENT, Tokens.URI, Tokens.UNICODE_RANGE])) {

                    value = tokenStream.token().value;
                    if (unary === null) {
                        line = tokenStream.token().startLine;
                        col = tokenStream.token().startCol;
                        // Correct potentially-inaccurate IDENT parsing in
                        // PropertyValuePart constructor.
                        part = PropertyValuePart.fromToken(tokenStream.token());
                    }
                    this._readWhitespace();
                } else {

                    //see if it's a color
                    token = this._hexcolor();
                    if (token === null) {

                        //if there's no unary, get the start of the next token for line/col info
                        if (unary === null) {
                            line = tokenStream.LT(1).startLine;
                            col = tokenStream.LT(1).startCol;
                        }

                        //has to be a function
                        if (value === null) {

                            /*
                             * This checks for alpha(opacity=0) style of IE
                             * functions. IE_FUNCTION only presents progid: style.
                             */
                            if (tokenStream.LA(3) === Tokens.EQUALS && this.options.ieFilters) {
                                value = this._ie_function();
                            } else {
                                value = this._function();
                            }
                        }

                        /*if (value === null) {
                            return null;
                            //throw new Error("Expected identifier at line " + tokenStream.token().startLine + ", character " +  tokenStream.token().startCol + ".");
                        }*/

                    } else {
                        value = token.value;
                        if (unary === null) {
                            line = token.startLine;
                            col = token.startCol;
                        }
                    }

                }

                return part !== null ? part : value !== null ?
                        new PropertyValuePart(unary !== null ? unary + value : value, line, col) :
                        null;

            },

            _function: function() {

                /*
                 * function
                 *   : FUNCTION S* expr ')' S*
                 *   ;
                 */

                var tokenStream = this._tokenStream,
                    functionText = null,
                    expr        = null,
                    lt;

                if (tokenStream.match(Tokens.FUNCTION)) {
                    functionText = tokenStream.token().value;
                    this._readWhitespace();
                    expr = this._expr(true);
                    functionText += expr;

                    //START: Horrible hack in case it's an IE filter
                    if (this.options.ieFilters && tokenStream.peek() === Tokens.EQUALS) {
                        do {

                            if (this._readWhitespace()) {
                                functionText += tokenStream.token().value;
                            }

                            //might be second time in the loop
                            if (tokenStream.LA(0) === Tokens.COMMA) {
                                functionText += tokenStream.token().value;
                            }

                            tokenStream.match(Tokens.IDENT);
                            functionText += tokenStream.token().value;

                            tokenStream.match(Tokens.EQUALS);
                            functionText += tokenStream.token().value;

                            //functionText += this._term();
                            lt = tokenStream.peek();
                            while (lt !== Tokens.COMMA && lt !== Tokens.S && lt !== Tokens.RPAREN) {
                                tokenStream.get();
                                functionText += tokenStream.token().value;
                                lt = tokenStream.peek();
                            }
                        } while (tokenStream.match([Tokens.COMMA, Tokens.S]));
                    }

                    //END: Horrible Hack

                    tokenStream.match(Tokens.RPAREN);
                    functionText += ")";
                    this._readWhitespace();
                }

                return functionText;
            },

            _ie_function: function() {

                /* (My own extension)
                 * ie_function
                 *   : IE_FUNCTION S* IDENT '=' term [S* ','? IDENT '=' term]+ ')' S*
                 *   ;
                 */

                var tokenStream = this._tokenStream,
                    functionText = null,
                    lt;

                //IE function can begin like a regular function, too
                if (tokenStream.match([Tokens.IE_FUNCTION, Tokens.FUNCTION])) {
                    functionText = tokenStream.token().value;

                    do {

                        if (this._readWhitespace()) {
                            functionText += tokenStream.token().value;
                        }

                        //might be second time in the loop
                        if (tokenStream.LA(0) === Tokens.COMMA) {
                            functionText += tokenStream.token().value;
                        }

                        tokenStream.match(Tokens.IDENT);
                        functionText += tokenStream.token().value;

                        tokenStream.match(Tokens.EQUALS);
                        functionText += tokenStream.token().value;

                        //functionText += this._term();
                        lt = tokenStream.peek();
                        while (lt !== Tokens.COMMA && lt !== Tokens.S && lt !== Tokens.RPAREN) {
                            tokenStream.get();
                            functionText += tokenStream.token().value;
                            lt = tokenStream.peek();
                        }
                    } while (tokenStream.match([Tokens.COMMA, Tokens.S]));

                    tokenStream.match(Tokens.RPAREN);
                    functionText += ")";
                    this._readWhitespace();
                }

                return functionText;
            },

            _hexcolor: function() {
                /*
                 * There is a constraint on the color that it must
                 * have either 3 or 6 hex-digits (i.e., [0-9a-fA-F])
                 * after the "#"; e.g., "#000" is OK, but "#abcd" is not.
                 *
                 * hexcolor
                 *   : HASH S*
                 *   ;
                 */

                var tokenStream = this._tokenStream,
                    token = null,
                    color;

                if (tokenStream.match(Tokens.HASH)) {

                    //need to do some validation here

                    token = tokenStream.token();
                    color = token.value;
                    if (!/#[a-f0-9]{3,6}/i.test(color)) {
                        throw new SyntaxError("Expected a hex color but found '" + color + "' at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol);
                    }
                    this._readWhitespace();
                }

                return token;
            },

            //-----------------------------------------------------------------
            // Animations methods
            //-----------------------------------------------------------------

            _keyframes: function() {

                /*
                 * keyframes:
                 *   : KEYFRAMES_SYM S* keyframe_name S* '{' S* keyframe_rule* '}' {
                 *   ;
                 */
                var tokenStream = this._tokenStream,
                    token,
                    tt,
                    name,
                    prefix = "";

                tokenStream.mustMatch(Tokens.KEYFRAMES_SYM);
                token = tokenStream.token();
                if (/^@\-([^\-]+)\-/.test(token.value)) {
                    prefix = RegExp.$1;
                }

                this._readWhitespace();
                name = this._keyframe_name();

                this._readWhitespace();
                tokenStream.mustMatch(Tokens.LBRACE);

                this.fire({
                    type:   "startkeyframes",
                    name:   name,
                    prefix: prefix,
                    line:   token.startLine,
                    col:    token.startCol
                });

                this._readWhitespace();
                tt = tokenStream.peek();

                //check for key
                while (tt === Tokens.IDENT || tt === Tokens.PERCENTAGE) {
                    this._keyframe_rule();
                    this._readWhitespace();
                    tt = tokenStream.peek();
                }

                this.fire({
                    type:   "endkeyframes",
                    name:   name,
                    prefix: prefix,
                    line:   token.startLine,
                    col:    token.startCol
                });

                this._readWhitespace();
                tokenStream.mustMatch(Tokens.RBRACE);
                this._readWhitespace();

            },

            _keyframe_name: function() {

                /*
                 * keyframe_name:
                 *   : IDENT
                 *   | STRING
                 *   ;
                 */
                var tokenStream = this._tokenStream;

                tokenStream.mustMatch([Tokens.IDENT, Tokens.STRING]);
                return SyntaxUnit.fromToken(tokenStream.token());
            },

            _keyframe_rule: function() {

                /*
                 * keyframe_rule:
                 *   : key_list S*
                 *     '{' S* declaration [ ';' S* declaration ]* '}' S*
                 *   ;
                 */
                var keyList = this._key_list();

                this.fire({
                    type:   "startkeyframerule",
                    keys:   keyList,
                    line:   keyList[0].line,
                    col:    keyList[0].col
                });

                this._readDeclarations(true);

                this.fire({
                    type:   "endkeyframerule",
                    keys:   keyList,
                    line:   keyList[0].line,
                    col:    keyList[0].col
                });

            },

            _key_list: function() {

                /*
                 * key_list:
                 *   : key [ S* ',' S* key]*
                 *   ;
                 */
                var tokenStream = this._tokenStream,
                    keyList = [];

                //must be least one key
                keyList.push(this._key());

                this._readWhitespace();

                while (tokenStream.match(Tokens.COMMA)) {
                    this._readWhitespace();
                    keyList.push(this._key());
                    this._readWhitespace();
                }

                return keyList;
            },

            _key: function() {
                /*
                 * There is a restriction that IDENT can be only "from" or "to".
                 *
                 * key
                 *   : PERCENTAGE
                 *   | IDENT
                 *   ;
                 */

                var tokenStream = this._tokenStream,
                    token;

                if (tokenStream.match(Tokens.PERCENTAGE)) {
                    return SyntaxUnit.fromToken(tokenStream.token());
                } else if (tokenStream.match(Tokens.IDENT)) {
                    token = tokenStream.token();

                    if (/from|to/i.test(token.value)) {
                        return SyntaxUnit.fromToken(token);
                    }

                    tokenStream.unget();
                }

                //if it gets here, there wasn't a valid token, so time to explode
                this._unexpectedToken(tokenStream.LT(1));
            },

            //-----------------------------------------------------------------
            // Helper methods
            //-----------------------------------------------------------------

            /**
             * Not part of CSS grammar, but useful for skipping over
             * combination of white space and HTML-style comments.
             * @return {void}
             * @method _skipCruft
             * @private
             */
            _skipCruft: function() {
                while (this._tokenStream.match([Tokens.S, Tokens.CDO, Tokens.CDC])) {
                    //noop
                }
            },

            /**
             * Not part of CSS grammar, but this pattern occurs frequently
             * in the official CSS grammar. Split out here to eliminate
             * duplicate code.
             * @param {Boolean} checkStart Indicates if the rule should check
             *      for the left brace at the beginning.
             * @param {Boolean} readMargins Indicates if the rule should check
             *      for margin patterns.
             * @return {void}
             * @method _readDeclarations
             * @private
             */
            _readDeclarations: function(checkStart, readMargins) {
                /*
                 * Reads the pattern
                 * S* '{' S* declaration [ ';' S* declaration ]* '}' S*
                 * or
                 * S* '{' S* [ declaration | margin ]? [ ';' S* [ declaration | margin ]? ]* '}' S*
                 * Note that this is how it is described in CSS3 Paged Media, but is actually incorrect.
                 * A semicolon is only necessary following a declaration if there's another declaration
                 * or margin afterwards.
                 */
                var tokenStream = this._tokenStream,
                    tt;


                this._readWhitespace();

                if (checkStart) {
                    tokenStream.mustMatch(Tokens.LBRACE);
                }

                this._readWhitespace();

                try {

                    while (true) {

                        if (tokenStream.match(Tokens.SEMICOLON) || (readMargins && this._margin())) {
                            //noop
                        } else if (this._declaration()) {
                            if (!tokenStream.match(Tokens.SEMICOLON)) {
                                break;
                            }
                        } else {
                            break;
                        }

                        //if ((!this._margin() && !this._declaration()) || !tokenStream.match(Tokens.SEMICOLON)){
                        //    break;
                        //}
                        this._readWhitespace();
                    }

                    tokenStream.mustMatch(Tokens.RBRACE);
                    this._readWhitespace();

                } catch (ex) {
                    if (ex instanceof SyntaxError && !this.options.strict) {

                        //fire error event
                        this.fire({
                            type:       "error",
                            error:      ex,
                            message:    ex.message,
                            line:       ex.line,
                            col:        ex.col
                        });

                        //see if there's another declaration
                        tt = tokenStream.advance([Tokens.SEMICOLON, Tokens.RBRACE]);
                        if (tt === Tokens.SEMICOLON) {
                            //if there's a semicolon, then there might be another declaration
                            this._readDeclarations(false, readMargins);
                        } else if (tt !== Tokens.RBRACE) {
                            //if there's a right brace, the rule is finished so don't do anything
                            //otherwise, rethrow the error because it wasn't handled properly
                            throw ex;
                        }

                    } else {
                        //not a syntax error, rethrow it
                        throw ex;
                    }
                }

            },

            /**
             * In some cases, you can end up with two white space tokens in a
             * row. Instead of making a change in every function that looks for
             * white space, this function is used to match as much white space
             * as necessary.
             * @method _readWhitespace
             * @return {String} The white space if found, empty string if not.
             * @private
             */
            _readWhitespace: function() {

                var tokenStream = this._tokenStream,
                    ws = "";

                while (tokenStream.match(Tokens.S)) {
                    ws += tokenStream.token().value;
                }

                return ws;
            },


            /**
             * Throws an error when an unexpected token is found.
             * @param {Object} token The token that was found.
             * @method _unexpectedToken
             * @return {void}
             * @private
             */
            _unexpectedToken: function(token) {
                throw new SyntaxError("Unexpected token '" + token.value + "' at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol);
            },

            /**
             * Helper method used for parsing subparts of a style sheet.
             * @return {void}
             * @method _verifyEnd
             * @private
             */
            _verifyEnd: function() {
                if (this._tokenStream.LA(1) !== Tokens.EOF) {
                    this._unexpectedToken(this._tokenStream.LT(1));
                }
            },

            //-----------------------------------------------------------------
            // Validation methods
            //-----------------------------------------------------------------
            _validateProperty: function(property, value) {
                Validation.validate(property, value);
            },

            //-----------------------------------------------------------------
            // Parsing methods
            //-----------------------------------------------------------------

            parse: function(input) {
                this._tokenStream = new TokenStream(input, Tokens);
                this._stylesheet();
            },

            parseStyleSheet: function(input) {
                //just passthrough
                return this.parse(input);
            },

            parseMediaQuery: function(input) {
                this._tokenStream = new TokenStream(input, Tokens);
                var result = this._media_query();

                //if there's anything more, then it's an invalid selector
                this._verifyEnd();

                //otherwise return result
                return result;
            },

            /**
             * Parses a property value (everything after the semicolon).
             * @return {parserlib.css.PropertyValue} The property value.
             * @throws parserlib.util.SyntaxError If an unexpected token is found.
             * @method parserPropertyValue
             */
            parsePropertyValue: function(input) {

                this._tokenStream = new TokenStream(input, Tokens);
                this._readWhitespace();

                var result = this._expr();

                //okay to have a trailing white space
                this._readWhitespace();

                //if there's anything more, then it's an invalid selector
                this._verifyEnd();

                //otherwise return result
                return result;
            },

            /**
             * Parses a complete CSS rule, including selectors and
             * properties.
             * @param {String} input The text to parser.
             * @return {Boolean} True if the parse completed successfully, false if not.
             * @method parseRule
             */
            parseRule: function(input) {
                this._tokenStream = new TokenStream(input, Tokens);

                //skip any leading white space
                this._readWhitespace();

                var result = this._ruleset();

                //skip any trailing white space
                this._readWhitespace();

                //if there's anything more, then it's an invalid selector
                this._verifyEnd();

                //otherwise return result
                return result;
            },

            /**
             * Parses a single CSS selector (no comma)
             * @param {String} input The text to parse as a CSS selector.
             * @return {Selector} An object representing the selector.
             * @throws parserlib.util.SyntaxError If an unexpected token is found.
             * @method parseSelector
             */
            parseSelector: function(input) {

                this._tokenStream = new TokenStream(input, Tokens);

                //skip any leading white space
                this._readWhitespace();

                var result = this._selector();

                //skip any trailing white space
                this._readWhitespace();

                //if there's anything more, then it's an invalid selector
                this._verifyEnd();

                //otherwise return result
                return result;
            },

            /**
             * Parses an HTML style attribute: a set of CSS declarations
             * separated by semicolons.
             * @param {String} input The text to parse as a style attribute
             * @return {void}
             * @method parseStyleAttribute
             */
            parseStyleAttribute: function(input) {
                input += "}"; // for error recovery in _readDeclarations()
                this._tokenStream = new TokenStream(input, Tokens);
                this._readDeclarations();
            }
        };

    //copy over onto prototype
    for (prop in additions) {
        if (Object.prototype.hasOwnProperty.call(additions, prop)) {
            proto[prop] = additions[prop];
        }
    }

    return proto;
}();


/*
nth
  : S* [ ['-'|'+']? INTEGER? {N} [ S* ['-'|'+'] S* INTEGER ]? |
         ['-'|'+']? INTEGER | {O}{D}{D} | {E}{V}{E}{N} ] S*
  ;
*/

},{"../util/EventTarget":23,"../util/SyntaxError":25,"../util/SyntaxUnit":26,"./Combinator":2,"./MediaFeature":4,"./MediaQuery":5,"./PropertyName":8,"./PropertyValue":9,"./PropertyValuePart":11,"./Selector":13,"./SelectorPart":14,"./SelectorSubPart":15,"./TokenStream":17,"./Tokens":18,"./Validation":19}],7:[function(require,module,exports){
"use strict";

/* exported Properties */

var Properties = module.exports = {
    __proto__: null,

    //A
    "align-items"                   : "flex-start | flex-end | center | baseline | stretch",
    "align-content"                 : "flex-start | flex-end | center | space-between | space-around | stretch",
    "align-self"                    : "auto | flex-start | flex-end | center | baseline | stretch",
    "all"                           : "initial | inherit | unset",
    "-webkit-align-items"           : "flex-start | flex-end | center | baseline | stretch",
    "-webkit-align-content"         : "flex-start | flex-end | center | space-between | space-around | stretch",
    "-webkit-align-self"            : "auto | flex-start | flex-end | center | baseline | stretch",
    "alignment-adjust"              : "auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | <percentage> | <length>",
    "alignment-baseline"            : "auto | baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
    "animation"                     : 1,
    "animation-delay"               : "<time>#",
    "animation-direction"           : "<single-animation-direction>#",
    "animation-duration"            : "<time>#",
    "animation-fill-mode"           : "[ none | forwards | backwards | both ]#",
    "animation-iteration-count"     : "[ <number> | infinite ]#",
    "animation-name"                : "[ none | <single-animation-name> ]#",
    "animation-play-state"          : "[ running | paused ]#",
    "animation-timing-function"     : 1,

    //vendor prefixed
    "-moz-animation-delay"               : "<time>#",
    "-moz-animation-direction"           : "[ normal | alternate ]#",
    "-moz-animation-duration"            : "<time>#",
    "-moz-animation-iteration-count"     : "[ <number> | infinite ]#",
    "-moz-animation-name"                : "[ none | <single-animation-name> ]#",
    "-moz-animation-play-state"          : "[ running | paused ]#",

    "-ms-animation-delay"               : "<time>#",
    "-ms-animation-direction"           : "[ normal | alternate ]#",
    "-ms-animation-duration"            : "<time>#",
    "-ms-animation-iteration-count"     : "[ <number> | infinite ]#",
    "-ms-animation-name"                : "[ none | <single-animation-name> ]#",
    "-ms-animation-play-state"          : "[ running | paused ]#",

    "-webkit-animation-delay"               : "<time>#",
    "-webkit-animation-direction"           : "[ normal | alternate ]#",
    "-webkit-animation-duration"            : "<time>#",
    "-webkit-animation-fill-mode"           : "[ none | forwards | backwards | both ]#",
    "-webkit-animation-iteration-count"     : "[ <number> | infinite ]#",
    "-webkit-animation-name"                : "[ none | <single-animation-name> ]#",
    "-webkit-animation-play-state"          : "[ running | paused ]#",

    "-o-animation-delay"               : "<time>#",
    "-o-animation-direction"           : "[ normal | alternate ]#",
    "-o-animation-duration"            : "<time>#",
    "-o-animation-iteration-count"     : "[ <number> | infinite ]#",
    "-o-animation-name"                : "[ none | <single-animation-name> ]#",
    "-o-animation-play-state"          : "[ running | paused ]#",

    "appearance"                    : "none | auto",
    "-moz-appearance"               : "none | button | button-arrow-down | button-arrow-next | button-arrow-previous | button-arrow-up | button-bevel | button-focus | caret | checkbox | checkbox-container | checkbox-label | checkmenuitem | dualbutton | groupbox | listbox | listitem | menuarrow | menubar | menucheckbox | menuimage | menuitem | menuitemtext | menulist | menulist-button | menulist-text | menulist-textfield | menupopup | menuradio | menuseparator | meterbar | meterchunk | progressbar | progressbar-vertical | progresschunk | progresschunk-vertical | radio | radio-container | radio-label | radiomenuitem | range | range-thumb | resizer | resizerpanel | scale-horizontal | scalethumbend | scalethumb-horizontal | scalethumbstart | scalethumbtick | scalethumb-vertical | scale-vertical | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | separator | sheet | spinner | spinner-downbutton | spinner-textfield | spinner-upbutton | splitter | statusbar | statusbarpanel | tab | tabpanel | tabpanels | tab-scroll-arrow-back | tab-scroll-arrow-forward | textfield | textfield-multiline | toolbar | toolbarbutton | toolbarbutton-dropdown | toolbargripper | toolbox | tooltip | treeheader | treeheadercell | treeheadersortarrow | treeitem | treeline | treetwisty | treetwistyopen | treeview | -moz-mac-unified-toolbar | -moz-win-borderless-glass | -moz-win-browsertabbar-toolbox | -moz-win-communicationstext | -moz-win-communications-toolbox | -moz-win-exclude-glass | -moz-win-glass | -moz-win-mediatext | -moz-win-media-toolbox | -moz-window-button-box | -moz-window-button-box-maximized | -moz-window-button-close | -moz-window-button-maximize | -moz-window-button-minimize | -moz-window-button-restore | -moz-window-frame-bottom | -moz-window-frame-left | -moz-window-frame-right | -moz-window-titlebar | -moz-window-titlebar-maximized",
    "-ms-appearance"                : "none | icon | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | radio | radio-button | checkbox | menu-item | tab | menu | menubar | pull-down-menu | pop-up-menu | list-menu | radio-group | checkbox-group | outline-tree | range | field | combo-box | signature | password | normal",
    "-webkit-appearance"            : "none | button | button-bevel | caps-lock-indicator | caret | checkbox | default-button | listbox	| listitem | media-fullscreen-button | media-mute-button | media-play-button | media-seek-back-button	| media-seek-forward-button	| media-slider | media-sliderthumb | menulist	| menulist-button	| menulist-text	| menulist-textfield | push-button	| radio	| searchfield	| searchfield-cancel-button	| searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical	| square-button	| textarea	| textfield	| scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbargripper-horizontal | scrollbargripper-vertical | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical",
    "-o-appearance"                 : "none | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | radio | radio-button | checkbox | menu-item | tab | menu | menubar | pull-down-menu | pop-up-menu | list-menu | radio-group | checkbox-group | outline-tree | range | field | combo-box | signature | password | normal",

    "azimuth"                       : "<azimuth>",

    //B
    "backface-visibility"           : "visible | hidden",
    "background"                    : 1,
    "background-attachment"         : "<attachment>#",
    "background-clip"               : "<box>#",
    "background-color"              : "<color>",
    "background-image"              : "<bg-image>#",
    "background-origin"             : "<box>#",
    "background-position"           : "<bg-position>",
    "background-repeat"             : "<repeat-style>#",
    "background-size"               : "<bg-size>#",
    "baseline-shift"                : "baseline | sub | super | <percentage> | <length>",
    "behavior"                      : 1,
    "binding"                       : 1,
    "bleed"                         : "<length>",
    "bookmark-label"                : "<content> | <attr> | <string>",
    "bookmark-level"                : "none | <integer>",
    "bookmark-state"                : "open | closed",
    "bookmark-target"               : "none | <uri> | <attr>",
    "border"                        : "<border-width> || <border-style> || <color>",
    "border-bottom"                 : "<border-width> || <border-style> || <color>",
    "border-bottom-color"           : "<color>",
    "border-bottom-left-radius"     :  "<x-one-radius>",
    "border-bottom-right-radius"    :  "<x-one-radius>",
    "border-bottom-style"           : "<border-style>",
    "border-bottom-width"           : "<border-width>",
    "border-collapse"               : "collapse | separate",
    "border-color"                  : "<color>{1,4}",
    "border-image"                  : 1,
    "border-image-outset"           : "[ <length> | <number> ]{1,4}",
    "border-image-repeat"           : "[ stretch | repeat | round ]{1,2}",
    "border-image-slice"            : "<border-image-slice>",
    "border-image-source"           : "<image> | none",
    "border-image-width"            : "[ <length> | <percentage> | <number> | auto ]{1,4}",
    "border-left"                   : "<border-width> || <border-style> || <color>",
    "border-left-color"             : "<color>",
    "border-left-style"             : "<border-style>",
    "border-left-width"             : "<border-width>",
    "border-radius"                 : "<border-radius>",
    "border-right"                  : "<border-width> || <border-style> || <color>",
    "border-right-color"            : "<color>",
    "border-right-style"            : "<border-style>",
    "border-right-width"            : "<border-width>",
    "border-spacing"                : "<length>{1,2}",
    "border-style"                  : "<border-style>{1,4}",
    "border-top"                    : "<border-width> || <border-style> || <color>",
    "border-top-color"              : "<color>",
    "border-top-left-radius"        : "<x-one-radius>",
    "border-top-right-radius"       : "<x-one-radius>",
    "border-top-style"              : "<border-style>",
    "border-top-width"              : "<border-width>",
    "border-width"                  : "<border-width>{1,4}",
    "bottom"                        : "<margin-width>",
    "-moz-box-align"                : "start | end | center | baseline | stretch",
    "-moz-box-decoration-break"     : "slice | clone",
    "-moz-box-direction"            : "normal | reverse",
    "-moz-box-flex"                 : "<number>",
    "-moz-box-flex-group"           : "<integer>",
    "-moz-box-lines"                : "single | multiple",
    "-moz-box-ordinal-group"        : "<integer>",
    "-moz-box-orient"               : "horizontal | vertical | inline-axis | block-axis",
    "-moz-box-pack"                 : "start | end | center | justify",
    "-o-box-decoration-break"       : "slice | clone",
    "-webkit-box-align"             : "start | end | center | baseline | stretch",
    "-webkit-box-decoration-break"  : "slice | clone",
    "-webkit-box-direction"         : "normal | reverse",
    "-webkit-box-flex"              : "<number>",
    "-webkit-box-flex-group"        : "<integer>",
    "-webkit-box-lines"             : "single | multiple",
    "-webkit-box-ordinal-group"     : "<integer>",
    "-webkit-box-orient"            : "horizontal | vertical | inline-axis | block-axis",
    "-webkit-box-pack"              : "start | end | center | justify",
    "box-decoration-break"          : "slice | clone",
    "box-shadow"                    : "<box-shadow>",
    "box-sizing"                    : "content-box | border-box",
    "break-after"                   : "auto | always | avoid | left | right | page | column | avoid-page | avoid-column",
    "break-before"                  : "auto | always | avoid | left | right | page | column | avoid-page | avoid-column",
    "break-inside"                  : "auto | avoid | avoid-page | avoid-column",

    //C
    "caption-side"                  : "top | bottom",
    "clear"                         : "none | right | left | both",
    "clip"                          : "<shape> | auto",
    "-webkit-clip-path"             : "<clip-source> | <clip-path> | none",
    "clip-path"                     : "<clip-source> | <clip-path> | none",
    "clip-rule"                     : "nonzero | evenodd",
    "color"                         : "<color>",
    "color-interpolation"           : "auto | sRGB | linearRGB",
    "color-interpolation-filters"   : "auto | sRGB | linearRGB",
    "color-profile"                 : 1,
    "color-rendering"               : "auto | optimizeSpeed | optimizeQuality",
    "column-count"                  : "<integer> | auto",                      //https://www.w3.org/TR/css3-multicol/
    "column-fill"                   : "auto | balance",
    "column-gap"                    : "<length> | normal",
    "column-rule"                   : "<border-width> || <border-style> || <color>",
    "column-rule-color"             : "<color>",
    "column-rule-style"             : "<border-style>",
    "column-rule-width"             : "<border-width>",
    "column-span"                   : "none | all",
    "column-width"                  : "<length> | auto",
    "columns"                       : 1,
    "content"                       : 1,
    "counter-increment"             : 1,
    "counter-reset"                 : 1,
    "crop"                          : "<shape> | auto",
    "cue"                           : "cue-after | cue-before",
    "cue-after"                     : 1,
    "cue-before"                    : 1,
    "cursor"                        : 1,

    //D
    "direction"                     : "ltr | rtl",
    "display"                       : "inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | grid | inline-grid | run-in | ruby | ruby-base | ruby-text | ruby-base-container | ruby-text-container | contents | none | -moz-box | -moz-inline-block | -moz-inline-box | -moz-inline-grid | -moz-inline-stack | -moz-inline-table | -moz-grid | -moz-grid-group | -moz-grid-line | -moz-groupbox | -moz-deck | -moz-popup | -moz-stack | -moz-marker | -webkit-box | -webkit-inline-box | -ms-flexbox | -ms-inline-flexbox | flex | -webkit-flex | inline-flex | -webkit-inline-flex",
    "dominant-baseline"             : "auto | use-script | no-change | reset-size | ideographic | alphabetic | hanging | mathematical | central | middle | text-after-edge | text-before-edge",
    "drop-initial-after-adjust"     : "central | middle | after-edge | text-after-edge | ideographic | alphabetic | mathematical | <percentage> | <length>",
    "drop-initial-after-align"      : "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
    "drop-initial-before-adjust"    : "before-edge | text-before-edge | central | middle | hanging | mathematical | <percentage> | <length>",
    "drop-initial-before-align"     : "caps-height | baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
    "drop-initial-size"             : "auto | line | <length> | <percentage>",
    "drop-initial-value"            : "<integer>",

    //E
    "elevation"                     : "<angle> | below | level | above | higher | lower",
    "empty-cells"                   : "show | hide",
    "enable-background"             : 1,

    //F
    "fill"                          : "<paint>",
    "fill-opacity"                  : "<opacity-value>",
    "fill-rule"                     : "nonzero | evenodd",
    "filter"                        : "<filter-function-list> | none",
    "fit"                           : "fill | hidden | meet | slice",
    "fit-position"                  : 1,
    "flex"                          : "<flex>",
    "flex-basis"                    : "<width>",
    "flex-direction"                : "row | row-reverse | column | column-reverse",
    "flex-flow"                     : "<flex-direction> || <flex-wrap>",
    "flex-grow"                     : "<number>",
    "flex-shrink"                   : "<number>",
    "flex-wrap"                     : "nowrap | wrap | wrap-reverse",
    "-webkit-flex"                  : "<flex>",
    "-webkit-flex-basis"            : "<width>",
    "-webkit-flex-direction"        : "row | row-reverse | column | column-reverse",
    "-webkit-flex-flow"             : "<flex-direction> || <flex-wrap>",
    "-webkit-flex-grow"             : "<number>",
    "-webkit-flex-shrink"           : "<number>",
    "-webkit-flex-wrap"             : "nowrap | wrap | wrap-reverse",
    "-ms-flex"                      : "<flex>",
    "-ms-flex-align"                : "start | end | center | stretch | baseline",
    "-ms-flex-direction"            : "row | row-reverse | column | column-reverse",
    "-ms-flex-order"                : "<number>",
    "-ms-flex-pack"                 : "start | end | center | justify",
    "-ms-flex-wrap"                 : "nowrap | wrap | wrap-reverse",
    "float"                         : "left | right | none",
    "float-offset"                  : 1,
    "flood-color"                   : 1,
    "flood-opacity"                 : "<opacity-value>",
    "font"                          : "<font-shorthand> | caption | icon | menu | message-box | small-caption | status-bar",
    "font-family"                   : "<font-family>",
    "font-feature-settings"         : "<feature-tag-value> | normal",
    "font-kerning"                  : "auto | normal | none",
    "font-size"                     : "<font-size>",
    "font-size-adjust"              : "<number> | none",
    "font-stretch"                  : "<font-stretch>",
    "font-style"                    : "<font-style>",
    "font-variant"                  : "<font-variant> | normal | none",
    "font-variant-alternates"       : "<font-variant-alternates> | normal",
    "font-variant-caps"             : "<font-variant-caps> | normal",
    "font-variant-east-asian"       : "<font-variant-east-asian> | normal",
    "font-variant-ligatures"        : "<font-variant-ligatures> | normal | none",
    "font-variant-numeric"          : "<font-variant-numeric> | normal",
    "font-variant-position"         : "normal | sub | super",
    "font-weight"                   : "<font-weight>",

    //G
    "glyph-orientation-horizontal"  : "<glyph-angle>",
    "glyph-orientation-vertical"    : "auto | <glyph-angle>",
    "grid"                          : 1,
    "grid-area"                     : 1,
    "grid-auto-columns"             : 1,
    "grid-auto-flow"                : 1,
    "grid-auto-position"            : 1,
    "grid-auto-rows"                : 1,
    "grid-cell-stacking"            : "columns | rows | layer",
    "grid-column"                   : 1,
    "grid-columns"                  : 1,
    "grid-column-align"             : "start | end | center | stretch",
    "grid-column-sizing"            : 1,
    "grid-column-start"             : 1,
    "grid-column-end"               : 1,
    "grid-column-span"              : "<integer>",
    "grid-flow"                     : "none | rows | columns",
    "grid-layer"                    : "<integer>",
    "grid-row"                      : 1,
    "grid-rows"                     : 1,
    "grid-row-align"                : "start | end | center | stretch",
    "grid-row-start"                : 1,
    "grid-row-end"                  : 1,
    "grid-row-span"                 : "<integer>",
    "grid-row-sizing"               : 1,
    "grid-template"                 : 1,
    "grid-template-areas"           : 1,
    "grid-template-columns"         : 1,
    "grid-template-rows"            : 1,

    //H
    "hanging-punctuation"           : 1,
    "height"                        : "<margin-width> | <content-sizing>",
    "hyphenate-after"               : "<integer> | auto",
    "hyphenate-before"              : "<integer> | auto",
    "hyphenate-character"           : "<string> | auto",
    "hyphenate-lines"               : "no-limit | <integer>",
    "hyphenate-resource"            : 1,
    "hyphens"                       : "none | manual | auto",

    //I
    "icon"                          : 1,
    "image-orientation"             : "angle | auto",
    "image-rendering"               : "auto | optimizeSpeed | optimizeQuality",
    "image-resolution"              : 1,
    "ime-mode"                      : "auto | normal | active | inactive | disabled",
    "inline-box-align"              : "last | <integer>",

    //J
    "justify-content"               : "flex-start | flex-end | center | space-between | space-around",
    "-webkit-justify-content"       : "flex-start | flex-end | center | space-between | space-around",

    //K
    "kerning"                       : "auto | <length>",

    //L
    "left"                          : "<margin-width>",
    "letter-spacing"                : "<length> | normal",
    "line-height"                   : "<line-height>",
    "line-break"                    : "auto | loose | normal | strict",
    "line-stacking"                 : 1,
    "line-stacking-ruby"            : "exclude-ruby | include-ruby",
    "line-stacking-shift"           : "consider-shifts | disregard-shifts",
    "line-stacking-strategy"        : "inline-line-height | block-line-height | max-height | grid-height",
    "list-style"                    : 1,
    "list-style-image"              : "<uri> | none",
    "list-style-position"           : "inside | outside",
    "list-style-type"               : "disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-latin | upper-latin | armenian | georgian | lower-alpha | upper-alpha | none",

    //M
    "margin"                        : "<margin-width>{1,4}",
    "margin-bottom"                 : "<margin-width>",
    "margin-left"                   : "<margin-width>",
    "margin-right"                  : "<margin-width>",
    "margin-top"                    : "<margin-width>",
    "mark"                          : 1,
    "mark-after"                    : 1,
    "mark-before"                   : 1,
    "marker"                        : 1,
    "marker-end"                    : 1,
    "marker-mid"                    : 1,
    "marker-start"                  : 1,
    "marks"                         : 1,
    "marquee-direction"             : 1,
    "marquee-play-count"            : 1,
    "marquee-speed"                 : 1,
    "marquee-style"                 : 1,
    "mask"                          : 1,
    "max-height"                    : "<length> | <percentage> | <content-sizing> | none",
    "max-width"                     : "<length> | <percentage> | <content-sizing> | none",
    "min-height"                    : "<length> | <percentage> | <content-sizing> | contain-floats | -moz-contain-floats | -webkit-contain-floats",
    "min-width"                     : "<length> | <percentage> | <content-sizing> | contain-floats | -moz-contain-floats | -webkit-contain-floats",
    "move-to"                       : 1,

    //N
    "nav-down"                      : 1,
    "nav-index"                     : 1,
    "nav-left"                      : 1,
    "nav-right"                     : 1,
    "nav-up"                        : 1,

    //O
    "object-fit"                    : "fill | contain | cover | none | scale-down",
    "object-position"               : "<position>",
    "opacity"                       : "<opacity-value>",
    "order"                         : "<integer>",
    "-webkit-order"                 : "<integer>",
    "orphans"                       : "<integer>",
    "outline"                       : 1,
    "outline-color"                 : "<color> | invert",
    "outline-offset"                : 1,
    "outline-style"                 : "<border-style>",
    "outline-width"                 : "<border-width>",
    "overflow"                      : "visible | hidden | scroll | auto",
    "overflow-style"                : 1,
    "overflow-wrap"                 : "normal | break-word",
    "overflow-x"                    : 1,
    "overflow-y"                    : 1,

    //P
    "padding"                       : "<padding-width>{1,4}",
    "padding-bottom"                : "<padding-width>",
    "padding-left"                  : "<padding-width>",
    "padding-right"                 : "<padding-width>",
    "padding-top"                   : "<padding-width>",
    "page"                          : 1,
    "page-break-after"              : "auto | always | avoid | left | right",
    "page-break-before"             : "auto | always | avoid | left | right",
    "page-break-inside"             : "auto | avoid",
    "page-policy"                   : 1,
    "pause"                         : 1,
    "pause-after"                   : 1,
    "pause-before"                  : 1,
    "perspective"                   : 1,
    "perspective-origin"            : 1,
    "phonemes"                      : 1,
    "pitch"                         : 1,
    "pitch-range"                   : 1,
    "play-during"                   : 1,
    "pointer-events"                : "auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all",
    "position"                      : "static | relative | absolute | fixed",
    "presentation-level"            : 1,
    "punctuation-trim"              : 1,

    //Q
    "quotes"                        : 1,

    //R
    "rendering-intent"              : 1,
    "resize"                        : 1,
    "rest"                          : 1,
    "rest-after"                    : 1,
    "rest-before"                   : 1,
    "richness"                      : 1,
    "right"                         : "<margin-width>",
    "rotation"                      : 1,
    "rotation-point"                : 1,
    "ruby-align"                    : 1,
    "ruby-overhang"                 : 1,
    "ruby-position"                 : 1,
    "ruby-span"                     : 1,

    //S
    "shape-rendering"               : "auto | optimizeSpeed | crispEdges | geometricPrecision",
    "size"                          : 1,
    "speak"                         : "normal | none | spell-out",
    "speak-header"                  : "once | always",
    "speak-numeral"                 : "digits | continuous",
    "speak-punctuation"             : "code | none",
    "speech-rate"                   : 1,
    "src"                           : 1,
    "stop-color"                    : 1,
    "stop-opacity"                  : "<opacity-value>",
    "stress"                        : 1,
    "string-set"                    : 1,
    "stroke"                        : "<paint>",
    "stroke-dasharray"              : "none | <dasharray>",
    "stroke-dashoffset"             : "<percentage> | <length>",
    "stroke-linecap"                : "butt | round | square",
    "stroke-linejoin"               : "miter | round | bevel",
    "stroke-miterlimit"             : "<miterlimit>",
    "stroke-opacity"                : "<opacity-value>",
    "stroke-width"                  : "<percentage> | <length>",

    "table-layout"                  : "auto | fixed",
    "tab-size"                      : "<integer> | <length>",
    "target"                        : 1,
    "target-name"                   : 1,
    "target-new"                    : 1,
    "target-position"               : 1,
    "text-align"                    : "left | right | center | justify | match-parent | start | end",
    "text-align-last"               : 1,
    "text-anchor"                   : "start | middle | end",
    "text-decoration"               : "<text-decoration-line> || <text-decoration-style> || <text-decoration-color>",
    "text-decoration-color"         : "<text-decoration-color>",
    "text-decoration-line"          : "<text-decoration-line>",
    "text-decoration-style"         : "<text-decoration-style>",
    "text-emphasis"                 : 1,
    "text-height"                   : 1,
    "text-indent"                   : "<length> | <percentage>",
    "text-justify"                  : "auto | none | inter-word | inter-ideograph | inter-cluster | distribute | kashida",
    "text-outline"                  : 1,
    "text-overflow"                 : 1,
    "text-rendering"                : "auto | optimizeSpeed | optimizeLegibility | geometricPrecision",
    "text-shadow"                   : 1,
    "text-transform"                : "capitalize | uppercase | lowercase | none",
    "text-wrap"                     : "normal | none | avoid",
    "top"                           : "<margin-width>",
    "-ms-touch-action"              : "auto | none | pan-x | pan-y | pan-left | pan-right | pan-up | pan-down | manipulation",
    "touch-action"                  : "auto | none | pan-x | pan-y | pan-left | pan-right | pan-up | pan-down | manipulation",
    "transform"                     : 1,
    "transform-origin"              : 1,
    "transform-style"               : 1,
    "transition"                    : 1,
    "transition-delay"              : 1,
    "transition-duration"           : 1,
    "transition-property"           : 1,
    "transition-timing-function"    : 1,

    //U
    "unicode-bidi"                  : "normal | embed | isolate | bidi-override | isolate-override | plaintext",
    "user-modify"                   : "read-only | read-write | write-only",
    "user-select"                   : "none | text | toggle | element | elements | all",

    //V
    "vertical-align"                : "auto | use-script | baseline | sub | super | top | text-top | central | middle | bottom | text-bottom | <percentage> | <length>",
    "visibility"                    : "visible | hidden | collapse",
    "voice-balance"                 : 1,
    "voice-duration"                : 1,
    "voice-family"                  : 1,
    "voice-pitch"                   : 1,
    "voice-pitch-range"             : 1,
    "voice-rate"                    : 1,
    "voice-stress"                  : 1,
    "voice-volume"                  : 1,
    "volume"                        : 1,

    //W
    "white-space"                   : "normal | pre | nowrap | pre-wrap | pre-line | -pre-wrap | -o-pre-wrap | -moz-pre-wrap | -hp-pre-wrap",   // https://perishablepress.com/wrapping-content/
    "white-space-collapse"          : 1,
    "widows"                        : "<integer>",
    "width"                         : "<length> | <percentage> | <content-sizing> | auto",
    "will-change"                   : "<will-change>",
    "word-break"                    : "normal | keep-all | break-all",
    "word-spacing"                  : "<length> | normal",
    "word-wrap"                     : "normal | break-word",
    "writing-mode"                  : "horizontal-tb | vertical-rl | vertical-lr | lr-tb | rl-tb | tb-rl | bt-rl | tb-lr | bt-lr | lr-bt | rl-bt | lr | rl | tb",

    //Z
    "z-index"                       : "<integer> | auto",
    "zoom"                          : "<number> | <percentage> | normal"
};

},{}],8:[function(require,module,exports){
"use strict";

module.exports = PropertyName;

var SyntaxUnit = require("../util/SyntaxUnit");

var Parser = require("./Parser");

/**
 * Represents a selector combinator (whitespace, +, >).
 * @namespace parserlib.css
 * @class PropertyName
 * @extends parserlib.util.SyntaxUnit
 * @constructor
 * @param {String} text The text representation of the unit.
 * @param {String} hack The type of IE hack applied ("*", "_", or null).
 * @param {int} line The line of text on which the unit resides.
 * @param {int} col The column of text on which the unit resides.
 */
function PropertyName(text, hack, line, col) {

    SyntaxUnit.call(this, text, line, col, Parser.PROPERTY_NAME_TYPE);

    /**
     * The type of IE hack applied ("*", "_", or null).
     * @type String
     * @property hack
     */
    this.hack = hack;

}

PropertyName.prototype = new SyntaxUnit();
PropertyName.prototype.constructor = PropertyName;
PropertyName.prototype.toString = function() {
    return (this.hack ? this.hack : "") + this.text;
};

},{"../util/SyntaxUnit":26,"./Parser":6}],9:[function(require,module,exports){
"use strict";

module.exports = PropertyValue;

var SyntaxUnit = require("../util/SyntaxUnit");

var Parser = require("./Parser");

/**
 * Represents a single part of a CSS property value, meaning that it represents
 * just everything single part between ":" and ";". If there are multiple values
 * separated by commas, this type represents just one of the values.
 * @param {String[]} parts An array of value parts making up this value.
 * @param {int} line The line of text on which the unit resides.
 * @param {int} col The column of text on which the unit resides.
 * @namespace parserlib.css
 * @class PropertyValue
 * @extends parserlib.util.SyntaxUnit
 * @constructor
 */
function PropertyValue(parts, line, col) {

    SyntaxUnit.call(this, parts.join(" "), line, col, Parser.PROPERTY_VALUE_TYPE);

    /**
     * The parts that make up the selector.
     * @type Array
     * @property parts
     */
    this.parts = parts;

}

PropertyValue.prototype = new SyntaxUnit();
PropertyValue.prototype.constructor = PropertyValue;


},{"../util/SyntaxUnit":26,"./Parser":6}],10:[function(require,module,exports){
"use strict";

module.exports = PropertyValueIterator;

/**
 * A utility class that allows for easy iteration over the various parts of a
 * property value.
 * @param {parserlib.css.PropertyValue} value The property value to iterate over.
 * @namespace parserlib.css
 * @class PropertyValueIterator
 * @constructor
 */
function PropertyValueIterator(value) {

    /**
     * Iterator value
     * @type int
     * @property _i
     * @private
     */
    this._i = 0;

    /**
     * The parts that make up the value.
     * @type Array
     * @property _parts
     * @private
     */
    this._parts = value.parts;

    /**
     * Keeps track of bookmarks along the way.
     * @type Array
     * @property _marks
     * @private
     */
    this._marks = [];

    /**
     * Holds the original property value.
     * @type parserlib.css.PropertyValue
     * @property value
     */
    this.value = value;

}

/**
 * Returns the total number of parts in the value.
 * @return {int} The total number of parts in the value.
 * @method count
 */
PropertyValueIterator.prototype.count = function() {
    return this._parts.length;
};

/**
 * Indicates if the iterator is positioned at the first item.
 * @return {Boolean} True if positioned at first item, false if not.
 * @method isFirst
 */
PropertyValueIterator.prototype.isFirst = function() {
    return this._i === 0;
};

/**
 * Indicates if there are more parts of the property value.
 * @return {Boolean} True if there are more parts, false if not.
 * @method hasNext
 */
PropertyValueIterator.prototype.hasNext = function() {
    return this._i < this._parts.length;
};

/**
 * Marks the current spot in the iteration so it can be restored to
 * later on.
 * @return {void}
 * @method mark
 */
PropertyValueIterator.prototype.mark = function() {
    this._marks.push(this._i);
};

/**
 * Returns the next part of the property value or null if there is no next
 * part. Does not move the internal counter forward.
 * @return {parserlib.css.PropertyValuePart} The next part of the property value or null if there is no next
 * part.
 * @method peek
 */
PropertyValueIterator.prototype.peek = function(count) {
    return this.hasNext() ? this._parts[this._i + (count || 0)] : null;
};

/**
 * Returns the next part of the property value or null if there is no next
 * part.
 * @return {parserlib.css.PropertyValuePart} The next part of the property value or null if there is no next
 * part.
 * @method next
 */
PropertyValueIterator.prototype.next = function() {
    return this.hasNext() ? this._parts[this._i++] : null;
};

/**
 * Returns the previous part of the property value or null if there is no
 * previous part.
 * @return {parserlib.css.PropertyValuePart} The previous part of the
 * property value or null if there is no previous part.
 * @method previous
 */
PropertyValueIterator.prototype.previous = function() {
    return this._i > 0 ? this._parts[--this._i] : null;
};

/**
 * Restores the last saved bookmark.
 * @return {void}
 * @method restore
 */
PropertyValueIterator.prototype.restore = function() {
    if (this._marks.length) {
        this._i = this._marks.pop();
    }
};

/**
 * Drops the last saved bookmark.
 * @return {void}
 * @method drop
 */
PropertyValueIterator.prototype.drop = function() {
    this._marks.pop();
};

},{}],11:[function(require,module,exports){
"use strict";

module.exports = PropertyValuePart;

var SyntaxUnit = require("../util/SyntaxUnit");

var Colors = require("./Colors");
var Parser = require("./Parser");
var Tokens = require("./Tokens");

/**
 * Represents a single part of a CSS property value, meaning that it represents
 * just one part of the data between ":" and ";".
 * @param {String} text The text representation of the unit.
 * @param {int} line The line of text on which the unit resides.
 * @param {int} col The column of text on which the unit resides.
 * @namespace parserlib.css
 * @class PropertyValuePart
 * @extends parserlib.util.SyntaxUnit
 * @constructor
 */
function PropertyValuePart(text, line, col, optionalHint) {
    var hint = optionalHint || {};

    SyntaxUnit.call(this, text, line, col, Parser.PROPERTY_VALUE_PART_TYPE);

    /**
     * Indicates the type of value unit.
     * @type String
     * @property type
     */
    this.type = "unknown";

    //figure out what type of data it is

    var temp;

    //it is a measurement?
    if (/^([+\-]?[\d\.]+)([a-z]+)$/i.test(text)) {  //dimension
        this.type = "dimension";
        this.value = +RegExp.$1;
        this.units = RegExp.$2;

        //try to narrow down
        switch (this.units.toLowerCase()) {

            case "em":
            case "rem":
            case "ex":
            case "px":
            case "cm":
            case "mm":
            case "in":
            case "pt":
            case "pc":
            case "ch":
            case "vh":
            case "vw":
            case "vmax":
            case "vmin":
                this.type = "length";
                break;

            case "fr":
                this.type = "grid";
                break;

            case "deg":
            case "rad":
            case "grad":
            case "turn":
                this.type = "angle";
                break;

            case "ms":
            case "s":
                this.type = "time";
                break;

            case "hz":
            case "khz":
                this.type = "frequency";
                break;

            case "dpi":
            case "dpcm":
                this.type = "resolution";
                break;

            //default

        }

    } else if (/^([+\-]?[\d\.]+)%$/i.test(text)) {  //percentage
        this.type = "percentage";
        this.value = +RegExp.$1;
    } else if (/^([+\-]?\d+)$/i.test(text)) {  //integer
        this.type = "integer";
        this.value = +RegExp.$1;
    } else if (/^([+\-]?[\d\.]+)$/i.test(text)) {  //number
        this.type = "number";
        this.value = +RegExp.$1;

    } else if (/^#([a-f0-9]{3,6})/i.test(text)) {  //hexcolor
        this.type = "color";
        temp = RegExp.$1;
        if (temp.length === 3) {
            this.red    = parseInt(temp.charAt(0)+temp.charAt(0), 16);
            this.green  = parseInt(temp.charAt(1)+temp.charAt(1), 16);
            this.blue   = parseInt(temp.charAt(2)+temp.charAt(2), 16);
        } else {
            this.red    = parseInt(temp.substring(0, 2), 16);
            this.green  = parseInt(temp.substring(2, 4), 16);
            this.blue   = parseInt(temp.substring(4, 6), 16);
        }
    } else if (/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i.test(text)) { //rgb() color with absolute numbers
        this.type   = "color";
        this.red    = +RegExp.$1;
        this.green  = +RegExp.$2;
        this.blue   = +RegExp.$3;
    } else if (/^rgb\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(text)) { //rgb() color with percentages
        this.type   = "color";
        this.red    = +RegExp.$1 * 255 / 100;
        this.green  = +RegExp.$2 * 255 / 100;
        this.blue   = +RegExp.$3 * 255 / 100;
    } else if (/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d\.]+)\s*\)/i.test(text)) { //rgba() color with absolute numbers
        this.type   = "color";
        this.red    = +RegExp.$1;
        this.green  = +RegExp.$2;
        this.blue   = +RegExp.$3;
        this.alpha  = +RegExp.$4;
    } else if (/^rgba\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d\.]+)\s*\)/i.test(text)) { //rgba() color with percentages
        this.type   = "color";
        this.red    = +RegExp.$1 * 255 / 100;
        this.green  = +RegExp.$2 * 255 / 100;
        this.blue   = +RegExp.$3 * 255 / 100;
        this.alpha  = +RegExp.$4;
    } else if (/^hsl\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(text)) { //hsl()
        this.type   = "color";
        this.hue    = +RegExp.$1;
        this.saturation = +RegExp.$2 / 100;
        this.lightness  = +RegExp.$3 / 100;
    } else if (/^hsla\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d\.]+)\s*\)/i.test(text)) { //hsla() color with percentages
        this.type   = "color";
        this.hue    = +RegExp.$1;
        this.saturation = +RegExp.$2 / 100;
        this.lightness  = +RegExp.$3 / 100;
        this.alpha  = +RegExp.$4;
    } else if (/^url\(("([^\\"]|\\.)*")\)/i.test(text)) { //URI
        // generated by TokenStream.readURI, so always double-quoted.
        this.type   = "uri";
        this.uri    = PropertyValuePart.parseString(RegExp.$1);
    } else if (/^([^\(]+)\(/i.test(text)) {
        this.type   = "function";
        this.name   = RegExp.$1;
        this.value  = text;
    } else if (/^"([^\n\r\f\\"]|\\\r\n|\\[^\r0-9a-f]|\\[0-9a-f]{1,6}(\r\n|[ \n\r\t\f])?)*"/i.test(text)) {    //double-quoted string
        this.type   = "string";
        this.value  = PropertyValuePart.parseString(text);
    } else if (/^'([^\n\r\f\\']|\\\r\n|\\[^\r0-9a-f]|\\[0-9a-f]{1,6}(\r\n|[ \n\r\t\f])?)*'/i.test(text)) {    //single-quoted string
        this.type   = "string";
        this.value  = PropertyValuePart.parseString(text);
    } else if (Colors[text.toLowerCase()]) {  //named color
        this.type   = "color";
        temp        = Colors[text.toLowerCase()].substring(1);
        this.red    = parseInt(temp.substring(0, 2), 16);
        this.green  = parseInt(temp.substring(2, 4), 16);
        this.blue   = parseInt(temp.substring(4, 6), 16);
    } else if (/^[,\/]$/.test(text)) {
        this.type   = "operator";
        this.value  = text;
    } else if (/^-?[a-z_\u00A0-\uFFFF][a-z0-9\-_\u00A0-\uFFFF]*$/i.test(text)) {
        this.type   = "identifier";
        this.value  = text;
    }

    // There can be ambiguity with escape sequences in identifiers, as
    // well as with "color" parts which are also "identifiers", so record
    // an explicit hint when the token generating this PropertyValuePart
    // was an identifier.
    this.wasIdent = Boolean(hint.ident);

}

PropertyValuePart.prototype = new SyntaxUnit();
PropertyValuePart.prototype.constructor = PropertyValuePart;

/**
 * Helper method to parse a CSS string.
 */
PropertyValuePart.parseString = function(str) {
    str = str.slice(1, -1); // Strip surrounding single/double quotes
    var replacer = function(match, esc) {
        if (/^(\n|\r\n|\r|\f)$/.test(esc)) {
            return "";
        }
        var m = /^[0-9a-f]{1,6}/i.exec(esc);
        if (m) {
            var codePoint = parseInt(m[0], 16);
            if (String.fromCodePoint) {
                return String.fromCodePoint(codePoint);
            } else {
                // XXX No support for surrogates on old JavaScript engines.
                return String.fromCharCode(codePoint);
            }
        }
        return esc;
    };
    return str.replace(/\\(\r\n|[^\r0-9a-f]|[0-9a-f]{1,6}(\r\n|[ \n\r\t\f])?)/ig,
                       replacer);
};

/**
 * Helper method to serialize a CSS string.
 */
PropertyValuePart.serializeString = function(value) {
    var replacer = function(match, c) {
        if (c === "\"") {
            return "\\" + c;
        }
        var cp = String.codePointAt ? String.codePointAt(0) :
            // We only escape non-surrogate chars, so using charCodeAt
            // is harmless here.
            String.charCodeAt(0);
        return "\\" + cp.toString(16) + " ";
    };
    return "\"" + value.replace(/["\r\n\f]/g, replacer) + "\"";
};

/**
 * Create a new syntax unit based solely on the given token.
 * Convenience method for creating a new syntax unit when
 * it represents a single token instead of multiple.
 * @param {Object} token The token object to represent.
 * @return {parserlib.css.PropertyValuePart} The object representing the token.
 * @static
 * @method fromToken
 */
PropertyValuePart.fromToken = function(token) {
    var part = new PropertyValuePart(token.value, token.startLine, token.startCol, {
        // Tokens can have escaped characters that would fool the type
        // identification in the PropertyValuePart constructor, so pass
        // in a hint if this was an identifier.
        ident: token.type === Tokens.IDENT
    });
    return part;
};

},{"../util/SyntaxUnit":26,"./Colors":1,"./Parser":6,"./Tokens":18}],12:[function(require,module,exports){
"use strict";

var Pseudos = module.exports = {
    __proto__:       null,
    ":first-letter": 1,
    ":first-line":   1,
    ":before":       1,
    ":after":        1
};

Pseudos.ELEMENT = 1;
Pseudos.CLASS = 2;

Pseudos.isElement = function(pseudo) {
    return pseudo.indexOf("::") === 0 || Pseudos[pseudo.toLowerCase()] === Pseudos.ELEMENT;
};

},{}],13:[function(require,module,exports){
"use strict";

module.exports = Selector;

var SyntaxUnit = require("../util/SyntaxUnit");

var Parser = require("./Parser");
var Specificity = require("./Specificity");

/**
 * Represents an entire single selector, including all parts but not
 * including multiple selectors (those separated by commas).
 * @namespace parserlib.css
 * @class Selector
 * @extends parserlib.util.SyntaxUnit
 * @constructor
 * @param {Array} parts Array of selectors parts making up this selector.
 * @param {int} line The line of text on which the unit resides.
 * @param {int} col The column of text on which the unit resides.
 */
function Selector(parts, line, col) {

    SyntaxUnit.call(this, parts.join(" "), line, col, Parser.SELECTOR_TYPE);

    /**
     * The parts that make up the selector.
     * @type Array
     * @property parts
     */
    this.parts = parts;

    /**
     * The specificity of the selector.
     * @type parserlib.css.Specificity
     * @property specificity
     */
    this.specificity = Specificity.calculate(this);

}

Selector.prototype = new SyntaxUnit();
Selector.prototype.constructor = Selector;


},{"../util/SyntaxUnit":26,"./Parser":6,"./Specificity":16}],14:[function(require,module,exports){
"use strict";

module.exports = SelectorPart;

var SyntaxUnit = require("../util/SyntaxUnit");

var Parser = require("./Parser");

/**
 * Represents a single part of a selector string, meaning a single set of
 * element name and modifiers. This does not include combinators such as
 * spaces, +, >, etc.
 * @namespace parserlib.css
 * @class SelectorPart
 * @extends parserlib.util.SyntaxUnit
 * @constructor
 * @param {String} elementName The element name in the selector or null
 *      if there is no element name.
 * @param {Array} modifiers Array of individual modifiers for the element.
 *      May be empty if there are none.
 * @param {String} text The text representation of the unit.
 * @param {int} line The line of text on which the unit resides.
 * @param {int} col The column of text on which the unit resides.
 */
function SelectorPart(elementName, modifiers, text, line, col) {

    SyntaxUnit.call(this, text, line, col, Parser.SELECTOR_PART_TYPE);

    /**
     * The tag name of the element to which this part
     * of the selector affects.
     * @type String
     * @property elementName
     */
    this.elementName = elementName;

    /**
     * The parts that come after the element name, such as class names, IDs,
     * pseudo classes/elements, etc.
     * @type Array
     * @property modifiers
     */
    this.modifiers = modifiers;

}

SelectorPart.prototype = new SyntaxUnit();
SelectorPart.prototype.constructor = SelectorPart;


},{"../util/SyntaxUnit":26,"./Parser":6}],15:[function(require,module,exports){
"use strict";

module.exports = SelectorSubPart;

var SyntaxUnit = require("../util/SyntaxUnit");

var Parser = require("./Parser");

/**
 * Represents a selector modifier string, meaning a class name, element name,
 * element ID, pseudo rule, etc.
 * @namespace parserlib.css
 * @class SelectorSubPart
 * @extends parserlib.util.SyntaxUnit
 * @constructor
 * @param {String} text The text representation of the unit.
 * @param {String} type The type of selector modifier.
 * @param {int} line The line of text on which the unit resides.
 * @param {int} col The column of text on which the unit resides.
 */
function SelectorSubPart(text, type, line, col) {

    SyntaxUnit.call(this, text, line, col, Parser.SELECTOR_SUB_PART_TYPE);

    /**
     * The type of modifier.
     * @type String
     * @property type
     */
    this.type = type;

    /**
     * Some subparts have arguments, this represents them.
     * @type Array
     * @property args
     */
    this.args = [];

}

SelectorSubPart.prototype = new SyntaxUnit();
SelectorSubPart.prototype.constructor = SelectorSubPart;


},{"../util/SyntaxUnit":26,"./Parser":6}],16:[function(require,module,exports){
"use strict";

module.exports = Specificity;

var Pseudos = require("./Pseudos");
var SelectorPart = require("./SelectorPart");

/**
 * Represents a selector's specificity.
 * @namespace parserlib.css
 * @class Specificity
 * @constructor
 * @param {int} a Should be 1 for inline styles, zero for stylesheet styles
 * @param {int} b Number of ID selectors
 * @param {int} c Number of classes and pseudo classes
 * @param {int} d Number of element names and pseudo elements
 */
function Specificity(a, b, c, d) {
    this.a = a;
    this.b = b;
    this.c = c;
    this.d = d;
}

Specificity.prototype = {
    constructor: Specificity,

    /**
     * Compare this specificity to another.
     * @param {Specificity} other The other specificity to compare to.
     * @return {int} -1 if the other specificity is larger, 1 if smaller, 0 if equal.
     * @method compare
     */
    compare: function(other) {
        var comps = ["a", "b", "c", "d"],
            i, len;

        for (i=0, len=comps.length; i < len; i++) {
            if (this[comps[i]] < other[comps[i]]) {
                return -1;
            } else if (this[comps[i]] > other[comps[i]]) {
                return 1;
            }
        }

        return 0;
    },

    /**
     * Creates a numeric value for the specificity.
     * @return {int} The numeric value for the specificity.
     * @method valueOf
     */
    valueOf: function() {
        return (this.a * 1000) + (this.b * 100) + (this.c * 10) + this.d;
    },

    /**
     * Returns a string representation for specificity.
     * @return {String} The string representation of specificity.
     * @method toString
     */
    toString: function() {
        return this.a + "," + this.b + "," + this.c + "," + this.d;
    }

};

/**
 * Calculates the specificity of the given selector.
 * @param {parserlib.css.Selector} The selector to calculate specificity for.
 * @return {parserlib.css.Specificity} The specificity of the selector.
 * @static
 * @method calculate
 */
Specificity.calculate = function(selector) {

    var i, len,
        part,
        b=0, c=0, d=0;

    function updateValues(part) {

        var i, j, len, num,
            elementName = part.elementName ? part.elementName.text : "",
            modifier;

        if (elementName && elementName.charAt(elementName.length-1) !== "*") {
            d++;
        }

        for (i=0, len=part.modifiers.length; i < len; i++) {
            modifier = part.modifiers[i];
            switch (modifier.type) {
                case "class":
                case "attribute":
                    c++;
                    break;

                case "id":
                    b++;
                    break;

                case "pseudo":
                    if (Pseudos.isElement(modifier.text)) {
                        d++;
                    } else {
                        c++;
                    }
                    break;

                case "not":
                    for (j=0, num=modifier.args.length; j < num; j++) {
                        updateValues(modifier.args[j]);
                    }
            }
        }
    }

    for (i=0, len=selector.parts.length; i < len; i++) {
        part = selector.parts[i];

        if (part instanceof SelectorPart) {
            updateValues(part);
        }
    }

    return new Specificity(0, b, c, d);
};

},{"./Pseudos":12,"./SelectorPart":14}],17:[function(require,module,exports){
"use strict";

module.exports = TokenStream;

var TokenStreamBase = require("../util/TokenStreamBase");

var PropertyValuePart = require("./PropertyValuePart");
var Tokens = require("./Tokens");

var h = /^[0-9a-fA-F]$/,
    nonascii = /^[\u00A0-\uFFFF]$/,
    nl = /\n|\r\n|\r|\f/,
    whitespace = /\u0009|\u000a|\u000c|\u000d|\u0020/;

//-----------------------------------------------------------------------------
// Helper functions
//-----------------------------------------------------------------------------


function isHexDigit(c) {
    return c !== null && h.test(c);
}

function isDigit(c) {
    return c !== null && /\d/.test(c);
}

function isWhitespace(c) {
    return c !== null && whitespace.test(c);
}

function isNewLine(c) {
    return c !== null && nl.test(c);
}

function isNameStart(c) {
    return c !== null && /[a-z_\u00A0-\uFFFF\\]/i.test(c);
}

function isNameChar(c) {
    return c !== null && (isNameStart(c) || /[0-9\-\\]/.test(c));
}

function isIdentStart(c) {
    return c !== null && (isNameStart(c) || /\-\\/.test(c));
}

function mix(receiver, supplier) {
    for (var prop in supplier) {
        if (Object.prototype.hasOwnProperty.call(supplier, prop)) {
            receiver[prop] = supplier[prop];
        }
    }
    return receiver;
}

//-----------------------------------------------------------------------------
// CSS Token Stream
//-----------------------------------------------------------------------------


/**
 * A token stream that produces CSS tokens.
 * @param {String|Reader} input The source of text to tokenize.
 * @constructor
 * @class TokenStream
 * @namespace parserlib.css
 */
function TokenStream(input) {
    TokenStreamBase.call(this, input, Tokens);
}

TokenStream.prototype = mix(new TokenStreamBase(), {

    /**
     * Overrides the TokenStreamBase method of the same name
     * to produce CSS tokens.
     * @return {Object} A token object representing the next token.
     * @method _getToken
     * @private
     */
    _getToken: function() {

        var c,
            reader = this._reader,
            token   = null,
            startLine   = reader.getLine(),
            startCol    = reader.getCol();

        c = reader.read();


        while (c) {
            switch (c) {

                /*
                 * Potential tokens:
                 * - COMMENT
                 * - SLASH
                 * - CHAR
                 */
                case "/":

                    if (reader.peek() === "*") {
                        token = this.commentToken(c, startLine, startCol);
                    } else {
                        token = this.charToken(c, startLine, startCol);
                    }
                    break;

                /*
                 * Potential tokens:
                 * - DASHMATCH
                 * - INCLUDES
                 * - PREFIXMATCH
                 * - SUFFIXMATCH
                 * - SUBSTRINGMATCH
                 * - CHAR
                 */
                case "|":
                case "~":
                case "^":
                case "$":
                case "*":
                    if (reader.peek() === "=") {
                        token = this.comparisonToken(c, startLine, startCol);
                    } else {
                        token = this.charToken(c, startLine, startCol);
                    }
                    break;

                /*
                 * Potential tokens:
                 * - STRING
                 * - INVALID
                 */
                case "\"":
                case "'":
                    token = this.stringToken(c, startLine, startCol);
                    break;

                /*
                 * Potential tokens:
                 * - HASH
                 * - CHAR
                 */
                case "#":
                    if (isNameChar(reader.peek())) {
                        token = this.hashToken(c, startLine, startCol);
                    } else {
                        token = this.charToken(c, startLine, startCol);
                    }
                    break;

                /*
                 * Potential tokens:
                 * - DOT
                 * - NUMBER
                 * - DIMENSION
                 * - PERCENTAGE
                 */
                case ".":
                    if (isDigit(reader.peek())) {
                        token = this.numberToken(c, startLine, startCol);
                    } else {
                        token = this.charToken(c, startLine, startCol);
                    }
                    break;

                /*
                 * Potential tokens:
                 * - CDC
                 * - MINUS
                 * - NUMBER
                 * - DIMENSION
                 * - PERCENTAGE
                 */
                case "-":
                    if (reader.peek() === "-") {  //could be closing HTML-style comment
                        token = this.htmlCommentEndToken(c, startLine, startCol);
                    } else if (isNameStart(reader.peek())) {
                        token = this.identOrFunctionToken(c, startLine, startCol);
                    } else {
                        token = this.charToken(c, startLine, startCol);
                    }
                    break;

                /*
                 * Potential tokens:
                 * - IMPORTANT_SYM
                 * - CHAR
                 */
                case "!":
                    token = this.importantToken(c, startLine, startCol);
                    break;

                /*
                 * Any at-keyword or CHAR
                 */
                case "@":
                    token = this.atRuleToken(c, startLine, startCol);
                    break;

                /*
                 * Potential tokens:
                 * - NOT
                 * - CHAR
                 */
                case ":":
                    token = this.notToken(c, startLine, startCol);
                    break;

                /*
                 * Potential tokens:
                 * - CDO
                 * - CHAR
                 */
                case "<":
                    token = this.htmlCommentStartToken(c, startLine, startCol);
                    break;

                /*
                 * Potential tokens:
                 * - IDENT
                 * - CHAR
                 */
                case "\\":
                    if (/[^\r\n\f]/.test(reader.peek())) {
                        token = this.identOrFunctionToken(this.readEscape(c, true), startLine, startCol);
                    } else {
                        token = this.charToken(c, startLine, startCol);
                    }
                    break;

                /*
                 * Potential tokens:
                 * - UNICODE_RANGE
                 * - URL
                 * - CHAR
                 */
                case "U":
                case "u":
                    if (reader.peek() === "+") {
                        token = this.unicodeRangeToken(c, startLine, startCol);
                        break;
                    }
                    /* falls through */
                default:

                    /*
                     * Potential tokens:
                     * - NUMBER
                     * - DIMENSION
                     * - LENGTH
                     * - FREQ
                     * - TIME
                     * - EMS
                     * - EXS
                     * - ANGLE
                     */
                    if (isDigit(c)) {
                        token = this.numberToken(c, startLine, startCol);
                    } else

                    /*
                     * Potential tokens:
                     * - S
                     */
                    if (isWhitespace(c)) {
                        token = this.whitespaceToken(c, startLine, startCol);
                    } else

                    /*
                     * Potential tokens:
                     * - IDENT
                     */
                    if (isIdentStart(c)) {
                        token = this.identOrFunctionToken(c, startLine, startCol);
                    } else {
                       /*
                        * Potential tokens:
                        * - CHAR
                        * - PLUS
                        */
                        token = this.charToken(c, startLine, startCol);
                    }

            }

            //make sure this token is wanted
            //TODO: check channel
            break;
        }

        if (!token && c === null) {
            token = this.createToken(Tokens.EOF, null, startLine, startCol);
        }

        return token;
    },

    //-------------------------------------------------------------------------
    // Methods to create tokens
    //-------------------------------------------------------------------------

    /**
     * Produces a token based on available data and the current
     * reader position information. This method is called by other
     * private methods to create tokens and is never called directly.
     * @param {int} tt The token type.
     * @param {String} value The text value of the token.
     * @param {int} startLine The beginning line for the character.
     * @param {int} startCol The beginning column for the character.
     * @param {Object} options (Optional) Specifies a channel property
     *      to indicate that a different channel should be scanned
     *      and/or a hide property indicating that the token should
     *      be hidden.
     * @return {Object} A token object.
     * @method createToken
     */
    createToken: function(tt, value, startLine, startCol, options) {
        var reader = this._reader;
        options = options || {};

        return {
            value:      value,
            type:       tt,
            channel:    options.channel,
            endChar:    options.endChar,
            hide:       options.hide || false,
            startLine:  startLine,
            startCol:   startCol,
            endLine:    reader.getLine(),
            endCol:     reader.getCol()
        };
    },

    //-------------------------------------------------------------------------
    // Methods to create specific tokens
    //-------------------------------------------------------------------------

    /**
     * Produces a token for any at-rule. If the at-rule is unknown, then
     * the token is for a single "@" character.
     * @param {String} first The first character for the token.
     * @param {int} startLine The beginning line for the character.
     * @param {int} startCol The beginning column for the character.
     * @return {Object} A token object.
     * @method atRuleToken
     */
    atRuleToken: function(first, startLine, startCol) {
        var rule    = first,
            reader  = this._reader,
            tt      = Tokens.CHAR,
            ident;

        /*
         * First, mark where we are. There are only four @ rules,
         * so anything else is really just an invalid token.
         * Basically, if this doesn't match one of the known @
         * rules, just return '@' as an unknown token and allow
         * parsing to continue after that point.
         */
        reader.mark();

        //try to find the at-keyword
        ident = this.readName();
        rule = first + ident;
        tt = Tokens.type(rule.toLowerCase());

        //if it's not valid, use the first character only and reset the reader
        if (tt === Tokens.CHAR || tt === Tokens.UNKNOWN) {
            if (rule.length > 1) {
                tt = Tokens.UNKNOWN_SYM;
            } else {
                tt = Tokens.CHAR;
                rule = first;
                reader.reset();
            }
        }

        return this.createToken(tt, rule, startLine, startCol);
    },

    /**
     * Produces a character token based on the given character
     * and location in the stream. If there's a special (non-standard)
     * token name, this is used; otherwise CHAR is used.
     * @param {String} c The character for the token.
     * @param {int} startLine The beginning line for the character.
     * @param {int} startCol The beginning column for the character.
     * @return {Object} A token object.
     * @method charToken
     */
    charToken: function(c, startLine, startCol) {
        var tt = Tokens.type(c);
        var opts = {};

        if (tt === -1) {
            tt = Tokens.CHAR;
        } else {
            opts.endChar = Tokens[tt].endChar;
        }

        return this.createToken(tt, c, startLine, startCol, opts);
    },

    /**
     * Produces a character token based on the given character
     * and location in the stream. If there's a special (non-standard)
     * token name, this is used; otherwise CHAR is used.
     * @param {String} first The first character for the token.
     * @param {int} startLine The beginning line for the character.
     * @param {int} startCol The beginning column for the character.
     * @return {Object} A token object.
     * @method commentToken
     */
    commentToken: function(first, startLine, startCol) {
        var comment = this.readComment(first);

        return this.createToken(Tokens.COMMENT, comment, startLine, startCol);
    },

    /**
     * Produces a comparison token based on the given character
     * and location in the stream. The next character must be
     * read and is already known to be an equals sign.
     * @param {String} c The character for the token.
     * @param {int} startLine The beginning line for the character.
     * @param {int} startCol The beginning column for the character.
     * @return {Object} A token object.
     * @method comparisonToken
     */
    comparisonToken: function(c, startLine, startCol) {
        var reader  = this._reader,
            comparison  = c + reader.read(),
            tt      = Tokens.type(comparison) || Tokens.CHAR;

        return this.createToken(tt, comparison, startLine, startCol);
    },

    /**
     * Produces a hash token based on the specified information. The
     * first character provided is the pound sign (#) and then this
     * method reads a name afterward.
     * @param {String} first The first character (#) in the hash name.
     * @param {int} startLine The beginning line for the character.
     * @param {int} startCol The beginning column for the character.
     * @return {Object} A token object.
     * @method hashToken
     */
    hashToken: function(first, startLine, startCol) {
        var name    = this.readName(first);

        return this.createToken(Tokens.HASH, name, startLine, startCol);
    },

    /**
     * Produces a CDO or CHAR token based on the specified information. The
     * first character is provided and the rest is read by the function to determine
     * the correct token to create.
     * @param {String} first The first character in the token.
     * @param {int} startLine The beginning line for the character.
     * @param {int} startCol The beginning column for the character.
     * @return {Object} A token object.
     * @method htmlCommentStartToken
     */
    htmlCommentStartToken: function(first, startLine, startCol) {
        var reader      = this._reader,
            text        = first;

        reader.mark();
        text += reader.readCount(3);

        if (text === "<!--") {
            return this.createToken(Tokens.CDO, text, startLine, startCol);
        } else {
            reader.reset();
            return this.charToken(first, startLine, startCol);
        }
    },

    /**
     * Produces a CDC or CHAR token based on the specified information. The
     * first character is provided and the rest is read by the function to determine
     * the correct token to create.
     * @param {String} first The first character in the token.
     * @param {int} startLine The beginning line for the character.
     * @param {int} startCol The beginning column for the character.
     * @return {Object} A token object.
     * @method htmlCommentEndToken
     */
    htmlCommentEndToken: function(first, startLine, startCol) {
        var reader      = this._reader,
            text        = first;

        reader.mark();
        text += reader.readCount(2);

        if (text === "-->") {
            return this.createToken(Tokens.CDC, text, startLine, startCol);
        } else {
            reader.reset();
            return this.charToken(first, startLine, startCol);
        }
    },

    /**
     * Produces an IDENT or FUNCTION token based on the specified information. The
     * first character is provided and the rest is read by the function to determine
     * the correct token to create.
     * @param {String} first The first character in the identifier.
     * @param {int} startLine The beginning line for the character.
     * @param {int} startCol The beginning column for the character.
     * @return {Object} A token object.
     * @method identOrFunctionToken
     */
    identOrFunctionToken: function(first, startLine, startCol) {
        var reader  = this._reader,
            ident   = this.readName(first),
            tt      = Tokens.IDENT,
            uriFns  = ["url(", "url-prefix(", "domain("],
            uri;

        //if there's a left paren immediately after, it's a URI or function
        if (reader.peek() === "(") {
            ident += reader.read();
            if (uriFns.indexOf(ident.toLowerCase()) > -1) {
                reader.mark();
                uri = this.readURI(ident);
                if (uri === null) {
                    //didn't find a valid URL or there's no closing paren
                    reader.reset();
                    tt = Tokens.FUNCTION;
                } else {
                    tt = Tokens.URI;
                    ident = uri;
                }
            } else {
                tt = Tokens.FUNCTION;
            }
        } else if (reader.peek() === ":") {  //might be an IE function

            //IE-specific functions always being with progid:
            if (ident.toLowerCase() === "progid") {
                ident += reader.readTo("(");
                tt = Tokens.IE_FUNCTION;
            }
        }

        return this.createToken(tt, ident, startLine, startCol);
    },

    /**
     * Produces an IMPORTANT_SYM or CHAR token based on the specified information. The
     * first character is provided and the rest is read by the function to determine
     * the correct token to create.
     * @param {String} first The first character in the token.
     * @param {int} startLine The beginning line for the character.
     * @param {int} startCol The beginning column for the character.
     * @return {Object} A token object.
     * @method importantToken
     */
    importantToken: function(first, startLine, startCol) {
        var reader      = this._reader,
            important   = first,
            tt          = Tokens.CHAR,
            temp,
            c;

        reader.mark();
        c = reader.read();

        while (c) {

            //there can be a comment in here
            if (c === "/") {

                //if the next character isn't a star, then this isn't a valid !important token
                if (reader.peek() !== "*") {
                    break;
                } else {
                    temp = this.readComment(c);
                    if (temp === "") {    //broken!
                        break;
                    }
                }
            } else if (isWhitespace(c)) {
                important += c + this.readWhitespace();
            } else if (/i/i.test(c)) {
                temp = reader.readCount(8);
                if (/mportant/i.test(temp)) {
                    important += c + temp;
                    tt = Tokens.IMPORTANT_SYM;

                }
                break;  //we're done
            } else {
                break;
            }

            c = reader.read();
        }

        if (tt === Tokens.CHAR) {
            reader.reset();
            return this.charToken(first, startLine, startCol);
        } else {
            return this.createToken(tt, important, startLine, startCol);
        }


    },

    /**
     * Produces a NOT or CHAR token based on the specified information. The
     * first character is provided and the rest is read by the function to determine
     * the correct token to create.
     * @param {String} first The first character in the token.
     * @param {int} startLine The beginning line for the character.
     * @param {int} startCol The beginning column for the character.
     * @return {Object} A token object.
     * @method notToken
     */
    notToken: function(first, startLine, startCol) {
        var reader      = this._reader,
            text        = first;

        reader.mark();
        text += reader.readCount(4);

        if (text.toLowerCase() === ":not(") {
            return this.createToken(Tokens.NOT, text, startLine, startCol);
        } else {
            reader.reset();
            return this.charToken(first, startLine, startCol);
        }
    },

    /**
     * Produces a number token based on the given character
     * and location in the stream. This may return a token of
     * NUMBER, EMS, EXS, LENGTH, ANGLE, TIME, FREQ, DIMENSION,
     * or PERCENTAGE.
     * @param {String} first The first character for the token.
     * @param {int} startLine The beginning line for the character.
     * @param {int} startCol The beginning column for the character.
     * @return {Object} A token object.
     * @method numberToken
     */
    numberToken: function(first, startLine, startCol) {
        var reader  = this._reader,
            value   = this.readNumber(first),
            ident,
            tt      = Tokens.NUMBER,
            c       = reader.peek();

        if (isIdentStart(c)) {
            ident = this.readName(reader.read());
            value += ident;

            if (/^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^vmax$|^vmin$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$/i.test(ident)) {
                tt = Tokens.LENGTH;
            } else if (/^deg|^rad$|^grad$|^turn$/i.test(ident)) {
                tt = Tokens.ANGLE;
            } else if (/^ms$|^s$/i.test(ident)) {
                tt = Tokens.TIME;
            } else if (/^hz$|^khz$/i.test(ident)) {
                tt = Tokens.FREQ;
            } else if (/^dpi$|^dpcm$/i.test(ident)) {
                tt = Tokens.RESOLUTION;
            } else {
                tt = Tokens.DIMENSION;
            }

        } else if (c === "%") {
            value += reader.read();
            tt = Tokens.PERCENTAGE;
        }

        return this.createToken(tt, value, startLine, startCol);
    },

    /**
     * Produces a string token based on the given character
     * and location in the stream. Since strings may be indicated
     * by single or double quotes, a failure to match starting
     * and ending quotes results in an INVALID token being generated.
     * The first character in the string is passed in and then
     * the rest are read up to and including the final quotation mark.
     * @param {String} first The first character in the string.
     * @param {int} startLine The beginning line for the character.
     * @param {int} startCol The beginning column for the character.
     * @return {Object} A token object.
     * @method stringToken
     */
    stringToken: function(first, startLine, startCol) {
        var delim   = first,
            string  = first,
            reader  = this._reader,
            tt      = Tokens.STRING,
            c       = reader.read(),
            i;

        while (c) {
            string += c;

            if (c === "\\") {
                c = reader.read();
                if (c === null) {
                    break; // premature EOF after backslash
                } else if (/[^\r\n\f0-9a-f]/i.test(c)) {
                    // single-character escape
                    string += c;
                } else {
                    // read up to six hex digits
                    for (i=0; isHexDigit(c) && i<6; i++) {
                        string += c;
                        c = reader.read();
                    }
                    // swallow trailing newline or space
                    if (c === "\r" && reader.peek() === "\n") {
                        string += c;
                        c = reader.read();
                    }
                    if (isWhitespace(c)) {
                        string += c;
                    } else {
                        // This character is null or not part of the escape;
                        // jump back to the top to process it.
                        continue;
                    }
                }
            } else if (c === delim) {
                break; // delimiter found.
            } else if (isNewLine(reader.peek())) {
                // newline without an escapement: it's an invalid string
                tt = Tokens.INVALID;
                break;
            }
            c = reader.read();
        }

        //if c is null, that means we're out of input and the string was never closed
        if (c === null) {
            tt = Tokens.INVALID;
        }

        return this.createToken(tt, string, startLine, startCol);
    },

    unicodeRangeToken: function(first, startLine, startCol) {
        var reader  = this._reader,
            value   = first,
            temp,
            tt      = Tokens.CHAR;

        //then it should be a unicode range
        if (reader.peek() === "+") {
            reader.mark();
            value += reader.read();
            value += this.readUnicodeRangePart(true);

            //ensure there's an actual unicode range here
            if (value.length === 2) {
                reader.reset();
            } else {

                tt = Tokens.UNICODE_RANGE;

                //if there's a ? in the first part, there can't be a second part
                if (value.indexOf("?") === -1) {

                    if (reader.peek() === "-") {
                        reader.mark();
                        temp = reader.read();
                        temp += this.readUnicodeRangePart(false);

                        //if there's not another value, back up and just take the first
                        if (temp.length === 1) {
                            reader.reset();
                        } else {
                            value += temp;
                        }
                    }

                }
            }
        }

        return this.createToken(tt, value, startLine, startCol);
    },

    /**
     * Produces a S token based on the specified information. Since whitespace
     * may have multiple characters, this consumes all whitespace characters
     * into a single token.
     * @param {String} first The first character in the token.
     * @param {int} startLine The beginning line for the character.
     * @param {int} startCol The beginning column for the character.
     * @return {Object} A token object.
     * @method whitespaceToken
     */
    whitespaceToken: function(first, startLine, startCol) {
        var value   = first + this.readWhitespace();
        return this.createToken(Tokens.S, value, startLine, startCol);
    },


    //-------------------------------------------------------------------------
    // Methods to read values from the string stream
    //-------------------------------------------------------------------------

    readUnicodeRangePart: function(allowQuestionMark) {
        var reader  = this._reader,
            part = "",
            c       = reader.peek();

        //first read hex digits
        while (isHexDigit(c) && part.length < 6) {
            reader.read();
            part += c;
            c = reader.peek();
        }

        //then read question marks if allowed
        if (allowQuestionMark) {
            while (c === "?" && part.length < 6) {
                reader.read();
                part += c;
                c = reader.peek();
            }
        }

        //there can't be any other characters after this point

        return part;
    },

    readWhitespace: function() {
        var reader  = this._reader,
            whitespace = "",
            c       = reader.peek();

        while (isWhitespace(c)) {
            reader.read();
            whitespace += c;
            c = reader.peek();
        }

        return whitespace;
    },
    readNumber: function(first) {
        var reader  = this._reader,
            number  = first,
            hasDot  = (first === "."),
            c       = reader.peek();


        while (c) {
            if (isDigit(c)) {
                number += reader.read();
            } else if (c === ".") {
                if (hasDot) {
                    break;
                } else {
                    hasDot = true;
                    number += reader.read();
                }
            } else {
                break;
            }

            c = reader.peek();
        }

        return number;
    },

    // returns null w/o resetting reader if string is invalid.
    readString: function() {
        var token = this.stringToken(this._reader.read(), 0, 0);
        return token.type === Tokens.INVALID ? null : token.value;
    },

    // returns null w/o resetting reader if URI is invalid.
    readURI: function(first) {
        var reader  = this._reader,
            uri     = first,
            inner   = "",
            c       = reader.peek();

        //skip whitespace before
        while (c && isWhitespace(c)) {
            reader.read();
            c = reader.peek();
        }

        //it's a string
        if (c === "'" || c === "\"") {
            inner = this.readString();
            if (inner !== null) {
                inner = PropertyValuePart.parseString(inner);
            }
        } else {
            inner = this.readUnquotedURL();
        }

        c = reader.peek();

        //skip whitespace after
        while (c && isWhitespace(c)) {
            reader.read();
            c = reader.peek();
        }

        //if there was no inner value or the next character isn't closing paren, it's not a URI
        if (inner === null || c !== ")") {
            uri = null;
        } else {
            // Ensure argument to URL is always double-quoted
            // (This simplifies later processing in PropertyValuePart.)
            uri += PropertyValuePart.serializeString(inner) + reader.read();
        }

        return uri;
    },
    // This method never fails, although it may return an empty string.
    readUnquotedURL: function(first) {
        var reader  = this._reader,
            url     = first || "",
            c;

        for (c = reader.peek(); c; c = reader.peek()) {
            // Note that the grammar at
            // https://www.w3.org/TR/CSS2/grammar.html#scanner
            // incorrectly includes the backslash character in the
            // `url` production, although it is correctly omitted in
            // the `baduri1` production.
            if (nonascii.test(c) || /^[\-!#$%&*-\[\]-~]$/.test(c)) {
                url += c;
                reader.read();
            } else if (c === "\\") {
                if (/^[^\r\n\f]$/.test(reader.peek(2))) {
                    url += this.readEscape(reader.read(), true);
                } else {
                    break; // bad escape sequence.
                }
            } else {
                break; // bad character
            }
        }

        return url;
    },

    readName: function(first) {
        var reader  = this._reader,
            ident   = first || "",
            c;

        for (c = reader.peek(); c; c = reader.peek()) {
            if (c === "\\") {
                if (/^[^\r\n\f]$/.test(reader.peek(2))) {
                    ident += this.readEscape(reader.read(), true);
                } else {
                    // Bad escape sequence.
                    break;
                }
            } else if (isNameChar(c)) {
                ident += reader.read();
            } else {
                break;
            }
        }

        return ident;
    },

    readEscape: function(first, unescape) {
        var reader  = this._reader,
            cssEscape = first || "",
            i       = 0,
            c       = reader.peek();

        if (isHexDigit(c)) {
            do {
                cssEscape += reader.read();
                c = reader.peek();
            } while (c && isHexDigit(c) && ++i < 6);
        }

        if (cssEscape.length === 1) {
            if (/^[^\r\n\f0-9a-f]$/.test(c)) {
                reader.read();
                if (unescape) {
                    return c;
                }
            } else {
                // We should never get here (readName won't call readEscape
                // if the escape sequence is bad).
                throw new Error("Bad escape sequence.");
            }
        } else if (c === "\r") {
            reader.read();
            if (reader.peek() === "\n") {
                c += reader.read();
            }
        } else if (/^[ \t\n\f]$/.test(c)) {
            reader.read();
        } else {
            c = "";
        }

        if (unescape) {
            var cp = parseInt(cssEscape.slice(first.length), 16);
            return String.fromCodePoint ? String.fromCodePoint(cp) :
                String.fromCharCode(cp);
        }
        return cssEscape + c;
    },

    readComment: function(first) {
        var reader  = this._reader,
            comment = first || "",
            c       = reader.read();

        if (c === "*") {
            while (c) {
                comment += c;

                //look for end of comment
                if (comment.length > 2 && c === "*" && reader.peek() === "/") {
                    comment += reader.read();
                    break;
                }

                c = reader.read();
            }

            return comment;
        } else {
            return "";
        }

    }
});

},{"../util/TokenStreamBase":27,"./PropertyValuePart":11,"./Tokens":18}],18:[function(require,module,exports){
"use strict";

var Tokens = module.exports = [

    /*
     * The following token names are defined in CSS3 Grammar: https://www.w3.org/TR/css3-syntax/#lexical
     */

    // HTML-style comments
    { name: "CDO" },
    { name: "CDC" },

    // ignorables
    { name: "S", whitespace: true/*, channel: "ws"*/ },
    { name: "COMMENT", comment: true, hide: true, channel: "comment" },

    // attribute equality
    { name: "INCLUDES", text: "~=" },
    { name: "DASHMATCH", text: "|=" },
    { name: "PREFIXMATCH", text: "^=" },
    { name: "SUFFIXMATCH", text: "$=" },
    { name: "SUBSTRINGMATCH", text: "*=" },

    // identifier types
    { name: "STRING" },
    { name: "IDENT" },
    { name: "HASH" },

    // at-keywords
    { name: "IMPORT_SYM", text: "@import" },
    { name: "PAGE_SYM", text: "@page" },
    { name: "MEDIA_SYM", text: "@media" },
    { name: "FONT_FACE_SYM", text: "@font-face" },
    { name: "CHARSET_SYM", text: "@charset" },
    { name: "NAMESPACE_SYM", text: "@namespace" },
    { name: "SUPPORTS_SYM", text: "@supports" },
    { name: "VIEWPORT_SYM", text: ["@viewport", "@-ms-viewport", "@-o-viewport"] },
    { name: "DOCUMENT_SYM", text: ["@document", "@-moz-document"] },
    { name: "UNKNOWN_SYM" },
    //{ name: "ATKEYWORD"},

    // CSS3 animations
    { name: "KEYFRAMES_SYM", text: [ "@keyframes", "@-webkit-keyframes", "@-moz-keyframes", "@-o-keyframes" ] },

    // important symbol
    { name: "IMPORTANT_SYM" },

    // measurements
    { name: "LENGTH" },
    { name: "ANGLE" },
    { name: "TIME" },
    { name: "FREQ" },
    { name: "DIMENSION" },
    { name: "PERCENTAGE" },
    { name: "NUMBER" },

    // functions
    { name: "URI" },
    { name: "FUNCTION" },

    // Unicode ranges
    { name: "UNICODE_RANGE" },

    /*
     * The following token names are defined in CSS3 Selectors: https://www.w3.org/TR/css3-selectors/#selector-syntax
     */

    // invalid string
    { name: "INVALID" },

    // combinators
    { name: "PLUS", text: "+" },
    { name: "GREATER", text: ">" },
    { name: "COMMA", text: "," },
    { name: "TILDE", text: "~" },

    // modifier
    { name: "NOT" },

    /*
     * Defined in CSS3 Paged Media
     */
    { name: "TOPLEFTCORNER_SYM", text: "@top-left-corner" },
    { name: "TOPLEFT_SYM", text: "@top-left" },
    { name: "TOPCENTER_SYM", text: "@top-center" },
    { name: "TOPRIGHT_SYM", text: "@top-right" },
    { name: "TOPRIGHTCORNER_SYM", text: "@top-right-corner" },
    { name: "BOTTOMLEFTCORNER_SYM", text: "@bottom-left-corner" },
    { name: "BOTTOMLEFT_SYM", text: "@bottom-left" },
    { name: "BOTTOMCENTER_SYM", text: "@bottom-center" },
    { name: "BOTTOMRIGHT_SYM", text: "@bottom-right" },
    { name: "BOTTOMRIGHTCORNER_SYM", text: "@bottom-right-corner" },
    { name: "LEFTTOP_SYM", text: "@left-top" },
    { name: "LEFTMIDDLE_SYM", text: "@left-middle" },
    { name: "LEFTBOTTOM_SYM", text: "@left-bottom" },
    { name: "RIGHTTOP_SYM", text: "@right-top" },
    { name: "RIGHTMIDDLE_SYM", text: "@right-middle" },
    { name: "RIGHTBOTTOM_SYM", text: "@right-bottom" },

    /*
     * The following token names are defined in CSS3 Media Queries: https://www.w3.org/TR/css3-mediaqueries/#syntax
     */
    /*{ name: "MEDIA_ONLY", state: "media"},
    { name: "MEDIA_NOT", state: "media"},
    { name: "MEDIA_AND", state: "media"},*/
    { name: "RESOLUTION", state: "media" },

    /*
     * The following token names are not defined in any CSS specification but are used by the lexer.
     */

    // not a real token, but useful for stupid IE filters
    { name: "IE_FUNCTION" },

    // part of CSS3 grammar but not the Flex code
    { name: "CHAR" },

    // TODO: Needed?
    // Not defined as tokens, but might as well be
    {
        name: "PIPE",
        text: "|"
    },
    {
        name: "SLASH",
        text: "/"
    },
    {
        name: "MINUS",
        text: "-"
    },
    {
        name: "STAR",
        text: "*"
    },

    {
        name: "LBRACE",
        endChar: "}",
        text: "{"
    },
    {
        name: "RBRACE",
        text: "}"
    },
    {
        name: "LBRACKET",
        endChar: "]",
        text: "["
    },
    {
        name: "RBRACKET",
        text: "]"
    },
    {
        name: "EQUALS",
        text: "="
    },
    {
        name: "COLON",
        text: ":"
    },
    {
        name: "SEMICOLON",
        text: ";"
    },
    {
        name: "LPAREN",
        endChar: ")",
        text: "("
    },
    {
        name: "RPAREN",
        text: ")"
    },
    {
        name: "DOT",
        text: "."
    }
];

(function() {
    var nameMap = [],
        typeMap = Object.create(null);

    Tokens.UNKNOWN = -1;
    Tokens.unshift({ name:"EOF" });
    for (var i=0, len = Tokens.length; i < len; i++) {
        nameMap.push(Tokens[i].name);
        Tokens[Tokens[i].name] = i;
        if (Tokens[i].text) {
            if (Tokens[i].text instanceof Array) {
                for (var j=0; j < Tokens[i].text.length; j++) {
                    typeMap[Tokens[i].text[j]] = i;
                }
            } else {
                typeMap[Tokens[i].text] = i;
            }
        }
    }

    Tokens.name = function(tt) {
        return nameMap[tt];
    };

    Tokens.type = function(c) {
        return typeMap[c] || -1;
    };
})();

},{}],19:[function(require,module,exports){
"use strict";

/* exported Validation */

var Matcher = require("./Matcher");
var Properties = require("./Properties");
var ValidationTypes = require("./ValidationTypes");
var ValidationError = require("./ValidationError");
var PropertyValueIterator = require("./PropertyValueIterator");

var Validation = module.exports = {

    validate: function(property, value) {

        //normalize name
        var name        = property.toString().toLowerCase(),
            expression  = new PropertyValueIterator(value),
            spec        = Properties[name],
            part;

        if (!spec) {
            if (name.indexOf("-") !== 0) {    //vendor prefixed are ok
                throw new ValidationError("Unknown property '" + property + "'.", property.line, property.col);
            }
        } else if (typeof spec !== "number") {

            // All properties accept some CSS-wide values.
            // https://drafts.csswg.org/css-values-3/#common-keywords
            if (ValidationTypes.isAny(expression, "inherit | initial | unset")) {
                if (expression.hasNext()) {
                    part = expression.next();
                    throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
                }
                return;
            }

            // Property-specific validation.
            this.singleProperty(spec, expression);

        }

    },

    singleProperty: function(types, expression) {

        var result      = false,
            value       = expression.value,
            part;

        result = Matcher.parse(types).match(expression);

        if (!result) {
            if (expression.hasNext() && !expression.isFirst()) {
                part = expression.peek();
                throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
            } else {
                throw new ValidationError("Expected (" + ValidationTypes.describe(types) + ") but found '" + value + "'.", value.line, value.col);
            }
        } else if (expression.hasNext()) {
            part = expression.next();
            throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
        }

    }

};

},{"./Matcher":3,"./Properties":7,"./PropertyValueIterator":10,"./ValidationError":20,"./ValidationTypes":21}],20:[function(require,module,exports){
"use strict";

module.exports = ValidationError;

/**
 * Type to use when a validation error occurs.
 * @class ValidationError
 * @namespace parserlib.util
 * @constructor
 * @param {String} message The error message.
 * @param {int} line The line at which the error occurred.
 * @param {int} col The column at which the error occurred.
 */
function ValidationError(message, line, col) {

    /**
     * The column at which the error occurred.
     * @type int
     * @property col
     */
    this.col = col;

    /**
     * The line at which the error occurred.
     * @type int
     * @property line
     */
    this.line = line;

    /**
     * The text representation of the unit.
     * @type String
     * @property text
     */
    this.message = message;

}

//inherit from Error
ValidationError.prototype = new Error();

},{}],21:[function(require,module,exports){
"use strict";

var ValidationTypes = module.exports;

var Matcher = require("./Matcher");

function copy(to, from) {
    Object.keys(from).forEach(function(prop) {
        to[prop] = from[prop];
    });
}
copy(ValidationTypes, {

    isLiteral: function (part, literals) {
        var text = part.text.toString().toLowerCase(),
            args = literals.split(" | "),
            i, len, found = false;

        for (i=0, len=args.length; i < len && !found; i++) {
            if (args[i].charAt(0) === "<") {
                found = this.simple[args[i]](part);
            } else if (args[i].slice(-2) === "()") {
                found = (part.type === "function" &&
                         part.name === args[i].slice(0, -2));
            } else if (text === args[i].toLowerCase()) {
                found = true;
            }
        }

        return found;
    },

    isSimple: function(type) {
        return Boolean(this.simple[type]);
    },

    isComplex: function(type) {
        return Boolean(this.complex[type]);
    },

    describe: function(type) {
        if (this.complex[type] instanceof Matcher) {
            return this.complex[type].toString(0);
        }
        return type;
    },

    /**
     * Determines if the next part(s) of the given expression
     * are any of the given types.
     */
    isAny: function (expression, types) {
        var args = types.split(" | "),
            i, len, found = false;

        for (i=0, len=args.length; i < len && !found && expression.hasNext(); i++) {
            found = this.isType(expression, args[i]);
        }

        return found;
    },

    /**
     * Determines if the next part(s) of the given expression
     * are one of a group.
     */
    isAnyOfGroup: function(expression, types) {
        var args = types.split(" || "),
            i, len, found = false;

        for (i=0, len=args.length; i < len && !found; i++) {
            found = this.isType(expression, args[i]);
        }

        return found ? args[i-1] : false;
    },

    /**
     * Determines if the next part(s) of the given expression
     * are of a given type.
     */
    isType: function (expression, type) {
        var part = expression.peek(),
            result = false;

        if (type.charAt(0) !== "<") {
            result = this.isLiteral(part, type);
            if (result) {
                expression.next();
            }
        } else if (this.simple[type]) {
            result = this.simple[type](part);
            if (result) {
                expression.next();
            }
        } else if (this.complex[type] instanceof Matcher) {
            result = this.complex[type].match(expression);
        } else {
            result = this.complex[type](expression);
        }

        return result;
    },


    simple: {
        __proto__: null,

        "<absolute-size>":
            "xx-small | x-small | small | medium | large | x-large | xx-large",

        "<animateable-feature>":
            "scroll-position | contents | <animateable-feature-name>",

        "<animateable-feature-name>": function(part) {
            return this["<ident>"](part) &&
                !/^(unset|initial|inherit|will-change|auto|scroll-position|contents)$/i.test(part);
        },

        "<angle>": function(part) {
            return part.type === "angle";
        },

        "<attachment>": "scroll | fixed | local",

        "<attr>": "attr()",

        // inset() = inset( <shape-arg>{1,4} [round <border-radius>]? )
        // circle() = circle( [<shape-radius>]? [at <position>]? )
        // ellipse() = ellipse( [<shape-radius>{2}]? [at <position>]? )
        // polygon() = polygon( [<fill-rule>,]? [<shape-arg> <shape-arg>]# )
        "<basic-shape>": "inset() | circle() | ellipse() | polygon()",

        "<bg-image>": "<image> | <gradient> | none",

        "<border-style>":
            "none | hidden | dotted | dashed | solid | double | groove | " +
            "ridge | inset | outset",

        "<border-width>": "<length> | thin | medium | thick",

        "<box>": "padding-box | border-box | content-box",

        "<clip-source>": "<uri>",

        "<color>": function(part) {
            return part.type === "color" || String(part) === "transparent" || String(part) === "currentColor";
        },

        // The SVG <color> spec doesn't include "currentColor" or "transparent" as a color.
        "<color-svg>": function(part) {
            return part.type === "color";
        },

        "<content>": "content()",

        // https://www.w3.org/TR/css3-sizing/#width-height-keywords
        "<content-sizing>":
            "fill-available | -moz-available | -webkit-fill-available | " +
            "max-content | -moz-max-content | -webkit-max-content | " +
            "min-content | -moz-min-content | -webkit-min-content | " +
            "fit-content | -moz-fit-content | -webkit-fit-content",

        "<feature-tag-value>": function(part) {
            return part.type === "function" && /^[A-Z0-9]{4}$/i.test(part);
        },

        // custom() isn't actually in the spec
        "<filter-function>":
            "blur() | brightness() | contrast() | custom() | " +
            "drop-shadow() | grayscale() | hue-rotate() | invert() | " +
            "opacity() | saturate() | sepia()",

        "<flex-basis>": "<width>",

        "<flex-direction>": "row | row-reverse | column | column-reverse",

        "<flex-grow>": "<number>",

        "<flex-shrink>": "<number>",

        "<flex-wrap>": "nowrap | wrap | wrap-reverse",

        "<font-size>":
            "<absolute-size> | <relative-size> | <length> | <percentage>",

        "<font-stretch>":
            "normal | ultra-condensed | extra-condensed | condensed | " +
            "semi-condensed | semi-expanded | expanded | extra-expanded | " +
            "ultra-expanded",

        "<font-style>": "normal | italic | oblique",

        "<font-variant-caps>":
            "small-caps | all-small-caps | petite-caps | all-petite-caps | " +
            "unicase | titling-caps",

        "<font-variant-css21>": "normal | small-caps",

        "<font-weight>":
            "normal | bold | bolder | lighter | " +
            "100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900",

        "<generic-family>":
            "serif | sans-serif | cursive | fantasy | monospace",

        "<geometry-box>": "<shape-box> | fill-box | stroke-box | view-box",

        "<glyph-angle>": function(part) {
            return part.type === "angle" && part.units === "deg";
        },

        "<gradient>": function(part) {
            return part.type === "function" && /^(?:\-(?:ms|moz|o|webkit)\-)?(?:repeating\-)?(?:radial\-|linear\-)?gradient/i.test(part);
        },

        "<icccolor>":
            "cielab() | cielch() | cielchab() | " +
            "icc-color() | icc-named-color()",

        //any identifier
        "<ident>": function(part) {
            return part.type === "identifier" || part.wasIdent;
        },

        "<ident-not-generic-family>": function(part) {
            return this["<ident>"](part) && !this["<generic-family>"](part);
        },

        "<image>": "<uri>",

        "<integer>": function(part) {
            return part.type === "integer";
        },

        "<length>": function(part) {
            if (part.type === "function" && /^(?:\-(?:ms|moz|o|webkit)\-)?calc/i.test(part)) {
                return true;
            } else {
                return part.type === "length" || part.type === "number" || part.type === "integer" || String(part) === "0";
            }
        },

        "<line>": function(part) {
            return part.type === "integer";
        },

        "<line-height>": "<number> | <length> | <percentage> | normal",

        "<margin-width>": "<length> | <percentage> | auto",

        "<miterlimit>": function(part) {
            return this["<number>"](part) && part.value >= 1;
        },

        "<nonnegative-length-or-percentage>": function(part) {
            return (this["<length>"](part) || this["<percentage>"](part)) &&
                (String(part) === "0" || part.type === "function" || (part.value) >= 0);
        },

        "<nonnegative-number-or-percentage>": function(part) {
            return (this["<number>"](part) || this["<percentage>"](part)) &&
                (String(part) === "0" || part.type === "function" || (part.value) >= 0);
        },

        "<number>": function(part) {
            return part.type === "number" || this["<integer>"](part);
        },

        "<opacity-value>": function(part) {
            return this["<number>"](part) && part.value >= 0 && part.value <= 1;
        },

        "<padding-width>": "<nonnegative-length-or-percentage>",

        "<percentage>": function(part) {
            return part.type === "percentage" || String(part) === "0";
        },

        "<relative-size>": "smaller | larger",

        "<shape>": "rect() | inset-rect()",

        "<shape-box>": "<box> | margin-box",

        "<single-animation-direction>":
            "normal | reverse | alternate | alternate-reverse",

        "<single-animation-name>": function(part) {
            return this["<ident>"](part) &&
                /^-?[a-z_][-a-z0-9_]+$/i.test(part) &&
                !/^(none|unset|initial|inherit)$/i.test(part);
        },

        "<string>": function(part) {
            return part.type === "string";
        },

        "<time>": function(part) {
            return part.type === "time";
        },

        "<uri>": function(part) {
            return part.type === "uri";
        },

        "<width>": "<margin-width>"
    },

    complex: {
        __proto__: null,

        "<azimuth>":
            "<angle>" +
            " | " +
            "[ [ left-side | far-left | left | center-left | center | " +
            "center-right | right | far-right | right-side ] || behind ]" +
            " | "+
            "leftwards | rightwards",

        "<bg-position>": "<position>#",

        "<bg-size>":
            "[ <length> | <percentage> | auto ]{1,2} | cover | contain",

        "<border-image-slice>":
        // [<number> | <percentage>]{1,4} && fill?
        // *but* fill can appear between any of the numbers
        Matcher.many([true /* first element is required */],
                     Matcher.cast("<nonnegative-number-or-percentage>"),
                     Matcher.cast("<nonnegative-number-or-percentage>"),
                     Matcher.cast("<nonnegative-number-or-percentage>"),
                     Matcher.cast("<nonnegative-number-or-percentage>"),
                     "fill"),

        "<border-radius>":
            "<nonnegative-length-or-percentage>{1,4} " +
            "[ / <nonnegative-length-or-percentage>{1,4} ]?",

        "<box-shadow>": "none | <shadow>#",

        "<clip-path>": "<basic-shape> || <geometry-box>",

        "<dasharray>":
        // "list of comma and/or white space separated <length>s and
        // <percentage>s".  There is a non-negative constraint.
        Matcher.cast("<nonnegative-length-or-percentage>")
            .braces(1, Infinity, "#", Matcher.cast(",").question()),

        "<family-name>":
            // <string> | <IDENT>+
            "<string> | <ident-not-generic-family> <ident>*",

        "<filter-function-list>": "[ <filter-function> | <uri> ]+",

        // https://www.w3.org/TR/2014/WD-css-flexbox-1-20140325/#flex-property
        "<flex>":
            "none | [ <flex-grow> <flex-shrink>? || <flex-basis> ]",

        "<font-family>": "[ <generic-family> | <family-name> ]#",

        "<font-shorthand>":
            "[ <font-style> || <font-variant-css21> || " +
            "<font-weight> || <font-stretch> ]? <font-size> " +
            "[ / <line-height> ]? <font-family>",

        "<font-variant-alternates>":
            // stylistic(<feature-value-name>)
            "stylistic() || " +
            "historical-forms || " +
            // styleset(<feature-value-name> #)
            "styleset() || " +
            // character-variant(<feature-value-name> #)
            "character-variant() || " +
            // swash(<feature-value-name>)
            "swash() || " +
            // ornaments(<feature-value-name>)
            "ornaments() || " +
            // annotation(<feature-value-name>)
            "annotation()",

        "<font-variant-ligatures>":
            // <common-lig-values>
            "[ common-ligatures | no-common-ligatures ] || " +
            // <discretionary-lig-values>
            "[ discretionary-ligatures | no-discretionary-ligatures ] || " +
            // <historical-lig-values>
            "[ historical-ligatures | no-historical-ligatures ] || " +
            // <contextual-alt-values>
            "[ contextual | no-contextual ]",

        "<font-variant-numeric>":
            // <numeric-figure-values>
            "[ lining-nums | oldstyle-nums ] || " +
            // <numeric-spacing-values>
            "[ proportional-nums | tabular-nums ] || " +
            // <numeric-fraction-values>
            "[ diagonal-fractions | stacked-fractions ] || " +
            "ordinal || slashed-zero",

        "<font-variant-east-asian>":
            // <east-asian-variant-values>
            "[ jis78 | jis83 | jis90 | jis04 | simplified | traditional ] || " +
            // <east-asian-width-values>
            "[ full-width | proportional-width ] || " +
            "ruby",

        // Note that <color> here is "as defined in the SVG spec", which
        // is more restrictive that the <color> defined in the CSS spec.
        // none | currentColor | <color> [<icccolor>]? |
        // <funciri> [ none | currentColor | <color> [<icccolor>]? ]?
        "<paint>": "<paint-basic> | <uri> <paint-basic>?",

        // Helper definition for <paint> above.
        "<paint-basic>": "none | currentColor | <color-svg> <icccolor>?",

        "<position>":
            // Because our `alt` combinator is ordered, we need to test these
            // in order from longest possible match to shortest.
            "[ center | [ left | right ] [ <percentage> | <length> ]? ] && " +
            "[ center | [ top | bottom ] [ <percentage> | <length> ]? ]" +
            " | " +
            "[ left | center | right | <percentage> | <length> ] " +
            "[ top | center | bottom | <percentage> | <length> ]" +
            " | " +
            "[ left | center | right | top | bottom | <percentage> | <length> ]",

        "<repeat-style>":
            "repeat-x | repeat-y | [ repeat | space | round | no-repeat ]{1,2}",

        "<shadow>":
        //inset? && [ <length>{2,4} && <color>? ]
        Matcher.many([true /* length is required */],
                     Matcher.cast("<length>").braces(2, 4), "inset", "<color>"),

        "<text-decoration-color>":
           "<color>",

        "<text-decoration-line>":
            "none | [ underline || overline || line-through || blink ]",

        "<text-decoration-style>":
            "solid | double | dotted | dashed | wavy",

        "<will-change>":
            "auto | <animateable-feature>#",

        "<x-one-radius>":
            //[ <length> | <percentage> ] [ <length> | <percentage> ]?
            "[ <length> | <percentage> ]{1,2}"
    }
});

Object.keys(ValidationTypes.simple).forEach(function(nt) {
    var rule = ValidationTypes.simple[nt];
    if (typeof rule === "string") {
        ValidationTypes.simple[nt] = function(part) {
            return ValidationTypes.isLiteral(part, rule);
        };
    }
});

Object.keys(ValidationTypes.complex).forEach(function(nt) {
    var rule = ValidationTypes.complex[nt];
    if (typeof rule === "string") {
        ValidationTypes.complex[nt] = Matcher.parse(rule);
    }
});

// Because this is defined relative to other complex validation types,
// we need to define it *after* the rest of the types are initialized.
ValidationTypes.complex["<font-variant>"] =
    Matcher.oror({ expand: "<font-variant-ligatures>" },
                 { expand: "<font-variant-alternates>" },
                 "<font-variant-caps>",
                 { expand: "<font-variant-numeric>" },
                 { expand: "<font-variant-east-asian>" });

},{"./Matcher":3}],22:[function(require,module,exports){
"use strict";

module.exports = {
    Colors            : require("./Colors"),
    Combinator        : require("./Combinator"),
    Parser            : require("./Parser"),
    PropertyName      : require("./PropertyName"),
    PropertyValue     : require("./PropertyValue"),
    PropertyValuePart : require("./PropertyValuePart"),
    Matcher           : require("./Matcher"),
    MediaFeature      : require("./MediaFeature"),
    MediaQuery        : require("./MediaQuery"),
    Selector          : require("./Selector"),
    SelectorPart      : require("./SelectorPart"),
    SelectorSubPart   : require("./SelectorSubPart"),
    Specificity       : require("./Specificity"),
    TokenStream       : require("./TokenStream"),
    Tokens            : require("./Tokens"),
    ValidationError   : require("./ValidationError")
};

},{"./Colors":1,"./Combinator":2,"./Matcher":3,"./MediaFeature":4,"./MediaQuery":5,"./Parser":6,"./PropertyName":8,"./PropertyValue":9,"./PropertyValuePart":11,"./Selector":13,"./SelectorPart":14,"./SelectorSubPart":15,"./Specificity":16,"./TokenStream":17,"./Tokens":18,"./ValidationError":20}],23:[function(require,module,exports){
"use strict";

module.exports = EventTarget;

/**
 * A generic base to inherit from for any object
 * that needs event handling.
 * @class EventTarget
 * @constructor
 */
function EventTarget() {

    /**
     * The array of listeners for various events.
     * @type Object
     * @property _listeners
     * @private
     */
    this._listeners = Object.create(null);
}

EventTarget.prototype = {

    //restore constructor
    constructor: EventTarget,

    /**
     * Adds a listener for a given event type.
     * @param {String} type The type of event to add a listener for.
     * @param {Function} listener The function to call when the event occurs.
     * @return {void}
     * @method addListener
     */
    addListener: function(type, listener) {
        if (!this._listeners[type]) {
            this._listeners[type] = [];
        }

        this._listeners[type].push(listener);
    },

    /**
     * Fires an event based on the passed-in object.
     * @param {Object|String} event An object with at least a 'type' attribute
     *      or a string indicating the event name.
     * @return {void}
     * @method fire
     */
    fire: function(event) {
        if (typeof event === "string") {
            event = { type: event };
        }
        if (typeof event.target !== "undefined") {
            event.target = this;
        }

        if (typeof event.type === "undefined") {
            throw new Error("Event object missing 'type' property.");
        }

        if (this._listeners[event.type]) {

            //create a copy of the array and use that so listeners can't chane
            var listeners = this._listeners[event.type].concat();
            for (var i=0, len=listeners.length; i < len; i++) {
                listeners[i].call(this, event);
            }
        }
    },

    /**
     * Removes a listener for a given event type.
     * @param {String} type The type of event to remove a listener from.
     * @param {Function} listener The function to remove from the event.
     * @return {void}
     * @method removeListener
     */
    removeListener: function(type, listener) {
        if (this._listeners[type]) {
            var listeners = this._listeners[type];
            for (var i=0, len=listeners.length; i < len; i++) {
                if (listeners[i] === listener) {
                    listeners.splice(i, 1);
                    break;
                }
            }


        }
    }
};

},{}],24:[function(require,module,exports){
"use strict";

module.exports = StringReader;

/**
 * Convenient way to read through strings.
 * @namespace parserlib.util
 * @class StringReader
 * @constructor
 * @param {String} text The text to read.
 */
function StringReader(text) {

    /**
     * The input text with line endings normalized.
     * @property _input
     * @type String
     * @private
     */
    this._input = text.replace(/(\r\n?|\n)/g, "\n");


    /**
     * The row for the character to be read next.
     * @property _line
     * @type int
     * @private
     */
    this._line = 1;


    /**
     * The column for the character to be read next.
     * @property _col
     * @type int
     * @private
     */
    this._col = 1;

    /**
     * The index of the character in the input to be read next.
     * @property _cursor
     * @type int
     * @private
     */
    this._cursor = 0;
}

StringReader.prototype = {

    // restore constructor
    constructor: StringReader,

    //-------------------------------------------------------------------------
    // Position info
    //-------------------------------------------------------------------------

    /**
     * Returns the column of the character to be read next.
     * @return {int} The column of the character to be read next.
     * @method getCol
     */
    getCol: function() {
        return this._col;
    },

    /**
     * Returns the row of the character to be read next.
     * @return {int} The row of the character to be read next.
     * @method getLine
     */
    getLine: function() {
        return this._line;
    },

    /**
     * Determines if you're at the end of the input.
     * @return {Boolean} True if there's no more input, false otherwise.
     * @method eof
     */
    eof: function() {
        return this._cursor === this._input.length;
    },

    //-------------------------------------------------------------------------
    // Basic reading
    //-------------------------------------------------------------------------

    /**
     * Reads the next character without advancing the cursor.
     * @param {int} count How many characters to look ahead (default is 1).
     * @return {String} The next character or null if there is no next character.
     * @method peek
     */
    peek: function(count) {
        var c = null;
        count = typeof count === "undefined" ? 1 : count;

        // if we're not at the end of the input...
        if (this._cursor < this._input.length) {

            // get character and increment cursor and column
            c = this._input.charAt(this._cursor + count - 1);
        }

        return c;
    },

    /**
     * Reads the next character from the input and adjusts the row and column
     * accordingly.
     * @return {String} The next character or null if there is no next character.
     * @method read
     */
    read: function() {
        var c = null;

        // if we're not at the end of the input...
        if (this._cursor < this._input.length) {

            // if the last character was a newline, increment row count
            // and reset column count
            if (this._input.charAt(this._cursor) === "\n") {
                this._line++;
                this._col=1;
            } else {
                this._col++;
            }

            // get character and increment cursor and column
            c = this._input.charAt(this._cursor++);
        }

        return c;
    },

    //-------------------------------------------------------------------------
    // Misc
    //-------------------------------------------------------------------------

    /**
     * Saves the current location so it can be returned to later.
     * @method mark
     * @return {void}
     */
    mark: function() {
        this._bookmark = {
            cursor: this._cursor,
            line:   this._line,
            col:    this._col
        };
    },

    reset: function() {
        if (this._bookmark) {
            this._cursor = this._bookmark.cursor;
            this._line = this._bookmark.line;
            this._col = this._bookmark.col;
            delete this._bookmark;
        }
    },

    //-------------------------------------------------------------------------
    // Advanced reading
    //-------------------------------------------------------------------------

    /**
     * Reads up to and including the given string. Throws an error if that
     * string is not found.
     * @param {String} pattern The string to read.
     * @return {String} The string when it is found.
     * @throws Error when the string pattern is not found.
     * @method readTo
     */
    readTo: function(pattern) {

        var buffer = "",
            c;

        /*
         * First, buffer must be the same length as the pattern.
         * Then, buffer must end with the pattern or else reach the
         * end of the input.
         */
        while (buffer.length < pattern.length || buffer.lastIndexOf(pattern) !== buffer.length - pattern.length) {
            c = this.read();
            if (c) {
                buffer += c;
            } else {
                throw new Error("Expected \"" + pattern + "\" at line " + this._line  + ", col " + this._col + ".");
            }
        }

        return buffer;

    },

    /**
     * Reads characters while each character causes the given
     * filter function to return true. The function is passed
     * in each character and either returns true to continue
     * reading or false to stop.
     * @param {Function} filter The function to read on each character.
     * @return {String} The string made up of all characters that passed the
     *      filter check.
     * @method readWhile
     */
    readWhile: function(filter) {

        var buffer = "",
            c = this.peek();

        while (c !== null && filter(c)) {
            buffer += this.read();
            c = this.peek();
        }

        return buffer;

    },

    /**
     * Reads characters that match either text or a regular expression and
     * returns those characters. If a match is found, the row and column
     * are adjusted; if no match is found, the reader's state is unchanged.
     * reading or false to stop.
     * @param {String|RegExp} matcher If a string, then the literal string
     *      value is searched for. If a regular expression, then any string
     *      matching the pattern is search for.
     * @return {String} The string made up of all characters that matched or
     *      null if there was no match.
     * @method readMatch
     */
    readMatch: function(matcher) {

        var source = this._input.substring(this._cursor),
            value = null;

        // if it's a string, just do a straight match
        if (typeof matcher === "string") {
            if (source.slice(0, matcher.length) === matcher) {
                value = this.readCount(matcher.length);
            }
        } else if (matcher instanceof RegExp) {
            if (matcher.test(source)) {
                value = this.readCount(RegExp.lastMatch.length);
            }
        }

        return value;
    },


    /**
     * Reads a given number of characters. If the end of the input is reached,
     * it reads only the remaining characters and does not throw an error.
     * @param {int} count The number of characters to read.
     * @return {String} The string made up the read characters.
     * @method readCount
     */
    readCount: function(count) {
        var buffer = "";

        while (count--) {
            buffer += this.read();
        }

        return buffer;
    }

};

},{}],25:[function(require,module,exports){
"use strict";

module.exports = SyntaxError;

/**
 * Type to use when a syntax error occurs.
 * @class SyntaxError
 * @namespace parserlib.util
 * @constructor
 * @param {String} message The error message.
 * @param {int} line The line at which the error occurred.
 * @param {int} col The column at which the error occurred.
 */
function SyntaxError(message, line, col) {
    Error.call(this);
    this.name = this.constructor.name;

    /**
     * The column at which the error occurred.
     * @type int
     * @property col
     */
    this.col = col;

    /**
     * The line at which the error occurred.
     * @type int
     * @property line
     */
    this.line = line;

    /**
     * The text representation of the unit.
     * @type String
     * @property text
     */
    this.message = message;

}

//inherit from Error
SyntaxError.prototype = Object.create(Error.prototype); // jshint ignore:line
SyntaxError.prototype.constructor = SyntaxError; // jshint ignore:line

},{}],26:[function(require,module,exports){
"use strict";

module.exports = SyntaxUnit;

/**
 * Base type to represent a single syntactic unit.
 * @class SyntaxUnit
 * @namespace parserlib.util
 * @constructor
 * @param {String} text The text of the unit.
 * @param {int} line The line of text on which the unit resides.
 * @param {int} col The column of text on which the unit resides.
 */
function SyntaxUnit(text, line, col, type) {


    /**
     * The column of text on which the unit resides.
     * @type int
     * @property col
     */
    this.col = col;

    /**
     * The line of text on which the unit resides.
     * @type int
     * @property line
     */
    this.line = line;

    /**
     * The text representation of the unit.
     * @type String
     * @property text
     */
    this.text = text;

    /**
     * The type of syntax unit.
     * @type int
     * @property type
     */
    this.type = type;
}

/**
 * Create a new syntax unit based solely on the given token.
 * Convenience method for creating a new syntax unit when
 * it represents a single token instead of multiple.
 * @param {Object} token The token object to represent.
 * @return {parserlib.util.SyntaxUnit} The object representing the token.
 * @static
 * @method fromToken
 */
SyntaxUnit.fromToken = function(token) {
    return new SyntaxUnit(token.value, token.startLine, token.startCol);
};

SyntaxUnit.prototype = {

    //restore constructor
    constructor: SyntaxUnit,

    /**
     * Returns the text representation of the unit.
     * @return {String} The text representation of the unit.
     * @method valueOf
     */
    valueOf: function() {
        return this.toString();
    },

    /**
     * Returns the text representation of the unit.
     * @return {String} The text representation of the unit.
     * @method toString
     */
    toString: function() {
        return this.text;
    }

};

},{}],27:[function(require,module,exports){
"use strict";

module.exports = TokenStreamBase;

var StringReader = require("./StringReader");
var SyntaxError = require("./SyntaxError");

/**
 * Generic TokenStream providing base functionality.
 * @class TokenStreamBase
 * @namespace parserlib.util
 * @constructor
 * @param {String|StringReader} input The text to tokenize or a reader from
 *      which to read the input.
 */
function TokenStreamBase(input, tokenData) {

    /**
     * The string reader for easy access to the text.
     * @type StringReader
     * @property _reader
     * @private
     */
    this._reader = new StringReader(input ? input.toString() : "");

    /**
     * Token object for the last consumed token.
     * @type Token
     * @property _token
     * @private
     */
    this._token = null;

    /**
     * The array of token information.
     * @type Array
     * @property _tokenData
     * @private
     */
    this._tokenData = tokenData;

    /**
     * Lookahead token buffer.
     * @type Array
     * @property _lt
     * @private
     */
    this._lt = [];

    /**
     * Lookahead token buffer index.
     * @type int
     * @property _ltIndex
     * @private
     */
    this._ltIndex = 0;

    this._ltIndexCache = [];
}

/**
 * Accepts an array of token information and outputs
 * an array of token data containing key-value mappings
 * and matching functions that the TokenStream needs.
 * @param {Array} tokens An array of token descriptors.
 * @return {Array} An array of processed token data.
 * @method createTokenData
 * @static
 */
TokenStreamBase.createTokenData = function(tokens) {

    var nameMap     = [],
        typeMap     = Object.create(null),
        tokenData     = tokens.concat([]),
        i            = 0,
        len            = tokenData.length+1;

    tokenData.UNKNOWN = -1;
    tokenData.unshift({ name:"EOF" });

    for (; i < len; i++) {
        nameMap.push(tokenData[i].name);
        tokenData[tokenData[i].name] = i;
        if (tokenData[i].text) {
            typeMap[tokenData[i].text] = i;
        }
    }

    tokenData.name = function(tt) {
        return nameMap[tt];
    };

    tokenData.type = function(c) {
        return typeMap[c];
    };

    return tokenData;
};

TokenStreamBase.prototype = {

    //restore constructor
    constructor: TokenStreamBase,

    //-------------------------------------------------------------------------
    // Matching methods
    //-------------------------------------------------------------------------

    /**
     * Determines if the next token matches the given token type.
     * If so, that token is consumed; if not, the token is placed
     * back onto the token stream. You can pass in any number of
     * token types and this will return true if any of the token
     * types is found.
     * @param {int|int[]} tokenTypes Either a single token type or an array of
     *      token types that the next token might be. If an array is passed,
     *      it's assumed that the token can be any of these.
     * @param {variant} channel (Optional) The channel to read from. If not
     *      provided, reads from the default (unnamed) channel.
     * @return {Boolean} True if the token type matches, false if not.
     * @method match
     */
    match: function(tokenTypes, channel) {

        //always convert to an array, makes things easier
        if (!(tokenTypes instanceof Array)) {
            tokenTypes = [tokenTypes];
        }

        var tt  = this.get(channel),
            i   = 0,
            len = tokenTypes.length;

        while (i < len) {
            if (tt === tokenTypes[i++]) {
                return true;
            }
        }

        //no match found, put the token back
        this.unget();
        return false;
    },

    /**
     * Determines if the next token matches the given token type.
     * If so, that token is consumed; if not, an error is thrown.
     * @param {int|int[]} tokenTypes Either a single token type or an array of
     *      token types that the next token should be. If an array is passed,
     *      it's assumed that the token must be one of these.
     * @return {void}
     * @method mustMatch
     */
    mustMatch: function(tokenTypes) {

        var token;

        //always convert to an array, makes things easier
        if (!(tokenTypes instanceof Array)) {
            tokenTypes = [tokenTypes];
        }

        if (!this.match.apply(this, arguments)) {
            token = this.LT(1);
            throw new SyntaxError("Expected " + this._tokenData[tokenTypes[0]].name +
                " at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol);
        }
    },

    //-------------------------------------------------------------------------
    // Consuming methods
    //-------------------------------------------------------------------------

    /**
     * Keeps reading from the token stream until either one of the specified
     * token types is found or until the end of the input is reached.
     * @param {int|int[]} tokenTypes Either a single token type or an array of
     *      token types that the next token should be. If an array is passed,
     *      it's assumed that the token must be one of these.
     * @param {variant} channel (Optional) The channel to read from. If not
     *      provided, reads from the default (unnamed) channel.
     * @return {void}
     * @method advance
     */
    advance: function(tokenTypes, channel) {

        while (this.LA(0) !== 0 && !this.match(tokenTypes, channel)) {
            this.get();
        }

        return this.LA(0);
    },

    /**
     * Consumes the next token from the token stream.
     * @return {int} The token type of the token that was just consumed.
     * @method get
     */
    get: function(channel) {

        var tokenInfo   = this._tokenData,
            i           =0,
            token,
            info;

        //check the lookahead buffer first
        if (this._lt.length && this._ltIndex >= 0 && this._ltIndex < this._lt.length) {

            i++;
            this._token = this._lt[this._ltIndex++];
            info = tokenInfo[this._token.type];

            //obey channels logic
            while ((info.channel !== undefined && channel !== info.channel) &&
                    this._ltIndex < this._lt.length) {
                this._token = this._lt[this._ltIndex++];
                info = tokenInfo[this._token.type];
                i++;
            }

            //here be dragons
            if ((info.channel === undefined || channel === info.channel) &&
                    this._ltIndex <= this._lt.length) {
                this._ltIndexCache.push(i);
                return this._token.type;
            }
        }

        //call token retriever method
        token = this._getToken();

        //if it should be hidden, don't save a token
        if (token.type > -1 && !tokenInfo[token.type].hide) {

            //apply token channel
            token.channel = tokenInfo[token.type].channel;

            //save for later
            this._token = token;
            this._lt.push(token);

            //save space that will be moved (must be done before array is truncated)
            this._ltIndexCache.push(this._lt.length - this._ltIndex + i);

            //keep the buffer under 5 items
            if (this._lt.length > 5) {
                this._lt.shift();
            }

            //also keep the shift buffer under 5 items
            if (this._ltIndexCache.length > 5) {
                this._ltIndexCache.shift();
            }

            //update lookahead index
            this._ltIndex = this._lt.length;
        }

        /*
         * Skip to the next token if:
         * 1. The token type is marked as hidden.
         * 2. The token type has a channel specified and it isn't the current channel.
         */
        info = tokenInfo[token.type];
        if (info &&
                (info.hide ||
                (info.channel !== undefined && channel !== info.channel))) {
            return this.get(channel);
        } else {
            //return just the type
            return token.type;
        }
    },

    /**
     * Looks ahead a certain number of tokens and returns the token type at
     * that position. This will throw an error if you lookahead past the
     * end of input, past the size of the lookahead buffer, or back past
     * the first token in the lookahead buffer.
     * @param {int} The index of the token type to retrieve. 0 for the
     *      current token, 1 for the next, -1 for the previous, etc.
     * @return {int} The token type of the token in the given position.
     * @method LA
     */
    LA: function(index) {
        var total = index,
            tt;
        if (index > 0) {
            //TODO: Store 5 somewhere
            if (index > 5) {
                throw new Error("Too much lookahead.");
            }

            //get all those tokens
            while (total) {
                tt = this.get();
                total--;
            }

            //unget all those tokens
            while (total < index) {
                this.unget();
                total++;
            }
        } else if (index < 0) {

            if (this._lt[this._ltIndex+index]) {
                tt = this._lt[this._ltIndex+index].type;
            } else {
                throw new Error("Too much lookbehind.");
            }

        } else {
            tt = this._token.type;
        }

        return tt;

    },

    /**
     * Looks ahead a certain number of tokens and returns the token at
     * that position. This will throw an error if you lookahead past the
     * end of input, past the size of the lookahead buffer, or back past
     * the first token in the lookahead buffer.
     * @param {int} The index of the token type to retrieve. 0 for the
     *      current token, 1 for the next, -1 for the previous, etc.
     * @return {Object} The token of the token in the given position.
     * @method LA
     */
    LT: function(index) {

        //lookahead first to prime the token buffer
        this.LA(index);

        //now find the token, subtract one because _ltIndex is already at the next index
        return this._lt[this._ltIndex+index-1];
    },

    /**
     * Returns the token type for the next token in the stream without
     * consuming it.
     * @return {int} The token type of the next token in the stream.
     * @method peek
     */
    peek: function() {
        return this.LA(1);
    },

    /**
     * Returns the actual token object for the last consumed token.
     * @return {Token} The token object for the last consumed token.
     * @method token
     */
    token: function() {
        return this._token;
    },

    /**
     * Returns the name of the token for the given token type.
     * @param {int} tokenType The type of token to get the name of.
     * @return {String} The name of the token or "UNKNOWN_TOKEN" for any
     *      invalid token type.
     * @method tokenName
     */
    tokenName: function(tokenType) {
        if (tokenType < 0 || tokenType > this._tokenData.length) {
            return "UNKNOWN_TOKEN";
        } else {
            return this._tokenData[tokenType].name;
        }
    },

    /**
     * Returns the token type value for the given token name.
     * @param {String} tokenName The name of the token whose value should be returned.
     * @return {int} The token type value for the given token name or -1
     *      for an unknown token.
     * @method tokenName
     */
    tokenType: function(tokenName) {
        return this._tokenData[tokenName] || -1;
    },

    /**
     * Returns the last consumed token to the token stream.
     * @method unget
     */
    unget: function() {
        //if (this._ltIndex > -1) {
        if (this._ltIndexCache.length) {
            this._ltIndex -= this._ltIndexCache.pop();//--;
            this._token = this._lt[this._ltIndex - 1];
        } else {
            throw new Error("Too much lookahead.");
        }
    }

};


},{"./StringReader":24,"./SyntaxError":25}],28:[function(require,module,exports){
"use strict";

module.exports = {
    StringReader    : require("./StringReader"),
    SyntaxError     : require("./SyntaxError"),
    SyntaxUnit      : require("./SyntaxUnit"),
    EventTarget     : require("./EventTarget"),
    TokenStreamBase : require("./TokenStreamBase")
};

},{"./EventTarget":23,"./StringReader":24,"./SyntaxError":25,"./SyntaxUnit":26,"./TokenStreamBase":27}],"parserlib":[function(require,module,exports){
"use strict";

module.exports = {
    css  : require("./css"),
    util : require("./util")
};

},{"./css":22,"./util":28}]},{},[]);

return require('parserlib');
})();
var clone = (function() {
'use strict';

var nativeMap;
try {
  nativeMap = Map;
} catch(_) {
  // maybe a reference error because no `Map`. Give it a dummy value that no
  // value will ever be an instanceof.
  nativeMap = function() {};
}

var nativeSet;
try {
  nativeSet = Set;
} catch(_) {
  nativeSet = function() {};
}

var nativePromise;
try {
  nativePromise = Promise;
} catch(_) {
  nativePromise = function() {};
}

/**
 * Clones (copies) an Object using deep copying.
 *
 * This function supports circular references by default, but if you are certain
 * there are no circular references in your object, you can save some CPU time
 * by calling clone(obj, false).
 *
 * Caution: if `circular` is false and `parent` contains circular references,
 * your program may enter an infinite loop and crash.
 *
 * @param `parent` - the object to be cloned
 * @param `circular` - set to true if the object to be cloned may contain
 *    circular references. (optional - true by default)
 * @param `depth` - set to a number if the object is only to be cloned to
 *    a particular depth. (optional - defaults to Infinity)
 * @param `prototype` - sets the prototype to be used when cloning an object.
 *    (optional - defaults to parent prototype).
 * @param `includeNonEnumerable` - set to true if the non-enumerable properties
 *    should be cloned as well. Non-enumerable properties on the prototype
 *    chain will be ignored. (optional - false by default)
*/
function clone(parent, circular, depth, prototype, includeNonEnumerable) {
  if (typeof circular === 'object') {
    depth = circular.depth;
    prototype = circular.prototype;
    includeNonEnumerable = circular.includeNonEnumerable;
    circular = circular.circular;
  }
  // maintain two arrays for circular references, where corresponding parents
  // and children have the same index
  var allParents = [];
  var allChildren = [];

  var useBuffer = typeof Buffer != 'undefined';

  if (typeof circular == 'undefined')
    circular = true;

  if (typeof depth == 'undefined')
    depth = Infinity;

  // recurse this function so we don't reset allParents and allChildren
  function _clone(parent, depth) {
    // cloning null always returns null
    if (parent === null)
      return null;

    if (depth === 0)
      return parent;

    var child;
    var proto;
    if (typeof parent != 'object') {
      return parent;
    }

    if (parent instanceof nativeMap) {
      child = new nativeMap();
    } else if (parent instanceof nativeSet) {
      child = new nativeSet();
    } else if (parent instanceof nativePromise) {
      child = new nativePromise(function (resolve, reject) {
        parent.then(function(value) {
          resolve(_clone(value, depth - 1));
        }, function(err) {
          reject(_clone(err, depth - 1));
        });
      });
    } else if (clone.__isArray(parent)) {
      child = [];
    } else if (clone.__isRegExp(parent)) {
      child = new RegExp(parent.source, __getRegExpFlags(parent));
      if (parent.lastIndex) child.lastIndex = parent.lastIndex;
    } else if (clone.__isDate(parent)) {
      child = new Date(parent.getTime());
    } else if (useBuffer && Buffer.isBuffer(parent)) {
      child = new Buffer(parent.length);
      parent.copy(child);
      return child;
    } else if (parent instanceof Error) {
      child = Object.create(parent);
    } else {
      if (typeof prototype == 'undefined') {
        proto = Object.getPrototypeOf(parent);
        child = Object.create(proto);
      }
      else {
        child = Object.create(prototype);
        proto = prototype;
      }
    }

    if (circular) {
      var index = allParents.indexOf(parent);

      if (index != -1) {
        return allChildren[index];
      }
      allParents.push(parent);
      allChildren.push(child);
    }

    if (parent instanceof nativeMap) {
      var keyIterator = parent.keys();
      while(true) {
        var next = keyIterator.next();
        if (next.done) {
          break;
        }
        var keyChild = _clone(next.value, depth - 1);
        var valueChild = _clone(parent.get(next.value), depth - 1);
        child.set(keyChild, valueChild);
      }
    }
    if (parent instanceof nativeSet) {
      var iterator = parent.keys();
      while(true) {
        var next = iterator.next();
        if (next.done) {
          break;
        }
        var entryChild = _clone(next.value, depth - 1);
        child.add(entryChild);
      }
    }

    for (var i in parent) {
      var attrs;
      if (proto) {
        attrs = Object.getOwnPropertyDescriptor(proto, i);
      }

      if (attrs && attrs.set == null) {
        continue;
      }
      child[i] = _clone(parent[i], depth - 1);
    }

    if (Object.getOwnPropertySymbols) {
      var symbols = Object.getOwnPropertySymbols(parent);
      for (var i = 0; i < symbols.length; i++) {
        // Don't need to worry about cloning a symbol because it is a primitive,
        // like a number or string.
        var symbol = symbols[i];
        var descriptor = Object.getOwnPropertyDescriptor(parent, symbol);
        if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
          continue;
        }
        child[symbol] = _clone(parent[symbol], depth - 1);
        if (!descriptor.enumerable) {
          Object.defineProperty(child, symbol, {
            enumerable: false
          });
        }
      }
    }

    if (includeNonEnumerable) {
      var allPropertyNames = Object.getOwnPropertyNames(parent);
      for (var i = 0; i < allPropertyNames.length; i++) {
        var propertyName = allPropertyNames[i];
        var descriptor = Object.getOwnPropertyDescriptor(parent, propertyName);
        if (descriptor && descriptor.enumerable) {
          continue;
        }
        child[propertyName] = _clone(parent[propertyName], depth - 1);
        Object.defineProperty(child, propertyName, {
          enumerable: false
        });
      }
    }

    return child;
  }

  return _clone(parent, depth);
}

/**
 * Simple flat clone using prototype, accepts only objects, usefull for property
 * override on FLAT configuration object (no nested props).
 *
 * USE WITH CAUTION! This may not behave as you wish if you do not know how this
 * works.
 */
clone.clonePrototype = function clonePrototype(parent) {
  if (parent === null)
    return null;

  var c = function () {};
  c.prototype = parent;
  return new c();
};

// private utility functions

function __objToStr(o) {
  return Object.prototype.toString.call(o);
}
clone.__objToStr = __objToStr;

function __isDate(o) {
  return typeof o === 'object' && __objToStr(o) === '[object Date]';
}
clone.__isDate = __isDate;

function __isArray(o) {
  return typeof o === 'object' && __objToStr(o) === '[object Array]';
}
clone.__isArray = __isArray;

function __isRegExp(o) {
  return typeof o === 'object' && __objToStr(o) === '[object RegExp]';
}
clone.__isRegExp = __isRegExp;

function __getRegExpFlags(re) {
  var flags = '';
  if (re.global) flags += 'g';
  if (re.ignoreCase) flags += 'i';
  if (re.multiline) flags += 'm';
  return flags;
}
clone.__getRegExpFlags = __getRegExpFlags;

return clone;
})();

if (typeof module === 'object' && module.exports) {
  module.exports = clone;
}

/**
 * Main CSSLint object.
 * @class CSSLint
 * @static
 * @extends parserlib.util.EventTarget
 */

/* global parserlib, clone, Reporter */
/* exported CSSLint */

var CSSLint = (function() {
    "use strict";

    var rules           = [],
        formatters      = [],
        embeddedRuleset = /\/\*\s*csslint([^\*]*)\*\//,
        api             = new parserlib.util.EventTarget();

    api.version = "1.0.4";

    //-------------------------------------------------------------------------
    // Rule Management
    //-------------------------------------------------------------------------

    /**
     * Adds a new rule to the engine.
     * @param {Object} rule The rule to add.
     * @method addRule
     */
    api.addRule = function(rule) {
        rules.push(rule);
        rules[rule.id] = rule;
    };

    /**
     * Clears all rule from the engine.
     * @method clearRules
     */
    api.clearRules = function() {
        rules = [];
    };

    /**
     * Returns the rule objects.
     * @return An array of rule objects.
     * @method getRules
     */
    api.getRules = function() {
        return [].concat(rules).sort(function(a, b) {
            return a.id > b.id ? 1 : 0;
        });
    };

    /**
     * Returns a ruleset configuration object with all current rules.
     * @return A ruleset object.
     * @method getRuleset
     */
    api.getRuleset = function() {
        var ruleset = {},
            i = 0,
            len = rules.length;

        while (i < len) {
            ruleset[rules[i++].id] = 1;    // by default, everything is a warning
        }

        return ruleset;
    };

    /**
     * Returns a ruleset object based on embedded rules.
     * @param {String} text A string of css containing embedded rules.
     * @param {Object} ruleset A ruleset object to modify.
     * @return {Object} A ruleset object.
     * @method getEmbeddedRuleset
     */
    function applyEmbeddedRuleset(text, ruleset) {
        var valueMap,
            embedded = text && text.match(embeddedRuleset),
            rules = embedded && embedded[1];

        if (rules) {
            valueMap = {
                "true": 2,  // true is error
                "": 1,      // blank is warning
                "false": 0, // false is ignore

                "2": 2,     // explicit error
                "1": 1,     // explicit warning
                "0": 0      // explicit ignore
            };

            rules.toLowerCase().split(",").forEach(function(rule) {
                var pair = rule.split(":"),
                    property = pair[0] || "",
                    value = pair[1] || "";

                ruleset[property.trim()] = valueMap[value.trim()];
            });
        }

        return ruleset;
    }

    //-------------------------------------------------------------------------
    // Formatters
    //-------------------------------------------------------------------------

    /**
     * Adds a new formatter to the engine.
     * @param {Object} formatter The formatter to add.
     * @method addFormatter
     */
    api.addFormatter = function(formatter) {
        // formatters.push(formatter);
        formatters[formatter.id] = formatter;
    };

    /**
     * Retrieves a formatter for use.
     * @param {String} formatId The name of the format to retrieve.
     * @return {Object} The formatter or undefined.
     * @method getFormatter
     */
    api.getFormatter = function(formatId) {
        return formatters[formatId];
    };

    /**
     * Formats the results in a particular format for a single file.
     * @param {Object} result The results returned from CSSLint.verify().
     * @param {String} filename The filename for which the results apply.
     * @param {String} formatId The name of the formatter to use.
     * @param {Object} options (Optional) for special output handling.
     * @return {String} A formatted string for the results.
     * @method format
     */
    api.format = function(results, filename, formatId, options) {
        var formatter = this.getFormatter(formatId),
            result = null;

        if (formatter) {
            result = formatter.startFormat();
            result += formatter.formatResults(results, filename, options || {});
            result += formatter.endFormat();
        }

        return result;
    };

    /**
     * Indicates if the given format is supported.
     * @param {String} formatId The ID of the format to check.
     * @return {Boolean} True if the format exists, false if not.
     * @method hasFormat
     */
    api.hasFormat = function(formatId) {
        return formatters.hasOwnProperty(formatId);
    };

    //-------------------------------------------------------------------------
    // Verification
    //-------------------------------------------------------------------------

    /**
     * Starts the verification process for the given CSS text.
     * @param {String} text The CSS text to verify.
     * @param {Object} ruleset (Optional) List of rules to apply. If null, then
     *      all rules are used. If a rule has a value of 1 then it's a warning,
     *      a value of 2 means it's an error.
     * @return {Object} Results of the verification.
     * @method verify
     */
    api.verify = function(text, ruleset) {

        var i = 0,
            reporter,
            lines,
            allow = {},
            ignore = [],
            report,
            parser = new parserlib.css.Parser({
                starHack: true,
                ieFilters: true,
                underscoreHack: true,
                strict: false
            });

        // normalize line endings
        lines = text.replace(/\n\r?/g, "$split$").split("$split$");

        // find 'allow' comments
        CSSLint.Util.forEach(lines, function (line, lineno) {
            var allowLine = line && line.match(/\/\*[ \t]*csslint[ \t]+allow:[ \t]*([^\*]*)\*\//i),
                allowRules = allowLine && allowLine[1],
                allowRuleset = {};

            if (allowRules) {
                allowRules.toLowerCase().split(",").forEach(function(allowRule) {
                    allowRuleset[allowRule.trim()] = true;
                });
                if (Object.keys(allowRuleset).length > 0) {
                    allow[lineno + 1] = allowRuleset;
                }
            }
        });

        var ignoreStart = null,
            ignoreEnd = null;
        CSSLint.Util.forEach(lines, function (line, lineno) {
            // Keep oldest, "unclosest" ignore:start
            if (ignoreStart === null && line.match(/\/\*[ \t]*csslint[ \t]+ignore:start[ \t]*\*\//i)) {
                ignoreStart = lineno;
            }

            if (line.match(/\/\*[ \t]*csslint[ \t]+ignore:end[ \t]*\*\//i)) {
                ignoreEnd = lineno;
            }

            if (ignoreStart !== null && ignoreEnd !== null) {
                ignore.push([ignoreStart, ignoreEnd]);
                ignoreStart = ignoreEnd = null;
            }
        });

        // Close remaining ignore block, if any
        if (ignoreStart !== null) {
            ignore.push([ignoreStart, lines.length]);
        }

        if (!ruleset) {
            ruleset = this.getRuleset();
        }

        if (embeddedRuleset.test(text)) {
            // defensively copy so that caller's version does not get modified
            ruleset = clone(ruleset);
            ruleset = applyEmbeddedRuleset(text, ruleset);
        }

        reporter = new Reporter(lines, ruleset, allow, ignore);

        ruleset.errors = 2;       // always report parsing errors as errors
        for (i in ruleset) {
            if (ruleset.hasOwnProperty(i) && ruleset[i]) {
                if (rules[i]) {
                    rules[i].init(parser, reporter);
                }
            }
        }


        // capture most horrible error type
        try {
            parser.parse(text);
        } catch (ex) {
            reporter.error("Fatal error, cannot continue: " + ex.message, ex.line, ex.col, {});
        }

        report = {
            messages    : reporter.messages,
            stats       : reporter.stats,
            ruleset     : reporter.ruleset,
            allow       : reporter.allow,
            ignore      : reporter.ignore
        };

        // sort by line numbers, rollups at the bottom
        report.messages.sort(function (a, b) {
            if (a.rollup && !b.rollup) {
                return 1;
            } else if (!a.rollup && b.rollup) {
                return -1;
            } else {
                return a.line - b.line;
            }
        });

        return report;
    };

    //-------------------------------------------------------------------------
    // Publish the API
    //-------------------------------------------------------------------------

    return api;

})();

/**
 * An instance of Report is used to report results of the
 * verification back to the main API.
 * @class Reporter
 * @constructor
 * @param {String[]} lines The text lines of the source.
 * @param {Object} ruleset The set of rules to work with, including if
 *      they are errors or warnings.
 * @param {Object} explicitly allowed lines
 * @param {[][]} ingore list of line ranges to be ignored
 */
function Reporter(lines, ruleset, allow, ignore) {
    "use strict";

    /**
     * List of messages being reported.
     * @property messages
     * @type String[]
     */
    this.messages = [];

    /**
     * List of statistics being reported.
     * @property stats
     * @type String[]
     */
    this.stats = [];

    /**
     * Lines of code being reported on. Used to provide contextual information
     * for messages.
     * @property lines
     * @type String[]
     */
    this.lines = lines;

    /**
     * Information about the rules. Used to determine whether an issue is an
     * error or warning.
     * @property ruleset
     * @type Object
     */
    this.ruleset = ruleset;

    /**
     * Lines with specific rule messages to leave out of the report.
     * @property allow
     * @type Object
     */
    this.allow = allow;
    if (!this.allow) {
        this.allow = {};
    }

    /**
     * Linesets not to include in the report.
     * @property ignore
     * @type [][]
     */
    this.ignore = ignore;
    if (!this.ignore) {
        this.ignore = [];
    }
}

Reporter.prototype = {

    // restore constructor
    constructor: Reporter,

    /**
     * Report an error.
     * @param {String} message The message to store.
     * @param {int} line The line number.
     * @param {int} col The column number.
     * @param {Object} rule The rule this message relates to.
     * @method error
     */
    error: function(message, line, col, rule) {
        "use strict";
        this.messages.push({
            type    : "error",
            line    : line,
            col     : col,
            message : message,
            evidence: this.lines[line-1],
            rule    : rule || {}
        });
    },

    /**
     * Report an warning.
     * @param {String} message The message to store.
     * @param {int} line The line number.
     * @param {int} col The column number.
     * @param {Object} rule The rule this message relates to.
     * @method warn
     * @deprecated Use report instead.
     */
    warn: function(message, line, col, rule) {
        "use strict";
        this.report(message, line, col, rule);
    },

    /**
     * Report an issue.
     * @param {String} message The message to store.
     * @param {int} line The line number.
     * @param {int} col The column number.
     * @param {Object} rule The rule this message relates to.
     * @method report
     */
    report: function(message, line, col, rule) {
        "use strict";

        // Check if rule violation should be allowed
        if (this.allow.hasOwnProperty(line) && this.allow[line].hasOwnProperty(rule.id)) {
            return;
        }

        var ignore = false;
        CSSLint.Util.forEach(this.ignore, function (range) {
            if (range[0] <= line && line <= range[1]) {
                ignore = true;
            }
        });
        if (ignore) {
            return;
        }

        this.messages.push({
            type    : this.ruleset[rule.id] === 2 ? "error" : "warning",
            line    : line,
            col     : col,
            message : message,
            evidence: this.lines[line-1],
            rule    : rule
        });
    },

    /**
     * Report some informational text.
     * @param {String} message The message to store.
     * @param {int} line The line number.
     * @param {int} col The column number.
     * @param {Object} rule The rule this message relates to.
     * @method info
     */
    info: function(message, line, col, rule) {
        "use strict";
        this.messages.push({
            type    : "info",
            line    : line,
            col     : col,
            message : message,
            evidence: this.lines[line-1],
            rule    : rule
        });
    },

    /**
     * Report some rollup error information.
     * @param {String} message The message to store.
     * @param {Object} rule The rule this message relates to.
     * @method rollupError
     */
    rollupError: function(message, rule) {
        "use strict";
        this.messages.push({
            type    : "error",
            rollup  : true,
            message : message,
            rule    : rule
        });
    },

    /**
     * Report some rollup warning information.
     * @param {String} message The message to store.
     * @param {Object} rule The rule this message relates to.
     * @method rollupWarn
     */
    rollupWarn: function(message, rule) {
        "use strict";
        this.messages.push({
            type    : "warning",
            rollup  : true,
            message : message,
            rule    : rule
        });
    },

    /**
     * Report a statistic.
     * @param {String} name The name of the stat to store.
     * @param {Variant} value The value of the stat.
     * @method stat
     */
    stat: function(name, value) {
        "use strict";
        this.stats[name] = value;
    }
};

// expose for testing purposes
CSSLint._Reporter = Reporter;

/*
 * Utility functions that make life easier.
 */
CSSLint.Util = {
    /*
     * Adds all properties from supplier onto receiver,
     * overwriting if the same name already exists on
     * receiver.
     * @param {Object} The object to receive the properties.
     * @param {Object} The object to provide the properties.
     * @return {Object} The receiver
     */
    mix: function(receiver, supplier) {
        "use strict";
        var prop;

        for (prop in supplier) {
            if (supplier.hasOwnProperty(prop)) {
                receiver[prop] = supplier[prop];
            }
        }

        return prop;
    },

    /*
     * Polyfill for array indexOf() method.
     * @param {Array} values The array to search.
     * @param {Variant} value The value to search for.
     * @return {int} The index of the value if found, -1 if not.
     */
    indexOf: function(values, value) {
        "use strict";
        if (values.indexOf) {
            return values.indexOf(value);
        } else {
            for (var i=0, len=values.length; i < len; i++) {
                if (values[i] === value) {
                    return i;
                }
            }
            return -1;
        }
    },

    /*
     * Polyfill for array forEach() method.
     * @param {Array} values The array to operate on.
     * @param {Function} func The function to call on each item.
     * @return {void}
     */
    forEach: function(values, func) {
        "use strict";
        if (values.forEach) {
            return values.forEach(func);
        } else {
            for (var i=0, len=values.length; i < len; i++) {
                func(values[i], i, values);
            }
        }
    }
};

/*
 * Rule: Don't use adjoining classes (.foo.bar).
 */

CSSLint.addRule({

    // rule information
    id: "adjoining-classes",
    name: "Disallow adjoining classes",
    desc: "Don't use adjoining classes.",
    url: "https://github.com/CSSLint/csslint/wiki/Disallow-adjoining-classes",
    browsers: "IE6",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this;
        parser.addListener("startrule", function(event) {
            var selectors = event.selectors,
                selector,
                part,
                modifier,
                classCount,
                i, j, k;

            for (i=0; i < selectors.length; i++) {
                selector = selectors[i];
                for (j=0; j < selector.parts.length; j++) {
                    part = selector.parts[j];
                    if (part.type === parser.SELECTOR_PART_TYPE) {
                        classCount = 0;
                        for (k=0; k < part.modifiers.length; k++) {
                            modifier = part.modifiers[k];
                            if (modifier.type === "class") {
                                classCount++;
                            }
                            if (classCount > 1){
                                reporter.report("Adjoining classes: "+selectors[i].text, part.line, part.col, rule);
                            }
                        }
                    }
                }
            }
        });
    }

});

/*
 * Rule: Don't use width or height when using padding or border.
 */
CSSLint.addRule({

    // rule information
    id: "box-model",
    name: "Beware of broken box size",
    desc: "Don't use width or height when using padding or border.",
    url: "https://github.com/CSSLint/csslint/wiki/Beware-of-box-model-size",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this,
            widthProperties = {
                border: 1,
                "border-left": 1,
                "border-right": 1,
                padding: 1,
                "padding-left": 1,
                "padding-right": 1
            },
            heightProperties = {
                border: 1,
                "border-bottom": 1,
                "border-top": 1,
                padding: 1,
                "padding-bottom": 1,
                "padding-top": 1
            },
            properties,
            boxSizing = false;

        function startRule() {
            properties = {};
            boxSizing = false;
        }

        function endRule() {
            var prop, value;

            if (!boxSizing) {
                if (properties.height) {
                    for (prop in heightProperties) {
                        if (heightProperties.hasOwnProperty(prop) && properties[prop]) {
                            value = properties[prop].value;
                            // special case for padding
                            if (!(prop === "padding" && value.parts.length === 2 && value.parts[0].value === 0)) {
                                reporter.report("Using height with " + prop + " can sometimes make elements larger than you expect.", properties[prop].line, properties[prop].col, rule);
                            }
                        }
                    }
                }

                if (properties.width) {
                    for (prop in widthProperties) {
                        if (widthProperties.hasOwnProperty(prop) && properties[prop]) {
                            value = properties[prop].value;

                            if (!(prop === "padding" && value.parts.length === 2 && value.parts[1].value === 0)) {
                                reporter.report("Using width with " + prop + " can sometimes make elements larger than you expect.", properties[prop].line, properties[prop].col, rule);
                            }
                        }
                    }
                }
            }
        }

        parser.addListener("startrule", startRule);
        parser.addListener("startfontface", startRule);
        parser.addListener("startpage", startRule);
        parser.addListener("startpagemargin", startRule);
        parser.addListener("startkeyframerule", startRule);
        parser.addListener("startviewport", startRule);

        parser.addListener("property", function(event) {
            var name = event.property.text.toLowerCase();

            if (heightProperties[name] || widthProperties[name]) {
                if (!/^0\S*$/.test(event.value) && !(name === "border" && event.value.toString() === "none")) {
                    properties[name] = {
                        line: event.property.line,
                        col: event.property.col,
                        value: event.value
                    };
                }
            } else {
                if (/^(width|height)/i.test(name) && /^(length|percentage)/.test(event.value.parts[0].type)) {
                    properties[name] = 1;
                } else if (name === "box-sizing") {
                    boxSizing = true;
                }
            }

        });

        parser.addListener("endrule", endRule);
        parser.addListener("endfontface", endRule);
        parser.addListener("endpage", endRule);
        parser.addListener("endpagemargin", endRule);
        parser.addListener("endkeyframerule", endRule);
        parser.addListener("endviewport", endRule);
    }

});

/*
 * Rule: box-sizing doesn't work in IE6 and IE7.
 */

CSSLint.addRule({

    // rule information
    id: "box-sizing",
    name: "Disallow use of box-sizing",
    desc: "The box-sizing properties isn't supported in IE6 and IE7.",
    url: "https://github.com/CSSLint/csslint/wiki/Disallow-box-sizing",
    browsers: "IE6, IE7",
    tags: ["Compatibility"],

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this;

        parser.addListener("property", function(event) {
            var name = event.property.text.toLowerCase();

            if (name === "box-sizing") {
                reporter.report("The box-sizing property isn't supported in IE6 and IE7.", event.line, event.col, rule);
            }
        });
    }

});

/*
 * Rule: Use the bulletproof @font-face syntax to avoid 404's in old IE
 * (http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax)
 */

CSSLint.addRule({

    // rule information
    id: "bulletproof-font-face",
    name: "Use the bulletproof @font-face syntax",
    desc: "Use the bulletproof @font-face syntax to avoid 404's in old IE (http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax).",
    url: "https://github.com/CSSLint/csslint/wiki/Bulletproof-font-face",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this,
            fontFaceRule = false,
            firstSrc = true,
            ruleFailed = false,
            line, col;

        // Mark the start of a @font-face declaration so we only test properties inside it
        parser.addListener("startfontface", function() {
            fontFaceRule = true;
        });

        parser.addListener("property", function(event) {
            // If we aren't inside an @font-face declaration then just return
            if (!fontFaceRule) {
                return;
            }

            var propertyName = event.property.toString().toLowerCase(),
                value = event.value.toString();

            // Set the line and col numbers for use in the endfontface listener
            line = event.line;
            col = event.col;

            // This is the property that we care about, we can ignore the rest
            if (propertyName === "src") {
                var regex = /^\s?url\(['"].+\.eot\?.*['"]\)\s*format\(['"]embedded-opentype['"]\).*$/i;

                // We need to handle the advanced syntax with two src properties
                if (!value.match(regex) && firstSrc) {
                    ruleFailed = true;
                    firstSrc = false;
                } else if (value.match(regex) && !firstSrc) {
                    ruleFailed = false;
                }
            }


        });

        // Back to normal rules that we don't need to test
        parser.addListener("endfontface", function() {
            fontFaceRule = false;

            if (ruleFailed) {
                reporter.report("@font-face declaration doesn't follow the fontspring bulletproof syntax.", line, col, rule);
            }
        });
    }
});

/*
 * Rule: Include all compatible vendor prefixes to reach a wider
 * range of users.
 */

CSSLint.addRule({

    // rule information
    id: "compatible-vendor-prefixes",
    name: "Require compatible vendor prefixes",
    desc: "Include all compatible vendor prefixes to reach a wider range of users.",
    url: "https://github.com/CSSLint/csslint/wiki/Require-compatible-vendor-prefixes",
    browsers: "All",

    // initialization
    init: function (parser, reporter) {
        "use strict";
        var rule = this,
            compatiblePrefixes,
            properties,
            prop,
            variations,
            prefixed,
            i,
            len,
            inKeyFrame = false,
            arrayPush = Array.prototype.push,
            applyTo = [];

        // See http://peter.sh/experiments/vendor-prefixed-css-property-overview/ for details
        compatiblePrefixes = {
            "animation"                  : "webkit",
            "animation-delay"            : "webkit",
            "animation-direction"        : "webkit",
            "animation-duration"         : "webkit",
            "animation-fill-mode"        : "webkit",
            "animation-iteration-count"  : "webkit",
            "animation-name"             : "webkit",
            "animation-play-state"       : "webkit",
            "animation-timing-function"  : "webkit",
            "appearance"                 : "webkit moz",
            "border-end"                 : "webkit moz",
            "border-end-color"           : "webkit moz",
            "border-end-style"           : "webkit moz",
            "border-end-width"           : "webkit moz",
            "border-image"               : "webkit moz o",
            "border-radius"              : "webkit",
            "border-start"               : "webkit moz",
            "border-start-color"         : "webkit moz",
            "border-start-style"         : "webkit moz",
            "border-start-width"         : "webkit moz",
            "box-align"                  : "webkit moz ms",
            "box-direction"              : "webkit moz ms",
            "box-flex"                   : "webkit moz ms",
            "box-lines"                  : "webkit ms",
            "box-ordinal-group"          : "webkit moz ms",
            "box-orient"                 : "webkit moz ms",
            "box-pack"                   : "webkit moz ms",
            "box-sizing"                 : "",
            "box-shadow"                 : "",
            "column-count"               : "webkit moz ms",
            "column-gap"                 : "webkit moz ms",
            "column-rule"                : "webkit moz ms",
            "column-rule-color"          : "webkit moz ms",
            "column-rule-style"          : "webkit moz ms",
            "column-rule-width"          : "webkit moz ms",
            "column-width"               : "webkit moz ms",
            "hyphens"                    : "epub moz",
            "line-break"                 : "webkit ms",
            "margin-end"                 : "webkit moz",
            "margin-start"               : "webkit moz",
            "marquee-speed"              : "webkit wap",
            "marquee-style"              : "webkit wap",
            "padding-end"                : "webkit moz",
            "padding-start"              : "webkit moz",
            "tab-size"                   : "moz o",
            "text-size-adjust"           : "webkit ms",
            "transform"                  : "webkit ms",
            "transform-origin"           : "webkit ms",
            "transition"                 : "",
            "transition-delay"           : "",
            "transition-duration"        : "",
            "transition-property"        : "",
            "transition-timing-function" : "",
            "user-modify"                : "webkit moz",
            "user-select"                : "webkit moz ms",
            "word-break"                 : "epub ms",
            "writing-mode"               : "epub ms"
        };


        for (prop in compatiblePrefixes) {
            if (compatiblePrefixes.hasOwnProperty(prop)) {
                variations = [];
                prefixed = compatiblePrefixes[prop].split(" ");
                for (i = 0, len = prefixed.length; i < len; i++) {
                    variations.push("-" + prefixed[i] + "-" + prop);
                }
                compatiblePrefixes[prop] = variations;
                arrayPush.apply(applyTo, variations);
            }
        }

        parser.addListener("startrule", function () {
            properties = [];
        });

        parser.addListener("startkeyframes", function (event) {
            inKeyFrame = event.prefix || true;
        });

        parser.addListener("endkeyframes", function () {
            inKeyFrame = false;
        });

        parser.addListener("property", function (event) {
            var name = event.property;
            if (CSSLint.Util.indexOf(applyTo, name.text) > -1) {

                // e.g., -moz-transform is okay to be alone in @-moz-keyframes
                if (!inKeyFrame || typeof inKeyFrame !== "string" ||
                        name.text.indexOf("-" + inKeyFrame + "-") !== 0) {
                    properties.push(name);
                }
            }
        });

        parser.addListener("endrule", function () {
            if (!properties.length) {
                return;
            }

            var propertyGroups = {},
                i,
                len,
                name,
                prop,
                variations,
                value,
                full,
                actual,
                item,
                propertiesSpecified;

            for (i = 0, len = properties.length; i < len; i++) {
                name = properties[i];

                for (prop in compatiblePrefixes) {
                    if (compatiblePrefixes.hasOwnProperty(prop)) {
                        variations = compatiblePrefixes[prop];
                        if (CSSLint.Util.indexOf(variations, name.text) > -1) {
                            if (!propertyGroups[prop]) {
                                propertyGroups[prop] = {
                                    full: variations.slice(0),
                                    actual: [],
                                    actualNodes: []
                                };
                            }
                            if (CSSLint.Util.indexOf(propertyGroups[prop].actual, name.text) === -1) {
                                propertyGroups[prop].actual.push(name.text);
                                propertyGroups[prop].actualNodes.push(name);
                            }
                        }
                    }
                }
            }

            for (prop in propertyGroups) {
                if (propertyGroups.hasOwnProperty(prop)) {
                    value = propertyGroups[prop];
                    full = value.full;
                    actual = value.actual;

                    if (full.length > actual.length) {
                        for (i = 0, len = full.length; i < len; i++) {
                            item = full[i];
                            if (CSSLint.Util.indexOf(actual, item) === -1) {
                                propertiesSpecified = (actual.length === 1) ? actual[0] : (actual.length === 2) ? actual.join(" and ") : actual.join(", ");
                                reporter.report("The property " + item + " is compatible with " + propertiesSpecified + " and should be included as well.", value.actualNodes[0].line, value.actualNodes[0].col, rule);
                            }
                        }

                    }
                }
            }
        });
    }
});

/*
 * Rule: Certain properties don't play well with certain display values.
 * - float should not be used with inline-block
 * - height, width, margin-top, margin-bottom, float should not be used with inline
 * - vertical-align should not be used with block
 * - margin, float should not be used with table-*
 */

CSSLint.addRule({

    // rule information
    id: "display-property-grouping",
    name: "Require properties appropriate for display",
    desc: "Certain properties shouldn't be used with certain display property values.",
    url: "https://github.com/CSSLint/csslint/wiki/Require-properties-appropriate-for-display",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this;

        var propertiesToCheck = {
                display: 1,
                "float": "none",
                height: 1,
                width: 1,
                margin: 1,
                "margin-left": 1,
                "margin-right": 1,
                "margin-bottom": 1,
                "margin-top": 1,
                padding: 1,
                "padding-left": 1,
                "padding-right": 1,
                "padding-bottom": 1,
                "padding-top": 1,
                "vertical-align": 1
            },
            properties;

        function reportProperty(name, display, msg) {
            if (properties[name]) {
                if (typeof propertiesToCheck[name] !== "string" || properties[name].value.toLowerCase() !== propertiesToCheck[name]) {
                    reporter.report(msg || name + " can't be used with display: " + display + ".", properties[name].line, properties[name].col, rule);
                }
            }
        }

        function startRule() {
            properties = {};
        }

        function endRule() {

            var display = properties.display ? properties.display.value : null;
            if (display) {
                switch (display) {

                    case "inline":
                        // height, width, margin-top, margin-bottom, float should not be used with inline
                        reportProperty("height", display);
                        reportProperty("width", display);
                        reportProperty("margin", display);
                        reportProperty("margin-top", display);
                        reportProperty("margin-bottom", display);
                        reportProperty("float", display, "display:inline has no effect on floated elements (but may be used to fix the IE6 double-margin bug).");
                        break;

                    case "block":
                        // vertical-align should not be used with block
                        reportProperty("vertical-align", display);
                        break;

                    case "inline-block":
                        // float should not be used with inline-block
                        reportProperty("float", display);
                        break;

                    default:
                        // margin, float should not be used with table
                        if (display.indexOf("table-") === 0) {
                            reportProperty("margin", display);
                            reportProperty("margin-left", display);
                            reportProperty("margin-right", display);
                            reportProperty("margin-top", display);
                            reportProperty("margin-bottom", display);
                            reportProperty("float", display);
                        }

                        // otherwise do nothing
                }
            }

        }

        parser.addListener("startrule", startRule);
        parser.addListener("startfontface", startRule);
        parser.addListener("startkeyframerule", startRule);
        parser.addListener("startpagemargin", startRule);
        parser.addListener("startpage", startRule);
        parser.addListener("startviewport", startRule);

        parser.addListener("property", function(event) {
            var name = event.property.text.toLowerCase();

            if (propertiesToCheck[name]) {
                properties[name] = {
                    value: event.value.text,
                    line: event.property.line,
                    col: event.property.col
                };
            }
        });

        parser.addListener("endrule", endRule);
        parser.addListener("endfontface", endRule);
        parser.addListener("endkeyframerule", endRule);
        parser.addListener("endpagemargin", endRule);
        parser.addListener("endpage", endRule);
        parser.addListener("endviewport", endRule);

    }

});

/*
 * Rule: Disallow duplicate background-images (using url).
 */

CSSLint.addRule({

    // rule information
    id: "duplicate-background-images",
    name: "Disallow duplicate background images",
    desc: "Every background-image should be unique. Use a common class for e.g. sprites.",
    url: "https://github.com/CSSLint/csslint/wiki/Disallow-duplicate-background-images",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this,
            stack = {};

        parser.addListener("property", function(event) {
            var name = event.property.text,
                value = event.value,
                i, len;

            if (name.match(/background/i)) {
                for (i=0, len=value.parts.length; i < len; i++) {
                    if (value.parts[i].type === "uri") {
                        if (typeof stack[value.parts[i].uri] === "undefined") {
                            stack[value.parts[i].uri] = event;
                        } else {
                            reporter.report("Background image '" + value.parts[i].uri + "' was used multiple times, first declared at line " + stack[value.parts[i].uri].line + ", col " + stack[value.parts[i].uri].col + ".", event.line, event.col, rule);
                        }
                    }
                }
            }
        });
    }
});

/*
 * Rule: Duplicate properties must appear one after the other. If an already-defined
 * property appears somewhere else in the rule, then it's likely an error.
 */

CSSLint.addRule({

    // rule information
    id: "duplicate-properties",
    name: "Disallow duplicate properties",
    desc: "Duplicate properties must appear one after the other.",
    url: "https://github.com/CSSLint/csslint/wiki/Disallow-duplicate-properties",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this,
            properties,
            lastProperty;

        function startRule() {
            properties = {};
        }

        parser.addListener("startrule", startRule);
        parser.addListener("startfontface", startRule);
        parser.addListener("startpage", startRule);
        parser.addListener("startpagemargin", startRule);
        parser.addListener("startkeyframerule", startRule);
        parser.addListener("startviewport", startRule);

        parser.addListener("property", function(event) {
            var property = event.property,
                name = property.text.toLowerCase();

            if (properties[name] && (lastProperty !== name || properties[name] === event.value.text)) {
                reporter.report("Duplicate property '" + event.property + "' found.", event.line, event.col, rule);
            }

            properties[name] = event.value.text;
            lastProperty = name;

        });


    }

});

/*
 * Rule: Style rules without any properties defined should be removed.
 */

CSSLint.addRule({

    // rule information
    id: "empty-rules",
    name: "Disallow empty rules",
    desc: "Rules without any properties specified should be removed.",
    url: "https://github.com/CSSLint/csslint/wiki/Disallow-empty-rules",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this,
            count = 0;

        parser.addListener("startrule", function() {
            count=0;
        });

        parser.addListener("property", function() {
            count++;
        });

        parser.addListener("endrule", function(event) {
            var selectors = event.selectors;
            if (count === 0) {
                reporter.report("Rule is empty.", selectors[0].line, selectors[0].col, rule);
            }
        });
    }

});

/*
 * Rule: There should be no syntax errors. (Duh.)
 */

CSSLint.addRule({

    // rule information
    id: "errors",
    name: "Parsing Errors",
    desc: "This rule looks for recoverable syntax errors.",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this;

        parser.addListener("error", function(event) {
            reporter.error(event.message, event.line, event.col, rule);
        });

    }

});

CSSLint.addRule({

    // rule information
    id: "fallback-colors",
    name: "Require fallback colors",
    desc: "For older browsers that don't support RGBA, HSL, or HSLA, provide a fallback color.",
    url: "https://github.com/CSSLint/csslint/wiki/Require-fallback-colors",
    browsers: "IE6,IE7,IE8",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this,
            lastProperty,
            propertiesToCheck = {
                color: 1,
                background: 1,
                "border-color": 1,
                "border-top-color": 1,
                "border-right-color": 1,
                "border-bottom-color": 1,
                "border-left-color": 1,
                border: 1,
                "border-top": 1,
                "border-right": 1,
                "border-bottom": 1,
                "border-left": 1,
                "background-color": 1
            };

        function startRule() {
            lastProperty = null;
        }

        parser.addListener("startrule", startRule);
        parser.addListener("startfontface", startRule);
        parser.addListener("startpage", startRule);
        parser.addListener("startpagemargin", startRule);
        parser.addListener("startkeyframerule", startRule);
        parser.addListener("startviewport", startRule);

        parser.addListener("property", function(event) {
            var property = event.property,
                name = property.text.toLowerCase(),
                parts = event.value.parts,
                i = 0,
                colorType = "",
                len = parts.length;

            if (propertiesToCheck[name]) {
                while (i < len) {
                    if (parts[i].type === "color") {
                        if ("alpha" in parts[i] || "hue" in parts[i]) {

                            if (/([^\)]+)\(/.test(parts[i])) {
                                colorType = RegExp.$1.toUpperCase();
                            }

                            if (!lastProperty || (lastProperty.property.text.toLowerCase() !== name || lastProperty.colorType !== "compat")) {
                                reporter.report("Fallback " + name + " (hex or RGB) should precede " + colorType + " " + name + ".", event.line, event.col, rule);
                            }
                        } else {
                            event.colorType = "compat";
                        }
                    }

                    i++;
                }
            }

            lastProperty = event;
        });

    }

});

/*
 * Rule: You shouldn't use more than 10 floats. If you do, there's probably
 * room for some abstraction.
 */

CSSLint.addRule({

    // rule information
    id: "floats",
    name: "Disallow too many floats",
    desc: "This rule tests if the float property is used too many times",
    url: "https://github.com/CSSLint/csslint/wiki/Disallow-too-many-floats",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this;
        var count = 0;

        // count how many times "float" is used
        parser.addListener("property", function(event) {
            if (event.property.text.toLowerCase() === "float" &&
                    event.value.text.toLowerCase() !== "none") {
                count++;
            }
        });

        // report the results
        parser.addListener("endstylesheet", function() {
            reporter.stat("floats", count);
            if (count >= 10) {
                reporter.rollupWarn("Too many floats (" + count + "), you're probably using them for layout. Consider using a grid system instead.", rule);
            }
        });
    }

});

/*
 * Rule: Avoid too many @font-face declarations in the same stylesheet.
 */

CSSLint.addRule({

    // rule information
    id: "font-faces",
    name: "Don't use too many web fonts",
    desc: "Too many different web fonts in the same stylesheet.",
    url: "https://github.com/CSSLint/csslint/wiki/Don%27t-use-too-many-web-fonts",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this,
            count = 0;


        parser.addListener("startfontface", function() {
            count++;
        });

        parser.addListener("endstylesheet", function() {
            if (count > 5) {
                reporter.rollupWarn("Too many @font-face declarations (" + count + ").", rule);
            }
        });
    }

});

/*
 * Rule: You shouldn't need more than 9 font-size declarations.
 */

CSSLint.addRule({

    // rule information
    id: "font-sizes",
    name: "Disallow too many font sizes",
    desc: "Checks the number of font-size declarations.",
    url: "https://github.com/CSSLint/csslint/wiki/Don%27t-use-too-many-font-size-declarations",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this,
            count = 0;

        // check for use of "font-size"
        parser.addListener("property", function(event) {
            if (event.property.toString() === "font-size") {
                count++;
            }
        });

        // report the results
        parser.addListener("endstylesheet", function() {
            reporter.stat("font-sizes", count);
            if (count >= 10) {
                reporter.rollupWarn("Too many font-size declarations (" + count + "), abstraction needed.", rule);
            }
        });
    }

});

/*
 * Rule: When using a vendor-prefixed gradient, make sure to use them all.
 */

CSSLint.addRule({

    // rule information
    id: "gradients",
    name: "Require all gradient definitions",
    desc: "When using a vendor-prefixed gradient, make sure to use them all.",
    url: "https://github.com/CSSLint/csslint/wiki/Require-all-gradient-definitions",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this,
            gradients;

        parser.addListener("startrule", function() {
            gradients = {
                moz: 0,
                webkit: 0,
                oldWebkit: 0,
                o: 0
            };
        });

        parser.addListener("property", function(event) {

            if (/\-(moz|o|webkit)(?:\-(?:linear|radial))\-gradient/i.test(event.value)) {
                gradients[RegExp.$1] = 1;
            } else if (/\-webkit\-gradient/i.test(event.value)) {
                gradients.oldWebkit = 1;
            }

        });

        parser.addListener("endrule", function(event) {
            var missing = [];

            if (!gradients.moz) {
                missing.push("Firefox 3.6+");
            }

            if (!gradients.webkit) {
                missing.push("Webkit (Safari 5+, Chrome)");
            }

            if (!gradients.oldWebkit) {
                missing.push("Old Webkit (Safari 4+, Chrome)");
            }

            if (!gradients.o) {
                missing.push("Opera 11.1+");
            }

            if (missing.length && missing.length < 4) {
                reporter.report("Missing vendor-prefixed CSS gradients for " + missing.join(", ") + ".", event.selectors[0].line, event.selectors[0].col, rule);
            }

        });

    }

});

/*
 * Rule: Don't use IDs for selectors.
 */

CSSLint.addRule({

    // rule information
    id: "ids",
    name: "Disallow IDs in selectors",
    desc: "Selectors should not contain IDs.",
    url: "https://github.com/CSSLint/csslint/wiki/Disallow-IDs-in-selectors",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this;
        parser.addListener("startrule", function(event) {
            var selectors = event.selectors,
                selector,
                part,
                modifier,
                idCount,
                i, j, k;

            for (i=0; i < selectors.length; i++) {
                selector = selectors[i];
                idCount = 0;

                for (j=0; j < selector.parts.length; j++) {
                    part = selector.parts[j];
                    if (part.type === parser.SELECTOR_PART_TYPE) {
                        for (k=0; k < part.modifiers.length; k++) {
                            modifier = part.modifiers[k];
                            if (modifier.type === "id") {
                                idCount++;
                            }
                        }
                    }
                }

                if (idCount === 1) {
                    reporter.report("Don't use IDs in selectors.", selector.line, selector.col, rule);
                } else if (idCount > 1) {
                    reporter.report(idCount + " IDs in the selector, really?", selector.line, selector.col, rule);
                }
            }

        });
    }

});

/*
 * Rule: IE6-9 supports up to 31 stylesheet import.
 * Reference:
 * http://blogs.msdn.com/b/ieinternals/archive/2011/05/14/internet-explorer-stylesheet-rule-selector-import-sheet-limit-maximum.aspx
 */

CSSLint.addRule({

    // rule information
    id: "import-ie-limit",
    name: "@import limit on IE6-IE9",
    desc: "IE6-9 supports up to 31 @import per stylesheet",
    browsers: "IE6, IE7, IE8, IE9",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this,
            MAX_IMPORT_COUNT = 31,
            count = 0;

        function startPage() {
            count = 0;
        }

        parser.addListener("startpage", startPage);

        parser.addListener("import", function() {
            count++;
        });

        parser.addListener("endstylesheet", function() {
            if (count > MAX_IMPORT_COUNT) {
                reporter.rollupError(
                    "Too many @import rules (" + count + "). IE6-9 supports up to 31 import per stylesheet.",
                    rule
                );
            }
        });
    }

});

/*
 * Rule: Don't use @import, use <link> instead.
 */

CSSLint.addRule({

    // rule information
    id: "import",
    name: "Disallow @import",
    desc: "Don't use @import, use <link> instead.",
    url: "https://github.com/CSSLint/csslint/wiki/Disallow-%40import",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this;

        parser.addListener("import", function(event) {
            reporter.report("@import prevents parallel downloads, use <link> instead.", event.line, event.col, rule);
        });

    }

});

/*
 * Rule: Make sure !important is not overused, this could lead to specificity
 * war. Display a warning on !important declarations, an error if it's
 * used more at least 10 times.
 */

CSSLint.addRule({

    // rule information
    id: "important",
    name: "Disallow !important",
    desc: "Be careful when using !important declaration",
    url: "https://github.com/CSSLint/csslint/wiki/Disallow-%21important",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this,
            count = 0;

        // warn that important is used and increment the declaration counter
        parser.addListener("property", function(event) {
            if (event.important === true) {
                count++;
                reporter.report("Use of !important", event.line, event.col, rule);
            }
        });

        // if there are more than 10, show an error
        parser.addListener("endstylesheet", function() {
            reporter.stat("important", count);
            if (count >= 10) {
                reporter.rollupWarn("Too many !important declarations (" + count + "), try to use less than 10 to avoid specificity issues.", rule);
            }
        });
    }

});

/*
 * Rule: Properties should be known (listed in CSS3 specification) or
 * be a vendor-prefixed property.
 */

CSSLint.addRule({

    // rule information
    id: "known-properties",
    name: "Require use of known properties",
    desc: "Properties should be known (listed in CSS3 specification) or be a vendor-prefixed property.",
    url: "https://github.com/CSSLint/csslint/wiki/Require-use-of-known-properties",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this;

        parser.addListener("property", function(event) {

            // the check is handled entirely by the parser-lib (https://github.com/nzakas/parser-lib)
            if (event.invalid) {
                reporter.report(event.invalid.message, event.line, event.col, rule);
            }

        });
    }

});

/*
 * Rule: All properties should be in alphabetical order.
 */

CSSLint.addRule({

    // rule information
    id: "order-alphabetical",
    name: "Alphabetical order",
    desc: "Assure properties are in alphabetical order",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this,
            properties;

        var startRule = function () {
            properties = [];
        };

        var endRule = function(event) {
            var currentProperties = properties.join(","),
                expectedProperties = properties.sort().join(",");

            if (currentProperties !== expectedProperties) {
                reporter.report("Rule doesn't have all its properties in alphabetical order.", event.line, event.col, rule);
            }
        };

        parser.addListener("startrule", startRule);
        parser.addListener("startfontface", startRule);
        parser.addListener("startpage", startRule);
        parser.addListener("startpagemargin", startRule);
        parser.addListener("startkeyframerule", startRule);
        parser.addListener("startviewport", startRule);

        parser.addListener("property", function(event) {
            var name = event.property.text,
                lowerCasePrefixLessName = name.toLowerCase().replace(/^-.*?-/, "");

            properties.push(lowerCasePrefixLessName);
        });

        parser.addListener("endrule", endRule);
        parser.addListener("endfontface", endRule);
        parser.addListener("endpage", endRule);
        parser.addListener("endpagemargin", endRule);
        parser.addListener("endkeyframerule", endRule);
        parser.addListener("endviewport", endRule);
    }

});

/*
 * Rule: outline: none or outline: 0 should only be used in a :focus rule
 *       and only if there are other properties in the same rule.
 */

CSSLint.addRule({

    // rule information
    id: "outline-none",
    name: "Disallow outline: none",
    desc: "Use of outline: none or outline: 0 should be limited to :focus rules.",
    url: "https://github.com/CSSLint/csslint/wiki/Disallow-outline%3Anone",
    browsers: "All",
    tags: ["Accessibility"],

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this,
            lastRule;

        function startRule(event) {
            if (event.selectors) {
                lastRule = {
                    line: event.line,
                    col: event.col,
                    selectors: event.selectors,
                    propCount: 0,
                    outline: false
                };
            } else {
                lastRule = null;
            }
        }

        function endRule() {
            if (lastRule) {
                if (lastRule.outline) {
                    if (lastRule.selectors.toString().toLowerCase().indexOf(":focus") === -1) {
                        reporter.report("Outlines should only be modified using :focus.", lastRule.line, lastRule.col, rule);
                    } else if (lastRule.propCount === 1) {
                        reporter.report("Outlines shouldn't be hidden unless other visual changes are made.", lastRule.line, lastRule.col, rule);
                    }
                }
            }
        }

        parser.addListener("startrule", startRule);
        parser.addListener("startfontface", startRule);
        parser.addListener("startpage", startRule);
        parser.addListener("startpagemargin", startRule);
        parser.addListener("startkeyframerule", startRule);
        parser.addListener("startviewport", startRule);

        parser.addListener("property", function(event) {
            var name = event.property.text.toLowerCase(),
                value = event.value;

            if (lastRule) {
                lastRule.propCount++;
                if (name === "outline" && (value.toString() === "none" || value.toString() === "0")) {
                    lastRule.outline = true;
                }
            }

        });

        parser.addListener("endrule", endRule);
        parser.addListener("endfontface", endRule);
        parser.addListener("endpage", endRule);
        parser.addListener("endpagemargin", endRule);
        parser.addListener("endkeyframerule", endRule);
        parser.addListener("endviewport", endRule);

    }

});

/*
 * Rule: Don't use classes or IDs with elements (a.foo or a#foo).
 */

CSSLint.addRule({

    // rule information
    id: "overqualified-elements",
    name: "Disallow overqualified elements",
    desc: "Don't use classes or IDs with elements (a.foo or a#foo).",
    url: "https://github.com/CSSLint/csslint/wiki/Disallow-overqualified-elements",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this,
            classes = {};

        parser.addListener("startrule", function(event) {
            var selectors = event.selectors,
                selector,
                part,
                modifier,
                i, j, k;

            for (i=0; i < selectors.length; i++) {
                selector = selectors[i];

                for (j=0; j < selector.parts.length; j++) {
                    part = selector.parts[j];
                    if (part.type === parser.SELECTOR_PART_TYPE) {
                        for (k=0; k < part.modifiers.length; k++) {
                            modifier = part.modifiers[k];
                            if (part.elementName && modifier.type === "id") {
                                reporter.report("Element (" + part + ") is overqualified, just use " + modifier + " without element name.", part.line, part.col, rule);
                            } else if (modifier.type === "class") {

                                if (!classes[modifier]) {
                                    classes[modifier] = [];
                                }
                                classes[modifier].push({
                                    modifier: modifier,
                                    part: part
                                });
                            }
                        }
                    }
                }
            }
        });

        parser.addListener("endstylesheet", function() {

            var prop;
            for (prop in classes) {
                if (classes.hasOwnProperty(prop)) {

                    // one use means that this is overqualified
                    if (classes[prop].length === 1 && classes[prop][0].part.elementName) {
                        reporter.report("Element (" + classes[prop][0].part + ") is overqualified, just use " + classes[prop][0].modifier + " without element name.", classes[prop][0].part.line, classes[prop][0].part.col, rule);
                    }
                }
            }
        });
    }

});

/*
 * Rule: Headings (h1-h6) should not be qualified (namespaced).
 */

CSSLint.addRule({

    // rule information
    id: "qualified-headings",
    name: "Disallow qualified headings",
    desc: "Headings should not be qualified (namespaced).",
    url: "https://github.com/CSSLint/csslint/wiki/Disallow-qualified-headings",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this;

        parser.addListener("startrule", function(event) {
            var selectors = event.selectors,
                selector,
                part,
                i, j;

            for (i=0; i < selectors.length; i++) {
                selector = selectors[i];

                for (j=0; j < selector.parts.length; j++) {
                    part = selector.parts[j];
                    if (part.type === parser.SELECTOR_PART_TYPE) {
                        if (part.elementName && /h[1-6]/.test(part.elementName.toString()) && j > 0) {
                            reporter.report("Heading (" + part.elementName + ") should not be qualified.", part.line, part.col, rule);
                        }
                    }
                }
            }
        });
    }

});

/*
 * Rule: Selectors that look like regular expressions are slow and should be avoided.
 */

CSSLint.addRule({

    // rule information
    id: "regex-selectors",
    name: "Disallow selectors that look like regexs",
    desc: "Selectors that look like regular expressions are slow and should be avoided.",
    url: "https://github.com/CSSLint/csslint/wiki/Disallow-selectors-that-look-like-regular-expressions",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this;

        parser.addListener("startrule", function(event) {
            var selectors = event.selectors,
                selector,
                part,
                modifier,
                i, j, k;

            for (i=0; i < selectors.length; i++) {
                selector = selectors[i];
                for (j=0; j < selector.parts.length; j++) {
                    part = selector.parts[j];
                    if (part.type === parser.SELECTOR_PART_TYPE) {
                        for (k=0; k < part.modifiers.length; k++) {
                            modifier = part.modifiers[k];
                            if (modifier.type === "attribute") {
                                if (/([~\|\^\$\*]=)/.test(modifier)) {
                                    reporter.report("Attribute selectors with " + RegExp.$1 + " are slow!", modifier.line, modifier.col, rule);
                                }
                            }

                        }
                    }
                }
            }
        });
    }

});

/*
 * Rule: Total number of rules should not exceed x.
 */

CSSLint.addRule({

    // rule information
    id: "rules-count",
    name: "Rules Count",
    desc: "Track how many rules there are.",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var count = 0;

        // count each rule
        parser.addListener("startrule", function() {
            count++;
        });

        parser.addListener("endstylesheet", function() {
            reporter.stat("rule-count", count);
        });
    }

});

/*
 * Rule: Warn people with approaching the IE 4095 limit
 */

CSSLint.addRule({

    // rule information
    id: "selector-max-approaching",
    name: "Warn when approaching the 4095 selector limit for IE",
    desc: "Will warn when selector count is >= 3800 selectors.",
    browsers: "IE",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this, count = 0;

        parser.addListener("startrule", function(event) {
            count += event.selectors.length;
        });

        parser.addListener("endstylesheet", function() {
            if (count >= 3800) {
                reporter.report("You have " + count + " selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.", 0, 0, rule);
            }
        });
    }

});

/*
 * Rule: Warn people past the IE 4095 limit
 */

CSSLint.addRule({

    // rule information
    id: "selector-max",
    name: "Error when past the 4095 selector limit for IE",
    desc: "Will error when selector count is > 4095.",
    browsers: "IE",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this, count = 0;

        parser.addListener("startrule", function(event) {
            count += event.selectors.length;
        });

        parser.addListener("endstylesheet", function() {
            if (count > 4095) {
                reporter.report("You have " + count + " selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.", 0, 0, rule);
            }
        });
    }

});

/*
 * Rule: Avoid new-line characters in selectors.
 */

CSSLint.addRule({

    // rule information
    id: "selector-newline",
    name: "Disallow new-line characters in selectors",
    desc: "New-line characters in selectors are usually a forgotten comma and not a descendant combinator.",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this;

        function startRule(event) {
            var i, len, selector, p, n, pLen, part, part2, type, currentLine, nextLine,
                selectors = event.selectors;

            for (i = 0, len = selectors.length; i < len; i++) {
                selector = selectors[i];
                for (p = 0, pLen = selector.parts.length; p < pLen; p++) {
                    for (n = p + 1; n < pLen; n++) {
                        part = selector.parts[p];
                        part2 = selector.parts[n];
                        type = part.type;
                        currentLine = part.line;
                        nextLine = part2.line;

                        if (type === "descendant" && nextLine > currentLine) {
                            reporter.report("newline character found in selector (forgot a comma?)", currentLine, selectors[i].parts[0].col, rule);
                        }
                    }
                }

            }
        }

        parser.addListener("startrule", startRule);

    }
});

/*
 * Rule: Use shorthand properties where possible.
 *
 */

CSSLint.addRule({

    // rule information
    id: "shorthand",
    name: "Require shorthand properties",
    desc: "Use shorthand properties where possible.",
    url: "https://github.com/CSSLint/csslint/wiki/Require-shorthand-properties",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this,
            prop, i, len,
            propertiesToCheck = {},
            properties,
            mapping = {
                "margin": [
                    "margin-top",
                    "margin-bottom",
                    "margin-left",
                    "margin-right"
                ],
                "padding": [
                    "padding-top",
                    "padding-bottom",
                    "padding-left",
                    "padding-right"
                ]
            };

        // initialize propertiesToCheck
        for (prop in mapping) {
            if (mapping.hasOwnProperty(prop)) {
                for (i=0, len=mapping[prop].length; i < len; i++) {
                    propertiesToCheck[mapping[prop][i]] = prop;
                }
            }
        }

        function startRule() {
            properties = {};
        }

        // event handler for end of rules
        function endRule(event) {

            var prop, i, len, total;

            // check which properties this rule has
            for (prop in mapping) {
                if (mapping.hasOwnProperty(prop)) {
                    total=0;

                    for (i=0, len=mapping[prop].length; i < len; i++) {
                        total += properties[mapping[prop][i]] ? 1 : 0;
                    }

                    if (total === mapping[prop].length) {
                        reporter.report("The properties " + mapping[prop].join(", ") + " can be replaced by " + prop + ".", event.line, event.col, rule);
                    }
                }
            }
        }

        parser.addListener("startrule", startRule);
        parser.addListener("startfontface", startRule);

        // check for use of "font-size"
        parser.addListener("property", function(event) {
            var name = event.property.toString().toLowerCase();

            if (propertiesToCheck[name]) {
                properties[name] = 1;
            }
        });

        parser.addListener("endrule", endRule);
        parser.addListener("endfontface", endRule);

    }

});

/*
 * Rule: Don't use properties with a star prefix.
 *
 */

CSSLint.addRule({

    // rule information
    id: "star-property-hack",
    name: "Disallow properties with a star prefix",
    desc: "Checks for the star property hack (targets IE6/7)",
    url: "https://github.com/CSSLint/csslint/wiki/Disallow-star-hack",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this;

        // check if property name starts with "*"
        parser.addListener("property", function(event) {
            var property = event.property;

            if (property.hack === "*") {
                reporter.report("Property with star prefix found.", event.property.line, event.property.col, rule);
            }
        });
    }
});

/*
 * Rule: Don't use text-indent for image replacement if you need to support rtl.
 *
 */

CSSLint.addRule({

    // rule information
    id: "text-indent",
    name: "Disallow negative text-indent",
    desc: "Checks for text indent less than -99px",
    url: "https://github.com/CSSLint/csslint/wiki/Disallow-negative-text-indent",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this,
            textIndent,
            direction;


        function startRule() {
            textIndent = false;
            direction = "inherit";
        }

        // event handler for end of rules
        function endRule() {
            if (textIndent && direction !== "ltr") {
                reporter.report("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set direction for that item to ltr.", textIndent.line, textIndent.col, rule);
            }
        }

        parser.addListener("startrule", startRule);
        parser.addListener("startfontface", startRule);

        // check for use of "font-size"
        parser.addListener("property", function(event) {
            var name = event.property.toString().toLowerCase(),
                value = event.value;

            if (name === "text-indent" && value.parts[0].value < -99) {
                textIndent = event.property;
            } else if (name === "direction" && value.toString() === "ltr") {
                direction = "ltr";
            }
        });

        parser.addListener("endrule", endRule);
        parser.addListener("endfontface", endRule);

    }

});

/*
 * Rule: Don't use properties with a underscore prefix.
 *
 */

CSSLint.addRule({

    // rule information
    id: "underscore-property-hack",
    name: "Disallow properties with an underscore prefix",
    desc: "Checks for the underscore property hack (targets IE6)",
    url: "https://github.com/CSSLint/csslint/wiki/Disallow-underscore-hack",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this;

        // check if property name starts with "_"
        parser.addListener("property", function(event) {
            var property = event.property;

            if (property.hack === "_") {
                reporter.report("Property with underscore prefix found.", event.property.line, event.property.col, rule);
            }
        });
    }
});

/*
 * Rule: Headings (h1-h6) should be defined only once.
 */

CSSLint.addRule({

    // rule information
    id: "unique-headings",
    name: "Headings should only be defined once",
    desc: "Headings should be defined only once.",
    url: "https://github.com/CSSLint/csslint/wiki/Headings-should-only-be-defined-once",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this;

        var headings = {
            h1: 0,
            h2: 0,
            h3: 0,
            h4: 0,
            h5: 0,
            h6: 0
        };

        parser.addListener("startrule", function(event) {
            var selectors = event.selectors,
                selector,
                part,
                pseudo,
                i, j;

            for (i=0; i < selectors.length; i++) {
                selector = selectors[i];
                part = selector.parts[selector.parts.length-1];

                if (part.elementName && /(h[1-6])/i.test(part.elementName.toString())) {

                    for (j=0; j < part.modifiers.length; j++) {
                        if (part.modifiers[j].type === "pseudo") {
                            pseudo = true;
                            break;
                        }
                    }

                    if (!pseudo) {
                        headings[RegExp.$1]++;
                        if (headings[RegExp.$1] > 1) {
                            reporter.report("Heading (" + part.elementName + ") has already been defined.", part.line, part.col, rule);
                        }
                    }
                }
            }
        });

        parser.addListener("endstylesheet", function() {
            var prop,
                messages = [];

            for (prop in headings) {
                if (headings.hasOwnProperty(prop)) {
                    if (headings[prop] > 1) {
                        messages.push(headings[prop] + " " + prop + "s");
                    }
                }
            }

            if (messages.length) {
                reporter.rollupWarn("You have " + messages.join(", ") + " defined in this stylesheet.", rule);
            }
        });
    }

});

/*
 * Rule: Don't use universal selector because it's slow.
 */

CSSLint.addRule({

    // rule information
    id: "universal-selector",
    name: "Disallow universal selector",
    desc: "The universal selector (*) is known to be slow.",
    url: "https://github.com/CSSLint/csslint/wiki/Disallow-universal-selector",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this;

        parser.addListener("startrule", function(event) {
            var selectors = event.selectors,
                selector,
                part,
                i;

            for (i=0; i < selectors.length; i++) {
                selector = selectors[i];

                part = selector.parts[selector.parts.length-1];
                if (part.elementName === "*") {
                    reporter.report(rule.desc, part.line, part.col, rule);
                }
            }
        });
    }

});

/*
 * Rule: Don't use unqualified attribute selectors because they're just like universal selectors.
 */

CSSLint.addRule({

    // rule information
    id: "unqualified-attributes",
    name: "Disallow unqualified attribute selectors",
    desc: "Unqualified attribute selectors are known to be slow.",
    url: "https://github.com/CSSLint/csslint/wiki/Disallow-unqualified-attribute-selectors",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";

        var rule = this;

        parser.addListener("startrule", function(event) {

            var selectors = event.selectors,
                selectorContainsClassOrId = false,
                selector,
                part,
                modifier,
                i, k;

            for (i=0; i < selectors.length; i++) {
                selector = selectors[i];

                part = selector.parts[selector.parts.length-1];
                if (part.type === parser.SELECTOR_PART_TYPE) {
                    for (k=0; k < part.modifiers.length; k++) {
                        modifier = part.modifiers[k];

                        if (modifier.type === "class" || modifier.type === "id") {
                            selectorContainsClassOrId = true;
                            break;
                        }
                    }

                    if (!selectorContainsClassOrId) {
                        for (k=0; k < part.modifiers.length; k++) {
                            modifier = part.modifiers[k];
                            if (modifier.type === "attribute" && (!part.elementName || part.elementName === "*")) {
                                reporter.report(rule.desc, part.line, part.col, rule);
                            }
                        }
                    }
                }

            }
        });
    }

});

/*
 * Rule: When using a vendor-prefixed property, make sure to
 * include the standard one.
 */

CSSLint.addRule({

    // rule information
    id: "vendor-prefix",
    name: "Require standard property with vendor prefix",
    desc: "When using a vendor-prefixed property, make sure to include the standard one.",
    url: "https://github.com/CSSLint/csslint/wiki/Require-standard-property-with-vendor-prefix",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this,
            properties,
            num,
            propertiesToCheck = {
                "-webkit-border-radius": "border-radius",
                "-webkit-border-top-left-radius": "border-top-left-radius",
                "-webkit-border-top-right-radius": "border-top-right-radius",
                "-webkit-border-bottom-left-radius": "border-bottom-left-radius",
                "-webkit-border-bottom-right-radius": "border-bottom-right-radius",

                "-o-border-radius": "border-radius",
                "-o-border-top-left-radius": "border-top-left-radius",
                "-o-border-top-right-radius": "border-top-right-radius",
                "-o-border-bottom-left-radius": "border-bottom-left-radius",
                "-o-border-bottom-right-radius": "border-bottom-right-radius",

                "-moz-border-radius": "border-radius",
                "-moz-border-radius-topleft": "border-top-left-radius",
                "-moz-border-radius-topright": "border-top-right-radius",
                "-moz-border-radius-bottomleft": "border-bottom-left-radius",
                "-moz-border-radius-bottomright": "border-bottom-right-radius",

                "-moz-column-count": "column-count",
                "-webkit-column-count": "column-count",

                "-moz-column-gap": "column-gap",
                "-webkit-column-gap": "column-gap",

                "-moz-column-rule": "column-rule",
                "-webkit-column-rule": "column-rule",

                "-moz-column-rule-style": "column-rule-style",
                "-webkit-column-rule-style": "column-rule-style",

                "-moz-column-rule-color": "column-rule-color",
                "-webkit-column-rule-color": "column-rule-color",

                "-moz-column-rule-width": "column-rule-width",
                "-webkit-column-rule-width": "column-rule-width",

                "-moz-column-width": "column-width",
                "-webkit-column-width": "column-width",

                "-webkit-column-span": "column-span",
                "-webkit-columns": "columns",

                "-moz-box-shadow": "box-shadow",
                "-webkit-box-shadow": "box-shadow",

                "-moz-transform": "transform",
                "-webkit-transform": "transform",
                "-o-transform": "transform",
                "-ms-transform": "transform",

                "-moz-transform-origin": "transform-origin",
                "-webkit-transform-origin": "transform-origin",
                "-o-transform-origin": "transform-origin",
                "-ms-transform-origin": "transform-origin",

                "-moz-box-sizing": "box-sizing",
                "-webkit-box-sizing": "box-sizing"
            };

        // event handler for beginning of rules
        function startRule() {
            properties = {};
            num = 1;
        }

        // event handler for end of rules
        function endRule() {
            var prop,
                i,
                len,
                needed,
                actual,
                needsStandard = [];

            for (prop in properties) {
                if (propertiesToCheck[prop]) {
                    needsStandard.push({
                        actual: prop,
                        needed: propertiesToCheck[prop]
                    });
                }
            }

            for (i=0, len=needsStandard.length; i < len; i++) {
                needed = needsStandard[i].needed;
                actual = needsStandard[i].actual;

                if (!properties[needed]) {
                    reporter.report("Missing standard property '" + needed + "' to go along with '" + actual + "'.", properties[actual][0].name.line, properties[actual][0].name.col, rule);
                } else {
                    // make sure standard property is last
                    if (properties[needed][0].pos < properties[actual][0].pos) {
                        reporter.report("Standard property '" + needed + "' should come after vendor-prefixed property '" + actual + "'.", properties[actual][0].name.line, properties[actual][0].name.col, rule);
                    }
                }
            }

        }

        parser.addListener("startrule", startRule);
        parser.addListener("startfontface", startRule);
        parser.addListener("startpage", startRule);
        parser.addListener("startpagemargin", startRule);
        parser.addListener("startkeyframerule", startRule);
        parser.addListener("startviewport", startRule);

        parser.addListener("property", function(event) {
            var name = event.property.text.toLowerCase();

            if (!properties[name]) {
                properties[name] = [];
            }

            properties[name].push({
                name: event.property,
                value: event.value,
                pos: num++
            });
        });

        parser.addListener("endrule", endRule);
        parser.addListener("endfontface", endRule);
        parser.addListener("endpage", endRule);
        parser.addListener("endpagemargin", endRule);
        parser.addListener("endkeyframerule", endRule);
        parser.addListener("endviewport", endRule);
    }

});

/*
 * Rule: You don't need to specify units when a value is 0.
 */

CSSLint.addRule({

    // rule information
    id: "zero-units",
    name: "Disallow units for 0 values",
    desc: "You don't need to specify units when a value is 0.",
    url: "https://github.com/CSSLint/csslint/wiki/Disallow-units-for-zero-values",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this;

        // count how many times "float" is used
        parser.addListener("property", function(event) {
            var parts = event.value.parts,
                i = 0,
                len = parts.length;

            while (i < len) {
                if ((parts[i].units || parts[i].type === "percentage") && parts[i].value === 0 && parts[i].type !== "time") {
                    reporter.report("Values of 0 shouldn't have units specified.", parts[i].line, parts[i].col, rule);
                }
                i++;
            }

        });

    }

});

(function() {
    "use strict";

    /**
     * Replace special characters before write to output.
     *
     * Rules:
     *  - single quotes is the escape sequence for double-quotes
     *  - &amp; is the escape sequence for &
     *  - &lt; is the escape sequence for <
     *  - &gt; is the escape sequence for >
     *
     * @param {String} message to escape
     * @return escaped message as {String}
     */
    var xmlEscape = function(str) {
        if (!str || str.constructor !== String) {
            return "";
        }

        return str.replace(/["&><]/g, function(match) {
            switch (match) {
                case "\"":
                    return "&quot;";
                case "&":
                    return "&amp;";
                case "<":
                    return "&lt;";
                case ">":
                    return "&gt;";
            }
        });
    };

    CSSLint.addFormatter({
        // format information
        id: "checkstyle-xml",
        name: "Checkstyle XML format",

        /**
         * Return opening root XML tag.
         * @return {String} to prepend before all results
         */
        startFormat: function() {
            return "<?xml version=\"1.0\" encoding=\"utf-8\"?><checkstyle>";
        },

        /**
         * Return closing root XML tag.
         * @return {String} to append after all results
         */
        endFormat: function() {
            return "</checkstyle>";
        },

        /**
         * Returns message when there is a file read error.
         * @param {String} filename The name of the file that caused the error.
         * @param {String} message The error message
         * @return {String} The error message.
         */
        readError: function(filename, message) {
            return "<file name=\"" + xmlEscape(filename) + "\"><error line=\"0\" column=\"0\" severty=\"error\" message=\"" + xmlEscape(message) + "\"></error></file>";
        },

        /**
         * Given CSS Lint results for a file, return output for this format.
         * @param results {Object} with error and warning messages
         * @param filename {String} relative file path
         * @param options {Object} (UNUSED for now) specifies special handling of output
         * @return {String} output for results
         */
        formatResults: function(results, filename/*, options*/) {
            var messages = results.messages,
                output = [];

            /**
             * Generate a source string for a rule.
             * Checkstyle source strings usually resemble Java class names e.g
             * net.csslint.SomeRuleName
             * @param {Object} rule
             * @return rule source as {String}
             */
            var generateSource = function(rule) {
                if (!rule || !("name" in rule)) {
                    return "";
                }
                return "net.csslint." + rule.name.replace(/\s/g, "");
            };


            if (messages.length > 0) {
                output.push("<file name=\""+filename+"\">");
                CSSLint.Util.forEach(messages, function (message) {
                    // ignore rollups for now
                    if (!message.rollup) {
                        output.push("<error line=\"" + message.line + "\" column=\"" + message.col + "\" severity=\"" + message.type + "\"" +
                          " message=\"" + xmlEscape(message.message) + "\" source=\"" + generateSource(message.rule) +"\"/>");
                    }
                });
                output.push("</file>");
            }

            return output.join("");
        }
    });

}());

CSSLint.addFormatter({
    // format information
    id: "compact",
    name: "Compact, 'porcelain' format",

    /**
     * Return content to be printed before all file results.
     * @return {String} to prepend before all results
     */
    startFormat: function() {
        "use strict";
        return "";
    },

    /**
     * Return content to be printed after all file results.
     * @return {String} to append after all results
     */
    endFormat: function() {
        "use strict";
        return "";
    },

    /**
     * Given CSS Lint results for a file, return output for this format.
     * @param results {Object} with error and warning messages
     * @param filename {String} relative file path
     * @param options {Object} (Optional) specifies special handling of output
     * @return {String} output for results
     */
    formatResults: function(results, filename, options) {
        "use strict";
        var messages = results.messages,
            output = "";
        options = options || {};

        /**
         * Capitalize and return given string.
         * @param str {String} to capitalize
         * @return {String} capitalized
         */
        var capitalize = function(str) {
            return str.charAt(0).toUpperCase() + str.slice(1);
        };

        if (messages.length === 0) {
            return options.quiet ? "" : filename + ": Lint Free!";
        }

        CSSLint.Util.forEach(messages, function(message) {
            if (message.rollup) {
                output += filename + ": " + capitalize(message.type) + " - " + message.message + " (" + message.rule.id + ")\n";
            } else {
                output += filename + ": line " + message.line +
                    ", col " + message.col + ", " + capitalize(message.type) + " - " + message.message + " (" + message.rule.id + ")\n";
            }
        });

        return output;
    }
});

CSSLint.addFormatter({
    // format information
    id: "csslint-xml",
    name: "CSSLint XML format",

    /**
     * Return opening root XML tag.
     * @return {String} to prepend before all results
     */
    startFormat: function() {
        "use strict";
        return "<?xml version=\"1.0\" encoding=\"utf-8\"?><csslint>";
    },

    /**
     * Return closing root XML tag.
     * @return {String} to append after all results
     */
    endFormat: function() {
        "use strict";
        return "</csslint>";
    },

    /**
     * Given CSS Lint results for a file, return output for this format.
     * @param results {Object} with error and warning messages
     * @param filename {String} relative file path
     * @param options {Object} (UNUSED for now) specifies special handling of output
     * @return {String} output for results
     */
    formatResults: function(results, filename/*, options*/) {
        "use strict";
        var messages = results.messages,
            output = [];

        /**
         * Replace special characters before write to output.
         *
         * Rules:
         *  - single quotes is the escape sequence for double-quotes
         *  - &amp; is the escape sequence for &
         *  - &lt; is the escape sequence for <
         *  - &gt; is the escape sequence for >
         *
         * @param {String} message to escape
         * @return escaped message as {String}
         */
        var escapeSpecialCharacters = function(str) {
            if (!str || str.constructor !== String) {
                return "";
            }
            return str.replace(/"/g, "'").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
        };

        if (messages.length > 0) {
            output.push("<file name=\""+filename+"\">");
            CSSLint.Util.forEach(messages, function (message) {
                if (message.rollup) {
                    output.push("<issue severity=\"" + message.type + "\" reason=\"" + escapeSpecialCharacters(message.message) + "\" evidence=\"" + escapeSpecialCharacters(message.evidence) + "\"/>");
                } else {
                    output.push("<issue line=\"" + message.line + "\" char=\"" + message.col + "\" severity=\"" + message.type + "\"" +
                        " reason=\"" + escapeSpecialCharacters(message.message) + "\" evidence=\"" + escapeSpecialCharacters(message.evidence) + "\"/>");
                }
            });
            output.push("</file>");
        }

        return output.join("");
    }
});

/* globals JSON: true */

CSSLint.addFormatter({
    // format information
    id: "json",
    name: "JSON",

    /**
     * Return content to be printed before all file results.
     * @return {String} to prepend before all results
     */
    startFormat: function() {
        "use strict";
        this.json = [];
        return "";
    },

    /**
     * Return content to be printed after all file results.
     * @return {String} to append after all results
     */
    endFormat: function() {
        "use strict";
        var ret = "";
        if (this.json.length > 0) {
            if (this.json.length === 1) {
                ret = JSON.stringify(this.json[0]);
            } else {
                ret = JSON.stringify(this.json);
            }
        }
        return ret;
    },

    /**
     * Given CSS Lint results for a file, return output for this format.
     * @param results {Object} with error and warning messages
     * @param filename {String} relative file path (Unused)
     * @return {String} output for results
     */
    formatResults: function(results, filename, options) {
        "use strict";
        if (results.messages.length > 0 || !options.quiet) {
            this.json.push({
                filename: filename,
                messages: results.messages,
                stats: results.stats
            });
        }
        return "";
    }
});

CSSLint.addFormatter({
    // format information
    id: "junit-xml",
    name: "JUNIT XML format",

    /**
     * Return opening root XML tag.
     * @return {String} to prepend before all results
     */
    startFormat: function() {
        "use strict";
        return "<?xml version=\"1.0\" encoding=\"utf-8\"?><testsuites>";
    },

    /**
     * Return closing root XML tag.
     * @return {String} to append after all results
     */
    endFormat: function() {
        "use strict";
        return "</testsuites>";
    },

    /**
     * Given CSS Lint results for a file, return output for this format.
     * @param results {Object} with error and warning messages
     * @param filename {String} relative file path
     * @param options {Object} (UNUSED for now) specifies special handling of output
     * @return {String} output for results
     */
    formatResults: function(results, filename/*, options*/) {
        "use strict";

        var messages = results.messages,
            output = [],
            tests = {
                "error": 0,
                "failure": 0
            };

        /**
         * Generate a source string for a rule.
         * JUNIT source strings usually resemble Java class names e.g
         * net.csslint.SomeRuleName
         * @param {Object} rule
         * @return rule source as {String}
         */
        var generateSource = function(rule) {
            if (!rule || !("name" in rule)) {
                return "";
            }
            return "net.csslint." + rule.name.replace(/\s/g, "");
        };

        /**
         * Replace special characters before write to output.
         *
         * Rules:
         *  - single quotes is the escape sequence for double-quotes
         *  - &lt; is the escape sequence for <
         *  - &gt; is the escape sequence for >
         *
         * @param {String} message to escape
         * @return escaped message as {String}
         */
        var escapeSpecialCharacters = function(str) {

            if (!str || str.constructor !== String) {
                return "";
            }

            return str.replace(/"/g, "'").replace(/</g, "&lt;").replace(/>/g, "&gt;");

        };

        if (messages.length > 0) {

            messages.forEach(function (message) {

                // since junit has no warning class
                // all issues as errors
                var type = message.type === "warning" ? "error" : message.type;

                // ignore rollups for now
                if (!message.rollup) {

                    // build the test case separately, once joined
                    // we'll add it to a custom array filtered by type
                    output.push("<testcase time=\"0\" name=\"" + generateSource(message.rule) + "\">");
                    output.push("<" + type + " message=\"" + escapeSpecialCharacters(message.message) + "\"><![CDATA[" + message.line + ":" + message.col + ":" + escapeSpecialCharacters(message.evidence) + "]]></" + type + ">");
                    output.push("</testcase>");

                    tests[type] += 1;

                }

            });

            output.unshift("<testsuite time=\"0\" tests=\"" + messages.length + "\" skipped=\"0\" errors=\"" + tests.error + "\" failures=\"" + tests.failure + "\" package=\"net.csslint\" name=\"" + filename + "\">");
            output.push("</testsuite>");

        }

        return output.join("");

    }
});

CSSLint.addFormatter({
    // format information
    id: "lint-xml",
    name: "Lint XML format",

    /**
     * Return opening root XML tag.
     * @return {String} to prepend before all results
     */
    startFormat: function() {
        "use strict";
        return "<?xml version=\"1.0\" encoding=\"utf-8\"?><lint>";
    },

    /**
     * Return closing root XML tag.
     * @return {String} to append after all results
     */
    endFormat: function() {
        "use strict";
        return "</lint>";
    },

    /**
     * Given CSS Lint results for a file, return output for this format.
     * @param results {Object} with error and warning messages
     * @param filename {String} relative file path
     * @param options {Object} (UNUSED for now) specifies special handling of output
     * @return {String} output for results
     */
    formatResults: function(results, filename/*, options*/) {
        "use strict";
        var messages = results.messages,
            output = [];

        /**
         * Replace special characters before write to output.
         *
         * Rules:
         *  - single quotes is the escape sequence for double-quotes
         *  - &amp; is the escape sequence for &
         *  - &lt; is the escape sequence for <
         *  - &gt; is the escape sequence for >
         *
         * @param {String} message to escape
         * @return escaped message as {String}
         */
        var escapeSpecialCharacters = function(str) {
            if (!str || str.constructor !== String) {
                return "";
            }
            return str.replace(/"/g, "'").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
        };

        if (messages.length > 0) {

            output.push("<file name=\""+filename+"\">");
            CSSLint.Util.forEach(messages, function (message) {
                if (message.rollup) {
                    output.push("<issue severity=\"" + message.type + "\" reason=\"" + escapeSpecialCharacters(message.message) + "\" evidence=\"" + escapeSpecialCharacters(message.evidence) + "\"/>");
                } else {
                    var rule = "";
                    if (message.rule && message.rule.id) {
                        rule = "rule=\"" + escapeSpecialCharacters(message.rule.id) + "\" ";
                    }
                    output.push("<issue " + rule + "line=\"" + message.line + "\" char=\"" + message.col + "\" severity=\"" + message.type + "\"" +
                        " reason=\"" + escapeSpecialCharacters(message.message) + "\" evidence=\"" + escapeSpecialCharacters(message.evidence) + "\"/>");
                }
            });
            output.push("</file>");
        }

        return output.join("");
    }
});

CSSLint.addFormatter({
    // format information
    id: "text",
    name: "Plain Text",

    /**
     * Return content to be printed before all file results.
     * @return {String} to prepend before all results
     */
    startFormat: function() {
        "use strict";
        return "";
    },

    /**
     * Return content to be printed after all file results.
     * @return {String} to append after all results
     */
    endFormat: function() {
        "use strict";
        return "";
    },

    /**
     * Given CSS Lint results for a file, return output for this format.
     * @param results {Object} with error and warning messages
     * @param filename {String} relative file path
     * @param options {Object} (Optional) specifies special handling of output
     * @return {String} output for results
     */
    formatResults: function(results, filename, options) {
        "use strict";
        var messages = results.messages,
            output = "";
        options = options || {};

        if (messages.length === 0) {
            return options.quiet ? "" : "\n\ncsslint: No errors in " + filename + ".";
        }

        output = "\n\ncsslint: There ";
        if (messages.length === 1) {
            output += "is 1 problem";
        } else {
            output += "are " + messages.length + " problems";
        }
        output += " in " + filename + ".";

        var pos = filename.lastIndexOf("/"),
            shortFilename = filename;

        if (pos === -1) {
            pos = filename.lastIndexOf("\\");
        }
        if (pos > -1) {
            shortFilename = filename.substring(pos+1);
        }

        CSSLint.Util.forEach(messages, function (message, i) {
            output = output + "\n\n" + shortFilename;
            if (message.rollup) {
                output += "\n" + (i+1) + ": " + message.type;
                output += "\n" + message.message;
            } else {
                output += "\n" + (i+1) + ": " + message.type + " at line " + message.line + ", col " + message.col;
                output += "\n" + message.message;
                output += "\n" + message.evidence;
            }
        });

        return output;
    }
});

return CSSLint;
})();                                                                                                                                                                                                                                                                            codemirror/esprima.js                                                                               0000644                 00001051657 15212563754 0010740 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       (function webpackUniversalModuleDefinition(root, factory) {
/* istanbul ignore next */
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory();
	else if(typeof define === 'function' && define.amd)
		define([], factory);
/* istanbul ignore next */
	else if(typeof exports === 'object')
		exports["esprima"] = factory();
	else
		root["esprima"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};

/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {

/******/ 		// Check if module is in cache
/* istanbul ignore if */
/******/ 		if(installedModules[moduleId])
/******/ 			return installedModules[moduleId].exports;

/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			exports: {},
/******/ 			id: moduleId,
/******/ 			loaded: false
/******/ 		};

/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

/******/ 		// Flag the module as loaded
/******/ 		module.loaded = true;

/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}


/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;

/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;

/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";

/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {

	"use strict";
	/*
	  Copyright JS Foundation and other contributors, https://js.foundation/

	  Redistribution and use in source and binary forms, with or without
	  modification, are permitted provided that the following conditions are met:

	    * Redistributions of source code must retain the above copyright
	      notice, this list of conditions and the following disclaimer.
	    * Redistributions in binary form must reproduce the above copyright
	      notice, this list of conditions and the following disclaimer in the
	      documentation and/or other materials provided with the distribution.

	  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
	  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
	  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
	  ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
	  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
	  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
	  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
	  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
	  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
	  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
	*/
	Object.defineProperty(exports, "__esModule", { value: true });
	var comment_handler_1 = __webpack_require__(1);
	var jsx_parser_1 = __webpack_require__(3);
	var parser_1 = __webpack_require__(8);
	var tokenizer_1 = __webpack_require__(15);
	function parse(code, options, delegate) {
	    var commentHandler = null;
	    var proxyDelegate = function (node, metadata) {
	        if (delegate) {
	            delegate(node, metadata);
	        }
	        if (commentHandler) {
	            commentHandler.visit(node, metadata);
	        }
	    };
	    var parserDelegate = (typeof delegate === 'function') ? proxyDelegate : null;
	    var collectComment = false;
	    if (options) {
	        collectComment = (typeof options.comment === 'boolean' && options.comment);
	        var attachComment = (typeof options.attachComment === 'boolean' && options.attachComment);
	        if (collectComment || attachComment) {
	            commentHandler = new comment_handler_1.CommentHandler();
	            commentHandler.attach = attachComment;
	            options.comment = true;
	            parserDelegate = proxyDelegate;
	        }
	    }
	    var isModule = false;
	    if (options && typeof options.sourceType === 'string') {
	        isModule = (options.sourceType === 'module');
	    }
	    var parser;
	    if (options && typeof options.jsx === 'boolean' && options.jsx) {
	        parser = new jsx_parser_1.JSXParser(code, options, parserDelegate);
	    }
	    else {
	        parser = new parser_1.Parser(code, options, parserDelegate);
	    }
	    var program = isModule ? parser.parseModule() : parser.parseScript();
	    var ast = program;
	    if (collectComment && commentHandler) {
	        ast.comments = commentHandler.comments;
	    }
	    if (parser.config.tokens) {
	        ast.tokens = parser.tokens;
	    }
	    if (parser.config.tolerant) {
	        ast.errors = parser.errorHandler.errors;
	    }
	    return ast;
	}
	exports.parse = parse;
	function parseModule(code, options, delegate) {
	    var parsingOptions = options || {};
	    parsingOptions.sourceType = 'module';
	    return parse(code, parsingOptions, delegate);
	}
	exports.parseModule = parseModule;
	function parseScript(code, options, delegate) {
	    var parsingOptions = options || {};
	    parsingOptions.sourceType = 'script';
	    return parse(code, parsingOptions, delegate);
	}
	exports.parseScript = parseScript;
	function tokenize(code, options, delegate) {
	    var tokenizer = new tokenizer_1.Tokenizer(code, options);
	    var tokens;
	    tokens = [];
	    try {
	        while (true) {
	            var token = tokenizer.getNextToken();
	            if (!token) {
	                break;
	            }
	            if (delegate) {
	                token = delegate(token);
	            }
	            tokens.push(token);
	        }
	    }
	    catch (e) {
	        tokenizer.errorHandler.tolerate(e);
	    }
	    if (tokenizer.errorHandler.tolerant) {
	        tokens.errors = tokenizer.errors();
	    }
	    return tokens;
	}
	exports.tokenize = tokenize;
	var syntax_1 = __webpack_require__(2);
	exports.Syntax = syntax_1.Syntax;
	// Sync with *.json manifests.
	exports.version = '4.0.1';


/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {

	"use strict";
	Object.defineProperty(exports, "__esModule", { value: true });
	var syntax_1 = __webpack_require__(2);
	var CommentHandler = (function () {
	    function CommentHandler() {
	        this.attach = false;
	        this.comments = [];
	        this.stack = [];
	        this.leading = [];
	        this.trailing = [];
	    }
	    CommentHandler.prototype.insertInnerComments = function (node, metadata) {
	        //  innnerComments for properties empty block
	        //  `function a() {/** comments **\/}`
	        if (node.type === syntax_1.Syntax.BlockStatement && node.body.length === 0) {
	            var innerComments = [];
	            for (var i = this.leading.length - 1; i >= 0; --i) {
	                var entry = this.leading[i];
	                if (metadata.end.offset >= entry.start) {
	                    innerComments.unshift(entry.comment);
	                    this.leading.splice(i, 1);
	                    this.trailing.splice(i, 1);
	                }
	            }
	            if (innerComments.length) {
	                node.innerComments = innerComments;
	            }
	        }
	    };
	    CommentHandler.prototype.findTrailingComments = function (metadata) {
	        var trailingComments = [];
	        if (this.trailing.length > 0) {
	            for (var i = this.trailing.length - 1; i >= 0; --i) {
	                var entry_1 = this.trailing[i];
	                if (entry_1.start >= metadata.end.offset) {
	                    trailingComments.unshift(entry_1.comment);
	                }
	            }
	            this.trailing.length = 0;
	            return trailingComments;
	        }
	        var entry = this.stack[this.stack.length - 1];
	        if (entry && entry.node.trailingComments) {
	            var firstComment = entry.node.trailingComments[0];
	            if (firstComment && firstComment.range[0] >= metadata.end.offset) {
	                trailingComments = entry.node.trailingComments;
	                delete entry.node.trailingComments;
	            }
	        }
	        return trailingComments;
	    };
	    CommentHandler.prototype.findLeadingComments = function (metadata) {
	        var leadingComments = [];
	        var target;
	        while (this.stack.length > 0) {
	            var entry = this.stack[this.stack.length - 1];
	            if (entry && entry.start >= metadata.start.offset) {
	                target = entry.node;
	                this.stack.pop();
	            }
	            else {
	                break;
	            }
	        }
	        if (target) {
	            var count = target.leadingComments ? target.leadingComments.length : 0;
	            for (var i = count - 1; i >= 0; --i) {
	                var comment = target.leadingComments[i];
	                if (comment.range[1] <= metadata.start.offset) {
	                    leadingComments.unshift(comment);
	                    target.leadingComments.splice(i, 1);
	                }
	            }
	            if (target.leadingComments && target.leadingComments.length === 0) {
	                delete target.leadingComments;
	            }
	            return leadingComments;
	        }
	        for (var i = this.leading.length - 1; i >= 0; --i) {
	            var entry = this.leading[i];
	            if (entry.start <= metadata.start.offset) {
	                leadingComments.unshift(entry.comment);
	                this.leading.splice(i, 1);
	            }
	        }
	        return leadingComments;
	    };
	    CommentHandler.prototype.visitNode = function (node, metadata) {
	        if (node.type === syntax_1.Syntax.Program && node.body.length > 0) {
	            return;
	        }
	        this.insertInnerComments(node, metadata);
	        var trailingComments = this.findTrailingComments(metadata);
	        var leadingComments = this.findLeadingComments(metadata);
	        if (leadingComments.length > 0) {
	            node.leadingComments = leadingComments;
	        }
	        if (trailingComments.length > 0) {
	            node.trailingComments = trailingComments;
	        }
	        this.stack.push({
	            node: node,
	            start: metadata.start.offset
	        });
	    };
	    CommentHandler.prototype.visitComment = function (node, metadata) {
	        var type = (node.type[0] === 'L') ? 'Line' : 'Block';
	        var comment = {
	            type: type,
	            value: node.value
	        };
	        if (node.range) {
	            comment.range = node.range;
	        }
	        if (node.loc) {
	            comment.loc = node.loc;
	        }
	        this.comments.push(comment);
	        if (this.attach) {
	            var entry = {
	                comment: {
	                    type: type,
	                    value: node.value,
	                    range: [metadata.start.offset, metadata.end.offset]
	                },
	                start: metadata.start.offset
	            };
	            if (node.loc) {
	                entry.comment.loc = node.loc;
	            }
	            node.type = type;
	            this.leading.push(entry);
	            this.trailing.push(entry);
	        }
	    };
	    CommentHandler.prototype.visit = function (node, metadata) {
	        if (node.type === 'LineComment') {
	            this.visitComment(node, metadata);
	        }
	        else if (node.type === 'BlockComment') {
	            this.visitComment(node, metadata);
	        }
	        else if (this.attach) {
	            this.visitNode(node, metadata);
	        }
	    };
	    return CommentHandler;
	}());
	exports.CommentHandler = CommentHandler;


/***/ },
/* 2 */
/***/ function(module, exports) {

	"use strict";
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.Syntax = {
	    AssignmentExpression: 'AssignmentExpression',
	    AssignmentPattern: 'AssignmentPattern',
	    ArrayExpression: 'ArrayExpression',
	    ArrayPattern: 'ArrayPattern',
	    ArrowFunctionExpression: 'ArrowFunctionExpression',
	    AwaitExpression: 'AwaitExpression',
	    BlockStatement: 'BlockStatement',
	    BinaryExpression: 'BinaryExpression',
	    BreakStatement: 'BreakStatement',
	    CallExpression: 'CallExpression',
	    CatchClause: 'CatchClause',
	    ClassBody: 'ClassBody',
	    ClassDeclaration: 'ClassDeclaration',
	    ClassExpression: 'ClassExpression',
	    ConditionalExpression: 'ConditionalExpression',
	    ContinueStatement: 'ContinueStatement',
	    DoWhileStatement: 'DoWhileStatement',
	    DebuggerStatement: 'DebuggerStatement',
	    EmptyStatement: 'EmptyStatement',
	    ExportAllDeclaration: 'ExportAllDeclaration',
	    ExportDefaultDeclaration: 'ExportDefaultDeclaration',
	    ExportNamedDeclaration: 'ExportNamedDeclaration',
	    ExportSpecifier: 'ExportSpecifier',
	    ExpressionStatement: 'ExpressionStatement',
	    ForStatement: 'ForStatement',
	    ForOfStatement: 'ForOfStatement',
	    ForInStatement: 'ForInStatement',
	    FunctionDeclaration: 'FunctionDeclaration',
	    FunctionExpression: 'FunctionExpression',
	    Identifier: 'Identifier',
	    IfStatement: 'IfStatement',
	    ImportDeclaration: 'ImportDeclaration',
	    ImportDefaultSpecifier: 'ImportDefaultSpecifier',
	    ImportNamespaceSpecifier: 'ImportNamespaceSpecifier',
	    ImportSpecifier: 'ImportSpecifier',
	    Literal: 'Literal',
	    LabeledStatement: 'LabeledStatement',
	    LogicalExpression: 'LogicalExpression',
	    MemberExpression: 'MemberExpression',
	    MetaProperty: 'MetaProperty',
	    MethodDefinition: 'MethodDefinition',
	    NewExpression: 'NewExpression',
	    ObjectExpression: 'ObjectExpression',
	    ObjectPattern: 'ObjectPattern',
	    Program: 'Program',
	    Property: 'Property',
	    RestElement: 'RestElement',
	    ReturnStatement: 'ReturnStatement',
	    SequenceExpression: 'SequenceExpression',
	    SpreadElement: 'SpreadElement',
	    Super: 'Super',
	    SwitchCase: 'SwitchCase',
	    SwitchStatement: 'SwitchStatement',
	    TaggedTemplateExpression: 'TaggedTemplateExpression',
	    TemplateElement: 'TemplateElement',
	    TemplateLiteral: 'TemplateLiteral',
	    ThisExpression: 'ThisExpression',
	    ThrowStatement: 'ThrowStatement',
	    TryStatement: 'TryStatement',
	    UnaryExpression: 'UnaryExpression',
	    UpdateExpression: 'UpdateExpression',
	    VariableDeclaration: 'VariableDeclaration',
	    VariableDeclarator: 'VariableDeclarator',
	    WhileStatement: 'WhileStatement',
	    WithStatement: 'WithStatement',
	    YieldExpression: 'YieldExpression'
	};


/***/ },
/* 3 */
/***/ function(module, exports, __webpack_require__) {

	"use strict";
/* istanbul ignore next */
	var __extends = (this && this.__extends) || (function () {
	    var extendStatics = Object.setPrototypeOf ||
	        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
	        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
	    return function (d, b) {
	        extendStatics(d, b);
	        function __() { this.constructor = d; }
	        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
	    };
	})();
	Object.defineProperty(exports, "__esModule", { value: true });
	var character_1 = __webpack_require__(4);
	var JSXNode = __webpack_require__(5);
	var jsx_syntax_1 = __webpack_require__(6);
	var Node = __webpack_require__(7);
	var parser_1 = __webpack_require__(8);
	var token_1 = __webpack_require__(13);
	var xhtml_entities_1 = __webpack_require__(14);
	token_1.TokenName[100 /* Identifier */] = 'JSXIdentifier';
	token_1.TokenName[101 /* Text */] = 'JSXText';
	// Fully qualified element name, e.g. <svg:path> returns "svg:path"
	function getQualifiedElementName(elementName) {
	    var qualifiedName;
	    switch (elementName.type) {
	        case jsx_syntax_1.JSXSyntax.JSXIdentifier:
	            var id = elementName;
	            qualifiedName = id.name;
	            break;
	        case jsx_syntax_1.JSXSyntax.JSXNamespacedName:
	            var ns = elementName;
	            qualifiedName = getQualifiedElementName(ns.namespace) + ':' +
	                getQualifiedElementName(ns.name);
	            break;
	        case jsx_syntax_1.JSXSyntax.JSXMemberExpression:
	            var expr = elementName;
	            qualifiedName = getQualifiedElementName(expr.object) + '.' +
	                getQualifiedElementName(expr.property);
	            break;
	        /* istanbul ignore next */
	        default:
	            break;
	    }
	    return qualifiedName;
	}
	var JSXParser = (function (_super) {
	    __extends(JSXParser, _super);
	    function JSXParser(code, options, delegate) {
	        return _super.call(this, code, options, delegate) || this;
	    }
	    JSXParser.prototype.parsePrimaryExpression = function () {
	        return this.match('<') ? this.parseJSXRoot() : _super.prototype.parsePrimaryExpression.call(this);
	    };
	    JSXParser.prototype.startJSX = function () {
	        // Unwind the scanner before the lookahead token.
	        this.scanner.index = this.startMarker.index;
	        this.scanner.lineNumber = this.startMarker.line;
	        this.scanner.lineStart = this.startMarker.index - this.startMarker.column;
	    };
	    JSXParser.prototype.finishJSX = function () {
	        // Prime the next lookahead.
	        this.nextToken();
	    };
	    JSXParser.prototype.reenterJSX = function () {
	        this.startJSX();
	        this.expectJSX('}');
	        // Pop the closing '}' added from the lookahead.
	        if (this.config.tokens) {
	            this.tokens.pop();
	        }
	    };
	    JSXParser.prototype.createJSXNode = function () {
	        this.collectComments();
	        return {
	            index: this.scanner.index,
	            line: this.scanner.lineNumber,
	            column: this.scanner.index - this.scanner.lineStart
	        };
	    };
	    JSXParser.prototype.createJSXChildNode = function () {
	        return {
	            index: this.scanner.index,
	            line: this.scanner.lineNumber,
	            column: this.scanner.index - this.scanner.lineStart
	        };
	    };
	    JSXParser.prototype.scanXHTMLEntity = function (quote) {
	        var result = '&';
	        var valid = true;
	        var terminated = false;
	        var numeric = false;
	        var hex = false;
	        while (!this.scanner.eof() && valid && !terminated) {
	            var ch = this.scanner.source[this.scanner.index];
	            if (ch === quote) {
	                break;
	            }
	            terminated = (ch === ';');
	            result += ch;
	            ++this.scanner.index;
	            if (!terminated) {
	                switch (result.length) {
	                    case 2:
	                        // e.g. '&#123;'
	                        numeric = (ch === '#');
	                        break;
	                    case 3:
	                        if (numeric) {
	                            // e.g. '&#x41;'
	                            hex = (ch === 'x');
	                            valid = hex || character_1.Character.isDecimalDigit(ch.charCodeAt(0));
	                            numeric = numeric && !hex;
	                        }
	                        break;
	                    default:
	                        valid = valid && !(numeric && !character_1.Character.isDecimalDigit(ch.charCodeAt(0)));
	                        valid = valid && !(hex && !character_1.Character.isHexDigit(ch.charCodeAt(0)));
	                        break;
	                }
	            }
	        }
	        if (valid && terminated && result.length > 2) {
	            // e.g. '&#x41;' becomes just '#x41'
	            var str = result.substr(1, result.length - 2);
	            if (numeric && str.length > 1) {
	                result = String.fromCharCode(parseInt(str.substr(1), 10));
	            }
	            else if (hex && str.length > 2) {
	                result = String.fromCharCode(parseInt('0' + str.substr(1), 16));
	            }
	            else if (!numeric && !hex && xhtml_entities_1.XHTMLEntities[str]) {
	                result = xhtml_entities_1.XHTMLEntities[str];
	            }
	        }
	        return result;
	    };
	    // Scan the next JSX token. This replaces Scanner#lex when in JSX mode.
	    JSXParser.prototype.lexJSX = function () {
	        var cp = this.scanner.source.charCodeAt(this.scanner.index);
	        // < > / : = { }
	        if (cp === 60 || cp === 62 || cp === 47 || cp === 58 || cp === 61 || cp === 123 || cp === 125) {
	            var value = this.scanner.source[this.scanner.index++];
	            return {
	                type: 7 /* Punctuator */,
	                value: value,
	                lineNumber: this.scanner.lineNumber,
	                lineStart: this.scanner.lineStart,
	                start: this.scanner.index - 1,
	                end: this.scanner.index
	            };
	        }
	        // " '
	        if (cp === 34 || cp === 39) {
	            var start = this.scanner.index;
	            var quote = this.scanner.source[this.scanner.index++];
	            var str = '';
	            while (!this.scanner.eof()) {
	                var ch = this.scanner.source[this.scanner.index++];
	                if (ch === quote) {
	                    break;
	                }
	                else if (ch === '&') {
	                    str += this.scanXHTMLEntity(quote);
	                }
	                else {
	                    str += ch;
	                }
	            }
	            return {
	                type: 8 /* StringLiteral */,
	                value: str,
	                lineNumber: this.scanner.lineNumber,
	                lineStart: this.scanner.lineStart,
	                start: start,
	                end: this.scanner.index
	            };
	        }
	        // ... or .
	        if (cp === 46) {
	            var n1 = this.scanner.source.charCodeAt(this.scanner.index + 1);
	            var n2 = this.scanner.source.charCodeAt(this.scanner.index + 2);
	            var value = (n1 === 46 && n2 === 46) ? '...' : '.';
	            var start = this.scanner.index;
	            this.scanner.index += value.length;
	            return {
	                type: 7 /* Punctuator */,
	                value: value,
	                lineNumber: this.scanner.lineNumber,
	                lineStart: this.scanner.lineStart,
	                start: start,
	                end: this.scanner.index
	            };
	        }
	        // `
	        if (cp === 96) {
	            // Only placeholder, since it will be rescanned as a real assignment expression.
	            return {
	                type: 10 /* Template */,
	                value: '',
	                lineNumber: this.scanner.lineNumber,
	                lineStart: this.scanner.lineStart,
	                start: this.scanner.index,
	                end: this.scanner.index
	            };
	        }
	        // Identifer can not contain backslash (char code 92).
	        if (character_1.Character.isIdentifierStart(cp) && (cp !== 92)) {
	            var start = this.scanner.index;
	            ++this.scanner.index;
	            while (!this.scanner.eof()) {
	                var ch = this.scanner.source.charCodeAt(this.scanner.index);
	                if (character_1.Character.isIdentifierPart(ch) && (ch !== 92)) {
	                    ++this.scanner.index;
	                }
	                else if (ch === 45) {
	                    // Hyphen (char code 45) can be part of an identifier.
	                    ++this.scanner.index;
	                }
	                else {
	                    break;
	                }
	            }
	            var id = this.scanner.source.slice(start, this.scanner.index);
	            return {
	                type: 100 /* Identifier */,
	                value: id,
	                lineNumber: this.scanner.lineNumber,
	                lineStart: this.scanner.lineStart,
	                start: start,
	                end: this.scanner.index
	            };
	        }
	        return this.scanner.lex();
	    };
	    JSXParser.prototype.nextJSXToken = function () {
	        this.collectComments();
	        this.startMarker.index = this.scanner.index;
	        this.startMarker.line = this.scanner.lineNumber;
	        this.startMarker.column = this.scanner.index - this.scanner.lineStart;
	        var token = this.lexJSX();
	        this.lastMarker.index = this.scanner.index;
	        this.lastMarker.line = this.scanner.lineNumber;
	        this.lastMarker.column = this.scanner.index - this.scanner.lineStart;
	        if (this.config.tokens) {
	            this.tokens.push(this.convertToken(token));
	        }
	        return token;
	    };
	    JSXParser.prototype.nextJSXText = function () {
	        this.startMarker.index = this.scanner.index;
	        this.startMarker.line = this.scanner.lineNumber;
	        this.startMarker.column = this.scanner.index - this.scanner.lineStart;
	        var start = this.scanner.index;
	        var text = '';
	        while (!this.scanner.eof()) {
	            var ch = this.scanner.source[this.scanner.index];
	            if (ch === '{' || ch === '<') {
	                break;
	            }
	            ++this.scanner.index;
	            text += ch;
	            if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
	                ++this.scanner.lineNumber;
	                if (ch === '\r' && this.scanner.source[this.scanner.index] === '\n') {
	                    ++this.scanner.index;
	                }
	                this.scanner.lineStart = this.scanner.index;
	            }
	        }
	        this.lastMarker.index = this.scanner.index;
	        this.lastMarker.line = this.scanner.lineNumber;
	        this.lastMarker.column = this.scanner.index - this.scanner.lineStart;
	        var token = {
	            type: 101 /* Text */,
	            value: text,
	            lineNumber: this.scanner.lineNumber,
	            lineStart: this.scanner.lineStart,
	            start: start,
	            end: this.scanner.index
	        };
	        if ((text.length > 0) && this.config.tokens) {
	            this.tokens.push(this.convertToken(token));
	        }
	        return token;
	    };
	    JSXParser.prototype.peekJSXToken = function () {
	        var state = this.scanner.saveState();
	        this.scanner.scanComments();
	        var next = this.lexJSX();
	        this.scanner.restoreState(state);
	        return next;
	    };
	    // Expect the next JSX token to match the specified punctuator.
	    // If not, an exception will be thrown.
	    JSXParser.prototype.expectJSX = function (value) {
	        var token = this.nextJSXToken();
	        if (token.type !== 7 /* Punctuator */ || token.value !== value) {
	            this.throwUnexpectedToken(token);
	        }
	    };
	    // Return true if the next JSX token matches the specified punctuator.
	    JSXParser.prototype.matchJSX = function (value) {
	        var next = this.peekJSXToken();
	        return next.type === 7 /* Punctuator */ && next.value === value;
	    };
	    JSXParser.prototype.parseJSXIdentifier = function () {
	        var node = this.createJSXNode();
	        var token = this.nextJSXToken();
	        if (token.type !== 100 /* Identifier */) {
	            this.throwUnexpectedToken(token);
	        }
	        return this.finalize(node, new JSXNode.JSXIdentifier(token.value));
	    };
	    JSXParser.prototype.parseJSXElementName = function () {
	        var node = this.createJSXNode();
	        var elementName = this.parseJSXIdentifier();
	        if (this.matchJSX(':')) {
	            var namespace = elementName;
	            this.expectJSX(':');
	            var name_1 = this.parseJSXIdentifier();
	            elementName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name_1));
	        }
	        else if (this.matchJSX('.')) {
	            while (this.matchJSX('.')) {
	                var object = elementName;
	                this.expectJSX('.');
	                var property = this.parseJSXIdentifier();
	                elementName = this.finalize(node, new JSXNode.JSXMemberExpression(object, property));
	            }
	        }
	        return elementName;
	    };
	    JSXParser.prototype.parseJSXAttributeName = function () {
	        var node = this.createJSXNode();
	        var attributeName;
	        var identifier = this.parseJSXIdentifier();
	        if (this.matchJSX(':')) {
	            var namespace = identifier;
	            this.expectJSX(':');
	            var name_2 = this.parseJSXIdentifier();
	            attributeName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name_2));
	        }
	        else {
	            attributeName = identifier;
	        }
	        return attributeName;
	    };
	    JSXParser.prototype.parseJSXStringLiteralAttribute = function () {
	        var node = this.createJSXNode();
	        var token = this.nextJSXToken();
	        if (token.type !== 8 /* StringLiteral */) {
	            this.throwUnexpectedToken(token);
	        }
	        var raw = this.getTokenRaw(token);
	        return this.finalize(node, new Node.Literal(token.value, raw));
	    };
	    JSXParser.prototype.parseJSXExpressionAttribute = function () {
	        var node = this.createJSXNode();
	        this.expectJSX('{');
	        this.finishJSX();
	        if (this.match('}')) {
	            this.tolerateError('JSX attributes must only be assigned a non-empty expression');
	        }
	        var expression = this.parseAssignmentExpression();
	        this.reenterJSX();
	        return this.finalize(node, new JSXNode.JSXExpressionContainer(expression));
	    };
	    JSXParser.prototype.parseJSXAttributeValue = function () {
	        return this.matchJSX('{') ? this.parseJSXExpressionAttribute() :
	            this.matchJSX('<') ? this.parseJSXElement() : this.parseJSXStringLiteralAttribute();
	    };
	    JSXParser.prototype.parseJSXNameValueAttribute = function () {
	        var node = this.createJSXNode();
	        var name = this.parseJSXAttributeName();
	        var value = null;
	        if (this.matchJSX('=')) {
	            this.expectJSX('=');
	            value = this.parseJSXAttributeValue();
	        }
	        return this.finalize(node, new JSXNode.JSXAttribute(name, value));
	    };
	    JSXParser.prototype.parseJSXSpreadAttribute = function () {
	        var node = this.createJSXNode();
	        this.expectJSX('{');
	        this.expectJSX('...');
	        this.finishJSX();
	        var argument = this.parseAssignmentExpression();
	        this.reenterJSX();
	        return this.finalize(node, new JSXNode.JSXSpreadAttribute(argument));
	    };
	    JSXParser.prototype.parseJSXAttributes = function () {
	        var attributes = [];
	        while (!this.matchJSX('/') && !this.matchJSX('>')) {
	            var attribute = this.matchJSX('{') ? this.parseJSXSpreadAttribute() :
	                this.parseJSXNameValueAttribute();
	            attributes.push(attribute);
	        }
	        return attributes;
	    };
	    JSXParser.prototype.parseJSXOpeningElement = function () {
	        var node = this.createJSXNode();
	        this.expectJSX('<');
	        var name = this.parseJSXElementName();
	        var attributes = this.parseJSXAttributes();
	        var selfClosing = this.matchJSX('/');
	        if (selfClosing) {
	            this.expectJSX('/');
	        }
	        this.expectJSX('>');
	        return this.finalize(node, new JSXNode.JSXOpeningElement(name, selfClosing, attributes));
	    };
	    JSXParser.prototype.parseJSXBoundaryElement = function () {
	        var node = this.createJSXNode();
	        this.expectJSX('<');
	        if (this.matchJSX('/')) {
	            this.expectJSX('/');
	            var name_3 = this.parseJSXElementName();
	            this.expectJSX('>');
	            return this.finalize(node, new JSXNode.JSXClosingElement(name_3));
	        }
	        var name = this.parseJSXElementName();
	        var attributes = this.parseJSXAttributes();
	        var selfClosing = this.matchJSX('/');
	        if (selfClosing) {
	            this.expectJSX('/');
	        }
	        this.expectJSX('>');
	        return this.finalize(node, new JSXNode.JSXOpeningElement(name, selfClosing, attributes));
	    };
	    JSXParser.prototype.parseJSXEmptyExpression = function () {
	        var node = this.createJSXChildNode();
	        this.collectComments();
	        this.lastMarker.index = this.scanner.index;
	        this.lastMarker.line = this.scanner.lineNumber;
	        this.lastMarker.column = this.scanner.index - this.scanner.lineStart;
	        return this.finalize(node, new JSXNode.JSXEmptyExpression());
	    };
	    JSXParser.prototype.parseJSXExpressionContainer = function () {
	        var node = this.createJSXNode();
	        this.expectJSX('{');
	        var expression;
	        if (this.matchJSX('}')) {
	            expression = this.parseJSXEmptyExpression();
	            this.expectJSX('}');
	        }
	        else {
	            this.finishJSX();
	            expression = this.parseAssignmentExpression();
	            this.reenterJSX();
	        }
	        return this.finalize(node, new JSXNode.JSXExpressionContainer(expression));
	    };
	    JSXParser.prototype.parseJSXChildren = function () {
	        var children = [];
	        while (!this.scanner.eof()) {
	            var node = this.createJSXChildNode();
	            var token = this.nextJSXText();
	            if (token.start < token.end) {
	                var raw = this.getTokenRaw(token);
	                var child = this.finalize(node, new JSXNode.JSXText(token.value, raw));
	                children.push(child);
	            }
	            if (this.scanner.source[this.scanner.index] === '{') {
	                var container = this.parseJSXExpressionContainer();
	                children.push(container);
	            }
	            else {
	                break;
	            }
	        }
	        return children;
	    };
	    JSXParser.prototype.parseComplexJSXElement = function (el) {
	        var stack = [];
	        while (!this.scanner.eof()) {
	            el.children = el.children.concat(this.parseJSXChildren());
	            var node = this.createJSXChildNode();
	            var element = this.parseJSXBoundaryElement();
	            if (element.type === jsx_syntax_1.JSXSyntax.JSXOpeningElement) {
	                var opening = element;
	                if (opening.selfClosing) {
	                    var child = this.finalize(node, new JSXNode.JSXElement(opening, [], null));
	                    el.children.push(child);
	                }
	                else {
	                    stack.push(el);
	                    el = { node: node, opening: opening, closing: null, children: [] };
	                }
	            }
	            if (element.type === jsx_syntax_1.JSXSyntax.JSXClosingElement) {
	                el.closing = element;
	                var open_1 = getQualifiedElementName(el.opening.name);
	                var close_1 = getQualifiedElementName(el.closing.name);
	                if (open_1 !== close_1) {
	                    this.tolerateError('Expected corresponding JSX closing tag for %0', open_1);
	                }
	                if (stack.length > 0) {
	                    var child = this.finalize(el.node, new JSXNode.JSXElement(el.opening, el.children, el.closing));
	                    el = stack[stack.length - 1];
	                    el.children.push(child);
	                    stack.pop();
	                }
	                else {
	                    break;
	                }
	            }
	        }
	        return el;
	    };
	    JSXParser.prototype.parseJSXElement = function () {
	        var node = this.createJSXNode();
	        var opening = this.parseJSXOpeningElement();
	        var children = [];
	        var closing = null;
	        if (!opening.selfClosing) {
	            var el = this.parseComplexJSXElement({ node: node, opening: opening, closing: closing, children: children });
	            children = el.children;
	            closing = el.closing;
	        }
	        return this.finalize(node, new JSXNode.JSXElement(opening, children, closing));
	    };
	    JSXParser.prototype.parseJSXRoot = function () {
	        // Pop the opening '<' added from the lookahead.
	        if (this.config.tokens) {
	            this.tokens.pop();
	        }
	        this.startJSX();
	        var element = this.parseJSXElement();
	        this.finishJSX();
	        return element;
	    };
	    JSXParser.prototype.isStartOfExpression = function () {
	        return _super.prototype.isStartOfExpression.call(this) || this.match('<');
	    };
	    return JSXParser;
	}(parser_1.Parser));
	exports.JSXParser = JSXParser;


/***/ },
/* 4 */
/***/ function(module, exports) {

	"use strict";
	Object.defineProperty(exports, "__esModule", { value: true });
	// See also tools/generate-unicode-regex.js.
	var Regex = {
	    // Unicode v8.0.0 NonAsciiIdentifierStart:
	    NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,
	    // Unicode v8.0.0 NonAsciiIdentifierPart:
	    NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/
	};
	exports.Character = {
	    /* tslint:disable:no-bitwise */
	    fromCodePoint: function (cp) {
	        return (cp < 0x10000) ? String.fromCharCode(cp) :
	            String.fromCharCode(0xD800 + ((cp - 0x10000) >> 10)) +
	                String.fromCharCode(0xDC00 + ((cp - 0x10000) & 1023));
	    },
	    // https://tc39.github.io/ecma262/#sec-white-space
	    isWhiteSpace: function (cp) {
	        return (cp === 0x20) || (cp === 0x09) || (cp === 0x0B) || (cp === 0x0C) || (cp === 0xA0) ||
	            (cp >= 0x1680 && [0x1680, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF].indexOf(cp) >= 0);
	    },
	    // https://tc39.github.io/ecma262/#sec-line-terminators
	    isLineTerminator: function (cp) {
	        return (cp === 0x0A) || (cp === 0x0D) || (cp === 0x2028) || (cp === 0x2029);
	    },
	    // https://tc39.github.io/ecma262/#sec-names-and-keywords
	    isIdentifierStart: function (cp) {
	        return (cp === 0x24) || (cp === 0x5F) ||
	            (cp >= 0x41 && cp <= 0x5A) ||
	            (cp >= 0x61 && cp <= 0x7A) ||
	            (cp === 0x5C) ||
	            ((cp >= 0x80) && Regex.NonAsciiIdentifierStart.test(exports.Character.fromCodePoint(cp)));
	    },
	    isIdentifierPart: function (cp) {
	        return (cp === 0x24) || (cp === 0x5F) ||
	            (cp >= 0x41 && cp <= 0x5A) ||
	            (cp >= 0x61 && cp <= 0x7A) ||
	            (cp >= 0x30 && cp <= 0x39) ||
	            (cp === 0x5C) ||
	            ((cp >= 0x80) && Regex.NonAsciiIdentifierPart.test(exports.Character.fromCodePoint(cp)));
	    },
	    // https://tc39.github.io/ecma262/#sec-literals-numeric-literals
	    isDecimalDigit: function (cp) {
	        return (cp >= 0x30 && cp <= 0x39); // 0..9
	    },
	    isHexDigit: function (cp) {
	        return (cp >= 0x30 && cp <= 0x39) ||
	            (cp >= 0x41 && cp <= 0x46) ||
	            (cp >= 0x61 && cp <= 0x66); // a..f
	    },
	    isOctalDigit: function (cp) {
	        return (cp >= 0x30 && cp <= 0x37); // 0..7
	    }
	};


/***/ },
/* 5 */
/***/ function(module, exports, __webpack_require__) {

	"use strict";
	Object.defineProperty(exports, "__esModule", { value: true });
	var jsx_syntax_1 = __webpack_require__(6);
	/* tslint:disable:max-classes-per-file */
	var JSXClosingElement = (function () {
	    function JSXClosingElement(name) {
	        this.type = jsx_syntax_1.JSXSyntax.JSXClosingElement;
	        this.name = name;
	    }
	    return JSXClosingElement;
	}());
	exports.JSXClosingElement = JSXClosingElement;
	var JSXElement = (function () {
	    function JSXElement(openingElement, children, closingElement) {
	        this.type = jsx_syntax_1.JSXSyntax.JSXElement;
	        this.openingElement = openingElement;
	        this.children = children;
	        this.closingElement = closingElement;
	    }
	    return JSXElement;
	}());
	exports.JSXElement = JSXElement;
	var JSXEmptyExpression = (function () {
	    function JSXEmptyExpression() {
	        this.type = jsx_syntax_1.JSXSyntax.JSXEmptyExpression;
	    }
	    return JSXEmptyExpression;
	}());
	exports.JSXEmptyExpression = JSXEmptyExpression;
	var JSXExpressionContainer = (function () {
	    function JSXExpressionContainer(expression) {
	        this.type = jsx_syntax_1.JSXSyntax.JSXExpressionContainer;
	        this.expression = expression;
	    }
	    return JSXExpressionContainer;
	}());
	exports.JSXExpressionContainer = JSXExpressionContainer;
	var JSXIdentifier = (function () {
	    function JSXIdentifier(name) {
	        this.type = jsx_syntax_1.JSXSyntax.JSXIdentifier;
	        this.name = name;
	    }
	    return JSXIdentifier;
	}());
	exports.JSXIdentifier = JSXIdentifier;
	var JSXMemberExpression = (function () {
	    function JSXMemberExpression(object, property) {
	        this.type = jsx_syntax_1.JSXSyntax.JSXMemberExpression;
	        this.object = object;
	        this.property = property;
	    }
	    return JSXMemberExpression;
	}());
	exports.JSXMemberExpression = JSXMemberExpression;
	var JSXAttribute = (function () {
	    function JSXAttribute(name, value) {
	        this.type = jsx_syntax_1.JSXSyntax.JSXAttribute;
	        this.name = name;
	        this.value = value;
	    }
	    return JSXAttribute;
	}());
	exports.JSXAttribute = JSXAttribute;
	var JSXNamespacedName = (function () {
	    function JSXNamespacedName(namespace, name) {
	        this.type = jsx_syntax_1.JSXSyntax.JSXNamespacedName;
	        this.namespace = namespace;
	        this.name = name;
	    }
	    return JSXNamespacedName;
	}());
	exports.JSXNamespacedName = JSXNamespacedName;
	var JSXOpeningElement = (function () {
	    function JSXOpeningElement(name, selfClosing, attributes) {
	        this.type = jsx_syntax_1.JSXSyntax.JSXOpeningElement;
	        this.name = name;
	        this.selfClosing = selfClosing;
	        this.attributes = attributes;
	    }
	    return JSXOpeningElement;
	}());
	exports.JSXOpeningElement = JSXOpeningElement;
	var JSXSpreadAttribute = (function () {
	    function JSXSpreadAttribute(argument) {
	        this.type = jsx_syntax_1.JSXSyntax.JSXSpreadAttribute;
	        this.argument = argument;
	    }
	    return JSXSpreadAttribute;
	}());
	exports.JSXSpreadAttribute = JSXSpreadAttribute;
	var JSXText = (function () {
	    function JSXText(value, raw) {
	        this.type = jsx_syntax_1.JSXSyntax.JSXText;
	        this.value = value;
	        this.raw = raw;
	    }
	    return JSXText;
	}());
	exports.JSXText = JSXText;


/***/ },
/* 6 */
/***/ function(module, exports) {

	"use strict";
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.JSXSyntax = {
	    JSXAttribute: 'JSXAttribute',
	    JSXClosingElement: 'JSXClosingElement',
	    JSXElement: 'JSXElement',
	    JSXEmptyExpression: 'JSXEmptyExpression',
	    JSXExpressionContainer: 'JSXExpressionContainer',
	    JSXIdentifier: 'JSXIdentifier',
	    JSXMemberExpression: 'JSXMemberExpression',
	    JSXNamespacedName: 'JSXNamespacedName',
	    JSXOpeningElement: 'JSXOpeningElement',
	    JSXSpreadAttribute: 'JSXSpreadAttribute',
	    JSXText: 'JSXText'
	};


/***/ },
/* 7 */
/***/ function(module, exports, __webpack_require__) {

	"use strict";
	Object.defineProperty(exports, "__esModule", { value: true });
	var syntax_1 = __webpack_require__(2);
	/* tslint:disable:max-classes-per-file */
	var ArrayExpression = (function () {
	    function ArrayExpression(elements) {
	        this.type = syntax_1.Syntax.ArrayExpression;
	        this.elements = elements;
	    }
	    return ArrayExpression;
	}());
	exports.ArrayExpression = ArrayExpression;
	var ArrayPattern = (function () {
	    function ArrayPattern(elements) {
	        this.type = syntax_1.Syntax.ArrayPattern;
	        this.elements = elements;
	    }
	    return ArrayPattern;
	}());
	exports.ArrayPattern = ArrayPattern;
	var ArrowFunctionExpression = (function () {
	    function ArrowFunctionExpression(params, body, expression) {
	        this.type = syntax_1.Syntax.ArrowFunctionExpression;
	        this.id = null;
	        this.params = params;
	        this.body = body;
	        this.generator = false;
	        this.expression = expression;
	        this.async = false;
	    }
	    return ArrowFunctionExpression;
	}());
	exports.ArrowFunctionExpression = ArrowFunctionExpression;
	var AssignmentExpression = (function () {
	    function AssignmentExpression(operator, left, right) {
	        this.type = syntax_1.Syntax.AssignmentExpression;
	        this.operator = operator;
	        this.left = left;
	        this.right = right;
	    }
	    return AssignmentExpression;
	}());
	exports.AssignmentExpression = AssignmentExpression;
	var AssignmentPattern = (function () {
	    function AssignmentPattern(left, right) {
	        this.type = syntax_1.Syntax.AssignmentPattern;
	        this.left = left;
	        this.right = right;
	    }
	    return AssignmentPattern;
	}());
	exports.AssignmentPattern = AssignmentPattern;
	var AsyncArrowFunctionExpression = (function () {
	    function AsyncArrowFunctionExpression(params, body, expression) {
	        this.type = syntax_1.Syntax.ArrowFunctionExpression;
	        this.id = null;
	        this.params = params;
	        this.body = body;
	        this.generator = false;
	        this.expression = expression;
	        this.async = true;
	    }
	    return AsyncArrowFunctionExpression;
	}());
	exports.AsyncArrowFunctionExpression = AsyncArrowFunctionExpression;
	var AsyncFunctionDeclaration = (function () {
	    function AsyncFunctionDeclaration(id, params, body) {
	        this.type = syntax_1.Syntax.FunctionDeclaration;
	        this.id = id;
	        this.params = params;
	        this.body = body;
	        this.generator = false;
	        this.expression = false;
	        this.async = true;
	    }
	    return AsyncFunctionDeclaration;
	}());
	exports.AsyncFunctionDeclaration = AsyncFunctionDeclaration;
	var AsyncFunctionExpression = (function () {
	    function AsyncFunctionExpression(id, params, body) {
	        this.type = syntax_1.Syntax.FunctionExpression;
	        this.id = id;
	        this.params = params;
	        this.body = body;
	        this.generator = false;
	        this.expression = false;
	        this.async = true;
	    }
	    return AsyncFunctionExpression;
	}());
	exports.AsyncFunctionExpression = AsyncFunctionExpression;
	var AwaitExpression = (function () {
	    function AwaitExpression(argument) {
	        this.type = syntax_1.Syntax.AwaitExpression;
	        this.argument = argument;
	    }
	    return AwaitExpression;
	}());
	exports.AwaitExpression = AwaitExpression;
	var BinaryExpression = (function () {
	    function BinaryExpression(operator, left, right) {
	        var logical = (operator === '||' || operator === '&&');
	        this.type = logical ? syntax_1.Syntax.LogicalExpression : syntax_1.Syntax.BinaryExpression;
	        this.operator = operator;
	        this.left = left;
	        this.right = right;
	    }
	    return BinaryExpression;
	}());
	exports.BinaryExpression = BinaryExpression;
	var BlockStatement = (function () {
	    function BlockStatement(body) {
	        this.type = syntax_1.Syntax.BlockStatement;
	        this.body = body;
	    }
	    return BlockStatement;
	}());
	exports.BlockStatement = BlockStatement;
	var BreakStatement = (function () {
	    function BreakStatement(label) {
	        this.type = syntax_1.Syntax.BreakStatement;
	        this.label = label;
	    }
	    return BreakStatement;
	}());
	exports.BreakStatement = BreakStatement;
	var CallExpression = (function () {
	    function CallExpression(callee, args) {
	        this.type = syntax_1.Syntax.CallExpression;
	        this.callee = callee;
	        this.arguments = args;
	    }
	    return CallExpression;
	}());
	exports.CallExpression = CallExpression;
	var CatchClause = (function () {
	    function CatchClause(param, body) {
	        this.type = syntax_1.Syntax.CatchClause;
	        this.param = param;
	        this.body = body;
	    }
	    return CatchClause;
	}());
	exports.CatchClause = CatchClause;
	var ClassBody = (function () {
	    function ClassBody(body) {
	        this.type = syntax_1.Syntax.ClassBody;
	        this.body = body;
	    }
	    return ClassBody;
	}());
	exports.ClassBody = ClassBody;
	var ClassDeclaration = (function () {
	    function ClassDeclaration(id, superClass, body) {
	        this.type = syntax_1.Syntax.ClassDeclaration;
	        this.id = id;
	        this.superClass = superClass;
	        this.body = body;
	    }
	    return ClassDeclaration;
	}());
	exports.ClassDeclaration = ClassDeclaration;
	var ClassExpression = (function () {
	    function ClassExpression(id, superClass, body) {
	        this.type = syntax_1.Syntax.ClassExpression;
	        this.id = id;
	        this.superClass = superClass;
	        this.body = body;
	    }
	    return ClassExpression;
	}());
	exports.ClassExpression = ClassExpression;
	var ComputedMemberExpression = (function () {
	    function ComputedMemberExpression(object, property) {
	        this.type = syntax_1.Syntax.MemberExpression;
	        this.computed = true;
	        this.object = object;
	        this.property = property;
	    }
	    return ComputedMemberExpression;
	}());
	exports.ComputedMemberExpression = ComputedMemberExpression;
	var ConditionalExpression = (function () {
	    function ConditionalExpression(test, consequent, alternate) {
	        this.type = syntax_1.Syntax.ConditionalExpression;
	        this.test = test;
	        this.consequent = consequent;
	        this.alternate = alternate;
	    }
	    return ConditionalExpression;
	}());
	exports.ConditionalExpression = ConditionalExpression;
	var ContinueStatement = (function () {
	    function ContinueStatement(label) {
	        this.type = syntax_1.Syntax.ContinueStatement;
	        this.label = label;
	    }
	    return ContinueStatement;
	}());
	exports.ContinueStatement = ContinueStatement;
	var DebuggerStatement = (function () {
	    function DebuggerStatement() {
	        this.type = syntax_1.Syntax.DebuggerStatement;
	    }
	    return DebuggerStatement;
	}());
	exports.DebuggerStatement = DebuggerStatement;
	var Directive = (function () {
	    function Directive(expression, directive) {
	        this.type = syntax_1.Syntax.ExpressionStatement;
	        this.expression = expression;
	        this.directive = directive;
	    }
	    return Directive;
	}());
	exports.Directive = Directive;
	var DoWhileStatement = (function () {
	    function DoWhileStatement(body, test) {
	        this.type = syntax_1.Syntax.DoWhileStatement;
	        this.body = body;
	        this.test = test;
	    }
	    return DoWhileStatement;
	}());
	exports.DoWhileStatement = DoWhileStatement;
	var EmptyStatement = (function () {
	    function EmptyStatement() {
	        this.type = syntax_1.Syntax.EmptyStatement;
	    }
	    return EmptyStatement;
	}());
	exports.EmptyStatement = EmptyStatement;
	var ExportAllDeclaration = (function () {
	    function ExportAllDeclaration(source) {
	        this.type = syntax_1.Syntax.ExportAllDeclaration;
	        this.source = source;
	    }
	    return ExportAllDeclaration;
	}());
	exports.ExportAllDeclaration = ExportAllDeclaration;
	var ExportDefaultDeclaration = (function () {
	    function ExportDefaultDeclaration(declaration) {
	        this.type = syntax_1.Syntax.ExportDefaultDeclaration;
	        this.declaration = declaration;
	    }
	    return ExportDefaultDeclaration;
	}());
	exports.ExportDefaultDeclaration = ExportDefaultDeclaration;
	var ExportNamedDeclaration = (function () {
	    function ExportNamedDeclaration(declaration, specifiers, source) {
	        this.type = syntax_1.Syntax.ExportNamedDeclaration;
	        this.declaration = declaration;
	        this.specifiers = specifiers;
	        this.source = source;
	    }
	    return ExportNamedDeclaration;
	}());
	exports.ExportNamedDeclaration = ExportNamedDeclaration;
	var ExportSpecifier = (function () {
	    function ExportSpecifier(local, exported) {
	        this.type = syntax_1.Syntax.ExportSpecifier;
	        this.exported = exported;
	        this.local = local;
	    }
	    return ExportSpecifier;
	}());
	exports.ExportSpecifier = ExportSpecifier;
	var ExpressionStatement = (function () {
	    function ExpressionStatement(expression) {
	        this.type = syntax_1.Syntax.ExpressionStatement;
	        this.expression = expression;
	    }
	    return ExpressionStatement;
	}());
	exports.ExpressionStatement = ExpressionStatement;
	var ForInStatement = (function () {
	    function ForInStatement(left, right, body) {
	        this.type = syntax_1.Syntax.ForInStatement;
	        this.left = left;
	        this.right = right;
	        this.body = body;
	        this.each = false;
	    }
	    return ForInStatement;
	}());
	exports.ForInStatement = ForInStatement;
	var ForOfStatement = (function () {
	    function ForOfStatement(left, right, body) {
	        this.type = syntax_1.Syntax.ForOfStatement;
	        this.left = left;
	        this.right = right;
	        this.body = body;
	    }
	    return ForOfStatement;
	}());
	exports.ForOfStatement = ForOfStatement;
	var ForStatement = (function () {
	    function ForStatement(init, test, update, body) {
	        this.type = syntax_1.Syntax.ForStatement;
	        this.init = init;
	        this.test = test;
	        this.update = update;
	        this.body = body;
	    }
	    return ForStatement;
	}());
	exports.ForStatement = ForStatement;
	var FunctionDeclaration = (function () {
	    function FunctionDeclaration(id, params, body, generator) {
	        this.type = syntax_1.Syntax.FunctionDeclaration;
	        this.id = id;
	        this.params = params;
	        this.body = body;
	        this.generator = generator;
	        this.expression = false;
	        this.async = false;
	    }
	    return FunctionDeclaration;
	}());
	exports.FunctionDeclaration = FunctionDeclaration;
	var FunctionExpression = (function () {
	    function FunctionExpression(id, params, body, generator) {
	        this.type = syntax_1.Syntax.FunctionExpression;
	        this.id = id;
	        this.params = params;
	        this.body = body;
	        this.generator = generator;
	        this.expression = false;
	        this.async = false;
	    }
	    return FunctionExpression;
	}());
	exports.FunctionExpression = FunctionExpression;
	var Identifier = (function () {
	    function Identifier(name) {
	        this.type = syntax_1.Syntax.Identifier;
	        this.name = name;
	    }
	    return Identifier;
	}());
	exports.Identifier = Identifier;
	var IfStatement = (function () {
	    function IfStatement(test, consequent, alternate) {
	        this.type = syntax_1.Syntax.IfStatement;
	        this.test = test;
	        this.consequent = consequent;
	        this.alternate = alternate;
	    }
	    return IfStatement;
	}());
	exports.IfStatement = IfStatement;
	var ImportDeclaration = (function () {
	    function ImportDeclaration(specifiers, source) {
	        this.type = syntax_1.Syntax.ImportDeclaration;
	        this.specifiers = specifiers;
	        this.source = source;
	    }
	    return ImportDeclaration;
	}());
	exports.ImportDeclaration = ImportDeclaration;
	var ImportDefaultSpecifier = (function () {
	    function ImportDefaultSpecifier(local) {
	        this.type = syntax_1.Syntax.ImportDefaultSpecifier;
	        this.local = local;
	    }
	    return ImportDefaultSpecifier;
	}());
	exports.ImportDefaultSpecifier = ImportDefaultSpecifier;
	var ImportNamespaceSpecifier = (function () {
	    function ImportNamespaceSpecifier(local) {
	        this.type = syntax_1.Syntax.ImportNamespaceSpecifier;
	        this.local = local;
	    }
	    return ImportNamespaceSpecifier;
	}());
	exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier;
	var ImportSpecifier = (function () {
	    function ImportSpecifier(local, imported) {
	        this.type = syntax_1.Syntax.ImportSpecifier;
	        this.local = local;
	        this.imported = imported;
	    }
	    return ImportSpecifier;
	}());
	exports.ImportSpecifier = ImportSpecifier;
	var LabeledStatement = (function () {
	    function LabeledStatement(label, body) {
	        this.type = syntax_1.Syntax.LabeledStatement;
	        this.label = label;
	        this.body = body;
	    }
	    return LabeledStatement;
	}());
	exports.LabeledStatement = LabeledStatement;
	var Literal = (function () {
	    function Literal(value, raw) {
	        this.type = syntax_1.Syntax.Literal;
	        this.value = value;
	        this.raw = raw;
	    }
	    return Literal;
	}());
	exports.Literal = Literal;
	var MetaProperty = (function () {
	    function MetaProperty(meta, property) {
	        this.type = syntax_1.Syntax.MetaProperty;
	        this.meta = meta;
	        this.property = property;
	    }
	    return MetaProperty;
	}());
	exports.MetaProperty = MetaProperty;
	var MethodDefinition = (function () {
	    function MethodDefinition(key, computed, value, kind, isStatic) {
	        this.type = syntax_1.Syntax.MethodDefinition;
	        this.key = key;
	        this.computed = computed;
	        this.value = value;
	        this.kind = kind;
	        this.static = isStatic;
	    }
	    return MethodDefinition;
	}());
	exports.MethodDefinition = MethodDefinition;
	var Module = (function () {
	    function Module(body) {
	        this.type = syntax_1.Syntax.Program;
	        this.body = body;
	        this.sourceType = 'module';
	    }
	    return Module;
	}());
	exports.Module = Module;
	var NewExpression = (function () {
	    function NewExpression(callee, args) {
	        this.type = syntax_1.Syntax.NewExpression;
	        this.callee = callee;
	        this.arguments = args;
	    }
	    return NewExpression;
	}());
	exports.NewExpression = NewExpression;
	var ObjectExpression = (function () {
	    function ObjectExpression(properties) {
	        this.type = syntax_1.Syntax.ObjectExpression;
	        this.properties = properties;
	    }
	    return ObjectExpression;
	}());
	exports.ObjectExpression = ObjectExpression;
	var ObjectPattern = (function () {
	    function ObjectPattern(properties) {
	        this.type = syntax_1.Syntax.ObjectPattern;
	        this.properties = properties;
	    }
	    return ObjectPattern;
	}());
	exports.ObjectPattern = ObjectPattern;
	var Property = (function () {
	    function Property(kind, key, computed, value, method, shorthand) {
	        this.type = syntax_1.Syntax.Property;
	        this.key = key;
	        this.computed = computed;
	        this.value = value;
	        this.kind = kind;
	        this.method = method;
	        this.shorthand = shorthand;
	    }
	    return Property;
	}());
	exports.Property = Property;
	var RegexLiteral = (function () {
	    function RegexLiteral(value, raw, pattern, flags) {
	        this.type = syntax_1.Syntax.Literal;
	        this.value = value;
	        this.raw = raw;
	        this.regex = { pattern: pattern, flags: flags };
	    }
	    return RegexLiteral;
	}());
	exports.RegexLiteral = RegexLiteral;
	var RestElement = (function () {
	    function RestElement(argument) {
	        this.type = syntax_1.Syntax.RestElement;
	        this.argument = argument;
	    }
	    return RestElement;
	}());
	exports.RestElement = RestElement;
	var ReturnStatement = (function () {
	    function ReturnStatement(argument) {
	        this.type = syntax_1.Syntax.ReturnStatement;
	        this.argument = argument;
	    }
	    return ReturnStatement;
	}());
	exports.ReturnStatement = ReturnStatement;
	var Script = (function () {
	    function Script(body) {
	        this.type = syntax_1.Syntax.Program;
	        this.body = body;
	        this.sourceType = 'script';
	    }
	    return Script;
	}());
	exports.Script = Script;
	var SequenceExpression = (function () {
	    function SequenceExpression(expressions) {
	        this.type = syntax_1.Syntax.SequenceExpression;
	        this.expressions = expressions;
	    }
	    return SequenceExpression;
	}());
	exports.SequenceExpression = SequenceExpression;
	var SpreadElement = (function () {
	    function SpreadElement(argument) {
	        this.type = syntax_1.Syntax.SpreadElement;
	        this.argument = argument;
	    }
	    return SpreadElement;
	}());
	exports.SpreadElement = SpreadElement;
	var StaticMemberExpression = (function () {
	    function StaticMemberExpression(object, property) {
	        this.type = syntax_1.Syntax.MemberExpression;
	        this.computed = false;
	        this.object = object;
	        this.property = property;
	    }
	    return StaticMemberExpression;
	}());
	exports.StaticMemberExpression = StaticMemberExpression;
	var Super = (function () {
	    function Super() {
	        this.type = syntax_1.Syntax.Super;
	    }
	    return Super;
	}());
	exports.Super = Super;
	var SwitchCase = (function () {
	    function SwitchCase(test, consequent) {
	        this.type = syntax_1.Syntax.SwitchCase;
	        this.test = test;
	        this.consequent = consequent;
	    }
	    return SwitchCase;
	}());
	exports.SwitchCase = SwitchCase;
	var SwitchStatement = (function () {
	    function SwitchStatement(discriminant, cases) {
	        this.type = syntax_1.Syntax.SwitchStatement;
	        this.discriminant = discriminant;
	        this.cases = cases;
	    }
	    return SwitchStatement;
	}());
	exports.SwitchStatement = SwitchStatement;
	var TaggedTemplateExpression = (function () {
	    function TaggedTemplateExpression(tag, quasi) {
	        this.type = syntax_1.Syntax.TaggedTemplateExpression;
	        this.tag = tag;
	        this.quasi = quasi;
	    }
	    return TaggedTemplateExpression;
	}());
	exports.TaggedTemplateExpression = TaggedTemplateExpression;
	var TemplateElement = (function () {
	    function TemplateElement(value, tail) {
	        this.type = syntax_1.Syntax.TemplateElement;
	        this.value = value;
	        this.tail = tail;
	    }
	    return TemplateElement;
	}());
	exports.TemplateElement = TemplateElement;
	var TemplateLiteral = (function () {
	    function TemplateLiteral(quasis, expressions) {
	        this.type = syntax_1.Syntax.TemplateLiteral;
	        this.quasis = quasis;
	        this.expressions = expressions;
	    }
	    return TemplateLiteral;
	}());
	exports.TemplateLiteral = TemplateLiteral;
	var ThisExpression = (function () {
	    function ThisExpression() {
	        this.type = syntax_1.Syntax.ThisExpression;
	    }
	    return ThisExpression;
	}());
	exports.ThisExpression = ThisExpression;
	var ThrowStatement = (function () {
	    function ThrowStatement(argument) {
	        this.type = syntax_1.Syntax.ThrowStatement;
	        this.argument = argument;
	    }
	    return ThrowStatement;
	}());
	exports.ThrowStatement = ThrowStatement;
	var TryStatement = (function () {
	    function TryStatement(block, handler, finalizer) {
	        this.type = syntax_1.Syntax.TryStatement;
	        this.block = block;
	        this.handler = handler;
	        this.finalizer = finalizer;
	    }
	    return TryStatement;
	}());
	exports.TryStatement = TryStatement;
	var UnaryExpression = (function () {
	    function UnaryExpression(operator, argument) {
	        this.type = syntax_1.Syntax.UnaryExpression;
	        this.operator = operator;
	        this.argument = argument;
	        this.prefix = true;
	    }
	    return UnaryExpression;
	}());
	exports.UnaryExpression = UnaryExpression;
	var UpdateExpression = (function () {
	    function UpdateExpression(operator, argument, prefix) {
	        this.type = syntax_1.Syntax.UpdateExpression;
	        this.operator = operator;
	        this.argument = argument;
	        this.prefix = prefix;
	    }
	    return UpdateExpression;
	}());
	exports.UpdateExpression = UpdateExpression;
	var VariableDeclaration = (function () {
	    function VariableDeclaration(declarations, kind) {
	        this.type = syntax_1.Syntax.VariableDeclaration;
	        this.declarations = declarations;
	        this.kind = kind;
	    }
	    return VariableDeclaration;
	}());
	exports.VariableDeclaration = VariableDeclaration;
	var VariableDeclarator = (function () {
	    function VariableDeclarator(id, init) {
	        this.type = syntax_1.Syntax.VariableDeclarator;
	        this.id = id;
	        this.init = init;
	    }
	    return VariableDeclarator;
	}());
	exports.VariableDeclarator = VariableDeclarator;
	var WhileStatement = (function () {
	    function WhileStatement(test, body) {
	        this.type = syntax_1.Syntax.WhileStatement;
	        this.test = test;
	        this.body = body;
	    }
	    return WhileStatement;
	}());
	exports.WhileStatement = WhileStatement;
	var WithStatement = (function () {
	    function WithStatement(object, body) {
	        this.type = syntax_1.Syntax.WithStatement;
	        this.object = object;
	        this.body = body;
	    }
	    return WithStatement;
	}());
	exports.WithStatement = WithStatement;
	var YieldExpression = (function () {
	    function YieldExpression(argument, delegate) {
	        this.type = syntax_1.Syntax.YieldExpression;
	        this.argument = argument;
	        this.delegate = delegate;
	    }
	    return YieldExpression;
	}());
	exports.YieldExpression = YieldExpression;


/***/ },
/* 8 */
/***/ function(module, exports, __webpack_require__) {

	"use strict";
	Object.defineProperty(exports, "__esModule", { value: true });
	var assert_1 = __webpack_require__(9);
	var error_handler_1 = __webpack_require__(10);
	var messages_1 = __webpack_require__(11);
	var Node = __webpack_require__(7);
	var scanner_1 = __webpack_require__(12);
	var syntax_1 = __webpack_require__(2);
	var token_1 = __webpack_require__(13);
	var ArrowParameterPlaceHolder = 'ArrowParameterPlaceHolder';
	var Parser = (function () {
	    function Parser(code, options, delegate) {
	        if (options === void 0) { options = {}; }
	        this.config = {
	            range: (typeof options.range === 'boolean') && options.range,
	            loc: (typeof options.loc === 'boolean') && options.loc,
	            source: null,
	            tokens: (typeof options.tokens === 'boolean') && options.tokens,
	            comment: (typeof options.comment === 'boolean') && options.comment,
	            tolerant: (typeof options.tolerant === 'boolean') && options.tolerant
	        };
	        if (this.config.loc && options.source && options.source !== null) {
	            this.config.source = String(options.source);
	        }
	        this.delegate = delegate;
	        this.errorHandler = new error_handler_1.ErrorHandler();
	        this.errorHandler.tolerant = this.config.tolerant;
	        this.scanner = new scanner_1.Scanner(code, this.errorHandler);
	        this.scanner.trackComment = this.config.comment;
	        this.operatorPrecedence = {
	            ')': 0,
	            ';': 0,
	            ',': 0,
	            '=': 0,
	            ']': 0,
	            '||': 1,
	            '&&': 2,
	            '|': 3,
	            '^': 4,
	            '&': 5,
	            '==': 6,
	            '!=': 6,
	            '===': 6,
	            '!==': 6,
	            '<': 7,
	            '>': 7,
	            '<=': 7,
	            '>=': 7,
	            '<<': 8,
	            '>>': 8,
	            '>>>': 8,
	            '+': 9,
	            '-': 9,
	            '*': 11,
	            '/': 11,
	            '%': 11
	        };
	        this.lookahead = {
	            type: 2 /* EOF */,
	            value: '',
	            lineNumber: this.scanner.lineNumber,
	            lineStart: 0,
	            start: 0,
	            end: 0
	        };
	        this.hasLineTerminator = false;
	        this.context = {
	            isModule: false,
	            await: false,
	            allowIn: true,
	            allowStrictDirective: true,
	            allowYield: true,
	            firstCoverInitializedNameError: null,
	            isAssignmentTarget: false,
	            isBindingElement: false,
	            inFunctionBody: false,
	            inIteration: false,
	            inSwitch: false,
	            labelSet: {},
	            strict: false
	        };
	        this.tokens = [];
	        this.startMarker = {
	            index: 0,
	            line: this.scanner.lineNumber,
	            column: 0
	        };
	        this.lastMarker = {
	            index: 0,
	            line: this.scanner.lineNumber,
	            column: 0
	        };
	        this.nextToken();
	        this.lastMarker = {
	            index: this.scanner.index,
	            line: this.scanner.lineNumber,
	            column: this.scanner.index - this.scanner.lineStart
	        };
	    }
	    Parser.prototype.throwError = function (messageFormat) {
	        var values = [];
	        for (var _i = 1; _i < arguments.length; _i++) {
	            values[_i - 1] = arguments[_i];
	        }
	        var args = Array.prototype.slice.call(arguments, 1);
	        var msg = messageFormat.replace(/%(\d)/g, function (whole, idx) {
	            assert_1.assert(idx < args.length, 'Message reference must be in range');
	            return args[idx];
	        });
	        var index = this.lastMarker.index;
	        var line = this.lastMarker.line;
	        var column = this.lastMarker.column + 1;
	        throw this.errorHandler.createError(index, line, column, msg);
	    };
	    Parser.prototype.tolerateError = function (messageFormat) {
	        var values = [];
	        for (var _i = 1; _i < arguments.length; _i++) {
	            values[_i - 1] = arguments[_i];
	        }
	        var args = Array.prototype.slice.call(arguments, 1);
	        var msg = messageFormat.replace(/%(\d)/g, function (whole, idx) {
	            assert_1.assert(idx < args.length, 'Message reference must be in range');
	            return args[idx];
	        });
	        var index = this.lastMarker.index;
	        var line = this.scanner.lineNumber;
	        var column = this.lastMarker.column + 1;
	        this.errorHandler.tolerateError(index, line, column, msg);
	    };
	    // Throw an exception because of the token.
	    Parser.prototype.unexpectedTokenError = function (token, message) {
	        var msg = message || messages_1.Messages.UnexpectedToken;
	        var value;
	        if (token) {
	            if (!message) {
	                msg = (token.type === 2 /* EOF */) ? messages_1.Messages.UnexpectedEOS :
	                    (token.type === 3 /* Identifier */) ? messages_1.Messages.UnexpectedIdentifier :
	                        (token.type === 6 /* NumericLiteral */) ? messages_1.Messages.UnexpectedNumber :
	                            (token.type === 8 /* StringLiteral */) ? messages_1.Messages.UnexpectedString :
	                                (token.type === 10 /* Template */) ? messages_1.Messages.UnexpectedTemplate :
	                                    messages_1.Messages.UnexpectedToken;
	                if (token.type === 4 /* Keyword */) {
	                    if (this.scanner.isFutureReservedWord(token.value)) {
	                        msg = messages_1.Messages.UnexpectedReserved;
	                    }
	                    else if (this.context.strict && this.scanner.isStrictModeReservedWord(token.value)) {
	                        msg = messages_1.Messages.StrictReservedWord;
	                    }
	                }
	            }
	            value = token.value;
	        }
	        else {
	            value = 'ILLEGAL';
	        }
	        msg = msg.replace('%0', value);
	        if (token && typeof token.lineNumber === 'number') {
	            var index = token.start;
	            var line = token.lineNumber;
	            var lastMarkerLineStart = this.lastMarker.index - this.lastMarker.column;
	            var column = token.start - lastMarkerLineStart + 1;
	            return this.errorHandler.createError(index, line, column, msg);
	        }
	        else {
	            var index = this.lastMarker.index;
	            var line = this.lastMarker.line;
	            var column = this.lastMarker.column + 1;
	            return this.errorHandler.createError(index, line, column, msg);
	        }
	    };
	    Parser.prototype.throwUnexpectedToken = function (token, message) {
	        throw this.unexpectedTokenError(token, message);
	    };
	    Parser.prototype.tolerateUnexpectedToken = function (token, message) {
	        this.errorHandler.tolerate(this.unexpectedTokenError(token, message));
	    };
	    Parser.prototype.collectComments = function () {
	        if (!this.config.comment) {
	            this.scanner.scanComments();
	        }
	        else {
	            var comments = this.scanner.scanComments();
	            if (comments.length > 0 && this.delegate) {
	                for (var i = 0; i < comments.length; ++i) {
	                    var e = comments[i];
	                    var node = void 0;
	                    node = {
	                        type: e.multiLine ? 'BlockComment' : 'LineComment',
	                        value: this.scanner.source.slice(e.slice[0], e.slice[1])
	                    };
	                    if (this.config.range) {
	                        node.range = e.range;
	                    }
	                    if (this.config.loc) {
	                        node.loc = e.loc;
	                    }
	                    var metadata = {
	                        start: {
	                            line: e.loc.start.line,
	                            column: e.loc.start.column,
	                            offset: e.range[0]
	                        },
	                        end: {
	                            line: e.loc.end.line,
	                            column: e.loc.end.column,
	                            offset: e.range[1]
	                        }
	                    };
	                    this.delegate(node, metadata);
	                }
	            }
	        }
	    };
	    // From internal representation to an external structure
	    Parser.prototype.getTokenRaw = function (token) {
	        return this.scanner.source.slice(token.start, token.end);
	    };
	    Parser.prototype.convertToken = function (token) {
	        var t = {
	            type: token_1.TokenName[token.type],
	            value: this.getTokenRaw(token)
	        };
	        if (this.config.range) {
	            t.range = [token.start, token.end];
	        }
	        if (this.config.loc) {
	            t.loc = {
	                start: {
	                    line: this.startMarker.line,
	                    column: this.startMarker.column
	                },
	                end: {
	                    line: this.scanner.lineNumber,
	                    column: this.scanner.index - this.scanner.lineStart
	                }
	            };
	        }
	        if (token.type === 9 /* RegularExpression */) {
	            var pattern = token.pattern;
	            var flags = token.flags;
	            t.regex = { pattern: pattern, flags: flags };
	        }
	        return t;
	    };
	    Parser.prototype.nextToken = function () {
	        var token = this.lookahead;
	        this.lastMarker.index = this.scanner.index;
	        this.lastMarker.line = this.scanner.lineNumber;
	        this.lastMarker.column = this.scanner.index - this.scanner.lineStart;
	        this.collectComments();
	        if (this.scanner.index !== this.startMarker.index) {
	            this.startMarker.index = this.scanner.index;
	            this.startMarker.line = this.scanner.lineNumber;
	            this.startMarker.column = this.scanner.index - this.scanner.lineStart;
	        }
	        var next = this.scanner.lex();
	        this.hasLineTerminator = (token.lineNumber !== next.lineNumber);
	        if (next && this.context.strict && next.type === 3 /* Identifier */) {
	            if (this.scanner.isStrictModeReservedWord(next.value)) {
	                next.type = 4 /* Keyword */;
	            }
	        }
	        this.lookahead = next;
	        if (this.config.tokens && next.type !== 2 /* EOF */) {
	            this.tokens.push(this.convertToken(next));
	        }
	        return token;
	    };
	    Parser.prototype.nextRegexToken = function () {
	        this.collectComments();
	        var token = this.scanner.scanRegExp();
	        if (this.config.tokens) {
	            // Pop the previous token, '/' or '/='
	            // This is added from the lookahead token.
	            this.tokens.pop();
	            this.tokens.push(this.convertToken(token));
	        }
	        // Prime the next lookahead.
	        this.lookahead = token;
	        this.nextToken();
	        return token;
	    };
	    Parser.prototype.createNode = function () {
	        return {
	            index: this.startMarker.index,
	            line: this.startMarker.line,
	            column: this.startMarker.column
	        };
	    };
	    Parser.prototype.startNode = function (token, lastLineStart) {
	        if (lastLineStart === void 0) { lastLineStart = 0; }
	        var column = token.start - token.lineStart;
	        var line = token.lineNumber;
	        if (column < 0) {
	            column += lastLineStart;
	            line--;
	        }
	        return {
	            index: token.start,
	            line: line,
	            column: column
	        };
	    };
	    Parser.prototype.finalize = function (marker, node) {
	        if (this.config.range) {
	            node.range = [marker.index, this.lastMarker.index];
	        }
	        if (this.config.loc) {
	            node.loc = {
	                start: {
	                    line: marker.line,
	                    column: marker.column,
	                },
	                end: {
	                    line: this.lastMarker.line,
	                    column: this.lastMarker.column
	                }
	            };
	            if (this.config.source) {
	                node.loc.source = this.config.source;
	            }
	        }
	        if (this.delegate) {
	            var metadata = {
	                start: {
	                    line: marker.line,
	                    column: marker.column,
	                    offset: marker.index
	                },
	                end: {
	                    line: this.lastMarker.line,
	                    column: this.lastMarker.column,
	                    offset: this.lastMarker.index
	                }
	            };
	            this.delegate(node, metadata);
	        }
	        return node;
	    };
	    // Expect the next token to match the specified punctuator.
	    // If not, an exception will be thrown.
	    Parser.prototype.expect = function (value) {
	        var token = this.nextToken();
	        if (token.type !== 7 /* Punctuator */ || token.value !== value) {
	            this.throwUnexpectedToken(token);
	        }
	    };
	    // Quietly expect a comma when in tolerant mode, otherwise delegates to expect().
	    Parser.prototype.expectCommaSeparator = function () {
	        if (this.config.tolerant) {
	            var token = this.lookahead;
	            if (token.type === 7 /* Punctuator */ && token.value === ',') {
	                this.nextToken();
	            }
	            else if (token.type === 7 /* Punctuator */ && token.value === ';') {
	                this.nextToken();
	                this.tolerateUnexpectedToken(token);
	            }
	            else {
	                this.tolerateUnexpectedToken(token, messages_1.Messages.UnexpectedToken);
	            }
	        }
	        else {
	            this.expect(',');
	        }
	    };
	    // Expect the next token to match the specified keyword.
	    // If not, an exception will be thrown.
	    Parser.prototype.expectKeyword = function (keyword) {
	        var token = this.nextToken();
	        if (token.type !== 4 /* Keyword */ || token.value !== keyword) {
	            this.throwUnexpectedToken(token);
	        }
	    };
	    // Return true if the next token matches the specified punctuator.
	    Parser.prototype.match = function (value) {
	        return this.lookahead.type === 7 /* Punctuator */ && this.lookahead.value === value;
	    };
	    // Return true if the next token matches the specified keyword
	    Parser.prototype.matchKeyword = function (keyword) {
	        return this.lookahead.type === 4 /* Keyword */ && this.lookahead.value === keyword;
	    };
	    // Return true if the next token matches the specified contextual keyword
	    // (where an identifier is sometimes a keyword depending on the context)
	    Parser.prototype.matchContextualKeyword = function (keyword) {
	        return this.lookahead.type === 3 /* Identifier */ && this.lookahead.value === keyword;
	    };
	    // Return true if the next token is an assignment operator
	    Parser.prototype.matchAssign = function () {
	        if (this.lookahead.type !== 7 /* Punctuator */) {
	            return false;
	        }
	        var op = this.lookahead.value;
	        return op === '=' ||
	            op === '*=' ||
	            op === '**=' ||
	            op === '/=' ||
	            op === '%=' ||
	            op === '+=' ||
	            op === '-=' ||
	            op === '<<=' ||
	            op === '>>=' ||
	            op === '>>>=' ||
	            op === '&=' ||
	            op === '^=' ||
	            op === '|=';
	    };
	    // Cover grammar support.
	    //
	    // When an assignment expression position starts with an left parenthesis, the determination of the type
	    // of the syntax is to be deferred arbitrarily long until the end of the parentheses pair (plus a lookahead)
	    // or the first comma. This situation also defers the determination of all the expressions nested in the pair.
	    //
	    // There are three productions that can be parsed in a parentheses pair that needs to be determined
	    // after the outermost pair is closed. They are:
	    //
	    //   1. AssignmentExpression
	    //   2. BindingElements
	    //   3. AssignmentTargets
	    //
	    // In order to avoid exponential backtracking, we use two flags to denote if the production can be
	    // binding element or assignment target.
	    //
	    // The three productions have the relationship:
	    //
	    //   BindingElements âŠ† AssignmentTargets âŠ† AssignmentExpression
	    //
	    // with a single exception that CoverInitializedName when used directly in an Expression, generates
	    // an early error. Therefore, we need the third state, firstCoverInitializedNameError, to track the
	    // first usage of CoverInitializedName and report it when we reached the end of the parentheses pair.
	    //
	    // isolateCoverGrammar function runs the given parser function with a new cover grammar context, and it does not
	    // effect the current flags. This means the production the parser parses is only used as an expression. Therefore
	    // the CoverInitializedName check is conducted.
	    //
	    // inheritCoverGrammar function runs the given parse function with a new cover grammar context, and it propagates
	    // the flags outside of the parser. This means the production the parser parses is used as a part of a potential
	    // pattern. The CoverInitializedName check is deferred.
	    Parser.prototype.isolateCoverGrammar = function (parseFunction) {
	        var previousIsBindingElement = this.context.isBindingElement;
	        var previousIsAssignmentTarget = this.context.isAssignmentTarget;
	        var previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError;
	        this.context.isBindingElement = true;
	        this.context.isAssignmentTarget = true;
	        this.context.firstCoverInitializedNameError = null;
	        var result = parseFunction.call(this);
	        if (this.context.firstCoverInitializedNameError !== null) {
	            this.throwUnexpectedToken(this.context.firstCoverInitializedNameError);
	        }
	        this.context.isBindingElement = previousIsBindingElement;
	        this.context.isAssignmentTarget = previousIsAssignmentTarget;
	        this.context.firstCoverInitializedNameError = previousFirstCoverInitializedNameError;
	        return result;
	    };
	    Parser.prototype.inheritCoverGrammar = function (parseFunction) {
	        var previousIsBindingElement = this.context.isBindingElement;
	        var previousIsAssignmentTarget = this.context.isAssignmentTarget;
	        var previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError;
	        this.context.isBindingElement = true;
	        this.context.isAssignmentTarget = true;
	        this.context.firstCoverInitializedNameError = null;
	        var result = parseFunction.call(this);
	        this.context.isBindingElement = this.context.isBindingElement && previousIsBindingElement;
	        this.context.isAssignmentTarget = this.context.isAssignmentTarget && previousIsAssignmentTarget;
	        this.context.firstCoverInitializedNameError = previousFirstCoverInitializedNameError || this.context.firstCoverInitializedNameError;
	        return result;
	    };
	    Parser.prototype.consumeSemicolon = function () {
	        if (this.match(';')) {
	            this.nextToken();
	        }
	        else if (!this.hasLineTerminator) {
	            if (this.lookahead.type !== 2 /* EOF */ && !this.match('}')) {
	                this.throwUnexpectedToken(this.lookahead);
	            }
	            this.lastMarker.index = this.startMarker.index;
	            this.lastMarker.line = this.startMarker.line;
	            this.lastMarker.column = this.startMarker.column;
	        }
	    };
	    // https://tc39.github.io/ecma262/#sec-primary-expression
	    Parser.prototype.parsePrimaryExpression = function () {
	        var node = this.createNode();
	        var expr;
	        var token, raw;
	        switch (this.lookahead.type) {
	            case 3 /* Identifier */:
	                if ((this.context.isModule || this.context.await) && this.lookahead.value === 'await') {
	                    this.tolerateUnexpectedToken(this.lookahead);
	                }
	                expr = this.matchAsyncFunction() ? this.parseFunctionExpression() : this.finalize(node, new Node.Identifier(this.nextToken().value));
	                break;
	            case 6 /* NumericLiteral */:
	            case 8 /* StringLiteral */:
	                if (this.context.strict && this.lookahead.octal) {
	                    this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.StrictOctalLiteral);
	                }
	                this.context.isAssignmentTarget = false;
	                this.context.isBindingElement = false;
	                token = this.nextToken();
	                raw = this.getTokenRaw(token);
	                expr = this.finalize(node, new Node.Literal(token.value, raw));
	                break;
	            case 1 /* BooleanLiteral */:
	                this.context.isAssignmentTarget = false;
	                this.context.isBindingElement = false;
	                token = this.nextToken();
	                raw = this.getTokenRaw(token);
	                expr = this.finalize(node, new Node.Literal(token.value === 'true', raw));
	                break;
	            case 5 /* NullLiteral */:
	                this.context.isAssignmentTarget = false;
	                this.context.isBindingElement = false;
	                token = this.nextToken();
	                raw = this.getTokenRaw(token);
	                expr = this.finalize(node, new Node.Literal(null, raw));
	                break;
	            case 10 /* Template */:
	                expr = this.parseTemplateLiteral();
	                break;
	            case 7 /* Punctuator */:
	                switch (this.lookahead.value) {
	                    case '(':
	                        this.context.isBindingElement = false;
	                        expr = this.inheritCoverGrammar(this.parseGroupExpression);
	                        break;
	                    case '[':
	                        expr = this.inheritCoverGrammar(this.parseArrayInitializer);
	                        break;
	                    case '{':
	                        expr = this.inheritCoverGrammar(this.parseObjectInitializer);
	                        break;
	                    case '/':
	                    case '/=':
	                        this.context.isAssignmentTarget = false;
	                        this.context.isBindingElement = false;
	                        this.scanner.index = this.startMarker.index;
	                        token = this.nextRegexToken();
	                        raw = this.getTokenRaw(token);
	                        expr = this.finalize(node, new Node.RegexLiteral(token.regex, raw, token.pattern, token.flags));
	                        break;
	                    default:
	                        expr = this.throwUnexpectedToken(this.nextToken());
	                }
	                break;
	            case 4 /* Keyword */:
	                if (!this.context.strict && this.context.allowYield && this.matchKeyword('yield')) {
	                    expr = this.parseIdentifierName();
	                }
	                else if (!this.context.strict && this.matchKeyword('let')) {
	                    expr = this.finalize(node, new Node.Identifier(this.nextToken().value));
	                }
	                else {
	                    this.context.isAssignmentTarget = false;
	                    this.context.isBindingElement = false;
	                    if (this.matchKeyword('function')) {
	                        expr = this.parseFunctionExpression();
	                    }
	                    else if (this.matchKeyword('this')) {
	                        this.nextToken();
	                        expr = this.finalize(node, new Node.ThisExpression());
	                    }
	                    else if (this.matchKeyword('class')) {
	                        expr = this.parseClassExpression();
	                    }
	                    else {
	                        expr = this.throwUnexpectedToken(this.nextToken());
	                    }
	                }
	                break;
	            default:
	                expr = this.throwUnexpectedToken(this.nextToken());
	        }
	        return expr;
	    };
	    // https://tc39.github.io/ecma262/#sec-array-initializer
	    Parser.prototype.parseSpreadElement = function () {
	        var node = this.createNode();
	        this.expect('...');
	        var arg = this.inheritCoverGrammar(this.parseAssignmentExpression);
	        return this.finalize(node, new Node.SpreadElement(arg));
	    };
	    Parser.prototype.parseArrayInitializer = function () {
	        var node = this.createNode();
	        var elements = [];
	        this.expect('[');
	        while (!this.match(']')) {
	            if (this.match(',')) {
	                this.nextToken();
	                elements.push(null);
	            }
	            else if (this.match('...')) {
	                var element = this.parseSpreadElement();
	                if (!this.match(']')) {
	                    this.context.isAssignmentTarget = false;
	                    this.context.isBindingElement = false;
	                    this.expect(',');
	                }
	                elements.push(element);
	            }
	            else {
	                elements.push(this.inheritCoverGrammar(this.parseAssignmentExpression));
	                if (!this.match(']')) {
	                    this.expect(',');
	                }
	            }
	        }
	        this.expect(']');
	        return this.finalize(node, new Node.ArrayExpression(elements));
	    };
	    // https://tc39.github.io/ecma262/#sec-object-initializer
	    Parser.prototype.parsePropertyMethod = function (params) {
	        this.context.isAssignmentTarget = false;
	        this.context.isBindingElement = false;
	        var previousStrict = this.context.strict;
	        var previousAllowStrictDirective = this.context.allowStrictDirective;
	        this.context.allowStrictDirective = params.simple;
	        var body = this.isolateCoverGrammar(this.parseFunctionSourceElements);
	        if (this.context.strict && params.firstRestricted) {
	            this.tolerateUnexpectedToken(params.firstRestricted, params.message);
	        }
	        if (this.context.strict && params.stricted) {
	            this.tolerateUnexpectedToken(params.stricted, params.message);
	        }
	        this.context.strict = previousStrict;
	        this.context.allowStrictDirective = previousAllowStrictDirective;
	        return body;
	    };
	    Parser.prototype.parsePropertyMethodFunction = function () {
	        var isGenerator = false;
	        var node = this.createNode();
	        var previousAllowYield = this.context.allowYield;
	        this.context.allowYield = true;
	        var params = this.parseFormalParameters();
	        var method = this.parsePropertyMethod(params);
	        this.context.allowYield = previousAllowYield;
	        return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator));
	    };
	    Parser.prototype.parsePropertyMethodAsyncFunction = function () {
	        var node = this.createNode();
	        var previousAllowYield = this.context.allowYield;
	        var previousAwait = this.context.await;
	        this.context.allowYield = false;
	        this.context.await = true;
	        var params = this.parseFormalParameters();
	        var method = this.parsePropertyMethod(params);
	        this.context.allowYield = previousAllowYield;
	        this.context.await = previousAwait;
	        return this.finalize(node, new Node.AsyncFunctionExpression(null, params.params, method));
	    };
	    Parser.prototype.parseObjectPropertyKey = function () {
	        var node = this.createNode();
	        var token = this.nextToken();
	        var key;
	        switch (token.type) {
	            case 8 /* StringLiteral */:
	            case 6 /* NumericLiteral */:
	                if (this.context.strict && token.octal) {
	                    this.tolerateUnexpectedToken(token, messages_1.Messages.StrictOctalLiteral);
	                }
	                var raw = this.getTokenRaw(token);
	                key = this.finalize(node, new Node.Literal(token.value, raw));
	                break;
	            case 3 /* Identifier */:
	            case 1 /* BooleanLiteral */:
	            case 5 /* NullLiteral */:
	            case 4 /* Keyword */:
	                key = this.finalize(node, new Node.Identifier(token.value));
	                break;
	            case 7 /* Punctuator */:
	                if (token.value === '[') {
	                    key = this.isolateCoverGrammar(this.parseAssignmentExpression);
	                    this.expect(']');
	                }
	                else {
	                    key = this.throwUnexpectedToken(token);
	                }
	                break;
	            default:
	                key = this.throwUnexpectedToken(token);
	        }
	        return key;
	    };
	    Parser.prototype.isPropertyKey = function (key, value) {
	        return (key.type === syntax_1.Syntax.Identifier && key.name === value) ||
	            (key.type === syntax_1.Syntax.Literal && key.value === value);
	    };
	    Parser.prototype.parseObjectProperty = function (hasProto) {
	        var node = this.createNode();
	        var token = this.lookahead;
	        var kind;
	        var key = null;
	        var value = null;
	        var computed = false;
	        var method = false;
	        var shorthand = false;
	        var isAsync = false;
	        if (token.type === 3 /* Identifier */) {
	            var id = token.value;
	            this.nextToken();
	            computed = this.match('[');
	            isAsync = !this.hasLineTerminator && (id === 'async') &&
	                !this.match(':') && !this.match('(') && !this.match('*') && !this.match(',');
	            key = isAsync ? this.parseObjectPropertyKey() : this.finalize(node, new Node.Identifier(id));
	        }
	        else if (this.match('*')) {
	            this.nextToken();
	        }
	        else {
	            computed = this.match('[');
	            key = this.parseObjectPropertyKey();
	        }
	        var lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead);
	        if (token.type === 3 /* Identifier */ && !isAsync && token.value === 'get' && lookaheadPropertyKey) {
	            kind = 'get';
	            computed = this.match('[');
	            key = this.parseObjectPropertyKey();
	            this.context.allowYield = false;
	            value = this.parseGetterMethod();
	        }
	        else if (token.type === 3 /* Identifier */ && !isAsync && token.value === 'set' && lookaheadPropertyKey) {
	            kind = 'set';
	            computed = this.match('[');
	            key = this.parseObjectPropertyKey();
	            value = this.parseSetterMethod();
	        }
	        else if (token.type === 7 /* Punctuator */ && token.value === '*' && lookaheadPropertyKey) {
	            kind = 'init';
	            computed = this.match('[');
	            key = this.parseObjectPropertyKey();
	            value = this.parseGeneratorMethod();
	            method = true;
	        }
	        else {
	            if (!key) {
	                this.throwUnexpectedToken(this.lookahead);
	            }
	            kind = 'init';
	            if (this.match(':') && !isAsync) {
	                if (!computed && this.isPropertyKey(key, '__proto__')) {
	                    if (hasProto.value) {
	                        this.tolerateError(messages_1.Messages.DuplicateProtoProperty);
	                    }
	                    hasProto.value = true;
	                }
	                this.nextToken();
	                value = this.inheritCoverGrammar(this.parseAssignmentExpression);
	            }
	            else if (this.match('(')) {
	                value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction();
	                method = true;
	            }
	            else if (token.type === 3 /* Identifier */) {
	                var id = this.finalize(node, new Node.Identifier(token.value));
	                if (this.match('=')) {
	                    this.context.firstCoverInitializedNameError = this.lookahead;
	                    this.nextToken();
	                    shorthand = true;
	                    var init = this.isolateCoverGrammar(this.parseAssignmentExpression);
	                    value = this.finalize(node, new Node.AssignmentPattern(id, init));
	                }
	                else {
	                    shorthand = true;
	                    value = id;
	                }
	            }
	            else {
	                this.throwUnexpectedToken(this.nextToken());
	            }
	        }
	        return this.finalize(node, new Node.Property(kind, key, computed, value, method, shorthand));
	    };
	    Parser.prototype.parseObjectInitializer = function () {
	        var node = this.createNode();
	        this.expect('{');
	        var properties = [];
	        var hasProto = { value: false };
	        while (!this.match('}')) {
	            properties.push(this.parseObjectProperty(hasProto));
	            if (!this.match('}')) {
	                this.expectCommaSeparator();
	            }
	        }
	        this.expect('}');
	        return this.finalize(node, new Node.ObjectExpression(properties));
	    };
	    // https://tc39.github.io/ecma262/#sec-template-literals
	    Parser.prototype.parseTemplateHead = function () {
	        assert_1.assert(this.lookahead.head, 'Template literal must start with a template head');
	        var node = this.createNode();
	        var token = this.nextToken();
	        var raw = token.value;
	        var cooked = token.cooked;
	        return this.finalize(node, new Node.TemplateElement({ raw: raw, cooked: cooked }, token.tail));
	    };
	    Parser.prototype.parseTemplateElement = function () {
	        if (this.lookahead.type !== 10 /* Template */) {
	            this.throwUnexpectedToken();
	        }
	        var node = this.createNode();
	        var token = this.nextToken();
	        var raw = token.value;
	        var cooked = token.cooked;
	        return this.finalize(node, new Node.TemplateElement({ raw: raw, cooked: cooked }, token.tail));
	    };
	    Parser.prototype.parseTemplateLiteral = function () {
	        var node = this.createNode();
	        var expressions = [];
	        var quasis = [];
	        var quasi = this.parseTemplateHead();
	        quasis.push(quasi);
	        while (!quasi.tail) {
	            expressions.push(this.parseExpression());
	            quasi = this.parseTemplateElement();
	            quasis.push(quasi);
	        }
	        return this.finalize(node, new Node.TemplateLiteral(quasis, expressions));
	    };
	    // https://tc39.github.io/ecma262/#sec-grouping-operator
	    Parser.prototype.reinterpretExpressionAsPattern = function (expr) {
	        switch (expr.type) {
	            case syntax_1.Syntax.Identifier:
	            case syntax_1.Syntax.MemberExpression:
	            case syntax_1.Syntax.RestElement:
	            case syntax_1.Syntax.AssignmentPattern:
	                break;
	            case syntax_1.Syntax.SpreadElement:
	                expr.type = syntax_1.Syntax.RestElement;
	                this.reinterpretExpressionAsPattern(expr.argument);
	                break;
	            case syntax_1.Syntax.ArrayExpression:
	                expr.type = syntax_1.Syntax.ArrayPattern;
	                for (var i = 0; i < expr.elements.length; i++) {
	                    if (expr.elements[i] !== null) {
	                        this.reinterpretExpressionAsPattern(expr.elements[i]);
	                    }
	                }
	                break;
	            case syntax_1.Syntax.ObjectExpression:
	                expr.type = syntax_1.Syntax.ObjectPattern;
	                for (var i = 0; i < expr.properties.length; i++) {
	                    this.reinterpretExpressionAsPattern(expr.properties[i].value);
	                }
	                break;
	            case syntax_1.Syntax.AssignmentExpression:
	                expr.type = syntax_1.Syntax.AssignmentPattern;
	                delete expr.operator;
	                this.reinterpretExpressionAsPattern(expr.left);
	                break;
	            default:
	                // Allow other node type for tolerant parsing.
	                break;
	        }
	    };
	    Parser.prototype.parseGroupExpression = function () {
	        var expr;
	        this.expect('(');
	        if (this.match(')')) {
	            this.nextToken();
	            if (!this.match('=>')) {
	                this.expect('=>');
	            }
	            expr = {
	                type: ArrowParameterPlaceHolder,
	                params: [],
	                async: false
	            };
	        }
	        else {
	            var startToken = this.lookahead;
	            var params = [];
	            if (this.match('...')) {
	                expr = this.parseRestElement(params);
	                this.expect(')');
	                if (!this.match('=>')) {
	                    this.expect('=>');
	                }
	                expr = {
	                    type: ArrowParameterPlaceHolder,
	                    params: [expr],
	                    async: false
	                };
	            }
	            else {
	                var arrow = false;
	                this.context.isBindingElement = true;
	                expr = this.inheritCoverGrammar(this.parseAssignmentExpression);
	                if (this.match(',')) {
	                    var expressions = [];
	                    this.context.isAssignmentTarget = false;
	                    expressions.push(expr);
	                    while (this.lookahead.type !== 2 /* EOF */) {
	                        if (!this.match(',')) {
	                            break;
	                        }
	                        this.nextToken();
	                        if (this.match(')')) {
	                            this.nextToken();
	                            for (var i = 0; i < expressions.length; i++) {
	                                this.reinterpretExpressionAsPattern(expressions[i]);
	                            }
	                            arrow = true;
	                            expr = {
	                                type: ArrowParameterPlaceHolder,
	                                params: expressions,
	                                async: false
	                            };
	                        }
	                        else if (this.match('...')) {
	                            if (!this.context.isBindingElement) {
	                                this.throwUnexpectedToken(this.lookahead);
	                            }
	                            expressions.push(this.parseRestElement(params));
	                            this.expect(')');
	                            if (!this.match('=>')) {
	                                this.expect('=>');
	                            }
	                            this.context.isBindingElement = false;
	                            for (var i = 0; i < expressions.length; i++) {
	                                this.reinterpretExpressionAsPattern(expressions[i]);
	                            }
	                            arrow = true;
	                            expr = {
	                                type: ArrowParameterPlaceHolder,
	                                params: expressions,
	                                async: false
	                            };
	                        }
	                        else {
	                            expressions.push(this.inheritCoverGrammar(this.parseAssignmentExpression));
	                        }
	                        if (arrow) {
	                            break;
	                        }
	                    }
	                    if (!arrow) {
	                        expr = this.finalize(this.startNode(startToken), new Node.SequenceExpression(expressions));
	                    }
	                }
	                if (!arrow) {
	                    this.expect(')');
	                    if (this.match('=>')) {
	                        if (expr.type === syntax_1.Syntax.Identifier && expr.name === 'yield') {
	                            arrow = true;
	                            expr = {
	                                type: ArrowParameterPlaceHolder,
	                                params: [expr],
	                                async: false
	                            };
	                        }
	                        if (!arrow) {
	                            if (!this.context.isBindingElement) {
	                                this.throwUnexpectedToken(this.lookahead);
	                            }
	                            if (expr.type === syntax_1.Syntax.SequenceExpression) {
	                                for (var i = 0; i < expr.expressions.length; i++) {
	                                    this.reinterpretExpressionAsPattern(expr.expressions[i]);
	                                }
	                            }
	                            else {
	                                this.reinterpretExpressionAsPattern(expr);
	                            }
	                            var parameters = (expr.type === syntax_1.Syntax.SequenceExpression ? expr.expressions : [expr]);
	                            expr = {
	                                type: ArrowParameterPlaceHolder,
	                                params: parameters,
	                                async: false
	                            };
	                        }
	                    }
	                    this.context.isBindingElement = false;
	                }
	            }
	        }
	        return expr;
	    };
	    // https://tc39.github.io/ecma262/#sec-left-hand-side-expressions
	    Parser.prototype.parseArguments = function () {
	        this.expect('(');
	        var args = [];
	        if (!this.match(')')) {
	            while (true) {
	                var expr = this.match('...') ? this.parseSpreadElement() :
	                    this.isolateCoverGrammar(this.parseAssignmentExpression);
	                args.push(expr);
	                if (this.match(')')) {
	                    break;
	                }
	                this.expectCommaSeparator();
	                if (this.match(')')) {
	                    break;
	                }
	            }
	        }
	        this.expect(')');
	        return args;
	    };
	    Parser.prototype.isIdentifierName = function (token) {
	        return token.type === 3 /* Identifier */ ||
	            token.type === 4 /* Keyword */ ||
	            token.type === 1 /* BooleanLiteral */ ||
	            token.type === 5 /* NullLiteral */;
	    };
	    Parser.prototype.parseIdentifierName = function () {
	        var node = this.createNode();
	        var token = this.nextToken();
	        if (!this.isIdentifierName(token)) {
	            this.throwUnexpectedToken(token);
	        }
	        return this.finalize(node, new Node.Identifier(token.value));
	    };
	    Parser.prototype.parseNewExpression = function () {
	        var node = this.createNode();
	        var id = this.parseIdentifierName();
	        assert_1.assert(id.name === 'new', 'New expression must start with `new`');
	        var expr;
	        if (this.match('.')) {
	            this.nextToken();
	            if (this.lookahead.type === 3 /* Identifier */ && this.context.inFunctionBody && this.lookahead.value === 'target') {
	                var property = this.parseIdentifierName();
	                expr = new Node.MetaProperty(id, property);
	            }
	            else {
	                this.throwUnexpectedToken(this.lookahead);
	            }
	        }
	        else {
	            var callee = this.isolateCoverGrammar(this.parseLeftHandSideExpression);
	            var args = this.match('(') ? this.parseArguments() : [];
	            expr = new Node.NewExpression(callee, args);
	            this.context.isAssignmentTarget = false;
	            this.context.isBindingElement = false;
	        }
	        return this.finalize(node, expr);
	    };
	    Parser.prototype.parseAsyncArgument = function () {
	        var arg = this.parseAssignmentExpression();
	        this.context.firstCoverInitializedNameError = null;
	        return arg;
	    };
	    Parser.prototype.parseAsyncArguments = function () {
	        this.expect('(');
	        var args = [];
	        if (!this.match(')')) {
	            while (true) {
	                var expr = this.match('...') ? this.parseSpreadElement() :
	                    this.isolateCoverGrammar(this.parseAsyncArgument);
	                args.push(expr);
	                if (this.match(')')) {
	                    break;
	                }
	                this.expectCommaSeparator();
	                if (this.match(')')) {
	                    break;
	                }
	            }
	        }
	        this.expect(')');
	        return args;
	    };
	    Parser.prototype.parseLeftHandSideExpressionAllowCall = function () {
	        var startToken = this.lookahead;
	        var maybeAsync = this.matchContextualKeyword('async');
	        var previousAllowIn = this.context.allowIn;
	        this.context.allowIn = true;
	        var expr;
	        if (this.matchKeyword('super') && this.context.inFunctionBody) {
	            expr = this.createNode();
	            this.nextToken();
	            expr = this.finalize(expr, new Node.Super());
	            if (!this.match('(') && !this.match('.') && !this.match('[')) {
	                this.throwUnexpectedToken(this.lookahead);
	            }
	        }
	        else {
	            expr = this.inheritCoverGrammar(this.matchKeyword('new') ? this.parseNewExpression : this.parsePrimaryExpression);
	        }
	        while (true) {
	            if (this.match('.')) {
	                this.context.isBindingElement = false;
	                this.context.isAssignmentTarget = true;
	                this.expect('.');
	                var property = this.parseIdentifierName();
	                expr = this.finalize(this.startNode(startToken), new Node.StaticMemberExpression(expr, property));
	            }
	            else if (this.match('(')) {
	                var asyncArrow = maybeAsync && (startToken.lineNumber === this.lookahead.lineNumber);
	                this.context.isBindingElement = false;
	                this.context.isAssignmentTarget = false;
	                var args = asyncArrow ? this.parseAsyncArguments() : this.parseArguments();
	                expr = this.finalize(this.startNode(startToken), new Node.CallExpression(expr, args));
	                if (asyncArrow && this.match('=>')) {
	                    for (var i = 0; i < args.length; ++i) {
	                        this.reinterpretExpressionAsPattern(args[i]);
	                    }
	                    expr = {
	                        type: ArrowParameterPlaceHolder,
	                        params: args,
	                        async: true
	                    };
	                }
	            }
	            else if (this.match('[')) {
	                this.context.isBindingElement = false;
	                this.context.isAssignmentTarget = true;
	                this.expect('[');
	                var property = this.isolateCoverGrammar(this.parseExpression);
	                this.expect(']');
	                expr = this.finalize(this.startNode(startToken), new Node.ComputedMemberExpression(expr, property));
	            }
	            else if (this.lookahead.type === 10 /* Template */ && this.lookahead.head) {
	                var quasi = this.parseTemplateLiteral();
	                expr = this.finalize(this.startNode(startToken), new Node.TaggedTemplateExpression(expr, quasi));
	            }
	            else {
	                break;
	            }
	        }
	        this.context.allowIn = previousAllowIn;
	        return expr;
	    };
	    Parser.prototype.parseSuper = function () {
	        var node = this.createNode();
	        this.expectKeyword('super');
	        if (!this.match('[') && !this.match('.')) {
	            this.throwUnexpectedToken(this.lookahead);
	        }
	        return this.finalize(node, new Node.Super());
	    };
	    Parser.prototype.parseLeftHandSideExpression = function () {
	        assert_1.assert(this.context.allowIn, 'callee of new expression always allow in keyword.');
	        var node = this.startNode(this.lookahead);
	        var expr = (this.matchKeyword('super') && this.context.inFunctionBody) ? this.parseSuper() :
	            this.inheritCoverGrammar(this.matchKeyword('new') ? this.parseNewExpression : this.parsePrimaryExpression);
	        while (true) {
	            if (this.match('[')) {
	                this.context.isBindingElement = false;
	                this.context.isAssignmentTarget = true;
	                this.expect('[');
	                var property = this.isolateCoverGrammar(this.parseExpression);
	                this.expect(']');
	                expr = this.finalize(node, new Node.ComputedMemberExpression(expr, property));
	            }
	            else if (this.match('.')) {
	                this.context.isBindingElement = false;
	                this.context.isAssignmentTarget = true;
	                this.expect('.');
	                var property = this.parseIdentifierName();
	                expr = this.finalize(node, new Node.StaticMemberExpression(expr, property));
	            }
	            else if (this.lookahead.type === 10 /* Template */ && this.lookahead.head) {
	                var quasi = this.parseTemplateLiteral();
	                expr = this.finalize(node, new Node.TaggedTemplateExpression(expr, quasi));
	            }
	            else {
	                break;
	            }
	        }
	        return expr;
	    };
	    // https://tc39.github.io/ecma262/#sec-update-expressions
	    Parser.prototype.parseUpdateExpression = function () {
	        var expr;
	        var startToken = this.lookahead;
	        if (this.match('++') || this.match('--')) {
	            var node = this.startNode(startToken);
	            var token = this.nextToken();
	            expr = this.inheritCoverGrammar(this.parseUnaryExpression);
	            if (this.context.strict && expr.type === syntax_1.Syntax.Identifier && this.scanner.isRestrictedWord(expr.name)) {
	                this.tolerateError(messages_1.Messages.StrictLHSPrefix);
	            }
	            if (!this.context.isAssignmentTarget) {
	                this.tolerateError(messages_1.Messages.InvalidLHSInAssignment);
	            }
	            var prefix = true;
	            expr = this.finalize(node, new Node.UpdateExpression(token.value, expr, prefix));
	            this.context.isAssignmentTarget = false;
	            this.context.isBindingElement = false;
	        }
	        else {
	            expr = this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall);
	            if (!this.hasLineTerminator && this.lookahead.type === 7 /* Punctuator */) {
	                if (this.match('++') || this.match('--')) {
	                    if (this.context.strict && expr.type === syntax_1.Syntax.Identifier && this.scanner.isRestrictedWord(expr.name)) {
	                        this.tolerateError(messages_1.Messages.StrictLHSPostfix);
	                    }
	                    if (!this.context.isAssignmentTarget) {
	                        this.tolerateError(messages_1.Messages.InvalidLHSInAssignment);
	                    }
	                    this.context.isAssignmentTarget = false;
	                    this.context.isBindingElement = false;
	                    var operator = this.nextToken().value;
	                    var prefix = false;
	                    expr = this.finalize(this.startNode(startToken), new Node.UpdateExpression(operator, expr, prefix));
	                }
	            }
	        }
	        return expr;
	    };
	    // https://tc39.github.io/ecma262/#sec-unary-operators
	    Parser.prototype.parseAwaitExpression = function () {
	        var node = this.createNode();
	        this.nextToken();
	        var argument = this.parseUnaryExpression();
	        return this.finalize(node, new Node.AwaitExpression(argument));
	    };
	    Parser.prototype.parseUnaryExpression = function () {
	        var expr;
	        if (this.match('+') || this.match('-') || this.match('~') || this.match('!') ||
	            this.matchKeyword('delete') || this.matchKeyword('void') || this.matchKeyword('typeof')) {
	            var node = this.startNode(this.lookahead);
	            var token = this.nextToken();
	            expr = this.inheritCoverGrammar(this.parseUnaryExpression);
	            expr = this.finalize(node, new Node.UnaryExpression(token.value, expr));
	            if (this.context.strict && expr.operator === 'delete' && expr.argument.type === syntax_1.Syntax.Identifier) {
	                this.tolerateError(messages_1.Messages.StrictDelete);
	            }
	            this.context.isAssignmentTarget = false;
	            this.context.isBindingElement = false;
	        }
	        else if (this.context.await && this.matchContextualKeyword('await')) {
	            expr = this.parseAwaitExpression();
	        }
	        else {
	            expr = this.parseUpdateExpression();
	        }
	        return expr;
	    };
	    Parser.prototype.parseExponentiationExpression = function () {
	        var startToken = this.lookahead;
	        var expr = this.inheritCoverGrammar(this.parseUnaryExpression);
	        if (expr.type !== syntax_1.Syntax.UnaryExpression && this.match('**')) {
	            this.nextToken();
	            this.context.isAssignmentTarget = false;
	            this.context.isBindingElement = false;
	            var left = expr;
	            var right = this.isolateCoverGrammar(this.parseExponentiationExpression);
	            expr = this.finalize(this.startNode(startToken), new Node.BinaryExpression('**', left, right));
	        }
	        return expr;
	    };
	    // https://tc39.github.io/ecma262/#sec-exp-operator
	    // https://tc39.github.io/ecma262/#sec-multiplicative-operators
	    // https://tc39.github.io/ecma262/#sec-additive-operators
	    // https://tc39.github.io/ecma262/#sec-bitwise-shift-operators
	    // https://tc39.github.io/ecma262/#sec-relational-operators
	    // https://tc39.github.io/ecma262/#sec-equality-operators
	    // https://tc39.github.io/ecma262/#sec-binary-bitwise-operators
	    // https://tc39.github.io/ecma262/#sec-binary-logical-operators
	    Parser.prototype.binaryPrecedence = function (token) {
	        var op = token.value;
	        var precedence;
	        if (token.type === 7 /* Punctuator */) {
	            precedence = this.operatorPrecedence[op] || 0;
	        }
	        else if (token.type === 4 /* Keyword */) {
	            precedence = (op === 'instanceof' || (this.context.allowIn && op === 'in')) ? 7 : 0;
	        }
	        else {
	            precedence = 0;
	        }
	        return precedence;
	    };
	    Parser.prototype.parseBinaryExpression = function () {
	        var startToken = this.lookahead;
	        var expr = this.inheritCoverGrammar(this.parseExponentiationExpression);
	        var token = this.lookahead;
	        var prec = this.binaryPrecedence(token);
	        if (prec > 0) {
	            this.nextToken();
	            this.context.isAssignmentTarget = false;
	            this.context.isBindingElement = false;
	            var markers = [startToken, this.lookahead];
	            var left = expr;
	            var right = this.isolateCoverGrammar(this.parseExponentiationExpression);
	            var stack = [left, token.value, right];
	            var precedences = [prec];
	            while (true) {
	                prec = this.binaryPrecedence(this.lookahead);
	                if (prec <= 0) {
	                    break;
	                }
	                // Reduce: make a binary expression from the three topmost entries.
	                while ((stack.length > 2) && (prec <= precedences[precedences.length - 1])) {
	                    right = stack.pop();
	                    var operator = stack.pop();
	                    precedences.pop();
	                    left = stack.pop();
	                    markers.pop();
	                    var node = this.startNode(markers[markers.length - 1]);
	                    stack.push(this.finalize(node, new Node.BinaryExpression(operator, left, right)));
	                }
	                // Shift.
	                stack.push(this.nextToken().value);
	                precedences.push(prec);
	                markers.push(this.lookahead);
	                stack.push(this.isolateCoverGrammar(this.parseExponentiationExpression));
	            }
	            // Final reduce to clean-up the stack.
	            var i = stack.length - 1;
	            expr = stack[i];
	            var lastMarker = markers.pop();
	            while (i > 1) {
	                var marker = markers.pop();
	                var lastLineStart = lastMarker && lastMarker.lineStart;
	                var node = this.startNode(marker, lastLineStart);
	                var operator = stack[i - 1];
	                expr = this.finalize(node, new Node.BinaryExpression(operator, stack[i - 2], expr));
	                i -= 2;
	                lastMarker = marker;
	            }
	        }
	        return expr;
	    };
	    // https://tc39.github.io/ecma262/#sec-conditional-operator
	    Parser.prototype.parseConditionalExpression = function () {
	        var startToken = this.lookahead;
	        var expr = this.inheritCoverGrammar(this.parseBinaryExpression);
	        if (this.match('?')) {
	            this.nextToken();
	            var previousAllowIn = this.context.allowIn;
	            this.context.allowIn = true;
	            var consequent = this.isolateCoverGrammar(this.parseAssignmentExpression);
	            this.context.allowIn = previousAllowIn;
	            this.expect(':');
	            var alternate = this.isolateCoverGrammar(this.parseAssignmentExpression);
	            expr = this.finalize(this.startNode(startToken), new Node.ConditionalExpression(expr, consequent, alternate));
	            this.context.isAssignmentTarget = false;
	            this.context.isBindingElement = false;
	        }
	        return expr;
	    };
	    // https://tc39.github.io/ecma262/#sec-assignment-operators
	    Parser.prototype.checkPatternParam = function (options, param) {
	        switch (param.type) {
	            case syntax_1.Syntax.Identifier:
	                this.validateParam(options, param, param.name);
	                break;
	            case syntax_1.Syntax.RestElement:
	                this.checkPatternParam(options, param.argument);
	                break;
	            case syntax_1.Syntax.AssignmentPattern:
	                this.checkPatternParam(options, param.left);
	                break;
	            case syntax_1.Syntax.ArrayPattern:
	                for (var i = 0; i < param.elements.length; i++) {
	                    if (param.elements[i] !== null) {
	                        this.checkPatternParam(options, param.elements[i]);
	                    }
	                }
	                break;
	            case syntax_1.Syntax.ObjectPattern:
	                for (var i = 0; i < param.properties.length; i++) {
	                    this.checkPatternParam(options, param.properties[i].value);
	                }
	                break;
	            default:
	                break;
	        }
	        options.simple = options.simple && (param instanceof Node.Identifier);
	    };
	    Parser.prototype.reinterpretAsCoverFormalsList = function (expr) {
	        var params = [expr];
	        var options;
	        var asyncArrow = false;
	        switch (expr.type) {
	            case syntax_1.Syntax.Identifier:
	                break;
	            case ArrowParameterPlaceHolder:
	                params = expr.params;
	                asyncArrow = expr.async;
	                break;
	            default:
	                return null;
	        }
	        options = {
	            simple: true,
	            paramSet: {}
	        };
	        for (var i = 0; i < params.length; ++i) {
	            var param = params[i];
	            if (param.type === syntax_1.Syntax.AssignmentPattern) {
	                if (param.right.type === syntax_1.Syntax.YieldExpression) {
	                    if (param.right.argument) {
	                        this.throwUnexpectedToken(this.lookahead);
	                    }
	                    param.right.type = syntax_1.Syntax.Identifier;
	                    param.right.name = 'yield';
	                    delete param.right.argument;
	                    delete param.right.delegate;
	                }
	            }
	            else if (asyncArrow && param.type === syntax_1.Syntax.Identifier && param.name === 'await') {
	                this.throwUnexpectedToken(this.lookahead);
	            }
	            this.checkPatternParam(options, param);
	            params[i] = param;
	        }
	        if (this.context.strict || !this.context.allowYield) {
	            for (var i = 0; i < params.length; ++i) {
	                var param = params[i];
	                if (param.type === syntax_1.Syntax.YieldExpression) {
	                    this.throwUnexpectedToken(this.lookahead);
	                }
	            }
	        }
	        if (options.message === messages_1.Messages.StrictParamDupe) {
	            var token = this.context.strict ? options.stricted : options.firstRestricted;
	            this.throwUnexpectedToken(token, options.message);
	        }
	        return {
	            simple: options.simple,
	            params: params,
	            stricted: options.stricted,
	            firstRestricted: options.firstRestricted,
	            message: options.message
	        };
	    };
	    Parser.prototype.parseAssignmentExpression = function () {
	        var expr;
	        if (!this.context.allowYield && this.matchKeyword('yield')) {
	            expr = this.parseYieldExpression();
	        }
	        else {
	            var startToken = this.lookahead;
	            var token = startToken;
	            expr = this.parseConditionalExpression();
	            if (token.type === 3 /* Identifier */ && (token.lineNumber === this.lookahead.lineNumber) && token.value === 'async') {
	                if (this.lookahead.type === 3 /* Identifier */ || this.matchKeyword('yield')) {
	                    var arg = this.parsePrimaryExpression();
	                    this.reinterpretExpressionAsPattern(arg);
	                    expr = {
	                        type: ArrowParameterPlaceHolder,
	                        params: [arg],
	                        async: true
	                    };
	                }
	            }
	            if (expr.type === ArrowParameterPlaceHolder || this.match('=>')) {
	                // https://tc39.github.io/ecma262/#sec-arrow-function-definitions
	                this.context.isAssignmentTarget = false;
	                this.context.isBindingElement = false;
	                var isAsync = expr.async;
	                var list = this.reinterpretAsCoverFormalsList(expr);
	                if (list) {
	                    if (this.hasLineTerminator) {
	                        this.tolerateUnexpectedToken(this.lookahead);
	                    }
	                    this.context.firstCoverInitializedNameError = null;
	                    var previousStrict = this.context.strict;
	                    var previousAllowStrictDirective = this.context.allowStrictDirective;
	                    this.context.allowStrictDirective = list.simple;
	                    var previousAllowYield = this.context.allowYield;
	                    var previousAwait = this.context.await;
	                    this.context.allowYield = true;
	                    this.context.await = isAsync;
	                    var node = this.startNode(startToken);
	                    this.expect('=>');
	                    var body = void 0;
	                    if (this.match('{')) {
	                        var previousAllowIn = this.context.allowIn;
	                        this.context.allowIn = true;
	                        body = this.parseFunctionSourceElements();
	                        this.context.allowIn = previousAllowIn;
	                    }
	                    else {
	                        body = this.isolateCoverGrammar(this.parseAssignmentExpression);
	                    }
	                    var expression = body.type !== syntax_1.Syntax.BlockStatement;
	                    if (this.context.strict && list.firstRestricted) {
	                        this.throwUnexpectedToken(list.firstRestricted, list.message);
	                    }
	                    if (this.context.strict && list.stricted) {
	                        this.tolerateUnexpectedToken(list.stricted, list.message);
	                    }
	                    expr = isAsync ? this.finalize(node, new Node.AsyncArrowFunctionExpression(list.params, body, expression)) :
	                        this.finalize(node, new Node.ArrowFunctionExpression(list.params, body, expression));
	                    this.context.strict = previousStrict;
	                    this.context.allowStrictDirective = previousAllowStrictDirective;
	                    this.context.allowYield = previousAllowYield;
	                    this.context.await = previousAwait;
	                }
	            }
	            else {
	                if (this.matchAssign()) {
	                    if (!this.context.isAssignmentTarget) {
	                        this.tolerateError(messages_1.Messages.InvalidLHSInAssignment);
	                    }
	                    if (this.context.strict && expr.type === syntax_1.Syntax.Identifier) {
	                        var id = expr;
	                        if (this.scanner.isRestrictedWord(id.name)) {
	                            this.tolerateUnexpectedToken(token, messages_1.Messages.StrictLHSAssignment);
	                        }
	                        if (this.scanner.isStrictModeReservedWord(id.name)) {
	                            this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord);
	                        }
	                    }
	                    if (!this.match('=')) {
	                        this.context.isAssignmentTarget = false;
	                        this.context.isBindingElement = false;
	                    }
	                    else {
	                        this.reinterpretExpressionAsPattern(expr);
	                    }
	                    token = this.nextToken();
	                    var operator = token.value;
	                    var right = this.isolateCoverGrammar(this.parseAssignmentExpression);
	                    expr = this.finalize(this.startNode(startToken), new Node.AssignmentExpression(operator, expr, right));
	                    this.context.firstCoverInitializedNameError = null;
	                }
	            }
	        }
	        return expr;
	    };
	    // https://tc39.github.io/ecma262/#sec-comma-operator
	    Parser.prototype.parseExpression = function () {
	        var startToken = this.lookahead;
	        var expr = this.isolateCoverGrammar(this.parseAssignmentExpression);
	        if (this.match(',')) {
	            var expressions = [];
	            expressions.push(expr);
	            while (this.lookahead.type !== 2 /* EOF */) {
	                if (!this.match(',')) {
	                    break;
	                }
	                this.nextToken();
	                expressions.push(this.isolateCoverGrammar(this.parseAssignmentExpression));
	            }
	            expr = this.finalize(this.startNode(startToken), new Node.SequenceExpression(expressions));
	        }
	        return expr;
	    };
	    // https://tc39.github.io/ecma262/#sec-block
	    Parser.prototype.parseStatementListItem = function () {
	        var statement;
	        this.context.isAssignmentTarget = true;
	        this.context.isBindingElement = true;
	        if (this.lookahead.type === 4 /* Keyword */) {
	            switch (this.lookahead.value) {
	                case 'export':
	                    if (!this.context.isModule) {
	                        this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.IllegalExportDeclaration);
	                    }
	                    statement = this.parseExportDeclaration();
	                    break;
	                case 'import':
	                    if (!this.context.isModule) {
	                        this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.IllegalImportDeclaration);
	                    }
	                    statement = this.parseImportDeclaration();
	                    break;
	                case 'const':
	                    statement = this.parseLexicalDeclaration({ inFor: false });
	                    break;
	                case 'function':
	                    statement = this.parseFunctionDeclaration();
	                    break;
	                case 'class':
	                    statement = this.parseClassDeclaration();
	                    break;
	                case 'let':
	                    statement = this.isLexicalDeclaration() ? this.parseLexicalDeclaration({ inFor: false }) : this.parseStatement();
	                    break;
	                default:
	                    statement = this.parseStatement();
	                    break;
	            }
	        }
	        else {
	            statement = this.parseStatement();
	        }
	        return statement;
	    };
	    Parser.prototype.parseBlock = function () {
	        var node = this.createNode();
	        this.expect('{');
	        var block = [];
	        while (true) {
	            if (this.match('}')) {
	                break;
	            }
	            block.push(this.parseStatementListItem());
	        }
	        this.expect('}');
	        return this.finalize(node, new Node.BlockStatement(block));
	    };
	    // https://tc39.github.io/ecma262/#sec-let-and-const-declarations
	    Parser.prototype.parseLexicalBinding = function (kind, options) {
	        var node = this.createNode();
	        var params = [];
	        var id = this.parsePattern(params, kind);
	        if (this.context.strict && id.type === syntax_1.Syntax.Identifier) {
	            if (this.scanner.isRestrictedWord(id.name)) {
	                this.tolerateError(messages_1.Messages.StrictVarName);
	            }
	        }
	        var init = null;
	        if (kind === 'const') {
	            if (!this.matchKeyword('in') && !this.matchContextualKeyword('of')) {
	                if (this.match('=')) {
	                    this.nextToken();
	                    init = this.isolateCoverGrammar(this.parseAssignmentExpression);
	                }
	                else {
	                    this.throwError(messages_1.Messages.DeclarationMissingInitializer, 'const');
	                }
	            }
	        }
	        else if ((!options.inFor && id.type !== syntax_1.Syntax.Identifier) || this.match('=')) {
	            this.expect('=');
	            init = this.isolateCoverGrammar(this.parseAssignmentExpression);
	        }
	        return this.finalize(node, new Node.VariableDeclarator(id, init));
	    };
	    Parser.prototype.parseBindingList = function (kind, options) {
	        var list = [this.parseLexicalBinding(kind, options)];
	        while (this.match(',')) {
	            this.nextToken();
	            list.push(this.parseLexicalBinding(kind, options));
	        }
	        return list;
	    };
	    Parser.prototype.isLexicalDeclaration = function () {
	        var state = this.scanner.saveState();
	        this.scanner.scanComments();
	        var next = this.scanner.lex();
	        this.scanner.restoreState(state);
	        return (next.type === 3 /* Identifier */) ||
	            (next.type === 7 /* Punctuator */ && next.value === '[') ||
	            (next.type === 7 /* Punctuator */ && next.value === '{') ||
	            (next.type === 4 /* Keyword */ && next.value === 'let') ||
	            (next.type === 4 /* Keyword */ && next.value === 'yield');
	    };
	    Parser.prototype.parseLexicalDeclaration = function (options) {
	        var node = this.createNode();
	        var kind = this.nextToken().value;
	        assert_1.assert(kind === 'let' || kind === 'const', 'Lexical declaration must be either let or const');
	        var declarations = this.parseBindingList(kind, options);
	        this.consumeSemicolon();
	        return this.finalize(node, new Node.VariableDeclaration(declarations, kind));
	    };
	    // https://tc39.github.io/ecma262/#sec-destructuring-binding-patterns
	    Parser.prototype.parseBindingRestElement = function (params, kind) {
	        var node = this.createNode();
	        this.expect('...');
	        var arg = this.parsePattern(params, kind);
	        return this.finalize(node, new Node.RestElement(arg));
	    };
	    Parser.prototype.parseArrayPattern = function (params, kind) {
	        var node = this.createNode();
	        this.expect('[');
	        var elements = [];
	        while (!this.match(']')) {
	            if (this.match(',')) {
	                this.nextToken();
	                elements.push(null);
	            }
	            else {
	                if (this.match('...')) {
	                    elements.push(this.parseBindingRestElement(params, kind));
	                    break;
	                }
	                else {
	                    elements.push(this.parsePatternWithDefault(params, kind));
	                }
	                if (!this.match(']')) {
	                    this.expect(',');
	                }
	            }
	        }
	        this.expect(']');
	        return this.finalize(node, new Node.ArrayPattern(elements));
	    };
	    Parser.prototype.parsePropertyPattern = function (params, kind) {
	        var node = this.createNode();
	        var computed = false;
	        var shorthand = false;
	        var method = false;
	        var key;
	        var value;
	        if (this.lookahead.type === 3 /* Identifier */) {
	            var keyToken = this.lookahead;
	            key = this.parseVariableIdentifier();
	            var init = this.finalize(node, new Node.Identifier(keyToken.value));
	            if (this.match('=')) {
	                params.push(keyToken);
	                shorthand = true;
	                this.nextToken();
	                var expr = this.parseAssignmentExpression();
	                value = this.finalize(this.startNode(keyToken), new Node.AssignmentPattern(init, expr));
	            }
	            else if (!this.match(':')) {
	                params.push(keyToken);
	                shorthand = true;
	                value = init;
	            }
	            else {
	                this.expect(':');
	                value = this.parsePatternWithDefault(params, kind);
	            }
	        }
	        else {
	            computed = this.match('[');
	            key = this.parseObjectPropertyKey();
	            this.expect(':');
	            value = this.parsePatternWithDefault(params, kind);
	        }
	        return this.finalize(node, new Node.Property('init', key, computed, value, method, shorthand));
	    };
	    Parser.prototype.parseObjectPattern = function (params, kind) {
	        var node = this.createNode();
	        var properties = [];
	        this.expect('{');
	        while (!this.match('}')) {
	            properties.push(this.parsePropertyPattern(params, kind));
	            if (!this.match('}')) {
	                this.expect(',');
	            }
	        }
	        this.expect('}');
	        return this.finalize(node, new Node.ObjectPattern(properties));
	    };
	    Parser.prototype.parsePattern = function (params, kind) {
	        var pattern;
	        if (this.match('[')) {
	            pattern = this.parseArrayPattern(params, kind);
	        }
	        else if (this.match('{')) {
	            pattern = this.parseObjectPattern(params, kind);
	        }
	        else {
	            if (this.matchKeyword('let') && (kind === 'const' || kind === 'let')) {
	                this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.LetInLexicalBinding);
	            }
	            params.push(this.lookahead);
	            pattern = this.parseVariableIdentifier(kind);
	        }
	        return pattern;
	    };
	    Parser.prototype.parsePatternWithDefault = function (params, kind) {
	        var startToken = this.lookahead;
	        var pattern = this.parsePattern(params, kind);
	        if (this.match('=')) {
	            this.nextToken();
	            var previousAllowYield = this.context.allowYield;
	            this.context.allowYield = true;
	            var right = this.isolateCoverGrammar(this.parseAssignmentExpression);
	            this.context.allowYield = previousAllowYield;
	            pattern = this.finalize(this.startNode(startToken), new Node.AssignmentPattern(pattern, right));
	        }
	        return pattern;
	    };
	    // https://tc39.github.io/ecma262/#sec-variable-statement
	    Parser.prototype.parseVariableIdentifier = function (kind) {
	        var node = this.createNode();
	        var token = this.nextToken();
	        if (token.type === 4 /* Keyword */ && token.value === 'yield') {
	            if (this.context.strict) {
	                this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord);
	            }
	            else if (!this.context.allowYield) {
	                this.throwUnexpectedToken(token);
	            }
	        }
	        else if (token.type !== 3 /* Identifier */) {
	            if (this.context.strict && token.type === 4 /* Keyword */ && this.scanner.isStrictModeReservedWord(token.value)) {
	                this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord);
	            }
	            else {
	                if (this.context.strict || token.value !== 'let' || kind !== 'var') {
	                    this.throwUnexpectedToken(token);
	                }
	            }
	        }
	        else if ((this.context.isModule || this.context.await) && token.type === 3 /* Identifier */ && token.value === 'await') {
	            this.tolerateUnexpectedToken(token);
	        }
	        return this.finalize(node, new Node.Identifier(token.value));
	    };
	    Parser.prototype.parseVariableDeclaration = function (options) {
	        var node = this.createNode();
	        var params = [];
	        var id = this.parsePattern(params, 'var');
	        if (this.context.strict && id.type === syntax_1.Syntax.Identifier) {
	            if (this.scanner.isRestrictedWord(id.name)) {
	                this.tolerateError(messages_1.Messages.StrictVarName);
	            }
	        }
	        var init = null;
	        if (this.match('=')) {
	            this.nextToken();
	            init = this.isolateCoverGrammar(this.parseAssignmentExpression);
	        }
	        else if (id.type !== syntax_1.Syntax.Identifier && !options.inFor) {
	            this.expect('=');
	        }
	        return this.finalize(node, new Node.VariableDeclarator(id, init));
	    };
	    Parser.prototype.parseVariableDeclarationList = function (options) {
	        var opt = { inFor: options.inFor };
	        var list = [];
	        list.push(this.parseVariableDeclaration(opt));
	        while (this.match(',')) {
	            this.nextToken();
	            list.push(this.parseVariableDeclaration(opt));
	        }
	        return list;
	    };
	    Parser.prototype.parseVariableStatement = function () {
	        var node = this.createNode();
	        this.expectKeyword('var');
	        var declarations = this.parseVariableDeclarationList({ inFor: false });
	        this.consumeSemicolon();
	        return this.finalize(node, new Node.VariableDeclaration(declarations, 'var'));
	    };
	    // https://tc39.github.io/ecma262/#sec-empty-statement
	    Parser.prototype.parseEmptyStatement = function () {
	        var node = this.createNode();
	        this.expect(';');
	        return this.finalize(node, new Node.EmptyStatement());
	    };
	    // https://tc39.github.io/ecma262/#sec-expression-statement
	    Parser.prototype.parseExpressionStatement = function () {
	        var node = this.createNode();
	        var expr = this.parseExpression();
	        this.consumeSemicolon();
	        return this.finalize(node, new Node.ExpressionStatement(expr));
	    };
	    // https://tc39.github.io/ecma262/#sec-if-statement
	    Parser.prototype.parseIfClause = function () {
	        if (this.context.strict && this.matchKeyword('function')) {
	            this.tolerateError(messages_1.Messages.StrictFunction);
	        }
	        return this.parseStatement();
	    };
	    Parser.prototype.parseIfStatement = function () {
	        var node = this.createNode();
	        var consequent;
	        var alternate = null;
	        this.expectKeyword('if');
	        this.expect('(');
	        var test = this.parseExpression();
	        if (!this.match(')') && this.config.tolerant) {
	            this.tolerateUnexpectedToken(this.nextToken());
	            consequent = this.finalize(this.createNode(), new Node.EmptyStatement());
	        }
	        else {
	            this.expect(')');
	            consequent = this.parseIfClause();
	            if (this.matchKeyword('else')) {
	                this.nextToken();
	                alternate = this.parseIfClause();
	            }
	        }
	        return this.finalize(node, new Node.IfStatement(test, consequent, alternate));
	    };
	    // https://tc39.github.io/ecma262/#sec-do-while-statement
	    Parser.prototype.parseDoWhileStatement = function () {
	        var node = this.createNode();
	        this.expectKeyword('do');
	        var previousInIteration = this.context.inIteration;
	        this.context.inIteration = true;
	        var body = this.parseStatement();
	        this.context.inIteration = previousInIteration;
	        this.expectKeyword('while');
	        this.expect('(');
	        var test = this.parseExpression();
	        if (!this.match(')') && this.config.tolerant) {
	            this.tolerateUnexpectedToken(this.nextToken());
	        }
	        else {
	            this.expect(')');
	            if (this.match(';')) {
	                this.nextToken();
	            }
	        }
	        return this.finalize(node, new Node.DoWhileStatement(body, test));
	    };
	    // https://tc39.github.io/ecma262/#sec-while-statement
	    Parser.prototype.parseWhileStatement = function () {
	        var node = this.createNode();
	        var body;
	        this.expectKeyword('while');
	        this.expect('(');
	        var test = this.parseExpression();
	        if (!this.match(')') && this.config.tolerant) {
	            this.tolerateUnexpectedToken(this.nextToken());
	            body = this.finalize(this.createNode(), new Node.EmptyStatement());
	        }
	        else {
	            this.expect(')');
	            var previousInIteration = this.context.inIteration;
	            this.context.inIteration = true;
	            body = this.parseStatement();
	            this.context.inIteration = previousInIteration;
	        }
	        return this.finalize(node, new Node.WhileStatement(test, body));
	    };
	    // https://tc39.github.io/ecma262/#sec-for-statement
	    // https://tc39.github.io/ecma262/#sec-for-in-and-for-of-statements
	    Parser.prototype.parseForStatement = function () {
	        var init = null;
	        var test = null;
	        var update = null;
	        var forIn = true;
	        var left, right;
	        var node = this.createNode();
	        this.expectKeyword('for');
	        this.expect('(');
	        if (this.match(';')) {
	            this.nextToken();
	        }
	        else {
	            if (this.matchKeyword('var')) {
	                init = this.createNode();
	                this.nextToken();
	                var previousAllowIn = this.context.allowIn;
	                this.context.allowIn = false;
	                var declarations = this.parseVariableDeclarationList({ inFor: true });
	                this.context.allowIn = previousAllowIn;
	                if (declarations.length === 1 && this.matchKeyword('in')) {
	                    var decl = declarations[0];
	                    if (decl.init && (decl.id.type === syntax_1.Syntax.ArrayPattern || decl.id.type === syntax_1.Syntax.ObjectPattern || this.context.strict)) {
	                        this.tolerateError(messages_1.Messages.ForInOfLoopInitializer, 'for-in');
	                    }
	                    init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var'));
	                    this.nextToken();
	                    left = init;
	                    right = this.parseExpression();
	                    init = null;
	                }
	                else if (declarations.length === 1 && declarations[0].init === null && this.matchContextualKeyword('of')) {
	                    init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var'));
	                    this.nextToken();
	                    left = init;
	                    right = this.parseAssignmentExpression();
	                    init = null;
	                    forIn = false;
	                }
	                else {
	                    init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var'));
	                    this.expect(';');
	                }
	            }
	            else if (this.matchKeyword('const') || this.matchKeyword('let')) {
	                init = this.createNode();
	                var kind = this.nextToken().value;
	                if (!this.context.strict && this.lookahead.value === 'in') {
	                    init = this.finalize(init, new Node.Identifier(kind));
	                    this.nextToken();
	                    left = init;
	                    right = this.parseExpression();
	                    init = null;
	                }
	                else {
	                    var previousAllowIn = this.context.allowIn;
	                    this.context.allowIn = false;
	                    var declarations = this.parseBindingList(kind, { inFor: true });
	                    this.context.allowIn = previousAllowIn;
	                    if (declarations.length === 1 && declarations[0].init === null && this.matchKeyword('in')) {
	                        init = this.finalize(init, new Node.VariableDeclaration(declarations, kind));
	                        this.nextToken();
	                        left = init;
	                        right = this.parseExpression();
	                        init = null;
	                    }
	                    else if (declarations.length === 1 && declarations[0].init === null && this.matchContextualKeyword('of')) {
	                        init = this.finalize(init, new Node.VariableDeclaration(declarations, kind));
	                        this.nextToken();
	                        left = init;
	                        right = this.parseAssignmentExpression();
	                        init = null;
	                        forIn = false;
	                    }
	                    else {
	                        this.consumeSemicolon();
	                        init = this.finalize(init, new Node.VariableDeclaration(declarations, kind));
	                    }
	                }
	            }
	            else {
	                var initStartToken = this.lookahead;
	                var previousAllowIn = this.context.allowIn;
	                this.context.allowIn = false;
	                init = this.inheritCoverGrammar(this.parseAssignmentExpression);
	                this.context.allowIn = previousAllowIn;
	                if (this.matchKeyword('in')) {
	                    if (!this.context.isAssignmentTarget || init.type === syntax_1.Syntax.AssignmentExpression) {
	                        this.tolerateError(messages_1.Messages.InvalidLHSInForIn);
	                    }
	                    this.nextToken();
	                    this.reinterpretExpressionAsPattern(init);
	                    left = init;
	                    right = this.parseExpression();
	                    init = null;
	                }
	                else if (this.matchContextualKeyword('of')) {
	                    if (!this.context.isAssignmentTarget || init.type === syntax_1.Syntax.AssignmentExpression) {
	                        this.tolerateError(messages_1.Messages.InvalidLHSInForLoop);
	                    }
	                    this.nextToken();
	                    this.reinterpretExpressionAsPattern(init);
	                    left = init;
	                    right = this.parseAssignmentExpression();
	                    init = null;
	                    forIn = false;
	                }
	                else {
	                    if (this.match(',')) {
	                        var initSeq = [init];
	                        while (this.match(',')) {
	                            this.nextToken();
	                            initSeq.push(this.isolateCoverGrammar(this.parseAssignmentExpression));
	                        }
	                        init = this.finalize(this.startNode(initStartToken), new Node.SequenceExpression(initSeq));
	                    }
	                    this.expect(';');
	                }
	            }
	        }
	        if (typeof left === 'undefined') {
	            if (!this.match(';')) {
	                test = this.parseExpression();
	            }
	            this.expect(';');
	            if (!this.match(')')) {
	                update = this.parseExpression();
	            }
	        }
	        var body;
	        if (!this.match(')') && this.config.tolerant) {
	            this.tolerateUnexpectedToken(this.nextToken());
	            body = this.finalize(this.createNode(), new Node.EmptyStatement());
	        }
	        else {
	            this.expect(')');
	            var previousInIteration = this.context.inIteration;
	            this.context.inIteration = true;
	            body = this.isolateCoverGrammar(this.parseStatement);
	            this.context.inIteration = previousInIteration;
	        }
	        return (typeof left === 'undefined') ?
	            this.finalize(node, new Node.ForStatement(init, test, update, body)) :
	            forIn ? this.finalize(node, new Node.ForInStatement(left, right, body)) :
	                this.finalize(node, new Node.ForOfStatement(left, right, body));
	    };
	    // https://tc39.github.io/ecma262/#sec-continue-statement
	    Parser.prototype.parseContinueStatement = function () {
	        var node = this.createNode();
	        this.expectKeyword('continue');
	        var label = null;
	        if (this.lookahead.type === 3 /* Identifier */ && !this.hasLineTerminator) {
	            var id = this.parseVariableIdentifier();
	            label = id;
	            var key = '$' + id.name;
	            if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {
	                this.throwError(messages_1.Messages.UnknownLabel, id.name);
	            }
	        }
	        this.consumeSemicolon();
	        if (label === null && !this.context.inIteration) {
	            this.throwError(messages_1.Messages.IllegalContinue);
	        }
	        return this.finalize(node, new Node.ContinueStatement(label));
	    };
	    // https://tc39.github.io/ecma262/#sec-break-statement
	    Parser.prototype.parseBreakStatement = function () {
	        var node = this.createNode();
	        this.expectKeyword('break');
	        var label = null;
	        if (this.lookahead.type === 3 /* Identifier */ && !this.hasLineTerminator) {
	            var id = this.parseVariableIdentifier();
	            var key = '$' + id.name;
	            if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {
	                this.throwError(messages_1.Messages.UnknownLabel, id.name);
	            }
	            label = id;
	        }
	        this.consumeSemicolon();
	        if (label === null && !this.context.inIteration && !this.context.inSwitch) {
	            this.throwError(messages_1.Messages.IllegalBreak);
	        }
	        return this.finalize(node, new Node.BreakStatement(label));
	    };
	    // https://tc39.github.io/ecma262/#sec-return-statement
	    Parser.prototype.parseReturnStatement = function () {
	        if (!this.context.inFunctionBody) {
	            this.tolerateError(messages_1.Messages.IllegalReturn);
	        }
	        var node = this.createNode();
	        this.expectKeyword('return');
	        var hasArgument = (!this.match(';') && !this.match('}') &&
	            !this.hasLineTerminator && this.lookahead.type !== 2 /* EOF */) ||
	            this.lookahead.type === 8 /* StringLiteral */ ||
	            this.lookahead.type === 10 /* Template */;
	        var argument = hasArgument ? this.parseExpression() : null;
	        this.consumeSemicolon();
	        return this.finalize(node, new Node.ReturnStatement(argument));
	    };
	    // https://tc39.github.io/ecma262/#sec-with-statement
	    Parser.prototype.parseWithStatement = function () {
	        if (this.context.strict) {
	            this.tolerateError(messages_1.Messages.StrictModeWith);
	        }
	        var node = this.createNode();
	        var body;
	        this.expectKeyword('with');
	        this.expect('(');
	        var object = this.parseExpression();
	        if (!this.match(')') && this.config.tolerant) {
	            this.tolerateUnexpectedToken(this.nextToken());
	            body = this.finalize(this.createNode(), new Node.EmptyStatement());
	        }
	        else {
	            this.expect(')');
	            body = this.parseStatement();
	        }
	        return this.finalize(node, new Node.WithStatement(object, body));
	    };
	    // https://tc39.github.io/ecma262/#sec-switch-statement
	    Parser.prototype.parseSwitchCase = function () {
	        var node = this.createNode();
	        var test;
	        if (this.matchKeyword('default')) {
	            this.nextToken();
	            test = null;
	        }
	        else {
	            this.expectKeyword('case');
	            test = this.parseExpression();
	        }
	        this.expect(':');
	        var consequent = [];
	        while (true) {
	            if (this.match('}') || this.matchKeyword('default') || this.matchKeyword('case')) {
	                break;
	            }
	            consequent.push(this.parseStatementListItem());
	        }
	        return this.finalize(node, new Node.SwitchCase(test, consequent));
	    };
	    Parser.prototype.parseSwitchStatement = function () {
	        var node = this.createNode();
	        this.expectKeyword('switch');
	        this.expect('(');
	        var discriminant = this.parseExpression();
	        this.expect(')');
	        var previousInSwitch = this.context.inSwitch;
	        this.context.inSwitch = true;
	        var cases = [];
	        var defaultFound = false;
	        this.expect('{');
	        while (true) {
	            if (this.match('}')) {
	                break;
	            }
	            var clause = this.parseSwitchCase();
	            if (clause.test === null) {
	                if (defaultFound) {
	                    this.throwError(messages_1.Messages.MultipleDefaultsInSwitch);
	                }
	                defaultFound = true;
	            }
	            cases.push(clause);
	        }
	        this.expect('}');
	        this.context.inSwitch = previousInSwitch;
	        return this.finalize(node, new Node.SwitchStatement(discriminant, cases));
	    };
	    // https://tc39.github.io/ecma262/#sec-labelled-statements
	    Parser.prototype.parseLabelledStatement = function () {
	        var node = this.createNode();
	        var expr = this.parseExpression();
	        var statement;
	        if ((expr.type === syntax_1.Syntax.Identifier) && this.match(':')) {
	            this.nextToken();
	            var id = expr;
	            var key = '$' + id.name;
	            if (Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {
	                this.throwError(messages_1.Messages.Redeclaration, 'Label', id.name);
	            }
	            this.context.labelSet[key] = true;
	            var body = void 0;
	            if (this.matchKeyword('class')) {
	                this.tolerateUnexpectedToken(this.lookahead);
	                body = this.parseClassDeclaration();
	            }
	            else if (this.matchKeyword('function')) {
	                var token = this.lookahead;
	                var declaration = this.parseFunctionDeclaration();
	                if (this.context.strict) {
	                    this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunction);
	                }
	                else if (declaration.generator) {
	                    this.tolerateUnexpectedToken(token, messages_1.Messages.GeneratorInLegacyContext);
	                }
	                body = declaration;
	            }
	            else {
	                body = this.parseStatement();
	            }
	            delete this.context.labelSet[key];
	            statement = new Node.LabeledStatement(id, body);
	        }
	        else {
	            this.consumeSemicolon();
	            statement = new Node.ExpressionStatement(expr);
	        }
	        return this.finalize(node, statement);
	    };
	    // https://tc39.github.io/ecma262/#sec-throw-statement
	    Parser.prototype.parseThrowStatement = function () {
	        var node = this.createNode();
	        this.expectKeyword('throw');
	        if (this.hasLineTerminator) {
	            this.throwError(messages_1.Messages.NewlineAfterThrow);
	        }
	        var argument = this.parseExpression();
	        this.consumeSemicolon();
	        return this.finalize(node, new Node.ThrowStatement(argument));
	    };
	    // https://tc39.github.io/ecma262/#sec-try-statement
	    Parser.prototype.parseCatchClause = function () {
	        var node = this.createNode();
	        this.expectKeyword('catch');
	        this.expect('(');
	        if (this.match(')')) {
	            this.throwUnexpectedToken(this.lookahead);
	        }
	        var params = [];
	        var param = this.parsePattern(params);
	        var paramMap = {};
	        for (var i = 0; i < params.length; i++) {
	            var key = '$' + params[i].value;
	            if (Object.prototype.hasOwnProperty.call(paramMap, key)) {
	                this.tolerateError(messages_1.Messages.DuplicateBinding, params[i].value);
	            }
	            paramMap[key] = true;
	        }
	        if (this.context.strict && param.type === syntax_1.Syntax.Identifier) {
	            if (this.scanner.isRestrictedWord(param.name)) {
	                this.tolerateError(messages_1.Messages.StrictCatchVariable);
	            }
	        }
	        this.expect(')');
	        var body = this.parseBlock();
	        return this.finalize(node, new Node.CatchClause(param, body));
	    };
	    Parser.prototype.parseFinallyClause = function () {
	        this.expectKeyword('finally');
	        return this.parseBlock();
	    };
	    Parser.prototype.parseTryStatement = function () {
	        var node = this.createNode();
	        this.expectKeyword('try');
	        var block = this.parseBlock();
	        var handler = this.matchKeyword('catch') ? this.parseCatchClause() : null;
	        var finalizer = this.matchKeyword('finally') ? this.parseFinallyClause() : null;
	        if (!handler && !finalizer) {
	            this.throwError(messages_1.Messages.NoCatchOrFinally);
	        }
	        return this.finalize(node, new Node.TryStatement(block, handler, finalizer));
	    };
	    // https://tc39.github.io/ecma262/#sec-debugger-statement
	    Parser.prototype.parseDebuggerStatement = function () {
	        var node = this.createNode();
	        this.expectKeyword('debugger');
	        this.consumeSemicolon();
	        return this.finalize(node, new Node.DebuggerStatement());
	    };
	    // https://tc39.github.io/ecma262/#sec-ecmascript-language-statements-and-declarations
	    Parser.prototype.parseStatement = function () {
	        var statement;
	        switch (this.lookahead.type) {
	            case 1 /* BooleanLiteral */:
	            case 5 /* NullLiteral */:
	            case 6 /* NumericLiteral */:
	            case 8 /* StringLiteral */:
	            case 10 /* Template */:
	            case 9 /* RegularExpression */:
	                statement = this.parseExpressionStatement();
	                break;
	            case 7 /* Punctuator */:
	                var value = this.lookahead.value;
	                if (value === '{') {
	                    statement = this.parseBlock();
	                }
	                else if (value === '(') {
	                    statement = this.parseExpressionStatement();
	                }
	                else if (value === ';') {
	                    statement = this.parseEmptyStatement();
	                }
	                else {
	                    statement = this.parseExpressionStatement();
	                }
	                break;
	            case 3 /* Identifier */:
	                statement = this.matchAsyncFunction() ? this.parseFunctionDeclaration() : this.parseLabelledStatement();
	                break;
	            case 4 /* Keyword */:
	                switch (this.lookahead.value) {
	                    case 'break':
	                        statement = this.parseBreakStatement();
	                        break;
	                    case 'continue':
	                        statement = this.parseContinueStatement();
	                        break;
	                    case 'debugger':
	                        statement = this.parseDebuggerStatement();
	                        break;
	                    case 'do':
	                        statement = this.parseDoWhileStatement();
	                        break;
	                    case 'for':
	                        statement = this.parseForStatement();
	                        break;
	                    case 'function':
	                        statement = this.parseFunctionDeclaration();
	                        break;
	                    case 'if':
	                        statement = this.parseIfStatement();
	                        break;
	                    case 'return':
	                        statement = this.parseReturnStatement();
	                        break;
	                    case 'switch':
	                        statement = this.parseSwitchStatement();
	                        break;
	                    case 'throw':
	                        statement = this.parseThrowStatement();
	                        break;
	                    case 'try':
	                        statement = this.parseTryStatement();
	                        break;
	                    case 'var':
	                        statement = this.parseVariableStatement();
	                        break;
	                    case 'while':
	                        statement = this.parseWhileStatement();
	                        break;
	                    case 'with':
	                        statement = this.parseWithStatement();
	                        break;
	                    default:
	                        statement = this.parseExpressionStatement();
	                        break;
	                }
	                break;
	            default:
	                statement = this.throwUnexpectedToken(this.lookahead);
	        }
	        return statement;
	    };
	    // https://tc39.github.io/ecma262/#sec-function-definitions
	    Parser.prototype.parseFunctionSourceElements = function () {
	        var node = this.createNode();
	        this.expect('{');
	        var body = this.parseDirectivePrologues();
	        var previousLabelSet = this.context.labelSet;
	        var previousInIteration = this.context.inIteration;
	        var previousInSwitch = this.context.inSwitch;
	        var previousInFunctionBody = this.context.inFunctionBody;
	        this.context.labelSet = {};
	        this.context.inIteration = false;
	        this.context.inSwitch = false;
	        this.context.inFunctionBody = true;
	        while (this.lookahead.type !== 2 /* EOF */) {
	            if (this.match('}')) {
	                break;
	            }
	            body.push(this.parseStatementListItem());
	        }
	        this.expect('}');
	        this.context.labelSet = previousLabelSet;
	        this.context.inIteration = previousInIteration;
	        this.context.inSwitch = previousInSwitch;
	        this.context.inFunctionBody = previousInFunctionBody;
	        return this.finalize(node, new Node.BlockStatement(body));
	    };
	    Parser.prototype.validateParam = function (options, param, name) {
	        var key = '$' + name;
	        if (this.context.strict) {
	            if (this.scanner.isRestrictedWord(name)) {
	                options.stricted = param;
	                options.message = messages_1.Messages.StrictParamName;
	            }
	            if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) {
	                options.stricted = param;
	                options.message = messages_1.Messages.StrictParamDupe;
	            }
	        }
	        else if (!options.firstRestricted) {
	            if (this.scanner.isRestrictedWord(name)) {
	                options.firstRestricted = param;
	                options.message = messages_1.Messages.StrictParamName;
	            }
	            else if (this.scanner.isStrictModeReservedWord(name)) {
	                options.firstRestricted = param;
	                options.message = messages_1.Messages.StrictReservedWord;
	            }
	            else if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) {
	                options.stricted = param;
	                options.message = messages_1.Messages.StrictParamDupe;
	            }
	        }
	        /* istanbul ignore next */
	        if (typeof Object.defineProperty === 'function') {
	            Object.defineProperty(options.paramSet, key, { value: true, enumerable: true, writable: true, configurable: true });
	        }
	        else {
	            options.paramSet[key] = true;
	        }
	    };
	    Parser.prototype.parseRestElement = function (params) {
	        var node = this.createNode();
	        this.expect('...');
	        var arg = this.parsePattern(params);
	        if (this.match('=')) {
	            this.throwError(messages_1.Messages.DefaultRestParameter);
	        }
	        if (!this.match(')')) {
	            this.throwError(messages_1.Messages.ParameterAfterRestParameter);
	        }
	        return this.finalize(node, new Node.RestElement(arg));
	    };
	    Parser.prototype.parseFormalParameter = function (options) {
	        var params = [];
	        var param = this.match('...') ? this.parseRestElement(params) : this.parsePatternWithDefault(params);
	        for (var i = 0; i < params.length; i++) {
	            this.validateParam(options, params[i], params[i].value);
	        }
	        options.simple = options.simple && (param instanceof Node.Identifier);
	        options.params.push(param);
	    };
	    Parser.prototype.parseFormalParameters = function (firstRestricted) {
	        var options;
	        options = {
	            simple: true,
	            params: [],
	            firstRestricted: firstRestricted
	        };
	        this.expect('(');
	        if (!this.match(')')) {
	            options.paramSet = {};
	            while (this.lookahead.type !== 2 /* EOF */) {
	                this.parseFormalParameter(options);
	                if (this.match(')')) {
	                    break;
	                }
	                this.expect(',');
	                if (this.match(')')) {
	                    break;
	                }
	            }
	        }
	        this.expect(')');
	        return {
	            simple: options.simple,
	            params: options.params,
	            stricted: options.stricted,
	            firstRestricted: options.firstRestricted,
	            message: options.message
	        };
	    };
	    Parser.prototype.matchAsyncFunction = function () {
	        var match = this.matchContextualKeyword('async');
	        if (match) {
	            var state = this.scanner.saveState();
	            this.scanner.scanComments();
	            var next = this.scanner.lex();
	            this.scanner.restoreState(state);
	            match = (state.lineNumber === next.lineNumber) && (next.type === 4 /* Keyword */) && (next.value === 'function');
	        }
	        return match;
	    };
	    Parser.prototype.parseFunctionDeclaration = function (identifierIsOptional) {
	        var node = this.createNode();
	        var isAsync = this.matchContextualKeyword('async');
	        if (isAsync) {
	            this.nextToken();
	        }
	        this.expectKeyword('function');
	        var isGenerator = isAsync ? false : this.match('*');
	        if (isGenerator) {
	            this.nextToken();
	        }
	        var message;
	        var id = null;
	        var firstRestricted = null;
	        if (!identifierIsOptional || !this.match('(')) {
	            var token = this.lookahead;
	            id = this.parseVariableIdentifier();
	            if (this.context.strict) {
	                if (this.scanner.isRestrictedWord(token.value)) {
	                    this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunctionName);
	                }
	            }
	            else {
	                if (this.scanner.isRestrictedWord(token.value)) {
	                    firstRestricted = token;
	                    message = messages_1.Messages.StrictFunctionName;
	                }
	                else if (this.scanner.isStrictModeReservedWord(token.value)) {
	                    firstRestricted = token;
	                    message = messages_1.Messages.StrictReservedWord;
	                }
	            }
	        }
	        var previousAllowAwait = this.context.await;
	        var previousAllowYield = this.context.allowYield;
	        this.context.await = isAsync;
	        this.context.allowYield = !isGenerator;
	        var formalParameters = this.parseFormalParameters(firstRestricted);
	        var params = formalParameters.params;
	        var stricted = formalParameters.stricted;
	        firstRestricted = formalParameters.firstRestricted;
	        if (formalParameters.message) {
	            message = formalParameters.message;
	        }
	        var previousStrict = this.context.strict;
	        var previousAllowStrictDirective = this.context.allowStrictDirective;
	        this.context.allowStrictDirective = formalParameters.simple;
	        var body = this.parseFunctionSourceElements();
	        if (this.context.strict && firstRestricted) {
	            this.throwUnexpectedToken(firstRestricted, message);
	        }
	        if (this.context.strict && stricted) {
	            this.tolerateUnexpectedToken(stricted, message);
	        }
	        this.context.strict = previousStrict;
	        this.context.allowStrictDirective = previousAllowStrictDirective;
	        this.context.await = previousAllowAwait;
	        this.context.allowYield = previousAllowYield;
	        return isAsync ? this.finalize(node, new Node.AsyncFunctionDeclaration(id, params, body)) :
	            this.finalize(node, new Node.FunctionDeclaration(id, params, body, isGenerator));
	    };
	    Parser.prototype.parseFunctionExpression = function () {
	        var node = this.createNode();
	        var isAsync = this.matchContextualKeyword('async');
	        if (isAsync) {
	            this.nextToken();
	        }
	        this.expectKeyword('function');
	        var isGenerator = isAsync ? false : this.match('*');
	        if (isGenerator) {
	            this.nextToken();
	        }
	        var message;
	        var id = null;
	        var firstRestricted;
	        var previousAllowAwait = this.context.await;
	        var previousAllowYield = this.context.allowYield;
	        this.context.await = isAsync;
	        this.context.allowYield = !isGenerator;
	        if (!this.match('(')) {
	            var token = this.lookahead;
	            id = (!this.context.strict && !isGenerator && this.matchKeyword('yield')) ? this.parseIdentifierName() : this.parseVariableIdentifier();
	            if (this.context.strict) {
	                if (this.scanner.isRestrictedWord(token.value)) {
	                    this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunctionName);
	                }
	            }
	            else {
	                if (this.scanner.isRestrictedWord(token.value)) {
	                    firstRestricted = token;
	                    message = messages_1.Messages.StrictFunctionName;
	                }
	                else if (this.scanner.isStrictModeReservedWord(token.value)) {
	                    firstRestricted = token;
	                    message = messages_1.Messages.StrictReservedWord;
	                }
	            }
	        }
	        var formalParameters = this.parseFormalParameters(firstRestricted);
	        var params = formalParameters.params;
	        var stricted = formalParameters.stricted;
	        firstRestricted = formalParameters.firstRestricted;
	        if (formalParameters.message) {
	            message = formalParameters.message;
	        }
	        var previousStrict = this.context.strict;
	        var previousAllowStrictDirective = this.context.allowStrictDirective;
	        this.context.allowStrictDirective = formalParameters.simple;
	        var body = this.parseFunctionSourceElements();
	        if (this.context.strict && firstRestricted) {
	            this.throwUnexpectedToken(firstRestricted, message);
	        }
	        if (this.context.strict && stricted) {
	            this.tolerateUnexpectedToken(stricted, message);
	        }
	        this.context.strict = previousStrict;
	        this.context.allowStrictDirective = previousAllowStrictDirective;
	        this.context.await = previousAllowAwait;
	        this.context.allowYield = previousAllowYield;
	        return isAsync ? this.finalize(node, new Node.AsyncFunctionExpression(id, params, body)) :
	            this.finalize(node, new Node.FunctionExpression(id, params, body, isGenerator));
	    };
	    // https://tc39.github.io/ecma262/#sec-directive-prologues-and-the-use-strict-directive
	    Parser.prototype.parseDirective = function () {
	        var token = this.lookahead;
	        var node = this.createNode();
	        var expr = this.parseExpression();
	        var directive = (expr.type === syntax_1.Syntax.Literal) ? this.getTokenRaw(token).slice(1, -1) : null;
	        this.consumeSemicolon();
	        return this.finalize(node, directive ? new Node.Directive(expr, directive) : new Node.ExpressionStatement(expr));
	    };
	    Parser.prototype.parseDirectivePrologues = function () {
	        var firstRestricted = null;
	        var body = [];
	        while (true) {
	            var token = this.lookahead;
	            if (token.type !== 8 /* StringLiteral */) {
	                break;
	            }
	            var statement = this.parseDirective();
	            body.push(statement);
	            var directive = statement.directive;
	            if (typeof directive !== 'string') {
	                break;
	            }
	            if (directive === 'use strict') {
	                this.context.strict = true;
	                if (firstRestricted) {
	                    this.tolerateUnexpectedToken(firstRestricted, messages_1.Messages.StrictOctalLiteral);
	                }
	                if (!this.context.allowStrictDirective) {
	                    this.tolerateUnexpectedToken(token, messages_1.Messages.IllegalLanguageModeDirective);
	                }
	            }
	            else {
	                if (!firstRestricted && token.octal) {
	                    firstRestricted = token;
	                }
	            }
	        }
	        return body;
	    };
	    // https://tc39.github.io/ecma262/#sec-method-definitions
	    Parser.prototype.qualifiedPropertyName = function (token) {
	        switch (token.type) {
	            case 3 /* Identifier */:
	            case 8 /* StringLiteral */:
	            case 1 /* BooleanLiteral */:
	            case 5 /* NullLiteral */:
	            case 6 /* NumericLiteral */:
	            case 4 /* Keyword */:
	                return true;
	            case 7 /* Punctuator */:
	                return token.value === '[';
	            default:
	                break;
	        }
	        return false;
	    };
	    Parser.prototype.parseGetterMethod = function () {
	        var node = this.createNode();
	        var isGenerator = false;
	        var previousAllowYield = this.context.allowYield;
	        this.context.allowYield = !isGenerator;
	        var formalParameters = this.parseFormalParameters();
	        if (formalParameters.params.length > 0) {
	            this.tolerateError(messages_1.Messages.BadGetterArity);
	        }
	        var method = this.parsePropertyMethod(formalParameters);
	        this.context.allowYield = previousAllowYield;
	        return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator));
	    };
	    Parser.prototype.parseSetterMethod = function () {
	        var node = this.createNode();
	        var isGenerator = false;
	        var previousAllowYield = this.context.allowYield;
	        this.context.allowYield = !isGenerator;
	        var formalParameters = this.parseFormalParameters();
	        if (formalParameters.params.length !== 1) {
	            this.tolerateError(messages_1.Messages.BadSetterArity);
	        }
	        else if (formalParameters.params[0] instanceof Node.RestElement) {
	            this.tolerateError(messages_1.Messages.BadSetterRestParameter);
	        }
	        var method = this.parsePropertyMethod(formalParameters);
	        this.context.allowYield = previousAllowYield;
	        return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator));
	    };
	    Parser.prototype.parseGeneratorMethod = function () {
	        var node = this.createNode();
	        var isGenerator = true;
	        var previousAllowYield = this.context.allowYield;
	        this.context.allowYield = true;
	        var params = this.parseFormalParameters();
	        this.context.allowYield = false;
	        var method = this.parsePropertyMethod(params);
	        this.context.allowYield = previousAllowYield;
	        return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator));
	    };
	    // https://tc39.github.io/ecma262/#sec-generator-function-definitions
	    Parser.prototype.isStartOfExpression = function () {
	        var start = true;
	        var value = this.lookahead.value;
	        switch (this.lookahead.type) {
	            case 7 /* Punctuator */:
	                start = (value === '[') || (value === '(') || (value === '{') ||
	                    (value === '+') || (value === '-') ||
	                    (value === '!') || (value === '~') ||
	                    (value === '++') || (value === '--') ||
	                    (value === '/') || (value === '/='); // regular expression literal
	                break;
	            case 4 /* Keyword */:
	                start = (value === 'class') || (value === 'delete') ||
	                    (value === 'function') || (value === 'let') || (value === 'new') ||
	                    (value === 'super') || (value === 'this') || (value === 'typeof') ||
	                    (value === 'void') || (value === 'yield');
	                break;
	            default:
	                break;
	        }
	        return start;
	    };
	    Parser.prototype.parseYieldExpression = function () {
	        var node = this.createNode();
	        this.expectKeyword('yield');
	        var argument = null;
	        var delegate = false;
	        if (!this.hasLineTerminator) {
	            var previousAllowYield = this.context.allowYield;
	            this.context.allowYield = false;
	            delegate = this.match('*');
	            if (delegate) {
	                this.nextToken();
	                argument = this.parseAssignmentExpression();
	            }
	            else if (this.isStartOfExpression()) {
	                argument = this.parseAssignmentExpression();
	            }
	            this.context.allowYield = previousAllowYield;
	        }
	        return this.finalize(node, new Node.YieldExpression(argument, delegate));
	    };
	    // https://tc39.github.io/ecma262/#sec-class-definitions
	    Parser.prototype.parseClassElement = function (hasConstructor) {
	        var token = this.lookahead;
	        var node = this.createNode();
	        var kind = '';
	        var key = null;
	        var value = null;
	        var computed = false;
	        var method = false;
	        var isStatic = false;
	        var isAsync = false;
	        if (this.match('*')) {
	            this.nextToken();
	        }
	        else {
	            computed = this.match('[');
	            key = this.parseObjectPropertyKey();
	            var id = key;
	            if (id.name === 'static' && (this.qualifiedPropertyName(this.lookahead) || this.match('*'))) {
	                token = this.lookahead;
	                isStatic = true;
	                computed = this.match('[');
	                if (this.match('*')) {
	                    this.nextToken();
	                }
	                else {
	                    key = this.parseObjectPropertyKey();
	                }
	            }
	            if ((token.type === 3 /* Identifier */) && !this.hasLineTerminator && (token.value === 'async')) {
	                var punctuator = this.lookahead.value;
	                if (punctuator !== ':' && punctuator !== '(' && punctuator !== '*') {
	                    isAsync = true;
	                    token = this.lookahead;
	                    key = this.parseObjectPropertyKey();
	                    if (token.type === 3 /* Identifier */ && token.value === 'constructor') {
	                        this.tolerateUnexpectedToken(token, messages_1.Messages.ConstructorIsAsync);
	                    }
	                }
	            }
	        }
	        var lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead);
	        if (token.type === 3 /* Identifier */) {
	            if (token.value === 'get' && lookaheadPropertyKey) {
	                kind = 'get';
	                computed = this.match('[');
	                key = this.parseObjectPropertyKey();
	                this.context.allowYield = false;
	                value = this.parseGetterMethod();
	            }
	            else if (token.value === 'set' && lookaheadPropertyKey) {
	                kind = 'set';
	                computed = this.match('[');
	                key = this.parseObjectPropertyKey();
	                value = this.parseSetterMethod();
	            }
	        }
	        else if (token.type === 7 /* Punctuator */ && token.value === '*' && lookaheadPropertyKey) {
	            kind = 'init';
	            computed = this.match('[');
	            key = this.parseObjectPropertyKey();
	            value = this.parseGeneratorMethod();
	            method = true;
	        }
	        if (!kind && key && this.match('(')) {
	            kind = 'init';
	            value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction();
	            method = true;
	        }
	        if (!kind) {
	            this.throwUnexpectedToken(this.lookahead);
	        }
	        if (kind === 'init') {
	            kind = 'method';
	        }
	        if (!computed) {
	            if (isStatic && this.isPropertyKey(key, 'prototype')) {
	                this.throwUnexpectedToken(token, messages_1.Messages.StaticPrototype);
	            }
	            if (!isStatic && this.isPropertyKey(key, 'constructor')) {
	                if (kind !== 'method' || !method || (value && value.generator)) {
	                    this.throwUnexpectedToken(token, messages_1.Messages.ConstructorSpecialMethod);
	                }
	                if (hasConstructor.value) {
	                    this.throwUnexpectedToken(token, messages_1.Messages.DuplicateConstructor);
	                }
	                else {
	                    hasConstructor.value = true;
	                }
	                kind = 'constructor';
	            }
	        }
	        return this.finalize(node, new Node.MethodDefinition(key, computed, value, kind, isStatic));
	    };
	    Parser.prototype.parseClassElementList = function () {
	        var body = [];
	        var hasConstructor = { value: false };
	        this.expect('{');
	        while (!this.match('}')) {
	            if (this.match(';')) {
	                this.nextToken();
	            }
	            else {
	                body.push(this.parseClassElement(hasConstructor));
	            }
	        }
	        this.expect('}');
	        return body;
	    };
	    Parser.prototype.parseClassBody = function () {
	        var node = this.createNode();
	        var elementList = this.parseClassElementList();
	        return this.finalize(node, new Node.ClassBody(elementList));
	    };
	    Parser.prototype.parseClassDeclaration = function (identifierIsOptional) {
	        var node = this.createNode();
	        var previousStrict = this.context.strict;
	        this.context.strict = true;
	        this.expectKeyword('class');
	        var id = (identifierIsOptional && (this.lookahead.type !== 3 /* Identifier */)) ? null : this.parseVariableIdentifier();
	        var superClass = null;
	        if (this.matchKeyword('extends')) {
	            this.nextToken();
	            superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall);
	        }
	        var classBody = this.parseClassBody();
	        this.context.strict = previousStrict;
	        return this.finalize(node, new Node.ClassDeclaration(id, superClass, classBody));
	    };
	    Parser.prototype.parseClassExpression = function () {
	        var node = this.createNode();
	        var previousStrict = this.context.strict;
	        this.context.strict = true;
	        this.expectKeyword('class');
	        var id = (this.lookahead.type === 3 /* Identifier */) ? this.parseVariableIdentifier() : null;
	        var superClass = null;
	        if (this.matchKeyword('extends')) {
	            this.nextToken();
	            superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall);
	        }
	        var classBody = this.parseClassBody();
	        this.context.strict = previousStrict;
	        return this.finalize(node, new Node.ClassExpression(id, superClass, classBody));
	    };
	    // https://tc39.github.io/ecma262/#sec-scripts
	    // https://tc39.github.io/ecma262/#sec-modules
	    Parser.prototype.parseModule = function () {
	        this.context.strict = true;
	        this.context.isModule = true;
	        this.scanner.isModule = true;
	        var node = this.createNode();
	        var body = this.parseDirectivePrologues();
	        while (this.lookahead.type !== 2 /* EOF */) {
	            body.push(this.parseStatementListItem());
	        }
	        return this.finalize(node, new Node.Module(body));
	    };
	    Parser.prototype.parseScript = function () {
	        var node = this.createNode();
	        var body = this.parseDirectivePrologues();
	        while (this.lookahead.type !== 2 /* EOF */) {
	            body.push(this.parseStatementListItem());
	        }
	        return this.finalize(node, new Node.Script(body));
	    };
	    // https://tc39.github.io/ecma262/#sec-imports
	    Parser.prototype.parseModuleSpecifier = function () {
	        var node = this.createNode();
	        if (this.lookahead.type !== 8 /* StringLiteral */) {
	            this.throwError(messages_1.Messages.InvalidModuleSpecifier);
	        }
	        var token = this.nextToken();
	        var raw = this.getTokenRaw(token);
	        return this.finalize(node, new Node.Literal(token.value, raw));
	    };
	    // import {<foo as bar>} ...;
	    Parser.prototype.parseImportSpecifier = function () {
	        var node = this.createNode();
	        var imported;
	        var local;
	        if (this.lookahead.type === 3 /* Identifier */) {
	            imported = this.parseVariableIdentifier();
	            local = imported;
	            if (this.matchContextualKeyword('as')) {
	                this.nextToken();
	                local = this.parseVariableIdentifier();
	            }
	        }
	        else {
	            imported = this.parseIdentifierName();
	            local = imported;
	            if (this.matchContextualKeyword('as')) {
	                this.nextToken();
	                local = this.parseVariableIdentifier();
	            }
	            else {
	                this.throwUnexpectedToken(this.nextToken());
	            }
	        }
	        return this.finalize(node, new Node.ImportSpecifier(local, imported));
	    };
	    // {foo, bar as bas}
	    Parser.prototype.parseNamedImports = function () {
	        this.expect('{');
	        var specifiers = [];
	        while (!this.match('}')) {
	            specifiers.push(this.parseImportSpecifier());
	            if (!this.match('}')) {
	                this.expect(',');
	            }
	        }
	        this.expect('}');
	        return specifiers;
	    };
	    // import <foo> ...;
	    Parser.prototype.parseImportDefaultSpecifier = function () {
	        var node = this.createNode();
	        var local = this.parseIdentifierName();
	        return this.finalize(node, new Node.ImportDefaultSpecifier(local));
	    };
	    // import <* as foo> ...;
	    Parser.prototype.parseImportNamespaceSpecifier = function () {
	        var node = this.createNode();
	        this.expect('*');
	        if (!this.matchContextualKeyword('as')) {
	            this.throwError(messages_1.Messages.NoAsAfterImportNamespace);
	        }
	        this.nextToken();
	        var local = this.parseIdentifierName();
	        return this.finalize(node, new Node.ImportNamespaceSpecifier(local));
	    };
	    Parser.prototype.parseImportDeclaration = function () {
	        if (this.context.inFunctionBody) {
	            this.throwError(messages_1.Messages.IllegalImportDeclaration);
	        }
	        var node = this.createNode();
	        this.expectKeyword('import');
	        var src;
	        var specifiers = [];
	        if (this.lookahead.type === 8 /* StringLiteral */) {
	            // import 'foo';
	            src = this.parseModuleSpecifier();
	        }
	        else {
	            if (this.match('{')) {
	                // import {bar}
	                specifiers = specifiers.concat(this.parseNamedImports());
	            }
	            else if (this.match('*')) {
	                // import * as foo
	                specifiers.push(this.parseImportNamespaceSpecifier());
	            }
	            else if (this.isIdentifierName(this.lookahead) && !this.matchKeyword('default')) {
	                // import foo
	                specifiers.push(this.parseImportDefaultSpecifier());
	                if (this.match(',')) {
	                    this.nextToken();
	                    if (this.match('*')) {
	                        // import foo, * as foo
	                        specifiers.push(this.parseImportNamespaceSpecifier());
	                    }
	                    else if (this.match('{')) {
	                        // import foo, {bar}
	                        specifiers = specifiers.concat(this.parseNamedImports());
	                    }
	                    else {
	                        this.throwUnexpectedToken(this.lookahead);
	                    }
	                }
	            }
	            else {
	                this.throwUnexpectedToken(this.nextToken());
	            }
	            if (!this.matchContextualKeyword('from')) {
	                var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause;
	                this.throwError(message, this.lookahead.value);
	            }
	            this.nextToken();
	            src = this.parseModuleSpecifier();
	        }
	        this.consumeSemicolon();
	        return this.finalize(node, new Node.ImportDeclaration(specifiers, src));
	    };
	    // https://tc39.github.io/ecma262/#sec-exports
	    Parser.prototype.parseExportSpecifier = function () {
	        var node = this.createNode();
	        var local = this.parseIdentifierName();
	        var exported = local;
	        if (this.matchContextualKeyword('as')) {
	            this.nextToken();
	            exported = this.parseIdentifierName();
	        }
	        return this.finalize(node, new Node.ExportSpecifier(local, exported));
	    };
	    Parser.prototype.parseExportDeclaration = function () {
	        if (this.context.inFunctionBody) {
	            this.throwError(messages_1.Messages.IllegalExportDeclaration);
	        }
	        var node = this.createNode();
	        this.expectKeyword('export');
	        var exportDeclaration;
	        if (this.matchKeyword('default')) {
	            // export default ...
	            this.nextToken();
	            if (this.matchKeyword('function')) {
	                // export default function foo () {}
	                // export default function () {}
	                var declaration = this.parseFunctionDeclaration(true);
	                exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration));
	            }
	            else if (this.matchKeyword('class')) {
	                // export default class foo {}
	                var declaration = this.parseClassDeclaration(true);
	                exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration));
	            }
	            else if (this.matchContextualKeyword('async')) {
	                // export default async function f () {}
	                // export default async function () {}
	                // export default async x => x
	                var declaration = this.matchAsyncFunction() ? this.parseFunctionDeclaration(true) : this.parseAssignmentExpression();
	                exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration));
	            }
	            else {
	                if (this.matchContextualKeyword('from')) {
	                    this.throwError(messages_1.Messages.UnexpectedToken, this.lookahead.value);
	                }
	                // export default {};
	                // export default [];
	                // export default (1 + 2);
	                var declaration = this.match('{') ? this.parseObjectInitializer() :
	                    this.match('[') ? this.parseArrayInitializer() : this.parseAssignmentExpression();
	                this.consumeSemicolon();
	                exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration));
	            }
	        }
	        else if (this.match('*')) {
	            // export * from 'foo';
	            this.nextToken();
	            if (!this.matchContextualKeyword('from')) {
	                var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause;
	                this.throwError(message, this.lookahead.value);
	            }
	            this.nextToken();
	            var src = this.parseModuleSpecifier();
	            this.consumeSemicolon();
	            exportDeclaration = this.finalize(node, new Node.ExportAllDeclaration(src));
	        }
	        else if (this.lookahead.type === 4 /* Keyword */) {
	            // export var f = 1;
	            var declaration = void 0;
	            switch (this.lookahead.value) {
	                case 'let':
	                case 'const':
	                    declaration = this.parseLexicalDeclaration({ inFor: false });
	                    break;
	                case 'var':
	                case 'class':
	                case 'function':
	                    declaration = this.parseStatementListItem();
	                    break;
	                default:
	                    this.throwUnexpectedToken(this.lookahead);
	            }
	            exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null));
	        }
	        else if (this.matchAsyncFunction()) {
	            var declaration = this.parseFunctionDeclaration();
	            exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null));
	        }
	        else {
	            var specifiers = [];
	            var source = null;
	            var isExportFromIdentifier = false;
	            this.expect('{');
	            while (!this.match('}')) {
	                isExportFromIdentifier = isExportFromIdentifier || this.matchKeyword('default');
	                specifiers.push(this.parseExportSpecifier());
	                if (!this.match('}')) {
	                    this.expect(',');
	                }
	            }
	            this.expect('}');
	            if (this.matchContextualKeyword('from')) {
	                // export {default} from 'foo';
	                // export {foo} from 'foo';
	                this.nextToken();
	                source = this.parseModuleSpecifier();
	                this.consumeSemicolon();
	            }
	            else if (isExportFromIdentifier) {
	                // export {default}; // missing fromClause
	                var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause;
	                this.throwError(message, this.lookahead.value);
	            }
	            else {
	                // export {foo};
	                this.consumeSemicolon();
	            }
	            exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(null, specifiers, source));
	        }
	        return exportDeclaration;
	    };
	    return Parser;
	}());
	exports.Parser = Parser;


/***/ },
/* 9 */
/***/ function(module, exports) {

	"use strict";
	// Ensure the condition is true, otherwise throw an error.
	// This is only to have a better contract semantic, i.e. another safety net
	// to catch a logic error. The condition shall be fulfilled in normal case.
	// Do NOT use this to enforce a certain condition on any user input.
	Object.defineProperty(exports, "__esModule", { value: true });
	function assert(condition, message) {
	    /* istanbul ignore if */
	    if (!condition) {
	        throw new Error('ASSERT: ' + message);
	    }
	}
	exports.assert = assert;


/***/ },
/* 10 */
/***/ function(module, exports) {

	"use strict";
	/* tslint:disable:max-classes-per-file */
	Object.defineProperty(exports, "__esModule", { value: true });
	var ErrorHandler = (function () {
	    function ErrorHandler() {
	        this.errors = [];
	        this.tolerant = false;
	    }
	    ErrorHandler.prototype.recordError = function (error) {
	        this.errors.push(error);
	    };
	    ErrorHandler.prototype.tolerate = function (error) {
	        if (this.tolerant) {
	            this.recordError(error);
	        }
	        else {
	            throw error;
	        }
	    };
	    ErrorHandler.prototype.constructError = function (msg, column) {
	        var error = new Error(msg);
	        try {
	            throw error;
	        }
	        catch (base) {
	            /* istanbul ignore else */
	            if (Object.create && Object.defineProperty) {
	                error = Object.create(base);
	                Object.defineProperty(error, 'column', { value: column });
	            }
	        }
	        /* istanbul ignore next */
	        return error;
	    };
	    ErrorHandler.prototype.createError = function (index, line, col, description) {
	        var msg = 'Line ' + line + ': ' + description;
	        var error = this.constructError(msg, col);
	        error.index = index;
	        error.lineNumber = line;
	        error.description = description;
	        return error;
	    };
	    ErrorHandler.prototype.throwError = function (index, line, col, description) {
	        throw this.createError(index, line, col, description);
	    };
	    ErrorHandler.prototype.tolerateError = function (index, line, col, description) {
	        var error = this.createError(index, line, col, description);
	        if (this.tolerant) {
	            this.recordError(error);
	        }
	        else {
	            throw error;
	        }
	    };
	    return ErrorHandler;
	}());
	exports.ErrorHandler = ErrorHandler;


/***/ },
/* 11 */
/***/ function(module, exports) {

	"use strict";
	Object.defineProperty(exports, "__esModule", { value: true });
	// Error messages should be identical to V8.
	exports.Messages = {
	    BadGetterArity: 'Getter must not have any formal parameters',
	    BadSetterArity: 'Setter must have exactly one formal parameter',
	    BadSetterRestParameter: 'Setter function argument must not be a rest parameter',
	    ConstructorIsAsync: 'Class constructor may not be an async method',
	    ConstructorSpecialMethod: 'Class constructor may not be an accessor',
	    DeclarationMissingInitializer: 'Missing initializer in %0 declaration',
	    DefaultRestParameter: 'Unexpected token =',
	    DuplicateBinding: 'Duplicate binding %0',
	    DuplicateConstructor: 'A class may only have one constructor',
	    DuplicateProtoProperty: 'Duplicate __proto__ fields are not allowed in object literals',
	    ForInOfLoopInitializer: '%0 loop variable declaration may not have an initializer',
	    GeneratorInLegacyContext: 'Generator declarations are not allowed in legacy contexts',
	    IllegalBreak: 'Illegal break statement',
	    IllegalContinue: 'Illegal continue statement',
	    IllegalExportDeclaration: 'Unexpected token',
	    IllegalImportDeclaration: 'Unexpected token',
	    IllegalLanguageModeDirective: 'Illegal \'use strict\' directive in function with non-simple parameter list',
	    IllegalReturn: 'Illegal return statement',
	    InvalidEscapedReservedWord: 'Keyword must not contain escaped characters',
	    InvalidHexEscapeSequence: 'Invalid hexadecimal escape sequence',
	    InvalidLHSInAssignment: 'Invalid left-hand side in assignment',
	    InvalidLHSInForIn: 'Invalid left-hand side in for-in',
	    InvalidLHSInForLoop: 'Invalid left-hand side in for-loop',
	    InvalidModuleSpecifier: 'Unexpected token',
	    InvalidRegExp: 'Invalid regular expression',
	    LetInLexicalBinding: 'let is disallowed as a lexically bound name',
	    MissingFromClause: 'Unexpected token',
	    MultipleDefaultsInSwitch: 'More than one default clause in switch statement',
	    NewlineAfterThrow: 'Illegal newline after throw',
	    NoAsAfterImportNamespace: 'Unexpected token',
	    NoCatchOrFinally: 'Missing catch or finally after try',
	    ParameterAfterRestParameter: 'Rest parameter must be last formal parameter',
	    Redeclaration: '%0 \'%1\' has already been declared',
	    StaticPrototype: 'Classes may not have static property named prototype',
	    StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode',
	    StrictDelete: 'Delete of an unqualified identifier in strict mode.',
	    StrictFunction: 'In strict mode code, functions can only be declared at top level or inside a block',
	    StrictFunctionName: 'Function name may not be eval or arguments in strict mode',
	    StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode',
	    StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode',
	    StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode',
	    StrictModeWith: 'Strict mode code may not include a with statement',
	    StrictOctalLiteral: 'Octal literals are not allowed in strict mode.',
	    StrictParamDupe: 'Strict mode function may not have duplicate parameter names',
	    StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode',
	    StrictReservedWord: 'Use of future reserved word in strict mode',
	    StrictVarName: 'Variable name may not be eval or arguments in strict mode',
	    TemplateOctalLiteral: 'Octal literals are not allowed in template strings.',
	    UnexpectedEOS: 'Unexpected end of input',
	    UnexpectedIdentifier: 'Unexpected identifier',
	    UnexpectedNumber: 'Unexpected number',
	    UnexpectedReserved: 'Unexpected reserved word',
	    UnexpectedString: 'Unexpected string',
	    UnexpectedTemplate: 'Unexpected quasi %0',
	    UnexpectedToken: 'Unexpected token %0',
	    UnexpectedTokenIllegal: 'Unexpected token ILLEGAL',
	    UnknownLabel: 'Undefined label \'%0\'',
	    UnterminatedRegExp: 'Invalid regular expression: missing /'
	};


/***/ },
/* 12 */
/***/ function(module, exports, __webpack_require__) {

	"use strict";
	Object.defineProperty(exports, "__esModule", { value: true });
	var assert_1 = __webpack_require__(9);
	var character_1 = __webpack_require__(4);
	var messages_1 = __webpack_require__(11);
	function hexValue(ch) {
	    return '0123456789abcdef'.indexOf(ch.toLowerCase());
	}
	function octalValue(ch) {
	    return '01234567'.indexOf(ch);
	}
	var Scanner = (function () {
	    function Scanner(code, handler) {
	        this.source = code;
	        this.errorHandler = handler;
	        this.trackComment = false;
	        this.isModule = false;
	        this.length = code.length;
	        this.index = 0;
	        this.lineNumber = (code.length > 0) ? 1 : 0;
	        this.lineStart = 0;
	        this.curlyStack = [];
	    }
	    Scanner.prototype.saveState = function () {
	        return {
	            index: this.index,
	            lineNumber: this.lineNumber,
	            lineStart: this.lineStart
	        };
	    };
	    Scanner.prototype.restoreState = function (state) {
	        this.index = state.index;
	        this.lineNumber = state.lineNumber;
	        this.lineStart = state.lineStart;
	    };
	    Scanner.prototype.eof = function () {
	        return this.index >= this.length;
	    };
	    Scanner.prototype.throwUnexpectedToken = function (message) {
	        if (message === void 0) { message = messages_1.Messages.UnexpectedTokenIllegal; }
	        return this.errorHandler.throwError(this.index, this.lineNumber, this.index - this.lineStart + 1, message);
	    };
	    Scanner.prototype.tolerateUnexpectedToken = function (message) {
	        if (message === void 0) { message = messages_1.Messages.UnexpectedTokenIllegal; }
	        this.errorHandler.tolerateError(this.index, this.lineNumber, this.index - this.lineStart + 1, message);
	    };
	    // https://tc39.github.io/ecma262/#sec-comments
	    Scanner.prototype.skipSingleLineComment = function (offset) {
	        var comments = [];
	        var start, loc;
	        if (this.trackComment) {
	            comments = [];
	            start = this.index - offset;
	            loc = {
	                start: {
	                    line: this.lineNumber,
	                    column: this.index - this.lineStart - offset
	                },
	                end: {}
	            };
	        }
	        while (!this.eof()) {
	            var ch = this.source.charCodeAt(this.index);
	            ++this.index;
	            if (character_1.Character.isLineTerminator(ch)) {
	                if (this.trackComment) {
	                    loc.end = {
	                        line: this.lineNumber,
	                        column: this.index - this.lineStart - 1
	                    };
	                    var entry = {
	                        multiLine: false,
	                        slice: [start + offset, this.index - 1],
	                        range: [start, this.index - 1],
	                        loc: loc
	                    };
	                    comments.push(entry);
	                }
	                if (ch === 13 && this.source.charCodeAt(this.index) === 10) {
	                    ++this.index;
	                }
	                ++this.lineNumber;
	                this.lineStart = this.index;
	                return comments;
	            }
	        }
	        if (this.trackComment) {
	            loc.end = {
	                line: this.lineNumber,
	                column: this.index - this.lineStart
	            };
	            var entry = {
	                multiLine: false,
	                slice: [start + offset, this.index],
	                range: [start, this.index],
	                loc: loc
	            };
	            comments.push(entry);
	        }
	        return comments;
	    };
	    Scanner.prototype.skipMultiLineComment = function () {
	        var comments = [];
	        var start, loc;
	        if (this.trackComment) {
	            comments = [];
	            start = this.index - 2;
	            loc = {
	                start: {
	                    line: this.lineNumber,
	                    column: this.index - this.lineStart - 2
	                },
	                end: {}
	            };
	        }
	        while (!this.eof()) {
	            var ch = this.source.charCodeAt(this.index);
	            if (character_1.Character.isLineTerminator(ch)) {
	                if (ch === 0x0D && this.source.charCodeAt(this.index + 1) === 0x0A) {
	                    ++this.index;
	                }
	                ++this.lineNumber;
	                ++this.index;
	                this.lineStart = this.index;
	            }
	            else if (ch === 0x2A) {
	                // Block comment ends with '*/'.
	                if (this.source.charCodeAt(this.index + 1) === 0x2F) {
	                    this.index += 2;
	                    if (this.trackComment) {
	                        loc.end = {
	                            line: this.lineNumber,
	                            column: this.index - this.lineStart
	                        };
	                        var entry = {
	                            multiLine: true,
	                            slice: [start + 2, this.index - 2],
	                            range: [start, this.index],
	                            loc: loc
	                        };
	                        comments.push(entry);
	                    }
	                    return comments;
	                }
	                ++this.index;
	            }
	            else {
	                ++this.index;
	            }
	        }
	        // Ran off the end of the file - the whole thing is a comment
	        if (this.trackComment) {
	            loc.end = {
	                line: this.lineNumber,
	                column: this.index - this.lineStart
	            };
	            var entry = {
	                multiLine: true,
	                slice: [start + 2, this.index],
	                range: [start, this.index],
	                loc: loc
	            };
	            comments.push(entry);
	        }
	        this.tolerateUnexpectedToken();
	        return comments;
	    };
	    Scanner.prototype.scanComments = function () {
	        var comments;
	        if (this.trackComment) {
	            comments = [];
	        }
	        var start = (this.index === 0);
	        while (!this.eof()) {
	            var ch = this.source.charCodeAt(this.index);
	            if (character_1.Character.isWhiteSpace(ch)) {
	                ++this.index;
	            }
	            else if (character_1.Character.isLineTerminator(ch)) {
	                ++this.index;
	                if (ch === 0x0D && this.source.charCodeAt(this.index) === 0x0A) {
	                    ++this.index;
	                }
	                ++this.lineNumber;
	                this.lineStart = this.index;
	                start = true;
	            }
	            else if (ch === 0x2F) {
	                ch = this.source.charCodeAt(this.index + 1);
	                if (ch === 0x2F) {
	                    this.index += 2;
	                    var comment = this.skipSingleLineComment(2);
	                    if (this.trackComment) {
	                        comments = comments.concat(comment);
	                    }
	                    start = true;
	                }
	                else if (ch === 0x2A) {
	                    this.index += 2;
	                    var comment = this.skipMultiLineComment();
	                    if (this.trackComment) {
	                        comments = comments.concat(comment);
	                    }
	                }
	                else {
	                    break;
	                }
	            }
	            else if (start && ch === 0x2D) {
	                // U+003E is '>'
	                if ((this.source.charCodeAt(this.index + 1) === 0x2D) && (this.source.charCodeAt(this.index + 2) === 0x3E)) {
	                    // '-->' is a single-line comment
	                    this.index += 3;
	                    var comment = this.skipSingleLineComment(3);
	                    if (this.trackComment) {
	                        comments = comments.concat(comment);
	                    }
	                }
	                else {
	                    break;
	                }
	            }
	            else if (ch === 0x3C && !this.isModule) {
	                if (this.source.slice(this.index + 1, this.index + 4) === '!--') {
	                    this.index += 4; // `<!--`
	                    var comment = this.skipSingleLineComment(4);
	                    if (this.trackComment) {
	                        comments = comments.concat(comment);
	                    }
	                }
	                else {
	                    break;
	                }
	            }
	            else {
	                break;
	            }
	        }
	        return comments;
	    };
	    // https://tc39.github.io/ecma262/#sec-future-reserved-words
	    Scanner.prototype.isFutureReservedWord = function (id) {
	        switch (id) {
	            case 'enum':
	            case 'export':
	            case 'import':
	            case 'super':
	                return true;
	            default:
	                return false;
	        }
	    };
	    Scanner.prototype.isStrictModeReservedWord = function (id) {
	        switch (id) {
	            case 'implements':
	            case 'interface':
	            case 'package':
	            case 'private':
	            case 'protected':
	            case 'public':
	            case 'static':
	            case 'yield':
	            case 'let':
	                return true;
	            default:
	                return false;
	        }
	    };
	    Scanner.prototype.isRestrictedWord = function (id) {
	        return id === 'eval' || id === 'arguments';
	    };
	    // https://tc39.github.io/ecma262/#sec-keywords
	    Scanner.prototype.isKeyword = function (id) {
	        switch (id.length) {
	            case 2:
	                return (id === 'if') || (id === 'in') || (id === 'do');
	            case 3:
	                return (id === 'var') || (id === 'for') || (id === 'new') ||
	                    (id === 'try') || (id === 'let');
	            case 4:
	                return (id === 'this') || (id === 'else') || (id === 'case') ||
	                    (id === 'void') || (id === 'with') || (id === 'enum');
	            case 5:
	                return (id === 'while') || (id === 'break') || (id === 'catch') ||
	                    (id === 'throw') || (id === 'const') || (id === 'yield') ||
	                    (id === 'class') || (id === 'super');
	            case 6:
	                return (id === 'return') || (id === 'typeof') || (id === 'delete') ||
	                    (id === 'switch') || (id === 'export') || (id === 'import');
	            case 7:
	                return (id === 'default') || (id === 'finally') || (id === 'extends');
	            case 8:
	                return (id === 'function') || (id === 'continue') || (id === 'debugger');
	            case 10:
	                return (id === 'instanceof');
	            default:
	                return false;
	        }
	    };
	    Scanner.prototype.codePointAt = function (i) {
	        var cp = this.source.charCodeAt(i);
	        if (cp >= 0xD800 && cp <= 0xDBFF) {
	            var second = this.source.charCodeAt(i + 1);
	            if (second >= 0xDC00 && second <= 0xDFFF) {
	                var first = cp;
	                cp = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
	            }
	        }
	        return cp;
	    };
	    Scanner.prototype.scanHexEscape = function (prefix) {
	        var len = (prefix === 'u') ? 4 : 2;
	        var code = 0;
	        for (var i = 0; i < len; ++i) {
	            if (!this.eof() && character_1.Character.isHexDigit(this.source.charCodeAt(this.index))) {
	                code = code * 16 + hexValue(this.source[this.index++]);
	            }
	            else {
	                return null;
	            }
	        }
	        return String.fromCharCode(code);
	    };
	    Scanner.prototype.scanUnicodeCodePointEscape = function () {
	        var ch = this.source[this.index];
	        var code = 0;
	        // At least, one hex digit is required.
	        if (ch === '}') {
	            this.throwUnexpectedToken();
	        }
	        while (!this.eof()) {
	            ch = this.source[this.index++];
	            if (!character_1.Character.isHexDigit(ch.charCodeAt(0))) {
	                break;
	            }
	            code = code * 16 + hexValue(ch);
	        }
	        if (code > 0x10FFFF || ch !== '}') {
	            this.throwUnexpectedToken();
	        }
	        return character_1.Character.fromCodePoint(code);
	    };
	    Scanner.prototype.getIdentifier = function () {
	        var start = this.index++;
	        while (!this.eof()) {
	            var ch = this.source.charCodeAt(this.index);
	            if (ch === 0x5C) {
	                // Blackslash (U+005C) marks Unicode escape sequence.
	                this.index = start;
	                return this.getComplexIdentifier();
	            }
	            else if (ch >= 0xD800 && ch < 0xDFFF) {
	                // Need to handle surrogate pairs.
	                this.index = start;
	                return this.getComplexIdentifier();
	            }
	            if (character_1.Character.isIdentifierPart(ch)) {
	                ++this.index;
	            }
	            else {
	                break;
	            }
	        }
	        return this.source.slice(start, this.index);
	    };
	    Scanner.prototype.getComplexIdentifier = function () {
	        var cp = this.codePointAt(this.index);
	        var id = character_1.Character.fromCodePoint(cp);
	        this.index += id.length;
	        // '\u' (U+005C, U+0075) denotes an escaped character.
	        var ch;
	        if (cp === 0x5C) {
	            if (this.source.charCodeAt(this.index) !== 0x75) {
	                this.throwUnexpectedToken();
	            }
	            ++this.index;
	            if (this.source[this.index] === '{') {
	                ++this.index;
	                ch = this.scanUnicodeCodePointEscape();
	            }
	            else {
	                ch = this.scanHexEscape('u');
	                if (ch === null || ch === '\\' || !character_1.Character.isIdentifierStart(ch.charCodeAt(0))) {
	                    this.throwUnexpectedToken();
	                }
	            }
	            id = ch;
	        }
	        while (!this.eof()) {
	            cp = this.codePointAt(this.index);
	            if (!character_1.Character.isIdentifierPart(cp)) {
	                break;
	            }
	            ch = character_1.Character.fromCodePoint(cp);
	            id += ch;
	            this.index += ch.length;
	            // '\u' (U+005C, U+0075) denotes an escaped character.
	            if (cp === 0x5C) {
	                id = id.substr(0, id.length - 1);
	                if (this.source.charCodeAt(this.index) !== 0x75) {
	                    this.throwUnexpectedToken();
	                }
	                ++this.index;
	                if (this.source[this.index] === '{') {
	                    ++this.index;
	                    ch = this.scanUnicodeCodePointEscape();
	                }
	                else {
	                    ch = this.scanHexEscape('u');
	                    if (ch === null || ch === '\\' || !character_1.Character.isIdentifierPart(ch.charCodeAt(0))) {
	                        this.throwUnexpectedToken();
	                    }
	                }
	                id += ch;
	            }
	        }
	        return id;
	    };
	    Scanner.prototype.octalToDecimal = function (ch) {
	        // \0 is not octal escape sequence
	        var octal = (ch !== '0');
	        var code = octalValue(ch);
	        if (!this.eof() && character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))) {
	            octal = true;
	            code = code * 8 + octalValue(this.source[this.index++]);
	            // 3 digits are only allowed when string starts
	            // with 0, 1, 2, 3
	            if ('0123'.indexOf(ch) >= 0 && !this.eof() && character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))) {
	                code = code * 8 + octalValue(this.source[this.index++]);
	            }
	        }
	        return {
	            code: code,
	            octal: octal
	        };
	    };
	    // https://tc39.github.io/ecma262/#sec-names-and-keywords
	    Scanner.prototype.scanIdentifier = function () {
	        var type;
	        var start = this.index;
	        // Backslash (U+005C) starts an escaped character.
	        var id = (this.source.charCodeAt(start) === 0x5C) ? this.getComplexIdentifier() : this.getIdentifier();
	        // There is no keyword or literal with only one character.
	        // Thus, it must be an identifier.
	        if (id.length === 1) {
	            type = 3 /* Identifier */;
	        }
	        else if (this.isKeyword(id)) {
	            type = 4 /* Keyword */;
	        }
	        else if (id === 'null') {
	            type = 5 /* NullLiteral */;
	        }
	        else if (id === 'true' || id === 'false') {
	            type = 1 /* BooleanLiteral */;
	        }
	        else {
	            type = 3 /* Identifier */;
	        }
	        if (type !== 3 /* Identifier */ && (start + id.length !== this.index)) {
	            var restore = this.index;
	            this.index = start;
	            this.tolerateUnexpectedToken(messages_1.Messages.InvalidEscapedReservedWord);
	            this.index = restore;
	        }
	        return {
	            type: type,
	            value: id,
	            lineNumber: this.lineNumber,
	            lineStart: this.lineStart,
	            start: start,
	            end: this.index
	        };
	    };
	    // https://tc39.github.io/ecma262/#sec-punctuators
	    Scanner.prototype.scanPunctuator = function () {
	        var start = this.index;
	        // Check for most common single-character punctuators.
	        var str = this.source[this.index];
	        switch (str) {
	            case '(':
	            case '{':
	                if (str === '{') {
	                    this.curlyStack.push('{');
	                }
	                ++this.index;
	                break;
	            case '.':
	                ++this.index;
	                if (this.source[this.index] === '.' && this.source[this.index + 1] === '.') {
	                    // Spread operator: ...
	                    this.index += 2;
	                    str = '...';
	                }
	                break;
	            case '}':
	                ++this.index;
	                this.curlyStack.pop();
	                break;
	            case ')':
	            case ';':
	            case ',':
	            case '[':
	            case ']':
	            case ':':
	            case '?':
	            case '~':
	                ++this.index;
	                break;
	            default:
	                // 4-character punctuator.
	                str = this.source.substr(this.index, 4);
	                if (str === '>>>=') {
	                    this.index += 4;
	                }
	                else {
	                    // 3-character punctuators.
	                    str = str.substr(0, 3);
	                    if (str === '===' || str === '!==' || str === '>>>' ||
	                        str === '<<=' || str === '>>=' || str === '**=') {
	                        this.index += 3;
	                    }
	                    else {
	                        // 2-character punctuators.
	                        str = str.substr(0, 2);
	                        if (str === '&&' || str === '||' || str === '==' || str === '!=' ||
	                            str === '+=' || str === '-=' || str === '*=' || str === '/=' ||
	                            str === '++' || str === '--' || str === '<<' || str === '>>' ||
	                            str === '&=' || str === '|=' || str === '^=' || str === '%=' ||
	                            str === '<=' || str === '>=' || str === '=>' || str === '**') {
	                            this.index += 2;
	                        }
	                        else {
	                            // 1-character punctuators.
	                            str = this.source[this.index];
	                            if ('<>=!+-*%&|^/'.indexOf(str) >= 0) {
	                                ++this.index;
	                            }
	                        }
	                    }
	                }
	        }
	        if (this.index === start) {
	            this.throwUnexpectedToken();
	        }
	        return {
	            type: 7 /* Punctuator */,
	            value: str,
	            lineNumber: this.lineNumber,
	            lineStart: this.lineStart,
	            start: start,
	            end: this.index
	        };
	    };
	    // https://tc39.github.io/ecma262/#sec-literals-numeric-literals
	    Scanner.prototype.scanHexLiteral = function (start) {
	        var num = '';
	        while (!this.eof()) {
	            if (!character_1.Character.isHexDigit(this.source.charCodeAt(this.index))) {
	                break;
	            }
	            num += this.source[this.index++];
	        }
	        if (num.length === 0) {
	            this.throwUnexpectedToken();
	        }
	        if (character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index))) {
	            this.throwUnexpectedToken();
	        }
	        return {
	            type: 6 /* NumericLiteral */,
	            value: parseInt('0x' + num, 16),
	            lineNumber: this.lineNumber,
	            lineStart: this.lineStart,
	            start: start,
	            end: this.index
	        };
	    };
	    Scanner.prototype.scanBinaryLiteral = function (start) {
	        var num = '';
	        var ch;
	        while (!this.eof()) {
	            ch = this.source[this.index];
	            if (ch !== '0' && ch !== '1') {
	                break;
	            }
	            num += this.source[this.index++];
	        }
	        if (num.length === 0) {
	            // only 0b or 0B
	            this.throwUnexpectedToken();
	        }
	        if (!this.eof()) {
	            ch = this.source.charCodeAt(this.index);
	            /* istanbul ignore else */
	            if (character_1.Character.isIdentifierStart(ch) || character_1.Character.isDecimalDigit(ch)) {
	                this.throwUnexpectedToken();
	            }
	        }
	        return {
	            type: 6 /* NumericLiteral */,
	            value: parseInt(num, 2),
	            lineNumber: this.lineNumber,
	            lineStart: this.lineStart,
	            start: start,
	            end: this.index
	        };
	    };
	    Scanner.prototype.scanOctalLiteral = function (prefix, start) {
	        var num = '';
	        var octal = false;
	        if (character_1.Character.isOctalDigit(prefix.charCodeAt(0))) {
	            octal = true;
	            num = '0' + this.source[this.index++];
	        }
	        else {
	            ++this.index;
	        }
	        while (!this.eof()) {
	            if (!character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))) {
	                break;
	            }
	            num += this.source[this.index++];
	        }
	        if (!octal && num.length === 0) {
	            // only 0o or 0O
	            this.throwUnexpectedToken();
	        }
	        if (character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index)) || character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
	            this.throwUnexpectedToken();
	        }
	        return {
	            type: 6 /* NumericLiteral */,
	            value: parseInt(num, 8),
	            octal: octal,
	            lineNumber: this.lineNumber,
	            lineStart: this.lineStart,
	            start: start,
	            end: this.index
	        };
	    };
	    Scanner.prototype.isImplicitOctalLiteral = function () {
	        // Implicit octal, unless there is a non-octal digit.
	        // (Annex B.1.1 on Numeric Literals)
	        for (var i = this.index + 1; i < this.length; ++i) {
	            var ch = this.source[i];
	            if (ch === '8' || ch === '9') {
	                return false;
	            }
	            if (!character_1.Character.isOctalDigit(ch.charCodeAt(0))) {
	                return true;
	            }
	        }
	        return true;
	    };
	    Scanner.prototype.scanNumericLiteral = function () {
	        var start = this.index;
	        var ch = this.source[start];
	        assert_1.assert(character_1.Character.isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'), 'Numeric literal must start with a decimal digit or a decimal point');
	        var num = '';
	        if (ch !== '.') {
	            num = this.source[this.index++];
	            ch = this.source[this.index];
	            // Hex number starts with '0x'.
	            // Octal number starts with '0'.
	            // Octal number in ES6 starts with '0o'.
	            // Binary number in ES6 starts with '0b'.
	            if (num === '0') {
	                if (ch === 'x' || ch === 'X') {
	                    ++this.index;
	                    return this.scanHexLiteral(start);
	                }
	                if (ch === 'b' || ch === 'B') {
	                    ++this.index;
	                    return this.scanBinaryLiteral(start);
	                }
	                if (ch === 'o' || ch === 'O') {
	                    return this.scanOctalLiteral(ch, start);
	                }
	                if (ch && character_1.Character.isOctalDigit(ch.charCodeAt(0))) {
	                    if (this.isImplicitOctalLiteral()) {
	                        return this.scanOctalLiteral(ch, start);
	                    }
	                }
	            }
	            while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
	                num += this.source[this.index++];
	            }
	            ch = this.source[this.index];
	        }
	        if (ch === '.') {
	            num += this.source[this.index++];
	            while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
	                num += this.source[this.index++];
	            }
	            ch = this.source[this.index];
	        }
	        if (ch === 'e' || ch === 'E') {
	            num += this.source[this.index++];
	            ch = this.source[this.index];
	            if (ch === '+' || ch === '-') {
	                num += this.source[this.index++];
	            }
	            if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
	                while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
	                    num += this.source[this.index++];
	                }
	            }
	            else {
	                this.throwUnexpectedToken();
	            }
	        }
	        if (character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index))) {
	            this.throwUnexpectedToken();
	        }
	        return {
	            type: 6 /* NumericLiteral */,
	            value: parseFloat(num),
	            lineNumber: this.lineNumber,
	            lineStart: this.lineStart,
	            start: start,
	            end: this.index
	        };
	    };
	    // https://tc39.github.io/ecma262/#sec-literals-string-literals
	    Scanner.prototype.scanStringLiteral = function () {
	        var start = this.index;
	        var quote = this.source[start];
	        assert_1.assert((quote === '\'' || quote === '"'), 'String literal must starts with a quote');
	        ++this.index;
	        var octal = false;
	        var str = '';
	        while (!this.eof()) {
	            var ch = this.source[this.index++];
	            if (ch === quote) {
	                quote = '';
	                break;
	            }
	            else if (ch === '\\') {
	                ch = this.source[this.index++];
	                if (!ch || !character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
	                    switch (ch) {
	                        case 'u':
	                            if (this.source[this.index] === '{') {
	                                ++this.index;
	                                str += this.scanUnicodeCodePointEscape();
	                            }
	                            else {
	                                var unescaped_1 = this.scanHexEscape(ch);
	                                if (unescaped_1 === null) {
	                                    this.throwUnexpectedToken();
	                                }
	                                str += unescaped_1;
	                            }
	                            break;
	                        case 'x':
	                            var unescaped = this.scanHexEscape(ch);
	                            if (unescaped === null) {
	                                this.throwUnexpectedToken(messages_1.Messages.InvalidHexEscapeSequence);
	                            }
	                            str += unescaped;
	                            break;
	                        case 'n':
	                            str += '\n';
	                            break;
	                        case 'r':
	                            str += '\r';
	                            break;
	                        case 't':
	                            str += '\t';
	                            break;
	                        case 'b':
	                            str += '\b';
	                            break;
	                        case 'f':
	                            str += '\f';
	                            break;
	                        case 'v':
	                            str += '\x0B';
	                            break;
	                        case '8':
	                        case '9':
	                            str += ch;
	                            this.tolerateUnexpectedToken();
	                            break;
	                        default:
	                            if (ch && character_1.Character.isOctalDigit(ch.charCodeAt(0))) {
	                                var octToDec = this.octalToDecimal(ch);
	                                octal = octToDec.octal || octal;
	                                str += String.fromCharCode(octToDec.code);
	                            }
	                            else {
	                                str += ch;
	                            }
	                            break;
	                    }
	                }
	                else {
	                    ++this.lineNumber;
	                    if (ch === '\r' && this.source[this.index] === '\n') {
	                        ++this.index;
	                    }
	                    this.lineStart = this.index;
	                }
	            }
	            else if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
	                break;
	            }
	            else {
	                str += ch;
	            }
	        }
	        if (quote !== '') {
	            this.index = start;
	            this.throwUnexpectedToken();
	        }
	        return {
	            type: 8 /* StringLiteral */,
	            value: str,
	            octal: octal,
	            lineNumber: this.lineNumber,
	            lineStart: this.lineStart,
	            start: start,
	            end: this.index
	        };
	    };
	    // https://tc39.github.io/ecma262/#sec-template-literal-lexical-components
	    Scanner.prototype.scanTemplate = function () {
	        var cooked = '';
	        var terminated = false;
	        var start = this.index;
	        var head = (this.source[start] === '`');
	        var tail = false;
	        var rawOffset = 2;
	        ++this.index;
	        while (!this.eof()) {
	            var ch = this.source[this.index++];
	            if (ch === '`') {
	                rawOffset = 1;
	                tail = true;
	                terminated = true;
	                break;
	            }
	            else if (ch === '$') {
	                if (this.source[this.index] === '{') {
	                    this.curlyStack.push('${');
	                    ++this.index;
	                    terminated = true;
	                    break;
	                }
	                cooked += ch;
	            }
	            else if (ch === '\\') {
	                ch = this.source[this.index++];
	                if (!character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
	                    switch (ch) {
	                        case 'n':
	                            cooked += '\n';
	                            break;
	                        case 'r':
	                            cooked += '\r';
	                            break;
	                        case 't':
	                            cooked += '\t';
	                            break;
	                        case 'u':
	                            if (this.source[this.index] === '{') {
	                                ++this.index;
	                                cooked += this.scanUnicodeCodePointEscape();
	                            }
	                            else {
	                                var restore = this.index;
	                                var unescaped_2 = this.scanHexEscape(ch);
	                                if (unescaped_2 !== null) {
	                                    cooked += unescaped_2;
	                                }
	                                else {
	                                    this.index = restore;
	                                    cooked += ch;
	                                }
	                            }
	                            break;
	                        case 'x':
	                            var unescaped = this.scanHexEscape(ch);
	                            if (unescaped === null) {
	                                this.throwUnexpectedToken(messages_1.Messages.InvalidHexEscapeSequence);
	                            }
	                            cooked += unescaped;
	                            break;
	                        case 'b':
	                            cooked += '\b';
	                            break;
	                        case 'f':
	                            cooked += '\f';
	                            break;
	                        case 'v':
	                            cooked += '\v';
	                            break;
	                        default:
	                            if (ch === '0') {
	                                if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
	                                    // Illegal: \01 \02 and so on
	                                    this.throwUnexpectedToken(messages_1.Messages.TemplateOctalLiteral);
	                                }
	                                cooked += '\0';
	                            }
	                            else if (character_1.Character.isOctalDigit(ch.charCodeAt(0))) {
	                                // Illegal: \1 \2
	                                this.throwUnexpectedToken(messages_1.Messages.TemplateOctalLiteral);
	                            }
	                            else {
	                                cooked += ch;
	                            }
	                            break;
	                    }
	                }
	                else {
	                    ++this.lineNumber;
	                    if (ch === '\r' && this.source[this.index] === '\n') {
	                        ++this.index;
	                    }
	                    this.lineStart = this.index;
	                }
	            }
	            else if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
	                ++this.lineNumber;
	                if (ch === '\r' && this.source[this.index] === '\n') {
	                    ++this.index;
	                }
	                this.lineStart = this.index;
	                cooked += '\n';
	            }
	            else {
	                cooked += ch;
	            }
	        }
	        if (!terminated) {
	            this.throwUnexpectedToken();
	        }
	        if (!head) {
	            this.curlyStack.pop();
	        }
	        return {
	            type: 10 /* Template */,
	            value: this.source.slice(start + 1, this.index - rawOffset),
	            cooked: cooked,
	            head: head,
	            tail: tail,
	            lineNumber: this.lineNumber,
	            lineStart: this.lineStart,
	            start: start,
	            end: this.index
	        };
	    };
	    // https://tc39.github.io/ecma262/#sec-literals-regular-expression-literals
	    Scanner.prototype.testRegExp = function (pattern, flags) {
	        // The BMP character to use as a replacement for astral symbols when
	        // translating an ES6 "u"-flagged pattern to an ES5-compatible
	        // approximation.
	        // Note: replacing with '\uFFFF' enables false positives in unlikely
	        // scenarios. For example, `[\u{1044f}-\u{10440}]` is an invalid
	        // pattern that would not be detected by this substitution.
	        var astralSubstitute = '\uFFFF';
	        var tmp = pattern;
	        var self = this;
	        if (flags.indexOf('u') >= 0) {
	            tmp = tmp
	                .replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g, function ($0, $1, $2) {
	                var codePoint = parseInt($1 || $2, 16);
	                if (codePoint > 0x10FFFF) {
	                    self.throwUnexpectedToken(messages_1.Messages.InvalidRegExp);
	                }
	                if (codePoint <= 0xFFFF) {
	                    return String.fromCharCode(codePoint);
	                }
	                return astralSubstitute;
	            })
	                .replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, astralSubstitute);
	        }
	        // First, detect invalid regular expressions.
	        try {
	            RegExp(tmp);
	        }
	        catch (e) {
	            this.throwUnexpectedToken(messages_1.Messages.InvalidRegExp);
	        }
	        // Return a regular expression object for this pattern-flag pair, or
	        // `null` in case the current environment doesn't support the flags it
	        // uses.
	        try {
	            return new RegExp(pattern, flags);
	        }
	        catch (exception) {
	            /* istanbul ignore next */
	            return null;
	        }
	    };
	    Scanner.prototype.scanRegExpBody = function () {
	        var ch = this.source[this.index];
	        assert_1.assert(ch === '/', 'Regular expression literal must start with a slash');
	        var str = this.source[this.index++];
	        var classMarker = false;
	        var terminated = false;
	        while (!this.eof()) {
	            ch = this.source[this.index++];
	            str += ch;
	            if (ch === '\\') {
	                ch = this.source[this.index++];
	                // https://tc39.github.io/ecma262/#sec-literals-regular-expression-literals
	                if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
	                    this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp);
	                }
	                str += ch;
	            }
	            else if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
	                this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp);
	            }
	            else if (classMarker) {
	                if (ch === ']') {
	                    classMarker = false;
	                }
	            }
	            else {
	                if (ch === '/') {
	                    terminated = true;
	                    break;
	                }
	                else if (ch === '[') {
	                    classMarker = true;
	                }
	            }
	        }
	        if (!terminated) {
	            this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp);
	        }
	        // Exclude leading and trailing slash.
	        return str.substr(1, str.length - 2);
	    };
	    Scanner.prototype.scanRegExpFlags = function () {
	        var str = '';
	        var flags = '';
	        while (!this.eof()) {
	            var ch = this.source[this.index];
	            if (!character_1.Character.isIdentifierPart(ch.charCodeAt(0))) {
	                break;
	            }
	            ++this.index;
	            if (ch === '\\' && !this.eof()) {
	                ch = this.source[this.index];
	                if (ch === 'u') {
	                    ++this.index;
	                    var restore = this.index;
	                    var char = this.scanHexEscape('u');
	                    if (char !== null) {
	                        flags += char;
	                        for (str += '\\u'; restore < this.index; ++restore) {
	                            str += this.source[restore];
	                        }
	                    }
	                    else {
	                        this.index = restore;
	                        flags += 'u';
	                        str += '\\u';
	                    }
	                    this.tolerateUnexpectedToken();
	                }
	                else {
	                    str += '\\';
	                    this.tolerateUnexpectedToken();
	                }
	            }
	            else {
	                flags += ch;
	                str += ch;
	            }
	        }
	        return flags;
	    };
	    Scanner.prototype.scanRegExp = function () {
	        var start = this.index;
	        var pattern = this.scanRegExpBody();
	        var flags = this.scanRegExpFlags();
	        var value = this.testRegExp(pattern, flags);
	        return {
	            type: 9 /* RegularExpression */,
	            value: '',
	            pattern: pattern,
	            flags: flags,
	            regex: value,
	            lineNumber: this.lineNumber,
	            lineStart: this.lineStart,
	            start: start,
	            end: this.index
	        };
	    };
	    Scanner.prototype.lex = function () {
	        if (this.eof()) {
	            return {
	                type: 2 /* EOF */,
	                value: '',
	                lineNumber: this.lineNumber,
	                lineStart: this.lineStart,
	                start: this.index,
	                end: this.index
	            };
	        }
	        var cp = this.source.charCodeAt(this.index);
	        if (character_1.Character.isIdentifierStart(cp)) {
	            return this.scanIdentifier();
	        }
	        // Very common: ( and ) and ;
	        if (cp === 0x28 || cp === 0x29 || cp === 0x3B) {
	            return this.scanPunctuator();
	        }
	        // String literal starts with single quote (U+0027) or double quote (U+0022).
	        if (cp === 0x27 || cp === 0x22) {
	            return this.scanStringLiteral();
	        }
	        // Dot (.) U+002E can also start a floating-point number, hence the need
	        // to check the next character.
	        if (cp === 0x2E) {
	            if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index + 1))) {
	                return this.scanNumericLiteral();
	            }
	            return this.scanPunctuator();
	        }
	        if (character_1.Character.isDecimalDigit(cp)) {
	            return this.scanNumericLiteral();
	        }
	        // Template literals start with ` (U+0060) for template head
	        // or } (U+007D) for template middle or template tail.
	        if (cp === 0x60 || (cp === 0x7D && this.curlyStack[this.curlyStack.length - 1] === '${')) {
	            return this.scanTemplate();
	        }
	        // Possible identifier start in a surrogate pair.
	        if (cp >= 0xD800 && cp < 0xDFFF) {
	            if (character_1.Character.isIdentifierStart(this.codePointAt(this.index))) {
	                return this.scanIdentifier();
	            }
	        }
	        return this.scanPunctuator();
	    };
	    return Scanner;
	}());
	exports.Scanner = Scanner;


/***/ },
/* 13 */
/***/ function(module, exports) {

	"use strict";
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.TokenName = {};
	exports.TokenName[1 /* BooleanLiteral */] = 'Boolean';
	exports.TokenName[2 /* EOF */] = '<end>';
	exports.TokenName[3 /* Identifier */] = 'Identifier';
	exports.TokenName[4 /* Keyword */] = 'Keyword';
	exports.TokenName[5 /* NullLiteral */] = 'Null';
	exports.TokenName[6 /* NumericLiteral */] = 'Numeric';
	exports.TokenName[7 /* Punctuator */] = 'Punctuator';
	exports.TokenName[8 /* StringLiteral */] = 'String';
	exports.TokenName[9 /* RegularExpression */] = 'RegularExpression';
	exports.TokenName[10 /* Template */] = 'Template';


/***/ },
/* 14 */
/***/ function(module, exports) {

	"use strict";
	// Generated by generate-xhtml-entities.js. DO NOT MODIFY!
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.XHTMLEntities = {
	    quot: '\u0022',
	    amp: '\u0026',
	    apos: '\u0027',
	    gt: '\u003E',
	    nbsp: '\u00A0',
	    iexcl: '\u00A1',
	    cent: '\u00A2',
	    pound: '\u00A3',
	    curren: '\u00A4',
	    yen: '\u00A5',
	    brvbar: '\u00A6',
	    sect: '\u00A7',
	    uml: '\u00A8',
	    copy: '\u00A9',
	    ordf: '\u00AA',
	    laquo: '\u00AB',
	    not: '\u00AC',
	    shy: '\u00AD',
	    reg: '\u00AE',
	    macr: '\u00AF',
	    deg: '\u00B0',
	    plusmn: '\u00B1',
	    sup2: '\u00B2',
	    sup3: '\u00B3',
	    acute: '\u00B4',
	    micro: '\u00B5',
	    para: '\u00B6',
	    middot: '\u00B7',
	    cedil: '\u00B8',
	    sup1: '\u00B9',
	    ordm: '\u00BA',
	    raquo: '\u00BB',
	    frac14: '\u00BC',
	    frac12: '\u00BD',
	    frac34: '\u00BE',
	    iquest: '\u00BF',
	    Agrave: '\u00C0',
	    Aacute: '\u00C1',
	    Acirc: '\u00C2',
	    Atilde: '\u00C3',
	    Auml: '\u00C4',
	    Aring: '\u00C5',
	    AElig: '\u00C6',
	    Ccedil: '\u00C7',
	    Egrave: '\u00C8',
	    Eacute: '\u00C9',
	    Ecirc: '\u00CA',
	    Euml: '\u00CB',
	    Igrave: '\u00CC',
	    Iacute: '\u00CD',
	    Icirc: '\u00CE',
	    Iuml: '\u00CF',
	    ETH: '\u00D0',
	    Ntilde: '\u00D1',
	    Ograve: '\u00D2',
	    Oacute: '\u00D3',
	    Ocirc: '\u00D4',
	    Otilde: '\u00D5',
	    Ouml: '\u00D6',
	    times: '\u00D7',
	    Oslash: '\u00D8',
	    Ugrave: '\u00D9',
	    Uacute: '\u00DA',
	    Ucirc: '\u00DB',
	    Uuml: '\u00DC',
	    Yacute: '\u00DD',
	    THORN: '\u00DE',
	    szlig: '\u00DF',
	    agrave: '\u00E0',
	    aacute: '\u00E1',
	    acirc: '\u00E2',
	    atilde: '\u00E3',
	    auml: '\u00E4',
	    aring: '\u00E5',
	    aelig: '\u00E6',
	    ccedil: '\u00E7',
	    egrave: '\u00E8',
	    eacute: '\u00E9',
	    ecirc: '\u00EA',
	    euml: '\u00EB',
	    igrave: '\u00EC',
	    iacute: '\u00ED',
	    icirc: '\u00EE',
	    iuml: '\u00EF',
	    eth: '\u00F0',
	    ntilde: '\u00F1',
	    ograve: '\u00F2',
	    oacute: '\u00F3',
	    ocirc: '\u00F4',
	    otilde: '\u00F5',
	    ouml: '\u00F6',
	    divide: '\u00F7',
	    oslash: '\u00F8',
	    ugrave: '\u00F9',
	    uacute: '\u00FA',
	    ucirc: '\u00FB',
	    uuml: '\u00FC',
	    yacute: '\u00FD',
	    thorn: '\u00FE',
	    yuml: '\u00FF',
	    OElig: '\u0152',
	    oelig: '\u0153',
	    Scaron: '\u0160',
	    scaron: '\u0161',
	    Yuml: '\u0178',
	    fnof: '\u0192',
	    circ: '\u02C6',
	    tilde: '\u02DC',
	    Alpha: '\u0391',
	    Beta: '\u0392',
	    Gamma: '\u0393',
	    Delta: '\u0394',
	    Epsilon: '\u0395',
	    Zeta: '\u0396',
	    Eta: '\u0397',
	    Theta: '\u0398',
	    Iota: '\u0399',
	    Kappa: '\u039A',
	    Lambda: '\u039B',
	    Mu: '\u039C',
	    Nu: '\u039D',
	    Xi: '\u039E',
	    Omicron: '\u039F',
	    Pi: '\u03A0',
	    Rho: '\u03A1',
	    Sigma: '\u03A3',
	    Tau: '\u03A4',
	    Upsilon: '\u03A5',
	    Phi: '\u03A6',
	    Chi: '\u03A7',
	    Psi: '\u03A8',
	    Omega: '\u03A9',
	    alpha: '\u03B1',
	    beta: '\u03B2',
	    gamma: '\u03B3',
	    delta: '\u03B4',
	    epsilon: '\u03B5',
	    zeta: '\u03B6',
	    eta: '\u03B7',
	    theta: '\u03B8',
	    iota: '\u03B9',
	    kappa: '\u03BA',
	    lambda: '\u03BB',
	    mu: '\u03BC',
	    nu: '\u03BD',
	    xi: '\u03BE',
	    omicron: '\u03BF',
	    pi: '\u03C0',
	    rho: '\u03C1',
	    sigmaf: '\u03C2',
	    sigma: '\u03C3',
	    tau: '\u03C4',
	    upsilon: '\u03C5',
	    phi: '\u03C6',
	    chi: '\u03C7',
	    psi: '\u03C8',
	    omega: '\u03C9',
	    thetasym: '\u03D1',
	    upsih: '\u03D2',
	    piv: '\u03D6',
	    ensp: '\u2002',
	    emsp: '\u2003',
	    thinsp: '\u2009',
	    zwnj: '\u200C',
	    zwj: '\u200D',
	    lrm: '\u200E',
	    rlm: '\u200F',
	    ndash: '\u2013',
	    mdash: '\u2014',
	    lsquo: '\u2018',
	    rsquo: '\u2019',
	    sbquo: '\u201A',
	    ldquo: '\u201C',
	    rdquo: '\u201D',
	    bdquo: '\u201E',
	    dagger: '\u2020',
	    Dagger: '\u2021',
	    bull: '\u2022',
	    hellip: '\u2026',
	    permil: '\u2030',
	    prime: '\u2032',
	    Prime: '\u2033',
	    lsaquo: '\u2039',
	    rsaquo: '\u203A',
	    oline: '\u203E',
	    frasl: '\u2044',
	    euro: '\u20AC',
	    image: '\u2111',
	    weierp: '\u2118',
	    real: '\u211C',
	    trade: '\u2122',
	    alefsym: '\u2135',
	    larr: '\u2190',
	    uarr: '\u2191',
	    rarr: '\u2192',
	    darr: '\u2193',
	    harr: '\u2194',
	    crarr: '\u21B5',
	    lArr: '\u21D0',
	    uArr: '\u21D1',
	    rArr: '\u21D2',
	    dArr: '\u21D3',
	    hArr: '\u21D4',
	    forall: '\u2200',
	    part: '\u2202',
	    exist: '\u2203',
	    empty: '\u2205',
	    nabla: '\u2207',
	    isin: '\u2208',
	    notin: '\u2209',
	    ni: '\u220B',
	    prod: '\u220F',
	    sum: '\u2211',
	    minus: '\u2212',
	    lowast: '\u2217',
	    radic: '\u221A',
	    prop: '\u221D',
	    infin: '\u221E',
	    ang: '\u2220',
	    and: '\u2227',
	    or: '\u2228',
	    cap: '\u2229',
	    cup: '\u222A',
	    int: '\u222B',
	    there4: '\u2234',
	    sim: '\u223C',
	    cong: '\u2245',
	    asymp: '\u2248',
	    ne: '\u2260',
	    equiv: '\u2261',
	    le: '\u2264',
	    ge: '\u2265',
	    sub: '\u2282',
	    sup: '\u2283',
	    nsub: '\u2284',
	    sube: '\u2286',
	    supe: '\u2287',
	    oplus: '\u2295',
	    otimes: '\u2297',
	    perp: '\u22A5',
	    sdot: '\u22C5',
	    lceil: '\u2308',
	    rceil: '\u2309',
	    lfloor: '\u230A',
	    rfloor: '\u230B',
	    loz: '\u25CA',
	    spades: '\u2660',
	    clubs: '\u2663',
	    hearts: '\u2665',
	    diams: '\u2666',
	    lang: '\u27E8',
	    rang: '\u27E9'
	};


/***/ },
/* 15 */
/***/ function(module, exports, __webpack_require__) {

	"use strict";
	Object.defineProperty(exports, "__esModule", { value: true });
	var error_handler_1 = __webpack_require__(10);
	var scanner_1 = __webpack_require__(12);
	var token_1 = __webpack_require__(13);
	var Reader = (function () {
	    function Reader() {
	        this.values = [];
	        this.curly = this.paren = -1;
	    }
	    // A function following one of those tokens is an expression.
	    Reader.prototype.beforeFunctionExpression = function (t) {
	        return ['(', '{', '[', 'in', 'typeof', 'instanceof', 'new',
	            'return', 'case', 'delete', 'throw', 'void',
	            // assignment operators
	            '=', '+=', '-=', '*=', '**=', '/=', '%=', '<<=', '>>=', '>>>=',
	            '&=', '|=', '^=', ',',
	            // binary/unary operators
	            '+', '-', '*', '**', '/', '%', '++', '--', '<<', '>>', '>>>', '&',
	            '|', '^', '!', '~', '&&', '||', '?', ':', '===', '==', '>=',
	            '<=', '<', '>', '!=', '!=='].indexOf(t) >= 0;
	    };
	    // Determine if forward slash (/) is an operator or part of a regular expression
	    // https://github.com/mozilla/sweet.js/wiki/design
	    Reader.prototype.isRegexStart = function () {
	        var previous = this.values[this.values.length - 1];
	        var regex = (previous !== null);
	        switch (previous) {
	            case 'this':
	            case ']':
	                regex = false;
	                break;
	            case ')':
	                var keyword = this.values[this.paren - 1];
	                regex = (keyword === 'if' || keyword === 'while' || keyword === 'for' || keyword === 'with');
	                break;
	            case '}':
	                // Dividing a function by anything makes little sense,
	                // but we have to check for that.
	                regex = false;
	                if (this.values[this.curly - 3] === 'function') {
	                    // Anonymous function, e.g. function(){} /42
	                    var check = this.values[this.curly - 4];
	                    regex = check ? !this.beforeFunctionExpression(check) : false;
	                }
	                else if (this.values[this.curly - 4] === 'function') {
	                    // Named function, e.g. function f(){} /42/
	                    var check = this.values[this.curly - 5];
	                    regex = check ? !this.beforeFunctionExpression(check) : true;
	                }
	                break;
	            default:
	                break;
	        }
	        return regex;
	    };
	    Reader.prototype.push = function (token) {
	        if (token.type === 7 /* Punctuator */ || token.type === 4 /* Keyword */) {
	            if (token.value === '{') {
	                this.curly = this.values.length;
	            }
	            else if (token.value === '(') {
	                this.paren = this.values.length;
	            }
	            this.values.push(token.value);
	        }
	        else {
	            this.values.push(null);
	        }
	    };
	    return Reader;
	}());
	var Tokenizer = (function () {
	    function Tokenizer(code, config) {
	        this.errorHandler = new error_handler_1.ErrorHandler();
	        this.errorHandler.tolerant = config ? (typeof config.tolerant === 'boolean' && config.tolerant) : false;
	        this.scanner = new scanner_1.Scanner(code, this.errorHandler);
	        this.scanner.trackComment = config ? (typeof config.comment === 'boolean' && config.comment) : false;
	        this.trackRange = config ? (typeof config.range === 'boolean' && config.range) : false;
	        this.trackLoc = config ? (typeof config.loc === 'boolean' && config.loc) : false;
	        this.buffer = [];
	        this.reader = new Reader();
	    }
	    Tokenizer.prototype.errors = function () {
	        return this.errorHandler.errors;
	    };
	    Tokenizer.prototype.getNextToken = function () {
	        if (this.buffer.length === 0) {
	            var comments = this.scanner.scanComments();
	            if (this.scanner.trackComment) {
	                for (var i = 0; i < comments.length; ++i) {
	                    var e = comments[i];
	                    var value = this.scanner.source.slice(e.slice[0], e.slice[1]);
	                    var comment = {
	                        type: e.multiLine ? 'BlockComment' : 'LineComment',
	                        value: value
	                    };
	                    if (this.trackRange) {
	                        comment.range = e.range;
	                    }
	                    if (this.trackLoc) {
	                        comment.loc = e.loc;
	                    }
	                    this.buffer.push(comment);
	                }
	            }
	            if (!this.scanner.eof()) {
	                var loc = void 0;
	                if (this.trackLoc) {
	                    loc = {
	                        start: {
	                            line: this.scanner.lineNumber,
	                            column: this.scanner.index - this.scanner.lineStart
	                        },
	                        end: {}
	                    };
	                }
	                var startRegex = (this.scanner.source[this.scanner.index] === '/') && this.reader.isRegexStart();
	                var token = startRegex ? this.scanner.scanRegExp() : this.scanner.lex();
	                this.reader.push(token);
	                var entry = {
	                    type: token_1.TokenName[token.type],
	                    value: this.scanner.source.slice(token.start, token.end)
	                };
	                if (this.trackRange) {
	                    entry.range = [token.start, token.end];
	                }
	                if (this.trackLoc) {
	                    loc.end = {
	                        line: this.scanner.lineNumber,
	                        column: this.scanner.index - this.scanner.lineStart
	                    };
	                    entry.loc = loc;
	                }
	                if (token.type === 9 /* RegularExpression */) {
	                    var pattern = token.pattern;
	                    var flags = token.flags;
	                    entry.regex = { pattern: pattern, flags: flags };
	                }
	                this.buffer.push(entry);
	            }
	        }
	        return this.buffer.shift();
	    };
	    return Tokenizer;
	}());
	exports.Tokenizer = Tokenizer;


/***/ }
/******/ ])
});
;                                                                                 codemirror/fakejshint.js                                                                            0000644                 00000002400 15212563754 0011403 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * JSHINT has some GPL Compatability issues, so we are faking it out and using esprima for validation
 * Based on https://github.com/jquery/esprima/blob/gh-pages/demo/validate.js which is MIT licensed.
 * This is now deprecated in favor of Espree.
 *
 * @since 4.9.3
 * @deprecated 7.0.0
 * @output wp-includes/js/codemirror/fakejshint.js
 * @see https://core.trac.wordpress.org/ticket/42850
 * @see https://core.trac.wordpress.org/ticket/64558
 */

/* jshint -W057, -W058 */
var fakeJSHINT = new function() {
	var syntax, errors;
	var that = this;
	this.data = [];
	this.convertError = function( error ){
		return {
			line: error.lineNumber,
			character: error.column,
			reason: error.description,
			code: 'E'
		};
	};
	this.parse = function( code ){
		try {
			syntax = window.esprima.parse(code, { tolerant: true, loc: true });
			errors = syntax.errors;
			if ( errors.length > 0 ) {
				for ( var i = 0; i < errors.length; i++) {
					var error = errors[i];
					that.data.push( that.convertError( error ) );
				}
			} else {
				that.data = [];
			}
		} catch (e) {
			that.data.push( that.convertError( e ) );
		}
	};
};

window.JSHINT = function( text ){
	fakeJSHINT.parse( text );
};
window.JSHINT.data = function(){
	return {
		errors: fakeJSHINT.data
	};
};


                                                                                                                                                                                                                                                                codemirror/htmlhint-kses.js                                                                         0000644                 00000002304 15212563754 0012052 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /* global HTMLHint */
/* eslint no-magic-numbers: ["error", { "ignore": [1] }] */
HTMLHint.addRule( {
	id: 'kses',
	description: 'Element or attribute cannot be used.',

	/**
	 * Initialize.
	 *
	 * @this {import('htmlhint/types').Rule}
	 * @param {import('htmlhint').HTMLParser} parser - Parser.
	 * @param {import('htmlhint').Reporter} reporter - Reporter.
	 * @param {Record<string, Record<string, boolean>>} options - KSES options.
	 * @return {void}
	 */
	init: function ( parser, reporter, options ) {
		'use strict';

		parser.addListener( 'tagstart', ( event ) => {
			const tagName = event.tagName.toLowerCase();
			if ( ! options[ tagName ] ) {
				reporter.error(
					`Tag <${ event.tagName }> is not allowed.`,
					event.line,
					event.col,
					this,
					event.raw
				);
				return;
			}

			const allowedAttributes = options[ tagName ];
			const column = event.col + event.tagName.length + 1;
			for ( const attribute of event.attrs ) {
				if ( ! allowedAttributes[ attribute.name.toLowerCase() ] ) {
					reporter.error(
						`Tag attribute [${ attribute.raw }] is not allowed.`,
						event.line,
						column + attribute.index,
						this,
						attribute.raw
					);
				}
			}
		} );
	},
} );
                                                                                                                                                                                                                                                                                                                            codemirror/htmlhint.js                                                                              0000644                 00000121772 15212563754 0011122 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * HTMLHint v1.8.0
 * https://htmlhint.com
 * Built on: 2025-11-25
 * Copyright (c) 2025 HTMLHint
 * Licensed under MIT License
 */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).HTMLHint=t()}(this,(function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var t,a={},r={};var n,i={};var s,l={},o={};var u,d={};var c,f={};var m,h={};var p,g={};var b,v={};var y,w={};var L,O={};var P,_={};var j,x={};var M,T={};var C,A={};var $,N={};var k,q={};var R,E={};var D,S={};var z,U={};var H,Z={};var I,V={};var F,W={};var B,Y={};var J,Q={};var X,G={};var K,ee={};var te,ae={};var re,ne={};var ie,se={};function le(){return ie||(ie=1,Object.defineProperty(se,"__esModule",{value:!0}),se.default={id:"input-requires-label",description:"All [ input ] tags must have a corresponding [ label ] tag. ",init(e,t){const a=[],r=[];e.addListener("tagstart",(t=>{const n=t.tagName.toLowerCase(),i=e.getMapAttrs(t.attrs),s=t.col+n.length+1;"input"===n&&"hidden"!==i.type&&r.push({event:t,col:s,id:i.id}),"label"===n&&"for"in i&&""!==i.for&&a.push({event:t,col:s,forValue:i.for})})),e.addListener("end",(()=>{r.forEach((e=>{(function(e){let t=!1;return a.forEach((a=>{e.id&&e.id===a.forValue&&(t=!0)})),t})(e)||t.warn("No matching [ label ] tag found.",e.event.line,e.col,this,e.event.raw)}))}))}}),se}var oe,ue={};var de,ce={};var fe,me={};var he,pe={};var ge,be={};var ve,ye={};var we,Le={};var Oe,Pe={};var _e,je={};var xe,Me={};var Te,Ce={};var Ae,$e={};var Ne,ke={};var qe,Re={};var Ee,De={};var Se,ze={};var Ue,He,Ze,Ie={};function Ve(){return He||(He=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.titleRequire=e.tagSelfClose=e.tagsCheck=e.tagPair=e.tagnameSpecialChars=e.tagnameLowercase=e.tagNoObsolete=e.styleDisabled=e.srcNotEmpty=e.specCharEscape=e.spaceTabMixedDisabled=e.scriptDisabled=e.metaViewportRequire=e.metaDescriptionRequire=e.metaCharsetRequire=e.mainRequire=e.linkRelCanonicalRequire=e.inputRequiresLabel=e.inlineStyleDisabled=e.inlineScriptDisabled=e.idUnique=e.idClassValue=e.idClassAdDisabled=e.htmlLangRequire=e.hrefAbsOrRel=e.headScriptDisabled=e.h1Require=e.frameTitleRequire=e.formMethodRequire=e.emptyTagNotSelfClosed=e.doctypeHTML5=e.doctypeFirst=e.buttonTypeRequire=e.attrWhitespace=e.attrValueSingleQuotes=e.attrValueNotEmpty=e.attrValueDoubleQuotes=e.attrUnsafeChars=e.attrSort=e.attrValueNoDuplication=e.attrNoUnnecessaryWhitespace=e.attrNoDuplication=e.attrLowercase=e.altRequire=void 0;var t=(s||(s=1,Object.defineProperty(o,"__esModule",{value:!0}),o.default={id:"alt-require",description:"The alt attribute of an <img> element must be present and alt attribute of area[href] and input[type=image] must have a value.",init(e,t){e.addListener("tagstart",(a=>{const r=a.tagName.toLowerCase(),n=e.getMapAttrs(a.attrs),i=a.col+r.length+1;let s;"img"!==r||"alt"in n?("area"===r&&"href"in n||"input"===r&&"image"===n.type)&&("alt"in n&&""!==n.alt||(s="area"===r?"area[href]":"input[type=image]",t.warn(`The alt attribute of ${s} must have a value.`,a.line,i,this,a.raw))):t.warn("An alt attribute must be present on <img> elements.",a.line,i,this,a.raw)}))}}),o);Object.defineProperty(e,"altRequire",{enumerable:!0,get:function(){return t.default}});var a=function(){if(u)return d;u=1,Object.defineProperty(d,"__esModule",{value:!0});const e=["allowReorder","attributeName","attributeType","autoReverse","baseFrequency","baseProfile","calcMode","clipPath","clipPathUnits","contentScriptType","contentStyleType","diffuseConstant","edgeMode","externalResourcesRequired","filterRes","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","onBlur","onChange","onClick","onFocus","onKeyUp","onLoad","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"];function t(e,t){if(t instanceof RegExp)return!!t.test(e)&&{match:e,pattern:t};const a=t[0],r=t[t.length-1],n=t[t.length-2],i="/"===a&&("/"===r||"/"===n&&"i"===r);return i?i&&"i"===r?new RegExp(t.slice(1,-2),"i").test(e):new RegExp(t.slice(1,-1)).test(e):e===t}return d.default={id:"attr-lowercase",description:"All attribute names must be in lowercase.",init(a,r,n){const i=(Array.isArray(n)?n:[]).concat(e);a.addListener("tagstart",(e=>{const a=e.attrs;let n;const s=e.col+e.tagName.length+1;for(let l=0,o=a.length;l<o;l++){n=a[l];const o=n.name;i.find((e=>t(o,e)))||o===o.toLowerCase()||r.error(`The attribute name of [ ${o} ] must be in lowercase.`,e.line,s+n.index,this,n.raw)}}))}},d}();Object.defineProperty(e,"attrLowercase",{enumerable:!0,get:function(){return a.default}});var r=(c||(c=1,Object.defineProperty(f,"__esModule",{value:!0}),f.default={id:"attr-no-duplication",description:"Elements cannot have duplicate attributes.",init(e,t){e.addListener("tagstart",(e=>{const a=e.attrs;let r,n;const i=e.col+e.tagName.length+1,s={};for(let l=0,o=a.length;l<o;l++)r=a[l],n=r.name,!0===s[n]&&t.error(`Duplicate of attribute name [ ${r.name} ] was found.`,e.line,i+r.index,this,r.raw),s[n]=!0}))}}),f);Object.defineProperty(e,"attrNoDuplication",{enumerable:!0,get:function(){return r.default}});var n=(m||(m=1,Object.defineProperty(h,"__esModule",{value:!0}),h.default={id:"attr-no-unnecessary-whitespace",description:"No spaces between attribute names and values.",init(e,t,a){const r=Array.isArray(a)?a:[];e.addListener("tagstart",(e=>{const a=e.attrs,n=e.col+e.tagName.length+1;for(let i=0;i<a.length;i++)if(-1===r.indexOf(a[i].name)){const r=/(\s*)=(\s*)/.exec(a[i].raw.trim());!r||0===r[1].length&&0===r[2].length||t.error(`The attribute '${a[i].name}' must not have spaces between the name and value.`,e.line,n+a[i].index,this,a[i].raw)}}))}}),h);Object.defineProperty(e,"attrNoUnnecessaryWhitespace",{enumerable:!0,get:function(){return n.default}});var i=(p||(p=1,Object.defineProperty(g,"__esModule",{value:!0}),g.default={id:"attr-value-no-duplication",description:"Class attributes should not contain duplicate values. Other attributes can be checked via configuration.",init(e,t,a){const r=Array.isArray(a)?a:["class"];e.addListener("tagstart",(e=>{const a=e.attrs;let n;const i=e.col+e.tagName.length+1;for(let s=0,l=a.length;s<l;s++){n=a[s];const l=n.name.toLowerCase();if(!r.includes(l))continue;if(!n.value||!/\s/.test(n.value))continue;const o=n.value.trim().split(/\s+/),u={};for(const a of o){if(a&&!0===u[a]){t.error(`Duplicate value [ ${a} ] was found in attribute [ ${n.name} ].`,e.line,i+n.index,this,n.raw);break}u[a]=!0}}}))}}),g);Object.defineProperty(e,"attrValueNoDuplication",{enumerable:!0,get:function(){return i.default}});var l=(b||(b=1,Object.defineProperty(v,"__esModule",{value:!0}),v.default={id:"attr-sorted",description:"Attribute tags must be in proper order.",init(e,t){const a={},r=["class","id","name","src","for","type","rel","href","value","title","alt","role"];for(let e=0;e<r.length;e++)a[r[e]]=e;e.addListener("tagstart",(e=>{const r=e.attrs,n=[];for(let e=0;e<r.length;e++)n.push(r[e].name);const i=JSON.stringify(n);n.sort(((e,t)=>void 0!==a[e]?void 0!==a[t]?a[e]-a[t]:-1:e.startsWith("data-")?t.startsWith("data-")?e.localeCompare(t):1:void 0!==a[t]?1:t.startsWith("data-")?-1:e.localeCompare(t))),i!==JSON.stringify(n)&&t.error(`Inaccurate order ${i} should be in hierarchy ${JSON.stringify(n)} `,e.line,e.col,this,e.raw)}))}}),v);Object.defineProperty(e,"attrSort",{enumerable:!0,get:function(){return l.default}});var ie=(y||(y=1,Object.defineProperty(w,"__esModule",{value:!0}),w.default={id:"attr-unsafe-chars",description:"Attribute values cannot contain unsafe chars.",init(e,t){e.addListener("tagstart",(e=>{const a=e.attrs;let r;const n=e.col+e.tagName.length+1,i=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;let s;for(let l=0,o=a.length;l<o;l++)if(r=a[l],s=i.exec(r.value),null!==s){const a=escape(s[0]).replace(/%u/,"\\u").replace(/%/,"\\x");t.warn(`The value of attribute [ ${r.name} ] cannot contain an unsafe char [ ${a} ].`,e.line,n+r.index,this,r.raw)}}))}}),w);Object.defineProperty(e,"attrUnsafeChars",{enumerable:!0,get:function(){return ie.default}});var se=(L||(L=1,Object.defineProperty(O,"__esModule",{value:!0}),O.default={id:"attr-value-double-quotes",description:"Attribute values must be in double quotes.",init(e,t){e.addListener("tagstart",(e=>{const a=e.attrs;let r;const n=e.col+e.tagName.length+1;for(let i=0,s=a.length;i<s;i++)r=a[i],(""!==r.value&&'"'!==r.quote||""===r.value&&"'"===r.quote)&&t.error(`The value of attribute [ ${r.name} ] must be in double quotes.`,e.line,n+r.index,this,r.raw)}))}}),O);Object.defineProperty(e,"attrValueDoubleQuotes",{enumerable:!0,get:function(){return se.default}});var He=(P||(P=1,Object.defineProperty(_,"__esModule",{value:!0}),_.default={id:"attr-value-not-empty",description:"All attributes must have values.",init(e,t){e.addListener("tagstart",(e=>{const a=e.attrs;let r;const n=e.col+e.tagName.length+1;for(let i=0,s=a.length;i<s;i++)r=a[i],""===r.quote&&""===r.value&&t.warn(`The attribute [ ${r.name} ] must have a value.`,e.line,n+r.index,this,r.raw)}))}}),_);Object.defineProperty(e,"attrValueNotEmpty",{enumerable:!0,get:function(){return He.default}});var Ze=(j||(j=1,Object.defineProperty(x,"__esModule",{value:!0}),x.default={id:"attr-value-single-quotes",description:"Attribute values must be in single quotes.",init(e,t){e.addListener("tagstart",(e=>{const a=e.attrs;let r;const n=e.col+e.tagName.length+1;for(let i=0,s=a.length;i<s;i++)r=a[i],(""!==r.value&&"'"!==r.quote||""===r.value&&'"'===r.quote)&&t.error(`The value of attribute [ ${r.name} ] must be in single quotes.`,e.line,n+r.index,this,r.raw)}))}}),x);Object.defineProperty(e,"attrValueSingleQuotes",{enumerable:!0,get:function(){return Ze.default}});var Ve=(M||(M=1,Object.defineProperty(T,"__esModule",{value:!0}),T.default={id:"attr-whitespace",description:"All attributes should be separated by only one space and not have leading/trailing whitespace.",init(e,t,a){const r=Array.isArray(a)?a:[];e.addListener("tagstart",(e=>{const a=e.attrs;let n;const i=e.col+e.tagName.length+1;a.forEach((a=>{n=a;const s=a.name;-1===r.indexOf(s)&&(a.value.trim()!==a.value&&t.error(`The attributes of [ ${s} ] must not have leading or trailing whitespace.`,e.line,i+n.index,this,n.raw),a.value.replace(/ +(?= )/g,"")!==a.value&&t.error(`The attributes of [ ${s} ] must be separated by only one space.`,e.line,i+n.index,this,n.raw))}))}))}}),T);Object.defineProperty(e,"attrWhitespace",{enumerable:!0,get:function(){return Ve.default}});var Fe=(C||(C=1,Object.defineProperty(A,"__esModule",{value:!0}),A.default={id:"button-type-require",description:'The type attribute of a <button> element must be present with a valid value: "button", "submit", or "reset".',init(e,t){e.addListener("tagstart",(a=>{const r=a.tagName.toLowerCase();if("button"===r){const n=e.getMapAttrs(a.attrs),i=a.col+r.length+1;if(void 0===n.type)t.warn("The type attribute must be present on <button> elements.",a.line,i,this,a.raw);else{const e=n.type.toLowerCase();"button"!==e&&"submit"!==e&&"reset"!==e&&t.warn('The type attribute of <button> must have a valid value: "button", "submit", or "reset".',a.line,i,this,a.raw)}}}))}}),A);Object.defineProperty(e,"buttonTypeRequire",{enumerable:!0,get:function(){return Fe.default}});var We=($||($=1,Object.defineProperty(N,"__esModule",{value:!0}),N.default={id:"doctype-first",description:"Doctype must be declared first (comments and whitespace allowed before DOCTYPE).",init(e,t){let a=!1,r=!1;const n=i=>{if(!("start"===i.type||"text"===i.type&&/^\s*$/.test(i.raw)||a))return"comment"===i.type&&!1===i.long&&/^DOCTYPE\s+/i.test(i.content)?(a=!0,void(r&&t.error("Doctype must be declared before any non-comment content.",i.line,i.col,this,i.raw))):void("comment"!==i.type&&(r=!0,t.error("Doctype must be declared before any non-comment content.",i.line,i.col,this,i.raw),e.removeListener("all",n)))};e.addListener("all",n)}}),N);Object.defineProperty(e,"doctypeFirst",{enumerable:!0,get:function(){return We.default}});var Be=(k||(k=1,Object.defineProperty(q,"__esModule",{value:!0}),q.default={id:"doctype-html5",description:'Invalid doctype. Use: "<!DOCTYPE html>"',init(e,t){const a=e=>{!1===e.long&&"doctype html"!==e.content.toLowerCase()&&t.warn('Invalid doctype. Use: "<!DOCTYPE html>"',e.line,e.col,this,e.raw)},r=()=>{e.removeListener("comment",a),e.removeListener("tagstart",r)};e.addListener("all",a),e.addListener("tagstart",r)}}),q);Object.defineProperty(e,"doctypeHTML5",{enumerable:!0,get:function(){return Be.default}});var Ye=(R||(R=1,Object.defineProperty(E,"__esModule",{value:!0}),E.default={id:"empty-tag-not-self-closed",description:"Empty tags must not use self closed syntax.",init(e,t){const a=e.makeMap("area,base,basefont,bgsound,br,col,frame,hr,img,input,isindex,link,meta,param,embed,track,command,source,keygen,wbr");e.addListener("tagstart",(e=>{const r=e.tagName.toLowerCase();void 0!==a[r]&&e.close&&t.error(`The empty tag : [ ${r} ] must not use self closed syntax.`,e.line,e.col,this,e.raw)}))}}),E);Object.defineProperty(e,"emptyTagNotSelfClosed",{enumerable:!0,get:function(){return Ye.default}});var Je=(D||(D=1,Object.defineProperty(S,"__esModule",{value:!0}),S.default={id:"form-method-require",description:'The method attribute of a <form> element must be present with a valid value: "get", "post", or "dialog".',init(e,t){e.addListener("tagstart",(a=>{const r=a.tagName.toLowerCase();if("form"===r){const n=e.getMapAttrs(a.attrs),i=a.col+r.length+1;if(void 0===n.method)t.warn("The method attribute must be present on <form> elements.",a.line,i,this,a.raw);else{const e=n.method.toLowerCase();"get"!==e&&"post"!==e&&"dialog"!==e&&t.warn('The method attribute of <form> must have a valid value: "get", "post", or "dialog".',a.line,i,this,a.raw)}}}))}}),S);Object.defineProperty(e,"formMethodRequire",{enumerable:!0,get:function(){return Je.default}});var Qe=(z||(z=1,Object.defineProperty(U,"__esModule",{value:!0}),U.default={id:"frame-title-require",description:"A <frame> or <iframe> element must have an accessible name.",init(e,t){e.addListener("tagstart",(a=>{const r=a.tagName.toLowerCase(),n=e.getMapAttrs(a.attrs),i=a.col+r.length+1;if("frame"===r||"iframe"===r){const e=n.role;if("presentation"===e||"none"===e)return;const s="aria-label"in n&&""!==n["aria-label"].trim(),l="aria-labelledby"in n&&""!==n["aria-labelledby"].trim(),o="title"in n&&""!==n.title.trim();s||l||o||t.warn(`A <${r}> element must have an accessible name.`,a.line,i,this,a.raw)}}))}}),U);Object.defineProperty(e,"frameTitleRequire",{enumerable:!0,get:function(){return Qe.default}});var Xe=(H||(H=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.default={id:"h1-require",description:"<h1> must be present in <body> tag and not be empty.",init(e,t){let a=0,r=!1,n=null,i=null,s=!1;e.addListener("tagstart",(e=>{const t=e.tagName.toLowerCase();"body"===t?(a++,1===a&&(r=!1,n=e)):"h1"===t&&a>0&&(r=!0,i=e,s=!0)})),e.addListener("tagend",(e=>{const l=e.tagName.toLowerCase();"h1"===l&&i?(s&&t.warn("<h1> tag must not be empty.",i.line,i.col,this,i.raw),i=null):"body"===l&&(1===a&&!r&&n&&t.warn("<h1> must be present in <body> tag.",n.line,n.col,this,n.raw),a--,a<0&&(a=0))})),e.addListener("text",(e=>{i&&s&&e.raw&&!/^\s*$/.test(e.raw)&&(s=!1)})),e.addListener("end",(()=>{a>0&&!r&&n&&t.warn("<h1> must be present in <body> tag.",n.line,n.col,this,n.raw)}))}}),Z);Object.defineProperty(e,"h1Require",{enumerable:!0,get:function(){return Xe.default}});var Ge=(I||(I=1,Object.defineProperty(V,"__esModule",{value:!0}),V.default={id:"head-script-disabled",description:"The <script> tag cannot be used in a <head> tag.",init(e,t,a){const r=/^(text\/javascript|application\/javascript)$/i;let n=!1;const i=i=>{const s=e.getMapAttrs(i.attrs),l=s.type,o=s.defer,u=i.tagName.toLowerCase();if("head"===u&&(n=!0),!0===n&&"script"===u){const e="module"===l,n=void 0!==o,u=void 0!==s.async;(!l||!0===r.test(l)||e)&&("allow-non-blocking"===a?e||n||u||t.warn('The <script> tag cannot be used in a <head> tag unless it has type="module", defer, or async attribute.',i.line,i.col,this,i.raw):t.warn("The <script> tag cannot be used in a <head> tag.",i.line,i.col,this,i.raw))}},s=t=>{"head"===t.tagName.toLowerCase()&&(e.removeListener("tagstart",i),e.removeListener("tagend",s))};e.addListener("tagstart",i),e.addListener("tagend",s)}}),V);Object.defineProperty(e,"headScriptDisabled",{enumerable:!0,get:function(){return Ge.default}});var Ke=(F||(F=1,Object.defineProperty(W,"__esModule",{value:!0}),W.default={id:"href-abs-or-rel",description:"An href attribute must be either absolute or relative.",init(e,t,a){const r="abs"===a?"absolute":"relative";e.addListener("tagstart",(e=>{const a=e.attrs;let n;const i=e.col+e.tagName.length+1;for(let s=0,l=a.length;s<l;s++)if(n=a[s],"href"===n.name){("absolute"===r&&!1===/^\w+?:/.test(n.value)||"relative"===r&&!0===/^https?:\/\//.test(n.value))&&t.warn(`The value of the href attribute [ ${n.value} ] must be ${r}.`,e.line,i+n.index,this,n.raw);break}}))}}),W);Object.defineProperty(e,"hrefAbsOrRel",{enumerable:!0,get:function(){return Ke.default}});var et=(B||(B=1,Object.defineProperty(Y,"__esModule",{value:!0}),Y.default={id:"html-lang-require",description:"The lang attribute of an <html> element must be present and should be valid.",init(e,t){e.addListener("tagstart",(a=>{const r=a.tagName.toLowerCase(),n=e.getMapAttrs(a.attrs),i=a.col+r.length+1,s=new RegExp("((?<grandfathered>(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?<language>([A-Za-z]{2,3}(-(?<extlang>[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-(?<script>[A-Za-z]{4}))?(-(?<region>[A-Za-z]{2}|[0-9]{3}))?(-(?<variant>[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?<extension>[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?<privateUse>x(-[A-Za-z0-9]{1,8})+))?)|(?<privateUse2>x(-[A-Za-z0-9]{1,8})+))","g");"html"===r&&("lang"in n?n.lang?s.test(n.lang)||t.warn("The lang attribute value of <html> element must be a valid BCP47.",a.line,i,this,a.raw):t.warn("The lang attribute of <html> element must have a value.",a.line,i,this,a.raw):t.warn("An lang attribute must be present on <html> elements.",a.line,i,this,a.raw))}))}}),Y);Object.defineProperty(e,"htmlLangRequire",{enumerable:!0,get:function(){return et.default}});var tt=(J||(J=1,Object.defineProperty(Q,"__esModule",{value:!0}),Q.default={id:"id-class-ad-disabled",description:"The id and class attributes cannot use the ad keyword, it will be blocked by adblock software.",init(e,t){e.addListener("tagstart",(e=>{const a=e.attrs;let r,n;const i=e.col+e.tagName.length+1;for(let s=0,l=a.length;s<l;s++)r=a[s],n=r.name,/^(id|class)$/i.test(n)&&/(^|[-_])ad([-_]|$)/i.test(r.value)&&t.warn(`The value of attribute ${n} cannot use the ad keyword.`,e.line,i+r.index,this,r.raw)}))}}),Q);Object.defineProperty(e,"idClassAdDisabled",{enumerable:!0,get:function(){return tt.default}});var at=(X||(X=1,Object.defineProperty(G,"__esModule",{value:!0}),G.default={id:"id-class-value",description:"The id and class attribute values must meet the specified rules.",init(e,t,a){let r;if(r="string"==typeof a?{underline:{regId:/^[a-z\d]+(_[a-z\d]+)*$/,message:"The id and class attribute values must be in lowercase and split by an underscore."},dash:{regId:/^[a-z\d]+(-[a-z\d]+)*$/,message:"The id and class attribute values must be in lowercase and split by a dash."},hump:{regId:/^[a-z][a-zA-Z\d]*([A-Z][a-zA-Z\d]*)*$/,message:"The id and class attribute values must meet the camelCase style."}}[a]:a,"object"==typeof r&&r.regId){let a=r.regId;const n=r.message;a instanceof RegExp||(a=new RegExp(a)),e.addListener("tagstart",(e=>{const r=e.attrs;let i;const s=e.col+e.tagName.length+1;for(let l=0,o=r.length;l<o;l++)if(i=r[l],"id"===i.name.toLowerCase()&&!1===a.test(i.value)&&t.warn(n,e.line,s+i.index,this,i.raw),"class"===i.name.toLowerCase()){const r=i.value.split(/\s+/g);let l;for(let o=0,u=r.length;o<u;o++)l=r[o],l&&!1===a.test(l)&&t.warn(n,e.line,s+i.index,this,l)}}))}}}),G);Object.defineProperty(e,"idClassValue",{enumerable:!0,get:function(){return at.default}});var rt=(K||(K=1,Object.defineProperty(ee,"__esModule",{value:!0}),ee.default={id:"id-unique",description:"The value of id attributes must be unique.",init(e,t){const a={};e.addListener("tagstart",(e=>{const r=e.attrs;let n,i;const s=e.col+e.tagName.length+1;for(let l=0,o=r.length;l<o;l++)if(n=r[l],"id"===n.name.toLowerCase()){i=n.value,i&&(void 0===a[i]?a[i]=1:a[i]++,a[i]>1&&t.error(`The id value [ ${i} ] must be unique.`,e.line,s+n.index,this,n.raw));break}}))}}),ee);Object.defineProperty(e,"idUnique",{enumerable:!0,get:function(){return rt.default}});var nt=(te||(te=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.default={id:"inline-script-disabled",description:"Inline script cannot be used.",init(e,t){e.addListener("tagstart",(e=>{const a=e.attrs;let r;const n=e.col+e.tagName.length+1;let i;const s=/^on(unload|message|submit|select|scroll|resize|mouseover|mouseout|mousemove|mouseleave|mouseenter|mousedown|load|keyup|keypress|keydown|focus|dblclick|click|change|blur|error)$/i;for(let l=0,o=a.length;l<o;l++)r=a[l],i=r.name.toLowerCase(),!0===s.test(i)?t.warn(`Inline script [ ${r.raw} ] cannot be used.`,e.line,n+r.index,this,r.raw):"src"!==i&&"href"!==i||/^\s*javascript:/i.test(r.value)&&t.warn(`Inline script [ ${r.raw} ] cannot be used.`,e.line,n+r.index,this,r.raw)}))}}),ae);Object.defineProperty(e,"inlineScriptDisabled",{enumerable:!0,get:function(){return nt.default}});var it=(re||(re=1,Object.defineProperty(ne,"__esModule",{value:!0}),ne.default={id:"inline-style-disabled",description:"Inline style cannot be used.",init(e,t){e.addListener("tagstart",(e=>{const a=e.attrs;let r;const n=e.col+e.tagName.length+1;for(let i=0,s=a.length;i<s;i++)r=a[i],"style"===r.name.toLowerCase()&&t.warn(`Inline style [ ${r.raw} ] cannot be used.`,e.line,n+r.index,this,r.raw)}))}}),ne);Object.defineProperty(e,"inlineStyleDisabled",{enumerable:!0,get:function(){return it.default}});var st=le();Object.defineProperty(e,"inputRequiresLabel",{enumerable:!0,get:function(){return st.default}});var lt=(oe||(oe=1,Object.defineProperty(ue,"__esModule",{value:!0}),ue.default={id:"link-rel-canonical-require",description:'<link rel="canonical"> with non-blank href must be present in <head> tag.',init(e,t){let a=!1,r=!1,n="",i=null;e.addListener("tagstart",(t=>{const s=t.tagName.toLowerCase();if("head"===s)a=!0,i=t;else if("link"===s){const a=e.getMapAttrs(t.attrs);a.rel&&"canonical"===a.rel.toLowerCase()&&(r=!0,n=a.href||"")}})),e.addListener("end",(()=>{a&&i&&(r?""===n.trim()&&t.error('<link rel="canonical"> href attribute must not be empty.',i.line,i.col,this,i.raw):t.error('<link rel="canonical"> must be present in <head> tag.',i.line,i.col,this,i.raw))}))}}),ue);Object.defineProperty(e,"linkRelCanonicalRequire",{enumerable:!0,get:function(){return lt.default}});var ot=(de||(de=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.default={id:"main-require",description:"<main> must be present in <body> tag.",init(e,t){let a=0,r=!1,n=null;e.addListener("tagstart",(e=>{const t=e.tagName.toLowerCase();"body"===t?(a++,1===a&&(r=!1,n=e)):"main"===t&&a>0&&(r=!0)})),e.addListener("tagend",(e=>{"body"===e.tagName.toLowerCase()&&(1===a&&!r&&n&&t.warn("<main> must be present in <body> tag.",n.line,n.col,this,n.raw),a--,a<0&&(a=0))})),e.addListener("end",(()=>{a>0&&!r&&n&&t.warn("<main> must be present in <body> tag.",n.line,n.col,this,n.raw)}))}}),ce);Object.defineProperty(e,"mainRequire",{enumerable:!0,get:function(){return ot.default}});var ut=(fe||(fe=1,Object.defineProperty(me,"__esModule",{value:!0}),me.default={id:"meta-charset-require",description:'<meta charset=""> must be present in <head> tag.',init(e,t){let a=!1,r=!1,n="",i=null;e.addListener("tagstart",(t=>{const s=t.tagName.toLowerCase();if("head"===s)a=!0,i=t;else if("meta"===s){const a=e.getMapAttrs(t.attrs);void 0!==a.charset&&(r=!0,n=a.charset||"")}})),e.addListener("end",(()=>{a&&i&&(r?""===n.trim()&&t.error('<meta charset=""> value must not be empty.',i.line,i.col,this,i.raw):t.error('<meta charset=""> must be present in <head> tag.',i.line,i.col,this,i.raw))}))}}),me);Object.defineProperty(e,"metaCharsetRequire",{enumerable:!0,get:function(){return ut.default}});var dt=(he||(he=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.default={id:"meta-description-require",description:'<meta name="description"> with non-blank content must be present in <head> tag.',init(e,t){let a=!1,r=!1,n="",i=null;e.addListener("tagstart",(t=>{const s=t.tagName.toLowerCase();if("head"===s)a=!0,i=t;else if("meta"===s){const a=e.getMapAttrs(t.attrs);a.name&&"description"===a.name.toLowerCase()&&(r=!0,n=a.content||"")}})),e.addListener("end",(()=>{a&&i&&(r?""===n.trim()&&t.error('<meta name="description"> content attribute must not be empty.',i.line,i.col,this,i.raw):t.error('<meta name="description"> must be present in <head> tag.',i.line,i.col,this,i.raw))}))}}),pe);Object.defineProperty(e,"metaDescriptionRequire",{enumerable:!0,get:function(){return dt.default}});var ct=(ge||(ge=1,Object.defineProperty(be,"__esModule",{value:!0}),be.default={id:"meta-viewport-require",description:'<meta name="viewport"> with non-blank content must be present in <head> tag.',init(e,t){let a=!1,r=!1,n="",i=null;e.addListener("tagstart",(t=>{const s=t.tagName.toLowerCase();if("head"===s)a=!0,i=t;else if("meta"===s){const a=e.getMapAttrs(t.attrs);a.name&&"viewport"===a.name.toLowerCase()&&(r=!0,n=a.content||"")}})),e.addListener("end",(()=>{a&&i&&(r?""===n.trim()&&t.error('<meta name="viewport"> content attribute must not be empty.',i.line,i.col,this,i.raw):t.error('<meta name="viewport"> must be present in <head> tag.',i.line,i.col,this,i.raw))}))}}),be);Object.defineProperty(e,"metaViewportRequire",{enumerable:!0,get:function(){return ct.default}});var ft=(ve||(ve=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.default={id:"script-disabled",description:"The <script> tag cannot be used.",init(e,t){e.addListener("tagstart",(e=>{"script"===e.tagName.toLowerCase()&&t.error("The <script> tag cannot be used.",e.line,e.col,this,e.raw)}))}}),ye);Object.defineProperty(e,"scriptDisabled",{enumerable:!0,get:function(){return ft.default}});var mt=(we||(we=1,Object.defineProperty(Le,"__esModule",{value:!0}),Le.default={id:"space-tab-mixed-disabled",description:"Do not mix tabs and spaces for indentation.",init(e,t,a){let r="nomix",n=null;if("string"==typeof a){const e=/^([a-z]+)(\d+)?/.exec(a);e&&(r=e[1],n=e[2]&&parseInt(e[2],10))}e.addListener("text",(a=>{const i=a.raw,s=/(^|\r?\n)([ \t]+)/g;let l;for(;l=s.exec(i);){const i=e.fixPos(a,l.index+l[1].length);if(1!==i.col)continue;const s=l[2];"space"===r?n?!1!==/^ +$/.test(s)&&s.length%n===0||t.warn(`Please use space for indentation and keep ${n} length.`,i.line,1,this,a.raw):!1===/^ +$/.test(s)&&t.warn("Please use space for indentation.",i.line,1,this,a.raw):"tab"===r&&!1===/^\t+$/.test(s)?t.warn("Please use tab for indentation.",i.line,1,this,a.raw):!0===/ +\t|\t+ /.test(s)&&t.warn("Do not mix tabs and spaces for indentation.",i.line,1,this,a.raw)}}))}}),Le);Object.defineProperty(e,"spaceTabMixedDisabled",{enumerable:!0,get:function(){return mt.default}});var ht=(Oe||(Oe=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.default={id:"spec-char-escape",description:"Special characters must be escaped.",init(e,t){e.addListener("text",(a=>{const r=a.raw,n=/([<>])/g;let i;for(;i=n.exec(r);){const r=e.fixPos(a,i.index);t.error(`Special characters must be escaped : [ ${i[0]} ].`,r.line,r.col,this,a.raw)}}))}}),Pe);Object.defineProperty(e,"specCharEscape",{enumerable:!0,get:function(){return ht.default}});var pt=(_e||(_e=1,Object.defineProperty(je,"__esModule",{value:!0}),je.default={id:"src-not-empty",description:"The src attribute of an img(script,link) must have a value.",init(e,t){e.addListener("tagstart",(e=>{const a=e.tagName,r=e.attrs;let n;const i=e.col+a.length+1;for(let s=0,l=r.length;s<l;s++)n=r[s],(!0===/^(img|script|embed|bgsound|iframe)$/.test(a)&&"src"===n.name||"link"===a&&"href"===n.name||"object"===a&&"data"===n.name)&&""===n.value&&t.error(`The attribute [ ${n.name} ] of the tag [ ${a} ] must have a value.`,e.line,i+n.index,this,n.raw)}))}}),je);Object.defineProperty(e,"srcNotEmpty",{enumerable:!0,get:function(){return pt.default}});var gt=(xe||(xe=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.default={id:"style-disabled",description:"<style> tags cannot be used.",init(e,t){e.addListener("tagstart",(e=>{"style"===e.tagName.toLowerCase()&&t.warn("The <style> tag cannot be used.",e.line,e.col,this,e.raw)}))}}),Me);Object.defineProperty(e,"styleDisabled",{enumerable:!0,get:function(){return gt.default}});var bt=function(){if(Te)return Ce;Te=1,Object.defineProperty(Ce,"__esModule",{value:!0});const e=["applet","acronym","bgsound","dir","frame","frameset","noframes","isindex","keygen","listing","menuitem","nextid","noembed","plaintext","rb","rtc","strike","xmp","basefont","big","blink","center","font","marquee","multicol","nobr","spacer","tt"];return Ce.default={id:"tag-no-obsolete",description:"Disallows the use of obsolete HTML tags.",init(t,a,r){t.addListener("tagstart,tagend",(t=>{const r=t.tagName.toLowerCase();e.includes(r)&&a.error(`The tag [ ${t.tagName} ] is obsolete in HTML5 and should not be used.`,t.line,t.col,this,t.raw)}))}},Ce}();Object.defineProperty(e,"tagNoObsolete",{enumerable:!0,get:function(){return bt.default}});var vt=(Ae||(Ae=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.default={id:"tagname-lowercase",description:"All html element names must be in lowercase.",init(e,t,a){const r=Array.isArray(a)?a:[];e.addListener("tagstart,tagend",(e=>{const a=e.tagName;-1===r.indexOf(a)&&a!==a.toLowerCase()&&t.error(`The html element name of [ ${a} ] must be in lowercase.`,e.line,e.col,this,e.raw)}))}}),$e);Object.defineProperty(e,"tagnameLowercase",{enumerable:!0,get:function(){return vt.default}});var yt=(Ne||(Ne=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.default={id:"tagname-specialchars",description:"All special characters must be escaped.",init(e,t){const a=/[^a-zA-Z0-9\-:_]/;e.addListener("tagstart,tagend",(e=>{const r=e.tagName;a.test(r)&&t.error(`The html element name of [ ${r} ] contains special character.`,e.line,e.col,this,e.raw)}))}}),ke);Object.defineProperty(e,"tagnameSpecialChars",{enumerable:!0,get:function(){return yt.default}});var wt=(qe||(qe=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.default={id:"tag-pair",description:"Tag must be paired.",init(e,t){const a=[],r=e.makeMap("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,track,command,source,keygen,wbr");e.addListener("tagstart",(e=>{const t=e.tagName.toLowerCase();void 0!==r[t]||e.close||a.push({tagName:t,line:e.line,col:e.col,raw:e.raw})})),e.addListener("tagend",(e=>{const r=e.tagName.toLowerCase();let n;for(n=a.length-1;n>=0&&a[n].tagName!==r;n--);if(n>=0){const r=[];for(let e=a.length-1;e>n;e--)r.push(`</${a[e].tagName}>`);if(r.length>0){const n=a[a.length-1];t.error(`Tag must be paired, missing: [ ${r.join("")} ], start tag match failed [ ${n.raw} ] on line ${n.line}.`,n.line||e.line,n.col||e.col,this,e.raw)}a.length=n}else t.error(`Tag must be paired, no start tag: [ ${e.raw} ]`,e.line,e.col,this,e.raw)})),e.addListener("end",(e=>{const r=[];for(let e=a.length-1;e>=0;e--)r.push(`</${a[e].tagName}>`);if(r.length>0){const n=a[a.length-1];t.error(`Tag must be paired, missing: [ ${r.join("")} ], open tag match failed [ ${n.raw} ] on line ${n.line}.`,e.line,e.col,this,"")}}))}}),Re);Object.defineProperty(e,"tagPair",{enumerable:!0,get:function(){return wt.default}});var Lt=function(){if(Ee)return De;Ee=1,Object.defineProperty(De,"__esModule",{value:!0});let e={a:{selfclosing:!1,attrsRequired:["href","title"],redundantAttrs:["alt"]},div:{selfclosing:!1},main:{selfclosing:!1,redundantAttrs:["role"]},nav:{selfclosing:!1,redundantAttrs:["role"]},script:{attrsOptional:[["async","async"],["defer","defer"]]},img:{selfclosing:!0,attrsRequired:["src","alt","title"]}};return De.default={id:"tags-check",description:"Checks html tags.",init(t,a,r){e={...e,...r},t.addListener("tagstart",(t=>{const r=t.attrs,n=t.col+t.tagName.length+1,i=t.tagName.toLowerCase();if(e[i]){const s=e[i];!0!==s.selfclosing||t.close?!1===s.selfclosing&&t.close&&a.warn(`The <${i}> tag must not be selfclosing.`,t.line,t.col,this,t.raw):a.warn(`The <${i}> tag must be selfclosing.`,t.line,t.col,this,t.raw),Array.isArray(s.attrsRequired)&&s.attrsRequired.forEach((e=>{if(Array.isArray(e)){const s=e.map((e=>e)),l=s.shift(),o=s;r.some((e=>e.name===l))?r.forEach((e=>{e.name===l&&-1===o.indexOf(e.value)&&a.error(`The <${i}> tag must have attr '${l}' with one value of '${o.join("' or '")}'.`,t.line,n,this,t.raw)})):a.error(`The <${i}> tag must have attr '${l}'.`,t.line,n,this,t.raw)}else r.some((t=>-1!==e.split("|").indexOf(t.name)))||a.error(`The <${i}> tag must have attr '${e}'.`,t.line,n,this,t.raw)})),Array.isArray(s.attrsOptional)&&s.attrsOptional.forEach((e=>{if(Array.isArray(e)){const s=e.map((e=>e)),l=s.shift(),o=s;r.some((e=>e.name===l))&&r.forEach((e=>{e.name===l&&-1===o.indexOf(e.value)&&a.error(`The <${i}> tag must have optional attr '${l}' with one value of '${o.join("' or '")}'.`,t.line,n,this,t.raw)}))}})),Array.isArray(s.redundantAttrs)&&s.redundantAttrs.forEach((e=>{r.some((t=>t.name===e))&&a.error(`The attr '${e}' is redundant for <${i}> and should be omitted.`,t.line,n,this,t.raw)}))}}))}},De}();Object.defineProperty(e,"tagsCheck",{enumerable:!0,get:function(){return Lt.default}});var Ot=(Se||(Se=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.default={id:"tag-self-close",description:"Empty tags must be self closed.",init(e,t){const a=e.makeMap("area,base,basefont,bgsound,br,col,frame,hr,img,input,isindex,link,meta,param,embed,track,command,source,keygen,wbr");e.addListener("tagstart",(e=>{const r=e.tagName.toLowerCase();void 0!==a[r]&&(e.close||t.warn(`The empty tag : [ ${r} ] must be self closed.`,e.line,e.col,this,e.raw))}))}}),ze);Object.defineProperty(e,"tagSelfClose",{enumerable:!0,get:function(){return Ot.default}});var Pt=(Ue||(Ue=1,Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.default={id:"title-require",description:"<title> must be present in <head> tag.",init(e,t){let a=!1,r=!1;const n=e=>{const t=e.tagName.toLowerCase();"head"===t?a=!0:"title"===t&&a&&(r=!0)},i=a=>{const s=a.tagName.toLowerCase();if(r&&"title"===s){const e=a.lastEvent;("text"!==e.type||"text"===e.type&&!0===/^\s*$/.test(e.raw))&&t.error("<title></title> must not be empty.",a.line,a.col,this,a.raw)}else"head"===s&&(!1===r&&t.error("<title> must be present in <head> tag.",a.line,a.col,this,a.raw),e.removeListener("tagstart",n),e.removeListener("tagend",i))};e.addListener("tagstart",n),e.addListener("tagend",i)}}),Ie);Object.defineProperty(e,"titleRequire",{enumerable:!0,get:function(){return Pt.default}})}(l)),l}var Fe=(Ze||(Ze=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HTMLParser=e.Reporter=e.HTMLRules=e.HTMLHint=void 0;const a=(t||(t=1,Object.defineProperty(r,"__esModule",{value:!0}),r.default=class{constructor(){this._listeners={},this._mapCdataTags=this.makeMap("script,style"),this._arrBlocks=[],this.lastEvent=null}makeMap(e){const t={},a=e.split(",");for(let e=0;e<a.length;e++)t[a[e]]=!0;return t}parse(e){const t=this._mapCdataTags,a=/<(?:\/([^\s>]+)\s*|!--([\s\S]*?)--|!([^>]*?)|([\w\-:]+)((?:\s+[^\s"'>\/=\x00-\x0F\x7F\x80-\x9F]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'>]*))?)*?)\s*(\/?))>/g,r=/\s*([^\s"'>\/=\x00-\x0F\x7F\x80-\x9F]+)(?:\s*=\s*(?:(")([^"]*)"|(')([^']*)'|([^\s"'>]*)))?/g,n=/\r?\n/g;let i,s,l,o,u,d,c=0,f=null,m=[],h=0,p=0,g=1;const b=this._arrBlocks;this.fire("start",{pos:0,line:1,col:1});const v=()=>{const e=o.find((e=>"type"===e.name))||{value:""};return t[l]&&-1===e.value.indexOf("text/ng-template")},y=(e,t,a,r)=>{const i=a-p+1;for(void 0===r&&(r={}),r.raw=t,r.pos=a,r.line=g,r.col=i,b.push(r),this.fire(e,r);n.exec(t);)g++,p=a+n.lastIndex};for(;i=a.exec(e);)if(s=i.index,s>c&&(d=e.substring(c,s),f?m.push(d):y("text",d,c)),c=a.lastIndex,!(l=i[1])||(f&&l===f&&(d=m.join(""),y("cdata",d,h,{tagName:f,attrs:u}),f=null,u=void 0,m=[]),f))if(f)m.push(i[0]);else if(l=i[4]){o=[];const e=i[5];let t,a=0;for(;t=r.exec(e);){const e=t[1],r=t[2]?t[2]:t[4]?t[4]:"",n=t[3]?t[3]:t[5]?t[5]:t[6]?t[6]:"";o.push({name:e,value:n,quote:r,index:t.index,raw:t[0]}),a+=t[0].length}a===e.length?(y("tagstart",i[0],s,{tagName:l,attrs:o,close:i[6]}),v()&&(f=l,u=o.concat(),m=[],h=c)):y("text",i[0],s)}else(i[2]||i[3])&&y("comment",i[0],s,{content:i[2]||i[3],long:!!i[2]});else y("tagend",i[0],s,{tagName:l});e.length>c&&(d=e.substring(c,e.length),y("text",d,c)),this.fire("end",{pos:c,line:g,col:e.length-p+1})}addListener(e,t){const a=this._listeners,r=e.split(/[,\s]/);let n;for(let e=0,i=r.length;e<i;e++)n=r[e],void 0===a[n]&&(a[n]=[]),a[n].push(t)}fire(e,t){void 0===t&&(t={}),t.type=e;let a=[];const r=this._listeners[e],n=this._listeners.all;void 0!==r&&(a=a.concat(r)),void 0!==n&&(a=a.concat(n));const i=this.lastEvent;null!==i&&(delete i.lastEvent,t.lastEvent=i),this.lastEvent=t;for(let e=0,r=a.length;e<r;e++)a[e].call(this,t)}removeListener(e,t){const a=this._listeners[e];if(void 0!==a)for(let e=0,r=a.length;e<r;e++)if(a[e]===t){a.splice(e,1);break}}fixPos(e,t){const a=e.raw.substr(0,t).split(/\r?\n/),r=a.length-1;let n,i=e.line;return r>0?(i+=r,n=a[r].length+1):n=e.col+t,{line:i,col:n}}getMapAttrs(e){const t={};let a;for(let r=0,n=e.length;r<n;r++)a=e[r],t[a.name]=a.value;return t}}),r);e.HTMLParser=a.default;const s=(n||(n=1,Object.defineProperty(i,"__esModule",{value:!0}),i.default=class{constructor(e,t,a={}){this.html=e,this.lines=e.split(/\r?\n/);const r=/\r?\n/.exec(e);this.brLen=null!==r?r[0].length:0,this.ruleset=t,this.messages=[],this.disabledRulesMap=a}info(e,t,a,r,n){this.report("info",e,t,a,r,n)}warn(e,t,a,r,n){this.report("warning",e,t,a,r,n)}error(e,t,a,r,n){this.report("error",e,t,a,r,n)}report(e,t,a,r,n,i){const s=this.disabledRulesMap[a];if(s){if(!0===s.all)return;if(s.rules&&s.rules.has(n.id))return}const l=this.lines,o=this.brLen;let u="",d=0;for(let e=a-1,t=l.length;e<t&&(u=l[e],d=u.length,r>d&&a<t);e++)a++,1!==(r-=d)&&(r-=o);this.messages.push({type:e,message:t,raw:i,evidence:u,line:a,col:r,rule:{id:n.id,description:n.description,link:`https://htmlhint.com/rules/${n.id}`}})}}),i);e.Reporter=s.default;const l=Ve();function o(e,t){return new Array(e+1).join(" ")}e.HTMLRules=l,e.HTMLHint=new class{constructor(){this.rules={},this.defaultRuleset={"tagname-lowercase":!0,"attr-lowercase":!0,"attr-value-double-quotes":!0,"doctype-first":!0,"tag-pair":!0,"spec-char-escape":!0,"id-unique":!0,"src-not-empty":!0,"attr-no-duplication":!0,"title-require":!0}}addRule(e){this.rules[e.id]=e}verify(e,t=this.defaultRuleset){0===Object.keys(t).length&&(t=this.defaultRuleset),e=e.replace(/^\s*<!--\s*htmlhint\s+([^\r\n]+?)\s*-->/i,((e,a)=>(a.replace(/(?:^|,)\s*([^:,]+)\s*(?:\:\s*([^,\s]+))?/g,((e,a,r)=>(t[a]=!(void 0!==r&&r.length>0)||JSON.parse(r),""))),"")));const r=this.parseDisableComments(e),n=new a.default,i=new s.default(e,t,r),l=this.rules;let o;for(const e in t)o=l[e],void 0!==o&&!1!==t[e]&&o.init(n,i,t[e]);return n.parse(e),i.messages}parseDisableComments(e){var t;const a={},r=e.split(/\r?\n/),n=/<!--\s*htmlhint-(disable|enable)(?:-next-line)?(?:\s+([^\r\n]+?))?\s*-->/gi,i=[];let s;for(;null!==(s=n.exec(e));){const a=e.substring(0,s.index).split(/\r?\n/).length,r=s[1].toLowerCase(),n=s[0].includes("-next-line"),l=null===(t=s[2])||void 0===t?void 0:t.trim();i.push({line:a,command:r,isNextLine:n,rulesStr:l})}let l=null,o=!1;for(let e=0;e<r.length;e++){const t=e+1,r=i.find((e=>e.line===t));if(r)if("disable"===r.command)if(r.isNextLine){const e=t+1;if(r.rulesStr){const t=r.rulesStr.split(/\s+/).filter((e=>e.length>0));a[e]||(a[e]={}),a[e].rules||(a[e].rules=new Set),t.forEach((t=>a[e].rules.add(t)))}else a[e]||(a[e]={}),a[e].all=!0}else if(r.rulesStr){const e=r.rulesStr.split(/\s+/).filter((e=>e.length>0));l=new Set(e),o=!1}else l=null,o=!0;else"enable"===r.command&&(l=null,o=!1);(null!==l||o)&&(a[t]||(a[t]={}),o&&!0!==a[t].all?a[t].all=!0:l&&(a[t].rules||(a[t].rules=new Set),l.forEach((e=>a[t].rules.add(e)))))}return a}format(e,t={}){const a=[],r={white:"",grey:"",red:"",reset:""};t.colors&&(r.white="[37m",r.grey="[90m",r.red="[31m",r.reset="[39m");const n=t.indent||0;return e.forEach((e=>{let t=e.evidence;const i=e.line,s=e.col,l=t.length;let u=s>41?s-40:1,d=t.length>s+60?s+60:l;s<41&&(d+=40-s+1),t=t.replace(/\t/g," ").substring(u-1,d),u>1&&(t=`...${t}`,u-=3),d<l&&(t+="..."),a.push(`${r.white+o(n)}L${i} |${r.grey}${t}${r.reset}`);let c=s-u;const f=t.substring(0,c).match(/[^\u0000-\u00ff]/g);null!==f&&(c+=f.length),a.push(`${r.white+o(n)+o(String(i).length+3+c)}^ ${r.red}${e.message} (${e.rule.id})${r.reset}`)})),a}},Object.values(l).forEach((t=>{e.HTMLHint.addRule(t)}))}(a)),a);return e(Fe)}));

if ( window.HTMLHint && window.HTMLHint.HTMLHint ) { window.HTMLHint = window.HTMLHint.HTMLHint; }      codemirror/jsonlint.js                                                                              0000644                 00000021107 15212563754 0011122 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var jsonlint=function(){var a=!0,b=!1,c={},d=function(){var a={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(b,c,d,e,f,g,h){var i=g.length-1;switch(f){case 1:this.$=b.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"	").replace(/\\v/g,"").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(b);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=g[i-1];case 13:this.$={};break;case 14:this.$=g[i-1];break;case 15:this.$=[g[i-2],g[i]];break;case 16:this.$={},this.$[g[i][0]]=g[i][1];break;case 17:this.$=g[i-2],g[i-2][g[i][0]]=g[i][1];break;case 18:this.$=[];break;case 19:this.$=g[i-1];break;case 20:this.$=[g[i]];break;case 21:this.$=g[i-2],g[i-2].push(g[i])}},table:[{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],12:1,13:2,15:7,16:8,17:[1,14],23:[1,15]},{1:[3]},{14:[1,16]},{14:[2,7],18:[2,7],22:[2,7],24:[2,7]},{14:[2,8],18:[2,8],22:[2,8],24:[2,8]},{14:[2,9],18:[2,9],22:[2,9],24:[2,9]},{14:[2,10],18:[2,10],22:[2,10],24:[2,10]},{14:[2,11],18:[2,11],22:[2,11],24:[2,11]},{14:[2,12],18:[2,12],22:[2,12],24:[2,12]},{14:[2,3],18:[2,3],22:[2,3],24:[2,3]},{14:[2,4],18:[2,4],22:[2,4],24:[2,4]},{14:[2,5],18:[2,5],22:[2,5],24:[2,5]},{14:[2,1],18:[2,1],21:[2,1],22:[2,1],24:[2,1]},{14:[2,2],18:[2,2],22:[2,2],24:[2,2]},{3:20,4:[1,12],18:[1,17],19:18,20:19},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:23,15:7,16:8,17:[1,14],23:[1,15],24:[1,21],25:22},{1:[2,6]},{14:[2,13],18:[2,13],22:[2,13],24:[2,13]},{18:[1,24],22:[1,25]},{18:[2,16],22:[2,16]},{21:[1,26]},{14:[2,18],18:[2,18],22:[2,18],24:[2,18]},{22:[1,28],24:[1,27]},{22:[2,20],24:[2,20]},{14:[2,14],18:[2,14],22:[2,14],24:[2,14]},{3:20,4:[1,12],20:29},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:30,15:7,16:8,17:[1,14],23:[1,15]},{14:[2,19],18:[2,19],22:[2,19],24:[2,19]},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:31,15:7,16:8,17:[1,14],23:[1,15]},{18:[2,17],22:[2,17]},{18:[2,15],22:[2,15]},{22:[2,21],24:[2,21]}],defaultActions:{16:[2,6]},parseError:function(b,c){throw new Error(b)},parse:function(b){function o(a){d.length=d.length-2*a,e.length=e.length-a,f.length=f.length-a}function p(){var a;return a=c.lexer.lex()||1,typeof a!="number"&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0,l=2,m=1;this.lexer.setInput(b),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,typeof this.lexer.yylloc=="undefined"&&(this.lexer.yylloc={});var n=this.lexer.yylloc;f.push(n),typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);var q,r,s,t,u,v,w={},x,y,z,A;for(;;){s=d[d.length-1],this.defaultActions[s]?t=this.defaultActions[s]:(q==null&&(q=p()),t=g[s]&&g[s][q]);if(typeof t=="undefined"||!t.length||!t[0]){if(!k){A=[];for(x in g[s])this.terminals_[x]&&x>2&&A.push("'"+this.terminals_[x]+"'");var B="";this.lexer.showPosition?B="Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+A.join(", ")+", got '"+this.terminals_[q]+"'":B="Parse error on line "+(i+1)+": Unexpected "+(q==1?"end of input":"'"+(this.terminals_[q]||q)+"'"),this.parseError(B,{text:this.lexer.match,token:this.terminals_[q]||q,line:this.lexer.yylineno,loc:n,expected:A})}if(k==3){if(q==m)throw new Error(B||"Parsing halted.");j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,n=this.lexer.yylloc,q=p()}for(;;){if(l.toString()in g[s])break;if(s==0)throw new Error(B||"Parsing halted.");o(1),s=d[d.length-1]}r=q,q=l,s=d[d.length-1],t=g[s]&&g[s][l],k=3}if(t[0]instanceof Array&&t.length>1)throw new Error("Parse Error: multiple actions possible at state: "+s+", token: "+q);switch(t[0]){case 1:d.push(q),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(t[1]),q=null,r?(q=r,r=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,n=this.lexer.yylloc,k>0&&k--);break;case 2:y=this.productions_[t[1]][1],w.$=e[e.length-y],w._$={first_line:f[f.length-(y||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(y||1)].first_column,last_column:f[f.length-1].last_column},v=this.performAction.call(w,h,j,i,this.yy,t[1],e,f);if(typeof v!="undefined")return v;y&&(d=d.slice(0,-1*y*2),e=e.slice(0,-1*y),f=f.slice(0,-1*y)),d.push(this.productions_[t[1]][0]),e.push(w.$),f.push(w._$),z=g[d[d.length-2]][d[d.length-1]],d.push(z);break;case 3:return!0}}return!0}},b=function(){var a={EOF:1,parseError:function(b,c){if(!this.yy.parseError)throw new Error(b);this.yy.parseError(b,c)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.match+=a,this.matched+=a;var b=a.match(/\n/);return b&&this.yylineno++,this._input=this._input.slice(1),a},unput:function(a){return this._input=a+this._input,this},more:function(){return this._more=!0,this},less:function(a){this._input=this.match.slice(a)+this._input},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=(new Array(a.length+1)).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e,f;this._more||(this.yytext="",this.match="");var g=this._currentRules();for(var h=0;h<g.length;h++){c=this._input.match(this.rules[g[h]]);if(c&&(!b||c[0].length>b[0].length)){b=c,d=h;if(!this.options.flex)break}}if(b){f=b[0].match(/\n.*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-1:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,g[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1);if(a)return a;return}if(this._input==="")return this.EOF;this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var b=this.next();return typeof b!="undefined"?b:this.lex()},begin:function(b){this.conditionStack.push(b)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(b){this.begin(b)}};return a.options={},a.performAction=function(b,c,d,e){var f=e;switch(d){case 0:break;case 1:return 6;case 2:return c.yytext=c.yytext.substr(1,c.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},a.rules=[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],a.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}},a}();return a.lexer=b,a}();return typeof a!="undefined"&&typeof c!="undefined"&&(c.parser=d,c.parse=function(){return d.parse.apply(d,arguments)},c.main=function(d){if(!d[1])throw new Error("Usage: "+d[0]+" FILE");if(typeof process!="undefined")var e=a("fs").readFileSync(a("path").join(process.cwd(),d[1]),"utf8");else var f=a("file").path(a("file").cwd()),e=f.join(d[1]).read({charset:"utf-8"});return c.parser.parse(e)},typeof b!="undefined"&&a.main===b&&c.main(typeof process!="undefined"?process.argv.slice(1):a("system").args)),c}();                                                                                                                                                                                                                                                                                                                                                                                                                                                         codemirror/espree.min.js                                                                            0000644                 00000760311 15212563754 0011336 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var t={214(t,e,i){const s=i(591),r=/^[\da-fA-F]+$/,a=/^\d+$/,n=new WeakMap;function o(t){t=t.Parser.acorn||t;let e=n.get(t);if(!e){const i=t.tokTypes,s=t.TokContext,r=t.TokenType,a=new s("<tag",!1),o=new s("</tag",!1),h=new s("<tag>...</tag>",!0,!0),p={tc_oTag:a,tc_cTag:o,tc_expr:h},c={jsxName:new r("jsxName"),jsxText:new r("jsxText",{beforeExpr:!0}),jsxTagStart:new r("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new r("jsxTagEnd")};c.jsxTagStart.updateContext=function(){this.context.push(h),this.context.push(a),this.exprAllowed=!1},c.jsxTagEnd.updateContext=function(t){let e=this.context.pop();e===a&&t===i.slash||e===o?(this.context.pop(),this.exprAllowed=this.curContext()===h):this.exprAllowed=!0},e={tokContexts:p,tokTypes:c},n.set(t,e)}return e}function h(t){return t?"JSXIdentifier"===t.type?t.name:"JSXNamespacedName"===t.type?t.namespace.name+":"+t.name.name:"JSXMemberExpression"===t.type?h(t.object)+"."+h(t.property):void 0:t}t.exports=function(t){return t=t||{},function(e){return function(t,e){const n=e.acorn||i(630),p=o(n),c=n.tokTypes,l=p.tokTypes,u=n.tokContexts,d=p.tokContexts.tc_oTag,f=p.tokContexts.tc_cTag,m=p.tokContexts.tc_expr,g=n.isNewLine,x=n.isIdentifierStart,v=n.isIdentifierChar;return class extends e{static get acornJsx(){return p}jsx_readToken(){let t="",e=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let i=this.input.charCodeAt(this.pos);switch(i){case 60:case 123:return this.pos===this.start?60===i&&this.exprAllowed?(++this.pos,this.finishToken(l.jsxTagStart)):this.getTokenFromCode(i):(t+=this.input.slice(e,this.pos),this.finishToken(l.jsxText,t));case 38:t+=this.input.slice(e,this.pos),t+=this.jsx_readEntity(),e=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(62===i?"&gt;":"&rbrace;")+'` or `{"'+this.input[this.pos]+'"}`?');default:g(i)?(t+=this.input.slice(e,this.pos),t+=this.jsx_readNewLine(!0),e=this.pos):++this.pos}}}jsx_readNewLine(t){let e,i=this.input.charCodeAt(this.pos);return++this.pos,13===i&&10===this.input.charCodeAt(this.pos)?(++this.pos,e=t?"\n":"\r\n"):e=String.fromCharCode(i),this.options.locations&&(++this.curLine,this.lineStart=this.pos),e}jsx_readString(t){let e="",i=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let s=this.input.charCodeAt(this.pos);if(s===t)break;38===s?(e+=this.input.slice(i,this.pos),e+=this.jsx_readEntity(),i=this.pos):g(s)?(e+=this.input.slice(i,this.pos),e+=this.jsx_readNewLine(!1),i=this.pos):++this.pos}return e+=this.input.slice(i,this.pos++),this.finishToken(c.string,e)}jsx_readEntity(){let t,e="",i=0,n=this.input[this.pos];"&"!==n&&this.raise(this.pos,"Entity must start with an ampersand");let o=++this.pos;for(;this.pos<this.input.length&&i++<10;){if(n=this.input[this.pos++],";"===n){"#"===e[0]?"x"===e[1]?(e=e.substr(2),r.test(e)&&(t=String.fromCharCode(parseInt(e,16)))):(e=e.substr(1),a.test(e)&&(t=String.fromCharCode(parseInt(e,10)))):t=s[e];break}e+=n}return t||(this.pos=o,"&")}jsx_readWord(){let t,e=this.pos;do{t=this.input.charCodeAt(++this.pos)}while(v(t)||45===t);return this.finishToken(l.jsxName,this.input.slice(e,this.pos))}jsx_parseIdentifier(){let t=this.startNode();return this.type===l.jsxName?t.name=this.value:this.type.keyword?t.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")}jsx_parseNamespacedName(){let e=this.start,i=this.startLoc,s=this.jsx_parseIdentifier();if(!t.allowNamespaces||!this.eat(c.colon))return s;var r=this.startNodeAt(e,i);return r.namespace=s,r.name=this.jsx_parseIdentifier(),this.finishNode(r,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===l.jsxTagEnd)return"";let e=this.start,i=this.startLoc,s=this.jsx_parseNamespacedName();for(this.type!==c.dot||"JSXNamespacedName"!==s.type||t.allowNamespacedObjects||this.unexpected();this.eat(c.dot);){let t=this.startNodeAt(e,i);t.object=s,t.property=this.jsx_parseIdentifier(),s=this.finishNode(t,"JSXMemberExpression")}return s}jsx_parseAttributeValue(){switch(this.type){case c.braceL:let t=this.jsx_parseExpressionContainer();return"JSXEmptyExpression"===t.expression.type&&this.raise(t.start,"JSX attributes must only be assigned a non-empty expression"),t;case l.jsxTagStart:case c.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let t=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let t=this.startNode();return this.next(),t.expression=this.type===c.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(c.braceR),this.finishNode(t,"JSXExpressionContainer")}jsx_parseAttribute(){let t=this.startNode();return this.eat(c.braceL)?(this.expect(c.ellipsis),t.argument=this.parseMaybeAssign(),this.expect(c.braceR),this.finishNode(t,"JSXSpreadAttribute")):(t.name=this.jsx_parseNamespacedName(),t.value=this.eat(c.eq)?this.jsx_parseAttributeValue():null,this.finishNode(t,"JSXAttribute"))}jsx_parseOpeningElementAt(t,e){let i=this.startNodeAt(t,e);i.attributes=[];let s=this.jsx_parseElementName();for(s&&(i.name=s);this.type!==c.slash&&this.type!==l.jsxTagEnd;)i.attributes.push(this.jsx_parseAttribute());return i.selfClosing=this.eat(c.slash),this.expect(l.jsxTagEnd),this.finishNode(i,s?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(t,e){let i=this.startNodeAt(t,e),s=this.jsx_parseElementName();return s&&(i.name=s),this.expect(l.jsxTagEnd),this.finishNode(i,s?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(t,e){let i=this.startNodeAt(t,e),s=[],r=this.jsx_parseOpeningElementAt(t,e),a=null;if(!r.selfClosing){t:for(;;)switch(this.type){case l.jsxTagStart:if(t=this.start,e=this.startLoc,this.next(),this.eat(c.slash)){a=this.jsx_parseClosingElementAt(t,e);break t}s.push(this.jsx_parseElementAt(t,e));break;case l.jsxText:s.push(this.parseExprAtom());break;case c.braceL:s.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}h(a.name)!==h(r.name)&&this.raise(a.start,"Expected corresponding JSX closing tag for <"+h(r.name)+">")}let n=r.name?"Element":"Fragment";return i["opening"+n]=r,i["closing"+n]=a,i.children=s,this.type===c.relational&&"<"===this.value&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(i,"JSX"+n)}jsx_parseText(){let t=this.parseLiteral(this.value);return t.type="JSXText",t}jsx_parseElement(){let t=this.start,e=this.startLoc;return this.next(),this.jsx_parseElementAt(t,e)}parseExprAtom(t){return this.type===l.jsxText?this.jsx_parseText():this.type===l.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(t)}readToken(t){let e=this.curContext();if(e===m)return this.jsx_readToken();if(e===d||e===f){if(x(t))return this.jsx_readWord();if(62==t)return++this.pos,this.finishToken(l.jsxTagEnd);if((34===t||39===t)&&e==d)return this.jsx_readString(t)}return 60===t&&this.exprAllowed&&33!==this.input.charCodeAt(this.pos+1)?(++this.pos,this.finishToken(l.jsxTagStart)):super.readToken(t)}updateContext(t){if(this.type==c.braceL){var e=this.curContext();e==d?this.context.push(u.b_expr):e==m?this.context.push(u.b_tmpl):super.updateContext(t),this.exprAllowed=!0}else{if(this.type!==c.slash||t!==l.jsxTagStart)return super.updateContext(t);this.context.length-=2,this.context.push(f),this.exprAllowed=!1}}}}({allowNamespaces:!1!==t.allowNamespaces,allowNamespacedObjects:!!t.allowNamespacedObjects},e)}},Object.defineProperty(t.exports,"tokTypes",{get:function(){return o(i(630)).tokTypes},configurable:!0,enumerable:!0})},591(t){t.exports={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"Â ",iexcl:"Â¡",cent:"Â¢",pound:"Â£",curren:"Â¤",yen:"Â¥",brvbar:"Â¦",sect:"Â§",uml:"Â¨",copy:"Â©",ordf:"Âª",laquo:"Â«",not:"Â¬",shy:"Â­",reg:"Â®",macr:"Â¯",deg:"Â°",plusmn:"Â±",sup2:"Â²",sup3:"Â³",acute:"Â´",micro:"Âµ",para:"Â¶",middot:"Â·",cedil:"Â¸",sup1:"Â¹",ordm:"Âº",raquo:"Â»",frac14:"Â¼",frac12:"Â½",frac34:"Â¾",iquest:"Â¿",Agrave:"Ã€",Aacute:"Ã",Acirc:"Ã‚",Atilde:"Ãƒ",Auml:"Ã„",Aring:"Ã…",AElig:"Ã†",Ccedil:"Ã‡",Egrave:"Ãˆ",Eacute:"Ã‰",Ecirc:"ÃŠ",Euml:"Ã‹",Igrave:"ÃŒ",Iacute:"Ã",Icirc:"ÃŽ",Iuml:"Ã",ETH:"Ã",Ntilde:"Ã‘",Ograve:"Ã’",Oacute:"Ã“",Ocirc:"Ã”",Otilde:"Ã•",Ouml:"Ã–",times:"Ã—",Oslash:"Ã˜",Ugrave:"Ã™",Uacute:"Ãš",Ucirc:"Ã›",Uuml:"Ãœ",Yacute:"Ã",THORN:"Ãž",szlig:"ÃŸ",agrave:"Ã ",aacute:"Ã¡",acirc:"Ã¢",atilde:"Ã£",auml:"Ã¤",aring:"Ã¥",aelig:"Ã¦",ccedil:"Ã§",egrave:"Ã¨",eacute:"Ã©",ecirc:"Ãª",euml:"Ã«",igrave:"Ã¬",iacute:"Ã­",icirc:"Ã®",iuml:"Ã¯",eth:"Ã°",ntilde:"Ã±",ograve:"Ã²",oacute:"Ã³",ocirc:"Ã´",otilde:"Ãµ",ouml:"Ã¶",divide:"Ã·",oslash:"Ã¸",ugrave:"Ã¹",uacute:"Ãº",ucirc:"Ã»",uuml:"Ã¼",yacute:"Ã½",thorn:"Ã¾",yuml:"Ã¿",OElig:"Å’",oelig:"Å“",Scaron:"Å ",scaron:"Å¡",Yuml:"Å¸",fnof:"Æ’",circ:"Ë†",tilde:"Ëœ",Alpha:"Î‘",Beta:"Î’",Gamma:"Î“",Delta:"Î”",Epsilon:"Î•",Zeta:"Î–",Eta:"Î—",Theta:"Î˜",Iota:"Î™",Kappa:"Îš",Lambda:"Î›",Mu:"Îœ",Nu:"Î",Xi:"Îž",Omicron:"ÎŸ",Pi:"Î ",Rho:"Î¡",Sigma:"Î£",Tau:"Î¤",Upsilon:"Î¥",Phi:"Î¦",Chi:"Î§",Psi:"Î¨",Omega:"Î©",alpha:"Î±",beta:"Î²",gamma:"Î³",delta:"Î´",epsilon:"Îµ",zeta:"Î¶",eta:"Î·",theta:"Î¸",iota:"Î¹",kappa:"Îº",lambda:"Î»",mu:"Î¼",nu:"Î½",xi:"Î¾",omicron:"Î¿",pi:"Ï€",rho:"Ï",sigmaf:"Ï‚",sigma:"Ïƒ",tau:"Ï„",upsilon:"Ï…",phi:"Ï†",chi:"Ï‡",psi:"Ïˆ",omega:"Ï‰",thetasym:"Ï‘",upsih:"Ï’",piv:"Ï–",ensp:"â€‚",emsp:"â€ƒ",thinsp:"â€‰",zwnj:"â€Œ",zwj:"â€",lrm:"â€Ž",rlm:"â€",ndash:"â€“",mdash:"â€”",lsquo:"â€˜",rsquo:"â€™",sbquo:"â€š",ldquo:"â€œ",rdquo:"â€",bdquo:"â€ž",dagger:"â€ ",Dagger:"â€¡",bull:"â€¢",hellip:"â€¦",permil:"â€°",prime:"â€²",Prime:"â€³",lsaquo:"â€¹",rsaquo:"â€º",oline:"â€¾",frasl:"â„",euro:"â‚¬",image:"â„‘",weierp:"â„˜",real:"â„œ",trade:"â„¢",alefsym:"â„µ",larr:"â†",uarr:"â†‘",rarr:"â†’",darr:"â†“",harr:"â†”",crarr:"â†µ",lArr:"â‡",uArr:"â‡‘",rArr:"â‡’",dArr:"â‡“",hArr:"â‡”",forall:"âˆ€",part:"âˆ‚",exist:"âˆƒ",empty:"âˆ…",nabla:"âˆ‡",isin:"âˆˆ",notin:"âˆ‰",ni:"âˆ‹",prod:"âˆ",sum:"âˆ‘",minus:"âˆ’",lowast:"âˆ—",radic:"âˆš",prop:"âˆ",infin:"âˆž",ang:"âˆ ",and:"âˆ§",or:"âˆ¨",cap:"âˆ©",cup:"âˆª",int:"âˆ«",there4:"âˆ´",sim:"âˆ¼",cong:"â‰…",asymp:"â‰ˆ",ne:"â‰ ",equiv:"â‰¡",le:"â‰¤",ge:"â‰¥",sub:"âŠ‚",sup:"âŠƒ",nsub:"âŠ„",sube:"âŠ†",supe:"âŠ‡",oplus:"âŠ•",otimes:"âŠ—",perp:"âŠ¥",sdot:"â‹…",lceil:"âŒˆ",rceil:"âŒ‰",lfloor:"âŒŠ",rfloor:"âŒ‹",lang:"âŒ©",rang:"âŒª",loz:"â—Š",spades:"â™ ",clubs:"â™£",hearts:"â™¥",diams:"â™¦"}},630(t,e){!function(t){var e=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],i=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],s="â€Œâ€Â·Ì€-Í¯Î‡Òƒ-Ò‡Ö‘-Ö½Ö¿××‚×„×…×‡Ø-ØšÙ‹-Ù©Ù°Û–-ÛœÛŸ-Û¤Û§Û¨Ûª-Û­Û°-Û¹Ü‘Ü°-ÝŠÞ¦-Þ°ß€-ß‰ß«-ß³ß½à –-à ™à ›-à £à ¥-à §à ©-à ­à¡™-à¡›à¢—-à¢Ÿà£Š-à£¡à££-à¤ƒà¤º-à¤¼à¤¾-à¥à¥‘-à¥—à¥¢à¥£à¥¦-à¥¯à¦-à¦ƒà¦¼à¦¾-à§„à§‡à§ˆà§‹-à§à§—à§¢à§£à§¦-à§¯à§¾à¨-à¨ƒà¨¼à¨¾-à©‚à©‡à©ˆà©‹-à©à©‘à©¦-à©±à©µàª-àªƒàª¼àª¾-à«…à«‡-à«‰à«‹-à«à«¢à«£à«¦-à«¯à«º-à«¿à¬-à¬ƒà¬¼à¬¾-à­„à­‡à­ˆà­‹-à­à­•-à­—à­¢à­£à­¦-à­¯à®‚à®¾-à¯‚à¯†-à¯ˆà¯Š-à¯à¯—à¯¦-à¯¯à°€-à°„à°¼à°¾-à±„à±†-à±ˆà±Š-à±à±•à±–à±¢à±£à±¦-à±¯à²-à²ƒà²¼à²¾-à³„à³†-à³ˆà³Š-à³à³•à³–à³¢à³£à³¦-à³¯à³³à´€-à´ƒà´»à´¼à´¾-àµ„àµ†-àµˆàµŠ-àµàµ—àµ¢àµ£àµ¦-àµ¯à¶-à¶ƒà·Šà·-à·”à·–à·˜-à·Ÿà·¦-à·¯à·²à·³à¸±à¸´-à¸ºà¹‡-à¹Žà¹-à¹™àº±àº´-àº¼à»ˆ-à»Žà»-à»™à¼˜à¼™à¼ -à¼©à¼µà¼·à¼¹à¼¾à¼¿à½±-à¾„à¾†à¾‡à¾-à¾—à¾™-à¾¼à¿†á€«-á€¾á€-á‰á–-á™áž-á á¢-á¤á§-á­á±-á´á‚‚-á‚á‚-á‚á-áŸá©-á±áœ’-áœ•áœ²-áœ´á’á“á²á³áž´-áŸ“áŸáŸ -áŸ©á ‹-á á -á ™á¢©á¤ -á¤«á¤°-á¤»á¥†-á¥á§-á§šá¨—-á¨›á©•-á©žá© -á©¼á©¿-áª‰áª-áª™áª°-áª½áª¿-á«á« -á««á¬€-á¬„á¬´-á­„á­-á­™á­«-á­³á®€-á®‚á®¡-á®­á®°-á®¹á¯¦-á¯³á°¤-á°·á±€-á±‰á±-á±™á³-á³’á³”-á³¨á³­á³´á³·-á³¹á·€-á·¿â€Œâ€â€¿â€â”âƒ-âƒœâƒ¡âƒ¥-âƒ°â³¯-â³±âµ¿â· -â·¿ã€ª-ã€¯ã‚™ã‚šãƒ»ê˜ -ê˜©ê™¯ê™´-ê™½êšžêšŸê›°ê›±ê ‚ê †ê ‹ê £-ê §ê ¬ê¢€ê¢ê¢´-ê£…ê£-ê£™ê£ -ê£±ê£¿-ê¤‰ê¤¦-ê¤­ê¥‡-ê¥“ê¦€-ê¦ƒê¦³-ê§€ê§-ê§™ê§¥ê§°-ê§¹ê¨©-ê¨¶ê©ƒê©Œê©ê©-ê©™ê©»-ê©½êª°êª²-êª´êª·êª¸êª¾êª¿ê«ê««-ê«¯ê«µê«¶ê¯£-ê¯ªê¯¬ê¯­ê¯°-ê¯¹ï¬žï¸€-ï¸ï¸ -ï¸¯ï¸³ï¸´ï¹-ï¹ï¼-ï¼™ï¼¿ï½¥",r="ÂªÂµÂºÃ€-Ã–Ã˜-Ã¶Ã¸-ËË†-Ë‘Ë -Ë¤Ë¬Ë®Í°-Í´Í¶Í·Íº-Í½Í¿Î†Îˆ-ÎŠÎŒÎŽ-Î¡Î£-ÏµÏ·-ÒÒŠ-Ô¯Ô±-Õ–Õ™Õ -Öˆ×-×ª×¯-×²Ø -ÙŠÙ®Ù¯Ù±-Û“Û•Û¥Û¦Û®Û¯Ûº-Û¼Û¿ÜÜ’-Ü¯Ý-Þ¥Þ±ßŠ-ßªß´ßµßºà €-à •à šà ¤à ¨à¡€-à¡˜à¡ -à¡ªà¡°-à¢‡à¢‰-à¢à¢ -à£‰à¤„-à¤¹à¤½à¥à¥˜-à¥¡à¥±-à¦€à¦…-à¦Œà¦à¦à¦“-à¦¨à¦ª-à¦°à¦²à¦¶-à¦¹à¦½à§Žà§œà§à§Ÿ-à§¡à§°à§±à§¼à¨…-à¨Šà¨à¨à¨“-à¨¨à¨ª-à¨°à¨²à¨³à¨µà¨¶à¨¸à¨¹à©™-à©œà©žà©²-à©´àª…-àªàª-àª‘àª“-àª¨àªª-àª°àª²àª³àªµ-àª¹àª½à«à« à«¡à«¹à¬…-à¬Œà¬à¬à¬“-à¬¨à¬ª-à¬°à¬²à¬³à¬µ-à¬¹à¬½à­œà­à­Ÿ-à­¡à­±à®ƒà®…-à®Šà®Ž-à®à®’-à®•à®™à®šà®œà®žà®Ÿà®£à®¤à®¨-à®ªà®®-à®¹à¯à°…-à°Œà°Ž-à°à°’-à°¨à°ª-à°¹à°½à±˜-à±šà±œà±à± à±¡à²€à²…-à²Œà²Ž-à²à²’-à²¨à²ª-à²³à²µ-à²¹à²½à³œ-à³žà³ à³¡à³±à³²à´„-à´Œà´Ž-à´à´’-à´ºà´½àµŽàµ”-àµ–àµŸ-àµ¡àµº-àµ¿à¶…-à¶–à¶š-à¶±à¶³-à¶»à¶½à·€-à·†à¸-à¸°à¸²à¸³à¹€-à¹†àºàº‚àº„àº†-àºŠàºŒ-àº£àº¥àº§-àº°àº²àº³àº½à»€-à»„à»†à»œ-à»Ÿà¼€à½€-à½‡à½‰-à½¬à¾ˆ-à¾Œá€€-á€ªá€¿á-á•áš-áá¡á¥á¦á®-á°áµ-á‚á‚Žá‚ -áƒ…áƒ‡áƒáƒ-áƒºáƒ¼-á‰ˆá‰Š-á‰á‰-á‰–á‰˜á‰š-á‰á‰ -áŠˆáŠŠ-áŠáŠ-áŠ°áŠ²-áŠµáŠ¸-áŠ¾á‹€á‹‚-á‹…á‹ˆ-á‹–á‹˜-áŒáŒ’-áŒ•áŒ˜-ášáŽ€-áŽáŽ -áµá¸-á½á-á™¬á™¯-á™¿áš-áššáš -á›ªá›®-á›¸áœ€-áœ‘áœŸ-áœ±á€-á‘á -á¬á®-á°áž€-áž³áŸ—áŸœá  -á¡¸á¢€-á¢¨á¢ªá¢°-á£µá¤€-á¤žá¥-á¥­á¥°-á¥´á¦€-á¦«á¦°-á§‰á¨€-á¨–á¨ -á©”áª§á¬…-á¬³á­…-á­Œá®ƒ-á® á®®á®¯á®º-á¯¥á°€-á°£á±-á±á±š-á±½á²€-á²Šá²-á²ºá²½-á²¿á³©-á³¬á³®-á³³á³µá³¶á³ºá´€-á¶¿á¸€-á¼•á¼˜-á¼á¼ -á½…á½ˆ-á½á½-á½—á½™á½›á½á½Ÿ-á½½á¾€-á¾´á¾¶-á¾¼á¾¾á¿‚-á¿„á¿†-á¿Œá¿-á¿“á¿–-á¿›á¿ -á¿¬á¿²-á¿´á¿¶-á¿¼â±â¿â‚-â‚œâ„‚â„‡â„Š-â„“â„•â„˜-â„â„¤â„¦â„¨â„ª-â„¹â„¼-â„¿â……-â…‰â…Žâ… -â†ˆâ°€-â³¤â³«-â³®â³²â³³â´€-â´¥â´§â´­â´°-âµ§âµ¯â¶€-â¶–â¶ -â¶¦â¶¨-â¶®â¶°-â¶¶â¶¸-â¶¾â·€-â·†â·ˆ-â·Žâ·-â·–â·˜-â·žã€…-ã€‡ã€¡-ã€©ã€±-ã€µã€¸-ã€¼ã-ã‚–ã‚›-ã‚Ÿã‚¡-ãƒºãƒ¼-ãƒ¿ã„…-ã„¯ã„±-ã†Žã† -ã†¿ã‡°-ã‡¿ã€-ä¶¿ä¸€-ê’Œê“-ê“½ê”€-ê˜Œê˜-ê˜Ÿê˜ªê˜«ê™€-ê™®ê™¿-êšêš -ê›¯êœ—-êœŸêœ¢-êžˆêž‹-êŸœêŸ±-ê ê ƒ-ê …ê ‡-ê Šê Œ-ê ¢ê¡€-ê¡³ê¢‚-ê¢³ê£²-ê£·ê£»ê£½ê£¾ê¤Š-ê¤¥ê¤°-ê¥†ê¥ -ê¥¼ê¦„-ê¦²ê§ê§ -ê§¤ê§¦-ê§¯ê§º-ê§¾ê¨€-ê¨¨ê©€-ê©‚ê©„-ê©‹ê© -ê©¶ê©ºê©¾-êª¯êª±êªµêª¶êª¹-êª½ê«€ê«‚ê«›-ê«ê« -ê«ªê«²-ê«´ê¬-ê¬†ê¬‰-ê¬Žê¬‘-ê¬–ê¬ -ê¬¦ê¬¨-ê¬®ê¬°-ê­šê­œ-ê­©ê­°-ê¯¢ê°€-íž£íž°-íŸ†íŸ‹-íŸ»ï¤€-ï©­ï©°-ï«™ï¬€-ï¬†ï¬“-ï¬—ï¬ï¬Ÿ-ï¬¨ï¬ª-ï¬¶ï¬¸-ï¬¼ï¬¾ï­€ï­ï­ƒï­„ï­†-ï®±ï¯“-ï´½ïµ-ï¶ï¶’-ï·‡ï·°-ï·»ï¹°-ï¹´ï¹¶-ï»¼ï¼¡-ï¼ºï½-ï½šï½¦-ï¾¾ï¿‚-ï¿‡ï¿Š-ï¿ï¿’-ï¿—ï¿š-ï¿œ",a={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},n="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",o={5:n,"5module":n+" export import",6:n+" const class extends export import super"},h=/^in(stanceof)?$/,p=new RegExp("["+r+"]"),c=new RegExp("["+r+s+"]");function l(t,e){for(var i=65536,s=0;s<e.length;s+=2){if((i+=e[s])>t)return!1;if((i+=e[s+1])>=t)return!0}return!1}function u(t,e){return t<65?36===t:t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&p.test(String.fromCharCode(t)):!1!==e&&l(t,i)))}function d(t,s){return t<48?36===t:t<58||!(t<65)&&(t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&c.test(String.fromCharCode(t)):!1!==s&&(l(t,i)||l(t,e)))))}var f=function(t,e){void 0===e&&(e={}),this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop||null,this.updateContext=null};function m(t,e){return new f(t,{beforeExpr:!0,binop:e})}var g={beforeExpr:!0},x={startsExpr:!0},v={};function y(t,e){return void 0===e&&(e={}),e.keyword=t,v[t]=new f(t,e)}var b={num:new f("num",x),regexp:new f("regexp",x),string:new f("string",x),name:new f("name",x),privateId:new f("privateId",x),eof:new f("eof"),bracketL:new f("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new f("]"),braceL:new f("{",{beforeExpr:!0,startsExpr:!0}),braceR:new f("}"),parenL:new f("(",{beforeExpr:!0,startsExpr:!0}),parenR:new f(")"),comma:new f(",",g),semi:new f(";",g),colon:new f(":",g),dot:new f("."),question:new f("?",g),questionDot:new f("?."),arrow:new f("=>",g),template:new f("template"),invalidTemplate:new f("invalidTemplate"),ellipsis:new f("...",g),backQuote:new f("`",x),dollarBraceL:new f("${",{beforeExpr:!0,startsExpr:!0}),eq:new f("=",{beforeExpr:!0,isAssign:!0}),assign:new f("_=",{beforeExpr:!0,isAssign:!0}),incDec:new f("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new f("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:m("||",1),logicalAND:m("&&",2),bitwiseOR:m("|",3),bitwiseXOR:m("^",4),bitwiseAND:m("&",5),equality:m("==/!=/===/!==",6),relational:m("</>/<=/>=",7),bitShift:m("<</>>/>>>",8),plusMin:new f("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:m("%",10),star:m("*",10),slash:m("/",10),starstar:new f("**",{beforeExpr:!0}),coalesce:m("??",1),_break:y("break"),_case:y("case",g),_catch:y("catch"),_continue:y("continue"),_debugger:y("debugger"),_default:y("default",g),_do:y("do",{isLoop:!0,beforeExpr:!0}),_else:y("else",g),_finally:y("finally"),_for:y("for",{isLoop:!0}),_function:y("function",x),_if:y("if"),_return:y("return",g),_switch:y("switch"),_throw:y("throw",g),_try:y("try"),_var:y("var"),_const:y("const"),_while:y("while",{isLoop:!0}),_with:y("with"),_new:y("new",{beforeExpr:!0,startsExpr:!0}),_this:y("this",x),_super:y("super",x),_class:y("class",x),_extends:y("extends",g),_export:y("export"),_import:y("import",x),_null:y("null",x),_true:y("true",x),_false:y("false",x),_in:y("in",{beforeExpr:!0,binop:7}),_instanceof:y("instanceof",{beforeExpr:!0,binop:7}),_typeof:y("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:y("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:y("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},_=/\r\n?|\n|\u2028|\u2029/,k=new RegExp(_.source,"g");function S(t){return 10===t||13===t||8232===t||8233===t}function C(t,e,i){void 0===i&&(i=t.length);for(var s=e;s<i;s++){var r=t.charCodeAt(s);if(S(r))return s<i-1&&13===r&&10===t.charCodeAt(s+1)?s+2:s+1}return-1}var w=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,E=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,A=Object.prototype,I=A.hasOwnProperty,P=A.toString,T=Object.hasOwn||function(t,e){return I.call(t,e)},N=Array.isArray||function(t){return"[object Array]"===P.call(t)},V=Object.create(null);function L(t){return V[t]||(V[t]=new RegExp("^(?:"+t.replace(/ /g,"|")+")$"))}function R(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}var O=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,D=function(t,e){this.line=t,this.column=e};D.prototype.offset=function(t){return new D(this.line,this.column+t)};var B=function(t,e,i){this.start=e,this.end=i,null!==t.sourceFile&&(this.source=t.sourceFile)};function M(t,e){for(var i=1,s=0;;){var r=C(t,s,e);if(r<0)return new D(i,e-s);++i,s=r}}var F={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},j=!1;function U(t){var e={};for(var i in F)e[i]=t&&T(t,i)?t[i]:F[i];if("latest"===e.ecmaVersion?e.ecmaVersion=1e8:null==e.ecmaVersion?(!j&&"object"==typeof console&&console.warn&&(j=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),e.ecmaVersion=11):e.ecmaVersion>=2015&&(e.ecmaVersion-=2009),null==e.allowReserved&&(e.allowReserved=e.ecmaVersion<5),t&&null!=t.allowHashBang||(e.allowHashBang=e.ecmaVersion>=14),N(e.onToken)){var s=e.onToken;e.onToken=function(t){return s.push(t)}}if(N(e.onComment)&&(e.onComment=q(e,e.onComment)),"commonjs"===e.sourceType&&e.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return e}function q(t,e){return function(i,s,r,a,n,o){var h={type:i?"Block":"Line",value:s,start:r,end:a};t.locations&&(h.loc=new B(this,n,o)),t.ranges&&(h.range=[r,a]),e.push(h)}}var G=1,W=2,H=4,z=8,X=16,K=32,Q=64,J=128,Y=256,Z=512,$=1024,tt=G|W|Y;function et(t,e){return W|(t?H:0)|(e?z:0)}var it=0,st=1,rt=2,at=3,nt=4,ot=5,ht=function(t,e,i){this.options=t=U(t),this.sourceFile=t.sourceFile,this.keywords=L(o[t.ecmaVersion>=6?6:"module"===t.sourceType?"5module":5]);var s="";!0!==t.allowReserved&&(s=a[t.ecmaVersion>=6?6:5===t.ecmaVersion?5:3],"module"===t.sourceType&&(s+=" await")),this.reservedWords=L(s);var r=(s?s+" ":"")+a.strict;this.reservedWordsStrict=L(r),this.reservedWordsStrictBind=L(r+" "+a.strictBind),this.input=String(e),this.containsEsc=!1,i?(this.pos=i,this.lineStart=this.input.lastIndexOf("\n",i-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(_).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=b.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===t.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&t.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope("commonjs"===this.options.sourceType?W:G),this.regexpState=null,this.privateNameStack=[]},pt={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};ht.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)},pt.inFunction.get=function(){return(this.currentVarScope().flags&W)>0},pt.inGenerator.get=function(){return(this.currentVarScope().flags&z)>0},pt.inAsync.get=function(){return(this.currentVarScope().flags&H)>0},pt.canAwait.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t].flags;if(e&(Y|Z))return!1;if(e&W)return(e&H)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},pt.allowReturn.get=function(){return!!this.inFunction||!!(this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&G)},pt.allowSuper.get=function(){return(this.currentThisScope().flags&Q)>0||this.options.allowSuperOutsideMethod},pt.allowDirectSuper.get=function(){return(this.currentThisScope().flags&J)>0},pt.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},pt.allowNewDotTarget.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t].flags;if(e&(Y|Z)||e&W&&!(e&X))return!0}return!1},pt.allowUsing.get=function(){var t=this.currentScope().flags;return!(t&$||!this.inModule&&t&G)},pt.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Y)>0},ht.extend=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var i=this,s=0;s<t.length;s++)i=t[s](i);return i},ht.parse=function(t,e){return new this(e,t).parse()},ht.parseExpressionAt=function(t,e,i){var s=new this(i,t,e);return s.nextToken(),s.parseExpression()},ht.tokenizer=function(t,e){return new this(e,t)},Object.defineProperties(ht.prototype,pt);var ct=ht.prototype,lt=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;ct.strictDirective=function(t){if(this.options.ecmaVersion<5)return!1;for(;;){E.lastIndex=t,t+=E.exec(this.input)[0].length;var e=lt.exec(this.input.slice(t));if(!e)return!1;if("use strict"===(e[1]||e[2])){E.lastIndex=t+e[0].length;var i=E.exec(this.input),s=i.index+i[0].length,r=this.input.charAt(s);return";"===r||"}"===r||_.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(r)||"!"===r&&"="===this.input.charAt(s+1))}t+=e[0].length,E.lastIndex=t,t+=E.exec(this.input)[0].length,";"===this.input[t]&&t++}},ct.eat=function(t){return this.type===t&&(this.next(),!0)},ct.isContextual=function(t){return this.type===b.name&&this.value===t&&!this.containsEsc},ct.eatContextual=function(t){return!!this.isContextual(t)&&(this.next(),!0)},ct.expectContextual=function(t){this.eatContextual(t)||this.unexpected()},ct.canInsertSemicolon=function(){return this.type===b.eof||this.type===b.braceR||_.test(this.input.slice(this.lastTokEnd,this.start))},ct.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},ct.semicolon=function(){this.eat(b.semi)||this.insertSemicolon()||this.unexpected()},ct.afterTrailingComma=function(t,e){if(this.type===t)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),e||this.next(),!0},ct.expect=function(t){this.eat(t)||this.unexpected()},ct.unexpected=function(t){this.raise(null!=t?t:this.start,"Unexpected token")};var ut=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};ct.checkPatternErrors=function(t,e){if(t){t.trailingComma>-1&&this.raiseRecoverable(t.trailingComma,"Comma is not permitted after the rest element");var i=e?t.parenthesizedAssign:t.parenthesizedBind;i>-1&&this.raiseRecoverable(i,e?"Assigning to rvalue":"Parenthesized pattern")}},ct.checkExpressionErrors=function(t,e){if(!t)return!1;var i=t.shorthandAssign,s=t.doubleProto;if(!e)return i>=0||s>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),s>=0&&this.raiseRecoverable(s,"Redefinition of __proto__ property")},ct.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},ct.isSimpleAssignTarget=function(t){return"ParenthesizedExpression"===t.type?this.isSimpleAssignTarget(t.expression):"Identifier"===t.type||"MemberExpression"===t.type};var dt=ht.prototype;dt.parseTopLevel=function(t){var e=Object.create(null);for(t.body||(t.body=[]);this.type!==b.eof;){var i=this.parseStatement(null,!0,e);t.body.push(i)}if(this.inModule)for(var s=0,r=Object.keys(this.undefinedExports);s<r.length;s+=1){var a=r[s];this.raiseRecoverable(this.undefinedExports[a].start,"Export '"+a+"' is not defined")}return this.adaptDirectivePrologue(t.body),this.next(),t.sourceType="commonjs"===this.options.sourceType?"script":this.options.sourceType,this.finishNode(t,"Program")};var ft={kind:"loop"},mt={kind:"switch"};dt.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;E.lastIndex=this.pos;var e=E.exec(this.input),i=this.pos+e[0].length,s=this.fullCharCodeAt(i);if(91===s||92===s)return!0;if(t)return!1;if(123===s)return!0;if(u(s)){var r=i;do{i+=s<=65535?1:2}while(d(s=this.fullCharCodeAt(i)));if(92===s)return!0;var a=this.input.slice(r,i);if(!h.test(a))return!0}return!1},dt.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;E.lastIndex=this.pos;var t,e=E.exec(this.input),i=this.pos+e[0].length;return!(_.test(this.input.slice(this.pos,i))||"function"!==this.input.slice(i,i+8)||i+8!==this.input.length&&(d(t=this.fullCharCodeAt(i+8))||92===t))},dt.isUsingKeyword=function(t,e){if(this.options.ecmaVersion<17||!this.isContextual(t?"await":"using"))return!1;E.lastIndex=this.pos;var i=E.exec(this.input),s=this.pos+i[0].length;if(_.test(this.input.slice(this.pos,s)))return!1;if(t){var r,a=s+5;if("using"!==this.input.slice(s,a)||a===this.input.length||d(r=this.fullCharCodeAt(a))||92===r)return!1;E.lastIndex=a;var n=E.exec(this.input);if(s=a+n[0].length,n&&_.test(this.input.slice(a,s)))return!1}var o=this.fullCharCodeAt(s);if(!u(o)&&92!==o)return!1;var p=s;do{s+=o<=65535?1:2}while(d(o=this.fullCharCodeAt(s)));if(92===o)return!0;var c=this.input.slice(p,s);return!(h.test(c)||e&&"of"===c)},dt.isAwaitUsing=function(t){return this.isUsingKeyword(!0,t)},dt.isUsing=function(t){return this.isUsingKeyword(!1,t)},dt.parseStatement=function(t,e,i){var s,r=this.type,a=this.startNode();switch(this.isLet(t)&&(r=b._var,s="let"),r){case b._break:case b._continue:return this.parseBreakContinueStatement(a,r.keyword);case b._debugger:return this.parseDebuggerStatement(a);case b._do:return this.parseDoStatement(a);case b._for:return this.parseForStatement(a);case b._function:return t&&(this.strict||"if"!==t&&"label"!==t)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(a,!1,!t);case b._class:return t&&this.unexpected(),this.parseClass(a,!0);case b._if:return this.parseIfStatement(a);case b._return:return this.parseReturnStatement(a);case b._switch:return this.parseSwitchStatement(a);case b._throw:return this.parseThrowStatement(a);case b._try:return this.parseTryStatement(a);case b._const:case b._var:return s=s||this.value,t&&"var"!==s&&this.unexpected(),this.parseVarStatement(a,s);case b._while:return this.parseWhileStatement(a);case b._with:return this.parseWithStatement(a);case b.braceL:return this.parseBlock(!0,a);case b.semi:return this.parseEmptyStatement(a);case b._export:case b._import:if(this.options.ecmaVersion>10&&r===b._import){E.lastIndex=this.pos;var n=E.exec(this.input),o=this.pos+n[0].length,h=this.input.charCodeAt(o);if(40===h||46===h)return this.parseExpressionStatement(a,this.parseExpression())}return this.options.allowImportExportEverywhere||(e||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===b._import?this.parseImport(a):this.parseExport(a,i);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(a,!0,!t);var p=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(p)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),"await using"===p&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(a,!1,p),this.semicolon(),this.finishNode(a,"VariableDeclaration");var c=this.value,l=this.parseExpression();return r===b.name&&"Identifier"===l.type&&this.eat(b.colon)?this.parseLabeledStatement(a,c,l,t):this.parseExpressionStatement(a,l)}},dt.parseBreakContinueStatement=function(t,e){var i="break"===e;this.next(),this.eat(b.semi)||this.insertSemicolon()?t.label=null:this.type!==b.name?this.unexpected():(t.label=this.parseIdent(),this.semicolon());for(var s=0;s<this.labels.length;++s){var r=this.labels[s];if(null==t.label||r.name===t.label.name){if(null!=r.kind&&(i||"loop"===r.kind))break;if(t.label&&i)break}}return s===this.labels.length&&this.raise(t.start,"Unsyntactic "+e),this.finishNode(t,i?"BreakStatement":"ContinueStatement")},dt.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")},dt.parseDoStatement=function(t){return this.next(),this.labels.push(ft),t.body=this.parseStatement("do"),this.labels.pop(),this.expect(b._while),t.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(b.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")},dt.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(ft),this.enterScope(0),this.expect(b.parenL),this.type===b.semi)return e>-1&&this.unexpected(e),this.parseFor(t,null);var i=this.isLet();if(this.type===b._var||this.type===b._const||i){var s=this.startNode(),r=i?"let":this.value;return this.next(),this.parseVar(s,!0,r),this.finishNode(s,"VariableDeclaration"),this.parseForAfterInit(t,s,e)}var a=this.isContextual("let"),n=!1,o=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(o){var h=this.startNode();return this.next(),"await using"===o&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(h,!0,o),this.finishNode(h,"VariableDeclaration"),this.parseForAfterInit(t,h,e)}var p=this.containsEsc,c=new ut,l=this.start,u=e>-1?this.parseExprSubscripts(c,"await"):this.parseExpression(!0,c);return this.type===b._in||(n=this.options.ecmaVersion>=6&&this.isContextual("of"))?(e>-1?(this.type===b._in&&this.unexpected(e),t.await=!0):n&&this.options.ecmaVersion>=8&&(u.start!==l||p||"Identifier"!==u.type||"async"!==u.name?this.options.ecmaVersion>=9&&(t.await=!1):this.unexpected()),a&&n&&this.raise(u.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(u,!1,c),this.checkLValPattern(u),this.parseForIn(t,u)):(this.checkExpressionErrors(c,!0),e>-1&&this.unexpected(e),this.parseFor(t,u))},dt.parseForAfterInit=function(t,e,i){return(this.type===b._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===e.declarations.length?(this.options.ecmaVersion>=9&&(this.type===b._in?i>-1&&this.unexpected(i):t.await=i>-1),this.parseForIn(t,e)):(i>-1&&this.unexpected(i),this.parseFor(t,e))},dt.parseFunctionStatement=function(t,e,i){return this.next(),this.parseFunction(t,xt|(i?0:vt),!1,e)},dt.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(b._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")},dt.parseReturnStatement=function(t){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(b.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},dt.parseSwitchStatement=function(t){var e;this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(b.braceL),this.labels.push(mt),this.enterScope($);for(var i=!1;this.type!==b.braceR;)if(this.type===b._case||this.type===b._default){var s=this.type===b._case;e&&this.finishNode(e,"SwitchCase"),t.cases.push(e=this.startNode()),e.consequent=[],this.next(),s?e.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,e.test=null),this.expect(b.colon)}else e||this.unexpected(),e.consequent.push(this.parseStatement(null));return this.exitScope(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")},dt.parseThrowStatement=function(t){return this.next(),_.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var gt=[];dt.parseCatchClauseParam=function(){var t=this.parseBindingAtom(),e="Identifier"===t.type;return this.enterScope(e?K:0),this.checkLValPattern(t,e?nt:rt),this.expect(b.parenR),t},dt.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===b._catch){var e=this.startNode();this.next(),this.eat(b.parenL)?e.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),e.param=null,this.enterScope(0)),e.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(b._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},dt.parseVarStatement=function(t,e,i){return this.next(),this.parseVar(t,!1,e,i),this.semicolon(),this.finishNode(t,"VariableDeclaration")},dt.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(ft),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")},dt.parseWithStatement=function(t){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")},dt.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},dt.parseLabeledStatement=function(t,e,i,s){for(var r=0,a=this.labels;r<a.length;r+=1)a[r].name===e&&this.raise(i.start,"Label '"+e+"' is already declared");for(var n=this.type.isLoop?"loop":this.type===b._switch?"switch":null,o=this.labels.length-1;o>=0;o--){var h=this.labels[o];if(h.statementStart!==t.start)break;h.statementStart=this.start,h.kind=n}return this.labels.push({name:e,kind:n,statementStart:this.start}),t.body=this.parseStatement(s?-1===s.indexOf("label")?s+"label":s:"label"),this.labels.pop(),t.label=i,this.finishNode(t,"LabeledStatement")},dt.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},dt.parseBlock=function(t,e,i){for(void 0===t&&(t=!0),void 0===e&&(e=this.startNode()),e.body=[],this.expect(b.braceL),t&&this.enterScope(0);this.type!==b.braceR;){var s=this.parseStatement(null);e.body.push(s)}return i&&(this.strict=!1),this.next(),t&&this.exitScope(),this.finishNode(e,"BlockStatement")},dt.parseFor=function(t,e){return t.init=e,this.expect(b.semi),t.test=this.type===b.semi?null:this.parseExpression(),this.expect(b.semi),t.update=this.type===b.parenR?null:this.parseExpression(),this.expect(b.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")},dt.parseForIn=function(t,e){var i=this.type===b._in;return this.next(),"VariableDeclaration"===e.type&&null!=e.declarations[0].init&&(!i||this.options.ecmaVersion<8||this.strict||"var"!==e.kind||"Identifier"!==e.declarations[0].id.type)&&this.raise(e.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer"),t.left=e,t.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(b.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")},dt.parseVar=function(t,e,i,s){for(t.declarations=[],t.kind=i;;){var r=this.startNode();if(this.parseVarId(r,i),this.eat(b.eq)?r.init=this.parseMaybeAssign(e):s||"const"!==i||this.type===b._in||this.options.ecmaVersion>=6&&this.isContextual("of")?s||"using"!==i&&"await using"!==i||!(this.options.ecmaVersion>=17)||this.type===b._in||this.isContextual("of")?s||"Identifier"===r.id.type||e&&(this.type===b._in||this.isContextual("of"))?r.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+i+" declaration"):this.unexpected(),t.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(b.comma))break}return t},dt.parseVarId=function(t,e){t.id="using"===e||"await using"===e?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(t.id,"var"===e?st:rt,!1)};var xt=1,vt=2,yt=4;function bt(t,e){var i=e.key.name,s=t[i],r="true";return"MethodDefinition"!==e.type||"get"!==e.kind&&"set"!==e.kind||(r=(e.static?"s":"i")+e.kind),"iget"===s&&"iset"===r||"iset"===s&&"iget"===r||"sget"===s&&"sset"===r||"sset"===s&&"sget"===r?(t[i]="true",!1):!!s||(t[i]=r,!1)}function _t(t,e){var i=t.computed,s=t.key;return!i&&("Identifier"===s.type&&s.name===e||"Literal"===s.type&&s.value===e)}dt.parseFunction=function(t,e,i,s,r){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!s)&&(this.type===b.star&&e&vt&&this.unexpected(),t.generator=this.eat(b.star)),this.options.ecmaVersion>=8&&(t.async=!!s),e&xt&&(t.id=e&yt&&this.type!==b.name?null:this.parseIdent(),!t.id||e&vt||this.checkLValSimple(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?st:rt:at));var a=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(et(t.async,t.generator)),e&xt||(t.id=this.type===b.name?this.parseIdent():null),this.parseFunctionParams(t),this.parseFunctionBody(t,i,!1,r),this.yieldPos=a,this.awaitPos=n,this.awaitIdentPos=o,this.finishNode(t,e&xt?"FunctionDeclaration":"FunctionExpression")},dt.parseFunctionParams=function(t){this.expect(b.parenL),t.params=this.parseBindingList(b.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},dt.parseClass=function(t,e){this.next();var i=this.strict;this.strict=!0,this.parseClassId(t,e),this.parseClassSuper(t);var s=this.enterClassBody(),r=this.startNode(),a=!1;for(r.body=[],this.expect(b.braceL);this.type!==b.braceR;){var n=this.parseClassElement(null!==t.superClass);n&&(r.body.push(n),"MethodDefinition"===n.type&&"constructor"===n.kind?(a&&this.raiseRecoverable(n.start,"Duplicate constructor in the same class"),a=!0):n.key&&"PrivateIdentifier"===n.key.type&&bt(s,n)&&this.raiseRecoverable(n.key.start,"Identifier '#"+n.key.name+"' has already been declared"))}return this.strict=i,this.next(),t.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},dt.parseClassElement=function(t){if(this.eat(b.semi))return null;var e=this.options.ecmaVersion,i=this.startNode(),s="",r=!1,a=!1,n="method",o=!1;if(this.eatContextual("static")){if(e>=13&&this.eat(b.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===b.star?o=!0:s="static"}if(i.static=o,!s&&e>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==b.star||this.canInsertSemicolon()?s="async":a=!0),!s&&(e>=9||!a)&&this.eat(b.star)&&(r=!0),!s&&!a&&!r){var h=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?n=h:s=h)}if(s?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=s,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),e<13||this.type===b.parenL||"method"!==n||r||a){var p=!i.static&&_t(i,"constructor"),c=p&&t;p&&"method"!==n&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=p?"constructor":n,this.parseClassMethod(i,r,a,c)}else this.parseClassField(i);return i},dt.isClassElementNameStart=function(){return this.type===b.name||this.type===b.privateId||this.type===b.num||this.type===b.string||this.type===b.bracketL||this.type.keyword},dt.parseClassElementName=function(t){this.type===b.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),t.computed=!1,t.key=this.parsePrivateIdent()):this.parsePropertyName(t)},dt.parseClassMethod=function(t,e,i,s){var r=t.key;"constructor"===t.kind?(e&&this.raise(r.start,"Constructor can't be a generator"),i&&this.raise(r.start,"Constructor can't be an async method")):t.static&&_t(t,"prototype")&&this.raise(r.start,"Classes may not have a static property named prototype");var a=t.value=this.parseMethod(e,i,s);return"get"===t.kind&&0!==a.params.length&&this.raiseRecoverable(a.start,"getter should have no params"),"set"===t.kind&&1!==a.params.length&&this.raiseRecoverable(a.start,"setter should have exactly one param"),"set"===t.kind&&"RestElement"===a.params[0].type&&this.raiseRecoverable(a.params[0].start,"Setter cannot use rest params"),this.finishNode(t,"MethodDefinition")},dt.parseClassField=function(t){return _t(t,"constructor")?this.raise(t.key.start,"Classes can't have a field named 'constructor'"):t.static&&_t(t,"prototype")&&this.raise(t.key.start,"Classes can't have a static field named 'prototype'"),this.eat(b.eq)?(this.enterScope(Z|Q),t.value=this.parseMaybeAssign(),this.exitScope()):t.value=null,this.semicolon(),this.finishNode(t,"PropertyDefinition")},dt.parseClassStaticBlock=function(t){t.body=[];var e=this.labels;for(this.labels=[],this.enterScope(Y|Q);this.type!==b.braceR;){var i=this.parseStatement(null);t.body.push(i)}return this.next(),this.exitScope(),this.labels=e,this.finishNode(t,"StaticBlock")},dt.parseClassId=function(t,e){this.type===b.name?(t.id=this.parseIdent(),e&&this.checkLValSimple(t.id,rt,!1)):(!0===e&&this.unexpected(),t.id=null)},dt.parseClassSuper=function(t){t.superClass=this.eat(b._extends)?this.parseExprSubscripts(null,!1):null},dt.enterClassBody=function(){var t={declared:Object.create(null),used:[]};return this.privateNameStack.push(t),t.declared},dt.exitClassBody=function(){var t=this.privateNameStack.pop(),e=t.declared,i=t.used;if(this.options.checkPrivateFields)for(var s=this.privateNameStack.length,r=0===s?null:this.privateNameStack[s-1],a=0;a<i.length;++a){var n=i[a];T(e,n.name)||(r?r.used.push(n):this.raiseRecoverable(n.start,"Private field '#"+n.name+"' must be declared in an enclosing class"))}},dt.parseExportAllDeclaration=function(t,e){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(t.exported=this.parseModuleExportName(),this.checkExport(e,t.exported,this.lastTokStart)):t.exported=null),this.expectContextual("from"),this.type!==b.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ExportAllDeclaration")},dt.parseExport=function(t,e){if(this.next(),this.eat(b.star))return this.parseExportAllDeclaration(t,e);if(this.eat(b._default))return this.checkExport(e,"default",this.lastTokStart),t.declaration=this.parseExportDefaultDeclaration(),this.finishNode(t,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())t.declaration=this.parseExportDeclaration(t),"VariableDeclaration"===t.declaration.type?this.checkVariableExport(e,t.declaration.declarations):this.checkExport(e,t.declaration.id,t.declaration.id.start),t.specifiers=[],t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[]);else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))this.type!==b.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause());else{for(var i=0,s=t.specifiers;i<s.length;i+=1){var r=s[i];this.checkUnreserved(r.local),this.checkLocalExport(r.local),"Literal"===r.local.type&&this.raise(r.local.start,"A string literal cannot be used as an exported binding without `from`.")}t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[])}this.semicolon()}return this.finishNode(t,"ExportNamedDeclaration")},dt.parseExportDeclaration=function(t){return this.parseStatement(null)},dt.parseExportDefaultDeclaration=function(){var t;if(this.type===b._function||(t=this.isAsyncFunction())){var e=this.startNode();return this.next(),t&&this.next(),this.parseFunction(e,xt|yt,!1,t)}if(this.type===b._class){var i=this.startNode();return this.parseClass(i,"nullableID")}var s=this.parseMaybeAssign();return this.semicolon(),s},dt.checkExport=function(t,e,i){t&&("string"!=typeof e&&(e="Identifier"===e.type?e.name:e.value),T(t,e)&&this.raiseRecoverable(i,"Duplicate export '"+e+"'"),t[e]=!0)},dt.checkPatternExport=function(t,e){var i=e.type;if("Identifier"===i)this.checkExport(t,e,e.start);else if("ObjectPattern"===i)for(var s=0,r=e.properties;s<r.length;s+=1){var a=r[s];this.checkPatternExport(t,a)}else if("ArrayPattern"===i)for(var n=0,o=e.elements;n<o.length;n+=1){var h=o[n];h&&this.checkPatternExport(t,h)}else"Property"===i?this.checkPatternExport(t,e.value):"AssignmentPattern"===i?this.checkPatternExport(t,e.left):"RestElement"===i&&this.checkPatternExport(t,e.argument)},dt.checkVariableExport=function(t,e){if(t)for(var i=0,s=e;i<s.length;i+=1){var r=s[i];this.checkPatternExport(t,r.id)}},dt.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},dt.parseExportSpecifier=function(t){var e=this.startNode();return e.local=this.parseModuleExportName(),e.exported=this.eatContextual("as")?this.parseModuleExportName():e.local,this.checkExport(t,e.exported,e.exported.start),this.finishNode(e,"ExportSpecifier")},dt.parseExportSpecifiers=function(t){var e=[],i=!0;for(this.expect(b.braceL);!this.eat(b.braceR);){if(i)i=!1;else if(this.expect(b.comma),this.afterTrailingComma(b.braceR))break;e.push(this.parseExportSpecifier(t))}return e},dt.parseImport=function(t){return this.next(),this.type===b.string?(t.specifiers=gt,t.source=this.parseExprAtom()):(t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.type===b.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ImportDeclaration")},dt.parseImportSpecifier=function(){var t=this.startNode();return t.imported=this.parseModuleExportName(),this.eatContextual("as")?t.local=this.parseIdent():(this.checkUnreserved(t.imported),t.local=t.imported),this.checkLValSimple(t.local,rt),this.finishNode(t,"ImportSpecifier")},dt.parseImportDefaultSpecifier=function(){var t=this.startNode();return t.local=this.parseIdent(),this.checkLValSimple(t.local,rt),this.finishNode(t,"ImportDefaultSpecifier")},dt.parseImportNamespaceSpecifier=function(){var t=this.startNode();return this.next(),this.expectContextual("as"),t.local=this.parseIdent(),this.checkLValSimple(t.local,rt),this.finishNode(t,"ImportNamespaceSpecifier")},dt.parseImportSpecifiers=function(){var t=[],e=!0;if(this.type===b.name&&(t.push(this.parseImportDefaultSpecifier()),!this.eat(b.comma)))return t;if(this.type===b.star)return t.push(this.parseImportNamespaceSpecifier()),t;for(this.expect(b.braceL);!this.eat(b.braceR);){if(e)e=!1;else if(this.expect(b.comma),this.afterTrailingComma(b.braceR))break;t.push(this.parseImportSpecifier())}return t},dt.parseWithClause=function(){var t=[];if(!this.eat(b._with))return t;this.expect(b.braceL);for(var e={},i=!0;!this.eat(b.braceR);){if(i)i=!1;else if(this.expect(b.comma),this.afterTrailingComma(b.braceR))break;var s=this.parseImportAttribute(),r="Identifier"===s.key.type?s.key.name:s.key.value;T(e,r)&&this.raiseRecoverable(s.key.start,"Duplicate attribute key '"+r+"'"),e[r]=!0,t.push(s)}return t},dt.parseImportAttribute=function(){var t=this.startNode();return t.key=this.type===b.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(b.colon),this.type!==b.string&&this.unexpected(),t.value=this.parseExprAtom(),this.finishNode(t,"ImportAttribute")},dt.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===b.string){var t=this.parseLiteral(this.value);return O.test(t.value)&&this.raise(t.start,"An export name cannot include a lone surrogate."),t}return this.parseIdent(!0)},dt.adaptDirectivePrologue=function(t){for(var e=0;e<t.length&&this.isDirectiveCandidate(t[e]);++e)t[e].directive=t[e].expression.raw.slice(1,-1)},dt.isDirectiveCandidate=function(t){return this.options.ecmaVersion>=5&&"ExpressionStatement"===t.type&&"Literal"===t.expression.type&&"string"==typeof t.expression.value&&('"'===this.input[t.start]||"'"===this.input[t.start])};var kt=ht.prototype;kt.toAssignable=function(t,e,i){if(this.options.ecmaVersion>=6&&t)switch(t.type){case"Identifier":this.inAsync&&"await"===t.name&&this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var s=0,r=t.properties;s<r.length;s+=1){var a=r[s];this.toAssignable(a,e),"RestElement"!==a.type||"ArrayPattern"!==a.argument.type&&"ObjectPattern"!==a.argument.type||this.raise(a.argument.start,"Unexpected token")}break;case"Property":"init"!==t.kind&&this.raise(t.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(t.value,e);break;case"ArrayExpression":t.type="ArrayPattern",i&&this.checkPatternErrors(i,!0),this.toAssignableList(t.elements,e);break;case"SpreadElement":t.type="RestElement",this.toAssignable(t.argument,e),"AssignmentPattern"===t.argument.type&&this.raise(t.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==t.operator&&this.raise(t.left.end,"Only '=' operator can be used for specifying default value."),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(t.expression,e,i);break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!e)break;default:this.raise(t.start,"Assigning to rvalue")}else i&&this.checkPatternErrors(i,!0);return t},kt.toAssignableList=function(t,e){for(var i=t.length,s=0;s<i;s++){var r=t[s];r&&this.toAssignable(r,e)}if(i){var a=t[i-1];6===this.options.ecmaVersion&&e&&a&&"RestElement"===a.type&&"Identifier"!==a.argument.type&&this.unexpected(a.argument.start)}return t},kt.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")},kt.parseRestBinding=function(){var t=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==b.name&&this.unexpected(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")},kt.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case b.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(b.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case b.braceL:return this.parseObj(!0)}return this.parseIdent()},kt.parseBindingList=function(t,e,i,s){for(var r=[],a=!0;!this.eat(t);)if(a?a=!1:this.expect(b.comma),e&&this.type===b.comma)r.push(null);else{if(i&&this.afterTrailingComma(t))break;if(this.type===b.ellipsis){var n=this.parseRestBinding();this.parseBindingListItem(n),r.push(n),this.type===b.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(t);break}r.push(this.parseAssignableListItem(s))}return r},kt.parseAssignableListItem=function(t){var e=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(e),e},kt.parseBindingListItem=function(t){return t},kt.parseMaybeDefault=function(t,e,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(b.eq))return i;var s=this.startNodeAt(t,e);return s.left=i,s.right=this.parseMaybeAssign(),this.finishNode(s,"AssignmentPattern")},kt.checkLValSimple=function(t,e,i){void 0===e&&(e=it);var s=e!==it;switch(t.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(t.name)&&this.raiseRecoverable(t.start,(s?"Binding ":"Assigning to ")+t.name+" in strict mode"),s&&(e===rt&&"let"===t.name&&this.raiseRecoverable(t.start,"let is disallowed as a lexically bound name"),i&&(T(i,t.name)&&this.raiseRecoverable(t.start,"Argument name clash"),i[t.name]=!0),e!==ot&&this.declareName(t.name,e,t.start));break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":s&&this.raiseRecoverable(t.start,"Binding member expression");break;case"ParenthesizedExpression":return s&&this.raiseRecoverable(t.start,"Binding parenthesized expression"),this.checkLValSimple(t.expression,e,i);default:this.raise(t.start,(s?"Binding":"Assigning to")+" rvalue")}},kt.checkLValPattern=function(t,e,i){switch(void 0===e&&(e=it),t.type){case"ObjectPattern":for(var s=0,r=t.properties;s<r.length;s+=1){var a=r[s];this.checkLValInnerPattern(a,e,i)}break;case"ArrayPattern":for(var n=0,o=t.elements;n<o.length;n+=1){var h=o[n];h&&this.checkLValInnerPattern(h,e,i)}break;default:this.checkLValSimple(t,e,i)}},kt.checkLValInnerPattern=function(t,e,i){switch(void 0===e&&(e=it),t.type){case"Property":this.checkLValInnerPattern(t.value,e,i);break;case"AssignmentPattern":this.checkLValPattern(t.left,e,i);break;case"RestElement":this.checkLValPattern(t.argument,e,i);break;default:this.checkLValPattern(t,e,i)}};var St=function(t,e,i,s,r){this.token=t,this.isExpr=!!e,this.preserveSpace=!!i,this.override=s,this.generator=!!r},Ct={b_stat:new St("{",!1),b_expr:new St("{",!0),b_tmpl:new St("${",!1),p_stat:new St("(",!1),p_expr:new St("(",!0),q_tmpl:new St("`",!0,!0,(function(t){return t.tryReadTemplateToken()})),f_stat:new St("function",!1),f_expr:new St("function",!0),f_expr_gen:new St("function",!0,!1,null,!0),f_gen:new St("function",!1,!1,null,!0)},wt=ht.prototype;wt.initialContext=function(){return[Ct.b_stat]},wt.curContext=function(){return this.context[this.context.length-1]},wt.braceIsBlock=function(t){var e=this.curContext();return e===Ct.f_expr||e===Ct.f_stat||(t!==b.colon||e!==Ct.b_stat&&e!==Ct.b_expr?t===b._return||t===b.name&&this.exprAllowed?_.test(this.input.slice(this.lastTokEnd,this.start)):t===b._else||t===b.semi||t===b.eof||t===b.parenR||t===b.arrow||(t===b.braceL?e===Ct.b_stat:t!==b._var&&t!==b._const&&t!==b.name&&!this.exprAllowed):!e.isExpr)},wt.inGeneratorContext=function(){for(var t=this.context.length-1;t>=1;t--){var e=this.context[t];if("function"===e.token)return e.generator}return!1},wt.updateContext=function(t){var e,i=this.type;i.keyword&&t===b.dot?this.exprAllowed=!1:(e=i.updateContext)?e.call(this,t):this.exprAllowed=i.beforeExpr},wt.overrideContext=function(t){this.curContext()!==t&&(this.context[this.context.length-1]=t)},b.parenR.updateContext=b.braceR.updateContext=function(){if(1!==this.context.length){var t=this.context.pop();t===Ct.b_stat&&"function"===this.curContext().token&&(t=this.context.pop()),this.exprAllowed=!t.isExpr}else this.exprAllowed=!0},b.braceL.updateContext=function(t){this.context.push(this.braceIsBlock(t)?Ct.b_stat:Ct.b_expr),this.exprAllowed=!0},b.dollarBraceL.updateContext=function(){this.context.push(Ct.b_tmpl),this.exprAllowed=!0},b.parenL.updateContext=function(t){var e=t===b._if||t===b._for||t===b._with||t===b._while;this.context.push(e?Ct.p_stat:Ct.p_expr),this.exprAllowed=!0},b.incDec.updateContext=function(){},b._function.updateContext=b._class.updateContext=function(t){!t.beforeExpr||t===b._else||t===b.semi&&this.curContext()!==Ct.p_stat||t===b._return&&_.test(this.input.slice(this.lastTokEnd,this.start))||(t===b.colon||t===b.braceL)&&this.curContext()===Ct.b_stat?this.context.push(Ct.f_stat):this.context.push(Ct.f_expr),this.exprAllowed=!1},b.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},b.backQuote.updateContext=function(){this.curContext()===Ct.q_tmpl?this.context.pop():this.context.push(Ct.q_tmpl),this.exprAllowed=!1},b.star.updateContext=function(t){if(t===b._function){var e=this.context.length-1;this.context[e]===Ct.f_expr?this.context[e]=Ct.f_expr_gen:this.context[e]=Ct.f_gen}this.exprAllowed=!0},b.name.updateContext=function(t){var e=!1;this.options.ecmaVersion>=6&&t!==b.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(e=!0),this.exprAllowed=e};var Et=ht.prototype;function At(t){return"Identifier"===t.type||"ParenthesizedExpression"===t.type&&At(t.expression)}function It(t){return"MemberExpression"===t.type&&"PrivateIdentifier"===t.property.type||"ChainExpression"===t.type&&It(t.expression)||"ParenthesizedExpression"===t.type&&It(t.expression)}Et.checkPropClash=function(t,e,i){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===t.type||this.options.ecmaVersion>=6&&(t.computed||t.method||t.shorthand))){var s,r=t.key;switch(r.type){case"Identifier":s=r.name;break;case"Literal":s=String(r.value);break;default:return}var a=t.kind;if(this.options.ecmaVersion>=6)"__proto__"===s&&"init"===a&&(e.proto&&(i?i.doubleProto<0&&(i.doubleProto=r.start):this.raiseRecoverable(r.start,"Redefinition of __proto__ property")),e.proto=!0);else{var n=e[s="$"+s];n?("init"===a?this.strict&&n.init||n.get||n.set:n.init||n[a])&&this.raiseRecoverable(r.start,"Redefinition of property"):n=e[s]={init:!1,get:!1,set:!1},n[a]=!0}}},Et.parseExpression=function(t,e){var i=this.start,s=this.startLoc,r=this.parseMaybeAssign(t,e);if(this.type===b.comma){var a=this.startNodeAt(i,s);for(a.expressions=[r];this.eat(b.comma);)a.expressions.push(this.parseMaybeAssign(t,e));return this.finishNode(a,"SequenceExpression")}return r},Et.parseMaybeAssign=function(t,e,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(t);this.exprAllowed=!1}var s=!1,r=-1,a=-1,n=-1;e?(r=e.parenthesizedAssign,a=e.trailingComma,n=e.doubleProto,e.parenthesizedAssign=e.trailingComma=-1):(e=new ut,s=!0);var o=this.start,h=this.startLoc;this.type!==b.parenL&&this.type!==b.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===t);var p=this.parseMaybeConditional(t,e);if(i&&(p=i.call(this,p,o,h)),this.type.isAssign){var c=this.startNodeAt(o,h);return c.operator=this.value,this.type===b.eq&&(p=this.toAssignable(p,!1,e)),s||(e.parenthesizedAssign=e.trailingComma=e.doubleProto=-1),e.shorthandAssign>=p.start&&(e.shorthandAssign=-1),this.type===b.eq?this.checkLValPattern(p):this.checkLValSimple(p),c.left=p,this.next(),c.right=this.parseMaybeAssign(t),n>-1&&(e.doubleProto=n),this.finishNode(c,"AssignmentExpression")}return s&&this.checkExpressionErrors(e,!0),r>-1&&(e.parenthesizedAssign=r),a>-1&&(e.trailingComma=a),p},Et.parseMaybeConditional=function(t,e){var i=this.start,s=this.startLoc,r=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return r;if(this.eat(b.question)){var a=this.startNodeAt(i,s);return a.test=r,a.consequent=this.parseMaybeAssign(),this.expect(b.colon),a.alternate=this.parseMaybeAssign(t),this.finishNode(a,"ConditionalExpression")}return r},Et.parseExprOps=function(t,e){var i=this.start,s=this.startLoc,r=this.parseMaybeUnary(e,!1,!1,t);return this.checkExpressionErrors(e)||r.start===i&&"ArrowFunctionExpression"===r.type?r:this.parseExprOp(r,i,s,-1,t)},Et.parseExprOp=function(t,e,i,s,r){var a=this.type.binop;if(null!=a&&(!r||this.type!==b._in)&&a>s){var n=this.type===b.logicalOR||this.type===b.logicalAND,o=this.type===b.coalesce;o&&(a=b.logicalAND.binop);var h=this.value;this.next();var p=this.start,c=this.startLoc,l=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,r),p,c,a,r),u=this.buildBinary(e,i,t,l,h,n||o);return(n&&this.type===b.coalesce||o&&(this.type===b.logicalOR||this.type===b.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(u,e,i,s,r)}return t},Et.buildBinary=function(t,e,i,s,r,a){"PrivateIdentifier"===s.type&&this.raise(s.start,"Private identifier can only be left side of binary expression");var n=this.startNodeAt(t,e);return n.left=i,n.operator=r,n.right=s,this.finishNode(n,a?"LogicalExpression":"BinaryExpression")},Et.parseMaybeUnary=function(t,e,i,s){var r,a=this.start,n=this.startLoc;if(this.isContextual("await")&&this.canAwait)r=this.parseAwait(s),e=!0;else if(this.type.prefix){var o=this.startNode(),h=this.type===b.incDec;o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0,h,s),this.checkExpressionErrors(t,!0),h?this.checkLValSimple(o.argument):this.strict&&"delete"===o.operator&&At(o.argument)?this.raiseRecoverable(o.start,"Deleting local variable in strict mode"):"delete"===o.operator&&It(o.argument)?this.raiseRecoverable(o.start,"Private fields can not be deleted"):e=!0,r=this.finishNode(o,h?"UpdateExpression":"UnaryExpression")}else if(e||this.type!==b.privateId){if(r=this.parseExprSubscripts(t,s),this.checkExpressionErrors(t))return r;for(;this.type.postfix&&!this.canInsertSemicolon();){var p=this.startNodeAt(a,n);p.operator=this.value,p.prefix=!1,p.argument=r,this.checkLValSimple(r),this.next(),r=this.finishNode(p,"UpdateExpression")}}else(s||0===this.privateNameStack.length)&&this.options.checkPrivateFields&&this.unexpected(),r=this.parsePrivateIdent(),this.type!==b._in&&this.unexpected();return i||!this.eat(b.starstar)?r:e?void this.unexpected(this.lastTokStart):this.buildBinary(a,n,r,this.parseMaybeUnary(null,!1,!1,s),"**",!1)},Et.parseExprSubscripts=function(t,e){var i=this.start,s=this.startLoc,r=this.parseExprAtom(t,e);if("ArrowFunctionExpression"===r.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return r;var a=this.parseSubscripts(r,i,s,!1,e);return t&&"MemberExpression"===a.type&&(t.parenthesizedAssign>=a.start&&(t.parenthesizedAssign=-1),t.parenthesizedBind>=a.start&&(t.parenthesizedBind=-1),t.trailingComma>=a.start&&(t.trailingComma=-1)),a},Et.parseSubscripts=function(t,e,i,s,r){for(var a=this.options.ecmaVersion>=8&&"Identifier"===t.type&&"async"===t.name&&this.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start==5&&this.potentialArrowAt===t.start,n=!1;;){var o=this.parseSubscript(t,e,i,s,a,n,r);if(o.optional&&(n=!0),o===t||"ArrowFunctionExpression"===o.type){if(n){var h=this.startNodeAt(e,i);h.expression=o,o=this.finishNode(h,"ChainExpression")}return o}t=o}},Et.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(b.arrow)},Et.parseSubscriptAsyncArrow=function(t,e,i,s){return this.parseArrowExpression(this.startNodeAt(t,e),i,!0,s)},Et.parseSubscript=function(t,e,i,s,r,a,n){var o=this.options.ecmaVersion>=11,h=o&&this.eat(b.questionDot);s&&h&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var p=this.eat(b.bracketL);if(p||h&&this.type!==b.parenL&&this.type!==b.backQuote||this.eat(b.dot)){var c=this.startNodeAt(e,i);c.object=t,p?(c.property=this.parseExpression(),this.expect(b.bracketR)):this.type===b.privateId&&"Super"!==t.type?c.property=this.parsePrivateIdent():c.property=this.parseIdent("never"!==this.options.allowReserved),c.computed=!!p,o&&(c.optional=h),t=this.finishNode(c,"MemberExpression")}else if(!s&&this.eat(b.parenL)){var l=new ut,u=this.yieldPos,d=this.awaitPos,f=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var m=this.parseExprList(b.parenR,this.options.ecmaVersion>=8,!1,l);if(r&&!h&&this.shouldParseAsyncArrow())return this.checkPatternErrors(l,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=u,this.awaitPos=d,this.awaitIdentPos=f,this.parseSubscriptAsyncArrow(e,i,m,n);this.checkExpressionErrors(l,!0),this.yieldPos=u||this.yieldPos,this.awaitPos=d||this.awaitPos,this.awaitIdentPos=f||this.awaitIdentPos;var g=this.startNodeAt(e,i);g.callee=t,g.arguments=m,o&&(g.optional=h),t=this.finishNode(g,"CallExpression")}else if(this.type===b.backQuote){(h||a)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var x=this.startNodeAt(e,i);x.tag=t,x.quasi=this.parseTemplate({isTagged:!0}),t=this.finishNode(x,"TaggedTemplateExpression")}return t},Et.parseExprAtom=function(t,e,i){this.type===b.slash&&this.readRegexp();var s,r=this.potentialArrowAt===this.start;switch(this.type){case b._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),s=this.startNode(),this.next(),this.type!==b.parenL||this.allowDirectSuper||this.raise(s.start,"super() call outside constructor of a subclass"),this.type!==b.dot&&this.type!==b.bracketL&&this.type!==b.parenL&&this.unexpected(),this.finishNode(s,"Super");case b._this:return s=this.startNode(),this.next(),this.finishNode(s,"ThisExpression");case b.name:var a=this.start,n=this.startLoc,o=this.containsEsc,h=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!o&&"async"===h.name&&!this.canInsertSemicolon()&&this.eat(b._function))return this.overrideContext(Ct.f_expr),this.parseFunction(this.startNodeAt(a,n),0,!1,!0,e);if(r&&!this.canInsertSemicolon()){if(this.eat(b.arrow))return this.parseArrowExpression(this.startNodeAt(a,n),[h],!1,e);if(this.options.ecmaVersion>=8&&"async"===h.name&&this.type===b.name&&!o&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return h=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(b.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,n),[h],!0,e)}return h;case b.regexp:var p=this.value;return(s=this.parseLiteral(p.value)).regex={pattern:p.pattern,flags:p.flags},s;case b.num:case b.string:return this.parseLiteral(this.value);case b._null:case b._true:case b._false:return(s=this.startNode()).value=this.type===b._null?null:this.type===b._true,s.raw=this.type.keyword,this.next(),this.finishNode(s,"Literal");case b.parenL:var c=this.start,l=this.parseParenAndDistinguishExpression(r,e);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(l)&&(t.parenthesizedAssign=c),t.parenthesizedBind<0&&(t.parenthesizedBind=c)),l;case b.bracketL:return s=this.startNode(),this.next(),s.elements=this.parseExprList(b.bracketR,!0,!0,t),this.finishNode(s,"ArrayExpression");case b.braceL:return this.overrideContext(Ct.b_expr),this.parseObj(!1,t);case b._function:return s=this.startNode(),this.next(),this.parseFunction(s,0);case b._class:return this.parseClass(this.startNode(),!1);case b._new:return this.parseNew();case b.backQuote:return this.parseTemplate();case b._import:return this.options.ecmaVersion>=11?this.parseExprImport(i):this.unexpected();default:return this.parseExprAtomDefault()}},Et.parseExprAtomDefault=function(){this.unexpected()},Et.parseExprImport=function(t){var e=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===b.parenL&&!t)return this.parseDynamicImport(e);if(this.type===b.dot){var i=this.startNodeAt(e.start,e.loc&&e.loc.start);return i.name="import",e.meta=this.finishNode(i,"Identifier"),this.parseImportMeta(e)}this.unexpected()},Et.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(b.parenR)?t.options=null:(this.expect(b.comma),this.afterTrailingComma(b.parenR)?t.options=null:(t.options=this.parseMaybeAssign(),this.eat(b.parenR)||(this.expect(b.comma),this.afterTrailingComma(b.parenR)||this.unexpected())));else if(!this.eat(b.parenR)){var e=this.start;this.eat(b.comma)&&this.eat(b.parenR)?this.raiseRecoverable(e,"Trailing comma is not allowed in import()"):this.unexpected(e)}return this.finishNode(t,"ImportExpression")},Et.parseImportMeta=function(t){this.next();var e=this.containsEsc;return t.property=this.parseIdent(!0),"meta"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is 'import.meta'"),e&&this.raiseRecoverable(t.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(t.start,"Cannot use 'import.meta' outside a module"),this.finishNode(t,"MetaProperty")},Et.parseLiteral=function(t){var e=this.startNode();return e.value=t,e.raw=this.input.slice(this.start,this.end),110===e.raw.charCodeAt(e.raw.length-1)&&(e.bigint=null!=e.value?e.value.toString():e.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(e,"Literal")},Et.parseParenExpression=function(){this.expect(b.parenL);var t=this.parseExpression();return this.expect(b.parenR),t},Et.shouldParseArrow=function(t){return!this.canInsertSemicolon()},Et.parseParenAndDistinguishExpression=function(t,e){var i,s=this.start,r=this.startLoc,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var n,o=this.start,h=this.startLoc,p=[],c=!0,l=!1,u=new ut,d=this.yieldPos,f=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==b.parenR;){if(c?c=!1:this.expect(b.comma),a&&this.afterTrailingComma(b.parenR,!0)){l=!0;break}if(this.type===b.ellipsis){n=this.start,p.push(this.parseParenItem(this.parseRestBinding())),this.type===b.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}p.push(this.parseMaybeAssign(!1,u,this.parseParenItem))}var m=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(b.parenR),t&&this.shouldParseArrow(p)&&this.eat(b.arrow))return this.checkPatternErrors(u,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=f,this.parseParenArrowList(s,r,p,e);p.length&&!l||this.unexpected(this.lastTokStart),n&&this.unexpected(n),this.checkExpressionErrors(u,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=f||this.awaitPos,p.length>1?((i=this.startNodeAt(o,h)).expressions=p,this.finishNodeAt(i,"SequenceExpression",m,g)):i=p[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var x=this.startNodeAt(s,r);return x.expression=i,this.finishNode(x,"ParenthesizedExpression")}return i},Et.parseParenItem=function(t){return t},Et.parseParenArrowList=function(t,e,i,s){return this.parseArrowExpression(this.startNodeAt(t,e),i,!1,s)};var Pt=[];Et.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var t=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===b.dot){var e=this.startNodeAt(t.start,t.loc&&t.loc.start);e.name="new",t.meta=this.finishNode(e,"Identifier"),this.next();var i=this.containsEsc;return t.property=this.parseIdent(!0),"target"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for new is 'new.target'"),i&&this.raiseRecoverable(t.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(t.start,"'new.target' can only be used in functions and class static block"),this.finishNode(t,"MetaProperty")}var s=this.start,r=this.startLoc;return t.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),s,r,!0,!1),this.eat(b.parenL)?t.arguments=this.parseExprList(b.parenR,this.options.ecmaVersion>=8,!1):t.arguments=Pt,this.finishNode(t,"NewExpression")},Et.parseTemplateElement=function(t){var e=t.isTagged,i=this.startNode();return this.type===b.invalidTemplate?(e||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),i.value={raw:this.value.replace(/\r\n?/g,"\n"),cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),i.tail=this.type===b.backQuote,this.finishNode(i,"TemplateElement")},Et.parseTemplate=function(t){void 0===t&&(t={});var e=t.isTagged;void 0===e&&(e=!1);var i=this.startNode();this.next(),i.expressions=[];var s=this.parseTemplateElement({isTagged:e});for(i.quasis=[s];!s.tail;)this.type===b.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(b.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(b.braceR),i.quasis.push(s=this.parseTemplateElement({isTagged:e}));return this.next(),this.finishNode(i,"TemplateLiteral")},Et.isAsyncProp=function(t){return!t.computed&&"Identifier"===t.key.type&&"async"===t.key.name&&(this.type===b.name||this.type===b.num||this.type===b.string||this.type===b.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===b.star)&&!_.test(this.input.slice(this.lastTokEnd,this.start))},Et.parseObj=function(t,e){var i=this.startNode(),s=!0,r={};for(i.properties=[],this.next();!this.eat(b.braceR);){if(s)s=!1;else if(this.expect(b.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(b.braceR))break;var a=this.parseProperty(t,e);t||this.checkPropClash(a,r,e),i.properties.push(a)}return this.finishNode(i,t?"ObjectPattern":"ObjectExpression")},Et.parseProperty=function(t,e){var i,s,r,a,n=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(b.ellipsis))return t?(n.argument=this.parseIdent(!1),this.type===b.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(n,"RestElement")):(n.argument=this.parseMaybeAssign(!1,e),this.type===b.comma&&e&&e.trailingComma<0&&(e.trailingComma=this.start),this.finishNode(n,"SpreadElement"));this.options.ecmaVersion>=6&&(n.method=!1,n.shorthand=!1,(t||e)&&(r=this.start,a=this.startLoc),t||(i=this.eat(b.star)));var o=this.containsEsc;return this.parsePropertyName(n),!t&&!o&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(n)?(s=!0,i=this.options.ecmaVersion>=9&&this.eat(b.star),this.parsePropertyName(n)):s=!1,this.parsePropertyValue(n,t,i,s,r,a,e,o),this.finishNode(n,"Property")},Et.parseGetterSetter=function(t){var e=t.key.name;this.parsePropertyName(t),t.value=this.parseMethod(!1),t.kind=e;var i="get"===t.kind?0:1;if(t.value.params.length!==i){var s=t.value.start;"get"===t.kind?this.raiseRecoverable(s,"getter should have no params"):this.raiseRecoverable(s,"setter should have exactly one param")}else"set"===t.kind&&"RestElement"===t.value.params[0].type&&this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")},Et.parsePropertyValue=function(t,e,i,s,r,a,n,o){(i||s)&&this.type===b.colon&&this.unexpected(),this.eat(b.colon)?(t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,n),t.kind="init"):this.options.ecmaVersion>=6&&this.type===b.parenL?(e&&this.unexpected(),t.method=!0,t.value=this.parseMethod(i,s),t.kind="init"):e||o||!(this.options.ecmaVersion>=5)||t.computed||"Identifier"!==t.key.type||"get"!==t.key.name&&"set"!==t.key.name||this.type===b.comma||this.type===b.braceR||this.type===b.eq?this.options.ecmaVersion>=6&&!t.computed&&"Identifier"===t.key.type?((i||s)&&this.unexpected(),this.checkUnreserved(t.key),"await"!==t.key.name||this.awaitIdentPos||(this.awaitIdentPos=r),e?t.value=this.parseMaybeDefault(r,a,this.copyNode(t.key)):this.type===b.eq&&n?(n.shorthandAssign<0&&(n.shorthandAssign=this.start),t.value=this.parseMaybeDefault(r,a,this.copyNode(t.key))):t.value=this.copyNode(t.key),t.kind="init",t.shorthand=!0):this.unexpected():((i||s)&&this.unexpected(),this.parseGetterSetter(t))},Et.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(b.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(b.bracketR),t.key;t.computed=!1}return t.key=this.type===b.num||this.type===b.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},Et.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)},Et.parseMethod=function(t,e,i){var s=this.startNode(),r=this.yieldPos,a=this.awaitPos,n=this.awaitIdentPos;return this.initFunction(s),this.options.ecmaVersion>=6&&(s.generator=t),this.options.ecmaVersion>=8&&(s.async=!!e),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(et(e,s.generator)|Q|(i?J:0)),this.expect(b.parenL),s.params=this.parseBindingList(b.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(s,!1,!0,!1),this.yieldPos=r,this.awaitPos=a,this.awaitIdentPos=n,this.finishNode(s,"FunctionExpression")},Et.parseArrowExpression=function(t,e,i,s){var r=this.yieldPos,a=this.awaitPos,n=this.awaitIdentPos;return this.enterScope(et(i,!1)|X),this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0,!1,s),this.yieldPos=r,this.awaitPos=a,this.awaitIdentPos=n,this.finishNode(t,"ArrowFunctionExpression")},Et.parseFunctionBody=function(t,e,i,s){var r=e&&this.type!==b.braceL,a=this.strict,n=!1;if(r)t.body=this.parseMaybeAssign(s),t.expression=!0,this.checkParams(t,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);a&&!o||(n=this.strictDirective(this.end))&&o&&this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list");var h=this.labels;this.labels=[],n&&(this.strict=!0),this.checkParams(t,!a&&!n&&!e&&!i&&this.isSimpleParamList(t.params)),this.strict&&t.id&&this.checkLValSimple(t.id,ot),t.body=this.parseBlock(!1,void 0,n&&!a),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=h}this.exitScope()},Et.isSimpleParamList=function(t){for(var e=0,i=t;e<i.length;e+=1)if("Identifier"!==i[e].type)return!1;return!0},Et.checkParams=function(t,e){for(var i=Object.create(null),s=0,r=t.params;s<r.length;s+=1){var a=r[s];this.checkLValInnerPattern(a,st,e?null:i)}},Et.parseExprList=function(t,e,i,s){for(var r=[],a=!0;!this.eat(t);){if(a)a=!1;else if(this.expect(b.comma),e&&this.afterTrailingComma(t))break;var n=void 0;i&&this.type===b.comma?n=null:this.type===b.ellipsis?(n=this.parseSpread(s),s&&this.type===b.comma&&s.trailingComma<0&&(s.trailingComma=this.start)):n=this.parseMaybeAssign(!1,s),r.push(n)}return r},Et.checkUnreserved=function(t){var e=t.start,i=t.end,s=t.name;this.inGenerator&&"yield"===s&&this.raiseRecoverable(e,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===s&&this.raiseRecoverable(e,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().flags&tt||"arguments"!==s||this.raiseRecoverable(e,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||"arguments"!==s&&"await"!==s||this.raise(e,"Cannot use "+s+" in class static initialization block"),this.keywords.test(s)&&this.raise(e,"Unexpected keyword '"+s+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(e,i).indexOf("\\")||(this.strict?this.reservedWordsStrict:this.reservedWords).test(s)&&(this.inAsync||"await"!==s||this.raiseRecoverable(e,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(e,"The keyword '"+s+"' is reserved"))},Et.parseIdent=function(t){var e=this.parseIdentNode();return this.next(!!t),this.finishNode(e,"Identifier"),t||(this.checkUnreserved(e),"await"!==e.name||this.awaitIdentPos||(this.awaitIdentPos=e.start)),e},Et.parseIdentNode=function(){var t=this.startNode();return this.type===b.name?t.name=this.value:this.type.keyword?(t.name=this.type.keyword,"class"!==t.name&&"function"!==t.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop(),this.type=b.name):this.unexpected(),t},Et.parsePrivateIdent=function(){var t=this.startNode();return this.type===b.privateId?t.name=this.value:this.unexpected(),this.next(),this.finishNode(t,"PrivateIdentifier"),this.options.checkPrivateFields&&(0===this.privateNameStack.length?this.raise(t.start,"Private field '#"+t.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(t)),t},Et.parseYield=function(t){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type===b.semi||this.canInsertSemicolon()||this.type!==b.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(b.star),e.argument=this.parseMaybeAssign(t)),this.finishNode(e,"YieldExpression")},Et.parseAwait=function(t){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0,!1,t),this.finishNode(e,"AwaitExpression")};var Tt=ht.prototype;Tt.raise=function(t,e){var i=M(this.input,t);e+=" ("+i.line+":"+i.column+")",this.sourceFile&&(e+=" in "+this.sourceFile);var s=new SyntaxError(e);throw s.pos=t,s.loc=i,s.raisedAt=this.pos,s},Tt.raiseRecoverable=Tt.raise,Tt.curPosition=function(){if(this.options.locations)return new D(this.curLine,this.pos-this.lineStart)};var Nt=ht.prototype,Vt=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};Nt.enterScope=function(t){this.scopeStack.push(new Vt(t))},Nt.exitScope=function(){this.scopeStack.pop()},Nt.treatFunctionsAsVarInScope=function(t){return t.flags&W||!this.inModule&&t.flags&G},Nt.declareName=function(t,e,i){var s=!1;if(e===rt){var r=this.currentScope();s=r.lexical.indexOf(t)>-1||r.functions.indexOf(t)>-1||r.var.indexOf(t)>-1,r.lexical.push(t),this.inModule&&r.flags&G&&delete this.undefinedExports[t]}else if(e===nt)this.currentScope().lexical.push(t);else if(e===at){var a=this.currentScope();s=this.treatFunctionsAsVar?a.lexical.indexOf(t)>-1:a.lexical.indexOf(t)>-1||a.var.indexOf(t)>-1,a.functions.push(t)}else for(var n=this.scopeStack.length-1;n>=0;--n){var o=this.scopeStack[n];if(o.lexical.indexOf(t)>-1&&!(o.flags&K&&o.lexical[0]===t)||!this.treatFunctionsAsVarInScope(o)&&o.functions.indexOf(t)>-1){s=!0;break}if(o.var.push(t),this.inModule&&o.flags&G&&delete this.undefinedExports[t],o.flags&tt)break}s&&this.raiseRecoverable(i,"Identifier '"+t+"' has already been declared")},Nt.checkLocalExport=function(t){-1===this.scopeStack[0].lexical.indexOf(t.name)&&-1===this.scopeStack[0].var.indexOf(t.name)&&(this.undefinedExports[t.name]=t)},Nt.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Nt.currentVarScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&(tt|Z|Y))return e}},Nt.currentThisScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&(tt|Z|Y)&&!(e.flags&X))return e}};var Lt=function(t,e,i){this.type="",this.start=e,this.end=0,t.options.locations&&(this.loc=new B(t,i)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[e,0])},Rt=ht.prototype;function Ot(t,e,i,s){return t.type=e,t.end=i,this.options.locations&&(t.loc.end=s),this.options.ranges&&(t.range[1]=i),t}Rt.startNode=function(){return new Lt(this,this.start,this.startLoc)},Rt.startNodeAt=function(t,e){return new Lt(this,t,e)},Rt.finishNode=function(t,e){return Ot.call(this,t,e,this.lastTokEnd,this.lastTokEndLoc)},Rt.finishNodeAt=function(t,e,i,s){return Ot.call(this,t,e,i,s)},Rt.copyNode=function(t){var e=new Lt(this,t.start,this.startLoc);for(var i in t)e[i]=t[i];return e};var Dt="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",Bt="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Mt=Bt+" Extended_Pictographic",Ft=Mt,jt=Ft+" EBase EComp EMod EPres ExtPict",Ut=jt,qt=Ut,Gt={9:Bt,10:Mt,11:Ft,12:jt,13:Ut,14:qt},Wt="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Ht={9:"",10:"",11:"",12:"",13:"",14:Wt},zt="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Xt="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Kt=Xt+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Qt=Kt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Jt=Qt+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Yt=Jt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Zt=Yt+" "+Dt,$t={9:Xt,10:Kt,11:Qt,12:Jt,13:Yt,14:Zt},te={};function ee(t){var e=te[t]={binary:L(Gt[t]+" "+zt),binaryOfStrings:L(Ht[t]),nonBinary:{General_Category:L(zt),Script:L($t[t])}};e.nonBinary.Script_Extensions=e.nonBinary.Script,e.nonBinary.gc=e.nonBinary.General_Category,e.nonBinary.sc=e.nonBinary.Script,e.nonBinary.scx=e.nonBinary.Script_Extensions}for(var ie=0,se=[9,10,11,12,13,14];ie<se.length;ie+=1)ee(se[ie]);var re=ht.prototype,ae=function(t,e){this.parent=t,this.base=e||this};ae.prototype.separatedFrom=function(t){for(var e=this;e;e=e.parent)for(var i=t;i;i=i.parent)if(e.base===i.base&&e!==i)return!0;return!1},ae.prototype.sibling=function(){return new ae(this.parent,this.base)};var ne=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=te[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};function oe(t){for(var e in t)return!0;return!1}function he(t){return 105===t||109===t||115===t}function pe(t){return 36===t||t>=40&&t<=43||46===t||63===t||t>=91&&t<=94||t>=123&&t<=125}function ce(t){return u(t,!0)||36===t||95===t}function le(t){return d(t,!0)||36===t||95===t||8204===t||8205===t}function ue(t){return t>=65&&t<=90||t>=97&&t<=122}function de(t){return t>=0&&t<=1114111}ne.prototype.reset=function(t,e,i){var s=-1!==i.indexOf("v"),r=-1!==i.indexOf("u");this.start=0|t,this.source=e+"",this.flags=i,s&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=r&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=r&&this.parser.options.ecmaVersion>=9)},ne.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)},ne.prototype.at=function(t,e){void 0===e&&(e=!1);var i=this.source,s=i.length;if(t>=s)return-1;var r=i.charCodeAt(t);if(!e&&!this.switchU||r<=55295||r>=57344||t+1>=s)return r;var a=i.charCodeAt(t+1);return a>=56320&&a<=57343?(r<<10)+a-56613888:r},ne.prototype.nextIndex=function(t,e){void 0===e&&(e=!1);var i=this.source,s=i.length;if(t>=s)return s;var r,a=i.charCodeAt(t);return!e&&!this.switchU||a<=55295||a>=57344||t+1>=s||(r=i.charCodeAt(t+1))<56320||r>57343?t+1:t+2},ne.prototype.current=function(t){return void 0===t&&(t=!1),this.at(this.pos,t)},ne.prototype.lookahead=function(t){return void 0===t&&(t=!1),this.at(this.nextIndex(this.pos,t),t)},ne.prototype.advance=function(t){void 0===t&&(t=!1),this.pos=this.nextIndex(this.pos,t)},ne.prototype.eat=function(t,e){return void 0===e&&(e=!1),this.current(e)===t&&(this.advance(e),!0)},ne.prototype.eatChars=function(t,e){void 0===e&&(e=!1);for(var i=this.pos,s=0,r=t;s<r.length;s+=1){var a=r[s],n=this.at(i,e);if(-1===n||n!==a)return!1;i=this.nextIndex(i,e)}return this.pos=i,!0},re.validateRegExpFlags=function(t){for(var e=t.validFlags,i=t.flags,s=!1,r=!1,a=0;a<i.length;a++){var n=i.charAt(a);-1===e.indexOf(n)&&this.raise(t.start,"Invalid regular expression flag"),i.indexOf(n,a+1)>-1&&this.raise(t.start,"Duplicate regular expression flag"),"u"===n&&(s=!0),"v"===n&&(r=!0)}this.options.ecmaVersion>=15&&s&&r&&this.raise(t.start,"Invalid regular expression flag")},re.validateRegExpPattern=function(t){this.regexp_pattern(t),!t.switchN&&this.options.ecmaVersion>=9&&oe(t.groupNames)&&(t.switchN=!0,this.regexp_pattern(t))},re.regexp_pattern=function(t){t.pos=0,t.lastIntValue=0,t.lastStringValue="",t.lastAssertionIsQuantifiable=!1,t.numCapturingParens=0,t.maxBackReference=0,t.groupNames=Object.create(null),t.backReferenceNames.length=0,t.branchID=null,this.regexp_disjunction(t),t.pos!==t.source.length&&(t.eat(41)&&t.raise("Unmatched ')'"),(t.eat(93)||t.eat(125))&&t.raise("Lone quantifier brackets")),t.maxBackReference>t.numCapturingParens&&t.raise("Invalid escape");for(var e=0,i=t.backReferenceNames;e<i.length;e+=1){var s=i[e];t.groupNames[s]||t.raise("Invalid named capture referenced")}},re.regexp_disjunction=function(t){var e=this.options.ecmaVersion>=16;for(e&&(t.branchID=new ae(t.branchID,null)),this.regexp_alternative(t);t.eat(124);)e&&(t.branchID=t.branchID.sibling()),this.regexp_alternative(t);e&&(t.branchID=t.branchID.parent),this.regexp_eatQuantifier(t,!0)&&t.raise("Nothing to repeat"),t.eat(123)&&t.raise("Lone quantifier brackets")},re.regexp_alternative=function(t){for(;t.pos<t.source.length&&this.regexp_eatTerm(t););},re.regexp_eatTerm=function(t){return this.regexp_eatAssertion(t)?(t.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(t)&&t.switchU&&t.raise("Invalid quantifier"),!0):!!(t.switchU?this.regexp_eatAtom(t):this.regexp_eatExtendedAtom(t))&&(this.regexp_eatQuantifier(t),!0)},re.regexp_eatAssertion=function(t){var e=t.pos;if(t.lastAssertionIsQuantifiable=!1,t.eat(94)||t.eat(36))return!0;if(t.eat(92)){if(t.eat(66)||t.eat(98))return!0;t.pos=e}if(t.eat(40)&&t.eat(63)){var i=!1;if(this.options.ecmaVersion>=9&&(i=t.eat(60)),t.eat(61)||t.eat(33))return this.regexp_disjunction(t),t.eat(41)||t.raise("Unterminated group"),t.lastAssertionIsQuantifiable=!i,!0}return t.pos=e,!1},re.regexp_eatQuantifier=function(t,e){return void 0===e&&(e=!1),!!this.regexp_eatQuantifierPrefix(t,e)&&(t.eat(63),!0)},re.regexp_eatQuantifierPrefix=function(t,e){return t.eat(42)||t.eat(43)||t.eat(63)||this.regexp_eatBracedQuantifier(t,e)},re.regexp_eatBracedQuantifier=function(t,e){var i=t.pos;if(t.eat(123)){var s=0,r=-1;if(this.regexp_eatDecimalDigits(t)&&(s=t.lastIntValue,t.eat(44)&&this.regexp_eatDecimalDigits(t)&&(r=t.lastIntValue),t.eat(125)))return-1!==r&&r<s&&!e&&t.raise("numbers out of order in {} quantifier"),!0;t.switchU&&!e&&t.raise("Incomplete quantifier"),t.pos=i}return!1},re.regexp_eatAtom=function(t){return this.regexp_eatPatternCharacters(t)||t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)},re.regexp_eatReverseSolidusAtomEscape=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatAtomEscape(t))return!0;t.pos=e}return!1},re.regexp_eatUncapturingGroup=function(t){var e=t.pos;if(t.eat(40)){if(t.eat(63)){if(this.options.ecmaVersion>=16){var i=this.regexp_eatModifiers(t),s=t.eat(45);if(i||s){for(var r=0;r<i.length;r++){var a=i.charAt(r);i.indexOf(a,r+1)>-1&&t.raise("Duplicate regular expression modifiers")}if(s){var n=this.regexp_eatModifiers(t);i||n||58!==t.current()||t.raise("Invalid regular expression modifiers");for(var o=0;o<n.length;o++){var h=n.charAt(o);(n.indexOf(h,o+1)>-1||i.indexOf(h)>-1)&&t.raise("Duplicate regular expression modifiers")}}}}if(t.eat(58)){if(this.regexp_disjunction(t),t.eat(41))return!0;t.raise("Unterminated group")}}t.pos=e}return!1},re.regexp_eatCapturingGroup=function(t){if(t.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(t):63===t.current()&&t.raise("Invalid group"),this.regexp_disjunction(t),t.eat(41))return t.numCapturingParens+=1,!0;t.raise("Unterminated group")}return!1},re.regexp_eatModifiers=function(t){for(var e="",i=0;-1!==(i=t.current())&&he(i);)e+=R(i),t.advance();return e},re.regexp_eatExtendedAtom=function(t){return t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)||this.regexp_eatInvalidBracedQuantifier(t)||this.regexp_eatExtendedPatternCharacter(t)},re.regexp_eatInvalidBracedQuantifier=function(t){return this.regexp_eatBracedQuantifier(t,!0)&&t.raise("Nothing to repeat"),!1},re.regexp_eatSyntaxCharacter=function(t){var e=t.current();return!!pe(e)&&(t.lastIntValue=e,t.advance(),!0)},re.regexp_eatPatternCharacters=function(t){for(var e=t.pos,i=0;-1!==(i=t.current())&&!pe(i);)t.advance();return t.pos!==e},re.regexp_eatExtendedPatternCharacter=function(t){var e=t.current();return!(-1===e||36===e||e>=40&&e<=43||46===e||63===e||91===e||94===e||124===e||(t.advance(),0))},re.regexp_groupSpecifier=function(t){if(t.eat(63)){this.regexp_eatGroupName(t)||t.raise("Invalid group");var e=this.options.ecmaVersion>=16,i=t.groupNames[t.lastStringValue];if(i)if(e)for(var s=0,r=i;s<r.length;s+=1)r[s].separatedFrom(t.branchID)||t.raise("Duplicate capture group name");else t.raise("Duplicate capture group name");e?(i||(t.groupNames[t.lastStringValue]=[])).push(t.branchID):t.groupNames[t.lastStringValue]=!0}},re.regexp_eatGroupName=function(t){if(t.lastStringValue="",t.eat(60)){if(this.regexp_eatRegExpIdentifierName(t)&&t.eat(62))return!0;t.raise("Invalid capture group name")}return!1},re.regexp_eatRegExpIdentifierName=function(t){if(t.lastStringValue="",this.regexp_eatRegExpIdentifierStart(t)){for(t.lastStringValue+=R(t.lastIntValue);this.regexp_eatRegExpIdentifierPart(t);)t.lastStringValue+=R(t.lastIntValue);return!0}return!1},re.regexp_eatRegExpIdentifierStart=function(t){var e=t.pos,i=this.options.ecmaVersion>=11,s=t.current(i);return t.advance(i),92===s&&this.regexp_eatRegExpUnicodeEscapeSequence(t,i)&&(s=t.lastIntValue),ce(s)?(t.lastIntValue=s,!0):(t.pos=e,!1)},re.regexp_eatRegExpIdentifierPart=function(t){var e=t.pos,i=this.options.ecmaVersion>=11,s=t.current(i);return t.advance(i),92===s&&this.regexp_eatRegExpUnicodeEscapeSequence(t,i)&&(s=t.lastIntValue),le(s)?(t.lastIntValue=s,!0):(t.pos=e,!1)},re.regexp_eatAtomEscape=function(t){return!!(this.regexp_eatBackReference(t)||this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)||t.switchN&&this.regexp_eatKGroupName(t))||(t.switchU&&(99===t.current()&&t.raise("Invalid unicode escape"),t.raise("Invalid escape")),!1)},re.regexp_eatBackReference=function(t){var e=t.pos;if(this.regexp_eatDecimalEscape(t)){var i=t.lastIntValue;if(t.switchU)return i>t.maxBackReference&&(t.maxBackReference=i),!0;if(i<=t.numCapturingParens)return!0;t.pos=e}return!1},re.regexp_eatKGroupName=function(t){if(t.eat(107)){if(this.regexp_eatGroupName(t))return t.backReferenceNames.push(t.lastStringValue),!0;t.raise("Invalid named reference")}return!1},re.regexp_eatCharacterEscape=function(t){return this.regexp_eatControlEscape(t)||this.regexp_eatCControlLetter(t)||this.regexp_eatZero(t)||this.regexp_eatHexEscapeSequence(t)||this.regexp_eatRegExpUnicodeEscapeSequence(t,!1)||!t.switchU&&this.regexp_eatLegacyOctalEscapeSequence(t)||this.regexp_eatIdentityEscape(t)},re.regexp_eatCControlLetter=function(t){var e=t.pos;if(t.eat(99)){if(this.regexp_eatControlLetter(t))return!0;t.pos=e}return!1},re.regexp_eatZero=function(t){return 48===t.current()&&!Se(t.lookahead())&&(t.lastIntValue=0,t.advance(),!0)},re.regexp_eatControlEscape=function(t){var e=t.current();return 116===e?(t.lastIntValue=9,t.advance(),!0):110===e?(t.lastIntValue=10,t.advance(),!0):118===e?(t.lastIntValue=11,t.advance(),!0):102===e?(t.lastIntValue=12,t.advance(),!0):114===e&&(t.lastIntValue=13,t.advance(),!0)},re.regexp_eatControlLetter=function(t){var e=t.current();return!!ue(e)&&(t.lastIntValue=e%32,t.advance(),!0)},re.regexp_eatRegExpUnicodeEscapeSequence=function(t,e){void 0===e&&(e=!1);var i=t.pos,s=e||t.switchU;if(t.eat(117)){if(this.regexp_eatFixedHexDigits(t,4)){var r=t.lastIntValue;if(s&&r>=55296&&r<=56319){var a=t.pos;if(t.eat(92)&&t.eat(117)&&this.regexp_eatFixedHexDigits(t,4)){var n=t.lastIntValue;if(n>=56320&&n<=57343)return t.lastIntValue=1024*(r-55296)+(n-56320)+65536,!0}t.pos=a,t.lastIntValue=r}return!0}if(s&&t.eat(123)&&this.regexp_eatHexDigits(t)&&t.eat(125)&&de(t.lastIntValue))return!0;s&&t.raise("Invalid unicode escape"),t.pos=i}return!1},re.regexp_eatIdentityEscape=function(t){if(t.switchU)return!!this.regexp_eatSyntaxCharacter(t)||!!t.eat(47)&&(t.lastIntValue=47,!0);var e=t.current();return!(99===e||t.switchN&&107===e||(t.lastIntValue=e,t.advance(),0))},re.regexp_eatDecimalEscape=function(t){t.lastIntValue=0;var e=t.current();if(e>=49&&e<=57){do{t.lastIntValue=10*t.lastIntValue+(e-48),t.advance()}while((e=t.current())>=48&&e<=57);return!0}return!1};var fe=0,me=1,ge=2;function xe(t){return 100===t||68===t||115===t||83===t||119===t||87===t}function ve(t){return ue(t)||95===t}function ye(t){return ve(t)||Se(t)}function be(t){return 33===t||t>=35&&t<=38||t>=42&&t<=44||46===t||t>=58&&t<=64||94===t||96===t||126===t}function _e(t){return 40===t||41===t||45===t||47===t||t>=91&&t<=93||t>=123&&t<=125}function ke(t){return 33===t||35===t||37===t||38===t||44===t||45===t||t>=58&&t<=62||64===t||96===t||126===t}function Se(t){return t>=48&&t<=57}function Ce(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function we(t){return t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:t-48}function Ee(t){return t>=48&&t<=55}re.regexp_eatCharacterClassEscape=function(t){var e=t.current();if(xe(e))return t.lastIntValue=-1,t.advance(),me;var i=!1;if(t.switchU&&this.options.ecmaVersion>=9&&((i=80===e)||112===e)){var s;if(t.lastIntValue=-1,t.advance(),t.eat(123)&&(s=this.regexp_eatUnicodePropertyValueExpression(t))&&t.eat(125))return i&&s===ge&&t.raise("Invalid property name"),s;t.raise("Invalid property name")}return fe},re.regexp_eatUnicodePropertyValueExpression=function(t){var e=t.pos;if(this.regexp_eatUnicodePropertyName(t)&&t.eat(61)){var i=t.lastStringValue;if(this.regexp_eatUnicodePropertyValue(t)){var s=t.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(t,i,s),me}}if(t.pos=e,this.regexp_eatLoneUnicodePropertyNameOrValue(t)){var r=t.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(t,r)}return fe},re.regexp_validateUnicodePropertyNameAndValue=function(t,e,i){T(t.unicodeProperties.nonBinary,e)||t.raise("Invalid property name"),t.unicodeProperties.nonBinary[e].test(i)||t.raise("Invalid property value")},re.regexp_validateUnicodePropertyNameOrValue=function(t,e){return t.unicodeProperties.binary.test(e)?me:t.switchV&&t.unicodeProperties.binaryOfStrings.test(e)?ge:void t.raise("Invalid property name")},re.regexp_eatUnicodePropertyName=function(t){var e=0;for(t.lastStringValue="";ve(e=t.current());)t.lastStringValue+=R(e),t.advance();return""!==t.lastStringValue},re.regexp_eatUnicodePropertyValue=function(t){var e=0;for(t.lastStringValue="";ye(e=t.current());)t.lastStringValue+=R(e),t.advance();return""!==t.lastStringValue},re.regexp_eatLoneUnicodePropertyNameOrValue=function(t){return this.regexp_eatUnicodePropertyValue(t)},re.regexp_eatCharacterClass=function(t){if(t.eat(91)){var e=t.eat(94),i=this.regexp_classContents(t);return t.eat(93)||t.raise("Unterminated character class"),e&&i===ge&&t.raise("Negated character class may contain strings"),!0}return!1},re.regexp_classContents=function(t){return 93===t.current()?me:t.switchV?this.regexp_classSetExpression(t):(this.regexp_nonEmptyClassRanges(t),me)},re.regexp_nonEmptyClassRanges=function(t){for(;this.regexp_eatClassAtom(t);){var e=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassAtom(t)){var i=t.lastIntValue;!t.switchU||-1!==e&&-1!==i||t.raise("Invalid character class"),-1!==e&&-1!==i&&e>i&&t.raise("Range out of order in character class")}}},re.regexp_eatClassAtom=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatClassEscape(t))return!0;if(t.switchU){var i=t.current();(99===i||Ee(i))&&t.raise("Invalid class escape"),t.raise("Invalid escape")}t.pos=e}var s=t.current();return 93!==s&&(t.lastIntValue=s,t.advance(),!0)},re.regexp_eatClassEscape=function(t){var e=t.pos;if(t.eat(98))return t.lastIntValue=8,!0;if(t.switchU&&t.eat(45))return t.lastIntValue=45,!0;if(!t.switchU&&t.eat(99)){if(this.regexp_eatClassControlLetter(t))return!0;t.pos=e}return this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)},re.regexp_classSetExpression=function(t){var e,i=me;if(this.regexp_eatClassSetRange(t));else if(e=this.regexp_eatClassSetOperand(t)){e===ge&&(i=ge);for(var s=t.pos;t.eatChars([38,38]);)38!==t.current()&&(e=this.regexp_eatClassSetOperand(t))?e!==ge&&(i=me):t.raise("Invalid character in character class");if(s!==t.pos)return i;for(;t.eatChars([45,45]);)this.regexp_eatClassSetOperand(t)||t.raise("Invalid character in character class");if(s!==t.pos)return i}else t.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(t)){if(!(e=this.regexp_eatClassSetOperand(t)))return i;e===ge&&(i=ge)}},re.regexp_eatClassSetRange=function(t){var e=t.pos;if(this.regexp_eatClassSetCharacter(t)){var i=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassSetCharacter(t)){var s=t.lastIntValue;return-1!==i&&-1!==s&&i>s&&t.raise("Range out of order in character class"),!0}t.pos=e}return!1},re.regexp_eatClassSetOperand=function(t){return this.regexp_eatClassSetCharacter(t)?me:this.regexp_eatClassStringDisjunction(t)||this.regexp_eatNestedClass(t)},re.regexp_eatNestedClass=function(t){var e=t.pos;if(t.eat(91)){var i=t.eat(94),s=this.regexp_classContents(t);if(t.eat(93))return i&&s===ge&&t.raise("Negated character class may contain strings"),s;t.pos=e}if(t.eat(92)){var r=this.regexp_eatCharacterClassEscape(t);if(r)return r;t.pos=e}return null},re.regexp_eatClassStringDisjunction=function(t){var e=t.pos;if(t.eatChars([92,113])){if(t.eat(123)){var i=this.regexp_classStringDisjunctionContents(t);if(t.eat(125))return i}else t.raise("Invalid escape");t.pos=e}return null},re.regexp_classStringDisjunctionContents=function(t){for(var e=this.regexp_classString(t);t.eat(124);)this.regexp_classString(t)===ge&&(e=ge);return e},re.regexp_classString=function(t){for(var e=0;this.regexp_eatClassSetCharacter(t);)e++;return 1===e?me:ge},re.regexp_eatClassSetCharacter=function(t){var e=t.pos;if(t.eat(92))return!(!this.regexp_eatCharacterEscape(t)&&!this.regexp_eatClassSetReservedPunctuator(t)&&(t.eat(98)?(t.lastIntValue=8,0):(t.pos=e,1)));var i=t.current();return!(i<0||i===t.lookahead()&&be(i)||_e(i)||(t.advance(),t.lastIntValue=i,0))},re.regexp_eatClassSetReservedPunctuator=function(t){var e=t.current();return!!ke(e)&&(t.lastIntValue=e,t.advance(),!0)},re.regexp_eatClassControlLetter=function(t){var e=t.current();return!(!Se(e)&&95!==e||(t.lastIntValue=e%32,t.advance(),0))},re.regexp_eatHexEscapeSequence=function(t){var e=t.pos;if(t.eat(120)){if(this.regexp_eatFixedHexDigits(t,2))return!0;t.switchU&&t.raise("Invalid escape"),t.pos=e}return!1},re.regexp_eatDecimalDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;Se(i=t.current());)t.lastIntValue=10*t.lastIntValue+(i-48),t.advance();return t.pos!==e},re.regexp_eatHexDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;Ce(i=t.current());)t.lastIntValue=16*t.lastIntValue+we(i),t.advance();return t.pos!==e},re.regexp_eatLegacyOctalEscapeSequence=function(t){if(this.regexp_eatOctalDigit(t)){var e=t.lastIntValue;if(this.regexp_eatOctalDigit(t)){var i=t.lastIntValue;e<=3&&this.regexp_eatOctalDigit(t)?t.lastIntValue=64*e+8*i+t.lastIntValue:t.lastIntValue=8*e+i}else t.lastIntValue=e;return!0}return!1},re.regexp_eatOctalDigit=function(t){var e=t.current();return Ee(e)?(t.lastIntValue=e-48,t.advance(),!0):(t.lastIntValue=0,!1)},re.regexp_eatFixedHexDigits=function(t,e){var i=t.pos;t.lastIntValue=0;for(var s=0;s<e;++s){var r=t.current();if(!Ce(r))return t.pos=i,!1;t.lastIntValue=16*t.lastIntValue+we(r),t.advance()}return!0};var Ae=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new B(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},Ie=ht.prototype;function Pe(t,e){return e?parseInt(t,8):parseFloat(t.replace(/_/g,""))}function Te(t){return"function"!=typeof BigInt?null:BigInt(t.replace(/_/g,""))}Ie.next=function(t){!t&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Ae(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Ie.getToken=function(){return this.next(),new Ae(this)},"undefined"!=typeof Symbol&&(Ie[Symbol.iterator]=function(){var t=this;return{next:function(){var e=t.getToken();return{done:e.type===b.eof,value:e}}}}),Ie.nextToken=function(){var t=this.curContext();return t&&t.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(b.eof):t.override?t.override(this):void this.readToken(this.fullCharCodeAtPos())},Ie.readToken=function(t){return u(t,this.options.ecmaVersion>=6)||92===t?this.readWord():this.getTokenFromCode(t)},Ie.fullCharCodeAt=function(t){var e=this.input.charCodeAt(t);if(e<=55295||e>=56320)return e;var i=this.input.charCodeAt(t+1);return i<=56319||i>=57344?e:(e<<10)+i-56613888},Ie.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},Ie.skipBlockComment=function(){var t=this.options.onComment&&this.curPosition(),e=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(-1===i&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(var s=void 0,r=e;(s=C(this.input,r,this.pos))>-1;)++this.curLine,r=this.lineStart=s;this.options.onComment&&this.options.onComment(!0,this.input.slice(e+2,i),e,this.pos,t,this.curPosition())},Ie.skipLineComment=function(t){for(var e=this.pos,i=this.options.onComment&&this.curPosition(),s=this.input.charCodeAt(this.pos+=t);this.pos<this.input.length&&!S(s);)s=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(e+t,this.pos),e,this.pos,i,this.curPosition())},Ie.skipSpace=function(){t:for(;this.pos<this.input.length;){var t=this.input.charCodeAt(this.pos);switch(t){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(!(t>8&&t<14||t>=5760&&w.test(String.fromCharCode(t))))break t;++this.pos}}},Ie.finishToken=function(t,e){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var i=this.type;this.type=t,this.value=e,this.updateContext(i)},Ie.readToken_dot=function(){var t=this.input.charCodeAt(this.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===t&&46===e?(this.pos+=3,this.finishToken(b.ellipsis)):(++this.pos,this.finishToken(b.dot))},Ie.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===t?this.finishOp(b.assign,2):this.finishOp(b.slash,1)},Ie.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),i=1,s=42===t?b.star:b.modulo;return this.options.ecmaVersion>=7&&42===t&&42===e&&(++i,s=b.starstar,e=this.input.charCodeAt(this.pos+2)),61===e?this.finishOp(b.assign,i+1):this.finishOp(s,i)},Ie.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?this.options.ecmaVersion>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(b.assign,3):this.finishOp(124===t?b.logicalOR:b.logicalAND,2):61===e?this.finishOp(b.assign,2):this.finishOp(124===t?b.bitwiseOR:b.bitwiseAND,1)},Ie.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(b.assign,2):this.finishOp(b.bitwiseXOR,1)},Ie.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?45!==e||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!_.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(b.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===e?this.finishOp(b.assign,2):this.finishOp(b.plusMin,1)},Ie.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),i=1;return e===t?(i=62===t&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+i)?this.finishOp(b.assign,i+1):this.finishOp(b.bitShift,i)):33!==e||60!==t||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===e&&(i=2),this.finishOp(b.relational,i)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Ie.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return 61===e?this.finishOp(b.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===t&&62===e&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(b.arrow)):this.finishOp(61===t?b.eq:b.prefix,1)},Ie.readToken_question=function(){var t=this.options.ecmaVersion;if(t>=11){var e=this.input.charCodeAt(this.pos+1);if(46===e){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57)return this.finishOp(b.questionDot,2)}if(63===e)return t>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(b.assign,3):this.finishOp(b.coalesce,2)}return this.finishOp(b.question,1)},Ie.readToken_numberSign=function(){var t=35;if(this.options.ecmaVersion>=13&&(++this.pos,u(t=this.fullCharCodeAtPos(),!0)||92===t))return this.finishToken(b.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+R(t)+"'")},Ie.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(b.parenL);case 41:return++this.pos,this.finishToken(b.parenR);case 59:return++this.pos,this.finishToken(b.semi);case 44:return++this.pos,this.finishToken(b.comma);case 91:return++this.pos,this.finishToken(b.bracketL);case 93:return++this.pos,this.finishToken(b.bracketR);case 123:return++this.pos,this.finishToken(b.braceL);case 125:return++this.pos,this.finishToken(b.braceR);case 58:return++this.pos,this.finishToken(b.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(b.backQuote);case 48:var e=this.input.charCodeAt(this.pos+1);if(120===e||88===e)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===e||79===e)return this.readRadixNumber(8);if(98===e||66===e)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 63:return this.readToken_question();case 126:return this.finishOp(b.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+R(t)+"'")},Ie.finishOp=function(t,e){var i=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,i)},Ie.readRegexp=function(){for(var t,e,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var s=this.input.charAt(this.pos);if(_.test(s)&&this.raise(i,"Unterminated regular expression"),t)t=!1;else{if("["===s)e=!0;else if("]"===s&&e)e=!1;else if("/"===s&&!e)break;t="\\"===s}++this.pos}var r=this.input.slice(i,this.pos);++this.pos;var a=this.pos,n=this.readWord1();this.containsEsc&&this.unexpected(a);var o=this.regexpState||(this.regexpState=new ne(this));o.reset(i,r,n),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var h=null;try{h=new RegExp(r,n)}catch(t){}return this.finishToken(b.regexp,{pattern:r,flags:n,value:h})},Ie.readInt=function(t,e,i){for(var s=this.options.ecmaVersion>=12&&void 0===e,r=i&&48===this.input.charCodeAt(this.pos),a=this.pos,n=0,o=0,h=0,p=null==e?1/0:e;h<p;++h,++this.pos){var c=this.input.charCodeAt(this.pos),l=void 0;if(s&&95===c)r&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===o&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===h&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),o=c;else{if((l=c>=97?c-97+10:c>=65?c-65+10:c>=48&&c<=57?c-48:1/0)>=t)break;o=c,n=n*t+l}}return s&&95===o&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===a||null!=e&&this.pos-a!==e?null:n},Ie.readRadixNumber=function(t){var e=this.pos;this.pos+=2;var i=this.readInt(t);return null==i&&this.raise(this.start+2,"Expected number in radix "+t),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(i=Te(this.input.slice(e,this.pos)),++this.pos):u(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(b.num,i)},Ie.readNumber=function(t){var e=this.pos;t||null!==this.readInt(10,void 0,!0)||this.raise(e,"Invalid number");var i=this.pos-e>=2&&48===this.input.charCodeAt(e);i&&this.strict&&this.raise(e,"Invalid number");var s=this.input.charCodeAt(this.pos);if(!i&&!t&&this.options.ecmaVersion>=11&&110===s){var r=Te(this.input.slice(e,this.pos));return++this.pos,u(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(b.num,r)}i&&/[89]/.test(this.input.slice(e,this.pos))&&(i=!1),46!==s||i||(++this.pos,this.readInt(10),s=this.input.charCodeAt(this.pos)),69!==s&&101!==s||i||(43!==(s=this.input.charCodeAt(++this.pos))&&45!==s||++this.pos,null===this.readInt(10)&&this.raise(e,"Invalid number")),u(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a=Pe(this.input.slice(e,this.pos),i);return this.finishToken(b.num,a)},Ie.readCodePoint=function(){var t;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var e=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(e,"Code point out of bounds")}else t=this.readHexChar(4);return t},Ie.readString=function(t){for(var e="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var s=this.input.charCodeAt(this.pos);if(s===t)break;92===s?(e+=this.input.slice(i,this.pos),e+=this.readEscapedChar(!1),i=this.pos):8232===s||8233===s?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(S(s)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return e+=this.input.slice(i,this.pos++),this.finishToken(b.string,e)};var Ne={};Ie.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t!==Ne)throw t;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Ie.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Ne;this.raise(t,e)},Ie.readTmplToken=function(){for(var t="",e=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var i=this.input.charCodeAt(this.pos);if(96===i||36===i&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==b.template&&this.type!==b.invalidTemplate?(t+=this.input.slice(e,this.pos),this.finishToken(b.template,t)):36===i?(this.pos+=2,this.finishToken(b.dollarBraceL)):(++this.pos,this.finishToken(b.backQuote));if(92===i)t+=this.input.slice(e,this.pos),t+=this.readEscapedChar(!0),e=this.pos;else if(S(i)){switch(t+=this.input.slice(e,this.pos),++this.pos,i){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(i)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),e=this.pos}else++this.pos}},Ie.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(b.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":"\n"===this.input[this.pos+1]&&++this.pos;case"\n":case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,"Unterminated template")},Ie.readEscapedChar=function(t){var e=this.input.charCodeAt(++this.pos);switch(++this.pos,e){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return R(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),t){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(e>=48&&e<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);return r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.pos+=s.length-1,e=this.input.charCodeAt(this.pos),"0"===s&&56!==e&&57!==e||!this.strict&&!t||this.invalidStringToken(this.pos-1-s.length,t?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return S(e)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(e)}},Ie.readHexChar=function(t){var e=this.pos,i=this.readInt(16,t);return null===i&&this.invalidStringToken(e,"Bad character escape sequence"),i},Ie.readWord1=function(){this.containsEsc=!1;for(var t="",e=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var r=this.fullCharCodeAtPos();if(d(r,s))this.pos+=r<=65535?1:2;else{if(92!==r)break;this.containsEsc=!0,t+=this.input.slice(i,this.pos);var a=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var n=this.readCodePoint();(e?u:d)(n,s)||this.invalidStringToken(a,"Invalid Unicode escape"),t+=R(n),i=this.pos}e=!1}return t+this.input.slice(i,this.pos)},Ie.readWord=function(){var t=this.readWord1(),e=b.name;return this.keywords.test(t)&&(e=v[t]),this.finishToken(e,t)};var Ve="8.16.0";function Le(t,e){return ht.parse(t,e)}function Re(t,e,i){return ht.parseExpressionAt(t,e,i)}function Oe(t,e){return ht.tokenizer(t,e)}ht.acorn={Parser:ht,version:Ve,defaultOptions:F,Position:D,SourceLocation:B,getLineInfo:M,Node:Lt,TokenType:f,tokTypes:b,keywordTypes:v,TokContext:St,tokContexts:Ct,isIdentifierChar:d,isIdentifierStart:u,Token:Ae,isNewLine:S,lineBreak:_,lineBreakG:k,nonASCIIwhitespace:w},t.Node=Lt,t.Parser=ht,t.Position=D,t.SourceLocation=B,t.TokContext=St,t.Token=Ae,t.TokenType=f,t.defaultOptions=F,t.getLineInfo=M,t.isIdentifierChar=d,t.isIdentifierStart=u,t.isNewLine=S,t.keywordTypes=v,t.lineBreak=_,t.lineBreakG=k,t.nonASCIIwhitespace=w,t.parse=Le,t.parseExpressionAt=Re,t.tokContexts=Ct,t.tokTypes=b,t.tokenizer=Oe,t.version=Ve}(e)}},e={};function i(s){var r=e[s];if(void 0!==r)return r.exports;var a=e[s]={exports:{}};return t[s].call(a.exports,a,a.exports,i),a.exports}i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var s=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],r=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],a="ÂªÂµÂºÃ€-Ã–Ã˜-Ã¶Ã¸-ËË†-Ë‘Ë -Ë¤Ë¬Ë®Í°-Í´Í¶Í·Íº-Í½Í¿Î†Îˆ-ÎŠÎŒÎŽ-Î¡Î£-ÏµÏ·-ÒÒŠ-Ô¯Ô±-Õ–Õ™Õ -Öˆ×-×ª×¯-×²Ø -ÙŠÙ®Ù¯Ù±-Û“Û•Û¥Û¦Û®Û¯Ûº-Û¼Û¿ÜÜ’-Ü¯Ý-Þ¥Þ±ßŠ-ßªß´ßµßºà €-à •à šà ¤à ¨à¡€-à¡˜à¡ -à¡ªà¡°-à¢‡à¢‰-à¢à¢ -à£‰à¤„-à¤¹à¤½à¥à¥˜-à¥¡à¥±-à¦€à¦…-à¦Œà¦à¦à¦“-à¦¨à¦ª-à¦°à¦²à¦¶-à¦¹à¦½à§Žà§œà§à§Ÿ-à§¡à§°à§±à§¼à¨…-à¨Šà¨à¨à¨“-à¨¨à¨ª-à¨°à¨²à¨³à¨µà¨¶à¨¸à¨¹à©™-à©œà©žà©²-à©´àª…-àªàª-àª‘àª“-àª¨àªª-àª°àª²àª³àªµ-àª¹àª½à«à« à«¡à«¹à¬…-à¬Œà¬à¬à¬“-à¬¨à¬ª-à¬°à¬²à¬³à¬µ-à¬¹à¬½à­œà­à­Ÿ-à­¡à­±à®ƒà®…-à®Šà®Ž-à®à®’-à®•à®™à®šà®œà®žà®Ÿà®£à®¤à®¨-à®ªà®®-à®¹à¯à°…-à°Œà°Ž-à°à°’-à°¨à°ª-à°¹à°½à±˜-à±šà±œà±à± à±¡à²€à²…-à²Œà²Ž-à²à²’-à²¨à²ª-à²³à²µ-à²¹à²½à³œ-à³žà³ à³¡à³±à³²à´„-à´Œà´Ž-à´à´’-à´ºà´½àµŽàµ”-àµ–àµŸ-àµ¡àµº-àµ¿à¶…-à¶–à¶š-à¶±à¶³-à¶»à¶½à·€-à·†à¸-à¸°à¸²à¸³à¹€-à¹†àºàº‚àº„àº†-àºŠàºŒ-àº£àº¥àº§-àº°àº²àº³àº½à»€-à»„à»†à»œ-à»Ÿà¼€à½€-à½‡à½‰-à½¬à¾ˆ-à¾Œá€€-á€ªá€¿á-á•áš-áá¡á¥á¦á®-á°áµ-á‚á‚Žá‚ -áƒ…áƒ‡áƒáƒ-áƒºáƒ¼-á‰ˆá‰Š-á‰á‰-á‰–á‰˜á‰š-á‰á‰ -áŠˆáŠŠ-áŠáŠ-áŠ°áŠ²-áŠµáŠ¸-áŠ¾á‹€á‹‚-á‹…á‹ˆ-á‹–á‹˜-áŒáŒ’-áŒ•áŒ˜-ášáŽ€-áŽáŽ -áµá¸-á½á-á™¬á™¯-á™¿áš-áššáš -á›ªá›®-á›¸áœ€-áœ‘áœŸ-áœ±á€-á‘á -á¬á®-á°áž€-áž³áŸ—áŸœá  -á¡¸á¢€-á¢¨á¢ªá¢°-á£µá¤€-á¤žá¥-á¥­á¥°-á¥´á¦€-á¦«á¦°-á§‰á¨€-á¨–á¨ -á©”áª§á¬…-á¬³á­…-á­Œá®ƒ-á® á®®á®¯á®º-á¯¥á°€-á°£á±-á±á±š-á±½á²€-á²Šá²-á²ºá²½-á²¿á³©-á³¬á³®-á³³á³µá³¶á³ºá´€-á¶¿á¸€-á¼•á¼˜-á¼á¼ -á½…á½ˆ-á½á½-á½—á½™á½›á½á½Ÿ-á½½á¾€-á¾´á¾¶-á¾¼á¾¾á¿‚-á¿„á¿†-á¿Œá¿-á¿“á¿–-á¿›á¿ -á¿¬á¿²-á¿´á¿¶-á¿¼â±â¿â‚-â‚œâ„‚â„‡â„Š-â„“â„•â„˜-â„â„¤â„¦â„¨â„ª-â„¹â„¼-â„¿â……-â…‰â…Žâ… -â†ˆâ°€-â³¤â³«-â³®â³²â³³â´€-â´¥â´§â´­â´°-âµ§âµ¯â¶€-â¶–â¶ -â¶¦â¶¨-â¶®â¶°-â¶¶â¶¸-â¶¾â·€-â·†â·ˆ-â·Žâ·-â·–â·˜-â·žã€…-ã€‡ã€¡-ã€©ã€±-ã€µã€¸-ã€¼ã-ã‚–ã‚›-ã‚Ÿã‚¡-ãƒºãƒ¼-ãƒ¿ã„…-ã„¯ã„±-ã†Žã† -ã†¿ã‡°-ã‡¿ã€-ä¶¿ä¸€-ê’Œê“-ê“½ê”€-ê˜Œê˜-ê˜Ÿê˜ªê˜«ê™€-ê™®ê™¿-êšêš -ê›¯êœ—-êœŸêœ¢-êžˆêž‹-êŸœêŸ±-ê ê ƒ-ê …ê ‡-ê Šê Œ-ê ¢ê¡€-ê¡³ê¢‚-ê¢³ê£²-ê£·ê£»ê£½ê£¾ê¤Š-ê¤¥ê¤°-ê¥†ê¥ -ê¥¼ê¦„-ê¦²ê§ê§ -ê§¤ê§¦-ê§¯ê§º-ê§¾ê¨€-ê¨¨ê©€-ê©‚ê©„-ê©‹ê© -ê©¶ê©ºê©¾-êª¯êª±êªµêª¶êª¹-êª½ê«€ê«‚ê«›-ê«ê« -ê«ªê«²-ê«´ê¬-ê¬†ê¬‰-ê¬Žê¬‘-ê¬–ê¬ -ê¬¦ê¬¨-ê¬®ê¬°-ê­šê­œ-ê­©ê­°-ê¯¢ê°€-íž£íž°-íŸ†íŸ‹-íŸ»ï¤€-ï©­ï©°-ï«™ï¬€-ï¬†ï¬“-ï¬—ï¬ï¬Ÿ-ï¬¨ï¬ª-ï¬¶ï¬¸-ï¬¼ï¬¾ï­€ï­ï­ƒï­„ï­†-ï®±ï¯“-ï´½ïµ-ï¶ï¶’-ï·‡ï·°-ï·»ï¹°-ï¹´ï¹¶-ï»¼ï¼¡-ï¼ºï½-ï½šï½¦-ï¾¾ï¿‚-ï¿‡ï¿Š-ï¿ï¿’-ï¿—ï¿š-ï¿œ",n={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},o="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",h={5:o,"5module":o+" export import",6:o+" const class extends export import super"},p=/^in(stanceof)?$/,c=new RegExp("["+a+"]"),l=new RegExp("["+a+"â€Œâ€Â·Ì€-Í¯Î‡Òƒ-Ò‡Ö‘-Ö½Ö¿××‚×„×…×‡Ø-ØšÙ‹-Ù©Ù°Û–-ÛœÛŸ-Û¤Û§Û¨Ûª-Û­Û°-Û¹Ü‘Ü°-ÝŠÞ¦-Þ°ß€-ß‰ß«-ß³ß½à –-à ™à ›-à £à ¥-à §à ©-à ­à¡™-à¡›à¢—-à¢Ÿà£Š-à£¡à££-à¤ƒà¤º-à¤¼à¤¾-à¥à¥‘-à¥—à¥¢à¥£à¥¦-à¥¯à¦-à¦ƒà¦¼à¦¾-à§„à§‡à§ˆà§‹-à§à§—à§¢à§£à§¦-à§¯à§¾à¨-à¨ƒà¨¼à¨¾-à©‚à©‡à©ˆà©‹-à©à©‘à©¦-à©±à©µàª-àªƒàª¼àª¾-à«…à«‡-à«‰à«‹-à«à«¢à«£à«¦-à«¯à«º-à«¿à¬-à¬ƒà¬¼à¬¾-à­„à­‡à­ˆà­‹-à­à­•-à­—à­¢à­£à­¦-à­¯à®‚à®¾-à¯‚à¯†-à¯ˆà¯Š-à¯à¯—à¯¦-à¯¯à°€-à°„à°¼à°¾-à±„à±†-à±ˆà±Š-à±à±•à±–à±¢à±£à±¦-à±¯à²-à²ƒà²¼à²¾-à³„à³†-à³ˆà³Š-à³à³•à³–à³¢à³£à³¦-à³¯à³³à´€-à´ƒà´»à´¼à´¾-àµ„àµ†-àµˆàµŠ-àµàµ—àµ¢àµ£àµ¦-àµ¯à¶-à¶ƒà·Šà·-à·”à·–à·˜-à·Ÿà·¦-à·¯à·²à·³à¸±à¸´-à¸ºà¹‡-à¹Žà¹-à¹™àº±àº´-àº¼à»ˆ-à»Žà»-à»™à¼˜à¼™à¼ -à¼©à¼µà¼·à¼¹à¼¾à¼¿à½±-à¾„à¾†à¾‡à¾-à¾—à¾™-à¾¼à¿†á€«-á€¾á€-á‰á–-á™áž-á á¢-á¤á§-á­á±-á´á‚‚-á‚á‚-á‚á-áŸá©-á±áœ’-áœ•áœ²-áœ´á’á“á²á³áž´-áŸ“áŸáŸ -áŸ©á ‹-á á -á ™á¢©á¤ -á¤«á¤°-á¤»á¥†-á¥á§-á§šá¨—-á¨›á©•-á©žá© -á©¼á©¿-áª‰áª-áª™áª°-áª½áª¿-á«á« -á««á¬€-á¬„á¬´-á­„á­-á­™á­«-á­³á®€-á®‚á®¡-á®­á®°-á®¹á¯¦-á¯³á°¤-á°·á±€-á±‰á±-á±™á³-á³’á³”-á³¨á³­á³´á³·-á³¹á·€-á·¿â€Œâ€â€¿â€â”âƒ-âƒœâƒ¡âƒ¥-âƒ°â³¯-â³±âµ¿â· -â·¿ã€ª-ã€¯ã‚™ã‚šãƒ»ê˜ -ê˜©ê™¯ê™´-ê™½êšžêšŸê›°ê›±ê ‚ê †ê ‹ê £-ê §ê ¬ê¢€ê¢ê¢´-ê£…ê£-ê£™ê£ -ê£±ê£¿-ê¤‰ê¤¦-ê¤­ê¥‡-ê¥“ê¦€-ê¦ƒê¦³-ê§€ê§-ê§™ê§¥ê§°-ê§¹ê¨©-ê¨¶ê©ƒê©Œê©ê©-ê©™ê©»-ê©½êª°êª²-êª´êª·êª¸êª¾êª¿ê«ê««-ê«¯ê«µê«¶ê¯£-ê¯ªê¯¬ê¯­ê¯°-ê¯¹ï¬žï¸€-ï¸ï¸ -ï¸¯ï¸³ï¸´ï¹-ï¹ï¼-ï¼™ï¼¿ï½¥]");function u(t,e){for(var i=65536,s=0;s<e.length;s+=2){if((i+=e[s])>t)return!1;if((i+=e[s+1])>=t)return!0}return!1}function d(t,e){return t<65?36===t:t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&c.test(String.fromCharCode(t)):!1!==e&&u(t,r)))}function f(t,e){return t<48?36===t:t<58||!(t<65)&&(t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&l.test(String.fromCharCode(t)):!1!==e&&(u(t,r)||u(t,s)))))}var m=function(t,e){void 0===e&&(e={}),this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop||null,this.updateContext=null};function g(t,e){return new m(t,{beforeExpr:!0,binop:e})}var x={beforeExpr:!0},v={startsExpr:!0},y={};function b(t,e){return void 0===e&&(e={}),e.keyword=t,y[t]=new m(t,e)}var _={num:new m("num",v),regexp:new m("regexp",v),string:new m("string",v),name:new m("name",v),privateId:new m("privateId",v),eof:new m("eof"),bracketL:new m("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new m("]"),braceL:new m("{",{beforeExpr:!0,startsExpr:!0}),braceR:new m("}"),parenL:new m("(",{beforeExpr:!0,startsExpr:!0}),parenR:new m(")"),comma:new m(",",x),semi:new m(";",x),colon:new m(":",x),dot:new m("."),question:new m("?",x),questionDot:new m("?."),arrow:new m("=>",x),template:new m("template"),invalidTemplate:new m("invalidTemplate"),ellipsis:new m("...",x),backQuote:new m("`",v),dollarBraceL:new m("${",{beforeExpr:!0,startsExpr:!0}),eq:new m("=",{beforeExpr:!0,isAssign:!0}),assign:new m("_=",{beforeExpr:!0,isAssign:!0}),incDec:new m("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new m("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:g("||",1),logicalAND:g("&&",2),bitwiseOR:g("|",3),bitwiseXOR:g("^",4),bitwiseAND:g("&",5),equality:g("==/!=/===/!==",6),relational:g("</>/<=/>=",7),bitShift:g("<</>>/>>>",8),plusMin:new m("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:g("%",10),star:g("*",10),slash:g("/",10),starstar:new m("**",{beforeExpr:!0}),coalesce:g("??",1),_break:b("break"),_case:b("case",x),_catch:b("catch"),_continue:b("continue"),_debugger:b("debugger"),_default:b("default",x),_do:b("do",{isLoop:!0,beforeExpr:!0}),_else:b("else",x),_finally:b("finally"),_for:b("for",{isLoop:!0}),_function:b("function",v),_if:b("if"),_return:b("return",x),_switch:b("switch"),_throw:b("throw",x),_try:b("try"),_var:b("var"),_const:b("const"),_while:b("while",{isLoop:!0}),_with:b("with"),_new:b("new",{beforeExpr:!0,startsExpr:!0}),_this:b("this",v),_super:b("super",v),_class:b("class",v),_extends:b("extends",x),_export:b("export"),_import:b("import",v),_null:b("null",v),_true:b("true",v),_false:b("false",v),_in:b("in",{beforeExpr:!0,binop:7}),_instanceof:b("instanceof",{beforeExpr:!0,binop:7}),_typeof:b("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:b("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:b("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},k=/\r\n?|\n|\u2028|\u2029/,S=new RegExp(k.source,"g");function C(t){return 10===t||13===t||8232===t||8233===t}function w(t,e,i){void 0===i&&(i=t.length);for(var s=e;s<i;s++){var r=t.charCodeAt(s);if(C(r))return s<i-1&&13===r&&10===t.charCodeAt(s+1)?s+2:s+1}return-1}var E=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,A=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,I=Object.prototype,P=I.hasOwnProperty,T=I.toString,N=Object.hasOwn||function(t,e){return P.call(t,e)},V=Array.isArray||function(t){return"[object Array]"===T.call(t)},L=Object.create(null);function R(t){return L[t]||(L[t]=new RegExp("^(?:"+t.replace(/ /g,"|")+")$"))}function O(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}var D=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,B=function(t,e){this.line=t,this.column=e};B.prototype.offset=function(t){return new B(this.line,this.column+t)};var M=function(t,e,i){this.start=e,this.end=i,null!==t.sourceFile&&(this.source=t.sourceFile)};function F(t,e){for(var i=1,s=0;;){var r=w(t,s,e);if(r<0)return new B(i,e-s);++i,s=r}}var j={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},U=!1;function q(t){var e={};for(var i in j)e[i]=t&&N(t,i)?t[i]:j[i];if("latest"===e.ecmaVersion?e.ecmaVersion=1e8:null==e.ecmaVersion?(!U&&"object"==typeof console&&console.warn&&(U=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),e.ecmaVersion=11):e.ecmaVersion>=2015&&(e.ecmaVersion-=2009),null==e.allowReserved&&(e.allowReserved=e.ecmaVersion<5),t&&null!=t.allowHashBang||(e.allowHashBang=e.ecmaVersion>=14),V(e.onToken)){var s=e.onToken;e.onToken=function(t){return s.push(t)}}if(V(e.onComment)&&(e.onComment=function(t,e){return function(i,s,r,a,n,o){var h={type:i?"Block":"Line",value:s,start:r,end:a};t.locations&&(h.loc=new M(this,n,o)),t.ranges&&(h.range=[r,a]),e.push(h)}}(e,e.onComment)),"commonjs"===e.sourceType&&e.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return e}var G=256,W=259;function H(t,e){return 2|(t?4:0)|(e?8:0)}var z=function(t,e,i){this.options=t=q(t),this.sourceFile=t.sourceFile,this.keywords=R(h[t.ecmaVersion>=6?6:"module"===t.sourceType?"5module":5]);var s="";!0!==t.allowReserved&&(s=n[t.ecmaVersion>=6?6:5===t.ecmaVersion?5:3],"module"===t.sourceType&&(s+=" await")),this.reservedWords=R(s);var r=(s?s+" ":"")+n.strict;this.reservedWordsStrict=R(r),this.reservedWordsStrictBind=R(r+" "+n.strictBind),this.input=String(e),this.containsEsc=!1,i?(this.pos=i,this.lineStart=this.input.lastIndexOf("\n",i-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(k).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=_.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===t.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&t.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope("commonjs"===this.options.sourceType?2:1),this.regexpState=null,this.privateNameStack=[]},X={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};z.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)},X.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},X.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},X.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},X.canAwait.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t].flags;if(768&e)return!1;if(2&e)return(4&e)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},X.allowReturn.get=function(){return!!this.inFunction||!!(this.options.allowReturnOutsideFunction&&1&this.currentVarScope().flags)},X.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},X.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},X.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},X.allowNewDotTarget.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t].flags;if(768&e||2&e&&!(16&e))return!0}return!1},X.allowUsing.get=function(){var t=this.currentScope().flags;return!(1024&t)&&!(!this.inModule&&1&t)},X.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&G)>0},z.extend=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var i=this,s=0;s<t.length;s++)i=t[s](i);return i},z.parse=function(t,e){return new this(e,t).parse()},z.parseExpressionAt=function(t,e,i){var s=new this(i,t,e);return s.nextToken(),s.parseExpression()},z.tokenizer=function(t,e){return new this(e,t)},Object.defineProperties(z.prototype,X);var K=z.prototype,Q=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;K.strictDirective=function(t){if(this.options.ecmaVersion<5)return!1;for(;;){A.lastIndex=t,t+=A.exec(this.input)[0].length;var e=Q.exec(this.input.slice(t));if(!e)return!1;if("use strict"===(e[1]||e[2])){A.lastIndex=t+e[0].length;var i=A.exec(this.input),s=i.index+i[0].length,r=this.input.charAt(s);return";"===r||"}"===r||k.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(r)||"!"===r&&"="===this.input.charAt(s+1))}t+=e[0].length,A.lastIndex=t,t+=A.exec(this.input)[0].length,";"===this.input[t]&&t++}},K.eat=function(t){return this.type===t&&(this.next(),!0)},K.isContextual=function(t){return this.type===_.name&&this.value===t&&!this.containsEsc},K.eatContextual=function(t){return!!this.isContextual(t)&&(this.next(),!0)},K.expectContextual=function(t){this.eatContextual(t)||this.unexpected()},K.canInsertSemicolon=function(){return this.type===_.eof||this.type===_.braceR||k.test(this.input.slice(this.lastTokEnd,this.start))},K.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},K.semicolon=function(){this.eat(_.semi)||this.insertSemicolon()||this.unexpected()},K.afterTrailingComma=function(t,e){if(this.type===t)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),e||this.next(),!0},K.expect=function(t){this.eat(t)||this.unexpected()},K.unexpected=function(t){this.raise(null!=t?t:this.start,"Unexpected token")};var J=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};K.checkPatternErrors=function(t,e){if(t){t.trailingComma>-1&&this.raiseRecoverable(t.trailingComma,"Comma is not permitted after the rest element");var i=e?t.parenthesizedAssign:t.parenthesizedBind;i>-1&&this.raiseRecoverable(i,e?"Assigning to rvalue":"Parenthesized pattern")}},K.checkExpressionErrors=function(t,e){if(!t)return!1;var i=t.shorthandAssign,s=t.doubleProto;if(!e)return i>=0||s>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),s>=0&&this.raiseRecoverable(s,"Redefinition of __proto__ property")},K.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},K.isSimpleAssignTarget=function(t){return"ParenthesizedExpression"===t.type?this.isSimpleAssignTarget(t.expression):"Identifier"===t.type||"MemberExpression"===t.type};var Y=z.prototype;Y.parseTopLevel=function(t){var e=Object.create(null);for(t.body||(t.body=[]);this.type!==_.eof;){var i=this.parseStatement(null,!0,e);t.body.push(i)}if(this.inModule)for(var s=0,r=Object.keys(this.undefinedExports);s<r.length;s+=1){var a=r[s];this.raiseRecoverable(this.undefinedExports[a].start,"Export '"+a+"' is not defined")}return this.adaptDirectivePrologue(t.body),this.next(),t.sourceType="commonjs"===this.options.sourceType?"script":this.options.sourceType,this.finishNode(t,"Program")};var Z={kind:"loop"},$={kind:"switch"};Y.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;A.lastIndex=this.pos;var e=A.exec(this.input),i=this.pos+e[0].length,s=this.fullCharCodeAt(i);if(91===s||92===s)return!0;if(t)return!1;if(123===s)return!0;if(d(s)){var r=i;do{i+=s<=65535?1:2}while(f(s=this.fullCharCodeAt(i)));if(92===s)return!0;var a=this.input.slice(r,i);if(!p.test(a))return!0}return!1},Y.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;A.lastIndex=this.pos;var t,e=A.exec(this.input),i=this.pos+e[0].length;return!(k.test(this.input.slice(this.pos,i))||"function"!==this.input.slice(i,i+8)||i+8!==this.input.length&&(f(t=this.fullCharCodeAt(i+8))||92===t))},Y.isUsingKeyword=function(t,e){if(this.options.ecmaVersion<17||!this.isContextual(t?"await":"using"))return!1;A.lastIndex=this.pos;var i=A.exec(this.input),s=this.pos+i[0].length;if(k.test(this.input.slice(this.pos,s)))return!1;if(t){var r,a=s+5;if("using"!==this.input.slice(s,a)||a===this.input.length||f(r=this.fullCharCodeAt(a))||92===r)return!1;A.lastIndex=a;var n=A.exec(this.input);if(s=a+n[0].length,n&&k.test(this.input.slice(a,s)))return!1}var o=this.fullCharCodeAt(s);if(!d(o)&&92!==o)return!1;var h=s;do{s+=o<=65535?1:2}while(f(o=this.fullCharCodeAt(s)));if(92===o)return!0;var c=this.input.slice(h,s);return!(p.test(c)||e&&"of"===c)},Y.isAwaitUsing=function(t){return this.isUsingKeyword(!0,t)},Y.isUsing=function(t){return this.isUsingKeyword(!1,t)},Y.parseStatement=function(t,e,i){var s,r=this.type,a=this.startNode();switch(this.isLet(t)&&(r=_._var,s="let"),r){case _._break:case _._continue:return this.parseBreakContinueStatement(a,r.keyword);case _._debugger:return this.parseDebuggerStatement(a);case _._do:return this.parseDoStatement(a);case _._for:return this.parseForStatement(a);case _._function:return t&&(this.strict||"if"!==t&&"label"!==t)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(a,!1,!t);case _._class:return t&&this.unexpected(),this.parseClass(a,!0);case _._if:return this.parseIfStatement(a);case _._return:return this.parseReturnStatement(a);case _._switch:return this.parseSwitchStatement(a);case _._throw:return this.parseThrowStatement(a);case _._try:return this.parseTryStatement(a);case _._const:case _._var:return s=s||this.value,t&&"var"!==s&&this.unexpected(),this.parseVarStatement(a,s);case _._while:return this.parseWhileStatement(a);case _._with:return this.parseWithStatement(a);case _.braceL:return this.parseBlock(!0,a);case _.semi:return this.parseEmptyStatement(a);case _._export:case _._import:if(this.options.ecmaVersion>10&&r===_._import){A.lastIndex=this.pos;var n=A.exec(this.input),o=this.pos+n[0].length,h=this.input.charCodeAt(o);if(40===h||46===h)return this.parseExpressionStatement(a,this.parseExpression())}return this.options.allowImportExportEverywhere||(e||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===_._import?this.parseImport(a):this.parseExport(a,i);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(a,!0,!t);var p=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(p)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),"await using"===p&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(a,!1,p),this.semicolon(),this.finishNode(a,"VariableDeclaration");var c=this.value,l=this.parseExpression();return r===_.name&&"Identifier"===l.type&&this.eat(_.colon)?this.parseLabeledStatement(a,c,l,t):this.parseExpressionStatement(a,l)}},Y.parseBreakContinueStatement=function(t,e){var i="break"===e;this.next(),this.eat(_.semi)||this.insertSemicolon()?t.label=null:this.type!==_.name?this.unexpected():(t.label=this.parseIdent(),this.semicolon());for(var s=0;s<this.labels.length;++s){var r=this.labels[s];if(null==t.label||r.name===t.label.name){if(null!=r.kind&&(i||"loop"===r.kind))break;if(t.label&&i)break}}return s===this.labels.length&&this.raise(t.start,"Unsyntactic "+e),this.finishNode(t,i?"BreakStatement":"ContinueStatement")},Y.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")},Y.parseDoStatement=function(t){return this.next(),this.labels.push(Z),t.body=this.parseStatement("do"),this.labels.pop(),this.expect(_._while),t.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(_.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")},Y.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Z),this.enterScope(0),this.expect(_.parenL),this.type===_.semi)return e>-1&&this.unexpected(e),this.parseFor(t,null);var i=this.isLet();if(this.type===_._var||this.type===_._const||i){var s=this.startNode(),r=i?"let":this.value;return this.next(),this.parseVar(s,!0,r),this.finishNode(s,"VariableDeclaration"),this.parseForAfterInit(t,s,e)}var a=this.isContextual("let"),n=!1,o=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(o){var h=this.startNode();return this.next(),"await using"===o&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(h,!0,o),this.finishNode(h,"VariableDeclaration"),this.parseForAfterInit(t,h,e)}var p=this.containsEsc,c=new J,l=this.start,u=e>-1?this.parseExprSubscripts(c,"await"):this.parseExpression(!0,c);return this.type===_._in||(n=this.options.ecmaVersion>=6&&this.isContextual("of"))?(e>-1?(this.type===_._in&&this.unexpected(e),t.await=!0):n&&this.options.ecmaVersion>=8&&(u.start!==l||p||"Identifier"!==u.type||"async"!==u.name?this.options.ecmaVersion>=9&&(t.await=!1):this.unexpected()),a&&n&&this.raise(u.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(u,!1,c),this.checkLValPattern(u),this.parseForIn(t,u)):(this.checkExpressionErrors(c,!0),e>-1&&this.unexpected(e),this.parseFor(t,u))},Y.parseForAfterInit=function(t,e,i){return(this.type===_._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===e.declarations.length?(this.options.ecmaVersion>=9&&(this.type===_._in?i>-1&&this.unexpected(i):t.await=i>-1),this.parseForIn(t,e)):(i>-1&&this.unexpected(i),this.parseFor(t,e))},Y.parseFunctionStatement=function(t,e,i){return this.next(),this.parseFunction(t,et|(i?0:it),!1,e)},Y.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(_._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")},Y.parseReturnStatement=function(t){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(_.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},Y.parseSwitchStatement=function(t){var e;this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(_.braceL),this.labels.push($),this.enterScope(1024);for(var i=!1;this.type!==_.braceR;)if(this.type===_._case||this.type===_._default){var s=this.type===_._case;e&&this.finishNode(e,"SwitchCase"),t.cases.push(e=this.startNode()),e.consequent=[],this.next(),s?e.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,e.test=null),this.expect(_.colon)}else e||this.unexpected(),e.consequent.push(this.parseStatement(null));return this.exitScope(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")},Y.parseThrowStatement=function(t){return this.next(),k.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var tt=[];Y.parseCatchClauseParam=function(){var t=this.parseBindingAtom(),e="Identifier"===t.type;return this.enterScope(e?32:0),this.checkLValPattern(t,e?4:2),this.expect(_.parenR),t},Y.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===_._catch){var e=this.startNode();this.next(),this.eat(_.parenL)?e.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),e.param=null,this.enterScope(0)),e.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(_._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},Y.parseVarStatement=function(t,e,i){return this.next(),this.parseVar(t,!1,e,i),this.semicolon(),this.finishNode(t,"VariableDeclaration")},Y.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(Z),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")},Y.parseWithStatement=function(t){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")},Y.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},Y.parseLabeledStatement=function(t,e,i,s){for(var r=0,a=this.labels;r<a.length;r+=1){a[r].name===e&&this.raise(i.start,"Label '"+e+"' is already declared")}for(var n=this.type.isLoop?"loop":this.type===_._switch?"switch":null,o=this.labels.length-1;o>=0;o--){var h=this.labels[o];if(h.statementStart!==t.start)break;h.statementStart=this.start,h.kind=n}return this.labels.push({name:e,kind:n,statementStart:this.start}),t.body=this.parseStatement(s?-1===s.indexOf("label")?s+"label":s:"label"),this.labels.pop(),t.label=i,this.finishNode(t,"LabeledStatement")},Y.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},Y.parseBlock=function(t,e,i){for(void 0===t&&(t=!0),void 0===e&&(e=this.startNode()),e.body=[],this.expect(_.braceL),t&&this.enterScope(0);this.type!==_.braceR;){var s=this.parseStatement(null);e.body.push(s)}return i&&(this.strict=!1),this.next(),t&&this.exitScope(),this.finishNode(e,"BlockStatement")},Y.parseFor=function(t,e){return t.init=e,this.expect(_.semi),t.test=this.type===_.semi?null:this.parseExpression(),this.expect(_.semi),t.update=this.type===_.parenR?null:this.parseExpression(),this.expect(_.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")},Y.parseForIn=function(t,e){var i=this.type===_._in;return this.next(),"VariableDeclaration"===e.type&&null!=e.declarations[0].init&&(!i||this.options.ecmaVersion<8||this.strict||"var"!==e.kind||"Identifier"!==e.declarations[0].id.type)&&this.raise(e.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer"),t.left=e,t.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(_.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")},Y.parseVar=function(t,e,i,s){for(t.declarations=[],t.kind=i;;){var r=this.startNode();if(this.parseVarId(r,i),this.eat(_.eq)?r.init=this.parseMaybeAssign(e):s||"const"!==i||this.type===_._in||this.options.ecmaVersion>=6&&this.isContextual("of")?s||"using"!==i&&"await using"!==i||!(this.options.ecmaVersion>=17)||this.type===_._in||this.isContextual("of")?s||"Identifier"===r.id.type||e&&(this.type===_._in||this.isContextual("of"))?r.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+i+" declaration"):this.unexpected(),t.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(_.comma))break}return t},Y.parseVarId=function(t,e){t.id="using"===e||"await using"===e?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(t.id,"var"===e?1:2,!1)};var et=1,it=2;function st(t,e){var i=e.key.name,s=t[i],r="true";return"MethodDefinition"!==e.type||"get"!==e.kind&&"set"!==e.kind||(r=(e.static?"s":"i")+e.kind),"iget"===s&&"iset"===r||"iset"===s&&"iget"===r||"sget"===s&&"sset"===r||"sset"===s&&"sget"===r?(t[i]="true",!1):!!s||(t[i]=r,!1)}function rt(t,e){var i=t.computed,s=t.key;return!i&&("Identifier"===s.type&&s.name===e||"Literal"===s.type&&s.value===e)}Y.parseFunction=function(t,e,i,s,r){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!s)&&(this.type===_.star&&e&it&&this.unexpected(),t.generator=this.eat(_.star)),this.options.ecmaVersion>=8&&(t.async=!!s),e&et&&(t.id=4&e&&this.type!==_.name?null:this.parseIdent(),!t.id||e&it||this.checkLValSimple(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?1:2:3));var a=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(H(t.async,t.generator)),e&et||(t.id=this.type===_.name?this.parseIdent():null),this.parseFunctionParams(t),this.parseFunctionBody(t,i,!1,r),this.yieldPos=a,this.awaitPos=n,this.awaitIdentPos=o,this.finishNode(t,e&et?"FunctionDeclaration":"FunctionExpression")},Y.parseFunctionParams=function(t){this.expect(_.parenL),t.params=this.parseBindingList(_.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Y.parseClass=function(t,e){this.next();var i=this.strict;this.strict=!0,this.parseClassId(t,e),this.parseClassSuper(t);var s=this.enterClassBody(),r=this.startNode(),a=!1;for(r.body=[],this.expect(_.braceL);this.type!==_.braceR;){var n=this.parseClassElement(null!==t.superClass);n&&(r.body.push(n),"MethodDefinition"===n.type&&"constructor"===n.kind?(a&&this.raiseRecoverable(n.start,"Duplicate constructor in the same class"),a=!0):n.key&&"PrivateIdentifier"===n.key.type&&st(s,n)&&this.raiseRecoverable(n.key.start,"Identifier '#"+n.key.name+"' has already been declared"))}return this.strict=i,this.next(),t.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},Y.parseClassElement=function(t){if(this.eat(_.semi))return null;var e=this.options.ecmaVersion,i=this.startNode(),s="",r=!1,a=!1,n="method",o=!1;if(this.eatContextual("static")){if(e>=13&&this.eat(_.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===_.star?o=!0:s="static"}if(i.static=o,!s&&e>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==_.star||this.canInsertSemicolon()?s="async":a=!0),!s&&(e>=9||!a)&&this.eat(_.star)&&(r=!0),!s&&!a&&!r){var h=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?n=h:s=h)}if(s?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=s,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),e<13||this.type===_.parenL||"method"!==n||r||a){var p=!i.static&&rt(i,"constructor"),c=p&&t;p&&"method"!==n&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=p?"constructor":n,this.parseClassMethod(i,r,a,c)}else this.parseClassField(i);return i},Y.isClassElementNameStart=function(){return this.type===_.name||this.type===_.privateId||this.type===_.num||this.type===_.string||this.type===_.bracketL||this.type.keyword},Y.parseClassElementName=function(t){this.type===_.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),t.computed=!1,t.key=this.parsePrivateIdent()):this.parsePropertyName(t)},Y.parseClassMethod=function(t,e,i,s){var r=t.key;"constructor"===t.kind?(e&&this.raise(r.start,"Constructor can't be a generator"),i&&this.raise(r.start,"Constructor can't be an async method")):t.static&&rt(t,"prototype")&&this.raise(r.start,"Classes may not have a static property named prototype");var a=t.value=this.parseMethod(e,i,s);return"get"===t.kind&&0!==a.params.length&&this.raiseRecoverable(a.start,"getter should have no params"),"set"===t.kind&&1!==a.params.length&&this.raiseRecoverable(a.start,"setter should have exactly one param"),"set"===t.kind&&"RestElement"===a.params[0].type&&this.raiseRecoverable(a.params[0].start,"Setter cannot use rest params"),this.finishNode(t,"MethodDefinition")},Y.parseClassField=function(t){return rt(t,"constructor")?this.raise(t.key.start,"Classes can't have a field named 'constructor'"):t.static&&rt(t,"prototype")&&this.raise(t.key.start,"Classes can't have a static field named 'prototype'"),this.eat(_.eq)?(this.enterScope(576),t.value=this.parseMaybeAssign(),this.exitScope()):t.value=null,this.semicolon(),this.finishNode(t,"PropertyDefinition")},Y.parseClassStaticBlock=function(t){t.body=[];var e=this.labels;for(this.labels=[],this.enterScope(320);this.type!==_.braceR;){var i=this.parseStatement(null);t.body.push(i)}return this.next(),this.exitScope(),this.labels=e,this.finishNode(t,"StaticBlock")},Y.parseClassId=function(t,e){this.type===_.name?(t.id=this.parseIdent(),e&&this.checkLValSimple(t.id,2,!1)):(!0===e&&this.unexpected(),t.id=null)},Y.parseClassSuper=function(t){t.superClass=this.eat(_._extends)?this.parseExprSubscripts(null,!1):null},Y.enterClassBody=function(){var t={declared:Object.create(null),used:[]};return this.privateNameStack.push(t),t.declared},Y.exitClassBody=function(){var t=this.privateNameStack.pop(),e=t.declared,i=t.used;if(this.options.checkPrivateFields)for(var s=this.privateNameStack.length,r=0===s?null:this.privateNameStack[s-1],a=0;a<i.length;++a){var n=i[a];N(e,n.name)||(r?r.used.push(n):this.raiseRecoverable(n.start,"Private field '#"+n.name+"' must be declared in an enclosing class"))}},Y.parseExportAllDeclaration=function(t,e){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(t.exported=this.parseModuleExportName(),this.checkExport(e,t.exported,this.lastTokStart)):t.exported=null),this.expectContextual("from"),this.type!==_.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ExportAllDeclaration")},Y.parseExport=function(t,e){if(this.next(),this.eat(_.star))return this.parseExportAllDeclaration(t,e);if(this.eat(_._default))return this.checkExport(e,"default",this.lastTokStart),t.declaration=this.parseExportDefaultDeclaration(),this.finishNode(t,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())t.declaration=this.parseExportDeclaration(t),"VariableDeclaration"===t.declaration.type?this.checkVariableExport(e,t.declaration.declarations):this.checkExport(e,t.declaration.id,t.declaration.id.start),t.specifiers=[],t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[]);else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))this.type!==_.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause());else{for(var i=0,s=t.specifiers;i<s.length;i+=1){var r=s[i];this.checkUnreserved(r.local),this.checkLocalExport(r.local),"Literal"===r.local.type&&this.raise(r.local.start,"A string literal cannot be used as an exported binding without `from`.")}t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[])}this.semicolon()}return this.finishNode(t,"ExportNamedDeclaration")},Y.parseExportDeclaration=function(t){return this.parseStatement(null)},Y.parseExportDefaultDeclaration=function(){var t;if(this.type===_._function||(t=this.isAsyncFunction())){var e=this.startNode();return this.next(),t&&this.next(),this.parseFunction(e,4|et,!1,t)}if(this.type===_._class){var i=this.startNode();return this.parseClass(i,"nullableID")}var s=this.parseMaybeAssign();return this.semicolon(),s},Y.checkExport=function(t,e,i){t&&("string"!=typeof e&&(e="Identifier"===e.type?e.name:e.value),N(t,e)&&this.raiseRecoverable(i,"Duplicate export '"+e+"'"),t[e]=!0)},Y.checkPatternExport=function(t,e){var i=e.type;if("Identifier"===i)this.checkExport(t,e,e.start);else if("ObjectPattern"===i)for(var s=0,r=e.properties;s<r.length;s+=1){var a=r[s];this.checkPatternExport(t,a)}else if("ArrayPattern"===i)for(var n=0,o=e.elements;n<o.length;n+=1){var h=o[n];h&&this.checkPatternExport(t,h)}else"Property"===i?this.checkPatternExport(t,e.value):"AssignmentPattern"===i?this.checkPatternExport(t,e.left):"RestElement"===i&&this.checkPatternExport(t,e.argument)},Y.checkVariableExport=function(t,e){if(t)for(var i=0,s=e;i<s.length;i+=1){var r=s[i];this.checkPatternExport(t,r.id)}},Y.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},Y.parseExportSpecifier=function(t){var e=this.startNode();return e.local=this.parseModuleExportName(),e.exported=this.eatContextual("as")?this.parseModuleExportName():e.local,this.checkExport(t,e.exported,e.exported.start),this.finishNode(e,"ExportSpecifier")},Y.parseExportSpecifiers=function(t){var e=[],i=!0;for(this.expect(_.braceL);!this.eat(_.braceR);){if(i)i=!1;else if(this.expect(_.comma),this.afterTrailingComma(_.braceR))break;e.push(this.parseExportSpecifier(t))}return e},Y.parseImport=function(t){return this.next(),this.type===_.string?(t.specifiers=tt,t.source=this.parseExprAtom()):(t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.type===_.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ImportDeclaration")},Y.parseImportSpecifier=function(){var t=this.startNode();return t.imported=this.parseModuleExportName(),this.eatContextual("as")?t.local=this.parseIdent():(this.checkUnreserved(t.imported),t.local=t.imported),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportSpecifier")},Y.parseImportDefaultSpecifier=function(){var t=this.startNode();return t.local=this.parseIdent(),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportDefaultSpecifier")},Y.parseImportNamespaceSpecifier=function(){var t=this.startNode();return this.next(),this.expectContextual("as"),t.local=this.parseIdent(),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportNamespaceSpecifier")},Y.parseImportSpecifiers=function(){var t=[],e=!0;if(this.type===_.name&&(t.push(this.parseImportDefaultSpecifier()),!this.eat(_.comma)))return t;if(this.type===_.star)return t.push(this.parseImportNamespaceSpecifier()),t;for(this.expect(_.braceL);!this.eat(_.braceR);){if(e)e=!1;else if(this.expect(_.comma),this.afterTrailingComma(_.braceR))break;t.push(this.parseImportSpecifier())}return t},Y.parseWithClause=function(){var t=[];if(!this.eat(_._with))return t;this.expect(_.braceL);for(var e={},i=!0;!this.eat(_.braceR);){if(i)i=!1;else if(this.expect(_.comma),this.afterTrailingComma(_.braceR))break;var s=this.parseImportAttribute(),r="Identifier"===s.key.type?s.key.name:s.key.value;N(e,r)&&this.raiseRecoverable(s.key.start,"Duplicate attribute key '"+r+"'"),e[r]=!0,t.push(s)}return t},Y.parseImportAttribute=function(){var t=this.startNode();return t.key=this.type===_.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(_.colon),this.type!==_.string&&this.unexpected(),t.value=this.parseExprAtom(),this.finishNode(t,"ImportAttribute")},Y.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===_.string){var t=this.parseLiteral(this.value);return D.test(t.value)&&this.raise(t.start,"An export name cannot include a lone surrogate."),t}return this.parseIdent(!0)},Y.adaptDirectivePrologue=function(t){for(var e=0;e<t.length&&this.isDirectiveCandidate(t[e]);++e)t[e].directive=t[e].expression.raw.slice(1,-1)},Y.isDirectiveCandidate=function(t){return this.options.ecmaVersion>=5&&"ExpressionStatement"===t.type&&"Literal"===t.expression.type&&"string"==typeof t.expression.value&&('"'===this.input[t.start]||"'"===this.input[t.start])};var at=z.prototype;at.toAssignable=function(t,e,i){if(this.options.ecmaVersion>=6&&t)switch(t.type){case"Identifier":this.inAsync&&"await"===t.name&&this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var s=0,r=t.properties;s<r.length;s+=1){var a=r[s];this.toAssignable(a,e),"RestElement"!==a.type||"ArrayPattern"!==a.argument.type&&"ObjectPattern"!==a.argument.type||this.raise(a.argument.start,"Unexpected token")}break;case"Property":"init"!==t.kind&&this.raise(t.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(t.value,e);break;case"ArrayExpression":t.type="ArrayPattern",i&&this.checkPatternErrors(i,!0),this.toAssignableList(t.elements,e);break;case"SpreadElement":t.type="RestElement",this.toAssignable(t.argument,e),"AssignmentPattern"===t.argument.type&&this.raise(t.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==t.operator&&this.raise(t.left.end,"Only '=' operator can be used for specifying default value."),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(t.expression,e,i);break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!e)break;default:this.raise(t.start,"Assigning to rvalue")}else i&&this.checkPatternErrors(i,!0);return t},at.toAssignableList=function(t,e){for(var i=t.length,s=0;s<i;s++){var r=t[s];r&&this.toAssignable(r,e)}if(i){var a=t[i-1];6===this.options.ecmaVersion&&e&&a&&"RestElement"===a.type&&"Identifier"!==a.argument.type&&this.unexpected(a.argument.start)}return t},at.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")},at.parseRestBinding=function(){var t=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==_.name&&this.unexpected(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")},at.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case _.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(_.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case _.braceL:return this.parseObj(!0)}return this.parseIdent()},at.parseBindingList=function(t,e,i,s){for(var r=[],a=!0;!this.eat(t);)if(a?a=!1:this.expect(_.comma),e&&this.type===_.comma)r.push(null);else{if(i&&this.afterTrailingComma(t))break;if(this.type===_.ellipsis){var n=this.parseRestBinding();this.parseBindingListItem(n),r.push(n),this.type===_.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(t);break}r.push(this.parseAssignableListItem(s))}return r},at.parseAssignableListItem=function(t){var e=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(e),e},at.parseBindingListItem=function(t){return t},at.parseMaybeDefault=function(t,e,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(_.eq))return i;var s=this.startNodeAt(t,e);return s.left=i,s.right=this.parseMaybeAssign(),this.finishNode(s,"AssignmentPattern")},at.checkLValSimple=function(t,e,i){void 0===e&&(e=0);var s=0!==e;switch(t.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(t.name)&&this.raiseRecoverable(t.start,(s?"Binding ":"Assigning to ")+t.name+" in strict mode"),s&&(2===e&&"let"===t.name&&this.raiseRecoverable(t.start,"let is disallowed as a lexically bound name"),i&&(N(i,t.name)&&this.raiseRecoverable(t.start,"Argument name clash"),i[t.name]=!0),5!==e&&this.declareName(t.name,e,t.start));break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":s&&this.raiseRecoverable(t.start,"Binding member expression");break;case"ParenthesizedExpression":return s&&this.raiseRecoverable(t.start,"Binding parenthesized expression"),this.checkLValSimple(t.expression,e,i);default:this.raise(t.start,(s?"Binding":"Assigning to")+" rvalue")}},at.checkLValPattern=function(t,e,i){switch(void 0===e&&(e=0),t.type){case"ObjectPattern":for(var s=0,r=t.properties;s<r.length;s+=1){var a=r[s];this.checkLValInnerPattern(a,e,i)}break;case"ArrayPattern":for(var n=0,o=t.elements;n<o.length;n+=1){var h=o[n];h&&this.checkLValInnerPattern(h,e,i)}break;default:this.checkLValSimple(t,e,i)}},at.checkLValInnerPattern=function(t,e,i){switch(void 0===e&&(e=0),t.type){case"Property":this.checkLValInnerPattern(t.value,e,i);break;case"AssignmentPattern":this.checkLValPattern(t.left,e,i);break;case"RestElement":this.checkLValPattern(t.argument,e,i);break;default:this.checkLValPattern(t,e,i)}};var nt=function(t,e,i,s,r){this.token=t,this.isExpr=!!e,this.preserveSpace=!!i,this.override=s,this.generator=!!r},ot={b_stat:new nt("{",!1),b_expr:new nt("{",!0),b_tmpl:new nt("${",!1),p_stat:new nt("(",!1),p_expr:new nt("(",!0),q_tmpl:new nt("`",!0,!0,(function(t){return t.tryReadTemplateToken()})),f_stat:new nt("function",!1),f_expr:new nt("function",!0),f_expr_gen:new nt("function",!0,!1,null,!0),f_gen:new nt("function",!1,!1,null,!0)},ht=z.prototype;ht.initialContext=function(){return[ot.b_stat]},ht.curContext=function(){return this.context[this.context.length-1]},ht.braceIsBlock=function(t){var e=this.curContext();return e===ot.f_expr||e===ot.f_stat||(t!==_.colon||e!==ot.b_stat&&e!==ot.b_expr?t===_._return||t===_.name&&this.exprAllowed?k.test(this.input.slice(this.lastTokEnd,this.start)):t===_._else||t===_.semi||t===_.eof||t===_.parenR||t===_.arrow||(t===_.braceL?e===ot.b_stat:t!==_._var&&t!==_._const&&t!==_.name&&!this.exprAllowed):!e.isExpr)},ht.inGeneratorContext=function(){for(var t=this.context.length-1;t>=1;t--){var e=this.context[t];if("function"===e.token)return e.generator}return!1},ht.updateContext=function(t){var e,i=this.type;i.keyword&&t===_.dot?this.exprAllowed=!1:(e=i.updateContext)?e.call(this,t):this.exprAllowed=i.beforeExpr},ht.overrideContext=function(t){this.curContext()!==t&&(this.context[this.context.length-1]=t)},_.parenR.updateContext=_.braceR.updateContext=function(){if(1!==this.context.length){var t=this.context.pop();t===ot.b_stat&&"function"===this.curContext().token&&(t=this.context.pop()),this.exprAllowed=!t.isExpr}else this.exprAllowed=!0},_.braceL.updateContext=function(t){this.context.push(this.braceIsBlock(t)?ot.b_stat:ot.b_expr),this.exprAllowed=!0},_.dollarBraceL.updateContext=function(){this.context.push(ot.b_tmpl),this.exprAllowed=!0},_.parenL.updateContext=function(t){var e=t===_._if||t===_._for||t===_._with||t===_._while;this.context.push(e?ot.p_stat:ot.p_expr),this.exprAllowed=!0},_.incDec.updateContext=function(){},_._function.updateContext=_._class.updateContext=function(t){!t.beforeExpr||t===_._else||t===_.semi&&this.curContext()!==ot.p_stat||t===_._return&&k.test(this.input.slice(this.lastTokEnd,this.start))||(t===_.colon||t===_.braceL)&&this.curContext()===ot.b_stat?this.context.push(ot.f_stat):this.context.push(ot.f_expr),this.exprAllowed=!1},_.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},_.backQuote.updateContext=function(){this.curContext()===ot.q_tmpl?this.context.pop():this.context.push(ot.q_tmpl),this.exprAllowed=!1},_.star.updateContext=function(t){if(t===_._function){var e=this.context.length-1;this.context[e]===ot.f_expr?this.context[e]=ot.f_expr_gen:this.context[e]=ot.f_gen}this.exprAllowed=!0},_.name.updateContext=function(t){var e=!1;this.options.ecmaVersion>=6&&t!==_.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(e=!0),this.exprAllowed=e};var pt=z.prototype;function ct(t){return"Identifier"===t.type||"ParenthesizedExpression"===t.type&&ct(t.expression)}function lt(t){return"MemberExpression"===t.type&&"PrivateIdentifier"===t.property.type||"ChainExpression"===t.type&&lt(t.expression)||"ParenthesizedExpression"===t.type&&lt(t.expression)}pt.checkPropClash=function(t,e,i){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===t.type||this.options.ecmaVersion>=6&&(t.computed||t.method||t.shorthand))){var s,r=t.key;switch(r.type){case"Identifier":s=r.name;break;case"Literal":s=String(r.value);break;default:return}var a=t.kind;if(this.options.ecmaVersion>=6)"__proto__"===s&&"init"===a&&(e.proto&&(i?i.doubleProto<0&&(i.doubleProto=r.start):this.raiseRecoverable(r.start,"Redefinition of __proto__ property")),e.proto=!0);else{var n=e[s="$"+s];if(n)("init"===a?this.strict&&n.init||n.get||n.set:n.init||n[a])&&this.raiseRecoverable(r.start,"Redefinition of property");else n=e[s]={init:!1,get:!1,set:!1};n[a]=!0}}},pt.parseExpression=function(t,e){var i=this.start,s=this.startLoc,r=this.parseMaybeAssign(t,e);if(this.type===_.comma){var a=this.startNodeAt(i,s);for(a.expressions=[r];this.eat(_.comma);)a.expressions.push(this.parseMaybeAssign(t,e));return this.finishNode(a,"SequenceExpression")}return r},pt.parseMaybeAssign=function(t,e,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(t);this.exprAllowed=!1}var s=!1,r=-1,a=-1,n=-1;e?(r=e.parenthesizedAssign,a=e.trailingComma,n=e.doubleProto,e.parenthesizedAssign=e.trailingComma=-1):(e=new J,s=!0);var o=this.start,h=this.startLoc;this.type!==_.parenL&&this.type!==_.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===t);var p=this.parseMaybeConditional(t,e);if(i&&(p=i.call(this,p,o,h)),this.type.isAssign){var c=this.startNodeAt(o,h);return c.operator=this.value,this.type===_.eq&&(p=this.toAssignable(p,!1,e)),s||(e.parenthesizedAssign=e.trailingComma=e.doubleProto=-1),e.shorthandAssign>=p.start&&(e.shorthandAssign=-1),this.type===_.eq?this.checkLValPattern(p):this.checkLValSimple(p),c.left=p,this.next(),c.right=this.parseMaybeAssign(t),n>-1&&(e.doubleProto=n),this.finishNode(c,"AssignmentExpression")}return s&&this.checkExpressionErrors(e,!0),r>-1&&(e.parenthesizedAssign=r),a>-1&&(e.trailingComma=a),p},pt.parseMaybeConditional=function(t,e){var i=this.start,s=this.startLoc,r=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return r;if(this.eat(_.question)){var a=this.startNodeAt(i,s);return a.test=r,a.consequent=this.parseMaybeAssign(),this.expect(_.colon),a.alternate=this.parseMaybeAssign(t),this.finishNode(a,"ConditionalExpression")}return r},pt.parseExprOps=function(t,e){var i=this.start,s=this.startLoc,r=this.parseMaybeUnary(e,!1,!1,t);return this.checkExpressionErrors(e)||r.start===i&&"ArrowFunctionExpression"===r.type?r:this.parseExprOp(r,i,s,-1,t)},pt.parseExprOp=function(t,e,i,s,r){var a=this.type.binop;if(null!=a&&(!r||this.type!==_._in)&&a>s){var n=this.type===_.logicalOR||this.type===_.logicalAND,o=this.type===_.coalesce;o&&(a=_.logicalAND.binop);var h=this.value;this.next();var p=this.start,c=this.startLoc,l=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,r),p,c,a,r),u=this.buildBinary(e,i,t,l,h,n||o);return(n&&this.type===_.coalesce||o&&(this.type===_.logicalOR||this.type===_.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(u,e,i,s,r)}return t},pt.buildBinary=function(t,e,i,s,r,a){"PrivateIdentifier"===s.type&&this.raise(s.start,"Private identifier can only be left side of binary expression");var n=this.startNodeAt(t,e);return n.left=i,n.operator=r,n.right=s,this.finishNode(n,a?"LogicalExpression":"BinaryExpression")},pt.parseMaybeUnary=function(t,e,i,s){var r,a=this.start,n=this.startLoc;if(this.isContextual("await")&&this.canAwait)r=this.parseAwait(s),e=!0;else if(this.type.prefix){var o=this.startNode(),h=this.type===_.incDec;o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0,h,s),this.checkExpressionErrors(t,!0),h?this.checkLValSimple(o.argument):this.strict&&"delete"===o.operator&&ct(o.argument)?this.raiseRecoverable(o.start,"Deleting local variable in strict mode"):"delete"===o.operator&&lt(o.argument)?this.raiseRecoverable(o.start,"Private fields can not be deleted"):e=!0,r=this.finishNode(o,h?"UpdateExpression":"UnaryExpression")}else if(e||this.type!==_.privateId){if(r=this.parseExprSubscripts(t,s),this.checkExpressionErrors(t))return r;for(;this.type.postfix&&!this.canInsertSemicolon();){var p=this.startNodeAt(a,n);p.operator=this.value,p.prefix=!1,p.argument=r,this.checkLValSimple(r),this.next(),r=this.finishNode(p,"UpdateExpression")}}else(s||0===this.privateNameStack.length)&&this.options.checkPrivateFields&&this.unexpected(),r=this.parsePrivateIdent(),this.type!==_._in&&this.unexpected();return i||!this.eat(_.starstar)?r:e?void this.unexpected(this.lastTokStart):this.buildBinary(a,n,r,this.parseMaybeUnary(null,!1,!1,s),"**",!1)},pt.parseExprSubscripts=function(t,e){var i=this.start,s=this.startLoc,r=this.parseExprAtom(t,e);if("ArrowFunctionExpression"===r.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return r;var a=this.parseSubscripts(r,i,s,!1,e);return t&&"MemberExpression"===a.type&&(t.parenthesizedAssign>=a.start&&(t.parenthesizedAssign=-1),t.parenthesizedBind>=a.start&&(t.parenthesizedBind=-1),t.trailingComma>=a.start&&(t.trailingComma=-1)),a},pt.parseSubscripts=function(t,e,i,s,r){for(var a=this.options.ecmaVersion>=8&&"Identifier"===t.type&&"async"===t.name&&this.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start==5&&this.potentialArrowAt===t.start,n=!1;;){var o=this.parseSubscript(t,e,i,s,a,n,r);if(o.optional&&(n=!0),o===t||"ArrowFunctionExpression"===o.type){if(n){var h=this.startNodeAt(e,i);h.expression=o,o=this.finishNode(h,"ChainExpression")}return o}t=o}},pt.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(_.arrow)},pt.parseSubscriptAsyncArrow=function(t,e,i,s){return this.parseArrowExpression(this.startNodeAt(t,e),i,!0,s)},pt.parseSubscript=function(t,e,i,s,r,a,n){var o=this.options.ecmaVersion>=11,h=o&&this.eat(_.questionDot);s&&h&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var p=this.eat(_.bracketL);if(p||h&&this.type!==_.parenL&&this.type!==_.backQuote||this.eat(_.dot)){var c=this.startNodeAt(e,i);c.object=t,p?(c.property=this.parseExpression(),this.expect(_.bracketR)):this.type===_.privateId&&"Super"!==t.type?c.property=this.parsePrivateIdent():c.property=this.parseIdent("never"!==this.options.allowReserved),c.computed=!!p,o&&(c.optional=h),t=this.finishNode(c,"MemberExpression")}else if(!s&&this.eat(_.parenL)){var l=new J,u=this.yieldPos,d=this.awaitPos,f=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var m=this.parseExprList(_.parenR,this.options.ecmaVersion>=8,!1,l);if(r&&!h&&this.shouldParseAsyncArrow())return this.checkPatternErrors(l,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=u,this.awaitPos=d,this.awaitIdentPos=f,this.parseSubscriptAsyncArrow(e,i,m,n);this.checkExpressionErrors(l,!0),this.yieldPos=u||this.yieldPos,this.awaitPos=d||this.awaitPos,this.awaitIdentPos=f||this.awaitIdentPos;var g=this.startNodeAt(e,i);g.callee=t,g.arguments=m,o&&(g.optional=h),t=this.finishNode(g,"CallExpression")}else if(this.type===_.backQuote){(h||a)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var x=this.startNodeAt(e,i);x.tag=t,x.quasi=this.parseTemplate({isTagged:!0}),t=this.finishNode(x,"TaggedTemplateExpression")}return t},pt.parseExprAtom=function(t,e,i){this.type===_.slash&&this.readRegexp();var s,r=this.potentialArrowAt===this.start;switch(this.type){case _._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),s=this.startNode(),this.next(),this.type!==_.parenL||this.allowDirectSuper||this.raise(s.start,"super() call outside constructor of a subclass"),this.type!==_.dot&&this.type!==_.bracketL&&this.type!==_.parenL&&this.unexpected(),this.finishNode(s,"Super");case _._this:return s=this.startNode(),this.next(),this.finishNode(s,"ThisExpression");case _.name:var a=this.start,n=this.startLoc,o=this.containsEsc,h=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!o&&"async"===h.name&&!this.canInsertSemicolon()&&this.eat(_._function))return this.overrideContext(ot.f_expr),this.parseFunction(this.startNodeAt(a,n),0,!1,!0,e);if(r&&!this.canInsertSemicolon()){if(this.eat(_.arrow))return this.parseArrowExpression(this.startNodeAt(a,n),[h],!1,e);if(this.options.ecmaVersion>=8&&"async"===h.name&&this.type===_.name&&!o&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return h=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(_.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,n),[h],!0,e)}return h;case _.regexp:var p=this.value;return(s=this.parseLiteral(p.value)).regex={pattern:p.pattern,flags:p.flags},s;case _.num:case _.string:return this.parseLiteral(this.value);case _._null:case _._true:case _._false:return(s=this.startNode()).value=this.type===_._null?null:this.type===_._true,s.raw=this.type.keyword,this.next(),this.finishNode(s,"Literal");case _.parenL:var c=this.start,l=this.parseParenAndDistinguishExpression(r,e);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(l)&&(t.parenthesizedAssign=c),t.parenthesizedBind<0&&(t.parenthesizedBind=c)),l;case _.bracketL:return s=this.startNode(),this.next(),s.elements=this.parseExprList(_.bracketR,!0,!0,t),this.finishNode(s,"ArrayExpression");case _.braceL:return this.overrideContext(ot.b_expr),this.parseObj(!1,t);case _._function:return s=this.startNode(),this.next(),this.parseFunction(s,0);case _._class:return this.parseClass(this.startNode(),!1);case _._new:return this.parseNew();case _.backQuote:return this.parseTemplate();case _._import:return this.options.ecmaVersion>=11?this.parseExprImport(i):this.unexpected();default:return this.parseExprAtomDefault()}},pt.parseExprAtomDefault=function(){this.unexpected()},pt.parseExprImport=function(t){var e=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===_.parenL&&!t)return this.parseDynamicImport(e);if(this.type===_.dot){var i=this.startNodeAt(e.start,e.loc&&e.loc.start);return i.name="import",e.meta=this.finishNode(i,"Identifier"),this.parseImportMeta(e)}this.unexpected()},pt.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(_.parenR)?t.options=null:(this.expect(_.comma),this.afterTrailingComma(_.parenR)?t.options=null:(t.options=this.parseMaybeAssign(),this.eat(_.parenR)||(this.expect(_.comma),this.afterTrailingComma(_.parenR)||this.unexpected())));else if(!this.eat(_.parenR)){var e=this.start;this.eat(_.comma)&&this.eat(_.parenR)?this.raiseRecoverable(e,"Trailing comma is not allowed in import()"):this.unexpected(e)}return this.finishNode(t,"ImportExpression")},pt.parseImportMeta=function(t){this.next();var e=this.containsEsc;return t.property=this.parseIdent(!0),"meta"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is 'import.meta'"),e&&this.raiseRecoverable(t.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(t.start,"Cannot use 'import.meta' outside a module"),this.finishNode(t,"MetaProperty")},pt.parseLiteral=function(t){var e=this.startNode();return e.value=t,e.raw=this.input.slice(this.start,this.end),110===e.raw.charCodeAt(e.raw.length-1)&&(e.bigint=null!=e.value?e.value.toString():e.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(e,"Literal")},pt.parseParenExpression=function(){this.expect(_.parenL);var t=this.parseExpression();return this.expect(_.parenR),t},pt.shouldParseArrow=function(t){return!this.canInsertSemicolon()},pt.parseParenAndDistinguishExpression=function(t,e){var i,s=this.start,r=this.startLoc,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var n,o=this.start,h=this.startLoc,p=[],c=!0,l=!1,u=new J,d=this.yieldPos,f=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==_.parenR;){if(c?c=!1:this.expect(_.comma),a&&this.afterTrailingComma(_.parenR,!0)){l=!0;break}if(this.type===_.ellipsis){n=this.start,p.push(this.parseParenItem(this.parseRestBinding())),this.type===_.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}p.push(this.parseMaybeAssign(!1,u,this.parseParenItem))}var m=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(_.parenR),t&&this.shouldParseArrow(p)&&this.eat(_.arrow))return this.checkPatternErrors(u,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=f,this.parseParenArrowList(s,r,p,e);p.length&&!l||this.unexpected(this.lastTokStart),n&&this.unexpected(n),this.checkExpressionErrors(u,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=f||this.awaitPos,p.length>1?((i=this.startNodeAt(o,h)).expressions=p,this.finishNodeAt(i,"SequenceExpression",m,g)):i=p[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var x=this.startNodeAt(s,r);return x.expression=i,this.finishNode(x,"ParenthesizedExpression")}return i},pt.parseParenItem=function(t){return t},pt.parseParenArrowList=function(t,e,i,s){return this.parseArrowExpression(this.startNodeAt(t,e),i,!1,s)};var ut=[];pt.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var t=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===_.dot){var e=this.startNodeAt(t.start,t.loc&&t.loc.start);e.name="new",t.meta=this.finishNode(e,"Identifier"),this.next();var i=this.containsEsc;return t.property=this.parseIdent(!0),"target"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for new is 'new.target'"),i&&this.raiseRecoverable(t.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(t.start,"'new.target' can only be used in functions and class static block"),this.finishNode(t,"MetaProperty")}var s=this.start,r=this.startLoc;return t.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),s,r,!0,!1),this.eat(_.parenL)?t.arguments=this.parseExprList(_.parenR,this.options.ecmaVersion>=8,!1):t.arguments=ut,this.finishNode(t,"NewExpression")},pt.parseTemplateElement=function(t){var e=t.isTagged,i=this.startNode();return this.type===_.invalidTemplate?(e||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),i.value={raw:this.value.replace(/\r\n?/g,"\n"),cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),i.tail=this.type===_.backQuote,this.finishNode(i,"TemplateElement")},pt.parseTemplate=function(t){void 0===t&&(t={});var e=t.isTagged;void 0===e&&(e=!1);var i=this.startNode();this.next(),i.expressions=[];var s=this.parseTemplateElement({isTagged:e});for(i.quasis=[s];!s.tail;)this.type===_.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(_.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(_.braceR),i.quasis.push(s=this.parseTemplateElement({isTagged:e}));return this.next(),this.finishNode(i,"TemplateLiteral")},pt.isAsyncProp=function(t){return!t.computed&&"Identifier"===t.key.type&&"async"===t.key.name&&(this.type===_.name||this.type===_.num||this.type===_.string||this.type===_.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===_.star)&&!k.test(this.input.slice(this.lastTokEnd,this.start))},pt.parseObj=function(t,e){var i=this.startNode(),s=!0,r={};for(i.properties=[],this.next();!this.eat(_.braceR);){if(s)s=!1;else if(this.expect(_.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(_.braceR))break;var a=this.parseProperty(t,e);t||this.checkPropClash(a,r,e),i.properties.push(a)}return this.finishNode(i,t?"ObjectPattern":"ObjectExpression")},pt.parseProperty=function(t,e){var i,s,r,a,n=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(_.ellipsis))return t?(n.argument=this.parseIdent(!1),this.type===_.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(n,"RestElement")):(n.argument=this.parseMaybeAssign(!1,e),this.type===_.comma&&e&&e.trailingComma<0&&(e.trailingComma=this.start),this.finishNode(n,"SpreadElement"));this.options.ecmaVersion>=6&&(n.method=!1,n.shorthand=!1,(t||e)&&(r=this.start,a=this.startLoc),t||(i=this.eat(_.star)));var o=this.containsEsc;return this.parsePropertyName(n),!t&&!o&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(n)?(s=!0,i=this.options.ecmaVersion>=9&&this.eat(_.star),this.parsePropertyName(n)):s=!1,this.parsePropertyValue(n,t,i,s,r,a,e,o),this.finishNode(n,"Property")},pt.parseGetterSetter=function(t){var e=t.key.name;this.parsePropertyName(t),t.value=this.parseMethod(!1),t.kind=e;var i="get"===t.kind?0:1;if(t.value.params.length!==i){var s=t.value.start;"get"===t.kind?this.raiseRecoverable(s,"getter should have no params"):this.raiseRecoverable(s,"setter should have exactly one param")}else"set"===t.kind&&"RestElement"===t.value.params[0].type&&this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")},pt.parsePropertyValue=function(t,e,i,s,r,a,n,o){(i||s)&&this.type===_.colon&&this.unexpected(),this.eat(_.colon)?(t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,n),t.kind="init"):this.options.ecmaVersion>=6&&this.type===_.parenL?(e&&this.unexpected(),t.method=!0,t.value=this.parseMethod(i,s),t.kind="init"):e||o||!(this.options.ecmaVersion>=5)||t.computed||"Identifier"!==t.key.type||"get"!==t.key.name&&"set"!==t.key.name||this.type===_.comma||this.type===_.braceR||this.type===_.eq?this.options.ecmaVersion>=6&&!t.computed&&"Identifier"===t.key.type?((i||s)&&this.unexpected(),this.checkUnreserved(t.key),"await"!==t.key.name||this.awaitIdentPos||(this.awaitIdentPos=r),e?t.value=this.parseMaybeDefault(r,a,this.copyNode(t.key)):this.type===_.eq&&n?(n.shorthandAssign<0&&(n.shorthandAssign=this.start),t.value=this.parseMaybeDefault(r,a,this.copyNode(t.key))):t.value=this.copyNode(t.key),t.kind="init",t.shorthand=!0):this.unexpected():((i||s)&&this.unexpected(),this.parseGetterSetter(t))},pt.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(_.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(_.bracketR),t.key;t.computed=!1}return t.key=this.type===_.num||this.type===_.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},pt.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)},pt.parseMethod=function(t,e,i){var s=this.startNode(),r=this.yieldPos,a=this.awaitPos,n=this.awaitIdentPos;return this.initFunction(s),this.options.ecmaVersion>=6&&(s.generator=t),this.options.ecmaVersion>=8&&(s.async=!!e),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|H(e,s.generator)|(i?128:0)),this.expect(_.parenL),s.params=this.parseBindingList(_.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(s,!1,!0,!1),this.yieldPos=r,this.awaitPos=a,this.awaitIdentPos=n,this.finishNode(s,"FunctionExpression")},pt.parseArrowExpression=function(t,e,i,s){var r=this.yieldPos,a=this.awaitPos,n=this.awaitIdentPos;return this.enterScope(16|H(i,!1)),this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0,!1,s),this.yieldPos=r,this.awaitPos=a,this.awaitIdentPos=n,this.finishNode(t,"ArrowFunctionExpression")},pt.parseFunctionBody=function(t,e,i,s){var r=e&&this.type!==_.braceL,a=this.strict,n=!1;if(r)t.body=this.parseMaybeAssign(s),t.expression=!0,this.checkParams(t,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);a&&!o||(n=this.strictDirective(this.end))&&o&&this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list");var h=this.labels;this.labels=[],n&&(this.strict=!0),this.checkParams(t,!a&&!n&&!e&&!i&&this.isSimpleParamList(t.params)),this.strict&&t.id&&this.checkLValSimple(t.id,5),t.body=this.parseBlock(!1,void 0,n&&!a),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=h}this.exitScope()},pt.isSimpleParamList=function(t){for(var e=0,i=t;e<i.length;e+=1){if("Identifier"!==i[e].type)return!1}return!0},pt.checkParams=function(t,e){for(var i=Object.create(null),s=0,r=t.params;s<r.length;s+=1){var a=r[s];this.checkLValInnerPattern(a,1,e?null:i)}},pt.parseExprList=function(t,e,i,s){for(var r=[],a=!0;!this.eat(t);){if(a)a=!1;else if(this.expect(_.comma),e&&this.afterTrailingComma(t))break;var n=void 0;i&&this.type===_.comma?n=null:this.type===_.ellipsis?(n=this.parseSpread(s),s&&this.type===_.comma&&s.trailingComma<0&&(s.trailingComma=this.start)):n=this.parseMaybeAssign(!1,s),r.push(n)}return r},pt.checkUnreserved=function(t){var e=t.start,i=t.end,s=t.name;(this.inGenerator&&"yield"===s&&this.raiseRecoverable(e,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===s&&this.raiseRecoverable(e,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().flags&W||"arguments"!==s||this.raiseRecoverable(e,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||"arguments"!==s&&"await"!==s||this.raise(e,"Cannot use "+s+" in class static initialization block"),this.keywords.test(s)&&this.raise(e,"Unexpected keyword '"+s+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(e,i).indexOf("\\"))||(this.strict?this.reservedWordsStrict:this.reservedWords).test(s)&&(this.inAsync||"await"!==s||this.raiseRecoverable(e,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(e,"The keyword '"+s+"' is reserved"))},pt.parseIdent=function(t){var e=this.parseIdentNode();return this.next(!!t),this.finishNode(e,"Identifier"),t||(this.checkUnreserved(e),"await"!==e.name||this.awaitIdentPos||(this.awaitIdentPos=e.start)),e},pt.parseIdentNode=function(){var t=this.startNode();return this.type===_.name?t.name=this.value:this.type.keyword?(t.name=this.type.keyword,"class"!==t.name&&"function"!==t.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop(),this.type=_.name):this.unexpected(),t},pt.parsePrivateIdent=function(){var t=this.startNode();return this.type===_.privateId?t.name=this.value:this.unexpected(),this.next(),this.finishNode(t,"PrivateIdentifier"),this.options.checkPrivateFields&&(0===this.privateNameStack.length?this.raise(t.start,"Private field '#"+t.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(t)),t},pt.parseYield=function(t){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type===_.semi||this.canInsertSemicolon()||this.type!==_.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(_.star),e.argument=this.parseMaybeAssign(t)),this.finishNode(e,"YieldExpression")},pt.parseAwait=function(t){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0,!1,t),this.finishNode(e,"AwaitExpression")};var dt=z.prototype;dt.raise=function(t,e){var i=F(this.input,t);e+=" ("+i.line+":"+i.column+")",this.sourceFile&&(e+=" in "+this.sourceFile);var s=new SyntaxError(e);throw s.pos=t,s.loc=i,s.raisedAt=this.pos,s},dt.raiseRecoverable=dt.raise,dt.curPosition=function(){if(this.options.locations)return new B(this.curLine,this.pos-this.lineStart)};var ft=z.prototype,mt=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};ft.enterScope=function(t){this.scopeStack.push(new mt(t))},ft.exitScope=function(){this.scopeStack.pop()},ft.treatFunctionsAsVarInScope=function(t){return 2&t.flags||!this.inModule&&1&t.flags},ft.declareName=function(t,e,i){var s=!1;if(2===e){var r=this.currentScope();s=r.lexical.indexOf(t)>-1||r.functions.indexOf(t)>-1||r.var.indexOf(t)>-1,r.lexical.push(t),this.inModule&&1&r.flags&&delete this.undefinedExports[t]}else if(4===e){this.currentScope().lexical.push(t)}else if(3===e){var a=this.currentScope();s=this.treatFunctionsAsVar?a.lexical.indexOf(t)>-1:a.lexical.indexOf(t)>-1||a.var.indexOf(t)>-1,a.functions.push(t)}else for(var n=this.scopeStack.length-1;n>=0;--n){var o=this.scopeStack[n];if(o.lexical.indexOf(t)>-1&&!(32&o.flags&&o.lexical[0]===t)||!this.treatFunctionsAsVarInScope(o)&&o.functions.indexOf(t)>-1){s=!0;break}if(o.var.push(t),this.inModule&&1&o.flags&&delete this.undefinedExports[t],o.flags&W)break}s&&this.raiseRecoverable(i,"Identifier '"+t+"' has already been declared")},ft.checkLocalExport=function(t){-1===this.scopeStack[0].lexical.indexOf(t.name)&&-1===this.scopeStack[0].var.indexOf(t.name)&&(this.undefinedExports[t.name]=t)},ft.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},ft.currentVarScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(771&e.flags)return e}},ft.currentThisScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(771&e.flags&&!(16&e.flags))return e}};var gt=function(t,e,i){this.type="",this.start=e,this.end=0,t.options.locations&&(this.loc=new M(t,i)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[e,0])},xt=z.prototype;function vt(t,e,i,s){return t.type=e,t.end=i,this.options.locations&&(t.loc.end=s),this.options.ranges&&(t.range[1]=i),t}xt.startNode=function(){return new gt(this,this.start,this.startLoc)},xt.startNodeAt=function(t,e){return new gt(this,t,e)},xt.finishNode=function(t,e){return vt.call(this,t,e,this.lastTokEnd,this.lastTokEndLoc)},xt.finishNodeAt=function(t,e,i,s){return vt.call(this,t,e,i,s)},xt.copyNode=function(t){var e=new gt(this,t.start,this.startLoc);for(var i in t)e[i]=t[i];return e};var yt="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",bt=yt+" Extended_Pictographic",_t=bt+" EBase EComp EMod EPres ExtPict",kt={9:yt,10:bt,11:bt,12:_t,13:_t,14:_t},St={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},Ct="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",wt="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Et=wt+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",At=Et+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",It=At+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Pt=It+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Tt={9:wt,10:Et,11:At,12:It,13:Pt,14:Pt+" Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz"},Nt={};function Vt(t){var e=Nt[t]={binary:R(kt[t]+" "+Ct),binaryOfStrings:R(St[t]),nonBinary:{General_Category:R(Ct),Script:R(Tt[t])}};e.nonBinary.Script_Extensions=e.nonBinary.Script,e.nonBinary.gc=e.nonBinary.General_Category,e.nonBinary.sc=e.nonBinary.Script,e.nonBinary.scx=e.nonBinary.Script_Extensions}for(var Lt=0,Rt=[9,10,11,12,13,14];Lt<Rt.length;Lt+=1){Vt(Rt[Lt])}var Ot=z.prototype,Dt=function(t,e){this.parent=t,this.base=e||this};Dt.prototype.separatedFrom=function(t){for(var e=this;e;e=e.parent)for(var i=t;i;i=i.parent)if(e.base===i.base&&e!==i)return!0;return!1},Dt.prototype.sibling=function(){return new Dt(this.parent,this.base)};var Bt=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Nt[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};function Mt(t){return 105===t||109===t||115===t}function Ft(t){return 36===t||t>=40&&t<=43||46===t||63===t||t>=91&&t<=94||t>=123&&t<=125}function jt(t){return t>=65&&t<=90||t>=97&&t<=122}Bt.prototype.reset=function(t,e,i){var s=-1!==i.indexOf("v"),r=-1!==i.indexOf("u");this.start=0|t,this.source=e+"",this.flags=i,s&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=r&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=r&&this.parser.options.ecmaVersion>=9)},Bt.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)},Bt.prototype.at=function(t,e){void 0===e&&(e=!1);var i=this.source,s=i.length;if(t>=s)return-1;var r=i.charCodeAt(t);if(!e&&!this.switchU||r<=55295||r>=57344||t+1>=s)return r;var a=i.charCodeAt(t+1);return a>=56320&&a<=57343?(r<<10)+a-56613888:r},Bt.prototype.nextIndex=function(t,e){void 0===e&&(e=!1);var i=this.source,s=i.length;if(t>=s)return s;var r,a=i.charCodeAt(t);return!e&&!this.switchU||a<=55295||a>=57344||t+1>=s||(r=i.charCodeAt(t+1))<56320||r>57343?t+1:t+2},Bt.prototype.current=function(t){return void 0===t&&(t=!1),this.at(this.pos,t)},Bt.prototype.lookahead=function(t){return void 0===t&&(t=!1),this.at(this.nextIndex(this.pos,t),t)},Bt.prototype.advance=function(t){void 0===t&&(t=!1),this.pos=this.nextIndex(this.pos,t)},Bt.prototype.eat=function(t,e){return void 0===e&&(e=!1),this.current(e)===t&&(this.advance(e),!0)},Bt.prototype.eatChars=function(t,e){void 0===e&&(e=!1);for(var i=this.pos,s=0,r=t;s<r.length;s+=1){var a=r[s],n=this.at(i,e);if(-1===n||n!==a)return!1;i=this.nextIndex(i,e)}return this.pos=i,!0},Ot.validateRegExpFlags=function(t){for(var e=t.validFlags,i=t.flags,s=!1,r=!1,a=0;a<i.length;a++){var n=i.charAt(a);-1===e.indexOf(n)&&this.raise(t.start,"Invalid regular expression flag"),i.indexOf(n,a+1)>-1&&this.raise(t.start,"Duplicate regular expression flag"),"u"===n&&(s=!0),"v"===n&&(r=!0)}this.options.ecmaVersion>=15&&s&&r&&this.raise(t.start,"Invalid regular expression flag")},Ot.validateRegExpPattern=function(t){this.regexp_pattern(t),!t.switchN&&this.options.ecmaVersion>=9&&function(t){for(var e in t)return!0;return!1}(t.groupNames)&&(t.switchN=!0,this.regexp_pattern(t))},Ot.regexp_pattern=function(t){t.pos=0,t.lastIntValue=0,t.lastStringValue="",t.lastAssertionIsQuantifiable=!1,t.numCapturingParens=0,t.maxBackReference=0,t.groupNames=Object.create(null),t.backReferenceNames.length=0,t.branchID=null,this.regexp_disjunction(t),t.pos!==t.source.length&&(t.eat(41)&&t.raise("Unmatched ')'"),(t.eat(93)||t.eat(125))&&t.raise("Lone quantifier brackets")),t.maxBackReference>t.numCapturingParens&&t.raise("Invalid escape");for(var e=0,i=t.backReferenceNames;e<i.length;e+=1){var s=i[e];t.groupNames[s]||t.raise("Invalid named capture referenced")}},Ot.regexp_disjunction=function(t){var e=this.options.ecmaVersion>=16;for(e&&(t.branchID=new Dt(t.branchID,null)),this.regexp_alternative(t);t.eat(124);)e&&(t.branchID=t.branchID.sibling()),this.regexp_alternative(t);e&&(t.branchID=t.branchID.parent),this.regexp_eatQuantifier(t,!0)&&t.raise("Nothing to repeat"),t.eat(123)&&t.raise("Lone quantifier brackets")},Ot.regexp_alternative=function(t){for(;t.pos<t.source.length&&this.regexp_eatTerm(t););},Ot.regexp_eatTerm=function(t){return this.regexp_eatAssertion(t)?(t.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(t)&&t.switchU&&t.raise("Invalid quantifier"),!0):!!(t.switchU?this.regexp_eatAtom(t):this.regexp_eatExtendedAtom(t))&&(this.regexp_eatQuantifier(t),!0)},Ot.regexp_eatAssertion=function(t){var e=t.pos;if(t.lastAssertionIsQuantifiable=!1,t.eat(94)||t.eat(36))return!0;if(t.eat(92)){if(t.eat(66)||t.eat(98))return!0;t.pos=e}if(t.eat(40)&&t.eat(63)){var i=!1;if(this.options.ecmaVersion>=9&&(i=t.eat(60)),t.eat(61)||t.eat(33))return this.regexp_disjunction(t),t.eat(41)||t.raise("Unterminated group"),t.lastAssertionIsQuantifiable=!i,!0}return t.pos=e,!1},Ot.regexp_eatQuantifier=function(t,e){return void 0===e&&(e=!1),!!this.regexp_eatQuantifierPrefix(t,e)&&(t.eat(63),!0)},Ot.regexp_eatQuantifierPrefix=function(t,e){return t.eat(42)||t.eat(43)||t.eat(63)||this.regexp_eatBracedQuantifier(t,e)},Ot.regexp_eatBracedQuantifier=function(t,e){var i=t.pos;if(t.eat(123)){var s=0,r=-1;if(this.regexp_eatDecimalDigits(t)&&(s=t.lastIntValue,t.eat(44)&&this.regexp_eatDecimalDigits(t)&&(r=t.lastIntValue),t.eat(125)))return-1!==r&&r<s&&!e&&t.raise("numbers out of order in {} quantifier"),!0;t.switchU&&!e&&t.raise("Incomplete quantifier"),t.pos=i}return!1},Ot.regexp_eatAtom=function(t){return this.regexp_eatPatternCharacters(t)||t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)},Ot.regexp_eatReverseSolidusAtomEscape=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatAtomEscape(t))return!0;t.pos=e}return!1},Ot.regexp_eatUncapturingGroup=function(t){var e=t.pos;if(t.eat(40)){if(t.eat(63)){if(this.options.ecmaVersion>=16){var i=this.regexp_eatModifiers(t),s=t.eat(45);if(i||s){for(var r=0;r<i.length;r++){var a=i.charAt(r);i.indexOf(a,r+1)>-1&&t.raise("Duplicate regular expression modifiers")}if(s){var n=this.regexp_eatModifiers(t);i||n||58!==t.current()||t.raise("Invalid regular expression modifiers");for(var o=0;o<n.length;o++){var h=n.charAt(o);(n.indexOf(h,o+1)>-1||i.indexOf(h)>-1)&&t.raise("Duplicate regular expression modifiers")}}}}if(t.eat(58)){if(this.regexp_disjunction(t),t.eat(41))return!0;t.raise("Unterminated group")}}t.pos=e}return!1},Ot.regexp_eatCapturingGroup=function(t){if(t.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(t):63===t.current()&&t.raise("Invalid group"),this.regexp_disjunction(t),t.eat(41))return t.numCapturingParens+=1,!0;t.raise("Unterminated group")}return!1},Ot.regexp_eatModifiers=function(t){for(var e="",i=0;-1!==(i=t.current())&&Mt(i);)e+=O(i),t.advance();return e},Ot.regexp_eatExtendedAtom=function(t){return t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)||this.regexp_eatInvalidBracedQuantifier(t)||this.regexp_eatExtendedPatternCharacter(t)},Ot.regexp_eatInvalidBracedQuantifier=function(t){return this.regexp_eatBracedQuantifier(t,!0)&&t.raise("Nothing to repeat"),!1},Ot.regexp_eatSyntaxCharacter=function(t){var e=t.current();return!!Ft(e)&&(t.lastIntValue=e,t.advance(),!0)},Ot.regexp_eatPatternCharacters=function(t){for(var e=t.pos,i=0;-1!==(i=t.current())&&!Ft(i);)t.advance();return t.pos!==e},Ot.regexp_eatExtendedPatternCharacter=function(t){var e=t.current();return!(-1===e||36===e||e>=40&&e<=43||46===e||63===e||91===e||94===e||124===e)&&(t.advance(),!0)},Ot.regexp_groupSpecifier=function(t){if(t.eat(63)){this.regexp_eatGroupName(t)||t.raise("Invalid group");var e=this.options.ecmaVersion>=16,i=t.groupNames[t.lastStringValue];if(i)if(e)for(var s=0,r=i;s<r.length;s+=1){r[s].separatedFrom(t.branchID)||t.raise("Duplicate capture group name")}else t.raise("Duplicate capture group name");e?(i||(t.groupNames[t.lastStringValue]=[])).push(t.branchID):t.groupNames[t.lastStringValue]=!0}},Ot.regexp_eatGroupName=function(t){if(t.lastStringValue="",t.eat(60)){if(this.regexp_eatRegExpIdentifierName(t)&&t.eat(62))return!0;t.raise("Invalid capture group name")}return!1},Ot.regexp_eatRegExpIdentifierName=function(t){if(t.lastStringValue="",this.regexp_eatRegExpIdentifierStart(t)){for(t.lastStringValue+=O(t.lastIntValue);this.regexp_eatRegExpIdentifierPart(t);)t.lastStringValue+=O(t.lastIntValue);return!0}return!1},Ot.regexp_eatRegExpIdentifierStart=function(t){var e=t.pos,i=this.options.ecmaVersion>=11,s=t.current(i);return t.advance(i),92===s&&this.regexp_eatRegExpUnicodeEscapeSequence(t,i)&&(s=t.lastIntValue),function(t){return d(t,!0)||36===t||95===t}(s)?(t.lastIntValue=s,!0):(t.pos=e,!1)},Ot.regexp_eatRegExpIdentifierPart=function(t){var e=t.pos,i=this.options.ecmaVersion>=11,s=t.current(i);return t.advance(i),92===s&&this.regexp_eatRegExpUnicodeEscapeSequence(t,i)&&(s=t.lastIntValue),function(t){return f(t,!0)||36===t||95===t||8204===t||8205===t}(s)?(t.lastIntValue=s,!0):(t.pos=e,!1)},Ot.regexp_eatAtomEscape=function(t){return!!(this.regexp_eatBackReference(t)||this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)||t.switchN&&this.regexp_eatKGroupName(t))||(t.switchU&&(99===t.current()&&t.raise("Invalid unicode escape"),t.raise("Invalid escape")),!1)},Ot.regexp_eatBackReference=function(t){var e=t.pos;if(this.regexp_eatDecimalEscape(t)){var i=t.lastIntValue;if(t.switchU)return i>t.maxBackReference&&(t.maxBackReference=i),!0;if(i<=t.numCapturingParens)return!0;t.pos=e}return!1},Ot.regexp_eatKGroupName=function(t){if(t.eat(107)){if(this.regexp_eatGroupName(t))return t.backReferenceNames.push(t.lastStringValue),!0;t.raise("Invalid named reference")}return!1},Ot.regexp_eatCharacterEscape=function(t){return this.regexp_eatControlEscape(t)||this.regexp_eatCControlLetter(t)||this.regexp_eatZero(t)||this.regexp_eatHexEscapeSequence(t)||this.regexp_eatRegExpUnicodeEscapeSequence(t,!1)||!t.switchU&&this.regexp_eatLegacyOctalEscapeSequence(t)||this.regexp_eatIdentityEscape(t)},Ot.regexp_eatCControlLetter=function(t){var e=t.pos;if(t.eat(99)){if(this.regexp_eatControlLetter(t))return!0;t.pos=e}return!1},Ot.regexp_eatZero=function(t){return 48===t.current()&&!Gt(t.lookahead())&&(t.lastIntValue=0,t.advance(),!0)},Ot.regexp_eatControlEscape=function(t){var e=t.current();return 116===e?(t.lastIntValue=9,t.advance(),!0):110===e?(t.lastIntValue=10,t.advance(),!0):118===e?(t.lastIntValue=11,t.advance(),!0):102===e?(t.lastIntValue=12,t.advance(),!0):114===e&&(t.lastIntValue=13,t.advance(),!0)},Ot.regexp_eatControlLetter=function(t){var e=t.current();return!!jt(e)&&(t.lastIntValue=e%32,t.advance(),!0)},Ot.regexp_eatRegExpUnicodeEscapeSequence=function(t,e){void 0===e&&(e=!1);var i,s=t.pos,r=e||t.switchU;if(t.eat(117)){if(this.regexp_eatFixedHexDigits(t,4)){var a=t.lastIntValue;if(r&&a>=55296&&a<=56319){var n=t.pos;if(t.eat(92)&&t.eat(117)&&this.regexp_eatFixedHexDigits(t,4)){var o=t.lastIntValue;if(o>=56320&&o<=57343)return t.lastIntValue=1024*(a-55296)+(o-56320)+65536,!0}t.pos=n,t.lastIntValue=a}return!0}if(r&&t.eat(123)&&this.regexp_eatHexDigits(t)&&t.eat(125)&&((i=t.lastIntValue)>=0&&i<=1114111))return!0;r&&t.raise("Invalid unicode escape"),t.pos=s}return!1},Ot.regexp_eatIdentityEscape=function(t){if(t.switchU)return!!this.regexp_eatSyntaxCharacter(t)||!!t.eat(47)&&(t.lastIntValue=47,!0);var e=t.current();return!(99===e||t.switchN&&107===e)&&(t.lastIntValue=e,t.advance(),!0)},Ot.regexp_eatDecimalEscape=function(t){t.lastIntValue=0;var e=t.current();if(e>=49&&e<=57){do{t.lastIntValue=10*t.lastIntValue+(e-48),t.advance()}while((e=t.current())>=48&&e<=57);return!0}return!1};function Ut(t){return jt(t)||95===t}function qt(t){return Ut(t)||Gt(t)}function Gt(t){return t>=48&&t<=57}function Wt(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function Ht(t){return t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:t-48}function zt(t){return t>=48&&t<=55}Ot.regexp_eatCharacterClassEscape=function(t){var e=t.current();if(function(t){return 100===t||68===t||115===t||83===t||119===t||87===t}(e))return t.lastIntValue=-1,t.advance(),1;var i=!1;if(t.switchU&&this.options.ecmaVersion>=9&&((i=80===e)||112===e)){var s;if(t.lastIntValue=-1,t.advance(),t.eat(123)&&(s=this.regexp_eatUnicodePropertyValueExpression(t))&&t.eat(125))return i&&2===s&&t.raise("Invalid property name"),s;t.raise("Invalid property name")}return 0},Ot.regexp_eatUnicodePropertyValueExpression=function(t){var e=t.pos;if(this.regexp_eatUnicodePropertyName(t)&&t.eat(61)){var i=t.lastStringValue;if(this.regexp_eatUnicodePropertyValue(t)){var s=t.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(t,i,s),1}}if(t.pos=e,this.regexp_eatLoneUnicodePropertyNameOrValue(t)){var r=t.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(t,r)}return 0},Ot.regexp_validateUnicodePropertyNameAndValue=function(t,e,i){N(t.unicodeProperties.nonBinary,e)||t.raise("Invalid property name"),t.unicodeProperties.nonBinary[e].test(i)||t.raise("Invalid property value")},Ot.regexp_validateUnicodePropertyNameOrValue=function(t,e){return t.unicodeProperties.binary.test(e)?1:t.switchV&&t.unicodeProperties.binaryOfStrings.test(e)?2:void t.raise("Invalid property name")},Ot.regexp_eatUnicodePropertyName=function(t){var e=0;for(t.lastStringValue="";Ut(e=t.current());)t.lastStringValue+=O(e),t.advance();return""!==t.lastStringValue},Ot.regexp_eatUnicodePropertyValue=function(t){var e=0;for(t.lastStringValue="";qt(e=t.current());)t.lastStringValue+=O(e),t.advance();return""!==t.lastStringValue},Ot.regexp_eatLoneUnicodePropertyNameOrValue=function(t){return this.regexp_eatUnicodePropertyValue(t)},Ot.regexp_eatCharacterClass=function(t){if(t.eat(91)){var e=t.eat(94),i=this.regexp_classContents(t);return t.eat(93)||t.raise("Unterminated character class"),e&&2===i&&t.raise("Negated character class may contain strings"),!0}return!1},Ot.regexp_classContents=function(t){return 93===t.current()?1:t.switchV?this.regexp_classSetExpression(t):(this.regexp_nonEmptyClassRanges(t),1)},Ot.regexp_nonEmptyClassRanges=function(t){for(;this.regexp_eatClassAtom(t);){var e=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassAtom(t)){var i=t.lastIntValue;!t.switchU||-1!==e&&-1!==i||t.raise("Invalid character class"),-1!==e&&-1!==i&&e>i&&t.raise("Range out of order in character class")}}},Ot.regexp_eatClassAtom=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatClassEscape(t))return!0;if(t.switchU){var i=t.current();(99===i||zt(i))&&t.raise("Invalid class escape"),t.raise("Invalid escape")}t.pos=e}var s=t.current();return 93!==s&&(t.lastIntValue=s,t.advance(),!0)},Ot.regexp_eatClassEscape=function(t){var e=t.pos;if(t.eat(98))return t.lastIntValue=8,!0;if(t.switchU&&t.eat(45))return t.lastIntValue=45,!0;if(!t.switchU&&t.eat(99)){if(this.regexp_eatClassControlLetter(t))return!0;t.pos=e}return this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)},Ot.regexp_classSetExpression=function(t){var e,i=1;if(this.regexp_eatClassSetRange(t));else if(e=this.regexp_eatClassSetOperand(t)){2===e&&(i=2);for(var s=t.pos;t.eatChars([38,38]);)38!==t.current()&&(e=this.regexp_eatClassSetOperand(t))?2!==e&&(i=1):t.raise("Invalid character in character class");if(s!==t.pos)return i;for(;t.eatChars([45,45]);)this.regexp_eatClassSetOperand(t)||t.raise("Invalid character in character class");if(s!==t.pos)return i}else t.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(t)){if(!(e=this.regexp_eatClassSetOperand(t)))return i;2===e&&(i=2)}},Ot.regexp_eatClassSetRange=function(t){var e=t.pos;if(this.regexp_eatClassSetCharacter(t)){var i=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassSetCharacter(t)){var s=t.lastIntValue;return-1!==i&&-1!==s&&i>s&&t.raise("Range out of order in character class"),!0}t.pos=e}return!1},Ot.regexp_eatClassSetOperand=function(t){return this.regexp_eatClassSetCharacter(t)?1:this.regexp_eatClassStringDisjunction(t)||this.regexp_eatNestedClass(t)},Ot.regexp_eatNestedClass=function(t){var e=t.pos;if(t.eat(91)){var i=t.eat(94),s=this.regexp_classContents(t);if(t.eat(93))return i&&2===s&&t.raise("Negated character class may contain strings"),s;t.pos=e}if(t.eat(92)){var r=this.regexp_eatCharacterClassEscape(t);if(r)return r;t.pos=e}return null},Ot.regexp_eatClassStringDisjunction=function(t){var e=t.pos;if(t.eatChars([92,113])){if(t.eat(123)){var i=this.regexp_classStringDisjunctionContents(t);if(t.eat(125))return i}else t.raise("Invalid escape");t.pos=e}return null},Ot.regexp_classStringDisjunctionContents=function(t){for(var e=this.regexp_classString(t);t.eat(124);)2===this.regexp_classString(t)&&(e=2);return e},Ot.regexp_classString=function(t){for(var e=0;this.regexp_eatClassSetCharacter(t);)e++;return 1===e?1:2},Ot.regexp_eatClassSetCharacter=function(t){var e=t.pos;if(t.eat(92))return!(!this.regexp_eatCharacterEscape(t)&&!this.regexp_eatClassSetReservedPunctuator(t))||(t.eat(98)?(t.lastIntValue=8,!0):(t.pos=e,!1));var i=t.current();return!(i<0||i===t.lookahead()&&function(t){return 33===t||t>=35&&t<=38||t>=42&&t<=44||46===t||t>=58&&t<=64||94===t||96===t||126===t}(i))&&(!function(t){return 40===t||41===t||45===t||47===t||t>=91&&t<=93||t>=123&&t<=125}(i)&&(t.advance(),t.lastIntValue=i,!0))},Ot.regexp_eatClassSetReservedPunctuator=function(t){var e=t.current();return!!function(t){return 33===t||35===t||37===t||38===t||44===t||45===t||t>=58&&t<=62||64===t||96===t||126===t}(e)&&(t.lastIntValue=e,t.advance(),!0)},Ot.regexp_eatClassControlLetter=function(t){var e=t.current();return!(!Gt(e)&&95!==e)&&(t.lastIntValue=e%32,t.advance(),!0)},Ot.regexp_eatHexEscapeSequence=function(t){var e=t.pos;if(t.eat(120)){if(this.regexp_eatFixedHexDigits(t,2))return!0;t.switchU&&t.raise("Invalid escape"),t.pos=e}return!1},Ot.regexp_eatDecimalDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;Gt(i=t.current());)t.lastIntValue=10*t.lastIntValue+(i-48),t.advance();return t.pos!==e},Ot.regexp_eatHexDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;Wt(i=t.current());)t.lastIntValue=16*t.lastIntValue+Ht(i),t.advance();return t.pos!==e},Ot.regexp_eatLegacyOctalEscapeSequence=function(t){if(this.regexp_eatOctalDigit(t)){var e=t.lastIntValue;if(this.regexp_eatOctalDigit(t)){var i=t.lastIntValue;e<=3&&this.regexp_eatOctalDigit(t)?t.lastIntValue=64*e+8*i+t.lastIntValue:t.lastIntValue=8*e+i}else t.lastIntValue=e;return!0}return!1},Ot.regexp_eatOctalDigit=function(t){var e=t.current();return zt(e)?(t.lastIntValue=e-48,t.advance(),!0):(t.lastIntValue=0,!1)},Ot.regexp_eatFixedHexDigits=function(t,e){var i=t.pos;t.lastIntValue=0;for(var s=0;s<e;++s){var r=t.current();if(!Wt(r))return t.pos=i,!1;t.lastIntValue=16*t.lastIntValue+Ht(r),t.advance()}return!0};var Xt=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new M(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},Kt=z.prototype;function Qt(t){return"function"!=typeof BigInt?null:BigInt(t.replace(/_/g,""))}Kt.next=function(t){!t&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Xt(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Kt.getToken=function(){return this.next(),new Xt(this)},"undefined"!=typeof Symbol&&(Kt[Symbol.iterator]=function(){var t=this;return{next:function(){var e=t.getToken();return{done:e.type===_.eof,value:e}}}}),Kt.nextToken=function(){var t=this.curContext();return t&&t.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(_.eof):t.override?t.override(this):void this.readToken(this.fullCharCodeAtPos())},Kt.readToken=function(t){return d(t,this.options.ecmaVersion>=6)||92===t?this.readWord():this.getTokenFromCode(t)},Kt.fullCharCodeAt=function(t){var e=this.input.charCodeAt(t);if(e<=55295||e>=56320)return e;var i=this.input.charCodeAt(t+1);return i<=56319||i>=57344?e:(e<<10)+i-56613888},Kt.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},Kt.skipBlockComment=function(){var t=this.options.onComment&&this.curPosition(),e=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(-1===i&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(var s=void 0,r=e;(s=w(this.input,r,this.pos))>-1;)++this.curLine,r=this.lineStart=s;this.options.onComment&&this.options.onComment(!0,this.input.slice(e+2,i),e,this.pos,t,this.curPosition())},Kt.skipLineComment=function(t){for(var e=this.pos,i=this.options.onComment&&this.curPosition(),s=this.input.charCodeAt(this.pos+=t);this.pos<this.input.length&&!C(s);)s=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(e+t,this.pos),e,this.pos,i,this.curPosition())},Kt.skipSpace=function(){t:for(;this.pos<this.input.length;){var t=this.input.charCodeAt(this.pos);switch(t){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(!(t>8&&t<14||t>=5760&&E.test(String.fromCharCode(t))))break t;++this.pos}}},Kt.finishToken=function(t,e){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var i=this.type;this.type=t,this.value=e,this.updateContext(i)},Kt.readToken_dot=function(){var t=this.input.charCodeAt(this.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===t&&46===e?(this.pos+=3,this.finishToken(_.ellipsis)):(++this.pos,this.finishToken(_.dot))},Kt.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===t?this.finishOp(_.assign,2):this.finishOp(_.slash,1)},Kt.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),i=1,s=42===t?_.star:_.modulo;return this.options.ecmaVersion>=7&&42===t&&42===e&&(++i,s=_.starstar,e=this.input.charCodeAt(this.pos+2)),61===e?this.finishOp(_.assign,i+1):this.finishOp(s,i)},Kt.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);if(e===t){if(this.options.ecmaVersion>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(_.assign,3);return this.finishOp(124===t?_.logicalOR:_.logicalAND,2)}return 61===e?this.finishOp(_.assign,2):this.finishOp(124===t?_.bitwiseOR:_.bitwiseAND,1)},Kt.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(_.assign,2):this.finishOp(_.bitwiseXOR,1)},Kt.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?45!==e||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!k.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(_.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===e?this.finishOp(_.assign,2):this.finishOp(_.plusMin,1)},Kt.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),i=1;return e===t?(i=62===t&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+i)?this.finishOp(_.assign,i+1):this.finishOp(_.bitShift,i)):33!==e||60!==t||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===e&&(i=2),this.finishOp(_.relational,i)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Kt.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return 61===e?this.finishOp(_.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===t&&62===e&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(_.arrow)):this.finishOp(61===t?_.eq:_.prefix,1)},Kt.readToken_question=function(){var t=this.options.ecmaVersion;if(t>=11){var e=this.input.charCodeAt(this.pos+1);if(46===e){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57)return this.finishOp(_.questionDot,2)}if(63===e){if(t>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(_.assign,3);return this.finishOp(_.coalesce,2)}}return this.finishOp(_.question,1)},Kt.readToken_numberSign=function(){var t=35;if(this.options.ecmaVersion>=13&&(++this.pos,d(t=this.fullCharCodeAtPos(),!0)||92===t))return this.finishToken(_.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+O(t)+"'")},Kt.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(_.parenL);case 41:return++this.pos,this.finishToken(_.parenR);case 59:return++this.pos,this.finishToken(_.semi);case 44:return++this.pos,this.finishToken(_.comma);case 91:return++this.pos,this.finishToken(_.bracketL);case 93:return++this.pos,this.finishToken(_.bracketR);case 123:return++this.pos,this.finishToken(_.braceL);case 125:return++this.pos,this.finishToken(_.braceR);case 58:return++this.pos,this.finishToken(_.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(_.backQuote);case 48:var e=this.input.charCodeAt(this.pos+1);if(120===e||88===e)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===e||79===e)return this.readRadixNumber(8);if(98===e||66===e)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 63:return this.readToken_question();case 126:return this.finishOp(_.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+O(t)+"'")},Kt.finishOp=function(t,e){var i=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,i)},Kt.readRegexp=function(){for(var t,e,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var s=this.input.charAt(this.pos);if(k.test(s)&&this.raise(i,"Unterminated regular expression"),t)t=!1;else{if("["===s)e=!0;else if("]"===s&&e)e=!1;else if("/"===s&&!e)break;t="\\"===s}++this.pos}var r=this.input.slice(i,this.pos);++this.pos;var a=this.pos,n=this.readWord1();this.containsEsc&&this.unexpected(a);var o=this.regexpState||(this.regexpState=new Bt(this));o.reset(i,r,n),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var h=null;try{h=new RegExp(r,n)}catch(t){}return this.finishToken(_.regexp,{pattern:r,flags:n,value:h})},Kt.readInt=function(t,e,i){for(var s=this.options.ecmaVersion>=12&&void 0===e,r=i&&48===this.input.charCodeAt(this.pos),a=this.pos,n=0,o=0,h=0,p=null==e?1/0:e;h<p;++h,++this.pos){var c=this.input.charCodeAt(this.pos),l=void 0;if(s&&95===c)r&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===o&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===h&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),o=c;else{if((l=c>=97?c-97+10:c>=65?c-65+10:c>=48&&c<=57?c-48:1/0)>=t)break;o=c,n=n*t+l}}return s&&95===o&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===a||null!=e&&this.pos-a!==e?null:n},Kt.readRadixNumber=function(t){var e=this.pos;this.pos+=2;var i=this.readInt(t);return null==i&&this.raise(this.start+2,"Expected number in radix "+t),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(i=Qt(this.input.slice(e,this.pos)),++this.pos):d(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(_.num,i)},Kt.readNumber=function(t){var e=this.pos;t||null!==this.readInt(10,void 0,!0)||this.raise(e,"Invalid number");var i=this.pos-e>=2&&48===this.input.charCodeAt(e);i&&this.strict&&this.raise(e,"Invalid number");var s=this.input.charCodeAt(this.pos);if(!i&&!t&&this.options.ecmaVersion>=11&&110===s){var r=Qt(this.input.slice(e,this.pos));return++this.pos,d(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(_.num,r)}i&&/[89]/.test(this.input.slice(e,this.pos))&&(i=!1),46!==s||i||(++this.pos,this.readInt(10),s=this.input.charCodeAt(this.pos)),69!==s&&101!==s||i||(43!==(s=this.input.charCodeAt(++this.pos))&&45!==s||++this.pos,null===this.readInt(10)&&this.raise(e,"Invalid number")),d(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a,n=(a=this.input.slice(e,this.pos),i?parseInt(a,8):parseFloat(a.replace(/_/g,"")));return this.finishToken(_.num,n)},Kt.readCodePoint=function(){var t;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var e=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(e,"Code point out of bounds")}else t=this.readHexChar(4);return t},Kt.readString=function(t){for(var e="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var s=this.input.charCodeAt(this.pos);if(s===t)break;92===s?(e+=this.input.slice(i,this.pos),e+=this.readEscapedChar(!1),i=this.pos):8232===s||8233===s?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(C(s)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return e+=this.input.slice(i,this.pos++),this.finishToken(_.string,e)};var Jt={};Kt.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t!==Jt)throw t;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Kt.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Jt;this.raise(t,e)},Kt.readTmplToken=function(){for(var t="",e=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var i=this.input.charCodeAt(this.pos);if(96===i||36===i&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==_.template&&this.type!==_.invalidTemplate?(t+=this.input.slice(e,this.pos),this.finishToken(_.template,t)):36===i?(this.pos+=2,this.finishToken(_.dollarBraceL)):(++this.pos,this.finishToken(_.backQuote));if(92===i)t+=this.input.slice(e,this.pos),t+=this.readEscapedChar(!0),e=this.pos;else if(C(i)){switch(t+=this.input.slice(e,this.pos),++this.pos,i){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(i)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),e=this.pos}else++this.pos}},Kt.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(_.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":"\n"===this.input[this.pos+1]&&++this.pos;case"\n":case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,"Unterminated template")},Kt.readEscapedChar=function(t){var e=this.input.charCodeAt(++this.pos);switch(++this.pos,e){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return O(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),t){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(e>=48&&e<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);return r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.pos+=s.length-1,e=this.input.charCodeAt(this.pos),"0"===s&&56!==e&&57!==e||!this.strict&&!t||this.invalidStringToken(this.pos-1-s.length,t?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return C(e)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(e)}},Kt.readHexChar=function(t){var e=this.pos,i=this.readInt(16,t);return null===i&&this.invalidStringToken(e,"Bad character escape sequence"),i},Kt.readWord1=function(){this.containsEsc=!1;for(var t="",e=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var r=this.fullCharCodeAtPos();if(f(r,s))this.pos+=r<=65535?1:2;else{if(92!==r)break;this.containsEsc=!0,t+=this.input.slice(i,this.pos);var a=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var n=this.readCodePoint();(e?d:f)(n,s)||this.invalidStringToken(a,"Invalid Unicode escape"),t+=O(n),i=this.pos}e=!1}return t+this.input.slice(i,this.pos)},Kt.readWord=function(){var t=this.readWord1(),e=_.name;return this.keywords.test(t)&&(e=y[t]),this.finishToken(e,t)};z.acorn={Parser:z,version:"8.16.0",defaultOptions:j,Position:B,SourceLocation:M,getLineInfo:F,Node:gt,TokenType:m,tokTypes:_,keywordTypes:y,TokContext:nt,tokContexts:ot,isIdentifierChar:f,isIdentifierStart:d,Token:Xt,isNewLine:C,lineBreak:k,lineBreakG:S,nonASCIIwhitespace:E};var Yt=i(214);const Zt="Boolean",$t="Identifier",te="PrivateIdentifier",ee="Keyword",ie="Null",se="Numeric",re="Punctuator",ae="String",ne="RegularExpression",oe="Template",he="JSXIdentifier",pe="JSXText";function ce(t,e){this._acornTokTypes=t,this._tokens=[],this._curlyBrace=null,this._code=e}ce.prototype={constructor:ce,translate(t,e){const i=t.type,s=this._acornTokTypes;if(i===s.name)t.type=$t,"static"===t.value&&(t.type=ee),e.ecmaVersion>5&&("yield"===t.value||"let"===t.value)&&(t.type=ee);else if(i===s.privateId)t.type=te;else if(i===s.semi||i===s.comma||i===s.parenL||i===s.parenR||i===s.braceL||i===s.braceR||i===s.dot||i===s.bracketL||i===s.colon||i===s.question||i===s.bracketR||i===s.ellipsis||i===s.arrow||i===s.jsxTagStart||i===s.incDec||i===s.starstar||i===s.jsxTagEnd||i===s.prefix||i===s.questionDot||i.binop&&!i.keyword||i.isAssign)t.type=re,t.value=this._code.slice(t.start,t.end);else if(i===s.jsxName)t.type=he;else if("jsxText"===i.label||i===s.jsxAttrValueToken)t.type=pe;else if(i.keyword)"true"===i.keyword||"false"===i.keyword?t.type=Zt:"null"===i.keyword?t.type=ie:t.type=ee;else if(i===s.num)t.type=se,t.value=this._code.slice(t.start,t.end);else if(i===s.string)e.jsxAttrValueToken?(e.jsxAttrValueToken=!1,t.type=pe):t.type=ae,t.value=this._code.slice(t.start,t.end);else if(i===s.regexp){t.type=ne;const e=t.value;t.regex={flags:e.flags,pattern:e.pattern},t.value=`/${e.pattern}/${e.flags}`}return t},onToken(t,e){const i=this._acornTokTypes,s=e.tokens,r=this._tokens,a=()=>{s.push(function(t,e){const i=t[0],s=t[t.length-1],r={type:oe,value:e.slice(i.start,s.end)};return i.loc&&(r.loc={start:i.loc.start,end:s.loc.end}),i.range&&(r.start=i.range[0],r.end=s.range[1],r.range=[r.start,r.end]),r}(this._tokens,this._code)),this._tokens=[]};if(t.type!==i.eof){if(t.type===i.backQuote)return this._curlyBrace&&(s.push(this.translate(this._curlyBrace,e)),this._curlyBrace=null),r.push(t),void(r.length>1&&a());if(t.type===i.dollarBraceL)return r.push(t),void a();if(t.type===i.braceR)return this._curlyBrace&&s.push(this.translate(this._curlyBrace,e)),void(this._curlyBrace=t);if(t.type===i.template||t.type===i.invalidTemplate)return this._curlyBrace&&(r.push(this._curlyBrace),this._curlyBrace=null),void r.push(t);this._curlyBrace&&(s.push(this.translate(this._curlyBrace,e)),this._curlyBrace=null),s.push(this.translate(t,e))}else this._curlyBrace&&s.push(this.translate(this._curlyBrace,e))}};const le=ce,ue=[3,5,6,7,8,9,10,11,12,13,14,15];function de(){return ue[ue.length-1]}function fe(t){const e=function(t=5){let e="latest"===t?de():t;if("number"!=typeof e)throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof t} instead.`);if(e>=2015&&(e-=2009),!ue.includes(e))throw new Error("Invalid ecmaVersion.");return e}(t.ecmaVersion),i=function(t="script"){if("script"===t||"module"===t)return t;if("commonjs"===t)return"script";throw new Error("Invalid sourceType.")}(t.sourceType),s=!0===t.range,r=!0===t.loc;if(3!==e&&t.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(void 0!==t.allowReserved&&"boolean"!=typeof t.allowReserved)throw new Error("`allowReserved`, when present, must be `true` or `false`");const a=3===e&&(t.allowReserved||"never"),n=t.ecmaFeatures||{},o="commonjs"===t.sourceType||Boolean(n.globalReturn);if("module"===i&&e<6)throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},t,{ecmaVersion:e,sourceType:i,ranges:s,locations:r,allowReserved:a,allowReturnOutsideFunction:o})}const me=Symbol("espree's internal state"),ge=Symbol("espree's esprimaFinishNode");const xe=()=>t=>{const e=Object.assign({},t.acorn.tokTypes);return t.acornJsx&&Object.assign(e,t.acornJsx.tokTypes),class extends t{constructor(t,i){"object"==typeof t&&null!==t||(t={}),"string"==typeof i||i instanceof String||(i=String(i));const s=t.sourceType,r=fe(t),a=r.ecmaFeatures||{},n=!0===r.tokens?new le(e,i):null,o={originalSourceType:s||r.sourceType,tokens:n?[]:null,comments:!0===r.comment?[]:null,impliedStrict:!0===a.impliedStrict&&r.ecmaVersion>=5,ecmaVersion:r.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:r.ecmaVersion,sourceType:r.sourceType,ranges:r.ranges,locations:r.locations,allowReserved:r.allowReserved,allowReturnOutsideFunction:r.allowReturnOutsideFunction,onToken(t){n&&n.onToken(t,o),t.type!==e.eof&&(o.lastToken=t)},onComment(t,e,s,r,a,n){if(o.comments){const h=function(t,e,i,s,r,a,n){let o;o=t?"Block":"#!"===n.slice(i,i+2)?"Hashbang":"Line";const h={type:o,value:e};return"number"==typeof i&&(h.start=i,h.end=s,h.range=[i,s]),"object"==typeof r&&(h.loc={start:r,end:a}),h}(t,e,s,r,a,n,i);o.comments.push(h)}}},i),this[me]=o}tokenize(){do{this.next()}while(this.type!==e.eof);this.next();const t=this[me],i=t.tokens;return t.comments&&(i.comments=t.comments),i}finishNode(...t){const e=super.finishNode(...t);return this[ge](e)}finishNodeAt(...t){const e=super.finishNodeAt(...t);return this[ge](e)}parse(){const t=this[me],e=super.parse();if(e.sourceType=t.originalSourceType,t.comments&&(e.comments=t.comments),t.tokens&&(e.tokens=t.tokens),e.body.length){const[t]=e.body;e.range&&(e.range[0]=t.range[0]),e.loc&&(e.loc.start=t.loc.start),e.start=t.start}return t.lastToken&&(e.range&&(e.range[1]=t.lastToken.range[1]),e.loc&&(e.loc.end=t.lastToken.loc.end),e.end=t.lastToken.end),this[me].templateElements.forEach((t=>{const e=t.tail?1:2;t.start+=-1,t.end+=e,t.range&&(t.range[0]+=-1,t.range[1]+=e),t.loc&&(t.loc.start.column+=-1,t.loc.end.column+=e)})),e}parseTopLevel(t){return this[me].impliedStrict&&(this.strict=!0),super.parseTopLevel(t)}raise(e,i){const s=t.acorn.getLineInfo(this.input,e),r=new SyntaxError(i);throw r.index=e,r.lineNumber=s.line,r.column=s.column+1,r}raiseRecoverable(t,e){this.raise(t,e)}unexpected(t){let e="Unexpected token";if(null!=t){if(this.pos=t,this.options.locations)for(;this.pos<this.lineStart;)this.lineStart=this.input.lastIndexOf("\n",this.lineStart-2)+1,--this.curLine;this.nextToken()}this.end>this.start&&(e+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,e)}jsx_readString(t){const i=super.jsx_readString(t);return this.type===e.string&&(this[me].jsxAttrValueToken=!0),i}[ge](t){return"TemplateElement"===t.type&&this[me].templateElements.push(t),t.type.includes("Function")&&!t.generator&&(t.generator=!1),t}}},ve={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ExportAllDeclaration:["exported","source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportExpression:["source"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},ye=Object.keys(ve);for(const t of ye)Object.freeze(ve[t]);Object.freeze(ve);const be=ve;new Set(["parent","leadingComments","trailingComments"]);const _e={_regular:null,_jsx:null,get regular(){return null===this._regular&&(this._regular=z.extend(xe())),this._regular},get jsx(){return null===this._jsx&&(this._jsx=z.extend(Yt(),xe())),this._jsx},get(t){return Boolean(t&&t.ecmaFeatures&&t.ecmaFeatures.jsx)?this.jsx:this.regular}};function ke(t,e){const i=_e.get(e);return e&&!0===e.tokens||(e=Object.assign({},e,{tokens:!0})),new i(e,t).tokenize()}function Se(t,e){return new(_e.get(e))(e,t).parse()}const Ce="9.6.1",we="espree",Ee=be,Ae=function(){let t,e={};for(t in"function"==typeof Object.create&&(e=Object.create(null)),Ee)Object.hasOwnProperty.call(Ee,t)&&(e[t]=t);return"function"==typeof Object.freeze&&Object.freeze(e),e}(),Ie=de(),Pe=[...ue];export{Ae as Syntax,Ee as VisitorKeys,Ie as latestEcmaVersion,we as name,Se as parse,Pe as supportedEcmaVersions,ke as tokenize,Ce as version};                                                                                                                                                                                                                                                                                                                       colorpicker.js                                                                                      0000644                 00000070633 15212563754 0007441 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       // ===================================================================
// Author: Matt Kruse <matt@mattkruse.com>
// WWW: http://www.mattkruse.com/
//
// NOTICE: You may use this code for any purpose, commercial or
// private, without any further permission from the author. You may
// remove this notice from your final code if you wish, however it is
// appreciated by the author if at least my web site address is kept.
//
// You may *NOT* re-distribute this code in any way except through its
// use. That means, you can include it in your product, or your web
// site, or any other form where the code is actually being used. You
// may not put the plain javascript up on your site for download or
// include it in your javascript libraries for download.
// If you wish to share this code with others, please just point them
// to the URL instead.
// Please DO NOT link directly to my .js files from your site. Copy
// the files to your server and use them there. Thank you.
// ===================================================================


/* SOURCE FILE: AnchorPosition.js */

/*
AnchorPosition.js
Author: Matt Kruse
Last modified: 10/11/02

DESCRIPTION: These functions find the position of an <A> tag in a document,
so other elements can be positioned relative to it.

COMPATABILITY: Netscape 4.x,6.x,Mozilla, IE 5.x,6.x on Windows. Some small
positioning errors - usually with Window positioning - occur on the
Macintosh platform.

FUNCTIONS:
getAnchorPosition(anchorname)
  Returns an Object() having .x and .y properties of the pixel coordinates
  of the upper-left corner of the anchor. Position is relative to the PAGE.

getAnchorWindowPosition(anchorname)
  Returns an Object() having .x and .y properties of the pixel coordinates
  of the upper-left corner of the anchor, relative to the WHOLE SCREEN.

NOTES:

1) For popping up separate browser windows, use getAnchorWindowPosition.
   Otherwise, use getAnchorPosition

2) Your anchor tag MUST contain both NAME and ID attributes which are the
   same. For example:
   <A NAME="test" ID="test"> </A>

3) There must be at least a space between <A> </A> for IE5.5 to see the
   anchor tag correctly. Do not do <A></A> with no space.
*/

// getAnchorPosition(anchorname)
//   This function returns an object having .x and .y properties which are the coordinates
//   of the named anchor, relative to the page.
function getAnchorPosition(anchorname) {
	// This function will return an Object with x and y properties
	var useWindow=false;
	var coordinates=new Object();
	var x=0,y=0;
	// Browser capability sniffing
	var use_gebi=false, use_css=false, use_layers=false;
	if (document.getElementById) { use_gebi=true; }
	else if (document.all) { use_css=true; }
	else if (document.layers) { use_layers=true; }
	// Logic to find position
 	if (use_gebi && document.all) {
		x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_gebi) {
		var o=document.getElementById(anchorname);
		x=AnchorPosition_getPageOffsetLeft(o);
		y=AnchorPosition_getPageOffsetTop(o);
		}
 	else if (use_css) {
		x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_layers) {
		var found=0;
		for (var i=0; i<document.anchors.length; i++) {
			if (document.anchors[i].name==anchorname) { found=1; break; }
			}
		if (found==0) {
			coordinates.x=0; coordinates.y=0; return coordinates;
			}
		x=document.anchors[i].x;
		y=document.anchors[i].y;
		}
	else {
		coordinates.x=0; coordinates.y=0; return coordinates;
		}
	coordinates.x=x;
	coordinates.y=y;
	return coordinates;
	}

// getAnchorWindowPosition(anchorname)
//   This function returns an object having .x and .y properties which are the coordinates
//   of the named anchor, relative to the window
function getAnchorWindowPosition(anchorname) {
	var coordinates=getAnchorPosition(anchorname);
	var x=0;
	var y=0;
	if (document.getElementById) {
		if (isNaN(window.screenX)) {
			x=coordinates.x-document.body.scrollLeft+window.screenLeft;
			y=coordinates.y-document.body.scrollTop+window.screenTop;
			}
		else {
			x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
			y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
			}
		}
	else if (document.all) {
		x=coordinates.x-document.body.scrollLeft+window.screenLeft;
		y=coordinates.y-document.body.scrollTop+window.screenTop;
		}
	else if (document.layers) {
		x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
		y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
		}
	coordinates.x=x;
	coordinates.y=y;
	return coordinates;
	}

// Functions for IE to get position of an object
function AnchorPosition_getPageOffsetLeft (el) {
	var ol=el.offsetLeft;
	while ((el=el.offsetParent) != null) { ol += el.offsetLeft; }
	return ol;
	}
function AnchorPosition_getWindowOffsetLeft (el) {
	return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;
	}
function AnchorPosition_getPageOffsetTop (el) {
	var ot=el.offsetTop;
	while((el=el.offsetParent) != null) { ot += el.offsetTop; }
	return ot;
	}
function AnchorPosition_getWindowOffsetTop (el) {
	return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;
	}

/* SOURCE FILE: PopupWindow.js */

/*
PopupWindow.js
Author: Matt Kruse
Last modified: 02/16/04

DESCRIPTION: This object allows you to easily and quickly popup a window
in a certain place. The window can either be a DIV or a separate browser
window.

COMPATABILITY: Works with Netscape 4.x, 6.x, IE 5.x on Windows. Some small
positioning errors - usually with Window positioning - occur on the
Macintosh platform. Due to bugs in Netscape 4.x, populating the popup
window with <STYLE> tags may cause errors.

USAGE:
// Create an object for a WINDOW popup
var win = new PopupWindow();

// Create an object for a DIV window using the DIV named 'mydiv'
var win = new PopupWindow('mydiv');

// Set the window to automatically hide itself when the user clicks
// anywhere else on the page except the popup
win.autoHide();

// Show the window relative to the anchor name passed in
win.showPopup(anchorname);

// Hide the popup
win.hidePopup();

// Set the size of the popup window (only applies to WINDOW popups
win.setSize(width,height);

// Populate the contents of the popup window that will be shown. If you
// change the contents while it is displayed, you will need to refresh()
win.populate(string);

// set the URL of the window, rather than populating its contents
// manually
win.setUrl("http://www.site.com/");

// Refresh the contents of the popup
win.refresh();

// Specify how many pixels to the right of the anchor the popup will appear
win.offsetX = 50;

// Specify how many pixels below the anchor the popup will appear
win.offsetY = 100;

NOTES:
1) Requires the functions in AnchorPosition.js

2) Your anchor tag MUST contain both NAME and ID attributes which are the
   same. For example:
   <A NAME="test" ID="test"> </A>

3) There must be at least a space between <A> </A> for IE5.5 to see the
   anchor tag correctly. Do not do <A></A> with no space.

4) When a PopupWindow object is created, a handler for 'onmouseup' is
   attached to any event handler you may have already defined. Do NOT define
   an event handler for 'onmouseup' after you define a PopupWindow object or
   the autoHide() will not work correctly.
*/

// Set the position of the popup window based on the anchor
function PopupWindow_getXYPosition(anchorname) {
	var coordinates;
	if (this.type == "WINDOW") {
		coordinates = getAnchorWindowPosition(anchorname);
		}
	else {
		coordinates = getAnchorPosition(anchorname);
		}
	this.x = coordinates.x;
	this.y = coordinates.y;
	}
// Set width/height of DIV/popup window
function PopupWindow_setSize(width,height) {
	this.width = width;
	this.height = height;
	}
// Fill the window with contents
function PopupWindow_populate(contents) {
	this.contents = contents;
	this.populated = false;
	}
// Set the URL to go to
function PopupWindow_setUrl(url) {
	this.url = url;
	}
// Set the window popup properties
function PopupWindow_setWindowProperties(props) {
	this.windowProperties = props;
	}
// Refresh the displayed contents of the popup
function PopupWindow_refresh() {
	if (this.divName != null) {
		// refresh the DIV object
		if (this.use_gebi) {
			document.getElementById(this.divName).innerHTML = this.contents;
			}
		else if (this.use_css) {
			document.all[this.divName].innerHTML = this.contents;
			}
		else if (this.use_layers) {
			var d = document.layers[this.divName];
			d.document.open();
			d.document.writeln(this.contents);
			d.document.close();
			}
		}
	else {
		if (this.popupWindow != null && !this.popupWindow.closed) {
			if (this.url!="") {
				this.popupWindow.location.href=this.url;
				}
			else {
				this.popupWindow.document.open();
				this.popupWindow.document.writeln(this.contents);
				this.popupWindow.document.close();
			}
			this.popupWindow.focus();
			}
		}
	}
// Position and show the popup, relative to an anchor object
function PopupWindow_showPopup(anchorname) {
	this.getXYPosition(anchorname);
	this.x += this.offsetX;
	this.y += this.offsetY;
	if (!this.populated && (this.contents != "")) {
		this.populated = true;
		this.refresh();
		}
	if (this.divName != null) {
		// Show the DIV object
		if (this.use_gebi) {
			document.getElementById(this.divName).style.left = this.x + "px";
			document.getElementById(this.divName).style.top = this.y;
			document.getElementById(this.divName).style.visibility = "visible";
			}
		else if (this.use_css) {
			document.all[this.divName].style.left = this.x;
			document.all[this.divName].style.top = this.y;
			document.all[this.divName].style.visibility = "visible";
			}
		else if (this.use_layers) {
			document.layers[this.divName].left = this.x;
			document.layers[this.divName].top = this.y;
			document.layers[this.divName].visibility = "visible";
			}
		}
	else {
		if (this.popupWindow == null || this.popupWindow.closed) {
			// If the popup window will go off-screen, move it so it doesn't
			if (this.x<0) { this.x=0; }
			if (this.y<0) { this.y=0; }
			if (screen && screen.availHeight) {
				if ((this.y + this.height) > screen.availHeight) {
					this.y = screen.availHeight - this.height;
					}
				}
			if (screen && screen.availWidth) {
				if ((this.x + this.width) > screen.availWidth) {
					this.x = screen.availWidth - this.width;
					}
				}
			var avoidAboutBlank = window.opera || ( document.layers && !navigator.mimeTypes['*'] ) || navigator.vendor == 'KDE' || ( document.childNodes && !document.all && !navigator.taintEnabled );
			this.popupWindow = window.open(avoidAboutBlank?"":"about:blank","window_"+anchorname,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+"");
			}
		this.refresh();
		}
	}
// Hide the popup
function PopupWindow_hidePopup() {
	if (this.divName != null) {
		if (this.use_gebi) {
			document.getElementById(this.divName).style.visibility = "hidden";
			}
		else if (this.use_css) {
			document.all[this.divName].style.visibility = "hidden";
			}
		else if (this.use_layers) {
			document.layers[this.divName].visibility = "hidden";
			}
		}
	else {
		if (this.popupWindow && !this.popupWindow.closed) {
			this.popupWindow.close();
			this.popupWindow = null;
			}
		}
	}
// Pass an event and return whether or not it was the popup DIV that was clicked
function PopupWindow_isClicked(e) {
	if (this.divName != null) {
		if (this.use_layers) {
			var clickX = e.pageX;
			var clickY = e.pageY;
			var t = document.layers[this.divName];
			if ((clickX > t.left) && (clickX < t.left+t.clip.width) && (clickY > t.top) && (clickY < t.top+t.clip.height)) {
				return true;
				}
			else { return false; }
			}
		else if (document.all) { // Need to hard-code this to trap IE for error-handling
			var t = window.event.srcElement;
			while (t.parentElement != null) {
				if (t.id==this.divName) {
					return true;
					}
				t = t.parentElement;
				}
			return false;
			}
		else if (this.use_gebi && e) {
			var t = e.originalTarget;
			while (t.parentNode != null) {
				if (t.id==this.divName) {
					return true;
					}
				t = t.parentNode;
				}
			return false;
			}
		return false;
		}
	return false;
	}

// Check an onMouseDown event to see if we should hide
function PopupWindow_hideIfNotClicked(e) {
	if (this.autoHideEnabled && !this.isClicked(e)) {
		this.hidePopup();
		}
	}
// Call this to make the DIV disable automatically when mouse is clicked outside it
function PopupWindow_autoHide() {
	this.autoHideEnabled = true;
	}
// This global function checks all PopupWindow objects onmouseup to see if they should be hidden
function PopupWindow_hidePopupWindows(e) {
	for (var i=0; i<popupWindowObjects.length; i++) {
		if (popupWindowObjects[i] != null) {
			var p = popupWindowObjects[i];
			p.hideIfNotClicked(e);
			}
		}
	}
// Run this immediately to attach the event listener
function PopupWindow_attachListener() {
	if (document.layers) {
		document.captureEvents(Event.MOUSEUP);
		}
	window.popupWindowOldEventListener = document.onmouseup;
	if (window.popupWindowOldEventListener != null) {
		document.onmouseup = new Function("window.popupWindowOldEventListener(); PopupWindow_hidePopupWindows();");
		}
	else {
		document.onmouseup = PopupWindow_hidePopupWindows;
		}
	}
// CONSTRUCTOR for the PopupWindow object
// Pass it a DIV name to use a DHTML popup, otherwise will default to window popup
function PopupWindow() {
	if (!window.popupWindowIndex) { window.popupWindowIndex = 0; }
	if (!window.popupWindowObjects) { window.popupWindowObjects = new Array(); }
	if (!window.listenerAttached) {
		window.listenerAttached = true;
		PopupWindow_attachListener();
		}
	this.index = popupWindowIndex++;
	popupWindowObjects[this.index] = this;
	this.divName = null;
	this.popupWindow = null;
	this.width=0;
	this.height=0;
	this.populated = false;
	this.visible = false;
	this.autoHideEnabled = false;

	this.contents = "";
	this.url="";
	this.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no";
	if (arguments.length>0) {
		this.type="DIV";
		this.divName = arguments[0];
		}
	else {
		this.type="WINDOW";
		}
	this.use_gebi = false;
	this.use_css = false;
	this.use_layers = false;
	if (document.getElementById) { this.use_gebi = true; }
	else if (document.all) { this.use_css = true; }
	else if (document.layers) { this.use_layers = true; }
	else { this.type = "WINDOW"; }
	this.offsetX = 0;
	this.offsetY = 0;
	// Method mappings
	this.getXYPosition = PopupWindow_getXYPosition;
	this.populate = PopupWindow_populate;
	this.setUrl = PopupWindow_setUrl;
	this.setWindowProperties = PopupWindow_setWindowProperties;
	this.refresh = PopupWindow_refresh;
	this.showPopup = PopupWindow_showPopup;
	this.hidePopup = PopupWindow_hidePopup;
	this.setSize = PopupWindow_setSize;
	this.isClicked = PopupWindow_isClicked;
	this.autoHide = PopupWindow_autoHide;
	this.hideIfNotClicked = PopupWindow_hideIfNotClicked;
	}

/* SOURCE FILE: ColorPicker2.js */

/*
Last modified: 02/24/2003

DESCRIPTION: This widget is used to select a color, in hexadecimal #RRGGBB
form. It uses a color "swatch" to display the standard 216-color web-safe
palette. The user can then click on a color to select it.

COMPATABILITY: See notes in AnchorPosition.js and PopupWindow.js.
Only the latest DHTML-capable browsers will show the color and hex values
at the bottom as your mouse goes over them.

USAGE:
// Create a new ColorPicker object using DHTML popup
var cp = new ColorPicker();

// Create a new ColorPicker object using Window Popup
var cp = new ColorPicker('window');

// Add a link in your page to trigger the popup. For example:
<A HREF="#" onClick="cp.show('pick');return false;" NAME="pick" ID="pick">Pick</A>

// Or use the built-in "select" function to do the dirty work for you:
<A HREF="#" onClick="cp.select(document.forms[0].color,'pick');return false;" NAME="pick" ID="pick">Pick</A>

// If using DHTML popup, write out the required DIV tag near the bottom
// of your page.
<SCRIPT LANGUAGE="JavaScript">cp.writeDiv()</SCRIPT>

// Write the 'pickColor' function that will be called when the user clicks
// a color and do something with the value. This is only required if you
// want to do something other than simply populate a form field, which is
// what the 'select' function will give you.
function pickColor(color) {
	field.value = color;
	}

NOTES:
1) Requires the functions in AnchorPosition.js and PopupWindow.js

2) Your anchor tag MUST contain both NAME and ID attributes which are the
   same. For example:
   <A NAME="test" ID="test"> </A>

3) There must be at least a space between <A> </A> for IE5.5 to see the
   anchor tag correctly. Do not do <A></A> with no space.

4) When a ColorPicker object is created, a handler for 'onmouseup' is
   attached to any event handler you may have already defined. Do NOT define
   an event handler for 'onmouseup' after you define a ColorPicker object or
   the color picker will not hide itself correctly.
*/
ColorPicker_targetInput = null;
function ColorPicker_writeDiv() {
	document.writeln("<DIV ID=\"colorPickerDiv\" STYLE=\"position:absolute;visibility:hidden;\"> </DIV>");
	}

function ColorPicker_show(anchorname) {
	this.showPopup(anchorname);
	}

function ColorPicker_pickColor(color,obj) {
	obj.hidePopup();
	pickColor(color);
	}

// A Default "pickColor" function to accept the color passed back from popup.
// User can over-ride this with their own function.
function pickColor(color) {
	if (ColorPicker_targetInput==null) {
		alert("Target Input is null, which means you either didn't use the 'select' function or you have no defined your own 'pickColor' function to handle the picked color!");
		return;
		}
	ColorPicker_targetInput.value = color;
	}

// This function is the easiest way to popup the window, select a color, and
// have the value populate a form field, which is what most people want to do.
function ColorPicker_select(inputobj,linkname) {
	if (inputobj.type!="text" && inputobj.type!="hidden" && inputobj.type!="textarea") {
		alert("colorpicker.select: Input object passed is not a valid form input object");
		window.ColorPicker_targetInput=null;
		return;
		}
	window.ColorPicker_targetInput = inputobj;
	this.show(linkname);
	}

// This function runs when you move your mouse over a color block, if you have a newer browser
function ColorPicker_highlightColor(c) {
	var thedoc = (arguments.length>1)?arguments[1]:window.document;
	var d = thedoc.getElementById("colorPickerSelectedColor");
	d.style.backgroundColor = c;
	d = thedoc.getElementById("colorPickerSelectedColorValue");
	d.innerHTML = c;
	}

function ColorPicker() {
	var windowMode = false;
	// Create a new PopupWindow object
	if (arguments.length==0) {
		var divname = "colorPickerDiv";
		}
	else if (arguments[0] == "window") {
		var divname = '';
		windowMode = true;
		}
	else {
		var divname = arguments[0];
		}

	if (divname != "") {
		var cp = new PopupWindow(divname);
		}
	else {
		var cp = new PopupWindow();
		cp.setSize(225,250);
		}

	// Object variables
	cp.currentValue = "#FFFFFF";

	// Method Mappings
	cp.writeDiv = ColorPicker_writeDiv;
	cp.highlightColor = ColorPicker_highlightColor;
	cp.show = ColorPicker_show;
	cp.select = ColorPicker_select;

	// Code to populate color picker window
	var colors = new Array(	"#4180B6","#69AEE7","#000000","#000033","#000066","#000099","#0000CC","#0000FF","#330000","#330033","#330066","#330099",
							"#3300CC","#3300FF","#660000","#660033","#660066","#660099","#6600CC","#6600FF","#990000","#990033","#990066","#990099",
							"#9900CC","#9900FF","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#FF0000","#FF0033","#FF0066","#FF0099",
							"#FF00CC","#FF00FF","#7FFFFF","#7FFFFF","#7FF7F7","#7FEFEF","#7FE7E7","#7FDFDF","#7FD7D7","#7FCFCF","#7FC7C7","#7FBFBF",
							"#7FB7B7","#7FAFAF","#7FA7A7","#7F9F9F","#7F9797","#7F8F8F","#7F8787","#7F7F7F","#7F7777","#7F6F6F","#7F6767","#7F5F5F",
							"#7F5757","#7F4F4F","#7F4747","#7F3F3F","#7F3737","#7F2F2F","#7F2727","#7F1F1F","#7F1717","#7F0F0F","#7F0707","#7F0000",

							"#4180B6","#69AEE7","#003300","#003333","#003366","#003399","#0033CC","#0033FF","#333300","#333333","#333366","#333399",
							"#3333CC","#3333FF","#663300","#663333","#663366","#663399","#6633CC","#6633FF","#993300","#993333","#993366","#993399",
							"#9933CC","#9933FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#FF3300","#FF3333","#FF3366","#FF3399",
							"#FF33CC","#FF33FF","#FF7FFF","#FF7FFF","#F77FF7","#EF7FEF","#E77FE7","#DF7FDF","#D77FD7","#CF7FCF","#C77FC7","#BF7FBF",
							"#B77FB7","#AF7FAF","#A77FA7","#9F7F9F","#977F97","#8F7F8F","#877F87","#7F7F7F","#777F77","#6F7F6F","#677F67","#5F7F5F",
							"#577F57","#4F7F4F","#477F47","#3F7F3F","#377F37","#2F7F2F","#277F27","#1F7F1F","#177F17","#0F7F0F","#077F07","#007F00",

							"#4180B6","#69AEE7","#006600","#006633","#006666","#006699","#0066CC","#0066FF","#336600","#336633","#336666","#336699",
							"#3366CC","#3366FF","#666600","#666633","#666666","#666699","#6666CC","#6666FF","#996600","#996633","#996666","#996699",
							"#9966CC","#9966FF","#CC6600","#CC6633","#CC6666","#CC6699","#CC66CC","#CC66FF","#FF6600","#FF6633","#FF6666","#FF6699",
							"#FF66CC","#FF66FF","#FFFF7F","#FFFF7F","#F7F77F","#EFEF7F","#E7E77F","#DFDF7F","#D7D77F","#CFCF7F","#C7C77F","#BFBF7F",
							"#B7B77F","#AFAF7F","#A7A77F","#9F9F7F","#97977F","#8F8F7F","#87877F","#7F7F7F","#77777F","#6F6F7F","#67677F","#5F5F7F",
							"#57577F","#4F4F7F","#47477F","#3F3F7F","#37377F","#2F2F7F","#27277F","#1F1F7F","#17177F","#0F0F7F","#07077F","#00007F",

							"#4180B6","#69AEE7","#009900","#009933","#009966","#009999","#0099CC","#0099FF","#339900","#339933","#339966","#339999",
							"#3399CC","#3399FF","#669900","#669933","#669966","#669999","#6699CC","#6699FF","#999900","#999933","#999966","#999999",
							"#9999CC","#9999FF","#CC9900","#CC9933","#CC9966","#CC9999","#CC99CC","#CC99FF","#FF9900","#FF9933","#FF9966","#FF9999",
							"#FF99CC","#FF99FF","#3FFFFF","#3FFFFF","#3FF7F7","#3FEFEF","#3FE7E7","#3FDFDF","#3FD7D7","#3FCFCF","#3FC7C7","#3FBFBF",
							"#3FB7B7","#3FAFAF","#3FA7A7","#3F9F9F","#3F9797","#3F8F8F","#3F8787","#3F7F7F","#3F7777","#3F6F6F","#3F6767","#3F5F5F",
							"#3F5757","#3F4F4F","#3F4747","#3F3F3F","#3F3737","#3F2F2F","#3F2727","#3F1F1F","#3F1717","#3F0F0F","#3F0707","#3F0000",

							"#4180B6","#69AEE7","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#33CC00","#33CC33","#33CC66","#33CC99",
							"#33CCCC","#33CCFF","#66CC00","#66CC33","#66CC66","#66CC99","#66CCCC","#66CCFF","#99CC00","#99CC33","#99CC66","#99CC99",
							"#99CCCC","#99CCFF","#CCCC00","#CCCC33","#CCCC66","#CCCC99","#CCCCCC","#CCCCFF","#FFCC00","#FFCC33","#FFCC66","#FFCC99",
							"#FFCCCC","#FFCCFF","#FF3FFF","#FF3FFF","#F73FF7","#EF3FEF","#E73FE7","#DF3FDF","#D73FD7","#CF3FCF","#C73FC7","#BF3FBF",
							"#B73FB7","#AF3FAF","#A73FA7","#9F3F9F","#973F97","#8F3F8F","#873F87","#7F3F7F","#773F77","#6F3F6F","#673F67","#5F3F5F",
							"#573F57","#4F3F4F","#473F47","#3F3F3F","#373F37","#2F3F2F","#273F27","#1F3F1F","#173F17","#0F3F0F","#073F07","#003F00",

							"#4180B6","#69AEE7","#00FF00","#00FF33","#00FF66","#00FF99","#00FFCC","#00FFFF","#33FF00","#33FF33","#33FF66","#33FF99",
							"#33FFCC","#33FFFF","#66FF00","#66FF33","#66FF66","#66FF99","#66FFCC","#66FFFF","#99FF00","#99FF33","#99FF66","#99FF99",
							"#99FFCC","#99FFFF","#CCFF00","#CCFF33","#CCFF66","#CCFF99","#CCFFCC","#CCFFFF","#FFFF00","#FFFF33","#FFFF66","#FFFF99",
							"#FFFFCC","#FFFFFF","#FFFF3F","#FFFF3F","#F7F73F","#EFEF3F","#E7E73F","#DFDF3F","#D7D73F","#CFCF3F","#C7C73F","#BFBF3F",
							"#B7B73F","#AFAF3F","#A7A73F","#9F9F3F","#97973F","#8F8F3F","#87873F","#7F7F3F","#77773F","#6F6F3F","#67673F","#5F5F3F",
							"#57573F","#4F4F3F","#47473F","#3F3F3F","#37373F","#2F2F3F","#27273F","#1F1F3F","#17173F","#0F0F3F","#07073F","#00003F",

							"#4180B6","#69AEE7","#FFFFFF","#FFEEEE","#FFDDDD","#FFCCCC","#FFBBBB","#FFAAAA","#FF9999","#FF8888","#FF7777","#FF6666",
							"#FF5555","#FF4444","#FF3333","#FF2222","#FF1111","#FF0000","#FF0000","#FF0000","#FF0000","#EE0000","#DD0000","#CC0000",
							"#BB0000","#AA0000","#990000","#880000","#770000","#660000","#550000","#440000","#330000","#220000","#110000","#000000",
							"#000000","#000000","#000000","#001111","#002222","#003333","#004444","#005555","#006666","#007777","#008888","#009999",
							"#00AAAA","#00BBBB","#00CCCC","#00DDDD","#00EEEE","#00FFFF","#00FFFF","#00FFFF","#00FFFF","#11FFFF","#22FFFF","#33FFFF",
							"#44FFFF","#55FFFF","#66FFFF","#77FFFF","#88FFFF","#99FFFF","#AAFFFF","#BBFFFF","#CCFFFF","#DDFFFF","#EEFFFF","#FFFFFF",

							"#4180B6","#69AEE7","#FFFFFF","#EEFFEE","#DDFFDD","#CCFFCC","#BBFFBB","#AAFFAA","#99FF99","#88FF88","#77FF77","#66FF66",
							"#55FF55","#44FF44","#33FF33","#22FF22","#11FF11","#00FF00","#00FF00","#00FF00","#00FF00","#00EE00","#00DD00","#00CC00",
							"#00BB00","#00AA00","#009900","#008800","#007700","#006600","#005500","#004400","#003300","#002200","#001100","#000000",
							"#000000","#000000","#000000","#110011","#220022","#330033","#440044","#550055","#660066","#770077","#880088","#990099",
							"#AA00AA","#BB00BB","#CC00CC","#DD00DD","#EE00EE","#FF00FF","#FF00FF","#FF00FF","#FF00FF","#FF11FF","#FF22FF","#FF33FF",
							"#FF44FF","#FF55FF","#FF66FF","#FF77FF","#FF88FF","#FF99FF","#FFAAFF","#FFBBFF","#FFCCFF","#FFDDFF","#FFEEFF","#FFFFFF",

							"#4180B6","#69AEE7","#FFFFFF","#EEEEFF","#DDDDFF","#CCCCFF","#BBBBFF","#AAAAFF","#9999FF","#8888FF","#7777FF","#6666FF",
							"#5555FF","#4444FF","#3333FF","#2222FF","#1111FF","#0000FF","#0000FF","#0000FF","#0000FF","#0000EE","#0000DD","#0000CC",
							"#0000BB","#0000AA","#000099","#000088","#000077","#000066","#000055","#000044","#000033","#000022","#000011","#000000",
							"#000000","#000000","#000000","#111100","#222200","#333300","#444400","#555500","#666600","#777700","#888800","#999900",
							"#AAAA00","#BBBB00","#CCCC00","#DDDD00","#EEEE00","#FFFF00","#FFFF00","#FFFF00","#FFFF00","#FFFF11","#FFFF22","#FFFF33",
							"#FFFF44","#FFFF55","#FFFF66","#FFFF77","#FFFF88","#FFFF99","#FFFFAA","#FFFFBB","#FFFFCC","#FFFFDD","#FFFFEE","#FFFFFF",

							"#4180B6","#69AEE7","#FFFFFF","#FFFFFF","#FBFBFB","#F7F7F7","#F3F3F3","#EFEFEF","#EBEBEB","#E7E7E7","#E3E3E3","#DFDFDF",
							"#DBDBDB","#D7D7D7","#D3D3D3","#CFCFCF","#CBCBCB","#C7C7C7","#C3C3C3","#BFBFBF","#BBBBBB","#B7B7B7","#B3B3B3","#AFAFAF",
							"#ABABAB","#A7A7A7","#A3A3A3","#9F9F9F","#9B9B9B","#979797","#939393","#8F8F8F","#8B8B8B","#878787","#838383","#7F7F7F",
							"#7B7B7B","#777777","#737373","#6F6F6F","#6B6B6B","#676767","#636363","#5F5F5F","#5B5B5B","#575757","#535353","#4F4F4F",
							"#4B4B4B","#474747","#434343","#3F3F3F","#3B3B3B","#373737","#333333","#2F2F2F","#2B2B2B","#272727","#232323","#1F1F1F",
							"#1B1B1B","#171717","#131313","#0F0F0F","#0B0B0B","#070707","#030303","#000000","#000000","#000000","#000000","#000000");
	var total = colors.length;
	var width = 72;
	var cp_contents = "";
	var windowRef = (windowMode)?"window.opener.":"";
	if (windowMode) {
		cp_contents += "<html><head><title>Select Color</title></head>";
		cp_contents += "<body marginwidth=0 marginheight=0 leftmargin=0 topmargin=0><span style='text-align: center;'>";
		}
	cp_contents += "<table style='border: none;' cellspacing=0 cellpadding=0>";
	var use_highlight = (document.getElementById || document.all)?true:false;
	for (var i=0; i<total; i++) {
		if ((i % width) == 0) { cp_contents += "<tr>"; }
		if (use_highlight) { var mo = 'onMouseOver="'+windowRef+'ColorPicker_highlightColor(\''+colors[i]+'\',window.document)"'; }
		else { mo = ""; }
		cp_contents += '<td style="background-color: '+colors[i]+';"><a href="javascript:void()" onclick="'+windowRef+'ColorPicker_pickColor(\''+colors[i]+'\','+windowRef+'window.popupWindowObjects['+cp.index+']);return false;" '+mo+'>&nbsp;</a></td>';
		if ( ((i+1)>=total) || (((i+1) % width) == 0)) {
			cp_contents += "</tr>";
			}
		}
	// If the browser supports dynamically changing TD cells, add the fancy stuff
	if (document.getElementById) {
		var width1 = Math.floor(width/2);
		var width2 = width = width1;
		cp_contents += "<tr><td colspan='"+width1+"' style='background-color: #FFF;' ID='colorPickerSelectedColor'>&nbsp;</td><td colspan='"+width2+"' style='text-align: center;' id='colorPickerSelectedColorValue'>#FFFFFF</td></tr>";
		}
	cp_contents += "</table>";
	if (windowMode) {
		cp_contents += "</span></body></html>";
		}
	// end populate code

	// Write the contents to the popup object
	cp.populate(cp_contents+"\n");
	// Move the table down a bit so you can see it
	cp.offsetY = 25;
	cp.autoHide();
	return cp;
	}
                                                                                                     colorpicker.min.js                                                                                  0000644                 00000040162 15212563755 0010216 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
function getAnchorPosition(F){var e=new Object,t=0,i=0,o=!1,n=!1,s=!1;if(document.getElementById?o=!0:document.all?n=!0:document.layers&&(s=!0),o&&document.all)t=AnchorPosition_getPageOffsetLeft(document.all[F]),i=AnchorPosition_getPageOffsetTop(document.all[F]);else if(o)o=document.getElementById(F),t=AnchorPosition_getPageOffsetLeft(o),i=AnchorPosition_getPageOffsetTop(o);else if(n)t=AnchorPosition_getPageOffsetLeft(document.all[F]),i=AnchorPosition_getPageOffsetTop(document.all[F]);else{if(!s)return e.x=0,e.y=0,e;for(var d=0,C=0;C<document.anchors.length;C++)if(document.anchors[C].name==F){d=1;break}if(0==d)return e.x=0,e.y=0,e;t=document.anchors[C].x,i=document.anchors[C].y}return e.x=t,e.y=i,e}function getAnchorWindowPosition(F){var F=getAnchorPosition(F),e=0,t=0;return document.getElementById?t=isNaN(window.screenX)?(e=F.x-document.body.scrollLeft+window.screenLeft,F.y-document.body.scrollTop+window.screenTop):(e=F.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset,F.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset):document.all?(e=F.x-document.body.scrollLeft+window.screenLeft,t=F.y-document.body.scrollTop+window.screenTop):document.layers&&(e=F.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset,t=F.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset),F.x=e,F.y=t,F}function AnchorPosition_getPageOffsetLeft(F){for(var e=F.offsetLeft;null!=(F=F.offsetParent);)e+=F.offsetLeft;return e}function AnchorPosition_getWindowOffsetLeft(F){return AnchorPosition_getPageOffsetLeft(F)-document.body.scrollLeft}function AnchorPosition_getPageOffsetTop(F){for(var e=F.offsetTop;null!=(F=F.offsetParent);)e+=F.offsetTop;return e}function AnchorPosition_getWindowOffsetTop(F){return AnchorPosition_getPageOffsetTop(F)-document.body.scrollTop}function PopupWindow_getXYPosition(F){F=("WINDOW"==this.type?getAnchorWindowPosition:getAnchorPosition)(F);this.x=F.x,this.y=F.y}function PopupWindow_setSize(F,e){this.width=F,this.height=e}function PopupWindow_populate(F){this.contents=F,this.populated=!1}function PopupWindow_setUrl(F){this.url=F}function PopupWindow_setWindowProperties(F){this.windowProperties=F}function PopupWindow_refresh(){var F;null!=this.divName?this.use_gebi?document.getElementById(this.divName).innerHTML=this.contents:this.use_css?document.all[this.divName].innerHTML=this.contents:this.use_layers&&((F=document.layers[this.divName]).document.open(),F.document.writeln(this.contents),F.document.close()):null==this.popupWindow||this.popupWindow.closed||(""!=this.url?this.popupWindow.location.href=this.url:(this.popupWindow.document.open(),this.popupWindow.document.writeln(this.contents),this.popupWindow.document.close()),this.popupWindow.focus())}function PopupWindow_showPopup(F){var e;this.getXYPosition(F),this.x+=this.offsetX,this.y+=this.offsetY,this.populated||""==this.contents||(this.populated=!0,this.refresh()),null!=this.divName?this.use_gebi?(document.getElementById(this.divName).style.left=this.x+"px",document.getElementById(this.divName).style.top=this.y,document.getElementById(this.divName).style.visibility="visible"):this.use_css?(document.all[this.divName].style.left=this.x,document.all[this.divName].style.top=this.y,document.all[this.divName].style.visibility="visible"):this.use_layers&&(document.layers[this.divName].left=this.x,document.layers[this.divName].top=this.y,document.layers[this.divName].visibility="visible"):(null!=this.popupWindow&&!this.popupWindow.closed||(this.x<0&&(this.x=0),this.y<0&&(this.y=0),screen&&screen.availHeight&&this.y+this.height>screen.availHeight&&(this.y=screen.availHeight-this.height),screen&&screen.availWidth&&this.x+this.width>screen.availWidth&&(this.x=screen.availWidth-this.width),e=window.opera||document.layers&&!navigator.mimeTypes["*"]||"KDE"==navigator.vendor||document.childNodes&&!document.all&&!navigator.taintEnabled,this.popupWindow=window.open(e?"":"about:blank","window_"+F,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y)),this.refresh())}function PopupWindow_hidePopup(){null!=this.divName?this.use_gebi?document.getElementById(this.divName).style.visibility="hidden":this.use_css?document.all[this.divName].style.visibility="hidden":this.use_layers&&(document.layers[this.divName].visibility="hidden"):this.popupWindow&&!this.popupWindow.closed&&(this.popupWindow.close(),this.popupWindow=null)}function PopupWindow_isClicked(F){if(null!=this.divName){var e,t;if(this.use_layers)return e=F.pageX,t=F.pageY,e>(i=document.layers[this.divName]).left&&e<i.left+i.clip.width&&t>i.top&&t<i.top+i.clip.height;if(document.all)for(var i=window.event.srcElement;null!=i.parentElement;){if(i.id==this.divName)return!0;i=i.parentElement}else if(this.use_gebi&&F)for(i=F.originalTarget;null!=i.parentNode;){if(i.id==this.divName)return!0;i=i.parentNode}}return!1}function PopupWindow_hideIfNotClicked(F){this.autoHideEnabled&&!this.isClicked(F)&&this.hidePopup()}function PopupWindow_autoHide(){this.autoHideEnabled=!0}function PopupWindow_hidePopupWindows(F){for(var e=0;e<popupWindowObjects.length;e++)null!=popupWindowObjects[e]&&popupWindowObjects[e].hideIfNotClicked(F)}function PopupWindow_attachListener(){document.layers&&document.captureEvents(Event.MOUSEUP),window.popupWindowOldEventListener=document.onmouseup,document.onmouseup=null!=window.popupWindowOldEventListener?new Function("window.popupWindowOldEventListener(); PopupWindow_hidePopupWindows();"):PopupWindow_hidePopupWindows}function PopupWindow(){window.popupWindowIndex||(window.popupWindowIndex=0),window.popupWindowObjects||(window.popupWindowObjects=new Array),window.listenerAttached||(window.listenerAttached=!0,PopupWindow_attachListener()),this.index=popupWindowIndex++,(popupWindowObjects[this.index]=this).divName=null,this.popupWindow=null,this.width=0,this.height=0,this.populated=!1,this.visible=!1,this.autoHideEnabled=!1,this.contents="",this.url="",this.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no",0<arguments.length?(this.type="DIV",this.divName=arguments[0]):this.type="WINDOW",this.use_gebi=!1,this.use_css=!1,this.use_layers=!1,document.getElementById?this.use_gebi=!0:document.all?this.use_css=!0:document.layers?this.use_layers=!0:this.type="WINDOW",this.offsetX=0,this.offsetY=0,this.getXYPosition=PopupWindow_getXYPosition,this.populate=PopupWindow_populate,this.setUrl=PopupWindow_setUrl,this.setWindowProperties=PopupWindow_setWindowProperties,this.refresh=PopupWindow_refresh,this.showPopup=PopupWindow_showPopup,this.hidePopup=PopupWindow_hidePopup,this.setSize=PopupWindow_setSize,this.isClicked=PopupWindow_isClicked,this.autoHide=PopupWindow_autoHide,this.hideIfNotClicked=PopupWindow_hideIfNotClicked}function ColorPicker_writeDiv(){document.writeln('<DIV ID="colorPickerDiv" STYLE="position:absolute;visibility:hidden;"> </DIV>')}function ColorPicker_show(F){this.showPopup(F)}function ColorPicker_pickColor(F,e){e.hidePopup(),pickColor(F)}function pickColor(F){null==ColorPicker_targetInput?alert("Target Input is null, which means you either didn't use the 'select' function or you have no defined your own 'pickColor' function to handle the picked color!"):ColorPicker_targetInput.value=F}function ColorPicker_select(F,e){"text"!=F.type&&"hidden"!=F.type&&"textarea"!=F.type?(alert("colorpicker.select: Input object passed is not a valid form input object"),window.ColorPicker_targetInput=null):(window.ColorPicker_targetInput=F,this.show(e))}function ColorPicker_highlightColor(F){var e=1<arguments.length?arguments[1]:window.document,t=e.getElementById("colorPickerSelectedColor");t.style.backgroundColor=F,(t=e.getElementById("colorPickerSelectedColorValue")).innerHTML=F}function ColorPicker(){for(var F,e,t,i=!1,o=(0==arguments.length?F="colorPickerDiv":"window"==arguments[0]?i=!(F=""):F=arguments[0],""!=F?e=new PopupWindow(F):(e=new PopupWindow).setSize(225,250),e.currentValue="#FFFFFF",e.writeDiv=ColorPicker_writeDiv,e.highlightColor=ColorPicker_highlightColor,e.show=ColorPicker_show,e.select=ColorPicker_select,new Array("#4180B6","#69AEE7","#000000","#000033","#000066","#000099","#0000CC","#0000FF","#330000","#330033","#330066","#330099","#3300CC","#3300FF","#660000","#660033","#660066","#660099","#6600CC","#6600FF","#990000","#990033","#990066","#990099","#9900CC","#9900FF","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#7FFFFF","#7FFFFF","#7FF7F7","#7FEFEF","#7FE7E7","#7FDFDF","#7FD7D7","#7FCFCF","#7FC7C7","#7FBFBF","#7FB7B7","#7FAFAF","#7FA7A7","#7F9F9F","#7F9797","#7F8F8F","#7F8787","#7F7F7F","#7F7777","#7F6F6F","#7F6767","#7F5F5F","#7F5757","#7F4F4F","#7F4747","#7F3F3F","#7F3737","#7F2F2F","#7F2727","#7F1F1F","#7F1717","#7F0F0F","#7F0707","#7F0000","#4180B6","#69AEE7","#003300","#003333","#003366","#003399","#0033CC","#0033FF","#333300","#333333","#333366","#333399","#3333CC","#3333FF","#663300","#663333","#663366","#663399","#6633CC","#6633FF","#993300","#993333","#993366","#993399","#9933CC","#9933FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF7FFF","#FF7FFF","#F77FF7","#EF7FEF","#E77FE7","#DF7FDF","#D77FD7","#CF7FCF","#C77FC7","#BF7FBF","#B77FB7","#AF7FAF","#A77FA7","#9F7F9F","#977F97","#8F7F8F","#877F87","#7F7F7F","#777F77","#6F7F6F","#677F67","#5F7F5F","#577F57","#4F7F4F","#477F47","#3F7F3F","#377F37","#2F7F2F","#277F27","#1F7F1F","#177F17","#0F7F0F","#077F07","#007F00","#4180B6","#69AEE7","#006600","#006633","#006666","#006699","#0066CC","#0066FF","#336600","#336633","#336666","#336699","#3366CC","#3366FF","#666600","#666633","#666666","#666699","#6666CC","#6666FF","#996600","#996633","#996666","#996699","#9966CC","#9966FF","#CC6600","#CC6633","#CC6666","#CC6699","#CC66CC","#CC66FF","#FF6600","#FF6633","#FF6666","#FF6699","#FF66CC","#FF66FF","#FFFF7F","#FFFF7F","#F7F77F","#EFEF7F","#E7E77F","#DFDF7F","#D7D77F","#CFCF7F","#C7C77F","#BFBF7F","#B7B77F","#AFAF7F","#A7A77F","#9F9F7F","#97977F","#8F8F7F","#87877F","#7F7F7F","#77777F","#6F6F7F","#67677F","#5F5F7F","#57577F","#4F4F7F","#47477F","#3F3F7F","#37377F","#2F2F7F","#27277F","#1F1F7F","#17177F","#0F0F7F","#07077F","#00007F","#4180B6","#69AEE7","#009900","#009933","#009966","#009999","#0099CC","#0099FF","#339900","#339933","#339966","#339999","#3399CC","#3399FF","#669900","#669933","#669966","#669999","#6699CC","#6699FF","#999900","#999933","#999966","#999999","#9999CC","#9999FF","#CC9900","#CC9933","#CC9966","#CC9999","#CC99CC","#CC99FF","#FF9900","#FF9933","#FF9966","#FF9999","#FF99CC","#FF99FF","#3FFFFF","#3FFFFF","#3FF7F7","#3FEFEF","#3FE7E7","#3FDFDF","#3FD7D7","#3FCFCF","#3FC7C7","#3FBFBF","#3FB7B7","#3FAFAF","#3FA7A7","#3F9F9F","#3F9797","#3F8F8F","#3F8787","#3F7F7F","#3F7777","#3F6F6F","#3F6767","#3F5F5F","#3F5757","#3F4F4F","#3F4747","#3F3F3F","#3F3737","#3F2F2F","#3F2727","#3F1F1F","#3F1717","#3F0F0F","#3F0707","#3F0000","#4180B6","#69AEE7","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#66CC00","#66CC33","#66CC66","#66CC99","#66CCCC","#66CCFF","#99CC00","#99CC33","#99CC66","#99CC99","#99CCCC","#99CCFF","#CCCC00","#CCCC33","#CCCC66","#CCCC99","#CCCCCC","#CCCCFF","#FFCC00","#FFCC33","#FFCC66","#FFCC99","#FFCCCC","#FFCCFF","#FF3FFF","#FF3FFF","#F73FF7","#EF3FEF","#E73FE7","#DF3FDF","#D73FD7","#CF3FCF","#C73FC7","#BF3FBF","#B73FB7","#AF3FAF","#A73FA7","#9F3F9F","#973F97","#8F3F8F","#873F87","#7F3F7F","#773F77","#6F3F6F","#673F67","#5F3F5F","#573F57","#4F3F4F","#473F47","#3F3F3F","#373F37","#2F3F2F","#273F27","#1F3F1F","#173F17","#0F3F0F","#073F07","#003F00","#4180B6","#69AEE7","#00FF00","#00FF33","#00FF66","#00FF99","#00FFCC","#00FFFF","#33FF00","#33FF33","#33FF66","#33FF99","#33FFCC","#33FFFF","#66FF00","#66FF33","#66FF66","#66FF99","#66FFCC","#66FFFF","#99FF00","#99FF33","#99FF66","#99FF99","#99FFCC","#99FFFF","#CCFF00","#CCFF33","#CCFF66","#CCFF99","#CCFFCC","#CCFFFF","#FFFF00","#FFFF33","#FFFF66","#FFFF99","#FFFFCC","#FFFFFF","#FFFF3F","#FFFF3F","#F7F73F","#EFEF3F","#E7E73F","#DFDF3F","#D7D73F","#CFCF3F","#C7C73F","#BFBF3F","#B7B73F","#AFAF3F","#A7A73F","#9F9F3F","#97973F","#8F8F3F","#87873F","#7F7F3F","#77773F","#6F6F3F","#67673F","#5F5F3F","#57573F","#4F4F3F","#47473F","#3F3F3F","#37373F","#2F2F3F","#27273F","#1F1F3F","#17173F","#0F0F3F","#07073F","#00003F","#4180B6","#69AEE7","#FFFFFF","#FFEEEE","#FFDDDD","#FFCCCC","#FFBBBB","#FFAAAA","#FF9999","#FF8888","#FF7777","#FF6666","#FF5555","#FF4444","#FF3333","#FF2222","#FF1111","#FF0000","#FF0000","#FF0000","#FF0000","#EE0000","#DD0000","#CC0000","#BB0000","#AA0000","#990000","#880000","#770000","#660000","#550000","#440000","#330000","#220000","#110000","#000000","#000000","#000000","#000000","#001111","#002222","#003333","#004444","#005555","#006666","#007777","#008888","#009999","#00AAAA","#00BBBB","#00CCCC","#00DDDD","#00EEEE","#00FFFF","#00FFFF","#00FFFF","#00FFFF","#11FFFF","#22FFFF","#33FFFF","#44FFFF","#55FFFF","#66FFFF","#77FFFF","#88FFFF","#99FFFF","#AAFFFF","#BBFFFF","#CCFFFF","#DDFFFF","#EEFFFF","#FFFFFF","#4180B6","#69AEE7","#FFFFFF","#EEFFEE","#DDFFDD","#CCFFCC","#BBFFBB","#AAFFAA","#99FF99","#88FF88","#77FF77","#66FF66","#55FF55","#44FF44","#33FF33","#22FF22","#11FF11","#00FF00","#00FF00","#00FF00","#00FF00","#00EE00","#00DD00","#00CC00","#00BB00","#00AA00","#009900","#008800","#007700","#006600","#005500","#004400","#003300","#002200","#001100","#000000","#000000","#000000","#000000","#110011","#220022","#330033","#440044","#550055","#660066","#770077","#880088","#990099","#AA00AA","#BB00BB","#CC00CC","#DD00DD","#EE00EE","#FF00FF","#FF00FF","#FF00FF","#FF00FF","#FF11FF","#FF22FF","#FF33FF","#FF44FF","#FF55FF","#FF66FF","#FF77FF","#FF88FF","#FF99FF","#FFAAFF","#FFBBFF","#FFCCFF","#FFDDFF","#FFEEFF","#FFFFFF","#4180B6","#69AEE7","#FFFFFF","#EEEEFF","#DDDDFF","#CCCCFF","#BBBBFF","#AAAAFF","#9999FF","#8888FF","#7777FF","#6666FF","#5555FF","#4444FF","#3333FF","#2222FF","#1111FF","#0000FF","#0000FF","#0000FF","#0000FF","#0000EE","#0000DD","#0000CC","#0000BB","#0000AA","#000099","#000088","#000077","#000066","#000055","#000044","#000033","#000022","#000011","#000000","#000000","#000000","#000000","#111100","#222200","#333300","#444400","#555500","#666600","#777700","#888800","#999900","#AAAA00","#BBBB00","#CCCC00","#DDDD00","#EEEE00","#FFFF00","#FFFF00","#FFFF00","#FFFF00","#FFFF11","#FFFF22","#FFFF33","#FFFF44","#FFFF55","#FFFF66","#FFFF77","#FFFF88","#FFFF99","#FFFFAA","#FFFFBB","#FFFFCC","#FFFFDD","#FFFFEE","#FFFFFF","#4180B6","#69AEE7","#FFFFFF","#FFFFFF","#FBFBFB","#F7F7F7","#F3F3F3","#EFEFEF","#EBEBEB","#E7E7E7","#E3E3E3","#DFDFDF","#DBDBDB","#D7D7D7","#D3D3D3","#CFCFCF","#CBCBCB","#C7C7C7","#C3C3C3","#BFBFBF","#BBBBBB","#B7B7B7","#B3B3B3","#AFAFAF","#ABABAB","#A7A7A7","#A3A3A3","#9F9F9F","#9B9B9B","#979797","#939393","#8F8F8F","#8B8B8B","#878787","#838383","#7F7F7F","#7B7B7B","#777777","#737373","#6F6F6F","#6B6B6B","#676767","#636363","#5F5F5F","#5B5B5B","#575757","#535353","#4F4F4F","#4B4B4B","#474747","#434343","#3F3F3F","#3B3B3B","#373737","#333333","#2F2F2F","#2B2B2B","#272727","#232323","#1F1F1F","#1B1B1B","#171717","#131313","#0F0F0F","#0B0B0B","#070707","#030303","#000000","#000000","#000000","#000000","#000000")),n=o.length,s=72,d="",C=i?"window.opener.":"",l=(i&&(d+="<html><head><title>Select Color</title></head><body marginwidth=0 marginheight=0 leftmargin=0 topmargin=0><span style='text-align: center;'>"),d+="<table style='border: none;' cellspacing=0 cellpadding=0>",!(!document.getElementById&&!document.all)),r=0;r<n;r++)r%s==0&&(d+="<tr>"),t=l?'onMouseOver="'+C+"ColorPicker_highlightColor('"+o[r]+"',window.document)\"":"",d+='<td style="background-color: '+o[r]+';"><a href="javascript:void()" onclick="'+C+"ColorPicker_pickColor('"+o[r]+"',"+C+"window.popupWindowObjects["+e.index+']);return false;" '+t+">&nbsp;</a></td>",(n<=r+1||(r+1)%s==0)&&(d+="</tr>");return document.getElementById&&(d+="<tr><td colspan='"+(s=Math.floor(s/2))+"' style='background-color: #FFF;' ID='colorPickerSelectedColor'>&nbsp;</td><td colspan='"+s+"' style='text-align: center;' id='colorPickerSelectedColorValue'>#FFFFFF</td></tr>"),d+="</table>",i&&(d+="</span></body></html>"),e.populate(d+"\n"),e.offsetY=25,e.autoHide(),e}ColorPicker_targetInput=null;                                                                                                                                                                                                                                                                                                                                                                                                              comment-reply.js                                                                                    0000644                 00000030341 15212563755 0007711 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * Handles the addition of the comment form.
 *
 * @since 2.7.0
 * @output wp-includes/js/comment-reply.js
 *
 * @namespace addComment
 *
 * @type {Object}
 */
window.addComment = ( function( window ) {
	// Avoid scope lookups on commonly used variables.
	var document = window.document;

	// Settings.
	var config = {
		commentReplyClass   : 'comment-reply-link',
		commentReplyTitleId : 'reply-title',
		cancelReplyId       : 'cancel-comment-reply-link',
		commentFormId       : 'commentform',
		temporaryFormId     : 'wp-temp-form-div',
		parentIdFieldId     : 'comment_parent',
		postIdFieldId       : 'comment_post_ID'
	};

	// Cross browser MutationObserver.
	var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;

	// Check browser cuts the mustard.
	var cutsTheMustard = 'querySelector' in document && 'addEventListener' in window;

	/*
	 * Check browser supports dataset.
	 * !! sets the variable to true if the property exists.
	 */
	var supportsDataset = !! document.documentElement.dataset;

	// For holding the cancel element.
	var cancelElement;

	// For holding the comment form element.
	var commentFormElement;

	// The respond element.
	var respondElement;

	// The mutation observer.
	var observer;

	if ( cutsTheMustard && document.readyState !== 'loading' ) {
		ready();
	} else if ( cutsTheMustard ) {
		window.addEventListener( 'DOMContentLoaded', ready, false );
	}

	/**
	 * Sets up object variables after the DOM is ready.
	 *
	 * @since 5.1.1
	 */
	function ready() {
		// Initialize the events.
		init();

		// Set up a MutationObserver to check for comments loaded late.
		observeChanges();
	}

	/**
	 * Add events to links classed .comment-reply-link.
	 *
	 * Searches the context for reply links and adds the JavaScript events
	 * required to move the comment form. To allow for lazy loading of
	 * comments this method is exposed as window.commentReply.init().
	 *
	 * @since 5.1.0
	 *
	 * @memberOf addComment
	 *
	 * @param {HTMLElement} context The parent DOM element to search for links.
	 */
	function init( context ) {
		if ( ! cutsTheMustard ) {
			return;
		}

		// Get required elements.
		cancelElement = getElementById( config.cancelReplyId );
		commentFormElement = getElementById( config.commentFormId );

		// No cancel element, no replies.
		if ( ! cancelElement ) {
			return;
		}

		cancelElement.addEventListener( 'touchstart', cancelEvent );
		cancelElement.addEventListener( 'click',      cancelEvent );

		// Submit the comment form when the user types [Ctrl] or [Cmd] + [Enter].
		var submitFormHandler = function( e ) {
			if ( ( e.metaKey || e.ctrlKey ) && e.keyCode === 13 && document.activeElement.tagName.toLowerCase() !== 'a' ) {
				commentFormElement.removeEventListener( 'keydown', submitFormHandler );
				e.preventDefault();
				// The submit button ID is 'submit' so we can't call commentFormElement.submit(). Click it instead.
				commentFormElement.submit.click();
				return false;
			}
		};

		if ( commentFormElement ) {
			commentFormElement.addEventListener( 'keydown', submitFormHandler );
		}

		var links = replyLinks( context );
		var element;

		for ( var i = 0, l = links.length; i < l; i++ ) {
			element = links[i];

			element.addEventListener( 'touchstart', clickEvent );
			element.addEventListener( 'click',      clickEvent );
		}
	}

	/**
	 * Return all links classed .comment-reply-link.
	 *
	 * @since 5.1.0
	 *
	 * @param {HTMLElement} context The parent DOM element to search for links.
	 *
	 * @return {HTMLCollection|NodeList|Array}
	 */
	function replyLinks( context ) {
		var selectorClass = config.commentReplyClass;
		var allReplyLinks;

		// childNodes is a handy check to ensure the context is a HTMLElement.
		if ( ! context || ! context.childNodes ) {
			context = document;
		}

		if ( document.getElementsByClassName ) {
			// Fastest.
			allReplyLinks = context.getElementsByClassName( selectorClass );
		}
		else {
			// Fast.
			allReplyLinks = context.querySelectorAll( '.' + selectorClass );
		}

		return allReplyLinks;
	}

	/**
	 * Cancel event handler.
	 *
	 * @since 5.1.0
	 *
	 * @param {Event} event The calling event.
	 */
	function cancelEvent( event ) {
		var cancelLink = this;
		var temporaryFormId  = config.temporaryFormId;
		var temporaryElement = getElementById( temporaryFormId );

		if ( ! temporaryElement || ! respondElement ) {
			// Conditions for cancel link fail.
			return;
		}

		getElementById( config.parentIdFieldId ).value = '0';

		// Move the respond form back in place of the temporary element.
		var headingText = temporaryElement.textContent;
		temporaryElement.parentNode.replaceChild( respondElement, temporaryElement );
		cancelLink.style.display = 'none';

		var replyHeadingElement  = getElementById( config.commentReplyTitleId );
		var replyHeadingTextNode = replyHeadingElement && replyHeadingElement.firstChild;
		var replyLinkToParent    = replyHeadingTextNode && replyHeadingTextNode.nextSibling;

		if ( replyHeadingTextNode && replyHeadingTextNode.nodeType === Node.TEXT_NODE && headingText ) {
			if ( replyLinkToParent && 'A' === replyLinkToParent.nodeName && replyLinkToParent.id !== config.cancelReplyId ) {
				replyLinkToParent.style.display = '';
			}

			replyHeadingTextNode.textContent = headingText;
		}

		event.preventDefault();
	}

	/**
	 * Click event handler.
	 *
	 * @since 5.1.0
	 *
	 * @param {Event} event The calling event.
	 */
	function clickEvent( event ) {
		var replyNode = getElementById( config.commentReplyTitleId );
		var defaultReplyHeading = replyNode && replyNode.firstChild.textContent;
		var replyLink = this,
			commId    = getDataAttribute( replyLink, 'belowelement' ),
			parentId  = getDataAttribute( replyLink, 'commentid' ),
			respondId = getDataAttribute( replyLink, 'respondelement' ),
			postId    = getDataAttribute( replyLink, 'postid' ),
			replyTo   = getDataAttribute( replyLink, 'replyto' ) || defaultReplyHeading,
			follow;

		if ( ! commId || ! parentId || ! respondId || ! postId ) {
			/*
			 * Theme or plugin defines own link via custom `wp_list_comments()` callback
			 * and calls `moveForm()` either directly or via a custom event hook.
			 */
			return;
		}

		/*
		 * Third party comments systems can hook into this function via the global scope,
		 * therefore the click event needs to reference the global scope.
		 */
		follow = window.addComment.moveForm( commId, parentId, respondId, postId, replyTo );
		if ( false === follow ) {
			event.preventDefault();
		}
	}

	/**
	 * Creates a mutation observer to check for newly inserted comments.
	 *
	 * @since 5.1.0
	 */
	function observeChanges() {
		if ( ! MutationObserver ) {
			return;
		}

		var observerOptions = {
			childList: true,
			subtree: true
		};

		observer = new MutationObserver( handleChanges );
		observer.observe( document.body, observerOptions );
	}

	/**
	 * Handles DOM changes, calling init() if any new nodes are added.
	 *
	 * @since 5.1.0
	 *
	 * @param {Array} mutationRecords Array of MutationRecord objects.
	 */
	function handleChanges( mutationRecords ) {
		var i = mutationRecords.length;

		while ( i-- ) {
			// Call init() once if any record in this set adds nodes.
			if ( mutationRecords[ i ].addedNodes.length ) {
				init();
				return;
			}
		}
	}

	/**
	 * Backward compatible getter of data-* attribute.
	 *
	 * Uses element.dataset if it exists, otherwise uses getAttribute.
	 *
	 * @since 5.1.0
	 *
	 * @param {HTMLElement} Element DOM element with the attribute.
	 * @param {string}      Attribute the attribute to get.
	 *
	 * @return {string}
	 */
	function getDataAttribute( element, attribute ) {
		if ( supportsDataset ) {
			return element.dataset[attribute];
		}
		else {
			return element.getAttribute( 'data-' + attribute );
		}
	}

	/**
	 * Get element by ID.
	 *
	 * Local alias for document.getElementById.
	 *
	 * @since 5.1.0
	 *
	 * @param {HTMLElement} The requested element.
	 */
	function getElementById( elementId ) {
		return document.getElementById( elementId );
	}

	/**
	 * Moves the reply form from its current position to the reply location.
	 *
	 * @since 2.7.0
	 *
	 * @memberOf addComment
	 *
	 * @param {string} addBelowId HTML ID of element the form follows.
	 * @param {string} commentId  Database ID of comment being replied to.
	 * @param {string} respondId  HTML ID of 'respond' element.
	 * @param {string} postId     Database ID of the post.
	 * @param {string} replyTo    Form heading content.
	 */
	function moveForm( addBelowId, commentId, respondId, postId, replyTo ) {
		// Get elements based on their IDs.
		var addBelowElement = getElementById( addBelowId );
		respondElement  = getElementById( respondId );

		// Get the hidden fields.
		var parentIdField   = getElementById( config.parentIdFieldId );
		var postIdField     = getElementById( config.postIdFieldId );
		var element, cssHidden, style;

		var replyHeading         = getElementById( config.commentReplyTitleId );
		var replyHeadingTextNode = replyHeading && replyHeading.firstChild;
		var replyLinkToParent    = replyHeadingTextNode && replyHeadingTextNode.nextSibling;

		if ( ! addBelowElement || ! respondElement || ! parentIdField ) {
			// Missing key elements, fail.
			return;
		}

		if ( 'undefined' === typeof replyTo ) {
			replyTo = replyHeadingTextNode && replyHeadingTextNode.textContent;
		}

		addPlaceHolder( respondElement );

		// Set the value of the post.
		if ( postId && postIdField ) {
			postIdField.value = postId;
		}

		parentIdField.value = commentId;

		cancelElement.style.display = '';
		addBelowElement.parentNode.insertBefore( respondElement, addBelowElement.nextSibling );

		if ( replyHeadingTextNode && replyHeadingTextNode.nodeType === Node.TEXT_NODE ) {
			if ( replyLinkToParent && 'A' === replyLinkToParent.nodeName && replyLinkToParent.id !== config.cancelReplyId ) {
				replyLinkToParent.style.display = 'none';
			}

			replyHeadingTextNode.textContent = replyTo;
		}

		/*
		 * This is for backward compatibility with third party commenting systems
		 * hooking into the event using older techniques.
		 */
		cancelElement.onclick = function() {
			return false;
		};

		// Focus on the first field in the comment form.
		try {
			for ( var i = 0; i < commentFormElement.elements.length; i++ ) {
				element = commentFormElement.elements[i];
				cssHidden = false;

				// Get elements computed style.
				if ( 'getComputedStyle' in window ) {
					// Modern browsers.
					style = window.getComputedStyle( element );
				} else if ( document.documentElement.currentStyle ) {
					// IE 8.
					style = element.currentStyle;
				}

				/*
				 * For display none, do the same thing jQuery does. For visibility,
				 * check the element computed style since browsers are already doing
				 * the job for us. In fact, the visibility computed style is the actual
				 * computed value and already takes into account the element ancestors.
				 */
				if ( ( element.offsetWidth <= 0 && element.offsetHeight <= 0 ) || style.visibility === 'hidden' ) {
					cssHidden = true;
				}

				// Skip form elements that are hidden or disabled.
				if ( 'hidden' === element.type || element.disabled || cssHidden ) {
					continue;
				}

				element.focus();
				// Stop after the first focusable element.
				break;
			}
		}
		catch(e) {

		}

		/*
		 * false is returned for backward compatibility with third party commenting systems
		 * hooking into this function.
		 */
		return false;
	}

	/**
	 * Add placeholder element.
	 *
	 * Places a place holder element above the #respond element for
	 * the form to be returned to if needs be.
	 *
	 * @since 2.7.0
	 *
	 * @param {HTMLelement} respondElement the #respond element holding comment form.
	 */
	function addPlaceHolder( respondElement ) {
		var temporaryFormId  = config.temporaryFormId;
		var temporaryElement = getElementById( temporaryFormId );
		var replyElement = getElementById( config.commentReplyTitleId );
		var initialHeadingText = replyElement ? replyElement.firstChild.textContent : '';

		if ( temporaryElement ) {
			// The element already exists, no need to recreate.
			return;
		}

		temporaryElement = document.createElement( 'div' );
		temporaryElement.id = temporaryFormId;
		temporaryElement.style.display = 'none';
		temporaryElement.textContent = initialHeadingText;
		respondElement.parentNode.insertBefore( temporaryElement, respondElement );
	}

	return {
		init: init,
		moveForm: moveForm
	};
})( window );
                                                                                                                                                                                                                                                                                               comment-reply.min.js                                                                                0000644                 00000005722 15212563755 0010500 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
window.addComment=function(v){var I,C,h,E=v.document,b={commentReplyClass:"comment-reply-link",commentReplyTitleId:"reply-title",cancelReplyId:"cancel-comment-reply-link",commentFormId:"commentform",temporaryFormId:"wp-temp-form-div",parentIdFieldId:"comment_parent",postIdFieldId:"comment_post_ID"},e=v.MutationObserver||v.WebKitMutationObserver||v.MozMutationObserver,r="querySelector"in E&&"addEventListener"in v,n=!!E.documentElement.dataset;function t(){d(),e&&new e(o).observe(E.body,{childList:!0,subtree:!0})}function d(e){if(r&&(I=g(b.cancelReplyId),C=g(b.commentFormId),I)){I.addEventListener("touchstart",l),I.addEventListener("click",l);function t(e){if((e.metaKey||e.ctrlKey)&&13===e.keyCode&&"a"!==E.activeElement.tagName.toLowerCase())return C.removeEventListener("keydown",t),e.preventDefault(),C.submit.click(),!1}C&&C.addEventListener("keydown",t);for(var n,d=function(e){var t=b.commentReplyClass;e&&e.childNodes||(e=E);e=E.getElementsByClassName?e.getElementsByClassName(t):e.querySelectorAll("."+t);return e}(e),o=0,i=d.length;o<i;o++)(n=d[o]).addEventListener("touchstart",a),n.addEventListener("click",a)}}function l(e){var t,n,d=g(b.temporaryFormId);d&&h&&(g(b.parentIdFieldId).value="0",t=d.textContent,d.parentNode.replaceChild(h,d),this.style.display="none",n=(d=(d=g(b.commentReplyTitleId))&&d.firstChild)&&d.nextSibling,d&&d.nodeType===Node.TEXT_NODE&&t&&(n&&"A"===n.nodeName&&n.id!==b.cancelReplyId&&(n.style.display=""),d.textContent=t),e.preventDefault())}function a(e){var t=g(b.commentReplyTitleId),t=t&&t.firstChild.textContent,n=this,d=m(n,"belowelement"),o=m(n,"commentid"),i=m(n,"respondelement"),r=m(n,"postid"),n=m(n,"replyto")||t;d&&o&&i&&r&&!1===v.addComment.moveForm(d,o,i,r,n)&&e.preventDefault()}function o(e){for(var t=e.length;t--;)if(e[t].addedNodes.length)return void d()}function m(e,t){return n?e.dataset[t]:e.getAttribute("data-"+t)}function g(e){return E.getElementById(e)}return r&&"loading"!==E.readyState?t():r&&v.addEventListener("DOMContentLoaded",t,!1),{init:d,moveForm:function(e,t,n,d,o){var i,r,l,a,m,c,s,e=g(e),n=(h=g(n),g(b.parentIdFieldId)),y=g(b.postIdFieldId),p=g(b.commentReplyTitleId),u=(p=p&&p.firstChild)&&p.nextSibling;if(e&&h&&n){void 0===o&&(o=p&&p.textContent),a=h,m=b.temporaryFormId,c=g(m),s=(s=g(b.commentReplyTitleId))?s.firstChild.textContent:"",c||((c=E.createElement("div")).id=m,c.style.display="none",c.textContent=s,a.parentNode.insertBefore(c,a)),d&&y&&(y.value=d),n.value=t,I.style.display="",e.parentNode.insertBefore(h,e.nextSibling),p&&p.nodeType===Node.TEXT_NODE&&(u&&"A"===u.nodeName&&u.id!==b.cancelReplyId&&(u.style.display="none"),p.textContent=o),I.onclick=function(){return!1};try{for(var f=0;f<C.elements.length;f++)if(i=C.elements[f],r=!1,"getComputedStyle"in v?l=v.getComputedStyle(i):E.documentElement.currentStyle&&(l=i.currentStyle),(i.offsetWidth<=0&&i.offsetHeight<=0||"hidden"===l.visibility)&&(r=!0),"hidden"!==i.type&&!i.disabled&&!r){i.focus();break}}catch(e){}return!1}}}}(window);                                              crop/cropper.css                                                                                    0000644                 00000005605 15212563755 0007714 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       .imgCrop_wrap {
	/* width: 500px;   @done_in_js */
	/* height: 375px;  @done_in_js */
	position: relative;
	cursor: crosshair;
}

/* an extra classname is applied for Opera < 9.0 to fix its lack of opacity support */
.imgCrop_wrap.opera8 .imgCrop_overlay,
.imgCrop_wrap.opera8 .imgCrop_clickArea { 
	background-color: transparent;
}

/* fix for IE displaying all boxes at line-height by default, although they are still 1 pixel high until we combine them with the pointless span */
.imgCrop_wrap,
.imgCrop_wrap * {
	font-size: 0;
}

.imgCrop_overlay {
	background-color: #000;
	opacity: 0.5;
	filter:alpha(opacity=50);
	position: absolute;
	width: 100%;
	height: 100%;
}

.imgCrop_selArea {
	position: absolute;
	/* @done_in_js 
	top: 20px;
	left: 20px;
	width: 200px;
	height: 200px;
	background: transparent url(castle.jpg) no-repeat  -210px -110px;
	*/
	cursor: move;
	z-index: 2;
}

/* clickArea is all a fix for IE 5.5 & 6 to allow the user to click on the given area */
.imgCrop_clickArea {
	width: 100%;
	height: 100%;
	background-color: #FFF;
	opacity: 0.01;
	filter:alpha(opacity=01);
}

.imgCrop_marqueeHoriz {
	position: absolute;
	width: 100%;
	height: 1px;
	background: transparent url(marqueeHoriz.gif) repeat-x 0 0;
	z-index: 3;
}

.imgCrop_marqueeVert {
	position: absolute;
	height: 100%;
	width: 1px;
	background: transparent url(marqueeVert.gif) repeat-y 0 0;
	z-index: 3;
}

.imgCrop_marqueeNorth { top: 0; left: 0; }
.imgCrop_marqueeEast  { top: 0; right: 0; }
.imgCrop_marqueeSouth { bottom: 0px; left: 0; }
.imgCrop_marqueeWest  { top: 0; left: 0; }


.imgCrop_handle {
	position: absolute;
	border: 1px solid #333;
	width: 6px;
	height: 6px;
	background: #FFF;
	opacity: 0.5;
	filter:alpha(opacity=50);
	z-index: 4;
}

/* fix IE 5 box model */
* html .imgCrop_handle {
	width: 8px;
	height: 8px;
	wid\th: 6px;
	hei\ght: 6px;
}

.imgCrop_handleN {
	top: -3px;
	left: 0;
	/* margin-left: 49%;    @done_in_js */
	cursor: n-resize;
}

.imgCrop_handleNE { 
	top: -3px;
	right: -3px;
	cursor: ne-resize;
}

.imgCrop_handleE {
	top: 0;
	right: -3px;
	/* margin-top: 49%;    @done_in_js */
	cursor: e-resize;
}

.imgCrop_handleSE {
	right: -3px;
	bottom: -3px;
	cursor: se-resize;
}

.imgCrop_handleS {
	right: 0;
	bottom: -3px;
	/* margin-right: 49%; @done_in_js */
	cursor: s-resize;
}

.imgCrop_handleSW {
	left: -3px;
	bottom: -3px;
	cursor: sw-resize;
}

.imgCrop_handleW {
	top: 0;
	left: -3px;
	/* margin-top: 49%;  @done_in_js */
	cursor: e-resize;
}

.imgCrop_handleNW {
	top: -3px;
	left: -3px;
	cursor: nw-resize;
}

/**
 * Create an area to click & drag around on as the default browser behaviour is to let you drag the image 
 */
.imgCrop_dragArea {
	width: 100%;
	height: 100%;
	z-index: 200;
	position: absolute;
	top: 0;
	left: 0;
}

.imgCrop_previewWrap {
	/* width: 200px;  @done_in_js */
	/* height: 200px; @done_in_js */
	overflow: hidden;
	position: relative;
}

.imgCrop_previewWrap img {
	position: absolute;
}                                                                                                                           crop/cropper.js                                                                                     0000644                 00000040145 15212563755 0007536 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * Copyright (c) 2006, David Spurr (http://www.defusion.org.uk/)
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 *
 *     * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 *     * Neither the name of the David Spurr nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * http://www.opensource.org/licenses/bsd-license.php
 *
 * See scriptaculous.js for full scriptaculous licence
 */

var CropDraggable=Class.create();
Object.extend(Object.extend(CropDraggable.prototype,Draggable.prototype),{initialize:function(_1){
this.options=Object.extend({drawMethod:function(){
}},arguments[1]||{});
this.element=$(_1);
this.handle=this.element;
this.delta=this.currentDelta();
this.dragging=false;
this.eventMouseDown=this.initDrag.bindAsEventListener(this);
Event.observe(this.handle,"mousedown",this.eventMouseDown);
Draggables.register(this);
},draw:function(_2){
var _3=Position.cumulativeOffset(this.element);
var d=this.currentDelta();
_3[0]-=d[0];
_3[1]-=d[1];
var p=[0,1].map(function(i){
return (_2[i]-_3[i]-this.offset[i]);
}.bind(this));
this.options.drawMethod(p);
}});
var Cropper={};
Cropper.Img=Class.create();
Cropper.Img.prototype={initialize:function(_7,_8){
this.options=Object.extend({ratioDim:{x:0,y:0},minWidth:0,minHeight:0,displayOnInit:false,onEndCrop:Prototype.emptyFunction,captureKeys:true},_8||{});
if(this.options.minWidth>0&&this.options.minHeight>0){
this.options.ratioDim.x=this.options.minWidth;
this.options.ratioDim.y=this.options.minHeight;
}
this.img=$(_7);
this.clickCoords={x:0,y:0};
this.dragging=false;
this.resizing=false;
this.isWebKit=/Konqueror|Safari|KHTML/.test(navigator.userAgent);
this.isIE=/MSIE/.test(navigator.userAgent);
this.isOpera8=/Opera\s[1-8]/.test(navigator.userAgent);
this.ratioX=0;
this.ratioY=0;
this.attached=false;
$A(document.getElementsByTagName("script")).each(function(s){
if(s.src.match(/cropper\.js/)){
var _a=s.src.replace(/cropper\.js(.*)?/,"");
var _b=document.createElement("link");
_b.rel="stylesheet";
_b.type="text/css";
_b.href=_a+"cropper.css";
_b.media="screen";
document.getElementsByTagName("head")[0].appendChild(_b);
}
});
if(this.options.ratioDim.x>0&&this.options.ratioDim.y>0){
var _c=this.getGCD(this.options.ratioDim.x,this.options.ratioDim.y);
this.ratioX=this.options.ratioDim.x/_c;
this.ratioY=this.options.ratioDim.y/_c;
}
this.subInitialize();
if(this.img.complete||this.isWebKit){
this.onLoad();
}else{
Event.observe(this.img,"load",this.onLoad.bindAsEventListener(this));
}
},getGCD:function(a,b){return 1;
if(b==0){
return a;
}
return this.getGCD(b,a%b);
},onLoad:function(){
var _f="imgCrop_";
var _10=this.img.parentNode;
var _11="";
if(this.isOpera8){
_11=" opera8";
}
this.imgWrap=Builder.node("div",{"class":_f+"wrap"+_11});
if(this.isIE){
this.north=Builder.node("div",{"class":_f+"overlay "+_f+"north"},[Builder.node("span")]);
this.east=Builder.node("div",{"class":_f+"overlay "+_f+"east"},[Builder.node("span")]);
this.south=Builder.node("div",{"class":_f+"overlay "+_f+"south"},[Builder.node("span")]);
this.west=Builder.node("div",{"class":_f+"overlay "+_f+"west"},[Builder.node("span")]);
var _12=[this.north,this.east,this.south,this.west];
}else{
this.overlay=Builder.node("div",{"class":_f+"overlay"});
var _12=[this.overlay];
}
this.dragArea=Builder.node("div",{"class":_f+"dragArea"},_12);
this.handleN=Builder.node("div",{"class":_f+"handle "+_f+"handleN"});
this.handleNE=Builder.node("div",{"class":_f+"handle "+_f+"handleNE"});
this.handleE=Builder.node("div",{"class":_f+"handle "+_f+"handleE"});
this.handleSE=Builder.node("div",{"class":_f+"handle "+_f+"handleSE"});
this.handleS=Builder.node("div",{"class":_f+"handle "+_f+"handleS"});
this.handleSW=Builder.node("div",{"class":_f+"handle "+_f+"handleSW"});
this.handleW=Builder.node("div",{"class":_f+"handle "+_f+"handleW"});
this.handleNW=Builder.node("div",{"class":_f+"handle "+_f+"handleNW"});
this.selArea=Builder.node("div",{"class":_f+"selArea"},[Builder.node("div",{"class":_f+"marqueeHoriz "+_f+"marqueeNorth"},[Builder.node("span")]),Builder.node("div",{"class":_f+"marqueeVert "+_f+"marqueeEast"},[Builder.node("span")]),Builder.node("div",{"class":_f+"marqueeHoriz "+_f+"marqueeSouth"},[Builder.node("span")]),Builder.node("div",{"class":_f+"marqueeVert "+_f+"marqueeWest"},[Builder.node("span")]),this.handleN,this.handleNE,this.handleE,this.handleSE,this.handleS,this.handleSW,this.handleW,this.handleNW,Builder.node("div",{"class":_f+"clickArea"})]);
Element.setStyle($(this.selArea),{backgroundColor:"transparent",backgroundRepeat:"no-repeat",backgroundPosition:"0 0"});
this.imgWrap.appendChild(this.img);
this.imgWrap.appendChild(this.dragArea);
this.dragArea.appendChild(this.selArea);
this.dragArea.appendChild(Builder.node("div",{"class":_f+"clickArea"}));
_10.appendChild(this.imgWrap);
Event.observe(this.dragArea,"mousedown",this.startDrag.bindAsEventListener(this));
Event.observe(document,"mousemove",this.onDrag.bindAsEventListener(this));
Event.observe(document,"mouseup",this.endCrop.bindAsEventListener(this));
var _13=[this.handleN,this.handleNE,this.handleE,this.handleSE,this.handleS,this.handleSW,this.handleW,this.handleNW];
for(var i=0;i<_13.length;i++){
Event.observe(_13[i],"mousedown",this.startResize.bindAsEventListener(this));
}
if(this.options.captureKeys){
Event.observe(document,"keydown",this.handleKeys.bindAsEventListener(this));
}
new CropDraggable(this.selArea,{drawMethod:this.moveArea.bindAsEventListener(this)});
this.setParams();
},setParams:function(){
this.imgW=this.img.width;
this.imgH=this.img.height;
if(!this.isIE){
Element.setStyle($(this.overlay),{width:this.imgW+"px",height:this.imgH+"px"});
Element.hide($(this.overlay));
Element.setStyle($(this.selArea),{backgroundImage:"url("+this.img.src+")"});
}else{
Element.setStyle($(this.north),{height:0});
Element.setStyle($(this.east),{width:0,height:0});
Element.setStyle($(this.south),{height:0});
Element.setStyle($(this.west),{width:0,height:0});
}
Element.setStyle($(this.imgWrap),{"width":this.imgW+"px","height":this.imgH+"px"});
Element.hide($(this.selArea));
var _15=Position.positionedOffset(this.imgWrap);
this.wrapOffsets={"top":_15[1],"left":_15[0]};
var _16={x1:0,y1:0,x2:0,y2:0};
this.setAreaCoords(_16);
if(this.options.ratioDim.x>0&&this.options.ratioDim.y>0&&this.options.displayOnInit){
_16.x1=Math.ceil((this.imgW-this.options.ratioDim.x)/2);
_16.y1=Math.ceil((this.imgH-this.options.ratioDim.y)/2);
_16.x2=_16.x1+this.options.ratioDim.x;
_16.y2=_16.y1+this.options.ratioDim.y;
Element.show(this.selArea);
this.drawArea();
this.endCrop();
}
this.attached=true;
},remove:function(){
this.attached=false;
this.imgWrap.parentNode.insertBefore(this.img,this.imgWrap);
this.imgWrap.parentNode.removeChild(this.imgWrap);
Event.stopObserving(this.dragArea,"mousedown",this.startDrag.bindAsEventListener(this));
Event.stopObserving(document,"mousemove",this.onDrag.bindAsEventListener(this));
Event.stopObserving(document,"mouseup",this.endCrop.bindAsEventListener(this));
var _17=[this.handleN,this.handleNE,this.handleE,this.handleSE,this.handleS,this.handleSW,this.handleW,this.handleNW];
for(var i=0;i<_17.length;i++){
Event.stopObserving(_17[i],"mousedown",this.startResize.bindAsEventListener(this));
}
if(this.options.captureKeys){
Event.stopObserving(document,"keydown",this.handleKeys.bindAsEventListener(this));
}
},reset:function(){
if(!this.attached){
this.onLoad();
}else{
this.setParams();
}
this.endCrop();
},handleKeys:function(e){
var dir={x:0,y:0};
if(!this.dragging){
switch(e.keyCode){
case (37):
dir.x=-1;
break;
case (38):
dir.y=-1;
break;
case (39):
dir.x=1;
break;
case (40):
dir.y=1;
break;
}
if(dir.x!=0||dir.y!=0){
if(e.shiftKey){
dir.x*=10;
dir.y*=10;
}
this.moveArea([this.areaCoords.x1+dir.x,this.areaCoords.y1+dir.y]);
Event.stop(e);
}
}
},calcW:function(){
return (this.areaCoords.x2-this.areaCoords.x1);
},calcH:function(){
return (this.areaCoords.y2-this.areaCoords.y1);
},moveArea:function(_1b){
this.setAreaCoords({x1:_1b[0],y1:_1b[1],x2:_1b[0]+this.calcW(),y2:_1b[1]+this.calcH()},true);
this.drawArea();
},cloneCoords:function(_1c){
return {x1:_1c.x1,y1:_1c.y1,x2:_1c.x2,y2:_1c.y2};
},setAreaCoords:function(_1d,_1e,_1f,_20,_21){
var _22=typeof _1e!="undefined"?_1e:false;
var _23=typeof _1f!="undefined"?_1f:false;
if(_1e){
var _24=_1d.x2-_1d.x1;
var _25=_1d.y2-_1d.y1;
if(_1d.x1<0){
_1d.x1=0;
_1d.x2=_24;
}
if(_1d.y1<0){
_1d.y1=0;
_1d.y2=_25;
}
if(_1d.x2>this.imgW){
_1d.x2=this.imgW;
_1d.x1=this.imgW-_24;
}
if(_1d.y2>this.imgH){
_1d.y2=this.imgH;
_1d.y1=this.imgH-_25;
}
}else{
if(_1d.x1<0){
_1d.x1=0;
}
if(_1d.y1<0){
_1d.y1=0;
}
if(_1d.x2>this.imgW){
_1d.x2=this.imgW;
}
if(_1d.y2>this.imgH){
_1d.y2=this.imgH;
}
if(typeof (_20)!="undefined"){
if(this.ratioX>0){
this.applyRatio(_1d,{x:this.ratioX,y:this.ratioY},_20,_21);
}else{
if(_23){
this.applyRatio(_1d,{x:1,y:1},_20,_21);
}
}
var _26={a1:_1d.x1,a2:_1d.x2};
var _27={a1:_1d.y1,a2:_1d.y2};
var _28=this.options.minWidth;
var _29=this.options.minHeight;
if((_28==0||_29==0)&&_23){
if(_28>0){
_29=_28;
}else{
if(_29>0){
_28=_29;
}
}
}
this.applyMinDimension(_26,_28,_20.x,{min:0,max:this.imgW});
this.applyMinDimension(_27,_29,_20.y,{min:0,max:this.imgH});
_1d={x1:_26.a1,y1:_27.a1,x2:_26.a2,y2:_27.a2};
}
}
this.areaCoords=_1d;
},applyMinDimension:function(_2a,_2b,_2c,_2d){
if((_2a.a2-_2a.a1)<_2b){
if(_2c==1){
_2a.a2=_2a.a1+_2b;
}else{
_2a.a1=_2a.a2-_2b;
}
if(_2a.a1<_2d.min){
_2a.a1=_2d.min;
_2a.a2=_2b;
}else{
if(_2a.a2>_2d.max){
_2a.a1=_2d.max-_2b;
_2a.a2=_2d.max;
}
}
}
},applyRatio:function(_2e,_2f,_30,_31){
var _32;
if(_31=="N"||_31=="S"){
_32=this.applyRatioToAxis({a1:_2e.y1,b1:_2e.x1,a2:_2e.y2,b2:_2e.x2},{a:_2f.y,b:_2f.x},{a:_30.y,b:_30.x},{min:0,max:this.imgW});
_2e.x1=_32.b1;
_2e.y1=_32.a1;
_2e.x2=_32.b2;
_2e.y2=_32.a2;
}else{
_32=this.applyRatioToAxis({a1:_2e.x1,b1:_2e.y1,a2:_2e.x2,b2:_2e.y2},{a:_2f.x,b:_2f.y},{a:_30.x,b:_30.y},{min:0,max:this.imgH});
_2e.x1=_32.a1;
_2e.y1=_32.b1;
_2e.x2=_32.a2;
_2e.y2=_32.b2;
}
},applyRatioToAxis:function(_33,_34,_35,_36){
var _37=Object.extend(_33,{});
var _38=_37.a2-_37.a1;
var _3a=Math.floor(_38*_34.b/_34.a);
var _3b;
var _3c;
var _3d=null;
if(_35.b==1){
_3b=_37.b1+_3a;
if(_3b>_36.max){
_3b=_36.max;
_3d=_3b-_37.b1;
}
_37.b2=_3b;
}else{
_3b=_37.b2-_3a;
if(_3b<_36.min){
_3b=_36.min;
_3d=_3b+_37.b2;
}
_37.b1=_3b;
}
if(_3d!=null){
_3c=Math.floor(_3d*_34.a/_34.b);
if(_35.a==1){
_37.a2=_37.a1+_3c;
}else{
_37.a1=_37.a1=_37.a2-_3c;
}
}
return _37;
},drawArea:function(){
if(!this.isIE){
Element.show($(this.overlay));
}
var _3e=this.calcW();
var _3f=this.calcH();
var _40=this.areaCoords.x2;
var _41=this.areaCoords.y2;
var _42=this.selArea.style;
_42.left=this.areaCoords.x1+"px";
_42.top=this.areaCoords.y1+"px";
_42.width=_3e+"px";
_42.height=_3f+"px";
var _43=Math.ceil((_3e-6)/2)+"px";
var _44=Math.ceil((_3f-6)/2)+"px";
this.handleN.style.left=_43;
this.handleE.style.top=_44;
this.handleS.style.left=_43;
this.handleW.style.top=_44;
if(this.isIE){
this.north.style.height=this.areaCoords.y1+"px";
var _45=this.east.style;
_45.top=this.areaCoords.y1+"px";
_45.height=_3f+"px";
_45.left=_40+"px";
_45.width=(this.img.width-_40)+"px";
var _46=this.south.style;
_46.top=_41+"px";
_46.height=(this.img.height-_41)+"px";
var _47=this.west.style;
_47.top=this.areaCoords.y1+"px";
_47.height=_3f+"px";
_47.width=this.areaCoords.x1+"px";
}else{
_42.backgroundPosition="-"+this.areaCoords.x1+"px "+"-"+this.areaCoords.y1+"px";
}
this.subDrawArea();
this.forceReRender();
},forceReRender:function(){
if(this.isIE||this.isWebKit){
var n=document.createTextNode(" ");
var d,el,fixEL,i;
if(this.isIE){
fixEl=this.selArea;
}else{
if(this.isWebKit){
fixEl=document.getElementsByClassName("imgCrop_marqueeSouth",this.imgWrap)[0];
d=Builder.node("div","");
d.style.visibility="hidden";
var _4a=["SE","S","SW"];
for(i=0;i<_4a.length;i++){
el=document.getElementsByClassName("imgCrop_handle"+_4a[i],this.selArea)[0];
if(el.childNodes.length){
el.removeChild(el.childNodes[0]);
}
el.appendChild(d);
}
}
}
fixEl.appendChild(n);
fixEl.removeChild(n);
}
},startResize:function(e){
this.startCoords=this.cloneCoords(this.areaCoords);
this.resizing=true;
this.resizeHandle=Element.classNames(Event.element(e)).toString().replace(/([^N|NE|E|SE|S|SW|W|NW])+/,"");
Event.stop(e);
},startDrag:function(e){
Element.show(this.selArea);
this.clickCoords=this.getCurPos(e);
this.setAreaCoords({x1:this.clickCoords.x,y1:this.clickCoords.y,x2:this.clickCoords.x,y2:this.clickCoords.y});
this.dragging=true;
this.onDrag(e);
Event.stop(e);
},getCurPos:function(e){
return curPos={x:Event.pointerX(e)-this.wrapOffsets.left,y:Event.pointerY(e)-this.wrapOffsets.top};
},onDrag:function(e){
var _4f=null;
if(this.dragging||this.resizing){
var _50=this.getCurPos(e);
var _51=this.cloneCoords(this.areaCoords);
var _52={x:1,y:1};
}
if(this.dragging){
if(_50.x<this.clickCoords.x){
_52.x=-1;
}
if(_50.y<this.clickCoords.y){
_52.y=-1;
}
this.transformCoords(_50.x,this.clickCoords.x,_51,"x");
this.transformCoords(_50.y,this.clickCoords.y,_51,"y");
}else{
if(this.resizing){
_4f=this.resizeHandle;
if(_4f.match(/E/)){
this.transformCoords(_50.x,this.startCoords.x1,_51,"x");
if(_50.x<this.startCoords.x1){
_52.x=-1;
}
}else{
if(_4f.match(/W/)){
this.transformCoords(_50.x,this.startCoords.x2,_51,"x");
if(_50.x<this.startCoords.x2){
_52.x=-1;
}
}
}
if(_4f.match(/N/)){
this.transformCoords(_50.y,this.startCoords.y2,_51,"y");
if(_50.y<this.startCoords.y2){
_52.y=-1;
}
}else{
if(_4f.match(/S/)){
this.transformCoords(_50.y,this.startCoords.y1,_51,"y");
if(_50.y<this.startCoords.y1){
_52.y=-1;
}
}
}
}
}
if(this.dragging||this.resizing){
this.setAreaCoords(_51,false,e.shiftKey,_52,_4f);
this.drawArea();
Event.stop(e);
}
},transformCoords:function(_53,_54,_55,_56){
var _57=new Array();
if(_53<_54){
_57[0]=_53;
_57[1]=_54;
}else{
_57[0]=_54;
_57[1]=_53;
}
if(_56=="x"){
_55.x1=_57[0];
_55.x2=_57[1];
}else{
_55.y1=_57[0];
_55.y2=_57[1];
}
},endCrop:function(){
this.dragging=false;
this.resizing=false;
this.options.onEndCrop(this.areaCoords,{width:this.calcW(),height:this.calcH()});
},subInitialize:function(){
},subDrawArea:function(){
}};
Cropper.ImgWithPreview=Class.create();
Object.extend(Object.extend(Cropper.ImgWithPreview.prototype,Cropper.Img.prototype),{subInitialize:function(){
this.hasPreviewImg=false;
if(typeof (this.options.previewWrap)!="undefined"&&this.options.minWidth>0&&this.options.minHeight>0){
this.previewWrap=$(this.options.previewWrap);
this.previewImg=this.img.cloneNode(false);
this.options.displayOnInit=true;
this.hasPreviewImg=true;
Element.addClassName(this.previewWrap,"imgCrop_previewWrap");
Element.setStyle(this.previewWrap,{width:this.options.minWidth+"px",height:this.options.minHeight+"px"});
this.previewWrap.appendChild(this.previewImg);
}
},subDrawArea:function(){
if(this.hasPreviewImg){
var _58=this.calcW();
var _59=this.calcH();
var _5a={x:this.imgW/_58,y:this.imgH/_59};
var _5b={x:_58/this.options.minWidth,y:_59/this.options.minHeight};
var _5c={w:Math.ceil(this.options.minWidth*_5a.x)+"px",h:Math.ceil(this.options.minHeight*_5a.y)+"px",x:"-"+Math.ceil(this.areaCoords.x1/_5b.x)+"px",y:"-"+Math.ceil(this.areaCoords.y1/_5b.y)+"px"};
var _5d=this.previewImg.style;
_5d.width=_5c.w;
_5d.height=_5c.h;
_5d.left=_5c.x;
_5d.top=_5c.y;
}
}});
                                                                                                                                                                                                                                                                                                                                                                                                                           crop/marqueeHoriz.gif                                                                               0000644                 00000000425 15212563755 0010665 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       GIF89a   ñ ªªª   ÿÿÿ   !ÿNETSCAPE2.0   !ù   ,       @Œ	‡Êº, !ù   ,       D †ËçP( !ù   ,      D †ËçP( !ù   ,      D †ËçP( !ù   ,      D †ËçP( !ù   ,       ¡†Ëç( !ù   ,      ¡†Ëç( !ù   ,      ¡†Ëç( ;                                                                                                                                                                                                                                           crop/marqueeVert.gif                                                                                0000644                 00000000445 15212563755 0010514 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       GIF89a ( ñ ªªª   ÿÿÿ   !ÿNETSCAPE2.0   !ù   ,     (  
Œ	‡Êº|ª  !ù   ,     %  
D †ËçPZ²  !ù   ,    %  
D †ËçPZ²  !ù   ,    %  
D †ËçPZ²  !ù   ,    %  
D †ËçPZ²  !ù   ,     %  
¡†ËçPZ²  !ù   ,    %  
¡†ËçPZ²  !ù   ,    %  
¡†ËçPZ²  ;                                                                                                                                                                                                                           customize-base.js                                                                                   0000644                 00000062336 15212563755 0010061 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/customize-base.js
 */

/** @namespace wp */
window.wp = window.wp || {};

(function( exports, $ ){
	var api = {}, ctor, inherits,
		slice = Array.prototype.slice;

	// Shared empty constructor function to aid in prototype-chain creation.
	ctor = function() {};

	/**
	 * Helper function to correctly set up the prototype chain, for subclasses.
	 * Similar to `goog.inherits`, but uses a hash of prototype properties and
	 * class properties to be extended.
	 *
	 * @param object parent      Parent class constructor to inherit from.
	 * @param object protoProps  Properties to apply to the prototype for use as class instance properties.
	 * @param object staticProps Properties to apply directly to the class constructor.
	 * @return child The subclassed constructor.
	 */
	inherits = function( parent, protoProps, staticProps ) {
		var child;

		/*
		 * The constructor function for the new subclass is either defined by you
		 * (the "constructor" property in your `extend` definition), or defaulted
		 * by us to simply call `super()`.
		 */
		if ( protoProps && protoProps.hasOwnProperty( 'constructor' ) ) {
			child = protoProps.constructor;
		} else {
			child = function() {
				/*
				 * Storing the result `super()` before returning the value
				 * prevents a bug in Opera where, if the constructor returns
				 * a function, Opera will reject the return value in favor of
				 * the original object. This causes all sorts of trouble.
				 */
				var result = parent.apply( this, arguments );
				return result;
			};
		}

		// Inherit class (static) properties from parent.
		$.extend( child, parent );

		// Set the prototype chain to inherit from `parent`,
		// without calling `parent`'s constructor function.
		ctor.prototype  = parent.prototype;
		child.prototype = new ctor();

		// Add prototype properties (instance properties) to the subclass,
		// if supplied.
		if ( protoProps ) {
			$.extend( child.prototype, protoProps );
		}

		// Add static properties to the constructor function, if supplied.
		if ( staticProps ) {
			$.extend( child, staticProps );
		}

		// Correctly set child's `prototype.constructor`.
		child.prototype.constructor = child;

		// Set a convenience property in case the parent's prototype is needed later.
		child.__super__ = parent.prototype;

		return child;
	};

	/**
	 * Base class for object inheritance.
	 */
	api.Class = function( applicator, argsArray, options ) {
		var magic, args = arguments;

		if ( applicator && argsArray && api.Class.applicator === applicator ) {
			args = argsArray;
			$.extend( this, options || {} );
		}

		magic = this;

		/*
		 * If the class has a method called "instance",
		 * the return value from the class' constructor will be a function that
		 * calls the "instance" method.
		 *
		 * It is also an object that has properties and methods inside it.
		 */
		if ( this.instance ) {
			magic = function() {
				return magic.instance.apply( magic, arguments );
			};

			$.extend( magic, this );
		}

		magic.initialize.apply( magic, args );
		return magic;
	};

	/**
	 * Creates a subclass of the class.
	 *
	 * @param object protoProps  Properties to apply to the prototype.
	 * @param object staticProps Properties to apply directly to the class.
	 * @return child The subclass.
	 */
	api.Class.extend = function( protoProps, staticProps ) {
		var child = inherits( this, protoProps, staticProps );
		child.extend = this.extend;
		return child;
	};

	api.Class.applicator = {};

	/**
	 * Initialize a class instance.
	 *
	 * Override this function in a subclass as needed.
	 */
	api.Class.prototype.initialize = function() {};

	/*
	 * Checks whether a given instance extended a constructor.
	 *
	 * The magic surrounding the instance parameter causes the instanceof
	 * keyword to return inaccurate results; it defaults to the function's
	 * prototype instead of the constructor chain. Hence this function.
	 */
	api.Class.prototype.extended = function( constructor ) {
		var proto = this;

		while ( typeof proto.constructor !== 'undefined' ) {
			if ( proto.constructor === constructor ) {
				return true;
			}
			if ( typeof proto.constructor.__super__ === 'undefined' ) {
				return false;
			}
			proto = proto.constructor.__super__;
		}
		return false;
	};

	/**
	 * An events manager object, offering the ability to bind to and trigger events.
	 *
	 * Used as a mixin.
	 */
	api.Events = {
		trigger: function( id ) {
			if ( this.topics && this.topics[ id ] ) {
				this.topics[ id ].fireWith( this, slice.call( arguments, 1 ) );
			}
			return this;
		},

		bind: function( id ) {
			this.topics = this.topics || {};
			this.topics[ id ] = this.topics[ id ] || $.Callbacks();
			this.topics[ id ].add.apply( this.topics[ id ], slice.call( arguments, 1 ) );
			return this;
		},

		unbind: function( id ) {
			if ( this.topics && this.topics[ id ] ) {
				this.topics[ id ].remove.apply( this.topics[ id ], slice.call( arguments, 1 ) );
			}
			return this;
		}
	};

	/**
	 * Observable values that support two-way binding.
	 *
	 * @memberOf wp.customize
	 * @alias wp.customize.Value
	 *
	 * @constructor
	 */
	api.Value = api.Class.extend(/** @lends wp.customize.Value.prototype */{
		/**
		 * @param {mixed}  initial The initial value.
		 * @param {Object} options
		 */
		initialize: function( initial, options ) {
			this._value = initial; // @todo Potentially change this to a this.set() call.
			this.callbacks = $.Callbacks();
			this._dirty = false;

			$.extend( this, options || {} );

			this.set = this.set.bind( this );
		},

		/*
		 * Magic. Returns a function that will become the instance.
		 * Set to null to prevent the instance from extending a function.
		 */
		instance: function() {
			return arguments.length ? this.set.apply( this, arguments ) : this.get();
		},

		/**
		 * Get the value.
		 *
		 * @return {mixed}
		 */
		get: function() {
			return this._value;
		},

		/**
		 * Set the value and trigger all bound callbacks.
		 *
		 * @param {Object} to New value.
		 */
		set: function( to ) {
			var from = this._value;

			to = this._setter.apply( this, arguments );
			to = this.validate( to );

			// Bail if the sanitized value is null or unchanged.
			if ( null === to || _.isEqual( from, to ) ) {
				return this;
			}

			this._value = to;
			this._dirty = true;

			this.callbacks.fireWith( this, [ to, from ] );

			return this;
		},

		_setter: function( to ) {
			return to;
		},

		setter: function( callback ) {
			var from = this.get();
			this._setter = callback;
			// Temporarily clear value so setter can decide if it's valid.
			this._value = null;
			this.set( from );
			return this;
		},

		resetSetter: function() {
			this._setter = this.constructor.prototype._setter;
			this.set( this.get() );
			return this;
		},

		validate: function( value ) {
			return value;
		},

		/**
		 * Bind a function to be invoked whenever the value changes.
		 *
		 * @param {...Function} A function, or multiple functions, to add to the callback stack.
		 */
		bind: function() {
			this.callbacks.add.apply( this.callbacks, arguments );
			return this;
		},

		/**
		 * Unbind a previously bound function.
		 *
		 * @param {...Function} A function, or multiple functions, to remove from the callback stack.
		 */
		unbind: function() {
			this.callbacks.remove.apply( this.callbacks, arguments );
			return this;
		},

		link: function() { // values*
			var set = this.set;
			$.each( arguments, function() {
				this.bind( set );
			});
			return this;
		},

		unlink: function() { // values*
			var set = this.set;
			$.each( arguments, function() {
				this.unbind( set );
			});
			return this;
		},

		sync: function() { // values*
			var that = this;
			$.each( arguments, function() {
				that.link( this );
				this.link( that );
			});
			return this;
		},

		unsync: function() { // values*
			var that = this;
			$.each( arguments, function() {
				that.unlink( this );
				this.unlink( that );
			});
			return this;
		}
	});

	/**
	 * A collection of observable values.
	 *
	 * @memberOf wp.customize
	 * @alias wp.customize.Values
	 *
	 * @constructor
	 * @augments wp.customize.Class
	 * @mixes wp.customize.Events
	 */
	api.Values = api.Class.extend(/** @lends wp.customize.Values.prototype */{

		/**
		 * The default constructor for items of the collection.
		 *
		 * @type {object}
		 */
		defaultConstructor: api.Value,

		initialize: function( options ) {
			$.extend( this, options || {} );

			this._value = {};
			this._deferreds = {};
		},

		/**
		 * Get the instance of an item from the collection if only ID is specified.
		 *
		 * If more than one argument is supplied, all are expected to be IDs and
		 * the last to be a function callback that will be invoked when the requested
		 * items are available.
		 *
		 * @see {api.Values.when}
		 *
		 * @param {string} id ID of the item.
		 * @param {...}       Zero or more IDs of items to wait for and a callback
		 *                    function to invoke when they're available. Optional.
		 * @return {mixed} The item instance if only one ID was supplied.
		 *                 A Deferred Promise object if a callback function is supplied.
		 */
		instance: function( id ) {
			if ( arguments.length === 1 ) {
				return this.value( id );
			}

			return this.when.apply( this, arguments );
		},

		/**
		 * Get the instance of an item.
		 *
		 * @param {string} id The ID of the item.
		 * @return {[type]} [description]
		 */
		value: function( id ) {
			return this._value[ id ];
		},

		/**
		 * Whether the collection has an item with the given ID.
		 *
		 * @param {string} id The ID of the item to look for.
		 * @return {boolean}
		 */
		has: function( id ) {
			return typeof this._value[ id ] !== 'undefined';
		},

		/**
		 * Add an item to the collection.
		 *
		 * @param {string|wp.customize.Class} item         - The item instance to add, or the ID for the instance to add.
		 *                                                   When an ID string is supplied, then itemObject must be provided.
		 * @param {wp.customize.Class}        [itemObject] - The item instance when the first argument is an ID string.
		 * @return {wp.customize.Class} The new item's instance, or an existing instance if already added.
		 */
		add: function( item, itemObject ) {
			var collection = this, id, instance;
			if ( 'string' === typeof item ) {
				id = item;
				instance = itemObject;
			} else {
				if ( 'string' !== typeof item.id ) {
					throw new Error( 'Unknown key' );
				}
				id = item.id;
				instance = item;
			}

			if ( collection.has( id ) ) {
				return collection.value( id );
			}

			collection._value[ id ] = instance;
			instance.parent = collection;

			// Propagate a 'change' event on an item up to the collection.
			if ( instance.extended( api.Value ) ) {
				instance.bind( collection._change );
			}

			collection.trigger( 'add', instance );

			// If a deferred object exists for this item,
			// resolve it.
			if ( collection._deferreds[ id ] ) {
				collection._deferreds[ id ].resolve();
			}

			return collection._value[ id ];
		},

		/**
		 * Create a new item of the collection using the collection's default constructor
		 * and store it in the collection.
		 *
		 * @param {string} id    The ID of the item.
		 * @param {mixed}  value Any extra arguments are passed into the item's initialize method.
		 * @return {mixed} The new item's instance.
		 */
		create: function( id ) {
			return this.add( id, new this.defaultConstructor( api.Class.applicator, slice.call( arguments, 1 ) ) );
		},

		/**
		 * Iterate over all items in the collection invoking the provided callback.
		 *
		 * @param {Function} callback Function to invoke.
		 * @param {Object}   context  Object context to invoke the function with. Optional.
		 */
		each: function( callback, context ) {
			context = typeof context === 'undefined' ? this : context;

			$.each( this._value, function( key, obj ) {
				callback.call( context, obj, key );
			});
		},

		/**
		 * Remove an item from the collection.
		 *
		 * @param {string} id The ID of the item to remove.
		 */
		remove: function( id ) {
			var value = this.value( id );

			if ( value ) {

				// Trigger event right before the element is removed from the collection.
				this.trigger( 'remove', value );

				if ( value.extended( api.Value ) ) {
					value.unbind( this._change );
				}
				delete value.parent;
			}

			delete this._value[ id ];
			delete this._deferreds[ id ];

			// Trigger removed event after the item has been eliminated from the collection.
			if ( value ) {
				this.trigger( 'removed', value );
			}
		},

		/**
		 * Runs a callback once all requested values exist.
		 *
		 * when( ids*, [callback] );
		 *
		 * For example:
		 *     when( id1, id2, id3, function( value1, value2, value3 ) {} );
		 *
		 * @return $.Deferred.promise();
		 */
		when: function() {
			var self = this,
				ids  = slice.call( arguments ),
				dfd  = $.Deferred();

			// If the last argument is a callback, bind it to .done().
			if ( typeof ids[ ids.length - 1 ] === 'function' ) {
				dfd.done( ids.pop() );
			}

			/*
			 * Create a stack of deferred objects for each item that is not
			 * yet available, and invoke the supplied callback when they are.
			 */
			$.when.apply( $, $.map( ids, function( id ) {
				if ( self.has( id ) ) {
					return;
				}

				/*
				 * The requested item is not available yet, create a deferred
				 * object to resolve when it becomes available.
				 */
				return self._deferreds[ id ] = self._deferreds[ id ] || $.Deferred();
			})).done( function() {
				var values = $.map( ids, function( id ) {
						return self( id );
					});

				// If a value is missing, we've used at least one expired deferred.
				// Call Values.when again to generate a new deferred.
				if ( values.length !== ids.length ) {
					// ids.push( callback );
					self.when.apply( self, ids ).done( function() {
						dfd.resolveWith( self, values );
					});
					return;
				}

				dfd.resolveWith( self, values );
			});

			return dfd.promise();
		},

		/**
		 * A helper function to propagate a 'change' event from an item
		 * to the collection itself.
		 */
		_change: function() {
			this.parent.trigger( 'change', this );
		}
	});

	// Create a global events bus on the Customizer.
	$.extend( api.Values.prototype, api.Events );


	/**
	 * Cast a string to a jQuery collection if it isn't already.
	 *
	 * @param {string|jQuery collection} element
	 */
	api.ensure = function( element ) {
		return typeof element === 'string' ? $( element ) : element;
	};

	/**
	 * An observable value that syncs with an element.
	 *
	 * Handles inputs, selects, and textareas by default.
	 *
	 * @memberOf wp.customize
	 * @alias wp.customize.Element
	 *
	 * @constructor
	 * @augments wp.customize.Value
	 * @augments wp.customize.Class
	 */
	api.Element = api.Value.extend(/** @lends wp.customize.Element */{
		initialize: function( element, options ) {
			var self = this,
				synchronizer = api.Element.synchronizer.html,
				type, update, refresh;

			this.element = api.ensure( element );
			this.events = '';

			if ( this.element.is( 'input, select, textarea' ) ) {
				type = this.element.prop( 'type' );
				this.events += ' change input';
				synchronizer = api.Element.synchronizer.val;

				if ( this.element.is( 'input' ) && api.Element.synchronizer[ type ] ) {
					synchronizer = api.Element.synchronizer[ type ];
				}
			}

			api.Value.prototype.initialize.call( this, null, $.extend( options || {}, synchronizer ) );
			this._value = this.get();

			update = this.update;
			refresh = this.refresh;

			this.update = function( to ) {
				if ( to !== refresh.call( self ) ) {
					update.apply( this, arguments );
				}
			};
			this.refresh = function() {
				self.set( refresh.call( self ) );
			};

			this.bind( this.update );
			this.element.on( this.events, this.refresh );
		},

		find: function( selector ) {
			return $( selector, this.element );
		},

		refresh: function() {},

		update: function() {}
	});

	api.Element.synchronizer = {};

	$.each( [ 'html', 'val' ], function( index, method ) {
		api.Element.synchronizer[ method ] = {
			update: function( to ) {
				this.element[ method ]( to );
			},
			refresh: function() {
				return this.element[ method ]();
			}
		};
	});

	api.Element.synchronizer.checkbox = {
		update: function( to ) {
			this.element.prop( 'checked', to );
		},
		refresh: function() {
			return this.element.prop( 'checked' );
		}
	};

	api.Element.synchronizer.radio = {
		update: function( to ) {
			this.element.filter( function() {
				return this.value === to;
			}).prop( 'checked', true );
		},
		refresh: function() {
			return this.element.filter( ':checked' ).val();
		}
	};

	$.support.postMessage = !! window.postMessage;

	/**
	 * A communicator for sending data from one window to another over postMessage.
	 *
	 * @memberOf wp.customize
	 * @alias wp.customize.Messenger
	 *
	 * @constructor
	 * @augments wp.customize.Class
	 * @mixes wp.customize.Events
	 */
	api.Messenger = api.Class.extend(/** @lends wp.customize.Messenger.prototype */{
		/**
		 * Create a new Value.
		 *
		 * @param {string} key     Unique identifier.
		 * @param {mixed}  initial Initial value.
		 * @param {mixed}  options Options hash. Optional.
		 * @return {Value} Class instance of the Value.
		 */
		add: function( key, initial, options ) {
			return this[ key ] = new api.Value( initial, options );
		},

		/**
		 * Initialize Messenger.
		 *
		 * @param {Object} params  - Parameters to configure the messenger.
		 *        {string} params.url          - The URL to communicate with.
		 *        {window} params.targetWindow - The window instance to communicate with. Default window.parent.
		 *        {string} params.channel      - If provided, will send the channel with each message and only accept messages a matching channel.
		 * @param {Object} options - Extend any instance parameter or method with this object.
		 */
		initialize: function( params, options ) {
			// Target the parent frame by default, but only if a parent frame exists.
			var defaultTarget = window.parent === window ? null : window.parent;

			$.extend( this, options || {} );

			this.add( 'channel', params.channel );
			this.add( 'url', params.url || '' );
			this.add( 'origin', this.url() ).link( this.url ).setter( function( to ) {
				var urlParser = document.createElement( 'a' );
				urlParser.href = to;
				// Port stripping needed by IE since it adds to host but not to event.origin.
				return urlParser.protocol + '//' + urlParser.host.replace( /:(80|443)$/, '' );
			});

			// First add with no value.
			this.add( 'targetWindow', null );
			// This avoids SecurityErrors when setting a window object in x-origin iframe'd scenarios.
			this.targetWindow.set = function( to ) {
				var from = this._value;

				to = this._setter.apply( this, arguments );
				to = this.validate( to );

				if ( null === to || from === to ) {
					return this;
				}

				this._value = to;
				this._dirty = true;

				this.callbacks.fireWith( this, [ to, from ] );

				return this;
			};
			// Now set it.
			this.targetWindow( params.targetWindow || defaultTarget );


			/*
			 * Since we want jQuery to treat the receive function as unique
			 * to this instance, we give the function a new guid.
			 *
			 * This will prevent every Messenger's receive function from being
			 * unbound when calling $.off( 'message', this.receive );
			 */
			this.receive = this.receive.bind( this );
			this.receive.guid = $.guid++;

			$( window ).on( 'message', this.receive );
		},

		destroy: function() {
			$( window ).off( 'message', this.receive );
		},

		/**
		 * Receive data from the other window.
		 *
		 * @param {jQuery.Event} event Event with embedded data.
		 */
		receive: function( event ) {
			var message;

			event = event.originalEvent;

			if ( ! this.targetWindow || ! this.targetWindow() ) {
				return;
			}

			// Check to make sure the origin is valid.
			if ( this.origin() && event.origin !== this.origin() ) {
				return;
			}

			// Ensure we have a string that's JSON.parse-able.
			if ( typeof event.data !== 'string' || event.data[0] !== '{' ) {
				return;
			}

			message = JSON.parse( event.data );

			// Check required message properties.
			if ( ! message || ! message.id || typeof message.data === 'undefined' ) {
				return;
			}

			// Check if channel names match.
			if ( ( message.channel || this.channel() ) && this.channel() !== message.channel ) {
				return;
			}

			this.trigger( message.id, message.data );
		},

		/**
		 * Send data to the other window.
		 *
		 * @param {string} id   The event name.
		 * @param {Object} data Data.
		 */
		send: function( id, data ) {
			var message;

			data = typeof data === 'undefined' ? null : data;

			if ( ! this.url() || ! this.targetWindow() ) {
				return;
			}

			message = { id: id, data: data };
			if ( this.channel() ) {
				message.channel = this.channel();
			}

			this.targetWindow().postMessage( JSON.stringify( message ), this.origin() );
		}
	});

	// Add the Events mixin to api.Messenger.
	$.extend( api.Messenger.prototype, api.Events );

	/**
	 * Notification.
	 *
	 * @class
	 * @augments wp.customize.Class
	 * @since 4.6.0
	 *
	 * @memberOf wp.customize
	 * @alias wp.customize.Notification
	 *
	 * @param {string}  code - The error code.
	 * @param {object}  params - Params.
	 * @param {string}  params.message=null - The error message.
	 * @param {string}  [params.type=error] - The notification type.
	 * @param {boolean} [params.fromServer=false] - Whether the notification was server-sent.
	 * @param {string}  [params.setting=null] - The setting ID that the notification is related to.
	 * @param {*}       [params.data=null] - Any additional data.
	 */
	api.Notification = api.Class.extend(/** @lends wp.customize.Notification.prototype */{

		/**
		 * Template function for rendering the notification.
		 *
		 * This will be populated with template option or else it will be populated with template from the ID.
		 *
		 * @since 4.9.0
		 * @var {Function}
		 */
		template: null,

		/**
		 * ID for the template to render the notification.
		 *
		 * @since 4.9.0
		 * @var {string}
		 */
		templateId: 'customize-notification',

		/**
		 * Additional class names to add to the notification container.
		 *
		 * @since 4.9.0
		 * @var {string}
		 */
		containerClasses: '',

		/**
		 * Initialize notification.
		 *
		 * @since 4.9.0
		 *
		 * @param {string}   code - Notification code.
		 * @param {Object}   params - Notification parameters.
		 * @param {string}   params.message - Message.
		 * @param {string}   [params.type=error] - Type.
		 * @param {string}   [params.setting] - Related setting ID.
		 * @param {Function} [params.template] - Function for rendering template. If not provided, this will come from templateId.
		 * @param {string}   [params.templateId] - ID for template to render the notification.
		 * @param {string}   [params.containerClasses] - Additional class names to add to the notification container.
		 * @param {boolean}  [params.dismissible] - Whether the notification can be dismissed.
		 */
		initialize: function( code, params ) {
			var _params;
			this.code = code;
			_params = _.extend(
				{
					message: null,
					type: 'error',
					fromServer: false,
					data: null,
					setting: null,
					template: null,
					dismissible: false,
					containerClasses: ''
				},
				params
			);
			delete _params.code;
			_.extend( this, _params );
		},

		/**
		 * Render the notification.
		 *
		 * @since 4.9.0
		 *
		 * @return {jQuery} Notification container element.
		 */
		render: function() {
			var notification = this, container, data;
			if ( ! notification.template ) {
				notification.template = wp.template( notification.templateId );
			}
			data = _.extend( {}, notification, {
				alt: notification.parent && notification.parent.alt
			} );
			container = $( notification.template( data ) );

			if ( notification.dismissible ) {
				container.find( '.notice-dismiss' ).on( 'click keydown', function( event ) {
					if ( 'keydown' === event.type && 13 !== event.which ) {
						return;
					}

					if ( notification.parent ) {
						notification.parent.remove( notification.code );
					} else {
						container.remove();
					}
				});
			}

			return container;
		}
	});

	// The main API object is also a collection of all customizer settings.
	api = $.extend( new api.Values(), api );

	/**
	 * Get all customize settings.
	 *
	 * @alias wp.customize.get
	 *
	 * @return {Object}
	 */
	api.get = function() {
		var result = {};

		this.each( function( obj, key ) {
			result[ key ] = obj.get();
		});

		return result;
	};

	/**
	 * Utility function namespace
	 *
	 * @namespace wp.customize.utils
	 */
	api.utils = {};

	/**
	 * Parse query string.
	 *
	 * @since 4.7.0
	 * @access public
	 *
	 * @alias wp.customize.utils.parseQueryString
	 *
	 * @param {string} queryString Query string.
	 * @return {Object} Parsed query string.
	 */
	api.utils.parseQueryString = function parseQueryString( queryString ) {
		var queryParams = {};
		_.each( queryString.split( '&' ), function( pair ) {
			var parts, key, value;
			parts = pair.split( '=', 2 );
			if ( ! parts[0] ) {
				return;
			}
			key = decodeURIComponent( parts[0].replace( /\+/g, ' ' ) );
			key = key.replace( / /g, '_' ); // What PHP does.
			if ( _.isUndefined( parts[1] ) ) {
				value = null;
			} else {
				value = decodeURIComponent( parts[1].replace( /\+/g, ' ' ) );
			}
			queryParams[ key ] = value;
		} );
		return queryParams;
	};

	/**
	 * Expose the API publicly on window.wp.customize
	 *
	 * @namespace wp.customize
	 */
	exports.customize = api;
})( wp, jQuery );
                                                                                                                                                                                                                                                                                                  customize-base.min.js                                                                               0000644                 00000017254 15212563755 0010642 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
window.wp=window.wp||{},function(t,a){var o={},s=Array.prototype.slice,r=function(){},n=function(t,e,n){var i=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return t.apply(this,arguments)};return a.extend(i,t),r.prototype=t.prototype,i.prototype=new r,e&&a.extend(i.prototype,e),n&&a.extend(i,n),(i.prototype.constructor=i).__super__=t.prototype,i};o.Class=function(t,e,n){var i,s=arguments;return t&&e&&o.Class.applicator===t&&(s=e,a.extend(this,n||{})),(i=this).instance&&(i=function(){return i.instance.apply(i,arguments)},a.extend(i,this)),i.initialize.apply(i,s),i},o.Class.extend=function(t,e){t=n(this,t,e);return t.extend=this.extend,t},o.Class.applicator={},o.Class.prototype.initialize=function(){},o.Class.prototype.extended=function(t){for(var e=this;void 0!==e.constructor;){if(e.constructor===t)return!0;if(void 0===e.constructor.__super__)return!1;e=e.constructor.__super__}return!1},o.Events={trigger:function(t){return this.topics&&this.topics[t]&&this.topics[t].fireWith(this,s.call(arguments,1)),this},bind:function(t){return this.topics=this.topics||{},this.topics[t]=this.topics[t]||a.Callbacks(),this.topics[t].add.apply(this.topics[t],s.call(arguments,1)),this},unbind:function(t){return this.topics&&this.topics[t]&&this.topics[t].remove.apply(this.topics[t],s.call(arguments,1)),this}},o.Value=o.Class.extend({initialize:function(t,e){this._value=t,this.callbacks=a.Callbacks(),this._dirty=!1,a.extend(this,e||{}),this.set=this.set.bind(this)},instance:function(){return arguments.length?this.set.apply(this,arguments):this.get()},get:function(){return this._value},set:function(t){var e=this._value;return t=this._setter.apply(this,arguments),null===(t=this.validate(t))||_.isEqual(e,t)||(this._value=t,this._dirty=!0,this.callbacks.fireWith(this,[t,e])),this},_setter:function(t){return t},setter:function(t){var e=this.get();return this._setter=t,this._value=null,this.set(e),this},resetSetter:function(){return this._setter=this.constructor.prototype._setter,this.set(this.get()),this},validate:function(t){return t},bind:function(){return this.callbacks.add.apply(this.callbacks,arguments),this},unbind:function(){return this.callbacks.remove.apply(this.callbacks,arguments),this},link:function(){var t=this.set;return a.each(arguments,function(){this.bind(t)}),this},unlink:function(){var t=this.set;return a.each(arguments,function(){this.unbind(t)}),this},sync:function(){var t=this;return a.each(arguments,function(){t.link(this),this.link(t)}),this},unsync:function(){var t=this;return a.each(arguments,function(){t.unlink(this),this.unlink(t)}),this}}),o.Values=o.Class.extend({defaultConstructor:o.Value,initialize:function(t){a.extend(this,t||{}),this._value={},this._deferreds={}},instance:function(t){return 1===arguments.length?this.value(t):this.when.apply(this,arguments)},value:function(t){return this._value[t]},has:function(t){return void 0!==this._value[t]},add:function(t,e){var n,i,s=this;if("string"==typeof t)n=t,i=e;else{if("string"!=typeof t.id)throw new Error("Unknown key");n=t.id,i=t}return s.has(n)?s.value(n):((s._value[n]=i).parent=s,i.extended(o.Value)&&i.bind(s._change),s.trigger("add",i),s._deferreds[n]&&s._deferreds[n].resolve(),s._value[n])},create:function(t){return this.add(t,new this.defaultConstructor(o.Class.applicator,s.call(arguments,1)))},each:function(n,i){i=void 0===i?this:i,a.each(this._value,function(t,e){n.call(i,e,t)})},remove:function(t){var e=this.value(t);e&&(this.trigger("remove",e),e.extended(o.Value)&&e.unbind(this._change),delete e.parent),delete this._value[t],delete this._deferreds[t],e&&this.trigger("removed",e)},when:function(){var e=this,n=s.call(arguments),i=a.Deferred();return"function"==typeof n[n.length-1]&&i.done(n.pop()),a.when.apply(a,a.map(n,function(t){if(!e.has(t))return e._deferreds[t]=e._deferreds[t]||a.Deferred()})).done(function(){var t=a.map(n,function(t){return e(t)});t.length!==n.length?e.when.apply(e,n).done(function(){i.resolveWith(e,t)}):i.resolveWith(e,t)}),i.promise()},_change:function(){this.parent.trigger("change",this)}}),a.extend(o.Values.prototype,o.Events),o.ensure=function(t){return"string"==typeof t?a(t):t},o.Element=o.Value.extend({initialize:function(t,e){var n,i,s=this,r=o.Element.synchronizer.html;this.element=o.ensure(t),this.events="",this.element.is("input, select, textarea")&&(t=this.element.prop("type"),this.events+=" change input",r=o.Element.synchronizer.val,this.element.is("input"))&&o.Element.synchronizer[t]&&(r=o.Element.synchronizer[t]),o.Value.prototype.initialize.call(this,null,a.extend(e||{},r)),this._value=this.get(),n=this.update,i=this.refresh,this.update=function(t){t!==i.call(s)&&n.apply(this,arguments)},this.refresh=function(){s.set(i.call(s))},this.bind(this.update),this.element.on(this.events,this.refresh)},find:function(t){return a(t,this.element)},refresh:function(){},update:function(){}}),o.Element.synchronizer={},a.each(["html","val"],function(t,e){o.Element.synchronizer[e]={update:function(t){this.element[e](t)},refresh:function(){return this.element[e]()}}}),o.Element.synchronizer.checkbox={update:function(t){this.element.prop("checked",t)},refresh:function(){return this.element.prop("checked")}},o.Element.synchronizer.radio={update:function(t){this.element.filter(function(){return this.value===t}).prop("checked",!0)},refresh:function(){return this.element.filter(":checked").val()}},a.support.postMessage=!!window.postMessage,o.Messenger=o.Class.extend({add:function(t,e,n){return this[t]=new o.Value(e,n)},initialize:function(t,e){var n=window.parent===window?null:window.parent;a.extend(this,e||{}),this.add("channel",t.channel),this.add("url",t.url||""),this.add("origin",this.url()).link(this.url).setter(function(t){var e=document.createElement("a");return e.href=t,e.protocol+"//"+e.host.replace(/:(80|443)$/,"")}),this.add("targetWindow",null),this.targetWindow.set=function(t){var e=this._value;return t=this._setter.apply(this,arguments),null!==(t=this.validate(t))&&e!==t&&(this._value=t,this._dirty=!0,this.callbacks.fireWith(this,[t,e])),this},this.targetWindow(t.targetWindow||n),this.receive=this.receive.bind(this),this.receive.guid=a.guid++,a(window).on("message",this.receive)},destroy:function(){a(window).off("message",this.receive)},receive:function(t){t=t.originalEvent,this.targetWindow&&this.targetWindow()&&(this.origin()&&t.origin!==this.origin()||"string"==typeof t.data&&"{"===t.data[0]&&(t=JSON.parse(t.data))&&t.id&&void 0!==t.data&&((t.channel||this.channel())&&this.channel()!==t.channel||this.trigger(t.id,t.data)))},send:function(t,e){e=void 0===e?null:e,this.url()&&this.targetWindow()&&(t={id:t,data:e},this.channel()&&(t.channel=this.channel()),this.targetWindow().postMessage(JSON.stringify(t),this.origin()))}}),a.extend(o.Messenger.prototype,o.Events),o.Notification=o.Class.extend({template:null,templateId:"customize-notification",containerClasses:"",initialize:function(t,e){this.code=t,delete(t=_.extend({message:null,type:"error",fromServer:!1,data:null,setting:null,template:null,dismissible:!1,containerClasses:""},e)).code,_.extend(this,t)},render:function(){var e,t,n=this;return n.template||(n.template=wp.template(n.templateId)),t=_.extend({},n,{alt:n.parent&&n.parent.alt}),e=a(n.template(t)),n.dismissible&&e.find(".notice-dismiss").on("click keydown",function(t){"keydown"===t.type&&13!==t.which||(n.parent?n.parent.remove(n.code):e.remove())}),e}}),(o=a.extend(new o.Values,o)).get=function(){var n={};return this.each(function(t,e){n[e]=t.get()}),n},o.utils={},o.utils.parseQueryString=function(t){var n={};return _.each(t.split("&"),function(t){var e,t=t.split("=",2);t[0]&&(e=(e=decodeURIComponent(t[0].replace(/\+/g," "))).replace(/ /g,"_"),t=_.isUndefined(t[1])?null:decodeURIComponent(t[1].replace(/\+/g," ")),n[e]=t)}),n},t.customize=o}(wp,jQuery);                                                                                                                                                                                                                                                                                                                                                    customize-loader.js                                                                                 0000644                 00000017337 15212563755 0010416 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/customize-loader.js
 */

/* global _wpCustomizeLoaderSettings */

/**
 * Expose a public API that allows the customizer to be
 * loaded on any page.
 *
 * @namespace wp
 */
window.wp = window.wp || {};

(function( exports, $ ){
	var api = wp.customize,
		Loader;

	$.extend( $.support, {
		history: !! ( window.history && history.pushState ),
		hashchange: ('onhashchange' in window) && (document.documentMode === undefined || document.documentMode > 7)
	});

	/**
	 * Allows the Customizer to be overlaid on any page.
	 *
	 * By default, any element in the body with the load-customize class will open
	 * an iframe overlay with the URL specified.
	 *
	 *     e.g. <a class="load-customize" href="<?php echo wp_customize_url(); ?>">Open Customizer</a>
	 *
	 * @memberOf wp.customize
	 *
	 * @class
	 * @augments wp.customize.Events
	 */
	Loader = $.extend( {}, api.Events,/** @lends wp.customize.Loader.prototype */{
		/**
		 * Setup the Loader; triggered on document#ready.
		 */
		initialize: function() {
			this.body = $( document.body );

			// Ensure the loader is supported.
			// Check for settings, postMessage support, and whether we require CORS support.
			if ( ! Loader.settings || ! $.support.postMessage || ( ! $.support.cors && Loader.settings.isCrossDomain ) ) {
				return;
			}

			this.window  = $( window );
			this.element = $( '<div id="customize-container" />' ).appendTo( this.body );

			// Bind events for opening and closing the overlay.
			this.bind( 'open', this.overlay.show );
			this.bind( 'close', this.overlay.hide );

			// Any element in the body with the `load-customize` class opens
			// the Customizer.
			$('#wpbody').on( 'click', '.load-customize', function( event ) {
				event.preventDefault();

				// Store a reference to the link that opened the Customizer.
				Loader.link = $(this);
				// Load the theme.
				Loader.open( Loader.link.attr('href') );
			});

			// Add navigation listeners.
			if ( $.support.history ) {
				this.window.on( 'popstate', Loader.popstate );
			}

			if ( $.support.hashchange ) {
				this.window.on( 'hashchange', Loader.hashchange );
				this.window.triggerHandler( 'hashchange' );
			}
		},

		popstate: function( e ) {
			var state = e.originalEvent.state;
			if ( state && state.customize ) {
				Loader.open( state.customize );
			} else if ( Loader.active ) {
				Loader.close();
			}
		},

		hashchange: function() {
			var hash = window.location.toString().split('#')[1];

			if ( hash && 0 === hash.indexOf( 'wp_customize=on' ) ) {
				Loader.open( Loader.settings.url + '?' + hash );
			}

			if ( ! hash && ! $.support.history ) {
				Loader.close();
			}
		},

		beforeunload: function () {
			if ( ! Loader.saved() ) {
				return Loader.settings.l10n.saveAlert;
			}
		},

		/**
		 * Open the Customizer overlay for a specific URL.
		 *
		 * @param string src URL to load in the Customizer.
		 */
		open: function( src ) {

			if ( this.active ) {
				return;
			}

			// Load the full page on mobile devices.
			if ( Loader.settings.browser.mobile ) {
				return window.location = src;
			}

			// Store the document title prior to opening the Live Preview.
			this.originalDocumentTitle = document.title;

			this.active = true;
			this.body.addClass('customize-loading');

			/*
			 * Track the dirtiness state (whether the drafted changes have been published)
			 * of the Customizer in the iframe. This is used to decide whether to display
			 * an AYS alert if the user tries to close the window before saving changes.
			 */
			this.saved = new api.Value( true );

			this.iframe = $( '<iframe />', { 'src': src, 'title': Loader.settings.l10n.mainIframeTitle } ).appendTo( this.element );
			this.iframe.one( 'load', this.loaded );

			// Create a postMessage connection with the iframe.
			this.messenger = new api.Messenger({
				url: src,
				channel: 'loader',
				targetWindow: this.iframe[0].contentWindow
			});

			// Expose the changeset UUID on the parent window's URL so that the customized state can survive a refresh.
			if ( history.replaceState ) {
				this.messenger.bind( 'changeset-uuid', function( changesetUuid ) {
					var urlParser = document.createElement( 'a' );
					urlParser.href = location.href;
					urlParser.search = $.param( _.extend(
						api.utils.parseQueryString( urlParser.search.substr( 1 ) ),
						{ changeset_uuid: changesetUuid }
					) );
					history.replaceState( { customize: urlParser.href }, '', urlParser.href );
				} );
			}

			// Wait for the connection from the iframe before sending any postMessage events.
			this.messenger.bind( 'ready', function() {
				Loader.messenger.send( 'back' );
			});

			this.messenger.bind( 'close', function() {
				if ( $.support.history ) {
					history.back();
				} else if ( $.support.hashchange ) {
					window.location.hash = '';
				} else {
					Loader.close();
				}
			});

			// Prompt AYS dialog when navigating away.
			$( window ).on( 'beforeunload', this.beforeunload );

			this.messenger.bind( 'saved', function () {
				Loader.saved( true );
			} );
			this.messenger.bind( 'change', function () {
				Loader.saved( false );
			} );

			this.messenger.bind( 'title', function( newTitle ){
				window.document.title = newTitle;
			});

			this.pushState( src );

			this.trigger( 'open' );
		},

		pushState: function ( src ) {
			var hash = src.split( '?' )[1];

			// Ensure we don't call pushState if the user hit the forward button.
			if ( $.support.history && window.location.href !== src ) {
				history.pushState( { customize: src }, '', src );
			} else if ( ! $.support.history && $.support.hashchange && hash ) {
				window.location.hash = 'wp_customize=on&' + hash;
			}

			this.trigger( 'open' );
		},

		/**
		 * Callback after the Customizer has been opened.
		 */
		opened: function() {
			Loader.body.addClass( 'customize-active full-overlay-active' ).attr( 'aria-busy', 'true' );
		},

		/**
		 * Close the Customizer overlay.
		 */
		close: function() {
			var self = this, onConfirmClose;
			if ( ! self.active ) {
				return;
			}

			onConfirmClose = function( confirmed ) {
				if ( confirmed ) {
					self.active = false;
					self.trigger( 'close' );

					// Restore document title prior to opening the Live Preview.
					if ( self.originalDocumentTitle ) {
						document.title = self.originalDocumentTitle;
					}
				} else {

					// Go forward since Customizer is exited by history.back().
					history.forward();
				}
				self.messenger.unbind( 'confirmed-close', onConfirmClose );
			};
			self.messenger.bind( 'confirmed-close', onConfirmClose );

			Loader.messenger.send( 'confirm-close' );
		},

		/**
		 * Callback after the Customizer has been closed.
		 */
		closed: function() {
			Loader.iframe.remove();
			Loader.messenger.destroy();
			Loader.iframe    = null;
			Loader.messenger = null;
			Loader.saved     = null;
			Loader.body.removeClass( 'customize-active full-overlay-active' ).removeClass( 'customize-loading' );
			$( window ).off( 'beforeunload', Loader.beforeunload );
			/*
			 * Return focus to the link that opened the Customizer overlay after
			 * the body element visibility is restored.
			 */
			if ( Loader.link ) {
				Loader.link.focus();
			}
		},

		/**
		 * Callback for the `load` event on the Customizer iframe.
		 */
		loaded: function() {
			Loader.body.removeClass( 'customize-loading' ).attr( 'aria-busy', 'false' );
		},

		/**
		 * Overlay hide/show utility methods.
		 */
		overlay: {
			show: function() {
				this.element.fadeIn( 200, Loader.opened );
			},

			hide: function() {
				this.element.fadeOut( 200, Loader.closed );
			}
		}
	});

	// Bootstrap the Loader on document#ready.
	$( function() {
		Loader.settings = _wpCustomizeLoaderSettings;
		Loader.initialize();
	});

	// Expose the API publicly on window.wp.customize.Loader.
	api.Loader = Loader;
})( wp, jQuery );
                                                                                                                                                                                                                                                                                                 customize-loader.min.js                                                                             0000644                 00000006737 15212563755 0011202 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
window.wp=window.wp||{},function(i){var n,o=wp.customize;i.extend(i.support,{history:!(!window.history||!history.pushState),hashchange:"onhashchange"in window&&(void 0===document.documentMode||7<document.documentMode)}),n=i.extend({},o.Events,{initialize:function(){this.body=i(document.body),n.settings&&i.support.postMessage&&(i.support.cors||!n.settings.isCrossDomain)&&(this.window=i(window),this.element=i('<div id="customize-container" />').appendTo(this.body),this.bind("open",this.overlay.show),this.bind("close",this.overlay.hide),i("#wpbody").on("click",".load-customize",function(e){e.preventDefault(),n.link=i(this),n.open(n.link.attr("href"))}),i.support.history&&this.window.on("popstate",n.popstate),i.support.hashchange)&&(this.window.on("hashchange",n.hashchange),this.window.triggerHandler("hashchange"))},popstate:function(e){e=e.originalEvent.state;e&&e.customize?n.open(e.customize):n.active&&n.close()},hashchange:function(){var e=window.location.toString().split("#")[1];e&&0===e.indexOf("wp_customize=on")&&n.open(n.settings.url+"?"+e),e||i.support.history||n.close()},beforeunload:function(){if(!n.saved())return n.settings.l10n.saveAlert},open:function(e){if(!this.active){if(n.settings.browser.mobile)return window.location=e;this.originalDocumentTitle=document.title,this.active=!0,this.body.addClass("customize-loading"),this.saved=new o.Value(!0),this.iframe=i("<iframe />",{src:e,title:n.settings.l10n.mainIframeTitle}).appendTo(this.element),this.iframe.one("load",this.loaded),this.messenger=new o.Messenger({url:e,channel:"loader",targetWindow:this.iframe[0].contentWindow}),history.replaceState&&this.messenger.bind("changeset-uuid",function(e){var t=document.createElement("a");t.href=location.href,t.search=i.param(_.extend(o.utils.parseQueryString(t.search.substr(1)),{changeset_uuid:e})),history.replaceState({customize:t.href},"",t.href)}),this.messenger.bind("ready",function(){n.messenger.send("back")}),this.messenger.bind("close",function(){i.support.history?history.back():i.support.hashchange?window.location.hash="":n.close()}),i(window).on("beforeunload",this.beforeunload),this.messenger.bind("saved",function(){n.saved(!0)}),this.messenger.bind("change",function(){n.saved(!1)}),this.messenger.bind("title",function(e){window.document.title=e}),this.pushState(e),this.trigger("open")}},pushState:function(e){var t=e.split("?")[1];i.support.history&&window.location.href!==e?history.pushState({customize:e},"",e):!i.support.history&&i.support.hashchange&&t&&(window.location.hash="wp_customize=on&"+t),this.trigger("open")},opened:function(){n.body.addClass("customize-active full-overlay-active").attr("aria-busy","true")},close:function(){var t,i=this;i.active&&(i.messenger.bind("confirmed-close",t=function(e){e?(i.active=!1,i.trigger("close"),i.originalDocumentTitle&&(document.title=i.originalDocumentTitle)):history.forward(),i.messenger.unbind("confirmed-close",t)}),n.messenger.send("confirm-close"))},closed:function(){n.iframe.remove(),n.messenger.destroy(),n.iframe=null,n.messenger=null,n.saved=null,n.body.removeClass("customize-active full-overlay-active").removeClass("customize-loading"),i(window).off("beforeunload",n.beforeunload),n.link&&n.link.focus()},loaded:function(){n.body.removeClass("customize-loading").attr("aria-busy","false")},overlay:{show:function(){this.element.fadeIn(200,n.opened)},hide:function(){this.element.fadeOut(200,n.closed)}}}),i(function(){n.settings=_wpCustomizeLoaderSettings,n.initialize()}),o.Loader=n}((wp,jQuery));                                 customize-models.js                                                                                 0000644                 00000015245 15212563755 0010427 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/customize-models.js
 */

/* global _wpCustomizeHeader */
(function( $, wp ) {
	var api = wp.customize;
	/** @namespace wp.customize.HeaderTool */
	api.HeaderTool = {};


	/**
	 * wp.customize.HeaderTool.ImageModel
	 *
	 * A header image. This is where saves via the Customizer API are
	 * abstracted away, plus our own Ajax calls to add images to and remove
	 * images from the user's recently uploaded images setting on the server.
	 * These calls are made regardless of whether the user actually saves new
	 * Customizer settings.
	 *
	 * @memberOf wp.customize.HeaderTool
	 * @alias wp.customize.HeaderTool.ImageModel
	 *
	 * @constructor
	 * @augments Backbone.Model
	 */
	api.HeaderTool.ImageModel = Backbone.Model.extend(/** @lends wp.customize.HeaderTool.ImageModel.prototype */{
		defaults: function() {
			return {
				header: {
					attachment_id: 0,
					url: '',
					timestamp: _.now(),
					thumbnail_url: ''
				},
				choice: '',
				selected: false,
				random: false
			};
		},

		initialize: function() {
			this.on('hide', this.hide, this);
		},

		hide: function() {
			this.set('choice', '');
			api('header_image').set('remove-header');
			api('header_image_data').set('remove-header');
		},

		destroy: function() {
			var data = this.get('header'),
				curr = api.HeaderTool.currentHeader.get('header').attachment_id;

			// If the image we're removing is also the current header,
			// unset the latter.
			if (curr && data.attachment_id === curr) {
				api.HeaderTool.currentHeader.trigger('hide');
			}

			wp.ajax.post( 'custom-header-remove', {
				nonce: _wpCustomizeHeader.nonces.remove,
				wp_customize: 'on',
				theme: api.settings.theme.stylesheet,
				attachment_id: data.attachment_id
			});

			this.trigger('destroy', this, this.collection);
		},

		save: function() {
			if (this.get('random')) {
				api('header_image').set(this.get('header').random);
				api('header_image_data').set(this.get('header').random);
			} else {
				if (this.get('header').defaultName) {
					api('header_image').set(this.get('header').url);
					api('header_image_data').set(this.get('header').defaultName);
				} else {
					api('header_image').set(this.get('header').url);
					api('header_image_data').set(this.get('header'));
				}
			}

			api.HeaderTool.combinedList.trigger('control:setImage', this);
		},

		importImage: function() {
			var data = this.get('header');
			if (data.attachment_id === undefined) {
				return;
			}

			wp.ajax.post( 'custom-header-add', {
				nonce: _wpCustomizeHeader.nonces.add,
				wp_customize: 'on',
				theme: api.settings.theme.stylesheet,
				attachment_id: data.attachment_id
			} );
		},

		shouldBeCropped: function() {
			if (this.get('themeFlexWidth') === true &&
						this.get('themeFlexHeight') === true) {
				return false;
			}

			if (this.get('themeFlexWidth') === true &&
				this.get('themeHeight') === this.get('imageHeight')) {
				return false;
			}

			if (this.get('themeFlexHeight') === true &&
				this.get('themeWidth') === this.get('imageWidth')) {
				return false;
			}

			if (this.get('themeWidth') === this.get('imageWidth') &&
				this.get('themeHeight') === this.get('imageHeight')) {
				return false;
			}

			if (this.get('imageWidth') <= this.get('themeWidth')) {
				return false;
			}

			return true;
		}
	});


	/**
	 * wp.customize.HeaderTool.ChoiceList
	 *
	 * @memberOf wp.customize.HeaderTool
	 * @alias wp.customize.HeaderTool.ChoiceList
	 *
	 * @constructor
	 * @augments Backbone.Collection
	 */
	api.HeaderTool.ChoiceList = Backbone.Collection.extend({
		model: api.HeaderTool.ImageModel,

		// Ordered from most recently used to least.
		comparator: function(model) {
			return -model.get('header').timestamp;
		},

		initialize: function() {
			var current = api.HeaderTool.currentHeader.get('choice').replace(/^https?:\/\//, ''),
				isRandom = this.isRandomChoice(api.get().header_image);

			// Overridable by an extending class.
			if (!this.type) {
				this.type = 'uploaded';
			}

			// Overridable by an extending class.
			if (typeof this.data === 'undefined') {
				this.data = _wpCustomizeHeader.uploads;
			}

			if (isRandom) {
				// So that when adding data we don't hide regular images.
				current = api.get().header_image;
			}

			this.on('control:setImage', this.setImage, this);
			this.on('control:removeImage', this.removeImage, this);
			this.on('add', this.maybeRemoveOldCrop, this);
			this.on('add', this.maybeAddRandomChoice, this);

			_.each(this.data, function(elt, index) {
				if (!elt.attachment_id) {
					elt.defaultName = index;
				}

				if (typeof elt.timestamp === 'undefined') {
					elt.timestamp = 0;
				}

				this.add({
					header: elt,
					choice: elt.url.split('/').pop(),
					selected: current === elt.url.replace(/^https?:\/\//, '')
				}, { silent: true });
			}, this);

			if (this.size() > 0) {
				this.addRandomChoice(current);
			}
		},

		maybeRemoveOldCrop: function( model ) {
			var newID = model.get( 'header' ).attachment_id || false,
			 	oldCrop;

			// Bail early if we don't have a new attachment ID.
			if ( ! newID ) {
				return;
			}

			oldCrop = this.find( function( item ) {
				return ( item.cid !== model.cid && item.get( 'header' ).attachment_id === newID );
			} );

			// If we found an old crop, remove it from the collection.
			if ( oldCrop ) {
				this.remove( oldCrop );
			}
		},

		maybeAddRandomChoice: function() {
			if (this.size() === 1) {
				this.addRandomChoice();
			}
		},

		addRandomChoice: function(initialChoice) {
			var isRandomSameType = RegExp(this.type).test(initialChoice),
				randomChoice = 'random-' + this.type + '-image';

			this.add({
				header: {
					timestamp: 0,
					random: randomChoice,
					width: 245,
					height: 41
				},
				choice: randomChoice,
				random: true,
				selected: isRandomSameType
			});
		},

		isRandomChoice: function(choice) {
			return (/^random-(uploaded|default)-image$/).test(choice);
		},

		shouldHideTitle: function() {
			return this.size() < 2;
		},

		setImage: function(model) {
			this.each(function(m) {
				m.set('selected', false);
			});

			if (model) {
				model.set('selected', true);
			}
		},

		removeImage: function() {
			this.each(function(m) {
				m.set('selected', false);
			});
		}
	});


	/**
	 * wp.customize.HeaderTool.DefaultsList
	 *
	 * @memberOf wp.customize.HeaderTool
	 * @alias wp.customize.HeaderTool.DefaultsList
	 *
	 * @constructor
	 * @augments wp.customize.HeaderTool.ChoiceList
	 * @augments Backbone.Collection
	 */
	api.HeaderTool.DefaultsList = api.HeaderTool.ChoiceList.extend({
		initialize: function() {
			this.type = 'default';
			this.data = _wpCustomizeHeader.defaults;
			api.HeaderTool.ChoiceList.prototype.initialize.apply(this);
		}
	});

})( jQuery, window.wp );
                                                                                                                                                                                                                                                                                                                                                           customize-models.min.js                                                                             0000644                 00000007141 15212563755 0011205 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(i){var a=i.customize;a.HeaderTool={},a.HeaderTool.ImageModel=Backbone.Model.extend({defaults:function(){return{header:{attachment_id:0,url:"",timestamp:_.now(),thumbnail_url:""},choice:"",selected:!1,random:!1}},initialize:function(){this.on("hide",this.hide,this)},hide:function(){this.set("choice",""),a("header_image").set("remove-header"),a("header_image_data").set("remove-header")},destroy:function(){var e=this.get("header"),t=a.HeaderTool.currentHeader.get("header").attachment_id;t&&e.attachment_id===t&&a.HeaderTool.currentHeader.trigger("hide"),i.ajax.post("custom-header-remove",{nonce:_wpCustomizeHeader.nonces.remove,wp_customize:"on",theme:a.settings.theme.stylesheet,attachment_id:e.attachment_id}),this.trigger("destroy",this,this.collection)},save:function(){this.get("random")?(a("header_image").set(this.get("header").random),a("header_image_data").set(this.get("header").random)):this.get("header").defaultName?(a("header_image").set(this.get("header").url),a("header_image_data").set(this.get("header").defaultName)):(a("header_image").set(this.get("header").url),a("header_image_data").set(this.get("header"))),a.HeaderTool.combinedList.trigger("control:setImage",this)},importImage:function(){var e=this.get("header");void 0!==e.attachment_id&&i.ajax.post("custom-header-add",{nonce:_wpCustomizeHeader.nonces.add,wp_customize:"on",theme:a.settings.theme.stylesheet,attachment_id:e.attachment_id})},shouldBeCropped:function(){return(!0!==this.get("themeFlexWidth")||!0!==this.get("themeFlexHeight"))&&!(!0===this.get("themeFlexWidth")&&this.get("themeHeight")===this.get("imageHeight")||!0===this.get("themeFlexHeight")&&this.get("themeWidth")===this.get("imageWidth")||this.get("themeWidth")===this.get("imageWidth")&&this.get("themeHeight")===this.get("imageHeight")||this.get("imageWidth")<=this.get("themeWidth"))}}),a.HeaderTool.ChoiceList=Backbone.Collection.extend({model:a.HeaderTool.ImageModel,comparator:function(e){return-e.get("header").timestamp},initialize:function(){var i=a.HeaderTool.currentHeader.get("choice").replace(/^https?:\/\//,""),e=this.isRandomChoice(a.get().header_image);this.type||(this.type="uploaded"),void 0===this.data&&(this.data=_wpCustomizeHeader.uploads),e&&(i=a.get().header_image),this.on("control:setImage",this.setImage,this),this.on("control:removeImage",this.removeImage,this),this.on("add",this.maybeRemoveOldCrop,this),this.on("add",this.maybeAddRandomChoice,this),_.each(this.data,function(e,t){e.attachment_id||(e.defaultName=t),void 0===e.timestamp&&(e.timestamp=0),this.add({header:e,choice:e.url.split("/").pop(),selected:i===e.url.replace(/^https?:\/\//,"")},{silent:!0})},this),0<this.size()&&this.addRandomChoice(i)},maybeRemoveOldCrop:function(t){var e,i=t.get("header").attachment_id||!1;i&&(e=this.find(function(e){return e.cid!==t.cid&&e.get("header").attachment_id===i}))&&this.remove(e)},maybeAddRandomChoice:function(){1===this.size()&&this.addRandomChoice()},addRandomChoice:function(e){var e=RegExp(this.type).test(e),t="random-"+this.type+"-image";this.add({header:{timestamp:0,random:t,width:245,height:41},choice:t,random:!0,selected:e})},isRandomChoice:function(e){return/^random-(uploaded|default)-image$/.test(e)},shouldHideTitle:function(){return this.size()<2},setImage:function(e){this.each(function(e){e.set("selected",!1)}),e&&e.set("selected",!0)},removeImage:function(){this.each(function(e){e.set("selected",!1)})}}),a.HeaderTool.DefaultsList=a.HeaderTool.ChoiceList.extend({initialize:function(){this.type="default",this.data=_wpCustomizeHeader.defaults,a.HeaderTool.ChoiceList.prototype.initialize.apply(this)}})}((jQuery,window.wp));                                                                                                                                                                                                                                                                                                                                                                                                                               customize-preview-nav-menus.js                                                                      0000644                 00000035260 15212563756 0012534 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/customize-preview-nav-menus.js
 */

/* global _wpCustomizePreviewNavMenusExports */

/** @namespace wp.customize.navMenusPreview */
wp.customize.navMenusPreview = wp.customize.MenusCustomizerPreview = ( function( $, _, wp, api ) {
	'use strict';

	var self = {
		data: {
			navMenuInstanceArgs: {}
		}
	};
	if ( 'undefined' !== typeof _wpCustomizePreviewNavMenusExports ) {
		_.extend( self.data, _wpCustomizePreviewNavMenusExports );
	}

	/**
	 * Initialize nav menus preview.
	 */
	self.init = function() {
		var self = this, synced = false;

		/*
		 * Keep track of whether we synced to determine whether or not bindSettingListener
		 * should also initially fire the listener. This initial firing needs to wait until
		 * after all of the settings have been synced from the pane in order to prevent
		 * an infinite selective fallback-refresh. Note that this sync handler will be
		 * added after the sync handler in customize-preview.js, so it will be triggered
		 * after all of the settings are added.
		 */
		api.preview.bind( 'sync', function() {
			synced = true;
		} );

		if ( api.selectiveRefresh ) {
			// Listen for changes to settings related to nav menus.
			api.each( function( setting ) {
				self.bindSettingListener( setting );
			} );
			api.bind( 'add', function( setting ) {

				/*
				 * Handle case where an invalid nav menu item (one for which its associated object has been deleted)
				 * is synced from the controls into the preview. Since invalid nav menu items are filtered out from
				 * being exported to the frontend by the _is_valid_nav_menu_item filter in wp_get_nav_menu_items(),
				 * the customizer controls will have a nav_menu_item setting where the preview will have none, and
				 * this can trigger an infinite fallback refresh when the nav menu item lacks any valid items.
				 */
				if ( setting.get() && ! setting.get()._invalid ) {
					self.bindSettingListener( setting, { fire: synced } );
				}
			} );
			api.bind( 'remove', function( setting ) {
				self.unbindSettingListener( setting );
			} );

			/*
			 * Ensure that wp_nav_menu() instances nested inside of other partials
			 * will be recognized as being present on the page.
			 */
			api.selectiveRefresh.bind( 'render-partials-response', function( response ) {
				if ( response.nav_menu_instance_args ) {
					_.extend( self.data.navMenuInstanceArgs, response.nav_menu_instance_args );
				}
			} );
		}

		api.preview.bind( 'active', function() {
			self.highlightControls();
		} );
	};

	if ( api.selectiveRefresh ) {

		/**
		 * Partial representing an invocation of wp_nav_menu().
		 *
		 * @memberOf wp.customize.navMenusPreview
		 * @alias wp.customize.navMenusPreview.NavMenuInstancePartial
		 *
		 * @class
		 * @augments wp.customize.selectiveRefresh.Partial
		 * @since 4.5.0
		 */
		self.NavMenuInstancePartial = api.selectiveRefresh.Partial.extend(/** @lends wp.customize.navMenusPreview.NavMenuInstancePartial.prototype */{

			/**
			 * Constructor.
			 *
			 * @since 4.5.0
			 * @param {string} id - Partial ID.
			 * @param {Object} options
			 * @param {Object} options.params
			 * @param {Object} options.params.navMenuArgs
			 * @param {string} options.params.navMenuArgs.args_hmac
			 * @param {string} [options.params.navMenuArgs.theme_location]
			 * @param {number} [options.params.navMenuArgs.menu]
			 * @param {Object} [options.constructingContainerContext]
			 */
			initialize: function( id, options ) {
				var partial = this, matches, argsHmac;
				matches = id.match( /^nav_menu_instance\[([0-9a-f]{32})]$/ );
				if ( ! matches ) {
					throw new Error( 'Illegal id for nav_menu_instance partial. The key corresponds with the args HMAC.' );
				}
				argsHmac = matches[1];

				options = options || {};
				options.params = _.extend(
					{
						selector: '[data-customize-partial-id="' + id + '"]',
						navMenuArgs: options.constructingContainerContext || {},
						containerInclusive: true
					},
					options.params || {}
				);
				api.selectiveRefresh.Partial.prototype.initialize.call( partial, id, options );

				if ( ! _.isObject( partial.params.navMenuArgs ) ) {
					throw new Error( 'Missing navMenuArgs' );
				}
				if ( partial.params.navMenuArgs.args_hmac !== argsHmac ) {
					throw new Error( 'args_hmac mismatch with id' );
				}
			},

			/**
			 * Return whether the setting is related to this partial.
			 *
			 * @since 4.5.0
			 * @param {wp.customize.Value|string} setting  - Object or ID.
			 * @param {number|Object|false|null}  newValue - New value, or null if the setting was just removed.
			 * @param {number|Object|false|null}  oldValue - Old value, or null if the setting was just added.
			 * @return {boolean}
			 */
			isRelatedSetting: function( setting, newValue, oldValue ) {
				var partial = this, navMenuLocationSetting, navMenuId, isNavMenuItemSetting, _newValue, _oldValue, urlParser;
				if ( _.isString( setting ) ) {
					setting = api( setting );
				}

				/*
				 * Prevent nav_menu_item changes only containing type_label differences triggering a refresh.
				 * These settings in the preview do not include type_label property, and so if one of these
				 * nav_menu_item settings is dirty, after a refresh the nav menu instance would do a selective
				 * refresh immediately because the setting from the pane would have the type_label whereas
				 * the setting in the preview would not, thus triggering a change event. The following
				 * condition short-circuits this unnecessary selective refresh and also prevents an infinite
				 * loop in the case where a nav_menu_instance partial had done a fallback refresh.
				 * @todo Nav menu item settings should not include a type_label property to begin with.
				 */
				isNavMenuItemSetting = /^nav_menu_item\[/.test( setting.id );
				if ( isNavMenuItemSetting && _.isObject( newValue ) && _.isObject( oldValue ) ) {
					_newValue = _.clone( newValue );
					_oldValue = _.clone( oldValue );
					delete _newValue.type_label;
					delete _oldValue.type_label;

					// Normalize URL scheme when parent frame is HTTPS to prevent selective refresh upon initial page load.
					if ( 'https' === api.preview.scheme.get() ) {
						urlParser = document.createElement( 'a' );
						urlParser.href = _newValue.url;
						urlParser.protocol = 'https:';
						_newValue.url = urlParser.href;
						urlParser.href = _oldValue.url;
						urlParser.protocol = 'https:';
						_oldValue.url = urlParser.href;
					}

					// Prevent original_title differences from causing refreshes if title is present.
					if ( newValue.title ) {
						delete _oldValue.original_title;
						delete _newValue.original_title;
					}

					if ( _.isEqual( _oldValue, _newValue ) ) {
						return false;
					}
				}

				if ( partial.params.navMenuArgs.theme_location ) {
					if ( 'nav_menu_locations[' + partial.params.navMenuArgs.theme_location + ']' === setting.id ) {
						return true;
					}
					navMenuLocationSetting = api( 'nav_menu_locations[' + partial.params.navMenuArgs.theme_location + ']' );
				}

				navMenuId = partial.params.navMenuArgs.menu;
				if ( ! navMenuId && navMenuLocationSetting ) {
					navMenuId = navMenuLocationSetting();
				}

				if ( ! navMenuId ) {
					return false;
				}
				return (
					( 'nav_menu[' + navMenuId + ']' === setting.id ) ||
					( isNavMenuItemSetting && (
						( newValue && newValue.nav_menu_term_id === navMenuId ) ||
						( oldValue && oldValue.nav_menu_term_id === navMenuId )
					) )
				);
			},

			/**
			 * Make sure that partial fallback behavior is invoked if there is no associated menu.
			 *
			 * @since 4.5.0
			 *
			 * @return {Promise}
			 */
			refresh: function() {
				var partial = this, menuId, deferred = $.Deferred();

				// Make sure the fallback behavior is invoked when the partial is no longer associated with a menu.
				if ( _.isNumber( partial.params.navMenuArgs.menu ) ) {
					menuId = partial.params.navMenuArgs.menu;
				} else if ( partial.params.navMenuArgs.theme_location && api.has( 'nav_menu_locations[' + partial.params.navMenuArgs.theme_location + ']' ) ) {
					menuId = api( 'nav_menu_locations[' + partial.params.navMenuArgs.theme_location + ']' ).get();
				}
				if ( ! menuId ) {
					partial.fallback();
					deferred.reject();
					return deferred.promise();
				}

				return api.selectiveRefresh.Partial.prototype.refresh.call( partial );
			},

			/**
			 * Render content.
			 *
			 * @inheritdoc
			 * @param {wp.customize.selectiveRefresh.Placement} placement
			 */
			renderContent: function( placement ) {
				var partial = this, previousContainer = placement.container;

				// Do fallback behavior to refresh preview if menu is now empty.
				if ( '' === placement.addedContent ) {
					placement.partial.fallback();
				}

				if ( api.selectiveRefresh.Partial.prototype.renderContent.call( partial, placement ) ) {

					// Trigger deprecated event.
					$( document ).trigger( 'customize-preview-menu-refreshed', [ {
						instanceNumber: null, // @deprecated
						wpNavArgs: placement.context, // @deprecated
						wpNavMenuArgs: placement.context,
						oldContainer: previousContainer,
						newContainer: placement.container
					} ] );
				}
			}
		});

		api.selectiveRefresh.partialConstructor.nav_menu_instance = self.NavMenuInstancePartial;

		/**
		 * Request full refresh if there are nav menu instances that lack partials which also match the supplied args.
		 *
		 * @param {Object} navMenuInstanceArgs
		 */
		self.handleUnplacedNavMenuInstances = function( navMenuInstanceArgs ) {
			var unplacedNavMenuInstances;
			unplacedNavMenuInstances = _.filter( _.values( self.data.navMenuInstanceArgs ), function( args ) {
				return ! api.selectiveRefresh.partial.has( 'nav_menu_instance[' + args.args_hmac + ']' );
			} );
			if ( _.findWhere( unplacedNavMenuInstances, navMenuInstanceArgs ) ) {
				api.selectiveRefresh.requestFullRefresh();
				return true;
			}
			return false;
		};

		/**
		 * Add change listener for a nav_menu[], nav_menu_item[], or nav_menu_locations[] setting.
		 *
		 * @since 4.5.0
		 *
		 * @param {wp.customize.Value} setting
		 * @param {Object}             [options]
		 * @param {boolean}            options.fire Whether to invoke the callback after binding.
		 *                                          This is used when a dynamic setting is added.
		 * @return {boolean} Whether the setting was bound.
		 */
		self.bindSettingListener = function( setting, options ) {
			var matches;
			options = options || {};

			matches = setting.id.match( /^nav_menu\[(-?\d+)]$/ );
			if ( matches ) {
				setting._navMenuId = parseInt( matches[1], 10 );
				setting.bind( this.onChangeNavMenuSetting );
				if ( options.fire ) {
					this.onChangeNavMenuSetting.call( setting, setting(), false );
				}
				return true;
			}

			matches = setting.id.match( /^nav_menu_item\[(-?\d+)]$/ );
			if ( matches ) {
				setting._navMenuItemId = parseInt( matches[1], 10 );
				setting.bind( this.onChangeNavMenuItemSetting );
				if ( options.fire ) {
					this.onChangeNavMenuItemSetting.call( setting, setting(), false );
				}
				return true;
			}

			matches = setting.id.match( /^nav_menu_locations\[(.+?)]/ );
			if ( matches ) {
				setting._navMenuThemeLocation = matches[1];
				setting.bind( this.onChangeNavMenuLocationsSetting );
				if ( options.fire ) {
					this.onChangeNavMenuLocationsSetting.call( setting, setting(), false );
				}
				return true;
			}

			return false;
		};

		/**
		 * Remove change listeners for nav_menu[], nav_menu_item[], or nav_menu_locations[] setting.
		 *
		 * @since 4.5.0
		 *
		 * @param {wp.customize.Value} setting
		 */
		self.unbindSettingListener = function( setting ) {
			setting.unbind( this.onChangeNavMenuSetting );
			setting.unbind( this.onChangeNavMenuItemSetting );
			setting.unbind( this.onChangeNavMenuLocationsSetting );
		};

		/**
		 * Handle change for nav_menu[] setting for nav menu instances lacking partials.
		 *
		 * @since 4.5.0
		 *
		 * @this {wp.customize.Value}
		 */
		self.onChangeNavMenuSetting = function() {
			var setting = this;

			self.handleUnplacedNavMenuInstances( {
				menu: setting._navMenuId
			} );

			// Ensure all nav menu instances with a theme_location assigned to this menu are handled.
			api.each( function( otherSetting ) {
				if ( ! otherSetting._navMenuThemeLocation ) {
					return;
				}
				if ( setting._navMenuId === otherSetting() ) {
					self.handleUnplacedNavMenuInstances( {
						theme_location: otherSetting._navMenuThemeLocation
					} );
				}
			} );
		};

		/**
		 * Handle change for nav_menu_item[] setting for nav menu instances lacking partials.
		 *
		 * @since 4.5.0
		 *
		 * @param {Object} newItem New value for nav_menu_item[] setting.
		 * @param {Object} oldItem Old value for nav_menu_item[] setting.
		 * @this {wp.customize.Value}
		 */
		self.onChangeNavMenuItemSetting = function( newItem, oldItem ) {
			var item = newItem || oldItem, navMenuSetting;
			navMenuSetting = api( 'nav_menu[' + String( item.nav_menu_term_id ) + ']' );
			if ( navMenuSetting ) {
				self.onChangeNavMenuSetting.call( navMenuSetting );
			}
		};

		/**
		 * Handle change for nav_menu_locations[] setting for nav menu instances lacking partials.
		 *
		 * @since 4.5.0
		 *
		 * @this {wp.customize.Value}
		 */
		self.onChangeNavMenuLocationsSetting = function() {
			var setting = this, hasNavMenuInstance;
			self.handleUnplacedNavMenuInstances( {
				theme_location: setting._navMenuThemeLocation
			} );

			// If there are no wp_nav_menu() instances that refer to the theme location, do full refresh.
			hasNavMenuInstance = !! _.findWhere( _.values( self.data.navMenuInstanceArgs ), {
				theme_location: setting._navMenuThemeLocation
			} );
			if ( ! hasNavMenuInstance ) {
				api.selectiveRefresh.requestFullRefresh();
			}
		};
	}

	/**
	 * Connect nav menu items with their corresponding controls in the pane.
	 *
	 * Setup shift-click on nav menu items which are more granular than the nav menu partial itself.
	 * Also this applies even if a nav menu is not partial-refreshable.
	 *
	 * @since 4.5.0
	 */
	self.highlightControls = function() {
		var selector = '.menu-item';

		// Skip adding highlights if not in the customizer preview iframe.
		if ( ! api.settings.channel ) {
			return;
		}

		// Focus on the menu item control when shift+clicking the menu item.
		$( document ).on( 'click', selector, function( e ) {
			var navMenuItemParts;
			if ( ! e.shiftKey ) {
				return;
			}

			navMenuItemParts = $( this ).attr( 'class' ).match( /(?:^|\s)menu-item-(-?\d+)(?:\s|$)/ );
			if ( navMenuItemParts ) {
				e.preventDefault();
				e.stopPropagation(); // Make sure a sub-nav menu item will get focused instead of parent items.
				api.preview.send( 'focus-nav-menu-item-control', parseInt( navMenuItemParts[1], 10 ) );
			}
		});
	};

	api.bind( 'preview-ready', function() {
		self.init();
	} );

	return self;

}( jQuery, _, wp, wp.customize ) );
                                                                                                                                                                                                                                                                                                                                                customize-preview-nav-menus.min.js                                                                  0000644                 00000011651 15212563756 0013314 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
wp.customize.navMenusPreview=wp.customize.MenusCustomizerPreview=function(a,c,l){"use strict";var t={data:{navMenuInstanceArgs:{}}};return"undefined"!=typeof _wpCustomizePreviewNavMenusExports&&c.extend(t.data,_wpCustomizePreviewNavMenusExports),t.init=function(){var n=this,t=!1;l.preview.bind("sync",function(){t=!0}),l.selectiveRefresh&&(l.each(function(e){n.bindSettingListener(e)}),l.bind("add",function(e){e.get()&&!e.get()._invalid&&n.bindSettingListener(e,{fire:t})}),l.bind("remove",function(e){n.unbindSettingListener(e)}),l.selectiveRefresh.bind("render-partials-response",function(e){e.nav_menu_instance_args&&c.extend(n.data.navMenuInstanceArgs,e.nav_menu_instance_args)})),l.preview.bind("active",function(){n.highlightControls()})},l.selectiveRefresh&&(t.NavMenuInstancePartial=l.selectiveRefresh.Partial.extend({initialize:function(e,n){var t=this,a=e.match(/^nav_menu_instance\[([0-9a-f]{32})]$/);if(!a)throw new Error("Illegal id for nav_menu_instance partial. The key corresponds with the args HMAC.");if(a=a[1],(n=n||{}).params=c.extend({selector:'[data-customize-partial-id="'+e+'"]',navMenuArgs:n.constructingContainerContext||{},containerInclusive:!0},n.params||{}),l.selectiveRefresh.Partial.prototype.initialize.call(t,e,n),!c.isObject(t.params.navMenuArgs))throw new Error("Missing navMenuArgs");if(t.params.navMenuArgs.args_hmac!==a)throw new Error("args_hmac mismatch with id")},isRelatedSetting:function(e,n,t){var a,i,r,s,o,u=this;if(c.isString(e)&&(e=l(e)),(i=/^nav_menu_item\[/.test(e.id))&&c.isObject(n)&&c.isObject(t)&&(r=c.clone(n),s=c.clone(t),delete r.type_label,delete s.type_label,"https"===l.preview.scheme.get()&&((o=document.createElement("a")).href=r.url,o.protocol="https:",r.url=o.href,o.href=s.url,o.protocol="https:",s.url=o.href),n.title&&(delete s.original_title,delete r.original_title),c.isEqual(s,r)))return!1;if(u.params.navMenuArgs.theme_location){if("nav_menu_locations["+u.params.navMenuArgs.theme_location+"]"===e.id)return!0;a=l("nav_menu_locations["+u.params.navMenuArgs.theme_location+"]")}return!!(o=!(o=u.params.navMenuArgs.menu)&&a?a():o)&&("nav_menu["+o+"]"===e.id||i&&(n&&n.nav_menu_term_id===o||t&&t.nav_menu_term_id===o))},refresh:function(){var e,n=this,t=a.Deferred();return c.isNumber(n.params.navMenuArgs.menu)?e=n.params.navMenuArgs.menu:n.params.navMenuArgs.theme_location&&l.has("nav_menu_locations["+n.params.navMenuArgs.theme_location+"]")&&(e=l("nav_menu_locations["+n.params.navMenuArgs.theme_location+"]").get()),e?l.selectiveRefresh.Partial.prototype.refresh.call(n):(n.fallback(),t.reject(),t.promise())},renderContent:function(e){var n=e.container;""===e.addedContent&&e.partial.fallback(),l.selectiveRefresh.Partial.prototype.renderContent.call(this,e)&&a(document).trigger("customize-preview-menu-refreshed",[{instanceNumber:null,wpNavArgs:e.context,wpNavMenuArgs:e.context,oldContainer:n,newContainer:e.container}])}}),l.selectiveRefresh.partialConstructor.nav_menu_instance=t.NavMenuInstancePartial,t.handleUnplacedNavMenuInstances=function(e){var n=c.filter(c.values(t.data.navMenuInstanceArgs),function(e){return!l.selectiveRefresh.partial.has("nav_menu_instance["+e.args_hmac+"]")});return!!c.findWhere(n,e)&&(l.selectiveRefresh.requestFullRefresh(),!0)},t.bindSettingListener=function(e,n){var t;return n=n||{},(t=e.id.match(/^nav_menu\[(-?\d+)]$/))?(e._navMenuId=parseInt(t[1],10),e.bind(this.onChangeNavMenuSetting),n.fire&&this.onChangeNavMenuSetting.call(e,e(),!1),!0):(t=e.id.match(/^nav_menu_item\[(-?\d+)]$/))?(e._navMenuItemId=parseInt(t[1],10),e.bind(this.onChangeNavMenuItemSetting),n.fire&&this.onChangeNavMenuItemSetting.call(e,e(),!1),!0):!!(t=e.id.match(/^nav_menu_locations\[(.+?)]/))&&(e._navMenuThemeLocation=t[1],e.bind(this.onChangeNavMenuLocationsSetting),n.fire&&this.onChangeNavMenuLocationsSetting.call(e,e(),!1),!0)},t.unbindSettingListener=function(e){e.unbind(this.onChangeNavMenuSetting),e.unbind(this.onChangeNavMenuItemSetting),e.unbind(this.onChangeNavMenuLocationsSetting)},t.onChangeNavMenuSetting=function(){var n=this;t.handleUnplacedNavMenuInstances({menu:n._navMenuId}),l.each(function(e){e._navMenuThemeLocation&&n._navMenuId===e()&&t.handleUnplacedNavMenuInstances({theme_location:e._navMenuThemeLocation})})},t.onChangeNavMenuItemSetting=function(e,n){e=l("nav_menu["+String((e||n).nav_menu_term_id)+"]");e&&t.onChangeNavMenuSetting.call(e)},t.onChangeNavMenuLocationsSetting=function(){t.handleUnplacedNavMenuInstances({theme_location:this._navMenuThemeLocation}),!c.findWhere(c.values(t.data.navMenuInstanceArgs),{theme_location:this._navMenuThemeLocation})&&l.selectiveRefresh.requestFullRefresh()}),t.highlightControls=function(){l.settings.channel&&a(document).on("click",".menu-item",function(e){var n;e.shiftKey&&(n=a(this).attr("class").match(/(?:^|\s)menu-item-(-?\d+)(?:\s|$)/))&&(e.preventDefault(),e.stopPropagation(),l.preview.send("focus-nav-menu-item-control",parseInt(n[1],10)))})},l.bind("preview-ready",function(){t.init()}),t}(jQuery,_,wp.customize);                                                                                       customize-preview-widgets.js                                                                        0000644                 00000055325 15212563756 0012275 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/customize-preview-widgets.js
 */

/* global _wpWidgetCustomizerPreviewSettings */

/**
 * Handles the initialization, refreshing and rendering of widget partials and sidebar widgets.
 *
 * @since 4.5.0
 *
 * @namespace wp.customize.widgetsPreview
 *
 * @param {jQuery} $   The jQuery object.
 * @param {Object} _   The utilities library.
 * @param {Object} wp  Current WordPress environment instance.
 * @param {Object} api Information from the API.
 *
 * @return {Object} Widget-related variables.
 */
wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function( $, _, wp, api ) {

	var self;

	self = {
		renderedSidebars: {},
		renderedWidgets: {},
		registeredSidebars: [],
		registeredWidgets: {},
		widgetSelectors: [],
		preview: null,
		l10n: {
			widgetTooltip: ''
		},
		selectiveRefreshableWidgets: {}
	};

	/**
	 * Initializes the widgets preview.
	 *
	 * @since 4.5.0
	 *
	 * @memberOf wp.customize.widgetsPreview
	 *
	 * @return {void}
	 */
	self.init = function() {
		var self = this;

		self.preview = api.preview;
		if ( ! _.isEmpty( self.selectiveRefreshableWidgets ) ) {
			self.addPartials();
		}

		self.buildWidgetSelectors();
		self.highlightControls();

		self.preview.bind( 'highlight-widget', self.highlightWidget );

		api.preview.bind( 'active', function() {
			self.highlightControls();
		} );

		/*
		 * Refresh a partial when the controls pane requests it. This is used currently just by the
		 * Gallery widget so that when an attachment's caption is updated in the media modal,
		 * the widget in the preview will then be refreshed to show the change. Normally doing this
		 * would not be necessary because all of the state should be contained inside the changeset,
		 * as everything done in the Customizer should not make a change to the site unless the
		 * changeset itself is published. Attachments are a current exception to this rule.
		 * For a proposal to include attachments in the customized state, see #37887.
		 */
		api.preview.bind( 'refresh-widget-partial', function( widgetId ) {
			var partialId = 'widget[' + widgetId + ']';
			if ( api.selectiveRefresh.partial.has( partialId ) ) {
				api.selectiveRefresh.partial( partialId ).refresh();
			} else if ( self.renderedWidgets[ widgetId ] ) {
				api.preview.send( 'refresh' ); // Fallback in case theme does not support 'customize-selective-refresh-widgets'.
			}
		} );
	};

	self.WidgetPartial = api.selectiveRefresh.Partial.extend(/** @lends wp.customize.widgetsPreview.WidgetPartial.prototype */{

		/**
		 * Represents a partial widget instance.
		 *
		 * @since 4.5.0
		 *
		 * @constructs
		 * @augments wp.customize.selectiveRefresh.Partial
		 *
		 * @alias wp.customize.widgetsPreview.WidgetPartial
		 * @memberOf wp.customize.widgetsPreview
		 *
		 * @param {string} id             The partial's ID.
		 * @param {Object} options        Options used to initialize the partial's
		 *                                instance.
		 * @param {Object} options.params The options parameters.
		 */
		initialize: function( id, options ) {
			var partial = this, matches;
			matches = id.match( /^widget\[(.+)]$/ );
			if ( ! matches ) {
				throw new Error( 'Illegal id for widget partial.' );
			}

			partial.widgetId = matches[1];
			partial.widgetIdParts = self.parseWidgetId( partial.widgetId );
			options = options || {};
			options.params = _.extend(
				{
					settings: [ self.getWidgetSettingId( partial.widgetId ) ],
					containerInclusive: true
				},
				options.params || {}
			);

			api.selectiveRefresh.Partial.prototype.initialize.call( partial, id, options );
		},

		/**
		 * Refreshes the widget partial.
		 *
		 * @since 4.5.0
		 *
		 * @return {Promise|void} Either a promise postponing the refresh, or void.
		 */
		refresh: function() {
			var partial = this, refreshDeferred;
			if ( ! self.selectiveRefreshableWidgets[ partial.widgetIdParts.idBase ] ) {
				refreshDeferred = $.Deferred();
				refreshDeferred.reject();
				partial.fallback();
				return refreshDeferred.promise();
			} else {
				return api.selectiveRefresh.Partial.prototype.refresh.call( partial );
			}
		},

		/**
		 * Sends the widget-updated message to the parent so the spinner will get
		 * removed from the widget control.
		 *
		 * @inheritDoc
		 * @param {wp.customize.selectiveRefresh.Placement} placement The placement
		 *                                                            function.
		 *
		 * @return {void}
		 */
		renderContent: function( placement ) {
			var partial = this;
			if ( api.selectiveRefresh.Partial.prototype.renderContent.call( partial, placement ) ) {
				api.preview.send( 'widget-updated', partial.widgetId );
				api.selectiveRefresh.trigger( 'widget-updated', partial );
			}
		}
	});

	self.SidebarPartial = api.selectiveRefresh.Partial.extend(/** @lends wp.customize.widgetsPreview.SidebarPartial.prototype */{

		/**
		 * Represents a partial widget area.
		 *
		 * @since 4.5.0
		 *
		 * @class
		 * @augments wp.customize.selectiveRefresh.Partial
		 *
		 * @memberOf wp.customize.widgetsPreview
		 * @alias wp.customize.widgetsPreview.SidebarPartial
		 *
		 * @param {string} id             The partial's ID.
		 * @param {Object} options        Options used to initialize the partial's instance.
		 * @param {Object} options.params The options parameters.
		 */
		initialize: function( id, options ) {
			var partial = this, matches;
			matches = id.match( /^sidebar\[(.+)]$/ );
			if ( ! matches ) {
				throw new Error( 'Illegal id for sidebar partial.' );
			}
			partial.sidebarId = matches[1];

			options = options || {};
			options.params = _.extend(
				{
					settings: [ 'sidebars_widgets[' + partial.sidebarId + ']' ]
				},
				options.params || {}
			);

			api.selectiveRefresh.Partial.prototype.initialize.call( partial, id, options );

			if ( ! partial.params.sidebarArgs ) {
				throw new Error( 'The sidebarArgs param was not provided.' );
			}
			if ( partial.params.settings.length > 1 ) {
				throw new Error( 'Expected SidebarPartial to only have one associated setting' );
			}
		},

		/**
		 * Sets up the partial.
		 *
		 * @since 4.5.0
		 *
		 * @return {void}
		 */
		ready: function() {
			var sidebarPartial = this;

			// Watch for changes to the sidebar_widgets setting.
			_.each( sidebarPartial.settings(), function( settingId ) {
				api( settingId ).bind( _.bind( sidebarPartial.handleSettingChange, sidebarPartial ) );
			} );

			// Trigger an event for this sidebar being updated whenever a widget inside is rendered.
			api.selectiveRefresh.bind( 'partial-content-rendered', function( placement ) {
				var isAssignedWidgetPartial = (
					placement.partial.extended( self.WidgetPartial ) &&
					( -1 !== _.indexOf( sidebarPartial.getWidgetIds(), placement.partial.widgetId ) )
				);
				if ( isAssignedWidgetPartial ) {
					api.selectiveRefresh.trigger( 'sidebar-updated', sidebarPartial );
				}
			} );

			// Make sure that a widget partial has a container in the DOM prior to a refresh.
			api.bind( 'change', function( widgetSetting ) {
				var widgetId, parsedId;
				parsedId = self.parseWidgetSettingId( widgetSetting.id );
				if ( ! parsedId ) {
					return;
				}
				widgetId = parsedId.idBase;
				if ( parsedId.number ) {
					widgetId += '-' + String( parsedId.number );
				}
				if ( -1 !== _.indexOf( sidebarPartial.getWidgetIds(), widgetId ) ) {
					sidebarPartial.ensureWidgetPlacementContainers( widgetId );
				}
			} );
		},

		/**
		 * Gets the before/after boundary nodes for all instances of this sidebar
		 * (usually one).
		 *
		 * Note that TreeWalker is not implemented in IE8.
		 *
		 * @since 4.5.0
		 *
		 * @return {Array.<{before: Comment, after: Comment, instanceNumber: number}>}
		 *         An array with an object for each sidebar instance, containing the
		 *         node before and after the sidebar instance and its instance number.
		 */
		findDynamicSidebarBoundaryNodes: function() {
			var partial = this, regExp, boundaryNodes = {}, recursiveCommentTraversal;
			regExp = /^(dynamic_sidebar_before|dynamic_sidebar_after):(.+):(\d+)$/;
			recursiveCommentTraversal = function( childNodes ) {
				_.each( childNodes, function( node ) {
					var matches;
					if ( 8 === node.nodeType ) {
						matches = node.nodeValue.match( regExp );
						if ( ! matches || matches[2] !== partial.sidebarId ) {
							return;
						}
						if ( _.isUndefined( boundaryNodes[ matches[3] ] ) ) {
							boundaryNodes[ matches[3] ] = {
								before: null,
								after: null,
								instanceNumber: parseInt( matches[3], 10 )
							};
						}
						if ( 'dynamic_sidebar_before' === matches[1] ) {
							boundaryNodes[ matches[3] ].before = node;
						} else {
							boundaryNodes[ matches[3] ].after = node;
						}
					} else if ( 1 === node.nodeType ) {
						recursiveCommentTraversal( node.childNodes );
					}
				} );
			};

			recursiveCommentTraversal( document.body.childNodes );
			return _.values( boundaryNodes );
		},

		/**
		 * Gets the placements for this partial.
		 *
		 * @since 4.5.0
		 *
		 * @return {Array} An array containing placement objects for each of the
		 *                 dynamic sidebar boundary nodes.
		 */
		placements: function() {
			var partial = this;
			return _.map( partial.findDynamicSidebarBoundaryNodes(), function( boundaryNodes ) {
				return new api.selectiveRefresh.Placement( {
					partial: partial,
					container: null,
					startNode: boundaryNodes.before,
					endNode: boundaryNodes.after,
					context: {
						instanceNumber: boundaryNodes.instanceNumber
					}
				} );
			} );
		},

		/**
		 * Get the list of widget IDs associated with this widget area.
		 *
		 * @since 4.5.0
		 *
		 * @throws {Error} If there's no settingId.
		 * @throws {Error} If the setting doesn't exist in the API.
		 * @throws {Error} If the API doesn't pass an array of widget IDs.
		 *
		 * @return {Array} A shallow copy of the array containing widget IDs.
		 */
		getWidgetIds: function() {
			var sidebarPartial = this, settingId, widgetIds;
			settingId = sidebarPartial.settings()[0];
			if ( ! settingId ) {
				throw new Error( 'Missing associated setting.' );
			}
			if ( ! api.has( settingId ) ) {
				throw new Error( 'Setting does not exist.' );
			}
			widgetIds = api( settingId ).get();
			if ( ! _.isArray( widgetIds ) ) {
				throw new Error( 'Expected setting to be array of widget IDs' );
			}
			return widgetIds.slice( 0 );
		},

		/**
		 * Reflows widgets in the sidebar, ensuring they have the proper position in the
		 * DOM.
		 *
		 * @since 4.5.0
		 *
		 * @return {Array.<wp.customize.selectiveRefresh.Placement>} List of placements
		 *                                                           that were reflowed.
		 */
		reflowWidgets: function() {
			var sidebarPartial = this, sidebarPlacements, widgetIds, widgetPartials, sortedSidebarContainers = [];
			widgetIds = sidebarPartial.getWidgetIds();
			sidebarPlacements = sidebarPartial.placements();

			widgetPartials = {};
			_.each( widgetIds, function( widgetId ) {
				var widgetPartial = api.selectiveRefresh.partial( 'widget[' + widgetId + ']' );
				if ( widgetPartial ) {
					widgetPartials[ widgetId ] = widgetPartial;
				}
			} );

			_.each( sidebarPlacements, function( sidebarPlacement ) {
				var sidebarWidgets = [], needsSort = false, thisPosition, lastPosition = -1;

				// Gather list of widget partial containers in this sidebar, and determine if a sort is needed.
				_.each( widgetPartials, function( widgetPartial ) {
					_.each( widgetPartial.placements(), function( widgetPlacement ) {

						if ( sidebarPlacement.context.instanceNumber === widgetPlacement.context.sidebar_instance_number ) {
							thisPosition = widgetPlacement.container.index();
							sidebarWidgets.push( {
								partial: widgetPartial,
								placement: widgetPlacement,
								position: thisPosition
							} );
							if ( thisPosition < lastPosition ) {
								needsSort = true;
							}
							lastPosition = thisPosition;
						}
					} );
				} );

				if ( needsSort ) {
					_.each( sidebarWidgets, function( sidebarWidget ) {
						sidebarPlacement.endNode.parentNode.insertBefore(
							sidebarWidget.placement.container[0],
							sidebarPlacement.endNode
						);

						// @todo Rename partial-placement-moved?
						api.selectiveRefresh.trigger( 'partial-content-moved', sidebarWidget.placement );
					} );

					sortedSidebarContainers.push( sidebarPlacement );
				}
			} );

			if ( sortedSidebarContainers.length > 0 ) {
				api.selectiveRefresh.trigger( 'sidebar-updated', sidebarPartial );
			}

			return sortedSidebarContainers;
		},

		/**
		 * Makes sure there is a widget instance container in this sidebar for the given
		 * widget ID.
		 *
		 * @since 4.5.0
		 *
		 * @param {string} widgetId The widget ID.
		 *
		 * @return {wp.customize.selectiveRefresh.Partial} The widget instance partial.
		 */
		ensureWidgetPlacementContainers: function( widgetId ) {
			var sidebarPartial = this, widgetPartial, wasInserted = false, partialId = 'widget[' + widgetId + ']';
			widgetPartial = api.selectiveRefresh.partial( partialId );
			if ( ! widgetPartial ) {
				widgetPartial = new self.WidgetPartial( partialId, {
					params: {}
				} );
			}

			// Make sure that there is a container element for the widget in the sidebar, if at least a placeholder.
			_.each( sidebarPartial.placements(), function( sidebarPlacement ) {
				var foundWidgetPlacement, widgetContainerElement;

				foundWidgetPlacement = _.find( widgetPartial.placements(), function( widgetPlacement ) {
					return ( widgetPlacement.context.sidebar_instance_number === sidebarPlacement.context.instanceNumber );
				} );
				if ( foundWidgetPlacement ) {
					return;
				}

				widgetContainerElement = $(
					sidebarPartial.params.sidebarArgs.before_widget.replace( /%1\$s/g, widgetId ).replace( /%2\$s/g, 'widget' ) +
					sidebarPartial.params.sidebarArgs.after_widget
				);

				// Handle rare case where before_widget and after_widget are empty.
				if ( ! widgetContainerElement[0] ) {
					return;
				}

				widgetContainerElement.attr( 'data-customize-partial-id', widgetPartial.id );
				widgetContainerElement.attr( 'data-customize-partial-type', 'widget' );
				widgetContainerElement.attr( 'data-customize-widget-id', widgetId );

				/*
				 * Make sure the widget container element has the customize-container context data.
				 * The sidebar_instance_number is used to disambiguate multiple instances of the
				 * same sidebar are rendered onto the template, and so the same widget is embedded
				 * multiple times.
				 */
				widgetContainerElement.data( 'customize-partial-placement-context', {
					'sidebar_id': sidebarPartial.sidebarId,
					'sidebar_instance_number': sidebarPlacement.context.instanceNumber
				} );

				sidebarPlacement.endNode.parentNode.insertBefore( widgetContainerElement[0], sidebarPlacement.endNode );
				wasInserted = true;
			} );

			api.selectiveRefresh.partial.add( widgetPartial );

			if ( wasInserted ) {
				sidebarPartial.reflowWidgets();
			}

			return widgetPartial;
		},

		/**
		 * Handles changes to the sidebars_widgets[] setting.
		 *
		 * @since 4.5.0
		 *
		 * @param {Array} newWidgetIds New widget IDs.
		 * @param {Array} oldWidgetIds Old widget IDs.
		 *
		 * @return {void}
		 */
		handleSettingChange: function( newWidgetIds, oldWidgetIds ) {
			var sidebarPartial = this, needsRefresh, widgetsRemoved, widgetsAdded, addedWidgetPartials = [];

			needsRefresh = (
				( oldWidgetIds.length > 0 && 0 === newWidgetIds.length ) ||
				( newWidgetIds.length > 0 && 0 === oldWidgetIds.length )
			);
			if ( needsRefresh ) {
				sidebarPartial.fallback();
				return;
			}

			// Handle removal of widgets.
			widgetsRemoved = _.difference( oldWidgetIds, newWidgetIds );
			_.each( widgetsRemoved, function( removedWidgetId ) {
				var widgetPartial = api.selectiveRefresh.partial( 'widget[' + removedWidgetId + ']' );
				if ( widgetPartial ) {
					_.each( widgetPartial.placements(), function( placement ) {
						var isRemoved = (
							placement.context.sidebar_id === sidebarPartial.sidebarId ||
							( placement.context.sidebar_args && placement.context.sidebar_args.id === sidebarPartial.sidebarId )
						);
						if ( isRemoved ) {
							placement.container.remove();
						}
					} );
				}
				delete self.renderedWidgets[ removedWidgetId ];
			} );

			// Handle insertion of widgets.
			widgetsAdded = _.difference( newWidgetIds, oldWidgetIds );
			_.each( widgetsAdded, function( addedWidgetId ) {
				var widgetPartial = sidebarPartial.ensureWidgetPlacementContainers( addedWidgetId );
				addedWidgetPartials.push( widgetPartial );
				self.renderedWidgets[ addedWidgetId ] = true;
			} );

			_.each( addedWidgetPartials, function( widgetPartial ) {
				widgetPartial.refresh();
			} );

			api.selectiveRefresh.trigger( 'sidebar-updated', sidebarPartial );
		},

		/**
		 * Refreshes the sidebar partial.
		 *
		 * Note that the meat is handled in handleSettingChange because it has the
		 * context of which widgets were removed.
		 *
		 * @since 4.5.0
		 *
		 * @return {Promise} A promise postponing the refresh.
		 */
		refresh: function() {
			var partial = this, deferred = $.Deferred();

			deferred.fail( function() {
				partial.fallback();
			} );

			if ( 0 === partial.placements().length ) {
				deferred.reject();
			} else {
				_.each( partial.reflowWidgets(), function( sidebarPlacement ) {
					api.selectiveRefresh.trigger( 'partial-content-rendered', sidebarPlacement );
				} );
				deferred.resolve();
			}

			return deferred.promise();
		}
	});

	api.selectiveRefresh.partialConstructor.sidebar = self.SidebarPartial;
	api.selectiveRefresh.partialConstructor.widget = self.WidgetPartial;

	/**
	 * Adds partials for the registered widget areas (sidebars).
	 *
	 * @since 4.5.0
	 *
	 * @return {void}
	 */
	self.addPartials = function() {
		_.each( self.registeredSidebars, function( registeredSidebar ) {
			var partial, partialId = 'sidebar[' + registeredSidebar.id + ']';
			partial = api.selectiveRefresh.partial( partialId );
			if ( ! partial ) {
				partial = new self.SidebarPartial( partialId, {
					params: {
						sidebarArgs: registeredSidebar
					}
				} );
				api.selectiveRefresh.partial.add( partial );
			}
		} );
	};

	/**
	 * Calculates the selector for the sidebar's widgets based on the registered
	 * sidebar's info.
	 *
	 * @memberOf wp.customize.widgetsPreview
	 *
	 * @since 3.9.0
	 *
	 * @return {void}
	 */
	self.buildWidgetSelectors = function() {
		var self = this;

		$.each( self.registeredSidebars, function( i, sidebar ) {
			var widgetTpl = [
					sidebar.before_widget,
					sidebar.before_title,
					sidebar.after_title,
					sidebar.after_widget
				].join( '' ),
				emptyWidget,
				widgetSelector,
				widgetClasses;

			emptyWidget = $( widgetTpl );
			widgetSelector = emptyWidget.prop( 'tagName' ) || '';
			widgetClasses = emptyWidget.prop( 'className' ) || '';

			// Prevent a rare case when before_widget, before_title, after_title and after_widget is empty.
			if ( ! widgetClasses ) {
				return;
			}

			// Remove class names that incorporate the string formatting placeholders %1$s and %2$s.
			widgetClasses = widgetClasses.replace( /\S*%[12]\$s\S*/g, '' );
			widgetClasses = widgetClasses.replace( /^\s+|\s+$/g, '' );
			if ( widgetClasses ) {
				widgetSelector += '.' + widgetClasses.split( /\s+/ ).join( '.' );
			}
			self.widgetSelectors.push( widgetSelector );
		});
	};

	/**
	 * Highlights the widget on widget updates or widget control mouse overs.
	 *
	 * @memberOf wp.customize.widgetsPreview
	 *
	 * @since 3.9.0
	 * @param {string} widgetId ID of the widget.
	 *
	 * @return {void}
	 */
	self.highlightWidget = function( widgetId ) {
		var $body = $( document.body ),
			$widget = $( '#' + widgetId );

		$body.find( '.widget-customizer-highlighted-widget' ).removeClass( 'widget-customizer-highlighted-widget' );

		$widget.addClass( 'widget-customizer-highlighted-widget' );
		setTimeout( function() {
			$widget.removeClass( 'widget-customizer-highlighted-widget' );
		}, 500 );
	};

	/**
	 * Shows a title and highlights widgets on hover. On shift+clicking focuses the
	 * widget control.
	 *
	 * @memberOf wp.customize.widgetsPreview
	 *
	 * @since 3.9.0
	 *
	 * @return {void}
	 */
	self.highlightControls = function() {
		var self = this,
			selector = this.widgetSelectors.join( ',' );

		// Skip adding highlights if not in the customizer preview iframe.
		if ( ! api.settings.channel ) {
			return;
		}

		$( selector ).attr( 'title', this.l10n.widgetTooltip );
		// Highlights widget when entering the widget editor.
		$( document ).on( 'mouseenter', selector, function() {
			self.preview.send( 'highlight-widget-control', $( this ).prop( 'id' ) );
		});

		// Open expand the widget control when shift+clicking the widget element.
		$( document ).on( 'click', selector, function( e ) {
			if ( ! e.shiftKey ) {
				return;
			}
			e.preventDefault();

			self.preview.send( 'focus-widget-control', $( this ).prop( 'id' ) );
		});
	};

	/**
	 * Parses a widget ID.
	 *
	 * @memberOf wp.customize.widgetsPreview
	 *
	 * @since 4.5.0
	 *
	 * @param {string} widgetId The widget ID.
	 *
	 * @return {{idBase: string, number: number|null}} An object containing the idBase
	 *                                                 and number of the parsed widget ID.
	 */
	self.parseWidgetId = function( widgetId ) {
		var matches, parsed = {
			idBase: '',
			number: null
		};

		matches = widgetId.match( /^(.+)-(\d+)$/ );
		if ( matches ) {
			parsed.idBase = matches[1];
			parsed.number = parseInt( matches[2], 10 );
		} else {
			parsed.idBase = widgetId; // Likely an old single widget.
		}

		return parsed;
	};

	/**
	 * Parses a widget setting ID.
	 *
	 * @memberOf wp.customize.widgetsPreview
	 *
	 * @since 4.5.0
	 *
	 * @param {string} settingId Widget setting ID.
	 *
	 * @return {{idBase: string, number: number|null}|null} Either an object containing the idBase
	 *                                                      and number of the parsed widget setting ID,
	 *                                                      or null.
	 */
	self.parseWidgetSettingId = function( settingId ) {
		var matches, parsed = {
			idBase: '',
			number: null
		};

		matches = settingId.match( /^widget_([^\[]+?)(?:\[(\d+)])?$/ );
		if ( ! matches ) {
			return null;
		}
		parsed.idBase = matches[1];
		if ( matches[2] ) {
			parsed.number = parseInt( matches[2], 10 );
		}
		return parsed;
	};

	/**
	 * Converts a widget ID into a Customizer setting ID.
	 *
	 * @memberOf wp.customize.widgetsPreview
	 *
	 * @since 4.5.0
	 *
	 * @param {string} widgetId The widget ID.
	 *
	 * @return {string} The setting ID.
	 */
	self.getWidgetSettingId = function( widgetId ) {
		var parsed = this.parseWidgetId( widgetId ), settingId;

		settingId = 'widget_' + parsed.idBase;
		if ( parsed.number ) {
			settingId += '[' + String( parsed.number ) + ']';
		}

		return settingId;
	};

	api.bind( 'preview-ready', function() {
		$.extend( self, _wpWidgetCustomizerPreviewSettings );
		self.init();
	});

	return self;
})( jQuery, _, wp, wp.customize );
                                                                                                                                                                                                                                                                                                           customize-preview-widgets.min.js                                                                    0000644                 00000017214 15212563756 0013052 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
wp.customize.widgetsPreview=wp.customize.WidgetCustomizerPreview=function(d,o,c){var s={renderedSidebars:{},renderedWidgets:{},registeredSidebars:[],registeredWidgets:{},widgetSelectors:[],preview:null,l10n:{widgetTooltip:""},selectiveRefreshableWidgets:{},init:function(){var i=this;i.preview=c.preview,o.isEmpty(i.selectiveRefreshableWidgets)||i.addPartials(),i.buildWidgetSelectors(),i.highlightControls(),i.preview.bind("highlight-widget",i.highlightWidget),c.preview.bind("active",function(){i.highlightControls()}),c.preview.bind("refresh-widget-partial",function(e){var t="widget["+e+"]";c.selectiveRefresh.partial.has(t)?c.selectiveRefresh.partial(t).refresh():i.renderedWidgets[e]&&c.preview.send("refresh")})}};return s.WidgetPartial=c.selectiveRefresh.Partial.extend({initialize:function(e,t){var i=this,r=e.match(/^widget\[(.+)]$/);if(!r)throw new Error("Illegal id for widget partial.");i.widgetId=r[1],i.widgetIdParts=s.parseWidgetId(i.widgetId),(t=t||{}).params=o.extend({settings:[s.getWidgetSettingId(i.widgetId)],containerInclusive:!0},t.params||{}),c.selectiveRefresh.Partial.prototype.initialize.call(i,e,t)},refresh:function(){var e,t=this;return s.selectiveRefreshableWidgets[t.widgetIdParts.idBase]?c.selectiveRefresh.Partial.prototype.refresh.call(t):((e=d.Deferred()).reject(),t.fallback(),e.promise())},renderContent:function(e){var t=this;c.selectiveRefresh.Partial.prototype.renderContent.call(t,e)&&(c.preview.send("widget-updated",t.widgetId),c.selectiveRefresh.trigger("widget-updated",t))}}),s.SidebarPartial=c.selectiveRefresh.Partial.extend({initialize:function(e,t){var i=this,r=e.match(/^sidebar\[(.+)]$/);if(!r)throw new Error("Illegal id for sidebar partial.");if(i.sidebarId=r[1],(t=t||{}).params=o.extend({settings:["sidebars_widgets["+i.sidebarId+"]"]},t.params||{}),c.selectiveRefresh.Partial.prototype.initialize.call(i,e,t),!i.params.sidebarArgs)throw new Error("The sidebarArgs param was not provided.");if(1<i.params.settings.length)throw new Error("Expected SidebarPartial to only have one associated setting")},ready:function(){var i=this;o.each(i.settings(),function(e){c(e).bind(o.bind(i.handleSettingChange,i))}),c.selectiveRefresh.bind("partial-content-rendered",function(e){e.partial.extended(s.WidgetPartial)&&-1!==o.indexOf(i.getWidgetIds(),e.partial.widgetId)&&c.selectiveRefresh.trigger("sidebar-updated",i)}),c.bind("change",function(e){var t,e=s.parseWidgetSettingId(e.id);e&&(t=e.idBase,e.number&&(t+="-"+String(e.number)),-1!==o.indexOf(i.getWidgetIds(),t))&&i.ensureWidgetPlacementContainers(t)})},findDynamicSidebarBoundaryNodes:function(){var i=this,r={},a=/^(dynamic_sidebar_before|dynamic_sidebar_after):(.+):(\d+)$/,n=function(e){o.each(e,function(e){var t;8===e.nodeType?(t=e.nodeValue.match(a))&&t[2]===i.sidebarId&&(o.isUndefined(r[t[3]])&&(r[t[3]]={before:null,after:null,instanceNumber:parseInt(t[3],10)}),"dynamic_sidebar_before"===t[1]?r[t[3]].before=e:r[t[3]].after=e):1===e.nodeType&&n(e.childNodes)})};return n(document.body.childNodes),o.values(r)},placements:function(){var t=this;return o.map(t.findDynamicSidebarBoundaryNodes(),function(e){return new c.selectiveRefresh.Placement({partial:t,container:null,startNode:e.before,endNode:e.after,context:{instanceNumber:e.instanceNumber}})})},getWidgetIds:function(){var e=this.settings()[0];if(!e)throw new Error("Missing associated setting.");if(!c.has(e))throw new Error("Setting does not exist.");if(e=c(e).get(),o.isArray(e))return e.slice(0);throw new Error("Expected setting to be array of widget IDs")},reflowWidgets:function(){var e=this,t=[],i=e.getWidgetIds(),r=e.placements(),s={};return o.each(i,function(e){var t=c.selectiveRefresh.partial("widget["+e+"]");t&&(s[e]=t)}),o.each(r,function(i){var r,a=[],n=!1,d=-1;o.each(s,function(t){o.each(t.placements(),function(e){i.context.instanceNumber===e.context.sidebar_instance_number&&(r=e.container.index(),a.push({partial:t,placement:e,position:r}),r<d&&(n=!0),d=r)})}),n&&(o.each(a,function(e){i.endNode.parentNode.insertBefore(e.placement.container[0],i.endNode),c.selectiveRefresh.trigger("partial-content-moved",e.placement)}),t.push(i))}),0<t.length&&c.selectiveRefresh.trigger("sidebar-updated",e),t},ensureWidgetPlacementContainers:function(i){var r=this,a=!1,e="widget["+i+"]",n=c.selectiveRefresh.partial(e);return n=n||new s.WidgetPartial(e,{params:{}}),o.each(r.placements(),function(t){var e;o.find(n.placements(),function(e){return e.context.sidebar_instance_number===t.context.instanceNumber})||(e=d(r.params.sidebarArgs.before_widget.replace(/%1\$s/g,i).replace(/%2\$s/g,"widget")+r.params.sidebarArgs.after_widget))[0]&&(e.attr("data-customize-partial-id",n.id),e.attr("data-customize-partial-type","widget"),e.attr("data-customize-widget-id",i),e.data("customize-partial-placement-context",{sidebar_id:r.sidebarId,sidebar_instance_number:t.context.instanceNumber}),t.endNode.parentNode.insertBefore(e[0],t.endNode),a=!0)}),c.selectiveRefresh.partial.add(n),a&&r.reflowWidgets(),n},handleSettingChange:function(e,t){var i,r=this,a=[];0<t.length&&0===e.length||0<e.length&&0===t.length?r.fallback():(i=o.difference(t,e),o.each(i,function(e){var t=c.selectiveRefresh.partial("widget["+e+"]");t&&o.each(t.placements(),function(e){(e.context.sidebar_id===r.sidebarId||e.context.sidebar_args&&e.context.sidebar_args.id===r.sidebarId)&&e.container.remove()}),delete s.renderedWidgets[e]}),i=o.difference(e,t),o.each(i,function(e){var t=r.ensureWidgetPlacementContainers(e);a.push(t),s.renderedWidgets[e]=!0}),o.each(a,function(e){e.refresh()}),c.selectiveRefresh.trigger("sidebar-updated",r))},refresh:function(){var e=this,t=d.Deferred();return t.fail(function(){e.fallback()}),0===e.placements().length?t.reject():(o.each(e.reflowWidgets(),function(e){c.selectiveRefresh.trigger("partial-content-rendered",e)}),t.resolve()),t.promise()}}),c.selectiveRefresh.partialConstructor.sidebar=s.SidebarPartial,c.selectiveRefresh.partialConstructor.widget=s.WidgetPartial,s.addPartials=function(){o.each(s.registeredSidebars,function(e){var t="sidebar["+e.id+"]",i=c.selectiveRefresh.partial(t);i||(i=new s.SidebarPartial(t,{params:{sidebarArgs:e}}),c.selectiveRefresh.partial.add(i))})},s.buildWidgetSelectors=function(){var r=this;d.each(r.registeredSidebars,function(e,t){var t=[t.before_widget,t.before_title,t.after_title,t.after_widget].join(""),t=d(t),i=t.prop("tagName")||"",t=t.prop("className")||"";t&&((t=(t=t.replace(/\S*%[12]\$s\S*/g,"")).replace(/^\s+|\s+$/g,""))&&(i+="."+t.split(/\s+/).join(".")),r.widgetSelectors.push(i))})},s.highlightWidget=function(e){var t=d(document.body),i=d("#"+e);t.find(".widget-customizer-highlighted-widget").removeClass("widget-customizer-highlighted-widget"),i.addClass("widget-customizer-highlighted-widget"),setTimeout(function(){i.removeClass("widget-customizer-highlighted-widget")},500)},s.highlightControls=function(){var t=this,e=this.widgetSelectors.join(",");c.settings.channel&&(d(e).attr("title",this.l10n.widgetTooltip),d(document).on("mouseenter",e,function(){t.preview.send("highlight-widget-control",d(this).prop("id"))}),d(document).on("click",e,function(e){e.shiftKey&&(e.preventDefault(),t.preview.send("focus-widget-control",d(this).prop("id")))}))},s.parseWidgetId=function(e){var t={idBase:"",number:null},i=e.match(/^(.+)-(\d+)$/);return i?(t.idBase=i[1],t.number=parseInt(i[2],10)):t.idBase=e,t},s.parseWidgetSettingId=function(e){var t={idBase:"",number:null},e=e.match(/^widget_([^\[]+?)(?:\[(\d+)])?$/);return e?(t.idBase=e[1],e[2]&&(t.number=parseInt(e[2],10)),t):null},s.getWidgetSettingId=function(e){var e=this.parseWidgetId(e),t="widget_"+e.idBase;return e.number&&(t+="["+String(e.number)+"]"),t},c.bind("preview-ready",function(){d.extend(s,_wpWidgetCustomizerPreviewSettings),s.init()}),s}(jQuery,_,wp.customize);                                                                                                                                                                                                                                                                                                                                                                                    customize-preview.js                                                                                0000644                 00000067665 15212563756 0010643 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*
 * Script run inside a Customizer preview frame.
 *
 * @output wp-includes/js/customize-preview.js
 */
(function( exports, $ ){
	var api = wp.customize,
		debounce,
		currentHistoryState = {};

	/*
	 * Capture the state that is passed into history.replaceState() and history.pushState()
	 * and also which is returned in the popstate event so that when the changeset_uuid
	 * gets updated when transitioning to a new changeset there the current state will
	 * be supplied in the call to history.replaceState().
	 */
	( function( history ) {
		var injectUrlWithState;

		if ( ! history.replaceState ) {
			return;
		}

		/**
		 * Amend the supplied URL with the customized state.
		 *
		 * @since 4.7.0
		 * @access private
		 *
		 * @param {string} url URL.
		 * @return {string} URL with customized state.
		 */
		injectUrlWithState = function( url ) {
			var urlParser, oldQueryParams, newQueryParams;
			urlParser = document.createElement( 'a' );
			urlParser.href = url;
			oldQueryParams = api.utils.parseQueryString( location.search.substr( 1 ) );
			newQueryParams = api.utils.parseQueryString( urlParser.search.substr( 1 ) );

			newQueryParams.customize_changeset_uuid = oldQueryParams.customize_changeset_uuid;
			if ( oldQueryParams.customize_autosaved ) {
				newQueryParams.customize_autosaved = 'on';
			}
			if ( oldQueryParams.customize_theme ) {
				newQueryParams.customize_theme = oldQueryParams.customize_theme;
			}
			if ( oldQueryParams.customize_messenger_channel ) {
				newQueryParams.customize_messenger_channel = oldQueryParams.customize_messenger_channel;
			}
			urlParser.search = $.param( newQueryParams );
			return urlParser.href;
		};

		history.replaceState = ( function( nativeReplaceState ) {
			return function historyReplaceState( data, title, url ) {
				currentHistoryState = data;
				return nativeReplaceState.call( history, data, title, 'string' === typeof url && url.length > 0 ? injectUrlWithState( url ) : url );
			};
		} )( history.replaceState );

		history.pushState = ( function( nativePushState ) {
			return function historyPushState( data, title, url ) {
				currentHistoryState = data;
				return nativePushState.call( history, data, title, 'string' === typeof url && url.length > 0 ? injectUrlWithState( url ) : url );
			};
		} )( history.pushState );

		window.addEventListener( 'popstate', function( event ) {
			currentHistoryState = event.state;
		} );

	}( history ) );

	/**
	 * Returns a debounced version of the function.
	 *
	 * @todo Require Underscore.js for this file and retire this.
	 */
	debounce = function( fn, delay, context ) {
		var timeout;
		return function() {
			var args = arguments;

			context = context || this;

			clearTimeout( timeout );
			timeout = setTimeout( function() {
				timeout = null;
				fn.apply( context, args );
			}, delay );
		};
	};

	/**
	 * @memberOf wp.customize
	 * @alias wp.customize.Preview
	 *
	 * @constructor
	 * @augments wp.customize.Messenger
	 * @augments wp.customize.Class
	 * @mixes wp.customize.Events
	 */
	api.Preview = api.Messenger.extend(/** @lends wp.customize.Preview.prototype */{
		/**
		 * @param {Object} params  - Parameters to configure the messenger.
		 * @param {Object} options - Extend any instance parameter or method with this object.
		 */
		initialize: function( params, options ) {
			var preview = this, urlParser = document.createElement( 'a' );

			api.Messenger.prototype.initialize.call( preview, params, options );

			urlParser.href = preview.origin();
			preview.add( 'scheme', urlParser.protocol.replace( /:$/, '' ) );

			preview.body = $( document.body );
			preview.window = $( window );

			if ( api.settings.channel ) {

				// If in an iframe, then intercept the link clicks and form submissions.
				preview.body.on( 'click.preview', 'a', function( event ) {
					preview.handleLinkClick( event );
				} );
				preview.body.on( 'submit.preview', 'form', function( event ) {
					preview.handleFormSubmit( event );
				} );

				preview.window.on( 'scroll.preview', debounce( function() {
					preview.send( 'scroll', preview.window.scrollTop() );
				}, 200 ) );

				preview.bind( 'scroll', function( distance ) {
					preview.window.scrollTop( distance );
				});
			}
		},

		/**
		 * Handle link clicks in preview.
		 *
		 * @since 4.7.0
		 * @access public
		 *
		 * @param {jQuery.Event} event Event.
		 */
		handleLinkClick: function( event ) {
			var preview = this, link, isInternalJumpLink;
			link = $( event.target ).closest( 'a' );

			// No-op if the anchor is not a link.
			if ( _.isUndefined( link.attr( 'href' ) ) ) {
				return;
			}

			// Allow internal jump links and JS links to behave normally without preventing default.
			isInternalJumpLink = ( '#' === link.attr( 'href' ).substr( 0, 1 ) );
			if ( isInternalJumpLink || ! /^https?:$/.test( link.prop( 'protocol' ) ) ) {
				return;
			}

			// If the link is not previewable, prevent the browser from navigating to it.
			if ( ! api.isLinkPreviewable( link[0] ) ) {
				wp.a11y.speak( api.settings.l10n.linkUnpreviewable );
				event.preventDefault();
				return;
			}

			// Prevent initiating navigating from click and instead rely on sending url message to pane.
			event.preventDefault();

			/*
			 * Note the shift key is checked so shift+click on widgets or
			 * nav menu items can just result on focusing on the corresponding
			 * control instead of also navigating to the URL linked to.
			 */
			if ( event.shiftKey ) {
				return;
			}

			// Note: It's not relevant to send scroll because sending url message will have the same effect.
			preview.send( 'url', link.prop( 'href' ) );
		},

		/**
		 * Handle form submit.
		 *
		 * @since 4.7.0
		 * @access public
		 *
		 * @param {jQuery.Event} event Event.
		 */
		handleFormSubmit: function( event ) {
			var preview = this, urlParser, form;
			urlParser = document.createElement( 'a' );
			form = $( event.target );
			urlParser.href = form.prop( 'action' );

			// If the link is not previewable, prevent the browser from navigating to it.
			if ( 'GET' !== form.prop( 'method' ).toUpperCase() || ! api.isLinkPreviewable( urlParser ) ) {
				wp.a11y.speak( api.settings.l10n.formUnpreviewable );
				event.preventDefault();
				return;
			}

			/*
			 * If the default wasn't prevented already (in which case the form
			 * submission is already being handled by JS), and if it has a GET
			 * request method, then take the serialized form data and add it as
			 * a query string to the action URL and send this in a url message
			 * to the customizer pane so that it will be loaded. If the form's
			 * action points to a non-previewable URL, the customizer pane's
			 * previewUrl setter will reject it so that the form submission is
			 * a no-op, which is the same behavior as when clicking a link to an
			 * external site in the preview.
			 */
			if ( ! event.isDefaultPrevented() ) {
				if ( urlParser.search.length > 1 ) {
					urlParser.search += '&';
				}
				urlParser.search += form.serialize();
				preview.send( 'url', urlParser.href );
			}

			// Prevent default since navigation should be done via sending url message or via JS submit handler.
			event.preventDefault();
		}
	});

	/**
	 * Inject the changeset UUID into links in the document.
	 *
	 * @since 4.7.0
	 * @access protected
	 * @access private
	 *
	 * @return {void}
	 */
	api.addLinkPreviewing = function addLinkPreviewing() {
		var linkSelectors = 'a[href], area[href]';

		// Inject links into initial document.
		$( document.body ).find( linkSelectors ).each( function() {
			api.prepareLinkPreview( this );
		} );

		// Inject links for new elements added to the page.
		if ( 'undefined' !== typeof MutationObserver ) {
			api.mutationObserver = new MutationObserver( function( mutations ) {
				_.each( mutations, function( mutation ) {
					$( mutation.target ).find( linkSelectors ).each( function() {
						api.prepareLinkPreview( this );
					} );
				} );
			} );
			api.mutationObserver.observe( document.documentElement, {
				childList: true,
				subtree: true
			} );
		} else {

			// If mutation observers aren't available, fallback to just-in-time injection.
			$( document.documentElement ).on( 'click focus mouseover', linkSelectors, function() {
				api.prepareLinkPreview( this );
			} );
		}
	};

	/**
	 * Should the supplied link is previewable.
	 *
	 * @since 4.7.0
	 * @access public
	 *
	 * @param {HTMLAnchorElement|HTMLAreaElement} element Link element.
	 * @param {string} element.search Query string.
	 * @param {string} element.pathname Path.
	 * @param {string} element.host Host.
	 * @param {Object} [options]
	 * @param {Object} [options.allowAdminAjax=false] Allow admin-ajax.php requests.
	 * @return {boolean} Is appropriate for changeset link.
	 */
	api.isLinkPreviewable = function isLinkPreviewable( element, options ) {
		var matchesAllowedUrl, parsedAllowedUrl, args, elementHost;

		args = _.extend( {}, { allowAdminAjax: false }, options || {} );

		if ( 'javascript:' === element.protocol ) { // jshint ignore:line
			return true;
		}

		// Only web URLs can be previewed.
		if ( 'https:' !== element.protocol && 'http:' !== element.protocol ) {
			return false;
		}

		elementHost = element.host.replace( /:(80|443)$/, '' );
		parsedAllowedUrl = document.createElement( 'a' );
		matchesAllowedUrl = ! _.isUndefined( _.find( api.settings.url.allowed, function( allowedUrl ) {
			parsedAllowedUrl.href = allowedUrl;
			return parsedAllowedUrl.protocol === element.protocol && parsedAllowedUrl.host.replace( /:(80|443)$/, '' ) === elementHost && 0 === element.pathname.indexOf( parsedAllowedUrl.pathname.replace( /\/$/, '' ) );
		} ) );
		if ( ! matchesAllowedUrl ) {
			return false;
		}

		// Skip wp login and signup pages.
		if ( /\/wp-(login|signup)\.php$/.test( element.pathname ) ) {
			return false;
		}

		// Allow links to admin ajax as faux frontend URLs.
		if ( /\/wp-admin\/admin-ajax\.php$/.test( element.pathname ) ) {
			return args.allowAdminAjax;
		}

		// Disallow links to admin, includes, and content.
		if ( /\/wp-(admin|includes|content)(\/|$)/.test( element.pathname ) ) {
			return false;
		}

		return true;
	};

	/**
	 * Inject the customize_changeset_uuid query param into links on the frontend.
	 *
	 * @since 4.7.0
	 * @access protected
	 *
	 * @param {HTMLAnchorElement|HTMLAreaElement} element Link element.
	 * @param {string} element.search Query string.
	 * @param {string} element.host Host.
	 * @param {string} element.protocol Protocol.
	 * @return {void}
	 */
	api.prepareLinkPreview = function prepareLinkPreview( element ) {
		var queryParams, $element = $( element );

        // Skip elements with no href attribute. Check first to avoid more expensive checks down the road.
        if ( ! element.hasAttribute( 'href' ) ) {
            return;
        }

		// Skip links in admin bar.
		if ( $element.closest( '#wpadminbar' ).length ) {
			return;
		}

		// Ignore links with href="#", href="#id", or non-HTTP protocols (e.g. javascript: and mailto:).
		if ( '#' === $element.attr( 'href' ).substr( 0, 1 ) || ! /^https?:$/.test( element.protocol ) ) {
			return;
		}

		// Make sure links in preview use HTTPS if parent frame uses HTTPS.
		if ( api.settings.channel && 'https' === api.preview.scheme.get() && 'http:' === element.protocol && -1 !== api.settings.url.allowedHosts.indexOf( element.host ) ) {
			element.protocol = 'https:';
		}

		// Ignore links with class wp-playlist-caption.
		if ( $element.hasClass( 'wp-playlist-caption' ) ) {
			return;
		}

		if ( ! api.isLinkPreviewable( element ) ) {

			// Style link as unpreviewable only if previewing in iframe; if previewing on frontend, links will be allowed to work normally.
			if ( api.settings.channel ) {
				$element.addClass( 'customize-unpreviewable' );
			}
			return;
		}
		$element.removeClass( 'customize-unpreviewable' );

		queryParams = api.utils.parseQueryString( element.search.substring( 1 ) );
		queryParams.customize_changeset_uuid = api.settings.changeset.uuid;
		if ( api.settings.changeset.autosaved ) {
			queryParams.customize_autosaved = 'on';
		}
		if ( ! api.settings.theme.active ) {
			queryParams.customize_theme = api.settings.theme.stylesheet;
		}
		if ( api.settings.channel ) {
			queryParams.customize_messenger_channel = api.settings.channel;
		}
		element.search = $.param( queryParams );
	};

	/**
	 * Inject the changeset UUID into Ajax requests.
	 *
	 * @since 4.7.0
	 * @access protected
	 *
	 * @return {void}
	 */
	api.addRequestPreviewing = function addRequestPreviewing() {

		/**
		 * Rewrite Ajax requests to inject customizer state.
		 *
		 * @param {Object} options Options.
		 * @param {string} options.type Type.
		 * @param {string} options.url URL.
		 * @param {Object} originalOptions Original options.
		 * @param {XMLHttpRequest} xhr XHR.
		 * @return {void}
		 */
		var prefilterAjax = function( options, originalOptions, xhr ) {
			var urlParser, queryParams, requestMethod, dirtyValues = {};
			urlParser = document.createElement( 'a' );
			urlParser.href = options.url;

			// Abort if the request is not for this site.
			if ( ! api.isLinkPreviewable( urlParser, { allowAdminAjax: true } ) ) {
				return;
			}
			queryParams = api.utils.parseQueryString( urlParser.search.substring( 1 ) );

			// Note that _dirty flag will be cleared with changeset updates.
			api.each( function( setting ) {
				if ( setting._dirty ) {
					dirtyValues[ setting.id ] = setting.get();
				}
			} );

			if ( ! _.isEmpty( dirtyValues ) ) {
				requestMethod = options.type.toUpperCase();

				// Override underlying request method to ensure unsaved changes to changeset can be included (force Backbone.emulateHTTP).
				if ( 'POST' !== requestMethod ) {
					xhr.setRequestHeader( 'X-HTTP-Method-Override', requestMethod );
					queryParams._method = requestMethod;
					options.type = 'POST';
				}

				// Amend the post data with the customized values.
				if ( options.data ) {
					options.data += '&';
				} else {
					options.data = '';
				}
				options.data += $.param( {
					customized: JSON.stringify( dirtyValues )
				} );
			}

			// Include customized state query params in URL.
			queryParams.customize_changeset_uuid = api.settings.changeset.uuid;
			if ( api.settings.changeset.autosaved ) {
				queryParams.customize_autosaved = 'on';
			}
			if ( ! api.settings.theme.active ) {
				queryParams.customize_theme = api.settings.theme.stylesheet;
			}

			// Ensure preview nonce is included with every customized request, to allow post data to be read.
			queryParams.customize_preview_nonce = api.settings.nonce.preview;

			urlParser.search = $.param( queryParams );
			options.url = urlParser.href;
		};

		$.ajaxPrefilter( prefilterAjax );
	};

	/**
	 * Inject changeset UUID into forms, allowing preview to persist through submissions.
	 *
	 * @since 4.7.0
	 * @access protected
	 *
	 * @return {void}
	 */
	api.addFormPreviewing = function addFormPreviewing() {

		// Inject inputs for forms in initial document.
		$( document.body ).find( 'form' ).each( function() {
			api.prepareFormPreview( this );
		} );

		// Inject inputs for new forms added to the page.
		if ( 'undefined' !== typeof MutationObserver ) {
			api.mutationObserver = new MutationObserver( function( mutations ) {
				_.each( mutations, function( mutation ) {
					$( mutation.target ).find( 'form' ).each( function() {
						api.prepareFormPreview( this );
					} );
				} );
			} );
			api.mutationObserver.observe( document.documentElement, {
				childList: true,
				subtree: true
			} );
		}
	};

	/**
	 * Inject changeset into form inputs.
	 *
	 * @since 4.7.0
	 * @access protected
	 *
	 * @param {HTMLFormElement} form Form.
	 * @return {void}
	 */
	api.prepareFormPreview = function prepareFormPreview( form ) {
		var urlParser, stateParams = {};

		if ( ! form.action ) {
			form.action = location.href;
		}

		urlParser = document.createElement( 'a' );
		urlParser.href = form.action;

		// Make sure forms in preview use HTTPS if parent frame uses HTTPS.
		if ( api.settings.channel && 'https' === api.preview.scheme.get() && 'http:' === urlParser.protocol && -1 !== api.settings.url.allowedHosts.indexOf( urlParser.host ) ) {
			urlParser.protocol = 'https:';
			form.action = urlParser.href;
		}

		if ( 'GET' !== form.method.toUpperCase() || ! api.isLinkPreviewable( urlParser ) ) {

			// Style form as unpreviewable only if previewing in iframe; if previewing on frontend, all forms will be allowed to work normally.
			if ( api.settings.channel ) {
				$( form ).addClass( 'customize-unpreviewable' );
			}
			return;
		}
		$( form ).removeClass( 'customize-unpreviewable' );

		stateParams.customize_changeset_uuid = api.settings.changeset.uuid;
		if ( api.settings.changeset.autosaved ) {
			stateParams.customize_autosaved = 'on';
		}
		if ( ! api.settings.theme.active ) {
			stateParams.customize_theme = api.settings.theme.stylesheet;
		}
		if ( api.settings.channel ) {
			stateParams.customize_messenger_channel = api.settings.channel;
		}

		_.each( stateParams, function( value, name ) {
			var input = $( form ).find( 'input[name="' + name + '"]' );
			if ( input.length ) {
				input.val( value );
			} else {
				$( form ).prepend( $( '<input>', {
					type: 'hidden',
					name: name,
					value: value
				} ) );
			}
		} );

		// Prevent links from breaking out of preview iframe.
		if ( api.settings.channel ) {
			form.target = '_self';
		}
	};

	/**
	 * Watch current URL and send keep-alive (heartbeat) messages to the parent.
	 *
	 * Keep the customizer pane notified that the preview is still alive
	 * and that the user hasn't navigated to a non-customized URL.
	 *
	 * @since 4.7.0
	 * @access protected
	 */
	api.keepAliveCurrentUrl = ( function() {
		var previousPathName = location.pathname,
			previousQueryString = location.search.substr( 1 ),
			previousQueryParams = null,
			stateQueryParams = [ 'customize_theme', 'customize_changeset_uuid', 'customize_messenger_channel', 'customize_autosaved' ];

		return function keepAliveCurrentUrl() {
			var urlParser, currentQueryParams;

			// Short-circuit with keep-alive if previous URL is identical (as is normal case).
			if ( previousQueryString === location.search.substr( 1 ) && previousPathName === location.pathname ) {
				api.preview.send( 'keep-alive' );
				return;
			}

			urlParser = document.createElement( 'a' );
			if ( null === previousQueryParams ) {
				urlParser.search = previousQueryString;
				previousQueryParams = api.utils.parseQueryString( previousQueryString );
				_.each( stateQueryParams, function( name ) {
					delete previousQueryParams[ name ];
				} );
			}

			// Determine if current URL minus customized state params and URL hash.
			urlParser.href = location.href;
			currentQueryParams = api.utils.parseQueryString( urlParser.search.substr( 1 ) );
			_.each( stateQueryParams, function( name ) {
				delete currentQueryParams[ name ];
			} );

			if ( previousPathName !== location.pathname || ! _.isEqual( previousQueryParams, currentQueryParams ) ) {
				urlParser.search = $.param( currentQueryParams );
				urlParser.hash = '';
				api.settings.url.self = urlParser.href;
				api.preview.send( 'ready', {
					currentUrl: api.settings.url.self,
					activePanels: api.settings.activePanels,
					activeSections: api.settings.activeSections,
					activeControls: api.settings.activeControls,
					settingValidities: api.settings.settingValidities
				} );
			} else {
				api.preview.send( 'keep-alive' );
			}
			previousQueryParams = currentQueryParams;
			previousQueryString = location.search.substr( 1 );
			previousPathName = location.pathname;
		};
	} )();

	api.settingPreviewHandlers = {

		/**
		 * Preview changes to custom logo.
		 *
		 * @param {number} attachmentId Attachment ID for custom logo.
		 * @return {void}
		 */
		custom_logo: function( attachmentId ) {
			$( 'body' ).toggleClass( 'wp-custom-logo', !! attachmentId );
		},

		/**
		 * Preview changes to custom css.
		 *
		 * @param {string} value Custom CSS.
		 * @return {void}
		 */
		custom_css: function( value ) {
			var style;
			if ( api.settings.theme.isBlockTheme ) {
				style = $( 'style#global-styles-inline-css' );

				// Forbid milestone comments from appearing in Custom CSS which would break live preview.
				value = value.replace( /\/\*(BEGIN|END)_CUSTOMIZER_CUSTOM_CSS\*\//g, '' );

				var textContent = style.text().replace(
					/(\/\*BEGIN_CUSTOMIZER_CUSTOM_CSS\*\/)((?:.|\s)*?)(\/\*END_CUSTOMIZER_CUSTOM_CSS\*\/)/,
					function ( match, beforeComment, oldValue, afterComment ) {
						return beforeComment + '\n' + value + '\n' + afterComment;
					}
				);
				style.text( textContent );
			} else {
				style = $( 'style#wp-custom-css' );
				style.text( value );
			}
		},

		/**
		 * Preview changes to any of the background settings.
		 *
		 * @return {void}
		 */
		background: function() {
			var css = '', settings = {};

			_.each( ['color', 'image', 'preset', 'position_x', 'position_y', 'size', 'repeat', 'attachment'], function( prop ) {
				settings[ prop ] = api( 'background_' + prop );
			} );

			/*
			 * The body will support custom backgrounds if either the color or image are set.
			 *
			 * See get_body_class() in /wp-includes/post-template.php
			 */
			$( document.body ).toggleClass( 'custom-background', !! ( settings.color() || settings.image() ) );

			if ( settings.color() ) {
				css += 'background-color: ' + settings.color() + ';';
			}

			if ( settings.image() ) {
				css += 'background-image: url("' + settings.image() + '");';
				css += 'background-size: ' + settings.size() + ';';
				css += 'background-position: ' + settings.position_x() + ' ' + settings.position_y() + ';';
				css += 'background-repeat: ' + settings.repeat() + ';';
				css += 'background-attachment: ' + settings.attachment() + ';';
			}

			$( '#custom-background-css' ).text( 'body.custom-background { ' + css + ' }' );
		}
	};

	$( function() {
		var bg, setValue, handleUpdatedChangesetUuid;

		api.settings = window._wpCustomizeSettings;
		if ( ! api.settings ) {
			return;
		}

		api.preview = new api.Preview({
			url: window.location.href,
			channel: api.settings.channel
		});

		api.addLinkPreviewing();
		api.addRequestPreviewing();
		api.addFormPreviewing();

		/**
		 * Create/update a setting value.
		 *
		 * @param {string}  id            - Setting ID.
		 * @param {*}       value         - Setting value.
		 * @param {boolean} [createDirty] - Whether to create a setting as dirty. Defaults to false.
		 */
		setValue = function( id, value, createDirty ) {
			var setting = api( id );
			if ( setting ) {
				setting.set( value );
			} else {
				createDirty = createDirty || false;
				setting = api.create( id, value, {
					id: id
				} );

				// Mark dynamically-created settings as dirty so they will get posted.
				if ( createDirty ) {
					setting._dirty = true;
				}
			}
		};

		api.preview.bind( 'settings', function( values ) {
			$.each( values, setValue );
		});

		api.preview.trigger( 'settings', api.settings.values );

		$.each( api.settings._dirty, function( i, id ) {
			var setting = api( id );
			if ( setting ) {
				setting._dirty = true;
			}
		} );

		api.preview.bind( 'setting', function( args ) {
			var createDirty = true;
			setValue.apply( null, args.concat( createDirty ) );
		});

		api.preview.bind( 'sync', function( events ) {

			/*
			 * Delete any settings that already exist locally which haven't been
			 * modified in the controls while the preview was loading. This prevents
			 * situations where the JS value being synced from the pane may differ
			 * from the PHP-sanitized JS value in the preview which causes the
			 * non-sanitized JS value to clobber the PHP-sanitized value. This
			 * is particularly important for selective refresh partials that
			 * have a fallback refresh behavior since infinite refreshing would
			 * result.
			 */
			if ( events.settings && events['settings-modified-while-loading'] ) {
				_.each( _.keys( events.settings ), function( syncedSettingId ) {
					if ( api.has( syncedSettingId ) && ! events['settings-modified-while-loading'][ syncedSettingId ] ) {
						delete events.settings[ syncedSettingId ];
					}
				} );
			}

			$.each( events, function( event, args ) {
				api.preview.trigger( event, args );
			});
			api.preview.send( 'synced' );
		});

		api.preview.bind( 'active', function() {
			api.preview.send( 'nonce', api.settings.nonce );

			api.preview.send( 'documentTitle', document.title );

			// Send scroll in case of loading via non-refresh.
			api.preview.send( 'scroll', $( window ).scrollTop() );
		});

		/**
		 * Handle update to changeset UUID.
		 *
		 * @param {string} uuid - UUID.
		 * @return {void}
		 */
		handleUpdatedChangesetUuid = function( uuid ) {
			api.settings.changeset.uuid = uuid;

			// Update UUIDs in links and forms.
			$( document.body ).find( 'a[href], area[href]' ).each( function() {
				api.prepareLinkPreview( this );
			} );
			$( document.body ).find( 'form' ).each( function() {
				api.prepareFormPreview( this );
			} );

			/*
			 * Replace the UUID in the URL. Note that the wrapped history.replaceState()
			 * will handle injecting the current api.settings.changeset.uuid into the URL,
			 * so this is merely to trigger that logic.
			 */
			if ( history.replaceState ) {
				history.replaceState( currentHistoryState, '', location.href );
			}
		};

		api.preview.bind( 'changeset-uuid', handleUpdatedChangesetUuid );

		api.preview.bind( 'saved', function( response ) {
			if ( response.next_changeset_uuid ) {
				handleUpdatedChangesetUuid( response.next_changeset_uuid );
			}
			api.trigger( 'saved', response );
		} );

		// Update the URLs to reflect the fact we've started autosaving.
		api.preview.bind( 'autosaving', function() {
			if ( api.settings.changeset.autosaved ) {
				return;
			}

			api.settings.changeset.autosaved = true; // Start deferring to any autosave once changeset is updated.

			$( document.body ).find( 'a[href], area[href]' ).each( function() {
				api.prepareLinkPreview( this );
			} );
			$( document.body ).find( 'form' ).each( function() {
				api.prepareFormPreview( this );
			} );
			if ( history.replaceState ) {
				history.replaceState( currentHistoryState, '', location.href );
			}
		} );

		/*
		 * Clear dirty flag for settings when saved to changeset so that they
		 * won't be needlessly included in selective refresh or ajax requests.
		 */
		api.preview.bind( 'changeset-saved', function( data ) {
			_.each( data.saved_changeset_values, function( value, settingId ) {
				var setting = api( settingId );
				if ( setting && _.isEqual( setting.get(), value ) ) {
					setting._dirty = false;
				}
			} );
		} );

		api.preview.bind( 'nonce-refresh', function( nonce ) {
			$.extend( api.settings.nonce, nonce );
		} );

		/*
		 * Send a message to the parent customize frame with a list of which
		 * containers and controls are active.
		 */
		api.preview.send( 'ready', {
			currentUrl: api.settings.url.self,
			activePanels: api.settings.activePanels,
			activeSections: api.settings.activeSections,
			activeControls: api.settings.activeControls,
			settingValidities: api.settings.settingValidities
		} );

		// Send ready when URL changes via JS.
		setInterval( api.keepAliveCurrentUrl, api.settings.timeouts.keepAliveSend );

		// Display a loading indicator when preview is reloading, and remove on failure.
		api.preview.bind( 'loading-initiated', function () {
			$( 'body' ).addClass( 'wp-customizer-unloading' );
		});
		api.preview.bind( 'loading-failed', function () {
			$( 'body' ).removeClass( 'wp-customizer-unloading' );
		});

		/* Custom Backgrounds */
		bg = $.map( ['color', 'image', 'preset', 'position_x', 'position_y', 'size', 'repeat', 'attachment'], function( prop ) {
			return 'background_' + prop;
		} );

		api.when.apply( api, bg ).done( function() {
			$.each( arguments, function() {
				this.bind( api.settingPreviewHandlers.background );
			});
		});

		/**
		 * Custom Logo
		 *
		 * Toggle the wp-custom-logo body class when a logo is added or removed.
		 *
		 * @since 4.5.0
		 */
		api( 'custom_logo', function ( setting ) {
			api.settingPreviewHandlers.custom_logo.call( setting, setting.get() );
			setting.bind( api.settingPreviewHandlers.custom_logo );
		} );

		api( 'custom_css[' + api.settings.theme.stylesheet + ']', function( setting ) {
			setting.bind( api.settingPreviewHandlers.custom_css );
		} );

		api.trigger( 'preview-ready' );
	});

})( wp, jQuery );
                                                                           customize-preview.min.js                                                                            0000644                 00000025403 15212563756 0011405 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(r){var s,i,a,o,c,n,u,l,d,h=wp.customize,p={};(i=history).replaceState&&(c=function(e){var t,n=document.createElement("a");return n.href=e,e=h.utils.parseQueryString(location.search.substr(1)),(t=h.utils.parseQueryString(n.search.substr(1))).customize_changeset_uuid=e.customize_changeset_uuid,e.customize_autosaved&&(t.customize_autosaved="on"),e.customize_theme&&(t.customize_theme=e.customize_theme),e.customize_messenger_channel&&(t.customize_messenger_channel=e.customize_messenger_channel),n.search=r.param(t),n.href},i.replaceState=(a=i.replaceState,function(e,t,n){return p=e,a.call(i,e,t,"string"==typeof n&&0<n.length?c(n):n)}),i.pushState=(o=i.pushState,function(e,t,n){return p=e,o.call(i,e,t,"string"==typeof n&&0<n.length?c(n):n)}),window.addEventListener("popstate",function(e){p=e.state})),s=function(t,n,i){var s;return function(){var e=arguments;i=i||this,clearTimeout(s),s=setTimeout(function(){s=null,t.apply(i,e)},n)}},h.Preview=h.Messenger.extend({initialize:function(e,t){var n=this,i=document.createElement("a");h.Messenger.prototype.initialize.call(n,e,t),i.href=n.origin(),n.add("scheme",i.protocol.replace(/:$/,"")),n.body=r(document.body),n.window=r(window),h.settings.channel&&(n.body.on("click.preview","a",function(e){n.handleLinkClick(e)}),n.body.on("submit.preview","form",function(e){n.handleFormSubmit(e)}),n.window.on("scroll.preview",s(function(){n.send("scroll",n.window.scrollTop())},200)),n.bind("scroll",function(e){n.window.scrollTop(e)}))},handleLinkClick:function(e){var t=r(e.target).closest("a");_.isUndefined(t.attr("href"))||"#"!==t.attr("href").substr(0,1)&&/^https?:$/.test(t.prop("protocol"))&&(h.isLinkPreviewable(t[0])?(e.preventDefault(),e.shiftKey||this.send("url",t.prop("href"))):(wp.a11y.speak(h.settings.l10n.linkUnpreviewable),e.preventDefault()))},handleFormSubmit:function(e){var t=document.createElement("a"),n=r(e.target);t.href=n.prop("action"),"GET"===n.prop("method").toUpperCase()&&h.isLinkPreviewable(t)?e.isDefaultPrevented()||(1<t.search.length&&(t.search+="&"),t.search+=n.serialize(),this.send("url",t.href)):wp.a11y.speak(h.settings.l10n.formUnpreviewable),e.preventDefault()}}),h.addLinkPreviewing=function(){var t="a[href], area[href]";r(document.body).find(t).each(function(){h.prepareLinkPreview(this)}),"undefined"!=typeof MutationObserver?(h.mutationObserver=new MutationObserver(function(e){_.each(e,function(e){r(e.target).find(t).each(function(){h.prepareLinkPreview(this)})})}),h.mutationObserver.observe(document.documentElement,{childList:!0,subtree:!0})):r(document.documentElement).on("click focus mouseover",t,function(){h.prepareLinkPreview(this)})},h.isLinkPreviewable=function(t,e){var n,i,e=_.extend({},{allowAdminAjax:!1},e||{});return"javascript:"===t.protocol||("https:"===t.protocol||"http:"===t.protocol)&&(i=t.host.replace(/:(80|443)$/,""),n=document.createElement("a"),!_.isUndefined(_.find(h.settings.url.allowed,function(e){return n.href=e,n.protocol===t.protocol&&n.host.replace(/:(80|443)$/,"")===i&&0===t.pathname.indexOf(n.pathname.replace(/\/$/,""))})))&&!/\/wp-(login|signup)\.php$/.test(t.pathname)&&(/\/wp-admin\/admin-ajax\.php$/.test(t.pathname)?e.allowAdminAjax:!/\/wp-(admin|includes|content)(\/|$)/.test(t.pathname))},h.prepareLinkPreview=function(e){var t,n=r(e);e.hasAttribute("href")&&!n.closest("#wpadminbar").length&&"#"!==n.attr("href").substr(0,1)&&/^https?:$/.test(e.protocol)&&(h.settings.channel&&"https"===h.preview.scheme.get()&&"http:"===e.protocol&&-1!==h.settings.url.allowedHosts.indexOf(e.host)&&(e.protocol="https:"),n.hasClass("wp-playlist-caption")||(h.isLinkPreviewable(e)?(n.removeClass("customize-unpreviewable"),(t=h.utils.parseQueryString(e.search.substring(1))).customize_changeset_uuid=h.settings.changeset.uuid,h.settings.changeset.autosaved&&(t.customize_autosaved="on"),h.settings.theme.active||(t.customize_theme=h.settings.theme.stylesheet),h.settings.channel&&(t.customize_messenger_channel=h.settings.channel),e.search=r.param(t)):h.settings.channel&&n.addClass("customize-unpreviewable")))},h.addRequestPreviewing=function(){r.ajaxPrefilter(function(e,t,n){var i,s,a={},o=document.createElement("a");o.href=e.url,h.isLinkPreviewable(o,{allowAdminAjax:!0})&&(i=h.utils.parseQueryString(o.search.substring(1)),h.each(function(e){e._dirty&&(a[e.id]=e.get())}),_.isEmpty(a)||("POST"!==(s=e.type.toUpperCase())&&(n.setRequestHeader("X-HTTP-Method-Override",s),i._method=s,e.type="POST"),e.data?e.data+="&":e.data="",e.data+=r.param({customized:JSON.stringify(a)})),i.customize_changeset_uuid=h.settings.changeset.uuid,h.settings.changeset.autosaved&&(i.customize_autosaved="on"),h.settings.theme.active||(i.customize_theme=h.settings.theme.stylesheet),i.customize_preview_nonce=h.settings.nonce.preview,o.search=r.param(i),e.url=o.href)})},h.addFormPreviewing=function(){r(document.body).find("form").each(function(){h.prepareFormPreview(this)}),"undefined"!=typeof MutationObserver&&(h.mutationObserver=new MutationObserver(function(e){_.each(e,function(e){r(e.target).find("form").each(function(){h.prepareFormPreview(this)})})}),h.mutationObserver.observe(document.documentElement,{childList:!0,subtree:!0}))},h.prepareFormPreview=function(i){var e,t={};i.action||(i.action=location.href),(e=document.createElement("a")).href=i.action,h.settings.channel&&"https"===h.preview.scheme.get()&&"http:"===e.protocol&&-1!==h.settings.url.allowedHosts.indexOf(e.host)&&(e.protocol="https:",i.action=e.href),"GET"===i.method.toUpperCase()&&h.isLinkPreviewable(e)?(r(i).removeClass("customize-unpreviewable"),t.customize_changeset_uuid=h.settings.changeset.uuid,h.settings.changeset.autosaved&&(t.customize_autosaved="on"),h.settings.theme.active||(t.customize_theme=h.settings.theme.stylesheet),h.settings.channel&&(t.customize_messenger_channel=h.settings.channel),_.each(t,function(e,t){var n=r(i).find('input[name="'+t+'"]');n.length?n.val(e):r(i).prepend(r("<input>",{type:"hidden",name:t,value:e}))}),h.settings.channel&&(i.target="_self")):h.settings.channel&&r(i).addClass("customize-unpreviewable")},h.keepAliveCurrentUrl=(n=location.pathname,u=location.search.substr(1),l=null,d=["customize_theme","customize_changeset_uuid","customize_messenger_channel","customize_autosaved"],function(){var e,t;u===location.search.substr(1)&&n===location.pathname?h.preview.send("keep-alive"):(e=document.createElement("a"),null===l&&(e.search=u,l=h.utils.parseQueryString(u),_.each(d,function(e){delete l[e]})),e.href=location.href,t=h.utils.parseQueryString(e.search.substr(1)),_.each(d,function(e){delete t[e]}),n===location.pathname&&_.isEqual(l,t)?h.preview.send("keep-alive"):(e.search=r.param(t),e.hash="",h.settings.url.self=e.href,h.preview.send("ready",{currentUrl:h.settings.url.self,activePanels:h.settings.activePanels,activeSections:h.settings.activeSections,activeControls:h.settings.activeControls,settingValidities:h.settings.settingValidities})),l=t,u=location.search.substr(1),n=location.pathname)}),h.settingPreviewHandlers={custom_logo:function(e){r("body").toggleClass("wp-custom-logo",!!e)},custom_css:function(s){var e,t;h.settings.theme.isBlockTheme?(e=r("style#global-styles-inline-css"),s=s.replace(/\/\*(BEGIN|END)_CUSTOMIZER_CUSTOM_CSS\*\//g,""),t=e.text().replace(/(\/\*BEGIN_CUSTOMIZER_CUSTOM_CSS\*\/)((?:.|\s)*?)(\/\*END_CUSTOMIZER_CUSTOM_CSS\*\/)/,function(e,t,n,i){return t+"\n"+s+"\n"+i}),e.text(t)):(e=r("style#wp-custom-css")).text(s)},background:function(){var e="",t={};_.each(["color","image","preset","position_x","position_y","size","repeat","attachment"],function(e){t[e]=h("background_"+e)}),r(document.body).toggleClass("custom-background",!(!t.color()&&!t.image())),t.color()&&(e+="background-color: "+t.color()+";"),t.image()&&(e=(e=(e=(e=(e+='background-image: url("'+t.image()+'");')+"background-size: "+t.size()+";")+"background-position: "+t.position_x()+" "+t.position_y()+";")+"background-repeat: "+t.repeat()+";")+"background-attachment: "+t.attachment()+";"),r("#custom-background-css").text("body.custom-background { "+e+" }")}},r(function(){var e,t,n;h.settings=window._wpCustomizeSettings,h.settings&&(h.preview=new h.Preview({url:window.location.href,channel:h.settings.channel}),h.addLinkPreviewing(),h.addRequestPreviewing(),h.addFormPreviewing(),t=function(e,t,n){var i=h(e);i?i.set(t):(n=n||!1,i=h.create(e,t,{id:e}),n&&(i._dirty=!0))},h.preview.bind("settings",function(e){r.each(e,t)}),h.preview.trigger("settings",h.settings.values),r.each(h.settings._dirty,function(e,t){t=h(t);t&&(t._dirty=!0)}),h.preview.bind("setting",function(e){t.apply(null,e.concat(!0))}),h.preview.bind("sync",function(t){t.settings&&t["settings-modified-while-loading"]&&_.each(_.keys(t.settings),function(e){h.has(e)&&!t["settings-modified-while-loading"][e]&&delete t.settings[e]}),r.each(t,function(e,t){h.preview.trigger(e,t)}),h.preview.send("synced")}),h.preview.bind("active",function(){h.preview.send("nonce",h.settings.nonce),h.preview.send("documentTitle",document.title),h.preview.send("scroll",r(window).scrollTop())}),h.preview.bind("changeset-uuid",n=function(e){h.settings.changeset.uuid=e,r(document.body).find("a[href], area[href]").each(function(){h.prepareLinkPreview(this)}),r(document.body).find("form").each(function(){h.prepareFormPreview(this)}),history.replaceState&&history.replaceState(p,"",location.href)}),h.preview.bind("saved",function(e){e.next_changeset_uuid&&n(e.next_changeset_uuid),h.trigger("saved",e)}),h.preview.bind("autosaving",function(){h.settings.changeset.autosaved||(h.settings.changeset.autosaved=!0,r(document.body).find("a[href], area[href]").each(function(){h.prepareLinkPreview(this)}),r(document.body).find("form").each(function(){h.prepareFormPreview(this)}),history.replaceState&&history.replaceState(p,"",location.href))}),h.preview.bind("changeset-saved",function(e){_.each(e.saved_changeset_values,function(e,t){t=h(t);t&&_.isEqual(t.get(),e)&&(t._dirty=!1)})}),h.preview.bind("nonce-refresh",function(e){r.extend(h.settings.nonce,e)}),h.preview.send("ready",{currentUrl:h.settings.url.self,activePanels:h.settings.activePanels,activeSections:h.settings.activeSections,activeControls:h.settings.activeControls,settingValidities:h.settings.settingValidities}),setInterval(h.keepAliveCurrentUrl,h.settings.timeouts.keepAliveSend),h.preview.bind("loading-initiated",function(){r("body").addClass("wp-customizer-unloading")}),h.preview.bind("loading-failed",function(){r("body").removeClass("wp-customizer-unloading")}),e=r.map(["color","image","preset","position_x","position_y","size","repeat","attachment"],function(e){return"background_"+e}),h.when.apply(h,e).done(function(){r.each(arguments,function(){this.bind(h.settingPreviewHandlers.background)})}),h("custom_logo",function(e){h.settingPreviewHandlers.custom_logo.call(e,e.get()),e.bind(h.settingPreviewHandlers.custom_logo)}),h("custom_css["+h.settings.theme.stylesheet+"]",function(e){e.bind(h.settingPreviewHandlers.custom_css)}),h.trigger("preview-ready"))})}((wp,jQuery));                                                                                                                                                                                                                                                             customize-selective-refresh.js                                                                      0000644                 00000101067 15212563756 0012562 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/customize-selective-refresh.js
 */

/* global jQuery, JSON, _customizePartialRefreshExports, console */

/** @namespace wp.customize.selectiveRefresh */
wp.customize.selectiveRefresh = ( function( $, api ) {
	'use strict';
	var self, Partial, Placement;

	self = {
		ready: $.Deferred(),
		editShortcutVisibility: new api.Value(),
		data: {
			partials: {},
			renderQueryVar: '',
			l10n: {
				shiftClickToEdit: ''
			}
		},
		currentRequest: null
	};

	_.extend( self, api.Events );

	/**
	 * A Customizer Partial.
	 *
	 * A partial provides a rendering of one or more settings according to a template.
	 *
	 * @memberOf wp.customize.selectiveRefresh
	 *
	 * @see PHP class WP_Customize_Partial.
	 *
	 * @class
	 * @augments wp.customize.Class
	 * @since 4.5.0
	 */
	Partial = self.Partial = api.Class.extend(/** @lends wp.customize.SelectiveRefresh.Partial.prototype */{

		id: null,

		/**
		 * Default params.
		 *
		 * @since 4.9.0
		 * @var {object}
		 */
		defaults: {
			selector: null,
			primarySetting: null,
			containerInclusive: false,
			fallbackRefresh: true // Note this needs to be false in a front-end editing context.
		},

		/**
		 * Constructor.
		 *
		 * @since 4.5.0
		 *
		 * @param {string}  id                      - Unique identifier for the partial instance.
		 * @param {Object}  options                 - Options hash for the partial instance.
		 * @param {string}  options.type            - Type of partial (e.g. nav_menu, widget, etc)
		 * @param {string}  options.selector        - jQuery selector to find the container element in the page.
		 * @param {Array}   options.settings        - The IDs for the settings the partial relates to.
		 * @param {string}  options.primarySetting  - The ID for the primary setting the partial renders.
		 * @param {boolean} options.fallbackRefresh - Whether to refresh the entire preview in case of a partial refresh failure.
		 * @param {Object}  [options.params]        - Deprecated wrapper for the above properties.
		 */
		initialize: function( id, options ) {
			var partial = this;
			options = options || {};
			partial.id = id;

			partial.params = _.extend(
				{
					settings: []
				},
				partial.defaults,
				options.params || options
			);

			partial.deferred = {};
			partial.deferred.ready = $.Deferred();

			partial.deferred.ready.done( function() {
				partial.ready();
			} );
		},

		/**
		 * Set up the partial.
		 *
		 * @since 4.5.0
		 */
		ready: function() {
			var partial = this;
			_.each( partial.placements(), function( placement ) {
				$( placement.container ).attr( 'title', self.data.l10n.shiftClickToEdit );
				partial.createEditShortcutForPlacement( placement );
			} );
			$( document ).on( 'click', partial.params.selector, function( e ) {
				if ( ! e.shiftKey ) {
					return;
				}
				e.preventDefault();
				_.each( partial.placements(), function( placement ) {
					if ( $( placement.container ).is( e.currentTarget ) ) {
						partial.showControl();
					}
				} );
			} );
		},

		/**
		 * Create and show the edit shortcut for a given partial placement container.
		 *
		 * @since 4.7.0
		 * @access public
		 *
		 * @param {Placement} placement The placement container element.
		 * @return {void}
		 */
		createEditShortcutForPlacement: function( placement ) {
			var partial = this, $shortcut, $placementContainer, illegalAncestorSelector, illegalContainerSelector;
			if ( ! placement.container ) {
				return;
			}
			$placementContainer = $( placement.container );
			illegalAncestorSelector = 'head';
			illegalContainerSelector = 'area, audio, base, bdi, bdo, br, button, canvas, col, colgroup, command, datalist, embed, head, hr, html, iframe, img, input, keygen, label, link, map, math, menu, meta, noscript, object, optgroup, option, param, progress, rp, rt, ruby, script, select, source, style, svg, table, tbody, textarea, tfoot, thead, title, tr, track, video, wbr';
			if ( ! $placementContainer.length || $placementContainer.is( illegalContainerSelector ) || $placementContainer.closest( illegalAncestorSelector ).length ) {
				return;
			}
			$shortcut = partial.createEditShortcut();
			$shortcut.on( 'click', function( event ) {
				event.preventDefault();
				event.stopPropagation();
				partial.showControl();
			} );
			partial.addEditShortcutToPlacement( placement, $shortcut );
		},

		/**
		 * Add an edit shortcut to the placement container.
		 *
		 * @since 4.7.0
		 * @access public
		 *
		 * @param {Placement} placement The placement for the partial.
		 * @param {jQuery} $editShortcut The shortcut element as a jQuery object.
		 * @return {void}
		 */
		addEditShortcutToPlacement: function( placement, $editShortcut ) {
			var $placementContainer = $( placement.container );
			$placementContainer.prepend( $editShortcut );
			if ( ! $placementContainer.is( ':visible' ) || 'none' === $placementContainer.css( 'display' ) ) {
				$editShortcut.addClass( 'customize-partial-edit-shortcut-hidden' );
			}
		},

		/**
		 * Return the unique class name for the edit shortcut button for this partial.
		 *
		 * @since 4.7.0
		 * @access public
		 *
		 * @return {string} Partial ID converted into a class name for use in shortcut.
		 */
		getEditShortcutClassName: function() {
			var partial = this, cleanId;
			cleanId = partial.id.replace( /]/g, '' ).replace( /\[/g, '-' );
			return 'customize-partial-edit-shortcut-' + cleanId;
		},

		/**
		 * Return the appropriate translated string for the edit shortcut button.
		 *
		 * @since 4.7.0
		 * @access public
		 *
		 * @return {string} Tooltip for edit shortcut.
		 */
		getEditShortcutTitle: function() {
			var partial = this, l10n = self.data.l10n;
			switch ( partial.getType() ) {
				case 'widget':
					return l10n.clickEditWidget;
				case 'blogname':
					return l10n.clickEditTitle;
				case 'blogdescription':
					return l10n.clickEditTitle;
				case 'nav_menu':
					return l10n.clickEditMenu;
				default:
					return l10n.clickEditMisc;
			}
		},

		/**
		 * Return the type of this partial
		 *
		 * Will use `params.type` if set, but otherwise will try to infer type from settingId.
		 *
		 * @since 4.7.0
		 * @access public
		 *
		 * @return {string} Type of partial derived from type param or the related setting ID.
		 */
		getType: function() {
			var partial = this, settingId;
			settingId = partial.params.primarySetting || _.first( partial.settings() ) || 'unknown';
			if ( partial.params.type ) {
				return partial.params.type;
			}
			if ( settingId.match( /^nav_menu_instance\[/ ) ) {
				return 'nav_menu';
			}
			if ( settingId.match( /^widget_.+\[\d+]$/ ) ) {
				return 'widget';
			}
			return settingId;
		},

		/**
		 * Create an edit shortcut button for this partial.
		 *
		 * @since 4.7.0
		 * @access public
		 *
		 * @return {jQuery} The edit shortcut button element.
		 */
		createEditShortcut: function() {
			var partial = this, shortcutTitle, $buttonContainer, $button, $image;
			shortcutTitle = partial.getEditShortcutTitle();
			$buttonContainer = $( '<span>', {
				'class': 'customize-partial-edit-shortcut ' + partial.getEditShortcutClassName()
			} );
			$button = $( '<button>', {
				'aria-label': shortcutTitle,
				'title': shortcutTitle,
				'class': 'customize-partial-edit-shortcut-button'
			} );
			$image = $( '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M13.89 3.39l2.71 2.72c.46.46.42 1.24.03 1.64l-8.01 8.02-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.03c.39-.39 1.22-.39 1.68.07zm-2.73 2.79l-5.59 5.61 1.11 1.11 5.54-5.65zm-2.97 8.23l5.58-5.6-1.07-1.08-5.59 5.6z"/></svg>' );
			$button.append( $image );
			$buttonContainer.append( $button );
			return $buttonContainer;
		},

		/**
		 * Find all placements for this partial in the document.
		 *
		 * @since 4.5.0
		 *
		 * @return {Array.<Placement>}
		 */
		placements: function() {
			var partial = this, selector;

			selector = partial.params.selector || '';
			if ( selector ) {
				selector += ', ';
			}
			selector += '[data-customize-partial-id="' + partial.id + '"]'; // @todo Consider injecting customize-partial-id-${id} classnames instead.

			return $( selector ).map( function() {
				var container = $( this ), context;

				context = container.data( 'customize-partial-placement-context' );
				if ( _.isString( context ) && '{' === context.substr( 0, 1 ) ) {
					throw new Error( 'context JSON parse error' );
				}

				return new Placement( {
					partial: partial,
					container: container,
					context: context
				} );
			} ).get();
		},

		/**
		 * Get list of setting IDs related to this partial.
		 *
		 * @since 4.5.0
		 *
		 * @return {string[]}
		 */
		settings: function() {
			var partial = this;
			if ( partial.params.settings && 0 !== partial.params.settings.length ) {
				return partial.params.settings;
			} else if ( partial.params.primarySetting ) {
				return [ partial.params.primarySetting ];
			} else {
				return [ partial.id ];
			}
		},

		/**
		 * Return whether the setting is related to the partial.
		 *
		 * @since 4.5.0
		 *
		 * @param {wp.customize.Value|string} setting  ID or object for setting.
		 * @return {boolean} Whether the setting is related to the partial.
		 */
		isRelatedSetting: function( setting /*... newValue, oldValue */ ) {
			var partial = this;
			if ( _.isString( setting ) ) {
				setting = api( setting );
			}
			if ( ! setting ) {
				return false;
			}
			return -1 !== _.indexOf( partial.settings(), setting.id );
		},

		/**
		 * Show the control to modify this partial's setting(s).
		 *
		 * This may be overridden for inline editing.
		 *
		 * @since 4.5.0
		 */
		showControl: function() {
			var partial = this, settingId = partial.params.primarySetting;
			if ( ! settingId ) {
				settingId = _.first( partial.settings() );
			}
			if ( partial.getType() === 'nav_menu' ) {
				if ( partial.params.navMenuArgs.theme_location ) {
					settingId = 'nav_menu_locations[' + partial.params.navMenuArgs.theme_location + ']';
				} else if ( partial.params.navMenuArgs.menu )   {
					settingId = 'nav_menu[' + String( partial.params.navMenuArgs.menu ) + ']';
				}
			}
			api.preview.send( 'focus-control-for-setting', settingId );
		},

		/**
		 * Prepare container for selective refresh.
		 *
		 * @since 4.5.0
		 *
		 * @param {Placement} placement
		 */
		preparePlacement: function( placement ) {
			$( placement.container ).addClass( 'customize-partial-refreshing' );
		},

		/**
		 * Reference to the pending promise returned from self.requestPartial().
		 *
		 * @since 4.5.0
		 * @private
		 */
		_pendingRefreshPromise: null,

		/**
		 * Request the new partial and render it into the placements.
		 *
		 * @since 4.5.0
		 *
		 * @this {wp.customize.selectiveRefresh.Partial}
		 * @return {jQuery.Promise}
		 */
		refresh: function() {
			var partial = this, refreshPromise;

			refreshPromise = self.requestPartial( partial );

			if ( ! partial._pendingRefreshPromise ) {
				_.each( partial.placements(), function( placement ) {
					partial.preparePlacement( placement );
				} );

				refreshPromise.done( function( placements ) {
					_.each( placements, function( placement ) {
						partial.renderContent( placement );
					} );
				} );

				refreshPromise.fail( function( data, placements ) {
					partial.fallback( data, placements );
				} );

				// Allow new request when this one finishes.
				partial._pendingRefreshPromise = refreshPromise;
				refreshPromise.always( function() {
					partial._pendingRefreshPromise = null;
				} );
			}

			return refreshPromise;
		},

		/**
		 * Apply the addedContent in the placement to the document.
		 *
		 * Note the placement object will have its container and removedNodes
		 * properties updated.
		 *
		 * @since 4.5.0
		 *
		 * @param {Placement}             placement
		 * @param {Element|jQuery}        [placement.container]  - This param will be empty if there was no element matching the selector.
		 * @param {string|Object|boolean} placement.addedContent - Rendered HTML content, a data object for JS templates to render, or false if no render.
		 * @param {Object}                [placement.context]    - Optional context information about the container.
		 * @return {boolean} Whether the rendering was successful and the fallback was not invoked.
		 */
		renderContent: function( placement ) {
			var partial = this, content, newContainerElement;
			if ( ! placement.container ) {
				partial.fallback( new Error( 'no_container' ), [ placement ] );
				return false;
			}
			placement.container = $( placement.container );
			if ( false === placement.addedContent ) {
				partial.fallback( new Error( 'missing_render' ), [ placement ] );
				return false;
			}

			// Currently a subclass needs to override renderContent to handle partials returning data object.
			if ( ! _.isString( placement.addedContent ) ) {
				partial.fallback( new Error( 'non_string_content' ), [ placement ] );
				return false;
			}

			/* jshint ignore:start */
			self.originalDocumentWrite = document.write;
			document.write = function() {
				throw new Error( self.data.l10n.badDocumentWrite );
			};
			/* jshint ignore:end */
			try {
				content = placement.addedContent;
				if ( wp.emoji && wp.emoji.parse && ! $.contains( document.head, placement.container[0] ) ) {
					content = wp.emoji.parse( content );
				}

				if ( partial.params.containerInclusive ) {

					// Note that content may be an empty string, and in this case jQuery will just remove the oldContainer.
					newContainerElement = $( content );

					// Merge the new context on top of the old context.
					placement.context = _.extend(
						placement.context,
						newContainerElement.data( 'customize-partial-placement-context' ) || {}
					);
					newContainerElement.data( 'customize-partial-placement-context', placement.context );

					placement.removedNodes = placement.container;
					placement.container = newContainerElement;
					placement.removedNodes.replaceWith( placement.container );
					placement.container.attr( 'title', self.data.l10n.shiftClickToEdit );
				} else {
					placement.removedNodes = document.createDocumentFragment();
					while ( placement.container[0].firstChild ) {
						placement.removedNodes.appendChild( placement.container[0].firstChild );
					}

					placement.container.html( content );
				}

				placement.container.removeClass( 'customize-render-content-error' );
			} catch ( error ) {
				if ( 'undefined' !== typeof console && console.error ) {
					console.error( partial.id, error );
				}
				partial.fallback( error, [ placement ] );
			}
			/* jshint ignore:start */
			document.write = self.originalDocumentWrite;
			self.originalDocumentWrite = null;
			/* jshint ignore:end */

			partial.createEditShortcutForPlacement( placement );
			placement.container.removeClass( 'customize-partial-refreshing' );

			// Prevent placement container from being re-triggered as being rendered among nested partials.
			placement.container.data( 'customize-partial-content-rendered', true );

			/*
			 * Note that the 'wp_audio_shortcode_library' and 'wp_video_shortcode_library' filters
			 * will determine whether or not wp.mediaelement is loaded and whether it will
			 * initialize audio and video respectively. See also https://core.trac.wordpress.org/ticket/40144
			 */
			if ( wp.mediaelement ) {
				wp.mediaelement.initialize();
			}

			if ( wp.playlist ) {
				wp.playlist.initialize();
			}

			/**
			 * Announce when a partial's placement has been rendered so that dynamic elements can be re-built.
			 */
			self.trigger( 'partial-content-rendered', placement );
			return true;
		},

		/**
		 * Handle fail to render partial.
		 *
		 * The first argument is either the failing jqXHR or an Error object, and the second argument is the array of containers.
		 *
		 * @since 4.5.0
		 */
		fallback: function() {
			var partial = this;
			if ( partial.params.fallbackRefresh ) {
				self.requestFullRefresh();
			}
		}
	} );

	/**
	 * A Placement for a Partial.
	 *
	 * A partial placement is the actual physical representation of a partial for a given context.
	 * It also may have information in relation to how a placement may have just changed.
	 * The placement is conceptually similar to a DOM Range or MutationRecord.
	 *
	 * @memberOf wp.customize.selectiveRefresh
	 *
	 * @class Placement
	 * @augments wp.customize.Class
	 * @since 4.5.0
	 */
	self.Placement = Placement = api.Class.extend(/** @lends wp.customize.selectiveRefresh.prototype */{

		/**
		 * The partial with which the container is associated.
		 *
		 * @param {wp.customize.selectiveRefresh.Partial}
		 */
		partial: null,

		/**
		 * DOM element which contains the placement's contents.
		 *
		 * This will be null if the startNode and endNode do not point to the same
		 * DOM element, such as in the case of a sidebar partial.
		 * This container element itself will be replaced for partials that
		 * have containerInclusive param defined as true.
		 */
		container: null,

		/**
		 * DOM node for the initial boundary of the placement.
		 *
		 * This will normally be the same as endNode since most placements appear as elements.
		 * This is primarily useful for widget sidebars which do not have intrinsic containers, but
		 * for which an HTML comment is output before to mark the starting position.
		 */
		startNode: null,

		/**
		 * DOM node for the terminal boundary of the placement.
		 *
		 * This will normally be the same as startNode since most placements appear as elements.
		 * This is primarily useful for widget sidebars which do not have intrinsic containers, but
		 * for which an HTML comment is output before to mark the ending position.
		 */
		endNode: null,

		/**
		 * Context data.
		 *
		 * This provides information about the placement which is included in the request
		 * in order to render the partial properly.
		 *
		 * @param {object}
		 */
		context: null,

		/**
		 * The content for the partial when refreshed.
		 *
		 * @param {string}
		 */
		addedContent: null,

		/**
		 * DOM node(s) removed when the partial is refreshed.
		 *
		 * If the partial is containerInclusive, then the removedNodes will be
		 * the single Element that was the partial's former placement. If the
		 * partial is not containerInclusive, then the removedNodes will be a
		 * documentFragment containing the nodes removed.
		 *
		 * @param {Element|DocumentFragment}
		 */
		removedNodes: null,

		/**
		 * Constructor.
		 *
		 * @since 4.5.0
		 *
		 * @param {Object}                   args
		 * @param {Partial}                  args.partial
		 * @param {jQuery|Element}           [args.container]
		 * @param {Node}                     [args.startNode]
		 * @param {Node}                     [args.endNode]
		 * @param {Object}                   [args.context]
		 * @param {string}                   [args.addedContent]
		 * @param {jQuery|DocumentFragment}  [args.removedNodes]
		 */
		initialize: function( args ) {
			var placement = this;

			args = _.extend( {}, args || {} );
			if ( ! args.partial || ! args.partial.extended( Partial ) ) {
				throw new Error( 'Missing partial' );
			}
			args.context = args.context || {};
			if ( args.container ) {
				args.container = $( args.container );
			}

			_.extend( placement, args );
		}

	});

	/**
	 * Mapping of type names to Partial constructor subclasses.
	 *
	 * @since 4.5.0
	 *
	 * @type {Object.<string, wp.customize.selectiveRefresh.Partial>}
	 */
	self.partialConstructor = {};

	self.partial = new api.Values({ defaultConstructor: Partial });

	/**
	 * Get the POST vars for a Customizer preview request.
	 *
	 * @since 4.5.0
	 * @see wp.customize.previewer.query()
	 *
	 * @return {Object}
	 */
	self.getCustomizeQuery = function() {
		var dirtyCustomized = {};
		api.each( function( value, key ) {
			if ( value._dirty ) {
				dirtyCustomized[ key ] = value();
			}
		} );

		return {
			wp_customize: 'on',
			nonce: api.settings.nonce.preview,
			customize_theme: api.settings.theme.stylesheet,
			customized: JSON.stringify( dirtyCustomized ),
			customize_changeset_uuid: api.settings.changeset.uuid
		};
	};

	/**
	 * Currently-requested partials and their associated deferreds.
	 *
	 * @since 4.5.0
	 * @type {Object<string, { deferred: jQuery.Promise, partial: wp.customize.selectiveRefresh.Partial }>}
	 */
	self._pendingPartialRequests = {};

	/**
	 * Timeout ID for the current request, or null if no request is current.
	 *
	 * @since 4.5.0
	 * @type {number|null}
	 * @private
	 */
	self._debouncedTimeoutId = null;

	/**
	 * Current jqXHR for the request to the partials.
	 *
	 * @since 4.5.0
	 * @type {jQuery.jqXHR|null}
	 * @private
	 */
	self._currentRequest = null;

	/**
	 * Request full page refresh.
	 *
	 * When selective refresh is embedded in the context of front-end editing, this request
	 * must fail or else changes will be lost, unless transactions are implemented.
	 *
	 * @since 4.5.0
	 */
	self.requestFullRefresh = function() {
		api.preview.send( 'refresh' );
	};

	/**
	 * Request a re-rendering of a partial.
	 *
	 * @since 4.5.0
	 *
	 * @param {wp.customize.selectiveRefresh.Partial} partial
	 * @return {jQuery.Promise}
	 */
	self.requestPartial = function( partial ) {
		var partialRequest;

		if ( self._debouncedTimeoutId ) {
			clearTimeout( self._debouncedTimeoutId );
			self._debouncedTimeoutId = null;
		}
		if ( self._currentRequest ) {
			self._currentRequest.abort();
			self._currentRequest = null;
		}

		partialRequest = self._pendingPartialRequests[ partial.id ];
		if ( ! partialRequest || 'pending' !== partialRequest.deferred.state() ) {
			partialRequest = {
				deferred: $.Deferred(),
				partial: partial
			};
			self._pendingPartialRequests[ partial.id ] = partialRequest;
		}

		// Prevent leaking partial into debounced timeout callback.
		partial = null;

		self._debouncedTimeoutId = setTimeout(
			function() {
				var data, partialPlacementContexts, partialsPlacements, request;

				self._debouncedTimeoutId = null;
				data = self.getCustomizeQuery();

				/*
				 * It is key that the containers be fetched exactly at the point of the request being
				 * made, because the containers need to be mapped to responses by array indices.
				 */
				partialsPlacements = {};

				partialPlacementContexts = {};

				_.each( self._pendingPartialRequests, function( pending, partialId ) {
					partialsPlacements[ partialId ] = pending.partial.placements();
					if ( ! self.partial.has( partialId ) ) {
						pending.deferred.rejectWith( pending.partial, [ new Error( 'partial_removed' ), partialsPlacements[ partialId ] ] );
					} else {
						/*
						 * Note that this may in fact be an empty array. In that case, it is the responsibility
						 * of the Partial subclass instance to know where to inject the response, or else to
						 * just issue a refresh (default behavior). The data being returned with each container
						 * is the context information that may be needed to render certain partials, such as
						 * the contained sidebar for rendering widgets or what the nav menu args are for a menu.
						 */
						partialPlacementContexts[ partialId ] = _.map( partialsPlacements[ partialId ], function( placement ) {
							return placement.context || {};
						} );
					}
				} );

				data.partials = JSON.stringify( partialPlacementContexts );
				data[ self.data.renderQueryVar ] = '1';

				request = self._currentRequest = wp.ajax.send( null, {
					data: data,
					url: api.settings.url.self
				} );

				request.done( function( data ) {

					/**
					 * Announce the data returned from a request to render partials.
					 *
					 * The data is filtered on the server via customize_render_partials_response
					 * so plugins can inject data from the server to be utilized
					 * on the client via this event. Plugins may use this filter
					 * to communicate script and style dependencies that need to get
					 * injected into the page to support the rendered partials.
					 * This is similar to the 'saved' event.
					 */
					self.trigger( 'render-partials-response', data );

					// Relay errors (warnings) captured during rendering and relay to console.
					if ( data.errors && 'undefined' !== typeof console && console.warn ) {
						_.each( data.errors, function( error ) {
							console.warn( error );
						} );
					}

					/*
					 * Note that data is an array of items that correspond to the array of
					 * containers that were submitted in the request. So we zip up the
					 * array of containers with the array of contents for those containers,
					 * and send them into .
					 */
					_.each( self._pendingPartialRequests, function( pending, partialId ) {
						var placementsContents;
						if ( ! _.isArray( data.contents[ partialId ] ) ) {
							pending.deferred.rejectWith( pending.partial, [ new Error( 'unrecognized_partial' ), partialsPlacements[ partialId ] ] );
						} else {
							placementsContents = _.map( data.contents[ partialId ], function( content, i ) {
								var partialPlacement = partialsPlacements[ partialId ][ i ];
								if ( partialPlacement ) {
									partialPlacement.addedContent = content;
								} else {
									partialPlacement = new Placement( {
										partial: pending.partial,
										addedContent: content
									} );
								}
								return partialPlacement;
							} );
							pending.deferred.resolveWith( pending.partial, [ placementsContents ] );
						}
					} );
					self._pendingPartialRequests = {};
				} );

				request.fail( function( data, statusText ) {

					/*
					 * Ignore failures caused by partial.currentRequest.abort()
					 * The pending deferreds will remain in self._pendingPartialRequests
					 * for re-use with the next request.
					 */
					if ( 'abort' === statusText ) {
						return;
					}

					_.each( self._pendingPartialRequests, function( pending, partialId ) {
						pending.deferred.rejectWith( pending.partial, [ data, partialsPlacements[ partialId ] ] );
					} );
					self._pendingPartialRequests = {};
				} );
			},
			api.settings.timeouts.selectiveRefresh
		);

		return partialRequest.deferred.promise();
	};

	/**
	 * Add partials for any nav menu container elements in the document.
	 *
	 * This method may be called multiple times. Containers that already have been
	 * seen will be skipped.
	 *
	 * @since 4.5.0
	 *
	 * @param {jQuery|HTMLElement} [rootElement]
	 * @param {object}             [options]
	 * @param {boolean=true}       [options.triggerRendered]
	 */
	self.addPartials = function( rootElement, options ) {
		var containerElements;
		if ( ! rootElement ) {
			rootElement = document.documentElement;
		}
		rootElement = $( rootElement );
		options = _.extend(
			{
				triggerRendered: true
			},
			options || {}
		);

		containerElements = rootElement.find( '[data-customize-partial-id]' );
		if ( rootElement.is( '[data-customize-partial-id]' ) ) {
			containerElements = containerElements.add( rootElement );
		}
		containerElements.each( function() {
			var containerElement = $( this ), partial, placement, id, Constructor, partialOptions, containerContext;
			id = containerElement.data( 'customize-partial-id' );
			if ( ! id ) {
				return;
			}
			containerContext = containerElement.data( 'customize-partial-placement-context' ) || {};

			partial = self.partial( id );
			if ( ! partial ) {
				partialOptions = containerElement.data( 'customize-partial-options' ) || {};
				partialOptions.constructingContainerContext = containerElement.data( 'customize-partial-placement-context' ) || {};
				Constructor = self.partialConstructor[ containerElement.data( 'customize-partial-type' ) ] || self.Partial;
				partial = new Constructor( id, partialOptions );
				self.partial.add( partial );
			}

			/*
			 * Only trigger renders on (nested) partials that have been not been
			 * handled yet. An example where this would apply is a nav menu
			 * embedded inside of a navigation menu widget. When the widget's title
			 * is updated, the entire widget will re-render and then the event
			 * will be triggered for the nested nav menu to do any initialization.
			 */
			if ( options.triggerRendered && ! containerElement.data( 'customize-partial-content-rendered' ) ) {

				placement = new Placement( {
					partial: partial,
					context: containerContext,
					container: containerElement
				} );

				$( placement.container ).attr( 'title', self.data.l10n.shiftClickToEdit );
				partial.createEditShortcutForPlacement( placement );

				/**
				 * Announce when a partial's nested placement has been re-rendered.
				 */
				self.trigger( 'partial-content-rendered', placement );
			}
			containerElement.data( 'customize-partial-content-rendered', true );
		} );
	};

	api.bind( 'preview-ready', function() {
		var handleSettingChange, watchSettingChange, unwatchSettingChange;

		_.extend( self.data, _customizePartialRefreshExports );

		// Create the partial JS models.
		_.each( self.data.partials, function( data, id ) {
			var Constructor, partial = self.partial( id );
			if ( ! partial ) {
				Constructor = self.partialConstructor[ data.type ] || self.Partial;
				partial = new Constructor(
					id,
					_.extend( { params: data }, data ) // Inclusion of params alias is for back-compat for custom partials that expect to augment this property.
				);
				self.partial.add( partial );
			} else {
				_.extend( partial.params, data );
			}
		} );

		/**
		 * Handle change to a setting.
		 *
		 * Note this is largely needed because adding a 'change' event handler to wp.customize
		 * will only include the changed setting object as an argument, not including the
		 * new value or the old value.
		 *
		 * @since 4.5.0
		 * @this {wp.customize.Setting}
		 *
		 * @param {*|null} newValue New value, or null if the setting was just removed.
		 * @param {*|null} oldValue Old value, or null if the setting was just added.
		 */
		handleSettingChange = function( newValue, oldValue ) {
			var setting = this;
			self.partial.each( function( partial ) {
				if ( partial.isRelatedSetting( setting, newValue, oldValue ) ) {
					partial.refresh();
				}
			} );
		};

		/**
		 * Trigger the initial change for the added setting, and watch for changes.
		 *
		 * @since 4.5.0
		 * @this {wp.customize.Values}
		 *
		 * @param {wp.customize.Setting} setting
		 */
		watchSettingChange = function( setting ) {
			handleSettingChange.call( setting, setting(), null );
			setting.bind( handleSettingChange );
		};

		/**
		 * Trigger the final change for the removed setting, and unwatch for changes.
		 *
		 * @since 4.5.0
		 * @this {wp.customize.Values}
		 *
		 * @param {wp.customize.Setting} setting
		 */
		unwatchSettingChange = function( setting ) {
			handleSettingChange.call( setting, null, setting() );
			setting.unbind( handleSettingChange );
		};

		api.bind( 'add', watchSettingChange );
		api.bind( 'remove', unwatchSettingChange );
		api.each( function( setting ) {
			setting.bind( handleSettingChange );
		} );

		// Add (dynamic) initial partials that are declared via data-* attributes.
		self.addPartials( document.documentElement, {
			triggerRendered: false
		} );

		// Add new dynamic partials when the document changes.
		if ( 'undefined' !== typeof MutationObserver ) {
			self.mutationObserver = new MutationObserver( function( mutations ) {
				_.each( mutations, function( mutation ) {
					self.addPartials( $( mutation.target ) );
				} );
			} );
			self.mutationObserver.observe( document.documentElement, {
				childList: true,
				subtree: true
			} );
		}

		/**
		 * Handle rendering of partials.
		 *
		 * @param {api.selectiveRefresh.Placement} placement
		 */
		api.selectiveRefresh.bind( 'partial-content-rendered', function( placement ) {
			if ( placement.container ) {
				self.addPartials( placement.container );
			}
		} );

		/**
		 * Handle setting validities in partial refresh response.
		 *
		 * @param {object} data Response data.
		 * @param {object} data.setting_validities Setting validities.
		 */
		api.selectiveRefresh.bind( 'render-partials-response', function handleSettingValiditiesResponse( data ) {
			if ( data.setting_validities ) {
				api.preview.send( 'selective-refresh-setting-validities', data.setting_validities );
			}
		} );

		api.preview.bind( 'edit-shortcut-visibility', function( visibility ) {
			api.selectiveRefresh.editShortcutVisibility.set( visibility );
		} );
		api.selectiveRefresh.editShortcutVisibility.bind( function( visibility ) {
			var body = $( document.body ), shouldAnimateHide;

			shouldAnimateHide = ( 'hidden' === visibility && body.hasClass( 'customize-partial-edit-shortcuts-shown' ) && ! body.hasClass( 'customize-partial-edit-shortcuts-hidden' ) );
			body.toggleClass( 'customize-partial-edit-shortcuts-hidden', shouldAnimateHide );
			body.toggleClass( 'customize-partial-edit-shortcuts-shown', 'visible' === visibility );
		} );

		api.preview.bind( 'active', function() {

			// Make all partials ready.
			self.partial.each( function( partial ) {
				partial.deferred.ready.resolve();
			} );

			// Make all partials added henceforth as ready upon add.
			self.partial.bind( 'add', function( partial ) {
				partial.deferred.ready.resolve();
			} );
		} );

	} );

	return self;
}( jQuery, wp.customize ) );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                         customize-selective-refresh.min.js                                                                  0000644                 00000024705 15212563756 0013347 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
wp.customize.selectiveRefresh=function(o,r){"use strict";var t,s,c={ready:o.Deferred(),editShortcutVisibility:new r.Value,data:{partials:{},renderQueryVar:"",l10n:{shiftClickToEdit:""}},currentRequest:null};return _.extend(c,r.Events),t=c.Partial=r.Class.extend({id:null,defaults:{selector:null,primarySetting:null,containerInclusive:!1,fallbackRefresh:!0},initialize:function(e,t){var n=this;t=t||{},n.id=e,n.params=_.extend({settings:[]},n.defaults,t.params||t),n.deferred={},n.deferred.ready=o.Deferred(),n.deferred.ready.done(function(){n.ready()})},ready:function(){var n=this;_.each(n.placements(),function(e){o(e.container).attr("title",c.data.l10n.shiftClickToEdit),n.createEditShortcutForPlacement(e)}),o(document).on("click",n.params.selector,function(t){t.shiftKey&&(t.preventDefault(),_.each(n.placements(),function(e){o(e.container).is(t.currentTarget)&&n.showControl()}))})},createEditShortcutForPlacement:function(e){var t,n=this;!e.container||!(t=o(e.container)).length||t.is("area, audio, base, bdi, bdo, br, button, canvas, col, colgroup, command, datalist, embed, head, hr, html, iframe, img, input, keygen, label, link, map, math, menu, meta, noscript, object, optgroup, option, param, progress, rp, rt, ruby, script, select, source, style, svg, table, tbody, textarea, tfoot, thead, title, tr, track, video, wbr")||t.closest("head").length||((t=n.createEditShortcut()).on("click",function(e){e.preventDefault(),e.stopPropagation(),n.showControl()}),n.addEditShortcutToPlacement(e,t))},addEditShortcutToPlacement:function(e,t){e=o(e.container);e.prepend(t),e.is(":visible")&&"none"!==e.css("display")||t.addClass("customize-partial-edit-shortcut-hidden")},getEditShortcutClassName:function(){return"customize-partial-edit-shortcut-"+this.id.replace(/]/g,"").replace(/\[/g,"-")},getEditShortcutTitle:function(){var e=c.data.l10n;switch(this.getType()){case"widget":return e.clickEditWidget;case"blogname":case"blogdescription":return e.clickEditTitle;case"nav_menu":return e.clickEditMenu;default:return e.clickEditMisc}},getType:function(){var e=this,t=e.params.primarySetting||_.first(e.settings())||"unknown";return e.params.type||(t.match(/^nav_menu_instance\[/)?"nav_menu":t.match(/^widget_.+\[\d+]$/)?"widget":t)},createEditShortcut:function(){var e=this.getEditShortcutTitle(),t=o("<span>",{class:"customize-partial-edit-shortcut "+this.getEditShortcutClassName()}),e=o("<button>",{"aria-label":e,title:e,class:"customize-partial-edit-shortcut-button"}),n=o('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M13.89 3.39l2.71 2.72c.46.46.42 1.24.03 1.64l-8.01 8.02-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.03c.39-.39 1.22-.39 1.68.07zm-2.73 2.79l-5.59 5.61 1.11 1.11 5.54-5.65zm-2.97 8.23l5.58-5.6-1.07-1.08-5.59 5.6z"/></svg>');return e.append(n),t.append(e),t},placements:function(){var n=this,e=n.params.selector||"";return e&&(e+=", "),o(e+='[data-customize-partial-id="'+n.id+'"]').map(function(){var e=o(this),t=e.data("customize-partial-placement-context");if(_.isString(t)&&"{"===t.substr(0,1))throw new Error("context JSON parse error");return new s({partial:n,container:e,context:t})}).get()},settings:function(){var e=this;return e.params.settings&&0!==e.params.settings.length?e.params.settings:e.params.primarySetting?[e.params.primarySetting]:[e.id]},isRelatedSetting:function(e){return!!(e=_.isString(e)?r(e):e)&&-1!==_.indexOf(this.settings(),e.id)},showControl:function(){var e=this,t=(t=e.params.primarySetting)||_.first(e.settings());"nav_menu"===e.getType()&&(e.params.navMenuArgs.theme_location?t="nav_menu_locations["+e.params.navMenuArgs.theme_location+"]":e.params.navMenuArgs.menu&&(t="nav_menu["+String(e.params.navMenuArgs.menu)+"]")),r.preview.send("focus-control-for-setting",t)},preparePlacement:function(e){o(e.container).addClass("customize-partial-refreshing")},_pendingRefreshPromise:null,refresh:function(){var n=this,e=c.requestPartial(n);return n._pendingRefreshPromise||(_.each(n.placements(),function(e){n.preparePlacement(e)}),e.done(function(e){_.each(e,function(e){n.renderContent(e)})}),e.fail(function(e,t){n.fallback(e,t)}),(n._pendingRefreshPromise=e).always(function(){n._pendingRefreshPromise=null})),e},renderContent:function(t){var e,n,r=this;if(!t.container)return r.fallback(new Error("no_container"),[t]),!1;if(t.container=o(t.container),!1===t.addedContent)return r.fallback(new Error("missing_render"),[t]),!1;if(!_.isString(t.addedContent))return r.fallback(new Error("non_string_content"),[t]),!1;c.originalDocumentWrite=document.write,document.write=function(){throw new Error(c.data.l10n.badDocumentWrite)};try{if(e=t.addedContent,wp.emoji&&wp.emoji.parse&&!o.contains(document.head,t.container[0])&&(e=wp.emoji.parse(e)),r.params.containerInclusive)n=o(e),t.context=_.extend(t.context,n.data("customize-partial-placement-context")||{}),n.data("customize-partial-placement-context",t.context),t.removedNodes=t.container,t.container=n,t.removedNodes.replaceWith(t.container),t.container.attr("title",c.data.l10n.shiftClickToEdit);else{for(t.removedNodes=document.createDocumentFragment();t.container[0].firstChild;)t.removedNodes.appendChild(t.container[0].firstChild);t.container.html(e)}t.container.removeClass("customize-render-content-error")}catch(e){"undefined"!=typeof console&&console.error&&console.error(r.id,e),r.fallback(e,[t])}return document.write=c.originalDocumentWrite,c.originalDocumentWrite=null,r.createEditShortcutForPlacement(t),t.container.removeClass("customize-partial-refreshing"),t.container.data("customize-partial-content-rendered",!0),wp.mediaelement&&wp.mediaelement.initialize(),wp.playlist&&wp.playlist.initialize(),c.trigger("partial-content-rendered",t),!0},fallback:function(){this.params.fallbackRefresh&&c.requestFullRefresh()}}),c.Placement=s=r.Class.extend({partial:null,container:null,startNode:null,endNode:null,context:null,addedContent:null,removedNodes:null,initialize:function(e){if(!(e=_.extend({},e||{})).partial||!e.partial.extended(t))throw new Error("Missing partial");e.context=e.context||{},e.container&&(e.container=o(e.container)),_.extend(this,e)}}),c.partialConstructor={},c.partial=new r.Values({defaultConstructor:t}),c.getCustomizeQuery=function(){var n={};return r.each(function(e,t){e._dirty&&(n[t]=e())}),{wp_customize:"on",nonce:r.settings.nonce.preview,customize_theme:r.settings.theme.stylesheet,customized:JSON.stringify(n),customize_changeset_uuid:r.settings.changeset.uuid}},c._pendingPartialRequests={},c._debouncedTimeoutId=null,c._currentRequest=null,c.requestFullRefresh=function(){r.preview.send("refresh")},c.requestPartial=function(e){var t;return c._debouncedTimeoutId&&(clearTimeout(c._debouncedTimeoutId),c._debouncedTimeoutId=null),c._currentRequest&&(c._currentRequest.abort(),c._currentRequest=null),(t=c._pendingPartialRequests[e.id])&&"pending"===t.deferred.state()||(t={deferred:o.Deferred(),partial:e},c._pendingPartialRequests[e.id]=t),e=null,c._debouncedTimeoutId=setTimeout(function(){var n,i,e;c._debouncedTimeoutId=null,e=c.getCustomizeQuery(),i={},n={},_.each(c._pendingPartialRequests,function(e,t){i[t]=e.partial.placements(),c.partial.has(t)?n[t]=_.map(i[t],function(e){return e.context||{}}):e.deferred.rejectWith(e.partial,[new Error("partial_removed"),i[t]])}),e.partials=JSON.stringify(n),e[c.data.renderQueryVar]="1",(e=c._currentRequest=wp.ajax.send(null,{data:e,url:r.settings.url.self})).done(function(t){c.trigger("render-partials-response",t),t.errors&&"undefined"!=typeof console&&console.warn&&_.each(t.errors,function(e){console.warn(e)}),_.each(c._pendingPartialRequests,function(n,r){var e;_.isArray(t.contents[r])?(e=_.map(t.contents[r],function(e,t){t=i[r][t];return t?t.addedContent=e:t=new s({partial:n.partial,addedContent:e}),t}),n.deferred.resolveWith(n.partial,[e])):n.deferred.rejectWith(n.partial,[new Error("unrecognized_partial"),i[r]])}),c._pendingPartialRequests={}}),e.fail(function(n,e){"abort"!==e&&(_.each(c._pendingPartialRequests,function(e,t){e.deferred.rejectWith(e.partial,[n,i[t]])}),c._pendingPartialRequests={})})},r.settings.timeouts.selectiveRefresh),t.deferred.promise()},c.addPartials=function(e,a){var t;e=e||document.documentElement,e=o(e),a=_.extend({triggerRendered:!0},a||{}),t=e.find("[data-customize-partial-id]"),(t=e.is("[data-customize-partial-id]")?t.add(e):t).each(function(){var e,t,n,r=o(this),i=r.data("customize-partial-id");i&&(n=r.data("customize-partial-placement-context")||{},(e=c.partial(i))||((t=r.data("customize-partial-options")||{}).constructingContainerContext=r.data("customize-partial-placement-context")||{},e=new(c.partialConstructor[r.data("customize-partial-type")]||c.Partial)(i,t),c.partial.add(e)),a.triggerRendered&&!r.data("customize-partial-content-rendered")&&(i=new s({partial:e,context:n,container:r}),o(i.container).attr("title",c.data.l10n.shiftClickToEdit),e.createEditShortcutForPlacement(i),c.trigger("partial-content-rendered",i)),r.data("customize-partial-content-rendered",!0))})},r.bind("preview-ready",function(){var t,e;_.extend(c.data,_customizePartialRefreshExports),_.each(c.data.partials,function(e,t){var n=c.partial(t);n?_.extend(n.params,e):(n=new(c.partialConstructor[e.type]||c.Partial)(t,_.extend({params:e},e)),c.partial.add(n))}),t=function(t,n){var r=this;c.partial.each(function(e){e.isRelatedSetting(r,t,n)&&e.refresh()})},e=function(e){t.call(e,null,e()),e.unbind(t)},r.bind("add",function(e){t.call(e,e(),null),e.bind(t)}),r.bind("remove",e),r.each(function(e){e.bind(t)}),c.addPartials(document.documentElement,{triggerRendered:!1}),"undefined"!=typeof MutationObserver&&(c.mutationObserver=new MutationObserver(function(e){_.each(e,function(e){c.addPartials(o(e.target))})}),c.mutationObserver.observe(document.documentElement,{childList:!0,subtree:!0})),r.selectiveRefresh.bind("partial-content-rendered",function(e){e.container&&c.addPartials(e.container)}),r.selectiveRefresh.bind("render-partials-response",function(e){e.setting_validities&&r.preview.send("selective-refresh-setting-validities",e.setting_validities)}),r.preview.bind("edit-shortcut-visibility",function(e){r.selectiveRefresh.editShortcutVisibility.set(e)}),r.selectiveRefresh.editShortcutVisibility.bind(function(e){var t=o(document.body),n="hidden"===e&&t.hasClass("customize-partial-edit-shortcuts-shown")&&!t.hasClass("customize-partial-edit-shortcuts-hidden");t.toggleClass("customize-partial-edit-shortcuts-hidden",n),t.toggleClass("customize-partial-edit-shortcuts-shown","visible"===e)}),r.preview.bind("active",function(){c.partial.each(function(e){e.deferred.ready.resolve()}),c.partial.bind("add",function(e){e.deferred.ready.resolve()})})}),c}(jQuery,wp.customize);                                                           customize-views.js                                                                                  0000644                 00000012146 15212563756 0010277 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/customize-views.js
 */

(function( $, wp, _ ) {

	if ( ! wp || ! wp.customize ) { return; }
	var api = wp.customize;

	/**
	 * wp.customize.HeaderTool.CurrentView
	 *
	 * Displays the currently selected header image, or a placeholder in lack
	 * thereof.
	 *
	 * Instantiate with model wp.customize.HeaderTool.currentHeader.
	 *
	 * @memberOf wp.customize.HeaderTool
	 * @alias wp.customize.HeaderTool.CurrentView
	 *
	 * @constructor
	 * @augments wp.Backbone.View
	 */
	api.HeaderTool.CurrentView = wp.Backbone.View.extend(/** @lends wp.customize.HeaderTool.CurrentView.prototype */{
		template: wp.template('header-current'),

		initialize: function() {
			this.listenTo(this.model, 'change', this.render);
			this.render();
		},

		render: function() {
			this.$el.html(this.template(this.model.toJSON()));
			this.setButtons();
			return this;
		},

		setButtons: function() {
			var elements = $('#customize-control-header_image .actions .remove');
			var addButton = $('#customize-control-header_image .actions .new');

			if (this.model.get('choice')) {
				elements.show();
				addButton.removeClass('upload-button');
			} else {
				elements.hide();
				addButton.addClass('upload-button');
			}
		}
	});


	/**
	 * wp.customize.HeaderTool.ChoiceView
	 *
	 * Represents a choosable header image, be it user-uploaded,
	 * theme-suggested or a special Randomize choice.
	 *
	 * Takes a wp.customize.HeaderTool.ImageModel.
	 *
	 * Manually changes model wp.customize.HeaderTool.currentHeader via the
	 * `select` method.
	 *
	 * @memberOf wp.customize.HeaderTool
	 * @alias wp.customize.HeaderTool.ChoiceView
	 *
	 * @constructor
	 * @augments wp.Backbone.View
	 */
	api.HeaderTool.ChoiceView = wp.Backbone.View.extend(/** @lends wp.customize.HeaderTool.ChoiceView.prototype */{
		template: wp.template('header-choice'),

		className: 'header-view',

		events: {
			'click .choice,.random': 'select',
			'click .close': 'removeImage'
		},

		initialize: function() {
			var properties = [
				this.model.get('header').url,
				this.model.get('choice')
			];

			this.listenTo(this.model, 'change:selected', this.toggleSelected);

			if (_.contains(properties, api.get().header_image)) {
				api.HeaderTool.currentHeader.set(this.extendedModel());
			}
		},

		render: function() {
			this.$el.html(this.template(this.extendedModel()));

			this.toggleSelected();
			return this;
		},

		toggleSelected: function() {
			this.$el.toggleClass('selected', this.model.get('selected'));
		},

		extendedModel: function() {
			var c = this.model.get('collection');
			return _.extend(this.model.toJSON(), {
				type: c.type
			});
		},

		select: function() {
			this.preventJump();
			this.model.save();
			api.HeaderTool.currentHeader.set(this.extendedModel());
		},

		preventJump: function() {
			var container = $('.wp-full-overlay-sidebar-content'),
				scroll = container.scrollTop();

			_.defer(function() {
				container.scrollTop(scroll);
			});
		},

		removeImage: function(e) {
			e.stopPropagation();
			this.model.destroy();
			this.remove();
		}
	});


	/**
	 * wp.customize.HeaderTool.ChoiceListView
	 *
	 * A container for ChoiceViews. These choices should be of one same type:
	 * user-uploaded headers or theme-defined ones.
	 *
	 * Takes a wp.customize.HeaderTool.ChoiceList.
	 *
	 * @memberOf wp.customize.HeaderTool
	 * @alias wp.customize.HeaderTool.ChoiceListView
	 *
	 * @constructor
	 * @augments wp.Backbone.View
	 */
	api.HeaderTool.ChoiceListView = wp.Backbone.View.extend(/** @lends wp.customize.HeaderTool.ChoiceListView.prototype */{
		initialize: function() {
			this.listenTo(this.collection, 'add', this.addOne);
			this.listenTo(this.collection, 'remove', this.render);
			this.listenTo(this.collection, 'sort', this.render);
			this.listenTo(this.collection, 'change', this.toggleList);
			this.render();
		},

		render: function() {
			this.$el.empty();
			this.collection.each(this.addOne, this);
			this.toggleList();
		},

		addOne: function(choice) {
			var view;
			choice.set({ collection: this.collection });
			view = new api.HeaderTool.ChoiceView({ model: choice });
			this.$el.append(view.render().el);
		},

		toggleList: function() {
			var title = this.$el.parents().prev('.customize-control-title'),
				randomButton = this.$el.find('.random').parent();
			if (this.collection.shouldHideTitle()) {
				title.add(randomButton).hide();
			} else {
				title.add(randomButton).show();
			}
		}
	});


	/**
	 * wp.customize.HeaderTool.CombinedList
	 *
	 * Aggregates wp.customize.HeaderTool.ChoiceList collections (or any
	 * Backbone object, really) and acts as a bus to feed them events.
	 *
	 * @memberOf wp.customize.HeaderTool
	 * @alias wp.customize.HeaderTool.CombinedList
	 *
	 * @constructor
	 * @augments wp.Backbone.View
	 */
	api.HeaderTool.CombinedList = wp.Backbone.View.extend(/** @lends wp.customize.HeaderTool.CombinedList.prototype */{
		initialize: function(collections) {
			this.collections = collections;
			this.on('all', this.propagate, this);
		},
		propagate: function(event, arg) {
			_.each(this.collections, function(collection) {
				collection.trigger(event, arg);
			});
		}
	});

})( jQuery, window.wp, _ );
                                                                                                                                                                                                                                                                                                                                                                                                                          customize-views.min.js                                                                              0000644                 00000005007 15212563756 0011057 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(i,e,o){var t;e&&e.customize&&((t=e.customize).HeaderTool.CurrentView=e.Backbone.View.extend({template:e.template("header-current"),initialize:function(){this.listenTo(this.model,"change",this.render),this.render()},render:function(){return this.$el.html(this.template(this.model.toJSON())),this.setButtons(),this},setButtons:function(){var e=i("#customize-control-header_image .actions .remove"),t=i("#customize-control-header_image .actions .new");this.model.get("choice")?(e.show(),t.removeClass("upload-button")):(e.hide(),t.addClass("upload-button"))}}),t.HeaderTool.ChoiceView=e.Backbone.View.extend({template:e.template("header-choice"),className:"header-view",events:{"click .choice,.random":"select","click .close":"removeImage"},initialize:function(){var e=[this.model.get("header").url,this.model.get("choice")];this.listenTo(this.model,"change:selected",this.toggleSelected),o.contains(e,t.get().header_image)&&t.HeaderTool.currentHeader.set(this.extendedModel())},render:function(){return this.$el.html(this.template(this.extendedModel())),this.toggleSelected(),this},toggleSelected:function(){this.$el.toggleClass("selected",this.model.get("selected"))},extendedModel:function(){var e=this.model.get("collection");return o.extend(this.model.toJSON(),{type:e.type})},select:function(){this.preventJump(),this.model.save(),t.HeaderTool.currentHeader.set(this.extendedModel())},preventJump:function(){var e=i(".wp-full-overlay-sidebar-content"),t=e.scrollTop();o.defer(function(){e.scrollTop(t)})},removeImage:function(e){e.stopPropagation(),this.model.destroy(),this.remove()}}),t.HeaderTool.ChoiceListView=e.Backbone.View.extend({initialize:function(){this.listenTo(this.collection,"add",this.addOne),this.listenTo(this.collection,"remove",this.render),this.listenTo(this.collection,"sort",this.render),this.listenTo(this.collection,"change",this.toggleList),this.render()},render:function(){this.$el.empty(),this.collection.each(this.addOne,this),this.toggleList()},addOne:function(e){e.set({collection:this.collection}),e=new t.HeaderTool.ChoiceView({model:e}),this.$el.append(e.render().el)},toggleList:function(){var e=this.$el.parents().prev(".customize-control-title"),t=this.$el.find(".random").parent();this.collection.shouldHideTitle()?e.add(t).hide():e.add(t).show()}}),t.HeaderTool.CombinedList=e.Backbone.View.extend({initialize:function(e){this.collections=e,this.on("all",this.propagate,this)},propagate:function(t,i){o.each(this.collections,function(e){e.trigger(t,i)})}}))}(jQuery,window.wp,_);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         dist/a11y.js                                                                                        0000644                 00000012720 15212563756 0006636 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).a11y = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/dom-ready
  var require_dom_ready = __commonJS({
    "package-external:@wordpress/dom-ready"(exports, module) {
      module.exports = window.wp.domReady;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // packages/a11y/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    setup: () => setup,
    speak: () => speak
  });
  var import_dom_ready = __toESM(require_dom_ready(), 1);

  // packages/a11y/build-module/script/add-container.mjs
  function addContainer(ariaLive = "polite") {
    const container = document.createElement("div");
    container.id = `a11y-speak-${ariaLive}`;
    container.className = "a11y-speak-region";
    container.setAttribute(
      "style",
      "position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip-path:inset(50%);border:0;word-wrap:normal !important;"
    );
    container.setAttribute("aria-live", ariaLive);
    container.setAttribute("aria-relevant", "additions text");
    container.setAttribute("aria-atomic", "true");
    const { body } = document;
    if (body) {
      body.appendChild(container);
    }
    return container;
  }

  // packages/a11y/build-module/script/add-intro-text.mjs
  var import_i18n = __toESM(require_i18n(), 1);
  function addIntroText() {
    const introText = document.createElement("p");
    introText.id = "a11y-speak-intro-text";
    introText.className = "a11y-speak-intro-text";
    introText.textContent = (0, import_i18n.__)("Notifications");
    introText.setAttribute(
      "style",
      "position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip-path:inset(50%);border:0;word-wrap:normal !important;"
    );
    introText.setAttribute("hidden", "");
    const { body } = document;
    if (body) {
      body.appendChild(introText);
    }
    return introText;
  }

  // packages/a11y/build-module/shared/clear.mjs
  function clear() {
    const regions = document.getElementsByClassName("a11y-speak-region");
    const introText = document.getElementById("a11y-speak-intro-text");
    for (let i = 0; i < regions.length; i++) {
      regions[i].textContent = "";
    }
    if (introText) {
      introText.setAttribute("hidden", "hidden");
    }
  }

  // packages/a11y/build-module/shared/filter-message.mjs
  var previousMessage = "";
  function filterMessage(message) {
    message = message.replace(/<[^<>]+>/g, " ");
    if (previousMessage === message) {
      message += "\xA0";
    }
    previousMessage = message;
    return message;
  }

  // packages/a11y/build-module/shared/index.mjs
  function speak(message, ariaLive) {
    clear();
    message = filterMessage(message);
    const introText = document.getElementById("a11y-speak-intro-text");
    const containerAssertive = document.getElementById(
      "a11y-speak-assertive"
    );
    const containerPolite = document.getElementById("a11y-speak-polite");
    if (containerAssertive && ariaLive === "assertive") {
      containerAssertive.textContent = message;
    } else if (containerPolite) {
      containerPolite.textContent = message;
    }
    if (introText) {
      introText.removeAttribute("hidden");
    }
  }

  // packages/a11y/build-module/index.mjs
  function setup() {
    const introText = document.getElementById("a11y-speak-intro-text");
    const containerAssertive = document.getElementById(
      "a11y-speak-assertive"
    );
    const containerPolite = document.getElementById("a11y-speak-polite");
    if (introText === null) {
      addIntroText();
    }
    if (containerAssertive === null) {
      addContainer("assertive");
    }
    if (containerPolite === null) {
      addContainer("polite");
    }
  }
  (0, import_dom_ready.default)(setup);
  return __toCommonJS(index_exports);
})();
                                                dist/a11y.min.js                                                                                    0000644                 00000004644 15212563756 0007426 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).a11y=(()=>{var v=Object.create;var r=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var C=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var d=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),B=(t,e)=>{for(var n in e)r(t,n,{get:e[n],enumerable:!0})},s=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of E(e))!I.call(t,o)&&o!==n&&r(t,o,{get:()=>e[o],enumerable:!(i=A(e,o))||i.enumerable});return t};var p=(t,e,n)=>(n=t!=null?v(C(t)):{},s(e||!t||!t.__esModule?r(n,"default",{value:t,enumerable:!0}):n,t)),T=t=>s(r({},"__esModule",{value:!0}),t);var c=d((P,l)=>{l.exports=window.wp.domReady});var u=d((_,m)=>{m.exports=window.wp.i18n});var N={};B(N,{setup:()=>w,speak:()=>g});var k=p(c(),1);function a(t="polite"){let e=document.createElement("div");e.id=`a11y-speak-${t}`,e.className="a11y-speak-region",e.setAttribute("style","position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip-path:inset(50%);border:0;word-wrap:normal !important;"),e.setAttribute("aria-live",t),e.setAttribute("aria-relevant","additions text"),e.setAttribute("aria-atomic","true");let{body:n}=document;return n&&n.appendChild(e),e}var f=p(u(),1);function x(){let t=document.createElement("p");t.id="a11y-speak-intro-text",t.className="a11y-speak-intro-text",t.textContent=(0,f.__)("Notifications"),t.setAttribute("style","position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip-path:inset(50%);border:0;word-wrap:normal !important;"),t.setAttribute("hidden","");let{body:e}=document;return e&&e.appendChild(t),t}function y(){let t=document.getElementsByClassName("a11y-speak-region"),e=document.getElementById("a11y-speak-intro-text");for(let n=0;n<t.length;n++)t[n].textContent="";e&&e.setAttribute("hidden","hidden")}var h="";function b(t){return t=t.replace(/<[^<>]+>/g," "),h===t&&(t+="\xA0"),h=t,t}function g(t,e){y(),t=b(t);let n=document.getElementById("a11y-speak-intro-text"),i=document.getElementById("a11y-speak-assertive"),o=document.getElementById("a11y-speak-polite");i&&e==="assertive"?i.textContent=t:o&&(o.textContent=t),n&&n.removeAttribute("hidden")}function w(){let t=document.getElementById("a11y-speak-intro-text"),e=document.getElementById("a11y-speak-assertive"),n=document.getElementById("a11y-speak-polite");t===null&&x(),e===null&&a("assertive"),n===null&&a("polite")}(0,k.default)(w);return T(N);})();
                                                                                            dist/annotations.js                                                                                 0000644                 00000036205 15212563756 0010424 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;
(wp ||= {}).annotations = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name2 in all)
      __defProp(target, name2, { get: all[name2], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/rich-text
  var require_rich_text = __commonJS({
    "package-external:@wordpress/rich-text"(exports, module) {
      module.exports = window.wp.richText;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // package-external:@wordpress/hooks
  var require_hooks = __commonJS({
    "package-external:@wordpress/hooks"(exports, module) {
      module.exports = window.wp.hooks;
    }
  });

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // packages/annotations/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    store: () => store
  });

  // packages/annotations/build-module/format/index.mjs
  var import_rich_text2 = __toESM(require_rich_text(), 1);

  // packages/annotations/build-module/format/annotation.mjs
  var import_i18n = __toESM(require_i18n(), 1);
  var import_rich_text = __toESM(require_rich_text(), 1);

  // packages/annotations/build-module/store/constants.mjs
  var STORE_NAME = "core/annotations";

  // packages/annotations/build-module/format/annotation.mjs
  var FORMAT_NAME = "core/annotation";
  var ANNOTATION_ATTRIBUTE_PREFIX = "annotation-text-";
  function applyAnnotations(record, annotations2 = []) {
    annotations2.forEach((annotation2) => {
      let { start, end } = annotation2;
      if (start > record.text.length) {
        start = record.text.length;
      }
      if (end > record.text.length) {
        end = record.text.length;
      }
      const className = ANNOTATION_ATTRIBUTE_PREFIX + annotation2.source;
      const id = ANNOTATION_ATTRIBUTE_PREFIX + annotation2.id;
      record = (0, import_rich_text.applyFormat)(
        record,
        {
          type: FORMAT_NAME,
          attributes: {
            className,
            id
          }
        },
        start,
        end
      );
    });
    return record;
  }
  function retrieveAnnotationPositions(formats) {
    const positions = {};
    formats.forEach((characterFormats, i) => {
      characterFormats = characterFormats || [];
      characterFormats = characterFormats.filter(
        (format) => format.type === FORMAT_NAME
      );
      characterFormats.forEach((format) => {
        let { id } = format.attributes;
        id = id.replace(ANNOTATION_ATTRIBUTE_PREFIX, "");
        if (!positions.hasOwnProperty(id)) {
          positions[id] = {
            start: i
          };
        }
        positions[id].end = i + 1;
      });
    });
    return positions;
  }
  function updateAnnotationsWithPositions(annotations2, positions, { removeAnnotation, updateAnnotationRange }) {
    annotations2.forEach((currentAnnotation) => {
      const position = positions[currentAnnotation.id];
      if (!position) {
        removeAnnotation(currentAnnotation.id);
        return;
      }
      const { start, end } = currentAnnotation;
      if (start !== position.start || end !== position.end) {
        updateAnnotationRange(
          currentAnnotation.id,
          position.start,
          position.end
        );
      }
    });
  }
  var annotation = {
    name: FORMAT_NAME,
    title: (0, import_i18n.__)("Annotation"),
    tagName: "mark",
    className: "annotation-text",
    attributes: {
      className: "class",
      id: "id"
    },
    edit() {
      return null;
    },
    __experimentalGetPropsForEditableTreePreparation(select, { richTextIdentifier, blockClientId }) {
      return {
        annotations: select(
          STORE_NAME
        ).__experimentalGetAnnotationsForRichText(
          blockClientId,
          richTextIdentifier
        )
      };
    },
    __experimentalCreatePrepareEditableTree({ annotations: annotations2 }) {
      return (formats, text) => {
        if (annotations2.length === 0) {
          return formats;
        }
        let record = { formats, text };
        record = applyAnnotations(record, annotations2);
        return record.formats;
      };
    },
    __experimentalGetPropsForEditableTreeChangeHandler(dispatch) {
      return {
        removeAnnotation: dispatch(STORE_NAME).__experimentalRemoveAnnotation,
        updateAnnotationRange: dispatch(STORE_NAME).__experimentalUpdateAnnotationRange
      };
    },
    __experimentalCreateOnChangeEditableValue(props) {
      return (formats) => {
        const positions = retrieveAnnotationPositions(formats);
        const { removeAnnotation, updateAnnotationRange, annotations: annotations2 } = props;
        updateAnnotationsWithPositions(annotations2, positions, {
          removeAnnotation,
          updateAnnotationRange
        });
      };
    }
  };

  // packages/annotations/build-module/format/index.mjs
  var { name, ...settings } = annotation;
  (0, import_rich_text2.registerFormatType)(name, settings);

  // packages/annotations/build-module/block/index.mjs
  var import_hooks = __toESM(require_hooks(), 1);
  var import_data = __toESM(require_data(), 1);
  var addAnnotationClassName = (OriginalComponent) => {
    return (0, import_data.withSelect)((select, { clientId, className }) => {
      const annotations2 = select(STORE_NAME).__experimentalGetAnnotationsForBlock(
        clientId
      );
      return {
        className: annotations2.map((annotation2) => {
          return "is-annotated-by-" + annotation2.source;
        }).concat(className).filter(Boolean).join(" ")
      };
    })(OriginalComponent);
  };
  (0, import_hooks.addFilter)(
    "editor.BlockListBlock",
    "core/annotations",
    addAnnotationClassName
  );

  // packages/annotations/build-module/store/index.mjs
  var import_data3 = __toESM(require_data(), 1);

  // packages/annotations/build-module/store/reducer.mjs
  function filterWithReference(collection, predicate) {
    const filteredCollection = collection.filter(predicate);
    return collection.length === filteredCollection.length ? collection : filteredCollection;
  }
  var mapValues = (obj, callback) => Object.entries(obj).reduce(
    (acc, [key, value]) => ({
      ...acc,
      [key]: callback(value)
    }),
    {}
  );
  function isValidAnnotationRange(annotation2) {
    return typeof annotation2.start === "number" && typeof annotation2.end === "number" && annotation2.start <= annotation2.end;
  }
  function annotations(state = {}, action) {
    switch (action.type) {
      case "ANNOTATION_ADD":
        const blockClientId = action.blockClientId;
        const newAnnotation = {
          id: action.id,
          blockClientId,
          richTextIdentifier: action.richTextIdentifier,
          source: action.source,
          selector: action.selector,
          range: action.range
        };
        if (newAnnotation.selector === "range" && !isValidAnnotationRange(newAnnotation.range)) {
          return state;
        }
        const previousAnnotationsForBlock = state?.[blockClientId] ?? [];
        return {
          ...state,
          [blockClientId]: [
            ...previousAnnotationsForBlock,
            newAnnotation
          ]
        };
      case "ANNOTATION_REMOVE":
        return mapValues(state, (annotationsForBlock) => {
          return filterWithReference(
            annotationsForBlock,
            (annotation2) => {
              return annotation2.id !== action.annotationId;
            }
          );
        });
      case "ANNOTATION_UPDATE_RANGE":
        return mapValues(state, (annotationsForBlock) => {
          let hasChangedRange = false;
          const newAnnotations = annotationsForBlock.map(
            (annotation2) => {
              if (annotation2.id === action.annotationId) {
                hasChangedRange = true;
                return {
                  ...annotation2,
                  range: {
                    start: action.start,
                    end: action.end
                  }
                };
              }
              return annotation2;
            }
          );
          return hasChangedRange ? newAnnotations : annotationsForBlock;
        });
      case "ANNOTATION_REMOVE_SOURCE":
        return mapValues(state, (annotationsForBlock) => {
          return filterWithReference(
            annotationsForBlock,
            (annotation2) => {
              return annotation2.source !== action.source;
            }
          );
        });
    }
    return state;
  }
  var reducer_default = annotations;

  // packages/annotations/build-module/store/selectors.mjs
  var selectors_exports = {};
  __export(selectors_exports, {
    __experimentalGetAllAnnotationsForBlock: () => __experimentalGetAllAnnotationsForBlock,
    __experimentalGetAnnotations: () => __experimentalGetAnnotations,
    __experimentalGetAnnotationsForBlock: () => __experimentalGetAnnotationsForBlock,
    __experimentalGetAnnotationsForRichText: () => __experimentalGetAnnotationsForRichText
  });
  var import_data2 = __toESM(require_data(), 1);
  var EMPTY_ARRAY = [];
  var __experimentalGetAnnotationsForBlock = (0, import_data2.createSelector)(
    (state, blockClientId) => {
      return (state?.[blockClientId] ?? []).filter((annotation2) => {
        return annotation2.selector === "block";
      });
    },
    (state, blockClientId) => [state?.[blockClientId] ?? EMPTY_ARRAY]
  );
  function __experimentalGetAllAnnotationsForBlock(state, blockClientId) {
    return state?.[blockClientId] ?? EMPTY_ARRAY;
  }
  var __experimentalGetAnnotationsForRichText = (0, import_data2.createSelector)(
    (state, blockClientId, richTextIdentifier) => {
      return (state?.[blockClientId] ?? []).filter((annotation2) => {
        return annotation2.selector === "range" && richTextIdentifier === annotation2.richTextIdentifier;
      }).map((annotation2) => {
        const { range, ...other } = annotation2;
        return {
          ...range,
          ...other
        };
      });
    },
    (state, blockClientId) => [state?.[blockClientId] ?? EMPTY_ARRAY]
  );
  function __experimentalGetAnnotations(state) {
    return Object.values(state).flat();
  }

  // packages/annotations/build-module/store/actions.mjs
  var actions_exports = {};
  __export(actions_exports, {
    __experimentalAddAnnotation: () => __experimentalAddAnnotation,
    __experimentalRemoveAnnotation: () => __experimentalRemoveAnnotation,
    __experimentalRemoveAnnotationsBySource: () => __experimentalRemoveAnnotationsBySource,
    __experimentalUpdateAnnotationRange: () => __experimentalUpdateAnnotationRange
  });

  // node_modules/uuid/dist/esm-browser/rng.js
  var getRandomValues;
  var rnds8 = new Uint8Array(16);
  function rng() {
    if (!getRandomValues) {
      getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
      if (!getRandomValues) {
        throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
      }
    }
    return getRandomValues(rnds8);
  }

  // node_modules/uuid/dist/esm-browser/stringify.js
  var byteToHex = [];
  for (let i = 0; i < 256; ++i) {
    byteToHex.push((i + 256).toString(16).slice(1));
  }
  function unsafeStringify(arr, offset = 0) {
    return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
  }

  // node_modules/uuid/dist/esm-browser/native.js
  var randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
  var native_default = {
    randomUUID
  };

  // node_modules/uuid/dist/esm-browser/v4.js
  function v4(options, buf, offset) {
    if (native_default.randomUUID && !buf && !options) {
      return native_default.randomUUID();
    }
    options = options || {};
    const rnds = options.random || (options.rng || rng)();
    rnds[6] = rnds[6] & 15 | 64;
    rnds[8] = rnds[8] & 63 | 128;
    if (buf) {
      offset = offset || 0;
      for (let i = 0; i < 16; ++i) {
        buf[offset + i] = rnds[i];
      }
      return buf;
    }
    return unsafeStringify(rnds);
  }
  var v4_default = v4;

  // packages/annotations/build-module/store/actions.mjs
  function __experimentalAddAnnotation({
    blockClientId,
    richTextIdentifier = null,
    range = null,
    selector = "range",
    source = "default",
    id = v4_default()
  }) {
    const action = {
      type: "ANNOTATION_ADD",
      id,
      blockClientId,
      richTextIdentifier,
      source,
      selector
    };
    if (selector === "range") {
      action.range = range;
    }
    return action;
  }
  function __experimentalRemoveAnnotation(annotationId) {
    return {
      type: "ANNOTATION_REMOVE",
      annotationId
    };
  }
  function __experimentalUpdateAnnotationRange(annotationId, start, end) {
    return {
      type: "ANNOTATION_UPDATE_RANGE",
      annotationId,
      start,
      end
    };
  }
  function __experimentalRemoveAnnotationsBySource(source) {
    return {
      type: "ANNOTATION_REMOVE_SOURCE",
      source
    };
  }

  // packages/annotations/build-module/store/index.mjs
  var store = (0, import_data3.createReduxStore)(STORE_NAME, {
    reducer: reducer_default,
    selectors: selectors_exports,
    actions: actions_exports
  });
  (0, import_data3.register)(store);
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                                                                                           dist/annotations.min.js                                                                             0000644                 00000013126 15212563756 0011203 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;(wp||={}).annotations=(()=>{var X=Object.create;var l=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var z=Object.getOwnPropertyNames;var J=Object.getPrototypeOf,K=Object.prototype.hasOwnProperty;var m=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),_=(t,e)=>{for(var n in e)l(t,n,{get:e[n],enumerable:!0})},S=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of z(e))!K.call(t,o)&&o!==n&&l(t,o,{get:()=>e[o],enumerable:!(r=q(e,o))||r.enumerable});return t};var s=(t,e,n)=>(n=t!=null?X(J(t)):{},S(e||!t||!t.__esModule?l(n,"default",{value:t,enumerable:!0}):n,t)),Q=t=>S(l({},"__esModule",{value:!0}),t);var g=m((Nt,D)=>{D.exports=window.wp.richText});var M=m((Tt,C)=>{C.exports=window.wp.i18n});var F=m((Ot,G)=>{G.exports=window.wp.hooks});var d=m((ht,B)=>{B.exports=window.wp.data});var _t={};_(_t,{store:()=>b});var k=s(g(),1);var P=s(M(),1),T=s(g(),1);var p="core/annotations";var E="core/annotation",N="annotation-text-";function Z(t,e=[]){return e.forEach(n=>{let{start:r,end:o}=n;r>t.text.length&&(r=t.text.length),o>t.text.length&&(o=t.text.length);let i=N+n.source,u=N+n.id;t=(0,T.applyFormat)(t,{type:E,attributes:{className:i,id:u}},r,o)}),t}function $(t){let e={};return t.forEach((n,r)=>{n=n||[],n=n.filter(o=>o.type===E),n.forEach(o=>{let{id:i}=o.attributes;i=i.replace(N,""),e.hasOwnProperty(i)||(e[i]={start:r}),e[i].end=r+1})}),e}function tt(t,e,{removeAnnotation:n,updateAnnotationRange:r}){t.forEach(o=>{let i=e[o.id];if(!i){n(o.id);return}let{start:u,end:x}=o;(u!==i.start||x!==i.end)&&r(o.id,i.start,i.end)})}var V={name:E,title:(0,P.__)("Annotation"),tagName:"mark",className:"annotation-text",attributes:{className:"class",id:"id"},edit(){return null},__experimentalGetPropsForEditableTreePreparation(t,{richTextIdentifier:e,blockClientId:n}){return{annotations:t(p).__experimentalGetAnnotationsForRichText(n,e)}},__experimentalCreatePrepareEditableTree({annotations:t}){return(e,n)=>{if(t.length===0)return e;let r={formats:e,text:n};return r=Z(r,t),r.formats}},__experimentalGetPropsForEditableTreeChangeHandler(t){return{removeAnnotation:t(p).__experimentalRemoveAnnotation,updateAnnotationRange:t(p).__experimentalUpdateAnnotationRange}},__experimentalCreateOnChangeEditableValue(t){return e=>{let n=$(e),{removeAnnotation:r,updateAnnotationRange:o,annotations:i}=t;tt(i,n,{removeAnnotation:r,updateAnnotationRange:o})}}};var{name:et,...nt}=V;(0,k.registerFormatType)(et,nt);var j=s(F(),1),H=s(d(),1);var rt=t=>(0,H.withSelect)((e,{clientId:n,className:r})=>({className:e(p).__experimentalGetAnnotationsForBlock(n).map(i=>"is-annotated-by-"+i.source).concat(r).filter(Boolean).join(" ")}))(t);(0,j.addFilter)("editor.BlockListBlock","core/annotations",rt);var f=s(d(),1);function L(t,e){let n=t.filter(e);return t.length===n.length?t:n}var v=(t,e)=>Object.entries(t).reduce((n,[r,o])=>({...n,[r]:e(o)}),{});function ot(t){return typeof t.start=="number"&&typeof t.end=="number"&&t.start<=t.end}function it(t={},e){switch(e.type){case"ANNOTATION_ADD":let n=e.blockClientId,r={id:e.id,blockClientId:n,richTextIdentifier:e.richTextIdentifier,source:e.source,selector:e.selector,range:e.range};if(r.selector==="range"&&!ot(r.range))return t;let o=t?.[n]??[];return{...t,[n]:[...o,r]};case"ANNOTATION_REMOVE":return v(t,i=>L(i,u=>u.id!==e.annotationId));case"ANNOTATION_UPDATE_RANGE":return v(t,i=>{let u=!1,x=i.map(A=>A.id===e.annotationId?(u=!0,{...A,range:{start:e.start,end:e.end}}):A);return u?x:i});case"ANNOTATION_REMOVE_SOURCE":return v(t,i=>L(i,u=>u.source!==e.source))}return t}var W=it;var O={};_(O,{__experimentalGetAllAnnotationsForBlock:()=>ut,__experimentalGetAnnotations:()=>st,__experimentalGetAnnotationsForBlock:()=>at,__experimentalGetAnnotationsForRichText:()=>pt});var R=s(d(),1),y=[],at=(0,R.createSelector)((t,e)=>(t?.[e]??[]).filter(n=>n.selector==="block"),(t,e)=>[t?.[e]??y]);function ut(t,e){return t?.[e]??y}var pt=(0,R.createSelector)((t,e,n)=>(t?.[e]??[]).filter(r=>r.selector==="range"&&n===r.richTextIdentifier).map(r=>{let{range:o,...i}=r;return{...o,...i}}),(t,e)=>[t?.[e]??y]);function st(t){return Object.values(t).flat()}var U={};_(U,{__experimentalAddAnnotation:()=>ct,__experimentalRemoveAnnotation:()=>ft,__experimentalRemoveAnnotationsBySource:()=>At,__experimentalUpdateAnnotationRange:()=>xt});var c,lt=new Uint8Array(16);function h(){if(!c&&(c=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!c))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return c(lt)}var a=[];for(let t=0;t<256;++t)a.push((t+256).toString(16).slice(1));function Y(t,e=0){return a[t[e+0]]+a[t[e+1]]+a[t[e+2]]+a[t[e+3]]+"-"+a[t[e+4]]+a[t[e+5]]+"-"+a[t[e+6]]+a[t[e+7]]+"-"+a[t[e+8]]+a[t[e+9]]+"-"+a[t[e+10]]+a[t[e+11]]+a[t[e+12]]+a[t[e+13]]+a[t[e+14]]+a[t[e+15]]}var mt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),I={randomUUID:mt};function dt(t,e,n){if(I.randomUUID&&!e&&!t)return I.randomUUID();t=t||{};let r=t.random||(t.rng||h)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(let o=0;o<16;++o)e[n+o]=r[o];return e}return Y(r)}var w=dt;function ct({blockClientId:t,richTextIdentifier:e=null,range:n=null,selector:r="range",source:o="default",id:i=w()}){let u={type:"ANNOTATION_ADD",id:i,blockClientId:t,richTextIdentifier:e,source:o,selector:r};return r==="range"&&(u.range=n),u}function ft(t){return{type:"ANNOTATION_REMOVE",annotationId:t}}function xt(t,e,n){return{type:"ANNOTATION_UPDATE_RANGE",annotationId:t,start:e,end:n}}function At(t){return{type:"ANNOTATION_REMOVE_SOURCE",source:t}}var b=(0,f.createReduxStore)(p,{reducer:W,selectors:O,actions:U});(0,f.register)(b);return Q(_t);})();
                                                                                                                                                                                                                                                                                                                                                                                                                                          dist/api-fetch.js                                                                                   0000644                 00000042723 15212563760 0007724 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).apiFetch = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // package-external:@wordpress/url
  var require_url = __commonJS({
    "package-external:@wordpress/url"(exports, module) {
      module.exports = window.wp.url;
    }
  });

  // packages/api-fetch/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    default: () => index_default
  });
  var import_i18n3 = __toESM(require_i18n(), 1);

  // packages/api-fetch/build-module/middlewares/nonce.mjs
  function createNonceMiddleware(nonce) {
    const middleware = (options, next) => {
      const { headers = {} } = options;
      for (const headerName in headers) {
        if (headerName.toLowerCase() === "x-wp-nonce" && headers[headerName] === middleware.nonce) {
          return next(options);
        }
      }
      return next({
        ...options,
        headers: {
          ...headers,
          "X-WP-Nonce": middleware.nonce
        }
      });
    };
    middleware.nonce = nonce;
    return middleware;
  }
  var nonce_default = createNonceMiddleware;

  // packages/api-fetch/build-module/middlewares/namespace-endpoint.mjs
  var namespaceAndEndpointMiddleware = (options, next) => {
    let path = options.path;
    let namespaceTrimmed, endpointTrimmed;
    if (typeof options.namespace === "string" && typeof options.endpoint === "string") {
      namespaceTrimmed = options.namespace.replace(/^\/|\/$/g, "");
      endpointTrimmed = options.endpoint.replace(/^\//, "");
      if (endpointTrimmed) {
        path = namespaceTrimmed + "/" + endpointTrimmed;
      } else {
        path = namespaceTrimmed;
      }
    }
    delete options.namespace;
    delete options.endpoint;
    return next({
      ...options,
      path
    });
  };
  var namespace_endpoint_default = namespaceAndEndpointMiddleware;

  // packages/api-fetch/build-module/middlewares/root-url.mjs
  var createRootURLMiddleware = (rootURL) => (options, next) => {
    return namespace_endpoint_default(options, (optionsWithPath) => {
      let url = optionsWithPath.url;
      let path = optionsWithPath.path;
      let apiRoot;
      if (typeof path === "string") {
        apiRoot = rootURL;
        if (-1 !== rootURL.indexOf("?")) {
          path = path.replace("?", "&");
        }
        path = path.replace(/^\//, "");
        if ("string" === typeof apiRoot && -1 !== apiRoot.indexOf("?")) {
          path = path.replace("?", "&");
        }
        url = apiRoot + path;
      }
      return next({
        ...optionsWithPath,
        url
      });
    });
  };
  var root_url_default = createRootURLMiddleware;

  // packages/api-fetch/build-module/middlewares/preloading.mjs
  var import_url = __toESM(require_url(), 1);
  function createPreloadingMiddleware(preloadedData) {
    const cache = Object.fromEntries(
      Object.entries(preloadedData).map(([path, data]) => [
        (0, import_url.normalizePath)(path),
        data
      ])
    );
    return (options, next) => {
      const { parse = true } = options;
      let rawPath = options.path;
      if (!rawPath && options.url) {
        const { rest_route: pathFromQuery, ...queryArgs } = (0, import_url.getQueryArgs)(
          options.url
        );
        if (typeof pathFromQuery === "string") {
          rawPath = (0, import_url.addQueryArgs)(pathFromQuery, queryArgs);
        }
      }
      if (typeof rawPath !== "string") {
        return next(options);
      }
      const method = options.method || "GET";
      const path = (0, import_url.normalizePath)(rawPath);
      if ("GET" === method && cache[path]) {
        const cacheData = cache[path];
        delete cache[path];
        return prepareResponse(cacheData, !!parse);
      } else if ("OPTIONS" === method && cache[method] && cache[method][path]) {
        const cacheData = cache[method][path];
        delete cache[method][path];
        return prepareResponse(cacheData, !!parse);
      }
      return next(options);
    };
  }
  function prepareResponse(responseData, parse) {
    if (parse) {
      return Promise.resolve(responseData.body);
    }
    try {
      return Promise.resolve(
        new window.Response(JSON.stringify(responseData.body), {
          status: 200,
          statusText: "OK",
          headers: responseData.headers
        })
      );
    } catch {
      Object.entries(
        responseData.headers
      ).forEach(([key, value]) => {
        if (key.toLowerCase() === "link") {
          responseData.headers[key] = value.replace(
            /<([^>]+)>/,
            (_, url) => `<${encodeURI(url)}>`
          );
        }
      });
      return Promise.resolve(
        parse ? responseData.body : new window.Response(JSON.stringify(responseData.body), {
          status: 200,
          statusText: "OK",
          headers: responseData.headers
        })
      );
    }
  }
  var preloading_default = createPreloadingMiddleware;

  // packages/api-fetch/build-module/middlewares/fetch-all-middleware.mjs
  var import_url2 = __toESM(require_url(), 1);
  var modifyQuery = ({ path, url, ...options }, queryArgs) => ({
    ...options,
    url: url && (0, import_url2.addQueryArgs)(url, queryArgs),
    path: path && (0, import_url2.addQueryArgs)(path, queryArgs)
  });
  var parseResponse = (response) => response.json ? response.json() : Promise.reject(response);
  var parseLinkHeader = (linkHeader) => {
    if (!linkHeader) {
      return {};
    }
    const match = linkHeader.match(/<([^>]+)>; rel="next"/);
    return match ? {
      next: match[1]
    } : {};
  };
  var getNextPageUrl = (response) => {
    const { next } = parseLinkHeader(response.headers.get("link"));
    return next;
  };
  var requestContainsUnboundedQuery = (options) => {
    const pathIsUnbounded = !!options.path && options.path.indexOf("per_page=-1") !== -1;
    const urlIsUnbounded = !!options.url && options.url.indexOf("per_page=-1") !== -1;
    return pathIsUnbounded || urlIsUnbounded;
  };
  var fetchAllMiddleware = async (options, next) => {
    if (options.parse === false) {
      return next(options);
    }
    if (!requestContainsUnboundedQuery(options)) {
      return next(options);
    }
    const response = await index_default({
      ...modifyQuery(options, {
        per_page: 100
      }),
      // Ensure headers are returned for page 1.
      parse: false
    });
    const results = await parseResponse(response);
    if (!Array.isArray(results)) {
      return results;
    }
    let nextPage = getNextPageUrl(response);
    if (!nextPage) {
      return results;
    }
    let mergedResults = [].concat(results);
    while (nextPage) {
      const nextResponse = await index_default({
        ...options,
        // Ensure the URL for the next page is used instead of any provided path.
        path: void 0,
        url: nextPage,
        // Ensure we still get headers so we can identify the next page.
        parse: false
      });
      const nextResults = await parseResponse(nextResponse);
      mergedResults = mergedResults.concat(nextResults);
      nextPage = getNextPageUrl(nextResponse);
    }
    return mergedResults;
  };
  var fetch_all_middleware_default = fetchAllMiddleware;

  // packages/api-fetch/build-module/middlewares/http-v1.mjs
  var OVERRIDE_METHODS = /* @__PURE__ */ new Set(["PATCH", "PUT", "DELETE"]);
  var DEFAULT_METHOD = "GET";
  var httpV1Middleware = (options, next) => {
    const { method = DEFAULT_METHOD } = options;
    if (OVERRIDE_METHODS.has(method.toUpperCase())) {
      options = {
        ...options,
        headers: {
          ...options.headers,
          "X-HTTP-Method-Override": method,
          "Content-Type": "application/json"
        },
        method: "POST"
      };
    }
    return next(options);
  };
  var http_v1_default = httpV1Middleware;

  // packages/api-fetch/build-module/middlewares/user-locale.mjs
  var import_url3 = __toESM(require_url(), 1);
  var userLocaleMiddleware = (options, next) => {
    if (typeof options.url === "string" && !(0, import_url3.hasQueryArg)(options.url, "_locale")) {
      options.url = (0, import_url3.addQueryArgs)(options.url, { _locale: "user" });
    }
    if (typeof options.path === "string" && !(0, import_url3.hasQueryArg)(options.path, "_locale")) {
      options.path = (0, import_url3.addQueryArgs)(options.path, { _locale: "user" });
    }
    return next(options);
  };
  var user_locale_default = userLocaleMiddleware;

  // packages/api-fetch/build-module/middlewares/media-upload.mjs
  var import_i18n2 = __toESM(require_i18n(), 1);

  // packages/api-fetch/build-module/utils/response.mjs
  var import_i18n = __toESM(require_i18n(), 1);
  async function parseJsonAndNormalizeError(response) {
    try {
      return await response.json();
    } catch {
      throw {
        code: "invalid_json",
        message: (0, import_i18n.__)("The response is not a valid JSON response.")
      };
    }
  }
  async function parseResponseAndNormalizeError(response, shouldParseResponse = true) {
    if (!shouldParseResponse) {
      return response;
    }
    if (response.status === 204) {
      return null;
    }
    return await parseJsonAndNormalizeError(response);
  }
  async function parseAndThrowError(response, shouldParseResponse = true) {
    if (!shouldParseResponse) {
      throw response;
    }
    throw await parseJsonAndNormalizeError(response);
  }

  // packages/api-fetch/build-module/middlewares/media-upload.mjs
  function isMediaUploadRequest(options) {
    const isCreateMethod = !!options.method && options.method === "POST";
    const isMediaEndpoint = !!options.path && options.path.indexOf("/wp/v2/media") !== -1 || !!options.url && options.url.indexOf("/wp/v2/media") !== -1;
    return isMediaEndpoint && isCreateMethod;
  }
  var mediaUploadMiddleware = (options, next) => {
    if (!isMediaUploadRequest(options)) {
      return next(options);
    }
    let retries = 0;
    const maxRetries = 5;
    const postProcess = (attachmentId) => {
      retries++;
      return next({
        path: `/wp/v2/media/${attachmentId}/post-process`,
        method: "POST",
        data: { action: "create-image-subsizes" },
        parse: false
      }).catch(() => {
        if (retries < maxRetries) {
          return postProcess(attachmentId);
        }
        next({
          path: `/wp/v2/media/${attachmentId}?force=true`,
          method: "DELETE"
        });
        return Promise.reject();
      });
    };
    return next({ ...options, parse: false }).catch((response) => {
      if (!(response instanceof globalThis.Response)) {
        return Promise.reject(response);
      }
      const attachmentId = response.headers.get(
        "x-wp-upload-attachment-id"
      );
      if (response.status >= 500 && response.status < 600 && attachmentId) {
        return postProcess(attachmentId).catch(() => {
          if (options.parse !== false) {
            return Promise.reject({
              code: "post_process",
              message: (0, import_i18n2.__)(
                "Media upload failed. If this is a photo or a large image, please scale it down and try again."
              )
            });
          }
          return Promise.reject(response);
        });
      }
      return parseAndThrowError(response, options.parse);
    }).then(
      (response) => parseResponseAndNormalizeError(response, options.parse)
    );
  };
  var media_upload_default = mediaUploadMiddleware;

  // packages/api-fetch/build-module/middlewares/theme-preview.mjs
  var import_url4 = __toESM(require_url(), 1);
  var createThemePreviewMiddleware = (themePath) => (options, next) => {
    if (typeof options.url === "string") {
      const wpThemePreview = (0, import_url4.getQueryArg)(
        options.url,
        "wp_theme_preview"
      );
      if (wpThemePreview === void 0) {
        options.url = (0, import_url4.addQueryArgs)(options.url, {
          wp_theme_preview: themePath
        });
      } else if (wpThemePreview === "") {
        options.url = (0, import_url4.removeQueryArgs)(
          options.url,
          "wp_theme_preview"
        );
      }
    }
    if (typeof options.path === "string") {
      const wpThemePreview = (0, import_url4.getQueryArg)(
        options.path,
        "wp_theme_preview"
      );
      if (wpThemePreview === void 0) {
        options.path = (0, import_url4.addQueryArgs)(options.path, {
          wp_theme_preview: themePath
        });
      } else if (wpThemePreview === "") {
        options.path = (0, import_url4.removeQueryArgs)(
          options.path,
          "wp_theme_preview"
        );
      }
    }
    return next(options);
  };
  var theme_preview_default = createThemePreviewMiddleware;

  // packages/api-fetch/build-module/index.mjs
  var DEFAULT_HEADERS = {
    // The backend uses the Accept header as a condition for considering an
    // incoming request as a REST request.
    //
    // See: https://core.trac.wordpress.org/ticket/44534
    Accept: "application/json, */*;q=0.1"
  };
  var DEFAULT_OPTIONS = {
    credentials: "include"
  };
  var middlewares = [
    user_locale_default,
    namespace_endpoint_default,
    http_v1_default,
    fetch_all_middleware_default
  ];
  function registerMiddleware(middleware) {
    middlewares.unshift(middleware);
  }
  var defaultFetchHandler = (nextOptions) => {
    const { url, path, data, parse = true, ...remainingOptions } = nextOptions;
    let { body, headers } = nextOptions;
    headers = { ...DEFAULT_HEADERS, ...headers };
    if (data) {
      body = JSON.stringify(data);
      headers["Content-Type"] = "application/json";
    }
    const responsePromise = globalThis.fetch(
      // Fall back to explicitly passing `window.location` which is the behavior if `undefined` is passed.
      url || path || window.location.href,
      {
        ...DEFAULT_OPTIONS,
        ...remainingOptions,
        body,
        headers
      }
    );
    return responsePromise.then(
      (response) => {
        if (!response.ok) {
          return parseAndThrowError(response, parse);
        }
        return parseResponseAndNormalizeError(response, parse);
      },
      (err) => {
        if (err && err.name === "AbortError") {
          throw err;
        }
        if (!globalThis.navigator.onLine) {
          throw {
            code: "offline_error",
            message: (0, import_i18n3.__)(
              "Unable to connect. Please check your Internet connection."
            )
          };
        }
        throw {
          code: "fetch_error",
          message: (0, import_i18n3.__)(
            "Could not get a valid response from the server."
          )
        };
      }
    );
  };
  var fetchHandler = defaultFetchHandler;
  function setFetchHandler(newFetchHandler) {
    fetchHandler = newFetchHandler;
  }
  var apiFetch = (options) => {
    const enhancedHandler = middlewares.reduceRight(
      (next, middleware) => {
        return (workingOptions) => middleware(workingOptions, next);
      },
      fetchHandler
    );
    return enhancedHandler(options).catch((error) => {
      if (error.code !== "rest_cookie_invalid_nonce") {
        return Promise.reject(error);
      }
      return globalThis.fetch(apiFetch.nonceEndpoint).then((response) => {
        if (!response.ok) {
          return Promise.reject(error);
        }
        return response.text();
      }).then((text) => {
        apiFetch.nonceMiddleware.nonce = text;
        return apiFetch(options);
      });
    });
  };
  apiFetch.use = registerMiddleware;
  apiFetch.setFetchHandler = setFetchHandler;
  apiFetch.createNonceMiddleware = nonce_default;
  apiFetch.createPreloadingMiddleware = preloading_default;
  apiFetch.createRootURLMiddleware = root_url_default;
  apiFetch.fetchAllMiddleware = fetch_all_middleware_default;
  apiFetch.mediaUploadMiddleware = media_upload_default;
  apiFetch.createThemePreviewMiddleware = theme_preview_default;
  var index_default = apiFetch;
  return __toCommonJS(index_exports);
})();
if (typeof wp.apiFetch === 'object' && wp.apiFetch.default) { wp.apiFetch = wp.apiFetch.default; }
                                             dist/api-fetch.min.js                                                                               0000644                 00000014445 15212563760 0010506 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).apiFetch=(()=>{var $=Object.create;var w=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var G=Object.getOwnPropertyNames;var V=Object.getPrototypeOf,K=Object.prototype.hasOwnProperty;var A=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),X=(e,r)=>{for(var a in r)w(e,a,{get:r[a],enumerable:!0})},x=(e,r,a,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of G(r))!K.call(e,n)&&n!==a&&w(e,n,{get:()=>r[n],enumerable:!(t=q(r,n))||t.enumerable});return e};var f=(e,r,a)=>(a=e!=null?$(V(e)):{},x(r||!e||!e.__esModule?w(a,"default",{value:e,enumerable:!0}):a,e)),B=e=>x(w({},"__esModule",{value:!0}),e);var v=A((ge,O)=>{O.exports=window.wp.i18n});var p=A((Pe,j)=>{j.exports=window.wp.url});var ve={};X(ve,{default:()=>g});var P=f(v(),1);function Y(e){let r=(a,t)=>{let{headers:n={}}=a;for(let d in n)if(d.toLowerCase()==="x-wp-nonce"&&n[d]===r.nonce)return t(a);return t({...a,headers:{...n,"X-WP-Nonce":r.nonce}})};return r.nonce=e,r}var R=Y;var Z=(e,r)=>{let a=e.path,t,n;return typeof e.namespace=="string"&&typeof e.endpoint=="string"&&(t=e.namespace.replace(/^\/|\/$/g,""),n=e.endpoint.replace(/^\//,""),n?a=t+"/"+n:a=t),delete e.namespace,delete e.endpoint,r({...e,path:a})},_=Z;var W=e=>(r,a)=>_(r,t=>{let n=t.url,d=t.path,i;return typeof d=="string"&&(i=e,e.indexOf("?")!==-1&&(d=d.replace("?","&")),d=d.replace(/^\//,""),typeof i=="string"&&i.indexOf("?")!==-1&&(d=d.replace("?","&")),n=i+d),a({...t,url:n})}),b=W;var m=f(p(),1);function ee(e){let r=Object.fromEntries(Object.entries(e).map(([a,t])=>[(0,m.normalizePath)(a),t]));return(a,t)=>{let{parse:n=!0}=a,d=a.path;if(!d&&a.url){let{rest_route:s,...o}=(0,m.getQueryArgs)(a.url);typeof s=="string"&&(d=(0,m.addQueryArgs)(s,o))}if(typeof d!="string")return t(a);let i=a.method||"GET",l=(0,m.normalizePath)(d);if(i==="GET"&&r[l]){let s=r[l];return delete r[l],U(s,!!n)}else if(i==="OPTIONS"&&r[i]&&r[i][l]){let s=r[i][l];return delete r[i][l],U(s,!!n)}return t(a)}}function U(e,r){if(r)return Promise.resolve(e.body);try{return Promise.resolve(new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}catch{return Object.entries(e.headers).forEach(([a,t])=>{a.toLowerCase()==="link"&&(e.headers[a]=t.replace(/<([^>]+)>/,(n,d)=>`<${encodeURI(d)}>`))}),Promise.resolve(r?e.body:new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}}var N=ee;var M=f(p(),1);var re=({path:e,url:r,...a},t)=>({...a,url:r&&(0,M.addQueryArgs)(r,t),path:e&&(0,M.addQueryArgs)(e,t)}),L=e=>e.json?e.json():Promise.reject(e),ae=e=>{if(!e)return{};let r=e.match(/<([^>]+)>; rel="next"/);return r?{next:r[1]}:{}},S=e=>{let{next:r}=ae(e.headers.get("link"));return r},te=e=>{let r=!!e.path&&e.path.indexOf("per_page=-1")!==-1,a=!!e.url&&e.url.indexOf("per_page=-1")!==-1;return r||a},de=async(e,r)=>{if(e.parse===!1||!te(e))return r(e);let a=await g({...re(e,{per_page:100}),parse:!1}),t=await L(a);if(!Array.isArray(t))return t;let n=S(a);if(!n)return t;let d=[].concat(t);for(;n;){let i=await g({...e,path:void 0,url:n,parse:!1}),l=await L(i);d=d.concat(l),n=S(i)}return d},E=de;var ne=new Set(["PATCH","PUT","DELETE"]),ie="GET",le=(e,r)=>{let{method:a=ie}=e;return ne.has(a.toUpperCase())&&(e={...e,headers:{...e.headers,"X-HTTP-Method-Override":a,"Content-Type":"application/json"},method:"POST"}),r(e)},H=le;var h=f(p(),1),ce=(e,r)=>(typeof e.url=="string"&&!(0,h.hasQueryArg)(e.url,"_locale")&&(e.url=(0,h.addQueryArgs)(e.url,{_locale:"user"})),typeof e.path=="string"&&!(0,h.hasQueryArg)(e.path,"_locale")&&(e.path=(0,h.addQueryArgs)(e.path,{_locale:"user"})),r(e)),Q=ce;var I=f(v(),1);var C=f(v(),1);async function F(e){try{return await e.json()}catch{throw{code:"invalid_json",message:(0,C.__)("The response is not a valid JSON response.")}}}async function y(e,r=!0){return r?e.status===204?null:await F(e):e}async function T(e,r=!0){throw r?await F(e):e}function oe(e){let r=!!e.method&&e.method==="POST";return(!!e.path&&e.path.indexOf("/wp/v2/media")!==-1||!!e.url&&e.url.indexOf("/wp/v2/media")!==-1)&&r}var ue=(e,r)=>{if(!oe(e))return r(e);let a=0,t=5,n=d=>(a++,r({path:`/wp/v2/media/${d}/post-process`,method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch(()=>a<t?n(d):(r({path:`/wp/v2/media/${d}?force=true`,method:"DELETE"}),Promise.reject())));return r({...e,parse:!1}).catch(d=>{if(!(d instanceof globalThis.Response))return Promise.reject(d);let i=d.headers.get("x-wp-upload-attachment-id");return d.status>=500&&d.status<600&&i?n(i).catch(()=>e.parse!==!1?Promise.reject({code:"post_process",message:(0,I.__)("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(d)):T(d,e.parse)}).then(d=>y(d,e.parse))},z=ue;var u=f(p(),1),se=e=>(r,a)=>{if(typeof r.url=="string"){let t=(0,u.getQueryArg)(r.url,"wp_theme_preview");t===void 0?r.url=(0,u.addQueryArgs)(r.url,{wp_theme_preview:e}):t===""&&(r.url=(0,u.removeQueryArgs)(r.url,"wp_theme_preview"))}if(typeof r.path=="string"){let t=(0,u.getQueryArg)(r.path,"wp_theme_preview");t===void 0?r.path=(0,u.addQueryArgs)(r.path,{wp_theme_preview:e}):t===""&&(r.path=(0,u.removeQueryArgs)(r.path,"wp_theme_preview"))}return a(r)},k=se;var fe={Accept:"application/json, */*;q=0.1"},me={credentials:"include"},J=[Q,_,H,E];function he(e){J.unshift(e)}var pe=e=>{let{url:r,path:a,data:t,parse:n=!0,...d}=e,{body:i,headers:l}=e;return l={...fe,...l},t&&(i=JSON.stringify(t),l["Content-Type"]="application/json"),globalThis.fetch(r||a||window.location.href,{...me,...d,body:i,headers:l}).then(o=>o.ok?y(o,n):T(o,n),o=>{throw o&&o.name==="AbortError"?o:globalThis.navigator.onLine?{code:"fetch_error",message:(0,P.__)("Could not get a valid response from the server.")}:{code:"offline_error",message:(0,P.__)("Unable to connect. Please check your Internet connection.")}})},D=pe;function we(e){D=e}var c=e=>J.reduceRight((a,t)=>n=>t(n,a),D)(e).catch(a=>a.code!=="rest_cookie_invalid_nonce"?Promise.reject(a):globalThis.fetch(c.nonceEndpoint).then(t=>t.ok?t.text():Promise.reject(a)).then(t=>(c.nonceMiddleware.nonce=t,c(e))));c.use=he;c.setFetchHandler=we;c.createNonceMiddleware=R;c.createPreloadingMiddleware=N;c.createRootURLMiddleware=b;c.fetchAllMiddleware=E;c.mediaUploadMiddleware=z;c.createThemePreviewMiddleware=k;var g=c;return B(ve);})();
if (typeof wp.apiFetch === 'object' && wp.apiFetch.default) { wp.apiFetch = wp.apiFetch.default; }
                                                                                                                                                                                                                           dist/autop.js                                                                                       0000644                 00000023352 15212563760 0007211 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).autop = (() => {
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // packages/autop/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    autop: () => autop,
    removep: () => removep
  });
  var htmlSplitRegex = (() => {
    const comments = "!(?:-(?!->)[^\\-]*)*(?:-->)?";
    const cdata = "!\\[CDATA\\[[^\\]]*(?:](?!]>)[^\\]]*)*?(?:]]>)?";
    const escaped = "(?=!--|!\\[CDATA\\[)((?=!-)" + // If yes, which type?
    comments + "|" + cdata + ")";
    const regex = "(<(" + // Conditional expression follows.
    escaped + // Find end of escaped element.
    "|[^>]*>?))";
    return new RegExp(regex);
  })();
  function htmlSplit(input) {
    const parts = [];
    let workingInput = input;
    let match;
    while (match = workingInput.match(htmlSplitRegex)) {
      const index = match.index;
      parts.push(workingInput.slice(0, index));
      parts.push(match[0]);
      workingInput = workingInput.slice(index + match[0].length);
    }
    if (workingInput.length) {
      parts.push(workingInput);
    }
    return parts;
  }
  function replaceInHtmlTags(haystack, replacePairs) {
    const textArr = htmlSplit(haystack);
    let changed = false;
    const needles = Object.keys(replacePairs);
    for (let i = 1; i < textArr.length; i += 2) {
      for (let j = 0; j < needles.length; j++) {
        const needle = needles[j];
        if (-1 !== textArr[i].indexOf(needle)) {
          textArr[i] = textArr[i].replace(
            new RegExp(needle, "g"),
            replacePairs[needle]
          );
          changed = true;
          break;
        }
      }
    }
    if (changed) {
      haystack = textArr.join("");
    }
    return haystack;
  }
  function autop(text, br = true) {
    const preTags = [];
    if (text.trim() === "") {
      return "";
    }
    text = text + "\n";
    if (text.indexOf("<pre") !== -1) {
      const textParts = text.split("</pre>");
      const lastText = textParts.pop();
      text = "";
      for (let i = 0; i < textParts.length; i++) {
        const textPart = textParts[i];
        const start = textPart.indexOf("<pre");
        if (start === -1) {
          text += textPart;
          continue;
        }
        const name = "<pre wp-pre-tag-" + i + "></pre>";
        preTags.push([name, textPart.substr(start) + "</pre>"]);
        text += textPart.substr(0, start) + name;
      }
      text += lastText;
    }
    text = text.replace(/<br\s*\/?>\s*<br\s*\/?>/g, "\n\n");
    const allBlocks = "(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";
    text = text.replace(
      new RegExp("(<" + allBlocks + "[\\s/>])", "g"),
      "\n\n$1"
    );
    text = text.replace(
      new RegExp("(</" + allBlocks + ">)", "g"),
      "$1\n\n"
    );
    text = text.replace(/\r\n|\r/g, "\n");
    text = replaceInHtmlTags(text, { "\n": " <!-- wpnl --> " });
    if (text.indexOf("<option") !== -1) {
      text = text.replace(/\s*<option/g, "<option");
      text = text.replace(/<\/option>\s*/g, "</option>");
    }
    if (text.indexOf("</object>") !== -1) {
      text = text.replace(/(<object[^>]*>)\s*/g, "$1");
      text = text.replace(/\s*<\/object>/g, "</object>");
      text = text.replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/g, "$1");
    }
    if (text.indexOf("<source") !== -1 || text.indexOf("<track") !== -1) {
      text = text.replace(/([<\[](?:audio|video)[^>\]]*[>\]])\s*/g, "$1");
      text = text.replace(/\s*([<\[]\/(?:audio|video)[>\]])/g, "$1");
      text = text.replace(/\s*(<(?:source|track)[^>]*>)\s*/g, "$1");
    }
    if (text.indexOf("<figcaption") !== -1) {
      text = text.replace(/\s*(<figcaption[^>]*>)/, "$1");
      text = text.replace(/<\/figcaption>\s*/, "</figcaption>");
    }
    text = text.replace(/\n\n+/g, "\n\n");
    const texts = text.split(/\n\s*\n/).filter(Boolean);
    text = "";
    texts.forEach((textPiece) => {
      text += "<p>" + textPiece.replace(/^\n*|\n*$/g, "") + "</p>\n";
    });
    text = text.replace(/<p>\s*<\/p>/g, "");
    text = text.replace(
      /<p>([^<]+)<\/(div|address|form)>/g,
      "<p>$1</p></$2>"
    );
    text = text.replace(
      new RegExp("<p>\\s*(</?" + allBlocks + "[^>]*>)\\s*</p>", "g"),
      "$1"
    );
    text = text.replace(/<p>(<li.+?)<\/p>/g, "$1");
    text = text.replace(/<p><blockquote([^>]*)>/gi, "<blockquote$1><p>");
    text = text.replace(/<\/blockquote><\/p>/g, "</p></blockquote>");
    text = text.replace(
      new RegExp("<p>\\s*(</?" + allBlocks + "[^>]*>)", "g"),
      "$1"
    );
    text = text.replace(
      new RegExp("(</?" + allBlocks + "[^>]*>)\\s*</p>", "g"),
      "$1"
    );
    if (br) {
      text = text.replace(
        /<(script|style).*?<\/\\1>/g,
        (match) => match[0].replace(/\n/g, "<WPPreserveNewline />")
      );
      text = text.replace(/<br>|<br\/>/g, "<br />");
      text = text.replace(
        /(<br \/>)?\s*\n/g,
        (a, b) => b ? a : "<br />\n"
      );
      text = text.replace(/<WPPreserveNewline \/>/g, "\n");
    }
    text = text.replace(
      new RegExp("(</?" + allBlocks + "[^>]*>)\\s*<br />", "g"),
      "$1"
    );
    text = text.replace(
      /<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g,
      "$1"
    );
    text = text.replace(/\n<\/p>$/g, "</p>");
    preTags.forEach((preTag) => {
      const [name, original] = preTag;
      text = text.replace(name, () => original);
    });
    if (-1 !== text.indexOf("<!-- wpnl -->")) {
      text = text.replace(/\s?<!-- wpnl -->\s?/g, "\n");
    }
    return text;
  }
  function removep(html) {
    const blocklist = "blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset|figure";
    const blocklist1 = blocklist + "|div|p";
    const blocklist2 = blocklist + "|pre";
    const preserve = [];
    let preserveLinebreaks = false;
    let preserveBr = false;
    if (!html) {
      return "";
    }
    if (html.indexOf("<script") !== -1 || html.indexOf("<style") !== -1) {
      html = html.replace(
        /<(script|style)[^>]*>[\s\S]*?<\/\1>/g,
        (match) => {
          preserve.push(match);
          return "<wp-preserve>";
        }
      );
    }
    if (html.indexOf("<pre") !== -1) {
      preserveLinebreaks = true;
      html = html.replace(/<pre[^>]*>[\s\S]+?<\/pre>/g, (a) => {
        a = a.replace(/<br ?\/?>(\r\n|\n)?/g, "<wp-line-break>");
        a = a.replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g, "<wp-line-break>");
        return a.replace(/\r?\n/g, "<wp-line-break>");
      });
    }
    if (html.indexOf("[caption") !== -1) {
      preserveBr = true;
      html = html.replace(/\[caption[\s\S]+?\[\/caption\]/g, (a) => {
        return a.replace(/<br([^>]*)>/g, "<wp-temp-br$1>").replace(/[\r\n\t]+/, "");
      });
    }
    html = html.replace(
      new RegExp("\\s*</(" + blocklist1 + ")>\\s*", "g"),
      "</$1>\n"
    );
    html = html.replace(
      new RegExp("\\s*<((?:" + blocklist1 + ")(?: [^>]*)?)>", "g"),
      "\n<$1>"
    );
    html = html.replace(/(<p [^>]+>[\s\S]*?)<\/p>/g, "$1</p#>");
    html = html.replace(/<div( [^>]*)?>\s*<p>/gi, "<div$1>\n\n");
    html = html.replace(/\s*<p>/gi, "");
    html = html.replace(/\s*<\/p>\s*/gi, "\n\n");
    html = html.replace(/\n[\s\u00a0]+\n/g, "\n\n");
    html = html.replace(/(\s*)<br ?\/?>\s*/gi, (_, space) => {
      if (space && space.indexOf("\n") !== -1) {
        return "\n\n";
      }
      return "\n";
    });
    html = html.replace(/\s*<div/g, "\n<div");
    html = html.replace(/<\/div>\s*/g, "</div>\n");
    html = html.replace(
      /\s*\[caption([^\[]+)\[\/caption\]\s*/gi,
      "\n\n[caption$1[/caption]\n\n"
    );
    html = html.replace(/caption\]\n\n+\[caption/g, "caption]\n\n[caption");
    html = html.replace(
      new RegExp("\\s*<((?:" + blocklist2 + ")(?: [^>]*)?)\\s*>", "g"),
      "\n<$1>"
    );
    html = html.replace(
      new RegExp("\\s*</(" + blocklist2 + ")>\\s*", "g"),
      "</$1>\n"
    );
    html = html.replace(/<((li|dt|dd)[^>]*)>/g, " 	<$1>");
    if (html.indexOf("<option") !== -1) {
      html = html.replace(/\s*<option/g, "\n<option");
      html = html.replace(/\s*<\/select>/g, "\n</select>");
    }
    if (html.indexOf("<hr") !== -1) {
      html = html.replace(/\s*<hr( [^>]*)?>\s*/g, "\n\n<hr$1>\n\n");
    }
    if (html.indexOf("<object") !== -1) {
      html = html.replace(/<object[\s\S]+?<\/object>/g, (a) => {
        return a.replace(/[\r\n]+/g, "");
      });
    }
    html = html.replace(/<\/p#>/g, "</p>\n");
    html = html.replace(/\s*(<p [^>]+>[\s\S]*?<\/p>)/g, "\n$1");
    html = html.replace(/^\s+/, "");
    html = html.replace(/[\s\u00a0]+$/, "");
    if (preserveLinebreaks) {
      html = html.replace(/<wp-line-break>/g, "\n");
    }
    if (preserveBr) {
      html = html.replace(/<wp-temp-br([^>]*)>/g, "<br$1>");
    }
    if (preserve.length) {
      html = html.replace(/<wp-preserve>/g, () => {
        return preserve.shift();
      });
    }
    return html;
  }
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                      dist/autop.min.js                                                                                   0000644                 00000012742 15212563760 0007774 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).autop=(()=>{var l=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var $=(e,n)=>{for(var r in n)l(e,r,{get:n[r],enumerable:!0})},w=(e,n,r,c)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of u(n))!b.call(e,i)&&i!==r&&l(e,i,{get:()=>n[i],enumerable:!(c=f(n,i))||c.enumerable});return e};var v=e=>w(l({},"__esModule",{value:!0}),e);var S={};$(S,{autop:()=>R,removep:()=>j});var k=(()=>{let c="(<("+("(?=!--|!\\[CDATA\\[)((?=!-)"+"!(?:-(?!->)[^\\-]*)*(?:-->)?"+"|"+"!\\[CDATA\\[[^\\]]*(?:](?!]>)[^\\]]*)*?(?:]]>)?"+")")+"|[^>]*>?))";return new RegExp(c)})();function O(e){let n=[],r=e,c;for(;c=r.match(k);){let i=c.index;n.push(r.slice(0,i)),n.push(c[0]),r=r.slice(i+c[0].length)}return r.length&&n.push(r),n}function E(e,n){let r=O(e),c=!1,i=Object.keys(n);for(let s=1;s<r.length;s+=2)for(let a=0;a<i.length;a++){let p=i[a];if(r[s].indexOf(p)!==-1){r[s]=r[s].replace(new RegExp(p,"g"),n[p]),c=!0;break}}return c&&(e=r.join("")),e}function R(e,n=!0){let r=[];if(e.trim()==="")return"";if(e=e+`
`,e.indexOf("<pre")!==-1){let s=e.split("</pre>"),a=s.pop();e="";for(let p=0;p<s.length;p++){let o=s[p],g=o.indexOf("<pre");if(g===-1){e+=o;continue}let d="<pre wp-pre-tag-"+p+"></pre>";r.push([d,o.substr(g)+"</pre>"]),e+=o.substr(0,g)+d}e+=a}e=e.replace(/<br\s*\/?>\s*<br\s*\/?>/g,`

`);let c="(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";e=e.replace(new RegExp("(<"+c+"[\\s/>])","g"),`

$1`),e=e.replace(new RegExp("(</"+c+">)","g"),`$1

`),e=e.replace(/\r\n|\r/g,`
`),e=E(e,{"\n":" <!-- wpnl --> "}),e.indexOf("<option")!==-1&&(e=e.replace(/\s*<option/g,"<option"),e=e.replace(/<\/option>\s*/g,"</option>")),e.indexOf("</object>")!==-1&&(e=e.replace(/(<object[^>]*>)\s*/g,"$1"),e=e.replace(/\s*<\/object>/g,"</object>"),e=e.replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/g,"$1")),(e.indexOf("<source")!==-1||e.indexOf("<track")!==-1)&&(e=e.replace(/([<\[](?:audio|video)[^>\]]*[>\]])\s*/g,"$1"),e=e.replace(/\s*([<\[]\/(?:audio|video)[>\]])/g,"$1"),e=e.replace(/\s*(<(?:source|track)[^>]*>)\s*/g,"$1")),e.indexOf("<figcaption")!==-1&&(e=e.replace(/\s*(<figcaption[^>]*>)/,"$1"),e=e.replace(/<\/figcaption>\s*/,"</figcaption>")),e=e.replace(/\n\n+/g,`

`);let i=e.split(/\n\s*\n/).filter(Boolean);return e="",i.forEach(s=>{e+="<p>"+s.replace(/^\n*|\n*$/g,"")+`</p>
`}),e=e.replace(/<p>\s*<\/p>/g,""),e=e.replace(/<p>([^<]+)<\/(div|address|form)>/g,"<p>$1</p></$2>"),e=e.replace(new RegExp("<p>\\s*(</?"+c+"[^>]*>)\\s*</p>","g"),"$1"),e=e.replace(/<p>(<li.+?)<\/p>/g,"$1"),e=e.replace(/<p><blockquote([^>]*)>/gi,"<blockquote$1><p>"),e=e.replace(/<\/blockquote><\/p>/g,"</p></blockquote>"),e=e.replace(new RegExp("<p>\\s*(</?"+c+"[^>]*>)","g"),"$1"),e=e.replace(new RegExp("(</?"+c+"[^>]*>)\\s*</p>","g"),"$1"),n&&(e=e.replace(/<(script|style).*?<\/\\1>/g,s=>s[0].replace(/\n/g,"<WPPreserveNewline />")),e=e.replace(/<br>|<br\/>/g,"<br />"),e=e.replace(/(<br \/>)?\s*\n/g,(s,a)=>a?s:`<br />
`),e=e.replace(/<WPPreserveNewline \/>/g,`
`)),e=e.replace(new RegExp("(</?"+c+"[^>]*>)\\s*<br />","g"),"$1"),e=e.replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g,"$1"),e=e.replace(/\n<\/p>$/g,"</p>"),r.forEach(s=>{let[a,p]=s;e=e.replace(a,()=>p)}),e.indexOf("<!-- wpnl -->")!==-1&&(e=e.replace(/\s?<!-- wpnl -->\s?/g,`
`)),e}function j(e){let n="blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset|figure",r=n+"|div|p",c=n+"|pre",i=[],s=!1,a=!1;return e?((e.indexOf("<script")!==-1||e.indexOf("<style")!==-1)&&(e=e.replace(/<(script|style)[^>]*>[\s\S]*?<\/\1>/g,p=>(i.push(p),"<wp-preserve>"))),e.indexOf("<pre")!==-1&&(s=!0,e=e.replace(/<pre[^>]*>[\s\S]+?<\/pre>/g,p=>(p=p.replace(/<br ?\/?>(\r\n|\n)?/g,"<wp-line-break>"),p=p.replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g,"<wp-line-break>"),p.replace(/\r?\n/g,"<wp-line-break>")))),e.indexOf("[caption")!==-1&&(a=!0,e=e.replace(/\[caption[\s\S]+?\[\/caption\]/g,p=>p.replace(/<br([^>]*)>/g,"<wp-temp-br$1>").replace(/[\r\n\t]+/,""))),e=e.replace(new RegExp("\\s*</("+r+")>\\s*","g"),`</$1>
`),e=e.replace(new RegExp("\\s*<((?:"+r+")(?: [^>]*)?)>","g"),`
<$1>`),e=e.replace(/(<p [^>]+>[\s\S]*?)<\/p>/g,"$1</p#>"),e=e.replace(/<div( [^>]*)?>\s*<p>/gi,`<div$1>

`),e=e.replace(/\s*<p>/gi,""),e=e.replace(/\s*<\/p>\s*/gi,`

`),e=e.replace(/\n[\s\u00a0]+\n/g,`

`),e=e.replace(/(\s*)<br ?\/?>\s*/gi,(p,o)=>o&&o.indexOf(`
`)!==-1?`

`:`
`),e=e.replace(/\s*<div/g,`
<div`),e=e.replace(/<\/div>\s*/g,`</div>
`),e=e.replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi,`

[caption$1[/caption]

`),e=e.replace(/caption\]\n\n+\[caption/g,`caption]

[caption`),e=e.replace(new RegExp("\\s*<((?:"+c+")(?: [^>]*)?)\\s*>","g"),`
<$1>`),e=e.replace(new RegExp("\\s*</("+c+")>\\s*","g"),`</$1>
`),e=e.replace(/<((li|dt|dd)[^>]*)>/g," 	<$1>"),e.indexOf("<option")!==-1&&(e=e.replace(/\s*<option/g,`
<option`),e=e.replace(/\s*<\/select>/g,`
</select>`)),e.indexOf("<hr")!==-1&&(e=e.replace(/\s*<hr( [^>]*)?>\s*/g,`

<hr$1>

`)),e.indexOf("<object")!==-1&&(e=e.replace(/<object[\s\S]+?<\/object>/g,p=>p.replace(/[\r\n]+/g,""))),e=e.replace(/<\/p#>/g,`</p>
`),e=e.replace(/\s*(<p [^>]+>[\s\S]*?<\/p>)/g,`
$1`),e=e.replace(/^\s+/,""),e=e.replace(/[\s\u00a0]+$/,""),s&&(e=e.replace(/<wp-line-break>/g,`
`)),a&&(e=e.replace(/<wp-temp-br([^>]*)>/g,"<br$1>")),i.length&&(e=e.replace(/<wp-preserve>/g,()=>i.shift())),e):""}return v(S);})();
                              dist/base-styles.js                                                                                 0000644                 00000000060 15212563760 0010303 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;
(wp ||= {}).baseStyles = (() => {
})();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                dist/base-styles.min.js                                                                             0000644                 00000000050 15212563760 0011064 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;(wp||={}).baseStyles=(()=>{})();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        dist/blob.js                                                                                        0000644                 00000004463 15212563760 0007001 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).blob = (() => {
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // packages/blob/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    createBlobURL: () => createBlobURL,
    downloadBlob: () => downloadBlob,
    getBlobByURL: () => getBlobByURL,
    getBlobTypeByURL: () => getBlobTypeByURL,
    isBlobURL: () => isBlobURL,
    revokeBlobURL: () => revokeBlobURL
  });
  var cache = {};
  function createBlobURL(file) {
    const url = window.URL.createObjectURL(file);
    cache[url] = file;
    return url;
  }
  function getBlobByURL(url) {
    return cache[url];
  }
  function getBlobTypeByURL(url) {
    return getBlobByURL(url)?.type.split("/")[0];
  }
  function revokeBlobURL(url) {
    if (cache[url]) {
      window.URL.revokeObjectURL(url);
    }
    delete cache[url];
  }
  function isBlobURL(url) {
    if (!url || !url.indexOf) {
      return false;
    }
    return url.indexOf("blob:") === 0;
  }
  function downloadBlob(filename, content, contentType = "") {
    if (!filename || !content) {
      return;
    }
    const file = new window.Blob([content], { type: contentType });
    const url = window.URL.createObjectURL(file);
    const anchorElement = document.createElement("a");
    anchorElement.href = url;
    anchorElement.download = filename;
    anchorElement.style.display = "none";
    document.body.appendChild(anchorElement);
    anchorElement.click();
    document.body.removeChild(anchorElement);
    window.URL.revokeObjectURL(url);
  }
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                             dist/blob.min.js                                                                                    0000644                 00000002201 15212563760 0007547 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).blob=(()=>{var i=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var w=Object.prototype.hasOwnProperty;var L=(e,n)=>{for(var t in n)i(e,t,{get:n[t],enumerable:!0})},R=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of u(n))!w.call(e,o)&&o!==t&&i(e,o,{get:()=>n[o],enumerable:!(r=b(n,o))||r.enumerable});return e};var U=e=>R(i({},"__esModule",{value:!0}),e);var p={};L(p,{createBlobURL:()=>a,downloadBlob:()=>B,getBlobByURL:()=>l,getBlobTypeByURL:()=>f,isBlobURL:()=>y,revokeBlobURL:()=>s});var d={};function a(e){let n=window.URL.createObjectURL(e);return d[n]=e,n}function l(e){return d[e]}function f(e){return l(e)?.type.split("/")[0]}function s(e){d[e]&&window.URL.revokeObjectURL(e),delete d[e]}function y(e){return!e||!e.indexOf?!1:e.indexOf("blob:")===0}function B(e,n,t=""){if(!e||!n)return;let r=new window.Blob([n],{type:t}),o=window.URL.createObjectURL(r),c=document.createElement("a");c.href=o,c.download=e,c.style.display="none",document.body.appendChild(c),c.click(),document.body.removeChild(c),window.URL.revokeObjectURL(o)}return U(p);})();
                                                                                                                                                                                                                                                                                                                                                                                               dist/block-directory.js                                                                             0000644                 00000157256 15212563760 0011170 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;
(wp ||= {}).blockDirectory = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/plugins
  var require_plugins = __commonJS({
    "package-external:@wordpress/plugins"(exports, module) {
      module.exports = window.wp.plugins;
    }
  });

  // package-external:@wordpress/hooks
  var require_hooks = __commonJS({
    "package-external:@wordpress/hooks"(exports, module) {
      module.exports = window.wp.hooks;
    }
  });

  // package-external:@wordpress/blocks
  var require_blocks = __commonJS({
    "package-external:@wordpress/blocks"(exports, module) {
      module.exports = window.wp.blocks;
    }
  });

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/editor
  var require_editor = __commonJS({
    "package-external:@wordpress/editor"(exports, module) {
      module.exports = window.wp.editor;
    }
  });

  // package-external:@wordpress/block-editor
  var require_block_editor = __commonJS({
    "package-external:@wordpress/block-editor"(exports, module) {
      module.exports = window.wp.blockEditor;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // package-external:@wordpress/api-fetch
  var require_api_fetch = __commonJS({
    "package-external:@wordpress/api-fetch"(exports, module) {
      module.exports = window.wp.apiFetch;
    }
  });

  // package-external:@wordpress/notices
  var require_notices = __commonJS({
    "package-external:@wordpress/notices"(exports, module) {
      module.exports = window.wp.notices;
    }
  });

  // package-external:@wordpress/url
  var require_url = __commonJS({
    "package-external:@wordpress/url"(exports, module) {
      module.exports = window.wp.url;
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // package-external:@wordpress/components
  var require_components = __commonJS({
    "package-external:@wordpress/components"(exports, module) {
      module.exports = window.wp.components;
    }
  });

  // package-external:@wordpress/core-data
  var require_core_data = __commonJS({
    "package-external:@wordpress/core-data"(exports, module) {
      module.exports = window.wp.coreData;
    }
  });

  // package-external:@wordpress/html-entities
  var require_html_entities = __commonJS({
    "package-external:@wordpress/html-entities"(exports, module) {
      module.exports = window.wp.htmlEntities;
    }
  });

  // package-external:@wordpress/primitives
  var require_primitives = __commonJS({
    "package-external:@wordpress/primitives"(exports, module) {
      module.exports = window.wp.primitives;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // package-external:@wordpress/a11y
  var require_a11y = __commonJS({
    "package-external:@wordpress/a11y"(exports, module) {
      module.exports = window.wp.a11y;
    }
  });

  // packages/block-directory/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    store: () => store
  });

  // packages/block-directory/build-module/plugins/index.mjs
  var import_plugins = __toESM(require_plugins(), 1);
  var import_hooks = __toESM(require_hooks(), 1);

  // packages/block-directory/build-module/components/auto-block-uninstaller/index.mjs
  var import_blocks2 = __toESM(require_blocks(), 1);
  var import_data4 = __toESM(require_data(), 1);
  var import_element = __toESM(require_element(), 1);
  var import_editor = __toESM(require_editor(), 1);

  // packages/block-directory/build-module/store/index.mjs
  var import_data3 = __toESM(require_data(), 1);

  // packages/block-directory/build-module/store/reducer.mjs
  var import_data = __toESM(require_data(), 1);
  var downloadableBlocks = (state = {}, action) => {
    switch (action.type) {
      case "FETCH_DOWNLOADABLE_BLOCKS":
        return {
          ...state,
          [action.filterValue]: {
            isRequesting: true
          }
        };
      case "RECEIVE_DOWNLOADABLE_BLOCKS":
        return {
          ...state,
          [action.filterValue]: {
            results: action.downloadableBlocks,
            isRequesting: false
          }
        };
    }
    return state;
  };
  var blockManagement = (state = {
    installedBlockTypes: [],
    isInstalling: {}
  }, action) => {
    switch (action.type) {
      case "ADD_INSTALLED_BLOCK_TYPE":
        return {
          ...state,
          installedBlockTypes: [
            ...state.installedBlockTypes,
            action.item
          ]
        };
      case "REMOVE_INSTALLED_BLOCK_TYPE":
        return {
          ...state,
          installedBlockTypes: state.installedBlockTypes.filter(
            (blockType) => blockType.name !== action.item.name
          )
        };
      case "SET_INSTALLING_BLOCK":
        return {
          ...state,
          isInstalling: {
            ...state.isInstalling,
            [action.blockId]: action.isInstalling
          }
        };
    }
    return state;
  };
  var errorNotices = (state = {}, action) => {
    switch (action.type) {
      case "SET_ERROR_NOTICE":
        return {
          ...state,
          [action.blockId]: {
            message: action.message,
            isFatal: action.isFatal
          }
        };
      case "CLEAR_ERROR_NOTICE":
        const { [action.blockId]: blockId, ...restState } = state;
        return restState;
    }
    return state;
  };
  var reducer_default = (0, import_data.combineReducers)({
    downloadableBlocks,
    blockManagement,
    errorNotices
  });

  // packages/block-directory/build-module/store/selectors.mjs
  var selectors_exports = {};
  __export(selectors_exports, {
    getDownloadableBlocks: () => getDownloadableBlocks,
    getErrorNoticeForBlock: () => getErrorNoticeForBlock,
    getErrorNotices: () => getErrorNotices,
    getInstalledBlockTypes: () => getInstalledBlockTypes,
    getNewBlockTypes: () => getNewBlockTypes,
    getUnusedBlockTypes: () => getUnusedBlockTypes,
    isInstalling: () => isInstalling,
    isRequestingDownloadableBlocks: () => isRequestingDownloadableBlocks
  });
  var import_data2 = __toESM(require_data(), 1);
  var import_block_editor = __toESM(require_block_editor(), 1);
  var EMPTY_ARRAY = [];
  function isRequestingDownloadableBlocks(state, filterValue) {
    return state.downloadableBlocks[filterValue]?.isRequesting ?? false;
  }
  function getDownloadableBlocks(state, filterValue) {
    return state.downloadableBlocks[filterValue]?.results ?? EMPTY_ARRAY;
  }
  function getInstalledBlockTypes(state) {
    return state.blockManagement.installedBlockTypes;
  }
  var getNewBlockTypes = (0, import_data2.createRegistrySelector)(
    (select) => (0, import_data2.createSelector)(
      (state) => {
        const installedBlockTypes = getInstalledBlockTypes(state);
        if (!installedBlockTypes.length) {
          return EMPTY_ARRAY;
        }
        const { getBlockName, getClientIdsWithDescendants } = select(import_block_editor.store);
        const installedBlockNames = installedBlockTypes.map(
          (blockType) => blockType.name
        );
        const foundBlockNames = getClientIdsWithDescendants().flatMap(
          (clientId) => {
            const blockName = getBlockName(clientId);
            return installedBlockNames.includes(blockName) ? blockName : [];
          }
        );
        const newBlockTypes = installedBlockTypes.filter(
          (blockType) => foundBlockNames.includes(blockType.name)
        );
        return newBlockTypes.length > 0 ? newBlockTypes : EMPTY_ARRAY;
      },
      (state) => [
        getInstalledBlockTypes(state),
        select(import_block_editor.store).getClientIdsWithDescendants()
      ]
    )
  );
  var getUnusedBlockTypes = (0, import_data2.createRegistrySelector)(
    (select) => (0, import_data2.createSelector)(
      (state) => {
        const installedBlockTypes = getInstalledBlockTypes(state);
        if (!installedBlockTypes.length) {
          return EMPTY_ARRAY;
        }
        const { getBlockName, getClientIdsWithDescendants } = select(import_block_editor.store);
        const installedBlockNames = installedBlockTypes.map(
          (blockType) => blockType.name
        );
        const foundBlockNames = getClientIdsWithDescendants().flatMap(
          (clientId) => {
            const blockName = getBlockName(clientId);
            return installedBlockNames.includes(blockName) ? blockName : [];
          }
        );
        const unusedBlockTypes = installedBlockTypes.filter(
          (blockType) => !foundBlockNames.includes(blockType.name)
        );
        return unusedBlockTypes.length > 0 ? unusedBlockTypes : EMPTY_ARRAY;
      },
      (state) => [
        getInstalledBlockTypes(state),
        select(import_block_editor.store).getClientIdsWithDescendants()
      ]
    )
  );
  function isInstalling(state, blockId) {
    return state.blockManagement.isInstalling[blockId] || false;
  }
  function getErrorNotices(state) {
    return state.errorNotices;
  }
  function getErrorNoticeForBlock(state, blockId) {
    return state.errorNotices[blockId];
  }

  // packages/block-directory/build-module/store/actions.mjs
  var actions_exports = {};
  __export(actions_exports, {
    addInstalledBlockType: () => addInstalledBlockType,
    clearErrorNotice: () => clearErrorNotice,
    fetchDownloadableBlocks: () => fetchDownloadableBlocks,
    installBlockType: () => installBlockType,
    receiveDownloadableBlocks: () => receiveDownloadableBlocks,
    removeInstalledBlockType: () => removeInstalledBlockType,
    setErrorNotice: () => setErrorNotice,
    setIsInstalling: () => setIsInstalling,
    uninstallBlockType: () => uninstallBlockType
  });
  var import_blocks = __toESM(require_blocks(), 1);
  var import_i18n = __toESM(require_i18n(), 1);
  var import_api_fetch2 = __toESM(require_api_fetch(), 1);
  var import_notices = __toESM(require_notices(), 1);
  var import_url = __toESM(require_url(), 1);

  // packages/block-directory/build-module/store/load-assets.mjs
  var import_api_fetch = __toESM(require_api_fetch(), 1);
  var loadAsset = (el) => {
    return new Promise((resolve, reject) => {
      const newNode = document.createElement(el.nodeName);
      ["id", "rel", "src", "href", "type"].forEach((attr) => {
        if (el[attr]) {
          newNode[attr] = el[attr];
        }
      });
      if (el.innerHTML) {
        newNode.appendChild(document.createTextNode(el.innerHTML));
      }
      newNode.onload = () => resolve(true);
      newNode.onerror = () => reject(new Error("Error loading asset."));
      document.body.appendChild(newNode);
      if ("link" === newNode.nodeName.toLowerCase() || "script" === newNode.nodeName.toLowerCase() && !newNode.src) {
        resolve();
      }
    });
  };
  async function loadAssets() {
    const response = await (0, import_api_fetch.default)({
      url: document.location.href,
      parse: false
    });
    const data = await response.text();
    const doc = new window.DOMParser().parseFromString(data, "text/html");
    const newAssets = Array.from(
      doc.querySelectorAll('link[rel="stylesheet"],script')
    ).filter((asset) => asset.id && !document.getElementById(asset.id));
    for (const newAsset of newAssets) {
      await loadAsset(newAsset);
    }
  }

  // packages/block-directory/build-module/store/utils/get-plugin-url.mjs
  function getPluginUrl(block) {
    if (!block) {
      return false;
    }
    const link = block.links["wp:plugin"] || block.links.self;
    if (link && link.length) {
      return link[0].href;
    }
    return false;
  }

  // packages/block-directory/build-module/store/actions.mjs
  function fetchDownloadableBlocks(filterValue) {
    return { type: "FETCH_DOWNLOADABLE_BLOCKS", filterValue };
  }
  function receiveDownloadableBlocks(downloadableBlocks2, filterValue) {
    return {
      type: "RECEIVE_DOWNLOADABLE_BLOCKS",
      downloadableBlocks: downloadableBlocks2,
      filterValue
    };
  }
  var installBlockType = (block) => async ({ registry, dispatch }) => {
    const { id, name } = block;
    let success = false;
    dispatch.clearErrorNotice(id);
    try {
      dispatch.setIsInstalling(id, true);
      const url = getPluginUrl(block);
      let links = {};
      if (url) {
        await (0, import_api_fetch2.default)({
          method: "PUT",
          url,
          data: { status: "active" }
        });
      } else {
        const response = await (0, import_api_fetch2.default)({
          method: "POST",
          path: "wp/v2/plugins",
          data: { slug: id, status: "active" }
        });
        links = response._links;
      }
      dispatch.addInstalledBlockType({
        ...block,
        links: { ...block.links, ...links }
      });
      const metadataFields = [
        "api_version",
        "title",
        "category",
        "parent",
        "ancestor",
        "icon",
        "description",
        "keywords",
        "attributes",
        "provides_context",
        "uses_context",
        "selectors",
        "supports",
        "styles",
        "example",
        "variations",
        "allowed_blocks",
        "block_hooks"
      ];
      await (0, import_api_fetch2.default)({
        path: (0, import_url.addQueryArgs)(`/wp/v2/block-types/${name}`, {
          _fields: metadataFields
        })
      }).catch(() => {
      }).then((response) => {
        if (!response) {
          return;
        }
        (0, import_blocks.unstable__bootstrapServerSideBlockDefinitions)({
          [name]: Object.fromEntries(
            Object.entries(response).filter(
              ([key]) => metadataFields.includes(key)
            )
          )
        });
      });
      await loadAssets();
      const registeredBlocks = registry.select(import_blocks.store).getBlockTypes();
      if (!registeredBlocks.some((i) => i.name === name)) {
        throw new Error(
          (0, import_i18n.__)("Error registering block. Try reloading the page.")
        );
      }
      registry.dispatch(import_notices.store).createInfoNotice(
        (0, import_i18n.sprintf)(
          // translators: %s is the block title.
          (0, import_i18n.__)("Block %s installed and added."),
          block.title
        ),
        {
          speak: true,
          type: "snackbar"
        }
      );
      success = true;
    } catch (error) {
      let message = error.message || (0, import_i18n.__)("An error occurred.");
      let isFatal = error instanceof Error;
      const fatalAPIErrors = {
        folder_exists: (0, import_i18n.__)(
          "This block is already installed. Try reloading the page."
        ),
        unable_to_connect_to_filesystem: (0, import_i18n.__)(
          "Error installing block. You can reload the page and try again."
        )
      };
      if (fatalAPIErrors[error.code]) {
        isFatal = true;
        message = fatalAPIErrors[error.code];
      }
      dispatch.setErrorNotice(id, message, isFatal);
      registry.dispatch(import_notices.store).createErrorNotice(message, {
        speak: true,
        isDismissible: true
      });
    }
    dispatch.setIsInstalling(id, false);
    return success;
  };
  var uninstallBlockType = (block) => async ({ registry, dispatch }) => {
    try {
      const url = getPluginUrl(block);
      await (0, import_api_fetch2.default)({
        method: "PUT",
        url,
        data: { status: "inactive" }
      });
      await (0, import_api_fetch2.default)({
        method: "DELETE",
        url
      });
      dispatch.removeInstalledBlockType(block);
    } catch (error) {
      registry.dispatch(import_notices.store).createErrorNotice(
        error.message || (0, import_i18n.__)("An error occurred.")
      );
    }
  };
  function addInstalledBlockType(item) {
    return {
      type: "ADD_INSTALLED_BLOCK_TYPE",
      item
    };
  }
  function removeInstalledBlockType(item) {
    return {
      type: "REMOVE_INSTALLED_BLOCK_TYPE",
      item
    };
  }
  function setIsInstalling(blockId, isInstalling2) {
    return {
      type: "SET_INSTALLING_BLOCK",
      blockId,
      isInstalling: isInstalling2
    };
  }
  function setErrorNotice(blockId, message, isFatal = false) {
    return {
      type: "SET_ERROR_NOTICE",
      blockId,
      message,
      isFatal
    };
  }
  function clearErrorNotice(blockId) {
    return {
      type: "CLEAR_ERROR_NOTICE",
      blockId
    };
  }

  // packages/block-directory/build-module/store/resolvers.mjs
  var resolvers_exports = {};
  __export(resolvers_exports, {
    getDownloadableBlocks: () => getDownloadableBlocks2
  });

  // node_modules/tslib/tslib.es6.mjs
  var __assign = function() {
    __assign = Object.assign || function __assign2(t) {
      for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
      }
      return t;
    };
    return __assign.apply(this, arguments);
  };

  // node_modules/lower-case/dist.es2015/index.js
  function lowerCase(str) {
    return str.toLowerCase();
  }

  // node_modules/no-case/dist.es2015/index.js
  var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
  var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
  function noCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    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;
    var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
    var start = 0;
    var end = result.length;
    while (result.charAt(start) === "\0")
      start++;
    while (result.charAt(end - 1) === "\0")
      end--;
    return result.slice(start, end).split("\0").map(transform).join(delimiter);
  }
  function replace(input, re, value) {
    if (re instanceof RegExp)
      return input.replace(re, value);
    return re.reduce(function(input2, re2) {
      return input2.replace(re2, value);
    }, input);
  }

  // node_modules/pascal-case/dist.es2015/index.js
  function pascalCaseTransform(input, index) {
    var firstChar = input.charAt(0);
    var lowerChars = input.substr(1).toLowerCase();
    if (index > 0 && firstChar >= "0" && firstChar <= "9") {
      return "_" + firstChar + lowerChars;
    }
    return "" + firstChar.toUpperCase() + lowerChars;
  }
  function pascalCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    return noCase(input, __assign({ delimiter: "", transform: pascalCaseTransform }, options));
  }

  // node_modules/camel-case/dist.es2015/index.js
  function camelCaseTransform(input, index) {
    if (index === 0)
      return input.toLowerCase();
    return pascalCaseTransform(input, index);
  }
  function camelCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    return pascalCase(input, __assign({ transform: camelCaseTransform }, options));
  }

  // packages/block-directory/build-module/store/resolvers.mjs
  var import_api_fetch3 = __toESM(require_api_fetch(), 1);
  var getDownloadableBlocks2 = (filterValue) => async ({ dispatch }) => {
    if (!filterValue) {
      return;
    }
    try {
      dispatch(fetchDownloadableBlocks(filterValue));
      const results = await (0, import_api_fetch3.default)({
        path: `wp/v2/block-directory/search?term=${filterValue}`
      });
      const blocks = results.map(
        (result) => Object.fromEntries(
          Object.entries(result).map(([key, value]) => [
            camelCase(key),
            value
          ])
        )
      );
      dispatch(receiveDownloadableBlocks(blocks, filterValue));
    } catch {
      dispatch(receiveDownloadableBlocks([], filterValue));
    }
  };

  // packages/block-directory/build-module/store/index.mjs
  var STORE_NAME = "core/block-directory";
  var storeConfig = {
    reducer: reducer_default,
    selectors: selectors_exports,
    actions: actions_exports,
    resolvers: resolvers_exports
  };
  var store = (0, import_data3.createReduxStore)(STORE_NAME, storeConfig);
  (0, import_data3.register)(store);

  // packages/block-directory/build-module/components/auto-block-uninstaller/index.mjs
  function AutoBlockUninstaller() {
    const { uninstallBlockType: uninstallBlockType2 } = (0, import_data4.useDispatch)(store);
    const shouldRemoveBlockTypes = (0, import_data4.useSelect)((select) => {
      const { isAutosavingPost, isSavingPost } = select(import_editor.store);
      return isSavingPost() && !isAutosavingPost();
    }, []);
    const unusedBlockTypes = (0, import_data4.useSelect)(
      (select) => select(store).getUnusedBlockTypes(),
      []
    );
    (0, import_element.useEffect)(() => {
      if (shouldRemoveBlockTypes && unusedBlockTypes.length) {
        unusedBlockTypes.forEach((blockType) => {
          uninstallBlockType2(blockType);
          (0, import_blocks2.unregisterBlockType)(blockType.name);
        });
      }
    }, [shouldRemoveBlockTypes]);
    return null;
  }

  // packages/block-directory/build-module/plugins/inserter-menu-downloadable-blocks-panel/index.mjs
  var import_block_editor3 = __toESM(require_block_editor(), 1);
  var import_compose = __toESM(require_compose(), 1);
  var import_element5 = __toESM(require_element(), 1);

  // packages/block-directory/build-module/components/downloadable-blocks-panel/index.mjs
  var import_i18n8 = __toESM(require_i18n(), 1);
  var import_components4 = __toESM(require_components(), 1);
  var import_core_data = __toESM(require_core_data(), 1);
  var import_data8 = __toESM(require_data(), 1);
  var import_blocks5 = __toESM(require_blocks(), 1);

  // packages/block-directory/build-module/components/downloadable-blocks-list/index.mjs
  var import_i18n5 = __toESM(require_i18n(), 1);
  var import_components2 = __toESM(require_components(), 1);
  var import_blocks4 = __toESM(require_blocks(), 1);
  var import_data7 = __toESM(require_data(), 1);

  // node_modules/clsx/dist/clsx.mjs
  function 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 = 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 = r(e)) && (n && (n += " "), n += t);
    return n;
  }
  var clsx_default = clsx;

  // packages/block-directory/build-module/components/downloadable-block-list-item/index.mjs
  var import_i18n4 = __toESM(require_i18n(), 1);
  var import_components = __toESM(require_components(), 1);
  var import_element3 = __toESM(require_element(), 1);
  var import_html_entities = __toESM(require_html_entities(), 1);
  var import_blocks3 = __toESM(require_blocks(), 1);
  var import_data6 = __toESM(require_data(), 1);

  // packages/block-directory/build-module/components/block-ratings/stars.mjs
  var import_i18n2 = __toESM(require_i18n(), 1);

  // packages/icons/build-module/icon/index.mjs
  var import_element2 = __toESM(require_element(), 1);
  var icon_default = (0, import_element2.forwardRef)(
    ({ icon, size = 24, ...props }, ref) => {
      return (0, import_element2.cloneElement)(icon, {
        width: size,
        height: size,
        ...props,
        ref
      });
    }
  );

  // packages/icons/build-module/library/star-empty.mjs
  var import_primitives = __toESM(require_primitives(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  var star_empty_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/star-filled.mjs
  var import_primitives2 = __toESM(require_primitives(), 1);
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  var star_filled_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.Path, { 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" }) });

  // packages/icons/build-module/library/star-half.mjs
  var import_primitives3 = __toESM(require_primitives(), 1);
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
  var star_half_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.Path, { d: "M9.518 8.783a.25.25 0 00.188-.137l2.069-4.192a.25.25 0 01.448 0l2.07 4.192a.25.25 0 00.187.137l4.626.672a.25.25 0 01.139.427l-3.347 3.262a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.363.264l-4.137-2.176a.25.25 0 00-.233 0l-4.138 2.175a.25.25 0 01-.362-.263l.79-4.607a.25.25 0 00-.072-.222L4.753 9.882a.25.25 0 01.14-.427l4.625-.672zM12 14.533c.28 0 .559.067.814.2l1.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.39v7.143z" }) });

  // packages/block-directory/build-module/components/block-ratings/stars.mjs
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
  function Stars({ rating }) {
    const stars = Math.round(rating / 0.5) * 0.5;
    const fullStarCount = Math.floor(rating);
    const halfStarCount = Math.ceil(rating - fullStarCount);
    const emptyStarCount = 5 - (fullStarCount + halfStarCount);
    return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
      "span",
      {
        "aria-label": (0, import_i18n2.sprintf)(
          /* translators: %s: number of stars. */
          (0, import_i18n2.__)("%s out of 5 stars"),
          stars
        ),
        children: [
          Array.from({ length: fullStarCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
            icon_default,
            {
              className: "block-directory-block-ratings__star-full",
              icon: star_filled_default,
              size: 16
            },
            `full_stars_${i}`
          )),
          Array.from({ length: halfStarCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
            icon_default,
            {
              className: "block-directory-block-ratings__star-half-full",
              icon: star_half_default,
              size: 16
            },
            `half_stars_${i}`
          )),
          Array.from({ length: emptyStarCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
            icon_default,
            {
              className: "block-directory-block-ratings__star-empty",
              icon: star_empty_default,
              size: 16
            },
            `empty_stars_${i}`
          ))
        ]
      }
    );
  }
  var stars_default = Stars;

  // packages/block-directory/build-module/components/block-ratings/index.mjs
  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
  var BlockRatings = ({ rating }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "block-directory-block-ratings", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(stars_default, { rating }) });
  var block_ratings_default = BlockRatings;

  // packages/block-directory/build-module/components/downloadable-block-icon/index.mjs
  var import_block_editor2 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
  function DownloadableBlockIcon({ icon }) {
    const className = "block-directory-downloadable-block-icon";
    return icon.match(/\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/) !== null ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("img", { className, src: icon, alt: "" }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_block_editor2.BlockIcon, { className, icon, showColors: true });
  }
  var downloadable_block_icon_default = DownloadableBlockIcon;

  // packages/block-directory/build-module/components/downloadable-block-notice/index.mjs
  var import_i18n3 = __toESM(require_i18n(), 1);
  var import_data5 = __toESM(require_data(), 1);
  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
  var DownloadableBlockNotice = ({ block }) => {
    const errorNotice = (0, import_data5.useSelect)(
      (select) => select(store).getErrorNoticeForBlock(block.id),
      [block]
    );
    if (!errorNotice) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "block-directory-downloadable-block-notice", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "block-directory-downloadable-block-notice__content", children: [
      errorNotice.message,
      errorNotice.isFatal ? " " + (0, import_i18n3.__)("Try reloading the page.") : null
    ] }) });
  };
  var downloadable_block_notice_default = DownloadableBlockNotice;

  // packages/block-directory/build-module/components/downloadable-block-list-item/index.mjs
  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
  function getDownloadableBlockLabel({ title, rating, ratingCount }, { hasNotice, isInstalled, isInstalling: isInstalling2 }) {
    const stars = Math.round(rating / 0.5) * 0.5;
    if (!isInstalled && hasNotice) {
      return (0, import_i18n4.sprintf)("Retry installing %s.", (0, import_html_entities.decodeEntities)(title));
    }
    if (isInstalled) {
      return (0, import_i18n4.sprintf)("Add %s.", (0, import_html_entities.decodeEntities)(title));
    }
    if (isInstalling2) {
      return (0, import_i18n4.sprintf)("Installing %s.", (0, import_html_entities.decodeEntities)(title));
    }
    if (ratingCount < 1) {
      return (0, import_i18n4.sprintf)("Install %s.", (0, import_html_entities.decodeEntities)(title));
    }
    return (0, import_i18n4.sprintf)(
      /* translators: 1: block title, 2: average rating, 3: total ratings count. */
      (0, import_i18n4._n)(
        "Install %1$s. %2$s stars with %3$s review.",
        "Install %1$s. %2$s stars with %3$s reviews.",
        ratingCount
      ),
      (0, import_html_entities.decodeEntities)(title),
      stars,
      ratingCount
    );
  }
  function DownloadableBlockListItem({ item, onClick }) {
    const { author, description, icon, rating, title } = item;
    const isInstalled = !!(0, import_blocks3.getBlockType)(item.name);
    const { hasNotice, isInstalling: isInstalling2, isInstallable } = (0, import_data6.useSelect)(
      (select) => {
        const { getErrorNoticeForBlock: getErrorNoticeForBlock2, isInstalling: isBlockInstalling } = select(store);
        const notice = getErrorNoticeForBlock2(item.id);
        const hasFatal = notice && notice.isFatal;
        return {
          hasNotice: !!notice,
          isInstalling: isBlockInstalling(item.id),
          isInstallable: !hasFatal
        };
      },
      [item]
    );
    let statusText = "";
    if (isInstalled) {
      statusText = (0, import_i18n4.__)("Installed!");
    } else if (isInstalling2) {
      statusText = (0, import_i18n4.__)("Installing\u2026");
    }
    const itemLabel = getDownloadableBlockLabel(item, {
      hasNotice,
      isInstalled,
      isInstalling: isInstalling2
    });
    return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_components.Tooltip, { placement: "top", text: itemLabel, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
      import_components.Composite.Item,
      {
        className: clsx_default(
          "block-directory-downloadable-block-list-item",
          isInstalling2 && "is-installing"
        ),
        accessibleWhenDisabled: true,
        disabled: isInstalling2 || !isInstallable,
        onClick: (event) => {
          event.preventDefault();
          onClick();
        },
        "aria-label": itemLabel,
        type: "button",
        role: "option",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "block-directory-downloadable-block-list-item__icon", children: [
            /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(downloadable_block_icon_default, { icon, title }),
            isInstalling2 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "block-directory-downloadable-block-list-item__spinner", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_components.Spinner, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(block_ratings_default, { rating })
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "block-directory-downloadable-block-list-item__details", children: [
            /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "block-directory-downloadable-block-list-item__title", children: (0, import_element3.createInterpolateElement)(
              (0, import_i18n4.sprintf)(
                /* translators: 1: block title. 2: author name. */
                (0, import_i18n4.__)("%1$s <span>by %2$s</span>"),
                (0, import_html_entities.decodeEntities)(title),
                author
              ),
              {
                span: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "block-directory-downloadable-block-list-item__author" })
              }
            ) }),
            hasNotice ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(downloadable_block_notice_default, { block: item }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "block-directory-downloadable-block-list-item__desc", children: !!statusText ? statusText : (0, import_html_entities.decodeEntities)(description) }),
              isInstallable && !(isInstalled || isInstalling2) && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_components.VisuallyHidden, { children: (0, import_i18n4.__)("Install block") })
            ] })
          ] })
        ]
      }
    ) });
  }
  var downloadable_block_list_item_default = DownloadableBlockListItem;

  // packages/block-directory/build-module/components/downloadable-blocks-list/index.mjs
  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
  var noop = () => {
  };
  function DownloadableBlocksList({ items, onHover = noop, onSelect }) {
    const { installBlockType: installBlockType2 } = (0, import_data7.useDispatch)(store);
    if (!items.length) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
      import_components2.Composite,
      {
        role: "listbox",
        className: "block-directory-downloadable-blocks-list",
        "aria-label": (0, import_i18n5.__)("Blocks available for install"),
        children: items.map((item) => {
          return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
            downloadable_block_list_item_default,
            {
              onClick: () => {
                if ((0, import_blocks4.getBlockType)(item.name)) {
                  onSelect(item);
                } else {
                  installBlockType2(item).then((success) => {
                    if (success) {
                      onSelect(item);
                    }
                  });
                }
                onHover(null);
              },
              onHover,
              item
            },
            item.id
          );
        })
      }
    );
  }
  var downloadable_blocks_list_default = DownloadableBlocksList;

  // packages/block-directory/build-module/components/downloadable-blocks-panel/inserter-panel.mjs
  var import_i18n6 = __toESM(require_i18n(), 1);
  var import_element4 = __toESM(require_element(), 1);
  var import_a11y = __toESM(require_a11y(), 1);
  var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
  function DownloadableBlocksInserterPanel({
    children,
    downloadableItems,
    hasLocalBlocks
  }) {
    const count = downloadableItems.length;
    (0, import_element4.useEffect)(() => {
      (0, import_a11y.speak)(
        (0, import_i18n6.sprintf)(
          /* translators: %d: number of available blocks. */
          (0, import_i18n6._n)(
            "%d additional block is available to install.",
            "%d additional blocks are available to install.",
            count
          ),
          count
        )
      );
    }, [count]);
    return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
      !hasLocalBlocks && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "block-directory-downloadable-blocks-panel__no-local", children: (0, import_i18n6.__)("No results available from your installed blocks.") }),
      /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "block-editor-inserter__quick-inserter-separator" }),
      /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "block-directory-downloadable-blocks-panel", children: [
        /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "block-directory-downloadable-blocks-panel__header", children: [
          /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h2", { className: "block-directory-downloadable-blocks-panel__title", children: (0, import_i18n6.__)("Available to install") }),
          /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "block-directory-downloadable-blocks-panel__description", children: (0, import_i18n6.__)(
            "Select a block to install and add it to your post."
          ) })
        ] }),
        children
      ] })
    ] });
  }
  var inserter_panel_default = DownloadableBlocksInserterPanel;

  // packages/block-directory/build-module/components/downloadable-blocks-panel/no-results.mjs
  var import_i18n7 = __toESM(require_i18n(), 1);
  var import_components3 = __toESM(require_components(), 1);
  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
  function DownloadableBlocksNoResults() {
    return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "block-editor-inserter__no-results", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { children: (0, import_i18n7.__)("No results found.") }) }),
      /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "block-editor-inserter__tips", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_components3.Tip, { children: [
        (0, import_i18n7.__)("Interested in creating your own block?"),
        /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("br", {}),
        /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_components3.ExternalLink, { href: "https://developer.wordpress.org/block-editor/", children: [
          (0, import_i18n7.__)("Get started here"),
          "."
        ] })
      ] }) })
    ] });
  }
  var no_results_default = DownloadableBlocksNoResults;

  // packages/block-directory/build-module/components/downloadable-blocks-panel/index.mjs
  var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_ARRAY2 = [];
  var useDownloadableBlocks = (filterValue) => (0, import_data8.useSelect)(
    (select) => {
      const {
        getDownloadableBlocks: getDownloadableBlocks3,
        isRequestingDownloadableBlocks: isRequestingDownloadableBlocks2,
        getInstalledBlockTypes: getInstalledBlockTypes2
      } = select(store);
      const hasPermission = select(import_core_data.store).canUser(
        "read",
        "block-directory/search"
      );
      let downloadableBlocks2 = EMPTY_ARRAY2;
      if (hasPermission) {
        downloadableBlocks2 = getDownloadableBlocks3(filterValue);
        const installedBlockTypes = getInstalledBlockTypes2();
        const installableBlocks = downloadableBlocks2.filter(
          ({ name }) => {
            const isJustInstalled = installedBlockTypes.some(
              (blockType) => blockType.name === name
            );
            const isPreviouslyInstalled = (0, import_blocks5.getBlockType)(name);
            return isJustInstalled || !isPreviouslyInstalled;
          }
        );
        if (installableBlocks.length !== downloadableBlocks2.length) {
          downloadableBlocks2 = installableBlocks;
        }
        if (downloadableBlocks2.length === 0) {
          downloadableBlocks2 = EMPTY_ARRAY2;
        }
      }
      return {
        hasPermission,
        downloadableBlocks: downloadableBlocks2,
        isLoading: isRequestingDownloadableBlocks2(filterValue)
      };
    },
    [filterValue]
  );
  function DownloadableBlocksPanel({
    onSelect,
    onHover,
    hasLocalBlocks,
    isTyping,
    filterValue
  }) {
    const { hasPermission, downloadableBlocks: downloadableBlocks2, isLoading } = useDownloadableBlocks(filterValue);
    if (hasPermission === void 0 || isLoading || isTyping) {
      return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
        hasPermission && !hasLocalBlocks && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "block-directory-downloadable-blocks-panel__no-local", children: (0, import_i18n8.__)(
            "No results available from your installed blocks."
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "block-editor-inserter__quick-inserter-separator" })
        ] }),
        /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "block-directory-downloadable-blocks-panel has-blocks-loading", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_components4.Spinner, {}) })
      ] });
    }
    if (false === hasPermission) {
      if (!hasLocalBlocks) {
        return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(no_results_default, {});
      }
      return null;
    }
    if (downloadableBlocks2.length === 0) {
      return hasLocalBlocks ? null : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(no_results_default, {});
    }
    return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
      inserter_panel_default,
      {
        downloadableItems: downloadableBlocks2,
        hasLocalBlocks,
        children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
          downloadable_blocks_list_default,
          {
            items: downloadableBlocks2,
            onSelect,
            onHover
          }
        )
      }
    );
  }

  // packages/block-directory/build-module/plugins/inserter-menu-downloadable-blocks-panel/index.mjs
  var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
  function InserterMenuDownloadableBlocksPanel() {
    const [debouncedFilterValue, setFilterValue] = (0, import_element5.useState)("");
    const debouncedSetFilterValue = (0, import_compose.debounce)(setFilterValue, 400);
    return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_block_editor3.__unstableInserterMenuExtension, { children: ({ onSelect, onHover, filterValue, hasItems }) => {
      if (debouncedFilterValue !== filterValue) {
        debouncedSetFilterValue(filterValue);
      }
      if (!debouncedFilterValue) {
        return null;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
        DownloadableBlocksPanel,
        {
          onSelect,
          onHover,
          filterValue: debouncedFilterValue,
          hasLocalBlocks: hasItems,
          isTyping: filterValue !== debouncedFilterValue
        }
      );
    } });
  }
  var inserter_menu_downloadable_blocks_panel_default = InserterMenuDownloadableBlocksPanel;

  // packages/block-directory/build-module/plugins/installed-blocks-pre-publish-panel/index.mjs
  var import_i18n10 = __toESM(require_i18n(), 1);
  var import_data9 = __toESM(require_data(), 1);
  var import_editor2 = __toESM(require_editor(), 1);

  // packages/block-directory/build-module/components/compact-list/index.mjs
  var import_i18n9 = __toESM(require_i18n(), 1);
  var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
  function CompactList({ items }) {
    if (!items.length) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: "block-directory-compact-list", children: items.map(({ icon, id, title, author }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("li", { className: "block-directory-compact-list__item", children: [
      /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(downloadable_block_icon_default, { icon, title }),
      /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "block-directory-compact-list__item-details", children: [
        /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "block-directory-compact-list__item-title", children: title }),
        /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "block-directory-compact-list__item-author", children: (0, import_i18n9.sprintf)(
          /* translators: %s: Name of the block author. */
          (0, import_i18n9.__)("By %s"),
          author
        ) })
      ] })
    ] }, id)) });
  }

  // packages/block-directory/build-module/plugins/installed-blocks-pre-publish-panel/index.mjs
  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
  function InstalledBlocksPrePublishPanel() {
    const newBlockTypes = (0, import_data9.useSelect)(
      (select) => select(store).getNewBlockTypes(),
      []
    );
    if (!newBlockTypes.length) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
      import_editor2.PluginPrePublishPanel,
      {
        title: (0, import_i18n10.sprintf)(
          // translators: %d: number of blocks (number).
          (0, import_i18n10._n)(
            "Added: %d block",
            "Added: %d blocks",
            newBlockTypes.length
          ),
          newBlockTypes.length
        ),
        initialOpen: true,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "installed-blocks-pre-publish-panel__copy", children: (0, import_i18n10._n)(
            "The following block has been added to your site.",
            "The following blocks have been added to your site.",
            newBlockTypes.length
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CompactList, { items: newBlockTypes })
        ]
      }
    );
  }

  // packages/block-directory/build-module/plugins/get-install-missing/index.mjs
  var import_i18n12 = __toESM(require_i18n(), 1);
  var import_components6 = __toESM(require_components(), 1);
  var import_blocks7 = __toESM(require_blocks(), 1);
  var import_element6 = __toESM(require_element(), 1);
  var import_data11 = __toESM(require_data(), 1);
  var import_core_data2 = __toESM(require_core_data(), 1);
  var import_block_editor5 = __toESM(require_block_editor(), 1);

  // packages/block-directory/build-module/plugins/get-install-missing/install-button.mjs
  var import_i18n11 = __toESM(require_i18n(), 1);
  var import_components5 = __toESM(require_components(), 1);
  var import_blocks6 = __toESM(require_blocks(), 1);
  var import_data10 = __toESM(require_data(), 1);
  var import_block_editor4 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
  function InstallButton({ attributes, block, clientId }) {
    const isInstallingBlock = (0, import_data10.useSelect)(
      (select) => select(store).isInstalling(block.id),
      [block.id]
    );
    const { installBlockType: installBlockType2 } = (0, import_data10.useDispatch)(store);
    const { replaceBlock } = (0, import_data10.useDispatch)(import_block_editor4.store);
    return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
      import_components5.Button,
      {
        __next40pxDefaultSize: true,
        onClick: () => installBlockType2(block).then((success) => {
          if (success) {
            const blockType = (0, import_blocks6.getBlockType)(block.name);
            const [originalBlock] = (0, import_blocks6.parse)(
              attributes.originalContent
            );
            if (originalBlock && blockType) {
              replaceBlock(
                clientId,
                (0, import_blocks6.createBlock)(
                  blockType.name,
                  originalBlock.attributes,
                  originalBlock.innerBlocks
                )
              );
            }
          }
        }),
        accessibleWhenDisabled: true,
        disabled: isInstallingBlock,
        isBusy: isInstallingBlock,
        variant: "primary",
        children: (0, import_i18n11.sprintf)(
          /* translators: %s: block name */
          (0, import_i18n11.__)("Install %s"),
          block.title
        )
      }
    );
  }

  // packages/block-directory/build-module/plugins/get-install-missing/index.mjs
  var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
  var getInstallMissing = (OriginalComponent) => (props) => {
    const { originalName } = props.attributes;
    const { block, hasPermission } = (0, import_data11.useSelect)(
      (select) => {
        const { getDownloadableBlocks: getDownloadableBlocks3 } = select(store);
        const blocks = getDownloadableBlocks3(
          "block:" + originalName
        ).filter(({ name }) => originalName === name);
        return {
          hasPermission: select(import_core_data2.store).canUser(
            "read",
            "block-directory/search"
          ),
          block: blocks.length && blocks[0]
        };
      },
      [originalName]
    );
    if (!hasPermission || !block) {
      return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(OriginalComponent, { ...props });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ModifiedWarning, { ...props, originalBlock: block });
  };
  var ModifiedWarning = ({ originalBlock, ...props }) => {
    const { originalName, originalUndelimitedContent, clientId } = props.attributes;
    const { replaceBlock } = (0, import_data11.useDispatch)(import_block_editor5.store);
    const convertToHTML = () => {
      replaceBlock(
        props.clientId,
        (0, import_blocks7.createBlock)("core/html", {
          content: originalUndelimitedContent
        })
      );
    };
    const hasContent = !!originalUndelimitedContent;
    const hasHTMLBlock = (0, import_data11.useSelect)(
      (select) => {
        const { canInsertBlockType, getBlockRootClientId } = select(import_block_editor5.store);
        return canInsertBlockType(
          "core/html",
          getBlockRootClientId(clientId)
        );
      },
      [clientId]
    );
    let messageHTML = (0, import_i18n12.sprintf)(
      /* translators: %s: block name */
      (0, import_i18n12.__)(
        "Your site doesn\u2019t include support for the %s block. You can try installing the block or remove it entirely."
      ),
      originalBlock.title || originalName
    );
    const actions = [
      /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
        InstallButton,
        {
          block: originalBlock,
          attributes: props.attributes,
          clientId: props.clientId
        },
        "install"
      )
    ];
    if (hasContent && hasHTMLBlock) {
      messageHTML = (0, import_i18n12.sprintf)(
        /* translators: %s: block name */
        (0, import_i18n12.__)(
          "Your site doesn\u2019t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely."
        ),
        originalBlock.title || originalName
      );
      actions.push(
        /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
          import_components6.Button,
          {
            __next40pxDefaultSize: true,
            onClick: convertToHTML,
            variant: "tertiary",
            children: (0, import_i18n12.__)("Keep as HTML")
          },
          "convert"
        )
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { ...(0, import_block_editor5.useBlockProps)(), children: [
      /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_block_editor5.Warning, { actions, children: messageHTML }),
      /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_element6.RawHTML, { children: originalUndelimitedContent })
    ] });
  };
  var get_install_missing_default = getInstallMissing;

  // packages/block-directory/build-module/plugins/index.mjs
  var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
  (0, import_plugins.registerPlugin)("block-directory", {
    // The icon is explicitly set to undefined to prevent PluginPrePublishPanel
    // from rendering the fallback icon pluginIcon.
    icon: void 0,
    render() {
      return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AutoBlockUninstaller, {}),
        /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(inserter_menu_downloadable_blocks_panel_default, {}),
        /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(InstalledBlocksPrePublishPanel, {})
      ] });
    }
  });
  (0, import_hooks.addFilter)(
    "blocks.registerBlockType",
    "block-directory/fallback",
    (settings, name) => {
      if (name !== "core/missing") {
        return settings;
      }
      settings.edit = get_install_missing_default(settings.edit);
      return settings;
    }
  );
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                                                  dist/block-directory.min.js                                                                         0000644                 00000053657 15212563760 0011752 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;(wp||={}).blockDirectory=(()=>{var ga=Object.create;var X=Object.defineProperty;var _a=Object.getOwnPropertyDescriptor;var ka=Object.getOwnPropertyNames;var va=Object.getPrototypeOf,xa=Object.prototype.hasOwnProperty;var p=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Q=(t,e)=>{for(var a in e)X(t,a,{get:e[a],enumerable:!0})},At=(t,e,a,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of ka(e))!xa.call(t,l)&&l!==a&&X(t,l,{get:()=>e[l],enumerable:!(r=_a(e,l))||r.enumerable});return t};var o=(t,e,a)=>(a=t!=null?ga(va(t)):{},At(e||!t||!t.__esModule?X(a,"default",{value:t,enumerable:!0}):a,t)),Ba=t=>At(X({},"__esModule",{value:!0}),t);var Mt=p((mr,Ft)=>{Ft.exports=window.wp.plugins});var Ht=p((cr,Ut)=>{Ut.exports=window.wp.hooks});var E=p((pr,zt)=>{zt.exports=window.wp.blocks});var _=p((br,$t)=>{$t.exports=window.wp.data});var N=p((hr,Vt)=>{Vt.exports=window.wp.element});var wt=p((yr,qt)=>{qt.exports=window.wp.editor});var P=p((gr,Kt)=>{Kt.exports=window.wp.blockEditor});var g=p((_r,Gt)=>{Gt.exports=window.wp.i18n});var tt=p((kr,Jt)=>{Jt.exports=window.wp.apiFetch});var Xt=p((vr,Zt)=>{Zt.exports=window.wp.notices});var te=p((xr,Qt)=>{Qt.exports=window.wp.url});var be=p((qr,pe)=>{pe.exports=window.wp.compose});var j=p((Wr,he)=>{he.exports=window.wp.components});var Tt=p((Yr,ye)=>{ye.exports=window.wp.coreData});var ke=p((Gr,_e)=>{_e.exports=window.wp.htmlEntities});var st=p((Zr,ve)=>{ve.exports=window.wp.primitives});var m=p((Xr,xe)=>{xe.exports=window.ReactJSXRuntime});var Ue=p((Eo,Me)=>{Me.exports=window.wp.a11y});var ur={};Q(ur,{store:()=>d});var pa=o(Mt(),1),ba=o(Ht(),1);var ue=o(E(),1),W=o(_(),1),de=o(N(),1),me=o(wt(),1);var ot=o(_(),1);var Wt=o(_(),1),Ta=(t={},e)=>{switch(e.type){case"FETCH_DOWNLOADABLE_BLOCKS":return{...t,[e.filterValue]:{isRequesting:!0}};case"RECEIVE_DOWNLOADABLE_BLOCKS":return{...t,[e.filterValue]:{results:e.downloadableBlocks,isRequesting:!1}}}return t},Ea=(t={installedBlockTypes:[],isInstalling:{}},e)=>{switch(e.type){case"ADD_INSTALLED_BLOCK_TYPE":return{...t,installedBlockTypes:[...t.installedBlockTypes,e.item]};case"REMOVE_INSTALLED_BLOCK_TYPE":return{...t,installedBlockTypes:t.installedBlockTypes.filter(a=>a.name!==e.item.name)};case"SET_INSTALLING_BLOCK":return{...t,isInstalling:{...t.isInstalling,[e.blockId]:e.isInstalling}}}return t},Sa=(t={},e)=>{switch(e.type){case"SET_ERROR_NOTICE":return{...t,[e.blockId]:{message:e.message,isFatal:e.isFatal}};case"CLEAR_ERROR_NOTICE":let{[e.blockId]:a,...r}=t;return r}return t},Yt=(0,Wt.combineReducers)({downloadableBlocks:Ta,blockManagement:Ea,errorNotices:Sa});var gt={};Q(gt,{getDownloadableBlocks:()=>La,getErrorNoticeForBlock:()=>Ra,getErrorNotices:()=>ja,getInstalledBlockTypes:()=>q,getNewBlockTypes:()=>Ca,getUnusedBlockTypes:()=>Da,isInstalling:()=>Na,isRequestingDownloadableBlocks:()=>Ia});var A=o(_(),1),$=o(P(),1),V=[];function Ia(t,e){return t.downloadableBlocks[e]?.isRequesting??!1}function La(t,e){return t.downloadableBlocks[e]?.results??V}function q(t){return t.blockManagement.installedBlockTypes}var Ca=(0,A.createRegistrySelector)(t=>(0,A.createSelector)(e=>{let a=q(e);if(!a.length)return V;let{getBlockName:r,getClientIdsWithDescendants:l}=t($.store),f=a.map(i=>i.name),s=l().flatMap(i=>{let u=r(i);return f.includes(u)?u:[]}),n=a.filter(i=>s.includes(i.name));return n.length>0?n:V},e=>[q(e),t($.store).getClientIdsWithDescendants()])),Da=(0,A.createRegistrySelector)(t=>(0,A.createSelector)(e=>{let a=q(e);if(!a.length)return V;let{getBlockName:r,getClientIdsWithDescendants:l}=t($.store),f=a.map(i=>i.name),s=l().flatMap(i=>{let u=r(i);return f.includes(u)?u:[]}),n=a.filter(i=>!s.includes(i.name));return n.length>0?n:V},e=>[q(e),t($.store).getClientIdsWithDescendants()]));function Na(t,e){return t.blockManagement.isInstalling[e]||!1}function ja(t){return t.errorNotices}function Ra(t,e){return t.errorNotices[e]}var vt={};Q(vt,{addInstalledBlockType:()=>Fa,clearErrorNotice:()=>za,fetchDownloadableBlocks:()=>kt,installBlockType:()=>Pa,receiveDownloadableBlocks:()=>rt,removeInstalledBlockType:()=>Ma,setErrorNotice:()=>Ha,setIsInstalling:()=>Ua,uninstallBlockType:()=>Aa});var at=o(E(),1),B=o(g(),1),F=o(tt(),1),et=o(Xt(),1),re=o(te(),1);var ee=o(tt(),1),Oa=t=>new Promise((e,a)=>{let r=document.createElement(t.nodeName);["id","rel","src","href","type"].forEach(l=>{t[l]&&(r[l]=t[l])}),t.innerHTML&&r.appendChild(document.createTextNode(t.innerHTML)),r.onload=()=>e(!0),r.onerror=()=>a(new Error("Error loading asset.")),document.body.appendChild(r),(r.nodeName.toLowerCase()==="link"||r.nodeName.toLowerCase()==="script"&&!r.src)&&e()});async function ae(){let e=await(await(0,ee.default)({url:document.location.href,parse:!1})).text(),a=new window.DOMParser().parseFromString(e,"text/html"),r=Array.from(a.querySelectorAll('link[rel="stylesheet"],script')).filter(l=>l.id&&!document.getElementById(l.id));for(let l of r)await Oa(l)}function _t(t){if(!t)return!1;let e=t.links["wp:plugin"]||t.links.self;return e&&e.length?e[0].href:!1}function kt(t){return{type:"FETCH_DOWNLOADABLE_BLOCKS",filterValue:t}}function rt(t,e){return{type:"RECEIVE_DOWNLOADABLE_BLOCKS",downloadableBlocks:t,filterValue:e}}var Pa=t=>async({registry:e,dispatch:a})=>{let{id:r,name:l}=t,f=!1;a.clearErrorNotice(r);try{a.setIsInstalling(r,!0);let s=_t(t),n={};s?await(0,F.default)({method:"PUT",url:s,data:{status:"active"}}):n=(await(0,F.default)({method:"POST",path:"wp/v2/plugins",data:{slug:r,status:"active"}}))._links,a.addInstalledBlockType({...t,links:{...t.links,...n}});let i=["api_version","title","category","parent","ancestor","icon","description","keywords","attributes","provides_context","uses_context","selectors","supports","styles","example","variations","allowed_blocks","block_hooks"];if(await(0,F.default)({path:(0,re.addQueryArgs)(`/wp/v2/block-types/${l}`,{_fields:i})}).catch(()=>{}).then(c=>{c&&(0,at.unstable__bootstrapServerSideBlockDefinitions)({[l]:Object.fromEntries(Object.entries(c).filter(([y])=>i.includes(y)))})}),await ae(),!e.select(at.store).getBlockTypes().some(c=>c.name===l))throw new Error((0,B.__)("Error registering block. Try reloading the page."));e.dispatch(et.store).createInfoNotice((0,B.sprintf)((0,B.__)("Block %s installed and added."),t.title),{speak:!0,type:"snackbar"}),f=!0}catch(s){let n=s.message||(0,B.__)("An error occurred."),i=s instanceof Error,u={folder_exists:(0,B.__)("This block is already installed. Try reloading the page."),unable_to_connect_to_filesystem:(0,B.__)("Error installing block. You can reload the page and try again.")};u[s.code]&&(i=!0,n=u[s.code]),a.setErrorNotice(r,n,i),e.dispatch(et.store).createErrorNotice(n,{speak:!0,isDismissible:!0})}return a.setIsInstalling(r,!1),f},Aa=t=>async({registry:e,dispatch:a})=>{try{let r=_t(t);await(0,F.default)({method:"PUT",url:r,data:{status:"inactive"}}),await(0,F.default)({method:"DELETE",url:r}),a.removeInstalledBlockType(t)}catch(r){e.dispatch(et.store).createErrorNotice(r.message||(0,B.__)("An error occurred."))}};function Fa(t){return{type:"ADD_INSTALLED_BLOCK_TYPE",item:t}}function Ma(t){return{type:"REMOVE_INSTALLED_BLOCK_TYPE",item:t}}function Ua(t,e){return{type:"SET_INSTALLING_BLOCK",blockId:t,isInstalling:e}}function Ha(t,e,a=!1){return{type:"SET_ERROR_NOTICE",blockId:t,message:e,isFatal:a}}function za(t){return{type:"CLEAR_ERROR_NOTICE",blockId:t}}var Bt={};Q(Bt,{getDownloadableBlocks:()=>Wa});var M=function(){return M=Object.assign||function(e){for(var a,r=1,l=arguments.length;r<l;r++){a=arguments[r];for(var f in a)Object.prototype.hasOwnProperty.call(a,f)&&(e[f]=a[f])}return e},M.apply(this,arguments)};function oe(t){return t.toLowerCase()}var $a=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Va=/[^A-Z0-9]+/gi;function se(t,e){e===void 0&&(e={});for(var a=e.splitRegexp,r=a===void 0?$a:a,l=e.stripRegexp,f=l===void 0?Va:l,s=e.transform,n=s===void 0?oe:s,i=e.delimiter,u=i===void 0?" ":i,c=le(le(t,r,"$1\0$2"),f,"\0"),y=0,x=c.length;c.charAt(y)==="\0";)y++;for(;c.charAt(x-1)==="\0";)x--;return c.slice(y,x).split("\0").map(n).join(u)}function le(t,e,a){return e instanceof RegExp?t.replace(e,a):e.reduce(function(r,l){return r.replace(l,a)},t)}function xt(t,e){var a=t.charAt(0),r=t.substr(1).toLowerCase();return e>0&&a>="0"&&a<="9"?"_"+a+r:""+a.toUpperCase()+r}function fe(t,e){return e===void 0&&(e={}),se(t,M({delimiter:"",transform:xt},e))}function qa(t,e){return e===0?t.toLowerCase():xt(t,e)}function ie(t,e){return e===void 0&&(e={}),fe(t,M({transform:qa},e))}var ne=o(tt(),1);var Wa=t=>async({dispatch:e})=>{if(t)try{e(kt(t));let r=(await(0,ne.default)({path:`wp/v2/block-directory/search?term=${t}`})).map(l=>Object.fromEntries(Object.entries(l).map(([f,s])=>[ie(f),s])));e(rt(r,t))}catch{e(rt([],t))}};var Ya="core/block-directory",Ka={reducer:Yt,selectors:gt,actions:vt,resolvers:Bt},d=(0,ot.createReduxStore)(Ya,Ka);(0,ot.register)(d);function ce(){let{uninstallBlockType:t}=(0,W.useDispatch)(d),e=(0,W.useSelect)(r=>{let{isAutosavingPost:l,isSavingPost:f}=r(me.store);return f()&&!l()},[]),a=(0,W.useSelect)(r=>r(d).getUnusedBlockTypes(),[]);return(0,de.useEffect)(()=>{e&&a.length&&a.forEach(r=>{t(r),(0,ue.unregisterBlockType)(r.name)})},[e]),null}var Ze=o(P(),1),Xe=o(be(),1),Qe=o(N(),1);var qe=o(g(),1),We=o(j(),1),Ye=o(Tt(),1),Ke=o(_(),1),Ge=o(E(),1);var Re=o(g(),1),Oe=o(j(),1),Pe=o(E(),1),Ae=o(_(),1);function we(t){var e,a,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var l=t.length;for(e=0;e<l;e++)t[e]&&(a=we(t[e]))&&(r&&(r+=" "),r+=a)}else for(a in t)t[a]&&(r&&(r+=" "),r+=a);return r}function Ga(){for(var t,e,a=0,r="",l=arguments.length;a<l;a++)(t=arguments[a])&&(e=we(t))&&(r&&(r+=" "),r+=e);return r}var ge=Ga;var w=o(g(),1),I=o(j(),1),Ce=o(N(),1),S=o(ke(),1),De=o(E(),1),Ne=o(_(),1);var ut=o(g(),1);var lt=o(N(),1),Y=(0,lt.forwardRef)(({icon:t,size:e=24,...a},r)=>(0,lt.cloneElement)(t,{width:e,height:e,...a,ref:r}));var ft=o(st(),1),Et=o(m(),1),St=(0,Et.jsx)(ft.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Et.jsx)(ft.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var it=o(st(),1),It=o(m(),1),Lt=(0,It.jsx)(it.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,It.jsx)(it.Path,{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"})});var nt=o(st(),1),Ct=o(m(),1),Dt=(0,Ct.jsx)(nt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ct.jsx)(nt.Path,{d:"M9.518 8.783a.25.25 0 00.188-.137l2.069-4.192a.25.25 0 01.448 0l2.07 4.192a.25.25 0 00.187.137l4.626.672a.25.25 0 01.139.427l-3.347 3.262a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.363.264l-4.137-2.176a.25.25 0 00-.233 0l-4.138 2.175a.25.25 0 01-.362-.263l.79-4.607a.25.25 0 00-.072-.222L4.753 9.882a.25.25 0 01.14-.427l4.625-.672zM12 14.533c.28 0 .559.067.814.2l1.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.39v7.143z"})});var U=o(m(),1);function Ja({rating:t}){let e=Math.round(t/.5)*.5,a=Math.floor(t),r=Math.ceil(t-a),l=5-(a+r);return(0,U.jsxs)("span",{"aria-label":(0,ut.sprintf)((0,ut.__)("%s out of 5 stars"),e),children:[Array.from({length:a}).map((f,s)=>(0,U.jsx)(Y,{className:"block-directory-block-ratings__star-full",icon:Lt,size:16},`full_stars_${s}`)),Array.from({length:r}).map((f,s)=>(0,U.jsx)(Y,{className:"block-directory-block-ratings__star-half-full",icon:Dt,size:16},`half_stars_${s}`)),Array.from({length:l}).map((f,s)=>(0,U.jsx)(Y,{className:"block-directory-block-ratings__star-empty",icon:St,size:16},`empty_stars_${s}`))]})}var Be=Ja;var Nt=o(m(),1),Za=({rating:t})=>(0,Nt.jsx)("span",{className:"block-directory-block-ratings",children:(0,Nt.jsx)(Be,{rating:t})}),Te=Za;var Ee=o(P(),1),jt=o(m(),1);function Xa({icon:t}){let e="block-directory-downloadable-block-icon";return t.match(/\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/)!==null?(0,jt.jsx)("img",{className:e,src:t,alt:""}):(0,jt.jsx)(Ee.BlockIcon,{className:e,icon:t,showColors:!0})}var dt=Xa;var Se=o(g(),1),Ie=o(_(),1);var mt=o(m(),1),Qa=({block:t})=>{let e=(0,Ie.useSelect)(a=>a(d).getErrorNoticeForBlock(t.id),[t]);return e?(0,mt.jsx)("div",{className:"block-directory-downloadable-block-notice",children:(0,mt.jsxs)("div",{className:"block-directory-downloadable-block-notice__content",children:[e.message,e.isFatal?" "+(0,Se.__)("Try reloading the page."):null]})}):null},Le=Qa;var b=o(m(),1);function tr({title:t,rating:e,ratingCount:a},{hasNotice:r,isInstalled:l,isInstalling:f}){let s=Math.round(e/.5)*.5;return!l&&r?(0,w.sprintf)("Retry installing %s.",(0,S.decodeEntities)(t)):l?(0,w.sprintf)("Add %s.",(0,S.decodeEntities)(t)):f?(0,w.sprintf)("Installing %s.",(0,S.decodeEntities)(t)):a<1?(0,w.sprintf)("Install %s.",(0,S.decodeEntities)(t)):(0,w.sprintf)((0,w._n)("Install %1$s. %2$s stars with %3$s review.","Install %1$s. %2$s stars with %3$s reviews.",a),(0,S.decodeEntities)(t),s,a)}function er({item:t,onClick:e}){let{author:a,description:r,icon:l,rating:f,title:s}=t,n=!!(0,De.getBlockType)(t.name),{hasNotice:i,isInstalling:u,isInstallable:c}=(0,Ne.useSelect)(z=>{let{getErrorNoticeForBlock:ha,isInstalling:ya}=z(d),yt=ha(t.id),wa=yt&&yt.isFatal;return{hasNotice:!!yt,isInstalling:ya(t.id),isInstallable:!wa}},[t]),y="";n?y=(0,w.__)("Installed!"):u&&(y=(0,w.__)("Installing\u2026"));let x=tr(t,{hasNotice:i,isInstalled:n,isInstalling:u});return(0,b.jsx)(I.Tooltip,{placement:"top",text:x,children:(0,b.jsxs)(I.Composite.Item,{className:ge("block-directory-downloadable-block-list-item",u&&"is-installing"),accessibleWhenDisabled:!0,disabled:u||!c,onClick:z=>{z.preventDefault(),e()},"aria-label":x,type:"button",role:"option",children:[(0,b.jsxs)("div",{className:"block-directory-downloadable-block-list-item__icon",children:[(0,b.jsx)(dt,{icon:l,title:s}),u?(0,b.jsx)("span",{className:"block-directory-downloadable-block-list-item__spinner",children:(0,b.jsx)(I.Spinner,{})}):(0,b.jsx)(Te,{rating:f})]}),(0,b.jsxs)("span",{className:"block-directory-downloadable-block-list-item__details",children:[(0,b.jsx)("span",{className:"block-directory-downloadable-block-list-item__title",children:(0,Ce.createInterpolateElement)((0,w.sprintf)((0,w.__)("%1$s <span>by %2$s</span>"),(0,S.decodeEntities)(s),a),{span:(0,b.jsx)("span",{className:"block-directory-downloadable-block-list-item__author"})})}),i?(0,b.jsx)(Le,{block:t}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"block-directory-downloadable-block-list-item__desc",children:y||(0,S.decodeEntities)(r)}),c&&!(n||u)&&(0,b.jsx)(I.VisuallyHidden,{children:(0,w.__)("Install block")})]})]})]})})}var je=er;var Rt=o(m(),1),ar=()=>{};function rr({items:t,onHover:e=ar,onSelect:a}){let{installBlockType:r}=(0,Ae.useDispatch)(d);return t.length?(0,Rt.jsx)(Oe.Composite,{role:"listbox",className:"block-directory-downloadable-blocks-list","aria-label":(0,Re.__)("Blocks available for install"),children:t.map(l=>(0,Rt.jsx)(je,{onClick:()=>{(0,Pe.getBlockType)(l.name)?a(l):r(l).then(f=>{f&&a(l)}),e(null)},onHover:e,item:l},l.id))}):null}var Fe=rr;var L=o(g(),1),He=o(N(),1),ze=o(Ue(),1),k=o(m(),1);function or({children:t,downloadableItems:e,hasLocalBlocks:a}){let r=e.length;return(0,He.useEffect)(()=>{(0,ze.speak)((0,L.sprintf)((0,L._n)("%d additional block is available to install.","%d additional blocks are available to install.",r),r))},[r]),(0,k.jsxs)(k.Fragment,{children:[!a&&(0,k.jsx)("p",{className:"block-directory-downloadable-blocks-panel__no-local",children:(0,L.__)("No results available from your installed blocks.")}),(0,k.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"}),(0,k.jsxs)("div",{className:"block-directory-downloadable-blocks-panel",children:[(0,k.jsxs)("div",{className:"block-directory-downloadable-blocks-panel__header",children:[(0,k.jsx)("h2",{className:"block-directory-downloadable-blocks-panel__title",children:(0,L.__)("Available to install")}),(0,k.jsx)("p",{className:"block-directory-downloadable-blocks-panel__description",children:(0,L.__)("Select a block to install and add it to your post.")})]}),t]})]})}var $e=or;var ct=o(g(),1),pt=o(j(),1),v=o(m(),1);function lr(){return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("div",{className:"block-editor-inserter__no-results",children:(0,v.jsx)("p",{children:(0,ct.__)("No results found.")})}),(0,v.jsx)("div",{className:"block-editor-inserter__tips",children:(0,v.jsxs)(pt.Tip,{children:[(0,ct.__)("Interested in creating your own block?"),(0,v.jsx)("br",{}),(0,v.jsxs)(pt.ExternalLink,{href:"https://developer.wordpress.org/block-editor/",children:[(0,ct.__)("Get started here"),"."]})]})})]})}var Ot=lr;var h=o(m(),1),Ve=[],sr=t=>(0,Ke.useSelect)(e=>{let{getDownloadableBlocks:a,isRequestingDownloadableBlocks:r,getInstalledBlockTypes:l}=e(d),f=e(Ye.store).canUser("read","block-directory/search"),s=Ve;if(f){s=a(t);let n=l(),i=s.filter(({name:u})=>{let c=n.some(x=>x.name===u),y=(0,Ge.getBlockType)(u);return c||!y});i.length!==s.length&&(s=i),s.length===0&&(s=Ve)}return{hasPermission:f,downloadableBlocks:s,isLoading:r(t)}},[t]);function Je({onSelect:t,onHover:e,hasLocalBlocks:a,isTyping:r,filterValue:l}){let{hasPermission:f,downloadableBlocks:s,isLoading:n}=sr(l);return f===void 0||n||r?(0,h.jsxs)(h.Fragment,{children:[f&&!a&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("p",{className:"block-directory-downloadable-blocks-panel__no-local",children:(0,qe.__)("No results available from your installed blocks.")}),(0,h.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"})]}),(0,h.jsx)("div",{className:"block-directory-downloadable-blocks-panel has-blocks-loading",children:(0,h.jsx)(We.Spinner,{})})]}):f===!1?a?null:(0,h.jsx)(Ot,{}):s.length===0?a?null:(0,h.jsx)(Ot,{}):(0,h.jsx)($e,{downloadableItems:s,hasLocalBlocks:a,children:(0,h.jsx)(Fe,{items:s,onSelect:t,onHover:e})})}var Pt=o(m(),1);function fr(){let[t,e]=(0,Qe.useState)(""),a=(0,Xe.debounce)(e,400);return(0,Pt.jsx)(Ze.__unstableInserterMenuExtension,{children:({onSelect:r,onHover:l,filterValue:f,hasItems:s})=>(t!==f&&a(f),t?(0,Pt.jsx)(Je,{onSelect:r,onHover:l,filterValue:t,hasLocalBlocks:s,isTyping:f!==t}):null)})}var ta=fr;var K=o(g(),1),aa=o(_(),1),ra=o(wt(),1);var bt=o(g(),1);var C=o(m(),1);function ea({items:t}){return t.length?(0,C.jsx)("ul",{className:"block-directory-compact-list",children:t.map(({icon:e,id:a,title:r,author:l})=>(0,C.jsxs)("li",{className:"block-directory-compact-list__item",children:[(0,C.jsx)(dt,{icon:e,title:r}),(0,C.jsxs)("div",{className:"block-directory-compact-list__item-details",children:[(0,C.jsx)("div",{className:"block-directory-compact-list__item-title",children:r}),(0,C.jsx)("div",{className:"block-directory-compact-list__item-author",children:(0,bt.sprintf)((0,bt.__)("By %s"),l)})]})]},a))}):null}var G=o(m(),1);function oa(){let t=(0,aa.useSelect)(e=>e(d).getNewBlockTypes(),[]);return t.length?(0,G.jsxs)(ra.PluginPrePublishPanel,{title:(0,K.sprintf)((0,K._n)("Added: %d block","Added: %d blocks",t.length),t.length),initialOpen:!0,children:[(0,G.jsx)("p",{className:"installed-blocks-pre-publish-panel__copy",children:(0,K._n)("The following block has been added to your site.","The following blocks have been added to your site.",t.length)}),(0,G.jsx)(ea,{items:t})]}):null}var R=o(g(),1),na=o(j(),1),ua=o(E(),1),da=o(N(),1),Z=o(_(),1),ma=o(Tt(),1),O=o(P(),1);var ht=o(g(),1),la=o(j(),1),H=o(E(),1),J=o(_(),1),sa=o(P(),1);var fa=o(m(),1);function ia({attributes:t,block:e,clientId:a}){let r=(0,J.useSelect)(s=>s(d).isInstalling(e.id),[e.id]),{installBlockType:l}=(0,J.useDispatch)(d),{replaceBlock:f}=(0,J.useDispatch)(sa.store);return(0,fa.jsx)(la.Button,{__next40pxDefaultSize:!0,onClick:()=>l(e).then(s=>{if(s){let n=(0,H.getBlockType)(e.name),[i]=(0,H.parse)(t.originalContent);i&&n&&f(a,(0,H.createBlock)(n.name,i.attributes,i.innerBlocks))}}),accessibleWhenDisabled:!0,disabled:r,isBusy:r,variant:"primary",children:(0,ht.sprintf)((0,ht.__)("Install %s"),e.title)})}var T=o(m(),1),ir=t=>e=>{let{originalName:a}=e.attributes,{block:r,hasPermission:l}=(0,Z.useSelect)(f=>{let{getDownloadableBlocks:s}=f(d),n=s("block:"+a).filter(({name:i})=>a===i);return{hasPermission:f(ma.store).canUser("read","block-directory/search"),block:n.length&&n[0]}},[a]);return!l||!r?(0,T.jsx)(t,{...e}):(0,T.jsx)(nr,{...e,originalBlock:r})},nr=({originalBlock:t,...e})=>{let{originalName:a,originalUndelimitedContent:r,clientId:l}=e.attributes,{replaceBlock:f}=(0,Z.useDispatch)(O.store),s=()=>{f(e.clientId,(0,ua.createBlock)("core/html",{content:r}))},n=!!r,i=(0,Z.useSelect)(y=>{let{canInsertBlockType:x,getBlockRootClientId:z}=y(O.store);return x("core/html",z(l))},[l]),u=(0,R.sprintf)((0,R.__)("Your site doesn\u2019t include support for the %s block. You can try installing the block or remove it entirely."),t.title||a),c=[(0,T.jsx)(ia,{block:t,attributes:e.attributes,clientId:e.clientId},"install")];return n&&i&&(u=(0,R.sprintf)((0,R.__)("Your site doesn\u2019t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely."),t.title||a),c.push((0,T.jsx)(na.Button,{__next40pxDefaultSize:!0,onClick:s,variant:"tertiary",children:(0,R.__)("Keep as HTML")},"convert"))),(0,T.jsxs)("div",{...(0,O.useBlockProps)(),children:[(0,T.jsx)(O.Warning,{actions:c,children:u}),(0,T.jsx)(da.RawHTML,{children:r})]})},ca=ir;var D=o(m(),1);(0,pa.registerPlugin)("block-directory",{icon:void 0,render(){return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(ce,{}),(0,D.jsx)(ta,{}),(0,D.jsx)(oa,{})]})}});(0,ba.addFilter)("blocks.registerBlockType","block-directory/fallback",(t,e)=>(e!=="core/missing"||(t.edit=ca(t.edit)),t));return Ba(ur);})();
                                                                                 dist/block-editor.js                                                                                0000644                 00012633475 15212563760 0010457 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).blockEditor = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to2, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to2, key) && key !== except)
          __defProp(to2, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to2;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/blocks
  var require_blocks = __commonJS({
    "package-external:@wordpress/blocks"(exports, module) {
      module.exports = window.wp.blocks;
    }
  });

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // package-external:@wordpress/hooks
  var require_hooks = __commonJS({
    "package-external:@wordpress/hooks"(exports, module) {
      module.exports = window.wp.hooks;
    }
  });

  // package-external:@wordpress/components
  var require_components = __commonJS({
    "package-external:@wordpress/components"(exports, module) {
      module.exports = window.wp.components;
    }
  });

  // package-external:@wordpress/private-apis
  var require_private_apis = __commonJS({
    "package-external:@wordpress/private-apis"(exports, module) {
      module.exports = window.wp.privateApis;
    }
  });

  // package-external:@wordpress/deprecated
  var require_deprecated = __commonJS({
    "package-external:@wordpress/deprecated"(exports, module) {
      module.exports = window.wp.deprecated;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // package-external:@wordpress/url
  var require_url = __commonJS({
    "package-external:@wordpress/url"(exports, module) {
      module.exports = window.wp.url;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // node_modules/fast-deep-equal/es6/index.js
  var require_es6 = __commonJS({
    "node_modules/fast-deep-equal/es6/index.js"(exports, module) {
      "use strict";
      module.exports = function equal(a2, b2) {
        if (a2 === b2) return true;
        if (a2 && b2 && typeof a2 == "object" && typeof b2 == "object") {
          if (a2.constructor !== b2.constructor) return false;
          var length, i2, keys;
          if (Array.isArray(a2)) {
            length = a2.length;
            if (length != b2.length) return false;
            for (i2 = length; i2-- !== 0; )
              if (!equal(a2[i2], b2[i2])) return false;
            return true;
          }
          if (a2 instanceof Map && b2 instanceof Map) {
            if (a2.size !== b2.size) return false;
            for (i2 of a2.entries())
              if (!b2.has(i2[0])) return false;
            for (i2 of a2.entries())
              if (!equal(i2[1], b2.get(i2[0]))) return false;
            return true;
          }
          if (a2 instanceof Set && b2 instanceof Set) {
            if (a2.size !== b2.size) return false;
            for (i2 of a2.entries())
              if (!b2.has(i2[0])) return false;
            return true;
          }
          if (ArrayBuffer.isView(a2) && ArrayBuffer.isView(b2)) {
            length = a2.length;
            if (length != b2.length) return false;
            for (i2 = length; i2-- !== 0; )
              if (a2[i2] !== b2[i2]) return false;
            return true;
          }
          if (a2.constructor === RegExp) return a2.source === b2.source && a2.flags === b2.flags;
          if (a2.valueOf !== Object.prototype.valueOf) return a2.valueOf() === b2.valueOf();
          if (a2.toString !== Object.prototype.toString) return a2.toString() === b2.toString();
          keys = Object.keys(a2);
          length = keys.length;
          if (length !== Object.keys(b2).length) return false;
          for (i2 = length; i2-- !== 0; )
            if (!Object.prototype.hasOwnProperty.call(b2, keys[i2])) return false;
          for (i2 = length; i2-- !== 0; ) {
            var key = keys[i2];
            if (!equal(a2[key], b2[key])) return false;
          }
          return true;
        }
        return a2 !== a2 && b2 !== b2;
      };
    }
  });

  // package-external:@wordpress/primitives
  var require_primitives = __commonJS({
    "package-external:@wordpress/primitives"(exports, module) {
      module.exports = window.wp.primitives;
    }
  });

  // package-external:@wordpress/rich-text
  var require_rich_text = __commonJS({
    "package-external:@wordpress/rich-text"(exports, module) {
      module.exports = window.wp.richText;
    }
  });

  // package-external:@wordpress/block-serialization-default-parser
  var require_block_serialization_default_parser = __commonJS({
    "package-external:@wordpress/block-serialization-default-parser"(exports, module) {
      module.exports = window.wp.blockSerializationDefaultParser;
    }
  });

  // package-external:@wordpress/a11y
  var require_a11y = __commonJS({
    "package-external:@wordpress/a11y"(exports, module) {
      module.exports = window.wp.a11y;
    }
  });

  // package-external:@wordpress/notices
  var require_notices = __commonJS({
    "package-external:@wordpress/notices"(exports, module) {
      module.exports = window.wp.notices;
    }
  });

  // package-external:@wordpress/preferences
  var require_preferences = __commonJS({
    "package-external:@wordpress/preferences"(exports, module) {
      module.exports = window.wp.preferences;
    }
  });

  // node_modules/remove-accents/index.js
  var require_remove_accents = __commonJS({
    "node_modules/remove-accents/index.js"(exports, module) {
      var characterMap = {
        "\xC0": "A",
        "\xC1": "A",
        "\xC2": "A",
        "\xC3": "A",
        "\xC4": "A",
        "\xC5": "A",
        "\u1EA4": "A",
        "\u1EAE": "A",
        "\u1EB2": "A",
        "\u1EB4": "A",
        "\u1EB6": "A",
        "\xC6": "AE",
        "\u1EA6": "A",
        "\u1EB0": "A",
        "\u0202": "A",
        "\u1EA2": "A",
        "\u1EA0": "A",
        "\u1EA8": "A",
        "\u1EAA": "A",
        "\u1EAC": "A",
        "\xC7": "C",
        "\u1E08": "C",
        "\xC8": "E",
        "\xC9": "E",
        "\xCA": "E",
        "\xCB": "E",
        "\u1EBE": "E",
        "\u1E16": "E",
        "\u1EC0": "E",
        "\u1E14": "E",
        "\u1E1C": "E",
        "\u0206": "E",
        "\u1EBA": "E",
        "\u1EBC": "E",
        "\u1EB8": "E",
        "\u1EC2": "E",
        "\u1EC4": "E",
        "\u1EC6": "E",
        "\xCC": "I",
        "\xCD": "I",
        "\xCE": "I",
        "\xCF": "I",
        "\u1E2E": "I",
        "\u020A": "I",
        "\u1EC8": "I",
        "\u1ECA": "I",
        "\xD0": "D",
        "\xD1": "N",
        "\xD2": "O",
        "\xD3": "O",
        "\xD4": "O",
        "\xD5": "O",
        "\xD6": "O",
        "\xD8": "O",
        "\u1ED0": "O",
        "\u1E4C": "O",
        "\u1E52": "O",
        "\u020E": "O",
        "\u1ECE": "O",
        "\u1ECC": "O",
        "\u1ED4": "O",
        "\u1ED6": "O",
        "\u1ED8": "O",
        "\u1EDC": "O",
        "\u1EDE": "O",
        "\u1EE0": "O",
        "\u1EDA": "O",
        "\u1EE2": "O",
        "\xD9": "U",
        "\xDA": "U",
        "\xDB": "U",
        "\xDC": "U",
        "\u1EE6": "U",
        "\u1EE4": "U",
        "\u1EEC": "U",
        "\u1EEE": "U",
        "\u1EF0": "U",
        "\xDD": "Y",
        "\xE0": "a",
        "\xE1": "a",
        "\xE2": "a",
        "\xE3": "a",
        "\xE4": "a",
        "\xE5": "a",
        "\u1EA5": "a",
        "\u1EAF": "a",
        "\u1EB3": "a",
        "\u1EB5": "a",
        "\u1EB7": "a",
        "\xE6": "ae",
        "\u1EA7": "a",
        "\u1EB1": "a",
        "\u0203": "a",
        "\u1EA3": "a",
        "\u1EA1": "a",
        "\u1EA9": "a",
        "\u1EAB": "a",
        "\u1EAD": "a",
        "\xE7": "c",
        "\u1E09": "c",
        "\xE8": "e",
        "\xE9": "e",
        "\xEA": "e",
        "\xEB": "e",
        "\u1EBF": "e",
        "\u1E17": "e",
        "\u1EC1": "e",
        "\u1E15": "e",
        "\u1E1D": "e",
        "\u0207": "e",
        "\u1EBB": "e",
        "\u1EBD": "e",
        "\u1EB9": "e",
        "\u1EC3": "e",
        "\u1EC5": "e",
        "\u1EC7": "e",
        "\xEC": "i",
        "\xED": "i",
        "\xEE": "i",
        "\xEF": "i",
        "\u1E2F": "i",
        "\u020B": "i",
        "\u1EC9": "i",
        "\u1ECB": "i",
        "\xF0": "d",
        "\xF1": "n",
        "\xF2": "o",
        "\xF3": "o",
        "\xF4": "o",
        "\xF5": "o",
        "\xF6": "o",
        "\xF8": "o",
        "\u1ED1": "o",
        "\u1E4D": "o",
        "\u1E53": "o",
        "\u020F": "o",
        "\u1ECF": "o",
        "\u1ECD": "o",
        "\u1ED5": "o",
        "\u1ED7": "o",
        "\u1ED9": "o",
        "\u1EDD": "o",
        "\u1EDF": "o",
        "\u1EE1": "o",
        "\u1EDB": "o",
        "\u1EE3": "o",
        "\xF9": "u",
        "\xFA": "u",
        "\xFB": "u",
        "\xFC": "u",
        "\u1EE7": "u",
        "\u1EE5": "u",
        "\u1EED": "u",
        "\u1EEF": "u",
        "\u1EF1": "u",
        "\xFD": "y",
        "\xFF": "y",
        "\u0100": "A",
        "\u0101": "a",
        "\u0102": "A",
        "\u0103": "a",
        "\u0104": "A",
        "\u0105": "a",
        "\u0106": "C",
        "\u0107": "c",
        "\u0108": "C",
        "\u0109": "c",
        "\u010A": "C",
        "\u010B": "c",
        "\u010C": "C",
        "\u010D": "c",
        "C\u0306": "C",
        "c\u0306": "c",
        "\u010E": "D",
        "\u010F": "d",
        "\u0110": "D",
        "\u0111": "d",
        "\u0112": "E",
        "\u0113": "e",
        "\u0114": "E",
        "\u0115": "e",
        "\u0116": "E",
        "\u0117": "e",
        "\u0118": "E",
        "\u0119": "e",
        "\u011A": "E",
        "\u011B": "e",
        "\u011C": "G",
        "\u01F4": "G",
        "\u011D": "g",
        "\u01F5": "g",
        "\u011E": "G",
        "\u011F": "g",
        "\u0120": "G",
        "\u0121": "g",
        "\u0122": "G",
        "\u0123": "g",
        "\u0124": "H",
        "\u0125": "h",
        "\u0126": "H",
        "\u0127": "h",
        "\u1E2A": "H",
        "\u1E2B": "h",
        "\u0128": "I",
        "\u0129": "i",
        "\u012A": "I",
        "\u012B": "i",
        "\u012C": "I",
        "\u012D": "i",
        "\u012E": "I",
        "\u012F": "i",
        "\u0130": "I",
        "\u0131": "i",
        "\u0132": "IJ",
        "\u0133": "ij",
        "\u0134": "J",
        "\u0135": "j",
        "\u0136": "K",
        "\u0137": "k",
        "\u1E30": "K",
        "\u1E31": "k",
        "K\u0306": "K",
        "k\u0306": "k",
        "\u0139": "L",
        "\u013A": "l",
        "\u013B": "L",
        "\u013C": "l",
        "\u013D": "L",
        "\u013E": "l",
        "\u013F": "L",
        "\u0140": "l",
        "\u0141": "l",
        "\u0142": "l",
        "\u1E3E": "M",
        "\u1E3F": "m",
        "M\u0306": "M",
        "m\u0306": "m",
        "\u0143": "N",
        "\u0144": "n",
        "\u0145": "N",
        "\u0146": "n",
        "\u0147": "N",
        "\u0148": "n",
        "\u0149": "n",
        "N\u0306": "N",
        "n\u0306": "n",
        "\u014C": "O",
        "\u014D": "o",
        "\u014E": "O",
        "\u014F": "o",
        "\u0150": "O",
        "\u0151": "o",
        "\u0152": "OE",
        "\u0153": "oe",
        "P\u0306": "P",
        "p\u0306": "p",
        "\u0154": "R",
        "\u0155": "r",
        "\u0156": "R",
        "\u0157": "r",
        "\u0158": "R",
        "\u0159": "r",
        "R\u0306": "R",
        "r\u0306": "r",
        "\u0212": "R",
        "\u0213": "r",
        "\u015A": "S",
        "\u015B": "s",
        "\u015C": "S",
        "\u015D": "s",
        "\u015E": "S",
        "\u0218": "S",
        "\u0219": "s",
        "\u015F": "s",
        "\u0160": "S",
        "\u0161": "s",
        "\u0162": "T",
        "\u0163": "t",
        "\u021B": "t",
        "\u021A": "T",
        "\u0164": "T",
        "\u0165": "t",
        "\u0166": "T",
        "\u0167": "t",
        "T\u0306": "T",
        "t\u0306": "t",
        "\u0168": "U",
        "\u0169": "u",
        "\u016A": "U",
        "\u016B": "u",
        "\u016C": "U",
        "\u016D": "u",
        "\u016E": "U",
        "\u016F": "u",
        "\u0170": "U",
        "\u0171": "u",
        "\u0172": "U",
        "\u0173": "u",
        "\u0216": "U",
        "\u0217": "u",
        "V\u0306": "V",
        "v\u0306": "v",
        "\u0174": "W",
        "\u0175": "w",
        "\u1E82": "W",
        "\u1E83": "w",
        "X\u0306": "X",
        "x\u0306": "x",
        "\u0176": "Y",
        "\u0177": "y",
        "\u0178": "Y",
        "Y\u0306": "Y",
        "y\u0306": "y",
        "\u0179": "Z",
        "\u017A": "z",
        "\u017B": "Z",
        "\u017C": "z",
        "\u017D": "Z",
        "\u017E": "z",
        "\u017F": "s",
        "\u0192": "f",
        "\u01A0": "O",
        "\u01A1": "o",
        "\u01AF": "U",
        "\u01B0": "u",
        "\u01CD": "A",
        "\u01CE": "a",
        "\u01CF": "I",
        "\u01D0": "i",
        "\u01D1": "O",
        "\u01D2": "o",
        "\u01D3": "U",
        "\u01D4": "u",
        "\u01D5": "U",
        "\u01D6": "u",
        "\u01D7": "U",
        "\u01D8": "u",
        "\u01D9": "U",
        "\u01DA": "u",
        "\u01DB": "U",
        "\u01DC": "u",
        "\u1EE8": "U",
        "\u1EE9": "u",
        "\u1E78": "U",
        "\u1E79": "u",
        "\u01FA": "A",
        "\u01FB": "a",
        "\u01FC": "AE",
        "\u01FD": "ae",
        "\u01FE": "O",
        "\u01FF": "o",
        "\xDE": "TH",
        "\xFE": "th",
        "\u1E54": "P",
        "\u1E55": "p",
        "\u1E64": "S",
        "\u1E65": "s",
        "X\u0301": "X",
        "x\u0301": "x",
        "\u0403": "\u0413",
        "\u0453": "\u0433",
        "\u040C": "\u041A",
        "\u045C": "\u043A",
        "A\u030B": "A",
        "a\u030B": "a",
        "E\u030B": "E",
        "e\u030B": "e",
        "I\u030B": "I",
        "i\u030B": "i",
        "\u01F8": "N",
        "\u01F9": "n",
        "\u1ED2": "O",
        "\u1ED3": "o",
        "\u1E50": "O",
        "\u1E51": "o",
        "\u1EEA": "U",
        "\u1EEB": "u",
        "\u1E80": "W",
        "\u1E81": "w",
        "\u1EF2": "Y",
        "\u1EF3": "y",
        "\u0200": "A",
        "\u0201": "a",
        "\u0204": "E",
        "\u0205": "e",
        "\u0208": "I",
        "\u0209": "i",
        "\u020C": "O",
        "\u020D": "o",
        "\u0210": "R",
        "\u0211": "r",
        "\u0214": "U",
        "\u0215": "u",
        "B\u030C": "B",
        "b\u030C": "b",
        "\u010C\u0323": "C",
        "\u010D\u0323": "c",
        "\xCA\u030C": "E",
        "\xEA\u030C": "e",
        "F\u030C": "F",
        "f\u030C": "f",
        "\u01E6": "G",
        "\u01E7": "g",
        "\u021E": "H",
        "\u021F": "h",
        "J\u030C": "J",
        "\u01F0": "j",
        "\u01E8": "K",
        "\u01E9": "k",
        "M\u030C": "M",
        "m\u030C": "m",
        "P\u030C": "P",
        "p\u030C": "p",
        "Q\u030C": "Q",
        "q\u030C": "q",
        "\u0158\u0329": "R",
        "\u0159\u0329": "r",
        "\u1E66": "S",
        "\u1E67": "s",
        "V\u030C": "V",
        "v\u030C": "v",
        "W\u030C": "W",
        "w\u030C": "w",
        "X\u030C": "X",
        "x\u030C": "x",
        "Y\u030C": "Y",
        "y\u030C": "y",
        "A\u0327": "A",
        "a\u0327": "a",
        "B\u0327": "B",
        "b\u0327": "b",
        "\u1E10": "D",
        "\u1E11": "d",
        "\u0228": "E",
        "\u0229": "e",
        "\u0190\u0327": "E",
        "\u025B\u0327": "e",
        "\u1E28": "H",
        "\u1E29": "h",
        "I\u0327": "I",
        "i\u0327": "i",
        "\u0197\u0327": "I",
        "\u0268\u0327": "i",
        "M\u0327": "M",
        "m\u0327": "m",
        "O\u0327": "O",
        "o\u0327": "o",
        "Q\u0327": "Q",
        "q\u0327": "q",
        "U\u0327": "U",
        "u\u0327": "u",
        "X\u0327": "X",
        "x\u0327": "x",
        "Z\u0327": "Z",
        "z\u0327": "z",
        "\u0439": "\u0438",
        "\u0419": "\u0418",
        "\u0451": "\u0435",
        "\u0401": "\u0415"
      };
      var chars = Object.keys(characterMap).join("|");
      var allAccents = new RegExp(chars, "g");
      var firstAccent = new RegExp(chars, "");
      function matcher(match2) {
        return characterMap[match2];
      }
      var removeAccents2 = function(string) {
        return string.replace(allAccents, matcher);
      };
      var hasAccents = function(string) {
        return !!string.match(firstAccent);
      };
      module.exports = removeAccents2;
      module.exports.has = hasAccents;
      module.exports.remove = removeAccents2;
    }
  });

  // package-external:@wordpress/api-fetch
  var require_api_fetch = __commonJS({
    "package-external:@wordpress/api-fetch"(exports, module) {
      module.exports = window.wp.apiFetch;
    }
  });

  // package-external:@wordpress/html-entities
  var require_html_entities = __commonJS({
    "package-external:@wordpress/html-entities"(exports, module) {
      module.exports = window.wp.htmlEntities;
    }
  });

  // package-external:@wordpress/style-engine
  var require_style_engine = __commonJS({
    "package-external:@wordpress/style-engine"(exports, module) {
      module.exports = window.wp.styleEngine;
    }
  });

  // package-external:@wordpress/keycodes
  var require_keycodes = __commonJS({
    "package-external:@wordpress/keycodes"(exports, module) {
      module.exports = window.wp.keycodes;
    }
  });

  // package-external:@wordpress/dom
  var require_dom = __commonJS({
    "package-external:@wordpress/dom"(exports, module) {
      module.exports = window.wp.dom;
    }
  });

  // node_modules/diff/lib/diff/base.js
  var require_base = __commonJS({
    "node_modules/diff/lib/diff/base.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", {
        value: true
      });
      exports.default = Diff;
      function Diff() {
      }
      Diff.prototype = {
        /*istanbul ignore start*/
        /*istanbul ignore end*/
        diff: function diff(oldString, newString) {
          var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
          var callback = options.callback;
          if (typeof options === "function") {
            callback = options;
            options = {};
          }
          this.options = options;
          var self = this;
          function done(value) {
            if (callback) {
              setTimeout(function() {
                callback(void 0, value);
              }, 0);
              return true;
            } else {
              return value;
            }
          }
          oldString = this.castInput(oldString);
          newString = this.castInput(newString);
          oldString = this.removeEmpty(this.tokenize(oldString));
          newString = this.removeEmpty(this.tokenize(newString));
          var newLen = newString.length, oldLen = oldString.length;
          var editLength = 1;
          var maxEditLength = newLen + oldLen;
          var bestPath = [{
            newPos: -1,
            components: []
          }];
          var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);
          if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {
            return done([{
              value: this.join(newString),
              count: newString.length
            }]);
          }
          function execEditLength() {
            for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {
              var basePath = (
                /*istanbul ignore start*/
                void 0
              );
              var addPath = bestPath[diagonalPath - 1], removePath = bestPath[diagonalPath + 1], _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;
              if (addPath) {
                bestPath[diagonalPath - 1] = void 0;
              }
              var canAdd = addPath && addPath.newPos + 1 < newLen, canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen;
              if (!canAdd && !canRemove) {
                bestPath[diagonalPath] = void 0;
                continue;
              }
              if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {
                basePath = clonePath(removePath);
                self.pushComponent(basePath.components, void 0, true);
              } else {
                basePath = addPath;
                basePath.newPos++;
                self.pushComponent(basePath.components, true, void 0);
              }
              _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath);
              if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) {
                return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken));
              } else {
                bestPath[diagonalPath] = basePath;
              }
            }
            editLength++;
          }
          if (callback) {
            (function exec() {
              setTimeout(function() {
                if (editLength > maxEditLength) {
                  return callback();
                }
                if (!execEditLength()) {
                  exec();
                }
              }, 0);
            })();
          } else {
            while (editLength <= maxEditLength) {
              var ret = execEditLength();
              if (ret) {
                return ret;
              }
            }
          }
        },
        /*istanbul ignore start*/
        /*istanbul ignore end*/
        pushComponent: function pushComponent(components, added, removed) {
          var last = components[components.length - 1];
          if (last && last.added === added && last.removed === removed) {
            components[components.length - 1] = {
              count: last.count + 1,
              added,
              removed
            };
          } else {
            components.push({
              count: 1,
              added,
              removed
            });
          }
        },
        /*istanbul ignore start*/
        /*istanbul ignore end*/
        extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) {
          var newLen = newString.length, oldLen = oldString.length, newPos = basePath.newPos, oldPos = newPos - diagonalPath, commonCount = 0;
          while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {
            newPos++;
            oldPos++;
            commonCount++;
          }
          if (commonCount) {
            basePath.components.push({
              count: commonCount
            });
          }
          basePath.newPos = newPos;
          return oldPos;
        },
        /*istanbul ignore start*/
        /*istanbul ignore end*/
        equals: function equals(left, right) {
          if (this.options.comparator) {
            return this.options.comparator(left, right);
          } else {
            return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase();
          }
        },
        /*istanbul ignore start*/
        /*istanbul ignore end*/
        removeEmpty: function removeEmpty(array) {
          var ret = [];
          for (var i2 = 0; i2 < array.length; i2++) {
            if (array[i2]) {
              ret.push(array[i2]);
            }
          }
          return ret;
        },
        /*istanbul ignore start*/
        /*istanbul ignore end*/
        castInput: function castInput(value) {
          return value;
        },
        /*istanbul ignore start*/
        /*istanbul ignore end*/
        tokenize: function tokenize2(value) {
          return value.split("");
        },
        /*istanbul ignore start*/
        /*istanbul ignore end*/
        join: function join(chars) {
          return chars.join("");
        }
      };
      function buildValues(diff, components, newString, oldString, useLongestToken) {
        var componentPos = 0, componentLen = components.length, newPos = 0, oldPos = 0;
        for (; componentPos < componentLen; componentPos++) {
          var component = components[componentPos];
          if (!component.removed) {
            if (!component.added && useLongestToken) {
              var value = newString.slice(newPos, newPos + component.count);
              value = value.map(function(value2, i2) {
                var oldValue = oldString[oldPos + i2];
                return oldValue.length > value2.length ? oldValue : value2;
              });
              component.value = diff.join(value);
            } else {
              component.value = diff.join(newString.slice(newPos, newPos + component.count));
            }
            newPos += component.count;
            if (!component.added) {
              oldPos += component.count;
            }
          } else {
            component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));
            oldPos += component.count;
            if (componentPos && components[componentPos - 1].added) {
              var tmp = components[componentPos - 1];
              components[componentPos - 1] = components[componentPos];
              components[componentPos] = tmp;
            }
          }
        }
        var lastComponent = components[componentLen - 1];
        if (componentLen > 1 && typeof lastComponent.value === "string" && (lastComponent.added || lastComponent.removed) && diff.equals("", lastComponent.value)) {
          components[componentLen - 2].value += lastComponent.value;
          components.pop();
        }
        return components;
      }
      function clonePath(path) {
        return {
          newPos: path.newPos,
          components: path.components.slice(0)
        };
      }
    }
  });

  // node_modules/diff/lib/diff/character.js
  var require_character = __commonJS({
    "node_modules/diff/lib/diff/character.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", {
        value: true
      });
      exports.diffChars = diffChars2;
      exports.characterDiff = void 0;
      var _base = _interopRequireDefault(require_base());
      function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : { default: obj };
      }
      var characterDiff = new /*istanbul ignore start*/
      _base.default();
      exports.characterDiff = characterDiff;
      function diffChars2(oldStr, newStr, options) {
        return characterDiff.diff(oldStr, newStr, options);
      }
    }
  });

  // vendor-external:react
  var require_react = __commonJS({
    "vendor-external:react"(exports, module) {
      module.exports = window.React;
    }
  });

  // node_modules/react-is/cjs/react-is.development.js
  var require_react_is_development = __commonJS({
    "node_modules/react-is/cjs/react-is.development.js"(exports) {
      "use strict";
      if (true) {
        (function() {
          "use strict";
          var hasSymbol = typeof Symbol === "function" && Symbol.for;
          var REACT_ELEMENT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
          var REACT_PORTAL_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.portal") : 60106;
          var REACT_FRAGMENT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107;
          var REACT_STRICT_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108;
          var REACT_PROFILER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114;
          var REACT_PROVIDER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.provider") : 60109;
          var REACT_CONTEXT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.context") : 60110;
          var REACT_ASYNC_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111;
          var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111;
          var REACT_FORWARD_REF_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112;
          var REACT_SUSPENSE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113;
          var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120;
          var REACT_MEMO_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.memo") : 60115;
          var REACT_LAZY_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116;
          var REACT_BLOCK_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.block") : 60121;
          var REACT_FUNDAMENTAL_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117;
          var REACT_RESPONDER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.responder") : 60118;
          var REACT_SCOPE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
          function isValidElementType(type) {
            return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
            type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
          }
          function typeOf(object) {
            if (typeof object === "object" && object !== null) {
              var $$typeof = object.$$typeof;
              switch ($$typeof) {
                case REACT_ELEMENT_TYPE:
                  var type = object.type;
                  switch (type) {
                    case REACT_ASYNC_MODE_TYPE:
                    case REACT_CONCURRENT_MODE_TYPE:
                    case REACT_FRAGMENT_TYPE:
                    case REACT_PROFILER_TYPE:
                    case REACT_STRICT_MODE_TYPE:
                    case REACT_SUSPENSE_TYPE:
                      return type;
                    default:
                      var $$typeofType = type && type.$$typeof;
                      switch ($$typeofType) {
                        case REACT_CONTEXT_TYPE:
                        case REACT_FORWARD_REF_TYPE:
                        case REACT_LAZY_TYPE:
                        case REACT_MEMO_TYPE:
                        case REACT_PROVIDER_TYPE:
                          return $$typeofType;
                        default:
                          return $$typeof;
                      }
                  }
                case REACT_PORTAL_TYPE:
                  return $$typeof;
              }
            }
            return void 0;
          }
          var AsyncMode = REACT_ASYNC_MODE_TYPE;
          var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
          var ContextConsumer = REACT_CONTEXT_TYPE;
          var ContextProvider = REACT_PROVIDER_TYPE;
          var Element2 = REACT_ELEMENT_TYPE;
          var ForwardRef = REACT_FORWARD_REF_TYPE;
          var Fragment93 = REACT_FRAGMENT_TYPE;
          var Lazy = REACT_LAZY_TYPE;
          var Memo = REACT_MEMO_TYPE;
          var Portal = REACT_PORTAL_TYPE;
          var Profiler = REACT_PROFILER_TYPE;
          var StrictMode2 = REACT_STRICT_MODE_TYPE;
          var Suspense = REACT_SUSPENSE_TYPE;
          var hasWarnedAboutDeprecatedIsAsyncMode = false;
          function isAsyncMode(object) {
            {
              if (!hasWarnedAboutDeprecatedIsAsyncMode) {
                hasWarnedAboutDeprecatedIsAsyncMode = true;
                console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
              }
            }
            return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
          }
          function isConcurrentMode(object) {
            return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
          }
          function isContextConsumer(object) {
            return typeOf(object) === REACT_CONTEXT_TYPE;
          }
          function isContextProvider(object) {
            return typeOf(object) === REACT_PROVIDER_TYPE;
          }
          function isElement(object) {
            return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
          }
          function isForwardRef(object) {
            return typeOf(object) === REACT_FORWARD_REF_TYPE;
          }
          function isFragment(object) {
            return typeOf(object) === REACT_FRAGMENT_TYPE;
          }
          function isLazy(object) {
            return typeOf(object) === REACT_LAZY_TYPE;
          }
          function isMemo(object) {
            return typeOf(object) === REACT_MEMO_TYPE;
          }
          function isPortal(object) {
            return typeOf(object) === REACT_PORTAL_TYPE;
          }
          function isProfiler(object) {
            return typeOf(object) === REACT_PROFILER_TYPE;
          }
          function isStrictMode(object) {
            return typeOf(object) === REACT_STRICT_MODE_TYPE;
          }
          function isSuspense(object) {
            return typeOf(object) === REACT_SUSPENSE_TYPE;
          }
          exports.AsyncMode = AsyncMode;
          exports.ConcurrentMode = ConcurrentMode;
          exports.ContextConsumer = ContextConsumer;
          exports.ContextProvider = ContextProvider;
          exports.Element = Element2;
          exports.ForwardRef = ForwardRef;
          exports.Fragment = Fragment93;
          exports.Lazy = Lazy;
          exports.Memo = Memo;
          exports.Portal = Portal;
          exports.Profiler = Profiler;
          exports.StrictMode = StrictMode2;
          exports.Suspense = Suspense;
          exports.isAsyncMode = isAsyncMode;
          exports.isConcurrentMode = isConcurrentMode;
          exports.isContextConsumer = isContextConsumer;
          exports.isContextProvider = isContextProvider;
          exports.isElement = isElement;
          exports.isForwardRef = isForwardRef;
          exports.isFragment = isFragment;
          exports.isLazy = isLazy;
          exports.isMemo = isMemo;
          exports.isPortal = isPortal;
          exports.isProfiler = isProfiler;
          exports.isStrictMode = isStrictMode;
          exports.isSuspense = isSuspense;
          exports.isValidElementType = isValidElementType;
          exports.typeOf = typeOf;
        })();
      }
    }
  });

  // node_modules/react-is/index.js
  var require_react_is = __commonJS({
    "node_modules/react-is/index.js"(exports, module) {
      "use strict";
      if (false) {
        module.exports = null;
      } else {
        module.exports = require_react_is_development();
      }
    }
  });

  // node_modules/object-assign/index.js
  var require_object_assign = __commonJS({
    "node_modules/object-assign/index.js"(exports, module) {
      "use strict";
      var getOwnPropertySymbols = Object.getOwnPropertySymbols;
      var hasOwnProperty = Object.prototype.hasOwnProperty;
      var propIsEnumerable = Object.prototype.propertyIsEnumerable;
      function toObject(val) {
        if (val === null || val === void 0) {
          throw new TypeError("Object.assign cannot be called with null or undefined");
        }
        return Object(val);
      }
      function shouldUseNative() {
        try {
          if (!Object.assign) {
            return false;
          }
          var test1 = new String("abc");
          test1[5] = "de";
          if (Object.getOwnPropertyNames(test1)[0] === "5") {
            return false;
          }
          var test2 = {};
          for (var i2 = 0; i2 < 10; i2++) {
            test2["_" + String.fromCharCode(i2)] = i2;
          }
          var order2 = Object.getOwnPropertyNames(test2).map(function(n2) {
            return test2[n2];
          });
          if (order2.join("") !== "0123456789") {
            return false;
          }
          var test3 = {};
          "abcdefghijklmnopqrst".split("").forEach(function(letter) {
            test3[letter] = letter;
          });
          if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
            return false;
          }
          return true;
        } catch (err) {
          return false;
        }
      }
      module.exports = shouldUseNative() ? Object.assign : function(target, source) {
        var from;
        var to2 = toObject(target);
        var symbols;
        for (var s2 = 1; s2 < arguments.length; s2++) {
          from = Object(arguments[s2]);
          for (var key in from) {
            if (hasOwnProperty.call(from, key)) {
              to2[key] = from[key];
            }
          }
          if (getOwnPropertySymbols) {
            symbols = getOwnPropertySymbols(from);
            for (var i2 = 0; i2 < symbols.length; i2++) {
              if (propIsEnumerable.call(from, symbols[i2])) {
                to2[symbols[i2]] = from[symbols[i2]];
              }
            }
          }
        }
        return to2;
      };
    }
  });

  // node_modules/prop-types/lib/ReactPropTypesSecret.js
  var require_ReactPropTypesSecret = __commonJS({
    "node_modules/prop-types/lib/ReactPropTypesSecret.js"(exports, module) {
      "use strict";
      var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
      module.exports = ReactPropTypesSecret;
    }
  });

  // node_modules/prop-types/lib/has.js
  var require_has = __commonJS({
    "node_modules/prop-types/lib/has.js"(exports, module) {
      module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
    }
  });

  // node_modules/prop-types/checkPropTypes.js
  var require_checkPropTypes = __commonJS({
    "node_modules/prop-types/checkPropTypes.js"(exports, module) {
      "use strict";
      var printWarning = function() {
      };
      if (true) {
        ReactPropTypesSecret = require_ReactPropTypesSecret();
        loggedTypeFailures = {};
        has2 = require_has();
        printWarning = function(text) {
          var message2 = "Warning: " + text;
          if (typeof console !== "undefined") {
            console.error(message2);
          }
          try {
            throw new Error(message2);
          } catch (x2) {
          }
        };
      }
      var ReactPropTypesSecret;
      var loggedTypeFailures;
      var has2;
      function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
        if (true) {
          for (var typeSpecName in typeSpecs) {
            if (has2(typeSpecs, typeSpecName)) {
              var error;
              try {
                if (typeof typeSpecs[typeSpecName] !== "function") {
                  var err = Error(
                    (componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
                  );
                  err.name = "Invariant Violation";
                  throw err;
                }
                error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
              } catch (ex) {
                error = ex;
              }
              if (error && !(error instanceof Error)) {
                printWarning(
                  (componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
                );
              }
              if (error instanceof Error && !(error.message in loggedTypeFailures)) {
                loggedTypeFailures[error.message] = true;
                var stack = getStack ? getStack() : "";
                printWarning(
                  "Failed " + location + " type: " + error.message + (stack != null ? stack : "")
                );
              }
            }
          }
        }
      }
      checkPropTypes.resetWarningCache = function() {
        if (true) {
          loggedTypeFailures = {};
        }
      };
      module.exports = checkPropTypes;
    }
  });

  // node_modules/prop-types/factoryWithTypeCheckers.js
  var require_factoryWithTypeCheckers = __commonJS({
    "node_modules/prop-types/factoryWithTypeCheckers.js"(exports, module) {
      "use strict";
      var ReactIs = require_react_is();
      var assign2 = require_object_assign();
      var ReactPropTypesSecret = require_ReactPropTypesSecret();
      var has2 = require_has();
      var checkPropTypes = require_checkPropTypes();
      var printWarning = function() {
      };
      if (true) {
        printWarning = function(text) {
          var message2 = "Warning: " + text;
          if (typeof console !== "undefined") {
            console.error(message2);
          }
          try {
            throw new Error(message2);
          } catch (x2) {
          }
        };
      }
      function emptyFunctionThatReturnsNull() {
        return null;
      }
      module.exports = function(isValidElement2, throwOnDirectAccess) {
        var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
        var FAUX_ITERATOR_SYMBOL = "@@iterator";
        function getIteratorFn(maybeIterable) {
          var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
          if (typeof iteratorFn === "function") {
            return iteratorFn;
          }
        }
        var ANONYMOUS = "<<anonymous>>";
        var ReactPropTypes = {
          array: createPrimitiveTypeChecker("array"),
          bigint: createPrimitiveTypeChecker("bigint"),
          bool: createPrimitiveTypeChecker("boolean"),
          func: createPrimitiveTypeChecker("function"),
          number: createPrimitiveTypeChecker("number"),
          object: createPrimitiveTypeChecker("object"),
          string: createPrimitiveTypeChecker("string"),
          symbol: createPrimitiveTypeChecker("symbol"),
          any: createAnyTypeChecker(),
          arrayOf: createArrayOfTypeChecker,
          element: createElementTypeChecker(),
          elementType: createElementTypeTypeChecker(),
          instanceOf: createInstanceTypeChecker,
          node: createNodeChecker(),
          objectOf: createObjectOfTypeChecker,
          oneOf: createEnumTypeChecker,
          oneOfType: createUnionTypeChecker,
          shape: createShapeTypeChecker,
          exact: createStrictShapeTypeChecker
        };
        function is2(x2, y2) {
          if (x2 === y2) {
            return x2 !== 0 || 1 / x2 === 1 / y2;
          } else {
            return x2 !== x2 && y2 !== y2;
          }
        }
        function PropTypeError(message2, data) {
          this.message = message2;
          this.data = data && typeof data === "object" ? data : {};
          this.stack = "";
        }
        PropTypeError.prototype = Error.prototype;
        function createChainableTypeChecker(validate) {
          if (true) {
            var manualPropTypeCallCache = {};
            var manualPropTypeWarningCount = 0;
          }
          function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
            componentName = componentName || ANONYMOUS;
            propFullName = propFullName || propName;
            if (secret !== ReactPropTypesSecret) {
              if (throwOnDirectAccess) {
                var err = new Error(
                  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
                );
                err.name = "Invariant Violation";
                throw err;
              } else if (typeof console !== "undefined") {
                var cacheKey2 = componentName + ":" + propName;
                if (!manualPropTypeCallCache[cacheKey2] && // Avoid spamming the console because they are often not actionable except for lib authors
                manualPropTypeWarningCount < 3) {
                  printWarning(
                    "You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
                  );
                  manualPropTypeCallCache[cacheKey2] = true;
                  manualPropTypeWarningCount++;
                }
              }
            }
            if (props[propName] == null) {
              if (isRequired) {
                if (props[propName] === null) {
                  return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`."));
                }
                return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`."));
              }
              return null;
            } else {
              return validate(props, propName, componentName, location, propFullName);
            }
          }
          var chainedCheckType = checkType.bind(null, false);
          chainedCheckType.isRequired = checkType.bind(null, true);
          return chainedCheckType;
        }
        function createPrimitiveTypeChecker(expectedType) {
          function validate(props, propName, componentName, location, propFullName, secret) {
            var propValue = props[propName];
            var propType = getPropType(propValue);
            if (propType !== expectedType) {
              var preciseType = getPreciseType(propValue);
              return new PropTypeError(
                "Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."),
                { expectedType }
              );
            }
            return null;
          }
          return createChainableTypeChecker(validate);
        }
        function createAnyTypeChecker() {
          return createChainableTypeChecker(emptyFunctionThatReturnsNull);
        }
        function createArrayOfTypeChecker(typeChecker) {
          function validate(props, propName, componentName, location, propFullName) {
            if (typeof typeChecker !== "function") {
              return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
            }
            var propValue = props[propName];
            if (!Array.isArray(propValue)) {
              var propType = getPropType(propValue);
              return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
            }
            for (var i2 = 0; i2 < propValue.length; i2++) {
              var error = typeChecker(propValue, i2, componentName, location, propFullName + "[" + i2 + "]", ReactPropTypesSecret);
              if (error instanceof Error) {
                return error;
              }
            }
            return null;
          }
          return createChainableTypeChecker(validate);
        }
        function createElementTypeChecker() {
          function validate(props, propName, componentName, location, propFullName) {
            var propValue = props[propName];
            if (!isValidElement2(propValue)) {
              var propType = getPropType(propValue);
              return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
            }
            return null;
          }
          return createChainableTypeChecker(validate);
        }
        function createElementTypeTypeChecker() {
          function validate(props, propName, componentName, location, propFullName) {
            var propValue = props[propName];
            if (!ReactIs.isValidElementType(propValue)) {
              var propType = getPropType(propValue);
              return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type."));
            }
            return null;
          }
          return createChainableTypeChecker(validate);
        }
        function createInstanceTypeChecker(expectedClass) {
          function validate(props, propName, componentName, location, propFullName) {
            if (!(props[propName] instanceof expectedClass)) {
              var expectedClassName = expectedClass.name || ANONYMOUS;
              var actualClassName = getClassName(props[propName]);
              return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
            }
            return null;
          }
          return createChainableTypeChecker(validate);
        }
        function createEnumTypeChecker(expectedValues) {
          if (!Array.isArray(expectedValues)) {
            if (true) {
              if (arguments.length > 1) {
                printWarning(
                  "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
                );
              } else {
                printWarning("Invalid argument supplied to oneOf, expected an array.");
              }
            }
            return emptyFunctionThatReturnsNull;
          }
          function validate(props, propName, componentName, location, propFullName) {
            var propValue = props[propName];
            for (var i2 = 0; i2 < expectedValues.length; i2++) {
              if (is2(propValue, expectedValues[i2])) {
                return null;
              }
            }
            var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
              var type = getPreciseType(value);
              if (type === "symbol") {
                return String(value);
              }
              return value;
            });
            return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
          }
          return createChainableTypeChecker(validate);
        }
        function createObjectOfTypeChecker(typeChecker) {
          function validate(props, propName, componentName, location, propFullName) {
            if (typeof typeChecker !== "function") {
              return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
            }
            var propValue = props[propName];
            var propType = getPropType(propValue);
            if (propType !== "object") {
              return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
            }
            for (var key in propValue) {
              if (has2(propValue, key)) {
                var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
                if (error instanceof Error) {
                  return error;
                }
              }
            }
            return null;
          }
          return createChainableTypeChecker(validate);
        }
        function createUnionTypeChecker(arrayOfTypeCheckers) {
          if (!Array.isArray(arrayOfTypeCheckers)) {
            true ? printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") : void 0;
            return emptyFunctionThatReturnsNull;
          }
          for (var i2 = 0; i2 < arrayOfTypeCheckers.length; i2++) {
            var checker = arrayOfTypeCheckers[i2];
            if (typeof checker !== "function") {
              printWarning(
                "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i2 + "."
              );
              return emptyFunctionThatReturnsNull;
            }
          }
          function validate(props, propName, componentName, location, propFullName) {
            var expectedTypes = [];
            for (var i3 = 0; i3 < arrayOfTypeCheckers.length; i3++) {
              var checker2 = arrayOfTypeCheckers[i3];
              var checkerResult = checker2(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
              if (checkerResult == null) {
                return null;
              }
              if (checkerResult.data && has2(checkerResult.data, "expectedType")) {
                expectedTypes.push(checkerResult.data.expectedType);
              }
            }
            var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
            return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
          }
          return createChainableTypeChecker(validate);
        }
        function createNodeChecker() {
          function validate(props, propName, componentName, location, propFullName) {
            if (!isNode(props[propName])) {
              return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
            }
            return null;
          }
          return createChainableTypeChecker(validate);
        }
        function invalidValidatorError(componentName, location, propFullName, key, type) {
          return new PropTypeError(
            (componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."
          );
        }
        function createShapeTypeChecker(shapeTypes) {
          function validate(props, propName, componentName, location, propFullName) {
            var propValue = props[propName];
            var propType = getPropType(propValue);
            if (propType !== "object") {
              return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
            }
            for (var key in shapeTypes) {
              var checker = shapeTypes[key];
              if (typeof checker !== "function") {
                return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
              }
              var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
              if (error) {
                return error;
              }
            }
            return null;
          }
          return createChainableTypeChecker(validate);
        }
        function createStrictShapeTypeChecker(shapeTypes) {
          function validate(props, propName, componentName, location, propFullName) {
            var propValue = props[propName];
            var propType = getPropType(propValue);
            if (propType !== "object") {
              return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
            }
            var allKeys = assign2({}, props[propName], shapeTypes);
            for (var key in allKeys) {
              var checker = shapeTypes[key];
              if (has2(shapeTypes, key) && typeof checker !== "function") {
                return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
              }
              if (!checker) {
                return new PropTypeError(
                  "Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, "  ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, "  ")
                );
              }
              var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
              if (error) {
                return error;
              }
            }
            return null;
          }
          return createChainableTypeChecker(validate);
        }
        function isNode(propValue) {
          switch (typeof propValue) {
            case "number":
            case "string":
            case "undefined":
              return true;
            case "boolean":
              return !propValue;
            case "object":
              if (Array.isArray(propValue)) {
                return propValue.every(isNode);
              }
              if (propValue === null || isValidElement2(propValue)) {
                return true;
              }
              var iteratorFn = getIteratorFn(propValue);
              if (iteratorFn) {
                var iterator = iteratorFn.call(propValue);
                var step;
                if (iteratorFn !== propValue.entries) {
                  while (!(step = iterator.next()).done) {
                    if (!isNode(step.value)) {
                      return false;
                    }
                  }
                } else {
                  while (!(step = iterator.next()).done) {
                    var entry = step.value;
                    if (entry) {
                      if (!isNode(entry[1])) {
                        return false;
                      }
                    }
                  }
                }
              } else {
                return false;
              }
              return true;
            default:
              return false;
          }
        }
        function isSymbol(propType, propValue) {
          if (propType === "symbol") {
            return true;
          }
          if (!propValue) {
            return false;
          }
          if (propValue["@@toStringTag"] === "Symbol") {
            return true;
          }
          if (typeof Symbol === "function" && propValue instanceof Symbol) {
            return true;
          }
          return false;
        }
        function getPropType(propValue) {
          var propType = typeof propValue;
          if (Array.isArray(propValue)) {
            return "array";
          }
          if (propValue instanceof RegExp) {
            return "object";
          }
          if (isSymbol(propType, propValue)) {
            return "symbol";
          }
          return propType;
        }
        function getPreciseType(propValue) {
          if (typeof propValue === "undefined" || propValue === null) {
            return "" + propValue;
          }
          var propType = getPropType(propValue);
          if (propType === "object") {
            if (propValue instanceof Date) {
              return "date";
            } else if (propValue instanceof RegExp) {
              return "regexp";
            }
          }
          return propType;
        }
        function getPostfixForTypeWarning(value) {
          var type = getPreciseType(value);
          switch (type) {
            case "array":
            case "object":
              return "an " + type;
            case "boolean":
            case "date":
            case "regexp":
              return "a " + type;
            default:
              return type;
          }
        }
        function getClassName(propValue) {
          if (!propValue.constructor || !propValue.constructor.name) {
            return ANONYMOUS;
          }
          return propValue.constructor.name;
        }
        ReactPropTypes.checkPropTypes = checkPropTypes;
        ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
        ReactPropTypes.PropTypes = ReactPropTypes;
        return ReactPropTypes;
      };
    }
  });

  // node_modules/prop-types/index.js
  var require_prop_types = __commonJS({
    "node_modules/prop-types/index.js"(exports, module) {
      if (true) {
        ReactIs = require_react_is();
        throwOnDirectAccess = true;
        module.exports = require_factoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
      } else {
        module.exports = null();
      }
      var ReactIs;
      var throwOnDirectAccess;
    }
  });

  // node_modules/autosize/dist/autosize.js
  var require_autosize = __commonJS({
    "node_modules/autosize/dist/autosize.js"(exports, module) {
      (function(global, factory) {
        if (typeof define === "function" && define.amd) {
          define(["module", "exports"], factory);
        } else if (typeof exports !== "undefined") {
          factory(module, exports);
        } else {
          var mod = {
            exports: {}
          };
          factory(mod, mod.exports);
          global.autosize = mod.exports;
        }
      })(exports, function(module2, exports2) {
        "use strict";
        var map = typeof Map === "function" ? /* @__PURE__ */ new Map() : /* @__PURE__ */ (function() {
          var keys = [];
          var values = [];
          return {
            has: function has2(key) {
              return keys.indexOf(key) > -1;
            },
            get: function get(key) {
              return values[keys.indexOf(key)];
            },
            set: function set(key, value) {
              if (keys.indexOf(key) === -1) {
                keys.push(key);
                values.push(value);
              }
            },
            delete: function _delete(key) {
              var index = keys.indexOf(key);
              if (index > -1) {
                keys.splice(index, 1);
                values.splice(index, 1);
              }
            }
          };
        })();
        var createEvent = function createEvent2(name) {
          return new Event(name, { bubbles: true });
        };
        try {
          new Event("test");
        } catch (e2) {
          createEvent = function createEvent2(name) {
            var evt = document.createEvent("Event");
            evt.initEvent(name, true, false);
            return evt;
          };
        }
        function assign2(ta) {
          if (!ta || !ta.nodeName || ta.nodeName !== "TEXTAREA" || map.has(ta)) return;
          var heightOffset = null;
          var clientWidth = null;
          var cachedHeight = null;
          function init() {
            var style = window.getComputedStyle(ta, null);
            if (style.resize === "vertical") {
              ta.style.resize = "none";
            } else if (style.resize === "both") {
              ta.style.resize = "horizontal";
            }
            if (style.boxSizing === "content-box") {
              heightOffset = -(parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));
            } else {
              heightOffset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
            }
            if (isNaN(heightOffset)) {
              heightOffset = 0;
            }
            update5();
          }
          function changeOverflow(value) {
            {
              var width = ta.style.width;
              ta.style.width = "0px";
              ta.offsetWidth;
              ta.style.width = width;
            }
            ta.style.overflowY = value;
          }
          function getParentOverflows(el) {
            var arr = [];
            while (el && el.parentNode && el.parentNode instanceof Element) {
              if (el.parentNode.scrollTop) {
                arr.push({
                  node: el.parentNode,
                  scrollTop: el.parentNode.scrollTop
                });
              }
              el = el.parentNode;
            }
            return arr;
          }
          function resize() {
            if (ta.scrollHeight === 0) {
              return;
            }
            var overflows = getParentOverflows(ta);
            var docTop = document.documentElement && document.documentElement.scrollTop;
            ta.style.height = "";
            ta.style.height = ta.scrollHeight + heightOffset + "px";
            clientWidth = ta.clientWidth;
            overflows.forEach(function(el) {
              el.node.scrollTop = el.scrollTop;
            });
            if (docTop) {
              document.documentElement.scrollTop = docTop;
            }
          }
          function update5() {
            resize();
            var styleHeight = Math.round(parseFloat(ta.style.height));
            var computed = window.getComputedStyle(ta, null);
            var actualHeight = computed.boxSizing === "content-box" ? Math.round(parseFloat(computed.height)) : ta.offsetHeight;
            if (actualHeight < styleHeight) {
              if (computed.overflowY === "hidden") {
                changeOverflow("scroll");
                resize();
                actualHeight = computed.boxSizing === "content-box" ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
              }
            } else {
              if (computed.overflowY !== "hidden") {
                changeOverflow("hidden");
                resize();
                actualHeight = computed.boxSizing === "content-box" ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
              }
            }
            if (cachedHeight !== actualHeight) {
              cachedHeight = actualHeight;
              var evt = createEvent("autosize:resized");
              try {
                ta.dispatchEvent(evt);
              } catch (err) {
              }
            }
          }
          var pageResize = function pageResize2() {
            if (ta.clientWidth !== clientWidth) {
              update5();
            }
          };
          var destroy2 = function(style) {
            window.removeEventListener("resize", pageResize, false);
            ta.removeEventListener("input", update5, false);
            ta.removeEventListener("keyup", update5, false);
            ta.removeEventListener("autosize:destroy", destroy2, false);
            ta.removeEventListener("autosize:update", update5, false);
            Object.keys(style).forEach(function(key) {
              ta.style[key] = style[key];
            });
            map.delete(ta);
          }.bind(ta, {
            height: ta.style.height,
            resize: ta.style.resize,
            overflowY: ta.style.overflowY,
            overflowX: ta.style.overflowX,
            wordWrap: ta.style.wordWrap
          });
          ta.addEventListener("autosize:destroy", destroy2, false);
          if ("onpropertychange" in ta && "oninput" in ta) {
            ta.addEventListener("keyup", update5, false);
          }
          window.addEventListener("resize", pageResize, false);
          ta.addEventListener("input", update5, false);
          ta.addEventListener("autosize:update", update5, false);
          ta.style.overflowX = "hidden";
          ta.style.wordWrap = "break-word";
          map.set(ta, {
            destroy: destroy2,
            update: update5
          });
          init();
        }
        function destroy(ta) {
          var methods = map.get(ta);
          if (methods) {
            methods.destroy();
          }
        }
        function update4(ta) {
          var methods = map.get(ta);
          if (methods) {
            methods.update();
          }
        }
        var autosize = null;
        if (typeof window === "undefined" || typeof window.getComputedStyle !== "function") {
          autosize = function autosize2(el) {
            return el;
          };
          autosize.destroy = function(el) {
            return el;
          };
          autosize.update = function(el) {
            return el;
          };
        } else {
          autosize = function autosize2(el, options) {
            if (el) {
              Array.prototype.forEach.call(el.length ? el : [el], function(x2) {
                return assign2(x2, options);
              });
            }
            return el;
          };
          autosize.destroy = function(el) {
            if (el) {
              Array.prototype.forEach.call(el.length ? el : [el], destroy);
            }
            return el;
          };
          autosize.update = function(el) {
            if (el) {
              Array.prototype.forEach.call(el.length ? el : [el], update4);
            }
            return el;
          };
        }
        exports2.default = autosize;
        module2.exports = exports2["default"];
      });
    }
  });

  // node_modules/computed-style/dist/computedStyle.commonjs.js
  var require_computedStyle_commonjs = __commonJS({
    "node_modules/computed-style/dist/computedStyle.commonjs.js"(exports, module) {
      var computedStyle = function(el, prop, getComputedStyle) {
        getComputedStyle = window.getComputedStyle;
        return (
          // If we have getComputedStyle
          (getComputedStyle ? (
            // Query it
            // TODO: From CSS-Query notes, we might need (node, null) for FF
            getComputedStyle(el)
          ) : (
            // Otherwise, we are in IE and use currentStyle
            el.currentStyle
          ))[
            // Switch to camelCase for CSSOM
            // DEV: Grabbed from jQuery
            // https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194
            // https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597
            prop.replace(/-(\w)/gi, function(word, letter) {
              return letter.toUpperCase();
            })
          ]
        );
      };
      module.exports = computedStyle;
    }
  });

  // node_modules/line-height/lib/line-height.js
  var require_line_height = __commonJS({
    "node_modules/line-height/lib/line-height.js"(exports, module) {
      var computedStyle = require_computedStyle_commonjs();
      function lineHeight(node) {
        var lnHeightStr = computedStyle(node, "line-height");
        var lnHeight = parseFloat(lnHeightStr, 10);
        if (lnHeightStr === lnHeight + "") {
          var _lnHeightStyle = node.style.lineHeight;
          node.style.lineHeight = lnHeightStr + "em";
          lnHeightStr = computedStyle(node, "line-height");
          lnHeight = parseFloat(lnHeightStr, 10);
          if (_lnHeightStyle) {
            node.style.lineHeight = _lnHeightStyle;
          } else {
            delete node.style.lineHeight;
          }
        }
        if (lnHeightStr.indexOf("pt") !== -1) {
          lnHeight *= 4;
          lnHeight /= 3;
        } else if (lnHeightStr.indexOf("mm") !== -1) {
          lnHeight *= 96;
          lnHeight /= 25.4;
        } else if (lnHeightStr.indexOf("cm") !== -1) {
          lnHeight *= 96;
          lnHeight /= 2.54;
        } else if (lnHeightStr.indexOf("in") !== -1) {
          lnHeight *= 96;
        } else if (lnHeightStr.indexOf("pc") !== -1) {
          lnHeight *= 16;
        }
        lnHeight = Math.round(lnHeight);
        if (lnHeightStr === "normal") {
          var nodeName = node.nodeName;
          var _node = document.createElement(nodeName);
          _node.innerHTML = "&nbsp;";
          if (nodeName.toUpperCase() === "TEXTAREA") {
            _node.setAttribute("rows", "1");
          }
          var fontSizeStr = computedStyle(node, "font-size");
          _node.style.fontSize = fontSizeStr;
          _node.style.padding = "0px";
          _node.style.border = "0px";
          var body = document.body;
          body.appendChild(_node);
          var height = _node.offsetHeight;
          lnHeight = height;
          body.removeChild(_node);
        }
        return lnHeight;
      }
      module.exports = lineHeight;
    }
  });

  // node_modules/react-autosize-textarea/lib/TextareaAutosize.js
  var require_TextareaAutosize = __commonJS({
    "node_modules/react-autosize-textarea/lib/TextareaAutosize.js"(exports) {
      "use strict";
      var __extends2 = exports && exports.__extends || (function() {
        var extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
          d2.__proto__ = b2;
        } || function(d2, b2) {
          for (var p2 in b2) if (b2.hasOwnProperty(p2)) d2[p2] = b2[p2];
        };
        return function(d2, b2) {
          extendStatics2(d2, b2);
          function __223() {
            this.constructor = d2;
          }
          d2.prototype = b2 === null ? Object.create(b2) : (__223.prototype = b2.prototype, new __223());
        };
      })();
      var __assign2 = exports && exports.__assign || Object.assign || function(t3) {
        for (var s2, i2 = 1, n2 = arguments.length; i2 < n2; i2++) {
          s2 = arguments[i2];
          for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2))
            t3[p2] = s2[p2];
        }
        return t3;
      };
      var __rest = exports && exports.__rest || function(s2, e2) {
        var t3 = {};
        for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0)
          t3[p2] = s2[p2];
        if (s2 != null && typeof Object.getOwnPropertySymbols === "function") {
          for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) if (e2.indexOf(p2[i2]) < 0)
            t3[p2[i2]] = s2[p2[i2]];
        }
        return t3;
      };
      exports.__esModule = true;
      var React8 = require_react();
      var PropTypes = require_prop_types();
      var autosize = require_autosize();
      var _getLineHeight = require_line_height();
      var getLineHeight = _getLineHeight;
      var RESIZED = "autosize:resized";
      var TextareaAutosizeClass = (
        /** @class */
        (function(_super) {
          __extends2(TextareaAutosizeClass2, _super);
          function TextareaAutosizeClass2() {
            var _this = _super !== null && _super.apply(this, arguments) || this;
            _this.state = {
              lineHeight: null
            };
            _this.textarea = null;
            _this.onResize = function(e2) {
              if (_this.props.onResize) {
                _this.props.onResize(e2);
              }
            };
            _this.updateLineHeight = function() {
              if (_this.textarea) {
                _this.setState({
                  lineHeight: getLineHeight(_this.textarea)
                });
              }
            };
            _this.onChange = function(e2) {
              var onChange = _this.props.onChange;
              _this.currentValue = e2.currentTarget.value;
              onChange && onChange(e2);
            };
            return _this;
          }
          TextareaAutosizeClass2.prototype.componentDidMount = function() {
            var _this = this;
            var _a = this.props, maxRows = _a.maxRows, async = _a.async;
            if (typeof maxRows === "number") {
              this.updateLineHeight();
            }
            if (typeof maxRows === "number" || async) {
              setTimeout(function() {
                return _this.textarea && autosize(_this.textarea);
              });
            } else {
              this.textarea && autosize(this.textarea);
            }
            if (this.textarea) {
              this.textarea.addEventListener(RESIZED, this.onResize);
            }
          };
          TextareaAutosizeClass2.prototype.componentWillUnmount = function() {
            if (this.textarea) {
              this.textarea.removeEventListener(RESIZED, this.onResize);
              autosize.destroy(this.textarea);
            }
          };
          TextareaAutosizeClass2.prototype.render = function() {
            var _this = this;
            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;
            var maxHeight = maxRows && lineHeight ? lineHeight * maxRows : null;
            return React8.createElement("textarea", __assign2({}, props, { onChange: this.onChange, style: maxHeight ? __assign2({}, style, { maxHeight }) : style, ref: function(element) {
              _this.textarea = element;
              if (typeof _this.props.innerRef === "function") {
                _this.props.innerRef(element);
              } else if (_this.props.innerRef) {
                _this.props.innerRef.current = element;
              }
            } }), children);
          };
          TextareaAutosizeClass2.prototype.componentDidUpdate = function() {
            this.textarea && autosize.update(this.textarea);
          };
          TextareaAutosizeClass2.defaultProps = {
            rows: 1,
            async: false
          };
          TextareaAutosizeClass2.propTypes = {
            rows: PropTypes.number,
            maxRows: PropTypes.number,
            onResize: PropTypes.func,
            innerRef: PropTypes.any,
            async: PropTypes.bool
          };
          return TextareaAutosizeClass2;
        })(React8.Component)
      );
      exports.TextareaAutosize = React8.forwardRef(function(props, ref) {
        return React8.createElement(TextareaAutosizeClass, __assign2({}, props, { innerRef: ref }));
      });
    }
  });

  // node_modules/react-autosize-textarea/lib/index.js
  var require_lib = __commonJS({
    "node_modules/react-autosize-textarea/lib/index.js"(exports, module) {
      "use strict";
      var TextareaAutosize_1 = require_TextareaAutosize();
      module.exports = TextareaAutosize_1.TextareaAutosize;
    }
  });

  // package-external:@wordpress/warning
  var require_warning = __commonJS({
    "package-external:@wordpress/warning"(exports, module) {
      module.exports = window.wp.warning;
    }
  });

  // vendor-external:react-dom
  var require_react_dom = __commonJS({
    "vendor-external:react-dom"(exports, module) {
      module.exports = window.ReactDOM;
    }
  });

  // package-external:@wordpress/keyboard-shortcuts
  var require_keyboard_shortcuts = __commonJS({
    "package-external:@wordpress/keyboard-shortcuts"(exports, module) {
      module.exports = window.wp.keyboardShortcuts;
    }
  });

  // package-external:@wordpress/upload-media
  var require_upload_media = __commonJS({
    "package-external:@wordpress/upload-media"(exports, module) {
      module.exports = window.wp.uploadMedia;
    }
  });

  // (disabled):node_modules/postcss/node_modules/source-map-js/source-map.js
  var require_source_map = __commonJS({
    "(disabled):node_modules/postcss/node_modules/source-map-js/source-map.js"() {
    }
  });

  // (disabled):path
  var require_path = __commonJS({
    "(disabled):path"() {
    }
  });

  // (disabled):node_modules/url/url.js
  var require_url2 = __commonJS({
    "(disabled):node_modules/url/url.js"() {
    }
  });

  // node_modules/nanoid/non-secure/index.cjs
  var require_non_secure = __commonJS({
    "node_modules/nanoid/non-secure/index.cjs"(exports, module) {
      var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
      var customAlphabet = (alphabet, defaultSize = 21) => {
        return (size = defaultSize) => {
          let id = "";
          let i2 = size | 0;
          while (i2--) {
            id += alphabet[Math.random() * alphabet.length | 0];
          }
          return id;
        };
      };
      var nanoid = (size = 21) => {
        let id = "";
        let i2 = size | 0;
        while (i2--) {
          id += urlAlphabet[Math.random() * 64 | 0];
        }
        return id;
      };
      module.exports = { nanoid, customAlphabet };
    }
  });

  // (disabled):node_modules/postcss/lib/terminal-highlight
  var require_terminal_highlight = __commonJS({
    "(disabled):node_modules/postcss/lib/terminal-highlight"() {
    }
  });

  // node_modules/picocolors/picocolors.browser.js
  var require_picocolors_browser = __commonJS({
    "node_modules/picocolors/picocolors.browser.js"(exports, module) {
      var x2 = String;
      var create6 = function() {
        return { isColorSupported: false, reset: x2, bold: x2, dim: x2, italic: x2, underline: x2, inverse: x2, hidden: x2, strikethrough: x2, black: x2, red: x2, green: x2, yellow: x2, blue: x2, magenta: x2, cyan: x2, white: x2, gray: x2, bgBlack: x2, bgRed: x2, bgGreen: x2, bgYellow: x2, bgBlue: x2, bgMagenta: x2, bgCyan: x2, bgWhite: x2, blackBright: x2, redBright: x2, greenBright: x2, yellowBright: x2, blueBright: x2, magentaBright: x2, cyanBright: x2, whiteBright: x2, bgBlackBright: x2, bgRedBright: x2, bgGreenBright: x2, bgYellowBright: x2, bgBlueBright: x2, bgMagentaBright: x2, bgCyanBright: x2, bgWhiteBright: x2 };
      };
      module.exports = create6();
      module.exports.createColors = create6;
    }
  });

  // node_modules/postcss/lib/css-syntax-error.js
  var require_css_syntax_error = __commonJS({
    "node_modules/postcss/lib/css-syntax-error.js"(exports, module) {
      "use strict";
      var pico = require_picocolors_browser();
      var terminalHighlight = require_terminal_highlight();
      var CssSyntaxError2 = class _CssSyntaxError extends Error {
        constructor(message2, line, column, source, file, plugin) {
          super(message2);
          this.name = "CssSyntaxError";
          this.reason = message2;
          if (file) {
            this.file = file;
          }
          if (source) {
            this.source = source;
          }
          if (plugin) {
            this.plugin = plugin;
          }
          if (typeof line !== "undefined" && typeof column !== "undefined") {
            if (typeof line === "number") {
              this.line = line;
              this.column = column;
            } else {
              this.line = line.line;
              this.column = line.column;
              this.endLine = column.line;
              this.endColumn = column.column;
            }
          }
          this.setMessage();
          if (Error.captureStackTrace) {
            Error.captureStackTrace(this, _CssSyntaxError);
          }
        }
        setMessage() {
          this.message = this.plugin ? this.plugin + ": " : "";
          this.message += this.file ? this.file : "<css input>";
          if (typeof this.line !== "undefined") {
            this.message += ":" + this.line + ":" + this.column;
          }
          this.message += ": " + this.reason;
        }
        showSourceCode(color) {
          if (!this.source) return "";
          let css = this.source;
          if (color == null) color = pico.isColorSupported;
          if (terminalHighlight) {
            if (color) css = terminalHighlight(css);
          }
          let lines = css.split(/\r?\n/);
          let start2 = Math.max(this.line - 3, 0);
          let end = Math.min(this.line + 2, lines.length);
          let maxWidth = String(end).length;
          let mark, aside;
          if (color) {
            let { bold, gray, red } = pico.createColors(true);
            mark = (text) => bold(red(text));
            aside = (text) => gray(text);
          } else {
            mark = aside = (str) => str;
          }
          return lines.slice(start2, end).map((line, index) => {
            let number = start2 + 1 + index;
            let gutter = " " + (" " + number).slice(-maxWidth) + " | ";
            if (number === this.line) {
              let spacing = aside(gutter.replace(/\d/g, " ")) + line.slice(0, this.column - 1).replace(/[^\t]/g, " ");
              return mark(">") + aside(gutter) + line + "\n " + spacing + mark("^");
            }
            return " " + aside(gutter) + line;
          }).join("\n");
        }
        toString() {
          let code = this.showSourceCode();
          if (code) {
            code = "\n\n" + code + "\n";
          }
          return this.name + ": " + this.message + code;
        }
      };
      module.exports = CssSyntaxError2;
      CssSyntaxError2.default = CssSyntaxError2;
    }
  });

  // (disabled):fs
  var require_fs = __commonJS({
    "(disabled):fs"() {
    }
  });

  // node_modules/postcss/lib/previous-map.js
  var require_previous_map = __commonJS({
    "node_modules/postcss/lib/previous-map.js"(exports, module) {
      "use strict";
      var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
      var { existsSync, readFileSync } = require_fs();
      var { dirname, join } = require_path();
      function fromBase64(str) {
        if (Buffer) {
          return Buffer.from(str, "base64").toString();
        } else {
          return window.atob(str);
        }
      }
      var PreviousMap = class {
        constructor(css, opts) {
          if (opts.map === false) return;
          this.loadAnnotation(css);
          this.inline = this.startWith(this.annotation, "data:");
          let prev = opts.map ? opts.map.prev : void 0;
          let text = this.loadMap(opts.from, prev);
          if (!this.mapFile && opts.from) {
            this.mapFile = opts.from;
          }
          if (this.mapFile) this.root = dirname(this.mapFile);
          if (text) this.text = text;
        }
        consumer() {
          if (!this.consumerCache) {
            this.consumerCache = new SourceMapConsumer(this.text);
          }
          return this.consumerCache;
        }
        decodeInline(text) {
          let baseCharsetUri = /^data:application\/json;charset=utf-?8;base64,/;
          let baseUri = /^data:application\/json;base64,/;
          let charsetUri = /^data:application\/json;charset=utf-?8,/;
          let uri = /^data:application\/json,/;
          if (charsetUri.test(text) || uri.test(text)) {
            return decodeURIComponent(text.substr(RegExp.lastMatch.length));
          }
          if (baseCharsetUri.test(text) || baseUri.test(text)) {
            return fromBase64(text.substr(RegExp.lastMatch.length));
          }
          let encoding = text.match(/data:application\/json;([^,]+),/)[1];
          throw new Error("Unsupported source map encoding " + encoding);
        }
        getAnnotationURL(sourceMapString) {
          return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, "").trim();
        }
        isMap(map) {
          if (typeof map !== "object") return false;
          return typeof map.mappings === "string" || typeof map._mappings === "string" || Array.isArray(map.sections);
        }
        loadAnnotation(css) {
          let comments = css.match(/\/\*\s*# sourceMappingURL=/gm);
          if (!comments) return;
          let start2 = css.lastIndexOf(comments.pop());
          let end = css.indexOf("*/", start2);
          if (start2 > -1 && end > -1) {
            this.annotation = this.getAnnotationURL(css.substring(start2, end));
          }
        }
        loadFile(path) {
          this.root = dirname(path);
          if (existsSync(path)) {
            this.mapFile = path;
            return readFileSync(path, "utf-8").toString().trim();
          }
        }
        loadMap(file, prev) {
          if (prev === false) return false;
          if (prev) {
            if (typeof prev === "string") {
              return prev;
            } else if (typeof prev === "function") {
              let prevPath = prev(file);
              if (prevPath) {
                let map = this.loadFile(prevPath);
                if (!map) {
                  throw new Error(
                    "Unable to load previous source map: " + prevPath.toString()
                  );
                }
                return map;
              }
            } else if (prev instanceof SourceMapConsumer) {
              return SourceMapGenerator.fromSourceMap(prev).toString();
            } else if (prev instanceof SourceMapGenerator) {
              return prev.toString();
            } else if (this.isMap(prev)) {
              return JSON.stringify(prev);
            } else {
              throw new Error(
                "Unsupported previous source map format: " + prev.toString()
              );
            }
          } else if (this.inline) {
            return this.decodeInline(this.annotation);
          } else if (this.annotation) {
            let map = this.annotation;
            if (file) map = join(dirname(file), map);
            return this.loadFile(map);
          }
        }
        startWith(string, start2) {
          if (!string) return false;
          return string.substr(0, start2.length) === start2;
        }
        withContent() {
          return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
        }
      };
      module.exports = PreviousMap;
      PreviousMap.default = PreviousMap;
    }
  });

  // node_modules/postcss/lib/input.js
  var require_input = __commonJS({
    "node_modules/postcss/lib/input.js"(exports, module) {
      "use strict";
      var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
      var { fileURLToPath, pathToFileURL } = require_url2();
      var { isAbsolute, resolve } = require_path();
      var { nanoid } = require_non_secure();
      var terminalHighlight = require_terminal_highlight();
      var CssSyntaxError2 = require_css_syntax_error();
      var PreviousMap = require_previous_map();
      var fromOffsetCache = /* @__PURE__ */ Symbol("fromOffsetCache");
      var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
      var pathAvailable = Boolean(resolve && isAbsolute);
      var Input = class {
        constructor(css, opts = {}) {
          if (css === null || typeof css === "undefined" || typeof css === "object" && !css.toString) {
            throw new Error(`PostCSS received ${css} instead of CSS string`);
          }
          this.css = css.toString();
          if (this.css[0] === "\uFEFF" || this.css[0] === "\uFFFE") {
            this.hasBOM = true;
            this.css = this.css.slice(1);
          } else {
            this.hasBOM = false;
          }
          if (opts.from) {
            if (!pathAvailable || /^\w+:\/\//.test(opts.from) || isAbsolute(opts.from)) {
              this.file = opts.from;
            } else {
              this.file = resolve(opts.from);
            }
          }
          if (pathAvailable && sourceMapAvailable) {
            let map = new PreviousMap(this.css, opts);
            if (map.text) {
              this.map = map;
              let file = map.consumer().file;
              if (!this.file && file) this.file = this.mapResolve(file);
            }
          }
          if (!this.file) {
            this.id = "<input css " + nanoid(6) + ">";
          }
          if (this.map) this.map.file = this.from;
        }
        error(message2, line, column, opts = {}) {
          let result, endLine, endColumn;
          if (line && typeof line === "object") {
            let start2 = line;
            let end = column;
            if (typeof start2.offset === "number") {
              let pos = this.fromOffset(start2.offset);
              line = pos.line;
              column = pos.col;
            } else {
              line = start2.line;
              column = start2.column;
            }
            if (typeof end.offset === "number") {
              let pos = this.fromOffset(end.offset);
              endLine = pos.line;
              endColumn = pos.col;
            } else {
              endLine = end.line;
              endColumn = end.column;
            }
          } else if (!column) {
            let pos = this.fromOffset(line);
            line = pos.line;
            column = pos.col;
          }
          let origin = this.origin(line, column, endLine, endColumn);
          if (origin) {
            result = new CssSyntaxError2(
              message2,
              origin.endLine === void 0 ? origin.line : { column: origin.column, line: origin.line },
              origin.endLine === void 0 ? origin.column : { column: origin.endColumn, line: origin.endLine },
              origin.source,
              origin.file,
              opts.plugin
            );
          } else {
            result = new CssSyntaxError2(
              message2,
              endLine === void 0 ? line : { column, line },
              endLine === void 0 ? column : { column: endColumn, line: endLine },
              this.css,
              this.file,
              opts.plugin
            );
          }
          result.input = { column, endColumn, endLine, line, source: this.css };
          if (this.file) {
            if (pathToFileURL) {
              result.input.url = pathToFileURL(this.file).toString();
            }
            result.input.file = this.file;
          }
          return result;
        }
        fromOffset(offset) {
          let lastLine, lineToIndex;
          if (!this[fromOffsetCache]) {
            let lines = this.css.split("\n");
            lineToIndex = new Array(lines.length);
            let prevIndex = 0;
            for (let i2 = 0, l2 = lines.length; i2 < l2; i2++) {
              lineToIndex[i2] = prevIndex;
              prevIndex += lines[i2].length + 1;
            }
            this[fromOffsetCache] = lineToIndex;
          } else {
            lineToIndex = this[fromOffsetCache];
          }
          lastLine = lineToIndex[lineToIndex.length - 1];
          let min = 0;
          if (offset >= lastLine) {
            min = lineToIndex.length - 1;
          } else {
            let max = lineToIndex.length - 2;
            let mid;
            while (min < max) {
              mid = min + (max - min >> 1);
              if (offset < lineToIndex[mid]) {
                max = mid - 1;
              } else if (offset >= lineToIndex[mid + 1]) {
                min = mid + 1;
              } else {
                min = mid;
                break;
              }
            }
          }
          return {
            col: offset - lineToIndex[min] + 1,
            line: min + 1
          };
        }
        mapResolve(file) {
          if (/^\w+:\/\//.test(file)) {
            return file;
          }
          return resolve(this.map.consumer().sourceRoot || this.map.root || ".", file);
        }
        origin(line, column, endLine, endColumn) {
          if (!this.map) return false;
          let consumer = this.map.consumer();
          let from = consumer.originalPositionFor({ column, line });
          if (!from.source) return false;
          let to2;
          if (typeof endLine === "number") {
            to2 = consumer.originalPositionFor({ column: endColumn, line: endLine });
          }
          let fromUrl;
          if (isAbsolute(from.source)) {
            fromUrl = pathToFileURL(from.source);
          } else {
            fromUrl = new URL(
              from.source,
              this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile)
            );
          }
          let result = {
            column: from.column,
            endColumn: to2 && to2.column,
            endLine: to2 && to2.line,
            line: from.line,
            url: fromUrl.toString()
          };
          if (fromUrl.protocol === "file:") {
            if (fileURLToPath) {
              result.file = fileURLToPath(fromUrl);
            } else {
              throw new Error(`file: protocol is not available in this PostCSS build`);
            }
          }
          let source = consumer.sourceContentFor(from.source);
          if (source) result.source = source;
          return result;
        }
        toJSON() {
          let json = {};
          for (let name of ["hasBOM", "css", "file", "id"]) {
            if (this[name] != null) {
              json[name] = this[name];
            }
          }
          if (this.map) {
            json.map = { ...this.map };
            if (json.map.consumerCache) {
              json.map.consumerCache = void 0;
            }
          }
          return json;
        }
        get from() {
          return this.file || this.id;
        }
      };
      module.exports = Input;
      Input.default = Input;
      if (terminalHighlight && terminalHighlight.registerInput) {
        terminalHighlight.registerInput(Input);
      }
    }
  });

  // node_modules/postcss/lib/map-generator.js
  var require_map_generator = __commonJS({
    "node_modules/postcss/lib/map-generator.js"(exports, module) {
      "use strict";
      var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
      var { dirname, relative, resolve, sep } = require_path();
      var { pathToFileURL } = require_url2();
      var Input = require_input();
      var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
      var pathAvailable = Boolean(dirname && resolve && relative && sep);
      var MapGenerator = class {
        constructor(stringify2, root, opts, cssString) {
          this.stringify = stringify2;
          this.mapOpts = opts.map || {};
          this.root = root;
          this.opts = opts;
          this.css = cssString;
          this.originalCSS = cssString;
          this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute;
          this.memoizedFileURLs = /* @__PURE__ */ new Map();
          this.memoizedPaths = /* @__PURE__ */ new Map();
          this.memoizedURLs = /* @__PURE__ */ new Map();
        }
        addAnnotation() {
          let content;
          if (this.isInline()) {
            content = "data:application/json;base64," + this.toBase64(this.map.toString());
          } else if (typeof this.mapOpts.annotation === "string") {
            content = this.mapOpts.annotation;
          } else if (typeof this.mapOpts.annotation === "function") {
            content = this.mapOpts.annotation(this.opts.to, this.root);
          } else {
            content = this.outputFile() + ".map";
          }
          let eol = "\n";
          if (this.css.includes("\r\n")) eol = "\r\n";
          this.css += eol + "/*# sourceMappingURL=" + content + " */";
        }
        applyPrevMaps() {
          for (let prev of this.previous()) {
            let from = this.toUrl(this.path(prev.file));
            let root = prev.root || dirname(prev.file);
            let map;
            if (this.mapOpts.sourcesContent === false) {
              map = new SourceMapConsumer(prev.text);
              if (map.sourcesContent) {
                map.sourcesContent = null;
              }
            } else {
              map = prev.consumer();
            }
            this.map.applySourceMap(map, from, this.toUrl(this.path(root)));
          }
        }
        clearAnnotation() {
          if (this.mapOpts.annotation === false) return;
          if (this.root) {
            let node;
            for (let i2 = this.root.nodes.length - 1; i2 >= 0; i2--) {
              node = this.root.nodes[i2];
              if (node.type !== "comment") continue;
              if (node.text.indexOf("# sourceMappingURL=") === 0) {
                this.root.removeChild(i2);
              }
            }
          } else if (this.css) {
            this.css = this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm, "");
          }
        }
        generate() {
          this.clearAnnotation();
          if (pathAvailable && sourceMapAvailable && this.isMap()) {
            return this.generateMap();
          } else {
            let result = "";
            this.stringify(this.root, (i2) => {
              result += i2;
            });
            return [result];
          }
        }
        generateMap() {
          if (this.root) {
            this.generateString();
          } else if (this.previous().length === 1) {
            let prev = this.previous()[0].consumer();
            prev.file = this.outputFile();
            this.map = SourceMapGenerator.fromSourceMap(prev, {
              ignoreInvalidMapping: true
            });
          } else {
            this.map = new SourceMapGenerator({
              file: this.outputFile(),
              ignoreInvalidMapping: true
            });
            this.map.addMapping({
              generated: { column: 0, line: 1 },
              original: { column: 0, line: 1 },
              source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>"
            });
          }
          if (this.isSourcesContent()) this.setSourcesContent();
          if (this.root && this.previous().length > 0) this.applyPrevMaps();
          if (this.isAnnotation()) this.addAnnotation();
          if (this.isInline()) {
            return [this.css];
          } else {
            return [this.css, this.map];
          }
        }
        generateString() {
          this.css = "";
          this.map = new SourceMapGenerator({
            file: this.outputFile(),
            ignoreInvalidMapping: true
          });
          let line = 1;
          let column = 1;
          let noSource = "<no source>";
          let mapping = {
            generated: { column: 0, line: 0 },
            original: { column: 0, line: 0 },
            source: ""
          };
          let lines, last;
          this.stringify(this.root, (str, node, type) => {
            this.css += str;
            if (node && type !== "end") {
              mapping.generated.line = line;
              mapping.generated.column = column - 1;
              if (node.source && node.source.start) {
                mapping.source = this.sourcePath(node);
                mapping.original.line = node.source.start.line;
                mapping.original.column = node.source.start.column - 1;
                this.map.addMapping(mapping);
              } else {
                mapping.source = noSource;
                mapping.original.line = 1;
                mapping.original.column = 0;
                this.map.addMapping(mapping);
              }
            }
            lines = str.match(/\n/g);
            if (lines) {
              line += lines.length;
              last = str.lastIndexOf("\n");
              column = str.length - last;
            } else {
              column += str.length;
            }
            if (node && type !== "start") {
              let p2 = node.parent || { raws: {} };
              let childless = node.type === "decl" || node.type === "atrule" && !node.nodes;
              if (!childless || node !== p2.last || p2.raws.semicolon) {
                if (node.source && node.source.end) {
                  mapping.source = this.sourcePath(node);
                  mapping.original.line = node.source.end.line;
                  mapping.original.column = node.source.end.column - 1;
                  mapping.generated.line = line;
                  mapping.generated.column = column - 2;
                  this.map.addMapping(mapping);
                } else {
                  mapping.source = noSource;
                  mapping.original.line = 1;
                  mapping.original.column = 0;
                  mapping.generated.line = line;
                  mapping.generated.column = column - 1;
                  this.map.addMapping(mapping);
                }
              }
            }
          });
        }
        isAnnotation() {
          if (this.isInline()) {
            return true;
          }
          if (typeof this.mapOpts.annotation !== "undefined") {
            return this.mapOpts.annotation;
          }
          if (this.previous().length) {
            return this.previous().some((i2) => i2.annotation);
          }
          return true;
        }
        isInline() {
          if (typeof this.mapOpts.inline !== "undefined") {
            return this.mapOpts.inline;
          }
          let annotation = this.mapOpts.annotation;
          if (typeof annotation !== "undefined" && annotation !== true) {
            return false;
          }
          if (this.previous().length) {
            return this.previous().some((i2) => i2.inline);
          }
          return true;
        }
        isMap() {
          if (typeof this.opts.map !== "undefined") {
            return !!this.opts.map;
          }
          return this.previous().length > 0;
        }
        isSourcesContent() {
          if (typeof this.mapOpts.sourcesContent !== "undefined") {
            return this.mapOpts.sourcesContent;
          }
          if (this.previous().length) {
            return this.previous().some((i2) => i2.withContent());
          }
          return true;
        }
        outputFile() {
          if (this.opts.to) {
            return this.path(this.opts.to);
          } else if (this.opts.from) {
            return this.path(this.opts.from);
          } else {
            return "to.css";
          }
        }
        path(file) {
          if (this.mapOpts.absolute) return file;
          if (file.charCodeAt(0) === 60) return file;
          if (/^\w+:\/\//.test(file)) return file;
          let cached = this.memoizedPaths.get(file);
          if (cached) return cached;
          let from = this.opts.to ? dirname(this.opts.to) : ".";
          if (typeof this.mapOpts.annotation === "string") {
            from = dirname(resolve(from, this.mapOpts.annotation));
          }
          let path = relative(from, file);
          this.memoizedPaths.set(file, path);
          return path;
        }
        previous() {
          if (!this.previousMaps) {
            this.previousMaps = [];
            if (this.root) {
              this.root.walk((node) => {
                if (node.source && node.source.input.map) {
                  let map = node.source.input.map;
                  if (!this.previousMaps.includes(map)) {
                    this.previousMaps.push(map);
                  }
                }
              });
            } else {
              let input = new Input(this.originalCSS, this.opts);
              if (input.map) this.previousMaps.push(input.map);
            }
          }
          return this.previousMaps;
        }
        setSourcesContent() {
          let already = {};
          if (this.root) {
            this.root.walk((node) => {
              if (node.source) {
                let from = node.source.input.from;
                if (from && !already[from]) {
                  already[from] = true;
                  let fromUrl = this.usesFileUrls ? this.toFileUrl(from) : this.toUrl(this.path(from));
                  this.map.setSourceContent(fromUrl, node.source.input.css);
                }
              }
            });
          } else if (this.css) {
            let from = this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>";
            this.map.setSourceContent(from, this.css);
          }
        }
        sourcePath(node) {
          if (this.mapOpts.from) {
            return this.toUrl(this.mapOpts.from);
          } else if (this.usesFileUrls) {
            return this.toFileUrl(node.source.input.from);
          } else {
            return this.toUrl(this.path(node.source.input.from));
          }
        }
        toBase64(str) {
          if (Buffer) {
            return Buffer.from(str).toString("base64");
          } else {
            return window.btoa(unescape(encodeURIComponent(str)));
          }
        }
        toFileUrl(path) {
          let cached = this.memoizedFileURLs.get(path);
          if (cached) return cached;
          if (pathToFileURL) {
            let fileURL = pathToFileURL(path).toString();
            this.memoizedFileURLs.set(path, fileURL);
            return fileURL;
          } else {
            throw new Error(
              "`map.absolute` option is not available in this PostCSS build"
            );
          }
        }
        toUrl(path) {
          let cached = this.memoizedURLs.get(path);
          if (cached) return cached;
          if (sep === "\\") {
            path = path.replace(/\\/g, "/");
          }
          let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent);
          this.memoizedURLs.set(path, url);
          return url;
        }
      };
      module.exports = MapGenerator;
    }
  });

  // node_modules/postcss/lib/stringifier.js
  var require_stringifier = __commonJS({
    "node_modules/postcss/lib/stringifier.js"(exports, module) {
      "use strict";
      var DEFAULT_RAW = {
        after: "\n",
        beforeClose: "\n",
        beforeComment: "\n",
        beforeDecl: "\n",
        beforeOpen: " ",
        beforeRule: "\n",
        colon: ": ",
        commentLeft: " ",
        commentRight: " ",
        emptyBody: "",
        indent: "    ",
        semicolon: false
      };
      function capitalize(str) {
        return str[0].toUpperCase() + str.slice(1);
      }
      var Stringifier = class {
        constructor(builder) {
          this.builder = builder;
        }
        atrule(node, semicolon) {
          let name = "@" + node.name;
          let params = node.params ? this.rawValue(node, "params") : "";
          if (typeof node.raws.afterName !== "undefined") {
            name += node.raws.afterName;
          } else if (params) {
            name += " ";
          }
          if (node.nodes) {
            this.block(node, name + params);
          } else {
            let end = (node.raws.between || "") + (semicolon ? ";" : "");
            this.builder(name + params + end, node);
          }
        }
        beforeAfter(node, detect) {
          let value;
          if (node.type === "decl") {
            value = this.raw(node, null, "beforeDecl");
          } else if (node.type === "comment") {
            value = this.raw(node, null, "beforeComment");
          } else if (detect === "before") {
            value = this.raw(node, null, "beforeRule");
          } else {
            value = this.raw(node, null, "beforeClose");
          }
          let buf = node.parent;
          let depth = 0;
          while (buf && buf.type !== "root") {
            depth += 1;
            buf = buf.parent;
          }
          if (value.includes("\n")) {
            let indent = this.raw(node, null, "indent");
            if (indent.length) {
              for (let step = 0; step < depth; step++) value += indent;
            }
          }
          return value;
        }
        block(node, start2) {
          let between = this.raw(node, "between", "beforeOpen");
          this.builder(start2 + between + "{", node, "start");
          let after;
          if (node.nodes && node.nodes.length) {
            this.body(node);
            after = this.raw(node, "after");
          } else {
            after = this.raw(node, "after", "emptyBody");
          }
          if (after) this.builder(after);
          this.builder("}", node, "end");
        }
        body(node) {
          let last = node.nodes.length - 1;
          while (last > 0) {
            if (node.nodes[last].type !== "comment") break;
            last -= 1;
          }
          let semicolon = this.raw(node, "semicolon");
          for (let i2 = 0; i2 < node.nodes.length; i2++) {
            let child = node.nodes[i2];
            let before = this.raw(child, "before");
            if (before) this.builder(before);
            this.stringify(child, last !== i2 || semicolon);
          }
        }
        comment(node) {
          let left = this.raw(node, "left", "commentLeft");
          let right = this.raw(node, "right", "commentRight");
          this.builder("/*" + left + node.text + right + "*/", node);
        }
        decl(node, semicolon) {
          let between = this.raw(node, "between", "colon");
          let string = node.prop + between + this.rawValue(node, "value");
          if (node.important) {
            string += node.raws.important || " !important";
          }
          if (semicolon) string += ";";
          this.builder(string, node);
        }
        document(node) {
          this.body(node);
        }
        raw(node, own, detect) {
          let value;
          if (!detect) detect = own;
          if (own) {
            value = node.raws[own];
            if (typeof value !== "undefined") return value;
          }
          let parent = node.parent;
          if (detect === "before") {
            if (!parent || parent.type === "root" && parent.first === node) {
              return "";
            }
            if (parent && parent.type === "document") {
              return "";
            }
          }
          if (!parent) return DEFAULT_RAW[detect];
          let root = node.root();
          if (!root.rawCache) root.rawCache = {};
          if (typeof root.rawCache[detect] !== "undefined") {
            return root.rawCache[detect];
          }
          if (detect === "before" || detect === "after") {
            return this.beforeAfter(node, detect);
          } else {
            let method = "raw" + capitalize(detect);
            if (this[method]) {
              value = this[method](root, node);
            } else {
              root.walk((i2) => {
                value = i2.raws[own];
                if (typeof value !== "undefined") return false;
              });
            }
          }
          if (typeof value === "undefined") value = DEFAULT_RAW[detect];
          root.rawCache[detect] = value;
          return value;
        }
        rawBeforeClose(root) {
          let value;
          root.walk((i2) => {
            if (i2.nodes && i2.nodes.length > 0) {
              if (typeof i2.raws.after !== "undefined") {
                value = i2.raws.after;
                if (value.includes("\n")) {
                  value = value.replace(/[^\n]+$/, "");
                }
                return false;
              }
            }
          });
          if (value) value = value.replace(/\S/g, "");
          return value;
        }
        rawBeforeComment(root, node) {
          let value;
          root.walkComments((i2) => {
            if (typeof i2.raws.before !== "undefined") {
              value = i2.raws.before;
              if (value.includes("\n")) {
                value = value.replace(/[^\n]+$/, "");
              }
              return false;
            }
          });
          if (typeof value === "undefined") {
            value = this.raw(node, null, "beforeDecl");
          } else if (value) {
            value = value.replace(/\S/g, "");
          }
          return value;
        }
        rawBeforeDecl(root, node) {
          let value;
          root.walkDecls((i2) => {
            if (typeof i2.raws.before !== "undefined") {
              value = i2.raws.before;
              if (value.includes("\n")) {
                value = value.replace(/[^\n]+$/, "");
              }
              return false;
            }
          });
          if (typeof value === "undefined") {
            value = this.raw(node, null, "beforeRule");
          } else if (value) {
            value = value.replace(/\S/g, "");
          }
          return value;
        }
        rawBeforeOpen(root) {
          let value;
          root.walk((i2) => {
            if (i2.type !== "decl") {
              value = i2.raws.between;
              if (typeof value !== "undefined") return false;
            }
          });
          return value;
        }
        rawBeforeRule(root) {
          let value;
          root.walk((i2) => {
            if (i2.nodes && (i2.parent !== root || root.first !== i2)) {
              if (typeof i2.raws.before !== "undefined") {
                value = i2.raws.before;
                if (value.includes("\n")) {
                  value = value.replace(/[^\n]+$/, "");
                }
                return false;
              }
            }
          });
          if (value) value = value.replace(/\S/g, "");
          return value;
        }
        rawColon(root) {
          let value;
          root.walkDecls((i2) => {
            if (typeof i2.raws.between !== "undefined") {
              value = i2.raws.between.replace(/[^\s:]/g, "");
              return false;
            }
          });
          return value;
        }
        rawEmptyBody(root) {
          let value;
          root.walk((i2) => {
            if (i2.nodes && i2.nodes.length === 0) {
              value = i2.raws.after;
              if (typeof value !== "undefined") return false;
            }
          });
          return value;
        }
        rawIndent(root) {
          if (root.raws.indent) return root.raws.indent;
          let value;
          root.walk((i2) => {
            let p2 = i2.parent;
            if (p2 && p2 !== root && p2.parent && p2.parent === root) {
              if (typeof i2.raws.before !== "undefined") {
                let parts = i2.raws.before.split("\n");
                value = parts[parts.length - 1];
                value = value.replace(/\S/g, "");
                return false;
              }
            }
          });
          return value;
        }
        rawSemicolon(root) {
          let value;
          root.walk((i2) => {
            if (i2.nodes && i2.nodes.length && i2.last.type === "decl") {
              value = i2.raws.semicolon;
              if (typeof value !== "undefined") return false;
            }
          });
          return value;
        }
        rawValue(node, prop) {
          let value = node[prop];
          let raw = node.raws[prop];
          if (raw && raw.value === value) {
            return raw.raw;
          }
          return value;
        }
        root(node) {
          this.body(node);
          if (node.raws.after) this.builder(node.raws.after);
        }
        rule(node) {
          this.block(node, this.rawValue(node, "selector"));
          if (node.raws.ownSemicolon) {
            this.builder(node.raws.ownSemicolon, node, "end");
          }
        }
        stringify(node, semicolon) {
          if (!this[node.type]) {
            throw new Error(
              "Unknown AST node type " + node.type + ". Maybe you need to change PostCSS stringifier."
            );
          }
          this[node.type](node, semicolon);
        }
      };
      module.exports = Stringifier;
      Stringifier.default = Stringifier;
    }
  });

  // node_modules/postcss/lib/stringify.js
  var require_stringify = __commonJS({
    "node_modules/postcss/lib/stringify.js"(exports, module) {
      "use strict";
      var Stringifier = require_stringifier();
      function stringify2(node, builder) {
        let str = new Stringifier(builder);
        str.stringify(node);
      }
      module.exports = stringify2;
      stringify2.default = stringify2;
    }
  });

  // node_modules/postcss/lib/warn-once.js
  var require_warn_once = __commonJS({
    "node_modules/postcss/lib/warn-once.js"(exports, module) {
      "use strict";
      var printed = {};
      module.exports = function warnOnce(message2) {
        if (printed[message2]) return;
        printed[message2] = true;
        if (typeof console !== "undefined" && console.warn) {
          console.warn(message2);
        }
      };
    }
  });

  // node_modules/postcss/lib/symbols.js
  var require_symbols = __commonJS({
    "node_modules/postcss/lib/symbols.js"(exports, module) {
      "use strict";
      module.exports.isClean = /* @__PURE__ */ Symbol("isClean");
      module.exports.my = /* @__PURE__ */ Symbol("my");
    }
  });

  // node_modules/postcss/lib/node.js
  var require_node = __commonJS({
    "node_modules/postcss/lib/node.js"(exports, module) {
      "use strict";
      var { isClean, my } = require_symbols();
      var CssSyntaxError2 = require_css_syntax_error();
      var Stringifier = require_stringifier();
      var stringify2 = require_stringify();
      function cloneNode(obj, parent) {
        let cloned = new obj.constructor();
        for (let i2 in obj) {
          if (!Object.prototype.hasOwnProperty.call(obj, i2)) {
            continue;
          }
          if (i2 === "proxyCache") continue;
          let value = obj[i2];
          let type = typeof value;
          if (i2 === "parent" && type === "object") {
            if (parent) cloned[i2] = parent;
          } else if (i2 === "source") {
            cloned[i2] = value;
          } else if (Array.isArray(value)) {
            cloned[i2] = value.map((j2) => cloneNode(j2, cloned));
          } else {
            if (type === "object" && value !== null) value = cloneNode(value);
            cloned[i2] = value;
          }
        }
        return cloned;
      }
      var Node = class {
        constructor(defaults2 = {}) {
          this.raws = {};
          this[isClean] = false;
          this[my] = true;
          for (let name in defaults2) {
            if (name === "nodes") {
              this.nodes = [];
              for (let node of defaults2[name]) {
                if (typeof node.clone === "function") {
                  this.append(node.clone());
                } else {
                  this.append(node);
                }
              }
            } else {
              this[name] = defaults2[name];
            }
          }
        }
        addToError(error) {
          error.postcssNode = this;
          if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) {
            let s2 = this.source;
            error.stack = error.stack.replace(
              /\n\s{4}at /,
              `$&${s2.input.from}:${s2.start.line}:${s2.start.column}$&`
            );
          }
          return error;
        }
        after(add2) {
          this.parent.insertAfter(this, add2);
          return this;
        }
        assign(overrides = {}) {
          for (let name in overrides) {
            this[name] = overrides[name];
          }
          return this;
        }
        before(add2) {
          this.parent.insertBefore(this, add2);
          return this;
        }
        cleanRaws(keepBetween) {
          delete this.raws.before;
          delete this.raws.after;
          if (!keepBetween) delete this.raws.between;
        }
        clone(overrides = {}) {
          let cloned = cloneNode(this);
          for (let name in overrides) {
            cloned[name] = overrides[name];
          }
          return cloned;
        }
        cloneAfter(overrides = {}) {
          let cloned = this.clone(overrides);
          this.parent.insertAfter(this, cloned);
          return cloned;
        }
        cloneBefore(overrides = {}) {
          let cloned = this.clone(overrides);
          this.parent.insertBefore(this, cloned);
          return cloned;
        }
        error(message2, opts = {}) {
          if (this.source) {
            let { end, start: start2 } = this.rangeBy(opts);
            return this.source.input.error(
              message2,
              { column: start2.column, line: start2.line },
              { column: end.column, line: end.line },
              opts
            );
          }
          return new CssSyntaxError2(message2);
        }
        getProxyProcessor() {
          return {
            get(node, prop) {
              if (prop === "proxyOf") {
                return node;
              } else if (prop === "root") {
                return () => node.root().toProxy();
              } else {
                return node[prop];
              }
            },
            set(node, prop, value) {
              if (node[prop] === value) return true;
              node[prop] = value;
              if (prop === "prop" || prop === "value" || prop === "name" || prop === "params" || prop === "important" || /* c8 ignore next */
              prop === "text") {
                node.markDirty();
              }
              return true;
            }
          };
        }
        markDirty() {
          if (this[isClean]) {
            this[isClean] = false;
            let next = this;
            while (next = next.parent) {
              next[isClean] = false;
            }
          }
        }
        next() {
          if (!this.parent) return void 0;
          let index = this.parent.index(this);
          return this.parent.nodes[index + 1];
        }
        positionBy(opts, stringRepresentation) {
          let pos = this.source.start;
          if (opts.index) {
            pos = this.positionInside(opts.index, stringRepresentation);
          } else if (opts.word) {
            stringRepresentation = this.toString();
            let index = stringRepresentation.indexOf(opts.word);
            if (index !== -1) pos = this.positionInside(index, stringRepresentation);
          }
          return pos;
        }
        positionInside(index, stringRepresentation) {
          let string = stringRepresentation || this.toString();
          let column = this.source.start.column;
          let line = this.source.start.line;
          for (let i2 = 0; i2 < index; i2++) {
            if (string[i2] === "\n") {
              column = 1;
              line += 1;
            } else {
              column += 1;
            }
          }
          return { column, line };
        }
        prev() {
          if (!this.parent) return void 0;
          let index = this.parent.index(this);
          return this.parent.nodes[index - 1];
        }
        rangeBy(opts) {
          let start2 = {
            column: this.source.start.column,
            line: this.source.start.line
          };
          let end = this.source.end ? {
            column: this.source.end.column + 1,
            line: this.source.end.line
          } : {
            column: start2.column + 1,
            line: start2.line
          };
          if (opts.word) {
            let stringRepresentation = this.toString();
            let index = stringRepresentation.indexOf(opts.word);
            if (index !== -1) {
              start2 = this.positionInside(index, stringRepresentation);
              end = this.positionInside(index + opts.word.length, stringRepresentation);
            }
          } else {
            if (opts.start) {
              start2 = {
                column: opts.start.column,
                line: opts.start.line
              };
            } else if (opts.index) {
              start2 = this.positionInside(opts.index);
            }
            if (opts.end) {
              end = {
                column: opts.end.column,
                line: opts.end.line
              };
            } else if (typeof opts.endIndex === "number") {
              end = this.positionInside(opts.endIndex);
            } else if (opts.index) {
              end = this.positionInside(opts.index + 1);
            }
          }
          if (end.line < start2.line || end.line === start2.line && end.column <= start2.column) {
            end = { column: start2.column + 1, line: start2.line };
          }
          return { end, start: start2 };
        }
        raw(prop, defaultType) {
          let str = new Stringifier();
          return str.raw(this, prop, defaultType);
        }
        remove() {
          if (this.parent) {
            this.parent.removeChild(this);
          }
          this.parent = void 0;
          return this;
        }
        replaceWith(...nodes) {
          if (this.parent) {
            let bookmark = this;
            let foundSelf = false;
            for (let node of nodes) {
              if (node === this) {
                foundSelf = true;
              } else if (foundSelf) {
                this.parent.insertAfter(bookmark, node);
                bookmark = node;
              } else {
                this.parent.insertBefore(bookmark, node);
              }
            }
            if (!foundSelf) {
              this.remove();
            }
          }
          return this;
        }
        root() {
          let result = this;
          while (result.parent && result.parent.type !== "document") {
            result = result.parent;
          }
          return result;
        }
        toJSON(_, inputs) {
          let fixed = {};
          let emitInputs = inputs == null;
          inputs = inputs || /* @__PURE__ */ new Map();
          let inputsNextIndex = 0;
          for (let name in this) {
            if (!Object.prototype.hasOwnProperty.call(this, name)) {
              continue;
            }
            if (name === "parent" || name === "proxyCache") continue;
            let value = this[name];
            if (Array.isArray(value)) {
              fixed[name] = value.map((i2) => {
                if (typeof i2 === "object" && i2.toJSON) {
                  return i2.toJSON(null, inputs);
                } else {
                  return i2;
                }
              });
            } else if (typeof value === "object" && value.toJSON) {
              fixed[name] = value.toJSON(null, inputs);
            } else if (name === "source") {
              let inputId = inputs.get(value.input);
              if (inputId == null) {
                inputId = inputsNextIndex;
                inputs.set(value.input, inputsNextIndex);
                inputsNextIndex++;
              }
              fixed[name] = {
                end: value.end,
                inputId,
                start: value.start
              };
            } else {
              fixed[name] = value;
            }
          }
          if (emitInputs) {
            fixed.inputs = [...inputs.keys()].map((input) => input.toJSON());
          }
          return fixed;
        }
        toProxy() {
          if (!this.proxyCache) {
            this.proxyCache = new Proxy(this, this.getProxyProcessor());
          }
          return this.proxyCache;
        }
        toString(stringifier = stringify2) {
          if (stringifier.stringify) stringifier = stringifier.stringify;
          let result = "";
          stringifier(this, (i2) => {
            result += i2;
          });
          return result;
        }
        warn(result, text, opts) {
          let data = { node: this };
          for (let i2 in opts) data[i2] = opts[i2];
          return result.warn(text, data);
        }
        get proxyOf() {
          return this;
        }
      };
      module.exports = Node;
      Node.default = Node;
    }
  });

  // node_modules/postcss/lib/declaration.js
  var require_declaration = __commonJS({
    "node_modules/postcss/lib/declaration.js"(exports, module) {
      "use strict";
      var Node = require_node();
      var Declaration = class extends Node {
        constructor(defaults2) {
          if (defaults2 && typeof defaults2.value !== "undefined" && typeof defaults2.value !== "string") {
            defaults2 = { ...defaults2, value: String(defaults2.value) };
          }
          super(defaults2);
          this.type = "decl";
        }
        get variable() {
          return this.prop.startsWith("--") || this.prop[0] === "$";
        }
      };
      module.exports = Declaration;
      Declaration.default = Declaration;
    }
  });

  // node_modules/postcss/lib/comment.js
  var require_comment = __commonJS({
    "node_modules/postcss/lib/comment.js"(exports, module) {
      "use strict";
      var Node = require_node();
      var Comment = class extends Node {
        constructor(defaults2) {
          super(defaults2);
          this.type = "comment";
        }
      };
      module.exports = Comment;
      Comment.default = Comment;
    }
  });

  // node_modules/postcss/lib/container.js
  var require_container = __commonJS({
    "node_modules/postcss/lib/container.js"(exports, module) {
      "use strict";
      var { isClean, my } = require_symbols();
      var Declaration = require_declaration();
      var Comment = require_comment();
      var Node = require_node();
      var parse4;
      var Rule;
      var AtRule;
      var Root2;
      function cleanSource(nodes) {
        return nodes.map((i2) => {
          if (i2.nodes) i2.nodes = cleanSource(i2.nodes);
          delete i2.source;
          return i2;
        });
      }
      function markDirtyUp(node) {
        node[isClean] = false;
        if (node.proxyOf.nodes) {
          for (let i2 of node.proxyOf.nodes) {
            markDirtyUp(i2);
          }
        }
      }
      var Container = class _Container extends Node {
        append(...children) {
          for (let child of children) {
            let nodes = this.normalize(child, this.last);
            for (let node of nodes) this.proxyOf.nodes.push(node);
          }
          this.markDirty();
          return this;
        }
        cleanRaws(keepBetween) {
          super.cleanRaws(keepBetween);
          if (this.nodes) {
            for (let node of this.nodes) node.cleanRaws(keepBetween);
          }
        }
        each(callback) {
          if (!this.proxyOf.nodes) return void 0;
          let iterator = this.getIterator();
          let index, result;
          while (this.indexes[iterator] < this.proxyOf.nodes.length) {
            index = this.indexes[iterator];
            result = callback(this.proxyOf.nodes[index], index);
            if (result === false) break;
            this.indexes[iterator] += 1;
          }
          delete this.indexes[iterator];
          return result;
        }
        every(condition) {
          return this.nodes.every(condition);
        }
        getIterator() {
          if (!this.lastEach) this.lastEach = 0;
          if (!this.indexes) this.indexes = {};
          this.lastEach += 1;
          let iterator = this.lastEach;
          this.indexes[iterator] = 0;
          return iterator;
        }
        getProxyProcessor() {
          return {
            get(node, prop) {
              if (prop === "proxyOf") {
                return node;
              } else if (!node[prop]) {
                return node[prop];
              } else if (prop === "each" || typeof prop === "string" && prop.startsWith("walk")) {
                return (...args) => {
                  return node[prop](
                    ...args.map((i2) => {
                      if (typeof i2 === "function") {
                        return (child, index) => i2(child.toProxy(), index);
                      } else {
                        return i2;
                      }
                    })
                  );
                };
              } else if (prop === "every" || prop === "some") {
                return (cb) => {
                  return node[prop](
                    (child, ...other) => cb(child.toProxy(), ...other)
                  );
                };
              } else if (prop === "root") {
                return () => node.root().toProxy();
              } else if (prop === "nodes") {
                return node.nodes.map((i2) => i2.toProxy());
              } else if (prop === "first" || prop === "last") {
                return node[prop].toProxy();
              } else {
                return node[prop];
              }
            },
            set(node, prop, value) {
              if (node[prop] === value) return true;
              node[prop] = value;
              if (prop === "name" || prop === "params" || prop === "selector") {
                node.markDirty();
              }
              return true;
            }
          };
        }
        index(child) {
          if (typeof child === "number") return child;
          if (child.proxyOf) child = child.proxyOf;
          return this.proxyOf.nodes.indexOf(child);
        }
        insertAfter(exist, add2) {
          let existIndex = this.index(exist);
          let nodes = this.normalize(add2, this.proxyOf.nodes[existIndex]).reverse();
          existIndex = this.index(exist);
          for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node);
          let index;
          for (let id in this.indexes) {
            index = this.indexes[id];
            if (existIndex < index) {
              this.indexes[id] = index + nodes.length;
            }
          }
          this.markDirty();
          return this;
        }
        insertBefore(exist, add2) {
          let existIndex = this.index(exist);
          let type = existIndex === 0 ? "prepend" : false;
          let nodes = this.normalize(add2, this.proxyOf.nodes[existIndex], type).reverse();
          existIndex = this.index(exist);
          for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node);
          let index;
          for (let id in this.indexes) {
            index = this.indexes[id];
            if (existIndex <= index) {
              this.indexes[id] = index + nodes.length;
            }
          }
          this.markDirty();
          return this;
        }
        normalize(nodes, sample) {
          if (typeof nodes === "string") {
            nodes = cleanSource(parse4(nodes).nodes);
          } else if (typeof nodes === "undefined") {
            nodes = [];
          } else if (Array.isArray(nodes)) {
            nodes = nodes.slice(0);
            for (let i2 of nodes) {
              if (i2.parent) i2.parent.removeChild(i2, "ignore");
            }
          } else if (nodes.type === "root" && this.type !== "document") {
            nodes = nodes.nodes.slice(0);
            for (let i2 of nodes) {
              if (i2.parent) i2.parent.removeChild(i2, "ignore");
            }
          } else if (nodes.type) {
            nodes = [nodes];
          } else if (nodes.prop) {
            if (typeof nodes.value === "undefined") {
              throw new Error("Value field is missed in node creation");
            } else if (typeof nodes.value !== "string") {
              nodes.value = String(nodes.value);
            }
            nodes = [new Declaration(nodes)];
          } else if (nodes.selector) {
            nodes = [new Rule(nodes)];
          } else if (nodes.name) {
            nodes = [new AtRule(nodes)];
          } else if (nodes.text) {
            nodes = [new Comment(nodes)];
          } else {
            throw new Error("Unknown node type in node creation");
          }
          let processed = nodes.map((i2) => {
            if (!i2[my]) _Container.rebuild(i2);
            i2 = i2.proxyOf;
            if (i2.parent) i2.parent.removeChild(i2);
            if (i2[isClean]) markDirtyUp(i2);
            if (typeof i2.raws.before === "undefined") {
              if (sample && typeof sample.raws.before !== "undefined") {
                i2.raws.before = sample.raws.before.replace(/\S/g, "");
              }
            }
            i2.parent = this.proxyOf;
            return i2;
          });
          return processed;
        }
        prepend(...children) {
          children = children.reverse();
          for (let child of children) {
            let nodes = this.normalize(child, this.first, "prepend").reverse();
            for (let node of nodes) this.proxyOf.nodes.unshift(node);
            for (let id in this.indexes) {
              this.indexes[id] = this.indexes[id] + nodes.length;
            }
          }
          this.markDirty();
          return this;
        }
        push(child) {
          child.parent = this;
          this.proxyOf.nodes.push(child);
          return this;
        }
        removeAll() {
          for (let node of this.proxyOf.nodes) node.parent = void 0;
          this.proxyOf.nodes = [];
          this.markDirty();
          return this;
        }
        removeChild(child) {
          child = this.index(child);
          this.proxyOf.nodes[child].parent = void 0;
          this.proxyOf.nodes.splice(child, 1);
          let index;
          for (let id in this.indexes) {
            index = this.indexes[id];
            if (index >= child) {
              this.indexes[id] = index - 1;
            }
          }
          this.markDirty();
          return this;
        }
        replaceValues(pattern, opts, callback) {
          if (!callback) {
            callback = opts;
            opts = {};
          }
          this.walkDecls((decl) => {
            if (opts.props && !opts.props.includes(decl.prop)) return;
            if (opts.fast && !decl.value.includes(opts.fast)) return;
            decl.value = decl.value.replace(pattern, callback);
          });
          this.markDirty();
          return this;
        }
        some(condition) {
          return this.nodes.some(condition);
        }
        walk(callback) {
          return this.each((child, i2) => {
            let result;
            try {
              result = callback(child, i2);
            } catch (e2) {
              throw child.addToError(e2);
            }
            if (result !== false && child.walk) {
              result = child.walk(callback);
            }
            return result;
          });
        }
        walkAtRules(name, callback) {
          if (!callback) {
            callback = name;
            return this.walk((child, i2) => {
              if (child.type === "atrule") {
                return callback(child, i2);
              }
            });
          }
          if (name instanceof RegExp) {
            return this.walk((child, i2) => {
              if (child.type === "atrule" && name.test(child.name)) {
                return callback(child, i2);
              }
            });
          }
          return this.walk((child, i2) => {
            if (child.type === "atrule" && child.name === name) {
              return callback(child, i2);
            }
          });
        }
        walkComments(callback) {
          return this.walk((child, i2) => {
            if (child.type === "comment") {
              return callback(child, i2);
            }
          });
        }
        walkDecls(prop, callback) {
          if (!callback) {
            callback = prop;
            return this.walk((child, i2) => {
              if (child.type === "decl") {
                return callback(child, i2);
              }
            });
          }
          if (prop instanceof RegExp) {
            return this.walk((child, i2) => {
              if (child.type === "decl" && prop.test(child.prop)) {
                return callback(child, i2);
              }
            });
          }
          return this.walk((child, i2) => {
            if (child.type === "decl" && child.prop === prop) {
              return callback(child, i2);
            }
          });
        }
        walkRules(selector3, callback) {
          if (!callback) {
            callback = selector3;
            return this.walk((child, i2) => {
              if (child.type === "rule") {
                return callback(child, i2);
              }
            });
          }
          if (selector3 instanceof RegExp) {
            return this.walk((child, i2) => {
              if (child.type === "rule" && selector3.test(child.selector)) {
                return callback(child, i2);
              }
            });
          }
          return this.walk((child, i2) => {
            if (child.type === "rule" && child.selector === selector3) {
              return callback(child, i2);
            }
          });
        }
        get first() {
          if (!this.proxyOf.nodes) return void 0;
          return this.proxyOf.nodes[0];
        }
        get last() {
          if (!this.proxyOf.nodes) return void 0;
          return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
        }
      };
      Container.registerParse = (dependant) => {
        parse4 = dependant;
      };
      Container.registerRule = (dependant) => {
        Rule = dependant;
      };
      Container.registerAtRule = (dependant) => {
        AtRule = dependant;
      };
      Container.registerRoot = (dependant) => {
        Root2 = dependant;
      };
      module.exports = Container;
      Container.default = Container;
      Container.rebuild = (node) => {
        if (node.type === "atrule") {
          Object.setPrototypeOf(node, AtRule.prototype);
        } else if (node.type === "rule") {
          Object.setPrototypeOf(node, Rule.prototype);
        } else if (node.type === "decl") {
          Object.setPrototypeOf(node, Declaration.prototype);
        } else if (node.type === "comment") {
          Object.setPrototypeOf(node, Comment.prototype);
        } else if (node.type === "root") {
          Object.setPrototypeOf(node, Root2.prototype);
        }
        node[my] = true;
        if (node.nodes) {
          node.nodes.forEach((child) => {
            Container.rebuild(child);
          });
        }
      };
    }
  });

  // node_modules/postcss/lib/tokenize.js
  var require_tokenize = __commonJS({
    "node_modules/postcss/lib/tokenize.js"(exports, module) {
      "use strict";
      var SINGLE_QUOTE = "'".charCodeAt(0);
      var DOUBLE_QUOTE = '"'.charCodeAt(0);
      var BACKSLASH = "\\".charCodeAt(0);
      var SLASH = "/".charCodeAt(0);
      var NEWLINE = "\n".charCodeAt(0);
      var SPACE3 = " ".charCodeAt(0);
      var FEED = "\f".charCodeAt(0);
      var TAB5 = "	".charCodeAt(0);
      var CR = "\r".charCodeAt(0);
      var OPEN_SQUARE = "[".charCodeAt(0);
      var CLOSE_SQUARE = "]".charCodeAt(0);
      var OPEN_PARENTHESES = "(".charCodeAt(0);
      var CLOSE_PARENTHESES = ")".charCodeAt(0);
      var OPEN_CURLY = "{".charCodeAt(0);
      var CLOSE_CURLY = "}".charCodeAt(0);
      var SEMICOLON = ";".charCodeAt(0);
      var ASTERISK = "*".charCodeAt(0);
      var COLON = ":".charCodeAt(0);
      var AT = "@".charCodeAt(0);
      var RE_AT_END = /[\t\n\f\r "#'()/;[\\\]{}]/g;
      var RE_WORD_END = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g;
      var RE_BAD_BRACKET = /.[\r\n"'(/\\]/;
      var RE_HEX_ESCAPE = /[\da-f]/i;
      module.exports = function tokenizer(input, options = {}) {
        let css = input.css.valueOf();
        let ignore = options.ignoreErrors;
        let code, next, quote, content, escape;
        let escaped, escapePos, prev, n2, currentToken;
        let length = css.length;
        let pos = 0;
        let buffer = [];
        let returned = [];
        function position() {
          return pos;
        }
        function unclosed(what) {
          throw input.error("Unclosed " + what, pos);
        }
        function endOfFile() {
          return returned.length === 0 && pos >= length;
        }
        function nextToken(opts) {
          if (returned.length) return returned.pop();
          if (pos >= length) return;
          let ignoreUnclosed = opts ? opts.ignoreUnclosed : false;
          code = css.charCodeAt(pos);
          switch (code) {
            case NEWLINE:
            case SPACE3:
            case TAB5:
            case CR:
            case FEED: {
              next = pos;
              do {
                next += 1;
                code = css.charCodeAt(next);
              } while (code === SPACE3 || code === NEWLINE || code === TAB5 || code === CR || code === FEED);
              currentToken = ["space", css.slice(pos, next)];
              pos = next - 1;
              break;
            }
            case OPEN_SQUARE:
            case CLOSE_SQUARE:
            case OPEN_CURLY:
            case CLOSE_CURLY:
            case COLON:
            case SEMICOLON:
            case CLOSE_PARENTHESES: {
              let controlChar = String.fromCharCode(code);
              currentToken = [controlChar, controlChar, pos];
              break;
            }
            case OPEN_PARENTHESES: {
              prev = buffer.length ? buffer.pop()[1] : "";
              n2 = css.charCodeAt(pos + 1);
              if (prev === "url" && n2 !== SINGLE_QUOTE && n2 !== DOUBLE_QUOTE && n2 !== SPACE3 && n2 !== NEWLINE && n2 !== TAB5 && n2 !== FEED && n2 !== CR) {
                next = pos;
                do {
                  escaped = false;
                  next = css.indexOf(")", next + 1);
                  if (next === -1) {
                    if (ignore || ignoreUnclosed) {
                      next = pos;
                      break;
                    } else {
                      unclosed("bracket");
                    }
                  }
                  escapePos = next;
                  while (css.charCodeAt(escapePos - 1) === BACKSLASH) {
                    escapePos -= 1;
                    escaped = !escaped;
                  }
                } while (escaped);
                currentToken = ["brackets", css.slice(pos, next + 1), pos, next];
                pos = next;
              } else {
                next = css.indexOf(")", pos + 1);
                content = css.slice(pos, next + 1);
                if (next === -1 || RE_BAD_BRACKET.test(content)) {
                  currentToken = ["(", "(", pos];
                } else {
                  currentToken = ["brackets", content, pos, next];
                  pos = next;
                }
              }
              break;
            }
            case SINGLE_QUOTE:
            case DOUBLE_QUOTE: {
              quote = code === SINGLE_QUOTE ? "'" : '"';
              next = pos;
              do {
                escaped = false;
                next = css.indexOf(quote, next + 1);
                if (next === -1) {
                  if (ignore || ignoreUnclosed) {
                    next = pos + 1;
                    break;
                  } else {
                    unclosed("string");
                  }
                }
                escapePos = next;
                while (css.charCodeAt(escapePos - 1) === BACKSLASH) {
                  escapePos -= 1;
                  escaped = !escaped;
                }
              } while (escaped);
              currentToken = ["string", css.slice(pos, next + 1), pos, next];
              pos = next;
              break;
            }
            case AT: {
              RE_AT_END.lastIndex = pos + 1;
              RE_AT_END.test(css);
              if (RE_AT_END.lastIndex === 0) {
                next = css.length - 1;
              } else {
                next = RE_AT_END.lastIndex - 2;
              }
              currentToken = ["at-word", css.slice(pos, next + 1), pos, next];
              pos = next;
              break;
            }
            case BACKSLASH: {
              next = pos;
              escape = true;
              while (css.charCodeAt(next + 1) === BACKSLASH) {
                next += 1;
                escape = !escape;
              }
              code = css.charCodeAt(next + 1);
              if (escape && code !== SLASH && code !== SPACE3 && code !== NEWLINE && code !== TAB5 && code !== CR && code !== FEED) {
                next += 1;
                if (RE_HEX_ESCAPE.test(css.charAt(next))) {
                  while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) {
                    next += 1;
                  }
                  if (css.charCodeAt(next + 1) === SPACE3) {
                    next += 1;
                  }
                }
              }
              currentToken = ["word", css.slice(pos, next + 1), pos, next];
              pos = next;
              break;
            }
            default: {
              if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) {
                next = css.indexOf("*/", pos + 2) + 1;
                if (next === 0) {
                  if (ignore || ignoreUnclosed) {
                    next = css.length;
                  } else {
                    unclosed("comment");
                  }
                }
                currentToken = ["comment", css.slice(pos, next + 1), pos, next];
                pos = next;
              } else {
                RE_WORD_END.lastIndex = pos + 1;
                RE_WORD_END.test(css);
                if (RE_WORD_END.lastIndex === 0) {
                  next = css.length - 1;
                } else {
                  next = RE_WORD_END.lastIndex - 2;
                }
                currentToken = ["word", css.slice(pos, next + 1), pos, next];
                buffer.push(currentToken);
                pos = next;
              }
              break;
            }
          }
          pos++;
          return currentToken;
        }
        function back(token) {
          returned.push(token);
        }
        return {
          back,
          endOfFile,
          nextToken,
          position
        };
      };
    }
  });

  // node_modules/postcss/lib/at-rule.js
  var require_at_rule = __commonJS({
    "node_modules/postcss/lib/at-rule.js"(exports, module) {
      "use strict";
      var Container = require_container();
      var AtRule = class extends Container {
        constructor(defaults2) {
          super(defaults2);
          this.type = "atrule";
        }
        append(...children) {
          if (!this.proxyOf.nodes) this.nodes = [];
          return super.append(...children);
        }
        prepend(...children) {
          if (!this.proxyOf.nodes) this.nodes = [];
          return super.prepend(...children);
        }
      };
      module.exports = AtRule;
      AtRule.default = AtRule;
      Container.registerAtRule(AtRule);
    }
  });

  // node_modules/postcss/lib/root.js
  var require_root = __commonJS({
    "node_modules/postcss/lib/root.js"(exports, module) {
      "use strict";
      var Container = require_container();
      var LazyResult;
      var Processor2;
      var Root2 = class extends Container {
        constructor(defaults2) {
          super(defaults2);
          this.type = "root";
          if (!this.nodes) this.nodes = [];
        }
        normalize(child, sample, type) {
          let nodes = super.normalize(child);
          if (sample) {
            if (type === "prepend") {
              if (this.nodes.length > 1) {
                sample.raws.before = this.nodes[1].raws.before;
              } else {
                delete sample.raws.before;
              }
            } else if (this.first !== sample) {
              for (let node of nodes) {
                node.raws.before = sample.raws.before;
              }
            }
          }
          return nodes;
        }
        removeChild(child, ignore) {
          let index = this.index(child);
          if (!ignore && index === 0 && this.nodes.length > 1) {
            this.nodes[1].raws.before = this.nodes[index].raws.before;
          }
          return super.removeChild(child);
        }
        toResult(opts = {}) {
          let lazy = new LazyResult(new Processor2(), this, opts);
          return lazy.stringify();
        }
      };
      Root2.registerLazyResult = (dependant) => {
        LazyResult = dependant;
      };
      Root2.registerProcessor = (dependant) => {
        Processor2 = dependant;
      };
      module.exports = Root2;
      Root2.default = Root2;
      Container.registerRoot(Root2);
    }
  });

  // node_modules/postcss/lib/list.js
  var require_list = __commonJS({
    "node_modules/postcss/lib/list.js"(exports, module) {
      "use strict";
      var list = {
        comma(string) {
          return list.split(string, [","], true);
        },
        space(string) {
          let spaces = [" ", "\n", "	"];
          return list.split(string, spaces);
        },
        split(string, separators, last) {
          let array = [];
          let current = "";
          let split2 = false;
          let func = 0;
          let inQuote = false;
          let prevQuote = "";
          let escape = false;
          for (let letter of string) {
            if (escape) {
              escape = false;
            } else if (letter === "\\") {
              escape = true;
            } else if (inQuote) {
              if (letter === prevQuote) {
                inQuote = false;
              }
            } else if (letter === '"' || letter === "'") {
              inQuote = true;
              prevQuote = letter;
            } else if (letter === "(") {
              func += 1;
            } else if (letter === ")") {
              if (func > 0) func -= 1;
            } else if (func === 0) {
              if (separators.includes(letter)) split2 = true;
            }
            if (split2) {
              if (current !== "") array.push(current.trim());
              current = "";
              split2 = false;
            } else {
              current += letter;
            }
          }
          if (last || current !== "") array.push(current.trim());
          return array;
        }
      };
      module.exports = list;
      list.default = list;
    }
  });

  // node_modules/postcss/lib/rule.js
  var require_rule = __commonJS({
    "node_modules/postcss/lib/rule.js"(exports, module) {
      "use strict";
      var Container = require_container();
      var list = require_list();
      var Rule = class extends Container {
        constructor(defaults2) {
          super(defaults2);
          this.type = "rule";
          if (!this.nodes) this.nodes = [];
        }
        get selectors() {
          return list.comma(this.selector);
        }
        set selectors(values) {
          let match2 = this.selector ? this.selector.match(/,\s*/) : null;
          let sep = match2 ? match2[0] : "," + this.raw("between", "beforeOpen");
          this.selector = values.join(sep);
        }
      };
      module.exports = Rule;
      Rule.default = Rule;
      Container.registerRule(Rule);
    }
  });

  // node_modules/postcss/lib/parser.js
  var require_parser = __commonJS({
    "node_modules/postcss/lib/parser.js"(exports, module) {
      "use strict";
      var Declaration = require_declaration();
      var tokenizer = require_tokenize();
      var Comment = require_comment();
      var AtRule = require_at_rule();
      var Root2 = require_root();
      var Rule = require_rule();
      var SAFE_COMMENT_NEIGHBOR = {
        empty: true,
        space: true
      };
      function findLastWithPosition(tokens) {
        for (let i2 = tokens.length - 1; i2 >= 0; i2--) {
          let token = tokens[i2];
          let pos = token[3] || token[2];
          if (pos) return pos;
        }
      }
      var Parser = class {
        constructor(input) {
          this.input = input;
          this.root = new Root2();
          this.current = this.root;
          this.spaces = "";
          this.semicolon = false;
          this.createTokenizer();
          this.root.source = { input, start: { column: 1, line: 1, offset: 0 } };
        }
        atrule(token) {
          let node = new AtRule();
          node.name = token[1].slice(1);
          if (node.name === "") {
            this.unnamedAtrule(node, token);
          }
          this.init(node, token[2]);
          let type;
          let prev;
          let shift;
          let last = false;
          let open = false;
          let params = [];
          let brackets = [];
          while (!this.tokenizer.endOfFile()) {
            token = this.tokenizer.nextToken();
            type = token[0];
            if (type === "(" || type === "[") {
              brackets.push(type === "(" ? ")" : "]");
            } else if (type === "{" && brackets.length > 0) {
              brackets.push("}");
            } else if (type === brackets[brackets.length - 1]) {
              brackets.pop();
            }
            if (brackets.length === 0) {
              if (type === ";") {
                node.source.end = this.getPosition(token[2]);
                node.source.end.offset++;
                this.semicolon = true;
                break;
              } else if (type === "{") {
                open = true;
                break;
              } else if (type === "}") {
                if (params.length > 0) {
                  shift = params.length - 1;
                  prev = params[shift];
                  while (prev && prev[0] === "space") {
                    prev = params[--shift];
                  }
                  if (prev) {
                    node.source.end = this.getPosition(prev[3] || prev[2]);
                    node.source.end.offset++;
                  }
                }
                this.end(token);
                break;
              } else {
                params.push(token);
              }
            } else {
              params.push(token);
            }
            if (this.tokenizer.endOfFile()) {
              last = true;
              break;
            }
          }
          node.raws.between = this.spacesAndCommentsFromEnd(params);
          if (params.length) {
            node.raws.afterName = this.spacesAndCommentsFromStart(params);
            this.raw(node, "params", params);
            if (last) {
              token = params[params.length - 1];
              node.source.end = this.getPosition(token[3] || token[2]);
              node.source.end.offset++;
              this.spaces = node.raws.between;
              node.raws.between = "";
            }
          } else {
            node.raws.afterName = "";
            node.params = "";
          }
          if (open) {
            node.nodes = [];
            this.current = node;
          }
        }
        checkMissedSemicolon(tokens) {
          let colon = this.colon(tokens);
          if (colon === false) return;
          let founded = 0;
          let token;
          for (let j2 = colon - 1; j2 >= 0; j2--) {
            token = tokens[j2];
            if (token[0] !== "space") {
              founded += 1;
              if (founded === 2) break;
            }
          }
          throw this.input.error(
            "Missed semicolon",
            token[0] === "word" ? token[3] + 1 : token[2]
          );
        }
        colon(tokens) {
          let brackets = 0;
          let token, type, prev;
          for (let [i2, element] of tokens.entries()) {
            token = element;
            type = token[0];
            if (type === "(") {
              brackets += 1;
            }
            if (type === ")") {
              brackets -= 1;
            }
            if (brackets === 0 && type === ":") {
              if (!prev) {
                this.doubleColon(token);
              } else if (prev[0] === "word" && prev[1] === "progid") {
                continue;
              } else {
                return i2;
              }
            }
            prev = token;
          }
          return false;
        }
        comment(token) {
          let node = new Comment();
          this.init(node, token[2]);
          node.source.end = this.getPosition(token[3] || token[2]);
          node.source.end.offset++;
          let text = token[1].slice(2, -2);
          if (/^\s*$/.test(text)) {
            node.text = "";
            node.raws.left = text;
            node.raws.right = "";
          } else {
            let match2 = text.match(/^(\s*)([^]*\S)(\s*)$/);
            node.text = match2[2];
            node.raws.left = match2[1];
            node.raws.right = match2[3];
          }
        }
        createTokenizer() {
          this.tokenizer = tokenizer(this.input);
        }
        decl(tokens, customProperty) {
          let node = new Declaration();
          this.init(node, tokens[0][2]);
          let last = tokens[tokens.length - 1];
          if (last[0] === ";") {
            this.semicolon = true;
            tokens.pop();
          }
          node.source.end = this.getPosition(
            last[3] || last[2] || findLastWithPosition(tokens)
          );
          node.source.end.offset++;
          while (tokens[0][0] !== "word") {
            if (tokens.length === 1) this.unknownWord(tokens);
            node.raws.before += tokens.shift()[1];
          }
          node.source.start = this.getPosition(tokens[0][2]);
          node.prop = "";
          while (tokens.length) {
            let type = tokens[0][0];
            if (type === ":" || type === "space" || type === "comment") {
              break;
            }
            node.prop += tokens.shift()[1];
          }
          node.raws.between = "";
          let token;
          while (tokens.length) {
            token = tokens.shift();
            if (token[0] === ":") {
              node.raws.between += token[1];
              break;
            } else {
              if (token[0] === "word" && /\w/.test(token[1])) {
                this.unknownWord([token]);
              }
              node.raws.between += token[1];
            }
          }
          if (node.prop[0] === "_" || node.prop[0] === "*") {
            node.raws.before += node.prop[0];
            node.prop = node.prop.slice(1);
          }
          let firstSpaces = [];
          let next;
          while (tokens.length) {
            next = tokens[0][0];
            if (next !== "space" && next !== "comment") break;
            firstSpaces.push(tokens.shift());
          }
          this.precheckMissedSemicolon(tokens);
          for (let i2 = tokens.length - 1; i2 >= 0; i2--) {
            token = tokens[i2];
            if (token[1].toLowerCase() === "!important") {
              node.important = true;
              let string = this.stringFrom(tokens, i2);
              string = this.spacesFromEnd(tokens) + string;
              if (string !== " !important") node.raws.important = string;
              break;
            } else if (token[1].toLowerCase() === "important") {
              let cache = tokens.slice(0);
              let str = "";
              for (let j2 = i2; j2 > 0; j2--) {
                let type = cache[j2][0];
                if (str.trim().indexOf("!") === 0 && type !== "space") {
                  break;
                }
                str = cache.pop()[1] + str;
              }
              if (str.trim().indexOf("!") === 0) {
                node.important = true;
                node.raws.important = str;
                tokens = cache;
              }
            }
            if (token[0] !== "space" && token[0] !== "comment") {
              break;
            }
          }
          let hasWord = tokens.some((i2) => i2[0] !== "space" && i2[0] !== "comment");
          if (hasWord) {
            node.raws.between += firstSpaces.map((i2) => i2[1]).join("");
            firstSpaces = [];
          }
          this.raw(node, "value", firstSpaces.concat(tokens), customProperty);
          if (node.value.includes(":") && !customProperty) {
            this.checkMissedSemicolon(tokens);
          }
        }
        doubleColon(token) {
          throw this.input.error(
            "Double colon",
            { offset: token[2] },
            { offset: token[2] + token[1].length }
          );
        }
        emptyRule(token) {
          let node = new Rule();
          this.init(node, token[2]);
          node.selector = "";
          node.raws.between = "";
          this.current = node;
        }
        end(token) {
          if (this.current.nodes && this.current.nodes.length) {
            this.current.raws.semicolon = this.semicolon;
          }
          this.semicolon = false;
          this.current.raws.after = (this.current.raws.after || "") + this.spaces;
          this.spaces = "";
          if (this.current.parent) {
            this.current.source.end = this.getPosition(token[2]);
            this.current.source.end.offset++;
            this.current = this.current.parent;
          } else {
            this.unexpectedClose(token);
          }
        }
        endFile() {
          if (this.current.parent) this.unclosedBlock();
          if (this.current.nodes && this.current.nodes.length) {
            this.current.raws.semicolon = this.semicolon;
          }
          this.current.raws.after = (this.current.raws.after || "") + this.spaces;
          this.root.source.end = this.getPosition(this.tokenizer.position());
        }
        freeSemicolon(token) {
          this.spaces += token[1];
          if (this.current.nodes) {
            let prev = this.current.nodes[this.current.nodes.length - 1];
            if (prev && prev.type === "rule" && !prev.raws.ownSemicolon) {
              prev.raws.ownSemicolon = this.spaces;
              this.spaces = "";
            }
          }
        }
        // Helpers
        getPosition(offset) {
          let pos = this.input.fromOffset(offset);
          return {
            column: pos.col,
            line: pos.line,
            offset
          };
        }
        init(node, offset) {
          this.current.push(node);
          node.source = {
            input: this.input,
            start: this.getPosition(offset)
          };
          node.raws.before = this.spaces;
          this.spaces = "";
          if (node.type !== "comment") this.semicolon = false;
        }
        other(start2) {
          let end = false;
          let type = null;
          let colon = false;
          let bracket = null;
          let brackets = [];
          let customProperty = start2[1].startsWith("--");
          let tokens = [];
          let token = start2;
          while (token) {
            type = token[0];
            tokens.push(token);
            if (type === "(" || type === "[") {
              if (!bracket) bracket = token;
              brackets.push(type === "(" ? ")" : "]");
            } else if (customProperty && colon && type === "{") {
              if (!bracket) bracket = token;
              brackets.push("}");
            } else if (brackets.length === 0) {
              if (type === ";") {
                if (colon) {
                  this.decl(tokens, customProperty);
                  return;
                } else {
                  break;
                }
              } else if (type === "{") {
                this.rule(tokens);
                return;
              } else if (type === "}") {
                this.tokenizer.back(tokens.pop());
                end = true;
                break;
              } else if (type === ":") {
                colon = true;
              }
            } else if (type === brackets[brackets.length - 1]) {
              brackets.pop();
              if (brackets.length === 0) bracket = null;
            }
            token = this.tokenizer.nextToken();
          }
          if (this.tokenizer.endOfFile()) end = true;
          if (brackets.length > 0) this.unclosedBracket(bracket);
          if (end && colon) {
            if (!customProperty) {
              while (tokens.length) {
                token = tokens[tokens.length - 1][0];
                if (token !== "space" && token !== "comment") break;
                this.tokenizer.back(tokens.pop());
              }
            }
            this.decl(tokens, customProperty);
          } else {
            this.unknownWord(tokens);
          }
        }
        parse() {
          let token;
          while (!this.tokenizer.endOfFile()) {
            token = this.tokenizer.nextToken();
            switch (token[0]) {
              case "space":
                this.spaces += token[1];
                break;
              case ";":
                this.freeSemicolon(token);
                break;
              case "}":
                this.end(token);
                break;
              case "comment":
                this.comment(token);
                break;
              case "at-word":
                this.atrule(token);
                break;
              case "{":
                this.emptyRule(token);
                break;
              default:
                this.other(token);
                break;
            }
          }
          this.endFile();
        }
        precheckMissedSemicolon() {
        }
        raw(node, prop, tokens, customProperty) {
          let token, type;
          let length = tokens.length;
          let value = "";
          let clean = true;
          let next, prev;
          for (let i2 = 0; i2 < length; i2 += 1) {
            token = tokens[i2];
            type = token[0];
            if (type === "space" && i2 === length - 1 && !customProperty) {
              clean = false;
            } else if (type === "comment") {
              prev = tokens[i2 - 1] ? tokens[i2 - 1][0] : "empty";
              next = tokens[i2 + 1] ? tokens[i2 + 1][0] : "empty";
              if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) {
                if (value.slice(-1) === ",") {
                  clean = false;
                } else {
                  value += token[1];
                }
              } else {
                clean = false;
              }
            } else {
              value += token[1];
            }
          }
          if (!clean) {
            let raw = tokens.reduce((all, i2) => all + i2[1], "");
            node.raws[prop] = { raw, value };
          }
          node[prop] = value;
        }
        rule(tokens) {
          tokens.pop();
          let node = new Rule();
          this.init(node, tokens[0][2]);
          node.raws.between = this.spacesAndCommentsFromEnd(tokens);
          this.raw(node, "selector", tokens);
          this.current = node;
        }
        spacesAndCommentsFromEnd(tokens) {
          let lastTokenType;
          let spaces = "";
          while (tokens.length) {
            lastTokenType = tokens[tokens.length - 1][0];
            if (lastTokenType !== "space" && lastTokenType !== "comment") break;
            spaces = tokens.pop()[1] + spaces;
          }
          return spaces;
        }
        // Errors
        spacesAndCommentsFromStart(tokens) {
          let next;
          let spaces = "";
          while (tokens.length) {
            next = tokens[0][0];
            if (next !== "space" && next !== "comment") break;
            spaces += tokens.shift()[1];
          }
          return spaces;
        }
        spacesFromEnd(tokens) {
          let lastTokenType;
          let spaces = "";
          while (tokens.length) {
            lastTokenType = tokens[tokens.length - 1][0];
            if (lastTokenType !== "space") break;
            spaces = tokens.pop()[1] + spaces;
          }
          return spaces;
        }
        stringFrom(tokens, from) {
          let result = "";
          for (let i2 = from; i2 < tokens.length; i2++) {
            result += tokens[i2][1];
          }
          tokens.splice(from, tokens.length - from);
          return result;
        }
        unclosedBlock() {
          let pos = this.current.source.start;
          throw this.input.error("Unclosed block", pos.line, pos.column);
        }
        unclosedBracket(bracket) {
          throw this.input.error(
            "Unclosed bracket",
            { offset: bracket[2] },
            { offset: bracket[2] + 1 }
          );
        }
        unexpectedClose(token) {
          throw this.input.error(
            "Unexpected }",
            { offset: token[2] },
            { offset: token[2] + 1 }
          );
        }
        unknownWord(tokens) {
          throw this.input.error(
            "Unknown word",
            { offset: tokens[0][2] },
            { offset: tokens[0][2] + tokens[0][1].length }
          );
        }
        unnamedAtrule(node, token) {
          throw this.input.error(
            "At-rule without name",
            { offset: token[2] },
            { offset: token[2] + token[1].length }
          );
        }
      };
      module.exports = Parser;
    }
  });

  // node_modules/postcss/lib/parse.js
  var require_parse = __commonJS({
    "node_modules/postcss/lib/parse.js"(exports, module) {
      "use strict";
      var Container = require_container();
      var Parser = require_parser();
      var Input = require_input();
      function parse4(css, opts) {
        let input = new Input(css, opts);
        let parser = new Parser(input);
        try {
          parser.parse();
        } catch (e2) {
          if (true) {
            if (e2.name === "CssSyntaxError" && opts && opts.from) {
              if (/\.scss$/i.test(opts.from)) {
                e2.message += "\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser";
              } else if (/\.sass/i.test(opts.from)) {
                e2.message += "\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser";
              } else if (/\.less$/i.test(opts.from)) {
                e2.message += "\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser";
              }
            }
          }
          throw e2;
        }
        return parser.root;
      }
      module.exports = parse4;
      parse4.default = parse4;
      Container.registerParse(parse4);
    }
  });

  // node_modules/postcss/lib/warning.js
  var require_warning2 = __commonJS({
    "node_modules/postcss/lib/warning.js"(exports, module) {
      "use strict";
      var Warning2 = class {
        constructor(text, opts = {}) {
          this.type = "warning";
          this.text = text;
          if (opts.node && opts.node.source) {
            let range2 = opts.node.rangeBy(opts);
            this.line = range2.start.line;
            this.column = range2.start.column;
            this.endLine = range2.end.line;
            this.endColumn = range2.end.column;
          }
          for (let opt in opts) this[opt] = opts[opt];
        }
        toString() {
          if (this.node) {
            return this.node.error(this.text, {
              index: this.index,
              plugin: this.plugin,
              word: this.word
            }).message;
          }
          if (this.plugin) {
            return this.plugin + ": " + this.text;
          }
          return this.text;
        }
      };
      module.exports = Warning2;
      Warning2.default = Warning2;
    }
  });

  // node_modules/postcss/lib/result.js
  var require_result = __commonJS({
    "node_modules/postcss/lib/result.js"(exports, module) {
      "use strict";
      var Warning2 = require_warning2();
      var Result = class {
        constructor(processor, root, opts) {
          this.processor = processor;
          this.messages = [];
          this.root = root;
          this.opts = opts;
          this.css = void 0;
          this.map = void 0;
        }
        toString() {
          return this.css;
        }
        warn(text, opts = {}) {
          if (!opts.plugin) {
            if (this.lastPlugin && this.lastPlugin.postcssPlugin) {
              opts.plugin = this.lastPlugin.postcssPlugin;
            }
          }
          let warning6 = new Warning2(text, opts);
          this.messages.push(warning6);
          return warning6;
        }
        warnings() {
          return this.messages.filter((i2) => i2.type === "warning");
        }
        get content() {
          return this.css;
        }
      };
      module.exports = Result;
      Result.default = Result;
    }
  });

  // node_modules/postcss/lib/no-work-result.js
  var require_no_work_result = __commonJS({
    "node_modules/postcss/lib/no-work-result.js"(exports, module) {
      "use strict";
      var MapGenerator = require_map_generator();
      var stringify2 = require_stringify();
      var warnOnce = require_warn_once();
      var parse4 = require_parse();
      var Result = require_result();
      var NoWorkResult = class {
        constructor(processor, css, opts) {
          css = css.toString();
          this.stringified = false;
          this._processor = processor;
          this._css = css;
          this._opts = opts;
          this._map = void 0;
          let root;
          let str = stringify2;
          this.result = new Result(this._processor, root, this._opts);
          this.result.css = css;
          let self = this;
          Object.defineProperty(this.result, "root", {
            get() {
              return self.root;
            }
          });
          let map = new MapGenerator(str, root, this._opts, css);
          if (map.isMap()) {
            let [generatedCSS, generatedMap] = map.generate();
            if (generatedCSS) {
              this.result.css = generatedCSS;
            }
            if (generatedMap) {
              this.result.map = generatedMap;
            }
          } else {
            map.clearAnnotation();
            this.result.css = map.css;
          }
        }
        async() {
          if (this.error) return Promise.reject(this.error);
          return Promise.resolve(this.result);
        }
        catch(onRejected) {
          return this.async().catch(onRejected);
        }
        finally(onFinally) {
          return this.async().then(onFinally, onFinally);
        }
        sync() {
          if (this.error) throw this.error;
          return this.result;
        }
        then(onFulfilled, onRejected) {
          if (true) {
            if (!("from" in this._opts)) {
              warnOnce(
                "Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."
              );
            }
          }
          return this.async().then(onFulfilled, onRejected);
        }
        toString() {
          return this._css;
        }
        warnings() {
          return [];
        }
        get content() {
          return this.result.css;
        }
        get css() {
          return this.result.css;
        }
        get map() {
          return this.result.map;
        }
        get messages() {
          return [];
        }
        get opts() {
          return this.result.opts;
        }
        get processor() {
          return this.result.processor;
        }
        get root() {
          if (this._root) {
            return this._root;
          }
          let root;
          let parser = parse4;
          try {
            root = parser(this._css, this._opts);
          } catch (error) {
            this.error = error;
          }
          if (this.error) {
            throw this.error;
          } else {
            this._root = root;
            return root;
          }
        }
        get [Symbol.toStringTag]() {
          return "NoWorkResult";
        }
      };
      module.exports = NoWorkResult;
      NoWorkResult.default = NoWorkResult;
    }
  });

  // node_modules/postcss/lib/document.js
  var require_document = __commonJS({
    "node_modules/postcss/lib/document.js"(exports, module) {
      "use strict";
      var Container = require_container();
      var LazyResult;
      var Processor2;
      var Document = class extends Container {
        constructor(defaults2) {
          super({ type: "document", ...defaults2 });
          if (!this.nodes) {
            this.nodes = [];
          }
        }
        toResult(opts = {}) {
          let lazy = new LazyResult(new Processor2(), this, opts);
          return lazy.stringify();
        }
      };
      Document.registerLazyResult = (dependant) => {
        LazyResult = dependant;
      };
      Document.registerProcessor = (dependant) => {
        Processor2 = dependant;
      };
      module.exports = Document;
      Document.default = Document;
    }
  });

  // node_modules/postcss/lib/lazy-result.js
  var require_lazy_result = __commonJS({
    "node_modules/postcss/lib/lazy-result.js"(exports, module) {
      "use strict";
      var { isClean, my } = require_symbols();
      var MapGenerator = require_map_generator();
      var stringify2 = require_stringify();
      var Container = require_container();
      var Document = require_document();
      var warnOnce = require_warn_once();
      var Result = require_result();
      var parse4 = require_parse();
      var Root2 = require_root();
      var TYPE_TO_CLASS_NAME = {
        atrule: "AtRule",
        comment: "Comment",
        decl: "Declaration",
        document: "Document",
        root: "Root",
        rule: "Rule"
      };
      var PLUGIN_PROPS = {
        AtRule: true,
        AtRuleExit: true,
        Comment: true,
        CommentExit: true,
        Declaration: true,
        DeclarationExit: true,
        Document: true,
        DocumentExit: true,
        Once: true,
        OnceExit: true,
        postcssPlugin: true,
        prepare: true,
        Root: true,
        RootExit: true,
        Rule: true,
        RuleExit: true
      };
      var NOT_VISITORS = {
        Once: true,
        postcssPlugin: true,
        prepare: true
      };
      var CHILDREN = 0;
      function isPromise(obj) {
        return typeof obj === "object" && typeof obj.then === "function";
      }
      function getEvents(node) {
        let key = false;
        let type = TYPE_TO_CLASS_NAME[node.type];
        if (node.type === "decl") {
          key = node.prop.toLowerCase();
        } else if (node.type === "atrule") {
          key = node.name.toLowerCase();
        }
        if (key && node.append) {
          return [
            type,
            type + "-" + key,
            CHILDREN,
            type + "Exit",
            type + "Exit-" + key
          ];
        } else if (key) {
          return [type, type + "-" + key, type + "Exit", type + "Exit-" + key];
        } else if (node.append) {
          return [type, CHILDREN, type + "Exit"];
        } else {
          return [type, type + "Exit"];
        }
      }
      function toStack(node) {
        let events;
        if (node.type === "document") {
          events = ["Document", CHILDREN, "DocumentExit"];
        } else if (node.type === "root") {
          events = ["Root", CHILDREN, "RootExit"];
        } else {
          events = getEvents(node);
        }
        return {
          eventIndex: 0,
          events,
          iterator: 0,
          node,
          visitorIndex: 0,
          visitors: []
        };
      }
      function cleanMarks(node) {
        node[isClean] = false;
        if (node.nodes) node.nodes.forEach((i2) => cleanMarks(i2));
        return node;
      }
      var postcss = {};
      var LazyResult = class _LazyResult {
        constructor(processor, css, opts) {
          this.stringified = false;
          this.processed = false;
          let root;
          if (typeof css === "object" && css !== null && (css.type === "root" || css.type === "document")) {
            root = cleanMarks(css);
          } else if (css instanceof _LazyResult || css instanceof Result) {
            root = cleanMarks(css.root);
            if (css.map) {
              if (typeof opts.map === "undefined") opts.map = {};
              if (!opts.map.inline) opts.map.inline = false;
              opts.map.prev = css.map;
            }
          } else {
            let parser = parse4;
            if (opts.syntax) parser = opts.syntax.parse;
            if (opts.parser) parser = opts.parser;
            if (parser.parse) parser = parser.parse;
            try {
              root = parser(css, opts);
            } catch (error) {
              this.processed = true;
              this.error = error;
            }
            if (root && !root[my]) {
              Container.rebuild(root);
            }
          }
          this.result = new Result(processor, root, opts);
          this.helpers = { ...postcss, postcss, result: this.result };
          this.plugins = this.processor.plugins.map((plugin) => {
            if (typeof plugin === "object" && plugin.prepare) {
              return { ...plugin, ...plugin.prepare(this.result) };
            } else {
              return plugin;
            }
          });
        }
        async() {
          if (this.error) return Promise.reject(this.error);
          if (this.processed) return Promise.resolve(this.result);
          if (!this.processing) {
            this.processing = this.runAsync();
          }
          return this.processing;
        }
        catch(onRejected) {
          return this.async().catch(onRejected);
        }
        finally(onFinally) {
          return this.async().then(onFinally, onFinally);
        }
        getAsyncError() {
          throw new Error("Use process(css).then(cb) to work with async plugins");
        }
        handleError(error, node) {
          let plugin = this.result.lastPlugin;
          try {
            if (node) node.addToError(error);
            this.error = error;
            if (error.name === "CssSyntaxError" && !error.plugin) {
              error.plugin = plugin.postcssPlugin;
              error.setMessage();
            } else if (plugin.postcssVersion) {
              if (true) {
                let pluginName = plugin.postcssPlugin;
                let pluginVer = plugin.postcssVersion;
                let runtimeVer = this.result.processor.version;
                let a2 = pluginVer.split(".");
                let b2 = runtimeVer.split(".");
                if (a2[0] !== b2[0] || parseInt(a2[1]) > parseInt(b2[1])) {
                  console.error(
                    "Unknown error from PostCSS plugin. Your current PostCSS version is " + runtimeVer + ", but " + pluginName + " uses " + pluginVer + ". Perhaps this is the source of the error below."
                  );
                }
              }
            }
          } catch (err) {
            if (console && console.error) console.error(err);
          }
          return error;
        }
        prepareVisitors() {
          this.listeners = {};
          let add2 = (plugin, type, cb) => {
            if (!this.listeners[type]) this.listeners[type] = [];
            this.listeners[type].push([plugin, cb]);
          };
          for (let plugin of this.plugins) {
            if (typeof plugin === "object") {
              for (let event in plugin) {
                if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) {
                  throw new Error(
                    `Unknown event ${event} in ${plugin.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`
                  );
                }
                if (!NOT_VISITORS[event]) {
                  if (typeof plugin[event] === "object") {
                    for (let filter in plugin[event]) {
                      if (filter === "*") {
                        add2(plugin, event, plugin[event][filter]);
                      } else {
                        add2(
                          plugin,
                          event + "-" + filter.toLowerCase(),
                          plugin[event][filter]
                        );
                      }
                    }
                  } else if (typeof plugin[event] === "function") {
                    add2(plugin, event, plugin[event]);
                  }
                }
              }
            }
          }
          this.hasListener = Object.keys(this.listeners).length > 0;
        }
        async runAsync() {
          this.plugin = 0;
          for (let i2 = 0; i2 < this.plugins.length; i2++) {
            let plugin = this.plugins[i2];
            let promise = this.runOnRoot(plugin);
            if (isPromise(promise)) {
              try {
                await promise;
              } catch (error) {
                throw this.handleError(error);
              }
            }
          }
          this.prepareVisitors();
          if (this.hasListener) {
            let root = this.result.root;
            while (!root[isClean]) {
              root[isClean] = true;
              let stack = [toStack(root)];
              while (stack.length > 0) {
                let promise = this.visitTick(stack);
                if (isPromise(promise)) {
                  try {
                    await promise;
                  } catch (e2) {
                    let node = stack[stack.length - 1].node;
                    throw this.handleError(e2, node);
                  }
                }
              }
            }
            if (this.listeners.OnceExit) {
              for (let [plugin, visitor] of this.listeners.OnceExit) {
                this.result.lastPlugin = plugin;
                try {
                  if (root.type === "document") {
                    let roots = root.nodes.map(
                      (subRoot) => visitor(subRoot, this.helpers)
                    );
                    await Promise.all(roots);
                  } else {
                    await visitor(root, this.helpers);
                  }
                } catch (e2) {
                  throw this.handleError(e2);
                }
              }
            }
          }
          this.processed = true;
          return this.stringify();
        }
        runOnRoot(plugin) {
          this.result.lastPlugin = plugin;
          try {
            if (typeof plugin === "object" && plugin.Once) {
              if (this.result.root.type === "document") {
                let roots = this.result.root.nodes.map(
                  (root) => plugin.Once(root, this.helpers)
                );
                if (isPromise(roots[0])) {
                  return Promise.all(roots);
                }
                return roots;
              }
              return plugin.Once(this.result.root, this.helpers);
            } else if (typeof plugin === "function") {
              return plugin(this.result.root, this.result);
            }
          } catch (error) {
            throw this.handleError(error);
          }
        }
        stringify() {
          if (this.error) throw this.error;
          if (this.stringified) return this.result;
          this.stringified = true;
          this.sync();
          let opts = this.result.opts;
          let str = stringify2;
          if (opts.syntax) str = opts.syntax.stringify;
          if (opts.stringifier) str = opts.stringifier;
          if (str.stringify) str = str.stringify;
          let map = new MapGenerator(str, this.result.root, this.result.opts);
          let data = map.generate();
          this.result.css = data[0];
          this.result.map = data[1];
          return this.result;
        }
        sync() {
          if (this.error) throw this.error;
          if (this.processed) return this.result;
          this.processed = true;
          if (this.processing) {
            throw this.getAsyncError();
          }
          for (let plugin of this.plugins) {
            let promise = this.runOnRoot(plugin);
            if (isPromise(promise)) {
              throw this.getAsyncError();
            }
          }
          this.prepareVisitors();
          if (this.hasListener) {
            let root = this.result.root;
            while (!root[isClean]) {
              root[isClean] = true;
              this.walkSync(root);
            }
            if (this.listeners.OnceExit) {
              if (root.type === "document") {
                for (let subRoot of root.nodes) {
                  this.visitSync(this.listeners.OnceExit, subRoot);
                }
              } else {
                this.visitSync(this.listeners.OnceExit, root);
              }
            }
          }
          return this.result;
        }
        then(onFulfilled, onRejected) {
          if (true) {
            if (!("from" in this.opts)) {
              warnOnce(
                "Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."
              );
            }
          }
          return this.async().then(onFulfilled, onRejected);
        }
        toString() {
          return this.css;
        }
        visitSync(visitors, node) {
          for (let [plugin, visitor] of visitors) {
            this.result.lastPlugin = plugin;
            let promise;
            try {
              promise = visitor(node, this.helpers);
            } catch (e2) {
              throw this.handleError(e2, node.proxyOf);
            }
            if (node.type !== "root" && node.type !== "document" && !node.parent) {
              return true;
            }
            if (isPromise(promise)) {
              throw this.getAsyncError();
            }
          }
        }
        visitTick(stack) {
          let visit = stack[stack.length - 1];
          let { node, visitors } = visit;
          if (node.type !== "root" && node.type !== "document" && !node.parent) {
            stack.pop();
            return;
          }
          if (visitors.length > 0 && visit.visitorIndex < visitors.length) {
            let [plugin, visitor] = visitors[visit.visitorIndex];
            visit.visitorIndex += 1;
            if (visit.visitorIndex === visitors.length) {
              visit.visitors = [];
              visit.visitorIndex = 0;
            }
            this.result.lastPlugin = plugin;
            try {
              return visitor(node.toProxy(), this.helpers);
            } catch (e2) {
              throw this.handleError(e2, node);
            }
          }
          if (visit.iterator !== 0) {
            let iterator = visit.iterator;
            let child;
            while (child = node.nodes[node.indexes[iterator]]) {
              node.indexes[iterator] += 1;
              if (!child[isClean]) {
                child[isClean] = true;
                stack.push(toStack(child));
                return;
              }
            }
            visit.iterator = 0;
            delete node.indexes[iterator];
          }
          let events = visit.events;
          while (visit.eventIndex < events.length) {
            let event = events[visit.eventIndex];
            visit.eventIndex += 1;
            if (event === CHILDREN) {
              if (node.nodes && node.nodes.length) {
                node[isClean] = true;
                visit.iterator = node.getIterator();
              }
              return;
            } else if (this.listeners[event]) {
              visit.visitors = this.listeners[event];
              return;
            }
          }
          stack.pop();
        }
        walkSync(node) {
          node[isClean] = true;
          let events = getEvents(node);
          for (let event of events) {
            if (event === CHILDREN) {
              if (node.nodes) {
                node.each((child) => {
                  if (!child[isClean]) this.walkSync(child);
                });
              }
            } else {
              let visitors = this.listeners[event];
              if (visitors) {
                if (this.visitSync(visitors, node.toProxy())) return;
              }
            }
          }
        }
        warnings() {
          return this.sync().warnings();
        }
        get content() {
          return this.stringify().content;
        }
        get css() {
          return this.stringify().css;
        }
        get map() {
          return this.stringify().map;
        }
        get messages() {
          return this.sync().messages;
        }
        get opts() {
          return this.result.opts;
        }
        get processor() {
          return this.result.processor;
        }
        get root() {
          return this.sync().root;
        }
        get [Symbol.toStringTag]() {
          return "LazyResult";
        }
      };
      LazyResult.registerPostcss = (dependant) => {
        postcss = dependant;
      };
      module.exports = LazyResult;
      LazyResult.default = LazyResult;
      Root2.registerLazyResult(LazyResult);
      Document.registerLazyResult(LazyResult);
    }
  });

  // node_modules/postcss/lib/processor.js
  var require_processor = __commonJS({
    "node_modules/postcss/lib/processor.js"(exports, module) {
      "use strict";
      var NoWorkResult = require_no_work_result();
      var LazyResult = require_lazy_result();
      var Document = require_document();
      var Root2 = require_root();
      var Processor2 = class {
        constructor(plugins = []) {
          this.version = "8.4.38";
          this.plugins = this.normalize(plugins);
        }
        normalize(plugins) {
          let normalized = [];
          for (let i2 of plugins) {
            if (i2.postcss === true) {
              i2 = i2();
            } else if (i2.postcss) {
              i2 = i2.postcss;
            }
            if (typeof i2 === "object" && Array.isArray(i2.plugins)) {
              normalized = normalized.concat(i2.plugins);
            } else if (typeof i2 === "object" && i2.postcssPlugin) {
              normalized.push(i2);
            } else if (typeof i2 === "function") {
              normalized.push(i2);
            } else if (typeof i2 === "object" && (i2.parse || i2.stringify)) {
              if (true) {
                throw new Error(
                  "PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation."
                );
              }
            } else {
              throw new Error(i2 + " is not a PostCSS plugin");
            }
          }
          return normalized;
        }
        process(css, opts = {}) {
          if (!this.plugins.length && !opts.parser && !opts.stringifier && !opts.syntax) {
            return new NoWorkResult(this, css, opts);
          } else {
            return new LazyResult(this, css, opts);
          }
        }
        use(plugin) {
          this.plugins = this.plugins.concat(this.normalize([plugin]));
          return this;
        }
      };
      module.exports = Processor2;
      Processor2.default = Processor2;
      Root2.registerProcessor(Processor2);
      Document.registerProcessor(Processor2);
    }
  });

  // node_modules/postcss-prefix-selector/index.js
  var require_postcss_prefix_selector = __commonJS({
    "node_modules/postcss-prefix-selector/index.js"(exports, module) {
      module.exports = function postcssPrefixSelector(options) {
        const prefix2 = options.prefix;
        const prefixWithSpace = /\s+$/.test(prefix2) ? prefix2 : `${prefix2} `;
        const ignoreFiles = options.ignoreFiles ? [].concat(options.ignoreFiles) : [];
        const includeFiles = options.includeFiles ? [].concat(options.includeFiles) : [];
        return function(root) {
          if (ignoreFiles.length && root.source.input.file && isFileInArray(root.source.input.file, ignoreFiles)) {
            return;
          }
          if (includeFiles.length && root.source.input.file && !isFileInArray(root.source.input.file, includeFiles)) {
            return;
          }
          root.walkRules((rule) => {
            const keyframeRules = [
              "keyframes",
              "-webkit-keyframes",
              "-moz-keyframes",
              "-o-keyframes",
              "-ms-keyframes"
            ];
            if (rule.parent && keyframeRules.includes(rule.parent.name)) {
              return;
            }
            rule.selectors = rule.selectors.map((selector3) => {
              if (options.exclude && excludeSelector(selector3, options.exclude)) {
                return selector3;
              }
              if (options.transform) {
                return options.transform(
                  prefix2,
                  selector3,
                  prefixWithSpace + selector3,
                  root.source.input.file,
                  rule
                );
              }
              return prefixWithSpace + selector3;
            });
          });
        };
      };
      function isFileInArray(file, arr) {
        return arr.some((ruleOrString) => {
          if (ruleOrString instanceof RegExp) {
            return ruleOrString.test(file);
          }
          return file.includes(ruleOrString);
        });
      }
      function excludeSelector(selector3, excludeArr) {
        return excludeArr.some((excludeRule) => {
          if (excludeRule instanceof RegExp) {
            return excludeRule.test(selector3);
          }
          return selector3 === excludeRule;
        });
      }
    }
  });

  // packages/block-editor/node_modules/postcss-value-parser/lib/parse.js
  var require_parse2 = __commonJS({
    "packages/block-editor/node_modules/postcss-value-parser/lib/parse.js"(exports, module) {
      var openParentheses = "(".charCodeAt(0);
      var closeParentheses = ")".charCodeAt(0);
      var singleQuote = "'".charCodeAt(0);
      var doubleQuote = '"'.charCodeAt(0);
      var backslash = "\\".charCodeAt(0);
      var slash = "/".charCodeAt(0);
      var comma = ",".charCodeAt(0);
      var colon = ":".charCodeAt(0);
      var star = "*".charCodeAt(0);
      var uLower = "u".charCodeAt(0);
      var uUpper = "U".charCodeAt(0);
      var plus = "+".charCodeAt(0);
      var isUnicodeRange = /^[a-f0-9?-]+$/i;
      module.exports = function(input) {
        var tokens = [];
        var value = input;
        var next, quote, prev, token, escape, escapePos, whitespacePos, parenthesesOpenPos;
        var pos = 0;
        var code = value.charCodeAt(pos);
        var max = value.length;
        var stack = [{ nodes: tokens }];
        var balanced = 0;
        var parent;
        var name = "";
        var before = "";
        var after = "";
        while (pos < max) {
          if (code <= 32) {
            next = pos;
            do {
              next += 1;
              code = value.charCodeAt(next);
            } while (code <= 32);
            token = value.slice(pos, next);
            prev = tokens[tokens.length - 1];
            if (code === closeParentheses && balanced) {
              after = token;
            } else if (prev && prev.type === "div") {
              prev.after = token;
              prev.sourceEndIndex += token.length;
            } else if (code === comma || code === colon || code === slash && value.charCodeAt(next + 1) !== star && (!parent || parent && parent.type === "function" && parent.value !== "calc")) {
              before = token;
            } else {
              tokens.push({
                type: "space",
                sourceIndex: pos,
                sourceEndIndex: next,
                value: token
              });
            }
            pos = next;
          } else if (code === singleQuote || code === doubleQuote) {
            next = pos;
            quote = code === singleQuote ? "'" : '"';
            token = {
              type: "string",
              sourceIndex: pos,
              quote
            };
            do {
              escape = false;
              next = value.indexOf(quote, next + 1);
              if (~next) {
                escapePos = next;
                while (value.charCodeAt(escapePos - 1) === backslash) {
                  escapePos -= 1;
                  escape = !escape;
                }
              } else {
                value += quote;
                next = value.length - 1;
                token.unclosed = true;
              }
            } while (escape);
            token.value = value.slice(pos + 1, next);
            token.sourceEndIndex = token.unclosed ? next : next + 1;
            tokens.push(token);
            pos = next + 1;
            code = value.charCodeAt(pos);
          } else if (code === slash && value.charCodeAt(pos + 1) === star) {
            next = value.indexOf("*/", pos);
            token = {
              type: "comment",
              sourceIndex: pos,
              sourceEndIndex: next + 2
            };
            if (next === -1) {
              token.unclosed = true;
              next = value.length;
              token.sourceEndIndex = next;
            }
            token.value = value.slice(pos + 2, next);
            tokens.push(token);
            pos = next + 2;
            code = value.charCodeAt(pos);
          } else if ((code === slash || code === star) && parent && parent.type === "function" && parent.value === "calc") {
            token = value[pos];
            tokens.push({
              type: "word",
              sourceIndex: pos - before.length,
              sourceEndIndex: pos + token.length,
              value: token
            });
            pos += 1;
            code = value.charCodeAt(pos);
          } else if (code === slash || code === comma || code === colon) {
            token = value[pos];
            tokens.push({
              type: "div",
              sourceIndex: pos - before.length,
              sourceEndIndex: pos + token.length,
              value: token,
              before,
              after: ""
            });
            before = "";
            pos += 1;
            code = value.charCodeAt(pos);
          } else if (openParentheses === code) {
            next = pos;
            do {
              next += 1;
              code = value.charCodeAt(next);
            } while (code <= 32);
            parenthesesOpenPos = pos;
            token = {
              type: "function",
              sourceIndex: pos - name.length,
              value: name,
              before: value.slice(parenthesesOpenPos + 1, next)
            };
            pos = next;
            if (name === "url" && code !== singleQuote && code !== doubleQuote) {
              next -= 1;
              do {
                escape = false;
                next = value.indexOf(")", next + 1);
                if (~next) {
                  escapePos = next;
                  while (value.charCodeAt(escapePos - 1) === backslash) {
                    escapePos -= 1;
                    escape = !escape;
                  }
                } else {
                  value += ")";
                  next = value.length - 1;
                  token.unclosed = true;
                }
              } while (escape);
              whitespacePos = next;
              do {
                whitespacePos -= 1;
                code = value.charCodeAt(whitespacePos);
              } while (code <= 32);
              if (parenthesesOpenPos < whitespacePos) {
                if (pos !== whitespacePos + 1) {
                  token.nodes = [
                    {
                      type: "word",
                      sourceIndex: pos,
                      sourceEndIndex: whitespacePos + 1,
                      value: value.slice(pos, whitespacePos + 1)
                    }
                  ];
                } else {
                  token.nodes = [];
                }
                if (token.unclosed && whitespacePos + 1 !== next) {
                  token.after = "";
                  token.nodes.push({
                    type: "space",
                    sourceIndex: whitespacePos + 1,
                    sourceEndIndex: next,
                    value: value.slice(whitespacePos + 1, next)
                  });
                } else {
                  token.after = value.slice(whitespacePos + 1, next);
                  token.sourceEndIndex = next;
                }
              } else {
                token.after = "";
                token.nodes = [];
              }
              pos = next + 1;
              token.sourceEndIndex = token.unclosed ? next : pos;
              code = value.charCodeAt(pos);
              tokens.push(token);
            } else {
              balanced += 1;
              token.after = "";
              token.sourceEndIndex = pos + 1;
              tokens.push(token);
              stack.push(token);
              tokens = token.nodes = [];
              parent = token;
            }
            name = "";
          } else if (closeParentheses === code && balanced) {
            pos += 1;
            code = value.charCodeAt(pos);
            parent.after = after;
            parent.sourceEndIndex += after.length;
            after = "";
            balanced -= 1;
            stack[stack.length - 1].sourceEndIndex = pos;
            stack.pop();
            parent = stack[balanced];
            tokens = parent.nodes;
          } else {
            next = pos;
            do {
              if (code === backslash) {
                next += 1;
              }
              next += 1;
              code = value.charCodeAt(next);
            } while (next < max && !(code <= 32 || code === singleQuote || code === doubleQuote || code === comma || code === colon || code === slash || code === openParentheses || code === star && parent && parent.type === "function" && parent.value === "calc" || code === slash && parent.type === "function" && parent.value === "calc" || code === closeParentheses && balanced));
            token = value.slice(pos, next);
            if (openParentheses === code) {
              name = token;
            } else if ((uLower === token.charCodeAt(0) || uUpper === token.charCodeAt(0)) && plus === token.charCodeAt(1) && isUnicodeRange.test(token.slice(2))) {
              tokens.push({
                type: "unicode-range",
                sourceIndex: pos,
                sourceEndIndex: next,
                value: token
              });
            } else {
              tokens.push({
                type: "word",
                sourceIndex: pos,
                sourceEndIndex: next,
                value: token
              });
            }
            pos = next;
          }
        }
        for (pos = stack.length - 1; pos; pos -= 1) {
          stack[pos].unclosed = true;
          stack[pos].sourceEndIndex = value.length;
        }
        return stack[0].nodes;
      };
    }
  });

  // packages/block-editor/node_modules/postcss-value-parser/lib/walk.js
  var require_walk = __commonJS({
    "packages/block-editor/node_modules/postcss-value-parser/lib/walk.js"(exports, module) {
      module.exports = function walk(nodes, cb, bubble) {
        var i2, max, node, result;
        for (i2 = 0, max = nodes.length; i2 < max; i2 += 1) {
          node = nodes[i2];
          if (!bubble) {
            result = cb(node, i2, nodes);
          }
          if (result !== false && node.type === "function" && Array.isArray(node.nodes)) {
            walk(node.nodes, cb, bubble);
          }
          if (bubble) {
            cb(node, i2, nodes);
          }
        }
      };
    }
  });

  // packages/block-editor/node_modules/postcss-value-parser/lib/stringify.js
  var require_stringify2 = __commonJS({
    "packages/block-editor/node_modules/postcss-value-parser/lib/stringify.js"(exports, module) {
      function stringifyNode(node, custom) {
        var type = node.type;
        var value = node.value;
        var buf;
        var customResult;
        if (custom && (customResult = custom(node)) !== void 0) {
          return customResult;
        } else if (type === "word" || type === "space") {
          return value;
        } else if (type === "string") {
          buf = node.quote || "";
          return buf + value + (node.unclosed ? "" : buf);
        } else if (type === "comment") {
          return "/*" + value + (node.unclosed ? "" : "*/");
        } else if (type === "div") {
          return (node.before || "") + value + (node.after || "");
        } else if (Array.isArray(node.nodes)) {
          buf = stringify2(node.nodes, custom);
          if (type !== "function") {
            return buf;
          }
          return value + "(" + (node.before || "") + buf + (node.after || "") + (node.unclosed ? "" : ")");
        }
        return value;
      }
      function stringify2(nodes, custom) {
        var result, i2;
        if (Array.isArray(nodes)) {
          result = "";
          for (i2 = nodes.length - 1; ~i2; i2 -= 1) {
            result = stringifyNode(nodes[i2], custom) + result;
          }
          return result;
        }
        return stringifyNode(nodes, custom);
      }
      module.exports = stringify2;
    }
  });

  // packages/block-editor/node_modules/postcss-value-parser/lib/unit.js
  var require_unit = __commonJS({
    "packages/block-editor/node_modules/postcss-value-parser/lib/unit.js"(exports, module) {
      var minus = "-".charCodeAt(0);
      var plus = "+".charCodeAt(0);
      var dot = ".".charCodeAt(0);
      var exp = "e".charCodeAt(0);
      var EXP = "E".charCodeAt(0);
      function likeNumber(value) {
        var code = value.charCodeAt(0);
        var nextCode;
        if (code === plus || code === minus) {
          nextCode = value.charCodeAt(1);
          if (nextCode >= 48 && nextCode <= 57) {
            return true;
          }
          var nextNextCode = value.charCodeAt(2);
          if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) {
            return true;
          }
          return false;
        }
        if (code === dot) {
          nextCode = value.charCodeAt(1);
          if (nextCode >= 48 && nextCode <= 57) {
            return true;
          }
          return false;
        }
        if (code >= 48 && code <= 57) {
          return true;
        }
        return false;
      }
      module.exports = function(value) {
        var pos = 0;
        var length = value.length;
        var code;
        var nextCode;
        var nextNextCode;
        if (length === 0 || !likeNumber(value)) {
          return false;
        }
        code = value.charCodeAt(pos);
        if (code === plus || code === minus) {
          pos++;
        }
        while (pos < length) {
          code = value.charCodeAt(pos);
          if (code < 48 || code > 57) {
            break;
          }
          pos += 1;
        }
        code = value.charCodeAt(pos);
        nextCode = value.charCodeAt(pos + 1);
        if (code === dot && nextCode >= 48 && nextCode <= 57) {
          pos += 2;
          while (pos < length) {
            code = value.charCodeAt(pos);
            if (code < 48 || code > 57) {
              break;
            }
            pos += 1;
          }
        }
        code = value.charCodeAt(pos);
        nextCode = value.charCodeAt(pos + 1);
        nextNextCode = value.charCodeAt(pos + 2);
        if ((code === exp || code === EXP) && (nextCode >= 48 && nextCode <= 57 || (nextCode === plus || nextCode === minus) && nextNextCode >= 48 && nextNextCode <= 57)) {
          pos += nextCode === plus || nextCode === minus ? 3 : 2;
          while (pos < length) {
            code = value.charCodeAt(pos);
            if (code < 48 || code > 57) {
              break;
            }
            pos += 1;
          }
        }
        return {
          number: value.slice(0, pos),
          unit: value.slice(pos)
        };
      };
    }
  });

  // packages/block-editor/node_modules/postcss-value-parser/lib/index.js
  var require_lib2 = __commonJS({
    "packages/block-editor/node_modules/postcss-value-parser/lib/index.js"(exports, module) {
      var parse4 = require_parse2();
      var walk = require_walk();
      var stringify2 = require_stringify2();
      function ValueParser(value) {
        if (this instanceof ValueParser) {
          this.nodes = parse4(value);
          return this;
        }
        return new ValueParser(value);
      }
      ValueParser.prototype.toString = function() {
        return Array.isArray(this.nodes) ? stringify2(this.nodes) : "";
      };
      ValueParser.prototype.walk = function(cb, bubble) {
        walk(this.nodes, cb, bubble);
        return this;
      };
      ValueParser.unit = require_unit();
      ValueParser.walk = walk;
      ValueParser.stringify = stringify2;
      module.exports = ValueParser;
    }
  });

  // packages/block-editor/node_modules/postcss-urlrebase/index.js
  var require_postcss_urlrebase = __commonJS({
    "packages/block-editor/node_modules/postcss-urlrebase/index.js"(exports, module) {
      var CSSValueParser = require_lib2();
      module.exports = (opts) => {
        const DEFAULTS = {
          skipHostRelativeUrls: true
        };
        const config2 = Object.assign(DEFAULTS, opts);
        return {
          postcssPlugin: "rebaseUrl",
          Declaration(decl) {
            const parsedValue = CSSValueParser(decl.value);
            let valueChanged = false;
            parsedValue.walk((node) => {
              if (node.type !== "function" || node.value !== "url") {
                return;
              }
              const urlVal = node.nodes[0].value;
              const basedUrl = new URL(urlVal, opts.rootUrl);
              if (basedUrl.pathname === urlVal && config2.skipHostRelativeUrls) {
                return false;
              }
              node.nodes[0].value = basedUrl.toString();
              valueChanged = true;
              return false;
            });
            if (valueChanged) {
              decl.value = CSSValueParser.stringify(parsedValue);
            }
          }
        };
      };
      module.exports.postcss = true;
    }
  });

  // package-external:@wordpress/priority-queue
  var require_priority_queue = __commonJS({
    "package-external:@wordpress/priority-queue"(exports, module) {
      module.exports = window.wp.priorityQueue;
    }
  });

  // package-external:@wordpress/blob
  var require_blob = __commonJS({
    "package-external:@wordpress/blob"(exports, module) {
      module.exports = window.wp.blob;
    }
  });

  // package-external:@wordpress/is-shallow-equal
  var require_is_shallow_equal = __commonJS({
    "package-external:@wordpress/is-shallow-equal"(exports, module) {
      module.exports = window.wp.isShallowEqual;
    }
  });

  // package-external:@wordpress/token-list
  var require_token_list = __commonJS({
    "package-external:@wordpress/token-list"(exports, module) {
      module.exports = window.wp.tokenList;
    }
  });

  // node_modules/deepmerge/dist/cjs.js
  var require_cjs = __commonJS({
    "node_modules/deepmerge/dist/cjs.js"(exports, module) {
      "use strict";
      var isMergeableObject = function isMergeableObject2(value) {
        return isNonNullObject(value) && !isSpecial(value);
      };
      function isNonNullObject(value) {
        return !!value && typeof value === "object";
      }
      function isSpecial(value) {
        var stringValue = Object.prototype.toString.call(value);
        return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
      }
      var canUseSymbol = typeof Symbol === "function" && Symbol.for;
      var REACT_ELEMENT_TYPE = canUseSymbol ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
      function isReactElement(value) {
        return value.$$typeof === REACT_ELEMENT_TYPE;
      }
      function emptyTarget(val) {
        return Array.isArray(val) ? [] : {};
      }
      function cloneUnlessOtherwiseSpecified(value, options) {
        return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
      }
      function defaultArrayMerge(target, source, options) {
        return target.concat(source).map(function(element) {
          return cloneUnlessOtherwiseSpecified(element, options);
        });
      }
      function getMergeFunction(key, options) {
        if (!options.customMerge) {
          return deepmerge;
        }
        var customMerge = options.customMerge(key);
        return typeof customMerge === "function" ? customMerge : deepmerge;
      }
      function getEnumerableOwnPropertySymbols(target) {
        return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
          return Object.propertyIsEnumerable.call(target, symbol);
        }) : [];
      }
      function getKeys(target) {
        return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
      }
      function propertyIsOnObject(object, property) {
        try {
          return property in object;
        } catch (_) {
          return false;
        }
      }
      function propertyIsUnsafe(target, key) {
        return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
      }
      function mergeObject(target, source, options) {
        var destination = {};
        if (options.isMergeableObject(target)) {
          getKeys(target).forEach(function(key) {
            destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
          });
        }
        getKeys(source).forEach(function(key) {
          if (propertyIsUnsafe(target, key)) {
            return;
          }
          if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
            destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
          } else {
            destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
          }
        });
        return destination;
      }
      function deepmerge(target, source, options) {
        options = options || {};
        options.arrayMerge = options.arrayMerge || defaultArrayMerge;
        options.isMergeableObject = options.isMergeableObject || isMergeableObject;
        options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
        var sourceIsArray = Array.isArray(source);
        var targetIsArray = Array.isArray(target);
        var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
        if (!sourceAndTargetTypesMatch) {
          return cloneUnlessOtherwiseSpecified(source, options);
        } else if (sourceIsArray) {
          return options.arrayMerge(target, source, options);
        } else {
          return mergeObject(target, source, options);
        }
      }
      deepmerge.all = function deepmergeAll(array, options) {
        if (!Array.isArray(array)) {
          throw new Error("first argument should be an array");
        }
        return array.reduce(function(prev, next) {
          return deepmerge(prev, next, options);
        }, {});
      };
      var deepmerge_1 = deepmerge;
      module.exports = deepmerge_1;
    }
  });

  // package-external:@wordpress/commands
  var require_commands = __commonJS({
    "package-external:@wordpress/commands"(exports, module) {
      module.exports = window.wp.commands;
    }
  });

  // package-external:@wordpress/date
  var require_date = __commonJS({
    "package-external:@wordpress/date"(exports, module) {
      module.exports = window.wp.date;
    }
  });

  // node_modules/normalize-wheel/src/UserAgent_DEPRECATED.js
  var require_UserAgent_DEPRECATED = __commonJS({
    "node_modules/normalize-wheel/src/UserAgent_DEPRECATED.js"(exports, module) {
      var _populated = false;
      var _ie;
      var _firefox;
      var _opera;
      var _webkit;
      var _chrome;
      var _ie_real_version;
      var _osx;
      var _windows;
      var _linux;
      var _android;
      var _win64;
      var _iphone;
      var _ipad;
      var _native;
      var _mobile;
      function _populate() {
        if (_populated) {
          return;
        }
        _populated = true;
        var uas = navigator.userAgent;
        var agent = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(uas);
        var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);
        _iphone = /\b(iPhone|iP[ao]d)/.exec(uas);
        _ipad = /\b(iP[ao]d)/.exec(uas);
        _android = /Android/i.exec(uas);
        _native = /FBAN\/\w+;/i.exec(uas);
        _mobile = /Mobile/i.exec(uas);
        _win64 = !!/Win64/.exec(uas);
        if (agent) {
          _ie = agent[1] ? parseFloat(agent[1]) : agent[5] ? parseFloat(agent[5]) : NaN;
          if (_ie && document && document.documentMode) {
            _ie = document.documentMode;
          }
          var trident = /(?:Trident\/(\d+.\d+))/.exec(uas);
          _ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;
          _firefox = agent[2] ? parseFloat(agent[2]) : NaN;
          _opera = agent[3] ? parseFloat(agent[3]) : NaN;
          _webkit = agent[4] ? parseFloat(agent[4]) : NaN;
          if (_webkit) {
            agent = /(?:Chrome\/(\d+\.\d+))/.exec(uas);
            _chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;
          } else {
            _chrome = NaN;
          }
        } else {
          _ie = _firefox = _opera = _chrome = _webkit = NaN;
        }
        if (os) {
          if (os[1]) {
            var ver = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(uas);
            _osx = ver ? parseFloat(ver[1].replace("_", ".")) : true;
          } else {
            _osx = false;
          }
          _windows = !!os[2];
          _linux = !!os[3];
        } else {
          _osx = _windows = _linux = false;
        }
      }
      var UserAgent_DEPRECATED = {
        /**
         *  Check if the UA is Internet Explorer.
         *
         *
         *  @return float|NaN Version number (if match) or NaN.
         */
        ie: function() {
          return _populate() || _ie;
        },
        /**
         * Check if we're in Internet Explorer compatibility mode.
         *
         * @return bool true if in compatibility mode, false if
         * not compatibility mode or not ie
         */
        ieCompatibilityMode: function() {
          return _populate() || _ie_real_version > _ie;
        },
        /**
         * Whether the browser is 64-bit IE.  Really, this is kind of weak sauce;  we
         * only need this because Skype can't handle 64-bit IE yet.  We need to remove
         * this when we don't need it -- tracked by #601957.
         */
        ie64: function() {
          return UserAgent_DEPRECATED.ie() && _win64;
        },
        /**
         *  Check if the UA is Firefox.
         *
         *
         *  @return float|NaN Version number (if match) or NaN.
         */
        firefox: function() {
          return _populate() || _firefox;
        },
        /**
         *  Check if the UA is Opera.
         *
         *
         *  @return float|NaN Version number (if match) or NaN.
         */
        opera: function() {
          return _populate() || _opera;
        },
        /**
         *  Check if the UA is WebKit.
         *
         *
         *  @return float|NaN Version number (if match) or NaN.
         */
        webkit: function() {
          return _populate() || _webkit;
        },
        /**
         *  For Push
         *  WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit
         */
        safari: function() {
          return UserAgent_DEPRECATED.webkit();
        },
        /**
         *  Check if the UA is a Chrome browser.
         *
         *
         *  @return float|NaN Version number (if match) or NaN.
         */
        chrome: function() {
          return _populate() || _chrome;
        },
        /**
         *  Check if the user is running Windows.
         *
         *  @return bool `true' if the user's OS is Windows.
         */
        windows: function() {
          return _populate() || _windows;
        },
        /**
         *  Check if the user is running Mac OS X.
         *
         *  @return float|bool   Returns a float if a version number is detected,
         *                       otherwise true/false.
         */
        osx: function() {
          return _populate() || _osx;
        },
        /**
         * Check if the user is running Linux.
         *
         * @return bool `true' if the user's OS is some flavor of Linux.
         */
        linux: function() {
          return _populate() || _linux;
        },
        /**
         * Check if the user is running on an iPhone or iPod platform.
         *
         * @return bool `true' if the user is running some flavor of the
         *    iPhone OS.
         */
        iphone: function() {
          return _populate() || _iphone;
        },
        mobile: function() {
          return _populate() || (_iphone || _ipad || _android || _mobile);
        },
        nativeApp: function() {
          return _populate() || _native;
        },
        android: function() {
          return _populate() || _android;
        },
        ipad: function() {
          return _populate() || _ipad;
        }
      };
      module.exports = UserAgent_DEPRECATED;
    }
  });

  // node_modules/normalize-wheel/src/ExecutionEnvironment.js
  var require_ExecutionEnvironment = __commonJS({
    "node_modules/normalize-wheel/src/ExecutionEnvironment.js"(exports, module) {
      "use strict";
      var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
      var ExecutionEnvironment = {
        canUseDOM,
        canUseWorkers: typeof Worker !== "undefined",
        canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
        canUseViewport: canUseDOM && !!window.screen,
        isInWorker: !canUseDOM
        // For now, this is true - might change in the future.
      };
      module.exports = ExecutionEnvironment;
    }
  });

  // node_modules/normalize-wheel/src/isEventSupported.js
  var require_isEventSupported = __commonJS({
    "node_modules/normalize-wheel/src/isEventSupported.js"(exports, module) {
      "use strict";
      var ExecutionEnvironment = require_ExecutionEnvironment();
      var useHasFeature;
      if (ExecutionEnvironment.canUseDOM) {
        useHasFeature = document.implementation && document.implementation.hasFeature && // always returns true in newer browsers as per the standard.
        // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
        document.implementation.hasFeature("", "") !== true;
      }
      function isEventSupported(eventNameSuffix, capture) {
        if (!ExecutionEnvironment.canUseDOM || capture && !("addEventListener" in document)) {
          return false;
        }
        var eventName = "on" + eventNameSuffix;
        var isSupported = eventName in document;
        if (!isSupported) {
          var element = document.createElement("div");
          element.setAttribute(eventName, "return;");
          isSupported = typeof element[eventName] === "function";
        }
        if (!isSupported && useHasFeature && eventNameSuffix === "wheel") {
          isSupported = document.implementation.hasFeature("Events.wheel", "3.0");
        }
        return isSupported;
      }
      module.exports = isEventSupported;
    }
  });

  // node_modules/normalize-wheel/src/normalizeWheel.js
  var require_normalizeWheel = __commonJS({
    "node_modules/normalize-wheel/src/normalizeWheel.js"(exports, module) {
      "use strict";
      var UserAgent_DEPRECATED = require_UserAgent_DEPRECATED();
      var isEventSupported = require_isEventSupported();
      var PIXEL_STEP = 10;
      var LINE_HEIGHT = 40;
      var PAGE_HEIGHT = 800;
      function normalizeWheel2(event) {
        var sX = 0, sY = 0, pX = 0, pY = 0;
        if ("detail" in event) {
          sY = event.detail;
        }
        if ("wheelDelta" in event) {
          sY = -event.wheelDelta / 120;
        }
        if ("wheelDeltaY" in event) {
          sY = -event.wheelDeltaY / 120;
        }
        if ("wheelDeltaX" in event) {
          sX = -event.wheelDeltaX / 120;
        }
        if ("axis" in event && event.axis === event.HORIZONTAL_AXIS) {
          sX = sY;
          sY = 0;
        }
        pX = sX * PIXEL_STEP;
        pY = sY * PIXEL_STEP;
        if ("deltaY" in event) {
          pY = event.deltaY;
        }
        if ("deltaX" in event) {
          pX = event.deltaX;
        }
        if ((pX || pY) && event.deltaMode) {
          if (event.deltaMode == 1) {
            pX *= LINE_HEIGHT;
            pY *= LINE_HEIGHT;
          } else {
            pX *= PAGE_HEIGHT;
            pY *= PAGE_HEIGHT;
          }
        }
        if (pX && !sX) {
          sX = pX < 1 ? -1 : 1;
        }
        if (pY && !sY) {
          sY = pY < 1 ? -1 : 1;
        }
        return {
          spinX: sX,
          spinY: sY,
          pixelX: pX,
          pixelY: pY
        };
      }
      normalizeWheel2.getEventType = function() {
        return UserAgent_DEPRECATED.firefox() ? "DOMMouseScroll" : isEventSupported("wheel") ? "wheel" : "mousewheel";
      };
      module.exports = normalizeWheel2;
    }
  });

  // node_modules/normalize-wheel/index.js
  var require_normalize_wheel = __commonJS({
    "node_modules/normalize-wheel/index.js"(exports, module) {
      module.exports = require_normalizeWheel();
    }
  });

  // node_modules/fast-deep-equal/index.js
  var require_fast_deep_equal = __commonJS({
    "node_modules/fast-deep-equal/index.js"(exports, module) {
      "use strict";
      module.exports = function equal(a2, b2) {
        if (a2 === b2) return true;
        if (a2 && b2 && typeof a2 == "object" && typeof b2 == "object") {
          if (a2.constructor !== b2.constructor) return false;
          var length, i2, keys;
          if (Array.isArray(a2)) {
            length = a2.length;
            if (length != b2.length) return false;
            for (i2 = length; i2-- !== 0; )
              if (!equal(a2[i2], b2[i2])) return false;
            return true;
          }
          if (a2.constructor === RegExp) return a2.source === b2.source && a2.flags === b2.flags;
          if (a2.valueOf !== Object.prototype.valueOf) return a2.valueOf() === b2.valueOf();
          if (a2.toString !== Object.prototype.toString) return a2.toString() === b2.toString();
          keys = Object.keys(a2);
          length = keys.length;
          if (length !== Object.keys(b2).length) return false;
          for (i2 = length; i2-- !== 0; )
            if (!Object.prototype.hasOwnProperty.call(b2, keys[i2])) return false;
          for (i2 = length; i2-- !== 0; ) {
            var key = keys[i2];
            if (!equal(a2[key], b2[key])) return false;
          }
          return true;
        }
        return a2 !== a2 && b2 !== b2;
      };
    }
  });

  // packages/block-editor/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    AlignmentControl: () => AlignmentControl,
    AlignmentToolbar: () => AlignmentToolbar,
    Autocomplete: () => autocomplete_default,
    BlockAlignmentControl: () => BlockAlignmentControl,
    BlockAlignmentToolbar: () => BlockAlignmentToolbar,
    BlockBindingsAttributeControl: () => BlockBindingsAttributeControl,
    BlockBindingsSourceFieldsList: () => BlockBindingsSourceFieldsList,
    BlockBreadcrumb: () => block_breadcrumb_default,
    BlockCanvas: () => block_canvas_default,
    BlockColorsStyleSelector: () => color_style_selector_default,
    BlockContextProvider: () => BlockContextProvider,
    BlockControls: () => block_controls_default,
    BlockEdit: () => BlockEdit,
    BlockEditorKeyboardShortcuts: () => keyboard_shortcuts_default,
    BlockEditorProvider: () => provider_default,
    BlockFormatControls: () => BlockFormatControls,
    BlockIcon: () => block_icon_default,
    BlockInspector: () => block_inspector_default,
    BlockList: () => BlockList,
    BlockMover: () => block_mover_default,
    BlockNavigationDropdown: () => dropdown_default,
    BlockPopover: () => block_popover_default,
    BlockPreview: () => block_preview_default,
    BlockSelectionClearer: () => BlockSelectionClearer,
    BlockSettingsMenu: () => block_settings_menu_default,
    BlockSettingsMenuControls: () => block_settings_menu_controls_default,
    BlockStyles: () => block_styles_default,
    BlockTitle: () => BlockTitle,
    BlockToolbar: () => BlockToolbar,
    BlockTools: () => BlockTools,
    BlockVerticalAlignmentControl: () => BlockVerticalAlignmentControl,
    BlockVerticalAlignmentToolbar: () => BlockVerticalAlignmentToolbar,
    ButtonBlockAppender: () => button_block_appender_default,
    ButtonBlockerAppender: () => ButtonBlockerAppender,
    ColorPalette: () => color_palette_default,
    ColorPaletteControl: () => ColorPaletteControl,
    ContrastChecker: () => contrast_checker_default,
    CopyHandler: () => CopyHandler,
    DefaultBlockAppender: () => DefaultBlockAppender,
    DimensionControl: () => DimensionControl,
    FontSizePicker: () => font_size_picker_default,
    HeadingLevelDropdown: () => HeadingLevelDropdown,
    HeightControl: () => HeightControl,
    InnerBlocks: () => inner_blocks_default,
    Inserter: () => inserter_default,
    InspectorAdvancedControls: () => InspectorAdvancedControls,
    InspectorControls: () => inspector_controls_default,
    JustifyContentControl: () => JustifyContentControl,
    JustifyToolbar: () => JustifyToolbar,
    LineHeightControl: () => line_height_control_default,
    LinkControl: () => link_control_default,
    MediaPlaceholder: () => media_placeholder_default,
    MediaReplaceFlow: () => media_replace_flow_default,
    MediaUpload: () => media_upload_default,
    MediaUploadCheck: () => check_default2,
    MultiSelectScrollIntoView: () => MultiSelectScrollIntoView,
    NavigableToolbar: () => NavigableToolbar,
    ObserveTyping: () => observe_typing_default,
    PanelColorSettings: () => panel_color_settings_default,
    PlainText: () => plain_text_default,
    RecursionProvider: () => RecursionProvider,
    RichText: () => rich_text_default,
    RichTextShortcut: () => RichTextShortcut,
    RichTextToolbarButton: () => RichTextToolbarButton,
    SETTINGS_DEFAULTS: () => SETTINGS_DEFAULTS,
    SkipToSelectedBlock: () => SkipToSelectedBlock,
    ToolSelector: () => tool_selector_default,
    Typewriter: () => typewriter_default,
    URLInput: () => url_input_default,
    URLInputButton: () => button_default,
    URLPopover: () => url_popover_default,
    Warning: () => warning_default,
    WritingFlow: () => writing_flow_default,
    __experimentalBlockAlignmentMatrixControl: () => block_alignment_matrix_control_default,
    __experimentalBlockFullHeightAligmentControl: () => block_full_height_alignment_control_default,
    __experimentalBlockPatternSetup: () => block_pattern_setup_default,
    __experimentalBlockPatternsList: () => block_patterns_list_default,
    __experimentalBlockVariationPicker: () => block_variation_picker_default,
    __experimentalBlockVariationTransforms: () => block_variation_transforms_default,
    __experimentalBorderRadiusControl: () => BorderRadiusControl,
    __experimentalColorGradientControl: () => control_default,
    __experimentalColorGradientSettingsDropdown: () => ColorGradientSettingsDropdown,
    __experimentalDateFormatPicker: () => DateFormatPicker,
    __experimentalDuotoneControl: () => duotone_control_default,
    __experimentalFontAppearanceControl: () => FontAppearanceControl,
    __experimentalFontFamilyControl: () => FontFamilyControl,
    __experimentalGetBorderClassesAndStyles: () => getBorderClassesAndStyles,
    __experimentalGetColorClassesAndStyles: () => getColorClassesAndStyles,
    __experimentalGetElementClassName: () => __experimentalGetElementClassName,
    __experimentalGetGapCSSValue: () => getGapCSSValue,
    __experimentalGetGradientClass: () => __experimentalGetGradientClass,
    __experimentalGetGradientObjectByGradientValue: () => __experimentalGetGradientObjectByGradientValue,
    __experimentalGetShadowClassesAndStyles: () => getShadowClassesAndStyles,
    __experimentalGetSpacingClassesAndStyles: () => getSpacingClassesAndStyles,
    __experimentalImageEditor: () => ImageEditor,
    __experimentalImageSizeControl: () => ImageSizeControl,
    __experimentalImageURLInputUI: () => ImageURLInputUI,
    __experimentalInspectorPopoverHeader: () => InspectorPopoverHeader,
    __experimentalLetterSpacingControl: () => LetterSpacingControl,
    __experimentalLibrary: () => library_default,
    __experimentalLinkControl: () => DeprecatedExperimentalLinkControl,
    __experimentalLinkControlSearchInput: () => __experimentalLinkControlSearchInput,
    __experimentalLinkControlSearchItem: () => __experimentalLinkControlSearchItem,
    __experimentalLinkControlSearchResults: () => __experimentalLinkControlSearchResults,
    __experimentalListView: () => list_view_default2,
    __experimentalPanelColorGradientSettings: () => panel_color_gradient_settings_default,
    __experimentalPreviewOptions: () => PreviewOptions,
    __experimentalPublishDateTimePicker: () => publish_date_time_picker_default,
    __experimentalRecursionProvider: () => DeprecatedExperimentalRecursionProvider,
    __experimentalResponsiveBlockControl: () => responsive_block_control_default,
    __experimentalSpacingSizesControl: () => SpacingSizesControl,
    __experimentalTextDecorationControl: () => TextDecorationControl,
    __experimentalTextTransformControl: () => TextTransformControl,
    __experimentalUnitControl: () => UnitControl6,
    __experimentalUseBlockOverlayActive: () => useBlockOverlayActive,
    __experimentalUseBlockPreview: () => useBlockPreview,
    __experimentalUseBorderProps: () => useBorderProps,
    __experimentalUseColorProps: () => useColorProps,
    __experimentalUseCustomSides: () => useCustomSides,
    __experimentalUseGradient: () => __experimentalUseGradient,
    __experimentalUseHasRecursion: () => DeprecatedExperimentalUseHasRecursion,
    __experimentalUseMultipleOriginColorsAndGradients: () => useMultipleOriginColorsAndGradients,
    __experimentalUseResizeCanvas: () => useResizeCanvas,
    __experimentalWritingModeControl: () => WritingModeControl,
    __unstableBlockSettingsMenuFirstItem: () => block_settings_menu_first_item_default,
    __unstableBlockToolbarLastItem: () => block_toolbar_last_item_default,
    __unstableEditorStyles: () => editor_styles_default,
    __unstableIframe: () => iframe_default,
    __unstableInserterMenuExtension: () => inserter_menu_extension_default,
    __unstableRichTextInputEvent: () => __unstableRichTextInputEvent,
    __unstableUseBlockSelectionClearer: () => useBlockSelectionClearer,
    __unstableUseClipboardHandler: () => __unstableUseClipboardHandler,
    __unstableUseMouseMoveTypingReset: () => useMouseMoveTypingReset,
    __unstableUseTypewriter: () => useTypewriter,
    __unstableUseTypingObserver: () => useTypingObserver,
    createCustomColorsHOC: () => createCustomColorsHOC,
    getColorClassName: () => getColorClassName,
    getColorObjectByAttributeValues: () => getColorObjectByAttributeValues,
    getColorObjectByColorValue: () => getColorObjectByColorValue,
    getComputedFluidTypographyValue: () => getComputedFluidTypographyValue,
    getCustomValueFromPreset: () => getCustomValueFromPreset,
    getDimensionsClassesAndStyles: () => getDimensionsClassesAndStyles,
    getFontSize: () => getFontSize,
    getFontSizeClass: () => getFontSizeClass,
    getFontSizeObjectByValue: () => getFontSizeObjectByValue,
    getGradientSlugByValue: () => getGradientSlugByValue,
    getGradientValueBySlug: () => getGradientValueBySlug,
    getPxFromCssUnit: () => get_px_from_css_unit_default,
    getSpacingPresetCssVar: () => getSpacingPresetCssVar,
    getTypographyClassesAndStyles: () => getTypographyClassesAndStyles,
    isValueSpacingPreset: () => isValueSpacingPreset,
    privateApis: () => privateApis13,
    store: () => store,
    storeConfig: () => storeConfig,
    transformStyles: () => transform_styles_default,
    useBlockBindingsUtils: () => useBlockBindingsUtils,
    useBlockCommands: () => useBlockCommands,
    useBlockDisplayInformation: () => useBlockDisplayInformation,
    useBlockEditContext: () => useBlockEditContext,
    useBlockEditingMode: () => useBlockEditingMode,
    useBlockProps: () => useBlockProps,
    useCachedTruthy: () => useCachedTruthy,
    useHasRecursion: () => useHasRecursion,
    useInnerBlocksProps: () => useInnerBlocksProps,
    useSetting: () => useSetting,
    useSettings: () => useSettings,
    useStyleOverride: () => useStyleOverride,
    withColorContext: () => with_color_context_default,
    withColors: () => withColors,
    withFontSizes: () => with_font_sizes_default
  });

  // node_modules/clsx/dist/clsx.mjs
  function r(e2) {
    var t3, f2, n2 = "";
    if ("string" == typeof e2 || "number" == typeof e2) n2 += e2;
    else if ("object" == typeof e2) if (Array.isArray(e2)) {
      var o3 = e2.length;
      for (t3 = 0; t3 < o3; t3++) e2[t3] && (f2 = r(e2[t3])) && (n2 && (n2 += " "), n2 += f2);
    } else for (f2 in e2) e2[f2] && (n2 && (n2 += " "), n2 += f2);
    return n2;
  }
  function clsx() {
    for (var e2, t3, f2 = 0, n2 = "", o3 = arguments.length; f2 < o3; f2++) (e2 = arguments[f2]) && (t3 = r(e2)) && (n2 && (n2 += " "), n2 += t3);
    return n2;
  }
  var clsx_default = clsx;

  // packages/block-editor/build-module/hooks/utils.mjs
  var import_blocks96 = __toESM(require_blocks(), 1);
  var import_element219 = __toESM(require_element(), 1);
  var import_data175 = __toESM(require_data(), 1);
  var import_compose92 = __toESM(require_compose(), 1);
  var import_hooks13 = __toESM(require_hooks(), 1);

  // packages/block-editor/build-module/components/block-edit/context.mjs
  var import_element = __toESM(require_element(), 1);
  var mayDisplayControlsKey = /* @__PURE__ */ Symbol("mayDisplayControls");
  var mayDisplayParentControlsKey = /* @__PURE__ */ Symbol("mayDisplayParentControls");
  var mayDisplayPatternEditingControlsKey = /* @__PURE__ */ Symbol(
    "mayDisplayPatternEditingControls"
  );
  var blockEditingModeKey = /* @__PURE__ */ Symbol("blockEditingMode");
  var blockBindingsKey = /* @__PURE__ */ Symbol("blockBindings");
  var isPreviewModeKey = /* @__PURE__ */ Symbol("isPreviewMode");
  var isInListViewBlockSupportTreeKey = /* @__PURE__ */ Symbol(
    "isInListViewBlockSupportTree"
  );
  var DEFAULT_BLOCK_EDIT_CONTEXT = {
    name: "",
    isSelected: false
  };
  var Context = (0, import_element.createContext)(DEFAULT_BLOCK_EDIT_CONTEXT);
  Context.displayName = "BlockEditContext";
  var { Provider } = Context;
  function useBlockEditContext() {
    return (0, import_element.useContext)(Context);
  }

  // node_modules/colord/index.mjs
  var r2 = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) };
  var t = function(r3) {
    return "string" == typeof r3 ? r3.length > 0 : "number" == typeof r3;
  };
  var n = function(r3, t3, n2) {
    return void 0 === t3 && (t3 = 0), void 0 === n2 && (n2 = Math.pow(10, t3)), Math.round(n2 * r3) / n2 + 0;
  };
  var e = function(r3, t3, n2) {
    return void 0 === t3 && (t3 = 0), void 0 === n2 && (n2 = 1), r3 > n2 ? n2 : r3 > t3 ? r3 : t3;
  };
  var u = function(r3) {
    return (r3 = isFinite(r3) ? r3 % 360 : 0) > 0 ? r3 : r3 + 360;
  };
  var a = function(r3) {
    return { r: e(r3.r, 0, 255), g: e(r3.g, 0, 255), b: e(r3.b, 0, 255), a: e(r3.a) };
  };
  var o = function(r3) {
    return { r: n(r3.r), g: n(r3.g), b: n(r3.b), a: n(r3.a, 3) };
  };
  var i = /^#([0-9a-f]{3,8})$/i;
  var s = function(r3) {
    var t3 = r3.toString(16);
    return t3.length < 2 ? "0" + t3 : t3;
  };
  var h = function(r3) {
    var t3 = r3.r, n2 = r3.g, e2 = r3.b, u2 = r3.a, a2 = Math.max(t3, n2, e2), o3 = a2 - Math.min(t3, n2, e2), i2 = o3 ? a2 === t3 ? (n2 - e2) / o3 : a2 === n2 ? 2 + (e2 - t3) / o3 : 4 + (t3 - n2) / o3 : 0;
    return { h: 60 * (i2 < 0 ? i2 + 6 : i2), s: a2 ? o3 / a2 * 100 : 0, v: a2 / 255 * 100, a: u2 };
  };
  var b = function(r3) {
    var t3 = r3.h, n2 = r3.s, e2 = r3.v, u2 = r3.a;
    t3 = t3 / 360 * 6, n2 /= 100, e2 /= 100;
    var a2 = Math.floor(t3), o3 = e2 * (1 - n2), i2 = e2 * (1 - (t3 - a2) * n2), s2 = e2 * (1 - (1 - t3 + a2) * n2), h2 = a2 % 6;
    return { r: 255 * [e2, i2, o3, o3, s2, e2][h2], g: 255 * [s2, e2, e2, i2, o3, o3][h2], b: 255 * [o3, o3, s2, e2, e2, i2][h2], a: u2 };
  };
  var g = function(r3) {
    return { h: u(r3.h), s: e(r3.s, 0, 100), l: e(r3.l, 0, 100), a: e(r3.a) };
  };
  var d = function(r3) {
    return { h: n(r3.h), s: n(r3.s), l: n(r3.l), a: n(r3.a, 3) };
  };
  var f = function(r3) {
    return b((n2 = (t3 = r3).s, { h: t3.h, s: (n2 *= ((e2 = t3.l) < 50 ? e2 : 100 - e2) / 100) > 0 ? 2 * n2 / (e2 + n2) * 100 : 0, v: e2 + n2, a: t3.a }));
    var t3, n2, e2;
  };
  var c = function(r3) {
    return { h: (t3 = h(r3)).h, s: (u2 = (200 - (n2 = t3.s)) * (e2 = t3.v) / 100) > 0 && u2 < 200 ? n2 * e2 / 100 / (u2 <= 100 ? u2 : 200 - u2) * 100 : 0, l: u2 / 2, a: t3.a };
    var t3, n2, e2, u2;
  };
  var l = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var p = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var v = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var m = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var y = { string: [[function(r3) {
    var t3 = i.exec(r3);
    return t3 ? (r3 = t3[1]).length <= 4 ? { r: parseInt(r3[0] + r3[0], 16), g: parseInt(r3[1] + r3[1], 16), b: parseInt(r3[2] + r3[2], 16), a: 4 === r3.length ? n(parseInt(r3[3] + r3[3], 16) / 255, 2) : 1 } : 6 === r3.length || 8 === r3.length ? { r: parseInt(r3.substr(0, 2), 16), g: parseInt(r3.substr(2, 2), 16), b: parseInt(r3.substr(4, 2), 16), a: 8 === r3.length ? n(parseInt(r3.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
  }, "hex"], [function(r3) {
    var t3 = v.exec(r3) || m.exec(r3);
    return t3 ? t3[2] !== t3[4] || t3[4] !== t3[6] ? null : a({ r: Number(t3[1]) / (t3[2] ? 100 / 255 : 1), g: Number(t3[3]) / (t3[4] ? 100 / 255 : 1), b: Number(t3[5]) / (t3[6] ? 100 / 255 : 1), a: void 0 === t3[7] ? 1 : Number(t3[7]) / (t3[8] ? 100 : 1) }) : null;
  }, "rgb"], [function(t3) {
    var n2 = l.exec(t3) || p.exec(t3);
    if (!n2) return null;
    var e2, u2, a2 = g({ h: (e2 = n2[1], u2 = n2[2], void 0 === u2 && (u2 = "deg"), Number(e2) * (r2[u2] || 1)), s: Number(n2[3]), l: Number(n2[4]), a: void 0 === n2[5] ? 1 : Number(n2[5]) / (n2[6] ? 100 : 1) });
    return f(a2);
  }, "hsl"]], object: [[function(r3) {
    var n2 = r3.r, e2 = r3.g, u2 = r3.b, o3 = r3.a, i2 = void 0 === o3 ? 1 : o3;
    return t(n2) && t(e2) && t(u2) ? a({ r: Number(n2), g: Number(e2), b: Number(u2), a: Number(i2) }) : null;
  }, "rgb"], [function(r3) {
    var n2 = r3.h, e2 = r3.s, u2 = r3.l, a2 = r3.a, o3 = void 0 === a2 ? 1 : a2;
    if (!t(n2) || !t(e2) || !t(u2)) return null;
    var i2 = g({ h: Number(n2), s: Number(e2), l: Number(u2), a: Number(o3) });
    return f(i2);
  }, "hsl"], [function(r3) {
    var n2 = r3.h, a2 = r3.s, o3 = r3.v, i2 = r3.a, s2 = void 0 === i2 ? 1 : i2;
    if (!t(n2) || !t(a2) || !t(o3)) return null;
    var h2 = (function(r4) {
      return { h: u(r4.h), s: e(r4.s, 0, 100), v: e(r4.v, 0, 100), a: e(r4.a) };
    })({ h: Number(n2), s: Number(a2), v: Number(o3), a: Number(s2) });
    return b(h2);
  }, "hsv"]] };
  var N = function(r3, t3) {
    for (var n2 = 0; n2 < t3.length; n2++) {
      var e2 = t3[n2][0](r3);
      if (e2) return [e2, t3[n2][1]];
    }
    return [null, void 0];
  };
  var x = function(r3) {
    return "string" == typeof r3 ? N(r3.trim(), y.string) : "object" == typeof r3 && null !== r3 ? N(r3, y.object) : [null, void 0];
  };
  var M = function(r3, t3) {
    var n2 = c(r3);
    return { h: n2.h, s: e(n2.s + 100 * t3, 0, 100), l: n2.l, a: n2.a };
  };
  var H = function(r3) {
    return (299 * r3.r + 587 * r3.g + 114 * r3.b) / 1e3 / 255;
  };
  var $ = function(r3, t3) {
    var n2 = c(r3);
    return { h: n2.h, s: n2.s, l: e(n2.l + 100 * t3, 0, 100), a: n2.a };
  };
  var j = (function() {
    function r3(r4) {
      this.parsed = x(r4)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
    }
    return r3.prototype.isValid = function() {
      return null !== this.parsed;
    }, r3.prototype.brightness = function() {
      return n(H(this.rgba), 2);
    }, r3.prototype.isDark = function() {
      return H(this.rgba) < 0.5;
    }, r3.prototype.isLight = function() {
      return H(this.rgba) >= 0.5;
    }, r3.prototype.toHex = function() {
      return r4 = o(this.rgba), t3 = r4.r, e2 = r4.g, u2 = r4.b, i2 = (a2 = r4.a) < 1 ? s(n(255 * a2)) : "", "#" + s(t3) + s(e2) + s(u2) + i2;
      var r4, t3, e2, u2, a2, i2;
    }, r3.prototype.toRgb = function() {
      return o(this.rgba);
    }, r3.prototype.toRgbString = function() {
      return r4 = o(this.rgba), t3 = r4.r, n2 = r4.g, e2 = r4.b, (u2 = r4.a) < 1 ? "rgba(" + t3 + ", " + n2 + ", " + e2 + ", " + u2 + ")" : "rgb(" + t3 + ", " + n2 + ", " + e2 + ")";
      var r4, t3, n2, e2, u2;
    }, r3.prototype.toHsl = function() {
      return d(c(this.rgba));
    }, r3.prototype.toHslString = function() {
      return r4 = d(c(this.rgba)), t3 = r4.h, n2 = r4.s, e2 = r4.l, (u2 = r4.a) < 1 ? "hsla(" + t3 + ", " + n2 + "%, " + e2 + "%, " + u2 + ")" : "hsl(" + t3 + ", " + n2 + "%, " + e2 + "%)";
      var r4, t3, n2, e2, u2;
    }, r3.prototype.toHsv = function() {
      return r4 = h(this.rgba), { h: n(r4.h), s: n(r4.s), v: n(r4.v), a: n(r4.a, 3) };
      var r4;
    }, r3.prototype.invert = function() {
      return w({ r: 255 - (r4 = this.rgba).r, g: 255 - r4.g, b: 255 - r4.b, a: r4.a });
      var r4;
    }, r3.prototype.saturate = function(r4) {
      return void 0 === r4 && (r4 = 0.1), w(M(this.rgba, r4));
    }, r3.prototype.desaturate = function(r4) {
      return void 0 === r4 && (r4 = 0.1), w(M(this.rgba, -r4));
    }, r3.prototype.grayscale = function() {
      return w(M(this.rgba, -1));
    }, r3.prototype.lighten = function(r4) {
      return void 0 === r4 && (r4 = 0.1), w($(this.rgba, r4));
    }, r3.prototype.darken = function(r4) {
      return void 0 === r4 && (r4 = 0.1), w($(this.rgba, -r4));
    }, r3.prototype.rotate = function(r4) {
      return void 0 === r4 && (r4 = 15), this.hue(this.hue() + r4);
    }, r3.prototype.alpha = function(r4) {
      return "number" == typeof r4 ? w({ r: (t3 = this.rgba).r, g: t3.g, b: t3.b, a: r4 }) : n(this.rgba.a, 3);
      var t3;
    }, r3.prototype.hue = function(r4) {
      var t3 = c(this.rgba);
      return "number" == typeof r4 ? w({ h: r4, s: t3.s, l: t3.l, a: t3.a }) : n(t3.h);
    }, r3.prototype.isEqual = function(r4) {
      return this.toHex() === w(r4).toHex();
    }, r3;
  })();
  var w = function(r3) {
    return r3 instanceof j ? r3 : new j(r3);
  };
  var S = [];
  var k = function(r3) {
    r3.forEach(function(r4) {
      S.indexOf(r4) < 0 && (r4(j, y), S.push(r4));
    });
  };

  // node_modules/colord/plugins/names.mjs
  function names_default(e2, f2) {
    var a2 = { white: "#ffffff", bisque: "#ffe4c4", blue: "#0000ff", cadetblue: "#5f9ea0", chartreuse: "#7fff00", chocolate: "#d2691e", coral: "#ff7f50", antiquewhite: "#faebd7", aqua: "#00ffff", azure: "#f0ffff", whitesmoke: "#f5f5f5", papayawhip: "#ffefd5", plum: "#dda0dd", blanchedalmond: "#ffebcd", black: "#000000", gold: "#ffd700", goldenrod: "#daa520", gainsboro: "#dcdcdc", cornsilk: "#fff8dc", cornflowerblue: "#6495ed", burlywood: "#deb887", aquamarine: "#7fffd4", beige: "#f5f5dc", crimson: "#dc143c", cyan: "#00ffff", darkblue: "#00008b", darkcyan: "#008b8b", darkgoldenrod: "#b8860b", darkkhaki: "#bdb76b", darkgray: "#a9a9a9", darkgreen: "#006400", darkgrey: "#a9a9a9", peachpuff: "#ffdab9", darkmagenta: "#8b008b", darkred: "#8b0000", darkorchid: "#9932cc", darkorange: "#ff8c00", darkslateblue: "#483d8b", gray: "#808080", darkslategray: "#2f4f4f", darkslategrey: "#2f4f4f", deeppink: "#ff1493", deepskyblue: "#00bfff", wheat: "#f5deb3", firebrick: "#b22222", floralwhite: "#fffaf0", ghostwhite: "#f8f8ff", darkviolet: "#9400d3", magenta: "#ff00ff", green: "#008000", dodgerblue: "#1e90ff", grey: "#808080", honeydew: "#f0fff0", hotpink: "#ff69b4", blueviolet: "#8a2be2", forestgreen: "#228b22", lawngreen: "#7cfc00", indianred: "#cd5c5c", indigo: "#4b0082", fuchsia: "#ff00ff", brown: "#a52a2a", maroon: "#800000", mediumblue: "#0000cd", lightcoral: "#f08080", darkturquoise: "#00ced1", lightcyan: "#e0ffff", ivory: "#fffff0", lightyellow: "#ffffe0", lightsalmon: "#ffa07a", lightseagreen: "#20b2aa", linen: "#faf0e6", mediumaquamarine: "#66cdaa", lemonchiffon: "#fffacd", lime: "#00ff00", khaki: "#f0e68c", mediumseagreen: "#3cb371", limegreen: "#32cd32", mediumspringgreen: "#00fa9a", lightskyblue: "#87cefa", lightblue: "#add8e6", midnightblue: "#191970", lightpink: "#ffb6c1", mistyrose: "#ffe4e1", moccasin: "#ffe4b5", mintcream: "#f5fffa", lightslategray: "#778899", lightslategrey: "#778899", navajowhite: "#ffdead", navy: "#000080", mediumvioletred: "#c71585", powderblue: "#b0e0e6", palegoldenrod: "#eee8aa", oldlace: "#fdf5e6", paleturquoise: "#afeeee", mediumturquoise: "#48d1cc", mediumorchid: "#ba55d3", rebeccapurple: "#663399", lightsteelblue: "#b0c4de", mediumslateblue: "#7b68ee", thistle: "#d8bfd8", tan: "#d2b48c", orchid: "#da70d6", mediumpurple: "#9370db", purple: "#800080", pink: "#ffc0cb", skyblue: "#87ceeb", springgreen: "#00ff7f", palegreen: "#98fb98", red: "#ff0000", yellow: "#ffff00", slateblue: "#6a5acd", lavenderblush: "#fff0f5", peru: "#cd853f", palevioletred: "#db7093", violet: "#ee82ee", teal: "#008080", slategray: "#708090", slategrey: "#708090", aliceblue: "#f0f8ff", darkseagreen: "#8fbc8f", darkolivegreen: "#556b2f", greenyellow: "#adff2f", seagreen: "#2e8b57", seashell: "#fff5ee", tomato: "#ff6347", silver: "#c0c0c0", sienna: "#a0522d", lavender: "#e6e6fa", lightgreen: "#90ee90", orange: "#ffa500", orangered: "#ff4500", steelblue: "#4682b4", royalblue: "#4169e1", turquoise: "#40e0d0", yellowgreen: "#9acd32", salmon: "#fa8072", saddlebrown: "#8b4513", sandybrown: "#f4a460", rosybrown: "#bc8f8f", darksalmon: "#e9967a", lightgoldenrodyellow: "#fafad2", snow: "#fffafa", lightgrey: "#d3d3d3", lightgray: "#d3d3d3", dimgray: "#696969", dimgrey: "#696969", olivedrab: "#6b8e23", olive: "#808000" }, r3 = {};
    for (var d2 in a2) r3[a2[d2]] = d2;
    var l2 = {};
    e2.prototype.toName = function(f3) {
      if (!(this.rgba.a || this.rgba.r || this.rgba.g || this.rgba.b)) return "transparent";
      var d3, i2, n2 = r3[this.toHex()];
      if (n2) return n2;
      if (null == f3 ? void 0 : f3.closest) {
        var o3 = this.toRgb(), t3 = 1 / 0, b2 = "black";
        if (!l2.length) for (var c6 in a2) l2[c6] = new e2(a2[c6]).toRgb();
        for (var g2 in a2) {
          var u2 = (d3 = o3, i2 = l2[g2], Math.pow(d3.r - i2.r, 2) + Math.pow(d3.g - i2.g, 2) + Math.pow(d3.b - i2.b, 2));
          u2 < t3 && (t3 = u2, b2 = g2);
        }
        return b2;
      }
    };
    f2.string.push([function(f3) {
      var r4 = f3.toLowerCase(), d3 = "transparent" === r4 ? "#0000" : a2[r4];
      return d3 ? new e2(d3).toRgb() : null;
    }, "name"]);
  }

  // node_modules/colord/plugins/a11y.mjs
  var o2 = function(o3) {
    var t3 = o3 / 255;
    return t3 < 0.04045 ? t3 / 12.92 : Math.pow((t3 + 0.055) / 1.055, 2.4);
  };
  var t2 = function(t3) {
    return 0.2126 * o2(t3.r) + 0.7152 * o2(t3.g) + 0.0722 * o2(t3.b);
  };
  function a11y_default(o3) {
    o3.prototype.luminance = function() {
      return o4 = t2(this.rgba), void 0 === (r3 = 2) && (r3 = 0), void 0 === n2 && (n2 = Math.pow(10, r3)), Math.round(n2 * o4) / n2 + 0;
      var o4, r3, n2;
    }, o3.prototype.contrast = function(r3) {
      void 0 === r3 && (r3 = "#FFF");
      var n2, a2, i2, e2, v2, u2, d2, c6 = r3 instanceof o3 ? r3 : new o3(r3);
      return e2 = this.rgba, v2 = c6.toRgb(), u2 = t2(e2), d2 = t2(v2), n2 = u2 > d2 ? (u2 + 0.05) / (d2 + 0.05) : (d2 + 0.05) / (u2 + 0.05), void 0 === (a2 = 2) && (a2 = 0), void 0 === i2 && (i2 = Math.pow(10, a2)), Math.floor(i2 * n2) / i2 + 0;
    }, o3.prototype.isReadable = function(o4, t3) {
      return void 0 === o4 && (o4 = "#FFF"), void 0 === t3 && (t3 = {}), this.contrast(o4) >= (e2 = void 0 === (i2 = (r3 = t3).size) ? "normal" : i2, "AAA" === (a2 = void 0 === (n2 = r3.level) ? "AA" : n2) && "normal" === e2 ? 7 : "AA" === a2 && "large" === e2 ? 3 : 4.5);
      var r3, n2, a2, i2, e2;
    };
  }

  // packages/block-editor/build-module/components/colors/utils.mjs
  var import_components = __toESM(require_components(), 1);

  // packages/block-editor/build-module/lock-unlock.mjs
  var import_private_apis = __toESM(require_private_apis(), 1);
  var { lock, unlock } = (0, import_private_apis.__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/block-editor"
  );

  // packages/block-editor/build-module/components/colors/utils.mjs
  k([names_default, a11y_default]);
  var { kebabCase } = unlock(import_components.privateApis);
  var getColorObjectByAttributeValues = (colors2, definedColor, customColor) => {
    if (definedColor) {
      const colorObj = colors2?.find(
        (color) => color.slug === definedColor
      );
      if (colorObj) {
        return colorObj;
      }
    }
    return {
      color: customColor
    };
  };
  var getColorObjectByColorValue = (colors2, colorValue) => {
    return colors2?.find((color) => color.color === colorValue);
  };
  function getColorClassName(colorContextName, colorSlug) {
    if (!colorContextName || !colorSlug) {
      return void 0;
    }
    return `has-${kebabCase(colorSlug)}-${colorContextName}`;
  }
  function getMostReadableColor(colors2, colorValue) {
    const colordColor = w(colorValue);
    const getColorContrast = ({ color }) => colordColor.contrast(color);
    const maxContrast = Math.max(...colors2.map(getColorContrast));
    return colors2.find((color) => getColorContrast(color) === maxContrast).color;
  }

  // packages/block-editor/build-module/components/colors/with-colors.mjs
  var import_element9 = __toESM(require_element(), 1);
  var import_compose2 = __toESM(require_compose(), 1);
  var import_components5 = __toESM(require_components(), 1);

  // packages/block-editor/build-module/components/use-settings/index.mjs
  var import_data7 = __toESM(require_data(), 1);
  var import_deprecated5 = __toESM(require_deprecated(), 1);

  // packages/block-editor/build-module/components/block-edit/index.mjs
  var import_element8 = __toESM(require_element(), 1);
  var import_blocks9 = __toESM(require_blocks(), 1);

  // packages/block-editor/build-module/components/block-edit/edit.mjs
  var import_blocks = __toESM(require_blocks(), 1);
  var import_components2 = __toESM(require_components(), 1);
  var import_data = __toESM(require_data(), 1);
  var import_element4 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/block-context/index.mjs
  var import_element2 = __toESM(require_element(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  var Context2 = (0, import_element2.createContext)({});
  Context2.displayName = "BlockContext";
  function BlockContextProvider({ value, children }) {
    const context = (0, import_element2.useContext)(Context2);
    const nextValue = (0, import_element2.useMemo)(
      () => ({ ...context, ...value }),
      [context, value]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context2.Provider, { value: nextValue, children });
  }
  var block_context_default = Context2;

  // packages/block-editor/build-module/components/link-control/is-url-like.mjs
  var import_url = __toESM(require_url(), 1);
  function isHashLink(val) {
    return val?.startsWith("#") && (0, import_url.isValidFragment)(val);
  }
  function isRelativePath(val) {
    return val?.startsWith("/") || val?.startsWith("./") || val?.startsWith("../");
  }
  function isURLLike(val) {
    const hasSpaces = val.includes(" ");
    if (hasSpaces) {
      return false;
    }
    const protocol = (0, import_url.getProtocol)(val);
    const protocolIsValid = (0, import_url.isValidProtocol)(protocol);
    const mayBeTLD = hasPossibleTLD(val);
    const isWWW = val?.startsWith("www.");
    return protocolIsValid || isWWW || isHashLink(val) || mayBeTLD || isRelativePath(val);
  }
  function hasPossibleTLD(url, maxLength = 6) {
    const cleanedURL = url.split(/[?#]/)[0];
    const regex = new RegExp(
      `(?<=\\S)\\.(?:[a-zA-Z_]{2,${maxLength}})(?:\\/|$)`
    );
    return regex.test(cleanedURL);
  }

  // packages/block-editor/build-module/utils/block-bindings.mjs
  var DEFAULT_ATTRIBUTE = "__default";
  var PATTERN_OVERRIDES_SOURCE = "core/pattern-overrides";
  function hasPatternOverridesDefaultBinding(bindings) {
    return bindings?.[DEFAULT_ATTRIBUTE]?.source === PATTERN_OVERRIDES_SOURCE;
  }
  function replacePatternOverridesDefaultBinding(bindings, supportedAttributes) {
    if (hasPatternOverridesDefaultBinding(bindings)) {
      const bindingsWithDefaults = {};
      for (const attributeName of supportedAttributes) {
        const bindingSource = bindings[attributeName] ? bindings[attributeName] : { source: PATTERN_OVERRIDES_SOURCE };
        bindingsWithDefaults[attributeName] = bindingSource;
      }
      return bindingsWithDefaults;
    }
    return bindings;
  }

  // packages/block-editor/build-module/components/block-list/private-block-context.mjs
  var import_element3 = __toESM(require_element(), 1);
  var PrivateBlockContext = (0, import_element3.createContext)({});
  PrivateBlockContext.displayName = "PrivateBlockContext";

  // packages/block-editor/build-module/components/block-edit/edit.mjs
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_BLOCK_CONTEXT = {};
  var Edit = (props) => {
    const { name } = props;
    const blockType = (0, import_blocks.getBlockType)(name);
    if (!blockType) {
      return null;
    }
    const Component7 = blockType.edit || blockType.save;
    return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Component7, { ...props });
  };
  var EditWithFilters = (0, import_components2.withFilters)("editor.BlockEdit")(Edit);
  var EditWithGeneratedProps = (props) => {
    const { name, clientId, attributes, setAttributes } = props;
    const registry = (0, import_data.useRegistry)();
    const blockType = (0, import_blocks.getBlockType)(name);
    const blockContext = (0, import_element4.useContext)(block_context_default);
    const registeredSources = (0, import_data.useSelect)(
      (select3) => unlock(select3(import_blocks.store)).getAllBlockBindingsSources(),
      []
    );
    const { bindableAttributes } = (0, import_element4.useContext)(PrivateBlockContext);
    const { blockBindings, context, hasPatternOverrides } = (0, import_element4.useMemo)(() => {
      const computedContext = blockType?.usesContext ? Object.fromEntries(
        Object.entries(blockContext).filter(
          ([key]) => blockType.usesContext.includes(key)
        )
      ) : DEFAULT_BLOCK_CONTEXT;
      if (attributes?.metadata?.bindings) {
        Object.values(attributes?.metadata?.bindings || {}).forEach(
          (binding) => {
            registeredSources[binding?.source]?.usesContext?.forEach(
              (key) => {
                computedContext[key] = blockContext[key];
              }
            );
          }
        );
      }
      return {
        blockBindings: replacePatternOverridesDefaultBinding(
          attributes?.metadata?.bindings,
          bindableAttributes
        ),
        context: computedContext,
        hasPatternOverrides: hasPatternOverridesDefaultBinding(
          attributes?.metadata?.bindings
        )
      };
    }, [
      blockType?.usesContext,
      blockContext,
      attributes?.metadata?.bindings,
      bindableAttributes,
      registeredSources
    ]);
    const computedAttributes = (0, import_data.useSelect)(
      (select3) => {
        if (!blockBindings) {
          return attributes;
        }
        const attributesFromSources = {};
        const blockBindingsBySource = /* @__PURE__ */ new Map();
        for (const [attributeName, binding] of Object.entries(
          blockBindings
        )) {
          const { source: sourceName, args: sourceArgs } = binding;
          const source = registeredSources[sourceName];
          if (!source || !bindableAttributes?.includes(attributeName)) {
            continue;
          }
          blockBindingsBySource.set(source, {
            ...blockBindingsBySource.get(source),
            [attributeName]: {
              args: sourceArgs
            }
          });
        }
        if (blockBindingsBySource.size) {
          for (const [source, bindings] of blockBindingsBySource) {
            let values = {};
            if (!source.getValues) {
              Object.keys(bindings).forEach((attr) => {
                values[attr] = source.label;
              });
            } else {
              values = source.getValues({
                select: select3,
                context,
                clientId,
                bindings
              });
            }
            for (const [attributeName, value] of Object.entries(
              values
            )) {
              if (attributeName === "url" && (!value || !isURLLike(value))) {
                attributesFromSources[attributeName] = null;
              } else {
                attributesFromSources[attributeName] = value;
              }
            }
          }
        }
        return {
          ...attributes,
          ...attributesFromSources
        };
      },
      [
        attributes,
        bindableAttributes,
        blockBindings,
        clientId,
        context,
        registeredSources
      ]
    );
    const setBoundAttributes = (0, import_element4.useCallback)(
      (nextAttributes) => {
        if (!blockBindings) {
          setAttributes(nextAttributes);
          return;
        }
        registry.batch(() => {
          const keptAttributes = { ...nextAttributes };
          const blockBindingsBySource = /* @__PURE__ */ new Map();
          for (const [attributeName, newValue] of Object.entries(
            keptAttributes
          )) {
            if (!blockBindings[attributeName] || !bindableAttributes?.includes(attributeName)) {
              continue;
            }
            const binding = blockBindings[attributeName];
            const source = registeredSources[binding?.source];
            if (!source?.setValues) {
              continue;
            }
            blockBindingsBySource.set(source, {
              ...blockBindingsBySource.get(source),
              [attributeName]: {
                args: binding.args,
                newValue
              }
            });
            delete keptAttributes[attributeName];
          }
          if (blockBindingsBySource.size) {
            for (const [
              source,
              bindings
            ] of blockBindingsBySource) {
              source.setValues({
                select: registry.select,
                dispatch: registry.dispatch,
                context,
                clientId,
                bindings
              });
            }
          }
          const hasParentPattern = !!context["pattern/overrides"];
          if (
            // Don't update non-connected attributes if the block is using pattern overrides
            // and the editing is happening while overriding the pattern (not editing the original).
            !(hasPatternOverrides && hasParentPattern) && Object.keys(keptAttributes).length
          ) {
            if (hasPatternOverrides) {
              delete keptAttributes.href;
            }
            setAttributes(keptAttributes);
          }
        });
      },
      [
        bindableAttributes,
        blockBindings,
        clientId,
        context,
        hasPatternOverrides,
        setAttributes,
        registeredSources,
        registry
      ]
    );
    if (!blockType) {
      return null;
    }
    if (blockType.apiVersion > 1) {
      return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
        EditWithFilters,
        {
          ...props,
          attributes: computedAttributes,
          context,
          setAttributes: setBoundAttributes
        }
      );
    }
    const generatedClassName = (0, import_blocks.hasBlockSupport)(blockType, "className", true) ? (0, import_blocks.getBlockDefaultClassName)(name) : null;
    const className = clsx_default(
      generatedClassName,
      attributes?.className,
      props.className
    );
    return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
      EditWithFilters,
      {
        ...props,
        attributes: computedAttributes,
        className,
        context,
        setAttributes: setBoundAttributes
      }
    );
  };
  var edit_default = EditWithGeneratedProps;

  // packages/block-editor/build-module/components/block-edit/multiple-usage-warning.mjs
  var import_blocks8 = __toESM(require_blocks(), 1);
  var import_components4 = __toESM(require_components(), 1);
  var import_data6 = __toESM(require_data(), 1);
  var import_i18n7 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/store/index.mjs
  var import_data5 = __toESM(require_data(), 1);

  // packages/block-editor/build-module/store/reducer.mjs
  var import_es6 = __toESM(require_es6(), 1);
  var import_compose = __toESM(require_compose(), 1);
  var import_data2 = __toESM(require_data(), 1);
  var import_deprecated = __toESM(require_deprecated(), 1);
  var import_blocks2 = __toESM(require_blocks(), 1);

  // packages/block-editor/build-module/store/defaults.mjs
  var import_i18n = __toESM(require_i18n(), 1);
  var PREFERENCES_DEFAULTS = {
    insertUsage: {}
  };
  var SETTINGS_DEFAULTS = {
    alignWide: false,
    supportsLayout: true,
    // colors setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.
    // The setting is only kept for backward compatibility purposes.
    colors: [
      {
        name: (0, import_i18n.__)("Black"),
        slug: "black",
        color: "#000000"
      },
      {
        name: (0, import_i18n.__)("Cyan bluish gray"),
        slug: "cyan-bluish-gray",
        color: "#abb8c3"
      },
      {
        name: (0, import_i18n.__)("White"),
        slug: "white",
        color: "#ffffff"
      },
      {
        name: (0, import_i18n.__)("Pale pink"),
        slug: "pale-pink",
        color: "#f78da7"
      },
      { name: (0, import_i18n.__)("Vivid red"), slug: "vivid-red", color: "#cf2e2e" },
      {
        name: (0, import_i18n.__)("Luminous vivid orange"),
        slug: "luminous-vivid-orange",
        color: "#ff6900"
      },
      {
        name: (0, import_i18n.__)("Luminous vivid amber"),
        slug: "luminous-vivid-amber",
        color: "#fcb900"
      },
      {
        name: (0, import_i18n.__)("Light green cyan"),
        slug: "light-green-cyan",
        color: "#7bdcb5"
      },
      {
        name: (0, import_i18n.__)("Vivid green cyan"),
        slug: "vivid-green-cyan",
        color: "#00d084"
      },
      {
        name: (0, import_i18n.__)("Pale cyan blue"),
        slug: "pale-cyan-blue",
        color: "#8ed1fc"
      },
      {
        name: (0, import_i18n.__)("Vivid cyan blue"),
        slug: "vivid-cyan-blue",
        color: "#0693e3"
      },
      {
        name: (0, import_i18n.__)("Vivid purple"),
        slug: "vivid-purple",
        color: "#9b51e0"
      }
    ],
    // fontSizes setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.
    // The setting is only kept for backward compatibility purposes.
    fontSizes: [
      {
        name: (0, import_i18n._x)("Small", "font size name"),
        size: 13,
        slug: "small"
      },
      {
        name: (0, import_i18n._x)("Normal", "font size name"),
        size: 16,
        slug: "normal"
      },
      {
        name: (0, import_i18n._x)("Medium", "font size name"),
        size: 20,
        slug: "medium"
      },
      {
        name: (0, import_i18n._x)("Large", "font size name"),
        size: 36,
        slug: "large"
      },
      {
        name: (0, import_i18n._x)("Huge", "font size name"),
        size: 42,
        slug: "huge"
      }
    ],
    // Image default size slug.
    imageDefaultSize: "large",
    imageSizes: [
      { slug: "thumbnail", name: (0, import_i18n.__)("Thumbnail") },
      { slug: "medium", name: (0, import_i18n.__)("Medium") },
      { slug: "large", name: (0, import_i18n.__)("Large") },
      { slug: "full", name: (0, import_i18n.__)("Full Size") }
    ],
    // Allow plugin to disable Image Editor if need be.
    imageEditing: true,
    // This is current max width of the block inner area
    // It's used to constraint image resizing and this value could be overridden later by themes
    maxWidth: 580,
    // Allowed block types for the editor, defaulting to true (all supported).
    allowedBlockTypes: true,
    // Maximum upload size in bytes allowed for the site.
    maxUploadFileSize: 0,
    // List of allowed mime types and file extensions.
    allowedMimeTypes: null,
    // Allows to disable block locking interface.
    canLockBlocks: true,
    // Whether the user can edit custom CSS (requires edit_css capability).
    // Defaults to false for safety - PHP passes true when user has capability.
    canEditCSS: false,
    // Allows to disable Openverse media category in the inserter.
    enableOpenverseMediaCategory: true,
    clearBlockSelection: true,
    __experimentalCanUserUseUnfilteredHTML: false,
    __experimentalBlockDirectory: false,
    __mobileEnablePageTemplates: false,
    __experimentalBlockPatterns: [],
    __experimentalBlockPatternCategories: [],
    isPreviewMode: false,
    // These settings will be completely revamped in the future.
    // The goal is to evolve this into an API which will instruct
    // the block inspector to animate transitions between what it
    // displays based on the relationship between the selected block
    // and its parent, and only enable it if the parent is controlling
    // its children blocks.
    blockInspectorAnimation: {
      animationParent: "core/navigation",
      "core/navigation": { enterDirection: "leftToRight" },
      "core/navigation-submenu": { enterDirection: "rightToLeft" },
      "core/navigation-link": { enterDirection: "rightToLeft" },
      "core/search": { enterDirection: "rightToLeft" },
      "core/social-links": { enterDirection: "rightToLeft" },
      "core/page-list": { enterDirection: "rightToLeft" },
      "core/spacer": { enterDirection: "rightToLeft" },
      "core/home-link": { enterDirection: "rightToLeft" },
      "core/site-title": { enterDirection: "rightToLeft" },
      "core/site-logo": { enterDirection: "rightToLeft" }
    },
    generateAnchors: false,
    // gradients setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.
    // The setting is only kept for backward compatibility purposes.
    gradients: [
      {
        name: (0, import_i18n.__)("Vivid cyan blue to vivid purple"),
        gradient: "linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",
        slug: "vivid-cyan-blue-to-vivid-purple"
      },
      {
        name: (0, import_i18n.__)("Light green cyan to vivid green cyan"),
        gradient: "linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",
        slug: "light-green-cyan-to-vivid-green-cyan"
      },
      {
        name: (0, import_i18n.__)("Luminous vivid amber to luminous vivid orange"),
        gradient: "linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",
        slug: "luminous-vivid-amber-to-luminous-vivid-orange"
      },
      {
        name: (0, import_i18n.__)("Luminous vivid orange to vivid red"),
        gradient: "linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",
        slug: "luminous-vivid-orange-to-vivid-red"
      },
      {
        name: (0, import_i18n.__)("Very light gray to cyan bluish gray"),
        gradient: "linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",
        slug: "very-light-gray-to-cyan-bluish-gray"
      },
      {
        name: (0, import_i18n.__)("Cool to warm spectrum"),
        gradient: "linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",
        slug: "cool-to-warm-spectrum"
      },
      {
        name: (0, import_i18n.__)("Blush light purple"),
        gradient: "linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",
        slug: "blush-light-purple"
      },
      {
        name: (0, import_i18n.__)("Blush bordeaux"),
        gradient: "linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",
        slug: "blush-bordeaux"
      },
      {
        name: (0, import_i18n.__)("Luminous dusk"),
        gradient: "linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",
        slug: "luminous-dusk"
      },
      {
        name: (0, import_i18n.__)("Pale ocean"),
        gradient: "linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",
        slug: "pale-ocean"
      },
      {
        name: (0, import_i18n.__)("Electric grass"),
        gradient: "linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",
        slug: "electric-grass"
      },
      {
        name: (0, import_i18n.__)("Midnight"),
        gradient: "linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",
        slug: "midnight"
      }
    ],
    __unstableResolvedAssets: { styles: [], scripts: [] }
  };

  // packages/block-editor/build-module/store/array.mjs
  function insertAt(array, elements, index) {
    return [
      ...array.slice(0, index),
      ...Array.isArray(elements) ? elements : [elements],
      ...array.slice(index)
    ];
  }
  function moveTo(array, from, to2, count = 1) {
    const withoutMovedElements = [...array];
    withoutMovedElements.splice(from, count);
    return insertAt(
      withoutMovedElements,
      array.slice(from, from + count),
      to2
    );
  }

  // packages/block-editor/build-module/store/private-keys.mjs
  var globalStylesDataKey = /* @__PURE__ */ Symbol("globalStylesDataKey");
  var globalStylesLinksDataKey = /* @__PURE__ */ Symbol("globalStylesLinks");
  var selectBlockPatternsKey = /* @__PURE__ */ Symbol("selectBlockPatternsKey");
  var reusableBlocksSelectKey = /* @__PURE__ */ Symbol("reusableBlocksSelect");
  var sectionRootClientIdKey = /* @__PURE__ */ Symbol("sectionRootClientIdKey");
  var mediaEditKey = /* @__PURE__ */ Symbol("mediaEditKey");
  var getMediaSelectKey = /* @__PURE__ */ Symbol("getMediaSelect");
  var isIsolatedEditorKey = /* @__PURE__ */ Symbol("isIsolatedEditor");
  var deviceTypeKey = /* @__PURE__ */ Symbol("deviceTypeKey");
  var isNavigationOverlayContextKey = /* @__PURE__ */ Symbol(
    "isNavigationOverlayContext"
  );
  var mediaUploadOnSuccessKey = /* @__PURE__ */ Symbol("mediaUploadOnSuccess");

  // packages/block-editor/build-module/store/reducer.mjs
  var { isContentBlock } = unlock(import_blocks2.privateApis);
  var identity = (x2) => x2;
  function mapBlockOrder(blocks2, rootClientId = "") {
    const result = /* @__PURE__ */ new Map();
    const current = [];
    result.set(rootClientId, current);
    blocks2.forEach((block) => {
      const { clientId, innerBlocks } = block;
      current.push(clientId);
      mapBlockOrder(innerBlocks, clientId).forEach(
        (order, subClientId) => {
          result.set(subClientId, order);
        }
      );
    });
    return result;
  }
  function mapBlockParents(blocks2, rootClientId = "") {
    const result = [];
    const stack = [[rootClientId, blocks2]];
    while (stack.length) {
      const [parent, currentBlocks] = stack.shift();
      currentBlocks.forEach(({ innerBlocks, ...block }) => {
        result.push([block.clientId, parent]);
        if (innerBlocks?.length) {
          stack.push([block.clientId, innerBlocks]);
        }
      });
    }
    return result;
  }
  function flattenBlocks(blocks2, transform = identity) {
    const result = [];
    const stack = [...blocks2];
    while (stack.length) {
      const { innerBlocks, ...block } = stack.shift();
      stack.push(...innerBlocks);
      result.push([block.clientId, transform(block)]);
    }
    return result;
  }
  function getFlattenedClientIds(blocks2) {
    const result = {};
    const stack = [...blocks2];
    while (stack.length) {
      const { innerBlocks, ...block } = stack.shift();
      stack.push(...innerBlocks);
      result[block.clientId] = true;
    }
    return result;
  }
  function getFlattenedBlocksWithoutAttributes(blocks2) {
    return flattenBlocks(blocks2, (block) => {
      const { attributes, ...restBlock } = block;
      return restBlock;
    });
  }
  function getFlattenedBlockAttributes(blocks2) {
    return flattenBlocks(blocks2, (block) => block.attributes);
  }
  function hasSameKeys(a2, b2) {
    return (0, import_es6.default)(Object.keys(a2), Object.keys(b2));
  }
  function isUpdatingSameBlockAttribute(action, lastAction) {
    return action.type === "UPDATE_BLOCK_ATTRIBUTES" && lastAction !== void 0 && lastAction.type === "UPDATE_BLOCK_ATTRIBUTES" && (0, import_es6.default)(action.clientIds, lastAction.clientIds) && hasSameKeys(action.attributes, lastAction.attributes);
  }
  function updateBlockTreeForBlocks(state, blocks2) {
    const treeToUpdate = state.tree;
    const stack = [...blocks2];
    const flattenedBlocks = [...blocks2];
    while (stack.length) {
      const block = stack.shift();
      stack.push(...block.innerBlocks);
      flattenedBlocks.push(...block.innerBlocks);
    }
    for (const block of flattenedBlocks) {
      treeToUpdate.set(block.clientId, {});
    }
    for (const block of flattenedBlocks) {
      treeToUpdate.set(
        block.clientId,
        Object.assign(treeToUpdate.get(block.clientId), {
          ...state.byClientId.get(block.clientId),
          attributes: state.attributes.get(block.clientId),
          innerBlocks: block.innerBlocks.map(
            (subBlock) => treeToUpdate.get(subBlock.clientId)
          )
        })
      );
    }
  }
  function updateParentInnerBlocksInTree(state, updatedClientIds, updateChildrenOfUpdatedClientIds = false) {
    const treeToUpdate = state.tree;
    const uncontrolledParents = /* @__PURE__ */ new Set([]);
    const controlledParents = /* @__PURE__ */ new Set();
    for (const clientId of updatedClientIds) {
      let current = updateChildrenOfUpdatedClientIds ? clientId : state.parents.get(clientId);
      do {
        if (state.controlledInnerBlocks[current]) {
          controlledParents.add(current);
          break;
        } else {
          uncontrolledParents.add(current);
          current = state.parents.get(current);
        }
      } while (current !== void 0);
    }
    for (const clientId of uncontrolledParents) {
      treeToUpdate.set(clientId, { ...treeToUpdate.get(clientId) });
    }
    for (const clientId of uncontrolledParents) {
      treeToUpdate.get(clientId).innerBlocks = (state.order.get(clientId) || []).map((subClientId) => treeToUpdate.get(subClientId));
    }
    for (const clientId of controlledParents) {
      treeToUpdate.set("controlled||" + clientId, {
        innerBlocks: (state.order.get(clientId) || []).map(
          (subClientId) => treeToUpdate.get(subClientId)
        )
      });
    }
  }
  var withBlockTree = (reducer3) => (state = {}, action) => {
    const newState = reducer3(state, action);
    if (newState === state) {
      return state;
    }
    newState.tree = state.tree ? state.tree : /* @__PURE__ */ new Map();
    switch (action.type) {
      case "RECEIVE_BLOCKS":
      case "INSERT_BLOCKS": {
        newState.tree = new Map(newState.tree);
        updateBlockTreeForBlocks(newState, action.blocks);
        updateParentInnerBlocksInTree(
          newState,
          action.rootClientId ? [action.rootClientId] : [""],
          true
        );
        break;
      }
      case "UPDATE_BLOCK":
        newState.tree = new Map(newState.tree);
        newState.tree.set(action.clientId, {
          ...newState.tree.get(action.clientId),
          ...newState.byClientId.get(action.clientId),
          attributes: newState.attributes.get(action.clientId)
        });
        updateParentInnerBlocksInTree(
          newState,
          [action.clientId],
          false
        );
        break;
      case "SYNC_DERIVED_BLOCK_ATTRIBUTES":
      case "UPDATE_BLOCK_ATTRIBUTES": {
        newState.tree = new Map(newState.tree);
        action.clientIds.forEach((clientId) => {
          newState.tree.set(clientId, {
            ...newState.tree.get(clientId),
            attributes: newState.attributes.get(clientId)
          });
        });
        updateParentInnerBlocksInTree(
          newState,
          action.clientIds,
          false
        );
        break;
      }
      case "REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN": {
        const inserterClientIds = getFlattenedClientIds(
          action.blocks
        );
        newState.tree = new Map(newState.tree);
        action.replacedClientIds.forEach((clientId) => {
          newState.tree.delete(clientId);
          if (!inserterClientIds[clientId]) {
            newState.tree.delete("controlled||" + clientId);
          }
        });
        updateBlockTreeForBlocks(newState, action.blocks);
        updateParentInnerBlocksInTree(
          newState,
          action.blocks.map((b2) => b2.clientId),
          false
        );
        const parentsOfRemovedBlocks2 = [];
        for (const clientId of action.clientIds) {
          const parentId = state.parents.get(clientId);
          if (parentId !== void 0 && (parentId === "" || newState.byClientId.get(parentId))) {
            parentsOfRemovedBlocks2.push(parentId);
          }
        }
        updateParentInnerBlocksInTree(
          newState,
          parentsOfRemovedBlocks2,
          true
        );
        break;
      }
      case "REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":
        const parentsOfRemovedBlocks = [];
        for (const clientId of action.clientIds) {
          const parentId = state.parents.get(clientId);
          if (parentId !== void 0 && (parentId === "" || newState.byClientId.get(parentId))) {
            parentsOfRemovedBlocks.push(parentId);
          }
        }
        newState.tree = new Map(newState.tree);
        action.removedClientIds.forEach((clientId) => {
          newState.tree.delete(clientId);
          newState.tree.delete("controlled||" + clientId);
        });
        updateParentInnerBlocksInTree(
          newState,
          parentsOfRemovedBlocks,
          true
        );
        break;
      case "MOVE_BLOCKS_TO_POSITION": {
        const updatedBlockUids = [];
        if (action.fromRootClientId) {
          updatedBlockUids.push(action.fromRootClientId);
        } else {
          updatedBlockUids.push("");
        }
        if (action.toRootClientId) {
          updatedBlockUids.push(action.toRootClientId);
        }
        newState.tree = new Map(newState.tree);
        updateParentInnerBlocksInTree(
          newState,
          updatedBlockUids,
          true
        );
        break;
      }
      case "MOVE_BLOCKS_UP":
      case "MOVE_BLOCKS_DOWN": {
        const updatedBlockUids = [
          action.rootClientId ? action.rootClientId : ""
        ];
        newState.tree = new Map(newState.tree);
        updateParentInnerBlocksInTree(
          newState,
          updatedBlockUids,
          true
        );
        break;
      }
      case "SAVE_REUSABLE_BLOCK_SUCCESS": {
        const updatedBlockUids = [];
        newState.attributes.forEach((attributes, clientId) => {
          if (newState.byClientId.get(clientId).name === "core/block" && attributes.ref === action.updatedId) {
            updatedBlockUids.push(clientId);
          }
        });
        newState.tree = new Map(newState.tree);
        updatedBlockUids.forEach((clientId) => {
          newState.tree.set(clientId, {
            ...newState.byClientId.get(clientId),
            attributes: newState.attributes.get(clientId),
            innerBlocks: newState.tree.get(clientId).innerBlocks
          });
        });
        updateParentInnerBlocksInTree(
          newState,
          updatedBlockUids,
          false
        );
      }
    }
    return newState;
  };
  function withPersistentBlockChange(reducer3) {
    let lastAction;
    let markNextChangeAsNotPersistent = false;
    let explicitPersistent;
    return (state, action) => {
      let nextState = reducer3(state, action);
      let nextIsPersistentChange;
      if (action.type === "SET_EXPLICIT_PERSISTENT") {
        explicitPersistent = action.isPersistentChange;
        nextIsPersistentChange = state.isPersistentChange ?? true;
      }
      if (explicitPersistent !== void 0) {
        nextIsPersistentChange = explicitPersistent;
        return nextIsPersistentChange === nextState.isPersistentChange ? nextState : {
          ...nextState,
          isPersistentChange: nextIsPersistentChange
        };
      }
      const isExplicitPersistentChange = action.type === "MARK_LAST_CHANGE_AS_PERSISTENT" || markNextChangeAsNotPersistent;
      if (state === nextState && !isExplicitPersistentChange) {
        markNextChangeAsNotPersistent = action.type === "MARK_NEXT_CHANGE_AS_NOT_PERSISTENT";
        nextIsPersistentChange = state?.isPersistentChange ?? true;
        if (state.isPersistentChange === nextIsPersistentChange) {
          return state;
        }
        return {
          ...nextState,
          isPersistentChange: nextIsPersistentChange
        };
      }
      nextState = {
        ...nextState,
        isPersistentChange: isExplicitPersistentChange ? !markNextChangeAsNotPersistent : !isUpdatingSameBlockAttribute(action, lastAction)
      };
      lastAction = action;
      markNextChangeAsNotPersistent = action.type === "MARK_NEXT_CHANGE_AS_NOT_PERSISTENT";
      return nextState;
    };
  }
  function withIgnoredBlockChange(reducer3) {
    const IGNORED_ACTION_TYPES = /* @__PURE__ */ new Set(["RECEIVE_BLOCKS"]);
    return (state, action) => {
      const nextState = reducer3(state, action);
      if (nextState !== state) {
        nextState.isIgnoredChange = IGNORED_ACTION_TYPES.has(action.type);
      }
      return nextState;
    };
  }
  var withInnerBlocksRemoveCascade = (reducer3) => (state, action) => {
    const getAllChildren = (clientIds) => {
      let result = clientIds;
      for (let i2 = 0; i2 < result.length; i2++) {
        if (!state.order.get(result[i2]) || action.keepControlledInnerBlocks && action.keepControlledInnerBlocks[result[i2]]) {
          continue;
        }
        if (result === clientIds) {
          result = [...result];
        }
        result.push(...state.order.get(result[i2]));
      }
      return result;
    };
    if (state) {
      switch (action.type) {
        case "REMOVE_BLOCKS":
          action = {
            ...action,
            type: "REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",
            removedClientIds: getAllChildren(action.clientIds)
          };
          break;
        case "REPLACE_BLOCKS":
          action = {
            ...action,
            type: "REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",
            replacedClientIds: getAllChildren(action.clientIds)
          };
          break;
      }
    }
    return reducer3(state, action);
  };
  var withBlockReset = (reducer3) => (state, action) => {
    if (action.type === "RESET_BLOCKS") {
      const newState = reducer3(void 0, {
        type: "INSERT_BLOCKS",
        rootClientId: "",
        blocks: action.blocks
      });
      const preservedControlledInnerBlocks = state?.controlledInnerBlocks ?? {};
      if (state?.order) {
        for (const clientId of Object.keys(
          preservedControlledInnerBlocks
        )) {
          if (!preservedControlledInnerBlocks[clientId]) {
            continue;
          }
          if (!newState.byClientId.has(clientId)) {
            continue;
          }
          newState.controlledInnerBlocks[clientId] = true;
          const oldOrder = state.order.get(clientId);
          if (!oldOrder?.length) {
            continue;
          }
          newState.order.set(clientId, oldOrder);
          const preserveBlock = (blockId, parentId) => {
            const blockData = state.byClientId.get(blockId);
            if (!blockData) {
              return;
            }
            newState.byClientId.set(blockId, blockData);
            newState.attributes.set(
              blockId,
              state.attributes.get(blockId)
            );
            newState.parents.set(blockId, parentId);
            const childOrder = state.order.get(blockId) || [];
            newState.order.set(blockId, childOrder);
            childOrder.forEach(
              (childId) => preserveBlock(childId, blockId)
            );
          };
          oldOrder.forEach((id) => preserveBlock(id, clientId));
        }
      }
      for (const clientId of Object.keys(
        newState.controlledInnerBlocks
      )) {
        const controlledOrder = newState.order.get(clientId);
        if (!controlledOrder?.length) {
          continue;
        }
        const innerBlocks = controlledOrder.map(
          (id) => state.tree.get(id)
        );
        const existingEntry = newState.tree.get(clientId);
        if (existingEntry) {
          existingEntry.innerBlocks = innerBlocks;
        }
        newState.tree.set("controlled||" + clientId, { innerBlocks });
        const preserveTreeEntry = (blockId) => {
          const treeEntry = state.tree.get(blockId);
          if (!treeEntry) {
            return;
          }
          newState.tree.set(blockId, treeEntry);
          const childOrder = newState.order.get(blockId) || [];
          childOrder.forEach(preserveTreeEntry);
        };
        controlledOrder.forEach(preserveTreeEntry);
      }
      const preservedBlockEditingModes = state?.blockEditingModes ?? /* @__PURE__ */ new Map();
      for (const [clientId, mode2] of preservedBlockEditingModes) {
        if (!newState.tree.has(clientId)) {
          continue;
        }
        newState.blockEditingModes.set(clientId, mode2);
      }
      return newState;
    }
    return reducer3(state, action);
  };
  var withReplaceInnerBlocks = (reducer3) => (state, action) => {
    if (action.type !== "REPLACE_INNER_BLOCKS") {
      return reducer3(state, action);
    }
    const nestedControllers = {};
    if (Object.keys(state.controlledInnerBlocks).length) {
      const stack = [...action.blocks];
      while (stack.length) {
        const { innerBlocks, ...block } = stack.shift();
        stack.push(...innerBlocks);
        if (!!state.controlledInnerBlocks[block.clientId]) {
          nestedControllers[block.clientId] = true;
        }
      }
    }
    let stateAfterBlocksRemoval = state;
    if (state.order.get(action.rootClientId)) {
      stateAfterBlocksRemoval = reducer3(stateAfterBlocksRemoval, {
        type: "REMOVE_BLOCKS",
        keepControlledInnerBlocks: nestedControllers,
        clientIds: state.order.get(action.rootClientId)
      });
    }
    let stateAfterInsert = stateAfterBlocksRemoval;
    if (action.blocks.length) {
      stateAfterInsert = reducer3(stateAfterInsert, {
        ...action,
        type: "INSERT_BLOCKS",
        index: 0
      });
      const stateAfterInsertOrder = new Map(stateAfterInsert.order);
      Object.keys(nestedControllers).forEach((key) => {
        if (state.order.get(key)) {
          stateAfterInsertOrder.set(key, state.order.get(key));
        }
      });
      stateAfterInsert.order = stateAfterInsertOrder;
      stateAfterInsert.tree = new Map(stateAfterInsert.tree);
      Object.keys(nestedControllers).forEach((_key) => {
        const key = `controlled||${_key}`;
        if (state.tree.has(key)) {
          stateAfterInsert.tree.set(key, state.tree.get(key));
        }
      });
    }
    return stateAfterInsert;
  };
  var withSaveReusableBlock = (reducer3) => (state, action) => {
    if (state && action.type === "SAVE_REUSABLE_BLOCK_SUCCESS") {
      const { id, updatedId } = action;
      if (id === updatedId) {
        return state;
      }
      state = { ...state };
      state.attributes = new Map(state.attributes);
      state.attributes.forEach((attributes, clientId) => {
        const { name } = state.byClientId.get(clientId);
        if (name === "core/block" && attributes.ref === id) {
          state.attributes.set(clientId, {
            ...attributes,
            ref: updatedId
          });
        }
      });
    }
    return reducer3(state, action);
  };
  var withResetControlledBlocks = (reducer3) => (state, action) => {
    if (action.type === "SET_HAS_CONTROLLED_INNER_BLOCKS") {
      const innerBlockOrder = state.order.get(action.clientId);
      if (innerBlockOrder?.length) {
        const tempState = reducer3(state, {
          type: "REPLACE_INNER_BLOCKS",
          rootClientId: action.clientId,
          blocks: []
        });
        return reducer3(tempState, action);
      }
      return reducer3(state, action);
    }
    return reducer3(state, action);
  };
  var blocks = (0, import_compose.pipe)(
    import_data2.combineReducers,
    withSaveReusableBlock,
    // Needs to be before withBlockCache.
    withBlockTree,
    // Needs to be before withInnerBlocksRemoveCascade.
    withInnerBlocksRemoveCascade,
    withReplaceInnerBlocks,
    // Needs to be after withInnerBlocksRemoveCascade.
    withBlockReset,
    withPersistentBlockChange,
    withIgnoredBlockChange,
    withResetControlledBlocks
  )({
    // The state is using a Map instead of a plain object for performance reasons.
    // You can run the "./test/performance.js" unit test to check the impact
    // code changes can have on this reducer.
    byClientId(state = /* @__PURE__ */ new Map(), action) {
      switch (action.type) {
        case "RECEIVE_BLOCKS":
        case "INSERT_BLOCKS": {
          const newState = new Map(state);
          getFlattenedBlocksWithoutAttributes(action.blocks).forEach(
            ([key, value]) => {
              newState.set(key, value);
            }
          );
          return newState;
        }
        case "UPDATE_BLOCK": {
          if (!state.has(action.clientId)) {
            return state;
          }
          const { attributes, ...changes } = action.updates;
          if (Object.values(changes).length === 0) {
            return state;
          }
          const newState = new Map(state);
          newState.set(action.clientId, {
            ...state.get(action.clientId),
            ...changes
          });
          return newState;
        }
        case "REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN": {
          if (!action.blocks) {
            return state;
          }
          const newState = new Map(state);
          action.replacedClientIds.forEach((clientId) => {
            newState.delete(clientId);
          });
          getFlattenedBlocksWithoutAttributes(action.blocks).forEach(
            ([key, value]) => {
              newState.set(key, value);
            }
          );
          return newState;
        }
        case "REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN": {
          const newState = new Map(state);
          action.removedClientIds.forEach((clientId) => {
            newState.delete(clientId);
          });
          return newState;
        }
      }
      return state;
    },
    // The state is using a Map instead of a plain object for performance reasons.
    // You can run the "./test/performance.js" unit test to check the impact
    // code changes can have on this reducer.
    attributes(state = /* @__PURE__ */ new Map(), action) {
      switch (action.type) {
        case "RECEIVE_BLOCKS":
        case "INSERT_BLOCKS": {
          const newState = new Map(state);
          getFlattenedBlockAttributes(action.blocks).forEach(
            ([key, value]) => {
              newState.set(key, value);
            }
          );
          return newState;
        }
        case "UPDATE_BLOCK": {
          if (!state.get(action.clientId) || !action.updates.attributes) {
            return state;
          }
          const newState = new Map(state);
          newState.set(action.clientId, {
            ...state.get(action.clientId),
            ...action.updates.attributes
          });
          return newState;
        }
        case "SYNC_DERIVED_BLOCK_ATTRIBUTES":
        case "UPDATE_BLOCK_ATTRIBUTES": {
          if (action.clientIds.every((id) => !state.get(id))) {
            return state;
          }
          let hasChange = false;
          const newState = new Map(state);
          for (const clientId of action.clientIds) {
            const updatedAttributeEntries = Object.entries(
              !!action.options?.uniqueByBlock ? action.attributes[clientId] : action.attributes ?? {}
            );
            if (updatedAttributeEntries.length === 0) {
              continue;
            }
            let hasUpdatedAttributes = false;
            const existingAttributes = state.get(clientId);
            const newAttributes = {};
            updatedAttributeEntries.forEach(([key, value]) => {
              if (existingAttributes[key] !== value) {
                hasUpdatedAttributes = true;
                newAttributes[key] = value;
              }
            });
            hasChange = hasChange || hasUpdatedAttributes;
            if (hasUpdatedAttributes) {
              newState.set(clientId, {
                ...existingAttributes,
                ...newAttributes
              });
            }
          }
          return hasChange ? newState : state;
        }
        case "REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN": {
          if (!action.blocks) {
            return state;
          }
          const newState = new Map(state);
          action.replacedClientIds.forEach((clientId) => {
            newState.delete(clientId);
          });
          getFlattenedBlockAttributes(action.blocks).forEach(
            ([key, value]) => {
              newState.set(key, value);
            }
          );
          return newState;
        }
        case "REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN": {
          const newState = new Map(state);
          action.removedClientIds.forEach((clientId) => {
            newState.delete(clientId);
          });
          return newState;
        }
      }
      return state;
    },
    // The state is using a Map instead of a plain object for performance reasons.
    // You can run the "./test/performance.js" unit test to check the impact
    // code changes can have on this reducer.
    order(state = /* @__PURE__ */ new Map(), action) {
      switch (action.type) {
        case "RECEIVE_BLOCKS": {
          const blockOrder = mapBlockOrder(action.blocks);
          const newState = new Map(state);
          blockOrder.forEach((order, clientId) => {
            if (clientId !== "") {
              newState.set(clientId, order);
            }
          });
          newState.set(
            "",
            (state.get("") ?? []).concat(blockOrder[""])
          );
          return newState;
        }
        case "INSERT_BLOCKS": {
          const { rootClientId = "" } = action;
          const subState = state.get(rootClientId) || [];
          const mappedBlocks = mapBlockOrder(
            action.blocks,
            rootClientId
          );
          const { index = subState.length } = action;
          const newState = new Map(state);
          mappedBlocks.forEach((order, clientId) => {
            newState.set(clientId, order);
          });
          newState.set(
            rootClientId,
            insertAt(
              subState,
              mappedBlocks.get(rootClientId),
              index
            )
          );
          return newState;
        }
        case "MOVE_BLOCKS_TO_POSITION": {
          const {
            fromRootClientId = "",
            toRootClientId = "",
            clientIds
          } = action;
          const { index = state.get(toRootClientId).length } = action;
          if (fromRootClientId === toRootClientId) {
            const subState = state.get(toRootClientId);
            const fromIndex = subState.indexOf(clientIds[0]);
            const newState2 = new Map(state);
            newState2.set(
              toRootClientId,
              moveTo(
                state.get(toRootClientId),
                fromIndex,
                index,
                clientIds.length
              )
            );
            return newState2;
          }
          const newState = new Map(state);
          newState.set(
            fromRootClientId,
            state.get(fromRootClientId)?.filter((id) => !clientIds.includes(id)) ?? []
          );
          newState.set(
            toRootClientId,
            insertAt(state.get(toRootClientId), clientIds, index)
          );
          return newState;
        }
        case "MOVE_BLOCKS_UP": {
          const { clientIds, rootClientId = "" } = action;
          const firstClientId = clientIds[0];
          const subState = state.get(rootClientId);
          if (!subState.length || firstClientId === subState[0]) {
            return state;
          }
          const firstIndex = subState.indexOf(firstClientId);
          const newState = new Map(state);
          newState.set(
            rootClientId,
            moveTo(
              subState,
              firstIndex,
              firstIndex - 1,
              clientIds.length
            )
          );
          return newState;
        }
        case "MOVE_BLOCKS_DOWN": {
          const { clientIds, rootClientId = "" } = action;
          const firstClientId = clientIds[0];
          const lastClientId = clientIds[clientIds.length - 1];
          const subState = state.get(rootClientId);
          if (!subState.length || lastClientId === subState[subState.length - 1]) {
            return state;
          }
          const firstIndex = subState.indexOf(firstClientId);
          const newState = new Map(state);
          newState.set(
            rootClientId,
            moveTo(
              subState,
              firstIndex,
              firstIndex + 1,
              clientIds.length
            )
          );
          return newState;
        }
        case "REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN": {
          const { clientIds } = action;
          if (!action.blocks) {
            return state;
          }
          const mappedBlocks = mapBlockOrder(action.blocks);
          const newState = new Map(state);
          action.replacedClientIds.forEach((clientId) => {
            newState.delete(clientId);
          });
          mappedBlocks.forEach((order, clientId) => {
            if (clientId !== "") {
              newState.set(clientId, order);
            }
          });
          newState.forEach((order, clientId) => {
            const newSubOrder = Object.values(order).reduce(
              (result, subClientId) => {
                if (subClientId === clientIds[0]) {
                  return [...result, ...mappedBlocks.get("")];
                }
                if (clientIds.indexOf(subClientId) === -1) {
                  result.push(subClientId);
                }
                return result;
              },
              []
            );
            newState.set(clientId, newSubOrder);
          });
          return newState;
        }
        case "REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN": {
          const newState = new Map(state);
          action.removedClientIds.forEach((clientId) => {
            newState.delete(clientId);
          });
          newState.forEach((order, clientId) => {
            const newSubOrder = order?.filter(
              (id) => !action.removedClientIds.includes(id)
            ) ?? [];
            if (newSubOrder.length !== order.length) {
              newState.set(clientId, newSubOrder);
            }
          });
          return newState;
        }
      }
      return state;
    },
    // While technically redundant data as the inverse of `order`, it serves as
    // an optimization for the selectors which derive the ancestry of a block.
    parents(state = /* @__PURE__ */ new Map(), action) {
      switch (action.type) {
        case "RECEIVE_BLOCKS": {
          const newState = new Map(state);
          mapBlockParents(action.blocks).forEach(
            ([key, value]) => {
              newState.set(key, value);
            }
          );
          return newState;
        }
        case "INSERT_BLOCKS": {
          const newState = new Map(state);
          mapBlockParents(
            action.blocks,
            action.rootClientId || ""
          ).forEach(([key, value]) => {
            newState.set(key, value);
          });
          return newState;
        }
        case "MOVE_BLOCKS_TO_POSITION": {
          const newState = new Map(state);
          action.clientIds.forEach((id) => {
            newState.set(id, action.toRootClientId || "");
          });
          return newState;
        }
        case "REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN": {
          const newState = new Map(state);
          action.replacedClientIds.forEach((clientId) => {
            newState.delete(clientId);
          });
          mapBlockParents(
            action.blocks,
            state.get(action.clientIds[0])
          ).forEach(([key, value]) => {
            newState.set(key, value);
          });
          return newState;
        }
        case "REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN": {
          const newState = new Map(state);
          action.removedClientIds.forEach((clientId) => {
            newState.delete(clientId);
          });
          return newState;
        }
      }
      return state;
    },
    controlledInnerBlocks(state = {}, { type, clientId, hasControlledInnerBlocks }) {
      if (type === "SET_HAS_CONTROLLED_INNER_BLOCKS") {
        return {
          ...state,
          [clientId]: hasControlledInnerBlocks
        };
      }
      return state;
    },
    blockEditingModes(state = /* @__PURE__ */ new Map(), action) {
      switch (action.type) {
        case "SET_BLOCK_EDITING_MODE":
          if (state.get(action.clientId) === action.mode) {
            return state;
          }
          return new Map(state).set(action.clientId, action.mode);
        case "UNSET_BLOCK_EDITING_MODE": {
          if (!state.has(action.clientId)) {
            return state;
          }
          const newState = new Map(state);
          newState.delete(action.clientId);
          return newState;
        }
      }
      return state;
    }
  });
  function isBlockInterfaceHidden(state = false, action) {
    switch (action.type) {
      case "HIDE_BLOCK_INTERFACE":
        return true;
      case "SHOW_BLOCK_INTERFACE":
        return false;
    }
    return state;
  }
  function isTyping(state = false, action) {
    switch (action.type) {
      case "START_TYPING":
        return true;
      case "STOP_TYPING":
        return false;
    }
    return state;
  }
  function isDragging(state = false, action) {
    switch (action.type) {
      case "START_DRAGGING":
        return true;
      case "STOP_DRAGGING":
        return false;
    }
    return state;
  }
  function draggedBlocks(state = [], action) {
    switch (action.type) {
      case "START_DRAGGING_BLOCKS":
        return action.clientIds;
      case "STOP_DRAGGING_BLOCKS":
        return [];
    }
    return state;
  }
  function blockVisibility(state = {}, action) {
    if (action.type === "SET_BLOCK_VISIBILITY") {
      return {
        ...state,
        ...action.updates
      };
    }
    return state;
  }
  function selectionHelper(state = {}, action) {
    switch (action.type) {
      case "CLEAR_SELECTED_BLOCK": {
        if (state.clientId) {
          return {};
        }
        return state;
      }
      case "SELECT_BLOCK":
        if (action.clientId === state.clientId) {
          return state;
        }
        return { clientId: action.clientId };
      case "REPLACE_INNER_BLOCKS":
      case "INSERT_BLOCKS": {
        if (!action.updateSelection || !action.blocks.length) {
          return state;
        }
        return { clientId: action.blocks[0].clientId };
      }
      case "REMOVE_BLOCKS":
        if (!action.clientIds || !action.clientIds.length || action.clientIds.indexOf(state.clientId) === -1) {
          return state;
        }
        return {};
      case "REPLACE_BLOCKS": {
        if (action.clientIds.indexOf(state.clientId) === -1) {
          return state;
        }
        const blockToSelect = action.blocks[action.indexToSelect] || action.blocks[action.blocks.length - 1];
        if (!blockToSelect) {
          return {};
        }
        if (blockToSelect.clientId === state.clientId) {
          return state;
        }
        return { clientId: blockToSelect.clientId };
      }
    }
    return state;
  }
  function selection(state = {}, action) {
    switch (action.type) {
      case "SELECTION_CHANGE":
        if (action.clientId) {
          return {
            selectionStart: {
              clientId: action.clientId,
              attributeKey: action.attributeKey,
              offset: action.startOffset
            },
            selectionEnd: {
              clientId: action.clientId,
              attributeKey: action.attributeKey,
              offset: action.endOffset
            }
          };
        }
        return {
          selectionStart: action.start || state.selectionStart,
          selectionEnd: action.end || state.selectionEnd
        };
      case "RESET_SELECTION":
        const { selectionStart: selectionStart2, selectionEnd: selectionEnd2 } = action;
        return {
          selectionStart: selectionStart2,
          selectionEnd: selectionEnd2
        };
      case "MULTI_SELECT":
        const { start: start2, end } = action;
        if (start2 === state.selectionStart?.clientId && end === state.selectionEnd?.clientId) {
          return state;
        }
        return {
          selectionStart: { clientId: start2 },
          selectionEnd: { clientId: end }
        };
      case "RESET_BLOCKS":
        const startClientId = state?.selectionStart?.clientId;
        const endClientId = state?.selectionEnd?.clientId;
        if (!startClientId && !endClientId) {
          return state;
        }
        if (!action.blocks.some(
          (block) => block.clientId === startClientId
        )) {
          return {
            selectionStart: {},
            selectionEnd: {}
          };
        }
        if (!action.blocks.some(
          (block) => block.clientId === endClientId
        )) {
          return {
            ...state,
            selectionEnd: state.selectionStart
          };
        }
    }
    const selectionStart = selectionHelper(state.selectionStart, action);
    const selectionEnd = selectionHelper(state.selectionEnd, action);
    if (selectionStart === state.selectionStart && selectionEnd === state.selectionEnd) {
      return state;
    }
    return {
      selectionStart,
      selectionEnd
    };
  }
  function isMultiSelecting(state = false, action) {
    switch (action.type) {
      case "START_MULTI_SELECT":
        return true;
      case "STOP_MULTI_SELECT":
        return false;
    }
    return state;
  }
  function isSelectionEnabled(state = true, action) {
    switch (action.type) {
      case "TOGGLE_SELECTION":
        return action.isSelectionEnabled;
    }
    return state;
  }
  function viewportModalClientIds(state = null, action) {
    switch (action.type) {
      case "SHOW_VIEWPORT_MODAL":
        return action.clientIds;
      case "HIDE_VIEWPORT_MODAL":
        return null;
    }
    return state;
  }
  function removalPromptData(state = false, action) {
    switch (action.type) {
      case "DISPLAY_BLOCK_REMOVAL_PROMPT":
        const { clientIds, selectPrevious, message: message2 } = action;
        return {
          clientIds,
          selectPrevious,
          message: message2
        };
      case "CLEAR_BLOCK_REMOVAL_PROMPT":
        return false;
    }
    return state;
  }
  function blockRemovalRules(state = false, action) {
    switch (action.type) {
      case "SET_BLOCK_REMOVAL_RULES":
        return action.rules;
    }
    return state;
  }
  function initialPosition(state = null, action) {
    if (action.type === "REPLACE_BLOCKS" && action.initialPosition !== void 0) {
      return action.initialPosition;
    } else if ([
      "MULTI_SELECT",
      "SELECT_BLOCK",
      "RESET_SELECTION",
      "INSERT_BLOCKS",
      "REPLACE_INNER_BLOCKS"
    ].includes(action.type)) {
      return action.initialPosition;
    }
    return state;
  }
  function blocksMode(state = {}, action) {
    if (action.type === "TOGGLE_BLOCK_MODE") {
      const { clientId } = action;
      return {
        ...state,
        [clientId]: state[clientId] && state[clientId] === "html" ? "visual" : "html"
      };
    }
    return state;
  }
  function insertionCue(state = null, action) {
    switch (action.type) {
      case "SHOW_INSERTION_POINT": {
        const {
          rootClientId,
          index,
          __unstableWithInserter,
          operation,
          nearestSide
        } = action;
        const nextState = {
          rootClientId,
          index,
          __unstableWithInserter,
          operation,
          nearestSide
        };
        return (0, import_es6.default)(state, nextState) ? state : nextState;
      }
      case "HIDE_INSERTION_POINT":
        return null;
    }
    return state;
  }
  function template(state = { isValid: true }, action) {
    switch (action.type) {
      case "SET_TEMPLATE_VALIDITY":
        return {
          ...state,
          isValid: action.isValid
        };
    }
    return state;
  }
  function settings(state = SETTINGS_DEFAULTS, action) {
    switch (action.type) {
      case "UPDATE_SETTINGS": {
        const updatedSettings = action.reset ? {
          ...SETTINGS_DEFAULTS,
          ...action.settings
        } : {
          ...state,
          ...action.settings
        };
        Object.defineProperty(updatedSettings, "__unstableIsPreviewMode", {
          get() {
            (0, import_deprecated.default)("__unstableIsPreviewMode", {
              since: "6.8",
              alternative: "isPreviewMode"
            });
            return this.isPreviewMode;
          }
        });
        return updatedSettings;
      }
    }
    return state;
  }
  function preferences(state = PREFERENCES_DEFAULTS, action) {
    switch (action.type) {
      case "INSERT_BLOCKS":
      case "REPLACE_BLOCKS": {
        const nextInsertUsage = action.blocks.reduce(
          (prevUsage, block) => {
            const { attributes, name: blockName } = block;
            let id = blockName;
            const match2 = (0, import_data2.select)(import_blocks2.store).getActiveBlockVariation(
              blockName,
              attributes
            );
            if (match2?.name) {
              id += "/" + match2.name;
            }
            if (blockName === "core/block") {
              id += "/" + attributes.ref;
            }
            return {
              ...prevUsage,
              [id]: {
                time: action.time,
                count: prevUsage[id] ? prevUsage[id].count + 1 : 1
              }
            };
          },
          state.insertUsage
        );
        return {
          ...state,
          insertUsage: nextInsertUsage
        };
      }
    }
    return state;
  }
  var blockListSettings = (state = {}, action) => {
    switch (action.type) {
      case "REPLACE_BLOCKS": {
        const replacementIds = /* @__PURE__ */ new Set();
        const stack = [...action.blocks];
        while (stack.length) {
          const block = stack.shift();
          replacementIds.add(block.clientId);
          stack.push(...block.innerBlocks);
        }
        return Object.fromEntries(
          Object.entries(state).filter(
            ([id]) => !action.clientIds.includes(id) || replacementIds.has(id)
          )
        );
      }
      case "REMOVE_BLOCKS": {
        return Object.fromEntries(
          Object.entries(state).filter(
            ([id]) => !action.clientIds.includes(id)
          )
        );
      }
      case "UPDATE_BLOCK_LIST_SETTINGS": {
        const updates = typeof action.clientId === "string" ? { [action.clientId]: action.settings } : action.clientId;
        for (const clientId in updates) {
          if (!updates[clientId]) {
            if (!state[clientId]) {
              delete updates[clientId];
            }
          } else if ((0, import_es6.default)(state[clientId], updates[clientId])) {
            delete updates[clientId];
          }
        }
        if (Object.keys(updates).length === 0) {
          return state;
        }
        const merged = { ...state, ...updates };
        for (const clientId in updates) {
          if (!updates[clientId]) {
            delete merged[clientId];
          }
        }
        return merged;
      }
    }
    return state;
  };
  function lastBlockAttributesChange(state = null, action) {
    switch (action.type) {
      case "UPDATE_BLOCK":
        if (!action.updates.attributes) {
          break;
        }
        return { [action.clientId]: action.updates.attributes };
      case "UPDATE_BLOCK_ATTRIBUTES":
        return action.clientIds.reduce(
          (accumulator, id) => ({
            ...accumulator,
            [id]: !!action.options?.uniqueByBlock ? action.attributes[id] : action.attributes
          }),
          {}
        );
    }
    return state;
  }
  function highlightedBlock(state, action) {
    switch (action.type) {
      case "TOGGLE_BLOCK_HIGHLIGHT":
        const { clientId, isHighlighted } = action;
        if (isHighlighted) {
          return clientId;
        } else if (state === clientId) {
          return null;
        }
        return state;
      case "SELECT_BLOCK":
        if (action.clientId !== state) {
          return null;
        }
    }
    return state;
  }
  function hasBlockSpotlight(state, action) {
    switch (action.type) {
      case "TOGGLE_BLOCK_SPOTLIGHT":
        const { clientId, hasBlockSpotlight: _hasBlockSpotlight } = action;
        if (_hasBlockSpotlight) {
          return clientId;
        } else if (state === clientId) {
          return null;
        }
        return state;
      case "SELECT_BLOCK":
        if (action.clientId !== state) {
          return null;
        }
        return state;
      case "SELECTION_CHANGE":
        if (action.start?.clientId !== state || action.end?.clientId !== state) {
          return null;
        }
        return state;
      case "CLEAR_SELECTED_BLOCK":
        return null;
    }
    return state;
  }
  function expandedBlock(state = null, action) {
    switch (action.type) {
      case "SET_BLOCK_EXPANDED_IN_LIST_VIEW":
        return action.clientId;
      case "SELECT_BLOCK":
        if (action.clientId !== state) {
          return null;
        }
    }
    return state;
  }
  function lastBlockInserted(state = {}, action) {
    switch (action.type) {
      case "INSERT_BLOCKS":
      case "REPLACE_BLOCKS":
        if (!action.blocks.length) {
          return state;
        }
        const clientIds = action.blocks.map((block) => {
          return block.clientId;
        });
        const source = action.meta?.source;
        return { clientIds, source };
      case "RESET_BLOCKS":
        return {};
    }
    return state;
  }
  function editedContentOnlySection(state, action) {
    if (action.type === "EDIT_CONTENT_ONLY_SECTION") {
      return action.clientId;
    }
    if (!state) {
      return state;
    }
    switch (action.type) {
      case "REMOVE_BLOCKS":
      case "REPLACE_BLOCKS":
        if (action.clientIds.includes(state)) {
          return void 0;
        }
        break;
      case "RESET_BLOCKS":
        if (!getFlattenedClientIds(action.blocks)[state]) {
          return void 0;
        }
        break;
    }
    return state;
  }
  function styleOverrides(state = /* @__PURE__ */ new Map(), action) {
    switch (action.type) {
      case "SET_STYLE_OVERRIDE":
        return new Map(state).set(action.id, action.style);
      case "DELETE_STYLE_OVERRIDE": {
        const newState = new Map(state);
        newState.delete(action.id);
        return newState;
      }
    }
    return state;
  }
  function registeredInserterMediaCategories(state = [], action) {
    switch (action.type) {
      case "REGISTER_INSERTER_MEDIA_CATEGORY":
        return [...state, action.category];
    }
    return state;
  }
  function lastFocus(state = false, action) {
    switch (action.type) {
      case "LAST_FOCUS":
        return action.lastFocus;
    }
    return state;
  }
  function zoomLevel(state = 100, action) {
    switch (action.type) {
      case "SET_ZOOM_LEVEL":
        return action.zoom;
      case "RESET_ZOOM_LEVEL":
        return 100;
    }
    return state;
  }
  function insertionPoint(state = null, action) {
    switch (action.type) {
      case "SET_INSERTION_POINT":
        return action.value;
      case "SELECT_BLOCK":
        return null;
    }
    return state;
  }
  function openedListViewPanels(state = { allOpen: false, panels: {} }, action) {
    switch (action.type) {
      case "SET_OPEN_LIST_VIEW_PANEL":
        return {
          allOpen: false,
          panels: action.clientId ? { [action.clientId]: true } : {}
        };
      case "SET_ALL_LIST_VIEW_PANELS_OPEN":
        return { allOpen: true, panels: {} };
      case "TOGGLE_LIST_VIEW_PANEL":
        return {
          allOpen: false,
          panels: {
            ...state.panels,
            [action.clientId]: action.isOpen
          }
        };
      case "REPLACE_BLOCKS":
      case "REMOVE_BLOCKS": {
        if (!action.clientIds || action.clientIds.length === 0) {
          return state;
        }
        const newPanels = { ...state.panels };
        let hasChanges = false;
        action.clientIds.forEach((clientId) => {
          if (clientId in newPanels) {
            delete newPanels[clientId];
            hasChanges = true;
          }
        });
        return hasChanges ? { ...state, panels: newPanels } : state;
      }
    }
    return state;
  }
  function listViewExpandRevision(state = 0, action) {
    switch (action.type) {
      case "INCREMENT_LIST_VIEW_EXPAND_REVISION":
        return state + 1;
    }
    return state;
  }
  function listViewContentPanelOpen(state = false, action) {
    switch (action.type) {
      case "OPEN_LIST_VIEW_CONTENT_PANEL":
        return true;
      case "CLOSE_LIST_VIEW_CONTENT_PANEL":
        return false;
      // Close when selection is cleared
      case "CLEAR_SELECTED_BLOCK":
        return false;
    }
    return state;
  }
  function requestedInspectorTab(state = null, action) {
    switch (action.type) {
      case "REQUEST_INSPECTOR_TAB":
        return {
          tabName: action.tabName,
          options: action.options
        };
      case "CLEAR_REQUESTED_INSPECTOR_TAB":
        return null;
    }
    return state;
  }
  var combinedReducers = (0, import_data2.combineReducers)({
    blocks,
    isDragging,
    isTyping,
    isBlockInterfaceHidden,
    draggedBlocks,
    selection,
    isMultiSelecting,
    isSelectionEnabled,
    initialPosition,
    blocksMode,
    blockListSettings,
    insertionPoint,
    insertionCue,
    template,
    settings,
    preferences,
    lastBlockAttributesChange,
    lastFocus,
    expandedBlock,
    highlightedBlock,
    lastBlockInserted,
    editedContentOnlySection,
    blockVisibility,
    viewportModalClientIds,
    styleOverrides,
    removalPromptData,
    blockRemovalRules,
    registeredInserterMediaCategories,
    zoomLevel,
    hasBlockSpotlight,
    openedListViewPanels,
    listViewExpandRevision,
    listViewContentPanelOpen,
    requestedInspectorTab
  });
  function getBlockTreeBlock(state, clientId) {
    if (clientId === "") {
      const rootBlock = state.blocks.tree.get(clientId);
      if (!rootBlock) {
        return;
      }
      return {
        clientId: "",
        ...rootBlock
      };
    }
    if (!state.blocks.controlledInnerBlocks[clientId]) {
      return state.blocks.tree.get(clientId);
    }
    const controlledTree = state.blocks.tree.get(`controlled||${clientId}`);
    const regularTree = state.blocks.tree.get(clientId);
    return {
      ...regularTree,
      innerBlocks: controlledTree?.innerBlocks
    };
  }
  function traverseBlockTree(state, clientId, callback) {
    const tree = getBlockTreeBlock(state, clientId);
    if (!tree) {
      return;
    }
    callback(tree);
    if (!tree?.innerBlocks?.length) {
      return;
    }
    for (const innerBlock of tree?.innerBlocks) {
      traverseBlockTree(state, innerBlock.clientId, callback);
    }
  }
  function findParentInClientIdsList(state, clientId, clientIds) {
    if (!clientIds.length) {
      return;
    }
    let parent = state.blocks.parents.get(clientId);
    while (parent !== void 0) {
      if (clientIds.includes(parent)) {
        return parent;
      }
      parent = state.blocks.parents.get(parent);
    }
  }
  function hasBindings(block) {
    return block?.attributes?.metadata?.bindings && Object.keys(block?.attributes?.metadata?.bindings).length;
  }
  function getDerivedBlockEditingModesForTree(state, treeClientId = "") {
    const isZoomedOut = state?.zoomLevel < 100 || state?.zoomLevel === "auto-scaled";
    const derivedBlockEditingModes = /* @__PURE__ */ new Map();
    const sectionRootClientId = state.settings?.[sectionRootClientIdKey];
    const sectionClientIds = state.blocks.order.get(sectionRootClientId);
    const hasDisabledBlocks = Array.from(state.blocks.blockEditingModes).some(
      ([, mode2]) => mode2 === "disabled"
    );
    const templatePartClientIds = [];
    const syncedPatternClientIds = [];
    Object.keys(state.blocks.controlledInnerBlocks).forEach((clientId) => {
      const block = state.blocks.byClientId?.get(clientId);
      if (block?.name === "core/template-part") {
        templatePartClientIds.push(clientId);
      }
      if (block?.name === "core/block") {
        syncedPatternClientIds.push(clientId);
      }
    });
    const contentOnlyTemplateLockedClientIds = Object.keys(
      state.blockListSettings
    ).filter(
      (clientId) => state.blockListSettings[clientId]?.templateLock === "contentOnly"
    );
    const isIsolatedEditor = state.settings?.[isIsolatedEditorKey];
    const disableContentOnlyForUnsyncedPatterns = state.settings?.disableContentOnlyForUnsyncedPatterns;
    const unsyncedPatternClientIds = isIsolatedEditor || disableContentOnlyForUnsyncedPatterns ? [] : Array.from(state.blocks.attributes.keys()).filter(
      (clientId) => state.blocks.attributes.get(clientId)?.metadata?.patternName
    );
    const disableContentOnlyForTemplateParts = state.settings?.disableContentOnlyForTemplateParts;
    const contentOnlyParents = [
      ...contentOnlyTemplateLockedClientIds,
      ...unsyncedPatternClientIds,
      ...isIsolatedEditor || disableContentOnlyForTemplateParts ? [] : templatePartClientIds
    ];
    traverseBlockTree(state, treeClientId, (block) => {
      const { clientId, name: blockName } = block;
      const hasEditedContentOnlySection = !!state.editedContentOnlySection;
      let isWithinEditedContentOnlySection2 = false;
      if (hasEditedContentOnlySection) {
        isWithinEditedContentOnlySection2 = clientId === state.editedContentOnlySection || !!findParentInClientIdsList(state, clientId, [
          state.editedContentOnlySection
        ]);
        if (!isWithinEditedContentOnlySection2) {
          derivedBlockEditingModes.set(clientId, "disabled");
          return;
        }
      }
      if (state.blocks.blockEditingModes.has(clientId)) {
        return;
      }
      if (hasDisabledBlocks) {
        let ancestorBlockEditingMode;
        let parent = state.blocks.parents.get(clientId);
        while (parent !== void 0) {
          if (state.blocks.blockEditingModes.has(parent)) {
            ancestorBlockEditingMode = state.blocks.blockEditingModes.get(parent);
          }
          if (ancestorBlockEditingMode) {
            break;
          }
          parent = state.blocks.parents.get(parent);
        }
        if (ancestorBlockEditingMode === "disabled") {
          derivedBlockEditingModes.set(clientId, "disabled");
          return;
        }
      }
      if (isZoomedOut) {
        if (clientId === sectionRootClientId) {
          derivedBlockEditingModes.set(clientId, "contentOnly");
          return;
        }
        if (!sectionClientIds?.length) {
          derivedBlockEditingModes.set(clientId, "disabled");
          return;
        }
        if (sectionClientIds.includes(clientId)) {
          derivedBlockEditingModes.set(clientId, "contentOnly");
          return;
        }
        derivedBlockEditingModes.set(clientId, "disabled");
        return;
      }
      if (syncedPatternClientIds.length) {
        if (syncedPatternClientIds.includes(clientId)) {
          if (findParentInClientIdsList(
            state,
            clientId,
            syncedPatternClientIds
          )) {
            derivedBlockEditingModes.set(clientId, "disabled");
            return;
          }
          return;
        }
        const parentSyncedPatternClientId = findParentInClientIdsList(
          state,
          clientId,
          syncedPatternClientIds
        );
        if (parentSyncedPatternClientId) {
          if (findParentInClientIdsList(
            state,
            parentSyncedPatternClientId,
            syncedPatternClientIds
          )) {
            derivedBlockEditingModes.set(clientId, "disabled");
            return;
          }
          if (hasBindings(block)) {
            derivedBlockEditingModes.set(clientId, "contentOnly");
            return;
          }
          derivedBlockEditingModes.set(clientId, "disabled");
          return;
        }
      }
      if (hasEditedContentOnlySection && isWithinEditedContentOnlySection2) {
        derivedBlockEditingModes.set(clientId, "default");
        return;
      }
      if (contentOnlyParents.length) {
        const hasContentOnlyParent = !!findParentInClientIdsList(
          state,
          clientId,
          contentOnlyParents
        );
        if (hasContentOnlyParent) {
          if (isContentBlock(blockName)) {
            derivedBlockEditingModes.set(clientId, "contentOnly");
          } else {
            derivedBlockEditingModes.set(clientId, "disabled");
          }
        }
      }
    });
    return derivedBlockEditingModes;
  }
  function getDerivedBlockEditingModesUpdates({
    prevState,
    nextState,
    addedBlocks,
    removedClientIds
  }) {
    const prevDerivedBlockEditingModes = prevState.derivedBlockEditingModes;
    let nextDerivedBlockEditingModes;
    removedClientIds?.forEach((clientId) => {
      traverseBlockTree(prevState, clientId, (block) => {
        if (prevDerivedBlockEditingModes.has(block.clientId)) {
          if (!nextDerivedBlockEditingModes) {
            nextDerivedBlockEditingModes = new Map(
              prevDerivedBlockEditingModes
            );
          }
          nextDerivedBlockEditingModes.delete(block.clientId);
        }
      });
    });
    addedBlocks?.forEach((addedBlock) => {
      const updates = getDerivedBlockEditingModesForTree(
        nextState,
        addedBlock.clientId
      );
      if (updates.size) {
        if (!nextDerivedBlockEditingModes) {
          nextDerivedBlockEditingModes = new Map([
            ...prevDerivedBlockEditingModes?.size ? prevDerivedBlockEditingModes : [],
            ...updates
          ]);
        } else {
          nextDerivedBlockEditingModes = new Map([
            ...nextDerivedBlockEditingModes?.size ? nextDerivedBlockEditingModes : [],
            ...updates
          ]);
        }
      }
    });
    return nextDerivedBlockEditingModes;
  }
  function withDerivedBlockEditingModes(reducer3) {
    return (state, action) => {
      const nextState = reducer3(state, action);
      if (action.type !== "SET_EDITOR_MODE" && nextState === state) {
        return state;
      }
      switch (action.type) {
        case "REMOVE_BLOCKS": {
          const nextDerivedBlockEditingModes = getDerivedBlockEditingModesUpdates({
            prevState: state,
            nextState,
            removedClientIds: action.clientIds
          });
          if (nextDerivedBlockEditingModes) {
            return {
              ...nextState,
              derivedBlockEditingModes: nextDerivedBlockEditingModes ?? state.derivedBlockEditingModes
            };
          }
          break;
        }
        case "RECEIVE_BLOCKS":
        case "INSERT_BLOCKS": {
          const nextDerivedBlockEditingModes = getDerivedBlockEditingModesUpdates({
            prevState: state,
            nextState,
            addedBlocks: action.blocks
          });
          if (nextDerivedBlockEditingModes) {
            return {
              ...nextState,
              derivedBlockEditingModes: nextDerivedBlockEditingModes ?? state.derivedBlockEditingModes
            };
          }
          break;
        }
        case "UPDATE_BLOCK_ATTRIBUTES": {
          const disableContentOnlyForUnsyncedPatterns = nextState.settings?.disableContentOnlyForUnsyncedPatterns;
          if (disableContentOnlyForUnsyncedPatterns) {
            break;
          }
          const addedBlocks = [];
          const removedClientIds = [];
          for (const clientId of action?.clientIds) {
            const attributes = action.options?.uniqueByBlock ? action.attributes[clientId] : action.attributes;
            if (!attributes) {
              break;
            }
            if (
              // patternName is switching from falsy to truthy, indicating
              // this block is becoming an unsynced pattern.
              attributes.metadata?.patternName && !state.blocks.attributes.get(clientId)?.metadata?.patternName
            ) {
              addedBlocks.push(
                nextState.blocks.tree.get(clientId)
              );
            } else if (
              // patternName is switching from truthy to falsy, this block is becoming
              // a regular block but was an unsynced pattern.
              // Check that `metadata` is part of the included attributes, as
              // `updateBlockAttributes` merges attributes, if it isn't present
              // the previous `metadata` would be retained.
              attributes.metadata && !attributes.metadata?.patternName && state.blocks.attributes.get(clientId)?.metadata?.patternName
            ) {
              removedClientIds.push(clientId);
            }
          }
          if (!addedBlocks?.length && !removedClientIds?.length) {
            break;
          }
          const nextDerivedBlockEditingModes = getDerivedBlockEditingModesUpdates({
            prevState: state,
            nextState,
            addedBlocks,
            removedClientIds
          });
          if (nextDerivedBlockEditingModes) {
            return {
              ...nextState,
              derivedBlockEditingModes: nextDerivedBlockEditingModes ?? state.derivedBlockEditingModes
            };
          }
          break;
        }
        case "UPDATE_BLOCK_LIST_SETTINGS": {
          const addedBlocks = [];
          const removedClientIds = [];
          const updates = typeof action.clientId === "string" ? { [action.clientId]: action.settings } : action.clientId;
          for (const clientId in updates) {
            const isNewContentOnlyBlock = state.blockListSettings[clientId]?.templateLock !== "contentOnly" && nextState.blockListSettings[clientId]?.templateLock === "contentOnly";
            const wasContentOnlyBlock = state.blockListSettings[clientId]?.templateLock === "contentOnly" && nextState.blockListSettings[clientId]?.templateLock !== "contentOnly";
            if (isNewContentOnlyBlock) {
              addedBlocks.push(
                nextState.blocks.tree.get(clientId)
              );
            } else if (wasContentOnlyBlock) {
              removedClientIds.push(clientId);
            }
          }
          if (!addedBlocks.length && !removedClientIds.length) {
            break;
          }
          const nextDerivedBlockEditingModes = getDerivedBlockEditingModesUpdates({
            prevState: state,
            nextState,
            addedBlocks,
            removedClientIds
          });
          if (nextDerivedBlockEditingModes) {
            return {
              ...nextState,
              derivedBlockEditingModes: nextDerivedBlockEditingModes ?? state.derivedBlockEditingModes
            };
          }
          break;
        }
        case "SET_BLOCK_EDITING_MODE":
        case "UNSET_BLOCK_EDITING_MODE":
        case "SET_HAS_CONTROLLED_INNER_BLOCKS": {
          const updatedBlock = getBlockTreeBlock(
            nextState,
            action.clientId
          );
          if (!updatedBlock) {
            break;
          }
          const nextDerivedBlockEditingModes = getDerivedBlockEditingModesUpdates({
            prevState: state,
            nextState,
            removedClientIds: [action.clientId],
            addedBlocks: [updatedBlock]
          });
          if (nextDerivedBlockEditingModes) {
            return {
              ...nextState,
              derivedBlockEditingModes: nextDerivedBlockEditingModes ?? state.derivedBlockEditingModes
            };
          }
          break;
        }
        case "REPLACE_BLOCKS": {
          const nextDerivedBlockEditingModes = getDerivedBlockEditingModesUpdates({
            prevState: state,
            nextState,
            addedBlocks: action.blocks,
            removedClientIds: action.clientIds
          });
          if (nextDerivedBlockEditingModes) {
            return {
              ...nextState,
              derivedBlockEditingModes: nextDerivedBlockEditingModes ?? state.derivedBlockEditingModes
            };
          }
          break;
        }
        case "REPLACE_INNER_BLOCKS": {
          const removedClientIds = state.blocks.order.get(
            action.rootClientId
          );
          const nextDerivedBlockEditingModes = getDerivedBlockEditingModesUpdates({
            prevState: state,
            nextState,
            addedBlocks: action.blocks,
            removedClientIds
          });
          if (nextDerivedBlockEditingModes) {
            return {
              ...nextState,
              derivedBlockEditingModes: nextDerivedBlockEditingModes ?? state.derivedBlockEditingModes
            };
          }
          break;
        }
        case "MOVE_BLOCKS_TO_POSITION": {
          const addedBlocks = action.clientIds.map((clientId) => {
            return nextState.blocks.byClientId.get(clientId);
          });
          const nextDerivedBlockEditingModes = getDerivedBlockEditingModesUpdates({
            prevState: state,
            nextState,
            addedBlocks,
            removedClientIds: action.clientIds
          });
          if (nextDerivedBlockEditingModes) {
            return {
              ...nextState,
              derivedBlockEditingModes: nextDerivedBlockEditingModes ?? state.derivedBlockEditingModes
            };
          }
          break;
        }
        case "UPDATE_SETTINGS": {
          if (state?.settings?.[sectionRootClientIdKey] !== nextState?.settings?.[sectionRootClientIdKey] || !!state?.settings?.disableContentOnlyForUnsyncedPatterns !== !!nextState?.settings?.disableContentOnlyForUnsyncedPatterns || !!state?.settings?.[isIsolatedEditorKey] !== !!nextState?.settings?.[isIsolatedEditorKey] || !!state?.settings?.disableContentOnlyForTemplateParts !== !!nextState?.settings?.disableContentOnlyForTemplateParts) {
            return {
              ...nextState,
              derivedBlockEditingModes: getDerivedBlockEditingModesForTree(nextState)
            };
          }
          break;
        }
        case "RESET_BLOCKS":
        case "EDIT_CONTENT_ONLY_SECTION":
        case "SET_EDITOR_MODE":
        case "RESET_ZOOM_LEVEL":
        case "SET_ZOOM_LEVEL": {
          return {
            ...nextState,
            derivedBlockEditingModes: getDerivedBlockEditingModesForTree(nextState)
          };
        }
      }
      nextState.derivedBlockEditingModes = state?.derivedBlockEditingModes ?? /* @__PURE__ */ new Map();
      return nextState;
    };
  }
  function withAutomaticChangeReset(reducer3) {
    return (state, action) => {
      const nextState = reducer3(state, action);
      if (!state) {
        return nextState;
      }
      nextState.automaticChangeStatus = state.automaticChangeStatus;
      if (action.type === "MARK_AUTOMATIC_CHANGE") {
        return {
          ...nextState,
          automaticChangeStatus: "pending"
        };
      }
      if (action.type === "MARK_AUTOMATIC_CHANGE_FINAL" && state.automaticChangeStatus === "pending") {
        return {
          ...nextState,
          automaticChangeStatus: "final"
        };
      }
      if (nextState.blocks === state.blocks && nextState.selection === state.selection) {
        return nextState;
      }
      if (nextState.automaticChangeStatus !== "final" && nextState.selection !== state.selection) {
        return nextState;
      }
      return {
        ...nextState,
        automaticChangeStatus: void 0
      };
    };
  }
  var reducer_default = (0, import_compose.pipe)(
    withDerivedBlockEditingModes,
    withAutomaticChangeReset
  )(combinedReducers);

  // packages/block-editor/build-module/store/selectors.mjs
  var selectors_exports = {};
  __export(selectors_exports, {
    __experimentalGetActiveBlockIdByBlockNames: () => __experimentalGetActiveBlockIdByBlockNames,
    __experimentalGetAllowedBlocks: () => __experimentalGetAllowedBlocks,
    __experimentalGetAllowedPatterns: () => __experimentalGetAllowedPatterns,
    __experimentalGetBlockListSettingsForBlocks: () => __experimentalGetBlockListSettingsForBlocks,
    __experimentalGetDirectInsertBlock: () => __experimentalGetDirectInsertBlock,
    __experimentalGetGlobalBlocksByName: () => __experimentalGetGlobalBlocksByName,
    __experimentalGetLastBlockAttributeChanges: () => __experimentalGetLastBlockAttributeChanges,
    __experimentalGetParsedPattern: () => __experimentalGetParsedPattern,
    __experimentalGetPatternTransformItems: () => __experimentalGetPatternTransformItems,
    __experimentalGetPatternsByBlockTypes: () => __experimentalGetPatternsByBlockTypes,
    __experimentalGetReusableBlockTitle: () => __experimentalGetReusableBlockTitle,
    __unstableGetBlockWithoutInnerBlocks: () => __unstableGetBlockWithoutInnerBlocks,
    __unstableGetClientIdWithClientIdsTree: () => __unstableGetClientIdWithClientIdsTree,
    __unstableGetClientIdsTree: () => __unstableGetClientIdsTree,
    __unstableGetContentLockingParent: () => __unstableGetContentLockingParent,
    __unstableGetSelectedBlocksWithPartialSelection: () => __unstableGetSelectedBlocksWithPartialSelection,
    __unstableGetTemporarilyEditingAsBlocks: () => __unstableGetTemporarilyEditingAsBlocks,
    __unstableGetVisibleBlocks: () => __unstableGetVisibleBlocks,
    __unstableHasActiveBlockOverlayActive: () => __unstableHasActiveBlockOverlayActive,
    __unstableIsFullySelected: () => __unstableIsFullySelected,
    __unstableIsLastBlockChangeIgnored: () => __unstableIsLastBlockChangeIgnored,
    __unstableIsSelectionCollapsed: () => __unstableIsSelectionCollapsed,
    __unstableIsSelectionMergeable: () => __unstableIsSelectionMergeable,
    __unstableIsWithinBlockOverlay: () => __unstableIsWithinBlockOverlay,
    __unstableSelectionHasUnmergeableBlock: () => __unstableSelectionHasUnmergeableBlock,
    areInnerBlocksControlled: () => areInnerBlocksControlled,
    canEditBlock: () => canEditBlock,
    canInsertBlockType: () => canInsertBlockType,
    canInsertBlocks: () => canInsertBlocks,
    canLockBlockType: () => canLockBlockType,
    canMoveBlock: () => canMoveBlock,
    canMoveBlocks: () => canMoveBlocks,
    canRemoveBlock: () => canRemoveBlock,
    canRemoveBlocks: () => canRemoveBlocks,
    didAutomaticChange: () => didAutomaticChange,
    getAdjacentBlockClientId: () => getAdjacentBlockClientId,
    getAllowedBlocks: () => getAllowedBlocks,
    getBlock: () => getBlock,
    getBlockAttributes: () => getBlockAttributes,
    getBlockCount: () => getBlockCount,
    getBlockEditingMode: () => getBlockEditingMode,
    getBlockHierarchyRootClientId: () => getBlockHierarchyRootClientId,
    getBlockIndex: () => getBlockIndex,
    getBlockInsertionPoint: () => getBlockInsertionPoint,
    getBlockListSettings: () => getBlockListSettings,
    getBlockMode: () => getBlockMode,
    getBlockName: () => getBlockName,
    getBlockNamesByClientId: () => getBlockNamesByClientId,
    getBlockOrder: () => getBlockOrder,
    getBlockParents: () => getBlockParents,
    getBlockParentsByBlockName: () => getBlockParentsByBlockName,
    getBlockRootClientId: () => getBlockRootClientId,
    getBlockSelectionEnd: () => getBlockSelectionEnd,
    getBlockSelectionStart: () => getBlockSelectionStart,
    getBlockTransformItems: () => getBlockTransformItems,
    getBlocks: () => getBlocks,
    getBlocksByClientId: () => getBlocksByClientId,
    getBlocksByName: () => getBlocksByName,
    getClientIdsOfDescendants: () => getClientIdsOfDescendants,
    getClientIdsWithDescendants: () => getClientIdsWithDescendants,
    getDirectInsertBlock: () => getDirectInsertBlock,
    getDraggedBlockClientIds: () => getDraggedBlockClientIds,
    getFirstMultiSelectedBlockClientId: () => getFirstMultiSelectedBlockClientId,
    getGlobalBlockCount: () => getGlobalBlockCount,
    getHoveredBlockClientId: () => getHoveredBlockClientId,
    getInserterItems: () => getInserterItems,
    getLastMultiSelectedBlockClientId: () => getLastMultiSelectedBlockClientId,
    getLowestCommonAncestorWithSelectedBlock: () => getLowestCommonAncestorWithSelectedBlock,
    getMultiSelectedBlockClientIds: () => getMultiSelectedBlockClientIds,
    getMultiSelectedBlocks: () => getMultiSelectedBlocks,
    getMultiSelectedBlocksEndClientId: () => getMultiSelectedBlocksEndClientId,
    getMultiSelectedBlocksStartClientId: () => getMultiSelectedBlocksStartClientId,
    getNextBlockClientId: () => getNextBlockClientId,
    getPatternsByBlockTypes: () => getPatternsByBlockTypes,
    getPreviousBlockClientId: () => getPreviousBlockClientId,
    getSelectedBlock: () => getSelectedBlock,
    getSelectedBlockClientId: () => getSelectedBlockClientId,
    getSelectedBlockClientIds: () => getSelectedBlockClientIds,
    getSelectedBlockCount: () => getSelectedBlockCount,
    getSelectedBlocksInitialCaretPosition: () => getSelectedBlocksInitialCaretPosition,
    getSelectionEnd: () => getSelectionEnd,
    getSelectionStart: () => getSelectionStart,
    getSettings: () => getSettings,
    getTemplate: () => getTemplate,
    getTemplateLock: () => getTemplateLock,
    hasBlockMovingClientId: () => hasBlockMovingClientId,
    hasDraggedInnerBlock: () => hasDraggedInnerBlock,
    hasInserterItems: () => hasInserterItems,
    hasMultiSelection: () => hasMultiSelection,
    hasSelectedBlock: () => hasSelectedBlock,
    hasSelectedInnerBlock: () => hasSelectedInnerBlock,
    isAncestorBeingDragged: () => isAncestorBeingDragged,
    isAncestorMultiSelected: () => isAncestorMultiSelected,
    isBlockBeingDragged: () => isBlockBeingDragged,
    isBlockHighlighted: () => isBlockHighlighted,
    isBlockInsertionPointVisible: () => isBlockInsertionPointVisible,
    isBlockMultiSelected: () => isBlockMultiSelected,
    isBlockSelected: () => isBlockSelected,
    isBlockValid: () => isBlockValid,
    isBlockVisible: () => isBlockVisible,
    isBlockWithinSelection: () => isBlockWithinSelection,
    isCaretWithinFormattedText: () => isCaretWithinFormattedText,
    isDraggingBlocks: () => isDraggingBlocks,
    isFirstMultiSelectedBlock: () => isFirstMultiSelectedBlock,
    isGroupable: () => isGroupable,
    isLastBlockChangePersistent: () => isLastBlockChangePersistent,
    isMultiSelecting: () => isMultiSelecting2,
    isSelectionEnabled: () => isSelectionEnabled2,
    isTyping: () => isTyping2,
    isUngroupable: () => isUngroupable,
    isValidTemplate: () => isValidTemplate,
    wasBlockJustInserted: () => wasBlockJustInserted
  });
  var import_blocks6 = __toESM(require_blocks(), 1);
  var import_element6 = __toESM(require_element(), 1);
  var import_hooks2 = __toESM(require_hooks(), 1);

  // packages/icons/build-module/icon/index.mjs
  var import_element5 = __toESM(require_element(), 1);
  var icon_default = (0, import_element5.forwardRef)(
    ({ icon, size = 24, ...props }, ref) => {
      return (0, import_element5.cloneElement)(icon, {
        width: size,
        height: size,
        ...props,
        ref
      });
    }
  );

  // packages/icons/build-module/library/align-center.mjs
  var import_primitives = __toESM(require_primitives(), 1);
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
  var align_center_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives.Path, { d: "M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z" }) });

  // packages/icons/build-module/library/align-justify.mjs
  var import_primitives2 = __toESM(require_primitives(), 1);
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
  var align_justify_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives2.Path, { d: "M4 12.8h16v-1.5H4v1.5zm0 7h12.4v-1.5H4v1.5zM4 4.3v1.5h16V4.3H4z" }) });

  // packages/icons/build-module/library/align-left.mjs
  var import_primitives3 = __toESM(require_primitives(), 1);
  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
  var align_left_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives3.Path, { d: "M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z" }) });

  // packages/icons/build-module/library/align-none.mjs
  var import_primitives4 = __toESM(require_primitives(), 1);
  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
  var align_none_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives4.Path, { d: "M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z" }) });

  // packages/icons/build-module/library/align-right.mjs
  var import_primitives5 = __toESM(require_primitives(), 1);
  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
  var align_right_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives5.Path, { d: "M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z" }) });

  // packages/icons/build-module/library/arrow-down.mjs
  var import_primitives6 = __toESM(require_primitives(), 1);
  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
  var arrow_down_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives6.Path, { d: "m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z" }) });

  // packages/icons/build-module/library/arrow-left.mjs
  var import_primitives7 = __toESM(require_primitives(), 1);
  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
  var arrow_left_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives7.Path, { d: "M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z" }) });

  // packages/icons/build-module/library/arrow-right.mjs
  var import_primitives8 = __toESM(require_primitives(), 1);
  var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
  var arrow_right_default = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives8.Path, { d: "m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z" }) });

  // packages/icons/build-module/library/aspect-ratio.mjs
  var import_primitives9 = __toESM(require_primitives(), 1);
  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
  var aspect_ratio_default = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives9.Path, { d: "M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z" }) });

  // packages/icons/build-module/library/audio.mjs
  var import_primitives10 = __toESM(require_primitives(), 1);
  var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
  var audio_default = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives10.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives10.Path, { d: "M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z" }) });

  // packages/icons/build-module/library/block-default.mjs
  var import_primitives11 = __toESM(require_primitives(), 1);
  var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
  var block_default_default = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives11.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives11.Path, { d: "M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z" }) });

  // packages/icons/build-module/library/category.mjs
  var import_primitives12 = __toESM(require_primitives(), 1);
  var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
  var category_default = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives12.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives12.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/check.mjs
  var import_primitives13 = __toESM(require_primitives(), 1);
  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
  var check_default = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives13.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives13.Path, { d: "M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z" }) });

  // packages/icons/build-module/library/chevron-down.mjs
  var import_primitives14 = __toESM(require_primitives(), 1);
  var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
  var chevron_down_default = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives14.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives14.Path, { d: "M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z" }) });

  // packages/icons/build-module/library/chevron-left-small.mjs
  var import_primitives15 = __toESM(require_primitives(), 1);
  var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
  var chevron_left_small_default = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives15.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives15.Path, { d: "m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z" }) });

  // packages/icons/build-module/library/chevron-left.mjs
  var import_primitives16 = __toESM(require_primitives(), 1);
  var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
  var chevron_left_default = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_primitives16.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_primitives16.Path, { d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z" }) });

  // packages/icons/build-module/library/chevron-right-small.mjs
  var import_primitives17 = __toESM(require_primitives(), 1);
  var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
  var chevron_right_small_default = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_primitives17.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_primitives17.Path, { d: "M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z" }) });

  // packages/icons/build-module/library/chevron-right.mjs
  var import_primitives18 = __toESM(require_primitives(), 1);
  var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
  var chevron_right_default = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_primitives18.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_primitives18.Path, { d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z" }) });

  // packages/icons/build-module/library/chevron-up.mjs
  var import_primitives19 = __toESM(require_primitives(), 1);
  var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
  var chevron_up_default = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_primitives19.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_primitives19.Path, { d: "M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z" }) });

  // packages/icons/build-module/library/close-small.mjs
  var import_primitives20 = __toESM(require_primitives(), 1);
  var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
  var close_small_default = /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives20.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives20.Path, { 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" }) });

  // packages/icons/build-module/library/cog.mjs
  var import_primitives21 = __toESM(require_primitives(), 1);
  var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
  var cog_default = /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_primitives21.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_primitives21.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/copy-small.mjs
  var import_primitives22 = __toESM(require_primitives(), 1);
  var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
  var copy_small_default = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_primitives22.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_primitives22.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z" }) });

  // packages/icons/build-module/library/copy.mjs
  var import_primitives23 = __toESM(require_primitives(), 1);
  var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
  var copy_default = /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_primitives23.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_primitives23.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z" }) });

  // packages/icons/build-module/library/corner-all.mjs
  var import_primitives24 = __toESM(require_primitives(), 1);
  var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
  var corner_all_default = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_primitives24.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_primitives24.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5Zm-12.5 9v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z" }) });

  // packages/icons/build-module/library/corner-bottom-left.mjs
  var import_primitives25 = __toESM(require_primitives(), 1);
  var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
  var corner_bottom_left_default = /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_primitives25.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_primitives25.G, { opacity: ".25", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_primitives25.Path, { d: "M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z" }) }),
    /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_primitives25.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M5.75 15v3c0 .138.112.25.25.25h3v1.5H6A1.75 1.75 0 0 1 4.25 18v-3h1.5Z" })
  ] });

  // packages/icons/build-module/library/corner-bottom-right.mjs
  var import_primitives26 = __toESM(require_primitives(), 1);
  var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
  var corner_bottom_right_default = /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_primitives26.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_primitives26.G, { opacity: ".25", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_primitives26.Path, { d: "M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z" }) }),
    /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_primitives26.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M15 18.25h3a.25.25 0 0 0 .25-.25v-3h1.5v3A1.75 1.75 0 0 1 18 19.75h-3v-1.5Z" })
  ] });

  // packages/icons/build-module/library/corner-top-left.mjs
  var import_primitives27 = __toESM(require_primitives(), 1);
  var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
  var corner_top_left_default = /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_primitives27.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_primitives27.G, { opacity: ".25", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_primitives27.Path, { d: "M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z" }) }),
    /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_primitives27.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M6 5.75a.25.25 0 0 0-.25.25v3h-1.5V6c0-.966.784-1.75 1.75-1.75h3v1.5H6Z" })
  ] });

  // packages/icons/build-module/library/corner-top-right.mjs
  var import_primitives28 = __toESM(require_primitives(), 1);
  var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
  var corner_top_right_default = /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_primitives28.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_primitives28.G, { opacity: ".25", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_primitives28.Path, { d: "M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z" }) }),
    /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_primitives28.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5Z" })
  ] });

  // packages/icons/build-module/library/desktop.mjs
  var import_primitives29 = __toESM(require_primitives(), 1);
  var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
  var desktop_default = /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_primitives29.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_primitives29.Path, { d: "M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z" }) });

  // packages/icons/build-module/library/drag-handle.mjs
  var import_primitives30 = __toESM(require_primitives(), 1);
  var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
  var drag_handle_default = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_primitives30.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_primitives30.Path, { d: "M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z" }) });

  // packages/icons/build-module/library/envelope.mjs
  var import_primitives31 = __toESM(require_primitives(), 1);
  var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
  var envelope_default = /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_primitives31.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_primitives31.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M3 7c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Zm2-.5h14c.3 0 .5.2.5.5v1L12 13.5 4.5 7.9V7c0-.3.2-.5.5-.5Zm-.5 3.3V17c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V9.8L12 15.4 4.5 9.8Z" }) });

  // packages/icons/build-module/library/error.mjs
  var import_primitives32 = __toESM(require_primitives(), 1);
  var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
  var error_default = /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_primitives32.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_primitives32.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z" }) });

  // packages/icons/build-module/library/external.mjs
  var import_primitives33 = __toESM(require_primitives(), 1);
  var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
  var external_default = /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_primitives33.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_primitives33.Path, { 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" }) });

  // packages/icons/build-module/library/file.mjs
  var import_primitives34 = __toESM(require_primitives(), 1);
  var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
  var file_default = /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_primitives34.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_primitives34.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/filter.mjs
  var import_primitives35 = __toESM(require_primitives(), 1);
  var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
  var filter_default = /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_primitives35.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_primitives35.Path, { d: "M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z" }) });

  // packages/icons/build-module/library/format-capitalize.mjs
  var import_primitives36 = __toESM(require_primitives(), 1);
  var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
  var format_capitalize_default = /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_primitives36.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_primitives36.Path, { d: "M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z" }) });

  // packages/icons/build-module/library/format-lowercase.mjs
  var import_primitives37 = __toESM(require_primitives(), 1);
  var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
  var format_lowercase_default = /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_primitives37.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_primitives37.Path, { d: "M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z" }) });

  // packages/icons/build-module/library/format-strikethrough.mjs
  var import_primitives38 = __toESM(require_primitives(), 1);
  var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
  var format_strikethrough_default = /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_primitives38.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_primitives38.Path, { d: "M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z" }) });

  // packages/icons/build-module/library/format-underline.mjs
  var import_primitives39 = __toESM(require_primitives(), 1);
  var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
  var format_underline_default = /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_primitives39.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_primitives39.Path, { d: "M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z" }) });

  // packages/icons/build-module/library/format-uppercase.mjs
  var import_primitives40 = __toESM(require_primitives(), 1);
  var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
  var format_uppercase_default = /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_primitives40.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_primitives40.Path, { d: "M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z" }) });

  // packages/icons/build-module/library/full-height.mjs
  var import_primitives41 = __toESM(require_primitives(), 1);
  var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
  var full_height_default = /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_primitives41.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_primitives41.Path, { d: "M12.75 19.45 15 17.5l1 1.1-4 3.4-4-3.4 1-1.1 2.25 1.95V14.5h1.5v4.95ZM19 12.75H5v-1.5h14v1.5ZM16 5.4l-1 1.1-2.25-1.95V9.5h-1.5V4.55L9 6.5 8 5.4 12 2l4 3.4Z" }) });

  // packages/icons/build-module/library/fullscreen.mjs
  var import_primitives42 = __toESM(require_primitives(), 1);
  var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
  var fullscreen_default = /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_primitives42.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_primitives42.Path, { d: "M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z" }) });

  // packages/icons/build-module/library/globe.mjs
  var import_primitives43 = __toESM(require_primitives(), 1);
  var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
  var globe_default = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_primitives43.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_primitives43.Path, { d: "M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm6.5 8c0 .6 0 1.2-.2 1.8h-2.7c0-.6.2-1.1.2-1.8s0-1.2-.2-1.8h2.7c.2.6.2 1.1.2 1.8Zm-.9-3.2h-2.4c-.3-.9-.7-1.8-1.1-2.4-.1-.2-.2-.4-.3-.5 1.6.5 3 1.6 3.8 3ZM12.8 17c-.3.5-.6 1-.8 1.3-.2-.3-.5-.8-.8-1.3-.3-.5-.6-1.1-.8-1.7h3.3c-.2.6-.5 1.2-.8 1.7Zm-2.9-3.2c-.1-.6-.2-1.1-.2-1.8s0-1.2.2-1.8H14c.1.6.2 1.1.2 1.8s0 1.2-.2 1.8H9.9ZM11.2 7c.3-.5.6-1 .8-1.3.2.3.5.8.8 1.3.3.5.6 1.1.8 1.7h-3.3c.2-.6.5-1.2.8-1.7Zm-1-1.2c-.1.2-.2.3-.3.5-.4.7-.8 1.5-1.1 2.4H6.4c.8-1.4 2.2-2.5 3.8-3Zm-1.8 8H5.7c-.2-.6-.2-1.1-.2-1.8s0-1.2.2-1.8h2.7c0 .6-.2 1.1-.2 1.8s0 1.2.2 1.8Zm-2 1.4h2.4c.3.9.7 1.8 1.1 2.4.1.2.2.4.3.5-1.6-.5-3-1.6-3.8-3Zm7.4 3c.1-.2.2-.3.3-.5.4-.7.8-1.5 1.1-2.4h2.4c-.8 1.4-2.2 2.5-3.8 3Z" }) });

  // packages/icons/build-module/library/grid.mjs
  var import_primitives44 = __toESM(require_primitives(), 1);
  var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
  var grid_default = /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_primitives44.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_primitives44.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z" }) });

  // packages/icons/build-module/library/group.mjs
  var import_primitives45 = __toESM(require_primitives(), 1);
  var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
  var group_default = /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_primitives45.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_primitives45.Path, { d: "M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z" }) });

  // packages/icons/build-module/library/heading-level-1.mjs
  var import_primitives46 = __toESM(require_primitives(), 1);
  var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
  var heading_level_1_default = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_primitives46.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_primitives46.Path, { d: "M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z" }) });

  // packages/icons/build-module/library/heading-level-2.mjs
  var import_primitives47 = __toESM(require_primitives(), 1);
  var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
  var heading_level_2_default = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_primitives47.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_primitives47.Path, { d: "M9 11.1H5v-4H3v10h2v-4h4v4h2v-10H9v4zm8 4c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6v1.5h8v-2H17z" }) });

  // packages/icons/build-module/library/heading-level-3.mjs
  var import_primitives48 = __toESM(require_primitives(), 1);
  var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
  var heading_level_3_default = /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_primitives48.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_primitives48.Path, { d: "M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.3 1.7c-.4-.4-1-.7-1.6-.8v-.1c.6-.2 1.1-.5 1.5-.9.3-.4.5-.8.5-1.3 0-.4-.1-.8-.3-1.1-.2-.3-.5-.6-.8-.8-.4-.2-.8-.4-1.2-.5-.6-.1-1.1-.2-1.6-.2-.6 0-1.3.1-1.8.3s-1.1.5-1.6.9l1.2 1.4c.4-.2.7-.4 1.1-.6.3-.2.7-.3 1.1-.3.4 0 .8.1 1.1.3.3.2.4.5.4.8 0 .4-.2.7-.6.9-.7.3-1.5.5-2.2.4v1.6c.5 0 1 0 1.5.1.3.1.7.2 1 .3.2.1.4.2.5.4s.1.4.1.6c0 .3-.2.7-.5.8-.4.2-.9.3-1.4.3s-1-.1-1.4-.3c-.4-.2-.8-.4-1.2-.7L13 15.6c.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.6 0 1.1-.1 1.6-.2.4-.1.9-.2 1.3-.5.4-.2.7-.5.9-.9.2-.4.3-.8.3-1.2 0-.6-.3-1.1-.7-1.5z" }) });

  // packages/icons/build-module/library/heading-level-4.mjs
  var import_primitives49 = __toESM(require_primitives(), 1);
  var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
  var heading_level_4_default = /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_primitives49.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_primitives49.Path, { d: "M20 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z" }) });

  // packages/icons/build-module/library/heading-level-5.mjs
  var import_primitives50 = __toESM(require_primitives(), 1);
  var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
  var heading_level_5_default = /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_primitives50.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_primitives50.Path, { d: "M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.7 1.2c-.2-.3-.5-.7-.8-.9-.3-.3-.7-.5-1.1-.6-.5-.1-.9-.2-1.4-.2-.2 0-.5.1-.7.1-.2.1-.5.1-.7.2l.1-1.9h4.3V7H14l-.3 5 1 .6.5-.2.4-.1c.1-.1.3-.1.4-.1h.5c.5 0 1 .1 1.4.4.4.2.6.7.6 1.1 0 .4-.2.8-.6 1.1-.4.3-.9.4-1.4.4-.4 0-.9-.1-1.3-.3-.4-.2-.7-.4-1.1-.7 0 0-1.1 1.4-1 1.5.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.5 0 1-.1 1.5-.3s.9-.4 1.3-.7c.4-.3.7-.7.9-1.1s.3-.9.3-1.4-.1-1-.3-1.4z" }) });

  // packages/icons/build-module/library/heading-level-6.mjs
  var import_primitives51 = __toESM(require_primitives(), 1);
  var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
  var heading_level_6_default = /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_primitives51.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_primitives51.Path, { d: "M20.7 12.4c-.2-.3-.4-.6-.7-.9s-.6-.5-1-.6c-.4-.2-.8-.2-1.2-.2-.5 0-.9.1-1.3.3s-.8.5-1.2.8c0-.5 0-.9.2-1.4l.6-.9c.2-.2.5-.4.8-.5.6-.2 1.3-.2 1.9 0 .3.1.6.3.8.5 0 0 1.3-1.3 1.3-1.4-.4-.3-.9-.6-1.4-.8-.6-.2-1.3-.3-2-.3-.6 0-1.1.1-1.7.4-.5.2-1 .5-1.4.9-.4.4-.8 1-1 1.6-.3.7-.4 1.5-.4 2.3s.1 1.5.3 2.1c.2.6.6 1.1 1 1.5.4.4.9.7 1.4.9 1 .3 2 .3 3 0 .4-.1.8-.3 1.2-.6.3-.3.6-.6.8-1 .2-.5.3-.9.3-1.4s-.1-.9-.3-1.3zm-2 2.1c-.1.2-.3.4-.4.5-.1.1-.3.2-.5.2-.2.1-.4.1-.6.1-.2.1-.5 0-.7-.1-.2 0-.3-.2-.5-.3-.1-.2-.3-.4-.4-.6-.2-.3-.3-.7-.3-1 .3-.3.6-.5 1-.7.3-.1.7-.2 1-.2.4 0 .8.1 1.1.3.3.3.4.7.4 1.1 0 .2 0 .5-.1.7zM9 11H5V7H3v10h2v-4h4v4h2V7H9v4z" }) });

  // packages/icons/build-module/library/home.mjs
  var import_primitives52 = __toESM(require_primitives(), 1);
  var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
  var home_default = /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_primitives52.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_primitives52.Path, { d: "M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z" }) });

  // packages/icons/build-module/library/image.mjs
  var import_primitives53 = __toESM(require_primitives(), 1);
  var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
  var image_default = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_primitives53.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_primitives53.Path, { 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.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z" }) });

  // packages/icons/build-module/library/info.mjs
  var import_primitives54 = __toESM(require_primitives(), 1);
  var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
  var info_default = /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_primitives54.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_primitives54.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z" }) });

  // packages/icons/build-module/library/justify-bottom.mjs
  var import_primitives55 = __toESM(require_primitives(), 1);
  var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1);
  var justify_bottom_default = /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_primitives55.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_primitives55.Path, { d: "M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z" }) });

  // packages/icons/build-module/library/justify-center-vertical.mjs
  var import_primitives56 = __toESM(require_primitives(), 1);
  var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1);
  var justify_center_vertical_default = /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_primitives56.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_primitives56.Path, { d: "M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z" }) });

  // packages/icons/build-module/library/justify-center.mjs
  var import_primitives57 = __toESM(require_primitives(), 1);
  var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1);
  var justify_center_default = /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_primitives57.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_primitives57.Path, { d: "M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z" }) });

  // packages/icons/build-module/library/justify-left.mjs
  var import_primitives58 = __toESM(require_primitives(), 1);
  var import_jsx_runtime60 = __toESM(require_jsx_runtime(), 1);
  var justify_left_default = /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_primitives58.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_primitives58.Path, { d: "M9 9v6h11V9H9zM4 20h1.5V4H4v16z" }) });

  // packages/icons/build-module/library/justify-right.mjs
  var import_primitives59 = __toESM(require_primitives(), 1);
  var import_jsx_runtime61 = __toESM(require_jsx_runtime(), 1);
  var justify_right_default = /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_primitives59.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_primitives59.Path, { d: "M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z" }) });

  // packages/icons/build-module/library/justify-space-between-vertical.mjs
  var import_primitives60 = __toESM(require_primitives(), 1);
  var import_jsx_runtime62 = __toESM(require_jsx_runtime(), 1);
  var justify_space_between_vertical_default = /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_primitives60.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_primitives60.Path, { d: "M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z" }) });

  // packages/icons/build-module/library/justify-space-between.mjs
  var import_primitives61 = __toESM(require_primitives(), 1);
  var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1);
  var justify_space_between_default = /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_primitives61.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_primitives61.Path, { d: "M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z" }) });

  // packages/icons/build-module/library/justify-stretch-vertical.mjs
  var import_primitives62 = __toESM(require_primitives(), 1);
  var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
  var justify_stretch_vertical_default = /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_primitives62.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_primitives62.Path, { d: "M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z" }) });

  // packages/icons/build-module/library/justify-stretch.mjs
  var import_primitives63 = __toESM(require_primitives(), 1);
  var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1);
  var justify_stretch_default = /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_primitives63.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_primitives63.Path, { d: "M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z" }) });

  // packages/icons/build-module/library/justify-top.mjs
  var import_primitives64 = __toESM(require_primitives(), 1);
  var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1);
  var justify_top_default = /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_primitives64.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_primitives64.Path, { d: "M9 20h6V9H9v11zM4 4v1.5h16V4H4z" }) });

  // packages/icons/build-module/library/keyboard-return.mjs
  var import_primitives65 = __toESM(require_primitives(), 1);
  var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
  var keyboard_return_default = /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_primitives65.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_primitives65.Path, { d: "m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734Z" }) });

  // packages/icons/build-module/library/layout.mjs
  var import_primitives66 = __toESM(require_primitives(), 1);
  var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
  var layout_default = /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_primitives66.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_primitives66.Path, { 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" }) });

  // packages/icons/build-module/library/link-off.mjs
  var import_primitives67 = __toESM(require_primitives(), 1);
  var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
  var link_off_default = /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_primitives67.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_primitives67.Path, { d: "M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z" }) });

  // packages/icons/build-module/library/link.mjs
  var import_primitives68 = __toESM(require_primitives(), 1);
  var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
  var link_default = /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_primitives68.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_primitives68.Path, { d: "M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z" }) });

  // packages/icons/build-module/library/list-view.mjs
  var import_primitives69 = __toESM(require_primitives(), 1);
  var import_jsx_runtime71 = __toESM(require_jsx_runtime(), 1);
  var list_view_default = /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_primitives69.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_primitives69.Path, { d: "M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z" }) });

  // packages/icons/build-module/library/lock-outline.mjs
  var import_primitives70 = __toESM(require_primitives(), 1);
  var import_jsx_runtime72 = __toESM(require_jsx_runtime(), 1);
  var lock_outline_default = /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_primitives70.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_primitives70.Path, { d: "M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zM9.8 7c0-1.2 1-2.2 2.2-2.2 1.2 0 2.2 1 2.2 2.2v3H9.8V7zm6.7 11.5h-9v-7h9v7z" }) });

  // packages/icons/build-module/library/lock-small.mjs
  var import_primitives71 = __toESM(require_primitives(), 1);
  var import_jsx_runtime73 = __toESM(require_jsx_runtime(), 1);
  var lock_small_default = /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_primitives71.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_primitives71.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/lock.mjs
  var import_primitives72 = __toESM(require_primitives(), 1);
  var import_jsx_runtime74 = __toESM(require_jsx_runtime(), 1);
  var lock_default = /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_primitives72.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_primitives72.Path, { d: "M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z" }) });

  // packages/icons/build-module/library/media.mjs
  var import_primitives73 = __toESM(require_primitives(), 1);
  var import_jsx_runtime75 = __toESM(require_jsx_runtime(), 1);
  var media_default = /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_primitives73.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_primitives73.Path, { d: "m7 6.5 4 2.5-4 2.5z" }),
    /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_primitives73.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" })
  ] });

  // packages/icons/build-module/library/mobile.mjs
  var import_primitives74 = __toESM(require_primitives(), 1);
  var import_jsx_runtime76 = __toESM(require_jsx_runtime(), 1);
  var mobile_default = /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_primitives74.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_primitives74.Path, { d: "M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z" }) });

  // packages/icons/build-module/library/more-vertical.mjs
  var import_primitives75 = __toESM(require_primitives(), 1);
  var import_jsx_runtime77 = __toESM(require_jsx_runtime(), 1);
  var more_vertical_default = /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_primitives75.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_primitives75.Path, { d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" }) });

  // packages/icons/build-module/library/page.mjs
  var import_primitives76 = __toESM(require_primitives(), 1);
  var import_jsx_runtime78 = __toESM(require_jsx_runtime(), 1);
  var page_default = /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_primitives76.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_primitives76.Path, { d: "M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z" }),
    /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_primitives76.Path, { 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" })
  ] });

  // packages/icons/build-module/library/paragraph.mjs
  var import_primitives77 = __toESM(require_primitives(), 1);
  var import_jsx_runtime79 = __toESM(require_jsx_runtime(), 1);
  var paragraph_default = /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_primitives77.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_primitives77.Path, { d: "m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z" }) });

  // packages/icons/build-module/library/pencil.mjs
  var import_primitives78 = __toESM(require_primitives(), 1);
  var import_jsx_runtime80 = __toESM(require_jsx_runtime(), 1);
  var pencil_default = /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_primitives78.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_primitives78.Path, { d: "m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z" }) });

  // packages/icons/build-module/library/pin-small.mjs
  var import_primitives79 = __toESM(require_primitives(), 1);
  var import_jsx_runtime81 = __toESM(require_jsx_runtime(), 1);
  var pin_small_default = /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_primitives79.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_primitives79.Path, { d: "M10.97 10.159a3.382 3.382 0 0 0-2.857.955l1.724 1.723-2.836 2.913L7 17h1.25l2.913-2.837 1.723 1.723a3.38 3.38 0 0 0 .606-.825c.33-.63.446-1.343.35-2.032L17 10.695 13.305 7l-2.334 3.159Z" }) });

  // packages/icons/build-module/library/plus.mjs
  var import_primitives80 = __toESM(require_primitives(), 1);
  var import_jsx_runtime82 = __toESM(require_jsx_runtime(), 1);
  var plus_default = /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_primitives80.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_primitives80.Path, { d: "M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z" }) });

  // packages/icons/build-module/library/position-center.mjs
  var import_primitives81 = __toESM(require_primitives(), 1);
  var import_jsx_runtime83 = __toESM(require_jsx_runtime(), 1);
  var position_center_default = /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_primitives81.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_primitives81.Path, { d: "M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z" }) });

  // packages/icons/build-module/library/position-left.mjs
  var import_primitives82 = __toESM(require_primitives(), 1);
  var import_jsx_runtime84 = __toESM(require_jsx_runtime(), 1);
  var position_left_default = /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_primitives82.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_primitives82.Path, { d: "M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z" }) });

  // packages/icons/build-module/library/position-right.mjs
  var import_primitives83 = __toESM(require_primitives(), 1);
  var import_jsx_runtime85 = __toESM(require_jsx_runtime(), 1);
  var position_right_default = /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_primitives83.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_primitives83.Path, { d: "M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z" }) });

  // packages/icons/build-module/library/post-featured-image.mjs
  var import_primitives84 = __toESM(require_primitives(), 1);
  var import_jsx_runtime86 = __toESM(require_jsx_runtime(), 1);
  var post_featured_image_default = /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_primitives84.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_primitives84.Path, { d: "M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z" }) });

  // packages/icons/build-module/library/post-list.mjs
  var import_primitives85 = __toESM(require_primitives(), 1);
  var import_jsx_runtime87 = __toESM(require_jsx_runtime(), 1);
  var post_list_default = /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_primitives85.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_primitives85.Path, { d: "M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z" }) });

  // packages/icons/build-module/library/post.mjs
  var import_primitives86 = __toESM(require_primitives(), 1);
  var import_jsx_runtime88 = __toESM(require_jsx_runtime(), 1);
  var post_default = /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_primitives86.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_primitives86.Path, { 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" }) });

  // packages/icons/build-module/library/reset.mjs
  var import_primitives87 = __toESM(require_primitives(), 1);
  var import_jsx_runtime89 = __toESM(require_jsx_runtime(), 1);
  var reset_default = /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_primitives87.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_primitives87.Path, { d: "M7 11.5h10V13H7z" }) });

  // packages/icons/build-module/library/rotate-right.mjs
  var import_primitives88 = __toESM(require_primitives(), 1);
  var import_jsx_runtime90 = __toESM(require_jsx_runtime(), 1);
  var rotate_right_default = /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_primitives88.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_primitives88.Path, { 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" }) });

  // packages/icons/build-module/library/row.mjs
  var import_primitives89 = __toESM(require_primitives(), 1);
  var import_jsx_runtime91 = __toESM(require_jsx_runtime(), 1);
  var row_default = /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_primitives89.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_primitives89.Path, { d: "M4 6.5h5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4V16h5a.5.5 0 0 0 .5-.5v-7A.5.5 0 0 0 9 8H4V6.5Zm16 0h-5a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h5V16h-5a.5.5 0 0 1-.5-.5v-7A.5.5 0 0 1 15 8h5V6.5Z" }) });

  // packages/icons/build-module/library/search.mjs
  var import_primitives90 = __toESM(require_primitives(), 1);
  var import_jsx_runtime92 = __toESM(require_jsx_runtime(), 1);
  var search_default = /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_primitives90.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_primitives90.Path, { 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" }) });

  // packages/icons/build-module/library/seen.mjs
  var import_primitives91 = __toESM(require_primitives(), 1);
  var import_jsx_runtime93 = __toESM(require_jsx_runtime(), 1);
  var seen_default = /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_primitives91.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_primitives91.Path, { 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" }) });

  // packages/icons/build-module/library/settings.mjs
  var import_primitives92 = __toESM(require_primitives(), 1);
  var import_jsx_runtime94 = __toESM(require_jsx_runtime(), 1);
  var settings_default = /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_primitives92.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_primitives92.Path, { 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" }),
    /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_primitives92.Path, { 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" })
  ] });

  // packages/icons/build-module/library/shadow.mjs
  var import_primitives93 = __toESM(require_primitives(), 1);
  var import_jsx_runtime95 = __toESM(require_jsx_runtime(), 1);
  var shadow_default = /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_primitives93.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_primitives93.Path, { 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" }) });

  // packages/icons/build-module/library/sides-all.mjs
  var import_primitives94 = __toESM(require_primitives(), 1);
  var import_jsx_runtime96 = __toESM(require_jsx_runtime(), 1);
  var sides_all_default = /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_primitives94.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_primitives94.Path, { d: "m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z" }) });

  // packages/icons/build-module/library/sides-bottom.mjs
  var import_primitives95 = __toESM(require_primitives(), 1);
  var import_jsx_runtime97 = __toESM(require_jsx_runtime(), 1);
  var sides_bottom_default = /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_primitives95.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_primitives95.Path, { d: "m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z", style: { opacity: 0.25 } }),
    /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_primitives95.Path, { d: "m16.5 19.5h-9v-1.5h9z" })
  ] });

  // packages/icons/build-module/library/sides-horizontal.mjs
  var import_primitives96 = __toESM(require_primitives(), 1);
  var import_jsx_runtime98 = __toESM(require_jsx_runtime(), 1);
  var sides_horizontal_default = /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_primitives96.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_primitives96.Path, { d: "m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z", style: { opacity: 0.25 } }),
    /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_primitives96.Path, { d: "m4.5 7.5v9h1.5v-9z" }),
    /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_primitives96.Path, { d: "m18 7.5v9h1.5v-9z" })
  ] });

  // packages/icons/build-module/library/sides-left.mjs
  var import_primitives97 = __toESM(require_primitives(), 1);
  var import_jsx_runtime99 = __toESM(require_jsx_runtime(), 1);
  var sides_left_default = /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_primitives97.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_primitives97.Path, { d: "m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z", style: { opacity: 0.25 } }),
    /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_primitives97.Path, { d: "m4.5 16.5v-9h1.5v9z" })
  ] });

  // packages/icons/build-module/library/sides-right.mjs
  var import_primitives98 = __toESM(require_primitives(), 1);
  var import_jsx_runtime100 = __toESM(require_jsx_runtime(), 1);
  var sides_right_default = /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(import_primitives98.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_primitives98.Path, { d: "m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z", style: { opacity: 0.25 } }),
    /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_primitives98.Path, { d: "m18 16.5v-9h1.5v9z" })
  ] });

  // packages/icons/build-module/library/sides-top.mjs
  var import_primitives99 = __toESM(require_primitives(), 1);
  var import_jsx_runtime101 = __toESM(require_jsx_runtime(), 1);
  var sides_top_default = /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(import_primitives99.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_primitives99.Path, { d: "m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z", style: { opacity: 0.25 } }),
    /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_primitives99.Path, { d: "m16.5 6h-9v-1.5h9z" })
  ] });

  // packages/icons/build-module/library/sides-vertical.mjs
  var import_primitives100 = __toESM(require_primitives(), 1);
  var import_jsx_runtime102 = __toESM(require_jsx_runtime(), 1);
  var sides_vertical_default = /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(import_primitives100.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_primitives100.Path, { d: "m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z", style: { opacity: 0.25 } }),
    /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_primitives100.Path, { d: "m7.5 6h9v-1.5h-9z" }),
    /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_primitives100.Path, { d: "m7.5 19.5h9v-1.5h-9z" })
  ] });

  // packages/icons/build-module/library/stack.mjs
  var import_primitives101 = __toESM(require_primitives(), 1);
  var import_jsx_runtime103 = __toESM(require_jsx_runtime(), 1);
  var stack_default = /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_primitives101.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_primitives101.Path, { d: "M17.5 4v5a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V4H8v5a.5.5 0 0 0 .5.5h7A.5.5 0 0 0 16 9V4h1.5Zm0 16v-5a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v5H8v-5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v5h1.5Z" }) });

  // packages/icons/build-module/library/stretch-full-width.mjs
  var import_primitives102 = __toESM(require_primitives(), 1);
  var import_jsx_runtime104 = __toESM(require_jsx_runtime(), 1);
  var stretch_full_width_default = /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_primitives102.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_primitives102.Path, { d: "M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z" }) });

  // packages/icons/build-module/library/stretch-wide.mjs
  var import_primitives103 = __toESM(require_primitives(), 1);
  var import_jsx_runtime105 = __toESM(require_jsx_runtime(), 1);
  var stretch_wide_default = /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_primitives103.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_primitives103.Path, { d: "M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z" }) });

  // packages/icons/build-module/library/styles.mjs
  var import_primitives104 = __toESM(require_primitives(), 1);
  var import_jsx_runtime106 = __toESM(require_jsx_runtime(), 1);
  var styles_default = /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_primitives104.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_primitives104.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z" }) });

  // packages/icons/build-module/library/symbol.mjs
  var import_primitives105 = __toESM(require_primitives(), 1);
  var import_jsx_runtime107 = __toESM(require_jsx_runtime(), 1);
  var symbol_default = /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_primitives105.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_primitives105.Path, { 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" }) });

  // packages/icons/build-module/library/tablet.mjs
  var import_primitives106 = __toESM(require_primitives(), 1);
  var import_jsx_runtime108 = __toESM(require_jsx_runtime(), 1);
  var tablet_default = /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_primitives106.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_primitives106.Path, { d: "M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z" }) });

  // packages/icons/build-module/library/tag.mjs
  var import_primitives107 = __toESM(require_primitives(), 1);
  var import_jsx_runtime109 = __toESM(require_jsx_runtime(), 1);
  var tag_default = /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_primitives107.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_primitives107.Path, { 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" }) });

  // packages/icons/build-module/library/text-horizontal.mjs
  var import_primitives108 = __toESM(require_primitives(), 1);
  var import_jsx_runtime110 = __toESM(require_jsx_runtime(), 1);
  var text_horizontal_default = /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_primitives108.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_primitives108.Path, { d: "M8.2 14.4h3.9L13 17h1.7L11 6.5H9.3L5.6 17h1.7l.9-2.6zm2-5.5 1.4 4H8.8l1.4-4zm7.4 7.5-1.3.8.8 1.4H5.5V20h14.3l-2.2-3.6z" }) });

  // packages/icons/build-module/library/text-vertical.mjs
  var import_primitives109 = __toESM(require_primitives(), 1);
  var import_jsx_runtime111 = __toESM(require_jsx_runtime(), 1);
  var text_vertical_default = /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_primitives109.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_primitives109.Path, { d: "M7 5.6v1.7l2.6.9v3.9L7 13v1.7L17.5 11V9.3L7 5.6zm4.2 6V8.8l4 1.4-4 1.4zm-5.7 5.6V5.5H4v14.3l3.6-2.2-.8-1.3-1.3.9z" }) });

  // packages/icons/build-module/library/trash.mjs
  var import_primitives110 = __toESM(require_primitives(), 1);
  var import_jsx_runtime112 = __toESM(require_jsx_runtime(), 1);
  var trash_default = /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_primitives110.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_primitives110.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/ungroup.mjs
  var import_primitives111 = __toESM(require_primitives(), 1);
  var import_jsx_runtime113 = __toESM(require_jsx_runtime(), 1);
  var ungroup_default = /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_primitives111.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_primitives111.Path, { d: "M18 4h-7c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7zm-5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h1V9H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-1h-1.5v1z" }) });

  // packages/icons/build-module/library/unlock.mjs
  var import_primitives112 = __toESM(require_primitives(), 1);
  var import_jsx_runtime114 = __toESM(require_jsx_runtime(), 1);
  var unlock_default = /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_primitives112.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_primitives112.Path, { d: "M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8h1.5c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z" }) });

  // packages/icons/build-module/library/unseen.mjs
  var import_primitives113 = __toESM(require_primitives(), 1);
  var import_jsx_runtime115 = __toESM(require_jsx_runtime(), 1);
  var unseen_default = /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_primitives113.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_primitives113.Path, { d: "M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z" }) });

  // packages/icons/build-module/library/upload.mjs
  var import_primitives114 = __toESM(require_primitives(), 1);
  var import_jsx_runtime116 = __toESM(require_jsx_runtime(), 1);
  var upload_default = /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_primitives114.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_primitives114.Path, { 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" }) });

  // packages/icons/build-module/library/verse.mjs
  var import_primitives115 = __toESM(require_primitives(), 1);
  var import_jsx_runtime117 = __toESM(require_jsx_runtime(), 1);
  var verse_default = /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_primitives115.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_primitives115.Path, { 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" }) });

  // packages/icons/build-module/library/video.mjs
  var import_primitives116 = __toESM(require_primitives(), 1);
  var import_jsx_runtime118 = __toESM(require_jsx_runtime(), 1);
  var video_default = /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_primitives116.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_primitives116.Path, { 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" }) });

  // packages/block-editor/build-module/store/selectors.mjs
  var import_rich_text = __toESM(require_rich_text(), 1);
  var import_deprecated2 = __toESM(require_deprecated(), 1);
  var import_data4 = __toESM(require_data(), 1);

  // packages/block-editor/build-module/store/utils.mjs
  var import_blocks5 = __toESM(require_blocks(), 1);
  var import_block_serialization_default_parser = __toESM(require_block_serialization_default_parser(), 1);

  // packages/block-editor/build-module/store/constants.mjs
  var STORE_NAME = "core/block-editor";

  // packages/block-editor/build-module/store/private-selectors.mjs
  var private_selectors_exports = {};
  __export(private_selectors_exports, {
    getAllPatterns: () => getAllPatterns,
    getBlockRemovalRules: () => getBlockRemovalRules,
    getBlockSettings: () => getBlockSettings,
    getBlockStyles: () => getBlockStyles,
    getBlockWithoutAttributes: () => getBlockWithoutAttributes,
    getClosestAllowedInsertionPoint: () => getClosestAllowedInsertionPoint,
    getClosestAllowedInsertionPointForPattern: () => getClosestAllowedInsertionPointForPattern,
    getContentLockingParent: () => getContentLockingParent,
    getEditedContentOnlySection: () => getEditedContentOnlySection,
    getEnabledBlockParents: () => getEnabledBlockParents,
    getEnabledClientIdsTree: () => getEnabledClientIdsTree,
    getExpandedBlock: () => getExpandedBlock,
    getInserterMediaCategories: () => getInserterMediaCategories,
    getInsertionPoint: () => getInsertionPoint,
    getLastFocus: () => getLastFocus,
    getLastInsertedBlocksClientIds: () => getLastInsertedBlocksClientIds,
    getListViewExpandRevision: () => getListViewExpandRevision,
    getParentSectionBlock: () => getParentSectionBlock,
    getPatternBySlug: () => getPatternBySlug,
    getRegisteredInserterMediaCategories: () => getRegisteredInserterMediaCategories,
    getRemovalPromptData: () => getRemovalPromptData,
    getRequestedInspectorTab: () => getRequestedInspectorTab,
    getReusableBlocks: () => getReusableBlocks,
    getSectionRootClientId: () => getSectionRootClientId,
    getStyleOverrides: () => getStyleOverrides,
    getViewportModalClientIds: () => getViewportModalClientIds,
    getZoomLevel: () => getZoomLevel,
    hasAllowedPatterns: () => hasAllowedPatterns,
    hasBlockSpotlight: () => hasBlockSpotlight2,
    isBlockHiddenAnywhere: () => isBlockHiddenAnywhere,
    isBlockHiddenAtViewport: () => isBlockHiddenAtViewport,
    isBlockHiddenEverywhere: () => isBlockHiddenEverywhere,
    isBlockInterfaceHidden: () => isBlockInterfaceHidden2,
    isBlockParentHiddenAtViewport: () => isBlockParentHiddenAtViewport,
    isBlockParentHiddenEverywhere: () => isBlockParentHiddenEverywhere,
    isBlockSubtreeDisabled: () => isBlockSubtreeDisabled,
    isContainerInsertableToInContentOnlyMode: () => isContainerInsertableToInContentOnlyMode,
    isDragging: () => isDragging2,
    isEditLockedBlock: () => isEditLockedBlock,
    isListViewContentPanelOpen: () => isListViewContentPanelOpen,
    isListViewPanelOpened: () => isListViewPanelOpened,
    isLockedBlock: () => isLockedBlock,
    isMoveLockedBlock: () => isMoveLockedBlock,
    isRemoveLockedBlock: () => isRemoveLockedBlock,
    isSectionBlock: () => isSectionBlock,
    isWithinEditedContentOnlySection: () => isWithinEditedContentOnlySection,
    isZoomOut: () => isZoomOut
  });
  var import_data3 = __toESM(require_data(), 1);
  var import_blocks4 = __toESM(require_blocks(), 1);

  // packages/block-editor/build-module/components/block-visibility/constants.mjs
  var import_i18n2 = __toESM(require_i18n(), 1);
  var BLOCK_VISIBILITY_VIEWPORTS = {
    desktop: {
      label: (0, import_i18n2.__)("Desktop"),
      icon: desktop_default,
      key: "desktop"
    },
    tablet: {
      label: (0, import_i18n2.__)("Tablet"),
      icon: tablet_default,
      key: "tablet"
    },
    mobile: {
      label: (0, import_i18n2.__)("Mobile"),
      icon: mobile_default,
      key: "mobile"
    }
  };
  var BLOCK_VISIBILITY_VIEWPORT_ENTRIES = Object.entries(
    BLOCK_VISIBILITY_VIEWPORTS
  );

  // packages/block-editor/build-module/store/get-block-settings.mjs
  var import_blocks3 = __toESM(require_blocks(), 1);
  var import_hooks = __toESM(require_hooks(), 1);

  // packages/block-editor/build-module/utils/object.mjs
  function setImmutably(object, path, value) {
    path = Array.isArray(path) ? [...path] : [path];
    object = Array.isArray(object) ? [...object] : { ...object };
    const leaf = path.pop();
    let prev = object;
    for (const key of path) {
      const lvl = prev[key];
      prev = prev[key] = Array.isArray(lvl) ? [...lvl] : { ...lvl };
    }
    prev[leaf] = value;
    return object;
  }
  var getValueFromObjectPath = (object, path, defaultValue) => {
    const arrayPath = Array.isArray(path) ? path : path.split(".");
    let value = object;
    arrayPath.forEach((fieldName) => {
      value = value?.[fieldName];
    });
    return value ?? defaultValue;
  };

  // packages/block-editor/build-module/store/get-block-settings.mjs
  var blockedPaths = [
    "color",
    "border",
    "dimensions",
    "typography",
    "spacing"
  ];
  var deprecatedFlags = {
    "color.palette": (settings2) => settings2.colors,
    "color.gradients": (settings2) => settings2.gradients,
    "color.custom": (settings2) => settings2.disableCustomColors === void 0 ? void 0 : !settings2.disableCustomColors,
    "color.customGradient": (settings2) => settings2.disableCustomGradients === void 0 ? void 0 : !settings2.disableCustomGradients,
    "typography.fontSizes": (settings2) => settings2.fontSizes,
    "typography.customFontSize": (settings2) => settings2.disableCustomFontSizes === void 0 ? void 0 : !settings2.disableCustomFontSizes,
    "typography.lineHeight": (settings2) => settings2.enableCustomLineHeight,
    "spacing.units": (settings2) => {
      if (settings2.enableCustomUnits === void 0) {
        return;
      }
      if (settings2.enableCustomUnits === true) {
        return ["px", "em", "rem", "vh", "vw", "%"];
      }
      return settings2.enableCustomUnits;
    },
    "spacing.padding": (settings2) => settings2.enableCustomSpacing
  };
  var prefixedFlags = {
    /*
     * These were only available in the plugin
     * and can be removed when the minimum WordPress version
     * for the plugin is 5.9.
     */
    "border.customColor": "border.color",
    "border.customStyle": "border.style",
    "border.customWidth": "border.width",
    "typography.customFontStyle": "typography.fontStyle",
    "typography.customFontWeight": "typography.fontWeight",
    "typography.customLetterSpacing": "typography.letterSpacing",
    "typography.customTextDecorations": "typography.textDecoration",
    "typography.customTextTransforms": "typography.textTransform",
    /*
     * These were part of WordPress 5.8 and we need to keep them.
     */
    "border.customRadius": "border.radius",
    "spacing.customMargin": "spacing.margin",
    "spacing.customPadding": "spacing.padding",
    "typography.customLineHeight": "typography.lineHeight"
  };
  var removeCustomPrefixes = (path) => {
    return prefixedFlags[path] || path;
  };
  function getBlockSettings(state, clientId, ...paths) {
    const blockName = getBlockName(state, clientId);
    const candidates = [];
    if (clientId) {
      let id = clientId;
      do {
        const name = getBlockName(state, id);
        if ((0, import_blocks3.hasBlockSupport)(name, "__experimentalSettings", false)) {
          candidates.push(id);
        }
      } while (id = state.blocks.parents.get(id));
    }
    return paths.map((path) => {
      if (blockedPaths.includes(path)) {
        console.warn(
          "Top level useSetting paths are disabled. Please use a subpath to query the information needed."
        );
        return void 0;
      }
      let result = (0, import_hooks.applyFilters)(
        "blockEditor.useSetting.before",
        void 0,
        path,
        clientId,
        blockName
      );
      if (void 0 !== result) {
        return result;
      }
      const normalizedPath = removeCustomPrefixes(path);
      for (const candidateClientId of candidates) {
        const candidateAtts = getBlockAttributes(
          state,
          candidateClientId
        );
        result = getValueFromObjectPath(
          candidateAtts.settings?.blocks?.[blockName],
          normalizedPath
        ) ?? getValueFromObjectPath(
          candidateAtts.settings,
          normalizedPath
        );
        if (result !== void 0) {
          break;
        }
      }
      const settings2 = getSettings(state);
      if (result === void 0 && blockName) {
        result = getValueFromObjectPath(
          settings2.__experimentalFeatures?.blocks?.[blockName],
          normalizedPath
        );
      }
      if (result === void 0) {
        result = getValueFromObjectPath(
          settings2.__experimentalFeatures,
          normalizedPath
        );
      }
      if (result !== void 0) {
        if (import_blocks3.__EXPERIMENTAL_PATHS_WITH_OVERRIDE[normalizedPath]) {
          return result.custom ?? result.theme ?? result.default;
        }
        return result;
      }
      const deprecatedSettingsValue = deprecatedFlags[normalizedPath]?.(settings2);
      if (deprecatedSettingsValue !== void 0) {
        return deprecatedSettingsValue;
      }
      return normalizedPath === "typography.dropCap" ? true : void 0;
    });
  }

  // packages/block-editor/build-module/store/private-selectors.mjs
  var { isContentBlock: isContentBlock2 } = unlock(import_blocks4.privateApis);
  function isBlockInterfaceHidden2(state) {
    return state.isBlockInterfaceHidden;
  }
  function getLastInsertedBlocksClientIds(state) {
    return state?.lastBlockInserted?.clientIds;
  }
  function getBlockWithoutAttributes(state, clientId) {
    return state.blocks.byClientId.get(clientId);
  }
  var isBlockSubtreeDisabled = (state, clientId) => {
    const isChildSubtreeDisabled = (childClientId) => {
      return getBlockEditingMode(state, childClientId) === "disabled" && getBlockOrder(state, childClientId).every(
        isChildSubtreeDisabled
      );
    };
    return getBlockOrder(state, clientId).every(isChildSubtreeDisabled);
  };
  function isContainerInsertableToInContentOnlyMode(state, blockName, rootClientId) {
    const isBlockContentBlock = isContentBlock2(blockName);
    const rootBlockName = getBlockName(state, rootClientId);
    const isContainerContentBlock = isContentBlock2(rootBlockName);
    const isRootBlockMain = getSectionRootClientId(state) === rootClientId;
    return isRootBlockMain || isContainerContentBlock && isBlockContentBlock;
  }
  function getEnabledClientIdsTreeUnmemoized(state, rootClientId) {
    const blockOrder = getBlockOrder(state, rootClientId);
    const result = [];
    for (const clientId of blockOrder) {
      const innerBlocks = getEnabledClientIdsTreeUnmemoized(
        state,
        clientId
      );
      if (getBlockEditingMode(state, clientId) !== "disabled") {
        result.push({ clientId, innerBlocks });
      } else {
        result.push(...innerBlocks);
      }
    }
    return result;
  }
  var getEnabledClientIdsTree = (0, import_data3.createRegistrySelector)(
    () => (0, import_data3.createSelector)(getEnabledClientIdsTreeUnmemoized, (state) => [
      state.blocks.order,
      state.derivedBlockEditingModes,
      state.blocks.blockEditingModes
    ])
  );
  var getEnabledBlockParents = (0, import_data3.createSelector)(
    (state, clientId, ascending = false) => {
      return getBlockParents(state, clientId, ascending).filter(
        (parent) => getBlockEditingMode(state, parent) !== "disabled"
      );
    },
    (state) => [
      state.blocks.parents,
      state.blocks.blockEditingModes,
      state.settings.templateLock,
      state.blockListSettings
    ]
  );
  function getRemovalPromptData(state) {
    return state.removalPromptData;
  }
  function getBlockRemovalRules(state) {
    return state.blockRemovalRules;
  }
  var getStyleOverrides = (0, import_data3.createSelector)(
    (state) => {
      const clientIds = getClientIdsWithDescendants(state);
      const clientIdMap = clientIds.reduce((acc, clientId, index) => {
        acc[clientId] = index;
        return acc;
      }, {});
      return [...state.styleOverrides].sort((overrideA, overrideB) => {
        const [, { clientId: clientIdA }] = overrideA;
        const [, { clientId: clientIdB }] = overrideB;
        const aIndex = clientIdMap[clientIdA] ?? -1;
        const bIndex = clientIdMap[clientIdB] ?? -1;
        return aIndex - bIndex;
      });
    },
    (state) => [state.blocks.order, state.styleOverrides]
  );
  function getRegisteredInserterMediaCategories(state) {
    return state.registeredInserterMediaCategories;
  }
  var getInserterMediaCategories = (0, import_data3.createSelector)(
    (state) => {
      const {
        settings: {
          inserterMediaCategories,
          allowedMimeTypes,
          enableOpenverseMediaCategory
        },
        registeredInserterMediaCategories: registeredInserterMediaCategories2
      } = state;
      if (!inserterMediaCategories && !registeredInserterMediaCategories2.length || !allowedMimeTypes) {
        return;
      }
      const coreInserterMediaCategoriesNames = inserterMediaCategories?.map(({ name }) => name) || [];
      const mergedCategories = [
        ...inserterMediaCategories || [],
        ...(registeredInserterMediaCategories2 || []).filter(
          ({ name }) => !coreInserterMediaCategoriesNames.includes(name)
        )
      ];
      return mergedCategories.filter((category) => {
        if (!enableOpenverseMediaCategory && category.name === "openverse") {
          return false;
        }
        return Object.values(allowedMimeTypes).some(
          (mimeType) => mimeType.startsWith(`${category.mediaType}/`)
        );
      });
    },
    (state) => [
      state.settings.inserterMediaCategories,
      state.settings.allowedMimeTypes,
      state.settings.enableOpenverseMediaCategory,
      state.registeredInserterMediaCategories
    ]
  );
  var hasAllowedPatterns = (0, import_data3.createRegistrySelector)(
    (select3) => (0, import_data3.createSelector)(
      (state, rootClientId = null) => {
        const { getAllPatterns: getAllPatterns2 } = unlock(select3(STORE_NAME));
        const patterns = getAllPatterns2();
        const { allowedBlockTypes } = getSettings(state);
        return patterns.some((pattern) => {
          const { inserter = true } = pattern;
          if (!inserter) {
            return false;
          }
          const grammar = getGrammar(pattern);
          return checkAllowListRecursive(grammar, allowedBlockTypes) && grammar.every(
            ({ name: blockName }) => canInsertBlockType(state, blockName, rootClientId)
          );
        });
      },
      (state, rootClientId) => [
        ...getAllPatternsDependants(select3)(state),
        ...getInsertBlockTypeDependants(select3)(state, rootClientId)
      ]
    )
  );
  var getPatternBySlug = (0, import_data3.createRegistrySelector)(
    (select3) => (0, import_data3.createSelector)(
      (state, patternName) => {
        if (patternName?.startsWith("core/block/")) {
          const _id = parseInt(
            patternName.slice("core/block/".length),
            10
          );
          const block = unlock(select3(STORE_NAME)).getReusableBlocks().find(({ id }) => id === _id);
          if (!block) {
            return null;
          }
          return mapUserPattern(
            block,
            state.settings.__experimentalUserPatternCategories
          );
        }
        return [
          // This setting is left for back compat.
          ...state.settings.__experimentalBlockPatterns ?? [],
          ...state.settings[selectBlockPatternsKey]?.(select3) ?? []
        ].find(({ name }) => name === patternName);
      },
      (state, patternName) => patternName?.startsWith("core/block/") ? [
        unlock(select3(STORE_NAME)).getReusableBlocks(),
        state.settings.__experimentalReusableBlocks
      ] : [
        state.settings.__experimentalBlockPatterns,
        state.settings[selectBlockPatternsKey]?.(select3)
      ]
    )
  );
  var getAllPatterns = (0, import_data3.createRegistrySelector)(
    (select3) => (0, import_data3.createSelector)((state) => {
      return [
        ...unlock(select3(STORE_NAME)).getReusableBlocks().map(
          (userPattern) => mapUserPattern(
            userPattern,
            state.settings.__experimentalUserPatternCategories
          )
        ),
        // This setting is left for back compat.
        ...state.settings.__experimentalBlockPatterns ?? [],
        ...state.settings[selectBlockPatternsKey]?.(select3) ?? []
      ].filter(
        (x2, index, arr) => index === arr.findIndex((y2) => x2.name === y2.name)
      );
    }, getAllPatternsDependants(select3))
  );
  var EMPTY_ARRAY = [];
  var getReusableBlocks = (0, import_data3.createRegistrySelector)(
    (select3) => (state) => {
      const reusableBlocksSelect = state.settings[reusableBlocksSelectKey];
      return (reusableBlocksSelect ? reusableBlocksSelect(select3) : state.settings.__experimentalReusableBlocks) ?? EMPTY_ARRAY;
    }
  );
  function getLastFocus(state) {
    return state.lastFocus;
  }
  function isDragging2(state) {
    return state.isDragging;
  }
  function getExpandedBlock(state) {
    return state.expandedBlock;
  }
  var getContentLockingParent = (state, clientId) => {
    let current = clientId;
    let result;
    while (!result && (current = state.blocks.parents.get(current))) {
      if (getTemplateLock(state, current) === "contentOnly") {
        result = current;
      }
    }
    return result;
  };
  function isSectionBlockCandidate(state, clientId) {
    const blockName = getBlockName(state, clientId);
    if (blockName === "core/block") {
      return true;
    }
    const attributes = getBlockAttributes(state, clientId);
    const isTemplatePart9 = blockName === "core/template-part";
    const isIsolatedEditor = state.settings?.[isIsolatedEditorKey];
    const disableContentOnlyForUnsyncedPatterns = state.settings?.disableContentOnlyForUnsyncedPatterns;
    const disableContentOnlyForTemplateParts = state.settings?.disableContentOnlyForTemplateParts;
    if ((!disableContentOnlyForUnsyncedPatterns && attributes?.metadata?.patternName || isTemplatePart9 && !disableContentOnlyForTemplateParts) && !isIsolatedEditor) {
      return true;
    }
    const hasContentOnlyTemplateLock = getTemplateLock(state, clientId) === "contentOnly";
    const rootClientId = getBlockRootClientId(state, clientId);
    const hasRootContentOnlyTemplateLock = getTemplateLock(state, rootClientId) === "contentOnly";
    if (hasContentOnlyTemplateLock && !hasRootContentOnlyTemplateLock) {
      return true;
    }
    return false;
  }
  var getParentSectionBlock = (state, clientId) => {
    if (isWithinEditedContentOnlySection(state, clientId)) {
      return void 0;
    }
    let current = clientId;
    let result;
    while (current = state.blocks.parents.get(current)) {
      if (isSectionBlockCandidate(state, current)) {
        result = current;
      }
    }
    return result;
  };
  function isSectionBlock(state, clientId) {
    if (isWithinEditedContentOnlySection(state, clientId) || getParentSectionBlock(state, clientId)) {
      return false;
    }
    return isSectionBlockCandidate(state, clientId);
  }
  function getEditedContentOnlySection(state) {
    return state.editedContentOnlySection;
  }
  function isWithinEditedContentOnlySection(state, clientId) {
    if (!state.editedContentOnlySection) {
      return false;
    }
    if (state.editedContentOnlySection === clientId) {
      return true;
    }
    let current = clientId;
    while (current = state.blocks.parents.get(current)) {
      if (state.editedContentOnlySection === current) {
        return true;
      }
    }
    return false;
  }
  var getBlockStyles = (0, import_data3.createSelector)(
    (state, clientIds) => clientIds.reduce((styles, clientId) => {
      styles[clientId] = state.blocks.attributes.get(clientId)?.style;
      return styles;
    }, {}),
    (state, clientIds) => [
      ...clientIds.map(
        (clientId) => state.blocks.attributes.get(clientId)?.style
      )
    ]
  );
  function getSectionRootClientId(state) {
    return state.settings?.[sectionRootClientIdKey];
  }
  function isZoomOut(state) {
    return state.zoomLevel === "auto-scaled" || state.zoomLevel < 100;
  }
  function getZoomLevel(state) {
    return state.zoomLevel;
  }
  function getClosestAllowedInsertionPoint(state, name, clientId = "") {
    const blockNames = Array.isArray(name) ? name : [name];
    const areBlockNamesAllowedInClientId = (id) => blockNames.every(
      (currentName) => canInsertBlockType(state, currentName, id)
    );
    if (!clientId) {
      if (areBlockNamesAllowedInClientId(clientId)) {
        return clientId;
      }
      const sectionRootClientId = getSectionRootClientId(state);
      if (sectionRootClientId && areBlockNamesAllowedInClientId(sectionRootClientId)) {
        return sectionRootClientId;
      }
      return null;
    }
    let current = clientId;
    while (current !== null && !areBlockNamesAllowedInClientId(current)) {
      const parentClientId = getBlockRootClientId(state, current);
      current = parentClientId;
    }
    return current;
  }
  function getClosestAllowedInsertionPointForPattern(state, pattern, clientId) {
    const { allowedBlockTypes } = getSettings(state);
    const isAllowed = checkAllowListRecursive(
      getGrammar(pattern),
      allowedBlockTypes
    );
    if (!isAllowed) {
      return null;
    }
    const names = getGrammar(pattern).map(({ blockName: name }) => name);
    return getClosestAllowedInsertionPoint(state, names, clientId);
  }
  function getInsertionPoint(state) {
    return state.insertionPoint;
  }
  var isBlockHiddenAnywhere = (state, clientId) => {
    const blockName = getBlockName(state, clientId);
    if (!(0, import_blocks4.hasBlockSupport)(blockName, "visibility", true)) {
      return false;
    }
    const attributes = state.blocks.attributes.get(clientId);
    const blockVisibility2 = attributes?.metadata?.blockVisibility;
    if (blockVisibility2 === false) {
      return true;
    }
    if (typeof blockVisibility2?.viewport === "object" && blockVisibility2?.viewport !== null) {
      return Object.values(BLOCK_VISIBILITY_VIEWPORTS).some(
        (viewport) => blockVisibility2?.viewport?.[viewport.key] === false
      );
    }
    return false;
  };
  var isBlockHiddenEverywhere = (state, clientId) => {
    const blockName = getBlockName(state, clientId);
    if (!(0, import_blocks4.hasBlockSupport)(blockName, "visibility", true)) {
      return false;
    }
    const attributes = state.blocks.attributes.get(clientId);
    const blockVisibility2 = attributes?.metadata?.blockVisibility;
    if (blockVisibility2 === false) {
      return true;
    }
    return false;
  };
  var isBlockParentHiddenEverywhere = (state, clientId) => {
    const parents = getBlockParents(state, clientId);
    return parents.some(
      (parentId) => isBlockHiddenEverywhere(state, parentId)
    );
  };
  var isBlockHiddenAtViewport = (state, clientId, viewport) => {
    if (isBlockHiddenEverywhere(state, clientId)) {
      return true;
    }
    const attributes = state.blocks.attributes.get(clientId);
    const blockVisibilityViewport = attributes?.metadata?.blockVisibility?.viewport;
    if (typeof blockVisibilityViewport === "object" && blockVisibilityViewport !== null && typeof viewport === "string") {
      return blockVisibilityViewport?.[viewport.toLowerCase()] === false;
    }
    return false;
  };
  var isBlockParentHiddenAtViewport = (state, clientId, viewport) => {
    const parents = getBlockParents(state, clientId);
    return parents.some(
      (parentId) => isBlockHiddenAtViewport(state, parentId, viewport)
    );
  };
  function hasBlockSpotlight2(state) {
    return !!state.hasBlockSpotlight || !!state.editedContentOnlySection;
  }
  function isEditLockedBlock(state, clientId) {
    const attributes = getBlockAttributes(state, clientId);
    return !!attributes?.lock?.edit;
  }
  function isMoveLockedBlock(state, clientId) {
    const attributes = getBlockAttributes(state, clientId);
    if (attributes?.lock?.move !== void 0) {
      return !!attributes?.lock?.move;
    }
    const rootClientId = getBlockRootClientId(state, clientId);
    const templateLock = getTemplateLock(state, rootClientId);
    return templateLock === "all";
  }
  function isRemoveLockedBlock(state, clientId) {
    const attributes = getBlockAttributes(state, clientId);
    if (attributes?.lock?.remove !== void 0) {
      return !!attributes?.lock?.remove;
    }
    const rootClientId = getBlockRootClientId(state, clientId);
    const templateLock = getTemplateLock(state, rootClientId);
    return templateLock === "all" || templateLock === "insert";
  }
  function isLockedBlock(state, clientId) {
    return isEditLockedBlock(state, clientId) || isMoveLockedBlock(state, clientId) || isRemoveLockedBlock(state, clientId);
  }
  function isListViewContentPanelOpen(state) {
    return state.listViewContentPanelOpen;
  }
  function isListViewPanelOpened(state, clientId) {
    if (state.openedListViewPanels?.allOpen) {
      return true;
    }
    return state.openedListViewPanels?.panels?.[clientId] === true;
  }
  function getListViewExpandRevision(state) {
    return state.listViewExpandRevision || 0;
  }
  function getViewportModalClientIds(state) {
    return state.viewportModalClientIds;
  }
  function getRequestedInspectorTab(state) {
    return state.requestedInspectorTab;
  }

  // packages/block-editor/build-module/components/inserter/block-patterns-tab/utils.mjs
  var import_i18n3 = __toESM(require_i18n(), 1);
  var INSERTER_PATTERN_TYPES = {
    user: "user",
    theme: "theme",
    directory: "directory"
  };
  var INSERTER_SYNC_TYPES = {
    full: "fully",
    unsynced: "unsynced"
  };
  var allPatternsCategory = {
    name: "allPatterns",
    label: (0, import_i18n3._x)("All", "patterns")
  };
  var myPatternsCategory = {
    name: "myPatterns",
    label: (0, import_i18n3.__)("My patterns")
  };
  var starterPatternsCategory = {
    name: "core/starter-content",
    label: (0, import_i18n3.__)("Starter content")
  };
  function isPatternFiltered(pattern, sourceFilter, syncFilter) {
    const isUserPattern = pattern.name.startsWith("core/block");
    const isDirectoryPattern = pattern.source === "core" || pattern.source?.startsWith("pattern-directory");
    if (sourceFilter === INSERTER_PATTERN_TYPES.theme && (isUserPattern || isDirectoryPattern)) {
      return true;
    }
    if (sourceFilter === INSERTER_PATTERN_TYPES.directory && (isUserPattern || !isDirectoryPattern)) {
      return true;
    }
    if (sourceFilter === INSERTER_PATTERN_TYPES.user && pattern.type !== INSERTER_PATTERN_TYPES.user) {
      return true;
    }
    if (syncFilter === INSERTER_SYNC_TYPES.full && pattern.syncStatus !== "") {
      return true;
    }
    if (syncFilter === INSERTER_SYNC_TYPES.unsynced && pattern.syncStatus !== "unsynced" && isUserPattern) {
      return true;
    }
    return false;
  }

  // packages/block-editor/build-module/store/utils.mjs
  var isFiltered = /* @__PURE__ */ Symbol("isFiltered");
  var parsedPatternCache = /* @__PURE__ */ new WeakMap();
  var grammarMapCache = /* @__PURE__ */ new WeakMap();
  function mapUserPattern(userPattern, __experimentalUserPatternCategories = []) {
    return {
      name: `core/block/${userPattern.id}`,
      id: userPattern.id,
      type: INSERTER_PATTERN_TYPES.user,
      title: userPattern.title?.raw,
      categories: userPattern.wp_pattern_category?.map((catId) => {
        const category = __experimentalUserPatternCategories.find(
          ({ id }) => id === catId
        );
        return category ? category.slug : catId;
      }),
      content: userPattern.content?.raw,
      syncStatus: userPattern.wp_pattern_sync_status
    };
  }
  function parsePattern(pattern) {
    const blocks2 = (0, import_blocks5.parse)(pattern.content, {
      __unstableSkipMigrationLogs: true
    });
    if (blocks2.length === 1) {
      blocks2[0].attributes = {
        ...blocks2[0].attributes,
        metadata: {
          ...blocks2[0].attributes.metadata || {},
          categories: pattern.categories,
          patternName: pattern.name,
          name: blocks2[0].attributes.metadata?.name || pattern.title
        }
      };
    }
    return {
      ...pattern,
      blocks: blocks2
    };
  }
  function getParsedPattern(pattern) {
    let parsedPattern = parsedPatternCache.get(pattern);
    if (!parsedPattern) {
      parsedPattern = parsePattern(pattern);
      parsedPatternCache.set(pattern, parsedPattern);
    }
    return parsedPattern;
  }
  function getGrammar(pattern) {
    let grammarMap = grammarMapCache.get(pattern);
    if (!grammarMap) {
      grammarMap = (0, import_block_serialization_default_parser.parse)(pattern.content);
      grammarMap = grammarMap.filter((block) => block.blockName !== null);
      grammarMapCache.set(pattern, grammarMap);
    }
    return grammarMap;
  }
  var checkAllowList = (list, item, defaultResult = null) => {
    if (typeof list === "boolean") {
      return list;
    }
    if (Array.isArray(list)) {
      if (list.includes("core/post-content") && item === null) {
        return true;
      }
      return list.includes(item);
    }
    return defaultResult;
  };
  var checkAllowListRecursive = (blocks2, allowedBlockTypes) => {
    if (typeof allowedBlockTypes === "boolean") {
      return allowedBlockTypes;
    }
    const blocksQueue = [...blocks2];
    while (blocksQueue.length > 0) {
      const block = blocksQueue.shift();
      const isAllowed = checkAllowList(
        allowedBlockTypes,
        block.name || block.blockName,
        true
      );
      if (!isAllowed) {
        return false;
      }
      block.innerBlocks?.forEach((innerBlock) => {
        blocksQueue.push(innerBlock);
      });
    }
    return true;
  };
  var getAllPatternsDependants = (select3) => (state) => {
    return [
      state.settings.__experimentalBlockPatterns,
      state.settings.__experimentalUserPatternCategories,
      state.settings.__experimentalReusableBlocks,
      state.settings[selectBlockPatternsKey]?.(select3),
      state.blockPatterns,
      unlock(select3(STORE_NAME)).getReusableBlocks()
    ];
  };
  var getInsertBlockTypeDependants = () => (state, rootClientId) => {
    return [
      state.blockListSettings[rootClientId],
      state.blocks.byClientId.get(rootClientId),
      state.blocks.order.get(rootClientId || ""),
      state.settings.allowedBlockTypes,
      state.settings.templateLock,
      getBlockEditingMode(state, rootClientId),
      getSectionRootClientId(state),
      isSectionBlock(state, rootClientId),
      getParentSectionBlock(state, rootClientId)
    ];
  };

  // packages/block-editor/build-module/utils/sorting.mjs
  var comparator = (field, items, order) => {
    return (a2, b2) => {
      let cmpA, cmpB;
      if (typeof field === "function") {
        cmpA = field(a2);
        cmpB = field(b2);
      } else {
        cmpA = a2[field];
        cmpB = b2[field];
      }
      if (cmpA > cmpB) {
        return order === "asc" ? 1 : -1;
      } else if (cmpB > cmpA) {
        return order === "asc" ? -1 : 1;
      }
      const orderA = items.findIndex((item) => item === a2);
      const orderB = items.findIndex((item) => item === b2);
      if (orderA > orderB) {
        return 1;
      } else if (orderB > orderA) {
        return -1;
      }
      return 0;
    };
  };
  function orderBy(items, field, order = "asc") {
    return items.concat().sort(comparator(field, items, order));
  }

  // packages/block-editor/build-module/store/selectors.mjs
  var { isContentBlock: isContentBlock3 } = unlock(import_blocks6.privateApis);
  var MILLISECONDS_PER_HOUR = 3600 * 1e3;
  var MILLISECONDS_PER_DAY = 24 * 3600 * 1e3;
  var MILLISECONDS_PER_WEEK = 7 * 24 * 3600 * 1e3;
  var EMPTY_ARRAY2 = [];
  var EMPTY_SET = /* @__PURE__ */ new Set();
  var DEFAULT_INSERTER_OPTIONS = {
    [isFiltered]: true
  };
  function getBlockName(state, clientId) {
    const block = state.blocks.byClientId.get(clientId);
    const socialLinkName = "core/social-link";
    if (import_element6.Platform.OS !== "web" && block?.name === socialLinkName) {
      const attributes = state.blocks.attributes.get(clientId);
      const { service } = attributes ?? {};
      return service ? `${socialLinkName}-${service}` : socialLinkName;
    }
    return block ? block.name : null;
  }
  function isBlockValid(state, clientId) {
    const block = state.blocks.byClientId.get(clientId);
    return !!block && block.isValid;
  }
  function getBlockAttributes(state, clientId) {
    const block = state.blocks.byClientId.get(clientId);
    if (!block) {
      return null;
    }
    return state.blocks.attributes.get(clientId);
  }
  function getBlock(state, clientId) {
    if (!state.blocks.byClientId.has(clientId)) {
      return null;
    }
    return state.blocks.tree.get(clientId);
  }
  var __unstableGetBlockWithoutInnerBlocks = (0, import_data4.createSelector)(
    (state, clientId) => {
      const block = state.blocks.byClientId.get(clientId);
      if (!block) {
        return null;
      }
      return {
        ...block,
        attributes: getBlockAttributes(state, clientId)
      };
    },
    (state, clientId) => [
      state.blocks.byClientId.get(clientId),
      state.blocks.attributes.get(clientId)
    ]
  );
  function getBlocks(state, rootClientId) {
    const treeKey = !rootClientId || !areInnerBlocksControlled(state, rootClientId) ? rootClientId || "" : "controlled||" + rootClientId;
    return state.blocks.tree.get(treeKey)?.innerBlocks || EMPTY_ARRAY2;
  }
  var __unstableGetClientIdWithClientIdsTree = (0, import_data4.createSelector)(
    (state, clientId) => {
      (0, import_deprecated2.default)(
        "wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",
        {
          since: "6.3",
          version: "6.5"
        }
      );
      return {
        clientId,
        innerBlocks: __unstableGetClientIdsTree(state, clientId)
      };
    },
    (state) => [state.blocks.order]
  );
  var __unstableGetClientIdsTree = (0, import_data4.createSelector)(
    (state, rootClientId = "") => {
      (0, import_deprecated2.default)(
        "wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",
        {
          since: "6.3",
          version: "6.5"
        }
      );
      return getBlockOrder(state, rootClientId).map(
        (clientId) => __unstableGetClientIdWithClientIdsTree(state, clientId)
      );
    },
    (state) => [state.blocks.order]
  );
  var getClientIdsOfDescendants = (0, import_data4.createSelector)(
    (state, rootIds) => {
      rootIds = Array.isArray(rootIds) ? [...rootIds] : [rootIds];
      const ids = [];
      for (const rootId of rootIds) {
        const order = state.blocks.order.get(rootId);
        if (order) {
          ids.push(...order);
        }
      }
      let index = 0;
      while (index < ids.length) {
        const id = ids[index];
        const order = state.blocks.order.get(id);
        if (order) {
          ids.splice(index + 1, 0, ...order);
        }
        index++;
      }
      return ids;
    },
    (state) => [state.blocks.order]
  );
  var getClientIdsWithDescendants = (state) => getClientIdsOfDescendants(state, "");
  var getGlobalBlockCount = (0, import_data4.createSelector)(
    (state, blockName) => {
      const clientIds = getClientIdsWithDescendants(state);
      if (!blockName) {
        return clientIds.length;
      }
      let count = 0;
      for (const clientId of clientIds) {
        const block = state.blocks.byClientId.get(clientId);
        if (block.name === blockName) {
          count++;
        }
      }
      return count;
    },
    (state) => [state.blocks.order, state.blocks.byClientId]
  );
  var getBlocksByName = (0, import_data4.createSelector)(
    (state, blockName) => {
      if (!blockName) {
        return EMPTY_ARRAY2;
      }
      const blockNames = Array.isArray(blockName) ? blockName : [blockName];
      const clientIds = getClientIdsWithDescendants(state);
      const foundBlocks = clientIds.filter((clientId) => {
        const block = state.blocks.byClientId.get(clientId);
        return blockNames.includes(block.name);
      });
      return foundBlocks.length > 0 ? foundBlocks : EMPTY_ARRAY2;
    },
    (state) => [state.blocks.order, state.blocks.byClientId]
  );
  function __experimentalGetGlobalBlocksByName(state, blockName) {
    (0, import_deprecated2.default)(
      "wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",
      {
        since: "6.5",
        alternative: `wp.data.select( 'core/block-editor' ).getBlocksByName`
      }
    );
    return getBlocksByName(state, blockName);
  }
  var getBlocksByClientId = (0, import_data4.createSelector)(
    (state, clientIds) => (Array.isArray(clientIds) ? clientIds : [clientIds]).map(
      (clientId) => getBlock(state, clientId)
    ),
    (state, clientIds) => (Array.isArray(clientIds) ? clientIds : [clientIds]).map(
      (clientId) => state.blocks.tree.get(clientId)
    )
  );
  var getBlockNamesByClientId = (0, import_data4.createSelector)(
    (state, clientIds) => getBlocksByClientId(state, clientIds).filter(Boolean).map((block) => block.name),
    (state, clientIds) => getBlocksByClientId(state, clientIds)
  );
  function getBlockCount(state, rootClientId) {
    return getBlockOrder(state, rootClientId).length;
  }
  function getSelectionStart(state) {
    return state.selection.selectionStart;
  }
  function getSelectionEnd(state) {
    return state.selection.selectionEnd;
  }
  function getBlockSelectionStart(state) {
    return state.selection.selectionStart.clientId;
  }
  function getBlockSelectionEnd(state) {
    return state.selection.selectionEnd.clientId;
  }
  function getSelectedBlockCount(state) {
    const multiSelectedBlockCount = getMultiSelectedBlockClientIds(state).length;
    if (multiSelectedBlockCount) {
      return multiSelectedBlockCount;
    }
    return state.selection.selectionStart.clientId ? 1 : 0;
  }
  function hasSelectedBlock(state) {
    const { selectionStart, selectionEnd } = state.selection;
    return !!selectionStart.clientId && selectionStart.clientId === selectionEnd.clientId;
  }
  function getSelectedBlockClientId(state) {
    const { selectionStart, selectionEnd } = state.selection;
    const { clientId } = selectionStart;
    if (!clientId || clientId !== selectionEnd.clientId) {
      return null;
    }
    return clientId;
  }
  function getSelectedBlock(state) {
    const clientId = getSelectedBlockClientId(state);
    return clientId ? getBlock(state, clientId) : null;
  }
  function getBlockRootClientId(state, clientId) {
    return state.blocks.parents.get(clientId) ?? null;
  }
  var getBlockParents = (0, import_data4.createSelector)(
    (state, clientId, ascending = false) => {
      const parents = [];
      let current = clientId;
      while (current = state.blocks.parents.get(current)) {
        parents.push(current);
      }
      if (!parents.length) {
        return EMPTY_ARRAY2;
      }
      return ascending ? parents : parents.reverse();
    },
    (state) => [state.blocks.parents]
  );
  var getBlockParentsByBlockName = (0, import_data4.createSelector)(
    (state, clientId, blockName, ascending = false) => {
      const parents = getBlockParents(state, clientId, ascending);
      const hasName = Array.isArray(blockName) ? (name) => blockName.includes(name) : (name) => blockName === name;
      return parents.filter((id) => hasName(getBlockName(state, id)));
    },
    (state) => [state.blocks.parents]
  );
  function getBlockHierarchyRootClientId(state, clientId) {
    let current = clientId;
    let parent;
    do {
      parent = current;
      current = state.blocks.parents.get(current);
    } while (current);
    return parent;
  }
  function getLowestCommonAncestorWithSelectedBlock(state, clientId) {
    const selectedId = getSelectedBlockClientId(state);
    const clientParents = [...getBlockParents(state, clientId), clientId];
    const selectedParents = [
      ...getBlockParents(state, selectedId),
      selectedId
    ];
    let lowestCommonAncestor;
    const maxDepth = Math.min(clientParents.length, selectedParents.length);
    for (let index = 0; index < maxDepth; index++) {
      if (clientParents[index] === selectedParents[index]) {
        lowestCommonAncestor = clientParents[index];
      } else {
        break;
      }
    }
    return lowestCommonAncestor;
  }
  function getAdjacentBlockClientId(state, startClientId, modifier = 1) {
    if (startClientId === void 0) {
      startClientId = getSelectedBlockClientId(state);
    }
    if (startClientId === void 0) {
      if (modifier < 0) {
        startClientId = getFirstMultiSelectedBlockClientId(state);
      } else {
        startClientId = getLastMultiSelectedBlockClientId(state);
      }
    }
    if (!startClientId) {
      return null;
    }
    const rootClientId = getBlockRootClientId(state, startClientId);
    if (rootClientId === null) {
      return null;
    }
    const { order } = state.blocks;
    const orderSet = order.get(rootClientId);
    const index = orderSet.indexOf(startClientId);
    const nextIndex = index + 1 * modifier;
    if (nextIndex < 0) {
      return null;
    }
    if (nextIndex === orderSet.length) {
      return null;
    }
    return orderSet[nextIndex];
  }
  function getPreviousBlockClientId(state, startClientId) {
    return getAdjacentBlockClientId(state, startClientId, -1);
  }
  function getNextBlockClientId(state, startClientId) {
    return getAdjacentBlockClientId(state, startClientId, 1);
  }
  function getSelectedBlocksInitialCaretPosition(state) {
    return state.initialPosition;
  }
  var getSelectedBlockClientIds = (0, import_data4.createSelector)(
    (state) => {
      const { selectionStart, selectionEnd } = state.selection;
      if (!selectionStart.clientId || !selectionEnd.clientId) {
        return EMPTY_ARRAY2;
      }
      if (selectionStart.clientId === selectionEnd.clientId) {
        return [selectionStart.clientId];
      }
      const rootClientId = getBlockRootClientId(
        state,
        selectionStart.clientId
      );
      if (rootClientId === null) {
        return EMPTY_ARRAY2;
      }
      const blockOrder = getBlockOrder(state, rootClientId);
      const startIndex = blockOrder.indexOf(selectionStart.clientId);
      const endIndex = blockOrder.indexOf(selectionEnd.clientId);
      if (startIndex > endIndex) {
        return blockOrder.slice(endIndex, startIndex + 1);
      }
      return blockOrder.slice(startIndex, endIndex + 1);
    },
    (state) => [
      state.blocks.order,
      state.selection.selectionStart.clientId,
      state.selection.selectionEnd.clientId
    ]
  );
  function getMultiSelectedBlockClientIds(state) {
    const { selectionStart, selectionEnd } = state.selection;
    if (selectionStart.clientId === selectionEnd.clientId) {
      return EMPTY_ARRAY2;
    }
    return getSelectedBlockClientIds(state);
  }
  var getMultiSelectedBlocks = (0, import_data4.createSelector)(
    (state) => {
      const multiSelectedBlockClientIds = getMultiSelectedBlockClientIds(state);
      if (!multiSelectedBlockClientIds.length) {
        return EMPTY_ARRAY2;
      }
      return multiSelectedBlockClientIds.map(
        (clientId) => getBlock(state, clientId)
      );
    },
    (state) => [
      ...getSelectedBlockClientIds.getDependants(state),
      state.blocks.byClientId,
      state.blocks.order,
      state.blocks.attributes
    ]
  );
  function getFirstMultiSelectedBlockClientId(state) {
    return getMultiSelectedBlockClientIds(state)[0] || null;
  }
  function getLastMultiSelectedBlockClientId(state) {
    const selectedClientIds = getMultiSelectedBlockClientIds(state);
    return selectedClientIds[selectedClientIds.length - 1] || null;
  }
  function isFirstMultiSelectedBlock(state, clientId) {
    return getFirstMultiSelectedBlockClientId(state) === clientId;
  }
  function isBlockMultiSelected(state, clientId) {
    return getMultiSelectedBlockClientIds(state).indexOf(clientId) !== -1;
  }
  var isAncestorMultiSelected = (0, import_data4.createSelector)(
    (state, clientId) => {
      let ancestorClientId = clientId;
      let isMultiSelected = false;
      while (ancestorClientId && !isMultiSelected) {
        ancestorClientId = getBlockRootClientId(state, ancestorClientId);
        isMultiSelected = isBlockMultiSelected(state, ancestorClientId);
      }
      return isMultiSelected;
    },
    (state) => [
      state.blocks.order,
      state.selection.selectionStart.clientId,
      state.selection.selectionEnd.clientId
    ]
  );
  function getMultiSelectedBlocksStartClientId(state) {
    const { selectionStart, selectionEnd } = state.selection;
    if (selectionStart.clientId === selectionEnd.clientId) {
      return null;
    }
    return selectionStart.clientId || null;
  }
  function getMultiSelectedBlocksEndClientId(state) {
    const { selectionStart, selectionEnd } = state.selection;
    if (selectionStart.clientId === selectionEnd.clientId) {
      return null;
    }
    return selectionEnd.clientId || null;
  }
  function __unstableIsFullySelected(state) {
    const selectionAnchor = getSelectionStart(state);
    const selectionFocus = getSelectionEnd(state);
    return !selectionAnchor.attributeKey && !selectionFocus.attributeKey && typeof selectionAnchor.offset === "undefined" && typeof selectionFocus.offset === "undefined";
  }
  function __unstableIsSelectionCollapsed(state) {
    const selectionAnchor = getSelectionStart(state);
    const selectionFocus = getSelectionEnd(state);
    return !!selectionAnchor && !!selectionFocus && selectionAnchor.clientId === selectionFocus.clientId && selectionAnchor.attributeKey === selectionFocus.attributeKey && selectionAnchor.offset === selectionFocus.offset;
  }
  function __unstableSelectionHasUnmergeableBlock(state) {
    return getSelectedBlockClientIds(state).some((clientId) => {
      const blockName = getBlockName(state, clientId);
      const blockType = (0, import_blocks6.getBlockType)(blockName);
      return !blockType.merge;
    });
  }
  function __unstableIsSelectionMergeable(state, isForward) {
    const selectionAnchor = getSelectionStart(state);
    const selectionFocus = getSelectionEnd(state);
    if (selectionAnchor.clientId === selectionFocus.clientId) {
      return false;
    }
    if (!selectionAnchor.attributeKey || !selectionFocus.attributeKey || typeof selectionAnchor.offset === "undefined" || typeof selectionFocus.offset === "undefined") {
      return false;
    }
    const anchorRootClientId = getBlockRootClientId(
      state,
      selectionAnchor.clientId
    );
    const focusRootClientId = getBlockRootClientId(
      state,
      selectionFocus.clientId
    );
    if (anchorRootClientId !== focusRootClientId) {
      return false;
    }
    const blockOrder = getBlockOrder(state, anchorRootClientId);
    const anchorIndex = blockOrder.indexOf(selectionAnchor.clientId);
    const focusIndex = blockOrder.indexOf(selectionFocus.clientId);
    let selectionStart, selectionEnd;
    if (anchorIndex > focusIndex) {
      selectionStart = selectionFocus;
      selectionEnd = selectionAnchor;
    } else {
      selectionStart = selectionAnchor;
      selectionEnd = selectionFocus;
    }
    const targetBlockClientId = isForward ? selectionEnd.clientId : selectionStart.clientId;
    const blockToMergeClientId = isForward ? selectionStart.clientId : selectionEnd.clientId;
    const targetBlockName = getBlockName(state, targetBlockClientId);
    const targetBlockType = (0, import_blocks6.getBlockType)(targetBlockName);
    if (!targetBlockType.merge) {
      return false;
    }
    const blockToMerge = getBlock(state, blockToMergeClientId);
    if (blockToMerge.name === targetBlockName) {
      return true;
    }
    const blocksToMerge = (0, import_blocks6.switchToBlockType)(blockToMerge, targetBlockName);
    return blocksToMerge && blocksToMerge.length;
  }
  var __unstableGetSelectedBlocksWithPartialSelection = (state) => {
    const selectionAnchor = getSelectionStart(state);
    const selectionFocus = getSelectionEnd(state);
    if (selectionAnchor.clientId === selectionFocus.clientId) {
      return EMPTY_ARRAY2;
    }
    if (!selectionAnchor.attributeKey || !selectionFocus.attributeKey || typeof selectionAnchor.offset === "undefined" || typeof selectionFocus.offset === "undefined") {
      return EMPTY_ARRAY2;
    }
    const anchorRootClientId = getBlockRootClientId(
      state,
      selectionAnchor.clientId
    );
    const focusRootClientId = getBlockRootClientId(
      state,
      selectionFocus.clientId
    );
    if (anchorRootClientId !== focusRootClientId) {
      return EMPTY_ARRAY2;
    }
    const blockOrder = getBlockOrder(state, anchorRootClientId);
    const anchorIndex = blockOrder.indexOf(selectionAnchor.clientId);
    const focusIndex = blockOrder.indexOf(selectionFocus.clientId);
    const [selectionStart, selectionEnd] = anchorIndex > focusIndex ? [selectionFocus, selectionAnchor] : [selectionAnchor, selectionFocus];
    const blockA = getBlock(state, selectionStart.clientId);
    const blockB = getBlock(state, selectionEnd.clientId);
    const htmlA = blockA.attributes[selectionStart.attributeKey];
    const htmlB = blockB.attributes[selectionEnd.attributeKey];
    let valueA = (0, import_rich_text.create)({ html: htmlA });
    let valueB = (0, import_rich_text.create)({ html: htmlB });
    valueA = (0, import_rich_text.remove)(valueA, 0, selectionStart.offset);
    valueB = (0, import_rich_text.remove)(valueB, selectionEnd.offset, valueB.text.length);
    return [
      {
        ...blockA,
        attributes: {
          ...blockA.attributes,
          [selectionStart.attributeKey]: (0, import_rich_text.toHTMLString)({
            value: valueA
          })
        }
      },
      {
        ...blockB,
        attributes: {
          ...blockB.attributes,
          [selectionEnd.attributeKey]: (0, import_rich_text.toHTMLString)({
            value: valueB
          })
        }
      }
    ];
  };
  function getBlockOrder(state, rootClientId) {
    return state.blocks.order.get(rootClientId || "") || EMPTY_ARRAY2;
  }
  function getBlockIndex(state, clientId) {
    const rootClientId = getBlockRootClientId(state, clientId);
    return getBlockOrder(state, rootClientId).indexOf(clientId);
  }
  function isBlockSelected(state, clientId) {
    const { selectionStart, selectionEnd } = state.selection;
    if (selectionStart.clientId !== selectionEnd.clientId) {
      return false;
    }
    return selectionStart.clientId === clientId;
  }
  function hasSelectedInnerBlock(state, clientId, deep = false) {
    const selectedBlockClientIds = getSelectedBlockClientIds(state);
    if (!selectedBlockClientIds.length) {
      return false;
    }
    if (deep) {
      return selectedBlockClientIds.some(
        (id) => (
          // Pass true because we don't care about order and it's more
          // performant.
          getBlockParents(state, id, true).includes(clientId)
        )
      );
    }
    return selectedBlockClientIds.some(
      (id) => getBlockRootClientId(state, id) === clientId
    );
  }
  function hasDraggedInnerBlock(state, clientId, deep = false) {
    return getBlockOrder(state, clientId).some(
      (innerClientId) => isBlockBeingDragged(state, innerClientId) || deep && hasDraggedInnerBlock(state, innerClientId, deep)
    );
  }
  function isBlockWithinSelection(state, clientId) {
    if (!clientId) {
      return false;
    }
    const clientIds = getMultiSelectedBlockClientIds(state);
    const index = clientIds.indexOf(clientId);
    return index > -1 && index < clientIds.length - 1;
  }
  function hasMultiSelection(state) {
    const { selectionStart, selectionEnd } = state.selection;
    return selectionStart.clientId !== selectionEnd.clientId;
  }
  function isMultiSelecting2(state) {
    return state.isMultiSelecting;
  }
  function isSelectionEnabled2(state) {
    return state.isSelectionEnabled;
  }
  function getBlockMode(state, clientId) {
    return state.blocksMode[clientId] || "visual";
  }
  function isTyping2(state) {
    return state.isTyping;
  }
  function isDraggingBlocks(state) {
    return !!state.draggedBlocks.length;
  }
  function getDraggedBlockClientIds(state) {
    return state.draggedBlocks;
  }
  function isBlockBeingDragged(state, clientId) {
    return state.draggedBlocks.includes(clientId);
  }
  function isAncestorBeingDragged(state, clientId) {
    if (!isDraggingBlocks(state)) {
      return false;
    }
    const parents = getBlockParents(state, clientId);
    return parents.some(
      (parentClientId) => isBlockBeingDragged(state, parentClientId)
    );
  }
  function isCaretWithinFormattedText() {
    (0, import_deprecated2.default)(
      'wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',
      {
        since: "6.1",
        version: "6.3"
      }
    );
    return false;
  }
  var getBlockInsertionPoint = (0, import_data4.createSelector)(
    (state) => {
      let rootClientId, index;
      const {
        insertionCue: insertionCue2,
        selection: { selectionEnd }
      } = state;
      if (insertionCue2 !== null) {
        return insertionCue2;
      }
      const { clientId } = selectionEnd;
      if (clientId) {
        rootClientId = getBlockRootClientId(state, clientId) || void 0;
        index = getBlockIndex(state, selectionEnd.clientId) + 1;
      } else {
        index = getBlockOrder(state).length;
      }
      return { rootClientId, index };
    },
    (state) => [
      state.insertionCue,
      state.selection.selectionEnd.clientId,
      state.blocks.parents,
      state.blocks.order
    ]
  );
  function isBlockInsertionPointVisible(state) {
    return state.insertionCue !== null;
  }
  function isValidTemplate(state) {
    return state.template.isValid;
  }
  function getTemplate(state) {
    return state.settings.template;
  }
  function getTemplateLock(state, rootClientId) {
    if (!rootClientId) {
      return state.settings.templateLock ?? false;
    }
    const blockListTemplateLock = getBlockListSettings(
      state,
      rootClientId
    )?.templateLock;
    if (blockListTemplateLock === "contentOnly" && state.editedContentOnlySection === rootClientId) {
      return false;
    }
    return blockListTemplateLock ?? false;
  }
  var isBlockVisibleInTheInserter = (state, blockNameOrType, rootClientId = null) => {
    let blockType;
    let blockName;
    if (blockNameOrType && "object" === typeof blockNameOrType) {
      blockType = blockNameOrType;
      blockName = blockNameOrType.name;
    } else {
      blockType = (0, import_blocks6.getBlockType)(blockNameOrType);
      blockName = blockNameOrType;
    }
    if (!blockType) {
      return false;
    }
    const { allowedBlockTypes } = getSettings(state);
    const isBlockAllowedInEditor = checkAllowList(
      allowedBlockTypes,
      blockName,
      true
    );
    if (!isBlockAllowedInEditor) {
      return false;
    }
    const parents = (Array.isArray(blockType.parent) ? blockType.parent : []).concat(Array.isArray(blockType.ancestor) ? blockType.ancestor : []);
    if (parents.length > 0) {
      if (parents.includes("core/post-content")) {
        return true;
      }
      let current = rootClientId;
      let hasParent = false;
      do {
        if (parents.includes(getBlockName(state, current))) {
          hasParent = true;
          break;
        }
        current = state.blocks.parents.get(current);
      } while (current);
      return hasParent;
    }
    return true;
  };
  var canInsertBlockTypeUnmemoized = (state, blockName, rootClientId = null) => {
    if (state.settings.isPreviewMode) {
      return false;
    }
    if (!isBlockVisibleInTheInserter(state, blockName, rootClientId)) {
      return false;
    }
    let blockType;
    if (blockName && "object" === typeof blockName) {
      blockType = blockName;
      blockName = blockType.name;
    } else {
      blockType = (0, import_blocks6.getBlockType)(blockName);
    }
    const rootTemplateLock = getTemplateLock(state, rootClientId);
    if (rootTemplateLock && rootTemplateLock !== "contentOnly") {
      return false;
    }
    const blockEditingMode = getBlockEditingMode(state, rootClientId ?? "");
    const isParentSectionBlock = !!isSectionBlock(state, rootClientId);
    const sectionClientId = isParentSectionBlock ? rootClientId : getParentSectionBlock(state, rootClientId);
    const isWithinSection = !!sectionClientId;
    if (blockEditingMode === "disabled" && (!isWithinSection || blockName !== (0, import_blocks6.getDefaultBlockName)())) {
      return false;
    }
    const parentBlockListSettings = getBlockListSettings(state, rootClientId);
    if (rootClientId && parentBlockListSettings === void 0) {
      return false;
    }
    const isContentRoleBlock = isContentBlock3(blockName);
    if (isWithinSection && !isContentRoleBlock) {
      return false;
    }
    if (isWithinSection && getBlockName(state, sectionClientId) === "core/block") {
      return false;
    }
    if (isWithinSection && (isParentSectionBlock || blockEditingMode === "contentOnly" || blockEditingMode === "disabled") && !isContainerInsertableToInContentOnlyMode(
      state,
      blockName,
      rootClientId
    )) {
      const defaultBlockName = (0, import_blocks6.getDefaultBlockName)();
      if (blockName === defaultBlockName) {
        const existingBlocks = getBlockOrder(state, rootClientId);
        const hasDefaultBlock = existingBlocks.some(
          (clientId) => getBlockName(state, clientId) === defaultBlockName
        );
        if (!hasDefaultBlock) {
          return false;
        }
      } else {
        return false;
      }
    }
    const parentName = getBlockName(state, rootClientId);
    const parentBlockType = (0, import_blocks6.getBlockType)(parentName);
    const parentAllowedChildBlocks = parentBlockType?.allowedBlocks;
    let hasParentAllowedBlock = checkAllowList(
      parentAllowedChildBlocks,
      blockName
    );
    if (hasParentAllowedBlock !== false) {
      const parentAllowedBlocks = parentBlockListSettings?.allowedBlocks;
      const hasParentListAllowedBlock = checkAllowList(
        parentAllowedBlocks,
        blockName
      );
      if (hasParentListAllowedBlock !== null) {
        hasParentAllowedBlock = hasParentListAllowedBlock;
      }
    }
    const blockAllowedParentBlocks = blockType.parent;
    const hasBlockAllowedParent = checkAllowList(
      blockAllowedParentBlocks,
      parentName
    );
    let hasBlockAllowedAncestor = true;
    const blockAllowedAncestorBlocks = blockType.ancestor;
    if (blockAllowedAncestorBlocks) {
      const ancestors = [
        rootClientId,
        ...getBlockParents(state, rootClientId)
      ];
      hasBlockAllowedAncestor = ancestors.some(
        (ancestorClientId) => checkAllowList(
          blockAllowedAncestorBlocks,
          getBlockName(state, ancestorClientId)
        )
      );
    }
    const canInsert = hasBlockAllowedAncestor && (hasParentAllowedBlock === null && hasBlockAllowedParent === null || hasParentAllowedBlock === true || hasBlockAllowedParent === true);
    if (!canInsert) {
      return canInsert;
    }
    return (0, import_hooks2.applyFilters)(
      "blockEditor.__unstableCanInsertBlockType",
      canInsert,
      blockType,
      rootClientId,
      {
        // Pass bound selectors of the current registry. If we're in a nested
        // context, the data will differ from the one selected from the root
        // registry.
        getBlock: getBlock.bind(null, state),
        getBlockParentsByBlockName: getBlockParentsByBlockName.bind(
          null,
          state
        )
      }
    );
  };
  var canInsertBlockType = (0, import_data4.createRegistrySelector)(
    (select3) => (0, import_data4.createSelector)(
      canInsertBlockTypeUnmemoized,
      (state, blockName, rootClientId) => getInsertBlockTypeDependants(select3)(state, rootClientId)
    )
  );
  function canInsertBlocks(state, clientIds, rootClientId = null) {
    return clientIds.every(
      (id) => canInsertBlockType(state, getBlockName(state, id), rootClientId)
    );
  }
  function canRemoveBlock(state, clientId) {
    if (state.settings.isPreviewMode) {
      return false;
    }
    const attributes = getBlockAttributes(state, clientId);
    if (attributes === null) {
      return true;
    }
    if (attributes.lock?.remove !== void 0) {
      return !attributes.lock.remove;
    }
    const rootClientId = getBlockRootClientId(state, clientId);
    const rootTemplateLock = getTemplateLock(state, rootClientId);
    if (rootTemplateLock && rootTemplateLock !== "contentOnly") {
      return false;
    }
    const isParentSectionBlock = !!isSectionBlock(state, rootClientId);
    const sectionClientId = isParentSectionBlock ? rootClientId : getParentSectionBlock(state, rootClientId);
    const isWithinSection = !!sectionClientId;
    const isContentRoleBlock = isContentBlock3(
      getBlockName(state, clientId)
    );
    if (isWithinSection && !isContentRoleBlock) {
      return false;
    }
    if (isWithinSection && getBlockName(state, sectionClientId) === "core/block") {
      return false;
    }
    const rootBlockEditingMode = getBlockEditingMode(state, rootClientId);
    const blockName = getBlockName(state, clientId);
    const defaultBlockName = (0, import_blocks6.getDefaultBlockName)();
    if (isWithinSection && (isParentSectionBlock || blockName === defaultBlockName || rootBlockEditingMode === "contentOnly") && !isContainerInsertableToInContentOnlyMode(
      state,
      getBlockName(state, clientId),
      rootClientId
    )) {
      if (blockName === defaultBlockName) {
        const existingBlocks = getBlockOrder(state, rootClientId);
        const defaultBlocks = existingBlocks.filter(
          (id) => getBlockName(state, id) === defaultBlockName
        );
        if (defaultBlocks.length > 1) {
          return true;
        }
        return false;
      }
      return false;
    }
    return rootBlockEditingMode !== "disabled";
  }
  function canRemoveBlocks(state, clientIds) {
    return clientIds.every((clientId) => canRemoveBlock(state, clientId));
  }
  function canMoveBlock(state, clientId) {
    if (state.settings.isPreviewMode) {
      return false;
    }
    const attributes = getBlockAttributes(state, clientId);
    if (attributes === null) {
      return true;
    }
    if (attributes.lock?.move !== void 0) {
      return !attributes.lock.move;
    }
    const rootClientId = getBlockRootClientId(state, clientId);
    const rootTemplateLock = getTemplateLock(state, rootClientId);
    if (rootTemplateLock === "all") {
      return false;
    }
    const isBlockWithinSection = !!getParentSectionBlock(state, clientId);
    const isContentRoleBlock = isContentBlock3(
      getBlockName(state, clientId)
    );
    if (isBlockWithinSection && !isContentRoleBlock) {
      return false;
    }
    const isParentSectionBlock = !!isSectionBlock(state, rootClientId);
    const rootBlockEditingMode = getBlockEditingMode(state, rootClientId);
    if (isBlockWithinSection && (isParentSectionBlock || rootBlockEditingMode === "contentOnly") && !isContainerInsertableToInContentOnlyMode(
      state,
      getBlockName(state, clientId),
      rootClientId
    )) {
      return false;
    }
    return getBlockEditingMode(state, rootClientId) !== "disabled";
  }
  function canMoveBlocks(state, clientIds) {
    return clientIds.every((clientId) => canMoveBlock(state, clientId));
  }
  function canEditBlock(state, clientId) {
    if (state.settings.isPreviewMode) {
      return false;
    }
    const attributes = getBlockAttributes(state, clientId);
    if (attributes === null) {
      return true;
    }
    const { lock: lock3 } = attributes;
    return !lock3?.edit;
  }
  function canLockBlockType(state, nameOrType) {
    if (state.settings.isPreviewMode) {
      return false;
    }
    if (!(0, import_blocks6.hasBlockSupport)(nameOrType, "lock", true)) {
      return false;
    }
    return !!state.settings?.canLockBlocks;
  }
  function getInsertUsage(state, id) {
    return state.preferences.insertUsage?.[id] ?? null;
  }
  var canIncludeBlockTypeInInserter = (state, blockType, rootClientId) => {
    if (!(0, import_blocks6.hasBlockSupport)(blockType, "inserter", true)) {
      return false;
    }
    return canInsertBlockTypeUnmemoized(state, blockType.name, rootClientId);
  };
  var getItemFromVariation = (state, item) => (variation) => {
    const variationId = `${item.id}/${variation.name}`;
    const { time, count = 0 } = getInsertUsage(state, variationId) || {};
    return {
      ...item,
      id: variationId,
      icon: variation.icon || item.icon,
      title: variation.title || item.title,
      description: variation.description || item.description,
      category: variation.category || item.category,
      // If `example` is explicitly undefined for the variation, the preview will not be shown.
      example: variation.hasOwnProperty("example") ? variation.example : item.example,
      initialAttributes: {
        ...item.initialAttributes,
        ...variation.attributes
      },
      innerBlocks: variation.innerBlocks,
      keywords: variation.keywords || item.keywords,
      frecency: calculateFrecency(time, count),
      // Pass through search-only flag for block-scope variations.
      isSearchOnly: variation.isSearchOnly
    };
  };
  var calculateFrecency = (time, count) => {
    if (!time) {
      return count;
    }
    const duration = Date.now() - time;
    switch (true) {
      case duration < MILLISECONDS_PER_HOUR:
        return count * 4;
      case duration < MILLISECONDS_PER_DAY:
        return count * 2;
      case duration < MILLISECONDS_PER_WEEK:
        return count / 2;
      default:
        return count / 4;
    }
  };
  var buildBlockTypeItem = (state, { buildScope = "inserter" }) => (blockType) => {
    const id = blockType.name;
    let isDisabled = false;
    if (!(0, import_blocks6.hasBlockSupport)(blockType.name, "multiple", true)) {
      isDisabled = getBlocksByClientId(
        state,
        getClientIdsWithDescendants(state)
      ).some(({ name }) => name === blockType.name);
    }
    const { time, count = 0 } = getInsertUsage(state, id) || {};
    const blockItemBase = {
      id,
      name: blockType.name,
      title: blockType.title,
      icon: blockType.icon,
      isDisabled,
      frecency: calculateFrecency(time, count)
    };
    if (buildScope === "transform") {
      return blockItemBase;
    }
    const inserterVariations = (0, import_blocks6.getBlockVariations)(
      blockType.name,
      "inserter"
    );
    const blockVariations = (0, import_blocks6.getBlockVariations)(blockType.name, "block");
    const allVariations = [
      ...inserterVariations,
      // Built-in heading level variations have block scope but allow
      // insertion via slash inserter.
      // See https://github.com/WordPress/gutenberg/issues/74233.
      ...blockVariations.filter(
        (variation) => blockType.name === "core/heading" && ["h1", "h2", "h3", "h4", "h5", "h6"].includes(
          variation.name
        )
      ).map((variation) => ({
        ...variation,
        isSearchOnly: true
      }))
    ];
    return {
      ...blockItemBase,
      initialAttributes: {},
      description: blockType.description,
      category: blockType.category,
      keywords: blockType.keywords,
      parent: blockType.parent,
      ancestor: blockType.ancestor,
      variations: allVariations,
      example: blockType.example,
      utility: 1
      // Deprecated.
    };
  };
  var getInserterItems = (0, import_data4.createRegistrySelector)(
    (select3) => (0, import_data4.createSelector)(
      (state, rootClientId = null, options = DEFAULT_INSERTER_OPTIONS) => {
        const buildReusableBlockInserterItem = (reusableBlock) => {
          const icon = !reusableBlock.wp_pattern_sync_status ? {
            src: symbol_default,
            foreground: "var(--wp-block-synced-color)"
          } : symbol_default;
          const userPattern = mapUserPattern(reusableBlock);
          const { time, count = 0 } = getInsertUsage(state, userPattern.name) || {};
          const frecency = calculateFrecency(time, count);
          return {
            id: userPattern.name,
            name: "core/block",
            initialAttributes: { ref: reusableBlock.id },
            title: userPattern.title,
            icon,
            category: "reusable",
            keywords: ["reusable"],
            isDisabled: false,
            utility: 1,
            // Deprecated.
            frecency,
            content: userPattern.content,
            get blocks() {
              return getParsedPattern(userPattern).blocks;
            },
            syncStatus: userPattern.syncStatus
          };
        };
        const patternInserterItems = canInsertBlockTypeUnmemoized(
          state,
          "core/block",
          rootClientId
        ) ? unlock(select3(STORE_NAME)).getReusableBlocks().map(buildReusableBlockInserterItem) : [];
        const buildBlockTypeInserterItem = buildBlockTypeItem(state, {
          buildScope: "inserter"
        });
        let blockTypeInserterItems = (0, import_blocks6.getBlockTypes)().filter(
          (blockType) => (0, import_blocks6.hasBlockSupport)(blockType, "inserter", true)
        ).map(buildBlockTypeInserterItem);
        if (options[isFiltered] !== false) {
          blockTypeInserterItems = blockTypeInserterItems.filter(
            (blockType) => canIncludeBlockTypeInInserter(
              state,
              blockType,
              rootClientId
            )
          );
        } else {
          const { getClosestAllowedInsertionPoint: getClosestAllowedInsertionPoint2 } = unlock(
            select3(STORE_NAME)
          );
          blockTypeInserterItems = blockTypeInserterItems.filter(
            (blockType) => isBlockVisibleInTheInserter(
              state,
              blockType,
              rootClientId
            ) && getClosestAllowedInsertionPoint2(
              blockType.name,
              rootClientId
            ) !== null
          ).map((blockType) => ({
            ...blockType,
            isAllowedInCurrentRoot: canIncludeBlockTypeInInserter(
              state,
              blockType,
              rootClientId
            )
          }));
        }
        const items = blockTypeInserterItems.reduce(
          (accumulator, item) => {
            const { variations = [] } = item;
            if (!variations.some(({ isDefault }) => isDefault)) {
              accumulator.push(item);
            }
            if (variations.length) {
              const variationMapper = getItemFromVariation(
                state,
                item
              );
              accumulator.push(
                ...variations.map(variationMapper)
              );
            }
            return accumulator;
          },
          []
        );
        const groupByType = (blocks2, block) => {
          const { core, noncore } = blocks2;
          const type = block.name.startsWith("core/") ? core : noncore;
          type.push(block);
          return blocks2;
        };
        const { core: coreItems, noncore: nonCoreItems } = items.reduce(
          groupByType,
          { core: [], noncore: [] }
        );
        const sortedBlockTypes = [...coreItems, ...nonCoreItems];
        return [...sortedBlockTypes, ...patternInserterItems];
      },
      (state, rootClientId) => [
        (0, import_blocks6.getBlockTypes)(),
        unlock(select3(STORE_NAME)).getReusableBlocks(),
        state.blocks.order,
        state.preferences.insertUsage,
        ...getInsertBlockTypeDependants(select3)(state, rootClientId)
      ]
    )
  );
  var getBlockTransformItems = (0, import_data4.createRegistrySelector)(
    (select3) => (0, import_data4.createSelector)(
      (state, blocks2, rootClientId = null) => {
        const normalizedBlocks = Array.isArray(blocks2) ? blocks2 : [blocks2];
        const buildBlockTypeTransformItem = buildBlockTypeItem(state, {
          buildScope: "transform"
        });
        const blockTypeTransformItems = (0, import_blocks6.getBlockTypes)().filter(
          (blockType) => canIncludeBlockTypeInInserter(
            state,
            blockType,
            rootClientId
          )
        ).map(buildBlockTypeTransformItem);
        const itemsByName = Object.fromEntries(
          Object.entries(blockTypeTransformItems).map(
            ([, value]) => [value.name, value]
          )
        );
        const possibleTransforms = (0, import_blocks6.getPossibleBlockTransformations)(
          normalizedBlocks
        ).reduce((accumulator, block) => {
          if (itemsByName[block?.name]) {
            accumulator.push(itemsByName[block.name]);
          }
          return accumulator;
        }, []);
        return orderBy(
          possibleTransforms,
          (block) => itemsByName[block.name].frecency,
          "desc"
        );
      },
      (state, blocks2, rootClientId) => [
        (0, import_blocks6.getBlockTypes)(),
        state.preferences.insertUsage,
        ...getInsertBlockTypeDependants(select3)(state, rootClientId)
      ]
    )
  );
  var hasInserterItems = (state, rootClientId = null) => {
    const hasBlockType = (0, import_blocks6.getBlockTypes)().some(
      (blockType) => canIncludeBlockTypeInInserter(state, blockType, rootClientId)
    );
    if (hasBlockType) {
      return true;
    }
    const hasReusableBlock = canInsertBlockTypeUnmemoized(
      state,
      "core/block",
      rootClientId
    );
    return hasReusableBlock;
  };
  var getAllowedBlocks = (0, import_data4.createRegistrySelector)(
    (select3) => (0, import_data4.createSelector)(
      (state, rootClientId = null) => {
        if (!rootClientId) {
          return;
        }
        const blockTypes = (0, import_blocks6.getBlockTypes)().filter(
          (blockType) => canIncludeBlockTypeInInserter(state, blockType, rootClientId)
        );
        const hasReusableBlock = canInsertBlockTypeUnmemoized(
          state,
          "core/block",
          rootClientId
        );
        if (hasReusableBlock) {
          blockTypes.push("core/block");
        }
        return blockTypes;
      },
      (state, rootClientId) => [
        (0, import_blocks6.getBlockTypes)(),
        ...getInsertBlockTypeDependants(select3)(state, rootClientId)
      ]
    )
  );
  var __experimentalGetAllowedBlocks = (0, import_data4.createSelector)(
    (state, rootClientId = null) => {
      (0, import_deprecated2.default)(
        'wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',
        {
          alternative: 'wp.data.select( "core/block-editor" ).getAllowedBlocks',
          since: "6.2",
          version: "6.4"
        }
      );
      return getAllowedBlocks(state, rootClientId);
    },
    (state, rootClientId) => getAllowedBlocks.getDependants(state, rootClientId)
  );
  function getDirectInsertBlock(state, rootClientId = null) {
    if (!rootClientId) {
      return;
    }
    const { defaultBlock, directInsert } = state.blockListSettings[rootClientId] ?? {};
    if (!defaultBlock || !directInsert) {
      return;
    }
    return defaultBlock;
  }
  function __experimentalGetDirectInsertBlock(state, rootClientId = null) {
    (0, import_deprecated2.default)(
      'wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock',
      {
        alternative: 'wp.data.select( "core/block-editor" ).getDirectInsertBlock',
        since: "6.3",
        version: "6.4"
      }
    );
    return getDirectInsertBlock(state, rootClientId);
  }
  var __experimentalGetParsedPattern = (0, import_data4.createRegistrySelector)(
    (select3) => (state, patternName) => {
      const pattern = unlock(select3(STORE_NAME)).getPatternBySlug(
        patternName
      );
      return pattern ? getParsedPattern(pattern) : null;
    }
  );
  var getAllowedPatternsDependants = (select3) => (state, rootClientId) => [
    ...getAllPatternsDependants(select3)(state),
    ...getInsertBlockTypeDependants(select3)(state, rootClientId)
  ];
  var patternsWithParsedBlocks = /* @__PURE__ */ new WeakMap();
  function enhancePatternWithParsedBlocks(pattern) {
    let enhancedPattern = patternsWithParsedBlocks.get(pattern);
    if (!enhancedPattern) {
      enhancedPattern = {
        ...pattern,
        get blocks() {
          return getParsedPattern(pattern).blocks;
        }
      };
      patternsWithParsedBlocks.set(pattern, enhancedPattern);
    }
    return enhancedPattern;
  }
  var __experimentalGetAllowedPatterns = (0, import_data4.createRegistrySelector)(
    (select3) => {
      return (0, import_data4.createSelector)(
        (state, rootClientId = null, options = DEFAULT_INSERTER_OPTIONS) => {
          const { getAllPatterns: getAllPatterns2 } = unlock(select3(STORE_NAME));
          const patterns = getAllPatterns2();
          const { allowedBlockTypes } = getSettings(state);
          const parsedPatterns = patterns.filter(({ inserter = true }) => !!inserter).map(enhancePatternWithParsedBlocks);
          const availableParsedPatterns = parsedPatterns.filter(
            (pattern) => checkAllowListRecursive(
              getGrammar(pattern),
              allowedBlockTypes
            )
          );
          const patternsAllowed = availableParsedPatterns.filter(
            (pattern) => getGrammar(pattern).every(
              ({ blockName: name }) => options[isFiltered] !== false ? canInsertBlockType(
                state,
                name,
                rootClientId
              ) : isBlockVisibleInTheInserter(
                state,
                name,
                rootClientId
              )
            )
          );
          return patternsAllowed;
        },
        getAllowedPatternsDependants(select3)
      );
    }
  );
  var getPatternsByBlockTypes = (0, import_data4.createRegistrySelector)(
    (select3) => (0, import_data4.createSelector)(
      (state, blockNames, rootClientId = null) => {
        if (!blockNames) {
          return EMPTY_ARRAY2;
        }
        const patterns = select3(STORE_NAME).__experimentalGetAllowedPatterns(
          rootClientId
        );
        const normalizedBlockNames = Array.isArray(blockNames) ? blockNames : [blockNames];
        const filteredPatterns = patterns.filter(
          (pattern) => pattern?.blockTypes?.some?.(
            (blockName) => normalizedBlockNames.includes(blockName)
          )
        );
        if (filteredPatterns.length === 0) {
          return EMPTY_ARRAY2;
        }
        return filteredPatterns;
      },
      (state, blockNames, rootClientId) => getAllowedPatternsDependants(select3)(state, rootClientId)
    )
  );
  var __experimentalGetPatternsByBlockTypes = (0, import_data4.createRegistrySelector)(
    (select3) => {
      (0, import_deprecated2.default)(
        'wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',
        {
          alternative: 'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',
          since: "6.2",
          version: "6.4"
        }
      );
      return select3(STORE_NAME).getPatternsByBlockTypes;
    }
  );
  var __experimentalGetPatternTransformItems = (0, import_data4.createRegistrySelector)(
    (select3) => (0, import_data4.createSelector)(
      (state, blocks2, rootClientId = null) => {
        if (!blocks2) {
          return EMPTY_ARRAY2;
        }
        if (blocks2.some(
          ({ clientId, innerBlocks }) => innerBlocks.length || areInnerBlocksControlled(state, clientId)
        )) {
          return EMPTY_ARRAY2;
        }
        const selectedBlockNames = Array.from(
          new Set(blocks2.map(({ name }) => name))
        );
        return select3(STORE_NAME).getPatternsByBlockTypes(
          selectedBlockNames,
          rootClientId
        );
      },
      (state, blocks2, rootClientId) => getAllowedPatternsDependants(select3)(state, rootClientId)
    )
  );
  function getBlockListSettings(state, clientId) {
    return state.blockListSettings[clientId];
  }
  function getSettings(state) {
    return state.settings;
  }
  function isLastBlockChangePersistent(state) {
    return state.blocks.isPersistentChange;
  }
  var __experimentalGetBlockListSettingsForBlocks = (0, import_data4.createSelector)(
    (state, clientIds = []) => {
      return clientIds.reduce((blockListSettingsForBlocks, clientId) => {
        if (!state.blockListSettings[clientId]) {
          return blockListSettingsForBlocks;
        }
        return {
          ...blockListSettingsForBlocks,
          [clientId]: state.blockListSettings[clientId]
        };
      }, {});
    },
    (state) => [state.blockListSettings]
  );
  var __experimentalGetReusableBlockTitle = (0, import_data4.createRegistrySelector)(
    (select3) => (0, import_data4.createSelector)(
      (state, ref) => {
        (0, import_deprecated2.default)(
          "wp.data.select( 'core/block-editor' ).__experimentalGetReusableBlockTitle",
          {
            since: "6.6",
            version: "6.8"
          }
        );
        const reusableBlock = unlock(select3(STORE_NAME)).getReusableBlocks().find((block) => block.id === ref);
        if (!reusableBlock) {
          return null;
        }
        return reusableBlock.title?.raw;
      },
      () => [unlock(select3(STORE_NAME)).getReusableBlocks()]
    )
  );
  function __unstableIsLastBlockChangeIgnored(state) {
    return state.blocks.isIgnoredChange;
  }
  function __experimentalGetLastBlockAttributeChanges(state) {
    return state.lastBlockAttributesChange;
  }
  function hasBlockMovingClientId() {
    (0, import_deprecated2.default)(
      'wp.data.select( "core/block-editor" ).hasBlockMovingClientId',
      {
        since: "6.7",
        hint: "Block moving mode feature has been removed"
      }
    );
    return false;
  }
  function didAutomaticChange(state) {
    return !!state.automaticChangeStatus;
  }
  function isBlockHighlighted(state, clientId) {
    return state.highlightedBlock === clientId;
  }
  function areInnerBlocksControlled(state, clientId) {
    return !!state.blocks.controlledInnerBlocks[clientId];
  }
  var __experimentalGetActiveBlockIdByBlockNames = (0, import_data4.createSelector)(
    (state, validBlockNames) => {
      if (!validBlockNames.length) {
        return null;
      }
      const selectedBlockClientId = getSelectedBlockClientId(state);
      if (validBlockNames.includes(
        getBlockName(state, selectedBlockClientId)
      )) {
        return selectedBlockClientId;
      }
      const multiSelectedBlockClientIds = getMultiSelectedBlockClientIds(state);
      const entityAreaParents = getBlockParentsByBlockName(
        state,
        selectedBlockClientId || multiSelectedBlockClientIds[0],
        validBlockNames
      );
      if (entityAreaParents) {
        return entityAreaParents[entityAreaParents.length - 1];
      }
      return null;
    },
    (state, validBlockNames) => [
      state.selection.selectionStart.clientId,
      state.selection.selectionEnd.clientId,
      validBlockNames
    ]
  );
  function wasBlockJustInserted(state, clientId, source) {
    const { lastBlockInserted: lastBlockInserted2 } = state;
    return lastBlockInserted2.clientIds?.includes(clientId) && lastBlockInserted2.source === source;
  }
  function isBlockVisible(state, clientId) {
    return state.blockVisibility?.[clientId] ?? true;
  }
  function getHoveredBlockClientId() {
    (0, import_deprecated2.default)(
      "wp.data.select( 'core/block-editor' ).getHoveredBlockClientId",
      {
        since: "6.9",
        version: "7.1"
      }
    );
    return void 0;
  }
  var __unstableGetVisibleBlocks = (0, import_data4.createSelector)(
    (state) => {
      const visibleBlocks = new Set(
        Object.keys(state.blockVisibility).filter(
          (key) => state.blockVisibility[key]
        )
      );
      if (visibleBlocks.size === 0) {
        return EMPTY_SET;
      }
      return visibleBlocks;
    },
    (state) => [state.blockVisibility]
  );
  function __unstableHasActiveBlockOverlayActive(state, clientId) {
    if (getBlockEditingMode(state, clientId) !== "default") {
      return false;
    }
    if (!canEditBlock(state, clientId)) {
      return true;
    }
    if (isZoomOut(state)) {
      const sectionRootClientId = getSectionRootClientId(state);
      if (sectionRootClientId) {
        const sectionClientIds = getBlockOrder(
          state,
          sectionRootClientId
        );
        if (sectionClientIds?.includes(clientId)) {
          return true;
        }
      } else if (clientId && !getBlockRootClientId(state, clientId)) {
        return true;
      }
    }
    const blockSupportDisable = (0, import_blocks6.hasBlockSupport)(
      getBlockName(state, clientId),
      "__experimentalDisableBlockOverlay",
      false
    );
    const shouldEnableIfUnselected = blockSupportDisable ? false : areInnerBlocksControlled(state, clientId);
    return shouldEnableIfUnselected && !isBlockSelected(state, clientId) && !hasSelectedInnerBlock(state, clientId, true);
  }
  function __unstableIsWithinBlockOverlay(state, clientId) {
    let parent = state.blocks.parents.get(clientId);
    while (!!parent) {
      if (__unstableHasActiveBlockOverlayActive(state, parent)) {
        return true;
      }
      parent = state.blocks.parents.get(parent);
    }
    return false;
  }
  function getBlockEditingMode(state, clientId = "") {
    if (clientId === null) {
      clientId = "";
    }
    if (state.derivedBlockEditingModes?.has(clientId)) {
      return state.derivedBlockEditingModes.get(clientId);
    }
    if (state.blocks.blockEditingModes.has(clientId)) {
      return state.blocks.blockEditingModes.get(clientId);
    }
    return "default";
  }
  var isUngroupable = (0, import_data4.createRegistrySelector)(
    (select3) => (state, clientId = "") => {
      const _clientId = clientId || getSelectedBlockClientId(state);
      if (!_clientId) {
        return false;
      }
      if (isSectionBlock(state, _clientId)) {
        return false;
      }
      const { getGroupingBlockName } = select3(import_blocks6.store);
      const block = getBlock(state, _clientId);
      const groupingBlockName = getGroupingBlockName();
      const _isUngroupable = block && (block.name === groupingBlockName || (0, import_blocks6.getBlockType)(block.name)?.transforms?.ungroup) && !!block.innerBlocks.length;
      return _isUngroupable && canRemoveBlock(state, _clientId);
    }
  );
  var isGroupable = (0, import_data4.createRegistrySelector)(
    (select3) => (state, clientIds = EMPTY_ARRAY2) => {
      const { getGroupingBlockName } = select3(import_blocks6.store);
      const groupingBlockName = getGroupingBlockName();
      const _clientIds = clientIds?.length ? clientIds : getSelectedBlockClientIds(state);
      const rootClientId = _clientIds?.length ? getBlockRootClientId(state, _clientIds[0]) : void 0;
      const groupingBlockAvailable = canInsertBlockType(
        state,
        groupingBlockName,
        rootClientId
      );
      const _isGroupable = groupingBlockAvailable && _clientIds.length;
      return _isGroupable && canRemoveBlocks(state, _clientIds);
    }
  );
  var __unstableGetContentLockingParent = (state, clientId) => {
    (0, import_deprecated2.default)(
      "wp.data.select( 'core/block-editor' ).__unstableGetContentLockingParent",
      {
        since: "6.1",
        version: "6.7"
      }
    );
    return getContentLockingParent(state, clientId);
  };
  function __unstableGetTemporarilyEditingAsBlocks(state) {
    (0, import_deprecated2.default)(
      "wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingAsBlocks",
      {
        since: "6.1",
        version: "6.7"
      }
    );
    return getEditedContentOnlySection(state);
  }

  // packages/block-editor/build-module/store/private-actions.mjs
  var private_actions_exports = {};
  __export(private_actions_exports, {
    __experimentalUpdateSettings: () => __experimentalUpdateSettings,
    clearBlockRemovalPrompt: () => clearBlockRemovalPrompt,
    clearRequestedInspectorTab: () => clearRequestedInspectorTab,
    closeListViewContentPanel: () => closeListViewContentPanel,
    deleteStyleOverride: () => deleteStyleOverride,
    editContentOnlySection: () => editContentOnlySection,
    ensureDefaultBlock: () => ensureDefaultBlock,
    expandBlock: () => expandBlock,
    hideBlockInterface: () => hideBlockInterface,
    hideViewportModal: () => hideViewportModal,
    openListViewContentPanel: () => openListViewContentPanel,
    privateRemoveBlocks: () => privateRemoveBlocks,
    requestInspectorTab: () => requestInspectorTab,
    resetZoomLevel: () => resetZoomLevel,
    setBlockRemovalRules: () => setBlockRemovalRules,
    setInsertionPoint: () => setInsertionPoint,
    setLastFocus: () => setLastFocus,
    setStyleOverride: () => setStyleOverride,
    setZoomLevel: () => setZoomLevel,
    showBlockInterface: () => showBlockInterface,
    showViewportModal: () => showViewportModal,
    startDragging: () => startDragging,
    stopDragging: () => stopDragging,
    stopEditingContentOnlySection: () => stopEditingContentOnlySection,
    toggleBlockSpotlight: () => toggleBlockSpotlight
  });
  var import_element7 = __toESM(require_element(), 1);
  var import_deprecated3 = __toESM(require_deprecated(), 1);
  var import_a11y2 = __toESM(require_a11y(), 1);
  var import_i18n4 = __toESM(require_i18n(), 1);
  var castArray = (maybeArray) => Array.isArray(maybeArray) ? maybeArray : [maybeArray];
  var privateSettings = [
    "inserterMediaCategories",
    "blockInspectorAnimation",
    "mediaSideload"
  ];
  function __experimentalUpdateSettings(settings2, { stripExperimentalSettings = false, reset = false } = {}) {
    let incomingSettings = settings2;
    if (Object.hasOwn(incomingSettings, "__unstableIsPreviewMode")) {
      (0, import_deprecated3.default)(
        "__unstableIsPreviewMode argument in wp.data.dispatch('core/block-editor').updateSettings",
        {
          since: "6.8",
          alternative: "isPreviewMode"
        }
      );
      incomingSettings = { ...incomingSettings };
      incomingSettings.isPreviewMode = incomingSettings.__unstableIsPreviewMode;
      delete incomingSettings.__unstableIsPreviewMode;
    }
    let cleanSettings = incomingSettings;
    if (stripExperimentalSettings && import_element7.Platform.OS === "web") {
      cleanSettings = {};
      for (const key in incomingSettings) {
        if (!privateSettings.includes(key)) {
          cleanSettings[key] = incomingSettings[key];
        }
      }
    }
    return {
      type: "UPDATE_SETTINGS",
      settings: cleanSettings,
      reset
    };
  }
  function hideBlockInterface() {
    return {
      type: "HIDE_BLOCK_INTERFACE"
    };
  }
  function showBlockInterface() {
    return {
      type: "SHOW_BLOCK_INTERFACE"
    };
  }
  var privateRemoveBlocks = (clientIds, selectPrevious = true, forceRemove = false) => ({ select: select3, dispatch, registry }) => {
    if (!clientIds || !clientIds.length) {
      return;
    }
    clientIds = castArray(clientIds);
    const canRemoveBlocks2 = select3.canRemoveBlocks(clientIds);
    if (!canRemoveBlocks2) {
      return;
    }
    const rules = !forceRemove && select3.getBlockRemovalRules();
    if (rules) {
      let flattenBlocks22 = function(blocks2) {
        const result = [];
        const stack = [...blocks2];
        while (stack.length) {
          const { innerBlocks, ...block } = stack.shift();
          stack.push(...innerBlocks);
          result.push(block);
        }
        return result;
      };
      var flattenBlocks2 = flattenBlocks22;
      const blockList = clientIds.map(select3.getBlock);
      const flattenedBlocks = flattenBlocks22(blockList);
      let message2;
      for (const rule of rules) {
        message2 = rule.callback(flattenedBlocks);
        if (message2) {
          dispatch(
            displayBlockRemovalPrompt(
              clientIds,
              selectPrevious,
              message2
            )
          );
          return;
        }
      }
    }
    if (selectPrevious) {
      dispatch.selectPreviousBlock(clientIds[0], selectPrevious);
    }
    registry.batch(() => {
      dispatch({ type: "REMOVE_BLOCKS", clientIds });
      dispatch(ensureDefaultBlock());
    });
  };
  var ensureDefaultBlock = () => ({ select: select3, dispatch }) => {
    const count = select3.getBlockCount();
    if (count > 0) {
      return;
    }
    const { __unstableHasCustomAppender } = select3.getSettings();
    if (__unstableHasCustomAppender) {
      return;
    }
    dispatch.insertDefaultBlock();
  };
  function displayBlockRemovalPrompt(clientIds, selectPrevious, message2) {
    return {
      type: "DISPLAY_BLOCK_REMOVAL_PROMPT",
      clientIds,
      selectPrevious,
      message: message2
    };
  }
  function clearBlockRemovalPrompt() {
    return {
      type: "CLEAR_BLOCK_REMOVAL_PROMPT"
    };
  }
  function setBlockRemovalRules(rules = false) {
    return {
      type: "SET_BLOCK_REMOVAL_RULES",
      rules
    };
  }
  function setStyleOverride(id, style) {
    return {
      type: "SET_STYLE_OVERRIDE",
      id,
      style
    };
  }
  function deleteStyleOverride(id) {
    return {
      type: "DELETE_STYLE_OVERRIDE",
      id
    };
  }
  function setLastFocus(lastFocus2 = null) {
    return {
      type: "LAST_FOCUS",
      lastFocus: lastFocus2
    };
  }
  function startDragging() {
    return {
      type: "START_DRAGGING"
    };
  }
  function stopDragging() {
    return {
      type: "STOP_DRAGGING"
    };
  }
  function expandBlock(clientId) {
    return {
      type: "SET_BLOCK_EXPANDED_IN_LIST_VIEW",
      clientId
    };
  }
  function setInsertionPoint(value) {
    return {
      type: "SET_INSERTION_POINT",
      value
    };
  }
  function editContentOnlySection(clientId) {
    return {
      type: "EDIT_CONTENT_ONLY_SECTION",
      clientId
    };
  }
  function stopEditingContentOnlySection() {
    return {
      type: "EDIT_CONTENT_ONLY_SECTION"
    };
  }
  var setZoomLevel = (zoom = 100) => ({ select: select3, dispatch }) => {
    if (zoom !== 100) {
      const firstSelectedClientId = select3.getBlockSelectionStart();
      const sectionRootClientId = select3.getSectionRootClientId();
      if (firstSelectedClientId) {
        let sectionClientId;
        if (sectionRootClientId) {
          const sectionClientIds = select3.getBlockOrder(sectionRootClientId);
          if (sectionClientIds?.includes(firstSelectedClientId)) {
            sectionClientId = firstSelectedClientId;
          } else {
            sectionClientId = select3.getBlockParents(firstSelectedClientId).find(
              (parent) => sectionClientIds.includes(parent)
            );
          }
        } else {
          sectionClientId = select3.getBlockHierarchyRootClientId(
            firstSelectedClientId
          );
        }
        if (sectionClientId) {
          dispatch.selectBlock(sectionClientId);
        } else {
          dispatch.clearSelectedBlock();
        }
        (0, import_a11y2.speak)((0, import_i18n4.__)("You are currently in zoom-out mode."));
      }
    }
    dispatch({
      type: "SET_ZOOM_LEVEL",
      zoom
    });
  };
  function resetZoomLevel() {
    return {
      type: "RESET_ZOOM_LEVEL"
    };
  }
  function toggleBlockSpotlight(clientId, hasBlockSpotlight3) {
    return {
      type: "TOGGLE_BLOCK_SPOTLIGHT",
      clientId,
      hasBlockSpotlight: hasBlockSpotlight3
    };
  }
  function openListViewContentPanel() {
    return {
      type: "OPEN_LIST_VIEW_CONTENT_PANEL"
    };
  }
  function closeListViewContentPanel() {
    return {
      type: "CLOSE_LIST_VIEW_CONTENT_PANEL"
    };
  }
  function showViewportModal(clientIds) {
    return {
      type: "SHOW_VIEWPORT_MODAL",
      clientIds
    };
  }
  function hideViewportModal() {
    return {
      type: "HIDE_VIEWPORT_MODAL"
    };
  }
  function requestInspectorTab(tabName, options = {}) {
    return {
      type: "REQUEST_INSPECTOR_TAB",
      tabName,
      options
    };
  }
  function clearRequestedInspectorTab() {
    return {
      type: "CLEAR_REQUESTED_INSPECTOR_TAB"
    };
  }

  // packages/block-editor/build-module/store/actions.mjs
  var actions_exports = {};
  __export(actions_exports, {
    __unstableDeleteSelection: () => __unstableDeleteSelection,
    __unstableExpandSelection: () => __unstableExpandSelection,
    __unstableIncrementListViewExpandRevision: () => __unstableIncrementListViewExpandRevision,
    __unstableMarkAutomaticChange: () => __unstableMarkAutomaticChange,
    __unstableMarkLastChangeAsPersistent: () => __unstableMarkLastChangeAsPersistent,
    __unstableMarkNextChangeAsNotPersistent: () => __unstableMarkNextChangeAsNotPersistent,
    __unstableSaveReusableBlock: () => __unstableSaveReusableBlock,
    __unstableSetAllListViewPanelsOpen: () => __unstableSetAllListViewPanelsOpen,
    __unstableSetEditorMode: () => __unstableSetEditorMode,
    __unstableSetOpenListViewPanel: () => __unstableSetOpenListViewPanel,
    __unstableSetTemporarilyEditingAsBlocks: () => __unstableSetTemporarilyEditingAsBlocks,
    __unstableSplitSelection: () => __unstableSplitSelection,
    __unstableToggleListViewPanel: () => __unstableToggleListViewPanel,
    clearSelectedBlock: () => clearSelectedBlock,
    duplicateBlocks: () => duplicateBlocks,
    enterFormattedText: () => enterFormattedText,
    exitFormattedText: () => exitFormattedText,
    flashBlock: () => flashBlock,
    hideInsertionPoint: () => hideInsertionPoint,
    hoverBlock: () => hoverBlock,
    insertAfterBlock: () => insertAfterBlock,
    insertBeforeBlock: () => insertBeforeBlock,
    insertBlock: () => insertBlock,
    insertBlocks: () => insertBlocks,
    insertDefaultBlock: () => insertDefaultBlock,
    mergeBlocks: () => mergeBlocks,
    moveBlockToPosition: () => moveBlockToPosition,
    moveBlocksDown: () => moveBlocksDown,
    moveBlocksToPosition: () => moveBlocksToPosition,
    moveBlocksUp: () => moveBlocksUp,
    multiSelect: () => multiSelect,
    receiveBlocks: () => receiveBlocks,
    registerInserterMediaCategory: () => registerInserterMediaCategory,
    removeBlock: () => removeBlock,
    removeBlocks: () => removeBlocks,
    replaceBlock: () => replaceBlock,
    replaceBlocks: () => replaceBlocks,
    replaceInnerBlocks: () => replaceInnerBlocks,
    resetBlocks: () => resetBlocks,
    resetSelection: () => resetSelection,
    selectBlock: () => selectBlock,
    selectNextBlock: () => selectNextBlock,
    selectPreviousBlock: () => selectPreviousBlock,
    selectionChange: () => selectionChange,
    setBlockEditingMode: () => setBlockEditingMode,
    setBlockMovingClientId: () => setBlockMovingClientId,
    setBlockVisibility: () => setBlockVisibility,
    setHasControlledInnerBlocks: () => setHasControlledInnerBlocks,
    setTemplateValidity: () => setTemplateValidity,
    showInsertionPoint: () => showInsertionPoint,
    startDraggingBlocks: () => startDraggingBlocks,
    startMultiSelect: () => startMultiSelect,
    startTyping: () => startTyping,
    stopDraggingBlocks: () => stopDraggingBlocks,
    stopMultiSelect: () => stopMultiSelect,
    stopTyping: () => stopTyping,
    synchronizeTemplate: () => synchronizeTemplate,
    toggleBlockHighlight: () => toggleBlockHighlight,
    toggleBlockMode: () => toggleBlockMode,
    toggleSelection: () => toggleSelection,
    unsetBlockEditingMode: () => unsetBlockEditingMode,
    updateBlock: () => updateBlock,
    updateBlockAttributes: () => updateBlockAttributes,
    updateBlockListSettings: () => updateBlockListSettings,
    updateSettings: () => updateSettings,
    validateBlocksToTemplate: () => validateBlocksToTemplate
  });
  var import_blocks7 = __toESM(require_blocks(), 1);
  var import_a11y3 = __toESM(require_a11y(), 1);
  var import_i18n5 = __toESM(require_i18n(), 1);
  var import_notices = __toESM(require_notices(), 1);
  var import_rich_text3 = __toESM(require_rich_text(), 1);
  var import_deprecated4 = __toESM(require_deprecated(), 1);
  var import_preferences = __toESM(require_preferences(), 1);

  // packages/block-editor/build-module/utils/selection.mjs
  var import_rich_text2 = __toESM(require_rich_text(), 1);
  var START_OF_SELECTED_AREA = "\x86";
  function retrieveSelectedAttribute(blockAttributes) {
    if (!blockAttributes) {
      return;
    }
    return Object.keys(blockAttributes).find((name) => {
      const value = blockAttributes[name];
      return (typeof value === "string" || value instanceof import_rich_text2.RichTextData) && // To do: refactor this to use rich text's selection instead, so we
      // no longer have to use on this hack inserting a special character.
      value.toString().indexOf(START_OF_SELECTED_AREA) !== -1;
    });
  }
  function findRichTextAttributeKey(blockType) {
    for (const [key, value] of Object.entries(blockType.attributes)) {
      if (value.source === "rich-text" || value.source === "html") {
        return key;
      }
    }
  }

  // packages/block-editor/build-module/store/actions.mjs
  var castArray2 = (maybeArray) => Array.isArray(maybeArray) ? maybeArray : [maybeArray];
  var resetBlocks = (blocks2) => ({ dispatch }) => {
    dispatch({ type: "RESET_BLOCKS", blocks: blocks2 });
    dispatch(validateBlocksToTemplate(blocks2));
  };
  var validateBlocksToTemplate = (blocks2) => ({ select: select3, dispatch }) => {
    const template2 = select3.getTemplate();
    const templateLock = select3.getTemplateLock();
    const isBlocksValidToTemplate = !template2 || templateLock !== "all" || (0, import_blocks7.doBlocksMatchTemplate)(blocks2, template2);
    const isValidTemplate2 = select3.isValidTemplate();
    if (isBlocksValidToTemplate !== isValidTemplate2) {
      dispatch.setTemplateValidity(isBlocksValidToTemplate);
      return isBlocksValidToTemplate;
    }
  };
  function resetSelection(selectionStart, selectionEnd, initialPosition2) {
    return {
      type: "RESET_SELECTION",
      selectionStart,
      selectionEnd,
      initialPosition: initialPosition2
    };
  }
  function receiveBlocks(blocks2) {
    (0, import_deprecated4.default)('wp.data.dispatch( "core/block-editor" ).receiveBlocks', {
      since: "5.9",
      alternative: "resetBlocks or insertBlocks"
    });
    return {
      type: "RECEIVE_BLOCKS",
      blocks: blocks2
    };
  }
  function updateBlockAttributes(clientIds, attributes, options = { uniqueByBlock: false }) {
    if (typeof options === "boolean") {
      options = { uniqueByBlock: options };
    }
    return {
      type: "UPDATE_BLOCK_ATTRIBUTES",
      clientIds: castArray2(clientIds),
      attributes,
      options
    };
  }
  function updateBlock(clientId, updates) {
    return {
      type: "UPDATE_BLOCK",
      clientId,
      updates
    };
  }
  function selectBlock(clientId, initialPosition2 = 0) {
    return {
      type: "SELECT_BLOCK",
      initialPosition: initialPosition2,
      clientId
    };
  }
  function hoverBlock() {
    (0, import_deprecated4.default)('wp.data.dispatch( "core/block-editor" ).hoverBlock', {
      since: "6.9",
      version: "7.1"
    });
    return {
      type: "DO_NOTHING"
    };
  }
  var selectPreviousBlock = (clientId, fallbackToParent = false) => ({ select: select3, dispatch }) => {
    const previousBlockClientId = select3.getPreviousBlockClientId(clientId);
    if (previousBlockClientId) {
      dispatch.selectBlock(previousBlockClientId, -1);
    } else if (fallbackToParent) {
      const firstParentClientId = select3.getBlockRootClientId(clientId);
      if (firstParentClientId) {
        dispatch.selectBlock(firstParentClientId, -1);
      } else {
        const nextBlockClientId = select3.getNextBlockClientId(clientId);
        if (nextBlockClientId) {
          dispatch.selectBlock(nextBlockClientId, 0);
        }
      }
    }
  };
  var selectNextBlock = (clientId) => ({ select: select3, dispatch }) => {
    const nextBlockClientId = select3.getNextBlockClientId(clientId);
    if (nextBlockClientId) {
      dispatch.selectBlock(nextBlockClientId);
    }
  };
  function startMultiSelect() {
    return {
      type: "START_MULTI_SELECT"
    };
  }
  function stopMultiSelect() {
    return {
      type: "STOP_MULTI_SELECT"
    };
  }
  var multiSelect = (start2, end, __experimentalInitialPosition = 0) => ({ select: select3, dispatch }) => {
    const startBlockRootClientId = select3.getBlockRootClientId(start2);
    const endBlockRootClientId = select3.getBlockRootClientId(end);
    if (startBlockRootClientId !== endBlockRootClientId) {
      return;
    }
    dispatch({
      type: "MULTI_SELECT",
      start: start2,
      end,
      initialPosition: __experimentalInitialPosition
    });
    const blockCount = select3.getSelectedBlockCount();
    (0, import_a11y3.speak)(
      (0, import_i18n5.sprintf)(
        /* translators: %s: number of selected blocks */
        (0, import_i18n5._n)("%s block selected.", "%s blocks selected.", blockCount),
        blockCount
      ),
      "assertive"
    );
  };
  function clearSelectedBlock() {
    return {
      type: "CLEAR_SELECTED_BLOCK"
    };
  }
  function toggleSelection(isSelectionEnabled3 = true) {
    return {
      type: "TOGGLE_SELECTION",
      isSelectionEnabled: isSelectionEnabled3
    };
  }
  var replaceBlocks = (clientIds, blocks2, indexToSelect, initialPosition2 = 0, meta) => ({ select: select3, dispatch, registry }) => {
    clientIds = castArray2(clientIds);
    blocks2 = castArray2(blocks2);
    const rootClientId = select3.getBlockRootClientId(clientIds[0]);
    for (let index = 0; index < blocks2.length; index++) {
      const block = blocks2[index];
      const canInsertBlock = select3.canInsertBlockType(
        block.name,
        rootClientId
      );
      if (!canInsertBlock) {
        return;
      }
    }
    registry.batch(() => {
      dispatch({
        type: "REPLACE_BLOCKS",
        clientIds,
        blocks: blocks2,
        time: Date.now(),
        indexToSelect,
        initialPosition: initialPosition2,
        meta
      });
      dispatch.ensureDefaultBlock();
    });
  };
  function replaceBlock(clientId, block) {
    return replaceBlocks(clientId, block);
  }
  var createOnMove = (type) => (clientIds, rootClientId) => ({ select: select3, dispatch }) => {
    const canMoveBlocks2 = select3.canMoveBlocks(clientIds);
    if (!canMoveBlocks2) {
      return;
    }
    dispatch({ type, clientIds: castArray2(clientIds), rootClientId });
  };
  var moveBlocksDown = createOnMove("MOVE_BLOCKS_DOWN");
  var moveBlocksUp = createOnMove("MOVE_BLOCKS_UP");
  var moveBlocksToPosition = (clientIds, fromRootClientId = "", toRootClientId = "", index) => ({ select: select3, dispatch }) => {
    const canMoveBlocks2 = select3.canMoveBlocks(clientIds);
    if (!canMoveBlocks2) {
      return;
    }
    if (fromRootClientId !== toRootClientId) {
      const canRemoveBlocks2 = select3.canRemoveBlocks(clientIds);
      if (!canRemoveBlocks2) {
        return;
      }
      const canInsertBlocks2 = select3.canInsertBlocks(
        clientIds,
        toRootClientId
      );
      if (!canInsertBlocks2) {
        return;
      }
    }
    dispatch({
      type: "MOVE_BLOCKS_TO_POSITION",
      fromRootClientId,
      toRootClientId,
      clientIds,
      index
    });
  };
  function moveBlockToPosition(clientId, fromRootClientId = "", toRootClientId = "", index) {
    return moveBlocksToPosition(
      [clientId],
      fromRootClientId,
      toRootClientId,
      index
    );
  }
  function insertBlock(block, index, rootClientId, updateSelection, initialPosition2, meta) {
    return insertBlocks(
      [block],
      index,
      rootClientId,
      updateSelection,
      initialPosition2,
      meta
    );
  }
  var insertBlocks = (blocks2, index, rootClientId, updateSelection = true, initialPosition2 = 0, meta) => ({ select: select3, dispatch }) => {
    if (initialPosition2 !== null && typeof initialPosition2 === "object") {
      meta = initialPosition2;
      initialPosition2 = 0;
      (0, import_deprecated4.default)(
        "meta argument in wp.data.dispatch('core/block-editor')",
        {
          since: "5.8",
          hint: "The meta argument is now the 6th argument of the function"
        }
      );
    }
    blocks2 = castArray2(blocks2);
    const allowedBlocks = [];
    for (const block of blocks2) {
      const isValid2 = select3.canInsertBlockType(
        block.name,
        rootClientId
      );
      if (isValid2) {
        allowedBlocks.push(block);
      }
    }
    if (allowedBlocks.length) {
      dispatch({
        type: "INSERT_BLOCKS",
        blocks: allowedBlocks,
        index,
        rootClientId,
        time: Date.now(),
        updateSelection,
        initialPosition: updateSelection ? initialPosition2 : null,
        meta
      });
    }
  };
  function showInsertionPoint(rootClientId, index, __unstableOptions = {}) {
    const { __unstableWithInserter, operation, nearestSide } = __unstableOptions;
    return {
      type: "SHOW_INSERTION_POINT",
      rootClientId,
      index,
      __unstableWithInserter,
      operation,
      nearestSide
    };
  }
  var hideInsertionPoint = () => ({ select: select3, dispatch }) => {
    if (!select3.isBlockInsertionPointVisible()) {
      return;
    }
    dispatch({
      type: "HIDE_INSERTION_POINT"
    });
  };
  function setTemplateValidity(isValid2) {
    return {
      type: "SET_TEMPLATE_VALIDITY",
      isValid: isValid2
    };
  }
  var synchronizeTemplate = () => ({ select: select3, dispatch }) => {
    dispatch({ type: "SYNCHRONIZE_TEMPLATE" });
    const blocks2 = select3.getBlocks();
    const template2 = select3.getTemplate();
    const updatedBlockList = (0, import_blocks7.synchronizeBlocksWithTemplate)(
      blocks2,
      template2
    );
    dispatch.resetBlocks(updatedBlockList);
  };
  var __unstableDeleteSelection = (isForward) => ({ registry, select: select3, dispatch }) => {
    const selectionAnchor = select3.getSelectionStart();
    const selectionFocus = select3.getSelectionEnd();
    if (selectionAnchor.clientId === selectionFocus.clientId) {
      return;
    }
    if (!selectionAnchor.attributeKey || !selectionFocus.attributeKey || typeof selectionAnchor.offset === "undefined" || typeof selectionFocus.offset === "undefined") {
      return false;
    }
    const anchorRootClientId = select3.getBlockRootClientId(
      selectionAnchor.clientId
    );
    const focusRootClientId = select3.getBlockRootClientId(
      selectionFocus.clientId
    );
    if (anchorRootClientId !== focusRootClientId) {
      return;
    }
    const blockOrder = select3.getBlockOrder(anchorRootClientId);
    const anchorIndex = blockOrder.indexOf(selectionAnchor.clientId);
    const focusIndex = blockOrder.indexOf(selectionFocus.clientId);
    let selectionStart, selectionEnd;
    if (anchorIndex > focusIndex) {
      selectionStart = selectionFocus;
      selectionEnd = selectionAnchor;
    } else {
      selectionStart = selectionAnchor;
      selectionEnd = selectionFocus;
    }
    const targetSelection = isForward ? selectionEnd : selectionStart;
    const targetBlock = select3.getBlock(targetSelection.clientId);
    const targetBlockType = (0, import_blocks7.getBlockType)(targetBlock.name);
    if (!targetBlockType.merge) {
      return;
    }
    const selectionA = selectionStart;
    const selectionB = selectionEnd;
    const blockA = select3.getBlock(selectionA.clientId);
    const blockB = select3.getBlock(selectionB.clientId);
    const htmlA = blockA.attributes[selectionA.attributeKey];
    const htmlB = blockB.attributes[selectionB.attributeKey];
    let valueA = (0, import_rich_text3.create)({ html: htmlA });
    let valueB = (0, import_rich_text3.create)({ html: htmlB });
    valueA = (0, import_rich_text3.remove)(valueA, selectionA.offset, valueA.text.length);
    valueB = (0, import_rich_text3.insert)(valueB, START_OF_SELECTED_AREA, 0, selectionB.offset);
    const cloneA = (0, import_blocks7.cloneBlock)(blockA, {
      [selectionA.attributeKey]: (0, import_rich_text3.toHTMLString)({ value: valueA })
    });
    const cloneB = (0, import_blocks7.cloneBlock)(blockB, {
      [selectionB.attributeKey]: (0, import_rich_text3.toHTMLString)({ value: valueB })
    });
    const followingBlock = isForward ? cloneA : cloneB;
    const blocksWithTheSameType = blockA.name === blockB.name ? [followingBlock] : (0, import_blocks7.switchToBlockType)(followingBlock, targetBlockType.name);
    if (!blocksWithTheSameType || !blocksWithTheSameType.length) {
      return;
    }
    let updatedAttributes;
    if (isForward) {
      const blockToMerge = blocksWithTheSameType.pop();
      updatedAttributes = targetBlockType.merge(
        blockToMerge.attributes,
        cloneB.attributes
      );
    } else {
      const blockToMerge = blocksWithTheSameType.shift();
      updatedAttributes = targetBlockType.merge(
        cloneA.attributes,
        blockToMerge.attributes
      );
    }
    const newAttributeKey = retrieveSelectedAttribute(updatedAttributes);
    const convertedHtml = updatedAttributes[newAttributeKey];
    const convertedValue = (0, import_rich_text3.create)({ html: convertedHtml });
    const newOffset = convertedValue.text.indexOf(START_OF_SELECTED_AREA);
    const newValue = (0, import_rich_text3.remove)(convertedValue, newOffset, newOffset + 1);
    const newHtml = (0, import_rich_text3.toHTMLString)({ value: newValue });
    updatedAttributes[newAttributeKey] = newHtml;
    const selectedBlockClientIds = select3.getSelectedBlockClientIds();
    const replacement = [
      ...isForward ? blocksWithTheSameType : [],
      {
        // Preserve the original client ID.
        ...targetBlock,
        attributes: {
          ...targetBlock.attributes,
          ...updatedAttributes
        }
      },
      ...isForward ? [] : blocksWithTheSameType
    ];
    registry.batch(() => {
      dispatch.selectionChange(
        targetBlock.clientId,
        newAttributeKey,
        newOffset,
        newOffset
      );
      dispatch.replaceBlocks(
        selectedBlockClientIds,
        replacement,
        0,
        // If we don't pass the `indexToSelect` it will default to the last block.
        select3.getSelectedBlocksInitialCaretPosition()
      );
    });
  };
  var __unstableSplitSelection = (blocks2 = []) => ({ registry, select: select3, dispatch }) => {
    const selectionAnchor = select3.getSelectionStart();
    const selectionFocus = select3.getSelectionEnd();
    const anchorRootClientId = select3.getBlockRootClientId(
      selectionAnchor.clientId
    );
    const focusRootClientId = select3.getBlockRootClientId(
      selectionFocus.clientId
    );
    if (anchorRootClientId !== focusRootClientId) {
      return;
    }
    const blockOrder = select3.getBlockOrder(anchorRootClientId);
    const anchorIndex = blockOrder.indexOf(selectionAnchor.clientId);
    const focusIndex = blockOrder.indexOf(selectionFocus.clientId);
    let selectionStart, selectionEnd;
    if (anchorIndex > focusIndex) {
      selectionStart = selectionFocus;
      selectionEnd = selectionAnchor;
    } else {
      selectionStart = selectionAnchor;
      selectionEnd = selectionFocus;
    }
    const selectionA = selectionStart;
    const selectionB = selectionEnd;
    const blockA = select3.getBlock(selectionA.clientId);
    const blockB = select3.getBlock(selectionB.clientId);
    const blockAType = (0, import_blocks7.getBlockType)(blockA.name);
    const blockBType = (0, import_blocks7.getBlockType)(blockB.name);
    const attributeKeyA = typeof selectionA.attributeKey === "string" ? selectionA.attributeKey : findRichTextAttributeKey(blockAType);
    const attributeKeyB = typeof selectionB.attributeKey === "string" ? selectionB.attributeKey : findRichTextAttributeKey(blockBType);
    const blockAttributes = select3.getBlockAttributes(
      selectionA.clientId
    );
    const bindings = blockAttributes?.metadata?.bindings;
    if (bindings?.[attributeKeyA]) {
      if (blocks2.length) {
        const { createWarningNotice } = registry.dispatch(import_notices.store);
        createWarningNotice(
          (0, import_i18n5.__)(
            "Blocks can't be inserted into other blocks with bindings"
          ),
          {
            type: "snackbar"
          }
        );
        return;
      }
      dispatch.insertAfterBlock(selectionA.clientId);
      return;
    }
    if (!attributeKeyA || !attributeKeyB || typeof selectionAnchor.offset === "undefined" || typeof selectionFocus.offset === "undefined") {
      return;
    }
    if (selectionA.clientId === selectionB.clientId && attributeKeyA === attributeKeyB && selectionA.offset === selectionB.offset) {
      if (blocks2.length) {
        if ((0, import_blocks7.isUnmodifiedDefaultBlock)(blockA, "content")) {
          dispatch.replaceBlocks(
            [selectionA.clientId],
            blocks2,
            blocks2.length - 1,
            -1
          );
          return;
        }
      } else if (!select3.getBlockOrder(selectionA.clientId).length) {
        let createEmpty2 = function() {
          const defaultBlockName2 = (0, import_blocks7.getDefaultBlockName)();
          return select3.canInsertBlockType(
            defaultBlockName2,
            anchorRootClientId
          ) ? (0, import_blocks7.createBlock)(defaultBlockName2) : (0, import_blocks7.createBlock)(
            select3.getBlockName(selectionA.clientId)
          );
        };
        var createEmpty = createEmpty2;
        const length = blockAttributes[attributeKeyA].length;
        if (selectionA.offset === 0 && length) {
          dispatch.insertBlocks(
            [createEmpty2()],
            select3.getBlockIndex(selectionA.clientId),
            anchorRootClientId,
            false
          );
          return;
        }
        if (selectionA.offset === length) {
          dispatch.insertBlocks(
            [createEmpty2()],
            select3.getBlockIndex(selectionA.clientId) + 1,
            anchorRootClientId
          );
          return;
        }
      }
    }
    const htmlA = blockA.attributes[attributeKeyA];
    const htmlB = blockB.attributes[attributeKeyB];
    let valueA = (0, import_rich_text3.create)({ html: htmlA });
    let valueB = (0, import_rich_text3.create)({ html: htmlB });
    valueA = (0, import_rich_text3.remove)(valueA, selectionA.offset, valueA.text.length);
    valueB = (0, import_rich_text3.remove)(valueB, 0, selectionB.offset);
    let head = {
      // Preserve the original client ID.
      ...blockA,
      // If both start and end are the same, should only copy innerBlocks
      // once.
      innerBlocks: blockA.clientId === blockB.clientId ? [] : blockA.innerBlocks,
      attributes: {
        ...blockA.attributes,
        [attributeKeyA]: (0, import_rich_text3.toHTMLString)({ value: valueA })
      }
    };
    let tail = {
      ...blockB,
      // Only preserve the original client ID if the end is different.
      clientId: blockA.clientId === blockB.clientId ? (0, import_blocks7.createBlock)(blockB.name).clientId : blockB.clientId,
      attributes: {
        ...blockB.attributes,
        [attributeKeyB]: (0, import_rich_text3.toHTMLString)({ value: valueB })
      }
    };
    const defaultBlockName = (0, import_blocks7.getDefaultBlockName)();
    if (
      // A block is only split when the selection is within the same
      // block.
      blockA.clientId === blockB.clientId && defaultBlockName && tail.name !== defaultBlockName && select3.canInsertBlockType(defaultBlockName, anchorRootClientId)
    ) {
      const switched = (0, import_blocks7.switchToBlockType)(tail, defaultBlockName);
      if (switched?.length === 1) {
        tail = switched[0];
      }
    }
    if (!blocks2.length) {
      dispatch.replaceBlocks(select3.getSelectedBlockClientIds(), [
        head,
        tail
      ]);
      return;
    }
    let selection2;
    const output = [];
    const clonedBlocks = [...blocks2];
    const firstBlock = clonedBlocks.shift();
    const headType = (0, import_blocks7.getBlockType)(head.name);
    const firstBlocks = headType.merge && firstBlock.name === headType.name ? [firstBlock] : (0, import_blocks7.switchToBlockType)(firstBlock, headType.name);
    if (firstBlocks?.length) {
      const first = firstBlocks.shift();
      head = {
        ...head,
        attributes: {
          ...head.attributes,
          ...headType.merge(head.attributes, first.attributes)
        }
      };
      output.push(head);
      selection2 = {
        clientId: head.clientId,
        attributeKey: attributeKeyA,
        offset: (0, import_rich_text3.create)({ html: head.attributes[attributeKeyA] }).text.length
      };
      clonedBlocks.unshift(...firstBlocks);
    } else {
      if (!(0, import_blocks7.isUnmodifiedBlock)(head)) {
        output.push(head);
      }
      output.push(firstBlock);
    }
    const lastBlock = clonedBlocks.pop();
    const tailType = (0, import_blocks7.getBlockType)(tail.name);
    if (clonedBlocks.length) {
      output.push(...clonedBlocks);
    }
    if (lastBlock) {
      const lastBlocks = tailType.merge && tailType.name === lastBlock.name ? [lastBlock] : (0, import_blocks7.switchToBlockType)(lastBlock, tailType.name);
      if (lastBlocks?.length) {
        const last = lastBlocks.pop();
        output.push({
          ...tail,
          attributes: {
            ...tail.attributes,
            ...tailType.merge(last.attributes, tail.attributes)
          }
        });
        output.push(...lastBlocks);
        selection2 = {
          clientId: tail.clientId,
          attributeKey: attributeKeyB,
          offset: (0, import_rich_text3.create)({
            html: last.attributes[attributeKeyB]
          }).text.length
        };
      } else {
        output.push(lastBlock);
        if (!(0, import_blocks7.isUnmodifiedBlock)(tail)) {
          output.push(tail);
        }
      }
    } else if (!(0, import_blocks7.isUnmodifiedBlock)(tail)) {
      output.push(tail);
    }
    registry.batch(() => {
      dispatch.replaceBlocks(
        select3.getSelectedBlockClientIds(),
        output,
        output.length - 1,
        0
      );
      if (selection2) {
        dispatch.selectionChange(
          selection2.clientId,
          selection2.attributeKey,
          selection2.offset,
          selection2.offset
        );
      }
    });
  };
  var __unstableExpandSelection = () => ({ select: select3, dispatch }) => {
    const selectionAnchor = select3.getSelectionStart();
    const selectionFocus = select3.getSelectionEnd();
    dispatch.selectionChange({
      start: { clientId: selectionAnchor.clientId },
      end: { clientId: selectionFocus.clientId }
    });
  };
  var mergeBlocks = (firstBlockClientId, secondBlockClientId) => ({ registry, select: select3, dispatch }) => {
    const clientIdA = firstBlockClientId;
    const clientIdB = secondBlockClientId;
    const blockA = select3.getBlock(clientIdA);
    const blockAType = (0, import_blocks7.getBlockType)(blockA.name);
    if (!blockAType || select3.getBlockEditingMode(clientIdA) === "disabled" || select3.getBlockEditingMode(clientIdB) === "disabled") {
      return;
    }
    const blockB = select3.getBlock(clientIdB);
    if (!blockAType.merge && (0, import_blocks7.getBlockSupport)(blockA.name, "__experimentalOnMerge")) {
      const blocksWithTheSameType2 = (0, import_blocks7.switchToBlockType)(
        blockB,
        blockAType.name
      );
      if (blocksWithTheSameType2?.length !== 1) {
        dispatch.selectBlock(blockA.clientId);
        return;
      }
      const [blockWithSameType] = blocksWithTheSameType2;
      if (blockWithSameType.innerBlocks.length < 1) {
        dispatch.selectBlock(blockA.clientId);
        return;
      }
      registry.batch(() => {
        dispatch.insertBlocks(
          blockWithSameType.innerBlocks,
          void 0,
          clientIdA
        );
        dispatch.removeBlock(clientIdB);
        dispatch.selectBlock(
          blockWithSameType.innerBlocks[0].clientId
        );
        const nextBlockClientId = select3.getNextBlockClientId(clientIdA);
        if (nextBlockClientId && select3.getBlockName(clientIdA) === select3.getBlockName(nextBlockClientId)) {
          const rootAttributes = select3.getBlockAttributes(clientIdA);
          const previousRootAttributes = select3.getBlockAttributes(nextBlockClientId);
          if (Object.keys(rootAttributes).every(
            (key) => rootAttributes[key] === previousRootAttributes[key]
          )) {
            dispatch.moveBlocksToPosition(
              select3.getBlockOrder(nextBlockClientId),
              nextBlockClientId,
              clientIdA
            );
            dispatch.removeBlock(nextBlockClientId, false);
          }
        }
      });
      return;
    }
    if ((0, import_blocks7.isUnmodifiedDefaultBlock)(blockA)) {
      dispatch.removeBlock(
        clientIdA,
        select3.isBlockSelected(clientIdA)
      );
      return;
    }
    if ((0, import_blocks7.isUnmodifiedDefaultBlock)(blockB)) {
      dispatch.removeBlock(
        clientIdB,
        select3.isBlockSelected(clientIdB)
      );
      return;
    }
    if (!blockAType.merge) {
      if ((0, import_blocks7.isUnmodifiedBlock)(blockB, "content")) {
        dispatch.removeBlock(
          clientIdB,
          select3.isBlockSelected(clientIdB)
        );
      } else {
        dispatch.selectBlock(blockA.clientId);
      }
      return;
    }
    const blockBType = (0, import_blocks7.getBlockType)(blockB.name);
    const { clientId, attributeKey, offset } = select3.getSelectionStart();
    const selectedBlockType = clientId === clientIdA ? blockAType : blockBType;
    const attributeDefinition = selectedBlockType.attributes[attributeKey];
    const canRestoreTextSelection = (clientId === clientIdA || clientId === clientIdB) && attributeKey !== void 0 && offset !== void 0 && // We cannot restore text selection if the RichText identifier
    // is not a defined block attribute key. This can be the case if the
    // fallback instance ID is used to store selection (and no RichText
    // identifier is set), or when the identifier is wrong.
    !!attributeDefinition;
    if (!attributeDefinition) {
      if (typeof attributeKey === "number") {
        window.console.error(
          `RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was ${typeof attributeKey}`
        );
      } else {
        window.console.error(
          "The RichText identifier prop does not match any attributes defined by the block."
        );
      }
    }
    const cloneA = (0, import_blocks7.cloneBlock)(blockA);
    const cloneB = (0, import_blocks7.cloneBlock)(blockB);
    if (canRestoreTextSelection) {
      const selectedBlock = clientId === clientIdA ? cloneA : cloneB;
      const html = selectedBlock.attributes[attributeKey];
      const value = (0, import_rich_text3.insert)(
        (0, import_rich_text3.create)({ html }),
        START_OF_SELECTED_AREA,
        offset,
        offset
      );
      selectedBlock.attributes[attributeKey] = (0, import_rich_text3.toHTMLString)({
        value
      });
    }
    const blocksWithTheSameType = blockA.name === blockB.name ? [cloneB] : (0, import_blocks7.switchToBlockType)(cloneB, blockA.name);
    if (!blocksWithTheSameType || !blocksWithTheSameType.length) {
      return;
    }
    const updatedAttributes = blockAType.merge(
      cloneA.attributes,
      blocksWithTheSameType[0].attributes
    );
    if (canRestoreTextSelection) {
      const newAttributeKey = retrieveSelectedAttribute(updatedAttributes);
      const convertedHtml = updatedAttributes[newAttributeKey];
      const convertedValue = (0, import_rich_text3.create)({ html: convertedHtml });
      const newOffset = convertedValue.text.indexOf(
        START_OF_SELECTED_AREA
      );
      const newValue = (0, import_rich_text3.remove)(convertedValue, newOffset, newOffset + 1);
      const newHtml = (0, import_rich_text3.toHTMLString)({ value: newValue });
      updatedAttributes[newAttributeKey] = newHtml;
      dispatch.selectionChange(
        blockA.clientId,
        newAttributeKey,
        newOffset,
        newOffset
      );
    }
    dispatch.replaceBlocks(
      [blockA.clientId, blockB.clientId],
      [
        {
          ...blockA,
          attributes: {
            ...blockA.attributes,
            ...updatedAttributes
          }
        },
        ...blocksWithTheSameType.slice(1)
      ],
      0
      // If we don't pass the `indexToSelect` it will default to the last block.
    );
  };
  var removeBlocks = (clientIds, selectPrevious = true) => privateRemoveBlocks(clientIds, selectPrevious);
  function removeBlock(clientId, selectPrevious) {
    return removeBlocks([clientId], selectPrevious);
  }
  function replaceInnerBlocks(rootClientId, blocks2, updateSelection = false, initialPosition2 = 0) {
    return {
      type: "REPLACE_INNER_BLOCKS",
      rootClientId,
      blocks: blocks2,
      updateSelection,
      initialPosition: updateSelection ? initialPosition2 : null,
      time: Date.now()
    };
  }
  function toggleBlockMode(clientId) {
    return {
      type: "TOGGLE_BLOCK_MODE",
      clientId
    };
  }
  function startTyping() {
    return {
      type: "START_TYPING"
    };
  }
  function stopTyping() {
    return {
      type: "STOP_TYPING"
    };
  }
  function startDraggingBlocks(clientIds = []) {
    return {
      type: "START_DRAGGING_BLOCKS",
      clientIds
    };
  }
  function stopDraggingBlocks() {
    return {
      type: "STOP_DRAGGING_BLOCKS"
    };
  }
  function enterFormattedText() {
    (0, import_deprecated4.default)('wp.data.dispatch( "core/block-editor" ).enterFormattedText', {
      since: "6.1",
      version: "6.3"
    });
    return {
      type: "DO_NOTHING"
    };
  }
  function exitFormattedText() {
    (0, import_deprecated4.default)('wp.data.dispatch( "core/block-editor" ).exitFormattedText', {
      since: "6.1",
      version: "6.3"
    });
    return {
      type: "DO_NOTHING"
    };
  }
  function selectionChange(clientId, attributeKey, startOffset, endOffset) {
    if (typeof clientId === "string") {
      return {
        type: "SELECTION_CHANGE",
        clientId,
        attributeKey,
        startOffset,
        endOffset
      };
    }
    return { type: "SELECTION_CHANGE", ...clientId };
  }
  var insertDefaultBlock = (attributes, rootClientId, index) => ({ dispatch }) => {
    const defaultBlockName = (0, import_blocks7.getDefaultBlockName)();
    if (!defaultBlockName) {
      return;
    }
    const block = (0, import_blocks7.createBlock)(defaultBlockName, attributes);
    return dispatch.insertBlock(block, index, rootClientId);
  };
  function updateBlockListSettings(clientId, settings2) {
    return {
      type: "UPDATE_BLOCK_LIST_SETTINGS",
      clientId,
      settings: settings2
    };
  }
  function updateSettings(settings2) {
    return __experimentalUpdateSettings(settings2, {
      stripExperimentalSettings: true
    });
  }
  function __unstableSaveReusableBlock(id, updatedId) {
    return {
      type: "SAVE_REUSABLE_BLOCK_SUCCESS",
      id,
      updatedId
    };
  }
  function __unstableMarkLastChangeAsPersistent() {
    return { type: "MARK_LAST_CHANGE_AS_PERSISTENT" };
  }
  function __unstableMarkNextChangeAsNotPersistent() {
    return { type: "MARK_NEXT_CHANGE_AS_NOT_PERSISTENT" };
  }
  var __unstableMarkAutomaticChange = () => ({ dispatch }) => {
    dispatch({ type: "MARK_AUTOMATIC_CHANGE" });
    const { requestIdleCallback = (cb) => setTimeout(cb, 100) } = window;
    requestIdleCallback(() => {
      dispatch({ type: "MARK_AUTOMATIC_CHANGE_FINAL" });
    });
  };
  var __unstableSetEditorMode = (mode2) => ({ registry }) => {
    registry.dispatch(import_preferences.store).set("core", "editorTool", mode2);
    if (mode2 === "navigation") {
      (0, import_a11y3.speak)((0, import_i18n5.__)("You are currently in Write mode."));
    } else if (mode2 === "edit") {
      (0, import_a11y3.speak)((0, import_i18n5.__)("You are currently in Design mode."));
    }
  };
  function setBlockMovingClientId() {
    (0, import_deprecated4.default)(
      'wp.data.dispatch( "core/block-editor" ).setBlockMovingClientId',
      {
        since: "6.7",
        hint: "Block moving mode feature has been removed"
      }
    );
    return {
      type: "DO_NOTHING"
    };
  }
  var duplicateBlocks = (clientIds, updateSelection = true) => ({ select: select3, dispatch }) => {
    if (!clientIds || !clientIds.length) {
      return;
    }
    const blocks2 = select3.getBlocksByClientId(clientIds);
    if (blocks2.some((block) => !block)) {
      return;
    }
    const blockNames = blocks2.map((block) => block.name);
    if (blockNames.some(
      (blockName) => !(0, import_blocks7.hasBlockSupport)(blockName, "multiple", true)
    )) {
      return;
    }
    const rootClientId = select3.getBlockRootClientId(clientIds[0]);
    const clientIdsArray = castArray2(clientIds);
    const lastSelectedIndex = select3.getBlockIndex(
      clientIdsArray[clientIdsArray.length - 1]
    );
    const clonedBlocks = blocks2.map(
      (block) => (0, import_blocks7.__experimentalCloneSanitizedBlock)(block)
    );
    dispatch.insertBlocks(
      clonedBlocks,
      lastSelectedIndex + 1,
      rootClientId,
      updateSelection
    );
    if (clonedBlocks.length > 1 && updateSelection) {
      dispatch.multiSelect(
        clonedBlocks[0].clientId,
        clonedBlocks[clonedBlocks.length - 1].clientId
      );
    }
    return clonedBlocks.map((block) => block.clientId);
  };
  var insertBeforeBlock = (clientId) => ({ select: select3, dispatch }) => {
    if (!clientId) {
      return;
    }
    const rootClientId = select3.getBlockRootClientId(clientId);
    const blockIndex = select3.getBlockIndex(clientId);
    const directInsertBlock = rootClientId ? select3.getDirectInsertBlock(rootClientId) : null;
    if (!directInsertBlock) {
      return dispatch.insertDefaultBlock({}, rootClientId, blockIndex);
    }
    const copiedAttributes = {};
    if (directInsertBlock.attributesToCopy) {
      const attributes = select3.getBlockAttributes(clientId);
      directInsertBlock.attributesToCopy.forEach((key) => {
        if (attributes[key]) {
          copiedAttributes[key] = attributes[key];
        }
      });
    }
    const block = (0, import_blocks7.createBlock)(directInsertBlock.name, {
      ...directInsertBlock.attributes,
      ...copiedAttributes
    });
    return dispatch.insertBlock(block, blockIndex, rootClientId);
  };
  var insertAfterBlock = (clientId) => ({ select: select3, dispatch }) => {
    if (!clientId) {
      return;
    }
    const rootClientId = select3.getBlockRootClientId(clientId);
    const blockIndex = select3.getBlockIndex(clientId);
    const directInsertBlock = rootClientId ? select3.getDirectInsertBlock(rootClientId) : null;
    if (!directInsertBlock) {
      return dispatch.insertDefaultBlock(
        {},
        rootClientId,
        blockIndex + 1
      );
    }
    const copiedAttributes = {};
    if (directInsertBlock.attributesToCopy) {
      const attributes = select3.getBlockAttributes(clientId);
      directInsertBlock.attributesToCopy.forEach((key) => {
        if (attributes[key]) {
          copiedAttributes[key] = attributes[key];
        }
      });
    }
    const block = (0, import_blocks7.createBlock)(directInsertBlock.name, {
      ...directInsertBlock.attributes,
      ...copiedAttributes
    });
    return dispatch.insertBlock(block, blockIndex + 1, rootClientId);
  };
  function toggleBlockHighlight(clientId, isHighlighted) {
    return {
      type: "TOGGLE_BLOCK_HIGHLIGHT",
      clientId,
      isHighlighted
    };
  }
  var flashBlock = (clientId, timeout = 150) => async ({ dispatch }) => {
    dispatch(toggleBlockHighlight(clientId, true));
    await new Promise((resolve) => setTimeout(resolve, timeout));
    dispatch(toggleBlockHighlight(clientId, false));
  };
  function setHasControlledInnerBlocks(clientId, hasControlledInnerBlocks) {
    return {
      type: "SET_HAS_CONTROLLED_INNER_BLOCKS",
      hasControlledInnerBlocks,
      clientId
    };
  }
  function setBlockVisibility(updates) {
    return {
      type: "SET_BLOCK_VISIBILITY",
      updates
    };
  }
  function __unstableSetTemporarilyEditingAsBlocks(clientId) {
    (0, import_deprecated4.default)(
      "wp.data.dispatch( 'core/block-editor' ).__unstableSetTemporarilyEditingAsBlocks",
      {
        since: "7.0"
      }
    );
    return editContentOnlySection(clientId);
  }
  var registerInserterMediaCategory = (category) => ({ select: select3, dispatch }) => {
    if (!category || typeof category !== "object") {
      console.error(
        "Category should be an `InserterMediaCategory` object."
      );
      return;
    }
    if (!category.name) {
      console.error(
        "Category should have a `name` that should be unique among all media categories."
      );
      return;
    }
    if (!category.labels?.name) {
      console.error("Category should have a `labels.name`.");
      return;
    }
    if (!["image", "audio", "video"].includes(category.mediaType)) {
      console.error(
        "Category should have `mediaType` property that is one of `image|audio|video`."
      );
      return;
    }
    if (!category.fetch || typeof category.fetch !== "function") {
      console.error(
        "Category should have a `fetch` function defined with the following signature `(InserterMediaRequest) => Promise<InserterMediaItem[]>`."
      );
      return;
    }
    const registeredInserterMediaCategories2 = select3.getRegisteredInserterMediaCategories();
    if (registeredInserterMediaCategories2.some(
      ({ name }) => name === category.name
    )) {
      console.error(
        `A category is already registered with the same name: "${category.name}".`
      );
      return;
    }
    if (registeredInserterMediaCategories2.some(
      ({ labels: { name } = {} }) => name === category.labels?.name
    )) {
      console.error(
        `A category is already registered with the same labels.name: "${category.labels.name}".`
      );
      return;
    }
    dispatch({
      type: "REGISTER_INSERTER_MEDIA_CATEGORY",
      category: { ...category, isExternalResource: true }
    });
  };
  function setBlockEditingMode(clientId = "", mode2) {
    return {
      type: "SET_BLOCK_EDITING_MODE",
      clientId,
      mode: mode2
    };
  }
  function unsetBlockEditingMode(clientId = "") {
    return {
      type: "UNSET_BLOCK_EDITING_MODE",
      clientId
    };
  }
  function __unstableSetOpenListViewPanel(clientId) {
    return {
      type: "SET_OPEN_LIST_VIEW_PANEL",
      clientId
    };
  }
  function __unstableSetAllListViewPanelsOpen() {
    return {
      type: "SET_ALL_LIST_VIEW_PANELS_OPEN"
    };
  }
  function __unstableToggleListViewPanel(clientId, isOpen) {
    return {
      type: "TOGGLE_LIST_VIEW_PANEL",
      clientId,
      isOpen
    };
  }
  function __unstableIncrementListViewExpandRevision() {
    return {
      type: "INCREMENT_LIST_VIEW_EXPAND_REVISION"
    };
  }

  // packages/block-editor/build-module/store/index.mjs
  var storeConfig = {
    reducer: reducer_default,
    selectors: selectors_exports,
    actions: actions_exports
  };
  var store = (0, import_data5.createReduxStore)(STORE_NAME, {
    ...storeConfig,
    persist: ["preferences"]
  });
  var registeredStore = (0, import_data5.registerStore)(STORE_NAME, {
    ...storeConfig,
    persist: ["preferences"]
  });
  unlock(registeredStore).registerPrivateActions(private_actions_exports);
  unlock(registeredStore).registerPrivateSelectors(private_selectors_exports);
  unlock(store).registerPrivateActions(private_actions_exports);
  unlock(store).registerPrivateSelectors(private_selectors_exports);

  // packages/block-editor/build-module/components/warning/index.mjs
  var import_components3 = __toESM(require_components(), 1);
  var import_i18n6 = __toESM(require_i18n(), 1);
  var import_jsx_runtime119 = __toESM(require_jsx_runtime(), 1);
  function Warning({ className, actions, children, secondaryActions }) {
    return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { style: { display: "contents", all: "initial" }, children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { className: clsx_default(className, "block-editor-warning"), children: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { className: "block-editor-warning__contents", children: [
      /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("p", { className: "block-editor-warning__message", children }),
      (actions?.length > 0 || secondaryActions) && /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { className: "block-editor-warning__actions", children: [
        actions?.length > 0 && actions.map((action, i2) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
          "span",
          {
            className: "block-editor-warning__action",
            children: action
          },
          i2
        )),
        secondaryActions && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
          import_components3.DropdownMenu,
          {
            className: "block-editor-warning__secondary",
            icon: more_vertical_default,
            label: (0, import_i18n6.__)("More options"),
            popoverProps: {
              placement: "bottom-end",
              className: "block-editor-warning__dropdown"
            },
            noIcons: true,
            children: () => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_components3.MenuGroup, { children: secondaryActions.map(
              (item, pos) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
                import_components3.MenuItem,
                {
                  onClick: item.onClick,
                  children: item.title
                },
                pos
              )
            ) })
          }
        )
      ] })
    ] }) }) });
  }
  var warning_default = Warning;

  // packages/block-editor/build-module/components/block-edit/multiple-usage-warning.mjs
  var import_jsx_runtime120 = __toESM(require_jsx_runtime(), 1);
  function MultipleUsageWarning({
    originalBlockClientId,
    name,
    onReplace
  }) {
    const { selectBlock: selectBlock2 } = (0, import_data6.useDispatch)(store);
    const blockType = (0, import_blocks8.getBlockType)(name);
    return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
      warning_default,
      {
        actions: [
          /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
            import_components4.Button,
            {
              __next40pxDefaultSize: true,
              variant: "secondary",
              onClick: () => selectBlock2(originalBlockClientId),
              children: (0, import_i18n7.__)("Find original")
            },
            "find-original"
          ),
          /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
            import_components4.Button,
            {
              __next40pxDefaultSize: true,
              variant: "secondary",
              onClick: () => onReplace([]),
              children: (0, import_i18n7.__)("Remove")
            },
            "remove"
          )
        ],
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("strong", { children: [
            blockType?.title,
            ": "
          ] }),
          (0, import_i18n7.__)("This block can only be used once.")
        ]
      }
    );
  }

  // packages/block-editor/build-module/components/block-edit/index.mjs
  var import_jsx_runtime121 = __toESM(require_jsx_runtime(), 1);
  function BlockEdit({
    mayDisplayControls,
    mayDisplayParentControls,
    mayDisplayPatternEditingControls,
    blockEditingMode,
    isPreviewMode,
    // The remaining props are passed through the BlockEdit filters and are thus
    // public API!
    ...props
  }) {
    const {
      name,
      isSelected,
      clientId,
      attributes = {},
      __unstableLayoutClassNames
    } = props;
    const { layout = null, metadata = {} } = attributes;
    const { bindings } = metadata;
    const layoutSupport = (0, import_blocks9.hasBlockSupport)(name, "layout", false) || (0, import_blocks9.hasBlockSupport)(name, "__experimentalLayout", false);
    const parentBlockEditContext = useBlockEditContext();
    const isInListViewBlockSupportTree = !!parentBlockEditContext[isInListViewBlockSupportTreeKey] || (0, import_blocks9.hasBlockSupport)(name, "listView") || name === "core/navigation";
    const { originalBlockClientId } = (0, import_element8.useContext)(PrivateBlockContext);
    return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
      Provider,
      {
        value: (0, import_element8.useMemo)(
          () => ({
            name,
            isSelected,
            clientId,
            layout: layoutSupport ? layout : null,
            __unstableLayoutClassNames,
            // We use symbols in favour of an __unstable prefix to avoid
            // usage outside of the package (this context is exposed).
            [mayDisplayControlsKey]: mayDisplayControls,
            [mayDisplayParentControlsKey]: mayDisplayParentControls,
            [mayDisplayPatternEditingControlsKey]: mayDisplayPatternEditingControls && blockEditingMode !== "disabled",
            [blockEditingModeKey]: blockEditingMode,
            [blockBindingsKey]: bindings,
            [isPreviewModeKey]: isPreviewMode,
            [isInListViewBlockSupportTreeKey]: isInListViewBlockSupportTree
          }),
          [
            name,
            isSelected,
            clientId,
            layoutSupport,
            layout,
            __unstableLayoutClassNames,
            mayDisplayControls,
            mayDisplayParentControls,
            mayDisplayPatternEditingControls,
            blockEditingMode,
            bindings,
            isPreviewMode,
            isInListViewBlockSupportTree
          ]
        ),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(edit_default, { ...props }),
          originalBlockClientId && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
            MultipleUsageWarning,
            {
              originalBlockClientId,
              name,
              onReplace: props.onReplace
            }
          )
        ]
      }
    );
  }

  // packages/block-editor/build-module/components/use-settings/index.mjs
  function useSettings(...paths) {
    const { clientId = null } = useBlockEditContext();
    return (0, import_data7.useSelect)(
      (select3) => unlock(select3(store)).getBlockSettings(
        clientId,
        ...paths
      ),
      [clientId, ...paths]
    );
  }
  function useSetting(path) {
    (0, import_deprecated5.default)("wp.blockEditor.useSetting", {
      since: "6.5",
      alternative: "wp.blockEditor.useSettings",
      note: "The new useSettings function can retrieve multiple settings at once, with better performance."
    });
    const [value] = useSettings(path);
    return value;
  }

  // packages/block-editor/build-module/components/colors/with-colors.mjs
  var import_jsx_runtime122 = __toESM(require_jsx_runtime(), 1);
  var { kebabCase: kebabCase2 } = unlock(import_components5.privateApis);
  var upperFirst = ([firstLetter, ...rest]) => firstLetter.toUpperCase() + rest.join("");
  var withCustomColorPalette = (colorsArray) => (0, import_compose2.createHigherOrderComponent)(
    (WrappedComponent) => function WithCustomColorPalette(props) {
      return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(WrappedComponent, { ...props, colors: colorsArray });
    },
    "withCustomColorPalette"
  );
  var withEditorColorPalette = () => (0, import_compose2.createHigherOrderComponent)(
    (WrappedComponent) => function WithEditorColorPalette(props) {
      const [userPalette, themePalette, defaultPalette] = useSettings(
        "color.palette.custom",
        "color.palette.theme",
        "color.palette.default"
      );
      const allColors = (0, import_element9.useMemo)(
        () => [
          ...userPalette || [],
          ...themePalette || [],
          ...defaultPalette || []
        ],
        [userPalette, themePalette, defaultPalette]
      );
      return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(WrappedComponent, { ...props, colors: allColors });
    },
    "withEditorColorPalette"
  );
  function createColorHOC(colorTypes, withColorPalette) {
    const colorMap = colorTypes.reduce((colorObject, colorType) => {
      return {
        ...colorObject,
        ...typeof colorType === "string" ? { [colorType]: kebabCase2(colorType) } : colorType
      };
    }, {});
    return (0, import_compose2.compose)([
      withColorPalette,
      (WrappedComponent) => {
        return class WithColors extends import_element9.Component {
          constructor(props) {
            super(props);
            this.setters = this.createSetters();
            this.colorUtils = {
              getMostReadableColor: this.getMostReadableColor.bind(this)
            };
            this.state = {};
          }
          getMostReadableColor(colorValue) {
            const { colors: colors2 } = this.props;
            return getMostReadableColor(colors2, colorValue);
          }
          createSetters() {
            return Object.keys(colorMap).reduce(
              (settersAccumulator, colorAttributeName) => {
                const upperFirstColorAttributeName = upperFirst(colorAttributeName);
                const customColorAttributeName = `custom${upperFirstColorAttributeName}`;
                settersAccumulator[`set${upperFirstColorAttributeName}`] = this.createSetColor(
                  colorAttributeName,
                  customColorAttributeName
                );
                return settersAccumulator;
              },
              {}
            );
          }
          createSetColor(colorAttributeName, customColorAttributeName) {
            return (colorValue) => {
              const colorObject = getColorObjectByColorValue(
                this.props.colors,
                colorValue
              );
              this.props.setAttributes({
                [colorAttributeName]: colorObject && colorObject.slug ? colorObject.slug : void 0,
                [customColorAttributeName]: colorObject && colorObject.slug ? void 0 : colorValue
              });
            };
          }
          static getDerivedStateFromProps({ attributes, colors: colors2 }, previousState) {
            return Object.entries(colorMap).reduce(
              (newState, [colorAttributeName, colorContext]) => {
                const colorObject = getColorObjectByAttributeValues(
                  colors2,
                  attributes[colorAttributeName],
                  attributes[`custom${upperFirst(
                    colorAttributeName
                  )}`]
                );
                const previousColorObject = previousState[colorAttributeName];
                const previousColor = previousColorObject?.color;
                if (previousColor === colorObject.color && previousColorObject) {
                  newState[colorAttributeName] = previousColorObject;
                } else {
                  newState[colorAttributeName] = {
                    ...colorObject,
                    class: getColorClassName(
                      colorContext,
                      colorObject.slug
                    )
                  };
                }
                return newState;
              },
              {}
            );
          }
          render() {
            return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
              WrappedComponent,
              {
                ...{
                  ...this.props,
                  colors: void 0,
                  ...this.state,
                  ...this.setters,
                  colorUtils: this.colorUtils
                }
              }
            );
          }
        };
      }
    ]);
  }
  function createCustomColorsHOC(colorsArray) {
    return (...colorTypes) => {
      const withColorPalette = withCustomColorPalette(colorsArray);
      return (0, import_compose2.createHigherOrderComponent)(
        createColorHOC(colorTypes, withColorPalette),
        "withCustomColors"
      );
    };
  }
  function withColors(...colorTypes) {
    const withColorPalette = withEditorColorPalette();
    return (0, import_compose2.createHigherOrderComponent)(
      createColorHOC(colorTypes, withColorPalette),
      "withColors"
    );
  }

  // packages/block-editor/build-module/components/gradients/use-gradient.mjs
  var import_element10 = __toESM(require_element(), 1);
  var import_data8 = __toESM(require_data(), 1);
  function __experimentalGetGradientClass(gradientSlug) {
    if (!gradientSlug) {
      return void 0;
    }
    return `has-${gradientSlug}-gradient-background`;
  }
  function getGradientValueBySlug(gradients, slug) {
    const gradient = gradients?.find((g2) => g2.slug === slug);
    return gradient && gradient.gradient;
  }
  function __experimentalGetGradientObjectByGradientValue(gradients, value) {
    const gradient = gradients?.find((g2) => g2.gradient === value);
    return gradient;
  }
  function getGradientSlugByValue(gradients, value) {
    const gradient = __experimentalGetGradientObjectByGradientValue(
      gradients,
      value
    );
    return gradient && gradient.slug;
  }
  function __experimentalUseGradient({
    gradientAttribute = "gradient",
    customGradientAttribute = "customGradient"
  } = {}) {
    const { clientId } = useBlockEditContext();
    const [
      userGradientPalette,
      themeGradientPalette,
      defaultGradientPalette
    ] = useSettings(
      "color.gradients.custom",
      "color.gradients.theme",
      "color.gradients.default"
    );
    const allGradients = (0, import_element10.useMemo)(
      () => [
        ...userGradientPalette || [],
        ...themeGradientPalette || [],
        ...defaultGradientPalette || []
      ],
      [userGradientPalette, themeGradientPalette, defaultGradientPalette]
    );
    const { gradient, customGradient } = (0, import_data8.useSelect)(
      (select3) => {
        const { getBlockAttributes: getBlockAttributes3 } = select3(store);
        const attributes = getBlockAttributes3(clientId) || {};
        return {
          customGradient: attributes[customGradientAttribute],
          gradient: attributes[gradientAttribute]
        };
      },
      [clientId, gradientAttribute, customGradientAttribute]
    );
    const { updateBlockAttributes: updateBlockAttributes2 } = (0, import_data8.useDispatch)(store);
    const setGradient = (0, import_element10.useCallback)(
      (newGradientValue) => {
        const slug = getGradientSlugByValue(
          allGradients,
          newGradientValue
        );
        if (slug) {
          updateBlockAttributes2(clientId, {
            [gradientAttribute]: slug,
            [customGradientAttribute]: void 0
          });
          return;
        }
        updateBlockAttributes2(clientId, {
          [gradientAttribute]: void 0,
          [customGradientAttribute]: newGradientValue
        });
      },
      [allGradients, clientId, updateBlockAttributes2]
    );
    const gradientClass = __experimentalGetGradientClass(gradient);
    let gradientValue;
    if (gradient) {
      gradientValue = getGradientValueBySlug(allGradients, gradient);
    } else {
      gradientValue = customGradient;
    }
    return { gradientClass, gradientValue, setGradient };
  }

  // packages/block-editor/build-module/components/font-sizes/utils.mjs
  var import_components6 = __toESM(require_components(), 1);
  var { kebabCase: kebabCase3 } = unlock(import_components6.privateApis);
  var getFontSize = (fontSizes, fontSizeAttribute, customFontSizeAttribute) => {
    if (fontSizeAttribute) {
      const fontSizeObject = fontSizes?.find(
        ({ slug }) => slug === fontSizeAttribute
      );
      if (fontSizeObject) {
        return fontSizeObject;
      }
    }
    return {
      size: customFontSizeAttribute
    };
  };
  function getFontSizeObjectByValue(fontSizes, value) {
    const fontSizeObject = fontSizes?.find(({ size }) => size === value);
    if (fontSizeObject) {
      return fontSizeObject;
    }
    return {
      size: value
    };
  }
  function getFontSizeClass(fontSizeSlug) {
    if (!fontSizeSlug) {
      return;
    }
    return `has-${kebabCase3(fontSizeSlug)}-font-size`;
  }

  // packages/block-editor/build-module/components/font-sizes/fluid-utils.mjs
  var DEFAULT_MAXIMUM_VIEWPORT_WIDTH = "1600px";
  var DEFAULT_MINIMUM_VIEWPORT_WIDTH = "320px";
  var DEFAULT_SCALE_FACTOR = 1;
  var DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN = 0.25;
  var DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX = 0.75;
  var DEFAULT_MINIMUM_FONT_SIZE_LIMIT = "14px";
  function getComputedFluidTypographyValue({
    minimumFontSize,
    maximumFontSize,
    fontSize,
    minimumViewportWidth = DEFAULT_MINIMUM_VIEWPORT_WIDTH,
    maximumViewportWidth = DEFAULT_MAXIMUM_VIEWPORT_WIDTH,
    scaleFactor = DEFAULT_SCALE_FACTOR,
    minimumFontSizeLimit
  }) {
    minimumFontSizeLimit = !!getTypographyValueAndUnit(minimumFontSizeLimit) ? minimumFontSizeLimit : DEFAULT_MINIMUM_FONT_SIZE_LIMIT;
    if (fontSize) {
      const fontSizeParsed = getTypographyValueAndUnit(fontSize);
      if (!fontSizeParsed?.unit) {
        return null;
      }
      const minimumFontSizeLimitParsed = getTypographyValueAndUnit(
        minimumFontSizeLimit,
        {
          coerceTo: fontSizeParsed.unit
        }
      );
      if (!!minimumFontSizeLimitParsed?.value && !minimumFontSize && !maximumFontSize) {
        if (fontSizeParsed?.value <= minimumFontSizeLimitParsed?.value) {
          return null;
        }
      }
      if (!maximumFontSize) {
        maximumFontSize = `${fontSizeParsed.value}${fontSizeParsed.unit}`;
      }
      if (!minimumFontSize) {
        const fontSizeValueInPx = fontSizeParsed.unit === "px" ? fontSizeParsed.value : fontSizeParsed.value * 16;
        const minimumFontSizeFactor = Math.min(
          Math.max(
            1 - 0.075 * Math.log2(fontSizeValueInPx),
            DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN
          ),
          DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX
        );
        const calculatedMinimumFontSize = roundToPrecision(
          fontSizeParsed.value * minimumFontSizeFactor,
          3
        );
        if (!!minimumFontSizeLimitParsed?.value && calculatedMinimumFontSize < minimumFontSizeLimitParsed?.value) {
          minimumFontSize = `${minimumFontSizeLimitParsed.value}${minimumFontSizeLimitParsed.unit}`;
        } else {
          minimumFontSize = `${calculatedMinimumFontSize}${fontSizeParsed.unit}`;
        }
      }
    }
    const minimumFontSizeParsed = getTypographyValueAndUnit(minimumFontSize);
    const fontSizeUnit = minimumFontSizeParsed?.unit || "rem";
    const maximumFontSizeParsed = getTypographyValueAndUnit(maximumFontSize, {
      coerceTo: fontSizeUnit
    });
    if (!minimumFontSizeParsed || !maximumFontSizeParsed) {
      return null;
    }
    const minimumFontSizeRem = getTypographyValueAndUnit(minimumFontSize, {
      coerceTo: "rem"
    });
    const maximumViewportWidthParsed = getTypographyValueAndUnit(
      maximumViewportWidth,
      { coerceTo: fontSizeUnit }
    );
    const minimumViewportWidthParsed = getTypographyValueAndUnit(
      minimumViewportWidth,
      { coerceTo: fontSizeUnit }
    );
    if (!maximumViewportWidthParsed || !minimumViewportWidthParsed || !minimumFontSizeRem) {
      return null;
    }
    const linearDenominator = maximumViewportWidthParsed.value - minimumViewportWidthParsed.value;
    if (!linearDenominator) {
      return null;
    }
    const minViewportWidthOffsetValue = roundToPrecision(
      minimumViewportWidthParsed.value / 100,
      3
    );
    const viewportWidthOffset = roundToPrecision(minViewportWidthOffsetValue, 3) + fontSizeUnit;
    const linearFactor = 100 * ((maximumFontSizeParsed.value - minimumFontSizeParsed.value) / linearDenominator);
    const linearFactorScaled = roundToPrecision(
      (linearFactor || 1) * scaleFactor,
      3
    );
    const fluidTargetFontSize = `${minimumFontSizeRem.value}${minimumFontSizeRem.unit} + ((1vw - ${viewportWidthOffset}) * ${linearFactorScaled})`;
    return `clamp(${minimumFontSize}, ${fluidTargetFontSize}, ${maximumFontSize})`;
  }
  function getTypographyValueAndUnit(rawValue, options = {}) {
    if (typeof rawValue !== "string" && typeof rawValue !== "number") {
      return null;
    }
    if (isFinite(rawValue)) {
      rawValue = `${rawValue}px`;
    }
    const { coerceTo, rootSizeValue, acceptableUnits } = {
      coerceTo: "",
      // Default browser font size. Later we could inject some JS to compute this `getComputedStyle( document.querySelector( "html" ) ).fontSize`.
      rootSizeValue: 16,
      acceptableUnits: ["rem", "px", "em"],
      ...options
    };
    const acceptableUnitsGroup = acceptableUnits?.join("|");
    const regexUnits = new RegExp(
      `^(\\d*\\.?\\d+)(${acceptableUnitsGroup}){1,1}$`
    );
    const matches = rawValue.match(regexUnits);
    if (!matches || matches.length < 3) {
      return null;
    }
    let [, value, unit] = matches;
    let returnValue = parseFloat(value);
    if ("px" === coerceTo && ("em" === unit || "rem" === unit)) {
      returnValue = returnValue * rootSizeValue;
      unit = coerceTo;
    }
    if ("px" === unit && ("em" === coerceTo || "rem" === coerceTo)) {
      returnValue = returnValue / rootSizeValue;
      unit = coerceTo;
    }
    if (("em" === coerceTo || "rem" === coerceTo) && ("em" === unit || "rem" === unit)) {
      unit = coerceTo;
    }
    return {
      value: roundToPrecision(returnValue, 3),
      unit
    };
  }
  function roundToPrecision(value, digits = 3) {
    const base = Math.pow(10, digits);
    return Number.isFinite(value) ? parseFloat(Math.round(value * base) / base) : void 0;
  }

  // packages/block-editor/build-module/components/font-sizes/font-size-picker.mjs
  var import_components7 = __toESM(require_components(), 1);
  var import_jsx_runtime123 = __toESM(require_jsx_runtime(), 1);
  function FontSizePicker(props) {
    const [fontSizes, customFontSize] = useSettings(
      "typography.fontSizes",
      "typography.customFontSize"
    );
    return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
      import_components7.FontSizePicker,
      {
        ...props,
        fontSizes,
        disableCustomFontSizes: !customFontSize,
        __next40pxDefaultSize: true
      }
    );
  }
  var font_size_picker_default = FontSizePicker;

  // packages/block-editor/build-module/components/font-sizes/with-font-sizes.mjs
  var import_compose3 = __toESM(require_compose(), 1);
  var import_element11 = __toESM(require_element(), 1);
  var import_jsx_runtime124 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_FONT_SIZES = [];
  var upperFirst2 = ([firstLetter, ...rest]) => firstLetter.toUpperCase() + rest.join("");
  var with_font_sizes_default = (...fontSizeNames) => {
    const fontSizeAttributeNames = fontSizeNames.reduce(
      (fontSizeAttributeNamesAccumulator, fontSizeAttributeName) => {
        fontSizeAttributeNamesAccumulator[fontSizeAttributeName] = `custom${upperFirst2(fontSizeAttributeName)}`;
        return fontSizeAttributeNamesAccumulator;
      },
      {}
    );
    return (0, import_compose3.createHigherOrderComponent)(
      (0, import_compose3.compose)([
        (0, import_compose3.createHigherOrderComponent)(
          (WrappedComponent) => function WithFontSizesInner(props) {
            const [fontSizes] = useSettings(
              "typography.fontSizes"
            );
            return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
              WrappedComponent,
              {
                ...props,
                fontSizes: fontSizes || DEFAULT_FONT_SIZES
              }
            );
          },
          "withFontSizes"
        ),
        (WrappedComponent) => {
          return class WithFontSizes extends import_element11.Component {
            constructor(props) {
              super(props);
              this.setters = this.createSetters();
              this.state = {};
            }
            createSetters() {
              return Object.entries(fontSizeAttributeNames).reduce(
                (settersAccumulator, [
                  fontSizeAttributeName,
                  customFontSizeAttributeName
                ]) => {
                  const upperFirstFontSizeAttributeName = upperFirst2(fontSizeAttributeName);
                  settersAccumulator[`set${upperFirstFontSizeAttributeName}`] = this.createSetFontSize(
                    fontSizeAttributeName,
                    customFontSizeAttributeName
                  );
                  return settersAccumulator;
                },
                {}
              );
            }
            createSetFontSize(fontSizeAttributeName, customFontSizeAttributeName) {
              return (fontSizeValue) => {
                const fontSizeObject = this.props.fontSizes?.find(
                  ({ size }) => size === Number(fontSizeValue)
                );
                this.props.setAttributes({
                  [fontSizeAttributeName]: fontSizeObject && fontSizeObject.slug ? fontSizeObject.slug : void 0,
                  [customFontSizeAttributeName]: fontSizeObject && fontSizeObject.slug ? void 0 : fontSizeValue
                });
              };
            }
            static getDerivedStateFromProps({ attributes, fontSizes }, previousState) {
              const didAttributesChange = (customFontSizeAttributeName, fontSizeAttributeName) => {
                if (previousState[fontSizeAttributeName]) {
                  if (attributes[fontSizeAttributeName]) {
                    return attributes[fontSizeAttributeName] !== previousState[fontSizeAttributeName].slug;
                  }
                  return previousState[fontSizeAttributeName].size !== attributes[customFontSizeAttributeName];
                }
                return true;
              };
              if (!Object.values(fontSizeAttributeNames).some(
                didAttributesChange
              )) {
                return null;
              }
              const newState = Object.entries(
                fontSizeAttributeNames
              ).filter(
                ([key, value]) => didAttributesChange(value, key)
              ).reduce(
                (newStateAccumulator, [
                  fontSizeAttributeName,
                  customFontSizeAttributeName
                ]) => {
                  const fontSizeAttributeValue = attributes[fontSizeAttributeName];
                  const fontSizeObject = getFontSize(
                    fontSizes,
                    fontSizeAttributeValue,
                    attributes[customFontSizeAttributeName]
                  );
                  newStateAccumulator[fontSizeAttributeName] = {
                    ...fontSizeObject,
                    class: getFontSizeClass(
                      fontSizeAttributeValue
                    )
                  };
                  return newStateAccumulator;
                },
                {}
              );
              return {
                ...previousState,
                ...newState
              };
            }
            render() {
              return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
                WrappedComponent,
                {
                  ...{
                    ...this.props,
                    fontSizes: void 0,
                    ...this.state,
                    ...this.setters
                  }
                }
              );
            }
          };
        }
      ]),
      "withFontSizes"
    );
  };

  // packages/block-editor/build-module/components/alignment-control/ui.mjs
  var import_i18n8 = __toESM(require_i18n(), 1);
  var import_components8 = __toESM(require_components(), 1);
  var import_jsx_runtime125 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_ALIGNMENT_CONTROLS = [
    {
      icon: align_left_default,
      title: (0, import_i18n8.__)("Align text left"),
      align: "left"
    },
    {
      icon: align_center_default,
      title: (0, import_i18n8.__)("Align text center"),
      align: "center"
    },
    {
      icon: align_right_default,
      title: (0, import_i18n8.__)("Align text right"),
      align: "right"
    }
  ];
  var POPOVER_PROPS = {
    placement: "bottom-start"
  };
  function AlignmentUI({
    value,
    onChange,
    alignmentControls = DEFAULT_ALIGNMENT_CONTROLS,
    label = (0, import_i18n8.__)("Align text"),
    description = (0, import_i18n8.__)("Change text alignment"),
    isCollapsed: isCollapsed3 = true,
    isToolbar
  }) {
    function applyOrUnset(align) {
      return () => onChange(value === align ? void 0 : align);
    }
    const activeAlignment = alignmentControls.find(
      (control) => control.align === value
    );
    function setIcon() {
      if (activeAlignment) {
        return activeAlignment.icon;
      }
      return (0, import_i18n8.isRTL)() ? align_right_default : align_left_default;
    }
    const UIComponent = isToolbar ? import_components8.ToolbarGroup : import_components8.ToolbarDropdownMenu;
    const extraProps = isToolbar ? { isCollapsed: isCollapsed3 } : {
      toggleProps: {
        description
      },
      popoverProps: POPOVER_PROPS
    };
    return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
      UIComponent,
      {
        icon: setIcon(),
        label,
        controls: alignmentControls.map((control) => {
          const { align } = control;
          const isActive = value === align;
          return {
            ...control,
            isActive,
            role: isCollapsed3 ? "menuitemradio" : void 0,
            onClick: applyOrUnset(align)
          };
        }),
        ...extraProps
      }
    );
  }
  var ui_default = AlignmentUI;

  // packages/block-editor/build-module/components/alignment-control/index.mjs
  var import_jsx_runtime126 = __toESM(require_jsx_runtime(), 1);
  var AlignmentControl = (props) => {
    return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ui_default, { ...props, isToolbar: false });
  };
  var AlignmentToolbar = (props) => {
    return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ui_default, { ...props, isToolbar: true });
  };

  // packages/block-editor/build-module/components/autocomplete/index.mjs
  var import_hooks3 = __toESM(require_hooks(), 1);
  var import_components10 = __toESM(require_components(), 1);
  var import_element15 = __toESM(require_element(), 1);
  var import_blocks12 = __toESM(require_blocks(), 1);

  // packages/block-editor/build-module/autocompleters/block.mjs
  var import_data10 = __toESM(require_data(), 1);
  var import_blocks11 = __toESM(require_blocks(), 1);
  var import_element14 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/inserter/search-items.mjs
  var import_remove_accents = __toESM(require_remove_accents(), 1);

  // node_modules/tslib/tslib.es6.mjs
  var extendStatics = function(d2, b2) {
    extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
      d3.__proto__ = b3;
    } || function(d3, b3) {
      for (var p2 in b3) if (Object.prototype.hasOwnProperty.call(b3, p2)) d3[p2] = b3[p2];
    };
    return extendStatics(d2, b2);
  };
  function __extends(d2, b2) {
    if (typeof b2 !== "function" && b2 !== null)
      throw new TypeError("Class extends value " + String(b2) + " is not a constructor or null");
    extendStatics(d2, b2);
    function __223() {
      this.constructor = d2;
    }
    d2.prototype = b2 === null ? Object.create(b2) : (__223.prototype = b2.prototype, new __223());
  }
  var __assign = function() {
    __assign = Object.assign || function __assign2(t3) {
      for (var s2, i2 = 1, n2 = arguments.length; i2 < n2; i2++) {
        s2 = arguments[i2];
        for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2)) t3[p2] = s2[p2];
      }
      return t3;
    };
    return __assign.apply(this, arguments);
  };

  // node_modules/lower-case/dist.es2015/index.js
  function lowerCase(str) {
    return str.toLowerCase();
  }

  // node_modules/no-case/dist.es2015/index.js
  var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
  var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
  function noCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    var _a = options.splitRegexp, splitRegexp2 = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp2 = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d;
    var result = replace(replace(input, splitRegexp2, "$1\0$2"), stripRegexp2, "\0");
    var start2 = 0;
    var end = result.length;
    while (result.charAt(start2) === "\0")
      start2++;
    while (result.charAt(end - 1) === "\0")
      end--;
    return result.slice(start2, end).split("\0").map(transform).join(delimiter);
  }
  function replace(input, re, value) {
    if (re instanceof RegExp)
      return input.replace(re, value);
    return re.reduce(function(input2, re2) {
      return input2.replace(re2, value);
    }, input);
  }

  // packages/block-editor/build-module/components/inserter/search-items.mjs
  var defaultGetName = (item) => item.name || "";
  var defaultGetTitle = (item) => item.title;
  var defaultGetDescription = (item) => item.description || "";
  var defaultGetKeywords = (item) => item.keywords || [];
  var defaultGetCategory = (item) => item.category;
  var defaultGetCollection = () => null;
  var splitRegexp = [
    /([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,
    // One lowercase or digit, followed by one uppercase.
    /([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu
    // One uppercase followed by one uppercase and one lowercase.
  ];
  var stripRegexp = new RegExp("(\\p{C}|\\p{P}|\\p{S})+", "giu");
  var extractedWords = /* @__PURE__ */ new Map();
  var normalizedStrings = /* @__PURE__ */ new Map();
  function extractWords(input = "") {
    if (extractedWords.has(input)) {
      return extractedWords.get(input);
    }
    const result = noCase(input, {
      splitRegexp,
      stripRegexp
    }).split(" ").filter(Boolean);
    extractedWords.set(input, result);
    return result;
  }
  function normalizeString(input = "") {
    if (normalizedStrings.has(input)) {
      return normalizedStrings.get(input);
    }
    let result = (0, import_remove_accents.default)(input);
    result = result.replace(/^\//, "");
    result = result.toLowerCase();
    normalizedStrings.set(input, result);
    return result;
  }
  var getNormalizedSearchTerms = (input = "") => {
    return extractWords(normalizeString(input));
  };
  var removeMatchingTerms = (unmatchedTerms, unprocessedTerms) => {
    return unmatchedTerms.filter(
      (term) => !getNormalizedSearchTerms(unprocessedTerms).some(
        (unprocessedTerm) => unprocessedTerm.includes(term)
      )
    );
  };
  var searchBlockItems = (items, categories, collections, searchInput) => {
    const normalizedSearchTerms = getNormalizedSearchTerms(searchInput);
    if (normalizedSearchTerms.length === 0) {
      return items;
    }
    const config2 = {
      getCategory: (item) => categories.find(({ slug }) => slug === item.category)?.title,
      getCollection: (item) => collections[item.name.split("/")[0]]?.title
    };
    return searchItems(items, searchInput, config2);
  };
  var searchItems = (items = [], searchInput = "", config2 = {}) => {
    const normalizedSearchTerms = getNormalizedSearchTerms(searchInput);
    if (normalizedSearchTerms.length === 0) {
      return items;
    }
    const rankedItems = items.map((item) => {
      return [item, getItemSearchRank(item, searchInput, config2)];
    }).filter(([, rank]) => rank > 0);
    rankedItems.sort(([, rank1], [, rank2]) => rank2 - rank1);
    return rankedItems.map(([item]) => item);
  };
  function getItemSearchRank(item, searchTerm, config2 = {}) {
    const {
      getName = defaultGetName,
      getTitle = defaultGetTitle,
      getDescription = defaultGetDescription,
      getKeywords = defaultGetKeywords,
      getCategory = defaultGetCategory,
      getCollection = defaultGetCollection
    } = config2;
    const name = getName(item);
    const title = getTitle(item);
    const description = getDescription(item);
    const keywords = getKeywords(item);
    const category = getCategory(item);
    const collection = getCollection(item);
    const normalizedSearchInput = normalizeString(searchTerm);
    const normalizedTitle = normalizeString(title);
    let rank = 0;
    if (normalizedSearchInput === normalizedTitle) {
      rank += 30;
    } else if (normalizedTitle.startsWith(normalizedSearchInput)) {
      rank += 20;
    } else {
      const terms = [
        name,
        title,
        description,
        ...keywords,
        category,
        collection
      ].join(" ");
      const normalizedSearchTerms = extractWords(normalizedSearchInput);
      const unmatchedTerms = removeMatchingTerms(
        normalizedSearchTerms,
        terms
      );
      if (unmatchedTerms.length === 0) {
        rank += 10;
      }
    }
    if (rank !== 0 && name.startsWith("core/")) {
      const isCoreBlockVariation = name !== item.id;
      rank += isCoreBlockVariation ? 1 : 2;
    }
    return rank;
  }

  // packages/block-editor/build-module/components/inserter/hooks/use-block-types-state.mjs
  var import_blocks10 = __toESM(require_blocks(), 1);
  var import_data9 = __toESM(require_data(), 1);
  var import_element12 = __toESM(require_element(), 1);
  var import_notices2 = __toESM(require_notices(), 1);
  var import_i18n9 = __toESM(require_i18n(), 1);
  var useBlockTypesState = (rootClientId, onInsert, isQuick) => {
    const options = (0, import_element12.useMemo)(
      () => ({ [isFiltered]: !!isQuick }),
      [isQuick]
    );
    const [items] = (0, import_data9.useSelect)(
      (select3) => [
        select3(store).getInserterItems(
          rootClientId,
          options
        )
      ],
      [rootClientId, options]
    );
    const { getClosestAllowedInsertionPoint: getClosestAllowedInsertionPoint2 } = unlock(
      (0, import_data9.useSelect)(store)
    );
    const { createErrorNotice } = (0, import_data9.useDispatch)(import_notices2.store);
    const [categories, collections] = (0, import_data9.useSelect)((select3) => {
      const { getCategories, getCollections } = select3(import_blocks10.store);
      return [getCategories(), getCollections()];
    }, []);
    const onSelectItem = (0, import_element12.useCallback)(
      ({ name, initialAttributes, innerBlocks, syncStatus, content }, shouldFocusBlock) => {
        const destinationClientId = getClosestAllowedInsertionPoint2(
          name,
          rootClientId
        );
        if (destinationClientId === null) {
          const title = (0, import_blocks10.getBlockType)(name)?.title ?? name;
          createErrorNotice(
            (0, import_i18n9.sprintf)(
              /* translators: %s: block pattern title. */
              (0, import_i18n9.__)(`Block "%s" can't be inserted.`),
              title
            ),
            {
              type: "snackbar",
              id: "inserter-notice"
            }
          );
          return;
        }
        const insertedBlock = syncStatus === "unsynced" ? (0, import_blocks10.parse)(content, {
          __unstableSkipMigrationLogs: true
        }) : (0, import_blocks10.createBlock)(
          name,
          initialAttributes,
          (0, import_blocks10.createBlocksFromInnerBlocksTemplate)(innerBlocks)
        );
        onInsert(
          insertedBlock,
          void 0,
          shouldFocusBlock,
          destinationClientId
        );
      },
      [
        getClosestAllowedInsertionPoint2,
        rootClientId,
        onInsert,
        createErrorNotice
      ]
    );
    return [items, categories, collections, onSelectItem];
  };
  var use_block_types_state_default = useBlockTypesState;

  // packages/block-editor/build-module/components/block-icon/index.mjs
  var import_components9 = __toESM(require_components(), 1);
  var import_element13 = __toESM(require_element(), 1);
  var import_jsx_runtime127 = __toESM(require_jsx_runtime(), 1);
  function BlockIcon({ icon, showColors = false, className, context }) {
    if (icon?.src === "block-default") {
      icon = {
        src: block_default_default
      };
    }
    const renderedIcon = /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_components9.Icon, { icon: icon && icon.src ? icon.src : icon, context });
    const style = showColors ? {
      backgroundColor: icon && icon.background,
      color: icon && icon.foreground
    } : {};
    return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
      "span",
      {
        style,
        className: clsx_default("block-editor-block-icon", className, {
          "has-colors": showColors
        }),
        children: renderedIcon
      }
    );
  }
  var block_icon_default = (0, import_element13.memo)(BlockIcon);

  // packages/block-editor/build-module/utils/order-inserter-block-items.mjs
  var orderInserterBlockItems = (items, priority2) => {
    if (!priority2) {
      return items;
    }
    items.sort(({ id: aName }, { id: bName }) => {
      let aIndex = priority2.indexOf(aName);
      let bIndex = priority2.indexOf(bName);
      if (aIndex < 0) {
        aIndex = priority2.length;
      }
      if (bIndex < 0) {
        bIndex = priority2.length;
      }
      return aIndex - bIndex;
    });
    return items;
  };

  // packages/block-editor/build-module/autocompleters/block.mjs
  var import_jsx_runtime128 = __toESM(require_jsx_runtime(), 1);
  var noop = () => {
  };
  var SHOWN_BLOCK_TYPES = 9;
  function createBlockCompleter() {
    return {
      name: "blocks",
      className: "block-editor-autocompleters__block",
      triggerPrefix: "/",
      useItems(filterValue) {
        const { rootClientId, selectedBlockId, prioritizedBlocks } = (0, import_data10.useSelect)((select3) => {
          const {
            getSelectedBlockClientId: getSelectedBlockClientId2,
            getBlock: getBlock2,
            getBlockListSettings: getBlockListSettings2,
            getBlockRootClientId: getBlockRootClientId2
          } = select3(store);
          const { getActiveBlockVariation } = select3(import_blocks11.store);
          const selectedBlockClientId = getSelectedBlockClientId2();
          const { name: blockName, attributes } = getBlock2(
            selectedBlockClientId
          );
          const activeBlockVariation = getActiveBlockVariation(
            blockName,
            attributes
          );
          const _rootClientId = getBlockRootClientId2(
            selectedBlockClientId
          );
          return {
            selectedBlockId: activeBlockVariation ? `${blockName}/${activeBlockVariation.name}` : blockName,
            rootClientId: _rootClientId,
            prioritizedBlocks: getBlockListSettings2(_rootClientId)?.prioritizedInserterBlocks
          };
        }, []);
        const [items, categories, collections] = use_block_types_state_default(
          rootClientId,
          noop,
          true
        );
        const filteredItems = (0, import_element14.useMemo)(() => {
          const initialFilteredItems = !!filterValue.trim() ? searchBlockItems(
            items,
            categories,
            collections,
            filterValue
          ) : orderInserterBlockItems(
            orderBy(items, "frecency", "desc"),
            prioritizedBlocks
          );
          return initialFilteredItems.filter((item) => item.id !== selectedBlockId).slice(0, SHOWN_BLOCK_TYPES);
        }, [
          filterValue,
          selectedBlockId,
          items,
          categories,
          collections,
          prioritizedBlocks
        ]);
        const options = (0, import_element14.useMemo)(
          () => filteredItems.map((blockItem) => {
            const { title, icon, isDisabled } = blockItem;
            return {
              key: `block-${blockItem.id}`,
              value: blockItem,
              label: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_jsx_runtime128.Fragment, { children: [
                /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
                  block_icon_default,
                  {
                    icon,
                    showColors: true
                  },
                  "icon"
                ),
                title
              ] }),
              isDisabled
            };
          }),
          [filteredItems]
        );
        return [options];
      },
      allowContext(before, after) {
        return !(/\S/.test(before) || /\S/.test(after));
      },
      getOptionCompletion(inserterItem) {
        const { name, initialAttributes, innerBlocks, syncStatus, blocks: blocks2 } = inserterItem;
        return {
          action: "replace",
          value: syncStatus === "unsynced" ? (blocks2 ?? []).map(
            (block) => (0, import_blocks11.cloneBlock)(block)
          ) : (0, import_blocks11.createBlock)(
            name,
            initialAttributes,
            (0, import_blocks11.createBlocksFromInnerBlocksTemplate)(
              innerBlocks
            )
          )
        };
      }
    };
  }
  var block_default = createBlockCompleter();

  // packages/block-editor/build-module/autocompleters/link.mjs
  var import_api_fetch = __toESM(require_api_fetch(), 1);
  var import_url2 = __toESM(require_url(), 1);
  var import_html_entities = __toESM(require_html_entities(), 1);
  var import_jsx_runtime129 = __toESM(require_jsx_runtime(), 1);
  var SHOWN_SUGGESTIONS = 10;
  function createLinkCompleter() {
    return {
      name: "links",
      className: "block-editor-autocompleters__link",
      triggerPrefix: "[[",
      options: async (letters) => {
        let options = await (0, import_api_fetch.default)({
          path: (0, import_url2.addQueryArgs)("/wp/v2/search", {
            per_page: SHOWN_SUGGESTIONS,
            search: letters,
            type: "post",
            order_by: "menu_order"
          })
        });
        options = options.filter((option) => option.title !== "");
        return options;
      },
      getOptionKeywords(item) {
        const expansionWords = item.title.split(/\s+/);
        return [...expansionWords];
      },
      getOptionLabel(item) {
        return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(import_jsx_runtime129.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
            icon_default,
            {
              icon: item.subtype === "page" ? page_default : post_default
            },
            "icon"
          ),
          (0, import_html_entities.decodeEntities)(item.title)
        ] });
      },
      getOptionCompletion(item) {
        return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("a", { href: item.url, children: item.title });
      }
    };
  }
  var link_default2 = createLinkCompleter();

  // packages/block-editor/build-module/components/autocomplete/index.mjs
  var import_jsx_runtime130 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_ARRAY3 = [];
  function useCompleters({ completers = EMPTY_ARRAY3 }) {
    const { name } = useBlockEditContext();
    return (0, import_element15.useMemo)(() => {
      let filteredCompleters = [...completers, link_default2];
      if (name === (0, import_blocks12.getDefaultBlockName)() || (0, import_blocks12.getBlockSupport)(name, "__experimentalSlashInserter", false)) {
        filteredCompleters = [...filteredCompleters, block_default];
      }
      if ((0, import_hooks3.hasFilter)("editor.Autocomplete.completers")) {
        if (filteredCompleters === completers) {
          filteredCompleters = filteredCompleters.map(
            (completer) => ({ ...completer })
          );
        }
        filteredCompleters = (0, import_hooks3.applyFilters)(
          "editor.Autocomplete.completers",
          filteredCompleters,
          name
        );
      }
      return filteredCompleters;
    }, [completers, name]);
  }
  function useBlockEditorAutocompleteProps(props) {
    return (0, import_components10.__unstableUseAutocompleteProps)({
      ...props,
      completers: useCompleters(props)
    });
  }
  function BlockEditorAutocomplete(props) {
    return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_components10.Autocomplete, { ...props, completers: useCompleters(props) });
  }
  var autocomplete_default = BlockEditorAutocomplete;

  // packages/block-editor/build-module/components/block-alignment-control/ui.mjs
  var import_i18n17 = __toESM(require_i18n(), 1);
  var import_components16 = __toESM(require_components(), 1);

  // packages/block-editor/build-module/components/block-alignment-control/use-available-alignments.mjs
  var import_data11 = __toESM(require_data(), 1);

  // packages/block-editor/build-module/components/block-list/layout.mjs
  var import_element17 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/layouts/flex.mjs
  var import_i18n12 = __toESM(require_i18n(), 1);
  var import_components11 = __toESM(require_components(), 1);

  // packages/block-editor/build-module/layouts/utils.mjs
  var import_i18n10 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/layouts/definitions.mjs
  var LAYOUT_DEFINITIONS = {
    default: {
      name: "default",
      slug: "flow",
      className: "is-layout-flow",
      baseStyles: [
        {
          selector: " > .alignleft",
          rules: {
            float: "left",
            "margin-inline-start": "0",
            "margin-inline-end": "2em"
          }
        },
        {
          selector: " > .alignright",
          rules: {
            float: "right",
            "margin-inline-start": "2em",
            "margin-inline-end": "0"
          }
        },
        {
          selector: " > .aligncenter",
          rules: {
            "margin-left": "auto !important",
            "margin-right": "auto !important"
          }
        }
      ],
      spacingStyles: [
        {
          selector: " > :first-child",
          rules: {
            "margin-block-start": "0"
          }
        },
        {
          selector: " > :last-child",
          rules: {
            "margin-block-end": "0"
          }
        },
        {
          selector: " > *",
          rules: {
            "margin-block-start": null,
            "margin-block-end": "0"
          }
        }
      ]
    },
    constrained: {
      name: "constrained",
      slug: "constrained",
      className: "is-layout-constrained",
      baseStyles: [
        {
          selector: " > .alignleft",
          rules: {
            float: "left",
            "margin-inline-start": "0",
            "margin-inline-end": "2em"
          }
        },
        {
          selector: " > .alignright",
          rules: {
            float: "right",
            "margin-inline-start": "2em",
            "margin-inline-end": "0"
          }
        },
        {
          selector: " > .aligncenter",
          rules: {
            "margin-left": "auto !important",
            "margin-right": "auto !important"
          }
        },
        {
          selector: " > :where(:not(.alignleft):not(.alignright):not(.alignfull))",
          rules: {
            "max-width": "var(--wp--style--global--content-size)",
            "margin-left": "auto !important",
            "margin-right": "auto !important"
          }
        },
        {
          selector: " > .alignwide",
          rules: {
            "max-width": "var(--wp--style--global--wide-size)"
          }
        }
      ],
      spacingStyles: [
        {
          selector: " > :first-child",
          rules: {
            "margin-block-start": "0"
          }
        },
        {
          selector: " > :last-child",
          rules: {
            "margin-block-end": "0"
          }
        },
        {
          selector: " > *",
          rules: {
            "margin-block-start": null,
            "margin-block-end": "0"
          }
        }
      ]
    },
    flex: {
      name: "flex",
      slug: "flex",
      className: "is-layout-flex",
      displayMode: "flex",
      baseStyles: [
        {
          selector: "",
          rules: {
            "flex-wrap": "wrap",
            "align-items": "center"
          }
        },
        {
          selector: " > :is(*, div)",
          // :is(*, div) instead of just * increases the specificity by 001.
          rules: {
            margin: "0"
          }
        }
      ],
      spacingStyles: [
        {
          selector: "",
          rules: {
            gap: null
          }
        }
      ]
    },
    grid: {
      name: "grid",
      slug: "grid",
      className: "is-layout-grid",
      displayMode: "grid",
      baseStyles: [
        {
          selector: " > :is(*, div)",
          // :is(*, div) instead of just * increases the specificity by 001.
          rules: {
            margin: "0"
          }
        }
      ],
      spacingStyles: [
        {
          selector: "",
          rules: {
            gap: null
          }
        }
      ]
    }
  };

  // packages/block-editor/build-module/layouts/utils.mjs
  function appendSelectors(selectors, append = "") {
    return selectors.split(",").map(
      (subselector) => `${subselector}${append ? ` ${append}` : ""}`
    ).join(",");
  }
  function getBlockGapCSS(selector3, layoutDefinitions = LAYOUT_DEFINITIONS, layoutType, blockGapValue) {
    let output = "";
    if (layoutDefinitions?.[layoutType]?.spacingStyles?.length && blockGapValue) {
      layoutDefinitions[layoutType].spacingStyles.forEach((gapStyle) => {
        output += `${appendSelectors(
          selector3,
          gapStyle.selector.trim()
        )} { `;
        output += Object.entries(gapStyle.rules).map(
          ([cssProperty, value]) => `${cssProperty}: ${value ? value : blockGapValue}`
        ).join("; ");
        output += "; }";
      });
    }
    return output;
  }
  function getAlignmentsInfo(layout) {
    const { contentSize, wideSize, type = "default" } = layout;
    const alignmentInfo = {};
    const sizeRegex = /^(?!0)\d+(px|em|rem|vw|vh|%|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)?$/i;
    if (sizeRegex.test(contentSize) && type === "constrained") {
      alignmentInfo.none = (0, import_i18n10.sprintf)((0, import_i18n10.__)("Max %s wide"), contentSize);
    }
    if (sizeRegex.test(wideSize)) {
      alignmentInfo.wide = (0, import_i18n10.sprintf)((0, import_i18n10.__)("Max %s wide"), wideSize);
    }
    return alignmentInfo;
  }

  // packages/block-editor/build-module/components/spacing-sizes-control/utils.mjs
  var import_i18n11 = __toESM(require_i18n(), 1);
  var RANGE_CONTROL_MAX_SIZE = 8;
  var ALL_SIDES = ["top", "right", "bottom", "left"];
  var DEFAULT_VALUES = {
    top: void 0,
    right: void 0,
    bottom: void 0,
    left: void 0
  };
  var ICONS = {
    custom: sides_all_default,
    axial: sides_all_default,
    horizontal: sides_horizontal_default,
    vertical: sides_vertical_default,
    top: sides_top_default,
    right: sides_right_default,
    bottom: sides_bottom_default,
    left: sides_left_default
  };
  var LABELS = {
    default: (0, import_i18n11.__)("Spacing control"),
    top: (0, import_i18n11.__)("Top"),
    bottom: (0, import_i18n11.__)("Bottom"),
    left: (0, import_i18n11.__)("Left"),
    right: (0, import_i18n11.__)("Right"),
    mixed: (0, import_i18n11.__)("Mixed"),
    vertical: (0, import_i18n11.__)("Vertical"),
    horizontal: (0, import_i18n11.__)("Horizontal"),
    axial: (0, import_i18n11.__)("Horizontal & vertical"),
    custom: (0, import_i18n11.__)("Custom")
  };
  var VIEWS = {
    axial: "axial",
    top: "top",
    right: "right",
    bottom: "bottom",
    left: "left",
    custom: "custom"
  };
  function isValueSpacingPreset(value) {
    if (!value?.includes) {
      return false;
    }
    return value === "0" || value.includes("var:preset|spacing|");
  }
  function getCustomValueFromPreset(value, spacingSizes) {
    if (!isValueSpacingPreset(value)) {
      return value;
    }
    const slug = getSpacingPresetSlug(value);
    const spacingSize = spacingSizes.find(
      (size) => String(size.slug) === slug
    );
    return spacingSize?.size;
  }
  function getPresetValueFromCustomValue(value, spacingSizes) {
    if (!value || isValueSpacingPreset(value) || value === "0") {
      return value;
    }
    const spacingMatch = spacingSizes.find(
      (size) => String(size.size) === String(value)
    );
    if (spacingMatch?.slug) {
      return `var:preset|spacing|${spacingMatch.slug}`;
    }
    return value;
  }
  function getSpacingPresetCssVar(value) {
    if (!value) {
      return;
    }
    const slug = value.match(/var:preset\|spacing\|(.+)/);
    if (!slug) {
      return value;
    }
    return `var(--wp--preset--spacing--${slug[1]})`;
  }
  function getSpacingPresetSlug(value) {
    if (!value) {
      return;
    }
    if (value === "0" || value === "default") {
      return value;
    }
    const slug = value.match(/var:preset\|spacing\|(.+)/);
    return slug ? slug[1] : void 0;
  }
  function hasAxisSupport(sides, axis) {
    if (!sides || !sides.length) {
      return false;
    }
    const hasHorizontalSupport = sides.includes("horizontal") || sides.includes("left") && sides.includes("right");
    const hasVerticalSupport = sides.includes("vertical") || sides.includes("top") && sides.includes("bottom");
    if (axis === "horizontal") {
      return hasHorizontalSupport;
    }
    if (axis === "vertical") {
      return hasVerticalSupport;
    }
    return hasHorizontalSupport || hasVerticalSupport;
  }
  function hasBalancedSidesSupport(sides = []) {
    const counts = { top: 0, right: 0, bottom: 0, left: 0 };
    sides.forEach((side) => counts[side] += 1);
    return (counts.top + counts.bottom) % 2 === 0 && (counts.left + counts.right) % 2 === 0;
  }
  function getInitialView(values = {}, sides) {
    const { top, right, bottom, left } = values;
    const sideValues = [top, right, bottom, left].filter(Boolean);
    const hasMatchingAxialValues = top === bottom && left === right && (!!top || !!left);
    const hasNoValuesAndBalancedSides = !sideValues.length && hasBalancedSidesSupport(sides);
    const hasOnlyAxialSides = sides?.includes("horizontal") && sides?.includes("vertical") && sides?.length === 2;
    if (hasAxisSupport(sides) && (hasMatchingAxialValues || hasNoValuesAndBalancedSides)) {
      return VIEWS.axial;
    }
    if (hasOnlyAxialSides && sideValues.length === 1) {
      let side;
      Object.entries(values).some(([key, value]) => {
        side = key;
        return value !== void 0;
      });
      return side;
    }
    if (sides?.length === 1 && !sideValues.length) {
      return sides[0];
    }
    return VIEWS.custom;
  }

  // packages/block-editor/build-module/hooks/gap.mjs
  function getGapBoxControlValueFromStyle(blockGapValue) {
    if (!blockGapValue) {
      return null;
    }
    const isValueString = typeof blockGapValue === "string";
    return {
      top: isValueString ? blockGapValue : blockGapValue?.top,
      left: isValueString ? blockGapValue : blockGapValue?.left
    };
  }
  function getGapCSSValue(blockGapValue, defaultValue = "0") {
    const blockGapBoxControlValue = getGapBoxControlValueFromStyle(blockGapValue);
    if (!blockGapBoxControlValue) {
      return null;
    }
    const row = getSpacingPresetCssVar(blockGapBoxControlValue?.top) || defaultValue;
    const column = getSpacingPresetCssVar(blockGapBoxControlValue?.left) || defaultValue;
    return row === column ? row : `${row} ${column}`;
  }

  // packages/block-editor/build-module/layouts/flex.mjs
  var import_jsx_runtime131 = __toESM(require_jsx_runtime(), 1);
  var justifyContentMap = {
    left: "flex-start",
    right: "flex-end",
    center: "center",
    "space-between": "space-between"
  };
  var alignItemsMap = {
    left: "flex-start",
    right: "flex-end",
    center: "center",
    stretch: "stretch"
  };
  var verticalAlignmentMap = {
    top: "flex-start",
    center: "center",
    bottom: "flex-end",
    stretch: "stretch",
    "space-between": "space-between"
  };
  var defaultAlignments = {
    horizontal: "center",
    vertical: "top"
  };
  var flexWrapOptions = ["wrap", "nowrap"];
  var flex_default = {
    name: "flex",
    label: (0, import_i18n12.__)("Flex"),
    inspectorControls: function FlexLayoutInspectorControls({
      layout = {},
      onChange,
      layoutBlockSupport = {}
    }) {
      const {
        allowOrientation = true,
        allowJustification = true,
        allowWrap = true
      } = layoutBlockSupport;
      return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_jsx_runtime131.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_components11.Flex, { children: [
          allowJustification && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_components11.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
            FlexLayoutJustifyContentControl,
            {
              layout,
              onChange
            }
          ) }),
          allowOrientation && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_components11.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
            OrientationControl,
            {
              layout,
              onChange
            }
          ) })
        ] }),
        allowWrap && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(FlexWrapControl, { layout, onChange })
      ] });
    },
    toolBarControls: function FlexLayoutToolbarControls({
      layout = {},
      onChange,
      layoutBlockSupport
    }) {
      const { allowVerticalAlignment = true, allowJustification = true } = layoutBlockSupport;
      if (!allowJustification && !allowVerticalAlignment) {
        return null;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(block_controls_default, { group: "block", __experimentalShareWithChildBlocks: true, children: [
        allowJustification && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
          FlexLayoutJustifyContentControl,
          {
            layout,
            onChange,
            isToolbar: true
          }
        ),
        allowVerticalAlignment && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
          FlexLayoutVerticalAlignmentControl,
          {
            layout,
            onChange
          }
        )
      ] });
    },
    getLayoutStyle: function getLayoutStyle({
      selector: selector3,
      layout,
      style,
      blockName,
      hasBlockGapSupport,
      globalBlockGapValue,
      layoutDefinitions = LAYOUT_DEFINITIONS
    }) {
      const { orientation = "horizontal" } = layout;
      let fallbackGapValue = "0.5em";
      if (globalBlockGapValue) {
        const processedGlobalGap = getGapCSSValue(
          globalBlockGapValue,
          "0.5em"
        );
        const gapParts = processedGlobalGap.split(" ");
        fallbackGapValue = gapParts.length > 1 ? gapParts[1] : gapParts[0];
      }
      const blockGapValue = style?.spacing?.blockGap && !shouldSkipSerialization(blockName, "spacing", "blockGap") ? getGapCSSValue(style?.spacing?.blockGap, fallbackGapValue) : void 0;
      const justifyContent = justifyContentMap[layout.justifyContent];
      const flexWrap = flexWrapOptions.includes(layout.flexWrap) ? layout.flexWrap : "wrap";
      const verticalAlignment = verticalAlignmentMap[layout.verticalAlignment];
      const alignItems = alignItemsMap[layout.justifyContent] || alignItemsMap.left;
      let output = "";
      const rules = [];
      if (flexWrap && flexWrap !== "wrap") {
        rules.push(`flex-wrap: ${flexWrap}`);
      }
      if (orientation === "horizontal") {
        if (verticalAlignment) {
          rules.push(`align-items: ${verticalAlignment}`);
        }
        if (justifyContent) {
          rules.push(`justify-content: ${justifyContent}`);
        }
      } else {
        if (verticalAlignment) {
          rules.push(`justify-content: ${verticalAlignment}`);
        }
        rules.push("flex-direction: column");
        rules.push(`align-items: ${alignItems}`);
      }
      if (rules.length) {
        output = `${appendSelectors(selector3)} {
				${rules.join("; ")};
			}`;
      }
      if (hasBlockGapSupport && blockGapValue) {
        output += getBlockGapCSS(
          selector3,
          layoutDefinitions,
          "flex",
          blockGapValue
        );
      }
      return output;
    },
    getOrientation(layout) {
      const { orientation = "horizontal" } = layout;
      return orientation;
    },
    getAlignments() {
      return [];
    }
  };
  function FlexLayoutVerticalAlignmentControl({ layout, onChange }) {
    const { orientation = "horizontal" } = layout;
    const defaultVerticalAlignment = orientation === "horizontal" ? defaultAlignments.horizontal : defaultAlignments.vertical;
    const { verticalAlignment = defaultVerticalAlignment } = layout;
    const onVerticalAlignmentChange = (value) => {
      onChange({
        ...layout,
        verticalAlignment: value
      });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
      BlockVerticalAlignmentControl,
      {
        onChange: onVerticalAlignmentChange,
        value: verticalAlignment,
        controls: orientation === "horizontal" ? ["top", "center", "bottom", "stretch"] : ["top", "center", "bottom", "space-between"]
      }
    );
  }
  var POPOVER_PROPS2 = {
    placement: "bottom-start"
  };
  function FlexLayoutJustifyContentControl({
    layout,
    onChange,
    isToolbar = false
  }) {
    const { justifyContent = "left", orientation = "horizontal" } = layout;
    const onJustificationChange = (value) => {
      onChange({
        ...layout,
        justifyContent: value
      });
    };
    const allowedControls = ["left", "center", "right"];
    if (orientation === "horizontal") {
      allowedControls.push("space-between");
    } else {
      allowedControls.push("stretch");
    }
    if (isToolbar) {
      return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
        JustifyContentControl,
        {
          allowedControls,
          value: justifyContent,
          onChange: onJustificationChange,
          popoverProps: POPOVER_PROPS2
        }
      );
    }
    const justificationOptions = [
      {
        value: "left",
        icon: justify_left_default,
        label: (0, import_i18n12.__)("Justify items left")
      },
      {
        value: "center",
        icon: justify_center_default,
        label: (0, import_i18n12.__)("Justify items center")
      },
      {
        value: "right",
        icon: justify_right_default,
        label: (0, import_i18n12.__)("Justify items right")
      }
    ];
    if (orientation === "horizontal") {
      justificationOptions.push({
        value: "space-between",
        icon: justify_space_between_default,
        label: (0, import_i18n12.__)("Space between items")
      });
    } else {
      justificationOptions.push({
        value: "stretch",
        icon: justify_stretch_default,
        label: (0, import_i18n12.__)("Stretch items")
      });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
      import_components11.__experimentalToggleGroupControl,
      {
        __next40pxDefaultSize: true,
        label: (0, import_i18n12.__)("Justification"),
        value: justifyContent,
        onChange: onJustificationChange,
        className: "block-editor-hooks__flex-layout-justification-controls",
        children: justificationOptions.map(({ value, icon, label }) => {
          return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
            import_components11.__experimentalToggleGroupControlOptionIcon,
            {
              value,
              icon,
              label
            },
            value
          );
        })
      }
    );
  }
  function FlexWrapControl({ layout, onChange }) {
    const { flexWrap = "wrap" } = layout;
    return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
      import_components11.ToggleControl,
      {
        label: (0, import_i18n12.__)("Allow to wrap to multiple lines"),
        onChange: (value) => {
          onChange({
            ...layout,
            flexWrap: value ? "wrap" : "nowrap"
          });
        },
        checked: flexWrap === "wrap"
      }
    );
  }
  function OrientationControl({ layout, onChange }) {
    const {
      orientation = "horizontal",
      verticalAlignment,
      justifyContent
    } = layout;
    return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
      import_components11.__experimentalToggleGroupControl,
      {
        __next40pxDefaultSize: true,
        className: "block-editor-hooks__flex-layout-orientation-controls",
        label: (0, import_i18n12.__)("Orientation"),
        value: orientation,
        onChange: (value) => {
          let newVerticalAlignment = verticalAlignment;
          let newJustification = justifyContent;
          if (value === "horizontal") {
            if (verticalAlignment === "space-between") {
              newVerticalAlignment = "center";
            }
            if (justifyContent === "stretch") {
              newJustification = "left";
            }
          } else {
            if (verticalAlignment === "stretch") {
              newVerticalAlignment = "top";
            }
            if (justifyContent === "space-between") {
              newJustification = "left";
            }
          }
          return onChange({
            ...layout,
            orientation: value,
            verticalAlignment: newVerticalAlignment,
            justifyContent: newJustification
          });
        },
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
            import_components11.__experimentalToggleGroupControlOptionIcon,
            {
              icon: arrow_right_default,
              value: "horizontal",
              label: (0, import_i18n12.__)("Horizontal")
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
            import_components11.__experimentalToggleGroupControlOptionIcon,
            {
              icon: arrow_down_default,
              value: "vertical",
              label: (0, import_i18n12.__)("Vertical")
            }
          )
        ]
      }
    );
  }

  // packages/block-editor/build-module/layouts/flow.mjs
  var import_i18n13 = __toESM(require_i18n(), 1);
  var flow_default = {
    name: "default",
    label: (0, import_i18n13.__)("Flow"),
    inspectorControls: function DefaultLayoutInspectorControls() {
      return null;
    },
    toolBarControls: function DefaultLayoutToolbarControls() {
      return null;
    },
    getLayoutStyle: function getLayoutStyle2({
      selector: selector3,
      style,
      blockName,
      hasBlockGapSupport,
      layoutDefinitions = LAYOUT_DEFINITIONS
    }) {
      const blockGapStyleValue = getGapCSSValue(style?.spacing?.blockGap);
      let blockGapValue = "";
      if (!shouldSkipSerialization(blockName, "spacing", "blockGap")) {
        if (blockGapStyleValue?.top) {
          blockGapValue = getGapCSSValue(blockGapStyleValue?.top);
        } else if (typeof blockGapStyleValue === "string") {
          blockGapValue = getGapCSSValue(blockGapStyleValue);
        }
      }
      let output = "";
      if (hasBlockGapSupport && blockGapValue) {
        output += getBlockGapCSS(
          selector3,
          layoutDefinitions,
          "default",
          blockGapValue
        );
      }
      return output;
    },
    getOrientation() {
      return "vertical";
    },
    getAlignments(layout, isBlockBasedTheme) {
      const alignmentInfo = getAlignmentsInfo(layout);
      if (layout.alignments !== void 0) {
        if (!layout.alignments.includes("none")) {
          layout.alignments.unshift("none");
        }
        return layout.alignments.map((alignment) => ({
          name: alignment,
          info: alignmentInfo[alignment]
        }));
      }
      const alignments = [
        { name: "left" },
        { name: "center" },
        { name: "right" }
      ];
      if (!isBlockBasedTheme) {
        const { contentSize, wideSize } = layout;
        if (contentSize) {
          alignments.unshift({ name: "full" });
        }
        if (wideSize) {
          alignments.unshift({
            name: "wide",
            info: alignmentInfo.wide
          });
        }
      }
      alignments.unshift({ name: "none", info: alignmentInfo.none });
      return alignments;
    }
  };

  // packages/block-editor/build-module/layouts/constrained.mjs
  var import_components13 = __toESM(require_components(), 1);
  var import_i18n14 = __toESM(require_i18n(), 1);
  var import_style_engine = __toESM(require_style_engine(), 1);
  var import_jsx_runtime132 = __toESM(require_jsx_runtime(), 1);
  var constrained_default = {
    name: "constrained",
    label: (0, import_i18n14.__)("Constrained"),
    inspectorControls: function DefaultLayoutInspectorControls2({
      layout,
      onChange,
      layoutBlockSupport = {}
    }) {
      const { wideSize, contentSize, justifyContent = "center" } = layout;
      const {
        allowJustification = true,
        allowCustomContentAndWideSize = true
      } = layoutBlockSupport;
      const onJustificationChange = (value) => {
        onChange({
          ...layout,
          justifyContent: value
        });
      };
      const justificationOptions = [
        {
          value: "left",
          icon: justify_left_default,
          label: (0, import_i18n14.__)("Justify items left")
        },
        {
          value: "center",
          icon: justify_center_default,
          label: (0, import_i18n14.__)("Justify items center")
        },
        {
          value: "right",
          icon: justify_right_default,
          label: (0, import_i18n14.__)("Justify items right")
        }
      ];
      const [availableUnits] = useSettings("spacing.units");
      const units2 = (0, import_components13.__experimentalUseCustomUnits)({
        availableUnits: availableUnits || ["%", "px", "em", "rem", "vw"]
      });
      return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
        import_components13.__experimentalVStack,
        {
          spacing: 4,
          className: "block-editor-hooks__layout-constrained",
          children: [
            allowCustomContentAndWideSize && /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_jsx_runtime132.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
                import_components13.__experimentalUnitControl,
                {
                  __next40pxDefaultSize: true,
                  label: (0, import_i18n14.__)("Content width"),
                  labelPosition: "top",
                  value: contentSize || wideSize || "",
                  onChange: (nextWidth) => {
                    nextWidth = 0 > parseFloat(nextWidth) ? "0" : nextWidth;
                    onChange({
                      ...layout,
                      contentSize: nextWidth !== "" ? nextWidth : void 0
                    });
                  },
                  units: units2,
                  prefix: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_components13.__experimentalInputControlPrefixWrapper, { variant: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(icon_default, { icon: align_none_default }) })
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
                import_components13.__experimentalUnitControl,
                {
                  __next40pxDefaultSize: true,
                  label: (0, import_i18n14.__)("Wide width"),
                  labelPosition: "top",
                  value: wideSize || contentSize || "",
                  onChange: (nextWidth) => {
                    nextWidth = 0 > parseFloat(nextWidth) ? "0" : nextWidth;
                    onChange({
                      ...layout,
                      wideSize: nextWidth !== "" ? nextWidth : void 0
                    });
                  },
                  units: units2,
                  prefix: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_components13.__experimentalInputControlPrefixWrapper, { variant: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(icon_default, { icon: stretch_wide_default }) })
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("p", { className: "block-editor-hooks__layout-constrained-helptext", children: (0, import_i18n14.__)(
                "Customize the width for all elements that are assigned to the center or wide columns."
              ) })
            ] }),
            allowJustification && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
              import_components13.__experimentalToggleGroupControl,
              {
                __next40pxDefaultSize: true,
                label: (0, import_i18n14.__)("Justification"),
                value: justifyContent,
                onChange: onJustificationChange,
                children: justificationOptions.map(
                  ({ value, icon, label }) => {
                    return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
                      import_components13.__experimentalToggleGroupControlOptionIcon,
                      {
                        value,
                        icon,
                        label
                      },
                      value
                    );
                  }
                )
              }
            )
          ]
        }
      );
    },
    toolBarControls: function DefaultLayoutToolbarControls2({
      layout = {},
      onChange,
      layoutBlockSupport
    }) {
      const { allowJustification = true } = layoutBlockSupport;
      if (!allowJustification) {
        return null;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(block_controls_default, { group: "block", __experimentalShareWithChildBlocks: true, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
        DefaultLayoutJustifyContentControl,
        {
          layout,
          onChange
        }
      ) });
    },
    getLayoutStyle: function getLayoutStyle3({
      selector: selector3,
      layout = {},
      style,
      blockName,
      hasBlockGapSupport,
      layoutDefinitions = LAYOUT_DEFINITIONS
    }) {
      const { contentSize, wideSize, justifyContent } = layout;
      const blockGapStyleValue = getGapCSSValue(style?.spacing?.blockGap);
      let blockGapValue = "";
      if (!shouldSkipSerialization(blockName, "spacing", "blockGap")) {
        if (blockGapStyleValue?.top) {
          blockGapValue = getGapCSSValue(blockGapStyleValue?.top);
        } else if (typeof blockGapStyleValue === "string") {
          blockGapValue = getGapCSSValue(blockGapStyleValue);
        }
      }
      const marginLeft = justifyContent === "left" ? "0 !important" : "auto !important";
      const marginRight = justifyContent === "right" ? "0 !important" : "auto !important";
      let output = !!contentSize || !!wideSize ? `
					${appendSelectors(
        selector3,
        "> :where(:not(.alignleft):not(.alignright):not(.alignfull))"
      )} {
						max-width: ${contentSize ?? wideSize};
						margin-left: ${marginLeft};
						margin-right: ${marginRight};
					}
					${appendSelectors(selector3, "> .alignwide")}  {
						max-width: ${wideSize ?? contentSize};
					}
					${appendSelectors(selector3, "> .alignfull")} {
						max-width: none;
					}
				` : "";
      if (justifyContent === "left") {
        output += `${appendSelectors(
          selector3,
          "> :where(:not(.alignleft):not(.alignright):not(.alignfull))"
        )}
			{ margin-left: ${marginLeft}; }`;
      } else if (justifyContent === "right") {
        output += `${appendSelectors(
          selector3,
          "> :where(:not(.alignleft):not(.alignright):not(.alignfull))"
        )}
			{ margin-right: ${marginRight}; }`;
      }
      if (style?.spacing?.padding) {
        const paddingValues = (0, import_style_engine.getCSSRules)(style);
        paddingValues.forEach((rule) => {
          if (rule.key === "paddingRight") {
            const paddingRightValue = rule.value === "0" ? "0px" : rule.value;
            output += `
					${appendSelectors(selector3, "> .alignfull")} {
						margin-right: calc(${paddingRightValue} * -1);
					}
					`;
          } else if (rule.key === "paddingLeft") {
            const paddingLeftValue = rule.value === "0" ? "0px" : rule.value;
            output += `
					${appendSelectors(selector3, "> .alignfull")} {
						margin-left: calc(${paddingLeftValue} * -1);
					}
					`;
          }
        });
      }
      if (hasBlockGapSupport && blockGapValue) {
        output += getBlockGapCSS(
          selector3,
          layoutDefinitions,
          "constrained",
          blockGapValue
        );
      }
      return output;
    },
    getOrientation() {
      return "vertical";
    },
    getAlignments(layout) {
      const alignmentInfo = getAlignmentsInfo(layout);
      if (layout.alignments !== void 0) {
        if (!layout.alignments.includes("none")) {
          layout.alignments.unshift("none");
        }
        return layout.alignments.map((alignment) => ({
          name: alignment,
          info: alignmentInfo[alignment]
        }));
      }
      const { contentSize, wideSize } = layout;
      const alignments = [
        { name: "left" },
        { name: "center" },
        { name: "right" }
      ];
      if (contentSize) {
        alignments.unshift({ name: "full" });
      }
      if (wideSize) {
        alignments.unshift({ name: "wide", info: alignmentInfo.wide });
      }
      alignments.unshift({ name: "none", info: alignmentInfo.none });
      return alignments;
    }
  };
  var POPOVER_PROPS3 = {
    placement: "bottom-start"
  };
  function DefaultLayoutJustifyContentControl({ layout, onChange }) {
    const { justifyContent = "center" } = layout;
    const onJustificationChange = (value) => {
      onChange({
        ...layout,
        justifyContent: value
      });
    };
    const allowedControls = ["left", "center", "right"];
    return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
      JustifyContentControl,
      {
        allowedControls,
        value: justifyContent,
        onChange: onJustificationChange,
        popoverProps: POPOVER_PROPS3
      }
    );
  }

  // packages/block-editor/build-module/layouts/grid.mjs
  var import_i18n15 = __toESM(require_i18n(), 1);
  var import_components15 = __toESM(require_components(), 1);
  var import_element16 = __toESM(require_element(), 1);
  var import_jsx_runtime133 = __toESM(require_jsx_runtime(), 1);
  var RANGE_CONTROL_MAX_VALUES = {
    px: 600,
    "%": 100,
    vw: 100,
    vh: 100,
    em: 38,
    rem: 38,
    svw: 100,
    lvw: 100,
    dvw: 100,
    svh: 100,
    lvh: 100,
    dvh: 100,
    vi: 100,
    svi: 100,
    lvi: 100,
    dvi: 100,
    vb: 100,
    svb: 100,
    lvb: 100,
    dvb: 100,
    vmin: 100,
    svmin: 100,
    lvmin: 100,
    dvmin: 100,
    vmax: 100,
    svmax: 100,
    lvmax: 100,
    dvmax: 100
  };
  var units = [
    { value: "px", label: "px", default: 0 },
    { value: "rem", label: "rem", default: 0 },
    { value: "em", label: "em", default: 0 }
  ];
  var grid_default2 = {
    name: "grid",
    label: (0, import_i18n15.__)("Grid"),
    inspectorControls: function GridLayoutInspectorControls({
      layout = {},
      onChange,
      layoutBlockSupport = {}
    }) {
      const { allowSizingOnChildren = false } = layoutBlockSupport;
      const showColumnsControl = true;
      const showMinWidthControl = !layout?.isManualPlacement || window.__experimentalEnableGridInteractivity;
      return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_jsx_runtime133.Fragment, { children: [
        window.__experimentalEnableGridInteractivity && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
          GridLayoutTypeControl,
          {
            layout,
            onChange
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_components15.__experimentalVStack, { spacing: 4, children: [
          showColumnsControl && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
            GridLayoutColumnsAndRowsControl,
            {
              layout,
              onChange,
              allowSizingOnChildren
            }
          ),
          showMinWidthControl && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
            GridLayoutMinimumWidthControl,
            {
              layout,
              onChange
            }
          )
        ] })
      ] });
    },
    toolBarControls: function GridLayoutToolbarControls() {
      return null;
    },
    getLayoutStyle: function getLayoutStyle4({
      selector: selector3,
      layout,
      style,
      blockName,
      hasBlockGapSupport,
      globalBlockGapValue,
      layoutDefinitions = LAYOUT_DEFINITIONS
    }) {
      const {
        minimumColumnWidth = null,
        columnCount = null,
        rowCount = null
      } = layout;
      if (true) {
        if (minimumColumnWidth && typeof minimumColumnWidth !== "string") {
          throw new Error("minimumColumnWidth must be a string");
        }
        if (columnCount && typeof columnCount !== "number") {
          throw new Error("columnCount must be a number");
        }
        if (rowCount && typeof rowCount !== "number") {
          throw new Error("rowCount must be a number");
        }
      }
      let fallbackGapValue = "1.2rem";
      if (globalBlockGapValue) {
        const processedGap = getGapCSSValue(globalBlockGapValue, "0.5em");
        const gapParts = processedGap.split(" ");
        fallbackGapValue = gapParts.length > 1 ? gapParts[1] : gapParts[0];
      }
      const blockGapValue = style?.spacing?.blockGap && !shouldSkipSerialization(blockName, "spacing", "blockGap") ? getGapCSSValue(style?.spacing?.blockGap, fallbackGapValue) : void 0;
      let output = "";
      const rules = [];
      if (minimumColumnWidth && columnCount > 0) {
        let blockGapToUse = blockGapValue || fallbackGapValue;
        if (blockGapToUse === "0" || blockGapToUse === 0) {
          blockGapToUse = "0px";
        }
        const maxValue = `max(min( ${minimumColumnWidth}, 100%), ( 100% - (${blockGapToUse}*${columnCount - 1}) ) / ${columnCount})`;
        rules.push(
          `grid-template-columns: repeat(auto-fill, minmax(${maxValue}, 1fr))`,
          `container-type: inline-size`
        );
        if (rowCount) {
          rules.push(
            `grid-template-rows: repeat(${rowCount}, minmax(1rem, auto))`
          );
        }
      } else if (columnCount) {
        rules.push(
          `grid-template-columns: repeat(${columnCount}, minmax(0, 1fr))`
        );
        if (rowCount) {
          rules.push(
            `grid-template-rows: repeat(${rowCount}, minmax(1rem, auto))`
          );
        }
      } else {
        rules.push(
          `grid-template-columns: repeat(auto-fill, minmax(min(${minimumColumnWidth || "12rem"}, 100%), 1fr))`,
          "container-type: inline-size"
        );
      }
      if (rules.length) {
        output = `${appendSelectors(selector3)} { ${rules.join(
          "; "
        )}; }`;
      }
      if (hasBlockGapSupport && blockGapValue) {
        output += getBlockGapCSS(
          selector3,
          layoutDefinitions,
          "grid",
          blockGapValue
        );
      }
      return output;
    },
    getOrientation() {
      return "horizontal";
    },
    getAlignments() {
      return [];
    }
  };
  function GridLayoutMinimumWidthControl({ layout, onChange }) {
    const { minimumColumnWidth, columnCount, isManualPlacement } = layout;
    const defaultValue = isManualPlacement || columnCount ? null : "12rem";
    const value = minimumColumnWidth || defaultValue;
    const [quantity, unit = "rem"] = (0, import_components15.__experimentalParseQuantityAndUnitFromRawValue)(value);
    const handleSliderChange = (next) => {
      onChange({
        ...layout,
        minimumColumnWidth: [next, unit].join("")
      });
    };
    const handleUnitChange = (newUnit) => {
      let newValue;
      if (["em", "rem"].includes(newUnit) && unit === "px") {
        newValue = (quantity / 16).toFixed(2) + newUnit;
      } else if (["em", "rem"].includes(unit) && newUnit === "px") {
        newValue = Math.round(quantity * 16) + newUnit;
      }
      onChange({
        ...layout,
        minimumColumnWidth: newValue
      });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("fieldset", { className: "block-editor-hooks__grid-layout-minimum-width-control", children: [
      /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_components15.BaseControl.VisualLabel, { as: "legend", children: (0, import_i18n15.__)("Min. column width") }),
      /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_components15.Flex, { gap: 4, children: [
        /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_components15.FlexItem, { isBlock: true, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
          import_components15.__experimentalUnitControl,
          {
            size: "__unstable-large",
            onChange: (newValue) => {
              onChange({
                ...layout,
                minimumColumnWidth: newValue === "" ? void 0 : newValue
              });
            },
            onUnitChange: handleUnitChange,
            value,
            units,
            min: 0,
            label: (0, import_i18n15.__)("Minimum column width"),
            hideLabelFromVision: true
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_components15.FlexItem, { isBlock: true, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
          import_components15.RangeControl,
          {
            __next40pxDefaultSize: true,
            onChange: handleSliderChange,
            value: quantity || 0,
            min: 0,
            max: RANGE_CONTROL_MAX_VALUES[unit] || 600,
            withInputField: false,
            label: (0, import_i18n15.__)("Minimum column width"),
            hideLabelFromVision: true
          }
        ) })
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("p", { className: "components-base-control__help", children: (0, import_i18n15.__)(
        "Columns will wrap to fewer per row when they can no longer maintain the minimum width."
      ) })
    ] });
  }
  function GridLayoutColumnsAndRowsControl({
    layout,
    onChange,
    allowSizingOnChildren
  }) {
    const defaultColumnCount = void 0;
    const {
      columnCount = defaultColumnCount,
      rowCount,
      isManualPlacement
    } = layout;
    return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_jsx_runtime133.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("fieldset", { className: "block-editor-hooks__grid-layout-columns-and-rows-controls", children: [
      !isManualPlacement && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_components15.BaseControl.VisualLabel, { as: "legend", children: (0, import_i18n15.__)("Max. columns") }),
      /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_components15.Flex, { gap: 4, children: [
        /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_components15.FlexItem, { isBlock: true, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
          import_components15.__experimentalNumberControl,
          {
            size: "__unstable-large",
            onChange: (value) => {
              const defaultNewColumnCount = isManualPlacement ? 1 : void 0;
              const newColumnCount = value === "" || value === "0" ? defaultNewColumnCount : parseInt(value, 10);
              onChange({
                ...layout,
                columnCount: newColumnCount
              });
            },
            value: columnCount,
            min: 1,
            label: (0, import_i18n15.__)("Columns"),
            hideLabelFromVision: !isManualPlacement
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_components15.FlexItem, { isBlock: true, children: allowSizingOnChildren && isManualPlacement ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
          import_components15.__experimentalNumberControl,
          {
            size: "__unstable-large",
            onChange: (value) => {
              const newRowCount = value === "" || value === "0" ? 1 : parseInt(value, 10);
              onChange({
                ...layout,
                rowCount: newRowCount
              });
            },
            value: rowCount,
            min: 1,
            label: (0, import_i18n15.__)("Rows")
          }
        ) : /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
          import_components15.RangeControl,
          {
            __next40pxDefaultSize: true,
            value: columnCount ?? 1,
            onChange: (value) => onChange({
              ...layout,
              columnCount: value === "" || value === "0" ? 1 : value
            }),
            min: 1,
            max: 16,
            withInputField: false,
            label: (0, import_i18n15.__)("Columns"),
            hideLabelFromVision: true
          }
        ) })
      ] })
    ] }) });
  }
  function GridLayoutTypeControl({ layout, onChange }) {
    const { columnCount, rowCount, minimumColumnWidth, isManualPlacement } = layout;
    const [tempColumnCount, setTempColumnCount] = (0, import_element16.useState)(
      columnCount || 3
    );
    const [tempRowCount, setTempRowCount] = (0, import_element16.useState)(rowCount);
    const [tempMinimumColumnWidth, setTempMinimumColumnWidth] = (0, import_element16.useState)(
      minimumColumnWidth || "12rem"
    );
    const gridPlacement = isManualPlacement ? "manual" : "auto";
    const onChangeType = (value) => {
      if (value === "manual") {
        setTempMinimumColumnWidth(minimumColumnWidth || "12rem");
      } else {
        setTempColumnCount(columnCount || 3);
        setTempRowCount(rowCount);
      }
      onChange({
        ...layout,
        columnCount: value === "manual" ? tempColumnCount : tempColumnCount,
        rowCount: value === "manual" ? tempRowCount : void 0,
        isManualPlacement: value === "manual" ? true : void 0,
        minimumColumnWidth: value === "auto" ? tempMinimumColumnWidth : null
      });
    };
    const helpText2 = gridPlacement === "manual" ? (0, import_i18n15.__)(
      "Grid items can be manually placed in any position on the grid."
    ) : (0, import_i18n15.__)(
      "Grid items are placed automatically depending on their order."
    );
    return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
      import_components15.__experimentalToggleGroupControl,
      {
        __next40pxDefaultSize: true,
        label: (0, import_i18n15.__)("Grid item position"),
        value: gridPlacement,
        onChange: onChangeType,
        isBlock: true,
        help: helpText2,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
            import_components15.__experimentalToggleGroupControlOption,
            {
              value: "auto",
              label: (0, import_i18n15.__)("Auto")
            },
            "auto"
          ),
          /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
            import_components15.__experimentalToggleGroupControlOption,
            {
              value: "manual",
              label: (0, import_i18n15.__)("Manual")
            },
            "manual"
          )
        ]
      }
    );
  }

  // packages/block-editor/build-module/layouts/index.mjs
  var layoutTypes = [flow_default, flex_default, constrained_default, grid_default2];
  function getLayoutType(name = "default") {
    return layoutTypes.find((layoutType) => layoutType.name === name);
  }
  function getLayoutTypes() {
    return layoutTypes;
  }

  // packages/block-editor/build-module/components/block-list/layout.mjs
  var import_jsx_runtime134 = __toESM(require_jsx_runtime(), 1);
  var defaultLayout = { type: "default" };
  var Layout = (0, import_element17.createContext)(defaultLayout);
  Layout.displayName = "BlockLayoutContext";
  var LayoutProvider = Layout.Provider;
  function useLayout() {
    return (0, import_element17.useContext)(Layout);
  }
  function LayoutStyle({ layout = {}, css, ...props }) {
    const layoutType = getLayoutType(layout.type);
    const [blockGapSupport] = useSettings("spacing.blockGap");
    const hasBlockGapSupport = blockGapSupport !== null;
    if (layoutType) {
      if (css) {
        return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("style", { children: css });
      }
      const layoutStyle = layoutType.getLayoutStyle?.({
        hasBlockGapSupport,
        layout,
        ...props
      });
      if (layoutStyle) {
        return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("style", { children: layoutStyle });
      }
    }
    return null;
  }

  // packages/block-editor/build-module/components/block-alignment-control/use-available-alignments.mjs
  var EMPTY_ARRAY4 = [];
  var DEFAULT_CONTROLS = ["none", "left", "center", "right", "wide", "full"];
  var WIDE_CONTROLS = ["wide", "full"];
  function useAvailableAlignments(controls = DEFAULT_CONTROLS) {
    if (!controls.includes("none")) {
      controls = ["none", ...controls];
    }
    const isNoneOnly = controls.length === 1 && controls[0] === "none";
    const [wideControlsEnabled, themeSupportsLayout, isBlockBasedTheme] = (0, import_data11.useSelect)(
      (select3) => {
        if (isNoneOnly) {
          return [false, false, false];
        }
        const settings2 = select3(store).getSettings();
        return [
          settings2.alignWide ?? false,
          settings2.supportsLayout,
          settings2.__unstableIsBlockBasedTheme
        ];
      },
      [isNoneOnly]
    );
    const layout = useLayout();
    if (isNoneOnly) {
      return EMPTY_ARRAY4;
    }
    const layoutType = getLayoutType(layout?.type);
    if (themeSupportsLayout) {
      const layoutAlignments = layoutType.getAlignments(
        layout,
        isBlockBasedTheme
      );
      const alignments2 = layoutAlignments.filter(
        (alignment) => controls.includes(alignment.name)
      );
      if (alignments2.length === 1 && alignments2[0].name === "none") {
        return EMPTY_ARRAY4;
      }
      return alignments2;
    }
    if (layoutType.name !== "default" && layoutType.name !== "constrained") {
      return EMPTY_ARRAY4;
    }
    const alignments = controls.filter((control) => {
      if (layout.alignments) {
        return layout.alignments.includes(control);
      }
      if (!wideControlsEnabled && WIDE_CONTROLS.includes(control)) {
        return false;
      }
      return DEFAULT_CONTROLS.includes(control);
    }).map((name) => ({ name }));
    if (alignments.length === 1 && alignments[0].name === "none") {
      return EMPTY_ARRAY4;
    }
    return alignments;
  }

  // packages/block-editor/build-module/components/block-alignment-control/constants.mjs
  var import_i18n16 = __toESM(require_i18n(), 1);
  var BLOCK_ALIGNMENTS_CONTROLS = {
    none: {
      icon: align_none_default,
      title: (0, import_i18n16._x)("None", "Alignment option")
    },
    left: {
      icon: position_left_default,
      title: (0, import_i18n16.__)("Align left")
    },
    center: {
      icon: position_center_default,
      title: (0, import_i18n16.__)("Align center")
    },
    right: {
      icon: position_right_default,
      title: (0, import_i18n16.__)("Align right")
    },
    wide: {
      icon: stretch_wide_default,
      title: (0, import_i18n16.__)("Wide width")
    },
    full: {
      icon: stretch_full_width_default,
      title: (0, import_i18n16.__)("Full width")
    }
  };
  var DEFAULT_CONTROL = "none";

  // packages/block-editor/build-module/components/block-alignment-control/ui.mjs
  var import_jsx_runtime135 = __toESM(require_jsx_runtime(), 1);
  function BlockAlignmentUI({
    value,
    onChange,
    controls,
    isToolbar,
    isCollapsed: isCollapsed3 = true
  }) {
    const enabledControls = useAvailableAlignments(controls);
    const hasEnabledControls = !!enabledControls.length;
    if (!hasEnabledControls) {
      return null;
    }
    function onChangeAlignment(align) {
      onChange([value, "none"].includes(align) ? void 0 : align);
    }
    const activeAlignmentControl = BLOCK_ALIGNMENTS_CONTROLS[value];
    const defaultAlignmentControl = BLOCK_ALIGNMENTS_CONTROLS[DEFAULT_CONTROL];
    const UIComponent = isToolbar ? import_components16.ToolbarGroup : import_components16.ToolbarDropdownMenu;
    const commonProps = {
      icon: activeAlignmentControl ? activeAlignmentControl.icon : defaultAlignmentControl.icon,
      label: (0, import_i18n17.__)("Align")
    };
    const extraProps = isToolbar ? {
      isCollapsed: isCollapsed3,
      controls: enabledControls.map(({ name: controlName }) => {
        return {
          ...BLOCK_ALIGNMENTS_CONTROLS[controlName],
          isActive: value === controlName || !value && controlName === "none",
          role: isCollapsed3 ? "menuitemradio" : void 0,
          onClick: () => onChangeAlignment(controlName)
        };
      })
    } : {
      toggleProps: { description: (0, import_i18n17.__)("Change alignment") },
      children: ({ onClose }) => {
        return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_jsx_runtime135.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_components16.MenuGroup, { className: "block-editor-block-alignment-control__menu-group", children: enabledControls.map(
          ({ name: controlName, info }) => {
            const { icon, title } = BLOCK_ALIGNMENTS_CONTROLS[controlName];
            const isSelected = controlName === value || !value && controlName === "none";
            return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
              import_components16.MenuItem,
              {
                icon,
                iconPosition: "left",
                className: clsx_default(
                  "components-dropdown-menu__menu-item",
                  {
                    "is-active": isSelected
                  }
                ),
                isSelected,
                onClick: () => {
                  onChangeAlignment(
                    controlName
                  );
                  onClose();
                },
                role: "menuitemradio",
                info,
                children: title
              },
              controlName
            );
          }
        ) }) });
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(UIComponent, { ...commonProps, ...extraProps });
  }
  var ui_default2 = BlockAlignmentUI;

  // packages/block-editor/build-module/components/block-alignment-control/index.mjs
  var import_jsx_runtime136 = __toESM(require_jsx_runtime(), 1);
  var BlockAlignmentControl = (props) => {
    return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(ui_default2, { ...props, isToolbar: false });
  };
  var BlockAlignmentToolbar = (props) => {
    return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(ui_default2, { ...props, isToolbar: true });
  };

  // packages/block-editor/build-module/components/block-bindings/attribute-control.mjs
  var import_es63 = __toESM(require_es6(), 1);
  var import_i18n18 = __toESM(require_i18n(), 1);
  var import_blocks14 = __toESM(require_blocks(), 1);
  var import_components18 = __toESM(require_components(), 1);
  var import_data14 = __toESM(require_data(), 1);
  var import_element19 = __toESM(require_element(), 1);
  var import_compose5 = __toESM(require_compose(), 1);

  // packages/block-editor/build-module/components/block-bindings/source-fields-list.mjs
  var import_es62 = __toESM(require_es6(), 1);
  var import_blocks13 = __toESM(require_blocks(), 1);
  var import_components17 = __toESM(require_components(), 1);
  var import_data13 = __toESM(require_data(), 1);
  var import_element18 = __toESM(require_element(), 1);
  var import_compose4 = __toESM(require_compose(), 1);

  // packages/block-editor/build-module/components/block-bindings/use-block-bindings-utils.mjs
  var import_data12 = __toESM(require_data(), 1);
  function isObjectEmpty(object) {
    return !object || Object.keys(object).length === 0;
  }
  function useBlockBindingsUtils(clientId) {
    const { clientId: contextClientId } = useBlockEditContext();
    const blockClientId = clientId || contextClientId;
    const { updateBlockAttributes: updateBlockAttributes2 } = (0, import_data12.useDispatch)(store);
    const { getBlockAttributes: getBlockAttributes3 } = (0, import_data12.useRegistry)().select(store);
    const updateBlockBindings = (bindings) => {
      const { metadata: { bindings: currentBindings, ...metadata } = {} } = getBlockAttributes3(blockClientId);
      const newBindings = { ...currentBindings };
      Object.entries(bindings).forEach(([attribute, binding]) => {
        if (!binding && newBindings[attribute]) {
          delete newBindings[attribute];
          return;
        }
        newBindings[attribute] = binding;
      });
      const newMetadata = {
        ...metadata,
        bindings: newBindings
      };
      if (isObjectEmpty(newMetadata.bindings)) {
        delete newMetadata.bindings;
      }
      updateBlockAttributes2(blockClientId, {
        metadata: isObjectEmpty(newMetadata) ? void 0 : newMetadata
      });
    };
    const removeAllBlockBindings = () => {
      const { metadata: { bindings, ...metadata } = {} } = getBlockAttributes3(blockClientId);
      updateBlockAttributes2(blockClientId, {
        metadata: isObjectEmpty(metadata) ? void 0 : metadata
      });
    };
    return { updateBlockBindings, removeAllBlockBindings };
  }

  // packages/block-editor/build-module/components/block-bindings/source-fields-list.mjs
  var import_jsx_runtime137 = __toESM(require_jsx_runtime(), 1);
  var { Menu } = unlock(import_components17.privateApis);
  function BlockBindingsSourceFieldsListItem({
    args,
    attribute,
    field,
    source,
    sourceKey
  }) {
    const itemBindings = (0, import_element18.useMemo)(
      () => ({
        source: sourceKey,
        args: field.args || {
          key: field.key
        }
      }),
      [field.args, field.key, sourceKey]
    );
    const blockContext = (0, import_element18.useContext)(block_context_default);
    const values = (0, import_data13.useSelect)(
      (select3) => source.getValues({
        select: select3,
        context: blockContext,
        bindings: {
          [attribute]: itemBindings
        }
      }),
      [attribute, blockContext, itemBindings, source]
    );
    const { updateBlockBindings } = useBlockBindingsUtils();
    return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
      Menu.CheckboxItem,
      {
        onChange: () => {
          const isCurrentlySelected = (0, import_es62.default)(args, field.args) ?? // Deprecate key dependency in 7.0.
          field.key === args?.key;
          if (isCurrentlySelected) {
            updateBlockBindings({
              [attribute]: void 0
            });
          } else {
            updateBlockBindings({
              [attribute]: itemBindings
            });
          }
        },
        name: attribute + "-binding",
        value: values[attribute],
        checked: (0, import_es62.default)(args, field.args) ?? // Deprecate key dependency in 7.0.
        field.key === args?.key,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Menu.ItemLabel, { children: field.label }),
          /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Menu.ItemHelpText, { children: values[attribute] })
        ]
      }
    );
  }
  function BlockBindingsSourceFieldsList({
    args,
    attribute,
    sourceKey,
    fields
  }) {
    const isMobile = (0, import_compose4.useViewportMatch)("medium", "<");
    if (!fields || fields.length === 0) {
      return null;
    }
    const source = (0, import_blocks13.getBlockBindingsSource)(sourceKey);
    return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
      Menu,
      {
        placement: isMobile ? "bottom-start" : "left-start",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Menu.SubmenuTriggerItem, { children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Menu.ItemLabel, { children: source.label }) }),
          /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Menu.Popover, { gutter: 8, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Menu.Group, { children: fields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
            BlockBindingsSourceFieldsListItem,
            {
              args,
              attribute,
              field,
              source,
              sourceKey
            },
            sourceKey + JSON.stringify(field.args) || field.key
          )) }) })
        ]
      },
      sourceKey
    );
  }

  // packages/block-editor/build-module/components/block-bindings/attribute-control.mjs
  var import_jsx_runtime138 = __toESM(require_jsx_runtime(), 1);
  var { Menu: Menu2 } = unlock(import_components18.privateApis);
  function BlockBindingsAttributeControl({
    attribute,
    binding,
    blockName
  }) {
    const { updateBlockBindings } = useBlockBindingsUtils();
    const isMobile = (0, import_compose5.useViewportMatch)("medium", "<");
    const blockContext = (0, import_element19.useContext)(block_context_default);
    const compatibleFields = (0, import_data14.useSelect)(
      (select3) => {
        const {
          getAllBlockBindingsSources,
          getBlockBindingsSourceFieldsList,
          getBlockType: getBlockType27
        } = unlock(select3(import_blocks14.store));
        const _attribute = getBlockType27(blockName).attributes?.[attribute];
        if (_attribute?.enum) {
          return {};
        }
        const attributeType = _attribute?.type === "rich-text" ? "string" : _attribute?.type;
        const sourceFields = {};
        Object.entries(getAllBlockBindingsSources()).forEach(
          ([sourceName, source2]) => {
            const fieldsList = getBlockBindingsSourceFieldsList(
              source2,
              blockContext
            );
            if (!fieldsList?.length) {
              return;
            }
            const compatibleFieldsList = fieldsList.filter(
              (field) => field.type === attributeType
            );
            if (compatibleFieldsList.length) {
              sourceFields[sourceName] = compatibleFieldsList;
            }
          }
        );
        return sourceFields;
      },
      [attribute, blockName, blockContext]
    );
    const { canUpdateBlockBindings } = (0, import_data14.useSelect)((select3) => ({
      canUpdateBlockBindings: select3(store).getSettings().canUpdateBlockBindings
    }));
    const hasCompatibleFields = Object.keys(compatibleFields).length > 0;
    const isAttributeReadOnly = !canUpdateBlockBindings || !hasCompatibleFields;
    const { source: boundSourceName, args } = binding || {};
    const source = (0, import_blocks14.getBlockBindingsSource)(boundSourceName);
    let displayText;
    let isValid2 = true;
    if (binding === void 0) {
      if (!hasCompatibleFields) {
        displayText = (0, import_i18n18.__)("No sources available");
      } else {
        displayText = (0, import_i18n18.__)("Not connected");
      }
      isValid2 = true;
    } else if (!source) {
      isValid2 = false;
      displayText = (0, import_i18n18.__)("Source not registered");
    } else {
      displayText = compatibleFields?.[boundSourceName]?.find(
        (field) => (0, import_es63.default)(field.args, args)
      )?.label || source?.label || boundSourceName;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
      import_components18.__experimentalToolsPanelItem,
      {
        hasValue: () => !!binding,
        label: attribute,
        onDeselect: !!hasCompatibleFields && (() => {
          updateBlockBindings({
            [attribute]: void 0
          });
        }),
        children: /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(Menu2, { placement: isMobile ? "bottom-start" : "left-start", children: [
          /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
            Menu2.TriggerButton,
            {
              render: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_components18.__experimentalItem, {}),
              disabled: !hasCompatibleFields,
              children: /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
                import_components18.__experimentalVStack,
                {
                  className: "block-editor-bindings__item",
                  spacing: 0,
                  children: [
                    /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_components18.__experimentalText, { truncate: true, children: attribute }),
                    /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
                      import_components18.__experimentalText,
                      {
                        truncate: true,
                        variant: isValid2 ? "muted" : void 0,
                        isDestructive: !isValid2,
                        children: displayText
                      }
                    )
                  ]
                }
              )
            }
          ),
          !isAttributeReadOnly && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Menu2.Popover, { gutter: isMobile ? 8 : 36, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
            Menu2,
            {
              placement: isMobile ? "bottom-start" : "left-start",
              children: Object.entries(compatibleFields).map(
                ([sourceKey, fields]) => /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
                  BlockBindingsSourceFieldsList,
                  {
                    args: binding?.args,
                    attribute,
                    sourceKey,
                    fields
                  },
                  sourceKey
                )
              )
            }
          ) })
        ] })
      }
    );
  }

  // packages/block-editor/build-module/components/block-full-height-alignment-control/index.mjs
  var import_i18n19 = __toESM(require_i18n(), 1);
  var import_components19 = __toESM(require_components(), 1);
  var import_jsx_runtime139 = __toESM(require_jsx_runtime(), 1);
  function BlockFullHeightAlignmentControl({
    isActive,
    label = (0, import_i18n19.__)("Full height"),
    onToggle,
    isDisabled
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
      import_components19.ToolbarButton,
      {
        isActive,
        icon: full_height_default,
        label,
        onClick: () => onToggle(!isActive),
        disabled: isDisabled
      }
    );
  }
  var block_full_height_alignment_control_default = BlockFullHeightAlignmentControl;

  // packages/block-editor/build-module/components/block-alignment-matrix-control/index.mjs
  var import_i18n20 = __toESM(require_i18n(), 1);
  var import_keycodes = __toESM(require_keycodes(), 1);
  var import_components20 = __toESM(require_components(), 1);
  var import_jsx_runtime140 = __toESM(require_jsx_runtime(), 1);
  var noop2 = () => {
  };
  function BlockAlignmentMatrixControl(props) {
    const {
      label = (0, import_i18n20.__)("Change matrix alignment"),
      onChange = noop2,
      value = "center",
      isDisabled
    } = props;
    const icon = /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_components20.AlignmentMatrixControl.Icon, { value });
    return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
      import_components20.Dropdown,
      {
        popoverProps: { placement: "bottom-start" },
        renderToggle: ({ onToggle, isOpen }) => {
          const openOnArrowDown = (event) => {
            if (!isOpen && event.keyCode === import_keycodes.DOWN) {
              event.preventDefault();
              onToggle();
            }
          };
          return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
            import_components20.ToolbarButton,
            {
              onClick: onToggle,
              "aria-haspopup": "true",
              "aria-expanded": isOpen,
              onKeyDown: openOnArrowDown,
              label,
              icon,
              showTooltip: true,
              disabled: isDisabled
            }
          );
        },
        renderContent: () => /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_components20.AlignmentMatrixControl, { onChange, value })
      }
    );
  }
  var block_alignment_matrix_control_default = BlockAlignmentMatrixControl;

  // packages/block-editor/build-module/components/block-breadcrumb/index.mjs
  var import_components21 = __toESM(require_components(), 1);
  var import_data16 = __toESM(require_data(), 1);
  var import_i18n21 = __toESM(require_i18n(), 1);
  var import_element22 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/block-title/use-block-display-title.mjs
  var import_data15 = __toESM(require_data(), 1);
  var import_blocks15 = __toESM(require_blocks(), 1);
  function useBlockDisplayTitle({
    clientId,
    maximumLength,
    context
  }) {
    const blockTitle = (0, import_data15.useSelect)(
      (select3) => {
        if (!clientId) {
          return null;
        }
        const { getBlockName: getBlockName2, getBlockAttributes: getBlockAttributes3 } = select3(store);
        const { getBlockType: getBlockType27, getActiveBlockVariation } = select3(import_blocks15.store);
        const blockName = getBlockName2(clientId);
        const blockType = getBlockType27(blockName);
        if (!blockType) {
          return null;
        }
        const attributes = getBlockAttributes3(clientId);
        const label = (0, import_blocks15.__experimentalGetBlockLabel)(blockType, attributes, context);
        if (label !== blockType.title) {
          return label;
        }
        const match2 = getActiveBlockVariation(blockName, attributes);
        return match2?.title || blockType.title;
      },
      [clientId, context]
    );
    if (!blockTitle) {
      return null;
    }
    if (maximumLength && maximumLength > 0 && blockTitle.length > maximumLength) {
      const omission = "...";
      return blockTitle.slice(0, maximumLength - omission.length) + omission;
    }
    return blockTitle;
  }

  // packages/block-editor/build-module/components/block-title/index.mjs
  function BlockTitle({ clientId, maximumLength, context }) {
    return useBlockDisplayTitle({ clientId, maximumLength, context });
  }

  // packages/block-editor/build-module/components/block-list/use-block-props/use-block-refs.mjs
  var import_element21 = __toESM(require_element(), 1);
  var import_compose7 = __toESM(require_compose(), 1);

  // packages/block-editor/build-module/components/provider/block-refs-provider.mjs
  var import_element20 = __toESM(require_element(), 1);
  var import_compose6 = __toESM(require_compose(), 1);
  var import_jsx_runtime141 = __toESM(require_jsx_runtime(), 1);
  var BlockRefs = (0, import_element20.createContext)({ refsMap: (0, import_compose6.observableMap)() });
  BlockRefs.displayName = "BlockRefsContext";
  function BlockRefsProvider({ children }) {
    const value = (0, import_element20.useMemo)(() => ({ refsMap: (0, import_compose6.observableMap)() }), []);
    return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(BlockRefs.Provider, { value, children });
  }

  // packages/block-editor/build-module/components/block-list/use-block-props/use-block-refs.mjs
  function useBlockRefProvider(clientId) {
    const { refsMap } = (0, import_element21.useContext)(BlockRefs);
    return (0, import_compose7.useRefEffect)(
      (element) => {
        refsMap.set(clientId, element);
        return () => refsMap.delete(clientId);
      },
      [clientId]
    );
  }
  function assignRef(ref, value) {
    if (typeof ref === "function") {
      ref(value);
    } else if (ref) {
      ref.current = value;
    }
  }
  function useBlockElementRef(clientId, ref) {
    const { refsMap } = (0, import_element21.useContext)(BlockRefs);
    (0, import_element21.useLayoutEffect)(() => {
      assignRef(ref, refsMap.get(clientId));
      const unsubscribe = refsMap.subscribe(
        clientId,
        () => assignRef(ref, refsMap.get(clientId))
      );
      return () => {
        unsubscribe();
        assignRef(ref, null);
      };
    }, [refsMap, clientId, ref]);
  }
  function useBlockElement(clientId) {
    const [blockElement, setBlockElement] = (0, import_element21.useState)(null);
    useBlockElementRef(clientId, setBlockElement);
    return blockElement;
  }

  // packages/block-editor/build-module/utils/get-editor-region.mjs
  function getEditorRegion(editor) {
    if (!editor) {
      return null;
    }
    const editorCanvas = Array.from(
      document.querySelectorAll('iframe[name="editor-canvas"]').values()
    ).find((iframe) => {
      const iframeDocument = iframe.contentDocument || iframe.contentWindow.document;
      return iframeDocument === editor.ownerDocument;
    }) ?? editor;
    return editorCanvas?.closest('[role="region"]') ?? editorCanvas;
  }

  // packages/block-editor/build-module/components/block-breadcrumb/index.mjs
  var import_jsx_runtime142 = __toESM(require_jsx_runtime(), 1);
  function BlockBreadcrumb({ rootLabelText }) {
    const { selectBlock: selectBlock2, clearSelectedBlock: clearSelectedBlock2 } = (0, import_data16.useDispatch)(store);
    const { clientId, parents, hasSelection } = (0, import_data16.useSelect)((select3) => {
      const {
        getSelectionStart: getSelectionStart2,
        getSelectedBlockClientId: getSelectedBlockClientId2,
        getEnabledBlockParents: getEnabledBlockParents2
      } = unlock(select3(store));
      const selectedBlockClientId = getSelectedBlockClientId2();
      return {
        parents: getEnabledBlockParents2(selectedBlockClientId),
        clientId: selectedBlockClientId,
        hasSelection: !!getSelectionStart2().clientId
      };
    }, []);
    const rootLabel = rootLabelText || (0, import_i18n21._x)("Document", "noun, breadcrumb");
    const blockRef = (0, import_element22.useRef)();
    useBlockElementRef(clientId, blockRef);
    return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
      "ul",
      {
        className: "block-editor-block-breadcrumb",
        role: "list",
        "aria-label": (0, import_i18n21.__)("Block breadcrumb"),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
            "li",
            {
              className: !hasSelection ? "block-editor-block-breadcrumb__current" : void 0,
              "aria-current": !hasSelection ? "true" : void 0,
              children: [
                hasSelection && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
                  import_components21.Button,
                  {
                    size: "small",
                    className: "block-editor-block-breadcrumb__button",
                    onClick: () => {
                      const blockEditor = blockRef.current?.closest(
                        ".editor-styles-wrapper"
                      );
                      clearSelectedBlock2();
                      getEditorRegion(blockEditor)?.focus();
                    },
                    children: rootLabel
                  }
                ),
                !hasSelection && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { children: rootLabel }),
                !!clientId && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
                  icon_default,
                  {
                    icon: chevron_right_small_default,
                    className: "block-editor-block-breadcrumb__separator"
                  }
                )
              ]
            }
          ),
          parents.map((parentClientId) => /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("li", { children: [
            /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
              import_components21.Button,
              {
                size: "small",
                className: "block-editor-block-breadcrumb__button",
                onClick: () => selectBlock2(parentClientId),
                children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
                  BlockTitle,
                  {
                    clientId: parentClientId,
                    maximumLength: 35,
                    context: "breadcrumb"
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
              icon_default,
              {
                icon: chevron_right_small_default,
                className: "block-editor-block-breadcrumb__separator"
              }
            )
          ] }, parentClientId)),
          !!clientId && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
            "li",
            {
              className: "block-editor-block-breadcrumb__current",
              "aria-current": "true",
              children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
                BlockTitle,
                {
                  clientId,
                  maximumLength: 35,
                  context: "breadcrumb"
                }
              )
            }
          )
        ]
      }
    );
  }
  var block_breadcrumb_default = BlockBreadcrumb;

  // packages/block-editor/build-module/components/block-content-overlay/index.mjs
  var import_data17 = __toESM(require_data(), 1);
  function useBlockOverlayActive(clientId) {
    return (0, import_data17.useSelect)(
      (select3) => {
        const { __unstableHasActiveBlockOverlayActive: __unstableHasActiveBlockOverlayActive2 } = select3(store);
        return __unstableHasActiveBlockOverlayActive2(clientId);
      },
      [clientId]
    );
  }

  // packages/block-editor/build-module/components/block-canvas/index.mjs
  var import_compose68 = __toESM(require_compose(), 1);
  var import_element126 = __toESM(require_element(), 1);
  var import_data123 = __toESM(require_data(), 1);
  var import_components118 = __toESM(require_components(), 1);

  // packages/block-editor/build-module/components/block-list/index.mjs
  var import_data77 = __toESM(require_data(), 1);
  var import_compose56 = __toESM(require_compose(), 1);
  var import_element90 = __toESM(require_element(), 1);
  var import_blocks45 = __toESM(require_blocks(), 1);

  // packages/block-editor/build-module/components/block-list/block.mjs
  var import_element33 = __toESM(require_element(), 1);
  var import_blocks22 = __toESM(require_blocks(), 1);
  var import_components28 = __toESM(require_components(), 1);
  var import_data29 = __toESM(require_data(), 1);
  var import_compose17 = __toESM(require_compose(), 1);
  var import_dom7 = __toESM(require_dom(), 1);

  // packages/block-editor/build-module/components/block-list/block-invalid-warning.mjs
  var import_i18n23 = __toESM(require_i18n(), 1);
  var import_components23 = __toESM(require_components(), 1);
  var import_element24 = __toESM(require_element(), 1);
  var import_blocks17 = __toESM(require_blocks(), 1);
  var import_data18 = __toESM(require_data(), 1);

  // packages/block-editor/build-module/components/block-compare/index.mjs
  var import_character = __toESM(require_character(), 1);
  var import_i18n22 = __toESM(require_i18n(), 1);
  var import_blocks16 = __toESM(require_blocks(), 1);

  // packages/block-editor/build-module/components/block-compare/block-view.mjs
  var import_components22 = __toESM(require_components(), 1);
  var import_element23 = __toESM(require_element(), 1);
  var import_dom = __toESM(require_dom(), 1);
  var import_jsx_runtime143 = __toESM(require_jsx_runtime(), 1);
  function BlockView({
    title,
    rawContent,
    renderedContent,
    action,
    actionText,
    className
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className, children: [
      /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "block-editor-block-compare__content", children: [
        /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("h2", { className: "block-editor-block-compare__heading", children: title }),
        /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", { className: "block-editor-block-compare__html", children: rawContent }),
        /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", { className: "block-editor-block-compare__preview edit-post-visual-editor", children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_element23.RawHTML, { children: (0, import_dom.safeHTML)(renderedContent) }) })
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", { className: "block-editor-block-compare__action", children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
        import_components22.Button,
        {
          __next40pxDefaultSize: true,
          variant: "secondary",
          tabIndex: "0",
          onClick: action,
          children: actionText
        }
      ) })
    ] });
  }

  // packages/block-editor/build-module/components/block-compare/index.mjs
  var import_jsx_runtime144 = __toESM(require_jsx_runtime(), 1);
  function BlockCompare({
    block,
    onKeep,
    onConvert,
    convertor,
    convertButtonText
  }) {
    function getDifference(originalContent, newContent) {
      const difference2 = (0, import_character.diffChars)(originalContent, newContent);
      return difference2.map((item, pos) => {
        const classes = clsx_default({
          "block-editor-block-compare__added": item.added,
          "block-editor-block-compare__removed": item.removed
        });
        return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { className: classes, children: item.value }, pos);
      });
    }
    function getConvertedContent(convertedBlock) {
      const newBlocks = Array.isArray(convertedBlock) ? convertedBlock : [convertedBlock];
      const newContent = newBlocks.map(
        (item) => (0, import_blocks16.getSaveContent)(item.name, item.attributes, item.innerBlocks)
      );
      return newContent.join("");
    }
    const converted = getConvertedContent(convertor(block));
    const difference = getDifference(block.originalContent, converted);
    return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "block-editor-block-compare__wrapper", children: [
      /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
        BlockView,
        {
          title: (0, import_i18n22.__)("Current"),
          className: "block-editor-block-compare__current",
          action: onKeep,
          actionText: (0, import_i18n22.__)("Convert to HTML"),
          rawContent: block.originalContent,
          renderedContent: block.originalContent
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
        BlockView,
        {
          title: (0, import_i18n22.__)("After Conversion"),
          className: "block-editor-block-compare__converted",
          action: onConvert,
          actionText: convertButtonText,
          rawContent: difference,
          renderedContent: converted
        }
      )
    ] });
  }
  var block_compare_default = BlockCompare;

  // packages/block-editor/build-module/components/block-list/block-invalid-warning.mjs
  var import_jsx_runtime145 = __toESM(require_jsx_runtime(), 1);
  var blockToBlocks = (block) => (0, import_blocks17.rawHandler)({
    HTML: block.originalContent
  });
  function BlockInvalidWarning({ clientId }) {
    const { block, canInsertHTMLBlock, canInsertClassicBlock } = (0, import_data18.useSelect)(
      (select3) => {
        const { canInsertBlockType: canInsertBlockType2, getBlock: getBlock2, getBlockRootClientId: getBlockRootClientId2 } = select3(store);
        const rootClientId = getBlockRootClientId2(clientId);
        return {
          block: getBlock2(clientId),
          canInsertHTMLBlock: canInsertBlockType2(
            "core/html",
            rootClientId
          ),
          canInsertClassicBlock: canInsertBlockType2(
            "core/freeform",
            rootClientId
          )
        };
      },
      [clientId]
    );
    const { replaceBlock: replaceBlock2 } = (0, import_data18.useDispatch)(store);
    const [compare2, setCompare] = (0, import_element24.useState)(false);
    const onCompareClose = (0, import_element24.useCallback)(() => setCompare(false), []);
    const convert = (0, import_element24.useMemo)(
      () => ({
        toClassic() {
          const classicBlock = (0, import_blocks17.createBlock)("core/freeform", {
            content: block.originalContent
          });
          return replaceBlock2(block.clientId, classicBlock);
        },
        toHTML() {
          const htmlBlock = (0, import_blocks17.createBlock)("core/html", {
            content: block.originalContent
          });
          return replaceBlock2(block.clientId, htmlBlock);
        },
        toBlocks() {
          const newBlocks = blockToBlocks(block);
          return replaceBlock2(block.clientId, newBlocks);
        },
        toRecoveredBlock() {
          const recoveredBlock = (0, import_blocks17.createBlock)(
            block.name,
            block.attributes,
            block.innerBlocks
          );
          return replaceBlock2(block.clientId, recoveredBlock);
        }
      }),
      [block, replaceBlock2]
    );
    const secondaryActions = (0, import_element24.useMemo)(
      () => [
        {
          // translators: Button to fix block content
          title: (0, import_i18n23._x)("Resolve", "imperative verb"),
          onClick: () => setCompare(true)
        },
        canInsertHTMLBlock && {
          title: (0, import_i18n23.__)("Convert to HTML"),
          onClick: convert.toHTML
        },
        canInsertClassicBlock && {
          title: (0, import_i18n23.__)("Convert to Classic Block"),
          onClick: convert.toClassic
        }
      ].filter(Boolean),
      [canInsertHTMLBlock, canInsertClassicBlock, convert]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_jsx_runtime145.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
        warning_default,
        {
          actions: [
            /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
              import_components23.Button,
              {
                __next40pxDefaultSize: true,
                onClick: convert.toRecoveredBlock,
                variant: "primary",
                children: (0, import_i18n23.__)("Attempt recovery")
              },
              "recover"
            )
          ],
          secondaryActions,
          children: (0, import_i18n23.__)("Block contains unexpected or invalid content.")
        }
      ),
      compare2 && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
        import_components23.Modal,
        {
          title: (
            // translators: Dialog title to fix block content
            (0, import_i18n23.__)("Resolve Block")
          ),
          onRequestClose: onCompareClose,
          className: "block-editor-block-compare",
          children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
            block_compare_default,
            {
              block,
              onKeep: convert.toHTML,
              onConvert: convert.toBlocks,
              convertor: blockToBlocks,
              convertButtonText: (0, import_i18n23.__)("Convert to Blocks")
            }
          )
        }
      )
    ] });
  }

  // packages/block-editor/build-module/components/block-list/block-crash-warning.mjs
  var import_i18n24 = __toESM(require_i18n(), 1);
  var import_jsx_runtime146 = __toESM(require_jsx_runtime(), 1);
  var warning = /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(warning_default, { className: "block-editor-block-list__block-crash-warning", children: (0, import_i18n24.__)("This block has encountered an error and cannot be previewed.") });
  var block_crash_warning_default = () => warning;

  // packages/block-editor/build-module/components/block-list/block-crash-boundary.mjs
  var import_element25 = __toESM(require_element(), 1);
  var BlockCrashBoundary = class extends import_element25.Component {
    constructor() {
      super(...arguments);
      this.state = {
        hasError: false
      };
    }
    componentDidCatch() {
      this.setState({
        hasError: true
      });
    }
    render() {
      if (this.state.hasError) {
        return this.props.fallback;
      }
      return this.props.children;
    }
  };
  var block_crash_boundary_default = BlockCrashBoundary;

  // packages/block-editor/build-module/components/block-list/block-html.mjs
  var import_react_autosize_textarea = __toESM(require_lib(), 1);
  var import_element26 = __toESM(require_element(), 1);
  var import_data19 = __toESM(require_data(), 1);
  var import_blocks18 = __toESM(require_blocks(), 1);
  var import_jsx_runtime147 = __toESM(require_jsx_runtime(), 1);
  function BlockHTML({ clientId }) {
    const [html, setHtml] = (0, import_element26.useState)("");
    const block = (0, import_data19.useSelect)(
      (select3) => select3(store).getBlock(clientId),
      [clientId]
    );
    const { updateBlock: updateBlock2 } = (0, import_data19.useDispatch)(store);
    const blockContent = (0, import_element26.useMemo)(
      () => block ? (0, import_blocks18.getBlockContent)(block) : "",
      [block]
    );
    const onChange = () => {
      const blockType = (0, import_blocks18.getBlockType)(block.name);
      if (!blockType) {
        return;
      }
      const attributes = (0, import_blocks18.getBlockAttributes)(
        blockType,
        html,
        block.attributes
      );
      const content = html ? html : (0, import_blocks18.getSaveContent)(blockType, attributes);
      const [isValid2] = html ? (0, import_blocks18.validateBlock)({
        ...block,
        attributes,
        originalContent: content
      }) : [true];
      updateBlock2(clientId, {
        attributes,
        originalContent: content,
        isValid: isValid2
      });
      if (!html) {
        setHtml(content);
      }
    };
    (0, import_element26.useEffect)(() => {
      setHtml(blockContent);
    }, [blockContent]);
    return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
      import_react_autosize_textarea.default,
      {
        className: "block-editor-block-list__block-html-textarea",
        value: html,
        onBlur: onChange,
        onChange: (event) => setHtml(event.target.value)
      }
    );
  }
  var block_html_default = BlockHTML;

  // packages/block-editor/build-module/components/block-list/use-block-props/index.mjs
  var import_element32 = __toESM(require_element(), 1);
  var import_i18n30 = __toESM(require_i18n(), 1);
  var import_blocks21 = __toESM(require_blocks(), 1);
  var import_compose16 = __toESM(require_compose(), 1);
  var import_warning4 = __toESM(require_warning(), 1);

  // node_modules/@react-spring/rafz/dist/react-spring-rafz.esm.js
  var updateQueue = makeQueue();
  var raf = (fn) => schedule(fn, updateQueue);
  var writeQueue = makeQueue();
  raf.write = (fn) => schedule(fn, writeQueue);
  var onStartQueue = makeQueue();
  raf.onStart = (fn) => schedule(fn, onStartQueue);
  var onFrameQueue = makeQueue();
  raf.onFrame = (fn) => schedule(fn, onFrameQueue);
  var onFinishQueue = makeQueue();
  raf.onFinish = (fn) => schedule(fn, onFinishQueue);
  var timeouts = [];
  raf.setTimeout = (handler, ms) => {
    let time = raf.now() + ms;
    let cancel = () => {
      let i2 = timeouts.findIndex((t3) => t3.cancel == cancel);
      if (~i2) timeouts.splice(i2, 1);
      pendingCount -= ~i2 ? 1 : 0;
    };
    let timeout = {
      time,
      handler,
      cancel
    };
    timeouts.splice(findTimeout(time), 0, timeout);
    pendingCount += 1;
    start();
    return timeout;
  };
  var findTimeout = (time) => ~(~timeouts.findIndex((t3) => t3.time > time) || ~timeouts.length);
  raf.cancel = (fn) => {
    onStartQueue.delete(fn);
    onFrameQueue.delete(fn);
    onFinishQueue.delete(fn);
    updateQueue.delete(fn);
    writeQueue.delete(fn);
  };
  raf.sync = (fn) => {
    sync = true;
    raf.batchedUpdates(fn);
    sync = false;
  };
  raf.throttle = (fn) => {
    let lastArgs;
    function queuedFn() {
      try {
        fn(...lastArgs);
      } finally {
        lastArgs = null;
      }
    }
    function throttled(...args) {
      lastArgs = args;
      raf.onStart(queuedFn);
    }
    throttled.handler = fn;
    throttled.cancel = () => {
      onStartQueue.delete(queuedFn);
      lastArgs = null;
    };
    return throttled;
  };
  var nativeRaf = typeof window != "undefined" ? window.requestAnimationFrame : () => {
  };
  raf.use = (impl) => nativeRaf = impl;
  raf.now = typeof performance != "undefined" ? () => performance.now() : Date.now;
  raf.batchedUpdates = (fn) => fn();
  raf.catch = console.error;
  raf.frameLoop = "always";
  raf.advance = () => {
    if (raf.frameLoop !== "demand") {
      console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand");
    } else {
      update();
    }
  };
  var ts = -1;
  var pendingCount = 0;
  var sync = false;
  function schedule(fn, queue) {
    if (sync) {
      queue.delete(fn);
      fn(0);
    } else {
      queue.add(fn);
      start();
    }
  }
  function start() {
    if (ts < 0) {
      ts = 0;
      if (raf.frameLoop !== "demand") {
        nativeRaf(loop);
      }
    }
  }
  function stop() {
    ts = -1;
  }
  function loop() {
    if (~ts) {
      nativeRaf(loop);
      raf.batchedUpdates(update);
    }
  }
  function update() {
    let prevTs = ts;
    ts = raf.now();
    let count = findTimeout(ts);
    if (count) {
      eachSafely(timeouts.splice(0, count), (t3) => t3.handler());
      pendingCount -= count;
    }
    if (!pendingCount) {
      stop();
      return;
    }
    onStartQueue.flush();
    updateQueue.flush(prevTs ? Math.min(64, ts - prevTs) : 16.667);
    onFrameQueue.flush();
    writeQueue.flush();
    onFinishQueue.flush();
  }
  function makeQueue() {
    let next = /* @__PURE__ */ new Set();
    let current = next;
    return {
      add(fn) {
        pendingCount += current == next && !next.has(fn) ? 1 : 0;
        next.add(fn);
      },
      delete(fn) {
        pendingCount -= current == next && next.has(fn) ? 1 : 0;
        return next.delete(fn);
      },
      flush(arg) {
        if (current.size) {
          next = /* @__PURE__ */ new Set();
          pendingCount -= current.size;
          eachSafely(current, (fn) => fn(arg) && next.add(fn));
          pendingCount += next.size;
          current = next;
        }
      }
    };
  }
  function eachSafely(values, each2) {
    values.forEach((value) => {
      try {
        each2(value);
      } catch (e2) {
        raf.catch(e2);
      }
    });
  }

  // node_modules/@react-spring/shared/dist/react-spring-shared.esm.js
  var import_react = __toESM(require_react());
  function noop3() {
  }
  var defineHidden = (obj, key, value) => Object.defineProperty(obj, key, {
    value,
    writable: true,
    configurable: true
  });
  var is = {
    arr: Array.isArray,
    obj: (a2) => !!a2 && a2.constructor.name === "Object",
    fun: (a2) => typeof a2 === "function",
    str: (a2) => typeof a2 === "string",
    num: (a2) => typeof a2 === "number",
    und: (a2) => a2 === void 0
  };
  function isEqual(a2, b2) {
    if (is.arr(a2)) {
      if (!is.arr(b2) || a2.length !== b2.length) return false;
      for (let i2 = 0; i2 < a2.length; i2++) {
        if (a2[i2] !== b2[i2]) return false;
      }
      return true;
    }
    return a2 === b2;
  }
  var each = (obj, fn) => obj.forEach(fn);
  function eachProp(obj, fn, ctx2) {
    if (is.arr(obj)) {
      for (let i2 = 0; i2 < obj.length; i2++) {
        fn.call(ctx2, obj[i2], `${i2}`);
      }
      return;
    }
    for (const key in obj) {
      if (obj.hasOwnProperty(key)) {
        fn.call(ctx2, obj[key], key);
      }
    }
  }
  var toArray = (a2) => is.und(a2) ? [] : is.arr(a2) ? a2 : [a2];
  function flush(queue, iterator) {
    if (queue.size) {
      const items = Array.from(queue);
      queue.clear();
      each(items, iterator);
    }
  }
  var flushCalls = (queue, ...args) => flush(queue, (fn) => fn(...args));
  var isSSR = () => typeof window === "undefined" || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent);
  var createStringInterpolator$1;
  var to;
  var colors$1 = null;
  var skipAnimation = false;
  var willAdvance = noop3;
  var assign = (globals2) => {
    if (globals2.to) to = globals2.to;
    if (globals2.now) raf.now = globals2.now;
    if (globals2.colors !== void 0) colors$1 = globals2.colors;
    if (globals2.skipAnimation != null) skipAnimation = globals2.skipAnimation;
    if (globals2.createStringInterpolator) createStringInterpolator$1 = globals2.createStringInterpolator;
    if (globals2.requestAnimationFrame) raf.use(globals2.requestAnimationFrame);
    if (globals2.batchedUpdates) raf.batchedUpdates = globals2.batchedUpdates;
    if (globals2.willAdvance) willAdvance = globals2.willAdvance;
    if (globals2.frameLoop) raf.frameLoop = globals2.frameLoop;
  };
  var globals = /* @__PURE__ */ Object.freeze({
    __proto__: null,
    get createStringInterpolator() {
      return createStringInterpolator$1;
    },
    get to() {
      return to;
    },
    get colors() {
      return colors$1;
    },
    get skipAnimation() {
      return skipAnimation;
    },
    get willAdvance() {
      return willAdvance;
    },
    assign
  });
  var startQueue = /* @__PURE__ */ new Set();
  var currentFrame = [];
  var prevFrame = [];
  var priority = 0;
  var frameLoop = {
    get idle() {
      return !startQueue.size && !currentFrame.length;
    },
    start(animation) {
      if (priority > animation.priority) {
        startQueue.add(animation);
        raf.onStart(flushStartQueue);
      } else {
        startSafely(animation);
        raf(advance);
      }
    },
    advance,
    sort(animation) {
      if (priority) {
        raf.onFrame(() => frameLoop.sort(animation));
      } else {
        const prevIndex = currentFrame.indexOf(animation);
        if (~prevIndex) {
          currentFrame.splice(prevIndex, 1);
          startUnsafely(animation);
        }
      }
    },
    clear() {
      currentFrame = [];
      startQueue.clear();
    }
  };
  function flushStartQueue() {
    startQueue.forEach(startSafely);
    startQueue.clear();
    raf(advance);
  }
  function startSafely(animation) {
    if (!currentFrame.includes(animation)) startUnsafely(animation);
  }
  function startUnsafely(animation) {
    currentFrame.splice(findIndex(currentFrame, (other) => other.priority > animation.priority), 0, animation);
  }
  function advance(dt) {
    const nextFrame = prevFrame;
    for (let i2 = 0; i2 < currentFrame.length; i2++) {
      const animation = currentFrame[i2];
      priority = animation.priority;
      if (!animation.idle) {
        willAdvance(animation);
        animation.advance(dt);
        if (!animation.idle) {
          nextFrame.push(animation);
        }
      }
    }
    priority = 0;
    prevFrame = currentFrame;
    prevFrame.length = 0;
    currentFrame = nextFrame;
    return currentFrame.length > 0;
  }
  function findIndex(arr, test) {
    const index = arr.findIndex(test);
    return index < 0 ? arr.length : index;
  }
  var colors = {
    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 NUMBER = "[-+]?\\d*\\.?\\d+";
  var PERCENTAGE = NUMBER + "%";
  function call(...parts) {
    return "\\(\\s*(" + parts.join(")\\s*,\\s*(") + ")\\s*\\)";
  }
  var rgb = new RegExp("rgb" + call(NUMBER, NUMBER, NUMBER));
  var rgba = new RegExp("rgba" + call(NUMBER, NUMBER, NUMBER, NUMBER));
  var hsl = new RegExp("hsl" + call(NUMBER, PERCENTAGE, PERCENTAGE));
  var hsla = new RegExp("hsla" + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));
  var hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
  var hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
  var hex6 = /^#([0-9a-fA-F]{6})$/;
  var hex8 = /^#([0-9a-fA-F]{8})$/;
  function normalizeColor(color) {
    let match2;
    if (typeof color === "number") {
      return color >>> 0 === color && color >= 0 && color <= 4294967295 ? color : null;
    }
    if (match2 = hex6.exec(color)) return parseInt(match2[1] + "ff", 16) >>> 0;
    if (colors$1 && colors$1[color] !== void 0) {
      return colors$1[color];
    }
    if (match2 = rgb.exec(color)) {
      return (parse255(match2[1]) << 24 | parse255(match2[2]) << 16 | parse255(match2[3]) << 8 | 255) >>> 0;
    }
    if (match2 = rgba.exec(color)) {
      return (parse255(match2[1]) << 24 | parse255(match2[2]) << 16 | parse255(match2[3]) << 8 | parse1(match2[4])) >>> 0;
    }
    if (match2 = hex3.exec(color)) {
      return parseInt(match2[1] + match2[1] + match2[2] + match2[2] + match2[3] + match2[3] + "ff", 16) >>> 0;
    }
    if (match2 = hex8.exec(color)) return parseInt(match2[1], 16) >>> 0;
    if (match2 = hex4.exec(color)) {
      return parseInt(match2[1] + match2[1] + match2[2] + match2[2] + match2[3] + match2[3] + match2[4] + match2[4], 16) >>> 0;
    }
    if (match2 = hsl.exec(color)) {
      return (hslToRgb(parse360(match2[1]), parsePercentage(match2[2]), parsePercentage(match2[3])) | 255) >>> 0;
    }
    if (match2 = hsla.exec(color)) {
      return (hslToRgb(parse360(match2[1]), parsePercentage(match2[2]), parsePercentage(match2[3])) | parse1(match2[4])) >>> 0;
    }
    return null;
  }
  function hue2rgb(p2, q, t3) {
    if (t3 < 0) t3 += 1;
    if (t3 > 1) t3 -= 1;
    if (t3 < 1 / 6) return p2 + (q - p2) * 6 * t3;
    if (t3 < 1 / 2) return q;
    if (t3 < 2 / 3) return p2 + (q - p2) * (2 / 3 - t3) * 6;
    return p2;
  }
  function hslToRgb(h2, s2, l2) {
    const q = l2 < 0.5 ? l2 * (1 + s2) : l2 + s2 - l2 * s2;
    const p2 = 2 * l2 - q;
    const r3 = hue2rgb(p2, q, h2 + 1 / 3);
    const g2 = hue2rgb(p2, q, h2);
    const b2 = hue2rgb(p2, q, h2 - 1 / 3);
    return Math.round(r3 * 255) << 24 | Math.round(g2 * 255) << 16 | Math.round(b2 * 255) << 8;
  }
  function parse255(str) {
    const int = parseInt(str, 10);
    if (int < 0) return 0;
    if (int > 255) return 255;
    return int;
  }
  function parse360(str) {
    const int = parseFloat(str);
    return (int % 360 + 360) % 360 / 360;
  }
  function parse1(str) {
    const num = parseFloat(str);
    if (num < 0) return 0;
    if (num > 1) return 255;
    return Math.round(num * 255);
  }
  function parsePercentage(str) {
    const int = parseFloat(str);
    if (int < 0) return 0;
    if (int > 100) return 1;
    return int / 100;
  }
  function colorToRgba(input) {
    let int32Color = normalizeColor(input);
    if (int32Color === null) return input;
    int32Color = int32Color || 0;
    let r3 = (int32Color & 4278190080) >>> 24;
    let g2 = (int32Color & 16711680) >>> 16;
    let b2 = (int32Color & 65280) >>> 8;
    let a2 = (int32Color & 255) / 255;
    return `rgba(${r3}, ${g2}, ${b2}, ${a2})`;
  }
  var createInterpolator = (range2, output, extrapolate) => {
    if (is.fun(range2)) {
      return range2;
    }
    if (is.arr(range2)) {
      return createInterpolator({
        range: range2,
        output,
        extrapolate
      });
    }
    if (is.str(range2.output[0])) {
      return createStringInterpolator$1(range2);
    }
    const config2 = range2;
    const outputRange = config2.output;
    const inputRange = config2.range || [0, 1];
    const extrapolateLeft = config2.extrapolateLeft || config2.extrapolate || "extend";
    const extrapolateRight = config2.extrapolateRight || config2.extrapolate || "extend";
    const easing = config2.easing || ((t3) => t3);
    return (input) => {
      const range3 = findRange(input, inputRange);
      return interpolate(input, inputRange[range3], inputRange[range3 + 1], outputRange[range3], outputRange[range3 + 1], easing, extrapolateLeft, extrapolateRight, config2.map);
    };
  };
  function interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight, map) {
    let result = map ? map(input) : input;
    if (result < inputMin) {
      if (extrapolateLeft === "identity") return result;
      else if (extrapolateLeft === "clamp") result = inputMin;
    }
    if (result > inputMax) {
      if (extrapolateRight === "identity") return result;
      else if (extrapolateRight === "clamp") result = inputMax;
    }
    if (outputMin === outputMax) return outputMin;
    if (inputMin === inputMax) return input <= inputMin ? outputMin : outputMax;
    if (inputMin === -Infinity) result = -result;
    else if (inputMax === Infinity) result = result - inputMin;
    else result = (result - inputMin) / (inputMax - inputMin);
    result = easing(result);
    if (outputMin === -Infinity) result = -result;
    else if (outputMax === Infinity) result = result + outputMin;
    else result = result * (outputMax - outputMin) + outputMin;
    return result;
  }
  function findRange(input, inputRange) {
    for (var i2 = 1; i2 < inputRange.length - 1; ++i2) if (inputRange[i2] >= input) break;
    return i2 - 1;
  }
  function _extends() {
    _extends = Object.assign ? Object.assign.bind() : function(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2];
        for (var key in source) {
          if (Object.prototype.hasOwnProperty.call(source, key)) {
            target[key] = source[key];
          }
        }
      }
      return target;
    };
    return _extends.apply(this, arguments);
  }
  var $get = /* @__PURE__ */ Symbol.for("FluidValue.get");
  var $observers = /* @__PURE__ */ Symbol.for("FluidValue.observers");
  var hasFluidValue = (arg) => Boolean(arg && arg[$get]);
  var getFluidValue = (arg) => arg && arg[$get] ? arg[$get]() : arg;
  var getFluidObservers = (target) => target[$observers] || null;
  function callFluidObserver(observer, event) {
    if (observer.eventObserved) {
      observer.eventObserved(event);
    } else {
      observer(event);
    }
  }
  function callFluidObservers(target, event) {
    let observers = target[$observers];
    if (observers) {
      observers.forEach((observer) => {
        callFluidObserver(observer, event);
      });
    }
  }
  var FluidValue = class {
    constructor(get) {
      this[$get] = void 0;
      this[$observers] = void 0;
      if (!get && !(get = this.get)) {
        throw Error("Unknown getter");
      }
      setFluidGetter(this, get);
    }
  };
  var setFluidGetter = (target, get) => setHidden(target, $get, get);
  function addFluidObserver(target, observer) {
    if (target[$get]) {
      let observers = target[$observers];
      if (!observers) {
        setHidden(target, $observers, observers = /* @__PURE__ */ new Set());
      }
      if (!observers.has(observer)) {
        observers.add(observer);
        if (target.observerAdded) {
          target.observerAdded(observers.size, observer);
        }
      }
    }
    return observer;
  }
  function removeFluidObserver(target, observer) {
    let observers = target[$observers];
    if (observers && observers.has(observer)) {
      const count = observers.size - 1;
      if (count) {
        observers.delete(observer);
      } else {
        target[$observers] = null;
      }
      if (target.observerRemoved) {
        target.observerRemoved(count, observer);
      }
    }
  }
  var setHidden = (target, key, value) => Object.defineProperty(target, key, {
    value,
    writable: true,
    configurable: true
  });
  var numberRegex = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g;
  var colorRegex = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi;
  var unitRegex = new RegExp(`(${numberRegex.source})(%|[a-z]+)`, "i");
  var rgbaRegex = /rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi;
  var cssVariableRegex = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;
  var variableToRgba = (input) => {
    const [token, fallback] = parseCSSVariable(input);
    if (!token || isSSR()) {
      return input;
    }
    const value = window.getComputedStyle(document.documentElement).getPropertyValue(token);
    if (value) {
      return value.trim();
    } else if (fallback && fallback.startsWith("--")) {
      const _value = window.getComputedStyle(document.documentElement).getPropertyValue(fallback);
      if (_value) {
        return _value;
      } else {
        return input;
      }
    } else if (fallback && cssVariableRegex.test(fallback)) {
      return variableToRgba(fallback);
    } else if (fallback) {
      return fallback;
    }
    return input;
  };
  var parseCSSVariable = (current) => {
    const match2 = cssVariableRegex.exec(current);
    if (!match2) return [,];
    const [, token, fallback] = match2;
    return [token, fallback];
  };
  var namedColorRegex;
  var rgbaRound = (_, p1, p2, p3, p4) => `rgba(${Math.round(p1)}, ${Math.round(p2)}, ${Math.round(p3)}, ${p4})`;
  var createStringInterpolator = (config2) => {
    if (!namedColorRegex) namedColorRegex = colors$1 ? new RegExp(`(${Object.keys(colors$1).join("|")})(?!\\w)`, "g") : /^\b$/;
    const output = config2.output.map((value) => {
      return getFluidValue(value).replace(cssVariableRegex, variableToRgba).replace(colorRegex, colorToRgba).replace(namedColorRegex, colorToRgba);
    });
    const keyframes = output.map((value) => value.match(numberRegex).map(Number));
    const outputRanges = keyframes[0].map((_, i2) => keyframes.map((values) => {
      if (!(i2 in values)) {
        throw Error('The arity of each "output" value must be equal');
      }
      return values[i2];
    }));
    const interpolators = outputRanges.map((output2) => createInterpolator(_extends({}, config2, {
      output: output2
    })));
    return (input) => {
      var _output$find;
      const missingUnit = !unitRegex.test(output[0]) && ((_output$find = output.find((value) => unitRegex.test(value))) == null ? void 0 : _output$find.replace(numberRegex, ""));
      let i2 = 0;
      return output[0].replace(numberRegex, () => `${interpolators[i2++](input)}${missingUnit || ""}`).replace(rgbaRegex, rgbaRound);
    };
  };
  var prefix = "react-spring: ";
  var once = (fn) => {
    const func = fn;
    let called = false;
    if (typeof func != "function") {
      throw new TypeError(`${prefix}once requires a function parameter`);
    }
    return (...args) => {
      if (!called) {
        func(...args);
        called = true;
      }
    };
  };
  var warnInterpolate = once(console.warn);
  function deprecateInterpolate() {
    warnInterpolate(`${prefix}The "interpolate" function is deprecated in v9 (use "to" instead)`);
  }
  var warnDirectCall = once(console.warn);
  function isAnimatedString(value) {
    return is.str(value) && (value[0] == "#" || /\d/.test(value) || !isSSR() && cssVariableRegex.test(value) || value in (colors$1 || {}));
  }
  var useIsomorphicLayoutEffect = isSSR() ? import_react.useEffect : import_react.useLayoutEffect;
  var useIsMounted = () => {
    const isMounted = (0, import_react.useRef)(false);
    useIsomorphicLayoutEffect(() => {
      isMounted.current = true;
      return () => {
        isMounted.current = false;
      };
    }, []);
    return isMounted;
  };
  function useForceUpdate() {
    const update4 = (0, import_react.useState)()[1];
    const isMounted = useIsMounted();
    return () => {
      if (isMounted.current) {
        update4(Math.random());
      }
    };
  }
  function useMemoOne(getResult, inputs) {
    const [initial] = (0, import_react.useState)(() => ({
      inputs,
      result: getResult()
    }));
    const committed = (0, import_react.useRef)();
    const prevCache = committed.current;
    let cache = prevCache;
    if (cache) {
      const useCache = Boolean(inputs && cache.inputs && areInputsEqual(inputs, cache.inputs));
      if (!useCache) {
        cache = {
          inputs,
          result: getResult()
        };
      }
    } else {
      cache = initial;
    }
    (0, import_react.useEffect)(() => {
      committed.current = cache;
      if (prevCache == initial) {
        initial.inputs = initial.result = void 0;
      }
    }, [cache]);
    return cache.result;
  }
  function areInputsEqual(next, prev) {
    if (next.length !== prev.length) {
      return false;
    }
    for (let i2 = 0; i2 < next.length; i2++) {
      if (next[i2] !== prev[i2]) {
        return false;
      }
    }
    return true;
  }
  var useOnce = (effect) => (0, import_react.useEffect)(effect, emptyDeps);
  var emptyDeps = [];

  // node_modules/@react-spring/core/dist/react-spring-core.esm.js
  var React2 = __toESM(require_react());
  var import_react3 = __toESM(require_react());

  // node_modules/@react-spring/animated/dist/react-spring-animated.esm.js
  var React = __toESM(require_react());
  var import_react2 = __toESM(require_react());
  var $node = /* @__PURE__ */ Symbol.for("Animated:node");
  var isAnimated = (value) => !!value && value[$node] === value;
  var getAnimated = (owner) => owner && owner[$node];
  var setAnimated = (owner, node) => defineHidden(owner, $node, node);
  var getPayload = (owner) => owner && owner[$node] && owner[$node].getPayload();
  var Animated = class {
    constructor() {
      this.payload = void 0;
      setAnimated(this, this);
    }
    getPayload() {
      return this.payload || [];
    }
  };
  var AnimatedValue = class _AnimatedValue extends Animated {
    constructor(_value) {
      super();
      this.done = true;
      this.elapsedTime = void 0;
      this.lastPosition = void 0;
      this.lastVelocity = void 0;
      this.v0 = void 0;
      this.durationProgress = 0;
      this._value = _value;
      if (is.num(this._value)) {
        this.lastPosition = this._value;
      }
    }
    static create(value) {
      return new _AnimatedValue(value);
    }
    getPayload() {
      return [this];
    }
    getValue() {
      return this._value;
    }
    setValue(value, step) {
      if (is.num(value)) {
        this.lastPosition = value;
        if (step) {
          value = Math.round(value / step) * step;
          if (this.done) {
            this.lastPosition = value;
          }
        }
      }
      if (this._value === value) {
        return false;
      }
      this._value = value;
      return true;
    }
    reset() {
      const {
        done
      } = this;
      this.done = false;
      if (is.num(this._value)) {
        this.elapsedTime = 0;
        this.durationProgress = 0;
        this.lastPosition = this._value;
        if (done) this.lastVelocity = null;
        this.v0 = null;
      }
    }
  };
  var AnimatedString = class _AnimatedString extends AnimatedValue {
    constructor(value) {
      super(0);
      this._string = null;
      this._toString = void 0;
      this._toString = createInterpolator({
        output: [value, value]
      });
    }
    static create(value) {
      return new _AnimatedString(value);
    }
    getValue() {
      let value = this._string;
      return value == null ? this._string = this._toString(this._value) : value;
    }
    setValue(value) {
      if (is.str(value)) {
        if (value == this._string) {
          return false;
        }
        this._string = value;
        this._value = 1;
      } else if (super.setValue(value)) {
        this._string = null;
      } else {
        return false;
      }
      return true;
    }
    reset(goal) {
      if (goal) {
        this._toString = createInterpolator({
          output: [this.getValue(), goal]
        });
      }
      this._value = 0;
      super.reset();
    }
  };
  var TreeContext = {
    dependencies: null
  };
  var AnimatedObject = class extends Animated {
    constructor(source) {
      super();
      this.source = source;
      this.setValue(source);
    }
    getValue(animated2) {
      const values = {};
      eachProp(this.source, (source, key) => {
        if (isAnimated(source)) {
          values[key] = source.getValue(animated2);
        } else if (hasFluidValue(source)) {
          values[key] = getFluidValue(source);
        } else if (!animated2) {
          values[key] = source;
        }
      });
      return values;
    }
    setValue(source) {
      this.source = source;
      this.payload = this._makePayload(source);
    }
    reset() {
      if (this.payload) {
        each(this.payload, (node) => node.reset());
      }
    }
    _makePayload(source) {
      if (source) {
        const payload = /* @__PURE__ */ new Set();
        eachProp(source, this._addToPayload, payload);
        return Array.from(payload);
      }
    }
    _addToPayload(source) {
      if (TreeContext.dependencies && hasFluidValue(source)) {
        TreeContext.dependencies.add(source);
      }
      const payload = getPayload(source);
      if (payload) {
        each(payload, (node) => this.add(node));
      }
    }
  };
  var AnimatedArray = class _AnimatedArray extends AnimatedObject {
    constructor(source) {
      super(source);
    }
    static create(source) {
      return new _AnimatedArray(source);
    }
    getValue() {
      return this.source.map((node) => node.getValue());
    }
    setValue(source) {
      const payload = this.getPayload();
      if (source.length == payload.length) {
        return payload.map((node, i2) => node.setValue(source[i2])).some(Boolean);
      }
      super.setValue(source.map(makeAnimated));
      return true;
    }
  };
  function makeAnimated(value) {
    const nodeType = isAnimatedString(value) ? AnimatedString : AnimatedValue;
    return nodeType.create(value);
  }
  function getAnimatedType(value) {
    const parentNode = getAnimated(value);
    return parentNode ? parentNode.constructor : is.arr(value) ? AnimatedArray : isAnimatedString(value) ? AnimatedString : AnimatedValue;
  }
  function _extends2() {
    _extends2 = Object.assign ? Object.assign.bind() : function(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2];
        for (var key in source) {
          if (Object.prototype.hasOwnProperty.call(source, key)) {
            target[key] = source[key];
          }
        }
      }
      return target;
    };
    return _extends2.apply(this, arguments);
  }
  var withAnimated = (Component7, host2) => {
    const hasInstance = !is.fun(Component7) || Component7.prototype && Component7.prototype.isReactComponent;
    return (0, import_react2.forwardRef)((givenProps, givenRef) => {
      const instanceRef = (0, import_react2.useRef)(null);
      const ref = hasInstance && (0, import_react2.useCallback)((value) => {
        instanceRef.current = updateRef(givenRef, value);
      }, [givenRef]);
      const [props, deps] = getAnimatedState(givenProps, host2);
      const forceUpdate = useForceUpdate();
      const callback = () => {
        const instance = instanceRef.current;
        if (hasInstance && !instance) {
          return;
        }
        const didUpdate = instance ? host2.applyAnimatedValues(instance, props.getValue(true)) : false;
        if (didUpdate === false) {
          forceUpdate();
        }
      };
      const observer = new PropsObserver(callback, deps);
      const observerRef = (0, import_react2.useRef)();
      useIsomorphicLayoutEffect(() => {
        observerRef.current = observer;
        each(deps, (dep) => addFluidObserver(dep, observer));
        return () => {
          if (observerRef.current) {
            each(observerRef.current.deps, (dep) => removeFluidObserver(dep, observerRef.current));
            raf.cancel(observerRef.current.update);
          }
        };
      });
      (0, import_react2.useEffect)(callback, []);
      useOnce(() => () => {
        const observer2 = observerRef.current;
        each(observer2.deps, (dep) => removeFluidObserver(dep, observer2));
      });
      const usedProps = host2.getComponentProps(props.getValue());
      return React.createElement(Component7, _extends2({}, usedProps, {
        ref
      }));
    });
  };
  var PropsObserver = class {
    constructor(update4, deps) {
      this.update = update4;
      this.deps = deps;
    }
    eventObserved(event) {
      if (event.type == "change") {
        raf.write(this.update);
      }
    }
  };
  function getAnimatedState(props, host2) {
    const dependencies = /* @__PURE__ */ new Set();
    TreeContext.dependencies = dependencies;
    if (props.style) props = _extends2({}, props, {
      style: host2.createAnimatedStyle(props.style)
    });
    props = new AnimatedObject(props);
    TreeContext.dependencies = null;
    return [props, dependencies];
  }
  function updateRef(ref, value) {
    if (ref) {
      if (is.fun(ref)) ref(value);
      else ref.current = value;
    }
    return value;
  }
  var cacheKey = /* @__PURE__ */ Symbol.for("AnimatedComponent");
  var createHost = (components, {
    applyAnimatedValues: _applyAnimatedValues = () => false,
    createAnimatedStyle: _createAnimatedStyle = (style) => new AnimatedObject(style),
    getComponentProps: _getComponentProps = (props) => props
  } = {}) => {
    const hostConfig = {
      applyAnimatedValues: _applyAnimatedValues,
      createAnimatedStyle: _createAnimatedStyle,
      getComponentProps: _getComponentProps
    };
    const animated2 = (Component7) => {
      const displayName = getDisplayName(Component7) || "Anonymous";
      if (is.str(Component7)) {
        Component7 = animated2[Component7] || (animated2[Component7] = withAnimated(Component7, hostConfig));
      } else {
        Component7 = Component7[cacheKey] || (Component7[cacheKey] = withAnimated(Component7, hostConfig));
      }
      Component7.displayName = `Animated(${displayName})`;
      return Component7;
    };
    eachProp(components, (Component7, key) => {
      if (is.arr(components)) {
        key = getDisplayName(Component7);
      }
      animated2[key] = animated2(Component7);
    });
    return {
      animated: animated2
    };
  };
  var getDisplayName = (arg) => is.str(arg) ? arg : arg && is.str(arg.displayName) ? arg.displayName : is.fun(arg) && arg.name || null;

  // node_modules/@react-spring/core/dist/react-spring-core.esm.js
  function _extends3() {
    _extends3 = Object.assign ? Object.assign.bind() : function(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2];
        for (var key in source) {
          if (Object.prototype.hasOwnProperty.call(source, key)) {
            target[key] = source[key];
          }
        }
      }
      return target;
    };
    return _extends3.apply(this, arguments);
  }
  function callProp(value, ...args) {
    return is.fun(value) ? value(...args) : value;
  }
  var matchProp = (value, key) => value === true || !!(key && value && (is.fun(value) ? value(key) : toArray(value).includes(key)));
  var resolveProp = (prop, key) => is.obj(prop) ? key && prop[key] : prop;
  var getDefaultProp = (props, key) => props.default === true ? props[key] : props.default ? props.default[key] : void 0;
  var noopTransform = (value) => value;
  var getDefaultProps = (props, transform = noopTransform) => {
    let keys = DEFAULT_PROPS;
    if (props.default && props.default !== true) {
      props = props.default;
      keys = Object.keys(props);
    }
    const defaults2 = {};
    for (const key of keys) {
      const value = transform(props[key], key);
      if (!is.und(value)) {
        defaults2[key] = value;
      }
    }
    return defaults2;
  };
  var DEFAULT_PROPS = ["config", "onProps", "onStart", "onChange", "onPause", "onResume", "onRest"];
  var RESERVED_PROPS = {
    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 getForwardProps(props) {
    const forward = {};
    let count = 0;
    eachProp(props, (value, prop) => {
      if (!RESERVED_PROPS[prop]) {
        forward[prop] = value;
        count++;
      }
    });
    if (count) {
      return forward;
    }
  }
  function inferTo(props) {
    const to2 = getForwardProps(props);
    if (to2) {
      const out = {
        to: to2
      };
      eachProp(props, (val, key) => key in to2 || (out[key] = val));
      return out;
    }
    return _extends3({}, props);
  }
  function computeGoal(value) {
    value = getFluidValue(value);
    return is.arr(value) ? value.map(computeGoal) : isAnimatedString(value) ? globals.createStringInterpolator({
      range: [0, 1],
      output: [value, value]
    })(1) : value;
  }
  function isAsyncTo(to2) {
    return is.fun(to2) || is.arr(to2) && is.obj(to2[0]);
  }
  var config = {
    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 c1 = 1.70158;
  var c2 = c1 * 1.525;
  var c3 = c1 + 1;
  var c4 = 2 * Math.PI / 3;
  var c5 = 2 * Math.PI / 4.5;
  var bounceOut = (x2) => {
    const n1 = 7.5625;
    const d1 = 2.75;
    if (x2 < 1 / d1) {
      return n1 * x2 * x2;
    } else if (x2 < 2 / d1) {
      return n1 * (x2 -= 1.5 / d1) * x2 + 0.75;
    } else if (x2 < 2.5 / d1) {
      return n1 * (x2 -= 2.25 / d1) * x2 + 0.9375;
    } else {
      return n1 * (x2 -= 2.625 / d1) * x2 + 0.984375;
    }
  };
  var easings = {
    linear: (x2) => x2,
    easeInQuad: (x2) => x2 * x2,
    easeOutQuad: (x2) => 1 - (1 - x2) * (1 - x2),
    easeInOutQuad: (x2) => x2 < 0.5 ? 2 * x2 * x2 : 1 - Math.pow(-2 * x2 + 2, 2) / 2,
    easeInCubic: (x2) => x2 * x2 * x2,
    easeOutCubic: (x2) => 1 - Math.pow(1 - x2, 3),
    easeInOutCubic: (x2) => x2 < 0.5 ? 4 * x2 * x2 * x2 : 1 - Math.pow(-2 * x2 + 2, 3) / 2,
    easeInQuart: (x2) => x2 * x2 * x2 * x2,
    easeOutQuart: (x2) => 1 - Math.pow(1 - x2, 4),
    easeInOutQuart: (x2) => x2 < 0.5 ? 8 * x2 * x2 * x2 * x2 : 1 - Math.pow(-2 * x2 + 2, 4) / 2,
    easeInQuint: (x2) => x2 * x2 * x2 * x2 * x2,
    easeOutQuint: (x2) => 1 - Math.pow(1 - x2, 5),
    easeInOutQuint: (x2) => x2 < 0.5 ? 16 * x2 * x2 * x2 * x2 * x2 : 1 - Math.pow(-2 * x2 + 2, 5) / 2,
    easeInSine: (x2) => 1 - Math.cos(x2 * Math.PI / 2),
    easeOutSine: (x2) => Math.sin(x2 * Math.PI / 2),
    easeInOutSine: (x2) => -(Math.cos(Math.PI * x2) - 1) / 2,
    easeInExpo: (x2) => x2 === 0 ? 0 : Math.pow(2, 10 * x2 - 10),
    easeOutExpo: (x2) => x2 === 1 ? 1 : 1 - Math.pow(2, -10 * x2),
    easeInOutExpo: (x2) => x2 === 0 ? 0 : x2 === 1 ? 1 : x2 < 0.5 ? Math.pow(2, 20 * x2 - 10) / 2 : (2 - Math.pow(2, -20 * x2 + 10)) / 2,
    easeInCirc: (x2) => 1 - Math.sqrt(1 - Math.pow(x2, 2)),
    easeOutCirc: (x2) => Math.sqrt(1 - Math.pow(x2 - 1, 2)),
    easeInOutCirc: (x2) => x2 < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * x2, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * x2 + 2, 2)) + 1) / 2,
    easeInBack: (x2) => c3 * x2 * x2 * x2 - c1 * x2 * x2,
    easeOutBack: (x2) => 1 + c3 * Math.pow(x2 - 1, 3) + c1 * Math.pow(x2 - 1, 2),
    easeInOutBack: (x2) => x2 < 0.5 ? Math.pow(2 * x2, 2) * ((c2 + 1) * 2 * x2 - c2) / 2 : (Math.pow(2 * x2 - 2, 2) * ((c2 + 1) * (x2 * 2 - 2) + c2) + 2) / 2,
    easeInElastic: (x2) => x2 === 0 ? 0 : x2 === 1 ? 1 : -Math.pow(2, 10 * x2 - 10) * Math.sin((x2 * 10 - 10.75) * c4),
    easeOutElastic: (x2) => x2 === 0 ? 0 : x2 === 1 ? 1 : Math.pow(2, -10 * x2) * Math.sin((x2 * 10 - 0.75) * c4) + 1,
    easeInOutElastic: (x2) => x2 === 0 ? 0 : x2 === 1 ? 1 : x2 < 0.5 ? -(Math.pow(2, 20 * x2 - 10) * Math.sin((20 * x2 - 11.125) * c5)) / 2 : Math.pow(2, -20 * x2 + 10) * Math.sin((20 * x2 - 11.125) * c5) / 2 + 1,
    easeInBounce: (x2) => 1 - bounceOut(1 - x2),
    easeOutBounce: bounceOut,
    easeInOutBounce: (x2) => x2 < 0.5 ? (1 - bounceOut(1 - 2 * x2)) / 2 : (1 + bounceOut(2 * x2 - 1)) / 2
  };
  var defaults = _extends3({}, config.default, {
    mass: 1,
    damping: 1,
    easing: easings.linear,
    clamp: false
  });
  var AnimationConfig = class {
    constructor() {
      this.tension = void 0;
      this.friction = void 0;
      this.frequency = void 0;
      this.damping = void 0;
      this.mass = void 0;
      this.velocity = 0;
      this.restVelocity = void 0;
      this.precision = void 0;
      this.progress = void 0;
      this.duration = void 0;
      this.easing = void 0;
      this.clamp = void 0;
      this.bounce = void 0;
      this.decay = void 0;
      this.round = void 0;
      Object.assign(this, defaults);
    }
  };
  function mergeConfig(config2, newConfig, defaultConfig) {
    if (defaultConfig) {
      defaultConfig = _extends3({}, defaultConfig);
      sanitizeConfig(defaultConfig, newConfig);
      newConfig = _extends3({}, defaultConfig, newConfig);
    }
    sanitizeConfig(config2, newConfig);
    Object.assign(config2, newConfig);
    for (const key in defaults) {
      if (config2[key] == null) {
        config2[key] = defaults[key];
      }
    }
    let {
      mass,
      frequency,
      damping
    } = config2;
    if (!is.und(frequency)) {
      if (frequency < 0.01) frequency = 0.01;
      if (damping < 0) damping = 0;
      config2.tension = Math.pow(2 * Math.PI / frequency, 2) * mass;
      config2.friction = 4 * Math.PI * damping * mass / frequency;
    }
    return config2;
  }
  function sanitizeConfig(config2, props) {
    if (!is.und(props.decay)) {
      config2.duration = void 0;
    } else {
      const isTensionConfig = !is.und(props.tension) || !is.und(props.friction);
      if (isTensionConfig || !is.und(props.frequency) || !is.und(props.damping) || !is.und(props.mass)) {
        config2.duration = void 0;
        config2.decay = void 0;
      }
      if (isTensionConfig) {
        config2.frequency = void 0;
      }
    }
  }
  var emptyArray = [];
  var Animation = class {
    constructor() {
      this.changed = false;
      this.values = emptyArray;
      this.toValues = null;
      this.fromValues = emptyArray;
      this.to = void 0;
      this.from = void 0;
      this.config = new AnimationConfig();
      this.immediate = false;
    }
  };
  function scheduleProps(callId, {
    key,
    props,
    defaultProps,
    state,
    actions
  }) {
    return new Promise((resolve, reject) => {
      var _props$cancel;
      let delay;
      let timeout;
      let cancel = matchProp((_props$cancel = props.cancel) != null ? _props$cancel : defaultProps == null ? void 0 : defaultProps.cancel, key);
      if (cancel) {
        onStart();
      } else {
        if (!is.und(props.pause)) {
          state.paused = matchProp(props.pause, key);
        }
        let pause = defaultProps == null ? void 0 : defaultProps.pause;
        if (pause !== true) {
          pause = state.paused || matchProp(pause, key);
        }
        delay = callProp(props.delay || 0, key);
        if (pause) {
          state.resumeQueue.add(onResume);
          actions.pause();
        } else {
          actions.resume();
          onResume();
        }
      }
      function onPause() {
        state.resumeQueue.add(onResume);
        state.timeouts.delete(timeout);
        timeout.cancel();
        delay = timeout.time - raf.now();
      }
      function onResume() {
        if (delay > 0 && !globals.skipAnimation) {
          state.delayed = true;
          timeout = raf.setTimeout(onStart, delay);
          state.pauseQueue.add(onPause);
          state.timeouts.add(timeout);
        } else {
          onStart();
        }
      }
      function onStart() {
        if (state.delayed) {
          state.delayed = false;
        }
        state.pauseQueue.delete(onPause);
        state.timeouts.delete(timeout);
        if (callId <= (state.cancelId || 0)) {
          cancel = true;
        }
        try {
          actions.start(_extends3({}, props, {
            callId,
            cancel
          }), resolve);
        } catch (err) {
          reject(err);
        }
      }
    });
  }
  var getCombinedResult = (target, results) => results.length == 1 ? results[0] : results.some((result) => result.cancelled) ? getCancelledResult(target.get()) : results.every((result) => result.noop) ? getNoopResult(target.get()) : getFinishedResult(target.get(), results.every((result) => result.finished));
  var getNoopResult = (value) => ({
    value,
    noop: true,
    finished: true,
    cancelled: false
  });
  var getFinishedResult = (value, finished, cancelled = false) => ({
    value,
    finished,
    cancelled
  });
  var getCancelledResult = (value) => ({
    value,
    cancelled: true,
    finished: false
  });
  function runAsync(to2, props, state, target) {
    const {
      callId,
      parentId,
      onRest
    } = props;
    const {
      asyncTo: prevTo,
      promise: prevPromise
    } = state;
    if (!parentId && to2 === prevTo && !props.reset) {
      return prevPromise;
    }
    return state.promise = (async () => {
      state.asyncId = callId;
      state.asyncTo = to2;
      const defaultProps = getDefaultProps(props, (value, key) => key === "onRest" ? void 0 : value);
      let preventBail;
      let bail;
      const bailPromise = new Promise((resolve, reject) => (preventBail = resolve, bail = reject));
      const bailIfEnded = (bailSignal) => {
        const bailResult = callId <= (state.cancelId || 0) && getCancelledResult(target) || callId !== state.asyncId && getFinishedResult(target, false);
        if (bailResult) {
          bailSignal.result = bailResult;
          bail(bailSignal);
          throw bailSignal;
        }
      };
      const animate = (arg1, arg2) => {
        const bailSignal = new BailSignal();
        const skipAnimationSignal = new SkipAniamtionSignal();
        return (async () => {
          if (globals.skipAnimation) {
            stopAsync(state);
            skipAnimationSignal.result = getFinishedResult(target, false);
            bail(skipAnimationSignal);
            throw skipAnimationSignal;
          }
          bailIfEnded(bailSignal);
          const props2 = is.obj(arg1) ? _extends3({}, arg1) : _extends3({}, arg2, {
            to: arg1
          });
          props2.parentId = callId;
          eachProp(defaultProps, (value, key) => {
            if (is.und(props2[key])) {
              props2[key] = value;
            }
          });
          const result2 = await target.start(props2);
          bailIfEnded(bailSignal);
          if (state.paused) {
            await new Promise((resume) => {
              state.resumeQueue.add(resume);
            });
          }
          return result2;
        })();
      };
      let result;
      if (globals.skipAnimation) {
        stopAsync(state);
        return getFinishedResult(target, false);
      }
      try {
        let animating;
        if (is.arr(to2)) {
          animating = (async (queue) => {
            for (const props2 of queue) {
              await animate(props2);
            }
          })(to2);
        } else {
          animating = Promise.resolve(to2(animate, target.stop.bind(target)));
        }
        await Promise.all([animating.then(preventBail), bailPromise]);
        result = getFinishedResult(target.get(), true, false);
      } catch (err) {
        if (err instanceof BailSignal) {
          result = err.result;
        } else if (err instanceof SkipAniamtionSignal) {
          result = err.result;
        } else {
          throw err;
        }
      } finally {
        if (callId == state.asyncId) {
          state.asyncId = parentId;
          state.asyncTo = parentId ? prevTo : void 0;
          state.promise = parentId ? prevPromise : void 0;
        }
      }
      if (is.fun(onRest)) {
        raf.batchedUpdates(() => {
          onRest(result, target, target.item);
        });
      }
      return result;
    })();
  }
  function stopAsync(state, cancelId) {
    flush(state.timeouts, (t3) => t3.cancel());
    state.pauseQueue.clear();
    state.resumeQueue.clear();
    state.asyncId = state.asyncTo = state.promise = void 0;
    if (cancelId) state.cancelId = cancelId;
  }
  var BailSignal = class extends Error {
    constructor() {
      super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.");
      this.result = void 0;
    }
  };
  var SkipAniamtionSignal = class extends Error {
    constructor() {
      super("SkipAnimationSignal");
      this.result = void 0;
    }
  };
  var isFrameValue = (value) => value instanceof FrameValue;
  var nextId$1 = 1;
  var FrameValue = class extends FluidValue {
    constructor(...args) {
      super(...args);
      this.id = nextId$1++;
      this.key = void 0;
      this._priority = 0;
    }
    get priority() {
      return this._priority;
    }
    set priority(priority2) {
      if (this._priority != priority2) {
        this._priority = priority2;
        this._onPriorityChange(priority2);
      }
    }
    get() {
      const node = getAnimated(this);
      return node && node.getValue();
    }
    to(...args) {
      return globals.to(this, args);
    }
    interpolate(...args) {
      deprecateInterpolate();
      return globals.to(this, args);
    }
    toJSON() {
      return this.get();
    }
    observerAdded(count) {
      if (count == 1) this._attach();
    }
    observerRemoved(count) {
      if (count == 0) this._detach();
    }
    _attach() {
    }
    _detach() {
    }
    _onChange(value, idle = false) {
      callFluidObservers(this, {
        type: "change",
        parent: this,
        value,
        idle
      });
    }
    _onPriorityChange(priority2) {
      if (!this.idle) {
        frameLoop.sort(this);
      }
      callFluidObservers(this, {
        type: "priority",
        parent: this,
        priority: priority2
      });
    }
  };
  var $P = /* @__PURE__ */ Symbol.for("SpringPhase");
  var HAS_ANIMATED = 1;
  var IS_ANIMATING = 2;
  var IS_PAUSED = 4;
  var hasAnimated = (target) => (target[$P] & HAS_ANIMATED) > 0;
  var isAnimating = (target) => (target[$P] & IS_ANIMATING) > 0;
  var isPaused = (target) => (target[$P] & IS_PAUSED) > 0;
  var setActiveBit = (target, active) => active ? target[$P] |= IS_ANIMATING | HAS_ANIMATED : target[$P] &= ~IS_ANIMATING;
  var setPausedBit = (target, paused) => paused ? target[$P] |= IS_PAUSED : target[$P] &= ~IS_PAUSED;
  var SpringValue = class extends FrameValue {
    constructor(arg1, arg2) {
      super();
      this.key = void 0;
      this.animation = new Animation();
      this.queue = void 0;
      this.defaultProps = {};
      this._state = {
        paused: false,
        delayed: false,
        pauseQueue: /* @__PURE__ */ new Set(),
        resumeQueue: /* @__PURE__ */ new Set(),
        timeouts: /* @__PURE__ */ new Set()
      };
      this._pendingCalls = /* @__PURE__ */ new Set();
      this._lastCallId = 0;
      this._lastToId = 0;
      this._memoizedDuration = 0;
      if (!is.und(arg1) || !is.und(arg2)) {
        const props = is.obj(arg1) ? _extends3({}, arg1) : _extends3({}, arg2, {
          from: arg1
        });
        if (is.und(props.default)) {
          props.default = true;
        }
        this.start(props);
      }
    }
    get idle() {
      return !(isAnimating(this) || this._state.asyncTo) || isPaused(this);
    }
    get goal() {
      return getFluidValue(this.animation.to);
    }
    get velocity() {
      const node = getAnimated(this);
      return node instanceof AnimatedValue ? node.lastVelocity || 0 : node.getPayload().map((node2) => node2.lastVelocity || 0);
    }
    get hasAnimated() {
      return hasAnimated(this);
    }
    get isAnimating() {
      return isAnimating(this);
    }
    get isPaused() {
      return isPaused(this);
    }
    get isDelayed() {
      return this._state.delayed;
    }
    advance(dt) {
      let idle = true;
      let changed = false;
      const anim = this.animation;
      let {
        config: config2,
        toValues
      } = anim;
      const payload = getPayload(anim.to);
      if (!payload && hasFluidValue(anim.to)) {
        toValues = toArray(getFluidValue(anim.to));
      }
      anim.values.forEach((node2, i2) => {
        if (node2.done) return;
        const to2 = node2.constructor == AnimatedString ? 1 : payload ? payload[i2].lastPosition : toValues[i2];
        let finished = anim.immediate;
        let position = to2;
        if (!finished) {
          position = node2.lastPosition;
          if (config2.tension <= 0) {
            node2.done = true;
            return;
          }
          let elapsed = node2.elapsedTime += dt;
          const from = anim.fromValues[i2];
          const v0 = node2.v0 != null ? node2.v0 : node2.v0 = is.arr(config2.velocity) ? config2.velocity[i2] : config2.velocity;
          let velocity;
          const precision = config2.precision || (from == to2 ? 5e-3 : Math.min(1, Math.abs(to2 - from) * 1e-3));
          if (!is.und(config2.duration)) {
            let p2 = 1;
            if (config2.duration > 0) {
              if (this._memoizedDuration !== config2.duration) {
                this._memoizedDuration = config2.duration;
                if (node2.durationProgress > 0) {
                  node2.elapsedTime = config2.duration * node2.durationProgress;
                  elapsed = node2.elapsedTime += dt;
                }
              }
              p2 = (config2.progress || 0) + elapsed / this._memoizedDuration;
              p2 = p2 > 1 ? 1 : p2 < 0 ? 0 : p2;
              node2.durationProgress = p2;
            }
            position = from + config2.easing(p2) * (to2 - from);
            velocity = (position - node2.lastPosition) / dt;
            finished = p2 == 1;
          } else if (config2.decay) {
            const decay = config2.decay === true ? 0.998 : config2.decay;
            const e2 = Math.exp(-(1 - decay) * elapsed);
            position = from + v0 / (1 - decay) * (1 - e2);
            finished = Math.abs(node2.lastPosition - position) <= precision;
            velocity = v0 * e2;
          } else {
            velocity = node2.lastVelocity == null ? v0 : node2.lastVelocity;
            const restVelocity = config2.restVelocity || precision / 10;
            const bounceFactor = config2.clamp ? 0 : config2.bounce;
            const canBounce = !is.und(bounceFactor);
            const isGrowing = from == to2 ? node2.v0 > 0 : from < to2;
            let isMoving;
            let isBouncing = false;
            const step = 1;
            const numSteps = Math.ceil(dt / step);
            for (let n2 = 0; n2 < numSteps; ++n2) {
              isMoving = Math.abs(velocity) > restVelocity;
              if (!isMoving) {
                finished = Math.abs(to2 - position) <= precision;
                if (finished) {
                  break;
                }
              }
              if (canBounce) {
                isBouncing = position == to2 || position > to2 == isGrowing;
                if (isBouncing) {
                  velocity = -velocity * bounceFactor;
                  position = to2;
                }
              }
              const springForce = -config2.tension * 1e-6 * (position - to2);
              const dampingForce = -config2.friction * 1e-3 * velocity;
              const acceleration = (springForce + dampingForce) / config2.mass;
              velocity = velocity + acceleration * step;
              position = position + velocity * step;
            }
          }
          node2.lastVelocity = velocity;
          if (Number.isNaN(position)) {
            console.warn(`Got NaN while animating:`, this);
            finished = true;
          }
        }
        if (payload && !payload[i2].done) {
          finished = false;
        }
        if (finished) {
          node2.done = true;
        } else {
          idle = false;
        }
        if (node2.setValue(position, config2.round)) {
          changed = true;
        }
      });
      const node = getAnimated(this);
      const currVal = node.getValue();
      if (idle) {
        const finalVal = getFluidValue(anim.to);
        if ((currVal !== finalVal || changed) && !config2.decay) {
          node.setValue(finalVal);
          this._onChange(finalVal);
        } else if (changed && config2.decay) {
          this._onChange(currVal);
        }
        this._stop();
      } else if (changed) {
        this._onChange(currVal);
      }
    }
    set(value) {
      raf.batchedUpdates(() => {
        this._stop();
        this._focus(value);
        this._set(value);
      });
      return this;
    }
    pause() {
      this._update({
        pause: true
      });
    }
    resume() {
      this._update({
        pause: false
      });
    }
    finish() {
      if (isAnimating(this)) {
        const {
          to: to2,
          config: config2
        } = this.animation;
        raf.batchedUpdates(() => {
          this._onStart();
          if (!config2.decay) {
            this._set(to2, false);
          }
          this._stop();
        });
      }
      return this;
    }
    update(props) {
      const queue = this.queue || (this.queue = []);
      queue.push(props);
      return this;
    }
    start(to2, arg2) {
      let queue;
      if (!is.und(to2)) {
        queue = [is.obj(to2) ? to2 : _extends3({}, arg2, {
          to: to2
        })];
      } else {
        queue = this.queue || [];
        this.queue = [];
      }
      return Promise.all(queue.map((props) => {
        const up = this._update(props);
        return up;
      })).then((results) => getCombinedResult(this, results));
    }
    stop(cancel) {
      const {
        to: to2
      } = this.animation;
      this._focus(this.get());
      stopAsync(this._state, cancel && this._lastCallId);
      raf.batchedUpdates(() => this._stop(to2, cancel));
      return this;
    }
    reset() {
      this._update({
        reset: true
      });
    }
    eventObserved(event) {
      if (event.type == "change") {
        this._start();
      } else if (event.type == "priority") {
        this.priority = event.priority + 1;
      }
    }
    _prepareNode(props) {
      const key = this.key || "";
      let {
        to: to2,
        from
      } = props;
      to2 = is.obj(to2) ? to2[key] : to2;
      if (to2 == null || isAsyncTo(to2)) {
        to2 = void 0;
      }
      from = is.obj(from) ? from[key] : from;
      if (from == null) {
        from = void 0;
      }
      const range2 = {
        to: to2,
        from
      };
      if (!hasAnimated(this)) {
        if (props.reverse) [to2, from] = [from, to2];
        from = getFluidValue(from);
        if (!is.und(from)) {
          this._set(from);
        } else if (!getAnimated(this)) {
          this._set(to2);
        }
      }
      return range2;
    }
    _update(_ref, isLoop) {
      let props = _extends3({}, _ref);
      const {
        key,
        defaultProps
      } = this;
      if (props.default) Object.assign(defaultProps, getDefaultProps(props, (value, prop) => /^on/.test(prop) ? resolveProp(value, key) : value));
      mergeActiveFn(this, props, "onProps");
      sendEvent(this, "onProps", props, this);
      const range2 = this._prepareNode(props);
      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?");
      }
      const state = this._state;
      return scheduleProps(++this._lastCallId, {
        key,
        props,
        defaultProps,
        state,
        actions: {
          pause: () => {
            if (!isPaused(this)) {
              setPausedBit(this, true);
              flushCalls(state.pauseQueue);
              sendEvent(this, "onPause", getFinishedResult(this, checkFinished(this, this.animation.to)), this);
            }
          },
          resume: () => {
            if (isPaused(this)) {
              setPausedBit(this, false);
              if (isAnimating(this)) {
                this._resume();
              }
              flushCalls(state.resumeQueue);
              sendEvent(this, "onResume", getFinishedResult(this, checkFinished(this, this.animation.to)), this);
            }
          },
          start: this._merge.bind(this, range2)
        }
      }).then((result) => {
        if (props.loop && result.finished && !(isLoop && result.noop)) {
          const nextProps = createLoopUpdate(props);
          if (nextProps) {
            return this._update(nextProps, true);
          }
        }
        return result;
      });
    }
    _merge(range2, props, resolve) {
      if (props.cancel) {
        this.stop(true);
        return resolve(getCancelledResult(this));
      }
      const hasToProp = !is.und(range2.to);
      const hasFromProp = !is.und(range2.from);
      if (hasToProp || hasFromProp) {
        if (props.callId > this._lastToId) {
          this._lastToId = props.callId;
        } else {
          return resolve(getCancelledResult(this));
        }
      }
      const {
        key,
        defaultProps,
        animation: anim
      } = this;
      const {
        to: prevTo,
        from: prevFrom
      } = anim;
      let {
        to: to2 = prevTo,
        from = prevFrom
      } = range2;
      if (hasFromProp && !hasToProp && (!props.default || is.und(to2))) {
        to2 = from;
      }
      if (props.reverse) [to2, from] = [from, to2];
      const hasFromChanged = !isEqual(from, prevFrom);
      if (hasFromChanged) {
        anim.from = from;
      }
      from = getFluidValue(from);
      const hasToChanged = !isEqual(to2, prevTo);
      if (hasToChanged) {
        this._focus(to2);
      }
      const hasAsyncTo = isAsyncTo(props.to);
      const {
        config: config2
      } = anim;
      const {
        decay,
        velocity
      } = config2;
      if (hasToProp || hasFromProp) {
        config2.velocity = 0;
      }
      if (props.config && !hasAsyncTo) {
        mergeConfig(config2, callProp(props.config, key), props.config !== defaultProps.config ? callProp(defaultProps.config, key) : void 0);
      }
      let node = getAnimated(this);
      if (!node || is.und(to2)) {
        return resolve(getFinishedResult(this, true));
      }
      const reset = is.und(props.reset) ? hasFromProp && !props.default : !is.und(from) && matchProp(props.reset, key);
      const value = reset ? from : this.get();
      const goal = computeGoal(to2);
      const isAnimatable = is.num(goal) || is.arr(goal) || isAnimatedString(goal);
      const immediate = !hasAsyncTo && (!isAnimatable || matchProp(defaultProps.immediate || props.immediate, key));
      if (hasToChanged) {
        const nodeType = getAnimatedType(to2);
        if (nodeType !== node.constructor) {
          if (immediate) {
            node = this._set(goal);
          } else throw Error(`Cannot animate between ${node.constructor.name} and ${nodeType.name}, as the "to" prop suggests`);
        }
      }
      const goalType = node.constructor;
      let started = hasFluidValue(to2);
      let finished = false;
      if (!started) {
        const hasValueChanged = reset || !hasAnimated(this) && hasFromChanged;
        if (hasToChanged || hasValueChanged) {
          finished = isEqual(computeGoal(value), goal);
          started = !finished;
        }
        if (!isEqual(anim.immediate, immediate) && !immediate || !isEqual(config2.decay, decay) || !isEqual(config2.velocity, velocity)) {
          started = true;
        }
      }
      if (finished && isAnimating(this)) {
        if (anim.changed && !reset) {
          started = true;
        } else if (!started) {
          this._stop(prevTo);
        }
      }
      if (!hasAsyncTo) {
        if (started || hasFluidValue(prevTo)) {
          anim.values = node.getPayload();
          anim.toValues = hasFluidValue(to2) ? null : goalType == AnimatedString ? [1] : toArray(goal);
        }
        if (anim.immediate != immediate) {
          anim.immediate = immediate;
          if (!immediate && !reset) {
            this._set(prevTo);
          }
        }
        if (started) {
          const {
            onRest
          } = anim;
          each(ACTIVE_EVENTS, (type) => mergeActiveFn(this, props, type));
          const result = getFinishedResult(this, checkFinished(this, prevTo));
          flushCalls(this._pendingCalls, result);
          this._pendingCalls.add(resolve);
          if (anim.changed) raf.batchedUpdates(() => {
            anim.changed = !reset;
            onRest == null ? void 0 : onRest(result, this);
            if (reset) {
              callProp(defaultProps.onRest, result);
            } else {
              anim.onStart == null ? void 0 : anim.onStart(result, this);
            }
          });
        }
      }
      if (reset) {
        this._set(value);
      }
      if (hasAsyncTo) {
        resolve(runAsync(props.to, props, this._state, this));
      } else if (started) {
        this._start();
      } else if (isAnimating(this) && !hasToChanged) {
        this._pendingCalls.add(resolve);
      } else {
        resolve(getNoopResult(value));
      }
    }
    _focus(value) {
      const anim = this.animation;
      if (value !== anim.to) {
        if (getFluidObservers(this)) {
          this._detach();
        }
        anim.to = value;
        if (getFluidObservers(this)) {
          this._attach();
        }
      }
    }
    _attach() {
      let priority2 = 0;
      const {
        to: to2
      } = this.animation;
      if (hasFluidValue(to2)) {
        addFluidObserver(to2, this);
        if (isFrameValue(to2)) {
          priority2 = to2.priority + 1;
        }
      }
      this.priority = priority2;
    }
    _detach() {
      const {
        to: to2
      } = this.animation;
      if (hasFluidValue(to2)) {
        removeFluidObserver(to2, this);
      }
    }
    _set(arg, idle = true) {
      const value = getFluidValue(arg);
      if (!is.und(value)) {
        const oldNode = getAnimated(this);
        if (!oldNode || !isEqual(value, oldNode.getValue())) {
          const nodeType = getAnimatedType(value);
          if (!oldNode || oldNode.constructor != nodeType) {
            setAnimated(this, nodeType.create(value));
          } else {
            oldNode.setValue(value);
          }
          if (oldNode) {
            raf.batchedUpdates(() => {
              this._onChange(value, idle);
            });
          }
        }
      }
      return getAnimated(this);
    }
    _onStart() {
      const anim = this.animation;
      if (!anim.changed) {
        anim.changed = true;
        sendEvent(this, "onStart", getFinishedResult(this, checkFinished(this, anim.to)), this);
      }
    }
    _onChange(value, idle) {
      if (!idle) {
        this._onStart();
        callProp(this.animation.onChange, value, this);
      }
      callProp(this.defaultProps.onChange, value, this);
      super._onChange(value, idle);
    }
    _start() {
      const anim = this.animation;
      getAnimated(this).reset(getFluidValue(anim.to));
      if (!anim.immediate) {
        anim.fromValues = anim.values.map((node) => node.lastPosition);
      }
      if (!isAnimating(this)) {
        setActiveBit(this, true);
        if (!isPaused(this)) {
          this._resume();
        }
      }
    }
    _resume() {
      if (globals.skipAnimation) {
        this.finish();
      } else {
        frameLoop.start(this);
      }
    }
    _stop(goal, cancel) {
      if (isAnimating(this)) {
        setActiveBit(this, false);
        const anim = this.animation;
        each(anim.values, (node) => {
          node.done = true;
        });
        if (anim.toValues) {
          anim.onChange = anim.onPause = anim.onResume = void 0;
        }
        callFluidObservers(this, {
          type: "idle",
          parent: this
        });
        const result = cancel ? getCancelledResult(this.get()) : getFinishedResult(this.get(), checkFinished(this, goal != null ? goal : anim.to));
        flushCalls(this._pendingCalls, result);
        if (anim.changed) {
          anim.changed = false;
          sendEvent(this, "onRest", result, this);
        }
      }
    }
  };
  function checkFinished(target, to2) {
    const goal = computeGoal(to2);
    const value = computeGoal(target.get());
    return isEqual(value, goal);
  }
  function createLoopUpdate(props, loop2 = props.loop, to2 = props.to) {
    let loopRet = callProp(loop2);
    if (loopRet) {
      const overrides = loopRet !== true && inferTo(loopRet);
      const reverse = (overrides || props).reverse;
      const reset = !overrides || overrides.reset;
      return createUpdate(_extends3({}, props, {
        loop: loop2,
        default: false,
        pause: void 0,
        to: !reverse || isAsyncTo(to2) ? to2 : void 0,
        from: reset ? props.from : void 0,
        reset
      }, overrides));
    }
  }
  function createUpdate(props) {
    const {
      to: to2,
      from
    } = props = inferTo(props);
    const keys = /* @__PURE__ */ new Set();
    if (is.obj(to2)) findDefined(to2, keys);
    if (is.obj(from)) findDefined(from, keys);
    props.keys = keys.size ? Array.from(keys) : null;
    return props;
  }
  function findDefined(values, keys) {
    eachProp(values, (value, key) => value != null && keys.add(key));
  }
  var ACTIVE_EVENTS = ["onStart", "onRest", "onChange", "onPause", "onResume"];
  function mergeActiveFn(target, props, type) {
    target.animation[type] = props[type] !== getDefaultProp(props, type) ? resolveProp(props[type], target.key) : void 0;
  }
  function sendEvent(target, type, ...args) {
    var _target$animation$typ, _target$animation, _target$defaultProps$, _target$defaultProps;
    (_target$animation$typ = (_target$animation = target.animation)[type]) == null ? void 0 : _target$animation$typ.call(_target$animation, ...args);
    (_target$defaultProps$ = (_target$defaultProps = target.defaultProps)[type]) == null ? void 0 : _target$defaultProps$.call(_target$defaultProps, ...args);
  }
  var BATCHED_EVENTS = ["onStart", "onChange", "onRest"];
  var nextId = 1;
  var Controller = class {
    constructor(props, flush2) {
      this.id = nextId++;
      this.springs = {};
      this.queue = [];
      this.ref = void 0;
      this._flush = void 0;
      this._initialProps = void 0;
      this._lastAsyncId = 0;
      this._active = /* @__PURE__ */ new Set();
      this._changed = /* @__PURE__ */ new Set();
      this._started = false;
      this._item = void 0;
      this._state = {
        paused: false,
        pauseQueue: /* @__PURE__ */ new Set(),
        resumeQueue: /* @__PURE__ */ new Set(),
        timeouts: /* @__PURE__ */ new Set()
      };
      this._events = {
        onStart: /* @__PURE__ */ new Map(),
        onChange: /* @__PURE__ */ new Map(),
        onRest: /* @__PURE__ */ new Map()
      };
      this._onFrame = this._onFrame.bind(this);
      if (flush2) {
        this._flush = flush2;
      }
      if (props) {
        this.start(_extends3({
          default: true
        }, props));
      }
    }
    get idle() {
      return !this._state.asyncTo && Object.values(this.springs).every((spring) => {
        return spring.idle && !spring.isDelayed && !spring.isPaused;
      });
    }
    get item() {
      return this._item;
    }
    set item(item) {
      this._item = item;
    }
    get() {
      const values = {};
      this.each((spring, key) => values[key] = spring.get());
      return values;
    }
    set(values) {
      for (const key in values) {
        const value = values[key];
        if (!is.und(value)) {
          this.springs[key].set(value);
        }
      }
    }
    update(props) {
      if (props) {
        this.queue.push(createUpdate(props));
      }
      return this;
    }
    start(props) {
      let {
        queue
      } = this;
      if (props) {
        queue = toArray(props).map(createUpdate);
      } else {
        this.queue = [];
      }
      if (this._flush) {
        return this._flush(this, queue);
      }
      prepareKeys(this, queue);
      return flushUpdateQueue(this, queue);
    }
    stop(arg, keys) {
      if (arg !== !!arg) {
        keys = arg;
      }
      if (keys) {
        const springs = this.springs;
        each(toArray(keys), (key) => springs[key].stop(!!arg));
      } else {
        stopAsync(this._state, this._lastAsyncId);
        this.each((spring) => spring.stop(!!arg));
      }
      return this;
    }
    pause(keys) {
      if (is.und(keys)) {
        this.start({
          pause: true
        });
      } else {
        const springs = this.springs;
        each(toArray(keys), (key) => springs[key].pause());
      }
      return this;
    }
    resume(keys) {
      if (is.und(keys)) {
        this.start({
          pause: false
        });
      } else {
        const springs = this.springs;
        each(toArray(keys), (key) => springs[key].resume());
      }
      return this;
    }
    each(iterator) {
      eachProp(this.springs, iterator);
    }
    _onFrame() {
      const {
        onStart,
        onChange,
        onRest
      } = this._events;
      const active = this._active.size > 0;
      const changed = this._changed.size > 0;
      if (active && !this._started || changed && !this._started) {
        this._started = true;
        flush(onStart, ([onStart2, result]) => {
          result.value = this.get();
          onStart2(result, this, this._item);
        });
      }
      const idle = !active && this._started;
      const values = changed || idle && onRest.size ? this.get() : null;
      if (changed && onChange.size) {
        flush(onChange, ([onChange2, result]) => {
          result.value = values;
          onChange2(result, this, this._item);
        });
      }
      if (idle) {
        this._started = false;
        flush(onRest, ([onRest2, result]) => {
          result.value = values;
          onRest2(result, this, this._item);
        });
      }
    }
    eventObserved(event) {
      if (event.type == "change") {
        this._changed.add(event.parent);
        if (!event.idle) {
          this._active.add(event.parent);
        }
      } else if (event.type == "idle") {
        this._active.delete(event.parent);
      } else return;
      raf.onFrame(this._onFrame);
    }
  };
  function flushUpdateQueue(ctrl, queue) {
    return Promise.all(queue.map((props) => flushUpdate(ctrl, props))).then((results) => getCombinedResult(ctrl, results));
  }
  async function flushUpdate(ctrl, props, isLoop) {
    const {
      keys,
      to: to2,
      from,
      loop: loop2,
      onRest,
      onResolve
    } = props;
    const defaults2 = is.obj(props.default) && props.default;
    if (loop2) {
      props.loop = false;
    }
    if (to2 === false) props.to = null;
    if (from === false) props.from = null;
    const asyncTo = is.arr(to2) || is.fun(to2) ? to2 : void 0;
    if (asyncTo) {
      props.to = void 0;
      props.onRest = void 0;
      if (defaults2) {
        defaults2.onRest = void 0;
      }
    } else {
      each(BATCHED_EVENTS, (key) => {
        const handler = props[key];
        if (is.fun(handler)) {
          const queue = ctrl["_events"][key];
          props[key] = ({
            finished,
            cancelled
          }) => {
            const result2 = queue.get(handler);
            if (result2) {
              if (!finished) result2.finished = false;
              if (cancelled) result2.cancelled = true;
            } else {
              queue.set(handler, {
                value: null,
                finished: finished || false,
                cancelled: cancelled || false
              });
            }
          };
          if (defaults2) {
            defaults2[key] = props[key];
          }
        }
      });
    }
    const state = ctrl["_state"];
    if (props.pause === !state.paused) {
      state.paused = props.pause;
      flushCalls(props.pause ? state.pauseQueue : state.resumeQueue);
    } else if (state.paused) {
      props.pause = true;
    }
    const promises = (keys || Object.keys(ctrl.springs)).map((key) => ctrl.springs[key].start(props));
    const cancel = props.cancel === true || getDefaultProp(props, "cancel") === true;
    if (asyncTo || cancel && state.asyncId) {
      promises.push(scheduleProps(++ctrl["_lastAsyncId"], {
        props,
        state,
        actions: {
          pause: noop3,
          resume: noop3,
          start(props2, resolve) {
            if (cancel) {
              stopAsync(state, ctrl["_lastAsyncId"]);
              resolve(getCancelledResult(ctrl));
            } else {
              props2.onRest = onRest;
              resolve(runAsync(asyncTo, props2, state, ctrl));
            }
          }
        }
      }));
    }
    if (state.paused) {
      await new Promise((resume) => {
        state.resumeQueue.add(resume);
      });
    }
    const result = getCombinedResult(ctrl, await Promise.all(promises));
    if (loop2 && result.finished && !(isLoop && result.noop)) {
      const nextProps = createLoopUpdate(props, loop2, to2);
      if (nextProps) {
        prepareKeys(ctrl, [nextProps]);
        return flushUpdate(ctrl, nextProps, true);
      }
    }
    if (onResolve) {
      raf.batchedUpdates(() => onResolve(result, ctrl, ctrl.item));
    }
    return result;
  }
  function createSpring(key, observer) {
    const spring = new SpringValue();
    spring.key = key;
    if (observer) {
      addFluidObserver(spring, observer);
    }
    return spring;
  }
  function prepareSprings(springs, props, create6) {
    if (props.keys) {
      each(props.keys, (key) => {
        const spring = springs[key] || (springs[key] = create6(key));
        spring["_prepareNode"](props);
      });
    }
  }
  function prepareKeys(ctrl, queue) {
    each(queue, (props) => {
      prepareSprings(ctrl.springs, props, (key) => {
        return createSpring(key, ctrl);
      });
    });
  }
  function _objectWithoutPropertiesLoose(source, excluded) {
    if (source == null) return {};
    var target = {};
    var sourceKeys = Object.keys(source);
    var key, i2;
    for (i2 = 0; i2 < sourceKeys.length; i2++) {
      key = sourceKeys[i2];
      if (excluded.indexOf(key) >= 0) continue;
      target[key] = source[key];
    }
    return target;
  }
  var _excluded$3 = ["children"];
  var SpringContext = (_ref) => {
    let {
      children
    } = _ref, props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
    const inherited = (0, import_react3.useContext)(ctx);
    const pause = props.pause || !!inherited.pause, immediate = props.immediate || !!inherited.immediate;
    props = useMemoOne(() => ({
      pause,
      immediate
    }), [pause, immediate]);
    const {
      Provider: Provider2
    } = ctx;
    return React2.createElement(Provider2, {
      value: props
    }, children);
  };
  var ctx = makeContext(SpringContext, {});
  SpringContext.Provider = ctx.Provider;
  SpringContext.Consumer = ctx.Consumer;
  function makeContext(target, init) {
    Object.assign(target, React2.createContext(init));
    target.Provider._context = target;
    target.Consumer._context = target;
    return target;
  }
  var TransitionPhase;
  (function(TransitionPhase2) {
    TransitionPhase2["MOUNT"] = "mount";
    TransitionPhase2["ENTER"] = "enter";
    TransitionPhase2["UPDATE"] = "update";
    TransitionPhase2["LEAVE"] = "leave";
  })(TransitionPhase || (TransitionPhase = {}));
  var Interpolation = class extends FrameValue {
    constructor(source, args) {
      super();
      this.key = void 0;
      this.idle = true;
      this.calc = void 0;
      this._active = /* @__PURE__ */ new Set();
      this.source = source;
      this.calc = createInterpolator(...args);
      const value = this._get();
      const nodeType = getAnimatedType(value);
      setAnimated(this, nodeType.create(value));
    }
    advance(_dt) {
      const value = this._get();
      const oldValue = this.get();
      if (!isEqual(value, oldValue)) {
        getAnimated(this).setValue(value);
        this._onChange(value, this.idle);
      }
      if (!this.idle && checkIdle(this._active)) {
        becomeIdle(this);
      }
    }
    _get() {
      const inputs = is.arr(this.source) ? this.source.map(getFluidValue) : toArray(getFluidValue(this.source));
      return this.calc(...inputs);
    }
    _start() {
      if (this.idle && !checkIdle(this._active)) {
        this.idle = false;
        each(getPayload(this), (node) => {
          node.done = false;
        });
        if (globals.skipAnimation) {
          raf.batchedUpdates(() => this.advance());
          becomeIdle(this);
        } else {
          frameLoop.start(this);
        }
      }
    }
    _attach() {
      let priority2 = 1;
      each(toArray(this.source), (source) => {
        if (hasFluidValue(source)) {
          addFluidObserver(source, this);
        }
        if (isFrameValue(source)) {
          if (!source.idle) {
            this._active.add(source);
          }
          priority2 = Math.max(priority2, source.priority + 1);
        }
      });
      this.priority = priority2;
      this._start();
    }
    _detach() {
      each(toArray(this.source), (source) => {
        if (hasFluidValue(source)) {
          removeFluidObserver(source, this);
        }
      });
      this._active.clear();
      becomeIdle(this);
    }
    eventObserved(event) {
      if (event.type == "change") {
        if (event.idle) {
          this.advance();
        } else {
          this._active.add(event.parent);
          this._start();
        }
      } else if (event.type == "idle") {
        this._active.delete(event.parent);
      } else if (event.type == "priority") {
        this.priority = toArray(this.source).reduce((highest, parent) => Math.max(highest, (isFrameValue(parent) ? parent.priority : 0) + 1), 0);
      }
    }
  };
  function isIdle(source) {
    return source.idle !== false;
  }
  function checkIdle(active) {
    return !active.size || Array.from(active).every(isIdle);
  }
  function becomeIdle(self) {
    if (!self.idle) {
      self.idle = true;
      each(getPayload(self), (node) => {
        node.done = true;
      });
      callFluidObservers(self, {
        type: "idle",
        parent: self
      });
    }
  }
  globals.assign({
    createStringInterpolator,
    to: (source, args) => new Interpolation(source, args)
  });
  var update2 = frameLoop.advance;

  // node_modules/@react-spring/web/dist/react-spring-web.esm.js
  var import_react_dom = __toESM(require_react_dom());
  function _objectWithoutPropertiesLoose2(source, excluded) {
    if (source == null) return {};
    var target = {};
    var sourceKeys = Object.keys(source);
    var key, i2;
    for (i2 = 0; i2 < sourceKeys.length; i2++) {
      key = sourceKeys[i2];
      if (excluded.indexOf(key) >= 0) continue;
      target[key] = source[key];
    }
    return target;
  }
  var _excluded$2 = ["style", "children", "scrollTop", "scrollLeft"];
  var isCustomPropRE = /^--/;
  function dangerousStyleValue(name, value) {
    if (value == null || typeof value === "boolean" || value === "") return "";
    if (typeof value === "number" && value !== 0 && !isCustomPropRE.test(name) && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) return value + "px";
    return ("" + value).trim();
  }
  var attributeCache = {};
  function applyAnimatedValues(instance, props) {
    if (!instance.nodeType || !instance.setAttribute) {
      return false;
    }
    const isFilterElement = instance.nodeName === "filter" || instance.parentNode && instance.parentNode.nodeName === "filter";
    const _ref = props, {
      style,
      children,
      scrollTop,
      scrollLeft
    } = _ref, attributes = _objectWithoutPropertiesLoose2(_ref, _excluded$2);
    const values = Object.values(attributes);
    const names = Object.keys(attributes).map((name) => isFilterElement || instance.hasAttribute(name) ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, (n2) => "-" + n2.toLowerCase())));
    if (children !== void 0) {
      instance.textContent = children;
    }
    for (let name in style) {
      if (style.hasOwnProperty(name)) {
        const value = dangerousStyleValue(name, style[name]);
        if (isCustomPropRE.test(name)) {
          instance.style.setProperty(name, value);
        } else {
          instance.style[name] = value;
        }
      }
    }
    names.forEach((name, i2) => {
      instance.setAttribute(name, values[i2]);
    });
    if (scrollTop !== void 0) {
      instance.scrollTop = scrollTop;
    }
    if (scrollLeft !== void 0) {
      instance.scrollLeft = scrollLeft;
    }
  }
  var isUnitlessNumber = {
    animationIterationCount: true,
    borderImageOutset: true,
    borderImageSlice: true,
    borderImageWidth: true,
    boxFlex: true,
    boxFlexGroup: true,
    boxOrdinalGroup: true,
    columnCount: true,
    columns: true,
    flex: true,
    flexGrow: true,
    flexPositive: true,
    flexShrink: true,
    flexNegative: true,
    flexOrder: true,
    gridRow: true,
    gridRowEnd: true,
    gridRowSpan: true,
    gridRowStart: true,
    gridColumn: true,
    gridColumnEnd: true,
    gridColumnSpan: true,
    gridColumnStart: true,
    fontWeight: true,
    lineClamp: true,
    lineHeight: true,
    opacity: true,
    order: true,
    orphans: true,
    tabSize: true,
    widows: true,
    zIndex: true,
    zoom: true,
    fillOpacity: true,
    floodOpacity: true,
    stopOpacity: true,
    strokeDasharray: true,
    strokeDashoffset: true,
    strokeMiterlimit: true,
    strokeOpacity: true,
    strokeWidth: true
  };
  var prefixKey = (prefix2, key) => prefix2 + key.charAt(0).toUpperCase() + key.substring(1);
  var prefixes = ["Webkit", "Ms", "Moz", "O"];
  isUnitlessNumber = Object.keys(isUnitlessNumber).reduce((acc, prop) => {
    prefixes.forEach((prefix2) => acc[prefixKey(prefix2, prop)] = acc[prop]);
    return acc;
  }, isUnitlessNumber);
  var _excluded$1 = ["x", "y", "z"];
  var domTransforms = /^(matrix|translate|scale|rotate|skew)/;
  var pxTransforms = /^(translate)/;
  var degTransforms = /^(rotate|skew)/;
  var addUnit = (value, unit) => is.num(value) && value !== 0 ? value + unit : value;
  var isValueIdentity = (value, id) => is.arr(value) ? value.every((v2) => isValueIdentity(v2, id)) : is.num(value) ? value === id : parseFloat(value) === id;
  var AnimatedStyle = class extends AnimatedObject {
    constructor(_ref) {
      let {
        x: x2,
        y: y2,
        z
      } = _ref, style = _objectWithoutPropertiesLoose2(_ref, _excluded$1);
      const inputs = [];
      const transforms = [];
      if (x2 || y2 || z) {
        inputs.push([x2 || 0, y2 || 0, z || 0]);
        transforms.push((xyz) => [`translate3d(${xyz.map((v2) => addUnit(v2, "px")).join(",")})`, isValueIdentity(xyz, 0)]);
      }
      eachProp(style, (value, key) => {
        if (key === "transform") {
          inputs.push([value || ""]);
          transforms.push((transform) => [transform, transform === ""]);
        } else if (domTransforms.test(key)) {
          delete style[key];
          if (is.und(value)) return;
          const unit = pxTransforms.test(key) ? "px" : degTransforms.test(key) ? "deg" : "";
          inputs.push(toArray(value));
          transforms.push(key === "rotate3d" ? ([x3, y3, z2, deg]) => [`rotate3d(${x3},${y3},${z2},${addUnit(deg, unit)})`, isValueIdentity(deg, 0)] : (input) => [`${key}(${input.map((v2) => addUnit(v2, unit)).join(",")})`, isValueIdentity(input, key.startsWith("scale") ? 1 : 0)]);
        }
      });
      if (inputs.length) {
        style.transform = new FluidTransform(inputs, transforms);
      }
      super(style);
    }
  };
  var FluidTransform = class extends FluidValue {
    constructor(inputs, transforms) {
      super();
      this._value = null;
      this.inputs = inputs;
      this.transforms = transforms;
    }
    get() {
      return this._value || (this._value = this._get());
    }
    _get() {
      let transform = "";
      let identity2 = true;
      each(this.inputs, (input, i2) => {
        const arg1 = getFluidValue(input[0]);
        const [t3, id] = this.transforms[i2](is.arr(arg1) ? arg1 : input.map(getFluidValue));
        transform += " " + t3;
        identity2 = identity2 && id;
      });
      return identity2 ? "none" : transform;
    }
    observerAdded(count) {
      if (count == 1) each(this.inputs, (input) => each(input, (value) => hasFluidValue(value) && addFluidObserver(value, this)));
    }
    observerRemoved(count) {
      if (count == 0) each(this.inputs, (input) => each(input, (value) => hasFluidValue(value) && removeFluidObserver(value, this)));
    }
    eventObserved(event) {
      if (event.type == "change") {
        this._value = null;
      }
      callFluidObservers(this, event);
    }
  };
  var primitives = ["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"];
  var _excluded = ["scrollTop", "scrollLeft"];
  globals.assign({
    batchedUpdates: import_react_dom.unstable_batchedUpdates,
    createStringInterpolator,
    colors
  });
  var host = createHost(primitives, {
    applyAnimatedValues,
    createAnimatedStyle: (style) => new AnimatedStyle(style),
    getComponentProps: (_ref) => {
      let props = _objectWithoutPropertiesLoose2(_ref, _excluded);
      return props;
    }
  });
  var animated = host.animated;

  // packages/block-editor/build-module/components/use-moving-animation/index.mjs
  var import_element27 = __toESM(require_element(), 1);
  var import_dom2 = __toESM(require_dom(), 1);
  var import_data20 = __toESM(require_data(), 1);
  var BLOCK_ANIMATION_THRESHOLD = 200;
  function getAbsolutePosition(element) {
    return {
      top: element.offsetTop,
      left: element.offsetLeft
    };
  }
  function useMovingAnimation({ triggerAnimationOnChange, clientId }) {
    const ref = (0, import_element27.useRef)();
    const {
      isTyping: isTyping3,
      getGlobalBlockCount: getGlobalBlockCount2,
      isBlockSelected: isBlockSelected2,
      isFirstMultiSelectedBlock: isFirstMultiSelectedBlock2,
      isBlockMultiSelected: isBlockMultiSelected2,
      isAncestorMultiSelected: isAncestorMultiSelected2,
      isDraggingBlocks: isDraggingBlocks2
    } = (0, import_data20.useSelect)(store);
    const { previous, prevRect } = (0, import_element27.useMemo)(
      () => ({
        previous: ref.current && getAbsolutePosition(ref.current),
        prevRect: ref.current && ref.current.getBoundingClientRect()
      }),
      [triggerAnimationOnChange]
    );
    (0, import_element27.useLayoutEffect)(() => {
      if (!previous || !ref.current) {
        return;
      }
      const scrollContainer = (0, import_dom2.getScrollContainer)(ref.current);
      const isSelected = isBlockSelected2(clientId);
      const adjustScrolling = isSelected || isFirstMultiSelectedBlock2(clientId);
      const isDragging3 = isDraggingBlocks2();
      function preserveScrollPosition() {
        if (isDragging3) {
          return;
        }
        if (adjustScrolling && prevRect) {
          const blockRect = ref.current.getBoundingClientRect();
          const diff = blockRect.top - prevRect.top;
          if (diff) {
            scrollContainer.scrollTop += diff;
          }
        }
      }
      const disableAnimation = window.matchMedia("(prefers-reduced-motion: reduce)").matches || isTyping3() || getGlobalBlockCount2() > BLOCK_ANIMATION_THRESHOLD;
      if (disableAnimation) {
        preserveScrollPosition();
        return;
      }
      const isPartOfSelection = isSelected || isBlockMultiSelected2(clientId) || isAncestorMultiSelected2(clientId);
      if (isPartOfSelection && isDragging3) {
        return;
      }
      const zIndex = isPartOfSelection ? "1" : "";
      const controller = new Controller({
        x: 0,
        y: 0,
        config: { mass: 5, tension: 2e3, friction: 200 },
        onChange({ value }) {
          if (!ref.current) {
            return;
          }
          let { x: x22, y: y22 } = value;
          x22 = Math.round(x22);
          y22 = Math.round(y22);
          const finishedMoving = x22 === 0 && y22 === 0;
          ref.current.style.transformOrigin = "center center";
          ref.current.style.transform = finishedMoving ? null : `translate3d(${x22}px,${y22}px,0)`;
          ref.current.style.zIndex = zIndex;
          preserveScrollPosition();
        }
      });
      ref.current.style.transform = void 0;
      const destination = getAbsolutePosition(ref.current);
      const x2 = Math.round(previous.left - destination.left);
      const y2 = Math.round(previous.top - destination.top);
      controller.start({ x: 0, y: 0, from: { x: x2, y: y2 } });
      return () => {
        controller.stop();
        controller.set({ x: 0, y: 0 });
      };
    }, [
      previous,
      prevRect,
      clientId,
      isTyping3,
      getGlobalBlockCount2,
      isBlockSelected2,
      isFirstMultiSelectedBlock2,
      isBlockMultiSelected2,
      isAncestorMultiSelected2,
      isDraggingBlocks2
    ]);
    return ref;
  }
  var use_moving_animation_default = useMovingAnimation;

  // packages/block-editor/build-module/components/block-list/use-block-props/use-focus-first-element.mjs
  var import_element28 = __toESM(require_element(), 1);
  var import_dom3 = __toESM(require_dom(), 1);
  var import_data21 = __toESM(require_data(), 1);

  // packages/block-editor/build-module/utils/dom.mjs
  var BLOCK_SELECTOR = ".block-editor-block-list__block";
  var APPENDER_SELECTOR = ".block-list-appender";
  var BLOCK_APPENDER_CLASS = ".block-editor-button-block-appender";
  function isInSameBlock(a2, b2) {
    return a2.closest(BLOCK_SELECTOR) === b2.closest(BLOCK_SELECTOR);
  }
  function isInsideRootBlock(blockElement, element) {
    const parentBlock = element.closest(
      [BLOCK_SELECTOR, APPENDER_SELECTOR, BLOCK_APPENDER_CLASS].join(",")
    );
    return parentBlock === blockElement;
  }
  function getBlockClientId(node) {
    while (node && node.nodeType !== node.ELEMENT_NODE) {
      node = node.parentNode;
    }
    if (!node) {
      return;
    }
    const elementNode = (
      /** @type {Element} */
      node
    );
    const blockNode = elementNode.closest(BLOCK_SELECTOR);
    if (!blockNode) {
      return;
    }
    return blockNode.id.slice("block-".length);
  }
  function rectUnion(rect1, rect2) {
    const left = Math.min(rect1.left, rect2.left);
    const right = Math.max(rect1.right, rect2.right);
    const bottom = Math.max(rect1.bottom, rect2.bottom);
    const top = Math.min(rect1.top, rect2.top);
    return new window.DOMRectReadOnly(left, top, right - left, bottom - top);
  }
  function isElementVisible(element) {
    const viewport = element.ownerDocument.defaultView;
    if (!viewport) {
      return false;
    }
    if (element.classList.contains("components-visually-hidden")) {
      return false;
    }
    const bounds = element.getBoundingClientRect();
    if (bounds.width === 0 || bounds.height === 0) {
      return false;
    }
    if (element.checkVisibility) {
      return element.checkVisibility?.({
        opacityProperty: true,
        contentVisibilityAuto: true,
        visibilityProperty: true
      });
    }
    const style = viewport.getComputedStyle(element);
    if (style.display === "none" || style.visibility === "hidden" || style.opacity === "0") {
      return false;
    }
    return true;
  }
  function isScrollable(element) {
    const style = window.getComputedStyle(element);
    return style.overflowX === "auto" || style.overflowX === "scroll" || style.overflowY === "auto" || style.overflowY === "scroll";
  }
  var WITH_OVERFLOW_ELEMENT_BLOCKS = ["core/navigation"];
  function getElementBounds(element) {
    const viewport = element.ownerDocument.defaultView;
    if (!viewport) {
      return new window.DOMRectReadOnly();
    }
    let bounds = element.getBoundingClientRect();
    const dataType = element.getAttribute("data-type");
    if (dataType && WITH_OVERFLOW_ELEMENT_BLOCKS.includes(dataType)) {
      const stack = [element];
      let currentElement;
      while (currentElement = stack.pop()) {
        if (!isScrollable(currentElement)) {
          for (const child of currentElement.children) {
            if (isElementVisible(child)) {
              const childBounds = child.getBoundingClientRect();
              bounds = rectUnion(bounds, childBounds);
              stack.push(child);
            }
          }
        }
      }
    }
    const left = Math.max(bounds.left, 0);
    const right = Math.min(bounds.right, viewport.innerWidth);
    bounds = new window.DOMRectReadOnly(
      left,
      bounds.top,
      right - left,
      bounds.height
    );
    return bounds;
  }

  // packages/block-editor/build-module/components/block-list/use-block-props/use-focus-first-element.mjs
  function useFocusFirstElement({ clientId, initialPosition: initialPosition2 }) {
    const ref = (0, import_element28.useRef)();
    const { isBlockSelected: isBlockSelected2, isMultiSelecting: isMultiSelecting3, isZoomOut: isZoomOut2 } = unlock(
      (0, import_data21.useSelect)(store)
    );
    (0, import_element28.useEffect)(() => {
      if (!isBlockSelected2(clientId) || isMultiSelecting3() || isZoomOut2()) {
        return;
      }
      if (initialPosition2 === void 0 || initialPosition2 === null) {
        return;
      }
      if (!ref.current) {
        return;
      }
      const { ownerDocument } = ref.current;
      if (isInsideRootBlock(ref.current, ownerDocument.activeElement)) {
        return;
      }
      const textInputs = import_dom3.focus.tabbable.find(ref.current).filter((node) => (0, import_dom3.isTextField)(node));
      const isReverse = -1 === initialPosition2;
      const target = textInputs[isReverse ? textInputs.length - 1 : 0] || ref.current;
      if (!isInsideRootBlock(ref.current, target)) {
        ref.current.focus();
        return;
      }
      if (!ref.current.getAttribute("contenteditable")) {
        const focusElement = import_dom3.focus.tabbable.findNext(ref.current);
        if (focusElement && isInsideRootBlock(ref.current, focusElement) && (0, import_dom3.isFormElement)(focusElement)) {
          focusElement.focus();
          return;
        }
      }
      (0, import_dom3.placeCaretAtHorizontalEdge)(target, isReverse);
    }, [initialPosition2, clientId]);
    return ref;
  }

  // packages/block-editor/build-module/components/block-list/use-block-props/use-is-hovered.mjs
  var import_compose8 = __toESM(require_compose(), 1);
  function listener(event) {
    if (event.defaultPrevented) {
      return;
    }
    event.preventDefault();
    event.currentTarget.classList.toggle(
      "is-hovered",
      event.type === "mouseover"
    );
  }
  function useIsHovered({ isEnabled = true } = {}) {
    return (0, import_compose8.useRefEffect)(
      (node) => {
        if (!isEnabled) {
          return;
        }
        node.addEventListener("mouseout", listener);
        node.addEventListener("mouseover", listener);
        return () => {
          node.removeEventListener("mouseout", listener);
          node.removeEventListener("mouseover", listener);
          node.classList.remove("is-hovered");
        };
      },
      [isEnabled]
    );
  }

  // packages/block-editor/build-module/components/block-list/use-block-props/use-focus-handler.mjs
  var import_data22 = __toESM(require_data(), 1);
  var import_compose9 = __toESM(require_compose(), 1);
  function useFocusHandler(clientId) {
    const { isBlockSelected: isBlockSelected2 } = (0, import_data22.useSelect)(store);
    const { selectBlock: selectBlock2, selectionChange: selectionChange2 } = (0, import_data22.useDispatch)(store);
    return (0, import_compose9.useRefEffect)(
      (node) => {
        function onFocus(event) {
          if (node.parentElement.closest('[contenteditable="true"]')) {
            return;
          }
          if (isBlockSelected2(clientId)) {
            if (!event.target.isContentEditable) {
              selectionChange2(clientId);
            }
            return;
          }
          if (!isInsideRootBlock(node, event.target)) {
            return;
          }
          selectBlock2(clientId);
        }
        node.addEventListener("focusin", onFocus);
        return () => {
          node.removeEventListener("focusin", onFocus);
        };
      },
      [isBlockSelected2, selectBlock2]
    );
  }

  // packages/block-editor/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.mjs
  var import_blocks19 = __toESM(require_blocks(), 1);
  var import_dom6 = __toESM(require_dom(), 1);
  var import_keycodes2 = __toESM(require_keycodes(), 1);
  var import_data23 = __toESM(require_data(), 1);
  var import_compose10 = __toESM(require_compose(), 1);
  function isColorTransparent(color) {
    return !color || color === "transparent" || color === "rgba(0, 0, 0, 0)";
  }
  function useEventHandlers({ clientId, isSelected }) {
    const {
      getBlockRootClientId: getBlockRootClientId2,
      isZoomOut: isZoomOut2,
      hasMultiSelection: hasMultiSelection2,
      isSectionBlock: isSectionBlock2,
      editedContentOnlySection: editedContentOnlySection2,
      getBlock: getBlock2
    } = unlock((0, import_data23.useSelect)(store));
    const {
      insertAfterBlock: insertAfterBlock2,
      removeBlock: removeBlock2,
      resetZoomLevel: resetZoomLevel2,
      startDraggingBlocks: startDraggingBlocks2,
      stopDraggingBlocks: stopDraggingBlocks2,
      editContentOnlySection: editContentOnlySection2
    } = unlock((0, import_data23.useDispatch)(store));
    return (0, import_compose10.useRefEffect)(
      (node) => {
        if (!isSelected) {
          return;
        }
        function onKeyDown(event) {
          const { keyCode, target } = event;
          if (keyCode !== import_keycodes2.ENTER && keyCode !== import_keycodes2.BACKSPACE && keyCode !== import_keycodes2.DELETE) {
            return;
          }
          if (target !== node || (0, import_dom6.isTextField)(target)) {
            return;
          }
          event.preventDefault();
          if (keyCode === import_keycodes2.ENTER && isZoomOut2()) {
            resetZoomLevel2();
          } else if (keyCode === import_keycodes2.ENTER) {
            insertAfterBlock2(clientId);
          } else {
            removeBlock2(clientId);
          }
        }
        function onDragStart(event) {
          if (node !== event.target || node.isContentEditable || node.ownerDocument.activeElement !== node || hasMultiSelection2()) {
            event.preventDefault();
            return;
          }
          const data = JSON.stringify({
            type: "block",
            srcClientIds: [clientId],
            srcRootClientId: getBlockRootClientId2(clientId)
          });
          event.dataTransfer.effectAllowed = "move";
          event.dataTransfer.clearData();
          event.dataTransfer.setData("wp-blocks", data);
          const { ownerDocument } = node;
          const { defaultView } = ownerDocument;
          const selection2 = defaultView.getSelection();
          selection2.removeAllRanges();
          const dragElement = ownerDocument.createElement("div");
          dragElement.style.width = "1px";
          dragElement.style.height = "1px";
          dragElement.style.position = "fixed";
          dragElement.style.visibility = "hidden";
          ownerDocument.body.appendChild(dragElement);
          event.dataTransfer.setDragImage(dragElement, 0, 0);
          const rect = node.getBoundingClientRect();
          const id = node.id;
          const clone = node.cloneNode();
          clone.style.display = "none";
          node.id = null;
          node.after(clone);
          let _scale = 1;
          {
            let parentElement = node;
            while (parentElement = parentElement.parentElement) {
              const { scale } = defaultView.getComputedStyle(parentElement);
              if (scale && scale !== "none") {
                _scale = parseFloat(scale);
                break;
              }
            }
          }
          const inverted = 1 / _scale;
          const originalNodeProperties = {};
          for (const property of [
            "transform",
            "transformOrigin",
            "transition",
            "zIndex",
            "position",
            "top",
            "left",
            "pointerEvents",
            "opacity",
            "backgroundColor"
          ]) {
            originalNodeProperties[property] = node.style[property];
          }
          const originScrollTop = defaultView.scrollY;
          const originScrollLeft = defaultView.scrollX;
          const originClientX = event.clientX;
          const originClientY = event.clientY;
          node.style.position = "relative";
          node.style.top = `${0}px`;
          node.style.left = `${0}px`;
          const originX = event.clientX - rect.left;
          const originY = event.clientY - rect.top;
          const dragScale = rect.height > 200 ? 200 / rect.height : 1;
          node.style.zIndex = "1000";
          node.style.transformOrigin = `${originX * inverted}px ${originY * inverted}px`;
          node.style.transition = "transform 0.2s ease-out";
          node.style.transform = `scale(${dragScale})`;
          node.style.opacity = "0.9";
          if (isColorTransparent(
            defaultView.getComputedStyle(node).backgroundColor
          )) {
            let bgColor = "transparent";
            let parentElement = node;
            while (parentElement = parentElement.parentElement) {
              const { backgroundColor } = defaultView.getComputedStyle(parentElement);
              if (!isColorTransparent(backgroundColor)) {
                bgColor = backgroundColor;
                break;
              }
            }
            node.style.backgroundColor = bgColor;
          }
          let hasStarted = false;
          let lastClientX = originClientX;
          let lastClientY = originClientY;
          function dragOver(e2) {
            if (e2.clientX === lastClientX && e2.clientY === lastClientY) {
              return;
            }
            lastClientX = e2.clientX;
            lastClientY = e2.clientY;
            over();
          }
          function over() {
            if (!hasStarted) {
              hasStarted = true;
              node.style.pointerEvents = "none";
            }
            const pointerYDelta = lastClientY - originClientY;
            const pointerXDelta = lastClientX - originClientX;
            const scrollTop = defaultView.scrollY;
            const scrollLeft = defaultView.scrollX;
            const scrollTopDelta = scrollTop - originScrollTop;
            const scrollLeftDelta = scrollLeft - originScrollLeft;
            const topDelta = pointerYDelta + scrollTopDelta;
            const leftDelta = pointerXDelta + scrollLeftDelta;
            node.style.top = `${topDelta * inverted}px`;
            node.style.left = `${leftDelta * inverted}px`;
          }
          function end() {
            ownerDocument.removeEventListener("dragover", dragOver);
            ownerDocument.removeEventListener("dragend", end);
            ownerDocument.removeEventListener("drop", end);
            ownerDocument.removeEventListener("scroll", over);
            for (const [property, value] of Object.entries(
              originalNodeProperties
            )) {
              node.style[property] = value;
            }
            clone.remove();
            node.id = id;
            dragElement.remove();
            stopDraggingBlocks2();
            document.body.classList.remove(
              "is-dragging-components-draggable"
            );
            ownerDocument.documentElement.classList.remove(
              "is-dragging"
            );
          }
          ownerDocument.addEventListener("dragover", dragOver);
          ownerDocument.addEventListener("dragend", end);
          ownerDocument.addEventListener("drop", end);
          ownerDocument.addEventListener("scroll", over);
          startDraggingBlocks2([clientId]);
          document.body.classList.add(
            "is-dragging-components-draggable"
          );
          ownerDocument.documentElement.classList.add("is-dragging");
        }
        node.addEventListener("keydown", onKeyDown);
        node.addEventListener("dragstart", onDragStart);
        function onDoubleClick(event) {
          const isSection = isSectionBlock2(clientId);
          const block = getBlock2(clientId);
          const isSyncedPattern = (0, import_blocks19.isReusableBlock)(block);
          const isTemplatePartBlock = (0, import_blocks19.isTemplatePart)(block);
          const isAlreadyEditing = editedContentOnlySection2 === clientId;
          if (!isSection || isAlreadyEditing || isSyncedPattern || isTemplatePartBlock) {
            return;
          }
          event.preventDefault();
          editContentOnlySection2(clientId);
        }
        node.addEventListener("dblclick", onDoubleClick);
        return () => {
          node.removeEventListener("keydown", onKeyDown);
          node.removeEventListener("dragstart", onDragStart);
          node.removeEventListener("dblclick", onDoubleClick);
        };
      },
      [
        clientId,
        isSelected,
        getBlockRootClientId2,
        getBlock2,
        import_blocks19.isReusableBlock,
        import_blocks19.isTemplatePart,
        insertAfterBlock2,
        removeBlock2,
        isZoomOut2,
        resetZoomLevel2,
        hasMultiSelection2,
        startDraggingBlocks2,
        stopDraggingBlocks2,
        isSectionBlock2,
        editedContentOnlySection2,
        editContentOnlySection2
      ]
    );
  }

  // packages/block-editor/build-module/components/block-list/use-block-props/use-intersection-observer.mjs
  var import_compose11 = __toESM(require_compose(), 1);
  var import_element29 = __toESM(require_element(), 1);
  function useIntersectionObserver() {
    const observer = (0, import_element29.useContext)(IntersectionObserver);
    return (0, import_compose11.useRefEffect)(
      (node) => {
        if (observer) {
          observer.observe(node);
          return () => {
            observer.unobserve(node);
          };
        }
      },
      [observer]
    );
  }

  // packages/block-editor/build-module/components/block-list/use-block-props/use-scroll-into-view.mjs
  var import_compose12 = __toESM(require_compose(), 1);
  function useScrollIntoView({ isSelected }) {
    const prefersReducedMotion = (0, import_compose12.useReducedMotion)();
    return (0, import_compose12.useRefEffect)(
      (node) => {
        if (isSelected) {
          const { ownerDocument } = node;
          const { defaultView } = ownerDocument;
          if (!defaultView.IntersectionObserver) {
            return;
          }
          const observer = new defaultView.IntersectionObserver(
            (entries) => {
              if (!entries[0].isIntersecting) {
                node.scrollIntoView({
                  behavior: prefersReducedMotion ? "instant" : "smooth"
                });
              }
              observer.disconnect();
            }
          );
          observer.observe(node);
          return () => {
            observer.disconnect();
          };
        }
      },
      [isSelected]
    );
  }

  // packages/block-editor/build-module/components/use-flash-editable-blocks/index.mjs
  var import_compose13 = __toESM(require_compose(), 1);
  var import_data24 = __toESM(require_data(), 1);
  function useFlashEditableBlocks({
    clientId = "",
    isEnabled = true
  } = {}) {
    const { getEnabledClientIdsTree: getEnabledClientIdsTree2 } = unlock((0, import_data24.useSelect)(store));
    return (0, import_compose13.useRefEffect)(
      (element) => {
        if (!isEnabled) {
          return;
        }
        const flashEditableBlocks = () => {
          getEnabledClientIdsTree2(clientId).forEach(
            ({ clientId: id }) => {
              const block = element.querySelector(
                `[data-block="${id}"]`
              );
              if (!block) {
                return;
              }
              block.classList.remove("has-editable-outline");
              block.offsetWidth;
              block.classList.add("has-editable-outline");
            }
          );
        };
        const handleClick = (event) => {
          const shouldFlash = event.target === element || event.target.classList.contains("is-root-container");
          if (!shouldFlash) {
            return;
          }
          if (event.defaultPrevented) {
            return;
          }
          event.preventDefault();
          flashEditableBlocks();
        };
        element.addEventListener("click", handleClick);
        return () => element.removeEventListener("click", handleClick);
      },
      [isEnabled]
    );
  }

  // packages/block-editor/build-module/components/block-list/use-block-props/use-firefox-draggable-compatibility.mjs
  var import_compose14 = __toESM(require_compose(), 1);
  var nodesByDocument = /* @__PURE__ */ new Map();
  function add(doc, node) {
    let set = nodesByDocument.get(doc);
    if (!set) {
      set = /* @__PURE__ */ new Set();
      nodesByDocument.set(doc, set);
      doc.addEventListener("pointerdown", down);
    }
    set.add(node);
  }
  function remove3(doc, node) {
    const set = nodesByDocument.get(doc);
    if (set) {
      set.delete(node);
      restore(node);
      if (set.size === 0) {
        nodesByDocument.delete(doc);
        doc.removeEventListener("pointerdown", down);
      }
    }
  }
  function restore(node) {
    const prevDraggable = node.getAttribute("data-draggable");
    if (prevDraggable) {
      node.removeAttribute("data-draggable");
      if (prevDraggable === "true" && !node.getAttribute("draggable")) {
        node.setAttribute("draggable", "true");
      }
    }
  }
  function down(event) {
    const { target } = event;
    const { ownerDocument, isContentEditable, tagName } = target;
    const isInputOrTextArea = ["INPUT", "TEXTAREA"].includes(tagName);
    const nodes = nodesByDocument.get(ownerDocument);
    if (isContentEditable || isInputOrTextArea) {
      for (const node of nodes) {
        if (node.getAttribute("draggable") === "true" && node.contains(target)) {
          node.removeAttribute("draggable");
          node.setAttribute("data-draggable", "true");
        }
      }
    } else {
      for (const node of nodes) {
        restore(node);
      }
    }
  }
  function useFirefoxDraggableCompatibility() {
    return (0, import_compose14.useRefEffect)((node) => {
      add(node.ownerDocument, node);
      return () => {
        remove3(node.ownerDocument, node);
      };
    }, []);
  }

  // packages/block-editor/build-module/components/block-visibility/modal.mjs
  var import_i18n26 = __toESM(require_i18n(), 1);
  var import_element30 = __toESM(require_element(), 1);
  var import_components24 = __toESM(require_components(), 1);
  var import_data25 = __toESM(require_data(), 1);
  var import_keyboard_shortcuts = __toESM(require_keyboard_shortcuts(), 1);
  var import_notices3 = __toESM(require_notices(), 1);

  // packages/block-editor/build-module/components/block-visibility/utils.mjs
  var import_i18n25 = __toESM(require_i18n(), 1);
  function isBlockHiddenForViewport(block, viewport) {
    if (!block) {
      return false;
    }
    const blockVisibility2 = block.attributes?.metadata?.blockVisibility;
    if (blockVisibility2 === true) {
      return false;
    }
    if ("object" !== typeof blockVisibility2) {
      return false;
    }
    const viewportConfig = blockVisibility2.viewport;
    if (!viewportConfig || "object" !== typeof viewportConfig) {
      return false;
    }
    if (!BLOCK_VISIBILITY_VIEWPORT_ENTRIES.some(
      ([, { key }]) => key === viewport
    )) {
      return false;
    }
    return viewportConfig[viewport] === false;
  }
  function getViewportCheckboxState(blocks2, viewport) {
    if (!blocks2?.length) {
      return false;
    }
    const hiddenCount = blocks2.filter(
      (block) => isBlockHiddenForViewport(block, viewport)
    ).length;
    if (hiddenCount === 0) {
      return false;
    }
    if (hiddenCount === blocks2.length) {
      return true;
    }
    return null;
  }
  function getHideEverywhereCheckboxState(blocks2) {
    if (!blocks2?.length) {
      return false;
    }
    const hiddenEverywhereCount = blocks2.filter(
      (block) => block && block.attributes?.metadata?.blockVisibility === false
    ).length;
    if (hiddenEverywhereCount === 0) {
      return false;
    }
    if (hiddenEverywhereCount === blocks2.length) {
      return true;
    }
    return null;
  }
  function getBlockVisibilityLabel(blockVisibility2) {
    if (!blockVisibility2 && blockVisibility2 !== false) {
      return null;
    }
    if (blockVisibility2 === false) {
      return (0, import_i18n25.__)("Block is hidden");
    }
    if (blockVisibility2?.viewport) {
      const hiddenViewports = BLOCK_VISIBILITY_VIEWPORT_ENTRIES.filter(
        ([key]) => blockVisibility2.viewport?.[key] === false
      ).map(([, viewport]) => viewport.label);
      if (hiddenViewports.length > 0) {
        return (0, import_i18n25.sprintf)(
          /* translators: %s: comma-separated list of viewport names (Desktop, Tablet, Mobile) */
          (0, import_i18n25.__)("Block is hidden on %s"),
          hiddenViewports.join(", ")
        );
      }
    }
    return null;
  }

  // packages/block-editor/build-module/components/block-visibility/modal.mjs
  var import_jsx_runtime148 = __toESM(require_jsx_runtime(), 1);
  if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='4334c7deb6']")) {
    const style = document.createElement("style");
    style.setAttribute("data-wp-hash", "4334c7deb6");
    style.appendChild(document.createTextNode(".block-editor-block-visibility-modal{z-index:1000001}.block-editor-block-visibility-modal__options{border:0;list-style:none;margin:24px 0;padding:0}.block-editor-block-visibility-modal__options-item{align-items:center;display:flex;gap:24px;justify-content:space-between;margin:0 0 16px}.block-editor-block-visibility-modal__options-item:last-child{margin:0}.block-editor-block-visibility-modal__options-item--everywhere{align-items:start;flex-direction:column}.block-editor-block-visibility-modal__options-checkbox--everywhere{font-weight:600}.block-editor-block-visibility-modal__options-icon--checked{fill:#ddd}.block-editor-block-visibility-modal__sub-options{padding-inline-start:12px;width:100%}.block-editor-block-visibility-modal__description{color:#757575;font-size:12px}.block-editor-block-visibility-info{align-items:center;display:flex;justify-content:start;margin:0 16px 16px;padding-bottom:4px;padding-top:4px}"));
    document.head.appendChild(style);
  }
  var DEFAULT_VIEWPORT_CHECKBOX_VALUES = {
    [BLOCK_VISIBILITY_VIEWPORTS.mobile.key]: false,
    [BLOCK_VISIBILITY_VIEWPORTS.tablet.key]: false,
    [BLOCK_VISIBILITY_VIEWPORTS.desktop.key]: false
  };
  var EMPTY_BLOCKS = [];
  function BlockVisibilityModal({ clientIds, onClose }) {
    const { createSuccessNotice } = (0, import_data25.useDispatch)(import_notices3.store);
    const { updateBlockAttributes: updateBlockAttributes2 } = (0, import_data25.useDispatch)(store);
    const blocks2 = (0, import_data25.useSelect)(
      (select3) => select3(store).getBlocksByClientId(clientIds) ?? EMPTY_BLOCKS,
      [clientIds]
    );
    const listViewShortcut = (0, import_data25.useSelect)((select3) => {
      return select3(import_keyboard_shortcuts.store).getShortcutRepresentation(
        "core/editor/toggle-list-view"
      );
    }, []);
    const initialViewportValues = (0, import_element30.useMemo)(() => {
      if (blocks2?.length === 0) {
        return {
          hideEverywhere: false,
          viewportChecked: {}
        };
      }
      const viewportValues = {};
      BLOCK_VISIBILITY_VIEWPORT_ENTRIES.forEach(([, { key }]) => {
        viewportValues[key] = getViewportCheckboxState(blocks2, key);
      });
      return {
        hideEverywhere: getHideEverywhereCheckboxState(blocks2),
        viewportChecked: viewportValues
      };
    }, [blocks2]);
    const [viewportChecked, setViewportChecked] = (0, import_element30.useState)(
      initialViewportValues?.viewportChecked ?? {}
    );
    const [hideEverywhere, setHideEverywhere] = (0, import_element30.useState)(
      initialViewportValues?.hideEverywhere ?? false
    );
    const handleViewportCheckboxChange = (0, import_element30.useCallback)(
      (viewport, isChecked) => {
        setViewportChecked({
          ...viewportChecked,
          [viewport]: isChecked
        });
      },
      [viewportChecked]
    );
    const noticeMessage = (0, import_element30.useMemo)(() => {
      if (!hideEverywhere) {
        return (0, import_i18n26.sprintf)(
          // translators: %s: The shortcut key to access the List View.
          (0, import_i18n26.__)(
            "Block visibility settings updated. You can access them via the List View (%s)."
          ),
          listViewShortcut
        );
      }
      const message2 = blocks2?.length > 1 ? (
        // translators: %s: The shortcut key to access the List View.
        (0, import_i18n26.__)(
          "Blocks hidden. You can access them via the List View (%s)."
        )
      ) : (
        // translators: %s: The shortcut key to access the List View.
        (0, import_i18n26.__)(
          "Block hidden. You can access it via the List View (%s)."
        )
      );
      return (0, import_i18n26.sprintf)(message2, listViewShortcut);
    }, [hideEverywhere, blocks2?.length, listViewShortcut]);
    const isAnyViewportChecked = (0, import_element30.useMemo)(
      () => Object.values(viewportChecked).some(
        (checked) => checked === true || checked === null
      ),
      [viewportChecked]
    );
    const isDirty = (0, import_element30.useMemo)(() => {
      if (hideEverywhere !== initialViewportValues.hideEverywhere) {
        return true;
      }
      return BLOCK_VISIBILITY_VIEWPORT_ENTRIES.some(
        ([, { key }]) => viewportChecked[key] !== initialViewportValues.viewportChecked[key]
      );
    }, [hideEverywhere, viewportChecked, initialViewportValues]);
    const hasIndeterminateValues = (0, import_element30.useMemo)(() => {
      if (hideEverywhere === null) {
        return true;
      }
      return Object.values(viewportChecked).some(
        (checked) => checked === null
      );
    }, [hideEverywhere, viewportChecked]);
    const handleSubmit = (0, import_element30.useCallback)(
      (event) => {
        event.preventDefault();
        const newVisibility = hideEverywhere ? false : {
          viewport: BLOCK_VISIBILITY_VIEWPORT_ENTRIES.reduce(
            (acc, [, { key }]) => {
              if (viewportChecked[key]) {
                acc[key] = false;
              }
              return acc;
            },
            {}
          )
        };
        const attributesByClientId = Object.fromEntries(
          blocks2.map(({ clientId, attributes }) => [
            clientId,
            {
              metadata: cleanEmptyObject({
                ...attributes?.metadata,
                blockVisibility: newVisibility
              })
            }
          ])
        );
        updateBlockAttributes2(clientIds, attributesByClientId, {
          uniqueByBlock: true
        });
        createSuccessNotice(noticeMessage, {
          id: hideEverywhere ? "block-visibility-hidden" : "block-visibility-viewports-updated",
          type: "snackbar"
        });
        onClose();
      },
      [
        blocks2,
        clientIds,
        createSuccessNotice,
        hideEverywhere,
        noticeMessage,
        onClose,
        updateBlockAttributes2,
        viewportChecked
      ]
    );
    const hasMultipleBlocks = blocks2?.length > 1;
    return /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
      import_components24.Modal,
      {
        title: clientIds?.length > 1 ? (0, import_i18n26.__)("Hide blocks") : (0, import_i18n26.__)("Hide block"),
        onRequestClose: onClose,
        overlayClassName: "block-editor-block-visibility-modal",
        size: "small",
        children: /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("form", { onSubmit: handleSubmit, children: [
          /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("fieldset", { children: [
            /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("legend", { children: hasMultipleBlocks ? (0, import_i18n26.__)(
              "Select the viewport sizes for which you want to hide the blocks. Changes will apply to all selected blocks."
            ) : (0, import_i18n26.__)(
              "Select the viewport size for which you want to hide the block."
            ) }),
            /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("ul", { className: "block-editor-block-visibility-modal__options", children: /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("li", { className: "block-editor-block-visibility-modal__options-item block-editor-block-visibility-modal__options-item--everywhere", children: [
              /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
                import_components24.CheckboxControl,
                {
                  className: "block-editor-block-visibility-modal__options-checkbox--everywhere",
                  label: (0, import_i18n26.__)("Omit from published content"),
                  checked: hideEverywhere === true,
                  indeterminate: hideEverywhere === null,
                  onChange: (checked) => {
                    setHideEverywhere(checked);
                    setViewportChecked(
                      DEFAULT_VIEWPORT_CHECKBOX_VALUES
                    );
                  }
                }
              ),
              hideEverywhere !== true && /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("ul", { className: "block-editor-block-visibility-modal__sub-options", children: BLOCK_VISIBILITY_VIEWPORT_ENTRIES.map(
                ([, { label, icon, key }]) => /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)(
                  "li",
                  {
                    className: "block-editor-block-visibility-modal__options-item",
                    children: [
                      /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
                        import_components24.CheckboxControl,
                        {
                          label: (0, import_i18n26.sprintf)(
                            // translators: %s: The viewport name.
                            (0, import_i18n26.__)("Hide on %s"),
                            label
                          ),
                          checked: viewportChecked[key] ?? false,
                          indeterminate: viewportChecked[key] === null,
                          onChange: (checked) => handleViewportCheckboxChange(
                            key,
                            checked
                          )
                        }
                      ),
                      /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
                        import_components24.Icon,
                        {
                          icon,
                          className: clsx_default({
                            "block-editor-block-visibility-modal__options-icon--checked": viewportChecked[key]
                          })
                        }
                      )
                    ]
                  },
                  key
                )
              ) })
            ] }) }),
            hasMultipleBlocks && hasIndeterminateValues && /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("p", { className: "block-editor-block-visibility-modal__description", children: (0, import_i18n26.__)(
              "Selected blocks have different visibility settings. The checkboxes show an indeterminate state when settings differ."
            ) }),
            !hasMultipleBlocks && hideEverywhere === true && /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("p", { className: "block-editor-block-visibility-modal__description", children: (0, import_i18n26.sprintf)(
              // translators: %s: The shortcut key to access the List View.
              (0, import_i18n26.__)(
                "Block will be hidden in the editor, and omitted from the published markup on the frontend. You can configure it again by selecting it in the List View (%s)."
              ),
              listViewShortcut
            ) }),
            !hasMultipleBlocks && !hideEverywhere && isAnyViewportChecked && /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("p", { className: "block-editor-block-visibility-modal__description", children: (0, import_element30.createInterpolateElement)(
              (0, import_i18n26.sprintf)(
                // translators: %s: The shortcut key to access the List View
                (0, import_i18n26.__)(
                  "Block will be hidden according to the selected viewports. It will be <strong>included in the published markup on the frontend</strong>. You can configure it again by selecting it in the List View (%s)."
                ),
                listViewShortcut
              ),
              {
                strong: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("strong", {})
              }
            ) })
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)(
            import_components24.Flex,
            {
              className: "block-editor-block-visibility-modal__actions",
              justify: "flex-end",
              expanded: false,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_components24.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
                  import_components24.Button,
                  {
                    variant: "tertiary",
                    onClick: onClose,
                    __next40pxDefaultSize: true,
                    children: (0, import_i18n26.__)("Cancel")
                  }
                ) }),
                /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_components24.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
                  import_components24.Button,
                  {
                    variant: "primary",
                    type: "submit",
                    disabled: !isDirty,
                    accessibleWhenDisabled: true,
                    __next40pxDefaultSize: true,
                    children: (0, import_i18n26.__)("Apply")
                  }
                ) })
              ]
            }
          )
        ] })
      }
    );
  }

  // packages/block-editor/build-module/components/block-visibility/use-block-visibility.mjs
  var import_compose15 = __toESM(require_compose(), 1);
  function useBlockVisibility(options = {}) {
    const {
      blockVisibility: blockVisibility2 = void 0,
      deviceType = BLOCK_VISIBILITY_VIEWPORTS.desktop.key,
      view = window
    } = options;
    const isLargerThanMobile = (0, import_compose15.useViewportMatch)("mobile", ">=", view);
    const isLargerThanTablet = (0, import_compose15.useViewportMatch)("medium", ">=", view);
    let currentViewport;
    if (deviceType === BLOCK_VISIBILITY_VIEWPORTS.mobile.key) {
      currentViewport = BLOCK_VISIBILITY_VIEWPORTS.mobile.key;
    } else if (deviceType === BLOCK_VISIBILITY_VIEWPORTS.tablet.key) {
      currentViewport = BLOCK_VISIBILITY_VIEWPORTS.tablet.key;
    } else if (!isLargerThanMobile) {
      currentViewport = BLOCK_VISIBILITY_VIEWPORTS.mobile.key;
    } else if (isLargerThanMobile && !isLargerThanTablet) {
      currentViewport = BLOCK_VISIBILITY_VIEWPORTS.tablet.key;
    } else {
      currentViewport = BLOCK_VISIBILITY_VIEWPORTS.desktop.key;
    }
    const isBlockCurrentlyHidden = blockVisibility2 === false || blockVisibility2?.viewport?.[currentViewport] === false;
    return { isBlockCurrentlyHidden, currentViewport };
  }

  // packages/block-editor/build-module/components/block-visibility/viewport-toolbar.mjs
  var import_i18n27 = __toESM(require_i18n(), 1);
  var import_components25 = __toESM(require_components(), 1);
  var import_element31 = __toESM(require_element(), 1);
  var import_blocks20 = __toESM(require_blocks(), 1);
  var import_data26 = __toESM(require_data(), 1);
  var import_jsx_runtime149 = __toESM(require_jsx_runtime(), 1);
  function BlockVisibilityViewportToolbar({ clientIds }) {
    const hasBlockVisibilityButtonShownRef = (0, import_element31.useRef)(false);
    const { canToggleBlockVisibility, areBlocksHiddenAnywhere } = (0, import_data26.useSelect)(
      (select3) => {
        const { getBlocksByClientId: getBlocksByClientId2, getBlockName: getBlockName2, isBlockHiddenAnywhere: isBlockHiddenAnywhere2 } = unlock(select3(store));
        const _blocks = getBlocksByClientId2(clientIds);
        return {
          canToggleBlockVisibility: _blocks.every(
            ({ clientId }) => (0, import_blocks20.hasBlockSupport)(
              getBlockName2(clientId),
              "visibility",
              true
            )
          ),
          areBlocksHiddenAnywhere: clientIds?.every(
            (clientId) => isBlockHiddenAnywhere2(clientId)
          )
        };
      },
      [clientIds]
    );
    const blockEditorDispatch = (0, import_data26.useDispatch)(store);
    (0, import_element31.useEffect)(() => {
      if (areBlocksHiddenAnywhere) {
        hasBlockVisibilityButtonShownRef.current = true;
      }
    }, [areBlocksHiddenAnywhere]);
    if (!areBlocksHiddenAnywhere && !hasBlockVisibilityButtonShownRef.current) {
      return null;
    }
    const { showViewportModal: showViewportModal2 } = unlock(blockEditorDispatch);
    return /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_components25.ToolbarGroup, { className: "block-editor-block-visibility-toolbar", children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
      import_components25.ToolbarButton,
      {
        disabled: !canToggleBlockVisibility,
        icon: areBlocksHiddenAnywhere ? unseen_default : seen_default,
        label: areBlocksHiddenAnywhere ? (0, import_i18n27.__)("Hidden") : (0, import_i18n27.__)("Visible"),
        onClick: () => showViewportModal2(clientIds),
        "aria-haspopup": "dialog"
      }
    ) });
  }

  // packages/block-editor/build-module/components/block-visibility/viewport-menu-item.mjs
  var import_i18n28 = __toESM(require_i18n(), 1);
  var import_components26 = __toESM(require_components(), 1);
  var import_data27 = __toESM(require_data(), 1);
  var import_keyboard_shortcuts2 = __toESM(require_keyboard_shortcuts(), 1);
  var import_jsx_runtime150 = __toESM(require_jsx_runtime(), 1);
  function BlockVisibilityViewportMenuItem({ clientIds }) {
    const { areBlocksHiddenAnywhere, shortcut } = (0, import_data27.useSelect)(
      (select3) => {
        const { isBlockHiddenAnywhere: isBlockHiddenAnywhere2 } = unlock(
          select3(store)
        );
        return {
          areBlocksHiddenAnywhere: clientIds?.every(
            (clientId) => isBlockHiddenAnywhere2(clientId)
          ),
          shortcut: select3(
            import_keyboard_shortcuts2.store
          ).getShortcutRepresentation(
            "core/block-editor/toggle-block-visibility"
          )
        };
      },
      [clientIds]
    );
    const { showViewportModal: showViewportModal2 } = unlock((0, import_data27.useDispatch)(store));
    return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
      import_components26.MenuItem,
      {
        onClick: () => showViewportModal2(clientIds),
        shortcut,
        children: areBlocksHiddenAnywhere ? (0, import_i18n28.__)("Show") : (0, import_i18n28.__)("Hide")
      }
    );
  }

  // packages/block-editor/build-module/components/block-visibility/viewport-visibility-info.mjs
  var import_components27 = __toESM(require_components(), 1);
  var import_data28 = __toESM(require_data(), 1);
  var import_i18n29 = __toESM(require_i18n(), 1);
  var import_jsx_runtime151 = __toESM(require_jsx_runtime(), 1);
  var { Badge } = unlock(import_components27.privateApis);
  var DEFAULT_VISIBILITY_STATE = {
    currentBlockVisibility: void 0,
    hasParentHiddenEverywhere: false,
    selectedDeviceType: BLOCK_VISIBILITY_VIEWPORTS.desktop.value
  };
  function ViewportVisibilityInfo({ clientId }) {
    const {
      currentBlockVisibility,
      selectedDeviceType,
      hasParentHiddenEverywhere
    } = (0, import_data28.useSelect)(
      (select3) => {
        if (!clientId) {
          return DEFAULT_VISIBILITY_STATE;
        }
        const {
          getBlockAttributes: getBlockAttributes3,
          isBlockParentHiddenEverywhere: isBlockParentHiddenEverywhere2,
          getSettings: getSettings7
        } = unlock(select3(store));
        return {
          currentBlockVisibility: getBlockAttributes3(clientId)?.metadata?.blockVisibility,
          selectedDeviceType: getSettings7()?.[deviceTypeKey]?.toLowerCase() || BLOCK_VISIBILITY_VIEWPORTS.desktop.value,
          hasParentHiddenEverywhere: isBlockParentHiddenEverywhere2(clientId)
        };
      },
      [clientId]
    );
    const blockElement = useBlockElement(clientId);
    const rawCanvasView = blockElement?.ownerDocument?.defaultView;
    const canvasView = rawCanvasView === null ? void 0 : rawCanvasView;
    const { isBlockCurrentlyHidden, currentViewport } = useBlockVisibility({
      blockVisibility: currentBlockVisibility,
      deviceType: selectedDeviceType,
      view: canvasView
    });
    const isBlockParentHiddenAtViewport2 = (0, import_data28.useSelect)(
      (select3) => {
        if (!clientId || !currentViewport) {
          return false;
        }
        return unlock(
          select3(store)
        ).isBlockParentHiddenAtViewport(clientId, currentViewport);
      },
      [clientId, currentViewport]
    );
    if (!(isBlockCurrentlyHidden || hasParentHiddenEverywhere || isBlockParentHiddenAtViewport2)) {
      return null;
    }
    let label;
    if (isBlockCurrentlyHidden) {
      if (currentBlockVisibility === false) {
        label = (0, import_i18n29.__)("Block is hidden");
      } else {
        const viewportLabel = BLOCK_VISIBILITY_VIEWPORTS[currentViewport]?.label || currentViewport;
        label = (0, import_i18n29.sprintf)(
          /* translators: %s: viewport name (Desktop, Tablet, Mobile) */
          (0, import_i18n29.__)("Block is hidden on %s"),
          viewportLabel
        );
      }
    }
    if (hasParentHiddenEverywhere) {
      label = (0, import_i18n29.__)("Parent block is hidden");
    } else if (isBlockParentHiddenAtViewport2) {
      const viewportLabel = BLOCK_VISIBILITY_VIEWPORTS[currentViewport]?.label || currentViewport;
      label = (0, import_i18n29.sprintf)(
        /* translators: %s: viewport name (Desktop, Tablet, Mobile) */
        (0, import_i18n29.__)("Parent block is hidden on %s"),
        viewportLabel
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(Badge, { className: "block-editor-block-visibility-info", children: /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(import_components27.__experimentalHStack, { spacing: 2, justify: "start", children: [
      /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(import_components27.Icon, { icon: unseen_default }),
      /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(import_components27.__experimentalText, { children: label })
    ] }) });
  }

  // packages/block-editor/build-module/components/block-list/use-block-props/index.mjs
  function useBlockProps(props = {}, { __unstableIsHtml } = {}) {
    const {
      clientId,
      className,
      wrapperProps = {},
      isAligned,
      index,
      mode: mode2,
      name,
      blockApiVersion,
      blockTitle,
      isSelected,
      isSubtreeDisabled,
      hasOverlay,
      initialPosition: initialPosition2,
      blockEditingMode,
      isHighlighted,
      isMultiSelected,
      isPartiallySelected,
      isReusable,
      isDragging: isDragging3,
      hasChildSelected,
      isEditingDisabled,
      hasEditableOutline,
      isEditingContentOnlySection,
      defaultClassName,
      isSectionBlock: isSectionBlock2,
      isWithinSectionBlock,
      canMove,
      blockVisibility: blockVisibility2,
      deviceType
    } = (0, import_element32.useContext)(PrivateBlockContext);
    const defaultViewRef = (0, import_compose16.useRefEffect)((element) => {
      if (element) {
        const { ownerDocument } = element;
        const { defaultView } = ownerDocument;
        defaultViewRef.current = defaultView;
      }
    }, []);
    const blockLabel = (0, import_i18n30.sprintf)((0, import_i18n30.__)("Block: %s"), blockTitle);
    const htmlSuffix = mode2 === "html" && !__unstableIsHtml ? "-visual" : "";
    const ffDragRef = useFirefoxDraggableCompatibility();
    const isHoverEnabled = !isWithinSectionBlock;
    const mergedRefs = (0, import_compose16.useMergeRefs)([
      props.ref,
      defaultViewRef,
      useFocusFirstElement({ clientId, initialPosition: initialPosition2 }),
      useBlockRefProvider(clientId),
      useFocusHandler(clientId),
      useEventHandlers({ clientId, isSelected }),
      useIsHovered({ isEnabled: isHoverEnabled }),
      useIntersectionObserver(),
      use_moving_animation_default({ triggerAnimationOnChange: index, clientId }),
      (0, import_compose16.useDisabled)({ isDisabled: !hasOverlay }),
      useFlashEditableBlocks({
        clientId,
        isEnabled: isSectionBlock2
      }),
      useScrollIntoView({ isSelected }),
      canMove ? ffDragRef : void 0
    ]);
    const blockEditContext = useBlockEditContext();
    const hasBlockBindings = !!blockEditContext[blockBindingsKey];
    const bindingsStyle = hasBlockBindings ? {
      "--wp-admin-theme-color": "var(--wp-block-synced-color)",
      "--wp-admin-theme-color--rgb": "var(--wp-block-synced-color--rgb)"
    } : {};
    const { isBlockCurrentlyHidden } = useBlockVisibility({
      blockVisibility: blockVisibility2,
      deviceType,
      view: defaultViewRef.current
    });
    if (blockApiVersion < 2 && clientId === blockEditContext.clientId) {
      (0, import_warning4.default)(
        `Block type "${name}" must support API version 2 or higher to work correctly with "useBlockProps" method.`
      );
    }
    let hasNegativeMargin = false;
    if (wrapperProps?.style?.marginTop?.charAt(0) === "-" || wrapperProps?.style?.marginBottom?.charAt(0) === "-" || wrapperProps?.style?.marginLeft?.charAt(0) === "-" || wrapperProps?.style?.marginRight?.charAt(0) === "-") {
      hasNegativeMargin = true;
    }
    return {
      tabIndex: blockEditingMode === "disabled" ? -1 : 0,
      draggable: canMove && !hasChildSelected ? true : void 0,
      ...wrapperProps,
      ...props,
      ref: mergedRefs,
      id: `block-${clientId}${htmlSuffix}`,
      role: "document",
      "aria-label": blockLabel,
      "data-block": clientId,
      "data-type": name,
      "data-title": blockTitle,
      inert: isSubtreeDisabled ? "true" : void 0,
      className: clsx_default(
        "block-editor-block-list__block",
        {
          // The wp-block className is important for editor styles.
          "wp-block": !isAligned,
          "has-block-overlay": hasOverlay,
          "is-selected": isSelected,
          "is-highlighted": isHighlighted,
          "is-multi-selected": isMultiSelected,
          "is-partially-selected": isPartiallySelected,
          "is-reusable": isReusable,
          "is-dragging": isDragging3,
          "has-child-selected": hasChildSelected,
          "is-editing-disabled": isEditingDisabled,
          "has-editable-outline": hasEditableOutline,
          "has-negative-margin": hasNegativeMargin,
          "is-editing-content-only-section": isEditingContentOnlySection,
          "is-block-hidden": isBlockCurrentlyHidden
        },
        className,
        props.className,
        wrapperProps.className,
        defaultClassName
      ),
      style: { ...wrapperProps.style, ...props.style, ...bindingsStyle }
    };
  }
  useBlockProps.save = import_blocks21.__unstableGetBlockProps;

  // packages/block-editor/build-module/components/block-list/block.mjs
  var import_jsx_runtime152 = __toESM(require_jsx_runtime(), 1);
  function mergeWrapperProps(propsA, propsB) {
    const newProps = {
      ...propsA,
      ...propsB
    };
    if (propsA?.hasOwnProperty("className") && propsB?.hasOwnProperty("className")) {
      newProps.className = clsx_default(propsA.className, propsB.className);
    }
    if (propsA?.hasOwnProperty("style") && propsB?.hasOwnProperty("style")) {
      newProps.style = { ...propsA.style, ...propsB.style };
    }
    return newProps;
  }
  function Block({ children, isHtml, ...props }) {
    return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("div", { ...useBlockProps(props, { __unstableIsHtml: isHtml }), children });
  }
  function BlockListBlock({
    block: { __unstableBlockSource },
    mode: mode2,
    isLocked,
    canRemove,
    clientId,
    isSelected,
    isSelectionEnabled: isSelectionEnabled3,
    className,
    __unstableLayoutClassNames: layoutClassNames,
    name,
    isValid: isValid2,
    attributes,
    wrapperProps,
    setAttributes,
    onReplace,
    onRemove,
    onInsertBlocksAfter,
    onMerge,
    toggleSelection: toggleSelection2
  }) {
    const {
      mayDisplayControls,
      mayDisplayParentControls,
      isSelectionWithinCurrentSection,
      themeSupportsLayout,
      ...context
    } = (0, import_element33.useContext)(PrivateBlockContext);
    const parentLayout = useLayout() || {};
    let blockEdit = /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
      BlockEdit,
      {
        name,
        isSelected,
        attributes,
        setAttributes,
        insertBlocksAfter: isLocked ? void 0 : onInsertBlocksAfter,
        onReplace: canRemove ? onReplace : void 0,
        onRemove: canRemove ? onRemove : void 0,
        mergeBlocks: canRemove ? onMerge : void 0,
        clientId,
        isSelectionEnabled: isSelectionEnabled3,
        toggleSelection: toggleSelection2,
        __unstableLayoutClassNames: layoutClassNames,
        __unstableParentLayout: Object.keys(parentLayout).length ? parentLayout : void 0,
        mayDisplayControls,
        mayDisplayParentControls,
        mayDisplayPatternEditingControls: isSelectionWithinCurrentSection,
        blockEditingMode: context.blockEditingMode,
        isPreviewMode: context.isPreviewMode
      }
    );
    const blockType = (0, import_blocks22.getBlockType)(name);
    if (blockType?.getEditWrapperProps) {
      wrapperProps = mergeWrapperProps(
        wrapperProps,
        blockType.getEditWrapperProps(attributes)
      );
    }
    const isAligned = wrapperProps && !!wrapperProps["data-align"] && !themeSupportsLayout;
    const isSticky = className?.includes("is-position-sticky");
    if (isAligned) {
      blockEdit = /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
        "div",
        {
          className: clsx_default("wp-block", isSticky && className),
          "data-align": wrapperProps["data-align"],
          children: blockEdit
        }
      );
    }
    let block;
    if (!isValid2) {
      const saveContent = __unstableBlockSource ? (0, import_blocks22.serializeRawBlock)(__unstableBlockSource) : (0, import_blocks22.getSaveContent)(blockType, attributes);
      block = /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(Block, { className: "has-warning", children: [
        /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(BlockInvalidWarning, { clientId }),
        /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(import_element33.RawHTML, { children: (0, import_dom7.safeHTML)(saveContent) })
      ] });
    } else if (mode2 === "html") {
      block = /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(import_jsx_runtime152.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("div", { style: { display: "none" }, children: blockEdit }),
        /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(Block, { isHtml: true, children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(block_html_default, { clientId }) })
      ] });
    } else if (blockType?.apiVersion > 1) {
      block = blockEdit;
    } else {
      block = /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(Block, { children: blockEdit });
    }
    const { "data-align": dataAlign, ...restWrapperProps } = wrapperProps ?? {};
    const updatedWrapperProps = {
      ...restWrapperProps,
      className: clsx_default(
        restWrapperProps.className,
        dataAlign && themeSupportsLayout && `align${dataAlign}`,
        !(dataAlign && isSticky) && className
      )
    };
    return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
      PrivateBlockContext.Provider,
      {
        value: {
          wrapperProps: updatedWrapperProps,
          isAligned,
          isSelectionWithinCurrentSection,
          ...context
        },
        children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
          block_crash_boundary_default,
          {
            fallback: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(Block, { className: "has-warning", children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(block_crash_warning_default, {}) }),
            children: block
          }
        )
      }
    );
  }
  var applyWithDispatch = (0, import_data29.withDispatch)((dispatch, ownProps, registry) => {
    const {
      updateBlockAttributes: updateBlockAttributes2,
      insertBlocks: insertBlocks2,
      mergeBlocks: mergeBlocks2,
      replaceBlocks: replaceBlocks2,
      toggleSelection: toggleSelection2,
      __unstableMarkLastChangeAsPersistent: __unstableMarkLastChangeAsPersistent2,
      moveBlocksToPosition: moveBlocksToPosition2,
      removeBlock: removeBlock2,
      selectBlock: selectBlock2
    } = dispatch(store);
    return {
      setAttributes(nextAttributes) {
        const { getMultiSelectedBlockClientIds: getMultiSelectedBlockClientIds2 } = registry.select(store);
        const multiSelectedBlockClientIds = getMultiSelectedBlockClientIds2();
        const { clientId, attributes } = ownProps;
        const clientIds = multiSelectedBlockClientIds.length ? multiSelectedBlockClientIds : [clientId];
        const newAttributes = typeof nextAttributes === "function" ? nextAttributes(attributes) : nextAttributes;
        updateBlockAttributes2(clientIds, newAttributes);
      },
      onInsertBlocks(blocks2, index) {
        const { rootClientId } = ownProps;
        insertBlocks2(blocks2, index, rootClientId);
      },
      onInsertBlocksAfter(blocks2) {
        const { clientId, rootClientId } = ownProps;
        const { getBlockIndex: getBlockIndex2 } = registry.select(store);
        const index = getBlockIndex2(clientId);
        insertBlocks2(blocks2, index + 1, rootClientId);
      },
      onMerge(forward) {
        const { clientId, rootClientId } = ownProps;
        const {
          getPreviousBlockClientId: getPreviousBlockClientId2,
          getNextBlockClientId: getNextBlockClientId2,
          getBlock: getBlock2,
          getBlockAttributes: getBlockAttributes3,
          getBlockName: getBlockName2,
          getBlockOrder: getBlockOrder2,
          getBlockIndex: getBlockIndex2,
          getBlockRootClientId: getBlockRootClientId2,
          canInsertBlockType: canInsertBlockType2
        } = registry.select(store);
        function switchToDefaultOrRemove() {
          const block = getBlock2(clientId);
          const defaultBlockName = (0, import_blocks22.getDefaultBlockName)();
          const defaultBlockType = (0, import_blocks22.getBlockType)(defaultBlockName);
          if (getBlockName2(clientId) !== defaultBlockName) {
            const replacement = (0, import_blocks22.switchToBlockType)(
              block,
              defaultBlockName
            );
            if (replacement && replacement.length) {
              replaceBlocks2(clientId, replacement);
            }
          } else if ((0, import_blocks22.isUnmodifiedDefaultBlock)(block)) {
            const nextBlockClientId = getNextBlockClientId2(clientId);
            if (nextBlockClientId) {
              registry.batch(() => {
                removeBlock2(clientId);
                selectBlock2(nextBlockClientId);
              });
            }
          } else if (defaultBlockType.merge) {
            const attributes = defaultBlockType.merge(
              {},
              block.attributes
            );
            replaceBlocks2(
              [clientId],
              [(0, import_blocks22.createBlock)(defaultBlockName, attributes)]
            );
          }
        }
        function moveFirstItemUp(_clientId, changeSelection = true) {
          const wrapperBlockName = getBlockName2(_clientId);
          const wrapperBlockType = (0, import_blocks22.getBlockType)(wrapperBlockName);
          const isTextualWrapper = wrapperBlockType.category === "text";
          const targetRootClientId = getBlockRootClientId2(_clientId);
          const blockOrder = getBlockOrder2(_clientId);
          const [firstClientId] = blockOrder;
          if (blockOrder.length === 1 && (0, import_blocks22.isUnmodifiedBlock)(getBlock2(firstClientId))) {
            removeBlock2(_clientId);
          } else if (isTextualWrapper) {
            registry.batch(() => {
              if (canInsertBlockType2(
                getBlockName2(firstClientId),
                targetRootClientId
              )) {
                moveBlocksToPosition2(
                  [firstClientId],
                  _clientId,
                  targetRootClientId,
                  getBlockIndex2(_clientId)
                );
              } else {
                const replacement = (0, import_blocks22.switchToBlockType)(
                  getBlock2(firstClientId),
                  (0, import_blocks22.getDefaultBlockName)()
                );
                if (replacement && replacement.length && replacement.every(
                  (block) => canInsertBlockType2(
                    block.name,
                    targetRootClientId
                  )
                )) {
                  insertBlocks2(
                    replacement,
                    getBlockIndex2(_clientId),
                    targetRootClientId,
                    changeSelection
                  );
                  removeBlock2(firstClientId, false);
                } else {
                  switchToDefaultOrRemove();
                }
              }
              if (!getBlockOrder2(_clientId).length && (0, import_blocks22.isUnmodifiedBlock)(getBlock2(_clientId))) {
                removeBlock2(_clientId, false);
              }
            });
          } else {
            switchToDefaultOrRemove();
          }
        }
        if (forward) {
          if (rootClientId) {
            const nextRootClientId = getNextBlockClientId2(rootClientId);
            if (nextRootClientId) {
              if (getBlockName2(rootClientId) === getBlockName2(nextRootClientId)) {
                const rootAttributes = getBlockAttributes3(rootClientId);
                const previousRootAttributes = getBlockAttributes3(nextRootClientId);
                if (Object.keys(rootAttributes).every(
                  (key) => rootAttributes[key] === previousRootAttributes[key]
                )) {
                  registry.batch(() => {
                    moveBlocksToPosition2(
                      getBlockOrder2(nextRootClientId),
                      nextRootClientId,
                      rootClientId
                    );
                    removeBlock2(nextRootClientId, false);
                  });
                  return;
                }
              } else {
                mergeBlocks2(rootClientId, nextRootClientId);
                return;
              }
            }
          }
          const nextBlockClientId = getNextBlockClientId2(clientId);
          if (!nextBlockClientId) {
            return;
          }
          if (getBlockOrder2(nextBlockClientId).length) {
            moveFirstItemUp(nextBlockClientId, false);
          } else {
            mergeBlocks2(clientId, nextBlockClientId);
          }
        } else {
          const previousBlockClientId = getPreviousBlockClientId2(clientId);
          if (previousBlockClientId) {
            mergeBlocks2(previousBlockClientId, clientId);
          } else if (rootClientId) {
            const previousRootClientId = getPreviousBlockClientId2(rootClientId);
            if (previousRootClientId && getBlockName2(rootClientId) === getBlockName2(previousRootClientId)) {
              const rootAttributes = getBlockAttributes3(rootClientId);
              const previousRootAttributes = getBlockAttributes3(previousRootClientId);
              if (Object.keys(rootAttributes).every(
                (key) => rootAttributes[key] === previousRootAttributes[key]
              )) {
                registry.batch(() => {
                  moveBlocksToPosition2(
                    getBlockOrder2(rootClientId),
                    rootClientId,
                    previousRootClientId
                  );
                  removeBlock2(rootClientId, false);
                });
                return;
              }
            }
            moveFirstItemUp(rootClientId);
          } else {
            switchToDefaultOrRemove();
          }
        }
      },
      onReplace(blocks2, indexToSelect, initialPosition2) {
        if (blocks2.length && !(0, import_blocks22.isUnmodifiedDefaultBlock)(blocks2[blocks2.length - 1])) {
          __unstableMarkLastChangeAsPersistent2();
        }
        const replacementBlocks = blocks2?.length === 1 && Array.isArray(blocks2[0]) ? blocks2[0] : blocks2;
        replaceBlocks2(
          [ownProps.clientId],
          replacementBlocks,
          indexToSelect,
          initialPosition2
        );
      },
      onRemove() {
        removeBlock2(ownProps.clientId);
      },
      toggleSelection(selectionEnabled) {
        toggleSelection2(selectionEnabled);
      }
    };
  });
  BlockListBlock = (0, import_compose17.compose)(
    applyWithDispatch,
    (0, import_components28.withFilters)("editor.BlockListBlock")
  )(BlockListBlock);
  function BlockListBlockProvider(props) {
    const { clientId, rootClientId } = props;
    const selectedProps = (0, import_data29.useSelect)(
      (select3) => {
        const {
          isBlockSelected: isBlockSelected2,
          getBlockMode: getBlockMode2,
          isSelectionEnabled: isSelectionEnabled22,
          getTemplateLock: getTemplateLock2,
          isSectionBlock: _isSectionBlock,
          getParentSectionBlock: getParentSectionBlock2,
          getBlockWithoutAttributes: getBlockWithoutAttributes2,
          getBlockAttributes: getBlockAttributes3,
          canRemoveBlock: canRemoveBlock2,
          canMoveBlock: canMoveBlock2,
          getSettings: getSettings7,
          getEditedContentOnlySection: getEditedContentOnlySection2,
          getBlockEditingMode: getBlockEditingMode2,
          getBlockName: getBlockName2,
          isFirstMultiSelectedBlock: isFirstMultiSelectedBlock2,
          getMultiSelectedBlockClientIds: getMultiSelectedBlockClientIds2,
          hasSelectedInnerBlock: hasSelectedInnerBlock2,
          getBlocksByName: getBlocksByName2,
          getBlockIndex: getBlockIndex2,
          isBlockMultiSelected: isBlockMultiSelected2,
          isBlockSubtreeDisabled: isBlockSubtreeDisabled2,
          isBlockHighlighted: isBlockHighlighted2,
          __unstableIsFullySelected: __unstableIsFullySelected2,
          __unstableSelectionHasUnmergeableBlock: __unstableSelectionHasUnmergeableBlock2,
          isBlockBeingDragged: isBlockBeingDragged2,
          isDragging: isDragging22,
          __unstableHasActiveBlockOverlayActive: __unstableHasActiveBlockOverlayActive2,
          getSelectedBlocksInitialCaretPosition: getSelectedBlocksInitialCaretPosition2
        } = unlock(select3(store));
        const blockWithoutAttributes = getBlockWithoutAttributes2(clientId);
        if (!blockWithoutAttributes) {
          return;
        }
        const {
          hasBlockSupport: _hasBlockSupport,
          getActiveBlockVariation
        } = select3(import_blocks22.store);
        const attributes2 = getBlockAttributes3(clientId);
        const { name: blockName, isValid: isValid22 } = blockWithoutAttributes;
        const blockType2 = (0, import_blocks22.getBlockType)(blockName);
        const settings2 = getSettings7();
        const {
          supportsLayout,
          isPreviewMode: isPreviewMode2,
          __experimentalBlockBindingsSupportedAttributes
        } = settings2;
        const bindableAttributes2 = __experimentalBlockBindingsSupportedAttributes?.[blockName];
        const blockVisibility22 = attributes2?.metadata?.blockVisibility;
        const deviceType2 = settings2?.[deviceTypeKey]?.toLowerCase() || "desktop";
        const hasLightBlockWrapper = blockType2?.apiVersion > 1;
        const isMultiSelected2 = isBlockMultiSelected2(clientId);
        const blockEditingMode2 = getBlockEditingMode2(clientId);
        const previewContext = {
          isPreviewMode: isPreviewMode2,
          blockWithoutAttributes,
          name: blockName,
          attributes: attributes2,
          isValid: isValid22,
          themeSupportsLayout: supportsLayout,
          index: getBlockIndex2(clientId),
          isReusable: (0, import_blocks22.isReusableBlock)(blockType2),
          className: hasLightBlockWrapper ? attributes2.className : void 0,
          defaultClassName: hasLightBlockWrapper ? (0, import_blocks22.getBlockDefaultClassName)(blockName) : void 0,
          blockTitle: blockType2?.title,
          bindableAttributes: bindableAttributes2,
          blockVisibility: blockVisibility22,
          deviceType: deviceType2,
          isMultiSelected: isMultiSelected2,
          blockEditingMode: blockEditingMode2,
          isEditingDisabled: blockEditingMode2 === "disabled"
        };
        if (isPreviewMode2) {
          return previewContext;
        }
        const _isSelected = isBlockSelected2(clientId);
        const canRemove2 = canRemoveBlock2(clientId);
        const canMove2 = canMoveBlock2(clientId);
        const match2 = getActiveBlockVariation(blockName, attributes2);
        const checkDeep = true;
        const isAncestorOfSelectedBlock = hasSelectedInnerBlock2(
          clientId,
          checkDeep
        );
        const sectionBlockClientId = _isSectionBlock(clientId) ? clientId : getParentSectionBlock2(clientId);
        const multiple = (0, import_blocks22.hasBlockSupport)(blockName, "multiple", true);
        const blocksWithSameName = multiple ? [] : getBlocksByName2(blockName);
        const isInvalid = blocksWithSameName.length && blocksWithSameName[0] !== clientId;
        return {
          ...previewContext,
          mode: getBlockMode2(clientId),
          isSelectionEnabled: isSelectionEnabled22(),
          isLocked: !!getTemplateLock2(rootClientId),
          isSectionBlock: _isSectionBlock(clientId),
          isWithinSectionBlock: !!sectionBlockClientId,
          isSelectionWithinCurrentSection: isBlockSelected2(sectionBlockClientId) || hasSelectedInnerBlock2(sectionBlockClientId, checkDeep),
          blockType: blockType2,
          canRemove: canRemove2,
          canMove: canMove2,
          isSelected: _isSelected,
          isEditingContentOnlySection: getEditedContentOnlySection2() === clientId,
          blockEditingMode: blockEditingMode2,
          mayDisplayControls: _isSelected || isFirstMultiSelectedBlock2(clientId) && getMultiSelectedBlockClientIds2().every(
            (id) => getBlockName2(id) === blockName
          ),
          mayDisplayParentControls: _hasBlockSupport(
            getBlockName2(clientId),
            "__experimentalExposeControlsToChildren",
            false
          ) && hasSelectedInnerBlock2(clientId),
          blockApiVersion: blockType2?.apiVersion || 1,
          blockTitle: match2?.title || blockType2?.title,
          isSubtreeDisabled: blockEditingMode2 === "disabled" && isBlockSubtreeDisabled2(clientId),
          hasOverlay: __unstableHasActiveBlockOverlayActive2(clientId) && !isDragging22(),
          initialPosition: _isSelected ? getSelectedBlocksInitialCaretPosition2() : void 0,
          isHighlighted: isBlockHighlighted2(clientId),
          isMultiSelected: isMultiSelected2,
          isPartiallySelected: isMultiSelected2 && !__unstableIsFullySelected2() && !__unstableSelectionHasUnmergeableBlock2(),
          isDragging: isBlockBeingDragged2(clientId),
          hasChildSelected: isAncestorOfSelectedBlock,
          isEditingDisabled: blockEditingMode2 === "disabled",
          hasEditableOutline: blockEditingMode2 !== "disabled" && getBlockEditingMode2(rootClientId) === "disabled",
          originalBlockClientId: isInvalid ? blocksWithSameName[0] : false,
          blockVisibility: blockVisibility22,
          deviceType: deviceType2
        };
      },
      [clientId, rootClientId]
    );
    const defaultViewRef = (0, import_compose17.useRefEffect)((element) => {
      if (element) {
        const { ownerDocument } = element;
        const { defaultView } = ownerDocument;
        defaultViewRef.current = defaultView;
      }
    }, []);
    const { isBlockCurrentlyHidden } = useBlockVisibility({
      blockVisibility: selectedProps?.blockVisibility,
      deviceType: selectedProps?.deviceType,
      view: defaultViewRef.current
    });
    const block = (0, import_element33.useMemo)(
      () => ({
        ...selectedProps?.blockWithoutAttributes,
        attributes: selectedProps?.attributes
      }),
      [selectedProps?.blockWithoutAttributes, selectedProps?.attributes]
    );
    if (!selectedProps) {
      return null;
    }
    const {
      isPreviewMode,
      // Fill values that end up as a public API and may not be defined in
      // preview mode.
      mode: mode2 = "visual",
      isSelectionEnabled: isSelectionEnabled3 = false,
      isLocked = false,
      canRemove = false,
      canMove = false,
      name,
      attributes,
      isValid: isValid2,
      isSelected = false,
      themeSupportsLayout,
      isEditingContentOnlySection,
      blockEditingMode,
      mayDisplayControls,
      mayDisplayParentControls,
      index,
      blockApiVersion,
      blockType,
      blockTitle,
      isSubtreeDisabled,
      hasOverlay,
      initialPosition: initialPosition2,
      isHighlighted,
      isMultiSelected,
      isPartiallySelected,
      isReusable,
      isDragging: isDragging3,
      hasChildSelected,
      isSectionBlock: isSectionBlock2,
      isWithinSectionBlock,
      isSelectionWithinCurrentSection,
      isEditingDisabled,
      hasEditableOutline,
      className,
      defaultClassName,
      originalBlockClientId,
      bindableAttributes,
      blockVisibility: blockVisibility2,
      deviceType
    } = selectedProps;
    const privateContext = {
      isPreviewMode,
      clientId,
      className,
      index,
      mode: mode2,
      name,
      blockApiVersion,
      blockType,
      blockTitle,
      isSelected,
      isSubtreeDisabled,
      hasOverlay,
      initialPosition: initialPosition2,
      blockEditingMode,
      isHighlighted,
      isMultiSelected,
      isPartiallySelected,
      isReusable,
      isDragging: isDragging3,
      hasChildSelected,
      isSectionBlock: isSectionBlock2,
      isWithinSectionBlock,
      isSelectionWithinCurrentSection,
      isEditingDisabled,
      hasEditableOutline,
      isEditingContentOnlySection,
      defaultClassName,
      mayDisplayControls,
      mayDisplayParentControls,
      originalBlockClientId,
      themeSupportsLayout,
      canMove,
      isBlockCurrentlyHidden,
      bindableAttributes,
      blockVisibility: blockVisibility2,
      deviceType
    };
    if (isBlockCurrentlyHidden && !isSelected && !isMultiSelected && !hasChildSelected) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(PrivateBlockContext.Provider, { value: privateContext, children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
      BlockListBlock,
      {
        ...props,
        ...{
          mode: mode2,
          isSelectionEnabled: isSelectionEnabled3,
          isLocked,
          canRemove,
          canMove,
          // Users of the editor.BlockListBlock filter used to be able
          // to access the block prop. Ideally these blocks would rely
          // on the clientId prop only. This is kept for backward
          // compatibility reasons.
          block,
          name,
          attributes,
          isValid: isValid2,
          isSelected
        }
      }
    ) });
  }
  var block_default2 = (0, import_element33.memo)(BlockListBlockProvider);

  // packages/block-editor/build-module/components/block-list-appender/index.mjs
  var import_data63 = __toESM(require_data(), 1);
  var import_blocks39 = __toESM(require_blocks(), 1);

  // packages/block-editor/build-module/components/default-block-appender/index.mjs
  var import_i18n62 = __toESM(require_i18n(), 1);
  var import_html_entities2 = __toESM(require_html_entities(), 1);
  var import_data62 = __toESM(require_data(), 1);
  var import_keycodes8 = __toESM(require_keycodes(), 1);

  // packages/block-editor/build-module/components/inserter/index.mjs
  var import_a11y10 = __toESM(require_a11y(), 1);
  var import_i18n61 = __toESM(require_i18n(), 1);
  var import_components62 = __toESM(require_components(), 1);
  var import_element77 = __toESM(require_element(), 1);
  var import_data61 = __toESM(require_data(), 1);
  var import_compose45 = __toESM(require_compose(), 1);
  var import_blocks38 = __toESM(require_blocks(), 1);

  // packages/block-editor/build-module/components/inserter/menu.mjs
  var import_element75 = __toESM(require_element(), 1);
  var import_components60 = __toESM(require_components(), 1);
  var import_i18n59 = __toESM(require_i18n(), 1);
  var import_compose44 = __toESM(require_compose(), 1);
  var import_data59 = __toESM(require_data(), 1);

  // packages/block-editor/build-module/components/inserter/tips.mjs
  var import_i18n31 = __toESM(require_i18n(), 1);
  var import_element34 = __toESM(require_element(), 1);
  var import_components29 = __toESM(require_components(), 1);
  var import_jsx_runtime153 = __toESM(require_jsx_runtime(), 1);
  var globalTips = [
    (0, import_element34.createInterpolateElement)(
      (0, import_i18n31.__)(
        "While writing, you can press <kbd>/</kbd> to quickly insert new blocks."
      ),
      { kbd: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("kbd", {}) }
    ),
    (0, import_element34.createInterpolateElement)(
      (0, import_i18n31.__)(
        "Indent a list by pressing <kbd>space</kbd> at the beginning of a line."
      ),
      { kbd: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("kbd", {}) }
    ),
    (0, import_element34.createInterpolateElement)(
      (0, import_i18n31.__)(
        "Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."
      ),
      { kbd: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("kbd", {}) }
    ),
    (0, import_i18n31.__)("Drag files into the editor to automatically insert media blocks."),
    (0, import_i18n31.__)("Change a block's type by pressing the block icon on the toolbar.")
  ];
  function Tips() {
    const [randomIndex] = (0, import_element34.useState)(
      Math.floor(Math.random() * globalTips.length)
    );
    return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(import_components29.Tip, { children: globalTips[randomIndex] });
  }
  var tips_default = Tips;

  // packages/block-editor/build-module/components/inserter/preview-panel.mjs
  var import_blocks29 = __toESM(require_blocks(), 1);
  var import_element50 = __toESM(require_element(), 1);
  var import_i18n37 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/components/block-card/index.mjs
  var import_components30 = __toESM(require_components(), 1);
  var import_data30 = __toESM(require_data(), 1);
  var import_deprecated6 = __toESM(require_deprecated(), 1);
  var import_i18n32 = __toESM(require_i18n(), 1);
  var import_blocks23 = __toESM(require_blocks(), 1);
  var import_jsx_runtime154 = __toESM(require_jsx_runtime(), 1);
  var { Badge: Badge2 } = unlock(import_components30.privateApis);
  function OptionalParentSelectButton({ children, onClick }) {
    if (!onClick) {
      return children;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
      import_components30.Button,
      {
        __next40pxDefaultSize: true,
        className: "block-editor-block-card__parent-select-button",
        onClick,
        children
      }
    );
  }
  function BlockCard({
    title,
    icon,
    description,
    blockType,
    className,
    name,
    allowParentNavigation,
    parentClientId,
    isChild,
    children,
    clientId
  }) {
    if (blockType) {
      (0, import_deprecated6.default)("`blockType` property in `BlockCard component`", {
        since: "5.7",
        alternative: "`title, icon and description` properties"
      });
      ({ title, icon, description } = blockType);
    }
    const { parentBlockClientId, parentBlockName } = (0, import_data30.useSelect)(
      (select3) => {
        if (parentClientId || isChild || !allowParentNavigation) {
          return {};
        }
        const { getBlockParents: getBlockParents2, getBlockName: getBlockName2 } = select3(store);
        const parents = getBlockParents2(clientId, false);
        const foundParentId = parents.find((parentId) => {
          const parentName = getBlockName2(parentId);
          return parentName === "core/navigation" || (0, import_blocks23.hasBlockSupport)(parentName, "listView");
        });
        return {
          parentBlockClientId: foundParentId,
          parentBlockName: foundParentId ? getBlockName2(foundParentId) : null
        };
      },
      [clientId, allowParentNavigation, isChild, parentClientId]
    );
    const { selectBlock: selectBlock2 } = (0, import_data30.useDispatch)(store);
    const TitleElement = parentClientId ? "div" : "h2";
    return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
      "div",
      {
        className: clsx_default(
          "block-editor-block-card",
          {
            "is-parent": parentClientId,
            "is-child": isChild
          },
          className
        ),
        children: /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(import_components30.__experimentalVStack, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(import_components30.__experimentalHStack, { justify: "flex-start", spacing: 0, children: [
            parentBlockClientId && /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
              import_components30.Button,
              {
                onClick: () => selectBlock2(parentBlockClientId),
                label: parentBlockName ? (0, import_i18n32.sprintf)(
                  /* translators: %s: The name of the parent block. */
                  (0, import_i18n32.__)('Go to "%s" block'),
                  (0, import_blocks23.getBlockType)(parentBlockName)?.title
                ) : (0, import_i18n32.__)("Go to parent block"),
                style: (
                  // TODO: This style override is also used in ToolsPanelHeader.
                  // It should be supported out-of-the-box by Button.
                  { minWidth: 24, padding: 0 }
                ),
                icon: (0, import_i18n32.isRTL)() ? chevron_right_default : chevron_left_default,
                size: "small"
              }
            ),
            isChild && /* @__PURE__ */ (0, import_jsx_runtime154.jsx)("span", { className: "block-editor-block-card__child-indicator-icon", children: /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(import_components30.Icon, { icon: (0, import_i18n32.isRTL)() ? arrow_left_default : arrow_right_default }) }),
            /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(
              OptionalParentSelectButton,
              {
                onClick: parentClientId ? () => {
                  selectBlock2(parentClientId);
                } : void 0,
                children: [
                  /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(block_icon_default, { icon, showColors: true }),
                  /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(import_components30.__experimentalVStack, { spacing: 1, children: [
                    /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(TitleElement, { className: "block-editor-block-card__title", children: [
                      /* @__PURE__ */ (0, import_jsx_runtime154.jsx)("span", { className: "block-editor-block-card__name", children: !!name?.length ? name : title }),
                      !parentClientId && !isChild && !!name?.length && /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(Badge2, { children: title })
                    ] }),
                    children
                  ] })
                ]
              }
            )
          ] }),
          !parentClientId && !isChild && description && /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(import_components30.__experimentalText, { className: "block-editor-block-card__description", children: description })
        ] })
      }
    );
  }
  var block_card_default = BlockCard;

  // packages/block-editor/build-module/components/block-preview/index.mjs
  var import_compose33 = __toESM(require_compose(), 1);
  var import_data50 = __toESM(require_data(), 1);
  var import_element49 = __toESM(require_element(), 1);
  var import_deprecated7 = __toESM(require_deprecated(), 1);

  // packages/block-editor/build-module/components/provider/index.mjs
  var import_data34 = __toESM(require_data(), 1);
  var import_element40 = __toESM(require_element(), 1);
  var import_components31 = __toESM(require_components(), 1);
  var import_upload_media = __toESM(require_upload_media(), 1);

  // packages/block-editor/build-module/components/provider/with-registry-provider.mjs
  var import_element35 = __toESM(require_element(), 1);
  var import_data31 = __toESM(require_data(), 1);
  var import_compose18 = __toESM(require_compose(), 1);
  var import_jsx_runtime155 = __toESM(require_jsx_runtime(), 1);
  function getSubRegistry(subRegistries, registry, useSubRegistry) {
    if (!useSubRegistry) {
      return registry;
    }
    let subRegistry = subRegistries.get(registry);
    if (!subRegistry) {
      subRegistry = (0, import_data31.createRegistry)({}, registry);
      subRegistry.registerStore(STORE_NAME, storeConfig);
      subRegistries.set(registry, subRegistry);
    }
    return subRegistry;
  }
  var withRegistryProvider = (0, import_compose18.createHigherOrderComponent)(
    (WrappedComponent) => function WithRegistryProvider({ useSubRegistry = true, ...props }) {
      const registry = (0, import_data31.useRegistry)();
      const [subRegistries] = (0, import_element35.useState)(() => /* @__PURE__ */ new WeakMap());
      const subRegistry = getSubRegistry(
        subRegistries,
        registry,
        useSubRegistry
      );
      if (subRegistry === registry) {
        return /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(WrappedComponent, { registry, ...props });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(import_data31.RegistryProvider, { value: subRegistry, children: /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(WrappedComponent, { registry: subRegistry, ...props }) });
    },
    "withRegistryProvider"
  );
  var with_registry_provider_default = withRegistryProvider;

  // packages/block-editor/build-module/components/provider/use-block-sync.mjs
  var import_element37 = __toESM(require_element(), 1);
  var import_data32 = __toESM(require_data(), 1);
  var import_blocks24 = __toESM(require_blocks(), 1);

  // packages/block-editor/build-module/components/provider/selection-context.mjs
  var import_element36 = __toESM(require_element(), 1);
  var noop4 = () => {
  };
  var SelectionContext = (0, import_element36.createContext)({
    getSelection: () => void 0,
    onChangeSelection: noop4
  });

  // packages/block-editor/build-module/components/provider/use-block-sync.mjs
  var noop5 = () => {
  };
  function cloneBlockWithMapping(block, mapping) {
    const clonedBlock = (0, import_blocks24.cloneBlock)(block);
    mapping.externalToInternal.set(block.clientId, clonedBlock.clientId);
    mapping.internalToExternal.set(clonedBlock.clientId, block.clientId);
    if (block.innerBlocks?.length) {
      clonedBlock.innerBlocks = block.innerBlocks.map((innerBlock) => {
        const clonedInner = cloneBlockWithMapping(innerBlock, mapping);
        return clonedInner;
      });
    }
    return clonedBlock;
  }
  function restoreExternalIds(blocks2, mapping) {
    return blocks2.map((block) => {
      const externalId = mapping.internalToExternal.get(block.clientId);
      return {
        ...block,
        // Use external ID if available, otherwise keep internal ID (for new blocks)
        clientId: externalId ?? block.clientId,
        innerBlocks: restoreExternalIds(block.innerBlocks, mapping)
      };
    });
  }
  function restoreSelectionIds(selectionState, mapping) {
    const { selectionStart, selectionEnd, initialPosition: initialPosition2 } = selectionState;
    const restoreClientId = (sel) => {
      if (!sel?.clientId) {
        return sel;
      }
      const externalId = mapping.internalToExternal.get(sel.clientId);
      return {
        ...sel,
        clientId: externalId ?? sel.clientId
      };
    };
    return {
      selectionStart: restoreClientId(selectionStart),
      selectionEnd: restoreClientId(selectionEnd),
      initialPosition: initialPosition2
    };
  }
  function useBlockSync({
    clientId = null,
    value: controlledBlocks,
    onChange = noop5,
    onInput = noop5
  }) {
    const registry = (0, import_data32.useRegistry)();
    const { getSelection, onChangeSelection } = (0, import_element37.useContext)(SelectionContext);
    const {
      resetBlocks: resetBlocks2,
      resetSelection: resetSelection2,
      replaceInnerBlocks: replaceInnerBlocks2,
      setHasControlledInnerBlocks: setHasControlledInnerBlocks2,
      __unstableMarkNextChangeAsNotPersistent: __unstableMarkNextChangeAsNotPersistent2
    } = registry.dispatch(store);
    const { getBlockName: getBlockName2, getBlocks: getBlocks2, getSelectionStart: getSelectionStart2, getSelectionEnd: getSelectionEnd2 } = registry.select(store);
    const pendingChangesRef = (0, import_element37.useRef)({ incoming: null, outgoing: [] });
    const subscribedRef = (0, import_element37.useRef)(false);
    const idMappingRef = (0, import_element37.useRef)({
      externalToInternal: /* @__PURE__ */ new Map(),
      internalToExternal: /* @__PURE__ */ new Map()
    });
    const appliedSelectionRef = (0, import_element37.useRef)(null);
    const isRestoringSelectionRef = (0, import_element37.useRef)(false);
    const restoreSelection = () => {
      const selection2 = getSelection();
      if (!selection2?.selectionStart?.clientId || selection2 === appliedSelectionRef.current) {
        return;
      }
      const startClientId = selection2.selectionStart.clientId;
      const isOurs = clientId ? idMappingRef.current.externalToInternal.has(startClientId) : !!getBlockName2(startClientId);
      if (isOurs) {
        appliedSelectionRef.current = selection2;
        const convert = (sel) => {
          if (!sel?.clientId || !clientId) {
            return sel;
          }
          return {
            ...sel,
            clientId: idMappingRef.current.externalToInternal.get(
              sel.clientId
            ) ?? sel.clientId
          };
        };
        isRestoringSelectionRef.current = true;
        resetSelection2(
          convert(selection2.selectionStart),
          convert(selection2.selectionEnd),
          selection2.initialPosition
        );
        isRestoringSelectionRef.current = false;
      }
    };
    const setControlledBlocks = () => {
      if (!controlledBlocks) {
        return;
      }
      if (clientId) {
        registry.batch(() => {
          idMappingRef.current.externalToInternal.clear();
          idMappingRef.current.internalToExternal.clear();
          const storeBlocks = controlledBlocks.map(
            (block) => cloneBlockWithMapping(block, idMappingRef.current)
          );
          setHasControlledInnerBlocks2(clientId, true);
          if (subscribedRef.current) {
            pendingChangesRef.current.incoming = storeBlocks;
          }
          __unstableMarkNextChangeAsNotPersistent2();
          replaceInnerBlocks2(clientId, storeBlocks);
          appliedSelectionRef.current = null;
        });
      } else {
        if (subscribedRef.current) {
          pendingChangesRef.current.incoming = controlledBlocks;
        }
        __unstableMarkNextChangeAsNotPersistent2();
        resetBlocks2(controlledBlocks);
      }
    };
    const unsetControlledBlocks = () => {
      __unstableMarkNextChangeAsNotPersistent2();
      if (clientId) {
        setHasControlledInnerBlocks2(clientId, false);
        __unstableMarkNextChangeAsNotPersistent2();
        replaceInnerBlocks2(clientId, []);
      } else {
        resetBlocks2([]);
      }
    };
    const onInputRef = (0, import_element37.useRef)(onInput);
    const onChangeRef = (0, import_element37.useRef)(onChange);
    (0, import_element37.useEffect)(() => {
      onInputRef.current = onInput;
      onChangeRef.current = onChange;
    }, [onInput, onChange]);
    (0, import_element37.useEffect)(() => {
      const isOutgoing = pendingChangesRef.current.outgoing.includes(controlledBlocks);
      const storeMatch = getBlocks2(clientId) === controlledBlocks;
      if (isOutgoing) {
        if (pendingChangesRef.current.outgoing[pendingChangesRef.current.outgoing.length - 1] === controlledBlocks) {
          pendingChangesRef.current.outgoing = [];
        }
      } else if (!storeMatch) {
        pendingChangesRef.current.outgoing = [];
        setControlledBlocks();
        restoreSelection();
      }
    }, [controlledBlocks, clientId]);
    (0, import_element37.useEffect)(() => {
      const {
        getSelectedBlocksInitialCaretPosition: getSelectedBlocksInitialCaretPosition2,
        isLastBlockChangePersistent: isLastBlockChangePersistent2,
        __unstableIsLastBlockChangeIgnored: __unstableIsLastBlockChangeIgnored2,
        areInnerBlocksControlled: areInnerBlocksControlled2,
        getBlockParents: getBlockParents2
      } = registry.select(store);
      let blocks2 = getBlocks2(clientId);
      let isPersistent = isLastBlockChangePersistent2();
      let previousAreBlocksDifferent = false;
      let prevSelectionStart = getSelectionStart2();
      let prevSelectionEnd = getSelectionEnd2();
      subscribedRef.current = true;
      const unsubscribe = registry.subscribe(() => {
        if (clientId !== null && getBlockName2(clientId) === null) {
          return;
        }
        const newIsPersistent = isLastBlockChangePersistent2();
        const newBlocks = getBlocks2(clientId);
        const areBlocksDifferent = newBlocks !== blocks2;
        blocks2 = newBlocks;
        if (areBlocksDifferent && (pendingChangesRef.current.incoming || __unstableIsLastBlockChangeIgnored2())) {
          pendingChangesRef.current.incoming = null;
          isPersistent = newIsPersistent;
          return;
        }
        const didPersistenceChange = previousAreBlocksDifferent && !areBlocksDifferent && newIsPersistent && !isPersistent;
        const blocksChanged = areBlocksDifferent || didPersistenceChange;
        const newSelectionStart = getSelectionStart2();
        const newSelectionEnd = getSelectionEnd2();
        const selectionChanged = newSelectionStart !== prevSelectionStart || newSelectionEnd !== prevSelectionEnd;
        if (selectionChanged) {
          prevSelectionStart = newSelectionStart;
          prevSelectionEnd = newSelectionEnd;
        }
        if (blocksChanged || selectionChanged) {
          registry.batch(() => {
            if (blocksChanged) {
              isPersistent = newIsPersistent;
              const blocksForParent = clientId ? restoreExternalIds(blocks2, idMappingRef.current) : blocks2;
              const selectionInfo = {
                selectionStart: newSelectionStart,
                selectionEnd: newSelectionEnd,
                initialPosition: getSelectedBlocksInitialCaretPosition2()
              };
              const selectionForParent = clientId ? restoreSelectionIds(
                selectionInfo,
                idMappingRef.current
              ) : selectionInfo;
              pendingChangesRef.current.outgoing.push(
                blocksForParent
              );
              const updateParent = isPersistent ? onChangeRef.current : onInputRef.current;
              updateParent(blocksForParent, {
                selection: selectionForParent
              });
            }
            if (selectionChanged && !blocksChanged && newSelectionStart?.clientId && !isRestoringSelectionRef.current) {
              const isOurs = clientId ? idMappingRef.current.internalToExternal.has(
                newSelectionStart.clientId
              ) : !getBlockParents2(
                newSelectionStart.clientId
              ).some(
                (parentId) => areInnerBlocksControlled2(parentId)
              );
              if (isOurs) {
                const selectionInfo = {
                  selectionStart: newSelectionStart,
                  selectionEnd: newSelectionEnd,
                  initialPosition: getSelectedBlocksInitialCaretPosition2()
                };
                onChangeSelection(
                  clientId ? restoreSelectionIds(
                    selectionInfo,
                    idMappingRef.current
                  ) : selectionInfo
                );
              }
            }
          });
        }
        previousAreBlocksDifferent = areBlocksDifferent;
      }, store);
      return () => {
        subscribedRef.current = false;
        unsubscribe();
      };
    }, [registry, clientId]);
    (0, import_element37.useEffect)(() => {
      return () => {
        unsetControlledBlocks();
      };
    }, []);
  }

  // packages/block-editor/build-module/components/keyboard-shortcuts/index.mjs
  var import_element38 = __toESM(require_element(), 1);
  var import_data33 = __toESM(require_data(), 1);
  var import_keyboard_shortcuts3 = __toESM(require_keyboard_shortcuts(), 1);
  var import_i18n33 = __toESM(require_i18n(), 1);
  function KeyboardShortcuts() {
    return null;
  }
  function KeyboardShortcutsRegister() {
    const { registerShortcut } = (0, import_data33.useDispatch)(import_keyboard_shortcuts3.store);
    (0, import_element38.useEffect)(() => {
      registerShortcut({
        name: "core/block-editor/copy",
        category: "block",
        description: (0, import_i18n33.__)("Copy the selected block(s)."),
        keyCombination: {
          modifier: "primary",
          character: "c"
        }
      });
      registerShortcut({
        name: "core/block-editor/cut",
        category: "block",
        description: (0, import_i18n33.__)("Cut the selected block(s)."),
        keyCombination: {
          modifier: "primary",
          character: "x"
        }
      });
      registerShortcut({
        name: "core/block-editor/paste",
        category: "block",
        description: (0, import_i18n33.__)("Paste the selected block(s)."),
        keyCombination: {
          modifier: "primary",
          character: "v"
        }
      });
      registerShortcut({
        name: "core/block-editor/duplicate",
        category: "block",
        description: (0, import_i18n33.__)("Duplicate the selected block(s)."),
        keyCombination: {
          modifier: "primaryShift",
          character: "d"
        }
      });
      registerShortcut({
        name: "core/block-editor/remove",
        category: "block",
        description: (0, import_i18n33.__)("Remove the selected block(s)."),
        keyCombination: {
          modifier: "access",
          character: "z"
        }
      });
      registerShortcut({
        name: "core/block-editor/paste-styles",
        category: "block",
        description: (0, import_i18n33.__)(
          "Paste the copied style to the selected block(s)."
        ),
        keyCombination: {
          modifier: "primaryAlt",
          character: "v"
        }
      });
      registerShortcut({
        name: "core/block-editor/insert-before",
        category: "block",
        description: (0, import_i18n33.__)(
          "Insert a new block before the selected block(s)."
        ),
        keyCombination: {
          modifier: "primaryAlt",
          character: "t"
        }
      });
      registerShortcut({
        name: "core/block-editor/insert-after",
        category: "block",
        description: (0, import_i18n33.__)(
          "Insert a new block after the selected block(s)."
        ),
        keyCombination: {
          modifier: "primaryAlt",
          character: "y"
        }
      });
      registerShortcut({
        name: "core/block-editor/delete-multi-selection",
        category: "block",
        description: (0, import_i18n33.__)("Delete selection."),
        keyCombination: {
          character: "del"
        },
        aliases: [
          {
            character: "backspace"
          }
        ]
      });
      registerShortcut({
        name: "core/block-editor/stop-editing-as-blocks",
        category: "block",
        description: (0, import_i18n33.__)("Finish editing a design."),
        keyCombination: {
          character: "escape"
        }
      });
      registerShortcut({
        name: "core/block-editor/select-all",
        category: "selection",
        description: (0, import_i18n33.__)(
          "Select all text when typing. Press again to select all blocks."
        ),
        keyCombination: {
          modifier: "primary",
          character: "a"
        }
      });
      registerShortcut({
        name: "core/block-editor/unselect",
        category: "selection",
        description: (0, import_i18n33.__)("Clear selection."),
        keyCombination: {
          character: "escape"
        }
      });
      registerShortcut({
        name: "core/block-editor/multi-text-selection",
        category: "selection",
        description: (0, import_i18n33.__)("Select text across multiple blocks."),
        keyCombination: {
          modifier: "shift",
          // Spotted during my own research â€” invalid character?
          character: "arrow"
        }
      });
      registerShortcut({
        name: "core/block-editor/focus-toolbar",
        category: "global",
        description: (0, import_i18n33.__)("Navigate to the nearest toolbar."),
        keyCombination: {
          modifier: "alt",
          character: "F10"
        }
      });
      registerShortcut({
        name: "core/block-editor/move-up",
        category: "block",
        description: (0, import_i18n33.__)("Move the selected block(s) up."),
        keyCombination: {
          modifier: "secondary",
          character: "t"
        }
      });
      registerShortcut({
        name: "core/block-editor/move-down",
        category: "block",
        description: (0, import_i18n33.__)("Move the selected block(s) down."),
        keyCombination: {
          modifier: "secondary",
          character: "y"
        }
      });
      registerShortcut({
        name: "core/block-editor/collapse-list-view",
        category: "list-view",
        description: (0, import_i18n33.__)("Collapse all other items."),
        keyCombination: {
          modifier: "alt",
          character: "l"
        }
      });
      registerShortcut({
        name: "core/block-editor/group",
        category: "block",
        description: (0, import_i18n33.__)(
          "Create a group block from the selected multiple blocks."
        ),
        keyCombination: {
          modifier: "primary",
          character: "g"
        }
      });
      registerShortcut({
        name: "core/block-editor/toggle-block-visibility",
        category: "block",
        description: (0, import_i18n33.__)("Show or hide the selected block(s)."),
        keyCombination: {
          modifier: "primaryShift",
          character: "h"
        }
      });
      registerShortcut({
        name: "core/block-editor/rename",
        category: "block",
        description: (0, import_i18n33.__)("Rename the selected block."),
        keyCombination: {
          modifier: "primaryAlt",
          character: "r"
        }
      });
    }, [registerShortcut]);
    return null;
  }
  KeyboardShortcuts.Register = KeyboardShortcutsRegister;
  var keyboard_shortcuts_default = KeyboardShortcuts;

  // packages/block-editor/build-module/components/provider/use-media-upload-settings.mjs
  var import_element39 = __toESM(require_element(), 1);
  function useMediaUploadSettings(settings2 = {}) {
    return (0, import_element39.useMemo)(
      () => ({
        mediaUpload: settings2.mediaUpload,
        mediaSideload: settings2.mediaSideload,
        mediaFinalize: settings2.mediaFinalize,
        maxUploadFileSize: settings2.maxUploadFileSize,
        allowedMimeTypes: settings2.allowedMimeTypes,
        allImageSizes: settings2.allImageSizes,
        bigImageSizeThreshold: settings2.bigImageSizeThreshold
      }),
      [settings2]
    );
  }
  var use_media_upload_settings_default = useMediaUploadSettings;

  // packages/block-editor/build-module/components/provider/index.mjs
  var import_jsx_runtime156 = __toESM(require_jsx_runtime(), 1);
  var noop6 = () => {
  };
  var hasLoggedFallback = false;
  var isClientSideMediaEnabledCache = null;
  function shouldEnableClientSideMediaProcessing() {
    if (isClientSideMediaEnabledCache !== null) {
      return isClientSideMediaEnabledCache;
    }
    if (!window.__clientSideMediaProcessing) {
      isClientSideMediaEnabledCache = false;
      return false;
    }
    if (typeof import_upload_media.detectClientSideMediaSupport !== "function") {
      isClientSideMediaEnabledCache = false;
      return false;
    }
    const detection = (0, import_upload_media.detectClientSideMediaSupport)();
    if (!detection || !detection.supported) {
      if (!hasLoggedFallback) {
        console.info(
          `Client-side media processing unavailable: ${detection.reason}. Using server-side processing.`
        );
        hasLoggedFallback = true;
      }
      isClientSideMediaEnabledCache = false;
      return false;
    }
    isClientSideMediaEnabledCache = true;
    return true;
  }
  function mediaUpload(registry, settings2, {
    allowedTypes,
    additionalData = {},
    filesList,
    onError = noop6,
    onFileChange,
    onSuccess,
    onBatchSuccess
  }) {
    void registry.dispatch(import_upload_media.store).addItems({
      files: Array.from(filesList),
      onChange: onFileChange,
      onSuccess: (attachments) => {
        settings2?.[mediaUploadOnSuccessKey]?.(attachments);
        onSuccess?.(attachments);
      },
      onBatchSuccess,
      onError: (error) => onError(typeof error === "string" ? error : error?.message ?? ""),
      additionalData,
      allowedTypes
    });
  }
  function BlockSyncEffect(props) {
    useBlockSync(props);
    return null;
  }
  var ExperimentalBlockEditorProvider = with_registry_provider_default(
    (props) => {
      const {
        settings: _settings,
        registry,
        stripExperimentalSettings = false
      } = props;
      const mediaUploadSettings = use_media_upload_settings_default(_settings);
      const isClientSideMediaEnabled = shouldEnableClientSideMediaProcessing();
      const isMediaUploadIntercepted = !!_settings?.mediaUpload?.__isMediaUploadInterceptor;
      const settings2 = (0, import_element40.useMemo)(() => {
        if (isClientSideMediaEnabled && _settings?.mediaUpload && !isMediaUploadIntercepted) {
          const interceptor = mediaUpload.bind(
            null,
            registry,
            _settings
          );
          interceptor.__isMediaUploadInterceptor = true;
          return {
            ..._settings,
            mediaUpload: interceptor
          };
        }
        return _settings;
      }, [
        _settings,
        registry,
        isClientSideMediaEnabled,
        isMediaUploadIntercepted
      ]);
      const { __experimentalUpdateSettings: __experimentalUpdateSettings2 } = unlock(
        (0, import_data34.useDispatch)(store)
      );
      (0, import_element40.useEffect)(() => {
        __experimentalUpdateSettings2(
          {
            ...settings2,
            __internalIsInitialized: true
          },
          {
            stripExperimentalSettings,
            reset: true
          }
        );
      }, [
        settings2,
        stripExperimentalSettings,
        __experimentalUpdateSettings2
      ]);
      const selectionRef = (0, import_element40.useRef)(props.selection);
      selectionRef.current = props.selection;
      const onChangeSelectionRef = (0, import_element40.useRef)(props.onChangeSelection ?? noop6);
      onChangeSelectionRef.current = props.onChangeSelection ?? noop6;
      const selectionContextValue = (0, import_element40.useMemo)(
        () => ({
          getSelection: () => selectionRef.current,
          onChangeSelection: (...args) => onChangeSelectionRef.current(...args)
        }),
        []
      );
      const children = /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(import_components31.SlotFillProvider, { passthrough: true, children: [
        !settings2?.isPreviewMode && /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(keyboard_shortcuts_default.Register, {}),
        /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(BlockRefsProvider, { children: props.children })
      ] });
      const content = /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(SelectionContext.Provider, { value: selectionContextValue, children: [
        /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
          BlockSyncEffect,
          {
            clientId: props.clientId,
            value: props.value,
            onChange: props.onChange,
            onInput: props.onInput
          }
        ),
        children
      ] });
      if (isClientSideMediaEnabled && !isMediaUploadIntercepted) {
        return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
          import_upload_media.MediaUploadProvider,
          {
            settings: mediaUploadSettings,
            useSubRegistry: false,
            children: content
          }
        );
      }
      return content;
    }
  );
  var BlockEditorProvider = (props) => {
    return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(ExperimentalBlockEditorProvider, { ...props, stripExperimentalSettings: true, children: props.children });
  };
  var provider_default = BlockEditorProvider;

  // packages/block-editor/build-module/components/block-preview/auto.mjs
  var import_compose32 = __toESM(require_compose(), 1);
  var import_data49 = __toESM(require_data(), 1);
  var import_element47 = __toESM(require_element(), 1);
  var import_components34 = __toESM(require_components(), 1);

  // packages/block-editor/build-module/components/iframe/index.mjs
  var import_element45 = __toESM(require_element(), 1);
  var import_i18n36 = __toESM(require_i18n(), 1);
  var import_compose31 = __toESM(require_compose(), 1);
  var import_components32 = __toESM(require_components(), 1);
  var import_data47 = __toESM(require_data(), 1);

  // packages/block-editor/build-module/components/writing-flow/index.mjs
  var import_data46 = __toESM(require_data(), 1);
  var import_i18n35 = __toESM(require_i18n(), 1);
  var import_compose29 = __toESM(require_compose(), 1);
  var import_element43 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/writing-flow/use-multi-selection.mjs
  var import_compose19 = __toESM(require_compose(), 1);
  var import_data35 = __toESM(require_data(), 1);
  function selector(select3) {
    const {
      isMultiSelecting: isMultiSelecting3,
      getMultiSelectedBlockClientIds: getMultiSelectedBlockClientIds2,
      hasMultiSelection: hasMultiSelection2,
      getSelectedBlockClientId: getSelectedBlockClientId2,
      getSelectedBlocksInitialCaretPosition: getSelectedBlocksInitialCaretPosition2,
      __unstableIsFullySelected: __unstableIsFullySelected2
    } = select3(store);
    return {
      isMultiSelecting: isMultiSelecting3(),
      multiSelectedBlockClientIds: getMultiSelectedBlockClientIds2(),
      hasMultiSelection: hasMultiSelection2(),
      selectedBlockClientId: getSelectedBlockClientId2(),
      initialPosition: getSelectedBlocksInitialCaretPosition2(),
      isFullSelection: __unstableIsFullySelected2()
    };
  }
  function useMultiSelection() {
    const {
      initialPosition: initialPosition2,
      isMultiSelecting: isMultiSelecting3,
      multiSelectedBlockClientIds,
      hasMultiSelection: hasMultiSelection2,
      selectedBlockClientId,
      isFullSelection
    } = (0, import_data35.useSelect)(selector, []);
    return (0, import_compose19.useRefEffect)(
      (node) => {
        const { ownerDocument } = node;
        const { defaultView } = ownerDocument;
        if (initialPosition2 === void 0 || initialPosition2 === null) {
          return;
        }
        if (!hasMultiSelection2 || isMultiSelecting3) {
          return;
        }
        const { length } = multiSelectedBlockClientIds;
        if (length < 2) {
          return;
        }
        if (!isFullSelection) {
          return;
        }
        node.contentEditable = true;
        node.focus();
        defaultView.getSelection().removeAllRanges();
      },
      [
        hasMultiSelection2,
        isMultiSelecting3,
        multiSelectedBlockClientIds,
        selectedBlockClientId,
        initialPosition2,
        isFullSelection
      ]
    );
  }

  // packages/block-editor/build-module/components/writing-flow/use-tab-nav.mjs
  var import_dom8 = __toESM(require_dom(), 1);
  var import_keycodes3 = __toESM(require_keycodes(), 1);
  var import_data36 = __toESM(require_data(), 1);
  var import_compose20 = __toESM(require_compose(), 1);
  var import_element41 = __toESM(require_element(), 1);
  var import_jsx_runtime157 = __toESM(require_jsx_runtime(), 1);
  function useTabNav() {
    const containerRef = (
      /** @type {typeof useRef<HTMLElement>} */
      (0, import_element41.useRef)()
    );
    const focusCaptureBeforeRef = (0, import_element41.useRef)();
    const focusCaptureAfterRef = (0, import_element41.useRef)();
    const {
      hasMultiSelection: hasMultiSelection2,
      getSelectedBlockClientId: getSelectedBlockClientId2,
      getBlockCount: getBlockCount2,
      getBlockOrder: getBlockOrder2,
      getLastFocus: getLastFocus2,
      getSectionRootClientId: getSectionRootClientId2,
      isZoomOut: isZoomOut2
    } = unlock((0, import_data36.useSelect)(store));
    const { setLastFocus: setLastFocus2 } = unlock((0, import_data36.useDispatch)(store));
    const noCaptureRef = (0, import_element41.useRef)();
    function onFocusCapture(event) {
      const canvasElement = containerRef.current.ownerDocument === event.target.ownerDocument ? containerRef.current : containerRef.current.ownerDocument.defaultView.frameElement;
      if (noCaptureRef.current) {
        noCaptureRef.current = null;
      } else if (hasMultiSelection2()) {
        containerRef.current.focus();
      } else if (getSelectedBlockClientId2()) {
        if (getLastFocus2()?.current) {
          getLastFocus2().current.focus();
        } else {
          containerRef.current.querySelector(
            `[data-block="${getSelectedBlockClientId2()}"]`
          ).focus();
        }
      } else if (isZoomOut2()) {
        const sectionRootClientId = getSectionRootClientId2();
        const sectionBlocks = getBlockOrder2(sectionRootClientId);
        if (sectionBlocks.length) {
          containerRef.current.querySelector(`[data-block="${sectionBlocks[0]}"]`).focus();
        } else if (sectionRootClientId) {
          containerRef.current.querySelector(`[data-block="${sectionRootClientId}"]`).focus();
        } else {
          canvasElement.focus();
        }
      } else {
        const isBefore = (
          // eslint-disable-next-line no-bitwise
          event.target.compareDocumentPosition(canvasElement) & event.target.DOCUMENT_POSITION_FOLLOWING
        );
        const tabbables = import_dom8.focus.tabbable.find(containerRef.current);
        if (tabbables.length) {
          const next = isBefore ? tabbables[0] : tabbables[tabbables.length - 1];
          next.focus();
        }
      }
    }
    const before = /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
      "div",
      {
        ref: focusCaptureBeforeRef,
        tabIndex: "0",
        onFocus: onFocusCapture
      }
    );
    const after = /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
      "div",
      {
        ref: focusCaptureAfterRef,
        tabIndex: "0",
        onFocus: onFocusCapture
      }
    );
    const ref = (0, import_compose20.useRefEffect)((node) => {
      function onKeyDown(event) {
        if (event.defaultPrevented) {
          return;
        }
        if (event.keyCode !== import_keycodes3.TAB) {
          return;
        }
        if (
          // Bails in case the focus capture elements arenâ€™t present. They
          // may be omitted to avoid silent tab stops in preview mode.
          // See: https://github.com/WordPress/gutenberg/pull/59317
          !focusCaptureAfterRef.current || !focusCaptureBeforeRef.current
        ) {
          return;
        }
        const { target, shiftKey: isShift } = event;
        const direction = isShift ? "findPrevious" : "findNext";
        const nextTabbable = import_dom8.focus.tabbable[direction](target);
        const currentBlock = target.closest("[data-block]");
        const isElementPartOfSelectedBlock = currentBlock && nextTabbable && (isInSameBlock(currentBlock, nextTabbable) || isInsideRootBlock(currentBlock, nextTabbable));
        if ((0, import_dom8.isFormElement)(nextTabbable) && isElementPartOfSelectedBlock) {
          return;
        }
        const next = isShift ? focusCaptureBeforeRef : focusCaptureAfterRef;
        noCaptureRef.current = true;
        next.current.focus({ preventScroll: true });
      }
      function onFocusOut(event) {
        setLastFocus2({ ...getLastFocus2(), current: event.target });
        const { ownerDocument: ownerDocument2 } = node;
        if (!event.relatedTarget && event.target.hasAttribute("data-block") && ownerDocument2.activeElement === ownerDocument2.body && getBlockCount2() === 0) {
          node.focus();
        }
      }
      function preventScrollOnTab(event) {
        if (event.keyCode !== import_keycodes3.TAB) {
          return;
        }
        if (event.target?.getAttribute("role") === "region") {
          return;
        }
        if (containerRef.current === event.target) {
          return;
        }
        const isShift = event.shiftKey;
        const direction = isShift ? "findPrevious" : "findNext";
        const target = import_dom8.focus.tabbable[direction](event.target);
        if (target === focusCaptureBeforeRef.current || target === focusCaptureAfterRef.current) {
          event.preventDefault();
          target.focus({ preventScroll: true });
        }
      }
      const { ownerDocument } = node;
      const { defaultView } = ownerDocument;
      defaultView.addEventListener("keydown", preventScrollOnTab);
      node.addEventListener("keydown", onKeyDown);
      node.addEventListener("focusout", onFocusOut);
      return () => {
        defaultView.removeEventListener("keydown", preventScrollOnTab);
        node.removeEventListener("keydown", onKeyDown);
        node.removeEventListener("focusout", onFocusOut);
      };
    }, []);
    const mergedRefs = (0, import_compose20.useMergeRefs)([containerRef, ref]);
    return [before, mergedRefs, after];
  }

  // packages/block-editor/build-module/components/writing-flow/use-arrow-nav.mjs
  var import_dom10 = __toESM(require_dom(), 1);
  var import_keycodes4 = __toESM(require_keycodes(), 1);
  var import_data37 = __toESM(require_data(), 1);
  var import_compose21 = __toESM(require_compose(), 1);
  function isNavigationCandidate(element, keyCode, hasModifier) {
    const isVertical = keyCode === import_keycodes4.UP || keyCode === import_keycodes4.DOWN;
    const { tagName } = element;
    const elementType = element.getAttribute("type");
    if (isVertical && !hasModifier) {
      if (tagName === "INPUT") {
        const verticalInputTypes = [
          "date",
          "datetime-local",
          "month",
          "number",
          "range",
          "time",
          "week"
        ];
        return !verticalInputTypes.includes(elementType);
      }
      return true;
    }
    if (tagName === "INPUT") {
      const simpleInputTypes = [
        "button",
        "checkbox",
        "number",
        "color",
        "file",
        "image",
        "radio",
        "reset",
        "submit"
      ];
      return simpleInputTypes.includes(elementType);
    }
    return tagName !== "TEXTAREA";
  }
  function getClosestTabbable(target, isReverse, containerElement, onlyVertical) {
    let focusableNodes = import_dom10.focus.focusable.find(containerElement);
    if (isReverse) {
      focusableNodes.reverse();
    }
    focusableNodes = focusableNodes.slice(
      focusableNodes.indexOf(target) + 1
    );
    let targetRect;
    if (onlyVertical) {
      targetRect = target.getBoundingClientRect();
    }
    function isTabCandidate(node) {
      if (node.contentEditable !== "true" && getBlockClientId(node) && import_dom10.focus.focusable.find(node).filter((element) => !(0, import_dom10.isFormElement)(element)).length !== 0) {
        return false;
      }
      if (!import_dom10.focus.tabbable.isTabbableIndex(node)) {
        return false;
      }
      if (node.isContentEditable && node.contentEditable !== "true") {
        return false;
      }
      if (onlyVertical) {
        const nodeRect = node.getBoundingClientRect();
        if (nodeRect.left >= targetRect.right || nodeRect.right <= targetRect.left) {
          return false;
        }
      }
      return true;
    }
    return focusableNodes.find(isTabCandidate);
  }
  function useArrowNav() {
    const {
      getMultiSelectedBlocksStartClientId: getMultiSelectedBlocksStartClientId2,
      getMultiSelectedBlocksEndClientId: getMultiSelectedBlocksEndClientId2,
      getSettings: getSettings7,
      hasMultiSelection: hasMultiSelection2,
      __unstableIsFullySelected: __unstableIsFullySelected2
    } = (0, import_data37.useSelect)(store);
    const { selectBlock: selectBlock2 } = (0, import_data37.useDispatch)(store);
    return (0, import_compose21.useRefEffect)((node) => {
      let verticalRect;
      function onMouseDown() {
        verticalRect = null;
      }
      function isClosestTabbableABlock(target, isReverse) {
        const closestTabbable = getClosestTabbable(
          target,
          isReverse,
          node
        );
        return closestTabbable && getBlockClientId(closestTabbable);
      }
      function onKeyDown(event) {
        if (event.defaultPrevented) {
          return;
        }
        const { keyCode, target, shiftKey, ctrlKey, altKey, metaKey } = event;
        const isUp = keyCode === import_keycodes4.UP;
        const isDown = keyCode === import_keycodes4.DOWN;
        const isLeft = keyCode === import_keycodes4.LEFT;
        const isRight = keyCode === import_keycodes4.RIGHT;
        const isReverse = isUp || isLeft;
        const isHorizontal = isLeft || isRight;
        const isVertical = isUp || isDown;
        const isNav = isHorizontal || isVertical;
        const hasModifier = shiftKey || ctrlKey || altKey || metaKey;
        const isNavEdge = isVertical ? import_dom10.isVerticalEdge : import_dom10.isHorizontalEdge;
        const { ownerDocument } = node;
        const { defaultView } = ownerDocument;
        if (!isNav) {
          return;
        }
        if (getSettings7().isPreviewMode) {
          return;
        }
        if (hasMultiSelection2()) {
          if (shiftKey) {
            return;
          }
          if (!__unstableIsFullySelected2()) {
            return;
          }
          event.preventDefault();
          if (isReverse) {
            selectBlock2(getMultiSelectedBlocksStartClientId2());
          } else {
            selectBlock2(getMultiSelectedBlocksEndClientId2(), -1);
          }
          return;
        }
        if (!isNavigationCandidate(target, keyCode, hasModifier)) {
          return;
        }
        if (!isVertical) {
          verticalRect = null;
        } else if (!verticalRect) {
          verticalRect = (0, import_dom10.computeCaretRect)(defaultView);
        }
        const isReverseDir = (0, import_dom10.isRTL)(target) ? !isReverse : isReverse;
        const { keepCaretInsideBlock } = getSettings7();
        if (shiftKey) {
          if (isClosestTabbableABlock(target, isReverse) && isNavEdge(target, isReverse)) {
            node.contentEditable = true;
            node.focus();
          }
        } else if (isVertical && (0, import_dom10.isVerticalEdge)(target, isReverse) && // When Alt is pressed, only intercept if the caret is also at
        // the horizontal edge.
        (altKey ? (0, import_dom10.isHorizontalEdge)(target, isReverseDir) : true) && !keepCaretInsideBlock) {
          const closestTabbable = getClosestTabbable(
            target,
            isReverse,
            node,
            true
          );
          if (closestTabbable) {
            (0, import_dom10.placeCaretAtVerticalEdge)(
              closestTabbable,
              // When Alt is pressed, place the caret at the furthest
              // horizontal edge and the furthest vertical edge.
              altKey ? !isReverse : isReverse,
              altKey ? void 0 : verticalRect
            );
            event.preventDefault();
          }
        } else if (isHorizontal && defaultView.getSelection().isCollapsed && (0, import_dom10.isHorizontalEdge)(target, isReverseDir) && !keepCaretInsideBlock) {
          const closestTabbable = getClosestTabbable(
            target,
            isReverseDir,
            node
          );
          (0, import_dom10.placeCaretAtHorizontalEdge)(closestTabbable, isReverse);
          event.preventDefault();
        }
      }
      node.addEventListener("mousedown", onMouseDown);
      node.addEventListener("keydown", onKeyDown);
      return () => {
        node.removeEventListener("mousedown", onMouseDown);
        node.removeEventListener("keydown", onKeyDown);
      };
    }, []);
  }

  // packages/block-editor/build-module/components/writing-flow/use-preview-mode-nav.mjs
  var import_compose22 = __toESM(require_compose(), 1);
  var import_data38 = __toESM(require_data(), 1);
  var import_keycodes5 = __toESM(require_keycodes(), 1);
  function usePreviewModeNav() {
    const isPreviewMode = (0, import_data38.useSelect)(
      (select3) => select3(store).getSettings().isPreviewMode,
      []
    );
    return (0, import_compose22.useRefEffect)(
      (node) => {
        if (!isPreviewMode) {
          return;
        }
        function onKeyDown(event) {
          const { keyCode, shiftKey, target } = event;
          const isTab = keyCode === import_keycodes5.TAB;
          const isUp = keyCode === import_keycodes5.UP;
          const isDown = keyCode === import_keycodes5.DOWN;
          const isLeft = keyCode === import_keycodes5.LEFT;
          const isRight = keyCode === import_keycodes5.RIGHT;
          const isArrow = isUp || isDown || isLeft || isRight;
          if (!isTab && !isArrow) {
            return;
          }
          const isReverse = isTab ? shiftKey : isUp || isLeft;
          const blocks2 = Array.from(
            node.querySelectorAll("[data-block]")
          );
          if (!blocks2.length) {
            return;
          }
          const currentBlock = target.closest("[data-block]");
          const currentIndex = currentBlock ? blocks2.indexOf(currentBlock) : -1;
          if (currentIndex === -1) {
            return;
          }
          if (isTab) {
            if (isReverse && currentIndex === 0) {
              return;
            }
            if (!isReverse && currentIndex === blocks2.length - 1) {
              return;
            }
          }
          let nextIndex;
          if (isReverse) {
            nextIndex = currentIndex <= 0 ? blocks2.length - 1 : currentIndex - 1;
          } else {
            nextIndex = currentIndex === -1 || currentIndex >= blocks2.length - 1 ? 0 : currentIndex + 1;
          }
          event.preventDefault();
          blocks2[nextIndex].focus();
        }
        node.addEventListener("keydown", onKeyDown);
        return () => {
          node.removeEventListener("keydown", onKeyDown);
        };
      },
      [isPreviewMode]
    );
  }

  // packages/block-editor/build-module/components/writing-flow/use-select-all.mjs
  var import_dom12 = __toESM(require_dom(), 1);
  var import_data39 = __toESM(require_data(), 1);
  var import_keyboard_shortcuts5 = __toESM(require_keyboard_shortcuts(), 1);
  var import_compose23 = __toESM(require_compose(), 1);
  function useSelectAll() {
    const { getBlockOrder: getBlockOrder2, getSelectedBlockClientIds: getSelectedBlockClientIds2, getBlockRootClientId: getBlockRootClientId2 } = (0, import_data39.useSelect)(store);
    const { multiSelect: multiSelect2, selectBlock: selectBlock2 } = (0, import_data39.useDispatch)(store);
    const isMatch = (0, import_keyboard_shortcuts5.__unstableUseShortcutEventMatch)();
    return (0, import_compose23.useRefEffect)((node) => {
      function onKeyDown(event) {
        if (!isMatch("core/block-editor/select-all", event)) {
          return;
        }
        const selectedClientIds = getSelectedBlockClientIds2();
        if (selectedClientIds.length < 2 && !(0, import_dom12.isEntirelySelected)(event.target)) {
          return;
        }
        event.preventDefault();
        const { ownerDocument } = event.target;
        const [firstSelectedClientId] = selectedClientIds;
        const activeClientId = getBlockClientId(
          ownerDocument.activeElement
        );
        if (activeClientId && activeClientId !== firstSelectedClientId && !isInsideRootBlock(
          ownerDocument.getElementById(
            "block-" + firstSelectedClientId
          ),
          ownerDocument.activeElement
        )) {
          selectBlock2(activeClientId);
          return;
        }
        const rootClientId = getBlockRootClientId2(firstSelectedClientId);
        const blockClientIds = getBlockOrder2(rootClientId);
        if (selectedClientIds.length === blockClientIds.length) {
          if (rootClientId) {
            node.ownerDocument.defaultView.getSelection().removeAllRanges();
            selectBlock2(rootClientId);
          }
          return;
        }
        multiSelect2(
          blockClientIds[0],
          blockClientIds[blockClientIds.length - 1]
        );
      }
      node.addEventListener("keydown", onKeyDown);
      return () => {
        node.removeEventListener("keydown", onKeyDown);
      };
    }, []);
  }

  // packages/block-editor/build-module/components/writing-flow/use-drag-selection.mjs
  var import_data40 = __toESM(require_data(), 1);
  var import_compose24 = __toESM(require_compose(), 1);
  function setContentEditableWrapper(node, value) {
    node.contentEditable = value;
    if (value) {
      node.focus();
    }
  }
  function useDragSelection() {
    const { startMultiSelect: startMultiSelect2, stopMultiSelect: stopMultiSelect2 } = (0, import_data40.useDispatch)(store);
    const {
      getSettings: getSettings7,
      isSelectionEnabled: isSelectionEnabled3,
      hasSelectedBlock: hasSelectedBlock2,
      isDraggingBlocks: isDraggingBlocks2,
      isMultiSelecting: isMultiSelecting3
    } = (0, import_data40.useSelect)(store);
    return (0, import_compose24.useRefEffect)(
      (node) => {
        const { ownerDocument } = node;
        const { defaultView } = ownerDocument;
        let anchorElement;
        let rafId;
        function onMouseUp() {
          stopMultiSelect2();
          defaultView.removeEventListener("mouseup", onMouseUp);
          rafId = defaultView.requestAnimationFrame(() => {
            if (!hasSelectedBlock2()) {
              return;
            }
            setContentEditableWrapper(node, false);
            const selection2 = defaultView.getSelection();
            if (selection2.rangeCount) {
              const range2 = selection2.getRangeAt(0);
              const { commonAncestorContainer } = range2;
              const clonedRange = range2.cloneRange();
              if (anchorElement.contains(commonAncestorContainer)) {
                anchorElement.focus();
                selection2.removeAllRanges();
                selection2.addRange(clonedRange);
              }
            }
          });
        }
        let lastMouseDownTarget;
        function onMouseDown({ target }) {
          lastMouseDownTarget = target;
        }
        function onMouseLeave({ buttons, target, relatedTarget }) {
          if (!target.contains(lastMouseDownTarget)) {
            return;
          }
          if (target.contains(relatedTarget)) {
            return;
          }
          if (isDraggingBlocks2()) {
            return;
          }
          if (buttons !== 1) {
            return;
          }
          if (isMultiSelecting3()) {
            return;
          }
          if (node === target) {
            return;
          }
          if (target.getAttribute("contenteditable") !== "true" && !getSettings7().isPreviewMode) {
            return;
          }
          if (!isSelectionEnabled3()) {
            return;
          }
          anchorElement = target;
          startMultiSelect2();
          defaultView.addEventListener("mouseup", onMouseUp);
          setContentEditableWrapper(node, true);
        }
        node.addEventListener("mouseout", onMouseLeave);
        node.addEventListener("mousedown", onMouseDown);
        return () => {
          node.removeEventListener("mouseout", onMouseLeave);
          defaultView.removeEventListener("mouseup", onMouseUp);
          defaultView.cancelAnimationFrame(rafId);
        };
      },
      [
        startMultiSelect2,
        stopMultiSelect2,
        isSelectionEnabled3,
        hasSelectedBlock2
      ]
    );
  }

  // packages/block-editor/build-module/components/writing-flow/use-selection-observer.mjs
  var import_data41 = __toESM(require_data(), 1);
  var import_compose25 = __toESM(require_compose(), 1);
  var import_rich_text4 = __toESM(require_rich_text(), 1);
  var import_dom14 = __toESM(require_dom(), 1);
  function extractSelectionStartNode(selection2) {
    const { anchorNode, anchorOffset } = selection2;
    if (anchorNode.nodeType === anchorNode.TEXT_NODE) {
      return anchorNode;
    }
    if (anchorOffset === 0) {
      return anchorNode;
    }
    return anchorNode.childNodes[anchorOffset - 1];
  }
  function extractSelectionEndNode(selection2) {
    const { focusNode, focusOffset } = selection2;
    if (focusNode.nodeType === focusNode.TEXT_NODE) {
      return focusNode;
    }
    if (focusOffset === focusNode.childNodes.length) {
      return focusNode;
    }
    if (focusOffset === 0 && (0, import_dom14.isSelectionForward)(selection2)) {
      return focusNode.previousSibling ?? focusNode.parentElement;
    }
    return focusNode.childNodes[focusOffset];
  }
  function findDepth(a2, b2) {
    let depth = 0;
    while (a2[depth] === b2[depth]) {
      depth++;
    }
    return depth;
  }
  function setContentEditableWrapper2(node, value) {
    if (node.contentEditable !== String(value)) {
      node.contentEditable = value;
      if (value) {
        node.focus();
      }
    }
  }
  function getRichTextElement(node) {
    const element = node.nodeType === node.ELEMENT_NODE ? node : node.parentElement;
    return element?.closest("[data-wp-block-attribute-key]");
  }
  function useSelectionObserver() {
    const { multiSelect: multiSelect2, selectBlock: selectBlock2, selectionChange: selectionChange2 } = (0, import_data41.useDispatch)(store);
    const { getBlockParents: getBlockParents2, getBlockSelectionStart: getBlockSelectionStart2, isMultiSelecting: isMultiSelecting3 } = (0, import_data41.useSelect)(store);
    return (0, import_compose25.useRefEffect)(
      (node) => {
        const { ownerDocument } = node;
        const { defaultView } = ownerDocument;
        function onSelectionChange(event) {
          const selection2 = defaultView.getSelection();
          if (!selection2.rangeCount) {
            return;
          }
          const startNode = extractSelectionStartNode(selection2);
          const endNode = extractSelectionEndNode(selection2);
          if (!node.contains(startNode) || !node.contains(endNode)) {
            return;
          }
          const isClickShift = event.shiftKey && event.type === "mouseup";
          if (selection2.isCollapsed && !isClickShift) {
            if (node.contentEditable === "true" && !isMultiSelecting3()) {
              setContentEditableWrapper2(node, false);
              let element = startNode.nodeType === startNode.ELEMENT_NODE ? startNode : startNode.parentElement;
              element = element?.closest("[contenteditable]");
              element?.focus();
            }
            return;
          }
          let startClientId = getBlockClientId(startNode);
          let endClientId = getBlockClientId(endNode);
          if (isClickShift) {
            const selectedClientId = getBlockSelectionStart2();
            const clickedClientId = getBlockClientId(event.target);
            const focusNodeIsNonSelectable = clickedClientId !== endClientId;
            if (startClientId === endClientId && selection2.isCollapsed || !endClientId || focusNodeIsNonSelectable) {
              endClientId = clickedClientId;
            }
            if (startClientId !== selectedClientId) {
              startClientId = selectedClientId;
            }
          }
          if (startClientId === void 0 && endClientId === void 0) {
            setContentEditableWrapper2(node, false);
            return;
          }
          if (event.type === "mouseup" && !event.shiftKey && !isMultiSelecting3() && startClientId === endClientId) {
            const clickedClientId = getBlockClientId(event.target);
            if (clickedClientId && clickedClientId !== startClientId) {
              selection2.removeAllRanges();
              return;
            }
          }
          const isSingularSelection = startClientId === endClientId;
          if (isSingularSelection) {
            if (!isMultiSelecting3()) {
              selectBlock2(startClientId);
            } else {
              multiSelect2(startClientId, startClientId);
            }
          } else {
            const startPath = [
              ...getBlockParents2(startClientId),
              startClientId
            ];
            const endPath = [
              ...getBlockParents2(endClientId),
              endClientId
            ];
            const depth = findDepth(startPath, endPath);
            if (startPath[depth] !== startClientId || endPath[depth] !== endClientId) {
              multiSelect2(startPath[depth], endPath[depth]);
              return;
            }
            const richTextElementStart = getRichTextElement(startNode);
            const richTextElementEnd = getRichTextElement(endNode);
            if (richTextElementStart && richTextElementEnd) {
              const range2 = selection2.getRangeAt(0);
              const richTextDataStart = (0, import_rich_text4.create)({
                element: richTextElementStart,
                range: range2,
                __unstableIsEditableTree: true
              });
              const richTextDataEnd = (0, import_rich_text4.create)({
                element: richTextElementEnd,
                range: range2,
                __unstableIsEditableTree: true
              });
              const startOffset = richTextDataStart.start ?? richTextDataStart.end;
              const endOffset = richTextDataEnd.start ?? richTextDataEnd.end;
              selectionChange2({
                start: {
                  clientId: startClientId,
                  attributeKey: richTextElementStart.dataset.wpBlockAttributeKey,
                  offset: startOffset
                },
                end: {
                  clientId: endClientId,
                  attributeKey: richTextElementEnd.dataset.wpBlockAttributeKey,
                  offset: endOffset
                }
              });
            } else {
              multiSelect2(startClientId, endClientId);
            }
          }
        }
        ownerDocument.addEventListener(
          "selectionchange",
          onSelectionChange
        );
        defaultView.addEventListener("mouseup", onSelectionChange);
        return () => {
          ownerDocument.removeEventListener(
            "selectionchange",
            onSelectionChange
          );
          defaultView.removeEventListener("mouseup", onSelectionChange);
        };
      },
      [multiSelect2, selectBlock2, selectionChange2, getBlockParents2]
    );
  }

  // packages/block-editor/build-module/components/writing-flow/use-click-selection.mjs
  var import_data42 = __toESM(require_data(), 1);
  var import_compose26 = __toESM(require_compose(), 1);
  function useClickSelection() {
    const { selectBlock: selectBlock2 } = (0, import_data42.useDispatch)(store);
    const { isSelectionEnabled: isSelectionEnabled3, getBlockSelectionStart: getBlockSelectionStart2, hasMultiSelection: hasMultiSelection2 } = (0, import_data42.useSelect)(store);
    return (0, import_compose26.useRefEffect)(
      (node) => {
        function onMouseDown(event) {
          if (!isSelectionEnabled3() || event.button !== 0) {
            return;
          }
          const startClientId = getBlockSelectionStart2();
          const clickedClientId = getBlockClientId(event.target);
          if (event.shiftKey) {
            if (startClientId && startClientId !== clickedClientId) {
              node.contentEditable = true;
              node.focus();
            }
          } else if (hasMultiSelection2()) {
            selectBlock2(clickedClientId);
          }
        }
        node.addEventListener("mousedown", onMouseDown);
        return () => {
          node.removeEventListener("mousedown", onMouseDown);
        };
      },
      [
        selectBlock2,
        isSelectionEnabled3,
        getBlockSelectionStart2,
        hasMultiSelection2
      ]
    );
  }

  // packages/block-editor/build-module/components/writing-flow/use-input.mjs
  var import_data43 = __toESM(require_data(), 1);
  var import_compose27 = __toESM(require_compose(), 1);
  var import_keycodes6 = __toESM(require_keycodes(), 1);
  var import_blocks25 = __toESM(require_blocks(), 1);
  function useInput() {
    const {
      __unstableIsFullySelected: __unstableIsFullySelected2,
      getSelectedBlockClientIds: getSelectedBlockClientIds2,
      getSelectedBlockClientId: getSelectedBlockClientId2,
      __unstableIsSelectionMergeable: __unstableIsSelectionMergeable2,
      hasMultiSelection: hasMultiSelection2,
      getBlockName: getBlockName2,
      canInsertBlockType: canInsertBlockType2,
      getBlockRootClientId: getBlockRootClientId2,
      getSelectionStart: getSelectionStart2,
      getSelectionEnd: getSelectionEnd2,
      getBlockAttributes: getBlockAttributes3
    } = (0, import_data43.useSelect)(store);
    const {
      replaceBlocks: replaceBlocks2,
      __unstableSplitSelection: __unstableSplitSelection2,
      removeBlocks: removeBlocks2,
      __unstableDeleteSelection: __unstableDeleteSelection2,
      __unstableExpandSelection: __unstableExpandSelection2,
      __unstableMarkAutomaticChange: __unstableMarkAutomaticChange2
    } = (0, import_data43.useDispatch)(store);
    return (0, import_compose27.useRefEffect)((node) => {
      function onBeforeInput(event) {
        if (node.contentEditable === "true") {
          event.preventDefault();
        }
      }
      function onKeyDown(event) {
        if (event.defaultPrevented) {
          return;
        }
        if (!hasMultiSelection2()) {
          if (event.keyCode === import_keycodes6.ENTER) {
            if (event.shiftKey || __unstableIsFullySelected2()) {
              return;
            }
            const clientId = getSelectedBlockClientId2();
            const blockName = getBlockName2(clientId);
            const selectionStart = getSelectionStart2();
            const selectionEnd = getSelectionEnd2();
            if (selectionStart.attributeKey === selectionEnd.attributeKey) {
              const selectedAttributeValue = getBlockAttributes3(clientId)[selectionStart.attributeKey];
              const transforms = (0, import_blocks25.getBlockTransforms)("from").filter(
                ({ type }) => type === "enter"
              );
              const transformation = (0, import_blocks25.findTransform)(
                transforms,
                (item) => {
                  return item.regExp.test(
                    selectedAttributeValue
                  );
                }
              );
              if (transformation) {
                replaceBlocks2(
                  clientId,
                  transformation.transform({
                    content: selectedAttributeValue
                  })
                );
                __unstableMarkAutomaticChange2();
                return;
              }
            }
            if (!(0, import_blocks25.hasBlockSupport)(blockName, "splitting", false) && !event.__deprecatedOnSplit) {
              return;
            }
            if (canInsertBlockType2(
              (0, import_blocks25.getDefaultBlockName)(),
              getBlockRootClientId2(clientId)
            ) || canInsertBlockType2(
              blockName,
              getBlockRootClientId2(clientId)
            )) {
              __unstableSplitSelection2();
              event.preventDefault();
            }
          }
          return;
        }
        if (event.keyCode === import_keycodes6.ENTER) {
          node.contentEditable = false;
          event.preventDefault();
          if (__unstableIsFullySelected2()) {
            replaceBlocks2(
              getSelectedBlockClientIds2(),
              (0, import_blocks25.createBlock)((0, import_blocks25.getDefaultBlockName)())
            );
          } else {
            __unstableSplitSelection2();
          }
        } else if (event.keyCode === import_keycodes6.BACKSPACE || event.keyCode === import_keycodes6.DELETE) {
          node.contentEditable = false;
          event.preventDefault();
          if (__unstableIsFullySelected2()) {
            removeBlocks2(getSelectedBlockClientIds2());
          } else if (__unstableIsSelectionMergeable2()) {
            __unstableDeleteSelection2(event.keyCode === import_keycodes6.DELETE);
          } else {
            __unstableExpandSelection2();
          }
        } else if (
          // If key.length is longer than 1, it's a control key that doesn't
          // input anything.
          event.key.length === 1 && !(event.metaKey || event.ctrlKey)
        ) {
          node.contentEditable = false;
          if (__unstableIsSelectionMergeable2()) {
            __unstableDeleteSelection2(event.keyCode === import_keycodes6.DELETE);
          } else {
            event.preventDefault();
            node.ownerDocument.defaultView.getSelection().removeAllRanges();
          }
        }
      }
      function onCompositionStart(event) {
        if (!hasMultiSelection2()) {
          return;
        }
        node.contentEditable = false;
        if (__unstableIsSelectionMergeable2()) {
          __unstableDeleteSelection2();
        } else {
          event.preventDefault();
          node.ownerDocument.defaultView.getSelection().removeAllRanges();
        }
      }
      node.addEventListener("beforeinput", onBeforeInput);
      node.addEventListener("keydown", onKeyDown);
      node.addEventListener("compositionstart", onCompositionStart);
      return () => {
        node.removeEventListener("beforeinput", onBeforeInput);
        node.removeEventListener("keydown", onKeyDown);
        node.removeEventListener("compositionstart", onCompositionStart);
      };
    }, []);
  }

  // packages/block-editor/build-module/components/writing-flow/use-clipboard-handler.mjs
  var import_blocks28 = __toESM(require_blocks(), 1);
  var import_dom19 = __toESM(require_dom(), 1);
  var import_data45 = __toESM(require_data(), 1);
  var import_compose28 = __toESM(require_compose(), 1);

  // packages/block-editor/build-module/utils/use-notify-copy.mjs
  var import_element42 = __toESM(require_element(), 1);
  var import_blocks26 = __toESM(require_blocks(), 1);
  var import_data44 = __toESM(require_data(), 1);
  var import_i18n34 = __toESM(require_i18n(), 1);
  var import_notices4 = __toESM(require_notices(), 1);
  function useNotifyCopy() {
    const { getBlockName: getBlockName2 } = (0, import_data44.useSelect)(store);
    const { getBlockType: getBlockType27 } = (0, import_data44.useSelect)(import_blocks26.store);
    const { createSuccessNotice } = (0, import_data44.useDispatch)(import_notices4.store);
    return (0, import_element42.useCallback)(
      (eventType, selectedBlockClientIds) => {
        let notice = "";
        if (eventType === "copyStyles") {
          notice = (0, import_i18n34.__)("Styles copied to clipboard.");
        } else if (selectedBlockClientIds.length === 1) {
          const clientId = selectedBlockClientIds[0];
          const title = getBlockType27(getBlockName2(clientId))?.title;
          if (eventType === "copy") {
            notice = (0, import_i18n34.sprintf)(
              // Translators: %s: Name of the block being copied, e.g. "Paragraph".
              (0, import_i18n34.__)('Copied "%s" to clipboard.'),
              title
            );
          } else {
            notice = (0, import_i18n34.sprintf)(
              // Translators: %s: Name of the block being cut, e.g. "Paragraph".
              (0, import_i18n34.__)('Moved "%s" to clipboard.'),
              title
            );
          }
        } else if (eventType === "copy") {
          notice = (0, import_i18n34.sprintf)(
            // Translators: %d: Number of blocks being copied.
            (0, import_i18n34._n)(
              "Copied %d block to clipboard.",
              "Copied %d blocks to clipboard.",
              selectedBlockClientIds.length
            ),
            selectedBlockClientIds.length
          );
        } else {
          notice = (0, import_i18n34.sprintf)(
            // Translators: %d: Number of blocks being moved.
            (0, import_i18n34._n)(
              "Moved %d block to clipboard.",
              "Moved %d blocks to clipboard.",
              selectedBlockClientIds.length
            ),
            selectedBlockClientIds.length
          );
        }
        createSuccessNotice(notice, {
          type: "snackbar"
        });
      },
      [createSuccessNotice, getBlockName2, getBlockType27]
    );
  }

  // packages/block-editor/build-module/components/writing-flow/utils.mjs
  var import_dom18 = __toESM(require_dom(), 1);
  var import_blocks27 = __toESM(require_blocks(), 1);

  // packages/block-editor/build-module/utils/pasting.mjs
  var import_dom17 = __toESM(require_dom(), 1);
  function removeWindowsFragments(html) {
    const startStr = "<!--StartFragment-->";
    const startIdx = html.indexOf(startStr);
    if (startIdx > -1) {
      html = html.substring(startIdx + startStr.length);
    } else {
      return html;
    }
    const endStr = "<!--EndFragment-->";
    const endIdx = html.indexOf(endStr);
    if (endIdx > -1) {
      html = html.substring(0, endIdx);
    }
    return html;
  }
  function removeCharsetMetaTag(html) {
    const metaTag = `<meta charset='utf-8'>`;
    if (html.startsWith(metaTag)) {
      return html.slice(metaTag.length);
    }
    return html;
  }
  function getPasteEventData({ clipboardData }) {
    let plainText = "";
    let html = "";
    try {
      plainText = clipboardData.getData("text/plain");
      html = clipboardData.getData("text/html");
    } catch (error) {
      return;
    }
    html = removeWindowsFragments(html);
    html = removeCharsetMetaTag(html);
    const files = (0, import_dom17.getFilesFromDataTransfer)(clipboardData);
    if (files.length && !shouldDismissPastedFiles(files, html)) {
      return { files };
    }
    return { html, plainText, files: [] };
  }
  function shouldDismissPastedFiles(files, html) {
    if (html && files?.length === 1 && files[0].type.indexOf("image/") === 0) {
      const IMAGE_TAG = /<\s*img\b/gi;
      if (html.match(IMAGE_TAG)?.length !== 1) {
        return true;
      }
      const IMG_WITH_LOCAL_SRC = /<\s*img\b[^>]*\bsrc="file:\/\//i;
      if (html.match(IMG_WITH_LOCAL_SRC)) {
        return true;
      }
    }
    return false;
  }

  // packages/block-editor/build-module/components/writing-flow/utils.mjs
  var requiresWrapperOnCopy = /* @__PURE__ */ Symbol("requiresWrapperOnCopy");
  function setClipboardBlocks(event, blocks2, registry) {
    let _blocks = blocks2;
    const [firstBlock] = blocks2;
    if (firstBlock) {
      const firstBlockType = registry.select(import_blocks27.store).getBlockType(firstBlock.name);
      if (firstBlockType[requiresWrapperOnCopy]) {
        const { getBlockRootClientId: getBlockRootClientId2, getBlockName: getBlockName2, getBlockAttributes: getBlockAttributes3 } = registry.select(store);
        const wrapperBlockClientId = getBlockRootClientId2(
          firstBlock.clientId
        );
        const wrapperBlockName = getBlockName2(wrapperBlockClientId);
        if (wrapperBlockName) {
          _blocks = (0, import_blocks27.createBlock)(
            wrapperBlockName,
            getBlockAttributes3(wrapperBlockClientId),
            _blocks
          );
        }
      }
    }
    const serialized = (0, import_blocks27.serialize)(_blocks);
    event.clipboardData.setData("text/plain", toPlainText(serialized));
    event.clipboardData.setData("text/html", serialized);
  }
  function getPasteBlocks(event, canUserUseUnfilteredHTML) {
    const { plainText, html, files } = getPasteEventData(event);
    let blocks2 = [];
    if (files.length) {
      const fromTransforms = (0, import_blocks27.getBlockTransforms)("from");
      blocks2 = files.reduce((accumulator, file) => {
        const transformation = (0, import_blocks27.findTransform)(
          fromTransforms,
          (transform) => transform.type === "files" && transform.isMatch([file])
        );
        if (transformation) {
          accumulator.push(transformation.transform([file]));
        }
        return accumulator;
      }, []).flat();
    } else {
      blocks2 = (0, import_blocks27.pasteHandler)({
        HTML: html,
        plainText,
        mode: "BLOCKS",
        canUserUseUnfilteredHTML
      });
    }
    return blocks2;
  }
  function toPlainText(html) {
    html = html.replace(/<br>/g, "\n");
    const plainText = (0, import_dom18.__unstableStripHTML)(html).trim();
    return plainText.replace(/\n\n+/g, "\n\n");
  }

  // packages/block-editor/build-module/components/writing-flow/use-clipboard-handler.mjs
  function useClipboardHandler() {
    const registry = (0, import_data45.useRegistry)();
    const {
      getBlocksByClientId: getBlocksByClientId2,
      getSelectedBlockClientIds: getSelectedBlockClientIds2,
      hasMultiSelection: hasMultiSelection2,
      getSettings: getSettings7,
      getBlockName: getBlockName2,
      __unstableIsFullySelected: __unstableIsFullySelected2,
      __unstableIsSelectionCollapsed: __unstableIsSelectionCollapsed2,
      __unstableIsSelectionMergeable: __unstableIsSelectionMergeable2,
      __unstableGetSelectedBlocksWithPartialSelection: __unstableGetSelectedBlocksWithPartialSelection2,
      canInsertBlockType: canInsertBlockType2,
      getBlockRootClientId: getBlockRootClientId2
    } = (0, import_data45.useSelect)(store);
    const {
      flashBlock: flashBlock2,
      removeBlocks: removeBlocks2,
      replaceBlocks: replaceBlocks2,
      __unstableDeleteSelection: __unstableDeleteSelection2,
      __unstableExpandSelection: __unstableExpandSelection2,
      __unstableSplitSelection: __unstableSplitSelection2
    } = (0, import_data45.useDispatch)(store);
    const notifyCopy = useNotifyCopy();
    return (0, import_compose28.useRefEffect)((node) => {
      function handler(event) {
        if (event.defaultPrevented) {
          return;
        }
        const selectedBlockClientIds = getSelectedBlockClientIds2();
        if (selectedBlockClientIds.length === 0) {
          return;
        }
        if (!hasMultiSelection2()) {
          const { target } = event;
          const { ownerDocument } = target;
          const hasSelection = event.type === "copy" || event.type === "cut" ? (0, import_dom19.documentHasUncollapsedSelection)(ownerDocument) : (0, import_dom19.documentHasSelection)(ownerDocument) && !ownerDocument.activeElement.isContentEditable;
          if (hasSelection) {
            return;
          }
        }
        const { activeElement } = event.target.ownerDocument;
        if (!node.contains(activeElement)) {
          return;
        }
        const isSelectionMergeable = __unstableIsSelectionMergeable2();
        const shouldHandleWholeBlocks = __unstableIsSelectionCollapsed2() || __unstableIsFullySelected2();
        const expandSelectionIsNeeded = !shouldHandleWholeBlocks && !isSelectionMergeable;
        if (event.type === "copy" || event.type === "cut") {
          event.preventDefault();
          if (selectedBlockClientIds.length === 1) {
            flashBlock2(selectedBlockClientIds[0]);
          }
          if (expandSelectionIsNeeded) {
            __unstableExpandSelection2();
          } else {
            notifyCopy(event.type, selectedBlockClientIds);
            let blocks2;
            if (shouldHandleWholeBlocks) {
              blocks2 = getBlocksByClientId2(selectedBlockClientIds);
            } else {
              const [head, tail] = __unstableGetSelectedBlocksWithPartialSelection2();
              const inBetweenBlocks = getBlocksByClientId2(
                selectedBlockClientIds.slice(
                  1,
                  selectedBlockClientIds.length - 1
                )
              );
              blocks2 = [head, ...inBetweenBlocks, tail];
            }
            setClipboardBlocks(event, blocks2, registry);
          }
        }
        if (event.type === "cut") {
          if (shouldHandleWholeBlocks && !expandSelectionIsNeeded) {
            removeBlocks2(selectedBlockClientIds);
          } else {
            event.target.ownerDocument.activeElement.contentEditable = false;
            __unstableDeleteSelection2();
          }
        } else if (event.type === "paste") {
          const {
            __experimentalCanUserUseUnfilteredHTML: canUserUseUnfilteredHTML,
            mediaUpload: mediaUpload2
          } = getSettings7();
          const isInternal = event.clipboardData.getData("rich-text") === "true";
          if (isInternal) {
            return;
          }
          const { plainText, html, files } = getPasteEventData(event);
          const isFullySelected = __unstableIsFullySelected2();
          let blocks2 = [];
          if (files.length) {
            if (!mediaUpload2) {
              event.preventDefault();
              return;
            }
            const fromTransforms = (0, import_blocks28.getBlockTransforms)("from");
            blocks2 = files.reduce((accumulator, file) => {
              const transformation = (0, import_blocks28.findTransform)(
                fromTransforms,
                (transform) => transform.type === "files" && transform.isMatch([file])
              );
              if (transformation) {
                accumulator.push(
                  transformation.transform([file])
                );
              }
              return accumulator;
            }, []).flat();
          } else {
            blocks2 = (0, import_blocks28.pasteHandler)({
              HTML: html,
              plainText,
              mode: isFullySelected ? "BLOCKS" : "AUTO",
              canUserUseUnfilteredHTML
            });
          }
          if (typeof blocks2 === "string") {
            return;
          }
          if (isFullySelected) {
            replaceBlocks2(
              selectedBlockClientIds,
              blocks2,
              blocks2.length - 1,
              -1
            );
            event.preventDefault();
            return;
          }
          if (!hasMultiSelection2() && !(0, import_blocks28.hasBlockSupport)(
            getBlockName2(selectedBlockClientIds[0]),
            "splitting",
            false
          ) && !event.__deprecatedOnSplit) {
            return;
          }
          const [firstSelectedClientId] = selectedBlockClientIds;
          const rootClientId = getBlockRootClientId2(
            firstSelectedClientId
          );
          const newBlocks = [];
          for (const block of blocks2) {
            if (canInsertBlockType2(block.name, rootClientId)) {
              newBlocks.push(block);
            } else {
              const rootBlockName = getBlockName2(rootClientId);
              const switchedBlocks = block.name !== rootBlockName ? (0, import_blocks28.switchToBlockType)(block, rootBlockName) : [block];
              if (!switchedBlocks) {
                return;
              }
              for (const switchedBlock of switchedBlocks) {
                for (const innerBlock of switchedBlock.innerBlocks) {
                  newBlocks.push(innerBlock);
                }
              }
            }
          }
          __unstableSplitSelection2(newBlocks);
          event.preventDefault();
        }
      }
      node.ownerDocument.addEventListener("copy", handler);
      node.ownerDocument.addEventListener("cut", handler);
      node.ownerDocument.addEventListener("paste", handler);
      return () => {
        node.ownerDocument.removeEventListener("copy", handler);
        node.ownerDocument.removeEventListener("cut", handler);
        node.ownerDocument.removeEventListener("paste", handler);
      };
    }, []);
  }

  // packages/block-editor/build-module/components/writing-flow/index.mjs
  var import_jsx_runtime158 = __toESM(require_jsx_runtime(), 1);
  function useWritingFlow() {
    const [before, ref, after] = useTabNav();
    const hasMultiSelection2 = (0, import_data46.useSelect)(
      (select3) => select3(store).hasMultiSelection(),
      []
    );
    return [
      before,
      (0, import_compose29.useMergeRefs)([
        ref,
        useClipboardHandler(),
        useInput(),
        useDragSelection(),
        useSelectionObserver(),
        useClickSelection(),
        useMultiSelection(),
        useSelectAll(),
        useArrowNav(),
        usePreviewModeNav(),
        (0, import_compose29.useRefEffect)(
          (node) => {
            node.tabIndex = 0;
            node.dataset.hasMultiSelection = hasMultiSelection2;
            if (!hasMultiSelection2) {
              return () => {
                delete node.dataset.hasMultiSelection;
              };
            }
            node.setAttribute(
              "aria-label",
              (0, import_i18n35.__)("Multiple selected blocks")
            );
            return () => {
              delete node.dataset.hasMultiSelection;
              node.removeAttribute("aria-label");
            };
          },
          [hasMultiSelection2]
        )
      ]),
      after
    ];
  }
  function WritingFlow({ children, ...props }, forwardedRef) {
    const [before, ref, after] = useWritingFlow();
    return /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(import_jsx_runtime158.Fragment, { children: [
      before,
      /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
        "div",
        {
          ...props,
          ref: (0, import_compose29.useMergeRefs)([ref, forwardedRef]),
          className: clsx_default(
            props.className,
            "block-editor-writing-flow"
          ),
          children
        }
      ),
      after
    ] });
  }
  var writing_flow_default = (0, import_element43.forwardRef)(WritingFlow);

  // packages/block-editor/build-module/components/iframe/get-compatibility-styles.mjs
  var compatibilityStyles = null;
  function getCompatibilityStyles() {
    if (compatibilityStyles) {
      return compatibilityStyles;
    }
    compatibilityStyles = Array.from(document.styleSheets).reduce(
      (accumulator, styleSheet) => {
        try {
          styleSheet.cssRules;
        } catch (e2) {
          return accumulator;
        }
        const { ownerNode, cssRules } = styleSheet;
        if (ownerNode === null) {
          return accumulator;
        }
        if (!cssRules) {
          return accumulator;
        }
        if (ownerNode.id.startsWith("wp-")) {
          return accumulator;
        }
        if (!ownerNode.id) {
          return accumulator;
        }
        function matchFromRules(_cssRules) {
          return Array.from(_cssRules).find(
            ({
              selectorText,
              conditionText,
              cssRules: __cssRules
            }) => {
              if (conditionText) {
                return matchFromRules(__cssRules);
              }
              return selectorText && (selectorText.includes(
                ".editor-styles-wrapper"
              ) || selectorText.includes(".wp-block"));
            }
          );
        }
        if (matchFromRules(cssRules)) {
          const isInline = ownerNode.tagName === "STYLE";
          if (isInline) {
            const mainStylesCssId = ownerNode.id.replace(
              "-inline-css",
              "-css"
            );
            const mainStylesElement = document.getElementById(mainStylesCssId);
            if (mainStylesElement) {
              accumulator.push(mainStylesElement.cloneNode(true));
            }
          }
          accumulator.push(ownerNode.cloneNode(true));
          if (!isInline) {
            const inlineStylesCssId = ownerNode.id.replace(
              "-css",
              "-inline-css"
            );
            const inlineStylesElement = document.getElementById(inlineStylesCssId);
            if (inlineStylesElement) {
              accumulator.push(
                inlineStylesElement.cloneNode(true)
              );
            }
          }
        }
        return accumulator;
      },
      []
    );
    return compatibilityStyles;
  }

  // packages/block-editor/build-module/components/iframe/use-scale-canvas.mjs
  var import_element44 = __toESM(require_element(), 1);
  var import_compose30 = __toESM(require_compose(), 1);
  function calculateScale({
    frameSize,
    containerWidth,
    maxContainerWidth,
    scaleContainerWidth
  }) {
    return (Math.min(containerWidth, maxContainerWidth) - frameSize * 2) / scaleContainerWidth;
  }
  function computeScrollHeightNext(transitionFrom, transitionTo) {
    const { scaleValue: prevScale, scrollHeight: prevScrollHeight } = transitionFrom;
    const { frameSize, scaleValue } = transitionTo;
    return prevScrollHeight * (scaleValue / prevScale) + frameSize * 2;
  }
  function computeScrollTopNext(transitionFrom, transitionTo) {
    const {
      containerHeight: prevContainerHeight,
      frameSize: prevFrameSize,
      scaleValue: prevScale,
      scrollTop: prevScrollTop
    } = transitionFrom;
    const { containerHeight, frameSize, scaleValue, scrollHeight } = transitionTo;
    let scrollTopNext = prevScrollTop;
    scrollTopNext = (scrollTopNext + prevContainerHeight / 2 - prevFrameSize) / prevScale - prevContainerHeight / 2;
    scrollTopNext = (scrollTopNext + containerHeight / 2) * scaleValue + frameSize - containerHeight / 2;
    scrollTopNext = prevScrollTop <= prevFrameSize ? 0 : scrollTopNext;
    const maxScrollTop = scrollHeight - containerHeight;
    return Math.round(
      Math.min(Math.max(0, scrollTopNext), Math.max(0, maxScrollTop))
    );
  }
  function getAnimationKeyframes(transitionFrom, transitionTo) {
    const {
      scaleValue: prevScale,
      frameSize: prevFrameSize,
      scrollTop
    } = transitionFrom;
    const { scaleValue, frameSize, scrollTop: scrollTopNext } = transitionTo;
    return [
      {
        translate: `0 0`,
        scale: prevScale,
        paddingTop: `${prevFrameSize / prevScale}px`,
        paddingBottom: `${prevFrameSize / prevScale}px`
      },
      {
        translate: `0 ${scrollTop - scrollTopNext}px`,
        scale: scaleValue,
        paddingTop: `${frameSize / scaleValue}px`,
        paddingBottom: `${frameSize / scaleValue}px`
      }
    ];
  }
  function useScaleCanvas({
    frameSize,
    iframeDocument,
    maxContainerWidth = 750,
    scale
  }) {
    const [contentResizeListener, { height: contentHeight }] = (0, import_compose30.useResizeObserver)();
    const [
      containerResizeListener,
      { width: containerWidth, height: containerHeight }
    ] = (0, import_compose30.useResizeObserver)();
    const initialContainerWidthRef = (0, import_element44.useRef)(0);
    const isZoomedOut = scale !== 1;
    const prefersReducedMotion = (0, import_compose30.useReducedMotion)();
    const isAutoScaled = scale === "auto-scaled";
    const startAnimationRef = (0, import_element44.useRef)(false);
    const animationRef = (0, import_element44.useRef)(null);
    (0, import_element44.useEffect)(() => {
      if (!isZoomedOut) {
        initialContainerWidthRef.current = containerWidth;
      }
    }, [containerWidth, isZoomedOut]);
    const scaleContainerWidth = Math.max(
      initialContainerWidthRef.current,
      containerWidth
    );
    const scaleValue = isAutoScaled ? calculateScale({
      frameSize,
      containerWidth,
      maxContainerWidth,
      scaleContainerWidth
    }) : scale;
    const transitionFromRef = (0, import_element44.useRef)({
      scaleValue,
      frameSize,
      containerHeight: 0,
      scrollTop: 0,
      scrollHeight: 0
    });
    const transitionToRef = (0, import_element44.useRef)({
      scaleValue,
      frameSize,
      containerHeight: 0,
      scrollTop: 0,
      scrollHeight: 0
    });
    const startZoomOutAnimation = (0, import_element44.useCallback)(() => {
      const { scrollTop } = transitionFromRef.current;
      const { scrollTop: scrollTopNext } = transitionToRef.current;
      iframeDocument.documentElement.style.setProperty(
        "--wp-block-editor-iframe-zoom-out-scroll-top",
        `${scrollTop}px`
      );
      iframeDocument.documentElement.style.setProperty(
        "--wp-block-editor-iframe-zoom-out-scroll-top-next",
        `${scrollTopNext}px`
      );
      iframeDocument.documentElement.style.setProperty(
        "--wp-block-editor-iframe-zoom-out-overflow-behavior",
        transitionFromRef.current.scrollHeight === transitionFromRef.current.containerHeight ? "auto" : "scroll"
      );
      iframeDocument.documentElement.classList.add("zoom-out-animation");
      return iframeDocument.documentElement.animate(
        getAnimationKeyframes(
          transitionFromRef.current,
          transitionToRef.current
        ),
        {
          easing: "cubic-bezier(0.46, 0.03, 0.52, 0.96)",
          duration: 400
        }
      );
    }, [iframeDocument]);
    const finishZoomOutAnimation = (0, import_element44.useCallback)(() => {
      startAnimationRef.current = false;
      animationRef.current = null;
      iframeDocument.documentElement.style.setProperty(
        "--wp-block-editor-iframe-zoom-out-scale",
        transitionToRef.current.scaleValue
      );
      iframeDocument.documentElement.style.setProperty(
        "--wp-block-editor-iframe-zoom-out-frame-size",
        `${transitionToRef.current.frameSize}px`
      );
      iframeDocument.documentElement.classList.remove("zoom-out-animation");
      iframeDocument.documentElement.scrollTop = transitionToRef.current.scrollTop;
      iframeDocument.documentElement.style.removeProperty(
        "--wp-block-editor-iframe-zoom-out-scroll-top"
      );
      iframeDocument.documentElement.style.removeProperty(
        "--wp-block-editor-iframe-zoom-out-scroll-top-next"
      );
      iframeDocument.documentElement.style.removeProperty(
        "--wp-block-editor-iframe-zoom-out-overflow-behavior"
      );
      transitionFromRef.current = transitionToRef.current;
    }, [iframeDocument]);
    const previousIsZoomedOut = (0, import_element44.useRef)(false);
    (0, import_element44.useEffect)(() => {
      const trigger = iframeDocument && previousIsZoomedOut.current !== isZoomedOut;
      previousIsZoomedOut.current = isZoomedOut;
      if (!trigger) {
        return;
      }
      startAnimationRef.current = true;
      if (!isZoomedOut) {
        return;
      }
      iframeDocument.documentElement.classList.add("is-zoomed-out");
      return () => {
        iframeDocument.documentElement.classList.remove("is-zoomed-out");
      };
    }, [iframeDocument, isZoomedOut]);
    (0, import_element44.useEffect)(() => {
      if (!iframeDocument) {
        return;
      }
      if (isAutoScaled && transitionFromRef.current.scaleValue !== 1) {
        transitionFromRef.current.scaleValue = calculateScale({
          frameSize: transitionFromRef.current.frameSize,
          containerWidth,
          maxContainerWidth,
          scaleContainerWidth: containerWidth
        });
      }
      if (scaleValue < 1) {
        if (!startAnimationRef.current) {
          iframeDocument.documentElement.style.setProperty(
            "--wp-block-editor-iframe-zoom-out-scale",
            scaleValue
          );
          iframeDocument.documentElement.style.setProperty(
            "--wp-block-editor-iframe-zoom-out-frame-size",
            `${frameSize}px`
          );
        }
        iframeDocument.documentElement.style.setProperty(
          "--wp-block-editor-iframe-zoom-out-content-height",
          `${contentHeight}px`
        );
        iframeDocument.documentElement.style.setProperty(
          "--wp-block-editor-iframe-zoom-out-inner-height",
          `${containerHeight}px`
        );
        iframeDocument.documentElement.style.setProperty(
          "--wp-block-editor-iframe-zoom-out-container-width",
          `${containerWidth}px`
        );
        iframeDocument.documentElement.style.setProperty(
          "--wp-block-editor-iframe-zoom-out-scale-container-width",
          `${scaleContainerWidth}px`
        );
      }
      if (startAnimationRef.current) {
        startAnimationRef.current = false;
        if (animationRef.current) {
          animationRef.current.reverse();
          const tempTransitionFrom = transitionFromRef.current;
          const tempTransitionTo = transitionToRef.current;
          transitionFromRef.current = tempTransitionTo;
          transitionToRef.current = tempTransitionFrom;
        } else {
          transitionFromRef.current.scrollTop = iframeDocument.documentElement.scrollTop;
          transitionFromRef.current.scrollHeight = iframeDocument.documentElement.scrollHeight;
          transitionFromRef.current.containerHeight = containerHeight;
          transitionToRef.current = {
            scaleValue,
            frameSize,
            containerHeight: iframeDocument.documentElement.clientHeight
            // use clientHeight to get the actual height of the new container after zoom state changes have rendered, as it will be the most up-to-date.
          };
          transitionToRef.current.scrollHeight = computeScrollHeightNext(
            transitionFromRef.current,
            transitionToRef.current
          );
          transitionToRef.current.scrollTop = computeScrollTopNext(
            transitionFromRef.current,
            transitionToRef.current
          );
          animationRef.current = startZoomOutAnimation();
          if (prefersReducedMotion) {
            finishZoomOutAnimation();
          } else {
            animationRef.current.onfinish = finishZoomOutAnimation;
          }
        }
      }
    }, [
      startZoomOutAnimation,
      finishZoomOutAnimation,
      prefersReducedMotion,
      isAutoScaled,
      scaleValue,
      frameSize,
      iframeDocument,
      contentHeight,
      containerWidth,
      containerHeight,
      maxContainerWidth,
      scaleContainerWidth
    ]);
    return {
      isZoomedOut,
      scaleContainerWidth,
      contentResizeListener,
      containerResizeListener
    };
  }

  // packages/block-editor/build-module/components/iframe/index.mjs
  var import_jsx_runtime159 = __toESM(require_jsx_runtime(), 1);
  function bubbleEvent(event, Constructor, frame) {
    const init = {};
    for (const key in event) {
      init[key] = event[key];
    }
    if (event instanceof frame.contentDocument.defaultView.MouseEvent) {
      const rect = frame.getBoundingClientRect();
      init.clientX += rect.left;
      init.clientY += rect.top;
    }
    const newEvent = new Constructor(event.type, init);
    if (init.defaultPrevented) {
      newEvent.preventDefault();
    }
    const cancelled = !frame.dispatchEvent(newEvent);
    if (cancelled) {
      event.preventDefault();
    }
  }
  function useBubbleEvents(iframeDocument) {
    return (0, import_compose31.useRefEffect)(() => {
      const { defaultView } = iframeDocument;
      if (!defaultView) {
        return;
      }
      const { frameElement } = defaultView;
      const html = iframeDocument.documentElement;
      const eventTypes = ["dragover", "mousemove"];
      const handlers = {};
      for (const name of eventTypes) {
        handlers[name] = (event) => {
          const prototype = Object.getPrototypeOf(event);
          const constructorName = prototype.constructor.name;
          const Constructor = window[constructorName];
          bubbleEvent(event, Constructor, frameElement);
        };
        html.addEventListener(name, handlers[name]);
      }
      return () => {
        for (const name of eventTypes) {
          html.removeEventListener(name, handlers[name]);
        }
      };
    });
  }
  var iframeSrcCache = /* @__PURE__ */ new WeakMap();
  var iframeSrcCleanup = globalThis.FinalizationRegistry ? new globalThis.FinalizationRegistry(
    (url) => URL.revokeObjectURL(url)
  ) : void 0;
  function getIframeSrc(resolvedAssets) {
    let src = iframeSrcCache.get(resolvedAssets);
    if (src) {
      return src;
    }
    const html = `<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<base href="${window.location.href}">
		<script>window.frameElement._load()<\/script>
		<style>
			html{
				height: auto !important;
				min-height: 100%;
			}
			/* Lowest specificity to not override global styles */
			:where(body) {
				margin: 0;
				/* Default background color in case zoom out mode background
				colors the html element */
				background-color: white;
			}
		</style>
		${resolvedAssets.styles ?? ""}
		${resolvedAssets.scripts ?? ""}
	</head>
	<body>
		<script>document.currentScript.parentElement.remove()<\/script>
	</body>
</html>`;
    src = URL.createObjectURL(new Blob([html], { type: "text/html" }));
    iframeSrcCache.set(resolvedAssets, src);
    iframeSrcCleanup?.register(resolvedAssets, src);
    return src;
  }
  function Iframe({
    contentRef,
    children,
    tabIndex = 0,
    scale = 1,
    frameSize = 0,
    readonly,
    forwardedRef: ref,
    title = (0, import_i18n36.__)("Editor canvas"),
    ...props
  }) {
    const { resolvedAssets, isPreviewMode } = (0, import_data47.useSelect)((select3) => {
      const settings2 = select3(store).getSettings();
      return {
        resolvedAssets: settings2.__unstableResolvedAssets,
        isPreviewMode: settings2.isPreviewMode
      };
    }, []);
    const [iframeDocument, setIframeDocument] = (0, import_element45.useState)();
    const [bodyClasses, setBodyClasses] = (0, import_element45.useState)([]);
    const [before, writingFlowRef, after] = useWritingFlow();
    const setRef = (0, import_compose31.useRefEffect)((node) => {
      node._load = () => {
        setIframeDocument(node.contentDocument);
      };
      let iFrameDocument;
      function preventFileDropDefault(event) {
        event.preventDefault();
      }
      function interceptLinkClicks(event) {
        if (event.target.tagName === "A" && event.target.getAttribute("href")?.startsWith("#")) {
          event.preventDefault();
          iFrameDocument.defaultView.location.hash = event.target.getAttribute("href").slice(1);
        }
      }
      const { ownerDocument } = node;
      setBodyClasses(
        Array.from(ownerDocument.body.classList).filter(
          (name) => name.startsWith("admin-color-") || name.startsWith("post-type-") || name === "wp-embed-responsive"
        )
      );
      function onLoad() {
        const { contentDocument } = node;
        const { documentElement } = contentDocument;
        iFrameDocument = contentDocument;
        documentElement.classList.add("block-editor-iframe__html");
        contentDocument.dir = ownerDocument.dir;
        for (const compatStyle of getCompatibilityStyles()) {
          if (contentDocument.getElementById(compatStyle.id)) {
            continue;
          }
          contentDocument.head.appendChild(
            compatStyle.cloneNode(true)
          );
          if (!isPreviewMode) {
            console.warn(
              `${compatStyle.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,
              compatStyle
            );
          }
        }
        iFrameDocument.addEventListener(
          "dragover",
          preventFileDropDefault,
          false
        );
        iFrameDocument.addEventListener(
          "drop",
          preventFileDropDefault,
          false
        );
        iFrameDocument.addEventListener("click", interceptLinkClicks);
      }
      node.addEventListener("load", onLoad);
      return () => {
        delete node._load;
        node.removeEventListener("load", onLoad);
        iFrameDocument?.removeEventListener(
          "dragover",
          preventFileDropDefault
        );
        iFrameDocument?.removeEventListener(
          "drop",
          preventFileDropDefault
        );
        iFrameDocument?.removeEventListener("click", interceptLinkClicks);
      };
    }, []);
    const {
      contentResizeListener,
      containerResizeListener,
      isZoomedOut,
      scaleContainerWidth
    } = useScaleCanvas({
      scale,
      frameSize: parseInt(frameSize),
      iframeDocument
    });
    const disabledRef = (0, import_compose31.useDisabled)({ isDisabled: !readonly });
    const bodyRef = (0, import_compose31.useMergeRefs)([
      useBubbleEvents(iframeDocument),
      contentRef,
      writingFlowRef,
      disabledRef
    ]);
    const src = getIframeSrc(resolvedAssets);
    const shouldRenderFocusCaptureElements = tabIndex >= 0 && !isPreviewMode;
    const iframe = /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)(import_jsx_runtime159.Fragment, { children: [
      shouldRenderFocusCaptureElements && before,
      /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
        "iframe",
        {
          ...props,
          style: {
            ...props.style,
            height: props.style?.height,
            border: 0
          },
          ref: (0, import_compose31.useMergeRefs)([ref, setRef]),
          tabIndex,
          src,
          title,
          onKeyDown: (event) => {
            if (props.onKeyDown) {
              props.onKeyDown(event);
            }
            if (event.currentTarget.ownerDocument !== event.target.ownerDocument) {
              const { stopPropagation } = event.nativeEvent;
              event.nativeEvent.stopPropagation = () => {
              };
              event.stopPropagation();
              event.nativeEvent.stopPropagation = stopPropagation;
              bubbleEvent(
                event,
                window.KeyboardEvent,
                event.currentTarget
              );
            }
          },
          children: iframeDocument && (0, import_element45.createPortal)(
            /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)(
              "body",
              {
                ref: bodyRef,
                className: clsx_default(
                  "block-editor-iframe__body",
                  "editor-styles-wrapper",
                  ...bodyClasses
                ),
                children: [
                  contentResizeListener,
                  /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(import_components32.__experimentalStyleProvider, { document: iframeDocument, children })
                ]
              }
            ),
            iframeDocument.documentElement
          )
        }
      ),
      shouldRenderFocusCaptureElements && after
    ] });
    return /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)("div", { className: "block-editor-iframe__container", children: [
      containerResizeListener,
      /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
        "div",
        {
          className: clsx_default(
            "block-editor-iframe__scale-container",
            isZoomedOut && "is-zoomed-out"
          ),
          style: {
            "--wp-block-editor-iframe-zoom-out-scale-container-width": isZoomedOut && `${scaleContainerWidth}px`
          },
          children: iframe
        }
      )
    ] });
  }
  function IframeIfReady(props, ref) {
    const isInitialised = (0, import_data47.useSelect)(
      (select3) => select3(store).getSettings().__internalIsInitialized,
      []
    );
    if (!isInitialised) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(Iframe, { ...props, forwardedRef: ref });
  }
  var iframe_default = (0, import_element45.forwardRef)(IframeIfReady);

  // packages/block-editor/build-module/components/editor-styles/index.mjs
  var import_components33 = __toESM(require_components(), 1);
  var import_element46 = __toESM(require_element(), 1);
  var import_data48 = __toESM(require_data(), 1);

  // node_modules/parsel-js/dist/parsel.js
  var TOKENS = {
    attribute: /\[\s*(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?(?<name>[-\w\P{ASCII}]+)\s*(?:(?<operator>\W?=)\s*(?<value>.+?)\s*(\s(?<caseSensitive>[iIsS]))?\s*)?\]/gu,
    id: /#(?<name>[-\w\P{ASCII}]+)/gu,
    class: /\.(?<name>[-\w\P{ASCII}]+)/gu,
    comma: /\s*,\s*/g,
    combinator: /\s*[\s>+~]\s*/g,
    "pseudo-element": /::(?<name>[-\w\P{ASCII}]+)(?:\((?<argument>Â¶*)\))?/gu,
    "pseudo-class": /:(?<name>[-\w\P{ASCII}]+)(?:\((?<argument>Â¶*)\))?/gu,
    universal: /(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?\*/gu,
    type: /(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?(?<name>[-\w\P{ASCII}]+)/gu
    // this must be last
  };
  var TRIM_TOKENS = /* @__PURE__ */ new Set(["combinator", "comma"]);
  var getArgumentPatternByType = (type) => {
    switch (type) {
      case "pseudo-element":
      case "pseudo-class":
        return new RegExp(TOKENS[type].source.replace("(?<argument>\xB6*)", "(?<argument>.*)"), "gu");
      default:
        return TOKENS[type];
    }
  };
  function gobbleParens(text, offset) {
    let nesting = 0;
    let result = "";
    for (; offset < text.length; offset++) {
      const char = text[offset];
      switch (char) {
        case "(":
          ++nesting;
          break;
        case ")":
          --nesting;
          break;
      }
      result += char;
      if (nesting === 0) {
        return result;
      }
    }
    return result;
  }
  function tokenizeBy(text, grammar = TOKENS) {
    if (!text) {
      return [];
    }
    const tokens = [text];
    for (const [type, pattern] of Object.entries(grammar)) {
      for (let i2 = 0; i2 < tokens.length; i2++) {
        const token = tokens[i2];
        if (typeof token !== "string") {
          continue;
        }
        pattern.lastIndex = 0;
        const match2 = pattern.exec(token);
        if (!match2) {
          continue;
        }
        const from = match2.index - 1;
        const args = [];
        const content = match2[0];
        const before = token.slice(0, from + 1);
        if (before) {
          args.push(before);
        }
        args.push({
          ...match2.groups,
          type,
          content
        });
        const after = token.slice(from + content.length + 1);
        if (after) {
          args.push(after);
        }
        tokens.splice(i2, 1, ...args);
      }
    }
    let offset = 0;
    for (const token of tokens) {
      switch (typeof token) {
        case "string":
          throw new Error(`Unexpected sequence ${token} found at index ${offset}`);
        case "object":
          offset += token.content.length;
          token.pos = [offset - token.content.length, offset];
          if (TRIM_TOKENS.has(token.type)) {
            token.content = token.content.trim() || " ";
          }
          break;
      }
    }
    return tokens;
  }
  var STRING_PATTERN = /(['"])([^\\\n]+?)\1/g;
  var ESCAPE_PATTERN = /\\./g;
  function tokenize(selector3, grammar = TOKENS) {
    selector3 = selector3.trim();
    if (selector3 === "") {
      return [];
    }
    const replacements = [];
    selector3 = selector3.replace(ESCAPE_PATTERN, (value, offset) => {
      replacements.push({ value, offset });
      return "\uE000".repeat(value.length);
    });
    selector3 = selector3.replace(STRING_PATTERN, (value, quote, content, offset) => {
      replacements.push({ value, offset });
      return `${quote}${"\uE001".repeat(content.length)}${quote}`;
    });
    {
      let pos = 0;
      let offset;
      while ((offset = selector3.indexOf("(", pos)) > -1) {
        const value = gobbleParens(selector3, offset);
        replacements.push({ value, offset });
        selector3 = `${selector3.substring(0, offset)}(${"\xB6".repeat(value.length - 2)})${selector3.substring(offset + value.length)}`;
        pos = offset + value.length;
      }
    }
    const tokens = tokenizeBy(selector3, grammar);
    const changedTokens = /* @__PURE__ */ new Set();
    for (const replacement of replacements.reverse()) {
      for (const token of tokens) {
        const { offset, value } = replacement;
        if (!(token.pos[0] <= offset && offset + value.length <= token.pos[1])) {
          continue;
        }
        const { content } = token;
        const tokenOffset = offset - token.pos[0];
        token.content = content.slice(0, tokenOffset) + value + content.slice(tokenOffset + value.length);
        if (token.content !== content) {
          changedTokens.add(token);
        }
      }
    }
    for (const token of changedTokens) {
      const pattern = getArgumentPatternByType(token.type);
      if (!pattern) {
        throw new Error(`Unknown token type: ${token.type}`);
      }
      pattern.lastIndex = 0;
      const match2 = pattern.exec(token.content);
      if (!match2) {
        throw new Error(`Unable to parse content for ${token.type}: ${token.content}`);
      }
      Object.assign(token, match2.groups);
    }
    return tokens;
  }
  function* flatten(node, parent) {
    switch (node.type) {
      case "list":
        for (let child of node.list) {
          yield* flatten(child, node);
        }
        break;
      case "complex":
        yield* flatten(node.left, node);
        yield* flatten(node.right, node);
        break;
      case "compound":
        yield* node.list.map((token) => [token, node]);
        break;
      default:
        yield [node, parent];
    }
  }
  function stringify(listOrNode) {
    let tokens;
    if (Array.isArray(listOrNode)) {
      tokens = listOrNode;
    } else {
      tokens = [...flatten(listOrNode)].map(([token]) => token);
    }
    return tokens.map((token) => token.content).join("");
  }

  // packages/block-editor/build-module/utils/transform-styles/index.mjs
  var import_processor = __toESM(require_processor(), 1);
  var import_css_syntax_error = __toESM(require_css_syntax_error(), 1);
  var import_postcss_prefix_selector = __toESM(require_postcss_prefix_selector(), 1);
  var import_postcss_urlrebase = __toESM(require_postcss_urlrebase(), 1);
  var cacheByWrapperSelector = /* @__PURE__ */ new Map();
  var ROOT_SELECTOR_TOKENS = [
    { type: "type", content: "body" },
    { type: "type", content: "html" },
    { type: "pseudo-class", content: ":root" },
    { type: "pseudo-class", content: ":where(body)" },
    { type: "pseudo-class", content: ":where(:root)" },
    { type: "pseudo-class", content: ":where(html)" }
  ];
  function prefixRootSelector(prefix2, selector3) {
    const tokenized = tokenize(selector3);
    const lastRootIndex = tokenized.findLastIndex(({ content, type }) => {
      return ROOT_SELECTOR_TOKENS.some(
        (rootSelector) => content === rootSelector.content && type === rootSelector.type
      );
    });
    let insertionPoint2 = -1;
    for (let i2 = lastRootIndex + 1; i2 < tokenized.length; i2++) {
      if (tokenized[i2].type === "combinator") {
        insertionPoint2 = i2;
        break;
      }
    }
    const tokenizedPrefix = tokenize(prefix2);
    tokenized.splice(
      // Insert at the insertion point, or the end.
      insertionPoint2 === -1 ? tokenized.length : insertionPoint2,
      0,
      {
        type: "combinator",
        content: " "
      },
      ...tokenizedPrefix
    );
    return stringify(tokenized);
  }
  function transformStyle({ css, ignoredSelectors = [], baseURL }, wrapperSelector = "", transformOptions) {
    if (!wrapperSelector && !baseURL) {
      return css;
    }
    try {
      const excludedSelectors = [
        ...ignoredSelectors,
        ...transformOptions?.ignoredSelectors ?? [],
        wrapperSelector
      ];
      return new import_processor.default(
        [
          wrapperSelector && (0, import_postcss_prefix_selector.default)({
            prefix: wrapperSelector,
            transform(prefix2, selector3, prefixedSelector) {
              if (excludedSelectors.some(
                (excludedSelector) => excludedSelector instanceof RegExp ? selector3.match(excludedSelector) : selector3.includes(excludedSelector)
              )) {
                return selector3;
              }
              const hasRootSelector = ROOT_SELECTOR_TOKENS.some(
                (rootSelector) => selector3.startsWith(rootSelector.content)
              );
              if (hasRootSelector) {
                return prefixRootSelector(prefix2, selector3);
              }
              return prefixedSelector;
            }
          }),
          baseURL && (0, import_postcss_urlrebase.default)({ rootUrl: baseURL })
        ].filter(Boolean)
      ).process(css, {}).css;
    } catch (error) {
      if (error instanceof import_css_syntax_error.default) {
        console.warn(
          "wp.blockEditor.transformStyles Failed to transform CSS.",
          error.message + "\n" + error.showSourceCode(false)
        );
      } else {
        console.warn(
          "wp.blockEditor.transformStyles Failed to transform CSS.",
          error
        );
      }
      return null;
    }
  }
  var transformStyles = (styles, wrapperSelector = "", transformOptions) => {
    let cache = cacheByWrapperSelector.get(wrapperSelector);
    if (!cache) {
      cache = /* @__PURE__ */ new WeakMap();
      cacheByWrapperSelector.set(wrapperSelector, cache);
    }
    return styles.map((style) => {
      let css = cache.get(style);
      if (!css) {
        css = transformStyle(style, wrapperSelector, transformOptions);
        cache.set(style, css);
      }
      return css;
    });
  };
  var transform_styles_default = transformStyles;

  // packages/block-editor/build-module/components/editor-styles/index.mjs
  var import_jsx_runtime160 = __toESM(require_jsx_runtime(), 1);
  k([names_default, a11y_default]);
  function useDarkThemeBodyClassName(styles, scope) {
    return (0, import_element46.useCallback)(
      (node) => {
        if (!node) {
          return;
        }
        const { ownerDocument } = node;
        const { defaultView, body } = ownerDocument;
        const canvas = scope ? ownerDocument.querySelector(scope) : body;
        let backgroundColor;
        if (!canvas) {
          const tempCanvas = ownerDocument.createElement("div");
          tempCanvas.classList.add("editor-styles-wrapper");
          body.appendChild(tempCanvas);
          backgroundColor = defaultView?.getComputedStyle(tempCanvas, null).getPropertyValue("background-color");
          body.removeChild(tempCanvas);
        } else {
          backgroundColor = defaultView?.getComputedStyle(canvas, null).getPropertyValue("background-color");
        }
        const colordBackgroundColor = w(backgroundColor);
        if (colordBackgroundColor.luminance() > 0.5 || colordBackgroundColor.alpha() === 0) {
          body.classList.remove("is-dark-theme");
        } else {
          body.classList.add("is-dark-theme");
        }
      },
      [styles, scope]
    );
  }
  function EditorStyles({ styles, scope, transformOptions }) {
    const overrides = (0, import_data48.useSelect)(
      (select3) => unlock(select3(store)).getStyleOverrides(),
      []
    );
    const [transformedStyles, transformedSvgs] = (0, import_element46.useMemo)(() => {
      const _styles = Object.values(styles ?? []);
      for (const [id, override] of overrides) {
        const index = _styles.findIndex(({ id: _id }) => id === _id);
        const overrideWithId = { ...override, id };
        if (index === -1) {
          _styles.push(overrideWithId);
        } else {
          _styles[index] = overrideWithId;
        }
      }
      return [
        transform_styles_default(
          _styles.filter((style) => style?.css),
          scope,
          transformOptions
        ),
        _styles.filter((style) => style.__unstableType === "svgs").map((style) => style.assets).join("")
      ];
    }, [styles, overrides, scope, transformOptions]);
    return /* @__PURE__ */ (0, import_jsx_runtime160.jsxs)(import_jsx_runtime160.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
        "style",
        {
          ref: useDarkThemeBodyClassName(transformedStyles, scope)
        }
      ),
      transformedStyles.map((css, index) => /* @__PURE__ */ (0, import_jsx_runtime160.jsx)("style", { children: css }, index)),
      /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
        import_components33.SVG,
        {
          xmlns: "http://www.w3.org/2000/svg",
          viewBox: "0 0 0 0",
          width: "0",
          height: "0",
          role: "none",
          style: {
            visibility: "hidden",
            position: "absolute",
            left: "-9999px",
            overflow: "hidden"
          },
          dangerouslySetInnerHTML: { __html: transformedSvgs }
        }
      )
    ] });
  }
  var editor_styles_default = (0, import_element46.memo)(EditorStyles);

  // packages/block-editor/build-module/components/block-preview/auto.mjs
  var import_jsx_runtime161 = __toESM(require_jsx_runtime(), 1);
  var MemoizedBlockList = (0, import_element47.memo)(BlockList);
  var MAX_HEIGHT = 2e3;
  var EMPTY_ADDITIONAL_STYLES = [];
  function ScaledBlockPreview({
    viewportWidth,
    containerWidth,
    minHeight,
    additionalStyles = EMPTY_ADDITIONAL_STYLES
  }) {
    if (!viewportWidth) {
      viewportWidth = containerWidth;
    }
    const [contentResizeListener, { height: contentHeight }] = (0, import_compose32.useResizeObserver)();
    const { styles } = (0, import_data49.useSelect)((select3) => {
      const settings2 = select3(store).getSettings();
      return {
        styles: settings2.styles
      };
    }, []);
    const editorStyles = (0, import_element47.useMemo)(() => {
      if (styles) {
        return [
          ...styles,
          {
            css: "body{height:auto;overflow:hidden;border:none;padding:0;}",
            __unstableType: "presets"
          },
          ...additionalStyles
        ];
      }
      return styles;
    }, [styles, additionalStyles]);
    const scale = containerWidth / viewportWidth;
    const aspectRatio = contentHeight ? containerWidth / (contentHeight * scale) : 0;
    return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
      import_components34.Disabled,
      {
        className: "block-editor-block-preview__content",
        style: {
          transform: `scale(${scale})`,
          // Using width + aspect-ratio instead of height here triggers browsers' native
          // handling of scrollbar's visibility. It prevents the flickering issue seen
          // in https://github.com/WordPress/gutenberg/issues/52027.
          // See https://github.com/WordPress/gutenberg/pull/52921 for more info.
          aspectRatio,
          maxHeight: contentHeight > MAX_HEIGHT ? MAX_HEIGHT * scale : void 0,
          minHeight
        },
        children: /* @__PURE__ */ (0, import_jsx_runtime161.jsxs)(
          iframe_default,
          {
            contentRef: (0, import_compose32.useRefEffect)((bodyElement) => {
              const {
                ownerDocument: { documentElement }
              } = bodyElement;
              documentElement.classList.add(
                "block-editor-block-preview__content-iframe"
              );
              documentElement.style.position = "absolute";
              documentElement.style.width = "100%";
              bodyElement.style.boxSizing = "border-box";
              bodyElement.style.position = "absolute";
              bodyElement.style.width = "100%";
            }, []),
            "aria-hidden": true,
            tabIndex: -1,
            style: {
              position: "absolute",
              width: viewportWidth,
              height: contentHeight,
              pointerEvents: "none",
              // This is a catch-all max-height for patterns.
              // See: https://github.com/WordPress/gutenberg/pull/38175.
              maxHeight: MAX_HEIGHT,
              minHeight: scale !== 0 && scale < 1 && minHeight ? minHeight / scale : minHeight
            },
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(editor_styles_default, { styles: editorStyles }),
              contentResizeListener,
              /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(MemoizedBlockList, { renderAppender: false })
            ]
          }
        )
      }
    );
  }
  function AutoBlockPreview(props) {
    const [containerResizeListener, { width: containerWidth }] = (0, import_compose32.useResizeObserver)();
    return /* @__PURE__ */ (0, import_jsx_runtime161.jsxs)(import_jsx_runtime161.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("div", { style: { position: "relative", width: "100%", height: 0 }, children: containerResizeListener }),
      /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("div", { className: "block-editor-block-preview__container", children: !!containerWidth && /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
        ScaledBlockPreview,
        {
          ...props,
          containerWidth
        }
      ) })
    ] });
  }

  // packages/block-editor/build-module/components/block-preview/async.mjs
  var import_element48 = __toESM(require_element(), 1);
  var import_priority_queue = __toESM(require_priority_queue(), 1);
  var blockPreviewQueue = (0, import_priority_queue.createQueue)();
  function Async({ children, placeholder }) {
    const [shouldRender, setShouldRender] = (0, import_element48.useState)(false);
    (0, import_element48.useEffect)(() => {
      const context = {};
      blockPreviewQueue.add(context, () => {
        (0, import_element48.flushSync)(() => {
          setShouldRender(true);
        });
      });
      return () => {
        blockPreviewQueue.cancel(context);
      };
    }, []);
    if (!shouldRender) {
      return placeholder;
    }
    return children;
  }

  // packages/block-editor/build-module/components/block-preview/index.mjs
  var import_jsx_runtime162 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_ADDITIONAL_STYLES2 = [];
  function BlockPreview({
    blocks: blocks2,
    viewportWidth = 1200,
    minHeight,
    additionalStyles = EMPTY_ADDITIONAL_STYLES2,
    // Deprecated props:
    __experimentalMinHeight,
    __experimentalPadding
  }) {
    if (__experimentalMinHeight) {
      minHeight = __experimentalMinHeight;
      (0, import_deprecated7.default)("The __experimentalMinHeight prop", {
        since: "6.2",
        version: "6.4",
        alternative: "minHeight"
      });
    }
    if (__experimentalPadding) {
      additionalStyles = [
        ...additionalStyles,
        { css: `body { padding: ${__experimentalPadding}px; }` }
      ];
      (0, import_deprecated7.default)("The __experimentalPadding prop of BlockPreview", {
        since: "6.2",
        version: "6.4",
        alternative: "additionalStyles"
      });
    }
    const originalSettings = (0, import_data50.useSelect)(
      (select3) => select3(store).getSettings(),
      []
    );
    const settings2 = (0, import_element49.useMemo)(
      () => ({
        ...originalSettings,
        focusMode: false,
        // Disable "Spotlight mode".
        isPreviewMode: true
      }),
      [originalSettings]
    );
    const renderedBlocks = (0, import_element49.useMemo)(
      () => Array.isArray(blocks2) ? blocks2 : [blocks2],
      [blocks2]
    );
    if (!blocks2 || blocks2.length === 0) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
      ExperimentalBlockEditorProvider,
      {
        value: renderedBlocks,
        settings: settings2,
        children: /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
          AutoBlockPreview,
          {
            viewportWidth,
            minHeight,
            additionalStyles
          }
        )
      }
    );
  }
  var MemoizedBlockPreview = (0, import_element49.memo)(BlockPreview);
  MemoizedBlockPreview.Async = Async;
  var block_preview_default = MemoizedBlockPreview;
  function useBlockPreview({ blocks: blocks2, props = {}, layout }) {
    const originalSettings = (0, import_data50.useSelect)(
      (select3) => select3(store).getSettings(),
      []
    );
    const settings2 = (0, import_element49.useMemo)(
      () => ({
        ...originalSettings,
        styles: void 0,
        // Clear styles included by the parent settings, as they are already output by the parent's EditorStyles.
        focusMode: false,
        // Disable "Spotlight mode".
        isPreviewMode: true
      }),
      [originalSettings]
    );
    const disabledRef = (0, import_compose33.useDisabled)();
    const ref = (0, import_compose33.useMergeRefs)([props.ref, disabledRef]);
    const renderedBlocks = (0, import_element49.useMemo)(
      () => Array.isArray(blocks2) ? blocks2 : [blocks2],
      [blocks2]
    );
    const children = /* @__PURE__ */ (0, import_jsx_runtime162.jsxs)(
      ExperimentalBlockEditorProvider,
      {
        value: renderedBlocks,
        settings: settings2,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(editor_styles_default, {}),
          /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(BlockListItems, { renderAppender: false, layout })
        ]
      }
    );
    return {
      ...props,
      ref,
      className: clsx_default(
        props.className,
        "block-editor-block-preview__live-content",
        "components-disabled"
      ),
      children: blocks2?.length ? children : null
    };
  }

  // packages/block-editor/build-module/components/inserter/preview-panel.mjs
  var import_jsx_runtime163 = __toESM(require_jsx_runtime(), 1);
  function InserterPreviewPanel({ item }) {
    const { name, title, icon, description, initialAttributes, example } = item;
    const isReusable = (0, import_blocks29.isReusableBlock)(item);
    const blocks2 = (0, import_element50.useMemo)(() => {
      if (!example) {
        return (0, import_blocks29.createBlock)(name, initialAttributes);
      }
      return (0, import_blocks29.getBlockFromExample)(name, {
        attributes: {
          ...example.attributes,
          ...initialAttributes
        },
        innerBlocks: example.innerBlocks
      });
    }, [name, example, initialAttributes]);
    const previewHeight = 144;
    const sidebarWidth = 280;
    const viewportWidth = example?.viewportWidth ?? 500;
    const scale = sidebarWidth / viewportWidth;
    const minHeight = scale !== 0 && scale < 1 && previewHeight ? previewHeight / scale : previewHeight;
    return /* @__PURE__ */ (0, import_jsx_runtime163.jsxs)("div", { className: "block-editor-inserter__preview-container", children: [
      /* @__PURE__ */ (0, import_jsx_runtime163.jsx)("div", { className: "block-editor-inserter__preview", children: isReusable || example ? /* @__PURE__ */ (0, import_jsx_runtime163.jsx)("div", { className: "block-editor-inserter__preview-content", children: /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
        block_preview_default,
        {
          blocks: blocks2,
          viewportWidth,
          minHeight: previewHeight,
          additionalStyles: (
            //We want this CSS to be in sync with the one in BlockPreviewPanel.
            [
              {
                css: `
										body { 
											padding: 24px;
											min-height:${Math.round(minHeight)}px;
											display:flex;
											align-items:center;
										}
										.is-root-container { width: 100%; }
									`
              }
            ]
          )
        }
      ) }) : /* @__PURE__ */ (0, import_jsx_runtime163.jsx)("div", { className: "block-editor-inserter__preview-content-missing", children: (0, import_i18n37.__)("No preview available.") }) }),
      !isReusable && /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
        block_card_default,
        {
          title,
          icon,
          description
        }
      )
    ] });
  }
  var preview_panel_default = InserterPreviewPanel;

  // packages/block-editor/build-module/components/inserter/block-types-tab.mjs
  var import_i18n41 = __toESM(require_i18n(), 1);
  var import_element57 = __toESM(require_element(), 1);
  var import_compose35 = __toESM(require_compose(), 1);

  // packages/block-editor/build-module/components/block-types-list/index.mjs
  var import_blocks32 = __toESM(require_blocks(), 1);
  var import_compose34 = __toESM(require_compose(), 1);

  // packages/block-editor/build-module/components/inserter-list-item/index.mjs
  var import_element56 = __toESM(require_element(), 1);
  var import_blocks31 = __toESM(require_blocks(), 1);
  var import_components40 = __toESM(require_components(), 1);
  var import_keycodes7 = __toESM(require_keycodes(), 1);

  // packages/block-editor/build-module/components/inserter-listbox/index.mjs
  var import_components37 = __toESM(require_components(), 1);
  var import_element54 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/inserter-listbox/group.mjs
  var import_element51 = __toESM(require_element(), 1);
  var import_i18n38 = __toESM(require_i18n(), 1);
  var import_a11y5 = __toESM(require_a11y(), 1);
  var import_jsx_runtime164 = __toESM(require_jsx_runtime(), 1);
  function InserterListboxGroup(props, ref) {
    const [shouldSpeak, setShouldSpeak] = (0, import_element51.useState)(false);
    (0, import_element51.useEffect)(() => {
      if (shouldSpeak) {
        (0, import_a11y5.speak)(
          (0, import_i18n38.__)("Use left and right arrow keys to move through blocks")
        );
      }
    }, [shouldSpeak]);
    return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
      "div",
      {
        ref,
        role: "listbox",
        "aria-orientation": "horizontal",
        onFocus: () => {
          setShouldSpeak(true);
        },
        onBlur: (event) => {
          const focusingOutsideGroup = !event.currentTarget.contains(
            event.relatedTarget
          );
          if (focusingOutsideGroup) {
            setShouldSpeak(false);
          }
        },
        ...props
      }
    );
  }
  var group_default2 = (0, import_element51.forwardRef)(InserterListboxGroup);

  // packages/block-editor/build-module/components/inserter-listbox/row.mjs
  var import_element52 = __toESM(require_element(), 1);
  var import_components35 = __toESM(require_components(), 1);
  var import_jsx_runtime165 = __toESM(require_jsx_runtime(), 1);
  function InserterListboxRow(props, ref) {
    return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(import_components35.Composite.Group, { role: "presentation", ref, ...props });
  }
  var row_default2 = (0, import_element52.forwardRef)(InserterListboxRow);

  // packages/block-editor/build-module/components/inserter-listbox/item.mjs
  var import_components36 = __toESM(require_components(), 1);
  var import_element53 = __toESM(require_element(), 1);
  var import_jsx_runtime166 = __toESM(require_jsx_runtime(), 1);
  function InserterListboxItem({ isFirst, as: Component7, children, ...props }, ref) {
    return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
      import_components36.Composite.Item,
      {
        ref,
        role: "option",
        accessibleWhenDisabled: true,
        ...props,
        render: (htmlProps) => {
          const propsWithTabIndex = {
            ...htmlProps,
            tabIndex: isFirst ? 0 : htmlProps.tabIndex
          };
          if (Component7) {
            return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(Component7, { ...propsWithTabIndex, children });
          }
          if (typeof children === "function") {
            return children(propsWithTabIndex);
          }
          return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(import_components36.Button, { __next40pxDefaultSize: true, ...propsWithTabIndex, children });
        }
      }
    );
  }
  var item_default = (0, import_element53.forwardRef)(InserterListboxItem);

  // packages/block-editor/build-module/components/inserter-listbox/index.mjs
  var import_jsx_runtime167 = __toESM(require_jsx_runtime(), 1);
  function InserterListBoxWrapper({ key, children }) {
    return /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(import_element54.Fragment, { children }, key);
  }
  function InserterListbox({ children }) {
    return /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
      import_components37.Composite,
      {
        focusShift: true,
        focusWrap: "horizontal",
        render: InserterListBoxWrapper,
        children
      }
    );
  }
  var inserter_listbox_default = InserterListbox;

  // packages/block-editor/build-module/components/inserter-draggable-blocks/index.mjs
  var import_components39 = __toESM(require_components(), 1);
  var import_blocks30 = __toESM(require_blocks(), 1);
  var import_data51 = __toESM(require_data(), 1);
  var import_element55 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/block-draggable/draggable-chip.mjs
  var import_i18n39 = __toESM(require_i18n(), 1);
  var import_components38 = __toESM(require_components(), 1);
  var import_jsx_runtime168 = __toESM(require_jsx_runtime(), 1);
  function BlockDraggableChip({
    count,
    icon,
    isPattern,
    fadeWhenDisabled
  }) {
    const patternLabel = isPattern && (0, import_i18n39.__)("Pattern");
    return /* @__PURE__ */ (0, import_jsx_runtime168.jsx)("div", { className: "block-editor-block-draggable-chip-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
      "div",
      {
        className: "block-editor-block-draggable-chip",
        "data-testid": "block-draggable-chip",
        children: /* @__PURE__ */ (0, import_jsx_runtime168.jsxs)(
          import_components38.Flex,
          {
            justify: "center",
            className: "block-editor-block-draggable-chip__content",
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(import_components38.FlexItem, { children: icon ? /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(block_icon_default, { icon }) : patternLabel || (0, import_i18n39.sprintf)(
                /* translators: %d: Number of blocks. */
                (0, import_i18n39._n)("%d block", "%d blocks", count),
                count
              ) }),
              /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(import_components38.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(block_icon_default, { icon: drag_handle_default }) }),
              fadeWhenDisabled && /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(import_components38.FlexItem, { className: "block-editor-block-draggable-chip__disabled", children: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)("span", { className: "block-editor-block-draggable-chip__disabled-icon" }) })
            ]
          }
        )
      }
    ) });
  }

  // packages/block-editor/build-module/components/inserter-draggable-blocks/index.mjs
  var import_jsx_runtime169 = __toESM(require_jsx_runtime(), 1);
  var InserterDraggableBlocks = ({
    isEnabled,
    blocks: blocks2,
    icon,
    children,
    pattern
  }) => {
    const blockName = blocks2.length === 1 ? blocks2[0].name : void 0;
    const blockTypeIcon = (0, import_data51.useSelect)(
      (select3) => {
        return blockName && select3(import_blocks30.store).getBlockType(blockName)?.icon;
      },
      [blockName]
    );
    const { startDragging: startDragging2, stopDragging: stopDragging2 } = unlock(
      (0, import_data51.useDispatch)(store)
    );
    const patternBlock = (0, import_element55.useMemo)(() => {
      return pattern?.type === INSERTER_PATTERN_TYPES.user && pattern?.syncStatus !== "unsynced" ? [(0, import_blocks30.createBlock)("core/block", { ref: pattern.id })] : void 0;
    }, [pattern?.type, pattern?.syncStatus, pattern?.id]);
    if (!isEnabled) {
      return children({
        draggable: false,
        onDragStart: void 0,
        onDragEnd: void 0
      });
    }
    const draggableBlocks = patternBlock ?? blocks2;
    return /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
      import_components39.Draggable,
      {
        __experimentalTransferDataType: "wp-blocks",
        transferData: { type: "inserter", blocks: draggableBlocks },
        onDragStart: (event) => {
          startDragging2();
          const addedTypes = /* @__PURE__ */ new Set();
          for (const block of draggableBlocks) {
            const type = `wp-block:${block.name}`;
            if (!addedTypes.has(type)) {
              event.dataTransfer.items.add("", type);
              addedTypes.add(type);
            }
          }
        },
        onDragEnd: () => {
          stopDragging2();
        },
        __experimentalDragComponent: /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
          BlockDraggableChip,
          {
            count: blocks2.length,
            icon: icon || !pattern && blockTypeIcon,
            isPattern: !!pattern
          }
        ),
        children: ({ onDraggableStart, onDraggableEnd }) => {
          return children({
            draggable: true,
            onDragStart: onDraggableStart,
            onDragEnd: onDraggableEnd
          });
        }
      }
    );
  };
  var inserter_draggable_blocks_default = InserterDraggableBlocks;

  // packages/block-editor/build-module/components/inserter-list-item/index.mjs
  var import_jsx_runtime170 = __toESM(require_jsx_runtime(), 1);
  function InserterListItem({
    className,
    isFirst,
    item,
    onSelect,
    onHover,
    isDraggable,
    ...props
  }) {
    const isDraggingRef = (0, import_element56.useRef)(false);
    const itemIconStyle = item.icon ? {
      backgroundColor: item.icon.background,
      color: item.icon.foreground
    } : {};
    const blocks2 = (0, import_element56.useMemo)(
      () => [
        (0, import_blocks31.createBlock)(
          item.name,
          item.initialAttributes,
          (0, import_blocks31.createBlocksFromInnerBlocksTemplate)(item.innerBlocks)
        )
      ],
      [item.name, item.initialAttributes, item.innerBlocks]
    );
    const isSynced = (0, import_blocks31.isReusableBlock)(item) && item.syncStatus !== "unsynced" || (0, import_blocks31.isTemplatePart)(item);
    return /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
      inserter_draggable_blocks_default,
      {
        isEnabled: isDraggable && !item.isDisabled,
        blocks: blocks2,
        icon: item.icon,
        children: ({ draggable, onDragStart, onDragEnd }) => /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
          "div",
          {
            className: clsx_default(
              "block-editor-block-types-list__list-item",
              {
                "is-synced": isSynced
              }
            ),
            draggable,
            onDragStart: (event) => {
              isDraggingRef.current = true;
              if (onDragStart) {
                onHover(null);
                onDragStart(event);
              }
            },
            onDragEnd: (event) => {
              isDraggingRef.current = false;
              if (onDragEnd) {
                onDragEnd(event);
              }
            },
            children: /* @__PURE__ */ (0, import_jsx_runtime170.jsxs)(
              item_default,
              {
                isFirst,
                className: clsx_default(
                  "block-editor-block-types-list__item",
                  className
                ),
                disabled: item.isDisabled,
                onClick: (event) => {
                  event.preventDefault();
                  onSelect(
                    item,
                    (0, import_keycodes7.isAppleOS)() ? event.metaKey : event.ctrlKey
                  );
                  onHover(null);
                },
                onKeyDown: (event) => {
                  const { keyCode } = event;
                  if (keyCode === import_keycodes7.ENTER) {
                    event.preventDefault();
                    onSelect(
                      item,
                      (0, import_keycodes7.isAppleOS)() ? event.metaKey : event.ctrlKey
                    );
                    onHover(null);
                  }
                },
                onMouseEnter: () => {
                  if (isDraggingRef.current) {
                    return;
                  }
                  onHover(item);
                },
                onMouseLeave: () => onHover(null),
                ...props,
                children: [
                  /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
                    "span",
                    {
                      className: "block-editor-block-types-list__item-icon",
                      style: itemIconStyle,
                      children: /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(block_icon_default, { icon: item.icon, showColors: true })
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime170.jsx)("span", { className: "block-editor-block-types-list__item-title", children: /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(import_components40.__experimentalTruncate, { numberOfLines: 3, children: item.title }) })
                ]
              }
            )
          }
        )
      }
    );
  }
  var inserter_list_item_default = (0, import_element56.memo)(InserterListItem);

  // packages/block-editor/build-module/components/block-types-list/index.mjs
  var import_jsx_runtime171 = __toESM(require_jsx_runtime(), 1);
  function chunk(array, size) {
    const chunks = [];
    for (let i2 = 0, j2 = array.length; i2 < j2; i2 += size) {
      chunks.push(array.slice(i2, i2 + size));
    }
    return chunks;
  }
  function BlockTypesList({
    items = [],
    onSelect,
    onHover = () => {
    },
    children,
    label,
    isDraggable = true
  }) {
    const className = "block-editor-block-types-list";
    const listId = (0, import_compose34.useInstanceId)(BlockTypesList, className);
    return /* @__PURE__ */ (0, import_jsx_runtime171.jsxs)(group_default2, { className, "aria-label": label, children: [
      chunk(items, 3).map((row, i2) => /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(row_default2, { children: row.map((item, j2) => /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
        inserter_list_item_default,
        {
          item,
          className: (0, import_blocks32.getBlockMenuDefaultClassName)(
            item.id
          ),
          onSelect,
          onHover,
          isDraggable: isDraggable && !item.isDisabled,
          isFirst: i2 === 0 && j2 === 0,
          rowId: `${listId}-${i2}`
        },
        item.id
      )) }, i2)),
      children
    ] });
  }
  var block_types_list_default = BlockTypesList;

  // packages/block-editor/build-module/components/inserter/panel.mjs
  var import_components41 = __toESM(require_components(), 1);
  var import_jsx_runtime172 = __toESM(require_jsx_runtime(), 1);
  function InserterPanel({ title, icon, children }) {
    return /* @__PURE__ */ (0, import_jsx_runtime172.jsxs)(import_jsx_runtime172.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime172.jsxs)("div", { className: "block-editor-inserter__panel-header", children: [
        /* @__PURE__ */ (0, import_jsx_runtime172.jsx)("h2", { className: "block-editor-inserter__panel-title", children: title }),
        /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(import_components41.Icon, { icon })
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime172.jsx)("div", { className: "block-editor-inserter__panel-content", children })
    ] });
  }
  var panel_default = InserterPanel;

  // packages/block-editor/build-module/components/inserter/no-results.mjs
  var import_i18n40 = __toESM(require_i18n(), 1);
  var import_jsx_runtime173 = __toESM(require_jsx_runtime(), 1);
  function InserterNoResults() {
    return /* @__PURE__ */ (0, import_jsx_runtime173.jsx)("div", { className: "block-editor-inserter__no-results", children: /* @__PURE__ */ (0, import_jsx_runtime173.jsx)("p", { children: (0, import_i18n40.__)("No results found.") }) });
  }
  var no_results_default = InserterNoResults;

  // packages/block-editor/build-module/components/inserter/block-types-tab.mjs
  var import_jsx_runtime174 = __toESM(require_jsx_runtime(), 1);
  var getBlockNamespace = (item) => item.name.split("/")[0];
  var MAX_SUGGESTED_ITEMS = 6;
  var EMPTY_ARRAY5 = [];
  function BlockTypesTabPanel({
    items,
    collections,
    categories,
    onSelectItem,
    onHover,
    showMostUsedBlocks,
    className
  }) {
    const suggestedItems = (0, import_element57.useMemo)(() => {
      return orderBy(items, "frecency", "desc").slice(
        0,
        MAX_SUGGESTED_ITEMS
      );
    }, [items]);
    const uncategorizedItems = (0, import_element57.useMemo)(() => {
      return items.filter((item) => !item.category);
    }, [items]);
    const itemsPerCollection = (0, import_element57.useMemo)(() => {
      const result = { ...collections };
      Object.keys(collections).forEach((namespace) => {
        result[namespace] = items.filter(
          (item) => getBlockNamespace(item) === namespace
        );
        if (result[namespace].length === 0) {
          delete result[namespace];
        }
      });
      return result;
    }, [items, collections]);
    (0, import_element57.useEffect)(() => () => onHover(null), []);
    const currentlyRenderedCategories = (0, import_compose35.useAsyncList)(categories);
    const didRenderAllCategories = categories.length === currentlyRenderedCategories.length;
    const collectionEntries = (0, import_element57.useMemo)(() => {
      return Object.entries(collections);
    }, [collections]);
    const currentlyRenderedCollections = (0, import_compose35.useAsyncList)(
      didRenderAllCategories ? collectionEntries : EMPTY_ARRAY5
    );
    return /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)("div", { className, children: [
      showMostUsedBlocks && // Only show the most used blocks if the total amount of block
      // is larger than 1 row, otherwise it is not so useful.
      items.length > 3 && !!suggestedItems.length && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(panel_default, { title: (0, import_i18n41._x)("Most used", "blocks"), children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
        block_types_list_default,
        {
          items: suggestedItems,
          onSelect: onSelectItem,
          onHover,
          label: (0, import_i18n41._x)("Most used", "blocks")
        }
      ) }),
      currentlyRenderedCategories.map((category) => {
        const categoryItems = items.filter(
          (item) => item.category === category.slug
        );
        if (!categoryItems || !categoryItems.length) {
          return null;
        }
        return /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
          panel_default,
          {
            title: category.title,
            icon: category.icon,
            children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
              block_types_list_default,
              {
                items: categoryItems,
                onSelect: onSelectItem,
                onHover,
                label: category.title
              }
            )
          },
          category.slug
        );
      }),
      didRenderAllCategories && uncategorizedItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
        panel_default,
        {
          className: "block-editor-inserter__uncategorized-blocks-panel",
          title: (0, import_i18n41.__)("Uncategorized"),
          children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
            block_types_list_default,
            {
              items: uncategorizedItems,
              onSelect: onSelectItem,
              onHover,
              label: (0, import_i18n41.__)("Uncategorized")
            }
          )
        }
      ),
      currentlyRenderedCollections.map(
        ([namespace, collection]) => {
          const collectionItems = itemsPerCollection[namespace];
          if (!collectionItems || !collectionItems.length) {
            return null;
          }
          return /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
            panel_default,
            {
              title: collection.title,
              icon: collection.icon,
              children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
                block_types_list_default,
                {
                  items: collectionItems,
                  onSelect: onSelectItem,
                  onHover,
                  label: collection.title
                }
              )
            },
            namespace
          );
        }
      )
    ] });
  }
  function BlockTypesTab({ rootClientId, onInsert, onHover, showMostUsedBlocks }, ref) {
    const [items, categories, collections, onSelectItem] = use_block_types_state_default(
      rootClientId,
      onInsert
    );
    if (!items.length) {
      return /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(no_results_default, {});
    }
    const itemsForCurrentRoot = [];
    const itemsRemaining = [];
    for (const item of items) {
      if (item.category === "reusable") {
        continue;
      }
      if (item.isSearchOnly) {
        continue;
      }
      if (item.isAllowedInCurrentRoot) {
        itemsForCurrentRoot.push(item);
      } else {
        itemsRemaining.push(item);
      }
    }
    return /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(inserter_listbox_default, { children: /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)("div", { ref, children: [
      !!itemsForCurrentRoot.length && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_jsx_runtime174.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
        BlockTypesTabPanel,
        {
          items: itemsForCurrentRoot,
          categories,
          collections,
          onSelectItem,
          onHover,
          showMostUsedBlocks,
          className: "block-editor-inserter__insertable-blocks-at-selection"
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
        BlockTypesTabPanel,
        {
          items: itemsRemaining,
          categories,
          collections,
          onSelectItem,
          onHover,
          showMostUsedBlocks,
          className: "block-editor-inserter__all-blocks"
        }
      )
    ] }) });
  }
  var block_types_tab_default = (0, import_element57.forwardRef)(BlockTypesTab);

  // packages/block-editor/build-module/components/inserter/block-patterns-tab/index.mjs
  var import_element68 = __toESM(require_element(), 1);
  var import_compose40 = __toESM(require_compose(), 1);
  var import_components51 = __toESM(require_components(), 1);
  var import_i18n53 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/components/inserter/block-patterns-explorer/index.mjs
  var import_components46 = __toESM(require_components(), 1);
  var import_element64 = __toESM(require_element(), 1);
  var import_i18n49 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.mjs
  var import_components42 = __toESM(require_components(), 1);
  var import_i18n42 = __toESM(require_i18n(), 1);
  var import_jsx_runtime175 = __toESM(require_jsx_runtime(), 1);
  function PatternCategoriesList({
    selectedCategory,
    patternCategories,
    onClickCategory
  }) {
    const baseClassName = "block-editor-block-patterns-explorer__sidebar";
    return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { className: `${baseClassName}__categories-list`, children: patternCategories.map(({ name, label }) => {
      return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
        import_components42.Button,
        {
          __next40pxDefaultSize: true,
          label,
          className: `${baseClassName}__categories-list__item`,
          isPressed: selectedCategory === name,
          onClick: () => {
            onClickCategory(name);
          },
          children: label
        },
        name
      );
    }) });
  }
  function PatternsExplorerSearch({ searchValue, setSearchValue }) {
    const baseClassName = "block-editor-block-patterns-explorer__search";
    return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { className: baseClassName, children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
      import_components42.SearchControl,
      {
        onChange: setSearchValue,
        value: searchValue,
        label: (0, import_i18n42.__)("Search"),
        placeholder: (0, import_i18n42.__)("Search")
      }
    ) });
  }
  function PatternExplorerSidebar({
    selectedCategory,
    patternCategories,
    onClickCategory,
    searchValue,
    setSearchValue
  }) {
    const baseClassName = "block-editor-block-patterns-explorer__sidebar";
    return /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)("div", { className: baseClassName, children: [
      /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
        PatternsExplorerSearch,
        {
          searchValue,
          setSearchValue
        }
      ),
      !searchValue && /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
        PatternCategoriesList,
        {
          selectedCategory,
          patternCategories,
          onClickCategory
        }
      )
    ] });
  }
  var pattern_explorer_sidebar_default = PatternExplorerSidebar;

  // packages/block-editor/build-module/components/inserter/block-patterns-explorer/pattern-list.mjs
  var import_element62 = __toESM(require_element(), 1);
  var import_i18n47 = __toESM(require_i18n(), 1);
  var import_compose38 = __toESM(require_compose(), 1);
  var import_components45 = __toESM(require_components(), 1);
  var import_a11y7 = __toESM(require_a11y(), 1);

  // packages/block-editor/build-module/components/block-patterns-list/index.mjs
  var import_blocks33 = __toESM(require_blocks(), 1);
  var import_element58 = __toESM(require_element(), 1);
  var import_components44 = __toESM(require_components(), 1);
  var import_compose36 = __toESM(require_compose(), 1);
  var import_i18n44 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/components/block-patterns-paging/index.mjs
  var import_components43 = __toESM(require_components(), 1);
  var import_i18n43 = __toESM(require_i18n(), 1);
  var import_jsx_runtime176 = __toESM(require_jsx_runtime(), 1);
  function Pagination({
    currentPage,
    numPages,
    changePage,
    totalItems
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(import_components43.__experimentalVStack, { className: "block-editor-patterns__grid-pagination-wrapper", children: [
      /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(import_components43.__experimentalText, { variant: "muted", children: (0, import_i18n43.sprintf)(
        // translators: %s: Total number of patterns.
        (0, import_i18n43._n)("%s item", "%s items", totalItems),
        totalItems
      ) }),
      numPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(
        import_components43.__experimentalHStack,
        {
          expanded: false,
          spacing: 3,
          justify: "flex-start",
          className: "block-editor-patterns__grid-pagination",
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(
              import_components43.__experimentalHStack,
              {
                expanded: false,
                spacing: 1,
                className: "block-editor-patterns__grid-pagination-previous",
                children: [
                  /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
                    import_components43.Button,
                    {
                      variant: "tertiary",
                      onClick: () => changePage(1),
                      disabled: currentPage === 1,
                      "aria-label": (0, import_i18n43.__)("First page"),
                      size: "compact",
                      accessibleWhenDisabled: true,
                      className: "block-editor-patterns__grid-pagination-button",
                      children: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)("span", { children: "\xAB" })
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
                    import_components43.Button,
                    {
                      variant: "tertiary",
                      onClick: () => changePage(currentPage - 1),
                      disabled: currentPage === 1,
                      "aria-label": (0, import_i18n43.__)("Previous page"),
                      size: "compact",
                      accessibleWhenDisabled: true,
                      className: "block-editor-patterns__grid-pagination-button",
                      children: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)("span", { children: "\u2039" })
                    }
                  )
                ]
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(import_components43.__experimentalText, { variant: "muted", children: (0, import_i18n43.sprintf)(
              // translators: 1: Current page number. 2: Total number of pages.
              (0, import_i18n43._x)("%1$s of %2$s", "paging"),
              currentPage,
              numPages
            ) }),
            /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(
              import_components43.__experimentalHStack,
              {
                expanded: false,
                spacing: 1,
                className: "block-editor-patterns__grid-pagination-next",
                children: [
                  /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
                    import_components43.Button,
                    {
                      variant: "tertiary",
                      onClick: () => changePage(currentPage + 1),
                      disabled: currentPage === numPages,
                      "aria-label": (0, import_i18n43.__)("Next page"),
                      size: "compact",
                      accessibleWhenDisabled: true,
                      className: "block-editor-patterns__grid-pagination-button",
                      children: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)("span", { children: "\u203A" })
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
                    import_components43.Button,
                    {
                      variant: "tertiary",
                      onClick: () => changePage(numPages),
                      disabled: currentPage === numPages,
                      "aria-label": (0, import_i18n43.__)("Last page"),
                      size: "compact",
                      accessibleWhenDisabled: true,
                      className: "block-editor-patterns__grid-pagination-button",
                      children: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)("span", { children: "\xBB" })
                    }
                  )
                ]
              }
            )
          ]
        }
      )
    ] });
  }

  // packages/block-editor/build-module/components/block-patterns-list/index.mjs
  var import_jsx_runtime177 = __toESM(require_jsx_runtime(), 1);
  var WithToolTip = ({ showTooltip, title, children }) => {
    if (showTooltip) {
      return /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(import_components44.Tooltip, { text: title, children });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(import_jsx_runtime177.Fragment, { children });
  };
  function BlockPattern({
    id,
    isDraggable,
    pattern,
    onClick,
    onHover,
    showTitlesAsTooltip,
    category,
    isSelected
  }) {
    const [isDragging3, setIsDragging] = (0, import_element58.useState)(false);
    const { blocks: blocks2, viewportWidth } = pattern;
    const instanceId = (0, import_compose36.useInstanceId)(BlockPattern);
    const descriptionId = `block-editor-block-patterns-list__item-description-${instanceId}`;
    const isUserPattern = pattern.type === INSERTER_PATTERN_TYPES.user;
    const patternBlocks = (0, import_element58.useMemo)(() => {
      if (!category || !isDraggable) {
        return blocks2;
      }
      return (blocks2 ?? []).map((block) => {
        const clonedBlock = (0, import_blocks33.cloneBlock)(block);
        if (clonedBlock.attributes.metadata?.categories?.includes(
          category
        )) {
          clonedBlock.attributes.metadata.categories = [category];
        }
        return clonedBlock;
      });
    }, [blocks2, isDraggable, category]);
    return /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(
      inserter_draggable_blocks_default,
      {
        isEnabled: isDraggable,
        blocks: patternBlocks,
        pattern,
        children: ({ draggable, onDragStart, onDragEnd }) => /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(
          "div",
          {
            className: "block-editor-block-patterns-list__list-item",
            draggable,
            onDragStart: (event) => {
              setIsDragging(true);
              if (onDragStart) {
                onHover?.(null);
                onDragStart(event);
              }
            },
            onDragEnd: (event) => {
              setIsDragging(false);
              if (onDragEnd) {
                onDragEnd(event);
              }
            },
            children: /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(
              WithToolTip,
              {
                showTooltip: showTitlesAsTooltip && !isUserPattern,
                title: pattern.title,
                children: /* @__PURE__ */ (0, import_jsx_runtime177.jsxs)(
                  import_components44.Composite.Item,
                  {
                    render: /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(
                      "div",
                      {
                        role: "option",
                        "aria-label": pattern.title,
                        "aria-describedby": pattern.description ? descriptionId : void 0,
                        className: clsx_default(
                          "block-editor-block-patterns-list__item",
                          {
                            "block-editor-block-patterns-list__list-item-synced": pattern.type === INSERTER_PATTERN_TYPES.user && !pattern.syncStatus,
                            "is-selected": isSelected
                          }
                        )
                      }
                    ),
                    id,
                    onClick: () => {
                      onClick(pattern, blocks2);
                      onHover?.(null);
                    },
                    onMouseEnter: () => {
                      if (isDragging3) {
                        return;
                      }
                      onHover?.(pattern);
                    },
                    onMouseLeave: () => onHover?.(null),
                    children: [
                      /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(
                        block_preview_default.Async,
                        {
                          placeholder: /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(BlockPatternPlaceholder, {}),
                          children: /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(
                            block_preview_default,
                            {
                              blocks: blocks2,
                              viewportWidth
                            }
                          )
                        }
                      ),
                      (!showTitlesAsTooltip || isUserPattern) && /* @__PURE__ */ (0, import_jsx_runtime177.jsxs)(
                        import_components44.__experimentalHStack,
                        {
                          className: "block-editor-patterns__pattern-details",
                          spacing: 2,
                          children: [
                            isUserPattern && !pattern.syncStatus && /* @__PURE__ */ (0, import_jsx_runtime177.jsx)("div", { className: "block-editor-patterns__pattern-icon-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(
                              icon_default,
                              {
                                className: "block-editor-patterns__pattern-icon",
                                icon: symbol_default
                              }
                            ) }),
                            /* @__PURE__ */ (0, import_jsx_runtime177.jsx)("div", { className: "block-editor-block-patterns-list__item-title", children: pattern.title })
                          ]
                        }
                      ),
                      !!pattern.description && /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(import_components44.VisuallyHidden, { id: descriptionId, children: pattern.description })
                    ]
                  }
                )
              }
            )
          }
        )
      }
    );
  }
  function BlockPatternPlaceholder() {
    return /* @__PURE__ */ (0, import_jsx_runtime177.jsx)("div", { className: "block-editor-block-patterns-list__item is-placeholder" });
  }
  function BlockPatternsList({
    isDraggable,
    blockPatterns,
    onHover,
    onClickPattern,
    orientation,
    label = (0, import_i18n44.__)("Block patterns"),
    category,
    showTitlesAsTooltip,
    pagingProps
  }, ref) {
    const [activeCompositeId, setActiveCompositeId] = (0, import_element58.useState)(void 0);
    const [activePattern, setActivePattern] = (0, import_element58.useState)(null);
    (0, import_element58.useEffect)(() => {
      const firstCompositeItemId = blockPatterns[0]?.name;
      setActiveCompositeId(firstCompositeItemId);
    }, [blockPatterns]);
    const handleClickPattern = (pattern, blocks2) => {
      setActivePattern(pattern.name);
      onClickPattern(pattern, blocks2);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime177.jsxs)(
      import_components44.Composite,
      {
        orientation,
        activeId: activeCompositeId,
        setActiveId: setActiveCompositeId,
        role: "listbox",
        className: "block-editor-block-patterns-list",
        "aria-label": label,
        ref,
        children: [
          blockPatterns.map((pattern) => /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(
            BlockPattern,
            {
              id: pattern.name,
              pattern,
              onClick: handleClickPattern,
              onHover,
              isDraggable,
              showTitlesAsTooltip,
              category,
              isSelected: !!activePattern && activePattern === pattern.name
            },
            pattern.name
          )),
          pagingProps && /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(Pagination, { ...pagingProps })
        ]
      }
    );
  }
  var block_patterns_list_default = (0, import_element58.forwardRef)(BlockPatternsList);

  // packages/block-editor/build-module/components/inserter/hooks/use-insertion-point.mjs
  var import_data52 = __toESM(require_data(), 1);
  var import_blocks34 = __toESM(require_blocks(), 1);
  var import_i18n45 = __toESM(require_i18n(), 1);
  var import_a11y6 = __toESM(require_a11y(), 1);
  var import_element59 = __toESM(require_element(), 1);
  function getIndex({
    destinationRootClientId,
    destinationIndex,
    rootClientId,
    registry
  }) {
    if (rootClientId === destinationRootClientId) {
      return destinationIndex;
    }
    const parents = [
      "",
      ...registry.select(store).getBlockParents(destinationRootClientId),
      destinationRootClientId
    ];
    const parentIndex = parents.indexOf(rootClientId);
    if (parentIndex !== -1) {
      return registry.select(store).getBlockIndex(parents[parentIndex + 1]) + 1;
    }
    return registry.select(store).getBlockOrder(rootClientId).length;
  }
  function useInsertionPoint({
    rootClientId = "",
    insertionIndex,
    clientId,
    isAppender,
    onSelect,
    shouldFocusBlock = true,
    selectBlockOnInsert = true
  }) {
    const registry = (0, import_data52.useRegistry)();
    const {
      getSelectedBlock: getSelectedBlock2,
      getClosestAllowedInsertionPoint: getClosestAllowedInsertionPoint2,
      isBlockInsertionPointVisible: isBlockInsertionPointVisible2
    } = unlock((0, import_data52.useSelect)(store));
    const { destinationRootClientId, destinationIndex } = (0, import_data52.useSelect)(
      (select3) => {
        const {
          getSelectedBlockClientId: getSelectedBlockClientId2,
          getBlockRootClientId: getBlockRootClientId2,
          getBlockIndex: getBlockIndex2,
          getBlockOrder: getBlockOrder2,
          getInsertionPoint: getInsertionPoint2
        } = unlock(select3(store));
        const selectedBlockClientId = getSelectedBlockClientId2();
        let _destinationRootClientId = rootClientId;
        let _destinationIndex;
        const insertionPoint2 = getInsertionPoint2();
        if (insertionIndex !== void 0) {
          _destinationIndex = insertionIndex;
        } else if (insertionPoint2 && insertionPoint2.hasOwnProperty("index")) {
          _destinationRootClientId = insertionPoint2?.rootClientId ? insertionPoint2.rootClientId : rootClientId;
          _destinationIndex = insertionPoint2.index;
        } else if (clientId) {
          _destinationIndex = getBlockIndex2(clientId);
        } else if (!isAppender && selectedBlockClientId) {
          _destinationRootClientId = getBlockRootClientId2(
            selectedBlockClientId
          );
          _destinationIndex = getBlockIndex2(selectedBlockClientId) + 1;
        } else {
          _destinationIndex = getBlockOrder2(
            _destinationRootClientId
          ).length;
        }
        return {
          destinationRootClientId: _destinationRootClientId,
          destinationIndex: _destinationIndex
        };
      },
      [rootClientId, insertionIndex, clientId, isAppender]
    );
    const {
      replaceBlocks: replaceBlocks2,
      insertBlocks: insertBlocks2,
      showInsertionPoint: showInsertionPoint2,
      hideInsertionPoint: hideInsertionPoint2,
      setLastFocus: setLastFocus2
    } = unlock((0, import_data52.useDispatch)(store));
    const onInsertBlocks = (0, import_element59.useCallback)(
      (blocks2, meta, shouldForceFocusBlock = false, _rootClientId) => {
        if (shouldForceFocusBlock || shouldFocusBlock || selectBlockOnInsert) {
          setLastFocus2(null);
        }
        const selectedBlock = getSelectedBlock2();
        if (!isAppender && selectedBlock && (0, import_blocks34.isUnmodifiedDefaultBlock)(selectedBlock, "content")) {
          replaceBlocks2(
            selectedBlock.clientId,
            blocks2,
            null,
            shouldFocusBlock || shouldForceFocusBlock ? 0 : null,
            meta
          );
        } else {
          insertBlocks2(
            blocks2,
            isAppender || _rootClientId === void 0 ? destinationIndex : getIndex({
              destinationRootClientId,
              destinationIndex,
              rootClientId: _rootClientId,
              registry
            }),
            isAppender || _rootClientId === void 0 ? destinationRootClientId : _rootClientId,
            selectBlockOnInsert,
            shouldFocusBlock || shouldForceFocusBlock ? 0 : null,
            meta
          );
        }
        const blockLength = Array.isArray(blocks2) ? blocks2.length : 1;
        const message2 = (0, import_i18n45.sprintf)(
          // translators: %d: the name of the block that has been added
          (0, import_i18n45._n)("%d block added.", "%d blocks added.", blockLength),
          blockLength
        );
        (0, import_a11y6.speak)(message2);
        if (onSelect) {
          onSelect(blocks2);
        }
      },
      [
        isAppender,
        getSelectedBlock2,
        replaceBlocks2,
        insertBlocks2,
        destinationRootClientId,
        destinationIndex,
        onSelect,
        shouldFocusBlock,
        selectBlockOnInsert,
        setLastFocus2,
        registry
      ]
    );
    const onToggleInsertionPoint = (0, import_element59.useCallback)(
      (item) => {
        if (item && !isBlockInsertionPointVisible2()) {
          const allowedDestinationRootClientId = getClosestAllowedInsertionPoint2(
            item.name,
            destinationRootClientId
          );
          if (allowedDestinationRootClientId !== null) {
            showInsertionPoint2(
              allowedDestinationRootClientId,
              getIndex({
                destinationRootClientId,
                destinationIndex,
                rootClientId: allowedDestinationRootClientId,
                registry
              })
            );
          }
        } else {
          hideInsertionPoint2();
        }
      },
      [
        getClosestAllowedInsertionPoint2,
        isBlockInsertionPointVisible2,
        showInsertionPoint2,
        hideInsertionPoint2,
        destinationRootClientId,
        destinationIndex,
        registry
      ]
    );
    return [destinationRootClientId, onInsertBlocks, onToggleInsertionPoint];
  }
  var use_insertion_point_default = useInsertionPoint;

  // packages/block-editor/build-module/components/inserter/hooks/use-patterns-state.mjs
  var import_element60 = __toESM(require_element(), 1);
  var import_blocks35 = __toESM(require_blocks(), 1);
  var import_data53 = __toESM(require_data(), 1);
  var import_i18n46 = __toESM(require_i18n(), 1);
  var import_notices5 = __toESM(require_notices(), 1);
  var usePatternsState = (onInsert, rootClientId, selectedCategory, isQuick) => {
    const options = (0, import_element60.useMemo)(
      () => ({ [isFiltered]: !!isQuick }),
      [isQuick]
    );
    const isWithinNavigationOverlayContext = (0, import_data53.useSelect)((select3) => {
      const { getSettings: getSettings7 } = unlock(select3(store));
      const settings2 = getSettings7();
      return settings2[isNavigationOverlayContextKey] ?? false;
    }, []);
    const { patternCategories, patterns, userPatternCategories } = (0, import_data53.useSelect)(
      (select3) => {
        const { getSettings: getSettings7, __experimentalGetAllowedPatterns: __experimentalGetAllowedPatterns2 } = unlock(
          select3(store)
        );
        const {
          __experimentalUserPatternCategories,
          __experimentalBlockPatternCategories
        } = getSettings7();
        return {
          patterns: __experimentalGetAllowedPatterns2(
            rootClientId,
            options
          ),
          userPatternCategories: __experimentalUserPatternCategories,
          patternCategories: __experimentalBlockPatternCategories
        };
      },
      [rootClientId, options]
    );
    const filteredPatterns = (0, import_element60.useMemo)(() => {
      return patterns.filter((pattern) => {
        const hasNavigationCategory = pattern.categories?.includes("navigation");
        if (hasNavigationCategory && !isWithinNavigationOverlayContext) {
          return false;
        }
        return true;
      });
    }, [patterns, isWithinNavigationOverlayContext]);
    const { getClosestAllowedInsertionPointForPattern: getClosestAllowedInsertionPointForPattern2 } = unlock(
      (0, import_data53.useSelect)(store)
    );
    const allCategories = (0, import_element60.useMemo)(() => {
      const categories = [...patternCategories];
      userPatternCategories?.forEach((userCategory) => {
        if (!categories.find(
          (existingCategory) => existingCategory.name === userCategory.name
        )) {
          categories.push(userCategory);
        }
      });
      return categories;
    }, [patternCategories, userPatternCategories]);
    const { createSuccessNotice } = (0, import_data53.useDispatch)(import_notices5.store);
    const onClickPattern = (0, import_element60.useCallback)(
      (pattern, blocks2) => {
        const destinationRootClientId = isQuick ? rootClientId : getClosestAllowedInsertionPointForPattern2(
          pattern,
          rootClientId
        );
        if (destinationRootClientId === null) {
          return;
        }
        const patternBlocks = pattern.type === INSERTER_PATTERN_TYPES.user && pattern.syncStatus !== "unsynced" ? [(0, import_blocks35.createBlock)("core/block", { ref: pattern.id })] : blocks2;
        onInsert(
          (patternBlocks ?? []).map((block) => {
            const clonedBlock = (0, import_blocks35.cloneBlock)(block);
            if (clonedBlock.attributes.metadata?.categories?.includes(
              selectedCategory
            )) {
              clonedBlock.attributes.metadata.categories = [
                selectedCategory
              ];
            }
            return clonedBlock;
          }),
          pattern.name,
          false,
          destinationRootClientId
        );
        createSuccessNotice(
          (0, import_i18n46.sprintf)(
            /* translators: %s: block pattern title. */
            (0, import_i18n46.__)('Block pattern "%s" inserted.'),
            pattern.title
          ),
          {
            type: "snackbar",
            id: "inserter-notice"
          }
        );
      },
      [
        createSuccessNotice,
        onInsert,
        selectedCategory,
        rootClientId,
        getClosestAllowedInsertionPointForPattern2,
        isQuick
      ]
    );
    return [filteredPatterns, allCategories, onClickPattern];
  };
  var use_patterns_state_default = usePatternsState;

  // packages/block-editor/build-module/components/inserter/hooks/use-patterns-paging.mjs
  var import_element61 = __toESM(require_element(), 1);
  var import_compose37 = __toESM(require_compose(), 1);
  var import_dom20 = __toESM(require_dom(), 1);
  var PAGE_SIZE = 20;
  function usePatternsPaging(currentCategoryPatterns, currentCategory, scrollContainerRef, currentFilter = "") {
    const [currentPage, setCurrentPage] = (0, import_element61.useState)(1);
    const previousCategory = (0, import_compose37.usePrevious)(currentCategory);
    const previousFilter = (0, import_compose37.usePrevious)(currentFilter);
    if ((previousCategory !== currentCategory || previousFilter !== currentFilter) && currentPage !== 1) {
      setCurrentPage(1);
    }
    const totalItems = currentCategoryPatterns.length;
    const pageIndex = currentPage - 1;
    const categoryPatterns = (0, import_element61.useMemo)(() => {
      return currentCategoryPatterns.slice(
        pageIndex * PAGE_SIZE,
        pageIndex * PAGE_SIZE + PAGE_SIZE
      );
    }, [pageIndex, currentCategoryPatterns]);
    const numPages = Math.ceil(currentCategoryPatterns.length / PAGE_SIZE);
    const changePage = (page) => {
      const scrollContainer = (0, import_dom20.getScrollContainer)(
        scrollContainerRef?.current
      );
      scrollContainer?.scrollTo(0, 0);
      setCurrentPage(page);
    };
    (0, import_element61.useEffect)(
      function scrollToTopOnCategoryChange() {
        const scrollContainer = (0, import_dom20.getScrollContainer)(
          scrollContainerRef?.current
        );
        scrollContainer?.scrollTo(0, 0);
      },
      [currentCategory, scrollContainerRef]
    );
    return {
      totalItems,
      categoryPatterns,
      numPages,
      changePage,
      currentPage
    };
  }

  // packages/block-editor/build-module/components/inserter/block-patterns-explorer/pattern-list.mjs
  var import_jsx_runtime178 = __toESM(require_jsx_runtime(), 1);
  function PatternsListHeader({ filterValue, filteredBlockPatternsLength }) {
    if (!filterValue) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
      import_components45.__experimentalHeading,
      {
        level: 2,
        lineHeight: "48px",
        className: "block-editor-block-patterns-explorer__search-results-count",
        children: (0, import_i18n47.sprintf)(
          /* translators: %d: number of patterns. */
          (0, import_i18n47._n)(
            "%d pattern found",
            "%d patterns found",
            filteredBlockPatternsLength
          ),
          filteredBlockPatternsLength
        )
      }
    );
  }
  function PatternList({
    searchValue,
    selectedCategory,
    patternCategories,
    rootClientId,
    onModalClose
  }) {
    const container = (0, import_element62.useRef)();
    const debouncedSpeak = (0, import_compose38.useDebounce)(import_a11y7.speak, 500);
    const [destinationRootClientId, onInsertBlocks] = use_insertion_point_default({
      rootClientId,
      shouldFocusBlock: true
    });
    const [patterns, , onClickPattern] = use_patterns_state_default(
      onInsertBlocks,
      destinationRootClientId,
      selectedCategory
    );
    const registeredPatternCategories = (0, import_element62.useMemo)(
      () => patternCategories.map(
        (patternCategory) => patternCategory.name
      ),
      [patternCategories]
    );
    const filteredBlockPatterns = (0, import_element62.useMemo)(() => {
      const filteredPatterns = patterns.filter((pattern) => {
        if (selectedCategory === allPatternsCategory.name) {
          return true;
        }
        if (selectedCategory === myPatternsCategory.name && pattern.type === INSERTER_PATTERN_TYPES.user) {
          return true;
        }
        if (selectedCategory === starterPatternsCategory.name && pattern.blockTypes?.includes("core/post-content")) {
          return true;
        }
        if (selectedCategory === "uncategorized") {
          const hasKnownCategory = pattern.categories?.some(
            (category) => registeredPatternCategories.includes(category)
          ) ?? false;
          return !pattern.categories?.length || !hasKnownCategory;
        }
        return pattern.categories?.includes(selectedCategory);
      });
      if (!searchValue) {
        return filteredPatterns;
      }
      return searchItems(filteredPatterns, searchValue);
    }, [
      searchValue,
      patterns,
      selectedCategory,
      registeredPatternCategories
    ]);
    (0, import_element62.useEffect)(() => {
      if (!searchValue) {
        return;
      }
      const count = filteredBlockPatterns.length;
      const resultsFoundMessage = (0, import_i18n47.sprintf)(
        /* translators: %d: number of results. */
        (0, import_i18n47._n)("%d result found.", "%d results found.", count),
        count
      );
      debouncedSpeak(resultsFoundMessage);
    }, [searchValue, debouncedSpeak, filteredBlockPatterns.length]);
    const pagingProps = usePatternsPaging(
      filteredBlockPatterns,
      selectedCategory,
      container
    );
    const [previousSearchValue, setPreviousSearchValue] = (0, import_element62.useState)(searchValue);
    if (searchValue !== previousSearchValue) {
      setPreviousSearchValue(searchValue);
      pagingProps.changePage(1);
    }
    const hasItems = !!filteredBlockPatterns?.length;
    return /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)(
      "div",
      {
        className: "block-editor-block-patterns-explorer__list",
        ref: container,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
            PatternsListHeader,
            {
              filterValue: searchValue,
              filteredBlockPatternsLength: filteredBlockPatterns.length
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(inserter_listbox_default, { children: hasItems && /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)(import_jsx_runtime178.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
              block_patterns_list_default,
              {
                blockPatterns: pagingProps.categoryPatterns,
                onClickPattern: (pattern, blocks2) => {
                  onClickPattern(pattern, blocks2);
                  onModalClose();
                },
                isDraggable: false
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(Pagination, { ...pagingProps })
          ] }) })
        ]
      }
    );
  }
  var pattern_list_default = PatternList;

  // packages/block-editor/build-module/components/inserter/block-patterns-tab/use-pattern-categories.mjs
  var import_element63 = __toESM(require_element(), 1);
  var import_i18n48 = __toESM(require_i18n(), 1);
  var import_a11y8 = __toESM(require_a11y(), 1);
  function hasRegisteredCategory(pattern, allCategories) {
    if (!pattern.categories || !pattern.categories.length) {
      return false;
    }
    return pattern.categories.some(
      (cat) => allCategories.some((category) => category.name === cat)
    );
  }
  function usePatternCategories(rootClientId, sourceFilter = "all") {
    const [patterns, allCategories] = use_patterns_state_default(
      void 0,
      rootClientId
    );
    const filteredPatterns = (0, import_element63.useMemo)(
      () => sourceFilter === "all" ? patterns : patterns.filter(
        (pattern) => !isPatternFiltered(pattern, sourceFilter)
      ),
      [sourceFilter, patterns]
    );
    const populatedCategories = (0, import_element63.useMemo)(() => {
      const categories = allCategories.filter(
        (category) => filteredPatterns.some(
          (pattern) => pattern.categories?.includes(category.name)
        )
      ).sort((a2, b2) => a2.label.localeCompare(b2.label));
      if (filteredPatterns.some(
        (pattern) => !hasRegisteredCategory(pattern, allCategories)
      ) && !categories.find(
        (category) => category.name === "uncategorized"
      )) {
        categories.push({
          name: "uncategorized",
          label: (0, import_i18n48._x)("Uncategorized")
        });
      }
      if (filteredPatterns.some(
        (pattern) => pattern.blockTypes?.includes("core/post-content")
      )) {
        categories.unshift(starterPatternsCategory);
      }
      if (filteredPatterns.some(
        (pattern) => pattern.type === INSERTER_PATTERN_TYPES.user
      )) {
        categories.unshift(myPatternsCategory);
      }
      if (filteredPatterns.length > 0) {
        categories.unshift({
          name: allPatternsCategory.name,
          label: allPatternsCategory.label
        });
      }
      (0, import_a11y8.speak)(
        (0, import_i18n48.sprintf)(
          /* translators: %d: number of categories . */
          (0, import_i18n48._n)(
            "%d category button displayed.",
            "%d category buttons displayed.",
            categories.length
          ),
          categories.length
        )
      );
      return categories;
    }, [allCategories, filteredPatterns]);
    return populatedCategories;
  }

  // packages/block-editor/build-module/components/inserter/block-patterns-explorer/index.mjs
  var import_jsx_runtime179 = __toESM(require_jsx_runtime(), 1);
  function PatternsExplorer({ initialCategory, rootClientId, onModalClose }) {
    const [searchValue, setSearchValue] = (0, import_element64.useState)("");
    const [selectedCategory, setSelectedCategory] = (0, import_element64.useState)(
      initialCategory?.name
    );
    const patternCategories = usePatternCategories(rootClientId);
    return /* @__PURE__ */ (0, import_jsx_runtime179.jsxs)("div", { className: "block-editor-block-patterns-explorer", children: [
      /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
        pattern_explorer_sidebar_default,
        {
          selectedCategory,
          patternCategories,
          onClickCategory: setSelectedCategory,
          searchValue,
          setSearchValue
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
        pattern_list_default,
        {
          searchValue,
          selectedCategory,
          patternCategories,
          rootClientId,
          onModalClose
        }
      )
    ] });
  }
  function PatternsExplorerModal({ onModalClose, ...restProps }) {
    return /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
      import_components46.Modal,
      {
        title: (0, import_i18n49.__)("Patterns"),
        onRequestClose: onModalClose,
        isFullScreen: true,
        children: /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(PatternsExplorer, { onModalClose, ...restProps })
      }
    );
  }
  var block_patterns_explorer_default = PatternsExplorerModal;

  // packages/block-editor/build-module/components/inserter/mobile-tab-navigation.mjs
  var import_i18n50 = __toESM(require_i18n(), 1);
  var import_components47 = __toESM(require_components(), 1);
  var import_jsx_runtime180 = __toESM(require_jsx_runtime(), 1);
  function ScreenHeader({ title }) {
    return /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(import_components47.__experimentalVStack, { spacing: 0, children: /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(import_components47.__experimentalView, { children: /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(import_components47.__experimentalSpacer, { marginBottom: 0, paddingX: 4, paddingY: 3, children: /* @__PURE__ */ (0, import_jsx_runtime180.jsxs)(import_components47.__experimentalHStack, { spacing: 2, children: [
      /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
        import_components47.Navigator.BackButton,
        {
          style: (
            // TODO: This style override is also used in ToolsPanelHeader.
            // It should be supported out-of-the-box by Button.
            { minWidth: 24, padding: 0 }
          ),
          icon: (0, import_i18n50.isRTL)() ? chevron_right_default : chevron_left_default,
          size: "small",
          label: (0, import_i18n50.__)("Back")
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(import_components47.__experimentalSpacer, { children: /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(import_components47.__experimentalHeading, { level: 5, children: title }) })
    ] }) }) }) });
  }
  function MobileTabNavigation({ categories, children }) {
    return /* @__PURE__ */ (0, import_jsx_runtime180.jsxs)(
      import_components47.Navigator,
      {
        initialPath: "/",
        className: "block-editor-inserter__mobile-tab-navigation",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(import_components47.Navigator.Screen, { path: "/", children: /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(import_components47.__experimentalItemGroup, { children: categories.map((category) => /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
            import_components47.Navigator.Button,
            {
              path: `/category/${category.name}`,
              as: import_components47.__experimentalItem,
              isAction: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime180.jsxs)(import_components47.__experimentalHStack, { children: [
                /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(import_components47.FlexBlock, { children: category.label }),
                /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
                  icon_default,
                  {
                    icon: (0, import_i18n50.isRTL)() ? chevron_left_default : chevron_right_default
                  }
                )
              ] })
            },
            category.name
          )) }) }),
          categories.map((category) => /* @__PURE__ */ (0, import_jsx_runtime180.jsxs)(
            import_components47.Navigator.Screen,
            {
              path: `/category/${category.name}`,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(ScreenHeader, { title: (0, import_i18n50.__)("Back") }),
                children(category)
              ]
            },
            category.name
          ))
        ]
      }
    );
  }

  // packages/block-editor/build-module/components/inserter/block-patterns-tab/pattern-category-previews.mjs
  var import_element66 = __toESM(require_element(), 1);
  var import_i18n52 = __toESM(require_i18n(), 1);
  var import_components49 = __toESM(require_components(), 1);

  // packages/block-editor/build-module/components/inserter/block-patterns-tab/patterns-filter.mjs
  var import_components48 = __toESM(require_components(), 1);
  var import_i18n51 = __toESM(require_i18n(), 1);
  var import_element65 = __toESM(require_element(), 1);
  var import_jsx_runtime181 = __toESM(require_jsx_runtime(), 1);
  var getShouldDisableSyncFilter = (sourceFilter) => sourceFilter !== "all" && sourceFilter !== "user";
  var getShouldHideSourcesFilter = (category) => {
    return category.name === myPatternsCategory.name;
  };
  var PATTERN_SOURCE_MENU_OPTIONS = [
    {
      value: "all",
      label: (0, import_i18n51._x)("All", "patterns")
    },
    {
      value: INSERTER_PATTERN_TYPES.directory,
      label: (0, import_i18n51.__)("Pattern Directory")
    },
    {
      value: INSERTER_PATTERN_TYPES.theme,
      label: (0, import_i18n51.__)("Theme & Plugins")
    },
    {
      value: INSERTER_PATTERN_TYPES.user,
      label: (0, import_i18n51.__)("User")
    }
  ];
  function PatternsFilter({
    setPatternSyncFilter,
    setPatternSourceFilter,
    patternSyncFilter,
    patternSourceFilter,
    scrollContainerRef,
    category
  }) {
    const currentPatternSourceFilter = category.name === myPatternsCategory.name ? INSERTER_PATTERN_TYPES.user : patternSourceFilter;
    const shouldDisableSyncFilter = getShouldDisableSyncFilter(
      currentPatternSourceFilter
    );
    const shouldHideSourcesFilter = getShouldHideSourcesFilter(category);
    const patternSyncMenuOptions = (0, import_element65.useMemo)(
      () => [
        {
          value: "all",
          label: (0, import_i18n51._x)("All", "patterns")
        },
        {
          value: INSERTER_SYNC_TYPES.full,
          label: (0, import_i18n51._x)("Synced", "patterns"),
          disabled: shouldDisableSyncFilter
        },
        {
          value: INSERTER_SYNC_TYPES.unsynced,
          label: (0, import_i18n51._x)("Not synced", "patterns"),
          disabled: shouldDisableSyncFilter
        }
      ],
      [shouldDisableSyncFilter]
    );
    function handleSetSourceFilterChange(newSourceFilter) {
      setPatternSourceFilter(newSourceFilter);
      if (getShouldDisableSyncFilter(newSourceFilter)) {
        setPatternSyncFilter("all");
      }
    }
    return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(import_jsx_runtime181.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
      import_components48.DropdownMenu,
      {
        popoverProps: {
          placement: "right-end"
        },
        label: (0, import_i18n51.__)("Filter patterns"),
        toggleProps: { size: "compact" },
        icon: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
          icon_default,
          {
            icon: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
              import_components48.SVG,
              {
                width: "24",
                height: "24",
                viewBox: "0 0 24 24",
                fill: "none",
                xmlns: "http://www.w3.org/2000/svg",
                children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
                  import_components48.Path,
                  {
                    d: "M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z",
                    fill: "currentColor"
                  }
                )
              }
            )
          }
        ),
        children: () => /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(import_jsx_runtime181.Fragment, { children: [
          !shouldHideSourcesFilter && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(import_components48.MenuGroup, { label: (0, import_i18n51.__)("Source"), children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
            import_components48.MenuItemsChoice,
            {
              choices: PATTERN_SOURCE_MENU_OPTIONS,
              onSelect: (value) => {
                handleSetSourceFilterChange(value);
                scrollContainerRef.current?.scrollTo(
                  0,
                  0
                );
              },
              value: currentPatternSourceFilter
            }
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(import_components48.MenuGroup, { label: (0, import_i18n51.__)("Type"), children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
            import_components48.MenuItemsChoice,
            {
              choices: patternSyncMenuOptions,
              onSelect: (value) => {
                setPatternSyncFilter(value);
                scrollContainerRef.current?.scrollTo(
                  0,
                  0
                );
              },
              value: patternSyncFilter
            }
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { className: "block-editor-inserter__patterns-filter-help", children: (0, import_element65.createInterpolateElement)(
            (0, import_i18n51.__)(
              "Patterns are available from the <Link>WordPress.org Pattern Directory</Link>, bundled in the active theme, or created by users on this site. Only patterns created on this site can be synced."
            ),
            {
              Link: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
                import_components48.ExternalLink,
                {
                  href: (0, import_i18n51.__)(
                    "https://wordpress.org/patterns/"
                  )
                }
              )
            }
          ) })
        ] })
      }
    ) });
  }

  // packages/block-editor/build-module/components/inserter/block-patterns-tab/pattern-category-previews.mjs
  var import_jsx_runtime182 = __toESM(require_jsx_runtime(), 1);
  var noop7 = () => {
  };
  function PatternCategoryPreviews({
    rootClientId,
    onInsert,
    onHover = noop7,
    category,
    showTitlesAsTooltip
  }) {
    const [allPatterns, , onClickPattern] = use_patterns_state_default(
      onInsert,
      rootClientId,
      category?.name
    );
    const [patternSyncFilter, setPatternSyncFilter] = (0, import_element66.useState)("all");
    const [patternSourceFilter, setPatternSourceFilter] = (0, import_element66.useState)("all");
    const availableCategories = usePatternCategories(
      rootClientId,
      patternSourceFilter
    );
    const scrollContainerRef = (0, import_element66.useRef)();
    const currentCategoryPatterns = (0, import_element66.useMemo)(
      () => allPatterns.filter((pattern) => {
        if (isPatternFiltered(
          pattern,
          patternSourceFilter,
          patternSyncFilter
        )) {
          return false;
        }
        if (category.name === allPatternsCategory.name) {
          return true;
        }
        if (category.name === myPatternsCategory.name && pattern.type === INSERTER_PATTERN_TYPES.user) {
          return true;
        }
        if (category.name === starterPatternsCategory.name && pattern.blockTypes?.includes("core/post-content")) {
          return true;
        }
        if (category.name === "uncategorized") {
          if (!pattern.categories) {
            return true;
          }
          return !pattern.categories.some(
            (catName) => availableCategories.some((c6) => c6.name === catName)
          );
        }
        return pattern.categories?.includes(category.name);
      }),
      [
        allPatterns,
        availableCategories,
        category.name,
        patternSourceFilter,
        patternSyncFilter
      ]
    );
    const pagingProps = usePatternsPaging(
      currentCategoryPatterns,
      category,
      scrollContainerRef
    );
    const { changePage } = pagingProps;
    (0, import_element66.useEffect)(() => () => onHover(null), []);
    const onSetPatternSyncFilter = (0, import_element66.useCallback)(
      (value) => {
        setPatternSyncFilter(value);
        changePage(1);
      },
      [setPatternSyncFilter, changePage]
    );
    const onSetPatternSourceFilter = (0, import_element66.useCallback)(
      (value) => {
        setPatternSourceFilter(value);
        changePage(1);
      },
      [setPatternSourceFilter, changePage]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime182.jsxs)(import_jsx_runtime182.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime182.jsxs)(
        import_components49.__experimentalVStack,
        {
          spacing: 2,
          className: "block-editor-inserter__patterns-category-panel-header",
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime182.jsxs)(import_components49.__experimentalHStack, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(import_components49.FlexBlock, { children: /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
                import_components49.__experimentalHeading,
                {
                  className: "block-editor-inserter__patterns-category-panel-title",
                  size: 13,
                  level: 4,
                  as: "div",
                  children: category.label
                }
              ) }),
              /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
                PatternsFilter,
                {
                  patternSyncFilter,
                  patternSourceFilter,
                  setPatternSyncFilter: onSetPatternSyncFilter,
                  setPatternSourceFilter: onSetPatternSourceFilter,
                  scrollContainerRef,
                  category
                }
              )
            ] }),
            !currentCategoryPatterns.length && /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
              import_components49.__experimentalText,
              {
                variant: "muted",
                className: "block-editor-inserter__patterns-category-no-results",
                children: (0, import_i18n52.__)("No results found")
              }
            )
          ]
        }
      ),
      currentCategoryPatterns.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime182.jsxs)(import_jsx_runtime182.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
          import_components49.__experimentalText,
          {
            size: "12",
            as: "p",
            className: "block-editor-inserter__help-text",
            children: (0, import_i18n52.__)("Drag and drop patterns into the canvas.")
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
          block_patterns_list_default,
          {
            ref: scrollContainerRef,
            blockPatterns: pagingProps.categoryPatterns,
            onClickPattern,
            onHover,
            label: category.label,
            orientation: "vertical",
            category: category.name,
            isDraggable: true,
            showTitlesAsTooltip,
            patternFilter: patternSourceFilter,
            pagingProps
          }
        )
      ] })
    ] });
  }

  // packages/block-editor/build-module/components/inserter/category-tabs/index.mjs
  var import_compose39 = __toESM(require_compose(), 1);
  var import_components50 = __toESM(require_components(), 1);
  var import_element67 = __toESM(require_element(), 1);
  var import_jsx_runtime183 = __toESM(require_jsx_runtime(), 1);
  var { Tabs } = unlock(import_components50.privateApis);
  function CategoryTabs({
    categories,
    selectedCategory,
    onSelectCategory,
    children
  }) {
    const ANIMATION_DURATION = 0.25;
    const disableMotion = (0, import_compose39.useReducedMotion)();
    const defaultTransition = {
      type: "tween",
      duration: disableMotion ? 0 : ANIMATION_DURATION,
      ease: [0.6, 0, 0.4, 1]
    };
    const previousSelectedCategory = (0, import_compose39.usePrevious)(selectedCategory);
    const selectedTabId = selectedCategory ? selectedCategory.name : null;
    const [activeTabId, setActiveId] = (0, import_element67.useState)();
    const firstTabId = categories?.[0]?.name;
    if (selectedTabId === null && !activeTabId && firstTabId) {
      setActiveId(firstTabId);
    }
    return /* @__PURE__ */ (0, import_jsx_runtime183.jsxs)(
      Tabs,
      {
        selectOnMove: false,
        selectedTabId,
        orientation: "vertical",
        onSelect: (categoryId) => {
          onSelectCategory(
            categories.find(
              (category) => category.name === categoryId
            )
          );
        },
        activeTabId,
        onActiveTabIdChange: setActiveId,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(Tabs.TabList, { className: "block-editor-inserter__category-tablist", children: categories.map((category) => /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
            Tabs.Tab,
            {
              tabId: category.name,
              "aria-current": category === selectedCategory ? "true" : void 0,
              children: category.label
            },
            category.name
          )) }),
          categories.map((category) => /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
            Tabs.TabPanel,
            {
              tabId: category.name,
              focusable: false,
              children: /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
                import_components50.__unstableMotion.div,
                {
                  className: "block-editor-inserter__category-panel",
                  initial: !previousSelectedCategory ? "closed" : "open",
                  animate: "open",
                  variants: {
                    open: {
                      transform: "translateX( 0 )",
                      transitionEnd: {
                        zIndex: "1"
                      }
                    },
                    closed: {
                      transform: "translateX( -100% )",
                      zIndex: "-1"
                    }
                  },
                  transition: defaultTransition,
                  children
                }
              )
            },
            category.name
          ))
        ]
      }
    );
  }
  var category_tabs_default = CategoryTabs;

  // packages/block-editor/build-module/components/inserter/block-patterns-tab/index.mjs
  var import_jsx_runtime184 = __toESM(require_jsx_runtime(), 1);
  function BlockPatternsTab({
    onSelectCategory,
    selectedCategory,
    onInsert,
    rootClientId,
    children
  }) {
    const [showPatternsExplorer, setShowPatternsExplorer] = (0, import_element68.useState)(false);
    const categories = usePatternCategories(rootClientId);
    const isMobile = (0, import_compose40.useViewportMatch)("medium", "<");
    if (!categories.length) {
      return /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(no_results_default, {});
    }
    return /* @__PURE__ */ (0, import_jsx_runtime184.jsxs)(import_jsx_runtime184.Fragment, { children: [
      !isMobile && /* @__PURE__ */ (0, import_jsx_runtime184.jsxs)("div", { className: "block-editor-inserter__block-patterns-tabs-container", children: [
        /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
          category_tabs_default,
          {
            categories,
            selectedCategory,
            onSelectCategory,
            children
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
          import_components51.Button,
          {
            __next40pxDefaultSize: true,
            className: "block-editor-inserter__patterns-explore-button",
            onClick: () => setShowPatternsExplorer(true),
            variant: "secondary",
            children: (0, import_i18n53.__)("Explore all patterns")
          }
        )
      ] }),
      isMobile && /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(MobileTabNavigation, { categories, children: (category) => /* @__PURE__ */ (0, import_jsx_runtime184.jsx)("div", { className: "block-editor-inserter__category-panel", children: /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
        PatternCategoryPreviews,
        {
          onInsert,
          rootClientId,
          category
        },
        category.name
      ) }) }),
      showPatternsExplorer && /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
        block_patterns_explorer_default,
        {
          initialCategory: selectedCategory || categories[0],
          patternCategories: categories,
          onModalClose: () => setShowPatternsExplorer(false),
          rootClientId
        }
      )
    ] });
  }
  var block_patterns_tab_default = BlockPatternsTab;

  // packages/block-editor/build-module/components/inserter/media-tab/media-tab.mjs
  var import_i18n57 = __toESM(require_i18n(), 1);
  var import_compose42 = __toESM(require_compose(), 1);
  var import_components56 = __toESM(require_components(), 1);
  var import_element71 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/inserter/media-tab/media-panel.mjs
  var import_components54 = __toESM(require_components(), 1);
  var import_i18n56 = __toESM(require_i18n(), 1);
  var import_compose41 = __toESM(require_compose(), 1);

  // packages/block-editor/build-module/components/inserter/media-tab/media-list.mjs
  var import_components53 = __toESM(require_components(), 1);
  var import_i18n55 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/components/inserter/media-tab/media-preview.mjs
  var import_components52 = __toESM(require_components(), 1);
  var import_i18n54 = __toESM(require_i18n(), 1);
  var import_element69 = __toESM(require_element(), 1);
  var import_blocks37 = __toESM(require_blocks(), 1);
  var import_data54 = __toESM(require_data(), 1);
  var import_notices6 = __toESM(require_notices(), 1);
  var import_blob = __toESM(require_blob(), 1);
  var import_url3 = __toESM(require_url(), 1);

  // packages/block-editor/build-module/components/inserter/media-tab/utils.mjs
  var import_blocks36 = __toESM(require_blocks(), 1);
  var import_jsx_runtime185 = __toESM(require_jsx_runtime(), 1);
  var mediaTypeTag = { image: "img", video: "video", audio: "audio" };
  function getBlockAndPreviewFromMedia(media, mediaType) {
    const attributes = {
      id: media.id || void 0,
      caption: media.caption || void 0
    };
    const mediaSrc = media.url;
    const alt = media.alt || void 0;
    if (mediaType === "image") {
      attributes.url = mediaSrc;
      attributes.alt = alt;
    } else if (["video", "audio"].includes(mediaType)) {
      attributes.src = mediaSrc;
    }
    const PreviewTag = mediaTypeTag[mediaType];
    const preview = /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
      PreviewTag,
      {
        src: media.previewUrl || mediaSrc,
        alt,
        controls: mediaType === "audio" ? true : void 0,
        inert: "true",
        onError: ({ currentTarget }) => {
          if (currentTarget.src === media.previewUrl) {
            currentTarget.src = mediaSrc;
          }
        }
      }
    );
    return [(0, import_blocks36.createBlock)(`core/${mediaType}`, attributes), preview];
  }

  // packages/block-editor/build-module/components/inserter/media-tab/media-preview.mjs
  var import_jsx_runtime186 = __toESM(require_jsx_runtime(), 1);
  var ALLOWED_MEDIA_TYPES = ["image"];
  var MEDIA_OPTIONS_POPOVER_PROPS = {
    placement: "bottom-end",
    className: "block-editor-inserter__media-list__item-preview-options__popover"
  };
  function MediaPreviewOptions({ category, media }) {
    if (!category.getReportUrl) {
      return null;
    }
    const reportUrl = category.getReportUrl(media);
    return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
      import_components52.DropdownMenu,
      {
        className: "block-editor-inserter__media-list__item-preview-options",
        label: (0, import_i18n54.__)("Options"),
        popoverProps: MEDIA_OPTIONS_POPOVER_PROPS,
        icon: more_vertical_default,
        children: () => /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(import_components52.MenuGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
          import_components52.MenuItem,
          {
            onClick: () => window.open(reportUrl, "_blank").focus(),
            icon: external_default,
            children: (0, import_i18n54.sprintf)(
              /* translators: %s: The media type to report e.g: "image", "video", "audio" */
              (0, import_i18n54.__)("Report %s"),
              category.mediaType
            )
          }
        ) })
      }
    );
  }
  function InsertExternalImageModal({ onClose, onSubmit }) {
    return /* @__PURE__ */ (0, import_jsx_runtime186.jsxs)(
      import_components52.Modal,
      {
        title: (0, import_i18n54.__)("Insert external image"),
        onRequestClose: onClose,
        className: "block-editor-inserter-media-tab-media-preview-inserter-external-image-modal",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime186.jsxs)(import_components52.__experimentalVStack, { spacing: 3, children: [
            /* @__PURE__ */ (0, import_jsx_runtime186.jsx)("p", { children: (0, import_i18n54.__)(
              "This image cannot be uploaded to your Media Library, but it can still be inserted as an external image."
            ) }),
            /* @__PURE__ */ (0, import_jsx_runtime186.jsx)("p", { children: (0, import_i18n54.__)(
              "External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation."
            ) })
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime186.jsxs)(
            import_components52.Flex,
            {
              className: "block-editor-block-lock-modal__actions",
              justify: "flex-end",
              expanded: false,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(import_components52.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
                  import_components52.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "tertiary",
                    onClick: onClose,
                    children: (0, import_i18n54.__)("Cancel")
                  }
                ) }),
                /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(import_components52.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
                  import_components52.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "primary",
                    onClick: onSubmit,
                    children: (0, import_i18n54.__)("Insert")
                  }
                ) })
              ]
            }
          )
        ]
      }
    );
  }
  function MediaPreview({ media, onClick, category }) {
    const [showExternalUploadModal, setShowExternalUploadModal] = (0, import_element69.useState)(false);
    const [isHovered, setIsHovered] = (0, import_element69.useState)(false);
    const [isInserting, setIsInserting] = (0, import_element69.useState)(false);
    const [block, preview] = (0, import_element69.useMemo)(
      () => getBlockAndPreviewFromMedia(media, category.mediaType),
      [media, category.mediaType]
    );
    const { createErrorNotice, createSuccessNotice } = (0, import_data54.useDispatch)(import_notices6.store);
    const { getSettings: getSettings7, getBlock: getBlock2 } = (0, import_data54.useSelect)(store);
    const { updateBlockAttributes: updateBlockAttributes2 } = (0, import_data54.useDispatch)(store);
    const onMediaInsert = (0, import_element69.useCallback)(
      (previewBlock) => {
        if (isInserting) {
          return;
        }
        const settings2 = getSettings7();
        const clonedBlock = (0, import_blocks37.cloneBlock)(previewBlock);
        const { id, url, caption } = clonedBlock.attributes;
        if (!id && !settings2.mediaUpload) {
          setShowExternalUploadModal(true);
          return;
        }
        if (!!id) {
          onClick(clonedBlock);
          return;
        }
        setIsInserting(true);
        window.fetch(url).then((response) => response.blob()).then((blob) => {
          const fileName = (0, import_url3.getFilename)(url) || "image.jpg";
          const file = new File([blob], fileName, {
            type: blob.type
          });
          settings2.mediaUpload({
            filesList: [file],
            additionalData: { caption },
            onFileChange([img]) {
              if ((0, import_blob.isBlobURL)(img.url)) {
                return;
              }
              if (!getBlock2(clonedBlock.clientId)) {
                onClick({
                  ...clonedBlock,
                  attributes: {
                    ...clonedBlock.attributes,
                    id: img.id,
                    url: img.url
                  }
                });
                createSuccessNotice(
                  (0, import_i18n54.__)("Image uploaded and inserted."),
                  { type: "snackbar", id: "inserter-notice" }
                );
              } else {
                updateBlockAttributes2(clonedBlock.clientId, {
                  ...clonedBlock.attributes,
                  id: img.id,
                  url: img.url
                });
              }
              setIsInserting(false);
            },
            allowedTypes: ALLOWED_MEDIA_TYPES,
            onError(message2) {
              createErrorNotice(message2, {
                type: "snackbar",
                id: "inserter-notice"
              });
              setIsInserting(false);
            }
          });
        }).catch(() => {
          setShowExternalUploadModal(true);
          setIsInserting(false);
        });
      },
      [
        isInserting,
        getSettings7,
        onClick,
        createSuccessNotice,
        updateBlockAttributes2,
        createErrorNotice,
        getBlock2
      ]
    );
    const title = typeof media.title === "string" ? media.title : media.title?.rendered || (0, import_i18n54.__)("no title");
    const onMouseEnter = (0, import_element69.useCallback)(() => setIsHovered(true), []);
    const onMouseLeave = (0, import_element69.useCallback)(() => setIsHovered(false), []);
    return /* @__PURE__ */ (0, import_jsx_runtime186.jsxs)(import_jsx_runtime186.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(inserter_draggable_blocks_default, { isEnabled: true, blocks: [block], children: ({ draggable, onDragStart, onDragEnd }) => /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
        "div",
        {
          className: clsx_default(
            "block-editor-inserter__media-list__list-item",
            {
              "is-hovered": isHovered
            }
          ),
          draggable,
          onDragStart,
          onDragEnd,
          children: /* @__PURE__ */ (0, import_jsx_runtime186.jsxs)(
            "div",
            {
              onMouseEnter,
              onMouseLeave,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(import_components52.Tooltip, { text: title, children: /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
                  import_components52.Composite.Item,
                  {
                    render: /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
                      "div",
                      {
                        "aria-label": title,
                        role: "option",
                        className: "block-editor-inserter__media-list__item"
                      }
                    ),
                    onClick: () => onMediaInsert(block),
                    children: /* @__PURE__ */ (0, import_jsx_runtime186.jsxs)("div", { className: "block-editor-inserter__media-list__item-preview", children: [
                      preview,
                      isInserting && /* @__PURE__ */ (0, import_jsx_runtime186.jsx)("div", { className: "block-editor-inserter__media-list__item-preview-spinner", children: /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(import_components52.Spinner, {}) })
                    ] })
                  }
                ) }),
                !isInserting && /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
                  MediaPreviewOptions,
                  {
                    category,
                    media
                  }
                )
              ]
            }
          )
        }
      ) }),
      showExternalUploadModal && /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
        InsertExternalImageModal,
        {
          onClose: () => setShowExternalUploadModal(false),
          onSubmit: () => {
            onClick((0, import_blocks37.cloneBlock)(block));
            createSuccessNotice((0, import_i18n54.__)("Image inserted."), {
              type: "snackbar",
              id: "inserter-notice"
            });
            setShowExternalUploadModal(false);
          }
        }
      )
    ] });
  }

  // packages/block-editor/build-module/components/inserter/media-tab/media-list.mjs
  var import_jsx_runtime187 = __toESM(require_jsx_runtime(), 1);
  function MediaList({
    mediaList,
    category,
    onClick,
    label = (0, import_i18n55.__)("Media List")
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
      import_components53.Composite,
      {
        role: "listbox",
        className: "block-editor-inserter__media-list",
        "aria-label": label,
        children: mediaList.map((media, index) => /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
          MediaPreview,
          {
            media,
            category,
            onClick
          },
          media.id || media.sourceId || index
        ))
      }
    );
  }
  var media_list_default = MediaList;

  // packages/block-editor/build-module/components/inserter/media-tab/hooks.mjs
  var import_element70 = __toESM(require_element(), 1);
  var import_data55 = __toESM(require_data(), 1);
  function useMediaResults(category, query = {}) {
    const [mediaList, setMediaList] = (0, import_element70.useState)();
    const [isLoading, setIsLoading] = (0, import_element70.useState)(false);
    const lastRequestRef = (0, import_element70.useRef)();
    (0, import_element70.useEffect)(() => {
      (async () => {
        const key = JSON.stringify({
          category: category.name,
          ...query
        });
        lastRequestRef.current = key;
        setIsLoading(true);
        setMediaList([]);
        const _media = await category.fetch?.(query);
        if (key === lastRequestRef.current) {
          setMediaList(_media);
          setIsLoading(false);
        }
      })();
    }, [category.name, ...Object.values(query)]);
    return { mediaList, isLoading };
  }
  function useMediaCategories(rootClientId) {
    const [categories, setCategories] = (0, import_element70.useState)([]);
    const inserterMediaCategories = (0, import_data55.useSelect)(
      (select3) => unlock(select3(store)).getInserterMediaCategories(),
      []
    );
    const { canInsertImage, canInsertVideo, canInsertAudio } = (0, import_data55.useSelect)(
      (select3) => {
        const { canInsertBlockType: canInsertBlockType2 } = select3(store);
        return {
          canInsertImage: canInsertBlockType2(
            "core/image",
            rootClientId
          ),
          canInsertVideo: canInsertBlockType2(
            "core/video",
            rootClientId
          ),
          canInsertAudio: canInsertBlockType2(
            "core/audio",
            rootClientId
          )
        };
      },
      [rootClientId]
    );
    (0, import_element70.useEffect)(() => {
      (async () => {
        const _categories = [];
        if (!inserterMediaCategories) {
          return;
        }
        const categoriesHaveMedia = new Map(
          await Promise.all(
            inserterMediaCategories.map(async (category) => {
              if (category.isExternalResource) {
                return [category.name, true];
              }
              let results = [];
              try {
                results = await category.fetch({
                  per_page: 1
                });
              } catch (e2) {
              }
              return [category.name, !!results.length];
            })
          )
        );
        const canInsertMediaType = {
          image: canInsertImage,
          video: canInsertVideo,
          audio: canInsertAudio
        };
        inserterMediaCategories.forEach((category) => {
          if (canInsertMediaType[category.mediaType] && categoriesHaveMedia.get(category.name)) {
            _categories.push(category);
          }
        });
        if (!!_categories.length) {
          setCategories(_categories);
        }
      })();
    }, [
      canInsertImage,
      canInsertVideo,
      canInsertAudio,
      inserterMediaCategories
    ]);
    return categories;
  }

  // packages/block-editor/build-module/components/inserter/media-tab/media-panel.mjs
  var import_jsx_runtime188 = __toESM(require_jsx_runtime(), 1);
  var INITIAL_MEDIA_ITEMS_PER_PAGE = 10;
  function MediaCategoryPanel({ rootClientId, onInsert, category }) {
    const [search, setSearch, debouncedSearch] = (0, import_compose41.useDebouncedInput)();
    const { mediaList, isLoading } = useMediaResults(category, {
      per_page: !!debouncedSearch ? 20 : INITIAL_MEDIA_ITEMS_PER_PAGE,
      search: debouncedSearch
    });
    const baseCssClass = "block-editor-inserter__media-panel";
    const searchLabel = category.labels.search_items || (0, import_i18n56.__)("Search");
    return /* @__PURE__ */ (0, import_jsx_runtime188.jsxs)("div", { className: baseCssClass, children: [
      /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(
        import_components54.SearchControl,
        {
          className: `${baseCssClass}-search`,
          onChange: setSearch,
          value: search,
          label: searchLabel,
          placeholder: searchLabel
        }
      ),
      isLoading && /* @__PURE__ */ (0, import_jsx_runtime188.jsx)("div", { className: `${baseCssClass}-spinner`, children: /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(import_components54.Spinner, {}) }),
      !isLoading && !mediaList?.length && /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(no_results_default, {}),
      !isLoading && !!mediaList?.length && /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(
        media_list_default,
        {
          rootClientId,
          onClick: onInsert,
          mediaList,
          category
        }
      )
    ] });
  }

  // packages/block-editor/build-module/components/media-upload/check.mjs
  var import_data56 = __toESM(require_data(), 1);
  function MediaUploadCheck({ fallback = null, children }) {
    const hasUploadPermissions = (0, import_data56.useSelect)((select3) => {
      const { getSettings: getSettings7 } = select3(store);
      return !!getSettings7().mediaUpload;
    }, []);
    return hasUploadPermissions ? children : fallback;
  }
  var check_default2 = MediaUploadCheck;

  // packages/block-editor/build-module/components/media-upload/index.mjs
  var import_components55 = __toESM(require_components(), 1);
  var MediaUpload = () => null;
  var media_upload_default = (0, import_components55.withFilters)("editor.MediaUpload")(MediaUpload);

  // packages/block-editor/build-module/components/inserter/media-tab/media-tab.mjs
  var import_jsx_runtime189 = __toESM(require_jsx_runtime(), 1);
  var ALLOWED_MEDIA_TYPES2 = ["image", "video", "audio"];
  function MediaTab({
    rootClientId,
    selectedCategory,
    onSelectCategory,
    onInsert,
    children
  }) {
    const mediaCategories = useMediaCategories(rootClientId);
    const isMobile = (0, import_compose42.useViewportMatch)("medium", "<");
    const baseCssClass = "block-editor-inserter__media-tabs";
    const onSelectMedia = (0, import_element71.useCallback)(
      (media) => {
        if (!media?.url) {
          return;
        }
        const mediaType = window.__experimentalDataViewsMediaModal && media.mime_type ? media.mime_type.split("/")[0] : media.type;
        const [block] = getBlockAndPreviewFromMedia(media, mediaType);
        onInsert(block);
      },
      [onInsert]
    );
    const categories = (0, import_element71.useMemo)(
      () => mediaCategories.map((mediaCategory) => ({
        ...mediaCategory,
        label: mediaCategory.labels.name
      })),
      [mediaCategories]
    );
    if (!categories.length) {
      return /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(no_results_default, {});
    }
    return /* @__PURE__ */ (0, import_jsx_runtime189.jsxs)(import_jsx_runtime189.Fragment, { children: [
      !isMobile && /* @__PURE__ */ (0, import_jsx_runtime189.jsxs)("div", { className: `${baseCssClass}-container`, children: [
        /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
          category_tabs_default,
          {
            categories,
            selectedCategory,
            onSelectCategory,
            children
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(check_default2, { children: /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
          media_upload_default,
          {
            multiple: false,
            onSelect: onSelectMedia,
            allowedTypes: ALLOWED_MEDIA_TYPES2,
            render: ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
              import_components56.Button,
              {
                __next40pxDefaultSize: true,
                onClick: (event) => {
                  event.target.focus();
                  open();
                },
                className: "block-editor-inserter__media-library-button",
                variant: "secondary",
                "data-unstable-ignore-focus-outside-for-relatedtarget": ".media-modal",
                children: (0, import_i18n57.__)("Open Media Library")
              }
            )
          }
        ) })
      ] }),
      isMobile && /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(MobileTabNavigation, { categories, children: (category) => /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
        MediaCategoryPanel,
        {
          onInsert,
          rootClientId,
          category
        }
      ) })
    ] });
  }
  var media_tab_default = MediaTab;

  // packages/block-editor/build-module/components/inserter/search-results.mjs
  var import_element72 = __toESM(require_element(), 1);
  var import_i18n58 = __toESM(require_i18n(), 1);
  var import_components58 = __toESM(require_components(), 1);
  var import_compose43 = __toESM(require_compose(), 1);
  var import_a11y9 = __toESM(require_a11y(), 1);
  var import_data57 = __toESM(require_data(), 1);

  // packages/block-editor/build-module/components/inserter-menu-extension/index.mjs
  var import_components57 = __toESM(require_components(), 1);
  var { Fill: __unstableInserterMenuExtension, Slot } = (0, import_components57.createSlotFill)(
    "__unstableInserterMenuExtension"
  );
  __unstableInserterMenuExtension.Slot = Slot;
  var inserter_menu_extension_default = __unstableInserterMenuExtension;

  // packages/block-editor/build-module/components/inserter/search-results.mjs
  var import_jsx_runtime190 = __toESM(require_jsx_runtime(), 1);
  var INITIAL_INSERTER_RESULTS = 9;
  var EMPTY_ARRAY6 = [];
  function InserterSearchResults({
    filterValue,
    onSelect,
    onHover,
    onHoverPattern,
    rootClientId,
    clientId,
    isAppender,
    __experimentalInsertionIndex,
    maxBlockPatterns,
    maxBlockTypes,
    showBlockDirectory = false,
    isDraggable = true,
    shouldFocusBlock = true,
    prioritizePatterns,
    selectBlockOnInsert,
    isQuick
  }) {
    const debouncedSpeak = (0, import_compose43.useDebounce)(import_a11y9.speak, 500);
    const { prioritizedBlocks } = (0, import_data57.useSelect)(
      (select3) => {
        const blockListSettings2 = select3(store).getBlockListSettings(rootClientId);
        return {
          prioritizedBlocks: blockListSettings2?.prioritizedInserterBlocks || EMPTY_ARRAY6
        };
      },
      [rootClientId]
    );
    const [destinationRootClientId, onInsertBlocks] = use_insertion_point_default({
      onSelect,
      rootClientId,
      clientId,
      isAppender,
      insertionIndex: __experimentalInsertionIndex,
      shouldFocusBlock,
      selectBlockOnInsert
    });
    const [
      blockTypes,
      blockTypeCategories,
      blockTypeCollections,
      onSelectBlockType
    ] = use_block_types_state_default(destinationRootClientId, onInsertBlocks, isQuick);
    const [patterns, , onClickPattern] = use_patterns_state_default(
      onInsertBlocks,
      destinationRootClientId,
      void 0,
      isQuick
    );
    const filteredBlockPatterns = (0, import_element72.useMemo)(() => {
      if (maxBlockPatterns === 0) {
        return [];
      }
      const results = searchItems(patterns, filterValue);
      return maxBlockPatterns !== void 0 ? results.slice(0, maxBlockPatterns) : results;
    }, [filterValue, patterns, maxBlockPatterns]);
    let maxBlockTypesToShow = maxBlockTypes;
    if (prioritizePatterns && filteredBlockPatterns.length > 2) {
      maxBlockTypesToShow = 0;
    }
    const filteredBlockTypes = (0, import_element72.useMemo)(() => {
      if (maxBlockTypesToShow === 0) {
        return [];
      }
      const nonPatternBlockTypes = blockTypes.filter(
        (blockType) => blockType.name !== "core/block"
      );
      let orderedItems = orderBy(nonPatternBlockTypes, "frecency", "desc");
      if (!filterValue && prioritizedBlocks.length) {
        orderedItems = orderInserterBlockItems(
          orderedItems,
          prioritizedBlocks
        );
      }
      const results = searchBlockItems(
        orderedItems,
        blockTypeCategories,
        blockTypeCollections,
        filterValue
      );
      return maxBlockTypesToShow !== void 0 ? results.slice(0, maxBlockTypesToShow) : results;
    }, [
      filterValue,
      blockTypes,
      blockTypeCategories,
      blockTypeCollections,
      maxBlockTypesToShow,
      prioritizedBlocks
    ]);
    (0, import_element72.useEffect)(() => {
      if (!filterValue) {
        return;
      }
      const count = filteredBlockTypes.length + filteredBlockPatterns.length;
      const resultsFoundMessage = (0, import_i18n58.sprintf)(
        /* translators: %d: number of results. */
        (0, import_i18n58._n)("%d result found.", "%d results found.", count),
        count
      );
      debouncedSpeak(resultsFoundMessage);
    }, [
      filterValue,
      debouncedSpeak,
      filteredBlockTypes,
      filteredBlockPatterns
    ]);
    const currentShownBlockTypes = (0, import_compose43.useAsyncList)(filteredBlockTypes, {
      step: INITIAL_INSERTER_RESULTS
    });
    const hasItems = filteredBlockTypes.length > 0 || filteredBlockPatterns.length > 0;
    const blocksUI = !!filteredBlockTypes.length && /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
      panel_default,
      {
        title: /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(import_components58.VisuallyHidden, { children: (0, import_i18n58.__)("Blocks") }),
        children: /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
          block_types_list_default,
          {
            items: currentShownBlockTypes,
            onSelect: onSelectBlockType,
            onHover,
            label: (0, import_i18n58.__)("Blocks"),
            isDraggable
          }
        )
      }
    );
    const patternsUI = !!filteredBlockPatterns.length && /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
      panel_default,
      {
        title: /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(import_components58.VisuallyHidden, { children: (0, import_i18n58.__)("Block patterns") }),
        children: /* @__PURE__ */ (0, import_jsx_runtime190.jsx)("div", { className: "block-editor-inserter__quick-inserter-patterns", children: /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
          block_patterns_list_default,
          {
            blockPatterns: filteredBlockPatterns,
            onClickPattern,
            onHover: onHoverPattern,
            isDraggable
          }
        ) })
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(inserter_listbox_default, { children: [
      !showBlockDirectory && !hasItems && /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(no_results_default, {}),
      prioritizePatterns ? patternsUI : blocksUI,
      !!filteredBlockTypes.length && !!filteredBlockPatterns.length && /* @__PURE__ */ (0, import_jsx_runtime190.jsx)("div", { className: "block-editor-inserter__quick-inserter-separator" }),
      prioritizePatterns ? blocksUI : patternsUI,
      showBlockDirectory && /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
        inserter_menu_extension_default.Slot,
        {
          fillProps: {
            onSelect: onSelectBlockType,
            onHover,
            filterValue,
            hasItems,
            rootClientId: destinationRootClientId
          },
          children: (fills) => {
            if (fills.length) {
              return fills;
            }
            if (!hasItems) {
              return /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(no_results_default, {});
            }
            return null;
          }
        }
      )
    ] });
  }
  var search_results_default = InserterSearchResults;

  // packages/block-editor/build-module/components/tabbed-sidebar/index.mjs
  var import_components59 = __toESM(require_components(), 1);
  var import_element73 = __toESM(require_element(), 1);
  var import_jsx_runtime191 = __toESM(require_jsx_runtime(), 1);
  var { Tabs: Tabs2 } = unlock(import_components59.privateApis);
  function TabbedSidebar({ defaultTabId, onClose, onSelect, selectedTab, tabs, closeButtonLabel }, ref) {
    return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("div", { className: "block-editor-tabbed-sidebar", children: /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(
      Tabs2,
      {
        selectOnMove: false,
        defaultTabId,
        onSelect,
        selectedTabId: selectedTab,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)("div", { className: "block-editor-tabbed-sidebar__tablist-and-close-button", children: [
            /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
              import_components59.Button,
              {
                className: "block-editor-tabbed-sidebar__close-button",
                icon: close_small_default,
                label: closeButtonLabel,
                onClick: () => onClose(),
                size: "compact"
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
              Tabs2.TabList,
              {
                className: "block-editor-tabbed-sidebar__tablist",
                ref,
                children: tabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
                  Tabs2.Tab,
                  {
                    tabId: tab.name,
                    className: "block-editor-tabbed-sidebar__tab",
                    children: tab.title
                  },
                  tab.name
                ))
              }
            )
          ] }),
          tabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
            Tabs2.TabPanel,
            {
              tabId: tab.name,
              focusable: false,
              className: "block-editor-tabbed-sidebar__tabpanel",
              ref: tab.panelRef,
              children: tab.panel
            },
            tab.name
          ))
        ]
      }
    ) });
  }
  var tabbed_sidebar_default = (0, import_element73.forwardRef)(TabbedSidebar);

  // packages/block-editor/build-module/hooks/use-zoom-out.mjs
  var import_data58 = __toESM(require_data(), 1);
  var import_element74 = __toESM(require_element(), 1);
  function useZoomOut(enabled = true) {
    const { setZoomLevel: setZoomLevel2, resetZoomLevel: resetZoomLevel2 } = unlock(
      (0, import_data58.useDispatch)(store)
    );
    const { isZoomedOut, isZoomOut: isZoomOut2 } = (0, import_data58.useSelect)((select3) => {
      const { isZoomOut: _isZoomOut } = unlock(select3(store));
      return {
        isZoomedOut: _isZoomOut(),
        isZoomOut: _isZoomOut
      };
    }, []);
    const controlZoomLevelRef = (0, import_element74.useRef)(false);
    const isEnabledRef = (0, import_element74.useRef)(enabled);
    (0, import_element74.useEffect)(() => {
      if (isZoomedOut !== isEnabledRef.current) {
        controlZoomLevelRef.current = false;
      }
    }, [isZoomedOut]);
    (0, import_element74.useEffect)(() => {
      isEnabledRef.current = enabled;
      if (enabled !== isZoomOut2()) {
        controlZoomLevelRef.current = true;
        if (enabled) {
          setZoomLevel2("auto-scaled");
        } else {
          resetZoomLevel2();
        }
      }
      return () => {
        if (controlZoomLevelRef.current && isZoomOut2()) {
          resetZoomLevel2();
        }
      };
    }, [enabled, isZoomOut2, resetZoomLevel2, setZoomLevel2]);
  }

  // packages/block-editor/build-module/components/inserter/menu.mjs
  var import_jsx_runtime192 = __toESM(require_jsx_runtime(), 1);
  var NOOP = () => {
  };
  function InserterMenu({
    rootClientId,
    clientId,
    isAppender,
    __experimentalInsertionIndex,
    onSelect,
    showInserterHelpPanel,
    showMostUsedBlocks,
    __experimentalFilterValue = "",
    shouldFocusBlock = true,
    onPatternCategorySelection,
    onClose,
    __experimentalInitialTab,
    __experimentalInitialCategory
  }, ref) {
    const { isZoomOutMode, hasSectionRootClientId } = (0, import_data59.useSelect)((select3) => {
      const { isZoomOut: isZoomOut2, getSectionRootClientId: getSectionRootClientId2 } = unlock(
        select3(store)
      );
      return {
        isZoomOutMode: isZoomOut2(),
        hasSectionRootClientId: !!getSectionRootClientId2()
      };
    }, []);
    const [filterValue, setFilterValue, delayedFilterValue] = (0, import_compose44.useDebouncedInput)(__experimentalFilterValue);
    const [hoveredItem, setHoveredItem] = (0, import_element75.useState)(null);
    const [selectedPatternCategory, setSelectedPatternCategory] = (0, import_element75.useState)(
      __experimentalInitialCategory
    );
    const [patternFilter, setPatternFilter] = (0, import_element75.useState)("all");
    const [selectedMediaCategory, setSelectedMediaCategory] = (0, import_element75.useState)(null);
    const isLargeViewport = (0, import_compose44.useViewportMatch)("large");
    const isMobileViewport = (0, import_compose44.useViewportMatch)("medium", "<");
    const maybeCloseInserter = isMobileViewport ? onClose : NOOP;
    function getInitialTab() {
      if (__experimentalInitialTab) {
        return __experimentalInitialTab;
      }
      if (isZoomOutMode) {
        return "patterns";
      }
      return "blocks";
    }
    const [selectedTab, setSelectedTab] = (0, import_element75.useState)(getInitialTab());
    const shouldUseZoomOut = hasSectionRootClientId && (selectedTab === "patterns" || selectedTab === "media");
    useZoomOut(shouldUseZoomOut && isLargeViewport);
    const [destinationRootClientId, onInsertBlocks, onToggleInsertionPoint] = use_insertion_point_default({
      rootClientId,
      clientId,
      isAppender,
      insertionIndex: __experimentalInsertionIndex,
      shouldFocusBlock
    });
    const blockTypesTabRef = (0, import_element75.useRef)();
    const onInsert = (0, import_element75.useCallback)(
      (blocks2, meta, shouldForceFocusBlock, _rootClientId) => {
        onInsertBlocks(
          blocks2,
          meta,
          shouldForceFocusBlock,
          _rootClientId
        );
        onSelect(blocks2);
        maybeCloseInserter();
        window.requestAnimationFrame(() => {
          if (!shouldFocusBlock && !blockTypesTabRef.current?.contains(
            ref.current.ownerDocument.activeElement
          )) {
            blockTypesTabRef.current?.querySelector("button").focus();
          }
        });
      },
      [onInsertBlocks, maybeCloseInserter, onSelect, ref, shouldFocusBlock]
    );
    const onInsertPattern = (0, import_element75.useCallback)(
      (blocks2, patternName, ...args) => {
        onToggleInsertionPoint(false);
        onInsertBlocks(blocks2, { patternName }, ...args);
        onSelect();
        maybeCloseInserter();
      },
      [onInsertBlocks, maybeCloseInserter, onSelect, onToggleInsertionPoint]
    );
    const onHover = (0, import_element75.useCallback)(
      (item) => {
        onToggleInsertionPoint(item);
        setHoveredItem(item);
      },
      [onToggleInsertionPoint, setHoveredItem]
    );
    const onClickPatternCategory = (0, import_element75.useCallback)(
      (patternCategory, filter) => {
        setSelectedPatternCategory(patternCategory);
        setPatternFilter(filter);
        onPatternCategorySelection?.();
      },
      [setSelectedPatternCategory, onPatternCategorySelection]
    );
    const showPatternPanel = selectedTab === "patterns" && !delayedFilterValue && !!selectedPatternCategory;
    const showMediaPanel = selectedTab === "media" && !!selectedMediaCategory;
    const inserterSearch = (0, import_element75.useMemo)(() => {
      if (selectedTab === "media") {
        return null;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime192.jsxs)(import_jsx_runtime192.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
          import_components60.SearchControl,
          {
            className: "block-editor-inserter__search",
            onChange: (value) => {
              if (hoveredItem) {
                setHoveredItem(null);
              }
              setFilterValue(value);
            },
            value: filterValue,
            label: (0, import_i18n59.__)("Search"),
            placeholder: (0, import_i18n59.__)("Search")
          }
        ),
        !!delayedFilterValue && /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
          search_results_default,
          {
            filterValue: delayedFilterValue,
            onSelect,
            onHover,
            rootClientId,
            clientId,
            isAppender,
            __experimentalInsertionIndex,
            showBlockDirectory: true,
            shouldFocusBlock,
            prioritizePatterns: selectedTab === "patterns"
          }
        )
      ] });
    }, [
      selectedTab,
      hoveredItem,
      setHoveredItem,
      setFilterValue,
      filterValue,
      delayedFilterValue,
      onSelect,
      onHover,
      shouldFocusBlock,
      clientId,
      rootClientId,
      __experimentalInsertionIndex,
      isAppender
    ]);
    const blocksTab = (0, import_element75.useMemo)(() => {
      return /* @__PURE__ */ (0, import_jsx_runtime192.jsxs)(import_jsx_runtime192.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime192.jsx)("div", { className: "block-editor-inserter__block-list", children: /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
          block_types_tab_default,
          {
            ref: blockTypesTabRef,
            rootClientId: destinationRootClientId,
            onInsert,
            onHover,
            showMostUsedBlocks
          }
        ) }),
        showInserterHelpPanel && /* @__PURE__ */ (0, import_jsx_runtime192.jsxs)("div", { className: "block-editor-inserter__tips", children: [
          /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(import_components60.VisuallyHidden, { as: "h2", children: (0, import_i18n59.__)("A tip for using the block editor") }),
          /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(tips_default, {})
        ] })
      ] });
    }, [
      destinationRootClientId,
      onInsert,
      onHover,
      showMostUsedBlocks,
      showInserterHelpPanel
    ]);
    const patternsTab = (0, import_element75.useMemo)(() => {
      return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
        block_patterns_tab_default,
        {
          rootClientId: destinationRootClientId,
          onInsert: onInsertPattern,
          onSelectCategory: onClickPatternCategory,
          selectedCategory: selectedPatternCategory,
          children: showPatternPanel && /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
            PatternCategoryPreviews,
            {
              rootClientId: destinationRootClientId,
              onInsert: onInsertPattern,
              category: selectedPatternCategory,
              patternFilter,
              showTitlesAsTooltip: true
            }
          )
        }
      );
    }, [
      destinationRootClientId,
      onInsertPattern,
      onClickPatternCategory,
      patternFilter,
      selectedPatternCategory,
      showPatternPanel
    ]);
    const mediaTab = (0, import_element75.useMemo)(() => {
      return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
        media_tab_default,
        {
          rootClientId: destinationRootClientId,
          selectedCategory: selectedMediaCategory,
          onSelectCategory: setSelectedMediaCategory,
          onInsert,
          children: showMediaPanel && /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
            MediaCategoryPanel,
            {
              rootClientId: destinationRootClientId,
              onInsert,
              category: selectedMediaCategory
            }
          )
        }
      );
    }, [
      destinationRootClientId,
      onInsert,
      selectedMediaCategory,
      setSelectedMediaCategory,
      showMediaPanel
    ]);
    const handleSetSelectedTab = (value) => {
      if (value !== "patterns") {
        setSelectedPatternCategory(null);
      }
      setSelectedTab(value);
    };
    const tabsRef = (0, import_element75.useRef)();
    (0, import_element75.useLayoutEffect)(() => {
      if (tabsRef.current) {
        window.requestAnimationFrame(() => {
          tabsRef.current.querySelector('[role="tab"][aria-selected="true"]')?.focus();
        });
      }
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime192.jsxs)(
      "div",
      {
        className: clsx_default("block-editor-inserter__menu", {
          "show-panel": showPatternPanel || showMediaPanel,
          "is-zoom-out": isZoomOutMode
        }),
        ref,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime192.jsx)("div", { className: "block-editor-inserter__main-area", children: /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
            tabbed_sidebar_default,
            {
              ref: tabsRef,
              onSelect: handleSetSelectedTab,
              onClose,
              selectedTab,
              closeButtonLabel: (0, import_i18n59.__)("Close Block Inserter"),
              tabs: [
                {
                  name: "blocks",
                  title: (0, import_i18n59.__)("Blocks"),
                  panel: /* @__PURE__ */ (0, import_jsx_runtime192.jsxs)(import_jsx_runtime192.Fragment, { children: [
                    inserterSearch,
                    selectedTab === "blocks" && !delayedFilterValue && blocksTab
                  ] })
                },
                {
                  name: "patterns",
                  title: (0, import_i18n59.__)("Patterns"),
                  panel: /* @__PURE__ */ (0, import_jsx_runtime192.jsxs)(import_jsx_runtime192.Fragment, { children: [
                    inserterSearch,
                    selectedTab === "patterns" && !delayedFilterValue && patternsTab
                  ] })
                },
                {
                  name: "media",
                  title: (0, import_i18n59.__)("Media"),
                  panel: /* @__PURE__ */ (0, import_jsx_runtime192.jsxs)(import_jsx_runtime192.Fragment, { children: [
                    inserterSearch,
                    mediaTab
                  ] })
                }
              ]
            }
          ) }),
          showInserterHelpPanel && hoveredItem && /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
            import_components60.Popover,
            {
              className: "block-editor-inserter__preview-container__popover",
              placement: "right-start",
              offset: 16,
              focusOnMount: false,
              animate: false,
              children: /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(preview_panel_default, { item: hoveredItem })
            }
          )
        ]
      }
    );
  }
  var PrivateInserterMenu = (0, import_element75.forwardRef)(InserterMenu);
  function PublicInserterMenu(props, ref) {
    return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
      PrivateInserterMenu,
      {
        ...props,
        onPatternCategorySelection: NOOP,
        ref
      }
    );
  }
  var menu_default = (0, import_element75.forwardRef)(PublicInserterMenu);

  // packages/block-editor/build-module/components/inserter/quick-inserter.mjs
  var import_element76 = __toESM(require_element(), 1);
  var import_i18n60 = __toESM(require_i18n(), 1);
  var import_components61 = __toESM(require_components(), 1);
  var import_data60 = __toESM(require_data(), 1);
  var import_jsx_runtime193 = __toESM(require_jsx_runtime(), 1);
  var SEARCH_THRESHOLD = 6;
  var SHOWN_BLOCK_TYPES2 = 6;
  var SHOWN_BLOCK_PATTERNS = 2;
  function QuickInserter({
    onSelect,
    rootClientId,
    clientId,
    isAppender,
    selectBlockOnInsert,
    hasSearch = true
  }) {
    const [filterValue, setFilterValue] = (0, import_element76.useState)("");
    const [destinationRootClientId, onInsertBlocks] = use_insertion_point_default({
      onSelect,
      rootClientId,
      clientId,
      isAppender,
      selectBlockOnInsert
    });
    const [blockTypes] = use_block_types_state_default(
      destinationRootClientId,
      onInsertBlocks,
      true
    );
    const { setInserterIsOpened, insertionIndex } = (0, import_data60.useSelect)(
      (select3) => {
        const { getSettings: getSettings7, getBlockIndex: getBlockIndex2, getBlockCount: getBlockCount2 } = select3(store);
        const settings2 = getSettings7();
        const index = getBlockIndex2(clientId);
        const blockCount = getBlockCount2();
        return {
          setInserterIsOpened: settings2.__experimentalSetIsInserterOpened,
          insertionIndex: index === -1 ? blockCount : index
        };
      },
      [clientId]
    );
    const showSearch = hasSearch && blockTypes.length > SEARCH_THRESHOLD;
    (0, import_element76.useEffect)(() => {
      if (setInserterIsOpened) {
        setInserterIsOpened(false);
      }
    }, [setInserterIsOpened]);
    const onBrowseAll = () => {
      setInserterIsOpened({
        filterValue,
        onSelect,
        rootClientId,
        insertionIndex
      });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(
      "div",
      {
        className: clsx_default("block-editor-inserter__quick-inserter", {
          "has-search": showSearch,
          "has-expand": setInserterIsOpened
        }),
        children: [
          showSearch && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
            import_components61.SearchControl,
            {
              className: "block-editor-inserter__search",
              value: filterValue,
              onChange: (value) => {
                setFilterValue(value);
              },
              label: (0, import_i18n60.__)("Search"),
              placeholder: (0, import_i18n60.__)("Search")
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime193.jsx)("div", { className: "block-editor-inserter__quick-inserter-results", children: /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
            search_results_default,
            {
              filterValue,
              onSelect,
              rootClientId,
              clientId,
              isAppender,
              maxBlockPatterns: !!filterValue ? SHOWN_BLOCK_PATTERNS : 0,
              maxBlockTypes: SHOWN_BLOCK_TYPES2,
              isDraggable: false,
              selectBlockOnInsert,
              isQuick: true
            }
          ) }),
          setInserterIsOpened && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
            import_components61.Button,
            {
              __next40pxDefaultSize: true,
              className: "block-editor-inserter__quick-inserter-expand",
              onClick: onBrowseAll,
              "aria-label": (0, import_i18n60.__)(
                "Browse all. This will open the main inserter panel in the editor toolbar."
              ),
              children: (0, import_i18n60.__)("Browse all")
            }
          )
        ]
      }
    );
  }

  // packages/block-editor/build-module/components/inserter/get-appender-label.mjs
  var MAX_APPENDER_LABEL_LENGTH = 50;
  function getAppenderLabel(defaultBlock, defaultBlockType) {
    if (!defaultBlock || !defaultBlock.attributes || !defaultBlockType?.__experimentalLabel) {
      return null;
    }
    const result = defaultBlockType.__experimentalLabel(
      defaultBlock.attributes,
      { context: "appender" }
    );
    if (typeof result === "string" && result.length < MAX_APPENDER_LABEL_LENGTH && result.length > 0) {
      return result;
    }
    return null;
  }

  // packages/block-editor/build-module/components/inserter/index.mjs
  var import_jsx_runtime194 = __toESM(require_jsx_runtime(), 1);
  var defaultRenderToggle = ({
    onToggle,
    disabled,
    isOpen,
    blockTitle,
    hasSingleBlockType,
    appenderLabel,
    toggleProps = {}
  }) => {
    const {
      as: Wrapper = import_components62.Button,
      label: labelProp,
      onClick,
      ...rest
    } = toggleProps;
    let label = labelProp;
    if (!label && appenderLabel) {
      label = appenderLabel;
    } else if (!label && hasSingleBlockType) {
      label = (0, import_i18n61.sprintf)(
        // translators: %s: the name of the block when there is only one
        (0, import_i18n61._x)("Add %s", "directly add the only allowed block"),
        blockTitle.toLowerCase()
      );
    } else if (!label) {
      label = (0, import_i18n61._x)("Add block", "Generic label for block inserter button");
    }
    function handleClick(event) {
      if (onToggle) {
        onToggle(event);
      }
      if (onClick) {
        onClick(event);
      }
    }
    return /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
      Wrapper,
      {
        __next40pxDefaultSize: toggleProps.as ? void 0 : true,
        icon: plus_default,
        label,
        tooltipPosition: "bottom",
        onClick: handleClick,
        className: "block-editor-inserter__toggle",
        "aria-haspopup": !hasSingleBlockType ? "true" : false,
        "aria-expanded": !hasSingleBlockType ? isOpen : false,
        disabled,
        ...rest
      }
    );
  };
  var Inserter = class extends import_element77.Component {
    constructor() {
      super(...arguments);
      this.onToggle = this.onToggle.bind(this);
      this.renderToggle = this.renderToggle.bind(this);
      this.renderContent = this.renderContent.bind(this);
    }
    onToggle(isOpen) {
      const { onToggle } = this.props;
      if (onToggle) {
        onToggle(isOpen);
      }
    }
    /**
     * Render callback to display Dropdown toggle element.
     *
     * @param {Object}   options
     * @param {Function} options.onToggle Callback to invoke when toggle is
     *                                    pressed.
     * @param {boolean}  options.isOpen   Whether dropdown is currently open.
     *
     * @return {Element} Dropdown toggle element.
     */
    renderToggle({ onToggle, isOpen }) {
      const {
        disabled,
        blockTitle,
        hasSingleBlockType,
        appenderLabel,
        toggleProps,
        hasItems,
        renderToggle: renderToggle3 = defaultRenderToggle
      } = this.props;
      return renderToggle3({
        onToggle,
        isOpen,
        disabled: disabled || !hasItems,
        blockTitle,
        hasSingleBlockType,
        appenderLabel,
        toggleProps
      });
    }
    /**
     * Render callback to display Dropdown content element.
     *
     * @param {Object}   options
     * @param {Function} options.onClose Callback to invoke when dropdown is
     *                                   closed.
     *
     * @return {Element} Dropdown content element.
     */
    renderContent({ onClose }) {
      const {
        rootClientId,
        clientId,
        isAppender,
        showInserterHelpPanel,
        // This prop is experimental to give some time for the quick inserter to mature
        // Feel free to make them stable after a few releases.
        __experimentalIsQuick: isQuick,
        onSelectOrClose,
        selectBlockOnInsert
      } = this.props;
      if (isQuick) {
        return /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
          QuickInserter,
          {
            onSelect: (blocks2) => {
              const firstBlock = Array.isArray(blocks2) && blocks2?.length ? blocks2[0] : blocks2;
              if (onSelectOrClose && typeof onSelectOrClose === "function") {
                onSelectOrClose(firstBlock);
              }
              onClose();
            },
            rootClientId,
            clientId,
            isAppender,
            selectBlockOnInsert
          }
        );
      }
      return /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
        menu_default,
        {
          onSelect: () => {
            onClose();
          },
          onClose,
          rootClientId,
          clientId,
          isAppender,
          showInserterHelpPanel
        }
      );
    }
    render() {
      const {
        position,
        hasSingleBlockType,
        directInsertBlock,
        insertOnlyAllowedBlock,
        __experimentalIsQuick: isQuick,
        onSelectOrClose
      } = this.props;
      if (hasSingleBlockType || directInsertBlock) {
        return this.renderToggle({ onToggle: insertOnlyAllowedBlock });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
        import_components62.Dropdown,
        {
          className: "block-editor-inserter",
          contentClassName: clsx_default("block-editor-inserter__popover", {
            "is-quick": isQuick
          }),
          popoverProps: { position, shift: true },
          onToggle: this.onToggle,
          expandOnMobile: true,
          headerTitle: (0, import_i18n61.__)("Add a block"),
          renderToggle: this.renderToggle,
          renderContent: this.renderContent,
          onClose: onSelectOrClose
        }
      );
    }
  };
  var inserter_default = (0, import_compose45.compose)([
    (0, import_data61.withSelect)(
      (select3, { clientId, rootClientId, shouldDirectInsert = true }) => {
        const {
          getBlockRootClientId: getBlockRootClientId2,
          hasInserterItems: hasInserterItems2,
          getAllowedBlocks: getAllowedBlocks2,
          getDirectInsertBlock: getDirectInsertBlock2
        } = select3(store);
        const { getBlockVariations: getBlockVariations2, getBlockType: getBlockType27 } = select3(import_blocks38.store);
        rootClientId = rootClientId || getBlockRootClientId2(clientId) || void 0;
        const allowedBlocks = getAllowedBlocks2(rootClientId);
        const directInsertBlock = shouldDirectInsert && getDirectInsertBlock2(rootClientId);
        const hasSingleBlockType = allowedBlocks?.length === 1 && getBlockVariations2(allowedBlocks[0].name, "inserter")?.length === 0;
        let allowedBlockType = false;
        if (hasSingleBlockType) {
          allowedBlockType = allowedBlocks[0];
        }
        const defaultBlockType = directInsertBlock ? getBlockType27(directInsertBlock.name) : null;
        const appenderLabel = getAppenderLabel(
          directInsertBlock,
          defaultBlockType
        );
        return {
          hasItems: hasInserterItems2(rootClientId),
          hasSingleBlockType,
          blockTitle: allowedBlockType ? allowedBlockType.title : "",
          allowedBlockType,
          directInsertBlock,
          appenderLabel,
          rootClientId
        };
      }
    ),
    (0, import_data61.withDispatch)((dispatch, ownProps, { select: select3 }) => {
      return {
        insertOnlyAllowedBlock() {
          const {
            rootClientId,
            clientId,
            isAppender,
            hasSingleBlockType,
            allowedBlockType,
            directInsertBlock,
            onSelectOrClose,
            selectBlockOnInsert
          } = ownProps;
          if (!hasSingleBlockType && !directInsertBlock) {
            return;
          }
          function getAdjacentBlockAttributes(attributesToCopy) {
            const { getBlock: getBlock2, getPreviousBlockClientId: getPreviousBlockClientId2 } = select3(store);
            if (!attributesToCopy || !clientId && !rootClientId) {
              return {};
            }
            const result = {};
            let adjacentAttributes = {};
            if (!clientId) {
              const parentBlock = getBlock2(rootClientId);
              if (parentBlock?.innerBlocks?.length) {
                const lastInnerBlock = parentBlock.innerBlocks[parentBlock.innerBlocks.length - 1];
                if (directInsertBlock && directInsertBlock?.name === lastInnerBlock.name) {
                  adjacentAttributes = lastInnerBlock.attributes;
                }
              }
            } else {
              const currentBlock = getBlock2(clientId);
              const previousBlock = getBlock2(
                getPreviousBlockClientId2(clientId)
              );
              if (currentBlock?.name === previousBlock?.name) {
                adjacentAttributes = previousBlock?.attributes || {};
              }
            }
            attributesToCopy.forEach((attribute) => {
              if (adjacentAttributes.hasOwnProperty(attribute)) {
                result[attribute] = adjacentAttributes[attribute];
              }
            });
            return result;
          }
          function getInsertionIndex() {
            const {
              getBlockIndex: getBlockIndex2,
              getBlockSelectionEnd: getBlockSelectionEnd2,
              getBlockOrder: getBlockOrder2,
              getBlockRootClientId: getBlockRootClientId2
            } = select3(store);
            if (clientId) {
              return getBlockIndex2(clientId);
            }
            const end = getBlockSelectionEnd2();
            if (!isAppender && end && getBlockRootClientId2(end) === rootClientId) {
              return getBlockIndex2(end) + 1;
            }
            return getBlockOrder2(rootClientId).length;
          }
          const { insertBlock: insertBlock2 } = dispatch(store);
          let blockToInsert;
          if (directInsertBlock) {
            const newAttributes = getAdjacentBlockAttributes(
              directInsertBlock.attributesToCopy
            );
            blockToInsert = (0, import_blocks38.createBlock)(directInsertBlock.name, {
              ...directInsertBlock.attributes || {},
              ...newAttributes
            });
          } else {
            blockToInsert = (0, import_blocks38.createBlock)(allowedBlockType.name);
          }
          insertBlock2(
            blockToInsert,
            getInsertionIndex(),
            rootClientId,
            selectBlockOnInsert
          );
          if (onSelectOrClose) {
            onSelectOrClose(blockToInsert);
          }
          const message2 = (0, import_i18n61.sprintf)(
            // translators: %s: the name of the block that has been added
            (0, import_i18n61.__)("%s block added"),
            allowedBlockType.title
          );
          (0, import_a11y10.speak)(message2);
        }
      };
    }),
    // The global inserter should always be visible, we are using ( ! isAppender && ! rootClientId && ! clientId ) as
    // a way to detect the global Inserter.
    (0, import_compose45.ifCondition)(
      ({ hasItems, isAppender, rootClientId, clientId }) => hasItems || !isAppender && !rootClientId && !clientId
    )
  ])(Inserter);

  // packages/block-editor/build-module/components/default-block-appender/index.mjs
  var import_jsx_runtime195 = __toESM(require_jsx_runtime(), 1);
  var ZWNBSP = "\uFEFF";
  function DefaultBlockAppender({ rootClientId }) {
    const { showPrompt, isLocked, placeholder, isManualGrid } = (0, import_data62.useSelect)(
      (select3) => {
        const {
          getBlockCount: getBlockCount2,
          getSettings: getSettings7,
          getTemplateLock: getTemplateLock2,
          getBlockAttributes: getBlockAttributes3
        } = select3(store);
        const isEmpty4 = !getBlockCount2(rootClientId);
        const { bodyPlaceholder } = getSettings7();
        return {
          showPrompt: isEmpty4,
          isLocked: !!getTemplateLock2(rootClientId),
          placeholder: bodyPlaceholder,
          isManualGrid: getBlockAttributes3(rootClientId)?.layout?.isManualPlacement
        };
      },
      [rootClientId]
    );
    const { insertDefaultBlock: insertDefaultBlock2, startTyping: startTyping2 } = (0, import_data62.useDispatch)(store);
    if (isLocked || isManualGrid) {
      return null;
    }
    const value = (0, import_html_entities2.decodeEntities)(placeholder) || (0, import_i18n62.__)("Type / to choose a block");
    const onAppend = () => {
      insertDefaultBlock2(void 0, rootClientId);
      startTyping2();
    };
    return /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)(
      "div",
      {
        "data-root-client-id": rootClientId || "",
        className: clsx_default("block-editor-default-block-appender", {
          "has-visible-prompt": showPrompt
        }),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
            "p",
            {
              tabIndex: "0",
              role: "button",
              "aria-label": (0, import_i18n62.__)("Add default block"),
              className: "block-editor-default-block-appender__content",
              onKeyDown: (event) => {
                if (import_keycodes8.ENTER === event.keyCode || import_keycodes8.SPACE === event.keyCode) {
                  onAppend();
                }
              },
              onClick: () => onAppend(),
              onFocus: () => {
                if (showPrompt) {
                  onAppend();
                }
              },
              children: showPrompt ? value : ZWNBSP
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
            inserter_default,
            {
              rootClientId,
              position: "bottom right",
              isAppender: true,
              __experimentalIsQuick: true
            }
          )
        ]
      }
    );
  }

  // packages/block-editor/build-module/components/button-block-appender/index.mjs
  var import_components63 = __toESM(require_components(), 1);
  var import_element78 = __toESM(require_element(), 1);
  var import_i18n63 = __toESM(require_i18n(), 1);
  var import_deprecated8 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime196 = __toESM(require_jsx_runtime(), 1);
  function ButtonBlockAppender({ rootClientId, className, onFocus, tabIndex, onSelect }, ref) {
    return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
      inserter_default,
      {
        position: "bottom center",
        rootClientId,
        __experimentalIsQuick: true,
        onSelectOrClose: (...args) => {
          if (onSelect && typeof onSelect === "function") {
            onSelect(...args);
          }
        },
        renderToggle: ({
          onToggle,
          disabled,
          isOpen,
          blockTitle,
          hasSingleBlockType,
          appenderLabel
        }) => {
          const isToggleButton = !hasSingleBlockType;
          let label;
          if (appenderLabel) {
            label = appenderLabel;
          } else if (hasSingleBlockType) {
            label = (0, import_i18n63.sprintf)(
              // translators: %s: the name of the block when there is only one
              (0, import_i18n63._x)("Add %s", "directly add the only allowed block"),
              blockTitle.toLowerCase()
            );
          } else {
            label = (0, import_i18n63._x)(
              "Add block",
              "Generic label for block inserter button"
            );
          }
          return (
            // Disable reason: There shouldn't be a case where this button is disabled but not visually hidden.
            // eslint-disable-next-line @wordpress/components-no-unsafe-button-disabled
            /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
              import_components63.Button,
              {
                __next40pxDefaultSize: true,
                ref,
                onFocus,
                tabIndex,
                className: clsx_default(
                  className,
                  "block-editor-button-block-appender"
                ),
                onClick: onToggle,
                "aria-haspopup": isToggleButton ? "true" : void 0,
                "aria-expanded": isToggleButton ? isOpen : void 0,
                disabled,
                label,
                showTooltip: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(icon_default, { icon: plus_default })
              }
            )
          );
        },
        isAppender: true
      }
    );
  }
  var ButtonBlockerAppender = (0, import_element78.forwardRef)((props, ref) => {
    (0, import_deprecated8.default)(`wp.blockEditor.ButtonBlockerAppender`, {
      alternative: "wp.blockEditor.ButtonBlockAppender",
      since: "5.9"
    });
    return ButtonBlockAppender(props, ref);
  });
  var button_block_appender_default = (0, import_element78.forwardRef)(ButtonBlockAppender);

  // packages/block-editor/build-module/components/block-list-appender/index.mjs
  var import_jsx_runtime197 = __toESM(require_jsx_runtime(), 1);
  function DefaultAppender({ rootClientId }) {
    const canInsertDefaultBlock = (0, import_data63.useSelect)(
      (select3) => select3(store).canInsertBlockType(
        (0, import_blocks39.getDefaultBlockName)(),
        rootClientId
      )
    );
    if (canInsertDefaultBlock) {
      return /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(DefaultBlockAppender, { rootClientId });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
      button_block_appender_default,
      {
        rootClientId,
        className: "block-list-appender__toggle"
      }
    );
  }
  function BlockListAppender({
    rootClientId,
    CustomAppender,
    className,
    tagName: TagName = "div"
  }) {
    const isDragOver = (0, import_data63.useSelect)(
      (select3) => {
        const {
          getBlockInsertionPoint: getBlockInsertionPoint2,
          isBlockInsertionPointVisible: isBlockInsertionPointVisible2,
          getBlockCount: getBlockCount2
        } = select3(store);
        const insertionPoint2 = getBlockInsertionPoint2();
        return isBlockInsertionPointVisible2() && rootClientId === insertionPoint2?.rootClientId && getBlockCount2(rootClientId) === 0;
      },
      [rootClientId]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
      TagName,
      {
        tabIndex: -1,
        className: clsx_default("block-list-appender wp-block", className, {
          "is-drag-over": isDragOver
        }),
        contentEditable: false,
        "data-block": true,
        children: CustomAppender ? /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(CustomAppender, {}) : /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(DefaultAppender, { rootClientId })
      }
    );
  }

  // packages/block-editor/build-module/components/block-list/use-in-between-inserter.mjs
  var import_compose50 = __toESM(require_compose(), 1);
  var import_data67 = __toESM(require_data(), 1);
  var import_element83 = __toESM(require_element(), 1);
  var import_i18n65 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/components/block-tools/insertion-point.mjs
  var import_data66 = __toESM(require_data(), 1);
  var import_element82 = __toESM(require_element(), 1);
  var import_components67 = __toESM(require_components(), 1);
  var import_compose49 = __toESM(require_compose(), 1);

  // packages/block-editor/build-module/components/block-popover/inbetween.mjs
  var import_data64 = __toESM(require_data(), 1);
  var import_element79 = __toESM(require_element(), 1);
  var import_components64 = __toESM(require_components(), 1);
  var import_i18n64 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/components/block-popover/use-popover-scroll.mjs
  var import_compose46 = __toESM(require_compose(), 1);
  var import_dom21 = __toESM(require_dom(), 1);
  var scrollContainerCache = /* @__PURE__ */ new WeakMap();
  function usePopoverScroll(contentRef) {
    const effect = (0, import_compose46.useRefEffect)(
      (node) => {
        function onWheel(event) {
          const { deltaX, deltaY, target } = event;
          const contentEl = contentRef.current;
          let scrollContainer = scrollContainerCache.get(contentEl);
          if (!scrollContainer) {
            scrollContainer = (0, import_dom21.getScrollContainer)(contentEl);
            scrollContainerCache.set(contentEl, scrollContainer);
          }
          const eventScrollContainer = (0, import_dom21.getScrollContainer)(target);
          if (!node.contains(eventScrollContainer)) {
            scrollContainer.scrollBy(deltaX, deltaY);
          }
        }
        const options = { passive: true };
        node.addEventListener("wheel", onWheel, options);
        return () => {
          node.removeEventListener("wheel", onWheel, options);
        };
      },
      [contentRef]
    );
    return contentRef ? effect : null;
  }
  var use_popover_scroll_default = usePopoverScroll;

  // packages/block-editor/build-module/components/block-popover/inbetween.mjs
  var import_jsx_runtime198 = __toESM(require_jsx_runtime(), 1);
  var MAX_POPOVER_RECOMPUTE_COUNTER = Number.MAX_SAFE_INTEGER;
  function BlockPopoverInbetween({
    previousClientId,
    nextClientId,
    children,
    __unstablePopoverSlot,
    __unstableContentRef,
    operation = "insert",
    nearestSide = "right",
    ...props
  }) {
    const [popoverRecomputeCounter, forcePopoverRecompute] = (0, import_element79.useReducer)(
      // Module is there to make sure that the counter doesn't overflow.
      (s2) => (s2 + 1) % MAX_POPOVER_RECOMPUTE_COUNTER,
      0
    );
    const { orientation, rootClientId, isVisible } = (0, import_data64.useSelect)(
      (select3) => {
        const {
          getBlockListSettings: getBlockListSettings2,
          getBlockRootClientId: getBlockRootClientId2,
          isBlockVisible: isBlockVisible2
        } = select3(store);
        const _rootClientId = getBlockRootClientId2(
          previousClientId ?? nextClientId
        );
        return {
          orientation: getBlockListSettings2(_rootClientId)?.orientation || "vertical",
          rootClientId: _rootClientId,
          isVisible: isBlockVisible2(previousClientId) && isBlockVisible2(nextClientId)
        };
      },
      [previousClientId, nextClientId]
    );
    const previousElement = useBlockElement(previousClientId);
    const nextElement = useBlockElement(nextClientId);
    const isVertical = orientation === "vertical";
    const popoverAnchor = (0, import_element79.useMemo)(() => {
      if (
        // popoverRecomputeCounter is by definition always equal or greater than 0.
        // This check is only there to satisfy the correctness of the
        // exhaustive-deps rule for the `useMemo` hook.
        popoverRecomputeCounter < 0 || !previousElement && !nextElement || !isVisible
      ) {
        return void 0;
      }
      const contextElement = operation === "group" ? nextElement || previousElement : previousElement || nextElement;
      return {
        contextElement,
        getBoundingClientRect() {
          const previousRect = previousElement ? previousElement.getBoundingClientRect() : null;
          const nextRect = nextElement ? nextElement.getBoundingClientRect() : null;
          let left = 0;
          let top = 0;
          let width = 0;
          let height = 0;
          if (operation === "group") {
            const targetRect = nextRect || previousRect;
            top = targetRect.top;
            width = 0;
            height = targetRect.bottom - targetRect.top;
            left = nearestSide === "left" ? targetRect.left - 2 : targetRect.right - 2;
          } else if (isVertical) {
            top = previousRect ? previousRect.bottom : nextRect.top;
            width = previousRect ? previousRect.width : nextRect.width;
            height = nextRect && previousRect ? nextRect.top - previousRect.bottom : 0;
            left = previousRect ? previousRect.left : nextRect.left;
          } else {
            top = previousRect ? previousRect.top : nextRect.top;
            height = previousRect ? previousRect.height : nextRect.height;
            if ((0, import_i18n64.isRTL)()) {
              left = nextRect ? nextRect.right : previousRect.left;
              width = previousRect && nextRect ? previousRect.left - nextRect.right : 0;
            } else {
              left = previousRect ? previousRect.right : nextRect.left;
              width = previousRect && nextRect ? nextRect.left - previousRect.right : 0;
            }
            width = Math.max(width, 0);
          }
          return new window.DOMRect(left, top, width, height);
        }
      };
    }, [
      previousElement,
      nextElement,
      popoverRecomputeCounter,
      isVertical,
      isVisible,
      operation,
      nearestSide
    ]);
    const popoverScrollRef = use_popover_scroll_default(__unstableContentRef);
    (0, import_element79.useLayoutEffect)(() => {
      if (!previousElement) {
        return;
      }
      const observer = new window.MutationObserver(forcePopoverRecompute);
      observer.observe(previousElement, { attributes: true });
      return () => {
        observer.disconnect();
      };
    }, [previousElement]);
    (0, import_element79.useLayoutEffect)(() => {
      if (!nextElement) {
        return;
      }
      const observer = new window.MutationObserver(forcePopoverRecompute);
      observer.observe(nextElement, { attributes: true });
      return () => {
        observer.disconnect();
      };
    }, [nextElement]);
    (0, import_element79.useLayoutEffect)(() => {
      if (!previousElement) {
        return;
      }
      previousElement.ownerDocument.defaultView.addEventListener(
        "resize",
        forcePopoverRecompute
      );
      return () => {
        previousElement.ownerDocument.defaultView?.removeEventListener(
          "resize",
          forcePopoverRecompute
        );
      };
    }, [previousElement]);
    if (!previousElement && !nextElement || !isVisible) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
      import_components64.Popover,
      {
        ref: popoverScrollRef,
        animate: false,
        anchor: popoverAnchor,
        focusOnMount: false,
        __unstableSlotName: __unstablePopoverSlot,
        inline: !__unstablePopoverSlot,
        ...props,
        className: clsx_default(
          "block-editor-block-popover",
          "block-editor-block-popover__inbetween",
          props.className
        ),
        resize: false,
        flip: false,
        placement: "overlay",
        variant: "unstyled",
        children: /* @__PURE__ */ (0, import_jsx_runtime198.jsx)("div", { className: "block-editor-block-popover__inbetween-container", children })
      },
      nextClientId + "--" + rootClientId
    );
  }
  var inbetween_default = BlockPopoverInbetween;

  // packages/block-editor/build-module/components/block-popover/drop-zone.mjs
  var import_data65 = __toESM(require_data(), 1);
  var import_compose48 = __toESM(require_compose(), 1);
  var import_components66 = __toESM(require_components(), 1);

  // packages/block-editor/build-module/components/block-popover/cover.mjs
  var import_element81 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/block-popover/index.mjs
  var import_compose47 = __toESM(require_compose(), 1);
  var import_components65 = __toESM(require_components(), 1);
  var import_element80 = __toESM(require_element(), 1);
  var import_jsx_runtime199 = __toESM(require_jsx_runtime(), 1);
  var MAX_POPOVER_RECOMPUTE_COUNTER2 = Number.MAX_SAFE_INTEGER;
  function BlockPopover({
    clientId,
    bottomClientId,
    children,
    __unstablePopoverSlot,
    __unstableContentRef,
    shift = true,
    ...props
  }, ref) {
    const selectedElement = useBlockElement(clientId);
    const lastSelectedElement = useBlockElement(bottomClientId ?? clientId);
    const mergedRefs = (0, import_compose47.useMergeRefs)([
      ref,
      use_popover_scroll_default(__unstableContentRef)
    ]);
    const [
      popoverDimensionsRecomputeCounter,
      forceRecomputePopoverDimensions
    ] = (0, import_element80.useReducer)(
      // Module is there to make sure that the counter doesn't overflow.
      (s2) => (s2 + 1) % MAX_POPOVER_RECOMPUTE_COUNTER2,
      0
    );
    (0, import_element80.useLayoutEffect)(() => {
      if (!selectedElement) {
        return;
      }
      const observer = new window.MutationObserver(
        forceRecomputePopoverDimensions
      );
      observer.observe(selectedElement, { attributes: true });
      return () => {
        observer.disconnect();
      };
    }, [selectedElement]);
    const popoverAnchor = (0, import_element80.useMemo)(() => {
      if (
        // popoverDimensionsRecomputeCounter is by definition always equal or greater
        // than 0. This check is only there to satisfy the correctness of the
        // exhaustive-deps rule for the `useMemo` hook.
        popoverDimensionsRecomputeCounter < 0 || !selectedElement || bottomClientId && !lastSelectedElement
      ) {
        return void 0;
      }
      return {
        getBoundingClientRect() {
          return lastSelectedElement ? rectUnion(
            getElementBounds(selectedElement),
            getElementBounds(lastSelectedElement)
          ) : getElementBounds(selectedElement);
        },
        contextElement: selectedElement
      };
    }, [
      popoverDimensionsRecomputeCounter,
      selectedElement,
      bottomClientId,
      lastSelectedElement
    ]);
    if (!selectedElement || bottomClientId && !lastSelectedElement) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
      import_components65.Popover,
      {
        ref: mergedRefs,
        animate: false,
        focusOnMount: false,
        anchor: popoverAnchor,
        __unstableSlotName: __unstablePopoverSlot,
        inline: !__unstablePopoverSlot,
        placement: "top-start",
        resize: false,
        flip: false,
        shift,
        ...props,
        className: clsx_default("block-editor-block-popover", props.className),
        variant: "unstyled",
        children
      }
    );
  }
  var PrivateBlockPopover = (0, import_element80.forwardRef)(BlockPopover);
  var PublicBlockPopover = ({ clientId, bottomClientId, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
    PrivateBlockPopover,
    {
      ...props,
      bottomClientId,
      clientId,
      __unstableContentRef: void 0,
      __unstablePopoverSlot: void 0,
      ref,
      children
    }
  );
  var block_popover_default = (0, import_element80.forwardRef)(PublicBlockPopover);

  // packages/block-editor/build-module/components/block-popover/cover.mjs
  var import_jsx_runtime200 = __toESM(require_jsx_runtime(), 1);
  function BlockPopoverCover({
    clientId,
    bottomClientId,
    children,
    shift = false,
    additionalStyles,
    ...props
  }, ref) {
    bottomClientId ??= clientId;
    const selectedElement = useBlockElement(clientId);
    return /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
      PrivateBlockPopover,
      {
        ref,
        clientId,
        bottomClientId,
        shift,
        ...props,
        children: selectedElement && clientId === bottomClientId ? /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
          CoverContainer,
          {
            selectedElement,
            additionalStyles,
            children
          }
        ) : children
      }
    );
  }
  function CoverContainer({
    selectedElement,
    additionalStyles = {},
    children
  }) {
    const [width, setWidth] = (0, import_element81.useState)(selectedElement.offsetWidth);
    const [height, setHeight] = (0, import_element81.useState)(selectedElement.offsetHeight);
    (0, import_element81.useEffect)(() => {
      const observer = new window.ResizeObserver(() => {
        setWidth(selectedElement.offsetWidth);
        setHeight(selectedElement.offsetHeight);
      });
      observer.observe(selectedElement, { box: "border-box" });
      return () => observer.disconnect();
    }, [selectedElement]);
    const style = (0, import_element81.useMemo)(() => {
      return {
        position: "absolute",
        width,
        height,
        ...additionalStyles
      };
    }, [width, height, additionalStyles]);
    return /* @__PURE__ */ (0, import_jsx_runtime200.jsx)("div", { style, children });
  }
  var cover_default = (0, import_element81.forwardRef)(BlockPopoverCover);

  // packages/block-editor/build-module/components/block-popover/drop-zone.mjs
  var import_jsx_runtime201 = __toESM(require_jsx_runtime(), 1);
  var animateVariants = {
    hide: { opacity: 0, scaleY: 0.75 },
    show: { opacity: 1, scaleY: 1 },
    exit: { opacity: 0, scaleY: 0.9 }
  };
  function BlockDropZonePopover({
    __unstablePopoverSlot,
    __unstableContentRef
  }) {
    const { clientId } = (0, import_data65.useSelect)((select3) => {
      const { getBlockOrder: getBlockOrder2, getBlockInsertionPoint: getBlockInsertionPoint2 } = select3(store);
      const insertionPoint2 = getBlockInsertionPoint2();
      const order = getBlockOrder2(insertionPoint2.rootClientId);
      if (!order.length) {
        return {};
      }
      return {
        clientId: order[insertionPoint2.index]
      };
    }, []);
    const reducedMotion = (0, import_compose48.useReducedMotion)();
    return /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
      cover_default,
      {
        clientId,
        __unstablePopoverSlot,
        __unstableContentRef,
        className: "block-editor-block-popover__drop-zone",
        children: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
          import_components66.__unstableMotion.div,
          {
            "data-testid": "block-popover-drop-zone",
            initial: reducedMotion ? animateVariants.show : animateVariants.hide,
            animate: animateVariants.show,
            exit: reducedMotion ? animateVariants.show : animateVariants.exit,
            className: "block-editor-block-popover__drop-zone-foreground"
          }
        )
      }
    );
  }
  var drop_zone_default = BlockDropZonePopover;

  // packages/block-editor/build-module/components/block-tools/insertion-point.mjs
  var import_jsx_runtime202 = __toESM(require_jsx_runtime(), 1);
  var InsertionPointOpenRef = (0, import_element82.createContext)();
  InsertionPointOpenRef.displayName = "InsertionPointOpenRefContext";
  function InbetweenInsertionPointPopover({
    __unstablePopoverSlot,
    __unstableContentRef,
    operation = "insert",
    nearestSide = "right"
  }) {
    const { selectBlock: selectBlock2, hideInsertionPoint: hideInsertionPoint2 } = (0, import_data66.useDispatch)(store);
    const openRef = (0, import_element82.useContext)(InsertionPointOpenRef);
    const ref = (0, import_element82.useRef)();
    const {
      orientation,
      previousClientId,
      nextClientId,
      rootClientId,
      isInserterShown,
      isDistractionFree,
      isZoomOutMode
    } = (0, import_data66.useSelect)((select3) => {
      const {
        getBlockOrder: getBlockOrder2,
        getBlockListSettings: getBlockListSettings2,
        getBlockInsertionPoint: getBlockInsertionPoint2,
        isBlockBeingDragged: isBlockBeingDragged2,
        getPreviousBlockClientId: getPreviousBlockClientId2,
        getNextBlockClientId: getNextBlockClientId2,
        getSettings: getSettings7,
        isZoomOut: isZoomOut2
      } = unlock(select3(store));
      const insertionPoint2 = getBlockInsertionPoint2();
      const order = getBlockOrder2(insertionPoint2.rootClientId);
      if (!order.length) {
        return {};
      }
      let _previousClientId = order[insertionPoint2.index - 1];
      let _nextClientId = order[insertionPoint2.index];
      while (isBlockBeingDragged2(_previousClientId)) {
        _previousClientId = getPreviousBlockClientId2(_previousClientId);
      }
      while (isBlockBeingDragged2(_nextClientId)) {
        _nextClientId = getNextBlockClientId2(_nextClientId);
      }
      const settings2 = getSettings7();
      return {
        previousClientId: _previousClientId,
        nextClientId: _nextClientId,
        orientation: getBlockListSettings2(insertionPoint2.rootClientId)?.orientation || "vertical",
        rootClientId: insertionPoint2.rootClientId,
        isDistractionFree: settings2.isDistractionFree,
        isInserterShown: insertionPoint2?.__unstableWithInserter,
        isZoomOutMode: isZoomOut2()
      };
    }, []);
    const { getBlockEditingMode: getBlockEditingMode2 } = (0, import_data66.useSelect)(store);
    const disableMotion = (0, import_compose49.useReducedMotion)();
    function onClick(event) {
      if (event.target === ref.current && nextClientId && getBlockEditingMode2(nextClientId) !== "disabled") {
        selectBlock2(nextClientId, -1);
      }
    }
    function maybeHideInserterPoint(event) {
      if (event.target === ref.current && !openRef.current) {
        hideInsertionPoint2();
      }
    }
    function onFocus(event) {
      if (event.target !== ref.current) {
        openRef.current = true;
      }
    }
    const maybeResetOpenRef = (0, import_element82.useCallback)(
      (node) => {
        if (!node && openRef.current) {
          openRef.current = false;
        }
      },
      [openRef]
    );
    const lineVariants = {
      // Initial position starts from the center and invisible.
      start: {
        opacity: 0,
        scale: 0
      },
      // The line expands to fill the container. If the inserter is visible it
      // is delayed so it appears orchestrated.
      rest: {
        opacity: 1,
        scale: 1,
        transition: { delay: isInserterShown ? 0.5 : 0, type: "tween" }
      },
      hover: {
        opacity: 1,
        scale: 1,
        transition: { delay: 0.5, type: "tween" }
      }
    };
    const inserterVariants = {
      start: {
        scale: disableMotion ? 1 : 0
      },
      rest: {
        scale: 1,
        transition: { delay: 0.4, type: "tween" }
      }
    };
    if (isDistractionFree) {
      return null;
    }
    if (isZoomOutMode && operation !== "insert") {
      return null;
    }
    const orientationClassname = orientation === "horizontal" || operation === "group" ? "is-horizontal" : "is-vertical";
    const className = clsx_default(
      "block-editor-block-list__insertion-point",
      orientationClassname
    );
    return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
      inbetween_default,
      {
        previousClientId,
        nextClientId,
        __unstablePopoverSlot,
        __unstableContentRef,
        operation,
        nearestSide,
        children: /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)(
          import_components67.__unstableMotion.div,
          {
            layout: !disableMotion,
            initial: disableMotion ? "rest" : "start",
            animate: "rest",
            whileHover: "hover",
            whileTap: "pressed",
            exit: "start",
            ref,
            tabIndex: -1,
            onClick,
            onFocus,
            className: clsx_default(className, {
              "is-with-inserter": isInserterShown
            }),
            onHoverEnd: maybeHideInserterPoint,
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
                import_components67.__unstableMotion.div,
                {
                  variants: lineVariants,
                  className: "block-editor-block-list__insertion-point-indicator",
                  "data-testid": "block-list-insertion-point-indicator"
                }
              ),
              isInserterShown && /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
                import_components67.__unstableMotion.div,
                {
                  variants: inserterVariants,
                  className: clsx_default(
                    "block-editor-block-list__insertion-point-inserter"
                  ),
                  children: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
                    inserter_default,
                    {
                      ref: maybeResetOpenRef,
                      position: "bottom center",
                      clientId: nextClientId,
                      rootClientId,
                      __experimentalIsQuick: true,
                      onToggle: (isOpen) => {
                        openRef.current = isOpen;
                      },
                      onSelectOrClose: () => {
                        openRef.current = false;
                      }
                    }
                  )
                }
              )
            ]
          }
        )
      }
    );
  }
  function InsertionPoint(props) {
    const { insertionPoint: insertionPoint2, isVisible, isBlockListEmpty } = (0, import_data66.useSelect)(
      (select3) => {
        const {
          getBlockInsertionPoint: getBlockInsertionPoint2,
          isBlockInsertionPointVisible: isBlockInsertionPointVisible2,
          getBlockCount: getBlockCount2
        } = select3(store);
        const blockInsertionPoint = getBlockInsertionPoint2();
        return {
          insertionPoint: blockInsertionPoint,
          isVisible: isBlockInsertionPointVisible2(),
          isBlockListEmpty: getBlockCount2(blockInsertionPoint?.rootClientId) === 0
        };
      },
      []
    );
    if (!isVisible || // Don't render the insertion point if the block list is empty.
    // The insertion point will be represented by the appender instead.
    isBlockListEmpty) {
      return null;
    }
    return insertionPoint2.operation === "replace" ? /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
      drop_zone_default,
      {
        ...props
      },
      `${insertionPoint2.rootClientId}-${insertionPoint2.index}`
    ) : /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
      InbetweenInsertionPointPopover,
      {
        operation: insertionPoint2.operation,
        nearestSide: insertionPoint2.nearestSide,
        ...props
      }
    );
  }

  // packages/block-editor/build-module/components/block-list/use-in-between-inserter.mjs
  function useInBetweenInserter() {
    const openRef = (0, import_element83.useContext)(InsertionPointOpenRef);
    const isInBetweenInserterDisabled = (0, import_data67.useSelect)((select3) => {
      const settings2 = select3(store).getSettings();
      return settings2.isDistractionFree || settings2.isPreviewMode || unlock(select3(store)).isZoomOut();
    }, []);
    const {
      getBlockListSettings: getBlockListSettings2,
      getBlockIndex: getBlockIndex2,
      isMultiSelecting: isMultiSelecting3,
      getSelectedBlockClientIds: getSelectedBlockClientIds2,
      getSettings: getSettings7,
      getTemplateLock: getTemplateLock2,
      __unstableIsWithinBlockOverlay: __unstableIsWithinBlockOverlay2,
      getBlockEditingMode: getBlockEditingMode2,
      getBlockName: getBlockName2,
      getBlockAttributes: getBlockAttributes3,
      getParentSectionBlock: getParentSectionBlock2
    } = unlock((0, import_data67.useSelect)(store));
    const { showInsertionPoint: showInsertionPoint2, hideInsertionPoint: hideInsertionPoint2 } = (0, import_data67.useDispatch)(store);
    return (0, import_compose50.useRefEffect)(
      (node) => {
        if (isInBetweenInserterDisabled) {
          return;
        }
        function onMouseMove(event) {
          if (openRef === void 0 || openRef.current) {
            return;
          }
          if (event.target.nodeType === event.target.TEXT_NODE) {
            return;
          }
          if (isMultiSelecting3()) {
            return;
          }
          if (!event.target.classList.contains(
            "block-editor-block-list__layout"
          )) {
            hideInsertionPoint2();
            return;
          }
          let rootClientId;
          if (!event.target.classList.contains("is-root-container")) {
            const blockElement = !!event.target.getAttribute(
              "data-block"
            ) ? event.target : event.target.closest("[data-block]");
            rootClientId = blockElement.getAttribute("data-block");
          }
          if (getTemplateLock2(rootClientId) || getBlockEditingMode2(rootClientId) === "disabled" || getBlockName2(rootClientId) === "core/block" || rootClientId && getBlockAttributes3(rootClientId).layout?.isManualPlacement) {
            return;
          }
          const blockListSettings2 = getBlockListSettings2(rootClientId);
          const orientation = blockListSettings2?.orientation || "vertical";
          const captureToolbars = !!blockListSettings2?.__experimentalCaptureToolbars;
          const offsetTop = event.clientY;
          const offsetLeft = event.clientX;
          const children = Array.from(event.target.children);
          let element = children.find((blockEl) => {
            const blockElRect = blockEl.getBoundingClientRect();
            return blockEl.classList.contains("wp-block") && orientation === "vertical" && blockElRect.top > offsetTop || blockEl.classList.contains("wp-block") && orientation === "horizontal" && ((0, import_i18n65.isRTL)() ? blockElRect.right < offsetLeft : blockElRect.left > offsetLeft);
          });
          if (!element) {
            hideInsertionPoint2();
            return;
          }
          if (!element.id) {
            element = element.firstElementChild;
            if (!element) {
              hideInsertionPoint2();
              return;
            }
          }
          const clientId = element.id.slice("block-".length);
          if (!clientId || __unstableIsWithinBlockOverlay2(clientId) || !!getParentSectionBlock2(clientId)) {
            return;
          }
          if (getSelectedBlockClientIds2().includes(clientId) && orientation === "vertical" && !captureToolbars && !getSettings7().hasFixedToolbar) {
            return;
          }
          const elementRect = element.getBoundingClientRect();
          if (orientation === "horizontal" && (event.clientY > elementRect.bottom || event.clientY < elementRect.top) || orientation === "vertical" && (event.clientX > elementRect.right || event.clientX < elementRect.left)) {
            hideInsertionPoint2();
            return;
          }
          const index = getBlockIndex2(clientId);
          if (index === 0) {
            hideInsertionPoint2();
            return;
          }
          showInsertionPoint2(rootClientId, index, {
            __unstableWithInserter: true
          });
        }
        node.addEventListener("mousemove", onMouseMove);
        return () => {
          node.removeEventListener("mousemove", onMouseMove);
        };
      },
      [
        openRef,
        getBlockListSettings2,
        getBlockIndex2,
        isMultiSelecting3,
        showInsertionPoint2,
        hideInsertionPoint2,
        getSelectedBlockClientIds2,
        isInBetweenInserterDisabled
      ]
    );
  }

  // packages/block-editor/build-module/components/block-selection-clearer/index.mjs
  var import_data68 = __toESM(require_data(), 1);
  var import_compose51 = __toESM(require_compose(), 1);
  var import_jsx_runtime203 = __toESM(require_jsx_runtime(), 1);
  function useBlockSelectionClearer() {
    const { getSettings: getSettings7, hasSelectedBlock: hasSelectedBlock2, hasMultiSelection: hasMultiSelection2 } = (0, import_data68.useSelect)(store);
    const { clearSelectedBlock: clearSelectedBlock2 } = (0, import_data68.useDispatch)(store);
    const { clearBlockSelection: isEnabled } = getSettings7();
    return (0, import_compose51.useRefEffect)(
      (node) => {
        if (!isEnabled) {
          return;
        }
        function onMouseDown(event) {
          if (!hasSelectedBlock2() && !hasMultiSelection2()) {
            return;
          }
          if (event.target !== node) {
            return;
          }
          clearSelectedBlock2();
        }
        node.addEventListener("mousedown", onMouseDown);
        return () => {
          node.removeEventListener("mousedown", onMouseDown);
        };
      },
      [hasSelectedBlock2, hasMultiSelection2, clearSelectedBlock2, isEnabled]
    );
  }
  function BlockSelectionClearer(props) {
    return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)("div", { ref: useBlockSelectionClearer(), ...props });
  }

  // packages/block-editor/build-module/components/inner-blocks/index.mjs
  var import_compose53 = __toESM(require_compose(), 1);
  var import_element88 = __toESM(require_element(), 1);
  var import_data74 = __toESM(require_data(), 1);
  var import_blocks44 = __toESM(require_blocks(), 1);

  // packages/block-editor/build-module/components/inner-blocks/button-block-appender.mjs
  var import_jsx_runtime204 = __toESM(require_jsx_runtime(), 1);
  function ButtonBlockAppender2({
    showSeparator,
    isFloating,
    onAddBlock,
    isToggle
  }) {
    const { clientId } = useBlockEditContext();
    return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
      button_block_appender_default,
      {
        className: clsx_default({
          "block-list-appender__toggle": isToggle
        }),
        rootClientId: clientId,
        showSeparator,
        isFloating,
        onAddBlock
      }
    );
  }

  // packages/block-editor/build-module/components/inner-blocks/default-block-appender.mjs
  var import_jsx_runtime205 = __toESM(require_jsx_runtime(), 1);
  function DefaultBlockAppender2() {
    const { clientId } = useBlockEditContext();
    return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(DefaultBlockAppender, { rootClientId: clientId });
  }

  // packages/block-editor/build-module/components/inner-blocks/use-nested-settings-update.mjs
  var import_element84 = __toESM(require_element(), 1);
  var import_data69 = __toESM(require_data(), 1);
  var import_deprecated9 = __toESM(require_deprecated(), 1);
  var import_is_shallow_equal = __toESM(require_is_shallow_equal(), 1);
  var pendingSettingsUpdates = /* @__PURE__ */ new WeakMap();
  function createShallowMemo() {
    let value;
    return (newValue) => {
      if (value === void 0 || !(0, import_is_shallow_equal.isShallowEqual)(value, newValue)) {
        value = newValue;
      }
      return value;
    };
  }
  function useShallowMemo(value) {
    const [memo11] = (0, import_element84.useState)(createShallowMemo);
    return memo11(value);
  }
  function useNestedSettingsUpdate(clientId, parentLock, allowedBlocks, prioritizedInserterBlocks, defaultBlock, directInsert, __experimentalDefaultBlock, __experimentalDirectInsert, templateLock, captureToolbars, orientation, layout) {
    const registry = (0, import_data69.useRegistry)();
    const _allowedBlocks = useShallowMemo(allowedBlocks);
    const _prioritizedInserterBlocks = useShallowMemo(
      prioritizedInserterBlocks
    );
    const _templateLock = templateLock === void 0 || parentLock === "contentOnly" ? parentLock : templateLock;
    (0, import_element84.useLayoutEffect)(() => {
      const newSettings = {
        allowedBlocks: _allowedBlocks,
        prioritizedInserterBlocks: _prioritizedInserterBlocks,
        templateLock: _templateLock
      };
      if (captureToolbars !== void 0) {
        newSettings.__experimentalCaptureToolbars = captureToolbars;
      }
      if (orientation !== void 0) {
        newSettings.orientation = orientation;
      } else {
        const layoutType = getLayoutType(layout?.type);
        newSettings.orientation = layoutType.getOrientation(layout);
      }
      if (__experimentalDefaultBlock !== void 0) {
        (0, import_deprecated9.default)("__experimentalDefaultBlock", {
          alternative: "defaultBlock",
          since: "6.3",
          version: "6.4"
        });
        newSettings.defaultBlock = __experimentalDefaultBlock;
      }
      if (defaultBlock !== void 0) {
        newSettings.defaultBlock = defaultBlock;
      }
      if (__experimentalDirectInsert !== void 0) {
        (0, import_deprecated9.default)("__experimentalDirectInsert", {
          alternative: "directInsert",
          since: "6.3",
          version: "6.4"
        });
        newSettings.directInsert = __experimentalDirectInsert;
      }
      if (directInsert !== void 0) {
        newSettings.directInsert = directInsert;
      }
      if (newSettings.directInsert !== void 0 && typeof newSettings.directInsert !== "boolean") {
        (0, import_deprecated9.default)("Using `Function` as a `directInsert` argument", {
          alternative: "`boolean` values",
          since: "6.5"
        });
      }
      if (!pendingSettingsUpdates.get(registry)) {
        pendingSettingsUpdates.set(registry, {});
      }
      pendingSettingsUpdates.get(registry)[clientId] = newSettings;
      window.queueMicrotask(() => {
        const settings2 = pendingSettingsUpdates.get(registry);
        if (Object.keys(settings2).length) {
          const { updateBlockListSettings: updateBlockListSettings2 } = registry.dispatch(store);
          updateBlockListSettings2(settings2);
          pendingSettingsUpdates.set(registry, {});
        }
      });
    }, [
      clientId,
      _allowedBlocks,
      _prioritizedInserterBlocks,
      _templateLock,
      defaultBlock,
      directInsert,
      __experimentalDefaultBlock,
      __experimentalDirectInsert,
      captureToolbars,
      orientation,
      layout,
      registry
    ]);
  }

  // packages/block-editor/build-module/components/inner-blocks/use-inner-block-template-sync.mjs
  var import_es64 = __toESM(require_es6(), 1);
  var import_element85 = __toESM(require_element(), 1);
  var import_data70 = __toESM(require_data(), 1);
  var import_blocks40 = __toESM(require_blocks(), 1);
  function useInnerBlockTemplateSync(clientId, template2, templateLock, templateInsertUpdatesSelection) {
    const registry = (0, import_data70.useRegistry)();
    const existingTemplateRef = (0, import_element85.useRef)(null);
    (0, import_element85.useLayoutEffect)(() => {
      let isCancelled = false;
      const {
        getBlocks: getBlocks2,
        getSelectedBlocksInitialCaretPosition: getSelectedBlocksInitialCaretPosition2,
        isBlockSelected: isBlockSelected2
      } = registry.select(store);
      const { replaceInnerBlocks: replaceInnerBlocks2, __unstableMarkNextChangeAsNotPersistent: __unstableMarkNextChangeAsNotPersistent2 } = registry.dispatch(store);
      window.queueMicrotask(() => {
        if (isCancelled) {
          return;
        }
        const currentInnerBlocks = getBlocks2(clientId);
        const shouldApplyTemplate = currentInnerBlocks.length === 0 || templateLock === "all" || templateLock === "contentOnly";
        const hasTemplateChanged = !(0, import_es64.default)(
          template2,
          existingTemplateRef.current
        );
        if (!shouldApplyTemplate || !hasTemplateChanged) {
          return;
        }
        existingTemplateRef.current = template2;
        const nextBlocks = (0, import_blocks40.synchronizeBlocksWithTemplate)(
          currentInnerBlocks,
          template2
        );
        if (!(0, import_es64.default)(nextBlocks, currentInnerBlocks)) {
          __unstableMarkNextChangeAsNotPersistent2();
          replaceInnerBlocks2(
            clientId,
            nextBlocks,
            currentInnerBlocks.length === 0 && templateInsertUpdatesSelection && nextBlocks.length !== 0 && isBlockSelected2(clientId),
            // This ensures the "initialPosition" doesn't change when applying the template
            // If we're supposed to focus the block, we'll focus the first inner block
            // otherwise, we won't apply any auto-focus.
            // This ensures for instance that the focus stays in the inserter when inserting the "buttons" block.
            getSelectedBlocksInitialCaretPosition2()
          );
        }
      });
      return () => {
        isCancelled = true;
      };
    }, [
      template2,
      templateLock,
      clientId,
      registry,
      templateInsertUpdatesSelection
    ]);
  }

  // packages/block-editor/build-module/components/inner-blocks/use-block-context.mjs
  var import_blocks41 = __toESM(require_blocks(), 1);
  var import_data71 = __toESM(require_data(), 1);
  function useBlockContext(clientId) {
    return (0, import_data71.useSelect)(
      (select3) => {
        const block = select3(store).getBlock(clientId);
        if (!block) {
          return void 0;
        }
        const blockType = select3(import_blocks41.store).getBlockType(block.name);
        if (!blockType) {
          return void 0;
        }
        if (Object.keys(blockType.providesContext).length === 0) {
          return void 0;
        }
        return Object.fromEntries(
          Object.entries(blockType.providesContext).map(
            ([contextName, attributeName]) => [
              contextName,
              block.attributes[attributeName]
            ]
          )
        );
      },
      [clientId]
    );
  }

  // packages/block-editor/build-module/components/use-block-drop-zone/index.mjs
  var import_data73 = __toESM(require_data(), 1);
  var import_element87 = __toESM(require_element(), 1);
  var import_compose52 = __toESM(require_compose(), 1);
  var import_i18n66 = __toESM(require_i18n(), 1);
  var import_blocks43 = __toESM(require_blocks(), 1);

  // packages/block-editor/build-module/components/use-on-block-drop/index.mjs
  var import_element86 = __toESM(require_element(), 1);
  var import_blocks42 = __toESM(require_blocks(), 1);
  var import_data72 = __toESM(require_data(), 1);
  var import_dom23 = __toESM(require_dom(), 1);
  function parseDropEvent(event) {
    let result = {
      srcRootClientId: null,
      srcClientIds: null,
      srcIndex: null,
      type: null,
      blocks: null
    };
    if (!event.dataTransfer) {
      return result;
    }
    try {
      result = Object.assign(
        result,
        JSON.parse(event.dataTransfer.getData("wp-blocks"))
      );
    } catch (err) {
      return result;
    }
    return result;
  }
  function onBlockDrop(targetRootClientId, targetBlockIndex, getBlockIndex2, getClientIdsOfDescendants2, moveBlocks, insertOrReplaceBlocks, clearSelectedBlock2, operation, getBlock2) {
    return (event) => {
      const {
        srcRootClientId: sourceRootClientId,
        srcClientIds: sourceClientIds,
        type: dropType,
        blocks: blocks2
      } = parseDropEvent(event);
      if (dropType === "inserter") {
        clearSelectedBlock2();
        const blocksToInsert = blocks2.map(
          (block) => (0, import_blocks42.cloneBlock)(block)
        );
        insertOrReplaceBlocks(blocksToInsert, true, null);
      }
      if (dropType === "block") {
        const sourceBlockIndex = getBlockIndex2(sourceClientIds[0]);
        if (sourceRootClientId === targetRootClientId && sourceBlockIndex === targetBlockIndex) {
          return;
        }
        if (sourceClientIds.includes(targetRootClientId) || getClientIdsOfDescendants2(sourceClientIds).some(
          (id) => id === targetRootClientId
        )) {
          return;
        }
        if (operation === "group") {
          const blocksToInsert = sourceClientIds.map(
            (clientId) => getBlock2(clientId)
          );
          insertOrReplaceBlocks(
            blocksToInsert,
            true,
            null,
            sourceClientIds
          );
          return;
        }
        const isAtSameLevel = sourceRootClientId === targetRootClientId;
        const draggedBlockCount = sourceClientIds.length;
        const insertIndex = isAtSameLevel && sourceBlockIndex < targetBlockIndex ? targetBlockIndex - draggedBlockCount : targetBlockIndex;
        moveBlocks(sourceClientIds, sourceRootClientId, insertIndex);
      }
    };
  }
  function onFilesDrop(targetRootClientId, getSettings7, updateBlockAttributes2, canInsertBlockType2, insertOrReplaceBlocks) {
    return (files) => {
      if (!getSettings7().mediaUpload) {
        return;
      }
      const transformation = (0, import_blocks42.findTransform)(
        (0, import_blocks42.getBlockTransforms)("from"),
        (transform) => transform.type === "files" && canInsertBlockType2(transform.blockName, targetRootClientId) && transform.isMatch(files)
      );
      if (transformation) {
        const blocks2 = transformation.transform(
          files,
          updateBlockAttributes2
        );
        insertOrReplaceBlocks(blocks2);
      }
    };
  }
  function onHTMLDrop(insertOrReplaceBlocks) {
    return (HTML) => {
      const blocks2 = (0, import_blocks42.pasteHandler)({ HTML, mode: "BLOCKS" });
      if (blocks2.length) {
        insertOrReplaceBlocks(blocks2);
      }
    };
  }
  function useOnBlockDrop(targetRootClientId, targetBlockIndex, options = {}) {
    const { operation = "insert", nearestSide = "right" } = options;
    const {
      canInsertBlockType: canInsertBlockType2,
      getBlockIndex: getBlockIndex2,
      getClientIdsOfDescendants: getClientIdsOfDescendants2,
      getBlockOrder: getBlockOrder2,
      getBlocksByClientId: getBlocksByClientId2,
      getSettings: getSettings7,
      getBlock: getBlock2
    } = (0, import_data72.useSelect)(store);
    const { getGroupingBlockName } = (0, import_data72.useSelect)(import_blocks42.store);
    const {
      insertBlocks: insertBlocks2,
      moveBlocksToPosition: moveBlocksToPosition2,
      updateBlockAttributes: updateBlockAttributes2,
      clearSelectedBlock: clearSelectedBlock2,
      replaceBlocks: replaceBlocks2,
      removeBlocks: removeBlocks2
    } = (0, import_data72.useDispatch)(store);
    const registry = (0, import_data72.useRegistry)();
    const insertOrReplaceBlocks = (0, import_element86.useCallback)(
      (blocks2, updateSelection = true, initialPosition2 = 0, clientIdsToReplace = []) => {
        if (!Array.isArray(blocks2)) {
          blocks2 = [blocks2];
        }
        const clientIds = getBlockOrder2(targetRootClientId);
        const clientId = clientIds[targetBlockIndex];
        if (operation === "replace") {
          replaceBlocks2(clientId, blocks2, void 0, initialPosition2);
        } else if (operation === "group") {
          const targetBlock = getBlock2(clientId);
          if (nearestSide === "left") {
            blocks2.push(targetBlock);
          } else {
            blocks2.unshift(targetBlock);
          }
          const groupInnerBlocks = blocks2.map((block) => {
            return (0, import_blocks42.createBlock)(
              block.name,
              block.attributes,
              block.innerBlocks
            );
          });
          const areAllImages = blocks2.every((block) => {
            return block.name === "core/image";
          });
          const galleryBlock = canInsertBlockType2(
            "core/gallery",
            targetRootClientId
          );
          const wrappedBlocks = (0, import_blocks42.createBlock)(
            areAllImages && galleryBlock ? "core/gallery" : getGroupingBlockName(),
            {
              layout: {
                type: "flex",
                flexWrap: areAllImages && galleryBlock ? null : "nowrap"
              }
            },
            groupInnerBlocks
          );
          replaceBlocks2(
            [clientId, ...clientIdsToReplace],
            wrappedBlocks,
            void 0,
            initialPosition2
          );
        } else {
          insertBlocks2(
            blocks2,
            targetBlockIndex,
            targetRootClientId,
            updateSelection,
            initialPosition2
          );
        }
      },
      [
        getBlockOrder2,
        targetRootClientId,
        targetBlockIndex,
        operation,
        replaceBlocks2,
        getBlock2,
        nearestSide,
        canInsertBlockType2,
        getGroupingBlockName,
        insertBlocks2
      ]
    );
    const moveBlocks = (0, import_element86.useCallback)(
      (sourceClientIds, sourceRootClientId, insertIndex) => {
        if (operation === "replace") {
          const sourceBlocks = getBlocksByClientId2(sourceClientIds);
          const targetBlockClientIds = getBlockOrder2(targetRootClientId);
          const targetBlockClientId = targetBlockClientIds[targetBlockIndex];
          registry.batch(() => {
            removeBlocks2(sourceClientIds, false);
            replaceBlocks2(
              targetBlockClientId,
              sourceBlocks,
              void 0,
              0
            );
          });
        } else {
          moveBlocksToPosition2(
            sourceClientIds,
            sourceRootClientId,
            targetRootClientId,
            insertIndex
          );
        }
      },
      [
        operation,
        getBlockOrder2,
        getBlocksByClientId2,
        moveBlocksToPosition2,
        registry,
        removeBlocks2,
        replaceBlocks2,
        targetBlockIndex,
        targetRootClientId
      ]
    );
    const _onDrop = onBlockDrop(
      targetRootClientId,
      targetBlockIndex,
      getBlockIndex2,
      getClientIdsOfDescendants2,
      moveBlocks,
      insertOrReplaceBlocks,
      clearSelectedBlock2,
      operation,
      getBlock2
    );
    const _onFilesDrop = onFilesDrop(
      targetRootClientId,
      getSettings7,
      updateBlockAttributes2,
      canInsertBlockType2,
      insertOrReplaceBlocks
    );
    const _onHTMLDrop = onHTMLDrop(insertOrReplaceBlocks);
    return (event) => {
      const files = (0, import_dom23.getFilesFromDataTransfer)(event.dataTransfer);
      const html = event.dataTransfer.getData("text/html");
      if (html) {
        _onHTMLDrop(html);
      } else if (files.length) {
        _onFilesDrop(files);
      } else {
        _onDrop(event);
      }
    };
  }

  // packages/block-editor/build-module/utils/math.mjs
  function getDistanceFromPointToEdge(point, rect, edge) {
    const isHorizontal = edge === "top" || edge === "bottom";
    const { x: x2, y: y2 } = point;
    const pointLateralPosition = isHorizontal ? x2 : y2;
    const pointForwardPosition = isHorizontal ? y2 : x2;
    const edgeStart = isHorizontal ? rect.left : rect.top;
    const edgeEnd = isHorizontal ? rect.right : rect.bottom;
    const edgeForwardPosition = rect[edge];
    let edgeLateralPosition;
    if (pointLateralPosition >= edgeStart && pointLateralPosition <= edgeEnd) {
      edgeLateralPosition = pointLateralPosition;
    } else if (pointLateralPosition < edgeEnd) {
      edgeLateralPosition = edgeStart;
    } else {
      edgeLateralPosition = edgeEnd;
    }
    return Math.sqrt(
      (pointLateralPosition - edgeLateralPosition) ** 2 + (pointForwardPosition - edgeForwardPosition) ** 2
    );
  }
  function getDistanceToNearestEdge(point, rect, allowedEdges = ["top", "bottom", "left", "right"]) {
    let candidateDistance;
    let candidateEdge;
    allowedEdges.forEach((edge) => {
      const distance = getDistanceFromPointToEdge(point, rect, edge);
      if (candidateDistance === void 0 || distance < candidateDistance) {
        candidateDistance = distance;
        candidateEdge = edge;
      }
    });
    return [candidateDistance, candidateEdge];
  }
  function isPointContainedByRect(point, rect) {
    return rect.left <= point.x && rect.right >= point.x && rect.top <= point.y && rect.bottom >= point.y;
  }
  function isPointWithinTopAndBottomBoundariesOfRect(point, rect) {
    return rect.top <= point.y && rect.bottom >= point.y;
  }

  // packages/block-editor/build-module/components/use-block-drop-zone/index.mjs
  var THRESHOLD_DISTANCE = 30;
  var MINIMUM_HEIGHT_FOR_THRESHOLD = 120;
  var MINIMUM_WIDTH_FOR_THRESHOLD = 120;
  function getDropTargetPosition(blocksData, position, orientation = "vertical", options = {}) {
    const allowedEdges = orientation === "horizontal" ? ["left", "right"] : ["top", "bottom"];
    let nearestIndex = 0;
    let insertPosition = "before";
    let minDistance = Infinity;
    let targetBlockIndex = null;
    let nearestSide = "right";
    const {
      dropZoneElement,
      parentBlockOrientation,
      rootBlockIndex = 0
    } = options;
    if (dropZoneElement && parentBlockOrientation !== "horizontal") {
      const rect = dropZoneElement.getBoundingClientRect();
      const [distance, edge] = getDistanceToNearestEdge(position, rect, [
        "top",
        "bottom"
      ]);
      if (rect.height > MINIMUM_HEIGHT_FOR_THRESHOLD && distance < THRESHOLD_DISTANCE) {
        if (edge === "top") {
          return [rootBlockIndex, "before"];
        }
        if (edge === "bottom") {
          return [rootBlockIndex + 1, "after"];
        }
      }
    }
    const isRightToLeft = (0, import_i18n66.isRTL)();
    if (dropZoneElement && parentBlockOrientation === "horizontal") {
      const rect = dropZoneElement.getBoundingClientRect();
      const [distance, edge] = getDistanceToNearestEdge(position, rect, [
        "left",
        "right"
      ]);
      if (rect.width > MINIMUM_WIDTH_FOR_THRESHOLD && distance < THRESHOLD_DISTANCE) {
        if (isRightToLeft && edge === "right" || !isRightToLeft && edge === "left") {
          return [rootBlockIndex, "before"];
        }
        if (isRightToLeft && edge === "left" || !isRightToLeft && edge === "right") {
          return [rootBlockIndex + 1, "after"];
        }
      }
    }
    blocksData.forEach(
      ({
        isUnmodifiedDefaultBlock: isUnmodifiedDefaultBlock5,
        getBoundingClientRect,
        blockIndex,
        blockOrientation
      }) => {
        const rect = getBoundingClientRect();
        if (!rect) {
          return;
        }
        let [distance, edge] = getDistanceToNearestEdge(
          position,
          rect,
          allowedEdges
        );
        const [sideDistance, sideEdge] = getDistanceToNearestEdge(
          position,
          rect,
          ["left", "right"]
        );
        const isPointInsideRect = isPointContainedByRect(position, rect);
        if (isUnmodifiedDefaultBlock5 && isPointInsideRect) {
          distance = 0;
        } else if (orientation === "vertical" && blockOrientation !== "horizontal" && (isPointInsideRect && sideDistance < THRESHOLD_DISTANCE || !isPointInsideRect && isPointWithinTopAndBottomBoundariesOfRect(
          position,
          rect
        ))) {
          targetBlockIndex = blockIndex;
          nearestSide = sideEdge;
        }
        if (distance < minDistance) {
          insertPosition = edge === "bottom" || !isRightToLeft && edge === "right" || isRightToLeft && edge === "left" ? "after" : "before";
          minDistance = distance;
          nearestIndex = blockIndex;
        }
      }
    );
    const adjacentIndex = nearestIndex + (insertPosition === "after" ? 1 : -1);
    const isNearestBlockUnmodifiedDefaultBlock = !!blocksData[nearestIndex]?.isUnmodifiedDefaultBlock;
    const isAdjacentBlockUnmodifiedDefaultBlock = !!blocksData[adjacentIndex]?.isUnmodifiedDefaultBlock;
    if (targetBlockIndex !== null) {
      return [targetBlockIndex, "group", nearestSide];
    }
    if (!isNearestBlockUnmodifiedDefaultBlock && !isAdjacentBlockUnmodifiedDefaultBlock) {
      const insertionIndex = insertPosition === "after" ? nearestIndex + 1 : nearestIndex;
      return [insertionIndex, "insert"];
    }
    return [
      isNearestBlockUnmodifiedDefaultBlock ? nearestIndex : adjacentIndex,
      "replace"
    ];
  }
  function isDropTargetValid(getBlockType27, allowedBlocks, draggedBlockNames, targetBlockName) {
    let areBlocksAllowed = true;
    if (allowedBlocks) {
      const allowedBlockNames = allowedBlocks?.map(({ name }) => name);
      areBlocksAllowed = draggedBlockNames.every(
        (name) => allowedBlockNames?.includes(name)
      );
    }
    const draggedBlockTypes = draggedBlockNames.map(
      (name) => getBlockType27(name)
    );
    const targetMatchesDraggedBlockParents = draggedBlockTypes.every(
      (block) => {
        const [allowedParentName] = block?.parent || [];
        if (!allowedParentName) {
          return true;
        }
        return allowedParentName === targetBlockName;
      }
    );
    return areBlocksAllowed && targetMatchesDraggedBlockParents;
  }
  function isInsertionPoint(targetToCheck, ownerDocument) {
    const { defaultView } = ownerDocument;
    return !!(defaultView && targetToCheck instanceof defaultView.HTMLElement && targetToCheck.closest("[data-is-insertion-point]"));
  }
  function useBlockDropZone({
    dropZoneElement,
    // An undefined value represents a top-level block. Default to an empty
    // string for this so that `targetRootClientId` can be easily compared to
    // values returned by the `getRootBlockClientId` selector, which also uses
    // an empty string to represent top-level blocks.
    rootClientId: targetRootClientId = "",
    parentClientId: parentBlockClientId = "",
    isDisabled = false
  } = {}) {
    const registry = (0, import_data73.useRegistry)();
    const [dropTarget, setDropTarget] = (0, import_element87.useState)({
      index: null,
      operation: "insert"
    });
    const { getBlockType: getBlockType27, getBlockVariations: getBlockVariations2, getGroupingBlockName } = (0, import_data73.useSelect)(import_blocks43.store);
    const {
      canInsertBlockType: canInsertBlockType2,
      getBlockListSettings: getBlockListSettings2,
      getBlocks: getBlocks2,
      getBlockIndex: getBlockIndex2,
      getDraggedBlockClientIds: getDraggedBlockClientIds2,
      getBlockNamesByClientId: getBlockNamesByClientId2,
      getAllowedBlocks: getAllowedBlocks2,
      isDragging: isDragging3,
      isGroupable: isGroupable2,
      isZoomOut: isZoomOut2,
      getSectionRootClientId: getSectionRootClientId2,
      getBlockParents: getBlockParents2
    } = unlock((0, import_data73.useSelect)(store));
    const {
      showInsertionPoint: showInsertionPoint2,
      hideInsertionPoint: hideInsertionPoint2,
      startDragging: startDragging2,
      stopDragging: stopDragging2
    } = unlock((0, import_data73.useDispatch)(store));
    const onBlockDrop2 = useOnBlockDrop(
      dropTarget.operation === "before" || dropTarget.operation === "after" ? parentBlockClientId : targetRootClientId,
      dropTarget.index,
      {
        operation: dropTarget.operation,
        nearestSide: dropTarget.nearestSide
      }
    );
    const throttled = (0, import_compose52.useThrottle)(
      (0, import_element87.useCallback)(
        (event, ownerDocument) => {
          if (!isDragging3()) {
            startDragging2();
          }
          const draggedBlockClientIds = getDraggedBlockClientIds2();
          const targetParents = [
            targetRootClientId,
            ...getBlockParents2(targetRootClientId, true)
          ];
          const isTargetWithinDraggedBlocks = draggedBlockClientIds.some(
            (clientId) => targetParents.includes(clientId)
          );
          if (isTargetWithinDraggedBlocks) {
            return;
          }
          const allowedBlocks = getAllowedBlocks2(targetRootClientId);
          const targetBlockName = getBlockNamesByClientId2([
            targetRootClientId
          ])[0];
          const draggedBlockNames = getBlockNamesByClientId2(
            draggedBlockClientIds
          );
          const isBlockDroppingAllowed = isDropTargetValid(
            getBlockType27,
            allowedBlocks,
            draggedBlockNames,
            targetBlockName
          );
          if (!isBlockDroppingAllowed) {
            return;
          }
          const sectionRootClientId = getSectionRootClientId2();
          if (isZoomOut2() && sectionRootClientId !== targetRootClientId) {
            return;
          }
          const blocks2 = getBlocks2(targetRootClientId).filter((block) => {
            return !((0, import_blocks43.hasBlockSupport)(block.name, "visibility", true) && block.attributes?.metadata?.blockVisibility === false);
          });
          if (blocks2.length === 0) {
            registry.batch(() => {
              setDropTarget({
                index: 0,
                operation: "insert"
              });
              showInsertionPoint2(targetRootClientId, 0, {
                operation: "insert"
              });
            });
            return;
          }
          const blocksData = blocks2.map((block) => {
            const clientId = block.clientId;
            return {
              isUnmodifiedDefaultBlock: (0, import_blocks43.isUnmodifiedDefaultBlock)(block),
              getBoundingClientRect: () => {
                const blockElement = ownerDocument.getElementById(
                  `block-${clientId}`
                );
                return blockElement ? blockElement.getBoundingClientRect() : null;
              },
              blockIndex: getBlockIndex2(clientId),
              blockOrientation: getBlockListSettings2(clientId)?.orientation
            };
          });
          const dropTargetPosition = getDropTargetPosition(
            blocksData,
            { x: event.clientX, y: event.clientY },
            getBlockListSettings2(targetRootClientId)?.orientation,
            {
              dropZoneElement,
              parentBlockClientId,
              parentBlockOrientation: parentBlockClientId ? getBlockListSettings2(parentBlockClientId)?.orientation : void 0,
              rootBlockIndex: getBlockIndex2(targetRootClientId)
            }
          );
          const [targetIndex, operation, nearestSide] = dropTargetPosition;
          const isTargetIndexEmptyDefaultBlock = blocksData[targetIndex]?.isUnmodifiedDefaultBlock;
          if (isZoomOut2() && !isTargetIndexEmptyDefaultBlock && operation !== "insert") {
            return;
          }
          if (operation === "group") {
            const targetBlock = blocks2[targetIndex];
            const areAllImages = [
              targetBlock.name,
              ...draggedBlockNames
            ].every((name) => name === "core/image");
            const canInsertGalleryBlock = canInsertBlockType2(
              "core/gallery",
              targetRootClientId
            );
            const areGroupableBlocks = isGroupable2([
              targetBlock.clientId,
              getDraggedBlockClientIds2()
            ]);
            const groupBlockVariations = getBlockVariations2(
              getGroupingBlockName(),
              "block"
            );
            const canInsertRow = groupBlockVariations && groupBlockVariations.find(
              ({ name }) => name === "group-row"
            );
            if (areAllImages && !canInsertGalleryBlock && (!areGroupableBlocks || !canInsertRow)) {
              return;
            }
            if (!areAllImages && (!areGroupableBlocks || !canInsertRow)) {
              return;
            }
          }
          registry.batch(() => {
            setDropTarget({
              index: targetIndex,
              operation,
              nearestSide
            });
            const insertionPointClientId = [
              "before",
              "after"
            ].includes(operation) ? parentBlockClientId : targetRootClientId;
            showInsertionPoint2(insertionPointClientId, targetIndex, {
              operation,
              nearestSide
            });
          });
        },
        [
          isDragging3,
          getAllowedBlocks2,
          targetRootClientId,
          getBlockNamesByClientId2,
          getDraggedBlockClientIds2,
          getBlockType27,
          getSectionRootClientId2,
          isZoomOut2,
          getBlocks2,
          getBlockListSettings2,
          dropZoneElement,
          parentBlockClientId,
          getBlockIndex2,
          registry,
          startDragging2,
          showInsertionPoint2,
          canInsertBlockType2,
          isGroupable2,
          getBlockVariations2,
          getGroupingBlockName
        ]
      ),
      200
    );
    return (0, import_compose52.__experimentalUseDropZone)({
      dropZoneElement,
      isDisabled,
      onDrop: onBlockDrop2,
      onDragOver(event) {
        throttled(event, event.currentTarget.ownerDocument);
      },
      onDragLeave(event) {
        const { ownerDocument } = event.currentTarget;
        if (isInsertionPoint(event.relatedTarget, ownerDocument) || isInsertionPoint(event.target, ownerDocument)) {
          return;
        }
        throttled.cancel();
        hideInsertionPoint2();
      },
      onDragEnd() {
        throttled.cancel();
        stopDragging2();
        hideInsertionPoint2();
      }
    });
  }

  // packages/block-editor/build-module/components/inner-blocks/index.mjs
  var import_jsx_runtime206 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_OBJECT = {};
  function BlockContext({ children, clientId }) {
    const context = useBlockContext(clientId);
    return /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(BlockContextProvider, { value: context, children });
  }
  var BlockListItemsMemo = (0, import_element88.memo)(BlockListItems);
  function UncontrolledInnerBlocks(props) {
    const {
      clientId,
      allowedBlocks,
      prioritizedInserterBlocks,
      defaultBlock,
      directInsert,
      __experimentalDefaultBlock,
      __experimentalDirectInsert,
      template: template2,
      templateLock,
      wrapperRef,
      templateInsertUpdatesSelection,
      __experimentalCaptureToolbars: captureToolbars,
      __experimentalAppenderTagName,
      renderAppender,
      orientation,
      placeholder,
      layout,
      name,
      blockType,
      parentLock,
      defaultLayout: defaultLayout2
    } = props;
    useNestedSettingsUpdate(
      clientId,
      parentLock,
      allowedBlocks,
      prioritizedInserterBlocks,
      defaultBlock,
      directInsert,
      __experimentalDefaultBlock,
      __experimentalDirectInsert,
      templateLock,
      captureToolbars,
      orientation,
      layout
    );
    useInnerBlockTemplateSync(
      clientId,
      template2,
      templateLock,
      templateInsertUpdatesSelection
    );
    const defaultLayoutBlockSupport = (0, import_blocks44.getBlockSupport)(name, "layout") || (0, import_blocks44.getBlockSupport)(name, "__experimentalLayout") || EMPTY_OBJECT;
    const { allowSizingOnChildren = false } = defaultLayoutBlockSupport;
    const usedLayout = layout || defaultLayoutBlockSupport;
    const memoedLayout = (0, import_element88.useMemo)(
      () => ({
        // Default layout will know about any content/wide size defined by the theme.
        ...defaultLayout2,
        ...usedLayout,
        ...allowSizingOnChildren && {
          allowSizingOnChildren: true
        }
      }),
      [defaultLayout2, usedLayout, allowSizingOnChildren]
    );
    const items = /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
      BlockListItemsMemo,
      {
        rootClientId: clientId,
        renderAppender,
        __experimentalAppenderTagName,
        layout: memoedLayout,
        wrapperRef,
        placeholder
      }
    );
    if (!blockType?.providesContext || Object.keys(blockType.providesContext).length === 0) {
      return items;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(BlockContext, { clientId, children: items });
  }
  function ControlledInnerBlocks(props) {
    useBlockSync(props);
    return /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(UncontrolledInnerBlocks, { ...props });
  }
  var ForwardedInnerBlocks = (0, import_element88.forwardRef)((props, ref) => {
    const innerBlocksProps = useInnerBlocksProps({ ref }, props);
    return /* @__PURE__ */ (0, import_jsx_runtime206.jsx)("div", { className: "block-editor-inner-blocks", children: /* @__PURE__ */ (0, import_jsx_runtime206.jsx)("div", { ...innerBlocksProps }) });
  });
  function useInnerBlocksProps(props = {}, options = {}) {
    const {
      __unstableDisableLayoutClassNames,
      __unstableDisableDropZone,
      dropZoneElement
    } = options;
    const {
      clientId,
      layout = null,
      __unstableLayoutClassNames: layoutClassNames = ""
    } = useBlockEditContext();
    const selected = (0, import_data74.useSelect)(
      (select3) => {
        const {
          getBlockName: getBlockName2,
          isZoomOut: isZoomOut2,
          getTemplateLock: getTemplateLock2,
          getBlockRootClientId: getBlockRootClientId2,
          getBlockEditingMode: getBlockEditingMode2,
          getBlockSettings: getBlockSettings2,
          getSectionRootClientId: getSectionRootClientId2
        } = unlock(select3(store));
        if (!clientId) {
          const sectionRootClientId = getSectionRootClientId2();
          return {
            isDropZoneDisabled: isZoomOut2() && sectionRootClientId !== ""
          };
        }
        const { hasBlockSupport: hasBlockSupport48, getBlockType: getBlockType27 } = select3(import_blocks44.store);
        const blockName = getBlockName2(clientId);
        const blockEditingMode = getBlockEditingMode2(clientId);
        const parentClientId2 = getBlockRootClientId2(clientId);
        const [defaultLayout22] = getBlockSettings2(clientId, "layout");
        let _isDropZoneDisabled = blockEditingMode === "disabled";
        if (isZoomOut2()) {
          const sectionRootClientId = getSectionRootClientId2();
          _isDropZoneDisabled = clientId !== sectionRootClientId;
        }
        return {
          __experimentalCaptureToolbars: hasBlockSupport48(
            blockName,
            "__experimentalExposeControlsToChildren",
            false
          ),
          name: blockName,
          blockType: getBlockType27(blockName),
          parentLock: getTemplateLock2(parentClientId2),
          parentClientId: parentClientId2,
          isDropZoneDisabled: _isDropZoneDisabled,
          defaultLayout: defaultLayout22
        };
      },
      [clientId]
    );
    const {
      __experimentalCaptureToolbars,
      name,
      blockType,
      parentLock,
      parentClientId,
      isDropZoneDisabled,
      defaultLayout: defaultLayout2
    } = selected;
    const blockDropZoneRef = useBlockDropZone({
      dropZoneElement,
      rootClientId: clientId,
      parentClientId
    });
    const ref = (0, import_compose53.useMergeRefs)([
      props.ref,
      __unstableDisableDropZone || isDropZoneDisabled || layout?.isManualPlacement && window.__experimentalEnableGridInteractivity ? null : blockDropZoneRef
    ]);
    const innerBlocksProps = {
      __experimentalCaptureToolbars,
      layout,
      name,
      blockType,
      parentLock,
      defaultLayout: defaultLayout2,
      ...options
    };
    const InnerBlocks = innerBlocksProps.value && innerBlocksProps.onChange ? ControlledInnerBlocks : UncontrolledInnerBlocks;
    return {
      ...props,
      ref,
      className: clsx_default(
        props.className,
        "block-editor-block-list__layout",
        __unstableDisableLayoutClassNames ? "" : layoutClassNames
      ),
      children: clientId ? /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(InnerBlocks, { ...innerBlocksProps, clientId }) : /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(BlockListItems, { ...options })
    };
  }
  useInnerBlocksProps.save = import_blocks44.__unstableGetInnerBlocksProps;
  ForwardedInnerBlocks.DefaultBlockAppender = DefaultBlockAppender2;
  ForwardedInnerBlocks.ButtonBlockAppender = ButtonBlockAppender2;
  ForwardedInnerBlocks.Content = () => useInnerBlocksProps.save().children;
  var inner_blocks_default = ForwardedInnerBlocks;

  // packages/block-editor/build-module/components/observe-typing/index.mjs
  var import_compose54 = __toESM(require_compose(), 1);
  var import_data75 = __toESM(require_data(), 1);
  var import_dom24 = __toESM(require_dom(), 1);
  var import_keycodes9 = __toESM(require_keycodes(), 1);
  var import_jsx_runtime207 = __toESM(require_jsx_runtime(), 1);
  var KEY_DOWN_ELIGIBLE_KEY_CODES = /* @__PURE__ */ new Set([
    import_keycodes9.UP,
    import_keycodes9.RIGHT,
    import_keycodes9.DOWN,
    import_keycodes9.LEFT,
    import_keycodes9.ENTER,
    import_keycodes9.BACKSPACE
  ]);
  function isKeyDownEligibleForStartTyping(event) {
    const { keyCode, shiftKey } = event;
    return !shiftKey && KEY_DOWN_ELIGIBLE_KEY_CODES.has(keyCode);
  }
  function useMouseMoveTypingReset() {
    const isTyping3 = (0, import_data75.useSelect)(
      (select3) => select3(store).isTyping(),
      []
    );
    const { stopTyping: stopTyping2 } = (0, import_data75.useDispatch)(store);
    return (0, import_compose54.useRefEffect)(
      (node) => {
        if (!isTyping3) {
          return;
        }
        const { ownerDocument } = node;
        let lastClientX;
        let lastClientY;
        function stopTypingOnMouseMove(event) {
          const { clientX, clientY } = event;
          if (lastClientX && lastClientY && (lastClientX !== clientX || lastClientY !== clientY)) {
            stopTyping2();
          }
          lastClientX = clientX;
          lastClientY = clientY;
        }
        ownerDocument.addEventListener(
          "mousemove",
          stopTypingOnMouseMove
        );
        return () => {
          ownerDocument.removeEventListener(
            "mousemove",
            stopTypingOnMouseMove
          );
        };
      },
      [isTyping3, stopTyping2]
    );
  }
  function useTypingObserver() {
    const { isTyping: isTyping3 } = (0, import_data75.useSelect)((select3) => {
      const { isTyping: _isTyping } = select3(store);
      return {
        isTyping: _isTyping()
      };
    }, []);
    const { startTyping: startTyping2, stopTyping: stopTyping2 } = (0, import_data75.useDispatch)(store);
    const ref1 = useMouseMoveTypingReset();
    const ref2 = (0, import_compose54.useRefEffect)(
      (node) => {
        const { ownerDocument } = node;
        const { defaultView } = ownerDocument;
        const selection2 = defaultView.getSelection();
        if (isTyping3) {
          let stopTypingOnNonTextField2 = function(event) {
            const { target } = event;
            timerId = defaultView.setTimeout(() => {
              if (!(0, import_dom24.isTextField)(target)) {
                stopTyping2();
              }
            });
          }, stopTypingOnEscapeKey2 = function(event) {
            const { keyCode } = event;
            if (keyCode === import_keycodes9.ESCAPE || keyCode === import_keycodes9.TAB) {
              stopTyping2();
            }
          }, stopTypingOnSelectionUncollapse2 = function() {
            if (!selection2.isCollapsed) {
              stopTyping2();
            }
          };
          var stopTypingOnNonTextField = stopTypingOnNonTextField2, stopTypingOnEscapeKey = stopTypingOnEscapeKey2, stopTypingOnSelectionUncollapse = stopTypingOnSelectionUncollapse2;
          let timerId;
          node.addEventListener("focus", stopTypingOnNonTextField2);
          node.addEventListener("keydown", stopTypingOnEscapeKey2);
          ownerDocument.addEventListener(
            "selectionchange",
            stopTypingOnSelectionUncollapse2
          );
          return () => {
            defaultView.clearTimeout(timerId);
            node.removeEventListener(
              "focus",
              stopTypingOnNonTextField2
            );
            node.removeEventListener(
              "keydown",
              stopTypingOnEscapeKey2
            );
            ownerDocument.removeEventListener(
              "selectionchange",
              stopTypingOnSelectionUncollapse2
            );
          };
        }
        function startTypingInTextField(event) {
          const { type, target } = event;
          if (!(0, import_dom24.isTextField)(target) || !node.contains(target)) {
            return;
          }
          if (type === "keydown" && !isKeyDownEligibleForStartTyping(event)) {
            return;
          }
          startTyping2();
        }
        node.addEventListener("keypress", startTypingInTextField);
        node.addEventListener("keydown", startTypingInTextField);
        return () => {
          node.removeEventListener("keypress", startTypingInTextField);
          node.removeEventListener("keydown", startTypingInTextField);
        };
      },
      [isTyping3, startTyping2, stopTyping2]
    );
    return (0, import_compose54.useMergeRefs)([ref1, ref2]);
  }
  function ObserveTyping({ children }) {
    return /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("div", { ref: useTypingObserver(), children });
  }
  var observe_typing_default = ObserveTyping;

  // packages/block-editor/build-module/components/block-list/zoom-out-separator.mjs
  var import_components68 = __toESM(require_components(), 1);
  var import_compose55 = __toESM(require_compose(), 1);
  var import_data76 = __toESM(require_data(), 1);
  var import_element89 = __toESM(require_element(), 1);
  var import_i18n67 = __toESM(require_i18n(), 1);
  var import_jsx_runtime208 = __toESM(require_jsx_runtime(), 1);
  function ZoomOutSeparator({
    clientId,
    rootClientId = "",
    position = "top"
  }) {
    const [isDraggedOver, setIsDraggedOver] = (0, import_element89.useState)(false);
    const {
      sectionRootClientId,
      sectionClientIds,
      insertionPoint: insertionPoint2,
      blockInsertionPointVisible,
      blockInsertionPoint,
      blocksBeingDragged
    } = (0, import_data76.useSelect)((select3) => {
      const {
        getInsertionPoint: getInsertionPoint2,
        getBlockOrder: getBlockOrder2,
        getSectionRootClientId: getSectionRootClientId2,
        isBlockInsertionPointVisible: isBlockInsertionPointVisible2,
        getBlockInsertionPoint: getBlockInsertionPoint2,
        getDraggedBlockClientIds: getDraggedBlockClientIds2
      } = unlock(select3(store));
      const root = getSectionRootClientId2();
      const sectionRootClientIds = getBlockOrder2(root);
      return {
        sectionRootClientId: root,
        sectionClientIds: sectionRootClientIds,
        insertionPoint: getInsertionPoint2(),
        blockInsertionPoint: getBlockInsertionPoint2(),
        blockInsertionPointVisible: isBlockInsertionPointVisible2(),
        blocksBeingDragged: getDraggedBlockClientIds2()
      };
    }, []);
    const isReducedMotion = (0, import_compose55.useReducedMotion)();
    if (!clientId) {
      return;
    }
    let isVisible = false;
    const isSectionBlock2 = rootClientId === sectionRootClientId && sectionClientIds && sectionClientIds.includes(clientId);
    if (!isSectionBlock2) {
      return null;
    }
    const hasTopInsertionPoint = insertionPoint2?.index === 0 && clientId === sectionClientIds[insertionPoint2.index];
    const hasBottomInsertionPoint = insertionPoint2 && insertionPoint2.hasOwnProperty("index") && clientId === sectionClientIds[insertionPoint2.index - 1];
    if (position === "top") {
      isVisible = hasTopInsertionPoint || blockInsertionPointVisible && blockInsertionPoint.index === 0 && clientId === sectionClientIds[blockInsertionPoint.index];
    }
    if (position === "bottom") {
      isVisible = hasBottomInsertionPoint || blockInsertionPointVisible && clientId === sectionClientIds[blockInsertionPoint.index - 1];
    }
    const blockBeingDraggedClientId = blocksBeingDragged[0];
    const isCurrentBlockBeingDragged = blocksBeingDragged.includes(clientId);
    const blockBeingDraggedIndex = sectionClientIds.indexOf(
      blockBeingDraggedClientId
    );
    const blockBeingDraggedPreviousSiblingClientId = blockBeingDraggedIndex > 0 ? sectionClientIds[blockBeingDraggedIndex - 1] : null;
    const isCurrentBlockPreviousSiblingOfBlockBeingDragged = blockBeingDraggedPreviousSiblingClientId === clientId;
    if (isCurrentBlockBeingDragged || isCurrentBlockPreviousSiblingOfBlockBeingDragged) {
      isVisible = false;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(import_components68.__unstableAnimatePresence, { children: isVisible && /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
      import_components68.__unstableMotion.div,
      {
        initial: { height: 0 },
        animate: {
          // Use a height equal to that of the zoom out frame size.
          height: "calc(1 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)"
        },
        exit: { height: 0 },
        transition: {
          type: "tween",
          duration: isReducedMotion ? 0 : 0.2,
          ease: [0.6, 0, 0.4, 1]
        },
        className: clsx_default(
          "block-editor-block-list__zoom-out-separator",
          {
            "is-dragged-over": isDraggedOver
          }
        ),
        "data-is-insertion-point": "true",
        onDragOver: () => setIsDraggedOver(true),
        onDragLeave: () => setIsDraggedOver(false),
        children: /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
          import_components68.__unstableMotion.div,
          {
            initial: { opacity: 0 },
            animate: { opacity: 1 },
            exit: { opacity: 0, transition: { delay: -0.125 } },
            transition: {
              ease: "linear",
              duration: 0.1,
              delay: 0.125
            },
            children: (0, import_i18n67.__)("Drop pattern.")
          }
        )
      }
    ) });
  }

  // packages/block-editor/build-module/components/block-list/index.mjs
  var import_jsx_runtime209 = __toESM(require_jsx_runtime(), 1);
  var IntersectionObserver = (0, import_element90.createContext)();
  IntersectionObserver.displayName = "IntersectionObserverContext";
  var pendingBlockVisibilityUpdatesPerRegistry = /* @__PURE__ */ new WeakMap();
  var delayedBlockVisibilityDebounceOptions = {
    trailing: true
  };
  function Root({ className, ...settings2 }) {
    const {
      isOutlineMode,
      isFocusMode,
      isPreviewMode,
      editedContentOnlySection: editedContentOnlySection2
    } = (0, import_data77.useSelect)((select3) => {
      const {
        getSettings: getSettings7,
        isTyping: isTyping3,
        hasBlockSpotlight: hasBlockSpotlight3,
        getEditedContentOnlySection: getEditedContentOnlySection2
      } = unlock(select3(store));
      const {
        outlineMode,
        focusMode,
        isPreviewMode: _isPreviewMode
      } = getSettings7();
      return {
        isOutlineMode: outlineMode && !isTyping3(),
        isFocusMode: focusMode || hasBlockSpotlight3(),
        isPreviewMode: _isPreviewMode,
        editedContentOnlySection: getEditedContentOnlySection2()
      };
    }, []);
    const registry = (0, import_data77.useRegistry)();
    const { setBlockVisibility: setBlockVisibility2 } = (0, import_data77.useDispatch)(store);
    const delayedBlockVisibilityUpdates = (0, import_compose56.useDebounce)(
      (0, import_element90.useCallback)(() => {
        const updates = {};
        pendingBlockVisibilityUpdatesPerRegistry.get(registry).forEach(([id, isIntersecting]) => {
          updates[id] = isIntersecting;
        });
        setBlockVisibility2(updates);
      }, [registry]),
      300,
      delayedBlockVisibilityDebounceOptions
    );
    const intersectionObserver = (0, import_element90.useMemo)(() => {
      const { IntersectionObserver: Observer } = window;
      if (!Observer) {
        return;
      }
      return new Observer((entries) => {
        if (!pendingBlockVisibilityUpdatesPerRegistry.get(registry)) {
          pendingBlockVisibilityUpdatesPerRegistry.set(registry, []);
        }
        for (const entry of entries) {
          const clientId = entry.target.getAttribute("data-block");
          pendingBlockVisibilityUpdatesPerRegistry.get(registry).push([clientId, entry.isIntersecting]);
        }
        delayedBlockVisibilityUpdates();
      });
    }, []);
    const innerBlocksProps = useInnerBlocksProps(
      {
        ref: (0, import_compose56.useMergeRefs)([
          useBlockSelectionClearer(),
          useInBetweenInserter(),
          useTypingObserver()
        ]),
        className: clsx_default("is-root-container", className, {
          "is-outline-mode": isOutlineMode,
          "is-focus-mode": isFocusMode,
          "is-preview-mode": isPreviewMode
        })
      },
      settings2
    );
    return /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)(IntersectionObserver.Provider, { value: intersectionObserver, children: [
      /* @__PURE__ */ (0, import_jsx_runtime209.jsx)("div", { ...innerBlocksProps }),
      !!editedContentOnlySection2 && /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
        StopEditingContentOnlySectionOnOutsideSelect,
        {
          clientId: editedContentOnlySection2
        }
      )
    ] });
  }
  function StopEditingContentOnlySectionOnOutsideSelect({ clientId }) {
    const { stopEditingContentOnlySection: stopEditingContentOnlySection2 } = unlock(
      (0, import_data77.useDispatch)(store)
    );
    const isBlockOrDescendantSelected = (0, import_data77.useSelect)(
      (select3) => {
        const {
          isBlockSelected: isBlockSelected2,
          hasSelectedInnerBlock: hasSelectedInnerBlock2,
          getBlockSelectionStart: getBlockSelectionStart2
        } = select3(store);
        return !getBlockSelectionStart2() || isBlockSelected2(clientId) || hasSelectedInnerBlock2(clientId, true);
      },
      [clientId]
    );
    (0, import_element90.useEffect)(() => {
      if (!isBlockOrDescendantSelected) {
        stopEditingContentOnlySection2();
      }
    }, [isBlockOrDescendantSelected, stopEditingContentOnlySection2]);
    return null;
  }
  function BlockList(settings2) {
    return /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(Provider, { value: DEFAULT_BLOCK_EDIT_CONTEXT, children: /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(Root, { ...settings2 }) });
  }
  var EMPTY_ARRAY7 = [];
  var EMPTY_SET2 = /* @__PURE__ */ new Set();
  function Items({
    placeholder,
    rootClientId,
    renderAppender: CustomAppender,
    __experimentalAppenderTagName,
    layout = defaultLayout
  }) {
    const hasAppender = CustomAppender !== false;
    const hasCustomAppender = !!CustomAppender;
    const {
      order,
      isZoomOut: isZoomOut2,
      selectedBlocks,
      visibleBlocks,
      shouldRenderAppender
    } = (0, import_data77.useSelect)(
      (select3) => {
        const {
          getSettings: getSettings7,
          getBlockOrder: getBlockOrder2,
          getSelectedBlockClientIds: getSelectedBlockClientIds2,
          __unstableGetVisibleBlocks: __unstableGetVisibleBlocks2,
          getTemplateLock: getTemplateLock2,
          getBlockEditingMode: getBlockEditingMode2,
          isSectionBlock: isSectionBlock2,
          isContainerInsertableToInContentOnlyMode: isContainerInsertableToInContentOnlyMode2,
          getBlockName: getBlockName2,
          isZoomOut: _isZoomOut,
          canInsertBlockType: canInsertBlockType2
        } = unlock(select3(store));
        const _order = getBlockOrder2(rootClientId);
        if (getSettings7().isPreviewMode) {
          return {
            order: _order,
            selectedBlocks: EMPTY_ARRAY7,
            visibleBlocks: EMPTY_SET2
          };
        }
        const selectedBlockClientIds = getSelectedBlockClientIds2();
        const selectedBlockClientId = selectedBlockClientIds[0];
        const showRootAppender = !rootClientId && !selectedBlockClientId && (!_order.length || !canInsertBlockType2(
          (0, import_blocks45.getDefaultBlockName)(),
          rootClientId
        ));
        const hasSelectedRoot = !!(rootClientId && selectedBlockClientId && rootClientId === selectedBlockClientId);
        const templateLock = getTemplateLock2(rootClientId);
        return {
          order: _order,
          selectedBlocks: selectedBlockClientIds,
          visibleBlocks: __unstableGetVisibleBlocks2(),
          isZoomOut: _isZoomOut(),
          shouldRenderAppender: (!isSectionBlock2(rootClientId) || isContainerInsertableToInContentOnlyMode2(
            getBlockName2(selectedBlockClientId),
            rootClientId
          )) && getBlockEditingMode2(rootClientId) !== "disabled" && (!templateLock || templateLock === "contentOnly") && hasAppender && !_isZoomOut() && (hasCustomAppender || hasSelectedRoot || showRootAppender)
        };
      },
      [rootClientId, hasAppender, hasCustomAppender]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)(LayoutProvider, { value: layout, children: [
      order.map((clientId) => /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)(
        import_data77.AsyncModeProvider,
        {
          value: (
            // Only provide data asynchronously if the block is
            // not visible and not selected.
            !visibleBlocks.has(clientId) && !selectedBlocks.includes(clientId)
          ),
          children: [
            isZoomOut2 && /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
              ZoomOutSeparator,
              {
                clientId,
                rootClientId,
                position: "top"
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
              block_default2,
              {
                rootClientId,
                clientId
              }
            ),
            isZoomOut2 && /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
              ZoomOutSeparator,
              {
                clientId,
                rootClientId,
                position: "bottom"
              }
            )
          ]
        },
        clientId
      )),
      order.length < 1 && placeholder,
      shouldRenderAppender && /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
        BlockListAppender,
        {
          tagName: __experimentalAppenderTagName,
          rootClientId,
          CustomAppender
        }
      )
    ] });
  }
  function BlockListItems(props) {
    return /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(import_data77.AsyncModeProvider, { value: false, children: /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(Items, { ...props }) });
  }

  // packages/block-editor/build-module/components/block-tools/index.mjs
  var import_data121 = __toESM(require_data(), 1);
  var import_dom29 = __toESM(require_dom(), 1);
  var import_components117 = __toESM(require_components(), 1);
  var import_keyboard_shortcuts10 = __toESM(require_keyboard_shortcuts(), 1);
  var import_element125 = __toESM(require_element(), 1);
  var import_blocks76 = __toESM(require_blocks(), 1);
  var import_a11y12 = __toESM(require_a11y(), 1);
  var import_i18n101 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/components/block-tools/use-block-toolbar-popover-props.mjs
  var import_compose60 = __toESM(require_compose(), 1);
  var import_data82 = __toESM(require_data(), 1);
  var import_dom25 = __toESM(require_dom(), 1);
  var import_element97 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/hooks/position.mjs
  var import_i18n69 = __toESM(require_i18n(), 1);
  var import_blocks47 = __toESM(require_blocks(), 1);
  var import_components75 = __toESM(require_components(), 1);
  var import_compose59 = __toESM(require_compose(), 1);
  var import_data81 = __toESM(require_data(), 1);
  var import_element96 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/inspector-controls/fill.mjs
  var import_components71 = __toESM(require_components(), 1);
  var import_warning5 = __toESM(require_warning(), 1);
  var import_deprecated10 = __toESM(require_deprecated(), 1);
  var import_element92 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/inspector-controls/groups.mjs
  var import_components69 = __toESM(require_components(), 1);
  var InspectorControlsDefault = (0, import_components69.createSlotFill)("InspectorControls");
  var InspectorControlsAdvanced = (0, import_components69.createSlotFill)("InspectorAdvancedControls");
  var InspectorControlsBindings = (0, import_components69.createSlotFill)("InspectorControlsBindings");
  var InspectorControlsBackground = (0, import_components69.createSlotFill)(
    "InspectorControlsBackground"
  );
  var InspectorControlsBorder = (0, import_components69.createSlotFill)("InspectorControlsBorder");
  var InspectorControlsColor = (0, import_components69.createSlotFill)("InspectorControlsColor");
  var InspectorControlsFilter = (0, import_components69.createSlotFill)("InspectorControlsFilter");
  var InspectorControlsDimensions = (0, import_components69.createSlotFill)(
    "InspectorControlsDimensions"
  );
  var InspectorControlsPosition = (0, import_components69.createSlotFill)("InspectorControlsPosition");
  var InspectorControlsTypography = (0, import_components69.createSlotFill)(
    "InspectorControlsTypography"
  );
  var InspectorControlsListView = (0, import_components69.createSlotFill)("InspectorControlsListView");
  var InspectorControlsStyles = (0, import_components69.createSlotFill)("InspectorControlsStyles");
  var InspectorControlsEffects = (0, import_components69.createSlotFill)("InspectorControlsEffects");
  var InspectorControlsContent = (0, import_components69.createSlotFill)("InspectorControlsContent");
  var groups = {
    default: InspectorControlsDefault,
    advanced: InspectorControlsAdvanced,
    background: InspectorControlsBackground,
    bindings: InspectorControlsBindings,
    border: InspectorControlsBorder,
    color: InspectorControlsColor,
    content: InspectorControlsContent,
    dimensions: InspectorControlsDimensions,
    effects: InspectorControlsEffects,
    filter: InspectorControlsFilter,
    list: InspectorControlsListView,
    position: InspectorControlsPosition,
    settings: InspectorControlsDefault,
    // Alias for default.
    styles: InspectorControlsStyles,
    typography: InspectorControlsTypography
  };
  var groups_default = groups;
  var PrivateInspectorControlsAllowedBlocks = (0, import_components69.createSlotFill)(
    /* @__PURE__ */ Symbol("PrivateInspectorControlsAllowedBlocks")
  );

  // packages/block-editor/build-module/components/inspector-controls/list-view-content-popover.mjs
  var import_components70 = __toESM(require_components(), 1);
  var import_element91 = __toESM(require_element(), 1);
  var import_compose57 = __toESM(require_compose(), 1);
  var import_data78 = __toESM(require_data(), 1);
  var import_jsx_runtime210 = __toESM(require_jsx_runtime(), 1);
  var LIST_VIEW_CONTENT_PANEL_SLOT = /* @__PURE__ */ Symbol("ListViewContentPopover");
  var { Fill, Slot: Slot2 } = (0, import_components70.createSlotFill)(LIST_VIEW_CONTENT_PANEL_SLOT);
  function useInspectorPopoverPlacement() {
    const isMobile = (0, import_compose57.useViewportMatch)("medium", "<");
    return !isMobile ? {
      popoverProps: {
        placement: "left-start",
        offset: 35,
        resize: false
      }
    } : {};
  }
  function ListViewContentPopover({ listViewRef }) {
    const { popoverProps: popoverProps3 } = useInspectorPopoverPlacement();
    const fills = (0, import_components70.__experimentalUseSlotFills)(LIST_VIEW_CONTENT_PANEL_SLOT);
    const hasFills = Boolean(fills && fills.length);
    const { selectedClientId, isOpen } = (0, import_data78.useSelect)((select3) => {
      const { getSelectedBlockClientId: getSelectedBlockClientId2 } = select3(store);
      const privateSelectors = unlock(select3(store));
      return {
        selectedClientId: getSelectedBlockClientId2(),
        isOpen: privateSelectors.isListViewContentPanelOpen()
      };
    }, []);
    const [anchorElement, setAnchorElement] = (0, import_element91.useState)(null);
    (0, import_element91.useLayoutEffect)(() => {
      if (!selectedClientId || !listViewRef?.current) {
        setAnchorElement(null);
        return;
      }
      const element = listViewRef.current.querySelector(
        `[data-block="${selectedClientId}"]`
      );
      setAnchorElement(element);
    }, [selectedClientId, listViewRef]);
    const { closeListViewContentPanel: closeListViewContentPanel2 } = unlock(
      (0, import_data78.useDispatch)(store)
    );
    if (!isOpen || !hasFills || !anchorElement) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(
      import_components70.Popover,
      {
        ...popoverProps3 ?? {},
        className: "block-editor-inspector-list-view-content-popover",
        anchor: anchorElement,
        onClose: closeListViewContentPanel2,
        children: /* @__PURE__ */ (0, import_jsx_runtime210.jsx)("div", { style: { width: "280px" }, children: /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(Slot2, {}) })
      }
    );
  }

  // packages/block-editor/build-module/components/inspector-controls/fill.mjs
  var import_jsx_runtime211 = __toESM(require_jsx_runtime(), 1);
  var PATTERN_EDITING_GROUPS = ["content", "list"];
  var TEMPLATE_PART_GROUPS = ["default", "settings", "advanced"];
  function InspectorControlsFill({
    children,
    group = "default",
    __experimentalGroup,
    resetAllFilter
  }) {
    if (__experimentalGroup) {
      (0, import_deprecated10.default)(
        "`__experimentalGroup` property in `InspectorControlsFill`",
        {
          since: "6.2",
          version: "6.4",
          alternative: "`group`"
        }
      );
      group = __experimentalGroup;
    }
    const context = useBlockEditContext();
    const Fill5 = groups_default[group]?.Fill;
    if (!Fill5) {
      (0, import_warning5.default)(`Unknown InspectorControls group "${group}" provided.`);
      return null;
    }
    if (context[mayDisplayPatternEditingControlsKey]) {
      const isTemplatePart9 = context.name === "core/template-part";
      const isTemplatePartGroup = TEMPLATE_PART_GROUPS.includes(group);
      const isPatternEditingGroup = PATTERN_EDITING_GROUPS.includes(group);
      const canShowGroup = isTemplatePart9 && isTemplatePartGroup || isPatternEditingGroup;
      if (!canShowGroup) {
        return null;
      }
    }
    if (!context[mayDisplayPatternEditingControlsKey] && !context[mayDisplayControlsKey]) {
      return null;
    }
    if (group === "content" && !!context[isInListViewBlockSupportTreeKey] && !!context[mayDisplayPatternEditingControlsKey]) {
      if (context[mayDisplayControlsKey]) {
        return /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(import_components71.__experimentalStyleProvider, { document, children: /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(Fill, { children }) });
      }
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(import_components71.__experimentalStyleProvider, { document, children: /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(Fill5, { children: (fillProps) => {
      return /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
        ToolsPanelInspectorControl,
        {
          fillProps,
          children,
          resetAllFilter
        }
      );
    } }) });
  }
  function RegisterResetAll({ resetAllFilter, children }) {
    const { registerResetAllFilter, deregisterResetAllFilter } = (0, import_element92.useContext)(import_components71.__experimentalToolsPanelContext);
    (0, import_element92.useEffect)(() => {
      if (resetAllFilter && registerResetAllFilter && deregisterResetAllFilter) {
        registerResetAllFilter(resetAllFilter);
        return () => {
          deregisterResetAllFilter(resetAllFilter);
        };
      }
    }, [resetAllFilter, registerResetAllFilter, deregisterResetAllFilter]);
    return children;
  }
  function ToolsPanelInspectorControl({ children, resetAllFilter, fillProps }) {
    const { forwardedContext = [] } = fillProps;
    const innerMarkup = /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(RegisterResetAll, { resetAllFilter, children });
    return forwardedContext.reduce(
      (inner, [Provider2, props]) => /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(Provider2, { ...props, children: inner }),
      innerMarkup
    );
  }

  // packages/block-editor/build-module/components/inspector-controls/slot.mjs
  var import_components74 = __toESM(require_components(), 1);
  var import_element95 = __toESM(require_element(), 1);
  var import_warning6 = __toESM(require_warning(), 1);
  var import_deprecated11 = __toESM(require_deprecated(), 1);

  // packages/block-editor/build-module/components/inspector-controls/block-support-tools-panel.mjs
  var import_components72 = __toESM(require_components(), 1);
  var import_data79 = __toESM(require_data(), 1);
  var import_element93 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/global-styles/utils.mjs
  var import_compose58 = __toESM(require_compose(), 1);
  function useToolsPanelDropdownMenuProps() {
    const isMobile = (0, import_compose58.useViewportMatch)("medium", "<");
    return !isMobile ? {
      popoverProps: {
        placement: "left-start",
        // For non-mobile, inner sidebar width (248px) - button width (24px) - border (1px) + padding (16px) + spacing (20px)
        offset: 259
      }
    } : {};
  }
  function scopeSelector(scope, selector3) {
    if (!scope || !selector3) {
      return selector3;
    }
    const scopes = scope.split(",");
    const selectors = selector3.split(",");
    const selectorsScoped = [];
    scopes.forEach((outer) => {
      selectors.forEach((inner) => {
        selectorsScoped.push(`${outer.trim()} ${inner.trim()}`);
      });
    });
    return selectorsScoped.join(", ");
  }

  // packages/block-editor/build-module/components/inspector-controls/block-support-tools-panel.mjs
  var import_jsx_runtime212 = __toESM(require_jsx_runtime(), 1);
  function BlockSupportToolsPanel({ children, group, label }) {
    const { updateBlockAttributes: updateBlockAttributes2 } = (0, import_data79.useDispatch)(store);
    const {
      getBlockAttributes: getBlockAttributes3,
      getMultiSelectedBlockClientIds: getMultiSelectedBlockClientIds2,
      getSelectedBlockClientId: getSelectedBlockClientId2,
      hasMultiSelection: hasMultiSelection2
    } = (0, import_data79.useSelect)(store);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const panelId = getSelectedBlockClientId2();
    const resetAll = (0, import_element93.useCallback)(
      (resetFilters = []) => {
        const newAttributes = {};
        const clientIds = hasMultiSelection2() ? getMultiSelectedBlockClientIds2() : [panelId];
        clientIds.forEach((clientId) => {
          const { style } = getBlockAttributes3(clientId);
          let newBlockAttributes = { style };
          resetFilters.forEach((resetFilter) => {
            newBlockAttributes = {
              ...newBlockAttributes,
              ...resetFilter(newBlockAttributes)
            };
          });
          newBlockAttributes = {
            ...newBlockAttributes,
            style: cleanEmptyObject(newBlockAttributes.style)
          };
          newAttributes[clientId] = newBlockAttributes;
        });
        updateBlockAttributes2(clientIds, newAttributes, true);
      },
      [
        getBlockAttributes3,
        getMultiSelectedBlockClientIds2,
        hasMultiSelection2,
        panelId,
        updateBlockAttributes2
      ]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(
      import_components72.__experimentalToolsPanel,
      {
        className: `${group}-block-support-panel`,
        label,
        resetAll,
        panelId,
        hasInnerWrapper: true,
        shouldRenderPlaceholderItems: true,
        __experimentalFirstVisibleItemClass: "first",
        __experimentalLastVisibleItemClass: "last",
        dropdownMenuProps,
        children
      },
      panelId
    );
  }

  // packages/block-editor/build-module/components/inspector-controls/block-support-slot-container.mjs
  var import_components73 = __toESM(require_components(), 1);
  var import_element94 = __toESM(require_element(), 1);
  var import_jsx_runtime213 = __toESM(require_jsx_runtime(), 1);
  function BlockSupportSlotContainer({
    Slot: Slot10,
    fillProps,
    ...props
  }) {
    const toolsPanelContext = (0, import_element94.useContext)(import_components73.__experimentalToolsPanelContext);
    const computedFillProps = (0, import_element94.useMemo)(
      () => ({
        ...fillProps ?? {},
        forwardedContext: [
          ...fillProps?.forwardedContext ?? [],
          [import_components73.__experimentalToolsPanelContext.Provider, { value: toolsPanelContext }]
        ]
      }),
      [toolsPanelContext, fillProps]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(Slot10, { ...props, fillProps: computedFillProps, bubblesVirtually: true });
  }

  // packages/block-editor/build-module/components/inspector-controls/slot.mjs
  var import_jsx_runtime214 = __toESM(require_jsx_runtime(), 1);
  function InspectorControlsSlot({ __experimentalGroup, group = "default", label, fillProps, ...props }, ref) {
    if (__experimentalGroup) {
      (0, import_deprecated11.default)(
        "`__experimentalGroup` property in `InspectorControlsSlot`",
        {
          since: "6.2",
          version: "6.4",
          alternative: "`group`"
        }
      );
      group = __experimentalGroup;
    }
    const slotFill = groups_default[group];
    const fills = (0, import_components74.__experimentalUseSlotFills)(slotFill?.name);
    if (!slotFill) {
      (0, import_warning6.default)(`Unknown InspectorControls group "${group}" provided.`);
      return null;
    }
    if (!fills?.length) {
      return null;
    }
    const { Slot: Slot10 } = slotFill;
    if (label) {
      return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(BlockSupportToolsPanel, { group, label, children: /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
        BlockSupportSlotContainer,
        {
          ...props,
          fillProps,
          Slot: Slot10
        }
      ) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
      Slot10,
      {
        ...props,
        ref,
        fillProps,
        bubblesVirtually: true
      }
    );
  }
  var slot_default = (0, import_element95.forwardRef)(InspectorControlsSlot);

  // packages/block-editor/build-module/components/inspector-controls/index.mjs
  var import_jsx_runtime215 = __toESM(require_jsx_runtime(), 1);
  var InspectorControls = InspectorControlsFill;
  InspectorControls.Slot = slot_default;
  var InspectorAdvancedControls = (props) => {
    return /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(InspectorControlsFill, { ...props, group: "advanced" });
  };
  InspectorAdvancedControls.Slot = function Slot3(props) {
    return /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(slot_default, { ...props, group: "advanced" });
  };
  InspectorAdvancedControls.slotName = "InspectorAdvancedControls";
  var inspector_controls_default = InspectorControls;

  // packages/block-editor/build-module/components/use-block-display-information/index.mjs
  var import_data80 = __toESM(require_data(), 1);
  var import_blocks46 = __toESM(require_blocks(), 1);
  var import_i18n68 = __toESM(require_i18n(), 1);
  function getPositionTypeLabel(attributes) {
    const positionType = attributes?.style?.position?.type;
    if (positionType === "sticky") {
      return (0, import_i18n68.__)("Sticky");
    }
    if (positionType === "fixed") {
      return (0, import_i18n68.__)("Fixed");
    }
    return null;
  }
  function useBlockDisplayInformation(clientId) {
    return (0, import_data80.useSelect)(
      (select3) => {
        if (!clientId) {
          return null;
        }
        const {
          getBlockName: getBlockName2,
          getBlockAttributes: getBlockAttributes3,
          __experimentalGetParsedPattern: __experimentalGetParsedPattern2
        } = select3(store);
        const { getBlockType: getBlockType27, getActiveBlockVariation } = select3(import_blocks46.store);
        const blockName = getBlockName2(clientId);
        const blockType = getBlockType27(blockName);
        if (!blockType) {
          return null;
        }
        const attributes = getBlockAttributes3(clientId);
        const patternName = attributes?.metadata?.patternName;
        if (patternName) {
          const pattern = __experimentalGetParsedPattern2(patternName);
          const positionLabel2 = getPositionTypeLabel(attributes);
          return {
            isSynced: false,
            title: (0, import_i18n68.__)("Pattern"),
            icon: symbol_default,
            description: pattern?.description || (0, import_i18n68.__)("A block pattern."),
            anchor: attributes?.anchor,
            positionLabel: positionLabel2,
            positionType: attributes?.style?.position?.type,
            name: pattern?.title || attributes?.metadata?.name
          };
        }
        const match2 = getActiveBlockVariation(blockName, attributes);
        const isSynced = (0, import_blocks46.isReusableBlock)(blockType) || (0, import_blocks46.isTemplatePart)(blockType);
        const syncedTitle = isSynced ? (0, import_blocks46.__experimentalGetBlockLabel)(blockType, attributes) : void 0;
        const title = syncedTitle || blockType.title;
        const positionLabel = getPositionTypeLabel(attributes);
        const blockTypeInfo = {
          isSynced,
          title,
          icon: blockType.icon,
          description: blockType.description,
          anchor: attributes?.anchor,
          positionLabel,
          positionType: attributes?.style?.position?.type,
          name: attributes?.metadata?.name
        };
        if (!match2) {
          return blockTypeInfo;
        }
        return {
          isSynced,
          title: match2.title || blockType.title,
          icon: match2.icon || blockType.icon,
          description: match2.description || blockType.description,
          anchor: attributes?.anchor,
          positionLabel,
          positionType: attributes?.style?.position?.type,
          name: attributes?.metadata?.name
        };
      },
      [clientId]
    );
  }

  // packages/block-editor/build-module/hooks/position.mjs
  var import_jsx_runtime216 = __toESM(require_jsx_runtime(), 1);
  var POSITION_SUPPORT_KEY = "position";
  var DEFAULT_OPTION = {
    key: "default",
    value: "",
    name: (0, import_i18n69.__)("Default")
  };
  var STICKY_OPTION = {
    key: "sticky",
    value: "sticky",
    name: (0, import_i18n69._x)("Sticky", "Name for the value of the CSS position property"),
    hint: (0, import_i18n69.__)(
      "The block will stick to the top of the window instead of scrolling."
    )
  };
  var FIXED_OPTION = {
    key: "fixed",
    value: "fixed",
    name: (0, import_i18n69._x)("Fixed", "Name for the value of the CSS position property"),
    hint: (0, import_i18n69.__)("The block will not move when the page is scrolled.")
  };
  var POSITION_SIDES = ["top", "right", "bottom", "left"];
  var VALID_POSITION_TYPES = ["sticky", "fixed"];
  function getPositionCSS({ selector: selector3, style }) {
    let output = "";
    const { type: positionType } = style?.position || {};
    if (!VALID_POSITION_TYPES.includes(positionType)) {
      return output;
    }
    output += `${selector3} {`;
    output += `position: ${positionType};`;
    POSITION_SIDES.forEach((side) => {
      if (style?.position?.[side] !== void 0) {
        output += `${side}: ${style.position[side]};`;
      }
    });
    if (positionType === "sticky" || positionType === "fixed") {
      output += `z-index: 10`;
    }
    output += `}`;
    return output;
  }
  function hasStickyPositionSupport(blockType) {
    const support = (0, import_blocks47.getBlockSupport)(blockType, POSITION_SUPPORT_KEY);
    return !!(true === support || support?.sticky);
  }
  function hasFixedPositionSupport(blockType) {
    const support = (0, import_blocks47.getBlockSupport)(blockType, POSITION_SUPPORT_KEY);
    return !!(true === support || support?.fixed);
  }
  function hasPositionSupport(blockType) {
    const support = (0, import_blocks47.getBlockSupport)(blockType, POSITION_SUPPORT_KEY);
    return !!support;
  }
  function hasStickyOrFixedPositionValue(attributes) {
    const positionType = attributes?.style?.position?.type;
    return positionType === "sticky" || positionType === "fixed";
  }
  function useIsPositionDisabled({ name: blockName } = {}) {
    const [allowFixed, allowSticky] = useSettings(
      "position.fixed",
      "position.sticky"
    );
    const isDisabled = !allowFixed && !allowSticky;
    return !hasPositionSupport(blockName) || isDisabled;
  }
  function PositionPanelPure({
    style = {},
    clientId,
    name: blockName,
    setAttributes
  }) {
    const allowFixed = hasFixedPositionSupport(blockName);
    const allowSticky = hasStickyPositionSupport(blockName);
    const value = style?.position?.type;
    const { firstParentClientId } = (0, import_data81.useSelect)(
      (select3) => {
        const { getBlockParents: getBlockParents2 } = select3(store);
        const parents = getBlockParents2(clientId);
        return { firstParentClientId: parents[parents.length - 1] };
      },
      [clientId]
    );
    const blockInformation = useBlockDisplayInformation(firstParentClientId);
    const stickyHelpText = allowSticky && value === STICKY_OPTION.value && blockInformation ? (0, import_i18n69.sprintf)(
      /* translators: %s: the name of the parent block. */
      (0, import_i18n69.__)(
        "The block will stick to the scrollable area of the parent %s block."
      ),
      blockInformation.title
    ) : null;
    const options = (0, import_element96.useMemo)(() => {
      const availableOptions = [DEFAULT_OPTION];
      if (allowSticky || value === STICKY_OPTION.value) {
        availableOptions.push(STICKY_OPTION);
      }
      if (allowFixed || value === FIXED_OPTION.value) {
        availableOptions.push(FIXED_OPTION);
      }
      return availableOptions;
    }, [allowFixed, allowSticky, value]);
    const onChangeType = (next) => {
      const placementValue = "0px";
      const newStyle = {
        ...style,
        position: {
          ...style?.position,
          type: next,
          top: next === "sticky" || next === "fixed" ? placementValue : void 0
        }
      };
      setAttributes({
        style: cleanEmptyObject(newStyle)
      });
    };
    const selectedOption = value ? options.find((option) => option.value === value) || DEFAULT_OPTION : DEFAULT_OPTION;
    return import_element96.Platform.select({
      web: options.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(inspector_controls_default, { group: "position", children: /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(import_components75.BaseControl, { help: stickyHelpText, children: /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
        import_components75.CustomSelectControl,
        {
          __next40pxDefaultSize: true,
          label: (0, import_i18n69.__)("Position"),
          hideLabelFromVision: true,
          describedBy: (0, import_i18n69.sprintf)(
            // translators: %s: Currently selected position.
            (0, import_i18n69.__)("Currently selected position: %s"),
            selectedOption.name
          ),
          options,
          value: selectedOption,
          onChange: ({ selectedItem }) => {
            onChangeType(selectedItem.value);
          },
          size: "__unstable-large"
        }
      ) }) }) : null,
      native: null
    });
  }
  var position_default = {
    edit: function Edit2(props) {
      const isPositionDisabled = useIsPositionDisabled(props);
      if (isPositionDisabled) {
        return null;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(PositionPanelPure, { ...props });
    },
    useBlockProps: useBlockProps2,
    attributeKeys: ["style"],
    hasSupport(name) {
      return (0, import_blocks47.hasBlockSupport)(name, POSITION_SUPPORT_KEY);
    }
  };
  var POSITION_BLOCK_PROPS_REFERENCE = {};
  function useBlockProps2({ name, style }) {
    const hasPositionBlockSupport = (0, import_blocks47.hasBlockSupport)(
      name,
      POSITION_SUPPORT_KEY
    );
    const isPositionDisabled = useIsPositionDisabled({ name });
    const allowPositionStyles = hasPositionBlockSupport && !isPositionDisabled;
    const id = (0, import_compose59.useInstanceId)(POSITION_BLOCK_PROPS_REFERENCE);
    const positionSelector = `.wp-container-${id}.wp-container-${id}`;
    let css;
    if (allowPositionStyles) {
      css = getPositionCSS({
        selector: positionSelector,
        style
      }) || "";
    }
    const className = clsx_default({
      [`wp-container-${id}`]: allowPositionStyles && !!css,
      // Only attach a container class if there is generated CSS to be attached.
      [`is-position-${style?.position?.type}`]: allowPositionStyles && !!css && !!style?.position?.type
    });
    useStyleOverride({ css });
    return { className };
  }

  // packages/block-editor/build-module/components/block-tools/use-block-toolbar-popover-props.mjs
  var COMMON_PROPS = {
    placement: "top-start"
  };
  var DEFAULT_PROPS2 = {
    ...COMMON_PROPS,
    flip: false,
    shift: true
  };
  var RESTRICTED_HEIGHT_PROPS = {
    ...COMMON_PROPS,
    flip: true,
    shift: false
  };
  function getProps(contentElement, selectedBlockElement, scrollContainer, toolbarHeight, isSticky) {
    if (!contentElement || !selectedBlockElement) {
      return DEFAULT_PROPS2;
    }
    const scrollTop = scrollContainer?.scrollTop || 0;
    const blockRect = getElementBounds(selectedBlockElement);
    const contentRect = contentElement.getBoundingClientRect();
    const topOfContentElementInViewport = scrollTop + contentRect.top;
    const viewportHeight = contentElement.ownerDocument.documentElement.clientHeight;
    const restrictedTopArea = topOfContentElementInViewport + toolbarHeight;
    const hasSpaceForToolbarAbove = blockRect.top > restrictedTopArea;
    const isBlockTallerThanViewport = blockRect.height > viewportHeight - toolbarHeight;
    if (!isSticky && (hasSpaceForToolbarAbove || isBlockTallerThanViewport)) {
      return DEFAULT_PROPS2;
    }
    return RESTRICTED_HEIGHT_PROPS;
  }
  function useBlockToolbarPopoverProps({
    contentElement,
    clientId
  }) {
    const selectedBlockElement = useBlockElement(clientId);
    const [toolbarHeight, setToolbarHeight] = (0, import_element97.useState)(0);
    const { blockIndex, isSticky } = (0, import_data82.useSelect)(
      (select3) => {
        const { getBlockIndex: getBlockIndex2, getBlockAttributes: getBlockAttributes3 } = select3(store);
        return {
          blockIndex: getBlockIndex2(clientId),
          isSticky: hasStickyOrFixedPositionValue(
            getBlockAttributes3(clientId)
          )
        };
      },
      [clientId]
    );
    const scrollContainer = (0, import_element97.useMemo)(() => {
      if (!contentElement) {
        return;
      }
      return (0, import_dom25.getScrollContainer)(contentElement);
    }, [contentElement]);
    const [props, setProps] = (0, import_element97.useState)(
      () => getProps(
        contentElement,
        selectedBlockElement,
        scrollContainer,
        toolbarHeight,
        isSticky
      )
    );
    const popoverRef = (0, import_compose60.useRefEffect)((popoverNode) => {
      setToolbarHeight(popoverNode.offsetHeight);
    }, []);
    const updateProps = (0, import_element97.useCallback)(
      () => setProps(
        getProps(
          contentElement,
          selectedBlockElement,
          scrollContainer,
          toolbarHeight,
          isSticky
        )
      ),
      [contentElement, selectedBlockElement, scrollContainer, toolbarHeight]
    );
    (0, import_element97.useLayoutEffect)(updateProps, [blockIndex, updateProps]);
    (0, import_element97.useLayoutEffect)(() => {
      if (!contentElement || !selectedBlockElement) {
        return;
      }
      const contentView = contentElement?.ownerDocument?.defaultView;
      contentView?.addEventHandler?.("resize", updateProps);
      let resizeObserver;
      const blockView = selectedBlockElement?.ownerDocument?.defaultView;
      if (blockView.ResizeObserver) {
        resizeObserver = new blockView.ResizeObserver(updateProps);
        resizeObserver.observe(selectedBlockElement);
      }
      return () => {
        contentView?.removeEventHandler?.("resize", updateProps);
        if (resizeObserver) {
          resizeObserver.disconnect();
        }
      };
    }, [updateProps, contentElement, selectedBlockElement]);
    return {
      ...props,
      ref: popoverRef
    };
  }

  // packages/block-editor/build-module/components/block-tools/use-selected-block-tool-props.mjs
  var import_data83 = __toESM(require_data(), 1);
  function useSelectedBlockToolProps(clientId) {
    const selectedBlockProps = (0, import_data83.useSelect)(
      (select3) => {
        const {
          getBlockRootClientId: getBlockRootClientId2,
          getBlockParents: getBlockParents2,
          __experimentalGetBlockListSettingsForBlocks: __experimentalGetBlockListSettingsForBlocks2,
          isBlockInsertionPointVisible: isBlockInsertionPointVisible2,
          getBlockInsertionPoint: getBlockInsertionPoint2,
          getBlockOrder: getBlockOrder2,
          hasMultiSelection: hasMultiSelection2,
          getLastMultiSelectedBlockClientId: getLastMultiSelectedBlockClientId2
        } = select3(store);
        const blockParentsClientIds = getBlockParents2(clientId);
        const parentBlockListSettings = __experimentalGetBlockListSettingsForBlocks2(
          blockParentsClientIds
        );
        const capturingClientId = blockParentsClientIds.find(
          (parentClientId) => parentBlockListSettings[parentClientId]?.__experimentalCaptureToolbars
        );
        let isInsertionPointVisible = false;
        if (isBlockInsertionPointVisible2()) {
          const insertionPoint2 = getBlockInsertionPoint2();
          const order = getBlockOrder2(insertionPoint2.rootClientId);
          isInsertionPointVisible = order[insertionPoint2.index] === clientId;
        }
        return {
          capturingClientId,
          isInsertionPointVisible,
          lastClientId: hasMultiSelection2() ? getLastMultiSelectedBlockClientId2() : null,
          rootClientId: getBlockRootClientId2(clientId)
        };
      },
      [clientId]
    );
    return selectedBlockProps;
  }

  // packages/block-editor/build-module/components/block-tools/empty-block-inserter.mjs
  var import_jsx_runtime217 = __toESM(require_jsx_runtime(), 1);
  function EmptyBlockInserter({
    clientId,
    __unstableContentRef
  }) {
    const {
      capturingClientId,
      isInsertionPointVisible,
      lastClientId,
      rootClientId
    } = useSelectedBlockToolProps(clientId);
    const popoverProps3 = useBlockToolbarPopoverProps({
      contentElement: __unstableContentRef?.current,
      clientId
    });
    return /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
      cover_default,
      {
        clientId: capturingClientId || clientId,
        bottomClientId: lastClientId,
        className: clsx_default(
          "block-editor-block-list__block-side-inserter-popover",
          {
            "is-insertion-point-visible": isInsertionPointVisible
          }
        ),
        __unstableContentRef,
        ...popoverProps3,
        children: /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("div", { className: "block-editor-block-list__empty-block-inserter", children: /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
          inserter_default,
          {
            position: "bottom right",
            rootClientId,
            clientId,
            __experimentalIsQuick: true
          }
        ) })
      }
    );
  }

  // packages/block-editor/build-module/components/block-tools/block-toolbar-popover.mjs
  var import_data118 = __toESM(require_data(), 1);
  var import_element123 = __toESM(require_element(), 1);
  var import_keyboard_shortcuts9 = __toESM(require_keyboard_shortcuts(), 1);

  // packages/block-editor/build-module/components/block-toolbar/index.mjs
  var import_i18n99 = __toESM(require_i18n(), 1);
  var import_data117 = __toESM(require_data(), 1);
  var import_element122 = __toESM(require_element(), 1);
  var import_compose67 = __toESM(require_compose(), 1);
  var import_blocks74 = __toESM(require_blocks(), 1);
  var import_components115 = __toESM(require_components(), 1);

  // packages/block-editor/build-module/components/block-mover/index.mjs
  var import_components78 = __toESM(require_components(), 1);
  var import_data86 = __toESM(require_data(), 1);
  var import_i18n72 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/components/block-draggable/index.mjs
  var import_blocks48 = __toESM(require_blocks(), 1);
  var import_components76 = __toESM(require_components(), 1);
  var import_data84 = __toESM(require_data(), 1);
  var import_element99 = __toESM(require_element(), 1);
  var import_compose61 = __toESM(require_compose(), 1);

  // packages/block-editor/build-module/components/block-draggable/use-scroll-when-dragging.mjs
  var import_dom27 = __toESM(require_dom(), 1);
  var import_element98 = __toESM(require_element(), 1);
  var SCROLL_INACTIVE_DISTANCE_PX = 50;
  var SCROLL_INTERVAL_MS = 25;
  var PIXELS_PER_SECOND_PER_PERCENTAGE = 1e3;
  var VELOCITY_MULTIPLIER = PIXELS_PER_SECOND_PER_PERCENTAGE * (SCROLL_INTERVAL_MS / 1e3);
  function useScrollWhenDragging() {
    const dragStartYRef = (0, import_element98.useRef)(null);
    const velocityYRef = (0, import_element98.useRef)(null);
    const scrollParentYRef = (0, import_element98.useRef)(null);
    const scrollEditorIntervalRef = (0, import_element98.useRef)(null);
    (0, import_element98.useEffect)(
      () => () => {
        if (scrollEditorIntervalRef.current) {
          clearInterval(scrollEditorIntervalRef.current);
          scrollEditorIntervalRef.current = null;
        }
      },
      []
    );
    const startScrolling = (0, import_element98.useCallback)((event) => {
      dragStartYRef.current = event.clientY;
      scrollParentYRef.current = (0, import_dom27.getScrollContainer)(event.target);
      scrollEditorIntervalRef.current = setInterval(() => {
        if (scrollParentYRef.current && velocityYRef.current) {
          const newTop = scrollParentYRef.current.scrollTop + velocityYRef.current;
          scrollParentYRef.current.scroll({
            top: newTop
          });
        }
      }, SCROLL_INTERVAL_MS);
    }, []);
    const scrollOnDragOver = (0, import_element98.useCallback)((event) => {
      if (!scrollParentYRef.current) {
        return;
      }
      const scrollParentHeight = scrollParentYRef.current.offsetHeight;
      const offsetDragStartPosition = dragStartYRef.current - scrollParentYRef.current.offsetTop;
      const offsetDragPosition = event.clientY - scrollParentYRef.current.offsetTop;
      if (event.clientY > offsetDragStartPosition) {
        const moveableDistance = Math.max(
          scrollParentHeight - offsetDragStartPosition - SCROLL_INACTIVE_DISTANCE_PX,
          0
        );
        const dragDistance = Math.max(
          offsetDragPosition - offsetDragStartPosition - SCROLL_INACTIVE_DISTANCE_PX,
          0
        );
        const distancePercentage = moveableDistance === 0 || dragDistance === 0 ? 0 : dragDistance / moveableDistance;
        velocityYRef.current = VELOCITY_MULTIPLIER * distancePercentage;
      } else if (event.clientY < offsetDragStartPosition) {
        const moveableDistance = Math.max(
          offsetDragStartPosition - SCROLL_INACTIVE_DISTANCE_PX,
          0
        );
        const dragDistance = Math.max(
          offsetDragStartPosition - offsetDragPosition - SCROLL_INACTIVE_DISTANCE_PX,
          0
        );
        const distancePercentage = moveableDistance === 0 || dragDistance === 0 ? 0 : dragDistance / moveableDistance;
        velocityYRef.current = -VELOCITY_MULTIPLIER * distancePercentage;
      } else {
        velocityYRef.current = 0;
      }
    }, []);
    const stopScrolling = () => {
      dragStartYRef.current = null;
      scrollParentYRef.current = null;
      if (scrollEditorIntervalRef.current) {
        clearInterval(scrollEditorIntervalRef.current);
        scrollEditorIntervalRef.current = null;
      }
    };
    return [startScrolling, scrollOnDragOver, stopScrolling];
  }

  // packages/block-editor/build-module/components/block-draggable/index.mjs
  var import_jsx_runtime218 = __toESM(require_jsx_runtime(), 1);
  var BlockDraggable = ({
    appendToOwnerDocument,
    children,
    clientIds,
    cloneClassname,
    elementId,
    onDragStart,
    onDragEnd,
    fadeWhenDisabled = false,
    dragComponent
  }) => {
    const {
      srcRootClientId,
      isDraggable,
      icon,
      visibleInserter,
      getBlockType: getBlockType27
    } = (0, import_data84.useSelect)(
      (select3) => {
        const {
          canMoveBlocks: canMoveBlocks2,
          getBlockRootClientId: getBlockRootClientId22,
          getBlockName: getBlockName2,
          getBlockAttributes: getBlockAttributes3,
          isBlockInsertionPointVisible: isBlockInsertionPointVisible2
        } = select3(store);
        const { getBlockType: _getBlockType, getActiveBlockVariation } = select3(import_blocks48.store);
        const rootClientId = getBlockRootClientId22(clientIds[0]);
        const blockName = getBlockName2(clientIds[0]);
        const variation = getActiveBlockVariation(
          blockName,
          getBlockAttributes3(clientIds[0])
        );
        return {
          srcRootClientId: rootClientId,
          isDraggable: canMoveBlocks2(clientIds),
          icon: variation?.icon || _getBlockType(blockName)?.icon,
          visibleInserter: isBlockInsertionPointVisible2(),
          getBlockType: _getBlockType
        };
      },
      [clientIds]
    );
    const isDraggingRef = (0, import_element99.useRef)(false);
    const [startScrolling, scrollOnDragOver, stopScrolling] = useScrollWhenDragging();
    const { getAllowedBlocks: getAllowedBlocks2, getBlockNamesByClientId: getBlockNamesByClientId2, getBlockRootClientId: getBlockRootClientId2 } = (0, import_data84.useSelect)(store);
    const { startDraggingBlocks: startDraggingBlocks2, stopDraggingBlocks: stopDraggingBlocks2 } = (0, import_data84.useDispatch)(store);
    (0, import_element99.useEffect)(() => {
      return () => {
        if (isDraggingRef.current) {
          stopDraggingBlocks2();
        }
      };
    }, []);
    const blockEl = useBlockElement(clientIds[0]);
    const editorRoot = blockEl?.closest("body");
    (0, import_element99.useEffect)(() => {
      if (!editorRoot || !fadeWhenDisabled) {
        return;
      }
      const onDragOver = (event) => {
        if (!event.target.closest("[data-block]")) {
          return;
        }
        const draggedBlockNames = getBlockNamesByClientId2(clientIds);
        const targetClientId = event.target.closest("[data-block]").getAttribute("data-block");
        const allowedBlocks = getAllowedBlocks2(targetClientId);
        const targetBlockName = getBlockNamesByClientId2([
          targetClientId
        ])[0];
        let dropTargetValid;
        if (allowedBlocks?.length === 0) {
          const targetRootClientId = getBlockRootClientId2(targetClientId);
          const targetRootBlockName = getBlockNamesByClientId2([
            targetRootClientId
          ])[0];
          const rootAllowedBlocks = getAllowedBlocks2(targetRootClientId);
          dropTargetValid = isDropTargetValid(
            getBlockType27,
            rootAllowedBlocks,
            draggedBlockNames,
            targetRootBlockName
          );
        } else {
          dropTargetValid = isDropTargetValid(
            getBlockType27,
            allowedBlocks,
            draggedBlockNames,
            targetBlockName
          );
        }
        if (!dropTargetValid && !visibleInserter) {
          window?.document?.body?.classList?.add(
            "block-draggable-invalid-drag-token"
          );
        } else {
          window?.document?.body?.classList?.remove(
            "block-draggable-invalid-drag-token"
          );
        }
      };
      const throttledOnDragOver = (0, import_compose61.throttle)(onDragOver, 200);
      editorRoot.addEventListener("dragover", throttledOnDragOver);
      return () => {
        editorRoot.removeEventListener("dragover", throttledOnDragOver);
      };
    }, [
      clientIds,
      editorRoot,
      fadeWhenDisabled,
      getAllowedBlocks2,
      getBlockNamesByClientId2,
      getBlockRootClientId2,
      getBlockType27,
      visibleInserter
    ]);
    if (!isDraggable) {
      return children({ draggable: false });
    }
    const transferData = {
      type: "block",
      srcClientIds: clientIds,
      srcRootClientId
    };
    return /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
      import_components76.Draggable,
      {
        appendToOwnerDocument,
        cloneClassname,
        __experimentalTransferDataType: "wp-blocks",
        transferData,
        onDragStart: (event) => {
          window.requestAnimationFrame(() => {
            startDraggingBlocks2(clientIds);
            isDraggingRef.current = true;
            startScrolling(event);
            if (onDragStart) {
              onDragStart();
            }
          });
        },
        onDragOver: scrollOnDragOver,
        onDragEnd: () => {
          stopDraggingBlocks2();
          isDraggingRef.current = false;
          stopScrolling();
          if (onDragEnd) {
            onDragEnd();
          }
        },
        __experimentalDragComponent: (
          // Check against `undefined` so that `null` can be used to disable
          // the default drag component.
          dragComponent !== void 0 ? dragComponent : /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
            BlockDraggableChip,
            {
              count: clientIds.length,
              icon,
              fadeWhenDisabled: true
            }
          )
        ),
        elementId,
        children: ({ onDraggableStart, onDraggableEnd }) => {
          return children({
            draggable: true,
            onDragStart: onDraggableStart,
            onDragEnd: onDraggableEnd
          });
        }
      }
    );
  };
  var block_draggable_default = BlockDraggable;

  // packages/block-editor/build-module/components/block-mover/button.mjs
  var import_blocks49 = __toESM(require_blocks(), 1);
  var import_components77 = __toESM(require_components(), 1);
  var import_compose62 = __toESM(require_compose(), 1);
  var import_data85 = __toESM(require_data(), 1);
  var import_element100 = __toESM(require_element(), 1);
  var import_i18n71 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/components/block-mover/mover-description.mjs
  var import_i18n70 = __toESM(require_i18n(), 1);
  var getMovementDirection = (moveDirection, orientation) => {
    if (moveDirection === "up") {
      if (orientation === "horizontal") {
        return (0, import_i18n70.isRTL)() ? "right" : "left";
      }
      return "up";
    } else if (moveDirection === "down") {
      if (orientation === "horizontal") {
        return (0, import_i18n70.isRTL)() ? "left" : "right";
      }
      return "down";
    }
    return null;
  };
  function getBlockMoverDescription(selectedCount, type, firstIndex, isFirst, isLast, dir, orientation) {
    const position = firstIndex + 1;
    if (selectedCount > 1) {
      return getMultiBlockMoverDescription(
        selectedCount,
        firstIndex,
        isFirst,
        isLast,
        dir,
        orientation
      );
    }
    if (isFirst && isLast) {
      return (0, import_i18n70.sprintf)(
        // translators: %s: Type of block (i.e. Text, Image etc)
        (0, import_i18n70.__)("Block %s is the only block, and cannot be moved"),
        type
      );
    }
    if (dir > 0 && !isLast) {
      const movementDirection = getMovementDirection("down", orientation);
      if (movementDirection === "down") {
        return (0, import_i18n70.sprintf)(
          // translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
          (0, import_i18n70.__)(
            "Move %1$s block from position %2$d down to position %3$d"
          ),
          type,
          position,
          position + 1
        );
      }
      if (movementDirection === "left") {
        return (0, import_i18n70.sprintf)(
          // translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
          (0, import_i18n70.__)(
            "Move %1$s block from position %2$d left to position %3$d"
          ),
          type,
          position,
          position + 1
        );
      }
      if (movementDirection === "right") {
        return (0, import_i18n70.sprintf)(
          // translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
          (0, import_i18n70.__)(
            "Move %1$s block from position %2$d right to position %3$d"
          ),
          type,
          position,
          position + 1
        );
      }
    }
    if (dir > 0 && isLast) {
      const movementDirection = getMovementDirection("down", orientation);
      if (movementDirection === "down") {
        return (0, import_i18n70.sprintf)(
          // translators: 1: Type of block (i.e. Text, Image etc)
          (0, import_i18n70.__)(
            "Block %1$s is at the end of the content and can\u2019t be moved down"
          ),
          type
        );
      }
      if (movementDirection === "left") {
        return (0, import_i18n70.sprintf)(
          // translators: 1: Type of block (i.e. Text, Image etc)
          (0, import_i18n70.__)(
            "Block %1$s is at the end of the content and can\u2019t be moved left"
          ),
          type
        );
      }
      if (movementDirection === "right") {
        return (0, import_i18n70.sprintf)(
          // translators: 1: Type of block (i.e. Text, Image etc)
          (0, import_i18n70.__)(
            "Block %1$s is at the end of the content and can\u2019t be moved right"
          ),
          type
        );
      }
    }
    if (dir < 0 && !isFirst) {
      const movementDirection = getMovementDirection("up", orientation);
      if (movementDirection === "up") {
        return (0, import_i18n70.sprintf)(
          // translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
          (0, import_i18n70.__)("Move %1$s block from position %2$d up to position %3$d"),
          type,
          position,
          position - 1
        );
      }
      if (movementDirection === "left") {
        return (0, import_i18n70.sprintf)(
          // translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
          (0, import_i18n70.__)(
            "Move %1$s block from position %2$d left to position %3$d"
          ),
          type,
          position,
          position - 1
        );
      }
      if (movementDirection === "right") {
        return (0, import_i18n70.sprintf)(
          // translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
          (0, import_i18n70.__)(
            "Move %1$s block from position %2$d right to position %3$d"
          ),
          type,
          position,
          position - 1
        );
      }
    }
    if (dir < 0 && isFirst) {
      const movementDirection = getMovementDirection("up", orientation);
      if (movementDirection === "up") {
        return (0, import_i18n70.sprintf)(
          // translators: 1: Type of block (i.e. Text, Image etc)
          (0, import_i18n70.__)(
            "Block %1$s is at the beginning of the content and can\u2019t be moved up"
          ),
          type
        );
      }
      if (movementDirection === "left") {
        return (0, import_i18n70.sprintf)(
          // translators: 1: Type of block (i.e. Text, Image etc)
          (0, import_i18n70.__)(
            "Block %1$s is at the beginning of the content and can\u2019t be moved left"
          ),
          type
        );
      }
      if (movementDirection === "right") {
        return (0, import_i18n70.sprintf)(
          // translators: 1: Type of block (i.e. Text, Image etc)
          (0, import_i18n70.__)(
            "Block %1$s is at the beginning of the content and can\u2019t be moved right"
          ),
          type
        );
      }
    }
  }
  function getMultiBlockMoverDescription(selectedCount, firstIndex, isFirst, isLast, dir, orientation) {
    const position = firstIndex + 1;
    if (isFirst && isLast) {
      return (0, import_i18n70.__)("All blocks are selected, and cannot be moved");
    }
    if (dir > 0 && !isLast) {
      const movementDirection = getMovementDirection("down", orientation);
      if (movementDirection === "down") {
        return (0, import_i18n70.sprintf)(
          // translators: 1: Number of selected blocks, 2: Position of selected blocks
          (0, import_i18n70.__)("Move %1$d blocks from position %2$d down by one place"),
          selectedCount,
          position
        );
      }
      if (movementDirection === "left") {
        return (0, import_i18n70.sprintf)(
          // translators: 1: Number of selected blocks, 2: Position of selected blocks
          (0, import_i18n70.__)("Move %1$d blocks from position %2$d left by one place"),
          selectedCount,
          position
        );
      }
      if (movementDirection === "right") {
        return (0, import_i18n70.sprintf)(
          // translators: 1: Number of selected blocks, 2: Position of selected blocks
          (0, import_i18n70.__)("Move %1$d blocks from position %2$d right by one place"),
          selectedCount,
          position
        );
      }
    }
    if (dir > 0 && isLast) {
      const movementDirection = getMovementDirection("down", orientation);
      if (movementDirection === "down") {
        return (0, import_i18n70.__)(
          "Blocks cannot be moved down as they are already at the bottom"
        );
      }
      if (movementDirection === "left") {
        return (0, import_i18n70.__)(
          "Blocks cannot be moved left as they are already are at the leftmost position"
        );
      }
      if (movementDirection === "right") {
        return (0, import_i18n70.__)(
          "Blocks cannot be moved right as they are already are at the rightmost position"
        );
      }
    }
    if (dir < 0 && !isFirst) {
      const movementDirection = getMovementDirection("up", orientation);
      if (movementDirection === "up") {
        return (0, import_i18n70.sprintf)(
          // translators: 1: Number of selected blocks, 2: Position of selected blocks
          (0, import_i18n70.__)("Move %1$d blocks from position %2$d up by one place"),
          selectedCount,
          position
        );
      }
      if (movementDirection === "left") {
        return (0, import_i18n70.sprintf)(
          // translators: 1: Number of selected blocks, 2: Position of selected blocks
          (0, import_i18n70.__)("Move %1$d blocks from position %2$d left by one place"),
          selectedCount,
          position
        );
      }
      if (movementDirection === "right") {
        return (0, import_i18n70.sprintf)(
          // translators: 1: Number of selected blocks, 2: Position of selected blocks
          (0, import_i18n70.__)("Move %1$d blocks from position %2$d right by one place"),
          selectedCount,
          position
        );
      }
    }
    if (dir < 0 && isFirst) {
      const movementDirection = getMovementDirection("up", orientation);
      if (movementDirection === "up") {
        return (0, import_i18n70.__)(
          "Blocks cannot be moved up as they are already at the top"
        );
      }
      if (movementDirection === "left") {
        return (0, import_i18n70.__)(
          "Blocks cannot be moved left as they are already are at the leftmost position"
        );
      }
      if (movementDirection === "right") {
        return (0, import_i18n70.__)(
          "Blocks cannot be moved right as they are already are at the rightmost position"
        );
      }
    }
  }

  // packages/block-editor/build-module/components/block-mover/button.mjs
  var import_jsx_runtime219 = __toESM(require_jsx_runtime(), 1);
  var getArrowIcon = (direction, orientation) => {
    if (direction === "up") {
      if (orientation === "horizontal") {
        return (0, import_i18n71.isRTL)() ? chevron_right_default : chevron_left_default;
      }
      return chevron_up_default;
    } else if (direction === "down") {
      if (orientation === "horizontal") {
        return (0, import_i18n71.isRTL)() ? chevron_left_default : chevron_right_default;
      }
      return chevron_down_default;
    }
    return null;
  };
  var getMovementDirectionLabel = (moveDirection, orientation) => {
    if (moveDirection === "up") {
      if (orientation === "horizontal") {
        return (0, import_i18n71.isRTL)() ? (0, import_i18n71.__)("Move right") : (0, import_i18n71.__)("Move left");
      }
      return (0, import_i18n71.__)("Move up");
    } else if (moveDirection === "down") {
      if (orientation === "horizontal") {
        return (0, import_i18n71.isRTL)() ? (0, import_i18n71.__)("Move left") : (0, import_i18n71.__)("Move right");
      }
      return (0, import_i18n71.__)("Move down");
    }
    return null;
  };
  var BlockMoverButton = (0, import_element100.forwardRef)(
    ({ clientIds, direction, orientation: moverOrientation, ...props }, ref) => {
      const instanceId = (0, import_compose62.useInstanceId)(BlockMoverButton);
      const normalizedClientIds = Array.isArray(clientIds) ? clientIds : [clientIds];
      const blocksCount = normalizedClientIds.length;
      const { disabled } = props;
      const {
        blockType,
        isDisabled,
        rootClientId,
        isFirst,
        isLast,
        firstIndex,
        orientation = "vertical"
      } = (0, import_data85.useSelect)(
        (select3) => {
          const {
            getBlockIndex: getBlockIndex2,
            getBlockRootClientId: getBlockRootClientId2,
            getBlockOrder: getBlockOrder2,
            getBlock: getBlock2,
            getBlockListSettings: getBlockListSettings2
          } = select3(store);
          const firstClientId = normalizedClientIds[0];
          const blockRootClientId = getBlockRootClientId2(firstClientId);
          const firstBlockIndex = getBlockIndex2(firstClientId);
          const lastBlockIndex = getBlockIndex2(
            normalizedClientIds[normalizedClientIds.length - 1]
          );
          const blockOrder = getBlockOrder2(blockRootClientId);
          const block = getBlock2(firstClientId);
          const isFirstBlock = firstBlockIndex === 0;
          const isLastBlock = lastBlockIndex === blockOrder.length - 1;
          const { orientation: blockListOrientation } = getBlockListSettings2(blockRootClientId) || {};
          return {
            blockType: block ? (0, import_blocks49.getBlockType)(block.name) : null,
            isDisabled: disabled || (direction === "up" ? isFirstBlock : isLastBlock),
            rootClientId: blockRootClientId,
            firstIndex: firstBlockIndex,
            isFirst: isFirstBlock,
            isLast: isLastBlock,
            orientation: moverOrientation || blockListOrientation
          };
        },
        [clientIds, direction]
      );
      const { moveBlocksDown: moveBlocksDown2, moveBlocksUp: moveBlocksUp2 } = (0, import_data85.useDispatch)(store);
      const moverFunction = direction === "up" ? moveBlocksUp2 : moveBlocksDown2;
      const onClick = (event) => {
        moverFunction(clientIds, rootClientId);
        if (props.onClick) {
          props.onClick(event);
        }
      };
      const descriptionId = `block-editor-block-mover-button__description-${instanceId}`;
      return /* @__PURE__ */ (0, import_jsx_runtime219.jsxs)(import_jsx_runtime219.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
          import_components77.Button,
          {
            __next40pxDefaultSize: true,
            ref,
            className: clsx_default(
              "block-editor-block-mover-button",
              `is-${direction}-button`
            ),
            icon: getArrowIcon(direction, orientation),
            label: getMovementDirectionLabel(
              direction,
              orientation
            ),
            "aria-describedby": descriptionId,
            ...props,
            onClick: isDisabled ? null : onClick,
            disabled: isDisabled,
            accessibleWhenDisabled: true
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(import_components77.VisuallyHidden, { id: descriptionId, children: getBlockMoverDescription(
          blocksCount,
          blockType && blockType.title,
          firstIndex,
          isFirst,
          isLast,
          direction === "up" ? -1 : 1,
          orientation
        ) })
      ] });
    }
  );
  var BlockMoverUpButton = (0, import_element100.forwardRef)((props, ref) => {
    return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(BlockMoverButton, { direction: "up", ref, ...props });
  });
  var BlockMoverDownButton = (0, import_element100.forwardRef)((props, ref) => {
    return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(BlockMoverButton, { direction: "down", ref, ...props });
  });

  // packages/block-editor/build-module/components/block-mover/index.mjs
  var import_jsx_runtime220 = __toESM(require_jsx_runtime(), 1);
  function BlockMover({
    clientIds,
    hideDragHandle,
    isBlockMoverUpButtonDisabled,
    isBlockMoverDownButtonDisabled
  }) {
    const {
      canMove,
      rootClientId,
      isFirst,
      isLast,
      orientation,
      isManualGrid
    } = (0, import_data86.useSelect)(
      (select3) => {
        const {
          getBlockIndex: getBlockIndex2,
          getBlockListSettings: getBlockListSettings2,
          canMoveBlocks: canMoveBlocks2,
          getBlockOrder: getBlockOrder2,
          getBlockRootClientId: getBlockRootClientId2,
          getBlockAttributes: getBlockAttributes3
        } = select3(store);
        const normalizedClientIds = Array.isArray(clientIds) ? clientIds : [clientIds];
        const firstClientId = normalizedClientIds[0];
        const _rootClientId = getBlockRootClientId2(firstClientId);
        const firstIndex = getBlockIndex2(firstClientId);
        const lastIndex = getBlockIndex2(
          normalizedClientIds[normalizedClientIds.length - 1]
        );
        const blockOrder = getBlockOrder2(_rootClientId);
        const { layout = {} } = getBlockAttributes3(_rootClientId) ?? {};
        return {
          canMove: canMoveBlocks2(clientIds),
          rootClientId: _rootClientId,
          isFirst: firstIndex === 0,
          isLast: lastIndex === blockOrder.length - 1,
          orientation: getBlockListSettings2(_rootClientId)?.orientation,
          isManualGrid: layout.type === "grid" && layout.isManualPlacement && window.__experimentalEnableGridInteractivity
        };
      },
      [clientIds]
    );
    if (!canMove || isFirst && isLast && !rootClientId || hideDragHandle && isManualGrid) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime220.jsxs)(
      import_components78.ToolbarGroup,
      {
        className: clsx_default("block-editor-block-mover", {
          "is-horizontal": orientation === "horizontal"
        }),
        children: [
          !hideDragHandle && /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(block_draggable_default, { clientIds, fadeWhenDisabled: true, children: (draggableProps) => /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
            import_components78.Button,
            {
              __next40pxDefaultSize: true,
              icon: drag_handle_default,
              className: "block-editor-block-mover__drag-handle",
              label: (0, import_i18n72.__)("Drag"),
              tabIndex: "-1",
              ...draggableProps
            }
          ) }),
          !isManualGrid && /* @__PURE__ */ (0, import_jsx_runtime220.jsxs)("div", { className: "block-editor-block-mover__move-button-container", children: [
            /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(import_components78.ToolbarItem, { children: (itemProps) => /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
              BlockMoverUpButton,
              {
                disabled: isBlockMoverUpButtonDisabled,
                clientIds,
                ...itemProps
              }
            ) }),
            /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(import_components78.ToolbarItem, { children: (itemProps) => /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
              BlockMoverDownButton,
              {
                disabled: isBlockMoverDownButtonDisabled,
                clientIds,
                ...itemProps
              }
            ) })
          ] })
        ]
      }
    );
  }
  var block_mover_default = BlockMover;

  // packages/block-editor/build-module/components/block-parent-selector/index.mjs
  var import_components79 = __toESM(require_components(), 1);
  var import_data88 = __toESM(require_data(), 1);
  var import_i18n73 = __toESM(require_i18n(), 1);
  var import_element102 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/block-toolbar/utils.mjs
  var import_data87 = __toESM(require_data(), 1);
  var import_element101 = __toESM(require_element(), 1);
  var { clearTimeout: clearTimeout2, setTimeout: setTimeout2 } = window;
  var DEBOUNCE_TIMEOUT = 200;
  function useDebouncedShowGestures({
    ref,
    isFocused,
    highlightParent,
    debounceTimeout = DEBOUNCE_TIMEOUT
  }) {
    const { getSelectedBlockClientId: getSelectedBlockClientId2, getBlockRootClientId: getBlockRootClientId2 } = (0, import_data87.useSelect)(store);
    const { toggleBlockHighlight: toggleBlockHighlight2 } = (0, import_data87.useDispatch)(store);
    const timeoutRef = (0, import_element101.useRef)();
    const isDistractionFree = (0, import_data87.useSelect)(
      (select3) => select3(store).getSettings().isDistractionFree,
      []
    );
    const handleOnChange = (nextIsFocused) => {
      if (nextIsFocused && isDistractionFree) {
        return;
      }
      const selectedBlockClientId = getSelectedBlockClientId2();
      const clientId = highlightParent ? getBlockRootClientId2(selectedBlockClientId) : selectedBlockClientId;
      toggleBlockHighlight2(clientId, nextIsFocused);
    };
    const getIsHovered = () => {
      return ref?.current && ref.current.matches(":hover");
    };
    const shouldHideGestures = () => {
      const isHovered = getIsHovered();
      return !isFocused && !isHovered;
    };
    const clearTimeoutRef = () => {
      const timeout = timeoutRef.current;
      if (timeout && clearTimeout2) {
        clearTimeout2(timeout);
      }
    };
    const debouncedShowGestures = (event) => {
      if (event) {
        event.stopPropagation();
      }
      clearTimeoutRef();
      handleOnChange(true);
    };
    const debouncedHideGestures = (event) => {
      if (event) {
        event.stopPropagation();
      }
      clearTimeoutRef();
      timeoutRef.current = setTimeout2(() => {
        if (shouldHideGestures()) {
          handleOnChange(false);
        }
      }, debounceTimeout);
    };
    (0, import_element101.useEffect)(
      () => () => {
        handleOnChange(false);
        clearTimeoutRef();
      },
      []
    );
    return {
      debouncedShowGestures,
      debouncedHideGestures
    };
  }
  function useShowHoveredOrFocusedGestures({
    ref,
    highlightParent = false,
    debounceTimeout = DEBOUNCE_TIMEOUT
  }) {
    const [isFocused, setIsFocused] = (0, import_element101.useState)(false);
    const { debouncedShowGestures, debouncedHideGestures } = useDebouncedShowGestures({
      ref,
      debounceTimeout,
      isFocused,
      highlightParent
    });
    const registerRef = (0, import_element101.useRef)(false);
    const isFocusedWithin = () => {
      return ref?.current && ref.current.contains(ref.current.ownerDocument.activeElement);
    };
    (0, import_element101.useEffect)(() => {
      const node = ref.current;
      const handleOnFocus = () => {
        if (isFocusedWithin()) {
          setIsFocused(true);
          debouncedShowGestures();
        }
      };
      const handleOnBlur = () => {
        if (!isFocusedWithin()) {
          setIsFocused(false);
          debouncedHideGestures();
        }
      };
      if (node && !registerRef.current) {
        node.addEventListener("focus", handleOnFocus, true);
        node.addEventListener("blur", handleOnBlur, true);
        registerRef.current = true;
      }
      return () => {
        if (node) {
          node.removeEventListener("focus", handleOnFocus);
          node.removeEventListener("blur", handleOnBlur);
        }
      };
    }, [
      ref,
      registerRef,
      setIsFocused,
      debouncedShowGestures,
      debouncedHideGestures
    ]);
    return {
      onMouseMove: debouncedShowGestures,
      onMouseLeave: debouncedHideGestures
    };
  }

  // packages/block-editor/build-module/components/block-parent-selector/index.mjs
  var import_jsx_runtime221 = __toESM(require_jsx_runtime(), 1);
  function BlockParentSelector() {
    const { selectBlock: selectBlock2 } = (0, import_data88.useDispatch)(store);
    const { parentClientId } = (0, import_data88.useSelect)((select3) => {
      const {
        getBlockParents: getBlockParents2,
        getSelectedBlockClientId: getSelectedBlockClientId2,
        getParentSectionBlock: getParentSectionBlock2
      } = unlock(select3(store));
      const selectedBlockClientId = getSelectedBlockClientId2();
      const parentSection = getParentSectionBlock2(selectedBlockClientId);
      const parents = getBlockParents2(selectedBlockClientId);
      const _parentClientId = parentSection ?? parents[parents.length - 1];
      return {
        parentClientId: _parentClientId
      };
    }, []);
    const blockInformation = useBlockDisplayInformation(parentClientId);
    const nodeRef = (0, import_element102.useRef)();
    const showHoveredOrFocusedGestures = useShowHoveredOrFocusedGestures({
      ref: nodeRef,
      highlightParent: true
    });
    return /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
      "div",
      {
        className: "block-editor-block-parent-selector",
        ref: nodeRef,
        ...showHoveredOrFocusedGestures,
        children: /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
          import_components79.ToolbarButton,
          {
            className: "block-editor-block-parent-selector__button",
            onClick: () => selectBlock2(parentClientId),
            label: (0, import_i18n73.sprintf)(
              /* translators: %s: Name of the block's parent. */
              (0, import_i18n73.__)("Select parent block: %s"),
              blockInformation?.title
            ),
            showTooltip: true,
            icon: /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(block_icon_default, { icon: blockInformation?.icon })
          }
        )
      },
      parentClientId
    );
  }

  // packages/block-editor/build-module/components/block-controls/fill.mjs
  var import_components81 = __toESM(require_components(), 1);

  // packages/block-editor/build-module/components/block-controls/groups.mjs
  var import_components80 = __toESM(require_components(), 1);
  var BlockControlsDefault = (0, import_components80.createSlotFill)("BlockControls");
  var BlockControlsBlock = (0, import_components80.createSlotFill)("BlockControlsBlock");
  var BlockControlsInline = (0, import_components80.createSlotFill)("BlockFormatControls");
  var BlockControlsOther = (0, import_components80.createSlotFill)("BlockControlsOther");
  var BlockControlsParent = (0, import_components80.createSlotFill)("BlockControlsParent");
  var groups2 = {
    default: BlockControlsDefault,
    block: BlockControlsBlock,
    inline: BlockControlsInline,
    other: BlockControlsOther,
    parent: BlockControlsParent
  };
  var groups_default2 = groups2;

  // packages/block-editor/build-module/components/block-controls/hook.mjs
  function useBlockControlsFill(group, shareWithChildBlocks) {
    const context = useBlockEditContext();
    if (context[mayDisplayControlsKey]) {
      return groups_default2[group]?.Fill;
    }
    if (context[mayDisplayParentControlsKey] && shareWithChildBlocks) {
      return groups_default2.parent.Fill;
    }
    return null;
  }

  // packages/block-editor/build-module/components/block-controls/fill.mjs
  var import_jsx_runtime222 = __toESM(require_jsx_runtime(), 1);
  function BlockControlsFill({
    group = "default",
    controls,
    children,
    __experimentalShareWithChildBlocks = false
  }) {
    const Fill5 = useBlockControlsFill(
      group,
      __experimentalShareWithChildBlocks
    );
    if (!Fill5) {
      return null;
    }
    const innerMarkup = /* @__PURE__ */ (0, import_jsx_runtime222.jsxs)(import_jsx_runtime222.Fragment, { children: [
      group === "default" && /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(import_components81.ToolbarGroup, { controls }),
      children
    ] });
    return /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(import_components81.__experimentalStyleProvider, { document, children: /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(Fill5, { children: (fillProps) => {
      const { forwardedContext = [] } = fillProps;
      return forwardedContext.reduce(
        (inner, [Provider2, props]) => /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(Provider2, { ...props, children: inner }),
        innerMarkup
      );
    } }) });
  }

  // packages/block-editor/build-module/components/block-controls/slot.mjs
  var import_element103 = __toESM(require_element(), 1);
  var import_components82 = __toESM(require_components(), 1);
  var import_warning7 = __toESM(require_warning(), 1);
  var import_jsx_runtime223 = __toESM(require_jsx_runtime(), 1);
  var { ComponentsContext } = unlock(import_components82.privateApis);
  function BlockControlsSlot({ group = "default", ...props }) {
    const toolbarState = (0, import_element103.useContext)(import_components82.__experimentalToolbarContext);
    const contextState = (0, import_element103.useContext)(ComponentsContext);
    const fillProps = (0, import_element103.useMemo)(
      () => ({
        forwardedContext: [
          [import_components82.__experimentalToolbarContext.Provider, { value: toolbarState }],
          [ComponentsContext.Provider, { value: contextState }]
        ]
      }),
      [toolbarState, contextState]
    );
    const slotFill = groups_default2[group];
    const fills = (0, import_components82.__experimentalUseSlotFills)(slotFill.name);
    if (!slotFill) {
      (0, import_warning7.default)(`Unknown BlockControls group "${group}" provided.`);
      return null;
    }
    if (!fills?.length) {
      return null;
    }
    const { Slot: Slot10 } = slotFill;
    const slot = /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(Slot10, { ...props, bubblesVirtually: true, fillProps });
    if (group === "default") {
      return slot;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(import_components82.ToolbarGroup, { children: slot });
  }

  // packages/block-editor/build-module/components/block-controls/index.mjs
  var import_jsx_runtime224 = __toESM(require_jsx_runtime(), 1);
  var BlockControls = BlockControlsFill;
  BlockControls.Slot = BlockControlsSlot;
  var BlockFormatControls = (props) => {
    return /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(BlockControlsFill, { group: "inline", ...props });
  };
  BlockFormatControls.Slot = function Slot4(props) {
    return /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(BlockControlsSlot, { group: "inline", ...props });
  };
  var block_controls_default = BlockControls;

  // packages/block-editor/build-module/components/block-toolbar/block-toolbar-last-item.mjs
  var import_components83 = __toESM(require_components(), 1);
  var { Fill: __unstableBlockToolbarLastItem, Slot: Slot5 } = (0, import_components83.createSlotFill)(
    "__unstableBlockToolbarLastItem"
  );
  __unstableBlockToolbarLastItem.Slot = Slot5;
  var block_toolbar_last_item_default = __unstableBlockToolbarLastItem;

  // packages/block-editor/build-module/components/block-settings-menu/index.mjs
  var import_components99 = __toESM(require_components(), 1);

  // packages/block-editor/build-module/components/block-settings-menu/block-settings-dropdown.mjs
  var import_blocks61 = __toESM(require_blocks(), 1);
  var import_components97 = __toESM(require_components(), 1);
  var import_data102 = __toESM(require_data(), 1);
  var import_element112 = __toESM(require_element(), 1);
  var import_i18n85 = __toESM(require_i18n(), 1);
  var import_keyboard_shortcuts7 = __toESM(require_keyboard_shortcuts(), 1);
  var import_compose64 = __toESM(require_compose(), 1);

  // packages/block-editor/build-module/components/block-actions/index.mjs
  var import_data90 = __toESM(require_data(), 1);
  var import_blocks52 = __toESM(require_blocks(), 1);

  // packages/block-editor/build-module/components/use-paste-styles/index.mjs
  var import_element105 = __toESM(require_element(), 1);
  var import_blocks51 = __toESM(require_blocks(), 1);
  var import_data89 = __toESM(require_data(), 1);
  var import_notices7 = __toESM(require_notices(), 1);
  var import_i18n74 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/hooks/supports.mjs
  var import_blocks50 = __toESM(require_blocks(), 1);
  var import_element104 = __toESM(require_element(), 1);
  var ALIGN_SUPPORT_KEY = "align";
  var BORDER_SUPPORT_KEY = "__experimentalBorder";
  var COLOR_SUPPORT_KEY = "color";
  var CUSTOM_CLASS_NAME_SUPPORT_KEY = "customClassName";
  var FONT_FAMILY_SUPPORT_KEY = "typography.__experimentalFontFamily";
  var FONT_SIZE_SUPPORT_KEY = "typography.fontSize";
  var LINE_HEIGHT_SUPPORT_KEY = "typography.lineHeight";
  var FONT_STYLE_SUPPORT_KEY = "typography.__experimentalFontStyle";
  var FONT_WEIGHT_SUPPORT_KEY = "typography.__experimentalFontWeight";
  var TEXT_ALIGN_SUPPORT_KEY = "typography.textAlign";
  var TEXT_COLUMNS_SUPPORT_KEY = "typography.textColumns";
  var TEXT_DECORATION_SUPPORT_KEY = "typography.__experimentalTextDecoration";
  var WRITING_MODE_SUPPORT_KEY = "typography.__experimentalWritingMode";
  var TEXT_TRANSFORM_SUPPORT_KEY = "typography.__experimentalTextTransform";
  var LETTER_SPACING_SUPPORT_KEY = "typography.__experimentalLetterSpacing";
  var LAYOUT_SUPPORT_KEY = "layout";
  var TYPOGRAPHY_SUPPORT_KEYS = [
    LINE_HEIGHT_SUPPORT_KEY,
    FONT_SIZE_SUPPORT_KEY,
    FONT_STYLE_SUPPORT_KEY,
    FONT_WEIGHT_SUPPORT_KEY,
    FONT_FAMILY_SUPPORT_KEY,
    TEXT_ALIGN_SUPPORT_KEY,
    TEXT_COLUMNS_SUPPORT_KEY,
    TEXT_DECORATION_SUPPORT_KEY,
    TEXT_TRANSFORM_SUPPORT_KEY,
    WRITING_MODE_SUPPORT_KEY,
    LETTER_SPACING_SUPPORT_KEY
  ];
  var EFFECTS_SUPPORT_KEYS = ["shadow"];
  var SPACING_SUPPORT_KEY = "spacing";
  var styleSupportKeys = [
    ...EFFECTS_SUPPORT_KEYS,
    ...TYPOGRAPHY_SUPPORT_KEYS,
    BORDER_SUPPORT_KEY,
    COLOR_SUPPORT_KEY,
    SPACING_SUPPORT_KEY
  ];
  var hasAlignSupport = (nameOrType) => (0, import_blocks50.hasBlockSupport)(nameOrType, ALIGN_SUPPORT_KEY);
  function hasBorderSupport(nameOrType, feature = "any") {
    if (import_element104.Platform.OS !== "web") {
      return false;
    }
    const support = (0, import_blocks50.getBlockSupport)(nameOrType, BORDER_SUPPORT_KEY);
    if (support === true) {
      return true;
    }
    if (feature === "any") {
      return !!(support?.color || support?.radius || support?.width || support?.style);
    }
    return !!support?.[feature];
  }
  var hasGradientSupport = (nameOrType) => {
    const colorSupport = (0, import_blocks50.getBlockSupport)(nameOrType, COLOR_SUPPORT_KEY);
    return colorSupport !== null && typeof colorSupport === "object" && !!colorSupport.gradients;
  };
  var hasBackgroundColorSupport = (nameOrType) => {
    const colorSupport = (0, import_blocks50.getBlockSupport)(nameOrType, COLOR_SUPPORT_KEY);
    return colorSupport && colorSupport.background !== false;
  };
  var hasTextAlignSupport = (nameOrType) => (0, import_blocks50.hasBlockSupport)(nameOrType, TEXT_ALIGN_SUPPORT_KEY);
  var hasTextColorSupport = (nameOrType) => {
    const colorSupport = (0, import_blocks50.getBlockSupport)(nameOrType, COLOR_SUPPORT_KEY);
    return colorSupport && colorSupport.text !== false;
  };
  var hasCustomClassNameSupport = (nameOrType) => (0, import_blocks50.hasBlockSupport)(nameOrType, CUSTOM_CLASS_NAME_SUPPORT_KEY, true);
  var hasFontFamilySupport = (nameOrType) => (0, import_blocks50.hasBlockSupport)(nameOrType, FONT_FAMILY_SUPPORT_KEY);
  var hasFontSizeSupport = (nameOrType) => (0, import_blocks50.hasBlockSupport)(nameOrType, FONT_SIZE_SUPPORT_KEY);
  var hasLayoutSupport = (nameOrType) => (0, import_blocks50.hasBlockSupport)(nameOrType, LAYOUT_SUPPORT_KEY);
  var hasStyleSupport = (nameOrType) => styleSupportKeys.some((key) => (0, import_blocks50.hasBlockSupport)(nameOrType, key));

  // packages/block-editor/build-module/components/use-paste-styles/index.mjs
  function hasSerializedBlocks(text) {
    try {
      const blocks2 = (0, import_blocks51.parse)(text, {
        __unstableSkipMigrationLogs: true,
        __unstableSkipAutop: true
      });
      if (blocks2.length === 1 && blocks2[0].name === "core/freeform") {
        return false;
      }
      return true;
    } catch (err) {
      return false;
    }
  }
  var STYLE_ATTRIBUTES = {
    align: hasAlignSupport,
    borderColor: (nameOrType) => hasBorderSupport(nameOrType, "color"),
    backgroundColor: hasBackgroundColorSupport,
    textAlign: hasTextAlignSupport,
    textColor: hasTextColorSupport,
    gradient: hasGradientSupport,
    className: hasCustomClassNameSupport,
    fontFamily: hasFontFamilySupport,
    fontSize: hasFontSizeSupport,
    layout: hasLayoutSupport,
    style: hasStyleSupport
  };
  function getStyleAttributes(sourceBlock, targetBlock) {
    return Object.entries(STYLE_ATTRIBUTES).reduce(
      (attributes, [attributeKey, hasSupport]) => {
        if (hasSupport(sourceBlock.name) && hasSupport(targetBlock.name)) {
          attributes[attributeKey] = sourceBlock.attributes[attributeKey];
        }
        return attributes;
      },
      {}
    );
  }
  function recursivelyUpdateBlockAttributes(targetBlocks, sourceBlocks, updateBlockAttributes2) {
    for (let index = 0; index < Math.min(sourceBlocks.length, targetBlocks.length); index += 1) {
      updateBlockAttributes2(
        targetBlocks[index].clientId,
        getStyleAttributes(sourceBlocks[index], targetBlocks[index])
      );
      recursivelyUpdateBlockAttributes(
        targetBlocks[index].innerBlocks,
        sourceBlocks[index].innerBlocks,
        updateBlockAttributes2
      );
    }
  }
  function usePasteStyles() {
    const registry = (0, import_data89.useRegistry)();
    const { updateBlockAttributes: updateBlockAttributes2 } = (0, import_data89.useDispatch)(store);
    const { createSuccessNotice, createWarningNotice, createErrorNotice } = (0, import_data89.useDispatch)(import_notices7.store);
    return (0, import_element105.useCallback)(
      async (targetBlocks) => {
        let html = "";
        try {
          if (!window.navigator.clipboard) {
            createErrorNotice(
              (0, import_i18n74.__)(
                "Unable to paste styles. This feature is only available on secure (https) sites in supporting browsers."
              ),
              { type: "snackbar" }
            );
            return;
          }
          html = await window.navigator.clipboard.readText();
        } catch (error) {
          createErrorNotice(
            (0, import_i18n74.__)(
              "Unable to paste styles. Please allow browser clipboard permissions before continuing."
            ),
            {
              type: "snackbar"
            }
          );
          return;
        }
        if (!html || !hasSerializedBlocks(html)) {
          createWarningNotice(
            (0, import_i18n74.__)(
              "Unable to paste styles. Block styles couldn't be found within the copied content."
            ),
            {
              type: "snackbar"
            }
          );
          return;
        }
        const copiedBlocks = (0, import_blocks51.parse)(html);
        if (copiedBlocks.length === 1) {
          registry.batch(() => {
            recursivelyUpdateBlockAttributes(
              targetBlocks,
              targetBlocks.map(() => copiedBlocks[0]),
              updateBlockAttributes2
            );
          });
        } else {
          registry.batch(() => {
            recursivelyUpdateBlockAttributes(
              targetBlocks,
              copiedBlocks,
              updateBlockAttributes2
            );
          });
        }
        if (targetBlocks.length === 1) {
          const title = (0, import_blocks51.getBlockType)(targetBlocks[0].name)?.title;
          createSuccessNotice(
            (0, import_i18n74.sprintf)(
              // Translators: %s: Name of the block being pasted, e.g. "Paragraph".
              (0, import_i18n74.__)("Pasted styles to %s."),
              title
            ),
            { type: "snackbar" }
          );
        } else {
          createSuccessNotice(
            (0, import_i18n74.sprintf)(
              // Translators: %d: The number of the blocks.
              (0, import_i18n74.__)("Pasted styles to %d blocks."),
              targetBlocks.length
            ),
            { type: "snackbar" }
          );
        }
      },
      [
        registry.batch,
        updateBlockAttributes2,
        createSuccessNotice,
        createWarningNotice,
        createErrorNotice
      ]
    );
  }

  // packages/block-editor/build-module/components/block-actions/index.mjs
  function BlockActions({
    clientIds,
    children,
    __experimentalUpdateSelection: updateSelection
  }) {
    const { getDefaultBlockName: getDefaultBlockName8, getGroupingBlockName } = (0, import_data90.useSelect)(import_blocks52.store);
    const selected = (0, import_data90.useSelect)(
      (select3) => {
        const {
          canInsertBlockType: canInsertBlockType2,
          getBlockRootClientId: getBlockRootClientId2,
          getBlocksByClientId: getBlocksByClientId22,
          getDirectInsertBlock: getDirectInsertBlock2,
          canRemoveBlocks: canRemoveBlocks2
        } = select3(store);
        const blocks2 = getBlocksByClientId22(clientIds);
        const rootClientId = getBlockRootClientId2(clientIds[0]);
        const canInsertDefaultBlock = canInsertBlockType2(
          getDefaultBlockName8(),
          rootClientId
        );
        const directInsertBlock = rootClientId ? getDirectInsertBlock2(rootClientId) : null;
        return {
          canRemove: canRemoveBlocks2(clientIds),
          canInsertBlock: blocks2.every((block) => {
            return (canInsertDefaultBlock || !!directInsertBlock) && canInsertBlockType2(block.name, rootClientId);
          }),
          canCopyStyles: blocks2.every((block) => {
            return !!block && ((0, import_blocks52.hasBlockSupport)(block.name, "color") || (0, import_blocks52.hasBlockSupport)(block.name, "typography"));
          }),
          canDuplicate: blocks2.every((block) => {
            return !!block && (0, import_blocks52.hasBlockSupport)(block.name, "multiple", true) && canInsertBlockType2(block.name, rootClientId);
          })
        };
      },
      [clientIds, getDefaultBlockName8]
    );
    const { getBlocksByClientId: getBlocksByClientId2, getBlocks: getBlocks2 } = (0, import_data90.useSelect)(store);
    const { canRemove, canInsertBlock, canCopyStyles, canDuplicate } = selected;
    const {
      removeBlocks: removeBlocks2,
      replaceBlocks: replaceBlocks2,
      duplicateBlocks: duplicateBlocks2,
      insertAfterBlock: insertAfterBlock2,
      insertBeforeBlock: insertBeforeBlock2,
      flashBlock: flashBlock2
    } = (0, import_data90.useDispatch)(store);
    const pasteStyles = usePasteStyles();
    return children({
      canCopyStyles,
      canDuplicate,
      canInsertBlock,
      canRemove,
      onDuplicate() {
        return duplicateBlocks2(clientIds, updateSelection);
      },
      onRemove() {
        return removeBlocks2(clientIds, updateSelection);
      },
      onInsertBefore() {
        insertBeforeBlock2(clientIds[0]);
      },
      onInsertAfter() {
        insertAfterBlock2(clientIds[clientIds.length - 1]);
      },
      onGroup() {
        if (!clientIds.length) {
          return;
        }
        const groupingBlockName = getGroupingBlockName();
        const newBlocks = (0, import_blocks52.switchToBlockType)(
          getBlocksByClientId2(clientIds),
          groupingBlockName
        );
        if (!newBlocks) {
          return;
        }
        replaceBlocks2(clientIds, newBlocks);
      },
      onUngroup() {
        if (!clientIds.length) {
          return;
        }
        const innerBlocks = getBlocks2(clientIds[0]);
        if (!innerBlocks.length) {
          return;
        }
        replaceBlocks2(clientIds, innerBlocks);
      },
      onCopy() {
        if (clientIds.length === 1) {
          flashBlock2(clientIds[0]);
        }
      },
      async onPasteStyles() {
        await pasteStyles(getBlocksByClientId2(clientIds));
      }
    });
  }

  // packages/block-editor/build-module/components/collab/block-comment-icon-slot.mjs
  var import_components84 = __toESM(require_components(), 1);
  var CommentIconSlotFill = (0, import_components84.createSlotFill)(/* @__PURE__ */ Symbol("CommentIconSlotFill"));
  var block_comment_icon_slot_default = CommentIconSlotFill;

  // packages/block-editor/build-module/components/block-settings-menu/block-html-convert-button.mjs
  var import_i18n75 = __toESM(require_i18n(), 1);
  var import_components85 = __toESM(require_components(), 1);
  var import_blocks53 = __toESM(require_blocks(), 1);
  var import_data91 = __toESM(require_data(), 1);
  var import_jsx_runtime225 = __toESM(require_jsx_runtime(), 1);
  function BlockHTMLConvertButton({ clientId }) {
    const block = (0, import_data91.useSelect)(
      (select3) => select3(store).getBlock(clientId),
      [clientId]
    );
    const { replaceBlocks: replaceBlocks2 } = (0, import_data91.useDispatch)(store);
    if (!block || block.name !== "core/html") {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
      import_components85.MenuItem,
      {
        onClick: () => replaceBlocks2(
          clientId,
          (0, import_blocks53.rawHandler)({ HTML: (0, import_blocks53.getBlockContent)(block) })
        ),
        children: (0, import_i18n75.__)("Convert to Blocks")
      }
    );
  }
  var block_html_convert_button_default = BlockHTMLConvertButton;

  // packages/block-editor/build-module/components/block-settings-menu/block-settings-menu-first-item.mjs
  var import_components86 = __toESM(require_components(), 1);
  var { Fill: __unstableBlockSettingsMenuFirstItem, Slot: Slot6 } = (0, import_components86.createSlotFill)(
    "__unstableBlockSettingsMenuFirstItem"
  );
  __unstableBlockSettingsMenuFirstItem.Slot = Slot6;
  var block_settings_menu_first_item_default = __unstableBlockSettingsMenuFirstItem;

  // packages/block-editor/build-module/components/block-settings-menu-controls/index.mjs
  var import_components95 = __toESM(require_components(), 1);
  var import_blocks60 = __toESM(require_blocks(), 1);
  var import_data100 = __toESM(require_data(), 1);

  // packages/block-editor/build-module/components/convert-to-group-buttons/index.mjs
  var import_components88 = __toESM(require_components(), 1);
  var import_i18n77 = __toESM(require_i18n(), 1);
  var import_blocks56 = __toESM(require_blocks(), 1);
  var import_data94 = __toESM(require_data(), 1);
  var import_keycodes10 = __toESM(require_keycodes(), 1);

  // packages/block-editor/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.mjs
  var import_blocks54 = __toESM(require_blocks(), 1);
  var import_data92 = __toESM(require_data(), 1);
  function useConvertToGroupButtonProps(selectedClientIds) {
    return (0, import_data92.useSelect)(
      (select3) => {
        const {
          getBlocksByClientId: getBlocksByClientId2,
          getSelectedBlockClientIds: getSelectedBlockClientIds2,
          isUngroupable: isUngroupable2,
          isGroupable: isGroupable2
        } = select3(store);
        const { getGroupingBlockName, getBlockType: getBlockType27 } = select3(import_blocks54.store);
        const clientIds = selectedClientIds?.length ? selectedClientIds : getSelectedBlockClientIds2();
        const blocksSelection = getBlocksByClientId2(clientIds);
        const [firstSelectedBlock] = blocksSelection;
        const _isUngroupable = clientIds.length === 1 && isUngroupable2(clientIds[0]);
        return {
          clientIds,
          isGroupable: isGroupable2(clientIds),
          isUngroupable: _isUngroupable,
          blocksSelection,
          groupingBlockName: getGroupingBlockName(),
          onUngroup: _isUngroupable && getBlockType27(firstSelectedBlock.name)?.transforms?.ungroup
        };
      },
      [selectedClientIds]
    );
  }

  // packages/block-editor/build-module/components/convert-to-group-buttons/toolbar.mjs
  var import_data93 = __toESM(require_data(), 1);
  var import_blocks55 = __toESM(require_blocks(), 1);
  var import_components87 = __toESM(require_components(), 1);
  var import_i18n76 = __toESM(require_i18n(), 1);
  var import_jsx_runtime226 = __toESM(require_jsx_runtime(), 1);
  var layouts = {
    group: { type: "constrained" },
    row: { type: "flex", flexWrap: "nowrap" },
    stack: { type: "flex", orientation: "vertical" },
    grid: { type: "grid" }
  };
  function BlockGroupToolbar() {
    const { blocksSelection, clientIds, groupingBlockName, isGroupable: isGroupable2 } = useConvertToGroupButtonProps();
    const { replaceBlocks: replaceBlocks2 } = (0, import_data93.useDispatch)(store);
    const { canRemove, variations } = (0, import_data93.useSelect)(
      (select3) => {
        const { canRemoveBlocks: canRemoveBlocks2 } = select3(store);
        const { getBlockVariations: getBlockVariations2 } = select3(import_blocks55.store);
        return {
          canRemove: canRemoveBlocks2(clientIds),
          variations: getBlockVariations2(
            groupingBlockName,
            "transform"
          )
        };
      },
      [clientIds, groupingBlockName]
    );
    const onConvertToGroup = (layout) => {
      const newBlocks = (0, import_blocks55.switchToBlockType)(
        blocksSelection,
        groupingBlockName
      );
      if (typeof layout !== "string") {
        layout = "group";
      }
      if (newBlocks && newBlocks.length > 0) {
        newBlocks[0].attributes.layout = layouts[layout];
        replaceBlocks2(clientIds, newBlocks);
      }
    };
    const onConvertToRow = () => onConvertToGroup("row");
    const onConvertToStack = () => onConvertToGroup("stack");
    const onConvertToGrid = () => onConvertToGroup("grid");
    if (!isGroupable2 || !canRemove) {
      return null;
    }
    const canInsertRow = !!variations.find(
      ({ name }) => name === "group-row"
    );
    const canInsertStack = !!variations.find(
      ({ name }) => name === "group-stack"
    );
    const canInsertGrid = !!variations.find(
      ({ name }) => name === "group-grid"
    );
    return /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(import_components87.ToolbarGroup, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
        import_components87.ToolbarButton,
        {
          icon: group_default,
          label: (0, import_i18n76._x)("Group", "action: convert blocks to group"),
          onClick: onConvertToGroup
        }
      ),
      canInsertRow && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
        import_components87.ToolbarButton,
        {
          icon: row_default,
          label: (0, import_i18n76._x)("Row", "action: convert blocks to row"),
          onClick: onConvertToRow
        }
      ),
      canInsertStack && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
        import_components87.ToolbarButton,
        {
          icon: stack_default,
          label: (0, import_i18n76._x)("Stack", "action: convert blocks to stack"),
          onClick: onConvertToStack
        }
      ),
      canInsertGrid && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
        import_components87.ToolbarButton,
        {
          icon: grid_default,
          label: (0, import_i18n76._x)("Grid", "action: convert blocks to grid"),
          onClick: onConvertToGrid
        }
      )
    ] });
  }
  var toolbar_default = BlockGroupToolbar;

  // packages/block-editor/build-module/components/convert-to-group-buttons/index.mjs
  var import_jsx_runtime227 = __toESM(require_jsx_runtime(), 1);
  function ConvertToGroupButton({
    clientIds,
    isGroupable: isGroupable2,
    isUngroupable: isUngroupable2,
    onUngroup,
    blocksSelection,
    groupingBlockName,
    onClose = () => {
    }
  }) {
    const { getSelectedBlockClientIds: getSelectedBlockClientIds2 } = (0, import_data94.useSelect)(store);
    const { replaceBlocks: replaceBlocks2 } = (0, import_data94.useDispatch)(store);
    const onConvertToGroup = () => {
      const newBlocks = (0, import_blocks56.switchToBlockType)(
        blocksSelection,
        groupingBlockName
      );
      if (newBlocks) {
        replaceBlocks2(clientIds, newBlocks);
      }
    };
    const onConvertFromGroup = () => {
      let innerBlocks = blocksSelection[0].innerBlocks;
      if (!innerBlocks.length) {
        return;
      }
      if (onUngroup) {
        innerBlocks = onUngroup(
          blocksSelection[0].attributes,
          blocksSelection[0].innerBlocks
        );
      }
      replaceBlocks2(clientIds, innerBlocks);
    };
    if (!isGroupable2 && !isUngroupable2) {
      return null;
    }
    const selectedBlockClientIds = getSelectedBlockClientIds2();
    return /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(import_jsx_runtime227.Fragment, { children: [
      isGroupable2 && /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
        import_components88.MenuItem,
        {
          shortcut: selectedBlockClientIds.length > 1 ? import_keycodes10.displayShortcut.primary("g") : void 0,
          onClick: () => {
            onConvertToGroup();
            onClose();
          },
          children: (0, import_i18n77._x)("Group", "verb")
        }
      ),
      isUngroupable2 && /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
        import_components88.MenuItem,
        {
          onClick: () => {
            onConvertFromGroup();
            onClose();
          },
          children: (0, import_i18n77._x)(
            "Ungroup",
            "Ungrouping blocks from within a grouping block back into individual blocks within the Editor"
          )
        }
      )
    ] });
  }

  // packages/block-editor/build-module/components/block-lock/menu-item.mjs
  var import_i18n79 = __toESM(require_i18n(), 1);
  var import_element107 = __toESM(require_element(), 1);
  var import_components90 = __toESM(require_components(), 1);

  // packages/block-editor/build-module/components/block-lock/use-block-lock.mjs
  var import_data95 = __toESM(require_data(), 1);
  function useBlockLock(clientId) {
    return (0, import_data95.useSelect)(
      (select3) => {
        const {
          canLockBlockType: canLockBlockType2,
          getBlockName: getBlockName2,
          isEditLockedBlock: isEditLockedBlock2,
          isMoveLockedBlock: isMoveLockedBlock2,
          isRemoveLockedBlock: isRemoveLockedBlock2,
          isLockedBlock: isLockedBlock2
        } = unlock(select3(store));
        return {
          isEditLocked: isEditLockedBlock2(clientId),
          isMoveLocked: isMoveLockedBlock2(clientId),
          isRemoveLocked: isRemoveLockedBlock2(clientId),
          canLock: canLockBlockType2(getBlockName2(clientId)),
          isLocked: isLockedBlock2(clientId)
        };
      },
      [clientId]
    );
  }

  // packages/block-editor/build-module/components/block-lock/modal.mjs
  var import_i18n78 = __toESM(require_i18n(), 1);
  var import_element106 = __toESM(require_element(), 1);
  var import_components89 = __toESM(require_components(), 1);
  var import_data96 = __toESM(require_data(), 1);
  var import_blocks57 = __toESM(require_blocks(), 1);
  var import_jsx_runtime228 = __toESM(require_jsx_runtime(), 1);
  var ALLOWS_EDIT_LOCKING = ["core/navigation"];
  function getTemplateLockValue(lock3) {
    if (lock3.remove && lock3.move) {
      return "all";
    }
    if (lock3.remove && !lock3.move) {
      return "insert";
    }
    return false;
  }
  function BlockLockModal({ clientId, onClose }) {
    const [lock3, setLock] = (0, import_element106.useState)({ move: false, remove: false });
    const { isEditLocked, isMoveLocked, isRemoveLocked } = useBlockLock(clientId);
    const { allowsEditLocking, templateLock, hasTemplateLock } = (0, import_data96.useSelect)(
      (select3) => {
        const { getBlockName: getBlockName2, getBlockAttributes: getBlockAttributes3 } = select3(store);
        const blockName = getBlockName2(clientId);
        const blockType = (0, import_blocks57.getBlockType)(blockName);
        return {
          allowsEditLocking: ALLOWS_EDIT_LOCKING.includes(blockName),
          templateLock: getBlockAttributes3(clientId)?.templateLock,
          hasTemplateLock: !!blockType?.attributes?.templateLock
        };
      },
      [clientId]
    );
    const [applyTemplateLock, setApplyTemplateLock] = (0, import_element106.useState)(
      !!templateLock
    );
    const { updateBlockAttributes: updateBlockAttributes2 } = (0, import_data96.useDispatch)(store);
    const blockInformation = useBlockDisplayInformation(clientId);
    (0, import_element106.useEffect)(() => {
      setLock({
        move: isMoveLocked,
        remove: isRemoveLocked,
        ...allowsEditLocking ? { edit: isEditLocked } : {}
      });
    }, [isEditLocked, isMoveLocked, isRemoveLocked, allowsEditLocking]);
    const isAllChecked = Object.values(lock3).every(Boolean);
    const isMixed = Object.values(lock3).some(Boolean) && !isAllChecked;
    const isDirty = lock3.move !== isMoveLocked || lock3.remove !== isRemoveLocked || allowsEditLocking && lock3.edit !== isEditLocked || hasTemplateLock && applyTemplateLock !== !!templateLock;
    return /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
      import_components89.Modal,
      {
        title: (0, import_i18n78.sprintf)(
          /* translators: %s: Name of the block. */
          (0, import_i18n78.__)("Lock %s"),
          blockInformation.title
        ),
        overlayClassName: "block-editor-block-lock-modal",
        onRequestClose: onClose,
        size: "small",
        children: /* @__PURE__ */ (0, import_jsx_runtime228.jsxs)(
          "form",
          {
            onSubmit: (event) => {
              event.preventDefault();
              if (!isDirty) {
                return;
              }
              updateBlockAttributes2([clientId], {
                lock: lock3,
                templateLock: applyTemplateLock ? getTemplateLockValue(lock3) : void 0
              });
              onClose();
            },
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime228.jsxs)("fieldset", { className: "block-editor-block-lock-modal__options", children: [
                /* @__PURE__ */ (0, import_jsx_runtime228.jsx)("legend", { children: (0, import_i18n78.__)("Select the features you want to lock") }),
                /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
                  "ul",
                  {
                    role: "list",
                    className: "block-editor-block-lock-modal__checklist",
                    children: /* @__PURE__ */ (0, import_jsx_runtime228.jsxs)("li", { children: [
                      /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
                        import_components89.CheckboxControl,
                        {
                          className: "block-editor-block-lock-modal__options-all",
                          label: (0, import_i18n78.__)("Lock all"),
                          checked: isAllChecked,
                          indeterminate: isMixed,
                          onChange: (newValue) => setLock({
                            move: newValue,
                            remove: newValue,
                            ...allowsEditLocking ? { edit: newValue } : {}
                          })
                        }
                      ),
                      /* @__PURE__ */ (0, import_jsx_runtime228.jsxs)(
                        "ul",
                        {
                          role: "list",
                          className: "block-editor-block-lock-modal__checklist",
                          children: [
                            allowsEditLocking && /* @__PURE__ */ (0, import_jsx_runtime228.jsxs)("li", { className: "block-editor-block-lock-modal__checklist-item", children: [
                              /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
                                import_components89.CheckboxControl,
                                {
                                  label: (0, import_i18n78.__)("Lock editing"),
                                  checked: !!lock3.edit,
                                  onChange: (edit) => setLock((prevLock) => ({
                                    ...prevLock,
                                    edit
                                  }))
                                }
                              ),
                              /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
                                import_components89.Icon,
                                {
                                  className: "block-editor-block-lock-modal__lock-icon",
                                  icon: lock3.edit ? lock_default : unlock_default
                                }
                              )
                            ] }),
                            /* @__PURE__ */ (0, import_jsx_runtime228.jsxs)("li", { className: "block-editor-block-lock-modal__checklist-item", children: [
                              /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
                                import_components89.CheckboxControl,
                                {
                                  label: (0, import_i18n78.__)("Lock movement"),
                                  checked: lock3.move,
                                  onChange: (move) => setLock((prevLock) => ({
                                    ...prevLock,
                                    move
                                  }))
                                }
                              ),
                              /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
                                import_components89.Icon,
                                {
                                  className: "block-editor-block-lock-modal__lock-icon",
                                  icon: lock3.move ? lock_default : unlock_default
                                }
                              )
                            ] }),
                            /* @__PURE__ */ (0, import_jsx_runtime228.jsxs)("li", { className: "block-editor-block-lock-modal__checklist-item", children: [
                              /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
                                import_components89.CheckboxControl,
                                {
                                  label: (0, import_i18n78.__)("Lock removal"),
                                  checked: lock3.remove,
                                  onChange: (remove5) => setLock((prevLock) => ({
                                    ...prevLock,
                                    remove: remove5
                                  }))
                                }
                              ),
                              /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
                                import_components89.Icon,
                                {
                                  className: "block-editor-block-lock-modal__lock-icon",
                                  icon: lock3.remove ? lock_default : unlock_default
                                }
                              )
                            ] })
                          ]
                        }
                      )
                    ] })
                  }
                ),
                hasTemplateLock && /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
                  import_components89.ToggleControl,
                  {
                    className: "block-editor-block-lock-modal__template-lock",
                    label: (0, import_i18n78.__)("Apply to all blocks inside"),
                    checked: applyTemplateLock,
                    disabled: lock3.move && !lock3.remove,
                    onChange: () => setApplyTemplateLock(!applyTemplateLock)
                  }
                )
              ] }),
              /* @__PURE__ */ (0, import_jsx_runtime228.jsxs)(
                import_components89.Flex,
                {
                  className: "block-editor-block-lock-modal__actions",
                  justify: "flex-end",
                  expanded: false,
                  children: [
                    /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(import_components89.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
                      import_components89.Button,
                      {
                        variant: "tertiary",
                        onClick: onClose,
                        __next40pxDefaultSize: true,
                        children: (0, import_i18n78.__)("Cancel")
                      }
                    ) }),
                    /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(import_components89.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
                      import_components89.Button,
                      {
                        variant: "primary",
                        type: "submit",
                        disabled: !isDirty,
                        accessibleWhenDisabled: true,
                        __next40pxDefaultSize: true,
                        children: (0, import_i18n78.__)("Apply")
                      }
                    ) })
                  ]
                }
              )
            ]
          }
        )
      }
    );
  }

  // packages/block-editor/build-module/components/block-lock/menu-item.mjs
  var import_jsx_runtime229 = __toESM(require_jsx_runtime(), 1);
  function BlockLockMenuItem({ clientId }) {
    const { canLock, isLocked } = useBlockLock(clientId);
    const [isModalOpen, toggleModal] = (0, import_element107.useReducer)(
      (isActive) => !isActive,
      false
    );
    if (!canLock) {
      return null;
    }
    const label = isLocked ? (0, import_i18n79.__)("Unlock") : (0, import_i18n79.__)("Lock");
    return /* @__PURE__ */ (0, import_jsx_runtime229.jsxs)(import_jsx_runtime229.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
        import_components90.MenuItem,
        {
          icon: isLocked ? unlock_default : lock_outline_default,
          onClick: toggleModal,
          "aria-expanded": isModalOpen,
          "aria-haspopup": "dialog",
          children: label
        }
      ),
      isModalOpen && /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(BlockLockModal, { clientId, onClose: toggleModal })
    ] });
  }

  // packages/block-editor/build-module/components/block-lock/toolbar.mjs
  var import_i18n80 = __toESM(require_i18n(), 1);
  var import_components91 = __toESM(require_components(), 1);
  var import_element108 = __toESM(require_element(), 1);
  var import_jsx_runtime230 = __toESM(require_jsx_runtime(), 1);
  function BlockLockToolbar({ clientId }) {
    const { canLock, isLocked } = useBlockLock(clientId);
    const [isModalOpen, toggleModal] = (0, import_element108.useReducer)(
      (isActive) => !isActive,
      false
    );
    const hasLockButtonShownRef = (0, import_element108.useRef)(false);
    (0, import_element108.useEffect)(() => {
      if (isLocked) {
        hasLockButtonShownRef.current = true;
      }
    }, [isLocked]);
    if (!isLocked && !hasLockButtonShownRef.current) {
      return null;
    }
    let label = isLocked ? (0, import_i18n80.__)("Unlock") : (0, import_i18n80.__)("Lock");
    if (!canLock && isLocked) {
      label = (0, import_i18n80.__)("Locked");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime230.jsxs)(import_jsx_runtime230.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components91.ToolbarGroup, { className: "block-editor-block-lock-toolbar", children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
        import_components91.ToolbarButton,
        {
          disabled: !canLock,
          icon: isLocked ? lock_default : unlock_default,
          label,
          onClick: toggleModal,
          "aria-expanded": isModalOpen,
          "aria-haspopup": "dialog"
        }
      ) }),
      isModalOpen && /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(BlockLockModal, { clientId, onClose: toggleModal })
    ] });
  }

  // packages/block-editor/build-module/components/block-settings-menu/block-mode-toggle.mjs
  var import_i18n81 = __toESM(require_i18n(), 1);
  var import_components92 = __toESM(require_components(), 1);
  var import_blocks58 = __toESM(require_blocks(), 1);
  var import_data97 = __toESM(require_data(), 1);
  var import_jsx_runtime231 = __toESM(require_jsx_runtime(), 1);
  var noop8 = () => {
  };
  function BlockModeToggle({ clientId, onToggle = noop8 }) {
    const { blockType, mode: mode2, enabled } = (0, import_data97.useSelect)(
      (select3) => {
        const { getBlock: getBlock2, getBlockMode: getBlockMode2, getSettings: getSettings7 } = select3(store);
        const block = getBlock2(clientId);
        return {
          mode: getBlockMode2(clientId),
          blockType: block ? (0, import_blocks58.getBlockType)(block.name) : null,
          enabled: getSettings7().codeEditingEnabled && !!block?.isValid
        };
      },
      [clientId]
    );
    const { toggleBlockMode: toggleBlockMode2 } = (0, import_data97.useDispatch)(store);
    if (!blockType || !(0, import_blocks58.hasBlockSupport)(blockType, "html", true) || !enabled) {
      return null;
    }
    const label = mode2 === "visual" ? (0, import_i18n81.__)("Edit as HTML") : (0, import_i18n81.__)("Edit visually");
    return /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
      import_components92.MenuItem,
      {
        onClick: () => {
          toggleBlockMode2(clientId);
          onToggle();
        },
        children: label
      }
    );
  }

  // packages/block-editor/build-module/components/block-rename/rename-control.mjs
  var import_components94 = __toESM(require_components(), 1);
  var import_i18n83 = __toESM(require_i18n(), 1);
  var import_element110 = __toESM(require_element(), 1);
  var import_data99 = __toESM(require_data(), 1);
  var import_keyboard_shortcuts6 = __toESM(require_keyboard_shortcuts(), 1);

  // packages/block-editor/build-module/components/block-rename/modal.mjs
  var import_components93 = __toESM(require_components(), 1);
  var import_i18n82 = __toESM(require_i18n(), 1);
  var import_element109 = __toESM(require_element(), 1);
  var import_a11y11 = __toESM(require_a11y(), 1);
  var import_data98 = __toESM(require_data(), 1);

  // packages/block-editor/build-module/components/block-rename/is-empty-string.mjs
  function isEmptyString(testString) {
    return testString?.trim()?.length === 0;
  }

  // packages/block-editor/build-module/components/block-rename/modal.mjs
  var import_jsx_runtime232 = __toESM(require_jsx_runtime(), 1);
  function BlockRenameModal({ clientId, onClose }) {
    const [editedBlockName, setEditedBlockName] = (0, import_element109.useState)();
    const blockInformation = useBlockDisplayInformation(clientId);
    const { metadata } = (0, import_data98.useSelect)(
      (select3) => {
        const { getBlockAttributes: getBlockAttributes3 } = select3(store);
        return {
          metadata: getBlockAttributes3(clientId)?.metadata
        };
      },
      [clientId]
    );
    const { updateBlockAttributes: updateBlockAttributes2 } = (0, import_data98.useDispatch)(store);
    const blockName = metadata?.name || "";
    const originalBlockName = blockInformation?.title;
    const hasOverridesWarning = !!blockName && !!metadata?.bindings && Object.values(metadata.bindings).some(
      (binding) => binding.source === "core/pattern-overrides"
    );
    const nameHasChanged = editedBlockName !== void 0 && editedBlockName !== blockName;
    const nameIsOriginal = editedBlockName === originalBlockName;
    const nameIsEmpty = isEmptyString(editedBlockName);
    const isNameValid = nameHasChanged || nameIsOriginal;
    const autoSelectInputText = (event) => event.target.select();
    const handleSubmit = () => {
      const newName = nameIsOriginal || nameIsEmpty ? void 0 : editedBlockName;
      const message2 = nameIsOriginal || nameIsEmpty ? (0, import_i18n82.sprintf)(
        /* translators: %s: new name/label for the block */
        (0, import_i18n82.__)('Block name reset to: "%s".'),
        editedBlockName
      ) : (0, import_i18n82.sprintf)(
        /* translators: %s: new name/label for the block */
        (0, import_i18n82.__)('Block name changed to: "%s".'),
        editedBlockName
      );
      (0, import_a11y11.speak)(message2, "assertive");
      updateBlockAttributes2([clientId], {
        metadata: cleanEmptyObject({
          ...metadata,
          name: newName
        })
      });
      onClose();
    };
    return /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
      import_components93.Modal,
      {
        title: (0, import_i18n82.__)("Rename"),
        onRequestClose: onClose,
        overlayClassName: "block-editor-block-rename-modal",
        focusOnMount: "firstContentElement",
        size: "small",
        children: /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
          "form",
          {
            onSubmit: (e2) => {
              e2.preventDefault();
              if (!isNameValid) {
                return;
              }
              handleSubmit();
            },
            children: /* @__PURE__ */ (0, import_jsx_runtime232.jsxs)(import_components93.__experimentalVStack, { spacing: "3", children: [
              /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
                import_components93.TextControl,
                {
                  __next40pxDefaultSize: true,
                  value: editedBlockName ?? blockName,
                  label: (0, import_i18n82.__)("Name"),
                  help: hasOverridesWarning ? (0, import_i18n82.__)(
                    "This block allows overrides. Changing the name can cause problems with content entered into instances of this pattern."
                  ) : void 0,
                  placeholder: originalBlockName,
                  onChange: setEditedBlockName,
                  onFocus: autoSelectInputText
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime232.jsxs)(import_components93.__experimentalHStack, { justify: "right", children: [
                /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
                  import_components93.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "tertiary",
                    onClick: onClose,
                    children: (0, import_i18n82.__)("Cancel")
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
                  import_components93.Button,
                  {
                    __next40pxDefaultSize: true,
                    accessibleWhenDisabled: true,
                    disabled: !isNameValid,
                    variant: "primary",
                    type: "submit",
                    children: (0, import_i18n82.__)("Save")
                  }
                )
              ] })
            ] })
          }
        )
      }
    );
  }

  // packages/block-editor/build-module/components/block-rename/rename-control.mjs
  var import_jsx_runtime233 = __toESM(require_jsx_runtime(), 1);
  function BlockRenameControl({ clientId }) {
    const [renamingBlock, setRenamingBlock] = (0, import_element110.useState)(false);
    const shortcut = (0, import_data99.useSelect)(
      (select3) => select3(import_keyboard_shortcuts6.store).getShortcutRepresentation(
        "core/block-editor/rename"
      ),
      []
    );
    return /* @__PURE__ */ (0, import_jsx_runtime233.jsxs)(import_jsx_runtime233.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
        import_components94.MenuItem,
        {
          onClick: () => {
            setRenamingBlock(true);
          },
          "aria-expanded": renamingBlock,
          "aria-haspopup": "dialog",
          shortcut,
          children: (0, import_i18n83.__)("Rename")
        }
      ),
      renamingBlock && /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
        BlockRenameModal,
        {
          clientId,
          onClose: () => setRenamingBlock(false)
        }
      )
    ] });
  }

  // packages/block-editor/build-module/components/block-rename/use-block-rename.mjs
  var import_blocks59 = __toESM(require_blocks(), 1);
  function useBlockRename(name) {
    return {
      canRename: !!name && (0, import_blocks59.getBlockSupport)(name, "renaming", true)
    };
  }

  // packages/block-editor/build-module/components/block-settings-menu-controls/index.mjs
  var import_jsx_runtime234 = __toESM(require_jsx_runtime(), 1);
  var { Fill: Fill2, Slot: Slot7 } = (0, import_components95.createSlotFill)("BlockSettingsMenuControls");
  var BlockSettingsMenuControlsSlot = ({ fillProps, clientIds = null }) => {
    const {
      selectedBlocks,
      selectedClientIds,
      isContentOnly,
      canToggleSelectedBlocksVisibility,
      canEdit
    } = (0, import_data100.useSelect)(
      (select3) => {
        const {
          getBlocksByClientId: getBlocksByClientId2,
          getBlockNamesByClientId: getBlockNamesByClientId2,
          getSelectedBlockClientIds: getSelectedBlockClientIds2,
          getBlockEditingMode: getBlockEditingMode2,
          canEditBlock: canEditBlock2
        } = select3(store);
        const ids = clientIds !== null ? clientIds : getSelectedBlockClientIds2();
        return {
          selectedBlocks: getBlockNamesByClientId2(ids),
          selectedClientIds: ids,
          isContentOnly: getBlockEditingMode2(ids[0]) === "contentOnly",
          canToggleSelectedBlocksVisibility: getBlocksByClientId2(
            ids
          ).every(
            (block) => (0, import_blocks60.hasBlockSupport)(block.name, "visibility", true)
          ),
          canEdit: canEditBlock2(ids[0])
        };
      },
      [clientIds]
    );
    const { canLock } = useBlockLock(selectedClientIds[0]);
    const { canRename } = useBlockRename(selectedBlocks[0]);
    const showLockButton = selectedClientIds.length === 1 && canLock && !isContentOnly;
    const showRenameButton = selectedClientIds.length === 1 && canRename && !isContentOnly;
    const showVisibilityButton = canToggleSelectedBlocksVisibility && !isContentOnly;
    const convertToGroupButtonProps = useConvertToGroupButtonProps(selectedClientIds);
    const { isGroupable: isGroupable2, isUngroupable: isUngroupable2 } = convertToGroupButtonProps;
    const showConvertToGroupButton = (isGroupable2 || isUngroupable2) && !isContentOnly;
    return /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
      Slot7,
      {
        fillProps: {
          ...fillProps,
          canEdit,
          selectedBlocks,
          selectedClientIds
        },
        children: (fills) => {
          if (!fills?.length > 0 && !showConvertToGroupButton && !showLockButton) {
            return null;
          }
          return /* @__PURE__ */ (0, import_jsx_runtime234.jsxs)(import_components95.MenuGroup, { children: [
            showConvertToGroupButton && /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
              ConvertToGroupButton,
              {
                ...convertToGroupButtonProps,
                onClose: fillProps?.onClose
              }
            ),
            canEdit && showLockButton && /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
              BlockLockMenuItem,
              {
                clientId: selectedClientIds[0]
              }
            ),
            canEdit && showRenameButton && /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
              BlockRenameControl,
              {
                clientId: selectedClientIds[0]
              }
            ),
            canEdit && showVisibilityButton && /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
              BlockVisibilityViewportMenuItem,
              {
                clientIds: selectedClientIds
              }
            ),
            fills,
            canEdit && fillProps?.count === 1 && !isContentOnly && /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
              BlockModeToggle,
              {
                clientId: fillProps?.firstBlockClientId,
                onToggle: fillProps?.onClose
              }
            )
          ] });
        }
      }
    );
  };
  function BlockSettingsMenuControls({ ...props }) {
    return /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(import_components95.__experimentalStyleProvider, { document, children: /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(Fill2, { ...props }) });
  }
  BlockSettingsMenuControls.Slot = BlockSettingsMenuControlsSlot;
  var block_settings_menu_controls_default = BlockSettingsMenuControls;

  // packages/block-editor/build-module/components/block-settings-menu/block-parent-selector-menu-item.mjs
  var import_element111 = __toESM(require_element(), 1);
  var import_components96 = __toESM(require_components(), 1);
  var import_compose63 = __toESM(require_compose(), 1);
  var import_data101 = __toESM(require_data(), 1);
  var import_i18n84 = __toESM(require_i18n(), 1);
  var import_jsx_runtime235 = __toESM(require_jsx_runtime(), 1);
  function BlockParentSelectorMenuItem({
    parentClientId,
    parentBlockType
  }) {
    const isSmallViewport = (0, import_compose63.useViewportMatch)("medium", "<");
    const { selectBlock: selectBlock2 } = (0, import_data101.useDispatch)(store);
    const menuItemRef = (0, import_element111.useRef)();
    const gesturesProps = useShowHoveredOrFocusedGestures({
      ref: menuItemRef,
      highlightParent: true
    });
    if (!isSmallViewport) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(
      import_components96.MenuItem,
      {
        ...gesturesProps,
        ref: menuItemRef,
        icon: /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(block_icon_default, { icon: parentBlockType.icon }),
        onClick: () => selectBlock2(parentClientId),
        children: (0, import_i18n84.sprintf)(
          /* translators: %s: Name of the block's parent. */
          (0, import_i18n84.__)("Select parent block (%s)"),
          parentBlockType.title
        )
      }
    );
  }

  // packages/block-editor/build-module/components/block-settings-menu/block-settings-dropdown.mjs
  var import_jsx_runtime236 = __toESM(require_jsx_runtime(), 1);
  var POPOVER_PROPS4 = {
    className: "block-editor-block-settings-menu__popover",
    placement: "bottom-start"
  };
  function CopyMenuItem({
    clientIds,
    onCopy,
    label,
    shortcut,
    eventType = "copy",
    __experimentalUpdateSelection: updateSelection = false
  }) {
    const { getBlocksByClientId: getBlocksByClientId2 } = (0, import_data102.useSelect)(store);
    const { removeBlocks: removeBlocks2 } = (0, import_data102.useDispatch)(store);
    const notifyCopy = useNotifyCopy();
    const ref = (0, import_compose64.useCopyToClipboard)(
      () => (0, import_blocks61.serialize)(getBlocksByClientId2(clientIds)),
      () => {
        switch (eventType) {
          case "copy":
          case "copyStyles":
            onCopy();
            notifyCopy(eventType, clientIds);
            break;
          case "cut":
            notifyCopy(eventType, clientIds);
            removeBlocks2(clientIds, updateSelection);
            break;
          default:
            break;
        }
      }
    );
    const copyMenuItemLabel = label ? label : (0, import_i18n85.__)("Copy");
    return /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(import_components97.MenuItem, { ref, shortcut, children: copyMenuItemLabel });
  }
  function BlockSettingsDropdown({
    block,
    clientIds,
    children,
    __experimentalSelectBlock,
    ...props
  }) {
    const count = clientIds.length;
    const firstBlockClientId = clientIds[0];
    const {
      firstParentClientId,
      parentBlockType,
      previousBlockClientId,
      selectedBlockClientIds,
      isContentOnly,
      isZoomOut: isZoomOut2,
      canEdit
    } = (0, import_data102.useSelect)(
      (select3) => {
        const {
          getBlockName: getBlockName2,
          getBlockRootClientId: getBlockRootClientId2,
          getPreviousBlockClientId: getPreviousBlockClientId2,
          getSelectedBlockClientIds: getSelectedBlockClientIds22,
          getBlockAttributes: getBlockAttributes3,
          getBlockEditingMode: getBlockEditingMode2,
          isZoomOut: _isZoomOut,
          canEditBlock: canEditBlock2
        } = unlock(select3(store));
        const { getActiveBlockVariation } = select3(import_blocks61.store);
        const _firstParentClientId = getBlockRootClientId2(firstBlockClientId);
        const parentBlockName = _firstParentClientId && getBlockName2(_firstParentClientId);
        return {
          firstParentClientId: _firstParentClientId,
          parentBlockType: _firstParentClientId && (getActiveBlockVariation(
            parentBlockName,
            getBlockAttributes3(_firstParentClientId)
          ) || (0, import_blocks61.getBlockType)(parentBlockName)),
          previousBlockClientId: getPreviousBlockClientId2(firstBlockClientId),
          selectedBlockClientIds: getSelectedBlockClientIds22(),
          isContentOnly: getBlockEditingMode2(firstBlockClientId) === "contentOnly",
          isZoomOut: _isZoomOut(),
          canEdit: canEditBlock2(firstBlockClientId)
        };
      },
      [firstBlockClientId]
    );
    const { getBlockOrder: getBlockOrder2, getSelectedBlockClientIds: getSelectedBlockClientIds2 } = (0, import_data102.useSelect)(store);
    const shortcuts = (0, import_data102.useSelect)((select3) => {
      const { getShortcutRepresentation } = select3(import_keyboard_shortcuts7.store);
      return {
        copy: getShortcutRepresentation("core/block-editor/copy"),
        cut: getShortcutRepresentation("core/block-editor/cut"),
        duplicate: getShortcutRepresentation(
          "core/block-editor/duplicate"
        ),
        remove: getShortcutRepresentation("core/block-editor/remove"),
        insertAfter: getShortcutRepresentation(
          "core/block-editor/insert-after"
        ),
        insertBefore: getShortcutRepresentation(
          "core/block-editor/insert-before"
        )
      };
    }, []);
    const hasSelectedBlocks = selectedBlockClientIds.length > 0;
    async function updateSelectionAfterDuplicate(clientIdsPromise) {
      if (!__experimentalSelectBlock) {
        return;
      }
      const ids = await clientIdsPromise;
      if (ids && ids[0]) {
        __experimentalSelectBlock(ids[0], false);
      }
    }
    function updateSelectionAfterRemove() {
      if (!__experimentalSelectBlock) {
        return;
      }
      let blockToFocus = previousBlockClientId || firstParentClientId;
      if (!blockToFocus) {
        blockToFocus = getBlockOrder2()[0];
      }
      const shouldUpdateSelection = hasSelectedBlocks && getSelectedBlockClientIds2().length === 0;
      __experimentalSelectBlock(blockToFocus, shouldUpdateSelection);
    }
    const parentBlockIsSelected = selectedBlockClientIds?.includes(firstParentClientId);
    const shouldShowBlockParentMenuItem = !parentBlockIsSelected && !!firstParentClientId;
    return /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
      BlockActions,
      {
        clientIds,
        __experimentalUpdateSelection: !__experimentalSelectBlock,
        children: ({
          canCopyStyles,
          canDuplicate,
          canInsertBlock,
          canRemove,
          onDuplicate,
          onInsertAfter,
          onInsertBefore,
          onRemove,
          onCopy,
          onPasteStyles
        }) => {
          const isEmpty4 = !canRemove && !canDuplicate && !canInsertBlock && isContentOnly;
          if (isEmpty4) {
            return null;
          }
          return /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
            import_components97.DropdownMenu,
            {
              icon: more_vertical_default,
              label: (0, import_i18n85.__)("Options"),
              className: "block-editor-block-settings-menu",
              popoverProps: POPOVER_PROPS4,
              noIcons: true,
              ...props,
              children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime236.jsxs)(import_jsx_runtime236.Fragment, { children: [
                /* @__PURE__ */ (0, import_jsx_runtime236.jsxs)(import_components97.MenuGroup, { children: [
                  /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
                    block_settings_menu_first_item_default.Slot,
                    {
                      fillProps: { onClose }
                    }
                  ),
                  shouldShowBlockParentMenuItem && /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
                    BlockParentSelectorMenuItem,
                    {
                      parentClientId: firstParentClientId,
                      parentBlockType
                    }
                  ),
                  canEdit && count === 1 && /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
                    block_html_convert_button_default,
                    {
                      clientId: firstBlockClientId
                    }
                  ),
                  !isContentOnly && /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
                    CopyMenuItem,
                    {
                      clientIds,
                      onCopy,
                      shortcut: shortcuts.copy
                    }
                  ),
                  canRemove && !isContentOnly && /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
                    CopyMenuItem,
                    {
                      clientIds,
                      label: (0, import_i18n85.__)("Cut"),
                      eventType: "cut",
                      shortcut: shortcuts.cut,
                      __experimentalUpdateSelection: !__experimentalSelectBlock
                    }
                  ),
                  canDuplicate && /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
                    import_components97.MenuItem,
                    {
                      onClick: (0, import_compose64.pipe)(
                        onClose,
                        onDuplicate,
                        updateSelectionAfterDuplicate
                      ),
                      shortcut: shortcuts.duplicate,
                      children: (0, import_i18n85.__)("Duplicate")
                    }
                  ),
                  canInsertBlock && !isZoomOut2 && /* @__PURE__ */ (0, import_jsx_runtime236.jsxs)(import_jsx_runtime236.Fragment, { children: [
                    /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
                      import_components97.MenuItem,
                      {
                        onClick: (0, import_compose64.pipe)(
                          onClose,
                          onInsertBefore
                        ),
                        shortcut: shortcuts.insertBefore,
                        children: (0, import_i18n85.__)("Add before")
                      }
                    ),
                    /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
                      import_components97.MenuItem,
                      {
                        onClick: (0, import_compose64.pipe)(
                          onClose,
                          onInsertAfter
                        ),
                        shortcut: shortcuts.insertAfter,
                        children: (0, import_i18n85.__)("Add after")
                      }
                    )
                  ] }),
                  canEdit && count === 1 && /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
                    block_comment_icon_slot_default.Slot,
                    {
                      fillProps: {
                        clientId: firstBlockClientId,
                        onClose
                      }
                    }
                  )
                ] }),
                canCopyStyles && !isContentOnly && /* @__PURE__ */ (0, import_jsx_runtime236.jsxs)(import_components97.MenuGroup, { children: [
                  /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
                    CopyMenuItem,
                    {
                      clientIds,
                      onCopy,
                      label: (0, import_i18n85.__)("Copy styles"),
                      eventType: "copyStyles"
                    }
                  ),
                  canEdit && /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(import_components97.MenuItem, { onClick: onPasteStyles, children: (0, import_i18n85.__)("Paste styles") })
                ] }),
                !isContentOnly && /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
                  block_settings_menu_controls_default.Slot,
                  {
                    fillProps: {
                      onClose,
                      count,
                      firstBlockClientId
                    },
                    clientIds
                  }
                ),
                typeof children === "function" ? children({ onClose }) : import_element112.Children.map(
                  (child) => (0, import_element112.cloneElement)(child, { onClose })
                ),
                canRemove && /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(import_components97.MenuGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
                  import_components97.MenuItem,
                  {
                    onClick: (0, import_compose64.pipe)(
                      onClose,
                      onRemove,
                      updateSelectionAfterRemove
                    ),
                    shortcut: shortcuts.remove,
                    children: (0, import_i18n85.__)("Delete")
                  }
                ) })
              ] })
            }
          );
        }
      }
    );
  }
  var block_settings_dropdown_default = BlockSettingsDropdown;

  // packages/block-editor/build-module/components/collab/block-comment-icon-toolbar-slot.mjs
  var import_components98 = __toESM(require_components(), 1);
  var CommentIconToolbarSlotFill = (0, import_components98.createSlotFill)(
    /* @__PURE__ */ Symbol("CommentIconToolbarSlotFill")
  );
  var block_comment_icon_toolbar_slot_default = CommentIconToolbarSlotFill;

  // packages/block-editor/build-module/components/block-settings-menu/index.mjs
  var import_jsx_runtime237 = __toESM(require_jsx_runtime(), 1);
  function BlockSettingsMenu({ clientIds, ...props }) {
    return /* @__PURE__ */ (0, import_jsx_runtime237.jsxs)(import_components99.ToolbarGroup, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(block_comment_icon_toolbar_slot_default.Slot, {}),
      /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(import_components99.ToolbarItem, { children: (toggleProps) => /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(
        block_settings_dropdown_default,
        {
          clientIds,
          toggleProps,
          ...props
        }
      ) })
    ] });
  }
  var block_settings_menu_default = BlockSettingsMenu;

  // packages/block-editor/build-module/components/block-edit-visually-button/index.mjs
  var import_components100 = __toESM(require_components(), 1);
  var import_i18n86 = __toESM(require_i18n(), 1);
  var import_data103 = __toESM(require_data(), 1);
  var import_jsx_runtime238 = __toESM(require_jsx_runtime(), 1);
  function BlockEditVisuallyButton({ clientIds }) {
    const clientId = clientIds.length === 1 ? clientIds[0] : void 0;
    const canEditVisually = (0, import_data103.useSelect)(
      (select3) => !!clientId && select3(store).getBlockMode(clientId) === "html",
      [clientId]
    );
    const { toggleBlockMode: toggleBlockMode2 } = (0, import_data103.useDispatch)(store);
    if (!canEditVisually) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(import_components100.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
      import_components100.ToolbarButton,
      {
        onClick: () => {
          toggleBlockMode2(clientId);
        },
        children: (0, import_i18n86.__)("Edit visually")
      }
    ) });
  }

  // packages/block-editor/build-module/components/navigable-toolbar/index.mjs
  var import_components101 = __toESM(require_components(), 1);
  var import_element113 = __toESM(require_element(), 1);
  var import_data104 = __toESM(require_data(), 1);
  var import_deprecated12 = __toESM(require_deprecated(), 1);
  var import_dom28 = __toESM(require_dom(), 1);
  var import_keyboard_shortcuts8 = __toESM(require_keyboard_shortcuts(), 1);
  var import_keycodes11 = __toESM(require_keycodes(), 1);
  var import_jsx_runtime239 = __toESM(require_jsx_runtime(), 1);
  function hasOnlyToolbarItem(elements) {
    const dataProp = "toolbarItem";
    return !elements.some((element) => !(dataProp in element.dataset));
  }
  function getAllFocusableToolbarItemsIn(container) {
    return Array.from(
      container.querySelectorAll("[data-toolbar-item]:not([disabled])")
    );
  }
  function hasFocusWithin(container) {
    return container.contains(container.ownerDocument.activeElement);
  }
  function focusFirstTabbableIn(container) {
    const [firstTabbable] = import_dom28.focus.tabbable.find(container);
    if (firstTabbable) {
      firstTabbable.focus({
        // When focusing newly mounted toolbars,
        // the position of the popover is often not right on the first render
        // This prevents the layout shifts when focusing the dialogs.
        preventScroll: true
      });
    }
  }
  function useIsAccessibleToolbar(toolbarRef) {
    const initialAccessibleToolbarState = true;
    const [isAccessibleToolbar, setIsAccessibleToolbar] = (0, import_element113.useState)(
      initialAccessibleToolbarState
    );
    const determineIsAccessibleToolbar = (0, import_element113.useCallback)(() => {
      const tabbables = import_dom28.focus.tabbable.find(toolbarRef.current);
      const onlyToolbarItem = hasOnlyToolbarItem(tabbables);
      if (!onlyToolbarItem) {
        (0, import_deprecated12.default)("Using custom components as toolbar controls", {
          since: "5.6",
          alternative: "ToolbarItem, ToolbarButton or ToolbarDropdownMenu components",
          link: "https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"
        });
      }
      setIsAccessibleToolbar(onlyToolbarItem);
    }, [toolbarRef]);
    (0, import_element113.useLayoutEffect)(() => {
      const observer = new window.MutationObserver(
        determineIsAccessibleToolbar
      );
      observer.observe(toolbarRef.current, {
        childList: true,
        subtree: true
      });
      return () => observer.disconnect();
    }, [determineIsAccessibleToolbar, isAccessibleToolbar, toolbarRef]);
    return isAccessibleToolbar;
  }
  function useToolbarFocus({
    toolbarRef,
    focusOnMount,
    isAccessibleToolbar,
    defaultIndex,
    onIndexChange,
    shouldUseKeyboardFocusShortcut,
    focusEditorOnEscape
  }) {
    const [initialFocusOnMount] = (0, import_element113.useState)(focusOnMount);
    const [initialIndex] = (0, import_element113.useState)(defaultIndex);
    const focusToolbar = (0, import_element113.useCallback)(() => {
      focusFirstTabbableIn(toolbarRef.current);
    }, [toolbarRef]);
    const focusToolbarViaShortcut = () => {
      if (shouldUseKeyboardFocusShortcut) {
        focusToolbar();
      }
    };
    (0, import_keyboard_shortcuts8.useShortcut)("core/block-editor/focus-toolbar", focusToolbarViaShortcut);
    (0, import_element113.useEffect)(() => {
      if (initialFocusOnMount) {
        focusToolbar();
      }
    }, [isAccessibleToolbar, initialFocusOnMount, focusToolbar]);
    (0, import_element113.useEffect)(() => {
      const navigableToolbarRef = toolbarRef.current;
      let raf2 = 0;
      if (!initialFocusOnMount && !hasFocusWithin(navigableToolbarRef)) {
        raf2 = window.requestAnimationFrame(() => {
          const items = getAllFocusableToolbarItemsIn(navigableToolbarRef);
          const index = initialIndex || 0;
          if (items[index] && hasFocusWithin(navigableToolbarRef)) {
            items[index].focus({
              // When focusing newly mounted toolbars,
              // the position of the popover is often not right on the first render
              // This prevents the layout shifts when focusing the dialogs.
              preventScroll: true
            });
          }
        });
      }
      return () => {
        window.cancelAnimationFrame(raf2);
        if (!onIndexChange || !navigableToolbarRef) {
          return;
        }
        const items = getAllFocusableToolbarItemsIn(navigableToolbarRef);
        const index = items.findIndex((item) => item.tabIndex === 0);
        onIndexChange(index);
      };
    }, [initialIndex, initialFocusOnMount, onIndexChange, toolbarRef]);
    const { getLastFocus: getLastFocus2 } = unlock((0, import_data104.useSelect)(store));
    (0, import_element113.useEffect)(() => {
      const navigableToolbarRef = toolbarRef.current;
      if (focusEditorOnEscape) {
        const handleKeyDown = (event) => {
          const lastFocus2 = getLastFocus2();
          if (event.keyCode === import_keycodes11.ESCAPE && lastFocus2?.current) {
            event.preventDefault();
            lastFocus2.current.focus();
          }
        };
        navigableToolbarRef.addEventListener("keydown", handleKeyDown);
        return () => {
          navigableToolbarRef.removeEventListener(
            "keydown",
            handleKeyDown
          );
        };
      }
    }, [focusEditorOnEscape, getLastFocus2, toolbarRef]);
  }
  function NavigableToolbar({
    children,
    focusOnMount,
    focusEditorOnEscape = false,
    shouldUseKeyboardFocusShortcut = true,
    __experimentalInitialIndex: initialIndex,
    __experimentalOnIndexChange: onIndexChange,
    orientation = "horizontal",
    ...props
  }) {
    const toolbarRef = (0, import_element113.useRef)();
    const isAccessibleToolbar = useIsAccessibleToolbar(toolbarRef);
    useToolbarFocus({
      toolbarRef,
      focusOnMount,
      defaultIndex: initialIndex,
      onIndexChange,
      isAccessibleToolbar,
      shouldUseKeyboardFocusShortcut,
      focusEditorOnEscape
    });
    if (isAccessibleToolbar) {
      return /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
        import_components101.Toolbar,
        {
          label: props["aria-label"],
          ref: toolbarRef,
          orientation,
          ...props,
          children
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
      import_components101.NavigableMenu,
      {
        orientation,
        role: "toolbar",
        ref: toolbarRef,
        ...props,
        children
      }
    );
  }

  // packages/block-editor/build-module/components/block-toolbar/use-has-block-toolbar.mjs
  var import_data105 = __toESM(require_data(), 1);
  var import_blocks62 = __toESM(require_blocks(), 1);
  function useHasBlockToolbar() {
    const enabled = (0, import_data105.useSelect)((select3) => {
      const { getBlockEditingMode: getBlockEditingMode2, getBlockName: getBlockName2, getBlockSelectionStart: getBlockSelectionStart2 } = select3(store);
      const selectedBlockClientId = getBlockSelectionStart2();
      const blockType = selectedBlockClientId && (0, import_blocks62.getBlockType)(getBlockName2(selectedBlockClientId));
      return blockType && (0, import_blocks62.hasBlockSupport)(blockType, "__experimentalToolbar", true) && getBlockEditingMode2(selectedBlockClientId) !== "disabled";
    }, []);
    return enabled;
  }

  // packages/block-editor/build-module/components/block-toolbar/change-design.mjs
  var import_components102 = __toESM(require_components(), 1);
  var import_i18n87 = __toESM(require_i18n(), 1);
  var import_blocks63 = __toESM(require_blocks(), 1);
  var import_element114 = __toESM(require_element(), 1);
  var import_data106 = __toESM(require_data(), 1);
  var import_jsx_runtime240 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_ARRAY8 = [];
  var MAX_PATTERNS_TO_SHOW = 6;
  var POPOVER_PROPS5 = {
    placement: "bottom-start"
  };
  function ChangeDesign({ clientId }) {
    const { categories, currentPatternName, patterns } = (0, import_data106.useSelect)(
      (select3) => {
        const {
          getBlockAttributes: getBlockAttributes3,
          getBlockRootClientId: getBlockRootClientId2,
          __experimentalGetAllowedPatterns: __experimentalGetAllowedPatterns2
        } = select3(store);
        const attributes = getBlockAttributes3(clientId);
        const _categories = attributes?.metadata?.categories || EMPTY_ARRAY8;
        const rootBlock = getBlockRootClientId2(clientId);
        const _patterns = _categories.length > 0 ? __experimentalGetAllowedPatterns2(rootBlock) : EMPTY_ARRAY8;
        return {
          categories: _categories,
          currentPatternName: attributes?.metadata?.patternName,
          patterns: _patterns
        };
      },
      [clientId]
    );
    const { replaceBlocks: replaceBlocks2 } = (0, import_data106.useDispatch)(store);
    const sameCategoryPatternsWithSingleWrapper = (0, import_element114.useMemo)(() => {
      if (categories.length === 0 || !patterns || patterns.length === 0) {
        return EMPTY_ARRAY8;
      }
      return patterns.filter((pattern) => {
        const isCorePattern = pattern.source === "core" || pattern.source?.startsWith("pattern-directory") && pattern.source !== "pattern-directory/theme";
        return (
          // Check if the pattern has only one top level block,
          // otherwise we may switch to a pattern that doesn't have replacement suggestions.
          pattern.blocks.length === 1 && // We exclude the core patterns and pattern directory patterns that are not theme patterns.
          !isCorePattern && // Exclude current pattern.
          currentPatternName !== pattern.name && pattern.categories?.some((category) => {
            return categories.includes(category);
          }) && // Check if the pattern is not a synced pattern.
          (pattern.syncStatus === "unsynced" || !pattern.id)
        );
      }).slice(0, MAX_PATTERNS_TO_SHOW);
    }, [categories, currentPatternName, patterns]);
    if (sameCategoryPatternsWithSingleWrapper.length < 2) {
      return null;
    }
    const onClickPattern = (pattern) => {
      const newBlocks = (pattern.blocks ?? []).map((block) => {
        return (0, import_blocks63.cloneBlock)(block);
      });
      newBlocks[0].attributes.metadata = {
        ...newBlocks[0].attributes.metadata,
        categories
      };
      replaceBlocks2(clientId, newBlocks);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(
      import_components102.Dropdown,
      {
        popoverProps: POPOVER_PROPS5,
        renderToggle: ({ onToggle, isOpen }) => {
          return /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(import_components102.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(
            import_components102.ToolbarButton,
            {
              onClick: () => onToggle(!isOpen),
              "aria-expanded": isOpen,
              children: (0, import_i18n87.__)("Change design")
            }
          ) });
        },
        renderContent: () => /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(
          import_components102.__experimentalDropdownContentWrapper,
          {
            className: "block-editor-block-toolbar-change-design-content-wrapper",
            paddingSize: "none",
            children: /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(
              block_patterns_list_default,
              {
                blockPatterns: sameCategoryPatternsWithSingleWrapper,
                onClickPattern,
                showTitlesAsTooltip: true
              }
            )
          }
        )
      }
    );
  }

  // packages/block-editor/build-module/components/block-toolbar/switch-section-style.mjs
  var import_components103 = __toESM(require_components(), 1);
  var import_i18n89 = __toESM(require_i18n(), 1);
  var import_data110 = __toESM(require_data(), 1);

  // packages/block-editor/build-module/components/block-styles/use-styles-for-block.mjs
  var import_data107 = __toESM(require_data(), 1);
  var import_blocks64 = __toESM(require_blocks(), 1);
  var import_element115 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/block-styles/utils.mjs
  var import_token_list = __toESM(require_token_list(), 1);
  var import_i18n88 = __toESM(require_i18n(), 1);
  function getActiveStyle(styles, className) {
    for (const style of new import_token_list.default(className).values()) {
      if (style.indexOf("is-style-") === -1) {
        continue;
      }
      const potentialStyleName = style.substring(9);
      const activeStyle = styles?.find(
        ({ name }) => name === potentialStyleName
      );
      if (activeStyle) {
        return activeStyle;
      }
    }
    return getDefaultStyle(styles);
  }
  function replaceActiveStyle(className, activeStyle, newStyle) {
    const list = new import_token_list.default(className);
    if (activeStyle) {
      list.remove("is-style-" + activeStyle.name);
    }
    list.add("is-style-" + newStyle.name);
    return list.value;
  }
  function getRenderedStyles(styles) {
    if (!styles || styles.length === 0) {
      return [];
    }
    return getDefaultStyle(styles) ? styles : [
      {
        name: "default",
        label: (0, import_i18n88._x)("Default", "block style"),
        isDefault: true
      },
      ...styles
    ];
  }
  function getDefaultStyle(styles) {
    return styles?.find((style) => style.isDefault);
  }

  // packages/block-editor/build-module/components/block-styles/use-styles-for-block.mjs
  function useGenericPreviewBlock(block, type) {
    return (0, import_element115.useMemo)(() => {
      const example = type?.example;
      const blockName = type?.name;
      if (example && blockName) {
        return (0, import_blocks64.getBlockFromExample)(blockName, {
          attributes: example.attributes,
          innerBlocks: example.innerBlocks
        });
      }
      if (block) {
        return (0, import_blocks64.cloneBlock)(block);
      }
    }, [block, type?.example, type?.name]);
  }
  function useStylesForBlocks({ clientId, onSwitch }) {
    const selector3 = (select3) => {
      const { getBlock: getBlock2 } = select3(store);
      const block2 = getBlock2(clientId);
      if (!block2) {
        return {};
      }
      const blockType2 = (0, import_blocks64.getBlockType)(block2.name);
      const { getBlockStyles: getBlockStyles2 } = select3(import_blocks64.store);
      return {
        block: !blockType2?.example ? block2 : null,
        blockType: blockType2,
        styles: getBlockStyles2(block2.name),
        className: block2.attributes.className || ""
      };
    };
    const { styles, block, blockType, className } = (0, import_data107.useSelect)(selector3, [
      clientId
    ]);
    const { updateBlockAttributes: updateBlockAttributes2 } = (0, import_data107.useDispatch)(store);
    const stylesToRender = getRenderedStyles(styles);
    const activeStyle = getActiveStyle(stylesToRender, className);
    const genericPreviewBlock = useGenericPreviewBlock(block, blockType);
    const onSelect = (style) => {
      const styleClassName = replaceActiveStyle(
        className,
        activeStyle,
        style
      );
      updateBlockAttributes2(clientId, {
        className: styleClassName
      });
      onSwitch();
    };
    return {
      onSelect,
      stylesToRender,
      activeStyle,
      genericPreviewBlock,
      className
    };
  }

  // packages/block-editor/build-module/hooks/block-style-variation.mjs
  var import_blocks66 = __toESM(require_blocks(), 1);
  var import_data109 = __toESM(require_data(), 1);
  var import_element116 = __toESM(require_element(), 1);

  // packages/global-styles-engine/build-module/utils/object.mjs
  function setImmutably2(object, path, value) {
    path = Array.isArray(path) ? [...path] : [path];
    object = Array.isArray(object) ? [...object] : { ...object };
    const leaf = path.pop();
    let prev = object;
    for (const key of path) {
      const lvl = prev[key];
      prev = prev[key] = Array.isArray(lvl) ? [...lvl] : { ...lvl };
    }
    prev[leaf] = value;
    return object;
  }
  var getValueFromObjectPath2 = (object, path, defaultValue) => {
    const arrayPath = Array.isArray(path) ? path : path.split(".");
    let value = object;
    arrayPath.forEach((fieldName) => {
      value = value?.[fieldName];
    });
    return value ?? defaultValue;
  };

  // packages/global-styles-engine/build-module/utils/common.mjs
  var import_style_engine2 = __toESM(require_style_engine(), 1);

  // packages/global-styles-engine/build-module/utils/fluid.mjs
  var DEFAULT_MAXIMUM_VIEWPORT_WIDTH2 = "1600px";
  var DEFAULT_MINIMUM_VIEWPORT_WIDTH2 = "320px";
  var DEFAULT_SCALE_FACTOR2 = 1;
  var DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN2 = 0.25;
  var DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX2 = 0.75;
  var DEFAULT_MINIMUM_FONT_SIZE_LIMIT2 = "14px";
  function getComputedFluidTypographyValue2({
    minimumFontSize,
    maximumFontSize,
    fontSize,
    minimumViewportWidth = DEFAULT_MINIMUM_VIEWPORT_WIDTH2,
    maximumViewportWidth = DEFAULT_MAXIMUM_VIEWPORT_WIDTH2,
    scaleFactor = DEFAULT_SCALE_FACTOR2,
    minimumFontSizeLimit
  }) {
    minimumFontSizeLimit = !!getTypographyValueAndUnit2(minimumFontSizeLimit) ? minimumFontSizeLimit : DEFAULT_MINIMUM_FONT_SIZE_LIMIT2;
    if (fontSize) {
      const fontSizeParsed = getTypographyValueAndUnit2(fontSize);
      if (!fontSizeParsed?.unit || !fontSizeParsed?.value) {
        return null;
      }
      const minimumFontSizeLimitParsed = getTypographyValueAndUnit2(
        minimumFontSizeLimit,
        {
          coerceTo: fontSizeParsed.unit
        }
      );
      if (!!minimumFontSizeLimitParsed?.value && !minimumFontSize && !maximumFontSize) {
        if (fontSizeParsed?.value <= minimumFontSizeLimitParsed?.value) {
          return null;
        }
      }
      if (!maximumFontSize) {
        maximumFontSize = `${fontSizeParsed.value}${fontSizeParsed.unit}`;
      }
      if (!minimumFontSize) {
        const fontSizeValueInPx = fontSizeParsed.unit === "px" ? fontSizeParsed.value : fontSizeParsed.value * 16;
        const minimumFontSizeFactor = Math.min(
          Math.max(
            1 - 0.075 * Math.log2(fontSizeValueInPx),
            DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN2
          ),
          DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX2
        );
        const calculatedMinimumFontSize = roundToPrecision2(
          fontSizeParsed.value * minimumFontSizeFactor,
          3
        );
        if (!!minimumFontSizeLimitParsed?.value && calculatedMinimumFontSize < minimumFontSizeLimitParsed?.value) {
          minimumFontSize = `${minimumFontSizeLimitParsed.value}${minimumFontSizeLimitParsed.unit}`;
        } else {
          minimumFontSize = `${calculatedMinimumFontSize}${fontSizeParsed.unit}`;
        }
      }
    }
    const minimumFontSizeParsed = getTypographyValueAndUnit2(minimumFontSize);
    const fontSizeUnit = minimumFontSizeParsed?.unit || "rem";
    const maximumFontSizeParsed = getTypographyValueAndUnit2(maximumFontSize, {
      coerceTo: fontSizeUnit
    });
    if (!minimumFontSizeParsed || !maximumFontSizeParsed) {
      return null;
    }
    const minimumFontSizeRem = getTypographyValueAndUnit2(minimumFontSize, {
      coerceTo: "rem"
    });
    const maximumViewportWidthParsed = getTypographyValueAndUnit2(
      maximumViewportWidth,
      { coerceTo: fontSizeUnit }
    );
    const minimumViewportWidthParsed = getTypographyValueAndUnit2(
      minimumViewportWidth,
      { coerceTo: fontSizeUnit }
    );
    if (!maximumViewportWidthParsed || !minimumViewportWidthParsed || !minimumFontSizeRem) {
      return null;
    }
    const linearDenominator = maximumViewportWidthParsed.value - minimumViewportWidthParsed.value;
    if (!linearDenominator) {
      return null;
    }
    const minViewportWidthOffsetValue = roundToPrecision2(
      minimumViewportWidthParsed.value / 100,
      3
    );
    const viewportWidthOffset = roundToPrecision2(minViewportWidthOffsetValue, 3) + fontSizeUnit;
    const linearFactor = 100 * ((maximumFontSizeParsed.value - minimumFontSizeParsed.value) / linearDenominator);
    const linearFactorScaled = roundToPrecision2(
      (linearFactor || 1) * scaleFactor,
      3
    );
    const fluidTargetFontSize = `${minimumFontSizeRem.value}${minimumFontSizeRem.unit} + ((1vw - ${viewportWidthOffset}) * ${linearFactorScaled})`;
    return `clamp(${minimumFontSize}, ${fluidTargetFontSize}, ${maximumFontSize})`;
  }
  function getTypographyValueAndUnit2(rawValue, options = {}) {
    if (typeof rawValue !== "string" && typeof rawValue !== "number") {
      return null;
    }
    if (isFinite(rawValue)) {
      rawValue = `${rawValue}px`;
    }
    const { coerceTo, rootSizeValue, acceptableUnits } = {
      coerceTo: "",
      // Default browser font size. Later we could inject some JS to compute this `getComputedStyle( document.querySelector( "html" ) ).fontSize`.
      rootSizeValue: 16,
      acceptableUnits: ["rem", "px", "em"],
      ...options
    };
    const acceptableUnitsGroup = acceptableUnits?.join("|");
    const regexUnits = new RegExp(
      `^(\\d*\\.?\\d+)(${acceptableUnitsGroup}){1,1}$`
    );
    const matches = rawValue.toString().match(regexUnits);
    if (!matches || matches.length < 3) {
      return null;
    }
    let [, value, unit] = matches;
    let returnValue = parseFloat(value);
    if ("px" === coerceTo && ("em" === unit || "rem" === unit)) {
      returnValue = returnValue * rootSizeValue;
      unit = coerceTo;
    }
    if ("px" === unit && ("em" === coerceTo || "rem" === coerceTo)) {
      returnValue = returnValue / rootSizeValue;
      unit = coerceTo;
    }
    if (("em" === coerceTo || "rem" === coerceTo) && ("em" === unit || "rem" === unit)) {
      unit = coerceTo;
    }
    if (!unit) {
      return null;
    }
    return {
      value: roundToPrecision2(returnValue, 3),
      unit
    };
  }
  function roundToPrecision2(value, digits = 3) {
    const base = Math.pow(10, digits);
    return Math.round(value * base) / base;
  }

  // packages/global-styles-engine/build-module/utils/typography.mjs
  function isFluidTypographyEnabled(typographySettings) {
    const fluidSettings = typographySettings?.fluid;
    return true === fluidSettings || fluidSettings && typeof fluidSettings === "object" && Object.keys(fluidSettings).length > 0;
  }
  function getFluidTypographyOptionsFromSettings(settings2) {
    const typographySettings = settings2?.typography ?? {};
    const layoutSettings = settings2?.layout;
    const defaultMaxViewportWidth = getTypographyValueAndUnit2(
      layoutSettings?.wideSize
    ) ? layoutSettings?.wideSize : null;
    return isFluidTypographyEnabled(typographySettings) && defaultMaxViewportWidth ? {
      fluid: {
        maxViewportWidth: defaultMaxViewportWidth,
        ...typeof typographySettings.fluid === "object" ? typographySettings.fluid : {}
      }
    } : {
      fluid: typographySettings?.fluid
    };
  }
  function getTypographyFontSizeValue(preset, settings2) {
    const { size: defaultSize } = preset;
    if (!defaultSize || "0" === defaultSize || false === preset?.fluid) {
      return defaultSize;
    }
    if (!isFluidTypographyEnabled(settings2?.typography) && !isFluidTypographyEnabled(preset)) {
      return defaultSize;
    }
    const fluidTypographySettings = getFluidTypographyOptionsFromSettings(settings2)?.fluid ?? {};
    const fluidFontSizeValue = getComputedFluidTypographyValue2({
      minimumFontSize: typeof preset?.fluid === "boolean" ? void 0 : preset?.fluid?.min,
      maximumFontSize: typeof preset?.fluid === "boolean" ? void 0 : preset?.fluid?.max,
      fontSize: defaultSize,
      minimumFontSizeLimit: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.minFontSize : void 0,
      maximumViewportWidth: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.maxViewportWidth : void 0,
      minimumViewportWidth: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.minViewportWidth : void 0
    });
    if (!!fluidFontSizeValue) {
      return fluidFontSizeValue;
    }
    return defaultSize;
  }

  // packages/global-styles-engine/build-module/utils/common.mjs
  var ROOT_BLOCK_SELECTOR = "body";
  var ROOT_CSS_PROPERTIES_SELECTOR = ":root";
  var PRESET_METADATA = [
    {
      path: ["color", "palette"],
      valueKey: "color",
      cssVarInfix: "color",
      classes: [
        { classSuffix: "color", propertyName: "color" },
        {
          classSuffix: "background-color",
          propertyName: "background-color"
        },
        {
          classSuffix: "border-color",
          propertyName: "border-color"
        }
      ]
    },
    {
      path: ["color", "gradients"],
      valueKey: "gradient",
      cssVarInfix: "gradient",
      classes: [
        {
          classSuffix: "gradient-background",
          propertyName: "background"
        }
      ]
    },
    {
      path: ["color", "duotone"],
      valueKey: "colors",
      cssVarInfix: "duotone",
      valueFunc: ({ slug }) => `url( '#wp-duotone-${slug}' )`,
      classes: []
    },
    {
      path: ["shadow", "presets"],
      valueKey: "shadow",
      cssVarInfix: "shadow",
      classes: []
    },
    {
      path: ["typography", "fontSizes"],
      valueFunc: (preset, settings2) => getTypographyFontSizeValue(preset, settings2),
      valueKey: "size",
      cssVarInfix: "font-size",
      classes: [{ classSuffix: "font-size", propertyName: "font-size" }]
    },
    {
      path: ["typography", "fontFamilies"],
      valueKey: "fontFamily",
      cssVarInfix: "font-family",
      classes: [
        { classSuffix: "font-family", propertyName: "font-family" }
      ]
    },
    {
      path: ["spacing", "spacingSizes"],
      valueKey: "size",
      cssVarInfix: "spacing",
      valueFunc: ({ size }) => size,
      classes: []
    },
    {
      path: ["border", "radiusSizes"],
      valueKey: "size",
      cssVarInfix: "border-radius",
      classes: []
    },
    {
      path: ["dimensions", "dimensionSizes"],
      valueKey: "size",
      cssVarInfix: "dimension",
      classes: []
    }
  ];
  function scopeSelector2(scope, selector3) {
    if (!scope || !selector3) {
      return selector3;
    }
    const scopes = scope.split(",");
    const selectors = selector3.split(",");
    const selectorsScoped = [];
    scopes.forEach((outer) => {
      selectors.forEach((inner) => {
        selectorsScoped.push(`${outer.trim()} ${inner.trim()}`);
      });
    });
    return selectorsScoped.join(", ");
  }
  function scopeFeatureSelectors(scope, selectors) {
    if (!scope || !selectors) {
      return;
    }
    const featureSelectors = {};
    Object.entries(selectors).forEach(([feature, selector3]) => {
      if (typeof selector3 === "string") {
        featureSelectors[feature] = scopeSelector2(scope, selector3);
      }
      if (typeof selector3 === "object") {
        featureSelectors[feature] = {};
        Object.entries(selector3).forEach(
          ([subfeature, subfeatureSelector]) => {
            featureSelectors[feature][subfeature] = scopeSelector2(
              scope,
              subfeatureSelector
            );
          }
        );
      }
    });
    return featureSelectors;
  }
  function appendToSelector(selector3, toAppend) {
    if (!selector3.includes(",")) {
      return selector3 + toAppend;
    }
    const selectors = selector3.split(",");
    const newSelectors = selectors.map((sel) => sel + toAppend);
    return newSelectors.join(",");
  }
  function getBlockStyleVariationSelector(variation, blockSelector) {
    const variationClass = `.is-style-${variation}`;
    if (!blockSelector) {
      return variationClass;
    }
    const ancestorRegex = /((?::\([^)]+\))?\s*)([^\s:]+)/;
    const addVariationClass = (_match, group1, group2) => {
      return group1 + group2 + variationClass;
    };
    const result = blockSelector.split(",").map((part) => part.replace(ancestorRegex, addVariationClass));
    return result.join(",");
  }
  function getResolvedRefValue(ruleValue, tree) {
    if (!ruleValue || !tree) {
      return ruleValue;
    }
    if (typeof ruleValue === "object" && "ref" in ruleValue && ruleValue?.ref) {
      const resolvedRuleValue = (0, import_style_engine2.getCSSValueFromRawStyle)(
        getValueFromObjectPath2(tree, ruleValue.ref)
      );
      if (typeof resolvedRuleValue === "object" && resolvedRuleValue !== null && "ref" in resolvedRuleValue && resolvedRuleValue?.ref) {
        return void 0;
      }
      if (resolvedRuleValue === void 0) {
        return ruleValue;
      }
      return resolvedRuleValue;
    }
    return ruleValue;
  }
  function getResolvedThemeFilePath(file, themeFileURIs) {
    if (!file || !themeFileURIs || !Array.isArray(themeFileURIs)) {
      return file;
    }
    const uri = themeFileURIs.find(
      (themeFileUri) => themeFileUri?.name === file
    );
    if (!uri?.href) {
      return file;
    }
    return uri?.href;
  }
  function getResolvedValue(ruleValue, tree) {
    if (!ruleValue || !tree) {
      return ruleValue;
    }
    const resolvedValue = getResolvedRefValue(ruleValue, tree);
    if (typeof resolvedValue === "object" && resolvedValue !== null && "url" in resolvedValue && resolvedValue?.url) {
      resolvedValue.url = getResolvedThemeFilePath(
        resolvedValue.url,
        tree?._links?.["wp:theme-file"]
      );
    }
    return resolvedValue;
  }
  function findInPresetsBy(settings2, blockName, presetPath = [], presetProperty = "slug", presetValueValue) {
    const orderedPresetsByOrigin = [
      blockName ? getValueFromObjectPath2(settings2, [
        "blocks",
        blockName,
        ...presetPath
      ]) : void 0,
      getValueFromObjectPath2(settings2, presetPath)
    ].filter(Boolean);
    for (const presetByOrigin of orderedPresetsByOrigin) {
      if (presetByOrigin) {
        const origins = ["custom", "theme", "default"];
        for (const origin of origins) {
          const presets = presetByOrigin[origin];
          if (presets) {
            const presetObject = presets.find(
              (preset) => preset[presetProperty] === presetValueValue
            );
            if (presetObject) {
              if (presetProperty === "slug") {
                return presetObject;
              }
              const highestPresetObjectWithSameSlug = findInPresetsBy(
                settings2,
                blockName,
                presetPath,
                "slug",
                presetObject.slug
              );
              if (highestPresetObjectWithSameSlug[presetProperty] === presetObject[presetProperty]) {
                return presetObject;
              }
              return void 0;
            }
          }
        }
      }
    }
  }
  function getValueFromPresetVariable(features, blockName, variable, [presetType, slug] = []) {
    const metadata = PRESET_METADATA.find(
      (data) => data.cssVarInfix === presetType
    );
    if (!metadata || !features.settings) {
      return variable;
    }
    const presetObject = findInPresetsBy(
      features.settings,
      blockName,
      metadata.path,
      "slug",
      slug
    );
    if (presetObject) {
      const { valueKey } = metadata;
      const result = presetObject[valueKey];
      return getValueFromVariable(features, blockName, result);
    }
    return variable;
  }
  function getValueFromCustomVariable(features, blockName, variable, path = []) {
    const result = (blockName ? getValueFromObjectPath2(features?.settings ?? {}, [
      "blocks",
      blockName,
      "custom",
      ...path
    ]) : void 0) ?? getValueFromObjectPath2(features?.settings ?? {}, [
      "custom",
      ...path
    ]);
    if (!result) {
      return variable;
    }
    return getValueFromVariable(features, blockName, result);
  }
  function getValueFromVariable(features, blockName, variable) {
    if (!variable || typeof variable !== "string") {
      if (typeof variable === "object" && variable !== null && "ref" in variable && typeof variable.ref === "string") {
        const resolvedVariable = getValueFromObjectPath2(
          features,
          variable.ref
        );
        if (!resolvedVariable || typeof resolvedVariable === "object" && "ref" in resolvedVariable) {
          return resolvedVariable;
        }
        variable = resolvedVariable;
      } else {
        return variable;
      }
    }
    const USER_VALUE_PREFIX = "var:";
    const THEME_VALUE_PREFIX = "var(--wp--";
    const THEME_VALUE_SUFFIX = ")";
    let parsedVar;
    if (variable.startsWith(USER_VALUE_PREFIX)) {
      parsedVar = variable.slice(USER_VALUE_PREFIX.length).split("|");
    } else if (variable.startsWith(THEME_VALUE_PREFIX) && variable.endsWith(THEME_VALUE_SUFFIX)) {
      parsedVar = variable.slice(THEME_VALUE_PREFIX.length, -THEME_VALUE_SUFFIX.length).split("--");
    } else {
      return variable;
    }
    const [type, ...path] = parsedVar;
    if (type === "preset") {
      return getValueFromPresetVariable(
        features,
        blockName,
        variable,
        path
      );
    }
    if (type === "custom") {
      return getValueFromCustomVariable(
        features,
        blockName,
        variable,
        path
      );
    }
    return variable;
  }

  // packages/global-styles-engine/build-module/core/render.mjs
  var import_blocks65 = __toESM(require_blocks(), 1);
  var import_style_engine3 = __toESM(require_style_engine(), 1);
  var import_data108 = __toESM(require_data(), 1);

  // packages/global-styles-engine/build-module/core/selectors.mjs
  function getBlockSelector(blockType, target = "root", options = {}) {
    if (!target) {
      return null;
    }
    const { fallback = false } = options;
    const { name, selectors, supports } = blockType;
    const hasSelectors = selectors && Object.keys(selectors).length > 0;
    const path = Array.isArray(target) ? target.join(".") : target;
    let rootSelector = null;
    if (hasSelectors && selectors.root) {
      rootSelector = selectors?.root;
    } else if (supports?.__experimentalSelector) {
      rootSelector = supports.__experimentalSelector;
    } else {
      rootSelector = ".wp-block-" + name.replace("core/", "").replace("/", "-");
    }
    if (path === "root") {
      return rootSelector;
    }
    const pathArray = Array.isArray(target) ? target : target.split(".");
    if (pathArray.length === 1) {
      const fallbackSelector = fallback ? rootSelector : null;
      if (hasSelectors) {
        const featureSelector2 = getValueFromObjectPath2(
          selectors,
          `${path}.root`,
          null
        ) || getValueFromObjectPath2(selectors, path, null);
        return featureSelector2 || fallbackSelector;
      }
      const featureSelector = supports ? getValueFromObjectPath2(
        supports,
        `${path}.__experimentalSelector`,
        null
      ) : void 0;
      if (!featureSelector) {
        return fallbackSelector;
      }
      return scopeSelector2(rootSelector, featureSelector);
    }
    let subfeatureSelector;
    if (hasSelectors) {
      subfeatureSelector = getValueFromObjectPath2(selectors, path, null);
    }
    if (subfeatureSelector) {
      return subfeatureSelector;
    }
    if (fallback) {
      return getBlockSelector(blockType, pathArray[0], options);
    }
    return null;
  }

  // packages/global-styles-engine/build-module/utils/string.mjs
  function kebabCase4(str) {
    return str.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([0-9])([a-zA-Z])/g, "$1-$2").replace(/([a-zA-Z])([0-9])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
  }

  // packages/global-styles-engine/build-module/utils/spacing.mjs
  function getSpacingPresetCssVar2(value) {
    if (!value) {
      return;
    }
    const slug = value.match(/var:preset\|spacing\|(.+)/);
    if (!slug) {
      return value;
    }
    return `var(--wp--preset--spacing--${slug[1]})`;
  }

  // packages/global-styles-engine/build-module/utils/gap.mjs
  function getGapBoxControlValueFromStyle2(blockGapValue) {
    if (!blockGapValue) {
      return null;
    }
    const isValueString = typeof blockGapValue === "string";
    return {
      top: isValueString ? blockGapValue : blockGapValue?.top,
      left: isValueString ? blockGapValue : blockGapValue?.left
    };
  }
  function getGapCSSValue2(blockGapValue, defaultValue = "0") {
    const blockGapBoxControlValue = getGapBoxControlValueFromStyle2(blockGapValue);
    if (!blockGapBoxControlValue) {
      return null;
    }
    const row = getSpacingPresetCssVar2(blockGapBoxControlValue?.top) || defaultValue;
    const column = getSpacingPresetCssVar2(blockGapBoxControlValue?.left) || defaultValue;
    return row === column ? row : `${row} ${column}`;
  }

  // packages/global-styles-engine/build-module/utils/background.mjs
  var BACKGROUND_BLOCK_DEFAULT_VALUES = {
    backgroundSize: "cover",
    backgroundPosition: "50% 50%"
    // used only when backgroundSize is 'contain'.
  };
  function setBackgroundStyleDefaults(backgroundStyle) {
    if (!backgroundStyle || // @ts-expect-error
    !backgroundStyle?.backgroundImage?.url) {
      return;
    }
    let backgroundStylesWithDefaults;
    if (!backgroundStyle?.backgroundSize) {
      backgroundStylesWithDefaults = {
        backgroundSize: BACKGROUND_BLOCK_DEFAULT_VALUES.backgroundSize
      };
    }
    if ("contain" === backgroundStyle?.backgroundSize && !backgroundStyle?.backgroundPosition) {
      backgroundStylesWithDefaults = {
        backgroundPosition: BACKGROUND_BLOCK_DEFAULT_VALUES.backgroundPosition
      };
    }
    return backgroundStylesWithDefaults;
  }

  // packages/global-styles-engine/build-module/utils/layout.mjs
  var LAYOUT_DEFINITIONS2 = {
    default: {
      name: "default",
      slug: "flow",
      className: "is-layout-flow",
      baseStyles: [
        {
          selector: " > .alignleft",
          rules: {
            float: "left",
            "margin-inline-start": "0",
            "margin-inline-end": "2em"
          }
        },
        {
          selector: " > .alignright",
          rules: {
            float: "right",
            "margin-inline-start": "2em",
            "margin-inline-end": "0"
          }
        },
        {
          selector: " > .aligncenter",
          rules: {
            "margin-left": "auto !important",
            "margin-right": "auto !important"
          }
        }
      ],
      spacingStyles: [
        {
          selector: " > :first-child",
          rules: {
            "margin-block-start": "0"
          }
        },
        {
          selector: " > :last-child",
          rules: {
            "margin-block-end": "0"
          }
        },
        {
          selector: " > *",
          rules: {
            "margin-block-start": null,
            "margin-block-end": "0"
          }
        }
      ]
    },
    constrained: {
      name: "constrained",
      slug: "constrained",
      className: "is-layout-constrained",
      baseStyles: [
        {
          selector: " > .alignleft",
          rules: {
            float: "left",
            "margin-inline-start": "0",
            "margin-inline-end": "2em"
          }
        },
        {
          selector: " > .alignright",
          rules: {
            float: "right",
            "margin-inline-start": "2em",
            "margin-inline-end": "0"
          }
        },
        {
          selector: " > .aligncenter",
          rules: {
            "margin-left": "auto !important",
            "margin-right": "auto !important"
          }
        },
        {
          selector: " > :where(:not(.alignleft):not(.alignright):not(.alignfull))",
          rules: {
            "max-width": "var(--wp--style--global--content-size)",
            "margin-left": "auto !important",
            "margin-right": "auto !important"
          }
        },
        {
          selector: " > .alignwide",
          rules: {
            "max-width": "var(--wp--style--global--wide-size)"
          }
        }
      ],
      spacingStyles: [
        {
          selector: " > :first-child",
          rules: {
            "margin-block-start": "0"
          }
        },
        {
          selector: " > :last-child",
          rules: {
            "margin-block-end": "0"
          }
        },
        {
          selector: " > *",
          rules: {
            "margin-block-start": null,
            "margin-block-end": "0"
          }
        }
      ]
    },
    flex: {
      name: "flex",
      slug: "flex",
      className: "is-layout-flex",
      displayMode: "flex",
      baseStyles: [
        {
          selector: "",
          rules: {
            "flex-wrap": "wrap",
            "align-items": "center"
          }
        },
        {
          selector: " > :is(*, div)",
          // :is(*, div) instead of just * increases the specificity by 001.
          rules: {
            margin: "0"
          }
        }
      ],
      spacingStyles: [
        {
          selector: "",
          rules: {
            gap: null
          }
        }
      ]
    },
    grid: {
      name: "grid",
      slug: "grid",
      className: "is-layout-grid",
      displayMode: "grid",
      baseStyles: [
        {
          selector: " > :is(*, div)",
          // :is(*, div) instead of just * increases the specificity by 001.
          rules: {
            margin: "0"
          }
        }
      ],
      spacingStyles: [
        {
          selector: "",
          rules: {
            gap: null
          }
        }
      ]
    }
  };

  // packages/global-styles-engine/build-module/core/render.mjs
  var ELEMENT_CLASS_NAMES = {
    button: "wp-element-button",
    caption: "wp-element-caption"
  };
  var BLOCK_SUPPORT_FEATURE_LEVEL_SELECTORS = {
    __experimentalBorder: "border",
    color: "color",
    dimensions: "dimensions",
    spacing: "spacing",
    typography: "typography"
  };
  function getPresetsClasses(blockSelector = "*", blockPresets = {}) {
    return PRESET_METADATA.reduce(
      (declarations, { path, cssVarInfix, classes }) => {
        if (!classes) {
          return declarations;
        }
        const presetByOrigin = getValueFromObjectPath2(
          blockPresets,
          path,
          []
        );
        ["default", "theme", "custom"].forEach((origin) => {
          if (presetByOrigin[origin]) {
            presetByOrigin[origin].forEach(
              ({ slug }) => {
                classes.forEach(
                  ({
                    classSuffix,
                    propertyName
                  }) => {
                    const classSelectorToUse = `.has-${kebabCase4(
                      slug
                    )}-${classSuffix}`;
                    const selectorToUse = blockSelector.split(",").map(
                      (selector3) => `${selector3}${classSelectorToUse}`
                    ).join(",");
                    const value = `var(--wp--preset--${cssVarInfix}--${kebabCase4(
                      slug
                    )})`;
                    declarations += `${selectorToUse}{${propertyName}: ${value} !important;}`;
                  }
                );
              }
            );
          }
        });
        return declarations;
      },
      ""
    );
  }
  function concatFeatureVariationSelectorString(featureSelector, styleVariationSelector) {
    const featureSelectors = featureSelector.split(",");
    const combinedSelectors = [];
    featureSelectors.forEach((selector3) => {
      combinedSelectors.push(
        `${styleVariationSelector.trim()}${selector3.trim()}`
      );
    });
    return combinedSelectors.join(", ");
  }
  var updateParagraphTextIndentSelector = (featureDeclarations, settings2, blockName) => {
    if (blockName !== "core/paragraph") {
      return featureDeclarations;
    }
    const blockSettings = settings2?.blocks?.["core/paragraph"];
    const textIndentSetting = blockSettings?.typography?.textIndent ?? settings2?.typography?.textIndent ?? "subsequent";
    if (textIndentSetting !== "all") {
      return featureDeclarations;
    }
    const oldSelector = ".wp-block-paragraph + .wp-block-paragraph";
    const newSelector = ".wp-block-paragraph";
    if (oldSelector in featureDeclarations) {
      const declarations = featureDeclarations[oldSelector];
      const updated = { ...featureDeclarations };
      delete updated[oldSelector];
      updated[newSelector] = declarations;
      return updated;
    }
    return featureDeclarations;
  };
  var getFeatureDeclarations = (selectors, styles) => {
    const declarations = {};
    Object.entries(selectors).forEach(([feature, selector3]) => {
      if (feature === "root" || !styles?.[feature]) {
        return;
      }
      const isShorthand = typeof selector3 === "string";
      if (!isShorthand && typeof selector3 === "object" && selector3 !== null) {
        Object.entries(selector3).forEach(
          ([subfeature, subfeatureSelector]) => {
            if (subfeature === "root" || !styles?.[feature][subfeature]) {
              return;
            }
            const subfeatureStyles = {
              [feature]: {
                [subfeature]: styles[feature][subfeature]
              }
            };
            const newDeclarations = getStylesDeclarations(subfeatureStyles);
            declarations[subfeatureSelector] = [
              ...declarations[subfeatureSelector] || [],
              ...newDeclarations
            ];
            delete styles[feature][subfeature];
          }
        );
      }
      if (isShorthand || typeof selector3 === "object" && selector3 !== null && "root" in selector3) {
        const featureSelector = isShorthand ? selector3 : selector3.root;
        const featureStyles = { [feature]: styles[feature] };
        const newDeclarations = getStylesDeclarations(featureStyles);
        declarations[featureSelector] = [
          ...declarations[featureSelector] || [],
          ...newDeclarations
        ];
        delete styles[feature];
      }
    });
    return declarations;
  };
  function getStylesDeclarations(blockStyles = {}, selector3 = "", useRootPaddingAlign, tree = {}, disableRootPadding = false) {
    const isRoot = ROOT_BLOCK_SELECTOR === selector3;
    const output = Object.entries(
      import_blocks65.__EXPERIMENTAL_STYLE_PROPERTY
    ).reduce(
      (declarations, [key, { value, properties, useEngine, rootOnly }]) => {
        if (rootOnly && !isRoot) {
          return declarations;
        }
        const pathToValue = value;
        if (pathToValue[0] === "elements" || useEngine) {
          return declarations;
        }
        const styleValue = getValueFromObjectPath2(
          blockStyles,
          pathToValue
        );
        if (key === "--wp--style--root--padding" && (typeof styleValue === "string" || !useRootPaddingAlign)) {
          return declarations;
        }
        if (properties && typeof styleValue !== "string") {
          Object.entries(properties).forEach((entry) => {
            const [name, prop] = entry;
            if (!getValueFromObjectPath2(styleValue, [prop], false)) {
              return;
            }
            const cssProperty = name.startsWith("--") ? name : kebabCase4(name);
            declarations.push(
              `${cssProperty}: ${(0, import_style_engine3.getCSSValueFromRawStyle)(
                getValueFromObjectPath2(styleValue, [prop])
              )}`
            );
          });
        } else if (getValueFromObjectPath2(blockStyles, pathToValue, false)) {
          const cssProperty = key.startsWith("--") ? key : kebabCase4(key);
          declarations.push(
            `${cssProperty}: ${(0, import_style_engine3.getCSSValueFromRawStyle)(
              getValueFromObjectPath2(blockStyles, pathToValue)
            )}`
          );
        }
        return declarations;
      },
      []
    );
    if (!!blockStyles.background) {
      if (blockStyles.background?.backgroundImage) {
        blockStyles.background.backgroundImage = getResolvedValue(
          blockStyles.background.backgroundImage,
          tree
        );
      }
      if (!isRoot && !!blockStyles.background?.backgroundImage?.id) {
        blockStyles = {
          ...blockStyles,
          background: {
            ...blockStyles.background,
            ...setBackgroundStyleDefaults(blockStyles.background)
          }
        };
      }
    }
    const extraRules = (0, import_style_engine3.getCSSRules)(blockStyles);
    extraRules.forEach((rule) => {
      if (isRoot && (useRootPaddingAlign || disableRootPadding) && rule.key.startsWith("padding")) {
        return;
      }
      const cssProperty = rule.key.startsWith("--") ? rule.key : kebabCase4(rule.key);
      let ruleValue = getResolvedValue(rule.value, tree);
      if (cssProperty === "font-size") {
        ruleValue = getTypographyFontSizeValue(
          { name: "", slug: "", size: ruleValue },
          tree?.settings
        );
      }
      if (cssProperty === "aspect-ratio") {
        output.push("min-height: unset");
      }
      output.push(`${cssProperty}: ${ruleValue}`);
    });
    return output;
  }
  function getLayoutStyles({
    layoutDefinitions = LAYOUT_DEFINITIONS2,
    style,
    selector: selector3,
    hasBlockGapSupport,
    hasFallbackGapSupport,
    fallbackGapValue
  }) {
    let ruleset = "";
    let gapValue = hasBlockGapSupport ? getGapCSSValue2(style?.spacing?.blockGap) : "";
    if (hasFallbackGapSupport) {
      if (selector3 === ROOT_BLOCK_SELECTOR) {
        gapValue = !gapValue ? "0.5em" : gapValue;
      } else if (!hasBlockGapSupport && fallbackGapValue) {
        gapValue = fallbackGapValue;
      }
    }
    if (gapValue && layoutDefinitions) {
      Object.values(layoutDefinitions).forEach(
        ({ className, name, spacingStyles }) => {
          if (!hasBlockGapSupport && "flex" !== name && "grid" !== name) {
            return;
          }
          if (spacingStyles?.length) {
            spacingStyles.forEach((spacingStyle) => {
              const declarations = [];
              if (spacingStyle.rules) {
                Object.entries(spacingStyle.rules).forEach(
                  ([cssProperty, cssValue]) => {
                    declarations.push(
                      `${cssProperty}: ${cssValue ? cssValue : gapValue}`
                    );
                  }
                );
              }
              if (declarations.length) {
                let combinedSelector = "";
                if (!hasBlockGapSupport) {
                  combinedSelector = selector3 === ROOT_BLOCK_SELECTOR ? `:where(.${className}${spacingStyle?.selector || ""})` : `:where(${selector3}.${className}${spacingStyle?.selector || ""})`;
                } else {
                  combinedSelector = selector3 === ROOT_BLOCK_SELECTOR ? `:root :where(.${className})${spacingStyle?.selector || ""}` : `:root :where(${selector3}-${className})${spacingStyle?.selector || ""}`;
                }
                ruleset += `${combinedSelector} { ${declarations.join(
                  "; "
                )}; }`;
              }
            });
          }
        }
      );
      if (selector3 === ROOT_BLOCK_SELECTOR && hasBlockGapSupport) {
        ruleset += `${ROOT_CSS_PROPERTIES_SELECTOR} { --wp--style--block-gap: ${gapValue}; }`;
      }
    }
    if (selector3 === ROOT_BLOCK_SELECTOR && layoutDefinitions) {
      const validDisplayModes = ["block", "flex", "grid"];
      Object.values(layoutDefinitions).forEach(
        ({ className, displayMode, baseStyles }) => {
          if (displayMode && validDisplayModes.includes(displayMode)) {
            ruleset += `${selector3} .${className} { display:${displayMode}; }`;
          }
          if (baseStyles?.length) {
            baseStyles.forEach((baseStyle) => {
              const declarations = [];
              if (baseStyle.rules) {
                Object.entries(baseStyle.rules).forEach(
                  ([cssProperty, cssValue]) => {
                    declarations.push(
                      `${cssProperty}: ${cssValue}`
                    );
                  }
                );
              }
              if (declarations.length) {
                const combinedSelector = `.${className}${baseStyle?.selector || ""}`;
                ruleset += `${combinedSelector} { ${declarations.join(
                  "; "
                )}; }`;
              }
            });
          }
        }
      );
    }
    return ruleset;
  }
  var STYLE_KEYS = [
    "border",
    "color",
    "dimensions",
    "spacing",
    "typography",
    "filter",
    "outline",
    "shadow",
    "background"
  ];
  function pickStyleKeys(treeToPickFrom) {
    if (!treeToPickFrom) {
      return {};
    }
    const entries = Object.entries(treeToPickFrom);
    const pickedEntries = entries.filter(
      ([key]) => STYLE_KEYS.includes(key)
    );
    const clonedEntries = pickedEntries.map(([key, style]) => [
      key,
      JSON.parse(JSON.stringify(style))
    ]);
    return Object.fromEntries(clonedEntries);
  }
  var getNodesWithStyles = (tree, blockSelectors) => {
    const nodes = [];
    if (!tree?.styles) {
      return nodes;
    }
    const styles = pickStyleKeys(tree.styles);
    if (styles) {
      nodes.push({
        styles,
        selector: ROOT_BLOCK_SELECTOR,
        // Root selector (body) styles should not be wrapped in `:root where()` to keep
        // specificity at (0,0,1) and maintain backwards compatibility.
        skipSelectorWrapper: true
      });
    }
    Object.entries(import_blocks65.__EXPERIMENTAL_ELEMENTS).forEach(([name, selector3]) => {
      if (tree.styles?.elements?.[name]) {
        nodes.push({
          styles: tree.styles?.elements?.[name] ?? {},
          selector: selector3,
          // Top level elements that don't use a class name should not receive the
          // `:root :where()` wrapper to maintain backwards compatibility.
          skipSelectorWrapper: !ELEMENT_CLASS_NAMES[name]
        });
      }
    });
    Object.entries(tree.styles?.blocks ?? {}).forEach(
      ([blockName, node]) => {
        const blockStyles = pickStyleKeys(node);
        const typedNode = node;
        const variationNodesToAdd = [];
        if (typedNode?.variations) {
          const variations = {};
          Object.entries(typedNode.variations).forEach(
            ([variationName, variation]) => {
              const typedVariation = variation;
              variations[variationName] = pickStyleKeys(typedVariation);
              if (typedVariation?.css) {
                variations[variationName].css = typedVariation.css;
              }
              const variationSelector = typeof blockSelectors !== "string" ? blockSelectors[blockName]?.styleVariationSelectors?.[variationName] : void 0;
              Object.entries(
                typedVariation?.elements ?? {}
              ).forEach(([element, elementStyles]) => {
                if (elementStyles && import_blocks65.__EXPERIMENTAL_ELEMENTS[element]) {
                  variationNodesToAdd.push({
                    styles: elementStyles,
                    selector: scopeSelector2(
                      variationSelector,
                      import_blocks65.__EXPERIMENTAL_ELEMENTS[element]
                    )
                  });
                }
              });
              Object.entries(typedVariation?.blocks ?? {}).forEach(
                ([
                  variationBlockName,
                  variationBlockStyles
                ]) => {
                  const variationBlockSelector = typeof blockSelectors !== "string" ? scopeSelector2(
                    variationSelector,
                    blockSelectors[variationBlockName]?.selector
                  ) : void 0;
                  const variationDuotoneSelector = typeof blockSelectors !== "string" ? scopeSelector2(
                    variationSelector,
                    blockSelectors[variationBlockName]?.duotoneSelector
                  ) : void 0;
                  const variationFeatureSelectors = typeof blockSelectors !== "string" ? scopeFeatureSelectors(
                    variationSelector,
                    blockSelectors[variationBlockName]?.featureSelectors ?? {}
                  ) : void 0;
                  const variationBlockStyleNodes = pickStyleKeys(variationBlockStyles);
                  if (variationBlockStyles?.css) {
                    variationBlockStyleNodes.css = variationBlockStyles.css;
                  }
                  if (!variationBlockSelector || typeof blockSelectors === "string") {
                    return;
                  }
                  variationNodesToAdd.push({
                    selector: variationBlockSelector,
                    duotoneSelector: variationDuotoneSelector,
                    featureSelectors: variationFeatureSelectors,
                    fallbackGapValue: blockSelectors[variationBlockName]?.fallbackGapValue,
                    hasLayoutSupport: blockSelectors[variationBlockName]?.hasLayoutSupport,
                    styles: variationBlockStyleNodes
                  });
                  Object.entries(
                    variationBlockStyles.elements ?? {}
                  ).forEach(
                    ([
                      variationBlockElement,
                      variationBlockElementStyles
                    ]) => {
                      if (variationBlockElementStyles && import_blocks65.__EXPERIMENTAL_ELEMENTS[variationBlockElement]) {
                        variationNodesToAdd.push({
                          styles: variationBlockElementStyles,
                          selector: scopeSelector2(
                            variationBlockSelector,
                            import_blocks65.__EXPERIMENTAL_ELEMENTS[variationBlockElement]
                          )
                        });
                      }
                    }
                  );
                }
              );
            }
          );
          blockStyles.variations = variations;
        }
        if (typeof blockSelectors !== "string" && blockSelectors?.[blockName]?.selector) {
          nodes.push({
            duotoneSelector: blockSelectors[blockName].duotoneSelector,
            fallbackGapValue: blockSelectors[blockName].fallbackGapValue,
            hasLayoutSupport: blockSelectors[blockName].hasLayoutSupport,
            selector: blockSelectors[blockName].selector,
            styles: blockStyles,
            featureSelectors: blockSelectors[blockName].featureSelectors,
            styleVariationSelectors: blockSelectors[blockName].styleVariationSelectors,
            name: blockName
          });
        }
        Object.entries(typedNode?.elements ?? {}).forEach(
          ([elementName, value]) => {
            if (typeof blockSelectors !== "string" && value && blockSelectors?.[blockName] && import_blocks65.__EXPERIMENTAL_ELEMENTS[elementName]) {
              nodes.push({
                styles: value,
                selector: blockSelectors[blockName]?.selector.split(",").map((sel) => {
                  const elementSelectors = import_blocks65.__EXPERIMENTAL_ELEMENTS[elementName].split(",");
                  return elementSelectors.map(
                    (elementSelector) => sel + " " + elementSelector
                  );
                }).join(",")
              });
            }
          }
        );
        nodes.push(...variationNodesToAdd);
      }
    );
    return nodes;
  };
  var getNodesWithSettings = (tree, blockSelectors) => {
    const nodes = [];
    if (!tree?.settings) {
      return nodes;
    }
    const pickPresets = (treeToPickFrom) => {
      let presets2 = {};
      PRESET_METADATA.forEach(({ path }) => {
        const value = getValueFromObjectPath2(treeToPickFrom, path, false);
        if (value !== false) {
          presets2 = setImmutably2(presets2, path, value);
        }
      });
      return presets2;
    };
    const presets = pickPresets(tree.settings);
    const custom = tree.settings?.custom;
    if (Object.keys(presets).length > 0 || custom) {
      nodes.push({
        presets,
        custom,
        selector: ROOT_CSS_PROPERTIES_SELECTOR
      });
    }
    Object.entries(tree.settings?.blocks ?? {}).forEach(
      ([blockName, node]) => {
        const blockCustom = node.custom;
        if (typeof blockSelectors === "string" || !blockSelectors[blockName]) {
          return;
        }
        const blockPresets = pickPresets(node);
        if (Object.keys(blockPresets).length > 0 || blockCustom) {
          nodes.push({
            presets: blockPresets,
            custom: blockCustom,
            selector: blockSelectors[blockName]?.selector
          });
        }
      }
    );
    return nodes;
  };
  var transformToStyles = (tree, blockSelectors, hasBlockGapSupport, hasFallbackGapSupport, disableLayoutStyles = false, disableRootPadding = false, styleOptions = {}) => {
    const options = {
      blockGap: true,
      blockStyles: true,
      layoutStyles: true,
      marginReset: true,
      presets: true,
      rootPadding: true,
      variationStyles: false,
      ...styleOptions
    };
    const nodesWithStyles = getNodesWithStyles(tree, blockSelectors);
    const nodesWithSettings = getNodesWithSettings(tree, blockSelectors);
    const useRootPaddingAlign = tree?.settings?.useRootPaddingAwareAlignments;
    const { contentSize, wideSize } = tree?.settings?.layout || {};
    const hasBodyStyles = options.marginReset || options.rootPadding || options.layoutStyles;
    let ruleset = "";
    if (options.presets && (contentSize || wideSize)) {
      ruleset += `${ROOT_CSS_PROPERTIES_SELECTOR} {`;
      ruleset = contentSize ? ruleset + ` --wp--style--global--content-size: ${contentSize};` : ruleset;
      ruleset = wideSize ? ruleset + ` --wp--style--global--wide-size: ${wideSize};` : ruleset;
      ruleset += "}";
    }
    if (hasBodyStyles) {
      ruleset += ":where(body) {margin: 0;";
      if (options.rootPadding && useRootPaddingAlign) {
        ruleset += `padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }
				.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
				.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;
				`;
      }
      ruleset += "}";
    }
    if (options.blockStyles) {
      nodesWithStyles.forEach(
        ({
          selector: selector3,
          duotoneSelector,
          styles,
          fallbackGapValue,
          hasLayoutSupport: hasLayoutSupport2,
          featureSelectors,
          styleVariationSelectors,
          skipSelectorWrapper,
          name
        }) => {
          if (featureSelectors) {
            let featureDeclarations = getFeatureDeclarations(
              featureSelectors,
              styles
            );
            featureDeclarations = updateParagraphTextIndentSelector(
              featureDeclarations,
              tree.settings,
              name
            );
            Object.entries(featureDeclarations).forEach(
              ([cssSelector, declarations]) => {
                if (declarations.length) {
                  const rules = declarations.join(";");
                  ruleset += `:root :where(${cssSelector}){${rules};}`;
                }
              }
            );
          }
          if (duotoneSelector) {
            const duotoneStyles = {};
            if (styles?.filter) {
              duotoneStyles.filter = styles.filter;
              delete styles.filter;
            }
            const duotoneDeclarations = getStylesDeclarations(duotoneStyles);
            if (duotoneDeclarations.length) {
              ruleset += `${duotoneSelector}{${duotoneDeclarations.join(
                ";"
              )};}`;
            }
          }
          if (!disableLayoutStyles && (ROOT_BLOCK_SELECTOR === selector3 || hasLayoutSupport2)) {
            ruleset += getLayoutStyles({
              style: styles,
              selector: selector3,
              hasBlockGapSupport,
              hasFallbackGapSupport,
              fallbackGapValue
            });
          }
          const styleDeclarations = getStylesDeclarations(
            styles,
            selector3,
            useRootPaddingAlign,
            tree,
            disableRootPadding
          );
          if (styleDeclarations?.length) {
            const generalSelector = skipSelectorWrapper ? selector3 : `:root :where(${selector3})`;
            ruleset += `${generalSelector}{${styleDeclarations.join(
              ";"
            )};}`;
          }
          if (styles?.css) {
            ruleset += processCSSNesting(
              styles.css,
              `:root :where(${selector3})`
            );
          }
          if (options.variationStyles && styleVariationSelectors) {
            Object.entries(styleVariationSelectors).forEach(
              ([styleVariationName, styleVariationSelector]) => {
                const styleVariations = styles?.variations?.[styleVariationName];
                if (styleVariations) {
                  if (featureSelectors) {
                    let featureDeclarations = getFeatureDeclarations(
                      featureSelectors,
                      styleVariations
                    );
                    featureDeclarations = updateParagraphTextIndentSelector(
                      featureDeclarations,
                      tree.settings,
                      name
                    );
                    Object.entries(
                      featureDeclarations
                    ).forEach(
                      ([baseSelector, declarations]) => {
                        if (declarations.length) {
                          const cssSelector = concatFeatureVariationSelectorString(
                            baseSelector,
                            styleVariationSelector
                          );
                          const rules = declarations.join(";");
                          ruleset += `:root :where(${cssSelector}){${rules};}`;
                        }
                      }
                    );
                  }
                  const styleVariationDeclarations = getStylesDeclarations(
                    styleVariations,
                    styleVariationSelector,
                    useRootPaddingAlign,
                    tree
                  );
                  if (styleVariationDeclarations.length) {
                    ruleset += `:root :where(${styleVariationSelector}){${styleVariationDeclarations.join(
                      ";"
                    )};}`;
                  }
                  if (styleVariations?.css) {
                    ruleset += processCSSNesting(
                      styleVariations.css,
                      `:root :where(${styleVariationSelector})`
                    );
                  }
                  if (hasLayoutSupport2 && styleVariations?.spacing?.blockGap) {
                    const variationSelectorWithBlock = styleVariationSelector + selector3;
                    ruleset += getLayoutStyles({
                      style: styleVariations,
                      selector: variationSelectorWithBlock,
                      hasBlockGapSupport: true,
                      hasFallbackGapSupport,
                      fallbackGapValue
                    });
                  }
                }
              }
            );
          }
          const pseudoSelectorStyles = Object.entries(styles).filter(
            ([key]) => key.startsWith(":")
          );
          if (pseudoSelectorStyles?.length) {
            pseudoSelectorStyles.forEach(
              ([pseudoKey, pseudoStyle]) => {
                const pseudoDeclarations = getStylesDeclarations(pseudoStyle);
                if (!pseudoDeclarations?.length) {
                  return;
                }
                const _selector = selector3.split(",").map((sel) => sel + pseudoKey).join(",");
                const pseudoRule = `:root :where(${_selector}){${pseudoDeclarations.join(
                  ";"
                )};}`;
                ruleset += pseudoRule;
              }
            );
          }
        }
      );
    }
    if (options.layoutStyles) {
      ruleset = ruleset + ".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }";
      ruleset = ruleset + ".wp-site-blocks > .alignright { float: right; margin-left: 2em; }";
      ruleset = ruleset + ".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }";
    }
    if (options.blockGap && hasBlockGapSupport) {
      const gapValue = getGapCSSValue2(tree?.styles?.spacing?.blockGap) || "0.5em";
      ruleset = ruleset + `:root :where(.wp-site-blocks) > * { margin-block-start: ${gapValue}; margin-block-end: 0; }`;
      ruleset = ruleset + ":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }";
      ruleset = ruleset + ":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }";
    }
    if (options.presets) {
      nodesWithSettings.forEach(({ selector: selector3, presets }) => {
        if (ROOT_BLOCK_SELECTOR === selector3 || ROOT_CSS_PROPERTIES_SELECTOR === selector3) {
          selector3 = "";
        }
        const classes = getPresetsClasses(selector3, presets);
        if (classes.length > 0) {
          ruleset += classes;
        }
      });
    }
    return ruleset;
  };
  var getSelectorsConfig = (blockType, rootSelector) => {
    if (blockType?.selectors && Object.keys(blockType.selectors).length > 0) {
      return blockType.selectors;
    }
    const config2 = {
      root: rootSelector
    };
    Object.entries(BLOCK_SUPPORT_FEATURE_LEVEL_SELECTORS).forEach(
      ([featureKey, featureName]) => {
        const featureSelector = getBlockSelector(blockType, featureKey);
        if (featureSelector) {
          config2[featureName] = featureSelector;
        }
      }
    );
    return config2;
  };
  var getBlockSelectors = (blockTypes, variationInstanceId) => {
    const { getBlockStyles: getBlockStyles2 } = (0, import_data108.select)(import_blocks65.store);
    const result = {};
    blockTypes.forEach((blockType) => {
      const name = blockType.name;
      const selector3 = getBlockSelector(blockType);
      if (!selector3) {
        return;
      }
      let duotoneSelector = getBlockSelector(blockType, "filter.duotone");
      if (!duotoneSelector) {
        const rootSelector = getBlockSelector(blockType);
        const duotoneSupport = (0, import_blocks65.getBlockSupport)(
          blockType,
          "color.__experimentalDuotone",
          false
        );
        duotoneSelector = duotoneSupport && rootSelector && scopeSelector2(rootSelector, duotoneSupport);
      }
      const hasLayoutSupport2 = !!blockType?.supports?.layout || !!blockType?.supports?.__experimentalLayout;
      const fallbackGapValue = (
        // @ts-expect-error
        blockType?.supports?.spacing?.blockGap?.__experimentalDefault
      );
      const blockStyleVariations = getBlockStyles2(name);
      const styleVariationSelectors = {};
      blockStyleVariations?.forEach((variation) => {
        const variationSuffix = variationInstanceId ? `-${variationInstanceId}` : "";
        const variationName = `${variation.name}${variationSuffix}`;
        const styleVariationSelector = getBlockStyleVariationSelector(
          variationName,
          selector3
        );
        styleVariationSelectors[variationName] = styleVariationSelector;
      });
      const featureSelectors = getSelectorsConfig(blockType, selector3);
      result[name] = {
        duotoneSelector: duotoneSelector ?? void 0,
        fallbackGapValue,
        featureSelectors: Object.keys(featureSelectors).length ? featureSelectors : void 0,
        hasLayoutSupport: hasLayoutSupport2,
        name,
        selector: selector3,
        styleVariationSelectors: blockStyleVariations?.length ? styleVariationSelectors : void 0
      };
    });
    return result;
  };
  function processCSSNesting(css, blockSelector) {
    let processedCSS = "";
    if (!css || css.trim() === "") {
      return processedCSS;
    }
    const parts = css.split("&");
    parts.forEach((part) => {
      if (!part || part.trim() === "") {
        return;
      }
      const isRootCss = !part.includes("{");
      if (isRootCss) {
        processedCSS += `:root :where(${blockSelector}){${part.trim()}}`;
      } else {
        const splitPart = part.replace("}", "").split("{");
        if (splitPart.length !== 2) {
          return;
        }
        const [nestedSelector, cssValue] = splitPart;
        const matches = nestedSelector.match(/([>+~\s]*::[a-zA-Z-]+)/);
        const pseudoPart = matches ? matches[1] : "";
        const withoutPseudoElement = matches ? nestedSelector.replace(pseudoPart, "").trim() : nestedSelector.trim();
        let combinedSelector;
        if (withoutPseudoElement === "") {
          combinedSelector = blockSelector;
        } else {
          combinedSelector = nestedSelector.startsWith(" ") ? scopeSelector2(blockSelector, withoutPseudoElement) : appendToSelector(blockSelector, withoutPseudoElement);
        }
        processedCSS += `:root :where(${combinedSelector})${pseudoPart}{${cssValue.trim()}}`;
      }
    });
    return processedCSS;
  }

  // packages/block-editor/build-module/hooks/block-style-variation.mjs
  var import_jsx_runtime241 = __toESM(require_jsx_runtime(), 1);
  var VARIATION_PREFIX = "is-style-";
  function getVariationMatches(className) {
    if (!className) {
      return [];
    }
    return className.split(/\s+/).reduce((matches, name) => {
      if (name.startsWith(VARIATION_PREFIX)) {
        const match2 = name.slice(VARIATION_PREFIX.length);
        if (match2 !== "default") {
          matches.push(match2);
        }
      }
      return matches;
    }, []);
  }
  function getVariationNameFromClass(className, registeredStyles = []) {
    const matches = getVariationMatches(className);
    if (!matches) {
      return null;
    }
    for (const variation of matches) {
      if (registeredStyles.some((style) => style.name === variation)) {
        return variation;
      }
    }
    return null;
  }
  function OverrideStyles({ override }) {
    usePrivateStyleOverride(override);
  }
  function __unstableBlockStyleVariationOverridesWithConfig({ config: config2 }) {
    const { getBlockStyles: getBlockStyles2, overrides } = (0, import_data109.useSelect)(
      (select3) => ({
        getBlockStyles: select3(import_blocks66.store).getBlockStyles,
        overrides: unlock(select3(store)).getStyleOverrides()
      }),
      []
    );
    const { getBlockName: getBlockName2 } = (0, import_data109.useSelect)(store);
    const overridesWithConfig = (0, import_element116.useMemo)(() => {
      if (!overrides?.length) {
        return;
      }
      const newOverrides = [];
      const overriddenClientIds = [];
      for (const [, override] of overrides) {
        if (override?.variation && override?.clientId && /*
        * Because this component overwrites existing style overrides,
        * filter out any overrides that are already present in the store.
        */
        !overriddenClientIds.includes(override.clientId)) {
          const blockName = getBlockName2(override.clientId);
          const configStyles = config2?.styles?.blocks?.[blockName]?.variations?.[override.variation];
          if (configStyles) {
            const variationConfig = {
              settings: config2?.settings,
              // The variation style data is all that is needed to generate
              // the styles for the current application to a block. The variation
              // name is updated to match the instance specific class name.
              styles: {
                blocks: {
                  [blockName]: {
                    variations: {
                      [`${override.variation}-${override.clientId}`]: configStyles
                    }
                  }
                }
              }
            };
            const blockSelectors = getBlockSelectors(
              (0, import_blocks66.getBlockTypes)(),
              override.clientId
            );
            const hasBlockGapSupport = false;
            const hasFallbackGapSupport = true;
            const disableLayoutStyles = true;
            const disableRootPadding = true;
            const variationStyles = transformToStyles(
              variationConfig,
              blockSelectors,
              hasBlockGapSupport,
              hasFallbackGapSupport,
              disableLayoutStyles,
              disableRootPadding,
              {
                blockGap: false,
                blockStyles: true,
                layoutStyles: false,
                marginReset: false,
                presets: false,
                rootPadding: false,
                variationStyles: true
              }
            );
            newOverrides.push({
              id: `${override.variation}-${override.clientId}`,
              css: variationStyles,
              __unstableType: "variation",
              variation: override.variation,
              // The clientId will be stored with the override and used to ensure
              // the order of overrides matches the order of blocks so that the
              // correct CSS cascade is maintained.
              clientId: override.clientId
            });
            overriddenClientIds.push(override.clientId);
          }
        }
      }
      return newOverrides;
    }, [config2, overrides, getBlockStyles2, getBlockName2]);
    if (!overridesWithConfig || !overridesWithConfig.length) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(import_jsx_runtime241.Fragment, { children: overridesWithConfig.map((override) => /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(OverrideStyles, { override }, override.id)) });
  }
  function getVariationStylesWithRefValues(globalStyles, name, variation) {
    if (!globalStyles?.styles?.blocks?.[name]?.variations?.[variation]) {
      return;
    }
    const replaceRefs = (variationStyles) => {
      Object.keys(variationStyles).forEach((key) => {
        const value = variationStyles[key];
        if (typeof value === "object" && value !== null) {
          if (value.ref !== void 0) {
            if (typeof value.ref !== "string" || value.ref.trim() === "") {
              delete variationStyles[key];
            } else {
              const refValue = getValueFromObjectPath(
                globalStyles,
                value.ref
              );
              if (refValue) {
                variationStyles[key] = refValue;
              } else {
                delete variationStyles[key];
              }
            }
          } else {
            replaceRefs(value);
            if (Object.keys(value).length === 0) {
              delete variationStyles[key];
            }
          }
        }
      });
    };
    const styles = JSON.parse(
      JSON.stringify(
        globalStyles.styles.blocks[name].variations[variation]
      )
    );
    replaceRefs(styles);
    return styles;
  }
  function useBlockStyleVariation(name, variation, clientId) {
    const { globalSettings, globalStyles } = (0, import_data109.useSelect)((select3) => {
      const settings2 = select3(store).getSettings();
      return {
        globalSettings: settings2.__experimentalFeatures,
        globalStyles: settings2[globalStylesDataKey]
      };
    }, []);
    return (0, import_element116.useMemo)(() => {
      const variationStyles = getVariationStylesWithRefValues(
        {
          settings: globalSettings,
          styles: globalStyles
        },
        name,
        variation
      );
      return {
        settings: globalSettings,
        // The variation style data is all that is needed to generate
        // the styles for the current application to a block. The variation
        // name is updated to match the instance specific class name.
        styles: {
          blocks: {
            [name]: {
              variations: {
                [`${variation}-${clientId}`]: variationStyles
              }
            }
          }
        }
      };
    }, [globalSettings, globalStyles, variation, clientId, name]);
  }
  function useBlockProps3({ name, className, clientId }) {
    const { getBlockStyles: getBlockStyles2 } = (0, import_data109.useSelect)(import_blocks66.store);
    const registeredStyles = getBlockStyles2(name);
    const variation = getVariationNameFromClass(className, registeredStyles);
    const variationClass = `${VARIATION_PREFIX}${variation}-${clientId}`;
    const { settings: settings2, styles } = useBlockStyleVariation(
      name,
      variation,
      clientId
    );
    const variationStyles = (0, import_element116.useMemo)(() => {
      if (!variation) {
        return;
      }
      const variationConfig = { settings: settings2, styles };
      const blockSelectors = getBlockSelectors((0, import_blocks66.getBlockTypes)(), clientId);
      const hasBlockGapSupport = false;
      const hasFallbackGapSupport = true;
      const disableLayoutStyles = true;
      const disableRootPadding = true;
      return transformToStyles(
        variationConfig,
        blockSelectors,
        hasBlockGapSupport,
        hasFallbackGapSupport,
        disableLayoutStyles,
        disableRootPadding,
        {
          blockGap: false,
          blockStyles: true,
          layoutStyles: false,
          marginReset: false,
          presets: false,
          rootPadding: false,
          variationStyles: true
        }
      );
    }, [variation, settings2, styles, clientId]);
    usePrivateStyleOverride({
      id: `variation-${clientId}`,
      css: variationStyles,
      __unstableType: "variation",
      variation,
      // The clientId will be stored with the override and used to ensure
      // the order of overrides matches the order of blocks so that the
      // correct CSS cascade is maintained.
      clientId
    });
    return variation ? { className: variationClass } : {};
  }
  var block_style_variation_default = {
    hasSupport: () => true,
    attributeKeys: ["className"],
    isMatch: ({ className }) => getVariationMatches(className).length > 0,
    useBlockProps: useBlockProps3
  };

  // packages/block-editor/build-module/components/block-toolbar/switch-section-style.mjs
  var import_jsx_runtime242 = __toESM(require_jsx_runtime(), 1);
  var styleIcon = /* @__PURE__ */ (0, import_jsx_runtime242.jsxs)(
    import_components103.SVG,
    {
      viewBox: "0 0 24 24",
      xmlns: "http://www.w3.org/2000/svg",
      width: "24",
      height: "24",
      "aria-hidden": "true",
      focusable: "false",
      children: [
        /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(import_components103.Path, { 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-3z" }),
        /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
          import_components103.Path,
          {
            stroke: "currentColor",
            strokeWidth: "1.5",
            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-3z"
          }
        )
      ]
    }
  );
  function SwitchSectionStyle({ clientId }) {
    const { stylesToRender, activeStyle, className } = useStylesForBlocks({
      clientId
    });
    const { updateBlockAttributes: updateBlockAttributes2 } = (0, import_data110.useDispatch)(store);
    const { globalSettings, globalStyles, blockName } = (0, import_data110.useSelect)(
      (select3) => {
        const settings2 = select3(store).getSettings();
        return {
          globalSettings: settings2.__experimentalFeatures,
          globalStyles: settings2[globalStylesDataKey],
          blockName: select3(store).getBlockName(clientId)
        };
      },
      [clientId]
    );
    const activeStyleBackground = activeStyle?.name ? getVariationStylesWithRefValues(
      {
        settings: globalSettings,
        styles: globalStyles
      },
      blockName,
      activeStyle.name
    )?.color?.background : void 0;
    if (!stylesToRender || stylesToRender.length === 0) {
      return null;
    }
    const handleStyleSwitch = () => {
      const currentIndex = stylesToRender.findIndex(
        (style) => style.name === activeStyle.name
      );
      const nextIndex = (currentIndex + 1) % stylesToRender.length;
      const nextStyle = stylesToRender[nextIndex];
      const styleClassName = replaceActiveStyle(
        className,
        activeStyle,
        nextStyle
      );
      updateBlockAttributes2(clientId, {
        className: styleClassName
      });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(import_components103.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
      import_components103.ToolbarButton,
      {
        onClick: handleStyleSwitch,
        label: (0, import_i18n89.__)("Shuffle styles"),
        children: /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
          import_components103.Icon,
          {
            icon: styleIcon,
            style: {
              fill: activeStyleBackground || "transparent"
            }
          }
        )
      }
    ) });
  }
  var switch_section_style_default = SwitchSectionStyle;

  // packages/block-editor/build-module/components/block-toolbar/edit-section-button.mjs
  var import_components104 = __toESM(require_components(), 1);
  var import_i18n90 = __toESM(require_i18n(), 1);
  var import_data112 = __toESM(require_data(), 1);
  var import_blocks67 = __toESM(require_blocks(), 1);

  // packages/block-editor/build-module/hooks/use-content-only-section-edit.mjs
  var import_data111 = __toESM(require_data(), 1);
  function useContentOnlySectionEdit(clientId) {
    const {
      isSectionBlock: isSectionBlock2,
      isWithinSection,
      isWithinEditedSection,
      isEditingContentOnlySection,
      editedContentOnlySection: editedContentOnlySection2
    } = (0, import_data111.useSelect)(
      (select3) => {
        const {
          isSectionBlock: _isSectionBlock,
          getParentSectionBlock: getParentSectionBlock2,
          getEditedContentOnlySection: getEditedContentOnlySection2,
          isWithinEditedContentOnlySection: isWithinEditedContentOnlySection2
        } = unlock(select3(store));
        const editedSection = getEditedContentOnlySection2();
        return {
          isSectionBlock: _isSectionBlock(clientId),
          isWithinSection: _isSectionBlock(clientId) || !!getParentSectionBlock2(clientId),
          isWithinEditedSection: isWithinEditedContentOnlySection2(clientId),
          isEditingContentOnlySection: editedSection === clientId,
          editedContentOnlySection: editedSection
        };
      },
      [clientId]
    );
    const blockEditorActions = (0, import_data111.useDispatch)(store);
    const { editContentOnlySection: editContentOnlySection2, stopEditingContentOnlySection: stopEditingContentOnlySection2 } = unlock(blockEditorActions);
    return {
      isSectionBlock: isSectionBlock2,
      isWithinSection,
      isWithinEditedSection,
      isEditingContentOnlySection,
      editedContentOnlySection: editedContentOnlySection2,
      editContentOnlySection: editContentOnlySection2,
      stopEditingContentOnlySection: stopEditingContentOnlySection2
    };
  }

  // packages/block-editor/build-module/components/block-toolbar/edit-section-button.mjs
  var import_jsx_runtime243 = __toESM(require_jsx_runtime(), 1);
  function EditSectionButton({ clientId }) {
    const {
      isSectionBlock: isSectionBlock2,
      isEditingContentOnlySection,
      editContentOnlySection: editContentOnlySection2,
      stopEditingContentOnlySection: stopEditingContentOnlySection2
    } = useContentOnlySectionEdit(clientId);
    const blockType = (0, import_data112.useSelect)(
      (select3) => {
        if (!clientId) {
          return null;
        }
        const { getBlockName: getBlockName2 } = select3(store);
        const blockName = getBlockName2(clientId);
        return blockName ? { name: blockName } : null;
      },
      [clientId]
    );
    if (!clientId || !isSectionBlock2 && !isEditingContentOnlySection || (0, import_blocks67.isReusableBlock)(blockType) || (0, import_blocks67.isTemplatePart)(blockType)) {
      return null;
    }
    const isEditing = isEditingContentOnlySection;
    const handleClick = () => {
      if (isEditing) {
        stopEditingContentOnlySection2();
      } else {
        editContentOnlySection2(clientId);
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(import_components104.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(import_components104.ToolbarButton, { onClick: handleClick, children: isEditing ? (0, import_i18n90.__)("Exit pattern") : (0, import_i18n90.__)("Edit pattern") }) });
  }

  // packages/block-editor/build-module/components/block-toolbar/block-toolbar-icon.mjs
  var import_components114 = __toESM(require_components(), 1);
  var import_i18n98 = __toESM(require_i18n(), 1);
  var import_data116 = __toESM(require_data(), 1);
  var import_blocks73 = __toESM(require_blocks(), 1);
  var import_preferences2 = __toESM(require_preferences(), 1);

  // packages/block-editor/build-module/components/block-switcher/index.mjs
  var import_i18n95 = __toESM(require_i18n(), 1);
  var import_components111 = __toESM(require_components(), 1);
  var import_blocks72 = __toESM(require_blocks(), 1);
  var import_data114 = __toESM(require_data(), 1);

  // packages/block-editor/build-module/components/block-switcher/block-transformations-menu.mjs
  var import_i18n92 = __toESM(require_i18n(), 1);
  var import_components107 = __toESM(require_components(), 1);
  var import_blocks69 = __toESM(require_blocks(), 1);
  var import_element118 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/block-switcher/preview-block-popover.mjs
  var import_i18n91 = __toESM(require_i18n(), 1);
  var import_components105 = __toESM(require_components(), 1);
  var import_compose65 = __toESM(require_compose(), 1);
  var import_jsx_runtime244 = __toESM(require_jsx_runtime(), 1);
  function PreviewBlockPopover({ blocks: blocks2 }) {
    const isMobile = (0, import_compose65.useViewportMatch)("medium", "<");
    if (isMobile) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime244.jsx)("div", { className: "block-editor-block-switcher__popover-preview-container", children: /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(
      import_components105.Popover,
      {
        className: "block-editor-block-switcher__popover-preview",
        placement: "right-start",
        focusOnMount: false,
        offset: 16,
        children: /* @__PURE__ */ (0, import_jsx_runtime244.jsxs)("div", { className: "block-editor-block-switcher__preview", children: [
          /* @__PURE__ */ (0, import_jsx_runtime244.jsx)("div", { className: "block-editor-block-switcher__preview-title", children: (0, import_i18n91.__)("Preview") }),
          /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(block_preview_default, { viewportWidth: 601, blocks: blocks2 })
        ] })
      }
    ) });
  }

  // packages/block-editor/build-module/components/block-switcher/block-variation-transformations.mjs
  var import_components106 = __toESM(require_components(), 1);
  var import_blocks68 = __toESM(require_blocks(), 1);
  var import_data113 = __toESM(require_data(), 1);
  var import_element117 = __toESM(require_element(), 1);
  var import_jsx_runtime245 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_OBJECT2 = {};
  function useBlockVariationTransforms({ clientIds, blocks: blocks2 }) {
    const { activeBlockVariation, blockVariationTransformations } = (0, import_data113.useSelect)(
      (select3) => {
        const { getBlockAttributes: getBlockAttributes3, canRemoveBlocks: canRemoveBlocks2 } = select3(store);
        const { getActiveBlockVariation, getBlockVariations: getBlockVariations2 } = select3(import_blocks68.store);
        const canRemove = canRemoveBlocks2(clientIds);
        if (blocks2.length !== 1 || !canRemove) {
          return EMPTY_OBJECT2;
        }
        const [firstBlock] = blocks2;
        return {
          blockVariationTransformations: getBlockVariations2(
            firstBlock.name,
            "transform"
          ),
          activeBlockVariation: getActiveBlockVariation(
            firstBlock.name,
            getBlockAttributes3(firstBlock.clientId)
          )
        };
      },
      [clientIds, blocks2]
    );
    const transformations = (0, import_element117.useMemo)(() => {
      return blockVariationTransformations?.filter(
        ({ name }) => name !== activeBlockVariation?.name
      );
    }, [blockVariationTransformations, activeBlockVariation]);
    return transformations;
  }
  var BlockVariationTransformations = ({
    transformations,
    onSelect,
    blocks: blocks2
  }) => {
    const [hoveredTransformItemName, setHoveredTransformItemName] = (0, import_element117.useState)();
    return /* @__PURE__ */ (0, import_jsx_runtime245.jsxs)(import_jsx_runtime245.Fragment, { children: [
      hoveredTransformItemName && /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(
        PreviewBlockPopover,
        {
          blocks: (0, import_blocks68.cloneBlock)(
            blocks2[0],
            transformations.find(
              ({ name }) => name === hoveredTransformItemName
            ).attributes
          )
        }
      ),
      transformations?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(
        BlockVariationTransformationItem,
        {
          item,
          onSelect,
          setHoveredTransformItemName
        },
        item.name
      ))
    ] });
  };
  function BlockVariationTransformationItem({
    item,
    onSelect,
    setHoveredTransformItemName
  }) {
    const { name, icon, title } = item;
    return /* @__PURE__ */ (0, import_jsx_runtime245.jsxs)(
      import_components106.MenuItem,
      {
        className: (0, import_blocks68.getBlockMenuDefaultClassName)(name),
        onClick: (event) => {
          event.preventDefault();
          onSelect(name);
        },
        onMouseLeave: () => setHoveredTransformItemName(null),
        onMouseEnter: () => setHoveredTransformItemName(name),
        onFocus: () => setHoveredTransformItemName(name),
        onBlur: () => setHoveredTransformItemName(null),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(block_icon_default, { icon, showColors: true }),
          title
        ]
      }
    );
  }
  var block_variation_transformations_default = BlockVariationTransformations;

  // packages/block-editor/build-module/components/block-switcher/block-transformations-menu.mjs
  var import_jsx_runtime246 = __toESM(require_jsx_runtime(), 1);
  function useGroupedTransforms(possibleBlockTransformations) {
    const priorityContentTransformationBlocks = {
      "core/paragraph": 1,
      "core/heading": 2,
      "core/list": 3,
      "core/quote": 4
    };
    const transformations = (0, import_element118.useMemo)(() => {
      const priorityTextTransformsNames = Object.keys(
        priorityContentTransformationBlocks
      );
      const groupedPossibleTransforms = possibleBlockTransformations.reduce(
        (accumulator, item) => {
          const { name } = item;
          if (priorityTextTransformsNames.includes(name)) {
            accumulator.priorityTextTransformations.push(item);
          } else {
            accumulator.restTransformations.push(item);
          }
          return accumulator;
        },
        { priorityTextTransformations: [], restTransformations: [] }
      );
      if (groupedPossibleTransforms.priorityTextTransformations.length === 1 && groupedPossibleTransforms.priorityTextTransformations[0].name === "core/quote") {
        const singleQuote = groupedPossibleTransforms.priorityTextTransformations.pop();
        groupedPossibleTransforms.restTransformations.push(singleQuote);
      }
      return groupedPossibleTransforms;
    }, [possibleBlockTransformations]);
    transformations.priorityTextTransformations.sort(
      ({ name: currentName }, { name: nextName }) => {
        return priorityContentTransformationBlocks[currentName] < priorityContentTransformationBlocks[nextName] ? -1 : 1;
      }
    );
    return transformations;
  }
  var BlockTransformationsMenu = ({
    className,
    possibleBlockTransformations,
    possibleBlockVariationTransformations,
    onSelect,
    onSelectVariation,
    blocks: blocks2
  }) => {
    const [hoveredTransformItemName, setHoveredTransformItemName] = (0, import_element118.useState)();
    const { priorityTextTransformations, restTransformations } = useGroupedTransforms(possibleBlockTransformations);
    const hasBothContentTransformations = priorityTextTransformations.length && restTransformations.length;
    const restTransformItems = !!restTransformations.length && /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
      RestTransformationItems,
      {
        restTransformations,
        onSelect,
        setHoveredTransformItemName
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime246.jsxs)(import_jsx_runtime246.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime246.jsxs)(import_components107.MenuGroup, { label: (0, import_i18n92.__)("Transform to"), className, children: [
        hoveredTransformItemName && /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
          PreviewBlockPopover,
          {
            blocks: (0, import_blocks69.switchToBlockType)(
              blocks2,
              hoveredTransformItemName
            )
          }
        ),
        !!possibleBlockVariationTransformations?.length && /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
          block_variation_transformations_default,
          {
            transformations: possibleBlockVariationTransformations,
            blocks: blocks2,
            onSelect: onSelectVariation
          }
        ),
        priorityTextTransformations.map((item) => /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
          BlockTransformationItem,
          {
            item,
            onSelect,
            setHoveredTransformItemName
          },
          item.name
        )),
        !hasBothContentTransformations && restTransformItems
      ] }),
      !!hasBothContentTransformations && /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(import_components107.MenuGroup, { className, children: restTransformItems })
    ] });
  };
  function RestTransformationItems({
    restTransformations,
    onSelect,
    setHoveredTransformItemName
  }) {
    return restTransformations.map((item) => /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
      BlockTransformationItem,
      {
        item,
        onSelect,
        setHoveredTransformItemName
      },
      item.name
    ));
  }
  function BlockTransformationItem({
    item,
    onSelect,
    setHoveredTransformItemName
  }) {
    const { name, icon, title, isDisabled } = item;
    return /* @__PURE__ */ (0, import_jsx_runtime246.jsxs)(
      import_components107.MenuItem,
      {
        className: (0, import_blocks69.getBlockMenuDefaultClassName)(name),
        onClick: (event) => {
          event.preventDefault();
          onSelect(name);
        },
        disabled: isDisabled,
        onMouseLeave: () => setHoveredTransformItemName(null),
        onMouseEnter: () => setHoveredTransformItemName(name),
        onFocus: () => setHoveredTransformItemName(name),
        onBlur: () => setHoveredTransformItemName(null),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(block_icon_default, { icon, showColors: true }),
          title
        ]
      }
    );
  }
  var block_transformations_menu_default = BlockTransformationsMenu;

  // packages/block-editor/build-module/components/block-switcher/block-styles-menu.mjs
  var import_i18n93 = __toESM(require_i18n(), 1);
  var import_components109 = __toESM(require_components(), 1);

  // packages/block-editor/build-module/components/block-styles/menu-items.mjs
  var import_components108 = __toESM(require_components(), 1);
  var import_jsx_runtime247 = __toESM(require_jsx_runtime(), 1);
  var noop9 = () => {
  };
  function BlockStylesMenuItems({ clientId, onSwitch = noop9 }) {
    const { onSelect, stylesToRender, activeStyle } = useStylesForBlocks({
      clientId,
      onSwitch
    });
    if (!stylesToRender || stylesToRender.length === 0) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(import_jsx_runtime247.Fragment, { children: stylesToRender.map((style) => {
      const menuItemText = style.label || style.name;
      return /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
        import_components108.MenuItem,
        {
          icon: activeStyle.name === style.name ? check_default : null,
          onClick: () => onSelect(style),
          children: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
            import_components108.__experimentalText,
            {
              as: "span",
              limit: 18,
              ellipsizeMode: "tail",
              truncate: true,
              children: menuItemText
            }
          )
        },
        style.name
      );
    }) });
  }

  // packages/block-editor/build-module/components/block-switcher/block-styles-menu.mjs
  var import_jsx_runtime248 = __toESM(require_jsx_runtime(), 1);
  function BlockStylesMenu({ hoveredBlock, onSwitch }) {
    const { clientId } = hoveredBlock;
    return /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(
      import_components109.MenuGroup,
      {
        label: (0, import_i18n93.__)("Styles"),
        className: "block-editor-block-switcher__styles__menugroup",
        children: /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(BlockStylesMenuItems, { clientId, onSwitch })
      }
    );
  }

  // packages/block-editor/build-module/components/block-switcher/pattern-transformations-menu.mjs
  var import_i18n94 = __toESM(require_i18n(), 1);
  var import_element120 = __toESM(require_element(), 1);
  var import_compose66 = __toESM(require_compose(), 1);
  var import_components110 = __toESM(require_components(), 1);

  // packages/block-editor/build-module/components/block-switcher/use-transformed-patterns.mjs
  var import_element119 = __toESM(require_element(), 1);
  var import_blocks71 = __toESM(require_blocks(), 1);

  // packages/block-editor/build-module/components/block-switcher/utils.mjs
  var import_blocks70 = __toESM(require_blocks(), 1);
  var getMatchingBlockByName = (block, selectedBlockName, consumedBlocks = /* @__PURE__ */ new Set()) => {
    const { clientId, name, innerBlocks = [] } = block;
    if (consumedBlocks.has(clientId)) {
      return;
    }
    if (name === selectedBlockName) {
      return block;
    }
    for (const innerBlock of innerBlocks) {
      const match2 = getMatchingBlockByName(
        innerBlock,
        selectedBlockName,
        consumedBlocks
      );
      if (match2) {
        return match2;
      }
    }
  };
  var getRetainedBlockAttributes = (name, attributes) => {
    const contentAttributes = (0, import_blocks70.getBlockAttributesNamesByRole)(name, "content");
    if (!contentAttributes?.length) {
      return attributes;
    }
    return contentAttributes.reduce((_accumulator, attribute) => {
      if (attributes[attribute]) {
        _accumulator[attribute] = attributes[attribute];
      }
      return _accumulator;
    }, {});
  };

  // packages/block-editor/build-module/components/block-switcher/use-transformed-patterns.mjs
  var transformMatchingBlock = (match2, selectedBlock) => {
    const retainedBlockAttributes = getRetainedBlockAttributes(
      selectedBlock.name,
      selectedBlock.attributes
    );
    match2.attributes = {
      ...match2.attributes,
      ...retainedBlockAttributes
    };
  };
  var getPatternTransformedBlocks = (selectedBlocks, patternBlocks) => {
    const _patternBlocks = patternBlocks.map(
      (block) => (0, import_blocks71.cloneBlock)(block)
    );
    const consumedBlocks = /* @__PURE__ */ new Set();
    for (const selectedBlock of selectedBlocks) {
      let isMatch = false;
      for (const patternBlock of _patternBlocks) {
        const match2 = getMatchingBlockByName(
          patternBlock,
          selectedBlock.name,
          consumedBlocks
        );
        if (!match2) {
          continue;
        }
        isMatch = true;
        consumedBlocks.add(match2.clientId);
        transformMatchingBlock(match2, selectedBlock);
        break;
      }
      if (!isMatch) {
        return;
      }
    }
    return _patternBlocks;
  };
  var useTransformedPatterns = (patterns, selectedBlocks) => {
    return (0, import_element119.useMemo)(
      () => patterns.reduce((accumulator, _pattern) => {
        const transformedBlocks = getPatternTransformedBlocks(
          selectedBlocks,
          _pattern.blocks
        );
        if (transformedBlocks) {
          accumulator.push({
            ..._pattern,
            transformedBlocks
          });
        }
        return accumulator;
      }, []),
      [patterns, selectedBlocks]
    );
  };
  var use_transformed_patterns_default = useTransformedPatterns;

  // packages/block-editor/build-module/components/block-switcher/pattern-transformations-menu.mjs
  var import_jsx_runtime249 = __toESM(require_jsx_runtime(), 1);
  function PatternTransformationsMenu({
    blocks: blocks2,
    patterns: statePatterns,
    onSelect
  }) {
    const [showTransforms, setShowTransforms] = (0, import_element120.useState)(false);
    const patterns = use_transformed_patterns_default(statePatterns, blocks2);
    if (!patterns.length) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime249.jsxs)(import_components110.MenuGroup, { className: "block-editor-block-switcher__pattern__transforms__menugroup", children: [
      showTransforms && /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
        PreviewPatternsPopover,
        {
          patterns,
          onSelect
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
        import_components110.MenuItem,
        {
          onClick: (event) => {
            event.preventDefault();
            setShowTransforms(!showTransforms);
          },
          icon: chevron_right_default,
          children: (0, import_i18n94.__)("Patterns")
        }
      )
    ] });
  }
  function PreviewPatternsPopover({ patterns, onSelect }) {
    const isMobile = (0, import_compose66.useViewportMatch)("medium", "<");
    return /* @__PURE__ */ (0, import_jsx_runtime249.jsx)("div", { className: "block-editor-block-switcher__popover-preview-container", children: /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
      import_components110.Popover,
      {
        className: "block-editor-block-switcher__popover-preview",
        placement: isMobile ? "bottom" : "right-start",
        offset: 16,
        children: /* @__PURE__ */ (0, import_jsx_runtime249.jsx)("div", { className: "block-editor-block-switcher__preview is-pattern-list-preview", children: /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
          BlockPatternsList2,
          {
            patterns,
            onSelect
          }
        ) })
      }
    ) });
  }
  function BlockPatternsList2({ patterns, onSelect }) {
    return /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
      import_components110.Composite,
      {
        role: "listbox",
        className: "block-editor-block-switcher__preview-patterns-container",
        "aria-label": (0, import_i18n94.__)("Patterns list"),
        children: patterns.map((pattern) => /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
          BlockPattern2,
          {
            pattern,
            onSelect
          },
          pattern.name
        ))
      }
    );
  }
  function BlockPattern2({ pattern, onSelect }) {
    const baseClassName = "block-editor-block-switcher__preview-patterns-container";
    const descriptionId = (0, import_compose66.useInstanceId)(
      BlockPattern2,
      `${baseClassName}-list__item-description`
    );
    return /* @__PURE__ */ (0, import_jsx_runtime249.jsxs)("div", { className: `${baseClassName}-list__list-item`, children: [
      /* @__PURE__ */ (0, import_jsx_runtime249.jsxs)(
        import_components110.Composite.Item,
        {
          render: /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
            "div",
            {
              role: "option",
              "aria-label": pattern.title,
              "aria-describedby": pattern.description ? descriptionId : void 0,
              className: `${baseClassName}-list__item`
            }
          ),
          onClick: () => onSelect(pattern.transformedBlocks),
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
              block_preview_default,
              {
                blocks: pattern.transformedBlocks,
                viewportWidth: pattern.viewportWidth || 500
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime249.jsx)("div", { className: `${baseClassName}-list__item-title`, children: pattern.title })
          ]
        }
      ),
      !!pattern.description && /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(import_components110.VisuallyHidden, { id: descriptionId, children: pattern.description })
    ] });
  }
  var pattern_transformations_menu_default = PatternTransformationsMenu;

  // packages/block-editor/build-module/components/block-switcher/index.mjs
  var import_jsx_runtime250 = __toESM(require_jsx_runtime(), 1);
  function BlockSwitcherDropdownMenuContents({ onClose, clientIds }) {
    const { replaceBlocks: replaceBlocks2, multiSelect: multiSelect2, updateBlockAttributes: updateBlockAttributes2 } = (0, import_data114.useDispatch)(store);
    const {
      possibleBlockTransformations,
      patterns,
      blocks: blocks2,
      isUsingBindings,
      canRemove,
      hasBlockStyles
    } = (0, import_data114.useSelect)(
      (select3) => {
        const {
          getBlockAttributes: getBlockAttributes3,
          getBlocksByClientId: getBlocksByClientId2,
          getBlockRootClientId: getBlockRootClientId2,
          getBlockTransformItems: getBlockTransformItems2,
          __experimentalGetPatternTransformItems: __experimentalGetPatternTransformItems2,
          canRemoveBlocks: canRemoveBlocks2,
          getBlockName: getBlockName2
        } = select3(store);
        const { getBlockStyles: getBlockStyles2 } = select3(import_blocks72.store);
        const rootClientId = getBlockRootClientId2(clientIds[0]);
        const _blocks = getBlocksByClientId2(clientIds);
        const _isSingleBlock = clientIds.length === 1;
        const _blockName = _isSingleBlock && getBlockName2(clientIds[0]);
        const _hasBlockStyles = _isSingleBlock && !!getBlockStyles2(_blockName)?.length;
        return {
          blocks: _blocks,
          possibleBlockTransformations: getBlockTransformItems2(
            _blocks,
            rootClientId
          ),
          patterns: __experimentalGetPatternTransformItems2(
            _blocks,
            rootClientId
          ),
          isUsingBindings: clientIds.every(
            (clientId) => !!getBlockAttributes3(clientId)?.metadata?.bindings
          ),
          canRemove: canRemoveBlocks2(clientIds),
          hasBlockStyles: _hasBlockStyles
        };
      },
      [clientIds]
    );
    const blockVariationTransformations = useBlockVariationTransforms({
      clientIds,
      blocks: blocks2
    });
    function selectForMultipleBlocks(insertedBlocks) {
      if (insertedBlocks.length > 1) {
        multiSelect2(
          insertedBlocks[0].clientId,
          insertedBlocks[insertedBlocks.length - 1].clientId
        );
      }
    }
    function onBlockTransform(name) {
      const newBlocks = (0, import_blocks72.switchToBlockType)(blocks2, name);
      replaceBlocks2(clientIds, newBlocks);
      selectForMultipleBlocks(newBlocks);
    }
    function onBlockVariationTransform(name) {
      updateBlockAttributes2(blocks2[0].clientId, {
        ...blockVariationTransformations.find(
          ({ name: variationName }) => variationName === name
        ).attributes
      });
    }
    function onPatternTransform(transformedBlocks) {
      replaceBlocks2(clientIds, transformedBlocks);
      selectForMultipleBlocks(transformedBlocks);
    }
    const isSingleBlock = blocks2.length === 1;
    const isSynced = isSingleBlock && ((0, import_blocks72.isTemplatePart)(blocks2[0]) || (0, import_blocks72.isReusableBlock)(blocks2[0]));
    const hasPossibleBlockTransformations = !!possibleBlockTransformations?.length && canRemove && !isSynced;
    const hasPossibleBlockVariationTransformations = !!blockVariationTransformations?.length;
    const hasPatternTransformation = !!patterns?.length && canRemove;
    const hasBlockOrBlockVariationTransforms = hasPossibleBlockTransformations || hasPossibleBlockVariationTransformations;
    const hasContents = hasBlockStyles || hasBlockOrBlockVariationTransforms || hasPatternTransformation;
    if (!hasContents) {
      return /* @__PURE__ */ (0, import_jsx_runtime250.jsx)("p", { className: "block-editor-block-switcher__no-transforms", children: (0, import_i18n95.__)("No transforms.") });
    }
    const connectedBlockDescription = isSingleBlock ? (0, import_i18n95._x)(
      "This block is connected.",
      "block toolbar button label and description"
    ) : (0, import_i18n95._x)(
      "These blocks are connected.",
      "block toolbar button label and description"
    );
    return /* @__PURE__ */ (0, import_jsx_runtime250.jsxs)("div", { className: "block-editor-block-switcher__container", children: [
      hasPatternTransformation && /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(
        pattern_transformations_menu_default,
        {
          blocks: blocks2,
          patterns,
          onSelect: (transformedBlocks) => {
            onPatternTransform(transformedBlocks);
            onClose();
          }
        }
      ),
      hasBlockOrBlockVariationTransforms && /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(
        block_transformations_menu_default,
        {
          className: "block-editor-block-switcher__transforms__menugroup",
          possibleBlockTransformations,
          possibleBlockVariationTransformations: blockVariationTransformations,
          blocks: blocks2,
          onSelect: (name) => {
            onBlockTransform(name);
            onClose();
          },
          onSelectVariation: (name) => {
            onBlockVariationTransform(name);
            onClose();
          }
        }
      ),
      hasBlockStyles && /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(
        BlockStylesMenu,
        {
          hoveredBlock: blocks2[0],
          onSwitch: onClose
        }
      ),
      isUsingBindings && /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(import_components111.MenuGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(import_components111.__experimentalText, { className: "block-editor-block-switcher__binding-indicator", children: connectedBlockDescription }) })
    ] });
  }
  var BlockSwitcher = ({ children, clientIds, label, text }) => {
    const isSingleBlock = clientIds.length === 1;
    const blockSwitcherDescription = isSingleBlock ? (0, import_i18n95.__)("Change block type or style") : (0, import_i18n95.sprintf)(
      /* translators: %d: number of blocks. */
      (0, import_i18n95._n)(
        "Change type of %d block",
        "Change type of %d blocks",
        clientIds.length
      ),
      clientIds.length
    );
    return /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(import_components111.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(import_components111.ToolbarItem, { children: (toggleProps) => /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(
      import_components111.DropdownMenu,
      {
        className: "block-editor-block-switcher",
        label,
        popoverProps: {
          placement: "bottom-start",
          className: "block-editor-block-switcher__popover"
        },
        icon: children,
        text,
        toggleProps: {
          description: blockSwitcherDescription,
          ...toggleProps
        },
        menuProps: { orientation: "both" },
        children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(
          BlockSwitcherDropdownMenuContents,
          {
            onClose,
            clientIds
          }
        )
      }
    ) }) });
  };
  var block_switcher_default = BlockSwitcher;

  // packages/block-editor/build-module/components/block-toolbar/block-styles-dropdown.mjs
  var import_i18n96 = __toESM(require_i18n(), 1);
  var import_components112 = __toESM(require_components(), 1);
  var import_jsx_runtime251 = __toESM(require_jsx_runtime(), 1);
  function BlockStylesDropdown({
    clientIds,
    children,
    label,
    text
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(import_components112.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(import_components112.ToolbarItem, { children: (toggleProps) => /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(
      import_components112.DropdownMenu,
      {
        className: "block-editor-block-switcher",
        label,
        popoverProps: {
          placement: "bottom-start",
          className: "block-editor-block-switcher__popover"
        },
        icon: children,
        text,
        toggleProps: {
          description: (0, import_i18n96.__)("Change block style"),
          ...toggleProps
        },
        menuProps: { orientation: "both" },
        children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime251.jsx)("div", { className: "block-editor-block-switcher__container", children: /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(
          BlockStylesMenu,
          {
            hoveredBlock: {
              clientId: clientIds[0]
            },
            onSwitch: onClose
          }
        ) })
      }
    ) }) });
  }

  // packages/block-editor/build-module/components/block-toolbar/pattern-overrides-dropdown.mjs
  var import_components113 = __toESM(require_components(), 1);
  var import_i18n97 = __toESM(require_i18n(), 1);
  var import_element121 = __toESM(require_element(), 1);
  var import_data115 = __toESM(require_data(), 1);
  var import_jsx_runtime252 = __toESM(require_jsx_runtime(), 1);
  function PatternOverridesPopoverContent({ clientIds, blockTitle }) {
    const blockMetaName = (0, import_data115.useSelect)(
      (select3) => {
        const { getBlockAttributes: getBlockAttributes3 } = select3(store);
        return getBlockAttributes3(clientIds?.[0])?.metadata?.name;
      },
      [clientIds]
    );
    const isSingleBlock = clientIds.length === 1;
    let description;
    if (isSingleBlock && blockMetaName) {
      description = (0, import_i18n97.sprintf)(
        /* translators: 1: The block type's name. 2: The block's user-provided name (the same as the override name). */
        (0, import_i18n97.__)('This %1$s is editable using the "%2$s" override.'),
        blockTitle.toLowerCase(),
        blockMetaName
      );
    } else {
      description = (0, import_i18n97.__)("These blocks are editable using overrides.");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_components113.__experimentalText, { children: description });
  }
  function PatternOverridesDropdown({
    icon,
    clientIds,
    blockTitle,
    label
  }) {
    const [isOpen, setIsOpen] = (0, import_element121.useState)(false);
    const anchorRef = (0, import_element121.useRef)();
    return /* @__PURE__ */ (0, import_jsx_runtime252.jsxs)(import_jsx_runtime252.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(
        import_components113.ToolbarButton,
        {
          ref: anchorRef,
          className: "block-editor-block-toolbar__pattern-overrides-indicator",
          icon,
          label,
          onClick: () => setIsOpen(!isOpen),
          "aria-expanded": isOpen
        }
      ),
      isOpen && /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(
        import_components113.Popover,
        {
          anchor: anchorRef.current,
          onClose: () => setIsOpen(false),
          placement: "bottom-start",
          offset: 16,
          className: "block-editor-block-toolbar__pattern-overrides-popover",
          children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(
            PatternOverridesPopoverContent,
            {
              clientIds,
              blockTitle
            }
          )
        }
      )
    ] });
  }

  // packages/block-editor/build-module/components/block-toolbar/block-toolbar-icon.mjs
  var import_jsx_runtime253 = __toESM(require_jsx_runtime(), 1);
  function getBlockIconVariant({ select: select3, clientIds }) {
    const {
      getBlockName: getBlockName2,
      getBlockAttributes: getBlockAttributes3,
      getBlockParentsByBlockName: getBlockParentsByBlockName2,
      canRemoveBlocks: canRemoveBlocks2,
      getTemplateLock: getTemplateLock2,
      getBlockEditingMode: getBlockEditingMode2,
      canEditBlock: canEditBlock2
    } = unlock(select3(store));
    const { getBlockStyles: getBlockStyles2 } = select3(import_blocks73.store);
    const hasTemplateLock = clientIds.some(
      (id) => getTemplateLock2(id) === "contentOnly"
    );
    const isSingleBlock = clientIds.length === 1;
    const blockName = isSingleBlock && getBlockName2(clientIds[0]);
    const hasBlockStyles = isSingleBlock && !!getBlockStyles2(blockName)?.length;
    const hasPatternNameInSelection = clientIds.some(
      (id) => !!getBlockAttributes3(id)?.metadata?.patternName
    );
    const hasPatternOverrides = clientIds.every(
      (clientId) => hasPatternOverridesDefaultBinding(
        getBlockAttributes3(clientId)?.metadata?.bindings
      )
    );
    const hasParentPattern = clientIds.every(
      (clientId) => getBlockParentsByBlockName2(clientId, "core/block", true).length > 0
    );
    const canRemove = canRemoveBlocks2(clientIds);
    const canEdit = clientIds.every((clientId) => canEditBlock2(clientId));
    const editingMode = getBlockEditingMode2(clientIds[0]);
    const isDefaultEditingMode = editingMode === "default";
    const isContentOnlyMode = editingMode === "contentOnly";
    const _hideTransformsForSections = hasPatternNameInSelection;
    const _showBlockSwitcher = !_hideTransformsForSections && isDefaultEditingMode && (hasBlockStyles || canRemove) && !hasTemplateLock && canEdit;
    const _showPatternOverrides = hasPatternOverrides && hasParentPattern;
    if (_showBlockSwitcher) {
      return "switcher";
    } else if (isContentOnlyMode && hasBlockStyles && !hasPatternOverrides && canEdit) {
      return "styles-only";
    } else if (_showPatternOverrides) {
      return "pattern-overrides";
    }
    return "default";
  }
  function getBlockIcon({ select: select3, clientIds }) {
    const { getBlockName: getBlockName2, getBlockAttributes: getBlockAttributes3 } = unlock(
      select3(store)
    );
    const _isSingleBlock = clientIds.length === 1;
    const firstClientId = clientIds[0];
    const blockAttributes = getBlockAttributes3(firstClientId);
    if (_isSingleBlock && blockAttributes?.metadata?.patternName) {
      return symbol_default;
    }
    const blockName = getBlockName2(firstClientId);
    const blockType = (0, import_blocks73.getBlockType)(blockName);
    if (_isSingleBlock) {
      const { getActiveBlockVariation } = select3(import_blocks73.store);
      const match2 = getActiveBlockVariation(blockName, blockAttributes);
      return match2?.icon || blockType?.icon;
    }
    const blockNames = clientIds.map((id) => getBlockName2(id));
    const isSelectionOfSameType = new Set(blockNames).size === 1;
    return isSelectionOfSameType ? blockType?.icon : copy_default;
  }
  function BlockToolbarIcon({ clientIds, isSynced }) {
    const { icon, showIconLabels, variant } = (0, import_data116.useSelect)(
      (select3) => {
        return {
          icon: getBlockIcon({ select: select3, clientIds }),
          showIconLabels: select3(import_preferences2.store).get(
            "core",
            "showIconLabels"
          ),
          variant: getBlockIconVariant({
            select: select3,
            clientIds
          })
        };
      },
      [clientIds]
    );
    const blockTitle = useBlockDisplayTitle({
      clientId: clientIds?.[0],
      maximumLength: 35
    });
    const isSingleBlock = clientIds.length === 1;
    const showBlockTitle = isSingleBlock && isSynced && !showIconLabels;
    const label = isSingleBlock ? blockTitle : (0, import_i18n98.__)("Multiple blocks selected");
    const text = showBlockTitle && blockTitle ? blockTitle : void 0;
    const BlockIconElement = /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(
      block_icon_default,
      {
        className: "block-editor-block-toolbar__block-icon",
        icon
      }
    );
    if (variant === "switcher") {
      return /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(
        block_switcher_default,
        {
          clientIds,
          label,
          text,
          children: BlockIconElement
        }
      );
    }
    if (variant === "styles-only") {
      return /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(
        BlockStylesDropdown,
        {
          clientIds,
          label,
          text,
          children: BlockIconElement
        }
      );
    }
    if (variant === "pattern-overrides") {
      return /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(
        PatternOverridesDropdown,
        {
          icon: BlockIconElement,
          clientIds,
          blockTitle,
          label
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(
      import_components114.ToolbarButton,
      {
        disabled: true,
        className: "block-editor-block-toolbar__block-icon-button",
        title: label,
        icon: BlockIconElement,
        text
      }
    );
  }

  // packages/block-editor/build-module/components/block-toolbar/index.mjs
  var import_jsx_runtime254 = __toESM(require_jsx_runtime(), 1);
  function PrivateBlockToolbar({
    hideDragHandle,
    focusOnMount,
    __experimentalInitialIndex,
    __experimentalOnIndexChange,
    variant = "unstyled"
  }) {
    const {
      blockClientId,
      blockClientIds,
      isDefaultEditingMode,
      blockType,
      toolbarKey,
      shouldShowVisualToolbar,
      showParentSelector,
      isUsingBindings,
      isSectionContainer,
      hasContentOnlyLocking,
      showShuffleButton,
      showSlots,
      showGroupButtons,
      showLockButtons,
      showBlockVisibilityButton,
      showSwitchSectionStyleButton,
      areSelectedBlocksHiddenOnViewport,
      canEdit
    } = (0, import_data117.useSelect)((select3) => {
      const { canEditBlock: canEditBlock2 } = select3(store);
      const {
        getBlockName: getBlockName2,
        getBlockMode: getBlockMode2,
        getBlockParents: getBlockParents2,
        getSelectedBlockClientIds: getSelectedBlockClientIds2,
        isBlockValid: isBlockValid2,
        getBlockEditingMode: getBlockEditingMode2,
        getBlockAttributes: getBlockAttributes3,
        getSettings: getSettings7,
        getTemplateLock: getTemplateLock2,
        getParentSectionBlock: getParentSectionBlock2,
        isZoomOut: isZoomOut2,
        isSectionBlock: isSectionBlock2,
        isBlockHiddenAtViewport: isBlockHiddenAtViewport2
      } = unlock(select3(store));
      const selectedBlockClientIds = getSelectedBlockClientIds2();
      const selectedBlockClientId = selectedBlockClientIds[0];
      const parents = getBlockParents2(selectedBlockClientId);
      const parentSection = getParentSectionBlock2(selectedBlockClientId);
      const parentClientId = parentSection ?? parents[parents.length - 1];
      const parentBlockName = getBlockName2(parentClientId);
      const parentBlockType = (0, import_blocks74.getBlockType)(parentBlockName);
      const editingMode = getBlockEditingMode2(selectedBlockClientId);
      const _isDefaultEditingMode = editingMode === "default";
      const _blockName = getBlockName2(selectedBlockClientId);
      const isValid2 = selectedBlockClientIds.every(
        (id) => isBlockValid2(id)
      );
      const isVisual = selectedBlockClientIds.every(
        (id) => getBlockMode2(id) === "visual"
      );
      const _isUsingBindings = selectedBlockClientIds.every(
        (clientId) => !!getBlockAttributes3(clientId)?.metadata?.bindings
      );
      const _hasTemplateLock = selectedBlockClientIds.some(
        (id) => getTemplateLock2(id) === "contentOnly"
      );
      const _isZoomOut = isZoomOut2();
      const _isSectionBlock = isSectionBlock2(selectedBlockClientId);
      const _canEditBlock = canEditBlock2(selectedBlockClientId);
      const _showSwitchSectionStyleButton = _canEditBlock && (_isZoomOut || _isSectionBlock);
      const _currentDeviceType = getSettings7()?.[deviceTypeKey]?.toLowerCase() || "desktop";
      const _areSelectedBlocksHiddenOnViewport = selectedBlockClientIds.length > 0 && selectedBlockClientIds.every(
        (id) => isBlockHiddenAtViewport2(id, _currentDeviceType)
      );
      return {
        blockClientId: selectedBlockClientId,
        blockClientIds: selectedBlockClientIds,
        isDefaultEditingMode: _isDefaultEditingMode,
        blockType: selectedBlockClientId && (0, import_blocks74.getBlockType)(_blockName),
        shouldShowVisualToolbar: isValid2 && isVisual,
        toolbarKey: `${selectedBlockClientId}${parentClientId}`,
        showParentSelector: !_isZoomOut && parentBlockType && editingMode !== "contentOnly" && getBlockEditingMode2(parentClientId) !== "disabled" && (0, import_blocks74.hasBlockSupport)(
          parentBlockType,
          "__experimentalParentSelector",
          true
        ) && selectedBlockClientIds.length === 1,
        isUsingBindings: _isUsingBindings,
        isSectionContainer: _isSectionBlock,
        hasContentOnlyLocking: _hasTemplateLock,
        showShuffleButton: _isZoomOut,
        showSlots: !_isZoomOut,
        showGroupButtons: !_isZoomOut,
        showLockButtons: !_isZoomOut,
        showBlockVisibilityButton: !_isZoomOut,
        showSwitchSectionStyleButton: _showSwitchSectionStyleButton,
        areSelectedBlocksHiddenOnViewport: _areSelectedBlocksHiddenOnViewport,
        canEdit: _canEditBlock
      };
    }, []);
    const toolbarWrapperRef = (0, import_element122.useRef)(null);
    const nodeRef = (0, import_element122.useRef)();
    const showHoveredOrFocusedGestures = useShowHoveredOrFocusedGestures({
      ref: nodeRef
    });
    const isLargeViewport = !(0, import_compose67.useViewportMatch)("medium", "<");
    const hasBlockToolbar = useHasBlockToolbar();
    if (!hasBlockToolbar) {
      return null;
    }
    const isMultiToolbar = blockClientIds.length > 1;
    const isSynced = (0, import_blocks74.isReusableBlock)(blockType) || (0, import_blocks74.isTemplatePart)(blockType);
    const classes = clsx_default("block-editor-block-contextual-toolbar", {
      "has-parent": showParentSelector
    });
    const innerClasses = clsx_default("block-editor-block-toolbar", {
      "is-synced": isSynced,
      "is-connected": isUsingBindings
    });
    return /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
      NavigableToolbar,
      {
        focusEditorOnEscape: true,
        className: classes,
        "aria-label": (0, import_i18n99.__)("Block tools"),
        variant: variant === "toolbar" ? void 0 : variant,
        focusOnMount,
        __experimentalInitialIndex,
        __experimentalOnIndexChange,
        children: /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)("div", { ref: toolbarWrapperRef, className: innerClasses, children: [
          showParentSelector && !isMultiToolbar && isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(BlockParentSelector, {}),
          (shouldShowVisualToolbar || isMultiToolbar) && /* @__PURE__ */ (0, import_jsx_runtime254.jsx)("div", { ref: nodeRef, ...showHoveredOrFocusedGestures, children: /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)(import_components115.ToolbarGroup, { className: "block-editor-block-toolbar__block-controls", children: [
            /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
              BlockToolbarIcon,
              {
                clientIds: blockClientIds,
                isSynced
              }
            ),
            isDefaultEditingMode && showBlockVisibilityButton && /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
              BlockVisibilityViewportToolbar,
              {
                clientIds: blockClientIds
              }
            ),
            !isMultiToolbar && isDefaultEditingMode && showLockButtons && /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
              BlockLockToolbar,
              {
                clientId: blockClientId
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
              block_mover_default,
              {
                clientIds: blockClientIds,
                hideDragHandle
              }
            )
          ] }) }),
          !areSelectedBlocksHiddenOnViewport && !hasContentOnlyLocking && shouldShowVisualToolbar && isMultiToolbar && showGroupButtons && /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(toolbar_default, {}),
          !isMultiToolbar && canEdit && /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(EditSectionButton, { clientId: blockClientIds[0] }),
          !areSelectedBlocksHiddenOnViewport && showShuffleButton && /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(ChangeDesign, { clientId: blockClientIds[0] }),
          !areSelectedBlocksHiddenOnViewport && showSwitchSectionStyleButton && /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(switch_section_style_default, { clientId: blockClientIds[0] }),
          !areSelectedBlocksHiddenOnViewport && shouldShowVisualToolbar && showSlots && /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)(import_jsx_runtime254.Fragment, { children: [
            !isSectionContainer && /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)(import_jsx_runtime254.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
                block_controls_default.Slot,
                {
                  group: "parent",
                  className: "block-editor-block-toolbar__slot"
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
                block_controls_default.Slot,
                {
                  group: "block",
                  className: "block-editor-block-toolbar__slot"
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(block_controls_default.Slot, { className: "block-editor-block-toolbar__slot" }),
              /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
                block_controls_default.Slot,
                {
                  group: "inline",
                  className: "block-editor-block-toolbar__slot"
                }
              )
            ] }),
            /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
              block_controls_default.Slot,
              {
                group: "other",
                className: "block-editor-block-toolbar__slot"
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(block_toolbar_last_item_default.Slot, {})
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(BlockEditVisuallyButton, { clientIds: blockClientIds }),
          /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(block_settings_menu_default, { clientIds: blockClientIds })
        ] })
      },
      toolbarKey
    );
  }
  function BlockToolbar({ hideDragHandle, variant }) {
    return /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
      PrivateBlockToolbar,
      {
        hideDragHandle,
        variant,
        focusOnMount: void 0,
        __experimentalInitialIndex: void 0,
        __experimentalOnIndexChange: void 0
      }
    );
  }

  // packages/block-editor/build-module/components/block-tools/block-toolbar-popover.mjs
  var import_jsx_runtime255 = __toESM(require_jsx_runtime(), 1);
  function BlockToolbarPopover({
    clientId,
    isTyping: isTyping3,
    __unstableContentRef
  }) {
    const { capturingClientId, isInsertionPointVisible, lastClientId } = useSelectedBlockToolProps(clientId);
    const initialToolbarItemIndexRef = (0, import_element123.useRef)();
    (0, import_element123.useEffect)(() => {
      initialToolbarItemIndexRef.current = void 0;
    }, [clientId]);
    const { stopTyping: stopTyping2 } = (0, import_data118.useDispatch)(store);
    const isToolbarForcedRef = (0, import_element123.useRef)(false);
    (0, import_keyboard_shortcuts9.useShortcut)("core/block-editor/focus-toolbar", () => {
      isToolbarForcedRef.current = true;
      stopTyping2(true);
    });
    (0, import_element123.useEffect)(() => {
      isToolbarForcedRef.current = false;
    });
    const clientIdToPositionOver = capturingClientId || clientId;
    const popoverProps3 = useBlockToolbarPopoverProps({
      contentElement: __unstableContentRef?.current,
      clientId: clientIdToPositionOver
    });
    return !isTyping3 && /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
      PrivateBlockPopover,
      {
        clientId: clientIdToPositionOver,
        bottomClientId: lastClientId,
        className: clsx_default("block-editor-block-list__block-popover", {
          "is-insertion-point-visible": isInsertionPointVisible
        }),
        resize: false,
        ...popoverProps3,
        __unstableContentRef,
        children: /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
          PrivateBlockToolbar,
          {
            focusOnMount: isToolbarForcedRef.current,
            __experimentalInitialIndex: initialToolbarItemIndexRef.current,
            __experimentalOnIndexChange: (index) => {
              initialToolbarItemIndexRef.current = index;
            },
            variant: "toolbar"
          }
        )
      }
    );
  }

  // packages/block-editor/build-module/components/block-tools/zoom-out-mode-inserters.mjs
  var import_data119 = __toESM(require_data(), 1);
  var import_element124 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/block-tools/zoom-out-mode-inserter-button.mjs
  var import_components116 = __toESM(require_components(), 1);
  var import_i18n100 = __toESM(require_i18n(), 1);
  var import_jsx_runtime256 = __toESM(require_jsx_runtime(), 1);
  function ZoomOutModeInserterButton({ onClick }) {
    return /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(
      import_components116.Button,
      {
        variant: "primary",
        icon: plus_default,
        size: "compact",
        className: clsx_default(
          "block-editor-button-pattern-inserter__button",
          "block-editor-block-tools__zoom-out-mode-inserter-button"
        ),
        onClick,
        label: (0, import_i18n100._x)(
          "Add pattern",
          "Generic label for pattern inserter button"
        )
      }
    );
  }
  var zoom_out_mode_inserter_button_default = ZoomOutModeInserterButton;

  // packages/block-editor/build-module/components/block-tools/zoom-out-mode-inserters.mjs
  var import_jsx_runtime257 = __toESM(require_jsx_runtime(), 1);
  function ZoomOutModeInserters() {
    const [isReady, setIsReady] = (0, import_element124.useState)(false);
    const {
      hasSelection,
      blockOrder,
      setInserterIsOpened,
      sectionRootClientId,
      selectedBlockClientId,
      blockInsertionPoint,
      insertionPointVisible
    } = (0, import_data119.useSelect)((select3) => {
      const {
        getSettings: getSettings7,
        getBlockOrder: getBlockOrder2,
        getSelectionStart: getSelectionStart2,
        getSelectedBlockClientId: getSelectedBlockClientId2,
        getSectionRootClientId: getSectionRootClientId2,
        getBlockInsertionPoint: getBlockInsertionPoint2,
        isBlockInsertionPointVisible: isBlockInsertionPointVisible2
      } = unlock(select3(store));
      const root = getSectionRootClientId2();
      return {
        hasSelection: !!getSelectionStart2().clientId,
        blockOrder: getBlockOrder2(root),
        sectionRootClientId: root,
        setInserterIsOpened: getSettings7().__experimentalSetIsInserterOpened,
        selectedBlockClientId: getSelectedBlockClientId2(),
        blockInsertionPoint: getBlockInsertionPoint2(),
        insertionPointVisible: isBlockInsertionPointVisible2()
      };
    }, []);
    const { showInsertionPoint: showInsertionPoint2 } = unlock((0, import_data119.useDispatch)(store));
    (0, import_element124.useEffect)(() => {
      const timeout = setTimeout(() => {
        setIsReady(true);
      }, 500);
      return () => {
        clearTimeout(timeout);
      };
    }, []);
    if (!isReady || !hasSelection) {
      return null;
    }
    const previousClientId = selectedBlockClientId;
    const index = blockOrder.findIndex(
      (clientId) => selectedBlockClientId === clientId
    );
    const insertionIndex = index + 1;
    const nextClientId = blockOrder[insertionIndex];
    if (insertionPointVisible && blockInsertionPoint?.index === insertionIndex) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
      inbetween_default,
      {
        previousClientId,
        nextClientId,
        children: /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
          zoom_out_mode_inserter_button_default,
          {
            onClick: () => {
              setInserterIsOpened({
                rootClientId: sectionRootClientId,
                insertionIndex,
                tab: "patterns",
                category: "all"
              });
              showInsertionPoint2(sectionRootClientId, insertionIndex, {
                operation: "insert"
              });
            }
          }
        )
      }
    );
  }
  var zoom_out_mode_inserters_default = ZoomOutModeInserters;

  // packages/block-editor/build-module/components/block-tools/use-show-block-tools.mjs
  var import_data120 = __toESM(require_data(), 1);
  var import_blocks75 = __toESM(require_blocks(), 1);
  function useShowBlockTools() {
    return (0, import_data120.useSelect)((select3) => {
      const {
        getSelectedBlockClientId: getSelectedBlockClientId2,
        getFirstMultiSelectedBlockClientId: getFirstMultiSelectedBlockClientId2,
        getBlock: getBlock2,
        getBlockMode: getBlockMode2,
        getSettings: getSettings7,
        isTyping: isTyping3,
        isBlockInterfaceHidden: isBlockInterfaceHidden3
      } = unlock(select3(store));
      const clientId = getSelectedBlockClientId2() || getFirstMultiSelectedBlockClientId2();
      const block = getBlock2(clientId);
      const hasSelectedBlock2 = !!clientId && !!block;
      const isEmptyDefaultBlock = hasSelectedBlock2 && (0, import_blocks75.isUnmodifiedDefaultBlock)(block, "content") && getBlockMode2(clientId) !== "html";
      const _showEmptyBlockSideInserter = clientId && !isTyping3() && isEmptyDefaultBlock;
      const _showBlockToolbarPopover = !isBlockInterfaceHidden3() && !getSettings7().hasFixedToolbar && !_showEmptyBlockSideInserter && hasSelectedBlock2 && !isEmptyDefaultBlock;
      return {
        showEmptyBlockSideInserter: _showEmptyBlockSideInserter,
        showBlockToolbarPopover: _showBlockToolbarPopover
      };
    }, []);
  }

  // packages/block-editor/build-module/components/block-tools/index.mjs
  var import_jsx_runtime258 = __toESM(require_jsx_runtime(), 1);
  function selector2(select3) {
    const {
      getSelectedBlockClientId: getSelectedBlockClientId2,
      getFirstMultiSelectedBlockClientId: getFirstMultiSelectedBlockClientId2,
      getSettings: getSettings7,
      isTyping: isTyping3,
      isDragging: isDragging3,
      isZoomOut: isZoomOut2,
      getViewportModalClientIds: getViewportModalClientIds2
    } = unlock(select3(store));
    const clientId = getSelectedBlockClientId2() || getFirstMultiSelectedBlockClientId2();
    return {
      clientId,
      hasFixedToolbar: getSettings7().hasFixedToolbar,
      isTyping: isTyping3(),
      isZoomOutMode: isZoomOut2(),
      isDragging: isDragging3(),
      viewportModalClientIds: getViewportModalClientIds2()
    };
  }
  function BlockTools({
    children,
    __unstableContentRef,
    ...props
  }) {
    const {
      clientId,
      hasFixedToolbar,
      isTyping: isTyping3,
      isZoomOutMode,
      isDragging: isDragging3,
      viewportModalClientIds: viewportModalClientIds2
    } = (0, import_data121.useSelect)(selector2, []);
    const isMatch = (0, import_keyboard_shortcuts10.__unstableUseShortcutEventMatch)();
    const {
      getBlocksByClientId: getBlocksByClientId2,
      getSelectedBlockClientIds: getSelectedBlockClientIds2,
      getBlockRootClientId: getBlockRootClientId2,
      getBlockEditingMode: getBlockEditingMode2,
      getBlockName: getBlockName2,
      isGroupable: isGroupable2,
      getEditedContentOnlySection: getEditedContentOnlySection2,
      canEditBlock: canEditBlock2
    } = unlock((0, import_data121.useSelect)(store));
    const { getGroupingBlockName } = (0, import_data121.useSelect)(import_blocks76.store);
    const { showEmptyBlockSideInserter, showBlockToolbarPopover } = useShowBlockTools();
    const pasteStyles = usePasteStyles();
    const [renamingBlockClientId, setRenamingBlockClientId] = (0, import_element125.useState)(null);
    const { canRename } = useBlockRename(
      getBlockName2(getSelectedBlockClientIds2()[0])
    );
    const {
      duplicateBlocks: duplicateBlocks2,
      removeBlocks: removeBlocks2,
      replaceBlocks: replaceBlocks2,
      insertAfterBlock: insertAfterBlock2,
      insertBeforeBlock: insertBeforeBlock2,
      selectBlock: selectBlock2,
      moveBlocksUp: moveBlocksUp2,
      moveBlocksDown: moveBlocksDown2,
      expandBlock: expandBlock2,
      stopEditingContentOnlySection: stopEditingContentOnlySection2,
      showViewportModal: showViewportModal2,
      hideViewportModal: hideViewportModal2
    } = unlock((0, import_data121.useDispatch)(store));
    function onKeyDown(event) {
      if (event.defaultPrevented) {
        return;
      }
      if (isMatch("core/block-editor/move-up", event) || isMatch("core/block-editor/move-down", event)) {
        const clientIds = getSelectedBlockClientIds2();
        if (clientIds.length) {
          event.preventDefault();
          const rootClientId = getBlockRootClientId2(clientIds[0]);
          const direction = isMatch("core/block-editor/move-up", event) ? "up" : "down";
          if (direction === "up") {
            moveBlocksUp2(clientIds, rootClientId);
          } else {
            moveBlocksDown2(clientIds, rootClientId);
          }
          const blockLength = Array.isArray(clientIds) ? clientIds.length : 1;
          const message2 = (0, import_i18n101.sprintf)(
            // translators: %d: the name of the block that has been moved
            (0, import_i18n101._n)(
              "%d block moved.",
              "%d blocks moved.",
              clientIds.length
            ),
            blockLength
          );
          (0, import_a11y12.speak)(message2);
        }
      } else if (isMatch("core/block-editor/duplicate", event)) {
        const clientIds = getSelectedBlockClientIds2();
        if (clientIds.length) {
          event.preventDefault();
          duplicateBlocks2(clientIds);
        }
      } else if (isMatch("core/block-editor/remove", event)) {
        const clientIds = getSelectedBlockClientIds2();
        if (clientIds.length) {
          event.preventDefault();
          removeBlocks2(clientIds);
        }
      } else if (isMatch("core/block-editor/paste-styles", event)) {
        const clientIds = getSelectedBlockClientIds2();
        if (clientIds.length) {
          event.preventDefault();
          const blocks2 = getBlocksByClientId2(clientIds);
          pasteStyles(blocks2);
        }
      } else if (isMatch("core/block-editor/insert-after", event)) {
        const clientIds = getSelectedBlockClientIds2();
        if (clientIds.length) {
          event.preventDefault();
          insertAfterBlock2(clientIds[clientIds.length - 1]);
        }
      } else if (isMatch("core/block-editor/insert-before", event)) {
        const clientIds = getSelectedBlockClientIds2();
        if (clientIds.length) {
          event.preventDefault();
          insertBeforeBlock2(clientIds[0]);
        }
      } else if (isMatch("core/block-editor/unselect", event)) {
        if (event.target.closest("[role=toolbar]")) {
          return;
        }
        const clientIds = getSelectedBlockClientIds2();
        if (clientIds.length > 1) {
          event.preventDefault();
          selectBlock2(clientIds[0]);
        }
      } else if (isMatch("core/block-editor/collapse-list-view", event)) {
        if ((0, import_dom29.isTextField)(event.target) || (0, import_dom29.isTextField)(
          event.target?.contentWindow?.document?.activeElement
        )) {
          return;
        }
        event.preventDefault();
        expandBlock2(clientId);
      } else if (isMatch("core/block-editor/group", event)) {
        const clientIds = getSelectedBlockClientIds2();
        if (clientIds.length > 1 && isGroupable2(clientIds)) {
          event.preventDefault();
          const blocks2 = getBlocksByClientId2(clientIds);
          const groupingBlockName = getGroupingBlockName();
          const newBlocks = (0, import_blocks76.switchToBlockType)(
            blocks2,
            groupingBlockName
          );
          replaceBlocks2(clientIds, newBlocks);
          (0, import_a11y12.speak)((0, import_i18n101.__)("Selected blocks are grouped."));
        }
      } else if (isMatch("core/block-editor/rename", event)) {
        const clientIds = getSelectedBlockClientIds2();
        if (clientIds.length === 1) {
          const isContentOnly = getBlockEditingMode2(clientIds[0]) === "contentOnly";
          const canRenameBlock = canRename && !isContentOnly && canEditBlock2(clientIds[0]);
          if (canRenameBlock) {
            event.preventDefault();
            setRenamingBlockClientId(clientIds[0]);
          }
        }
      } else if (isMatch("core/block-editor/toggle-block-visibility", event)) {
        const clientIds = getSelectedBlockClientIds2();
        if (clientIds.length) {
          event.preventDefault();
          const blocks2 = getBlocksByClientId2(clientIds);
          const supportsBlockVisibility = blocks2.every(
            (block) => (0, import_blocks76.hasBlockSupport)(block.name, "visibility", true)
          );
          if (!supportsBlockVisibility) {
            return;
          }
          if (clientIds.some(
            (id) => getBlockEditingMode2(id) !== "default" || !canEditBlock2(id)
          )) {
            return;
          }
          showViewportModal2(clientIds);
        }
      }
      if (isMatch("core/block-editor/stop-editing-as-blocks", event)) {
        if (getEditedContentOnlySection2()) {
          stopEditingContentOnlySection2();
        }
      }
    }
    const blockToolbarRef = use_popover_scroll_default(__unstableContentRef);
    const blockToolbarAfterRef = use_popover_scroll_default(__unstableContentRef);
    return (
      // eslint-disable-next-line jsx-a11y/no-static-element-interactions
      /* @__PURE__ */ (0, import_jsx_runtime258.jsxs)(
        "div",
        {
          ...props,
          onKeyDown,
          className: clsx_default(props.className, {
            "block-editor-block-tools--is-dragging": isDragging3
          }),
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime258.jsxs)(InsertionPointOpenRef.Provider, { value: (0, import_element125.useRef)(false), children: [
              !isTyping3 && !isZoomOutMode && /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
                InsertionPoint,
                {
                  __unstableContentRef
                }
              ),
              showEmptyBlockSideInserter && /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
                EmptyBlockInserter,
                {
                  __unstableContentRef,
                  clientId
                }
              ),
              showBlockToolbarPopover && /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
                BlockToolbarPopover,
                {
                  __unstableContentRef,
                  clientId,
                  isTyping: isTyping3
                }
              ),
              !isZoomOutMode && !hasFixedToolbar && /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
                import_components117.Popover.Slot,
                {
                  name: "block-toolbar",
                  ref: blockToolbarRef
                }
              ),
              children,
              /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
                import_components117.Popover.Slot,
                {
                  name: "__unstable-block-tools-after",
                  ref: blockToolbarAfterRef
                }
              ),
              isZoomOutMode && !isDragging3 && /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
                zoom_out_mode_inserters_default,
                {
                  __unstableContentRef
                }
              )
            ] }),
            renamingBlockClientId && /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
              BlockRenameModal,
              {
                clientId: renamingBlockClientId,
                onClose: () => setRenamingBlockClientId(null)
              }
            ),
            viewportModalClientIds2 && /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
              BlockVisibilityModal,
              {
                clientIds: viewportModalClientIds2,
                onClose: hideViewportModal2
              }
            )
          ]
        }
      )
    );
  }

  // packages/block-editor/build-module/components/use-block-commands/index.mjs
  var import_i18n102 = __toESM(require_i18n(), 1);
  var import_blocks77 = __toESM(require_blocks(), 1);
  var import_data122 = __toESM(require_data(), 1);
  var import_commands = __toESM(require_commands(), 1);
  var getTransformCommands = () => function useTransformCommands() {
    const { replaceBlocks: replaceBlocks2, multiSelect: multiSelect2 } = (0, import_data122.useDispatch)(store);
    const {
      blocks: blocks2,
      clientIds,
      canRemove,
      possibleBlockTransformations,
      invalidSelection
    } = (0, import_data122.useSelect)((select3) => {
      const {
        getBlockRootClientId: getBlockRootClientId2,
        getBlockTransformItems: getBlockTransformItems2,
        getSelectedBlockClientIds: getSelectedBlockClientIds2,
        getBlocksByClientId: getBlocksByClientId2,
        canRemoveBlocks: canRemoveBlocks2
      } = select3(store);
      const selectedBlockClientIds = getSelectedBlockClientIds2();
      const selectedBlocks = getBlocksByClientId2(
        selectedBlockClientIds
      );
      if (selectedBlocks.filter((block) => !block).length > 0) {
        return {
          invalidSelection: true
        };
      }
      const rootClientId = getBlockRootClientId2(
        selectedBlockClientIds[0]
      );
      return {
        blocks: selectedBlocks,
        clientIds: selectedBlockClientIds,
        possibleBlockTransformations: getBlockTransformItems2(
          selectedBlocks,
          rootClientId
        ),
        canRemove: canRemoveBlocks2(selectedBlockClientIds),
        invalidSelection: false
      };
    }, []);
    if (invalidSelection) {
      return {
        isLoading: false,
        commands: []
      };
    }
    const isTemplate = blocks2.length === 1 && (0, import_blocks77.isTemplatePart)(blocks2[0]);
    function selectForMultipleBlocks(insertedBlocks) {
      if (insertedBlocks.length > 1) {
        multiSelect2(
          insertedBlocks[0].clientId,
          insertedBlocks[insertedBlocks.length - 1].clientId
        );
      }
    }
    function onBlockTransform(name) {
      const newBlocks = (0, import_blocks77.switchToBlockType)(blocks2, name);
      replaceBlocks2(clientIds, newBlocks);
      selectForMultipleBlocks(newBlocks);
    }
    const hasPossibleBlockTransformations = !!possibleBlockTransformations.length && canRemove && !isTemplate;
    if (!clientIds || clientIds.length < 1 || !hasPossibleBlockTransformations) {
      return { isLoading: false, commands: [] };
    }
    const commands = possibleBlockTransformations.map(
      (transformation) => {
        const { name, title, icon } = transformation;
        const blockIcon = !icon?.src || icon?.src === "block-default" ? {
          src: block_default_default
        } : icon;
        return {
          name: "core/block-editor/transform-to-" + name.replace("/", "-"),
          /* translators: %s: Block or block variation name. */
          label: (0, import_i18n102.sprintf)((0, import_i18n102.__)("Transform to %s"), title),
          icon: blockIcon?.src,
          category: "command",
          callback: ({ close }) => {
            onBlockTransform(name);
            close();
          }
        };
      }
    );
    return { isLoading: false, commands };
  };
  var getQuickActionsCommands = () => function useQuickActionsCommands() {
    const { clientIds, isUngroupable: isUngroupable2, isGroupable: isGroupable2 } = (0, import_data122.useSelect)(
      (select3) => {
        const {
          getSelectedBlockClientIds: getSelectedBlockClientIds2,
          isUngroupable: _isUngroupable,
          isGroupable: _isGroupable
        } = select3(store);
        const selectedBlockClientIds = getSelectedBlockClientIds2();
        return {
          clientIds: selectedBlockClientIds,
          isUngroupable: _isUngroupable(),
          isGroupable: _isGroupable()
        };
      },
      []
    );
    const {
      canInsertBlockType: canInsertBlockType2,
      getBlockRootClientId: getBlockRootClientId2,
      getBlocksByClientId: getBlocksByClientId2,
      canRemoveBlocks: canRemoveBlocks2,
      isBlockHiddenAnywhere: isBlockHiddenAnywhere2
    } = unlock((0, import_data122.useSelect)(store));
    const { getBlockEditingMode: getBlockEditingMode2 } = (0, import_data122.useSelect)(store);
    const { getDefaultBlockName: getDefaultBlockName8, getGroupingBlockName } = (0, import_data122.useSelect)(import_blocks77.store);
    const blocks2 = getBlocksByClientId2(clientIds);
    const blockEditorDispatch = (0, import_data122.useDispatch)(store);
    const {
      removeBlocks: removeBlocks2,
      replaceBlocks: replaceBlocks2,
      duplicateBlocks: duplicateBlocks2,
      insertAfterBlock: insertAfterBlock2,
      insertBeforeBlock: insertBeforeBlock2
    } = blockEditorDispatch;
    const onGroup = () => {
      if (!blocks2.length) {
        return;
      }
      const groupingBlockName = getGroupingBlockName();
      const newBlocks = (0, import_blocks77.switchToBlockType)(blocks2, groupingBlockName);
      if (!newBlocks) {
        return;
      }
      replaceBlocks2(clientIds, newBlocks);
    };
    const onUngroup = () => {
      if (!blocks2.length) {
        return;
      }
      const innerBlocks = blocks2[0].innerBlocks;
      if (!innerBlocks.length) {
        return;
      }
      replaceBlocks2(clientIds, innerBlocks);
    };
    if (!clientIds || clientIds.length < 1) {
      return { isLoading: false, commands: [] };
    }
    const { showViewportModal: showViewportModal2 } = unlock(blockEditorDispatch);
    const rootClientId = getBlockRootClientId2(clientIds[0]);
    const canInsertDefaultBlock = canInsertBlockType2(
      getDefaultBlockName8(),
      rootClientId
    );
    const canDuplicate = blocks2.every((block) => {
      return !!block && (0, import_blocks77.hasBlockSupport)(block.name, "multiple", true) && canInsertBlockType2(block.name, rootClientId);
    });
    const canRemove = canRemoveBlocks2(clientIds);
    const commands = [];
    if (canDuplicate) {
      commands.push({
        name: "duplicate",
        label: (0, import_i18n102.__)("Duplicate"),
        callback: () => duplicateBlocks2(clientIds, true),
        icon: copy_default
      });
    }
    if (canInsertDefaultBlock) {
      commands.push(
        {
          name: "add-before",
          label: (0, import_i18n102.__)("Add before"),
          callback: () => {
            const clientId = Array.isArray(clientIds) ? clientIds[0] : clientId;
            insertBeforeBlock2(clientId);
          },
          icon: plus_default
        },
        {
          name: "add-after",
          label: (0, import_i18n102.__)("Add after"),
          callback: () => {
            const clientId = Array.isArray(clientIds) ? clientIds[clientIds.length - 1] : clientId;
            insertAfterBlock2(clientId);
          },
          icon: plus_default
        }
      );
    }
    if (isGroupable2) {
      commands.push({
        name: "Group",
        label: (0, import_i18n102.__)("Group"),
        callback: onGroup,
        icon: group_default
      });
    }
    if (isUngroupable2) {
      commands.push({
        name: "ungroup",
        label: (0, import_i18n102.__)("Ungroup"),
        callback: onUngroup,
        icon: ungroup_default
      });
    }
    if (canRemove) {
      commands.push({
        name: "remove",
        label: (0, import_i18n102.__)("Delete"),
        callback: () => removeBlocks2(clientIds, true),
        icon: trash_default
      });
    }
    const supportsVisibility = blocks2.every(
      (block) => !!block && (0, import_blocks77.hasBlockSupport)(block.name, "visibility", true)
    );
    const allBlocksDefaultMode = clientIds.every(
      (id) => getBlockEditingMode2(id) === "default"
    );
    if (supportsVisibility && allBlocksDefaultMode) {
      const hasHiddenBlock = clientIds.some(
        (id) => isBlockHiddenAnywhere2(id)
      );
      commands.push({
        name: "toggle-visibility",
        label: hasHiddenBlock ? (0, import_i18n102.__)("Show") : (0, import_i18n102.__)("Hide"),
        callback: () => showViewportModal2(clientIds),
        icon: hasHiddenBlock ? seen_default : unseen_default
      });
    }
    return {
      isLoading: false,
      commands: commands.map((command) => ({
        ...command,
        name: "core/block-editor/action-" + command.name,
        category: "command",
        callback: ({ close }) => {
          command.callback();
          close();
        }
      }))
    };
  };
  var useBlockCommands = () => {
    (0, import_commands.useCommandLoader)({
      name: "core/block-editor/blockTransforms",
      hook: getTransformCommands()
    });
    (0, import_commands.useCommandLoader)({
      name: "core/block-editor/blockQuickActions",
      hook: getQuickActionsCommands(),
      context: "block-selection-edit"
    });
  };

  // packages/block-editor/build-module/components/block-canvas/index.mjs
  var import_jsx_runtime259 = __toESM(require_jsx_runtime(), 1);
  var BlockCanvasCover = (0, import_components118.createSlotFill)(/* @__PURE__ */ Symbol("BlockCanvasCover"));
  function BlockCanvasCoverWrapper({ children }) {
    return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
      "div",
      {
        className: "block-canvas-cover",
        style: {
          position: "absolute",
          top: 0,
          left: 0,
          width: "100%",
          height: "100%",
          pointerEvents: "none"
        },
        children
      }
    );
  }
  var EDITOR_STYLE_TRANSFORM_OPTIONS = {
    // Don't transform selectors that already specify `.editor-styles-wrapper`.
    ignoredSelectors: [/\.editor-styles-wrapper/gi]
  };
  function ExperimentalBlockCanvas({
    shouldIframe = true,
    height = "300px",
    children = /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(BlockList, {}),
    styles,
    contentRef: contentRefProp,
    iframeProps
  }) {
    useBlockCommands();
    const isTabletViewport = (0, import_compose68.useViewportMatch)("medium", "<");
    const resetTypingRef = useMouseMoveTypingReset();
    const clearerRef = useBlockSelectionClearer();
    const localRef = (0, import_element126.useRef)();
    const contentRef = (0, import_compose68.useMergeRefs)([contentRefProp, clearerRef, localRef]);
    const zoomLevel2 = (0, import_data123.useSelect)(
      (select3) => unlock(select3(store)).getZoomLevel(),
      []
    );
    const zoomOutIframeProps = zoomLevel2 !== 100 && !isTabletViewport ? {
      scale: zoomLevel2,
      frameSize: "40px"
    } : {};
    if (!shouldIframe) {
      return /* @__PURE__ */ (0, import_jsx_runtime259.jsxs)(
        BlockTools,
        {
          __unstableContentRef: localRef,
          style: { height, display: "flex" },
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(BlockCanvasCover.Slot, { fillProps: { containerRef: localRef }, children: (covers) => covers.map((cover, index) => /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(BlockCanvasCoverWrapper, { children: cover }, index)) }),
            /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
              editor_styles_default,
              {
                styles,
                scope: ":where(.editor-styles-wrapper)",
                transformOptions: EDITOR_STYLE_TRANSFORM_OPTIONS
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
              writing_flow_default,
              {
                ref: contentRef,
                className: "editor-styles-wrapper",
                tabIndex: -1,
                style: {
                  height: "100%",
                  width: "100%",
                  overflow: "auto"
                },
                children
              }
            )
          ]
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
      BlockTools,
      {
        __unstableContentRef: localRef,
        style: { height, display: "flex" },
        children: /* @__PURE__ */ (0, import_jsx_runtime259.jsxs)(
          iframe_default,
          {
            ...iframeProps,
            ...zoomOutIframeProps,
            ref: resetTypingRef,
            contentRef,
            style: {
              ...iframeProps?.style
            },
            name: "editor-canvas",
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(BlockCanvasCover.Slot, { fillProps: { containerRef: localRef }, children: (covers) => covers.map((cover, index) => /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(BlockCanvasCoverWrapper, { children: cover }, index)) }),
              /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(editor_styles_default, { styles }),
              children
            ]
          }
        )
      }
    );
  }
  function BlockCanvas({ children, height, styles }) {
    return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(ExperimentalBlockCanvas, { height, styles, children });
  }
  var block_canvas_default = BlockCanvas;

  // packages/block-editor/build-module/components/color-style-selector/index.mjs
  var import_components119 = __toESM(require_components(), 1);
  var import_i18n103 = __toESM(require_i18n(), 1);
  var import_keycodes12 = __toESM(require_keycodes(), 1);
  var import_deprecated13 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime260 = __toESM(require_jsx_runtime(), 1);
  var ColorSelectorSVGIcon = () => /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(import_components119.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", children: /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(import_components119.Path, { d: "M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z" }) });
  var ColorSelectorIcon = ({ style, className }) => {
    return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)("div", { className: "block-library-colors-selector__icon-container", children: /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
      "div",
      {
        className: `${className} block-library-colors-selector__state-selection`,
        style,
        children: /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(ColorSelectorSVGIcon, {})
      }
    ) });
  };
  var renderToggleComponent = ({ TextColor, BackgroundColor }) => function ToggleComponent({ onToggle, isOpen }) {
    const openOnArrowDown = (event) => {
      if (!isOpen && event.keyCode === import_keycodes12.DOWN) {
        event.preventDefault();
        onToggle();
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(import_components119.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
      import_components119.ToolbarButton,
      {
        className: "components-toolbar__control block-library-colors-selector__toggle",
        label: (0, import_i18n103.__)("Open Colors Selector"),
        onClick: onToggle,
        onKeyDown: openOnArrowDown,
        icon: /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(BackgroundColor, { children: /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(TextColor, { children: /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(ColorSelectorIcon, {}) }) })
      }
    ) });
  };
  var BlockColorsStyleSelector = ({ children, ...other }) => {
    (0, import_deprecated13.default)(`wp.blockEditor.BlockColorsStyleSelector`, {
      alternative: "block supports API",
      since: "6.1",
      version: "6.3"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
      import_components119.Dropdown,
      {
        popoverProps: { placement: "bottom-start" },
        className: "block-library-colors-selector",
        contentClassName: "block-library-colors-selector__popover",
        renderToggle: renderToggleComponent(other),
        renderContent: () => children
      }
    );
  };
  var color_style_selector_default = BlockColorsStyleSelector;

  // packages/block-editor/build-module/components/block-navigation/dropdown.mjs
  var import_deprecated15 = __toESM(require_deprecated(), 1);
  var import_components126 = __toESM(require_components(), 1);
  var import_i18n112 = __toESM(require_i18n(), 1);
  var import_data136 = __toESM(require_data(), 1);
  var import_element144 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/list-view/index.mjs
  var import_compose74 = __toESM(require_compose(), 1);
  var import_components125 = __toESM(require_components(), 1);
  var import_data135 = __toESM(require_data(), 1);
  var import_deprecated14 = __toESM(require_deprecated(), 1);
  var import_element143 = __toESM(require_element(), 1);
  var import_i18n111 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/components/list-view/branch.mjs
  var import_components123 = __toESM(require_components(), 1);
  var import_element136 = __toESM(require_element(), 1);
  var import_data128 = __toESM(require_data(), 1);

  // packages/block-editor/build-module/components/list-view/appender.mjs
  var import_compose69 = __toESM(require_compose(), 1);
  var import_a11y13 = __toESM(require_a11y(), 1);
  var import_data124 = __toESM(require_data(), 1);
  var import_element129 = __toESM(require_element(), 1);
  var import_i18n104 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/components/list-view/context.mjs
  var import_element127 = __toESM(require_element(), 1);
  var ListViewContext = (0, import_element127.createContext)({});
  ListViewContext.displayName = "ListViewContext";
  var useListViewContext = () => (0, import_element127.useContext)(ListViewContext);

  // packages/block-editor/build-module/components/list-view/aria-referenced-text.mjs
  var import_element128 = __toESM(require_element(), 1);
  var import_jsx_runtime261 = __toESM(require_jsx_runtime(), 1);
  function AriaReferencedText({ children, ...props }) {
    const ref = (0, import_element128.useRef)();
    (0, import_element128.useEffect)(() => {
      if (ref.current) {
        ref.current.textContent = ref.current.textContent;
      }
    }, [children]);
    return /* @__PURE__ */ (0, import_jsx_runtime261.jsx)("div", { hidden: true, ...props, ref, children });
  }

  // packages/block-editor/build-module/components/list-view/appender.mjs
  var import_jsx_runtime262 = __toESM(require_jsx_runtime(), 1);
  var Appender = (0, import_element129.forwardRef)(
    ({ nestingLevel, blockCount, clientId, ...props }, ref) => {
      const { insertedBlock, setInsertedBlock } = useListViewContext();
      const instanceId = (0, import_compose69.useInstanceId)(Appender);
      const { directInsert, hideInserter } = (0, import_data124.useSelect)(
        (select3) => {
          const { getBlockListSettings: getBlockListSettings2, getTemplateLock: getTemplateLock2, isZoomOut: isZoomOut2 } = unlock(select3(store));
          const settings2 = getBlockListSettings2(clientId);
          const directInsertValue = settings2?.directInsert || false;
          const hideInserterValue = !!getTemplateLock2(clientId) || isZoomOut2();
          return {
            directInsert: directInsertValue,
            hideInserter: hideInserterValue
          };
        },
        [clientId]
      );
      const blockTitle = useBlockDisplayTitle({
        clientId,
        context: "list-view"
      });
      const insertedBlockTitle = useBlockDisplayTitle({
        clientId: insertedBlock?.clientId,
        context: "list-view"
      });
      (0, import_element129.useEffect)(() => {
        if (!insertedBlockTitle?.length) {
          return;
        }
        (0, import_a11y13.speak)(
          (0, import_i18n104.sprintf)(
            // translators: %s: name of block being inserted (i.e. Paragraph, Image, Group etc)
            (0, import_i18n104.__)("%s block inserted"),
            insertedBlockTitle
          ),
          "assertive"
        );
      }, [insertedBlockTitle]);
      if (hideInserter) {
        return null;
      }
      const descriptionId = `list-view-appender__${instanceId}`;
      const description = (0, import_i18n104.sprintf)(
        /* translators: 1: The name of the block. 2: The numerical position of the block. 3: The level of nesting for the block. */
        (0, import_i18n104.__)("Append to %1$s block at position %2$d, Level %3$d"),
        blockTitle,
        blockCount + 1,
        nestingLevel
      );
      return /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)("div", { className: "list-view-appender", children: [
        /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          inserter_default,
          {
            ref,
            rootClientId: clientId,
            position: "bottom right",
            isAppender: true,
            selectBlockOnInsert: false,
            shouldDirectInsert: directInsert,
            __experimentalIsQuick: true,
            ...props,
            toggleProps: { "aria-describedby": descriptionId },
            onSelectOrClose: (maybeInsertedBlock) => {
              if (maybeInsertedBlock?.clientId) {
                setInsertedBlock(maybeInsertedBlock);
              }
            }
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(AriaReferencedText, { id: descriptionId, children: description })
      ] });
    }
  );

  // packages/block-editor/build-module/components/list-view/block.mjs
  var import_blocks78 = __toESM(require_blocks(), 1);
  var import_components122 = __toESM(require_components(), 1);
  var import_compose71 = __toESM(require_compose(), 1);
  var import_element135 = __toESM(require_element(), 1);
  var import_data127 = __toESM(require_data(), 1);
  var import_i18n107 = __toESM(require_i18n(), 1);
  var import_keycodes14 = __toESM(require_keycodes(), 1);
  var import_is_shallow_equal2 = __toESM(require_is_shallow_equal(), 1);
  var import_keyboard_shortcuts11 = __toESM(require_keyboard_shortcuts(), 1);
  var import_a11y14 = __toESM(require_a11y(), 1);

  // packages/block-editor/build-module/components/list-view/leaf.mjs
  var import_components120 = __toESM(require_components(), 1);
  var import_compose70 = __toESM(require_compose(), 1);
  var import_element130 = __toESM(require_element(), 1);
  var import_jsx_runtime263 = __toESM(require_jsx_runtime(), 1);
  var AnimatedTreeGridRow = animated(import_components120.__experimentalTreeGridRow);
  var ListViewLeaf = (0, import_element130.forwardRef)(
    ({
      isDragged,
      isSelected,
      position,
      level,
      rowCount,
      children,
      className,
      path,
      ...props
    }, ref) => {
      const animationRef = use_moving_animation_default({
        clientId: props["data-block"],
        enableAnimation: true,
        triggerAnimationOnChange: path
      });
      const mergedRef = (0, import_compose70.useMergeRefs)([ref, animationRef]);
      return /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
        AnimatedTreeGridRow,
        {
          ref: mergedRef,
          className: clsx_default("block-editor-list-view-leaf", className),
          level,
          positionInSet: position,
          setSize: rowCount,
          isExpanded: void 0,
          ...props,
          children
        }
      );
    }
  );
  var leaf_default = ListViewLeaf;

  // packages/block-editor/build-module/components/list-view/use-list-view-scroll-into-view.mjs
  var import_dom30 = __toESM(require_dom(), 1);
  var import_element131 = __toESM(require_element(), 1);
  function useListViewScrollIntoView({
    isSelected,
    selectedClientIds,
    rowItemRef
  }) {
    const isSingleSelection = selectedClientIds.length === 1;
    (0, import_element131.useLayoutEffect)(() => {
      if (!isSelected || !isSingleSelection || !rowItemRef.current) {
        return;
      }
      const scrollContainer = (0, import_dom30.getScrollContainer)(rowItemRef.current);
      const { ownerDocument } = rowItemRef.current;
      const windowScroll = scrollContainer === ownerDocument.body || scrollContainer === ownerDocument.documentElement;
      if (windowScroll || !scrollContainer) {
        return;
      }
      const rowRect = rowItemRef.current.getBoundingClientRect();
      const scrollContainerRect = scrollContainer.getBoundingClientRect();
      if (rowRect.top < scrollContainerRect.top || rowRect.bottom > scrollContainerRect.bottom) {
        rowItemRef.current.scrollIntoView();
      }
    }, [isSelected, isSingleSelection, rowItemRef]);
  }

  // packages/block-editor/build-module/components/list-view/block-contents.mjs
  var import_element134 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/list-view/block-select-button.mjs
  var import_components121 = __toESM(require_components(), 1);
  var import_element133 = __toESM(require_element(), 1);
  var import_keycodes13 = __toESM(require_keycodes(), 1);
  var import_data126 = __toESM(require_data(), 1);

  // packages/block-editor/build-module/components/list-view/expander.mjs
  var import_i18n105 = __toESM(require_i18n(), 1);
  var import_jsx_runtime264 = __toESM(require_jsx_runtime(), 1);
  function ListViewExpander({ onClick }) {
    return (
      // Keyboard events are handled by TreeGrid see: components/src/tree-grid/index.js
      //
      // The expander component is implemented as a pseudo element in the w3 example
      // https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html
      //
      // We've mimicked this by adding an icon with aria-hidden set to true to hide this from the accessibility tree.
      // For the current tree grid implementation, please do not try to make this a button.
      /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(
        "span",
        {
          className: "block-editor-list-view__expander",
          onClick: (event) => onClick(event, { forceToggle: true }),
          "aria-hidden": "true",
          "data-testid": "list-view-expander",
          children: /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(icon_default, { icon: (0, import_i18n105.isRTL)() ? chevron_left_small_default : chevron_right_small_default })
        }
      )
    );
  }

  // packages/block-editor/build-module/components/list-view/use-list-view-images.mjs
  var import_element132 = __toESM(require_element(), 1);
  var import_data125 = __toESM(require_data(), 1);
  var MAX_IMAGES = 3;
  var IMAGE_GETTERS = {
    "core/image": ({ clientId, attributes }) => {
      if (attributes.url) {
        return {
          url: attributes.url,
          alt: attributes.alt || "",
          clientId
        };
      }
    },
    "core/cover": ({ clientId, attributes }) => {
      if (attributes.backgroundType === "image" && attributes.url) {
        return {
          url: attributes.url,
          alt: attributes.alt || "",
          clientId
        };
      }
    },
    "core/media-text": ({ clientId, attributes }) => {
      if (attributes.mediaType === "image" && attributes.mediaUrl) {
        return {
          url: attributes.mediaUrl,
          alt: attributes.mediaAlt || "",
          clientId
        };
      }
    },
    "core/gallery": ({ innerBlocks }) => {
      const images = [];
      const getValues = !!innerBlocks?.length ? IMAGE_GETTERS[innerBlocks[0].name] : void 0;
      if (!getValues) {
        return images;
      }
      for (const innerBlock of innerBlocks) {
        const img = getValues(innerBlock);
        if (img) {
          images.push(img);
        }
        if (images.length >= MAX_IMAGES) {
          return images;
        }
      }
      return images;
    }
  };
  function getImagesFromBlock(block, isExpanded) {
    const getImages = IMAGE_GETTERS[block.name];
    const images = !!getImages ? getImages(block) : void 0;
    if (!images) {
      return [];
    }
    if (!Array.isArray(images)) {
      return [images];
    }
    return isExpanded ? [] : images;
  }
  function useListViewImages({ clientId, isExpanded }) {
    const { block } = (0, import_data125.useSelect)(
      (select3) => {
        return { block: select3(store).getBlock(clientId) };
      },
      [clientId]
    );
    const images = (0, import_element132.useMemo)(() => {
      return getImagesFromBlock(block, isExpanded);
    }, [block, isExpanded]);
    return images;
  }

  // packages/block-editor/build-module/components/list-view/block-select-button.mjs
  var import_jsx_runtime265 = __toESM(require_jsx_runtime(), 1);
  var { Badge: Badge3 } = unlock(import_components121.privateApis);
  function ListViewBlockSelectButton({
    className,
    block: { clientId },
    onClick,
    onContextMenu,
    onMouseDown,
    onToggleExpanded,
    tabIndex,
    onFocus,
    onDragStart,
    onDragEnd,
    draggable,
    isExpanded,
    ariaDescribedBy
  }, ref) {
    const blockInformation = useBlockDisplayInformation(clientId);
    const blockTitle = useBlockDisplayTitle({
      clientId,
      context: "list-view"
    });
    const { isLocked } = useBlockLock(clientId);
    const { hasPatternName, blockVisibility: blockVisibility2 } = (0, import_data126.useSelect)(
      (select3) => {
        const { getBlockAttributes: getBlockAttributes3 } = unlock(select3(store));
        const attributes = getBlockAttributes3(clientId);
        return {
          hasPatternName: !!attributes?.metadata?.patternName,
          blockVisibility: attributes?.metadata?.blockVisibility
        };
      },
      [clientId]
    );
    const shouldShowLockIcon = isLocked;
    const isSticky = blockInformation?.positionType === "sticky";
    const images = useListViewImages({ clientId, isExpanded });
    const visibilityLabel = getBlockVisibilityLabel(blockVisibility2);
    const onDragStartHandler = (event) => {
      event.dataTransfer.clearData();
      onDragStart?.(event);
    };
    function onKeyDown(event) {
      if (event.keyCode === import_keycodes13.ENTER || event.keyCode === import_keycodes13.SPACE) {
        onClick(event);
      }
    }
    return /* @__PURE__ */ (0, import_jsx_runtime265.jsxs)(
      "a",
      {
        className: clsx_default(
          "block-editor-list-view-block-select-button",
          className
        ),
        onClick,
        onContextMenu,
        onKeyDown,
        onMouseDown,
        ref,
        tabIndex,
        onFocus,
        onDragStart: onDragStartHandler,
        onDragEnd,
        draggable,
        href: `#block-${clientId}`,
        "aria-describedby": ariaDescribedBy,
        "aria-expanded": isExpanded,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(ListViewExpander, { onClick: onToggleExpanded }),
          /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
            block_icon_default,
            {
              icon: hasPatternName ? symbol_default : blockInformation?.icon,
              showColors: true,
              context: "list-view"
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime265.jsxs)(
            import_components121.__experimentalHStack,
            {
              alignment: "center",
              className: "block-editor-list-view-block-select-button__label-wrapper",
              justify: "flex-start",
              spacing: 1,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime265.jsx)("span", { className: "block-editor-list-view-block-select-button__title", children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(import_components121.__experimentalTruncate, { ellipsizeMode: "auto", children: blockTitle }) }),
                blockInformation?.anchor && /* @__PURE__ */ (0, import_jsx_runtime265.jsx)("span", { className: "block-editor-list-view-block-select-button__anchor-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(Badge3, { className: "block-editor-list-view-block-select-button__anchor", children: blockInformation.anchor }) }),
                isSticky && /* @__PURE__ */ (0, import_jsx_runtime265.jsx)("span", { className: "block-editor-list-view-block-select-button__sticky", children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(icon_default, { icon: pin_small_default }) }),
                images.length ? /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
                  "span",
                  {
                    className: "block-editor-list-view-block-select-button__images",
                    "aria-hidden": true,
                    children: images.map((image, index) => /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
                      "span",
                      {
                        className: "block-editor-list-view-block-select-button__image",
                        style: {
                          backgroundImage: `url(${image.url})`,
                          zIndex: images.length - index
                          // Ensure the first image is on top, and subsequent images are behind.
                        }
                      },
                      image.clientId
                    ))
                  }
                ) : null,
                !!visibilityLabel && /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(import_components121.Tooltip, { text: visibilityLabel, children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
                  "span",
                  {
                    className: "block-editor-list-view-block-select-button__block-visibility",
                    "aria-hidden": "true",
                    children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(icon_default, { icon: unseen_default })
                  }
                ) }),
                shouldShowLockIcon && /* @__PURE__ */ (0, import_jsx_runtime265.jsx)("span", { className: "block-editor-list-view-block-select-button__lock", children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(icon_default, { icon: lock_small_default }) })
              ]
            }
          )
        ]
      }
    );
  }
  var block_select_button_default = (0, import_element133.forwardRef)(ListViewBlockSelectButton);

  // packages/block-editor/build-module/components/list-view/block-contents.mjs
  var import_jsx_runtime266 = __toESM(require_jsx_runtime(), 1);
  var ListViewBlockContents = (0, import_element134.forwardRef)(
    ({
      onClick,
      onToggleExpanded,
      block,
      isSelected,
      position,
      siblingBlockCount,
      level,
      isExpanded,
      selectedClientIds,
      ...props
    }, ref) => {
      const { clientId } = block;
      const { AdditionalBlockContent, insertedBlock, setInsertedBlock } = useListViewContext();
      const draggableClientIds = selectedClientIds.includes(clientId) ? selectedClientIds : [clientId];
      return /* @__PURE__ */ (0, import_jsx_runtime266.jsxs)(import_jsx_runtime266.Fragment, { children: [
        AdditionalBlockContent && /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(
          AdditionalBlockContent,
          {
            block,
            insertedBlock,
            setInsertedBlock
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(
          block_draggable_default,
          {
            appendToOwnerDocument: true,
            clientIds: draggableClientIds,
            cloneClassname: "block-editor-list-view-draggable-chip",
            children: ({ draggable, onDragStart, onDragEnd }) => /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(
              block_select_button_default,
              {
                ref,
                className: "block-editor-list-view-block-contents",
                block,
                onClick,
                onToggleExpanded,
                isSelected,
                position,
                siblingBlockCount,
                level,
                draggable,
                onDragStart,
                onDragEnd,
                isExpanded,
                ...props
              }
            )
          }
        )
      ] });
    }
  );
  var block_contents_default = ListViewBlockContents;

  // packages/block-editor/build-module/components/list-view/utils.mjs
  var import_i18n106 = __toESM(require_i18n(), 1);
  var import_dom31 = __toESM(require_dom(), 1);
  var getBlockPositionDescription = (position, siblingCount, level) => (0, import_i18n106.sprintf)(
    /* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */
    (0, import_i18n106.__)("Block %1$d of %2$d, Level %3$d."),
    position,
    siblingCount,
    level
  );
  var getBlockPropertiesDescription = (blockInformation, isLocked) => [
    blockInformation?.positionLabel ? `${(0, import_i18n106.sprintf)(
      // translators: %s: Position of selected block, e.g. "Sticky" or "Fixed".
      (0, import_i18n106.__)("Position: %s"),
      blockInformation.positionLabel
    )}.` : void 0,
    isLocked ? (0, import_i18n106.__)("This block is locked.") : void 0
  ].filter(Boolean).join(" ");
  var isClientIdSelected = (clientId, selectedBlockClientIds) => Array.isArray(selectedBlockClientIds) && selectedBlockClientIds.length ? selectedBlockClientIds.indexOf(clientId) !== -1 : selectedBlockClientIds === clientId;
  function getCommonDepthClientIds(startId, endId, startParents, endParents) {
    const startPath = [...startParents, startId];
    const endPath = [...endParents, endId];
    const depth = Math.min(startPath.length, endPath.length) - 1;
    const start2 = startPath[depth];
    const end = endPath[depth];
    return {
      start: start2,
      end
    };
  }
  function focusListItem(focusClientId, treeGridElement) {
    if (!treeGridElement) {
      return;
    }
    const selector3 = `[role=row][data-block="${focusClientId}"]`;
    return new Promise((resolve) => {
      if (treeGridElement.querySelector(selector3)) {
        return resolve(treeGridElement.querySelector(selector3));
      }
      let timer = null;
      const observer = new window.MutationObserver(() => {
        if (treeGridElement.querySelector(selector3)) {
          clearTimeout(timer);
          observer.disconnect();
          resolve(treeGridElement.querySelector(selector3));
        }
      });
      observer.observe(treeGridElement, {
        childList: true,
        subtree: true
      });
      timer = setTimeout(() => {
        observer.disconnect();
        resolve(null);
      }, 3e3);
    }).then((element) => {
      if (element && element.isConnected) {
        import_dom31.focus.focusable.find(element)?.[0]?.focus();
      }
    });
  }
  function getDragDisplacementValues({
    blockIndexes,
    blockDropTargetIndex,
    blockDropPosition,
    clientId,
    firstDraggedBlockIndex,
    isDragged
  }) {
    let displacement;
    let isNesting;
    let isAfterDraggedBlocks;
    if (!isDragged) {
      isNesting = false;
      const thisBlockIndex = blockIndexes[clientId];
      isAfterDraggedBlocks = thisBlockIndex > firstDraggedBlockIndex;
      if (blockDropTargetIndex !== void 0 && blockDropTargetIndex !== null && firstDraggedBlockIndex !== void 0) {
        if (thisBlockIndex !== void 0) {
          if (thisBlockIndex >= firstDraggedBlockIndex && thisBlockIndex < blockDropTargetIndex) {
            displacement = "up";
          } else if (thisBlockIndex < firstDraggedBlockIndex && thisBlockIndex >= blockDropTargetIndex) {
            displacement = "down";
          } else {
            displacement = "normal";
          }
          isNesting = typeof blockDropTargetIndex === "number" && blockDropTargetIndex - 1 === thisBlockIndex && blockDropPosition === "inside";
        }
      } else if (blockDropTargetIndex === null && firstDraggedBlockIndex !== void 0) {
        if (thisBlockIndex !== void 0 && thisBlockIndex >= firstDraggedBlockIndex) {
          displacement = "up";
        } else {
          displacement = "normal";
        }
      } else if (blockDropTargetIndex !== void 0 && blockDropTargetIndex !== null && firstDraggedBlockIndex === void 0) {
        if (thisBlockIndex !== void 0) {
          if (thisBlockIndex < blockDropTargetIndex) {
            displacement = "normal";
          } else {
            displacement = "down";
          }
        }
      } else if (blockDropTargetIndex === null) {
        displacement = "normal";
      }
    }
    return {
      displacement,
      isNesting,
      isAfterDraggedBlocks
    };
  }

  // packages/block-editor/build-module/components/list-view/block.mjs
  var import_jsx_runtime267 = __toESM(require_jsx_runtime(), 1);
  function ListViewBlock({
    block: { clientId },
    displacement,
    isAfterDraggedBlocks,
    isDragged,
    isNesting,
    isSelected,
    isBranchSelected,
    selectBlock: selectBlock2,
    position,
    level,
    rowCount,
    siblingBlockCount,
    showBlockMovers,
    path,
    isExpanded,
    selectedClientIds,
    isSyncedBranch
  }) {
    const cellRef = (0, import_element135.useRef)(null);
    const rowRef = (0, import_element135.useRef)(null);
    const settingsRef = (0, import_element135.useRef)(null);
    const [isHovered, setIsHovered] = (0, import_element135.useState)(false);
    const [settingsAnchorRect, setSettingsAnchorRect] = (0, import_element135.useState)();
    const [isRenameModalOpen, setIsRenameModalOpen] = (0, import_element135.useState)(false);
    const { isLocked } = useBlockLock(clientId);
    const isFirstSelectedBlock = isSelected && selectedClientIds[0] === clientId;
    const isLastSelectedBlock = isSelected && selectedClientIds[selectedClientIds.length - 1] === clientId;
    const {
      toggleBlockHighlight: toggleBlockHighlight2,
      duplicateBlocks: duplicateBlocks2,
      multiSelect: multiSelect2,
      replaceBlocks: replaceBlocks2,
      removeBlocks: removeBlocks2,
      insertAfterBlock: insertAfterBlock2,
      insertBeforeBlock: insertBeforeBlock2,
      showViewportModal: showViewportModal2
    } = unlock((0, import_data127.useDispatch)(store));
    const debouncedToggleBlockHighlight = (0, import_compose71.useDebounce)(
      toggleBlockHighlight2,
      50
    );
    const {
      canInsertBlockType: canInsertBlockType2,
      getSelectedBlockClientIds: getSelectedBlockClientIds2,
      getPreviousBlockClientId: getPreviousBlockClientId2,
      getBlockRootClientId: getBlockRootClientId2,
      getBlockOrder: getBlockOrder2,
      getBlockParents: getBlockParents2,
      getBlockEditingMode: getBlockEditingMode2,
      getBlocksByClientId: getBlocksByClientId2,
      canEditBlock: canEditBlock2,
      canMoveBlock: canMoveBlock2,
      canRemoveBlocks: canRemoveBlocks2,
      isGroupable: isGroupable2
    } = (0, import_data127.useSelect)(store);
    const { getGroupingBlockName } = (0, import_data127.useSelect)(import_blocks78.store);
    const blockInformation = useBlockDisplayInformation(clientId);
    const pasteStyles = usePasteStyles();
    const { block, blockName, allowRightClickOverrides } = (0, import_data127.useSelect)(
      (select3) => {
        const { getBlock: getBlock2, getBlockName: getBlockName2, getSettings: getSettings7 } = unlock(
          select3(store)
        );
        return {
          block: getBlock2(clientId),
          blockName: getBlockName2(clientId),
          allowRightClickOverrides: getSettings7().allowRightClickOverrides
        };
      },
      [clientId]
    );
    const { canRename } = useBlockRename(blockName);
    const showBlockActions = (
      // When a block hides its toolbar it also hides the block settings menu,
      // since that menu is part of the toolbar in the editor canvas.
      // List View respects this by also hiding the block settings menu.
      (0, import_blocks78.hasBlockSupport)(blockName, "__experimentalToolbar", true)
    );
    const instanceId = (0, import_compose71.useInstanceId)(ListViewBlock);
    const descriptionId = `list-view-block-select-button__description-${instanceId}`;
    const {
      expand,
      collapse,
      collapseAll,
      BlockSettingsMenu: BlockSettingsMenu2,
      listViewInstanceId,
      expandedState,
      setInsertedBlock,
      treeGridElementRef,
      rootClientId
    } = useListViewContext();
    const isMatch = (0, import_keyboard_shortcuts11.__unstableUseShortcutEventMatch)();
    function getBlocksToUpdate() {
      const selectedBlockClientIds = getSelectedBlockClientIds2();
      const isUpdatingSelectedBlocks = selectedBlockClientIds.includes(clientId);
      const firstBlockClientId = isUpdatingSelectedBlocks ? selectedBlockClientIds[0] : clientId;
      const firstBlockRootClientId = getBlockRootClientId2(firstBlockClientId);
      const blocksToUpdate = isUpdatingSelectedBlocks ? selectedBlockClientIds : [clientId];
      return {
        blocksToUpdate,
        firstBlockClientId,
        firstBlockRootClientId,
        selectedBlockClientIds
      };
    }
    async function onKeyDown(event) {
      if (event.defaultPrevented) {
        return;
      }
      if (event.target.closest("[role=dialog]")) {
        return;
      }
      const isDeleteKey = [import_keycodes14.BACKSPACE, import_keycodes14.DELETE].includes(event.keyCode);
      if (isMatch("core/block-editor/unselect", event) && selectedClientIds.length > 0) {
        event.stopPropagation();
        event.preventDefault();
        selectBlock2(event, void 0);
      } else if (isDeleteKey || isMatch("core/block-editor/remove", event)) {
        const {
          blocksToUpdate: blocksToDelete,
          firstBlockClientId,
          firstBlockRootClientId,
          selectedBlockClientIds
        } = getBlocksToUpdate();
        if (!canRemoveBlocks2(blocksToDelete)) {
          return;
        }
        let blockToFocus = getPreviousBlockClientId2(firstBlockClientId) ?? // If the previous block is not found (when the first block is deleted),
        // fallback to focus the parent block.
        firstBlockRootClientId;
        removeBlocks2(blocksToDelete, false);
        const shouldUpdateSelection = selectedBlockClientIds.length > 0 && getSelectedBlockClientIds2().length === 0;
        if (!blockToFocus) {
          blockToFocus = getBlockOrder2()[0];
        }
        updateFocusAndSelection(blockToFocus, shouldUpdateSelection);
      } else if (isMatch("core/block-editor/paste-styles", event)) {
        event.preventDefault();
        const { blocksToUpdate } = getBlocksToUpdate();
        const blocks2 = getBlocksByClientId2(blocksToUpdate);
        pasteStyles(blocks2);
      } else if (isMatch("core/block-editor/duplicate", event)) {
        event.preventDefault();
        const { blocksToUpdate, firstBlockRootClientId } = getBlocksToUpdate();
        const canDuplicate = getBlocksByClientId2(blocksToUpdate).every(
          (blockToUpdate) => {
            return !!blockToUpdate && (0, import_blocks78.hasBlockSupport)(
              blockToUpdate.name,
              "multiple",
              true
            ) && canInsertBlockType2(
              blockToUpdate.name,
              firstBlockRootClientId
            );
          }
        );
        if (canDuplicate) {
          const updatedBlocks = await duplicateBlocks2(
            blocksToUpdate,
            false
          );
          if (updatedBlocks?.length) {
            updateFocusAndSelection(updatedBlocks[0], false);
          }
        }
      } else if (isMatch("core/block-editor/insert-before", event)) {
        event.preventDefault();
        const { blocksToUpdate } = getBlocksToUpdate();
        await insertBeforeBlock2(blocksToUpdate[0]);
        const newlySelectedBlocks = getSelectedBlockClientIds2();
        updateFocusAndSelection(newlySelectedBlocks[0], false);
      } else if (isMatch("core/block-editor/insert-after", event)) {
        event.preventDefault();
        const { blocksToUpdate } = getBlocksToUpdate();
        await insertAfterBlock2(blocksToUpdate.at(-1));
        const newlySelectedBlocks = getSelectedBlockClientIds2();
        updateFocusAndSelection(newlySelectedBlocks[0], false);
      } else if (isMatch("core/block-editor/select-all", event)) {
        event.preventDefault();
        const { firstBlockRootClientId, selectedBlockClientIds } = getBlocksToUpdate();
        const blockClientIds = getBlockOrder2(firstBlockRootClientId);
        if (!blockClientIds.length) {
          return;
        }
        if ((0, import_is_shallow_equal2.isShallowEqual)(selectedBlockClientIds, blockClientIds)) {
          if (firstBlockRootClientId && firstBlockRootClientId !== rootClientId) {
            updateFocusAndSelection(firstBlockRootClientId, true);
            return;
          }
        }
        multiSelect2(
          blockClientIds[0],
          blockClientIds[blockClientIds.length - 1],
          null
        );
      } else if (isMatch("core/block-editor/collapse-list-view", event)) {
        event.preventDefault();
        const { firstBlockClientId } = getBlocksToUpdate();
        const blockParents = getBlockParents2(firstBlockClientId, false);
        collapseAll();
        expand(blockParents);
      } else if (isMatch("core/block-editor/group", event)) {
        const { blocksToUpdate } = getBlocksToUpdate();
        if (blocksToUpdate.length > 1 && isGroupable2(blocksToUpdate)) {
          event.preventDefault();
          const blocks2 = getBlocksByClientId2(blocksToUpdate);
          const groupingBlockName = getGroupingBlockName();
          const newBlocks = (0, import_blocks78.switchToBlockType)(
            blocks2,
            groupingBlockName
          );
          replaceBlocks2(blocksToUpdate, newBlocks);
          (0, import_a11y14.speak)((0, import_i18n107.__)("Selected blocks are grouped."));
          const newlySelectedBlocks = getSelectedBlockClientIds2();
          updateFocusAndSelection(newlySelectedBlocks[0], false);
        }
      } else if (isMatch("core/block-editor/toggle-block-visibility", event)) {
        event.preventDefault();
        const { blocksToUpdate } = getBlocksToUpdate();
        const blocks2 = getBlocksByClientId2(blocksToUpdate);
        const supportsBlockVisibility = blocks2.every(
          (_block) => (0, import_blocks78.hasBlockSupport)(_block.name, "visibility", true)
        );
        if (!supportsBlockVisibility) {
          return;
        }
        if (blocksToUpdate.some(
          (id) => getBlockEditingMode2(id) !== "default"
        )) {
          return;
        }
        showViewportModal2(blocksToUpdate);
      } else if (isMatch("core/block-editor/rename", event)) {
        const { blocksToUpdate } = getBlocksToUpdate();
        const isContentOnly = getBlockEditingMode2(blocksToUpdate[0]) === "contentOnly";
        if (blocksToUpdate.length === 1 && canRename && !isContentOnly) {
          event.preventDefault();
          setIsRenameModalOpen(true);
        }
      }
    }
    const onMouseEnter = (0, import_element135.useCallback)(() => {
      setIsHovered(true);
      debouncedToggleBlockHighlight(clientId, true);
    }, [clientId, setIsHovered, debouncedToggleBlockHighlight]);
    const onMouseLeave = (0, import_element135.useCallback)(() => {
      setIsHovered(false);
      debouncedToggleBlockHighlight(clientId, false);
    }, [clientId, setIsHovered, debouncedToggleBlockHighlight]);
    const selectEditorBlock = (0, import_element135.useCallback)(
      (event) => {
        selectBlock2(event, clientId);
        event.preventDefault();
      },
      [clientId, selectBlock2]
    );
    const updateFocusAndSelection = (0, import_element135.useCallback)(
      (focusClientId, shouldSelectBlock) => {
        if (shouldSelectBlock) {
          selectBlock2(void 0, focusClientId, null, null);
        }
        focusListItem(focusClientId, treeGridElementRef?.current);
      },
      [selectBlock2, treeGridElementRef]
    );
    const toggleExpanded = (0, import_element135.useCallback)(
      (event) => {
        event.preventDefault();
        event.stopPropagation();
        if (isExpanded === true) {
          collapse(clientId);
        } else if (isExpanded === false) {
          expand(clientId);
        }
      },
      [clientId, expand, collapse, isExpanded]
    );
    const onContextMenu = (0, import_element135.useCallback)(
      (event) => {
        const { ownerDocument } = settingsRef?.current || {};
        if (!ownerDocument || !ownerDocument.hasFocus()) {
          return;
        }
        if (showBlockActions && allowRightClickOverrides) {
          settingsRef.current?.click();
          setSettingsAnchorRect(
            new window.DOMRect(event.clientX, event.clientY, 0, 0)
          );
          event.preventDefault();
        }
      },
      [allowRightClickOverrides, settingsRef, showBlockActions]
    );
    const onMouseDown = (0, import_element135.useCallback)(
      (event) => {
        if (allowRightClickOverrides && event.button === 2) {
          event.preventDefault();
        }
      },
      [allowRightClickOverrides]
    );
    const settingsPopoverAnchor = (0, import_element135.useMemo)(() => {
      const { ownerDocument } = rowRef?.current || {};
      if (!settingsAnchorRect || !ownerDocument) {
        return void 0;
      }
      return {
        ownerDocument,
        getBoundingClientRect() {
          return settingsAnchorRect;
        }
      };
    }, [settingsAnchorRect]);
    const clearSettingsAnchorRect = (0, import_element135.useCallback)(() => {
      setSettingsAnchorRect(void 0);
    }, [setSettingsAnchorRect]);
    useListViewScrollIntoView({
      isSelected,
      rowItemRef: rowRef,
      selectedClientIds
    });
    if (!block) {
      return null;
    }
    const blockPositionDescription = getBlockPositionDescription(
      position,
      siblingBlockCount,
      level
    );
    const blockPropertiesDescription = getBlockPropertiesDescription(
      blockInformation,
      isLocked
    );
    const blockVisibilityDescription = getBlockVisibilityLabel(
      block?.attributes?.metadata?.blockVisibility
    );
    const hasSiblings = siblingBlockCount > 0;
    const hasRenderedMovers = showBlockMovers && hasSiblings;
    const moverCellClassName = clsx_default(
      "block-editor-list-view-block__mover-cell",
      { "is-visible": isHovered || isSelected }
    );
    const listViewBlockSettingsClassName = clsx_default(
      "block-editor-list-view-block__menu-cell",
      { "is-visible": isHovered || isFirstSelectedBlock }
    );
    let colSpan;
    if (hasRenderedMovers) {
      colSpan = 2;
    } else if (!showBlockActions) {
      colSpan = 3;
    }
    const classes = clsx_default({
      "is-selected": isSelected,
      "is-first-selected": isFirstSelectedBlock,
      "is-last-selected": isLastSelectedBlock,
      "is-branch-selected": isBranchSelected,
      "is-synced-branch": isSyncedBranch,
      "is-dragging": isDragged,
      "has-single-cell": !showBlockActions,
      "is-synced": blockInformation?.isSynced,
      "is-draggable": canMoveBlock2,
      "is-displacement-normal": displacement === "normal",
      "is-displacement-up": displacement === "up",
      "is-displacement-down": displacement === "down",
      "is-after-dragged-blocks": isAfterDraggedBlocks,
      "is-nesting": isNesting
    });
    const dropdownClientIds = selectedClientIds.includes(clientId) ? selectedClientIds : [clientId];
    const currentlyEditingBlockInCanvas = isSelected && selectedClientIds.length === 1;
    return /* @__PURE__ */ (0, import_jsx_runtime267.jsxs)(
      leaf_default,
      {
        className: classes,
        isDragged,
        onKeyDown,
        onMouseEnter,
        onMouseLeave,
        onFocus: onMouseEnter,
        onBlur: onMouseLeave,
        level,
        position,
        rowCount,
        path,
        id: `list-view-${listViewInstanceId}-block-${clientId}`,
        "data-block": clientId,
        "data-expanded": canEditBlock2 ? isExpanded : void 0,
        ref: rowRef,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
            import_components122.__experimentalTreeGridCell,
            {
              className: "block-editor-list-view-block__contents-cell",
              colSpan,
              ref: cellRef,
              "aria-selected": !!isSelected,
              children: ({ ref, tabIndex, onFocus }) => /* @__PURE__ */ (0, import_jsx_runtime267.jsxs)("div", { className: "block-editor-list-view-block__contents-container", children: [
                /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
                  block_contents_default,
                  {
                    block,
                    onClick: selectEditorBlock,
                    onContextMenu,
                    onMouseDown,
                    onToggleExpanded: toggleExpanded,
                    isSelected,
                    position,
                    siblingBlockCount,
                    level,
                    ref,
                    tabIndex: currentlyEditingBlockInCanvas ? 0 : tabIndex,
                    onFocus,
                    isExpanded: canEditBlock2 ? isExpanded : void 0,
                    selectedClientIds,
                    ariaDescribedBy: descriptionId
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(AriaReferencedText, { id: descriptionId, children: [
                  blockPositionDescription,
                  blockPropertiesDescription,
                  blockVisibilityDescription
                ].filter(Boolean).join(" ") })
              ] })
            }
          ),
          hasRenderedMovers && /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(import_jsx_runtime267.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime267.jsxs)(
            import_components122.__experimentalTreeGridCell,
            {
              className: moverCellClassName,
              withoutGridItem: true,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(import_components122.__experimentalTreeGridItem, { children: ({ ref, tabIndex, onFocus }) => /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
                  BlockMoverUpButton,
                  {
                    orientation: "vertical",
                    clientIds: [clientId],
                    ref,
                    tabIndex,
                    onFocus
                  }
                ) }),
                /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(import_components122.__experimentalTreeGridItem, { children: ({ ref, tabIndex, onFocus }) => /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
                  BlockMoverDownButton,
                  {
                    orientation: "vertical",
                    clientIds: [clientId],
                    ref,
                    tabIndex,
                    onFocus
                  }
                ) })
              ]
            }
          ) }),
          showBlockActions && BlockSettingsMenu2 && /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
            import_components122.__experimentalTreeGridCell,
            {
              className: listViewBlockSettingsClassName,
              "aria-selected": !!isSelected,
              ref: settingsRef,
              children: ({ ref, tabIndex, onFocus }) => /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
                BlockSettingsMenu2,
                {
                  clientIds: dropdownClientIds,
                  block,
                  icon: more_vertical_default,
                  label: (0, import_i18n107.__)("Options"),
                  popoverProps: {
                    anchor: settingsPopoverAnchor
                    // Used to position the settings at the cursor on right-click.
                  },
                  toggleProps: {
                    ref,
                    className: "block-editor-list-view-block__menu",
                    tabIndex,
                    onClick: clearSettingsAnchorRect,
                    onFocus,
                    size: "small"
                  },
                  disableOpenOnArrowDown: true,
                  expand,
                  expandedState,
                  setInsertedBlock,
                  __experimentalSelectBlock: updateFocusAndSelection
                }
              )
            }
          ),
          isRenameModalOpen && /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
            BlockRenameModal,
            {
              clientId,
              onClose: () => setIsRenameModalOpen(false)
            }
          )
        ]
      }
    );
  }
  var block_default3 = (0, import_element135.memo)(ListViewBlock);

  // packages/block-editor/build-module/components/list-view/branch.mjs
  var import_jsx_runtime268 = __toESM(require_jsx_runtime(), 1);
  function countBlocks(block, expandedState, draggedClientIds, isExpandedByDefault) {
    const isDragged = draggedClientIds?.includes(block.clientId);
    if (isDragged) {
      return 0;
    }
    const isExpanded = expandedState[block.clientId] ?? isExpandedByDefault;
    if (isExpanded) {
      return 1 + block.innerBlocks.reduce(
        countReducer(
          expandedState,
          draggedClientIds,
          isExpandedByDefault
        ),
        0
      );
    }
    return 1;
  }
  var countReducer = (expandedState, draggedClientIds, isExpandedByDefault) => (count, block) => {
    const isDragged = draggedClientIds?.includes(block.clientId);
    if (isDragged) {
      return count;
    }
    const isExpanded = expandedState[block.clientId] ?? isExpandedByDefault;
    if (isExpanded && block.innerBlocks.length > 0) {
      return count + countBlocks(
        block,
        expandedState,
        draggedClientIds,
        isExpandedByDefault
      );
    }
    return count + 1;
  };
  var noop10 = () => {
  };
  function ListViewBranch(props) {
    const {
      blocks: blocks2,
      selectBlock: selectBlock2 = noop10,
      showBlockMovers,
      selectedClientIds,
      level = 1,
      path = "",
      isBranchSelected = false,
      listPosition = 0,
      fixedListWindow,
      isExpanded,
      parentId,
      shouldShowInnerBlocks = true,
      isSyncedBranch = false,
      showAppender: showAppenderProp = true
    } = props;
    const parentBlockInformation = useBlockDisplayInformation(parentId);
    const syncedBranch = isSyncedBranch || !!parentBlockInformation?.isSynced;
    const canParentExpand = (0, import_data128.useSelect)(
      (select3) => {
        if (!parentId) {
          return true;
        }
        return select3(store).canEditBlock(parentId);
      },
      [parentId]
    );
    const {
      blockDropPosition,
      blockDropTargetIndex,
      firstDraggedBlockIndex,
      blockIndexes,
      expandedState,
      draggedClientIds
    } = useListViewContext();
    const nextPositionRef = (0, import_element136.useRef)();
    if (!canParentExpand) {
      return null;
    }
    const showAppender = showAppenderProp && level === 1;
    const filteredBlocks = blocks2.filter(Boolean);
    const blockCount = filteredBlocks.length;
    const rowCount = showAppender ? blockCount + 1 : blockCount;
    nextPositionRef.current = listPosition;
    return /* @__PURE__ */ (0, import_jsx_runtime268.jsxs)(import_jsx_runtime268.Fragment, { children: [
      filteredBlocks.map((block, index) => {
        const { clientId, innerBlocks } = block;
        if (index > 0) {
          nextPositionRef.current += countBlocks(
            filteredBlocks[index - 1],
            expandedState,
            draggedClientIds,
            isExpanded
          );
        }
        const isDragged = !!draggedClientIds?.includes(clientId);
        const { displacement, isAfterDraggedBlocks, isNesting } = getDragDisplacementValues({
          blockIndexes,
          blockDropTargetIndex,
          blockDropPosition,
          clientId,
          firstDraggedBlockIndex,
          isDragged
        });
        const { itemInView } = fixedListWindow;
        const blockInView = itemInView(nextPositionRef.current);
        const position = index + 1;
        const updatedPath = path.length > 0 ? `${path}_${position}` : `${position}`;
        const hasNestedBlocks = !!innerBlocks?.length;
        const shouldExpand = hasNestedBlocks && shouldShowInnerBlocks ? expandedState[clientId] ?? isExpanded : void 0;
        const isSelected = isClientIdSelected(
          clientId,
          selectedClientIds
        );
        const isSelectedBranch = isBranchSelected || isSelected && hasNestedBlocks;
        const showBlock = isDragged || blockInView || isSelected && clientId === selectedClientIds[0] || index === 0 || index === blockCount - 1;
        return /* @__PURE__ */ (0, import_jsx_runtime268.jsxs)(import_data128.AsyncModeProvider, { value: !isSelected, children: [
          showBlock && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
            block_default3,
            {
              block,
              selectBlock: selectBlock2,
              isSelected,
              isBranchSelected: isSelectedBranch,
              isDragged,
              level,
              position,
              rowCount,
              siblingBlockCount: blockCount,
              showBlockMovers,
              path: updatedPath,
              isExpanded: isDragged ? false : shouldExpand,
              listPosition: nextPositionRef.current,
              selectedClientIds,
              isSyncedBranch: syncedBranch,
              displacement,
              isAfterDraggedBlocks,
              isNesting
            }
          ),
          !showBlock && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime268.jsx)("td", { className: "block-editor-list-view-placeholder" }) }),
          hasNestedBlocks && shouldExpand && !isDragged && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
            ListViewBranch,
            {
              parentId: clientId,
              blocks: innerBlocks,
              selectBlock: selectBlock2,
              showBlockMovers,
              level: level + 1,
              path: updatedPath,
              listPosition: nextPositionRef.current + 1,
              fixedListWindow,
              isBranchSelected: isSelectedBranch,
              selectedClientIds,
              isExpanded,
              isSyncedBranch: syncedBranch
            }
          )
        ] }, clientId);
      }),
      showAppender && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
        import_components123.__experimentalTreeGridRow,
        {
          level,
          setSize: rowCount,
          positionInSet: rowCount,
          isExpanded: true,
          children: /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(import_components123.__experimentalTreeGridCell, { children: (treeGridCellProps) => /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
            Appender,
            {
              clientId: parentId,
              nestingLevel: level,
              blockCount,
              ...treeGridCellProps
            }
          ) })
        }
      )
    ] });
  }
  var branch_default = (0, import_element136.memo)(ListViewBranch);

  // packages/block-editor/build-module/components/list-view/drop-indicator.mjs
  var import_components124 = __toESM(require_components(), 1);
  var import_dom32 = __toESM(require_dom(), 1);
  var import_element137 = __toESM(require_element(), 1);
  var import_i18n108 = __toESM(require_i18n(), 1);
  var import_jsx_runtime269 = __toESM(require_jsx_runtime(), 1);
  function ListViewDropIndicatorPreview({
    draggedBlockClientId,
    listViewRef,
    blockDropTarget
  }) {
    const blockInformation = useBlockDisplayInformation(draggedBlockClientId);
    const blockTitle = useBlockDisplayTitle({
      clientId: draggedBlockClientId,
      context: "list-view"
    });
    const { rootClientId, clientId, dropPosition } = blockDropTarget || {};
    const [rootBlockElement, blockElement] = (0, import_element137.useMemo)(() => {
      if (!listViewRef.current) {
        return [];
      }
      const _rootBlockElement = rootClientId ? listViewRef.current.querySelector(
        `[data-block="${rootClientId}"]`
      ) : void 0;
      const _blockElement = clientId ? listViewRef.current.querySelector(
        `[data-block="${clientId}"]`
      ) : void 0;
      return [_rootBlockElement, _blockElement];
    }, [listViewRef, rootClientId, clientId]);
    const targetElement = blockElement || rootBlockElement;
    const rtl = (0, import_i18n108.isRTL)();
    const getDropIndicatorWidth = (0, import_element137.useCallback)(
      (targetElementRect, indent) => {
        if (!targetElement) {
          return 0;
        }
        let width = targetElement.offsetWidth;
        const scrollContainer = (0, import_dom32.getScrollContainer)(
          targetElement,
          "horizontal"
        );
        const ownerDocument = targetElement.ownerDocument;
        const windowScroll = scrollContainer === ownerDocument.body || scrollContainer === ownerDocument.documentElement;
        if (scrollContainer && !windowScroll) {
          const scrollContainerRect = scrollContainer.getBoundingClientRect();
          const distanceBetweenContainerAndTarget = (0, import_i18n108.isRTL)() ? scrollContainerRect.right - targetElementRect.right : targetElementRect.left - scrollContainerRect.left;
          const scrollContainerWidth = scrollContainer.clientWidth;
          if (scrollContainerWidth < width + distanceBetweenContainerAndTarget) {
            width = scrollContainerWidth - distanceBetweenContainerAndTarget;
          }
          if (!rtl && targetElementRect.left + indent < scrollContainerRect.left) {
            width -= scrollContainerRect.left - targetElementRect.left;
            return width;
          }
          if (rtl && targetElementRect.right - indent > scrollContainerRect.right) {
            width -= targetElementRect.right - scrollContainerRect.right;
            return width;
          }
        }
        return width - indent;
      },
      [rtl, targetElement]
    );
    const style = (0, import_element137.useMemo)(() => {
      if (!targetElement) {
        return {};
      }
      const targetElementRect = targetElement.getBoundingClientRect();
      return {
        width: getDropIndicatorWidth(targetElementRect, 0)
      };
    }, [getDropIndicatorWidth, targetElement]);
    const horizontalScrollOffsetStyle = (0, import_element137.useMemo)(() => {
      if (!targetElement) {
        return {};
      }
      const scrollContainer = (0, import_dom32.getScrollContainer)(targetElement);
      const ownerDocument = targetElement.ownerDocument;
      const windowScroll = scrollContainer === ownerDocument.body || scrollContainer === ownerDocument.documentElement;
      if (scrollContainer && !windowScroll) {
        const scrollContainerRect = scrollContainer.getBoundingClientRect();
        const targetElementRect = targetElement.getBoundingClientRect();
        const distanceBetweenContainerAndTarget = rtl ? scrollContainerRect.right - targetElementRect.right : targetElementRect.left - scrollContainerRect.left;
        if (!rtl && scrollContainerRect.left > targetElementRect.left) {
          return {
            transform: `translateX( ${distanceBetweenContainerAndTarget}px )`
          };
        }
        if (rtl && scrollContainerRect.right < targetElementRect.right) {
          return {
            transform: `translateX( ${distanceBetweenContainerAndTarget * -1}px )`
          };
        }
      }
      return {};
    }, [rtl, targetElement]);
    const ariaLevel = (0, import_element137.useMemo)(() => {
      if (!rootBlockElement) {
        return 1;
      }
      const _ariaLevel = parseInt(
        rootBlockElement.getAttribute("aria-level"),
        10
      );
      return _ariaLevel ? _ariaLevel + 1 : 1;
    }, [rootBlockElement]);
    const hasAdjacentSelectedBranch = (0, import_element137.useMemo)(() => {
      if (!targetElement) {
        return false;
      }
      return targetElement.classList.contains("is-branch-selected");
    }, [targetElement]);
    const popoverAnchor = (0, import_element137.useMemo)(() => {
      const isValidDropPosition = dropPosition === "top" || dropPosition === "bottom" || dropPosition === "inside";
      if (!targetElement || !isValidDropPosition) {
        return void 0;
      }
      return {
        contextElement: targetElement,
        getBoundingClientRect() {
          const rect = targetElement.getBoundingClientRect();
          let left = rect.left;
          let top = 0;
          const scrollContainer = (0, import_dom32.getScrollContainer)(
            targetElement,
            "horizontal"
          );
          const doc = targetElement.ownerDocument;
          const windowScroll = scrollContainer === doc.body || scrollContainer === doc.documentElement;
          if (scrollContainer && !windowScroll) {
            const scrollContainerRect = scrollContainer.getBoundingClientRect();
            const scrollbarWidth = rtl ? scrollContainer.offsetWidth - scrollContainer.clientWidth : 0;
            if (left < scrollContainerRect.left + scrollbarWidth) {
              left = scrollContainerRect.left + scrollbarWidth;
            }
          }
          if (dropPosition === "top") {
            top = rect.top - rect.height * 2;
          } else {
            top = rect.top;
          }
          const width = getDropIndicatorWidth(rect, 0);
          const height = rect.height;
          return new window.DOMRect(left, top, width, height);
        }
      };
    }, [targetElement, dropPosition, getDropIndicatorWidth, rtl]);
    if (!targetElement) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
      import_components124.Popover,
      {
        animate: false,
        anchor: popoverAnchor,
        focusOnMount: false,
        className: "block-editor-list-view-drop-indicator--preview",
        variant: "unstyled",
        flip: false,
        resize: true,
        children: /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
          "div",
          {
            style,
            className: clsx_default(
              "block-editor-list-view-drop-indicator__line",
              {
                "block-editor-list-view-drop-indicator__line--darker": hasAdjacentSelectedBranch
              }
            ),
            children: /* @__PURE__ */ (0, import_jsx_runtime269.jsxs)(
              "div",
              {
                className: "block-editor-list-view-leaf",
                "aria-level": ariaLevel,
                children: [
                  /* @__PURE__ */ (0, import_jsx_runtime269.jsxs)(
                    "div",
                    {
                      className: clsx_default(
                        "block-editor-list-view-block-select-button",
                        "block-editor-list-view-block-contents"
                      ),
                      style: horizontalScrollOffsetStyle,
                      children: [
                        /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(ListViewExpander, { onClick: () => {
                        } }),
                        /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
                          block_icon_default,
                          {
                            icon: blockInformation?.icon,
                            showColors: true,
                            context: "list-view"
                          }
                        ),
                        /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
                          import_components124.__experimentalHStack,
                          {
                            alignment: "center",
                            className: "block-editor-list-view-block-select-button__label-wrapper",
                            justify: "flex-start",
                            spacing: 1,
                            children: /* @__PURE__ */ (0, import_jsx_runtime269.jsx)("span", { className: "block-editor-list-view-block-select-button__title", children: /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(import_components124.__experimentalTruncate, { ellipsizeMode: "auto", children: blockTitle }) })
                          }
                        )
                      ]
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime269.jsx)("div", { className: "block-editor-list-view-block__menu-cell" })
                ]
              }
            )
          }
        )
      }
    );
  }

  // packages/block-editor/build-module/components/list-view/use-block-selection.mjs
  var import_a11y15 = __toESM(require_a11y(), 1);
  var import_i18n109 = __toESM(require_i18n(), 1);
  var import_data129 = __toESM(require_data(), 1);
  var import_element138 = __toESM(require_element(), 1);
  var import_keycodes15 = __toESM(require_keycodes(), 1);
  var import_blocks79 = __toESM(require_blocks(), 1);
  function useBlockSelection() {
    const { clearSelectedBlock: clearSelectedBlock2, multiSelect: multiSelect2, selectBlock: selectBlock2 } = (0, import_data129.useDispatch)(store);
    const {
      getBlockName: getBlockName2,
      getBlockParents: getBlockParents2,
      getBlockSelectionStart: getBlockSelectionStart2,
      getSelectedBlockClientIds: getSelectedBlockClientIds2,
      hasMultiSelection: hasMultiSelection2,
      hasSelectedBlock: hasSelectedBlock2
    } = (0, import_data129.useSelect)(store);
    const { getBlockType: getBlockType27 } = (0, import_data129.useSelect)(import_blocks79.store);
    const updateBlockSelection = (0, import_element138.useCallback)(
      async (event, clientId, destinationClientId, focusPosition) => {
        if (!event?.shiftKey && event?.keyCode !== import_keycodes15.ESCAPE) {
          selectBlock2(clientId, focusPosition);
          return;
        }
        event.preventDefault();
        const isOnlyDeselection = event.type === "keydown" && event.keyCode === import_keycodes15.ESCAPE;
        const isKeyPress = event.type === "keydown" && (event.keyCode === import_keycodes15.UP || event.keyCode === import_keycodes15.DOWN || event.keyCode === import_keycodes15.HOME || event.keyCode === import_keycodes15.END);
        if (!isKeyPress && !hasSelectedBlock2() && !hasMultiSelection2()) {
          selectBlock2(clientId, null);
          return;
        }
        const selectedBlocks = getSelectedBlockClientIds2();
        const clientIdWithParents = [
          ...getBlockParents2(clientId),
          clientId
        ];
        if (isOnlyDeselection || isKeyPress && !selectedBlocks.some(
          (blockId) => clientIdWithParents.includes(blockId)
        )) {
          await clearSelectedBlock2();
        }
        if (!isOnlyDeselection) {
          let startTarget = getBlockSelectionStart2();
          let endTarget = clientId;
          if (isKeyPress) {
            if (!hasSelectedBlock2() && !hasMultiSelection2()) {
              startTarget = clientId;
            }
            if (destinationClientId) {
              endTarget = destinationClientId;
            }
          }
          const startParents = getBlockParents2(startTarget);
          const endParents = getBlockParents2(endTarget);
          const { start: start2, end } = getCommonDepthClientIds(
            startTarget,
            endTarget,
            startParents,
            endParents
          );
          await multiSelect2(start2, end, null);
        }
        const updatedSelectedBlocks = getSelectedBlockClientIds2();
        if ((event.keyCode === import_keycodes15.HOME || event.keyCode === import_keycodes15.END) && updatedSelectedBlocks.length > 1) {
          return;
        }
        const selectionDiff = selectedBlocks.filter(
          (blockId) => !updatedSelectedBlocks.includes(blockId)
        );
        let label;
        if (selectionDiff.length === 1) {
          const title = getBlockType27(
            getBlockName2(selectionDiff[0])
          )?.title;
          if (title) {
            label = (0, import_i18n109.sprintf)(
              /* translators: %s: block name */
              (0, import_i18n109.__)("%s deselected."),
              title
            );
          }
        } else if (selectionDiff.length > 1) {
          label = (0, import_i18n109.sprintf)(
            /* translators: %s: number of deselected blocks */
            (0, import_i18n109.__)("%s blocks deselected."),
            selectionDiff.length
          );
        }
        if (label) {
          (0, import_a11y15.speak)(label, "assertive");
        }
      },
      [
        clearSelectedBlock2,
        getBlockName2,
        getBlockType27,
        getBlockParents2,
        getBlockSelectionStart2,
        getSelectedBlockClientIds2,
        hasMultiSelection2,
        hasSelectedBlock2,
        multiSelect2,
        selectBlock2
      ]
    );
    return {
      updateBlockSelection
    };
  }

  // packages/block-editor/build-module/components/list-view/use-list-view-block-indexes.mjs
  var import_element139 = __toESM(require_element(), 1);
  function useListViewBlockIndexes(blocks2) {
    const blockIndexes = (0, import_element139.useMemo)(() => {
      const indexes = {};
      let currentGlobalIndex = 0;
      const traverseBlocks = (blockList) => {
        blockList.forEach((block) => {
          indexes[block.clientId] = currentGlobalIndex;
          currentGlobalIndex++;
          if (block.innerBlocks.length > 0) {
            traverseBlocks(block.innerBlocks);
          }
        });
      };
      traverseBlocks(blocks2);
      return indexes;
    }, [blocks2]);
    return blockIndexes;
  }

  // packages/block-editor/build-module/components/list-view/use-list-view-client-ids.mjs
  var import_data130 = __toESM(require_data(), 1);
  function useListViewClientIds({ blocks: blocks2, rootClientId }) {
    return (0, import_data130.useSelect)(
      (select3) => {
        const {
          getDraggedBlockClientIds: getDraggedBlockClientIds2,
          getSelectedBlockClientIds: getSelectedBlockClientIds2,
          getEnabledClientIdsTree: getEnabledClientIdsTree2
        } = unlock(select3(store));
        return {
          selectedClientIds: getSelectedBlockClientIds2(),
          draggedClientIds: getDraggedBlockClientIds2(),
          clientIdsTree: blocks2 ?? getEnabledClientIdsTree2(rootClientId)
        };
      },
      [blocks2, rootClientId]
    );
  }

  // packages/block-editor/build-module/components/list-view/use-list-view-collapse-items.mjs
  var import_element140 = __toESM(require_element(), 1);
  var import_data131 = __toESM(require_data(), 1);
  function useListViewCollapseItems({ collapseAll, expand }) {
    const { expandedBlock: expandedBlock2, getBlockParents: getBlockParents2 } = (0, import_data131.useSelect)((select3) => {
      const { getBlockParents: _getBlockParents, getExpandedBlock: getExpandedBlock2 } = unlock(
        select3(store)
      );
      return {
        expandedBlock: getExpandedBlock2(),
        getBlockParents: _getBlockParents
      };
    }, []);
    (0, import_element140.useEffect)(() => {
      if (expandedBlock2) {
        const blockParents = getBlockParents2(expandedBlock2, false);
        collapseAll();
        expand(blockParents);
      }
    }, [collapseAll, expand, expandedBlock2, getBlockParents2]);
  }

  // packages/block-editor/build-module/components/list-view/use-list-view-drop-zone.mjs
  var import_data132 = __toESM(require_data(), 1);
  var import_element141 = __toESM(require_element(), 1);
  var import_compose72 = __toESM(require_compose(), 1);
  var import_i18n110 = __toESM(require_i18n(), 1);
  var NESTING_LEVEL_INDENTATION = 24;
  function isUpGesture(point, rect, nestingLevel = 1, rtl = false) {
    const blockIndentPosition = rtl ? rect.right - nestingLevel * NESTING_LEVEL_INDENTATION : rect.left + nestingLevel * NESTING_LEVEL_INDENTATION;
    return rtl ? point.x > blockIndentPosition : point.x < blockIndentPosition;
  }
  function getDesiredRelativeParentLevel(point, rect, nestingLevel = 1, rtl = false) {
    const blockIndentPosition = rtl ? rect.right - nestingLevel * NESTING_LEVEL_INDENTATION : rect.left + nestingLevel * NESTING_LEVEL_INDENTATION;
    const distanceBetweenPointAndBlockIndentPosition = rtl ? blockIndentPosition - point.x : point.x - blockIndentPosition;
    const desiredParentLevel = Math.round(
      distanceBetweenPointAndBlockIndentPosition / NESTING_LEVEL_INDENTATION
    );
    return Math.abs(desiredParentLevel);
  }
  function getCandidateBlockParents(candidateBlockData, blocksData) {
    const candidateBlockParents = [];
    let currentBlockData = candidateBlockData;
    while (currentBlockData) {
      candidateBlockParents.push({ ...currentBlockData });
      currentBlockData = blocksData.find(
        (blockData) => blockData.clientId === currentBlockData.rootClientId
      );
    }
    return candidateBlockParents;
  }
  function getNextNonDraggedBlock(blocksData, index) {
    const nextBlockData = blocksData[index + 1];
    if (nextBlockData && nextBlockData.isDraggedBlock) {
      return getNextNonDraggedBlock(blocksData, index + 1);
    }
    return nextBlockData;
  }
  function isNestingGesture(point, rect, nestingLevel = 1, rtl = false) {
    const blockIndentPosition = rtl ? rect.right - nestingLevel * NESTING_LEVEL_INDENTATION : rect.left + nestingLevel * NESTING_LEVEL_INDENTATION;
    const isNestingHorizontalGesture = rtl ? point.x < blockIndentPosition - NESTING_LEVEL_INDENTATION : point.x > blockIndentPosition + NESTING_LEVEL_INDENTATION;
    return isNestingHorizontalGesture && point.y < rect.bottom;
  }
  var ALLOWED_DROP_EDGES = ["top", "bottom"];
  function getListViewDropTarget(blocksData, position, rtl = false) {
    let candidateEdge;
    let candidateBlockData;
    let candidateDistance;
    let candidateRect;
    let candidateBlockIndex;
    for (let i2 = 0; i2 < blocksData.length; i2++) {
      const blockData = blocksData[i2];
      if (blockData.isDraggedBlock) {
        continue;
      }
      const rect = blockData.element.getBoundingClientRect();
      const [distance, edge] = getDistanceToNearestEdge(
        position,
        rect,
        ALLOWED_DROP_EDGES
      );
      const isCursorWithinBlock = isPointContainedByRect(position, rect);
      if (candidateDistance === void 0 || distance < candidateDistance || isCursorWithinBlock) {
        candidateDistance = distance;
        const index = blocksData.indexOf(blockData);
        const previousBlockData = blocksData[index - 1];
        if (edge === "top" && previousBlockData && previousBlockData.rootClientId === blockData.rootClientId && !previousBlockData.isDraggedBlock) {
          candidateBlockData = previousBlockData;
          candidateEdge = "bottom";
          candidateRect = previousBlockData.element.getBoundingClientRect();
          candidateBlockIndex = index - 1;
        } else {
          candidateBlockData = blockData;
          candidateEdge = edge;
          candidateRect = rect;
          candidateBlockIndex = index;
        }
        if (isCursorWithinBlock) {
          break;
        }
      }
    }
    if (!candidateBlockData) {
      return;
    }
    const candidateBlockParents = getCandidateBlockParents(
      candidateBlockData,
      blocksData
    );
    const isDraggingBelow = candidateEdge === "bottom";
    if (isDraggingBelow && candidateBlockData.canInsertDraggedBlocksAsChild && (candidateBlockData.innerBlockCount > 0 && candidateBlockData.isExpanded || isNestingGesture(
      position,
      candidateRect,
      candidateBlockParents.length,
      rtl
    ))) {
      const newBlockIndex = candidateBlockData.isExpanded ? 0 : candidateBlockData.innerBlockCount || 0;
      return {
        rootClientId: candidateBlockData.clientId,
        clientId: candidateBlockData.clientId,
        blockIndex: newBlockIndex,
        dropPosition: "inside"
      };
    }
    if (isDraggingBelow && candidateBlockData.rootClientId && isUpGesture(
      position,
      candidateRect,
      candidateBlockParents.length,
      rtl
    )) {
      const nextBlock = getNextNonDraggedBlock(
        blocksData,
        candidateBlockIndex
      );
      const currentLevel = candidateBlockData.nestingLevel;
      const nextLevel = nextBlock ? nextBlock.nestingLevel : 1;
      if (currentLevel && nextLevel) {
        const desiredRelativeLevel = getDesiredRelativeParentLevel(
          position,
          candidateRect,
          candidateBlockParents.length,
          rtl
        );
        const targetParentIndex = Math.max(
          Math.min(desiredRelativeLevel, currentLevel - nextLevel),
          0
        );
        if (candidateBlockParents[targetParentIndex]) {
          let newBlockIndex = candidateBlockData.blockIndex;
          if (candidateBlockParents[targetParentIndex].nestingLevel === nextBlock?.nestingLevel) {
            newBlockIndex = nextBlock?.blockIndex;
          } else {
            for (let i2 = candidateBlockIndex; i2 >= 0; i2--) {
              const blockData = blocksData[i2];
              if (blockData.rootClientId === candidateBlockParents[targetParentIndex].rootClientId) {
                newBlockIndex = blockData.blockIndex + 1;
                break;
              }
            }
          }
          return {
            rootClientId: candidateBlockParents[targetParentIndex].rootClientId,
            clientId: candidateBlockData.clientId,
            blockIndex: newBlockIndex,
            dropPosition: candidateEdge
          };
        }
      }
    }
    if (!candidateBlockData.canInsertDraggedBlocksAsSibling) {
      return;
    }
    const offset = isDraggingBelow ? 1 : 0;
    return {
      rootClientId: candidateBlockData.rootClientId,
      clientId: candidateBlockData.clientId,
      blockIndex: candidateBlockData.blockIndex + offset,
      dropPosition: candidateEdge
    };
  }
  var EXPAND_THROTTLE_OPTIONS = {
    leading: false,
    // Don't call the function immediately on the first call.
    trailing: true
    // Do call the function on the last call.
  };
  function useListViewDropZone({
    dropZoneElement,
    expandedState,
    setExpandedState
  }) {
    const {
      getBlockRootClientId: getBlockRootClientId2,
      getBlockIndex: getBlockIndex2,
      getBlockCount: getBlockCount2,
      getDraggedBlockClientIds: getDraggedBlockClientIds2,
      canInsertBlocks: canInsertBlocks2
    } = (0, import_data132.useSelect)(store);
    const [target, setTarget] = (0, import_element141.useState)();
    const { rootClientId: targetRootClientId, blockIndex: targetBlockIndex } = target || {};
    const onBlockDrop2 = useOnBlockDrop(targetRootClientId, targetBlockIndex);
    const rtl = (0, import_i18n110.isRTL)();
    const previousRootClientId = (0, import_compose72.usePrevious)(targetRootClientId);
    const maybeExpandBlock = (0, import_element141.useCallback)(
      (_expandedState, _target) => {
        const { rootClientId } = _target || {};
        if (!rootClientId) {
          return;
        }
        if (_target?.dropPosition === "inside" && !_expandedState[rootClientId]) {
          setExpandedState({
            type: "expand",
            clientIds: [rootClientId]
          });
        }
      },
      [setExpandedState]
    );
    const throttledMaybeExpandBlock = (0, import_compose72.useThrottle)(
      maybeExpandBlock,
      500,
      EXPAND_THROTTLE_OPTIONS
    );
    (0, import_element141.useEffect)(() => {
      if (target?.dropPosition !== "inside" || previousRootClientId !== target?.rootClientId) {
        throttledMaybeExpandBlock.cancel();
        return;
      }
      throttledMaybeExpandBlock(expandedState, target);
    }, [
      expandedState,
      previousRootClientId,
      target,
      throttledMaybeExpandBlock
    ]);
    const draggedBlockClientIds = getDraggedBlockClientIds2();
    const throttled = (0, import_compose72.useThrottle)(
      (0, import_element141.useCallback)(
        (event, currentTarget) => {
          const position = { x: event.clientX, y: event.clientY };
          const isBlockDrag = !!draggedBlockClientIds?.length;
          const blockElements = Array.from(
            currentTarget.querySelectorAll("[data-block]")
          );
          const blocksData = blockElements.map((blockElement) => {
            const clientId = blockElement.dataset.block;
            const isExpanded = blockElement.dataset.expanded === "true";
            const isDraggedBlock = blockElement.classList.contains("is-dragging");
            const nestingLevel = parseInt(
              blockElement.getAttribute("aria-level"),
              10
            );
            const rootClientId = getBlockRootClientId2(clientId);
            return {
              clientId,
              isExpanded,
              rootClientId,
              blockIndex: getBlockIndex2(clientId),
              element: blockElement,
              nestingLevel: nestingLevel || void 0,
              isDraggedBlock: isBlockDrag ? isDraggedBlock : false,
              innerBlockCount: getBlockCount2(clientId),
              canInsertDraggedBlocksAsSibling: isBlockDrag ? canInsertBlocks2(
                draggedBlockClientIds,
                rootClientId
              ) : true,
              canInsertDraggedBlocksAsChild: isBlockDrag ? canInsertBlocks2(draggedBlockClientIds, clientId) : true
            };
          });
          const newTarget = getListViewDropTarget(
            blocksData,
            position,
            rtl
          );
          if (newTarget) {
            setTarget(newTarget);
          }
        },
        [
          canInsertBlocks2,
          draggedBlockClientIds,
          getBlockCount2,
          getBlockIndex2,
          getBlockRootClientId2,
          rtl
        ]
      ),
      50
    );
    const ref = (0, import_compose72.__experimentalUseDropZone)({
      dropZoneElement,
      onDrop(event) {
        throttled.cancel();
        if (target) {
          onBlockDrop2(event);
        }
        setTarget(void 0);
      },
      onDragLeave() {
        throttled.cancel();
        setTarget(null);
      },
      onDragOver(event) {
        throttled(event, event.currentTarget);
      },
      onDragEnd() {
        throttled.cancel();
        setTarget(void 0);
      }
    });
    return { ref, target };
  }

  // packages/block-editor/build-module/components/list-view/use-list-view-expand-selected-item.mjs
  var import_element142 = __toESM(require_element(), 1);
  var import_data133 = __toESM(require_data(), 1);
  function useListViewExpandSelectedItem({
    firstSelectedBlockClientId,
    setExpandedState
  }) {
    const [selectedTreeId, setSelectedTreeId] = (0, import_element142.useState)(null);
    const { selectedBlockParentClientIds } = (0, import_data133.useSelect)(
      (select3) => {
        const { getBlockParents: getBlockParents2 } = select3(store);
        return {
          selectedBlockParentClientIds: getBlockParents2(
            firstSelectedBlockClientId,
            false
          )
        };
      },
      [firstSelectedBlockClientId]
    );
    (0, import_element142.useEffect)(() => {
      if (selectedTreeId === firstSelectedBlockClientId) {
        return;
      }
      if (selectedBlockParentClientIds?.length) {
        setExpandedState({
          type: "expand",
          clientIds: selectedBlockParentClientIds
        });
      }
    }, [
      firstSelectedBlockClientId,
      selectedBlockParentClientIds,
      selectedTreeId,
      setExpandedState
    ]);
    return {
      setSelectedTreeId
    };
  }

  // packages/block-editor/build-module/components/list-view/use-clipboard-handler.mjs
  var import_data134 = __toESM(require_data(), 1);
  var import_compose73 = __toESM(require_compose(), 1);
  function useClipboardHandler2({ selectBlock: selectBlock2 }) {
    const registry = (0, import_data134.useRegistry)();
    const {
      getBlockOrder: getBlockOrder2,
      getBlockRootClientId: getBlockRootClientId2,
      getBlocksByClientId: getBlocksByClientId2,
      getPreviousBlockClientId: getPreviousBlockClientId2,
      getSelectedBlockClientIds: getSelectedBlockClientIds2,
      getSettings: getSettings7,
      canInsertBlockType: canInsertBlockType2,
      canRemoveBlocks: canRemoveBlocks2
    } = (0, import_data134.useSelect)(store);
    const { flashBlock: flashBlock2, removeBlocks: removeBlocks2, replaceBlocks: replaceBlocks2, insertBlocks: insertBlocks2 } = (0, import_data134.useDispatch)(store);
    const notifyCopy = useNotifyCopy();
    return (0, import_compose73.useRefEffect)((node) => {
      function updateFocusAndSelection(focusClientId, shouldSelectBlock) {
        if (shouldSelectBlock) {
          selectBlock2(void 0, focusClientId, null, null);
        }
        focusListItem(focusClientId, node);
      }
      function getBlocksToUpdate(clientId) {
        const selectedBlockClientIds = getSelectedBlockClientIds2();
        const isUpdatingSelectedBlocks = selectedBlockClientIds.includes(clientId);
        const firstBlockClientId = isUpdatingSelectedBlocks ? selectedBlockClientIds[0] : clientId;
        const firstBlockRootClientId = getBlockRootClientId2(firstBlockClientId);
        const blocksToUpdate = isUpdatingSelectedBlocks ? selectedBlockClientIds : [clientId];
        return {
          blocksToUpdate,
          firstBlockClientId,
          firstBlockRootClientId,
          originallySelectedBlockClientIds: selectedBlockClientIds
        };
      }
      function handler(event) {
        if (event.defaultPrevented) {
          return;
        }
        if (!node.contains(event.target.ownerDocument.activeElement)) {
          return;
        }
        const listViewRow = event.target.ownerDocument.activeElement?.closest(
          "[role=row]"
        );
        const clientId = listViewRow?.dataset?.block;
        if (!clientId) {
          return;
        }
        const {
          blocksToUpdate: selectedBlockClientIds,
          firstBlockClientId,
          firstBlockRootClientId,
          originallySelectedBlockClientIds
        } = getBlocksToUpdate(clientId);
        if (selectedBlockClientIds.length === 0) {
          return;
        }
        event.preventDefault();
        if (event.type === "copy" || event.type === "cut") {
          if (selectedBlockClientIds.length === 1) {
            flashBlock2(selectedBlockClientIds[0]);
          }
          notifyCopy(event.type, selectedBlockClientIds);
          const blocks2 = getBlocksByClientId2(selectedBlockClientIds);
          setClipboardBlocks(event, blocks2, registry);
        }
        if (event.type === "cut") {
          if (!canRemoveBlocks2(selectedBlockClientIds)) {
            return;
          }
          let blockToFocus = getPreviousBlockClientId2(firstBlockClientId) ?? // If the previous block is not found (when the first block is deleted),
          // fallback to focus the parent block.
          firstBlockRootClientId;
          removeBlocks2(selectedBlockClientIds, false);
          const shouldUpdateSelection = originallySelectedBlockClientIds.length > 0 && getSelectedBlockClientIds2().length === 0;
          if (!blockToFocus) {
            blockToFocus = getBlockOrder2()[0];
          }
          updateFocusAndSelection(blockToFocus, shouldUpdateSelection);
        } else if (event.type === "paste") {
          const {
            __experimentalCanUserUseUnfilteredHTML: canUserUseUnfilteredHTML
          } = getSettings7();
          const blocks2 = getPasteBlocks(
            event,
            canUserUseUnfilteredHTML
          );
          if (selectedBlockClientIds.length === 1) {
            const [selectedBlockClientId] = selectedBlockClientIds;
            if (blocks2.every(
              (block) => canInsertBlockType2(
                block.name,
                selectedBlockClientId
              )
            )) {
              insertBlocks2(
                blocks2,
                void 0,
                selectedBlockClientId
              );
              updateFocusAndSelection(blocks2[0]?.clientId, false);
              return;
            }
          }
          replaceBlocks2(
            selectedBlockClientIds,
            blocks2,
            blocks2.length - 1,
            -1
          );
          updateFocusAndSelection(blocks2[0]?.clientId, false);
        }
      }
      node.ownerDocument.addEventListener("copy", handler);
      node.ownerDocument.addEventListener("cut", handler);
      node.ownerDocument.addEventListener("paste", handler);
      return () => {
        node.ownerDocument.removeEventListener("copy", handler);
        node.ownerDocument.removeEventListener("cut", handler);
        node.ownerDocument.removeEventListener("paste", handler);
      };
    }, []);
  }

  // packages/block-editor/build-module/components/list-view/index.mjs
  var import_jsx_runtime270 = __toESM(require_jsx_runtime(), 1);
  var expanded = (state, action) => {
    if (action.type === "clear") {
      return {};
    }
    if (Array.isArray(action.clientIds)) {
      return {
        ...state,
        ...action.clientIds.reduce(
          (newState, id) => ({
            ...newState,
            [id]: action.type === "expand"
          }),
          {}
        )
      };
    }
    return state;
  };
  var BLOCK_LIST_ITEM_HEIGHT = 32;
  function ListViewComponent({
    id,
    blocks: blocks2,
    dropZoneElement,
    showBlockMovers = false,
    isExpanded = false,
    showAppender = false,
    blockSettingsMenu: BlockSettingsMenu2 = BlockSettingsDropdown,
    rootClientId,
    description,
    onSelect,
    additionalBlockContent: AdditionalBlockContent
  }, ref) {
    if (blocks2) {
      (0, import_deprecated14.default)(
        "`blocks` property in `wp.blockEditor.__experimentalListView`",
        {
          since: "6.3",
          alternative: "`rootClientId` property"
        }
      );
    }
    const instanceId = (0, import_compose74.useInstanceId)(ListViewComponent);
    const { clientIdsTree, draggedClientIds, selectedClientIds } = useListViewClientIds({ blocks: blocks2, rootClientId });
    const blockIndexes = useListViewBlockIndexes(clientIdsTree);
    const { getBlock: getBlock2, getSelectedBlockClientIds: getSelectedBlockClientIds2 } = (0, import_data135.useSelect)(store);
    const { visibleBlockCount } = (0, import_data135.useSelect)(
      (select3) => {
        const { getGlobalBlockCount: getGlobalBlockCount2, getClientIdsOfDescendants: getClientIdsOfDescendants2 } = select3(store);
        const draggedBlockCount = draggedClientIds?.length > 0 ? getClientIdsOfDescendants2(draggedClientIds).length + 1 : 0;
        return {
          visibleBlockCount: getGlobalBlockCount2() - draggedBlockCount
        };
      },
      [draggedClientIds]
    );
    const { updateBlockSelection } = useBlockSelection();
    const [expandedState, setExpandedState] = (0, import_element143.useReducer)(expanded, {});
    const [insertedBlock, setInsertedBlock] = (0, import_element143.useState)(null);
    const { setSelectedTreeId } = useListViewExpandSelectedItem({
      firstSelectedBlockClientId: selectedClientIds[0],
      setExpandedState
    });
    const selectEditorBlock = (0, import_element143.useCallback)(
      /**
       * @param {MouseEvent | KeyboardEvent | undefined} event
       * @param {string}                                 blockClientId
       * @param {null | undefined | -1 | 1}              focusPosition
       */
      (event, blockClientId, focusPosition) => {
        updateBlockSelection(event, blockClientId, null, focusPosition);
        setSelectedTreeId(blockClientId);
        if (onSelect) {
          onSelect(getBlock2(blockClientId));
        }
      },
      [setSelectedTreeId, updateBlockSelection, onSelect, getBlock2]
    );
    const { ref: dropZoneRef, target: blockDropTarget } = useListViewDropZone({
      dropZoneElement,
      expandedState,
      setExpandedState
    });
    const elementRef = (0, import_element143.useRef)();
    const clipBoardRef = useClipboardHandler2({
      selectBlock: selectEditorBlock
    });
    const focusSelectedBlock = (0, import_element143.useCallback)(
      (node) => {
        const [firstSelectedClientId] = getSelectedBlockClientIds2();
        if (firstSelectedClientId && node) {
          focusListItem(firstSelectedClientId, node);
        }
      },
      [getSelectedBlockClientIds2]
    );
    const treeGridRef = (0, import_compose74.useMergeRefs)([
      clipBoardRef,
      focusSelectedBlock,
      elementRef,
      dropZoneRef,
      ref
    ]);
    const expand = (0, import_element143.useCallback)(
      (clientId) => {
        if (!clientId) {
          return;
        }
        const clientIds = Array.isArray(clientId) ? clientId : [clientId];
        setExpandedState({ type: "expand", clientIds });
      },
      [setExpandedState]
    );
    const collapse = (0, import_element143.useCallback)(
      (clientId) => {
        if (!clientId) {
          return;
        }
        setExpandedState({ type: "collapse", clientIds: [clientId] });
      },
      [setExpandedState]
    );
    const collapseAll = (0, import_element143.useCallback)(() => {
      setExpandedState({ type: "clear" });
    }, [setExpandedState]);
    const expandRow = (0, import_element143.useCallback)(
      (row) => {
        expand(row?.dataset?.block);
      },
      [expand]
    );
    const collapseRow = (0, import_element143.useCallback)(
      (row) => {
        collapse(row?.dataset?.block);
      },
      [collapse]
    );
    const focusRow = (0, import_element143.useCallback)(
      (event, startRow, endRow) => {
        if (event.shiftKey) {
          updateBlockSelection(
            event,
            startRow?.dataset?.block,
            endRow?.dataset?.block
          );
        }
      },
      [updateBlockSelection]
    );
    useListViewCollapseItems({
      collapseAll,
      expand
    });
    const firstDraggedBlockClientId = draggedClientIds?.[0];
    const { blockDropTargetIndex, blockDropPosition, firstDraggedBlockIndex } = (0, import_element143.useMemo)(() => {
      let _blockDropTargetIndex, _firstDraggedBlockIndex;
      if (blockDropTarget?.clientId) {
        const foundBlockIndex = blockIndexes[blockDropTarget.clientId];
        _blockDropTargetIndex = foundBlockIndex === void 0 || blockDropTarget?.dropPosition === "top" ? foundBlockIndex : foundBlockIndex + 1;
      } else if (blockDropTarget === null) {
        _blockDropTargetIndex = null;
      }
      if (firstDraggedBlockClientId) {
        const foundBlockIndex = blockIndexes[firstDraggedBlockClientId];
        _firstDraggedBlockIndex = foundBlockIndex === void 0 || blockDropTarget?.dropPosition === "top" ? foundBlockIndex : foundBlockIndex + 1;
      }
      return {
        blockDropTargetIndex: _blockDropTargetIndex,
        blockDropPosition: blockDropTarget?.dropPosition,
        firstDraggedBlockIndex: _firstDraggedBlockIndex
      };
    }, [blockDropTarget, blockIndexes, firstDraggedBlockClientId]);
    const contextValue = (0, import_element143.useMemo)(
      () => ({
        blockDropPosition,
        blockDropTargetIndex,
        blockIndexes,
        draggedClientIds,
        expandedState,
        expand,
        firstDraggedBlockIndex,
        collapse,
        collapseAll,
        BlockSettingsMenu: BlockSettingsMenu2,
        listViewInstanceId: instanceId,
        AdditionalBlockContent,
        insertedBlock,
        setInsertedBlock,
        treeGridElementRef: elementRef,
        rootClientId
      }),
      [
        blockDropPosition,
        blockDropTargetIndex,
        blockIndexes,
        draggedClientIds,
        expandedState,
        expand,
        firstDraggedBlockIndex,
        collapse,
        collapseAll,
        BlockSettingsMenu2,
        instanceId,
        AdditionalBlockContent,
        insertedBlock,
        setInsertedBlock,
        rootClientId
      ]
    );
    const [fixedListWindow] = (0, import_compose74.__experimentalUseFixedWindowList)(
      elementRef,
      BLOCK_LIST_ITEM_HEIGHT,
      visibleBlockCount,
      {
        // Ensure that the windowing logic is recalculated when the expanded state changes.
        // This is necessary because expanding a collapsed block in a short list view can
        // switch the list view to a tall list view with a scrollbar, and vice versa.
        // When this happens, the windowing logic needs to be recalculated to ensure that
        // the correct number of blocks are rendered, by rechecking for a scroll container.
        expandedState,
        useWindowing: true,
        windowOverscan: 40
      }
    );
    if (!clientIdsTree.length && !showAppender) {
      return null;
    }
    const describedById = description && `block-editor-list-view-description-${instanceId}`;
    return /* @__PURE__ */ (0, import_jsx_runtime270.jsxs)(import_data135.AsyncModeProvider, { value: true, children: [
      /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
        ListViewDropIndicatorPreview,
        {
          draggedBlockClientId: firstDraggedBlockClientId,
          listViewRef: elementRef,
          blockDropTarget
        }
      ),
      description && /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(import_components125.VisuallyHidden, { id: describedById, children: description }),
      /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
        import_components125.__experimentalTreeGrid,
        {
          id,
          className: clsx_default("block-editor-list-view-tree", {
            "is-dragging": draggedClientIds?.length > 0 && blockDropTargetIndex !== void 0
          }),
          "aria-label": (0, import_i18n111.__)("Block navigation structure"),
          ref: treeGridRef,
          onCollapseRow: collapseRow,
          onExpandRow: expandRow,
          onFocusRow: focusRow,
          applicationAriaLabel: (0, import_i18n111.__)("Block navigation structure"),
          "aria-describedby": describedById,
          style: {
            "--wp-admin--list-view-dragged-items-height": draggedClientIds?.length ? `${BLOCK_LIST_ITEM_HEIGHT * (draggedClientIds.length - 1)}px` : null
          },
          children: /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(ListViewContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
            branch_default,
            {
              blocks: clientIdsTree,
              parentId: rootClientId,
              selectBlock: selectEditorBlock,
              showBlockMovers,
              fixedListWindow,
              selectedClientIds,
              isExpanded,
              showAppender
            }
          ) })
        }
      )
    ] });
  }
  var PrivateListView = (0, import_element143.forwardRef)(ListViewComponent);
  var list_view_default2 = (0, import_element143.forwardRef)((props, ref) => {
    return /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
      PrivateListView,
      {
        ref,
        ...props,
        showAppender: false,
        rootClientId: null,
        onSelect: null,
        additionalBlockContent: null,
        blockSettingsMenu: void 0
      }
    );
  });

  // packages/block-editor/build-module/components/block-navigation/dropdown.mjs
  var import_jsx_runtime271 = __toESM(require_jsx_runtime(), 1);
  function BlockNavigationDropdownToggle({
    isEnabled,
    onToggle,
    isOpen,
    innerRef,
    ...props
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
      import_components126.Button,
      {
        __next40pxDefaultSize: true,
        ...props,
        ref: innerRef,
        icon: list_view_default,
        "aria-expanded": isOpen,
        "aria-haspopup": "true",
        onClick: isEnabled ? onToggle : void 0,
        label: (0, import_i18n112.__)("List view"),
        className: "block-editor-block-navigation",
        "aria-disabled": !isEnabled
      }
    );
  }
  function BlockNavigationDropdown({ isDisabled, ...props }, ref) {
    (0, import_deprecated15.default)("wp.blockEditor.BlockNavigationDropdown", {
      since: "6.1",
      alternative: "wp.components.Dropdown and wp.blockEditor.ListView"
    });
    const hasBlocks = (0, import_data136.useSelect)(
      (select3) => !!select3(store).getBlockCount(),
      []
    );
    const isEnabled = hasBlocks && !isDisabled;
    return /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
      import_components126.Dropdown,
      {
        contentClassName: "block-editor-block-navigation__popover",
        popoverProps: { placement: "bottom-start" },
        renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
          BlockNavigationDropdownToggle,
          {
            ...props,
            innerRef: ref,
            isOpen,
            onToggle,
            isEnabled
          }
        ),
        renderContent: () => /* @__PURE__ */ (0, import_jsx_runtime271.jsxs)("div", { className: "block-editor-block-navigation__container", children: [
          /* @__PURE__ */ (0, import_jsx_runtime271.jsx)("p", { className: "block-editor-block-navigation__label", children: (0, import_i18n112.__)("List view") }),
          /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(list_view_default2, {})
        ] })
      }
    );
  }
  var dropdown_default = (0, import_element144.forwardRef)(BlockNavigationDropdown);

  // packages/block-editor/build-module/components/block-styles/index.mjs
  var import_element146 = __toESM(require_element(), 1);
  var import_data137 = __toESM(require_data(), 1);
  var import_compose75 = __toESM(require_compose(), 1);
  var import_components127 = __toESM(require_components(), 1);
  var import_i18n113 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/components/block-styles/preview-panel.mjs
  var import_element145 = __toESM(require_element(), 1);
  var import_jsx_runtime272 = __toESM(require_jsx_runtime(), 1);
  function BlockStylesPreviewPanel({
    genericPreviewBlock,
    style,
    className,
    activeStyle
  }) {
    const styleClassName = replaceActiveStyle(className, activeStyle, style);
    const previewBlocks = (0, import_element145.useMemo)(() => {
      return {
        name: genericPreviewBlock.name,
        title: style.label || style.name,
        description: style.description,
        initialAttributes: {
          ...genericPreviewBlock.attributes,
          className: styleClassName + " block-editor-block-styles__block-preview-container"
        },
        example: genericPreviewBlock
      };
    }, [genericPreviewBlock, style, styleClassName]);
    return /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(preview_panel_default, { item: previewBlocks });
  }

  // packages/block-editor/build-module/components/block-styles/index.mjs
  var import_jsx_runtime273 = __toESM(require_jsx_runtime(), 1);
  var noop11 = () => {
  };
  function BlockStyles({ clientId, onSwitch = noop11, onHoverClassName = noop11 }) {
    const canEdit = (0, import_data137.useSelect)(
      (select3) => select3(store).canEditBlock(clientId),
      [clientId]
    );
    const {
      onSelect,
      stylesToRender,
      activeStyle,
      genericPreviewBlock,
      className: previewClassName
    } = useStylesForBlocks({
      clientId,
      onSwitch
    });
    const [hoveredStyle, setHoveredStyle] = (0, import_element146.useState)(null);
    const isMobileViewport = (0, import_compose75.useViewportMatch)("medium", "<");
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    if (!canEdit || !stylesToRender || stylesToRender.length === 0) {
      return null;
    }
    const debouncedSetHoveredStyle = (0, import_compose75.debounce)(setHoveredStyle, 250);
    const onSelectStylePreview = (style) => {
      onSelect(style);
      onHoverClassName(null);
      setHoveredStyle(null);
      debouncedSetHoveredStyle.cancel();
    };
    const styleItemHandler = (item) => {
      if (hoveredStyle === item) {
        debouncedSetHoveredStyle.cancel();
        return;
      }
      debouncedSetHoveredStyle(item);
      onHoverClassName(item?.name ?? null);
    };
    const defaultStyle = getDefaultStyle(stylesToRender);
    const hasValue = () => {
      return activeStyle?.name !== defaultStyle?.name;
    };
    const onDeselect = () => {
      onSelectStylePreview(defaultStyle);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
      import_components127.__experimentalToolsPanel,
      {
        label: (0, import_i18n113.__)("Styles"),
        resetAll: onDeselect,
        panelId: clientId,
        hasInnerWrapper: true,
        dropdownMenuProps,
        children: /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
          import_components127.__experimentalToolsPanelItem,
          {
            hasValue,
            label: (0, import_i18n113.__)("Variation"),
            onDeselect,
            isShownByDefault: true,
            panelId: clientId,
            children: /* @__PURE__ */ (0, import_jsx_runtime273.jsxs)("div", { className: "block-editor-block-styles", children: [
              /* @__PURE__ */ (0, import_jsx_runtime273.jsx)("div", { className: "block-editor-block-styles__variants", children: stylesToRender.map((style) => {
                const buttonText = style.label || style.name;
                return /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
                  import_components127.Button,
                  {
                    __next40pxDefaultSize: true,
                    className: clsx_default(
                      "block-editor-block-styles__item",
                      {
                        "is-active": activeStyle.name === style.name
                      }
                    ),
                    variant: "secondary",
                    label: buttonText,
                    onMouseEnter: () => styleItemHandler(style),
                    onFocus: () => styleItemHandler(style),
                    onMouseLeave: () => styleItemHandler(null),
                    onBlur: () => styleItemHandler(null),
                    onClick: () => onSelectStylePreview(style),
                    "aria-current": activeStyle.name === style.name,
                    children: /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
                      import_components127.__experimentalTruncate,
                      {
                        numberOfLines: 1,
                        className: "block-editor-block-styles__item-text",
                        children: buttonText
                      }
                    )
                  },
                  style.name
                );
              }) }),
              hoveredStyle && !isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
                import_components127.Popover,
                {
                  placement: "left-start",
                  offset: 34,
                  focusOnMount: false,
                  children: /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
                    "div",
                    {
                      className: "block-editor-block-styles__preview-panel",
                      onMouseLeave: () => styleItemHandler(null),
                      children: /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
                        BlockStylesPreviewPanel,
                        {
                          activeStyle,
                          className: previewClassName,
                          genericPreviewBlock,
                          style: hoveredStyle
                        }
                      )
                    }
                  )
                }
              )
            ] })
          }
        )
      }
    );
  }
  var block_styles_default = BlockStyles;

  // packages/block-editor/build-module/components/block-heading-level-dropdown/index.mjs
  var import_components129 = __toESM(require_components(), 1);
  var import_i18n114 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/components/block-heading-level-dropdown/heading-level-icon.mjs
  var import_components128 = __toESM(require_components(), 1);
  var import_jsx_runtime274 = __toESM(require_jsx_runtime(), 1);
  var LEVEL_TO_PATH = {
    0: paragraph_default,
    1: heading_level_1_default,
    2: heading_level_2_default,
    3: heading_level_3_default,
    4: heading_level_4_default,
    5: heading_level_5_default,
    6: heading_level_6_default
  };
  function HeadingLevelIcon({ level }) {
    if (LEVEL_TO_PATH[level]) {
      return /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(import_components128.Icon, { icon: LEVEL_TO_PATH[level] });
    }
    return null;
  }

  // packages/block-editor/build-module/components/block-heading-level-dropdown/index.mjs
  var import_jsx_runtime275 = __toESM(require_jsx_runtime(), 1);
  var HEADING_LEVELS = [1, 2, 3, 4, 5, 6];
  var POPOVER_PROPS6 = {
    className: "block-library-heading-level-dropdown"
  };
  function HeadingLevelDropdown({
    options = HEADING_LEVELS,
    value,
    onChange
  }) {
    const validOptions = options.filter(
      (option) => option === 0 || HEADING_LEVELS.includes(option)
    ).sort((a2, b2) => a2 - b2);
    return /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
      import_components129.ToolbarDropdownMenu,
      {
        popoverProps: POPOVER_PROPS6,
        icon: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(HeadingLevelIcon, { level: value }),
        label: (0, import_i18n114.__)("Change level"),
        controls: validOptions.map((targetLevel) => {
          const isActive = targetLevel === value;
          return {
            icon: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(HeadingLevelIcon, { level: targetLevel }),
            title: targetLevel === 0 ? (0, import_i18n114.__)("Paragraph") : (0, import_i18n114.sprintf)(
              // translators: %d: heading level e.g: "1", "2", "3"
              (0, import_i18n114.__)("Heading %d"),
              targetLevel
            ),
            isActive,
            onClick() {
              onChange(targetLevel);
            },
            role: "menuitemradio"
          };
        })
      }
    );
  }

  // packages/block-editor/build-module/components/block-variation-picker/index.mjs
  var import_i18n115 = __toESM(require_i18n(), 1);
  var import_components130 = __toESM(require_components(), 1);
  var import_jsx_runtime276 = __toESM(require_jsx_runtime(), 1);
  function BlockVariationPicker({
    icon = layout_default,
    label = (0, import_i18n115.__)("Choose variation"),
    instructions = (0, import_i18n115.__)("Select a variation to start with:"),
    variations,
    onSelect,
    allowSkip
  }) {
    const classes = clsx_default("block-editor-block-variation-picker", {
      "has-many-variations": variations.length > 4
    });
    return /* @__PURE__ */ (0, import_jsx_runtime276.jsxs)(
      import_components130.Placeholder,
      {
        icon,
        label,
        instructions,
        className: classes,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
            "ul",
            {
              className: "block-editor-block-variation-picker__variations",
              role: "list",
              "aria-label": (0, import_i18n115.__)("Block variations"),
              children: variations.map((variation) => /* @__PURE__ */ (0, import_jsx_runtime276.jsxs)("li", { children: [
                /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
                  import_components130.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "tertiary",
                    icon: variation.icon && variation.icon.src ? variation.icon.src : variation.icon,
                    iconSize: 48,
                    onClick: () => onSelect(variation),
                    className: "block-editor-block-variation-picker__variation",
                    label: variation.description || variation.title
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime276.jsx)("span", { className: "block-editor-block-variation-picker__variation-label", children: variation.title })
              ] }, variation.name))
            }
          ),
          allowSkip && /* @__PURE__ */ (0, import_jsx_runtime276.jsx)("div", { className: "block-editor-block-variation-picker__skip", children: /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
            import_components130.Button,
            {
              __next40pxDefaultSize: true,
              variant: "link",
              onClick: () => onSelect(),
              children: (0, import_i18n115.__)("Skip")
            }
          ) })
        ]
      }
    );
  }
  var block_variation_picker_default = BlockVariationPicker;

  // packages/block-editor/build-module/components/block-pattern-setup/index.mjs
  var import_data139 = __toESM(require_data(), 1);
  var import_blocks80 = __toESM(require_blocks(), 1);
  var import_components132 = __toESM(require_components(), 1);
  var import_element147 = __toESM(require_element(), 1);
  var import_compose76 = __toESM(require_compose(), 1);
  var import_i18n117 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/components/block-pattern-setup/setup-toolbar.mjs
  var import_i18n116 = __toESM(require_i18n(), 1);
  var import_components131 = __toESM(require_components(), 1);

  // packages/block-editor/build-module/components/block-pattern-setup/constants.mjs
  var VIEWMODES = {
    carousel: "carousel",
    grid: "grid"
  };

  // packages/block-editor/build-module/components/block-pattern-setup/setup-toolbar.mjs
  var import_jsx_runtime277 = __toESM(require_jsx_runtime(), 1);
  var Actions = ({ onBlockPatternSelect }) => /* @__PURE__ */ (0, import_jsx_runtime277.jsx)("div", { className: "block-editor-block-pattern-setup__actions", children: /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
    import_components131.Button,
    {
      __next40pxDefaultSize: true,
      variant: "primary",
      onClick: onBlockPatternSelect,
      children: (0, import_i18n116.__)("Choose")
    }
  ) });
  var CarouselNavigation = ({
    handlePrevious,
    handleNext,
    activeSlide,
    totalSlides
  }) => /* @__PURE__ */ (0, import_jsx_runtime277.jsxs)("div", { className: "block-editor-block-pattern-setup__navigation", children: [
    /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
      import_components131.Button,
      {
        size: "compact",
        icon: (0, import_i18n116.isRTL)() ? chevron_right_default : chevron_left_default,
        label: (0, import_i18n116.__)("Previous pattern"),
        onClick: handlePrevious,
        disabled: activeSlide === 0,
        accessibleWhenDisabled: true
      }
    ),
    /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
      import_components131.Button,
      {
        size: "compact",
        icon: (0, import_i18n116.isRTL)() ? chevron_left_default : chevron_right_default,
        label: (0, import_i18n116.__)("Next pattern"),
        onClick: handleNext,
        disabled: activeSlide === totalSlides - 1,
        accessibleWhenDisabled: true
      }
    )
  ] });
  var SetupToolbar = ({
    viewMode,
    setViewMode,
    handlePrevious,
    handleNext,
    activeSlide,
    totalSlides,
    onBlockPatternSelect
  }) => {
    const isCarouselView = viewMode === VIEWMODES.carousel;
    const displayControls = /* @__PURE__ */ (0, import_jsx_runtime277.jsxs)("div", { className: "block-editor-block-pattern-setup__display-controls", children: [
      /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
        import_components131.Button,
        {
          size: "compact",
          icon: stretch_full_width_default,
          label: (0, import_i18n116.__)("Carousel view"),
          onClick: () => setViewMode(VIEWMODES.carousel),
          isPressed: isCarouselView
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
        import_components131.Button,
        {
          size: "compact",
          icon: grid_default,
          label: (0, import_i18n116.__)("Grid view"),
          onClick: () => setViewMode(VIEWMODES.grid),
          isPressed: viewMode === VIEWMODES.grid
        }
      )
    ] });
    return /* @__PURE__ */ (0, import_jsx_runtime277.jsxs)("div", { className: "block-editor-block-pattern-setup__toolbar", children: [
      isCarouselView && /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
        CarouselNavigation,
        {
          handlePrevious,
          handleNext,
          activeSlide,
          totalSlides
        }
      ),
      displayControls,
      isCarouselView && /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(Actions, { onBlockPatternSelect })
    ] });
  };
  var setup_toolbar_default = SetupToolbar;

  // packages/block-editor/build-module/components/block-pattern-setup/use-patterns-setup.mjs
  var import_data138 = __toESM(require_data(), 1);
  function usePatternsSetup(clientId, blockName, filterPatternsFn) {
    return (0, import_data138.useSelect)(
      (select3) => {
        const {
          getBlockRootClientId: getBlockRootClientId2,
          getPatternsByBlockTypes: getPatternsByBlockTypes2,
          __experimentalGetAllowedPatterns: __experimentalGetAllowedPatterns2
        } = select3(store);
        const rootClientId = getBlockRootClientId2(clientId);
        if (filterPatternsFn) {
          return __experimentalGetAllowedPatterns2(rootClientId).filter(
            filterPatternsFn
          );
        }
        return getPatternsByBlockTypes2(blockName, rootClientId);
      },
      [clientId, blockName, filterPatternsFn]
    );
  }
  var use_patterns_setup_default = usePatternsSetup;

  // packages/block-editor/build-module/components/block-pattern-setup/index.mjs
  var import_jsx_runtime278 = __toESM(require_jsx_runtime(), 1);
  var SetupContent = ({
    viewMode,
    activeSlide,
    patterns,
    onBlockPatternSelect,
    showTitles
  }) => {
    const containerClass = "block-editor-block-pattern-setup__container";
    if (viewMode === VIEWMODES.carousel) {
      const slideClass = /* @__PURE__ */ new Map([
        [activeSlide, "active-slide"],
        [activeSlide - 1, "previous-slide"],
        [activeSlide + 1, "next-slide"]
      ]);
      return /* @__PURE__ */ (0, import_jsx_runtime278.jsx)("div", { className: "block-editor-block-pattern-setup__carousel", children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)("div", { className: containerClass, children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)("div", { className: "carousel-container", children: patterns.map((pattern, index) => /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
        BlockPatternSlide,
        {
          active: index === activeSlide,
          className: slideClass.get(index) || "",
          pattern
        },
        pattern.name
      )) }) }) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime278.jsx)("div", { className: "block-editor-block-pattern-setup__grid", children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
      import_components132.Composite,
      {
        role: "listbox",
        className: containerClass,
        "aria-label": (0, import_i18n117.__)("Patterns list"),
        children: patterns.map((pattern) => /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
          BlockPattern3,
          {
            pattern,
            onSelect: onBlockPatternSelect,
            showTitles
          },
          pattern.name
        ))
      }
    ) });
  };
  function BlockPattern3({ pattern, onSelect, showTitles }) {
    const baseClassName = "block-editor-block-pattern-setup-list";
    const { blocks: blocks2, description, viewportWidth = 700 } = pattern;
    const descriptionId = (0, import_compose76.useInstanceId)(
      BlockPattern3,
      `${baseClassName}__item-description`
    );
    return /* @__PURE__ */ (0, import_jsx_runtime278.jsx)("div", { className: `${baseClassName}__list-item`, children: /* @__PURE__ */ (0, import_jsx_runtime278.jsxs)(
      import_components132.Composite.Item,
      {
        render: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
          "div",
          {
            "aria-describedby": description ? descriptionId : void 0,
            "aria-label": pattern.title,
            className: `${baseClassName}__item`
          }
        ),
        id: `${baseClassName}__pattern__${pattern.name}`,
        role: "option",
        onClick: () => onSelect(blocks2),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
            block_preview_default,
            {
              blocks: blocks2,
              viewportWidth
            }
          ),
          showTitles && /* @__PURE__ */ (0, import_jsx_runtime278.jsx)("div", { className: `${baseClassName}__item-title`, children: pattern.title }),
          !!description && /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(import_components132.VisuallyHidden, { id: descriptionId, children: description })
        ]
      }
    ) });
  }
  function BlockPatternSlide({ active, className, pattern, minHeight }) {
    const { blocks: blocks2, title, description } = pattern;
    const descriptionId = (0, import_compose76.useInstanceId)(
      BlockPatternSlide,
      "block-editor-block-pattern-setup-list__item-description"
    );
    return /* @__PURE__ */ (0, import_jsx_runtime278.jsxs)(
      "div",
      {
        "aria-hidden": !active,
        role: "img",
        className: `pattern-slide ${className}`,
        "aria-label": title,
        "aria-describedby": description ? descriptionId : void 0,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(block_preview_default, { blocks: blocks2, minHeight }),
          !!description && /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(import_components132.VisuallyHidden, { id: descriptionId, children: description })
        ]
      }
    );
  }
  var BlockPatternSetup = ({
    clientId,
    blockName,
    filterPatternsFn,
    onBlockPatternSelect,
    initialViewMode = VIEWMODES.carousel,
    showTitles = false
  }) => {
    const [viewMode, setViewMode] = (0, import_element147.useState)(initialViewMode);
    const [activeSlide, setActiveSlide] = (0, import_element147.useState)(0);
    const { replaceBlock: replaceBlock2 } = (0, import_data139.useDispatch)(store);
    const patterns = use_patterns_setup_default(clientId, blockName, filterPatternsFn);
    if (!patterns?.length) {
      return null;
    }
    const onBlockPatternSelectDefault = (blocks2) => {
      const clonedBlocks = blocks2.map((block) => (0, import_blocks80.cloneBlock)(block));
      replaceBlock2(clientId, clonedBlocks);
    };
    const onPatternSelectCallback = onBlockPatternSelect || onBlockPatternSelectDefault;
    return /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(import_jsx_runtime278.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime278.jsxs)(
      "div",
      {
        className: `block-editor-block-pattern-setup view-mode-${viewMode}`,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
            SetupContent,
            {
              viewMode,
              activeSlide,
              patterns,
              onBlockPatternSelect: onPatternSelectCallback,
              showTitles
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
            setup_toolbar_default,
            {
              viewMode,
              setViewMode,
              activeSlide,
              totalSlides: patterns.length,
              handleNext: () => {
                setActiveSlide(
                  (active) => Math.min(active + 1, patterns.length - 1)
                );
              },
              handlePrevious: () => {
                setActiveSlide(
                  (active) => Math.max(active - 1, 0)
                );
              },
              onBlockPatternSelect: () => {
                onPatternSelectCallback(
                  patterns[activeSlide].blocks
                );
              }
            }
          )
        ]
      }
    ) });
  };
  var block_pattern_setup_default = BlockPatternSetup;

  // packages/block-editor/build-module/components/block-variation-transforms/index.mjs
  var import_blocks81 = __toESM(require_blocks(), 1);
  var import_i18n118 = __toESM(require_i18n(), 1);
  var import_components133 = __toESM(require_components(), 1);
  var import_data140 = __toESM(require_data(), 1);
  var import_element148 = __toESM(require_element(), 1);
  var import_jsx_runtime279 = __toESM(require_jsx_runtime(), 1);
  var { Menu: Menu3 } = unlock(import_components133.privateApis);
  function VariationsButtons({
    className,
    onSelectVariation,
    selectedValue,
    variations
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime279.jsxs)("fieldset", { className, children: [
      /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(import_components133.VisuallyHidden, { as: "legend", children: (0, import_i18n118.__)("Transform to variation") }),
      variations.map((variation) => /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(
        import_components133.Button,
        {
          __next40pxDefaultSize: true,
          size: "compact",
          icon: /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(block_icon_default, { icon: variation.icon, showColors: true }),
          isPressed: selectedValue === variation.name,
          label: selectedValue === variation.name ? variation.title : (0, import_i18n118.sprintf)(
            /* translators: %s: Block or block variation name. */
            (0, import_i18n118.__)("Transform to %s"),
            variation.title
          ),
          onClick: () => onSelectVariation(variation.name),
          "aria-label": variation.title,
          showTooltip: true
        },
        variation.name
      ))
    ] });
  }
  function VariationsDropdown({
    className,
    onSelectVariation,
    selectedValue,
    variations
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime279.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime279.jsxs)(Menu3, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(
        Menu3.TriggerButton,
        {
          render: /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(
            import_components133.Button,
            {
              className: "block-editor-block-variation-transforms__button",
              __next40pxDefaultSize: true,
              variant: "secondary",
              children: (0, import_i18n118.__)("Transform to variation")
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(Menu3.Popover, { position: "bottom", children: /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(Menu3.Group, { children: variations.map((variation) => /* @__PURE__ */ (0, import_jsx_runtime279.jsxs)(
        Menu3.RadioItem,
        {
          value: variation.name,
          checked: selectedValue === variation.name,
          onChange: () => onSelectVariation(variation.name),
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(Menu3.ItemLabel, { children: variation.title }),
            variation.description && /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(Menu3.ItemHelpText, { children: variation.description })
          ]
        },
        variation.name
      )) }) })
    ] }) });
  }
  function VariationsToggleGroupControl({
    className,
    onSelectVariation,
    selectedValue,
    variations
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime279.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(
      import_components133.__experimentalToggleGroupControl,
      {
        label: (0, import_i18n118.__)("Transform to variation"),
        value: selectedValue,
        hideLabelFromVision: true,
        onChange: onSelectVariation,
        __next40pxDefaultSize: true,
        children: variations.map((variation) => /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(
          import_components133.__experimentalToggleGroupControlOptionIcon,
          {
            icon: /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(block_icon_default, { icon: variation.icon, showColors: true }),
            value: variation.name,
            label: selectedValue === variation.name ? variation.title : (0, import_i18n118.sprintf)(
              /* translators: %s: Block or block variation name. */
              (0, import_i18n118.__)("Transform to %s"),
              variation.title
            )
          },
          variation.name
        ))
      }
    ) });
  }
  function __experimentalBlockVariationTransforms({ blockClientId }) {
    const { updateBlockAttributes: updateBlockAttributes2 } = (0, import_data140.useDispatch)(store);
    const {
      activeBlockVariation,
      variations,
      canEdit,
      isContentOnly,
      isSection
    } = (0, import_data140.useSelect)(
      (select3) => {
        const { getActiveBlockVariation, getBlockVariations: getBlockVariations2 } = select3(import_blocks81.store);
        const {
          getBlockName: getBlockName2,
          getBlockAttributes: getBlockAttributes3,
          getBlockEditingMode: getBlockEditingMode2,
          isSectionBlock: isSectionBlock2
        } = unlock(select3(store));
        const { canEditBlock: canEditBlock2 } = select3(store);
        const name = blockClientId && getBlockName2(blockClientId);
        const { hasContentRoleAttribute } = unlock(select3(import_blocks81.store));
        const isContentBlock4 = hasContentRoleAttribute(name);
        return {
          activeBlockVariation: getActiveBlockVariation(
            name,
            getBlockAttributes3(blockClientId),
            "transform"
          ),
          variations: name && getBlockVariations2(name, "transform"),
          canEdit: canEditBlock2(blockClientId),
          isContentOnly: getBlockEditingMode2(blockClientId) === "contentOnly" && !isContentBlock4,
          isSection: isSectionBlock2(blockClientId)
        };
      },
      [blockClientId]
    );
    const selectedValue = activeBlockVariation?.name;
    const hasUniqueIcons = (0, import_element148.useMemo)(() => {
      const variationIcons = /* @__PURE__ */ new Set();
      if (!variations) {
        return false;
      }
      variations.forEach((variation) => {
        if (variation.icon) {
          variationIcons.add(variation.icon?.src || variation.icon);
        }
      });
      return variationIcons.size === variations.length;
    }, [variations]);
    const onSelectVariation = (variationName) => {
      updateBlockAttributes2(blockClientId, {
        ...variations.find(({ name }) => name === variationName).attributes
      });
    };
    if (!variations?.length || !canEdit || isContentOnly || isSection) {
      return null;
    }
    const baseClass = "block-editor-block-variation-transforms";
    const showButtons = variations.length > 6;
    const ButtonComponent = showButtons ? VariationsButtons : VariationsToggleGroupControl;
    const Component7 = hasUniqueIcons ? ButtonComponent : VariationsDropdown;
    return /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(
      Component7,
      {
        className: baseClass,
        onSelectVariation,
        selectedValue,
        variations
      }
    );
  }
  var block_variation_transforms_default = __experimentalBlockVariationTransforms;

  // packages/block-editor/build-module/components/block-vertical-alignment-control/ui.mjs
  var import_i18n119 = __toESM(require_i18n(), 1);
  var import_components134 = __toESM(require_components(), 1);
  var import_jsx_runtime280 = __toESM(require_jsx_runtime(), 1);
  var BLOCK_ALIGNMENTS_CONTROLS2 = {
    top: {
      icon: justify_top_default,
      title: (0, import_i18n119._x)("Align top", "Block vertical alignment setting")
    },
    center: {
      icon: justify_center_vertical_default,
      title: (0, import_i18n119._x)("Align middle", "Block vertical alignment setting")
    },
    bottom: {
      icon: justify_bottom_default,
      title: (0, import_i18n119._x)("Align bottom", "Block vertical alignment setting")
    },
    stretch: {
      icon: justify_stretch_vertical_default,
      title: (0, import_i18n119._x)("Stretch to fill", "Block vertical alignment setting")
    },
    "space-between": {
      icon: justify_space_between_vertical_default,
      title: (0, import_i18n119._x)("Space between", "Block vertical alignment setting")
    }
  };
  var DEFAULT_CONTROLS2 = ["top", "center", "bottom"];
  var DEFAULT_CONTROL2 = "top";
  function BlockVerticalAlignmentUI({
    value,
    onChange,
    controls = DEFAULT_CONTROLS2,
    isCollapsed: isCollapsed3 = true,
    isToolbar
  }) {
    function applyOrUnset(align) {
      return () => onChange(value === align ? void 0 : align);
    }
    const activeAlignment = BLOCK_ALIGNMENTS_CONTROLS2[value];
    const defaultAlignmentControl = BLOCK_ALIGNMENTS_CONTROLS2[DEFAULT_CONTROL2];
    const UIComponent = isToolbar ? import_components134.ToolbarGroup : import_components134.ToolbarDropdownMenu;
    const extraProps = isToolbar ? { isCollapsed: isCollapsed3 } : {};
    return /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
      UIComponent,
      {
        icon: activeAlignment ? activeAlignment.icon : defaultAlignmentControl.icon,
        label: (0, import_i18n119._x)(
          "Change vertical alignment",
          "Block vertical alignment setting label"
        ),
        controls: controls.map((control) => {
          return {
            ...BLOCK_ALIGNMENTS_CONTROLS2[control],
            isActive: value === control,
            role: isCollapsed3 ? "menuitemradio" : void 0,
            onClick: applyOrUnset(control)
          };
        }),
        ...extraProps
      }
    );
  }
  var ui_default3 = BlockVerticalAlignmentUI;

  // packages/block-editor/build-module/components/block-vertical-alignment-control/index.mjs
  var import_jsx_runtime281 = __toESM(require_jsx_runtime(), 1);
  var BlockVerticalAlignmentControl = (props) => {
    return /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(ui_default3, { ...props, isToolbar: false });
  };
  var BlockVerticalAlignmentToolbar = (props) => {
    return /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(ui_default3, { ...props, isToolbar: true });
  };

  // packages/block-editor/build-module/components/border-radius-control/index.mjs
  var import_components139 = __toESM(require_components(), 1);
  var import_element150 = __toESM(require_element(), 1);
  var import_i18n123 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/components/border-radius-control/linked-button.mjs
  var import_components135 = __toESM(require_components(), 1);
  var import_i18n120 = __toESM(require_i18n(), 1);
  var import_jsx_runtime282 = __toESM(require_jsx_runtime(), 1);
  function LinkedButton({ isLinked, ...props }) {
    const label = isLinked ? (0, import_i18n120.__)("Unlink radii") : (0, import_i18n120.__)("Link radii");
    return /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
      import_components135.Button,
      {
        ...props,
        className: "components-border-radius-control__linked-button",
        size: "small",
        icon: isLinked ? link_default : link_off_default,
        iconSize: 24,
        label
      }
    );
  }

  // packages/block-editor/build-module/components/border-radius-control/utils.mjs
  var import_components136 = __toESM(require_components(), 1);
  function mode(inputArray) {
    const arr = [...inputArray];
    return arr.sort(
      (a2, b2) => inputArray.filter((v2) => v2 === b2).length - inputArray.filter((v2) => v2 === a2).length
    ).shift();
  }
  function getAllValue(values = {}) {
    if (typeof values === "string") {
      return values;
    }
    const parsedQuantitiesAndUnits = Object.values(values).map((value2) => {
      const newValue = (0, import_components136.__experimentalParseQuantityAndUnitFromRawValue)(value2);
      if (typeof value2 === "string" && newValue[0] === void 0) {
        return [value2, ""];
      }
      return newValue;
    });
    const allValues = parsedQuantitiesAndUnits.map(
      (value2) => value2[0] ?? ""
    );
    const allUnits = parsedQuantitiesAndUnits.map((value2) => value2[1]);
    const value = allValues.every((v2) => v2 === allValues[0]) ? allValues[0] : "";
    const unit = mode(allUnits);
    const allValue = value === 0 || value ? `${value}${unit || ""}` : void 0;
    return allValue;
  }
  function hasMixedValues(values = {}) {
    if (typeof values === "string") {
      return false;
    }
    if (!values || typeof values !== "object") {
      return false;
    }
    const cornerValues = Object.values(values);
    if (cornerValues.length === 0) {
      return false;
    }
    const firstValue = cornerValues[0];
    const allSame = cornerValues.every((value) => value === firstValue);
    return !allSame;
  }
  function hasDefinedValues(values) {
    if (!values) {
      return false;
    }
    if (typeof values === "string") {
      return true;
    }
    const filteredValues = Object.values(values).filter((value) => {
      return !!value || value === 0;
    });
    return !!filteredValues.length;
  }

  // packages/block-editor/build-module/components/preset-input-control/index.mjs
  var import_components138 = __toESM(require_components(), 1);
  var import_compose77 = __toESM(require_compose(), 1);
  var import_i18n121 = __toESM(require_i18n(), 1);
  var import_element149 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/preset-input-control/constants.mjs
  var ICON_SIZE = 24;
  var RANGE_CONTROL_MAX_SIZE2 = 8;
  var CUSTOM_VALUE_SETTINGS = {
    px: { max: 300, steps: 1 },
    "%": { max: 100, steps: 1 },
    vw: { max: 100, steps: 1 },
    vh: { max: 100, steps: 1 },
    em: { max: 10, steps: 0.1 },
    rem: { max: 10, steps: 0.1 },
    svw: { max: 100, steps: 1 },
    lvw: { max: 100, steps: 1 },
    dvw: { max: 100, steps: 1 },
    svh: { max: 100, steps: 1 },
    lvh: { max: 100, steps: 1 },
    dvh: { max: 100, steps: 1 },
    vi: { max: 100, steps: 1 },
    svi: { max: 100, steps: 1 },
    lvi: { max: 100, steps: 1 },
    dvi: { max: 100, steps: 1 },
    vb: { max: 100, steps: 1 },
    svb: { max: 100, steps: 1 },
    lvb: { max: 100, steps: 1 },
    dvb: { max: 100, steps: 1 },
    vmin: { max: 100, steps: 1 },
    svmin: { max: 100, steps: 1 },
    lvmin: { max: 100, steps: 1 },
    dvmin: { max: 100, steps: 1 },
    vmax: { max: 100, steps: 1 },
    svmax: { max: 100, steps: 1 },
    lvmax: { max: 100, steps: 1 },
    dvmax: { max: 100, steps: 1 }
  };

  // packages/block-editor/build-module/components/preset-input-control/utils.mjs
  var isValuePreset = (value, slug) => {
    if (!value?.includes) {
      return false;
    }
    return value === "0" || value.includes(`var:preset|${slug}|`);
  };
  function getPresetSlug(value, presetType) {
    if (!value) {
      return;
    }
    if (value === "0" || value === "default") {
      return value;
    }
    const slug = value.match(
      new RegExp(`var:preset\\|${presetType}\\|(.+)`)
    );
    return slug ? slug[1] : void 0;
  }
  function getSliderValueFromPreset(presetValue, presets, presetType) {
    if (presetValue === void 0) {
      return 0;
    }
    const slug = parseFloat(presetValue, 10) === 0 ? "0" : getPresetSlug(presetValue, presetType);
    const sliderValue = presets.findIndex((size) => {
      return String(size.slug) === slug;
    });
    return sliderValue !== -1 ? sliderValue : NaN;
  }
  function getCustomValueFromPreset2(value, presets, presetType) {
    if (!isValuePreset(value, presetType)) {
      return value;
    }
    const slug = parseFloat(value, 10) === 0 ? "0" : getPresetSlug(value, presetType);
    const preset = presets.find((size) => String(size.slug) === slug);
    return preset?.size;
  }
  function getPresetValueFromCustomValue2(value, spacingSizes, presetType) {
    if (!value || isValuePreset(value, presetType) || value === "0") {
      return value;
    }
    const spacingMatch = spacingSizes.find(
      (size) => String(size.size) === String(value)
    );
    if (spacingMatch?.slug) {
      return `var:preset|${presetType}|${spacingMatch.slug}`;
    }
    return value;
  }

  // packages/block-editor/build-module/components/preset-input-control/custom-value-controls.mjs
  var import_components137 = __toESM(require_components(), 1);
  var import_jsx_runtime283 = __toESM(require_jsx_runtime(), 1);
  function CustomValueControls({
    allowNegativeOnDrag,
    ariaLabel,
    allPlaceholder,
    minValue,
    parsedQuantity,
    computedUnit,
    units: units2,
    isMixed,
    step,
    max,
    showTooltip,
    value,
    minimumCustomValue,
    onCustomValueChange,
    onCustomValueSliderChange,
    onUnitChange,
    onMouseOut,
    onMouseOver,
    setMinValue
  }) {
    const unitControl = /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
      import_components137.__experimentalUnitControl,
      {
        className: "preset-input-control__unit-control",
        disableUnits: isMixed,
        hideLabelFromVision: true,
        label: ariaLabel,
        min: minValue,
        onChange: onCustomValueChange,
        onUnitChange,
        onBlur: onMouseOut,
        onFocus: onMouseOver,
        onMouseOut,
        onMouseOver,
        size: "__unstable-large",
        units: units2,
        value: [parsedQuantity, computedUnit].join(""),
        placeholder: allPlaceholder,
        onDragStart: () => {
          if (allowNegativeOnDrag && value?.charAt(0) === "-") {
            setMinValue(0);
          }
        },
        onDrag: () => {
          if (allowNegativeOnDrag && value?.charAt(0) === "-") {
            setMinValue(0);
          }
        },
        onDragEnd: () => {
          if (allowNegativeOnDrag) {
            setMinValue(minimumCustomValue);
          }
        }
      }
    );
    const wrappedUnitControl = showTooltip ? /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(import_components137.Tooltip, { text: ariaLabel, placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)("div", { className: "preset-input-control__tooltip-wrapper", children: unitControl }) }) : unitControl;
    return /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(import_jsx_runtime283.Fragment, { children: [
      wrappedUnitControl,
      /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
        import_components137.RangeControl,
        {
          className: "preset-input-control__custom-value-range",
          hideLabelFromVision: true,
          initialPosition: 0,
          label: ariaLabel,
          max,
          min: 0,
          onBlur: onMouseOut,
          onChange: onCustomValueSliderChange,
          onFocus: onMouseOver,
          onMouseOut,
          onMouseOver,
          step,
          value: parsedQuantity,
          withInputField: false,
          __next40pxDefaultSize: true
        }
      )
    ] });
  }

  // packages/block-editor/build-module/components/preset-input-control/index.mjs
  var import_jsx_runtime284 = __toESM(require_jsx_runtime(), 1);
  function PresetInputControl({
    allowNegativeOnDrag = false,
    ariaLabel,
    className: classNameProp,
    customValueSettings = CUSTOM_VALUE_SETTINGS,
    disableCustomValues,
    icon,
    isMixed,
    value: valueProp,
    minimumCustomValue,
    onChange,
    onMouseOut,
    onMouseOver,
    onUnitChange,
    presets = [],
    presetType,
    selectedUnit,
    showTooltip,
    units: units2
  }) {
    const value = (0, import_element149.useMemo)(
      () => getPresetValueFromCustomValue2(valueProp, presets, presetType),
      [valueProp, presets, presetType]
    );
    const className = classNameProp ?? "preset-input-control";
    const marks = presets.slice(1, presets.length - 1).map((_newValue, index) => ({
      value: index + 1,
      label: void 0
    }));
    const hasPresets = marks.length > 0;
    const showRangeControl = presets.length <= RANGE_CONTROL_MAX_SIZE2;
    const allPlaceholder = isMixed ? (0, import_i18n121.__)("Mixed") : null;
    const [minValue, setMinValue] = (0, import_element149.useState)(minimumCustomValue);
    const [showCustomValueControl, setShowCustomValueControl] = (0, import_element149.useState)(
      !disableCustomValues && value !== void 0 && !isValuePreset(value, presetType)
    );
    let currentValue = null;
    const previousValue = (0, import_compose77.usePrevious)(value);
    (0, import_element149.useEffect)(() => {
      if (!!value && previousValue !== value && !isValuePreset(value, presetType) && showCustomValueControl !== true) {
        setShowCustomValueControl(true);
      }
    }, [value, previousValue, presetType, showCustomValueControl]);
    const showCustomValueInSelectList = !showRangeControl && !showCustomValueControl && value !== void 0 && (!isValuePreset(value, presetType) || isValuePreset(value, presetType) && isMixed);
    let selectListOptions = presets;
    if (showCustomValueInSelectList) {
      selectListOptions = [
        ...presets,
        {
          name: !isMixed ? (
            // translators: %s: A custom measurement, e.g. a number followed by a unit like 12px.
            (0, import_i18n121.sprintf)((0, import_i18n121.__)("Custom (%s)"), value)
          ) : (0, import_i18n121.__)("Mixed"),
          slug: "custom",
          size: value
        }
      ];
      currentValue = selectListOptions.length - 1;
    } else if (!isMixed) {
      currentValue = !showCustomValueControl ? getSliderValueFromPreset(value, presets, presetType) : getCustomValueFromPreset2(value, presets, presetType);
    }
    const options = selectListOptions.map((size, index) => ({
      key: index,
      name: size.name
    }));
    const resolvedPresetValue = isValuePreset(value, presetType) ? getCustomValueFromPreset2(value, presets, presetType) : value;
    const [parsedQuantity, parsedUnit] = (0, import_components138.__experimentalParseQuantityAndUnitFromRawValue)(resolvedPresetValue);
    const computedUnit = parsedUnit || selectedUnit || "px";
    const unitConfig = units2?.find((item) => item.value === computedUnit);
    const step = unitConfig?.step ?? customValueSettings[computedUnit]?.steps ?? 0.1;
    const max = unitConfig?.max ?? customValueSettings[computedUnit]?.max ?? 10;
    const handleCustomValueChange = (newValue) => {
      const isNumeric = !isNaN(parseFloat(newValue));
      const newCustomValue = isNumeric ? newValue : void 0;
      if (newCustomValue !== void 0) {
        onChange(newCustomValue);
      }
    };
    const handleCustomValueSliderChange = (next) => {
      onChange([next, computedUnit].join(""));
    };
    const customTooltipContent = (newValue) => value === void 0 ? void 0 : presets[newValue]?.name;
    const getNewPresetValue = (next, controlType) => {
      const newValue = parseInt(next, 10);
      if (controlType === "selectList") {
        if (newValue === 0 && presets[0]?.slug === "0") {
          return "0";
        }
        if (newValue === 0) {
          return void 0;
        }
      } else if (newValue === 0) {
        return "0";
      }
      return `var:preset|${presetType}|${presets[next]?.slug}`;
    };
    return /* @__PURE__ */ (0, import_jsx_runtime284.jsxs)(
      import_components138.__experimentalHStack,
      {
        className: `preset-input-control__wrapper ${className}__wrapper`,
        children: [
          icon && /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
            import_components138.Icon,
            {
              className: "preset-input-control__icon",
              icon,
              size: ICON_SIZE
            }
          ),
          (!hasPresets || showCustomValueControl) && /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
            CustomValueControls,
            {
              allowNegativeOnDrag,
              ariaLabel,
              allPlaceholder,
              minValue,
              parsedQuantity,
              computedUnit,
              units: units2,
              isMixed,
              step,
              max,
              showTooltip,
              value,
              minimumCustomValue,
              onCustomValueChange: handleCustomValueChange,
              onCustomValueSliderChange: handleCustomValueSliderChange,
              onUnitChange,
              onMouseOut,
              onMouseOver,
              setMinValue
            }
          ),
          hasPresets && showRangeControl && !showCustomValueControl && /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
            import_components138.RangeControl,
            {
              "aria-valuenow": currentValue,
              "aria-valuetext": presets[currentValue]?.name,
              className: "preset-input-control__preset-range",
              hideLabelFromVision: true,
              initialPosition: 0,
              label: ariaLabel,
              max: presets.length - 1,
              marks,
              min: 0,
              onBlur: onMouseOut,
              onChange: (newValue) => onChange(getNewPresetValue(newValue)),
              onFocus: onMouseOver,
              onMouseDown: (event) => {
                const nearStart = event?.nativeEvent?.offsetX < 35;
                if (nearStart && value === void 0) {
                  onChange("0");
                }
              },
              onMouseOut,
              onMouseOver,
              renderTooltipContent: customTooltipContent,
              step: 1,
              value: currentValue,
              withInputField: false,
              __next40pxDefaultSize: true
            }
          ),
          hasPresets && !showRangeControl && !showCustomValueControl && /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
            import_components138.CustomSelectControl,
            {
              className: "preset-input-control__custom-select-control",
              hideLabelFromVision: true,
              label: ariaLabel,
              onBlur: onMouseOut,
              onChange: (selection2) => {
                if (showCustomValueInSelectList && selection2.selectedItem.key === options.length - 1) {
                  setShowCustomValueControl(true);
                } else {
                  onChange(
                    getNewPresetValue(
                      selection2.selectedItem.key,
                      "selectList"
                    )
                  );
                }
              },
              onFocus: onMouseOver,
              onMouseOut,
              onMouseOver,
              options,
              size: "__unstable-large",
              value: (
                // passing empty string as a fallback to continue using the
                // component in controlled mode
                options.find(
                  (option) => option.key === currentValue
                ) || ""
              )
            }
          ),
          hasPresets && !disableCustomValues && /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
            import_components138.Button,
            {
              className: "preset-input-control__custom-toggle",
              icon: settings_default,
              iconSize: ICON_SIZE,
              isPressed: showCustomValueControl,
              label: showCustomValueControl ? (0, import_i18n121.__)("Use preset") : (0, import_i18n121.__)("Set custom value"),
              onClick: () => {
                setShowCustomValueControl(!showCustomValueControl);
              },
              size: "small"
            }
          )
        ]
      }
    );
  }

  // packages/block-editor/build-module/components/border-radius-control/constants.mjs
  var import_i18n122 = __toESM(require_i18n(), 1);
  var RANGE_CONTROL_MAX_SIZE3 = 8;
  var EMPTY_ARRAY9 = [];
  var CORNERS = {
    all: (0, import_i18n122.__)("Border radius"),
    topLeft: (0, import_i18n122.__)("Top left"),
    topRight: (0, import_i18n122.__)("Top right"),
    bottomLeft: (0, import_i18n122.__)("Bottom left"),
    bottomRight: (0, import_i18n122.__)("Bottom right")
  };
  var ICONS2 = {
    all: corner_all_default,
    topLeft: corner_top_left_default,
    topRight: corner_top_right_default,
    bottomLeft: corner_bottom_left_default,
    bottomRight: corner_bottom_right_default
  };
  var MIN_BORDER_RADIUS_VALUE = 0;

  // packages/block-editor/build-module/components/border-radius-control/index.mjs
  var import_jsx_runtime285 = __toESM(require_jsx_runtime(), 1);
  function useBorderRadiusSizes(presets) {
    const defaultSizes = presets?.default ?? EMPTY_ARRAY9;
    const customSizes = presets?.custom ?? EMPTY_ARRAY9;
    const themeSizes = presets?.theme ?? EMPTY_ARRAY9;
    return (0, import_element150.useMemo)(() => {
      const sizes = [
        { name: (0, import_i18n123.__)("None"), slug: "0", size: 0 },
        ...customSizes,
        ...themeSizes,
        ...defaultSizes
      ];
      return sizes.length > RANGE_CONTROL_MAX_SIZE3 ? [
        {
          name: (0, import_i18n123.__)("Default"),
          slug: "default",
          size: void 0
        },
        ...sizes
      ] : sizes;
    }, [customSizes, themeSizes, defaultSizes]);
  }
  function getCornerValue(values, corner) {
    if (corner === "all") {
      return getAllValue(values);
    }
    if (typeof values === "string") {
      return values;
    }
    return values?.[corner];
  }
  function getCornerUnit(selectedUnits, corner) {
    if (corner === "all") {
      return selectedUnits.flat;
    }
    return selectedUnits[corner];
  }
  function createCornerChangeHandler(corner, values, onChange) {
    return (newValue) => {
      if (corner === "all") {
        onChange({
          topLeft: newValue,
          topRight: newValue,
          bottomLeft: newValue,
          bottomRight: newValue
        });
      } else {
        const currentValues = typeof values !== "string" ? values || {} : {
          topLeft: values,
          topRight: values,
          bottomLeft: values,
          bottomRight: values
        };
        onChange({
          ...currentValues,
          [corner]: newValue
        });
      }
    };
  }
  function createCornerUnitChangeHandler(corner, selectedUnits, setSelectedUnits) {
    return (newUnit) => {
      const newUnits = { ...selectedUnits };
      if (corner === "all") {
        newUnits.flat = newUnit;
        newUnits.topLeft = newUnit;
        newUnits.topRight = newUnit;
        newUnits.bottomLeft = newUnit;
        newUnits.bottomRight = newUnit;
      } else {
        newUnits[corner] = newUnit;
      }
      setSelectedUnits(newUnits);
    };
  }
  function BorderRadiusControl({ onChange, values, presets }) {
    const [isLinked, setIsLinked] = (0, import_element150.useState)(
      !hasDefinedValues(values) || !hasMixedValues(values)
    );
    const options = useBorderRadiusSizes(presets);
    const [selectedUnits, setSelectedUnits] = (0, import_element150.useState)({
      flat: typeof values === "string" ? (0, import_components139.__experimentalParseQuantityAndUnitFromRawValue)(values)[1] : void 0,
      topLeft: (0, import_components139.__experimentalParseQuantityAndUnitFromRawValue)(values?.topLeft)[1],
      topRight: (0, import_components139.__experimentalParseQuantityAndUnitFromRawValue)(values?.topRight)[1],
      bottomLeft: (0, import_components139.__experimentalParseQuantityAndUnitFromRawValue)(values?.bottomLeft)[1],
      bottomRight: (0, import_components139.__experimentalParseQuantityAndUnitFromRawValue)(
        values?.bottomRight
      )[1]
    });
    const [availableUnits] = useSettings("spacing.units");
    const units2 = (0, import_components139.__experimentalUseCustomUnits)({
      availableUnits: availableUnits || ["px", "em", "rem"]
    });
    const toggleLinked = () => setIsLinked(!isLinked);
    return /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)("fieldset", { className: "components-border-radius-control", children: [
      /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(import_components139.__experimentalHStack, { className: "components-border-radius-control__header", children: [
        /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(import_components139.BaseControl.VisualLabel, { as: "legend", children: (0, import_i18n123.__)("Radius") }),
        /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(LinkedButton, { onClick: toggleLinked, isLinked })
      ] }),
      isLinked ? /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
        PresetInputControl,
        {
          ariaLabel: CORNERS.all,
          className: "components-border-radius-control",
          icon: ICONS2.all,
          minimumCustomValue: MIN_BORDER_RADIUS_VALUE,
          onChange: createCornerChangeHandler(
            "all",
            values,
            onChange
          ),
          onUnitChange: createCornerUnitChangeHandler(
            "all",
            selectedUnits,
            setSelectedUnits
          ),
          presets: options,
          presetType: "border-radius",
          selectedUnit: getCornerUnit(selectedUnits, "all"),
          showTooltip: true,
          units: units2,
          value: getCornerValue(values, "all")
        }
      ) : /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(import_components139.__experimentalVStack, { children: [
        "topLeft",
        "topRight",
        "bottomLeft",
        "bottomRight"
      ].map((corner) => /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
        PresetInputControl,
        {
          ariaLabel: CORNERS[corner],
          className: "components-border-radius-control",
          icon: ICONS2[corner],
          minimumCustomValue: MIN_BORDER_RADIUS_VALUE,
          onChange: createCornerChangeHandler(
            corner,
            values,
            onChange
          ),
          onUnitChange: createCornerUnitChangeHandler(
            corner,
            selectedUnits,
            setSelectedUnits
          ),
          presets: options,
          presetType: "border-radius",
          selectedUnit: getCornerUnit(
            selectedUnits,
            corner
          ),
          showTooltip: true,
          units: units2,
          value: getCornerValue(values, corner)
        },
        corner
      )) })
    ] });
  }

  // packages/block-editor/build-module/components/color-palette/index.mjs
  var import_components140 = __toESM(require_components(), 1);

  // packages/block-editor/build-module/components/color-palette/with-color-context.mjs
  var import_compose78 = __toESM(require_compose(), 1);
  var import_jsx_runtime286 = __toESM(require_jsx_runtime(), 1);
  var with_color_context_default = (0, import_compose78.createHigherOrderComponent)((WrappedComponent) => {
    return function WithColorContext(props) {
      const [
        defaultColors,
        themeColors,
        customColors,
        enableCustomColors,
        enableDefaultColors
      ] = useSettings(
        "color.palette.default",
        "color.palette.theme",
        "color.palette.custom",
        "color.custom",
        "color.defaultPalette"
      );
      const _colors = enableDefaultColors ? [
        ...themeColors || [],
        ...defaultColors || [],
        ...customColors || []
      ] : [...themeColors || [], ...customColors || []];
      const { colors: colors2 = _colors, disableCustomColors = !enableCustomColors } = props;
      const hasColorsToChoose = colors2 && colors2.length > 0 || !disableCustomColors;
      return /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(
        WrappedComponent,
        {
          ...{
            ...props,
            colors: colors2,
            disableCustomColors,
            hasColorsToChoose
          }
        }
      );
    };
  }, "withColorContext");

  // packages/block-editor/build-module/components/color-palette/index.mjs
  var color_palette_default = with_color_context_default(import_components140.ColorPalette);

  // packages/block-editor/build-module/components/colors-gradients/control.mjs
  var import_i18n124 = __toESM(require_i18n(), 1);
  var import_components141 = __toESM(require_components(), 1);
  var import_jsx_runtime287 = __toESM(require_jsx_runtime(), 1);
  var { Tabs: Tabs3 } = unlock(import_components141.privateApis);
  var colorsAndGradientKeys = [
    "colors",
    "disableCustomColors",
    "gradients",
    "disableCustomGradients"
  ];
  var TAB_IDS = { color: "color", gradient: "gradient" };
  function ColorGradientControlInner({
    colors: colors2,
    gradients,
    disableCustomColors,
    disableCustomGradients,
    __experimentalIsRenderedInSidebar,
    className,
    label,
    onColorChange,
    onGradientChange,
    colorValue,
    gradientValue,
    clearable,
    showTitle = true,
    enableAlpha,
    headingLevel
  }) {
    const canChooseAColor = onColorChange && (colors2 && colors2.length > 0 || !disableCustomColors);
    const canChooseAGradient = onGradientChange && (gradients && gradients.length > 0 || !disableCustomGradients);
    if (!canChooseAColor && !canChooseAGradient) {
      return null;
    }
    const tabPanels = {
      [TAB_IDS.color]: /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
        import_components141.ColorPalette,
        {
          value: colorValue,
          onChange: canChooseAGradient ? (newColor) => {
            onColorChange(newColor);
            onGradientChange();
          } : onColorChange,
          ...{ colors: colors2, disableCustomColors },
          __experimentalIsRenderedInSidebar,
          clearable,
          enableAlpha,
          headingLevel
        }
      ),
      [TAB_IDS.gradient]: /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
        import_components141.GradientPicker,
        {
          value: gradientValue,
          onChange: canChooseAColor ? (newGradient) => {
            onGradientChange(newGradient);
            onColorChange();
          } : onGradientChange,
          ...{ gradients, disableCustomGradients },
          __experimentalIsRenderedInSidebar,
          clearable,
          headingLevel
        }
      )
    };
    const renderPanelType = (type) => /* @__PURE__ */ (0, import_jsx_runtime287.jsx)("div", { className: "block-editor-color-gradient-control__panel", children: tabPanels[type] });
    return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
      import_components141.BaseControl,
      {
        className: clsx_default(
          "block-editor-color-gradient-control",
          className
        ),
        children: /* @__PURE__ */ (0, import_jsx_runtime287.jsx)("fieldset", { className: "block-editor-color-gradient-control__fieldset", children: /* @__PURE__ */ (0, import_jsx_runtime287.jsxs)(import_components141.__experimentalVStack, { spacing: 1, children: [
          showTitle && /* @__PURE__ */ (0, import_jsx_runtime287.jsx)("legend", { children: /* @__PURE__ */ (0, import_jsx_runtime287.jsx)("div", { className: "block-editor-color-gradient-control__color-indicator", children: /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(import_components141.BaseControl.VisualLabel, { children: label }) }) }),
          canChooseAColor && canChooseAGradient && /* @__PURE__ */ (0, import_jsx_runtime287.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime287.jsxs)(
            Tabs3,
            {
              defaultTabId: gradientValue ? TAB_IDS.gradient : !!canChooseAColor && TAB_IDS.color,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime287.jsxs)(Tabs3.TabList, { children: [
                  /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(Tabs3.Tab, { tabId: TAB_IDS.color, children: (0, import_i18n124.__)("Color") }),
                  /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(Tabs3.Tab, { tabId: TAB_IDS.gradient, children: (0, import_i18n124.__)("Gradient") })
                ] }),
                /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
                  Tabs3.TabPanel,
                  {
                    tabId: TAB_IDS.color,
                    className: "block-editor-color-gradient-control__panel",
                    focusable: false,
                    children: tabPanels.color
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
                  Tabs3.TabPanel,
                  {
                    tabId: TAB_IDS.gradient,
                    className: "block-editor-color-gradient-control__panel",
                    focusable: false,
                    children: tabPanels.gradient
                  }
                )
              ]
            }
          ) }),
          !canChooseAGradient && renderPanelType(TAB_IDS.color),
          !canChooseAColor && renderPanelType(TAB_IDS.gradient)
        ] }) })
      }
    );
  }
  function ColorGradientControlSelect(props) {
    const [colors2, gradients, customColors, customGradients] = useSettings(
      "color.palette",
      "color.gradients",
      "color.custom",
      "color.customGradient"
    );
    return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
      ColorGradientControlInner,
      {
        colors: colors2,
        gradients,
        disableCustomColors: !customColors,
        disableCustomGradients: !customGradients,
        ...props
      }
    );
  }
  function ColorGradientControl(props) {
    if (colorsAndGradientKeys.every((key) => props.hasOwnProperty(key))) {
      return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(ColorGradientControlInner, { ...props });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(ColorGradientControlSelect, { ...props });
  }
  var control_default = ColorGradientControl;

  // packages/block-editor/build-module/components/color-palette/control.mjs
  var import_jsx_runtime288 = __toESM(require_jsx_runtime(), 1);
  function ColorPaletteControl({
    onChange,
    value,
    ...otherProps
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
      control_default,
      {
        ...otherProps,
        onColorChange: onChange,
        colorValue: value,
        gradients: [],
        disableCustomGradients: true
      }
    );
  }

  // packages/block-editor/build-module/components/contrast-checker/index.mjs
  var import_i18n125 = __toESM(require_i18n(), 1);
  var import_components142 = __toESM(require_components(), 1);
  var import_a11y17 = __toESM(require_a11y(), 1);
  var import_jsx_runtime289 = __toESM(require_jsx_runtime(), 1);
  k([names_default, a11y_default]);
  function ContrastChecker({
    backgroundColor,
    fallbackBackgroundColor,
    fallbackTextColor,
    fallbackLinkColor,
    fontSize,
    // Font size value in pixels.
    isLargeText,
    textColor,
    linkColor,
    enableAlphaChecker = false
  }) {
    const currentBackgroundColor = backgroundColor || fallbackBackgroundColor;
    if (!currentBackgroundColor) {
      return null;
    }
    const currentTextColor = textColor || fallbackTextColor;
    const currentLinkColor = linkColor || fallbackLinkColor;
    if (!currentTextColor && !currentLinkColor) {
      return null;
    }
    const textColors = [
      {
        color: currentTextColor,
        description: (0, import_i18n125.__)("text color")
      },
      {
        color: currentLinkColor,
        description: (0, import_i18n125.__)("link color")
      }
    ];
    const colordBackgroundColor = w(currentBackgroundColor);
    const backgroundColorHasTransparency = colordBackgroundColor.alpha() < 1;
    const backgroundColorBrightness = colordBackgroundColor.brightness();
    const isReadableOptions = {
      level: "AA",
      size: isLargeText || isLargeText !== false && fontSize >= 24 ? "large" : "small"
    };
    let message2 = "";
    let speakMessage = "";
    for (const item of textColors) {
      if (!item.color) {
        continue;
      }
      const colordTextColor = w(item.color);
      const isColordTextReadable = colordTextColor.isReadable(
        colordBackgroundColor,
        isReadableOptions
      );
      const textHasTransparency = colordTextColor.alpha() < 1;
      if (!isColordTextReadable) {
        if (backgroundColorHasTransparency || textHasTransparency) {
          continue;
        }
        message2 = backgroundColorBrightness < colordTextColor.brightness() ? (0, import_i18n125.sprintf)(
          // translators: %s is a type of text color, e.g., "text color" or "link color".
          (0, import_i18n125.__)(
            "This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s."
          ),
          item.description
        ) : (0, import_i18n125.sprintf)(
          // translators: %s is a type of text color, e.g., "text color" or "link color".
          (0, import_i18n125.__)(
            "This color combination may be hard for people to read. Try using a brighter background color and/or a darker %s."
          ),
          item.description
        );
        speakMessage = (0, import_i18n125.__)(
          "This color combination may be hard for people to read."
        );
        break;
      }
      if (textHasTransparency && enableAlphaChecker) {
        message2 = (0, import_i18n125.__)("Transparent text may be hard for people to read.");
        speakMessage = (0, import_i18n125.__)(
          "Transparent text may be hard for people to read."
        );
      }
    }
    if (!message2) {
      return null;
    }
    (0, import_a11y17.speak)(speakMessage);
    return /* @__PURE__ */ (0, import_jsx_runtime289.jsx)("div", { className: "block-editor-contrast-checker", children: /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(
      import_components142.Notice,
      {
        spokenMessage: null,
        status: "warning",
        isDismissible: false,
        children: message2
      }
    ) });
  }
  var contrast_checker_default = ContrastChecker;

  // packages/block-editor/build-module/components/date-format-picker/index.mjs
  var import_i18n126 = __toESM(require_i18n(), 1);
  var import_date = __toESM(require_date(), 1);
  var import_element151 = __toESM(require_element(), 1);
  var import_components143 = __toESM(require_components(), 1);
  var import_jsx_runtime290 = __toESM(require_jsx_runtime(), 1);
  var exampleDate = /* @__PURE__ */ new Date();
  exampleDate.setDate(20);
  exampleDate.setMonth(exampleDate.getMonth() - 3);
  if (exampleDate.getMonth() === 4) {
    exampleDate.setMonth(3);
  }
  function DateFormatPicker({
    format: format6,
    defaultFormat,
    onChange
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime290.jsxs)(
      import_components143.__experimentalVStack,
      {
        as: "fieldset",
        spacing: 4,
        className: "block-editor-date-format-picker",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(import_components143.VisuallyHidden, { as: "legend", children: (0, import_i18n126.__)("Date format") }),
          /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
            import_components143.ToggleControl,
            {
              label: (0, import_i18n126.__)("Default format"),
              help: `${(0, import_i18n126.__)("Example:")}  ${(0, import_date.dateI18n)(
                defaultFormat,
                exampleDate
              )}`,
              checked: !format6,
              onChange: (checked) => onChange(checked ? null : defaultFormat)
            }
          ),
          format6 && /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(NonDefaultControls, { format: format6, onChange })
        ]
      }
    );
  }
  function NonDefaultControls({ format: format6, onChange }) {
    const suggestedFormats = [
      .../* @__PURE__ */ new Set([
        /* translators: See https://www.php.net/manual/datetime.format.php */
        "Y-m-d",
        /* translators: See https://www.php.net/manual/datetime.format.php */
        (0, import_i18n126._x)("n/j/Y", "short date format"),
        /* translators: See https://www.php.net/manual/datetime.format.php */
        (0, import_i18n126._x)("n/j/Y g:i A", "short date format with time"),
        /* translators: See https://www.php.net/manual/datetime.format.php */
        (0, import_i18n126._x)("M j, Y", "medium date format"),
        /* translators: See https://www.php.net/manual/datetime.format.php */
        (0, import_i18n126._x)("M j, Y g:i A", "medium date format with time"),
        /* translators: See https://www.php.net/manual/datetime.format.php */
        (0, import_i18n126._x)("F j, Y", "long date format"),
        /* translators: See https://www.php.net/manual/datetime.format.php */
        (0, import_i18n126._x)("M j", "short date format without the year")
      ])
    ];
    const suggestedOptions = [
      ...suggestedFormats.map((suggestedFormat, index) => ({
        key: `suggested-${index}`,
        name: (0, import_date.dateI18n)(suggestedFormat, exampleDate),
        format: suggestedFormat
      })),
      {
        key: "human-diff",
        name: (0, import_date.humanTimeDiff)(exampleDate),
        format: "human-diff"
      }
    ];
    const customOption = {
      key: "custom",
      name: (0, import_i18n126.__)("Custom"),
      className: "block-editor-date-format-picker__custom-format-select-control__custom-option",
      hint: (0, import_i18n126.__)("Enter your own date format")
    };
    const [isCustom, setIsCustom] = (0, import_element151.useState)(
      () => !!format6 && !suggestedOptions.some((option) => option.format === format6)
    );
    return /* @__PURE__ */ (0, import_jsx_runtime290.jsxs)(import_components143.__experimentalVStack, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
        import_components143.CustomSelectControl,
        {
          __next40pxDefaultSize: true,
          label: (0, import_i18n126.__)("Choose a format"),
          options: [...suggestedOptions, customOption],
          value: isCustom ? customOption : suggestedOptions.find(
            (option) => option.format === format6
          ) ?? customOption,
          onChange: ({ selectedItem }) => {
            if (selectedItem === customOption) {
              setIsCustom(true);
            } else {
              setIsCustom(false);
              onChange(selectedItem.format);
            }
          }
        }
      ),
      isCustom && /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
        import_components143.TextControl,
        {
          __next40pxDefaultSize: true,
          label: (0, import_i18n126.__)("Custom format"),
          hideLabelFromVision: true,
          help: (0, import_element151.createInterpolateElement)(
            (0, import_i18n126.__)(
              "Enter a date or time <Link>format string</Link>."
            ),
            {
              Link: /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
                import_components143.ExternalLink,
                {
                  href: (0, import_i18n126.__)(
                    "https://wordpress.org/documentation/article/customize-date-and-time-format/"
                  )
                }
              )
            }
          ),
          value: format6,
          onChange: (value) => onChange(value)
        }
      )
    ] });
  }

  // packages/block-editor/build-module/components/duotone-control/index.mjs
  var import_components144 = __toESM(require_components(), 1);
  var import_i18n127 = __toESM(require_i18n(), 1);
  var import_keycodes16 = __toESM(require_keycodes(), 1);
  var import_compose79 = __toESM(require_compose(), 1);
  var import_jsx_runtime291 = __toESM(require_jsx_runtime(), 1);
  function DuotoneControl({
    id: idProp,
    colorPalette,
    duotonePalette,
    disableCustomColors,
    disableCustomDuotone,
    value,
    onChange
  }) {
    let toolbarIcon;
    if (value === "unset") {
      toolbarIcon = /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(import_components144.ColorIndicator, { className: "block-editor-duotone-control__unset-indicator" });
    } else if (value) {
      toolbarIcon = /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(import_components144.DuotoneSwatch, { values: value });
    } else {
      toolbarIcon = /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(icon_default, { icon: filter_default });
    }
    const actionLabel = (0, import_i18n127.__)("Apply duotone filter");
    const id = (0, import_compose79.useInstanceId)(DuotoneControl, "duotone-control", idProp);
    const descriptionId = `${id}__description`;
    return /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
      import_components144.Dropdown,
      {
        popoverProps: {
          className: "block-editor-duotone-control__popover",
          headerTitle: (0, import_i18n127.__)("Duotone")
        },
        renderToggle: ({ isOpen, onToggle }) => {
          const openOnArrowDown = (event) => {
            if (!isOpen && event.keyCode === import_keycodes16.DOWN) {
              event.preventDefault();
              onToggle();
            }
          };
          return /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
            import_components144.ToolbarButton,
            {
              showTooltip: true,
              onClick: onToggle,
              "aria-haspopup": "true",
              "aria-expanded": isOpen,
              onKeyDown: openOnArrowDown,
              label: actionLabel,
              icon: toolbarIcon
            }
          );
        },
        renderContent: () => /* @__PURE__ */ (0, import_jsx_runtime291.jsxs)(import_components144.MenuGroup, { label: (0, import_i18n127.__)("Duotone"), children: [
          /* @__PURE__ */ (0, import_jsx_runtime291.jsx)("p", { children: (0, import_i18n127.__)(
            "Create a two-tone color effect without losing your original image."
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
            import_components144.DuotonePicker,
            {
              "aria-label": actionLabel,
              "aria-describedby": descriptionId,
              colorPalette,
              duotonePalette,
              disableCustomColors,
              disableCustomDuotone,
              value,
              onChange
            }
          )
        ] })
      }
    );
  }
  var duotone_control_default = DuotoneControl;

  // packages/block-editor/build-module/components/font-appearance-control/index.mjs
  var import_components145 = __toESM(require_components(), 1);
  var import_deprecated16 = __toESM(require_deprecated(), 1);
  var import_element152 = __toESM(require_element(), 1);
  var import_i18n131 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/utils/get-font-styles-and-weights.mjs
  var import_i18n130 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/utils/format-font-style.mjs
  var import_i18n128 = __toESM(require_i18n(), 1);
  function formatFontStyle(fontStyle) {
    if (!fontStyle) {
      return {};
    }
    if (typeof fontStyle === "object") {
      return fontStyle;
    }
    let name;
    switch (fontStyle) {
      case "normal":
        name = (0, import_i18n128._x)("Regular", "font style");
        break;
      case "italic":
        name = (0, import_i18n128._x)("Italic", "font style");
        break;
      case "oblique":
        name = (0, import_i18n128._x)("Oblique", "font style");
        break;
      default:
        name = fontStyle;
        break;
    }
    return { name, value: fontStyle };
  }

  // packages/block-editor/build-module/utils/format-font-weight.mjs
  var import_i18n129 = __toESM(require_i18n(), 1);
  function formatFontWeight(fontWeight) {
    if (!fontWeight) {
      return {};
    }
    if (typeof fontWeight === "object") {
      return fontWeight;
    }
    let name;
    switch (fontWeight) {
      case "normal":
      case "400":
        name = (0, import_i18n129._x)("Regular", "font weight");
        break;
      case "bold":
      case "700":
        name = (0, import_i18n129._x)("Bold", "font weight");
        break;
      case "100":
        name = (0, import_i18n129._x)("Thin", "font weight");
        break;
      case "200":
        name = (0, import_i18n129._x)("Extra Light", "font weight");
        break;
      case "300":
        name = (0, import_i18n129._x)("Light", "font weight");
        break;
      case "500":
        name = (0, import_i18n129._x)("Medium", "font weight");
        break;
      case "600":
        name = (0, import_i18n129._x)("Semi Bold", "font weight");
        break;
      case "800":
        name = (0, import_i18n129._x)("Extra Bold", "font weight");
        break;
      case "900":
        name = (0, import_i18n129._x)("Black", "font weight");
        break;
      case "1000":
        name = (0, import_i18n129._x)("Extra Black", "font weight");
        break;
      default:
        name = fontWeight;
        break;
    }
    return { name, value: fontWeight };
  }

  // packages/block-editor/build-module/utils/get-font-styles-and-weights.mjs
  var FONT_STYLES = [
    {
      name: (0, import_i18n130._x)("Regular", "font style"),
      value: "normal"
    },
    {
      name: (0, import_i18n130._x)("Italic", "font style"),
      value: "italic"
    }
  ];
  var FONT_WEIGHTS = [
    {
      name: (0, import_i18n130._x)("Thin", "font weight"),
      value: "100"
    },
    {
      name: (0, import_i18n130._x)("Extra Light", "font weight"),
      value: "200"
    },
    {
      name: (0, import_i18n130._x)("Light", "font weight"),
      value: "300"
    },
    {
      name: (0, import_i18n130._x)("Regular", "font weight"),
      value: "400"
    },
    {
      name: (0, import_i18n130._x)("Medium", "font weight"),
      value: "500"
    },
    {
      name: (0, import_i18n130._x)("Semi Bold", "font weight"),
      value: "600"
    },
    {
      name: (0, import_i18n130._x)("Bold", "font weight"),
      value: "700"
    },
    {
      name: (0, import_i18n130._x)("Extra Bold", "font weight"),
      value: "800"
    },
    {
      name: (0, import_i18n130._x)("Black", "font weight"),
      value: "900"
    },
    {
      name: (0, import_i18n130._x)("Extra Black", "font weight"),
      value: "1000"
    }
  ];
  function getFontStylesAndWeights(fontFamilyFaces) {
    let fontStyles = [];
    let fontWeights = [];
    const combinedStyleAndWeightOptions = [];
    const isSystemFont = !fontFamilyFaces || fontFamilyFaces?.length === 0;
    let isVariableFont = false;
    fontFamilyFaces?.forEach((face) => {
      if ("string" === typeof face.fontWeight && /\s/.test(face.fontWeight.trim())) {
        isVariableFont = true;
        let [startValue, endValue] = face.fontWeight.split(" ");
        startValue = parseInt(startValue.slice(0, 1));
        if (endValue === "1000") {
          endValue = 10;
        } else {
          endValue = parseInt(endValue.slice(0, 1));
        }
        for (let i2 = startValue; i2 <= endValue; i2++) {
          const fontWeightValue = `${i2.toString()}00`;
          if (!fontWeights.some(
            (weight) => weight.value === fontWeightValue
          )) {
            fontWeights.push(formatFontWeight(fontWeightValue));
          }
        }
      }
      const fontWeight = formatFontWeight(
        "number" === typeof face.fontWeight ? face.fontWeight.toString() : face.fontWeight
      );
      const fontStyle = formatFontStyle(face.fontStyle);
      if (fontStyle && Object.keys(fontStyle).length) {
        if (!fontStyles.some(
          (style) => style.value === fontStyle.value
        )) {
          fontStyles.push(fontStyle);
        }
      }
      if (fontWeight && Object.keys(fontWeight).length) {
        if (!fontWeights.some(
          (weight) => weight.value === fontWeight.value
        )) {
          if (!isVariableFont) {
            fontWeights.push(fontWeight);
          }
        }
      }
    });
    if (!fontWeights.some((weight) => weight.value >= "600")) {
      fontWeights.push({
        name: (0, import_i18n130._x)("Bold", "font weight"),
        value: "700"
      });
    }
    if (!fontStyles.some((style) => style.value === "italic")) {
      fontStyles.push({
        name: (0, import_i18n130._x)("Italic", "font style"),
        value: "italic"
      });
    }
    if (isSystemFont) {
      fontStyles = FONT_STYLES;
      fontWeights = FONT_WEIGHTS;
    }
    fontStyles = fontStyles.length === 0 ? FONT_STYLES : fontStyles;
    fontWeights = fontWeights.length === 0 ? FONT_WEIGHTS : fontWeights;
    fontStyles.forEach(({ name: styleName, value: styleValue }) => {
      fontWeights.forEach(({ name: weightName, value: weightValue }) => {
        const optionName = styleValue === "normal" ? weightName : (0, import_i18n130.sprintf)(
          /* translators: 1: Font weight name. 2: Font style name. */
          (0, import_i18n130._x)("%1$s %2$s", "font"),
          weightName,
          styleName
        );
        combinedStyleAndWeightOptions.push({
          key: `${styleValue}-${weightValue}`,
          name: optionName,
          style: {
            fontStyle: styleValue,
            fontWeight: weightValue
          }
        });
      });
    });
    return {
      fontStyles,
      fontWeights,
      combinedStyleAndWeightOptions,
      isSystemFont,
      isVariableFont
    };
  }

  // packages/block-editor/build-module/components/font-appearance-control/index.mjs
  var import_jsx_runtime292 = __toESM(require_jsx_runtime(), 1);
  var getFontAppearanceLabel = (hasFontStyles, hasFontWeights) => {
    if (!hasFontStyles) {
      return (0, import_i18n131.__)("Font weight");
    }
    if (!hasFontWeights) {
      return (0, import_i18n131.__)("Font style");
    }
    return (0, import_i18n131.__)("Appearance");
  };
  function FontAppearanceControl(props) {
    const {
      /** Start opting into the larger default height that will become the default size in a future version. */
      __next40pxDefaultSize = false,
      onChange,
      hasFontStyles = true,
      hasFontWeights = true,
      fontFamilyFaces,
      value: { fontStyle, fontWeight },
      ...otherProps
    } = props;
    const hasStylesOrWeights = hasFontStyles || hasFontWeights;
    const label = getFontAppearanceLabel(hasFontStyles, hasFontWeights);
    const defaultOption = {
      key: "default",
      name: (0, import_i18n131.__)("Default"),
      style: { fontStyle: void 0, fontWeight: void 0 }
    };
    const { fontStyles, fontWeights, combinedStyleAndWeightOptions } = getFontStylesAndWeights(fontFamilyFaces);
    const combineOptions = () => {
      const combinedOptions = [defaultOption];
      if (combinedStyleAndWeightOptions) {
        combinedOptions.push(...combinedStyleAndWeightOptions);
      }
      return combinedOptions;
    };
    const styleOptions = () => {
      const combinedOptions = [defaultOption];
      fontStyles.forEach(({ name, value }) => {
        combinedOptions.push({
          key: value,
          name,
          style: { fontStyle: value, fontWeight: void 0 }
        });
      });
      return combinedOptions;
    };
    const weightOptions = () => {
      const combinedOptions = [defaultOption];
      fontWeights.forEach(({ name, value }) => {
        combinedOptions.push({
          key: value,
          name,
          style: { fontStyle: void 0, fontWeight: value }
        });
      });
      return combinedOptions;
    };
    const selectOptions = (0, import_element152.useMemo)(() => {
      if (hasFontStyles && hasFontWeights) {
        return combineOptions();
      }
      return hasFontStyles ? styleOptions() : weightOptions();
    }, [
      props.options,
      fontStyles,
      fontWeights,
      combinedStyleAndWeightOptions
    ]);
    const currentSelection = selectOptions.find(
      (option) => option.style.fontStyle === fontStyle && option.style.fontWeight === fontWeight
    ) || selectOptions[0];
    const getDescribedBy = () => {
      if (!currentSelection) {
        return (0, import_i18n131.__)("No selected font appearance");
      }
      if (!hasFontStyles) {
        return (0, import_i18n131.sprintf)(
          // translators: %s: Currently selected font weight.
          (0, import_i18n131.__)("Currently selected font weight: %s"),
          currentSelection.name
        );
      }
      if (!hasFontWeights) {
        return (0, import_i18n131.sprintf)(
          // translators: %s: Currently selected font style.
          (0, import_i18n131.__)("Currently selected font style: %s"),
          currentSelection.name
        );
      }
      return (0, import_i18n131.sprintf)(
        // translators: %s: Currently selected font appearance.
        (0, import_i18n131.__)("Currently selected font appearance: %s"),
        currentSelection.name
      );
    };
    if (!__next40pxDefaultSize && (otherProps.size === void 0 || otherProps.size === "default")) {
      (0, import_deprecated16.default)(
        `36px default size for wp.blockEditor.__experimentalFontAppearanceControl`,
        {
          since: "6.8",
          version: "7.1",
          hint: "Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."
        }
      );
    }
    return hasStylesOrWeights && /* @__PURE__ */ (0, import_jsx_runtime292.jsx)(
      import_components145.CustomSelectControl,
      {
        ...otherProps,
        className: "components-font-appearance-control",
        __next40pxDefaultSize,
        __shouldNotWarnDeprecated36pxSize: true,
        label,
        describedBy: getDescribedBy(),
        options: selectOptions,
        value: currentSelection,
        onChange: ({ selectedItem }) => onChange(selectedItem.style)
      }
    );
  }

  // packages/block-editor/build-module/components/font-family/index.mjs
  var import_components146 = __toESM(require_components(), 1);
  var import_deprecated17 = __toESM(require_deprecated(), 1);
  var import_i18n132 = __toESM(require_i18n(), 1);
  var import_jsx_runtime293 = __toESM(require_jsx_runtime(), 1);
  function FontFamilyControl({
    /** Start opting into the larger default height that will become the default size in a future version. */
    __next40pxDefaultSize = false,
    value = "",
    onChange,
    fontFamilies,
    className,
    ...props
  }) {
    const [blockLevelFontFamilies] = useSettings("typography.fontFamilies");
    if (!fontFamilies) {
      fontFamilies = blockLevelFontFamilies;
    }
    if (!fontFamilies || fontFamilies.length === 0) {
      return null;
    }
    const options = [
      {
        key: "",
        name: (0, import_i18n132.__)("Default")
      },
      ...fontFamilies.map(({ fontFamily, name }) => ({
        key: fontFamily,
        name: name || fontFamily,
        style: { fontFamily }
      }))
    ];
    if (!__next40pxDefaultSize && (props.size === void 0 || props.size === "default")) {
      (0, import_deprecated17.default)(
        `36px default size for wp.blockEditor.__experimentalFontFamilyControl`,
        {
          since: "6.8",
          version: "7.1",
          hint: "Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."
        }
      );
    }
    const selectedValue = options.find((option) => option.key === value) ?? "";
    return /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(
      import_components146.CustomSelectControl,
      {
        __next40pxDefaultSize,
        __shouldNotWarnDeprecated36pxSize: true,
        label: (0, import_i18n132.__)("Font"),
        value: selectedValue,
        onChange: ({ selectedItem }) => onChange(selectedItem.key),
        options,
        className: clsx_default("block-editor-font-family-control", className),
        ...props
      }
    );
  }

  // packages/block-editor/build-module/components/letter-spacing-control/index.mjs
  var import_components147 = __toESM(require_components(), 1);
  var import_deprecated18 = __toESM(require_deprecated(), 1);
  var import_i18n133 = __toESM(require_i18n(), 1);
  var import_jsx_runtime294 = __toESM(require_jsx_runtime(), 1);
  function LetterSpacingControl({
    __next40pxDefaultSize = false,
    value,
    onChange,
    __unstableInputWidth = "60px",
    ...otherProps
  }) {
    const [availableUnits] = useSettings("spacing.units");
    const units2 = (0, import_components147.__experimentalUseCustomUnits)({
      availableUnits: availableUnits || ["px", "em", "rem"],
      defaultValues: { px: 2, em: 0.2, rem: 0.2 }
    });
    if (!__next40pxDefaultSize && (otherProps.size === void 0 || otherProps.size === "default")) {
      (0, import_deprecated18.default)(
        `36px default size for wp.blockEditor.__experimentalLetterSpacingControl`,
        {
          since: "6.8",
          version: "7.1",
          hint: "Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
      import_components147.__experimentalUnitControl,
      {
        __next40pxDefaultSize,
        __shouldNotWarnDeprecated36pxSize: true,
        ...otherProps,
        label: (0, import_i18n133.__)("Letter spacing"),
        value,
        __unstableInputWidth,
        units: units2,
        onChange
      }
    );
  }

  // packages/block-editor/build-module/components/text-decoration-control/index.mjs
  var import_i18n134 = __toESM(require_i18n(), 1);
  var import_components148 = __toESM(require_components(), 1);
  var import_jsx_runtime295 = __toESM(require_jsx_runtime(), 1);
  var TEXT_DECORATIONS = [
    {
      label: (0, import_i18n134.__)("None"),
      value: "none",
      icon: reset_default
    },
    {
      label: (0, import_i18n134.__)("Underline"),
      value: "underline",
      icon: format_underline_default
    },
    {
      label: (0, import_i18n134.__)("Strikethrough"),
      value: "line-through",
      icon: format_strikethrough_default
    }
  ];
  function TextDecorationControl({
    value,
    onChange,
    className
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
      import_components148.__experimentalToggleGroupControl,
      {
        isDeselectable: true,
        __next40pxDefaultSize: true,
        label: (0, import_i18n134.__)("Decoration"),
        className: clsx_default(
          "block-editor-text-decoration-control",
          className
        ),
        value,
        onChange: (newValue) => {
          onChange(newValue === value ? void 0 : newValue);
        },
        children: TEXT_DECORATIONS.map((option) => {
          return /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
            import_components148.__experimentalToggleGroupControlOptionIcon,
            {
              value: option.value,
              icon: option.icon,
              label: option.label
            },
            option.value
          );
        })
      }
    );
  }

  // packages/block-editor/build-module/components/text-transform-control/index.mjs
  var import_i18n135 = __toESM(require_i18n(), 1);
  var import_components149 = __toESM(require_components(), 1);
  var import_jsx_runtime296 = __toESM(require_jsx_runtime(), 1);
  var TEXT_TRANSFORMS = [
    {
      label: (0, import_i18n135.__)("None"),
      value: "none",
      icon: reset_default
    },
    {
      label: (0, import_i18n135.__)("Uppercase"),
      value: "uppercase",
      icon: format_uppercase_default
    },
    {
      label: (0, import_i18n135.__)("Lowercase"),
      value: "lowercase",
      icon: format_lowercase_default
    },
    {
      label: (0, import_i18n135.__)("Capitalize"),
      value: "capitalize",
      icon: format_capitalize_default
    }
  ];
  function TextTransformControl({ className, value, onChange }) {
    return /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
      import_components149.__experimentalToggleGroupControl,
      {
        isDeselectable: true,
        __next40pxDefaultSize: true,
        label: (0, import_i18n135.__)("Letter case"),
        className: clsx_default(
          "block-editor-text-transform-control",
          className
        ),
        value,
        onChange: (newValue) => {
          onChange(newValue === value ? void 0 : newValue);
        },
        children: TEXT_TRANSFORMS.map((option) => {
          return /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
            import_components149.__experimentalToggleGroupControlOptionIcon,
            {
              value: option.value,
              icon: option.icon,
              label: option.label
            },
            option.value
          );
        })
      }
    );
  }

  // packages/block-editor/build-module/components/writing-mode-control/index.mjs
  var import_i18n136 = __toESM(require_i18n(), 1);
  var import_components150 = __toESM(require_components(), 1);
  var import_jsx_runtime297 = __toESM(require_jsx_runtime(), 1);
  var WRITING_MODES = [
    {
      label: (0, import_i18n136.__)("Horizontal"),
      value: "horizontal-tb",
      icon: text_horizontal_default
    },
    {
      label: (0, import_i18n136.__)("Vertical"),
      value: (0, import_i18n136.isRTL)() ? "vertical-lr" : "vertical-rl",
      icon: text_vertical_default
    }
  ];
  function WritingModeControl({ className, value, onChange }) {
    return /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
      import_components150.__experimentalToggleGroupControl,
      {
        isDeselectable: true,
        __next40pxDefaultSize: true,
        label: (0, import_i18n136.__)("Orientation"),
        className: clsx_default("block-editor-writing-mode-control", className),
        value,
        onChange: (newValue) => {
          onChange(newValue === value ? void 0 : newValue);
        },
        children: WRITING_MODES.map((option) => {
          return /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
            import_components150.__experimentalToggleGroupControlOptionIcon,
            {
              value: option.value,
              icon: option.icon,
              label: option.label
            },
            option.value
          );
        })
      }
    );
  }

  // packages/block-editor/build-module/components/colors-gradients/dropdown.mjs
  var import_components151 = __toESM(require_components(), 1);
  var import_element153 = __toESM(require_element(), 1);
  var import_i18n137 = __toESM(require_i18n(), 1);
  var import_jsx_runtime298 = __toESM(require_jsx_runtime(), 1);
  var WithToolsPanelItem = ({ setting, children, panelId, ...props }) => {
    const clearValue = () => {
      if (setting.colorValue) {
        setting.onColorChange();
      } else if (setting.gradientValue) {
        setting.onGradientChange();
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
      import_components151.__experimentalToolsPanelItem,
      {
        hasValue: () => {
          return !!setting.colorValue || !!setting.gradientValue;
        },
        label: setting.label,
        onDeselect: clearValue,
        isShownByDefault: setting.isShownByDefault !== void 0 ? setting.isShownByDefault : true,
        ...props,
        className: "block-editor-tools-panel-color-gradient-settings__item",
        panelId,
        resetAllFilter: setting.resetAllFilter,
        children
      }
    );
  };
  var LabeledColorIndicator = ({ colorValue, label }) => /* @__PURE__ */ (0, import_jsx_runtime298.jsxs)(import_components151.__experimentalHStack, { justify: "flex-start", children: [
    /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
      import_components151.ColorIndicator,
      {
        className: "block-editor-panel-color-gradient-settings__color-indicator",
        colorValue
      }
    ),
    /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
      import_components151.FlexItem,
      {
        className: "block-editor-panel-color-gradient-settings__color-name",
        title: label,
        children: label
      }
    )
  ] });
  var renderToggle = (settings2) => function Toggle2({ onToggle, isOpen }) {
    const {
      clearable,
      colorValue,
      gradientValue,
      onColorChange,
      onGradientChange,
      label
    } = settings2;
    const colorButtonRef = (0, import_element153.useRef)(void 0);
    const toggleProps = {
      onClick: onToggle,
      className: clsx_default(
        "block-editor-panel-color-gradient-settings__dropdown",
        { "is-open": isOpen }
      ),
      "aria-expanded": isOpen,
      ref: colorButtonRef
    };
    const clearValue = () => {
      if (colorValue) {
        onColorChange();
      } else if (gradientValue) {
        onGradientChange();
      }
    };
    const value = colorValue ?? gradientValue;
    return /* @__PURE__ */ (0, import_jsx_runtime298.jsxs)(import_jsx_runtime298.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(import_components151.Button, { __next40pxDefaultSize: true, ...toggleProps, children: /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
        LabeledColorIndicator,
        {
          colorValue: value,
          label
        }
      ) }),
      clearable && value && /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
        import_components151.Button,
        {
          __next40pxDefaultSize: true,
          label: (0, import_i18n137.__)("Reset"),
          className: "block-editor-panel-color-gradient-settings__reset",
          size: "small",
          icon: reset_default,
          onClick: () => {
            clearValue();
            if (isOpen) {
              onToggle();
            }
            colorButtonRef.current?.focus();
          }
        }
      )
    ] });
  };
  function ColorGradientSettingsDropdown({
    colors: colors2,
    disableCustomColors,
    disableCustomGradients,
    enableAlpha,
    gradients,
    settings: settings2,
    __experimentalIsRenderedInSidebar,
    ...props
  }) {
    let popoverProps3;
    if (__experimentalIsRenderedInSidebar) {
      popoverProps3 = {
        placement: "left-start",
        offset: 36,
        shift: true
      };
    }
    return /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(import_jsx_runtime298.Fragment, { children: settings2.map((setting, index) => {
      const controlProps = {
        clearable: false,
        colorValue: setting.colorValue,
        colors: colors2,
        disableCustomColors,
        disableCustomGradients,
        enableAlpha,
        gradientValue: setting.gradientValue,
        gradients,
        label: setting.label,
        onColorChange: setting.onColorChange,
        onGradientChange: setting.onGradientChange,
        showTitle: false,
        __experimentalIsRenderedInSidebar,
        ...setting
      };
      const toggleSettings = {
        clearable: setting.clearable,
        label: setting.label,
        colorValue: setting.colorValue,
        gradientValue: setting.gradientValue,
        onColorChange: setting.onColorChange,
        onGradientChange: setting.onGradientChange
      };
      return setting && // If not in an `ItemGroup` wrap the dropdown in a
      // `ToolsPanelItem`
      /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
        WithToolsPanelItem,
        {
          setting,
          ...props,
          children: /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
            import_components151.Dropdown,
            {
              popoverProps: popoverProps3,
              className: "block-editor-tools-panel-color-gradient-settings__dropdown",
              renderToggle: renderToggle(toggleSettings),
              renderContent: () => /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(import_components151.__experimentalDropdownContentWrapper, { paddingSize: "none", children: /* @__PURE__ */ (0, import_jsx_runtime298.jsx)("div", { className: "block-editor-panel-color-gradient-settings__dropdown-content", children: /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
                control_default,
                {
                  ...controlProps
                }
              ) }) })
            }
          )
        },
        index
      );
    }) });
  }

  // packages/block-editor/build-module/components/colors-gradients/panel-color-gradient-settings.mjs
  var import_components152 = __toESM(require_components(), 1);
  var import_data141 = __toESM(require_data(), 1);
  var import_compose80 = __toESM(require_compose(), 1);

  // packages/block-editor/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.mjs
  var import_element154 = __toESM(require_element(), 1);
  var import_i18n138 = __toESM(require_i18n(), 1);
  function useMultipleOriginColorsAndGradients() {
    const [
      enableCustomColors,
      customColors,
      themeColors,
      defaultColors,
      shouldDisplayDefaultColors,
      enableCustomGradients,
      customGradients,
      themeGradients,
      defaultGradients,
      shouldDisplayDefaultGradients
    ] = useSettings(
      "color.custom",
      "color.palette.custom",
      "color.palette.theme",
      "color.palette.default",
      "color.defaultPalette",
      "color.customGradient",
      "color.gradients.custom",
      "color.gradients.theme",
      "color.gradients.default",
      "color.defaultGradients"
    );
    const colorGradientSettings = {
      disableCustomColors: !enableCustomColors,
      disableCustomGradients: !enableCustomGradients
    };
    colorGradientSettings.colors = (0, import_element154.useMemo)(() => {
      const result = [];
      if (themeColors && themeColors.length) {
        result.push({
          name: (0, import_i18n138._x)(
            "Theme",
            "Indicates this palette comes from the theme."
          ),
          slug: "theme",
          colors: themeColors
        });
      }
      if (shouldDisplayDefaultColors && defaultColors && defaultColors.length) {
        result.push({
          name: (0, import_i18n138._x)(
            "Default",
            "Indicates this palette comes from WordPress."
          ),
          slug: "default",
          colors: defaultColors
        });
      }
      if (customColors && customColors.length) {
        result.push({
          name: (0, import_i18n138._x)(
            "Custom",
            "Indicates this palette is created by the user."
          ),
          slug: "custom",
          colors: customColors
        });
      }
      return result;
    }, [
      customColors,
      themeColors,
      defaultColors,
      shouldDisplayDefaultColors
    ]);
    colorGradientSettings.gradients = (0, import_element154.useMemo)(() => {
      const result = [];
      if (themeGradients && themeGradients.length) {
        result.push({
          name: (0, import_i18n138._x)(
            "Theme",
            "Indicates this palette comes from the theme."
          ),
          slug: "theme",
          gradients: themeGradients
        });
      }
      if (shouldDisplayDefaultGradients && defaultGradients && defaultGradients.length) {
        result.push({
          name: (0, import_i18n138._x)(
            "Default",
            "Indicates this palette comes from WordPress."
          ),
          slug: "default",
          gradients: defaultGradients
        });
      }
      if (customGradients && customGradients.length) {
        result.push({
          name: (0, import_i18n138._x)(
            "Custom",
            "Indicates this palette is created by the user."
          ),
          slug: "custom",
          gradients: customGradients
        });
      }
      return result;
    }, [
      customGradients,
      themeGradients,
      defaultGradients,
      shouldDisplayDefaultGradients
    ]);
    colorGradientSettings.hasColorsOrGradients = !!colorGradientSettings.colors.length || !!colorGradientSettings.gradients.length;
    return colorGradientSettings;
  }

  // packages/block-editor/build-module/components/colors-gradients/panel-color-gradient-settings.mjs
  var import_jsx_runtime299 = __toESM(require_jsx_runtime(), 1);
  var colorsAndGradientKeys2 = [
    "colors",
    "disableCustomColors",
    "gradients",
    "disableCustomGradients"
  ];
  var PanelColorGradientSettingsInner = ({
    className,
    colors: colors2,
    gradients,
    disableCustomColors,
    disableCustomGradients,
    children,
    settings: settings2,
    title,
    showTitle = true,
    __experimentalIsRenderedInSidebar,
    enableAlpha
  }) => {
    const panelId = (0, import_compose80.useInstanceId)(PanelColorGradientSettingsInner);
    const { batch } = (0, import_data141.useRegistry)();
    if ((!colors2 || colors2.length === 0) && (!gradients || gradients.length === 0) && disableCustomColors && disableCustomGradients && settings2?.every(
      (setting) => (!setting.colors || setting.colors.length === 0) && (!setting.gradients || setting.gradients.length === 0) && (setting.disableCustomColors === void 0 || setting.disableCustomColors) && (setting.disableCustomGradients === void 0 || setting.disableCustomGradients)
    )) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)(
      import_components152.__experimentalToolsPanel,
      {
        className: clsx_default(
          "block-editor-panel-color-gradient-settings",
          className
        ),
        label: showTitle ? title : void 0,
        resetAll: () => {
          batch(() => {
            settings2.forEach(
              ({
                colorValue,
                gradientValue,
                onColorChange,
                onGradientChange
              }) => {
                if (colorValue) {
                  onColorChange();
                } else if (gradientValue) {
                  onGradientChange();
                }
              }
            );
          });
        },
        panelId,
        __experimentalFirstVisibleItemClass: "first",
        __experimentalLastVisibleItemClass: "last",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
            ColorGradientSettingsDropdown,
            {
              settings: settings2,
              panelId,
              ...{
                colors: colors2,
                gradients,
                disableCustomColors,
                disableCustomGradients,
                __experimentalIsRenderedInSidebar,
                enableAlpha
              }
            }
          ),
          !!children && /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)(import_jsx_runtime299.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(import_components152.__experimentalSpacer, { marginY: 4 }),
            " ",
            children
          ] })
        ]
      }
    );
  };
  var PanelColorGradientSettingsSelect = (props) => {
    const colorGradientSettings = useMultipleOriginColorsAndGradients();
    return /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
      PanelColorGradientSettingsInner,
      {
        ...{ ...colorGradientSettings, ...props }
      }
    );
  };
  var PanelColorGradientSettings = (props) => {
    if (colorsAndGradientKeys2.every((key) => props.hasOwnProperty(key))) {
      return /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(PanelColorGradientSettingsInner, { ...props });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(PanelColorGradientSettingsSelect, { ...props });
  };
  var panel_color_gradient_settings_default = PanelColorGradientSettings;

  // packages/block-editor/build-module/components/dimension-control/index.mjs
  var import_element155 = __toESM(require_element(), 1);
  var import_components153 = __toESM(require_components(), 1);
  var import_i18n139 = __toESM(require_i18n(), 1);
  var import_jsx_runtime300 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_ARRAY10 = [];
  var DIMENSION_CUSTOM_VALUE_SETTINGS = {
    ...CUSTOM_VALUE_SETTINGS,
    px: { max: 1e3, steps: 1 },
    em: { max: 50, steps: 0.1 },
    rem: { max: 50, steps: 0.1 }
  };
  function useDimensionSizes(presets) {
    const defaultSizes = presets?.default ?? EMPTY_ARRAY10;
    const customSizes = presets?.custom ?? EMPTY_ARRAY10;
    const themeSizes = presets?.theme ?? EMPTY_ARRAY10;
    return (0, import_element155.useMemo)(() => {
      const sizes = [
        { name: (0, import_i18n139.__)("None"), slug: "0", size: 0 },
        ...customSizes,
        ...themeSizes,
        ...defaultSizes
      ];
      return sizes;
    }, [customSizes, themeSizes, defaultSizes]);
  }
  function DimensionControl({
    label = (0, import_i18n139.__)("Dimension"),
    onChange,
    value
  }) {
    const [dimensionSizes, availableUnits] = useSettings(
      "dimensions.dimensionSizes",
      "spacing.units"
    );
    const units2 = (0, import_components153.__experimentalUseCustomUnits)({
      availableUnits: availableUnits || [
        "%",
        "px",
        "em",
        "rem",
        "vh",
        "vw"
      ]
    });
    const options = useDimensionSizes(dimensionSizes);
    const [selectedUnit, setSelectedUnit] = (0, import_element155.useState)(() => {
      const [, unit] = (0, import_components153.__experimentalParseQuantityAndUnitFromRawValue)(value);
      return unit || units2[0]?.value || "px";
    });
    const handleUnitChange = (newUnit) => {
      const [currentValue, currentUnit] = (0, import_components153.__experimentalParseQuantityAndUnitFromRawValue)(value);
      if (["em", "rem"].includes(newUnit) && currentUnit === "px") {
        onChange((currentValue / 16).toFixed(2) + newUnit);
      } else if (["em", "rem"].includes(currentUnit) && newUnit === "px") {
        onChange(Math.round(currentValue * 16) + newUnit);
      } else if ([
        "%",
        "vw",
        "svw",
        "lvw",
        "dvw",
        "vh",
        "svh",
        "lvh",
        "dvh",
        "vi",
        "svi",
        "lvi",
        "dvi",
        "vb",
        "svb",
        "lvb",
        "dvb",
        "vmin",
        "svmin",
        "lvmin",
        "dvmin",
        "vmax",
        "svmax",
        "lvmax",
        "dvmax"
      ].includes(newUnit) && currentValue > 100) {
        onChange(100 + newUnit);
      }
      setSelectedUnit(newUnit);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)("fieldset", { className: "block-editor-dimension-control", children: [
      /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(import_components153.BaseControl.VisualLabel, { as: "legend", children: label }),
      /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
        PresetInputControl,
        {
          ariaLabel: label,
          className: "block-editor-dimension-control",
          customValueSettings: DIMENSION_CUSTOM_VALUE_SETTINGS,
          minimumCustomValue: 0,
          onChange,
          onUnitChange: handleUnitChange,
          presets: options,
          presetType: "dimension",
          selectedUnit,
          showTooltip: true,
          units: units2,
          value
        }
      )
    ] });
  }

  // packages/block-editor/build-module/components/height-control/index.mjs
  var import_element156 = __toESM(require_element(), 1);
  var import_components154 = __toESM(require_components(), 1);
  var import_i18n140 = __toESM(require_i18n(), 1);
  var import_deprecated19 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime301 = __toESM(require_jsx_runtime(), 1);
  var RANGE_CONTROL_CUSTOM_SETTINGS = {
    px: { max: 1e3, step: 1 },
    "%": { max: 100, step: 1 },
    vw: { max: 100, step: 1 },
    vh: { max: 100, step: 1 },
    em: { max: 50, step: 0.1 },
    rem: { max: 50, step: 0.1 },
    svw: { max: 100, step: 1 },
    lvw: { max: 100, step: 1 },
    dvw: { max: 100, step: 1 },
    svh: { max: 100, step: 1 },
    lvh: { max: 100, step: 1 },
    dvh: { max: 100, step: 1 },
    vi: { max: 100, step: 1 },
    svi: { max: 100, step: 1 },
    lvi: { max: 100, step: 1 },
    dvi: { max: 100, step: 1 },
    vb: { max: 100, step: 1 },
    svb: { max: 100, step: 1 },
    lvb: { max: 100, step: 1 },
    dvb: { max: 100, step: 1 },
    vmin: { max: 100, step: 1 },
    svmin: { max: 100, step: 1 },
    lvmin: { max: 100, step: 1 },
    dvmin: { max: 100, step: 1 },
    vmax: { max: 100, step: 1 },
    svmax: { max: 100, step: 1 },
    lvmax: { max: 100, step: 1 },
    dvmax: { max: 100, step: 1 }
  };
  function HeightControl({
    label = (0, import_i18n140.__)("Height"),
    onChange,
    value
  }) {
    (0, import_deprecated19.default)("wp.blockEditor.HeightControl", {
      since: "7.0",
      version: "7.2",
      alternative: "wp.blockEditor.DimensionControl"
    });
    const customRangeValue = parseFloat(value);
    const [availableUnits] = useSettings("spacing.units");
    const units2 = (0, import_components154.__experimentalUseCustomUnits)({
      availableUnits: availableUnits || [
        "%",
        "px",
        "em",
        "rem",
        "vh",
        "vw"
      ]
    });
    const selectedUnit = (0, import_element156.useMemo)(
      () => (0, import_components154.__experimentalParseQuantityAndUnitFromRawValue)(value),
      [value]
    )[1] || units2[0]?.value || "px";
    const handleSliderChange = (next) => {
      onChange([next, selectedUnit].join(""));
    };
    const handleUnitChange = (newUnit) => {
      const [currentValue, currentUnit] = (0, import_components154.__experimentalParseQuantityAndUnitFromRawValue)(value);
      if (["em", "rem"].includes(newUnit) && currentUnit === "px") {
        onChange((currentValue / 16).toFixed(2) + newUnit);
      } else if (["em", "rem"].includes(currentUnit) && newUnit === "px") {
        onChange(Math.round(currentValue * 16) + newUnit);
      } else if ([
        "%",
        "vw",
        "svw",
        "lvw",
        "dvw",
        "vh",
        "svh",
        "lvh",
        "dvh",
        "vi",
        "svi",
        "lvi",
        "dvi",
        "vb",
        "svb",
        "lvb",
        "dvb",
        "vmin",
        "svmin",
        "lvmin",
        "dvmin",
        "vmax",
        "svmax",
        "lvmax",
        "dvmax"
      ].includes(newUnit) && currentValue > 100) {
        onChange(100 + newUnit);
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)("fieldset", { className: "block-editor-height-control", children: [
      /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(import_components154.BaseControl.VisualLabel, { as: "legend", children: label }),
      /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(import_components154.Flex, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(import_components154.FlexItem, { isBlock: true, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
          import_components154.__experimentalUnitControl,
          {
            value,
            units: units2,
            onChange,
            onUnitChange: handleUnitChange,
            min: 0,
            size: "__unstable-large",
            label,
            hideLabelFromVision: true
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(import_components154.FlexItem, { isBlock: true, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(import_components154.__experimentalSpacer, { marginX: 2, marginBottom: 0, children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
          import_components154.RangeControl,
          {
            __next40pxDefaultSize: true,
            value: customRangeValue,
            min: 0,
            max: RANGE_CONTROL_CUSTOM_SETTINGS[selectedUnit]?.max ?? 100,
            step: RANGE_CONTROL_CUSTOM_SETTINGS[selectedUnit]?.step ?? 0.1,
            withInputField: false,
            onChange: handleSliderChange,
            label,
            hideLabelFromVision: true
          }
        ) }) })
      ] })
    ] });
  }

  // packages/block-editor/build-module/components/image-editor/index.mjs
  var import_components160 = __toESM(require_components(), 1);

  // node_modules/react-easy-crop/index.module.js
  var React3 = __toESM(require_react());
  var import_normalize_wheel = __toESM(require_normalize_wheel());
  function getCropSize(mediaWidth, mediaHeight, containerWidth, containerHeight, aspect, rotation) {
    if (rotation === void 0) {
      rotation = 0;
    }
    var _a = rotateSize(mediaWidth, mediaHeight, rotation), width = _a.width, height = _a.height;
    var fittingWidth = Math.min(width, containerWidth);
    var fittingHeight = Math.min(height, containerHeight);
    if (fittingWidth > fittingHeight * aspect) {
      return {
        width: fittingHeight * aspect,
        height: fittingHeight
      };
    }
    return {
      width: fittingWidth,
      height: fittingWidth / aspect
    };
  }
  function getMediaZoom(mediaSize) {
    return mediaSize.width > mediaSize.height ? mediaSize.width / mediaSize.naturalWidth : mediaSize.height / mediaSize.naturalHeight;
  }
  function restrictPosition(position, mediaSize, cropSize, zoom, rotation) {
    if (rotation === void 0) {
      rotation = 0;
    }
    var _a = rotateSize(mediaSize.width, mediaSize.height, rotation), width = _a.width, height = _a.height;
    return {
      x: restrictPositionCoord(position.x, width, cropSize.width, zoom),
      y: restrictPositionCoord(position.y, height, cropSize.height, zoom)
    };
  }
  function restrictPositionCoord(position, mediaSize, cropSize, zoom) {
    var maxPosition = mediaSize * zoom / 2 - cropSize / 2;
    return clamp(position, -maxPosition, maxPosition);
  }
  function getDistanceBetweenPoints(pointA, pointB) {
    return Math.sqrt(Math.pow(pointA.y - pointB.y, 2) + Math.pow(pointA.x - pointB.x, 2));
  }
  function getRotationBetweenPoints(pointA, pointB) {
    return Math.atan2(pointB.y - pointA.y, pointB.x - pointA.x) * 180 / Math.PI;
  }
  function computeCroppedArea(crop, mediaSize, cropSize, aspect, zoom, rotation, restrictPosition2) {
    if (rotation === void 0) {
      rotation = 0;
    }
    if (restrictPosition2 === void 0) {
      restrictPosition2 = true;
    }
    var limitAreaFn = restrictPosition2 ? limitArea : noOp;
    var mediaBBoxSize = rotateSize(mediaSize.width, mediaSize.height, rotation);
    var mediaNaturalBBoxSize = rotateSize(mediaSize.naturalWidth, mediaSize.naturalHeight, rotation);
    var croppedAreaPercentages = {
      x: limitAreaFn(100, ((mediaBBoxSize.width - cropSize.width / zoom) / 2 - crop.x / zoom) / mediaBBoxSize.width * 100),
      y: limitAreaFn(100, ((mediaBBoxSize.height - cropSize.height / zoom) / 2 - crop.y / zoom) / mediaBBoxSize.height * 100),
      width: limitAreaFn(100, cropSize.width / mediaBBoxSize.width * 100 / zoom),
      height: limitAreaFn(100, cropSize.height / mediaBBoxSize.height * 100 / zoom)
    };
    var widthInPixels = Math.round(limitAreaFn(mediaNaturalBBoxSize.width, croppedAreaPercentages.width * mediaNaturalBBoxSize.width / 100));
    var heightInPixels = Math.round(limitAreaFn(mediaNaturalBBoxSize.height, croppedAreaPercentages.height * mediaNaturalBBoxSize.height / 100));
    var isImgWiderThanHigh = mediaNaturalBBoxSize.width >= mediaNaturalBBoxSize.height * aspect;
    var sizePixels = isImgWiderThanHigh ? {
      width: Math.round(heightInPixels * aspect),
      height: heightInPixels
    } : {
      width: widthInPixels,
      height: Math.round(widthInPixels / aspect)
    };
    var croppedAreaPixels = __assign(__assign({}, sizePixels), {
      x: Math.round(limitAreaFn(mediaNaturalBBoxSize.width - sizePixels.width, croppedAreaPercentages.x * mediaNaturalBBoxSize.width / 100)),
      y: Math.round(limitAreaFn(mediaNaturalBBoxSize.height - sizePixels.height, croppedAreaPercentages.y * mediaNaturalBBoxSize.height / 100))
    });
    return {
      croppedAreaPercentages,
      croppedAreaPixels
    };
  }
  function limitArea(max, value) {
    return Math.min(max, Math.max(0, value));
  }
  function noOp(_max, value) {
    return value;
  }
  function getInitialCropFromCroppedAreaPercentages(croppedAreaPercentages, mediaSize, rotation, cropSize, minZoom, maxZoom) {
    var mediaBBoxSize = rotateSize(mediaSize.width, mediaSize.height, rotation);
    var zoom = clamp(cropSize.width / mediaBBoxSize.width * (100 / croppedAreaPercentages.width), minZoom, maxZoom);
    var crop = {
      x: zoom * mediaBBoxSize.width / 2 - cropSize.width / 2 - mediaBBoxSize.width * zoom * (croppedAreaPercentages.x / 100),
      y: zoom * mediaBBoxSize.height / 2 - cropSize.height / 2 - mediaBBoxSize.height * zoom * (croppedAreaPercentages.y / 100)
    };
    return {
      crop,
      zoom
    };
  }
  function getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize) {
    var mediaZoom = getMediaZoom(mediaSize);
    return cropSize.height > cropSize.width ? cropSize.height / (croppedAreaPixels.height * mediaZoom) : cropSize.width / (croppedAreaPixels.width * mediaZoom);
  }
  function getInitialCropFromCroppedAreaPixels(croppedAreaPixels, mediaSize, rotation, cropSize, minZoom, maxZoom) {
    if (rotation === void 0) {
      rotation = 0;
    }
    var mediaNaturalBBoxSize = rotateSize(mediaSize.naturalWidth, mediaSize.naturalHeight, rotation);
    var zoom = clamp(getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize), minZoom, maxZoom);
    var cropZoom = cropSize.height > cropSize.width ? cropSize.height / croppedAreaPixels.height : cropSize.width / croppedAreaPixels.width;
    var crop = {
      x: ((mediaNaturalBBoxSize.width - croppedAreaPixels.width) / 2 - croppedAreaPixels.x) * cropZoom,
      y: ((mediaNaturalBBoxSize.height - croppedAreaPixels.height) / 2 - croppedAreaPixels.y) * cropZoom
    };
    return {
      crop,
      zoom
    };
  }
  function getCenter(a2, b2) {
    return {
      x: (b2.x + a2.x) / 2,
      y: (b2.y + a2.y) / 2
    };
  }
  function getRadianAngle(degreeValue) {
    return degreeValue * Math.PI / 180;
  }
  function rotateSize(width, height, rotation) {
    var rotRad = getRadianAngle(rotation);
    return {
      width: Math.abs(Math.cos(rotRad) * width) + Math.abs(Math.sin(rotRad) * height),
      height: Math.abs(Math.sin(rotRad) * width) + Math.abs(Math.cos(rotRad) * height)
    };
  }
  function clamp(value, min, max) {
    return Math.min(Math.max(value, min), max);
  }
  function classNames() {
    var args = [];
    for (var _i = 0; _i < arguments.length; _i++) {
      args[_i] = arguments[_i];
    }
    return args.filter(function(value) {
      if (typeof value === "string" && value.length > 0) {
        return true;
      }
      return false;
    }).join(" ").trim();
  }
  var css_248z = ".reactEasyCrop_Container {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  overflow: hidden;\n  user-select: none;\n  touch-action: none;\n  cursor: move;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n  will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n  max-width: 100%;\n  max-height: 100%;\n  margin: auto;\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n  width: 100%;\n  height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n  width: auto;\n  height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n  position: absolute;\n  left: 50%;\n  top: 50%;\n  transform: translate(-50%, -50%);\n  border: 1px solid rgba(255, 255, 255, 0.5);\n  box-sizing: border-box;\n  box-shadow: 0 0 0 9999em;\n  color: rgba(0, 0, 0, 0.5);\n  overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n  border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n  content: ' ';\n  box-sizing: border-box;\n  position: absolute;\n  border: 1px solid rgba(255, 255, 255, 0.5);\n  top: 0;\n  bottom: 0;\n  left: 33.33%;\n  right: 33.33%;\n  border-top: 0;\n  border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n  content: ' ';\n  box-sizing: border-box;\n  position: absolute;\n  border: 1px solid rgba(255, 255, 255, 0.5);\n  top: 33.33%;\n  bottom: 33.33%;\n  left: 0;\n  right: 0;\n  border-left: 0;\n  border-right: 0;\n}\n";
  var MIN_ZOOM = 1;
  var MAX_ZOOM = 3;
  var KEYBOARD_STEP = 1;
  var Cropper = (
    /** @class */
    (function(_super) {
      __extends(Cropper2, _super);
      function Cropper2() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.cropperRef = React3.createRef();
        _this.imageRef = React3.createRef();
        _this.videoRef = React3.createRef();
        _this.containerPosition = {
          x: 0,
          y: 0
        };
        _this.containerRef = null;
        _this.styleRef = null;
        _this.containerRect = null;
        _this.mediaSize = {
          width: 0,
          height: 0,
          naturalWidth: 0,
          naturalHeight: 0
        };
        _this.dragStartPosition = {
          x: 0,
          y: 0
        };
        _this.dragStartCrop = {
          x: 0,
          y: 0
        };
        _this.gestureZoomStart = 0;
        _this.gestureRotationStart = 0;
        _this.isTouching = false;
        _this.lastPinchDistance = 0;
        _this.lastPinchRotation = 0;
        _this.rafDragTimeout = null;
        _this.rafPinchTimeout = null;
        _this.wheelTimer = null;
        _this.currentDoc = typeof document !== "undefined" ? document : null;
        _this.currentWindow = typeof window !== "undefined" ? window : null;
        _this.resizeObserver = null;
        _this.previousCropSize = null;
        _this.isInitialized = false;
        _this.state = {
          cropSize: null,
          hasWheelJustStarted: false,
          mediaObjectFit: void 0
        };
        _this.initResizeObserver = function() {
          if (typeof window.ResizeObserver === "undefined" || !_this.containerRef) {
            return;
          }
          var isFirstResize = true;
          _this.resizeObserver = new window.ResizeObserver(function(entries) {
            if (isFirstResize) {
              isFirstResize = false;
              return;
            }
            _this.computeSizes();
          });
          _this.resizeObserver.observe(_this.containerRef);
        };
        _this.preventZoomSafari = function(e2) {
          return e2.preventDefault();
        };
        _this.cleanEvents = function() {
          if (!_this.currentDoc) return;
          _this.currentDoc.removeEventListener("mousemove", _this.onMouseMove);
          _this.currentDoc.removeEventListener("mouseup", _this.onDragStopped);
          _this.currentDoc.removeEventListener("touchmove", _this.onTouchMove);
          _this.currentDoc.removeEventListener("touchend", _this.onDragStopped);
          _this.currentDoc.removeEventListener("gesturechange", _this.onGestureChange);
          _this.currentDoc.removeEventListener("gestureend", _this.onGestureEnd);
          _this.currentDoc.removeEventListener("scroll", _this.onScroll);
        };
        _this.clearScrollEvent = function() {
          if (_this.containerRef) _this.containerRef.removeEventListener("wheel", _this.onWheel);
          if (_this.wheelTimer) {
            clearTimeout(_this.wheelTimer);
          }
        };
        _this.onMediaLoad = function() {
          var cropSize = _this.computeSizes();
          if (cropSize) {
            _this.previousCropSize = cropSize;
            _this.emitCropData();
            _this.setInitialCrop(cropSize);
            _this.isInitialized = true;
          }
          if (_this.props.onMediaLoaded) {
            _this.props.onMediaLoaded(_this.mediaSize);
          }
        };
        _this.setInitialCrop = function(cropSize) {
          if (_this.props.initialCroppedAreaPercentages) {
            var _a = getInitialCropFromCroppedAreaPercentages(_this.props.initialCroppedAreaPercentages, _this.mediaSize, _this.props.rotation, cropSize, _this.props.minZoom, _this.props.maxZoom), crop = _a.crop, zoom = _a.zoom;
            _this.props.onCropChange(crop);
            _this.props.onZoomChange && _this.props.onZoomChange(zoom);
          } else if (_this.props.initialCroppedAreaPixels) {
            var _b = getInitialCropFromCroppedAreaPixels(_this.props.initialCroppedAreaPixels, _this.mediaSize, _this.props.rotation, cropSize, _this.props.minZoom, _this.props.maxZoom), crop = _b.crop, zoom = _b.zoom;
            _this.props.onCropChange(crop);
            _this.props.onZoomChange && _this.props.onZoomChange(zoom);
          }
        };
        _this.computeSizes = function() {
          var _a, _b, _c, _d, _e, _f;
          var mediaRef = _this.imageRef.current || _this.videoRef.current;
          if (mediaRef && _this.containerRef) {
            _this.containerRect = _this.containerRef.getBoundingClientRect();
            _this.saveContainerPosition();
            var containerAspect = _this.containerRect.width / _this.containerRect.height;
            var naturalWidth = ((_a = _this.imageRef.current) === null || _a === void 0 ? void 0 : _a.naturalWidth) || ((_b = _this.videoRef.current) === null || _b === void 0 ? void 0 : _b.videoWidth) || 0;
            var naturalHeight = ((_c = _this.imageRef.current) === null || _c === void 0 ? void 0 : _c.naturalHeight) || ((_d = _this.videoRef.current) === null || _d === void 0 ? void 0 : _d.videoHeight) || 0;
            var isMediaScaledDown = mediaRef.offsetWidth < naturalWidth || mediaRef.offsetHeight < naturalHeight;
            var mediaAspect = naturalWidth / naturalHeight;
            var renderedMediaSize = void 0;
            if (isMediaScaledDown) {
              switch (_this.state.mediaObjectFit) {
                default:
                case "contain":
                  renderedMediaSize = containerAspect > mediaAspect ? {
                    width: _this.containerRect.height * mediaAspect,
                    height: _this.containerRect.height
                  } : {
                    width: _this.containerRect.width,
                    height: _this.containerRect.width / mediaAspect
                  };
                  break;
                case "horizontal-cover":
                  renderedMediaSize = {
                    width: _this.containerRect.width,
                    height: _this.containerRect.width / mediaAspect
                  };
                  break;
                case "vertical-cover":
                  renderedMediaSize = {
                    width: _this.containerRect.height * mediaAspect,
                    height: _this.containerRect.height
                  };
                  break;
              }
            } else {
              renderedMediaSize = {
                width: mediaRef.offsetWidth,
                height: mediaRef.offsetHeight
              };
            }
            _this.mediaSize = __assign(__assign({}, renderedMediaSize), {
              naturalWidth,
              naturalHeight
            });
            if (_this.props.setMediaSize) {
              _this.props.setMediaSize(_this.mediaSize);
            }
            var cropSize = _this.props.cropSize ? _this.props.cropSize : getCropSize(_this.mediaSize.width, _this.mediaSize.height, _this.containerRect.width, _this.containerRect.height, _this.props.aspect, _this.props.rotation);
            if (((_e = _this.state.cropSize) === null || _e === void 0 ? void 0 : _e.height) !== cropSize.height || ((_f = _this.state.cropSize) === null || _f === void 0 ? void 0 : _f.width) !== cropSize.width) {
              _this.props.onCropSizeChange && _this.props.onCropSizeChange(cropSize);
            }
            _this.setState({
              cropSize
            }, _this.recomputeCropPosition);
            if (_this.props.setCropSize) {
              _this.props.setCropSize(cropSize);
            }
            return cropSize;
          }
        };
        _this.saveContainerPosition = function() {
          if (_this.containerRef) {
            var bounds = _this.containerRef.getBoundingClientRect();
            _this.containerPosition = {
              x: bounds.left,
              y: bounds.top
            };
          }
        };
        _this.onMouseDown = function(e2) {
          if (!_this.currentDoc) return;
          e2.preventDefault();
          _this.currentDoc.addEventListener("mousemove", _this.onMouseMove);
          _this.currentDoc.addEventListener("mouseup", _this.onDragStopped);
          _this.saveContainerPosition();
          _this.onDragStart(Cropper2.getMousePoint(e2));
        };
        _this.onMouseMove = function(e2) {
          return _this.onDrag(Cropper2.getMousePoint(e2));
        };
        _this.onScroll = function(e2) {
          if (!_this.currentDoc) return;
          e2.preventDefault();
          _this.saveContainerPosition();
        };
        _this.onTouchStart = function(e2) {
          if (!_this.currentDoc) return;
          _this.isTouching = true;
          if (_this.props.onTouchRequest && !_this.props.onTouchRequest(e2)) {
            return;
          }
          _this.currentDoc.addEventListener("touchmove", _this.onTouchMove, {
            passive: false
          });
          _this.currentDoc.addEventListener("touchend", _this.onDragStopped);
          _this.saveContainerPosition();
          if (e2.touches.length === 2) {
            _this.onPinchStart(e2);
          } else if (e2.touches.length === 1) {
            _this.onDragStart(Cropper2.getTouchPoint(e2.touches[0]));
          }
        };
        _this.onTouchMove = function(e2) {
          e2.preventDefault();
          if (e2.touches.length === 2) {
            _this.onPinchMove(e2);
          } else if (e2.touches.length === 1) {
            _this.onDrag(Cropper2.getTouchPoint(e2.touches[0]));
          }
        };
        _this.onGestureStart = function(e2) {
          if (!_this.currentDoc) return;
          e2.preventDefault();
          _this.currentDoc.addEventListener("gesturechange", _this.onGestureChange);
          _this.currentDoc.addEventListener("gestureend", _this.onGestureEnd);
          _this.gestureZoomStart = _this.props.zoom;
          _this.gestureRotationStart = _this.props.rotation;
        };
        _this.onGestureChange = function(e2) {
          e2.preventDefault();
          if (_this.isTouching) {
            return;
          }
          var point = Cropper2.getMousePoint(e2);
          var newZoom = _this.gestureZoomStart - 1 + e2.scale;
          _this.setNewZoom(newZoom, point, {
            shouldUpdatePosition: true
          });
          if (_this.props.onRotationChange) {
            var newRotation = _this.gestureRotationStart + e2.rotation;
            _this.props.onRotationChange(newRotation);
          }
        };
        _this.onGestureEnd = function(e2) {
          _this.cleanEvents();
        };
        _this.onDragStart = function(_a) {
          var _b, _c;
          var x2 = _a.x, y2 = _a.y;
          _this.dragStartPosition = {
            x: x2,
            y: y2
          };
          _this.dragStartCrop = __assign({}, _this.props.crop);
          (_c = (_b = _this.props).onInteractionStart) === null || _c === void 0 ? void 0 : _c.call(_b);
        };
        _this.onDrag = function(_a) {
          var x2 = _a.x, y2 = _a.y;
          if (!_this.currentWindow) return;
          if (_this.rafDragTimeout) _this.currentWindow.cancelAnimationFrame(_this.rafDragTimeout);
          _this.rafDragTimeout = _this.currentWindow.requestAnimationFrame(function() {
            if (!_this.state.cropSize) return;
            if (x2 === void 0 || y2 === void 0) return;
            var offsetX = x2 - _this.dragStartPosition.x;
            var offsetY = y2 - _this.dragStartPosition.y;
            var requestedPosition = {
              x: _this.dragStartCrop.x + offsetX,
              y: _this.dragStartCrop.y + offsetY
            };
            var newPosition = _this.props.restrictPosition ? restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : requestedPosition;
            _this.props.onCropChange(newPosition);
          });
        };
        _this.onDragStopped = function() {
          var _a, _b;
          _this.isTouching = false;
          _this.cleanEvents();
          _this.emitCropData();
          (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);
        };
        _this.onWheel = function(e2) {
          if (!_this.currentWindow) return;
          if (_this.props.onWheelRequest && !_this.props.onWheelRequest(e2)) {
            return;
          }
          e2.preventDefault();
          var point = Cropper2.getMousePoint(e2);
          var pixelY = (0, import_normalize_wheel.default)(e2).pixelY;
          var newZoom = _this.props.zoom - pixelY * _this.props.zoomSpeed / 200;
          _this.setNewZoom(newZoom, point, {
            shouldUpdatePosition: true
          });
          if (!_this.state.hasWheelJustStarted) {
            _this.setState({
              hasWheelJustStarted: true
            }, function() {
              var _a, _b;
              return (_b = (_a = _this.props).onInteractionStart) === null || _b === void 0 ? void 0 : _b.call(_a);
            });
          }
          if (_this.wheelTimer) {
            clearTimeout(_this.wheelTimer);
          }
          _this.wheelTimer = _this.currentWindow.setTimeout(function() {
            return _this.setState({
              hasWheelJustStarted: false
            }, function() {
              var _a, _b;
              return (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);
            });
          }, 250);
        };
        _this.getPointOnContainer = function(_a, containerTopLeft) {
          var x2 = _a.x, y2 = _a.y;
          if (!_this.containerRect) {
            throw new Error("The Cropper is not mounted");
          }
          return {
            x: _this.containerRect.width / 2 - (x2 - containerTopLeft.x),
            y: _this.containerRect.height / 2 - (y2 - containerTopLeft.y)
          };
        };
        _this.getPointOnMedia = function(_a) {
          var x2 = _a.x, y2 = _a.y;
          var _b = _this.props, crop = _b.crop, zoom = _b.zoom;
          return {
            x: (x2 + crop.x) / zoom,
            y: (y2 + crop.y) / zoom
          };
        };
        _this.setNewZoom = function(zoom, point, _a) {
          var _b = _a === void 0 ? {} : _a, _c = _b.shouldUpdatePosition, shouldUpdatePosition = _c === void 0 ? true : _c;
          if (!_this.state.cropSize || !_this.props.onZoomChange) return;
          var newZoom = clamp(zoom, _this.props.minZoom, _this.props.maxZoom);
          if (shouldUpdatePosition) {
            var zoomPoint = _this.getPointOnContainer(point, _this.containerPosition);
            var zoomTarget = _this.getPointOnMedia(zoomPoint);
            var requestedPosition = {
              x: zoomTarget.x * newZoom - zoomPoint.x,
              y: zoomTarget.y * newZoom - zoomPoint.y
            };
            var newPosition = _this.props.restrictPosition ? restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, newZoom, _this.props.rotation) : requestedPosition;
            _this.props.onCropChange(newPosition);
          }
          _this.props.onZoomChange(newZoom);
        };
        _this.getCropData = function() {
          if (!_this.state.cropSize) {
            return null;
          }
          var restrictedPosition = _this.props.restrictPosition ? restrictPosition(_this.props.crop, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : _this.props.crop;
          return computeCroppedArea(restrictedPosition, _this.mediaSize, _this.state.cropSize, _this.getAspect(), _this.props.zoom, _this.props.rotation, _this.props.restrictPosition);
        };
        _this.emitCropData = function() {
          var cropData = _this.getCropData();
          if (!cropData) return;
          var croppedAreaPercentages = cropData.croppedAreaPercentages, croppedAreaPixels = cropData.croppedAreaPixels;
          if (_this.props.onCropComplete) {
            _this.props.onCropComplete(croppedAreaPercentages, croppedAreaPixels);
          }
          if (_this.props.onCropAreaChange) {
            _this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels);
          }
        };
        _this.emitCropAreaChange = function() {
          var cropData = _this.getCropData();
          if (!cropData) return;
          var croppedAreaPercentages = cropData.croppedAreaPercentages, croppedAreaPixels = cropData.croppedAreaPixels;
          if (_this.props.onCropAreaChange) {
            _this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels);
          }
        };
        _this.recomputeCropPosition = function() {
          if (!_this.state.cropSize) return;
          var adjustedCrop = _this.props.crop;
          if (_this.isInitialized && _this.previousCropSize) {
            var sizeChanged = Math.abs(_this.previousCropSize.width - _this.state.cropSize.width) > 1e-6 || Math.abs(_this.previousCropSize.height - _this.state.cropSize.height) > 1e-6;
            if (sizeChanged) {
              var scaleX = _this.state.cropSize.width / _this.previousCropSize.width;
              var scaleY = _this.state.cropSize.height / _this.previousCropSize.height;
              adjustedCrop = {
                x: _this.props.crop.x * scaleX,
                y: _this.props.crop.y * scaleY
              };
            }
          }
          var newPosition = _this.props.restrictPosition ? restrictPosition(adjustedCrop, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : adjustedCrop;
          _this.previousCropSize = _this.state.cropSize;
          _this.props.onCropChange(newPosition);
          _this.emitCropData();
        };
        _this.onKeyDown = function(event) {
          var _a, _b;
          var _c = _this.props, crop = _c.crop, onCropChange = _c.onCropChange, keyboardStep = _c.keyboardStep, zoom = _c.zoom, rotation = _c.rotation;
          var step = keyboardStep;
          if (!_this.state.cropSize) return;
          if (event.shiftKey) {
            step *= 0.2;
          }
          var newCrop = __assign({}, crop);
          switch (event.key) {
            case "ArrowUp":
              newCrop.y -= step;
              event.preventDefault();
              break;
            case "ArrowDown":
              newCrop.y += step;
              event.preventDefault();
              break;
            case "ArrowLeft":
              newCrop.x -= step;
              event.preventDefault();
              break;
            case "ArrowRight":
              newCrop.x += step;
              event.preventDefault();
              break;
            default:
              return;
          }
          if (_this.props.restrictPosition) {
            newCrop = restrictPosition(newCrop, _this.mediaSize, _this.state.cropSize, zoom, rotation);
          }
          if (!event.repeat) {
            (_b = (_a = _this.props).onInteractionStart) === null || _b === void 0 ? void 0 : _b.call(_a);
          }
          onCropChange(newCrop);
        };
        _this.onKeyUp = function(event) {
          var _a, _b;
          switch (event.key) {
            case "ArrowUp":
            case "ArrowDown":
            case "ArrowLeft":
            case "ArrowRight":
              event.preventDefault();
              break;
            default:
              return;
          }
          _this.emitCropData();
          (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);
        };
        return _this;
      }
      Cropper2.prototype.componentDidMount = function() {
        if (!this.currentDoc || !this.currentWindow) return;
        if (this.containerRef) {
          if (this.containerRef.ownerDocument) {
            this.currentDoc = this.containerRef.ownerDocument;
          }
          if (this.currentDoc.defaultView) {
            this.currentWindow = this.currentDoc.defaultView;
          }
          this.initResizeObserver();
          if (typeof window.ResizeObserver === "undefined") {
            this.currentWindow.addEventListener("resize", this.computeSizes);
          }
          this.props.zoomWithScroll && this.containerRef.addEventListener("wheel", this.onWheel, {
            passive: false
          });
          this.containerRef.addEventListener("gesturestart", this.onGestureStart);
        }
        this.currentDoc.addEventListener("scroll", this.onScroll);
        if (!this.props.disableAutomaticStylesInjection) {
          this.styleRef = this.currentDoc.createElement("style");
          this.styleRef.setAttribute("type", "text/css");
          if (this.props.nonce) {
            this.styleRef.setAttribute("nonce", this.props.nonce);
          }
          this.styleRef.innerHTML = css_248z;
          this.currentDoc.head.appendChild(this.styleRef);
        }
        if (this.imageRef.current && this.imageRef.current.complete) {
          this.onMediaLoad();
        }
        if (this.props.setImageRef) {
          this.props.setImageRef(this.imageRef);
        }
        if (this.props.setVideoRef) {
          this.props.setVideoRef(this.videoRef);
        }
        if (this.props.setCropperRef) {
          this.props.setCropperRef(this.cropperRef);
        }
      };
      Cropper2.prototype.componentWillUnmount = function() {
        var _a, _b;
        if (!this.currentDoc || !this.currentWindow) return;
        if (typeof window.ResizeObserver === "undefined") {
          this.currentWindow.removeEventListener("resize", this.computeSizes);
        }
        (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
        if (this.containerRef) {
          this.containerRef.removeEventListener("gesturestart", this.preventZoomSafari);
        }
        if (this.styleRef) {
          (_b = this.styleRef.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(this.styleRef);
        }
        this.cleanEvents();
        this.props.zoomWithScroll && this.clearScrollEvent();
      };
      Cropper2.prototype.componentDidUpdate = function(prevProps) {
        var _a, _b, _c, _d, _e, _f, _g, _h, _j;
        if (prevProps.rotation !== this.props.rotation) {
          this.computeSizes();
          this.recomputeCropPosition();
        } else if (prevProps.aspect !== this.props.aspect) {
          this.computeSizes();
        } else if (prevProps.objectFit !== this.props.objectFit) {
          this.computeSizes();
        } else if (prevProps.zoom !== this.props.zoom) {
          this.recomputeCropPosition();
        } else if (((_a = prevProps.cropSize) === null || _a === void 0 ? void 0 : _a.height) !== ((_b = this.props.cropSize) === null || _b === void 0 ? void 0 : _b.height) || ((_c = prevProps.cropSize) === null || _c === void 0 ? void 0 : _c.width) !== ((_d = this.props.cropSize) === null || _d === void 0 ? void 0 : _d.width)) {
          this.computeSizes();
        } else if (((_e = prevProps.crop) === null || _e === void 0 ? void 0 : _e.x) !== ((_f = this.props.crop) === null || _f === void 0 ? void 0 : _f.x) || ((_g = prevProps.crop) === null || _g === void 0 ? void 0 : _g.y) !== ((_h = this.props.crop) === null || _h === void 0 ? void 0 : _h.y)) {
          this.emitCropAreaChange();
        }
        if (prevProps.zoomWithScroll !== this.props.zoomWithScroll && this.containerRef) {
          this.props.zoomWithScroll ? this.containerRef.addEventListener("wheel", this.onWheel, {
            passive: false
          }) : this.clearScrollEvent();
        }
        if (prevProps.video !== this.props.video) {
          (_j = this.videoRef.current) === null || _j === void 0 ? void 0 : _j.load();
        }
        var objectFit = this.getObjectFit();
        if (objectFit !== this.state.mediaObjectFit) {
          this.setState({
            mediaObjectFit: objectFit
          }, this.computeSizes);
        }
      };
      Cropper2.prototype.getAspect = function() {
        var _a = this.props, cropSize = _a.cropSize, aspect = _a.aspect;
        if (cropSize) {
          return cropSize.width / cropSize.height;
        }
        return aspect;
      };
      Cropper2.prototype.getObjectFit = function() {
        var _a, _b, _c, _d;
        if (this.props.objectFit === "cover") {
          var mediaRef = this.imageRef.current || this.videoRef.current;
          if (mediaRef && this.containerRef) {
            this.containerRect = this.containerRef.getBoundingClientRect();
            var containerAspect = this.containerRect.width / this.containerRect.height;
            var naturalWidth = ((_a = this.imageRef.current) === null || _a === void 0 ? void 0 : _a.naturalWidth) || ((_b = this.videoRef.current) === null || _b === void 0 ? void 0 : _b.videoWidth) || 0;
            var naturalHeight = ((_c = this.imageRef.current) === null || _c === void 0 ? void 0 : _c.naturalHeight) || ((_d = this.videoRef.current) === null || _d === void 0 ? void 0 : _d.videoHeight) || 0;
            var mediaAspect = naturalWidth / naturalHeight;
            return mediaAspect < containerAspect ? "horizontal-cover" : "vertical-cover";
          }
          return "horizontal-cover";
        }
        return this.props.objectFit;
      };
      Cropper2.prototype.onPinchStart = function(e2) {
        var pointA = Cropper2.getTouchPoint(e2.touches[0]);
        var pointB = Cropper2.getTouchPoint(e2.touches[1]);
        this.lastPinchDistance = getDistanceBetweenPoints(pointA, pointB);
        this.lastPinchRotation = getRotationBetweenPoints(pointA, pointB);
        this.onDragStart(getCenter(pointA, pointB));
      };
      Cropper2.prototype.onPinchMove = function(e2) {
        var _this = this;
        if (!this.currentDoc || !this.currentWindow) return;
        var pointA = Cropper2.getTouchPoint(e2.touches[0]);
        var pointB = Cropper2.getTouchPoint(e2.touches[1]);
        var center = getCenter(pointA, pointB);
        this.onDrag(center);
        if (this.rafPinchTimeout) this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout);
        this.rafPinchTimeout = this.currentWindow.requestAnimationFrame(function() {
          var distance = getDistanceBetweenPoints(pointA, pointB);
          var newZoom = _this.props.zoom * (distance / _this.lastPinchDistance);
          _this.setNewZoom(newZoom, center, {
            shouldUpdatePosition: false
          });
          _this.lastPinchDistance = distance;
          var rotation = getRotationBetweenPoints(pointA, pointB);
          var newRotation = _this.props.rotation + (rotation - _this.lastPinchRotation);
          _this.props.onRotationChange && _this.props.onRotationChange(newRotation);
          _this.lastPinchRotation = rotation;
        });
      };
      Cropper2.prototype.render = function() {
        var _this = this;
        var _a;
        var _b = this.props, image = _b.image, video = _b.video, mediaProps = _b.mediaProps, cropperProps = _b.cropperProps, transform = _b.transform, _c = _b.crop, x2 = _c.x, y2 = _c.y, rotation = _b.rotation, zoom = _b.zoom, cropShape = _b.cropShape, showGrid = _b.showGrid, roundCropAreaPixels = _b.roundCropAreaPixels, _d = _b.style, containerStyle = _d.containerStyle, cropAreaStyle = _d.cropAreaStyle, mediaStyle = _d.mediaStyle, _e = _b.classes, containerClassName = _e.containerClassName, cropAreaClassName = _e.cropAreaClassName, mediaClassName = _e.mediaClassName;
        var objectFit = (_a = this.state.mediaObjectFit) !== null && _a !== void 0 ? _a : this.getObjectFit();
        return React3.createElement("div", {
          onMouseDown: this.onMouseDown,
          onTouchStart: this.onTouchStart,
          ref: function ref(el) {
            return _this.containerRef = el;
          },
          "data-testid": "container",
          style: containerStyle,
          className: classNames("reactEasyCrop_Container", containerClassName)
        }, image ? React3.createElement("img", __assign({
          alt: "",
          className: classNames("reactEasyCrop_Image", objectFit === "contain" && "reactEasyCrop_Contain", objectFit === "horizontal-cover" && "reactEasyCrop_Cover_Horizontal", objectFit === "vertical-cover" && "reactEasyCrop_Cover_Vertical", mediaClassName)
        }, mediaProps, {
          src: image,
          ref: this.imageRef,
          style: __assign(__assign({}, mediaStyle), {
            transform: transform || "translate(".concat(x2, "px, ").concat(y2, "px) rotate(").concat(rotation, "deg) scale(").concat(zoom, ")")
          }),
          onLoad: this.onMediaLoad
        })) : video && React3.createElement("video", __assign({
          autoPlay: true,
          playsInline: true,
          loop: true,
          muted: true,
          className: classNames("reactEasyCrop_Video", objectFit === "contain" && "reactEasyCrop_Contain", objectFit === "horizontal-cover" && "reactEasyCrop_Cover_Horizontal", objectFit === "vertical-cover" && "reactEasyCrop_Cover_Vertical", mediaClassName)
        }, mediaProps, {
          ref: this.videoRef,
          onLoadedMetadata: this.onMediaLoad,
          style: __assign(__assign({}, mediaStyle), {
            transform: transform || "translate(".concat(x2, "px, ").concat(y2, "px) rotate(").concat(rotation, "deg) scale(").concat(zoom, ")")
          }),
          controls: false
        }), (Array.isArray(video) ? video : [{
          src: video
        }]).map(function(item) {
          return React3.createElement("source", __assign({
            key: item.src
          }, item));
        })), this.state.cropSize && React3.createElement("div", __assign({
          ref: this.cropperRef,
          style: __assign(__assign({}, cropAreaStyle), {
            width: roundCropAreaPixels ? Math.round(this.state.cropSize.width) : this.state.cropSize.width,
            height: roundCropAreaPixels ? Math.round(this.state.cropSize.height) : this.state.cropSize.height
          }),
          tabIndex: 0,
          onKeyDown: this.onKeyDown,
          onKeyUp: this.onKeyUp,
          "data-testid": "cropper",
          className: classNames("reactEasyCrop_CropArea", cropShape === "round" && "reactEasyCrop_CropAreaRound", showGrid && "reactEasyCrop_CropAreaGrid", cropAreaClassName)
        }, cropperProps)));
      };
      Cropper2.defaultProps = {
        zoom: 1,
        rotation: 0,
        aspect: 4 / 3,
        maxZoom: MAX_ZOOM,
        minZoom: MIN_ZOOM,
        cropShape: "rect",
        objectFit: "contain",
        showGrid: true,
        style: {},
        classes: {},
        mediaProps: {},
        cropperProps: {},
        zoomSpeed: 1,
        restrictPosition: true,
        zoomWithScroll: true,
        keyboardStep: KEYBOARD_STEP
      };
      Cropper2.getMousePoint = function(e2) {
        return {
          x: Number(e2.clientX),
          y: Number(e2.clientY)
        };
      };
      Cropper2.getTouchPoint = function(touch) {
        return {
          x: Number(touch.clientX),
          y: Number(touch.clientY)
        };
      };
      return Cropper2;
    })(React3.Component)
  );

  // packages/image-cropper/build-module/components/image-cropper/index.mjs
  var import_element159 = __toESM(require_element(), 1);

  // packages/image-cropper/build-module/provider/index.mjs
  var import_element158 = __toESM(require_element(), 1);

  // node_modules/dequal/dist/index.mjs
  var has = Object.prototype.hasOwnProperty;
  function find(iter, tar, key) {
    for (key of iter.keys()) {
      if (dequal(key, tar)) return key;
    }
  }
  function dequal(foo, bar) {
    var ctor, len, tmp;
    if (foo === bar) return true;
    if (foo && bar && (ctor = foo.constructor) === bar.constructor) {
      if (ctor === Date) return foo.getTime() === bar.getTime();
      if (ctor === RegExp) return foo.toString() === bar.toString();
      if (ctor === Array) {
        if ((len = foo.length) === bar.length) {
          while (len-- && dequal(foo[len], bar[len])) ;
        }
        return len === -1;
      }
      if (ctor === Set) {
        if (foo.size !== bar.size) {
          return false;
        }
        for (len of foo) {
          tmp = len;
          if (tmp && typeof tmp === "object") {
            tmp = find(bar, tmp);
            if (!tmp) return false;
          }
          if (!bar.has(tmp)) return false;
        }
        return true;
      }
      if (ctor === Map) {
        if (foo.size !== bar.size) {
          return false;
        }
        for (len of foo) {
          tmp = len[0];
          if (tmp && typeof tmp === "object") {
            tmp = find(bar, tmp);
            if (!tmp) return false;
          }
          if (!dequal(len[1], bar.get(tmp))) {
            return false;
          }
        }
        return true;
      }
      if (ctor === ArrayBuffer) {
        foo = new Uint8Array(foo);
        bar = new Uint8Array(bar);
      } else if (ctor === DataView) {
        if ((len = foo.byteLength) === bar.byteLength) {
          while (len-- && foo.getInt8(len) === bar.getInt8(len)) ;
        }
        return len === -1;
      }
      if (ArrayBuffer.isView(foo)) {
        if ((len = foo.byteLength) === bar.byteLength) {
          while (len-- && foo[len] === bar[len]) ;
        }
        return len === -1;
      }
      if (!ctor || typeof foo === "object") {
        len = 0;
        for (ctor in foo) {
          if (has.call(foo, ctor) && ++len && !has.call(bar, ctor)) return false;
          if (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return false;
        }
        return Object.keys(bar).length === len;
      }
    }
    return foo !== foo && bar !== bar;
  }

  // packages/image-cropper/build-module/provider/use-image-cropper.mjs
  var import_element157 = __toESM(require_element(), 1);

  // packages/image-cropper/build-module/constants.mjs
  var MIN_ZOOM2 = 1;
  var MAX_ZOOM2 = 5;

  // packages/image-cropper/build-module/utils.mjs
  var normalizeRotation = (rotation) => {
    if (rotation >= 0) {
      return rotation % 360;
    }
    return (360 + rotation % 360) % 360;
  };
  var createImage = (url) => new Promise((resolve, reject) => {
    const image = new Image();
    image.addEventListener("load", () => resolve(image));
    image.addEventListener("error", (error) => reject(error));
    image.setAttribute("crossOrigin", "anonymous");
    image.src = url;
  });
  function getRadianAngle2(degreeValue) {
    return degreeValue * Math.PI / 180;
  }
  function rotateSize2(width, height, rotation) {
    const rotRad = getRadianAngle2(rotation);
    return {
      width: Math.abs(Math.cos(rotRad) * width) + Math.abs(Math.sin(rotRad) * height),
      height: Math.abs(Math.sin(rotRad) * width) + Math.abs(Math.cos(rotRad) * height)
    };
  }
  async function getCroppedImage(imageSrc, pixelCrop, rotation = 0, flip = { horizontal: false, vertical: false }) {
    try {
      const image = await createImage(imageSrc);
      const canvas = document.createElement("canvas");
      const ctx2 = canvas.getContext("2d");
      if (!ctx2) {
        return null;
      }
      const rotRad = getRadianAngle2(rotation);
      const { width: boundingBoxWidth, height: boundingBoxHeight } = rotateSize2(image.width, image.height, rotation);
      canvas.width = boundingBoxWidth;
      canvas.height = boundingBoxHeight;
      ctx2.translate(boundingBoxWidth / 2, boundingBoxHeight / 2);
      ctx2.rotate(rotRad);
      ctx2.scale(flip.horizontal ? -1 : 1, flip.vertical ? -1 : 1);
      ctx2.translate(-image.width / 2, -image.height / 2);
      ctx2.drawImage(image, 0, 0);
      const croppedCanvas = document.createElement("canvas");
      const croppedCtx = croppedCanvas.getContext("2d");
      if (!croppedCtx) {
        return null;
      }
      croppedCanvas.width = pixelCrop.width;
      croppedCanvas.height = pixelCrop.height;
      croppedCtx.drawImage(
        canvas,
        pixelCrop.x,
        pixelCrop.y,
        pixelCrop.width,
        pixelCrop.height,
        0,
        0,
        pixelCrop.width,
        pixelCrop.height
      );
      return new Promise((resolve) => {
        croppedCanvas.toBlob((file) => {
          if (file) {
            resolve(URL.createObjectURL(file));
          }
        }, "image/jpeg");
      });
    } catch {
      return null;
    }
  }

  // packages/image-cropper/build-module/provider/use-image-cropper.mjs
  var DEFAULT_INITIAL_STATE = {
    crop: {
      x: 0,
      y: 0,
      width: 100,
      height: 100
    },
    zoom: MIN_ZOOM2,
    rotation: 0,
    aspectRatio: 1,
    flip: {
      horizontal: false,
      vertical: false
    }
  };
  var DEFAULT_CROP_MEDIA_POSITION = {
    x: 0,
    y: 0
  };
  var DEFAULT_CROPPER_STATE = {
    crop: DEFAULT_CROP_MEDIA_POSITION,
    croppedArea: DEFAULT_INITIAL_STATE.crop,
    croppedAreaPixels: null,
    zoom: DEFAULT_INITIAL_STATE.zoom,
    rotation: DEFAULT_INITIAL_STATE.rotation,
    flip: DEFAULT_INITIAL_STATE.flip,
    aspectRatio: DEFAULT_INITIAL_STATE.aspectRatio,
    mediaSize: null
  };
  function useCropper() {
    const [cropperState, setInternalCropperState] = (0, import_element157.useState)(
      DEFAULT_CROPPER_STATE
    );
    const [resetState, setInternalResetState] = (0, import_element157.useState)(null);
    const setCropperState = (0, import_element157.useCallback)(
      (newState) => {
        setInternalCropperState((prev) => {
          const updates = typeof newState === "function" ? newState(prev) : newState;
          const normalizedUpdates = { ...updates };
          if ("rotation" in normalizedUpdates && normalizedUpdates.rotation !== void 0) {
            normalizedUpdates.rotation = normalizeRotation(
              normalizedUpdates.rotation
            );
          }
          return { ...prev, ...normalizedUpdates };
        });
      },
      []
    );
    const setResetState = (0, import_element157.useCallback)(
      (newResetState = null) => {
        if (!newResetState) {
          setInternalResetState(null);
          setCropperState(DEFAULT_CROPPER_STATE);
          return;
        }
        if (typeof newResetState === "object") {
          const initialState = {
            ...DEFAULT_INITIAL_STATE,
            ...newResetState
          };
          setInternalResetState(initialState);
          setCropperState(initialState);
        }
      },
      [setCropperState, setInternalResetState]
    );
    const reset = (0, import_element157.useCallback)(() => {
      if (resetState) {
        const resetUpdates = {
          // Reset media position to center
          crop: { x: 0, y: 0 },
          // Reset cropped area pixels (will be recalculated)
          croppedAreaPixels: null
        };
        if (resetState.crop) {
          resetUpdates.croppedArea = resetState.crop;
        }
        if (resetState.zoom !== void 0) {
          resetUpdates.zoom = resetState.zoom;
        }
        if (resetState.rotation !== void 0) {
          resetUpdates.rotation = resetState.rotation;
        }
        if (resetState.aspectRatio !== void 0) {
          resetUpdates.aspectRatio = resetState.aspectRatio;
        }
        if (resetState.flip !== void 0) {
          resetUpdates.flip = resetState.flip;
        }
        setCropperState(resetUpdates);
      } else {
        setCropperState({ ...DEFAULT_CROPPER_STATE });
      }
    }, [resetState, setCropperState]);
    const isDirty = (0, import_element157.useMemo)(() => {
      if (resetState) {
        const currentState2 = {
          crop: cropperState.croppedAreaPixels || cropperState.croppedArea,
          zoom: cropperState.zoom,
          rotation: normalizeRotation(cropperState.rotation),
          aspectRatio: cropperState.aspectRatio,
          flip: cropperState.flip
        };
        return false === dequal(currentState2, resetState);
      }
      const currentState = {
        crop: cropperState.croppedArea,
        zoom: cropperState.zoom,
        rotation: normalizeRotation(cropperState.rotation),
        aspectRatio: cropperState.aspectRatio,
        flip: cropperState.flip
      };
      return false === dequal(currentState, DEFAULT_INITIAL_STATE);
    }, [cropperState, resetState]);
    const getCroppedImage2 = (0, import_element157.useCallback)(
      async (src) => {
        if (!cropperState.croppedAreaPixels) {
          return null;
        }
        return getCroppedImage(
          src,
          cropperState.croppedAreaPixels,
          cropperState.rotation,
          cropperState.flip
        );
      },
      [
        cropperState.croppedAreaPixels,
        cropperState.rotation,
        cropperState.flip
      ]
    );
    return (0, import_element157.useMemo)(
      () => ({
        cropperState,
        setCropperState,
        resetState,
        setResetState,
        isDirty,
        reset,
        getCroppedImage: getCroppedImage2
      }),
      [
        cropperState,
        setCropperState,
        resetState,
        setResetState,
        isDirty,
        reset,
        getCroppedImage2
      ]
    );
  }

  // packages/image-cropper/build-module/provider/index.mjs
  var import_jsx_runtime302 = __toESM(require_jsx_runtime(), 1);
  var ImageCropperContext = (0, import_element158.createContext)({
    cropperState: {
      crop: { x: 0, y: 0 },
      croppedArea: { x: 0, y: 0, width: 100, height: 100 },
      croppedAreaPixels: null,
      zoom: MIN_ZOOM2,
      rotation: 0,
      aspectRatio: 1,
      flip: { horizontal: false, vertical: false },
      mediaSize: null
    },
    setCropperState: () => {
    },
    resetState: null,
    setResetState: () => {
    },
    isDirty: false,
    reset: () => {
    },
    getCroppedImage: () => Promise.resolve(null)
  });
  function ImageCropperProvider({
    children
  }) {
    const cropperApi = useCropper();
    const contextValue = (0, import_element158.useMemo)(() => {
      return {
        ...cropperApi
      };
    }, [cropperApi]);
    return /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(ImageCropperContext.Provider, { value: contextValue, children });
  }
  var useImageCropper = () => {
    const context = (0, import_element158.useContext)(ImageCropperContext);
    if (!context) {
      throw new Error("Missing ImageCropperContext");
    }
    return context;
  };

  // packages/image-cropper/build-module/components/image-cropper/index.mjs
  var import_jsx_runtime303 = __toESM(require_jsx_runtime(), 1);
  function ImageCropper({
    src,
    onLoad,
    minZoom = MIN_ZOOM2,
    maxZoom = MAX_ZOOM2,
    ...props
  }) {
    const { cropperState, setCropperState } = useImageCropper();
    const { crop, zoom, rotation, aspectRatio, flip } = cropperState;
    const setCrop = (newCrop) => setCropperState({ crop: newCrop });
    const setZoom = (newZoom) => setCropperState({ zoom: newZoom });
    const setRotation = (newRotation) => setCropperState({ rotation: newRotation });
    const setMediaSize = (newMediaSize) => setCropperState({ mediaSize: newMediaSize });
    const onCropComplete = (0, import_element159.useCallback)(
      (areaPercentage, areaPixels) => {
        setCropperState({
          croppedArea: areaPercentage,
          croppedAreaPixels: areaPixels
        });
      },
      [setCropperState]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
      Cropper,
      {
        classes: {
          containerClassName: "image-cropper__container",
          cropAreaClassName: "image-cropper__crop-area",
          mediaClassName: "image-cropper__image"
        },
        minZoom,
        maxZoom,
        rotation,
        image: src,
        setMediaSize,
        crop,
        zoom,
        aspect: aspectRatio,
        onCropChange: setCrop,
        onZoomChange: setZoom,
        onCropComplete,
        onMediaLoaded: (loadedMediaSize) => {
          onLoad?.(loadedMediaSize);
        },
        onRotationChange: setRotation,
        transform: [
          `translate(${crop.x}px, ${crop.y}px)`,
          `rotateZ(${rotation}deg)`,
          `rotateY(${flip.horizontal ? 180 : 0}deg)`,
          `rotateX(${flip.vertical ? 180 : 0}deg)`,
          `scale(${zoom})`
        ].join(" "),
        ...props
      }
    );
  }

  // packages/block-editor/build-module/components/image-editor/aspect-ratio-dropdown.mjs
  var import_components155 = __toESM(require_components(), 1);
  var import_i18n142 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/components/image-editor/constants.mjs
  var MIN_ZOOM3 = 100;
  var MAX_ZOOM3 = 300;
  var POPOVER_PROPS7 = {
    placement: "bottom-start"
  };

  // packages/block-editor/build-module/components/image-editor/context.mjs
  var import_element162 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/image-editor/use-save-image.mjs
  var import_data142 = __toESM(require_data(), 1);
  var import_element160 = __toESM(require_element(), 1);
  var import_i18n141 = __toESM(require_i18n(), 1);
  var import_notices8 = __toESM(require_notices(), 1);
  var import_dom33 = __toESM(require_dom(), 1);
  var messages = {
    crop: (0, import_i18n141.__)("Image cropped."),
    rotate: (0, import_i18n141.__)("Image rotated."),
    cropAndRotate: (0, import_i18n141.__)("Image cropped and rotated.")
  };
  function useSaveImage({
    crop,
    rotation,
    url,
    id,
    onSaveImage,
    onFinishEditing
  }) {
    const { createErrorNotice, createSuccessNotice } = (0, import_data142.useDispatch)(import_notices8.store);
    const [isInProgress, setIsInProgress] = (0, import_element160.useState)(false);
    const { editMediaEntity } = (0, import_data142.useSelect)((select3) => {
      const settings2 = select3(store).getSettings();
      return {
        editMediaEntity: settings2?.[mediaEditKey]
      };
    }, []);
    const cancel = (0, import_element160.useCallback)(() => {
      setIsInProgress(false);
      onFinishEditing();
    }, [onFinishEditing]);
    const apply = (0, import_element160.useCallback)(async () => {
      if (!editMediaEntity) {
        onFinishEditing();
        createErrorNotice(
          (0, import_i18n141.__)("Sorry, you are not allowed to edit images on this site."),
          {
            id: "image-editing-error",
            type: "snackbar"
          }
        );
        return;
      }
      setIsInProgress(true);
      const modifiers = [];
      if (rotation > 0) {
        modifiers.push({
          type: "rotate",
          args: {
            angle: rotation
          }
        });
      }
      if (crop.width < 99.9 || crop.height < 99.9) {
        modifiers.push({
          type: "crop",
          args: {
            left: crop.x,
            top: crop.y,
            width: crop.width,
            height: crop.height
          }
        });
      }
      if (modifiers.length === 0) {
        setIsInProgress(false);
        onFinishEditing();
        return;
      }
      const modifierType = modifiers.length === 1 ? modifiers[0].type : "cropAndRotate";
      try {
        const savedImage = await editMediaEntity(
          id,
          {
            src: url,
            modifiers
          },
          { throwOnError: true }
        );
        if (savedImage) {
          onSaveImage({
            id: savedImage.id,
            url: savedImage.source_url
          });
          createSuccessNotice(messages[modifierType], {
            type: "snackbar",
            actions: [
              {
                label: (0, import_i18n141.__)("Undo"),
                onClick: () => {
                  onSaveImage({
                    id,
                    url
                  });
                }
              }
            ]
          });
        }
      } catch (error) {
        createErrorNotice(
          (0, import_i18n141.sprintf)(
            /* translators: %s: Error message. */
            (0, import_i18n141.__)("Could not edit image. %s"),
            (0, import_dom33.__unstableStripHTML)(error.message)
          ),
          {
            id: "image-editing-error",
            type: "snackbar"
          }
        );
      } finally {
        setIsInProgress(false);
        onFinishEditing();
      }
    }, [
      crop,
      rotation,
      id,
      url,
      onSaveImage,
      createErrorNotice,
      createSuccessNotice,
      onFinishEditing,
      editMediaEntity
    ]);
    return (0, import_element160.useMemo)(
      () => ({
        isInProgress,
        apply,
        cancel
      }),
      [isInProgress, apply, cancel]
    );
  }

  // packages/block-editor/build-module/components/image-editor/use-transform-image.mjs
  var import_element161 = __toESM(require_element(), 1);
  var import_hooks6 = __toESM(require_hooks(), 1);
  function useTransformImage({
    url,
    naturalWidth,
    naturalHeight
  }) {
    const [editedUrl, setEditedUrl] = (0, import_element161.useState)();
    const { cropperState, setCropperState } = useImageCropper();
    const { zoom, aspectRatio, crop, croppedArea } = cropperState;
    const setZoom = (0, import_element161.useCallback)(
      (newZoom) => {
        setCropperState({ zoom: newZoom });
      },
      [setCropperState]
    );
    const setAspectRatio = (0, import_element161.useCallback)(
      (newAspect) => {
        setCropperState({ aspectRatio: newAspect });
      },
      [setCropperState]
    );
    const defaultAspect = naturalWidth / naturalHeight;
    const rotatedAspect = naturalHeight / naturalWidth;
    (0, import_element161.useEffect)(() => {
      setAspectRatio(defaultAspect);
    }, []);
    const [internalRotation, setInternalRotation] = (0, import_element161.useState)(0);
    const rotateClockwise = (0, import_element161.useCallback)(() => {
      const angle = (internalRotation + 90) % 360;
      let naturalAspectRatio = defaultAspect;
      const isDefaultAspect = defaultAspect === aspectRatio || rotatedAspect === aspectRatio;
      const shouldResetAspect = zoom !== 1 || !isDefaultAspect;
      if (internalRotation % 180 === 90) {
        naturalAspectRatio = 1 / defaultAspect;
      }
      if (angle === 0) {
        setEditedUrl();
        setInternalRotation(angle);
        const newAspectRatio = shouldResetAspect ? aspectRatio : defaultAspect;
        setCropperState({
          aspectRatio: newAspectRatio,
          crop: {
            x: -(crop.y * naturalAspectRatio),
            y: crop.x * naturalAspectRatio
          }
        });
        return;
      }
      function editImage(event) {
        const canvas = document.createElement("canvas");
        let translateX = 0;
        let translateY = 0;
        if (angle % 180) {
          canvas.width = event.target.height;
          canvas.height = event.target.width;
        } else {
          canvas.width = event.target.width;
          canvas.height = event.target.height;
        }
        if (angle === 90 || angle === 180) {
          translateX = canvas.width;
        }
        if (angle === 270 || angle === 180) {
          translateY = canvas.height;
        }
        const context = canvas.getContext("2d");
        context.translate(translateX, translateY);
        context.rotate(angle * Math.PI / 180);
        context.drawImage(event.target, 0, 0);
        canvas.toBlob((blob) => {
          setEditedUrl(URL.createObjectURL(blob));
          setInternalRotation(angle);
          const newAspectRatio = shouldResetAspect ? aspectRatio : canvas.width / canvas.height;
          setCropperState({
            aspectRatio: newAspectRatio,
            crop: {
              x: -(crop.y * naturalAspectRatio),
              y: crop.x * naturalAspectRatio
            }
          });
        });
      }
      const el = new window.Image();
      el.src = url;
      el.onload = editImage;
      const imgCrossOrigin = (0, import_hooks6.applyFilters)(
        "media.crossOrigin",
        void 0,
        url
      );
      if (typeof imgCrossOrigin === "string") {
        el.crossOrigin = imgCrossOrigin;
      }
    }, [
      internalRotation,
      defaultAspect,
      url,
      setCropperState,
      crop,
      zoom,
      aspectRatio,
      rotatedAspect,
      setInternalRotation
    ]);
    return (0, import_element161.useMemo)(
      () => ({
        editedUrl,
        setEditedUrl,
        crop: croppedArea,
        zoom,
        setZoom,
        rotation: internalRotation,
        rotateClockwise,
        aspect: aspectRatio,
        setAspect: setAspectRatio,
        defaultAspect
      }),
      [
        editedUrl,
        croppedArea,
        zoom,
        setZoom,
        internalRotation,
        rotateClockwise,
        aspectRatio,
        setAspectRatio,
        defaultAspect
      ]
    );
  }

  // packages/block-editor/build-module/components/image-editor/context.mjs
  var import_jsx_runtime304 = __toESM(require_jsx_runtime(), 1);
  var ImageEditingContext = (0, import_element162.createContext)({});
  ImageEditingContext.displayName = "ImageEditingContext";
  var useImageEditingContext = () => (0, import_element162.useContext)(ImageEditingContext);
  function ImageEditingProvider({
    id,
    url,
    naturalWidth,
    naturalHeight,
    onFinishEditing,
    onSaveImage,
    children
  }) {
    const transformImage = useTransformImage({
      url,
      naturalWidth,
      naturalHeight
    });
    const saveImage = useSaveImage({
      id,
      url,
      onSaveImage,
      onFinishEditing,
      ...transformImage
    });
    const providerValue = (0, import_element162.useMemo)(
      () => ({
        ...transformImage,
        ...saveImage
      }),
      [transformImage, saveImage]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(ImageEditingContext.Provider, { value: providerValue, children });
  }

  // packages/block-editor/build-module/components/image-editor/aspect-ratio-dropdown.mjs
  var import_jsx_runtime305 = __toESM(require_jsx_runtime(), 1);
  function AspectRatioGroup({
    aspectRatios,
    isDisabled,
    label,
    onClick,
    value
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(import_components155.MenuGroup, { label, children: aspectRatios.map(({ name, slug, ratio }) => /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
      import_components155.MenuItem,
      {
        disabled: isDisabled,
        onClick: () => {
          onClick(ratio);
        },
        role: "menuitemradio",
        isSelected: ratio === value,
        icon: ratio === value ? check_default : void 0,
        children: name
      },
      slug
    )) });
  }
  function ratioToNumber(str) {
    const [a2, b2, ...rest] = str.split("/").map(Number);
    if (a2 <= 0 || b2 <= 0 || Number.isNaN(a2) || Number.isNaN(b2) || rest.length) {
      return NaN;
    }
    return b2 ? a2 / b2 : a2;
  }
  function presetRatioAsNumber({ ratio, ...rest }) {
    return {
      ratio: ratioToNumber(ratio),
      ...rest
    };
  }
  function AspectRatioDropdown({ toggleProps }) {
    const { isInProgress, aspect, setAspect, defaultAspect } = useImageEditingContext();
    const [defaultRatios, themeRatios, showDefaultRatios] = useSettings(
      "dimensions.aspectRatios.default",
      "dimensions.aspectRatios.theme",
      "dimensions.defaultAspectRatios"
    );
    return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
      import_components155.DropdownMenu,
      {
        icon: aspect_ratio_default,
        label: (0, import_i18n142.__)("Aspect Ratio"),
        popoverProps: POPOVER_PROPS7,
        toggleProps,
        children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)(import_jsx_runtime305.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
            AspectRatioGroup,
            {
              isDisabled: isInProgress,
              onClick: (newAspect) => {
                setAspect(newAspect);
                onClose();
              },
              value: aspect,
              aspectRatios: [
                // All ratios should be mirrored in AspectRatioTool in @wordpress/block-editor.
                {
                  slug: "original",
                  name: (0, import_i18n142.__)("Original"),
                  ratio: defaultAspect
                },
                ...showDefaultRatios ? defaultRatios.map(presetRatioAsNumber).filter(({ ratio }) => ratio === 1) : []
              ]
            }
          ),
          themeRatios?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
            AspectRatioGroup,
            {
              label: (0, import_i18n142.__)("Theme"),
              isDisabled: isInProgress,
              onClick: (newAspect) => {
                setAspect(newAspect);
                onClose();
              },
              value: aspect,
              aspectRatios: themeRatios
            }
          ),
          showDefaultRatios && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
            AspectRatioGroup,
            {
              label: (0, import_i18n142.__)("Landscape"),
              isDisabled: isInProgress,
              onClick: (newAspect) => {
                setAspect(newAspect);
                onClose();
              },
              value: aspect,
              aspectRatios: defaultRatios.map(presetRatioAsNumber).filter(({ ratio }) => ratio > 1)
            }
          ),
          showDefaultRatios && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
            AspectRatioGroup,
            {
              label: (0, import_i18n142.__)("Portrait"),
              isDisabled: isInProgress,
              onClick: (newAspect) => {
                setAspect(newAspect);
                onClose();
              },
              value: aspect,
              aspectRatios: defaultRatios.map(presetRatioAsNumber).filter(({ ratio }) => ratio < 1)
            }
          )
        ] })
      }
    );
  }

  // packages/block-editor/build-module/components/image-editor/cropper.mjs
  var import_components156 = __toESM(require_components(), 1);
  var import_compose81 = __toESM(require_compose(), 1);
  var import_jsx_runtime306 = __toESM(require_jsx_runtime(), 1);
  function ImageCropper2({
    url,
    width,
    height,
    naturalHeight,
    naturalWidth,
    borderProps
  }) {
    const { isInProgress, editedUrl, rotation } = useImageEditingContext();
    const [contentResizeListener, { width: clientWidth }] = (0, import_compose81.useResizeObserver)();
    let editedHeight = height || clientWidth * naturalHeight / naturalWidth;
    if (rotation % 180 === 90) {
      editedHeight = clientWidth * naturalWidth / naturalHeight;
    }
    const area = /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)(
      "div",
      {
        className: clsx_default(
          "wp-block-image__crop-area",
          borderProps?.className,
          {
            "is-applying": isInProgress
          }
        ),
        style: {
          ...borderProps?.style,
          width: width || clientWidth,
          height: editedHeight
        },
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(ImageCropper, { src: editedUrl || url }),
          isInProgress && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(import_components156.Spinner, {})
        ]
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)(import_jsx_runtime306.Fragment, { children: [
      contentResizeListener,
      area
    ] });
  }

  // packages/block-editor/build-module/components/image-editor/zoom-dropdown.mjs
  var import_components157 = __toESM(require_components(), 1);
  var import_i18n143 = __toESM(require_i18n(), 1);
  var import_jsx_runtime307 = __toESM(require_jsx_runtime(), 1);
  function ZoomDropdown() {
    const { isInProgress, zoom, setZoom } = useImageEditingContext();
    return /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
      import_components157.Dropdown,
      {
        contentClassName: "wp-block-image__zoom",
        popoverProps: POPOVER_PROPS7,
        renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
          import_components157.ToolbarButton,
          {
            icon: search_default,
            label: (0, import_i18n143.__)("Zoom"),
            onClick: onToggle,
            "aria-expanded": isOpen,
            disabled: isInProgress
          }
        ),
        renderContent: () => /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(import_components157.__experimentalDropdownContentWrapper, { paddingSize: "medium", children: /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
          import_components157.RangeControl,
          {
            __next40pxDefaultSize: true,
            label: (0, import_i18n143.__)("Zoom"),
            min: MIN_ZOOM3,
            max: MAX_ZOOM3,
            value: Math.round(zoom * 100),
            onChange: (newZoom) => setZoom(newZoom / 100)
          }
        ) })
      }
    );
  }

  // packages/block-editor/build-module/components/image-editor/rotation-button.mjs
  var import_components158 = __toESM(require_components(), 1);
  var import_i18n144 = __toESM(require_i18n(), 1);
  var import_jsx_runtime308 = __toESM(require_jsx_runtime(), 1);
  function RotationButton() {
    const { isInProgress, rotateClockwise } = useImageEditingContext();
    return /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(
      import_components158.ToolbarButton,
      {
        icon: rotate_right_default,
        label: (0, import_i18n144.__)("Rotate"),
        onClick: rotateClockwise,
        disabled: isInProgress
      }
    );
  }

  // packages/block-editor/build-module/components/image-editor/form-controls.mjs
  var import_components159 = __toESM(require_components(), 1);
  var import_i18n145 = __toESM(require_i18n(), 1);
  var import_jsx_runtime309 = __toESM(require_jsx_runtime(), 1);
  function FormControls() {
    const { isInProgress, apply, cancel } = useImageEditingContext();
    return /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)(import_jsx_runtime309.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(import_components159.ToolbarButton, { onClick: apply, disabled: isInProgress, children: (0, import_i18n145.__)("Apply") }),
      /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(import_components159.ToolbarButton, { onClick: cancel, children: (0, import_i18n145.__)("Cancel") })
    ] });
  }

  // packages/block-editor/build-module/components/image-editor/index.mjs
  var import_jsx_runtime310 = __toESM(require_jsx_runtime(), 1);
  function ImageEditor({
    id,
    url,
    width,
    height,
    naturalHeight,
    naturalWidth,
    onSaveImage,
    onFinishEditing,
    borderProps
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(ImageCropperProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)(
      ImageEditingProvider,
      {
        id,
        url,
        naturalWidth,
        naturalHeight,
        onSaveImage,
        onFinishEditing,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
            ImageCropper2,
            {
              borderProps,
              url,
              width,
              height,
              naturalHeight,
              naturalWidth
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)(block_controls_default, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)(import_components160.ToolbarGroup, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(ZoomDropdown, {}),
              /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(import_components160.ToolbarItem, { children: (toggleProps) => /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
                AspectRatioDropdown,
                {
                  toggleProps
                }
              ) }),
              /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(RotationButton, {})
            ] }),
            /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(import_components160.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(FormControls, {}) })
          ] })
        ]
      }
    ) });
  }

  // packages/block-editor/build-module/components/image-size-control/index.mjs
  var import_components161 = __toESM(require_components(), 1);
  var import_i18n146 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/components/image-size-control/use-dimension-handler.mjs
  var import_element163 = __toESM(require_element(), 1);
  function useDimensionHandler(customHeight, customWidth, defaultHeight, defaultWidth, onChange) {
    const [currentWidth, setCurrentWidth] = (0, import_element163.useState)(
      customWidth ?? defaultWidth ?? ""
    );
    const [currentHeight, setCurrentHeight] = (0, import_element163.useState)(
      customHeight ?? defaultHeight ?? ""
    );
    (0, import_element163.useEffect)(() => {
      if (customWidth === void 0 && defaultWidth !== void 0) {
        setCurrentWidth(defaultWidth);
      }
      if (customHeight === void 0 && defaultHeight !== void 0) {
        setCurrentHeight(defaultHeight);
      }
    }, [defaultWidth, defaultHeight]);
    (0, import_element163.useEffect)(() => {
      if (customWidth !== void 0 && Number.parseInt(customWidth) !== Number.parseInt(currentWidth)) {
        setCurrentWidth(customWidth);
      }
      if (customHeight !== void 0 && Number.parseInt(customHeight) !== Number.parseInt(currentHeight)) {
        setCurrentHeight(customHeight);
      }
    }, [customWidth, customHeight]);
    const updateDimension = (dimension, value) => {
      const parsedValue = value === "" ? void 0 : parseInt(value, 10);
      if (dimension === "width") {
        setCurrentWidth(parsedValue);
      } else {
        setCurrentHeight(parsedValue);
      }
      onChange({
        [dimension]: parsedValue
      });
    };
    const updateDimensions = (nextHeight, nextWidth) => {
      setCurrentHeight(nextHeight ?? defaultHeight);
      setCurrentWidth(nextWidth ?? defaultWidth);
      onChange({ height: nextHeight, width: nextWidth });
    };
    return {
      currentHeight,
      currentWidth,
      updateDimension,
      updateDimensions
    };
  }

  // packages/block-editor/build-module/components/image-size-control/index.mjs
  var import_jsx_runtime311 = __toESM(require_jsx_runtime(), 1);
  var IMAGE_SIZE_PRESETS = [25, 50, 75, 100];
  var noop12 = () => {
  };
  function getScaledWidthAndHeight(scale, imageWidth, imageHeight) {
    const scaledWidth = Math.round(imageWidth * (scale / 100));
    const scaledHeight = Math.round(imageHeight * (scale / 100));
    return {
      scaledWidth,
      scaledHeight
    };
  }
  function ImageSizeControl({
    imageSizeHelp,
    imageWidth,
    imageHeight,
    imageSizeOptions = [],
    isResizable = true,
    slug,
    width,
    height,
    onChange,
    onChangeImage = noop12
  }) {
    const { currentHeight, currentWidth, updateDimension, updateDimensions } = useDimensionHandler(height, width, imageHeight, imageWidth, onChange);
    const handleUpdateDimensions = (scale) => {
      if (void 0 === scale) {
        updateDimensions();
        return;
      }
      const { scaledWidth, scaledHeight } = getScaledWidthAndHeight(
        scale,
        imageWidth,
        imageHeight
      );
      updateDimensions(scaledHeight, scaledWidth);
    };
    const selectedValue = IMAGE_SIZE_PRESETS.find((scale) => {
      const { scaledWidth, scaledHeight } = getScaledWidthAndHeight(
        scale,
        imageWidth,
        imageHeight
      );
      return currentWidth === scaledWidth && currentHeight === scaledHeight;
    });
    return /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)(import_components161.__experimentalVStack, { className: "block-editor-image-size-control", spacing: "4", children: [
      imageSizeOptions && imageSizeOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
        import_components161.SelectControl,
        {
          label: (0, import_i18n146.__)("Resolution"),
          value: slug,
          options: imageSizeOptions,
          onChange: onChangeImage,
          help: imageSizeHelp,
          size: "__unstable-large"
        }
      ),
      isResizable && /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)(import_jsx_runtime311.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)(import_components161.__experimentalHStack, { align: "baseline", spacing: "4", children: [
          /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
            import_components161.__experimentalNumberControl,
            {
              label: (0, import_i18n146.__)("Width"),
              value: currentWidth,
              min: 1,
              onChange: (value) => updateDimension("width", value),
              size: "__unstable-large"
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
            import_components161.__experimentalNumberControl,
            {
              label: (0, import_i18n146.__)("Height"),
              value: currentHeight,
              min: 1,
              onChange: (value) => updateDimension("height", value),
              size: "__unstable-large"
            }
          )
        ] }),
        /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
          import_components161.__experimentalToggleGroupControl,
          {
            label: (0, import_i18n146.__)("Image size presets"),
            hideLabelFromVision: true,
            onChange: handleUpdateDimensions,
            value: selectedValue,
            isBlock: true,
            __next40pxDefaultSize: true,
            children: IMAGE_SIZE_PRESETS.map((scale) => {
              return /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
                import_components161.__experimentalToggleGroupControlOption,
                {
                  value: scale,
                  label: (0, import_i18n146.sprintf)(
                    /* translators: %d: Percentage value. */
                    (0, import_i18n146.__)("%d%%"),
                    scale
                  )
                },
                scale
              );
            })
          }
        )
      ] })
    ] });
  }

  // packages/block-editor/build-module/components/justify-content-control/ui.mjs
  var import_components162 = __toESM(require_components(), 1);
  var import_i18n147 = __toESM(require_i18n(), 1);
  var import_jsx_runtime312 = __toESM(require_jsx_runtime(), 1);
  var icons = {
    left: justify_left_default,
    center: justify_center_default,
    right: justify_right_default,
    "space-between": justify_space_between_default,
    stretch: justify_stretch_default
  };
  function JustifyContentUI({
    allowedControls = ["left", "center", "right", "space-between"],
    isCollapsed: isCollapsed3 = true,
    onChange,
    value,
    popoverProps: popoverProps3,
    isToolbar
  }) {
    const handleClick = (next) => {
      if (next === value) {
        onChange(void 0);
      } else {
        onChange(next);
      }
    };
    const icon = value ? icons[value] : icons.left;
    const allControls = [
      {
        name: "left",
        icon: justify_left_default,
        title: (0, import_i18n147.__)("Justify items left"),
        isActive: "left" === value,
        onClick: () => handleClick("left")
      },
      {
        name: "center",
        icon: justify_center_default,
        title: (0, import_i18n147.__)("Justify items center"),
        isActive: "center" === value,
        onClick: () => handleClick("center")
      },
      {
        name: "right",
        icon: justify_right_default,
        title: (0, import_i18n147.__)("Justify items right"),
        isActive: "right" === value,
        onClick: () => handleClick("right")
      },
      {
        name: "space-between",
        icon: justify_space_between_default,
        title: (0, import_i18n147.__)("Space between items"),
        isActive: "space-between" === value,
        onClick: () => handleClick("space-between")
      },
      {
        name: "stretch",
        icon: justify_stretch_default,
        title: (0, import_i18n147.__)("Stretch items"),
        isActive: "stretch" === value,
        onClick: () => handleClick("stretch")
      }
    ];
    const UIComponent = isToolbar ? import_components162.ToolbarGroup : import_components162.ToolbarDropdownMenu;
    const extraProps = isToolbar ? { isCollapsed: isCollapsed3 } : {};
    return /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
      UIComponent,
      {
        icon,
        popoverProps: popoverProps3,
        label: (0, import_i18n147.__)("Change items justification"),
        controls: allControls.filter(
          (elem) => allowedControls.includes(elem.name)
        ),
        ...extraProps
      }
    );
  }
  var ui_default4 = JustifyContentUI;

  // packages/block-editor/build-module/components/justify-content-control/index.mjs
  var import_jsx_runtime313 = __toESM(require_jsx_runtime(), 1);
  var JustifyContentControl = (props) => {
    return /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(ui_default4, { ...props, isToolbar: false });
  };
  var JustifyToolbar = (props) => {
    return /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(ui_default4, { ...props, isToolbar: true });
  };

  // packages/block-editor/build-module/components/link-control/index.mjs
  var import_components170 = __toESM(require_components(), 1);
  var import_i18n157 = __toESM(require_i18n(), 1);
  var import_element171 = __toESM(require_element(), 1);
  var import_compose85 = __toESM(require_compose(), 1);
  var import_dom36 = __toESM(require_dom(), 1);
  var import_keycodes17 = __toESM(require_keycodes(), 1);
  var import_is_shallow_equal3 = __toESM(require_is_shallow_equal(), 1);
  var import_data146 = __toESM(require_data(), 1);
  var import_preferences4 = __toESM(require_preferences(), 1);
  var import_deprecated23 = __toESM(require_deprecated(), 1);
  var import_url7 = __toESM(require_url(), 1);

  // packages/block-editor/build-module/components/link-control/settings-drawer.mjs
  var import_components163 = __toESM(require_components(), 1);
  var import_compose82 = __toESM(require_compose(), 1);
  var import_i18n148 = __toESM(require_i18n(), 1);
  var import_element164 = __toESM(require_element(), 1);
  var import_jsx_runtime314 = __toESM(require_jsx_runtime(), 1);
  function LinkSettingsDrawer({ children, settingsOpen, setSettingsOpen }) {
    const prefersReducedMotion = (0, import_compose82.useReducedMotion)();
    const MaybeAnimatePresence = prefersReducedMotion ? import_element164.Fragment : import_components163.__unstableAnimatePresence;
    const MaybeMotionDiv = prefersReducedMotion ? "div" : import_components163.__unstableMotion.div;
    const id = (0, import_compose82.useInstanceId)(LinkSettingsDrawer);
    const settingsDrawerId = `link-control-settings-drawer-${id}`;
    return /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)(import_jsx_runtime314.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
        import_components163.Button,
        {
          __next40pxDefaultSize: true,
          className: "block-editor-link-control__drawer-toggle",
          "aria-expanded": settingsOpen,
          onClick: () => setSettingsOpen(!settingsOpen),
          icon: (0, import_i18n148.isRTL)() ? chevron_left_small_default : chevron_right_small_default,
          "aria-controls": settingsDrawerId,
          children: (0, import_i18n148._x)("Advanced", "Additional link settings")
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(MaybeAnimatePresence, { children: settingsOpen && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
        MaybeMotionDiv,
        {
          className: "block-editor-link-control__drawer",
          hidden: !settingsOpen,
          id: settingsDrawerId,
          initial: "collapsed",
          animate: "open",
          exit: "collapsed",
          variants: {
            open: { opacity: 1, height: "auto" },
            collapsed: { opacity: 0, height: 0 }
          },
          transition: {
            duration: 0.1
          },
          children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "block-editor-link-control__drawer-inner", children })
        }
      ) })
    ] });
  }
  var settings_drawer_default = LinkSettingsDrawer;

  // packages/block-editor/build-module/components/link-control/search-input.mjs
  var import_element167 = __toESM(require_element(), 1);
  var import_i18n153 = __toESM(require_i18n(), 1);
  var import_deprecated22 = __toESM(require_deprecated(), 1);

  // packages/block-editor/build-module/components/link-control/search-results.mjs
  var import_i18n152 = __toESM(require_i18n(), 1);
  var import_components166 = __toESM(require_components(), 1);

  // packages/block-editor/build-module/components/link-control/search-create-button.mjs
  var import_i18n149 = __toESM(require_i18n(), 1);
  var import_components164 = __toESM(require_components(), 1);
  var import_element165 = __toESM(require_element(), 1);
  var import_jsx_runtime315 = __toESM(require_jsx_runtime(), 1);
  var LinkControlSearchCreate = ({
    searchTerm,
    onClick,
    itemProps,
    buttonText
  }) => {
    if (!searchTerm) {
      return null;
    }
    let text;
    if (buttonText) {
      text = typeof buttonText === "function" ? buttonText(searchTerm) : buttonText;
    } else {
      text = (0, import_element165.createInterpolateElement)(
        (0, import_i18n149.sprintf)(
          /* translators: %s: search term. */
          (0, import_i18n149.__)("Create: <mark>%s</mark>"),
          searchTerm
        ),
        { mark: /* @__PURE__ */ (0, import_jsx_runtime315.jsx)("mark", {}) }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
      import_components164.MenuItem,
      {
        ...itemProps,
        iconPosition: "left",
        icon: plus_default,
        className: "block-editor-link-control__search-item",
        onClick,
        children: text
      }
    );
  };
  var search_create_button_default = LinkControlSearchCreate;

  // packages/block-editor/build-module/components/link-control/search-item.mjs
  var import_i18n150 = __toESM(require_i18n(), 1);
  var import_components165 = __toESM(require_components(), 1);
  var import_dom34 = __toESM(require_dom(), 1);
  var import_url4 = __toESM(require_url(), 1);
  var import_compose83 = __toESM(require_compose(), 1);
  var import_deprecated20 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime316 = __toESM(require_jsx_runtime(), 1);
  var TYPES = {
    post: {
      icon: post_list_default,
      label: (0, import_i18n150.__)("Post")
    },
    page: {
      icon: page_default,
      label: (0, import_i18n150.__)("Page")
    },
    post_tag: {
      icon: tag_default,
      label: (0, import_i18n150.__)("Tag")
    },
    category: {
      icon: category_default,
      label: (0, import_i18n150.__)("Category")
    },
    attachment: {
      icon: file_default,
      label: (0, import_i18n150.__)("Attachment")
    }
  };
  function SearchItemIcon({ isURL: isURL4, suggestion }) {
    let icon = null;
    if (isURL4) {
      icon = globe_default;
    } else if (suggestion.type in TYPES) {
      icon = TYPES[suggestion.type].icon;
      if (suggestion.type === "page") {
        if (suggestion.isFrontPage) {
          icon = home_default;
        }
        if (suggestion.isBlogHome) {
          icon = verse_default;
        }
      }
    }
    if (icon) {
      return /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
        icon_default,
        {
          className: "block-editor-link-control__search-item-icon",
          icon
        }
      );
    }
    return null;
  }
  function addLeadingSlash(url) {
    const trimmedURL = url?.trim();
    if (!trimmedURL?.length) {
      return url;
    }
    return url?.replace(/^\/?/, "/");
  }
  function removeTrailingSlash(url) {
    const trimmedURL = url?.trim();
    if (!trimmedURL?.length) {
      return url;
    }
    return url?.replace(/\/$/, "");
  }
  var partialRight = (fn, ...partialArgs) => (...args) => fn(...args, ...partialArgs);
  var defaultTo = (d2) => (v2) => {
    return v2 === null || v2 === void 0 || v2 !== v2 ? d2 : v2;
  };
  function getURLForDisplay(url) {
    if (!url) {
      return url;
    }
    return (0, import_compose83.pipe)(
      import_url4.safeDecodeURI,
      import_url4.getPath,
      defaultTo(""),
      partialRight(import_url4.filterURLForDisplay, 24),
      removeTrailingSlash,
      addLeadingSlash
    )(url);
  }
  var LinkControlSearchItem = ({
    itemProps,
    suggestion,
    searchTerm,
    onClick,
    isURL: isURL4 = false,
    shouldShowType = false
  }) => {
    const info = isURL4 ? (0, import_i18n150.__)("Press ENTER to add this link") : getURLForDisplay(suggestion.url);
    return /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
      import_components165.MenuItem,
      {
        ...itemProps,
        info,
        iconPosition: "left",
        icon: /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(SearchItemIcon, { suggestion, isURL: isURL4 }),
        onClick,
        shortcut: shouldShowType && getVisualTypeName(suggestion),
        className: "block-editor-link-control__search-item",
        children: /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
          import_components165.TextHighlight,
          {
            text: (0, import_dom34.__unstableStripHTML)(suggestion.title),
            highlight: searchTerm
          }
        )
      }
    );
  };
  function getVisualTypeName(suggestion) {
    if (suggestion.isFrontPage) {
      return (0, import_i18n150.__)("Front page");
    }
    if (suggestion.isBlogHome) {
      return (0, import_i18n150.__)("Blog home");
    }
    if (suggestion.type in TYPES) {
      return TYPES[suggestion.type].label;
    }
    return suggestion.type;
  }
  var search_item_default = LinkControlSearchItem;
  var __experimentalLinkControlSearchItem = (props) => {
    (0, import_deprecated20.default)("wp.blockEditor.__experimentalLinkControlSearchItem", {
      since: "6.8"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(LinkControlSearchItem, { ...props });
  };

  // packages/block-editor/build-module/components/link-control/constants.mjs
  var import_i18n151 = __toESM(require_i18n(), 1);
  var CREATE_TYPE = "__CREATE__";
  var TEL_TYPE = "tel";
  var URL_TYPE = "link";
  var MAILTO_TYPE = "mailto";
  var INTERNAL_TYPE = "internal";
  var LINK_ENTRY_TYPES = [
    URL_TYPE,
    MAILTO_TYPE,
    TEL_TYPE,
    INTERNAL_TYPE
  ];
  var DEFAULT_LINK_SETTINGS = [
    {
      id: "opensInNewTab",
      title: (0, import_i18n151.__)("Open in new tab")
    }
  ];

  // packages/block-editor/build-module/components/link-control/search-results.mjs
  var import_deprecated21 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime317 = __toESM(require_jsx_runtime(), 1);
  function LinkControlSearchResults({
    withCreateSuggestion,
    currentInputValue,
    handleSuggestionClick,
    suggestionsListProps,
    buildSuggestionItemProps,
    suggestions,
    selectedSuggestion,
    isLoading,
    isInitialSuggestions,
    createSuggestionButtonText,
    suggestionsQuery
  }) {
    const resultsListClasses = clsx_default(
      "block-editor-link-control__search-results",
      {
        "is-loading": isLoading
      }
    );
    const isSingleDirectEntryResult = suggestions.length === 1 && LINK_ENTRY_TYPES.includes(suggestions[0].type);
    const shouldShowCreateSuggestion = withCreateSuggestion && !isSingleDirectEntryResult && !isInitialSuggestions;
    const shouldShowSuggestionsTypes = !suggestionsQuery?.type;
    const labelText = isInitialSuggestions ? (0, import_i18n152.__)("Suggestions") : (0, import_i18n152.sprintf)(
      /* translators: %s: search term. */
      (0, import_i18n152.__)('Search results for "%s"'),
      currentInputValue
    );
    return /* @__PURE__ */ (0, import_jsx_runtime317.jsx)("div", { className: "block-editor-link-control__search-results-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
      "div",
      {
        ...suggestionsListProps,
        className: resultsListClasses,
        "aria-label": labelText,
        children: /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(import_components166.MenuGroup, { children: suggestions.map((suggestion, index) => {
          if (shouldShowCreateSuggestion && CREATE_TYPE === suggestion.type) {
            return /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
              search_create_button_default,
              {
                searchTerm: currentInputValue,
                buttonText: createSuggestionButtonText,
                onClick: () => handleSuggestionClick(suggestion),
                itemProps: buildSuggestionItemProps(
                  suggestion,
                  index
                ),
                isSelected: index === selectedSuggestion
              },
              suggestion.type
            );
          }
          if (CREATE_TYPE === suggestion.type) {
            return null;
          }
          return /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
            search_item_default,
            {
              itemProps: buildSuggestionItemProps(
                suggestion,
                index
              ),
              suggestion,
              index,
              onClick: () => {
                handleSuggestionClick(suggestion);
              },
              isSelected: index === selectedSuggestion,
              isURL: LINK_ENTRY_TYPES.includes(
                suggestion.type
              ),
              searchTerm: currentInputValue,
              shouldShowType: shouldShowSuggestionsTypes,
              isFrontPage: suggestion?.isFrontPage,
              isBlogHome: suggestion?.isBlogHome
            },
            `${suggestion.id}-${suggestion.type}`
          );
        }) })
      }
    ) });
  }
  var search_results_default2 = LinkControlSearchResults;
  var __experimentalLinkControlSearchResults = (props) => {
    (0, import_deprecated21.default)("wp.blockEditor.__experimentalLinkControlSearchResults", {
      since: "6.8"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(LinkControlSearchResults, { ...props });
  };

  // packages/block-editor/build-module/components/link-control/use-search-handler.mjs
  var import_element166 = __toESM(require_element(), 1);
  var import_data143 = __toESM(require_data(), 1);

  // packages/block-editor/build-module/components/link-control/normalize-url.mjs
  var import_url5 = __toESM(require_url(), 1);
  function normalizeUrl(url) {
    const trimmedUrl = url?.trim();
    if (!trimmedUrl) {
      return { url: trimmedUrl, type: URL_TYPE };
    }
    let type = URL_TYPE;
    const protocol = (0, import_url5.getProtocol)(trimmedUrl) || "";
    if (protocol.includes("mailto")) {
      type = MAILTO_TYPE;
    } else if (protocol.includes("tel")) {
      type = TEL_TYPE;
    } else if (trimmedUrl?.startsWith("#")) {
      type = INTERNAL_TYPE;
    }
    if (isHashLink(trimmedUrl) || isRelativePath(trimmedUrl) || trimmedUrl.startsWith("?") || protocol) {
      return { url: trimmedUrl, type };
    }
    return { url: (0, import_url5.prependHTTPS)(trimmedUrl), type };
  }

  // packages/block-editor/build-module/components/link-control/use-search-handler.mjs
  var handleNoop = () => Promise.resolve([]);
  var handleDirectEntry = (val) => {
    const { url, type } = normalizeUrl(val);
    return Promise.resolve([
      {
        id: val,
        title: val,
        url,
        type
      }
    ]);
  };
  var handleEntitySearch = async (val, suggestionsQuery, fetchSearchSuggestions, withCreateSuggestion, pageOnFront, pageForPosts) => {
    const { isInitialSuggestions } = suggestionsQuery;
    const results = await fetchSearchSuggestions(val, suggestionsQuery);
    results.map((result) => {
      if (Number(result.id) === pageOnFront) {
        result.isFrontPage = true;
        return result;
      } else if (Number(result.id) === pageForPosts) {
        result.isBlogHome = true;
        return result;
      }
      return result;
    });
    if (isInitialSuggestions) {
      return results;
    }
    return isURLLike(val) || !withCreateSuggestion ? results : results.concat({
      // the `id` prop is intentionally omitted here because it
      // is never exposed as part of the component's public API.
      // see: https://github.com/WordPress/gutenberg/pull/19775#discussion_r378931316.
      title: val,
      // Must match the existing `<input>`s text value.
      url: val,
      // Must match the existing `<input>`s text value.
      type: CREATE_TYPE
    });
  };
  function useSearchHandler(suggestionsQuery, allowDirectEntry, withCreateSuggestion) {
    const { fetchSearchSuggestions, pageOnFront, pageForPosts } = (0, import_data143.useSelect)(
      (select3) => {
        const { getSettings: getSettings7 } = select3(store);
        return {
          pageOnFront: getSettings7().pageOnFront,
          pageForPosts: getSettings7().pageForPosts,
          fetchSearchSuggestions: getSettings7().__experimentalFetchLinkSuggestions
        };
      },
      []
    );
    const directEntryHandler = allowDirectEntry ? handleDirectEntry : handleNoop;
    return (0, import_element166.useCallback)(
      (val, { isInitialSuggestions }) => {
        return isURLLike(val) ? directEntryHandler(val, { isInitialSuggestions }) : handleEntitySearch(
          val,
          { ...suggestionsQuery, isInitialSuggestions },
          fetchSearchSuggestions,
          withCreateSuggestion,
          pageOnFront,
          pageForPosts
        );
      },
      [
        directEntryHandler,
        fetchSearchSuggestions,
        pageOnFront,
        pageForPosts,
        suggestionsQuery,
        withCreateSuggestion
      ]
    );
  }

  // packages/block-editor/build-module/components/link-control/search-input.mjs
  var import_jsx_runtime318 = __toESM(require_jsx_runtime(), 1);
  var noopSearchHandler = () => Promise.resolve([]);
  var noop13 = () => {
  };
  var LinkControlSearchInput = (0, import_element167.forwardRef)(
    ({
      value,
      children,
      currentLink = {},
      className = null,
      placeholder = null,
      withCreateSuggestion = false,
      onCreateSuggestion = noop13,
      onChange = noop13,
      onSelect = noop13,
      showSuggestions = true,
      renderSuggestions = (props) => /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(search_results_default2, { ...props }),
      fetchSuggestions = null,
      allowDirectEntry = true,
      showInitialSuggestions = false,
      suggestionsQuery = {},
      withURLSuggestion = true,
      createSuggestionButtonText,
      hideLabelFromVision = false,
      suffix,
      isEntity = false,
      customValidity: customValidityProp
    }, ref) => {
      const genericSearchHandler = useSearchHandler(
        suggestionsQuery,
        allowDirectEntry,
        withCreateSuggestion,
        withURLSuggestion
      );
      const searchHandler = showSuggestions ? fetchSuggestions || genericSearchHandler : noopSearchHandler;
      const [focusedSuggestion, setFocusedSuggestion] = (0, import_element167.useState)();
      const onInputChange = (selection2, suggestion) => {
        onChange(selection2);
        setFocusedSuggestion(suggestion);
      };
      const handleRenderSuggestions = (props) => renderSuggestions({
        ...props,
        withCreateSuggestion,
        createSuggestionButtonText,
        suggestionsQuery,
        handleSuggestionClick: (suggestion) => {
          if (props.handleSuggestionClick) {
            props.handleSuggestionClick(suggestion);
          }
          onSuggestionSelected(suggestion);
        }
      });
      const onSuggestionSelected = async (selectedSuggestion) => {
        let suggestion = selectedSuggestion;
        if (CREATE_TYPE === selectedSuggestion.type) {
          try {
            suggestion = await onCreateSuggestion(
              selectedSuggestion.title
            );
            if (suggestion?.url) {
              onSelect(suggestion);
            }
          } catch (e2) {
          }
          return;
        }
        if (allowDirectEntry || suggestion && Object.keys(suggestion).length >= 1) {
          const { id, url, kind, type, ...restLinkProps } = currentLink ?? {};
          onSelect(
            // Some direct entries don't have types or IDs, and we still need to clear the previous ones.
            { ...restLinkProps, ...suggestion },
            suggestion
          );
        }
      };
      const _placeholder = placeholder ?? (0, import_i18n153.__)("Search or type URL");
      const label = hideLabelFromVision && placeholder !== "" ? _placeholder : (0, import_i18n153.__)("Link");
      return /* @__PURE__ */ (0, import_jsx_runtime318.jsxs)("div", { className: "block-editor-link-control__search-input-container", children: [
        /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
          url_input_default,
          {
            disableSuggestions: currentLink?.url === value,
            label,
            hideLabelFromVision,
            className,
            value,
            onChange: onInputChange,
            placeholder: _placeholder,
            __experimentalRenderSuggestions: showSuggestions ? handleRenderSuggestions : null,
            __experimentalFetchLinkSuggestions: searchHandler,
            __experimentalHandleURLSuggestions: true,
            __experimentalShowInitialSuggestions: showInitialSuggestions,
            customValidity: customValidityProp,
            required: false,
            onSubmit: (suggestion, event) => {
              const hasSuggestion = suggestion || focusedSuggestion;
              if (!hasSuggestion && !value?.trim()?.length) {
                event.preventDefault();
              } else {
                onSuggestionSelected(
                  hasSuggestion || { url: value }
                );
              }
            },
            inputRef: ref,
            suffix,
            disabled: isEntity
          }
        ),
        children
      ] });
    }
  );
  var search_input_default = LinkControlSearchInput;
  var __experimentalLinkControlSearchInput = (props) => {
    (0, import_deprecated22.default)("wp.blockEditor.__experimentalLinkControlSearchInput", {
      since: "6.8"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(LinkControlSearchInput, { ...props });
  };

  // packages/block-editor/build-module/components/link-control/link-preview.mjs
  var import_i18n154 = __toESM(require_i18n(), 1);
  var import_components168 = __toESM(require_components(), 1);
  var import_compose84 = __toESM(require_compose(), 1);
  var import_url6 = __toESM(require_url(), 1);
  var import_dom35 = __toESM(require_dom(), 1);
  var import_data145 = __toESM(require_data(), 1);
  var import_notices9 = __toESM(require_notices(), 1);
  var import_preferences3 = __toESM(require_preferences(), 1);

  // packages/block-editor/build-module/components/link-control/viewer-slot.mjs
  var import_components167 = __toESM(require_components(), 1);
  var { Slot: ViewerSlot, Fill: ViewerFill } = (0, import_components167.createSlotFill)(
    "BlockEditorLinkControlViewer"
  );

  // packages/block-editor/build-module/components/link-control/use-rich-url-data.mjs
  var import_data144 = __toESM(require_data(), 1);
  var import_element168 = __toESM(require_element(), 1);
  function reducer(state, action) {
    switch (action.type) {
      case "RESOLVED":
        return {
          ...state,
          isFetching: false,
          richData: action.richData
        };
      case "ERROR":
        return {
          ...state,
          isFetching: false,
          richData: null
        };
      case "LOADING":
        return {
          ...state,
          isFetching: true
        };
      default:
        throw new Error(`Unexpected action type ${action.type}`);
    }
  }
  function useRemoteUrlData(url) {
    const [state, dispatch] = (0, import_element168.useReducer)(reducer, {
      richData: null,
      isFetching: false
    });
    const { fetchRichUrlData } = (0, import_data144.useSelect)((select3) => {
      const { getSettings: getSettings7 } = select3(store);
      return {
        fetchRichUrlData: getSettings7().__experimentalFetchRichUrlData
      };
    }, []);
    (0, import_element168.useEffect)(() => {
      if (url?.length && fetchRichUrlData && typeof AbortController !== "undefined") {
        dispatch({
          type: "LOADING"
        });
        const controller = new window.AbortController();
        const signal = controller.signal;
        fetchRichUrlData(url, {
          signal
        }).then((urlData) => {
          dispatch({
            type: "RESOLVED",
            richData: urlData
          });
        }).catch(() => {
          if (!signal.aborted) {
            dispatch({
              type: "ERROR"
            });
          }
        });
        return () => {
          controller.abort();
        };
      }
    }, [url]);
    return state;
  }
  var use_rich_url_data_default = useRemoteUrlData;

  // packages/block-editor/build-module/components/link-control/link-preview.mjs
  var import_jsx_runtime319 = __toESM(require_jsx_runtime(), 1);
  var { Badge: Badge4 } = unlock(import_components168.privateApis);
  function LinkPreview({
    value,
    onEditClick,
    hasRichPreviews = false,
    hasUnlinkControl = false,
    onRemove
  }) {
    const showIconLabels = (0, import_data145.useSelect)(
      (select3) => select3(import_preferences3.store).get("core", "showIconLabels"),
      []
    );
    const showRichPreviews = hasRichPreviews ? value?.url : null;
    const { richData, isFetching } = use_rich_url_data_default(showRichPreviews);
    const hasRichData = richData && Object.keys(richData).length;
    const displayURL = value && (0, import_url6.filterURLForDisplay)((0, import_url6.safeDecodeURI)(value.url), 24) || "";
    const isEmptyURL = !value?.url?.length;
    const displayTitle = !isEmptyURL && (0, import_dom35.__unstableStripHTML)(richData?.title || value?.title || displayURL);
    let icon;
    if (richData?.icon) {
      icon = /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("img", { src: richData?.icon, alt: "" });
    } else if (isEmptyURL) {
      icon = /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(icon_default, { icon: info_default, size: 32 });
    } else {
      icon = /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(icon_default, { icon: globe_default });
    }
    const { createNotice } = (0, import_data145.useDispatch)(import_notices9.store);
    const ref = (0, import_compose84.useCopyToClipboard)(value.url, () => {
      createNotice("info", (0, import_i18n154.__)("Link copied to clipboard."), {
        isDismissible: true,
        type: "snackbar"
      });
    });
    return /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
      import_components168.Flex,
      {
        role: "group",
        "aria-label": (0, import_i18n154.__)("Manage link"),
        className: clsx_default("block-editor-link-control__preview", {
          "is-current": true,
          "is-rich": hasRichData,
          "is-fetching": !!isFetching,
          "is-preview": true,
          "is-error": isEmptyURL,
          "is-url-title": displayTitle === displayURL
        }),
        children: /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)(import_components168.Flex, { gap: 0, align: "flex-start", children: [
          /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)(
            import_components168.Flex,
            {
              className: "block-editor-link-control__link-information",
              role: "figure",
              "aria-label": (
                /* translators: Accessibility text for the link preview when editing a link. */
                (0, import_i18n154.__)("Link information")
              ),
              justify: "start",
              align: "flex-start",
              children: [
                value?.image ? /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
                  import_components168.Flex,
                  {
                    className: "block-editor-link-control__preview-image",
                    justify: "center",
                    children: /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("img", { src: value?.image, alt: "" })
                  }
                ) : /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
                  import_components168.Flex,
                  {
                    className: clsx_default(
                      "block-editor-link-control__preview-icon",
                      {
                        "is-image": richData?.icon
                      }
                    ),
                    justify: "center",
                    children: icon
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
                  import_components168.Flex,
                  {
                    className: "block-editor-link-control__preview-details",
                    direction: "column",
                    gap: 2,
                    children: !isEmptyURL ? /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)(import_jsx_runtime319.Fragment, { children: [
                      /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
                        import_components168.ExternalLink,
                        {
                          className: "block-editor-link-control__preview-title",
                          href: value.url,
                          children: /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(import_components168.__experimentalTruncate, { numberOfLines: 1, children: displayTitle })
                        }
                      ),
                      /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("span", { className: "block-editor-link-control__preview-info", children: /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(import_components168.__experimentalTruncate, { numberOfLines: 1, children: displayURL }) }),
                      value?.badges?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
                        import_components168.__experimentalHStack,
                        {
                          className: "block-editor-link-control__preview-badges",
                          alignment: "left",
                          gap: 1,
                          children: value.badges.map(
                            (badge, index) => /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
                              Badge4,
                              {
                                intent: badge.intent,
                                children: badge.label
                              },
                              `${badge.label}|${badge.intent}|${index}`
                            )
                          )
                        }
                      )
                    ] }) : /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("span", { className: "block-editor-link-control__preview-error-notice", children: (0, import_i18n154.__)("Link is empty") })
                  }
                )
              ]
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
            import_components168.Button,
            {
              icon: pencil_default,
              label: (0, import_i18n154.__)("Edit link"),
              onClick: onEditClick,
              size: "compact",
              showTooltip: !showIconLabels
            }
          ),
          hasUnlinkControl && /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
            import_components168.Button,
            {
              icon: link_off_default,
              label: (0, import_i18n154.__)("Remove link"),
              onClick: onRemove,
              size: "compact",
              showTooltip: !showIconLabels
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
            import_components168.Button,
            {
              icon: copy_small_default,
              label: (0, import_i18n154.__)("Copy link"),
              ref,
              accessibleWhenDisabled: true,
              disabled: isEmptyURL,
              size: "compact",
              showTooltip: !showIconLabels
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(ViewerSlot, { fillProps: value })
        ] })
      }
    );
  }

  // packages/block-editor/build-module/components/link-control/settings.mjs
  var import_i18n155 = __toESM(require_i18n(), 1);
  var import_components169 = __toESM(require_components(), 1);
  var import_jsx_runtime320 = __toESM(require_jsx_runtime(), 1);
  var noop14 = () => {
  };
  var LinkControlSettings = ({ value, onChange = noop14, settings: settings2 }) => {
    if (!settings2 || !settings2.length) {
      return null;
    }
    const handleSettingChange = (setting) => (newValue) => {
      onChange({
        ...value,
        [setting.id]: newValue
      });
    };
    const theSettings = settings2.map((setting) => {
      if ("render" in setting) {
        if (typeof setting.render === "function") {
          const renderedContent = setting.render(
            setting,
            value,
            onChange
          );
          return /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
            "div",
            {
              className: "block-editor-link-control__setting",
              children: renderedContent
            },
            setting.id
          );
        }
        return null;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
        import_components169.CheckboxControl,
        {
          className: "block-editor-link-control__setting",
          label: setting.title,
          onChange: handleSettingChange(setting),
          checked: value ? !!value[setting.id] : false,
          help: setting?.help
        },
        setting.id
      );
    }).filter(Boolean);
    return /* @__PURE__ */ (0, import_jsx_runtime320.jsxs)("fieldset", { className: "block-editor-link-control__settings", children: [
      /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(import_components169.VisuallyHidden, { as: "legend", children: (0, import_i18n155.__)("Currently selected link settings") }),
      theSettings
    ] });
  };
  var settings_default2 = LinkControlSettings;

  // packages/block-editor/build-module/components/link-control/use-create-page.mjs
  var import_i18n156 = __toESM(require_i18n(), 1);
  var import_element169 = __toESM(require_element(), 1);
  function useCreatePage(handleCreatePage) {
    const cancelableCreateSuggestion = (0, import_element169.useRef)();
    const [isCreatingPage, setIsCreatingPage] = (0, import_element169.useState)(false);
    const [errorMessage, setErrorMessage] = (0, import_element169.useState)(null);
    const createPage = async function(suggestionTitle) {
      setIsCreatingPage(true);
      setErrorMessage(null);
      try {
        cancelableCreateSuggestion.current = makeCancelable(
          // Using Promise.resolve to allow createSuggestion to return a
          // non-Promise based value.
          Promise.resolve(handleCreatePage(suggestionTitle))
        );
        return await cancelableCreateSuggestion.current.promise;
      } catch (error) {
        if (error && error.isCanceled) {
          return;
        }
        setErrorMessage(
          error.message || (0, import_i18n156.__)(
            "An unknown error occurred during creation. Please try again."
          )
        );
        throw error;
      } finally {
        setIsCreatingPage(false);
      }
    };
    (0, import_element169.useEffect)(() => {
      return () => {
        if (cancelableCreateSuggestion.current) {
          cancelableCreateSuggestion.current.cancel();
        }
      };
    }, []);
    return {
      createPage,
      isCreatingPage,
      errorMessage
    };
  }
  var makeCancelable = (promise) => {
    let hasCanceled_ = false;
    const wrappedPromise = new Promise((resolve, reject) => {
      promise.then(
        (val) => hasCanceled_ ? reject({ isCanceled: true }) : resolve(val),
        (error) => hasCanceled_ ? reject({ isCanceled: true }) : reject(error)
      );
    });
    return {
      promise: wrappedPromise,
      cancel() {
        hasCanceled_ = true;
      }
    };
  };

  // packages/block-editor/build-module/components/link-control/use-internal-value.mjs
  var import_element170 = __toESM(require_element(), 1);
  var import_fast_deep_equal = __toESM(require_fast_deep_equal(), 1);
  function useInternalValue(value) {
    const [internalValue, setInternalValue] = (0, import_element170.useState)(value || {});
    const [previousValue, setPreviousValue] = (0, import_element170.useState)(value);
    if (!(0, import_fast_deep_equal.default)(value, previousValue)) {
      setPreviousValue(value);
      setInternalValue(value);
    }
    const setInternalURLInputValue = (nextValue) => {
      setInternalValue({
        ...internalValue,
        url: nextValue
      });
    };
    const setInternalTextInputValue = (nextValue) => {
      setInternalValue({
        ...internalValue,
        title: nextValue
      });
    };
    const createSetInternalSettingValueHandler = (settingsKeys) => (nextValue) => {
      const settingsUpdates = Object.keys(nextValue).reduce(
        (acc, key) => {
          if (settingsKeys.includes(key)) {
            acc[key] = nextValue[key];
          }
          return acc;
        },
        {}
      );
      setInternalValue({
        ...internalValue,
        ...settingsUpdates
      });
    };
    return [
      internalValue,
      setInternalValue,
      setInternalURLInputValue,
      setInternalTextInputValue,
      createSetInternalSettingValueHandler
    ];
  }

  // packages/block-editor/build-module/components/link-control/index.mjs
  var import_jsx_runtime321 = __toESM(require_jsx_runtime(), 1);
  var noop15 = () => {
  };
  var PREFERENCE_SCOPE = "core/block-editor";
  var PREFERENCE_KEY = "linkControlSettingsDrawer";
  function LinkControl({
    searchInputPlaceholder,
    value,
    settings: settings2 = DEFAULT_LINK_SETTINGS,
    onChange = noop15,
    onInputChange,
    onRemove,
    onCancel,
    noDirectEntry = false,
    showSuggestions = true,
    showInitialSuggestions,
    forceIsEditingLink,
    createSuggestion,
    withCreateSuggestion,
    inputValue: propInputValue = "",
    suggestionsQuery = {},
    noURLSuggestion = false,
    createSuggestionButtonText,
    hasRichPreviews = false,
    hasTextControl = false,
    renderControlBottom = null,
    handleEntities = false
  }) {
    if (withCreateSuggestion === void 0 && createSuggestion) {
      withCreateSuggestion = true;
    }
    const [settingsOpen, setSettingsOpen] = (0, import_element171.useState)(false);
    const [customValidity, setCustomValidity] = (0, import_element171.useState)(void 0);
    const { advancedSettingsPreference } = (0, import_data146.useSelect)((select3) => {
      const prefsStore = select3(import_preferences4.store);
      return {
        advancedSettingsPreference: prefsStore.get(PREFERENCE_SCOPE, PREFERENCE_KEY) ?? false
      };
    }, []);
    const { set: setPreference } = (0, import_data146.useDispatch)(import_preferences4.store);
    const setSettingsOpenWithPreference = (prefVal) => {
      if (setPreference) {
        setPreference(PREFERENCE_SCOPE, PREFERENCE_KEY, prefVal);
      }
      setSettingsOpen(prefVal);
    };
    const isSettingsOpen = advancedSettingsPreference || settingsOpen;
    const isMountingRef = (0, import_element171.useRef)(true);
    const wrapperNode = (0, import_element171.useRef)();
    const textInputRef = (0, import_element171.useRef)();
    const searchInputRef = (0, import_element171.useRef)();
    const entityUrlFallbackRef = (0, import_element171.useRef)();
    const settingsKeys = settings2.map(({ id }) => id);
    const [
      internalControlValue,
      setInternalControlValue,
      setInternalURLInputValue,
      setInternalTextInputValue,
      createSetInternalSettingValueHandler
    ] = useInternalValue(value);
    const handleInputChange = (newValue) => {
      setInternalURLInputValue(newValue);
      onInputChange?.(newValue);
    };
    const isEntity = handleEntities && !!internalControlValue?.id;
    const baseId = (0, import_compose85.useInstanceId)(LinkControl, "link-control");
    const helpTextId = isEntity ? `${baseId}__help` : null;
    const valueHasChanges = value && !(0, import_is_shallow_equal3.isShallowEqualObjects)(internalControlValue, value);
    const [isEditingLink, setIsEditingLink] = (0, import_element171.useState)(
      forceIsEditingLink !== void 0 ? forceIsEditingLink : !value || !value.url
    );
    const { createPage, isCreatingPage, errorMessage } = useCreatePage(createSuggestion);
    (0, import_element171.useEffect)(() => {
      if (forceIsEditingLink === void 0) {
        return;
      }
      setIsEditingLink(forceIsEditingLink);
    }, [forceIsEditingLink]);
    (0, import_element171.useEffect)(() => {
      if (isMountingRef.current) {
        return;
      }
      const nextFocusTarget = import_dom36.focus.focusable.find(wrapperNode.current)[0] || wrapperNode.current;
      nextFocusTarget.focus();
    }, [isEditingLink, isCreatingPage]);
    (0, import_element171.useEffect)(() => {
      isMountingRef.current = false;
      return () => {
        isMountingRef.current = true;
      };
    }, []);
    const prevInputValueRef = (0, import_element171.useRef)();
    (0, import_element171.useEffect)(() => {
      if (prevInputValueRef.current === void 0) {
        prevInputValueRef.current = propInputValue;
        return;
      }
      if (prevInputValueRef.current !== propInputValue) {
        console.warn(
          "LinkControl: The inputValue prop is uncontrolled and only sets the initial value. onInputChange is an observer for the input value. Changes to inputValue from the parent will not update the search input."
        );
        prevInputValueRef.current = propInputValue;
      }
    }, [propInputValue]);
    (0, import_element171.useEffect)(() => {
      if (customValidity?.type === "invalid") {
        const inputElement = searchInputRef.current;
        if (inputElement && typeof inputElement.reportValidity === "function") {
          inputElement.reportValidity();
        }
      }
    }, [customValidity]);
    const hasLinkValue = value?.url?.trim()?.length > 0;
    const stopEditing = () => {
      setIsEditingLink(false);
    };
    const validateUrl = (urlToValidate) => {
      const invalidResult = {
        type: "invalid",
        message: (0, import_i18n157.__)("Please enter a valid URL.")
      };
      const validResult = {
        type: "valid"
      };
      const trimmedValue = urlToValidate?.trim();
      if (!trimmedValue?.length || !isURLLike(trimmedValue)) {
        return invalidResult;
      }
      if (isHashLink(trimmedValue) || isRelativePath(trimmedValue)) {
        return validResult;
      }
      const urlToCheck = (0, import_url7.prependHTTPS)(trimmedValue);
      return (0, import_url7.isURL)(urlToCheck) ? validResult : invalidResult;
    };
    const handleSelectSuggestion = (updatedValue) => {
      const isEntitySuggestion = updatedValue && updatedValue.id && updatedValue.type && !LINK_ENTRY_TYPES.includes(updatedValue.type);
      if (!isEntitySuggestion) {
        const urlToValidate = updatedValue?.url || currentUrlInputValue;
        const validation = validateUrl(urlToValidate);
        if (validation.type === "invalid") {
          setCustomValidity(validation);
          return;
        }
        const { url: normalizedUrl } = normalizeUrl(urlToValidate);
        updatedValue = {
          ...updatedValue,
          url: normalizedUrl
        };
      }
      if (updatedValue?.kind === "taxonomy" && updatedValue?.url) {
        entityUrlFallbackRef.current = updatedValue.url;
      }
      const nonSettingsChanges = Object.keys(updatedValue).reduce(
        (acc, key) => {
          if (!settingsKeys.includes(key)) {
            acc[key] = updatedValue[key];
          }
          return acc;
        },
        {}
      );
      onChange({
        ...internalControlValue,
        ...nonSettingsChanges,
        // As title is not a setting, it must be manually applied
        // in such a way as to preserve the users changes over
        // any "title" value provided by the "suggestion".
        title: internalControlValue?.title || updatedValue?.title
      });
      setCustomValidity(void 0);
      stopEditing();
    };
    const validateAndSetValidity = () => {
      if (currentInputIsEmpty) {
        return false;
      }
      const trimmedValue = currentUrlInputValue.trim();
      const isEntityLink = internalControlValue && internalControlValue.id && internalControlValue.type && !LINK_ENTRY_TYPES.includes(internalControlValue.type);
      const urlUnchanged = value?.url === trimmedValue;
      if (isEntityLink && urlUnchanged) {
        setCustomValidity(void 0);
        return true;
      }
      const validation = validateUrl(currentUrlInputValue);
      if (validation.type === "invalid") {
        setCustomValidity(validation);
        return false;
      }
      setCustomValidity(void 0);
      return true;
    };
    const submitUrlValue = () => {
      if (valueHasChanges) {
        onChange({
          ...value,
          ...internalControlValue,
          url: normalizeUrl(currentUrlInputValue).url
        });
      }
      stopEditing();
      setCustomValidity(void 0);
    };
    const handleSubmit = () => {
      if (!validateAndSetValidity()) {
        return;
      }
      submitUrlValue();
    };
    const handleSubmitWithEnter = (event) => {
      const { keyCode } = event;
      if (keyCode === import_keycodes17.ENTER && !currentInputIsEmpty) {
        event.preventDefault();
        handleSubmit();
      }
    };
    const resetInternalValues = () => {
      setInternalControlValue(value);
    };
    const handleCancel = (event) => {
      event.preventDefault();
      event.stopPropagation();
      resetInternalValues();
      setCustomValidity(void 0);
      if (hasLinkValue) {
        stopEditing();
      } else {
        onRemove?.();
      }
      onCancel?.();
    };
    const [shouldFocusSearchInput, setShouldFocusSearchInput] = (0, import_element171.useState)(false);
    const handleUnlink = () => {
      const { id, kind, type, ...restValue } = internalControlValue;
      setInternalControlValue({
        ...restValue,
        id: void 0,
        kind: void 0,
        type: void 0,
        url: void 0
      });
      setShouldFocusSearchInput(true);
    };
    (0, import_element171.useEffect)(() => {
      if (shouldFocusSearchInput) {
        searchInputRef.current?.focus();
        setShouldFocusSearchInput(false);
      }
    }, [shouldFocusSearchInput]);
    const currentUrlInputValue = internalControlValue?.url !== void 0 ? internalControlValue.url : propInputValue || "";
    const currentInputIsEmpty = !currentUrlInputValue?.trim()?.length;
    (0, import_element171.useEffect)(() => {
      setCustomValidity(void 0);
    }, [currentUrlInputValue]);
    const isUrlValid = !customValidity;
    const shownUnlinkControl = onRemove && value && !isEditingLink && !isCreatingPage;
    const showActions = isEditingLink && hasLinkValue;
    const showTextControl = hasLinkValue && hasTextControl;
    const isEditing = (isEditingLink || !value) && !isCreatingPage;
    const isDisabled = currentInputIsEmpty || !isUrlValid || value && !valueHasChanges;
    const showSettings = !!settings2?.length && isEditingLink && hasLinkValue;
    const previewValue = (0, import_element171.useMemo)(() => {
      if (value?.kind === "taxonomy" && !value?.url && entityUrlFallbackRef.current) {
        return {
          ...value,
          url: entityUrlFallbackRef.current
        };
      }
      return value;
    }, [value]);
    return /* @__PURE__ */ (0, import_jsx_runtime321.jsxs)(
      "div",
      {
        tabIndex: -1,
        ref: wrapperNode,
        className: "block-editor-link-control",
        children: [
          isCreatingPage && /* @__PURE__ */ (0, import_jsx_runtime321.jsxs)("div", { className: "block-editor-link-control__loading", children: [
            /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(import_components170.Spinner, {}),
            " ",
            (0, import_i18n157.__)("Creating"),
            "\u2026"
          ] }),
          isEditing && /* @__PURE__ */ (0, import_jsx_runtime321.jsxs)(import_jsx_runtime321.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime321.jsxs)(
              "div",
              {
                className: clsx_default({
                  "block-editor-link-control__search-input-wrapper": true,
                  "has-text-control": showTextControl,
                  "has-actions": showActions
                }),
                children: [
                  showTextControl && /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(
                    import_components170.TextControl,
                    {
                      ref: textInputRef,
                      className: "block-editor-link-control__field block-editor-link-control__text-content",
                      label: (0, import_i18n157.__)("Text"),
                      value: internalControlValue?.title,
                      onChange: setInternalTextInputValue,
                      onKeyDown: handleSubmitWithEnter,
                      __next40pxDefaultSize: true
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(
                    search_input_default,
                    {
                      ref: searchInputRef,
                      currentLink: value,
                      className: "block-editor-link-control__field block-editor-link-control__search-input",
                      placeholder: searchInputPlaceholder,
                      value: currentUrlInputValue,
                      withCreateSuggestion,
                      onCreateSuggestion: createPage,
                      onChange: handleInputChange,
                      onSelect: handleSelectSuggestion,
                      showInitialSuggestions,
                      allowDirectEntry: !noDirectEntry,
                      showSuggestions,
                      suggestionsQuery,
                      withURLSuggestion: !noURLSuggestion,
                      createSuggestionButtonText,
                      hideLabelFromVision: !showTextControl,
                      isEntity,
                      customValidity,
                      suffix: /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(
                        SearchSuffixControl,
                        {
                          isEntity,
                          showActions,
                          isDisabled,
                          onUnlink: handleUnlink,
                          onSubmit: handleSubmit,
                          helpTextId
                        }
                      )
                    }
                  ),
                  isEntity && helpTextId && /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(
                    "p",
                    {
                      id: helpTextId,
                      className: "block-editor-link-control__help",
                      children: (0, import_i18n157.sprintf)(
                        /* translators: %s: entity type (e.g., page, post) */
                        (0, import_i18n157.__)("Synced with the selected %s."),
                        internalControlValue?.type || "item"
                      )
                    }
                  )
                ]
              }
            ),
            errorMessage && /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(
              import_components170.Notice,
              {
                className: "block-editor-link-control__search-error",
                status: "error",
                isDismissible: false,
                children: errorMessage
              }
            )
          ] }),
          value && !isEditingLink && !isCreatingPage && /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(
            LinkPreview,
            {
              value: previewValue,
              onEditClick: () => setIsEditingLink(true),
              hasRichPreviews,
              hasUnlinkControl: shownUnlinkControl,
              onRemove: () => {
                onRemove();
                setIsEditingLink(true);
              }
            },
            previewValue?.url
          ),
          showSettings && /* @__PURE__ */ (0, import_jsx_runtime321.jsx)("div", { className: "block-editor-link-control__tools", children: !currentInputIsEmpty && /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(
            settings_drawer_default,
            {
              settingsOpen: isSettingsOpen,
              setSettingsOpen: setSettingsOpenWithPreference,
              children: /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(
                settings_default2,
                {
                  value: internalControlValue,
                  settings: settings2,
                  onChange: createSetInternalSettingValueHandler(
                    settingsKeys
                  )
                }
              )
            }
          ) }),
          showActions && /* @__PURE__ */ (0, import_jsx_runtime321.jsxs)(
            import_components170.__experimentalHStack,
            {
              justify: "right",
              className: "block-editor-link-control__search-actions",
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(
                  import_components170.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "tertiary",
                    onClick: handleCancel,
                    children: (0, import_i18n157.__)("Cancel")
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(
                  import_components170.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "primary",
                    onClick: isDisabled ? noop15 : handleSubmit,
                    className: "block-editor-link-control__search-submit",
                    "aria-disabled": isDisabled,
                    children: (0, import_i18n157.__)("Apply")
                  }
                )
              ]
            }
          ),
          !isCreatingPage && renderControlBottom && renderControlBottom()
        ]
      }
    );
  }
  function SearchSuffixControl({
    isEntity,
    showActions,
    isDisabled,
    onUnlink,
    onSubmit,
    helpTextId
  }) {
    if (isEntity) {
      return /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(
        import_components170.Button,
        {
          icon: link_off_default,
          onClick: onUnlink,
          "aria-describedby": helpTextId,
          showTooltip: true,
          label: (0, import_i18n157.__)("Unsync and edit"),
          __next40pxDefaultSize: true
        }
      );
    }
    if (showActions) {
      return void 0;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(import_components170.__experimentalInputControlSuffixWrapper, { variant: "control", children: /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(
      import_components170.Button,
      {
        onClick: isDisabled ? noop15 : onSubmit,
        label: (0, import_i18n157.__)("Submit"),
        icon: keyboard_return_default,
        className: "block-editor-link-control__search-submit",
        "aria-disabled": isDisabled,
        size: "small"
      }
    ) });
  }
  LinkControl.ViewerFill = ViewerFill;
  LinkControl.DEFAULT_LINK_SETTINGS = DEFAULT_LINK_SETTINGS;
  var DeprecatedExperimentalLinkControl = (props) => {
    (0, import_deprecated23.default)("wp.blockEditor.__experimentalLinkControl", {
      since: "6.8",
      alternative: "wp.blockEditor.LinkControl"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(LinkControl, { ...props });
  };
  DeprecatedExperimentalLinkControl.ViewerFill = LinkControl.ViewerFill;
  DeprecatedExperimentalLinkControl.DEFAULT_LINK_SETTINGS = LinkControl.DEFAULT_LINK_SETTINGS;
  var link_control_default = LinkControl;

  // packages/block-editor/build-module/components/line-height-control/index.mjs
  var import_i18n158 = __toESM(require_i18n(), 1);
  var import_components171 = __toESM(require_components(), 1);
  var import_deprecated24 = __toESM(require_deprecated(), 1);

  // packages/block-editor/build-module/components/line-height-control/utils.mjs
  var BASE_DEFAULT_VALUE = 1.5;
  var STEP = 0.01;
  var SPIN_FACTOR = 10;
  var RESET_VALUE = "";
  function isLineHeightDefined(lineHeight) {
    return lineHeight !== void 0 && lineHeight !== RESET_VALUE;
  }

  // packages/block-editor/build-module/components/line-height-control/index.mjs
  var import_jsx_runtime322 = __toESM(require_jsx_runtime(), 1);
  var LineHeightControl = ({
    /** Start opting into the larger default height that will become the default size in a future version. */
    __next40pxDefaultSize = false,
    value: lineHeight,
    onChange,
    __unstableInputWidth = "60px",
    ...otherProps
  }) => {
    const isDefined = isLineHeightDefined(lineHeight);
    const adjustNextValue = (nextValue, wasTypedOrPasted) => {
      if (isDefined) {
        return nextValue;
      }
      const spin = STEP * SPIN_FACTOR;
      switch (`${nextValue}`) {
        case `${spin}`:
          return BASE_DEFAULT_VALUE + spin;
        case "0": {
          if (wasTypedOrPasted) {
            return nextValue;
          }
          return BASE_DEFAULT_VALUE - spin;
        }
        case "":
          return BASE_DEFAULT_VALUE;
        default:
          return nextValue;
      }
    };
    const stateReducer = (state, action) => {
      const wasTypedOrPasted = ["insertText", "insertFromPaste"].includes(
        action.payload.event.nativeEvent?.inputType
      );
      const value2 = adjustNextValue(state.value, wasTypedOrPasted);
      return { ...state, value: value2 };
    };
    const value = isDefined ? lineHeight : RESET_VALUE;
    const handleOnChange = (nextValue, { event }) => {
      if (nextValue === "") {
        onChange();
        return;
      }
      if (event.type === "click") {
        onChange(adjustNextValue(`${nextValue}`, false));
        return;
      }
      onChange(`${nextValue}`);
    };
    if (!__next40pxDefaultSize && (otherProps.size === void 0 || otherProps.size === "default")) {
      (0, import_deprecated24.default)(`36px default size for wp.blockEditor.LineHeightControl`, {
        since: "6.8",
        version: "7.1",
        hint: "Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."
      });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("div", { className: "block-editor-line-height-control", children: /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
      import_components171.__experimentalNumberControl,
      {
        ...otherProps,
        __shouldNotWarnDeprecated36pxSize: true,
        __next40pxDefaultSize,
        __unstableInputWidth,
        __unstableStateReducer: stateReducer,
        onChange: handleOnChange,
        label: (0, import_i18n158.__)("Line height"),
        placeholder: BASE_DEFAULT_VALUE,
        step: STEP,
        spinFactor: SPIN_FACTOR,
        value,
        min: 0,
        spinControls: "custom"
      }
    ) });
  };
  var line_height_control_default = LineHeightControl;

  // packages/block-editor/build-module/components/media-replace-flow/index.mjs
  var import_i18n159 = __toESM(require_i18n(), 1);
  var import_a11y18 = __toESM(require_a11y(), 1);
  var import_components172 = __toESM(require_components(), 1);
  var import_data147 = __toESM(require_data(), 1);
  var import_keycodes18 = __toESM(require_keycodes(), 1);
  var import_compose86 = __toESM(require_compose(), 1);
  var import_dom37 = __toESM(require_dom(), 1);
  var import_notices10 = __toESM(require_notices(), 1);
  var import_element172 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/media-placeholder/utils.mjs
  function getComputedAcceptAttribute(allowedTypes, allowedMimeTypes, accept) {
    if (accept) {
      return accept;
    }
    if (!allowedMimeTypes || typeof allowedMimeTypes !== "object" || Object.keys(allowedMimeTypes).length === 0) {
      if (allowedTypes && allowedTypes.length > 0) {
        return allowedTypes.map((type) => `${type}/*`).join(",");
      }
      return void 0;
    }
    if (!allowedTypes || allowedTypes.length === 0) {
      return void 0;
    }
    const acceptedMimeTypes = [];
    for (const [, mimeType] of Object.entries(allowedMimeTypes)) {
      const isAllowed = allowedTypes.some((allowedType) => {
        if (allowedType.includes("/")) {
          return mimeType === allowedType;
        }
        return mimeType.startsWith(`${allowedType}/`);
      });
      if (isAllowed) {
        acceptedMimeTypes.push(mimeType);
      }
    }
    if (acceptedMimeTypes.length > 0) {
      return acceptedMimeTypes.join(",");
    }
    return allowedTypes.map((type) => `${type}/*`).join(",");
  }

  // packages/block-editor/build-module/components/media-replace-flow/index.mjs
  var import_jsx_runtime323 = __toESM(require_jsx_runtime(), 1);
  var noop16 = () => {
  };
  var uniqueId = 0;
  var MediaReplaceFlow = ({
    mediaURL,
    mediaId,
    mediaIds,
    allowedTypes,
    accept,
    onError,
    onSelect,
    onSelectURL,
    onReset,
    onToggleFeaturedImage,
    useFeaturedImage,
    onFilesUpload = noop16,
    name = (0, import_i18n159.__)("Replace"),
    createNotice,
    removeNotice,
    children,
    multiple = false,
    addToGallery,
    handleUpload = true,
    variant,
    popoverProps: popoverProps3,
    renderToggle: renderToggle3,
    className
  }) => {
    const { mediaUpload: mediaUpload2, allowedMimeTypes } = (0, import_data147.useSelect)((select3) => {
      const { getSettings: getSettings7 } = select3(store);
      const settings2 = getSettings7();
      return {
        mediaUpload: settings2.mediaUpload,
        allowedMimeTypes: settings2.allowedMimeTypes
      };
    }, []);
    const errorNoticeID = `block-editor/media-replace-flow/error-notice/${++uniqueId}`;
    const computedAccept = (0, import_element172.useMemo)(
      () => getComputedAcceptAttribute(
        allowedTypes,
        allowedMimeTypes,
        accept
      ),
      [allowedTypes, allowedMimeTypes, accept]
    );
    const onUploadError = (message2) => {
      const safeMessage = (0, import_dom37.__unstableStripHTML)(message2);
      if (onError) {
        onError(safeMessage);
        return;
      }
      setTimeout(() => {
        createNotice("error", safeMessage, {
          speak: true,
          id: errorNoticeID,
          isDismissible: true
        });
      }, 1e3);
    };
    const selectMedia = (media, closeMenu) => {
      if (useFeaturedImage && onToggleFeaturedImage) {
        onToggleFeaturedImage();
      }
      closeMenu();
      onSelect(media);
      (0, import_a11y18.speak)((0, import_i18n159.__)("The media file has been replaced"));
      removeNotice(errorNoticeID);
    };
    const uploadFiles = (event, closeMenu) => {
      const files = event.target.files;
      if (!handleUpload) {
        closeMenu();
        return onSelect(files);
      }
      onFilesUpload(files);
      mediaUpload2({
        allowedTypes,
        filesList: files,
        onFileChange: ([media]) => {
          selectMedia(media, closeMenu);
        },
        onError: onUploadError
      });
    };
    const openOnArrowDown = (event) => {
      if (event.keyCode === import_keycodes18.DOWN) {
        event.preventDefault();
        event.target.click();
      }
    };
    const onlyAllowsImages = () => {
      if (!allowedTypes || allowedTypes.length === 0) {
        return false;
      }
      return allowedTypes.every(
        (allowedType) => allowedType === "image" || allowedType.startsWith("image/")
      );
    };
    const gallery = multiple && onlyAllowsImages();
    const mergedPopoverProps = {
      ...popoverProps3,
      variant
    };
    return /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
      import_components172.Dropdown,
      {
        popoverProps: mergedPopoverProps,
        className,
        contentClassName: clsx_default(
          "block-editor-media-replace-flow__options",
          variant && `is-variant-${variant}`
        ),
        renderToggle: ({ isOpen, onToggle }) => {
          if (renderToggle3) {
            return renderToggle3({
              "aria-expanded": isOpen,
              "aria-haspopup": "true",
              onClick: onToggle,
              onKeyDown: openOnArrowDown,
              children: name
            });
          }
          return /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
            import_components172.ToolbarButton,
            {
              "aria-expanded": isOpen,
              "aria-haspopup": "true",
              onClick: onToggle,
              onKeyDown: openOnArrowDown,
              children: name
            }
          );
        },
        renderContent: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime323.jsxs)(import_jsx_runtime323.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime323.jsxs)(import_components172.NavigableMenu, { className: "block-editor-media-replace-flow__media-upload-menu", children: [
            /* @__PURE__ */ (0, import_jsx_runtime323.jsxs)(check_default2, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
                media_upload_default,
                {
                  gallery,
                  addToGallery,
                  multiple,
                  value: multiple ? mediaIds : mediaId,
                  onSelect: (media) => selectMedia(media, onClose),
                  allowedTypes,
                  render: ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
                    import_components172.MenuItem,
                    {
                      icon: media_default,
                      onClick: open,
                      children: (0, import_i18n159.__)("Open Media Library")
                    }
                  )
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
                import_components172.FormFileUpload,
                {
                  onChange: (event) => {
                    uploadFiles(event, onClose);
                  },
                  accept: computedAccept,
                  multiple: !!multiple,
                  render: ({ openFileDialog }) => {
                    return /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
                      import_components172.MenuItem,
                      {
                        icon: upload_default,
                        onClick: () => {
                          openFileDialog();
                        },
                        children: (0, import_i18n159._x)("Upload", "verb")
                      }
                    );
                  }
                }
              )
            ] }),
            onToggleFeaturedImage && /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
              import_components172.MenuItem,
              {
                icon: post_featured_image_default,
                onClick: onToggleFeaturedImage,
                isPressed: useFeaturedImage,
                children: (0, import_i18n159.__)("Use featured image")
              }
            ),
            typeof children === "function" ? children({ onClose }) : children,
            mediaURL && onReset && /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
              import_components172.MenuItem,
              {
                onClick: () => {
                  onReset();
                  onClose();
                },
                children: (0, import_i18n159.__)("Reset")
              }
            )
          ] }),
          onSelectURL && /* @__PURE__ */ (0, import_jsx_runtime323.jsxs)("form", { className: "block-editor-media-flow__url-input", children: [
            /* @__PURE__ */ (0, import_jsx_runtime323.jsx)("span", { className: "block-editor-media-replace-flow__image-url-label", children: (0, import_i18n159.__)("Current media URL:") }),
            /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
              link_control_default,
              {
                value: { url: mediaURL },
                settings: [],
                showSuggestions: false,
                onChange: ({ url }) => {
                  onSelectURL(url);
                },
                searchInputPlaceholder: (0, import_i18n159.__)(
                  "Paste or type URL"
                )
              }
            )
          ] })
        ] })
      }
    );
  };
  var media_replace_flow_default = (0, import_compose86.compose)([
    (0, import_data147.withDispatch)((dispatch) => {
      const { createNotice, removeNotice } = dispatch(import_notices10.store);
      return {
        createNotice,
        removeNotice
      };
    }),
    (0, import_components172.withFilters)("editor.MediaReplaceFlow")
  ])(MediaReplaceFlow);

  // packages/block-editor/build-module/components/media-placeholder/index.mjs
  var import_components178 = __toESM(require_components(), 1);
  var import_i18n164 = __toESM(require_i18n(), 1);
  var import_element175 = __toESM(require_element(), 1);
  var import_data149 = __toESM(require_data(), 1);
  var import_deprecated26 = __toESM(require_deprecated(), 1);

  // packages/block-editor/build-module/components/url-popover/index.mjs
  var import_i18n163 = __toESM(require_i18n(), 1);
  var import_element174 = __toESM(require_element(), 1);
  var import_components177 = __toESM(require_components(), 1);
  var import_deprecated25 = __toESM(require_deprecated(), 1);

  // packages/block-editor/build-module/components/url-popover/link-viewer.mjs
  var import_i18n160 = __toESM(require_i18n(), 1);
  var import_components174 = __toESM(require_components(), 1);

  // packages/block-editor/build-module/components/url-popover/link-viewer-url.mjs
  var import_components173 = __toESM(require_components(), 1);
  var import_url8 = __toESM(require_url(), 1);
  var import_jsx_runtime324 = __toESM(require_jsx_runtime(), 1);
  function LinkViewerURL({ url, urlLabel, className }) {
    const linkClassName = clsx_default(
      className,
      "block-editor-url-popover__link-viewer-url"
    );
    if (!url) {
      return /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("span", { className: linkClassName });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(import_components173.ExternalLink, { className: linkClassName, href: url, children: urlLabel || (0, import_url8.filterURLForDisplay)((0, import_url8.safeDecodeURI)(url)) });
  }

  // packages/block-editor/build-module/components/url-popover/link-viewer.mjs
  var import_jsx_runtime325 = __toESM(require_jsx_runtime(), 1);
  function LinkViewer({
    className,
    linkClassName,
    onEditLinkClick,
    url,
    urlLabel,
    ...props
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime325.jsxs)(
      "div",
      {
        className: clsx_default(
          "block-editor-url-popover__link-viewer",
          className
        ),
        ...props,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
            LinkViewerURL,
            {
              url,
              urlLabel,
              className: linkClassName
            }
          ),
          onEditLinkClick && /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
            import_components174.Button,
            {
              icon: pencil_default,
              label: (0, import_i18n160.__)("Edit"),
              onClick: onEditLinkClick,
              size: "compact"
            }
          )
        ]
      }
    );
  }

  // packages/block-editor/build-module/components/url-popover/link-editor.mjs
  var import_i18n162 = __toESM(require_i18n(), 1);
  var import_components176 = __toESM(require_components(), 1);

  // packages/block-editor/build-module/components/url-input/index.mjs
  var import_i18n161 = __toESM(require_i18n(), 1);
  var import_element173 = __toESM(require_element(), 1);
  var import_keycodes19 = __toESM(require_keycodes(), 1);
  var import_components175 = __toESM(require_components(), 1);
  var import_compose87 = __toESM(require_compose(), 1);
  var import_data148 = __toESM(require_data(), 1);
  var import_url9 = __toESM(require_url(), 1);
  var import_jsx_runtime326 = __toESM(require_jsx_runtime(), 1);
  var import_react4 = __toESM(require_react(), 1);
  var { ValidatedInputControl } = unlock(import_components175.privateApis);
  function isFunction(maybeFunc) {
    return typeof maybeFunc === "function";
  }
  var URLInput = class extends import_element173.Component {
    constructor(props) {
      super(props);
      this.onChange = this.onChange.bind(this);
      this.onFocus = this.onFocus.bind(this);
      this.onKeyDown = this.onKeyDown.bind(this);
      this.selectLink = this.selectLink.bind(this);
      this.handleOnClick = this.handleOnClick.bind(this);
      this.bindSuggestionNode = this.bindSuggestionNode.bind(this);
      this.autocompleteRef = props.autocompleteRef || (0, import_element173.createRef)();
      this.inputRef = props.inputRef || (0, import_element173.createRef)();
      this.hasRenderedValidation = { current: false };
      this.updateSuggestions = (0, import_compose87.debounce)(
        this.updateSuggestions.bind(this),
        200
      );
      this.suggestionNodes = [];
      this.suggestionsRequest = null;
      this.state = {
        suggestions: [],
        showSuggestions: false,
        suggestionsValue: null,
        selectedSuggestion: null,
        suggestionsListboxId: "",
        suggestionOptionIdPrefix: ""
      };
    }
    componentDidUpdate(prevProps) {
      const { showSuggestions, selectedSuggestion } = this.state;
      const { value, __experimentalShowInitialSuggestions = false } = this.props;
      if (showSuggestions && selectedSuggestion !== null && this.suggestionNodes[selectedSuggestion]) {
        this.suggestionNodes[selectedSuggestion].scrollIntoView({
          behavior: "instant",
          block: "nearest",
          inline: "nearest"
        });
      }
      if (prevProps.value !== value && !this.props.disableSuggestions) {
        if (value?.length) {
          this.updateSuggestions(value);
        } else if (__experimentalShowInitialSuggestions) {
          this.updateSuggestions();
        }
      }
    }
    componentDidMount() {
      if (this.shouldShowInitialSuggestions()) {
        this.updateSuggestions();
      }
    }
    componentWillUnmount() {
      this.suggestionsRequest?.cancel?.();
      this.suggestionsRequest = null;
    }
    bindSuggestionNode(index) {
      return (ref) => {
        this.suggestionNodes[index] = ref;
      };
    }
    shouldShowInitialSuggestions() {
      const { __experimentalShowInitialSuggestions = false, value } = this.props;
      return __experimentalShowInitialSuggestions && !(value && value.length);
    }
    updateSuggestions(value = "") {
      const {
        __experimentalFetchLinkSuggestions: fetchLinkSuggestions,
        __experimentalHandleURLSuggestions: handleURLSuggestions
      } = this.props;
      if (!fetchLinkSuggestions) {
        return;
      }
      const isInitialSuggestions = !value?.length;
      value = value.trim();
      if (!isInitialSuggestions && (value.length < 2 || !handleURLSuggestions && (0, import_url9.isURL)(value))) {
        this.suggestionsRequest?.cancel?.();
        this.suggestionsRequest = null;
        this.setState({
          suggestions: [],
          showSuggestions: false,
          suggestionsValue: value,
          selectedSuggestion: null,
          loading: false
        });
        return;
      }
      this.setState({
        selectedSuggestion: null,
        loading: true
      });
      const request = fetchLinkSuggestions(value, {
        isInitialSuggestions
      });
      request.then((suggestions) => {
        if (this.suggestionsRequest !== request) {
          return;
        }
        this.setState({
          suggestions,
          suggestionsValue: value,
          loading: false,
          showSuggestions: !!suggestions.length
        });
        if (!!suggestions.length) {
          this.props.debouncedSpeak(
            (0, import_i18n161.sprintf)(
              /* translators: %d: number of results. */
              (0, import_i18n161._n)(
                "%d result found, use up and down arrow keys to navigate.",
                "%d results found, use up and down arrow keys to navigate.",
                suggestions.length
              ),
              suggestions.length
            ),
            "assertive"
          );
        } else {
          this.props.debouncedSpeak(
            (0, import_i18n161.__)("No results."),
            "assertive"
          );
        }
      }).catch(() => {
        if (this.suggestionsRequest !== request) {
          return;
        }
        this.setState({
          loading: false
        });
      }).finally(() => {
        if (this.suggestionsRequest === request) {
          this.suggestionsRequest = null;
        }
      });
      this.suggestionsRequest = request;
    }
    onChange(newValue) {
      this.props.onChange(newValue);
    }
    onFocus() {
      const { suggestions } = this.state;
      const { disableSuggestions, value } = this.props;
      if (value && !disableSuggestions && !(suggestions && suggestions.length) && this.suggestionsRequest === null) {
        this.updateSuggestions(value);
      }
    }
    onKeyDown(event) {
      this.props.onKeyDown?.(event);
      const { showSuggestions, selectedSuggestion, suggestions, loading } = this.state;
      if (!showSuggestions || !suggestions.length || loading) {
        switch (event.keyCode) {
          // When UP is pressed, if the caret is at the start of the text, move it to the 0
          // position.
          case import_keycodes19.UP: {
            if (0 !== event.target.selectionStart) {
              event.preventDefault();
              event.target.setSelectionRange(0, 0);
            }
            break;
          }
          // When DOWN is pressed, if the caret is not at the end of the text, move it to the
          // last position.
          case import_keycodes19.DOWN: {
            if (this.props.value.length !== event.target.selectionStart) {
              event.preventDefault();
              event.target.setSelectionRange(
                this.props.value.length,
                this.props.value.length
              );
            }
            break;
          }
          // Submitting while loading should trigger onSubmit.
          case import_keycodes19.ENTER: {
            if (this.props.onSubmit) {
              event.preventDefault();
              this.props.onSubmit(null, event);
            }
            break;
          }
        }
        return;
      }
      const suggestion = this.state.suggestions[this.state.selectedSuggestion];
      switch (event.keyCode) {
        case import_keycodes19.UP: {
          event.preventDefault();
          const previousIndex = !selectedSuggestion ? suggestions.length - 1 : selectedSuggestion - 1;
          this.setState({
            selectedSuggestion: previousIndex
          });
          break;
        }
        case import_keycodes19.DOWN: {
          event.preventDefault();
          const nextIndex = selectedSuggestion === null || selectedSuggestion === suggestions.length - 1 ? 0 : selectedSuggestion + 1;
          this.setState({
            selectedSuggestion: nextIndex
          });
          break;
        }
        case import_keycodes19.TAB: {
          if (this.state.selectedSuggestion !== null) {
            this.selectLink(suggestion);
            this.props.speak((0, import_i18n161.__)("Link selected."));
          }
          break;
        }
        case import_keycodes19.ENTER: {
          event.preventDefault();
          if (this.state.selectedSuggestion !== null) {
            this.selectLink(suggestion);
            if (this.props.onSubmit) {
              this.props.onSubmit(suggestion, event);
            }
          } else if (this.props.onSubmit) {
            this.props.onSubmit(null, event);
          }
          break;
        }
      }
    }
    selectLink(suggestion) {
      this.props.onChange(suggestion.url, suggestion);
      this.setState({
        selectedSuggestion: null,
        showSuggestions: false
      });
    }
    handleOnClick(suggestion) {
      this.selectLink(suggestion);
      this.inputRef.current.focus();
    }
    static getDerivedStateFromProps({
      value,
      instanceId,
      disableSuggestions,
      __experimentalShowInitialSuggestions = false
    }, { showSuggestions }) {
      let shouldShowSuggestions = showSuggestions;
      const hasValue = value && value.length;
      if (!__experimentalShowInitialSuggestions && !hasValue) {
        shouldShowSuggestions = false;
      }
      if (disableSuggestions === true) {
        shouldShowSuggestions = false;
      }
      return {
        showSuggestions: shouldShowSuggestions,
        suggestionsListboxId: `block-editor-url-input-suggestions-${instanceId}`,
        suggestionOptionIdPrefix: `block-editor-url-input-suggestion-${instanceId}`
      };
    }
    render() {
      return /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)(import_jsx_runtime326.Fragment, { children: [
        this.renderControl(),
        this.renderSuggestions()
      ] });
    }
    renderControl() {
      const {
        label = null,
        className,
        isFullWidth,
        instanceId,
        placeholder = (0, import_i18n161.__)("Paste URL or type to search"),
        __experimentalRenderControl: renderControl,
        value = "",
        hideLabelFromVision = false,
        help = null,
        disabled = false,
        customValidity,
        markWhenOptional
      } = this.props;
      const {
        loading,
        showSuggestions,
        selectedSuggestion,
        suggestionsListboxId,
        suggestionOptionIdPrefix
      } = this.state;
      const inputId = `url-input-control-${instanceId}`;
      const controlProps = {
        id: inputId,
        // Passes attribute to label for the for attribute
        label,
        className: clsx_default("block-editor-url-input", className, {
          "is-full-width": isFullWidth
        }),
        hideLabelFromVision
      };
      const inputProps = {
        id: inputId,
        value,
        required: this.props.required ?? true,
        type: "text",
        name: inputId,
        autoComplete: "off",
        onChange: disabled ? () => {
        } : this.onChange,
        // Disable onChange when disabled
        onFocus: disabled ? () => {
        } : this.onFocus,
        // Disable onFocus when disabled
        placeholder,
        onKeyDown: disabled ? () => {
        } : this.onKeyDown,
        // Disable onKeyDown when disabled
        role: "combobox",
        "aria-label": label ? void 0 : (0, import_i18n161.__)("URL"),
        // Ensure input always has an accessible label
        "aria-expanded": showSuggestions,
        "aria-autocomplete": "list",
        "aria-owns": suggestionsListboxId,
        "aria-activedescendant": selectedSuggestion !== null ? `${suggestionOptionIdPrefix}-${selectedSuggestion}` : void 0,
        ref: this.inputRef,
        disabled,
        suffix: this.props.suffix,
        help
      };
      const validationProps = {
        customValidity,
        // Suppress the "(Required)" indicator in the label.
        // The field is still required for validation, but the indicator
        // can be hidden when markWhenOptional is set to true.
        ...markWhenOptional !== void 0 && {
          markWhenOptional
        }
      };
      if (renderControl) {
        return renderControl(controlProps, inputProps, loading);
      }
      if (customValidity !== void 0) {
        this.hasRenderedValidation.current = true;
      }
      const MaybeValidatedInputControl = this.hasRenderedValidation.current ? ValidatedInputControl : import_components175.__experimentalInputControl;
      return /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)(import_components175.BaseControl, { ...controlProps, children: [
        /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
          MaybeValidatedInputControl,
          {
            ...inputProps,
            ...this.hasRenderedValidation.current ? validationProps : {},
            __next40pxDefaultSize: true
          }
        ),
        loading && /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(import_components175.Spinner, {})
      ] });
    }
    renderSuggestions() {
      const {
        className,
        __experimentalRenderSuggestions: renderSuggestions
      } = this.props;
      const {
        showSuggestions,
        suggestions,
        suggestionsValue,
        selectedSuggestion,
        suggestionsListboxId,
        suggestionOptionIdPrefix,
        loading
      } = this.state;
      if (!showSuggestions || suggestions.length === 0) {
        return null;
      }
      const suggestionsListProps = {
        id: suggestionsListboxId,
        ref: this.autocompleteRef,
        role: "listbox"
      };
      const buildSuggestionItemProps = (suggestion, index) => {
        return {
          role: "option",
          tabIndex: "-1",
          id: `${suggestionOptionIdPrefix}-${index}`,
          ref: this.bindSuggestionNode(index),
          "aria-selected": index === selectedSuggestion ? true : void 0
        };
      };
      if (isFunction(renderSuggestions)) {
        return renderSuggestions({
          suggestions,
          selectedSuggestion,
          suggestionsListProps,
          buildSuggestionItemProps,
          isLoading: loading,
          handleSuggestionClick: this.handleOnClick,
          isInitialSuggestions: !suggestionsValue?.length,
          currentInputValue: suggestionsValue
        });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(import_components175.Popover, { placement: "bottom", focusOnMount: false, children: /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
        "div",
        {
          ...suggestionsListProps,
          className: clsx_default("block-editor-url-input__suggestions", {
            [`${className}__suggestions`]: className
          }),
          children: suggestions.map((suggestion, index) => /* @__PURE__ */ (0, import_react4.createElement)(
            import_components175.Button,
            {
              __next40pxDefaultSize: true,
              ...buildSuggestionItemProps(suggestion, index),
              key: suggestion.id,
              className: clsx_default(
                "block-editor-url-input__suggestion",
                {
                  "is-selected": index === selectedSuggestion
                }
              ),
              onClick: () => this.handleOnClick(suggestion)
            },
            suggestion.title
          ))
        }
      ) });
    }
  };
  var url_input_default = (0, import_compose87.compose)(
    import_compose87.withSafeTimeout,
    import_components175.withSpokenMessages,
    import_compose87.withInstanceId,
    (0, import_data148.withSelect)((select3, props) => {
      if (isFunction(props.__experimentalFetchLinkSuggestions)) {
        return;
      }
      const { getSettings: getSettings7 } = select3(store);
      return {
        __experimentalFetchLinkSuggestions: getSettings7().__experimentalFetchLinkSuggestions
      };
    })
  )(URLInput);

  // packages/block-editor/build-module/components/url-popover/link-editor.mjs
  var import_jsx_runtime327 = __toESM(require_jsx_runtime(), 1);
  function LinkEditor({
    autocompleteRef,
    className,
    onChangeInputValue,
    value,
    ...props
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)(
      "form",
      {
        className: clsx_default(
          "block-editor-url-popover__link-editor",
          className
        ),
        ...props,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
            url_input_default,
            {
              value,
              onChange: onChangeInputValue,
              autocompleteRef
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
            import_components176.Button,
            {
              icon: keyboard_return_default,
              label: (0, import_i18n162.__)("Apply"),
              type: "submit",
              size: "compact"
            }
          )
        ]
      }
    );
  }

  // packages/block-editor/build-module/components/url-popover/index.mjs
  var import_jsx_runtime328 = __toESM(require_jsx_runtime(), 1);
  var { __experimentalPopoverLegacyPositionToPlacement } = unlock(
    import_components177.privateApis
  );
  var DEFAULT_PLACEMENT = "bottom";
  var URLPopover = (0, import_element174.forwardRef)(
    ({
      additionalControls,
      children,
      renderSettings,
      // The DEFAULT_PLACEMENT value is assigned inside the function's body
      placement,
      focusOnMount = "firstElement",
      // Deprecated
      position,
      // Rest
      ...popoverProps3
    }, ref) => {
      if (position !== void 0) {
        (0, import_deprecated25.default)("`position` prop in wp.blockEditor.URLPopover", {
          since: "6.2",
          alternative: "`placement` prop"
        });
      }
      let computedPlacement;
      if (placement !== void 0) {
        computedPlacement = placement;
      } else if (position !== void 0) {
        computedPlacement = __experimentalPopoverLegacyPositionToPlacement(position);
      }
      computedPlacement = computedPlacement || DEFAULT_PLACEMENT;
      const [isSettingsExpanded, setIsSettingsExpanded] = (0, import_element174.useState)(false);
      const showSettings = !!renderSettings && isSettingsExpanded;
      const toggleSettingsVisibility = () => {
        setIsSettingsExpanded(!isSettingsExpanded);
      };
      return /* @__PURE__ */ (0, import_jsx_runtime328.jsxs)(
        import_components177.Popover,
        {
          ref,
          role: "dialog",
          "aria-modal": "true",
          "aria-label": (0, import_i18n163.__)("Edit URL"),
          className: "block-editor-url-popover",
          focusOnMount,
          placement: computedPlacement,
          shift: true,
          variant: "toolbar",
          ...popoverProps3,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime328.jsx)("div", { className: "block-editor-url-popover__input-container", children: /* @__PURE__ */ (0, import_jsx_runtime328.jsxs)("div", { className: "block-editor-url-popover__row", children: [
              children,
              !!renderSettings && /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
                import_components177.Button,
                {
                  className: "block-editor-url-popover__settings-toggle",
                  icon: chevron_down_default,
                  label: (0, import_i18n163.__)("Link settings"),
                  onClick: toggleSettingsVisibility,
                  "aria-expanded": isSettingsExpanded,
                  size: "compact"
                }
              )
            ] }) }),
            showSettings && /* @__PURE__ */ (0, import_jsx_runtime328.jsx)("div", { className: "block-editor-url-popover__settings", children: renderSettings() }),
            additionalControls && !showSettings && /* @__PURE__ */ (0, import_jsx_runtime328.jsx)("div", { className: "block-editor-url-popover__additional-controls", children: additionalControls })
          ]
        }
      );
    }
  );
  URLPopover.LinkEditor = LinkEditor;
  URLPopover.LinkViewer = LinkViewer;
  var url_popover_default = URLPopover;

  // packages/block-editor/build-module/components/media-placeholder/index.mjs
  var import_jsx_runtime329 = __toESM(require_jsx_runtime(), 1);
  var noop17 = () => {
  };
  var InsertFromURLPopover = ({
    src,
    onChange,
    onSubmit,
    onClose,
    popoverAnchor
  }) => /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(url_popover_default, { anchor: popoverAnchor, onClose, children: /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
    "form",
    {
      className: "block-editor-media-placeholder__url-input-form",
      onSubmit,
      children: /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
        import_components178.__experimentalInputControl,
        {
          __next40pxDefaultSize: true,
          label: (0, import_i18n164.__)("URL"),
          type: "text",
          hideLabelFromVision: true,
          placeholder: (0, import_i18n164.__)("Paste or type URL"),
          onChange,
          value: src,
          suffix: /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(import_components178.__experimentalInputControlSuffixWrapper, { variant: "control", children: /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
            import_components178.Button,
            {
              size: "small",
              icon: keyboard_return_default,
              label: (0, import_i18n164.__)("Apply"),
              type: "submit"
            }
          ) })
        }
      )
    }
  ) });
  var URLSelectionUI = ({ src, onChangeSrc, onSelectURL }) => {
    const [popoverAnchor, setPopoverAnchor] = (0, import_element175.useState)(null);
    const [isURLInputVisible, setIsURLInputVisible] = (0, import_element175.useState)(false);
    const openURLInput = () => {
      setIsURLInputVisible(true);
    };
    const closeURLInput = () => {
      setIsURLInputVisible(false);
      popoverAnchor?.focus();
    };
    const onSubmitSrc = (event) => {
      event.preventDefault();
      if (src && onSelectURL) {
        onSelectURL(src);
        closeURLInput();
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)("div", { className: "block-editor-media-placeholder__url-input-container", children: [
      /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
        import_components178.Button,
        {
          __next40pxDefaultSize: true,
          className: "block-editor-media-placeholder__button",
          onClick: openURLInput,
          isPressed: isURLInputVisible,
          variant: "secondary",
          "aria-haspopup": "dialog",
          ref: setPopoverAnchor,
          children: (0, import_i18n164.__)("Insert from URL")
        }
      ),
      isURLInputVisible && /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
        InsertFromURLPopover,
        {
          src,
          onChange: onChangeSrc,
          onSubmit: onSubmitSrc,
          onClose: closeURLInput,
          popoverAnchor
        }
      )
    ] });
  };
  function MediaPlaceholder({
    value = {},
    allowedTypes,
    className,
    icon,
    labels = {},
    mediaPreview,
    notices,
    isAppender,
    accept,
    addToGallery,
    multiple = false,
    handleUpload = true,
    disableDropZone,
    disableMediaButtons,
    onError,
    onSelect,
    onCancel,
    onSelectURL,
    onToggleFeaturedImage,
    onDoubleClick,
    onFilesPreUpload = noop17,
    onHTMLDrop: deprecatedOnHTMLDrop,
    children,
    mediaLibraryButton,
    placeholder,
    style
  }) {
    if (deprecatedOnHTMLDrop) {
      (0, import_deprecated26.default)("wp.blockEditor.MediaPlaceholder onHTMLDrop prop", {
        since: "6.2",
        version: "6.4"
      });
    }
    const { mediaUpload: mediaUpload2, allowedMimeTypes } = (0, import_data149.useSelect)((select3) => {
      const { getSettings: getSettings7 } = select3(store);
      const settings2 = getSettings7();
      return {
        mediaUpload: settings2.mediaUpload,
        allowedMimeTypes: settings2.allowedMimeTypes
      };
    }, []);
    const [src, setSrc] = (0, import_element175.useState)("");
    (0, import_element175.useEffect)(() => {
      setSrc(value?.src ?? "");
    }, [value?.src]);
    const computedAccept = (0, import_element175.useMemo)(
      () => getComputedAcceptAttribute(
        allowedTypes,
        allowedMimeTypes,
        accept
      ),
      [allowedTypes, allowedMimeTypes, accept]
    );
    const onlyAllowsImages = () => {
      if (!allowedTypes || allowedTypes.length === 0) {
        return false;
      }
      return allowedTypes.every(
        (allowedType) => allowedType === "image" || allowedType.startsWith("image/")
      );
    };
    const onFilesUpload = (files) => {
      if (!handleUpload || typeof handleUpload === "function" && !handleUpload(files)) {
        return onSelect(files);
      }
      onFilesPreUpload(files);
      let setMedia;
      if (multiple) {
        if (addToGallery) {
          let lastMediaPassed = [];
          setMedia = (newMedia) => {
            const filteredMedia = (value ?? []).filter((item) => {
              if (item.id) {
                return !lastMediaPassed.some(
                  // Be sure to convert to number for comparison.
                  ({ id }) => Number(id) === Number(item.id)
                );
              }
              return !lastMediaPassed.some(
                ({ urlSlug }) => item.url.includes(urlSlug)
              );
            });
            onSelect(filteredMedia.concat(newMedia));
            lastMediaPassed = newMedia.map((media) => {
              const cutOffIndex = media.url.lastIndexOf(".");
              const urlSlug = media.url.slice(0, cutOffIndex);
              return { id: media.id, urlSlug };
            });
          };
        } else {
          setMedia = onSelect;
        }
      } else {
        setMedia = ([media]) => onSelect(media);
      }
      mediaUpload2({
        allowedTypes,
        filesList: files,
        onFileChange: setMedia,
        onError,
        multiple
      });
    };
    async function handleBlocksDrop(event) {
      const { blocks: blocks2 } = parseDropEvent(event);
      if (!blocks2?.length) {
        return;
      }
      const uploadedMediaList = await Promise.all(
        blocks2.map((block) => {
          const blockType = block.name.split("/")[1];
          if (block.attributes.id) {
            block.attributes.type = blockType;
            return block.attributes;
          }
          return new Promise((resolve, reject) => {
            window.fetch(block.attributes.url).then((response) => response.blob()).then(
              (blob) => mediaUpload2({
                filesList: [blob],
                additionalData: {
                  title: block.attributes.title,
                  alt_text: block.attributes.alt,
                  caption: block.attributes.caption,
                  type: blockType
                },
                onFileChange: ([media]) => {
                  if (media.id) {
                    resolve(media);
                  }
                },
                allowedTypes,
                onError: reject
              })
            ).catch(() => resolve(block.attributes.url));
          });
        })
      ).catch((err) => onError(err));
      if (!uploadedMediaList?.length) {
        return;
      }
      onSelect(multiple ? uploadedMediaList : uploadedMediaList[0]);
    }
    const onUpload = (event) => {
      onFilesUpload(event.target.files);
    };
    const defaultRenderPlaceholder = (content) => {
      let { instructions, title } = labels;
      if (!mediaUpload2 && !onSelectURL) {
        instructions = (0, import_i18n164.__)(
          "To edit this block, you need permission to upload media."
        );
      }
      if (instructions === void 0 || title === void 0) {
        const typesAllowed = allowedTypes ?? [];
        const [firstAllowedType] = typesAllowed;
        const isOneType = 1 === typesAllowed.length;
        const isAudio = isOneType && "audio" === firstAllowedType;
        const isImage = isOneType && "image" === firstAllowedType;
        const isVideo = isOneType && "video" === firstAllowedType;
        if (instructions === void 0 && mediaUpload2) {
          instructions = (0, import_i18n164.__)(
            "Drag and drop an image or video, upload, or choose from your library."
          );
          if (isAudio) {
            instructions = (0, import_i18n164.__)(
              "Drag and drop an audio file, upload, or choose from your library."
            );
          } else if (isImage) {
            instructions = (0, import_i18n164.__)(
              "Drag and drop an image, upload, or choose from your library."
            );
          } else if (isVideo) {
            instructions = (0, import_i18n164.__)(
              "Drag and drop a video, upload, or choose from your library."
            );
          }
        }
        if (title === void 0) {
          title = (0, import_i18n164.__)("Media");
          if (isAudio) {
            title = (0, import_i18n164.__)("Audio");
          } else if (isImage) {
            title = (0, import_i18n164.__)("Image");
          } else if (isVideo) {
            title = (0, import_i18n164.__)("Video");
          }
        }
      }
      const placeholderClassName = clsx_default(
        "block-editor-media-placeholder",
        className,
        {
          "is-appender": isAppender
        }
      );
      return /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)(
        import_components178.Placeholder,
        {
          icon,
          label: title,
          instructions,
          className: placeholderClassName,
          notices,
          onDoubleClick,
          preview: mediaPreview,
          style,
          children: [
            content,
            children
          ]
        }
      );
    };
    const renderPlaceholder = placeholder ?? defaultRenderPlaceholder;
    const renderDropZone = () => {
      if (disableDropZone) {
        return null;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
        import_components178.DropZone,
        {
          onFilesDrop: onFilesUpload,
          onDrop: handleBlocksDrop,
          isEligible: (dataTransfer) => {
            const prefix2 = "wp-block:core/";
            const types = [];
            for (const type of dataTransfer.types) {
              if (type.startsWith(prefix2)) {
                types.push(type.slice(prefix2.length));
              }
            }
            return types.every(
              (type) => allowedTypes.includes(type)
            ) && (multiple ? true : types.length === 1);
          }
        }
      );
    };
    const renderCancelLink = () => {
      return onCancel && /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
        import_components178.Button,
        {
          __next40pxDefaultSize: true,
          className: "block-editor-media-placeholder__cancel-button",
          title: (0, import_i18n164.__)("Cancel"),
          variant: "link",
          onClick: onCancel,
          children: (0, import_i18n164.__)("Cancel")
        }
      );
    };
    const renderUrlSelectionUI = () => {
      return onSelectURL && /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
        URLSelectionUI,
        {
          src,
          onChangeSrc: setSrc,
          onSelectURL
        }
      );
    };
    const renderFeaturedImageToggle = () => {
      return onToggleFeaturedImage && /* @__PURE__ */ (0, import_jsx_runtime329.jsx)("div", { className: "block-editor-media-placeholder__url-input-container", children: /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
        import_components178.Button,
        {
          __next40pxDefaultSize: true,
          className: "block-editor-media-placeholder__button",
          onClick: onToggleFeaturedImage,
          variant: "secondary",
          children: (0, import_i18n164.__)("Use featured image")
        }
      ) });
    };
    const renderMediaUploadChecked = () => {
      const defaultButton = ({ open }) => {
        return /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
          import_components178.Button,
          {
            __next40pxDefaultSize: true,
            variant: "secondary",
            onClick: () => {
              open();
            },
            children: (0, import_i18n164.__)("Media Library")
          }
        );
      };
      const libraryButton = mediaLibraryButton ?? defaultButton;
      const uploadMediaLibraryButton = /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
        media_upload_default,
        {
          addToGallery,
          gallery: multiple && onlyAllowsImages(),
          multiple,
          onSelect,
          allowedTypes,
          mode: "browse",
          value: Array.isArray(value) ? value.map(({ id }) => id) : value.id,
          render: libraryButton
        }
      );
      if (mediaUpload2 && isAppender) {
        return /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)(import_jsx_runtime329.Fragment, { children: [
          renderDropZone(),
          /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
            import_components178.FormFileUpload,
            {
              onChange: onUpload,
              accept: computedAccept,
              multiple: !!multiple,
              render: ({ openFileDialog }) => {
                const content = /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)(import_jsx_runtime329.Fragment, { children: [
                  /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
                    import_components178.Button,
                    {
                      __next40pxDefaultSize: true,
                      variant: "primary",
                      className: clsx_default(
                        "block-editor-media-placeholder__button",
                        "block-editor-media-placeholder__upload-button"
                      ),
                      onClick: openFileDialog,
                      children: (0, import_i18n164._x)("Upload", "verb")
                    }
                  ),
                  uploadMediaLibraryButton,
                  renderUrlSelectionUI(),
                  renderFeaturedImageToggle(),
                  renderCancelLink()
                ] });
                return renderPlaceholder(content);
              }
            }
          )
        ] });
      }
      if (mediaUpload2) {
        const content = /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)(import_jsx_runtime329.Fragment, { children: [
          renderDropZone(),
          /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
            import_components178.FormFileUpload,
            {
              render: ({ openFileDialog }) => /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
                import_components178.Button,
                {
                  __next40pxDefaultSize: true,
                  onClick: openFileDialog,
                  variant: "primary",
                  className: clsx_default(
                    "block-editor-media-placeholder__button",
                    "block-editor-media-placeholder__upload-button"
                  ),
                  children: (0, import_i18n164._x)("Upload", "verb")
                }
              ),
              onChange: onUpload,
              accept: computedAccept,
              multiple: !!multiple
            }
          ),
          uploadMediaLibraryButton,
          renderUrlSelectionUI(),
          renderFeaturedImageToggle(),
          renderCancelLink()
        ] });
        return renderPlaceholder(content);
      }
      return renderPlaceholder(uploadMediaLibraryButton);
    };
    if (disableMediaButtons) {
      return /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(check_default2, { children: renderDropZone() });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
      check_default2,
      {
        fallback: renderPlaceholder(renderUrlSelectionUI()),
        children: renderMediaUploadChecked()
      }
    );
  }
  var media_placeholder_default = (0, import_components178.withFilters)("editor.MediaPlaceholder")(MediaPlaceholder);

  // packages/block-editor/build-module/components/panel-color-settings/index.mjs
  var import_jsx_runtime330 = __toESM(require_jsx_runtime(), 1);
  var PanelColorSettings = ({ colorSettings, ...props }) => {
    const settings2 = colorSettings.map((setting) => {
      if (!setting) {
        return setting;
      }
      const { value, onChange, ...otherSettings } = setting;
      return {
        ...otherSettings,
        colorValue: value,
        onColorChange: onChange
      };
    });
    return /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
      panel_color_gradient_settings_default,
      {
        settings: settings2,
        gradients: [],
        disableCustomGradients: true,
        ...props
      }
    );
  };
  var panel_color_settings_default = PanelColorSettings;

  // packages/block-editor/build-module/components/plain-text/index.mjs
  var import_react_autosize_textarea2 = __toESM(require_lib(), 1);
  var import_element187 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/editable-text/index.mjs
  var import_element186 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/rich-text/index.mjs
  var import_es65 = __toESM(require_es6(), 1);
  var import_element185 = __toESM(require_element(), 1);
  var import_data152 = __toESM(require_data(), 1);
  var import_compose89 = __toESM(require_compose(), 1);
  var import_rich_text14 = __toESM(require_rich_text(), 1);
  var import_components182 = __toESM(require_components(), 1);
  var import_blocks87 = __toESM(require_blocks(), 1);
  var import_deprecated30 = __toESM(require_deprecated(), 1);
  var import_i18n167 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/components/rich-text/format-toolbar-container.mjs
  var import_i18n166 = __toESM(require_i18n(), 1);
  var import_components180 = __toESM(require_components(), 1);

  // packages/block-editor/build-module/components/rich-text/format-toolbar/index.mjs
  var import_i18n165 = __toESM(require_i18n(), 1);
  var import_components179 = __toESM(require_components(), 1);
  var import_jsx_runtime331 = __toESM(require_jsx_runtime(), 1);
  var POPOVER_PROPS8 = {
    placement: "bottom-start"
  };
  var FormatToolbar = () => {
    return /* @__PURE__ */ (0, import_jsx_runtime331.jsxs)(import_jsx_runtime331.Fragment, { children: [
      ["bold", "italic", "link", "unknown"].map((format6) => /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
        import_components179.Slot,
        {
          name: `RichText.ToolbarControls.${format6}`
        },
        format6
      )),
      /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(import_components179.Slot, { name: "RichText.ToolbarControls", children: (fills) => {
        if (!fills.length) {
          return null;
        }
        const allProps = fills.map(([{ props }]) => props);
        const hasActive = allProps.some(
          ({ isActive }) => isActive
        );
        return /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(import_components179.ToolbarItem, { children: (toggleProps) => /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
          import_components179.DropdownMenu,
          {
            icon: chevron_down_default,
            label: (0, import_i18n165.__)("More"),
            toggleProps: {
              ...toggleProps,
              className: clsx_default(
                toggleProps.className,
                { "is-pressed": hasActive }
              ),
              description: (0, import_i18n165.__)(
                "Displays more block tools"
              )
            },
            controls: orderBy(
              fills.map(([{ props }]) => props),
              "title"
            ),
            popoverProps: POPOVER_PROPS8
          }
        ) });
      } })
    ] });
  };
  var format_toolbar_default = FormatToolbar;

  // packages/block-editor/build-module/components/rich-text/format-toolbar-container.mjs
  var import_jsx_runtime332 = __toESM(require_jsx_runtime(), 1);
  function InlineToolbar({ popoverAnchor }) {
    return /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
      import_components180.Popover,
      {
        placement: "top",
        focusOnMount: false,
        anchor: popoverAnchor,
        className: "block-editor-rich-text__inline-format-toolbar",
        __unstableSlotName: "block-toolbar",
        children: /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
          NavigableToolbar,
          {
            className: "block-editor-rich-text__inline-format-toolbar-group",
            "aria-label": (0, import_i18n166.__)("Format tools"),
            children: /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(import_components180.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(format_toolbar_default, {}) })
          }
        )
      }
    );
  }
  var FormatToolbarContainer = ({ inline, editableContentElement }) => {
    if (inline) {
      return /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(InlineToolbar, { popoverAnchor: editableContentElement });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(block_controls_default, { group: "inline", children: /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(format_toolbar_default, {}) });
  };
  var format_toolbar_container_default = FormatToolbarContainer;

  // packages/block-editor/build-module/components/rich-text/use-mark-persistent.mjs
  var import_element176 = __toESM(require_element(), 1);
  var import_data150 = __toESM(require_data(), 1);
  function useMarkPersistent({ html, value }) {
    const previousTextRef = (0, import_element176.useRef)();
    const hasActiveFormats = !!value.activeFormats?.length;
    const { __unstableMarkLastChangeAsPersistent: __unstableMarkLastChangeAsPersistent2 } = (0, import_data150.useDispatch)(store);
    (0, import_element176.useLayoutEffect)(() => {
      if (!previousTextRef.current) {
        previousTextRef.current = value.text;
        return;
      }
      if (previousTextRef.current !== value.text) {
        const timeout = window.setTimeout(() => {
          __unstableMarkLastChangeAsPersistent2();
        }, 1e3);
        previousTextRef.current = value.text;
        return () => {
          window.clearTimeout(timeout);
        };
      }
      __unstableMarkLastChangeAsPersistent2();
    }, [html, hasActiveFormats]);
  }

  // packages/block-editor/build-module/components/rich-text/event-listeners/index.mjs
  var import_element178 = __toESM(require_element(), 1);
  var import_compose88 = __toESM(require_compose(), 1);

  // packages/block-editor/build-module/components/rich-text/event-listeners/before-input-rules.mjs
  var import_rich_text5 = __toESM(require_rich_text(), 1);
  var import_hooks7 = __toESM(require_hooks(), 1);
  var wrapSelectionSettings = ["`", '"', "'", "\u201C\u201D", "\u2018\u2019"];
  var before_input_rules_default = (props) => (element) => {
    function onInput(event) {
      const { inputType, data } = event;
      const { value, onChange, registry } = props.current;
      if (inputType !== "insertText") {
        return;
      }
      if ((0, import_rich_text5.isCollapsed)(value)) {
        return;
      }
      const pair = (0, import_hooks7.applyFilters)(
        "blockEditor.wrapSelectionSettings",
        wrapSelectionSettings
      ).find(
        ([startChar2, endChar2]) => startChar2 === data || endChar2 === data
      );
      if (!pair) {
        return;
      }
      const [startChar, endChar = startChar] = pair;
      const start2 = value.start;
      const end = value.end + startChar.length;
      let newValue = (0, import_rich_text5.insert)(value, startChar, start2, start2);
      newValue = (0, import_rich_text5.insert)(newValue, endChar, end, end);
      const {
        __unstableMarkLastChangeAsPersistent: __unstableMarkLastChangeAsPersistent2,
        __unstableMarkAutomaticChange: __unstableMarkAutomaticChange2
      } = registry.dispatch(store);
      __unstableMarkLastChangeAsPersistent2();
      onChange(newValue);
      __unstableMarkAutomaticChange2();
      const init = {};
      for (const key in event) {
        init[key] = event[key];
      }
      init.data = endChar;
      const { ownerDocument } = element;
      const { defaultView } = ownerDocument;
      const newEvent = new defaultView.InputEvent("input", init);
      window.queueMicrotask(() => {
        event.target.dispatchEvent(newEvent);
      });
      event.preventDefault();
    }
    element.addEventListener("beforeinput", onInput);
    return () => {
      element.removeEventListener("beforeinput", onInput);
    };
  };

  // packages/block-editor/build-module/components/rich-text/event-listeners/input-rules.mjs
  var import_rich_text7 = __toESM(require_rich_text(), 1);
  var import_blocks82 = __toESM(require_blocks(), 1);

  // packages/block-editor/build-module/components/rich-text/prevent-event-discovery.mjs
  var import_rich_text6 = __toESM(require_rich_text(), 1);
  function preventEventDiscovery(value) {
    const searchText = "tales of gutenberg";
    const addText = " \u{1F421}\u{1F422}\u{1F980}\u{1F424}\u{1F98B}\u{1F418}\u{1F427}\u{1F439}\u{1F981}\u{1F984}\u{1F98D}\u{1F43C}\u{1F43F}\u{1F383}\u{1F434}\u{1F41D}\u{1F406}\u{1F995}\u{1F994}\u{1F331}\u{1F347}\u03C0\u{1F34C}\u{1F409}\u{1F4A7}\u{1F968}\u{1F30C}\u{1F342}\u{1F360}\u{1F966}\u{1F95A}\u{1F95D}\u{1F39F}\u{1F965}\u{1F952}\u{1F6F5}\u{1F956}\u{1F352}\u{1F36F}\u{1F3BE}\u{1F3B2}\u{1F43A}\u{1F41A}\u{1F42E}\u231B\uFE0F";
    const { start: start2, text } = value;
    if (start2 < searchText.length) {
      return value;
    }
    const charactersBefore = text.slice(start2 - searchText.length, start2);
    if (charactersBefore.toLowerCase() !== searchText) {
      return value;
    }
    return (0, import_rich_text6.insert)(value, addText);
  }

  // packages/block-editor/build-module/components/rich-text/event-listeners/input-rules.mjs
  function findSelection(blocks2) {
    let i2 = blocks2.length;
    while (i2--) {
      const attributeKey = retrieveSelectedAttribute(
        blocks2[i2].attributes
      );
      if (attributeKey) {
        blocks2[i2].attributes[attributeKey] = blocks2[i2].attributes[attributeKey].toString().replace(START_OF_SELECTED_AREA, "");
        return [blocks2[i2].clientId, attributeKey, 0, 0];
      }
      const nestedSelection = findSelection(blocks2[i2].innerBlocks);
      if (nestedSelection) {
        return nestedSelection;
      }
    }
    return [];
  }
  var input_rules_default = (props) => (element) => {
    function inputRule() {
      const { getValue, onReplace, selectionChange: selectionChange2, registry } = props.current;
      if (!onReplace) {
        return;
      }
      const value = getValue();
      const { start: start2, text } = value;
      const characterBefore = text.slice(start2 - 1, start2);
      if (characterBefore !== " ") {
        return;
      }
      const trimmedTextBefore = text.slice(0, start2).trim();
      const prefixTransforms = (0, import_blocks82.getBlockTransforms)("from").filter(
        ({ type }) => type === "prefix"
      );
      const transformation = (0, import_blocks82.findTransform)(
        prefixTransforms,
        ({ prefix: prefix2 }) => {
          return trimmedTextBefore === prefix2;
        }
      );
      if (!transformation) {
        return;
      }
      const content = (0, import_rich_text7.toHTMLString)({
        value: (0, import_rich_text7.insert)(value, START_OF_SELECTED_AREA, 0, start2)
      });
      const block = transformation.transform(content);
      selectionChange2(...findSelection([block]));
      onReplace([block]);
      registry.dispatch(store).__unstableMarkAutomaticChange();
      return true;
    }
    function onInput(event) {
      const { inputType, type } = event;
      const {
        getValue,
        onChange,
        __unstableAllowPrefixTransformations,
        formatTypes,
        registry,
        onReplace
      } = props.current;
      if (inputType !== "insertText" && type !== "compositionend") {
        return;
      }
      if (__unstableAllowPrefixTransformations && inputRule()) {
        return;
      }
      const value = getValue();
      const transforms = (0, import_blocks82.getBlockTransforms)("from").filter(
        (transform) => transform.type === "input"
      );
      const transformation = (0, import_blocks82.findTransform)(transforms, (item) => {
        return item.regExp.test(value.text);
      });
      if (transformation) {
        onReplace(transformation.transform());
        registry.dispatch(store).__unstableMarkAutomaticChange();
        return;
      }
      const transformed = formatTypes.reduce(
        (accumulator, { __unstableInputRule }) => {
          if (__unstableInputRule) {
            accumulator = __unstableInputRule(accumulator);
          }
          return accumulator;
        },
        preventEventDiscovery(value)
      );
      const {
        __unstableMarkLastChangeAsPersistent: __unstableMarkLastChangeAsPersistent2,
        __unstableMarkAutomaticChange: __unstableMarkAutomaticChange2
      } = registry.dispatch(store);
      if (transformed !== value) {
        __unstableMarkLastChangeAsPersistent2();
        onChange({
          ...transformed,
          activeFormats: value.activeFormats
        });
        __unstableMarkAutomaticChange2();
      }
    }
    element.addEventListener("input", onInput);
    element.addEventListener("compositionend", onInput);
    return () => {
      element.removeEventListener("input", onInput);
      element.removeEventListener("compositionend", onInput);
    };
  };

  // packages/block-editor/build-module/components/rich-text/event-listeners/insert-replacement-text.mjs
  var insert_replacement_text_default = (props) => (element) => {
    function onInput(event) {
      if (event.inputType !== "insertReplacementText") {
        return;
      }
      const { registry } = props.current;
      registry.dispatch(store).__unstableMarkLastChangeAsPersistent();
    }
    element.addEventListener("beforeinput", onInput);
    return () => {
      element.removeEventListener("beforeinput", onInput);
    };
  };

  // packages/block-editor/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.mjs
  var import_keycodes20 = __toESM(require_keycodes(), 1);
  var remove_browser_shortcuts_default = () => (node) => {
    function onKeydown(event) {
      if (import_keycodes20.isKeyboardEvent.primary(event, "z") || import_keycodes20.isKeyboardEvent.primary(event, "y") || import_keycodes20.isKeyboardEvent.primaryShift(event, "z")) {
        event.preventDefault();
      }
    }
    node.addEventListener("keydown", onKeydown);
    return () => {
      node.removeEventListener("keydown", onKeydown);
    };
  };

  // packages/block-editor/build-module/components/rich-text/event-listeners/shortcuts.mjs
  var shortcuts_default = (props) => (element) => {
    const { keyboardShortcuts } = props.current;
    function onKeyDown(event) {
      for (const keyboardShortcut of keyboardShortcuts.current) {
        keyboardShortcut(event);
      }
    }
    element.addEventListener("keydown", onKeyDown);
    return () => {
      element.removeEventListener("keydown", onKeyDown);
    };
  };

  // packages/block-editor/build-module/components/rich-text/event-listeners/input-events.mjs
  var input_events_default = (props) => (element) => {
    const { inputEvents } = props.current;
    function onInput(event) {
      for (const keyboardShortcut of inputEvents.current) {
        keyboardShortcut(event);
      }
    }
    element.addEventListener("input", onInput);
    return () => {
      element.removeEventListener("input", onInput);
    };
  };

  // packages/block-editor/build-module/components/rich-text/event-listeners/undo-automatic-change.mjs
  var import_keycodes21 = __toESM(require_keycodes(), 1);
  var undo_automatic_change_default = (props) => (element) => {
    function onKeyDown(event) {
      const { keyCode } = event;
      if (event.defaultPrevented) {
        return;
      }
      if (keyCode !== import_keycodes21.BACKSPACE && keyCode !== import_keycodes21.ESCAPE) {
        return;
      }
      const { registry } = props.current;
      const { didAutomaticChange: didAutomaticChange2, getSettings: getSettings7 } = registry.select(store);
      const { __experimentalUndo } = getSettings7();
      if (!__experimentalUndo) {
        return;
      }
      if (!didAutomaticChange2()) {
        return;
      }
      event.preventDefault();
      __experimentalUndo();
    }
    element.addEventListener("keydown", onKeyDown);
    return () => {
      element.removeEventListener("keydown", onKeyDown);
    };
  };

  // packages/block-editor/build-module/components/rich-text/event-listeners/paste-handler.mjs
  var import_blocks84 = __toESM(require_blocks(), 1);
  var import_rich_text8 = __toESM(require_rich_text(), 1);
  var import_url10 = __toESM(require_url(), 1);

  // packages/block-editor/build-module/components/rich-text/utils.mjs
  var import_element177 = __toESM(require_element(), 1);
  var import_blocks83 = __toESM(require_blocks(), 1);
  var import_jsx_runtime333 = __toESM(require_jsx_runtime(), 1);
  function addActiveFormats(value, activeFormats) {
    if (activeFormats?.length) {
      let index = value.formats.length;
      while (index--) {
        value.formats[index] = [
          ...activeFormats,
          ...value.formats[index] || []
        ];
      }
    }
  }
  function getMultilineTag(multiline) {
    if (multiline !== true && multiline !== "p" && multiline !== "li") {
      return;
    }
    return multiline === true ? "p" : multiline;
  }
  function getAllowedFormats({ allowedFormats, disableFormats }) {
    if (disableFormats) {
      return getAllowedFormats.EMPTY_ARRAY;
    }
    return allowedFormats;
  }
  getAllowedFormats.EMPTY_ARRAY = [];

  // packages/block-editor/build-module/components/rich-text/event-listeners/paste-handler.mjs
  var paste_handler_default = (props) => (element) => {
    function _onPaste(event) {
      const {
        disableFormats,
        onChange,
        value,
        formatTypes,
        tagName,
        onReplace,
        __unstableEmbedURLOnPaste,
        preserveWhiteSpace,
        pastePlainText
      } = props.current;
      if (!element.contains(event.target)) {
        return;
      }
      if (event.defaultPrevented) {
        return;
      }
      const { plainText, html } = getPasteEventData(event);
      event.preventDefault();
      window.console.log("Received HTML (RichText):\n\n", html);
      window.console.log("Received plain text (RichText):\n\n", plainText);
      if (disableFormats) {
        onChange((0, import_rich_text8.insert)(value, plainText));
        return;
      }
      const isInternal = event.clipboardData.getData("rich-text") === "true";
      function pasteInline(content2) {
        const transformed = formatTypes.reduce(
          (accumulator, { __unstablePasteRule }) => {
            if (__unstablePasteRule && accumulator === value) {
              accumulator = __unstablePasteRule(value, {
                html,
                plainText
              });
            }
            return accumulator;
          },
          value
        );
        if (transformed !== value) {
          onChange(transformed);
        } else {
          const valueToInsert = (0, import_rich_text8.create)({ html: content2 });
          addActiveFormats(valueToInsert, value.activeFormats);
          onChange((0, import_rich_text8.insert)(value, valueToInsert));
        }
      }
      if (isInternal) {
        pasteInline(html);
        return;
      }
      if (pastePlainText) {
        onChange((0, import_rich_text8.insert)(value, (0, import_rich_text8.create)({ text: plainText })));
        return;
      }
      let mode2 = "INLINE";
      const trimmedPlainText = plainText.trim();
      if (__unstableEmbedURLOnPaste && (0, import_rich_text8.isEmpty)(value) && (0, import_url10.isURL)(trimmedPlainText) && // For the link pasting feature, allow only http(s) protocols.
      /^https?:/.test(trimmedPlainText)) {
        mode2 = "BLOCKS";
      }
      const content = (0, import_blocks84.pasteHandler)({
        HTML: html,
        plainText,
        mode: mode2,
        tagName,
        preserveWhiteSpace
      });
      if (typeof content === "string") {
        pasteInline(content);
      } else if (content.length > 0) {
        if (onReplace && (0, import_rich_text8.isEmpty)(value)) {
          onReplace(content, content.length - 1, -1);
        }
      }
    }
    const { defaultView } = element.ownerDocument;
    defaultView.addEventListener("paste", _onPaste);
    return () => {
      defaultView.removeEventListener("paste", _onPaste);
    };
  };

  // packages/block-editor/build-module/components/rich-text/event-listeners/delete.mjs
  var import_keycodes22 = __toESM(require_keycodes(), 1);
  var import_rich_text9 = __toESM(require_rich_text(), 1);
  var delete_default = (props) => (element) => {
    function onKeyDown(event) {
      const { keyCode } = event;
      if (event.defaultPrevented) {
        return;
      }
      const { value, onMerge, onRemove } = props.current;
      if (keyCode === import_keycodes22.DELETE || keyCode === import_keycodes22.BACKSPACE) {
        const { start: start2, end, text } = value;
        const isReverse = keyCode === import_keycodes22.BACKSPACE;
        const hasActiveFormats = value.activeFormats && !!value.activeFormats.length;
        if (!(0, import_rich_text9.isCollapsed)(value) || hasActiveFormats || isReverse && start2 !== 0 || !isReverse && end !== text.length) {
          return;
        }
        if (onMerge) {
          onMerge(!isReverse);
        } else if (onRemove && (0, import_rich_text9.isEmpty)(value) && isReverse) {
          onRemove(!isReverse);
        }
        event.preventDefault();
      }
    }
    element.addEventListener("keydown", onKeyDown);
    return () => {
      element.removeEventListener("keydown", onKeyDown);
    };
  };

  // packages/block-editor/build-module/components/rich-text/event-listeners/enter.mjs
  var import_keycodes23 = __toESM(require_keycodes(), 1);
  var import_rich_text10 = __toESM(require_rich_text(), 1);
  var enter_default = (props) => (element) => {
    function onKeyDownDeprecated(event) {
      if (event.keyCode !== import_keycodes23.ENTER) {
        return;
      }
      const { onReplace, onSplit } = props.current;
      if (onReplace && onSplit) {
        event.__deprecatedOnSplit = true;
      }
    }
    function onKeyDown(event) {
      if (event.defaultPrevented) {
        return;
      }
      if (event.target !== element) {
        return;
      }
      if (event.keyCode !== import_keycodes23.ENTER) {
        return;
      }
      const {
        value,
        onChange,
        disableLineBreaks,
        onSplitAtEnd,
        onSplitAtDoubleLineEnd,
        registry
      } = props.current;
      event.preventDefault();
      const { text, start: start2, end } = value;
      if (event.shiftKey) {
        if (!disableLineBreaks) {
          onChange((0, import_rich_text10.insert)(value, "\n"));
        }
      } else if (onSplitAtEnd && start2 === end && end === text.length) {
        onSplitAtEnd();
      } else if (
        // For some blocks it's desirable to split at the end of the
        // block when there are two line breaks at the end of the
        // block, so triple Enter exits the block.
        onSplitAtDoubleLineEnd && start2 === end && end === text.length && text.slice(-2) === "\n\n"
      ) {
        registry.batch(() => {
          const _value = { ...value };
          _value.start = _value.end - 2;
          onChange((0, import_rich_text10.remove)(_value));
          onSplitAtDoubleLineEnd();
        });
      } else if (!disableLineBreaks) {
        onChange((0, import_rich_text10.insert)(value, "\n"));
      }
    }
    const { defaultView } = element.ownerDocument;
    defaultView.addEventListener("keydown", onKeyDown);
    element.addEventListener("keydown", onKeyDownDeprecated);
    return () => {
      defaultView.removeEventListener("keydown", onKeyDown);
      element.removeEventListener("keydown", onKeyDownDeprecated);
    };
  };

  // packages/block-editor/build-module/components/rich-text/event-listeners/firefox-compat.mjs
  var firefox_compat_default = (props) => (element) => {
    function onFocus() {
      const { registry } = props.current;
      if (!registry.select(store).isMultiSelecting()) {
        return;
      }
      const parentEditable = element.parentElement.closest(
        '[contenteditable="true"]'
      );
      if (parentEditable) {
        parentEditable.focus();
      }
    }
    element.addEventListener("focus", onFocus);
    return () => {
      element.removeEventListener("focus", onFocus);
    };
  };

  // packages/block-editor/build-module/components/rich-text/event-listeners/index.mjs
  var allEventListeners = [
    before_input_rules_default,
    input_rules_default,
    insert_replacement_text_default,
    remove_browser_shortcuts_default,
    shortcuts_default,
    input_events_default,
    undo_automatic_change_default,
    paste_handler_default,
    delete_default,
    enter_default,
    firefox_compat_default
  ];
  function useEventListeners(props) {
    const propsRef = (0, import_element178.useRef)(props);
    (0, import_element178.useInsertionEffect)(() => {
      propsRef.current = props;
    });
    const refEffects = (0, import_element178.useMemo)(
      () => allEventListeners.map((refEffect) => refEffect(propsRef)),
      [propsRef]
    );
    return (0, import_compose88.useRefEffect)(
      (element) => {
        if (!props.isSelected) {
          return;
        }
        const cleanups = refEffects.map((effect) => effect(element));
        return () => {
          cleanups.forEach((cleanup) => cleanup());
        };
      },
      [refEffects, props.isSelected]
    );
  }

  // packages/block-editor/build-module/components/rich-text/format-edit.mjs
  var import_rich_text11 = __toESM(require_rich_text(), 1);
  var import_element179 = __toESM(require_element(), 1);
  var import_jsx_runtime334 = __toESM(require_jsx_runtime(), 1);
  var import_react5 = __toESM(require_react(), 1);
  var DEFAULT_BLOCK_CONTEXT2 = {};
  var usesContextKey = /* @__PURE__ */ Symbol("usesContext");
  function Edit3({
    onChange,
    onFocus,
    value,
    forwardedRef,
    settings: settings2,
    isVisible
  }) {
    const {
      name,
      edit: EditFunction,
      [usesContextKey]: usesContext
    } = settings2;
    const blockContext = (0, import_element179.useContext)(block_context_default);
    const context = (0, import_element179.useMemo)(() => {
      return usesContext ? Object.fromEntries(
        Object.entries(blockContext).filter(
          ([key]) => usesContext.includes(key)
        )
      ) : DEFAULT_BLOCK_CONTEXT2;
    }, [usesContext, blockContext]);
    if (!EditFunction) {
      return null;
    }
    const activeFormat = (0, import_rich_text11.getActiveFormat)(value, name);
    const isActive = activeFormat !== void 0;
    const activeObject = (0, import_rich_text11.getActiveObject)(value);
    const isObjectActive = activeObject !== void 0 && activeObject.type === name;
    return /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
      EditFunction,
      {
        isActive,
        isVisible,
        activeAttributes: isActive ? activeFormat.attributes || {} : {},
        isObjectActive,
        activeObjectAttributes: isObjectActive ? activeObject.attributes || {} : {},
        value,
        onChange,
        onFocus,
        contentRef: forwardedRef,
        context
      },
      name
    );
  }
  function FormatEdit({ formatTypes, ...props }) {
    return formatTypes.map((settings2) => /* @__PURE__ */ (0, import_react5.createElement)(Edit3, { settings: settings2, ...props, key: settings2.name }));
  }

  // packages/block-editor/build-module/components/rich-text/content.mjs
  var import_element180 = __toESM(require_element(), 1);
  var import_blocks85 = __toESM(require_blocks(), 1);
  var import_deprecated27 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime335 = __toESM(require_jsx_runtime(), 1);
  function valueToHTMLString(value, multiline) {
    if (rich_text_default.isEmpty(value)) {
      const multilineTag = getMultilineTag(multiline);
      return multilineTag ? `<${multilineTag}></${multilineTag}>` : "";
    }
    if (Array.isArray(value)) {
      (0, import_deprecated27.default)("wp.blockEditor.RichText value prop as children type", {
        since: "6.1",
        version: "6.3",
        alternative: "value prop as string",
        link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
      });
      return import_blocks85.children.toHTML(value);
    }
    if (typeof value === "string") {
      return value;
    }
    return value.toHTMLString();
  }
  function Content({
    value,
    tagName: Tag,
    multiline,
    format: format6,
    ...props
  }) {
    value = /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(import_element180.RawHTML, { children: valueToHTMLString(value, multiline) });
    return Tag ? /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(Tag, { ...props, children: value }) : value;
  }

  // packages/block-editor/build-module/components/rich-text/with-deprecations.mjs
  var import_element182 = __toESM(require_element(), 1);
  var import_blocks86 = __toESM(require_blocks(), 1);
  var import_rich_text13 = __toESM(require_rich_text(), 1);
  var import_deprecated29 = __toESM(require_deprecated(), 1);

  // packages/block-editor/build-module/components/rich-text/multiline.mjs
  var import_element181 = __toESM(require_element(), 1);
  var import_deprecated28 = __toESM(require_deprecated(), 1);
  var import_data151 = __toESM(require_data(), 1);
  var import_keycodes24 = __toESM(require_keycodes(), 1);
  var import_rich_text12 = __toESM(require_rich_text(), 1);
  var import_jsx_runtime336 = __toESM(require_jsx_runtime(), 1);
  function RichTextMultiline({
    children,
    identifier,
    tagName: TagName = "div",
    value = "",
    onChange,
    multiline,
    ...props
  }, forwardedRef) {
    (0, import_deprecated28.default)("wp.blockEditor.RichText multiline prop", {
      since: "6.1",
      version: "6.3",
      alternative: "nested blocks (InnerBlocks)",
      link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/"
    });
    const { clientId } = useBlockEditContext();
    const { getSelectionStart: getSelectionStart2, getSelectionEnd: getSelectionEnd2 } = (0, import_data151.useSelect)(store);
    const { selectionChange: selectionChange2 } = (0, import_data151.useDispatch)(store);
    const multilineTagName = getMultilineTag(multiline);
    value = value || `<${multilineTagName}></${multilineTagName}>`;
    const padded = `</${multilineTagName}>${value}<${multilineTagName}>`;
    const values = padded.split(
      `</${multilineTagName}><${multilineTagName}>`
    );
    values.shift();
    values.pop();
    function _onChange(newValues) {
      onChange(
        `<${multilineTagName}>${newValues.join(
          `</${multilineTagName}><${multilineTagName}>`
        )}</${multilineTagName}>`
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(TagName, { ref: forwardedRef, children: values.map((_value, index) => {
      return /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
        RichTextWrapper,
        {
          identifier: `${identifier}-${index}`,
          tagName: multilineTagName,
          value: _value,
          onChange: (newValue) => {
            const newValues = values.slice();
            newValues[index] = newValue;
            _onChange(newValues);
          },
          isSelected: void 0,
          onKeyDown: (event) => {
            if (event.keyCode !== import_keycodes24.ENTER) {
              return;
            }
            event.preventDefault();
            const { offset: start2 } = getSelectionStart2();
            const { offset: end } = getSelectionEnd2();
            if (typeof start2 !== "number" || typeof end !== "number") {
              return;
            }
            const richTextValue = (0, import_rich_text12.create)({ html: _value });
            richTextValue.start = start2;
            richTextValue.end = end;
            const array = (0, import_rich_text12.split)(richTextValue).map(
              (v2) => (0, import_rich_text12.toHTMLString)({ value: v2 })
            );
            const newValues = values.slice();
            newValues.splice(index, 1, ...array);
            _onChange(newValues);
            selectionChange2(
              clientId,
              `${identifier}-${index + 1}`,
              0,
              0
            );
          },
          onMerge: (forward) => {
            const newValues = values.slice();
            let offset = 0;
            if (forward) {
              if (!newValues[index + 1]) {
                return;
              }
              newValues.splice(
                index,
                2,
                newValues[index] + newValues[index + 1]
              );
              offset = newValues[index].length - 1;
            } else {
              if (!newValues[index - 1]) {
                return;
              }
              newValues.splice(
                index - 1,
                2,
                newValues[index - 1] + newValues[index]
              );
              offset = newValues[index - 1].length - 1;
            }
            _onChange(newValues);
            selectionChange2(
              clientId,
              `${identifier}-${index - (forward ? 0 : 1)}`,
              offset,
              offset
            );
          },
          ...props
        },
        index
      );
    }) });
  }
  var multiline_default = (0, import_element181.forwardRef)(RichTextMultiline);

  // packages/block-editor/build-module/components/rich-text/with-deprecations.mjs
  var import_jsx_runtime337 = __toESM(require_jsx_runtime(), 1);
  function withDeprecations(Component7) {
    return (0, import_element182.forwardRef)((props, ref) => {
      let value = props.value;
      let onChange = props.onChange;
      if (Array.isArray(value)) {
        (0, import_deprecated29.default)("wp.blockEditor.RichText value prop as children type", {
          since: "6.1",
          version: "6.3",
          alternative: "value prop as string",
          link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
        });
        value = import_blocks86.children.toHTML(props.value);
        onChange = (newValue) => props.onChange(
          import_blocks86.children.fromDOM(
            (0, import_rich_text13.__unstableCreateElement)(document, newValue).childNodes
          )
        );
      }
      const NewComponent = props.multiline ? multiline_default : Component7;
      return /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
        NewComponent,
        {
          ...props,
          value,
          onChange,
          ref
        }
      );
    });
  }

  // packages/block-editor/build-module/components/rich-text/shortcut.mjs
  var import_keycodes25 = __toESM(require_keycodes(), 1);
  var import_element183 = __toESM(require_element(), 1);
  function RichTextShortcut({ character, type, onUse }) {
    const keyboardShortcuts = (0, import_element183.useContext)(keyboardShortcutContext);
    const onUseRef = (0, import_element183.useRef)();
    onUseRef.current = onUse;
    (0, import_element183.useEffect)(() => {
      function callback(event) {
        if (import_keycodes25.isKeyboardEvent[type](event, character)) {
          onUseRef.current();
          event.preventDefault();
        }
      }
      keyboardShortcuts.current.add(callback);
      return () => {
        keyboardShortcuts.current.delete(callback);
      };
    }, [character, type]);
    return null;
  }

  // packages/block-editor/build-module/components/rich-text/toolbar-button.mjs
  var import_components181 = __toESM(require_components(), 1);
  var import_keycodes26 = __toESM(require_keycodes(), 1);
  var import_jsx_runtime338 = __toESM(require_jsx_runtime(), 1);
  function RichTextToolbarButton({
    name,
    shortcutType,
    shortcutCharacter,
    ...props
  }) {
    let shortcut;
    let fillName = "RichText.ToolbarControls";
    if (name) {
      fillName += `.${name}`;
    }
    if (shortcutType && shortcutCharacter) {
      shortcut = import_keycodes26.displayShortcut[shortcutType](shortcutCharacter);
    }
    return /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(import_components181.Fill, { name: fillName, children: /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(import_components181.ToolbarButton, { ...props, shortcut }) });
  }

  // packages/block-editor/build-module/components/rich-text/input-event.mjs
  var import_element184 = __toESM(require_element(), 1);
  function __unstableRichTextInputEvent({ inputType, onInput }) {
    const callbacks = (0, import_element184.useContext)(inputEventContext);
    const onInputRef = (0, import_element184.useRef)();
    onInputRef.current = onInput;
    (0, import_element184.useEffect)(() => {
      function callback(event) {
        if (event.inputType === inputType) {
          onInputRef.current();
          event.preventDefault();
        }
      }
      callbacks.current.add(callback);
      return () => {
        callbacks.current.delete(callback);
      };
    }, [inputType]);
    return null;
  }

  // packages/block-editor/build-module/components/rich-text/index.mjs
  var import_jsx_runtime339 = __toESM(require_jsx_runtime(), 1);
  var { useRichText } = unlock(import_rich_text14.privateApis);
  var keyboardShortcutContext = (0, import_element185.createContext)();
  keyboardShortcutContext.displayName = "keyboardShortcutContext";
  var inputEventContext = (0, import_element185.createContext)();
  inputEventContext.displayName = "inputEventContext";
  var instanceIdKey = /* @__PURE__ */ Symbol("instanceId");
  function removeNativeProps(props) {
    const {
      __unstableMobileNoFocusOnMount,
      deleteEnter,
      placeholderTextColor,
      textAlign,
      selectionColor,
      tagsToEliminate,
      disableEditingMenu,
      fontSize,
      fontFamily,
      fontWeight,
      fontStyle,
      minWidth,
      maxWidth,
      disableSuggestions,
      disableAutocorrection,
      ...restProps
    } = props;
    return restProps;
  }
  function RichTextWrapper({
    children,
    tagName = "div",
    value: adjustedValue = "",
    onChange: adjustedOnChange,
    isSelected: originalIsSelected,
    multiline,
    inlineToolbar,
    wrapperClassName,
    autocompleters,
    onReplace,
    placeholder,
    allowedFormats,
    withoutInteractiveFormatting,
    onRemove,
    onMerge,
    onSplit,
    __unstableOnSplitAtEnd: onSplitAtEnd,
    __unstableOnSplitAtDoubleLineEnd: onSplitAtDoubleLineEnd,
    identifier,
    preserveWhiteSpace,
    __unstablePastePlainText: pastePlainText,
    __unstableEmbedURLOnPaste,
    __unstableDisableFormats: disableFormats,
    disableLineBreaks,
    __unstableAllowPrefixTransformations,
    readOnly,
    ...props
  }, forwardedRef) {
    props = removeNativeProps(props);
    if (onSplit) {
      (0, import_deprecated30.default)("wp.blockEditor.RichText onSplit prop", {
        since: "6.4",
        alternative: 'block.json support key: "splitting"'
      });
    }
    const instanceId = (0, import_compose89.useInstanceId)(RichTextWrapper);
    const anchorRef = (0, import_element185.useRef)();
    const [anchorElement, setAnchorElement] = (0, import_element185.useState)(null);
    const context = useBlockEditContext();
    const { clientId, isSelected: isBlockSelected2, name: blockName } = context;
    const blockBindings = context[blockBindingsKey];
    const blockContext = (0, import_element185.useContext)(block_context_default);
    const registry = (0, import_data152.useRegistry)();
    const selector3 = (select3) => {
      if (!isBlockSelected2) {
        return { isSelected: false };
      }
      const { getSelectionStart: getSelectionStart22, getSelectionEnd: getSelectionEnd22 } = select3(store);
      const selectionStart2 = getSelectionStart22();
      const selectionEnd2 = getSelectionEnd22();
      let isSelected2;
      if (originalIsSelected === void 0) {
        isSelected2 = selectionStart2.clientId === clientId && selectionEnd2.clientId === clientId && (identifier ? selectionStart2.attributeKey === identifier : selectionStart2[instanceIdKey] === instanceId);
      } else if (originalIsSelected) {
        isSelected2 = selectionStart2.clientId === clientId;
      }
      return {
        selectionStart: isSelected2 ? selectionStart2.offset : void 0,
        selectionEnd: isSelected2 ? selectionEnd2.offset : void 0,
        isSelected: isSelected2
      };
    };
    const { selectionStart, selectionEnd, isSelected } = (0, import_data152.useSelect)(selector3, [
      clientId,
      identifier,
      instanceId,
      originalIsSelected,
      isBlockSelected2
    ]);
    const { disableBoundBlock, bindingsPlaceholder, bindingsLabel } = (0, import_data152.useSelect)(
      (select3) => {
        if (!blockBindings?.[identifier]) {
          return {};
        }
        const { __experimentalBlockBindingsSupportedAttributes } = select3(store).getSettings();
        const bindableAttributes = __experimentalBlockBindingsSupportedAttributes?.[blockName];
        if (!bindableAttributes) {
          return {};
        }
        const relatedBinding = blockBindings[identifier];
        const blockBindingsSource = (0, import_blocks87.getBlockBindingsSource)(
          relatedBinding.source
        );
        const blockBindingsContext = {};
        if (blockBindingsSource?.usesContext?.length) {
          for (const key of blockBindingsSource.usesContext) {
            blockBindingsContext[key] = blockContext[key];
          }
        }
        const _disableBoundBlock = !blockBindingsSource?.canUserEditValue?.({
          select: select3,
          context: blockBindingsContext,
          args: relatedBinding.args
        });
        if (adjustedValue.length > 0) {
          return {
            disableBoundBlock: _disableBoundBlock,
            // Null values will make them fall back to the default behavior.
            bindingsPlaceholder: null,
            bindingsLabel: null
          };
        }
        const { getBlockAttributes: getBlockAttributes3 } = select3(store);
        const blockAttributes = getBlockAttributes3(clientId);
        let clientSideFieldLabel = null;
        if (blockBindingsSource?.getFieldsList) {
          const fieldsItems = blockBindingsSource.getFieldsList({
            select: select3,
            context: blockBindingsContext
          });
          clientSideFieldLabel = fieldsItems?.find(
            (item) => (0, import_es65.default)(item.args, relatedBinding?.args)
          )?.label;
        }
        const bindingKey = clientSideFieldLabel ?? blockBindingsSource?.label;
        const _bindingsPlaceholder = _disableBoundBlock ? bindingKey : (0, import_i18n167.sprintf)(
          /* translators: %s: connected field label or source label */
          (0, import_i18n167.__)("Add %s"),
          bindingKey
        );
        const _bindingsLabel = _disableBoundBlock ? relatedBinding?.args?.key || blockBindingsSource?.label : (0, import_i18n167.sprintf)(
          /* translators: %s: source label or key */
          (0, import_i18n167.__)("Empty %s; start writing to edit its value"),
          relatedBinding?.args?.key || blockBindingsSource?.label
        );
        return {
          disableBoundBlock: _disableBoundBlock,
          bindingsPlaceholder: blockAttributes?.placeholder || _bindingsPlaceholder,
          bindingsLabel: _bindingsLabel
        };
      },
      [
        blockBindings,
        identifier,
        blockName,
        adjustedValue,
        clientId,
        blockContext
      ]
    );
    const isInsidePatternOverrides = !!blockContext?.["pattern/overrides"];
    const hasOverrideEnabled = blockBindings?.__default?.source === "core/pattern-overrides";
    const shouldDisableForPattern = isInsidePatternOverrides && !hasOverrideEnabled;
    const shouldDisableEditing = readOnly || disableBoundBlock || shouldDisableForPattern;
    const { getSelectionStart: getSelectionStart2, getSelectionEnd: getSelectionEnd2, getBlockRootClientId: getBlockRootClientId2 } = (0, import_data152.useSelect)(store);
    const { selectionChange: selectionChange2 } = (0, import_data152.useDispatch)(store);
    const adjustedAllowedFormats = getAllowedFormats({
      allowedFormats,
      disableFormats
    });
    const hasFormats = !adjustedAllowedFormats || adjustedAllowedFormats.length > 0;
    const onSelectionChange = (0, import_element185.useCallback)(
      (start2, end) => {
        const selection2 = {};
        const unset = start2 === void 0 && end === void 0;
        const baseSelection = {
          clientId,
          [identifier ? "attributeKey" : instanceIdKey]: identifier ? identifier : instanceId
        };
        if (typeof start2 === "number" || unset) {
          if (end === void 0 && getBlockRootClientId2(clientId) !== getBlockRootClientId2(getSelectionEnd2().clientId)) {
            return;
          }
          selection2.start = {
            ...baseSelection,
            offset: start2
          };
        }
        if (typeof end === "number" || unset) {
          if (start2 === void 0 && getBlockRootClientId2(clientId) !== getBlockRootClientId2(getSelectionStart2().clientId)) {
            return;
          }
          selection2.end = {
            ...baseSelection,
            offset: end
          };
        }
        selectionChange2(selection2);
      },
      [
        clientId,
        getBlockRootClientId2,
        getSelectionEnd2,
        getSelectionStart2,
        identifier,
        instanceId,
        selectionChange2
      ]
    );
    const {
      value,
      getValue,
      onChange,
      ref: richTextRef,
      formatTypes
    } = useRichText({
      value: adjustedValue,
      onChange: adjustedOnChange,
      selectionStart,
      selectionEnd,
      onSelectionChange,
      placeholder: bindingsPlaceholder || placeholder,
      __unstableIsSelected: isSelected,
      __unstableDisableFormats: disableFormats,
      preserveWhiteSpace,
      __unstableDependencies: [tagName],
      allowedFormats: adjustedAllowedFormats,
      withoutInteractiveFormatting,
      __unstableFormatTypeHandlerContext: (0, import_element185.useMemo)(
        () => ({
          richTextIdentifier: identifier,
          blockClientId: clientId
        }),
        [identifier, clientId]
      )
    });
    const autocompleteProps = useBlockEditorAutocompleteProps({
      onReplace,
      completers: autocompleters,
      record: value,
      onChange
    });
    useMarkPersistent({ html: adjustedValue, value });
    const keyboardShortcuts = (0, import_element185.useRef)(/* @__PURE__ */ new Set());
    const inputEvents = (0, import_element185.useRef)(/* @__PURE__ */ new Set());
    function onFocus() {
      anchorRef.current?.focus();
    }
    const TagName = tagName;
    return /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)(import_jsx_runtime339.Fragment, { children: [
      isSelected && /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(keyboardShortcutContext.Provider, { value: keyboardShortcuts, children: /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(inputEventContext.Provider, { value: inputEvents, children: /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)(import_components182.Popover.__unstableSlotNameProvider, { value: "__unstable-block-tools-after", children: [
        children && children({ value, onChange, onFocus }),
        /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
          FormatEdit,
          {
            value,
            onChange,
            onFocus,
            formatTypes,
            forwardedRef: anchorRef
          }
        )
      ] }) }) }),
      isSelected && hasFormats && /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
        format_toolbar_container_default,
        {
          inline: inlineToolbar,
          editableContentElement: anchorElement
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
        TagName,
        {
          role: "textbox",
          "aria-multiline": !disableLineBreaks,
          "aria-readonly": shouldDisableEditing,
          ...props,
          draggable: void 0,
          "aria-label": bindingsLabel || props["aria-label"] || placeholder,
          ...autocompleteProps,
          ref: (0, import_compose89.useMergeRefs)([
            // Rich text ref must be first because its focus listener
            // must be set up before any other ref calls .focus() on
            // mount.
            richTextRef,
            forwardedRef,
            autocompleteProps.ref,
            props.ref,
            useEventListeners({
              registry,
              getValue,
              onChange,
              __unstableAllowPrefixTransformations,
              formatTypes,
              onReplace,
              selectionChange: selectionChange2,
              isSelected,
              disableFormats,
              value,
              tagName,
              onSplit,
              __unstableEmbedURLOnPaste,
              pastePlainText,
              onMerge,
              onRemove,
              disableLineBreaks,
              onSplitAtEnd,
              onSplitAtDoubleLineEnd,
              keyboardShortcuts,
              inputEvents
            }),
            anchorRef,
            setAnchorElement
          ]),
          contentEditable: !shouldDisableEditing,
          suppressContentEditableWarning: true,
          className: clsx_default(
            "block-editor-rich-text__editable",
            props.className,
            "rich-text"
          ),
          tabIndex: props.tabIndex === 0 && !shouldDisableEditing ? null : props.tabIndex,
          "data-wp-block-attribute-key": identifier
        }
      )
    ] });
  }
  var PrivateRichText = withDeprecations(
    (0, import_element185.forwardRef)(RichTextWrapper)
  );
  PrivateRichText.Content = Content;
  PrivateRichText.isEmpty = (value) => {
    return !value || value.length === 0;
  };
  var PublicForwardedRichTextContainer = (0, import_element185.forwardRef)((props, ref) => {
    const context = useBlockEditContext();
    const isPreviewMode = context[isPreviewModeKey];
    if (isPreviewMode) {
      const {
        children,
        tagName: Tag = "div",
        value,
        onChange,
        isSelected,
        multiline,
        inlineToolbar,
        wrapperClassName,
        autocompleters,
        onReplace,
        placeholder,
        allowedFormats,
        withoutInteractiveFormatting,
        onRemove,
        onMerge,
        onSplit,
        __unstableOnSplitAtEnd,
        __unstableOnSplitAtDoubleLineEnd,
        identifier,
        preserveWhiteSpace,
        __unstablePastePlainText,
        __unstableEmbedURLOnPaste,
        __unstableDisableFormats,
        disableLineBreaks,
        __unstableAllowPrefixTransformations,
        readOnly,
        ...contentProps
      } = removeNativeProps(props);
      return /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
        Tag,
        {
          ref,
          ...contentProps,
          dangerouslySetInnerHTML: {
            __html: valueToHTMLString(value, multiline) || "<br>"
          }
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(PrivateRichText, { ref, ...props, readOnly: false });
  });
  PublicForwardedRichTextContainer.Content = Content;
  PublicForwardedRichTextContainer.isEmpty = (value) => {
    return !value || value.length === 0;
  };
  var rich_text_default = PublicForwardedRichTextContainer;

  // packages/block-editor/build-module/components/editable-text/index.mjs
  var import_jsx_runtime340 = __toESM(require_jsx_runtime(), 1);
  var EditableText = (0, import_element186.forwardRef)((props, ref) => {
    return /* @__PURE__ */ (0, import_jsx_runtime340.jsx)(rich_text_default, { ref, ...props, __unstableDisableFormats: true });
  });
  EditableText.Content = function Content2({
    value = "",
    tagName: Tag = "div",
    ...props
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime340.jsx)(Tag, { ...props, children: value });
  };
  var editable_text_default = EditableText;

  // packages/block-editor/build-module/components/plain-text/index.mjs
  var import_jsx_runtime341 = __toESM(require_jsx_runtime(), 1);
  var PlainText = (0, import_element187.forwardRef)(({ __experimentalVersion, ...props }, ref) => {
    if (__experimentalVersion === 2) {
      return /* @__PURE__ */ (0, import_jsx_runtime341.jsx)(editable_text_default, { ref, ...props });
    }
    const { className, onChange, ...remainingProps } = props;
    return /* @__PURE__ */ (0, import_jsx_runtime341.jsx)(
      import_react_autosize_textarea2.default,
      {
        ref,
        className: clsx_default("block-editor-plain-text", className),
        onChange: (event) => onChange(event.target.value),
        ...remainingProps
      }
    );
  });
  var plain_text_default = PlainText;

  // packages/block-editor/build-module/components/responsive-block-control/index.mjs
  var import_i18n169 = __toESM(require_i18n(), 1);
  var import_element188 = __toESM(require_element(), 1);
  var import_components184 = __toESM(require_components(), 1);

  // packages/block-editor/build-module/components/responsive-block-control/label.mjs
  var import_compose90 = __toESM(require_compose(), 1);
  var import_components183 = __toESM(require_components(), 1);
  var import_i18n168 = __toESM(require_i18n(), 1);
  var import_jsx_runtime342 = __toESM(require_jsx_runtime(), 1);
  function ResponsiveBlockControlLabel({
    property,
    viewport,
    desc
  }) {
    const instanceId = (0, import_compose90.useInstanceId)(ResponsiveBlockControlLabel);
    const accessibleLabel = desc || (0, import_i18n168.sprintf)(
      /* translators: 1: property name. 2: viewport name. */
      (0, import_i18n168._x)(
        "Controls the %1$s property for %2$s viewports.",
        "Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."
      ),
      property,
      viewport.label
    );
    return /* @__PURE__ */ (0, import_jsx_runtime342.jsxs)(import_jsx_runtime342.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime342.jsx)("span", { "aria-describedby": `rbc-desc-${instanceId}`, children: viewport.label }),
      /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(import_components183.VisuallyHidden, { as: "span", id: `rbc-desc-${instanceId}`, children: accessibleLabel })
    ] });
  }

  // packages/block-editor/build-module/components/responsive-block-control/index.mjs
  var import_jsx_runtime343 = __toESM(require_jsx_runtime(), 1);
  function ResponsiveBlockControl(props) {
    const {
      title,
      property,
      toggleLabel,
      onIsResponsiveChange,
      renderDefaultControl,
      renderResponsiveControls,
      isResponsive = false,
      defaultLabel = {
        id: "all",
        label: (0, import_i18n169._x)("All", "screen sizes")
      },
      viewports = [
        {
          id: "small",
          label: (0, import_i18n169.__)("Small screens")
        },
        {
          id: "medium",
          label: (0, import_i18n169.__)("Medium screens")
        },
        {
          id: "large",
          label: (0, import_i18n169.__)("Large screens")
        }
      ]
    } = props;
    if (!title || !property || !renderDefaultControl) {
      return null;
    }
    const toggleControlLabel = toggleLabel || (0, import_i18n169.sprintf)(
      /* translators: %s: Property value for the control (eg: margin, padding, etc.). */
      (0, import_i18n169.__)("Use the same %s on all screen sizes."),
      property
    );
    const toggleHelpText = (0, import_i18n169.__)(
      "Choose whether to use the same value for all screen sizes or a unique value for each screen size."
    );
    const defaultControl = renderDefaultControl(
      /* @__PURE__ */ (0, import_jsx_runtime343.jsx)(
        ResponsiveBlockControlLabel,
        {
          property,
          viewport: defaultLabel
        }
      ),
      defaultLabel
    );
    const defaultResponsiveControls = () => {
      return viewports.map((viewport) => /* @__PURE__ */ (0, import_jsx_runtime343.jsx)(import_element188.Fragment, { children: renderDefaultControl(
        /* @__PURE__ */ (0, import_jsx_runtime343.jsx)(
          ResponsiveBlockControlLabel,
          {
            property,
            viewport
          }
        ),
        viewport
      ) }, viewport.id));
    };
    return /* @__PURE__ */ (0, import_jsx_runtime343.jsxs)("fieldset", { className: "block-editor-responsive-block-control", children: [
      /* @__PURE__ */ (0, import_jsx_runtime343.jsx)("legend", { className: "block-editor-responsive-block-control__title", children: title }),
      /* @__PURE__ */ (0, import_jsx_runtime343.jsxs)("div", { className: "block-editor-responsive-block-control__inner", children: [
        /* @__PURE__ */ (0, import_jsx_runtime343.jsx)(
          import_components184.ToggleControl,
          {
            className: "block-editor-responsive-block-control__toggle",
            label: toggleControlLabel,
            checked: !isResponsive,
            onChange: onIsResponsiveChange,
            help: toggleHelpText
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime343.jsxs)(
          "div",
          {
            className: clsx_default(
              "block-editor-responsive-block-control__group",
              {
                "is-responsive": isResponsive
              }
            ),
            children: [
              !isResponsive && defaultControl,
              isResponsive && (renderResponsiveControls ? renderResponsiveControls(viewports) : defaultResponsiveControls())
            ]
          }
        )
      ] })
    ] });
  }
  var responsive_block_control_default = ResponsiveBlockControl;

  // packages/block-editor/build-module/components/unit-control/index.mjs
  var import_components185 = __toESM(require_components(), 1);
  var import_jsx_runtime344 = __toESM(require_jsx_runtime(), 1);
  function UnitControl6({ units: unitsProp, ...props }) {
    const [availableUnits] = useSettings("spacing.units");
    const units2 = (0, import_components185.__experimentalUseCustomUnits)({
      availableUnits: availableUnits || ["%", "px", "em", "rem", "vw"],
      units: unitsProp
    });
    return /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(import_components185.__experimentalUnitControl, { units: units2, ...props });
  }

  // packages/block-editor/build-module/components/url-input/button.mjs
  var import_i18n170 = __toESM(require_i18n(), 1);
  var import_element189 = __toESM(require_element(), 1);
  var import_components186 = __toESM(require_components(), 1);
  var import_jsx_runtime345 = __toESM(require_jsx_runtime(), 1);
  function URLInputButton({ url, onChange }) {
    const [expanded2, toggleExpanded] = (0, import_element189.useReducer)(
      (isExpanded) => !isExpanded,
      false
    );
    const submitLink = (event) => {
      event.preventDefault();
      toggleExpanded();
    };
    return /* @__PURE__ */ (0, import_jsx_runtime345.jsxs)("div", { className: "block-editor-url-input__button", children: [
      /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(
        import_components186.Button,
        {
          size: "compact",
          icon: link_default,
          label: url ? (0, import_i18n170.__)("Edit link") : (0, import_i18n170.__)("Insert link"),
          onClick: toggleExpanded,
          className: "components-toolbar__control",
          isPressed: !!url
        }
      ),
      expanded2 && /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(
        "form",
        {
          className: "block-editor-url-input__button-modal",
          onSubmit: submitLink,
          children: /* @__PURE__ */ (0, import_jsx_runtime345.jsxs)("div", { className: "block-editor-url-input__button-modal-line", children: [
            /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(
              import_components186.Button,
              {
                __next40pxDefaultSize: true,
                className: "block-editor-url-input__back",
                icon: arrow_left_default,
                label: (0, import_i18n170.__)("Close"),
                onClick: toggleExpanded
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(
              url_input_default,
              {
                value: url || "",
                onChange,
                suffix: /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(import_components186.__experimentalInputControlSuffixWrapper, { variant: "control", children: /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(
                  import_components186.Button,
                  {
                    size: "small",
                    icon: keyboard_return_default,
                    label: (0, import_i18n170.__)("Submit"),
                    type: "submit"
                  }
                ) })
              }
            )
          ] })
        }
      )
    ] });
  }
  var button_default = URLInputButton;

  // packages/block-editor/build-module/components/url-popover/image-url-input-ui.mjs
  var import_i18n171 = __toESM(require_i18n(), 1);
  var import_element190 = __toESM(require_element(), 1);
  var import_dom38 = __toESM(require_dom(), 1);
  var import_components187 = __toESM(require_components(), 1);
  var import_url11 = __toESM(require_url(), 1);
  var import_jsx_runtime346 = __toESM(require_jsx_runtime(), 1);
  var LINK_DESTINATION_NONE = "none";
  var LINK_DESTINATION_CUSTOM = "custom";
  var LINK_DESTINATION_MEDIA = "media";
  var LINK_DESTINATION_ATTACHMENT = "attachment";
  var NEW_TAB_REL = ["noreferrer", "noopener"];
  var ImageURLInputUI = ({
    linkDestination,
    onChangeUrl,
    url,
    mediaType = "image",
    mediaUrl,
    mediaLink,
    linkTarget,
    linkClass,
    rel,
    showLightboxSetting,
    lightboxEnabled,
    onSetLightbox,
    resetLightbox
  }) => {
    const [isOpen, setIsOpen] = (0, import_element190.useState)(false);
    const [popoverAnchor, setPopoverAnchor] = (0, import_element190.useState)(null);
    const openLinkUI = () => {
      setIsOpen(true);
    };
    const [isEditingLink, setIsEditingLink] = (0, import_element190.useState)(false);
    const [urlInput, setUrlInput] = (0, import_element190.useState)(null);
    const autocompleteRef = (0, import_element190.useRef)(null);
    const wrapperRef = (0, import_element190.useRef)();
    (0, import_element190.useEffect)(() => {
      if (!wrapperRef.current) {
        return;
      }
      const nextFocusTarget = import_dom38.focus.focusable.find(wrapperRef.current)[0] || wrapperRef.current;
      nextFocusTarget.focus();
    }, [isEditingLink, url, lightboxEnabled]);
    const startEditLink = () => {
      if (linkDestination === LINK_DESTINATION_MEDIA || linkDestination === LINK_DESTINATION_ATTACHMENT) {
        setUrlInput("");
      }
      setIsEditingLink(true);
    };
    const stopEditLink = () => {
      setIsEditingLink(false);
    };
    const closeLinkUI = () => {
      setUrlInput(null);
      stopEditLink();
      setIsOpen(false);
    };
    const getUpdatedLinkTargetSettings = (value) => {
      const newLinkTarget = value ? "_blank" : void 0;
      let updatedRel;
      if (newLinkTarget) {
        const rels = (rel ?? "").split(" ");
        NEW_TAB_REL.forEach((relVal) => {
          if (!rels.includes(relVal)) {
            rels.push(relVal);
          }
        });
        updatedRel = rels.join(" ");
      } else {
        const rels = (rel ?? "").split(" ").filter(
          (relVal) => NEW_TAB_REL.includes(relVal) === false
        );
        updatedRel = rels.length ? rels.join(" ") : void 0;
      }
      return {
        linkTarget: newLinkTarget,
        rel: updatedRel
      };
    };
    const onFocusOutside = () => {
      return (event) => {
        const autocompleteElement = autocompleteRef.current;
        if (autocompleteElement && autocompleteElement.contains(event.target)) {
          return;
        }
        setIsOpen(false);
        setUrlInput(null);
        stopEditLink();
      };
    };
    const onSubmitLinkChange = () => {
      return (event) => {
        if (urlInput) {
          const selectedDestination = getLinkDestinations().find(
            (destination) => destination.url === urlInput
          )?.linkDestination || LINK_DESTINATION_CUSTOM;
          onChangeUrl({
            href: (0, import_url11.prependHTTPS)(urlInput),
            linkDestination: selectedDestination,
            lightbox: { enabled: false }
          });
        }
        stopEditLink();
        setUrlInput(null);
        event.preventDefault();
      };
    };
    const onLinkRemove = () => {
      onChangeUrl({
        linkDestination: LINK_DESTINATION_NONE,
        href: ""
      });
    };
    const getLinkDestinations = () => {
      const linkDestinations = [
        {
          linkDestination: LINK_DESTINATION_MEDIA,
          title: (0, import_i18n171.__)("Link to image file"),
          url: mediaType === "image" ? mediaUrl : void 0,
          icon: image_default
        }
      ];
      if (mediaType === "image" && mediaLink) {
        linkDestinations.push({
          linkDestination: LINK_DESTINATION_ATTACHMENT,
          title: (0, import_i18n171.__)("Link to attachment page"),
          url: mediaType === "image" ? mediaLink : void 0,
          icon: page_default
        });
      }
      return linkDestinations;
    };
    const onSetHref = (value) => {
      const linkDestinations = getLinkDestinations();
      let linkDestinationInput;
      if (!value) {
        linkDestinationInput = LINK_DESTINATION_NONE;
      } else {
        linkDestinationInput = (linkDestinations.find((destination) => {
          return destination.url === value;
        }) || { linkDestination: LINK_DESTINATION_CUSTOM }).linkDestination;
      }
      onChangeUrl({
        linkDestination: linkDestinationInput,
        href: value
      });
    };
    const onSetNewTab = (value) => {
      const updatedLinkTarget = getUpdatedLinkTargetSettings(value);
      onChangeUrl(updatedLinkTarget);
    };
    const onSetLinkRel = (value) => {
      onChangeUrl({ rel: value });
    };
    const onSetLinkClass = (value) => {
      onChangeUrl({ linkClass: value });
    };
    const advancedOptions = /* @__PURE__ */ (0, import_jsx_runtime346.jsxs)(import_components187.__experimentalVStack, { spacing: "3", children: [
      /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
        import_components187.ToggleControl,
        {
          label: (0, import_i18n171.__)("Open in new tab"),
          onChange: onSetNewTab,
          checked: linkTarget === "_blank"
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
        import_components187.TextControl,
        {
          __next40pxDefaultSize: true,
          label: (0, import_i18n171.__)("Link relation"),
          value: rel ?? "",
          onChange: onSetLinkRel,
          help: (0, import_element190.createInterpolateElement)(
            (0, import_i18n171.__)(
              "The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."
            ),
            {
              a: /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(import_components187.ExternalLink, { href: "https://developer.mozilla.org/docs/Web/HTML/Attributes/rel" })
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
        import_components187.TextControl,
        {
          __next40pxDefaultSize: true,
          label: (0, import_i18n171.__)("Link CSS class"),
          value: linkClass || "",
          onChange: onSetLinkClass
        }
      )
    ] });
    const linkEditorValue = urlInput !== null ? urlInput : url;
    const hideLightboxPanel = !lightboxEnabled || lightboxEnabled && !showLightboxSetting;
    const showLinkEditor = !linkEditorValue && hideLightboxPanel;
    const urlLabel = (getLinkDestinations().find(
      (destination) => destination.linkDestination === linkDestination
    ) || {}).title;
    const PopoverChildren = () => {
      if (lightboxEnabled && showLightboxSetting && !url && !isEditingLink) {
        return /* @__PURE__ */ (0, import_jsx_runtime346.jsxs)("div", { className: "block-editor-url-popover__expand-on-click", children: [
          /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(icon_default, { icon: fullscreen_default }),
          /* @__PURE__ */ (0, import_jsx_runtime346.jsxs)("div", { className: "text", children: [
            /* @__PURE__ */ (0, import_jsx_runtime346.jsx)("p", { children: (0, import_i18n171.__)("Enlarge on click") }),
            /* @__PURE__ */ (0, import_jsx_runtime346.jsx)("p", { className: "description", children: (0, import_i18n171.__)("Scales the image with a lightbox effect") })
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
            import_components187.Button,
            {
              icon: link_off_default,
              label: (0, import_i18n171.__)("Disable enlarge on click"),
              onClick: () => {
                onSetLightbox?.(false);
              },
              size: "compact"
            }
          )
        ] });
      } else if (!url || isEditingLink) {
        return /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
          url_popover_default.LinkEditor,
          {
            className: "block-editor-format-toolbar__link-container-content",
            value: linkEditorValue,
            onChangeInputValue: setUrlInput,
            onSubmit: onSubmitLinkChange(),
            autocompleteRef
          }
        );
      } else if (url && !isEditingLink) {
        return /* @__PURE__ */ (0, import_jsx_runtime346.jsxs)(import_jsx_runtime346.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
            url_popover_default.LinkViewer,
            {
              className: "block-editor-format-toolbar__link-container-content",
              url,
              onEditLinkClick: startEditLink,
              urlLabel
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
            import_components187.Button,
            {
              icon: link_off_default,
              label: (0, import_i18n171.__)("Remove link"),
              onClick: () => {
                onLinkRemove();
                resetLightbox?.();
              },
              size: "compact"
            }
          )
        ] });
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime346.jsxs)(import_jsx_runtime346.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
        import_components187.ToolbarButton,
        {
          icon: link_default,
          className: "components-toolbar__control",
          label: (0, import_i18n171.__)("Link"),
          "aria-expanded": isOpen,
          onClick: openLinkUI,
          ref: setPopoverAnchor,
          isActive: !!url || lightboxEnabled && showLightboxSetting
        }
      ),
      isOpen && /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
        url_popover_default,
        {
          ref: wrapperRef,
          anchor: popoverAnchor,
          onFocusOutside: onFocusOutside(),
          onClose: closeLinkUI,
          renderSettings: hideLightboxPanel ? () => advancedOptions : null,
          additionalControls: showLinkEditor && /* @__PURE__ */ (0, import_jsx_runtime346.jsxs)(import_components187.NavigableMenu, { children: [
            getLinkDestinations().map((link) => /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
              import_components187.MenuItem,
              {
                icon: link.icon,
                iconPosition: "left",
                onClick: () => {
                  setUrlInput(null);
                  onSetHref(link.url);
                  stopEditLink();
                },
                children: link.title
              },
              link.linkDestination
            )),
            showLightboxSetting && /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
              import_components187.MenuItem,
              {
                className: "block-editor-url-popover__expand-on-click",
                icon: fullscreen_default,
                info: (0, import_i18n171.__)(
                  "Scale the image with a lightbox effect."
                ),
                iconPosition: "left",
                onClick: () => {
                  setUrlInput(null);
                  onChangeUrl({
                    linkDestination: LINK_DESTINATION_NONE,
                    href: ""
                  });
                  onSetLightbox?.(true);
                  stopEditLink();
                },
                children: (0, import_i18n171.__)("Enlarge on click")
              },
              "expand-on-click"
            )
          ] }),
          offset: 13,
          children: PopoverChildren()
        }
      )
    ] });
  };

  // packages/block-editor/build-module/components/spacing-sizes-control/index.mjs
  var import_components190 = __toESM(require_components(), 1);
  var import_element193 = __toESM(require_element(), 1);
  var import_i18n175 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.mjs
  var import_element191 = __toESM(require_element(), 1);
  var import_i18n172 = __toESM(require_i18n(), 1);
  var EMPTY_ARRAY11 = [];
  var compare = new Intl.Collator("und", { numeric: true }).compare;
  function useSpacingSizes() {
    const [
      customSpacingSizes,
      themeSpacingSizes,
      defaultSpacingSizes,
      defaultSpacingSizesEnabled
    ] = useSettings(
      "spacing.spacingSizes.custom",
      "spacing.spacingSizes.theme",
      "spacing.spacingSizes.default",
      "spacing.defaultSpacingSizes"
    );
    const customSizes = customSpacingSizes ?? EMPTY_ARRAY11;
    const themeSizes = themeSpacingSizes ?? EMPTY_ARRAY11;
    const defaultSizes = defaultSpacingSizes && defaultSpacingSizesEnabled !== false ? defaultSpacingSizes : EMPTY_ARRAY11;
    return (0, import_element191.useMemo)(() => {
      const sizes = [
        { name: (0, import_i18n172.__)("None"), slug: "0", size: 0 },
        ...customSizes,
        ...themeSizes,
        ...defaultSizes
      ];
      if (sizes.every(({ slug }) => /^[0-9]/.test(slug))) {
        sizes.sort((a2, b2) => compare(a2.slug, b2.slug));
      }
      return sizes.length > RANGE_CONTROL_MAX_SIZE ? [
        {
          name: (0, import_i18n172.__)("Default"),
          slug: "default",
          size: void 0
        },
        ...sizes
      ] : sizes;
    }, [customSizes, themeSizes, defaultSizes]);
  }

  // packages/block-editor/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.mjs
  var import_element192 = __toESM(require_element(), 1);
  var import_data153 = __toESM(require_data(), 1);
  var import_i18n173 = __toESM(require_i18n(), 1);
  var import_components188 = __toESM(require_components(), 1);
  var import_jsx_runtime347 = __toESM(require_jsx_runtime(), 1);
  var CUSTOM_VALUE_SETTINGS2 = {
    px: { max: 300, steps: 1 },
    "%": { max: 100, steps: 1 },
    vw: { max: 100, steps: 1 },
    vh: { max: 100, steps: 1 },
    em: { max: 10, steps: 0.1 },
    rm: { max: 10, steps: 0.1 },
    svw: { max: 100, steps: 1 },
    lvw: { max: 100, steps: 1 },
    dvw: { max: 100, steps: 1 },
    svh: { max: 100, steps: 1 },
    lvh: { max: 100, steps: 1 },
    dvh: { max: 100, steps: 1 },
    vi: { max: 100, steps: 1 },
    svi: { max: 100, steps: 1 },
    lvi: { max: 100, steps: 1 },
    dvi: { max: 100, steps: 1 },
    vb: { max: 100, steps: 1 },
    svb: { max: 100, steps: 1 },
    lvb: { max: 100, steps: 1 },
    dvb: { max: 100, steps: 1 },
    vmin: { max: 100, steps: 1 },
    svmin: { max: 100, steps: 1 },
    lvmin: { max: 100, steps: 1 },
    dvmin: { max: 100, steps: 1 },
    vmax: { max: 100, steps: 1 },
    svmax: { max: 100, steps: 1 },
    lvmax: { max: 100, steps: 1 },
    dvmax: { max: 100, steps: 1 }
  };
  function SpacingInputControl({
    icon,
    isMixed = false,
    minimumCustomValue,
    onChange,
    onMouseOut,
    onMouseOver,
    showSideInLabel = true,
    side,
    spacingSizes,
    type,
    value,
    ...restProps
  }) {
    const disableCustomSpacingSizes = (0, import_data153.useSelect)((select3) => {
      const editorSettings = select3(store).getSettings();
      return editorSettings?.disableCustomSpacingSizes;
    });
    const [availableUnits] = useSettings("spacing.units");
    const units2 = (0, import_components188.__experimentalUseCustomUnits)({
      availableUnits: availableUnits || ["px", "em", "rem"]
    });
    const presets = (0, import_element192.useMemo)(() => {
      return spacingSizes?.map((preset) => ({
        name: preset.name,
        slug: preset.slug,
        size: preset.size
      })) || [];
    }, [spacingSizes]);
    const sideLabel = (ALL_SIDES.includes(side) || ["vertical", "horizontal"].includes(side)) && showSideInLabel ? LABELS[side] : "";
    const typeLabel = showSideInLabel ? type?.toLowerCase() : type;
    const ariaLabel = (0, import_i18n173.sprintf)(
      // translators: 1: The side of the block being modified (top, bottom, left etc.). 2. Type of spacing being modified (padding, margin, etc).
      (0, import_i18n173._x)("%1$s %2$s", "spacing"),
      sideLabel,
      typeLabel
    ).trim();
    const selectedUnit = units2[0]?.value || "px";
    return /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(
      PresetInputControl,
      {
        allowNegativeOnDrag: minimumCustomValue < 0,
        ariaLabel,
        className: "spacing-sizes-control",
        customValueSettings: CUSTOM_VALUE_SETTINGS2,
        disableCustomValues: disableCustomSpacingSizes,
        icon,
        isMixed,
        minimumCustomValue,
        onChange,
        onMouseOut,
        onMouseOver,
        presets,
        presetType: "spacing",
        selectedUnit,
        units: units2,
        value,
        ...restProps
      }
    );
  }

  // packages/block-editor/build-module/components/spacing-sizes-control/input-controls/axial.mjs
  var import_jsx_runtime348 = __toESM(require_jsx_runtime(), 1);
  var groupedSides = ["vertical", "horizontal"];
  function AxialInputControls({
    minimumCustomValue,
    onChange,
    onMouseOut,
    onMouseOver,
    sides,
    spacingSizes,
    type,
    values
  }) {
    const createHandleOnChange = (side) => (next) => {
      if (!onChange) {
        return;
      }
      const nextValues = {
        ...Object.keys(values).reduce((acc, key) => {
          acc[key] = getPresetValueFromCustomValue(
            values[key],
            spacingSizes
          );
          return acc;
        }, {})
      };
      if (side === "vertical") {
        nextValues.top = next;
        nextValues.bottom = next;
      }
      if (side === "horizontal") {
        nextValues.left = next;
        nextValues.right = next;
      }
      onChange(nextValues);
    };
    const filteredSides = sides?.length ? groupedSides.filter((side) => hasAxisSupport(sides, side)) : groupedSides;
    return /* @__PURE__ */ (0, import_jsx_runtime348.jsx)(import_jsx_runtime348.Fragment, { children: filteredSides.map((side) => {
      const axisValue = side === "vertical" ? values.top : values.left;
      return /* @__PURE__ */ (0, import_jsx_runtime348.jsx)(
        SpacingInputControl,
        {
          icon: ICONS[side],
          label: LABELS[side],
          minimumCustomValue,
          onChange: createHandleOnChange(side),
          onMouseOut,
          onMouseOver,
          side,
          spacingSizes,
          type,
          value: axisValue,
          withInputField: false
        },
        `spacing-sizes-control-${side}`
      );
    }) });
  }

  // packages/block-editor/build-module/components/spacing-sizes-control/input-controls/separated.mjs
  var import_jsx_runtime349 = __toESM(require_jsx_runtime(), 1);
  function SeparatedInputControls({
    minimumCustomValue,
    onChange,
    onMouseOut,
    onMouseOver,
    sides,
    spacingSizes,
    type,
    values
  }) {
    const filteredSides = sides?.length ? ALL_SIDES.filter((side) => sides.includes(side)) : ALL_SIDES;
    const createHandleOnChange = (side) => (next) => {
      const nextValues = {
        ...Object.keys(values).reduce((acc, key) => {
          acc[key] = getPresetValueFromCustomValue(
            values[key],
            spacingSizes
          );
          return acc;
        }, {})
      };
      nextValues[side] = next;
      onChange(nextValues);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(import_jsx_runtime349.Fragment, { children: filteredSides.map((side) => {
      return /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(
        SpacingInputControl,
        {
          icon: ICONS[side],
          label: LABELS[side],
          minimumCustomValue,
          onChange: createHandleOnChange(side),
          onMouseOut,
          onMouseOver,
          side,
          spacingSizes,
          type,
          value: values[side],
          withInputField: false
        },
        `spacing-sizes-control-${side}`
      );
    }) });
  }

  // packages/block-editor/build-module/components/spacing-sizes-control/input-controls/single.mjs
  var import_jsx_runtime350 = __toESM(require_jsx_runtime(), 1);
  function SingleInputControl({
    minimumCustomValue,
    onChange,
    onMouseOut,
    onMouseOver,
    showSideInLabel,
    side,
    spacingSizes,
    type,
    values
  }) {
    const createHandleOnChange = (currentSide) => (next) => {
      const nextValues = {
        ...Object.keys(values).reduce((acc, key) => {
          acc[key] = getPresetValueFromCustomValue(
            values[key],
            spacingSizes
          );
          return acc;
        }, {})
      };
      nextValues[currentSide] = next;
      onChange(nextValues);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
      SpacingInputControl,
      {
        label: LABELS[side],
        minimumCustomValue,
        onChange: createHandleOnChange(side),
        onMouseOut,
        onMouseOver,
        showSideInLabel,
        side,
        spacingSizes,
        type,
        value: values[side],
        withInputField: false
      }
    );
  }

  // packages/block-editor/build-module/components/spacing-sizes-control/linked-button.mjs
  var import_components189 = __toESM(require_components(), 1);
  var import_i18n174 = __toESM(require_i18n(), 1);
  var import_jsx_runtime351 = __toESM(require_jsx_runtime(), 1);
  function LinkedButton2({ isLinked, ...props }) {
    const label = isLinked ? (0, import_i18n174.__)("Unlink sides") : (0, import_i18n174.__)("Link sides");
    return /* @__PURE__ */ (0, import_jsx_runtime351.jsx)(
      import_components189.Button,
      {
        ...props,
        size: "small",
        icon: isLinked ? link_default : link_off_default,
        iconSize: 24,
        label
      }
    );
  }

  // packages/block-editor/build-module/components/spacing-sizes-control/index.mjs
  var import_jsx_runtime352 = __toESM(require_jsx_runtime(), 1);
  function SpacingSizesControl({
    inputProps,
    label: labelProp,
    minimumCustomValue = 0,
    onChange,
    onMouseOut,
    onMouseOver,
    showSideInLabel = true,
    sides = ALL_SIDES,
    useSelect: useSelect174,
    values
  }) {
    const spacingSizes = useSpacingSizes();
    const inputValues = values || DEFAULT_VALUES;
    const hasOneSide = sides?.length === 1;
    const hasOnlyAxialSides = sides?.includes("horizontal") && sides?.includes("vertical") && sides?.length === 2;
    const [view, setView] = (0, import_element193.useState)(getInitialView(inputValues, sides));
    const toggleLinked = () => {
      setView(view === VIEWS.axial ? VIEWS.custom : VIEWS.axial);
    };
    const handleOnChange = (nextValue) => {
      const newValues = { ...values, ...nextValue };
      onChange(newValues);
    };
    const inputControlProps = {
      ...inputProps,
      minimumCustomValue,
      onChange: handleOnChange,
      onMouseOut,
      onMouseOver,
      sides,
      spacingSizes,
      type: labelProp,
      useSelect: useSelect174,
      values: inputValues
    };
    const renderControls = () => {
      if (view === VIEWS.axial) {
        return /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(AxialInputControls, { ...inputControlProps });
      }
      if (view === VIEWS.custom) {
        return /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(SeparatedInputControls, { ...inputControlProps });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(
        SingleInputControl,
        {
          side: view,
          ...inputControlProps,
          showSideInLabel
        }
      );
    };
    const sideLabel = ALL_SIDES.includes(view) && showSideInLabel ? LABELS[view] : "";
    const label = (0, import_i18n175.sprintf)(
      // translators: 1: The side of the block being modified (top, bottom, left etc.). 2. Type of spacing being modified (padding, margin, etc).
      (0, import_i18n175._x)("%1$s %2$s", "spacing"),
      labelProp,
      sideLabel
    ).trim();
    return /* @__PURE__ */ (0, import_jsx_runtime352.jsxs)("fieldset", { className: "spacing-sizes-control", children: [
      /* @__PURE__ */ (0, import_jsx_runtime352.jsxs)(import_components190.__experimentalHStack, { className: "spacing-sizes-control__header", children: [
        /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(
          import_components190.BaseControl.VisualLabel,
          {
            as: "legend",
            className: "spacing-sizes-control__label",
            children: label
          }
        ),
        !hasOneSide && !hasOnlyAxialSides && /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(
          LinkedButton2,
          {
            label: labelProp,
            onClick: toggleLinked,
            isLinked: view === VIEWS.axial
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(import_components190.__experimentalVStack, { spacing: 0.5, children: renderControls() })
    ] });
  }

  // packages/block-editor/build-module/components/preview-options/index.mjs
  var import_deprecated31 = __toESM(require_deprecated(), 1);
  function PreviewOptions() {
    (0, import_deprecated31.default)("wp.blockEditor.PreviewOptions", {
      version: "6.5"
    });
    return null;
  }

  // packages/block-editor/build-module/components/use-resize-canvas/index.mjs
  var import_element194 = __toESM(require_element(), 1);
  function useResizeCanvas(deviceType) {
    const [actualWidth, updateActualWidth] = (0, import_element194.useState)(window.innerWidth);
    (0, import_element194.useEffect)(() => {
      if (deviceType === "Desktop") {
        return;
      }
      const resizeListener = () => updateActualWidth(window.innerWidth);
      window.addEventListener("resize", resizeListener);
      return () => {
        window.removeEventListener("resize", resizeListener);
      };
    }, [deviceType]);
    const getCanvasWidth = (device) => {
      let deviceWidth;
      switch (device) {
        case "Tablet":
          deviceWidth = 782 - 1;
          break;
        case "Mobile":
          deviceWidth = 480 - 1;
          break;
        default:
          return null;
      }
      return deviceWidth < actualWidth ? deviceWidth : actualWidth;
    };
    const contentInlineStyles = (device) => {
      const height = device === "Mobile" ? "768px" : "1024px";
      const marginVertical = "40px";
      const marginHorizontal = "auto";
      switch (device) {
        case "Tablet":
        case "Mobile":
          return {
            width: getCanvasWidth(device),
            // Keeping margin styles separate to avoid warnings
            // when those props get overridden in the iframe component
            marginTop: marginVertical,
            marginBottom: marginVertical,
            marginLeft: marginHorizontal,
            marginRight: marginHorizontal,
            height,
            overflowY: "auto"
          };
        default:
          return {
            marginLeft: marginHorizontal,
            marginRight: marginHorizontal
          };
      }
    };
    return contentInlineStyles(deviceType);
  }

  // packages/block-editor/build-module/components/block-inspector/index.mjs
  var import_i18n200 = __toESM(require_i18n(), 1);
  var import_blocks95 = __toESM(require_blocks(), 1);
  var import_components217 = __toESM(require_components(), 1);
  var import_data171 = __toESM(require_data(), 1);
  var import_element213 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/block-inspector/edit-contents.mjs
  var import_components191 = __toESM(require_components(), 1);
  var import_i18n176 = __toESM(require_i18n(), 1);
  var import_data154 = __toESM(require_data(), 1);
  var import_blocks88 = __toESM(require_blocks(), 1);
  var import_jsx_runtime353 = __toESM(require_jsx_runtime(), 1);
  function IsolatedEditButton({
    block,
    onNavigateToEntityRecord,
    isSyncedPattern,
    isTemplatePartBlock
  }) {
    const blockAttributes = block?.attributes || {};
    const handleClick = () => {
      if (isSyncedPattern) {
        onNavigateToEntityRecord({
          postId: blockAttributes.ref,
          postType: "wp_block"
        });
      } else if (isTemplatePartBlock) {
        const { theme, slug } = blockAttributes;
        const templatePartId = theme && slug ? `${theme}//${slug}` : null;
        if (templatePartId) {
          onNavigateToEntityRecord({
            postId: templatePartId,
            postType: "wp_template_part"
          });
        }
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(import_components191.__experimentalVStack, { className: "block-editor-block-inspector-edit-contents", expanded: true, children: /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
      import_components191.Button,
      {
        className: "block-editor-block-inspector-edit-contents__button",
        __next40pxDefaultSize: true,
        variant: "secondary",
        onClick: handleClick,
        children: (0, import_i18n176.__)("Edit original")
      }
    ) });
  }
  function InlineEditButton({
    clientId,
    editedContentOnlySection: editedContentOnlySection2,
    editContentOnlySection: editContentOnlySection2,
    stopEditingContentOnlySection: stopEditingContentOnlySection2
  }) {
    const handleClick = () => {
      if (!editedContentOnlySection2) {
        editContentOnlySection2(clientId);
      } else {
        stopEditingContentOnlySection2();
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(import_components191.__experimentalVStack, { className: "block-editor-block-inspector-edit-contents", expanded: true, children: /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
      import_components191.Button,
      {
        className: "block-editor-block-inspector-edit-contents__button",
        __next40pxDefaultSize: true,
        variant: "secondary",
        onClick: handleClick,
        children: editedContentOnlySection2 ? (0, import_i18n176.__)("Exit pattern") : (0, import_i18n176.__)("Edit pattern")
      }
    ) });
  }
  function EditContents({ clientId }) {
    const {
      isWithinSection,
      isWithinEditedSection,
      editedContentOnlySection: editedContentOnlySection2,
      editContentOnlySection: editContentOnlySection2,
      stopEditingContentOnlySection: stopEditingContentOnlySection2
    } = useContentOnlySectionEdit(clientId);
    const { block, onNavigateToEntityRecord, canEdit } = (0, import_data154.useSelect)(
      (select3) => {
        const { getBlock: getBlock2, getSettings: getSettings7, canEditBlock: canEditBlock2 } = select3(store);
        return {
          block: getBlock2(clientId),
          onNavigateToEntityRecord: getSettings7().onNavigateToEntityRecord,
          canEdit: canEditBlock2(clientId)
        };
      },
      [clientId]
    );
    if (!canEdit || !isWithinSection && !isWithinEditedSection) {
      return null;
    }
    const isSyncedPattern = (0, import_blocks88.isReusableBlock)(block);
    const isTemplatePartBlock = (0, import_blocks88.isTemplatePart)(block);
    const shouldUseIsolatedEditor = (isSyncedPattern || isTemplatePartBlock) && onNavigateToEntityRecord;
    if (shouldUseIsolatedEditor) {
      return /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
        IsolatedEditButton,
        {
          block,
          onNavigateToEntityRecord,
          isSyncedPattern,
          isTemplatePartBlock
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
      InlineEditButton,
      {
        clientId,
        editedContentOnlySection: editedContentOnlySection2,
        editContentOnlySection: editContentOnlySection2,
        stopEditingContentOnlySection: stopEditingContentOnlySection2
      }
    );
  }

  // packages/block-editor/build-module/components/skip-to-selected-block/index.mjs
  var import_data155 = __toESM(require_data(), 1);
  var import_i18n177 = __toESM(require_i18n(), 1);
  var import_components192 = __toESM(require_components(), 1);
  var import_element195 = __toESM(require_element(), 1);
  var import_jsx_runtime354 = __toESM(require_jsx_runtime(), 1);
  function SkipToSelectedBlock() {
    const selectedBlockClientId = (0, import_data155.useSelect)(
      (select3) => select3(store).getBlockSelectionStart(),
      []
    );
    const ref = (0, import_element195.useRef)();
    useBlockElementRef(selectedBlockClientId, ref);
    const onClick = () => {
      ref.current?.focus();
    };
    return selectedBlockClientId ? /* @__PURE__ */ (0, import_jsx_runtime354.jsx)(
      import_components192.Button,
      {
        __next40pxDefaultSize: true,
        variant: "secondary",
        className: "block-editor-skip-to-selected-block",
        onClick,
        children: (0, import_i18n177.__)("Skip to the selected block")
      }
    ) : null;
  }

  // packages/block-editor/build-module/components/multi-selection-inspector/index.mjs
  var import_i18n178 = __toESM(require_i18n(), 1);
  var import_data156 = __toESM(require_data(), 1);
  var import_components193 = __toESM(require_components(), 1);
  var import_jsx_runtime355 = __toESM(require_jsx_runtime(), 1);
  function MultiSelectionInspector() {
    const selectedBlockCount = (0, import_data156.useSelect)(
      (select3) => select3(store).getSelectedBlockCount(),
      []
    );
    return /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)(
      import_components193.__experimentalHStack,
      {
        justify: "flex-start",
        spacing: 2,
        className: "block-editor-multi-selection-inspector__card",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(block_icon_default, { icon: copy_default, showColors: true }),
          /* @__PURE__ */ (0, import_jsx_runtime355.jsx)("div", { className: "block-editor-multi-selection-inspector__card-title", children: (0, import_i18n178.sprintf)(
            /* translators: %d: number of blocks */
            (0, import_i18n178._n)("%d Block", "%d Blocks", selectedBlockCount),
            selectedBlockCount
          ) })
        ]
      }
    );
  }

  // packages/block-editor/build-module/components/inspector-controls-tabs/index.mjs
  var import_components214 = __toESM(require_components(), 1);
  var import_element212 = __toESM(require_element(), 1);
  var import_preferences5 = __toESM(require_preferences(), 1);
  var import_data168 = __toESM(require_data(), 1);

  // packages/block-editor/build-module/components/inspector-controls-tabs/utils.mjs
  var import_i18n179 = __toESM(require_i18n(), 1);
  var TAB_SETTINGS = {
    name: "settings",
    title: (0, import_i18n179.__)("Settings"),
    value: "settings",
    icon: cog_default
  };
  var TAB_STYLES = {
    name: "styles",
    title: (0, import_i18n179.__)("Styles"),
    value: "styles",
    icon: styles_default
  };
  var TAB_CONTENT = {
    name: "content",
    title: (0, import_i18n179.__)("Content"),
    value: "content",
    icon: page_default
  };
  var TAB_LIST_VIEW = {
    name: "list",
    title: (0, import_i18n179.__)("List View"),
    value: "list-view",
    icon: list_view_default
  };

  // packages/block-editor/build-module/components/inspector-controls-tabs/settings-tab.mjs
  var import_components196 = __toESM(require_components(), 1);

  // packages/block-editor/build-module/components/inspector-controls-tabs/advanced-controls-panel.mjs
  var import_components194 = __toESM(require_components(), 1);
  var import_i18n180 = __toESM(require_i18n(), 1);
  var import_jsx_runtime356 = __toESM(require_jsx_runtime(), 1);
  var AdvancedControls = ({ initialOpen = false }) => {
    const fills = (0, import_components194.__experimentalUseSlotFills)(InspectorAdvancedControls.slotName);
    const privateFills = (0, import_components194.__experimentalUseSlotFills)(
      PrivateInspectorControlsAllowedBlocks.name
    );
    const hasFills = Boolean(fills && fills.length);
    const hasPrivateFills = Boolean(privateFills && privateFills.length);
    if (!hasFills && !hasPrivateFills) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)(
      import_components194.PanelBody,
      {
        className: "block-editor-block-inspector__advanced",
        title: (0, import_i18n180.__)("Advanced"),
        initialOpen,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(inspector_controls_default.Slot, { group: "advanced" }),
          /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(PrivateInspectorControlsAllowedBlocks.Slot, {})
        ]
      }
    );
  };
  var advanced_controls_panel_default = AdvancedControls;

  // packages/block-editor/build-module/components/inspector-controls-tabs/position-controls-panel.mjs
  var import_components195 = __toESM(require_components(), 1);
  var import_data157 = __toESM(require_data(), 1);
  var import_i18n181 = __toESM(require_i18n(), 1);
  var import_jsx_runtime357 = __toESM(require_jsx_runtime(), 1);
  var PositionControlsPanel = () => {
    const { selectedClientIds, selectedBlocks, hasPositionAttribute } = (0, import_data157.useSelect)((select3) => {
      const { getBlocksByClientId: getBlocksByClientId2, getSelectedBlockClientIds: getSelectedBlockClientIds2 } = select3(store);
      const selectedBlockClientIds = getSelectedBlockClientIds2();
      const _selectedBlocks = getBlocksByClientId2(
        selectedBlockClientIds
      );
      return {
        selectedClientIds: selectedBlockClientIds,
        selectedBlocks: _selectedBlocks,
        hasPositionAttribute: _selectedBlocks?.some(
          ({ attributes }) => !!attributes?.style?.position?.type
        )
      };
    }, []);
    const { updateBlockAttributes: updateBlockAttributes2 } = (0, import_data157.useDispatch)(store);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    function resetPosition() {
      if (!selectedClientIds?.length || !selectedBlocks?.length) {
        return;
      }
      const attributesByClientId = Object.fromEntries(
        selectedBlocks?.map(({ clientId, attributes }) => [
          clientId,
          {
            style: cleanEmptyObject({
              ...attributes?.style,
              position: {
                ...attributes?.style?.position,
                type: void 0,
                top: void 0,
                right: void 0,
                bottom: void 0,
                left: void 0
              }
            })
          }
        ])
      );
      updateBlockAttributes2(selectedClientIds, attributesByClientId, true);
    }
    return /* @__PURE__ */ (0, import_jsx_runtime357.jsx)(
      import_components195.__experimentalToolsPanel,
      {
        className: "block-editor-block-inspector__position",
        label: (0, import_i18n181.__)("Position"),
        resetAll: resetPosition,
        dropdownMenuProps,
        children: /* @__PURE__ */ (0, import_jsx_runtime357.jsx)(
          import_components195.__experimentalToolsPanelItem,
          {
            isShownByDefault: hasPositionAttribute,
            label: (0, import_i18n181.__)("Position"),
            hasValue: () => hasPositionAttribute,
            onDeselect: resetPosition,
            children: /* @__PURE__ */ (0, import_jsx_runtime357.jsx)(inspector_controls_default.Slot, { group: "position" })
          }
        )
      }
    );
  };
  var PositionControls = () => {
    const fills = (0, import_components195.__experimentalUseSlotFills)(groups_default.position.name);
    const hasFills = Boolean(fills && fills.length);
    if (!hasFills) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime357.jsx)(PositionControlsPanel, {});
  };
  var position_controls_panel_default = PositionControls;

  // packages/block-editor/build-module/components/inspector-controls-tabs/settings-tab.mjs
  var import_jsx_runtime358 = __toESM(require_jsx_runtime(), 1);
  var SettingsTab = ({ showAdvancedControls = false }) => {
    const defaultFills = (0, import_components196.__experimentalUseSlotFills)(groups_default.default.name);
    const positionFills = (0, import_components196.__experimentalUseSlotFills)(groups_default.position.name);
    const bindingsFills = (0, import_components196.__experimentalUseSlotFills)(groups_default.bindings.name);
    const hasOtherFills = !!defaultFills?.length || !!positionFills?.length || !!bindingsFills?.length;
    return /* @__PURE__ */ (0, import_jsx_runtime358.jsxs)(import_jsx_runtime358.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime358.jsx)(inspector_controls_default.Slot, {}),
      /* @__PURE__ */ (0, import_jsx_runtime358.jsx)(position_controls_panel_default, {}),
      /* @__PURE__ */ (0, import_jsx_runtime358.jsx)(inspector_controls_default.Slot, { group: "bindings" }),
      showAdvancedControls && /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime358.jsx)(advanced_controls_panel_default, { initialOpen: !hasOtherFills }) })
    ] });
  };
  var settings_tab_default = SettingsTab;

  // packages/block-editor/build-module/components/inspector-controls-tabs/styles-tab.mjs
  var import_i18n198 = __toESM(require_i18n(), 1);
  var import_data166 = __toESM(require_data(), 1);

  // packages/block-editor/build-module/hooks/border.mjs
  var import_blocks90 = __toESM(require_blocks(), 1);
  var import_components211 = __toESM(require_components(), 1);
  var import_element208 = __toESM(require_element(), 1);
  var import_hooks11 = __toESM(require_hooks(), 1);
  var import_data162 = __toESM(require_data(), 1);

  // packages/block-editor/build-module/components/global-styles/index.mjs
  var global_styles_exports = {};
  __export(global_styles_exports, {
    AdvancedPanel: () => AdvancedPanel,
    BackgroundPanel: () => BackgroundImagePanel2,
    BorderPanel: () => BorderPanel,
    ColorPanel: () => ColorPanel,
    DimensionsPanel: () => DimensionsPanel,
    FiltersPanel: () => FiltersPanel,
    ImageSettingsPanel: () => ImageSettingsPanel,
    TypographyPanel: () => TypographyPanel,
    useHasBackgroundPanel: () => useHasBackgroundPanel,
    useHasBorderPanel: () => useHasBorderPanel,
    useHasBorderPanelControls: () => useHasBorderPanelControls,
    useHasColorPanel: () => useHasColorPanel,
    useHasDimensionsPanel: () => useHasDimensionsPanel,
    useHasFiltersPanel: () => useHasFiltersPanel,
    useHasImageSettingsPanel: () => useHasImageSettingsPanel,
    useHasTypographyPanel: () => useHasTypographyPanel,
    useSettingsForBlockElement: () => useSettingsForBlockElement
  });

  // packages/block-editor/build-module/components/global-styles/hooks.mjs
  var import_element196 = __toESM(require_element(), 1);
  var import_data158 = __toESM(require_data(), 1);
  var import_blocks89 = __toESM(require_blocks(), 1);
  var import_i18n182 = __toESM(require_i18n(), 1);
  function useSettingsForBlockElement(parentSettings, blockName, element) {
    const { supportedStyles, supports } = (0, import_data158.useSelect)(
      (select3) => {
        return {
          supportedStyles: unlock(
            select3(import_blocks89.store)
          ).getSupportedStyles(blockName, element),
          supports: select3(import_blocks89.store).getBlockType(blockName)?.supports
        };
      },
      [blockName, element]
    );
    return (0, import_element196.useMemo)(() => {
      const updatedSettings = { ...parentSettings };
      if (!supportedStyles.includes("fontSize")) {
        updatedSettings.typography = {
          ...updatedSettings.typography,
          fontSizes: {},
          customFontSize: false,
          defaultFontSizes: false
        };
      }
      if (!supportedStyles.includes("fontFamily")) {
        updatedSettings.typography = {
          ...updatedSettings.typography,
          fontFamilies: {}
        };
      }
      updatedSettings.color = {
        ...updatedSettings.color,
        text: updatedSettings.color?.text && supportedStyles.includes("color"),
        background: updatedSettings.color?.background && (supportedStyles.includes("background") || supportedStyles.includes("backgroundColor")),
        button: updatedSettings.color?.button && supportedStyles.includes("buttonColor"),
        heading: updatedSettings.color?.heading && supportedStyles.includes("headingColor"),
        link: updatedSettings.color?.link && supportedStyles.includes("linkColor"),
        caption: updatedSettings.color?.caption && supportedStyles.includes("captionColor")
      };
      if (!supportedStyles.includes("background")) {
        updatedSettings.color.gradients = [];
        updatedSettings.color.customGradient = false;
      }
      if (!supportedStyles.includes("filter")) {
        updatedSettings.color.defaultDuotone = false;
        updatedSettings.color.customDuotone = false;
      }
      [
        "lineHeight",
        "fontStyle",
        "fontWeight",
        "letterSpacing",
        "textAlign",
        "textTransform",
        "textDecoration",
        "textIndent",
        "writingMode"
      ].forEach((key) => {
        if (!supportedStyles.includes(key)) {
          updatedSettings.typography = {
            ...updatedSettings.typography,
            [key]: false
          };
        }
      });
      if (supportedStyles.includes("textIndent")) {
        updatedSettings.typography = {
          ...updatedSettings.typography,
          textIndent: updatedSettings.typography?.textIndent ?? "subsequent"
        };
      }
      if (!supportedStyles.includes("columnCount")) {
        updatedSettings.typography = {
          ...updatedSettings.typography,
          textColumns: false
        };
      }
      ["contentSize", "wideSize"].forEach((key) => {
        if (!supportedStyles.includes(key)) {
          updatedSettings.layout = {
            ...updatedSettings.layout,
            [key]: false
          };
        }
      });
      ["padding", "margin", "blockGap"].forEach((key) => {
        if (!supportedStyles.includes(key)) {
          updatedSettings.spacing = {
            ...updatedSettings.spacing,
            [key]: false
          };
        }
        const sides = Array.isArray(supports?.spacing?.[key]) ? supports?.spacing?.[key] : supports?.spacing?.[key]?.sides;
        if (sides?.length && updatedSettings.spacing?.[key]) {
          updatedSettings.spacing = {
            ...updatedSettings.spacing,
            [key]: {
              ...updatedSettings.spacing?.[key],
              sides
            }
          };
        }
      });
      ["aspectRatio", "height", "minHeight", "width"].forEach((key) => {
        if (!supportedStyles.includes(key)) {
          updatedSettings.dimensions = {
            ...updatedSettings.dimensions,
            [key]: false
          };
        }
      });
      ["radius", "color", "style", "width"].forEach((key) => {
        if (!supportedStyles.includes(
          "border" + key.charAt(0).toUpperCase() + key.slice(1)
        )) {
          updatedSettings.border = {
            ...updatedSettings.border,
            [key]: false
          };
        }
      });
      ["backgroundImage", "backgroundSize"].forEach((key) => {
        if (!supportedStyles.includes(key)) {
          updatedSettings.background = {
            ...updatedSettings.background,
            [key]: false
          };
        }
      });
      updatedSettings.shadow = supportedStyles.includes("shadow") ? updatedSettings.shadow : false;
      return updatedSettings;
    }, [parentSettings, supportedStyles, supports]);
  }
  function useColorsPerOrigin(settings2) {
    const customColors = settings2?.color?.palette?.custom;
    const themeColors = settings2?.color?.palette?.theme;
    const defaultColors = settings2?.color?.palette?.default;
    const shouldDisplayDefaultColors = settings2?.color?.defaultPalette;
    return (0, import_element196.useMemo)(() => {
      const result = [];
      if (themeColors && themeColors.length) {
        result.push({
          name: (0, import_i18n182._x)(
            "Theme",
            "Indicates this palette comes from the theme."
          ),
          colors: themeColors
        });
      }
      if (shouldDisplayDefaultColors && defaultColors && defaultColors.length) {
        result.push({
          name: (0, import_i18n182._x)(
            "Default",
            "Indicates this palette comes from WordPress."
          ),
          colors: defaultColors
        });
      }
      if (customColors && customColors.length) {
        result.push({
          name: (0, import_i18n182._x)(
            "Custom",
            "Indicates this palette is created by the user."
          ),
          colors: customColors
        });
      }
      return result;
    }, [
      customColors,
      themeColors,
      defaultColors,
      shouldDisplayDefaultColors
    ]);
  }
  function useGradientsPerOrigin(settings2) {
    const customGradients = settings2?.color?.gradients?.custom;
    const themeGradients = settings2?.color?.gradients?.theme;
    const defaultGradients = settings2?.color?.gradients?.default;
    const shouldDisplayDefaultGradients = settings2?.color?.defaultGradients;
    return (0, import_element196.useMemo)(() => {
      const result = [];
      if (themeGradients && themeGradients.length) {
        result.push({
          name: (0, import_i18n182._x)(
            "Theme",
            "Indicates this palette comes from the theme."
          ),
          gradients: themeGradients
        });
      }
      if (shouldDisplayDefaultGradients && defaultGradients && defaultGradients.length) {
        result.push({
          name: (0, import_i18n182._x)(
            "Default",
            "Indicates this palette comes from WordPress."
          ),
          gradients: defaultGradients
        });
      }
      if (customGradients && customGradients.length) {
        result.push({
          name: (0, import_i18n182._x)(
            "Custom",
            "Indicates this palette is created by the user."
          ),
          gradients: customGradients
        });
      }
      return result;
    }, [
      customGradients,
      themeGradients,
      defaultGradients,
      shouldDisplayDefaultGradients
    ]);
  }

  // packages/block-editor/build-module/components/global-styles/typography-panel.mjs
  var import_components199 = __toESM(require_components(), 1);
  var import_i18n185 = __toESM(require_i18n(), 1);
  var import_element198 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/text-alignment-control/index.mjs
  var import_i18n183 = __toESM(require_i18n(), 1);
  var import_element197 = __toESM(require_element(), 1);
  var import_components197 = __toESM(require_components(), 1);
  var import_jsx_runtime359 = __toESM(require_jsx_runtime(), 1);
  var TEXT_ALIGNMENT_OPTIONS = [
    {
      label: (0, import_i18n183.__)("Align text left"),
      value: "left",
      icon: align_left_default
    },
    {
      label: (0, import_i18n183.__)("Align text center"),
      value: "center",
      icon: align_center_default
    },
    {
      label: (0, import_i18n183.__)("Align text right"),
      value: "right",
      icon: align_right_default
    },
    {
      label: (0, import_i18n183.__)("Justify text"),
      value: "justify",
      icon: align_justify_default
    }
  ];
  var DEFAULT_OPTIONS = ["left", "center", "right"];
  function TextAlignmentControl({
    className,
    value,
    onChange,
    options = DEFAULT_OPTIONS
  }) {
    const validOptions = (0, import_element197.useMemo)(
      () => TEXT_ALIGNMENT_OPTIONS.filter(
        (option) => options.includes(option.value)
      ),
      [options]
    );
    if (!validOptions.length) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime359.jsx)(
      import_components197.__experimentalToggleGroupControl,
      {
        isDeselectable: true,
        __next40pxDefaultSize: true,
        label: (0, import_i18n183.__)("Text alignment"),
        className: clsx_default(
          "block-editor-text-alignment-control",
          className
        ),
        value,
        onChange: (newValue) => {
          onChange(newValue === value ? void 0 : newValue);
        },
        children: validOptions.map((option) => {
          return /* @__PURE__ */ (0, import_jsx_runtime359.jsx)(
            import_components197.__experimentalToggleGroupControlOptionIcon,
            {
              value: option.value,
              icon: option.icon,
              label: option.label
            },
            option.value
          );
        })
      }
    );
  }

  // packages/block-editor/build-module/components/text-indent-control/index.mjs
  var import_components198 = __toESM(require_components(), 1);
  var import_i18n184 = __toESM(require_i18n(), 1);
  var import_jsx_runtime360 = __toESM(require_jsx_runtime(), 1);
  function TextIndentControl({
    __next40pxDefaultSize = false,
    value,
    onChange,
    __unstableInputWidth = "60px",
    withSlider = false,
    hasBottomMargin = false,
    help,
    ...otherProps
  }) {
    const [availableUnits] = useSettings("spacing.units");
    const units2 = (0, import_components198.__experimentalUseCustomUnits)({
      availableUnits: availableUnits || [
        "px",
        "em",
        "rem",
        "ch",
        "%",
        "vw",
        "vh"
      ],
      defaultValues: { px: 16, em: 2, rem: 2, ch: 2 }
    });
    const [valueQuantity, valueUnit] = (0, import_components198.__experimentalParseQuantityAndUnitFromRawValue)(
      value,
      units2
    );
    const isValueUnitRelative = !!valueUnit && ["em", "rem", "%", "ch", "vw", "vh"].includes(valueUnit);
    if (!withSlider) {
      return /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(
        import_components198.__experimentalUnitControl,
        {
          __next40pxDefaultSize,
          __shouldNotWarnDeprecated36pxSize: true,
          ...otherProps,
          label: (0, import_i18n184.__)("Line indent"),
          value,
          __unstableInputWidth,
          units: units2,
          onChange,
          help
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime360.jsxs)(import_components198.__experimentalView, { style: hasBottomMargin ? { marginBottom: 12 } : void 0, children: [
      /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(import_components198.BaseControl.VisualLabel, { children: (0, import_i18n184.__)("Line indent") }),
      /* @__PURE__ */ (0, import_jsx_runtime360.jsxs)(import_components198.Flex, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(import_components198.FlexItem, { isBlock: true, children: /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(
          import_components198.__experimentalUnitControl,
          {
            __next40pxDefaultSize,
            __shouldNotWarnDeprecated36pxSize: true,
            label: (0, import_i18n184.__)("Line indent"),
            labelPosition: "top",
            hideLabelFromVision: true,
            value,
            onChange,
            size: otherProps.size,
            units: units2,
            __unstableInputWidth,
            min: 0
          }
        ) }),
        withSlider && /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(import_components198.FlexItem, { isBlock: true, children: /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(import_components198.__experimentalSpacer, { marginX: 2, marginBottom: 0, children: /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(
          import_components198.RangeControl,
          {
            __next40pxDefaultSize,
            __shouldNotWarnDeprecated36pxSize: true,
            label: (0, import_i18n184.__)("Line indent"),
            hideLabelFromVision: true,
            value: valueQuantity,
            withInputField: false,
            onChange: (newValue) => {
              if (newValue === void 0) {
                onChange?.(void 0);
              } else {
                onChange?.(
                  newValue + (valueUnit ?? "px")
                );
              }
            },
            min: 0,
            max: isValueUnitRelative ? 10 : 100,
            step: isValueUnitRelative ? 0.1 : 1,
            initialPosition: 0
          }
        ) }) })
      ] }),
      help && /* @__PURE__ */ (0, import_jsx_runtime360.jsx)("p", { className: "components-base-control__help", children: help })
    ] });
  }

  // packages/block-editor/build-module/components/global-styles/typography-utils.mjs
  function getMergedFontFamiliesAndFontFamilyFaces(settings2, selectedFontFamily) {
    const fontFamiliesFromSettings = settings2?.typography?.fontFamilies;
    const fontFamilies = ["default", "theme", "custom"].flatMap(
      (key) => fontFamiliesFromSettings?.[key] ?? []
    );
    const fontFamilyFaces = fontFamilies.find(
      (family) => family.fontFamily === selectedFontFamily
    )?.fontFace ?? [];
    return { fontFamilies, fontFamilyFaces };
  }
  function findNearestFontWeight(availableFontWeights, newFontWeightValue) {
    newFontWeightValue = "number" === typeof newFontWeightValue ? newFontWeightValue.toString() : newFontWeightValue;
    if (!newFontWeightValue || typeof newFontWeightValue !== "string") {
      return "";
    }
    if (!availableFontWeights || availableFontWeights.length === 0) {
      return newFontWeightValue;
    }
    const nearestFontWeight = availableFontWeights?.reduce(
      (nearest, { value: fw }) => {
        const currentDiff = Math.abs(
          parseInt(fw) - parseInt(newFontWeightValue)
        );
        const nearestDiff = Math.abs(
          parseInt(nearest) - parseInt(newFontWeightValue)
        );
        return currentDiff < nearestDiff ? fw : nearest;
      },
      availableFontWeights[0]?.value
    );
    return nearestFontWeight;
  }
  function findNearestFontStyle(availableFontStyles, newFontStyleValue) {
    if (typeof newFontStyleValue !== "string" || !newFontStyleValue) {
      return "";
    }
    const validStyles = ["normal", "italic", "oblique"];
    if (!validStyles.includes(newFontStyleValue)) {
      return "";
    }
    if (!availableFontStyles || availableFontStyles.length === 0 || availableFontStyles.find(
      (style) => style.value === newFontStyleValue
    )) {
      return newFontStyleValue;
    }
    if (newFontStyleValue === "oblique" && !availableFontStyles.find((style) => style.value === "oblique")) {
      return "italic";
    }
    return "";
  }
  function findNearestStyleAndWeight(fontFamilyFaces, fontStyle, fontWeight) {
    let nearestFontStyle = fontStyle;
    let nearestFontWeight = fontWeight;
    const { fontStyles, fontWeights, combinedStyleAndWeightOptions } = getFontStylesAndWeights(fontFamilyFaces);
    const hasFontStyle = fontStyles?.some(
      ({ value: fs }) => fs === fontStyle
    );
    const hasFontWeight = fontWeights?.some(
      ({ value: fw }) => fw?.toString() === fontWeight?.toString()
    );
    if (!hasFontStyle) {
      nearestFontStyle = fontStyle ? findNearestFontStyle(fontStyles, fontStyle) : combinedStyleAndWeightOptions?.find(
        (option) => option.style.fontWeight === findNearestFontWeight(fontWeights, fontWeight)
      )?.style?.fontStyle;
    }
    if (!hasFontWeight) {
      nearestFontWeight = fontWeight ? findNearestFontWeight(fontWeights, fontWeight) : combinedStyleAndWeightOptions?.find(
        (option) => option.style.fontStyle === (nearestFontStyle || fontStyle)
      )?.style?.fontWeight;
    }
    return { nearestFontStyle, nearestFontWeight };
  }

  // packages/block-editor/build-module/components/global-styles/typography-panel.mjs
  var import_jsx_runtime361 = __toESM(require_jsx_runtime(), 1);
  var MIN_TEXT_COLUMNS = 1;
  var MAX_TEXT_COLUMNS = 6;
  function useHasTypographyPanel(settings2) {
    const hasFontFamily = useHasFontFamilyControl(settings2);
    const hasLineHeight = useHasLineHeightControl(settings2);
    const hasFontAppearance = useHasAppearanceControl(settings2);
    const hasLetterSpacing = useHasLetterSpacingControl(settings2);
    const hasTextAlign = useHasTextAlignmentControl(settings2);
    const hasTextTransform = useHasTextTransformControl(settings2);
    const hasTextDecoration = useHasTextDecorationControl(settings2);
    const hasTextIndent = useHasTextIndentControl(settings2);
    const hasWritingMode = useHasWritingModeControl(settings2);
    const hasTextColumns = useHasTextColumnsControl(settings2);
    const hasFontSize = useHasFontSizeControl(settings2);
    return hasFontFamily || hasLineHeight || hasFontAppearance || hasLetterSpacing || hasTextAlign || hasTextTransform || hasFontSize || hasTextDecoration || hasTextIndent || hasWritingMode || hasTextColumns;
  }
  function useHasFontSizeControl(settings2) {
    return settings2?.typography?.defaultFontSizes !== false && settings2?.typography?.fontSizes?.default?.length || settings2?.typography?.fontSizes?.theme?.length || settings2?.typography?.fontSizes?.custom?.length || settings2?.typography?.customFontSize;
  }
  function useHasFontFamilyControl(settings2) {
    return ["default", "theme", "custom"].some(
      (key) => settings2?.typography?.fontFamilies?.[key]?.length
    );
  }
  function useHasLineHeightControl(settings2) {
    return settings2?.typography?.lineHeight;
  }
  function useHasAppearanceControl(settings2) {
    return settings2?.typography?.fontStyle || settings2?.typography?.fontWeight;
  }
  function useAppearanceControlLabel(settings2) {
    if (!settings2?.typography?.fontStyle) {
      return (0, import_i18n185.__)("Font weight");
    }
    if (!settings2?.typography?.fontWeight) {
      return (0, import_i18n185.__)("Font style");
    }
    return (0, import_i18n185.__)("Appearance");
  }
  function useHasLetterSpacingControl(settings2) {
    return settings2?.typography?.letterSpacing;
  }
  function useHasTextTransformControl(settings2) {
    return settings2?.typography?.textTransform;
  }
  function useHasTextAlignmentControl(settings2) {
    return settings2?.typography?.textAlign;
  }
  function useHasTextDecorationControl(settings2) {
    return settings2?.typography?.textDecoration;
  }
  function useHasWritingModeControl(settings2) {
    return settings2?.typography?.writingMode;
  }
  function useHasTextColumnsControl(settings2) {
    return settings2?.typography?.textColumns;
  }
  function useHasTextIndentControl(settings2) {
    return settings2?.typography?.textIndent;
  }
  function getMergedFontSizes(settings2) {
    const fontSizes = settings2?.typography?.fontSizes;
    const defaultFontSizesEnabled = !!settings2?.typography?.defaultFontSizes;
    return [
      ...fontSizes?.custom ?? [],
      ...fontSizes?.theme ?? [],
      ...defaultFontSizesEnabled ? fontSizes?.default ?? [] : []
    ];
  }
  function TypographyToolsPanel({
    resetAllFilter,
    onChange,
    value,
    panelId,
    children
  }) {
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const resetAll = () => {
      const updatedValue = resetAllFilter(value);
      onChange(updatedValue);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
      import_components199.__experimentalToolsPanel,
      {
        label: (0, import_i18n185.__)("Typography"),
        resetAll,
        panelId,
        dropdownMenuProps,
        children
      }
    );
  }
  var DEFAULT_CONTROLS3 = {
    fontFamily: true,
    fontSize: true,
    fontAppearance: true,
    lineHeight: true,
    letterSpacing: true,
    textAlign: true,
    textTransform: true,
    textDecoration: true,
    textIndent: true,
    writingMode: true,
    textColumns: true
  };
  function TypographyPanel({
    as: Wrapper = TypographyToolsPanel,
    value,
    onChange,
    inheritedValue = value,
    settings: settings2,
    panelId,
    defaultControls = DEFAULT_CONTROLS3,
    isGlobalStyles = false
  }) {
    const decodeValue = (rawValue) => getValueFromVariable({ settings: settings2 }, "", rawValue);
    const hasFontFamilyEnabled = useHasFontFamilyControl(settings2);
    const fontFamily = decodeValue(inheritedValue?.typography?.fontFamily);
    const { fontFamilies, fontFamilyFaces } = (0, import_element198.useMemo)(() => {
      return getMergedFontFamiliesAndFontFamilyFaces(settings2, fontFamily);
    }, [settings2, fontFamily]);
    const setFontFamily = (newValue) => {
      const slug = fontFamilies?.find(
        ({ fontFamily: f2 }) => f2 === newValue
      )?.slug;
      let updatedValue = setImmutably(
        value,
        ["typography", "fontFamily"],
        slug ? `var:preset|font-family|${slug}` : newValue || void 0
      );
      const newFontFamilyFaces = fontFamilies?.find(({ fontFamily: f2 }) => f2 === newValue)?.fontFace ?? [];
      const { fontStyles, fontWeights } = getFontStylesAndWeights(newFontFamilyFaces);
      const hasFontStyle = fontStyles?.some(
        ({ value: fs }) => fs === fontStyle
      );
      const hasFontWeight = fontWeights?.some(
        ({ value: fw }) => fw?.toString() === fontWeight?.toString()
      );
      if (!hasFontStyle || !hasFontWeight) {
        const { nearestFontStyle, nearestFontWeight } = findNearestStyleAndWeight(
          newFontFamilyFaces,
          fontStyle,
          fontWeight
        );
        if (nearestFontStyle || nearestFontWeight) {
          updatedValue = {
            ...updatedValue,
            typography: {
              ...updatedValue?.typography,
              fontStyle: nearestFontStyle || void 0,
              fontWeight: nearestFontWeight || void 0
            }
          };
        } else if (fontStyle || fontWeight) {
          updatedValue = {
            ...updatedValue,
            typography: {
              ...updatedValue?.typography,
              fontStyle: void 0,
              fontWeight: void 0
            }
          };
        }
      }
      onChange(updatedValue);
    };
    const hasFontFamily = () => !!value?.typography?.fontFamily;
    const resetFontFamily = () => setFontFamily(void 0);
    const hasFontSizeEnabled = useHasFontSizeControl(settings2);
    const disableCustomFontSizes = !settings2?.typography?.customFontSize;
    const mergedFontSizes = getMergedFontSizes(settings2);
    const fontSize = decodeValue(inheritedValue?.typography?.fontSize);
    const currentFontSizeSlug = (() => {
      const rawValue = inheritedValue?.typography?.fontSize;
      if (!rawValue || typeof rawValue !== "string") {
        return void 0;
      }
      if (rawValue.startsWith("var:preset|font-size|")) {
        return rawValue.replace("var:preset|font-size|", "");
      }
      const cssVarMatch = rawValue.match(
        /^var\(--wp--preset--font-size--([^)]+)\)$/
      );
      if (cssVarMatch) {
        return cssVarMatch[1];
      }
      return void 0;
    })();
    const setFontSize = (newValue, metadata) => {
      const actualValue = !!metadata?.slug ? `var:preset|font-size|${metadata?.slug}` : newValue;
      onChange(
        setImmutably(
          value,
          ["typography", "fontSize"],
          actualValue || void 0
        )
      );
    };
    const hasFontSize = () => !!value?.typography?.fontSize;
    const resetFontSize = () => setFontSize(void 0);
    const hasAppearanceControl = useHasAppearanceControl(settings2);
    const appearanceControlLabel = useAppearanceControlLabel(settings2);
    const hasFontStyles = settings2?.typography?.fontStyle;
    const hasFontWeights = settings2?.typography?.fontWeight;
    const fontStyle = decodeValue(inheritedValue?.typography?.fontStyle);
    const fontWeight = decodeValue(inheritedValue?.typography?.fontWeight);
    const setFontAppearance = (0, import_element198.useCallback)(
      ({ fontStyle: newFontStyle, fontWeight: newFontWeight }) => {
        if (newFontStyle !== fontStyle || newFontWeight !== fontWeight) {
          onChange({
            ...value,
            typography: {
              ...value?.typography,
              fontStyle: newFontStyle || void 0,
              fontWeight: newFontWeight || void 0
            }
          });
        }
      },
      [fontStyle, fontWeight, onChange, value]
    );
    const hasFontAppearance = () => !!value?.typography?.fontStyle || !!value?.typography?.fontWeight;
    const resetFontAppearance = (0, import_element198.useCallback)(() => {
      setFontAppearance({});
    }, [setFontAppearance]);
    const hasLineHeightEnabled = useHasLineHeightControl(settings2);
    const lineHeight = decodeValue(inheritedValue?.typography?.lineHeight);
    const setLineHeight = (newValue) => {
      onChange(
        setImmutably(
          value,
          ["typography", "lineHeight"],
          newValue || void 0
        )
      );
    };
    const hasLineHeight = () => value?.typography?.lineHeight !== void 0;
    const resetLineHeight = () => setLineHeight(void 0);
    const hasLetterSpacingControl = useHasLetterSpacingControl(settings2);
    const letterSpacing = decodeValue(
      inheritedValue?.typography?.letterSpacing
    );
    const setLetterSpacing = (newValue) => {
      onChange(
        setImmutably(
          value,
          ["typography", "letterSpacing"],
          newValue || void 0
        )
      );
    };
    const hasLetterSpacing = () => !!value?.typography?.letterSpacing;
    const resetLetterSpacing = () => setLetterSpacing(void 0);
    const hasTextIndentControl = useHasTextIndentControl(settings2);
    const textIndent = decodeValue(inheritedValue?.typography?.textIndent);
    const textIndentSetting = settings2?.typography?.textIndent ?? "subsequent";
    const isTextIndentAll = textIndentSetting === "all";
    const setTextIndentValue = (newValue) => {
      onChange(
        setImmutably(
          value,
          ["typography", "textIndent"],
          newValue || void 0
        )
      );
    };
    const onToggleTextIndentAll = (newValue) => {
      onChange({
        ...value,
        settings: {
          typography: {
            textIndent: newValue ? "all" : "subsequent"
          }
        }
      });
    };
    const hasTextIndent = () => !!value?.typography?.textIndent;
    const resetTextIndent = () => {
      onChange(
        setImmutably(value, ["typography", "textIndent"], void 0)
      );
    };
    const textIndentHelp = isTextIndentAll ? (0, import_i18n185.__)("Indents the first line of all paragraphs.") : (0, import_i18n185.__)("Indents the first line of each paragraph after the first one.");
    const hasTextColumnsControl = useHasTextColumnsControl(settings2);
    const textColumns = decodeValue(inheritedValue?.typography?.textColumns);
    const setTextColumns = (newValue) => {
      onChange(
        setImmutably(
          value,
          ["typography", "textColumns"],
          newValue || void 0
        )
      );
    };
    const hasTextColumns = () => !!value?.typography?.textColumns;
    const resetTextColumns = () => setTextColumns(void 0);
    const hasTextTransformControl = useHasTextTransformControl(settings2);
    const textTransform = decodeValue(
      inheritedValue?.typography?.textTransform
    );
    const setTextTransform = (newValue) => {
      onChange(
        setImmutably(
          value,
          ["typography", "textTransform"],
          newValue || void 0
        )
      );
    };
    const hasTextTransform = () => !!value?.typography?.textTransform;
    const resetTextTransform = () => setTextTransform(void 0);
    const hasTextDecorationControl = useHasTextDecorationControl(settings2);
    const textDecoration = decodeValue(
      inheritedValue?.typography?.textDecoration
    );
    const setTextDecoration = (newValue) => {
      onChange(
        setImmutably(
          value,
          ["typography", "textDecoration"],
          newValue || void 0
        )
      );
    };
    const hasTextDecoration = () => !!value?.typography?.textDecoration;
    const resetTextDecoration = () => setTextDecoration(void 0);
    const hasWritingModeControl = useHasWritingModeControl(settings2);
    const writingMode = decodeValue(inheritedValue?.typography?.writingMode);
    const setWritingMode = (newValue) => {
      onChange(
        setImmutably(
          value,
          ["typography", "writingMode"],
          newValue || void 0
        )
      );
    };
    const hasWritingMode = () => !!value?.typography?.writingMode;
    const resetWritingMode = () => setWritingMode(void 0);
    const hasTextAlignmentControl = useHasTextAlignmentControl(settings2);
    const textAlign = decodeValue(inheritedValue?.typography?.textAlign);
    const setTextAlign = (newValue) => {
      onChange(
        setImmutably(
          value,
          ["typography", "textAlign"],
          newValue || void 0
        )
      );
    };
    const hasTextAlign = () => !!value?.typography?.textAlign;
    const resetTextAlign = () => setTextAlign(void 0);
    const resetAllFilter = (0, import_element198.useCallback)((previousValue) => {
      return {
        ...previousValue,
        typography: {}
      };
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime361.jsxs)(
      Wrapper,
      {
        resetAllFilter,
        value,
        onChange,
        panelId,
        children: [
          hasFontFamilyEnabled && /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
            import_components199.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n185.__)("Font"),
              hasValue: hasFontFamily,
              onDeselect: resetFontFamily,
              isShownByDefault: defaultControls.fontFamily,
              panelId,
              children: /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
                FontFamilyControl,
                {
                  fontFamilies,
                  value: fontFamily,
                  onChange: setFontFamily,
                  size: "__unstable-large"
                }
              )
            }
          ),
          hasFontSizeEnabled && /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
            import_components199.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n185.__)("Size"),
              hasValue: hasFontSize,
              onDeselect: resetFontSize,
              isShownByDefault: defaultControls.fontSize,
              panelId,
              children: /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
                import_components199.FontSizePicker,
                {
                  value: currentFontSizeSlug || fontSize,
                  valueMode: currentFontSizeSlug ? "slug" : "literal",
                  onChange: setFontSize,
                  fontSizes: mergedFontSizes,
                  disableCustomFontSizes,
                  withReset: false,
                  withSlider: true,
                  size: "__unstable-large"
                }
              )
            }
          ),
          hasAppearanceControl && /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
            import_components199.__experimentalToolsPanelItem,
            {
              label: appearanceControlLabel,
              hasValue: hasFontAppearance,
              onDeselect: resetFontAppearance,
              isShownByDefault: defaultControls.fontAppearance,
              panelId,
              children: /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
                FontAppearanceControl,
                {
                  value: {
                    fontStyle,
                    fontWeight
                  },
                  onChange: setFontAppearance,
                  hasFontStyles,
                  hasFontWeights,
                  fontFamilyFaces,
                  size: "__unstable-large"
                }
              )
            }
          ),
          hasLineHeightEnabled && /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
            import_components199.__experimentalToolsPanelItem,
            {
              className: "single-column",
              label: (0, import_i18n185.__)("Line height"),
              hasValue: hasLineHeight,
              onDeselect: resetLineHeight,
              isShownByDefault: defaultControls.lineHeight,
              panelId,
              children: /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
                line_height_control_default,
                {
                  __unstableInputWidth: "auto",
                  value: lineHeight,
                  onChange: setLineHeight,
                  size: "__unstable-large"
                }
              )
            }
          ),
          hasLetterSpacingControl && /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
            import_components199.__experimentalToolsPanelItem,
            {
              className: "single-column",
              label: (0, import_i18n185.__)("Letter spacing"),
              hasValue: hasLetterSpacing,
              onDeselect: resetLetterSpacing,
              isShownByDefault: defaultControls.letterSpacing,
              panelId,
              children: /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
                LetterSpacingControl,
                {
                  value: letterSpacing,
                  onChange: setLetterSpacing,
                  size: "__unstable-large",
                  __unstableInputWidth: "auto"
                }
              )
            }
          ),
          hasTextIndentControl && /* @__PURE__ */ (0, import_jsx_runtime361.jsxs)(
            import_components199.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n185.__)("Line indent"),
              hasValue: hasTextIndent,
              onDeselect: resetTextIndent,
              isShownByDefault: defaultControls.textIndent,
              panelId,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
                  TextIndentControl,
                  {
                    value: textIndent,
                    onChange: setTextIndentValue,
                    size: "__unstable-large",
                    __unstableInputWidth: "auto",
                    withSlider: true,
                    hasBottomMargin: isGlobalStyles
                  }
                ),
                isGlobalStyles && /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
                  import_components199.ToggleControl,
                  {
                    label: (0, import_i18n185.__)("Indent all paragraphs"),
                    checked: isTextIndentAll,
                    onChange: onToggleTextIndentAll,
                    help: textIndentHelp
                  }
                )
              ]
            }
          ),
          hasTextColumnsControl && /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
            import_components199.__experimentalToolsPanelItem,
            {
              className: "single-column",
              label: (0, import_i18n185.__)("Columns"),
              hasValue: hasTextColumns,
              onDeselect: resetTextColumns,
              isShownByDefault: defaultControls.textColumns,
              panelId,
              children: /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
                import_components199.__experimentalNumberControl,
                {
                  label: (0, import_i18n185.__)("Columns"),
                  max: MAX_TEXT_COLUMNS,
                  min: MIN_TEXT_COLUMNS,
                  onChange: setTextColumns,
                  size: "__unstable-large",
                  spinControls: "custom",
                  value: textColumns,
                  initialPosition: 1
                }
              )
            }
          ),
          hasTextDecorationControl && /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
            import_components199.__experimentalToolsPanelItem,
            {
              className: "single-column",
              label: (0, import_i18n185.__)("Decoration"),
              hasValue: hasTextDecoration,
              onDeselect: resetTextDecoration,
              isShownByDefault: defaultControls.textDecoration,
              panelId,
              children: /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
                TextDecorationControl,
                {
                  value: textDecoration,
                  onChange: setTextDecoration,
                  size: "__unstable-large",
                  __unstableInputWidth: "auto"
                }
              )
            }
          ),
          hasWritingModeControl && /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
            import_components199.__experimentalToolsPanelItem,
            {
              className: "single-column",
              label: (0, import_i18n185.__)("Orientation"),
              hasValue: hasWritingMode,
              onDeselect: resetWritingMode,
              isShownByDefault: defaultControls.writingMode,
              panelId,
              children: /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
                WritingModeControl,
                {
                  value: writingMode,
                  onChange: setWritingMode,
                  size: "__unstable-large"
                }
              )
            }
          ),
          hasTextTransformControl && /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
            import_components199.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n185.__)("Letter case"),
              hasValue: hasTextTransform,
              onDeselect: resetTextTransform,
              isShownByDefault: defaultControls.textTransform,
              panelId,
              children: /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
                TextTransformControl,
                {
                  value: textTransform,
                  onChange: setTextTransform,
                  showNone: true,
                  isBlock: true,
                  size: "__unstable-large"
                }
              )
            }
          ),
          hasTextAlignmentControl && /* @__PURE__ */ (0, import_jsx_runtime361.jsxs)(
            import_components199.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n185.__)("Text alignment"),
              hasValue: hasTextAlign,
              onDeselect: resetTextAlign,
              isShownByDefault: defaultControls.textAlign,
              panelId,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
                  TextAlignmentControl,
                  {
                    value: textAlign,
                    onChange: setTextAlign,
                    options: ["left", "center", "right", "justify"],
                    size: "__unstable-large"
                  }
                ),
                textAlign === "justify" && /* @__PURE__ */ (0, import_jsx_runtime361.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(import_components199.Notice, { status: "warning", isDismissible: false, children: (0, import_i18n185.__)(
                  "Justified text can reduce readability. For better accessibility, use left-aligned text instead."
                ) }) })
              ]
            }
          )
        ]
      }
    );
  }

  // packages/block-editor/build-module/components/global-styles/dimensions-panel.mjs
  var import_i18n188 = __toESM(require_i18n(), 1);
  var import_components202 = __toESM(require_components(), 1);
  var import_element200 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/child-layout-control/index.mjs
  var import_components200 = __toESM(require_components(), 1);
  var import_i18n186 = __toESM(require_i18n(), 1);
  var import_element199 = __toESM(require_element(), 1);
  var import_data160 = __toESM(require_data(), 1);

  // packages/block-editor/build-module/components/grid/use-get-number-of-blocks-before-cell.mjs
  var import_data159 = __toESM(require_data(), 1);
  function useGetNumberOfBlocksBeforeCell(gridClientId, numColumns) {
    const { getBlockOrder: getBlockOrder2, getBlockAttributes: getBlockAttributes3 } = (0, import_data159.useSelect)(store);
    const getNumberOfBlocksBeforeCell = (column, row) => {
      const targetIndex = (row - 1) * numColumns + column - 1;
      let count = 0;
      for (const clientId of getBlockOrder2(gridClientId)) {
        const { columnStart, rowStart } = getBlockAttributes3(clientId).style?.layout ?? {};
        const cellIndex = (rowStart - 1) * numColumns + columnStart - 1;
        if (cellIndex < targetIndex) {
          count++;
        }
      }
      return count;
    };
    return getNumberOfBlocksBeforeCell;
  }

  // packages/block-editor/build-module/components/child-layout-control/index.mjs
  var import_jsx_runtime362 = __toESM(require_jsx_runtime(), 1);
  function helpText(selfStretch, parentLayout) {
    const { orientation = "horizontal" } = parentLayout;
    if (selfStretch === "fill") {
      return (0, import_i18n186.__)("Stretch to fill available space.");
    }
    if (selfStretch === "fixed" && orientation === "horizontal") {
      return (0, import_i18n186.__)("Specify a fixed width.");
    } else if (selfStretch === "fixed") {
      return (0, import_i18n186.__)("Specify a fixed height.");
    }
    return (0, import_i18n186.__)("Fit contents.");
  }
  function ChildLayoutControl({
    value: childLayout = {},
    onChange,
    parentLayout,
    isShownByDefault,
    panelId
  }) {
    const {
      type: parentType,
      default: { type: defaultParentType = "default" } = {}
    } = parentLayout ?? {};
    const parentLayoutType = parentType || defaultParentType;
    if (parentLayoutType === "flex") {
      return /* @__PURE__ */ (0, import_jsx_runtime362.jsx)(
        FlexControls,
        {
          childLayout,
          onChange,
          parentLayout,
          isShownByDefault,
          panelId
        }
      );
    } else if (parentLayoutType === "grid") {
      return /* @__PURE__ */ (0, import_jsx_runtime362.jsx)(
        GridControls,
        {
          childLayout,
          onChange,
          parentLayout,
          isShownByDefault,
          panelId
        }
      );
    }
    return null;
  }
  function FlexControls({
    childLayout,
    onChange,
    parentLayout,
    isShownByDefault,
    panelId
  }) {
    const { selfStretch, flexSize } = childLayout;
    const { orientation = "horizontal" } = parentLayout ?? {};
    const hasFlexValue = () => !!selfStretch;
    const flexResetLabel = orientation === "horizontal" ? (0, import_i18n186.__)("Width") : (0, import_i18n186.__)("Height");
    const [availableUnits] = useSettings("spacing.units");
    const units2 = (0, import_components200.__experimentalUseCustomUnits)({
      availableUnits: availableUnits || [
        "%",
        "px",
        "em",
        "rem",
        "vh",
        "vw"
      ]
    });
    const resetFlex = () => {
      onChange({
        selfStretch: void 0,
        flexSize: void 0
      });
    };
    (0, import_element199.useEffect)(() => {
      if (selfStretch === "fixed" && !flexSize) {
        onChange({
          ...childLayout,
          selfStretch: "fit"
        });
      }
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime362.jsxs)(
      import_components200.__experimentalVStack,
      {
        as: import_components200.__experimentalToolsPanelItem,
        spacing: 2,
        hasValue: hasFlexValue,
        label: flexResetLabel,
        onDeselect: resetFlex,
        isShownByDefault,
        panelId,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime362.jsxs)(
            import_components200.__experimentalToggleGroupControl,
            {
              size: "__unstable-large",
              label: childLayoutOrientation(parentLayout),
              value: selfStretch || "fit",
              help: helpText(selfStretch, parentLayout),
              onChange: (value) => {
                const newFlexSize = value !== "fixed" ? null : flexSize;
                onChange({
                  selfStretch: value,
                  flexSize: newFlexSize
                });
              },
              isBlock: true,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime362.jsx)(
                  import_components200.__experimentalToggleGroupControlOption,
                  {
                    value: "fit",
                    label: (0, import_i18n186._x)(
                      "Fit",
                      "Intrinsic block width in flex layout"
                    )
                  },
                  "fit"
                ),
                /* @__PURE__ */ (0, import_jsx_runtime362.jsx)(
                  import_components200.__experimentalToggleGroupControlOption,
                  {
                    value: "fill",
                    label: (0, import_i18n186._x)(
                      "Grow",
                      "Block with expanding width in flex layout"
                    )
                  },
                  "fill"
                ),
                /* @__PURE__ */ (0, import_jsx_runtime362.jsx)(
                  import_components200.__experimentalToggleGroupControlOption,
                  {
                    value: "fixed",
                    label: (0, import_i18n186._x)(
                      "Fixed",
                      "Block with fixed width in flex layout"
                    )
                  },
                  "fixed"
                )
              ]
            }
          ),
          selfStretch === "fixed" && /* @__PURE__ */ (0, import_jsx_runtime362.jsx)(
            import_components200.__experimentalUnitControl,
            {
              size: "__unstable-large",
              units: units2,
              onChange: (value) => {
                onChange({
                  selfStretch,
                  flexSize: value
                });
              },
              value: flexSize,
              min: 0,
              label: flexResetLabel,
              hideLabelFromVision: true
            }
          )
        ]
      }
    );
  }
  function childLayoutOrientation(parentLayout) {
    const { orientation = "horizontal" } = parentLayout;
    return orientation === "horizontal" ? (0, import_i18n186.__)("Width") : (0, import_i18n186.__)("Height");
  }
  function GridControls({
    childLayout,
    onChange,
    parentLayout,
    isShownByDefault,
    panelId
  }) {
    const { columnStart, rowStart, columnSpan, rowSpan } = childLayout;
    const { columnCount, rowCount } = parentLayout ?? {};
    const rootClientId = (0, import_data160.useSelect)(
      (select3) => select3(store).getBlockRootClientId(panelId)
    );
    const { moveBlocksToPosition: moveBlocksToPosition2, __unstableMarkNextChangeAsNotPersistent: __unstableMarkNextChangeAsNotPersistent2 } = (0, import_data160.useDispatch)(store);
    const getNumberOfBlocksBeforeCell = useGetNumberOfBlocksBeforeCell(
      rootClientId,
      columnCount || 3
    );
    const hasStartValue = () => !!columnStart || !!rowStart;
    const hasSpanValue = () => !!columnSpan || !!rowSpan;
    const resetGridStarts = () => {
      onChange({
        columnStart: void 0,
        rowStart: void 0
      });
    };
    const resetGridSpans = () => {
      onChange({
        columnSpan: void 0,
        rowSpan: void 0
      });
    };
    const maxColumnSpan = columnCount ? columnCount - (columnStart ?? 1) + 1 : void 0;
    const maxRowSpan = window.__experimentalEnableGridInteractivity && rowCount ? rowCount - (rowStart ?? 1) + 1 : void 0;
    return /* @__PURE__ */ (0, import_jsx_runtime362.jsxs)(import_jsx_runtime362.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime362.jsxs)(
        import_components200.Flex,
        {
          as: import_components200.__experimentalToolsPanelItem,
          hasValue: hasSpanValue,
          label: (0, import_i18n186.__)("Grid span"),
          onDeselect: resetGridSpans,
          isShownByDefault,
          panelId,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime362.jsx)(import_components200.FlexItem, { style: { width: "50%" }, children: /* @__PURE__ */ (0, import_jsx_runtime362.jsx)(
              import_components200.__experimentalInputControl,
              {
                size: "__unstable-large",
                label: (0, import_i18n186.__)("Column span"),
                type: "number",
                onChange: (value) => {
                  const newColumnSpan = value === "" ? 1 : parseInt(value, 10);
                  const constrainedValue = maxColumnSpan ? Math.min(newColumnSpan, maxColumnSpan) : newColumnSpan;
                  onChange({
                    columnStart,
                    rowStart,
                    rowSpan,
                    columnSpan: constrainedValue
                  });
                },
                value: columnSpan ?? 1,
                min: 1,
                max: maxColumnSpan
              }
            ) }),
            /* @__PURE__ */ (0, import_jsx_runtime362.jsx)(import_components200.FlexItem, { style: { width: "50%" }, children: /* @__PURE__ */ (0, import_jsx_runtime362.jsx)(
              import_components200.__experimentalInputControl,
              {
                size: "__unstable-large",
                label: (0, import_i18n186.__)("Row span"),
                type: "number",
                onChange: (value) => {
                  const newRowSpan = value === "" ? 1 : parseInt(value, 10);
                  const constrainedValue = maxRowSpan ? Math.min(newRowSpan, maxRowSpan) : newRowSpan;
                  onChange({
                    columnStart,
                    rowStart,
                    columnSpan,
                    rowSpan: constrainedValue
                  });
                },
                value: rowSpan ?? 1,
                min: 1,
                max: maxRowSpan
              }
            ) })
          ]
        }
      ),
      window.__experimentalEnableGridInteractivity && // Use Flex with an explicit width on the FlexItem instead of HStack to
      // work around an issue in webkit where inputs with a max attribute are
      // sized incorrectly.
      /* @__PURE__ */ (0, import_jsx_runtime362.jsxs)(
        import_components200.Flex,
        {
          as: import_components200.__experimentalToolsPanelItem,
          hasValue: hasStartValue,
          label: (0, import_i18n186.__)("Grid placement"),
          onDeselect: resetGridStarts,
          isShownByDefault: false,
          panelId,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime362.jsx)(import_components200.FlexItem, { style: { width: "50%" }, children: /* @__PURE__ */ (0, import_jsx_runtime362.jsx)(
              import_components200.__experimentalInputControl,
              {
                size: "__unstable-large",
                label: (0, import_i18n186.__)("Column"),
                type: "number",
                onChange: (value) => {
                  const newColumnStart = value === "" ? 1 : parseInt(value, 10);
                  onChange({
                    columnStart: newColumnStart,
                    rowStart,
                    columnSpan,
                    rowSpan
                  });
                  __unstableMarkNextChangeAsNotPersistent2();
                  moveBlocksToPosition2(
                    [panelId],
                    rootClientId,
                    rootClientId,
                    getNumberOfBlocksBeforeCell(
                      newColumnStart,
                      rowStart
                    )
                  );
                },
                value: columnStart ?? 1,
                min: 1,
                max: columnCount ? columnCount - (columnSpan ?? 1) + 1 : void 0
              }
            ) }),
            /* @__PURE__ */ (0, import_jsx_runtime362.jsx)(import_components200.FlexItem, { style: { width: "50%" }, children: /* @__PURE__ */ (0, import_jsx_runtime362.jsx)(
              import_components200.__experimentalInputControl,
              {
                size: "__unstable-large",
                label: (0, import_i18n186.__)("Row"),
                type: "number",
                onChange: (value) => {
                  const newRowStart = value === "" ? 1 : parseInt(value, 10);
                  onChange({
                    columnStart,
                    rowStart: newRowStart,
                    columnSpan,
                    rowSpan
                  });
                  __unstableMarkNextChangeAsNotPersistent2();
                  moveBlocksToPosition2(
                    [panelId],
                    rootClientId,
                    rootClientId,
                    getNumberOfBlocksBeforeCell(
                      columnStart,
                      newRowStart
                    )
                  );
                },
                value: rowStart ?? 1,
                min: 1,
                max: rowCount ? rowCount - (rowSpan ?? 1) + 1 : void 0
              }
            ) })
          ]
        }
      )
    ] });
  }

  // packages/block-editor/build-module/components/dimensions-tool/aspect-ratio-tool.mjs
  var import_components201 = __toESM(require_components(), 1);
  var import_i18n187 = __toESM(require_i18n(), 1);
  var import_jsx_runtime363 = __toESM(require_jsx_runtime(), 1);
  function AspectRatioTool({
    panelId,
    value,
    onChange = () => {
    },
    options,
    defaultValue = "auto",
    hasValue,
    isShownByDefault = true
  }) {
    const displayValue = value ?? "auto";
    const [defaultRatios, themeRatios, showDefaultRatios] = useSettings(
      "dimensions.aspectRatios.default",
      "dimensions.aspectRatios.theme",
      "dimensions.defaultAspectRatios"
    );
    const themeOptions = themeRatios?.map(({ name, ratio }) => ({
      label: name,
      value: ratio
    }));
    const defaultOptions2 = defaultRatios?.map(({ name, ratio }) => ({
      label: name,
      value: ratio
    }));
    const aspectRatioOptions = [
      {
        label: (0, import_i18n187._x)(
          "Original",
          "Aspect ratio option for dimensions control"
        ),
        value: "auto"
      },
      ...showDefaultRatios ? defaultOptions2 : [],
      ...themeOptions ? themeOptions : [],
      {
        label: (0, import_i18n187._x)("Custom", "Aspect ratio option for dimensions control"),
        value: "custom",
        disabled: true,
        hidden: true
      }
    ];
    return /* @__PURE__ */ (0, import_jsx_runtime363.jsx)(
      import_components201.__experimentalToolsPanelItem,
      {
        hasValue: hasValue ? hasValue : () => displayValue !== defaultValue,
        label: (0, import_i18n187.__)("Aspect ratio"),
        onDeselect: () => onChange(void 0),
        isShownByDefault,
        panelId,
        children: /* @__PURE__ */ (0, import_jsx_runtime363.jsx)(
          import_components201.SelectControl,
          {
            label: (0, import_i18n187.__)("Aspect ratio"),
            value: displayValue,
            options: options ?? aspectRatioOptions,
            onChange,
            size: "__unstable-large"
          }
        )
      }
    );
  }

  // packages/block-editor/build-module/components/global-styles/dimensions-panel.mjs
  var import_jsx_runtime364 = __toESM(require_jsx_runtime(), 1);
  var AXIAL_SIDES = ["horizontal", "vertical"];
  function useHasDimensionsPanel(settings2) {
    const hasContentSize = useHasContentSize(settings2);
    const hasWideSize = useHasWideSize(settings2);
    const hasPadding = useHasPadding(settings2);
    const hasMargin = useHasMargin(settings2);
    const hasGap = useHasGap(settings2);
    const hasHeight = useHasHeight(settings2);
    const hasMinHeight = useHasMinHeight(settings2);
    const hasWidth = useHasWidth(settings2);
    const hasAspectRatio = useHasAspectRatio(settings2);
    const hasChildLayout = useHasChildLayout(settings2);
    return import_element200.Platform.OS === "web" && (hasContentSize || hasWideSize || hasPadding || hasMargin || hasGap || hasHeight || hasMinHeight || hasWidth || hasAspectRatio || hasChildLayout);
  }
  function useHasContentSize(settings2) {
    return settings2?.layout?.contentSize;
  }
  function useHasWideSize(settings2) {
    return settings2?.layout?.wideSize;
  }
  function useHasPadding(settings2) {
    return settings2?.spacing?.padding;
  }
  function useHasMargin(settings2) {
    return settings2?.spacing?.margin;
  }
  function useHasGap(settings2) {
    return settings2?.spacing?.blockGap;
  }
  function useHasHeight(settings2) {
    return settings2?.dimensions?.height;
  }
  function useHasMinHeight(settings2) {
    return settings2?.dimensions?.minHeight;
  }
  function useHasWidth(settings2) {
    return settings2?.dimensions?.width;
  }
  function useHasAspectRatio(settings2) {
    return settings2?.dimensions?.aspectRatio;
  }
  function useHasChildLayout(settings2) {
    const {
      type: parentLayoutType = "default",
      default: { type: defaultParentLayoutType = "default" } = {},
      allowSizingOnChildren = false
    } = settings2?.parentLayout ?? {};
    const support = (defaultParentLayoutType === "flex" || parentLayoutType === "flex" || defaultParentLayoutType === "grid" || parentLayoutType === "grid") && allowSizingOnChildren;
    return !!settings2?.layout && support;
  }
  function useHasSpacingPresets(settings2) {
    const { defaultSpacingSizes, spacingSizes } = settings2?.spacing || {};
    return defaultSpacingSizes !== false && spacingSizes?.default?.length > 0 || spacingSizes?.theme?.length > 0 || spacingSizes?.custom?.length > 0;
  }
  function filterValuesBySides(values, sides) {
    if (!sides || !values) {
      return values;
    }
    const filteredValues = {};
    sides.forEach((side) => {
      if (side === "vertical") {
        filteredValues.top = values.top;
        filteredValues.bottom = values.bottom;
      }
      if (side === "horizontal") {
        filteredValues.left = values.left;
        filteredValues.right = values.right;
      }
      filteredValues[side] = values?.[side];
    });
    return filteredValues;
  }
  function splitStyleValue(value) {
    if (value && typeof value === "string") {
      return {
        top: value,
        right: value,
        bottom: value,
        left: value
      };
    }
    return value;
  }
  function splitGapValue(value, isAxialGap) {
    if (!value) {
      return value;
    }
    if (typeof value === "string") {
      return isAxialGap ? { top: value, right: value, bottom: value, left: value } : { top: value };
    }
    return {
      ...value,
      right: value?.left,
      bottom: value?.top
    };
  }
  function DimensionsToolsPanel({
    resetAllFilter,
    onChange,
    value,
    panelId,
    children
  }) {
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const resetAll = () => {
      const updatedValue = resetAllFilter(value);
      onChange(updatedValue);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
      import_components202.__experimentalToolsPanel,
      {
        label: (0, import_i18n188.__)("Dimensions"),
        resetAll,
        panelId,
        dropdownMenuProps,
        children
      }
    );
  }
  var DEFAULT_CONTROLS4 = {
    contentSize: true,
    wideSize: true,
    padding: true,
    margin: true,
    blockGap: true,
    height: true,
    minHeight: true,
    width: true,
    aspectRatio: true,
    childLayout: true
  };
  function DimensionsPanel({
    as: Wrapper = DimensionsToolsPanel,
    value,
    onChange,
    inheritedValue = value,
    settings: settings2,
    panelId,
    defaultControls = DEFAULT_CONTROLS4,
    onVisualize = () => {
    },
    // Special case because the layout controls are not part of the dimensions panel
    // in global styles but not in block inspector.
    includeLayoutControls = false
  }) {
    const { dimensions, spacing } = settings2;
    const decodeValue = (rawValue) => {
      if (rawValue && typeof rawValue === "object") {
        return Object.keys(rawValue).reduce((acc, key) => {
          acc[key] = getValueFromVariable(
            { settings: { dimensions, spacing } },
            "",
            rawValue[key]
          );
          return acc;
        }, {});
      }
      return getValueFromVariable(
        { settings: { dimensions, spacing } },
        "",
        rawValue
      );
    };
    const showSpacingPresetsControl = useHasSpacingPresets(settings2);
    const units2 = (0, import_components202.__experimentalUseCustomUnits)({
      availableUnits: settings2?.spacing?.units || [
        "%",
        "px",
        "em",
        "rem",
        "vw"
      ]
    });
    const minimumMargin = -Infinity;
    const [minMarginValue, setMinMarginValue] = (0, import_element200.useState)(minimumMargin);
    const showContentSizeControl = useHasContentSize(settings2) && includeLayoutControls;
    const contentSizeValue = decodeValue(inheritedValue?.layout?.contentSize);
    const setContentSizeValue = (newValue) => {
      onChange(
        setImmutably(
          value,
          ["layout", "contentSize"],
          newValue || void 0
        )
      );
    };
    const hasUserSetContentSizeValue = () => !!value?.layout?.contentSize;
    const resetContentSizeValue = () => setContentSizeValue(void 0);
    const showWideSizeControl = useHasWideSize(settings2) && includeLayoutControls;
    const wideSizeValue = decodeValue(inheritedValue?.layout?.wideSize);
    const setWideSizeValue = (newValue) => {
      onChange(
        setImmutably(
          value,
          ["layout", "wideSize"],
          newValue || void 0
        )
      );
    };
    const hasUserSetWideSizeValue = () => !!value?.layout?.wideSize;
    const resetWideSizeValue = () => setWideSizeValue(void 0);
    const showPaddingControl = useHasPadding(settings2);
    const rawPadding = decodeValue(inheritedValue?.spacing?.padding);
    const paddingValues = splitStyleValue(rawPadding);
    const paddingSides = Array.isArray(settings2?.spacing?.padding) ? settings2?.spacing?.padding : settings2?.spacing?.padding?.sides;
    const isAxialPadding = paddingSides && paddingSides.some((side) => AXIAL_SIDES.includes(side));
    const setPaddingValues = (newPaddingValues) => {
      const padding = filterValuesBySides(newPaddingValues, paddingSides);
      onChange(setImmutably(value, ["spacing", "padding"], padding));
    };
    const hasPaddingValue = () => !!value?.spacing?.padding && Object.keys(value?.spacing?.padding).length;
    const resetPaddingValue = () => setPaddingValues(void 0);
    const onMouseOverPadding = () => onVisualize("padding");
    const showMarginControl = useHasMargin(settings2);
    const rawMargin = decodeValue(inheritedValue?.spacing?.margin);
    const marginValues = splitStyleValue(rawMargin);
    const marginSides = Array.isArray(settings2?.spacing?.margin) ? settings2?.spacing?.margin : settings2?.spacing?.margin?.sides;
    const isAxialMargin = marginSides && marginSides.some((side) => AXIAL_SIDES.includes(side));
    const setMarginValues = (newMarginValues) => {
      const margin = filterValuesBySides(newMarginValues, marginSides);
      onChange(setImmutably(value, ["spacing", "margin"], margin));
    };
    const hasMarginValue = () => !!value?.spacing?.margin && Object.keys(value?.spacing?.margin).length;
    const resetMarginValue = () => setMarginValues(void 0);
    const onMouseOverMargin = () => onVisualize("margin");
    const showGapControl = useHasGap(settings2);
    const gapSides = Array.isArray(settings2?.spacing?.blockGap) ? settings2?.spacing?.blockGap : settings2?.spacing?.blockGap?.sides;
    const isAxialGap = gapSides && gapSides.some((side) => AXIAL_SIDES.includes(side));
    const gapValue = decodeValue(inheritedValue?.spacing?.blockGap);
    const gapValues = splitGapValue(gapValue, isAxialGap);
    const setGapValue = (newGapValue) => {
      onChange(
        setImmutably(value, ["spacing", "blockGap"], newGapValue)
      );
    };
    const setGapValues = (nextBoxGapValue) => {
      if (!nextBoxGapValue) {
        setGapValue(null);
      }
      if (!isAxialGap && nextBoxGapValue?.hasOwnProperty("top")) {
        setGapValue(nextBoxGapValue.top);
      } else {
        setGapValue({
          top: nextBoxGapValue?.top,
          left: nextBoxGapValue?.left
        });
      }
    };
    const resetGapValue = () => setGapValue(void 0);
    const hasGapValue = () => !!value?.spacing?.blockGap;
    const showMinHeightControl = useHasMinHeight(settings2);
    const minHeightValue = decodeValue(inheritedValue?.dimensions?.minHeight);
    const setMinHeightValue = (newValue) => {
      const tempValue = setImmutably(
        value,
        ["dimensions", "minHeight"],
        newValue
      );
      onChange(
        setImmutably(
          tempValue,
          ["dimensions", "aspectRatio"],
          void 0
        )
      );
    };
    const resetMinHeightValue = () => {
      setMinHeightValue(void 0);
    };
    const hasMinHeightValue = () => !!value?.dimensions?.minHeight;
    const showHeightControl = useHasHeight(settings2);
    const heightValue = decodeValue(inheritedValue?.dimensions?.height);
    const setHeightValue = (newValue) => {
      const tempValue = setImmutably(
        value,
        ["dimensions", "height"],
        newValue
      );
      onChange(
        setImmutably(
          tempValue,
          ["dimensions", "aspectRatio"],
          void 0
        )
      );
    };
    const resetHeightValue = () => {
      setHeightValue(void 0);
    };
    const hasHeightValue = () => !!value?.dimensions?.height;
    const showWidthControl = useHasWidth(settings2);
    const widthValue = decodeValue(inheritedValue?.dimensions?.width);
    const setWidthValue = (newValue) => {
      onChange(setImmutably(value, ["dimensions", "width"], newValue));
    };
    const resetWidthValue = () => {
      setWidthValue(void 0);
    };
    const hasWidthValue = () => !!value?.dimensions?.width;
    const showAspectRatioControl = useHasAspectRatio(settings2);
    const aspectRatioValue = decodeValue(
      inheritedValue?.dimensions?.aspectRatio
    );
    const setAspectRatioValue = (newValue) => {
      const tempValue = setImmutably(
        value,
        ["dimensions", "aspectRatio"],
        newValue
      );
      onChange(
        setImmutably(tempValue, ["dimensions", "minHeight"], void 0)
      );
    };
    const hasAspectRatioValue = () => !!value?.dimensions?.aspectRatio;
    const showChildLayoutControl = useHasChildLayout(settings2);
    const childLayout = inheritedValue?.layout;
    const setChildLayout = (newChildLayout) => {
      onChange({
        ...value,
        layout: {
          ...newChildLayout
        }
      });
    };
    const resetAllFilter = (0, import_element200.useCallback)((previousValue) => {
      return {
        ...previousValue,
        layout: cleanEmptyObject({
          ...previousValue?.layout,
          contentSize: void 0,
          wideSize: void 0,
          selfStretch: void 0,
          flexSize: void 0,
          columnStart: void 0,
          rowStart: void 0,
          columnSpan: void 0,
          rowSpan: void 0
        }),
        spacing: {
          ...previousValue?.spacing,
          padding: void 0,
          margin: void 0,
          blockGap: void 0
        },
        dimensions: {
          ...previousValue?.dimensions,
          height: void 0,
          minHeight: void 0,
          aspectRatio: void 0,
          width: void 0
        }
      };
    }, []);
    const onMouseLeaveControls = () => onVisualize(false);
    return /* @__PURE__ */ (0, import_jsx_runtime364.jsxs)(
      Wrapper,
      {
        resetAllFilter,
        value,
        onChange,
        panelId,
        children: [
          (showContentSizeControl || showWideSizeControl) && /* @__PURE__ */ (0, import_jsx_runtime364.jsx)("span", { className: "span-columns", children: (0, import_i18n188.__)("Set the width of the main content area.") }),
          showContentSizeControl && /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
            import_components202.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n188.__)("Content width"),
              hasValue: hasUserSetContentSizeValue,
              onDeselect: resetContentSizeValue,
              isShownByDefault: defaultControls.contentSize ?? DEFAULT_CONTROLS4.contentSize,
              panelId,
              children: /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
                import_components202.__experimentalUnitControl,
                {
                  __next40pxDefaultSize: true,
                  label: (0, import_i18n188.__)("Content width"),
                  labelPosition: "top",
                  value: contentSizeValue || "",
                  onChange: (nextContentSize) => {
                    setContentSizeValue(nextContentSize);
                  },
                  units: units2,
                  prefix: /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(import_components202.__experimentalInputControlPrefixWrapper, { variant: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(icon_default, { icon: align_none_default }) })
                }
              )
            }
          ),
          showWideSizeControl && /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
            import_components202.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n188.__)("Wide width"),
              hasValue: hasUserSetWideSizeValue,
              onDeselect: resetWideSizeValue,
              isShownByDefault: defaultControls.wideSize ?? DEFAULT_CONTROLS4.wideSize,
              panelId,
              children: /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
                import_components202.__experimentalUnitControl,
                {
                  __next40pxDefaultSize: true,
                  label: (0, import_i18n188.__)("Wide width"),
                  labelPosition: "top",
                  value: wideSizeValue || "",
                  onChange: (nextWideSize) => {
                    setWideSizeValue(nextWideSize);
                  },
                  units: units2,
                  prefix: /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(import_components202.__experimentalInputControlPrefixWrapper, { variant: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(icon_default, { icon: stretch_wide_default }) })
                }
              )
            }
          ),
          showPaddingControl && /* @__PURE__ */ (0, import_jsx_runtime364.jsxs)(
            import_components202.__experimentalToolsPanelItem,
            {
              hasValue: hasPaddingValue,
              label: (0, import_i18n188.__)("Padding"),
              onDeselect: resetPaddingValue,
              isShownByDefault: defaultControls.padding ?? DEFAULT_CONTROLS4.padding,
              className: clsx_default({
                "tools-panel-item-spacing": showSpacingPresetsControl
              }),
              panelId,
              children: [
                !showSpacingPresetsControl && /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
                  import_components202.BoxControl,
                  {
                    __next40pxDefaultSize: true,
                    values: paddingValues,
                    onChange: setPaddingValues,
                    label: (0, import_i18n188.__)("Padding"),
                    sides: paddingSides,
                    units: units2,
                    allowReset: false,
                    splitOnAxis: isAxialPadding,
                    inputProps: {
                      onMouseOver: onMouseOverPadding,
                      onMouseOut: onMouseLeaveControls
                    }
                  }
                ),
                showSpacingPresetsControl && /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
                  SpacingSizesControl,
                  {
                    values: paddingValues,
                    onChange: setPaddingValues,
                    label: (0, import_i18n188.__)("Padding"),
                    sides: paddingSides,
                    units: units2,
                    allowReset: false,
                    onMouseOver: onMouseOverPadding,
                    onMouseOut: onMouseLeaveControls
                  }
                )
              ]
            }
          ),
          showMarginControl && /* @__PURE__ */ (0, import_jsx_runtime364.jsxs)(
            import_components202.__experimentalToolsPanelItem,
            {
              hasValue: hasMarginValue,
              label: (0, import_i18n188.__)("Margin"),
              onDeselect: resetMarginValue,
              isShownByDefault: defaultControls.margin ?? DEFAULT_CONTROLS4.margin,
              className: clsx_default({
                "tools-panel-item-spacing": showSpacingPresetsControl
              }),
              panelId,
              children: [
                !showSpacingPresetsControl && /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
                  import_components202.BoxControl,
                  {
                    __next40pxDefaultSize: true,
                    values: marginValues,
                    onChange: setMarginValues,
                    inputProps: {
                      min: minMarginValue,
                      onDragStart: () => {
                        setMinMarginValue(0);
                      },
                      onDragEnd: () => {
                        setMinMarginValue(minimumMargin);
                      },
                      onMouseOver: onMouseOverMargin,
                      onMouseOut: onMouseLeaveControls
                    },
                    label: (0, import_i18n188.__)("Margin"),
                    sides: marginSides,
                    units: units2,
                    allowReset: false,
                    splitOnAxis: isAxialMargin
                  }
                ),
                showSpacingPresetsControl && /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
                  SpacingSizesControl,
                  {
                    values: marginValues,
                    onChange: setMarginValues,
                    minimumCustomValue: -Infinity,
                    label: (0, import_i18n188.__)("Margin"),
                    sides: marginSides,
                    units: units2,
                    allowReset: false,
                    onMouseOver: onMouseOverMargin,
                    onMouseOut: onMouseLeaveControls
                  }
                )
              ]
            }
          ),
          showGapControl && /* @__PURE__ */ (0, import_jsx_runtime364.jsxs)(
            import_components202.__experimentalToolsPanelItem,
            {
              hasValue: hasGapValue,
              label: (0, import_i18n188.__)("Block spacing"),
              onDeselect: resetGapValue,
              isShownByDefault: defaultControls.blockGap ?? DEFAULT_CONTROLS4.blockGap,
              className: clsx_default({
                "tools-panel-item-spacing": showSpacingPresetsControl,
                "single-column": (
                  // If UnitControl is used, should be single-column.
                  !showSpacingPresetsControl && !isAxialGap
                )
              }),
              panelId,
              children: [
                !showSpacingPresetsControl && (isAxialGap ? /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
                  import_components202.BoxControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n188.__)("Block spacing"),
                    min: 0,
                    onChange: setGapValues,
                    units: units2,
                    sides: gapSides,
                    values: gapValues,
                    allowReset: false,
                    splitOnAxis: isAxialGap
                  }
                ) : /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
                  import_components202.__experimentalUnitControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n188.__)("Block spacing"),
                    min: 0,
                    onChange: setGapValue,
                    units: units2,
                    value: gapValue
                  }
                )),
                showSpacingPresetsControl && /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
                  SpacingSizesControl,
                  {
                    label: (0, import_i18n188.__)("Block spacing"),
                    min: 0,
                    onChange: setGapValues,
                    showSideInLabel: false,
                    sides: isAxialGap ? gapSides : ["top"],
                    values: gapValues,
                    allowReset: false
                  }
                )
              ]
            }
          ),
          showChildLayoutControl && /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
            ChildLayoutControl,
            {
              value: childLayout,
              onChange: setChildLayout,
              parentLayout: settings2?.parentLayout,
              panelId,
              isShownByDefault: defaultControls.childLayout ?? DEFAULT_CONTROLS4.childLayout
            }
          ),
          showMinHeightControl && /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
            import_components202.__experimentalToolsPanelItem,
            {
              hasValue: hasMinHeightValue,
              label: (0, import_i18n188.__)("Minimum height"),
              onDeselect: resetMinHeightValue,
              isShownByDefault: defaultControls.minHeight ?? DEFAULT_CONTROLS4.minHeight,
              panelId,
              children: /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
                DimensionControl,
                {
                  label: (0, import_i18n188.__)("Minimum height"),
                  value: minHeightValue,
                  onChange: setMinHeightValue
                }
              )
            }
          ),
          showHeightControl && /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
            import_components202.__experimentalToolsPanelItem,
            {
              hasValue: hasHeightValue,
              label: (0, import_i18n188.__)("Height"),
              onDeselect: resetHeightValue,
              isShownByDefault: defaultControls.height ?? DEFAULT_CONTROLS4.height,
              panelId,
              children: /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
                DimensionControl,
                {
                  label: (0, import_i18n188.__)("Height"),
                  value: heightValue,
                  onChange: setHeightValue
                }
              )
            }
          ),
          showWidthControl && /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
            import_components202.__experimentalToolsPanelItem,
            {
              hasValue: hasWidthValue,
              label: (0, import_i18n188.__)("Width"),
              onDeselect: resetWidthValue,
              isShownByDefault: defaultControls.width ?? DEFAULT_CONTROLS4.width,
              panelId,
              children: /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
                DimensionControl,
                {
                  label: (0, import_i18n188.__)("Width"),
                  value: widthValue,
                  onChange: setWidthValue
                }
              )
            }
          ),
          showAspectRatioControl && /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
            AspectRatioTool,
            {
              hasValue: hasAspectRatioValue,
              value: aspectRatioValue,
              onChange: setAspectRatioValue,
              panelId,
              isShownByDefault: defaultControls.aspectRatio ?? DEFAULT_CONTROLS4.aspectRatio
            }
          )
        ]
      }
    );
  }

  // packages/block-editor/build-module/components/global-styles/border-panel.mjs
  var import_components204 = __toESM(require_components(), 1);
  var import_element202 = __toESM(require_element(), 1);
  var import_i18n190 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/components/global-styles/shadow-panel-components.mjs
  var import_i18n189 = __toESM(require_i18n(), 1);
  var import_components203 = __toESM(require_components(), 1);
  var import_element201 = __toESM(require_element(), 1);
  var import_jsx_runtime365 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_ARRAY12 = [];
  function ShadowPopoverContainer({ shadow, onShadowChange, settings: settings2 }) {
    const shadows = useShadowPresets(settings2);
    return /* @__PURE__ */ (0, import_jsx_runtime365.jsx)("div", { className: "block-editor-global-styles__shadow-popover-container", children: /* @__PURE__ */ (0, import_jsx_runtime365.jsxs)(import_components203.__experimentalVStack, { spacing: 4, children: [
      /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(import_components203.__experimentalHeading, { level: 5, children: (0, import_i18n189.__)("Drop shadow") }),
      /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
        ShadowPresets,
        {
          presets: shadows,
          activeShadow: shadow,
          onSelect: onShadowChange
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime365.jsx)("div", { className: "block-editor-global-styles__clear-shadow", children: /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
        import_components203.Button,
        {
          __next40pxDefaultSize: true,
          variant: "tertiary",
          onClick: () => onShadowChange(void 0),
          disabled: !shadow,
          accessibleWhenDisabled: true,
          children: (0, import_i18n189.__)("Clear")
        }
      ) })
    ] }) });
  }
  function ShadowPresets({ presets, activeShadow, onSelect }) {
    return !presets ? null : /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
      import_components203.Composite,
      {
        role: "listbox",
        className: "block-editor-global-styles__shadow__list",
        "aria-label": (0, import_i18n189.__)("Drop shadows"),
        children: presets.map(({ name, slug, shadow }) => /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
          ShadowIndicator,
          {
            label: name,
            isActive: shadow === activeShadow,
            type: slug === "unset" ? "unset" : "preset",
            onSelect: () => onSelect(shadow === activeShadow ? void 0 : shadow),
            shadow
          },
          slug
        ))
      }
    );
  }
  function ShadowIndicator({ type, label, isActive, onSelect, shadow }) {
    return /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(import_components203.Tooltip, { text: label, children: /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
      import_components203.Composite.Item,
      {
        role: "option",
        "aria-label": label,
        "aria-selected": isActive,
        className: clsx_default("block-editor-global-styles__shadow__item", {
          "is-active": isActive
        }),
        render: /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
          "button",
          {
            className: clsx_default(
              "block-editor-global-styles__shadow-indicator",
              {
                unset: type === "unset"
              }
            ),
            onClick: onSelect,
            style: { boxShadow: shadow },
            "aria-label": label,
            children: isActive && /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(icon_default, { icon: check_default })
          }
        )
      }
    ) });
  }
  function ShadowPopover({ shadow, onShadowChange, settings: settings2 }) {
    const popoverProps3 = {
      placement: "left-start",
      offset: 36,
      shift: true
    };
    return /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
      import_components203.Dropdown,
      {
        popoverProps: popoverProps3,
        className: "block-editor-global-styles__shadow-dropdown",
        renderToggle: renderShadowToggle(shadow, onShadowChange),
        renderContent: () => /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(import_components203.__experimentalDropdownContentWrapper, { paddingSize: "medium", children: /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
          ShadowPopoverContainer,
          {
            shadow,
            onShadowChange,
            settings: settings2
          }
        ) })
      }
    );
  }
  function renderShadowToggle(shadow, onShadowChange) {
    return function ShadowToggle({ onToggle, isOpen }) {
      const shadowButtonRef = (0, import_element201.useRef)(void 0);
      const toggleProps = {
        onClick: onToggle,
        className: clsx_default(
          "block-editor-global-styles__shadow-dropdown-toggle",
          { "is-open": isOpen }
        ),
        "aria-expanded": isOpen,
        ref: shadowButtonRef
      };
      const removeButtonProps = {
        onClick: () => {
          if (isOpen) {
            onToggle();
          }
          onShadowChange(void 0);
          shadowButtonRef.current?.focus();
        },
        className: clsx_default(
          "block-editor-global-styles__shadow-editor__remove-button",
          { "is-open": isOpen }
        ),
        label: (0, import_i18n189.__)("Remove")
      };
      return /* @__PURE__ */ (0, import_jsx_runtime365.jsxs)(import_jsx_runtime365.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(import_components203.Button, { __next40pxDefaultSize: true, ...toggleProps, children: /* @__PURE__ */ (0, import_jsx_runtime365.jsxs)(import_components203.__experimentalHStack, { justify: "flex-start", children: [
          /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
            icon_default,
            {
              className: "block-editor-global-styles__toggle-icon",
              icon: shadow_default,
              size: 24
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(import_components203.FlexItem, { children: (0, import_i18n189.__)("Drop shadow") })
        ] }) }),
        !!shadow && /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
          import_components203.Button,
          {
            __next40pxDefaultSize: true,
            size: "small",
            icon: reset_default,
            ...removeButtonProps
          }
        )
      ] });
    };
  }
  function useShadowPresets(settings2) {
    return (0, import_element201.useMemo)(() => {
      if (!settings2?.shadow) {
        return EMPTY_ARRAY12;
      }
      const defaultPresetsEnabled = settings2?.shadow?.defaultPresets;
      const {
        default: defaultShadows,
        theme: themeShadows,
        custom: customShadows
      } = settings2?.shadow?.presets ?? {};
      const unsetShadow = {
        name: (0, import_i18n189.__)("Unset"),
        slug: "unset",
        shadow: "none"
      };
      const shadowPresets = [
        ...defaultPresetsEnabled && defaultShadows || EMPTY_ARRAY12,
        ...themeShadows || EMPTY_ARRAY12,
        ...customShadows || EMPTY_ARRAY12
      ];
      if (shadowPresets.length) {
        shadowPresets.unshift(unsetShadow);
      }
      return shadowPresets;
    }, [settings2]);
  }

  // packages/block-editor/build-module/components/global-styles/border-panel.mjs
  var import_jsx_runtime366 = __toESM(require_jsx_runtime(), 1);
  function useHasBorderPanel(settings2) {
    const controls = Object.values(useHasBorderPanelControls(settings2));
    return controls.some(Boolean);
  }
  function useHasBorderPanelControls(settings2) {
    const controls = {
      hasBorderColor: useHasBorderColorControl(settings2),
      hasBorderRadius: useHasBorderRadiusControl(settings2),
      hasBorderStyle: useHasBorderStyleControl(settings2),
      hasBorderWidth: useHasBorderWidthControl(settings2),
      hasShadow: useHasShadowControl(settings2)
    };
    return controls;
  }
  function useHasBorderColorControl(settings2) {
    return settings2?.border?.color;
  }
  function useHasBorderRadiusControl(settings2) {
    return settings2?.border?.radius;
  }
  function useHasBorderStyleControl(settings2) {
    return settings2?.border?.style;
  }
  function useHasBorderWidthControl(settings2) {
    return settings2?.border?.width;
  }
  function useHasShadowControl(settings2) {
    const shadows = useShadowPresets(settings2);
    return !!settings2?.shadow && shadows.length > 0;
  }
  function BorderToolsPanel({
    resetAllFilter,
    onChange,
    value,
    panelId,
    children,
    label
  }) {
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const resetAll = () => {
      const updatedValue = resetAllFilter(value);
      onChange(updatedValue);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
      import_components204.__experimentalToolsPanel,
      {
        label,
        resetAll,
        panelId,
        dropdownMenuProps,
        children
      }
    );
  }
  var DEFAULT_CONTROLS5 = {
    radius: true,
    color: true,
    width: true,
    shadow: true
  };
  function BorderPanel({
    as: Wrapper = BorderToolsPanel,
    value,
    onChange,
    inheritedValue = value,
    settings: settings2,
    panelId,
    name,
    defaultControls = DEFAULT_CONTROLS5
  }) {
    const colors2 = useColorsPerOrigin(settings2);
    const decodeValue = (0, import_element202.useCallback)(
      (rawValue) => getValueFromVariable({ settings: settings2 }, "", rawValue),
      [settings2]
    );
    const encodeColorValue = (colorValue) => {
      const allColors = colors2.flatMap(
        ({ colors: originColors }) => originColors
      );
      const colorObject = allColors.find(
        ({ color }) => color === colorValue
      );
      return colorObject ? "var:preset|color|" + colorObject.slug : colorValue;
    };
    const border = (0, import_element202.useMemo)(() => {
      if ((0, import_components204.__experimentalHasSplitBorders)(inheritedValue?.border)) {
        const borderValue = { ...inheritedValue?.border };
        ["top", "right", "bottom", "left"].forEach((side) => {
          borderValue[side] = {
            ...borderValue[side],
            color: decodeValue(borderValue[side]?.color)
          };
        });
        return borderValue;
      }
      return {
        ...inheritedValue?.border,
        color: inheritedValue?.border?.color ? decodeValue(inheritedValue?.border?.color) : void 0
      };
    }, [inheritedValue?.border, decodeValue]);
    const setBorder = (newBorder) => onChange({ ...value, border: newBorder });
    const showBorderColor = useHasBorderColorControl(settings2);
    const showBorderStyle = useHasBorderStyleControl(settings2);
    const showBorderWidth = useHasBorderWidthControl(settings2);
    const showBorderRadius = useHasBorderRadiusControl(settings2);
    const borderRadiusValues = (0, import_element202.useMemo)(() => {
      if (typeof inheritedValue?.border?.radius !== "object") {
        return decodeValue(inheritedValue?.border?.radius);
      }
      return {
        topLeft: decodeValue(inheritedValue?.border?.radius?.topLeft),
        topRight: decodeValue(inheritedValue?.border?.radius?.topRight),
        bottomLeft: decodeValue(
          inheritedValue?.border?.radius?.bottomLeft
        ),
        bottomRight: decodeValue(
          inheritedValue?.border?.radius?.bottomRight
        )
      };
    }, [inheritedValue?.border?.radius, decodeValue]);
    const setBorderRadius = (newBorderRadius) => setBorder({ ...border, radius: newBorderRadius });
    const hasBorderRadius = () => {
      const borderValues = value?.border?.radius;
      if (typeof borderValues === "object") {
        return Object.entries(borderValues).some(Boolean);
      }
      return !!borderValues;
    };
    const hasShadowControl = useHasShadowControl(settings2);
    const shadow = decodeValue(inheritedValue?.shadow);
    const shadowPresets = settings2?.shadow?.presets ?? {};
    const mergedShadowPresets = shadowPresets.custom ?? shadowPresets.theme ?? shadowPresets.default ?? [];
    const setShadow = (newValue) => {
      const slug = mergedShadowPresets?.find(
        ({ shadow: shadowName }) => shadowName === newValue
      )?.slug;
      onChange(
        setImmutably(
          value,
          ["shadow"],
          slug ? `var:preset|shadow|${slug}` : newValue || void 0
        )
      );
    };
    const hasShadow = () => !!value?.shadow;
    const resetShadow = () => setShadow(void 0);
    const resetBorder = () => {
      if (hasBorderRadius()) {
        return setBorder({ radius: value?.border?.radius });
      }
      setBorder(void 0);
    };
    const onBorderChange = (newBorder) => {
      const updatedBorder = { ...newBorder };
      if ((0, import_components204.__experimentalHasSplitBorders)(updatedBorder)) {
        ["top", "right", "bottom", "left"].forEach((side) => {
          if (updatedBorder[side]) {
            updatedBorder[side] = {
              ...updatedBorder[side],
              color: encodeColorValue(updatedBorder[side]?.color)
            };
          }
        });
      } else if (updatedBorder) {
        updatedBorder.color = encodeColorValue(updatedBorder.color);
      }
      setBorder({ radius: border?.radius, ...updatedBorder });
    };
    const resetAllFilter = (0, import_element202.useCallback)((previousValue) => {
      return {
        ...previousValue,
        border: void 0,
        shadow: void 0
      };
    }, []);
    const showBorderByDefault = defaultControls?.color || defaultControls?.width;
    const hasBorderControl = showBorderColor || showBorderStyle || showBorderWidth || showBorderRadius;
    const label = useBorderPanelLabel({
      blockName: name,
      hasShadowControl,
      hasBorderControl
    });
    return /* @__PURE__ */ (0, import_jsx_runtime366.jsxs)(
      Wrapper,
      {
        resetAllFilter,
        value,
        onChange,
        panelId,
        label,
        children: [
          (showBorderWidth || showBorderColor) && /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
            import_components204.__experimentalToolsPanelItem,
            {
              hasValue: () => (0, import_components204.__experimentalIsDefinedBorder)(value?.border),
              label: (0, import_i18n190.__)("Border"),
              onDeselect: () => resetBorder(),
              isShownByDefault: showBorderByDefault,
              panelId,
              children: /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
                import_components204.BorderBoxControl,
                {
                  colors: colors2,
                  enableAlpha: true,
                  enableStyle: showBorderStyle,
                  onChange: onBorderChange,
                  popoverOffset: 40,
                  popoverPlacement: "left-start",
                  value: border,
                  __experimentalIsRenderedInSidebar: true,
                  size: "__unstable-large",
                  hideLabelFromVision: !hasShadowControl,
                  label: (0, import_i18n190.__)("Border")
                }
              )
            }
          ),
          showBorderRadius && /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
            import_components204.__experimentalToolsPanelItem,
            {
              hasValue: hasBorderRadius,
              label: (0, import_i18n190.__)("Radius"),
              onDeselect: () => setBorderRadius(void 0),
              isShownByDefault: defaultControls.radius,
              panelId,
              children: /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
                BorderRadiusControl,
                {
                  presets: settings2?.border?.radiusSizes,
                  values: borderRadiusValues,
                  onChange: (newValue) => {
                    setBorderRadius(newValue || void 0);
                  }
                }
              )
            }
          ),
          hasShadowControl && /* @__PURE__ */ (0, import_jsx_runtime366.jsxs)(
            import_components204.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n190.__)("Shadow"),
              hasValue: hasShadow,
              onDeselect: resetShadow,
              isShownByDefault: defaultControls.shadow,
              panelId,
              children: [
                hasBorderControl ? /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(import_components204.BaseControl.VisualLabel, { as: "legend", children: (0, import_i18n190.__)("Shadow") }) : null,
                /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
                  ShadowPopover,
                  {
                    shadow,
                    onShadowChange: setShadow,
                    settings: settings2
                  }
                )
              ]
            }
          )
        ]
      }
    );
  }

  // packages/block-editor/build-module/components/global-styles/color-panel.mjs
  var import_components205 = __toESM(require_components(), 1);
  var import_element203 = __toESM(require_element(), 1);
  var import_i18n191 = __toESM(require_i18n(), 1);
  var import_jsx_runtime367 = __toESM(require_jsx_runtime(), 1);
  function useHasColorPanel(settings2) {
    const hasTextPanel = useHasTextPanel(settings2);
    const hasBackgroundPanel = useHasBackgroundColorPanel(settings2);
    const hasLinkPanel = useHasLinkPanel(settings2);
    const hasHeadingPanel = useHasHeadingPanel(settings2);
    const hasButtonPanel = useHasButtonPanel(settings2);
    const hasCaptionPanel = useHasCaptionPanel(settings2);
    return hasTextPanel || hasBackgroundPanel || hasLinkPanel || hasHeadingPanel || hasButtonPanel || hasCaptionPanel;
  }
  function useHasTextPanel(settings2) {
    const colors2 = useColorsPerOrigin(settings2);
    return settings2?.color?.text && (colors2?.length > 0 || settings2?.color?.custom);
  }
  function useHasLinkPanel(settings2) {
    const colors2 = useColorsPerOrigin(settings2);
    return settings2?.color?.link && (colors2?.length > 0 || settings2?.color?.custom);
  }
  function useHasCaptionPanel(settings2) {
    const colors2 = useColorsPerOrigin(settings2);
    return settings2?.color?.caption && (colors2?.length > 0 || settings2?.color?.custom);
  }
  function useHasHeadingPanel(settings2) {
    const colors2 = useColorsPerOrigin(settings2);
    const gradients = useGradientsPerOrigin(settings2);
    return settings2?.color?.heading && (colors2?.length > 0 || settings2?.color?.custom || gradients?.length > 0 || settings2?.color?.customGradient);
  }
  function useHasButtonPanel(settings2) {
    const colors2 = useColorsPerOrigin(settings2);
    const gradients = useGradientsPerOrigin(settings2);
    return settings2?.color?.button && (colors2?.length > 0 || settings2?.color?.custom || gradients?.length > 0 || settings2?.color?.customGradient);
  }
  function useHasBackgroundColorPanel(settings2) {
    const colors2 = useColorsPerOrigin(settings2);
    const gradients = useGradientsPerOrigin(settings2);
    return settings2?.color?.background && (colors2?.length > 0 || settings2?.color?.custom || gradients?.length > 0 || settings2?.color?.customGradient);
  }
  function ColorToolsPanel({
    resetAllFilter,
    onChange,
    value,
    panelId,
    children,
    label
  }) {
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const resetAll = () => {
      const updatedValue = resetAllFilter(value);
      onChange(updatedValue);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
      import_components205.__experimentalToolsPanel,
      {
        label: label || (0, import_i18n191.__)("Elements"),
        resetAll,
        panelId,
        hasInnerWrapper: true,
        headingLevel: 3,
        className: "color-block-support-panel",
        __experimentalFirstVisibleItemClass: "first",
        __experimentalLastVisibleItemClass: "last",
        dropdownMenuProps,
        children: /* @__PURE__ */ (0, import_jsx_runtime367.jsx)("div", { className: "color-block-support-panel__inner-wrapper", children })
      }
    );
  }
  var DEFAULT_CONTROLS6 = {
    text: true,
    background: true,
    link: true,
    heading: true,
    button: true,
    caption: true
  };
  var popoverProps = {
    placement: "left-start",
    offset: 36,
    shift: true
  };
  var { Tabs: Tabs4 } = unlock(import_components205.privateApis);
  var LabeledColorIndicators = ({ indicators, label }) => /* @__PURE__ */ (0, import_jsx_runtime367.jsxs)(import_components205.__experimentalHStack, { justify: "flex-start", children: [
    /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(import_components205.__experimentalZStack, { isLayered: false, offset: -8, children: indicators.map((indicator, index) => /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(import_components205.Flex, { expanded: false, children: /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(import_components205.ColorIndicator, { colorValue: indicator }) }, index)) }),
    /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(import_components205.FlexItem, { className: "block-editor-panel-color-gradient-settings__color-name", children: label })
  ] });
  function ColorPanelTab({
    isGradient,
    inheritedValue,
    userValue,
    setValue,
    colorGradientControlSettings
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
      control_default,
      {
        ...colorGradientControlSettings,
        showTitle: false,
        enableAlpha: true,
        __experimentalIsRenderedInSidebar: true,
        colorValue: isGradient ? void 0 : inheritedValue,
        gradientValue: isGradient ? inheritedValue : void 0,
        onColorChange: isGradient ? void 0 : setValue,
        onGradientChange: isGradient ? setValue : void 0,
        clearable: inheritedValue === userValue,
        headingLevel: 3
      }
    );
  }
  function ColorPanelDropdown({
    label,
    hasValue,
    resetValue,
    isShownByDefault,
    indicators,
    tabs,
    colorGradientControlSettings,
    panelId
  }) {
    const currentTab = tabs.find((tab) => tab.userValue !== void 0);
    const { key: firstTabKey, ...firstTab } = tabs[0] ?? {};
    const colorGradientDropdownButtonRef = (0, import_element203.useRef)(void 0);
    return /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
      import_components205.__experimentalToolsPanelItem,
      {
        className: "block-editor-tools-panel-color-gradient-settings__item",
        hasValue,
        label,
        onDeselect: resetValue,
        isShownByDefault,
        panelId,
        children: /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
          import_components205.Dropdown,
          {
            popoverProps,
            className: "block-editor-tools-panel-color-gradient-settings__dropdown",
            renderToggle: ({ onToggle, isOpen }) => {
              const toggleProps = {
                onClick: onToggle,
                className: clsx_default(
                  "block-editor-panel-color-gradient-settings__dropdown",
                  { "is-open": isOpen }
                ),
                "aria-expanded": isOpen,
                ref: colorGradientDropdownButtonRef
              };
              return /* @__PURE__ */ (0, import_jsx_runtime367.jsxs)(import_jsx_runtime367.Fragment, { children: [
                /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(import_components205.Button, { ...toggleProps, __next40pxDefaultSize: true, children: /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
                  LabeledColorIndicators,
                  {
                    indicators,
                    label
                  }
                ) }),
                hasValue() && /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
                  import_components205.Button,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n191.__)("Reset"),
                    className: "block-editor-panel-color-gradient-settings__reset",
                    size: "small",
                    icon: reset_default,
                    onClick: () => {
                      resetValue();
                      if (isOpen) {
                        onToggle();
                      }
                      colorGradientDropdownButtonRef.current?.focus();
                    }
                  }
                )
              ] });
            },
            renderContent: () => /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(import_components205.__experimentalDropdownContentWrapper, { paddingSize: "none", children: /* @__PURE__ */ (0, import_jsx_runtime367.jsxs)("div", { className: "block-editor-panel-color-gradient-settings__dropdown-content", children: [
              tabs.length === 1 && /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
                ColorPanelTab,
                {
                  ...firstTab,
                  colorGradientControlSettings
                },
                firstTabKey
              ),
              tabs.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime367.jsxs)(Tabs4, { defaultTabId: currentTab?.key, children: [
                /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(Tabs4.TabList, { children: tabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
                  Tabs4.Tab,
                  {
                    tabId: tab.key,
                    children: tab.label
                  },
                  tab.key
                )) }),
                tabs.map((tab) => {
                  const { key: tabKey, ...restTabProps } = tab;
                  return /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
                    Tabs4.TabPanel,
                    {
                      tabId: tabKey,
                      focusable: false,
                      children: /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
                        ColorPanelTab,
                        {
                          ...restTabProps,
                          colorGradientControlSettings
                        },
                        tabKey
                      )
                    },
                    tabKey
                  );
                })
              ] })
            ] }) })
          }
        )
      }
    );
  }
  function ColorPanel({
    as: Wrapper = ColorToolsPanel,
    value,
    onChange,
    inheritedValue = value,
    settings: settings2,
    panelId,
    defaultControls = DEFAULT_CONTROLS6,
    label,
    children
  }) {
    const colors2 = useColorsPerOrigin(settings2);
    const gradients = useGradientsPerOrigin(settings2);
    const areCustomSolidsEnabled = settings2?.color?.custom;
    const areCustomGradientsEnabled = settings2?.color?.customGradient;
    const hasSolidColors = colors2.length > 0 || areCustomSolidsEnabled;
    const hasGradientColors = gradients.length > 0 || areCustomGradientsEnabled;
    const decodeValue = (rawValue) => getValueFromVariable({ settings: settings2 }, "", rawValue);
    const encodeColorValue = (colorValue) => {
      const allColors = colors2.flatMap(
        ({ colors: originColors }) => originColors
      );
      const colorObject = allColors.find(
        ({ color }) => color === colorValue
      );
      return colorObject ? "var:preset|color|" + colorObject.slug : colorValue;
    };
    const encodeGradientValue = (gradientValue) => {
      const allGradients = gradients.flatMap(
        ({ gradients: originGradients }) => originGradients
      );
      const gradientObject = allGradients.find(
        ({ gradient: gradient2 }) => gradient2 === gradientValue
      );
      return gradientObject ? "var:preset|gradient|" + gradientObject.slug : gradientValue;
    };
    const showBackgroundPanel = useHasBackgroundColorPanel(settings2);
    const backgroundColor = decodeValue(inheritedValue?.color?.background);
    const userBackgroundColor = decodeValue(value?.color?.background);
    const gradient = decodeValue(inheritedValue?.color?.gradient);
    const userGradient = decodeValue(value?.color?.gradient);
    const hasBackground = () => !!userBackgroundColor || !!userGradient;
    const setBackgroundColor = (newColor) => {
      const newValue = setImmutably(
        value,
        ["color", "background"],
        encodeColorValue(newColor)
      );
      newValue.color.gradient = void 0;
      onChange(newValue);
    };
    const setGradient = (newGradient) => {
      const newValue = setImmutably(
        value,
        ["color", "gradient"],
        encodeGradientValue(newGradient)
      );
      newValue.color.background = void 0;
      onChange(newValue);
    };
    const resetBackground = () => {
      const newValue = setImmutably(
        value,
        ["color", "background"],
        void 0
      );
      newValue.color.gradient = void 0;
      onChange(newValue);
    };
    const showLinkPanel = useHasLinkPanel(settings2);
    const linkColor = decodeValue(
      inheritedValue?.elements?.link?.color?.text
    );
    const userLinkColor = decodeValue(value?.elements?.link?.color?.text);
    const setLinkColor = (newColor) => {
      onChange(
        setImmutably(
          value,
          ["elements", "link", "color", "text"],
          encodeColorValue(newColor)
        )
      );
    };
    const hoverLinkColor = decodeValue(
      inheritedValue?.elements?.link?.[":hover"]?.color?.text
    );
    const userHoverLinkColor = decodeValue(
      value?.elements?.link?.[":hover"]?.color?.text
    );
    const setHoverLinkColor = (newColor) => {
      onChange(
        setImmutably(
          value,
          ["elements", "link", ":hover", "color", "text"],
          encodeColorValue(newColor)
        )
      );
    };
    const hasLink = () => !!userLinkColor || !!userHoverLinkColor;
    const resetLink = () => {
      let newValue = setImmutably(
        value,
        ["elements", "link", ":hover", "color", "text"],
        void 0
      );
      newValue = setImmutably(
        newValue,
        ["elements", "link", "color", "text"],
        void 0
      );
      onChange(newValue);
    };
    const showTextPanel = useHasTextPanel(settings2);
    const textColor = decodeValue(inheritedValue?.color?.text);
    const userTextColor = decodeValue(value?.color?.text);
    const hasTextColor = () => !!userTextColor;
    const setTextColor = (newColor) => {
      let changedObject = setImmutably(
        value,
        ["color", "text"],
        encodeColorValue(newColor)
      );
      if (textColor === linkColor) {
        changedObject = setImmutably(
          changedObject,
          ["elements", "link", "color", "text"],
          encodeColorValue(newColor)
        );
      }
      onChange(changedObject);
    };
    const resetTextColor = () => setTextColor(void 0);
    const elements = [
      {
        name: "caption",
        label: (0, import_i18n191.__)("Captions"),
        showPanel: useHasCaptionPanel(settings2)
      },
      {
        name: "button",
        label: (0, import_i18n191.__)("Button"),
        showPanel: useHasButtonPanel(settings2)
      },
      {
        name: "heading",
        label: (0, import_i18n191.__)("Heading"),
        showPanel: useHasHeadingPanel(settings2)
      },
      {
        name: "h1",
        label: (0, import_i18n191.__)("H1"),
        showPanel: useHasHeadingPanel(settings2)
      },
      {
        name: "h2",
        label: (0, import_i18n191.__)("H2"),
        showPanel: useHasHeadingPanel(settings2)
      },
      {
        name: "h3",
        label: (0, import_i18n191.__)("H3"),
        showPanel: useHasHeadingPanel(settings2)
      },
      {
        name: "h4",
        label: (0, import_i18n191.__)("H4"),
        showPanel: useHasHeadingPanel(settings2)
      },
      {
        name: "h5",
        label: (0, import_i18n191.__)("H5"),
        showPanel: useHasHeadingPanel(settings2)
      },
      {
        name: "h6",
        label: (0, import_i18n191.__)("H6"),
        showPanel: useHasHeadingPanel(settings2)
      }
    ];
    const resetAllFilter = (0, import_element203.useCallback)(
      (previousValue) => {
        return {
          ...previousValue,
          color: void 0,
          elements: {
            ...previousValue?.elements,
            link: {
              ...previousValue?.elements?.link,
              color: void 0,
              ":hover": {
                color: void 0
              }
            },
            ...elements.reduce((acc, element) => {
              return {
                ...acc,
                [element.name]: {
                  ...previousValue?.elements?.[element.name],
                  color: void 0
                }
              };
            }, {})
          }
        };
      },
      [elements]
    );
    const items = [
      showTextPanel && {
        key: "text",
        label: (0, import_i18n191.__)("Text"),
        hasValue: hasTextColor,
        resetValue: resetTextColor,
        isShownByDefault: defaultControls.text,
        indicators: [textColor],
        tabs: [
          {
            key: "text",
            label: (0, import_i18n191.__)("Text"),
            inheritedValue: textColor,
            setValue: setTextColor,
            userValue: userTextColor
          }
        ]
      },
      showBackgroundPanel && {
        key: "background",
        label: (0, import_i18n191.__)("Background"),
        hasValue: hasBackground,
        resetValue: resetBackground,
        isShownByDefault: defaultControls.background,
        indicators: [gradient ?? backgroundColor],
        tabs: [
          hasSolidColors && {
            key: "background",
            label: (0, import_i18n191.__)("Color"),
            inheritedValue: backgroundColor,
            setValue: setBackgroundColor,
            userValue: userBackgroundColor
          },
          hasGradientColors && {
            key: "gradient",
            label: (0, import_i18n191.__)("Gradient"),
            inheritedValue: gradient,
            setValue: setGradient,
            userValue: userGradient,
            isGradient: true
          }
        ].filter(Boolean)
      },
      showLinkPanel && {
        key: "link",
        label: (0, import_i18n191.__)("Link"),
        hasValue: hasLink,
        resetValue: resetLink,
        isShownByDefault: defaultControls.link,
        indicators: [linkColor, hoverLinkColor],
        tabs: [
          {
            key: "link",
            label: (0, import_i18n191.__)("Default"),
            inheritedValue: linkColor,
            setValue: setLinkColor,
            userValue: userLinkColor
          },
          {
            key: "hover",
            label: (0, import_i18n191.__)("Hover"),
            inheritedValue: hoverLinkColor,
            setValue: setHoverLinkColor,
            userValue: userHoverLinkColor
          }
        ]
      }
    ].filter(Boolean);
    elements.forEach(({ name, label: elementLabel, showPanel }) => {
      if (!showPanel) {
        return;
      }
      const elementBackgroundColor = decodeValue(
        inheritedValue?.elements?.[name]?.color?.background
      );
      const elementGradient = decodeValue(
        inheritedValue?.elements?.[name]?.color?.gradient
      );
      const elementTextColor = decodeValue(
        inheritedValue?.elements?.[name]?.color?.text
      );
      const elementBackgroundUserColor = decodeValue(
        value?.elements?.[name]?.color?.background
      );
      const elementGradientUserColor = decodeValue(
        value?.elements?.[name]?.color?.gradient
      );
      const elementTextUserColor = decodeValue(
        value?.elements?.[name]?.color?.text
      );
      const hasElement = () => !!(elementTextUserColor || elementBackgroundUserColor || elementGradientUserColor);
      const resetElement = () => {
        const newValue = setImmutably(
          value,
          ["elements", name, "color", "background"],
          void 0
        );
        newValue.elements[name].color.gradient = void 0;
        newValue.elements[name].color.text = void 0;
        onChange(newValue);
      };
      const setElementTextColor = (newTextColor) => {
        onChange(
          setImmutably(
            value,
            ["elements", name, "color", "text"],
            encodeColorValue(newTextColor)
          )
        );
      };
      const setElementBackgroundColor = (newBackgroundColor) => {
        const newValue = setImmutably(
          value,
          ["elements", name, "color", "background"],
          encodeColorValue(newBackgroundColor)
        );
        newValue.elements[name].color.gradient = void 0;
        onChange(newValue);
      };
      const setElementGradient = (newGradient) => {
        const newValue = setImmutably(
          value,
          ["elements", name, "color", "gradient"],
          encodeGradientValue(newGradient)
        );
        newValue.elements[name].color.background = void 0;
        onChange(newValue);
      };
      const supportsTextColor = true;
      const supportsBackground = name !== "caption";
      items.push({
        key: name,
        label: elementLabel,
        hasValue: hasElement,
        resetValue: resetElement,
        isShownByDefault: defaultControls[name],
        indicators: supportsTextColor && supportsBackground ? [
          elementTextColor,
          elementGradient ?? elementBackgroundColor
        ] : [
          supportsTextColor ? elementTextColor : elementGradient ?? elementBackgroundColor
        ],
        tabs: [
          hasSolidColors && supportsTextColor && {
            key: "text",
            label: (0, import_i18n191.__)("Text"),
            inheritedValue: elementTextColor,
            setValue: setElementTextColor,
            userValue: elementTextUserColor
          },
          hasSolidColors && supportsBackground && {
            key: "background",
            label: (0, import_i18n191.__)("Background"),
            inheritedValue: elementBackgroundColor,
            setValue: setElementBackgroundColor,
            userValue: elementBackgroundUserColor
          },
          hasGradientColors && supportsBackground && {
            key: "gradient",
            label: (0, import_i18n191.__)("Gradient"),
            inheritedValue: elementGradient,
            setValue: setElementGradient,
            userValue: elementGradientUserColor,
            isGradient: true
          }
        ].filter(Boolean)
      });
    });
    return /* @__PURE__ */ (0, import_jsx_runtime367.jsxs)(
      Wrapper,
      {
        resetAllFilter,
        value,
        onChange,
        panelId,
        label,
        children: [
          items.map((item) => {
            const { key, ...restItem } = item;
            return /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
              ColorPanelDropdown,
              {
                ...restItem,
                colorGradientControlSettings: {
                  colors: colors2,
                  disableCustomColors: !areCustomSolidsEnabled,
                  gradients,
                  disableCustomGradients: !areCustomGradientsEnabled
                },
                panelId
              },
              key
            );
          }),
          children
        ]
      }
    );
  }

  // packages/block-editor/build-module/components/global-styles/filters-panel.mjs
  var import_components206 = __toESM(require_components(), 1);
  var import_i18n192 = __toESM(require_i18n(), 1);
  var import_element204 = __toESM(require_element(), 1);
  var import_jsx_runtime368 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_ARRAY13 = [];
  function useMultiOriginColorPresets(settings2, { presetSetting, defaultSetting }) {
    const disableDefault = !settings2?.color?.[defaultSetting];
    const userPresets = settings2?.color?.[presetSetting]?.custom || EMPTY_ARRAY13;
    const themePresets = settings2?.color?.[presetSetting]?.theme || EMPTY_ARRAY13;
    const defaultPresets = settings2?.color?.[presetSetting]?.default || EMPTY_ARRAY13;
    return (0, import_element204.useMemo)(
      () => [
        ...userPresets,
        ...themePresets,
        ...disableDefault ? EMPTY_ARRAY13 : defaultPresets
      ],
      [disableDefault, userPresets, themePresets, defaultPresets]
    );
  }
  function useHasFiltersPanel(settings2) {
    return useHasDuotoneControl(settings2);
  }
  function useHasDuotoneControl(settings2) {
    return settings2.color.customDuotone || settings2.color.defaultDuotone || settings2.color.duotone.length > 0;
  }
  function FiltersToolsPanel({
    resetAllFilter,
    onChange,
    value,
    panelId,
    children
  }) {
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const resetAll = () => {
      const updatedValue = resetAllFilter(value);
      onChange(updatedValue);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(
      import_components206.__experimentalToolsPanel,
      {
        label: (0, import_i18n192._x)("Filters", "Name for applying graphical effects"),
        resetAll,
        panelId,
        dropdownMenuProps,
        children
      }
    );
  }
  var DEFAULT_CONTROLS7 = {
    duotone: true
  };
  var popoverProps2 = {
    placement: "left-start",
    offset: 36,
    shift: true,
    className: "block-editor-duotone-control__popover",
    headerTitle: (0, import_i18n192.__)("Duotone")
  };
  var LabeledColorIndicator2 = ({ indicator, label }) => /* @__PURE__ */ (0, import_jsx_runtime368.jsxs)(import_components206.__experimentalHStack, { justify: "flex-start", children: [
    /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(import_components206.__experimentalZStack, { isLayered: false, offset: -8, children: /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(import_components206.Flex, { expanded: false, children: indicator === "unset" || !indicator ? /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(import_components206.ColorIndicator, { className: "block-editor-duotone-control__unset-indicator" }) : /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(import_components206.DuotoneSwatch, { values: indicator }) }) }),
    /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(import_components206.FlexItem, { title: label, children: label })
  ] });
  var renderToggle2 = (duotone, resetDuotone) => function Toggle2({ onToggle, isOpen }) {
    const duotoneButtonRef = (0, import_element204.useRef)(void 0);
    const toggleProps = {
      onClick: onToggle,
      className: clsx_default(
        "block-editor-global-styles-filters-panel__dropdown-toggle",
        { "is-open": isOpen }
      ),
      "aria-expanded": isOpen,
      ref: duotoneButtonRef
    };
    const removeButtonProps = {
      onClick: () => {
        if (isOpen) {
          onToggle();
        }
        resetDuotone();
        duotoneButtonRef.current?.focus();
      },
      className: "block-editor-panel-duotone-settings__reset",
      label: (0, import_i18n192.__)("Reset")
    };
    return /* @__PURE__ */ (0, import_jsx_runtime368.jsxs)(import_jsx_runtime368.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(import_components206.Button, { __next40pxDefaultSize: true, ...toggleProps, children: /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(
        LabeledColorIndicator2,
        {
          indicator: duotone,
          label: (0, import_i18n192.__)("Duotone")
        }
      ) }),
      duotone && /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(
        import_components206.Button,
        {
          size: "small",
          icon: reset_default,
          ...removeButtonProps
        }
      )
    ] });
  };
  function FiltersPanel({
    as: Wrapper = FiltersToolsPanel,
    value,
    onChange,
    inheritedValue = value,
    settings: settings2,
    panelId,
    defaultControls = DEFAULT_CONTROLS7
  }) {
    const decodeValue = (rawValue) => getValueFromVariable({ settings: settings2 }, "", rawValue);
    const hasDuotoneEnabled = useHasDuotoneControl(settings2);
    const duotonePalette = useMultiOriginColorPresets(settings2, {
      presetSetting: "duotone",
      defaultSetting: "defaultDuotone"
    });
    const colorPalette = useMultiOriginColorPresets(settings2, {
      presetSetting: "palette",
      defaultSetting: "defaultPalette"
    });
    const duotone = decodeValue(inheritedValue?.filter?.duotone);
    const setDuotone = (newValue) => {
      const duotonePreset = duotonePalette.find(({ colors: colors2 }) => {
        return colors2 === newValue;
      });
      const duotoneValue = duotonePreset ? `var:preset|duotone|${duotonePreset.slug}` : newValue;
      onChange(
        setImmutably(value, ["filter", "duotone"], duotoneValue)
      );
    };
    const hasDuotone = () => !!value?.filter?.duotone;
    const resetDuotone = () => setDuotone(void 0);
    const resetAllFilter = (0, import_element204.useCallback)((previousValue) => {
      return {
        ...previousValue,
        filter: {
          ...previousValue.filter,
          duotone: void 0
        }
      };
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(
      Wrapper,
      {
        resetAllFilter,
        value,
        onChange,
        panelId,
        children: hasDuotoneEnabled && /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(
          import_components206.__experimentalToolsPanelItem,
          {
            label: (0, import_i18n192.__)("Duotone"),
            hasValue: hasDuotone,
            onDeselect: resetDuotone,
            isShownByDefault: defaultControls.duotone,
            panelId,
            children: /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(
              import_components206.Dropdown,
              {
                popoverProps: popoverProps2,
                className: "block-editor-global-styles-filters-panel__dropdown",
                renderToggle: renderToggle2(duotone, resetDuotone),
                renderContent: () => /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(import_components206.__experimentalDropdownContentWrapper, { paddingSize: "small", children: /* @__PURE__ */ (0, import_jsx_runtime368.jsxs)(import_components206.MenuGroup, { label: (0, import_i18n192.__)("Duotone"), children: [
                  /* @__PURE__ */ (0, import_jsx_runtime368.jsx)("p", { children: (0, import_i18n192.__)(
                    "Create a two-tone color effect without losing your original image."
                  ) }),
                  /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(
                    import_components206.DuotonePicker,
                    {
                      colorPalette,
                      duotonePalette,
                      disableCustomColors: true,
                      disableCustomDuotone: true,
                      value: duotone,
                      onChange: setDuotone
                    }
                  )
                ] }) })
              }
            )
          }
        )
      }
    );
  }

  // packages/block-editor/build-module/components/global-styles/image-settings-panel.mjs
  var import_components207 = __toESM(require_components(), 1);
  var import_i18n193 = __toESM(require_i18n(), 1);
  var import_jsx_runtime369 = __toESM(require_jsx_runtime(), 1);
  function useHasImageSettingsPanel(name, value, inheritedValue) {
    return name === "core/image" && inheritedValue?.lightbox?.allowEditing || !!value?.lightbox;
  }
  function ImageSettingsPanel({
    onChange,
    value,
    inheritedValue,
    panelId
  }) {
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const resetLightbox = () => {
      onChange(void 0);
    };
    const onChangeLightbox = (newSetting) => {
      onChange({
        enabled: newSetting
      });
    };
    let lightboxChecked = false;
    if (inheritedValue?.lightbox?.enabled) {
      lightboxChecked = inheritedValue.lightbox.enabled;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime369.jsx)(import_jsx_runtime369.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime369.jsx)(
      import_components207.__experimentalToolsPanel,
      {
        label: (0, import_i18n193._x)("Settings", "Image settings"),
        resetAll: resetLightbox,
        panelId,
        dropdownMenuProps,
        children: /* @__PURE__ */ (0, import_jsx_runtime369.jsx)(
          import_components207.__experimentalToolsPanelItem,
          {
            hasValue: () => !!value?.lightbox,
            label: (0, import_i18n193.__)("Enlarge on click"),
            onDeselect: resetLightbox,
            isShownByDefault: true,
            panelId,
            children: /* @__PURE__ */ (0, import_jsx_runtime369.jsx)(
              import_components207.ToggleControl,
              {
                label: (0, import_i18n193.__)("Enlarge on click"),
                checked: lightboxChecked,
                onChange: onChangeLightbox
              }
            )
          }
        )
      }
    ) });
  }

  // packages/block-editor/build-module/components/global-styles/advanced-panel.mjs
  var import_components208 = __toESM(require_components(), 1);
  var import_element205 = __toESM(require_element(), 1);
  var import_i18n194 = __toESM(require_i18n(), 1);
  var import_jsx_runtime370 = __toESM(require_jsx_runtime(), 1);
  function validateCSS(css) {
    if (typeof css === "string" && /<\/?\w/.test(css)) {
      return false;
    }
    return true;
  }
  function AdvancedPanel({
    value,
    onChange,
    inheritedValue = value,
    help
  }) {
    const [cssError, setCSSError] = (0, import_element205.useState)(null);
    const customCSS = inheritedValue?.css;
    function handleOnChange(newValue) {
      onChange({
        ...value,
        css: newValue
      });
      if (!validateCSS(newValue)) {
        setCSSError(
          (0, import_i18n194.__)("The custom CSS is invalid. Do not use <> markup.")
        );
        return;
      }
      if (cssError) {
        setCSSError(null);
      }
    }
    function handleOnBlur(event) {
      const cssValue = event?.target?.value;
      if (!cssValue || !validateCSS(cssValue)) {
        return;
      }
      const [transformed] = transform_styles_default(
        [{ css: cssValue }],
        ".for-validation-only"
      );
      setCSSError(
        transformed === null ? (0, import_i18n194.__)("There is an error with your CSS structure.") : null
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime370.jsxs)(import_components208.__experimentalVStack, { spacing: 3, children: [
      cssError && /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(import_components208.Notice, { status: "error", onRemove: () => setCSSError(null), children: cssError }),
      /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
        import_components208.TextareaControl,
        {
          label: (0, import_i18n194.__)("Additional CSS"),
          value: customCSS,
          onChange: (newValue) => handleOnChange(newValue),
          onBlur: handleOnBlur,
          className: "block-editor-global-styles-advanced-panel__custom-css-input",
          spellCheck: false,
          help
        }
      )
    ] });
  }

  // packages/block-editor/build-module/components/global-styles/background-panel.mjs
  var import_components210 = __toESM(require_components(), 1);
  var import_element207 = __toESM(require_element(), 1);
  var import_i18n196 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/components/background-image-control/index.mjs
  var import_components209 = __toESM(require_components(), 1);
  var import_i18n195 = __toESM(require_i18n(), 1);
  var import_notices11 = __toESM(require_notices(), 1);
  var import_url12 = __toESM(require_url(), 1);
  var import_element206 = __toESM(require_element(), 1);
  var import_data161 = __toESM(require_data(), 1);
  var import_dom39 = __toESM(require_dom(), 1);
  var import_blob2 = __toESM(require_blob(), 1);
  var import_jsx_runtime371 = __toESM(require_jsx_runtime(), 1);
  var IMAGE_BACKGROUND_TYPE = "image";
  var BACKGROUND_POPOVER_PROPS = {
    placement: "left-start",
    offset: 36,
    shift: true,
    className: "block-editor-global-styles-background-panel__popover"
  };
  var noop18 = () => {
  };
  var focusToggleButton = (containerRef) => {
    window.requestAnimationFrame(() => {
      const [toggleButton] = import_dom39.focus.tabbable.find(containerRef?.current);
      if (!toggleButton) {
        return;
      }
      toggleButton.focus();
    });
  };
  function backgroundSizeHelpText(value) {
    if (value === "cover" || value === void 0) {
      return (0, import_i18n195.__)("Image covers the space evenly.");
    }
    if (value === "contain") {
      return (0, import_i18n195.__)("Image is contained without distortion.");
    }
    return (0, import_i18n195.__)("Image has a fixed width.");
  }
  var coordsToBackgroundPosition = (value) => {
    if (!value || isNaN(value.x) && isNaN(value.y)) {
      return void 0;
    }
    const x2 = isNaN(value.x) ? 0.5 : value.x;
    const y2 = isNaN(value.y) ? 0.5 : value.y;
    return `${x2 * 100}% ${y2 * 100}%`;
  };
  var backgroundPositionToCoords = (value) => {
    if (!value) {
      return { x: void 0, y: void 0 };
    }
    let [x2, y2] = value.split(" ").map((v2) => parseFloat(v2) / 100);
    x2 = isNaN(x2) ? void 0 : x2;
    y2 = isNaN(y2) ? x2 : y2;
    return { x: x2, y: y2 };
  };
  function InspectorImagePreviewItem({
    as = "span",
    imgUrl,
    toggleProps = {},
    filename,
    label,
    onToggleCallback = noop18
  }) {
    const { isOpen, ...restToggleProps } = toggleProps;
    (0, import_element206.useEffect)(() => {
      if (typeof isOpen !== "undefined") {
        onToggleCallback(isOpen);
      }
    }, [isOpen, onToggleCallback]);
    const renderPreviewContent = () => {
      return /* @__PURE__ */ (0, import_jsx_runtime371.jsxs)(import_components209.__experimentalHStack, { className: "block-editor-global-styles-background-panel__inspector-preview-inner", children: [
        /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
          "span",
          {
            className: "block-editor-global-styles-background-panel__inspector-image-indicator",
            style: {
              backgroundImage: imgUrl ? `url(${imgUrl})` : void 0
            }
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime371.jsxs)(import_components209.FlexBlock, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
            import_components209.__experimentalTruncate,
            {
              numberOfLines: 1,
              className: "block-editor-global-styles-background-panel__inspector-media-replace-title",
              children: label
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(import_components209.VisuallyHidden, { as: "span", children: imgUrl ? (0, import_i18n195.sprintf)(
            /* translators: %s: file name */
            (0, import_i18n195.__)("Background image: %s"),
            filename || label
          ) : (0, import_i18n195.__)("No background image selected") })
        ] })
      ] });
    };
    return as === "button" ? /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(import_components209.Button, { __next40pxDefaultSize: true, ...restToggleProps, children: renderPreviewContent() }) : renderPreviewContent();
  }
  function BackgroundControlsPanel({
    label,
    filename,
    url: imgUrl,
    children,
    onToggle: onToggleCallback = noop18,
    hasImageValue,
    onReset,
    containerRef
  }) {
    if (!hasImageValue) {
      return;
    }
    const imgLabel = label || (0, import_url12.getFilename)(imgUrl) || (0, import_i18n195.__)("Image");
    return /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
      import_components209.Dropdown,
      {
        popoverProps: BACKGROUND_POPOVER_PROPS,
        renderToggle: ({ onToggle, isOpen }) => {
          const toggleProps = {
            onClick: onToggle,
            className: "block-editor-global-styles-background-panel__dropdown-toggle",
            "aria-expanded": isOpen,
            "aria-label": (0, import_i18n195.__)(
              "Background size, position and repeat options."
            ),
            isOpen
          };
          return /* @__PURE__ */ (0, import_jsx_runtime371.jsxs)(import_jsx_runtime371.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
              InspectorImagePreviewItem,
              {
                imgUrl,
                filename,
                label: imgLabel,
                toggleProps,
                as: "button",
                onToggleCallback
              }
            ),
            onReset && /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
              import_components209.Button,
              {
                __next40pxDefaultSize: true,
                label: (0, import_i18n195.__)("Reset"),
                className: "block-editor-global-styles-background-panel__reset",
                size: "small",
                icon: reset_default,
                onClick: () => {
                  onReset();
                  if (isOpen) {
                    onToggle();
                  }
                  focusToggleButton(containerRef);
                }
              }
            )
          ] });
        },
        renderContent: () => /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
          import_components209.__experimentalDropdownContentWrapper,
          {
            className: "block-editor-global-styles-background-panel__dropdown-content-wrapper",
            paddingSize: "medium",
            children
          }
        )
      }
    );
  }
  function LoadingSpinner() {
    return /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(import_components209.Placeholder, { className: "block-editor-global-styles-background-panel__loading", children: /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(import_components209.Spinner, {}) });
  }
  function BackgroundImageControls({
    onChange,
    style,
    inheritedValue,
    onRemoveImage = noop18,
    onResetImage = noop18,
    displayInPanel,
    defaultValues,
    containerRef
  }) {
    const [isUploading, setIsUploading] = (0, import_element206.useState)(false);
    const { getSettings: getSettings7 } = (0, import_data161.useSelect)(store);
    const { id, title, url } = style?.background?.backgroundImage || {
      ...inheritedValue?.background?.backgroundImage
    };
    const { createErrorNotice } = (0, import_data161.useDispatch)(import_notices11.store);
    const onUploadError = (message2) => {
      createErrorNotice(message2, { type: "snackbar" });
      setIsUploading(false);
    };
    const resetBackgroundImage = () => onChange(
      setImmutably(
        style,
        ["background", "backgroundImage"],
        void 0
      )
    );
    const onSelectMedia = (media) => {
      if (!media || !media.url) {
        resetBackgroundImage();
        setIsUploading(false);
        return;
      }
      if ((0, import_blob2.isBlobURL)(media.url)) {
        setIsUploading(true);
        return;
      }
      if (media.media_type && media.media_type !== IMAGE_BACKGROUND_TYPE || !media.media_type && media.type && media.type !== IMAGE_BACKGROUND_TYPE) {
        onUploadError(
          (0, import_i18n195.__)("Only images can be used as a background image.")
        );
        return;
      }
      const sizeValue = style?.background?.backgroundSize || defaultValues?.backgroundSize;
      const positionValue = style?.background?.backgroundPosition;
      onChange(
        setImmutably(style, ["background"], {
          ...style?.background,
          backgroundImage: {
            url: media.url,
            id: media.id,
            source: "file",
            title: media.title || void 0
          },
          backgroundPosition: (
            /*
             * A background image uploaded and set in the editor receives a default background position of '50% 0',
             * when the background image size is the equivalent of "Tile".
             * This is to increase the chance that the image's focus point is visible.
             * This is in-editor only to assist with the user experience.
             */
            !positionValue && ("auto" === sizeValue || !sizeValue) ? "50% 0" : positionValue
          ),
          backgroundSize: sizeValue
        })
      );
      setIsUploading(false);
      focusToggleButton(containerRef);
    };
    const onFilesDrop2 = (filesList) => {
      getSettings7().mediaUpload({
        allowedTypes: [IMAGE_BACKGROUND_TYPE],
        filesList,
        onFileChange([image]) {
          onSelectMedia(image);
        },
        onError: onUploadError,
        multiple: false
      });
    };
    const hasValue = hasBackgroundImageValue(style);
    const onRemove = () => onChange(
      setImmutably(style, ["background"], {
        backgroundImage: "none"
      })
    );
    const canRemove = !hasValue && hasBackgroundImageValue(inheritedValue);
    const imgLabel = title || (0, import_url12.getFilename)(url) || (0, import_i18n195.__)("Image");
    return /* @__PURE__ */ (0, import_jsx_runtime371.jsxs)("div", { className: "block-editor-global-styles-background-panel__image-tools-panel-item", children: [
      isUploading && /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(LoadingSpinner, {}),
      /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
        media_replace_flow_default,
        {
          mediaId: id,
          mediaURL: url,
          allowedTypes: [IMAGE_BACKGROUND_TYPE],
          accept: "image/*",
          onSelect: onSelectMedia,
          popoverProps: {
            className: clsx_default({
              "block-editor-global-styles-background-panel__media-replace-popover": displayInPanel
            })
          },
          name: /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
            InspectorImagePreviewItem,
            {
              imgUrl: url,
              filename: title,
              label: imgLabel
            }
          ),
          renderToggle: (props) => /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(import_components209.Button, { ...props, __next40pxDefaultSize: true }),
          onError: onUploadError,
          onReset: () => {
            focusToggleButton(containerRef);
            onResetImage();
          },
          children: canRemove && /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
            import_components209.MenuItem,
            {
              onClick: () => {
                focusToggleButton(containerRef);
                onRemove();
                onRemoveImage();
              },
              children: (0, import_i18n195.__)("Remove")
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
        import_components209.DropZone,
        {
          onFilesDrop: onFilesDrop2,
          label: (0, import_i18n195.__)("Drop to upload")
        }
      )
    ] });
  }
  function BackgroundSizeControls({
    onChange,
    style,
    inheritedValue,
    defaultValues
  }) {
    const sizeValue = style?.background?.backgroundSize || inheritedValue?.background?.backgroundSize;
    const repeatValue = style?.background?.backgroundRepeat || inheritedValue?.background?.backgroundRepeat;
    const imageValue = style?.background?.backgroundImage?.url || inheritedValue?.background?.backgroundImage?.url;
    const isUploadedImage = style?.background?.backgroundImage?.id;
    const positionValue = style?.background?.backgroundPosition || inheritedValue?.background?.backgroundPosition;
    const attachmentValue = style?.background?.backgroundAttachment || inheritedValue?.background?.backgroundAttachment;
    let currentValueForToggle = !sizeValue && isUploadedImage ? defaultValues?.backgroundSize : sizeValue || "auto";
    currentValueForToggle = !["cover", "contain", "auto"].includes(
      currentValueForToggle
    ) ? "auto" : currentValueForToggle;
    const repeatCheckedValue = !(repeatValue === "no-repeat" || currentValueForToggle === "cover" && repeatValue === void 0);
    const updateBackgroundSize = (next) => {
      let nextRepeat = repeatValue;
      let nextPosition = positionValue;
      if (next === "contain") {
        nextRepeat = "no-repeat";
        nextPosition = void 0;
      }
      if (next === "cover") {
        nextRepeat = void 0;
        nextPosition = void 0;
      }
      if ((currentValueForToggle === "cover" || currentValueForToggle === "contain") && next === "auto") {
        nextRepeat = void 0;
        if (!!style?.background?.backgroundImage?.id) {
          nextPosition = "50% 0";
        }
      }
      if (!next && currentValueForToggle === "auto") {
        next = "auto";
      }
      onChange(
        setImmutably(style, ["background"], {
          ...style?.background,
          backgroundPosition: nextPosition,
          backgroundRepeat: nextRepeat,
          backgroundSize: next
        })
      );
    };
    const updateBackgroundPosition = (next) => {
      onChange(
        setImmutably(
          style,
          ["background", "backgroundPosition"],
          coordsToBackgroundPosition(next)
        )
      );
    };
    const toggleIsRepeated = () => onChange(
      setImmutably(
        style,
        ["background", "backgroundRepeat"],
        repeatCheckedValue === true ? "no-repeat" : "repeat"
      )
    );
    const toggleScrollWithPage = () => onChange(
      setImmutably(
        style,
        ["background", "backgroundAttachment"],
        attachmentValue === "fixed" ? "scroll" : "fixed"
      )
    );
    const backgroundPositionValue = !positionValue && isUploadedImage && "contain" === sizeValue ? defaultValues?.backgroundPosition : positionValue;
    return /* @__PURE__ */ (0, import_jsx_runtime371.jsxs)(import_components209.__experimentalVStack, { spacing: 3, className: "single-column", children: [
      /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
        import_components209.FocalPointPicker,
        {
          label: (0, import_i18n195.__)("Focal point"),
          url: imageValue,
          value: backgroundPositionToCoords(backgroundPositionValue),
          onChange: updateBackgroundPosition
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
        import_components209.ToggleControl,
        {
          label: (0, import_i18n195.__)("Fixed background"),
          checked: attachmentValue === "fixed",
          onChange: toggleScrollWithPage
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime371.jsxs)(
        import_components209.__experimentalToggleGroupControl,
        {
          size: "__unstable-large",
          label: (0, import_i18n195.__)("Size"),
          value: currentValueForToggle,
          onChange: updateBackgroundSize,
          isBlock: true,
          help: backgroundSizeHelpText(
            sizeValue || defaultValues?.backgroundSize
          ),
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
              import_components209.__experimentalToggleGroupControlOption,
              {
                value: "cover",
                label: (0, import_i18n195._x)(
                  "Cover",
                  "Size option for background image control"
                )
              },
              "cover"
            ),
            /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
              import_components209.__experimentalToggleGroupControlOption,
              {
                value: "contain",
                label: (0, import_i18n195._x)(
                  "Contain",
                  "Size option for background image control"
                )
              },
              "contain"
            ),
            /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
              import_components209.__experimentalToggleGroupControlOption,
              {
                value: "auto",
                label: (0, import_i18n195._x)(
                  "Tile",
                  "Size option for background image control"
                )
              },
              "tile"
            )
          ]
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime371.jsxs)(import_components209.__experimentalHStack, { justify: "flex-start", spacing: 2, as: "span", children: [
        /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
          import_components209.__experimentalUnitControl,
          {
            "aria-label": (0, import_i18n195.__)("Background image width"),
            onChange: updateBackgroundSize,
            value: sizeValue,
            size: "__unstable-large",
            __unstableInputWidth: "100px",
            min: 0,
            placeholder: (0, import_i18n195.__)("Auto"),
            disabled: currentValueForToggle !== "auto" || currentValueForToggle === void 0
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
          import_components209.ToggleControl,
          {
            label: (0, import_i18n195.__)("Repeat"),
            checked: repeatCheckedValue,
            onChange: toggleIsRepeated,
            disabled: currentValueForToggle === "cover"
          }
        )
      ] })
    ] });
  }
  function BackgroundImagePanel({
    value,
    onChange,
    inheritedValue = value,
    settings: settings2,
    defaultValues = {}
  }) {
    const { globalStyles, _links } = (0, import_data161.useSelect)((select3) => {
      const { getSettings: getSettings7 } = select3(store);
      const _settings = getSettings7();
      return {
        globalStyles: _settings[globalStylesDataKey],
        _links: _settings[globalStylesLinksDataKey]
      };
    }, []);
    const resolvedInheritedValue = (0, import_element206.useMemo)(() => {
      const resolvedValues = {
        background: {}
      };
      if (!inheritedValue?.background) {
        return inheritedValue;
      }
      Object.entries(inheritedValue?.background).forEach(
        ([key, backgroundValue]) => {
          resolvedValues.background[key] = getResolvedValue(
            backgroundValue,
            {
              styles: globalStyles,
              _links
            }
          );
        }
      );
      return resolvedValues;
    }, [globalStyles, _links, inheritedValue]);
    const resetBackground = () => onChange(setImmutably(value, ["background"], {}));
    const { title, url } = value?.background?.backgroundImage || {
      ...resolvedInheritedValue?.background?.backgroundImage
    };
    const hasImageValue = hasBackgroundImageValue(value) || hasBackgroundImageValue(resolvedInheritedValue);
    const imageValue = value?.background?.backgroundImage || inheritedValue?.background?.backgroundImage;
    const shouldShowBackgroundImageControls = hasImageValue && "none" !== imageValue && (settings2?.background?.backgroundSize || settings2?.background?.backgroundPosition || settings2?.background?.backgroundRepeat);
    const [isDropDownOpen, setIsDropDownOpen] = (0, import_element206.useState)(false);
    const containerRef = (0, import_element206.useRef)();
    return /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
      "div",
      {
        ref: containerRef,
        className: clsx_default(
          "block-editor-global-styles-background-panel__inspector-media-replace-container",
          {
            "is-open": isDropDownOpen
          }
        ),
        children: shouldShowBackgroundImageControls ? /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
          BackgroundControlsPanel,
          {
            label: title,
            filename: title,
            url,
            onToggle: setIsDropDownOpen,
            hasImageValue,
            onReset: resetBackground,
            containerRef,
            children: /* @__PURE__ */ (0, import_jsx_runtime371.jsxs)(import_components209.__experimentalVStack, { spacing: 3, className: "single-column", children: [
              /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
                BackgroundImageControls,
                {
                  onChange,
                  style: value,
                  inheritedValue: resolvedInheritedValue,
                  displayInPanel: true,
                  onResetImage: () => {
                    setIsDropDownOpen(false);
                    resetBackground();
                  },
                  onRemoveImage: () => setIsDropDownOpen(false),
                  defaultValues,
                  containerRef
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
                BackgroundSizeControls,
                {
                  onChange,
                  style: value,
                  defaultValues,
                  inheritedValue: resolvedInheritedValue
                }
              )
            ] })
          }
        ) : /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
          BackgroundImageControls,
          {
            onChange,
            style: value,
            inheritedValue: resolvedInheritedValue,
            defaultValues,
            onResetImage: () => {
              setIsDropDownOpen(false);
              resetBackground();
            },
            onRemoveImage: () => setIsDropDownOpen(false),
            containerRef
          }
        )
      }
    );
  }

  // packages/block-editor/build-module/components/global-styles/background-panel.mjs
  var import_jsx_runtime372 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_CONTROLS8 = {
    backgroundImage: true
  };
  function useHasBackgroundPanel(settings2) {
    return import_element207.Platform.OS === "web" && settings2?.background?.backgroundImage;
  }
  function hasBackgroundImageValue(style) {
    return !!style?.background?.backgroundImage?.id || // Supports url() string values in theme.json.
    "string" === typeof style?.background?.backgroundImage || !!style?.background?.backgroundImage?.url;
  }
  function BackgroundToolsPanel({
    resetAllFilter,
    onChange,
    value,
    panelId,
    children,
    headerLabel
  }) {
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const resetAll = () => {
      const updatedValue = resetAllFilter(value);
      onChange(updatedValue);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(
      import_components210.__experimentalToolsPanel,
      {
        label: headerLabel,
        resetAll,
        panelId,
        dropdownMenuProps,
        children
      }
    );
  }
  function BackgroundImagePanel2({
    as: Wrapper = BackgroundToolsPanel,
    value,
    onChange,
    inheritedValue,
    settings: settings2,
    panelId,
    defaultControls = DEFAULT_CONTROLS8,
    defaultValues = {},
    headerLabel = (0, import_i18n196.__)("Background")
  }) {
    const showBackgroundImageControl = useHasBackgroundPanel(settings2);
    const resetBackground = () => onChange(setImmutably(value, ["background"], {}));
    const resetAllFilter = (0, import_element207.useCallback)((previousValue) => {
      return {
        ...previousValue,
        background: {}
      };
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(
      Wrapper,
      {
        resetAllFilter,
        value,
        onChange,
        panelId,
        headerLabel,
        children: showBackgroundImageControl && /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(
          import_components210.__experimentalToolsPanelItem,
          {
            hasValue: () => !!value?.background,
            label: (0, import_i18n196.__)("Image"),
            onDeselect: resetBackground,
            isShownByDefault: defaultControls.backgroundImage,
            panelId,
            children: /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(
              BackgroundImagePanel,
              {
                value,
                onChange,
                settings: settings2,
                inheritedValue,
                defaultControls,
                defaultValues
              }
            )
          }
        )
      }
    );
  }

  // packages/block-editor/build-module/hooks/border.mjs
  var import_i18n197 = __toESM(require_i18n(), 1);
  var import_jsx_runtime373 = __toESM(require_jsx_runtime(), 1);
  var BORDER_SUPPORT_KEY2 = "__experimentalBorder";
  var SHADOW_SUPPORT_KEY = "shadow";
  var getColorByProperty = (colors2, property, value) => {
    let matchedColor;
    colors2.some(
      (origin) => origin.colors.some((color) => {
        if (color[property] === value) {
          matchedColor = color;
          return true;
        }
        return false;
      })
    );
    return matchedColor;
  };
  var getMultiOriginColor = ({ colors: colors2, namedColor, customColor }) => {
    if (namedColor) {
      const colorObject2 = getColorByProperty(colors2, "slug", namedColor);
      if (colorObject2) {
        return colorObject2;
      }
    }
    if (!customColor) {
      return { color: void 0 };
    }
    const colorObject = getColorByProperty(colors2, "color", customColor);
    return colorObject ? colorObject : { color: customColor };
  };
  function getColorSlugFromVariable(value) {
    const namedColor = /var:preset\|color\|(.+)/.exec(value);
    if (namedColor && namedColor[1]) {
      return namedColor[1];
    }
    return null;
  }
  function styleToAttributes(style) {
    if ((0, import_components211.__experimentalHasSplitBorders)(style?.border)) {
      return {
        style,
        borderColor: void 0
      };
    }
    const borderColorValue = style?.border?.color;
    const borderColorSlug = borderColorValue?.startsWith("var:preset|color|") ? borderColorValue.substring("var:preset|color|".length) : void 0;
    const updatedStyle = { ...style };
    updatedStyle.border = {
      ...updatedStyle.border,
      color: borderColorSlug ? void 0 : borderColorValue
    };
    return {
      style: cleanEmptyObject(updatedStyle),
      borderColor: borderColorSlug
    };
  }
  function attributesToStyle(attributes) {
    if ((0, import_components211.__experimentalHasSplitBorders)(attributes.style?.border)) {
      return attributes.style;
    }
    return {
      ...attributes.style,
      border: {
        ...attributes.style?.border,
        color: attributes.borderColor ? "var:preset|color|" + attributes.borderColor : attributes.style?.border?.color
      }
    };
  }
  function BordersInspectorControl({ label, children, resetAllFilter }) {
    const attributesResetAllFilter = (0, import_element208.useCallback)(
      (attributes) => {
        const existingStyle = attributesToStyle(attributes);
        const updatedStyle = resetAllFilter(existingStyle);
        return {
          ...attributes,
          ...styleToAttributes(updatedStyle)
        };
      },
      [resetAllFilter]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime373.jsx)(
      inspector_controls_default,
      {
        group: "border",
        resetAllFilter: attributesResetAllFilter,
        label,
        children
      }
    );
  }
  function BorderPanel2({ clientId, name, setAttributes, settings: settings2 }) {
    const isEnabled = useHasBorderPanel(settings2);
    const { style, borderColor } = (0, import_data162.useSelect)(
      (select3) => {
        if (!isEnabled) {
          return {};
        }
        const { style: _style, borderColor: _borderColor } = select3(store).getBlockAttributes(clientId) || {};
        return { style: _style, borderColor: _borderColor };
      },
      [clientId, isEnabled]
    );
    const value = (0, import_element208.useMemo)(() => {
      return attributesToStyle({ style, borderColor });
    }, [style, borderColor]);
    const onChange = (newStyle) => {
      setAttributes(styleToAttributes(newStyle));
    };
    if (!isEnabled) {
      return null;
    }
    const defaultControls = {
      ...(0, import_blocks90.getBlockSupport)(name, [
        BORDER_SUPPORT_KEY2,
        "__experimentalDefaultControls"
      ]),
      ...(0, import_blocks90.getBlockSupport)(name, [
        SHADOW_SUPPORT_KEY,
        "__experimentalDefaultControls"
      ])
    };
    return /* @__PURE__ */ (0, import_jsx_runtime373.jsx)(
      BorderPanel,
      {
        as: BordersInspectorControl,
        panelId: clientId,
        settings: settings2,
        value,
        onChange,
        defaultControls
      }
    );
  }
  function hasBorderSupport2(blockName, feature = "any") {
    if (import_element208.Platform.OS !== "web") {
      return false;
    }
    const support = (0, import_blocks90.getBlockSupport)(blockName, BORDER_SUPPORT_KEY2);
    if (support === true) {
      return true;
    }
    if (feature === "any") {
      return !!(support?.color || support?.radius || support?.width || support?.style);
    }
    return !!support?.[feature];
  }
  function useBorderPanelLabel({
    blockName,
    hasBorderControl,
    hasShadowControl
  } = {}) {
    const settings2 = useBlockSettings(blockName);
    const controls = useHasBorderPanelControls(settings2);
    if (!hasBorderControl && !hasShadowControl && blockName) {
      hasBorderControl = controls?.hasBorderColor || controls?.hasBorderStyle || controls?.hasBorderWidth || controls?.hasBorderRadius;
      hasShadowControl = controls?.hasShadow;
    }
    if (hasBorderControl && hasShadowControl) {
      return (0, import_i18n197.__)("Border & Shadow");
    }
    if (hasShadowControl) {
      return (0, import_i18n197.__)("Shadow");
    }
    return (0, import_i18n197.__)("Border");
  }
  function addAttributes(settings2) {
    if (!hasBorderSupport2(settings2, "color")) {
      return settings2;
    }
    if (settings2.attributes.borderColor) {
      return settings2;
    }
    return {
      ...settings2,
      attributes: {
        ...settings2.attributes,
        borderColor: {
          type: "string"
        }
      }
    };
  }
  function addSaveProps(props, blockNameOrType, attributes) {
    if (!hasBorderSupport2(blockNameOrType, "color") || shouldSkipSerialization(blockNameOrType, BORDER_SUPPORT_KEY2, "color")) {
      return props;
    }
    const borderClasses = getBorderClasses(attributes);
    const newClassName = clsx_default(props.className, borderClasses);
    props.className = newClassName ? newClassName : void 0;
    return props;
  }
  function getBorderClasses(attributes) {
    const { borderColor, style } = attributes;
    const borderColorClass = getColorClassName("border-color", borderColor);
    return clsx_default({
      "has-border-color": borderColor || style?.border?.color,
      [borderColorClass]: !!borderColorClass
    });
  }
  function useBlockProps4({ name, borderColor, style }) {
    const { colors: colors2 } = useMultipleOriginColorsAndGradients();
    if (!hasBorderSupport2(name, "color") || shouldSkipSerialization(name, BORDER_SUPPORT_KEY2, "color")) {
      return {};
    }
    const { color: borderColorValue } = getMultiOriginColor({
      colors: colors2,
      namedColor: borderColor
    });
    const { color: borderTopColor } = getMultiOriginColor({
      colors: colors2,
      namedColor: getColorSlugFromVariable(style?.border?.top?.color)
    });
    const { color: borderRightColor } = getMultiOriginColor({
      colors: colors2,
      namedColor: getColorSlugFromVariable(style?.border?.right?.color)
    });
    const { color: borderBottomColor } = getMultiOriginColor({
      colors: colors2,
      namedColor: getColorSlugFromVariable(style?.border?.bottom?.color)
    });
    const { color: borderLeftColor } = getMultiOriginColor({
      colors: colors2,
      namedColor: getColorSlugFromVariable(style?.border?.left?.color)
    });
    const extraStyles = {
      borderTopColor: borderTopColor || borderColorValue,
      borderRightColor: borderRightColor || borderColorValue,
      borderBottomColor: borderBottomColor || borderColorValue,
      borderLeftColor: borderLeftColor || borderColorValue
    };
    return addSaveProps(
      { style: cleanEmptyObject(extraStyles) || {} },
      name,
      { borderColor, style }
    );
  }
  var border_default = {
    useBlockProps: useBlockProps4,
    addSaveProps,
    attributeKeys: ["borderColor", "style"],
    hasSupport(name) {
      return hasBorderSupport2(name, "color");
    }
  };
  (0, import_hooks11.addFilter)(
    "blocks.registerBlockType",
    "core/border/addAttributes",
    addAttributes
  );

  // packages/block-editor/build-module/hooks/color.mjs
  var import_hooks12 = __toESM(require_hooks(), 1);
  var import_blocks93 = __toESM(require_blocks(), 1);
  var import_element211 = __toESM(require_element(), 1);
  var import_data165 = __toESM(require_data(), 1);

  // packages/block-editor/build-module/hooks/background.mjs
  var import_blocks91 = __toESM(require_blocks(), 1);
  var import_data163 = __toESM(require_data(), 1);
  var import_element209 = __toESM(require_element(), 1);
  var import_jsx_runtime374 = __toESM(require_jsx_runtime(), 1);
  var BACKGROUND_SUPPORT_KEY = "background";
  var BACKGROUND_BLOCK_DEFAULT_VALUES2 = {
    backgroundSize: "cover",
    backgroundPosition: "50% 50%"
    // used only when backgroundSize is 'contain'.
  };
  function hasBackgroundSupport(blockName, feature = "any") {
    const support = (0, import_blocks91.getBlockSupport)(blockName, BACKGROUND_SUPPORT_KEY);
    if (support === true) {
      return true;
    }
    if (feature === "any") {
      return !!support?.backgroundImage || !!support?.backgroundSize || !!support?.backgroundRepeat;
    }
    return !!support?.[feature];
  }
  function setBackgroundStyleDefaults2(backgroundStyle) {
    if (!backgroundStyle || !backgroundStyle?.backgroundImage?.url) {
      return;
    }
    let backgroundStylesWithDefaults;
    if (!backgroundStyle?.backgroundSize) {
      backgroundStylesWithDefaults = {
        backgroundSize: BACKGROUND_BLOCK_DEFAULT_VALUES2.backgroundSize
      };
    }
    if ("contain" === backgroundStyle?.backgroundSize && !backgroundStyle?.backgroundPosition) {
      backgroundStylesWithDefaults = {
        backgroundPosition: BACKGROUND_BLOCK_DEFAULT_VALUES2.backgroundPosition
      };
    }
    return backgroundStylesWithDefaults;
  }
  function useBlockProps5({ name, style }) {
    if (!hasBackgroundSupport(name) || !style?.background?.backgroundImage) {
      return;
    }
    const backgroundStyles = setBackgroundStyleDefaults2(style?.background);
    if (!backgroundStyles) {
      return;
    }
    return {
      style: {
        ...backgroundStyles
      }
    };
  }
  function getBackgroundImageClasses(style) {
    return hasBackgroundImageValue(style) ? "has-background" : "";
  }
  function BackgroundInspectorControl({ children }) {
    const resetAllFilter = (0, import_element209.useCallback)((attributes) => {
      return {
        ...attributes,
        style: {
          ...attributes.style,
          background: void 0
        }
      };
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime374.jsx)(inspector_controls_default, { group: "background", resetAllFilter, children });
  }
  function BackgroundImagePanel3({
    clientId,
    name,
    setAttributes,
    settings: settings2
  }) {
    const { style, inheritedValue } = (0, import_data163.useSelect)(
      (select3) => {
        const { getBlockAttributes: getBlockAttributes3, getSettings: getSettings7 } = select3(store);
        const _settings = getSettings7();
        return {
          style: getBlockAttributes3(clientId)?.style,
          /*
           * To ensure we pass down the right inherited values:
           * @TODO 1. Pass inherited value down to all block style controls,
           *   See: packages/block-editor/src/hooks/style.js
           * @TODO 2. Add support for block style variations,
           *   See implementation: packages/block-editor/src/hooks/block-style-variation.js
           */
          inheritedValue: _settings[globalStylesDataKey]?.blocks?.[name]
        };
      },
      [clientId, name]
    );
    if (!useHasBackgroundPanel(settings2) || !hasBackgroundSupport(name, "backgroundImage")) {
      return null;
    }
    const onChange = (newStyle) => {
      setAttributes({
        style: cleanEmptyObject(newStyle)
      });
    };
    const updatedSettings = {
      ...settings2,
      background: {
        ...settings2.background,
        backgroundSize: settings2?.background?.backgroundSize && hasBackgroundSupport(name, "backgroundSize")
      }
    };
    const defaultControls = (0, import_blocks91.getBlockSupport)(name, [
      BACKGROUND_SUPPORT_KEY,
      "defaultControls"
    ]);
    return /* @__PURE__ */ (0, import_jsx_runtime374.jsx)(
      BackgroundImagePanel2,
      {
        inheritedValue,
        as: BackgroundInspectorControl,
        panelId: clientId,
        defaultValues: BACKGROUND_BLOCK_DEFAULT_VALUES2,
        settings: updatedSettings,
        onChange,
        defaultControls,
        value: style
      }
    );
  }
  var background_default = {
    useBlockProps: useBlockProps5,
    attributeKeys: ["style"],
    hasSupport: hasBackgroundSupport
  };

  // packages/block-editor/build-module/hooks/contrast-checker.mjs
  var import_element210 = __toESM(require_element(), 1);
  var import_data164 = __toESM(require_data(), 1);
  var import_blocks92 = __toESM(require_blocks(), 1);
  var import_jsx_runtime375 = __toESM(require_jsx_runtime(), 1);
  function getComputedValue(node, property) {
    return node.ownerDocument.defaultView.getComputedStyle(node).getPropertyValue(property);
  }
  function getBlockElementColors(blockEl, blockType) {
    if (!blockEl || !blockType) {
      return {};
    }
    const textSelector = getBlockSelector(blockType, "color.text", {
      fallback: true
    });
    const backgroundSelector = getBlockSelector(
      blockType,
      "color.background",
      { fallback: true }
    );
    const textElement = blockEl.querySelector(textSelector) || blockEl;
    const backgroundElement = blockEl.querySelector(backgroundSelector) || blockEl;
    const linkElement = blockEl.querySelector("a");
    const textColor = getComputedValue(textElement, "color");
    const linkColor = linkElement && linkElement.textContent ? getComputedValue(linkElement, "color") : void 0;
    let backgroundColorNode = backgroundElement;
    let backgroundColor = getComputedValue(
      backgroundColorNode,
      "background-color"
    );
    while (backgroundColor === "rgba(0, 0, 0, 0)" && backgroundColorNode.parentNode && backgroundColorNode.parentNode.nodeType === backgroundColorNode.parentNode.ELEMENT_NODE) {
      backgroundColorNode = backgroundColorNode.parentNode;
      backgroundColor = getComputedValue(
        backgroundColorNode,
        "background-color"
      );
    }
    return {
      textColor,
      backgroundColor,
      linkColor
    };
  }
  function reducer2(prevColors, newColors) {
    const hasChanged = Object.keys(newColors).some(
      (key) => prevColors[key] !== newColors[key]
    );
    return hasChanged ? newColors : prevColors;
  }
  function BlockColorContrastChecker({ clientId, name }) {
    const blockEl = useBlockElement(clientId);
    const [colors2, setColors] = (0, import_element210.useReducer)(reducer2, {});
    const blockType = (0, import_data164.useSelect)(
      (select3) => {
        return name ? select3(import_blocks92.store).getBlockType(name) : void 0;
      },
      [name]
    );
    (0, import_element210.useLayoutEffect)(() => {
      if (!blockEl || !blockType) {
        return;
      }
      window.requestAnimationFrame(
        () => window.requestAnimationFrame(
          () => setColors(getBlockElementColors(blockEl, blockType))
        )
      );
    });
    (0, import_element210.useLayoutEffect)(() => {
      if (!blockEl || !blockType) {
        return;
      }
      const observer = new window.MutationObserver(() => {
        setColors(getBlockElementColors(blockEl, blockType));
      });
      observer.observe(blockEl, {
        attributes: true,
        attributeFilter: ["class", "style"]
      });
      return () => {
        observer.disconnect();
      };
    }, [blockEl, blockType]);
    return /* @__PURE__ */ (0, import_jsx_runtime375.jsx)(
      contrast_checker_default,
      {
        backgroundColor: colors2.backgroundColor,
        textColor: colors2.textColor,
        linkColor: colors2.linkColor,
        enableAlphaChecker: true
      }
    );
  }

  // packages/block-editor/build-module/hooks/color.mjs
  var import_jsx_runtime376 = __toESM(require_jsx_runtime(), 1);
  var COLOR_SUPPORT_KEY2 = "color";
  var hasColorSupport = (blockNameOrType) => {
    const colorSupport = (0, import_blocks93.getBlockSupport)(blockNameOrType, COLOR_SUPPORT_KEY2);
    return colorSupport && (colorSupport.link === true || colorSupport.gradient === true || colorSupport.background !== false || colorSupport.text !== false);
  };
  var hasLinkColorSupport = (blockType) => {
    if (import_element211.Platform.OS !== "web") {
      return false;
    }
    const colorSupport = (0, import_blocks93.getBlockSupport)(blockType, COLOR_SUPPORT_KEY2);
    return colorSupport !== null && typeof colorSupport === "object" && !!colorSupport.link;
  };
  var hasGradientSupport2 = (blockNameOrType) => {
    const colorSupport = (0, import_blocks93.getBlockSupport)(blockNameOrType, COLOR_SUPPORT_KEY2);
    return colorSupport !== null && typeof colorSupport === "object" && !!colorSupport.gradients;
  };
  var hasBackgroundColorSupport2 = (blockType) => {
    const colorSupport = (0, import_blocks93.getBlockSupport)(blockType, COLOR_SUPPORT_KEY2);
    return colorSupport && colorSupport.background !== false;
  };
  var hasTextColorSupport2 = (blockType) => {
    const colorSupport = (0, import_blocks93.getBlockSupport)(blockType, COLOR_SUPPORT_KEY2);
    return colorSupport && colorSupport.text !== false;
  };
  function addAttributes2(settings2) {
    if (!hasColorSupport(settings2)) {
      return settings2;
    }
    if (!settings2.attributes.backgroundColor) {
      Object.assign(settings2.attributes, {
        backgroundColor: {
          type: "string"
        }
      });
    }
    if (!settings2.attributes.textColor) {
      Object.assign(settings2.attributes, {
        textColor: {
          type: "string"
        }
      });
    }
    if (hasGradientSupport2(settings2) && !settings2.attributes.gradient) {
      Object.assign(settings2.attributes, {
        gradient: {
          type: "string"
        }
      });
    }
    return settings2;
  }
  function addSaveProps2(props, blockNameOrType, attributes) {
    if (!hasColorSupport(blockNameOrType) || shouldSkipSerialization(blockNameOrType, COLOR_SUPPORT_KEY2)) {
      return props;
    }
    const hasGradient = hasGradientSupport2(blockNameOrType);
    const { backgroundColor, textColor, gradient, style } = attributes;
    const shouldSerialize = (feature) => !shouldSkipSerialization(
      blockNameOrType,
      COLOR_SUPPORT_KEY2,
      feature
    );
    const textClass = shouldSerialize("text") ? getColorClassName("color", textColor) : void 0;
    const gradientClass = shouldSerialize("gradients") ? __experimentalGetGradientClass(gradient) : void 0;
    const backgroundClass = shouldSerialize("background") ? getColorClassName("background-color", backgroundColor) : void 0;
    const serializeHasBackground = shouldSerialize("background") || shouldSerialize("gradients");
    const hasBackground = backgroundColor || style?.color?.background || hasGradient && (gradient || style?.color?.gradient);
    const newClassName = clsx_default(props.className, textClass, gradientClass, {
      // Don't apply the background class if there's a custom gradient.
      [backgroundClass]: (!hasGradient || !style?.color?.gradient) && !!backgroundClass,
      "has-text-color": shouldSerialize("text") && (textColor || style?.color?.text),
      "has-background": serializeHasBackground && hasBackground,
      "has-link-color": shouldSerialize("link") && style?.elements?.link?.color
    });
    props.className = newClassName ? newClassName : void 0;
    return props;
  }
  function styleToAttributes2(style) {
    const textColorValue = style?.color?.text;
    const textColorSlug = textColorValue?.startsWith("var:preset|color|") ? textColorValue.substring("var:preset|color|".length) : void 0;
    const backgroundColorValue = style?.color?.background;
    const backgroundColorSlug = backgroundColorValue?.startsWith(
      "var:preset|color|"
    ) ? backgroundColorValue.substring("var:preset|color|".length) : void 0;
    const gradientValue = style?.color?.gradient;
    const gradientSlug = gradientValue?.startsWith("var:preset|gradient|") ? gradientValue.substring("var:preset|gradient|".length) : void 0;
    const updatedStyle = { ...style };
    updatedStyle.color = {
      ...updatedStyle.color,
      text: textColorSlug ? void 0 : textColorValue,
      background: backgroundColorSlug ? void 0 : backgroundColorValue,
      gradient: gradientSlug ? void 0 : gradientValue
    };
    return {
      style: cleanEmptyObject(updatedStyle),
      textColor: textColorSlug,
      backgroundColor: backgroundColorSlug,
      gradient: gradientSlug
    };
  }
  function attributesToStyle2(attributes) {
    return {
      ...attributes.style,
      color: {
        ...attributes.style?.color,
        text: attributes.textColor ? "var:preset|color|" + attributes.textColor : attributes.style?.color?.text,
        background: attributes.backgroundColor ? "var:preset|color|" + attributes.backgroundColor : attributes.style?.color?.background,
        gradient: attributes.gradient ? "var:preset|gradient|" + attributes.gradient : attributes.style?.color?.gradient
      }
    };
  }
  function ColorInspectorControl({ children, resetAllFilter }) {
    const attributesResetAllFilter = (0, import_element211.useCallback)(
      (attributes) => {
        const existingStyle = attributesToStyle2(attributes);
        const updatedStyle = resetAllFilter(existingStyle);
        return {
          ...attributes,
          ...styleToAttributes2(updatedStyle)
        };
      },
      [resetAllFilter]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(
      inspector_controls_default,
      {
        group: "color",
        resetAllFilter: attributesResetAllFilter,
        children
      }
    );
  }
  function ColorEdit({
    clientId,
    name,
    setAttributes,
    settings: settings2,
    asWrapper,
    label,
    defaultControls
  }) {
    const isEnabled = useHasColorPanel(settings2);
    const { style, textColor, backgroundColor, gradient } = (0, import_data165.useSelect)(
      (select3) => {
        if (!isEnabled) {
          return {};
        }
        const {
          style: _style,
          textColor: _textColor,
          backgroundColor: _backgroundColor,
          gradient: _gradient
        } = select3(store).getBlockAttributes(clientId) || {};
        return {
          style: _style,
          textColor: _textColor,
          backgroundColor: _backgroundColor,
          gradient: _gradient
        };
      },
      [clientId, isEnabled]
    );
    const value = (0, import_element211.useMemo)(() => {
      return attributesToStyle2({
        style,
        textColor,
        backgroundColor,
        gradient
      });
    }, [style, textColor, backgroundColor, gradient]);
    const onChange = (newStyle) => {
      setAttributes(styleToAttributes2(newStyle));
    };
    if (!isEnabled) {
      return null;
    }
    defaultControls = defaultControls ? defaultControls : (0, import_blocks93.getBlockSupport)(name, [
      COLOR_SUPPORT_KEY2,
      "__experimentalDefaultControls"
    ]);
    const enableContrastChecking = import_element211.Platform.OS === "web" && !value?.color?.gradient && (settings2?.color?.text || settings2?.color?.link) && // Contrast checking is enabled by default.
    // Deactivating it requires `enableContrastChecker` to have
    // an explicit value of `false`.
    false !== (0, import_blocks93.getBlockSupport)(name, [
      COLOR_SUPPORT_KEY2,
      "enableContrastChecker"
    ]);
    const Wrapper = asWrapper || ColorInspectorControl;
    return /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(
      ColorPanel,
      {
        as: Wrapper,
        panelId: clientId,
        settings: settings2,
        value,
        onChange,
        defaultControls,
        label,
        enableContrastChecker: false !== (0, import_blocks93.getBlockSupport)(name, [
          COLOR_SUPPORT_KEY2,
          "enableContrastChecker"
        ]),
        children: enableContrastChecking && /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(
          BlockColorContrastChecker,
          {
            clientId,
            name
          }
        )
      }
    );
  }
  function useBlockProps6({
    name,
    backgroundColor,
    textColor,
    gradient,
    style
  }) {
    const [userPalette, themePalette, defaultPalette] = useSettings(
      "color.palette.custom",
      "color.palette.theme",
      "color.palette.default"
    );
    const colors2 = (0, import_element211.useMemo)(
      () => [
        ...userPalette || [],
        ...themePalette || [],
        ...defaultPalette || []
      ],
      [userPalette, themePalette, defaultPalette]
    );
    if (!hasColorSupport(name) || shouldSkipSerialization(name, COLOR_SUPPORT_KEY2)) {
      return {};
    }
    const extraStyles = {};
    if (textColor && !shouldSkipSerialization(name, COLOR_SUPPORT_KEY2, "text")) {
      extraStyles.color = getColorObjectByAttributeValues(
        colors2,
        textColor
      )?.color;
    }
    if (backgroundColor && !shouldSkipSerialization(name, COLOR_SUPPORT_KEY2, "background")) {
      extraStyles.backgroundColor = getColorObjectByAttributeValues(
        colors2,
        backgroundColor
      )?.color;
    }
    const saveProps = addSaveProps2({ style: extraStyles }, name, {
      textColor,
      backgroundColor,
      gradient,
      style
    });
    const hasBackgroundValue = backgroundColor || style?.color?.background || gradient || style?.color?.gradient;
    return {
      ...saveProps,
      className: clsx_default(
        saveProps.className,
        // Add background image classes in the editor, if not already handled by background color values.
        !hasBackgroundValue && getBackgroundImageClasses(style)
      )
    };
  }
  var color_default = {
    useBlockProps: useBlockProps6,
    addSaveProps: addSaveProps2,
    attributeKeys: ["backgroundColor", "textColor", "gradient", "style"],
    hasSupport: hasColorSupport
  };
  var MIGRATION_PATHS = {
    linkColor: [["style", "elements", "link", "color", "text"]],
    textColor: [["textColor"], ["style", "color", "text"]],
    backgroundColor: [
      ["backgroundColor"],
      ["style", "color", "background"]
    ],
    gradient: [["gradient"], ["style", "color", "gradient"]]
  };
  function addTransforms(result, source, index, results) {
    const destinationBlockType = result.name;
    const activeSupports = {
      linkColor: hasLinkColorSupport(destinationBlockType),
      textColor: hasTextColorSupport2(destinationBlockType),
      backgroundColor: hasBackgroundColorSupport2(destinationBlockType),
      gradient: hasGradientSupport2(destinationBlockType)
    };
    return transformStyles2(
      activeSupports,
      MIGRATION_PATHS,
      result,
      source,
      index,
      results
    );
  }
  (0, import_hooks12.addFilter)(
    "blocks.registerBlockType",
    "core/color/addAttribute",
    addAttributes2
  );
  (0, import_hooks12.addFilter)(
    "blocks.switchToBlockType.transformedBlock",
    "core/color/addTransforms",
    addTransforms
  );

  // packages/block-editor/build-module/components/inspector-controls-tabs/styles-tab.mjs
  var import_jsx_runtime377 = __toESM(require_jsx_runtime(), 1);
  function SectionBlockColorControls({
    blockName,
    clientId,
    contentClientIds
  }) {
    const settings2 = useBlockSettings(blockName);
    const { updateBlockAttributes: updateBlockAttributes2 } = (0, import_data166.useDispatch)(store);
    const { hasButtons, hasHeading } = (0, import_data166.useSelect)(
      (select3) => {
        const blockNames = select3(store).getBlockNamesByClientId(
          contentClientIds
        );
        return {
          hasButtons: blockNames.includes("core/buttons"),
          hasHeading: blockNames.includes("core/heading")
        };
      },
      [contentClientIds]
    );
    const setAttributes = (newAttributes) => {
      updateBlockAttributes2(clientId, newAttributes);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime377.jsx)(
      ColorEdit,
      {
        clientId,
        name: blockName,
        settings: settings2,
        setAttributes,
        asWrapper: ColorToolsPanel,
        label: (0, import_i18n198.__)("Color"),
        defaultControls: {
          text: true,
          background: true,
          button: hasButtons,
          heading: hasHeading
        }
      }
    );
  }
  var StylesTab = ({
    blockName,
    clientId,
    hasBlockStyles,
    isSectionBlock: isSectionBlock2,
    contentClientIds
  }) => {
    const borderPanelLabel = useBorderPanelLabel({ blockName });
    return /* @__PURE__ */ (0, import_jsx_runtime377.jsxs)(import_jsx_runtime377.Fragment, { children: [
      hasBlockStyles && /* @__PURE__ */ (0, import_jsx_runtime377.jsx)(block_styles_default, { clientId }),
      isSectionBlock2 && /* @__PURE__ */ (0, import_jsx_runtime377.jsx)(
        SectionBlockColorControls,
        {
          blockName,
          clientId,
          contentClientIds
        }
      ),
      !isSectionBlock2 && /* @__PURE__ */ (0, import_jsx_runtime377.jsxs)(import_jsx_runtime377.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime377.jsx)(
          inspector_controls_default.Slot,
          {
            group: "color",
            label: (0, import_i18n198.__)("Color"),
            className: "color-block-support-panel__inner-wrapper"
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime377.jsx)(
          inspector_controls_default.Slot,
          {
            group: "background",
            label: (0, import_i18n198.__)("Background image")
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime377.jsx)(inspector_controls_default.Slot, { group: "filter" }),
        /* @__PURE__ */ (0, import_jsx_runtime377.jsx)(
          inspector_controls_default.Slot,
          {
            group: "typography",
            label: (0, import_i18n198.__)("Typography")
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime377.jsx)(
          inspector_controls_default.Slot,
          {
            group: "dimensions",
            label: (0, import_i18n198.__)("Dimensions")
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime377.jsx)(
          inspector_controls_default.Slot,
          {
            group: "border",
            label: borderPanelLabel
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime377.jsx)(inspector_controls_default.Slot, { group: "styles" })
      ] })
    ] });
  };
  var styles_tab_default = StylesTab;

  // packages/block-editor/build-module/components/inspector-controls-tabs/content-tab.mjs
  var import_components213 = __toESM(require_components(), 1);
  var import_i18n199 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/components/block-quick-navigation/index.mjs
  var import_blocks94 = __toESM(require_blocks(), 1);
  var import_data167 = __toESM(require_data(), 1);
  var import_components212 = __toESM(require_components(), 1);
  var import_jsx_runtime378 = __toESM(require_jsx_runtime(), 1);
  function BlockQuickNavigation({
    clientIds,
    onSelect,
    onSwitchToListView,
    hasListViewTab
  }) {
    if (!clientIds.length) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime378.jsx)(import_components212.__experimentalVStack, { spacing: 1, children: clientIds.map((clientId) => /* @__PURE__ */ (0, import_jsx_runtime378.jsx)(
      BlockQuickNavigationItem,
      {
        onSelect,
        onSwitchToListView,
        hasListViewTab,
        clientId
      },
      clientId
    )) });
  }
  function BlockQuickNavigationItem({
    clientId,
    onSelect,
    onSwitchToListView,
    hasListViewTab
  }) {
    const blockInformation = useBlockDisplayInformation(clientId);
    const { isSelected, childBlocks, hasListViewSupport: hasListViewSupport2, blockName } = (0, import_data167.useSelect)(
      (select3) => {
        const {
          isBlockSelected: isBlockSelected2,
          hasSelectedInnerBlock: hasSelectedInnerBlock2,
          getBlockOrder: getBlockOrder2,
          getBlockName: getBlockName2
        } = select3(store);
        const _blockName = getBlockName2(clientId);
        return {
          isSelected: isBlockSelected2(clientId) || hasSelectedInnerBlock2(
            clientId,
            /* deep: */
            true
          ),
          childBlocks: getBlockOrder2(clientId),
          hasListViewSupport: _blockName === "core/navigation" || (0, import_blocks94.hasBlockSupport)(_blockName, "listView"),
          blockName: _blockName
        };
      },
      [clientId]
    );
    const blockType = (0, import_blocks94.getBlockType)(blockName);
    const blockTitle = blockType?.title || blockName;
    const { selectBlock: selectBlock2 } = (0, import_data167.useDispatch)(store);
    const hasChildren = childBlocks && childBlocks.length > 0;
    const canNavigateToListView = hasChildren && hasListViewTab && hasListViewSupport2;
    return /* @__PURE__ */ (0, import_jsx_runtime378.jsx)(
      import_components212.Button,
      {
        __next40pxDefaultSize: true,
        className: "block-editor-block-quick-navigation__item",
        isPressed: isSelected,
        onClick: async () => {
          await selectBlock2(clientId);
          if (canNavigateToListView && onSwitchToListView) {
            onSwitchToListView(clientId);
          }
          if (onSelect) {
            onSelect(clientId);
          }
        },
        children: /* @__PURE__ */ (0, import_jsx_runtime378.jsxs)(import_components212.Flex, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime378.jsx)(import_components212.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime378.jsx)(block_icon_default, { icon: blockInformation?.icon }) }),
          /* @__PURE__ */ (0, import_jsx_runtime378.jsx)(import_components212.FlexBlock, { style: { textAlign: "left" }, children: /* @__PURE__ */ (0, import_jsx_runtime378.jsx)(import_components212.__experimentalTruncate, { children: blockTitle }) }),
          canNavigateToListView && /* @__PURE__ */ (0, import_jsx_runtime378.jsx)(import_components212.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime378.jsx)(icon_default, { icon: chevron_right_default, size: 24 }) })
        ] })
      }
    );
  }

  // packages/block-editor/build-module/components/inspector-controls-tabs/content-tab.mjs
  var import_jsx_runtime379 = __toESM(require_jsx_runtime(), 1);
  var ContentTab = ({
    contentClientIds,
    onSwitchToListView,
    hasListViewTab
  }) => {
    if (!contentClientIds || contentClientIds.length === 0) {
      return null;
    }
    const shouldShowBlockFields = window?.__experimentalContentOnlyInspectorFields;
    return /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(import_jsx_runtime379.Fragment, { children: !shouldShowBlockFields && /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(import_components213.PanelBody, { title: (0, import_i18n199.__)("Content"), children: /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(
      BlockQuickNavigation,
      {
        clientIds: contentClientIds,
        onSwitchToListView,
        hasListViewTab
      }
    ) }) });
  };
  var content_tab_default = ContentTab;

  // packages/block-editor/build-module/components/inspector-controls-tabs/index.mjs
  var import_jsx_runtime380 = __toESM(require_jsx_runtime(), 1);
  var { Tabs: Tabs5 } = unlock(import_components214.privateApis);
  function InspectorControlsTabs({
    blockName,
    clientId,
    hasBlockStyles,
    tabs,
    isSectionBlock: isSectionBlock2,
    contentClientIds
  }) {
    const listViewRef = (0, import_element212.useRef)(null);
    const showIconLabels = (0, import_data168.useSelect)((select3) => {
      return select3(import_preferences5.store).get("core", "showIconLabels");
    }, []);
    const { requestedTab } = (0, import_data168.useSelect)((select3) => ({
      requestedTab: unlock(
        select3(store)
      ).getRequestedInspectorTab()
    }));
    const [selectedTabId, setSelectedTabId] = (0, import_element212.useState)(
      () => requestedTab?.tabName ?? tabs[0]?.name
    );
    const hasUserSelectionRef = (0, import_element212.useRef)(false);
    const isProgrammaticSwitchRef = (0, import_element212.useRef)(false);
    const {
      __unstableSetOpenListViewPanel: setOpenListViewPanel,
      __unstableIncrementListViewExpandRevision: incrementListViewExpandRevision,
      __unstableSetAllListViewPanelsOpen: setAllListViewPanelsOpen
    } = (0, import_data168.useDispatch)(store);
    const { clearRequestedInspectorTab: clearRequestedInspectorTab2 } = unlock(
      (0, import_data168.useDispatch)(store)
    );
    (0, import_element212.useEffect)(() => {
      hasUserSelectionRef.current = false;
    }, [clientId]);
    (0, import_element212.useEffect)(() => {
      if (!requestedTab) {
        return;
      }
      setSelectedTabId(requestedTab.tabName);
      if (requestedTab.tabName === TAB_LIST_VIEW.name && requestedTab.options?.openPanel) {
        setOpenListViewPanel(requestedTab.options.openPanel);
        incrementListViewExpandRevision();
      }
      isProgrammaticSwitchRef.current = true;
      hasUserSelectionRef.current = true;
      clearRequestedInspectorTab2();
    }, [
      requestedTab,
      setOpenListViewPanel,
      incrementListViewExpandRevision,
      clearRequestedInspectorTab2
    ]);
    (0, import_element212.useEffect)(() => {
      if (selectedTabId === TAB_LIST_VIEW.name && !hasUserSelectionRef.current) {
        setAllListViewPanelsOpen();
        incrementListViewExpandRevision();
      }
    }, [
      clientId,
      selectedTabId,
      setAllListViewPanelsOpen,
      incrementListViewExpandRevision
    ]);
    (0, import_element212.useEffect)(() => {
      if (!tabs?.length || hasUserSelectionRef.current && tabs.some((tab) => tab.name === selectedTabId)) {
        return;
      }
      const firstTabName = tabs[0]?.name;
      if (selectedTabId !== firstTabName) {
        setSelectedTabId(firstTabName);
      }
    }, [tabs, selectedTabId]);
    const handleTabSelect = (tabId) => {
      setSelectedTabId(tabId);
      hasUserSelectionRef.current = true;
      if (tabId === TAB_LIST_VIEW.name && !isProgrammaticSwitchRef.current) {
        setAllListViewPanelsOpen();
        incrementListViewExpandRevision();
      }
      isProgrammaticSwitchRef.current = false;
    };
    const hasListViewTab = tabs.some(
      (tab) => tab.name === TAB_LIST_VIEW.name
    );
    const switchToListView = (targetClientId) => {
      if (hasListViewTab) {
        setOpenListViewPanel(targetClientId);
        incrementListViewExpandRevision();
        isProgrammaticSwitchRef.current = true;
        handleTabSelect(TAB_LIST_VIEW.name);
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime380.jsx)("div", { className: "block-editor-block-inspector__tabs", children: /* @__PURE__ */ (0, import_jsx_runtime380.jsxs)(
      Tabs5,
      {
        selectedTabId,
        onSelect: handleTabSelect,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(Tabs5.TabList, { children: tabs.map(
            (tab) => showIconLabels ? /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(Tabs5.Tab, { tabId: tab.name, children: tab.title }, tab.name) : /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(import_components214.Tooltip, { text: tab.title, children: /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(
              Tabs5.Tab,
              {
                tabId: tab.name,
                "aria-label": tab.title,
                children: /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(import_components214.Icon, { icon: tab.icon })
              }
            ) }, tab.name)
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime380.jsxs)(Tabs5.TabPanel, { tabId: TAB_CONTENT.name, focusable: false, children: [
            /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(
              content_tab_default,
              {
                contentClientIds,
                onSwitchToListView: switchToListView,
                hasListViewTab
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(inspector_controls_default.Slot, { group: "content" })
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime380.jsxs)(Tabs5.TabPanel, { tabId: TAB_LIST_VIEW.name, focusable: false, children: [
            /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(inspector_controls_default.Slot, { group: "list", ref: listViewRef }),
            /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(ListViewContentPopover, { listViewRef })
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(Tabs5.TabPanel, { tabId: TAB_SETTINGS.name, focusable: false, children: /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(settings_tab_default, { showAdvancedControls: !!blockName }) }),
          /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(Tabs5.TabPanel, { tabId: TAB_STYLES.name, focusable: false, children: /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(
            styles_tab_default,
            {
              blockName,
              clientId,
              hasBlockStyles,
              isSectionBlock: isSectionBlock2,
              contentClientIds
            }
          ) })
        ]
      },
      clientId
    ) });
  }

  // packages/block-editor/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.mjs
  var import_components215 = __toESM(require_components(), 1);
  var import_data169 = __toESM(require_data(), 1);
  var EMPTY_ARRAY14 = [];
  function getShowTabs(blockName, tabSettings = {}) {
    if (tabSettings[blockName] !== void 0) {
      return tabSettings[blockName];
    }
    if (tabSettings.default !== void 0) {
      return tabSettings.default;
    }
    return true;
  }
  function useInspectorControlsTabs(blockName, contentClientIds, isSectionBlock2, hasBlockStyles) {
    const tabs = [];
    const {
      bindings: bindingsGroup,
      border: borderGroup,
      color: colorGroup,
      content: contentGroup,
      default: defaultGroup,
      dimensions: dimensionsGroup,
      list: listGroup,
      position: positionGroup,
      styles: stylesGroup,
      typography: typographyGroup,
      effects: effectsGroup
    } = groups_default;
    const listFills = (0, import_components215.__experimentalUseSlotFills)(listGroup.name);
    const hasListFills = !!listFills && listFills.length;
    const contentFills = (0, import_components215.__experimentalUseSlotFills)(contentGroup.name);
    const hasContentFills = !!contentFills && contentFills.length;
    const styleFills = [
      ...(0, import_components215.__experimentalUseSlotFills)(borderGroup.name) || [],
      ...(0, import_components215.__experimentalUseSlotFills)(colorGroup.name) || [],
      ...(0, import_components215.__experimentalUseSlotFills)(dimensionsGroup.name) || [],
      ...(0, import_components215.__experimentalUseSlotFills)(stylesGroup.name) || [],
      ...(0, import_components215.__experimentalUseSlotFills)(typographyGroup.name) || [],
      ...(0, import_components215.__experimentalUseSlotFills)(effectsGroup.name) || []
    ];
    const hasStyleFills = styleFills.length;
    const advancedFills = [
      ...(0, import_components215.__experimentalUseSlotFills)(InspectorAdvancedControls.slotName) || [],
      ...(0, import_components215.__experimentalUseSlotFills)(bindingsGroup.name) || []
    ];
    const settingsFills = [
      ...(0, import_components215.__experimentalUseSlotFills)(defaultGroup.name) || [],
      ...(0, import_components215.__experimentalUseSlotFills)(positionGroup.name) || [],
      ...hasListFills && hasStyleFills > 1 ? advancedFills : []
    ];
    const shouldShowBlockFields = window?.__experimentalContentOnlyInspectorFields;
    const hasContentTab = hasContentFills || !shouldShowBlockFields && contentClientIds?.length;
    if (hasContentTab) {
      tabs.push(TAB_CONTENT);
    }
    if (hasListFills) {
      tabs.push(TAB_LIST_VIEW);
    }
    if (settingsFills.length || // Advanced fills show up in settings tab if available or they blend into the default tab, if there's only one tab.
    advancedFills.length && (hasContentTab || hasListFills)) {
      tabs.push(TAB_SETTINGS);
    }
    const { tabSettings, isPreviewMode } = (0, import_data169.useSelect)((select3) => {
      const settings2 = select3(store).getSettings();
      return {
        tabSettings: settings2.blockInspectorTabs,
        isPreviewMode: settings2.isPreviewMode
      };
    }, []);
    if (!isPreviewMode && (hasBlockStyles || hasStyleFills)) {
      tabs.push(TAB_STYLES);
    }
    const showTabs = getShowTabs(blockName, tabSettings);
    return showTabs ? tabs : EMPTY_ARRAY14;
  }

  // packages/block-editor/build-module/components/inspector-controls/last-item.mjs
  var import_components216 = __toESM(require_components(), 1);
  var import_jsx_runtime381 = __toESM(require_jsx_runtime(), 1);
  var { Fill: Fill4, Slot: Slot9 } = (0, import_components216.createSlotFill)(/* @__PURE__ */ Symbol("InspectorControlsLastItem"));
  var InspectorControlsLastItem = (props) => {
    const context = useBlockEditContext();
    if (!context[mayDisplayControlsKey]) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime381.jsx)(Fill4, { ...props });
  };
  InspectorControlsLastItem.Slot = function InspectorControlsLastItemSlot(props) {
    return /* @__PURE__ */ (0, import_jsx_runtime381.jsx)(Slot9, { ...props });
  };
  var last_item_default = InspectorControlsLastItem;

  // packages/block-editor/build-module/components/block-inspector/useBlockInspectorAnimationSettings.mjs
  var import_data170 = __toESM(require_data(), 1);
  function useBlockInspectorAnimationSettings(blockType) {
    return (0, import_data170.useSelect)(
      (select3) => {
        if (blockType) {
          const globalBlockInspectorAnimationSettings = select3(store).getSettings().blockInspectorAnimation;
          const animationParent = globalBlockInspectorAnimationSettings?.animationParent;
          const { getSelectedBlockClientId: getSelectedBlockClientId2, getBlockParentsByBlockName: getBlockParentsByBlockName2 } = select3(store);
          const _selectedBlockClientId = getSelectedBlockClientId2();
          const animationParentBlockClientId = getBlockParentsByBlockName2(
            _selectedBlockClientId,
            animationParent,
            true
          )[0];
          if (!animationParentBlockClientId && blockType.name !== animationParent) {
            return null;
          }
          return globalBlockInspectorAnimationSettings?.[blockType.name];
        }
        return null;
      },
      [blockType]
    );
  }

  // packages/block-editor/build-module/components/block-inspector/index.mjs
  var import_jsx_runtime382 = __toESM(require_jsx_runtime(), 1);
  function StyleInspectorSlots({
    blockName,
    showAdvancedControls = true,
    showPositionControls = true,
    showBindingsControls = true
  }) {
    const borderPanelLabel = useBorderPanelLabel({ blockName });
    return /* @__PURE__ */ (0, import_jsx_runtime382.jsxs)(import_jsx_runtime382.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(inspector_controls_default.Slot, {}),
      /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(
        inspector_controls_default.Slot,
        {
          group: "color",
          label: (0, import_i18n200.__)("Color"),
          className: "color-block-support-panel__inner-wrapper"
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(
        inspector_controls_default.Slot,
        {
          group: "background",
          label: (0, import_i18n200.__)("Background image")
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(
        inspector_controls_default.Slot,
        {
          group: "typography",
          label: (0, import_i18n200.__)("Typography")
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(
        inspector_controls_default.Slot,
        {
          group: "dimensions",
          label: (0, import_i18n200.__)("Dimensions")
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(inspector_controls_default.Slot, { group: "border", label: borderPanelLabel }),
      /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(inspector_controls_default.Slot, { group: "styles" }),
      showPositionControls && /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(position_controls_panel_default, {}),
      showBindingsControls && /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(inspector_controls_default.Slot, { group: "bindings" }),
      showAdvancedControls && /* @__PURE__ */ (0, import_jsx_runtime382.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(advanced_controls_panel_default, {}) })
    ] });
  }
  function BlockInspector() {
    const {
      selectedBlockCount,
      renderedBlockName,
      renderedBlockClientId,
      blockType,
      isSectionBlock: isSectionBlock2,
      isSectionBlockInSelection,
      hasBlockStyles,
      editedContentOnlySection: editedContentOnlySection2
    } = (0, import_data171.useSelect)((select3) => {
      const {
        getSelectedBlockClientId: getSelectedBlockClientId2,
        getSelectedBlockClientIds: getSelectedBlockClientIds2,
        getSelectedBlockCount: getSelectedBlockCount2,
        getBlockName: getBlockName2,
        getParentSectionBlock: getParentSectionBlock2,
        isSectionBlock: _isSectionBlock,
        getEditedContentOnlySection: getEditedContentOnlySection2,
        isWithinEditedContentOnlySection: isWithinEditedContentOnlySection2
      } = unlock(select3(store));
      const { getBlockStyles: getBlockStyles2 } = select3(import_blocks95.store);
      const _selectedBlockClientId = getSelectedBlockClientId2();
      const isWithinEditedSection = isWithinEditedContentOnlySection2(
        _selectedBlockClientId
      );
      const _renderedBlockClientId = isWithinEditedSection ? _selectedBlockClientId : getParentSectionBlock2(_selectedBlockClientId) || _selectedBlockClientId;
      const _renderedBlockName = _renderedBlockClientId && getBlockName2(_renderedBlockClientId);
      const _blockType = _renderedBlockName && (0, import_blocks95.getBlockType)(_renderedBlockName);
      const selectedBlockClientIds = getSelectedBlockClientIds2();
      const _isSectionBlockInSelection = selectedBlockClientIds.some(
        (id) => _isSectionBlock(id)
      );
      const blockStyles = _renderedBlockName && getBlockStyles2(_renderedBlockName);
      const _hasBlockStyles = blockStyles && blockStyles.length > 0;
      return {
        selectedBlockCount: getSelectedBlockCount2(),
        renderedBlockClientId: _renderedBlockClientId,
        renderedBlockName: _renderedBlockName,
        blockType: _blockType,
        isSectionBlockInSelection: _isSectionBlockInSelection,
        isSectionBlock: _isSectionBlock(_renderedBlockClientId),
        hasBlockStyles: _hasBlockStyles,
        editedContentOnlySection: getEditedContentOnlySection2()
      };
    }, []);
    const contentClientIds = (0, import_data171.useSelect)(
      (select3) => {
        if (!isSectionBlock2 || !renderedBlockClientId) {
          return [];
        }
        const {
          getClientIdsOfDescendants: getClientIdsOfDescendants2,
          getBlockName: getBlockName2,
          getBlockEditingMode: getBlockEditingMode2
        } = unlock(select3(store));
        const descendants = getClientIdsOfDescendants2(
          renderedBlockClientId
        );
        const listViewDescendants = /* @__PURE__ */ new Set();
        descendants.forEach((clientId) => {
          const blockName = getBlockName2(clientId);
          if (blockName === "core/navigation" || (0, import_blocks95.hasBlockSupport)(blockName, "listView")) {
            const listViewChildren = getClientIdsOfDescendants2(clientId);
            listViewChildren.forEach(
              (childId) => listViewDescendants.add(childId)
            );
          }
        });
        return descendants.filter((current) => {
          return !listViewDescendants.has(current) && getBlockEditingMode2(current) === "contentOnly";
        });
      },
      [isSectionBlock2, renderedBlockClientId]
    );
    const availableTabs = useInspectorControlsTabs(
      blockType?.name,
      contentClientIds,
      isSectionBlock2,
      hasBlockStyles
    );
    const hasMultipleTabs = availableTabs?.length > 1;
    const blockInspectorAnimationSettings = useBlockInspectorAnimationSettings(blockType);
    const hasSelectedBlocks = selectedBlockCount > 1;
    if (hasSelectedBlocks && !isSectionBlockInSelection) {
      return /* @__PURE__ */ (0, import_jsx_runtime382.jsxs)("div", { className: "block-editor-block-inspector", children: [
        /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(MultiSelectionInspector, {}),
        hasMultipleTabs ? /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(InspectorControlsTabs, { tabs: availableTabs }) : /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(
          StyleInspectorSlots,
          {
            blockName: renderedBlockName,
            showAdvancedControls: false,
            showPositionControls: false,
            showBindingsControls: false
          }
        )
      ] });
    }
    if (hasSelectedBlocks && isSectionBlockInSelection) {
      return /* @__PURE__ */ (0, import_jsx_runtime382.jsx)("div", { className: "block-editor-block-inspector", children: /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(MultiSelectionInspector, {}) });
    }
    const isRenderedBlockUnregistered = renderedBlockName === (0, import_blocks95.getUnregisteredTypeHandlerName)();
    const shouldShowWarning = !blockType || !renderedBlockClientId || isRenderedBlockUnregistered;
    if (shouldShowWarning) {
      return /* @__PURE__ */ (0, import_jsx_runtime382.jsx)("span", { className: "block-editor-block-inspector__no-blocks", children: (0, import_i18n200.__)("No block selected.") });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(
      BlockInspectorSingleBlockWrapper,
      {
        animate: blockInspectorAnimationSettings,
        wrapper: (children) => /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(
          AnimatedContainer,
          {
            blockInspectorAnimationSettings,
            renderedBlockClientId,
            children
          }
        ),
        children: /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(
          BlockInspectorSingleBlock,
          {
            renderedBlockClientId,
            blockName: blockType.name,
            isSectionBlock: isSectionBlock2,
            availableTabs,
            contentClientIds,
            hasBlockStyles,
            editedContentOnlySection: editedContentOnlySection2
          }
        )
      }
    );
  }
  var BlockInspectorSingleBlockWrapper = ({ animate, wrapper, children }) => {
    return animate ? wrapper(children) : children;
  };
  var AnimatedContainer = ({
    blockInspectorAnimationSettings,
    renderedBlockClientId,
    children
  }) => {
    const animationOrigin = blockInspectorAnimationSettings && blockInspectorAnimationSettings.enterDirection === "leftToRight" ? -50 : 50;
    return /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(
      import_components217.__unstableMotion.div,
      {
        animate: {
          x: 0,
          opacity: 1,
          transition: {
            ease: "easeInOut",
            duration: 0.14
          }
        },
        initial: {
          x: animationOrigin,
          opacity: 0
        },
        children
      },
      renderedBlockClientId
    );
  };
  var BlockInspectorSingleBlock = ({
    // The block that is displayed in the inspector. This is the block whose
    // controls and information are shown to the user.
    renderedBlockClientId,
    blockName,
    isSectionBlock: isSectionBlock2,
    availableTabs,
    contentClientIds,
    hasBlockStyles,
    editedContentOnlySection: editedContentOnlySection2
  }) => {
    const listViewRef = (0, import_element213.useRef)(null);
    const hasMultipleTabs = availableTabs?.length > 1;
    const hasParentChildBlockCards = editedContentOnlySection2 && editedContentOnlySection2 !== renderedBlockClientId;
    const parentBlockInformation = useBlockDisplayInformation(
      editedContentOnlySection2
    );
    const blockInformation = useBlockDisplayInformation(
      renderedBlockClientId
    );
    const isBlockSynced = blockInformation.isSynced;
    return /* @__PURE__ */ (0, import_jsx_runtime382.jsxs)("div", { className: "block-editor-block-inspector", children: [
      hasParentChildBlockCards && /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(
        block_card_default,
        {
          ...parentBlockInformation,
          className: parentBlockInformation?.isSynced && "is-synced",
          parentClientId: editedContentOnlySection2
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(
        block_card_default,
        {
          ...blockInformation,
          allowParentNavigation: true,
          className: isBlockSynced && "is-synced",
          isChild: hasParentChildBlockCards,
          clientId: renderedBlockClientId
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(ViewportVisibilityInfo, { clientId: renderedBlockClientId }),
      /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(EditContents, { clientId: renderedBlockClientId }),
      /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(block_variation_transforms_default, { blockClientId: renderedBlockClientId }),
      hasMultipleTabs && /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(import_jsx_runtime382.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(
        InspectorControlsTabs,
        {
          hasBlockStyles,
          clientId: renderedBlockClientId,
          blockName,
          tabs: availableTabs,
          isSectionBlock: isSectionBlock2,
          contentClientIds
        }
      ) }),
      !hasMultipleTabs && /* @__PURE__ */ (0, import_jsx_runtime382.jsxs)(import_jsx_runtime382.Fragment, { children: [
        hasBlockStyles && /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(block_styles_default, { clientId: renderedBlockClientId }),
        /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(content_tab_default, { contentClientIds }),
        /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(inspector_controls_default.Slot, { group: "content" }),
        /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(inspector_controls_default.Slot, { group: "list", ref: listViewRef }),
        /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(ListViewContentPopover, { listViewRef }),
        !isSectionBlock2 && /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(StyleInspectorSlots, { blockName })
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(last_item_default.Slot, {}),
      /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(SkipToSelectedBlock, {}, "back")
    ] });
  };
  var block_inspector_default = BlockInspector;

  // packages/block-editor/build-module/components/copy-handler/index.mjs
  var import_deprecated32 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime383 = __toESM(require_jsx_runtime(), 1);
  var __unstableUseClipboardHandler = () => {
    (0, import_deprecated32.default)("__unstableUseClipboardHandler", {
      alternative: "BlockCanvas or WritingFlow",
      since: "6.4",
      version: "6.7"
    });
    return useClipboardHandler();
  };
  function CopyHandler(props) {
    (0, import_deprecated32.default)("CopyHandler", {
      alternative: "BlockCanvas or WritingFlow",
      since: "6.4",
      version: "6.7"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime383.jsx)("div", { ...props, ref: useClipboardHandler() });
  }

  // packages/block-editor/build-module/components/inserter/library.mjs
  var import_data172 = __toESM(require_data(), 1);
  var import_element214 = __toESM(require_element(), 1);
  var import_jsx_runtime384 = __toESM(require_jsx_runtime(), 1);
  var noop19 = () => {
  };
  function InserterLibrary({
    rootClientId,
    clientId,
    isAppender,
    showInserterHelpPanel,
    showMostUsedBlocks = false,
    __experimentalInsertionIndex,
    __experimentalInitialTab,
    __experimentalInitialCategory,
    __experimentalFilterValue,
    onPatternCategorySelection,
    onSelect = noop19,
    shouldFocusBlock = false,
    onClose
  }, ref) {
    const { destinationRootClientId } = (0, import_data172.useSelect)(
      (select3) => {
        const { getBlockRootClientId: getBlockRootClientId2 } = select3(store);
        const _rootClientId = rootClientId || getBlockRootClientId2(clientId) || void 0;
        return {
          destinationRootClientId: _rootClientId
        };
      },
      [clientId, rootClientId]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime384.jsx)(
      PrivateInserterMenu,
      {
        onSelect,
        rootClientId: destinationRootClientId,
        clientId,
        isAppender,
        showInserterHelpPanel,
        showMostUsedBlocks,
        __experimentalInsertionIndex,
        __experimentalFilterValue,
        onPatternCategorySelection,
        __experimentalInitialTab,
        __experimentalInitialCategory,
        shouldFocusBlock,
        ref,
        onClose
      }
    );
  }
  var PrivateInserterLibrary = (0, import_element214.forwardRef)(InserterLibrary);
  function PublicInserterLibrary(props, ref) {
    return /* @__PURE__ */ (0, import_jsx_runtime384.jsx)(
      PrivateInserterLibrary,
      {
        ...props,
        onPatternCategorySelection: void 0,
        ref
      }
    );
  }
  var library_default = (0, import_element214.forwardRef)(PublicInserterLibrary);

  // packages/block-editor/build-module/components/selection-scroll-into-view/index.mjs
  var import_deprecated33 = __toESM(require_deprecated(), 1);
  function MultiSelectScrollIntoView() {
    (0, import_deprecated33.default)("wp.blockEditor.MultiSelectScrollIntoView", {
      hint: "This behaviour is now built-in.",
      since: "5.8"
    });
    return null;
  }

  // packages/block-editor/build-module/components/typewriter/index.mjs
  var import_compose91 = __toESM(require_compose(), 1);
  var import_dom40 = __toESM(require_dom(), 1);
  var import_data173 = __toESM(require_data(), 1);
  var import_keycodes27 = __toESM(require_keycodes(), 1);
  var import_jsx_runtime385 = __toESM(require_jsx_runtime(), 1);
  var isIE = window.navigator.userAgent.indexOf("Trident") !== -1;
  var arrowKeyCodes = /* @__PURE__ */ new Set([import_keycodes27.UP, import_keycodes27.DOWN, import_keycodes27.LEFT, import_keycodes27.RIGHT]);
  var initialTriggerPercentage = 0.75;
  function useTypewriter() {
    const hasSelectedBlock2 = (0, import_data173.useSelect)(
      (select3) => select3(store).hasSelectedBlock(),
      []
    );
    return (0, import_compose91.useRefEffect)(
      (node) => {
        if (!hasSelectedBlock2) {
          return;
        }
        const { ownerDocument } = node;
        const { defaultView } = ownerDocument;
        let scrollResizeRafId;
        let onKeyDownRafId;
        let caretRect;
        function onScrollResize() {
          if (scrollResizeRafId) {
            return;
          }
          scrollResizeRafId = defaultView.requestAnimationFrame(() => {
            computeCaretRectangle();
            scrollResizeRafId = null;
          });
        }
        function onKeyDown(event) {
          if (onKeyDownRafId) {
            defaultView.cancelAnimationFrame(onKeyDownRafId);
          }
          onKeyDownRafId = defaultView.requestAnimationFrame(() => {
            maintainCaretPosition(event);
            onKeyDownRafId = null;
          });
        }
        function maintainCaretPosition({ keyCode }) {
          if (!isSelectionEligibleForScroll()) {
            return;
          }
          const currentCaretRect = (0, import_dom40.computeCaretRect)(defaultView);
          if (!currentCaretRect) {
            return;
          }
          if (!caretRect) {
            caretRect = currentCaretRect;
            return;
          }
          if (arrowKeyCodes.has(keyCode)) {
            caretRect = currentCaretRect;
            return;
          }
          const diff = currentCaretRect.top - caretRect.top;
          if (diff === 0) {
            return;
          }
          const scrollContainer = (0, import_dom40.getScrollContainer)(node);
          if (!scrollContainer) {
            return;
          }
          const windowScroll = scrollContainer === ownerDocument.body || scrollContainer === ownerDocument.documentElement;
          const scrollY = windowScroll ? defaultView.scrollY : scrollContainer.scrollTop;
          const scrollContainerY = windowScroll ? 0 : scrollContainer.getBoundingClientRect().top;
          const relativeScrollPosition = windowScroll ? caretRect.top / defaultView.innerHeight : (caretRect.top - scrollContainerY) / (defaultView.innerHeight - scrollContainerY);
          if (scrollY === 0 && relativeScrollPosition < initialTriggerPercentage && isLastEditableNode()) {
            caretRect = currentCaretRect;
            return;
          }
          const scrollContainerHeight = windowScroll ? defaultView.innerHeight : scrollContainer.clientHeight;
          if (
            // The caret is under the lower fold.
            caretRect.top + caretRect.height > scrollContainerY + scrollContainerHeight || // The caret is above the upper fold.
            caretRect.top < scrollContainerY
          ) {
            caretRect = currentCaretRect;
            return;
          }
          if (windowScroll) {
            defaultView.scrollBy(0, diff);
          } else {
            scrollContainer.scrollTop += diff;
          }
        }
        function addSelectionChangeListener() {
          ownerDocument.addEventListener(
            "selectionchange",
            computeCaretRectOnSelectionChange
          );
        }
        function computeCaretRectOnSelectionChange() {
          ownerDocument.removeEventListener(
            "selectionchange",
            computeCaretRectOnSelectionChange
          );
          computeCaretRectangle();
        }
        function computeCaretRectangle() {
          if (isSelectionEligibleForScroll()) {
            caretRect = (0, import_dom40.computeCaretRect)(defaultView);
          }
        }
        function isSelectionEligibleForScroll() {
          return node.contains(ownerDocument.activeElement) && ownerDocument.activeElement.isContentEditable;
        }
        function isLastEditableNode() {
          const editableNodes = node.querySelectorAll(
            '[contenteditable="true"]'
          );
          const lastEditableNode = editableNodes[editableNodes.length - 1];
          return lastEditableNode === ownerDocument.activeElement;
        }
        defaultView.addEventListener("scroll", onScrollResize, true);
        defaultView.addEventListener("resize", onScrollResize, true);
        node.addEventListener("keydown", onKeyDown);
        node.addEventListener("keyup", maintainCaretPosition);
        node.addEventListener("mousedown", addSelectionChangeListener);
        node.addEventListener("touchstart", addSelectionChangeListener);
        return () => {
          defaultView.removeEventListener(
            "scroll",
            onScrollResize,
            true
          );
          defaultView.removeEventListener(
            "resize",
            onScrollResize,
            true
          );
          node.removeEventListener("keydown", onKeyDown);
          node.removeEventListener("keyup", maintainCaretPosition);
          node.removeEventListener(
            "mousedown",
            addSelectionChangeListener
          );
          node.removeEventListener(
            "touchstart",
            addSelectionChangeListener
          );
          ownerDocument.removeEventListener(
            "selectionchange",
            computeCaretRectOnSelectionChange
          );
          defaultView.cancelAnimationFrame(scrollResizeRafId);
          defaultView.cancelAnimationFrame(onKeyDownRafId);
        };
      },
      [hasSelectedBlock2]
    );
  }
  function Typewriter({ children }) {
    return /* @__PURE__ */ (0, import_jsx_runtime385.jsx)("div", { ref: useTypewriter(), className: "block-editor__typewriter", children });
  }
  var TypewriterOrIEBypass = isIE ? (props) => props.children : Typewriter;
  var typewriter_default = TypewriterOrIEBypass;

  // packages/block-editor/build-module/components/recursion-provider/index.mjs
  var import_element215 = __toESM(require_element(), 1);
  var import_deprecated34 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime386 = __toESM(require_jsx_runtime(), 1);
  var RenderedRefsContext = (0, import_element215.createContext)({});
  RenderedRefsContext.displayName = "RenderedRefsContext";
  function addToBlockType(renderedBlocks, blockName, uniqueId2) {
    const result = {
      ...renderedBlocks,
      [blockName]: renderedBlocks[blockName] ? new Set(renderedBlocks[blockName]) : /* @__PURE__ */ new Set()
    };
    result[blockName].add(uniqueId2);
    return result;
  }
  function RecursionProvider({ children, uniqueId: uniqueId2, blockName = "" }) {
    const previouslyRenderedBlocks = (0, import_element215.useContext)(RenderedRefsContext);
    const { name } = useBlockEditContext();
    blockName = blockName || name;
    const newRenderedBlocks = (0, import_element215.useMemo)(
      () => addToBlockType(previouslyRenderedBlocks, blockName, uniqueId2),
      [previouslyRenderedBlocks, blockName, uniqueId2]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime386.jsx)(RenderedRefsContext.Provider, { value: newRenderedBlocks, children });
  }
  function useHasRecursion(uniqueId2, blockName = "") {
    const previouslyRenderedBlocks = (0, import_element215.useContext)(RenderedRefsContext);
    const { name } = useBlockEditContext();
    blockName = blockName || name;
    return Boolean(previouslyRenderedBlocks[blockName]?.has(uniqueId2));
  }
  var DeprecatedExperimentalRecursionProvider = (props) => {
    (0, import_deprecated34.default)("wp.blockEditor.__experimentalRecursionProvider", {
      since: "6.5",
      alternative: "wp.blockEditor.RecursionProvider"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime386.jsx)(RecursionProvider, { ...props });
  };
  var DeprecatedExperimentalUseHasRecursion = (...args) => {
    (0, import_deprecated34.default)("wp.blockEditor.__experimentalUseHasRecursion", {
      since: "6.5",
      alternative: "wp.blockEditor.useHasRecursion"
    });
    return useHasRecursion(...args);
  };

  // packages/block-editor/build-module/components/publish-date-time-picker/index.mjs
  var import_components219 = __toESM(require_components(), 1);
  var import_i18n202 = __toESM(require_i18n(), 1);
  var import_element216 = __toESM(require_element(), 1);
  var import_date2 = __toESM(require_date(), 1);

  // packages/block-editor/build-module/components/inspector-popover-header/index.mjs
  var import_components218 = __toESM(require_components(), 1);
  var import_i18n201 = __toESM(require_i18n(), 1);
  var import_jsx_runtime387 = __toESM(require_jsx_runtime(), 1);
  function InspectorPopoverHeader({
    title,
    help,
    actions = [],
    onClose
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime387.jsxs)(import_components218.__experimentalVStack, { className: "block-editor-inspector-popover-header", spacing: 4, children: [
      /* @__PURE__ */ (0, import_jsx_runtime387.jsxs)(import_components218.__experimentalHStack, { alignment: "center", children: [
        /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
          import_components218.__experimentalHeading,
          {
            className: "block-editor-inspector-popover-header__heading",
            level: 2,
            size: 13,
            children: title
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(import_components218.__experimentalSpacer, {}),
        actions.map(({ label, icon, onClick }) => /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
          import_components218.Button,
          {
            size: "small",
            className: "block-editor-inspector-popover-header__action",
            label,
            icon,
            variant: !icon && "tertiary",
            onClick,
            children: !icon && label
          },
          label
        )),
        onClose && /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
          import_components218.Button,
          {
            size: "small",
            className: "block-editor-inspector-popover-header__action",
            label: (0, import_i18n201.__)("Close"),
            icon: close_small_default,
            onClick: onClose
          }
        )
      ] }),
      help && /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(import_components218.__experimentalText, { children: help })
    ] });
  }

  // packages/block-editor/build-module/components/publish-date-time-picker/index.mjs
  var import_jsx_runtime388 = __toESM(require_jsx_runtime(), 1);
  function PublishDateTimePicker({
    onClose,
    onChange,
    showPopoverHeaderActions,
    isCompact,
    currentDate,
    title,
    ...additionalProps
  }, ref) {
    const datePickerProps = {
      startOfWeek: (0, import_date2.getSettings)().l10n.startOfWeek,
      onChange,
      currentDate: isCompact ? void 0 : currentDate,
      currentTime: isCompact ? currentDate : void 0,
      ...additionalProps
    };
    const DatePickerComponent = isCompact ? import_components219.TimePicker : import_components219.DateTimePicker;
    return /* @__PURE__ */ (0, import_jsx_runtime388.jsxs)("div", { ref, className: "block-editor-publish-date-time-picker", children: [
      /* @__PURE__ */ (0, import_jsx_runtime388.jsx)(
        InspectorPopoverHeader,
        {
          title: title || (0, import_i18n202.__)("Publish"),
          actions: showPopoverHeaderActions ? [
            {
              label: (0, import_i18n202.__)("Now"),
              onClick: () => onChange?.(null)
            }
          ] : void 0,
          onClose
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime388.jsx)(DatePickerComponent, { ...datePickerProps })
    ] });
  }
  var PrivatePublishDateTimePicker = (0, import_element216.forwardRef)(PublishDateTimePicker);
  function PublicPublishDateTimePicker(props, ref) {
    return /* @__PURE__ */ (0, import_jsx_runtime388.jsx)(
      PrivatePublishDateTimePicker,
      {
        ...props,
        showPopoverHeaderActions: true,
        isCompact: false,
        ref
      }
    );
  }
  var publish_date_time_picker_default = (0, import_element216.forwardRef)(PublicPublishDateTimePicker);

  // packages/block-editor/build-module/components/block-editing-mode/index.mjs
  var import_data174 = __toESM(require_data(), 1);
  var import_element217 = __toESM(require_element(), 1);
  function useBlockEditingMode(mode2) {
    const context = useBlockEditContext();
    const { clientId = "" } = context;
    const { setBlockEditingMode: setBlockEditingMode2, unsetBlockEditingMode: unsetBlockEditingMode2 } = (0, import_data174.useDispatch)(store);
    const globalBlockEditingMode = (0, import_data174.useSelect)(
      (select3) => (
        // Avoid adding the subscription if not needed!
        clientId ? null : select3(store).getBlockEditingMode()
      ),
      [clientId]
    );
    (0, import_element217.useEffect)(() => {
      if (mode2) {
        setBlockEditingMode2(clientId, mode2);
      }
      return () => {
        if (mode2) {
          unsetBlockEditingMode2(clientId);
        }
      };
    }, [clientId, mode2, setBlockEditingMode2, unsetBlockEditingMode2]);
    return clientId ? context[blockEditingModeKey] : globalBlockEditingMode;
  }

  // packages/block-editor/build-module/components/tool-selector/index.mjs
  var import_deprecated35 = __toESM(require_deprecated(), 1);
  var import_element218 = __toESM(require_element(), 1);
  function ToolSelector() {
    (0, import_deprecated35.default)("wp.blockEditor.ToolSelector", {
      since: "6.9",
      hint: "The ToolSelector component no longer renders anything."
    });
    return null;
  }
  var tool_selector_default = (0, import_element218.forwardRef)(ToolSelector);

  // packages/block-editor/build-module/hooks/utils.mjs
  var import_jsx_runtime389 = __toESM(require_jsx_runtime(), 1);
  var cleanEmptyObject = (object) => {
    if (object === null || typeof object !== "object" || Array.isArray(object)) {
      return object;
    }
    const cleanedNestedObjects = Object.entries(object).map(([key, value]) => [key, cleanEmptyObject(value)]).filter(([, value]) => value !== void 0);
    return !cleanedNestedObjects.length ? void 0 : Object.fromEntries(cleanedNestedObjects);
  };
  function transformStyles2(activeSupports, migrationPaths, result, source, index, results) {
    if (Object.values(activeSupports ?? {}).every(
      (isActive) => !isActive
    )) {
      return result;
    }
    if (results.length === 1 && result.innerBlocks.length === source.length) {
      return result;
    }
    let referenceBlockAttributes = source[0]?.attributes;
    if (results.length > 1 && source.length > 1) {
      if (source[index]) {
        referenceBlockAttributes = source[index]?.attributes;
      } else {
        return result;
      }
    }
    let returnBlock = result;
    Object.entries(activeSupports).forEach(([support, isActive]) => {
      if (isActive) {
        migrationPaths[support].forEach((path) => {
          const styleValue = getValueFromObjectPath(
            referenceBlockAttributes,
            path
          );
          if (styleValue) {
            returnBlock = {
              ...returnBlock,
              attributes: setImmutably(
                returnBlock.attributes,
                path,
                styleValue
              )
            };
          }
        });
      }
    });
    return returnBlock;
  }
  function shouldSkipSerialization(blockNameOrType, featureSet, feature) {
    const support = (0, import_blocks96.getBlockSupport)(blockNameOrType, featureSet);
    const skipSerialization = support?.__experimentalSkipSerialization;
    if (Array.isArray(skipSerialization)) {
      return skipSerialization.includes(feature);
    }
    return skipSerialization;
  }
  var pendingStyleOverrides = /* @__PURE__ */ new WeakMap();
  function useStyleOverride({ id, css }) {
    return usePrivateStyleOverride({ id, css });
  }
  function usePrivateStyleOverride({
    id,
    css,
    assets,
    __unstableType,
    variation,
    clientId
  } = {}) {
    const { setStyleOverride: setStyleOverride2, deleteStyleOverride: deleteStyleOverride2 } = unlock(
      (0, import_data175.useDispatch)(store)
    );
    const registry = (0, import_data175.useRegistry)();
    const fallbackId = (0, import_element219.useId)();
    (0, import_element219.useEffect)(() => {
      if (!css && !assets) {
        return;
      }
      const _id = id || fallbackId;
      const override = {
        id,
        css,
        assets,
        __unstableType,
        variation,
        clientId
      };
      if (!pendingStyleOverrides.get(registry)) {
        pendingStyleOverrides.set(registry, []);
      }
      pendingStyleOverrides.get(registry).push([_id, override]);
      window.queueMicrotask(() => {
        if (pendingStyleOverrides.get(registry)?.length) {
          registry.batch(() => {
            pendingStyleOverrides.get(registry).forEach((args) => {
              setStyleOverride2(...args);
            });
            pendingStyleOverrides.set(registry, []);
          });
        }
      });
      return () => {
        const isPending = pendingStyleOverrides.get(registry)?.find(([currentId]) => currentId === _id);
        if (isPending) {
          pendingStyleOverrides.set(
            registry,
            pendingStyleOverrides.get(registry).filter(([currentId]) => currentId !== _id)
          );
        } else {
          deleteStyleOverride2(_id);
        }
      };
    }, [
      id,
      css,
      clientId,
      assets,
      __unstableType,
      fallbackId,
      setStyleOverride2,
      deleteStyleOverride2,
      registry,
      variation
    ]);
  }
  function useBlockSettings(name, parentLayout) {
    const [
      backgroundImage,
      backgroundSize,
      customFontFamilies,
      defaultFontFamilies,
      themeFontFamilies,
      defaultFontSizesEnabled,
      customFontSizes,
      defaultFontSizes,
      themeFontSizes,
      customFontSize,
      fontStyle,
      fontWeight,
      lineHeight,
      textAlign,
      textColumns,
      textDecoration,
      textIndent,
      writingMode,
      textTransform,
      letterSpacing,
      padding,
      margin,
      blockGap,
      defaultSpacingSizesEnabled,
      customSpacingSize,
      userSpacingSizes,
      defaultSpacingSizes,
      themeSpacingSizes,
      units2,
      aspectRatio,
      height,
      minHeight,
      width,
      dimensionSizes,
      layout,
      borderColor,
      borderRadius,
      borderStyle,
      borderWidth,
      borderRadiusSizes,
      customColorsEnabled,
      customColors,
      customDuotone,
      themeColors,
      defaultColors,
      defaultPalette,
      defaultDuotone,
      userDuotonePalette,
      themeDuotonePalette,
      defaultDuotonePalette,
      userGradientPalette,
      themeGradientPalette,
      defaultGradientPalette,
      defaultGradients,
      areCustomGradientsEnabled,
      isBackgroundEnabled,
      isLinkEnabled,
      isTextEnabled,
      isHeadingEnabled,
      isButtonEnabled,
      shadow
    ] = useSettings(
      "background.backgroundImage",
      "background.backgroundSize",
      "typography.fontFamilies.custom",
      "typography.fontFamilies.default",
      "typography.fontFamilies.theme",
      "typography.defaultFontSizes",
      "typography.fontSizes.custom",
      "typography.fontSizes.default",
      "typography.fontSizes.theme",
      "typography.customFontSize",
      "typography.fontStyle",
      "typography.fontWeight",
      "typography.lineHeight",
      "typography.textAlign",
      "typography.textColumns",
      "typography.textDecoration",
      "typography.textIndent",
      "typography.writingMode",
      "typography.textTransform",
      "typography.letterSpacing",
      "spacing.padding",
      "spacing.margin",
      "spacing.blockGap",
      "spacing.defaultSpacingSizes",
      "spacing.customSpacingSize",
      "spacing.spacingSizes.custom",
      "spacing.spacingSizes.default",
      "spacing.spacingSizes.theme",
      "spacing.units",
      "dimensions.aspectRatio",
      "dimensions.height",
      "dimensions.minHeight",
      "dimensions.width",
      "dimensions.dimensionSizes",
      "layout",
      "border.color",
      "border.radius",
      "border.style",
      "border.width",
      "border.radiusSizes",
      "color.custom",
      "color.palette.custom",
      "color.customDuotone",
      "color.palette.theme",
      "color.palette.default",
      "color.defaultPalette",
      "color.defaultDuotone",
      "color.duotone.custom",
      "color.duotone.theme",
      "color.duotone.default",
      "color.gradients.custom",
      "color.gradients.theme",
      "color.gradients.default",
      "color.defaultGradients",
      "color.customGradient",
      "color.background",
      "color.link",
      "color.text",
      "color.heading",
      "color.button",
      "shadow"
    );
    const rawSettings = (0, import_element219.useMemo)(() => {
      return {
        background: {
          backgroundImage,
          backgroundSize
        },
        color: {
          palette: {
            custom: customColors,
            theme: themeColors,
            default: defaultColors
          },
          gradients: {
            custom: userGradientPalette,
            theme: themeGradientPalette,
            default: defaultGradientPalette
          },
          duotone: {
            custom: userDuotonePalette,
            theme: themeDuotonePalette,
            default: defaultDuotonePalette
          },
          defaultGradients,
          defaultPalette,
          defaultDuotone,
          custom: customColorsEnabled,
          customGradient: areCustomGradientsEnabled,
          customDuotone,
          background: isBackgroundEnabled,
          link: isLinkEnabled,
          heading: isHeadingEnabled,
          button: isButtonEnabled,
          text: isTextEnabled
        },
        typography: {
          fontFamilies: {
            custom: customFontFamilies,
            default: defaultFontFamilies,
            theme: themeFontFamilies
          },
          fontSizes: {
            custom: customFontSizes,
            default: defaultFontSizes,
            theme: themeFontSizes
          },
          customFontSize,
          defaultFontSizes: defaultFontSizesEnabled,
          fontStyle,
          fontWeight,
          lineHeight,
          textAlign,
          textColumns,
          textDecoration,
          textIndent,
          textTransform,
          letterSpacing,
          writingMode
        },
        spacing: {
          spacingSizes: {
            custom: userSpacingSizes,
            default: defaultSpacingSizes,
            theme: themeSpacingSizes
          },
          customSpacingSize,
          defaultSpacingSizes: defaultSpacingSizesEnabled,
          padding,
          margin,
          blockGap,
          units: units2
        },
        border: {
          color: borderColor,
          radius: borderRadius,
          style: borderStyle,
          width: borderWidth,
          radiusSizes: borderRadiusSizes
        },
        dimensions: {
          aspectRatio,
          height,
          minHeight,
          width,
          dimensionSizes
        },
        layout,
        parentLayout,
        shadow
      };
    }, [
      backgroundImage,
      backgroundSize,
      customFontFamilies,
      defaultFontFamilies,
      themeFontFamilies,
      defaultFontSizesEnabled,
      customFontSizes,
      defaultFontSizes,
      themeFontSizes,
      customFontSize,
      fontStyle,
      fontWeight,
      lineHeight,
      textAlign,
      textColumns,
      textDecoration,
      textIndent,
      textTransform,
      letterSpacing,
      writingMode,
      padding,
      margin,
      blockGap,
      defaultSpacingSizesEnabled,
      customSpacingSize,
      userSpacingSizes,
      defaultSpacingSizes,
      themeSpacingSizes,
      units2,
      aspectRatio,
      height,
      minHeight,
      width,
      dimensionSizes,
      layout,
      parentLayout,
      borderColor,
      borderRadius,
      borderStyle,
      borderWidth,
      borderRadiusSizes,
      customColorsEnabled,
      customColors,
      customDuotone,
      themeColors,
      defaultColors,
      defaultPalette,
      defaultDuotone,
      userDuotonePalette,
      themeDuotonePalette,
      defaultDuotonePalette,
      userGradientPalette,
      themeGradientPalette,
      defaultGradientPalette,
      defaultGradients,
      areCustomGradientsEnabled,
      isBackgroundEnabled,
      isLinkEnabled,
      isTextEnabled,
      isHeadingEnabled,
      isButtonEnabled,
      shadow
    ]);
    return useSettingsForBlockElement(rawSettings, name);
  }
  function createBlockEditFilter(features) {
    features = features.map((settings2) => {
      return { ...settings2, Edit: (0, import_element219.memo)(settings2.edit) };
    });
    const withBlockEditHooks = (0, import_compose92.createHigherOrderComponent)(
      (OriginalBlockEdit) => function WithBlockEditHooks(props) {
        const context = useBlockEditContext();
        return [
          ...features.map((feature, i2) => {
            const {
              Edit: Edit4,
              hasSupport,
              attributeKeys = [],
              shareWithChildBlocks,
              supportsPatternEditing
            } = feature;
            const shouldDisplayControls = supportsPatternEditing && context[mayDisplayPatternEditingControlsKey] || context[mayDisplayControlsKey] || context[mayDisplayParentControlsKey] && shareWithChildBlocks;
            if (!shouldDisplayControls || !hasSupport(props.name)) {
              return null;
            }
            const neededProps = {};
            for (const key of attributeKeys) {
              if (props.attributes[key]) {
                neededProps[key] = props.attributes[key];
              }
            }
            return /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(
              Edit4,
              {
                name: props.name,
                isSelected: props.isSelected,
                clientId: props.clientId,
                setAttributes: props.setAttributes,
                __unstableParentLayout: props.__unstableParentLayout,
                ...neededProps
              },
              i2
            );
          }),
          /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(OriginalBlockEdit, { ...props }, "edit")
        ];
      },
      "withBlockEditHooks"
    );
    (0, import_hooks13.addFilter)("editor.BlockEdit", "core/editor/hooks", withBlockEditHooks);
  }
  function BlockProps({
    index,
    useBlockProps: hook,
    setAllWrapperProps,
    ...props
  }) {
    const wrapperProps = hook(props);
    const setWrapperProps = (next) => setAllWrapperProps((prev) => {
      const nextAll = [...prev];
      nextAll[index] = next;
      return nextAll;
    });
    (0, import_element219.useEffect)(() => {
      setWrapperProps(wrapperProps);
      return () => {
        setWrapperProps(void 0);
      };
    });
    return null;
  }
  var BlockPropsPure = (0, import_element219.memo)(BlockProps);
  function createBlockListBlockFilter(features) {
    const withBlockListBlockHooks = (0, import_compose92.createHigherOrderComponent)(
      (BlockListBlock2) => function WithBlockListBlockHooks(props) {
        const [allWrapperProps, setAllWrapperProps] = (0, import_element219.useState)(
          Array(features.length).fill(void 0)
        );
        return [
          ...features.map((feature, i2) => {
            const {
              hasSupport,
              attributeKeys = [],
              useBlockProps: useBlockProps16,
              isMatch
            } = feature;
            const neededProps = {};
            for (const key of attributeKeys) {
              if (props.attributes[key]) {
                neededProps[key] = props.attributes[key];
              }
            }
            if (
              // Skip rendering if none of the needed attributes are
              // set.
              !Object.keys(neededProps).length || !hasSupport(props.name) || isMatch && !isMatch(neededProps)
            ) {
              return null;
            }
            return /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(
              BlockPropsPure,
              {
                index: i2,
                useBlockProps: useBlockProps16,
                setAllWrapperProps,
                name: props.name,
                clientId: props.clientId,
                ...neededProps
              },
              i2
            );
          }),
          /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(
            BlockListBlock2,
            {
              ...props,
              wrapperProps: allWrapperProps.filter(Boolean).reduce((acc, wrapperProps) => {
                return {
                  ...acc,
                  ...wrapperProps,
                  className: clsx_default(
                    acc.className,
                    wrapperProps.className
                  ),
                  style: {
                    ...acc.style,
                    ...wrapperProps.style
                  }
                };
              }, props.wrapperProps || {})
            },
            "edit"
          )
        ];
      },
      "withBlockListBlockHooks"
    );
    (0, import_hooks13.addFilter)(
      "editor.BlockListBlock",
      "core/editor/hooks",
      withBlockListBlockHooks
    );
  }
  function createBlockSaveFilter(features) {
    function extraPropsFromHooks(props, name, attributes) {
      return features.reduce((accu, feature) => {
        const { hasSupport, attributeKeys = [], addSaveProps: addSaveProps11 } = feature;
        const neededAttributes = {};
        for (const key of attributeKeys) {
          if (attributes[key]) {
            neededAttributes[key] = attributes[key];
          }
        }
        if (
          // Skip rendering if none of the needed attributes are
          // set.
          !Object.keys(neededAttributes).length || !hasSupport(name)
        ) {
          return accu;
        }
        return addSaveProps11(accu, name, neededAttributes);
      }, props);
    }
    (0, import_hooks13.addFilter)(
      "blocks.getSaveContent.extraProps",
      "core/editor/hooks",
      extraPropsFromHooks,
      0
    );
    (0, import_hooks13.addFilter)(
      "blocks.getSaveContent.extraProps",
      "core/editor/hooks",
      (props) => {
        if (props.hasOwnProperty("className") && !props.className) {
          delete props.className;
        }
        return props;
      }
    );
  }

  // packages/block-editor/build-module/hooks/compat.mjs
  var import_blocks97 = __toESM(require_blocks(), 1);
  var import_hooks15 = __toESM(require_hooks(), 1);
  function migrateLightBlockWrapper(settings2) {
    const { apiVersion = 1 } = settings2;
    if (apiVersion < 2 && (0, import_blocks97.hasBlockSupport)(settings2, "lightBlockWrapper", false)) {
      settings2.apiVersion = 2;
    }
    return settings2;
  }
  (0, import_hooks15.addFilter)(
    "blocks.registerBlockType",
    "core/compat/migrateLightBlockWrapper",
    migrateLightBlockWrapper
  );

  // packages/block-editor/build-module/hooks/cross-origin-isolation.mjs
  function addCrossOriginAttribute(el) {
    if (!el.hasAttribute("crossorigin")) {
      el.setAttribute("crossorigin", "anonymous");
    }
  }
  if (window.crossOriginIsolated) {
    let startObservingBody = function() {
      if (document.body) {
        observer.observe(document.body, {
          childList: true,
          attributes: true,
          subtree: true
        });
      } else if (document.readyState === "loading") {
        document.addEventListener("DOMContentLoaded", () => {
          if (document.body) {
            observer.observe(document.body, {
              childList: true,
              attributes: true,
              subtree: true
            });
          }
        });
      }
    };
    startObservingBody2 = startObservingBody;
    const observer = new window.MutationObserver((mutations) => {
      mutations.forEach((mutation) => {
        [mutation.addedNodes, mutation.target].forEach((value) => {
          const nodes = value instanceof window.NodeList ? value : [value];
          nodes.forEach((node) => {
            const el = node;
            if (!el.querySelectorAll) {
              return;
            }
            el.querySelectorAll("source,script,video,link").forEach(
              (v2) => {
                addCrossOriginAttribute(v2);
              }
            );
            if (["SOURCE", "SCRIPT", "VIDEO", "LINK"].includes(
              el.nodeName
            )) {
              addCrossOriginAttribute(el);
            }
          });
        });
      });
    });
    startObservingBody();
  }
  var startObservingBody2;

  // packages/block-editor/build-module/hooks/align.mjs
  var import_hooks16 = __toESM(require_hooks(), 1);
  var import_blocks98 = __toESM(require_blocks(), 1);
  var import_jsx_runtime390 = __toESM(require_jsx_runtime(), 1);
  var ALL_ALIGNMENTS = ["left", "center", "right", "wide", "full"];
  var WIDE_ALIGNMENTS = ["wide", "full"];
  function getValidAlignments(blockAlign, hasWideBlockSupport = true, hasWideEnabled = true) {
    let validAlignments;
    if (Array.isArray(blockAlign)) {
      validAlignments = ALL_ALIGNMENTS.filter(
        (value) => blockAlign.includes(value)
      );
    } else if (blockAlign === true) {
      validAlignments = [...ALL_ALIGNMENTS];
    } else {
      validAlignments = [];
    }
    if (!hasWideEnabled || blockAlign === true && !hasWideBlockSupport) {
      return validAlignments.filter(
        (alignment) => !WIDE_ALIGNMENTS.includes(alignment)
      );
    }
    return validAlignments;
  }
  function addAttribute(settings2) {
    if ("type" in (settings2.attributes?.align ?? {})) {
      return settings2;
    }
    if ((0, import_blocks98.hasBlockSupport)(settings2, "align")) {
      settings2.attributes = {
        ...settings2.attributes,
        align: {
          type: "string",
          // Allow for '' since it is used by the `updateAlignment` function
          // in toolbar controls for special cases with defined default values.
          enum: [...ALL_ALIGNMENTS, ""]
        }
      };
    }
    return settings2;
  }
  function BlockEditAlignmentToolbarControlsPure({
    name: blockName,
    align,
    setAttributes
  }) {
    const blockAllowedAlignments = getValidAlignments(
      (0, import_blocks98.getBlockSupport)(blockName, "align"),
      (0, import_blocks98.hasBlockSupport)(blockName, "alignWide", true)
    );
    const validAlignments = useAvailableAlignments(
      blockAllowedAlignments
    ).map(({ name }) => name);
    const blockEditingMode = useBlockEditingMode();
    if (!validAlignments.length || blockEditingMode !== "default") {
      return null;
    }
    const updateAlignment = (nextAlign) => {
      if (!nextAlign) {
        const blockType = (0, import_blocks98.getBlockType)(blockName);
        const blockDefaultAlign = blockType?.attributes?.align?.default;
        if (blockDefaultAlign) {
          nextAlign = "";
        }
      }
      setAttributes({ align: nextAlign });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(block_controls_default, { group: "block", __experimentalShareWithChildBlocks: true, children: /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
      BlockAlignmentControl,
      {
        value: align,
        onChange: updateAlignment,
        controls: validAlignments
      }
    ) });
  }
  var align_default = {
    shareWithChildBlocks: true,
    edit: BlockEditAlignmentToolbarControlsPure,
    useBlockProps: useBlockProps7,
    addSaveProps: addAssignedAlign,
    attributeKeys: ["align"],
    hasSupport(name) {
      return (0, import_blocks98.hasBlockSupport)(name, "align", false);
    }
  };
  function useBlockProps7({ name, align }) {
    const blockAllowedAlignments = getValidAlignments(
      (0, import_blocks98.getBlockSupport)(name, "align"),
      (0, import_blocks98.hasBlockSupport)(name, "alignWide", true)
    );
    const validAlignments = useAvailableAlignments(blockAllowedAlignments);
    if (validAlignments.some((alignment) => alignment.name === align)) {
      return { "data-align": align };
    }
    return {};
  }
  function addAssignedAlign(props, blockType, attributes) {
    const { align } = attributes;
    const blockAlign = (0, import_blocks98.getBlockSupport)(blockType, "align");
    const hasWideBlockSupport = (0, import_blocks98.hasBlockSupport)(blockType, "alignWide", true);
    const isAlignValid = getValidAlignments(
      blockAlign,
      hasWideBlockSupport
    ).includes(align);
    if (isAlignValid) {
      props.className = clsx_default(`align${align}`, props.className);
    }
    return props;
  }
  (0, import_hooks16.addFilter)(
    "blocks.registerBlockType",
    "core/editor/align/addAttribute",
    addAttribute
  );

  // packages/block-editor/build-module/hooks/lock.mjs
  var import_hooks17 = __toESM(require_hooks(), 1);
  function addAttribute2(settings2) {
    if ("type" in (settings2.attributes?.lock ?? {})) {
      return settings2;
    }
    settings2.attributes = {
      ...settings2.attributes,
      lock: {
        type: "object"
      }
    };
    return settings2;
  }
  (0, import_hooks17.addFilter)("blocks.registerBlockType", "core/lock/addAttribute", addAttribute2);

  // packages/block-editor/build-module/hooks/allowed-blocks.mjs
  var import_hooks18 = __toESM(require_hooks(), 1);
  var import_blocks101 = __toESM(require_blocks(), 1);

  // packages/block-editor/build-module/components/block-allowed-blocks/allowed-blocks-control.mjs
  var import_components226 = __toESM(require_components(), 1);
  var import_i18n205 = __toESM(require_i18n(), 1);
  var import_element223 = __toESM(require_element(), 1);
  var import_data178 = __toESM(require_data(), 1);
  var import_blocks100 = __toESM(require_blocks(), 1);

  // packages/block-editor/build-module/components/block-allowed-blocks/modal.mjs
  var import_components225 = __toESM(require_components(), 1);
  var import_element222 = __toESM(require_element(), 1);
  var import_i18n204 = __toESM(require_i18n(), 1);
  var import_data177 = __toESM(require_data(), 1);

  // packages/block-editor/build-module/components/block-manager/index.mjs
  var import_blocks99 = __toESM(require_blocks(), 1);
  var import_data176 = __toESM(require_data(), 1);
  var import_components224 = __toESM(require_components(), 1);
  var import_i18n203 = __toESM(require_i18n(), 1);
  var import_element221 = __toESM(require_element(), 1);
  var import_compose94 = __toESM(require_compose(), 1);
  var import_a11y19 = __toESM(require_a11y(), 1);

  // packages/block-editor/build-module/components/block-manager/category.mjs
  var import_element220 = __toESM(require_element(), 1);
  var import_compose93 = __toESM(require_compose(), 1);
  var import_components223 = __toESM(require_components(), 1);

  // packages/block-editor/build-module/components/block-manager/checklist.mjs
  var import_components222 = __toESM(require_components(), 1);
  var import_jsx_runtime391 = __toESM(require_jsx_runtime(), 1);
  function BlockTypesChecklist({ blockTypes, value, onItemChange }) {
    return /* @__PURE__ */ (0, import_jsx_runtime391.jsx)("ul", { className: "block-editor-block-manager__checklist", children: blockTypes.map((blockType) => /* @__PURE__ */ (0, import_jsx_runtime391.jsxs)(
      "li",
      {
        className: "block-editor-block-manager__checklist-item",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime391.jsx)(
            import_components222.CheckboxControl,
            {
              label: blockType.title,
              checked: value.includes(blockType.name),
              onChange: (...args) => onItemChange(blockType, ...args)
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime391.jsx)(block_icon_default, { icon: blockType.icon })
        ]
      },
      blockType.name
    )) });
  }
  var checklist_default = BlockTypesChecklist;

  // packages/block-editor/build-module/components/block-manager/category.mjs
  var import_jsx_runtime392 = __toESM(require_jsx_runtime(), 1);
  function BlockManagerCategory({
    title,
    blockTypes,
    selectedBlockTypes,
    onChange
  }) {
    const instanceId = (0, import_compose93.useInstanceId)(BlockManagerCategory);
    const toggleVisible = (0, import_element220.useCallback)(
      (blockType, nextIsChecked) => {
        if (nextIsChecked) {
          onChange([...selectedBlockTypes, blockType]);
        } else {
          onChange(
            selectedBlockTypes.filter(
              ({ name }) => name !== blockType.name
            )
          );
        }
      },
      [selectedBlockTypes, onChange]
    );
    const toggleAllVisible = (0, import_element220.useCallback)(
      (nextIsChecked) => {
        if (nextIsChecked) {
          onChange([
            ...selectedBlockTypes,
            ...blockTypes.filter(
              (blockType) => !selectedBlockTypes.find(
                ({ name }) => name === blockType.name
              )
            )
          ]);
        } else {
          onChange(
            selectedBlockTypes.filter(
              (selectedBlockType) => !blockTypes.find(
                ({ name }) => name === selectedBlockType.name
              )
            )
          );
        }
      },
      [blockTypes, selectedBlockTypes, onChange]
    );
    if (!blockTypes.length) {
      return null;
    }
    const checkedBlockNames = blockTypes.map(({ name }) => name).filter(
      (type) => (selectedBlockTypes ?? []).some(
        (selectedBlockType) => selectedBlockType.name === type
      )
    );
    const titleId = "block-editor-block-manager__category-title-" + instanceId;
    const isAllChecked = checkedBlockNames.length === blockTypes.length;
    const isIndeterminate = !isAllChecked && checkedBlockNames.length > 0;
    return /* @__PURE__ */ (0, import_jsx_runtime392.jsxs)(
      "div",
      {
        role: "group",
        "aria-labelledby": titleId,
        className: "block-editor-block-manager__category",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
            import_components223.CheckboxControl,
            {
              checked: isAllChecked,
              onChange: toggleAllVisible,
              className: "block-editor-block-manager__category-title",
              indeterminate: isIndeterminate,
              label: /* @__PURE__ */ (0, import_jsx_runtime392.jsx)("span", { id: titleId, children: title })
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
            checklist_default,
            {
              blockTypes,
              value: checkedBlockNames,
              onItemChange: toggleVisible
            }
          )
        ]
      }
    );
  }
  var category_default2 = BlockManagerCategory;

  // packages/block-editor/build-module/components/block-manager/index.mjs
  var import_jsx_runtime393 = __toESM(require_jsx_runtime(), 1);
  function BlockManager({
    blockTypes,
    selectedBlockTypes,
    onChange,
    showSelectAll = true
  }) {
    const debouncedSpeak = (0, import_compose94.useDebounce)(import_a11y19.speak, 500);
    const [search, setSearch] = (0, import_element221.useState)("");
    const { categories, isMatchingSearchTerm } = (0, import_data176.useSelect)((select3) => {
      return {
        categories: select3(import_blocks99.store).getCategories(),
        isMatchingSearchTerm: select3(import_blocks99.store).isMatchingSearchTerm
      };
    }, []);
    const filteredBlockTypes = blockTypes.filter((blockType) => {
      return !search || isMatchingSearchTerm(blockType, search);
    });
    const isIndeterminate = selectedBlockTypes.length > 0 && selectedBlockTypes.length !== blockTypes.length;
    const isAllChecked = blockTypes.length > 0 && selectedBlockTypes.length === blockTypes.length;
    (0, import_element221.useEffect)(() => {
      if (!search) {
        return;
      }
      const count = filteredBlockTypes.length;
      const resultsFoundMessage = (0, import_i18n203.sprintf)(
        /* translators: %d: number of results. */
        (0, import_i18n203._n)("%d result found.", "%d results found.", count),
        count
      );
      debouncedSpeak(resultsFoundMessage);
    }, [filteredBlockTypes?.length, search, debouncedSpeak]);
    return /* @__PURE__ */ (0, import_jsx_runtime393.jsxs)(import_components224.__experimentalVStack, { className: "block-editor-block-manager__content", spacing: 4, children: [
      /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
        import_components224.SearchControl,
        {
          label: (0, import_i18n203.__)("Search for a block"),
          placeholder: (0, import_i18n203.__)("Search for a block"),
          value: search,
          onChange: (nextSearch) => setSearch(nextSearch),
          className: "block-editor-block-manager__search"
        }
      ),
      showSelectAll && /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
        import_components224.CheckboxControl,
        {
          className: "block-editor-block-manager__select-all",
          label: (0, import_i18n203.__)("Select all"),
          checked: isAllChecked,
          onChange: () => {
            if (isAllChecked) {
              onChange([]);
            } else {
              onChange(blockTypes);
            }
          },
          indeterminate: isIndeterminate
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime393.jsxs)(
        "div",
        {
          tabIndex: "0",
          role: "region",
          "aria-label": (0, import_i18n203.__)("Available block types"),
          className: "block-editor-block-manager__results",
          children: [
            filteredBlockTypes.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime393.jsx)("p", { className: "block-editor-block-manager__no-results", children: (0, import_i18n203.__)("No blocks found.") }),
            categories.map((category) => /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
              category_default2,
              {
                title: category.title,
                blockTypes: filteredBlockTypes.filter(
                  (blockType) => blockType.category === category.slug
                ),
                selectedBlockTypes,
                onChange
              },
              category.slug
            )),
            /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
              category_default2,
              {
                title: (0, import_i18n203.__)("Uncategorized"),
                blockTypes: filteredBlockTypes.filter(
                  ({ category }) => !category
                ),
                selectedBlockTypes,
                onChange
              }
            )
          ]
        }
      )
    ] });
  }

  // packages/block-editor/build-module/components/block-allowed-blocks/modal.mjs
  var import_jsx_runtime394 = __toESM(require_jsx_runtime(), 1);
  function BlockAllowedBlocksModal({
    clientId,
    blockTypes,
    selectedBlockTypes,
    onClose
  }) {
    const [currentSelectedBlockTypes, setCurrentSelectedBlockTypes] = (0, import_element222.useState)(selectedBlockTypes);
    const { updateBlockAttributes: updateBlockAttributes2 } = (0, import_data177.useDispatch)(store);
    const handleSubmit = () => {
      const isFullySelected = currentSelectedBlockTypes.length === blockTypes.length;
      const newBlockNames = currentSelectedBlockTypes.map(
        ({ name }) => name
      );
      updateBlockAttributes2(clientId, {
        allowedBlocks: isFullySelected ? void 0 : newBlockNames
      });
      onClose();
    };
    return /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
      import_components225.Modal,
      {
        title: (0, import_i18n204._x)("Manage allowed blocks", "modal title"),
        onRequestClose: onClose,
        overlayClassName: "block-editor-block-allowed-blocks-modal",
        focusOnMount: "firstContentElement",
        size: "medium",
        children: /* @__PURE__ */ (0, import_jsx_runtime394.jsxs)(
          import_components225.__experimentalVStack,
          {
            as: "form",
            onSubmit: (e2) => {
              e2.preventDefault();
              handleSubmit();
            },
            spacing: "4",
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(import_components225.__experimentalText, { children: (0, import_i18n204.__)(
                "Select which blocks can be added inside this container."
              ) }),
              /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
                BlockManager,
                {
                  blockTypes,
                  selectedBlockTypes: currentSelectedBlockTypes,
                  onChange: (newSelectedBlockTypes) => {
                    setCurrentSelectedBlockTypes(newSelectedBlockTypes);
                  }
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime394.jsxs)(
                import_components225.Flex,
                {
                  className: "block-editor-block-allowed-blocks-modal__actions",
                  justify: "flex-end",
                  expanded: false,
                  children: [
                    /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(import_components225.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
                      import_components225.Button,
                      {
                        variant: "tertiary",
                        onClick: onClose,
                        __next40pxDefaultSize: true,
                        children: (0, import_i18n204.__)("Cancel")
                      }
                    ) }),
                    /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(import_components225.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
                      import_components225.Button,
                      {
                        variant: "primary",
                        type: "submit",
                        __next40pxDefaultSize: true,
                        children: (0, import_i18n204.__)("Apply")
                      }
                    ) })
                  ]
                }
              )
            ]
          }
        )
      }
    );
  }

  // packages/block-editor/build-module/components/block-allowed-blocks/allowed-blocks-control.mjs
  var import_jsx_runtime395 = __toESM(require_jsx_runtime(), 1);
  function BlockAllowedBlocksControl({ clientId }) {
    const [isBlockControlOpened, setIsBlockControlOpened] = (0, import_element223.useState)(false);
    const { blockTypes, selectedBlockNames } = (0, import_data178.useSelect)(
      (select3) => {
        const { getBlockAttributes: getBlockAttributes3 } = select3(store);
        return {
          blockTypes: select3(import_blocks100.store).getBlockTypes(),
          selectedBlockNames: getBlockAttributes3(clientId)?.allowedBlocks
        };
      },
      [clientId]
    );
    const filteredBlockTypes = blockTypes.filter(
      (blockType) => (0, import_blocks100.hasBlockSupport)(blockType, "inserter", true) && (!blockType.parent || blockType.parent.includes("core/post-content"))
    );
    if (!filteredBlockTypes) {
      return null;
    }
    const selectedBlockTypes = selectedBlockNames === void 0 ? filteredBlockTypes : filteredBlockTypes.filter(
      (blockType) => selectedBlockNames.includes(blockType.name)
    );
    return /* @__PURE__ */ (0, import_jsx_runtime395.jsxs)("div", { className: "block-editor-block-allowed-blocks-control", children: [
      /* @__PURE__ */ (0, import_jsx_runtime395.jsxs)(
        import_components226.BaseControl,
        {
          help: (0, import_i18n205.__)(
            "Specify which blocks are allowed inside this container."
          ),
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime395.jsx)(import_components226.BaseControl.VisualLabel, { children: (0, import_i18n205.__)("Allowed Blocks") }),
            /* @__PURE__ */ (0, import_jsx_runtime395.jsx)(
              import_components226.Button,
              {
                __next40pxDefaultSize: true,
                variant: "secondary",
                onClick: () => {
                  setIsBlockControlOpened(true);
                },
                className: "block-editor-block-allowed-blocks-control__button",
                children: (0, import_i18n205.__)("Manage allowed blocks")
              }
            )
          ]
        }
      ),
      isBlockControlOpened && /* @__PURE__ */ (0, import_jsx_runtime395.jsx)(
        BlockAllowedBlocksModal,
        {
          clientId,
          blockTypes: filteredBlockTypes,
          selectedBlockTypes,
          onClose: () => setIsBlockControlOpened(false)
        }
      )
    ] });
  }

  // packages/block-editor/build-module/hooks/allowed-blocks.mjs
  var import_jsx_runtime396 = __toESM(require_jsx_runtime(), 1);
  function BlockEditAllowedBlocksControlPure({ clientId }) {
    const blockEditingMode = useBlockEditingMode();
    const isContentOnly = blockEditingMode === "contentOnly";
    if (isContentOnly) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime396.jsx)(PrivateInspectorControlsAllowedBlocks.Fill, { children: /* @__PURE__ */ (0, import_jsx_runtime396.jsx)(BlockAllowedBlocksControl, { clientId }) });
  }
  var allowed_blocks_default = {
    edit: BlockEditAllowedBlocksControlPure,
    attributeKeys: ["allowedBlocks"],
    hasSupport(name) {
      return (0, import_blocks101.hasBlockSupport)(name, "allowedBlocks");
    }
  };
  function addAttribute3(settings2) {
    if (settings2?.attributes?.allowedBlocks?.type) {
      return settings2;
    }
    if ((0, import_blocks101.hasBlockSupport)(settings2, "allowedBlocks")) {
      settings2.attributes = {
        ...settings2.attributes,
        allowedBlocks: {
          type: "array"
        }
      };
    }
    return settings2;
  }
  (0, import_hooks18.addFilter)(
    "blocks.registerBlockType",
    "core/allowedBlocks/attribute",
    addAttribute3
  );
  function addTransforms2(result, source, index, results) {
    if (!(0, import_blocks101.hasBlockSupport)(result.name, "allowedBlocks")) {
      return result;
    }
    if (source.length !== 1 && results.length === 1 && result.innerBlocks.length === source.length) {
      return result;
    }
    if (results.length === 1 && source.length > 1 || results.length > 1 && source.length === 1) {
      return result;
    }
    if (results.length > 1 && source.length > 1 && results.length !== source.length) {
      return result;
    }
    if (result.attributes.allowedBlocks) {
      return result;
    }
    const sourceAllowedBlocks = source[index]?.attributes?.allowedBlocks;
    if (!sourceAllowedBlocks) {
      return result;
    }
    const blockType = (0, import_blocks101.getBlockType)(result.name);
    const destinationAllowedBlocks = blockType?.allowedBlocks || [];
    if (!destinationAllowedBlocks.length) {
      return {
        ...result,
        attributes: {
          ...result.attributes,
          allowedBlocks: sourceAllowedBlocks
        }
      };
    }
    const filteredSourceAllowedBlocks = sourceAllowedBlocks.filter(
      (block) => destinationAllowedBlocks.includes(block)
    );
    return {
      ...result,
      attributes: {
        ...result.attributes,
        allowedBlocks: filteredSourceAllowedBlocks
      }
    };
  }
  (0, import_hooks18.addFilter)(
    "blocks.switchToBlockType.transformedBlock",
    "core/allowedBlocks/addTransforms",
    addTransforms2
  );

  // packages/block-editor/build-module/hooks/anchor.mjs
  var import_hooks19 = __toESM(require_hooks(), 1);
  var import_components227 = __toESM(require_components(), 1);
  var import_i18n206 = __toESM(require_i18n(), 1);
  var import_blocks102 = __toESM(require_blocks(), 1);
  var import_element224 = __toESM(require_element(), 1);
  var import_jsx_runtime397 = __toESM(require_jsx_runtime(), 1);
  var ANCHOR_REGEX = /[\s#]/g;
  function addAttribute4(settings2) {
    if ("type" in (settings2.attributes?.anchor ?? {})) {
      return settings2;
    }
    if ((0, import_blocks102.hasBlockSupport)(settings2, "anchor")) {
      settings2.attributes = {
        ...settings2.attributes,
        anchor: {
          type: "string"
        }
      };
    }
    return settings2;
  }
  function BlockEditAnchorControlPure({ anchor, setAttributes }) {
    const blockEditingMode = useBlockEditingMode();
    if (blockEditingMode !== "default") {
      return null;
    }
    const isWeb = import_element224.Platform.OS === "web";
    return /* @__PURE__ */ (0, import_jsx_runtime397.jsx)(inspector_controls_default, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime397.jsx)(
      import_components227.TextControl,
      {
        __next40pxDefaultSize: true,
        className: "html-anchor-control",
        label: (0, import_i18n206.__)("HTML anchor"),
        help: /* @__PURE__ */ (0, import_jsx_runtime397.jsxs)(import_jsx_runtime397.Fragment, { children: [
          (0, import_i18n206.__)(
            "Enter a word or two\u2014without spaces\u2014to make a unique web address just for this block, called an \u201Canchor\u201D. Then, you\u2019ll be able to link directly to this section of your page."
          ),
          isWeb && /* @__PURE__ */ (0, import_jsx_runtime397.jsxs)(import_jsx_runtime397.Fragment, { children: [
            " ",
            /* @__PURE__ */ (0, import_jsx_runtime397.jsx)(
              import_components227.ExternalLink,
              {
                href: (0, import_i18n206.__)(
                  "https://wordpress.org/documentation/article/page-jumps/"
                ),
                children: (0, import_i18n206.__)("Learn more about anchors")
              }
            )
          ] })
        ] }),
        value: anchor || "",
        placeholder: !isWeb ? (0, import_i18n206.__)("Add an anchor") : null,
        onChange: (nextValue) => {
          nextValue = nextValue.replace(ANCHOR_REGEX, "-");
          setAttributes({
            anchor: nextValue !== "" ? nextValue : void 0
          });
        },
        autoCapitalize: "none",
        autoComplete: "off"
      }
    ) });
  }
  var anchor_default = {
    addSaveProps: addSaveProps3,
    edit: BlockEditAnchorControlPure,
    attributeKeys: ["anchor"],
    hasSupport(name) {
      return (0, import_blocks102.hasBlockSupport)(name, "anchor");
    }
  };
  function addSaveProps3(extraProps, blockType, attributes) {
    if ((0, import_blocks102.hasBlockSupport)(blockType, "anchor")) {
      extraProps.id = attributes.anchor === "" ? null : attributes.anchor;
    }
    return extraProps;
  }
  (0, import_hooks19.addFilter)("blocks.registerBlockType", "core/anchor/attribute", addAttribute4);

  // packages/block-editor/build-module/hooks/aria-label.mjs
  var import_hooks20 = __toESM(require_hooks(), 1);
  var import_blocks103 = __toESM(require_blocks(), 1);
  function addAttribute5(settings2) {
    if (settings2?.attributes?.ariaLabel?.type) {
      return settings2;
    }
    if ((0, import_blocks103.hasBlockSupport)(settings2, "ariaLabel")) {
      settings2.attributes = {
        ...settings2.attributes,
        ariaLabel: {
          type: "string"
        }
      };
    }
    return settings2;
  }
  function addSaveProps4(extraProps, blockType, attributes) {
    if ((0, import_blocks103.hasBlockSupport)(blockType, "ariaLabel") && !shouldSkipSerialization(blockType, "ariaLabel", "ariaLabel")) {
      extraProps["aria-label"] = attributes.ariaLabel === "" ? null : attributes.ariaLabel;
    }
    return extraProps;
  }
  var aria_label_default = {
    addSaveProps: addSaveProps4,
    attributeKeys: ["ariaLabel"],
    hasSupport(name) {
      return (0, import_blocks103.hasBlockSupport)(name, "ariaLabel");
    }
  };
  (0, import_hooks20.addFilter)(
    "blocks.registerBlockType",
    "core/ariaLabel/attribute",
    addAttribute5
  );

  // packages/block-editor/build-module/hooks/block-fields/index.mjs
  var import_blocks104 = __toESM(require_blocks(), 1);
  var import_components258 = __toESM(require_components(), 1);
  var import_data181 = __toESM(require_data(), 1);

  // node_modules/@base-ui/utils/esm/useRefWithInit.js
  var React4 = __toESM(require_react(), 1);
  var UNINITIALIZED = {};
  function useRefWithInit(init, initArg) {
    const ref = React4.useRef(UNINITIALIZED);
    if (ref.current === UNINITIALIZED) {
      ref.current = init(initArg);
    }
    return ref;
  }

  // node_modules/@base-ui/react/esm/utils/useRenderElement.js
  var React7 = __toESM(require_react(), 1);

  // node_modules/@base-ui/utils/esm/useMergedRefs.js
  function useMergedRefs(a2, b2, c6, d2) {
    const forkRef = useRefWithInit(createForkRef).current;
    if (didChange(forkRef, a2, b2, c6, d2)) {
      update3(forkRef, [a2, b2, c6, d2]);
    }
    return forkRef.callback;
  }
  function useMergedRefsN(refs) {
    const forkRef = useRefWithInit(createForkRef).current;
    if (didChangeN(forkRef, refs)) {
      update3(forkRef, refs);
    }
    return forkRef.callback;
  }
  function createForkRef() {
    return {
      callback: null,
      cleanup: null,
      refs: []
    };
  }
  function didChange(forkRef, a2, b2, c6, d2) {
    return forkRef.refs[0] !== a2 || forkRef.refs[1] !== b2 || forkRef.refs[2] !== c6 || forkRef.refs[3] !== d2;
  }
  function didChangeN(forkRef, newRefs) {
    return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);
  }
  function update3(forkRef, refs) {
    forkRef.refs = refs;
    if (refs.every((ref) => ref == null)) {
      forkRef.callback = null;
      return;
    }
    forkRef.callback = (instance) => {
      if (forkRef.cleanup) {
        forkRef.cleanup();
        forkRef.cleanup = null;
      }
      if (instance != null) {
        const cleanupCallbacks = Array(refs.length).fill(null);
        for (let i2 = 0; i2 < refs.length; i2 += 1) {
          const ref = refs[i2];
          if (ref == null) {
            continue;
          }
          switch (typeof ref) {
            case "function": {
              const refCleanup = ref(instance);
              if (typeof refCleanup === "function") {
                cleanupCallbacks[i2] = refCleanup;
              }
              break;
            }
            case "object": {
              ref.current = instance;
              break;
            }
            default:
          }
        }
        forkRef.cleanup = () => {
          for (let i2 = 0; i2 < refs.length; i2 += 1) {
            const ref = refs[i2];
            if (ref == null) {
              continue;
            }
            switch (typeof ref) {
              case "function": {
                const cleanupCallback = cleanupCallbacks[i2];
                if (typeof cleanupCallback === "function") {
                  cleanupCallback();
                } else {
                  ref(null);
                }
                break;
              }
              case "object": {
                ref.current = null;
                break;
              }
              default:
            }
          }
        };
      }
    };
  }

  // node_modules/@base-ui/utils/esm/getReactElementRef.js
  var React6 = __toESM(require_react(), 1);

  // node_modules/@base-ui/utils/esm/reactVersion.js
  var React5 = __toESM(require_react(), 1);
  var majorVersion = parseInt(React5.version, 10);
  function isReactVersionAtLeast(reactVersionToCheck) {
    return majorVersion >= reactVersionToCheck;
  }

  // node_modules/@base-ui/utils/esm/getReactElementRef.js
  function getReactElementRef(element) {
    if (!/* @__PURE__ */ React6.isValidElement(element)) {
      return null;
    }
    const reactElement = element;
    const propsWithRef = reactElement.props;
    return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
  }

  // node_modules/@base-ui/utils/esm/mergeObjects.js
  function mergeObjects(a2, b2) {
    if (a2 && !b2) {
      return a2;
    }
    if (!a2 && b2) {
      return b2;
    }
    if (a2 || b2) {
      return {
        ...a2,
        ...b2
      };
    }
    return void 0;
  }

  // node_modules/@base-ui/react/esm/utils/getStateAttributesProps.js
  function getStateAttributesProps(state, customMapping) {
    const props = {};
    for (const key in state) {
      const value = state[key];
      if (customMapping?.hasOwnProperty(key)) {
        const customProps = customMapping[key](value);
        if (customProps != null) {
          Object.assign(props, customProps);
        }
        continue;
      }
      if (value === true) {
        props[`data-${key.toLowerCase()}`] = "";
      } else if (value) {
        props[`data-${key.toLowerCase()}`] = value.toString();
      }
    }
    return props;
  }

  // node_modules/@base-ui/react/esm/utils/resolveClassName.js
  function resolveClassName(className, state) {
    return typeof className === "function" ? className(state) : className;
  }

  // node_modules/@base-ui/react/esm/utils/resolveStyle.js
  function resolveStyle(style, state) {
    return typeof style === "function" ? style(state) : style;
  }

  // node_modules/@base-ui/react/esm/merge-props/mergeProps.js
  var EMPTY_PROPS = {};
  function mergeProps(a2, b2, c6, d2, e2) {
    let merged = {
      ...resolvePropsGetter(a2, EMPTY_PROPS)
    };
    if (b2) {
      merged = mergeOne(merged, b2);
    }
    if (c6) {
      merged = mergeOne(merged, c6);
    }
    if (d2) {
      merged = mergeOne(merged, d2);
    }
    if (e2) {
      merged = mergeOne(merged, e2);
    }
    return merged;
  }
  function mergePropsN(props) {
    if (props.length === 0) {
      return EMPTY_PROPS;
    }
    if (props.length === 1) {
      return resolvePropsGetter(props[0], EMPTY_PROPS);
    }
    let merged = {
      ...resolvePropsGetter(props[0], EMPTY_PROPS)
    };
    for (let i2 = 1; i2 < props.length; i2 += 1) {
      merged = mergeOne(merged, props[i2]);
    }
    return merged;
  }
  function mergeOne(merged, inputProps) {
    if (isPropsGetter(inputProps)) {
      return inputProps(merged);
    }
    return mutablyMergeInto(merged, inputProps);
  }
  function mutablyMergeInto(mergedProps, externalProps) {
    if (!externalProps) {
      return mergedProps;
    }
    for (const propName in externalProps) {
      const externalPropValue = externalProps[propName];
      switch (propName) {
        case "style": {
          mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
          break;
        }
        case "className": {
          mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
          break;
        }
        default: {
          if (isEventHandler(propName, externalPropValue)) {
            mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
          } else {
            mergedProps[propName] = externalPropValue;
          }
        }
      }
    }
    return mergedProps;
  }
  function isEventHandler(key, value) {
    const code0 = key.charCodeAt(0);
    const code1 = key.charCodeAt(1);
    const code2 = key.charCodeAt(2);
    return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
  }
  function isPropsGetter(inputProps) {
    return typeof inputProps === "function";
  }
  function resolvePropsGetter(inputProps, previousProps) {
    if (isPropsGetter(inputProps)) {
      return inputProps(previousProps);
    }
    return inputProps ?? EMPTY_PROPS;
  }
  function mergeEventHandlers(ourHandler, theirHandler) {
    if (!theirHandler) {
      return ourHandler;
    }
    if (!ourHandler) {
      return theirHandler;
    }
    return (event) => {
      if (isSyntheticEvent(event)) {
        const baseUIEvent = event;
        makeEventPreventable(baseUIEvent);
        const result2 = theirHandler(baseUIEvent);
        if (!baseUIEvent.baseUIHandlerPrevented) {
          ourHandler?.(baseUIEvent);
        }
        return result2;
      }
      const result = theirHandler(event);
      ourHandler?.(event);
      return result;
    };
  }
  function makeEventPreventable(event) {
    event.preventBaseUIHandler = () => {
      event.baseUIHandlerPrevented = true;
    };
    return event;
  }
  function mergeClassNames(ourClassName, theirClassName) {
    if (theirClassName) {
      if (ourClassName) {
        return theirClassName + " " + ourClassName;
      }
      return theirClassName;
    }
    return ourClassName;
  }
  function isSyntheticEvent(event) {
    return event != null && typeof event === "object" && "nativeEvent" in event;
  }

  // node_modules/@base-ui/utils/esm/empty.js
  var EMPTY_ARRAY15 = Object.freeze([]);
  var EMPTY_OBJECT3 = Object.freeze({});

  // node_modules/@base-ui/react/esm/utils/useRenderElement.js
  var import_react6 = __toESM(require_react(), 1);
  function useRenderElement(element, componentProps, params = {}) {
    const renderProp = componentProps.render;
    const outProps = useRenderElementProps(componentProps, params);
    if (params.enabled === false) {
      return null;
    }
    const state = params.state ?? EMPTY_OBJECT3;
    return evaluateRenderProp(element, renderProp, outProps, state);
  }
  function useRenderElementProps(componentProps, params = {}) {
    const {
      className: classNameProp,
      style: styleProp,
      render: renderProp
    } = componentProps;
    const {
      state = EMPTY_OBJECT3,
      ref,
      props,
      stateAttributesMapping,
      enabled = true
    } = params;
    const className = enabled ? resolveClassName(classNameProp, state) : void 0;
    const style = enabled ? resolveStyle(styleProp, state) : void 0;
    const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT3;
    const outProps = enabled ? mergeObjects(stateProps, Array.isArray(props) ? mergePropsN(props) : props) ?? EMPTY_OBJECT3 : EMPTY_OBJECT3;
    if (typeof document !== "undefined") {
      if (!enabled) {
        useMergedRefs(null, null);
      } else if (Array.isArray(ref)) {
        outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
      } else {
        outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
      }
    }
    if (!enabled) {
      return EMPTY_OBJECT3;
    }
    if (className !== void 0) {
      outProps.className = mergeClassNames(outProps.className, className);
    }
    if (style !== void 0) {
      outProps.style = mergeObjects(outProps.style, style);
    }
    return outProps;
  }
  function evaluateRenderProp(element, render4, props, state) {
    if (render4) {
      if (typeof render4 === "function") {
        return render4(props, state);
      }
      const mergedProps = mergeProps(props, render4.props);
      mergedProps.ref = props.ref;
      return /* @__PURE__ */ React7.cloneElement(render4, mergedProps);
    }
    if (element) {
      if (typeof element === "string") {
        return renderTag(element, props);
      }
    }
    throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage(8));
  }
  function renderTag(Tag, props) {
    if (Tag === "button") {
      return /* @__PURE__ */ (0, import_react6.createElement)("button", {
        type: "button",
        ...props,
        key: props.key
      });
    }
    if (Tag === "img") {
      return /* @__PURE__ */ (0, import_react6.createElement)("img", {
        alt: "",
        ...props,
        key: props.key
      });
    }
    return /* @__PURE__ */ React7.createElement(Tag, props);
  }

  // node_modules/@base-ui/react/esm/use-render/useRender.js
  function useRender(params) {
    return useRenderElement(params.defaultTagName ?? "div", params, params);
  }

  // packages/ui/build-module/badge/badge.mjs
  var import_element225 = __toESM(require_element(), 1);
  if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='244b5c59c0']")) {
    const style = document.createElement("style");
    style.setAttribute("data-wp-hash", "244b5c59c0");
    style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-sm,12px);font-weight:var(--wpds-font-weight-regular,400);line-height:var(--wpds-font-line-height-xs,16px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-bg-surface-error,#f6e6e3);color:var(--wpds-color-fg-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-bg-surface-warning,#fde6bd);color:var(--wpds-color-fg-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution,#fee994);color:var(--wpds-color-fg-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success,#c5f7cc);color:var(--wpds-color-fg-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-bg-surface-info,#deebfa);color:var(--wpds-color-fg-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);color:var(--wpds-color-fg-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-bg-surface-neutral,#f8f8f8);color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d)}}'));
    document.head.appendChild(style);
  }
  var style_default = { "badge": "_96e6251aad1a6136__badge", "is-high-intent": "_99f7158cb520f750__is-high-intent", "is-medium-intent": "c20ebef2365bc8b7__is-medium-intent", "is-low-intent": "_365e1626c6202e52__is-low-intent", "is-stable-intent": "_33f8198127ddf4ef__is-stable-intent", "is-informational-intent": "_04c1aca8fc449412__is-informational-intent", "is-draft-intent": "_90726e69d495ec19__is-draft-intent", "is-none-intent": "_898f4a544993bd39__is-none-intent" };
  var Badge5 = (0, import_element225.forwardRef)(function Badge22({ children, intent = "none", render: render4, className, ...props }, ref) {
    const element = useRender({
      render: render4,
      defaultTagName: "span",
      ref,
      props: mergeProps(props, {
        className: clsx_default(
          style_default.badge,
          style_default[`is-${intent}-intent`],
          className
        ),
        children
      })
    });
    return element;
  });

  // packages/ui/build-module/stack/stack.mjs
  var import_element226 = __toESM(require_element(), 1);
  if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='71d20935c2']")) {
    const style = document.createElement("style");
    style.setAttribute("data-wp-hash", "71d20935c2");
    style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}"));
    document.head.appendChild(style);
  }
  var style_default2 = { "stack": "_19ce0419607e1896__stack" };
  var gapTokens = {
    xs: "var(--wpds-dimension-gap-xs, 4px)",
    sm: "var(--wpds-dimension-gap-sm, 8px)",
    md: "var(--wpds-dimension-gap-md, 12px)",
    lg: "var(--wpds-dimension-gap-lg, 16px)",
    xl: "var(--wpds-dimension-gap-xl, 24px)",
    "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
    "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
  };
  var Stack = (0, import_element226.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render: render4, ...props }, ref) {
    const style = {
      gap: gap && gapTokens[gap],
      alignItems: align,
      justifyContent: justify,
      flexDirection: direction,
      flexWrap: wrap
    };
    const element = useRender({
      render: render4,
      ref,
      props: mergeProps(props, { style, className: style_default2.stack })
    });
    return element;
  });

  // packages/dataviews/build-module/constants.mjs
  var import_i18n207 = __toESM(require_i18n(), 1);
  var OPERATOR_IS_ANY = "isAny";
  var OPERATOR_IS_NONE = "isNone";
  var OPERATOR_IS_ALL = "isAll";
  var OPERATOR_IS_NOT_ALL = "isNotAll";
  var OPERATOR_BETWEEN = "between";
  var OPERATOR_IN_THE_PAST = "inThePast";
  var OPERATOR_OVER = "over";
  var OPERATOR_IS = "is";
  var OPERATOR_IS_NOT = "isNot";
  var OPERATOR_LESS_THAN = "lessThan";
  var OPERATOR_GREATER_THAN = "greaterThan";
  var OPERATOR_LESS_THAN_OR_EQUAL = "lessThanOrEqual";
  var OPERATOR_GREATER_THAN_OR_EQUAL = "greaterThanOrEqual";
  var OPERATOR_BEFORE = "before";
  var OPERATOR_AFTER = "after";
  var OPERATOR_BEFORE_INC = "beforeInc";
  var OPERATOR_AFTER_INC = "afterInc";
  var OPERATOR_CONTAINS = "contains";
  var OPERATOR_NOT_CONTAINS = "notContains";
  var OPERATOR_STARTS_WITH = "startsWith";
  var OPERATOR_ON = "on";
  var OPERATOR_NOT_ON = "notOn";
  var sortLabels = {
    asc: (0, import_i18n207.__)("Sort ascending"),
    desc: (0, import_i18n207.__)("Sort descending")
  };

  // packages/dataviews/build-module/lock-unlock.mjs
  var import_private_apis2 = __toESM(require_private_apis(), 1);
  var { lock: lock2, unlock: unlock2 } = (0, import_private_apis2.__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"
  );

  // packages/dataviews/build-module/hooks/use-elements.mjs
  var import_element227 = __toESM(require_element(), 1);
  var EMPTY_ARRAY16 = [];
  function useElements({
    elements,
    getElements
  }) {
    const staticElements = Array.isArray(elements) && elements.length > 0 ? elements : EMPTY_ARRAY16;
    const [records, setRecords] = (0, import_element227.useState)(staticElements);
    const [isLoading, setIsLoading] = (0, import_element227.useState)(false);
    (0, import_element227.useEffect)(() => {
      if (!getElements) {
        setRecords(staticElements);
        return;
      }
      let cancelled = false;
      setIsLoading(true);
      getElements().then((fetchedElements) => {
        if (!cancelled) {
          const dynamicElements = Array.isArray(fetchedElements) && fetchedElements.length > 0 ? fetchedElements : staticElements;
          setRecords(dynamicElements);
        }
      }).catch(() => {
        if (!cancelled) {
          setRecords(staticElements);
        }
      }).finally(() => {
        if (!cancelled) {
          setIsLoading(false);
        }
      });
      return () => {
        cancelled = true;
      };
    }, [getElements, staticElements]);
    return {
      elements: records,
      isLoading
    };
  }

  // packages/dataviews/node_modules/date-fns/constants.js
  var daysInYear = 365.2425;
  var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1e3;
  var minTime = -maxTime;
  var millisecondsInWeek = 6048e5;
  var millisecondsInDay = 864e5;
  var secondsInHour = 3600;
  var secondsInDay = secondsInHour * 24;
  var secondsInWeek = secondsInDay * 7;
  var secondsInYear = secondsInDay * daysInYear;
  var secondsInMonth = secondsInYear / 12;
  var secondsInQuarter = secondsInMonth * 3;
  var constructFromSymbol = /* @__PURE__ */ Symbol.for("constructDateFrom");

  // packages/dataviews/node_modules/date-fns/constructFrom.js
  function constructFrom(date, value) {
    if (typeof date === "function") return date(value);
    if (date && typeof date === "object" && constructFromSymbol in date)
      return date[constructFromSymbol](value);
    if (date instanceof Date) return new date.constructor(value);
    return new Date(value);
  }

  // packages/dataviews/node_modules/date-fns/toDate.js
  function toDate(argument, context) {
    return constructFrom(context || argument, argument);
  }

  // packages/dataviews/node_modules/date-fns/addDays.js
  function addDays(date, amount, options) {
    const _date = toDate(date, options?.in);
    if (isNaN(amount)) return constructFrom(options?.in || date, NaN);
    if (!amount) return _date;
    _date.setDate(_date.getDate() + amount);
    return _date;
  }

  // packages/dataviews/node_modules/date-fns/addMonths.js
  function addMonths(date, amount, options) {
    const _date = toDate(date, options?.in);
    if (isNaN(amount)) return constructFrom(options?.in || date, NaN);
    if (!amount) {
      return _date;
    }
    const dayOfMonth = _date.getDate();
    const endOfDesiredMonth = constructFrom(options?.in || date, _date.getTime());
    endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);
    const daysInMonth = endOfDesiredMonth.getDate();
    if (dayOfMonth >= daysInMonth) {
      return endOfDesiredMonth;
    } else {
      _date.setFullYear(
        endOfDesiredMonth.getFullYear(),
        endOfDesiredMonth.getMonth(),
        dayOfMonth
      );
      return _date;
    }
  }

  // packages/dataviews/node_modules/date-fns/_lib/defaultOptions.js
  var defaultOptions = {};
  function getDefaultOptions() {
    return defaultOptions;
  }

  // packages/dataviews/node_modules/date-fns/startOfWeek.js
  function startOfWeek(date, options) {
    const defaultOptions2 = getDefaultOptions();
    const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
    const _date = toDate(date, options?.in);
    const day = _date.getDay();
    const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
    _date.setDate(_date.getDate() - diff);
    _date.setHours(0, 0, 0, 0);
    return _date;
  }

  // packages/dataviews/node_modules/date-fns/startOfISOWeek.js
  function startOfISOWeek(date, options) {
    return startOfWeek(date, { ...options, weekStartsOn: 1 });
  }

  // packages/dataviews/node_modules/date-fns/getISOWeekYear.js
  function getISOWeekYear(date, options) {
    const _date = toDate(date, options?.in);
    const year = _date.getFullYear();
    const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);
    fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
    fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
    const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
    const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);
    fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
    fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
    const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
    if (_date.getTime() >= startOfNextYear.getTime()) {
      return year + 1;
    } else if (_date.getTime() >= startOfThisYear.getTime()) {
      return year;
    } else {
      return year - 1;
    }
  }

  // packages/dataviews/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
  function getTimezoneOffsetInMilliseconds(date) {
    const _date = toDate(date);
    const utcDate = new Date(
      Date.UTC(
        _date.getFullYear(),
        _date.getMonth(),
        _date.getDate(),
        _date.getHours(),
        _date.getMinutes(),
        _date.getSeconds(),
        _date.getMilliseconds()
      )
    );
    utcDate.setUTCFullYear(_date.getFullYear());
    return +date - +utcDate;
  }

  // packages/dataviews/node_modules/date-fns/_lib/normalizeDates.js
  function normalizeDates(context, ...dates) {
    const normalize = constructFrom.bind(
      null,
      context || dates.find((date) => typeof date === "object")
    );
    return dates.map(normalize);
  }

  // packages/dataviews/node_modules/date-fns/startOfDay.js
  function startOfDay(date, options) {
    const _date = toDate(date, options?.in);
    _date.setHours(0, 0, 0, 0);
    return _date;
  }

  // packages/dataviews/node_modules/date-fns/differenceInCalendarDays.js
  function differenceInCalendarDays(laterDate, earlierDate, options) {
    const [laterDate_, earlierDate_] = normalizeDates(
      options?.in,
      laterDate,
      earlierDate
    );
    const laterStartOfDay = startOfDay(laterDate_);
    const earlierStartOfDay = startOfDay(earlierDate_);
    const laterTimestamp = +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);
    const earlierTimestamp = +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);
    return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);
  }

  // packages/dataviews/node_modules/date-fns/startOfISOWeekYear.js
  function startOfISOWeekYear(date, options) {
    const year = getISOWeekYear(date, options);
    const fourthOfJanuary = constructFrom(options?.in || date, 0);
    fourthOfJanuary.setFullYear(year, 0, 4);
    fourthOfJanuary.setHours(0, 0, 0, 0);
    return startOfISOWeek(fourthOfJanuary);
  }

  // packages/dataviews/node_modules/date-fns/addWeeks.js
  function addWeeks(date, amount, options) {
    return addDays(date, amount * 7, options);
  }

  // packages/dataviews/node_modules/date-fns/addYears.js
  function addYears(date, amount, options) {
    return addMonths(date, amount * 12, options);
  }

  // packages/dataviews/node_modules/date-fns/isDate.js
  function isDate(value) {
    return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]";
  }

  // packages/dataviews/node_modules/date-fns/isValid.js
  function isValid(date) {
    return !(!isDate(date) && typeof date !== "number" || isNaN(+toDate(date)));
  }

  // packages/dataviews/node_modules/date-fns/startOfMonth.js
  function startOfMonth(date, options) {
    const _date = toDate(date, options?.in);
    _date.setDate(1);
    _date.setHours(0, 0, 0, 0);
    return _date;
  }

  // packages/dataviews/node_modules/date-fns/startOfYear.js
  function startOfYear(date, options) {
    const date_ = toDate(date, options?.in);
    date_.setFullYear(date_.getFullYear(), 0, 1);
    date_.setHours(0, 0, 0, 0);
    return date_;
  }

  // packages/dataviews/node_modules/date-fns/locale/en-US/_lib/formatDistance.js
  var formatDistanceLocale = {
    lessThanXSeconds: {
      one: "less than a second",
      other: "less than {{count}} seconds"
    },
    xSeconds: {
      one: "1 second",
      other: "{{count}} seconds"
    },
    halfAMinute: "half a minute",
    lessThanXMinutes: {
      one: "less than a minute",
      other: "less than {{count}} minutes"
    },
    xMinutes: {
      one: "1 minute",
      other: "{{count}} minutes"
    },
    aboutXHours: {
      one: "about 1 hour",
      other: "about {{count}} hours"
    },
    xHours: {
      one: "1 hour",
      other: "{{count}} hours"
    },
    xDays: {
      one: "1 day",
      other: "{{count}} days"
    },
    aboutXWeeks: {
      one: "about 1 week",
      other: "about {{count}} weeks"
    },
    xWeeks: {
      one: "1 week",
      other: "{{count}} weeks"
    },
    aboutXMonths: {
      one: "about 1 month",
      other: "about {{count}} months"
    },
    xMonths: {
      one: "1 month",
      other: "{{count}} months"
    },
    aboutXYears: {
      one: "about 1 year",
      other: "about {{count}} years"
    },
    xYears: {
      one: "1 year",
      other: "{{count}} years"
    },
    overXYears: {
      one: "over 1 year",
      other: "over {{count}} years"
    },
    almostXYears: {
      one: "almost 1 year",
      other: "almost {{count}} years"
    }
  };
  var formatDistance = (token, count, options) => {
    let result;
    const tokenValue = formatDistanceLocale[token];
    if (typeof tokenValue === "string") {
      result = tokenValue;
    } else if (count === 1) {
      result = tokenValue.one;
    } else {
      result = tokenValue.other.replace("{{count}}", count.toString());
    }
    if (options?.addSuffix) {
      if (options.comparison && options.comparison > 0) {
        return "in " + result;
      } else {
        return result + " ago";
      }
    }
    return result;
  };

  // packages/dataviews/node_modules/date-fns/locale/_lib/buildFormatLongFn.js
  function buildFormatLongFn(args) {
    return (options = {}) => {
      const width = options.width ? String(options.width) : args.defaultWidth;
      const format6 = args.formats[width] || args.formats[args.defaultWidth];
      return format6;
    };
  }

  // packages/dataviews/node_modules/date-fns/locale/en-US/_lib/formatLong.js
  var dateFormats = {
    full: "EEEE, MMMM do, y",
    long: "MMMM do, y",
    medium: "MMM d, y",
    short: "MM/dd/yyyy"
  };
  var timeFormats = {
    full: "h:mm:ss a zzzz",
    long: "h:mm:ss a z",
    medium: "h:mm:ss a",
    short: "h:mm a"
  };
  var dateTimeFormats = {
    full: "{{date}} 'at' {{time}}",
    long: "{{date}} 'at' {{time}}",
    medium: "{{date}}, {{time}}",
    short: "{{date}}, {{time}}"
  };
  var formatLong = {
    date: buildFormatLongFn({
      formats: dateFormats,
      defaultWidth: "full"
    }),
    time: buildFormatLongFn({
      formats: timeFormats,
      defaultWidth: "full"
    }),
    dateTime: buildFormatLongFn({
      formats: dateTimeFormats,
      defaultWidth: "full"
    })
  };

  // packages/dataviews/node_modules/date-fns/locale/en-US/_lib/formatRelative.js
  var formatRelativeLocale = {
    lastWeek: "'last' eeee 'at' p",
    yesterday: "'yesterday at' p",
    today: "'today at' p",
    tomorrow: "'tomorrow at' p",
    nextWeek: "eeee 'at' p",
    other: "P"
  };
  var formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];

  // packages/dataviews/node_modules/date-fns/locale/_lib/buildLocalizeFn.js
  function buildLocalizeFn(args) {
    return (value, options) => {
      const context = options?.context ? String(options.context) : "standalone";
      let valuesArray;
      if (context === "formatting" && args.formattingValues) {
        const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
        const width = options?.width ? String(options.width) : defaultWidth;
        valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
      } else {
        const defaultWidth = args.defaultWidth;
        const width = options?.width ? String(options.width) : args.defaultWidth;
        valuesArray = args.values[width] || args.values[defaultWidth];
      }
      const index = args.argumentCallback ? args.argumentCallback(value) : value;
      return valuesArray[index];
    };
  }

  // packages/dataviews/node_modules/date-fns/locale/en-US/_lib/localize.js
  var eraValues = {
    narrow: ["B", "A"],
    abbreviated: ["BC", "AD"],
    wide: ["Before Christ", "Anno Domini"]
  };
  var quarterValues = {
    narrow: ["1", "2", "3", "4"],
    abbreviated: ["Q1", "Q2", "Q3", "Q4"],
    wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
  };
  var monthValues = {
    narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
    abbreviated: [
      "Jan",
      "Feb",
      "Mar",
      "Apr",
      "May",
      "Jun",
      "Jul",
      "Aug",
      "Sep",
      "Oct",
      "Nov",
      "Dec"
    ],
    wide: [
      "January",
      "February",
      "March",
      "April",
      "May",
      "June",
      "July",
      "August",
      "September",
      "October",
      "November",
      "December"
    ]
  };
  var dayValues = {
    narrow: ["S", "M", "T", "W", "T", "F", "S"],
    short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
    abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
    wide: [
      "Sunday",
      "Monday",
      "Tuesday",
      "Wednesday",
      "Thursday",
      "Friday",
      "Saturday"
    ]
  };
  var dayPeriodValues = {
    narrow: {
      am: "a",
      pm: "p",
      midnight: "mi",
      noon: "n",
      morning: "morning",
      afternoon: "afternoon",
      evening: "evening",
      night: "night"
    },
    abbreviated: {
      am: "AM",
      pm: "PM",
      midnight: "midnight",
      noon: "noon",
      morning: "morning",
      afternoon: "afternoon",
      evening: "evening",
      night: "night"
    },
    wide: {
      am: "a.m.",
      pm: "p.m.",
      midnight: "midnight",
      noon: "noon",
      morning: "morning",
      afternoon: "afternoon",
      evening: "evening",
      night: "night"
    }
  };
  var formattingDayPeriodValues = {
    narrow: {
      am: "a",
      pm: "p",
      midnight: "mi",
      noon: "n",
      morning: "in the morning",
      afternoon: "in the afternoon",
      evening: "in the evening",
      night: "at night"
    },
    abbreviated: {
      am: "AM",
      pm: "PM",
      midnight: "midnight",
      noon: "noon",
      morning: "in the morning",
      afternoon: "in the afternoon",
      evening: "in the evening",
      night: "at night"
    },
    wide: {
      am: "a.m.",
      pm: "p.m.",
      midnight: "midnight",
      noon: "noon",
      morning: "in the morning",
      afternoon: "in the afternoon",
      evening: "in the evening",
      night: "at night"
    }
  };
  var ordinalNumber = (dirtyNumber, _options) => {
    const number = Number(dirtyNumber);
    const rem100 = number % 100;
    if (rem100 > 20 || rem100 < 10) {
      switch (rem100 % 10) {
        case 1:
          return number + "st";
        case 2:
          return number + "nd";
        case 3:
          return number + "rd";
      }
    }
    return number + "th";
  };
  var localize = {
    ordinalNumber,
    era: buildLocalizeFn({
      values: eraValues,
      defaultWidth: "wide"
    }),
    quarter: buildLocalizeFn({
      values: quarterValues,
      defaultWidth: "wide",
      argumentCallback: (quarter) => quarter - 1
    }),
    month: buildLocalizeFn({
      values: monthValues,
      defaultWidth: "wide"
    }),
    day: buildLocalizeFn({
      values: dayValues,
      defaultWidth: "wide"
    }),
    dayPeriod: buildLocalizeFn({
      values: dayPeriodValues,
      defaultWidth: "wide",
      formattingValues: formattingDayPeriodValues,
      defaultFormattingWidth: "wide"
    })
  };

  // packages/dataviews/node_modules/date-fns/locale/_lib/buildMatchFn.js
  function buildMatchFn(args) {
    return (string, options = {}) => {
      const width = options.width;
      const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
      const matchResult = string.match(matchPattern);
      if (!matchResult) {
        return null;
      }
      const matchedString = matchResult[0];
      const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
      const key = Array.isArray(parsePatterns) ? findIndex2(parsePatterns, (pattern) => pattern.test(matchedString)) : (
        // [TODO] -- I challenge you to fix the type
        findKey(parsePatterns, (pattern) => pattern.test(matchedString))
      );
      let value;
      value = args.valueCallback ? args.valueCallback(key) : key;
      value = options.valueCallback ? (
        // [TODO] -- I challenge you to fix the type
        options.valueCallback(value)
      ) : value;
      const rest = string.slice(matchedString.length);
      return { value, rest };
    };
  }
  function findKey(object, predicate) {
    for (const key in object) {
      if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
        return key;
      }
    }
    return void 0;
  }
  function findIndex2(array, predicate) {
    for (let key = 0; key < array.length; key++) {
      if (predicate(array[key])) {
        return key;
      }
    }
    return void 0;
  }

  // packages/dataviews/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
  function buildMatchPatternFn(args) {
    return (string, options = {}) => {
      const matchResult = string.match(args.matchPattern);
      if (!matchResult) return null;
      const matchedString = matchResult[0];
      const parseResult = string.match(args.parsePattern);
      if (!parseResult) return null;
      let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
      value = options.valueCallback ? options.valueCallback(value) : value;
      const rest = string.slice(matchedString.length);
      return { value, rest };
    };
  }

  // packages/dataviews/node_modules/date-fns/locale/en-US/_lib/match.js
  var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
  var parseOrdinalNumberPattern = /\d+/i;
  var matchEraPatterns = {
    narrow: /^(b|a)/i,
    abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
    wide: /^(before christ|before common era|anno domini|common era)/i
  };
  var parseEraPatterns = {
    any: [/^b/i, /^(a|c)/i]
  };
  var matchQuarterPatterns = {
    narrow: /^[1234]/i,
    abbreviated: /^q[1234]/i,
    wide: /^[1234](th|st|nd|rd)? quarter/i
  };
  var parseQuarterPatterns = {
    any: [/1/i, /2/i, /3/i, /4/i]
  };
  var matchMonthPatterns = {
    narrow: /^[jfmasond]/i,
    abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
    wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
  };
  var parseMonthPatterns = {
    narrow: [
      /^j/i,
      /^f/i,
      /^m/i,
      /^a/i,
      /^m/i,
      /^j/i,
      /^j/i,
      /^a/i,
      /^s/i,
      /^o/i,
      /^n/i,
      /^d/i
    ],
    any: [
      /^ja/i,
      /^f/i,
      /^mar/i,
      /^ap/i,
      /^may/i,
      /^jun/i,
      /^jul/i,
      /^au/i,
      /^s/i,
      /^o/i,
      /^n/i,
      /^d/i
    ]
  };
  var matchDayPatterns = {
    narrow: /^[smtwf]/i,
    short: /^(su|mo|tu|we|th|fr|sa)/i,
    abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
    wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
  };
  var parseDayPatterns = {
    narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
    any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
  };
  var matchDayPeriodPatterns = {
    narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
    any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
  };
  var parseDayPeriodPatterns = {
    any: {
      am: /^a/i,
      pm: /^p/i,
      midnight: /^mi/i,
      noon: /^no/i,
      morning: /morning/i,
      afternoon: /afternoon/i,
      evening: /evening/i,
      night: /night/i
    }
  };
  var match = {
    ordinalNumber: buildMatchPatternFn({
      matchPattern: matchOrdinalNumberPattern,
      parsePattern: parseOrdinalNumberPattern,
      valueCallback: (value) => parseInt(value, 10)
    }),
    era: buildMatchFn({
      matchPatterns: matchEraPatterns,
      defaultMatchWidth: "wide",
      parsePatterns: parseEraPatterns,
      defaultParseWidth: "any"
    }),
    quarter: buildMatchFn({
      matchPatterns: matchQuarterPatterns,
      defaultMatchWidth: "wide",
      parsePatterns: parseQuarterPatterns,
      defaultParseWidth: "any",
      valueCallback: (index) => index + 1
    }),
    month: buildMatchFn({
      matchPatterns: matchMonthPatterns,
      defaultMatchWidth: "wide",
      parsePatterns: parseMonthPatterns,
      defaultParseWidth: "any"
    }),
    day: buildMatchFn({
      matchPatterns: matchDayPatterns,
      defaultMatchWidth: "wide",
      parsePatterns: parseDayPatterns,
      defaultParseWidth: "any"
    }),
    dayPeriod: buildMatchFn({
      matchPatterns: matchDayPeriodPatterns,
      defaultMatchWidth: "any",
      parsePatterns: parseDayPeriodPatterns,
      defaultParseWidth: "any"
    })
  };

  // packages/dataviews/node_modules/date-fns/locale/en-US.js
  var enUS = {
    code: "en-US",
    formatDistance,
    formatLong,
    formatRelative,
    localize,
    match,
    options: {
      weekStartsOn: 0,
      firstWeekContainsDate: 1
    }
  };

  // packages/dataviews/node_modules/date-fns/getDayOfYear.js
  function getDayOfYear(date, options) {
    const _date = toDate(date, options?.in);
    const diff = differenceInCalendarDays(_date, startOfYear(_date));
    const dayOfYear = diff + 1;
    return dayOfYear;
  }

  // packages/dataviews/node_modules/date-fns/getISOWeek.js
  function getISOWeek(date, options) {
    const _date = toDate(date, options?.in);
    const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);
    return Math.round(diff / millisecondsInWeek) + 1;
  }

  // packages/dataviews/node_modules/date-fns/getWeekYear.js
  function getWeekYear(date, options) {
    const _date = toDate(date, options?.in);
    const year = _date.getFullYear();
    const defaultOptions2 = getDefaultOptions();
    const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
    const firstWeekOfNextYear = constructFrom(options?.in || date, 0);
    firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
    firstWeekOfNextYear.setHours(0, 0, 0, 0);
    const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);
    const firstWeekOfThisYear = constructFrom(options?.in || date, 0);
    firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);
    firstWeekOfThisYear.setHours(0, 0, 0, 0);
    const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);
    if (+_date >= +startOfNextYear) {
      return year + 1;
    } else if (+_date >= +startOfThisYear) {
      return year;
    } else {
      return year - 1;
    }
  }

  // packages/dataviews/node_modules/date-fns/startOfWeekYear.js
  function startOfWeekYear(date, options) {
    const defaultOptions2 = getDefaultOptions();
    const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
    const year = getWeekYear(date, options);
    const firstWeek = constructFrom(options?.in || date, 0);
    firstWeek.setFullYear(year, 0, firstWeekContainsDate);
    firstWeek.setHours(0, 0, 0, 0);
    const _date = startOfWeek(firstWeek, options);
    return _date;
  }

  // packages/dataviews/node_modules/date-fns/getWeek.js
  function getWeek(date, options) {
    const _date = toDate(date, options?.in);
    const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);
    return Math.round(diff / millisecondsInWeek) + 1;
  }

  // packages/dataviews/node_modules/date-fns/_lib/addLeadingZeros.js
  function addLeadingZeros(number, targetLength) {
    const sign = number < 0 ? "-" : "";
    const output = Math.abs(number).toString().padStart(targetLength, "0");
    return sign + output;
  }

  // packages/dataviews/node_modules/date-fns/_lib/format/lightFormatters.js
  var lightFormatters = {
    // Year
    y(date, token) {
      const signedYear = date.getFullYear();
      const year = signedYear > 0 ? signedYear : 1 - signedYear;
      return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
    },
    // Month
    M(date, token) {
      const month = date.getMonth();
      return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
    },
    // Day of the month
    d(date, token) {
      return addLeadingZeros(date.getDate(), token.length);
    },
    // AM or PM
    a(date, token) {
      const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am";
      switch (token) {
        case "a":
        case "aa":
          return dayPeriodEnumValue.toUpperCase();
        case "aaa":
          return dayPeriodEnumValue;
        case "aaaaa":
          return dayPeriodEnumValue[0];
        case "aaaa":
        default:
          return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
      }
    },
    // Hour [1-12]
    h(date, token) {
      return addLeadingZeros(date.getHours() % 12 || 12, token.length);
    },
    // Hour [0-23]
    H(date, token) {
      return addLeadingZeros(date.getHours(), token.length);
    },
    // Minute
    m(date, token) {
      return addLeadingZeros(date.getMinutes(), token.length);
    },
    // Second
    s(date, token) {
      return addLeadingZeros(date.getSeconds(), token.length);
    },
    // Fraction of second
    S(date, token) {
      const numberOfDigits = token.length;
      const milliseconds = date.getMilliseconds();
      const fractionalSeconds = Math.trunc(
        milliseconds * Math.pow(10, numberOfDigits - 3)
      );
      return addLeadingZeros(fractionalSeconds, token.length);
    }
  };

  // packages/dataviews/node_modules/date-fns/_lib/format/formatters.js
  var dayPeriodEnum = {
    am: "am",
    pm: "pm",
    midnight: "midnight",
    noon: "noon",
    morning: "morning",
    afternoon: "afternoon",
    evening: "evening",
    night: "night"
  };
  var formatters = {
    // Era
    G: function(date, token, localize2) {
      const era = date.getFullYear() > 0 ? 1 : 0;
      switch (token) {
        // AD, BC
        case "G":
        case "GG":
        case "GGG":
          return localize2.era(era, { width: "abbreviated" });
        // A, B
        case "GGGGG":
          return localize2.era(era, { width: "narrow" });
        // Anno Domini, Before Christ
        case "GGGG":
        default:
          return localize2.era(era, { width: "wide" });
      }
    },
    // Year
    y: function(date, token, localize2) {
      if (token === "yo") {
        const signedYear = date.getFullYear();
        const year = signedYear > 0 ? signedYear : 1 - signedYear;
        return localize2.ordinalNumber(year, { unit: "year" });
      }
      return lightFormatters.y(date, token);
    },
    // Local week-numbering year
    Y: function(date, token, localize2, options) {
      const signedWeekYear = getWeekYear(date, options);
      const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
      if (token === "YY") {
        const twoDigitYear = weekYear % 100;
        return addLeadingZeros(twoDigitYear, 2);
      }
      if (token === "Yo") {
        return localize2.ordinalNumber(weekYear, { unit: "year" });
      }
      return addLeadingZeros(weekYear, token.length);
    },
    // ISO week-numbering year
    R: function(date, token) {
      const isoWeekYear = getISOWeekYear(date);
      return addLeadingZeros(isoWeekYear, token.length);
    },
    // Extended year. This is a single number designating the year of this calendar system.
    // The main difference between `y` and `u` localizers are B.C. years:
    // | Year | `y` | `u` |
    // |------|-----|-----|
    // | AC 1 |   1 |   1 |
    // | BC 1 |   1 |   0 |
    // | BC 2 |   2 |  -1 |
    // Also `yy` always returns the last two digits of a year,
    // while `uu` pads single digit years to 2 characters and returns other years unchanged.
    u: function(date, token) {
      const year = date.getFullYear();
      return addLeadingZeros(year, token.length);
    },
    // Quarter
    Q: function(date, token, localize2) {
      const quarter = Math.ceil((date.getMonth() + 1) / 3);
      switch (token) {
        // 1, 2, 3, 4
        case "Q":
          return String(quarter);
        // 01, 02, 03, 04
        case "QQ":
          return addLeadingZeros(quarter, 2);
        // 1st, 2nd, 3rd, 4th
        case "Qo":
          return localize2.ordinalNumber(quarter, { unit: "quarter" });
        // Q1, Q2, Q3, Q4
        case "QQQ":
          return localize2.quarter(quarter, {
            width: "abbreviated",
            context: "formatting"
          });
        // 1, 2, 3, 4 (narrow quarter; could be not numerical)
        case "QQQQQ":
          return localize2.quarter(quarter, {
            width: "narrow",
            context: "formatting"
          });
        // 1st quarter, 2nd quarter, ...
        case "QQQQ":
        default:
          return localize2.quarter(quarter, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // Stand-alone quarter
    q: function(date, token, localize2) {
      const quarter = Math.ceil((date.getMonth() + 1) / 3);
      switch (token) {
        // 1, 2, 3, 4
        case "q":
          return String(quarter);
        // 01, 02, 03, 04
        case "qq":
          return addLeadingZeros(quarter, 2);
        // 1st, 2nd, 3rd, 4th
        case "qo":
          return localize2.ordinalNumber(quarter, { unit: "quarter" });
        // Q1, Q2, Q3, Q4
        case "qqq":
          return localize2.quarter(quarter, {
            width: "abbreviated",
            context: "standalone"
          });
        // 1, 2, 3, 4 (narrow quarter; could be not numerical)
        case "qqqqq":
          return localize2.quarter(quarter, {
            width: "narrow",
            context: "standalone"
          });
        // 1st quarter, 2nd quarter, ...
        case "qqqq":
        default:
          return localize2.quarter(quarter, {
            width: "wide",
            context: "standalone"
          });
      }
    },
    // Month
    M: function(date, token, localize2) {
      const month = date.getMonth();
      switch (token) {
        case "M":
        case "MM":
          return lightFormatters.M(date, token);
        // 1st, 2nd, ..., 12th
        case "Mo":
          return localize2.ordinalNumber(month + 1, { unit: "month" });
        // Jan, Feb, ..., Dec
        case "MMM":
          return localize2.month(month, {
            width: "abbreviated",
            context: "formatting"
          });
        // J, F, ..., D
        case "MMMMM":
          return localize2.month(month, {
            width: "narrow",
            context: "formatting"
          });
        // January, February, ..., December
        case "MMMM":
        default:
          return localize2.month(month, { width: "wide", context: "formatting" });
      }
    },
    // Stand-alone month
    L: function(date, token, localize2) {
      const month = date.getMonth();
      switch (token) {
        // 1, 2, ..., 12
        case "L":
          return String(month + 1);
        // 01, 02, ..., 12
        case "LL":
          return addLeadingZeros(month + 1, 2);
        // 1st, 2nd, ..., 12th
        case "Lo":
          return localize2.ordinalNumber(month + 1, { unit: "month" });
        // Jan, Feb, ..., Dec
        case "LLL":
          return localize2.month(month, {
            width: "abbreviated",
            context: "standalone"
          });
        // J, F, ..., D
        case "LLLLL":
          return localize2.month(month, {
            width: "narrow",
            context: "standalone"
          });
        // January, February, ..., December
        case "LLLL":
        default:
          return localize2.month(month, { width: "wide", context: "standalone" });
      }
    },
    // Local week of year
    w: function(date, token, localize2, options) {
      const week = getWeek(date, options);
      if (token === "wo") {
        return localize2.ordinalNumber(week, { unit: "week" });
      }
      return addLeadingZeros(week, token.length);
    },
    // ISO week of year
    I: function(date, token, localize2) {
      const isoWeek = getISOWeek(date);
      if (token === "Io") {
        return localize2.ordinalNumber(isoWeek, { unit: "week" });
      }
      return addLeadingZeros(isoWeek, token.length);
    },
    // Day of the month
    d: function(date, token, localize2) {
      if (token === "do") {
        return localize2.ordinalNumber(date.getDate(), { unit: "date" });
      }
      return lightFormatters.d(date, token);
    },
    // Day of year
    D: function(date, token, localize2) {
      const dayOfYear = getDayOfYear(date);
      if (token === "Do") {
        return localize2.ordinalNumber(dayOfYear, { unit: "dayOfYear" });
      }
      return addLeadingZeros(dayOfYear, token.length);
    },
    // Day of week
    E: function(date, token, localize2) {
      const dayOfWeek = date.getDay();
      switch (token) {
        // Tue
        case "E":
        case "EE":
        case "EEE":
          return localize2.day(dayOfWeek, {
            width: "abbreviated",
            context: "formatting"
          });
        // T
        case "EEEEE":
          return localize2.day(dayOfWeek, {
            width: "narrow",
            context: "formatting"
          });
        // Tu
        case "EEEEEE":
          return localize2.day(dayOfWeek, {
            width: "short",
            context: "formatting"
          });
        // Tuesday
        case "EEEE":
        default:
          return localize2.day(dayOfWeek, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // Local day of week
    e: function(date, token, localize2, options) {
      const dayOfWeek = date.getDay();
      const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
      switch (token) {
        // Numerical value (Nth day of week with current locale or weekStartsOn)
        case "e":
          return String(localDayOfWeek);
        // Padded numerical value
        case "ee":
          return addLeadingZeros(localDayOfWeek, 2);
        // 1st, 2nd, ..., 7th
        case "eo":
          return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
        case "eee":
          return localize2.day(dayOfWeek, {
            width: "abbreviated",
            context: "formatting"
          });
        // T
        case "eeeee":
          return localize2.day(dayOfWeek, {
            width: "narrow",
            context: "formatting"
          });
        // Tu
        case "eeeeee":
          return localize2.day(dayOfWeek, {
            width: "short",
            context: "formatting"
          });
        // Tuesday
        case "eeee":
        default:
          return localize2.day(dayOfWeek, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // Stand-alone local day of week
    c: function(date, token, localize2, options) {
      const dayOfWeek = date.getDay();
      const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
      switch (token) {
        // Numerical value (same as in `e`)
        case "c":
          return String(localDayOfWeek);
        // Padded numerical value
        case "cc":
          return addLeadingZeros(localDayOfWeek, token.length);
        // 1st, 2nd, ..., 7th
        case "co":
          return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
        case "ccc":
          return localize2.day(dayOfWeek, {
            width: "abbreviated",
            context: "standalone"
          });
        // T
        case "ccccc":
          return localize2.day(dayOfWeek, {
            width: "narrow",
            context: "standalone"
          });
        // Tu
        case "cccccc":
          return localize2.day(dayOfWeek, {
            width: "short",
            context: "standalone"
          });
        // Tuesday
        case "cccc":
        default:
          return localize2.day(dayOfWeek, {
            width: "wide",
            context: "standalone"
          });
      }
    },
    // ISO day of week
    i: function(date, token, localize2) {
      const dayOfWeek = date.getDay();
      const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
      switch (token) {
        // 2
        case "i":
          return String(isoDayOfWeek);
        // 02
        case "ii":
          return addLeadingZeros(isoDayOfWeek, token.length);
        // 2nd
        case "io":
          return localize2.ordinalNumber(isoDayOfWeek, { unit: "day" });
        // Tue
        case "iii":
          return localize2.day(dayOfWeek, {
            width: "abbreviated",
            context: "formatting"
          });
        // T
        case "iiiii":
          return localize2.day(dayOfWeek, {
            width: "narrow",
            context: "formatting"
          });
        // Tu
        case "iiiiii":
          return localize2.day(dayOfWeek, {
            width: "short",
            context: "formatting"
          });
        // Tuesday
        case "iiii":
        default:
          return localize2.day(dayOfWeek, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // AM or PM
    a: function(date, token, localize2) {
      const hours = date.getHours();
      const dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
      switch (token) {
        case "a":
        case "aa":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          });
        case "aaa":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          }).toLowerCase();
        case "aaaaa":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "narrow",
            context: "formatting"
          });
        case "aaaa":
        default:
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // AM, PM, midnight, noon
    b: function(date, token, localize2) {
      const hours = date.getHours();
      let dayPeriodEnumValue;
      if (hours === 12) {
        dayPeriodEnumValue = dayPeriodEnum.noon;
      } else if (hours === 0) {
        dayPeriodEnumValue = dayPeriodEnum.midnight;
      } else {
        dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
      }
      switch (token) {
        case "b":
        case "bb":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          });
        case "bbb":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          }).toLowerCase();
        case "bbbbb":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "narrow",
            context: "formatting"
          });
        case "bbbb":
        default:
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // in the morning, in the afternoon, in the evening, at night
    B: function(date, token, localize2) {
      const hours = date.getHours();
      let dayPeriodEnumValue;
      if (hours >= 17) {
        dayPeriodEnumValue = dayPeriodEnum.evening;
      } else if (hours >= 12) {
        dayPeriodEnumValue = dayPeriodEnum.afternoon;
      } else if (hours >= 4) {
        dayPeriodEnumValue = dayPeriodEnum.morning;
      } else {
        dayPeriodEnumValue = dayPeriodEnum.night;
      }
      switch (token) {
        case "B":
        case "BB":
        case "BBB":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          });
        case "BBBBB":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "narrow",
            context: "formatting"
          });
        case "BBBB":
        default:
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // Hour [1-12]
    h: function(date, token, localize2) {
      if (token === "ho") {
        let hours = date.getHours() % 12;
        if (hours === 0) hours = 12;
        return localize2.ordinalNumber(hours, { unit: "hour" });
      }
      return lightFormatters.h(date, token);
    },
    // Hour [0-23]
    H: function(date, token, localize2) {
      if (token === "Ho") {
        return localize2.ordinalNumber(date.getHours(), { unit: "hour" });
      }
      return lightFormatters.H(date, token);
    },
    // Hour [0-11]
    K: function(date, token, localize2) {
      const hours = date.getHours() % 12;
      if (token === "Ko") {
        return localize2.ordinalNumber(hours, { unit: "hour" });
      }
      return addLeadingZeros(hours, token.length);
    },
    // Hour [1-24]
    k: function(date, token, localize2) {
      let hours = date.getHours();
      if (hours === 0) hours = 24;
      if (token === "ko") {
        return localize2.ordinalNumber(hours, { unit: "hour" });
      }
      return addLeadingZeros(hours, token.length);
    },
    // Minute
    m: function(date, token, localize2) {
      if (token === "mo") {
        return localize2.ordinalNumber(date.getMinutes(), { unit: "minute" });
      }
      return lightFormatters.m(date, token);
    },
    // Second
    s: function(date, token, localize2) {
      if (token === "so") {
        return localize2.ordinalNumber(date.getSeconds(), { unit: "second" });
      }
      return lightFormatters.s(date, token);
    },
    // Fraction of second
    S: function(date, token) {
      return lightFormatters.S(date, token);
    },
    // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
    X: function(date, token, _localize) {
      const timezoneOffset = date.getTimezoneOffset();
      if (timezoneOffset === 0) {
        return "Z";
      }
      switch (token) {
        // Hours and optional minutes
        case "X":
          return formatTimezoneWithOptionalMinutes(timezoneOffset);
        // Hours, minutes and optional seconds without `:` delimiter
        // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
        // so this token always has the same output as `XX`
        case "XXXX":
        case "XX":
          return formatTimezone(timezoneOffset);
        // Hours, minutes and optional seconds with `:` delimiter
        // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
        // so this token always has the same output as `XXX`
        case "XXXXX":
        case "XXX":
        // Hours and minutes with `:` delimiter
        default:
          return formatTimezone(timezoneOffset, ":");
      }
    },
    // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
    x: function(date, token, _localize) {
      const timezoneOffset = date.getTimezoneOffset();
      switch (token) {
        // Hours and optional minutes
        case "x":
          return formatTimezoneWithOptionalMinutes(timezoneOffset);
        // Hours, minutes and optional seconds without `:` delimiter
        // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
        // so this token always has the same output as `xx`
        case "xxxx":
        case "xx":
          return formatTimezone(timezoneOffset);
        // Hours, minutes and optional seconds with `:` delimiter
        // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
        // so this token always has the same output as `xxx`
        case "xxxxx":
        case "xxx":
        // Hours and minutes with `:` delimiter
        default:
          return formatTimezone(timezoneOffset, ":");
      }
    },
    // Timezone (GMT)
    O: function(date, token, _localize) {
      const timezoneOffset = date.getTimezoneOffset();
      switch (token) {
        // Short
        case "O":
        case "OO":
        case "OOO":
          return "GMT" + formatTimezoneShort(timezoneOffset, ":");
        // Long
        case "OOOO":
        default:
          return "GMT" + formatTimezone(timezoneOffset, ":");
      }
    },
    // Timezone (specific non-location)
    z: function(date, token, _localize) {
      const timezoneOffset = date.getTimezoneOffset();
      switch (token) {
        // Short
        case "z":
        case "zz":
        case "zzz":
          return "GMT" + formatTimezoneShort(timezoneOffset, ":");
        // Long
        case "zzzz":
        default:
          return "GMT" + formatTimezone(timezoneOffset, ":");
      }
    },
    // Seconds timestamp
    t: function(date, token, _localize) {
      const timestamp = Math.trunc(+date / 1e3);
      return addLeadingZeros(timestamp, token.length);
    },
    // Milliseconds timestamp
    T: function(date, token, _localize) {
      return addLeadingZeros(+date, token.length);
    }
  };
  function formatTimezoneShort(offset, delimiter = "") {
    const sign = offset > 0 ? "-" : "+";
    const absOffset = Math.abs(offset);
    const hours = Math.trunc(absOffset / 60);
    const minutes = absOffset % 60;
    if (minutes === 0) {
      return sign + String(hours);
    }
    return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
  }
  function formatTimezoneWithOptionalMinutes(offset, delimiter) {
    if (offset % 60 === 0) {
      const sign = offset > 0 ? "-" : "+";
      return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
    }
    return formatTimezone(offset, delimiter);
  }
  function formatTimezone(offset, delimiter = "") {
    const sign = offset > 0 ? "-" : "+";
    const absOffset = Math.abs(offset);
    const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);
    const minutes = addLeadingZeros(absOffset % 60, 2);
    return sign + hours + delimiter + minutes;
  }

  // packages/dataviews/node_modules/date-fns/_lib/format/longFormatters.js
  var dateLongFormatter = (pattern, formatLong2) => {
    switch (pattern) {
      case "P":
        return formatLong2.date({ width: "short" });
      case "PP":
        return formatLong2.date({ width: "medium" });
      case "PPP":
        return formatLong2.date({ width: "long" });
      case "PPPP":
      default:
        return formatLong2.date({ width: "full" });
    }
  };
  var timeLongFormatter = (pattern, formatLong2) => {
    switch (pattern) {
      case "p":
        return formatLong2.time({ width: "short" });
      case "pp":
        return formatLong2.time({ width: "medium" });
      case "ppp":
        return formatLong2.time({ width: "long" });
      case "pppp":
      default:
        return formatLong2.time({ width: "full" });
    }
  };
  var dateTimeLongFormatter = (pattern, formatLong2) => {
    const matchResult = pattern.match(/(P+)(p+)?/) || [];
    const datePattern = matchResult[1];
    const timePattern = matchResult[2];
    if (!timePattern) {
      return dateLongFormatter(pattern, formatLong2);
    }
    let dateTimeFormat;
    switch (datePattern) {
      case "P":
        dateTimeFormat = formatLong2.dateTime({ width: "short" });
        break;
      case "PP":
        dateTimeFormat = formatLong2.dateTime({ width: "medium" });
        break;
      case "PPP":
        dateTimeFormat = formatLong2.dateTime({ width: "long" });
        break;
      case "PPPP":
      default:
        dateTimeFormat = formatLong2.dateTime({ width: "full" });
        break;
    }
    return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
  };
  var longFormatters = {
    p: timeLongFormatter,
    P: dateTimeLongFormatter
  };

  // packages/dataviews/node_modules/date-fns/_lib/protectedTokens.js
  var dayOfYearTokenRE = /^D+$/;
  var weekYearTokenRE = /^Y+$/;
  var throwTokens = ["D", "DD", "YY", "YYYY"];
  function isProtectedDayOfYearToken(token) {
    return dayOfYearTokenRE.test(token);
  }
  function isProtectedWeekYearToken(token) {
    return weekYearTokenRE.test(token);
  }
  function warnOrThrowProtectedError(token, format6, input) {
    const _message = message(token, format6, input);
    console.warn(_message);
    if (throwTokens.includes(token)) throw new RangeError(_message);
  }
  function message(token, format6, input) {
    const subject = token[0] === "Y" ? "years" : "days of the month";
    return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format6}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
  }

  // packages/dataviews/node_modules/date-fns/format.js
  var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
  var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
  var escapedStringRegExp = /^'([^]*?)'?$/;
  var doubleQuoteRegExp = /''/g;
  var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
  function format(date, formatStr, options) {
    const defaultOptions2 = getDefaultOptions();
    const locale = options?.locale ?? defaultOptions2.locale ?? enUS;
    const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
    const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
    const originalDate = toDate(date, options?.in);
    if (!isValid(originalDate)) {
      throw new RangeError("Invalid time value");
    }
    let parts = formatStr.match(longFormattingTokensRegExp).map((substring) => {
      const firstCharacter = substring[0];
      if (firstCharacter === "p" || firstCharacter === "P") {
        const longFormatter = longFormatters[firstCharacter];
        return longFormatter(substring, locale.formatLong);
      }
      return substring;
    }).join("").match(formattingTokensRegExp).map((substring) => {
      if (substring === "''") {
        return { isToken: false, value: "'" };
      }
      const firstCharacter = substring[0];
      if (firstCharacter === "'") {
        return { isToken: false, value: cleanEscapedString(substring) };
      }
      if (formatters[firstCharacter]) {
        return { isToken: true, value: substring };
      }
      if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
        throw new RangeError(
          "Format string contains an unescaped latin alphabet character `" + firstCharacter + "`"
        );
      }
      return { isToken: false, value: substring };
    });
    if (locale.localize.preprocessor) {
      parts = locale.localize.preprocessor(originalDate, parts);
    }
    const formatterOptions = {
      firstWeekContainsDate,
      weekStartsOn,
      locale
    };
    return parts.map((part) => {
      if (!part.isToken) return part.value;
      const token = part.value;
      if (!options?.useAdditionalWeekYearTokens && isProtectedWeekYearToken(token) || !options?.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(token)) {
        warnOrThrowProtectedError(token, formatStr, String(date));
      }
      const formatter = formatters[token[0]];
      return formatter(originalDate, token, locale.localize, formatterOptions);
    }).join("");
  }
  function cleanEscapedString(input) {
    const matched = input.match(escapedStringRegExp);
    if (!matched) {
      return input;
    }
    return matched[1].replace(doubleQuoteRegExp, "'");
  }

  // packages/dataviews/node_modules/date-fns/subDays.js
  function subDays(date, amount, options) {
    return addDays(date, -amount, options);
  }

  // packages/dataviews/node_modules/date-fns/subMonths.js
  function subMonths(date, amount, options) {
    return addMonths(date, -amount, options);
  }

  // packages/dataviews/node_modules/date-fns/subWeeks.js
  function subWeeks(date, amount, options) {
    return addWeeks(date, -amount, options);
  }

  // packages/dataviews/node_modules/date-fns/subYears.js
  function subYears(date, amount, options) {
    return addYears(date, -amount, options);
  }

  // packages/dataviews/build-module/utils/operators.mjs
  var import_i18n208 = __toESM(require_i18n(), 1);
  var import_element228 = __toESM(require_element(), 1);
  var import_date3 = __toESM(require_date(), 1);
  var import_jsx_runtime398 = __toESM(require_jsx_runtime(), 1);
  var filterTextWrappers = {
    Name: /* @__PURE__ */ (0, import_jsx_runtime398.jsx)("span", { className: "dataviews-filters__summary-filter-text-name" }),
    Value: /* @__PURE__ */ (0, import_jsx_runtime398.jsx)("span", { className: "dataviews-filters__summary-filter-text-value" })
  };
  function getRelativeDate(value, unit) {
    switch (unit) {
      case "days":
        return subDays(/* @__PURE__ */ new Date(), value);
      case "weeks":
        return subWeeks(/* @__PURE__ */ new Date(), value);
      case "months":
        return subMonths(/* @__PURE__ */ new Date(), value);
      case "years":
        return subYears(/* @__PURE__ */ new Date(), value);
      default:
        return /* @__PURE__ */ new Date();
    }
  }
  var isNoneOperatorDefinition = {
    /* translators: DataViews operator name */
    label: (0, import_i18n208.__)("Is none of"),
    filterText: (filter, activeElements) => (0, import_element228.createInterpolateElement)(
      (0, import_i18n208.sprintf)(
        /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is none of: Admin, Editor". */
        (0, import_i18n208.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),
        filter.name,
        activeElements.map((element) => element.label).join(", ")
      ),
      filterTextWrappers
    ),
    filter: ((item, field, filterValue) => {
      if (!filterValue?.length) {
        return true;
      }
      const fieldValue = field.getValue({ item });
      if (Array.isArray(fieldValue)) {
        return !filterValue.some(
          (fv) => fieldValue.includes(fv)
        );
      } else if (typeof fieldValue === "string") {
        return !filterValue.includes(fieldValue);
      }
      return false;
    }),
    selection: "multi"
  };
  var OPERATORS = [
    {
      name: OPERATOR_IS_ANY,
      /* translators: DataViews operator name */
      label: (0, import_i18n208.__)("Includes"),
      filterText: (filter, activeElements) => (0, import_element228.createInterpolateElement)(
        (0, import_i18n208.sprintf)(
          /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is any: Admin, Editor". */
          (0, import_i18n208.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements.map((element) => element.label).join(", ")
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (!filterValue?.length) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        if (Array.isArray(fieldValue)) {
          return filterValue.some(
            (fv) => fieldValue.includes(fv)
          );
        } else if (typeof fieldValue === "string") {
          return filterValue.includes(fieldValue);
        }
        return false;
      },
      selection: "multi"
    },
    {
      name: OPERATOR_IS_NONE,
      ...isNoneOperatorDefinition
    },
    {
      name: OPERATOR_IS_ALL,
      /* translators: DataViews operator name */
      label: (0, import_i18n208.__)("Includes all"),
      filterText: (filter, activeElements) => (0, import_element228.createInterpolateElement)(
        (0, import_i18n208.sprintf)(
          /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author includes all: Admin, Editor". */
          (0, import_i18n208.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements.map((element) => element.label).join(", ")
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (!filterValue?.length) {
          return true;
        }
        return filterValue.every((value) => {
          return field.getValue({ item })?.includes(value);
        });
      },
      selection: "multi"
    },
    {
      name: OPERATOR_IS_NOT_ALL,
      ...isNoneOperatorDefinition
    },
    {
      name: OPERATOR_BETWEEN,
      /* translators: DataViews operator name */
      label: (0, import_i18n208.__)("Between (inc)"),
      filterText: (filter, activeElements) => (0, import_element228.createInterpolateElement)(
        (0, import_i18n208.sprintf)(
          /* translators: 1: Filter name (e.g. "Item count"). 2: Filter value min. 3: Filter value max. e.g.: "Item count between (inc): 10 and 180". */
          (0, import_i18n208.__)(
            "<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"
          ),
          filter.name,
          activeElements[0].label[0],
          activeElements[0].label[1]
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (!Array.isArray(filterValue) || filterValue.length !== 2 || filterValue[0] === void 0 || filterValue[1] === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        if (typeof fieldValue === "number" || fieldValue instanceof Date || typeof fieldValue === "string") {
          return fieldValue >= filterValue[0] && fieldValue <= filterValue[1];
        }
        return false;
      },
      selection: "custom"
    },
    {
      name: OPERATOR_IN_THE_PAST,
      /* translators: DataViews operator name */
      label: (0, import_i18n208.__)("In the past"),
      filterText: (filter, activeElements) => (0, import_element228.createInterpolateElement)(
        (0, import_i18n208.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "7 days"): "Date is in the past: 7 days". */
          (0, import_i18n208.__)(
            "<Name>%1$s is in the past: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          `${activeElements[0].value.value} ${activeElements[0].value.unit}`
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue?.value === void 0 || filterValue?.unit === void 0) {
          return true;
        }
        const targetDate = getRelativeDate(
          filterValue.value,
          filterValue.unit
        );
        const fieldValue = (0, import_date3.getDate)(field.getValue({ item }));
        return fieldValue >= targetDate && fieldValue <= /* @__PURE__ */ new Date();
      },
      selection: "custom"
    },
    {
      name: OPERATOR_OVER,
      /* translators: DataViews operator name */
      label: (0, import_i18n208.__)("Over"),
      filterText: (filter, activeElements) => (0, import_element228.createInterpolateElement)(
        (0, import_i18n208.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "7 days"): "Date is over: 7 days". */
          (0, import_i18n208.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),
          filter.name,
          `${activeElements[0].value.value} ${activeElements[0].value.unit}`
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue?.value === void 0 || filterValue?.unit === void 0) {
          return true;
        }
        const targetDate = getRelativeDate(
          filterValue.value,
          filterValue.unit
        );
        const fieldValue = (0, import_date3.getDate)(field.getValue({ item }));
        return fieldValue < targetDate;
      },
      selection: "custom"
    },
    {
      name: OPERATOR_IS,
      /* translators: DataViews operator name */
      label: (0, import_i18n208.__)("Is"),
      filterText: (filter, activeElements) => (0, import_element228.createInterpolateElement)(
        (0, import_i18n208.sprintf)(
          /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is: Admin". */
          (0, import_i18n208.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        return filterValue === field.getValue({ item }) || filterValue === void 0;
      },
      selection: "single"
    },
    {
      name: OPERATOR_IS_NOT,
      /* translators: DataViews operator name */
      label: (0, import_i18n208.__)("Is not"),
      filterText: (filter, activeElements) => (0, import_element228.createInterpolateElement)(
        (0, import_i18n208.sprintf)(
          /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is not: Admin". */
          (0, import_i18n208.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        return filterValue !== field.getValue({ item });
      },
      selection: "single"
    },
    {
      name: OPERATOR_LESS_THAN,
      /* translators: DataViews operator name */
      label: (0, import_i18n208.__)("Less than"),
      filterText: (filter, activeElements) => (0, import_element228.createInterpolateElement)(
        (0, import_i18n208.sprintf)(
          /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is less than: 10". */
          (0, import_i18n208.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return fieldValue < filterValue;
      },
      selection: "single"
    },
    {
      name: OPERATOR_GREATER_THAN,
      /* translators: DataViews operator name */
      label: (0, import_i18n208.__)("Greater than"),
      filterText: (filter, activeElements) => (0, import_element228.createInterpolateElement)(
        (0, import_i18n208.sprintf)(
          /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is greater than: 10". */
          (0, import_i18n208.__)(
            "<Name>%1$s is greater than: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return fieldValue > filterValue;
      },
      selection: "single"
    },
    {
      name: OPERATOR_LESS_THAN_OR_EQUAL,
      /* translators: DataViews operator name */
      label: (0, import_i18n208.__)("Less than or equal"),
      filterText: (filter, activeElements) => (0, import_element228.createInterpolateElement)(
        (0, import_i18n208.sprintf)(
          /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is less than or equal to: 10". */
          (0, import_i18n208.__)(
            "<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return fieldValue <= filterValue;
      },
      selection: "single"
    },
    {
      name: OPERATOR_GREATER_THAN_OR_EQUAL,
      /* translators: DataViews operator name */
      label: (0, import_i18n208.__)("Greater than or equal"),
      filterText: (filter, activeElements) => (0, import_element228.createInterpolateElement)(
        (0, import_i18n208.sprintf)(
          /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is greater than or equal to: 10". */
          (0, import_i18n208.__)(
            "<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return fieldValue >= filterValue;
      },
      selection: "single"
    },
    {
      name: OPERATOR_BEFORE,
      /* translators: DataViews operator name */
      label: (0, import_i18n208.__)("Before"),
      filterText: (filter, activeElements) => (0, import_element228.createInterpolateElement)(
        (0, import_i18n208.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is before: 2024-01-01". */
          (0, import_i18n208.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const filterDate = (0, import_date3.getDate)(filterValue);
        const fieldDate = (0, import_date3.getDate)(field.getValue({ item }));
        return fieldDate < filterDate;
      },
      selection: "single"
    },
    {
      name: OPERATOR_AFTER,
      /* translators: DataViews operator name */
      label: (0, import_i18n208.__)("After"),
      filterText: (filter, activeElements) => (0, import_element228.createInterpolateElement)(
        (0, import_i18n208.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is after: 2024-01-01". */
          (0, import_i18n208.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const filterDate = (0, import_date3.getDate)(filterValue);
        const fieldDate = (0, import_date3.getDate)(field.getValue({ item }));
        return fieldDate > filterDate;
      },
      selection: "single"
    },
    {
      name: OPERATOR_BEFORE_INC,
      /* translators: DataViews operator name */
      label: (0, import_i18n208.__)("Before (inc)"),
      filterText: (filter, activeElements) => (0, import_element228.createInterpolateElement)(
        (0, import_i18n208.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is on or before: 2024-01-01". */
          (0, import_i18n208.__)(
            "<Name>%1$s is on or before: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const filterDate = (0, import_date3.getDate)(filterValue);
        const fieldDate = (0, import_date3.getDate)(field.getValue({ item }));
        return fieldDate <= filterDate;
      },
      selection: "single"
    },
    {
      name: OPERATOR_AFTER_INC,
      /* translators: DataViews operator name */
      label: (0, import_i18n208.__)("After (inc)"),
      filterText: (filter, activeElements) => (0, import_element228.createInterpolateElement)(
        (0, import_i18n208.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is on or after: 2024-01-01". */
          (0, import_i18n208.__)(
            "<Name>%1$s is on or after: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const filterDate = (0, import_date3.getDate)(filterValue);
        const fieldDate = (0, import_date3.getDate)(field.getValue({ item }));
        return fieldDate >= filterDate;
      },
      selection: "single"
    },
    {
      name: OPERATOR_CONTAINS,
      /* translators: DataViews operator name */
      label: (0, import_i18n208.__)("Contains"),
      filterText: (filter, activeElements) => (0, import_element228.createInterpolateElement)(
        (0, import_i18n208.sprintf)(
          /* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title contains: Hello". */
          (0, import_i18n208.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return typeof fieldValue === "string" && filterValue && fieldValue.toLowerCase().includes(String(filterValue).toLowerCase());
      },
      selection: "single"
    },
    {
      name: OPERATOR_NOT_CONTAINS,
      /* translators: DataViews operator name */
      label: (0, import_i18n208.__)("Doesn't contain"),
      filterText: (filter, activeElements) => (0, import_element228.createInterpolateElement)(
        (0, import_i18n208.sprintf)(
          /* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title doesn't contain: Hello". */
          (0, import_i18n208.__)(
            "<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return typeof fieldValue === "string" && filterValue && !fieldValue.toLowerCase().includes(String(filterValue).toLowerCase());
      },
      selection: "single"
    },
    {
      name: OPERATOR_STARTS_WITH,
      /* translators: DataViews operator name */
      label: (0, import_i18n208.__)("Starts with"),
      filterText: (filter, activeElements) => (0, import_element228.createInterpolateElement)(
        (0, import_i18n208.sprintf)(
          /* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title starts with: Hello". */
          (0, import_i18n208.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return typeof fieldValue === "string" && filterValue && fieldValue.toLowerCase().startsWith(String(filterValue).toLowerCase());
      },
      selection: "single"
    },
    {
      name: OPERATOR_ON,
      /* translators: DataViews operator name */
      label: (0, import_i18n208.__)("On"),
      filterText: (filter, activeElements) => (0, import_element228.createInterpolateElement)(
        (0, import_i18n208.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is: 2024-01-01". */
          (0, import_i18n208.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const filterDate = (0, import_date3.getDate)(filterValue);
        const fieldDate = (0, import_date3.getDate)(field.getValue({ item }));
        return filterDate.getTime() === fieldDate.getTime();
      },
      selection: "single"
    },
    {
      name: OPERATOR_NOT_ON,
      /* translators: DataViews operator name */
      label: (0, import_i18n208.__)("Not on"),
      filterText: (filter, activeElements) => (0, import_element228.createInterpolateElement)(
        (0, import_i18n208.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is not: 2024-01-01". */
          (0, import_i18n208.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const filterDate = (0, import_date3.getDate)(filterValue);
        const fieldDate = (0, import_date3.getDate)(field.getValue({ item }));
        return filterDate.getTime() !== fieldDate.getTime();
      },
      selection: "single"
    }
  ];
  var getOperatorByName = (name) => OPERATORS.find((op) => op.name === name);
  var getAllOperatorNames = () => OPERATORS.map((op) => op.name);

  // packages/dataviews/build-module/components/dataform-controls/checkbox.mjs
  var import_components229 = __toESM(require_components(), 1);
  var import_element229 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/components/dataform-controls/utils/get-custom-validity.mjs
  function getCustomValidity(isValid2, validity) {
    let customValidity;
    if (isValid2?.required && validity?.required) {
      customValidity = validity?.required?.message ? validity.required : void 0;
    } else if (isValid2?.pattern && validity?.pattern) {
      customValidity = validity.pattern;
    } else if (isValid2?.min && validity?.min) {
      customValidity = validity.min;
    } else if (isValid2?.max && validity?.max) {
      customValidity = validity.max;
    } else if (isValid2?.minLength && validity?.minLength) {
      customValidity = validity.minLength;
    } else if (isValid2?.maxLength && validity?.maxLength) {
      customValidity = validity.maxLength;
    } else if (isValid2?.elements && validity?.elements) {
      customValidity = validity.elements;
    } else if (validity?.custom) {
      customValidity = validity.custom;
    }
    return customValidity;
  }

  // packages/dataviews/build-module/components/dataform-controls/checkbox.mjs
  var import_jsx_runtime399 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedCheckboxControl } = unlock2(import_components229.privateApis);
  function Checkbox({
    field,
    onChange,
    data,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { getValue, setValue, label, description, isValid: isValid2 } = field;
    const onChangeControl = (0, import_element229.useCallback)(() => {
      onChange(
        setValue({ item: data, value: !getValue({ item: data }) })
      );
    }, [data, getValue, onChange, setValue]);
    return /* @__PURE__ */ (0, import_jsx_runtime399.jsx)(
      ValidatedCheckboxControl,
      {
        required: !!field.isValid?.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        hidden: hideLabelFromVision,
        label,
        help: description,
        checked: getValue({ item: data }),
        onChange: onChangeControl
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/combobox.mjs
  var import_components230 = __toESM(require_components(), 1);
  var import_element230 = __toESM(require_element(), 1);
  var import_jsx_runtime400 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedComboboxControl } = unlock2(import_components230.privateApis);
  function Combobox({
    data,
    field,
    onChange,
    hideLabelFromVision,
    validity
  }) {
    const { label, description, placeholder, getValue, setValue, isValid: isValid2 } = field;
    const value = getValue({ item: data }) ?? "";
    const onChangeControl = (0, import_element230.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue ?? "" })),
      [data, onChange, setValue]
    );
    const { elements, isLoading } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime400.jsx)(import_components230.Spinner, {});
    }
    return /* @__PURE__ */ (0, import_jsx_runtime400.jsx)(
      ValidatedComboboxControl,
      {
        required: !!field.isValid?.required,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        value,
        help: description,
        placeholder,
        options: elements,
        onChange: onChangeControl,
        hideLabelFromVision,
        allowReset: true,
        expandOnFocus: true
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/datetime.mjs
  var import_components232 = __toESM(require_components(), 1);
  var import_element232 = __toESM(require_element(), 1);
  var import_i18n210 = __toESM(require_i18n(), 1);
  var import_date5 = __toESM(require_date(), 1);

  // packages/dataviews/build-module/components/dataform-controls/utils/relative-date-control.mjs
  var import_components231 = __toESM(require_components(), 1);
  var import_element231 = __toESM(require_element(), 1);
  var import_i18n209 = __toESM(require_i18n(), 1);
  var import_jsx_runtime401 = __toESM(require_jsx_runtime(), 1);
  var TIME_UNITS_OPTIONS = {
    [OPERATOR_IN_THE_PAST]: [
      { value: "days", label: (0, import_i18n209.__)("Days") },
      { value: "weeks", label: (0, import_i18n209.__)("Weeks") },
      { value: "months", label: (0, import_i18n209.__)("Months") },
      { value: "years", label: (0, import_i18n209.__)("Years") }
    ],
    [OPERATOR_OVER]: [
      { value: "days", label: (0, import_i18n209.__)("Days ago") },
      { value: "weeks", label: (0, import_i18n209.__)("Weeks ago") },
      { value: "months", label: (0, import_i18n209.__)("Months ago") },
      { value: "years", label: (0, import_i18n209.__)("Years ago") }
    ]
  };
  function RelativeDateControl({
    className,
    data,
    field,
    onChange,
    hideLabelFromVision,
    operator
  }) {
    const options = TIME_UNITS_OPTIONS[operator === OPERATOR_IN_THE_PAST ? "inThePast" : "over"];
    const { id, label, getValue, setValue } = field;
    const fieldValue = getValue({ item: data });
    const { value: relValue = "", unit = options[0].value } = fieldValue && typeof fieldValue === "object" ? fieldValue : {};
    const onChangeValue = (0, import_element231.useCallback)(
      (newValue) => onChange(
        setValue({
          item: data,
          value: { value: Number(newValue), unit }
        })
      ),
      [onChange, setValue, data, unit]
    );
    const onChangeUnit = (0, import_element231.useCallback)(
      (newUnit) => onChange(
        setValue({
          item: data,
          value: { value: relValue, unit: newUnit }
        })
      ),
      [onChange, setValue, data, relValue]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime401.jsx)(
      import_components231.BaseControl,
      {
        id,
        className: clsx_default(className, "dataviews-controls__relative-date"),
        label,
        hideLabelFromVision,
        children: /* @__PURE__ */ (0, import_jsx_runtime401.jsxs)(Stack, { direction: "row", gap: "sm", children: [
          /* @__PURE__ */ (0, import_jsx_runtime401.jsx)(
            import_components231.__experimentalNumberControl,
            {
              __next40pxDefaultSize: true,
              className: "dataviews-controls__relative-date-number",
              spinControls: "none",
              min: 1,
              step: 1,
              value: relValue,
              onChange: onChangeValue
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime401.jsx)(
            import_components231.SelectControl,
            {
              className: "dataviews-controls__relative-date-unit",
              __next40pxDefaultSize: true,
              label: (0, import_i18n209.__)("Unit"),
              value: unit,
              options,
              onChange: onChangeUnit,
              hideLabelFromVision: true
            }
          )
        ] })
      }
    );
  }

  // packages/dataviews/build-module/field-types/utils/parse-date-time.mjs
  var import_date4 = __toESM(require_date(), 1);
  function parseDateTime(dateTimeString) {
    if (!dateTimeString) {
      return null;
    }
    const parsed = (0, import_date4.getDate)(dateTimeString);
    return parsed && isValid(parsed) ? parsed : null;
  }

  // packages/dataviews/build-module/components/dataform-controls/datetime.mjs
  var import_jsx_runtime402 = __toESM(require_jsx_runtime(), 1);
  var { DateCalendar, ValidatedInputControl: ValidatedInputControl2 } = unlock2(import_components232.privateApis);
  var formatDateTime = (value) => {
    if (!value) {
      return "";
    }
    return (0, import_date5.dateI18n)("Y-m-d\\TH:i", (0, import_date5.getDate)(value));
  };
  function CalendarDateTimeControl({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { id, label, description, setValue, getValue, isValid: isValid2 } = field;
    const fieldValue = getValue({ item: data });
    const value = typeof fieldValue === "string" ? fieldValue : void 0;
    const [calendarMonth, setCalendarMonth] = (0, import_element232.useState)(() => {
      const parsedDate = parseDateTime(value);
      return parsedDate || /* @__PURE__ */ new Date();
    });
    const inputControlRef = (0, import_element232.useRef)(null);
    const validationTimeoutRef = (0, import_element232.useRef)(void 0);
    const previousFocusRef = (0, import_element232.useRef)(null);
    const onChangeCallback = (0, import_element232.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue })),
      [data, onChange, setValue]
    );
    (0, import_element232.useEffect)(() => {
      return () => {
        if (validationTimeoutRef.current) {
          clearTimeout(validationTimeoutRef.current);
        }
      };
    }, []);
    const onSelectDate = (0, import_element232.useCallback)(
      (newDate) => {
        let dateTimeValue;
        if (newDate) {
          const wpDate = (0, import_date5.dateI18n)("Y-m-d", newDate);
          let wpTime;
          if (value) {
            wpTime = (0, import_date5.dateI18n)("H:i", (0, import_date5.getDate)(value));
          } else {
            wpTime = (0, import_date5.dateI18n)("H:i", newDate);
          }
          const finalDateTime = (0, import_date5.getDate)(`${wpDate}T${wpTime}`);
          dateTimeValue = finalDateTime.toISOString();
          onChangeCallback(dateTimeValue);
          if (validationTimeoutRef.current) {
            clearTimeout(validationTimeoutRef.current);
          }
        } else {
          onChangeCallback(void 0);
        }
        previousFocusRef.current = inputControlRef.current && inputControlRef.current.ownerDocument.activeElement;
        validationTimeoutRef.current = setTimeout(() => {
          if (inputControlRef.current) {
            inputControlRef.current.focus();
            inputControlRef.current.blur();
            onChangeCallback(dateTimeValue);
            if (previousFocusRef.current && previousFocusRef.current instanceof HTMLElement) {
              previousFocusRef.current.focus();
            }
          }
        }, 0);
      },
      [onChangeCallback, value]
    );
    const handleManualDateTimeChange = (0, import_element232.useCallback)(
      (newValue) => {
        if (newValue) {
          const dateTime = (0, import_date5.getDate)(newValue);
          onChangeCallback(dateTime.toISOString());
          const parsedDate = parseDateTime(dateTime.toISOString());
          if (parsedDate) {
            setCalendarMonth(parsedDate);
          }
        } else {
          onChangeCallback(void 0);
        }
      },
      [onChangeCallback]
    );
    const { format: fieldFormat } = field;
    const weekStartsOn = fieldFormat.weekStartsOn ?? (0, import_date5.getSettings)().l10n.startOfWeek;
    const {
      timezone: { string: timezoneString }
    } = (0, import_date5.getSettings)();
    let displayLabel = label;
    if (isValid2?.required && !markWhenOptional && !hideLabelFromVision) {
      displayLabel = `${label} (${(0, import_i18n210.__)("Required")})`;
    } else if (!isValid2?.required && markWhenOptional && !hideLabelFromVision) {
      displayLabel = `${label} (${(0, import_i18n210.__)("Optional")})`;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime402.jsx)(
      import_components232.BaseControl,
      {
        id,
        label: displayLabel,
        help: description,
        hideLabelFromVision,
        children: /* @__PURE__ */ (0, import_jsx_runtime402.jsxs)(Stack, { direction: "column", gap: "lg", children: [
          /* @__PURE__ */ (0, import_jsx_runtime402.jsx)(
            DateCalendar,
            {
              style: { width: "100%" },
              selected: value ? parseDateTime(value) || void 0 : void 0,
              onSelect: onSelectDate,
              month: calendarMonth,
              onMonthChange: setCalendarMonth,
              timeZone: timezoneString || void 0,
              weekStartsOn
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime402.jsx)(
            ValidatedInputControl2,
            {
              ref: inputControlRef,
              __next40pxDefaultSize: true,
              required: !!isValid2?.required,
              customValidity: getCustomValidity(isValid2, validity),
              type: "datetime-local",
              label: (0, import_i18n210.__)("Date time"),
              hideLabelFromVision: true,
              value: formatDateTime(value),
              onChange: handleManualDateTimeChange
            }
          )
        ] })
      }
    );
  }
  function DateTime({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    operator,
    validity
  }) {
    if (operator === OPERATOR_IN_THE_PAST || operator === OPERATOR_OVER) {
      return /* @__PURE__ */ (0, import_jsx_runtime402.jsx)(
        RelativeDateControl,
        {
          className: "dataviews-controls__datetime",
          data,
          field,
          onChange,
          hideLabelFromVision,
          operator
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime402.jsx)(
      CalendarDateTimeControl,
      {
        data,
        field,
        onChange,
        hideLabelFromVision,
        markWhenOptional,
        validity
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/date.mjs
  var import_components233 = __toESM(require_components(), 1);
  var import_element233 = __toESM(require_element(), 1);
  var import_i18n211 = __toESM(require_i18n(), 1);
  var import_date6 = __toESM(require_date(), 1);
  var import_jsx_runtime403 = __toESM(require_jsx_runtime(), 1);
  var { DateCalendar: DateCalendar2, DateRangeCalendar } = unlock2(import_components233.privateApis);
  var DATE_PRESETS = [
    {
      id: "today",
      label: (0, import_i18n211.__)("Today"),
      getValue: () => (0, import_date6.getDate)(null)
    },
    {
      id: "yesterday",
      label: (0, import_i18n211.__)("Yesterday"),
      getValue: () => {
        const today = (0, import_date6.getDate)(null);
        return subDays(today, 1);
      }
    },
    {
      id: "past-week",
      label: (0, import_i18n211.__)("Past week"),
      getValue: () => {
        const today = (0, import_date6.getDate)(null);
        return subDays(today, 7);
      }
    },
    {
      id: "past-month",
      label: (0, import_i18n211.__)("Past month"),
      getValue: () => {
        const today = (0, import_date6.getDate)(null);
        return subMonths(today, 1);
      }
    }
  ];
  var DATE_RANGE_PRESETS = [
    {
      id: "last-7-days",
      label: (0, import_i18n211.__)("Last 7 days"),
      getValue: () => {
        const today = (0, import_date6.getDate)(null);
        return [subDays(today, 7), today];
      }
    },
    {
      id: "last-30-days",
      label: (0, import_i18n211.__)("Last 30 days"),
      getValue: () => {
        const today = (0, import_date6.getDate)(null);
        return [subDays(today, 30), today];
      }
    },
    {
      id: "month-to-date",
      label: (0, import_i18n211.__)("Month to date"),
      getValue: () => {
        const today = (0, import_date6.getDate)(null);
        return [startOfMonth(today), today];
      }
    },
    {
      id: "last-year",
      label: (0, import_i18n211.__)("Last year"),
      getValue: () => {
        const today = (0, import_date6.getDate)(null);
        return [subYears(today, 1), today];
      }
    },
    {
      id: "year-to-date",
      label: (0, import_i18n211.__)("Year to date"),
      getValue: () => {
        const today = (0, import_date6.getDate)(null);
        return [startOfYear(today), today];
      }
    }
  ];
  var parseDate = (dateString) => {
    if (!dateString) {
      return null;
    }
    const parsed = (0, import_date6.getDate)(dateString);
    return parsed && isValid(parsed) ? parsed : null;
  };
  var formatDate = (date) => {
    if (!date) {
      return "";
    }
    return typeof date === "string" ? date : format(date, "yyyy-MM-dd");
  };
  function ValidatedDateControl({
    field,
    validity,
    inputRefs,
    isTouched,
    setIsTouched,
    children
  }) {
    const { isValid: isValid2 } = field;
    const [customValidity, setCustomValidity] = (0, import_element233.useState)(void 0);
    const validateRefs = (0, import_element233.useCallback)(() => {
      const refs = Array.isArray(inputRefs) ? inputRefs : [inputRefs];
      for (const ref of refs) {
        const input = ref.current;
        if (input && !input.validity.valid) {
          setCustomValidity({
            type: "invalid",
            message: input.validationMessage
          });
          return;
        }
      }
      setCustomValidity(void 0);
    }, [inputRefs]);
    (0, import_element233.useEffect)(() => {
      const refs = Array.isArray(inputRefs) ? inputRefs : [inputRefs];
      const result = validity ? getCustomValidity(isValid2, validity) : void 0;
      for (const ref of refs) {
        const input = ref.current;
        if (input) {
          input.setCustomValidity(
            result?.type === "invalid" && result.message ? result.message : ""
          );
        }
      }
    }, [inputRefs, isValid2, validity]);
    (0, import_element233.useEffect)(() => {
      const refs = Array.isArray(inputRefs) ? inputRefs : [inputRefs];
      const handleInvalid = (event) => {
        event.preventDefault();
        setIsTouched(true);
      };
      for (const ref of refs) {
        ref.current?.addEventListener("invalid", handleInvalid);
      }
      return () => {
        for (const ref of refs) {
          ref.current?.removeEventListener("invalid", handleInvalid);
        }
      };
    }, [inputRefs, setIsTouched]);
    (0, import_element233.useEffect)(() => {
      if (!isTouched) {
        return;
      }
      const result = validity ? getCustomValidity(isValid2, validity) : void 0;
      if (result) {
        setCustomValidity(result);
      } else {
        validateRefs();
      }
    }, [isTouched, isValid2, validity, validateRefs]);
    const onBlur = (event) => {
      if (isTouched) {
        return;
      }
      if (!event.relatedTarget || !event.currentTarget.contains(event.relatedTarget)) {
        setIsTouched(true);
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime403.jsxs)("div", { onBlur, children: [
      children,
      /* @__PURE__ */ (0, import_jsx_runtime403.jsx)("div", { "aria-live": "polite", children: customValidity && /* @__PURE__ */ (0, import_jsx_runtime403.jsxs)(
        "p",
        {
          className: clsx_default(
            "components-validated-control__indicator",
            customValidity.type === "invalid" ? "is-invalid" : void 0
          ),
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime403.jsx)(
              import_components233.Icon,
              {
                className: "components-validated-control__indicator-icon",
                icon: error_default,
                size: 16,
                fill: "currentColor"
              }
            ),
            customValidity.message
          ]
        }
      ) })
    ] });
  }
  function CalendarDateControl({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const {
      id,
      label,
      setValue,
      getValue,
      isValid: isValid2,
      format: fieldFormat
    } = field;
    const [selectedPresetId, setSelectedPresetId] = (0, import_element233.useState)(
      null
    );
    const weekStartsOn = fieldFormat.weekStartsOn ?? (0, import_date6.getSettings)().l10n.startOfWeek;
    const fieldValue = getValue({ item: data });
    const value = typeof fieldValue === "string" ? fieldValue : void 0;
    const [calendarMonth, setCalendarMonth] = (0, import_element233.useState)(() => {
      const parsedDate = parseDate(value);
      return parsedDate || /* @__PURE__ */ new Date();
    });
    const [isTouched, setIsTouched] = (0, import_element233.useState)(false);
    const validityTargetRef = (0, import_element233.useRef)(null);
    const onChangeCallback = (0, import_element233.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue })),
      [data, onChange, setValue]
    );
    const onSelectDate = (0, import_element233.useCallback)(
      (newDate) => {
        const dateValue = newDate ? format(newDate, "yyyy-MM-dd") : void 0;
        onChangeCallback(dateValue);
        setSelectedPresetId(null);
        setIsTouched(true);
      },
      [onChangeCallback]
    );
    const handlePresetClick = (0, import_element233.useCallback)(
      (preset) => {
        const presetDate = preset.getValue();
        const dateValue = formatDate(presetDate);
        setCalendarMonth(presetDate);
        onChangeCallback(dateValue);
        setSelectedPresetId(preset.id);
        setIsTouched(true);
      },
      [onChangeCallback]
    );
    const handleManualDateChange = (0, import_element233.useCallback)(
      (newValue) => {
        onChangeCallback(newValue);
        if (newValue) {
          const parsedDate = parseDate(newValue);
          if (parsedDate) {
            setCalendarMonth(parsedDate);
          }
        }
        setSelectedPresetId(null);
        setIsTouched(true);
      },
      [onChangeCallback]
    );
    const {
      timezone: { string: timezoneString }
    } = (0, import_date6.getSettings)();
    let displayLabel = label;
    if (isValid2?.required && !markWhenOptional) {
      displayLabel = `${label} (${(0, import_i18n211.__)("Required")})`;
    } else if (!isValid2?.required && markWhenOptional) {
      displayLabel = `${label} (${(0, import_i18n211.__)("Optional")})`;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime403.jsx)(
      ValidatedDateControl,
      {
        field,
        validity,
        inputRefs: validityTargetRef,
        isTouched,
        setIsTouched,
        children: /* @__PURE__ */ (0, import_jsx_runtime403.jsx)(
          import_components233.BaseControl,
          {
            id,
            className: "dataviews-controls__date",
            label: displayLabel,
            hideLabelFromVision,
            children: /* @__PURE__ */ (0, import_jsx_runtime403.jsxs)(Stack, { direction: "column", gap: "lg", children: [
              /* @__PURE__ */ (0, import_jsx_runtime403.jsxs)(
                Stack,
                {
                  direction: "row",
                  gap: "sm",
                  wrap: "wrap",
                  justify: "flex-start",
                  children: [
                    DATE_PRESETS.map((preset) => {
                      const isSelected = selectedPresetId === preset.id;
                      return /* @__PURE__ */ (0, import_jsx_runtime403.jsx)(
                        import_components233.Button,
                        {
                          className: "dataviews-controls__date-preset",
                          variant: "tertiary",
                          isPressed: isSelected,
                          size: "small",
                          onClick: () => handlePresetClick(preset),
                          children: preset.label
                        },
                        preset.id
                      );
                    }),
                    /* @__PURE__ */ (0, import_jsx_runtime403.jsx)(
                      import_components233.Button,
                      {
                        className: "dataviews-controls__date-preset",
                        variant: "tertiary",
                        isPressed: !selectedPresetId,
                        size: "small",
                        disabled: !!selectedPresetId,
                        accessibleWhenDisabled: false,
                        children: (0, import_i18n211.__)("Custom")
                      }
                    )
                  ]
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime403.jsx)(
                import_components233.__experimentalInputControl,
                {
                  __next40pxDefaultSize: true,
                  ref: validityTargetRef,
                  type: "date",
                  label: (0, import_i18n211.__)("Date"),
                  hideLabelFromVision: true,
                  value,
                  onChange: handleManualDateChange,
                  required: !!field.isValid?.required
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime403.jsx)(
                DateCalendar2,
                {
                  style: { width: "100%" },
                  selected: value ? parseDate(value) || void 0 : void 0,
                  onSelect: onSelectDate,
                  month: calendarMonth,
                  onMonthChange: setCalendarMonth,
                  timeZone: timezoneString || void 0,
                  weekStartsOn
                }
              )
            ] })
          }
        )
      }
    );
  }
  function CalendarDateRangeControl({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { id, label, getValue, setValue, format: fieldFormat } = field;
    let value;
    const fieldValue = getValue({ item: data });
    if (Array.isArray(fieldValue) && fieldValue.length === 2 && fieldValue.every((date) => typeof date === "string")) {
      value = fieldValue;
    }
    const weekStartsOn = fieldFormat.weekStartsOn ?? (0, import_date6.getSettings)().l10n.startOfWeek;
    const onChangeCallback = (0, import_element233.useCallback)(
      (newValue) => {
        onChange(
          setValue({
            item: data,
            value: newValue
          })
        );
      },
      [data, onChange, setValue]
    );
    const [selectedPresetId, setSelectedPresetId] = (0, import_element233.useState)(
      null
    );
    const selectedRange = (0, import_element233.useMemo)(() => {
      if (!value) {
        return { from: void 0, to: void 0 };
      }
      const [from, to2] = value;
      return {
        from: parseDate(from) || void 0,
        to: parseDate(to2) || void 0
      };
    }, [value]);
    const [calendarMonth, setCalendarMonth] = (0, import_element233.useState)(() => {
      return selectedRange.from || /* @__PURE__ */ new Date();
    });
    const [isTouched, setIsTouched] = (0, import_element233.useState)(false);
    const fromInputRef = (0, import_element233.useRef)(null);
    const toInputRef = (0, import_element233.useRef)(null);
    const updateDateRange = (0, import_element233.useCallback)(
      (fromDate, toDate2) => {
        if (fromDate && toDate2) {
          onChangeCallback([
            formatDate(fromDate),
            formatDate(toDate2)
          ]);
        } else if (!fromDate && !toDate2) {
          onChangeCallback(void 0);
        }
      },
      [onChangeCallback]
    );
    const onSelectCalendarRange = (0, import_element233.useCallback)(
      (newRange) => {
        updateDateRange(newRange?.from, newRange?.to);
        setSelectedPresetId(null);
        setIsTouched(true);
      },
      [updateDateRange]
    );
    const handlePresetClick = (0, import_element233.useCallback)(
      (preset) => {
        const [startDate, endDate] = preset.getValue();
        setCalendarMonth(startDate);
        updateDateRange(startDate, endDate);
        setSelectedPresetId(preset.id);
        setIsTouched(true);
      },
      [updateDateRange]
    );
    const handleManualDateChange = (0, import_element233.useCallback)(
      (fromOrTo, newValue) => {
        const [currentFrom, currentTo] = value || [
          void 0,
          void 0
        ];
        const updatedFrom = fromOrTo === "from" ? newValue : currentFrom;
        const updatedTo = fromOrTo === "to" ? newValue : currentTo;
        updateDateRange(updatedFrom, updatedTo);
        if (newValue) {
          const parsedDate = parseDate(newValue);
          if (parsedDate) {
            setCalendarMonth(parsedDate);
          }
        }
        setSelectedPresetId(null);
        setIsTouched(true);
      },
      [value, updateDateRange]
    );
    const { timezone } = (0, import_date6.getSettings)();
    let displayLabel = label;
    if (field.isValid?.required && !markWhenOptional) {
      displayLabel = `${label} (${(0, import_i18n211.__)("Required")})`;
    } else if (!field.isValid?.required && markWhenOptional) {
      displayLabel = `${label} (${(0, import_i18n211.__)("Optional")})`;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime403.jsx)(
      ValidatedDateControl,
      {
        field,
        validity,
        inputRefs: [fromInputRef, toInputRef],
        isTouched,
        setIsTouched,
        children: /* @__PURE__ */ (0, import_jsx_runtime403.jsx)(
          import_components233.BaseControl,
          {
            id,
            className: "dataviews-controls__date",
            label: displayLabel,
            hideLabelFromVision,
            children: /* @__PURE__ */ (0, import_jsx_runtime403.jsxs)(Stack, { direction: "column", gap: "lg", children: [
              /* @__PURE__ */ (0, import_jsx_runtime403.jsxs)(
                Stack,
                {
                  direction: "row",
                  gap: "sm",
                  wrap: "wrap",
                  justify: "flex-start",
                  children: [
                    DATE_RANGE_PRESETS.map((preset) => {
                      const isSelected = selectedPresetId === preset.id;
                      return /* @__PURE__ */ (0, import_jsx_runtime403.jsx)(
                        import_components233.Button,
                        {
                          className: "dataviews-controls__date-preset",
                          variant: "tertiary",
                          isPressed: isSelected,
                          size: "small",
                          onClick: () => handlePresetClick(preset),
                          children: preset.label
                        },
                        preset.id
                      );
                    }),
                    /* @__PURE__ */ (0, import_jsx_runtime403.jsx)(
                      import_components233.Button,
                      {
                        className: "dataviews-controls__date-preset",
                        variant: "tertiary",
                        isPressed: !selectedPresetId,
                        size: "small",
                        accessibleWhenDisabled: false,
                        disabled: !!selectedPresetId,
                        children: (0, import_i18n211.__)("Custom")
                      }
                    )
                  ]
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime403.jsxs)(
                Stack,
                {
                  direction: "row",
                  gap: "sm",
                  justify: "space-between",
                  className: "dataviews-controls__date-range-inputs",
                  children: [
                    /* @__PURE__ */ (0, import_jsx_runtime403.jsx)(
                      import_components233.__experimentalInputControl,
                      {
                        __next40pxDefaultSize: true,
                        ref: fromInputRef,
                        type: "date",
                        label: (0, import_i18n211.__)("From"),
                        hideLabelFromVision: true,
                        value: value?.[0],
                        onChange: (newValue) => handleManualDateChange("from", newValue),
                        required: !!field.isValid?.required
                      }
                    ),
                    /* @__PURE__ */ (0, import_jsx_runtime403.jsx)(
                      import_components233.__experimentalInputControl,
                      {
                        __next40pxDefaultSize: true,
                        ref: toInputRef,
                        type: "date",
                        label: (0, import_i18n211.__)("To"),
                        hideLabelFromVision: true,
                        value: value?.[1],
                        onChange: (newValue) => handleManualDateChange("to", newValue),
                        required: !!field.isValid?.required
                      }
                    )
                  ]
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime403.jsx)(
                DateRangeCalendar,
                {
                  style: { width: "100%" },
                  selected: selectedRange,
                  onSelect: onSelectCalendarRange,
                  month: calendarMonth,
                  onMonthChange: setCalendarMonth,
                  timeZone: timezone.string || void 0,
                  weekStartsOn
                }
              )
            ] })
          }
        )
      }
    );
  }
  function DateControl({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    operator,
    validity
  }) {
    if (operator === OPERATOR_IN_THE_PAST || operator === OPERATOR_OVER) {
      return /* @__PURE__ */ (0, import_jsx_runtime403.jsx)(
        RelativeDateControl,
        {
          className: "dataviews-controls__date",
          data,
          field,
          onChange,
          hideLabelFromVision,
          operator
        }
      );
    }
    if (operator === OPERATOR_BETWEEN) {
      return /* @__PURE__ */ (0, import_jsx_runtime403.jsx)(
        CalendarDateRangeControl,
        {
          data,
          field,
          onChange,
          hideLabelFromVision,
          markWhenOptional,
          validity
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime403.jsx)(
      CalendarDateControl,
      {
        data,
        field,
        onChange,
        hideLabelFromVision,
        markWhenOptional,
        validity
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/select.mjs
  var import_components234 = __toESM(require_components(), 1);
  var import_element234 = __toESM(require_element(), 1);
  var import_jsx_runtime404 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedSelectControl } = unlock2(import_components234.privateApis);
  function Select({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { type, label, description, getValue, setValue, isValid: isValid2 } = field;
    const isMultiple = type === "array";
    const value = getValue({ item: data }) ?? (isMultiple ? [] : "");
    const onChangeControl = (0, import_element234.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue })),
      [data, onChange, setValue]
    );
    const { elements, isLoading } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(import_components234.Spinner, {});
    }
    return /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
      ValidatedSelectControl,
      {
        required: !!field.isValid?.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        value,
        help: description,
        options: elements,
        onChange: onChangeControl,
        __next40pxDefaultSize: true,
        hideLabelFromVision,
        multiple: isMultiple
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/adaptive-select.mjs
  var import_jsx_runtime405 = __toESM(require_jsx_runtime(), 1);
  var ELEMENTS_THRESHOLD = 10;
  function AdaptiveSelect(props) {
    const { field } = props;
    const { elements } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    if (elements.length >= ELEMENTS_THRESHOLD) {
      return /* @__PURE__ */ (0, import_jsx_runtime405.jsx)(Combobox, { ...props });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime405.jsx)(Select, { ...props });
  }

  // packages/dataviews/build-module/components/dataform-controls/email.mjs
  var import_components236 = __toESM(require_components(), 1);

  // packages/dataviews/build-module/components/dataform-controls/utils/validated-input.mjs
  var import_components235 = __toESM(require_components(), 1);
  var import_element235 = __toESM(require_element(), 1);
  var import_jsx_runtime406 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedInputControl: ValidatedInputControl3 } = unlock2(import_components235.privateApis);
  function ValidatedText({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    type,
    prefix: prefix2,
    suffix,
    validity
  }) {
    const { label, placeholder, description, getValue, setValue, isValid: isValid2 } = field;
    const value = getValue({ item: data });
    const onChangeControl = (0, import_element235.useCallback)(
      (newValue) => onChange(
        setValue({
          item: data,
          value: newValue
        })
      ),
      [data, setValue, onChange]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime406.jsx)(
      ValidatedInputControl3,
      {
        required: !!isValid2.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        placeholder,
        value: value ?? "",
        help: description,
        onChange: onChangeControl,
        hideLabelFromVision,
        type,
        prefix: prefix2,
        suffix,
        pattern: isValid2.pattern ? isValid2.pattern.constraint : void 0,
        minLength: isValid2.minLength ? isValid2.minLength.constraint : void 0,
        maxLength: isValid2.maxLength ? isValid2.maxLength.constraint : void 0,
        __next40pxDefaultSize: true
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/email.mjs
  var import_jsx_runtime407 = __toESM(require_jsx_runtime(), 1);
  function Email({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime407.jsx)(
      ValidatedText,
      {
        ...{
          data,
          field,
          onChange,
          hideLabelFromVision,
          markWhenOptional,
          validity,
          type: "email",
          prefix: /* @__PURE__ */ (0, import_jsx_runtime407.jsx)(import_components236.__experimentalInputControlPrefixWrapper, { variant: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime407.jsx)(import_components236.Icon, { icon: envelope_default }) })
        }
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/telephone.mjs
  var import_components237 = __toESM(require_components(), 1);
  var import_jsx_runtime408 = __toESM(require_jsx_runtime(), 1);
  function Telephone({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime408.jsx)(
      ValidatedText,
      {
        ...{
          data,
          field,
          onChange,
          hideLabelFromVision,
          markWhenOptional,
          validity,
          type: "tel",
          prefix: /* @__PURE__ */ (0, import_jsx_runtime408.jsx)(import_components237.__experimentalInputControlPrefixWrapper, { variant: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime408.jsx)(import_components237.Icon, { icon: mobile_default }) })
        }
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/url.mjs
  var import_components238 = __toESM(require_components(), 1);
  var import_jsx_runtime409 = __toESM(require_jsx_runtime(), 1);
  function Url({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime409.jsx)(
      ValidatedText,
      {
        ...{
          data,
          field,
          onChange,
          hideLabelFromVision,
          markWhenOptional,
          validity,
          type: "url",
          prefix: /* @__PURE__ */ (0, import_jsx_runtime409.jsx)(import_components238.__experimentalInputControlPrefixWrapper, { variant: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime409.jsx)(import_components238.Icon, { icon: link_default }) })
        }
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/utils/validated-number.mjs
  var import_components239 = __toESM(require_components(), 1);
  var import_element236 = __toESM(require_element(), 1);
  var import_i18n212 = __toESM(require_i18n(), 1);
  var import_jsx_runtime410 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedNumberControl } = unlock2(import_components239.privateApis);
  function toNumberOrEmpty(value) {
    if (value === "" || value === void 0) {
      return "";
    }
    const number = Number(value);
    return Number.isFinite(number) ? number : "";
  }
  function BetweenControls({
    value,
    onChange,
    hideLabelFromVision,
    step
  }) {
    const [min = "", max = ""] = value;
    const onChangeMin = (0, import_element236.useCallback)(
      (newValue) => onChange([toNumberOrEmpty(newValue), max]),
      [onChange, max]
    );
    const onChangeMax = (0, import_element236.useCallback)(
      (newValue) => onChange([min, toNumberOrEmpty(newValue)]),
      [onChange, min]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(
      import_components239.BaseControl,
      {
        help: (0, import_i18n212.__)("The max. value must be greater than the min. value."),
        children: /* @__PURE__ */ (0, import_jsx_runtime410.jsxs)(import_components239.Flex, { direction: "row", gap: 4, children: [
          /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(
            import_components239.__experimentalNumberControl,
            {
              label: (0, import_i18n212.__)("Min."),
              value: min,
              max: max ? Number(max) - step : void 0,
              onChange: onChangeMin,
              __next40pxDefaultSize: true,
              hideLabelFromVision,
              step
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(
            import_components239.__experimentalNumberControl,
            {
              label: (0, import_i18n212.__)("Max."),
              value: max,
              min: min ? Number(min) + step : void 0,
              onChange: onChangeMax,
              __next40pxDefaultSize: true,
              hideLabelFromVision,
              step
            }
          )
        ] })
      }
    );
  }
  function ValidatedNumber({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    operator,
    validity
  }) {
    const decimals = field.format?.decimals ?? 0;
    const step = Math.pow(10, Math.abs(decimals) * -1);
    const { label, description, getValue, setValue, isValid: isValid2 } = field;
    const value = getValue({ item: data }) ?? "";
    const onChangeControl = (0, import_element236.useCallback)(
      (newValue) => {
        onChange(
          setValue({
            item: data,
            // Do not convert an empty string or undefined to a number,
            // otherwise there's a mismatch between the UI control (empty)
            // and the data relied by onChange (0).
            value: ["", void 0].includes(newValue) ? void 0 : Number(newValue)
          })
        );
      },
      [data, onChange, setValue]
    );
    const onChangeBetweenControls = (0, import_element236.useCallback)(
      (newValue) => {
        onChange(
          setValue({
            item: data,
            value: newValue
          })
        );
      },
      [data, onChange, setValue]
    );
    if (operator === OPERATOR_BETWEEN) {
      let valueBetween = ["", ""];
      if (Array.isArray(value) && value.length === 2 && value.every(
        (element) => typeof element === "number" || element === ""
      )) {
        valueBetween = value;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(
        BetweenControls,
        {
          value: valueBetween,
          onChange: onChangeBetweenControls,
          hideLabelFromVision,
          step
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(
      ValidatedNumberControl,
      {
        required: !!isValid2.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        help: description,
        value,
        onChange: onChangeControl,
        __next40pxDefaultSize: true,
        hideLabelFromVision,
        step,
        min: isValid2.min ? isValid2.min.constraint : void 0,
        max: isValid2.max ? isValid2.max.constraint : void 0
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/integer.mjs
  var import_jsx_runtime411 = __toESM(require_jsx_runtime(), 1);
  function Integer(props) {
    return /* @__PURE__ */ (0, import_jsx_runtime411.jsx)(ValidatedNumber, { ...props });
  }

  // packages/dataviews/build-module/components/dataform-controls/number.mjs
  var import_jsx_runtime412 = __toESM(require_jsx_runtime(), 1);
  function Number2(props) {
    return /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(ValidatedNumber, { ...props });
  }

  // packages/dataviews/build-module/components/dataform-controls/radio.mjs
  var import_components240 = __toESM(require_components(), 1);
  var import_element237 = __toESM(require_element(), 1);
  var import_jsx_runtime413 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedRadioControl } = unlock2(import_components240.privateApis);
  function Radio({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { label, description, getValue, setValue, isValid: isValid2 } = field;
    const { elements, isLoading } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    const value = getValue({ item: data });
    const onChangeControl = (0, import_element237.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue })),
      [data, onChange, setValue]
    );
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(import_components240.Spinner, {});
    }
    return /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(
      ValidatedRadioControl,
      {
        required: !!field.isValid?.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        help: description,
        onChange: onChangeControl,
        options: elements,
        selected: value,
        hideLabelFromVision
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/text.mjs
  var import_element238 = __toESM(require_element(), 1);
  var import_jsx_runtime414 = __toESM(require_jsx_runtime(), 1);
  function Text11({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    config: config2,
    validity
  }) {
    const { prefix: prefix2, suffix } = config2 || {};
    return /* @__PURE__ */ (0, import_jsx_runtime414.jsx)(
      ValidatedText,
      {
        ...{
          data,
          field,
          onChange,
          hideLabelFromVision,
          markWhenOptional,
          validity,
          prefix: prefix2 ? (0, import_element238.createElement)(prefix2) : void 0,
          suffix: suffix ? (0, import_element238.createElement)(suffix) : void 0
        }
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/toggle.mjs
  var import_components241 = __toESM(require_components(), 1);
  var import_element239 = __toESM(require_element(), 1);
  var import_jsx_runtime415 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedToggleControl } = unlock2(import_components241.privateApis);
  function Toggle({
    field,
    onChange,
    data,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { label, description, getValue, setValue, isValid: isValid2 } = field;
    const onChangeControl = (0, import_element239.useCallback)(() => {
      onChange(
        setValue({ item: data, value: !getValue({ item: data }) })
      );
    }, [onChange, setValue, data, getValue]);
    return /* @__PURE__ */ (0, import_jsx_runtime415.jsx)(
      ValidatedToggleControl,
      {
        required: !!isValid2.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        hidden: hideLabelFromVision,
        label,
        help: description,
        checked: getValue({ item: data }),
        onChange: onChangeControl
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/textarea.mjs
  var import_components242 = __toESM(require_components(), 1);
  var import_element240 = __toESM(require_element(), 1);
  var import_jsx_runtime416 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedTextareaControl } = unlock2(import_components242.privateApis);
  function Textarea({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    config: config2,
    validity
  }) {
    const { rows = 4 } = config2 || {};
    const { label, placeholder, description, setValue, isValid: isValid2 } = field;
    const value = field.getValue({ item: data });
    const onChangeControl = (0, import_element240.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue })),
      [data, onChange, setValue]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
      ValidatedTextareaControl,
      {
        required: !!isValid2.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        placeholder,
        value: value ?? "",
        help: description,
        onChange: onChangeControl,
        rows,
        minLength: isValid2.minLength ? isValid2.minLength.constraint : void 0,
        maxLength: isValid2.maxLength ? isValid2.maxLength.constraint : void 0,
        __next40pxDefaultSize: true,
        hideLabelFromVision
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/toggle-group.mjs
  var import_components243 = __toESM(require_components(), 1);
  var import_element241 = __toESM(require_element(), 1);
  var import_jsx_runtime417 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedToggleGroupControl } = unlock2(import_components243.privateApis);
  function ToggleGroup({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { getValue, setValue, isValid: isValid2 } = field;
    const value = getValue({ item: data });
    const onChangeControl = (0, import_element241.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue })),
      [data, onChange, setValue]
    );
    const { elements, isLoading } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime417.jsx)(import_components243.Spinner, {});
    }
    if (elements.length === 0) {
      return null;
    }
    const selectedOption = elements.find((el) => el.value === value);
    return /* @__PURE__ */ (0, import_jsx_runtime417.jsx)(
      ValidatedToggleGroupControl,
      {
        required: !!field.isValid?.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        __next40pxDefaultSize: true,
        isBlock: true,
        label: field.label,
        help: selectedOption?.description || field.description,
        onChange: onChangeControl,
        value,
        hideLabelFromVision,
        children: elements.map((el) => /* @__PURE__ */ (0, import_jsx_runtime417.jsx)(
          import_components243.__experimentalToggleGroupControlOption,
          {
            label: el.label,
            value: el.value
          },
          el.value
        ))
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/array.mjs
  var import_components244 = __toESM(require_components(), 1);
  var import_element242 = __toESM(require_element(), 1);
  var import_jsx_runtime418 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedFormTokenField } = unlock2(import_components244.privateApis);
  function ArrayControl({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { label, placeholder, getValue, setValue, isValid: isValid2 } = field;
    const value = getValue({ item: data });
    const { elements, isLoading } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    const arrayValueAsElements = (0, import_element242.useMemo)(
      () => Array.isArray(value) ? value.map((token) => {
        const element = elements?.find(
          (suggestion) => suggestion.value === token
        );
        return element || { value: token, label: token };
      }) : [],
      [value, elements]
    );
    const onChangeControl = (0, import_element242.useCallback)(
      (tokens) => {
        const valueTokens = tokens.map((token) => {
          if (typeof token === "object" && "value" in token) {
            return token.value;
          }
          return token;
        });
        onChange(setValue({ item: data, value: valueTokens }));
      },
      [onChange, setValue, data]
    );
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime418.jsx)(import_components244.Spinner, {});
    }
    return /* @__PURE__ */ (0, import_jsx_runtime418.jsx)(
      ValidatedFormTokenField,
      {
        required: !!isValid2?.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label: hideLabelFromVision ? void 0 : label,
        value: arrayValueAsElements,
        onChange: onChangeControl,
        placeholder,
        suggestions: elements?.map((element) => element.value),
        __experimentalValidateInput: (token) => {
          if (field.isValid?.elements && elements) {
            return elements.some(
              (element) => element.value === token || element.label === token
            );
          }
          return true;
        },
        __experimentalExpandOnFocus: elements && elements.length > 0,
        __experimentalShowHowTo: !field.isValid?.elements,
        displayTransform: (token) => {
          if (typeof token === "object" && "label" in token) {
            return token.label;
          }
          if (typeof token === "string" && elements) {
            const element = elements.find(
              (el) => el.value === token
            );
            return element?.label || token;
          }
          return token;
        },
        __experimentalRenderItem: ({ item }) => {
          if (typeof item === "string" && elements) {
            const element = elements.find(
              (el) => el.value === item
            );
            return /* @__PURE__ */ (0, import_jsx_runtime418.jsx)("span", { children: element?.label || item });
          }
          return /* @__PURE__ */ (0, import_jsx_runtime418.jsx)("span", { children: item });
        }
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/color.mjs
  var import_components245 = __toESM(require_components(), 1);
  var import_element243 = __toESM(require_element(), 1);
  var import_i18n213 = __toESM(require_i18n(), 1);
  var import_jsx_runtime419 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedInputControl: ValidatedInputControl4 } = unlock2(import_components245.privateApis);
  var ColorPickerDropdown = ({
    color,
    onColorChange
  }) => {
    const validColor = color && w(color).isValid() ? color : "#ffffff";
    return /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(
      import_components245.Dropdown,
      {
        className: "dataviews-controls__color-picker-dropdown",
        popoverProps: { resize: false },
        renderToggle: ({ onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(
          import_components245.Button,
          {
            onClick: onToggle,
            "aria-label": (0, import_i18n213.__)("Open color picker"),
            size: "small",
            icon: () => /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(import_components245.ColorIndicator, { colorValue: validColor })
          }
        ),
        renderContent: () => /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(import_components245.__experimentalDropdownContentWrapper, { paddingSize: "none", children: /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(
          import_components245.ColorPicker,
          {
            color: validColor,
            onChange: onColorChange,
            enableAlpha: true
          }
        ) })
      }
    );
  };
  function Color({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { label, placeholder, description, setValue, isValid: isValid2 } = field;
    const value = field.getValue({ item: data }) || "";
    const handleColorChange = (0, import_element243.useCallback)(
      (newColor) => {
        onChange(setValue({ item: data, value: newColor }));
      },
      [data, onChange, setValue]
    );
    const handleInputChange = (0, import_element243.useCallback)(
      (newValue) => {
        onChange(setValue({ item: data, value: newValue || "" }));
      },
      [data, onChange, setValue]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(
      ValidatedInputControl4,
      {
        required: !!field.isValid?.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        placeholder,
        value,
        help: description,
        onChange: handleInputChange,
        hideLabelFromVision,
        type: "text",
        prefix: /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(import_components245.__experimentalInputControlPrefixWrapper, { variant: "control", children: /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(
          ColorPickerDropdown,
          {
            color: value,
            onColorChange: handleColorChange
          }
        ) })
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/password.mjs
  var import_components246 = __toESM(require_components(), 1);
  var import_element244 = __toESM(require_element(), 1);
  var import_i18n214 = __toESM(require_i18n(), 1);
  var import_jsx_runtime420 = __toESM(require_jsx_runtime(), 1);
  function Password({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const [isVisible, setIsVisible] = (0, import_element244.useState)(false);
    const toggleVisibility = (0, import_element244.useCallback)(() => {
      setIsVisible((prev) => !prev);
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
      ValidatedText,
      {
        ...{
          data,
          field,
          onChange,
          hideLabelFromVision,
          markWhenOptional,
          validity,
          type: isVisible ? "text" : "password",
          suffix: /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(import_components246.__experimentalInputControlSuffixWrapper, { variant: "control", children: /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
            import_components246.Button,
            {
              icon: isVisible ? unseen_default : seen_default,
              onClick: toggleVisibility,
              size: "small",
              label: isVisible ? (0, import_i18n214.__)("Hide password") : (0, import_i18n214.__)("Show password")
            }
          ) })
        }
      }
    );
  }

  // packages/dataviews/build-module/field-types/utils/has-elements.mjs
  function hasElements(field) {
    return Array.isArray(field.elements) && field.elements.length > 0 || typeof field.getElements === "function";
  }

  // packages/dataviews/build-module/components/dataform-controls/index.mjs
  var import_jsx_runtime421 = __toESM(require_jsx_runtime(), 1);
  var FORM_CONTROLS = {
    adaptiveSelect: AdaptiveSelect,
    array: ArrayControl,
    checkbox: Checkbox,
    color: Color,
    combobox: Combobox,
    datetime: DateTime,
    date: DateControl,
    email: Email,
    telephone: Telephone,
    url: Url,
    integer: Integer,
    number: Number2,
    password: Password,
    radio: Radio,
    select: Select,
    text: Text11,
    toggle: Toggle,
    textarea: Textarea,
    toggleGroup: ToggleGroup
  };
  function isEditConfig(value) {
    return value && typeof value === "object" && typeof value.control === "string";
  }
  function createConfiguredControl(config2) {
    const { control, ...controlConfig } = config2;
    const BaseControlType = getControlByType(control);
    if (BaseControlType === null) {
      return null;
    }
    return function ConfiguredControl(props) {
      return /* @__PURE__ */ (0, import_jsx_runtime421.jsx)(BaseControlType, { ...props, config: controlConfig });
    };
  }
  function getControl(field, fallback) {
    if (typeof field.Edit === "function") {
      return field.Edit;
    }
    if (typeof field.Edit === "string") {
      return getControlByType(field.Edit);
    }
    if (isEditConfig(field.Edit)) {
      return createConfiguredControl(field.Edit);
    }
    if (hasElements(field) && field.type !== "array") {
      return getControlByType("adaptiveSelect");
    }
    if (fallback === null) {
      return null;
    }
    return getControlByType(fallback);
  }
  function getControlByType(type) {
    if (Object.keys(FORM_CONTROLS).includes(type)) {
      return FORM_CONTROLS[type];
    }
    return null;
  }

  // packages/dataviews/build-module/field-types/utils/get-filter-by.mjs
  function getFilterBy(field, defaultOperators, validOperators) {
    if (field.filterBy === false) {
      return false;
    }
    const operators = field.filterBy?.operators?.filter(
      (op) => validOperators.includes(op)
    ) ?? defaultOperators;
    if (operators.length === 0) {
      return false;
    }
    return {
      isPrimary: !!field.filterBy?.isPrimary,
      operators
    };
  }
  var get_filter_by_default = getFilterBy;

  // packages/dataviews/build-module/field-types/utils/get-value-from-id.mjs
  var getValueFromId = (id) => ({ item }) => {
    const path = id.split(".");
    let value = item;
    for (const segment of path) {
      if (value.hasOwnProperty(segment)) {
        value = value[segment];
      } else {
        value = void 0;
      }
    }
    return value;
  };
  var get_value_from_id_default = getValueFromId;

  // packages/dataviews/build-module/field-types/utils/set-value-from-id.mjs
  var setValueFromId = (id) => ({ value }) => {
    const path = id.split(".");
    const result = {};
    let current = result;
    for (const segment of path.slice(0, -1)) {
      current[segment] = {};
      current = current[segment];
    }
    current[path.at(-1)] = value;
    return result;
  };
  var set_value_from_id_default = setValueFromId;

  // packages/dataviews/build-module/field-types/email.mjs
  var import_i18n215 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/field-types/utils/render-from-elements.mjs
  function RenderFromElements({
    item,
    field
  }) {
    const { elements, isLoading } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    const value = field.getValue({ item });
    if (isLoading) {
      return value;
    }
    if (elements.length === 0) {
      return value;
    }
    return elements?.find((element) => element.value === value)?.label || field.getValue({ item });
  }

  // packages/dataviews/build-module/field-types/utils/render-default.mjs
  var import_jsx_runtime422 = __toESM(require_jsx_runtime(), 1);
  function render({
    item,
    field
  }) {
    if (field.hasElements) {
      return /* @__PURE__ */ (0, import_jsx_runtime422.jsx)(RenderFromElements, { item, field });
    }
    return field.getValueFormatted({ item, field });
  }

  // packages/dataviews/build-module/field-types/utils/sort-text.mjs
  var sort_text_default = (a2, b2, direction) => {
    return direction === "asc" ? a2.localeCompare(b2) : b2.localeCompare(a2);
  };

  // packages/dataviews/build-module/field-types/utils/is-valid-required.mjs
  function isValidRequired(item, field) {
    const value = field.getValue({ item });
    return ![void 0, "", null].includes(value);
  }

  // packages/dataviews/build-module/field-types/utils/is-valid-min-length.mjs
  function isValidMinLength(item, field) {
    if (typeof field.isValid.minLength?.constraint !== "number") {
      return false;
    }
    const value = field.getValue({ item });
    if ([void 0, "", null].includes(value)) {
      return true;
    }
    return String(value).length >= field.isValid.minLength.constraint;
  }

  // packages/dataviews/build-module/field-types/utils/is-valid-max-length.mjs
  function isValidMaxLength(item, field) {
    if (typeof field.isValid.maxLength?.constraint !== "number") {
      return false;
    }
    const value = field.getValue({ item });
    if ([void 0, "", null].includes(value)) {
      return true;
    }
    return String(value).length <= field.isValid.maxLength.constraint;
  }

  // packages/dataviews/build-module/field-types/utils/is-valid-pattern.mjs
  function isValidPattern(item, field) {
    if (field.isValid.pattern?.constraint === void 0) {
      return true;
    }
    try {
      const regexp = new RegExp(field.isValid.pattern.constraint);
      const value = field.getValue({ item });
      if ([void 0, "", null].includes(value)) {
        return true;
      }
      return regexp.test(String(value));
    } catch {
      return false;
    }
  }

  // packages/dataviews/build-module/field-types/utils/is-valid-elements.mjs
  function isValidElements(item, field) {
    const elements = field.elements ?? [];
    const validValues = elements.map((el) => el.value);
    if (validValues.length === 0) {
      return true;
    }
    const value = field.getValue({ item });
    return [].concat(value).every((v2) => validValues.includes(v2));
  }

  // packages/dataviews/build-module/field-types/utils/get-value-formatted-default.mjs
  function getValueFormatted({
    item,
    field
  }) {
    return field.getValue({ item });
  }
  var get_value_formatted_default_default = getValueFormatted;

  // packages/dataviews/build-module/field-types/email.mjs
  var emailRegex = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
  function isValidCustom(item, field) {
    const value = field.getValue({ item });
    if (![void 0, "", null].includes(value) && !emailRegex.test(value)) {
      return (0, import_i18n215.__)("Value must be a valid email address.");
    }
    return null;
  }
  var email_default = {
    type: "email",
    render,
    Edit: "email",
    sort: sort_text_default,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS_ANY, OPERATOR_IS_NONE],
    validOperators: [
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_CONTAINS,
      OPERATOR_NOT_CONTAINS,
      OPERATOR_STARTS_WITH,
      // Multiple selection
      OPERATOR_IS_ANY,
      OPERATOR_IS_NONE,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    validate: {
      required: isValidRequired,
      pattern: isValidPattern,
      minLength: isValidMinLength,
      maxLength: isValidMaxLength,
      elements: isValidElements,
      custom: isValidCustom
    }
  };

  // packages/dataviews/build-module/field-types/integer.mjs
  var import_i18n216 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/field-types/utils/sort-number.mjs
  var sort_number_default = (a2, b2, direction) => {
    return direction === "asc" ? a2 - b2 : b2 - a2;
  };

  // packages/dataviews/build-module/field-types/utils/is-valid-min.mjs
  function isValidMin(item, field) {
    if (typeof field.isValid.min?.constraint !== "number") {
      return false;
    }
    const value = field.getValue({ item });
    if ([void 0, "", null].includes(value)) {
      return true;
    }
    return Number(value) >= field.isValid.min.constraint;
  }

  // packages/dataviews/build-module/field-types/utils/is-valid-max.mjs
  function isValidMax(item, field) {
    if (typeof field.isValid.max?.constraint !== "number") {
      return false;
    }
    const value = field.getValue({ item });
    if ([void 0, "", null].includes(value)) {
      return true;
    }
    return Number(value) <= field.isValid.max.constraint;
  }

  // packages/dataviews/build-module/field-types/integer.mjs
  var format2 = {
    separatorThousand: ","
  };
  function getValueFormatted2({
    item,
    field
  }) {
    let value = field.getValue({ item });
    if (value === null || value === void 0) {
      return "";
    }
    value = Number(value);
    if (!Number.isFinite(value)) {
      return String(value);
    }
    let formatInteger;
    if (field.type !== "integer") {
      formatInteger = format2;
    } else {
      formatInteger = field.format;
    }
    const { separatorThousand } = formatInteger;
    const integerValue = Math.trunc(value);
    if (!separatorThousand) {
      return String(integerValue);
    }
    return String(integerValue).replace(
      /\B(?=(\d{3})+(?!\d))/g,
      separatorThousand
    );
  }
  function isValidCustom2(item, field) {
    const value = field.getValue({ item });
    if (![void 0, "", null].includes(value) && !Number.isInteger(value)) {
      return (0, import_i18n216.__)("Value must be an integer.");
    }
    return null;
  }
  var integer_default = {
    type: "integer",
    render,
    Edit: "integer",
    sort: sort_number_default,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_LESS_THAN,
      OPERATOR_GREATER_THAN,
      OPERATOR_LESS_THAN_OR_EQUAL,
      OPERATOR_GREATER_THAN_OR_EQUAL,
      OPERATOR_BETWEEN
    ],
    validOperators: [
      // Single-selection
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_LESS_THAN,
      OPERATOR_GREATER_THAN,
      OPERATOR_LESS_THAN_OR_EQUAL,
      OPERATOR_GREATER_THAN_OR_EQUAL,
      OPERATOR_BETWEEN,
      // Multiple-selection
      OPERATOR_IS_ANY,
      OPERATOR_IS_NONE,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: format2,
    getValueFormatted: getValueFormatted2,
    validate: {
      required: isValidRequired,
      min: isValidMin,
      max: isValidMax,
      elements: isValidElements,
      custom: isValidCustom2
    }
  };

  // packages/dataviews/build-module/field-types/number.mjs
  var import_i18n217 = __toESM(require_i18n(), 1);
  var format3 = {
    separatorThousand: ",",
    separatorDecimal: ".",
    decimals: 2
  };
  function getValueFormatted3({
    item,
    field
  }) {
    let value = field.getValue({ item });
    if (value === null || value === void 0) {
      return "";
    }
    value = Number(value);
    if (!Number.isFinite(value)) {
      return String(value);
    }
    let formatNumber;
    if (field.type !== "number") {
      formatNumber = format3;
    } else {
      formatNumber = field.format;
    }
    const { separatorThousand, separatorDecimal, decimals } = formatNumber;
    const fixedValue = value.toFixed(decimals);
    const [integerPart, decimalPart] = fixedValue.split(".");
    const formattedInteger = separatorThousand ? integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, separatorThousand) : integerPart;
    return decimals === 0 ? formattedInteger : formattedInteger + separatorDecimal + decimalPart;
  }
  function isEmpty3(value) {
    return value === "" || value === void 0 || value === null;
  }
  function isValidCustom3(item, field) {
    const value = field.getValue({ item });
    if (!isEmpty3(value) && !Number.isFinite(value)) {
      return (0, import_i18n217.__)("Value must be a number.");
    }
    return null;
  }
  var number_default = {
    type: "number",
    render,
    Edit: "number",
    sort: sort_number_default,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_LESS_THAN,
      OPERATOR_GREATER_THAN,
      OPERATOR_LESS_THAN_OR_EQUAL,
      OPERATOR_GREATER_THAN_OR_EQUAL,
      OPERATOR_BETWEEN
    ],
    validOperators: [
      // Single-selection
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_LESS_THAN,
      OPERATOR_GREATER_THAN,
      OPERATOR_LESS_THAN_OR_EQUAL,
      OPERATOR_GREATER_THAN_OR_EQUAL,
      OPERATOR_BETWEEN,
      // Multiple-selection
      OPERATOR_IS_ANY,
      OPERATOR_IS_NONE,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: format3,
    getValueFormatted: getValueFormatted3,
    validate: {
      required: isValidRequired,
      min: isValidMin,
      max: isValidMax,
      elements: isValidElements,
      custom: isValidCustom3
    }
  };

  // packages/dataviews/build-module/field-types/text.mjs
  var text_default = {
    type: "text",
    render,
    Edit: "text",
    sort: sort_text_default,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS_ANY, OPERATOR_IS_NONE],
    validOperators: [
      // Single selection
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_CONTAINS,
      OPERATOR_NOT_CONTAINS,
      OPERATOR_STARTS_WITH,
      // Multiple selection
      OPERATOR_IS_ANY,
      OPERATOR_IS_NONE,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    validate: {
      required: isValidRequired,
      pattern: isValidPattern,
      minLength: isValidMinLength,
      maxLength: isValidMaxLength,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/datetime.mjs
  var import_date8 = __toESM(require_date(), 1);
  var format4 = {
    datetime: (0, import_date8.getSettings)().formats.datetime,
    weekStartsOn: (0, import_date8.getSettings)().l10n.startOfWeek
  };
  function getValueFormatted4({
    item,
    field
  }) {
    const value = field.getValue({ item });
    if (["", void 0, null].includes(value)) {
      return "";
    }
    let formatDatetime;
    if (field.type !== "datetime") {
      formatDatetime = format4;
    } else {
      formatDatetime = field.format;
    }
    return (0, import_date8.dateI18n)(formatDatetime.datetime, (0, import_date8.getDate)(value));
  }
  var sort = (a2, b2, direction) => {
    const timeA = new Date(a2).getTime();
    const timeB = new Date(b2).getTime();
    return direction === "asc" ? timeA - timeB : timeB - timeA;
  };
  var datetime_default = {
    type: "datetime",
    render,
    Edit: "datetime",
    sort,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [
      OPERATOR_ON,
      OPERATOR_NOT_ON,
      OPERATOR_BEFORE,
      OPERATOR_AFTER,
      OPERATOR_BEFORE_INC,
      OPERATOR_AFTER_INC,
      OPERATOR_IN_THE_PAST,
      OPERATOR_OVER
    ],
    validOperators: [
      OPERATOR_ON,
      OPERATOR_NOT_ON,
      OPERATOR_BEFORE,
      OPERATOR_AFTER,
      OPERATOR_BEFORE_INC,
      OPERATOR_AFTER_INC,
      OPERATOR_IN_THE_PAST,
      OPERATOR_OVER
    ],
    format: format4,
    getValueFormatted: getValueFormatted4,
    validate: {
      required: isValidRequired,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/date.mjs
  var import_date9 = __toESM(require_date(), 1);
  var format5 = {
    date: (0, import_date9.getSettings)().formats.date,
    weekStartsOn: (0, import_date9.getSettings)().l10n.startOfWeek
  };
  function getValueFormatted5({
    item,
    field
  }) {
    const value = field.getValue({ item });
    if (["", void 0, null].includes(value)) {
      return "";
    }
    let formatDate2;
    if (field.type !== "date") {
      formatDate2 = format5;
    } else {
      formatDate2 = field.format;
    }
    return (0, import_date9.dateI18n)(formatDate2.date, (0, import_date9.getDate)(value));
  }
  var sort2 = (a2, b2, direction) => {
    const timeA = new Date(a2).getTime();
    const timeB = new Date(b2).getTime();
    return direction === "asc" ? timeA - timeB : timeB - timeA;
  };
  var date_default = {
    type: "date",
    render,
    Edit: "date",
    sort: sort2,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [
      OPERATOR_ON,
      OPERATOR_NOT_ON,
      OPERATOR_BEFORE,
      OPERATOR_AFTER,
      OPERATOR_BEFORE_INC,
      OPERATOR_AFTER_INC,
      OPERATOR_IN_THE_PAST,
      OPERATOR_OVER,
      OPERATOR_BETWEEN
    ],
    validOperators: [
      OPERATOR_ON,
      OPERATOR_NOT_ON,
      OPERATOR_BEFORE,
      OPERATOR_AFTER,
      OPERATOR_BEFORE_INC,
      OPERATOR_AFTER_INC,
      OPERATOR_IN_THE_PAST,
      OPERATOR_OVER,
      OPERATOR_BETWEEN
    ],
    format: format5,
    getValueFormatted: getValueFormatted5,
    validate: {
      required: isValidRequired,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/boolean.mjs
  var import_i18n218 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/field-types/utils/is-valid-required-for-bool.mjs
  function isValidRequiredForBool(item, field) {
    const value = field.getValue({ item });
    return value === true;
  }

  // packages/dataviews/build-module/field-types/boolean.mjs
  function getValueFormatted6({
    item,
    field
  }) {
    const value = field.getValue({ item });
    if (value === true) {
      return (0, import_i18n218.__)("True");
    }
    if (value === false) {
      return (0, import_i18n218.__)("False");
    }
    return "";
  }
  function isValidCustom4(item, field) {
    const value = field.getValue({ item });
    if (![void 0, "", null].includes(value) && ![true, false].includes(value)) {
      return (0, import_i18n218.__)("Value must be true, false, or undefined");
    }
    return null;
  }
  var sort3 = (a2, b2, direction) => {
    const boolA = Boolean(a2);
    const boolB = Boolean(b2);
    if (boolA === boolB) {
      return 0;
    }
    if (direction === "asc") {
      return boolA ? 1 : -1;
    }
    return boolA ? -1 : 1;
  };
  var boolean_default = {
    type: "boolean",
    render,
    Edit: "checkbox",
    sort: sort3,
    validate: {
      required: isValidRequiredForBool,
      elements: isValidElements,
      custom: isValidCustom4
    },
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS, OPERATOR_IS_NOT],
    validOperators: [OPERATOR_IS, OPERATOR_IS_NOT],
    format: {},
    getValueFormatted: getValueFormatted6
  };

  // packages/dataviews/build-module/field-types/media.mjs
  var media_default2 = {
    type: "media",
    render: () => null,
    Edit: null,
    sort: () => 0,
    enableSorting: false,
    enableGlobalSearch: false,
    defaultOperators: [],
    validOperators: [],
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    // cannot validate any constraint, so
    // the only available validation for the field author
    // would be providing a custom validator.
    validate: {}
  };

  // packages/dataviews/build-module/field-types/array.mjs
  var import_i18n219 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/field-types/utils/is-valid-required-for-array.mjs
  function isValidRequiredForArray(item, field) {
    const value = field.getValue({ item });
    return Array.isArray(value) && value.length > 0 && value.every(
      (element) => ![void 0, "", null].includes(element)
    );
  }

  // packages/dataviews/build-module/field-types/array.mjs
  function getValueFormatted7({
    item,
    field
  }) {
    const value = field.getValue({ item });
    const arr = Array.isArray(value) ? value : [];
    return arr.join(", ");
  }
  function render2({ item, field }) {
    return getValueFormatted7({ item, field });
  }
  function isValidCustom5(item, field) {
    const value = field.getValue({ item });
    if (![void 0, "", null].includes(value) && !Array.isArray(value)) {
      return (0, import_i18n219.__)("Value must be an array.");
    }
    if (!value.every((v2) => typeof v2 === "string")) {
      return (0, import_i18n219.__)("Every value must be a string.");
    }
    return null;
  }
  var sort4 = (a2, b2, direction) => {
    const arrA = Array.isArray(a2) ? a2 : [];
    const arrB = Array.isArray(b2) ? b2 : [];
    if (arrA.length !== arrB.length) {
      return direction === "asc" ? arrA.length - arrB.length : arrB.length - arrA.length;
    }
    const joinedA = arrA.join(",");
    const joinedB = arrB.join(",");
    return direction === "asc" ? joinedA.localeCompare(joinedB) : joinedB.localeCompare(joinedA);
  };
  var array_default = {
    type: "array",
    render: render2,
    Edit: "array",
    sort: sort4,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS_ANY, OPERATOR_IS_NONE],
    validOperators: [
      OPERATOR_IS_ANY,
      OPERATOR_IS_NONE,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: {},
    getValueFormatted: getValueFormatted7,
    validate: {
      required: isValidRequiredForArray,
      elements: isValidElements,
      custom: isValidCustom5
    }
  };

  // packages/dataviews/build-module/field-types/password.mjs
  function getValueFormatted8({
    item,
    field
  }) {
    return field.getValue({ item }) ? "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" : "";
  }
  var password_default = {
    type: "password",
    render,
    Edit: "password",
    sort: () => 0,
    // Passwords should not be sortable for security reasons
    enableSorting: false,
    enableGlobalSearch: false,
    defaultOperators: [],
    validOperators: [],
    format: {},
    getValueFormatted: getValueFormatted8,
    validate: {
      required: isValidRequired,
      pattern: isValidPattern,
      minLength: isValidMinLength,
      maxLength: isValidMaxLength,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/telephone.mjs
  var telephone_default = {
    type: "telephone",
    render,
    Edit: "telephone",
    sort: sort_text_default,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS_ANY, OPERATOR_IS_NONE],
    validOperators: [
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_CONTAINS,
      OPERATOR_NOT_CONTAINS,
      OPERATOR_STARTS_WITH,
      // Multiple selection
      OPERATOR_IS_ANY,
      OPERATOR_IS_NONE,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    validate: {
      required: isValidRequired,
      pattern: isValidPattern,
      minLength: isValidMinLength,
      maxLength: isValidMaxLength,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/color.mjs
  var import_i18n220 = __toESM(require_i18n(), 1);
  var import_jsx_runtime423 = __toESM(require_jsx_runtime(), 1);
  function render3({ item, field }) {
    if (field.hasElements) {
      return /* @__PURE__ */ (0, import_jsx_runtime423.jsx)(RenderFromElements, { item, field });
    }
    const value = get_value_formatted_default_default({ item, field });
    if (!value || !w(value).isValid()) {
      return value;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime423.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
      /* @__PURE__ */ (0, import_jsx_runtime423.jsx)(
        "div",
        {
          style: {
            width: "16px",
            height: "16px",
            borderRadius: "50%",
            backgroundColor: value,
            border: "1px solid #ddd",
            flexShrink: 0
          }
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime423.jsx)("span", { children: value })
    ] });
  }
  function isValidCustom6(item, field) {
    const value = field.getValue({ item });
    if (![void 0, "", null].includes(value) && !w(value).isValid()) {
      return (0, import_i18n220.__)("Value must be a valid color.");
    }
    return null;
  }
  var sort5 = (a2, b2, direction) => {
    const colorA = w(a2);
    const colorB = w(b2);
    if (!colorA.isValid() && !colorB.isValid()) {
      return 0;
    }
    if (!colorA.isValid()) {
      return direction === "asc" ? 1 : -1;
    }
    if (!colorB.isValid()) {
      return direction === "asc" ? -1 : 1;
    }
    const hslA = colorA.toHsl();
    const hslB = colorB.toHsl();
    if (hslA.h !== hslB.h) {
      return direction === "asc" ? hslA.h - hslB.h : hslB.h - hslA.h;
    }
    if (hslA.s !== hslB.s) {
      return direction === "asc" ? hslA.s - hslB.s : hslB.s - hslA.s;
    }
    return direction === "asc" ? hslA.l - hslB.l : hslB.l - hslA.l;
  };
  var color_default2 = {
    type: "color",
    render: render3,
    Edit: "color",
    sort: sort5,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS_ANY, OPERATOR_IS_NONE],
    validOperators: [
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_IS_ANY,
      OPERATOR_IS_NONE
    ],
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    validate: {
      required: isValidRequired,
      elements: isValidElements,
      custom: isValidCustom6
    }
  };

  // packages/dataviews/build-module/field-types/url.mjs
  var url_default = {
    type: "url",
    render,
    Edit: "url",
    sort: sort_text_default,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS_ANY, OPERATOR_IS_NONE],
    validOperators: [
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_CONTAINS,
      OPERATOR_NOT_CONTAINS,
      OPERATOR_STARTS_WITH,
      // Multiple selection
      OPERATOR_IS_ANY,
      OPERATOR_IS_NONE,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    validate: {
      required: isValidRequired,
      pattern: isValidPattern,
      minLength: isValidMinLength,
      maxLength: isValidMaxLength,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/no-type.mjs
  var sort6 = (a2, b2, direction) => {
    if (typeof a2 === "number" && typeof b2 === "number") {
      return sort_number_default(a2, b2, direction);
    }
    return sort_text_default(a2, b2, direction);
  };
  var no_type_default = {
    // type: no type for this one
    render,
    Edit: null,
    sort: sort6,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS, OPERATOR_IS_NOT],
    validOperators: getAllOperatorNames(),
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    validate: {
      required: isValidRequired,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/utils/get-is-valid.mjs
  function getIsValid(field, fieldType) {
    let required;
    if (field.isValid?.required === true && fieldType.validate.required !== void 0) {
      required = {
        constraint: true,
        validate: fieldType.validate.required
      };
    }
    let elements;
    if ((field.isValid?.elements === true || // elements is enabled unless the field opts-out
    field.isValid?.elements === void 0 && (!!field.elements || !!field.getElements)) && fieldType.validate.elements !== void 0) {
      elements = {
        constraint: true,
        validate: fieldType.validate.elements
      };
    }
    let min;
    if (typeof field.isValid?.min === "number" && fieldType.validate.min !== void 0) {
      min = {
        constraint: field.isValid.min,
        validate: fieldType.validate.min
      };
    }
    let max;
    if (typeof field.isValid?.max === "number" && fieldType.validate.max !== void 0) {
      max = {
        constraint: field.isValid.max,
        validate: fieldType.validate.max
      };
    }
    let minLength;
    if (typeof field.isValid?.minLength === "number" && fieldType.validate.minLength !== void 0) {
      minLength = {
        constraint: field.isValid.minLength,
        validate: fieldType.validate.minLength
      };
    }
    let maxLength;
    if (typeof field.isValid?.maxLength === "number" && fieldType.validate.maxLength !== void 0) {
      maxLength = {
        constraint: field.isValid.maxLength,
        validate: fieldType.validate.maxLength
      };
    }
    let pattern;
    if (field.isValid?.pattern !== void 0 && fieldType.validate.pattern !== void 0) {
      pattern = {
        constraint: field.isValid?.pattern,
        validate: fieldType.validate.pattern
      };
    }
    const custom = field.isValid?.custom ?? fieldType.validate.custom;
    return {
      required,
      elements,
      min,
      max,
      minLength,
      maxLength,
      pattern,
      custom
    };
  }

  // packages/dataviews/build-module/field-types/utils/get-filter.mjs
  function getFilter(fieldType) {
    return fieldType.validOperators.reduce((accumulator, operator) => {
      const operatorObj = getOperatorByName(operator);
      if (operatorObj?.filter) {
        accumulator[operator] = operatorObj.filter;
      }
      return accumulator;
    }, {});
  }

  // packages/dataviews/build-module/field-types/utils/get-format.mjs
  function getFormat(field, fieldType) {
    return {
      ...fieldType.format,
      ...field.format
    };
  }
  var get_format_default = getFormat;

  // packages/dataviews/build-module/field-types/index.mjs
  function getFieldTypeByName(type) {
    const found = [
      email_default,
      integer_default,
      number_default,
      text_default,
      datetime_default,
      date_default,
      boolean_default,
      media_default2,
      array_default,
      password_default,
      telephone_default,
      color_default2,
      url_default
    ].find((fieldType) => fieldType?.type === type);
    if (!!found) {
      return found;
    }
    return no_type_default;
  }
  function normalizeFields(fields) {
    return fields.map((field) => {
      const fieldType = getFieldTypeByName(field.type);
      const getValue = field.getValue || get_value_from_id_default(field.id);
      const sort7 = function(a2, b2, direction) {
        const aValue = getValue({ item: a2 });
        const bValue = getValue({ item: b2 });
        return field.sort ? field.sort(aValue, bValue, direction) : fieldType.sort(aValue, bValue, direction);
      };
      return {
        id: field.id,
        label: field.label || field.id,
        header: field.header || field.label || field.id,
        description: field.description,
        placeholder: field.placeholder,
        getValue,
        setValue: field.setValue || set_value_from_id_default(field.id),
        elements: field.elements,
        getElements: field.getElements,
        hasElements: hasElements(field),
        isVisible: field.isVisible,
        enableHiding: field.enableHiding ?? true,
        readOnly: field.readOnly ?? false,
        // The type provides defaults for the following props
        type: fieldType.type,
        render: field.render ?? fieldType.render,
        Edit: getControl(field, fieldType.Edit),
        sort: sort7,
        enableSorting: field.enableSorting ?? fieldType.enableSorting,
        enableGlobalSearch: field.enableGlobalSearch ?? fieldType.enableGlobalSearch,
        isValid: getIsValid(field, fieldType),
        filterBy: get_filter_by_default(
          field,
          fieldType.defaultOperators,
          fieldType.validOperators
        ),
        filter: getFilter(fieldType),
        format: get_format_default(field, fieldType),
        getValueFormatted: field.getValueFormatted ?? fieldType.getValueFormatted
      };
    });
  }

  // packages/dataviews/build-module/dataform/index.mjs
  var import_element256 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/components/dataform-context/index.mjs
  var import_element245 = __toESM(require_element(), 1);
  var import_jsx_runtime424 = __toESM(require_jsx_runtime(), 1);
  var DataFormContext = (0, import_element245.createContext)({
    fields: []
  });
  DataFormContext.displayName = "DataFormContext";
  function DataFormProvider({
    fields,
    children
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime424.jsx)(DataFormContext.Provider, { value: { fields }, children });
  }
  var dataform_context_default = DataFormContext;

  // packages/dataviews/build-module/components/dataform-layouts/data-form-layout.mjs
  var import_element255 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/components/dataform-layouts/regular/index.mjs
  var import_element246 = __toESM(require_element(), 1);
  var import_components247 = __toESM(require_components(), 1);

  // packages/dataviews/build-module/components/dataform-layouts/normalize-form.mjs
  var DEFAULT_LAYOUT = {
    type: "regular",
    labelPosition: "top"
  };
  var normalizeCardSummaryField = (sum) => {
    if (typeof sum === "string") {
      return [{ id: sum, visibility: "when-collapsed" }];
    }
    return sum.map((item) => {
      if (typeof item === "string") {
        return { id: item, visibility: "when-collapsed" };
      }
      return { id: item.id, visibility: item.visibility };
    });
  };
  function normalizeLayout(layout) {
    let normalizedLayout = DEFAULT_LAYOUT;
    if (layout?.type === "regular") {
      normalizedLayout = {
        type: "regular",
        labelPosition: layout?.labelPosition ?? "top"
      };
    } else if (layout?.type === "panel") {
      const summary = layout.summary ?? [];
      const normalizedSummary = Array.isArray(summary) ? summary : [summary];
      normalizedLayout = {
        type: "panel",
        labelPosition: layout?.labelPosition ?? "side",
        openAs: layout?.openAs ?? "dropdown",
        summary: normalizedSummary,
        editVisibility: layout?.editVisibility ?? "on-hover"
      };
    } else if (layout?.type === "card") {
      if (layout.withHeader === false) {
        normalizedLayout = {
          type: "card",
          withHeader: false,
          isOpened: true,
          summary: [],
          isCollapsible: false
        };
      } else {
        const summary = layout.summary ?? [];
        normalizedLayout = {
          type: "card",
          withHeader: true,
          isOpened: typeof layout.isOpened === "boolean" ? layout.isOpened : true,
          summary: normalizeCardSummaryField(summary),
          isCollapsible: layout.isCollapsible === void 0 ? true : layout.isCollapsible
        };
      }
    } else if (layout?.type === "row") {
      normalizedLayout = {
        type: "row",
        alignment: layout?.alignment ?? "center",
        styles: layout?.styles ?? {}
      };
    } else if (layout?.type === "details") {
      normalizedLayout = {
        type: "details",
        summary: layout?.summary ?? ""
      };
    }
    return normalizedLayout;
  }
  function normalizeForm(form) {
    const normalizedFormLayout = normalizeLayout(form?.layout);
    const normalizedFields = (form.fields ?? []).map(
      (field) => {
        if (typeof field === "string") {
          return {
            id: field,
            layout: normalizedFormLayout
          };
        }
        const fieldLayout = field.layout ? normalizeLayout(field.layout) : normalizedFormLayout;
        return {
          id: field.id,
          layout: fieldLayout,
          ...!!field.label && { label: field.label },
          ...!!field.description && {
            description: field.description
          },
          ..."children" in field && Array.isArray(field.children) && {
            children: normalizeForm({
              fields: field.children,
              layout: DEFAULT_LAYOUT
            }).fields
          }
        };
      }
    );
    return {
      layout: normalizedFormLayout,
      fields: normalizedFields
    };
  }
  var normalize_form_default = normalizeForm;

  // packages/dataviews/build-module/components/dataform-layouts/regular/index.mjs
  var import_jsx_runtime425 = __toESM(require_jsx_runtime(), 1);
  function Header({ title }) {
    return /* @__PURE__ */ (0, import_jsx_runtime425.jsx)(
      Stack,
      {
        direction: "column",
        className: "dataforms-layouts-regular__header",
        gap: "lg",
        children: /* @__PURE__ */ (0, import_jsx_runtime425.jsx)(Stack, { direction: "row", align: "center", children: /* @__PURE__ */ (0, import_jsx_runtime425.jsx)(import_components247.__experimentalHeading, { level: 2, size: 13, children: title }) })
      }
    );
  }
  function FormRegularField({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { fields } = (0, import_element246.useContext)(dataform_context_default);
    const layout = field.layout;
    const form = (0, import_element246.useMemo)(
      () => ({
        layout: DEFAULT_LAYOUT,
        fields: !!field.children ? field.children : []
      }),
      [field]
    );
    if (!!field.children) {
      return /* @__PURE__ */ (0, import_jsx_runtime425.jsxs)(import_jsx_runtime425.Fragment, { children: [
        !hideLabelFromVision && field.label && /* @__PURE__ */ (0, import_jsx_runtime425.jsx)(Header, { title: field.label }),
        /* @__PURE__ */ (0, import_jsx_runtime425.jsx)(
          DataFormLayout,
          {
            data,
            form,
            onChange,
            validity: validity?.children
          }
        )
      ] });
    }
    const labelPosition = layout.labelPosition;
    const fieldDefinition = fields.find(
      (fieldDef) => fieldDef.id === field.id
    );
    if (!fieldDefinition || !fieldDefinition.Edit) {
      return null;
    }
    if (labelPosition === "side") {
      return /* @__PURE__ */ (0, import_jsx_runtime425.jsxs)(
        Stack,
        {
          direction: "row",
          className: "dataforms-layouts-regular__field",
          gap: "sm",
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime425.jsx)(
              "div",
              {
                className: clsx_default(
                  "dataforms-layouts-regular__field-label",
                  `dataforms-layouts-regular__field-label--label-position-${labelPosition}`
                ),
                children: /* @__PURE__ */ (0, import_jsx_runtime425.jsx)(import_components247.BaseControl.VisualLabel, { children: fieldDefinition.label })
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime425.jsx)("div", { className: "dataforms-layouts-regular__field-control", children: fieldDefinition.readOnly === true ? /* @__PURE__ */ (0, import_jsx_runtime425.jsx)(
              fieldDefinition.render,
              {
                item: data,
                field: fieldDefinition
              }
            ) : /* @__PURE__ */ (0, import_jsx_runtime425.jsx)(
              fieldDefinition.Edit,
              {
                data,
                field: fieldDefinition,
                onChange,
                hideLabelFromVision: true,
                markWhenOptional,
                validity
              },
              fieldDefinition.id
            ) })
          ]
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime425.jsx)("div", { className: "dataforms-layouts-regular__field", children: fieldDefinition.readOnly === true ? /* @__PURE__ */ (0, import_jsx_runtime425.jsx)(import_jsx_runtime425.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime425.jsxs)(import_jsx_runtime425.Fragment, { children: [
      !hideLabelFromVision && labelPosition !== "none" && /* @__PURE__ */ (0, import_jsx_runtime425.jsx)(import_components247.BaseControl.VisualLabel, { children: fieldDefinition.label }),
      /* @__PURE__ */ (0, import_jsx_runtime425.jsx)(
        fieldDefinition.render,
        {
          item: data,
          field: fieldDefinition
        }
      )
    ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime425.jsx)(
      fieldDefinition.Edit,
      {
        data,
        field: fieldDefinition,
        onChange,
        hideLabelFromVision: labelPosition === "none" ? true : hideLabelFromVision,
        markWhenOptional,
        validity
      }
    ) });
  }

  // packages/dataviews/build-module/components/dataform-layouts/panel/modal.mjs
  var import_deepmerge2 = __toESM(require_cjs(), 1);
  var import_components250 = __toESM(require_components(), 1);
  var import_i18n223 = __toESM(require_i18n(), 1);
  var import_element251 = __toESM(require_element(), 1);
  var import_compose96 = __toESM(require_compose(), 1);

  // packages/dataviews/build-module/components/dataform-layouts/panel/summary-button.mjs
  var import_components249 = __toESM(require_components(), 1);
  var import_i18n221 = __toESM(require_i18n(), 1);
  var import_compose95 = __toESM(require_compose(), 1);
  var import_element247 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/components/dataform-layouts/panel/utils/get-label-classname.mjs
  function getLabelClassName(labelPosition, showError) {
    return clsx_default(
      "dataforms-layouts-panel__field-label",
      `dataforms-layouts-panel__field-label--label-position-${labelPosition}`,
      { "has-error": showError }
    );
  }
  var get_label_classname_default = getLabelClassName;

  // packages/dataviews/build-module/components/dataform-layouts/panel/utils/get-label-content.mjs
  var import_components248 = __toESM(require_components(), 1);
  var import_jsx_runtime426 = __toESM(require_jsx_runtime(), 1);
  function getLabelContent(showError, errorMessage, fieldLabel) {
    return showError ? /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(import_components248.Tooltip, { text: errorMessage, placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime426.jsxs)("span", { className: "dataforms-layouts-panel__field-label-error-content", children: [
      /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(import_components248.Icon, { icon: error_default, size: 16 }),
      fieldLabel
    ] }) }) : fieldLabel;
  }
  var get_label_content_default = getLabelContent;

  // packages/dataviews/build-module/components/dataform-layouts/panel/utils/get-first-validation-error.mjs
  function getFirstValidationError(validity) {
    if (!validity) {
      return void 0;
    }
    const validityRules = Object.keys(validity).filter(
      (key) => key !== "children"
    );
    for (const key of validityRules) {
      const rule = validity[key];
      if (rule === void 0) {
        continue;
      }
      if (rule.type === "invalid") {
        if (rule.message) {
          return rule.message;
        }
        if (key === "required") {
          return "A required field is empty";
        }
        return "Unidentified validation error";
      }
    }
    if (validity.children) {
      for (const childValidity of Object.values(validity.children)) {
        const childError = getFirstValidationError(childValidity);
        if (childError) {
          return childError;
        }
      }
    }
    return void 0;
  }
  var get_first_validation_error_default = getFirstValidationError;

  // packages/dataviews/build-module/components/dataform-layouts/panel/summary-button.mjs
  var import_jsx_runtime427 = __toESM(require_jsx_runtime(), 1);
  function SummaryButton({
    data,
    field,
    fieldLabel,
    summaryFields,
    validity,
    touched,
    disabled,
    onClick,
    "aria-expanded": ariaExpanded
  }) {
    const { labelPosition, editVisibility } = field.layout;
    const errorMessage = get_first_validation_error_default(validity);
    const showError = touched && !!errorMessage;
    const labelClassName = get_label_classname_default(labelPosition, showError);
    const labelContent = get_label_content_default(showError, errorMessage, fieldLabel);
    const className = clsx_default(
      "dataforms-layouts-panel__field-trigger",
      `dataforms-layouts-panel__field-trigger--label-${labelPosition}`,
      {
        "is-disabled": disabled,
        "dataforms-layouts-panel__field-trigger--edit-always": editVisibility === "always"
      }
    );
    const controlId = (0, import_compose95.useInstanceId)(
      SummaryButton,
      "dataforms-layouts-panel__field-control"
    );
    const ariaLabel = showError ? (0, import_i18n221.sprintf)(
      // translators: %s: Field name.
      (0, import_i18n221._x)("Edit %s (has errors)", "field"),
      fieldLabel || ""
    ) : (0, import_i18n221.sprintf)(
      // translators: %s: Field name.
      (0, import_i18n221._x)("Edit %s", "field"),
      fieldLabel || ""
    );
    const rowRef = (0, import_element247.useRef)(null);
    const handleRowClick = () => {
      const selection2 = rowRef.current?.ownerDocument.defaultView?.getSelection();
      if (selection2 && selection2.toString().length > 0) {
        return;
      }
      onClick();
    };
    const handleKeyDown = (event) => {
      if (event.target === event.currentTarget && (event.key === "Enter" || event.key === " ")) {
        event.preventDefault();
        onClick();
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime427.jsxs)(
      "div",
      {
        ref: rowRef,
        className,
        onClick: !disabled ? handleRowClick : void 0,
        onKeyDown: !disabled ? handleKeyDown : void 0,
        children: [
          labelPosition !== "none" && /* @__PURE__ */ (0, import_jsx_runtime427.jsx)("span", { className: labelClassName, children: labelContent }),
          labelPosition === "none" && showError && /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(import_components249.Tooltip, { text: errorMessage, placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime427.jsx)("span", { className: "dataforms-layouts-panel__field-label-error-content", children: /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(import_components249.Icon, { icon: error_default, size: 16 }) }) }),
          /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
            "span",
            {
              id: `${controlId}`,
              className: "dataforms-layouts-panel__field-control",
              children: summaryFields.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
                "span",
                {
                  style: {
                    display: "flex",
                    flexDirection: "column",
                    alignItems: "flex-start",
                    width: "100%",
                    gap: "2px"
                  },
                  children: summaryFields.map((summaryField) => /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
                    "span",
                    {
                      style: { width: "100%" },
                      children: /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
                        summaryField.render,
                        {
                          item: data,
                          field: summaryField
                        }
                      )
                    },
                    summaryField.id
                  ))
                }
              ) : summaryFields.map((summaryField) => /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
                summaryField.render,
                {
                  item: data,
                  field: summaryField
                },
                summaryField.id
              ))
            }
          ),
          !disabled && /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
            import_components249.Button,
            {
              className: "dataforms-layouts-panel__field-trigger-icon",
              label: ariaLabel,
              showTooltip: false,
              icon: pencil_default,
              size: "small",
              "aria-expanded": ariaExpanded,
              "aria-haspopup": "dialog",
              "aria-describedby": `${controlId}`
            }
          )
        ]
      }
    );
  }

  // packages/dataviews/build-module/hooks/use-form-validity.mjs
  var import_deepmerge = __toESM(require_cjs(), 1);
  var import_es66 = __toESM(require_es6(), 1);
  var import_element248 = __toESM(require_element(), 1);
  var import_i18n222 = __toESM(require_i18n(), 1);
  function isFormValid(formValidity) {
    if (!formValidity) {
      return true;
    }
    return Object.values(formValidity).every((fieldValidation) => {
      return Object.entries(fieldValidation).every(
        ([key, validation]) => {
          if (key === "children" && validation && typeof validation === "object") {
            return isFormValid(validation);
          }
          return validation.type !== "invalid" && validation.type !== "validating";
        }
      );
    });
  }
  function getFormFieldsToValidate(form, fields) {
    const normalizedForm = normalize_form_default(form);
    if (normalizedForm.fields.length === 0) {
      return [];
    }
    const fieldsMap = /* @__PURE__ */ new Map();
    fields.forEach((field) => {
      fieldsMap.set(field.id, field);
    });
    function processFormField(formField) {
      if ("children" in formField && Array.isArray(formField.children)) {
        const processedChildren = formField.children.map(processFormField).filter((child) => child !== null);
        if (processedChildren.length === 0) {
          return null;
        }
        const fieldDef2 = fieldsMap.get(formField.id);
        if (fieldDef2) {
          const [normalizedField2] = normalizeFields([
            fieldDef2
          ]);
          return {
            id: formField.id,
            children: processedChildren,
            field: normalizedField2
          };
        }
        return {
          id: formField.id,
          children: processedChildren
        };
      }
      const fieldDef = fieldsMap.get(formField.id);
      if (!fieldDef) {
        return null;
      }
      const [normalizedField] = normalizeFields([fieldDef]);
      return {
        id: formField.id,
        children: [],
        field: normalizedField
      };
    }
    const toValidate = normalizedForm.fields.map(processFormField).filter((field) => field !== null);
    return toValidate;
  }
  function setValidityAtPath(formValidity, fieldValidity, path) {
    if (!formValidity) {
      formValidity = {};
    }
    if (path.length === 0) {
      return formValidity;
    }
    const result = { ...formValidity };
    let current = result;
    for (let i2 = 0; i2 < path.length - 1; i2++) {
      const segment = path[i2];
      if (!current[segment]) {
        current[segment] = {};
      }
      current[segment] = { ...current[segment] };
      current = current[segment];
    }
    const finalKey = path[path.length - 1];
    current[finalKey] = {
      ...current[finalKey] || {},
      ...fieldValidity
    };
    return result;
  }
  function removeValidationProperty(formValidity, path, property) {
    if (!formValidity || path.length === 0) {
      return formValidity;
    }
    const result = { ...formValidity };
    let current = result;
    for (let i2 = 0; i2 < path.length - 1; i2++) {
      const segment = path[i2];
      if (!current[segment]) {
        return formValidity;
      }
      current[segment] = { ...current[segment] };
      current = current[segment];
    }
    const finalKey = path[path.length - 1];
    if (!current[finalKey]) {
      return formValidity;
    }
    const fieldValidity = { ...current[finalKey] };
    delete fieldValidity[property];
    if (Object.keys(fieldValidity).length === 0) {
      delete current[finalKey];
    } else {
      current[finalKey] = fieldValidity;
    }
    if (Object.keys(result).length === 0) {
      return void 0;
    }
    return result;
  }
  function handleElementsValidationAsync(promise, formField, promiseHandler) {
    const { elementsCounterRef, setFormValidity, path, item } = promiseHandler;
    const currentToken = (elementsCounterRef.current[formField.id] || 0) + 1;
    elementsCounterRef.current[formField.id] = currentToken;
    promise.then((result) => {
      if (currentToken !== elementsCounterRef.current[formField.id]) {
        return;
      }
      if (!Array.isArray(result)) {
        setFormValidity((prev) => {
          const newFormValidity = setValidityAtPath(
            prev,
            {
              elements: {
                type: "invalid",
                message: (0, import_i18n222.__)("Could not validate elements.")
              }
            },
            [...path, formField.id]
          );
          return newFormValidity;
        });
        return;
      }
      if (formField.field?.isValid.elements && !formField.field.isValid.elements.validate(item, {
        ...formField.field,
        elements: result
      })) {
        setFormValidity((prev) => {
          const newFormValidity = setValidityAtPath(
            prev,
            {
              elements: {
                type: "invalid",
                message: (0, import_i18n222.__)(
                  "Value must be one of the elements."
                )
              }
            },
            [...path, formField.id]
          );
          return newFormValidity;
        });
      } else {
        setFormValidity((prev) => {
          return removeValidationProperty(
            prev,
            [...path, formField.id],
            "elements"
          );
        });
      }
    }).catch((error) => {
      if (currentToken !== elementsCounterRef.current[formField.id]) {
        return;
      }
      let errorMessage;
      if (error instanceof Error) {
        errorMessage = error.message;
      } else {
        errorMessage = String(error) || (0, import_i18n222.__)(
          "Unknown error when running elements validation asynchronously."
        );
      }
      setFormValidity((prev) => {
        const newFormValidity = setValidityAtPath(
          prev,
          {
            elements: {
              type: "invalid",
              message: errorMessage
            }
          },
          [...path, formField.id]
        );
        return newFormValidity;
      });
    });
  }
  function handleCustomValidationAsync(promise, formField, promiseHandler) {
    const { customCounterRef, setFormValidity, path } = promiseHandler;
    const currentToken = (customCounterRef.current[formField.id] || 0) + 1;
    customCounterRef.current[formField.id] = currentToken;
    promise.then((result) => {
      if (currentToken !== customCounterRef.current[formField.id]) {
        return;
      }
      if (result === null) {
        setFormValidity((prev) => {
          return removeValidationProperty(
            prev,
            [...path, formField.id],
            "custom"
          );
        });
        return;
      }
      if (typeof result === "string") {
        setFormValidity((prev) => {
          const newFormValidity = setValidityAtPath(
            prev,
            {
              custom: {
                type: "invalid",
                message: result
              }
            },
            [...path, formField.id]
          );
          return newFormValidity;
        });
        return;
      }
      setFormValidity((prev) => {
        const newFormValidity = setValidityAtPath(
          prev,
          {
            custom: {
              type: "invalid",
              message: (0, import_i18n222.__)("Validation could not be processed.")
            }
          },
          [...path, formField.id]
        );
        return newFormValidity;
      });
    }).catch((error) => {
      if (currentToken !== customCounterRef.current[formField.id]) {
        return;
      }
      let errorMessage;
      if (error instanceof Error) {
        errorMessage = error.message;
      } else {
        errorMessage = String(error) || (0, import_i18n222.__)(
          "Unknown error when running custom validation asynchronously."
        );
      }
      setFormValidity((prev) => {
        const newFormValidity = setValidityAtPath(
          prev,
          {
            custom: {
              type: "invalid",
              message: errorMessage
            }
          },
          [...path, formField.id]
        );
        return newFormValidity;
      });
    });
  }
  function validateFormField(item, formField, promiseHandler) {
    if (formField.field?.isValid.required && !formField.field.isValid.required.validate(item, formField.field)) {
      return {
        required: { type: "invalid" }
      };
    }
    if (formField.field?.isValid.pattern && !formField.field.isValid.pattern.validate(item, formField.field)) {
      return {
        pattern: {
          type: "invalid",
          message: (0, import_i18n222.__)("Value does not match the required pattern.")
        }
      };
    }
    if (formField.field?.isValid.min && !formField.field.isValid.min.validate(item, formField.field)) {
      return {
        min: {
          type: "invalid",
          message: (0, import_i18n222.__)("Value is below the minimum.")
        }
      };
    }
    if (formField.field?.isValid.max && !formField.field.isValid.max.validate(item, formField.field)) {
      return {
        max: {
          type: "invalid",
          message: (0, import_i18n222.__)("Value is above the maximum.")
        }
      };
    }
    if (formField.field?.isValid.minLength && !formField.field.isValid.minLength.validate(item, formField.field)) {
      return {
        minLength: {
          type: "invalid",
          message: (0, import_i18n222.__)("Value is too short.")
        }
      };
    }
    if (formField.field?.isValid.maxLength && !formField.field.isValid.maxLength.validate(item, formField.field)) {
      return {
        maxLength: {
          type: "invalid",
          message: (0, import_i18n222.__)("Value is too long.")
        }
      };
    }
    if (formField.field?.isValid.elements && formField.field.hasElements && !formField.field.getElements && Array.isArray(formField.field.elements) && !formField.field.isValid.elements.validate(item, formField.field)) {
      return {
        elements: {
          type: "invalid",
          message: (0, import_i18n222.__)("Value must be one of the elements.")
        }
      };
    }
    let customError;
    if (!!formField.field && formField.field.isValid.custom) {
      try {
        const value = formField.field.getValue({ item });
        customError = formField.field.isValid.custom(
          (0, import_deepmerge.default)(
            item,
            formField.field.setValue({
              item,
              value
            })
          ),
          formField.field
        );
      } catch (error) {
        let errorMessage;
        if (error instanceof Error) {
          errorMessage = error.message;
        } else {
          errorMessage = String(error) || (0, import_i18n222.__)("Unknown error when running custom validation.");
        }
        return {
          custom: {
            type: "invalid",
            message: errorMessage
          }
        };
      }
    }
    if (typeof customError === "string") {
      return {
        custom: {
          type: "invalid",
          message: customError
        }
      };
    }
    const fieldValidity = {};
    if (!!formField.field && formField.field.isValid.elements && formField.field.hasElements && typeof formField.field.getElements === "function") {
      handleElementsValidationAsync(
        formField.field.getElements(),
        formField,
        promiseHandler
      );
      fieldValidity.elements = {
        type: "validating",
        message: (0, import_i18n222.__)("Validating\u2026")
      };
    }
    if (customError instanceof Promise) {
      handleCustomValidationAsync(customError, formField, promiseHandler);
      fieldValidity.custom = {
        type: "validating",
        message: (0, import_i18n222.__)("Validating\u2026")
      };
    }
    if (Object.keys(fieldValidity).length > 0) {
      return fieldValidity;
    }
    if (formField.children.length > 0) {
      const result = {};
      formField.children.forEach((child) => {
        result[child.id] = validateFormField(item, child, {
          ...promiseHandler,
          path: [...promiseHandler.path, formField.id, "children"]
        });
      });
      const filteredResult = {};
      Object.entries(result).forEach(([key, value]) => {
        if (value !== void 0) {
          filteredResult[key] = value;
        }
      });
      if (Object.keys(filteredResult).length === 0) {
        return void 0;
      }
      return {
        children: filteredResult
      };
    }
    return void 0;
  }
  function getFormFieldValue(formField, item) {
    const fieldValue = formField?.field?.getValue({ item });
    if (formField.children.length === 0) {
      return fieldValue;
    }
    const childrenValues = formField.children.map(
      (child) => getFormFieldValue(child, item)
    );
    if (!childrenValues) {
      return fieldValue;
    }
    return {
      value: fieldValue,
      children: childrenValues
    };
  }
  function useFormValidity(item, fields, form) {
    const [formValidity, setFormValidity] = (0, import_element248.useState)();
    const customCounterRef = (0, import_element248.useRef)({});
    const elementsCounterRef = (0, import_element248.useRef)({});
    const previousValuesRef = (0, import_element248.useRef)({});
    const validate = (0, import_element248.useCallback)(() => {
      const promiseHandler = {
        customCounterRef,
        elementsCounterRef,
        setFormValidity,
        path: [],
        item
      };
      const formFieldsToValidate = getFormFieldsToValidate(form, fields);
      if (formFieldsToValidate.length === 0) {
        setFormValidity(void 0);
        return;
      }
      const newFormValidity = {};
      const untouchedFields = [];
      formFieldsToValidate.forEach((formField) => {
        const value = getFormFieldValue(formField, item);
        if (previousValuesRef.current.hasOwnProperty(formField.id) && (0, import_es66.default)(
          previousValuesRef.current[formField.id],
          value
        )) {
          untouchedFields.push(formField.id);
          return;
        }
        previousValuesRef.current[formField.id] = value;
        const fieldValidity = validateFormField(
          item,
          formField,
          promiseHandler
        );
        if (fieldValidity !== void 0) {
          newFormValidity[formField.id] = fieldValidity;
        }
      });
      setFormValidity((existingFormValidity) => {
        let validity = {
          ...existingFormValidity,
          ...newFormValidity
        };
        const fieldsToKeep = [
          ...untouchedFields,
          ...Object.keys(newFormValidity)
        ];
        Object.keys(validity).forEach((key) => {
          if (validity && !fieldsToKeep.includes(key)) {
            delete validity[key];
          }
        });
        if (Object.keys(validity).length === 0) {
          validity = void 0;
        }
        const areEqual = (0, import_es66.default)(existingFormValidity, validity);
        if (areEqual) {
          return existingFormValidity;
        }
        return validity;
      });
    }, [item, fields, form]);
    (0, import_element248.useEffect)(() => {
      validate();
    }, [validate]);
    return {
      validity: formValidity,
      isValid: isFormValid(formValidity)
    };
  }
  var use_form_validity_default = useFormValidity;

  // packages/dataviews/build-module/hooks/use-report-validity.mjs
  var import_element249 = __toESM(require_element(), 1);
  function useReportValidity(ref, shouldReport) {
    (0, import_element249.useEffect)(() => {
      if (shouldReport && ref.current) {
        const inputs = ref.current.querySelectorAll(
          "input, textarea, select"
        );
        inputs.forEach((input) => {
          input.reportValidity();
        });
      }
    }, [shouldReport, ref]);
  }

  // packages/dataviews/build-module/components/dataform-layouts/panel/utils/use-field-from-form-field.mjs
  var import_element250 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/components/dataform-layouts/get-summary-fields.mjs
  function extractSummaryIds(summary) {
    if (Array.isArray(summary)) {
      return summary.map(
        (item) => typeof item === "string" ? item : item.id
      );
    }
    return [];
  }
  var getSummaryFields = (summaryField, fields) => {
    if (Array.isArray(summaryField) && summaryField.length > 0) {
      const summaryIds = extractSummaryIds(summaryField);
      return summaryIds.map(
        (summaryId) => fields.find((_field) => _field.id === summaryId)
      ).filter((_field) => _field !== void 0);
    }
    return [];
  };

  // packages/dataviews/build-module/components/dataform-layouts/panel/utils/use-field-from-form-field.mjs
  var getFieldDefinition = (field, fields) => {
    const fieldDefinition = fields.find((_field) => _field.id === field.id);
    if (!fieldDefinition) {
      return fields.find((_field) => {
        if (!!field.children) {
          const simpleChildren = field.children.filter(
            (child) => !child.children
          );
          if (simpleChildren.length === 0) {
            return false;
          }
          return _field.id === simpleChildren[0].id;
        }
        return _field.id === field.id;
      });
    }
    return fieldDefinition;
  };
  function useFieldFromFormField(field) {
    const { fields } = (0, import_element250.useContext)(dataform_context_default);
    const layout = field.layout;
    const summaryFields = getSummaryFields(layout.summary, fields);
    const fieldDefinition = getFieldDefinition(field, fields);
    const fieldLabel = !!field.children ? field.label : fieldDefinition?.label;
    if (summaryFields.length === 0) {
      return {
        summaryFields: fieldDefinition ? [fieldDefinition] : [],
        fieldDefinition,
        fieldLabel
      };
    }
    return {
      summaryFields,
      fieldDefinition,
      fieldLabel
    };
  }
  var use_field_from_form_field_default = useFieldFromFormField;

  // packages/dataviews/build-module/components/dataform-layouts/panel/modal.mjs
  var import_jsx_runtime428 = __toESM(require_jsx_runtime(), 1);
  function ModalContent({
    data,
    field,
    onChange,
    fieldLabel,
    onClose,
    touched
  }) {
    const { fields } = (0, import_element251.useContext)(dataform_context_default);
    const [changes, setChanges] = (0, import_element251.useState)({});
    const modalData = (0, import_element251.useMemo)(() => {
      return (0, import_deepmerge2.default)(data, changes, {
        arrayMerge: (target, source) => source
      });
    }, [data, changes]);
    const form = (0, import_element251.useMemo)(
      () => ({
        layout: DEFAULT_LAYOUT,
        fields: !!field.children ? field.children : (
          // If not explicit children return the field id itself.
          [{ id: field.id, layout: DEFAULT_LAYOUT }]
        )
      }),
      [field]
    );
    const fieldsAsFieldType = fields.map((f2) => ({
      ...f2,
      Edit: f2.Edit === null ? void 0 : f2.Edit,
      isValid: {
        required: f2.isValid.required?.constraint,
        elements: f2.isValid.elements?.constraint,
        min: f2.isValid.min?.constraint,
        max: f2.isValid.max?.constraint,
        pattern: f2.isValid.pattern?.constraint,
        minLength: f2.isValid.minLength?.constraint,
        maxLength: f2.isValid.maxLength?.constraint
      }
    }));
    const { validity } = use_form_validity_default(modalData, fieldsAsFieldType, form);
    const onApply = () => {
      onChange(changes);
      onClose();
    };
    const handleOnChange = (newValue) => {
      setChanges(
        (prev) => (0, import_deepmerge2.default)(prev, newValue, {
          arrayMerge: (target, source) => source
        })
      );
    };
    const focusOnMountRef = (0, import_compose96.useFocusOnMount)("firstInputElement");
    const contentRef = (0, import_element251.useRef)(null);
    const mergedRef = (0, import_compose96.useMergeRefs)([focusOnMountRef, contentRef]);
    useReportValidity(contentRef, touched);
    return /* @__PURE__ */ (0, import_jsx_runtime428.jsxs)(
      import_components250.Modal,
      {
        className: "dataforms-layouts-panel__modal",
        onRequestClose: onClose,
        isFullScreen: false,
        title: fieldLabel,
        size: "medium",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime428.jsx)("div", { ref: mergedRef, children: /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
            DataFormLayout,
            {
              data: modalData,
              form,
              onChange: handleOnChange,
              validity,
              children: (FieldLayout, childField, childFieldValidity, markWhenOptional) => /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
                FieldLayout,
                {
                  data: modalData,
                  field: childField,
                  onChange: handleOnChange,
                  hideLabelFromVision: form.fields.length < 2,
                  markWhenOptional,
                  validity: childFieldValidity
                },
                childField.id
              )
            }
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime428.jsxs)(
            Stack,
            {
              direction: "row",
              className: "dataforms-layouts-panel__modal-footer",
              gap: "md",
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(import_components250.__experimentalSpacer, { style: { flex: 1 } }),
                /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
                  import_components250.Button,
                  {
                    variant: "tertiary",
                    onClick: onClose,
                    __next40pxDefaultSize: true,
                    children: (0, import_i18n223.__)("Cancel")
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
                  import_components250.Button,
                  {
                    variant: "primary",
                    onClick: onApply,
                    __next40pxDefaultSize: true,
                    children: (0, import_i18n223.__)("Apply")
                  }
                )
              ]
            }
          )
        ]
      }
    );
  }
  function PanelModal({
    data,
    field,
    onChange,
    validity
  }) {
    const [touched, setTouched] = (0, import_element251.useState)(false);
    const [isOpen, setIsOpen] = (0, import_element251.useState)(false);
    const { fieldDefinition, fieldLabel, summaryFields } = use_field_from_form_field_default(field);
    if (!fieldDefinition) {
      return null;
    }
    const handleClose = () => {
      setIsOpen(false);
      setTouched(true);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime428.jsxs)(import_jsx_runtime428.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
        SummaryButton,
        {
          data,
          field,
          fieldLabel,
          summaryFields,
          validity,
          touched,
          disabled: fieldDefinition.readOnly === true,
          onClick: () => setIsOpen(true),
          "aria-expanded": isOpen
        }
      ),
      isOpen && /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
        ModalContent,
        {
          data,
          field,
          onChange,
          fieldLabel: fieldLabel ?? "",
          onClose: handleClose,
          touched
        }
      )
    ] });
  }
  var modal_default = PanelModal;

  // packages/dataviews/build-module/components/dataform-layouts/panel/dropdown.mjs
  var import_components251 = __toESM(require_components(), 1);
  var import_i18n224 = __toESM(require_i18n(), 1);
  var import_element252 = __toESM(require_element(), 1);
  var import_compose97 = __toESM(require_compose(), 1);
  var import_jsx_runtime429 = __toESM(require_jsx_runtime(), 1);
  function DropdownHeader({
    title,
    onClose
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime429.jsx)(
      Stack,
      {
        direction: "column",
        className: "dataforms-layouts-panel__dropdown-header",
        gap: "lg",
        children: /* @__PURE__ */ (0, import_jsx_runtime429.jsxs)(Stack, { direction: "row", gap: "sm", align: "center", children: [
          title && /* @__PURE__ */ (0, import_jsx_runtime429.jsx)(import_components251.__experimentalHeading, { level: 2, size: 13, children: title }),
          /* @__PURE__ */ (0, import_jsx_runtime429.jsx)(import_components251.__experimentalSpacer, { style: { flex: 1 } }),
          onClose && /* @__PURE__ */ (0, import_jsx_runtime429.jsx)(
            import_components251.Button,
            {
              label: (0, import_i18n224.__)("Close"),
              icon: close_small_default,
              onClick: onClose,
              size: "small"
            }
          )
        ] })
      }
    );
  }
  function DropdownContentWithValidation({
    touched,
    children
  }) {
    const ref = (0, import_element252.useRef)(null);
    useReportValidity(ref, touched);
    return /* @__PURE__ */ (0, import_jsx_runtime429.jsx)("div", { ref, children });
  }
  function PanelDropdown({
    data,
    field,
    onChange,
    validity
  }) {
    const [touched, setTouched] = (0, import_element252.useState)(false);
    const [popoverAnchor, setPopoverAnchor] = (0, import_element252.useState)(
      null
    );
    const popoverProps3 = (0, import_element252.useMemo)(
      () => ({
        // Anchor the popover to the middle of the entire row so that it doesn't
        // move around when the label changes.
        anchor: popoverAnchor,
        placement: "left-start",
        offset: 36,
        shift: true
      }),
      [popoverAnchor]
    );
    const [dialogRef, dialogProps] = (0, import_compose97.__experimentalUseDialog)({
      focusOnMount: "firstInputElement"
    });
    const form = (0, import_element252.useMemo)(
      () => ({
        layout: DEFAULT_LAYOUT,
        fields: !!field.children ? field.children : (
          // If not explicit children return the field id itself.
          [{ id: field.id, layout: DEFAULT_LAYOUT }]
        )
      }),
      [field]
    );
    const formValidity = (0, import_element252.useMemo)(() => {
      if (validity === void 0) {
        return void 0;
      }
      if (!!field.children) {
        return validity?.children;
      }
      return { [field.id]: validity };
    }, [validity, field]);
    const { fieldDefinition, fieldLabel, summaryFields } = use_field_from_form_field_default(field);
    if (!fieldDefinition) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime429.jsx)(
      "div",
      {
        ref: setPopoverAnchor,
        className: "dataforms-layouts-panel__field-dropdown-anchor",
        children: /* @__PURE__ */ (0, import_jsx_runtime429.jsx)(
          import_components251.Dropdown,
          {
            contentClassName: "dataforms-layouts-panel__field-dropdown",
            popoverProps: popoverProps3,
            focusOnMount: false,
            onToggle: (willOpen) => {
              if (!willOpen) {
                setTouched(true);
              }
            },
            renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime429.jsx)(
              SummaryButton,
              {
                data,
                field,
                fieldLabel,
                summaryFields,
                validity,
                touched,
                disabled: fieldDefinition.readOnly === true,
                onClick: onToggle,
                "aria-expanded": isOpen
              }
            ),
            renderContent: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime429.jsx)(DropdownContentWithValidation, { touched, children: /* @__PURE__ */ (0, import_jsx_runtime429.jsxs)("div", { ref: dialogRef, ...dialogProps, children: [
              /* @__PURE__ */ (0, import_jsx_runtime429.jsx)(
                DropdownHeader,
                {
                  title: fieldLabel,
                  onClose
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime429.jsx)(
                DataFormLayout,
                {
                  data,
                  form,
                  onChange,
                  validity: formValidity,
                  children: (FieldLayout, childField, childFieldValidity, markWhenOptional) => /* @__PURE__ */ (0, import_jsx_runtime429.jsx)(
                    FieldLayout,
                    {
                      data,
                      field: childField,
                      onChange,
                      hideLabelFromVision: (form?.fields ?? []).length < 2,
                      markWhenOptional,
                      validity: childFieldValidity
                    },
                    childField.id
                  )
                }
              )
            ] }) })
          }
        )
      }
    );
  }
  var dropdown_default2 = PanelDropdown;

  // packages/dataviews/build-module/components/dataform-layouts/panel/index.mjs
  var import_jsx_runtime430 = __toESM(require_jsx_runtime(), 1);
  function FormPanelField({
    data,
    field,
    onChange,
    validity
  }) {
    const layout = field.layout;
    if (layout.openAs === "modal") {
      return /* @__PURE__ */ (0, import_jsx_runtime430.jsx)(
        modal_default,
        {
          data,
          field,
          onChange,
          validity
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime430.jsx)(
      dropdown_default2,
      {
        data,
        field,
        onChange,
        validity
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-layouts/card/index.mjs
  var import_components252 = __toESM(require_components(), 1);
  var import_compose98 = __toESM(require_compose(), 1);
  var import_element253 = __toESM(require_element(), 1);
  var import_i18n226 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/components/dataform-layouts/validation-badge.mjs
  var import_i18n225 = __toESM(require_i18n(), 1);
  var import_jsx_runtime431 = __toESM(require_jsx_runtime(), 1);
  function countInvalidFields(validity) {
    if (!validity) {
      return 0;
    }
    let count = 0;
    const validityRules = Object.keys(validity).filter(
      (key) => key !== "children"
    );
    for (const key of validityRules) {
      const rule = validity[key];
      if (rule?.type === "invalid") {
        count++;
      }
    }
    if (validity.children) {
      for (const childValidity of Object.values(validity.children)) {
        count += countInvalidFields(childValidity);
      }
    }
    return count;
  }
  function ValidationBadge({
    validity
  }) {
    const invalidCount = countInvalidFields(validity);
    if (invalidCount === 0) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime431.jsx)(Badge5, { intent: "high", children: (0, import_i18n225.sprintf)(
      /* translators: %d: Number of fields that need attention */
      (0, import_i18n225._n)(
        "%d field needs attention",
        "%d fields need attention",
        invalidCount
      ),
      invalidCount
    ) });
  }

  // packages/dataviews/build-module/components/dataform-layouts/card/index.mjs
  var import_jsx_runtime432 = __toESM(require_jsx_runtime(), 1);
  function isSummaryFieldVisible(summaryField, summaryConfig, isOpen) {
    if (!summaryConfig || Array.isArray(summaryConfig) && summaryConfig.length === 0) {
      return false;
    }
    const summaryConfigArray = Array.isArray(summaryConfig) ? summaryConfig : [summaryConfig];
    const fieldConfig = summaryConfigArray.find((config2) => {
      if (typeof config2 === "string") {
        return config2 === summaryField.id;
      }
      if (typeof config2 === "object" && "id" in config2) {
        return config2.id === summaryField.id;
      }
      return false;
    });
    if (!fieldConfig) {
      return false;
    }
    if (typeof fieldConfig === "string") {
      return true;
    }
    if (typeof fieldConfig === "object" && "visibility" in fieldConfig) {
      return fieldConfig.visibility === "always" || fieldConfig.visibility === "when-collapsed" && !isOpen;
    }
    return true;
  }
  function FormCardField({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { fields } = (0, import_element253.useContext)(dataform_context_default);
    const layout = field.layout;
    const cardBodyRef = (0, import_element253.useRef)(null);
    const bodyId = (0, import_compose98.useInstanceId)(
      FormCardField,
      "dataforms-layouts-card-card-body"
    );
    const form = (0, import_element253.useMemo)(
      () => ({
        layout: DEFAULT_LAYOUT,
        fields: field.children ?? []
      }),
      [field]
    );
    const { isOpened, isCollapsible } = layout;
    const [internalIsOpen, setIsOpen] = (0, import_element253.useState)(isOpened);
    const [touched, setTouched] = (0, import_element253.useState)(false);
    (0, import_element253.useEffect)(() => {
      setIsOpen(isOpened);
    }, [isOpened]);
    const toggle = (0, import_element253.useCallback)(() => {
      setIsOpen((prev) => {
        if (prev) {
          setTouched(true);
        }
        return !prev;
      });
    }, []);
    const isOpen = isCollapsible ? internalIsOpen : true;
    const handleBlur = (0, import_element253.useCallback)(() => {
      setTouched(true);
    }, [setTouched]);
    useReportValidity(cardBodyRef, isOpen && touched);
    const summaryFields = getSummaryFields(layout.summary, fields);
    const visibleSummaryFields = summaryFields.filter(
      (summaryField) => isSummaryFieldVisible(summaryField, layout.summary, isOpen)
    );
    const validationBadge = touched && layout.isCollapsible ? /* @__PURE__ */ (0, import_jsx_runtime432.jsx)(ValidationBadge, { validity }) : null;
    const sizeCard = {
      blockStart: "medium",
      blockEnd: "medium",
      inlineStart: "medium",
      inlineEnd: "medium"
    };
    let label = field.label;
    let withHeader;
    let bodyContent;
    if (field.children) {
      withHeader = !!label && layout.withHeader;
      bodyContent = /* @__PURE__ */ (0, import_jsx_runtime432.jsxs)(import_jsx_runtime432.Fragment, { children: [
        field.description && /* @__PURE__ */ (0, import_jsx_runtime432.jsx)("div", { className: "dataforms-layouts-card__field-description", children: field.description }),
        /* @__PURE__ */ (0, import_jsx_runtime432.jsx)(
          DataFormLayout,
          {
            data,
            form,
            onChange,
            validity: validity?.children
          }
        )
      ] });
    } else {
      const fieldDefinition = fields.find(
        (fieldDef) => fieldDef.id === field.id
      );
      if (!fieldDefinition || !fieldDefinition.Edit) {
        return null;
      }
      const SingleFieldLayout = getFormFieldLayout("regular")?.component;
      if (!SingleFieldLayout) {
        return null;
      }
      label = fieldDefinition.label;
      withHeader = !!label && layout.withHeader;
      bodyContent = /* @__PURE__ */ (0, import_jsx_runtime432.jsx)(
        SingleFieldLayout,
        {
          data,
          field,
          onChange,
          hideLabelFromVision: hideLabelFromVision || withHeader,
          markWhenOptional,
          validity
        }
      );
    }
    const sizeCardBody = {
      blockStart: withHeader ? "none" : "medium",
      blockEnd: "medium",
      inlineStart: "medium",
      inlineEnd: "medium"
    };
    return /* @__PURE__ */ (0, import_jsx_runtime432.jsxs)(import_components252.Card, { className: "dataforms-layouts-card__field", size: sizeCard, children: [
      withHeader && /* @__PURE__ */ (0, import_jsx_runtime432.jsxs)(
        import_components252.CardHeader,
        {
          className: "dataforms-layouts-card__field-header",
          onClick: isCollapsible ? toggle : void 0,
          style: {
            cursor: isCollapsible ? "pointer" : void 0
          },
          isBorderless: true,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime432.jsxs)(
              "div",
              {
                style: {
                  // Match the expand/collapse button's height to avoid layout
                  // differences when that button is not displayed.
                  height: isCollapsible ? void 0 : "40px",
                  width: "100%",
                  display: "flex",
                  justifyContent: "space-between",
                  alignItems: "center"
                },
                children: [
                  /* @__PURE__ */ (0, import_jsx_runtime432.jsx)("span", { className: "dataforms-layouts-card__field-header-label", children: label }),
                  validationBadge,
                  visibleSummaryFields.length > 0 && layout.withHeader && /* @__PURE__ */ (0, import_jsx_runtime432.jsx)("div", { className: "dataforms-layouts-card__field-summary", children: visibleSummaryFields.map(
                    (summaryField) => /* @__PURE__ */ (0, import_jsx_runtime432.jsx)(
                      summaryField.render,
                      {
                        item: data,
                        field: summaryField
                      },
                      summaryField.id
                    )
                  ) })
                ]
              }
            ),
            isCollapsible && /* @__PURE__ */ (0, import_jsx_runtime432.jsx)(
              import_components252.Button,
              {
                __next40pxDefaultSize: true,
                variant: "tertiary",
                icon: isOpen ? chevron_up_default : chevron_down_default,
                "aria-expanded": isOpen,
                "aria-controls": bodyId,
                "aria-label": isOpen ? (0, import_i18n226.__)("Collapse") : (0, import_i18n226.__)("Expand")
              }
            )
          ]
        }
      ),
      (isOpen || !withHeader) && // If it doesn't have a header, keep it open.
      // Otherwise, the card will not be visible.
      /* @__PURE__ */ (0, import_jsx_runtime432.jsx)(
        import_components252.CardBody,
        {
          id: bodyId,
          size: sizeCardBody,
          className: "dataforms-layouts-card__field-control",
          ref: cardBodyRef,
          onBlur: handleBlur,
          children: bodyContent
        }
      )
    ] });
  }

  // packages/dataviews/build-module/components/dataform-layouts/row/index.mjs
  var import_components253 = __toESM(require_components(), 1);
  var import_jsx_runtime433 = __toESM(require_jsx_runtime(), 1);
  function Header2({ title }) {
    return /* @__PURE__ */ (0, import_jsx_runtime433.jsx)(
      Stack,
      {
        direction: "column",
        className: "dataforms-layouts-row__header",
        gap: "lg",
        children: /* @__PURE__ */ (0, import_jsx_runtime433.jsx)(Stack, { direction: "row", align: "center", children: /* @__PURE__ */ (0, import_jsx_runtime433.jsx)(import_components253.__experimentalHeading, { level: 2, size: 13, children: title }) })
      }
    );
  }
  var EMPTY_WRAPPER = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime433.jsx)(import_jsx_runtime433.Fragment, { children });
  function FormRowField({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const layout = field.layout;
    if (!!field.children) {
      const form = {
        layout: DEFAULT_LAYOUT,
        fields: field.children
      };
      return /* @__PURE__ */ (0, import_jsx_runtime433.jsxs)("div", { className: "dataforms-layouts-row__field", children: [
        !hideLabelFromVision && field.label && /* @__PURE__ */ (0, import_jsx_runtime433.jsx)(Header2, { title: field.label }),
        /* @__PURE__ */ (0, import_jsx_runtime433.jsx)(Stack, { direction: "row", align: layout.alignment, gap: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime433.jsx)(
          DataFormLayout,
          {
            data,
            form,
            onChange,
            validity: validity?.children,
            as: EMPTY_WRAPPER,
            children: (FieldLayout, childField, childFieldValidity) => /* @__PURE__ */ (0, import_jsx_runtime433.jsx)(
              "div",
              {
                className: "dataforms-layouts-row__field-control",
                style: layout.styles[childField.id],
                children: /* @__PURE__ */ (0, import_jsx_runtime433.jsx)(
                  FieldLayout,
                  {
                    data,
                    field: childField,
                    onChange,
                    hideLabelFromVision,
                    markWhenOptional,
                    validity: childFieldValidity
                  }
                )
              },
              childField.id
            )
          }
        ) })
      ] });
    }
    const RegularLayout = getFormFieldLayout("regular")?.component;
    if (!RegularLayout) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime433.jsx)(import_jsx_runtime433.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime433.jsx)("div", { className: "dataforms-layouts-row__field-control", children: /* @__PURE__ */ (0, import_jsx_runtime433.jsx)(
      RegularLayout,
      {
        data,
        field,
        onChange,
        markWhenOptional,
        validity
      }
    ) }) });
  }

  // packages/dataviews/build-module/components/dataform-layouts/details/index.mjs
  var import_element254 = __toESM(require_element(), 1);
  var import_i18n227 = __toESM(require_i18n(), 1);
  var import_jsx_runtime434 = __toESM(require_jsx_runtime(), 1);
  function FormDetailsField({
    data,
    field,
    onChange,
    validity
  }) {
    const { fields } = (0, import_element254.useContext)(dataform_context_default);
    const detailsRef = (0, import_element254.useRef)(null);
    const contentRef = (0, import_element254.useRef)(null);
    const [touched, setTouched] = (0, import_element254.useState)(false);
    const [isOpen, setIsOpen] = (0, import_element254.useState)(false);
    const form = (0, import_element254.useMemo)(
      () => ({
        layout: DEFAULT_LAYOUT,
        fields: field.children ?? []
      }),
      [field]
    );
    (0, import_element254.useEffect)(() => {
      const details = detailsRef.current;
      if (!details) {
        return;
      }
      const handleToggle = () => {
        const nowOpen = details.open;
        if (!nowOpen) {
          setTouched(true);
        }
        setIsOpen(nowOpen);
      };
      details.addEventListener("toggle", handleToggle);
      return () => {
        details.removeEventListener("toggle", handleToggle);
      };
    }, []);
    useReportValidity(contentRef, isOpen && touched);
    const handleBlur = (0, import_element254.useCallback)(() => {
      setTouched(true);
    }, []);
    if (!field.children) {
      return null;
    }
    const summaryFieldId = field.layout.summary ?? "";
    const summaryField = summaryFieldId ? fields.find((fieldDef) => fieldDef.id === summaryFieldId) : void 0;
    let summaryContent;
    if (summaryField && summaryField.render) {
      summaryContent = /* @__PURE__ */ (0, import_jsx_runtime434.jsx)(summaryField.render, { item: data, field: summaryField });
    } else {
      summaryContent = field.label || (0, import_i18n227.__)("More details");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime434.jsxs)(
      "details",
      {
        ref: detailsRef,
        className: "dataforms-layouts-details__details",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime434.jsx)("summary", { className: "dataforms-layouts-details__summary", children: /* @__PURE__ */ (0, import_jsx_runtime434.jsxs)(
            Stack,
            {
              direction: "row",
              align: "center",
              gap: "md",
              className: "dataforms-layouts-details__summary-content",
              children: [
                summaryContent,
                touched && /* @__PURE__ */ (0, import_jsx_runtime434.jsx)(ValidationBadge, { validity })
              ]
            }
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime434.jsx)(
            "div",
            {
              ref: contentRef,
              className: "dataforms-layouts-details__content",
              onBlur: handleBlur,
              children: /* @__PURE__ */ (0, import_jsx_runtime434.jsx)(
                DataFormLayout,
                {
                  data,
                  form,
                  onChange,
                  validity: validity?.children
                }
              )
            }
          )
        ]
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-layouts/index.mjs
  var import_jsx_runtime435 = __toESM(require_jsx_runtime(), 1);
  var FORM_FIELD_LAYOUTS = [
    {
      type: "regular",
      component: FormRegularField,
      wrapper: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime435.jsx)(
        Stack,
        {
          direction: "column",
          className: "dataforms-layouts__wrapper",
          gap: "lg",
          children
        }
      )
    },
    {
      type: "panel",
      component: FormPanelField,
      wrapper: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime435.jsx)(
        Stack,
        {
          direction: "column",
          className: "dataforms-layouts__wrapper",
          gap: "md",
          children
        }
      )
    },
    {
      type: "card",
      component: FormCardField,
      wrapper: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime435.jsx)(
        Stack,
        {
          direction: "column",
          className: "dataforms-layouts__wrapper",
          gap: "xl",
          children
        }
      )
    },
    {
      type: "row",
      component: FormRowField,
      wrapper: ({
        children,
        layout
      }) => /* @__PURE__ */ (0, import_jsx_runtime435.jsx)(
        Stack,
        {
          direction: "column",
          className: "dataforms-layouts__wrapper",
          gap: "lg",
          children: /* @__PURE__ */ (0, import_jsx_runtime435.jsx)("div", { className: "dataforms-layouts-row__field", children: /* @__PURE__ */ (0, import_jsx_runtime435.jsx)(
            Stack,
            {
              direction: "row",
              gap: "lg",
              align: layout.alignment,
              children
            }
          ) })
        }
      )
    },
    {
      type: "details",
      component: FormDetailsField
    }
  ];
  function getFormFieldLayout(type) {
    return FORM_FIELD_LAYOUTS.find((layout) => layout.type === type);
  }

  // packages/dataviews/build-module/components/dataform-layouts/data-form-layout.mjs
  var import_jsx_runtime436 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_WRAPPER = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime436.jsx)(Stack, { direction: "column", className: "dataforms-layouts__wrapper", gap: "lg", children });
  function DataFormLayout({
    data,
    form,
    onChange,
    validity,
    children,
    as
  }) {
    const { fields: fieldDefinitions } = (0, import_element255.useContext)(dataform_context_default);
    const markWhenOptional = (0, import_element255.useMemo)(() => {
      const requiredCount = fieldDefinitions.filter(
        (f2) => !!f2.isValid?.required
      ).length;
      const optionalCount = fieldDefinitions.length - requiredCount;
      return requiredCount > optionalCount;
    }, [fieldDefinitions]);
    function getFieldDefinition2(field) {
      return fieldDefinitions.find(
        (fieldDefinition) => fieldDefinition.id === field.id
      );
    }
    const Wrapper = as ?? getFormFieldLayout(form.layout.type)?.wrapper ?? DEFAULT_WRAPPER;
    return /* @__PURE__ */ (0, import_jsx_runtime436.jsx)(Wrapper, { layout: form.layout, children: form.fields.map((formField) => {
      const FieldLayout = getFormFieldLayout(formField.layout.type)?.component;
      if (!FieldLayout) {
        return null;
      }
      const fieldDefinition = !formField.children ? getFieldDefinition2(formField) : void 0;
      if (fieldDefinition && fieldDefinition.isVisible && !fieldDefinition.isVisible(data)) {
        return null;
      }
      if (children) {
        return children(
          FieldLayout,
          formField,
          validity?.[formField.id],
          markWhenOptional
        );
      }
      return /* @__PURE__ */ (0, import_jsx_runtime436.jsx)(
        FieldLayout,
        {
          data,
          field: formField,
          onChange,
          markWhenOptional,
          validity: validity?.[formField.id]
        },
        formField.id
      );
    }) });
  }

  // packages/dataviews/build-module/dataform/index.mjs
  var import_jsx_runtime437 = __toESM(require_jsx_runtime(), 1);
  function DataForm({
    data,
    form,
    fields,
    onChange,
    validity
  }) {
    const normalizedForm = (0, import_element256.useMemo)(() => normalize_form_default(form), [form]);
    const normalizedFields = (0, import_element256.useMemo)(
      () => normalizeFields(fields),
      [fields]
    );
    if (!form.fields) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime437.jsx)(DataFormProvider, { fields: normalizedFields, children: /* @__PURE__ */ (0, import_jsx_runtime437.jsx)(
      DataFormLayout,
      {
        data,
        form: normalizedForm,
        onChange,
        validity
      }
    ) });
  }

  // packages/block-editor/build-module/hooks/block-fields/index.mjs
  var import_element259 = __toESM(require_element(), 1);
  var import_i18n231 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/hooks/block-fields/fields-dropdown-menu.mjs
  var import_components254 = __toESM(require_components(), 1);
  var import_i18n228 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/hooks/block-fields/use-inspector-popover-placement.mjs
  var import_compose99 = __toESM(require_compose(), 1);
  function useInspectorPopoverPlacement2({ isControl } = { isControl: false }) {
    const isMobile = (0, import_compose99.useViewportMatch)("medium", "<");
    return !isMobile ? {
      popoverProps: {
        placement: "left-start",
        // For non-mobile, inner sidebar width (248px) - button width (24px) - border (1px) + padding (16px) + spacing (20px)
        offset: isControl ? 35 : 259
      }
    } : {};
  }

  // packages/block-editor/build-module/hooks/block-fields/fields-dropdown-menu.mjs
  var import_jsx_runtime438 = __toESM(require_jsx_runtime(), 1);
  function FieldsDropdownMenu({
    fields,
    visibleFields,
    onToggleField
  }) {
    const { popoverProps: popoverProps3 } = useInspectorPopoverPlacement2();
    if (!fields || fields.length === 0) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime438.jsx)(
      import_components254.DropdownMenu,
      {
        icon: more_vertical_default,
        label: (0, import_i18n228.__)("Options"),
        popoverProps: popoverProps3,
        toggleProps: { size: "small" },
        children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime438.jsx)(import_components254.MenuGroup, { label: (0, import_i18n228.__)("Show / Hide"), children: fields.map((field) => {
          const isVisible = visibleFields.includes(field.id);
          return /* @__PURE__ */ (0, import_jsx_runtime438.jsx)(
            import_components254.MenuItem,
            {
              isSelected: isVisible,
              onClick: () => {
                onToggleField(field.id);
                onClose();
              },
              role: "menuitemcheckbox",
              icon: isVisible ? check_default : null,
              children: field.label
            },
            field.id
          );
        }) })
      }
    );
  }

  // packages/block-editor/build-module/hooks/block-fields/rich-text/index.mjs
  var import_components255 = __toESM(require_components(), 1);
  var import_compose100 = __toESM(require_compose(), 1);
  var import_data179 = __toESM(require_data(), 1);
  var import_element257 = __toESM(require_element(), 1);
  var import_rich_text17 = __toESM(require_rich_text(), 1);
  var import_jsx_runtime439 = __toESM(require_jsx_runtime(), 1);
  var { useRichText: useRichText2 } = unlock(import_rich_text17.privateApis);
  function RichTextControl({
    data,
    field,
    hideLabelFromVision,
    onChange,
    config: config2 = {}
  }) {
    const registry = (0, import_data179.useRegistry)();
    const attrValue = field.getValue({ item: data });
    const fieldConfig = field.config || {};
    const { clientId } = config2;
    const [selection2, setSelection] = (0, import_element257.useState)({
      start: void 0,
      end: void 0
    });
    const [isSelected, setIsSelected] = (0, import_element257.useState)(false);
    const anchorRef = (0, import_element257.useRef)();
    const inputEvents = (0, import_element257.useRef)(/* @__PURE__ */ new Set());
    const keyboardShortcuts = (0, import_element257.useRef)(/* @__PURE__ */ new Set());
    const adjustedAllowedFormats = getAllowedFormats({
      allowedFormats: fieldConfig?.allowedFormats,
      disableFormats: fieldConfig?.disableFormats
    });
    function onFocus() {
      anchorRef.current?.focus();
    }
    const {
      value,
      getValue,
      onChange: onRichTextChange,
      ref: richTextRef,
      formatTypes
    } = useRichText2({
      value: attrValue,
      onChange(html) {
        onChange(field.setValue({ item: data, value: html }));
      },
      selectionStart: selection2.start,
      selectionEnd: selection2.end,
      onSelectionChange: (start2, end) => setSelection({ start: start2, end }),
      __unstableIsSelected: isSelected,
      preserveWhiteSpace: !!fieldConfig?.preserveWhiteSpace,
      placeholder: fieldConfig?.placeholder,
      __unstableDisableFormats: fieldConfig?.disableFormats,
      allowedFormats: adjustedAllowedFormats,
      withoutInteractiveFormatting: fieldConfig?.withoutInteractiveFormatting,
      __unstableFormatTypeHandlerContext: (0, import_element257.useMemo)(
        () => ({ richTextIdentifier: field.id, blockClientId: clientId }),
        [field.id, clientId]
      )
    });
    const { baseControlProps, controlProps } = (0, import_components255.useBaseControlProps)({
      hideLabelFromVision: hideLabelFromVision ?? field.hideLabelFromVision,
      label: field.label
    });
    return /* @__PURE__ */ (0, import_jsx_runtime439.jsxs)(import_jsx_runtime439.Fragment, { children: [
      isSelected && /* @__PURE__ */ (0, import_jsx_runtime439.jsx)(keyboardShortcutContext.Provider, { value: keyboardShortcuts, children: /* @__PURE__ */ (0, import_jsx_runtime439.jsx)(inputEventContext.Provider, { value: inputEvents, children: /* @__PURE__ */ (0, import_jsx_runtime439.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime439.jsx)(
        FormatEdit,
        {
          value,
          onChange: onRichTextChange,
          onFocus,
          formatTypes,
          forwardedRef: anchorRef,
          isVisible: false
        }
      ) }) }) }),
      /* @__PURE__ */ (0, import_jsx_runtime439.jsx)(import_components255.BaseControl, { ...baseControlProps, children: /* @__PURE__ */ (0, import_jsx_runtime439.jsx)(
        "div",
        {
          className: "block-editor-content-only-controls__rich-text",
          role: "textbox",
          "aria-multiline": !fieldConfig?.disableLineBreaks,
          ref: (0, import_compose100.useMergeRefs)([
            richTextRef,
            useEventListeners({
              registry,
              getValue,
              onChange: onRichTextChange,
              formatTypes,
              selectionChange: setSelection,
              isSelected,
              disableFormats: fieldConfig?.disableFormats,
              value,
              tagName: "div",
              disableLineBreaks: fieldConfig?.disableLineBreaks,
              keyboardShortcuts,
              inputEvents
            }),
            anchorRef
          ]),
          onFocus: () => setIsSelected(true),
          onBlur: () => setIsSelected(false),
          contentEditable: true,
          ...controlProps
        }
      ) })
    ] });
  }

  // packages/block-editor/build-module/hooks/block-fields/media/index.mjs
  var import_components256 = __toESM(require_components(), 1);
  var import_data180 = __toESM(require_data(), 1);
  var import_i18n229 = __toESM(require_i18n(), 1);
  var import_jsx_runtime440 = __toESM(require_jsx_runtime(), 1);
  function MediaThumbnail({ data, field, attachment, config: config2 }) {
    const { allowedTypes = [], multiple = false } = config2 || {};
    if (multiple) {
      return "todo multiple";
    }
    if (attachment?.media_type === "image" || attachment?.poster) {
      return /* @__PURE__ */ (0, import_jsx_runtime440.jsx)("div", { className: "block-editor-content-only-controls__media-thumbnail", children: /* @__PURE__ */ (0, import_jsx_runtime440.jsx)(
        "img",
        {
          alt: "",
          width: 24,
          height: 24,
          src: attachment.media_type === "image" ? attachment.source_url : attachment.poster
        }
      ) });
    }
    if (allowedTypes.length === 1) {
      const value = field.getValue({ item: data });
      const url = value?.url;
      if (allowedTypes[0] === "image" && url) {
        return /* @__PURE__ */ (0, import_jsx_runtime440.jsx)("div", { className: "block-editor-content-only-controls__media-thumbnail", children: /* @__PURE__ */ (0, import_jsx_runtime440.jsx)("img", { alt: "", width: 24, height: 24, src: url }) });
      }
      let icon;
      if (allowedTypes[0] === "image") {
        icon = image_default;
      } else if (allowedTypes[0] === "video") {
        icon = video_default;
      } else if (allowedTypes[0] === "audio") {
        icon = audio_default;
      } else {
        icon = media_default;
      }
      if (icon) {
        return /* @__PURE__ */ (0, import_jsx_runtime440.jsx)(import_components256.Icon, { icon, size: 24 });
      }
    }
    return /* @__PURE__ */ (0, import_jsx_runtime440.jsx)(import_components256.Icon, { icon: media_default, size: 24 });
  }
  function Media({ data, field, onChange, config: config2 = {} }) {
    const { popoverProps: popoverProps3 } = useInspectorPopoverPlacement2({
      isControl: true
    });
    const value = field.getValue({ item: data });
    const {
      allowedTypes = [],
      multiple = false,
      useFeaturedImage = false
    } = config2;
    const id = value?.id;
    const url = value?.url;
    const attachment = (0, import_data180.useSelect)(
      (select3) => {
        if (!id) {
          return;
        }
        const settings2 = select3(store).getSettings();
        const getMedia = settings2[getMediaSelectKey];
        if (!getMedia) {
          return;
        }
        return getMedia(select3, id);
      },
      [id]
    );
    let chooseItemLabel;
    if (allowedTypes.length === 1) {
      const allowedType = allowedTypes[0];
      if (allowedType === "image") {
        chooseItemLabel = (0, import_i18n229.__)("Choose an image\u2026");
      } else if (allowedType === "video") {
        chooseItemLabel = (0, import_i18n229.__)("Choose a video\u2026");
      } else if (allowedType === "application") {
        chooseItemLabel = (0, import_i18n229.__)("Choose a file\u2026");
      } else {
        chooseItemLabel = (0, import_i18n229.__)("Choose a media item\u2026");
      }
    } else {
      chooseItemLabel = (0, import_i18n229.__)("Choose a media item\u2026");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime440.jsx)(check_default2, { children: /* @__PURE__ */ (0, import_jsx_runtime440.jsx)(
      media_replace_flow_default,
      {
        className: "block-editor-content-only-controls__media-replace-flow",
        allowedTypes,
        mediaId: id,
        mediaURL: url,
        multiple,
        popoverProps: popoverProps3,
        onReset: () => {
          onChange(
            field.setValue({
              item: data,
              value: {}
            })
          );
        },
        ...useFeaturedImage && {
          useFeaturedImage: !!value?.featuredImage,
          onToggleFeaturedImage: () => {
            onChange(
              field.setValue({
                item: data,
                value: {
                  featuredImage: !value?.featuredImage
                }
              })
            );
          }
        },
        onSelect: (selectedMedia) => {
          if (selectedMedia.id && selectedMedia.url) {
            const newValue = {
              ...selectedMedia,
              mediaType: selectedMedia.media_type
            };
            if (useFeaturedImage) {
              newValue.featuredImage = false;
            }
            onChange(
              field.setValue({
                item: data,
                value: newValue
              })
            );
          }
        },
        renderToggle: (buttonProps) => /* @__PURE__ */ (0, import_jsx_runtime440.jsx)(
          import_components256.Button,
          {
            __next40pxDefaultSize: true,
            className: "block-editor-content-only-controls__media",
            ...buttonProps,
            children: /* @__PURE__ */ (0, import_jsx_runtime440.jsxs)(
              import_components256.__experimentalGrid,
              {
                rowGap: 0,
                columnGap: 8,
                templateColumns: "24px 1fr",
                className: "block-editor-content-only-controls__media-row",
                children: [
                  url && /* @__PURE__ */ (0, import_jsx_runtime440.jsxs)(import_jsx_runtime440.Fragment, { children: [
                    /* @__PURE__ */ (0, import_jsx_runtime440.jsx)(
                      MediaThumbnail,
                      {
                        attachment,
                        field,
                        data,
                        config: config2
                      }
                    ),
                    /* @__PURE__ */ (0, import_jsx_runtime440.jsx)("span", {
                      className: "block-editor-content-only-controls__media-title",
                      // TODO - truncate long titles or url smartly (e.g. show filename).
                      children: attachment?.title?.raw && attachment?.title?.raw !== "" ? attachment?.title?.raw : url
                    })
                  ] }),
                  !url && /* @__PURE__ */ (0, import_jsx_runtime440.jsxs)(import_jsx_runtime440.Fragment, { children: [
                    /* @__PURE__ */ (0, import_jsx_runtime440.jsx)(
                      "span",
                      {
                        className: "block-editor-content-only-controls__media-placeholder",
                        style: {
                          width: "24px",
                          height: "24px"
                        }
                      }
                    ),
                    /* @__PURE__ */ (0, import_jsx_runtime440.jsx)("span", { className: "block-editor-content-only-controls__media-title", children: chooseItemLabel })
                  ] })
                ]
              }
            )
          }
        )
      }
    ) });
  }

  // packages/block-editor/build-module/hooks/block-fields/link/index.mjs
  var import_components257 = __toESM(require_components(), 1);
  var import_element258 = __toESM(require_element(), 1);
  var import_i18n230 = __toESM(require_i18n(), 1);
  var import_url15 = __toESM(require_url(), 1);
  var import_jsx_runtime441 = __toESM(require_jsx_runtime(), 1);
  var NEW_TAB_REL2 = "noreferrer noopener";
  var NEW_TAB_TARGET = "_blank";
  var NOFOLLOW_REL = "nofollow";
  function getUpdatedLinkAttributes({
    rel = "",
    url = "",
    opensInNewTab,
    nofollow
  }) {
    let newLinkTarget;
    let updatedRel = rel;
    if (opensInNewTab) {
      newLinkTarget = NEW_TAB_TARGET;
      updatedRel = updatedRel?.includes(NEW_TAB_REL2) ? updatedRel : updatedRel + ` ${NEW_TAB_REL2}`;
    } else {
      const relRegex = new RegExp(`\\b${NEW_TAB_REL2}\\s*`, "g");
      updatedRel = updatedRel?.replace(relRegex, "").trim();
    }
    if (nofollow) {
      updatedRel = updatedRel?.includes(NOFOLLOW_REL) ? updatedRel : (updatedRel + ` ${NOFOLLOW_REL}`).trim();
    } else {
      const relRegex = new RegExp(`\\b${NOFOLLOW_REL}\\s*`, "g");
      updatedRel = updatedRel?.replace(relRegex, "").trim();
    }
    return {
      url: (0, import_url15.prependHTTP)(url),
      linkTarget: newLinkTarget,
      rel: updatedRel || void 0
    };
  }
  function Link({ data, field, onChange }) {
    const [isLinkControlOpen, setIsLinkControlOpen] = (0, import_element258.useState)(false);
    const { popoverProps: popoverProps3 } = useInspectorPopoverPlacement2({
      isControl: true
    });
    const value = field.getValue({ item: data });
    const url = value?.url;
    const rel = value?.rel || "";
    const target = value?.linkTarget;
    const opensInNewTab = target === NEW_TAB_TARGET;
    const nofollow = rel === NOFOLLOW_REL;
    const linkValue = (0, import_element258.useMemo)(
      () => ({ url, opensInNewTab, nofollow }),
      [url, opensInNewTab, nofollow]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime441.jsxs)(import_jsx_runtime441.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime441.jsx)(
        import_components257.Button,
        {
          __next40pxDefaultSize: true,
          className: "block-editor-content-only-controls__link",
          onClick: () => {
            setIsLinkControlOpen(true);
          },
          children: /* @__PURE__ */ (0, import_jsx_runtime441.jsxs)(
            import_components257.__experimentalGrid,
            {
              rowGap: 0,
              columnGap: 8,
              templateColumns: "24px 1fr",
              className: "block-editor-content-only-controls__link-row",
              children: [
                url && /* @__PURE__ */ (0, import_jsx_runtime441.jsxs)(import_jsx_runtime441.Fragment, { children: [
                  /* @__PURE__ */ (0, import_jsx_runtime441.jsx)(import_components257.Icon, { icon: link_default, size: 24 }),
                  /* @__PURE__ */ (0, import_jsx_runtime441.jsx)("span", { className: "block-editor-content-only-controls__link-title", children: url })
                ] }),
                !url && /* @__PURE__ */ (0, import_jsx_runtime441.jsxs)(import_jsx_runtime441.Fragment, { children: [
                  /* @__PURE__ */ (0, import_jsx_runtime441.jsx)(
                    import_components257.Icon,
                    {
                      icon: link_default,
                      size: 24,
                      style: { opacity: 0.3 }
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime441.jsx)("span", { className: "block-editor-content-only-controls__link-title", children: (0, import_i18n230.__)("Link") })
                ] })
              ]
            }
          )
        }
      ),
      isLinkControlOpen && /* @__PURE__ */ (0, import_jsx_runtime441.jsx)(
        import_components257.Popover,
        {
          onClose: () => {
            setIsLinkControlOpen(false);
          },
          ...popoverProps3 ?? {},
          children: /* @__PURE__ */ (0, import_jsx_runtime441.jsx)(
            link_control_default,
            {
              value: linkValue,
              onChange: (newValues) => {
                const updatedAttrs = getUpdatedLinkAttributes({
                  rel,
                  ...newValues
                });
                onChange(
                  field.setValue({
                    item: data,
                    value: updatedAttrs
                  })
                );
              },
              onRemove: () => {
                onChange(
                  field.setValue({
                    item: data,
                    value: {}
                  })
                );
              }
            }
          )
        }
      )
    ] });
  }

  // packages/block-editor/build-module/hooks/block-fields/index.mjs
  var import_jsx_runtime442 = __toESM(require_jsx_runtime(), 1);
  var { fieldsKey, formKey } = unlock(import_blocks104.privateApis);
  function createConfiguredControl2(ControlComponent, config2 = {}) {
    return function ConfiguredControl(props) {
      return /* @__PURE__ */ (0, import_jsx_runtime442.jsx)(ControlComponent, { ...props, config: config2 });
    };
  }
  function BlockFields({
    clientId,
    blockType,
    setAttributes,
    isCollapsed: isCollapsed3 = false
  }) {
    const blockTitle = useBlockDisplayTitle({
      clientId,
      context: "list-view"
    });
    const blockInformation = useBlockDisplayInformation(clientId);
    const blockTypeFields = blockType?.[fieldsKey];
    const blockContext = (0, import_element259.useContext)(block_context_default);
    const attributes = (0, import_data181.useSelect)(
      (select3) => {
        const _attributes = select3(store).getBlockAttributes(clientId);
        if (!_attributes?.metadata?.bindings) {
          return _attributes;
        }
        const { getBlockBindingsSource: getBlockBindingsSource4 } = unlock(select3(import_blocks104.store));
        return Object.entries(_attributes.metadata.bindings).reduce(
          (acc, [attribute, binding]) => {
            const source = getBlockBindingsSource4(binding.source);
            if (!source) {
              return acc;
            }
            const values = source.getValues({
              select: select3,
              context: blockContext,
              bindings: { [attribute]: binding }
            });
            return { ...acc, ...values };
          },
          _attributes
        );
      },
      [blockContext, clientId]
    );
    const computedForm = (0, import_element259.useMemo)(() => {
      if (!isCollapsed3) {
        return blockType?.[formKey];
      }
      return {
        ...blockType?.[formKey],
        fields: [blockType?.[formKey]?.fields?.[0]]
      };
    }, [blockType, isCollapsed3]);
    const [form, setForm] = (0, import_element259.useState)(computedForm);
    const dataFormFields = (0, import_element259.useMemo)(() => {
      if (!blockTypeFields?.length) {
        return [];
      }
      return blockTypeFields.map((fieldDef) => {
        const field = {
          ...fieldDef
        };
        if ("string" === typeof fieldDef.Edit && fieldDef.Edit === "rich-text") {
          field.Edit = createConfiguredControl2(RichTextControl, {
            clientId
          });
        } else if ("string" === typeof fieldDef.Edit && fieldDef.Edit === "link") {
          field.Edit = createConfiguredControl2(Link);
        } else if ("object" === typeof fieldDef.Edit && fieldDef.Edit.control === "media") {
          field.Edit = createConfiguredControl2(Media, {
            ...fieldDef.Edit
          });
        }
        return field;
      });
    }, [blockTypeFields, clientId]);
    if (!blockTypeFields?.length) {
      return null;
    }
    const handleToggleField = (fieldId) => {
      setForm((prev) => {
        if (prev.fields?.includes(fieldId)) {
          return {
            ...prev,
            fields: prev.fields.filter((id) => id !== fieldId)
          };
        }
        return {
          ...prev,
          fields: [...prev.fields || [], fieldId]
        };
      });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime442.jsxs)("div", { className: "block-editor-block-fields__container", children: [
      /* @__PURE__ */ (0, import_jsx_runtime442.jsx)("div", { className: "block-editor-block-fields__header", children: /* @__PURE__ */ (0, import_jsx_runtime442.jsxs)(import_components258.__experimentalHStack, { spacing: 1, children: [
        isCollapsed3 && /* @__PURE__ */ (0, import_jsx_runtime442.jsxs)(import_jsx_runtime442.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime442.jsx)(
            block_icon_default,
            {
              className: "block-editor-block-fields__header-icon",
              icon: blockInformation?.icon
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime442.jsx)("h2", { className: "block-editor-block-fields__header-title", children: /* @__PURE__ */ (0, import_jsx_runtime442.jsx)(import_components258.__experimentalTruncate, { numberOfLines: 1, children: blockTitle }) }),
          /* @__PURE__ */ (0, import_jsx_runtime442.jsx)(
            FieldsDropdownMenu,
            {
              fields: dataFormFields,
              visibleFields: form.fields,
              onToggleField: handleToggleField
            }
          )
        ] }),
        !isCollapsed3 && /* @__PURE__ */ (0, import_jsx_runtime442.jsx)("h2", { className: "block-editor-block-fields__header-title", children: (0, import_i18n231.__)("Content") })
      ] }) }),
      /* @__PURE__ */ (0, import_jsx_runtime442.jsx)(
        DataForm,
        {
          data: attributes,
          fields: dataFormFields,
          form,
          onChange: setAttributes
        }
      )
    ] });
  }
  function hasBlockFieldsSupport(blockName) {
    return !!(window?.__experimentalContentOnlyInspectorFields && (0, import_blocks104.getBlockType)(blockName)?.[fieldsKey]);
  }
  function BlockFieldsPanel(props) {
    const { blockType, isSelectionWithinCurrentSection } = (0, import_element259.useContext)(PrivateBlockContext);
    return /* @__PURE__ */ (0, import_jsx_runtime442.jsx)(InspectorControlsFill, { group: "content", children: /* @__PURE__ */ (0, import_jsx_runtime442.jsx)(
      BlockFields,
      {
        ...props,
        blockType,
        isCollapsed: isSelectionWithinCurrentSection
      }
    ) });
  }
  var block_fields_default = {
    edit: BlockFieldsPanel,
    hasSupport: hasBlockFieldsSupport,
    attributeKeys: [],
    supportsPatternEditing: true
  };

  // packages/block-editor/build-module/hooks/custom-class-name.mjs
  var import_hooks21 = __toESM(require_hooks(), 1);
  var import_components259 = __toESM(require_components(), 1);
  var import_i18n232 = __toESM(require_i18n(), 1);
  var import_blocks105 = __toESM(require_blocks(), 1);
  var import_jsx_runtime443 = __toESM(require_jsx_runtime(), 1);
  function addAttribute6(settings2) {
    if ((0, import_blocks105.hasBlockSupport)(settings2, "customClassName", true)) {
      settings2.attributes = {
        ...settings2.attributes,
        className: {
          type: "string"
        }
      };
    }
    return settings2;
  }
  function CustomClassNameControlsPure({ className, setAttributes }) {
    const blockEditingMode = useBlockEditingMode();
    if (blockEditingMode !== "default") {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime443.jsx)(inspector_controls_default, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime443.jsx)(
      import_components259.TextControl,
      {
        __next40pxDefaultSize: true,
        autoComplete: "off",
        label: (0, import_i18n232.__)("Additional CSS class(es)"),
        value: className || "",
        onChange: (nextValue) => {
          setAttributes({
            className: nextValue !== "" ? nextValue : void 0
          });
        },
        help: (0, import_i18n232.__)("Separate multiple classes with spaces.")
      }
    ) });
  }
  var custom_class_name_default = {
    edit: CustomClassNameControlsPure,
    addSaveProps: addSaveProps5,
    attributeKeys: ["className"],
    hasSupport(name) {
      return (0, import_blocks105.hasBlockSupport)(name, "customClassName", true);
    }
  };
  function addSaveProps5(extraProps, blockType, attributes) {
    if ((0, import_blocks105.hasBlockSupport)(blockType, "customClassName", true) && attributes.className) {
      extraProps.className = clsx_default(
        extraProps.className,
        attributes.className
      );
    }
    return extraProps;
  }
  function addTransforms3(result, source, index, results) {
    if (!(0, import_blocks105.hasBlockSupport)(result.name, "customClassName", true)) {
      return result;
    }
    if (results.length === 1 && result.innerBlocks.length === source.length) {
      return result;
    }
    if (results.length === 1 && source.length > 1 || results.length > 1 && source.length === 1) {
      return result;
    }
    if (source[index]) {
      const originClassName = source[index]?.attributes.className;
      if (originClassName && result.attributes.className === void 0) {
        return {
          ...result,
          attributes: {
            ...result.attributes,
            className: originClassName
          }
        };
      }
    }
    return result;
  }
  (0, import_hooks21.addFilter)(
    "blocks.registerBlockType",
    "core/editor/custom-class-name/attribute",
    addAttribute6
  );
  (0, import_hooks21.addFilter)(
    "blocks.switchToBlockType.transformedBlock",
    "core/customClassName/addTransforms",
    addTransforms3
  );

  // packages/block-editor/build-module/hooks/generated-class-name.mjs
  var import_hooks22 = __toESM(require_hooks(), 1);
  var import_blocks106 = __toESM(require_blocks(), 1);
  function addGeneratedClassName(extraProps, blockType) {
    if ((0, import_blocks106.hasBlockSupport)(blockType, "className", true)) {
      if (typeof extraProps.className === "string") {
        extraProps.className = [
          .../* @__PURE__ */ new Set([
            (0, import_blocks106.getBlockDefaultClassName)(blockType.name),
            ...extraProps.className.split(" ")
          ])
        ].join(" ").trim();
      } else {
        extraProps.className = (0, import_blocks106.getBlockDefaultClassName)(blockType.name);
      }
    }
    return extraProps;
  }
  (0, import_hooks22.addFilter)(
    "blocks.getSaveContent.extraProps",
    "core/generated-class-name/save-props",
    addGeneratedClassName
  );

  // packages/block-editor/build-module/hooks/style.mjs
  var import_element265 = __toESM(require_element(), 1);
  var import_hooks26 = __toESM(require_hooks(), 1);
  var import_blocks114 = __toESM(require_blocks(), 1);
  var import_compose102 = __toESM(require_compose(), 1);
  var import_style_engine4 = __toESM(require_style_engine(), 1);

  // packages/block-editor/build-module/hooks/typography.mjs
  var import_blocks112 = __toESM(require_blocks(), 1);
  var import_element262 = __toESM(require_element(), 1);
  var import_data183 = __toESM(require_data(), 1);

  // packages/block-editor/build-module/hooks/line-height.mjs
  var import_blocks107 = __toESM(require_blocks(), 1);
  var import_jsx_runtime444 = __toESM(require_jsx_runtime(), 1);
  var LINE_HEIGHT_SUPPORT_KEY2 = "typography.lineHeight";

  // packages/block-editor/build-module/hooks/font-family.mjs
  var import_hooks23 = __toESM(require_hooks(), 1);
  var import_blocks108 = __toESM(require_blocks(), 1);
  var import_token_list2 = __toESM(require_token_list(), 1);
  var import_components261 = __toESM(require_components(), 1);
  var FONT_FAMILY_SUPPORT_KEY2 = "typography.__experimentalFontFamily";
  var { kebabCase: kebabCase5 } = unlock(import_components261.privateApis);
  function addAttributes3(settings2) {
    if (!(0, import_blocks108.hasBlockSupport)(settings2, FONT_FAMILY_SUPPORT_KEY2)) {
      return settings2;
    }
    if (!settings2.attributes.fontFamily) {
      Object.assign(settings2.attributes, {
        fontFamily: {
          type: "string"
        }
      });
    }
    return settings2;
  }
  function addSaveProps6(props, blockType, attributes) {
    if (!(0, import_blocks108.hasBlockSupport)(blockType, FONT_FAMILY_SUPPORT_KEY2)) {
      return props;
    }
    if (shouldSkipSerialization(
      blockType,
      TYPOGRAPHY_SUPPORT_KEY,
      "fontFamily"
    )) {
      return props;
    }
    if (!attributes?.fontFamily) {
      return props;
    }
    const classes = new import_token_list2.default(props.className);
    classes.add(`has-${kebabCase5(attributes?.fontFamily)}-font-family`);
    const newClassName = classes.value;
    props.className = newClassName ? newClassName : void 0;
    return props;
  }
  function useBlockProps8({ name, fontFamily }) {
    return addSaveProps6({}, name, { fontFamily });
  }
  var font_family_default = {
    useBlockProps: useBlockProps8,
    addSaveProps: addSaveProps6,
    attributeKeys: ["fontFamily"],
    hasSupport(name) {
      return (0, import_blocks108.hasBlockSupport)(name, FONT_FAMILY_SUPPORT_KEY2);
    }
  };
  (0, import_hooks23.addFilter)(
    "blocks.registerBlockType",
    "core/fontFamily/addAttribute",
    addAttributes3
  );

  // packages/block-editor/build-module/hooks/font-size.mjs
  var import_hooks24 = __toESM(require_hooks(), 1);
  var import_blocks109 = __toESM(require_blocks(), 1);
  var import_token_list3 = __toESM(require_token_list(), 1);
  var import_jsx_runtime445 = __toESM(require_jsx_runtime(), 1);
  var FONT_SIZE_SUPPORT_KEY2 = "typography.fontSize";
  function addAttributes4(settings2) {
    if (!(0, import_blocks109.hasBlockSupport)(settings2, FONT_SIZE_SUPPORT_KEY2)) {
      return settings2;
    }
    if (!settings2.attributes.fontSize) {
      Object.assign(settings2.attributes, {
        fontSize: {
          type: "string"
        }
      });
    }
    return settings2;
  }
  function addSaveProps7(props, blockNameOrType, attributes) {
    if (!(0, import_blocks109.hasBlockSupport)(blockNameOrType, FONT_SIZE_SUPPORT_KEY2)) {
      return props;
    }
    if (shouldSkipSerialization(
      blockNameOrType,
      TYPOGRAPHY_SUPPORT_KEY,
      "fontSize"
    )) {
      return props;
    }
    const classes = new import_token_list3.default(props.className);
    classes.add(getFontSizeClass(attributes.fontSize));
    const newClassName = classes.value;
    props.className = newClassName ? newClassName : void 0;
    return props;
  }
  function useBlockProps9({ name, fontSize, style }) {
    const [fontSizes, fluidTypographySettings, layoutSettings] = useSettings(
      "typography.fontSizes",
      "typography.fluid",
      "layout"
    );
    if (!(0, import_blocks109.hasBlockSupport)(name, FONT_SIZE_SUPPORT_KEY2) || shouldSkipSerialization(name, TYPOGRAPHY_SUPPORT_KEY, "fontSize") || !fontSize && !style?.typography?.fontSize) {
      return;
    }
    let props;
    if (style?.typography?.fontSize) {
      props = {
        style: {
          fontSize: getTypographyFontSizeValue(
            { size: style.typography.fontSize },
            {
              typography: {
                fluid: fluidTypographySettings
              },
              layout: layoutSettings
            }
          )
        }
      };
    }
    if (fontSize) {
      props = {
        style: {
          fontSize: getFontSize(
            fontSizes,
            fontSize,
            style?.typography?.fontSize
          ).size
        }
      };
    }
    if (!props) {
      return;
    }
    return addSaveProps7(props, name, { fontSize });
  }
  var font_size_default = {
    useBlockProps: useBlockProps9,
    addSaveProps: addSaveProps7,
    attributeKeys: ["fontSize", "style"],
    hasSupport(name) {
      return (0, import_blocks109.hasBlockSupport)(name, FONT_SIZE_SUPPORT_KEY2);
    }
  };
  var MIGRATION_PATHS2 = {
    fontSize: [["fontSize"], ["style", "typography", "fontSize"]]
  };
  function addTransforms4(result, source, index, results) {
    const destinationBlockType = result.name;
    const activeSupports = {
      fontSize: (0, import_blocks109.hasBlockSupport)(
        destinationBlockType,
        FONT_SIZE_SUPPORT_KEY2
      )
    };
    return transformStyles2(
      activeSupports,
      MIGRATION_PATHS2,
      result,
      source,
      index,
      results
    );
  }
  (0, import_hooks24.addFilter)(
    "blocks.registerBlockType",
    "core/font/addAttribute",
    addAttributes4
  );
  (0, import_hooks24.addFilter)(
    "blocks.switchToBlockType.transformedBlock",
    "core/font-size/addTransforms",
    addTransforms4
  );

  // packages/block-editor/build-module/hooks/text-align.mjs
  var import_i18n233 = __toESM(require_i18n(), 1);
  var import_blocks110 = __toESM(require_blocks(), 1);
  var import_jsx_runtime446 = __toESM(require_jsx_runtime(), 1);
  var TEXT_ALIGN_SUPPORT_KEY2 = "typography.textAlign";
  var TEXT_ALIGNMENT_OPTIONS2 = [
    {
      icon: align_left_default,
      title: (0, import_i18n233.__)("Align text left"),
      align: "left"
    },
    {
      icon: align_center_default,
      title: (0, import_i18n233.__)("Align text center"),
      align: "center"
    },
    {
      icon: align_right_default,
      title: (0, import_i18n233.__)("Align text right"),
      align: "right"
    }
  ];
  var VALID_TEXT_ALIGNMENTS = ["left", "center", "right"];
  var NO_TEXT_ALIGNMENTS = [];
  function getValidTextAlignments(blockTextAlign) {
    if (Array.isArray(blockTextAlign)) {
      return VALID_TEXT_ALIGNMENTS.filter(
        (textAlign) => blockTextAlign.includes(textAlign)
      );
    }
    return blockTextAlign === true ? VALID_TEXT_ALIGNMENTS : NO_TEXT_ALIGNMENTS;
  }
  function BlockEditTextAlignmentToolbarControlsPure({
    style,
    name: blockName,
    setAttributes
  }) {
    const settings2 = useBlockSettings(blockName);
    const hasTextAlignControl = settings2?.typography?.textAlign;
    const blockEditingMode = useBlockEditingMode();
    if (!hasTextAlignControl || blockEditingMode !== "default") {
      return null;
    }
    const validTextAlignments = getValidTextAlignments(
      (0, import_blocks110.getBlockSupport)(blockName, TEXT_ALIGN_SUPPORT_KEY2)
    );
    if (!validTextAlignments.length) {
      return null;
    }
    const textAlignmentControls = TEXT_ALIGNMENT_OPTIONS2.filter(
      (control) => validTextAlignments.includes(control.align)
    );
    const onChange = (newTextAlignValue) => {
      const newStyle = {
        ...style,
        typography: {
          ...style?.typography,
          textAlign: newTextAlignValue
        }
      };
      setAttributes({ style: cleanEmptyObject(newStyle) });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime446.jsx)(block_controls_default, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime446.jsx)(
      AlignmentControl,
      {
        value: style?.typography?.textAlign,
        onChange,
        alignmentControls: textAlignmentControls
      }
    ) });
  }
  var text_align_default = {
    edit: BlockEditTextAlignmentToolbarControlsPure,
    useBlockProps: useBlockProps10,
    addSaveProps: addAssignedTextAlign,
    attributeKeys: ["style"],
    hasSupport(name) {
      return (0, import_blocks110.hasBlockSupport)(name, TEXT_ALIGN_SUPPORT_KEY2, false);
    }
  };
  function useBlockProps10({ name, style }) {
    if (!style?.typography?.textAlign) {
      return null;
    }
    const validTextAlignments = getValidTextAlignments(
      (0, import_blocks110.getBlockSupport)(name, TEXT_ALIGN_SUPPORT_KEY2)
    );
    if (!validTextAlignments.length) {
      return null;
    }
    if (shouldSkipSerialization(name, TYPOGRAPHY_SUPPORT_KEY, "textAlign")) {
      return null;
    }
    const textAlign = style.typography.textAlign;
    const className = clsx_default({
      [`has-text-align-${textAlign}`]: textAlign
    });
    return { className };
  }
  function addAssignedTextAlign(props, blockType, attributes) {
    if (!attributes?.style?.typography?.textAlign) {
      return props;
    }
    const { textAlign } = attributes.style.typography;
    const blockTextAlign = (0, import_blocks110.getBlockSupport)(blockType, TEXT_ALIGN_SUPPORT_KEY2);
    const isTextAlignValid = getValidTextAlignments(blockTextAlign).includes(textAlign);
    if (isTextAlignValid && !shouldSkipSerialization(
      blockType,
      TYPOGRAPHY_SUPPORT_KEY,
      "textAlign"
    )) {
      props.className = clsx_default(
        `has-text-align-${textAlign}`,
        props.className
      );
    }
    return props;
  }

  // packages/block-editor/build-module/hooks/fit-text.mjs
  var import_hooks25 = __toESM(require_hooks(), 1);
  var import_blocks111 = __toESM(require_blocks(), 1);
  var import_element261 = __toESM(require_element(), 1);
  var import_data182 = __toESM(require_data(), 1);
  var import_i18n235 = __toESM(require_i18n(), 1);
  var import_components264 = __toESM(require_components(), 1);
  var import_compose101 = __toESM(require_compose(), 1);

  // packages/block-editor/build-module/utils/fit-text-utils.mjs
  function findOptimalFontSize(textElement, applyFontSize) {
    const alreadyHasScrollableHeight = textElement.scrollHeight > textElement.clientHeight;
    let minSize = 0;
    let maxSize = 2400;
    let bestSize = minSize;
    const computedStyle = window.getComputedStyle(textElement);
    let paddingLeft = parseFloat(computedStyle.paddingLeft) || 0;
    let paddingRight = parseFloat(computedStyle.paddingRight) || 0;
    const range2 = document.createRange();
    range2.selectNodeContents(textElement);
    let referenceElement = textElement;
    const parentElement = textElement.parentElement;
    if (parentElement) {
      const parentElementComputedStyle = window.getComputedStyle(parentElement);
      if (parentElementComputedStyle?.display === "flex") {
        referenceElement = parentElement;
        paddingLeft += parseFloat(parentElementComputedStyle.paddingLeft) || 0;
        paddingRight += parseFloat(parentElementComputedStyle.paddingRight) || 0;
      }
    }
    let maxclientHeight = referenceElement.clientHeight;
    while (minSize <= maxSize) {
      const midSize = Math.floor((minSize + maxSize) / 2);
      applyFontSize(midSize);
      const rect = range2.getBoundingClientRect();
      const textWidth = rect.width;
      const fitsWidth = textElement.scrollWidth <= referenceElement.clientWidth && textWidth <= referenceElement.clientWidth - paddingLeft - paddingRight;
      const fitsHeight = alreadyHasScrollableHeight || textElement.scrollHeight <= referenceElement.clientHeight || textElement.scrollHeight <= maxclientHeight;
      if (referenceElement.clientHeight > maxclientHeight) {
        maxclientHeight = referenceElement.clientHeight;
      }
      if (fitsWidth && fitsHeight) {
        bestSize = midSize;
        minSize = midSize + 1;
      } else {
        maxSize = midSize - 1;
      }
    }
    range2.detach();
    return bestSize;
  }
  function optimizeFitText(textElement, applyFontSize) {
    if (!textElement) {
      return;
    }
    applyFontSize(0);
    const optimalSize = findOptimalFontSize(textElement, applyFontSize);
    applyFontSize(optimalSize);
    return optimalSize;
  }

  // packages/block-editor/build-module/components/fit-text-size-warning/index.mjs
  var import_element260 = __toESM(require_element(), 1);
  var import_i18n234 = __toESM(require_i18n(), 1);
  var import_components263 = __toESM(require_components(), 1);
  var import_a11y20 = __toESM(require_a11y(), 1);
  var import_jsx_runtime447 = __toESM(require_jsx_runtime(), 1);
  function FitTextSizeWarning() {
    const message2 = (0, import_i18n234.__)(
      "The text may be too small to read. Consider using a larger container or less text."
    );
    (0, import_element260.useEffect)(() => {
      (0, import_a11y20.speak)(message2);
    }, [message2]);
    return /* @__PURE__ */ (0, import_jsx_runtime447.jsx)("div", { className: "block-editor-fit-text-size-warning", children: /* @__PURE__ */ (0, import_jsx_runtime447.jsx)(
      import_components263.Notice,
      {
        spokenMessage: null,
        status: "warning",
        isDismissible: false,
        children: message2
      }
    ) });
  }

  // packages/block-editor/build-module/hooks/fit-text.mjs
  var import_jsx_runtime448 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_OBJECT4 = {};
  var MIN_FONT_SIZE_FOR_WARNING = 12;
  var FIT_TEXT_SUPPORT_KEY = "typography.fitText";
  function addAttributes5(settings2) {
    if (!(0, import_blocks111.hasBlockSupport)(settings2, FIT_TEXT_SUPPORT_KEY)) {
      return settings2;
    }
    if (settings2.attributes?.fitText) {
      return settings2;
    }
    return {
      ...settings2,
      attributes: {
        ...settings2.attributes,
        fitText: {
          type: "boolean"
        }
      }
    };
  }
  function useFitText({ fitText, name, clientId }) {
    const [fontSize, setFontSize] = (0, import_element261.useState)(null);
    const hasFitTextSupport2 = (0, import_blocks111.hasBlockSupport)(name, FIT_TEXT_SUPPORT_KEY);
    const blockElement = useBlockElement(clientId);
    const { blockAttributes, parentId, blockMode } = (0, import_data182.useSelect)(
      (select3) => {
        if (!clientId || !hasFitTextSupport2 || !fitText) {
          return EMPTY_OBJECT4;
        }
        const _blockMode = select3(store).getBlockMode(clientId);
        if (_blockMode === "html") {
          return { blockMode: _blockMode };
        }
        return {
          blockAttributes: select3(store).getBlockAttributes(clientId),
          parentId: select3(store).getBlockRootClientId(clientId),
          blockMode: _blockMode
        };
      },
      [clientId, hasFitTextSupport2, fitText]
    );
    const applyFitText = (0, import_element261.useCallback)(() => {
      if (!blockElement || !hasFitTextSupport2 || !fitText) {
        return;
      }
      const styleId = `fit-text-${clientId}`;
      let styleElement = blockElement.ownerDocument.getElementById(styleId);
      if (!styleElement) {
        styleElement = blockElement.ownerDocument.createElement("style");
        styleElement.id = styleId;
        blockElement.ownerDocument.head.appendChild(styleElement);
      }
      const blockSelector = `#block-${clientId}`;
      const applyFontSizeStyle = (size) => {
        if (size === 0) {
          styleElement.textContent = "";
        } else {
          styleElement.textContent = `${blockSelector} { font-size: ${size}px !important; }`;
        }
      };
      const optimalSize = optimizeFitText(blockElement, applyFontSizeStyle);
      setFontSize(optimalSize);
    }, [blockElement, clientId, hasFitTextSupport2, fitText]);
    (0, import_element261.useEffect)(() => {
      if (!fitText || !blockElement || !clientId || !hasFitTextSupport2 || blockMode === "html") {
        return;
      }
      const currentElement = blockElement;
      const previousVisibility = currentElement.style.visibility;
      let hideFrameId = null;
      let calculateFrameId = null;
      let showTimeoutId = null;
      hideFrameId = window.requestAnimationFrame(() => {
        currentElement.style.visibility = "hidden";
        calculateFrameId = window.requestAnimationFrame(() => {
          applyFitText();
          showTimeoutId = setTimeout(() => {
            currentElement.style.visibility = previousVisibility;
          }, 10);
        });
      });
      let resizeObserver;
      if (window.ResizeObserver && currentElement.parentElement) {
        resizeObserver = new window.ResizeObserver(applyFitText);
        resizeObserver.observe(currentElement.parentElement);
        resizeObserver.observe(currentElement);
      }
      return () => {
        if (hideFrameId !== null) {
          window.cancelAnimationFrame(hideFrameId);
        }
        if (calculateFrameId !== null) {
          window.cancelAnimationFrame(calculateFrameId);
        }
        if (showTimeoutId !== null) {
          clearTimeout(showTimeoutId);
        }
        if (resizeObserver) {
          resizeObserver.disconnect();
        }
        const styleId = `fit-text-${clientId}`;
        const styleElement = currentElement.ownerDocument.getElementById(styleId);
        if (styleElement) {
          styleElement.remove();
        }
      };
    }, [
      fitText,
      clientId,
      parentId,
      applyFitText,
      blockElement,
      hasFitTextSupport2,
      blockMode
    ]);
    (0, import_element261.useEffect)(() => {
      if (fitText && blockElement && hasFitTextSupport2 && blockMode !== "html") {
        const frameId = window.requestAnimationFrame(() => {
          if (blockElement) {
            applyFitText();
          }
        });
        return () => window.cancelAnimationFrame(frameId);
      }
    }, [
      blockAttributes,
      fitText,
      applyFitText,
      blockElement,
      hasFitTextSupport2,
      blockMode
    ]);
    return { fontSize };
  }
  function FitTextControl({
    clientId,
    fitText = false,
    setAttributes,
    name,
    fontSize,
    style,
    warning: warning6
  }) {
    if (!(0, import_blocks111.hasBlockSupport)(name, FIT_TEXT_SUPPORT_KEY)) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime448.jsx)(inspector_controls_default, { group: "typography", children: /* @__PURE__ */ (0, import_jsx_runtime448.jsxs)(
      import_components264.__experimentalToolsPanelItem,
      {
        hasValue: () => fitText,
        label: (0, import_i18n235.__)("Fit text"),
        onDeselect: () => setAttributes({ fitText: void 0 }),
        resetAllFilter: () => ({ fitText: void 0 }),
        panelId: clientId,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime448.jsx)(
            import_components264.ToggleControl,
            {
              label: (0, import_i18n235.__)("Fit text"),
              checked: fitText,
              onChange: () => {
                const newFitText = !fitText || void 0;
                const updates = { fitText: newFitText };
                if (newFitText) {
                  if (fontSize) {
                    updates.fontSize = void 0;
                  }
                  if (style?.typography?.fontSize) {
                    updates.style = {
                      ...style,
                      typography: {
                        ...style?.typography,
                        fontSize: void 0
                      }
                    };
                  }
                }
                setAttributes(updates);
              },
              help: fitText ? (0, import_i18n235.__)("Text will resize to fit its container.") : (0, import_i18n235.__)(
                "The text will resize to fit its container, resetting other font size settings."
              )
            }
          ),
          warning6
        ]
      }
    ) });
  }
  function addSaveProps8(props, blockType, attributes) {
    if (!(0, import_blocks111.hasBlockSupport)(blockType, FIT_TEXT_SUPPORT_KEY)) {
      return props;
    }
    const { fitText } = attributes;
    if (!fitText) {
      return props;
    }
    const className = props.className ? `${props.className} has-fit-text` : "has-fit-text";
    return {
      ...props,
      className
    };
  }
  function useBlockProps11({ name, fitText }) {
    if (fitText && (0, import_blocks111.hasBlockSupport)(name, FIT_TEXT_SUPPORT_KEY)) {
      return {
        className: "has-fit-text"
      };
    }
    return {};
  }
  (0, import_hooks25.addFilter)(
    "blocks.registerBlockType",
    "core/fit-text/addAttribute",
    addAttributes5
  );
  var hasFitTextSupport = (blockNameOrType) => {
    return (0, import_blocks111.hasBlockSupport)(blockNameOrType, FIT_TEXT_SUPPORT_KEY);
  };
  function WithFitTextFontSize({ fitText, name, clientId, children }) {
    const { fontSize } = useFitText({ fitText, name, clientId });
    return children(fontSize);
  }
  var addFitTextControl = (0, import_compose101.createHigherOrderComponent)((BlockEdit2) => {
    return function AddFitTextControl(props) {
      const { name, attributes, clientId, isSelected, setAttributes } = props;
      const { fitText } = attributes;
      const supportsFitText = (0, import_blocks111.hasBlockSupport)(name, FIT_TEXT_SUPPORT_KEY);
      if (!supportsFitText) {
        return /* @__PURE__ */ (0, import_jsx_runtime448.jsx)(BlockEdit2, { ...props });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime448.jsxs)(import_jsx_runtime448.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime448.jsx)(BlockEdit2, { ...props }),
        fitText && /* @__PURE__ */ (0, import_jsx_runtime448.jsx)(
          WithFitTextFontSize,
          {
            fitText,
            name,
            clientId,
            children: (fontSize) => isSelected && /* @__PURE__ */ (0, import_jsx_runtime448.jsx)(
              FitTextControl,
              {
                clientId,
                fitText,
                setAttributes,
                name,
                fontSize: attributes.fontSize,
                style: attributes.style,
                warning: fontSize < MIN_FONT_SIZE_FOR_WARNING && /* @__PURE__ */ (0, import_jsx_runtime448.jsx)(FitTextSizeWarning, {})
              }
            )
          }
        ),
        !fitText && isSelected && /* @__PURE__ */ (0, import_jsx_runtime448.jsx)(
          FitTextControl,
          {
            clientId,
            fitText,
            setAttributes,
            name,
            fontSize: attributes.fontSize,
            style: attributes.style
          }
        )
      ] });
    };
  }, "addFitTextControl");
  (0, import_hooks25.addFilter)(
    "editor.BlockEdit",
    "core/fit-text/add-fit-text-control",
    addFitTextControl
  );
  var fit_text_default = {
    useBlockProps: useBlockProps11,
    addSaveProps: addSaveProps8,
    attributeKeys: ["fitText", "fontSize", "style"],
    hasSupport: hasFitTextSupport,
    edit: () => null
  };

  // packages/block-editor/build-module/hooks/typography.mjs
  var import_jsx_runtime449 = __toESM(require_jsx_runtime(), 1);
  function omit(object, keys) {
    return Object.fromEntries(
      Object.entries(object).filter(([key]) => !keys.includes(key))
    );
  }
  var LETTER_SPACING_SUPPORT_KEY2 = "typography.__experimentalLetterSpacing";
  var TEXT_TRANSFORM_SUPPORT_KEY2 = "typography.__experimentalTextTransform";
  var TEXT_DECORATION_SUPPORT_KEY2 = "typography.__experimentalTextDecoration";
  var TEXT_INDENT_SUPPORT_KEY = "typography.textIndent";
  var TEXT_COLUMNS_SUPPORT_KEY2 = "typography.textColumns";
  var FONT_STYLE_SUPPORT_KEY2 = "typography.__experimentalFontStyle";
  var FONT_WEIGHT_SUPPORT_KEY2 = "typography.__experimentalFontWeight";
  var WRITING_MODE_SUPPORT_KEY2 = "typography.__experimentalWritingMode";
  var TYPOGRAPHY_SUPPORT_KEY = "typography";
  var TYPOGRAPHY_SUPPORT_KEYS2 = [
    LINE_HEIGHT_SUPPORT_KEY2,
    FONT_SIZE_SUPPORT_KEY2,
    FONT_STYLE_SUPPORT_KEY2,
    FONT_WEIGHT_SUPPORT_KEY2,
    FONT_FAMILY_SUPPORT_KEY2,
    TEXT_ALIGN_SUPPORT_KEY2,
    TEXT_COLUMNS_SUPPORT_KEY2,
    TEXT_DECORATION_SUPPORT_KEY2,
    TEXT_INDENT_SUPPORT_KEY,
    WRITING_MODE_SUPPORT_KEY2,
    TEXT_TRANSFORM_SUPPORT_KEY2,
    LETTER_SPACING_SUPPORT_KEY2,
    FIT_TEXT_SUPPORT_KEY
  ];
  function styleToAttributes3(style) {
    const updatedStyle = { ...omit(style, ["fontFamily"]) };
    const fontSizeValue = style?.typography?.fontSize;
    const fontFamilyValue = style?.typography?.fontFamily;
    const fontSizeSlug = typeof fontSizeValue === "string" && fontSizeValue?.startsWith("var:preset|font-size|") ? fontSizeValue.substring("var:preset|font-size|".length) : void 0;
    const fontFamilySlug = fontFamilyValue?.startsWith(
      "var:preset|font-family|"
    ) ? fontFamilyValue.substring("var:preset|font-family|".length) : void 0;
    updatedStyle.typography = {
      ...omit(updatedStyle.typography, ["fontFamily"]),
      fontSize: fontSizeSlug ? void 0 : fontSizeValue
    };
    return {
      style: cleanEmptyObject(updatedStyle),
      fontFamily: fontFamilySlug,
      fontSize: fontSizeSlug
    };
  }
  function attributesToStyle3(attributes) {
    return {
      ...attributes.style,
      typography: {
        ...attributes.style?.typography,
        fontFamily: attributes.fontFamily ? "var:preset|font-family|" + attributes.fontFamily : void 0,
        fontSize: attributes.fontSize ? "var:preset|font-size|" + attributes.fontSize : attributes.style?.typography?.fontSize
      }
    };
  }
  function TypographyInspectorControl({ children, resetAllFilter }) {
    const attributesResetAllFilter = (0, import_element262.useCallback)(
      (attributes) => {
        const existingStyle = attributesToStyle3(attributes);
        const updatedStyle = resetAllFilter(existingStyle);
        return {
          ...attributes,
          ...styleToAttributes3(updatedStyle)
        };
      },
      [resetAllFilter]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime449.jsx)(
      inspector_controls_default,
      {
        group: "typography",
        resetAllFilter: attributesResetAllFilter,
        children
      }
    );
  }
  function TypographyPanel2({ clientId, name, setAttributes, settings: settings2 }) {
    const isEnabled = useHasTypographyPanel(settings2);
    const { style, fontFamily, fontSize, fitText } = (0, import_data183.useSelect)(
      (select3) => {
        if (!isEnabled) {
          return {};
        }
        const {
          style: _style,
          fontFamily: _fontFamily,
          fontSize: _fontSize,
          fitText: _fitText
        } = select3(store).getBlockAttributes(clientId) || {};
        return {
          style: _style,
          fontFamily: _fontFamily,
          fontSize: _fontSize,
          fitText: _fitText
        };
      },
      [clientId, isEnabled]
    );
    const value = (0, import_element262.useMemo)(
      () => attributesToStyle3({ style, fontFamily, fontSize }),
      [style, fontSize, fontFamily]
    );
    const onChange = (newStyle) => {
      const newAttributes = styleToAttributes3(newStyle);
      const hasFontSize = newAttributes.fontSize || newAttributes.style?.typography?.fontSize;
      if (hasFontSize && fitText) {
        newAttributes.fitText = void 0;
      }
      setAttributes(newAttributes);
    };
    if (!isEnabled) {
      return null;
    }
    const defaultControls = (0, import_blocks112.getBlockSupport)(name, [
      TYPOGRAPHY_SUPPORT_KEY,
      "__experimentalDefaultControls"
    ]);
    return /* @__PURE__ */ (0, import_jsx_runtime449.jsx)(
      TypographyPanel,
      {
        as: TypographyInspectorControl,
        panelId: clientId,
        settings: settings2,
        value,
        onChange,
        defaultControls
      }
    );
  }

  // packages/block-editor/build-module/hooks/dimensions.mjs
  var import_element264 = __toESM(require_element(), 1);
  var import_data184 = __toESM(require_data(), 1);
  var import_blocks113 = __toESM(require_blocks(), 1);
  var import_deprecated36 = __toESM(require_deprecated(), 1);

  // packages/block-editor/build-module/hooks/spacing-visualizer.mjs
  var import_element263 = __toESM(require_element(), 1);
  var import_is_shallow_equal4 = __toESM(require_is_shallow_equal(), 1);
  var import_jsx_runtime450 = __toESM(require_jsx_runtime(), 1);
  function SpacingVisualizer({ clientId, value, computeStyle, forceShow }) {
    const blockElement = useBlockElement(clientId);
    const [style, updateStyle] = (0, import_element263.useReducer)(
      () => computeStyle(blockElement)
    );
    (0, import_element263.useEffect)(() => {
      if (blockElement && forceShow) {
        updateStyle();
      }
    }, [blockElement, forceShow]);
    (0, import_element263.useEffect)(() => {
      if (!blockElement) {
        return;
      }
      const observer = new window.MutationObserver(updateStyle);
      observer.observe(blockElement, {
        attributes: true,
        attributeFilter: ["style", "class"]
      });
      return () => {
        observer.disconnect();
      };
    }, [blockElement]);
    const previousValueRef = (0, import_element263.useRef)(value);
    const [isActive, setIsActive] = (0, import_element263.useState)(false);
    (0, import_element263.useEffect)(() => {
      if ((0, import_is_shallow_equal4.isShallowEqual)(value, previousValueRef.current) || forceShow) {
        return;
      }
      setIsActive(true);
      previousValueRef.current = value;
      const timeout = setTimeout(() => {
        setIsActive(false);
      }, 400);
      return () => {
        setIsActive(false);
        clearTimeout(timeout);
      };
    }, [value, forceShow]);
    if (!isActive && !forceShow) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime450.jsx)(
      cover_default,
      {
        clientId,
        __unstablePopoverSlot: "block-toolbar",
        children: /* @__PURE__ */ (0, import_jsx_runtime450.jsx)("div", { className: "block-editor__spacing-visualizer", style })
      }
    );
  }
  function getComputedCSS(element, property) {
    return element.ownerDocument.defaultView.getComputedStyle(element).getPropertyValue(property);
  }
  function MarginVisualizer({ clientId, value, forceShow }) {
    return /* @__PURE__ */ (0, import_jsx_runtime450.jsx)(
      SpacingVisualizer,
      {
        clientId,
        value: value?.spacing?.margin,
        computeStyle: (blockElement) => {
          const top = getComputedCSS(blockElement, "margin-top");
          const right = getComputedCSS(blockElement, "margin-right");
          const bottom = getComputedCSS(blockElement, "margin-bottom");
          const left = getComputedCSS(blockElement, "margin-left");
          return {
            borderTopWidth: top,
            borderRightWidth: right,
            borderBottomWidth: bottom,
            borderLeftWidth: left,
            top: top ? `-${top}` : 0,
            right: right ? `-${right}` : 0,
            bottom: bottom ? `-${bottom}` : 0,
            left: left ? `-${left}` : 0
          };
        },
        forceShow
      }
    );
  }
  function PaddingVisualizer({ clientId, value, forceShow }) {
    return /* @__PURE__ */ (0, import_jsx_runtime450.jsx)(
      SpacingVisualizer,
      {
        clientId,
        value: value?.spacing?.padding,
        computeStyle: (blockElement) => ({
          borderTopWidth: getComputedCSS(blockElement, "padding-top"),
          borderRightWidth: getComputedCSS(
            blockElement,
            "padding-right"
          ),
          borderBottomWidth: getComputedCSS(
            blockElement,
            "padding-bottom"
          ),
          borderLeftWidth: getComputedCSS(blockElement, "padding-left")
        }),
        forceShow
      }
    );
  }

  // packages/block-editor/build-module/hooks/dimensions.mjs
  var import_jsx_runtime451 = __toESM(require_jsx_runtime(), 1);
  var DIMENSIONS_SUPPORT_KEY = "dimensions";
  var SPACING_SUPPORT_KEY2 = "spacing";
  function useVisualizer() {
    const [property, setProperty] = (0, import_element264.useState)(false);
    const { hideBlockInterface: hideBlockInterface2, showBlockInterface: showBlockInterface2 } = unlock(
      (0, import_data184.useDispatch)(store)
    );
    (0, import_element264.useEffect)(() => {
      if (!property) {
        showBlockInterface2();
      } else {
        hideBlockInterface2();
      }
    }, [property, showBlockInterface2, hideBlockInterface2]);
    return [property, setProperty];
  }
  function DimensionsInspectorControl({ children, resetAllFilter }) {
    const attributesResetAllFilter = (0, import_element264.useCallback)(
      (attributes) => {
        const existingStyle = attributes.style;
        const updatedStyle = resetAllFilter(existingStyle);
        return {
          ...attributes,
          style: updatedStyle
        };
      },
      [resetAllFilter]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime451.jsx)(
      inspector_controls_default,
      {
        group: "dimensions",
        resetAllFilter: attributesResetAllFilter,
        children
      }
    );
  }
  function DimensionsPanel2({ clientId, name, setAttributes, settings: settings2 }) {
    const isEnabled = useHasDimensionsPanel(settings2);
    const value = (0, import_data184.useSelect)(
      (select3) => {
        if (!isEnabled) {
          return void 0;
        }
        return select3(store).getBlockAttributes(clientId)?.style;
      },
      [clientId, isEnabled]
    );
    const [visualizedProperty, setVisualizedProperty] = useVisualizer();
    const onChange = (newStyle) => {
      setAttributes({
        style: cleanEmptyObject(newStyle)
      });
    };
    if (!isEnabled) {
      return null;
    }
    const defaultDimensionsControls = (0, import_blocks113.getBlockSupport)(name, [
      DIMENSIONS_SUPPORT_KEY,
      "__experimentalDefaultControls"
    ]);
    const defaultSpacingControls = (0, import_blocks113.getBlockSupport)(name, [
      SPACING_SUPPORT_KEY2,
      "__experimentalDefaultControls"
    ]);
    const defaultControls = {
      ...defaultDimensionsControls,
      ...defaultSpacingControls
    };
    return /* @__PURE__ */ (0, import_jsx_runtime451.jsxs)(import_jsx_runtime451.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime451.jsx)(
        DimensionsPanel,
        {
          as: DimensionsInspectorControl,
          panelId: clientId,
          settings: settings2,
          value,
          onChange,
          defaultControls,
          onVisualize: setVisualizedProperty
        }
      ),
      !!settings2?.spacing?.padding && visualizedProperty === "padding" && /* @__PURE__ */ (0, import_jsx_runtime451.jsx)(
        PaddingVisualizer,
        {
          forceShow: visualizedProperty === "padding",
          clientId,
          value
        }
      ),
      !!settings2?.spacing?.margin && visualizedProperty === "margin" && /* @__PURE__ */ (0, import_jsx_runtime451.jsx)(
        MarginVisualizer,
        {
          forceShow: visualizedProperty === "margin",
          clientId,
          value
        }
      )
    ] });
  }
  function hasDimensionsSupport(blockName, feature = "any") {
    if (import_element264.Platform.OS !== "web") {
      return false;
    }
    const support = (0, import_blocks113.getBlockSupport)(blockName, DIMENSIONS_SUPPORT_KEY);
    if (support === true) {
      return true;
    }
    if (feature === "any") {
      return !!(support?.aspectRatio || !!support?.height || !!support?.minHeight || !!support?.width);
    }
    return !!support?.[feature];
  }
  var dimensions_default = {
    useBlockProps: useBlockProps12,
    attributeKeys: ["height", "minHeight", "width", "style"],
    hasSupport(name) {
      return hasDimensionsSupport(name);
    }
  };
  function useBlockProps12({ name, height, minHeight, style }) {
    if (!hasDimensionsSupport(name, "aspectRatio") || shouldSkipSerialization(name, DIMENSIONS_SUPPORT_KEY, "aspectRatio")) {
      return {};
    }
    const className = clsx_default({
      "has-aspect-ratio": !!style?.dimensions?.aspectRatio
    });
    const inlineStyleOverrides = {};
    if (style?.dimensions?.aspectRatio) {
      inlineStyleOverrides.minHeight = "unset";
      inlineStyleOverrides.height = "unset";
    } else if (minHeight || style?.dimensions?.minHeight || height || style?.dimensions?.height) {
      inlineStyleOverrides.aspectRatio = "unset";
    }
    return { className, style: inlineStyleOverrides };
  }
  function useCustomSides() {
    (0, import_deprecated36.default)("wp.blockEditor.__experimentalUseCustomSides", {
      since: "6.3",
      version: "6.4"
    });
  }

  // packages/block-editor/build-module/hooks/style.mjs
  var import_jsx_runtime452 = __toESM(require_jsx_runtime(), 1);
  var styleSupportKeys2 = [
    ...TYPOGRAPHY_SUPPORT_KEYS2,
    BORDER_SUPPORT_KEY2,
    COLOR_SUPPORT_KEY2,
    DIMENSIONS_SUPPORT_KEY,
    BACKGROUND_SUPPORT_KEY,
    SPACING_SUPPORT_KEY2,
    SHADOW_SUPPORT_KEY
  ];
  var hasStyleSupport2 = (nameOrType) => styleSupportKeys2.some((key) => (0, import_blocks114.hasBlockSupport)(nameOrType, key));
  function getInlineStyles(styles = {}) {
    const output = {};
    (0, import_style_engine4.getCSSRules)(styles).forEach((rule) => {
      output[rule.key] = rule.value;
    });
    return output;
  }
  function addAttribute7(settings2) {
    if (!hasStyleSupport2(settings2) && !(0, import_blocks114.hasBlockSupport)(settings2, "customCSS", true)) {
      return settings2;
    }
    if (!settings2.attributes.style) {
      Object.assign(settings2.attributes, {
        style: {
          type: "object"
        }
      });
    }
    return settings2;
  }
  var skipSerializationPathsEdit = {
    [`${BORDER_SUPPORT_KEY2}.__experimentalSkipSerialization`]: ["border"],
    [`${COLOR_SUPPORT_KEY2}.__experimentalSkipSerialization`]: [
      COLOR_SUPPORT_KEY2
    ],
    [`${TYPOGRAPHY_SUPPORT_KEY}.__experimentalSkipSerialization`]: [
      TYPOGRAPHY_SUPPORT_KEY
    ],
    [`${DIMENSIONS_SUPPORT_KEY}.__experimentalSkipSerialization`]: [
      DIMENSIONS_SUPPORT_KEY
    ],
    [`${SPACING_SUPPORT_KEY2}.__experimentalSkipSerialization`]: [
      SPACING_SUPPORT_KEY2
    ],
    [`${SHADOW_SUPPORT_KEY}.__experimentalSkipSerialization`]: [
      SHADOW_SUPPORT_KEY
    ]
  };
  var skipSerializationPathsSave = {
    ...skipSerializationPathsEdit,
    [`${DIMENSIONS_SUPPORT_KEY}.aspectRatio`]: [
      `${DIMENSIONS_SUPPORT_KEY}.aspectRatio`
    ],
    // Skip serialization of aspect ratio in save mode.
    [`${BACKGROUND_SUPPORT_KEY}`]: [BACKGROUND_SUPPORT_KEY]
    // Skip serialization of background support in save mode.
  };
  var skipSerializationPathsSaveChecks = {
    [`${DIMENSIONS_SUPPORT_KEY}.aspectRatio`]: true,
    [`${BACKGROUND_SUPPORT_KEY}`]: true
  };
  var renamedFeatures = { gradients: "gradient" };
  function omitStyle(style, paths, preserveReference = false) {
    if (!style) {
      return style;
    }
    let newStyle = style;
    if (!preserveReference) {
      newStyle = JSON.parse(JSON.stringify(style));
    }
    if (!Array.isArray(paths)) {
      paths = [paths];
    }
    paths.forEach((path) => {
      if (!Array.isArray(path)) {
        path = path.split(".");
      }
      if (path.length > 1) {
        const [firstSubpath, ...restPath] = path;
        omitStyle(newStyle[firstSubpath], [restPath], true);
      } else if (path.length === 1) {
        delete newStyle[path[0]];
      }
    });
    return newStyle;
  }
  function addSaveProps9(props, blockNameOrType, attributes, skipPaths = skipSerializationPathsSave) {
    if (!hasStyleSupport2(blockNameOrType)) {
      return props;
    }
    let { style } = attributes;
    Object.entries(skipPaths).forEach(([indicator, path]) => {
      const skipSerialization = skipSerializationPathsSaveChecks[indicator] || (0, import_blocks114.getBlockSupport)(blockNameOrType, indicator);
      if (skipSerialization === true) {
        style = omitStyle(style, path);
      }
      if (Array.isArray(skipSerialization)) {
        skipSerialization.forEach((featureName) => {
          const feature = renamedFeatures[featureName] || featureName;
          style = omitStyle(style, [[...path, feature]]);
        });
      }
    });
    props.style = {
      ...getInlineStyles(style),
      ...props.style
    };
    return props;
  }
  function BlockStyleControls({
    clientId,
    name,
    setAttributes,
    __unstableParentLayout
  }) {
    const settings2 = useBlockSettings(name, __unstableParentLayout);
    const blockEditingMode = useBlockEditingMode();
    const passedProps = {
      clientId,
      name,
      setAttributes,
      settings: {
        ...settings2,
        typography: {
          ...settings2.typography,
          // The text alignment UI for individual blocks is rendered in
          // the block toolbar, so disable it here.
          textAlign: false
        }
      }
    };
    if (blockEditingMode !== "default") {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime452.jsxs)(import_jsx_runtime452.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime452.jsx)(ColorEdit, { ...passedProps }),
      /* @__PURE__ */ (0, import_jsx_runtime452.jsx)(BackgroundImagePanel3, { ...passedProps }),
      /* @__PURE__ */ (0, import_jsx_runtime452.jsx)(TypographyPanel2, { ...passedProps }),
      /* @__PURE__ */ (0, import_jsx_runtime452.jsx)(BorderPanel2, { ...passedProps }),
      /* @__PURE__ */ (0, import_jsx_runtime452.jsx)(DimensionsPanel2, { ...passedProps })
    ] });
  }
  var style_default3 = {
    edit: BlockStyleControls,
    hasSupport: hasStyleSupport2,
    addSaveProps: addSaveProps9,
    attributeKeys: ["style"],
    useBlockProps: useBlockProps13
  };
  var elementTypes = [
    { elementType: "button" },
    { elementType: "link", pseudo: [":hover"] },
    {
      elementType: "heading",
      elements: ["h1", "h2", "h3", "h4", "h5", "h6"]
    }
  ];
  var STYLE_BLOCK_PROPS_REFERENCE = {};
  function useBlockProps13({ name, style }) {
    const blockElementsContainerIdentifier = (0, import_compose102.useInstanceId)(
      STYLE_BLOCK_PROPS_REFERENCE,
      "wp-elements"
    );
    const baseElementSelector = `.${blockElementsContainerIdentifier}`;
    const blockElementStyles = style?.elements;
    const styles = (0, import_element265.useMemo)(() => {
      if (!blockElementStyles) {
        return;
      }
      const elementCSSRules = [];
      elementTypes.forEach(({ elementType, pseudo, elements }) => {
        const skipSerialization = shouldSkipSerialization(
          name,
          COLOR_SUPPORT_KEY2,
          elementType
        );
        if (skipSerialization) {
          return;
        }
        const elementStyles = blockElementStyles?.[elementType];
        if (elementStyles) {
          const selector3 = scopeSelector(
            baseElementSelector,
            import_blocks114.__EXPERIMENTAL_ELEMENTS[elementType]
          );
          elementCSSRules.push(
            (0, import_style_engine4.compileCSS)(elementStyles, { selector: selector3 })
          );
          if (pseudo) {
            pseudo.forEach((pseudoSelector) => {
              if (elementStyles[pseudoSelector]) {
                elementCSSRules.push(
                  (0, import_style_engine4.compileCSS)(elementStyles[pseudoSelector], {
                    selector: scopeSelector(
                      baseElementSelector,
                      `${import_blocks114.__EXPERIMENTAL_ELEMENTS[elementType]}${pseudoSelector}`
                    )
                  })
                );
              }
            });
          }
        }
        if (elements) {
          elements.forEach((element) => {
            if (blockElementStyles[element]) {
              elementCSSRules.push(
                (0, import_style_engine4.compileCSS)(blockElementStyles[element], {
                  selector: scopeSelector(
                    baseElementSelector,
                    import_blocks114.__EXPERIMENTAL_ELEMENTS[element]
                  )
                })
              );
            }
          });
        }
      });
      return elementCSSRules.length > 0 ? elementCSSRules.join("") : void 0;
    }, [baseElementSelector, blockElementStyles, name]);
    useStyleOverride({ css: styles });
    return addSaveProps9(
      { className: blockElementsContainerIdentifier },
      name,
      { style },
      skipSerializationPathsEdit
    );
  }
  (0, import_hooks26.addFilter)(
    "blocks.registerBlockType",
    "core/style/addAttribute",
    addAttribute7
  );

  // packages/block-editor/build-module/hooks/settings.mjs
  var import_hooks27 = __toESM(require_hooks(), 1);
  var import_blocks115 = __toESM(require_blocks(), 1);
  var hasSettingsSupport = (blockType) => (0, import_blocks115.hasBlockSupport)(blockType, "__experimentalSettings", false);
  function addAttribute8(settings2) {
    if (!hasSettingsSupport(settings2)) {
      return settings2;
    }
    if (!settings2?.attributes?.settings) {
      settings2.attributes = {
        ...settings2.attributes,
        settings: {
          type: "object"
        }
      };
    }
    return settings2;
  }
  (0, import_hooks27.addFilter)(
    "blocks.registerBlockType",
    "core/settings/addAttribute",
    addAttribute8
  );

  // packages/block-editor/build-module/hooks/duotone.mjs
  var import_blocks116 = __toESM(require_blocks(), 1);
  var import_compose103 = __toESM(require_compose(), 1);
  var import_hooks28 = __toESM(require_hooks(), 1);
  var import_element266 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/duotone/utils.mjs
  function getValuesFromColors(colors2 = []) {
    const values = { r: [], g: [], b: [], a: [] };
    colors2.forEach((color) => {
      const rgbColor = w(color).toRgb();
      values.r.push(rgbColor.r / 255);
      values.g.push(rgbColor.g / 255);
      values.b.push(rgbColor.b / 255);
      values.a.push(rgbColor.a);
    });
    return values;
  }
  function getDuotoneUnsetStylesheet(selector3) {
    return `${selector3}{filter:none}`;
  }
  function getDuotoneStylesheet(selector3, id) {
    return `${selector3}{filter:url(#${id})}`;
  }
  function getDuotoneFilter(id, colors2) {
    const values = getValuesFromColors(colors2);
    return `
<svg
	xmlns:xlink="http://www.w3.org/1999/xlink"
	viewBox="0 0 0 0"
	width="0"
	height="0"
	focusable="false"
	role="none"
	aria-hidden="true"
	style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
>
	<defs>
		<filter id="${id}">
			<!--
				Use sRGB instead of linearRGB so transparency looks correct.
				Use perceptual brightness to convert to grayscale.
			-->
			<feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix>
			<!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. -->
			<feComponentTransfer color-interpolation-filters="sRGB">
				<feFuncR type="table" tableValues="${values.r.join(" ")}"></feFuncR>
				<feFuncG type="table" tableValues="${values.g.join(" ")}"></feFuncG>
				<feFuncB type="table" tableValues="${values.b.join(" ")}"></feFuncB>
				<feFuncA type="table" tableValues="${values.a.join(" ")}"></feFuncA>
			</feComponentTransfer>
			<!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. -->
			<feComposite in2="SourceGraphic" operator="in"></feComposite>
		</filter>
	</defs>
</svg>`;
  }

  // packages/block-editor/build-module/hooks/duotone.mjs
  var import_jsx_runtime453 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_ARRAY17 = [];
  var isSafari = window?.navigator.userAgent && window.navigator.userAgent.includes("Safari") && !window.navigator.userAgent.includes("Chrome") && !window.navigator.userAgent.includes("Chromium");
  k([names_default]);
  function useMultiOriginPresets({ presetSetting, defaultSetting }) {
    const [enableDefault, userPresets, themePresets, defaultPresets] = useSettings(
      defaultSetting,
      `${presetSetting}.custom`,
      `${presetSetting}.theme`,
      `${presetSetting}.default`
    );
    return (0, import_element266.useMemo)(
      () => [
        ...userPresets || EMPTY_ARRAY17,
        ...themePresets || EMPTY_ARRAY17,
        ...enableDefault && defaultPresets || EMPTY_ARRAY17
      ],
      [enableDefault, userPresets, themePresets, defaultPresets]
    );
  }
  function getColorsFromDuotonePreset(duotone, duotonePalette) {
    if (!duotone) {
      return;
    }
    const preset = duotonePalette?.find(({ slug }) => {
      return duotone === `var:preset|duotone|${slug}`;
    });
    return preset ? preset.colors : void 0;
  }
  function getDuotonePresetFromColors(colors2, duotonePalette) {
    if (!colors2 || !Array.isArray(colors2)) {
      return;
    }
    const preset = duotonePalette?.find((duotonePreset) => {
      return duotonePreset?.colors?.every(
        (val, index) => val === colors2[index]
      );
    });
    return preset ? `var:preset|duotone|${preset.slug}` : void 0;
  }
  function DuotonePanelPure({ style, setAttributes, name }) {
    const duotoneStyle = style?.color?.duotone;
    const settings2 = useBlockSettings(name);
    const blockEditingMode = useBlockEditingMode();
    const duotonePalette = useMultiOriginPresets({
      presetSetting: "color.duotone",
      defaultSetting: "color.defaultDuotone"
    });
    const colorPalette = useMultiOriginPresets({
      presetSetting: "color.palette",
      defaultSetting: "color.defaultPalette"
    });
    const [enableCustomColors, enableCustomDuotone] = useSettings(
      "color.custom",
      "color.customDuotone"
    );
    const disableCustomColors = !enableCustomColors;
    const disableCustomDuotone = !enableCustomDuotone || colorPalette?.length === 0 && disableCustomColors;
    if (duotonePalette?.length === 0 && disableCustomDuotone) {
      return null;
    }
    if (blockEditingMode !== "default") {
      return null;
    }
    const duotonePresetOrColors = duotoneStyle === "unset" || Array.isArray(duotoneStyle) ? duotoneStyle : getColorsFromDuotonePreset(duotoneStyle, duotonePalette);
    return /* @__PURE__ */ (0, import_jsx_runtime453.jsxs)(import_jsx_runtime453.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(inspector_controls_default, { group: "filter", children: /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(
        FiltersPanel,
        {
          value: { filter: { duotone: duotonePresetOrColors } },
          onChange: (newDuotone) => {
            const newStyle = {
              ...style,
              color: {
                ...newDuotone?.filter
              }
            };
            setAttributes({
              style: cleanEmptyObject(newStyle)
            });
          },
          settings: settings2
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(block_controls_default, { group: "block", __experimentalShareWithChildBlocks: true, children: /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(
        duotone_control_default,
        {
          duotonePalette,
          colorPalette,
          disableCustomDuotone,
          disableCustomColors,
          value: duotonePresetOrColors,
          onChange: (newDuotone) => {
            const maybePreset = getDuotonePresetFromColors(
              newDuotone,
              duotonePalette
            );
            const newStyle = {
              ...style,
              color: {
                ...style?.color,
                duotone: maybePreset ?? newDuotone
                // use preset or fallback to custom colors.
              }
            };
            setAttributes({
              style: cleanEmptyObject(newStyle)
            });
          },
          settings: settings2
        }
      ) })
    ] });
  }
  var duotone_default = {
    shareWithChildBlocks: true,
    edit: DuotonePanelPure,
    useBlockProps: useBlockProps14,
    attributeKeys: ["style"],
    hasSupport(name) {
      return (0, import_blocks116.hasBlockSupport)(name, "filter.duotone");
    }
  };
  function addDuotoneAttributes(settings2) {
    if (!(0, import_blocks116.hasBlockSupport)(settings2, "filter.duotone")) {
      return settings2;
    }
    if (!settings2.attributes.style) {
      Object.assign(settings2.attributes, {
        style: {
          type: "object"
        }
      });
    }
    return settings2;
  }
  function useDuotoneStyles({
    clientId,
    id: filterId,
    selector: duotoneSelector,
    attribute: duotoneAttr
  }) {
    const duotonePalette = useMultiOriginPresets({
      presetSetting: "color.duotone",
      defaultSetting: "color.defaultDuotone"
    });
    const isCustom = Array.isArray(duotoneAttr);
    const duotonePreset = isCustom ? void 0 : getColorsFromDuotonePreset(duotoneAttr, duotonePalette);
    const isPreset = typeof duotoneAttr === "string" && duotonePreset;
    const isCSS = typeof duotoneAttr === "string" && !isPreset;
    let colors2 = null;
    if (isPreset) {
      colors2 = duotonePreset;
    } else if (isCSS) {
      colors2 = duotoneAttr;
    } else if (isCustom) {
      colors2 = duotoneAttr;
    }
    const selectors = duotoneSelector.split(",");
    const selectorsScoped = selectors.map((selectorPart) => {
      return `.${filterId}${selectorPart.trim()}`;
    });
    const selector3 = selectorsScoped.join(", ");
    const isValidFilter = Array.isArray(colors2) || colors2 === "unset";
    usePrivateStyleOverride(
      isValidFilter ? {
        css: colors2 !== "unset" ? getDuotoneStylesheet(selector3, filterId) : getDuotoneUnsetStylesheet(selector3),
        __unstableType: "presets"
      } : void 0
    );
    usePrivateStyleOverride(
      isValidFilter ? {
        assets: colors2 !== "unset" ? getDuotoneFilter(filterId, colors2) : "",
        __unstableType: "svgs"
      } : void 0
    );
    const blockElement = useBlockElement(clientId);
    (0, import_element266.useEffect)(() => {
      if (!isValidFilter) {
        return;
      }
      if (blockElement && isSafari) {
        const display = blockElement.style.display;
        blockElement.style.setProperty("display", "inline-block");
        blockElement.offsetHeight;
        blockElement.style.setProperty("display", display);
      }
    }, [isValidFilter, blockElement, colors2]);
  }
  var DUOTONE_BLOCK_PROPS_REFERENCE = {};
  function useBlockProps14({ clientId, name, style }) {
    const id = (0, import_compose103.useInstanceId)(DUOTONE_BLOCK_PROPS_REFERENCE);
    const selector3 = (0, import_element266.useMemo)(() => {
      const blockType = (0, import_blocks116.getBlockType)(name);
      if (blockType) {
        const duotoneSupport = (0, import_blocks116.getBlockSupport)(
          blockType,
          "filter.duotone",
          false
        );
        if (!duotoneSupport) {
          return null;
        }
        const experimentalDuotone = (0, import_blocks116.getBlockSupport)(
          blockType,
          "color.__experimentalDuotone",
          false
        );
        if (experimentalDuotone) {
          const rootSelector = getBlockSelector(blockType);
          return typeof experimentalDuotone === "string" ? scopeSelector(rootSelector, experimentalDuotone) : rootSelector;
        }
        return getBlockSelector(blockType, "filter.duotone", {
          fallback: true
        });
      }
    }, [name]);
    const attribute = style?.color?.duotone;
    const filterClass = `wp-duotone-${id}`;
    const shouldRender = selector3 && attribute;
    useDuotoneStyles({
      clientId,
      id: filterClass,
      selector: selector3,
      attribute
    });
    return {
      className: shouldRender ? filterClass : ""
    };
  }
  (0, import_hooks28.addFilter)(
    "blocks.registerBlockType",
    "core/editor/duotone/add-attributes",
    addDuotoneAttributes
  );

  // packages/block-editor/build-module/hooks/custom-css.mjs
  var import_element267 = __toESM(require_element(), 1);
  var import_data185 = __toESM(require_data(), 1);
  var import_compose104 = __toESM(require_compose(), 1);
  var import_blocks117 = __toESM(require_blocks(), 1);
  var import_i18n236 = __toESM(require_i18n(), 1);
  var import_notices12 = __toESM(require_notices(), 1);
  var import_jsx_runtime454 = __toESM(require_jsx_runtime(), 1);
  var CUSTOM_CSS_INSTANCE_REFERENCE = {};
  var EMPTY_STYLE = {};
  function CustomCSSControl({ blockName, setAttributes, style }) {
    const blockEditingMode = useBlockEditingMode();
    if (blockEditingMode !== "default") {
      return null;
    }
    const blockType = (0, import_blocks117.getBlockType)(blockName);
    function onChange(newStyle) {
      const css = newStyle?.css?.trim() ? newStyle.css : void 0;
      setAttributes({
        style: cleanEmptyObject({ ...newStyle, css })
      });
    }
    const cssHelpText = (0, import_i18n236.sprintf)(
      // translators: %s: is the name of a block e.g., 'Image' or 'Quote'.
      (0, import_i18n236.__)(
        "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, e.g. color: red;."
      ),
      blockType?.title
    );
    return /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(inspector_controls_default, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(
      AdvancedPanel,
      {
        value: style,
        onChange,
        inheritedValue: style,
        help: cssHelpText
      }
    ) });
  }
  var CUSTOM_CSS_WARNING_NOTICE_ID = "custom-css-edit-warning";
  function CustomCSSEdit({ clientId, name, setAttributes }) {
    const { style, canEditCSS } = (0, import_data185.useSelect)(
      (select3) => {
        const { getBlockAttributes: getBlockAttributes3, getSettings: getSettings7 } = select3(store);
        return {
          style: getBlockAttributes3(clientId)?.style || EMPTY_STYLE,
          canEditCSS: getSettings7().canEditCSS
        };
      },
      [clientId]
    );
    if (!canEditCSS) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(
      CustomCSSControl,
      {
        blockName: name,
        setAttributes,
        style
      }
    );
  }
  function useBlockProps15({ style }) {
    const customCSS = style?.css;
    const isValidCSS = typeof customCSS === "string" && customCSS.trim().length > 0 && validateCSS(customCSS);
    const canEditCSS = (0, import_data185.useSelect)(
      (select3) => select3(store).getSettings().canEditCSS,
      []
    );
    const { createWarningNotice } = (0, import_data185.useDispatch)(import_notices12.store);
    const hasCustomCSS = !!customCSS?.trim();
    (0, import_element267.useEffect)(() => {
      if (!canEditCSS && hasCustomCSS) {
        createWarningNotice(
          (0, import_i18n236.__)(
            "This post contains blocks with custom CSS. You do not have permission to edit CSS. If you save this post, the custom CSS will be removed."
          ),
          {
            id: CUSTOM_CSS_WARNING_NOTICE_ID,
            isDismissible: true
          }
        );
      }
    }, [canEditCSS, hasCustomCSS, createWarningNotice]);
    const customCSSIdentifier = (0, import_compose104.useInstanceId)(
      CUSTOM_CSS_INSTANCE_REFERENCE,
      "wp-custom-css"
    );
    const customCSSSelector = `.${customCSSIdentifier}`;
    const transformedCSS = (0, import_element267.useMemo)(() => {
      if (!isValidCSS) {
        return void 0;
      }
      return processCSSNesting(customCSS, customCSSSelector);
    }, [customCSS, customCSSSelector, isValidCSS]);
    useStyleOverride({ css: transformedCSS });
    if (!isValidCSS) {
      return {};
    }
    return {
      className: `has-custom-css ${customCSSIdentifier}`
    };
  }
  function addSaveProps10(props, blockType, attributes) {
    if (!(0, import_blocks117.hasBlockSupport)(blockType, "customCSS", true)) {
      return props;
    }
    if (!attributes?.style?.css?.trim()) {
      return props;
    }
    const className = props.className ? `${props.className} has-custom-css` : "has-custom-css";
    return {
      ...props,
      className
    };
  }
  var custom_css_default = {
    edit: CustomCSSEdit,
    useBlockProps: useBlockProps15,
    addSaveProps: addSaveProps10,
    attributeKeys: ["style"],
    hasSupport(name) {
      return (0, import_blocks117.hasBlockSupport)(name, "customCSS", true);
    }
  };

  // packages/block-editor/build-module/hooks/layout.mjs
  var import_compose105 = __toESM(require_compose(), 1);
  var import_hooks29 = __toESM(require_hooks(), 1);
  var import_blocks118 = __toESM(require_blocks(), 1);
  var import_data186 = __toESM(require_data(), 1);
  var import_components266 = __toESM(require_components(), 1);
  var import_i18n237 = __toESM(require_i18n(), 1);
  var import_jsx_runtime455 = __toESM(require_jsx_runtime(), 1);
  var VARIATION_PREFIX2 = "is-style-";
  var layoutBlockSupportKey = "layout";
  var { kebabCase: kebabCase6 } = unlock(import_components266.privateApis);
  function hasLayoutBlockSupport(blockName) {
    return (0, import_blocks118.hasBlockSupport)(blockName, "layout") || (0, import_blocks118.hasBlockSupport)(blockName, "__experimentalLayout");
  }
  function useLayoutClasses(blockAttributes = {}, blockName = "") {
    const { layout } = blockAttributes;
    const { default: defaultBlockLayout } = (0, import_blocks118.getBlockSupport)(blockName, layoutBlockSupportKey) || {};
    const usedLayout = layout?.inherit || layout?.contentSize || layout?.wideSize ? { ...layout, type: "constrained" } : layout || defaultBlockLayout || {};
    const layoutClassnames = [];
    if (LAYOUT_DEFINITIONS[usedLayout?.type || "default"]?.className) {
      const baseClassName = LAYOUT_DEFINITIONS[usedLayout?.type || "default"]?.className;
      const splitBlockName = blockName.split("/");
      const fullBlockName = splitBlockName[0] === "core" ? splitBlockName.pop() : splitBlockName.join("-");
      const compoundClassName = `wp-block-${fullBlockName}-${baseClassName}`;
      layoutClassnames.push(baseClassName, compoundClassName);
    }
    const hasGlobalPadding = (0, import_data186.useSelect)(
      (select3) => {
        if (!usedLayout?.inherit && !usedLayout?.contentSize && usedLayout?.type !== "constrained") {
          return false;
        }
        return select3(store).getSettings().__experimentalFeatures?.useRootPaddingAwareAlignments;
      },
      [usedLayout?.contentSize, usedLayout?.inherit, usedLayout?.type]
    );
    if (hasGlobalPadding) {
      layoutClassnames.push("has-global-padding");
    }
    if (usedLayout?.orientation) {
      layoutClassnames.push(`is-${kebabCase6(usedLayout.orientation)}`);
    }
    if (usedLayout?.justifyContent) {
      layoutClassnames.push(
        `is-content-justification-${kebabCase6(
          usedLayout.justifyContent
        )}`
      );
    }
    if (usedLayout?.flexWrap && usedLayout.flexWrap === "nowrap") {
      layoutClassnames.push("is-nowrap");
    }
    return layoutClassnames;
  }
  function useLayoutStyles(blockAttributes = {}, blockName, selector3) {
    const { layout = {}, style = {} } = blockAttributes;
    const usedLayout = layout?.inherit || layout?.contentSize || layout?.wideSize ? { ...layout, type: "constrained" } : layout || {};
    const fullLayoutType = getLayoutType(usedLayout?.type || "default");
    const [blockGapSupport] = useSettings("spacing.blockGap");
    const hasBlockGapSupport = blockGapSupport !== null;
    return fullLayoutType?.getLayoutStyle?.({
      blockName,
      selector: selector3,
      layout,
      style,
      hasBlockGapSupport
    });
  }
  function LayoutPanelPure({
    layout,
    setAttributes,
    name: blockName,
    clientId
  }) {
    const settings2 = useBlockSettings(blockName);
    const { layout: layoutSettings } = settings2;
    const { themeSupportsLayout } = (0, import_data186.useSelect)((select3) => {
      const { getSettings: getSettings7 } = select3(store);
      return {
        themeSupportsLayout: getSettings7().supportsLayout
      };
    }, []);
    const blockEditingMode = useBlockEditingMode();
    if (blockEditingMode !== "default") {
      return null;
    }
    const layoutBlockSupport = (0, import_blocks118.getBlockSupport)(
      blockName,
      layoutBlockSupportKey,
      {}
    );
    const blockSupportAndThemeSettings = {
      ...layoutSettings,
      ...layoutBlockSupport
    };
    const {
      allowSwitching,
      allowEditing = true,
      allowInheriting = true,
      default: defaultBlockLayout
    } = blockSupportAndThemeSettings;
    if (!allowEditing) {
      return null;
    }
    const blockSupportAndLayout = {
      ...layoutBlockSupport,
      ...layout
    };
    const { type, default: { type: defaultType = "default" } = {} } = blockSupportAndLayout;
    const blockLayoutType = type || defaultType;
    const showInheritToggle = !!(allowInheriting && (!blockLayoutType || blockLayoutType === "default" || blockLayoutType === "constrained" || blockSupportAndLayout.inherit));
    const usedLayout = layout || defaultBlockLayout || {};
    const { inherit = false, contentSize = null } = usedLayout;
    if ((blockLayoutType === "default" || blockLayoutType === "constrained") && !themeSupportsLayout) {
      return null;
    }
    const layoutType = getLayoutType(blockLayoutType);
    const constrainedType = getLayoutType("constrained");
    const displayControlsForLegacyLayouts = !usedLayout.type && (contentSize || inherit);
    const hasContentSizeOrLegacySettings = !!inherit || !!contentSize;
    const onChangeType = (newType) => setAttributes({ layout: { type: newType } });
    const onChangeLayout = (newLayout) => setAttributes({ layout: newLayout });
    return /* @__PURE__ */ (0, import_jsx_runtime455.jsxs)(import_jsx_runtime455.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime455.jsx)(inspector_controls_default, { children: /* @__PURE__ */ (0, import_jsx_runtime455.jsxs)(import_components266.PanelBody, { title: (0, import_i18n237.__)("Layout"), children: [
        showInheritToggle && /* @__PURE__ */ (0, import_jsx_runtime455.jsx)(import_jsx_runtime455.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime455.jsx)(
          import_components266.ToggleControl,
          {
            label: (0, import_i18n237.__)("Inner blocks use content width"),
            checked: layoutType?.name === "constrained" || hasContentSizeOrLegacySettings,
            onChange: () => setAttributes({
              layout: {
                type: layoutType?.name === "constrained" || hasContentSizeOrLegacySettings ? "default" : "constrained"
              }
            }),
            help: layoutType?.name === "constrained" || hasContentSizeOrLegacySettings ? (0, import_i18n237.__)(
              "Nested blocks use content width with options for full and wide widths."
            ) : (0, import_i18n237.__)(
              "Nested blocks will fill the width of this container."
            )
          }
        ) }),
        !inherit && allowSwitching && /* @__PURE__ */ (0, import_jsx_runtime455.jsx)(
          LayoutTypeSwitcher,
          {
            type: blockLayoutType,
            onChange: onChangeType
          }
        ),
        layoutType && layoutType.name !== "default" && /* @__PURE__ */ (0, import_jsx_runtime455.jsx)(
          layoutType.inspectorControls,
          {
            layout: usedLayout,
            onChange: onChangeLayout,
            layoutBlockSupport: blockSupportAndThemeSettings,
            name: blockName,
            clientId
          }
        ),
        constrainedType && displayControlsForLegacyLayouts && /* @__PURE__ */ (0, import_jsx_runtime455.jsx)(
          constrainedType.inspectorControls,
          {
            layout: usedLayout,
            onChange: onChangeLayout,
            layoutBlockSupport: blockSupportAndThemeSettings,
            name: blockName,
            clientId
          }
        )
      ] }) }),
      !inherit && layoutType && /* @__PURE__ */ (0, import_jsx_runtime455.jsx)(
        layoutType.toolBarControls,
        {
          layout: usedLayout,
          onChange: onChangeLayout,
          layoutBlockSupport,
          name: blockName,
          clientId
        }
      )
    ] });
  }
  var layout_default2 = {
    shareWithChildBlocks: true,
    edit: LayoutPanelPure,
    attributeKeys: ["layout"],
    hasSupport(name) {
      return hasLayoutBlockSupport(name);
    }
  };
  function LayoutTypeSwitcher({ type, onChange }) {
    return /* @__PURE__ */ (0, import_jsx_runtime455.jsx)(
      import_components266.__experimentalToggleGroupControl,
      {
        __next40pxDefaultSize: true,
        isBlock: true,
        label: (0, import_i18n237.__)("Layout type"),
        hideLabelFromVision: true,
        isAdaptiveWidth: true,
        value: type,
        onChange,
        children: getLayoutTypes().map(({ name, label }) => {
          return /* @__PURE__ */ (0, import_jsx_runtime455.jsx)(
            import_components266.__experimentalToggleGroupControlOption,
            {
              value: name,
              label
            },
            name
          );
        })
      }
    );
  }
  function addAttribute9(settings2) {
    if ("type" in (settings2.attributes?.layout ?? {})) {
      return settings2;
    }
    if (hasLayoutBlockSupport(settings2)) {
      settings2.attributes = {
        ...settings2.attributes,
        layout: {
          type: "object"
        }
      };
    }
    return settings2;
  }
  function BlockWithLayoutStyles({
    block: BlockListBlock2,
    props,
    blockGapSupport,
    globalBlockGapValue,
    layoutClasses
  }) {
    const { name, attributes } = props;
    const id = (0, import_compose105.useInstanceId)(BlockListBlock2);
    const { layout } = attributes;
    const { default: defaultBlockLayout } = (0, import_blocks118.getBlockSupport)(name, layoutBlockSupportKey) || {};
    const usedLayout = layout?.inherit || layout?.contentSize || layout?.wideSize ? { ...layout, type: "constrained" } : layout || defaultBlockLayout || {};
    const selectorPrefix = `wp-container-${kebabCase6(name)}-is-layout-`;
    const selector3 = `.${selectorPrefix}${id}`;
    const hasBlockGapSupport = blockGapSupport !== null;
    const fullLayoutType = getLayoutType(usedLayout?.type || "default");
    const css = fullLayoutType?.getLayoutStyle?.({
      blockName: name,
      selector: selector3,
      layout: usedLayout,
      style: attributes?.style,
      hasBlockGapSupport,
      globalBlockGapValue
    });
    const layoutClassNames = clsx_default(
      {
        [`${selectorPrefix}${id}`]: !!css
        // Only attach a container class if there is generated CSS to be attached.
      },
      layoutClasses
    );
    useStyleOverride({ css });
    return /* @__PURE__ */ (0, import_jsx_runtime455.jsx)(
      BlockListBlock2,
      {
        ...props,
        __unstableLayoutClassNames: layoutClassNames
      }
    );
  }
  var withLayoutStyles = (0, import_compose105.createHigherOrderComponent)(
    (BlockListBlock2) => function WithLayoutStyles(props) {
      const { clientId, name, attributes } = props;
      const blockSupportsLayout = hasLayoutBlockSupport(name);
      const layoutClasses = useLayoutClasses(attributes, name);
      const extraProps = (0, import_data186.useSelect)(
        (select3) => {
          if (!blockSupportsLayout) {
            return;
          }
          const { getSettings: getSettings7, getBlockSettings: getBlockSettings2 } = unlock(
            select3(store)
          );
          const settings2 = getSettings7();
          const { disableLayoutStyles } = settings2;
          if (disableLayoutStyles) {
            return;
          }
          const [blockGapSupport] = getBlockSettings2(
            clientId,
            "spacing.blockGap"
          );
          const globalStyles = settings2[globalStylesDataKey];
          let variationBlockGapValue;
          const className = attributes?.className;
          if (className?.includes(VARIATION_PREFIX2)) {
            const { getBlockStyles: getBlockStyles2 } = select3(import_blocks118.store);
            const registeredStyles = getBlockStyles2(name);
            const variationName = getVariationNameFromClass(
              className,
              registeredStyles
            );
            variationBlockGapValue = variationName ? globalStyles?.blocks?.[name]?.variations?.[variationName]?.spacing?.blockGap : void 0;
          }
          const globalBlockGapValue = variationBlockGapValue ?? globalStyles?.blocks?.[name]?.spacing?.blockGap ?? globalStyles?.spacing?.blockGap;
          return { blockGapSupport, globalBlockGapValue };
        },
        [blockSupportsLayout, clientId, attributes?.className, name]
      );
      if (!extraProps) {
        return /* @__PURE__ */ (0, import_jsx_runtime455.jsx)(
          BlockListBlock2,
          {
            ...props,
            __unstableLayoutClassNames: blockSupportsLayout ? layoutClasses : void 0
          }
        );
      }
      return /* @__PURE__ */ (0, import_jsx_runtime455.jsx)(
        BlockWithLayoutStyles,
        {
          block: BlockListBlock2,
          props,
          layoutClasses,
          ...extraProps
        }
      );
    },
    "withLayoutStyles"
  );
  (0, import_hooks29.addFilter)(
    "blocks.registerBlockType",
    "core/layout/addAttribute",
    addAttribute9
  );
  (0, import_hooks29.addFilter)(
    "editor.BlockListBlock",
    "core/editor/layout/with-layout-styles",
    withLayoutStyles
  );

  // packages/block-editor/build-module/hooks/layout-child.mjs
  var import_compose109 = __toESM(require_compose(), 1);
  var import_data190 = __toESM(require_data(), 1);
  var import_element271 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/grid/grid-visualizer.mjs
  var import_element268 = __toESM(require_element(), 1);
  var import_data187 = __toESM(require_data(), 1);
  var import_compose106 = __toESM(require_compose(), 1);

  // packages/block-editor/build-module/components/grid/utils.mjs
  function range(start2, length) {
    return Array.from({ length }, (_, i2) => start2 + i2);
  }
  var GridRect = class {
    constructor({
      columnStart,
      rowStart,
      columnEnd,
      rowEnd,
      columnSpan,
      rowSpan
    } = {}) {
      this.columnStart = columnStart ?? 1;
      this.rowStart = rowStart ?? 1;
      if (columnSpan !== void 0) {
        this.columnEnd = this.columnStart + columnSpan - 1;
      } else {
        this.columnEnd = columnEnd ?? this.columnStart;
      }
      if (rowSpan !== void 0) {
        this.rowEnd = this.rowStart + rowSpan - 1;
      } else {
        this.rowEnd = rowEnd ?? this.rowStart;
      }
    }
    get columnSpan() {
      return this.columnEnd - this.columnStart + 1;
    }
    get rowSpan() {
      return this.rowEnd - this.rowStart + 1;
    }
    contains(column, row) {
      return column >= this.columnStart && column <= this.columnEnd && row >= this.rowStart && row <= this.rowEnd;
    }
    containsRect(rect) {
      return this.contains(rect.columnStart, rect.rowStart) && this.contains(rect.columnEnd, rect.rowEnd);
    }
    intersectsRect(rect) {
      return this.columnStart <= rect.columnEnd && this.columnEnd >= rect.columnStart && this.rowStart <= rect.rowEnd && this.rowEnd >= rect.rowStart;
    }
  };
  function getComputedCSS2(element, property) {
    return element.ownerDocument.defaultView.getComputedStyle(element).getPropertyValue(property);
  }
  function getGridTracks(template2, gap) {
    const tracks = [];
    for (const size of template2.split(" ")) {
      const previousTrack = tracks[tracks.length - 1];
      const start2 = previousTrack ? previousTrack.end + gap : 0;
      const end = start2 + parseFloat(size);
      tracks.push({ start: start2, end });
    }
    return tracks;
  }
  function getClosestTrack(tracks, position, edge = "start") {
    return tracks.reduce(
      (closest, track, index) => Math.abs(track[edge] - position) < Math.abs(tracks[closest][edge] - position) ? index : closest,
      0
    );
  }
  function getGridRect(gridElement, rect) {
    const columnGap = parseFloat(getComputedCSS2(gridElement, "column-gap"));
    const rowGap = parseFloat(getComputedCSS2(gridElement, "row-gap"));
    const gridColumnTracks = getGridTracks(
      getComputedCSS2(gridElement, "grid-template-columns"),
      columnGap
    );
    const gridRowTracks = getGridTracks(
      getComputedCSS2(gridElement, "grid-template-rows"),
      rowGap
    );
    const columnStart = getClosestTrack(gridColumnTracks, rect.left) + 1;
    const rowStart = getClosestTrack(gridRowTracks, rect.top) + 1;
    const columnEnd = getClosestTrack(gridColumnTracks, rect.right, "end") + 1;
    const rowEnd = getClosestTrack(gridRowTracks, rect.bottom, "end") + 1;
    return new GridRect({
      columnStart,
      columnEnd,
      rowStart,
      rowEnd
    });
  }
  function getGridItemRect(gridItemElement) {
    return getGridRect(
      gridItemElement.parentElement,
      new window.DOMRect(
        gridItemElement.offsetLeft,
        gridItemElement.offsetTop,
        gridItemElement.offsetWidth,
        gridItemElement.offsetHeight
      )
    );
  }
  function getGridInfo(gridElement) {
    const gridTemplateColumns = getComputedCSS2(
      gridElement,
      "grid-template-columns"
    );
    const gridTemplateRows = getComputedCSS2(
      gridElement,
      "grid-template-rows"
    );
    const borderTopWidth = getComputedCSS2(gridElement, "border-top-width");
    const borderRightWidth = getComputedCSS2(
      gridElement,
      "border-right-width"
    );
    const borderBottomWidth = getComputedCSS2(
      gridElement,
      "border-bottom-width"
    );
    const borderLeftWidth = getComputedCSS2(gridElement, "border-left-width");
    const paddingTop = getComputedCSS2(gridElement, "padding-top");
    const paddingRight = getComputedCSS2(gridElement, "padding-right");
    const paddingBottom = getComputedCSS2(gridElement, "padding-bottom");
    const paddingLeft = getComputedCSS2(gridElement, "padding-left");
    const numColumns = gridTemplateColumns.split(" ").length;
    const numRows = gridTemplateRows.split(" ").length;
    const numItems = numColumns * numRows;
    return {
      numColumns,
      numRows,
      numItems,
      currentColor: getComputedCSS2(gridElement, "color"),
      style: {
        gridTemplateColumns,
        gridTemplateRows,
        gap: getComputedCSS2(gridElement, "gap"),
        inset: `
				calc(${paddingTop} + ${borderTopWidth})
				calc(${paddingRight} + ${borderRightWidth})
				calc(${paddingBottom} + ${borderBottomWidth})
				calc(${paddingLeft} + ${borderLeftWidth})
			`
      }
    };
  }

  // packages/block-editor/build-module/components/grid/grid-visualizer.mjs
  var import_jsx_runtime456 = __toESM(require_jsx_runtime(), 1);
  function GridVisualizer({
    clientId,
    contentRef,
    parentLayout,
    childGridClientId
  }) {
    const isDistractionFree = (0, import_data187.useSelect)(
      (select3) => select3(store).getSettings().isDistractionFree,
      []
    );
    const gridElement = useBlockElement(clientId);
    if (isDistractionFree || !gridElement) {
      return null;
    }
    const isManualGrid = parentLayout?.isManualPlacement && window.__experimentalEnableGridInteractivity;
    return /* @__PURE__ */ (0, import_jsx_runtime456.jsx)(
      GridVisualizerGrid,
      {
        gridClientId: clientId,
        gridElement,
        isManualGrid,
        ref: contentRef,
        childGridClientId
      }
    );
  }
  var GridVisualizerGrid = (0, import_element268.forwardRef)(
    ({ gridClientId, gridElement, isManualGrid, childGridClientId }, ref) => {
      const [gridInfo, setGridInfo] = (0, import_element268.useState)(
        () => getGridInfo(gridElement)
      );
      const [isDroppingAllowed, setIsDroppingAllowed] = (0, import_element268.useState)(false);
      const childGridElement = useBlockElement(childGridClientId);
      const childGridRect = (0, import_element268.useMemo)(() => {
        if (!childGridElement) {
          return null;
        }
        return getGridItemRect(childGridElement);
      }, [childGridElement]);
      (0, import_element268.useEffect)(() => {
        const resizeCallback = () => setGridInfo(getGridInfo(gridElement));
        const borderBoxSpy = new window.ResizeObserver(resizeCallback);
        borderBoxSpy.observe(gridElement, { box: "border-box" });
        const contentBoxSpy = new window.ResizeObserver(resizeCallback);
        contentBoxSpy.observe(gridElement);
        return () => {
          borderBoxSpy.disconnect();
          contentBoxSpy.disconnect();
        };
      }, [gridElement]);
      (0, import_element268.useEffect)(() => {
        function onGlobalDrag() {
          setIsDroppingAllowed(true);
        }
        function onGlobalDragEnd() {
          setIsDroppingAllowed(false);
        }
        document.addEventListener("drag", onGlobalDrag);
        document.addEventListener("dragend", onGlobalDragEnd);
        return () => {
          document.removeEventListener("drag", onGlobalDrag);
          document.removeEventListener("dragend", onGlobalDragEnd);
        };
      }, []);
      return /* @__PURE__ */ (0, import_jsx_runtime456.jsx)(
        cover_default,
        {
          className: clsx_default("block-editor-grid-visualizer", {
            "is-dropping-allowed": isDroppingAllowed
          }),
          clientId: gridClientId,
          __unstablePopoverSlot: "__unstable-block-tools-after",
          children: /* @__PURE__ */ (0, import_jsx_runtime456.jsx)(
            "div",
            {
              ref,
              className: "block-editor-grid-visualizer__grid",
              style: gridInfo.style,
              children: isManualGrid ? /* @__PURE__ */ (0, import_jsx_runtime456.jsx)(
                ManualGridVisualizer,
                {
                  gridClientId,
                  gridInfo,
                  childGridRect
                }
              ) : /* @__PURE__ */ (0, import_jsx_runtime456.jsx)(
                AutoGridVisualizer,
                {
                  gridInfo,
                  childGridRect
                }
              )
            }
          )
        }
      );
    }
  );
  function AutoGridVisualizer({ gridInfo, childGridRect }) {
    return range(1, gridInfo.numRows).map(
      (row) => range(1, gridInfo.numColumns).map((column) => {
        let color = gridInfo.currentColor;
        if (childGridRect?.contains(column, row)) {
          color = "transparent";
        }
        return /* @__PURE__ */ (0, import_jsx_runtime456.jsx)(
          GridVisualizerCell,
          {
            color
          },
          `${row}-${column}`
        );
      })
    );
  }
  function ManualGridVisualizer({ gridClientId, gridInfo, childGridRect }) {
    const [highlightedRect, setHighlightedRect] = (0, import_element268.useState)(null);
    const gridItemStyles = (0, import_data187.useSelect)(
      (select3) => {
        const { getBlockOrder: getBlockOrder2, getBlockStyles: getBlockStyles2 } = unlock(
          select3(store)
        );
        const blockOrder = getBlockOrder2(gridClientId);
        return getBlockStyles2(blockOrder);
      },
      [gridClientId]
    );
    const occupiedRects = (0, import_element268.useMemo)(() => {
      const rects = [];
      for (const style of Object.values(gridItemStyles)) {
        const {
          columnStart,
          rowStart,
          columnSpan = 1,
          rowSpan = 1
        } = style?.layout ?? {};
        if (!columnStart || !rowStart) {
          continue;
        }
        rects.push(
          new GridRect({
            columnStart,
            rowStart,
            columnSpan,
            rowSpan
          })
        );
      }
      return rects;
    }, [gridItemStyles]);
    return range(1, gridInfo.numRows).map(
      (row) => range(1, gridInfo.numColumns).map((column) => {
        const isChildGridCell = childGridRect?.contains(column, row);
        let color = gridInfo.currentColor;
        if (isChildGridCell) {
          color = "transparent";
        }
        const isCellOccupied = occupiedRects.some(
          (rect) => rect.contains(column, row)
        );
        const isHighlighted = highlightedRect?.contains(column, row) ?? false;
        return /* @__PURE__ */ (0, import_jsx_runtime456.jsx)(
          GridVisualizerCell,
          {
            color,
            className: isHighlighted && "is-highlighted",
            children: isCellOccupied && !isChildGridCell ? /* @__PURE__ */ (0, import_jsx_runtime456.jsx)(
              GridVisualizerDropZone,
              {
                column,
                row,
                gridClientId,
                gridInfo,
                setHighlightedRect
              }
            ) : /* @__PURE__ */ (0, import_jsx_runtime456.jsx)(
              GridVisualizerAppender,
              {
                column,
                row,
                gridClientId,
                gridInfo,
                setHighlightedRect
              }
            )
          },
          `${row}-${column}`
        );
      })
    );
  }
  function GridVisualizerCell({ color, children, className }) {
    return /* @__PURE__ */ (0, import_jsx_runtime456.jsx)(
      "div",
      {
        className: clsx_default(
          "block-editor-grid-visualizer__cell",
          className
        ),
        style: {
          boxShadow: `inset 0 0 0 1px color-mix(in srgb, ${color} 20%, #0000)`,
          color
        },
        children
      }
    );
  }
  function useGridVisualizerDropZone(column, row, gridClientId, gridInfo, setHighlightedRect) {
    const {
      getBlockAttributes: getBlockAttributes3,
      getBlockRootClientId: getBlockRootClientId2,
      canInsertBlockType: canInsertBlockType2,
      getBlockName: getBlockName2
    } = (0, import_data187.useSelect)(store);
    const {
      updateBlockAttributes: updateBlockAttributes2,
      moveBlocksToPosition: moveBlocksToPosition2,
      __unstableMarkNextChangeAsNotPersistent: __unstableMarkNextChangeAsNotPersistent2
    } = (0, import_data187.useDispatch)(store);
    const getNumberOfBlocksBeforeCell = useGetNumberOfBlocksBeforeCell(
      gridClientId,
      gridInfo.numColumns
    );
    return useDropZoneWithValidation({
      validateDrag(srcClientId) {
        const blockName = getBlockName2(srcClientId);
        if (!canInsertBlockType2(blockName, gridClientId)) {
          return false;
        }
        const attributes = getBlockAttributes3(srcClientId);
        const rect = new GridRect({
          columnStart: column,
          rowStart: row,
          columnSpan: attributes.style?.layout?.columnSpan,
          rowSpan: attributes.style?.layout?.rowSpan
        });
        const isInBounds = new GridRect({
          columnSpan: gridInfo.numColumns,
          rowSpan: gridInfo.numRows
        }).containsRect(rect);
        return isInBounds;
      },
      onDragEnter(srcClientId) {
        const attributes = getBlockAttributes3(srcClientId);
        setHighlightedRect(
          new GridRect({
            columnStart: column,
            rowStart: row,
            columnSpan: attributes.style?.layout?.columnSpan,
            rowSpan: attributes.style?.layout?.rowSpan
          })
        );
      },
      onDragLeave() {
        setHighlightedRect(
          (prevHighlightedRect) => prevHighlightedRect?.columnStart === column && prevHighlightedRect?.rowStart === row ? null : prevHighlightedRect
        );
      },
      onDrop(srcClientId) {
        setHighlightedRect(null);
        const attributes = getBlockAttributes3(srcClientId);
        updateBlockAttributes2(srcClientId, {
          style: {
            ...attributes.style,
            layout: {
              ...attributes.style?.layout,
              columnStart: column,
              rowStart: row
            }
          }
        });
        __unstableMarkNextChangeAsNotPersistent2();
        moveBlocksToPosition2(
          [srcClientId],
          getBlockRootClientId2(srcClientId),
          gridClientId,
          getNumberOfBlocksBeforeCell(column, row)
        );
      }
    });
  }
  function GridVisualizerDropZone({
    column,
    row,
    gridClientId,
    gridInfo,
    setHighlightedRect
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime456.jsx)(
      "div",
      {
        className: "block-editor-grid-visualizer__drop-zone",
        ref: useGridVisualizerDropZone(
          column,
          row,
          gridClientId,
          gridInfo,
          setHighlightedRect
        )
      }
    );
  }
  function GridVisualizerAppender({
    column,
    row,
    gridClientId,
    gridInfo,
    setHighlightedRect
  }) {
    const {
      updateBlockAttributes: updateBlockAttributes2,
      moveBlocksToPosition: moveBlocksToPosition2,
      __unstableMarkNextChangeAsNotPersistent: __unstableMarkNextChangeAsNotPersistent2
    } = (0, import_data187.useDispatch)(store);
    const getNumberOfBlocksBeforeCell = useGetNumberOfBlocksBeforeCell(
      gridClientId,
      gridInfo.numColumns
    );
    return /* @__PURE__ */ (0, import_jsx_runtime456.jsx)(
      button_block_appender_default,
      {
        rootClientId: gridClientId,
        className: "block-editor-grid-visualizer__appender",
        ref: useGridVisualizerDropZone(
          column,
          row,
          gridClientId,
          gridInfo,
          setHighlightedRect
        ),
        style: {
          color: gridInfo.currentColor
        },
        onSelect: (block) => {
          if (!block) {
            return;
          }
          updateBlockAttributes2(block.clientId, {
            style: {
              layout: {
                columnStart: column,
                rowStart: row
              }
            }
          });
          __unstableMarkNextChangeAsNotPersistent2();
          moveBlocksToPosition2(
            [block.clientId],
            gridClientId,
            gridClientId,
            getNumberOfBlocksBeforeCell(column, row)
          );
        }
      }
    );
  }
  function useDropZoneWithValidation({
    validateDrag,
    onDragEnter,
    onDragLeave,
    onDrop
  }) {
    const { getDraggedBlockClientIds: getDraggedBlockClientIds2 } = (0, import_data187.useSelect)(store);
    return (0, import_compose106.__experimentalUseDropZone)({
      onDragEnter() {
        const [srcClientId] = getDraggedBlockClientIds2();
        if (srcClientId && validateDrag(srcClientId)) {
          onDragEnter(srcClientId);
        }
      },
      onDragLeave() {
        onDragLeave();
      },
      onDrop() {
        const [srcClientId] = getDraggedBlockClientIds2();
        if (srcClientId && validateDrag(srcClientId)) {
          onDrop(srcClientId);
        }
      }
    });
  }

  // packages/block-editor/build-module/components/grid/grid-item-resizer.mjs
  var import_components268 = __toESM(require_components(), 1);
  var import_element269 = __toESM(require_element(), 1);
  var import_jsx_runtime457 = __toESM(require_jsx_runtime(), 1);
  function GridItemResizer({
    clientId,
    bounds,
    onChange,
    parentLayout
  }) {
    const blockElement = useBlockElement(clientId);
    const rootBlockElement = blockElement?.parentElement;
    const { isManualPlacement } = parentLayout;
    if (!blockElement || !rootBlockElement) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime457.jsx)(
      GridItemResizerInner,
      {
        clientId,
        bounds,
        blockElement,
        rootBlockElement,
        onChange,
        isManualGrid: isManualPlacement && window.__experimentalEnableGridInteractivity
      }
    );
  }
  function GridItemResizerInner({
    clientId,
    bounds,
    blockElement,
    rootBlockElement,
    onChange,
    isManualGrid
  }) {
    const [resizeDirection, setResizeDirection] = (0, import_element269.useState)(null);
    const [enableSide, setEnableSide] = (0, import_element269.useState)({
      top: false,
      bottom: false,
      left: false,
      right: false
    });
    (0, import_element269.useEffect)(() => {
      const observer = new window.ResizeObserver(() => {
        const blockClientRect = blockElement.getBoundingClientRect();
        const rootBlockClientRect = rootBlockElement.getBoundingClientRect();
        const topAvailable = blockClientRect.top > rootBlockClientRect.top;
        const bottomAvailable = blockClientRect.bottom < rootBlockClientRect.bottom;
        const leftAvailable = blockClientRect.left > rootBlockClientRect.left;
        const rightAvailable = blockClientRect.right < rootBlockClientRect.right;
        setEnableSide({
          top: !!isManualGrid ? topAvailable : !bottomAvailable && topAvailable,
          bottom: bottomAvailable,
          left: !!isManualGrid ? leftAvailable : !rightAvailable && leftAvailable,
          right: rightAvailable
        });
      });
      observer.observe(blockElement);
      return () => observer.disconnect();
    }, [blockElement, rootBlockElement, isManualGrid]);
    const justification = {
      right: "left",
      left: "right"
    };
    const alignment = {
      top: "flex-end",
      bottom: "flex-start"
    };
    const styles = {
      display: "flex",
      justifyContent: "center",
      alignItems: "center",
      ...justification[resizeDirection] && {
        justifyContent: justification[resizeDirection]
      },
      ...alignment[resizeDirection] && {
        alignItems: alignment[resizeDirection]
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime457.jsx)(
      cover_default,
      {
        className: "block-editor-grid-item-resizer",
        clientId,
        __unstablePopoverSlot: "__unstable-block-tools-after",
        additionalStyles: styles,
        children: /* @__PURE__ */ (0, import_jsx_runtime457.jsx)(
          import_components268.ResizableBox,
          {
            className: "block-editor-grid-item-resizer__box",
            size: {
              width: "100%",
              height: "100%"
            },
            enable: {
              bottom: enableSide.bottom,
              bottomLeft: false,
              bottomRight: false,
              left: enableSide.left,
              right: enableSide.right,
              top: enableSide.top,
              topLeft: false,
              topRight: false
            },
            bounds,
            boundsByDirection: true,
            onPointerDown: ({ target, pointerId }) => {
              target.setPointerCapture(pointerId);
            },
            onResizeStart: (event, direction) => {
              setResizeDirection(direction);
            },
            onResizeStop: (event, direction, boxElement) => {
              const columnGap = parseFloat(
                getComputedCSS2(rootBlockElement, "column-gap")
              );
              const rowGap = parseFloat(
                getComputedCSS2(rootBlockElement, "row-gap")
              );
              const gridColumnTracks = getGridTracks(
                getComputedCSS2(
                  rootBlockElement,
                  "grid-template-columns"
                ),
                columnGap
              );
              const gridRowTracks = getGridTracks(
                getComputedCSS2(
                  rootBlockElement,
                  "grid-template-rows"
                ),
                rowGap
              );
              const rect = new window.DOMRect(
                blockElement.offsetLeft + boxElement.offsetLeft,
                blockElement.offsetTop + boxElement.offsetTop,
                boxElement.offsetWidth,
                boxElement.offsetHeight
              );
              const columnStart = getClosestTrack(gridColumnTracks, rect.left) + 1;
              const rowStart = getClosestTrack(gridRowTracks, rect.top) + 1;
              const columnEnd = getClosestTrack(gridColumnTracks, rect.right, "end") + 1;
              const rowEnd = getClosestTrack(gridRowTracks, rect.bottom, "end") + 1;
              onChange({
                columnSpan: columnEnd - columnStart + 1,
                rowSpan: rowEnd - rowStart + 1,
                columnStart: isManualGrid ? columnStart : void 0,
                rowStart: isManualGrid ? rowStart : void 0
              });
            }
          }
        )
      }
    );
  }

  // packages/block-editor/build-module/components/grid/grid-item-movers.mjs
  var import_i18n238 = __toESM(require_i18n(), 1);
  var import_components269 = __toESM(require_components(), 1);
  var import_data188 = __toESM(require_data(), 1);
  var import_compose107 = __toESM(require_compose(), 1);
  var import_jsx_runtime458 = __toESM(require_jsx_runtime(), 1);
  function GridItemMovers({
    layout,
    parentLayout,
    onChange,
    gridClientId,
    blockClientId
  }) {
    const { moveBlocksToPosition: moveBlocksToPosition2, __unstableMarkNextChangeAsNotPersistent: __unstableMarkNextChangeAsNotPersistent2 } = (0, import_data188.useDispatch)(store);
    const columnStart = layout?.columnStart ?? 1;
    const rowStart = layout?.rowStart ?? 1;
    const columnSpan = layout?.columnSpan ?? 1;
    const rowSpan = layout?.rowSpan ?? 1;
    const columnEnd = columnStart + columnSpan - 1;
    const rowEnd = rowStart + rowSpan - 1;
    const columnCount = parentLayout?.columnCount;
    const rowCount = parentLayout?.rowCount;
    const getNumberOfBlocksBeforeCell = useGetNumberOfBlocksBeforeCell(
      gridClientId,
      columnCount
    );
    return /* @__PURE__ */ (0, import_jsx_runtime458.jsx)(block_controls_default, { group: "parent", children: /* @__PURE__ */ (0, import_jsx_runtime458.jsxs)(import_components269.ToolbarGroup, { className: "block-editor-grid-item-mover__move-button-container", children: [
      /* @__PURE__ */ (0, import_jsx_runtime458.jsx)("div", { className: "block-editor-grid-item-mover__move-horizontal-button-container is-left", children: /* @__PURE__ */ (0, import_jsx_runtime458.jsx)(
        GridItemMover,
        {
          icon: (0, import_i18n238.isRTL)() ? chevron_right_default : chevron_left_default,
          label: (0, import_i18n238.__)("Move left"),
          description: (0, import_i18n238.__)("Move left"),
          isDisabled: columnStart <= 1,
          onClick: () => {
            onChange({
              columnStart: columnStart - 1
            });
            __unstableMarkNextChangeAsNotPersistent2();
            moveBlocksToPosition2(
              [blockClientId],
              gridClientId,
              gridClientId,
              getNumberOfBlocksBeforeCell(
                columnStart - 1,
                rowStart
              )
            );
          }
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime458.jsxs)("div", { className: "block-editor-grid-item-mover__move-vertical-button-container", children: [
        /* @__PURE__ */ (0, import_jsx_runtime458.jsx)(
          GridItemMover,
          {
            className: "is-up-button",
            icon: chevron_up_default,
            label: (0, import_i18n238.__)("Move up"),
            description: (0, import_i18n238.__)("Move up"),
            isDisabled: rowStart <= 1,
            onClick: () => {
              onChange({
                rowStart: rowStart - 1
              });
              __unstableMarkNextChangeAsNotPersistent2();
              moveBlocksToPosition2(
                [blockClientId],
                gridClientId,
                gridClientId,
                getNumberOfBlocksBeforeCell(
                  columnStart,
                  rowStart - 1
                )
              );
            }
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime458.jsx)(
          GridItemMover,
          {
            className: "is-down-button",
            icon: chevron_down_default,
            label: (0, import_i18n238.__)("Move down"),
            description: (0, import_i18n238.__)("Move down"),
            isDisabled: rowCount && rowEnd >= rowCount,
            onClick: () => {
              onChange({
                rowStart: rowStart + 1
              });
              __unstableMarkNextChangeAsNotPersistent2();
              moveBlocksToPosition2(
                [blockClientId],
                gridClientId,
                gridClientId,
                getNumberOfBlocksBeforeCell(
                  columnStart,
                  rowStart + 1
                )
              );
            }
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime458.jsx)("div", { className: "block-editor-grid-item-mover__move-horizontal-button-container is-right", children: /* @__PURE__ */ (0, import_jsx_runtime458.jsx)(
        GridItemMover,
        {
          icon: (0, import_i18n238.isRTL)() ? chevron_left_default : chevron_right_default,
          label: (0, import_i18n238.__)("Move right"),
          description: (0, import_i18n238.__)("Move right"),
          isDisabled: columnCount && columnEnd >= columnCount,
          onClick: () => {
            onChange({
              columnStart: columnStart + 1
            });
            __unstableMarkNextChangeAsNotPersistent2();
            moveBlocksToPosition2(
              [blockClientId],
              gridClientId,
              gridClientId,
              getNumberOfBlocksBeforeCell(
                columnStart + 1,
                rowStart
              )
            );
          }
        }
      ) })
    ] }) });
  }
  function GridItemMover({
    className,
    icon,
    label,
    isDisabled,
    onClick,
    description
  }) {
    const instanceId = (0, import_compose107.useInstanceId)(GridItemMover);
    const descriptionId = `block-editor-grid-item-mover-button__description-${instanceId}`;
    return /* @__PURE__ */ (0, import_jsx_runtime458.jsxs)(import_jsx_runtime458.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime458.jsx)(
        import_components269.ToolbarButton,
        {
          className: clsx_default(
            "block-editor-grid-item-mover-button",
            className
          ),
          icon,
          label,
          "aria-describedby": descriptionId,
          onClick: isDisabled ? null : onClick,
          disabled: isDisabled,
          accessibleWhenDisabled: true
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime458.jsx)(import_components269.VisuallyHidden, { id: descriptionId, children: description })
    ] });
  }

  // packages/block-editor/build-module/components/grid/use-grid-layout-sync.mjs
  var import_data189 = __toESM(require_data(), 1);
  var import_element270 = __toESM(require_element(), 1);
  var import_compose108 = __toESM(require_compose(), 1);
  function useGridLayoutSync({ clientId: gridClientId }) {
    const { gridLayout, blockOrder, selectedBlockLayout } = (0, import_data189.useSelect)(
      (select3) => {
        const { getBlockAttributes: getBlockAttributes22, getBlockOrder: getBlockOrder2 } = select3(store);
        const selectedBlock = select3(store).getSelectedBlock();
        return {
          gridLayout: getBlockAttributes22(gridClientId).layout ?? {},
          blockOrder: getBlockOrder2(gridClientId),
          selectedBlockLayout: selectedBlock?.attributes.style?.layout
        };
      },
      [gridClientId]
    );
    const { getBlockAttributes: getBlockAttributes3, getBlockRootClientId: getBlockRootClientId2 } = (0, import_data189.useSelect)(store);
    const { updateBlockAttributes: updateBlockAttributes2, __unstableMarkNextChangeAsNotPersistent: __unstableMarkNextChangeAsNotPersistent2 } = (0, import_data189.useDispatch)(store);
    const selectedBlockRect = (0, import_element270.useMemo)(
      () => selectedBlockLayout ? new GridRect(selectedBlockLayout) : null,
      [selectedBlockLayout]
    );
    const previouslySelectedBlockRect = (0, import_compose108.usePrevious)(selectedBlockRect);
    const previousIsManualPlacement = (0, import_compose108.usePrevious)(
      gridLayout.isManualPlacement
    );
    const previousBlockOrder = (0, import_compose108.usePrevious)(blockOrder);
    (0, import_element270.useEffect)(() => {
      const updates = {};
      if (gridLayout.isManualPlacement) {
        const occupiedRects = [];
        for (const clientId of blockOrder) {
          const {
            columnStart,
            rowStart,
            columnSpan = 1,
            rowSpan = 1
          } = getBlockAttributes3(clientId).style?.layout ?? {};
          if (!columnStart || !rowStart) {
            continue;
          }
          occupiedRects.push(
            new GridRect({
              columnStart,
              rowStart,
              columnSpan,
              rowSpan
            })
          );
        }
        for (const clientId of blockOrder) {
          const attributes = getBlockAttributes3(clientId);
          const {
            columnStart,
            rowStart,
            columnSpan = 1,
            rowSpan = 1
          } = attributes.style?.layout ?? {};
          if (columnStart && rowStart) {
            continue;
          }
          const [newColumnStart, newRowStart] = placeBlock(
            occupiedRects,
            gridLayout.columnCount,
            columnSpan,
            rowSpan,
            previouslySelectedBlockRect?.columnEnd,
            previouslySelectedBlockRect?.rowEnd
          );
          occupiedRects.push(
            new GridRect({
              columnStart: newColumnStart,
              rowStart: newRowStart,
              columnSpan,
              rowSpan
            })
          );
          updates[clientId] = {
            style: {
              ...attributes.style,
              layout: {
                ...attributes.style?.layout,
                columnStart: newColumnStart,
                rowStart: newRowStart
              }
            }
          };
        }
        const bottomMostRow = Math.max(
          ...occupiedRects.map((r3) => r3.rowEnd)
        );
        if (!gridLayout.rowCount || gridLayout.rowCount < bottomMostRow) {
          updates[gridClientId] = {
            layout: {
              ...gridLayout,
              rowCount: bottomMostRow
            }
          };
        }
        for (const clientId of previousBlockOrder ?? []) {
          if (!blockOrder.includes(clientId)) {
            const rootClientId = getBlockRootClientId2(clientId);
            if (rootClientId === null) {
              continue;
            }
            const rootAttributes = getBlockAttributes3(rootClientId);
            if (rootAttributes?.layout?.type === "grid") {
              continue;
            }
            const attributes = getBlockAttributes3(clientId);
            const {
              columnStart,
              rowStart,
              columnSpan,
              rowSpan,
              ...layout
            } = attributes.style?.layout ?? {};
            if (columnStart || rowStart || columnSpan || rowSpan) {
              const hasEmptyLayoutAttribute = Object.keys(layout).length === 0;
              updates[clientId] = setImmutably(
                attributes,
                ["style", "layout"],
                hasEmptyLayoutAttribute ? void 0 : layout
              );
            }
          }
        }
      } else {
        if (previousIsManualPlacement === true) {
          for (const clientId of blockOrder) {
            const attributes = getBlockAttributes3(clientId);
            const { columnStart, rowStart, ...layout } = attributes.style?.layout ?? {};
            if (columnStart || rowStart) {
              const hasEmptyLayoutAttribute = Object.keys(layout).length === 0;
              updates[clientId] = setImmutably(
                attributes,
                ["style", "layout"],
                hasEmptyLayoutAttribute ? void 0 : layout
              );
            }
          }
        }
        if (gridLayout.rowCount) {
          updates[gridClientId] = {
            layout: {
              ...gridLayout,
              rowCount: void 0
            }
          };
        }
      }
      if (Object.keys(updates).length) {
        __unstableMarkNextChangeAsNotPersistent2();
        updateBlockAttributes2(
          Object.keys(updates),
          updates,
          /* uniqueByBlock: */
          true
        );
      }
    }, [
      // Actual deps to sync:
      gridClientId,
      gridLayout,
      previousBlockOrder,
      blockOrder,
      previouslySelectedBlockRect,
      previousIsManualPlacement,
      // These won't change, but the linter thinks they might:
      __unstableMarkNextChangeAsNotPersistent2,
      getBlockAttributes3,
      getBlockRootClientId2,
      updateBlockAttributes2
    ]);
  }
  function placeBlock(occupiedRects, gridColumnCount, blockColumnSpan, blockRowSpan, startColumn = 1, startRow = 1) {
    for (let row = startRow; ; row++) {
      for (let column = row === startRow ? startColumn : 1; column <= gridColumnCount; column++) {
        const candidateRect = new GridRect({
          columnStart: column,
          rowStart: row,
          columnSpan: blockColumnSpan,
          rowSpan: blockRowSpan
        });
        if (!occupiedRects.some(
          (r3) => r3.intersectsRect(candidateRect)
        )) {
          return [column, row];
        }
      }
    }
  }

  // packages/block-editor/build-module/hooks/layout-child.mjs
  var import_jsx_runtime459 = __toESM(require_jsx_runtime(), 1);
  var LAYOUT_CHILD_BLOCK_PROPS_REFERENCE = {};
  function useBlockPropsChildLayoutStyles({ style }) {
    const shouldRenderChildLayoutStyles = (0, import_data190.useSelect)((select3) => {
      return !select3(store).getSettings().disableLayoutStyles;
    });
    const layout = style?.layout ?? {};
    const {
      selfStretch,
      flexSize,
      columnStart,
      rowStart,
      columnSpan,
      rowSpan
    } = layout;
    const parentLayout = useLayout() || {};
    const { columnCount, minimumColumnWidth } = parentLayout;
    const id = (0, import_compose109.useInstanceId)(LAYOUT_CHILD_BLOCK_PROPS_REFERENCE);
    const selector3 = `.wp-container-content-${id}`;
    if (true) {
      if (columnStart && typeof columnStart !== "number") {
        throw new Error("columnStart must be a number");
      }
      if (rowStart && typeof rowStart !== "number") {
        throw new Error("rowStart must be a number");
      }
      if (columnSpan && typeof columnSpan !== "number") {
        throw new Error("columnSpan must be a number");
      }
      if (rowSpan && typeof rowSpan !== "number") {
        throw new Error("rowSpan must be a number");
      }
    }
    let css = "";
    if (shouldRenderChildLayoutStyles) {
      if (selfStretch === "fixed" && flexSize) {
        css = `${selector3} {
				flex-basis: ${flexSize};
				box-sizing: border-box;
			}`;
      } else if (selfStretch === "fill") {
        css = `${selector3} {
				flex-grow: 1;
			}`;
      } else if (columnStart && columnSpan) {
        css = `${selector3} {
				grid-column: ${columnStart} / span ${columnSpan};
			}`;
      } else if (columnStart) {
        css = `${selector3} {
				grid-column: ${columnStart};
			}`;
      } else if (columnSpan) {
        css = `${selector3} {
				grid-column: span ${columnSpan};
			}`;
      }
      if (rowStart && rowSpan) {
        css += `${selector3} {
				grid-row: ${rowStart} / span ${rowSpan};
			}`;
      } else if (rowStart) {
        css += `${selector3} {
				grid-row: ${rowStart};
			}`;
      } else if (rowSpan) {
        css += `${selector3} {
				grid-row: span ${rowSpan};
			}`;
      }
      if ((columnSpan || columnStart) && (minimumColumnWidth || !columnCount)) {
        let parentColumnValue = parseFloat(minimumColumnWidth);
        if (isNaN(parentColumnValue)) {
          parentColumnValue = 12;
        }
        let parentColumnUnit = minimumColumnWidth?.replace(
          parentColumnValue,
          ""
        );
        if (!["px", "rem", "em"].includes(parentColumnUnit)) {
          parentColumnUnit = "rem";
        }
        let numColsToBreakAt = 2;
        if (columnSpan && columnStart) {
          numColsToBreakAt = columnSpan + columnStart - 1;
        } else if (columnSpan) {
          numColsToBreakAt = columnSpan;
        } else {
          numColsToBreakAt = columnStart;
        }
        const defaultGapValue = parentColumnUnit === "px" ? 24 : 1.5;
        const containerQueryValue = numColsToBreakAt * parentColumnValue + (numColsToBreakAt - 1) * defaultGapValue;
        const minimumContainerQueryValue = parentColumnValue * 2 + defaultGapValue - 1;
        const gridColumnValue = columnSpan && columnSpan > 1 ? "1/-1" : "auto";
        css += `@container (max-width: ${Math.max(
          containerQueryValue,
          minimumContainerQueryValue
        )}${parentColumnUnit}) {
				${selector3} {
					grid-column: ${gridColumnValue};
					grid-row: auto;
				}
			}`;
      }
    }
    useStyleOverride({ css });
    if (!css) {
      return;
    }
    return { className: `wp-container-content-${id}` };
  }
  function ChildLayoutControlsPure({ clientId, style, setAttributes }) {
    const parentLayout = useLayout() || {};
    const {
      type: parentLayoutType = "default",
      allowSizingOnChildren = false,
      isManualPlacement
    } = parentLayout;
    if (parentLayoutType !== "grid") {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime459.jsx)(
      GridTools,
      {
        clientId,
        style,
        setAttributes,
        allowSizingOnChildren,
        isManualPlacement,
        parentLayout
      }
    );
  }
  function GridTools({
    clientId,
    style,
    setAttributes,
    allowSizingOnChildren,
    isManualPlacement,
    parentLayout
  }) {
    const {
      rootClientId,
      isVisible,
      parentBlockVisibility,
      blockBlockVisibility,
      deviceType,
      isChildBlockAGrid
    } = (0, import_data190.useSelect)(
      (select3) => {
        const {
          getBlockRootClientId: getBlockRootClientId2,
          getBlockEditingMode: getBlockEditingMode2,
          getTemplateLock: getTemplateLock2,
          getBlockAttributes: getBlockAttributes3,
          getSettings: getSettings7
        } = select3(store);
        const _rootClientId = getBlockRootClientId2(clientId);
        if (getTemplateLock2(_rootClientId) || getBlockEditingMode2(_rootClientId) !== "default") {
          return {
            rootClientId: _rootClientId,
            isVisible: false
          };
        }
        const parentAttributes = getBlockAttributes3(_rootClientId);
        const blockAttributes = getBlockAttributes3(clientId);
        const settings2 = getSettings7();
        return {
          rootClientId: _rootClientId,
          isVisible: true,
          parentBlockVisibility: parentAttributes?.metadata?.blockVisibility,
          blockBlockVisibility: blockAttributes?.metadata?.blockVisibility,
          deviceType: settings2?.[deviceTypeKey]?.toLowerCase() || BLOCK_VISIBILITY_VIEWPORTS.desktop.value,
          // Check if the selected child block is itself a grid.
          isChildBlockAGrid: blockAttributes?.layout?.type === "grid"
        };
      },
      [clientId]
    );
    const { isBlockCurrentlyHidden: isParentBlockCurrentlyHidden } = useBlockVisibility({
      blockVisibility: parentBlockVisibility,
      deviceType
    });
    const { isBlockCurrentlyHidden: isBlockItselfCurrentlyHidden } = useBlockVisibility({
      blockVisibility: blockBlockVisibility,
      deviceType
    });
    const [resizerBounds, setResizerBounds] = (0, import_element271.useState)();
    const childGridClientId = isChildBlockAGrid ? clientId : void 0;
    if (!isVisible || isParentBlockCurrentlyHidden) {
      return null;
    }
    const showResizer = allowSizingOnChildren && !isBlockItselfCurrentlyHidden;
    function updateLayout(layout) {
      setAttributes({
        style: {
          ...style,
          layout: {
            ...style?.layout,
            ...layout
          }
        }
      });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime459.jsxs)(import_jsx_runtime459.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime459.jsx)(
        GridVisualizer,
        {
          clientId: rootClientId,
          contentRef: setResizerBounds,
          parentLayout,
          childGridClientId
        }
      ),
      showResizer && /* @__PURE__ */ (0, import_jsx_runtime459.jsx)(
        GridItemResizer,
        {
          clientId,
          bounds: resizerBounds,
          onChange: updateLayout,
          parentLayout
        }
      ),
      isManualPlacement && window.__experimentalEnableGridInteractivity && /* @__PURE__ */ (0, import_jsx_runtime459.jsx)(
        GridItemMovers,
        {
          layout: style?.layout,
          parentLayout,
          onChange: updateLayout,
          gridClientId: rootClientId,
          blockClientId: clientId
        }
      )
    ] });
  }
  var layout_child_default = {
    useBlockProps: useBlockPropsChildLayoutStyles,
    edit: ChildLayoutControlsPure,
    attributeKeys: ["style"],
    hasSupport() {
      return true;
    }
  };

  // packages/block-editor/build-module/hooks/metadata.mjs
  var import_hooks30 = __toESM(require_hooks(), 1);
  var import_blocks119 = __toESM(require_blocks(), 1);
  var META_ATTRIBUTE_NAME = "metadata";
  function addMetaAttribute(blockTypeSettings) {
    if (blockTypeSettings?.attributes?.[META_ATTRIBUTE_NAME]?.type) {
      return blockTypeSettings;
    }
    blockTypeSettings.attributes = {
      ...blockTypeSettings.attributes,
      [META_ATTRIBUTE_NAME]: {
        type: "object"
      }
    };
    return blockTypeSettings;
  }
  function addTransforms5(result, source, index, results) {
    if (results.length === 1 && result.innerBlocks.length === source.length) {
      return result;
    }
    if (results.length === 1 && source.length > 1 || results.length > 1 && source.length === 1) {
      return result;
    }
    if (results.length > 1 && source.length > 1 && results.length !== source.length) {
      return result;
    }
    const sourceMetadata = source[index]?.attributes?.metadata;
    if (!sourceMetadata) {
      return result;
    }
    const preservedMetadata = {};
    if (sourceMetadata.noteId && !result.attributes?.metadata?.noteId) {
      preservedMetadata.noteId = sourceMetadata.noteId;
    }
    if (sourceMetadata.name && !result.attributes?.metadata?.name && (0, import_blocks119.hasBlockSupport)(result.name, "renaming", true)) {
      preservedMetadata.name = sourceMetadata.name;
    }
    if (sourceMetadata.blockVisibility !== void 0 && !result.attributes?.metadata?.blockVisibility && (0, import_blocks119.hasBlockSupport)(result.name, "visibility", true)) {
      preservedMetadata.blockVisibility = sourceMetadata.blockVisibility;
    }
    if (Object.keys(preservedMetadata).length > 0) {
      return {
        ...result,
        attributes: {
          ...result.attributes,
          metadata: {
            ...result.attributes.metadata,
            ...preservedMetadata
          }
        }
      };
    }
    return result;
  }
  (0, import_hooks30.addFilter)(
    "blocks.registerBlockType",
    "core/metadata/addMetaAttribute",
    addMetaAttribute
  );
  (0, import_hooks30.addFilter)(
    "blocks.switchToBlockType.transformedBlock",
    "core/metadata/addTransforms",
    addTransforms5
  );

  // packages/block-editor/build-module/hooks/block-hooks.mjs
  var import_i18n239 = __toESM(require_i18n(), 1);
  var import_element272 = __toESM(require_element(), 1);
  var import_components270 = __toESM(require_components(), 1);
  var import_blocks120 = __toESM(require_blocks(), 1);
  var import_data191 = __toESM(require_data(), 1);
  var import_jsx_runtime460 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_OBJECT5 = {};
  function BlockHooksControlPure({
    name,
    clientId,
    metadata: { ignoredHookedBlocks = [] } = {}
  }) {
    const blockTypes = (0, import_data191.useSelect)(
      (select3) => select3(import_blocks120.store).getBlockTypes(),
      []
    );
    const hookedBlocksForCurrentBlock = (0, import_element272.useMemo)(
      () => blockTypes?.filter(
        ({ name: blockName, blockHooks }) => blockHooks && name in blockHooks || ignoredHookedBlocks.includes(blockName)
      ),
      [blockTypes, name, ignoredHookedBlocks]
    );
    const hookedBlockClientIds = (0, import_data191.useSelect)(
      (select3) => {
        const { getBlocks: getBlocks2, getBlockRootClientId: getBlockRootClientId22, getGlobalBlockCount: getGlobalBlockCount2 } = select3(store);
        const rootClientId = getBlockRootClientId22(clientId);
        const _hookedBlockClientIds = hookedBlocksForCurrentBlock.reduce(
          (clientIds, block) => {
            if (getGlobalBlockCount2(block.name) === 0) {
              return clientIds;
            }
            const relativePosition = block?.blockHooks?.[name];
            let candidates;
            switch (relativePosition) {
              case "before":
              case "after":
                candidates = getBlocks2(rootClientId);
                break;
              case "first_child":
              case "last_child":
                candidates = getBlocks2(clientId);
                break;
              case void 0:
                candidates = [
                  ...getBlocks2(rootClientId),
                  ...getBlocks2(clientId)
                ];
                break;
            }
            const hookedBlock = candidates?.find(
              (candidate) => candidate.name === block.name
            );
            if (hookedBlock) {
              return {
                ...clientIds,
                [block.name]: hookedBlock.clientId
              };
            }
            return clientIds;
          },
          {}
        );
        if (Object.values(_hookedBlockClientIds).length > 0) {
          return _hookedBlockClientIds;
        }
        return EMPTY_OBJECT5;
      },
      [hookedBlocksForCurrentBlock, name, clientId]
    );
    const { getBlockIndex: getBlockIndex2, getBlockCount: getBlockCount2, getBlockRootClientId: getBlockRootClientId2 } = (0, import_data191.useSelect)(store);
    const { insertBlock: insertBlock2, removeBlock: removeBlock2 } = (0, import_data191.useDispatch)(store);
    if (!hookedBlocksForCurrentBlock.length) {
      return null;
    }
    const groupedHookedBlocks = hookedBlocksForCurrentBlock.reduce(
      (groups3, block) => {
        const [namespace] = block.name.split("/");
        if (!groups3[namespace]) {
          groups3[namespace] = [];
        }
        groups3[namespace].push(block);
        return groups3;
      },
      {}
    );
    const insertBlockIntoDesignatedLocation = (block, relativePosition) => {
      const blockIndex = getBlockIndex2(clientId);
      const innerBlocksLength = getBlockCount2(clientId);
      const rootClientId = getBlockRootClientId2(clientId);
      switch (relativePosition) {
        case "before":
        case "after":
          insertBlock2(
            block,
            relativePosition === "after" ? blockIndex + 1 : blockIndex,
            rootClientId,
            // Insert as a child of the current block's parent
            false
          );
          break;
        case "first_child":
        case "last_child":
          insertBlock2(
            block,
            // TODO: It'd be great if insertBlock() would accept negative indices for insertion.
            relativePosition === "first_child" ? 0 : innerBlocksLength,
            clientId,
            // Insert as a child of the current block.
            false
          );
          break;
        case void 0:
          insertBlock2(
            block,
            blockIndex + 1,
            rootClientId,
            // Insert as a child of the current block's parent
            false
          );
          break;
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(inspector_controls_default, { children: /* @__PURE__ */ (0, import_jsx_runtime460.jsxs)(
      import_components270.PanelBody,
      {
        className: "block-editor-hooks__block-hooks",
        title: (0, import_i18n239.__)("Plugins"),
        initialOpen: true,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime460.jsx)("p", { className: "block-editor-hooks__block-hooks-helptext", children: (0, import_i18n239.__)(
            "Manage the inclusion of blocks added automatically by plugins."
          ) }),
          Object.keys(groupedHookedBlocks).map((vendor) => {
            return /* @__PURE__ */ (0, import_jsx_runtime460.jsxs)(import_element272.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime460.jsx)("h3", { children: vendor }),
              groupedHookedBlocks[vendor].map((block) => {
                const checked = block.name in hookedBlockClientIds;
                return /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(
                  import_components270.ToggleControl,
                  {
                    checked,
                    label: block.title,
                    onChange: () => {
                      if (!checked) {
                        const relativePosition = block.blockHooks[name];
                        insertBlockIntoDesignatedLocation(
                          (0, import_blocks120.createBlock)(block.name),
                          relativePosition
                        );
                        return;
                      }
                      removeBlock2(
                        hookedBlockClientIds[block.name],
                        false
                      );
                    }
                  },
                  block.title
                );
              })
            ] }, vendor);
          })
        ]
      }
    ) });
  }
  var block_hooks_default = {
    edit: BlockHooksControlPure,
    attributeKeys: ["metadata"],
    hasSupport() {
      return true;
    }
  };

  // packages/block-editor/build-module/hooks/block-bindings.mjs
  var import_i18n240 = __toESM(require_i18n(), 1);
  var import_blocks121 = __toESM(require_blocks(), 1);
  var import_components272 = __toESM(require_components(), 1);
  var import_data192 = __toESM(require_data(), 1);
  var import_element273 = __toESM(require_element(), 1);
  var import_compose110 = __toESM(require_compose(), 1);
  var import_jsx_runtime461 = __toESM(require_jsx_runtime(), 1);
  var useToolsPanelDropdownMenuProps2 = () => {
    const isMobile = (0, import_compose110.useViewportMatch)("medium", "<");
    return !isMobile ? {
      popoverProps: {
        placement: "left-start",
        // For non-mobile, inner sidebar width (248px) - button width (24px) - border (1px) + padding (16px) + spacing (20px)
        offset: 259
      }
    } : {};
  };
  var BlockBindingsPanel = ({ name: blockName, metadata }) => {
    const blockContext = (0, import_element273.useContext)(block_context_default);
    const { removeAllBlockBindings } = useBlockBindingsUtils();
    const dropdownMenuProps = useToolsPanelDropdownMenuProps2();
    const { bindableAttributes, hasCompatibleFields } = (0, import_data192.useSelect)(
      (select3) => {
        const { __experimentalBlockBindingsSupportedAttributes } = select3(store).getSettings();
        const {
          getAllBlockBindingsSources,
          getBlockBindingsSourceFieldsList
        } = unlock(select3(import_blocks121.store));
        return {
          bindableAttributes: __experimentalBlockBindingsSupportedAttributes?.[blockName],
          hasCompatibleFields: Object.values(
            getAllBlockBindingsSources()
          ).some(
            (source) => getBlockBindingsSourceFieldsList(source, blockContext)?.length > 0
          )
        };
      },
      [blockName, blockContext]
    );
    if (!bindableAttributes || bindableAttributes.length === 0) {
      return null;
    }
    const { bindings } = metadata || {};
    if (bindings === void 0 && !hasCompatibleFields) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime461.jsx)(inspector_controls_default, { group: "bindings", children: /* @__PURE__ */ (0, import_jsx_runtime461.jsxs)(
      import_components272.__experimentalToolsPanel,
      {
        label: (0, import_i18n240.__)("Attributes"),
        resetAll: () => {
          removeAllBlockBindings();
        },
        dropdownMenuProps,
        className: "block-editor-bindings__panel",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime461.jsx)(import_components272.__experimentalItemGroup, { isBordered: true, isSeparated: true, children: bindableAttributes.map((attribute) => /* @__PURE__ */ (0, import_jsx_runtime461.jsx)(
            BlockBindingsAttributeControl,
            {
              attribute,
              blockName,
              binding: bindings?.[attribute]
            },
            attribute
          )) }),
          /* @__PURE__ */ (0, import_jsx_runtime461.jsx)(import_components272.__experimentalText, { as: "div", variant: "muted", children: /* @__PURE__ */ (0, import_jsx_runtime461.jsx)("p", { children: (0, import_i18n240.__)(
            "Attributes connected to custom fields or other dynamic data."
          ) }) })
        ]
      }
    ) });
  };
  var block_bindings_default = {
    edit: BlockBindingsPanel,
    attributeKeys: ["metadata"],
    hasSupport(name) {
      return ![
        "core/post-date",
        "core/navigation-link",
        "core/navigation-submenu"
      ].includes(name);
    }
  };

  // packages/block-editor/build-module/hooks/list-view.mjs
  var import_i18n241 = __toESM(require_i18n(), 1);
  var import_components273 = __toESM(require_components(), 1);
  var import_data194 = __toESM(require_data(), 1);
  var import_blocks122 = __toESM(require_blocks(), 1);
  var import_element274 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/use-list-view-panel-state/index.mjs
  var import_data193 = __toESM(require_data(), 1);
  function useListViewPanelState(clientId) {
    const { isOpened, expandRevision } = (0, import_data193.useSelect)(
      (select3) => {
        const { isListViewPanelOpened: isListViewPanelOpened2, getListViewExpandRevision: getListViewExpandRevision2 } = unlock(
          select3(store)
        );
        return {
          isOpened: isListViewPanelOpened2(clientId),
          expandRevision: getListViewExpandRevision2()
        };
      },
      [clientId]
    );
    const { __unstableToggleListViewPanel: toggleListViewPanel } = (0, import_data193.useDispatch)(store);
    const handleToggle = (opened) => {
      toggleListViewPanel(clientId, opened);
    };
    return {
      isOpened,
      expandRevision,
      handleToggle
    };
  }

  // packages/block-editor/build-module/hooks/list-view.mjs
  var import_jsx_runtime462 = __toESM(require_jsx_runtime(), 1);
  var LIST_VIEW_SUPPORT_KEY = "listView";
  function hasListViewSupport(nameOrType) {
    return (0, import_blocks122.hasBlockSupport)(nameOrType, LIST_VIEW_SUPPORT_KEY);
  }
  function ListViewPanel({ clientId, name }) {
    const { isSelectionWithinCurrentSection } = (0, import_element274.useContext)(PrivateBlockContext);
    const { isOpened, expandRevision, handleToggle } = useListViewPanelState(clientId);
    const { openListViewContentPanel: openListViewContentPanel2 } = unlock(
      (0, import_data194.useDispatch)(store)
    );
    const isEnabled = hasListViewSupport(name);
    const { hasChildren, isNestedListView } = (0, import_data194.useSelect)(
      (select3) => {
        const { getBlockCount: getBlockCount2, getBlockParents: getBlockParents2, getBlockName: getBlockName2 } = select3(store);
        const parents = getBlockParents2(clientId, false);
        const _isNestedListView = parents.find((parentId) => {
          const parentName = getBlockName2(parentId);
          return parentName === "core/navigation" || (0, import_blocks122.hasBlockSupport)(parentName, "listView");
        });
        return {
          hasChildren: !!getBlockCount2(clientId),
          isNestedListView: _isNestedListView
        };
      },
      [clientId]
    );
    const blockType = (0, import_blocks122.getBlockType)(name);
    const title = blockType?.title || name;
    if (!isEnabled || isNestedListView) {
      return null;
    }
    const showBlockTitle = isSelectionWithinCurrentSection;
    return /* @__PURE__ */ (0, import_jsx_runtime462.jsx)(InspectorControlsFill, { group: "list", children: /* @__PURE__ */ (0, import_jsx_runtime462.jsxs)(
      import_components273.PanelBody,
      {
        title: showBlockTitle ? title : void 0,
        opened: isOpened,
        onToggle: handleToggle,
        children: [
          !hasChildren && /* @__PURE__ */ (0, import_jsx_runtime462.jsx)("p", { className: "block-editor-block-inspector__no-blocks", children: (0, import_i18n241.__)("No items yet.") }),
          /* @__PURE__ */ (0, import_jsx_runtime462.jsx)(
            PrivateListView,
            {
              rootClientId: clientId,
              isExpanded: true,
              description: title,
              showAppender: true,
              onSelect: openListViewContentPanel2
            },
            `${clientId}-${expandRevision}`
          )
        ]
      }
    ) });
  }
  var list_view_default3 = {
    edit: ListViewPanel,
    hasSupport: hasListViewSupport,
    attributeKeys: [],
    supportsPatternEditing: true
  };

  // packages/block-editor/build-module/hooks/block-renaming.mjs
  var import_hooks31 = __toESM(require_hooks(), 1);
  var import_blocks123 = __toESM(require_blocks(), 1);
  function addLabelCallback(settings2) {
    if (settings2.__experimentalLabel) {
      return settings2;
    }
    const supportsBlockNaming = (0, import_blocks123.hasBlockSupport)(
      settings2,
      "renaming",
      true
      // default value
    );
    if (supportsBlockNaming) {
      settings2.__experimentalLabel = (attributes, { context }) => {
        const { metadata } = attributes;
        if ((context === "list-view" || context === "breadcrumb") && metadata?.name) {
          return metadata.name;
        }
      };
    }
    return settings2;
  }
  (0, import_hooks31.addFilter)(
    "blocks.registerBlockType",
    "core/metadata/addLabelCallback",
    addLabelCallback
  );

  // packages/block-editor/build-module/hooks/grid-visualizer.mjs
  var import_compose111 = __toESM(require_compose(), 1);
  var import_hooks32 = __toESM(require_hooks(), 1);
  var import_data195 = __toESM(require_data(), 1);
  var import_jsx_runtime463 = __toESM(require_jsx_runtime(), 1);
  function GridLayoutSync(props) {
    useGridLayoutSync(props);
  }
  function GridTools2({ clientId, layout }) {
    const { isVisible, blockVisibility: blockVisibility2, deviceType, isAnyAncestorHidden } = (0, import_data195.useSelect)(
      (select3) => {
        const {
          isBlockSelected: isBlockSelected2,
          hasSelectedInnerBlock: hasSelectedInnerBlock2,
          isDraggingBlocks: isDraggingBlocks2,
          getTemplateLock: getTemplateLock2,
          getBlockEditingMode: getBlockEditingMode2,
          getBlockAttributes: getBlockAttributes3,
          getSettings: getSettings7
        } = select3(store);
        if (!isDraggingBlocks2() && !isBlockSelected2(clientId) || getTemplateLock2(clientId) || getBlockEditingMode2(clientId) !== "default" || hasSelectedInnerBlock2(clientId)) {
          return { isVisible: false };
        }
        const { isBlockParentHiddenAtViewport: isBlockParentHiddenAtViewport2 } = unlock(
          select3(store)
        );
        const attributes = getBlockAttributes3(clientId);
        const settings2 = getSettings7();
        const currentDeviceType = settings2?.[deviceTypeKey]?.toLowerCase() || BLOCK_VISIBILITY_VIEWPORTS.desktop.value;
        return {
          isVisible: true,
          blockVisibility: attributes?.metadata?.blockVisibility,
          deviceType: currentDeviceType,
          isAnyAncestorHidden: isBlockParentHiddenAtViewport2(
            clientId,
            currentDeviceType
          )
        };
      },
      [clientId]
    );
    const { isBlockCurrentlyHidden } = useBlockVisibility({
      blockVisibility: blockVisibility2,
      deviceType
    });
    return /* @__PURE__ */ (0, import_jsx_runtime463.jsxs)(import_jsx_runtime463.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime463.jsx)(GridLayoutSync, { clientId }),
      isVisible && !isBlockCurrentlyHidden && !isAnyAncestorHidden && /* @__PURE__ */ (0, import_jsx_runtime463.jsx)(
        GridVisualizer,
        {
          clientId,
          parentLayout: layout
        }
      )
    ] });
  }
  var addGridVisualizerToBlockEdit = (0, import_compose111.createHigherOrderComponent)(
    (BlockEdit2) => function AddGridVisualizerToBlockEdit(props) {
      if (props.attributes.layout?.type !== "grid") {
        return /* @__PURE__ */ (0, import_jsx_runtime463.jsx)(BlockEdit2, { ...props }, "edit");
      }
      return /* @__PURE__ */ (0, import_jsx_runtime463.jsxs)(import_jsx_runtime463.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime463.jsx)(
          GridTools2,
          {
            clientId: props.clientId,
            layout: props.attributes.layout
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime463.jsx)(BlockEdit2, { ...props }, "edit")
      ] });
    },
    "addGridVisualizerToBlockEdit"
  );
  (0, import_hooks32.addFilter)(
    "editor.BlockEdit",
    "core/editor/grid-visualizer",
    addGridVisualizerToBlockEdit
  );

  // packages/block-editor/build-module/hooks/auto-inspector-controls.mjs
  var import_blocks124 = __toESM(require_blocks(), 1);
  var import_components274 = __toESM(require_components(), 1);
  var import_data196 = __toESM(require_data(), 1);
  var import_element275 = __toESM(require_element(), 1);
  var import_i18n242 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/hooks/generate-fields-from-attributes.mjs
  function generateFieldsFromAttributes(attributes) {
    const fields = [];
    const fieldIds = [];
    Object.entries(attributes).forEach(([name, def]) => {
      if (!def.autoGenerateControl) {
        return;
      }
      const field = createFieldFromAttribute(name, def);
      if (field) {
        fields.push(field);
        fieldIds.push(name);
      }
    });
    return {
      fields,
      form: { fields: fieldIds }
    };
  }
  function createFieldFromAttribute(name, def) {
    const type = def.type;
    const field = {
      id: name,
      label: def.label || name,
      // Only 'string' needs mapping to 'text'; others are 1:1 with DataForm types.
      // This mapping will be unnecessary once #74105 lands.
      type: type === "string" ? "text" : type
    };
    if (def.enum && Array.isArray(def.enum)) {
      field.elements = def.enum.map((value) => ({
        value,
        label: String(value)
      }));
    }
    return field;
  }

  // packages/block-editor/build-module/hooks/auto-inspector-controls.mjs
  var import_jsx_runtime464 = __toESM(require_jsx_runtime(), 1);
  function hasAutoGenerateControl(blockTypeAttributes) {
    if (!blockTypeAttributes) {
      return false;
    }
    return Object.values(blockTypeAttributes).some(
      (attr) => attr?.autoGenerateControl
    );
  }
  function AutoRegisterControls({ name, clientId, setAttributes }) {
    const blockEditingMode = useBlockEditingMode();
    const blockContext = (0, import_element275.useContext)(block_context_default);
    const attributes = (0, import_data196.useSelect)(
      (select3) => {
        const _attributes = select3(store).getBlockAttributes(clientId);
        if (!_attributes?.metadata?.bindings) {
          return _attributes;
        }
        const { getBlockBindingsSource: getBlockBindingsSource4 } = unlock(select3(import_blocks124.store));
        return Object.entries(_attributes.metadata.bindings).reduce(
          (acc, [attribute, binding]) => {
            const source = getBlockBindingsSource4(binding.source);
            if (!source) {
              return acc;
            }
            const values = source.getValues({
              select: select3,
              context: blockContext,
              bindings: { [attribute]: binding }
            });
            return { ...acc, ...values };
          },
          _attributes
        );
      },
      [blockContext, clientId]
    );
    const blockType = (0, import_blocks124.getBlockType)(name);
    const { fields, form } = (0, import_element275.useMemo)(() => {
      if (!blockType?.attributes) {
        return { fields: [], form: { fields: [] } };
      }
      return generateFieldsFromAttributes(blockType.attributes);
    }, [blockType?.attributes]);
    if (blockEditingMode !== "default") {
      return null;
    }
    if (!fields || fields.length === 0) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime464.jsx)(inspector_controls_default, { children: /* @__PURE__ */ (0, import_jsx_runtime464.jsx)(import_components274.PanelBody, { title: (0, import_i18n242.__)("Settings"), children: /* @__PURE__ */ (0, import_jsx_runtime464.jsx)(
      DataForm,
      {
        data: attributes,
        fields,
        form,
        onChange: setAttributes
      }
    ) }) });
  }
  var auto_inspector_controls_default = {
    edit: AutoRegisterControls,
    attributeKeys: [],
    hasSupport(name) {
      const blockType = (0, import_blocks124.getBlockType)(name);
      return hasAutoGenerateControl(blockType?.attributes);
    }
  };

  // packages/block-editor/build-module/hooks/use-dimensions-props.mjs
  function getDimensionsClassesAndStyles(attributes) {
    const { style } = attributes;
    const dimensionsStyles = style?.dimensions || {};
    const styleProp = getInlineStyles({ dimensions: dimensionsStyles });
    return {
      className: dimensionsStyles.aspectRatio ? "has-aspect-ratio" : void 0,
      style: styleProp
    };
  }

  // packages/block-editor/build-module/hooks/use-border-props.mjs
  function getBorderClassesAndStyles(attributes) {
    const border = attributes.style?.border || {};
    const className = getBorderClasses(attributes);
    return {
      className: className || void 0,
      style: getInlineStyles({ border })
    };
  }
  function useBorderProps(attributes) {
    const { colors: colors2 } = useMultipleOriginColorsAndGradients();
    const borderProps = getBorderClassesAndStyles(attributes);
    const { borderColor } = attributes;
    if (borderColor) {
      const borderColorObject = getMultiOriginColor({
        colors: colors2,
        namedColor: borderColor
      });
      borderProps.style.borderColor = borderColorObject.color;
    }
    return borderProps;
  }

  // packages/block-editor/build-module/hooks/use-shadow-props.mjs
  function getShadowClassesAndStyles(attributes) {
    const shadow = attributes.style?.shadow || "";
    return {
      style: getInlineStyles({ shadow })
    };
  }

  // packages/block-editor/build-module/hooks/use-color-props.mjs
  var import_element276 = __toESM(require_element(), 1);
  function getColorClassesAndStyles(attributes) {
    const { backgroundColor, textColor, gradient, style } = attributes;
    const backgroundClass = getColorClassName(
      "background-color",
      backgroundColor
    );
    const textClass = getColorClassName("color", textColor);
    const gradientClass = __experimentalGetGradientClass(gradient);
    const hasGradient = gradientClass || style?.color?.gradient;
    const className = clsx_default(textClass, gradientClass, {
      // Don't apply the background class if there's a gradient.
      [backgroundClass]: !hasGradient && !!backgroundClass,
      "has-text-color": textColor || style?.color?.text,
      "has-background": backgroundColor || style?.color?.background || gradient || style?.color?.gradient,
      "has-link-color": style?.elements?.link?.color
    });
    const colorStyles = style?.color || {};
    const styleProp = getInlineStyles({ color: colorStyles });
    return {
      className: className || void 0,
      style: styleProp
    };
  }
  function useColorProps(attributes) {
    const { backgroundColor, textColor, gradient } = attributes;
    const [
      userPalette,
      themePalette,
      defaultPalette,
      userGradients,
      themeGradients,
      defaultGradients
    ] = useSettings(
      "color.palette.custom",
      "color.palette.theme",
      "color.palette.default",
      "color.gradients.custom",
      "color.gradients.theme",
      "color.gradients.default"
    );
    const colors2 = (0, import_element276.useMemo)(
      () => [
        ...userPalette || [],
        ...themePalette || [],
        ...defaultPalette || []
      ],
      [userPalette, themePalette, defaultPalette]
    );
    const gradients = (0, import_element276.useMemo)(
      () => [
        ...userGradients || [],
        ...themeGradients || [],
        ...defaultGradients || []
      ],
      [userGradients, themeGradients, defaultGradients]
    );
    const colorProps = getColorClassesAndStyles(attributes);
    if (backgroundColor) {
      const backgroundColorObject = getColorObjectByAttributeValues(
        colors2,
        backgroundColor
      );
      colorProps.style.backgroundColor = backgroundColorObject.color;
    }
    if (gradient) {
      colorProps.style.background = getGradientValueBySlug(
        gradients,
        gradient
      );
    }
    if (textColor) {
      const textColorObject = getColorObjectByAttributeValues(
        colors2,
        textColor
      );
      colorProps.style.color = textColorObject.color;
    }
    return colorProps;
  }

  // packages/block-editor/build-module/hooks/use-spacing-props.mjs
  function getSpacingClassesAndStyles(attributes) {
    const { style } = attributes;
    const spacingStyles = style?.spacing || {};
    const styleProp = getInlineStyles({ spacing: spacingStyles });
    return {
      style: styleProp
    };
  }

  // packages/block-editor/build-module/hooks/use-typography-props.mjs
  var import_components275 = __toESM(require_components(), 1);
  var { kebabCase: kebabCase7 } = unlock(import_components275.privateApis);
  function getTypographyClassesAndStyles(attributes, settings2) {
    let typographyStyles = attributes?.style?.typography || {};
    typographyStyles = {
      ...typographyStyles,
      fontSize: getTypographyFontSizeValue(
        { size: attributes?.style?.typography?.fontSize },
        settings2
      )
    };
    const style = getInlineStyles({ typography: typographyStyles });
    const fontFamilyClassName = !!attributes?.fontFamily ? `has-${kebabCase7(attributes.fontFamily)}-font-family` : "";
    const textAlignClassName = !!attributes?.style?.typography?.textAlign ? `has-text-align-${attributes?.style?.typography?.textAlign}` : "";
    const className = clsx_default(
      fontFamilyClassName,
      textAlignClassName,
      getFontSizeClass(attributes?.fontSize)
    );
    return {
      className,
      style
    };
  }

  // packages/block-editor/build-module/hooks/use-cached-truthy.mjs
  var import_element277 = __toESM(require_element(), 1);
  function useCachedTruthy(value) {
    const [cachedValue, setCachedValue] = (0, import_element277.useState)(value);
    (0, import_element277.useEffect)(() => {
      if (value) {
        setCachedValue(value);
      }
    }, [value]);
    return cachedValue;
  }

  // packages/block-editor/build-module/hooks/index.mjs
  createBlockEditFilter(
    [
      align_default,
      text_align_default,
      anchor_default,
      custom_class_name_default,
      style_default3,
      custom_css_default,
      duotone_default,
      fit_text_default,
      position_default,
      layout_default2,
      block_hooks_default,
      block_bindings_default,
      layout_child_default,
      allowed_blocks_default,
      block_fields_default,
      list_view_default3,
      auto_inspector_controls_default
    ].filter(Boolean)
  );
  createBlockListBlockFilter([
    align_default,
    text_align_default,
    background_default,
    style_default3,
    color_default,
    dimensions_default,
    duotone_default,
    font_family_default,
    font_size_default,
    fit_text_default,
    border_default,
    custom_css_default,
    position_default,
    block_style_variation_default,
    layout_child_default
  ]);
  createBlockSaveFilter([
    align_default,
    text_align_default,
    anchor_default,
    aria_label_default,
    custom_class_name_default,
    border_default,
    custom_css_default,
    fit_text_default,
    color_default,
    style_default3,
    font_family_default,
    font_size_default
  ]);

  // packages/block-editor/build-module/elements/index.mjs
  var ELEMENT_CLASS_NAMES2 = {
    button: "wp-element-button",
    caption: "wp-element-caption"
  };
  var __experimentalGetElementClassName = (element) => {
    return ELEMENT_CLASS_NAMES2[element] ? ELEMENT_CLASS_NAMES2[element] : "";
  };

  // packages/block-editor/build-module/utils/get-px-from-css-unit.mjs
  var get_px_from_css_unit_default = () => "";

  // packages/block-editor/build-module/components/rich-text/get-rich-text-values.mjs
  var import_element278 = __toESM(require_element(), 1);
  var import_blocks125 = __toESM(require_blocks(), 1);
  var import_rich_text20 = __toESM(require_rich_text(), 1);
  var import_jsx_runtime465 = __toESM(require_jsx_runtime(), 1);
  function addValuesForElement(element, values, innerBlocks) {
    if (null === element || void 0 === element || false === element) {
      return;
    }
    if (Array.isArray(element)) {
      return addValuesForElements(element, values, innerBlocks);
    }
    switch (typeof element) {
      case "string":
      case "number":
        return;
    }
    const { type, props } = element;
    switch (type) {
      case import_element278.StrictMode:
      case import_element278.Fragment:
        return addValuesForElements(props.children, values, innerBlocks);
      case import_element278.RawHTML:
        return;
      case inner_blocks_default.Content:
        return addValuesForBlocks(values, innerBlocks);
      case Content:
        values.push(props.value);
        return;
    }
    switch (typeof type) {
      case "string":
        if (typeof props.children !== "undefined") {
          return addValuesForElements(
            props.children,
            values,
            innerBlocks
          );
        }
        return;
      case "function":
        const el = type.prototype && typeof type.prototype.render === "function" ? new type(props).render() : type(props);
        return addValuesForElement(el, values, innerBlocks);
    }
  }
  function addValuesForElements(children, ...args) {
    children = Array.isArray(children) ? children : [children];
    for (let i2 = 0; i2 < children.length; i2++) {
      addValuesForElement(children[i2], ...args);
    }
  }
  function addValuesForBlocks(values, blocks2) {
    for (let i2 = 0; i2 < blocks2.length; i2++) {
      const { name, attributes, innerBlocks } = blocks2[i2];
      const saveElement = (0, import_blocks125.getSaveElement)(
        name,
        attributes,
        // Instead of letting save elements use `useInnerBlocksProps.save`,
        // force them to use InnerBlocks.Content instead so we can intercept
        // a single component.
        /* @__PURE__ */ (0, import_jsx_runtime465.jsx)(inner_blocks_default.Content, {})
      );
      addValuesForElement(saveElement, values, innerBlocks);
    }
  }
  function getRichTextValues(blocks2 = []) {
    import_blocks125.__unstableGetBlockProps.skipFilters = true;
    const values = [];
    addValuesForBlocks(values, blocks2);
    import_blocks125.__unstableGetBlockProps.skipFilters = false;
    return values.map(
      (value) => value instanceof import_rich_text20.RichTextData ? value : import_rich_text20.RichTextData.fromHTMLString(value)
    );
  }

  // packages/block-editor/build-module/components/resizable-box-popover/index.mjs
  var import_components276 = __toESM(require_components(), 1);
  var import_jsx_runtime466 = __toESM(require_jsx_runtime(), 1);
  function ResizableBoxPopover({
    clientId,
    resizableBoxProps,
    ...props
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime466.jsx)(
      cover_default,
      {
        clientId,
        __unstablePopoverSlot: "block-toolbar",
        ...props,
        children: /* @__PURE__ */ (0, import_jsx_runtime466.jsx)(import_components276.ResizableBox, { ...resizableBoxProps })
      }
    );
  }

  // packages/block-editor/build-module/components/block-removal-warning-modal/index.mjs
  var import_element279 = __toESM(require_element(), 1);
  var import_data197 = __toESM(require_data(), 1);
  var import_components277 = __toESM(require_components(), 1);
  var import_i18n243 = __toESM(require_i18n(), 1);
  var import_jsx_runtime467 = __toESM(require_jsx_runtime(), 1);
  function BlockRemovalWarningModal({ rules }) {
    const [confirmed, setConfirmed] = (0, import_element279.useState)(false);
    const { clientIds, selectPrevious, message: message2 } = (0, import_data197.useSelect)(
      (select3) => unlock(select3(store)).getRemovalPromptData()
    );
    const {
      clearBlockRemovalPrompt: clearBlockRemovalPrompt2,
      setBlockRemovalRules: setBlockRemovalRules2,
      privateRemoveBlocks: privateRemoveBlocks2
    } = unlock((0, import_data197.useDispatch)(store));
    (0, import_element279.useEffect)(() => {
      setBlockRemovalRules2(rules);
      return () => {
        setBlockRemovalRules2();
      };
    }, [rules, setBlockRemovalRules2]);
    (0, import_element279.useEffect)(() => {
      setConfirmed(false);
    }, [clientIds]);
    if (!message2) {
      return;
    }
    const isStructured = typeof message2 === "object" && message2 !== null;
    const description = isStructured ? message2.description : message2;
    const requireConfirmation = isStructured && message2.requireConfirmation;
    const isRemoveDisabled = requireConfirmation && !confirmed;
    const onConfirmRemoval = () => {
      privateRemoveBlocks2(
        clientIds,
        selectPrevious,
        /* force */
        true
      );
      clearBlockRemovalPrompt2();
    };
    return /* @__PURE__ */ (0, import_jsx_runtime467.jsx)(
      import_components277.Modal,
      {
        title: (0, import_i18n243.__)("Confirm deletion"),
        onRequestClose: clearBlockRemovalPrompt2,
        size: "medium",
        children: /* @__PURE__ */ (0, import_jsx_runtime467.jsxs)(import_components277.__experimentalVStack, { spacing: 4, children: [
          /* @__PURE__ */ (0, import_jsx_runtime467.jsxs)("div", { children: [
            /* @__PURE__ */ (0, import_jsx_runtime467.jsx)("p", { children: description }),
            isStructured && (message2.warning || message2.subtext) && /* @__PURE__ */ (0, import_jsx_runtime467.jsxs)("p", { children: [
              message2.warning && /* @__PURE__ */ (0, import_jsx_runtime467.jsx)("strong", { children: message2.warning }),
              message2.warning && message2.subtext && " ",
              message2.subtext
            ] })
          ] }),
          requireConfirmation && /* @__PURE__ */ (0, import_jsx_runtime467.jsx)(
            import_components277.CheckboxControl,
            {
              label: (0, import_i18n243.__)("I understand the consequences"),
              checked: confirmed,
              onChange: setConfirmed
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime467.jsxs)(import_components277.__experimentalHStack, { justify: "right", children: [
            /* @__PURE__ */ (0, import_jsx_runtime467.jsx)(
              import_components277.Button,
              {
                variant: "tertiary",
                onClick: clearBlockRemovalPrompt2,
                __next40pxDefaultSize: true,
                children: (0, import_i18n243.__)("Cancel")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime467.jsx)(
              import_components277.Button,
              {
                variant: "primary",
                onClick: onConfirmRemoval,
                disabled: isRemoveDisabled,
                accessibleWhenDisabled: true,
                __next40pxDefaultSize: true,
                children: (0, import_i18n243.__)("Delete")
              }
            )
          ] })
        ] })
      }
    );
  }

  // packages/block-editor/build-module/components/dimensions-tool/index.mjs
  var import_element281 = __toESM(require_element(), 1);

  // packages/block-editor/build-module/components/dimensions-tool/scale-tool.mjs
  var import_components278 = __toESM(require_components(), 1);
  var import_element280 = __toESM(require_element(), 1);
  var import_i18n244 = __toESM(require_i18n(), 1);
  var import_jsx_runtime468 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_SCALE_OPTIONS = [
    {
      value: "fill",
      label: (0, import_i18n244._x)("Fill", "Scale option for dimensions control"),
      help: (0, import_i18n244.__)("Fill the space by stretching the content.")
    },
    {
      value: "contain",
      label: (0, import_i18n244._x)("Contain", "Scale option for dimensions control"),
      help: (0, import_i18n244.__)("Fit the content to the space without clipping.")
    },
    {
      value: "cover",
      label: (0, import_i18n244._x)("Cover", "Scale option for dimensions control"),
      help: (0, import_i18n244.__)("Fill the space by clipping what doesn't fit.")
    },
    {
      value: "none",
      label: (0, import_i18n244._x)("None", "Scale option for dimensions control"),
      help: (0, import_i18n244.__)(
        "Do not adjust the sizing of the content. Content that is too large will be clipped, and content that is too small will have additional padding."
      )
    },
    {
      value: "scale-down",
      label: (0, import_i18n244._x)("Scale down", "Scale option for dimensions control"),
      help: (0, import_i18n244.__)(
        "Scale down the content to fit the space if it is too big. Content that is too small will have additional padding."
      )
    }
  ];
  function ScaleTool({
    panelId,
    value,
    onChange,
    options = DEFAULT_SCALE_OPTIONS,
    defaultValue = DEFAULT_SCALE_OPTIONS[0].value,
    isShownByDefault = true
  }) {
    const displayValue = value ?? "fill";
    const scaleHelp = (0, import_element280.useMemo)(() => {
      return options.reduce((acc, option) => {
        acc[option.value] = option.help;
        return acc;
      }, {});
    }, [options]);
    return /* @__PURE__ */ (0, import_jsx_runtime468.jsx)(
      import_components278.__experimentalToolsPanelItem,
      {
        label: (0, import_i18n244._x)("Scale", "Image scaling options"),
        isShownByDefault,
        hasValue: () => displayValue !== defaultValue,
        onDeselect: () => onChange(defaultValue),
        panelId,
        children: /* @__PURE__ */ (0, import_jsx_runtime468.jsx)(
          import_components278.__experimentalToggleGroupControl,
          {
            label: (0, import_i18n244._x)("Scale", "Image scaling options"),
            isBlock: true,
            help: scaleHelp[displayValue],
            value: displayValue,
            onChange,
            size: "__unstable-large",
            children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime468.jsx)(
              import_components278.__experimentalToggleGroupControlOption,
              {
                ...option
              },
              option.value
            ))
          }
        )
      }
    );
  }

  // packages/block-editor/build-module/components/dimensions-tool/width-height-tool.mjs
  var import_components279 = __toESM(require_components(), 1);
  var import_i18n245 = __toESM(require_i18n(), 1);
  var import_jsx_runtime469 = __toESM(require_jsx_runtime(), 1);
  function WidthHeightTool({
    panelId,
    value = {},
    onChange = () => {
    },
    units: units2,
    isShownByDefault = true
  }) {
    const width = value.width === "auto" ? "" : value.width ?? "";
    const height = value.height === "auto" ? "" : value.height ?? "";
    const onDimensionChange = (dimension) => (nextDimension) => {
      const nextValue = { ...value };
      if (!nextDimension) {
        delete nextValue[dimension];
      } else {
        nextValue[dimension] = nextDimension;
      }
      onChange(nextValue);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime469.jsxs)(import_jsx_runtime469.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime469.jsx)(
        import_components279.__experimentalToolsPanelItem,
        {
          style: { gridColumn: "span 1" },
          label: (0, import_i18n245.__)("Width"),
          isShownByDefault,
          hasValue: () => width !== "",
          onDeselect: onDimensionChange("width"),
          panelId,
          children: /* @__PURE__ */ (0, import_jsx_runtime469.jsx)(
            import_components279.__experimentalUnitControl,
            {
              label: (0, import_i18n245.__)("Width"),
              placeholder: (0, import_i18n245.__)("Auto"),
              labelPosition: "top",
              units: units2,
              min: 0,
              value: width,
              onChange: onDimensionChange("width"),
              size: "__unstable-large"
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime469.jsx)(
        import_components279.__experimentalToolsPanelItem,
        {
          style: { gridColumn: "span 1" },
          label: (0, import_i18n245.__)("Height"),
          isShownByDefault,
          hasValue: () => height !== "",
          onDeselect: onDimensionChange("height"),
          panelId,
          children: /* @__PURE__ */ (0, import_jsx_runtime469.jsx)(
            import_components279.__experimentalUnitControl,
            {
              label: (0, import_i18n245.__)("Height"),
              placeholder: (0, import_i18n245.__)("Auto"),
              labelPosition: "top",
              units: units2,
              min: 0,
              value: height,
              onChange: onDimensionChange("height"),
              size: "__unstable-large"
            }
          )
        }
      )
    ] });
  }

  // packages/block-editor/build-module/components/dimensions-tool/index.mjs
  var import_jsx_runtime470 = __toESM(require_jsx_runtime(), 1);
  function DimensionsTool({
    panelId,
    value = {},
    onChange = () => {
    },
    aspectRatioOptions,
    // Default options handled by AspectRatioTool.
    defaultAspectRatio = "auto",
    // Match CSS default value for aspect-ratio.
    scaleOptions,
    // Default options handled by ScaleTool.
    defaultScale = "fill",
    // Match CSS default value for object-fit.
    unitsOptions,
    // Default options handled by UnitControl.
    tools = ["aspectRatio", "widthHeight", "scale"]
  }) {
    const width = value.width === void 0 || value.width === "auto" ? null : value.width;
    const height = value.height === void 0 || value.height === "auto" ? null : value.height;
    const aspectRatio = value.aspectRatio === void 0 || value.aspectRatio === "auto" ? null : value.aspectRatio;
    const scale = value.scale === void 0 || value.scale === "fill" ? null : value.scale;
    const [lastScale, setLastScale] = (0, import_element281.useState)(scale);
    const [lastAspectRatio, setLastAspectRatio] = (0, import_element281.useState)(aspectRatio);
    const aspectRatioValue = width && height ? "custom" : lastAspectRatio;
    const showScaleControl = aspectRatio || width && height;
    return /* @__PURE__ */ (0, import_jsx_runtime470.jsxs)(import_jsx_runtime470.Fragment, { children: [
      tools.includes("aspectRatio") && /* @__PURE__ */ (0, import_jsx_runtime470.jsx)(
        AspectRatioTool,
        {
          panelId,
          options: aspectRatioOptions,
          defaultValue: defaultAspectRatio,
          value: aspectRatioValue,
          onChange: (nextAspectRatio) => {
            const nextValue = { ...value };
            nextAspectRatio = nextAspectRatio === "auto" ? null : nextAspectRatio;
            setLastAspectRatio(nextAspectRatio);
            if (!nextAspectRatio) {
              delete nextValue.aspectRatio;
            } else {
              nextValue.aspectRatio = nextAspectRatio;
            }
            if (!nextAspectRatio) {
              delete nextValue.scale;
            } else if (lastScale) {
              nextValue.scale = lastScale;
            } else {
              nextValue.scale = defaultScale;
              setLastScale(defaultScale);
            }
            if ("custom" !== nextAspectRatio && width && height) {
              delete nextValue.height;
            }
            onChange(nextValue);
          }
        }
      ),
      tools.includes("widthHeight") && /* @__PURE__ */ (0, import_jsx_runtime470.jsx)(
        WidthHeightTool,
        {
          panelId,
          units: unitsOptions,
          value: { width, height },
          onChange: ({ width: nextWidth, height: nextHeight }) => {
            const nextValue = { ...value };
            nextWidth = nextWidth === "auto" ? null : nextWidth;
            nextHeight = nextHeight === "auto" ? null : nextHeight;
            if (!nextWidth) {
              delete nextValue.width;
            } else {
              nextValue.width = nextWidth;
            }
            if (!nextHeight) {
              delete nextValue.height;
            } else {
              nextValue.height = nextHeight;
            }
            if (nextWidth && nextHeight) {
              delete nextValue.aspectRatio;
            } else if (lastAspectRatio) {
              nextValue.aspectRatio = lastAspectRatio;
            } else {
            }
            if (!lastAspectRatio && !!nextWidth !== !!nextHeight) {
              delete nextValue.scale;
            } else if (lastScale) {
              nextValue.scale = lastScale;
            } else {
              nextValue.scale = defaultScale;
              setLastScale(defaultScale);
            }
            onChange(nextValue);
          }
        }
      ),
      tools.includes("scale") && showScaleControl && /* @__PURE__ */ (0, import_jsx_runtime470.jsx)(
        ScaleTool,
        {
          panelId,
          options: scaleOptions,
          defaultValue: defaultScale,
          value: lastScale,
          onChange: (nextScale) => {
            const nextValue = { ...value };
            nextScale = nextScale === "fill" ? null : nextScale;
            setLastScale(nextScale);
            if (!nextScale) {
              delete nextValue.scale;
            } else {
              nextValue.scale = nextScale;
            }
            onChange(nextValue);
          }
        }
      )
    ] });
  }
  var dimensions_tool_default = DimensionsTool;

  // packages/block-editor/build-module/components/resolution-tool/index.mjs
  var import_components280 = __toESM(require_components(), 1);
  var import_i18n246 = __toESM(require_i18n(), 1);
  var import_jsx_runtime471 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_SIZE_OPTIONS = [
    {
      label: (0, import_i18n246._x)("Thumbnail", "Image size option for resolution control"),
      value: "thumbnail"
    },
    {
      label: (0, import_i18n246._x)("Medium", "Image size option for resolution control"),
      value: "medium"
    },
    {
      label: (0, import_i18n246._x)("Large", "Image size option for resolution control"),
      value: "large"
    },
    {
      label: (0, import_i18n246._x)("Full Size", "Image size option for resolution control"),
      value: "full"
    }
  ];
  function ResolutionTool({
    panelId,
    value,
    onChange,
    options = DEFAULT_SIZE_OPTIONS,
    defaultValue = DEFAULT_SIZE_OPTIONS[0].value,
    isShownByDefault = true,
    resetAllFilter
  }) {
    const displayValue = value ?? defaultValue;
    return /* @__PURE__ */ (0, import_jsx_runtime471.jsx)(
      import_components280.__experimentalToolsPanelItem,
      {
        hasValue: () => displayValue !== defaultValue,
        label: (0, import_i18n246.__)("Resolution"),
        onDeselect: () => onChange(defaultValue),
        isShownByDefault,
        panelId,
        resetAllFilter,
        children: /* @__PURE__ */ (0, import_jsx_runtime471.jsx)(
          import_components280.SelectControl,
          {
            label: (0, import_i18n246.__)("Resolution"),
            value: displayValue,
            options,
            onChange,
            help: (0, import_i18n246.__)("Select the size of the source image."),
            size: "__unstable-large"
          }
        )
      }
    );
  }

  // packages/block-editor/build-module/components/html-element-control/index.mjs
  var import_i18n248 = __toESM(require_i18n(), 1);
  var import_components281 = __toESM(require_components(), 1);
  var import_data198 = __toESM(require_data(), 1);

  // packages/block-editor/build-module/components/html-element-control/messages.mjs
  var import_i18n247 = __toESM(require_i18n(), 1);
  var htmlElementMessages = {
    a: (0, import_i18n247.__)(
      "The <a> element should be used for links that navigate to a different page or to a different section within the same page."
    ),
    article: (0, import_i18n247.__)(
      "The <article> element should represent a self-contained, syndicatable portion of the document."
    ),
    aside: (0, import_i18n247.__)(
      "The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."
    ),
    button: (0, import_i18n247.__)(
      "The <button> element should be used for interactive controls that perform an action on the current page, such as opening a modal or toggling content visibility."
    ),
    div: (0, import_i18n247.__)(
      "The <div> element should only be used if the block is a design element with no semantic meaning."
    ),
    footer: (0, import_i18n247.__)(
      "The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.)."
    ),
    header: (0, import_i18n247.__)(
      "The <header> element should represent introductory content, typically a group of introductory or navigational aids."
    ),
    main: (0, import_i18n247.__)(
      "The <main> element should be used for the primary content of your document only."
    ),
    nav: (0, import_i18n247.__)(
      "The <nav> element should be used to identify groups of links that are intended to be used for website or page content navigation."
    ),
    section: (0, import_i18n247.__)(
      "The <section> element should represent a standalone portion of the document that can't be better represented by another element."
    )
  };

  // packages/block-editor/build-module/components/html-element-control/index.mjs
  var import_jsx_runtime472 = __toESM(require_jsx_runtime(), 1);
  function HTMLElementControl({
    tagName,
    onChange,
    clientId,
    options = [
      { label: (0, import_i18n248.__)("Default (<div>)"), value: "div" },
      { label: "<header>", value: "header" },
      { label: "<main>", value: "main" },
      { label: "<section>", value: "section" },
      { label: "<article>", value: "article" },
      { label: "<aside>", value: "aside" },
      { label: "<footer>", value: "footer" }
    ]
  }) {
    const checkForMainTag = !!clientId && options.some((option) => option.value === "main");
    const hasMainElementElsewhere = (0, import_data198.useSelect)(
      (select3) => {
        if (!checkForMainTag) {
          return false;
        }
        const { getClientIdsWithDescendants: getClientIdsWithDescendants2, getBlockAttributes: getBlockAttributes3 } = select3(store);
        return getClientIdsWithDescendants2().some((id) => {
          if (id === clientId) {
            return false;
          }
          return getBlockAttributes3(id)?.tagName === "main";
        });
      },
      [clientId, checkForMainTag]
    );
    const modifiedOptions = options.map((option) => {
      if (option.value === "main" && hasMainElementElsewhere && tagName !== "main") {
        return {
          ...option,
          disabled: true,
          label: (0, import_i18n248.sprintf)(
            /* translators: %s: HTML element name */
            (0, import_i18n248.__)("%s (Already in use)"),
            option.label
          )
        };
      }
      return option;
    });
    return /* @__PURE__ */ (0, import_jsx_runtime472.jsxs)(import_components281.__experimentalVStack, { spacing: 2, className: "block-editor-html-element-control", children: [
      /* @__PURE__ */ (0, import_jsx_runtime472.jsx)(
        import_components281.SelectControl,
        {
          __next40pxDefaultSize: true,
          label: (0, import_i18n248.__)("HTML element"),
          options: modifiedOptions,
          value: tagName,
          onChange,
          help: htmlElementMessages[tagName]
        }
      ),
      tagName === "main" && hasMainElementElsewhere && /* @__PURE__ */ (0, import_jsx_runtime472.jsx)(import_components281.Notice, { status: "warning", isDismissible: false, children: (0, import_i18n248.__)(
        "Multiple <main> elements detected. The duplicate may be in your content or template. This is not valid HTML and may cause accessibility issues. Please change this HTML element."
      ) })
    ] });
  }

  // packages/block-editor/build-module/components/link-picker/link-picker.mjs
  var import_components283 = __toESM(require_components(), 1);
  var import_element282 = __toESM(require_element(), 1);
  var import_i18n249 = __toESM(require_i18n(), 1);

  // packages/block-editor/build-module/components/link-picker/link-preview.mjs
  var import_components282 = __toESM(require_components(), 1);
  var import_dom41 = __toESM(require_dom(), 1);
  var import_jsx_runtime473 = __toESM(require_jsx_runtime(), 1);
  var { Badge: Badge6 } = unlock(import_components282.privateApis);
  function LinkPreview2({ title, url, image, badges }) {
    return /* @__PURE__ */ (0, import_jsx_runtime473.jsxs)(import_components282.__experimentalHStack, { justify: "space-between", alignment: "top", children: [
      /* @__PURE__ */ (0, import_jsx_runtime473.jsx)(import_components282.FlexItem, { className: "link-preview-button__content", children: /* @__PURE__ */ (0, import_jsx_runtime473.jsxs)(import_components282.__experimentalHStack, { alignment: "top", children: [
        image && /* @__PURE__ */ (0, import_jsx_runtime473.jsx)(import_components282.FlexItem, { className: "link-preview-button__image-container", children: /* @__PURE__ */ (0, import_jsx_runtime473.jsx)(
          "img",
          {
            className: "link-preview-button__image",
            src: image,
            alt: ""
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime473.jsxs)(
          import_components282.__experimentalVStack,
          {
            className: "link-preview-button__details",
            alignment: "topLeft",
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime473.jsx)(
                import_components282.__experimentalTruncate,
                {
                  numberOfLines: 1,
                  className: "link-preview-button__title",
                  children: (0, import_dom41.__unstableStripHTML)(title)
                }
              ),
              url && /* @__PURE__ */ (0, import_jsx_runtime473.jsx)(
                import_components282.__experimentalTruncate,
                {
                  numberOfLines: 1,
                  className: "link-preview-button__hint",
                  children: url
                }
              ),
              badges && badges.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime473.jsx)(
                import_components282.__experimentalHStack,
                {
                  className: "link-preview-button__badges",
                  alignment: "left",
                  children: badges.map((badge) => /* @__PURE__ */ (0, import_jsx_runtime473.jsx)(
                    Badge6,
                    {
                      intent: badge.intent,
                      children: badge.label
                    },
                    `${badge.label}|${badge.intent}`
                  ))
                }
              )
            ]
          }
        )
      ] }) }),
      /* @__PURE__ */ (0, import_jsx_runtime473.jsx)(icon_default, { icon: chevron_down_default, className: "link-preview-button__icon" })
    ] });
  }

  // packages/block-editor/build-module/components/link-picker/link-picker.mjs
  var import_jsx_runtime474 = __toESM(require_jsx_runtime(), 1);
  function LinkPicker({
    preview,
    onSelect,
    suggestionsQuery,
    label,
    help
  }) {
    const [isOpen, setIsOpen] = (0, import_element282.useState)(false);
    const instanceId = (0, import_element282.useId)();
    const dialogTitleId = `link-picker-title-${instanceId}`;
    const dialogDescriptionId = `link-picker-description-${instanceId}`;
    const anchorRef = (0, import_element282.useRef)(null);
    const { baseControlProps, controlProps } = (0, import_components283.useBaseControlProps)({
      help
    });
    const handleChange = (newValue) => {
      setIsOpen(false);
      if (newValue) {
        const suggestion = {
          url: newValue.url,
          kind: newValue.kind,
          type: newValue.type,
          id: newValue.id,
          title: newValue.title
        };
        onSelect(suggestion);
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime474.jsxs)(import_components283.BaseControl, { ...baseControlProps, children: [
      /* @__PURE__ */ (0, import_jsx_runtime474.jsx)(import_components283.BaseControl.VisualLabel, { children: label }),
      /* @__PURE__ */ (0, import_jsx_runtime474.jsxs)(
        import_components283.Button,
        {
          ref: anchorRef,
          onClick: () => setIsOpen(!isOpen),
          "aria-haspopup": "dialog",
          "aria-expanded": isOpen,
          "aria-describedby": controlProps["aria-describedby"],
          variant: "secondary",
          __next40pxDefaultSize: true,
          className: "link-preview-button",
          children: [
            label && /* @__PURE__ */ (0, import_jsx_runtime474.jsxs)(import_components283.VisuallyHidden, { children: [
              label,
              ":"
            ] }),
            /* @__PURE__ */ (0, import_jsx_runtime474.jsx)(
              LinkPreview2,
              {
                title: preview.title || (0, import_i18n249.__)("Add link"),
                url: preview.url,
                image: preview.image,
                badges: preview.badges
              }
            )
          ]
        }
      ),
      isOpen && /* @__PURE__ */ (0, import_jsx_runtime474.jsx)(
        import_components283.Popover,
        {
          anchor: anchorRef.current,
          onClose: () => setIsOpen(false),
          placement: "left-start",
          offset: 36,
          shift: true,
          children: /* @__PURE__ */ (0, import_jsx_runtime474.jsxs)(
            "div",
            {
              role: "dialog",
              "aria-labelledby": dialogTitleId,
              "aria-describedby": dialogDescriptionId,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime474.jsxs)(import_components283.VisuallyHidden, { children: [
                  /* @__PURE__ */ (0, import_jsx_runtime474.jsx)("h2", { id: dialogTitleId, children: (0, import_i18n249.__)("Select a link") }),
                  /* @__PURE__ */ (0, import_jsx_runtime474.jsx)("p", { id: dialogDescriptionId, children: (0, import_i18n249.__)(
                    "Search for and add a link to the navigation item."
                  ) })
                ] }),
                /* @__PURE__ */ (0, import_jsx_runtime474.jsx)(
                  link_control_default,
                  {
                    value: null,
                    onChange: handleChange,
                    suggestionsQuery,
                    showInitialSuggestions: true,
                    forceIsEditingLink: true,
                    settings: []
                  }
                )
              ]
            }
          )
        }
      )
    ] });
  }

  // packages/block-editor/build-module/private-apis.mjs
  var privateApis13 = {};
  lock(privateApis13, {
    ...global_styles_exports,
    ExperimentalBlockCanvas,
    BlockCanvasCover,
    ExperimentalBlockEditorProvider,
    getDuotoneFilter,
    getRichTextValues,
    PrivateQuickInserter: QuickInserter,
    extractWords,
    getNormalizedSearchTerms,
    normalizeString,
    PrivateListView,
    ResizableBoxPopover,
    InspectorControlsLastItem: last_item_default,
    useHasBlockToolbar,
    cleanEmptyObject,
    usePrivateStyleOverride,
    BlockQuickNavigation,
    LayoutStyle,
    BlockManager,
    BlockRemovalWarningModal,
    useLayoutClasses,
    useLayoutStyles,
    DimensionsTool: dimensions_tool_default,
    ResolutionTool,
    TabbedSidebar: tabbed_sidebar_default,
    TextAlignmentControl,
    usesContextKey,
    useFlashEditableBlocks,
    HTMLElementControl,
    useZoomOut,
    globalStylesDataKey,
    globalStylesLinksDataKey,
    selectBlockPatternsKey,
    requiresWrapperOnCopy,
    PrivateRichText,
    PrivateInserterLibrary,
    reusableBlocksSelectKey,
    PrivateBlockPopover,
    PrivatePublishDateTimePicker,
    useSpacingSizes,
    useBlockDisplayTitle,
    __unstableBlockStyleVariationOverridesWithConfig,
    setBackgroundStyleDefaults: setBackgroundStyleDefaults2,
    sectionRootClientIdKey,
    CommentIconSlotFill: block_comment_icon_slot_default,
    CommentIconToolbarSlotFill: block_comment_icon_toolbar_slot_default,
    mediaEditKey,
    getMediaSelectKey,
    deviceTypeKey,
    isIsolatedEditorKey,
    isNavigationOverlayContextKey,
    mediaUploadOnSuccessKey,
    useBlockElement,
    useBlockElementRef,
    LinkPicker,
    useRemoteUrlData: use_rich_url_data_default,
    PrivateBlockContext,
    useListViewPanelState,
    isHashLink,
    isRelativePath
  });
  return __toCommonJS(index_exports);
})();
/*! Bundled license information:

react-is/cjs/react-is.development.js:
  (** @license React v16.13.1
   * react-is.development.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

object-assign/index.js:
  (*
  object-assign
  (c) Sindre Sorhus
  @license MIT
  *)

autosize/dist/autosize.js:
  (*!
  	autosize 4.0.2
  	license: MIT
  	http://www.jacklmoore.com/autosize
  *)

normalize-wheel/src/isEventSupported.js:
  (**
   * Checks if an event is supported in the current execution environment.
   *
   * NOTE: This will not work correctly for non-generic events such as `change`,
   * `reset`, `load`, `error`, and `select`.
   *
   * Borrows from Modernizr.
   *
   * @param {string} eventNameSuffix Event name, e.g. "click".
   * @param {?boolean} capture Check if the capture phase is supported.
   * @return {boolean} True if the event is supported.
   * @internal
   * @license Modernizr 3.0.0pre (Custom Build) | MIT
   *)
*/
                                                                                                                                                                                                   dist/block-editor.min.js                                                                            0000644                 00004016261 15212563763 0011231 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).blockEditor=(()=>{var Gme=Object.create;var l0=Object.defineProperty;var Wme=Object.getOwnPropertyDescriptor;var $me=Object.getOwnPropertyNames;var Kme=Object.getPrototypeOf,Yme=Object.prototype.hasOwnProperty;var oe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ip=(e,t)=>{for(var o in t)l0(e,o,{get:t[o],enumerable:!0})},l6=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of $me(t))!Yme.call(e,n)&&n!==o&&l0(e,n,{get:()=>t[n],enumerable:!(r=Wme(t,n))||r.enumerable});return e};var l=(e,t,o)=>(o=e!=null?Gme(Kme(e)):{},l6(t||!e||!e.__esModule?l0(o,"default",{value:e,enumerable:!0}):o,e)),qme=e=>l6(l0({},"__esModule",{value:!0}),e);var $=oe((hLe,u6)=>{u6.exports=window.wp.blocks});var R=oe((gLe,d6)=>{d6.exports=window.wp.element});var F=oe((bLe,f6)=>{f6.exports=window.wp.data});var Z=oe((kLe,m6)=>{m6.exports=window.wp.compose});var ut=oe((vLe,p6)=>{p6.exports=window.wp.hooks});var A=oe((wLe,C6)=>{C6.exports=window.wp.components});var CO=oe((CLe,B6)=>{B6.exports=window.wp.privateApis});var Re=oe((OLe,R6)=>{R6.exports=window.wp.deprecated});var w=oe((ALe,O6)=>{O6.exports=window.ReactJSXRuntime});var dn=oe((NLe,L6)=>{L6.exports=window.wp.url});var N=oe(($Le,j6)=>{j6.exports=window.wp.i18n});var yf=oe((KLe,U6)=>{"use strict";U6.exports=function e(t,o){if(t===o)return!0;if(t&&o&&typeof t=="object"&&typeof o=="object"){if(t.constructor!==o.constructor)return!1;var r,n,i;if(Array.isArray(t)){if(r=t.length,r!=o.length)return!1;for(n=r;n--!==0;)if(!e(t[n],o[n]))return!1;return!0}if(t instanceof Map&&o instanceof Map){if(t.size!==o.size)return!1;for(n of t.entries())if(!o.has(n[0]))return!1;for(n of t.entries())if(!e(n[1],o.get(n[0])))return!1;return!0}if(t instanceof Set&&o instanceof Set){if(t.size!==o.size)return!1;for(n of t.entries())if(!o.has(n[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(o)){if(r=t.length,r!=o.length)return!1;for(n=r;n--!==0;)if(t[n]!==o[n])return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===o.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===o.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(o).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,i[n]))return!1;for(n=r;n--!==0;){var s=i[n];if(!e(t[s],o[s]))return!1}return!0}return t!==t&&o!==o}});var q=oe((rNe,J6)=>{J6.exports=window.wp.primitives});var dr=oe((wVe,ej)=>{ej.exports=window.wp.richText});var oj=oe((CVe,tj)=>{tj.exports=window.wp.blockSerializationDefaultParser});var Xo=oe((t3e,Vj)=>{Vj.exports=window.wp.a11y});var Un=oe((o3e,Gj)=>{Gj.exports=window.wp.notices});var Zp=oe((r3e,Wj)=>{Wj.exports=window.wp.preferences});var TU=oe((oFe,Kw)=>{var CU={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u1EA4:"A",\u1EAE:"A",\u1EB2:"A",\u1EB4:"A",\u1EB6:"A",\u00C6:"AE",\u1EA6:"A",\u1EB0:"A",\u0202:"A",\u1EA2:"A",\u1EA0:"A",\u1EA8:"A",\u1EAA:"A",\u1EAC:"A",\u00C7:"C",\u1E08:"C",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u1EBE:"E",\u1E16:"E",\u1EC0:"E",\u1E14:"E",\u1E1C:"E",\u0206:"E",\u1EBA:"E",\u1EBC:"E",\u1EB8:"E",\u1EC2:"E",\u1EC4:"E",\u1EC6:"E",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u1E2E:"I",\u020A:"I",\u1EC8:"I",\u1ECA:"I",\u00D0:"D",\u00D1:"N",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u1ED0:"O",\u1E4C:"O",\u1E52:"O",\u020E:"O",\u1ECE:"O",\u1ECC:"O",\u1ED4:"O",\u1ED6:"O",\u1ED8:"O",\u1EDC:"O",\u1EDE:"O",\u1EE0:"O",\u1EDA:"O",\u1EE2:"O",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u1EE6:"U",\u1EE4:"U",\u1EEC:"U",\u1EEE:"U",\u1EF0:"U",\u00DD:"Y",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u1EA5:"a",\u1EAF:"a",\u1EB3:"a",\u1EB5:"a",\u1EB7:"a",\u00E6:"ae",\u1EA7:"a",\u1EB1:"a",\u0203:"a",\u1EA3:"a",\u1EA1:"a",\u1EA9:"a",\u1EAB:"a",\u1EAD:"a",\u00E7:"c",\u1E09:"c",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u1EBF:"e",\u1E17:"e",\u1EC1:"e",\u1E15:"e",\u1E1D:"e",\u0207:"e",\u1EBB:"e",\u1EBD:"e",\u1EB9:"e",\u1EC3:"e",\u1EC5:"e",\u1EC7:"e",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u1E2F:"i",\u020B:"i",\u1EC9:"i",\u1ECB:"i",\u00F0:"d",\u00F1:"n",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u1ED1:"o",\u1E4D:"o",\u1E53:"o",\u020F:"o",\u1ECF:"o",\u1ECD:"o",\u1ED5:"o",\u1ED7:"o",\u1ED9:"o",\u1EDD:"o",\u1EDF:"o",\u1EE1:"o",\u1EDB:"o",\u1EE3:"o",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u1EE7:"u",\u1EE5:"u",\u1EED:"u",\u1EEF:"u",\u1EF1:"u",\u00FD:"y",\u00FF:"y",\u0100:"A",\u0101:"a",\u0102:"A",\u0103:"a",\u0104:"A",\u0105:"a",\u0106:"C",\u0107:"c",\u0108:"C",\u0109:"c",\u010A:"C",\u010B:"c",\u010C:"C",\u010D:"c",C\u0306:"C",c\u0306:"c",\u010E:"D",\u010F:"d",\u0110:"D",\u0111:"d",\u0112:"E",\u0113:"e",\u0114:"E",\u0115:"e",\u0116:"E",\u0117:"e",\u0118:"E",\u0119:"e",\u011A:"E",\u011B:"e",\u011C:"G",\u01F4:"G",\u011D:"g",\u01F5:"g",\u011E:"G",\u011F:"g",\u0120:"G",\u0121:"g",\u0122:"G",\u0123:"g",\u0124:"H",\u0125:"h",\u0126:"H",\u0127:"h",\u1E2A:"H",\u1E2B:"h",\u0128:"I",\u0129:"i",\u012A:"I",\u012B:"i",\u012C:"I",\u012D:"i",\u012E:"I",\u012F:"i",\u0130:"I",\u0131:"i",\u0132:"IJ",\u0133:"ij",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u1E30:"K",\u1E31:"k",K\u0306:"K",k\u0306:"k",\u0139:"L",\u013A:"l",\u013B:"L",\u013C:"l",\u013D:"L",\u013E:"l",\u013F:"L",\u0140:"l",\u0141:"l",\u0142:"l",\u1E3E:"M",\u1E3F:"m",M\u0306:"M",m\u0306:"m",\u0143:"N",\u0144:"n",\u0145:"N",\u0146:"n",\u0147:"N",\u0148:"n",\u0149:"n",N\u0306:"N",n\u0306:"n",\u014C:"O",\u014D:"o",\u014E:"O",\u014F:"o",\u0150:"O",\u0151:"o",\u0152:"OE",\u0153:"oe",P\u0306:"P",p\u0306:"p",\u0154:"R",\u0155:"r",\u0156:"R",\u0157:"r",\u0158:"R",\u0159:"r",R\u0306:"R",r\u0306:"r",\u0212:"R",\u0213:"r",\u015A:"S",\u015B:"s",\u015C:"S",\u015D:"s",\u015E:"S",\u0218:"S",\u0219:"s",\u015F:"s",\u0160:"S",\u0161:"s",\u0162:"T",\u0163:"t",\u021B:"t",\u021A:"T",\u0164:"T",\u0165:"t",\u0166:"T",\u0167:"t",T\u0306:"T",t\u0306:"t",\u0168:"U",\u0169:"u",\u016A:"U",\u016B:"u",\u016C:"U",\u016D:"u",\u016E:"U",\u016F:"u",\u0170:"U",\u0171:"u",\u0172:"U",\u0173:"u",\u0216:"U",\u0217:"u",V\u0306:"V",v\u0306:"v",\u0174:"W",\u0175:"w",\u1E82:"W",\u1E83:"w",X\u0306:"X",x\u0306:"x",\u0176:"Y",\u0177:"y",\u0178:"Y",Y\u0306:"Y",y\u0306:"y",\u0179:"Z",\u017A:"z",\u017B:"Z",\u017C:"z",\u017D:"Z",\u017E:"z",\u017F:"s",\u0192:"f",\u01A0:"O",\u01A1:"o",\u01AF:"U",\u01B0:"u",\u01CD:"A",\u01CE:"a",\u01CF:"I",\u01D0:"i",\u01D1:"O",\u01D2:"o",\u01D3:"U",\u01D4:"u",\u01D5:"U",\u01D6:"u",\u01D7:"U",\u01D8:"u",\u01D9:"U",\u01DA:"u",\u01DB:"U",\u01DC:"u",\u1EE8:"U",\u1EE9:"u",\u1E78:"U",\u1E79:"u",\u01FA:"A",\u01FB:"a",\u01FC:"AE",\u01FD:"ae",\u01FE:"O",\u01FF:"o",\u00DE:"TH",\u00FE:"th",\u1E54:"P",\u1E55:"p",\u1E64:"S",\u1E65:"s",X\u0301:"X",x\u0301:"x",\u0403:"\u0413",\u0453:"\u0433",\u040C:"\u041A",\u045C:"\u043A",A\u030B:"A",a\u030B:"a",E\u030B:"E",e\u030B:"e",I\u030B:"I",i\u030B:"i",\u01F8:"N",\u01F9:"n",\u1ED2:"O",\u1ED3:"o",\u1E50:"O",\u1E51:"o",\u1EEA:"U",\u1EEB:"u",\u1E80:"W",\u1E81:"w",\u1EF2:"Y",\u1EF3:"y",\u0200:"A",\u0201:"a",\u0204:"E",\u0205:"e",\u0208:"I",\u0209:"i",\u020C:"O",\u020D:"o",\u0210:"R",\u0211:"r",\u0214:"U",\u0215:"u",B\u030C:"B",b\u030C:"b",\u010C\u0323:"C",\u010D\u0323:"c",\u00CA\u030C:"E",\u00EA\u030C:"e",F\u030C:"F",f\u030C:"f",\u01E6:"G",\u01E7:"g",\u021E:"H",\u021F:"h",J\u030C:"J",\u01F0:"j",\u01E8:"K",\u01E9:"k",M\u030C:"M",m\u030C:"m",P\u030C:"P",p\u030C:"p",Q\u030C:"Q",q\u030C:"q",\u0158\u0329:"R",\u0159\u0329:"r",\u1E66:"S",\u1E67:"s",V\u030C:"V",v\u030C:"v",W\u030C:"W",w\u030C:"w",X\u030C:"X",x\u030C:"x",Y\u030C:"Y",y\u030C:"y",A\u0327:"A",a\u0327:"a",B\u0327:"B",b\u0327:"b",\u1E10:"D",\u1E11:"d",\u0228:"E",\u0229:"e",\u0190\u0327:"E",\u025B\u0327:"e",\u1E28:"H",\u1E29:"h",I\u0327:"I",i\u0327:"i",\u0197\u0327:"I",\u0268\u0327:"i",M\u0327:"M",m\u0327:"m",O\u0327:"O",o\u0327:"o",Q\u0327:"Q",q\u0327:"q",U\u0327:"U",u\u0327:"u",X\u0327:"X",x\u0327:"x",Z\u0327:"Z",z\u0327:"z",\u0439:"\u0438",\u0419:"\u0418",\u0451:"\u0435",\u0401:"\u0415"},BU=Object.keys(CU).join("|"),ave=new RegExp(BU,"g"),lve=new RegExp(BU,"");function cve(e){return CU[e]}var EU=function(e){return e.replace(ave,cve)},uve=function(e){return!!e.match(lve)};Kw.exports=EU;Kw.exports.has=uve;Kw.exports.remove=EU});var zU=oe((wFe,FU)=>{FU.exports=window.wp.apiFetch});var SM=oe((CFe,jU)=>{jU.exports=window.wp.htmlEntities});var Uv=oe((XFe,aH)=>{aH.exports=window.wp.styleEngine});var it=oe((Z4e,PH)=>{PH.exports=window.wp.keycodes});var Fe=oe((hze,GH)=>{GH.exports=window.wp.dom});var $H=oe(NM=>{"use strict";Object.defineProperty(NM,"__esModule",{value:!0});NM.default=WH;function WH(){}WH.prototype={diff:function(t,o){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=r.callback;typeof r=="function"&&(n=r,r={}),this.options=r;var i=this;function s(g){return n?(setTimeout(function(){n(void 0,g)},0),!0):g}t=this.castInput(t),o=this.castInput(o),t=this.removeEmpty(this.tokenize(t)),o=this.removeEmpty(this.tokenize(o));var a=o.length,c=t.length,u=1,d=a+c,f=[{newPos:-1,components:[]}],m=this.extractCommon(f[0],o,t,0);if(f[0].newPos+1>=a&&m+1>=c)return s([{value:this.join(o),count:o.length}]);function h(){for(var g=-1*u;g<=u;g+=2){var b=void 0,v=f[g-1],k=f[g+1],y=(k?k.newPos:0)-g;v&&(f[g-1]=void 0);var S=v&&v.newPos+1<a,x=k&&0<=y&&y<c;if(!S&&!x){f[g]=void 0;continue}if(!S||x&&v.newPos<k.newPos?(b=rye(k),i.pushComponent(b.components,void 0,!0)):(b=v,b.newPos++,i.pushComponent(b.components,!0,void 0)),y=i.extractCommon(b,o,t,g),b.newPos+1>=a&&y+1>=c)return s(oye(i,b.components,o,t,i.useLongestToken));f[g]=b}u++}if(n)(function g(){setTimeout(function(){if(u>d)return n();h()||g()},0)})();else for(;u<=d;){var p=h();if(p)return p}},pushComponent:function(t,o,r){var n=t[t.length-1];n&&n.added===o&&n.removed===r?t[t.length-1]={count:n.count+1,added:o,removed:r}:t.push({count:1,added:o,removed:r})},extractCommon:function(t,o,r,n){for(var i=o.length,s=r.length,a=t.newPos,c=a-n,u=0;a+1<i&&c+1<s&&this.equals(o[a+1],r[c+1]);)a++,c++,u++;return u&&t.components.push({count:u}),t.newPos=a,c},equals:function(t,o){return this.options.comparator?this.options.comparator(t,o):t===o||this.options.ignoreCase&&t.toLowerCase()===o.toLowerCase()},removeEmpty:function(t){for(var o=[],r=0;r<t.length;r++)t[r]&&o.push(t[r]);return o},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function oye(e,t,o,r,n){for(var i=0,s=t.length,a=0,c=0;i<s;i++){var u=t[i];if(u.removed){if(u.value=e.join(r.slice(c,c+u.count)),c+=u.count,i&&t[i-1].added){var f=t[i-1];t[i-1]=t[i],t[i]=f}}else{if(!u.added&&n){var d=o.slice(a,a+u.count);d=d.map(function(h,p){var g=r[c+p];return g.length>h.length?g:h}),u.value=e.join(d)}else u.value=e.join(o.slice(a,a+u.count));a+=u.count,u.added||(c+=u.count)}}var m=t[s-1];return s>1&&typeof m.value=="string"&&(m.added||m.removed)&&e.equals("",m.value)&&(t[s-2].value+=m.value,t.pop()),t}function rye(e){return{newPos:e.newPos,components:e.components.slice(0)}}});var YH=oe(Zv=>{"use strict";Object.defineProperty(Zv,"__esModule",{value:!0});Zv.diffChars=sye;Zv.characterDiff=void 0;var nye=iye($H());function iye(e){return e&&e.__esModule?e:{default:e}}var KH=new nye.default;Zv.characterDiff=KH;function sye(e,t,o){return KH.diff(e,t,o)}});var jr=oe((Pze,l8)=>{l8.exports=window.React});var u8=oe((Rze,c8)=>{"use strict";var uye="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";c8.exports=uye});var p8=oe((Oze,m8)=>{"use strict";var dye=u8();function d8(){}function f8(){}f8.resetWarningCache=d8;m8.exports=function(){function e(r,n,i,s,a,c){if(c!==dye){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:f8,resetWarningCache:d8};return o.PropTypes=o,o}});var g8=oe((Nze,h8)=>{h8.exports=p8()();var Aze,Lze});var k8=oe((_C,b8)=>{(function(e,t){if(typeof define=="function"&&define.amd)define(["module","exports"],t);else if(typeof _C<"u")t(b8,_C);else{var o={exports:{}};t(o,o.exports),e.autosize=o.exports}})(_C,function(e,t){"use strict";var o=typeof Map=="function"?new Map:(function(){var c=[],u=[];return{has:function(f){return c.indexOf(f)>-1},get:function(f){return u[c.indexOf(f)]},set:function(f,m){c.indexOf(f)===-1&&(c.push(f),u.push(m))},delete:function(f){var m=c.indexOf(f);m>-1&&(c.splice(m,1),u.splice(m,1))}}})(),r=function(u){return new Event(u,{bubbles:!0})};try{new Event("test")}catch{r=function(d){var f=document.createEvent("Event");return f.initEvent(d,!0,!1),f}}function n(c){if(!c||!c.nodeName||c.nodeName!=="TEXTAREA"||o.has(c))return;var u=null,d=null,f=null;function m(){var y=window.getComputedStyle(c,null);y.resize==="vertical"?c.style.resize="none":y.resize==="both"&&(c.style.resize="horizontal"),y.boxSizing==="content-box"?u=-(parseFloat(y.paddingTop)+parseFloat(y.paddingBottom)):u=parseFloat(y.borderTopWidth)+parseFloat(y.borderBottomWidth),isNaN(u)&&(u=0),b()}function h(y){{var S=c.style.width;c.style.width="0px",c.offsetWidth,c.style.width=S}c.style.overflowY=y}function p(y){for(var S=[];y&&y.parentNode&&y.parentNode instanceof Element;)y.parentNode.scrollTop&&S.push({node:y.parentNode,scrollTop:y.parentNode.scrollTop}),y=y.parentNode;return S}function g(){if(c.scrollHeight!==0){var y=p(c),S=document.documentElement&&document.documentElement.scrollTop;c.style.height="",c.style.height=c.scrollHeight+u+"px",d=c.clientWidth,y.forEach(function(x){x.node.scrollTop=x.scrollTop}),S&&(document.documentElement.scrollTop=S)}}function b(){g();var y=Math.round(parseFloat(c.style.height)),S=window.getComputedStyle(c,null),x=S.boxSizing==="content-box"?Math.round(parseFloat(S.height)):c.offsetHeight;if(x<y?S.overflowY==="hidden"&&(h("scroll"),g(),x=S.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight):S.overflowY!=="hidden"&&(h("hidden"),g(),x=S.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight),f!==x){f=x;var C=r("autosize:resized");try{c.dispatchEvent(C)}catch{}}}var v=function(){c.clientWidth!==d&&b()},k=function(y){window.removeEventListener("resize",v,!1),c.removeEventListener("input",b,!1),c.removeEventListener("keyup",b,!1),c.removeEventListener("autosize:destroy",k,!1),c.removeEventListener("autosize:update",b,!1),Object.keys(y).forEach(function(S){c.style[S]=y[S]}),o.delete(c)}.bind(c,{height:c.style.height,resize:c.style.resize,overflowY:c.style.overflowY,overflowX:c.style.overflowX,wordWrap:c.style.wordWrap});c.addEventListener("autosize:destroy",k,!1),"onpropertychange"in c&&"oninput"in c&&c.addEventListener("keyup",b,!1),window.addEventListener("resize",v,!1),c.addEventListener("input",b,!1),c.addEventListener("autosize:update",b,!1),c.style.overflowX="hidden",c.style.wordWrap="break-word",o.set(c,{destroy:k,update:b}),m()}function i(c){var u=o.get(c);u&&u.destroy()}function s(c){var u=o.get(c);u&&u.update()}var a=null;typeof window>"u"||typeof window.getComputedStyle!="function"?(a=function(u){return u},a.destroy=function(c){return c},a.update=function(c){return c}):(a=function(u,d){return u&&Array.prototype.forEach.call(u.length?u:[u],function(f){return n(f,d)}),u},a.destroy=function(c){return c&&Array.prototype.forEach.call(c.length?c:[c],i),c},a.update=function(c){return c&&Array.prototype.forEach.call(c.length?c:[c],s),c}),t.default=a,e.exports=t.default})});var y8=oe((Mze,v8)=>{var fye=function(e,t,o){return o=window.getComputedStyle,(o?o(e):e.currentStyle)[t.replace(/-(\w)/gi,function(r,n){return n.toUpperCase()})]};v8.exports=fye});var _8=oe((Dze,S8)=>{var DM=y8();function mye(e){var t=DM(e,"line-height"),o=parseFloat(t,10);if(t===o+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=DM(e,"line-height"),o=parseFloat(t,10),r?e.style.lineHeight=r:delete e.style.lineHeight}if(t.indexOf("pt")!==-1?(o*=4,o/=3):t.indexOf("mm")!==-1?(o*=96,o/=25.4):t.indexOf("cm")!==-1?(o*=96,o/=2.54):t.indexOf("in")!==-1?o*=96:t.indexOf("pc")!==-1&&(o*=16),o=Math.round(o),t==="normal"){var n=e.nodeName,i=document.createElement(n);i.innerHTML="&nbsp;",n.toUpperCase()==="TEXTAREA"&&i.setAttribute("rows","1");var s=DM(e,"font-size");i.style.fontSize=s,i.style.padding="0px",i.style.border="0px";var a=document.body;a.appendChild(i);var c=i.offsetHeight;o=c,a.removeChild(i)}return o}S8.exports=mye});var w8=oe(Pl=>{"use strict";var pye=Pl&&Pl.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var r in o)o.hasOwnProperty(r)&&(t[r]=o[r])};return function(t,o){e(t,o);function r(){this.constructor=t}t.prototype=o===null?Object.create(o):(r.prototype=o.prototype,new r)}})(),VM=Pl&&Pl.__assign||Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++){t=arguments[o];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},hye=Pl&&Pl.__rest||function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(o[r[n]]=e[r[n]]);return o};Pl.__esModule=!0;var wC=jr(),Xv=g8(),xC=k8(),gye=_8(),bye=gye,x8="autosize:resized",kye=(function(e){pye(t,e);function t(){var o=e!==null&&e.apply(this,arguments)||this;return o.state={lineHeight:null},o.textarea=null,o.onResize=function(r){o.props.onResize&&o.props.onResize(r)},o.updateLineHeight=function(){o.textarea&&o.setState({lineHeight:bye(o.textarea)})},o.onChange=function(r){var n=o.props.onChange;o.currentValue=r.currentTarget.value,n&&n(r)},o}return t.prototype.componentDidMount=function(){var o=this,r=this.props,n=r.maxRows,i=r.async;typeof n=="number"&&this.updateLineHeight(),typeof n=="number"||i?setTimeout(function(){return o.textarea&&xC(o.textarea)}):this.textarea&&xC(this.textarea),this.textarea&&this.textarea.addEventListener(x8,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(x8,this.onResize),xC.destroy(this.textarea))},t.prototype.render=function(){var o=this,r=this,n=r.props,i=n.onResize,s=n.maxRows,a=n.onChange,c=n.style,u=n.innerRef,d=n.children,f=hye(n,["onResize","maxRows","onChange","style","innerRef","children"]),m=r.state.lineHeight,h=s&&m?m*s:null;return wC.createElement("textarea",VM({},f,{onChange:this.onChange,style:h?VM({},c,{maxHeight:h}):c,ref:function(p){o.textarea=p,typeof o.props.innerRef=="function"?o.props.innerRef(p):o.props.innerRef&&(o.props.innerRef.current=p)}}),d)},t.prototype.componentDidUpdate=function(){this.textarea&&xC.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:Xv.number,maxRows:Xv.number,onResize:Xv.func,innerRef:Xv.any,async:Xv.bool},t})(wC.Component);Pl.TextareaAutosize=wC.forwardRef(function(e,t){return wC.createElement(kye,VM({},e,{innerRef:t}))})});var FM=oe((Fze,C8)=>{"use strict";var vye=w8();C8.exports=vye.TextareaAutosize});var Qv=oe((Uze,I8)=>{I8.exports=window.wp.warning});var B7=oe((s6e,C7)=>{C7.exports=window.ReactDOM});var Is=oe((L6e,t9)=>{t9.exports=window.wp.keyboardShortcuts});var _9=oe((Yje,S9)=>{S9.exports=window.wp.uploadMedia});var R1=oe(()=>{});var O1=oe(()=>{});var UD=oe(()=>{});var AG=oe((_He,OG)=>{var E_e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",T_e=(e,t=21)=>(o=t)=>{let r="",n=o|0;for(;n--;)r+=e[Math.random()*e.length|0];return r},I_e=(e=21)=>{let t="",o=e|0;for(;o--;)t+=E_e[Math.random()*64|0];return t};OG.exports={nanoid:I_e,customAlphabet:T_e}});var HD=oe(()=>{});var NG=oe((CHe,GD)=>{var Ce=String,LG=function(){return{isColorSupported:!1,reset:Ce,bold:Ce,dim:Ce,italic:Ce,underline:Ce,inverse:Ce,hidden:Ce,strikethrough:Ce,black:Ce,red:Ce,green:Ce,yellow:Ce,blue:Ce,magenta:Ce,cyan:Ce,white:Ce,gray:Ce,bgBlack:Ce,bgRed:Ce,bgGreen:Ce,bgYellow:Ce,bgBlue:Ce,bgMagenta:Ce,bgCyan:Ce,bgWhite:Ce,blackBright:Ce,redBright:Ce,greenBright:Ce,yellowBright:Ce,blueBright:Ce,magentaBright:Ce,cyanBright:Ce,whiteBright:Ce,bgBlackBright:Ce,bgRedBright:Ce,bgGreenBright:Ce,bgYellowBright:Ce,bgBlueBright:Ce,bgMagentaBright:Ce,bgCyanBright:Ce,bgWhiteBright:Ce}};GD.exports=LG();GD.exports.createColors=LG});var A1=oe((BHe,VG)=>{"use strict";var MG=NG(),DG=HD(),By=class e extends Error{constructor(t,o,r,n,i,s){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),n&&(this.source=n),s&&(this.plugin=s),typeof o<"u"&&typeof r<"u"&&(typeof o=="number"?(this.line=o,this.column=r):(this.line=o.line,this.column=o.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let o=this.source;t==null&&(t=MG.isColorSupported),DG&&t&&(o=DG(o));let r=o.split(/\r?\n/),n=Math.max(this.line-3,0),i=Math.min(this.line+2,r.length),s=String(i).length,a,c;if(t){let{bold:u,gray:d,red:f}=MG.createColors(!0);a=m=>u(f(m)),c=m=>d(m)}else a=c=u=>u;return r.slice(n,i).map((u,d)=>{let f=n+1+d,m=" "+(" "+f).slice(-s)+" | ";if(f===this.line){let h=c(m.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+c(m)+u+`
 `+h+a("^")}return" "+c(m)+u}).join(`
`)}toString(){let t=this.showSourceCode();return t&&(t=`

`+t+`
`),this.name+": "+this.message+t}};VG.exports=By;By.default=By});var FG=oe(()=>{});var HG=oe((IHe,UG)=>{"use strict";var{SourceMapConsumer:zG,SourceMapGenerator:jG}=R1(),{existsSync:P_e,readFileSync:R_e}=FG(),{dirname:WD,join:O_e}=O1();function A_e(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var Ey=class{constructor(t,o){if(o.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let r=o.map?o.map.prev:void 0,n=this.loadMap(o.from,r);!this.mapFile&&o.from&&(this.mapFile=o.from),this.mapFile&&(this.root=WD(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new zG(this.text)),this.consumerCache}decodeInline(t){let o=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,n=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/;if(n.test(t)||i.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(o.test(t)||r.test(t))return A_e(t.substr(RegExp.lastMatch.length));let s=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)}loadAnnotation(t){let o=t.match(/\/\*\s*# sourceMappingURL=/gm);if(!o)return;let r=t.lastIndexOf(o.pop()),n=t.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,n)))}loadFile(t){if(this.root=WD(t),P_e(t))return this.mapFile=t,R_e(t,"utf-8").toString().trim()}loadMap(t,o){if(o===!1)return!1;if(o){if(typeof o=="string")return o;if(typeof o=="function"){let r=o(t);if(r){let n=this.loadFile(r);if(!n)throw new Error("Unable to load previous source map: "+r.toString());return n}}else{if(o instanceof zG)return jG.fromSourceMap(o).toString();if(o instanceof jG)return o.toString();if(this.isMap(o))return JSON.stringify(o);throw new Error("Unsupported previous source map format: "+o.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return t&&(r=O_e(WD(t),r)),this.loadFile(r)}}}startWith(t,o){return t?t.substr(0,o.length)===o:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};UG.exports=Ey;Ey.default=Ey});var ZD=oe((PHe,KG)=>{"use strict";var{SourceMapConsumer:L_e,SourceMapGenerator:N_e}=R1(),{fileURLToPath:GG,pathToFileURL:L1}=UD(),{isAbsolute:YD,resolve:qD}=O1(),{nanoid:M_e}=AG(),$D=HD(),WG=A1(),D_e=HG(),KD=Symbol("fromOffsetCache"),V_e=!!(L_e&&N_e),$G=!!(qD&&YD),Dh=class{constructor(t,o={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,o.from&&(!$G||/^\w+:\/\//.test(o.from)||YD(o.from)?this.file=o.from:this.file=qD(o.from)),$G&&V_e){let r=new D_e(this.css,o);if(r.text){this.map=r;let n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id="<input css "+M_e(6)+">"),this.map&&(this.map.file=this.from)}error(t,o,r,n={}){let i,s,a;if(o&&typeof o=="object"){let u=o,d=r;if(typeof u.offset=="number"){let f=this.fromOffset(u.offset);o=f.line,r=f.col}else o=u.line,r=u.column;if(typeof d.offset=="number"){let f=this.fromOffset(d.offset);s=f.line,a=f.col}else s=d.line,a=d.column}else if(!r){let u=this.fromOffset(o);o=u.line,r=u.col}let c=this.origin(o,r,s,a);return c?i=new WG(t,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,n.plugin):i=new WG(t,s===void 0?o:{column:r,line:o},s===void 0?r:{column:a,line:s},this.css,this.file,n.plugin),i.input={column:r,endColumn:a,endLine:s,line:o,source:this.css},this.file&&(L1&&(i.input.url=L1(this.file).toString()),i.input.file=this.file),i}fromOffset(t){let o,r;if(this[KD])r=this[KD];else{let i=this.css.split(`
`);r=new Array(i.length);let s=0;for(let a=0,c=i.length;a<c;a++)r[a]=s,s+=i[a].length+1;this[KD]=r}o=r[r.length-1];let n=0;if(t>=o)n=r.length-1;else{let i=r.length-2,s;for(;n<i;)if(s=n+(i-n>>1),t<r[s])i=s-1;else if(t>=r[s+1])n=s+1;else{n=s;break}}return{col:t-r[n]+1,line:n+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:qD(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,o,r,n){if(!this.map)return!1;let i=this.map.consumer(),s=i.originalPositionFor({column:o,line:t});if(!s.source)return!1;let a;typeof r=="number"&&(a=i.originalPositionFor({column:n,line:r}));let c;YD(s.source)?c=L1(s.source):c=new URL(s.source,this.map.consumer().sourceRoot||L1(this.map.mapFile));let u={column:s.column,endColumn:a&&a.column,endLine:a&&a.line,line:s.line,url:c.toString()};if(c.protocol==="file:")if(GG)u.file=GG(c);else throw new Error("file: protocol is not available in this PostCSS build");let d=i.sourceContentFor(s.source);return d&&(u.source=d),u}toJSON(){let t={};for(let o of["hasBOM","css","file","id"])this[o]!=null&&(t[o]=this[o]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}get from(){return this.file||this.id}};KG.exports=Dh;Dh.default=Dh;$D&&$D.registerInput&&$D.registerInput(Dh)});var QD=oe((RHe,JG)=>{"use strict";var{SourceMapConsumer:qG,SourceMapGenerator:N1}=R1(),{dirname:M1,relative:ZG,resolve:XG,sep:QG}=O1(),{pathToFileURL:YG}=UD(),F_e=ZD(),z_e=!!(qG&&N1),j_e=!!(M1&&XG&&ZG&&QG),XD=class{constructor(t,o,r,n){this.stringify=t,this.mapOpts=r.map||{},this.root=o,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let o=`
`;this.css.includes(`\r
`)&&(o=`\r
`),this.css+=o+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let o=this.toUrl(this.path(t.file)),r=t.root||M1(t.file),n;this.mapOpts.sourcesContent===!1?(n=new qG(t.text),n.sourcesContent&&(n.sourcesContent=null)):n=t.consumer(),this.map.applySourceMap(n,o,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let o=this.root.nodes.length-1;o>=0;o--)t=this.root.nodes[o],t.type==="comment"&&t.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(o)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),j_e&&z_e&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,o=>{t+=o}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=N1.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new N1({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new N1({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,o=1,r="<no source>",n={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,s;this.stringify(this.root,(a,c,u)=>{if(this.css+=a,c&&u!=="end"&&(n.generated.line=t,n.generated.column=o-1,c.source&&c.source.start?(n.source=this.sourcePath(c),n.original.line=c.source.start.line,n.original.column=c.source.start.column-1,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,this.map.addMapping(n))),i=a.match(/\n/g),i?(t+=i.length,s=a.lastIndexOf(`
`),o=a.length-s):o+=a.length,c&&u!=="start"){let d=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==d.last||d.raws.semicolon)&&(c.source&&c.source.end?(n.source=this.sourcePath(c),n.original.line=c.source.end.line,n.original.column=c.source.end.column-1,n.generated.line=t,n.generated.column=o-2,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,n.generated.line=t,n.generated.column=o-1,this.map.addMapping(n)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(o=>o.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let o=this.memoizedPaths.get(t);if(o)return o;let r=this.opts.to?M1(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=M1(XG(r,this.mapOpts.annotation)));let n=ZG(r,t);return this.memoizedPaths.set(t,n),n}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let o=t.source.input.map;this.previousMaps.includes(o)||this.previousMaps.push(o)}});else{let t=new F_e(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(o=>{if(o.source){let r=o.source.input.from;if(r&&!t[r]){t[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,o.source.input.css)}}});else if(this.css){let o=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(o,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let o=this.memoizedFileURLs.get(t);if(o)return o;if(YG){let r=YG(t).toString();return this.memoizedFileURLs.set(t,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let o=this.memoizedURLs.get(t);if(o)return o;QG==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};JG.exports=XD});var JD=oe((OHe,tW)=>{"use strict";var eW={after:`
`,beforeClose:`
`,beforeComment:`
`,beforeDecl:`
`,beforeOpen:" ",beforeRule:`
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1};function U_e(e){return e[0].toUpperCase()+e.slice(1)}var Ty=class{constructor(t){this.builder=t}atrule(t,o){let r="@"+t.name,n=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?r+=t.raws.afterName:n&&(r+=" "),t.nodes)this.block(t,r+n);else{let i=(t.raws.between||"")+(o?";":"");this.builder(r+n+i,t)}}beforeAfter(t,o){let r;t.type==="decl"?r=this.raw(t,null,"beforeDecl"):t.type==="comment"?r=this.raw(t,null,"beforeComment"):o==="before"?r=this.raw(t,null,"beforeRule"):r=this.raw(t,null,"beforeClose");let n=t.parent,i=0;for(;n&&n.type!=="root";)i+=1,n=n.parent;if(r.includes(`
`)){let s=this.raw(t,null,"indent");if(s.length)for(let a=0;a<i;a++)r+=s}return r}block(t,o){let r=this.raw(t,"between","beforeOpen");this.builder(o+r+"{",t,"start");let n;t.nodes&&t.nodes.length?(this.body(t),n=this.raw(t,"after")):n=this.raw(t,"after","emptyBody"),n&&this.builder(n),this.builder("}",t,"end")}body(t){let o=t.nodes.length-1;for(;o>0&&t.nodes[o].type==="comment";)o-=1;let r=this.raw(t,"semicolon");for(let n=0;n<t.nodes.length;n++){let i=t.nodes[n],s=this.raw(i,"before");s&&this.builder(s),this.stringify(i,o!==n||r)}}comment(t){let o=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder("/*"+o+t.text+r+"*/",t)}decl(t,o){let r=this.raw(t,"between","colon"),n=t.prop+r+this.rawValue(t,"value");t.important&&(n+=t.raws.important||" !important"),o&&(n+=";"),this.builder(n,t)}document(t){this.body(t)}raw(t,o,r){let n;if(r||(r=o),o&&(n=t.raws[o],typeof n<"u"))return n;let i=t.parent;if(r==="before"&&(!i||i.type==="root"&&i.first===t||i&&i.type==="document"))return"";if(!i)return eW[r];let s=t.root();if(s.rawCache||(s.rawCache={}),typeof s.rawCache[r]<"u")return s.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(t,r);{let a="raw"+U_e(r);this[a]?n=this[a](s,t):s.walk(c=>{if(n=c.raws[o],typeof n<"u")return!1})}return typeof n>"u"&&(n=eW[r]),s.rawCache[r]=n,n}rawBeforeClose(t){let o;return t.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return o=r.raws.after,o.includes(`
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawBeforeComment(t,o){let r;return t.walkComments(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(o,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,o){let r;return t.walkDecls(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(o,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){let o;return t.walk(r=>{if(r.type!=="decl"&&(o=r.raws.between,typeof o<"u"))return!1}),o}rawBeforeRule(t){let o;return t.walk(r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&typeof r.raws.before<"u")return o=r.raws.before,o.includes(`
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawColon(t){let o;return t.walkDecls(r=>{if(typeof r.raws.between<"u")return o=r.raws.between.replace(/[^\s:]/g,""),!1}),o}rawEmptyBody(t){let o;return t.walk(r=>{if(r.nodes&&r.nodes.length===0&&(o=r.raws.after,typeof o<"u"))return!1}),o}rawIndent(t){if(t.raws.indent)return t.raws.indent;let o;return t.walk(r=>{let n=r.parent;if(n&&n!==t&&n.parent&&n.parent===t&&typeof r.raws.before<"u"){let i=r.raws.before.split(`
`);return o=i[i.length-1],o=o.replace(/\S/g,""),!1}}),o}rawSemicolon(t){let o;return t.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(o=r.raws.semicolon,typeof o<"u"))return!1}),o}rawValue(t,o){let r=t[o],n=t.raws[o];return n&&n.value===r?n.raw:r}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,o){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,o)}};tW.exports=Ty;Ty.default=Ty});var D1=oe((AHe,oW)=>{"use strict";var H_e=JD();function e5(e,t){new H_e(t).stringify(e)}oW.exports=e5;e5.default=e5});var t5=oe((LHe,nW)=>{"use strict";var rW={};nW.exports=function(t){rW[t]||(rW[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))}});var V1=oe((NHe,o5)=>{"use strict";o5.exports.isClean=Symbol("isClean");o5.exports.my=Symbol("my")});var z1=oe((MHe,iW)=>{"use strict";var{isClean:F1,my:G_e}=V1(),W_e=A1(),$_e=JD(),K_e=D1();function r5(e,t){let o=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r==="proxyCache")continue;let n=e[r],i=typeof n;r==="parent"&&i==="object"?t&&(o[r]=t):r==="source"?o[r]=n:Array.isArray(n)?o[r]=n.map(s=>r5(s,o)):(i==="object"&&n!==null&&(n=r5(n)),o[r]=n)}return o}var Iy=class{constructor(t={}){this.raws={},this[F1]=!1,this[G_e]=!0;for(let o in t)if(o==="nodes"){this.nodes=[];for(let r of t[o])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[o]=t[o]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let o=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${o.input.from}:${o.start.line}:${o.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let o in t)this[o]=t[o];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let o=r5(this);for(let r in t)o[r]=t[r];return o}cloneAfter(t={}){let o=this.clone(t);return this.parent.insertAfter(this,o),o}cloneBefore(t={}){let o=this.clone(t);return this.parent.insertBefore(this,o),o}error(t,o={}){if(this.source){let{end:r,start:n}=this.rangeBy(o);return this.source.input.error(t,{column:n.column,line:n.line},{column:r.column,line:r.line},o)}return new W_e(t)}getProxyProcessor(){return{get(t,o){return o==="proxyOf"?t:o==="root"?()=>t.root().toProxy():t[o]},set(t,o,r){return t[o]===r||(t[o]=r,(o==="prop"||o==="value"||o==="name"||o==="params"||o==="important"||o==="text")&&t.markDirty()),!0}}}markDirty(){if(this[F1]){this[F1]=!1;let t=this;for(;t=t.parent;)t[F1]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t,o){let r=this.source.start;if(t.index)r=this.positionInside(t.index,o);else if(t.word){o=this.toString();let n=o.indexOf(t.word);n!==-1&&(r=this.positionInside(n,o))}return r}positionInside(t,o){let r=o||this.toString(),n=this.source.start.column,i=this.source.start.line;for(let s=0;s<t;s++)r[s]===`
`?(n=1,i+=1):n+=1;return{column:n,line:i}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let o={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:o.column+1,line:o.line};if(t.word){let n=this.toString(),i=n.indexOf(t.word);i!==-1&&(o=this.positionInside(i,n),r=this.positionInside(i+t.word.length,n))}else t.start?o={column:t.start.column,line:t.start.line}:t.index&&(o=this.positionInside(t.index)),t.end?r={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?r=this.positionInside(t.endIndex):t.index&&(r=this.positionInside(t.index+1));return(r.line<o.line||r.line===o.line&&r.column<=o.column)&&(r={column:o.column+1,line:o.line}),{end:r,start:o}}raw(t,o){return new $_e().raw(this,t,o)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let o=this,r=!1;for(let n of t)n===this?r=!0:r?(this.parent.insertAfter(o,n),o=n):this.parent.insertBefore(o,n);r||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,o){let r={},n=o==null;o=o||new Map;let i=0;for(let s in this){if(!Object.prototype.hasOwnProperty.call(this,s)||s==="parent"||s==="proxyCache")continue;let a=this[s];if(Array.isArray(a))r[s]=a.map(c=>typeof c=="object"&&c.toJSON?c.toJSON(null,o):c);else if(typeof a=="object"&&a.toJSON)r[s]=a.toJSON(null,o);else if(s==="source"){let c=o.get(a.input);c==null&&(c=i,o.set(a.input,i),i++),r[s]={end:a.end,inputId:c,start:a.start}}else r[s]=a}return n&&(r.inputs=[...o.keys()].map(s=>s.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=K_e){t.stringify&&(t=t.stringify);let o="";return t(this,r=>{o+=r}),o}warn(t,o,r){let n={node:this};for(let i in r)n[i]=r[i];return t.warn(o,n)}get proxyOf(){return this}};iW.exports=Iy;Iy.default=Iy});var n5=oe((DHe,sW)=>{"use strict";var Y_e=z1(),Py=class extends Y_e{constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};sW.exports=Py;Py.default=Py});var i5=oe((VHe,aW)=>{"use strict";var q_e=z1(),Ry=class extends q_e{constructor(t){super(t),this.type="comment"}};aW.exports=Ry;Ry.default=Ry});var rm=oe((FHe,gW)=>{"use strict";var{isClean:lW,my:cW}=V1(),uW=n5(),dW=i5(),Z_e=z1(),fW,s5,a5,mW;function pW(e){return e.map(t=>(t.nodes&&(t.nodes=pW(t.nodes)),delete t.source,t))}function hW(e){if(e[lW]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)hW(t)}var Os=class e extends Z_e{append(...t){for(let o of t){let r=this.normalize(o,this.last);for(let n of r)this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let o of this.nodes)o.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let o=this.getIterator(),r,n;for(;this.indexes[o]<this.proxyOf.nodes.length&&(r=this.indexes[o],n=t(this.proxyOf.nodes[r],r),n!==!1);)this.indexes[o]+=1;return delete this.indexes[o],n}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,o){return o==="proxyOf"?t:t[o]?o==="each"||typeof o=="string"&&o.startsWith("walk")?(...r)=>t[o](...r.map(n=>typeof n=="function"?(i,s)=>n(i.toProxy(),s):n)):o==="every"||o==="some"?r=>t[o]((n,...i)=>r(n.toProxy(),...i)):o==="root"?()=>t.root().toProxy():o==="nodes"?t.nodes.map(r=>r.toProxy()):o==="first"||o==="last"?t[o].toProxy():t[o]:t[o]},set(t,o,r){return t[o]===r||(t[o]=r,(o==="name"||o==="params"||o==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,o){let r=this.index(t),n=this.normalize(o,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let s of n)this.proxyOf.nodes.splice(r+1,0,s);let i;for(let s in this.indexes)i=this.indexes[s],r<i&&(this.indexes[s]=i+n.length);return this.markDirty(),this}insertBefore(t,o){let r=this.index(t),n=r===0?"prepend":!1,i=this.normalize(o,this.proxyOf.nodes[r],n).reverse();r=this.index(t);for(let a of i)this.proxyOf.nodes.splice(r,0,a);let s;for(let a in this.indexes)s=this.indexes[a],r<=s&&(this.indexes[a]=s+i.length);return this.markDirty(),this}normalize(t,o){if(typeof t=="string")t=pW(fW(t).nodes);else if(typeof t>"u")t=[];else if(Array.isArray(t)){t=t.slice(0);for(let n of t)n.parent&&n.parent.removeChild(n,"ignore")}else if(t.type==="root"&&this.type!=="document"){t=t.nodes.slice(0);for(let n of t)n.parent&&n.parent.removeChild(n,"ignore")}else if(t.type)t=[t];else if(t.prop){if(typeof t.value>"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new uW(t)]}else if(t.selector)t=[new s5(t)];else if(t.name)t=[new a5(t)];else if(t.text)t=[new dW(t)];else throw new Error("Unknown node type in node creation");return t.map(n=>(n[cW]||e.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[lW]&&hW(n),typeof n.raws.before>"u"&&o&&typeof o.raws.before<"u"&&(n.raws.before=o.raws.before.replace(/\S/g,"")),n.parent=this.proxyOf,n))}prepend(...t){t=t.reverse();for(let o of t){let r=this.normalize(o,this.first,"prepend").reverse();for(let n of r)this.proxyOf.nodes.unshift(n);for(let n in this.indexes)this.indexes[n]=this.indexes[n]+r.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let o;for(let r in this.indexes)o=this.indexes[r],o>=t&&(this.indexes[r]=o-1);return this.markDirty(),this}replaceValues(t,o,r){return r||(r=o,o={}),this.walkDecls(n=>{o.props&&!o.props.includes(n.prop)||o.fast&&!n.value.includes(o.fast)||(n.value=n.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((o,r)=>{let n;try{n=t(o,r)}catch(i){throw o.addToError(i)}return n!==!1&&o.walk&&(n=o.walk(t)),n})}walkAtRules(t,o){return o?t instanceof RegExp?this.walk((r,n)=>{if(r.type==="atrule"&&t.test(r.name))return o(r,n)}):this.walk((r,n)=>{if(r.type==="atrule"&&r.name===t)return o(r,n)}):(o=t,this.walk((r,n)=>{if(r.type==="atrule")return o(r,n)}))}walkComments(t){return this.walk((o,r)=>{if(o.type==="comment")return t(o,r)})}walkDecls(t,o){return o?t instanceof RegExp?this.walk((r,n)=>{if(r.type==="decl"&&t.test(r.prop))return o(r,n)}):this.walk((r,n)=>{if(r.type==="decl"&&r.prop===t)return o(r,n)}):(o=t,this.walk((r,n)=>{if(r.type==="decl")return o(r,n)}))}walkRules(t,o){return o?t instanceof RegExp?this.walk((r,n)=>{if(r.type==="rule"&&t.test(r.selector))return o(r,n)}):this.walk((r,n)=>{if(r.type==="rule"&&r.selector===t)return o(r,n)}):(o=t,this.walk((r,n)=>{if(r.type==="rule")return o(r,n)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Os.registerParse=e=>{fW=e};Os.registerRule=e=>{s5=e};Os.registerAtRule=e=>{a5=e};Os.registerRoot=e=>{mW=e};gW.exports=Os;Os.default=Os;Os.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,a5.prototype):e.type==="rule"?Object.setPrototypeOf(e,s5.prototype):e.type==="decl"?Object.setPrototypeOf(e,uW.prototype):e.type==="comment"?Object.setPrototypeOf(e,dW.prototype):e.type==="root"&&Object.setPrototypeOf(e,mW.prototype),e[cW]=!0,e.nodes&&e.nodes.forEach(t=>{Os.rebuild(t)})}});var vW=oe((zHe,kW)=>{"use strict";var j1=/[\t\n\f\r "#'()/;[\\\]{}]/g,U1=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,X_e=/.[\r\n"'(/\\]/,bW=/[\da-f]/i;kW.exports=function(t,o={}){let r=t.css.valueOf(),n=o.ignoreErrors,i,s,a,c,u,d,f,m,h,p,g=r.length,b=0,v=[],k=[];function y(){return b}function S(I){throw t.error("Unclosed "+I,b)}function x(){return k.length===0&&b>=g}function C(I){if(k.length)return k.pop();if(b>=g)return;let P=I?I.ignoreUnclosed:!1;switch(i=r.charCodeAt(b),i){case 10:case 32:case 9:case 13:case 12:{s=b;do s+=1,i=r.charCodeAt(s);while(i===32||i===10||i===9||i===13||i===12);p=["space",r.slice(b,s)],b=s-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let E=String.fromCharCode(i);p=[E,E,b];break}case 40:{if(m=v.length?v.pop()[1]:"",h=r.charCodeAt(b+1),m==="url"&&h!==39&&h!==34&&h!==32&&h!==10&&h!==9&&h!==12&&h!==13){s=b;do{if(d=!1,s=r.indexOf(")",s+1),s===-1)if(n||P){s=b;break}else S("bracket");for(f=s;r.charCodeAt(f-1)===92;)f-=1,d=!d}while(d);p=["brackets",r.slice(b,s+1),b,s],b=s}else s=r.indexOf(")",b+1),c=r.slice(b,s+1),s===-1||X_e.test(c)?p=["(","(",b]:(p=["brackets",c,b,s],b=s);break}case 39:case 34:{a=i===39?"'":'"',s=b;do{if(d=!1,s=r.indexOf(a,s+1),s===-1)if(n||P){s=b+1;break}else S("string");for(f=s;r.charCodeAt(f-1)===92;)f-=1,d=!d}while(d);p=["string",r.slice(b,s+1),b,s],b=s;break}case 64:{j1.lastIndex=b+1,j1.test(r),j1.lastIndex===0?s=r.length-1:s=j1.lastIndex-2,p=["at-word",r.slice(b,s+1),b,s],b=s;break}case 92:{for(s=b,u=!0;r.charCodeAt(s+1)===92;)s+=1,u=!u;if(i=r.charCodeAt(s+1),u&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(s+=1,bW.test(r.charAt(s)))){for(;bW.test(r.charAt(s+1));)s+=1;r.charCodeAt(s+1)===32&&(s+=1)}p=["word",r.slice(b,s+1),b,s],b=s;break}default:{i===47&&r.charCodeAt(b+1)===42?(s=r.indexOf("*/",b+2)+1,s===0&&(n||P?s=r.length:S("comment")),p=["comment",r.slice(b,s+1),b,s],b=s):(U1.lastIndex=b+1,U1.test(r),U1.lastIndex===0?s=r.length-1:s=U1.lastIndex-2,p=["word",r.slice(b,s+1),b,s],v.push(p),b=s);break}}return b++,p}function B(I){k.push(I)}return{back:B,endOfFile:x,nextToken:C,position:y}}});var _W=oe((jHe,SW)=>{"use strict";var yW=rm(),Vh=class extends yW{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};SW.exports=Vh;Vh.default=Vh;yW.registerAtRule(Vh)});var H1=oe((UHe,BW)=>{"use strict";var xW=rm(),wW,CW,Fu=class extends xW{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,o,r){let n=super.normalize(t);if(o){if(r==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let i of n)i.raws.before=o.raws.before}return n}removeChild(t,o){let r=this.index(t);return!o&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(t={}){return new wW(new CW,this,t).stringify()}};Fu.registerLazyResult=e=>{wW=e};Fu.registerProcessor=e=>{CW=e};BW.exports=Fu;Fu.default=Fu;xW.registerRoot(Fu)});var TW=oe((HHe,EW)=>{"use strict";var Oy={comma(e){return Oy.split(e,[","],!0)},space(e){let t=[" ",`
`,"	"];return Oy.split(e,t)},split(e,t,o){let r=[],n="",i=!1,s=0,a=!1,c="",u=!1;for(let d of e)u?u=!1:d==="\\"?u=!0:a?d===c&&(a=!1):d==='"'||d==="'"?(a=!0,c=d):d==="("?s+=1:d===")"?s>0&&(s-=1):s===0&&t.includes(d)&&(i=!0),i?(n!==""&&r.push(n.trim()),n="",i=!1):n+=d;return(o||n!=="")&&r.push(n.trim()),r}};EW.exports=Oy;Oy.default=Oy});var RW=oe((GHe,PW)=>{"use strict";var IW=rm(),Q_e=TW(),Fh=class extends IW{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Q_e.comma(this.selector)}set selectors(t){let o=this.selector?this.selector.match(/,\s*/):null,r=o?o[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}};PW.exports=Fh;Fh.default=Fh;IW.registerRule(Fh)});var NW=oe((WHe,LW)=>{"use strict";var J_e=n5(),e0e=vW(),t0e=i5(),o0e=_W(),r0e=H1(),OW=RW(),AW={empty:!0,space:!0};function n0e(e){for(let t=e.length-1;t>=0;t--){let o=e[t],r=o[3]||o[2];if(r)return r}}var l5=class{constructor(t){this.input=t,this.root=new r0e,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let o=new o0e;o.name=t[1].slice(1),o.name===""&&this.unnamedAtrule(o,t),this.init(o,t[2]);let r,n,i,s=!1,a=!1,c=[],u=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),r=t[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){o.source.end=this.getPosition(t[2]),o.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(c.length>0){for(i=c.length-1,n=c[i];n&&n[0]==="space";)n=c[--i];n&&(o.source.end=this.getPosition(n[3]||n[2]),o.source.end.offset++)}this.end(t);break}else c.push(t);else c.push(t);if(this.tokenizer.endOfFile()){s=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(o.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(o,"params",c),s&&(t=c[c.length-1],o.source.end=this.getPosition(t[3]||t[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(t){let o=this.colon(t);if(o===!1)return;let r=0,n;for(let i=o-1;i>=0&&(n=t[i],!(n[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(t){let o=0,r,n,i;for(let[s,a]of t.entries()){if(r=a,n=r[0],n==="("&&(o+=1),n===")"&&(o-=1),o===0&&n===":")if(!i)this.doubleColon(r);else{if(i[0]==="word"&&i[1]==="progid")continue;return s}i=r}return!1}comment(t){let o=new t0e;this.init(o,t[2]),o.source.end=this.getPosition(t[3]||t[2]),o.source.end.offset++;let r=t[1].slice(2,-2);if(/^\s*$/.test(r))o.text="",o.raws.left=r,o.raws.right="";else{let n=r.match(/^(\s*)([^]*\S)(\s*)$/);o.text=n[2],o.raws.left=n[1],o.raws.right=n[3]}}createTokenizer(){this.tokenizer=e0e(this.input)}decl(t,o){let r=new J_e;this.init(r,t[0][2]);let n=t[t.length-1];for(n[0]===";"&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(n[3]||n[2]||n0e(t)),r.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop="";t.length;){let u=t[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=t.shift()[1]}r.raws.between="";let i;for(;t.length;)if(i=t.shift(),i[0]===":"){r.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let s=[],a;for(;t.length&&(a=t[0][0],!(a!=="space"&&a!=="comment"));)s.push(t.shift());this.precheckMissedSemicolon(t);for(let u=t.length-1;u>=0;u--){if(i=t[u],i[1].toLowerCase()==="!important"){r.important=!0;let d=this.stringFrom(t,u);d=this.spacesFromEnd(t)+d,d!==" !important"&&(r.raws.important=d);break}else if(i[1].toLowerCase()==="important"){let d=t.slice(0),f="";for(let m=u;m>0;m--){let h=d[m][0];if(f.trim().indexOf("!")===0&&h!=="space")break;f=d.pop()[1]+f}f.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=f,t=d)}if(i[0]!=="space"&&i[0]!=="comment")break}t.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=s.map(u=>u[1]).join(""),s=[]),this.raw(r,"value",s.concat(t),o),r.value.includes(":")&&!o&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let o=new OW;this.init(o,t[2]),o.selector="",o.raws.between="",this.current=o}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){let o=this.current.nodes[this.current.nodes.length-1];o&&o.type==="rule"&&!o.raws.ownSemicolon&&(o.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(t){let o=this.input.fromOffset(t);return{column:o.col,line:o.line,offset:t}}init(t,o){this.current.push(t),t.source={input:this.input,start:this.getPosition(o)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let o=!1,r=null,n=!1,i=null,s=[],a=t[1].startsWith("--"),c=[],u=t;for(;u;){if(r=u[0],c.push(u),r==="("||r==="[")i||(i=u),s.push(r==="("?")":"]");else if(a&&n&&r==="{")i||(i=u),s.push("}");else if(s.length===0)if(r===";")if(n){this.decl(c,a);return}else break;else if(r==="{"){this.rule(c);return}else if(r==="}"){this.tokenizer.back(c.pop()),o=!0;break}else r===":"&&(n=!0);else r===s[s.length-1]&&(s.pop(),s.length===0&&(i=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(o=!0),s.length>0&&this.unclosedBracket(i),o&&n){if(!a)for(;c.length&&(u=c[c.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(c.pop());this.decl(c,a)}else this.unknownWord(c)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,o,r,n){let i,s,a=r.length,c="",u=!0,d,f;for(let m=0;m<a;m+=1)i=r[m],s=i[0],s==="space"&&m===a-1&&!n?u=!1:s==="comment"?(f=r[m-1]?r[m-1][0]:"empty",d=r[m+1]?r[m+1][0]:"empty",!AW[f]&&!AW[d]?c.slice(-1)===","?u=!1:c+=i[1]:u=!1):c+=i[1];if(!u){let m=r.reduce((h,p)=>h+p[1],"");t.raws[o]={raw:m,value:c}}t[o]=c}rule(t){t.pop();let o=new OW;this.init(o,t[0][2]),o.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(o,"selector",t),this.current=o}spacesAndCommentsFromEnd(t){let o,r="";for(;t.length&&(o=t[t.length-1][0],!(o!=="space"&&o!=="comment"));)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){let o,r="";for(;t.length&&(o=t[0][0],!(o!=="space"&&o!=="comment"));)r+=t.shift()[1];return r}spacesFromEnd(t){let o,r="";for(;t.length&&(o=t[t.length-1][0],o==="space");)r=t.pop()[1]+r;return r}stringFrom(t,o){let r="";for(let n=o;n<t.length;n++)r+=t[n][1];return t.splice(o,t.length-o),r}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,o){throw this.input.error("At-rule without name",{offset:o[2]},{offset:o[2]+o[1].length})}};LW.exports=l5});var c5=oe(($He,MW)=>{"use strict";var i0e=rm(),s0e=NW(),a0e=ZD();function G1(e,t){let o=new a0e(e,t),r=new s0e(o);try{r.parse()}catch(n){throw n}return r.root}MW.exports=G1;G1.default=G1;i0e.registerParse(G1)});var VW=oe((KHe,DW)=>{"use strict";var Ay=class{constructor(t,o={}){if(this.type="warning",this.text=t,o.node&&o.node.source){let r=o.node.rangeBy(o);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in o)this[r]=o[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};DW.exports=Ay;Ay.default=Ay});var u5=oe((YHe,FW)=>{"use strict";var l0e=VW(),Ly=class{constructor(t,o,r){this.processor=t,this.messages=[],this.root=o,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,o={}){o.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(o.plugin=this.lastPlugin.postcssPlugin);let r=new l0e(t,o);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}get content(){return this.css}};FW.exports=Ly;Ly.default=Ly});var jW=oe((ZHe,zW)=>{"use strict";var c0e=QD(),u0e=D1(),qHe=t5(),d0e=c5(),f0e=u5(),Ny=class{constructor(t,o,r){o=o.toString(),this.stringified=!1,this._processor=t,this._css=o,this._opts=r,this._map=void 0;let n,i=u0e;this.result=new f0e(this._processor,n,this._opts),this.result.css=o;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});let a=new c0e(i,n,this._opts,o);if(a.isMap()){let[c,u]=a.generate();c&&(this.result.css=c),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,o){return this.async().then(t,o)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let t,o=d0e;try{t=o(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}};zW.exports=Ny;Ny.default=Ny});var d5=oe((XHe,GW)=>{"use strict";var m0e=rm(),UW,HW,nm=class extends m0e{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new UW(new HW,this,t).stringify()}};nm.registerLazyResult=e=>{UW=e};nm.registerProcessor=e=>{HW=e};GW.exports=nm;nm.default=nm});var qW=oe((JHe,YW)=>{"use strict";var{isClean:xa,my:p0e}=V1(),h0e=QD(),g0e=D1(),b0e=rm(),k0e=d5(),QHe=t5(),WW=u5(),v0e=c5(),y0e=H1(),S0e={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},_0e={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},x0e={Once:!0,postcssPlugin:!0,prepare:!0},zh=0;function My(e){return typeof e=="object"&&typeof e.then=="function"}function KW(e){let t=!1,o=S0e[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[o,o+"-"+t,zh,o+"Exit",o+"Exit-"+t]:t?[o,o+"-"+t,o+"Exit",o+"Exit-"+t]:e.append?[o,zh,o+"Exit"]:[o,o+"Exit"]}function $W(e){let t;return e.type==="document"?t=["Document",zh,"DocumentExit"]:e.type==="root"?t=["Root",zh,"RootExit"]:t=KW(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function f5(e){return e[xa]=!1,e.nodes&&e.nodes.forEach(t=>f5(t)),e}var m5={},zu=class e{constructor(t,o,r){this.stringified=!1,this.processed=!1;let n;if(typeof o=="object"&&o!==null&&(o.type==="root"||o.type==="document"))n=f5(o);else if(o instanceof e||o instanceof WW)n=f5(o.root),o.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=o.map);else{let i=v0e;r.syntax&&(i=r.syntax.parse),r.parser&&(i=r.parser),i.parse&&(i=i.parse);try{n=i(o,r)}catch(s){this.processed=!0,this.error=s}n&&!n[p0e]&&b0e.rebuild(n)}this.result=new WW(t,n,r),this.helpers={...m5,postcss:m5,result:this.result},this.plugins=this.processor.plugins.map(i=>typeof i=="object"&&i.prepare?{...i,...i.prepare(this.result)}:i)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,o){let r=this.result.lastPlugin;try{o&&o.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=r.postcssPlugin,t.setMessage()):r.postcssVersion}catch(n){console&&console.error&&console.error(n)}return t}prepareVisitors(){this.listeners={};let t=(o,r,n)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([o,n])};for(let o of this.plugins)if(typeof o=="object")for(let r in o){if(!_0e[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${o.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!x0e[r])if(typeof o[r]=="object")for(let n in o[r])n==="*"?t(o,r,o[r][n]):t(o,r+"-"+n.toLowerCase(),o[r][n]);else typeof o[r]=="function"&&t(o,r,o[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let o=this.plugins[t],r=this.runOnRoot(o);if(My(r))try{await r}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[xa];){t[xa]=!0;let o=[$W(t)];for(;o.length>0;){let r=this.visitTick(o);if(My(r))try{await r}catch(n){let i=o[o.length-1].node;throw this.handleError(n,i)}}}if(this.listeners.OnceExit)for(let[o,r]of this.listeners.OnceExit){this.result.lastPlugin=o;try{if(t.type==="document"){let n=t.nodes.map(i=>r(i,this.helpers));await Promise.all(n)}else await r(t,this.helpers)}catch(n){throw this.handleError(n)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let o=this.result.root.nodes.map(r=>t.Once(r,this.helpers));return My(o[0])?Promise.all(o):o}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(o){throw this.handleError(o)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,o=g0e;t.syntax&&(o=t.syntax.stringify),t.stringifier&&(o=t.stringifier),o.stringify&&(o=o.stringify);let n=new h0e(o,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins){let o=this.runOnRoot(t);if(My(o))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[xa];)t[xa]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let o of t.nodes)this.visitSync(this.listeners.OnceExit,o);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,o){return this.async().then(t,o)}toString(){return this.css}visitSync(t,o){for(let[r,n]of t){this.result.lastPlugin=r;let i;try{i=n(o,this.helpers)}catch(s){throw this.handleError(s,o.proxyOf)}if(o.type!=="root"&&o.type!=="document"&&!o.parent)return!0;if(My(i))throw this.getAsyncError()}}visitTick(t){let o=t[t.length-1],{node:r,visitors:n}=o;if(r.type!=="root"&&r.type!=="document"&&!r.parent){t.pop();return}if(n.length>0&&o.visitorIndex<n.length){let[s,a]=n[o.visitorIndex];o.visitorIndex+=1,o.visitorIndex===n.length&&(o.visitors=[],o.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(o.iterator!==0){let s=o.iterator,a;for(;a=r.nodes[r.indexes[s]];)if(r.indexes[s]+=1,!a[xa]){a[xa]=!0,t.push($W(a));return}o.iterator=0,delete r.indexes[s]}let i=o.events;for(;o.eventIndex<i.length;){let s=i[o.eventIndex];if(o.eventIndex+=1,s===zh){r.nodes&&r.nodes.length&&(r[xa]=!0,o.iterator=r.getIterator());return}else if(this.listeners[s]){o.visitors=this.listeners[s];return}}t.pop()}walkSync(t){t[xa]=!0;let o=KW(t);for(let r of o)if(r===zh)t.nodes&&t.each(n=>{n[xa]||this.walkSync(n)});else{let n=this.listeners[r];if(n&&this.visitSync(n,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};zu.registerPostcss=e=>{m5=e};YW.exports=zu;zu.default=zu;y0e.registerLazyResult(zu);k0e.registerLazyResult(zu)});var XW=oe((e8e,ZW)=>{"use strict";var w0e=jW(),C0e=qW(),B0e=d5(),E0e=H1(),im=class{constructor(t=[]){this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){let o=[];for(let r of t)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))o=o.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)o.push(r);else if(typeof r=="function")o.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return o}process(t,o={}){return!this.plugins.length&&!o.parser&&!o.stringifier&&!o.syntax?new w0e(this,t,o):new C0e(this,t,o)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};ZW.exports=im;im.default=im;E0e.registerProcessor(im);B0e.registerProcessor(im)});var e$=oe((t8e,JW)=>{JW.exports=function(t){let o=t.prefix,r=/\s+$/.test(o)?o:`${o} `,n=t.ignoreFiles?[].concat(t.ignoreFiles):[],i=t.includeFiles?[].concat(t.includeFiles):[];return function(s){n.length&&s.source.input.file&&QW(s.source.input.file,n)||i.length&&s.source.input.file&&!QW(s.source.input.file,i)||s.walkRules(a=>{let c=["keyframes","-webkit-keyframes","-moz-keyframes","-o-keyframes","-ms-keyframes"];a.parent&&c.includes(a.parent.name)||(a.selectors=a.selectors.map(u=>t.exclude&&T0e(u,t.exclude)?u:t.transform?t.transform(o,u,r+u,s.source.input.file,a):r+u))})}};function QW(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e.includes(o))}function T0e(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e===o)}});var o$=oe((o8e,t$)=>{var p5=40,h5=41,W1=39,g5=34,b5=92,jh=47,k5=44,v5=58,$1=42,I0e=117,P0e=85,R0e=43,O0e=/^[a-f0-9?-]+$/i;t$.exports=function(e){for(var t=[],o=e,r,n,i,s,a,c,u,d,f=0,m=o.charCodeAt(f),h=o.length,p=[{nodes:t}],g=0,b,v="",k="",y="";f<h;)if(m<=32){r=f;do r+=1,m=o.charCodeAt(r);while(m<=32);s=o.slice(f,r),i=t[t.length-1],m===h5&&g?y=s:i&&i.type==="div"?(i.after=s,i.sourceEndIndex+=s.length):m===k5||m===v5||m===jh&&o.charCodeAt(r+1)!==$1&&(!b||b&&b.type==="function"&&b.value!=="calc")?k=s:t.push({type:"space",sourceIndex:f,sourceEndIndex:r,value:s}),f=r}else if(m===W1||m===g5){r=f,n=m===W1?"'":'"',s={type:"string",sourceIndex:f,quote:n};do if(a=!1,r=o.indexOf(n,r+1),~r)for(c=r;o.charCodeAt(c-1)===b5;)c-=1,a=!a;else o+=n,r=o.length-1,s.unclosed=!0;while(a);s.value=o.slice(f+1,r),s.sourceEndIndex=s.unclosed?r:r+1,t.push(s),f=r+1,m=o.charCodeAt(f)}else if(m===jh&&o.charCodeAt(f+1)===$1)r=o.indexOf("*/",f),s={type:"comment",sourceIndex:f,sourceEndIndex:r+2},r===-1&&(s.unclosed=!0,r=o.length,s.sourceEndIndex=r),s.value=o.slice(f+2,r),t.push(s),f=r+2,m=o.charCodeAt(f);else if((m===jh||m===$1)&&b&&b.type==="function"&&b.value==="calc")s=o[f],t.push({type:"word",sourceIndex:f-k.length,sourceEndIndex:f+s.length,value:s}),f+=1,m=o.charCodeAt(f);else if(m===jh||m===k5||m===v5)s=o[f],t.push({type:"div",sourceIndex:f-k.length,sourceEndIndex:f+s.length,value:s,before:k,after:""}),k="",f+=1,m=o.charCodeAt(f);else if(p5===m){r=f;do r+=1,m=o.charCodeAt(r);while(m<=32);if(d=f,s={type:"function",sourceIndex:f-v.length,value:v,before:o.slice(d+1,r)},f=r,v==="url"&&m!==W1&&m!==g5){r-=1;do if(a=!1,r=o.indexOf(")",r+1),~r)for(c=r;o.charCodeAt(c-1)===b5;)c-=1,a=!a;else o+=")",r=o.length-1,s.unclosed=!0;while(a);u=r;do u-=1,m=o.charCodeAt(u);while(m<=32);d<u?(f!==u+1?s.nodes=[{type:"word",sourceIndex:f,sourceEndIndex:u+1,value:o.slice(f,u+1)}]:s.nodes=[],s.unclosed&&u+1!==r?(s.after="",s.nodes.push({type:"space",sourceIndex:u+1,sourceEndIndex:r,value:o.slice(u+1,r)})):(s.after=o.slice(u+1,r),s.sourceEndIndex=r)):(s.after="",s.nodes=[]),f=r+1,s.sourceEndIndex=s.unclosed?r:f,m=o.charCodeAt(f),t.push(s)}else g+=1,s.after="",s.sourceEndIndex=f+1,t.push(s),p.push(s),t=s.nodes=[],b=s;v=""}else if(h5===m&&g)f+=1,m=o.charCodeAt(f),b.after=y,b.sourceEndIndex+=y.length,y="",g-=1,p[p.length-1].sourceEndIndex=f,p.pop(),b=p[g],t=b.nodes;else{r=f;do m===b5&&(r+=1),r+=1,m=o.charCodeAt(r);while(r<h&&!(m<=32||m===W1||m===g5||m===k5||m===v5||m===jh||m===p5||m===$1&&b&&b.type==="function"&&b.value==="calc"||m===jh&&b.type==="function"&&b.value==="calc"||m===h5&&g));s=o.slice(f,r),p5===m?v=s:(I0e===s.charCodeAt(0)||P0e===s.charCodeAt(0))&&R0e===s.charCodeAt(1)&&O0e.test(s.slice(2))?t.push({type:"unicode-range",sourceIndex:f,sourceEndIndex:r,value:s}):t.push({type:"word",sourceIndex:f,sourceEndIndex:r,value:s}),f=r}for(f=p.length-1;f;f-=1)p[f].unclosed=!0,p[f].sourceEndIndex=o.length;return p[0].nodes}});var n$=oe((r8e,r$)=>{r$.exports=function e(t,o,r){var n,i,s,a;for(n=0,i=t.length;n<i;n+=1)s=t[n],r||(a=o(s,n,t)),a!==!1&&s.type==="function"&&Array.isArray(s.nodes)&&e(s.nodes,o,r),r&&o(s,n,t)}});var l$=oe((n8e,a$)=>{function i$(e,t){var o=e.type,r=e.value,n,i;return t&&(i=t(e))!==void 0?i:o==="word"||o==="space"?r:o==="string"?(n=e.quote||"",n+r+(e.unclosed?"":n)):o==="comment"?"/*"+r+(e.unclosed?"":"*/"):o==="div"?(e.before||"")+r+(e.after||""):Array.isArray(e.nodes)?(n=s$(e.nodes,t),o!=="function"?n:r+"("+(e.before||"")+n+(e.after||"")+(e.unclosed?"":")")):r}function s$(e,t){var o,r;if(Array.isArray(e)){for(o="",r=e.length-1;~r;r-=1)o=i$(e[r],t)+o;return o}return i$(e,t)}a$.exports=s$});var u$=oe((i8e,c$)=>{var K1=45,Y1=43,y5=46,A0e=101,L0e=69;function N0e(e){var t=e.charCodeAt(0),o;if(t===Y1||t===K1){if(o=e.charCodeAt(1),o>=48&&o<=57)return!0;var r=e.charCodeAt(2);return o===y5&&r>=48&&r<=57}return t===y5?(o=e.charCodeAt(1),o>=48&&o<=57):t>=48&&t<=57}c$.exports=function(e){var t=0,o=e.length,r,n,i;if(o===0||!N0e(e))return!1;for(r=e.charCodeAt(t),(r===Y1||r===K1)&&t++;t<o&&(r=e.charCodeAt(t),!(r<48||r>57));)t+=1;if(r=e.charCodeAt(t),n=e.charCodeAt(t+1),r===y5&&n>=48&&n<=57)for(t+=2;t<o&&(r=e.charCodeAt(t),!(r<48||r>57));)t+=1;if(r=e.charCodeAt(t),n=e.charCodeAt(t+1),i=e.charCodeAt(t+2),(r===A0e||r===L0e)&&(n>=48&&n<=57||(n===Y1||n===K1)&&i>=48&&i<=57))for(t+=n===Y1||n===K1?3:2;t<o&&(r=e.charCodeAt(t),!(r<48||r>57));)t+=1;return{number:e.slice(0,t),unit:e.slice(t)}}});var p$=oe((s8e,m$)=>{var M0e=o$(),d$=n$(),f$=l$();function ju(e){return this instanceof ju?(this.nodes=M0e(e),this):new ju(e)}ju.prototype.toString=function(){return Array.isArray(this.nodes)?f$(this.nodes):""};ju.prototype.walk=function(e,t){return d$(this.nodes,e,t),this};ju.unit=u$();ju.walk=d$;ju.stringify=f$;m$.exports=ju});var g$=oe((a8e,S5)=>{var h$=p$();S5.exports=e=>{let o=Object.assign({skipHostRelativeUrls:!0},e);return{postcssPlugin:"rebaseUrl",Declaration(r){let n=h$(r.value),i=!1;n.walk(s=>{if(s.type!=="function"||s.value!=="url")return;let a=s.nodes[0].value,c=new URL(a,e.rootUrl);return c.pathname===a&&o.skipHostRelativeUrls||(s.nodes[0].value=c.toString(),i=!0),!1}),i&&(r.value=h$.stringify(n))}}};S5.exports.postcss=!0});var I$=oe((S8e,T$)=>{T$.exports=window.wp.priorityQueue});var F5=oe((p9e,TK)=>{TK.exports=window.wp.blob});var Jy=oe((VWe,DY)=>{DY.exports=window.wp.isShallowEqual});var XE=oe((Kqe,TX)=>{TX.exports=window.wp.tokenList});var MV=oe((iZe,UX)=>{"use strict";var k1e=function(t){return v1e(t)&&!y1e(t)};function v1e(e){return!!e&&typeof e=="object"}function y1e(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||x1e(e)}var S1e=typeof Symbol=="function"&&Symbol.for,_1e=S1e?Symbol.for("react.element"):60103;function x1e(e){return e.$$typeof===_1e}function w1e(e){return Array.isArray(e)?[]:{}}function xS(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Rg(w1e(e),e,t):e}function C1e(e,t,o){return e.concat(t).map(function(r){return xS(r,o)})}function B1e(e,t){if(!t.customMerge)return Rg;var o=t.customMerge(e);return typeof o=="function"?o:Rg}function E1e(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function zX(e){return Object.keys(e).concat(E1e(e))}function jX(e,t){try{return t in e}catch{return!1}}function T1e(e,t){return jX(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function I1e(e,t,o){var r={};return o.isMergeableObject(e)&&zX(e).forEach(function(n){r[n]=xS(e[n],o)}),zX(t).forEach(function(n){T1e(e,n)||(jX(e,n)&&o.isMergeableObject(t[n])?r[n]=B1e(n,o)(e[n],t[n],o):r[n]=xS(t[n],o))}),r}function Rg(e,t,o){o=o||{},o.arrayMerge=o.arrayMerge||C1e,o.isMergeableObject=o.isMergeableObject||k1e,o.cloneUnlessOtherwiseSpecified=xS;var r=Array.isArray(t),n=Array.isArray(e),i=r===n;return i?r?o.arrayMerge(e,t,o):I1e(e,t,o):xS(t,o)}Rg.all=function(t,o){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,n){return Rg(r,n,o)},{})};var P1e=Rg;UX.exports=P1e});var ZQ=oe((NQe,qQ)=>{qQ.exports=window.wp.commands});var pc=oe((mot,mte)=>{mte.exports=window.wp.date});var $te=oe((ert,Wte)=>{var zte=!1,Gm,N3,M3,gI,bI,jte,kI,D3,V3,F3,Ute,z3,j3,Hte,Gte;function En(){if(!zte){zte=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),o=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(z3=/\b(iPhone|iP[ao]d)/.exec(e),j3=/\b(iP[ao]d)/.exec(e),F3=/Android/i.exec(e),Hte=/FBAN\/\w+;/i.exec(e),Gte=/Mobile/i.exec(e),Ute=!!/Win64/.exec(e),t){Gm=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,Gm&&document&&document.documentMode&&(Gm=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);jte=r?parseFloat(r[1])+4:Gm,N3=t[2]?parseFloat(t[2]):NaN,M3=t[3]?parseFloat(t[3]):NaN,gI=t[4]?parseFloat(t[4]):NaN,gI?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),bI=t&&t[1]?parseFloat(t[1]):NaN):bI=NaN}else Gm=N3=M3=bI=gI=NaN;if(o){if(o[1]){var n=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);kI=n?parseFloat(n[1].replace("_",".")):!0}else kI=!1;D3=!!o[2],V3=!!o[3]}else kI=D3=V3=!1}}var U3={ie:function(){return En()||Gm},ieCompatibilityMode:function(){return En()||jte>Gm},ie64:function(){return U3.ie()&&Ute},firefox:function(){return En()||N3},opera:function(){return En()||M3},webkit:function(){return En()||gI},safari:function(){return U3.webkit()},chrome:function(){return En()||bI},windows:function(){return En()||D3},osx:function(){return En()||kI},linux:function(){return En()||V3},iphone:function(){return En()||z3},mobile:function(){return En()||z3||j3||F3||Gte},nativeApp:function(){return En()||Hte},android:function(){return En()||F3},ipad:function(){return En()||j3}};Wte.exports=U3});var Yte=oe((trt,Kte)=>{"use strict";var vI=!!(typeof window<"u"&&window.document&&window.document.createElement),yEe={canUseDOM:vI,canUseWorkers:typeof Worker<"u",canUseEventListeners:vI&&!!(window.addEventListener||window.attachEvent),canUseViewport:vI&&!!window.screen,isInWorker:!vI};Kte.exports=yEe});var Qte=oe((ort,Xte)=>{"use strict";var qte=Yte(),Zte;qte.canUseDOM&&(Zte=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function SEe(e,t){if(!qte.canUseDOM||t&&!("addEventListener"in document))return!1;var o="on"+e,r=o in document;if(!r){var n=document.createElement("div");n.setAttribute(o,"return;"),r=typeof n[o]=="function"}return!r&&Zte&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}Xte.exports=SEe});var noe=oe((rrt,roe)=>{"use strict";var _Ee=$te(),xEe=Qte(),Jte=10,eoe=40,toe=800;function ooe(e){var t=0,o=0,r=0,n=0;return"detail"in e&&(o=e.detail),"wheelDelta"in e&&(o=-e.wheelDelta/120),"wheelDeltaY"in e&&(o=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=o,o=0),r=t*Jte,n=o*Jte,"deltaY"in e&&(n=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||n)&&e.deltaMode&&(e.deltaMode==1?(r*=eoe,n*=eoe):(r*=toe,n*=toe)),r&&!t&&(t=r<1?-1:1),n&&!o&&(o=n<1?-1:1),{spinX:t,spinY:o,pixelX:r,pixelY:n}}ooe.getEventType=function(){return _Ee.firefox()?"DOMMouseScroll":xEe("wheel")?"wheel":"mousewheel"};roe.exports=ooe});var soe=oe((nrt,ioe)=>{ioe.exports=noe()});var Nre=oe((qnt,Lre)=>{"use strict";Lre.exports=function e(t,o){if(t===o)return!0;if(t&&o&&typeof t=="object"&&typeof o=="object"){if(t.constructor!==o.constructor)return!1;var r,n,i;if(Array.isArray(t)){if(r=t.length,r!=o.length)return!1;for(n=r;n--!==0;)if(!e(t[n],o[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===o.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===o.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(o).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,i[n]))return!1;for(n=r;n--!==0;){var s=i[n];if(!e(t[s],o[s]))return!1}return!0}return t!==t&&o!==o}});var dLe={};Ip(dLe,{AlignmentControl:()=>$w,AlignmentToolbar:()=>wU,Autocomplete:()=>ZU,BlockAlignmentControl:()=>cC,BlockAlignmentToolbar:()=>kH,BlockBindingsAttributeControl:()=>$v,BlockBindingsSourceFieldsList:()=>Wv,BlockBreadcrumb:()=>jH,BlockCanvas:()=>tJ,BlockColorsStyleSelector:()=>iJ,BlockContextProvider:()=>g0,BlockControls:()=>Mt,BlockEdit:()=>Fw,BlockEditorKeyboardShortcuts:()=>g1,BlockEditorProvider:()=>U9,BlockFormatControls:()=>bV,BlockIcon:()=>Ae,BlockInspector:()=>Hae,BlockList:()=>Gh,BlockMover:()=>kE,BlockNavigationDropdown:()=>pee,BlockPopover:()=>vY,BlockPreview:()=>vn,BlockSelectionClearer:()=>OY,BlockSettingsMenu:()=>GE,BlockSettingsMenuControls:()=>FE,BlockStyles:()=>Qg,BlockTitle:()=>Yv,BlockToolbar:()=>MQ,BlockTools:()=>RS,BlockVerticalAlignmentControl:()=>iC,BlockVerticalAlignmentToolbar:()=>Fee,ButtonBlockAppender:()=>Qu,ButtonBlockerAppender:()=>cY,ColorPalette:()=>ate,ColorPaletteControl:()=>ute,ContrastChecker:()=>QT,CopyHandler:()=>$ae,DefaultBlockAppender:()=>cg,DimensionControl:()=>lb,FontSizePicker:()=>fM,HeadingLevelDropdown:()=>Bee,HeightControl:()=>Fte,InnerBlocks:()=>tS,Inserter:()=>Ui,InspectorAdvancedControls:()=>rd,InspectorControls:()=>fe,JustifyContentControl:()=>ah,JustifyToolbar:()=>qoe,LineHeightControl:()=>HI,LinkControl:()=>Pd,MediaPlaceholder:()=>gne,MediaReplaceFlow:()=>_b,MediaUpload:()=>qu,MediaUploadCheck:()=>Ds,MultiSelectScrollIntoView:()=>Zae,NavigableToolbar:()=>Bg,ObserveTyping:()=>rq,PanelColorSettings:()=>kne,PlainText:()=>gie,RecursionProvider:()=>f4,RichText:()=>Eb,RichTextShortcut:()=>wF,RichTextToolbarButton:()=>BF,SETTINGS_DEFAULTS:()=>Kk,SkipToSelectedBlock:()=>kP,ToolSelector:()=>cle,Typewriter:()=>ele,URLInput:()=>Td,URLInputButton:()=>Cie,URLPopover:()=>Ad,Warning:()=>pu,WritingFlow:()=>E1,__experimentalBlockAlignmentMatrixControl:()=>AH,__experimentalBlockFullHeightAligmentControl:()=>IH,__experimentalBlockPatternSetup:()=>Mee,__experimentalBlockPatternsList:()=>Ca,__experimentalBlockVariationPicker:()=>Eee,__experimentalBlockVariationTransforms:()=>WT,__experimentalBorderRadiusControl:()=>ZT,__experimentalColorGradientControl:()=>_d,__experimentalColorGradientSettingsDropdown:()=>fI,__experimentalDateFormatPicker:()=>pte,__experimentalDuotoneControl:()=>eI,__experimentalFontAppearanceControl:()=>oI,__experimentalFontFamilyControl:()=>rI,__experimentalGetBorderClassesAndStyles:()=>sO,__experimentalGetColorClassesAndStyles:()=>aO,__experimentalGetElementClassName:()=>lLe,__experimentalGetGapCSSValue:()=>mr,__experimentalGetGradientClass:()=>th,__experimentalGetGradientObjectByGradientValue:()=>pU,__experimentalGetShadowClassesAndStyles:()=>Yz,__experimentalGetSpacingClassesAndStyles:()=>Xz,__experimentalImageEditor:()=>Uoe,__experimentalImageSizeControl:()=>$oe,__experimentalImageURLInputUI:()=>Oie,__experimentalInspectorPopoverHeader:()=>y2,__experimentalLetterSpacingControl:()=>iI,__experimentalLibrary:()=>Yae,__experimentalLinkControl:()=>UI,__experimentalLinkControlSearchInput:()=>yre,__experimentalLinkControlSearchItem:()=>are,__experimentalLinkControlSearchResults:()=>mre,__experimentalListView:()=>zT,__experimentalPanelColorGradientSettings:()=>pI,__experimentalPreviewOptions:()=>Yie,__experimentalPublishDateTimePicker:()=>ile,__experimentalRecursionProvider:()=>tle,__experimentalResponsiveBlockControl:()=>Sie,__experimentalSpacingSizesControl:()=>Db,__experimentalTextDecorationControl:()=>aI,__experimentalTextTransformControl:()=>cI,__experimentalUnitControl:()=>xie,__experimentalUseBlockOverlayActive:()=>HH,__experimentalUseBlockPreview:()=>L$,__experimentalUseBorderProps:()=>Kz,__experimentalUseColorProps:()=>Zz,__experimentalUseCustomSides:()=>Cz,__experimentalUseGradient:()=>Yke,__experimentalUseHasRecursion:()=>ole,__experimentalUseMultipleOriginColorsAndGradients:()=>wd,__experimentalUseResizeCanvas:()=>qie,__experimentalWritingModeControl:()=>dI,__unstableBlockSettingsMenuFirstItem:()=>TE,__unstableBlockToolbarLastItem:()=>xE,__unstableEditorStyles:()=>Nl,__unstableIframe:()=>Mh,__unstableInserterMenuExtension:()=>yB,__unstableRichTextInputEvent:()=>EF,__unstableUseBlockSelectionClearer:()=>hm,__unstableUseClipboardHandler:()=>Wae,__unstableUseMouseMoveTypingReset:()=>rS,__unstableUseTypewriter:()=>c4,__unstableUseTypingObserver:()=>nS,createCustomColorsHOC:()=>fU,getColorClassName:()=>_i,getColorObjectByAttributeValues:()=>da,getColorObjectByColorValue:()=>p0,getComputedFluidTypographyValue:()=>bU,getCustomValueFromPreset:()=>JU,getDimensionsClassesAndStyles:()=>$z,getFontSize:()=>oh,getFontSizeClass:()=>hu,getFontSizeObjectByValue:()=>dM,getGradientSlugByValue:()=>hU,getGradientValueBySlug:()=>Gw,getPxFromCssUnit:()=>xme,getSpacingPresetCssVar:()=>jv,getTypographyClassesAndStyles:()=>Qz,isValueSpacingPreset:()=>nC,privateApis:()=>a6,store:()=>_,storeConfig:()=>Qp,transformStyles:()=>Uh,useBlockBindingsUtils:()=>El,useBlockCommands:()=>_T,useBlockDisplayInformation:()=>Tt,useBlockEditContext:()=>Ie,useBlockEditingMode:()=>ao,useBlockProps:()=>ky,useCachedTruthy:()=>Jz,useHasRecursion:()=>m4,useInnerBlocksProps:()=>ym,useSetting:()=>lU,useSettings:()=>me,useStyleOverride:()=>Qn,withColorContext:()=>XT,withColors:()=>mU,withFontSizes:()=>_U});function c6(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(o=c6(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function Zme(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=c6(e))&&(r&&(r+=" "),r+=t);return r}var V=Zme;var ule=l($(),1),as=l(R(),1),x2=l(F(),1),b4=l(Z(),1),w_=l(ut(),1);var c0=l(R(),1),bs=Symbol("mayDisplayControls"),Pp=Symbol("mayDisplayParentControls"),$c=Symbol("mayDisplayPatternEditingControls"),u0=Symbol("blockEditingMode"),Rp=Symbol("blockBindings"),d0=Symbol("isPreviewMode"),Hk=Symbol("isInListViewBlockSupportTree"),gO={name:"",isSelected:!1},bO=(0,c0.createContext)(gO);bO.displayName="BlockEditContext";var{Provider:f0}=bO;function Ie(){return(0,c0.useContext)(bO)}var Xme={grad:.9,turn:360,rad:360/(2*Math.PI)},ml=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Zo=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=Math.pow(10,t)),Math.round(o*e)/o+0},Si=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=1),e>o?o:e>t?e:t},_6=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},h6=function(e){return{r:Si(e.r,0,255),g:Si(e.g,0,255),b:Si(e.b,0,255),a:Si(e.a)}},kO=function(e){return{r:Zo(e.r),g:Zo(e.g),b:Zo(e.b),a:Zo(e.a,3)}},Qme=/^#([0-9a-f]{3,8})$/i,m0=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},x6=function(e){var t=e.r,o=e.g,r=e.b,n=e.a,i=Math.max(t,o,r),s=i-Math.min(t,o,r),a=s?i===t?(o-r)/s:i===o?2+(r-t)/s:4+(t-o)/s:0;return{h:60*(a<0?a+6:a),s:i?s/i*100:0,v:i/255*100,a:n}},w6=function(e){var t=e.h,o=e.s,r=e.v,n=e.a;t=t/360*6,o/=100,r/=100;var i=Math.floor(t),s=r*(1-o),a=r*(1-(t-i)*o),c=r*(1-(1-t+i)*o),u=i%6;return{r:255*[r,a,s,s,c,r][u],g:255*[c,r,r,a,s,s][u],b:255*[s,s,c,r,r,a][u],a:n}},g6=function(e){return{h:_6(e.h),s:Si(e.s,0,100),l:Si(e.l,0,100),a:Si(e.a)}},b6=function(e){return{h:Zo(e.h),s:Zo(e.s),l:Zo(e.l),a:Zo(e.a,3)}},k6=function(e){return w6((o=(t=e).s,{h:t.h,s:(o*=((r=t.l)<50?r:100-r)/100)>0?2*o/(r+o)*100:0,v:r+o,a:t.a}));var t,o,r},Gk=function(e){return{h:(t=x6(e)).h,s:(n=(200-(o=t.s))*(r=t.v)/100)>0&&n<200?o*r/100/(n<=100?n:200-n)*100:0,l:n/2,a:t.a};var t,o,r,n},Jme=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,epe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,tpe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ope=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,SO={string:[[function(e){var t=Qme.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Zo(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?Zo(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=tpe.exec(e)||ope.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:h6({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:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Jme.exec(e)||epe.exec(e);if(!t)return null;var o,r,n=g6({h:(o=t[1],r=t[2],r===void 0&&(r="deg"),Number(o)*(Xme[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return k6(n)},"hsl"]],object:[[function(e){var t=e.r,o=e.g,r=e.b,n=e.a,i=n===void 0?1:n;return ml(t)&&ml(o)&&ml(r)?h6({r:Number(t),g:Number(o),b:Number(r),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,o=e.s,r=e.l,n=e.a,i=n===void 0?1:n;if(!ml(t)||!ml(o)||!ml(r))return null;var s=g6({h:Number(t),s:Number(o),l:Number(r),a:Number(i)});return k6(s)},"hsl"],[function(e){var t=e.h,o=e.s,r=e.v,n=e.a,i=n===void 0?1:n;if(!ml(t)||!ml(o)||!ml(r))return null;var s=(function(a){return{h:_6(a.h),s:Si(a.s,0,100),v:Si(a.v,0,100),a:Si(a.a)}})({h:Number(t),s:Number(o),v:Number(r),a:Number(i)});return w6(s)},"hsv"]]},v6=function(e,t){for(var o=0;o<t.length;o++){var r=t[o][0](e);if(r)return[r,t[o][1]]}return[null,void 0]},rpe=function(e){return typeof e=="string"?v6(e.trim(),SO.string):typeof e=="object"&&e!==null?v6(e,SO.object):[null,void 0]};var vO=function(e,t){var o=Gk(e);return{h:o.h,s:Si(o.s+100*t,0,100),l:o.l,a:o.a}},yO=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},y6=function(e,t){var o=Gk(e);return{h:o.h,s:o.s,l:Si(o.l+100*t,0,100),a:o.a}},_O=(function(){function e(t){this.parsed=rpe(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return Zo(yO(this.rgba),2)},e.prototype.isDark=function(){return yO(this.rgba)<.5},e.prototype.isLight=function(){return yO(this.rgba)>=.5},e.prototype.toHex=function(){return t=kO(this.rgba),o=t.r,r=t.g,n=t.b,s=(i=t.a)<1?m0(Zo(255*i)):"","#"+m0(o)+m0(r)+m0(n)+s;var t,o,r,n,i,s},e.prototype.toRgb=function(){return kO(this.rgba)},e.prototype.toRgbString=function(){return t=kO(this.rgba),o=t.r,r=t.g,n=t.b,(i=t.a)<1?"rgba("+o+", "+r+", "+n+", "+i+")":"rgb("+o+", "+r+", "+n+")";var t,o,r,n,i},e.prototype.toHsl=function(){return b6(Gk(this.rgba))},e.prototype.toHslString=function(){return t=b6(Gk(this.rgba)),o=t.h,r=t.s,n=t.l,(i=t.a)<1?"hsla("+o+", "+r+"%, "+n+"%, "+i+")":"hsl("+o+", "+r+"%, "+n+"%)";var t,o,r,n,i},e.prototype.toHsv=function(){return t=x6(this.rgba),{h:Zo(t.h),s:Zo(t.s),v:Zo(t.v),a:Zo(t.a,3)};var t},e.prototype.invert=function(){return Bt({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Bt(vO(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Bt(vO(this.rgba,-t))},e.prototype.grayscale=function(){return Bt(vO(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Bt(y6(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Bt(y6(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Bt({r:(o=this.rgba).r,g:o.g,b:o.b,a:t}):Zo(this.rgba.a,3);var o},e.prototype.hue=function(t){var o=Gk(this.rgba);return typeof t=="number"?Bt({h:t,s:o.s,l:o.l,a:o.a}):Zo(o.h)},e.prototype.isEqual=function(t){return this.toHex()===Bt(t).toHex()},e})(),Bt=function(e){return e instanceof _O?e:new _O(e)},S6=[],Kc=function(e){e.forEach(function(t){S6.indexOf(t)<0&&(t(_O,SO),S6.push(t))})};function Yc(e,t){var o={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var n in o)r[o[n]]=n;var i={};e.prototype.toName=function(s){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,c,u=r[this.toHex()];if(u)return u;if(s?.closest){var d=this.toRgb(),f=1/0,m="black";if(!i.length)for(var h in o)i[h]=new e(o[h]).toRgb();for(var p in o){var g=(a=d,c=i[p],Math.pow(a.r-c.r,2)+Math.pow(a.g-c.g,2)+Math.pow(a.b-c.b,2));g<f&&(f=g,m=p)}return m}},t.string.push([function(s){var a=s.toLowerCase(),c=a==="transparent"?"#0000":o[a];return c?new e(c).toRgb():null},"name"])}var xO=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},wO=function(e){return .2126*xO(e.r)+.7152*xO(e.g)+.0722*xO(e.b)};function Op(e){e.prototype.luminance=function(){return t=wO(this.rgba),(o=2)===void 0&&(o=0),r===void 0&&(r=Math.pow(10,o)),Math.round(r*t)/r+0;var t,o,r},e.prototype.contrast=function(t){t===void 0&&(t="#FFF");var o,r,n,i,s,a,c,u=t instanceof e?t:new e(t);return i=this.rgba,s=u.toRgb(),a=wO(i),c=wO(s),o=a>c?(a+.05)/(c+.05):(c+.05)/(a+.05),(r=2)===void 0&&(r=0),n===void 0&&(n=Math.pow(10,r)),Math.floor(n*o)/n+0},e.prototype.isReadable=function(t,o){return t===void 0&&(t="#FFF"),o===void 0&&(o={}),this.contrast(t)>=(a=(s=(r=o).size)===void 0?"normal":s,(i=(n=r.level)===void 0?"AA":n)==="AAA"&&a==="normal"?7:i==="AA"&&a==="large"?3:4.5);var r,n,i,s,a}}var I6=l(A(),1);var E6=l(CO(),1),{lock:T6,unlock:M}=(0,E6.__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/block-editor");Kc([Yc,Op]);var{kebabCase:npe}=M(I6.privateApis),da=(e,t,o)=>{if(t){let r=e?.find(n=>n.slug===t);if(r)return r}return{color:o}},p0=(e,t)=>e?.find(o=>o.color===t);function _i(e,t){if(!(!e||!t))return`has-${npe(t)}-${e}`}function P6(e,t){let o=Bt(t),r=({color:i})=>o.contrast(i),n=Math.max(...e.map(r));return e.find(i=>r(i)===n).color}var zw=l(R(),1),zf=l(Z(),1),uU=l(A(),1);var sU=l(F(),1),aU=l(Re(),1);var Vw=l(R(),1),Dw=l($(),1);var pl=l($(),1),F6=l(A(),1),$k=l(F(),1),vf=l(R(),1);var Ap=l(R(),1),A6=l(w(),1),h0=(0,Ap.createContext)({});h0.displayName="BlockContext";function g0({value:e,children:t}){let o=(0,Ap.useContext)(h0),r=(0,Ap.useMemo)(()=>({...o,...e}),[o,e]);return(0,A6.jsx)(h0.Provider,{value:r,children:t})}var xr=h0;var Lp=l(dn(),1);function gf(e){return e?.startsWith("#")&&(0,Lp.isValidFragment)(e)}function bf(e){return e?.startsWith("/")||e?.startsWith("./")||e?.startsWith("../")}function kf(e){if(e.includes(" "))return!1;let o=(0,Lp.getProtocol)(e),r=(0,Lp.isValidProtocol)(o),n=ipe(e),i=e?.startsWith("www.");return r||i||gf(e)||n||bf(e)}function ipe(e,t=6){let o=e.split(/[?#]/)[0];return new RegExp(`(?<=\\S)\\.(?:[a-zA-Z_]{2,${t}})(?:\\/|$)`).test(o)}var spe="__default",N6="core/pattern-overrides";function Wk(e){return e?.[spe]?.source===N6}function M6(e,t){if(Wk(e)){let o={};for(let r of t){let n=e[r]?e[r]:{source:N6};o[r]=n}return o}return e}var D6=l(R(),1),ur=(0,D6.createContext)({});ur.displayName="PrivateBlockContext";var b0=l(w(),1),ape={},lpe=e=>{let{name:t}=e,o=(0,pl.getBlockType)(t);if(!o)return null;let r=o.edit||o.save;return(0,b0.jsx)(r,{...e})},V6=(0,F6.withFilters)("editor.BlockEdit")(lpe),cpe=e=>{let{name:t,clientId:o,attributes:r,setAttributes:n}=e,i=(0,$k.useRegistry)(),s=(0,pl.getBlockType)(t),a=(0,vf.useContext)(xr),c=(0,$k.useSelect)(v=>M(v(pl.store)).getAllBlockBindingsSources(),[]),{bindableAttributes:u}=(0,vf.useContext)(ur),{blockBindings:d,context:f,hasPatternOverrides:m}=(0,vf.useMemo)(()=>{let v=s?.usesContext?Object.fromEntries(Object.entries(a).filter(([k])=>s.usesContext.includes(k))):ape;return r?.metadata?.bindings&&Object.values(r?.metadata?.bindings||{}).forEach(k=>{c[k?.source]?.usesContext?.forEach(y=>{v[y]=a[y]})}),{blockBindings:M6(r?.metadata?.bindings,u),context:v,hasPatternOverrides:Wk(r?.metadata?.bindings)}},[s?.usesContext,a,r?.metadata?.bindings,u,c]),h=(0,$k.useSelect)(v=>{if(!d)return r;let k={},y=new Map;for(let[S,x]of Object.entries(d)){let{source:C,args:B}=x,I=c[C];!I||!u?.includes(S)||y.set(I,{...y.get(I),[S]:{args:B}})}if(y.size)for(let[S,x]of y){let C={};S.getValues?C=S.getValues({select:v,context:f,clientId:o,bindings:x}):Object.keys(x).forEach(B=>{C[B]=S.label});for(let[B,I]of Object.entries(C))B==="url"&&(!I||!kf(I))?k[B]=null:k[B]=I}return{...r,...k}},[r,u,d,o,f,c]),p=(0,vf.useCallback)(v=>{if(!d){n(v);return}i.batch(()=>{let k={...v},y=new Map;for(let[x,C]of Object.entries(k)){if(!d[x]||!u?.includes(x))continue;let B=d[x],I=c[B?.source];I?.setValues&&(y.set(I,{...y.get(I),[x]:{args:B.args,newValue:C}}),delete k[x])}if(y.size)for(let[x,C]of y)x.setValues({select:i.select,dispatch:i.dispatch,context:f,clientId:o,bindings:C});let S=!!f["pattern/overrides"];!(m&&S)&&Object.keys(k).length&&(m&&delete k.href,n(k))})},[u,d,o,f,m,n,c,i]);if(!s)return null;if(s.apiVersion>1)return(0,b0.jsx)(V6,{...e,attributes:h,context:f,setAttributes:p});let g=(0,pl.hasBlockSupport)(s,"className",!0)?(0,pl.getBlockDefaultClassName)(t):null,b=V(g,r?.className,e.className);return(0,b0.jsx)(V6,{...e,attributes:h,className:b,context:f,setAttributes:p})},z6=cpe;var rU=l($(),1),uM=l(A(),1),nU=l(F(),1),Mw=l(N(),1);var Nw=l(F(),1);var qk=l(yf(),1),TO=l(Z(),1),Zk=l(F(),1),Y6=l(Re(),1),E0=l($(),1);var Ne=l(N(),1),H6={insertUsage:{}},Kk={alignWide:!1,supportsLayout:!0,colors:[{name:(0,Ne.__)("Black"),slug:"black",color:"#000000"},{name:(0,Ne.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,Ne.__)("White"),slug:"white",color:"#ffffff"},{name:(0,Ne.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,Ne.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,Ne.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,Ne.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,Ne.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,Ne.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,Ne.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,Ne.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,Ne.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,Ne._x)("Small","font size name"),size:13,slug:"small"},{name:(0,Ne._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,Ne._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,Ne._x)("Large","font size name"),size:36,slug:"large"},{name:(0,Ne._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,Ne.__)("Thumbnail")},{slug:"medium",name:(0,Ne.__)("Medium")},{slug:"large",name:(0,Ne.__)("Large")},{slug:"full",name:(0,Ne.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,canLockBlocks:!0,canEditCSS:!1,enableOpenverseMediaCategory:!0,clearBlockSelection:!0,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],isPreviewMode:!1,blockInspectorAnimation:{animationParent:"core/navigation","core/navigation":{enterDirection:"leftToRight"},"core/navigation-submenu":{enterDirection:"rightToLeft"},"core/navigation-link":{enterDirection:"rightToLeft"},"core/search":{enterDirection:"rightToLeft"},"core/social-links":{enterDirection:"rightToLeft"},"core/page-list":{enterDirection:"rightToLeft"},"core/spacer":{enterDirection:"rightToLeft"},"core/home-link":{enterDirection:"rightToLeft"},"core/site-title":{enterDirection:"rightToLeft"},"core/site-logo":{enterDirection:"rightToLeft"}},generateAnchors:!1,gradients:[{name:(0,Ne.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:(0,Ne.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:(0,Ne.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:(0,Ne.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:(0,Ne.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:(0,Ne.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:(0,Ne.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,Ne.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:(0,Ne.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:(0,Ne.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:(0,Ne.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,Ne.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function k0(e,t,o){return[...e.slice(0,o),...Array.isArray(t)?t:[t],...e.slice(o)]}function v0(e,t,o,r=1){let n=[...e];return n.splice(t,r),k0(n,e.slice(t,t+r),o)}var xi=Symbol("globalStylesDataKey"),y0=Symbol("globalStylesLinks"),qc=Symbol("selectBlockPatternsKey"),S0=Symbol("reusableBlocksSelect"),Zc=Symbol("sectionRootClientIdKey"),_0=Symbol("mediaEditKey"),x0=Symbol("getMediaSelect"),Xc=Symbol("isIsolatedEditor"),wi=Symbol("deviceTypeKey"),w0=Symbol("isNavigationOverlayContext"),C0=Symbol("mediaUploadOnSuccess");var{isContentBlock:upe}=M(E0.privateApis),dpe=e=>e;function B0(e,t=""){let o=new Map,r=[];return o.set(t,r),e.forEach(n=>{let{clientId:i,innerBlocks:s}=n;r.push(i),B0(s,i).forEach((a,c)=>{o.set(c,a)})}),o}function BO(e,t=""){let o=[],r=[[t,e]];for(;r.length;){let[n,i]=r.shift();i.forEach(({innerBlocks:s,...a})=>{o.push([a.clientId,n]),s?.length&&r.push([a.clientId,s])})}return o}function q6(e,t=dpe){let o=[],r=[...e];for(;r.length;){let{innerBlocks:n,...i}=r.shift();r.push(...n),o.push([i.clientId,t(i)])}return o}function Z6(e){let t={},o=[...e];for(;o.length;){let{innerBlocks:r,...n}=o.shift();o.push(...r),t[n.clientId]=!0}return t}function G6(e){return q6(e,t=>{let{attributes:o,...r}=t;return r})}function W6(e){return q6(e,t=>t.attributes)}function fpe(e,t){return(0,qk.default)(Object.keys(e),Object.keys(t))}function mpe(e,t){return e.type==="UPDATE_BLOCK_ATTRIBUTES"&&t!==void 0&&t.type==="UPDATE_BLOCK_ATTRIBUTES"&&(0,qk.default)(e.clientIds,t.clientIds)&&fpe(e.attributes,t.attributes)}function $6(e,t){let o=e.tree,r=[...t],n=[...t];for(;r.length;){let i=r.shift();r.push(...i.innerBlocks),n.push(...i.innerBlocks)}for(let i of n)o.set(i.clientId,{});for(let i of n)o.set(i.clientId,Object.assign(o.get(i.clientId),{...e.byClientId.get(i.clientId),attributes:e.attributes.get(i.clientId),innerBlocks:i.innerBlocks.map(s=>o.get(s.clientId))}))}function hl(e,t,o=!1){let r=e.tree,n=new Set([]),i=new Set;for(let s of t){let a=o?s:e.parents.get(s);do if(e.controlledInnerBlocks[a]){i.add(a);break}else n.add(a),a=e.parents.get(a);while(a!==void 0)}for(let s of n)r.set(s,{...r.get(s)});for(let s of n)r.get(s).innerBlocks=(e.order.get(s)||[]).map(a=>r.get(a));for(let s of i)r.set("controlled||"+s,{innerBlocks:(e.order.get(s)||[]).map(a=>r.get(a))})}var ppe=e=>(t={},o)=>{let r=e(t,o);if(r===t)return t;switch(r.tree=t.tree?t.tree:new Map,o.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{r.tree=new Map(r.tree),$6(r,o.blocks),hl(r,o.rootClientId?[o.rootClientId]:[""],!0);break}case"UPDATE_BLOCK":r.tree=new Map(r.tree),r.tree.set(o.clientId,{...r.tree.get(o.clientId),...r.byClientId.get(o.clientId),attributes:r.attributes.get(o.clientId)}),hl(r,[o.clientId],!1);break;case"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":{r.tree=new Map(r.tree),o.clientIds.forEach(i=>{r.tree.set(i,{...r.tree.get(i),attributes:r.attributes.get(i)})}),hl(r,o.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let i=Z6(o.blocks);r.tree=new Map(r.tree),o.replacedClientIds.forEach(a=>{r.tree.delete(a),i[a]||r.tree.delete("controlled||"+a)}),$6(r,o.blocks),hl(r,o.blocks.map(a=>a.clientId),!1);let s=[];for(let a of o.clientIds){let c=t.parents.get(a);c!==void 0&&(c===""||r.byClientId.get(c))&&s.push(c)}hl(r,s,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":let n=[];for(let i of o.clientIds){let s=t.parents.get(i);s!==void 0&&(s===""||r.byClientId.get(s))&&n.push(s)}r.tree=new Map(r.tree),o.removedClientIds.forEach(i=>{r.tree.delete(i),r.tree.delete("controlled||"+i)}),hl(r,n,!0);break;case"MOVE_BLOCKS_TO_POSITION":{let i=[];o.fromRootClientId?i.push(o.fromRootClientId):i.push(""),o.toRootClientId&&i.push(o.toRootClientId),r.tree=new Map(r.tree),hl(r,i,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{let i=[o.rootClientId?o.rootClientId:""];r.tree=new Map(r.tree),hl(r,i,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{let i=[];r.attributes.forEach((s,a)=>{r.byClientId.get(a).name==="core/block"&&s.ref===o.updatedId&&i.push(a)}),r.tree=new Map(r.tree),i.forEach(s=>{r.tree.set(s,{...r.byClientId.get(s),attributes:r.attributes.get(s),innerBlocks:r.tree.get(s).innerBlocks})}),hl(r,i,!1)}}return r};function hpe(e){let t,o=!1,r;return(n,i)=>{let s=e(n,i),a;if(i.type==="SET_EXPLICIT_PERSISTENT"&&(r=i.isPersistentChange,a=n.isPersistentChange??!0),r!==void 0)return a=r,a===s.isPersistentChange?s:{...s,isPersistentChange:a};let c=i.type==="MARK_LAST_CHANGE_AS_PERSISTENT"||o;return n===s&&!c?(o=i.type==="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT",a=n?.isPersistentChange??!0,n.isPersistentChange===a?n:{...s,isPersistentChange:a}):(s={...s,isPersistentChange:c?!o:!mpe(i,t)},t=i,o=i.type==="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT",s)}}function gpe(e){let t=new Set(["RECEIVE_BLOCKS"]);return(o,r)=>{let n=e(o,r);return n!==o&&(n.isIgnoredChange=t.has(r.type)),n}}var bpe=e=>(t,o)=>{let r=n=>{let i=n;for(let s=0;s<i.length;s++)!t.order.get(i[s])||o.keepControlledInnerBlocks&&o.keepControlledInnerBlocks[i[s]]||(i===n&&(i=[...i]),i.push(...t.order.get(i[s])));return i};if(t)switch(o.type){case"REMOVE_BLOCKS":o={...o,type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:r(o.clientIds)};break;case"REPLACE_BLOCKS":o={...o,type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:r(o.clientIds)};break}return e(t,o)},kpe=e=>(t,o)=>{if(o.type==="RESET_BLOCKS"){let r=e(void 0,{type:"INSERT_BLOCKS",rootClientId:"",blocks:o.blocks}),n=t?.controlledInnerBlocks??{};if(t?.order)for(let s of Object.keys(n)){if(!n[s]||!r.byClientId.has(s))continue;r.controlledInnerBlocks[s]=!0;let a=t.order.get(s);if(!a?.length)continue;r.order.set(s,a);let c=(u,d)=>{let f=t.byClientId.get(u);if(!f)return;r.byClientId.set(u,f),r.attributes.set(u,t.attributes.get(u)),r.parents.set(u,d);let m=t.order.get(u)||[];r.order.set(u,m),m.forEach(h=>c(h,u))};a.forEach(u=>c(u,s))}for(let s of Object.keys(r.controlledInnerBlocks)){let a=r.order.get(s);if(!a?.length)continue;let c=a.map(f=>t.tree.get(f)),u=r.tree.get(s);u&&(u.innerBlocks=c),r.tree.set("controlled||"+s,{innerBlocks:c});let d=f=>{let m=t.tree.get(f);if(!m)return;r.tree.set(f,m),(r.order.get(f)||[]).forEach(d)};a.forEach(d)}let i=t?.blockEditingModes??new Map;for(let[s,a]of i)r.tree.has(s)&&r.blockEditingModes.set(s,a);return r}return e(t,o)},vpe=e=>(t,o)=>{if(o.type!=="REPLACE_INNER_BLOCKS")return e(t,o);let r={};if(Object.keys(t.controlledInnerBlocks).length){let s=[...o.blocks];for(;s.length;){let{innerBlocks:a,...c}=s.shift();s.push(...a),t.controlledInnerBlocks[c.clientId]&&(r[c.clientId]=!0)}}let n=t;t.order.get(o.rootClientId)&&(n=e(n,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order.get(o.rootClientId)}));let i=n;if(o.blocks.length){i=e(i,{...o,type:"INSERT_BLOCKS",index:0});let s=new Map(i.order);Object.keys(r).forEach(a=>{t.order.get(a)&&s.set(a,t.order.get(a))}),i.order=s,i.tree=new Map(i.tree),Object.keys(r).forEach(a=>{let c=`controlled||${a}`;t.tree.has(c)&&i.tree.set(c,t.tree.get(c))})}return i},ype=e=>(t,o)=>{if(t&&o.type==="SAVE_REUSABLE_BLOCK_SUCCESS"){let{id:r,updatedId:n}=o;if(r===n)return t;t={...t},t.attributes=new Map(t.attributes),t.attributes.forEach((i,s)=>{let{name:a}=t.byClientId.get(s);a==="core/block"&&i.ref===r&&t.attributes.set(s,{...i,ref:n})})}return e(t,o)},Spe=e=>(t,o)=>{if(o.type==="SET_HAS_CONTROLLED_INNER_BLOCKS"){if(t.order.get(o.clientId)?.length){let n=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:o.clientId,blocks:[]});return e(n,o)}return e(t,o)}return e(t,o)},_pe=(0,TO.pipe)(Zk.combineReducers,ype,ppe,bpe,vpe,kpe,hpe,gpe,Spe)({byClientId(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let o=new Map(e);return G6(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"UPDATE_BLOCK":{if(!e.has(t.clientId))return e;let{attributes:o,...r}=t.updates;if(Object.values(r).length===0)return e;let n=new Map(e);return n.set(t.clientId,{...e.get(t.clientId),...r}),n}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;let o=new Map(e);return t.replacedClientIds.forEach(r=>{o.delete(r)}),G6(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.removedClientIds.forEach(r=>{o.delete(r)}),o}}return e},attributes(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let o=new Map(e);return W6(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"UPDATE_BLOCK":{if(!e.get(t.clientId)||!t.updates.attributes)return e;let o=new Map(e);return o.set(t.clientId,{...e.get(t.clientId),...t.updates.attributes}),o}case"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every(n=>!e.get(n)))return e;let o=!1,r=new Map(e);for(let n of t.clientIds){let i=Object.entries(t.options?.uniqueByBlock?t.attributes[n]:t.attributes??{});if(i.length===0)continue;let s=!1,a=e.get(n),c={};i.forEach(([u,d])=>{a[u]!==d&&(s=!0,c[u]=d)}),o=o||s,s&&r.set(n,{...a,...c})}return o?r:e}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;let o=new Map(e);return t.replacedClientIds.forEach(r=>{o.delete(r)}),W6(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.removedClientIds.forEach(r=>{o.delete(r)}),o}}return e},order(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{let o=B0(t.blocks),r=new Map(e);return o.forEach((n,i)=>{i!==""&&r.set(i,n)}),r.set("",(e.get("")??[]).concat(o[""])),r}case"INSERT_BLOCKS":{let{rootClientId:o=""}=t,r=e.get(o)||[],n=B0(t.blocks,o),{index:i=r.length}=t,s=new Map(e);return n.forEach((a,c)=>{s.set(c,a)}),s.set(o,k0(r,n.get(o),i)),s}case"MOVE_BLOCKS_TO_POSITION":{let{fromRootClientId:o="",toRootClientId:r="",clientIds:n}=t,{index:i=e.get(r).length}=t;if(o===r){let c=e.get(r).indexOf(n[0]),u=new Map(e);return u.set(r,v0(e.get(r),c,i,n.length)),u}let s=new Map(e);return s.set(o,e.get(o)?.filter(a=>!n.includes(a))??[]),s.set(r,k0(e.get(r),n,i)),s}case"MOVE_BLOCKS_UP":{let{clientIds:o,rootClientId:r=""}=t,n=o[0],i=e.get(r);if(!i.length||n===i[0])return e;let s=i.indexOf(n),a=new Map(e);return a.set(r,v0(i,s,s-1,o.length)),a}case"MOVE_BLOCKS_DOWN":{let{clientIds:o,rootClientId:r=""}=t,n=o[0],i=o[o.length-1],s=e.get(r);if(!s.length||i===s[s.length-1])return e;let a=s.indexOf(n),c=new Map(e);return c.set(r,v0(s,a,a+1,o.length)),c}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let{clientIds:o}=t;if(!t.blocks)return e;let r=B0(t.blocks),n=new Map(e);return t.replacedClientIds.forEach(i=>{n.delete(i)}),r.forEach((i,s)=>{s!==""&&n.set(s,i)}),n.forEach((i,s)=>{let a=Object.values(i).reduce((c,u)=>u===o[0]?[...c,...r.get("")]:(o.indexOf(u)===-1&&c.push(u),c),[]);n.set(s,a)}),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.removedClientIds.forEach(r=>{o.delete(r)}),o.forEach((r,n)=>{let i=r?.filter(s=>!t.removedClientIds.includes(s))??[];i.length!==r.length&&o.set(n,i)}),o}}return e},parents(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{let o=new Map(e);return BO(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"INSERT_BLOCKS":{let o=new Map(e);return BO(t.blocks,t.rootClientId||"").forEach(([r,n])=>{o.set(r,n)}),o}case"MOVE_BLOCKS_TO_POSITION":{let o=new Map(e);return t.clientIds.forEach(r=>{o.set(r,t.toRootClientId||"")}),o}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.replacedClientIds.forEach(r=>{o.delete(r)}),BO(t.blocks,e.get(t.clientIds[0])).forEach(([r,n])=>{o.set(r,n)}),o}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.removedClientIds.forEach(r=>{o.delete(r)}),o}}return e},controlledInnerBlocks(e={},{type:t,clientId:o,hasControlledInnerBlocks:r}){return t==="SET_HAS_CONTROLLED_INNER_BLOCKS"?{...e,[o]:r}:e},blockEditingModes(e=new Map,t){switch(t.type){case"SET_BLOCK_EDITING_MODE":return e.get(t.clientId)===t.mode?e:new Map(e).set(t.clientId,t.mode);case"UNSET_BLOCK_EDITING_MODE":{if(!e.has(t.clientId))return e;let o=new Map(e);return o.delete(t.clientId),o}}return e}});function xpe(e=!1,t){switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e}function wpe(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e}function Cpe(e=!1,t){switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1}return e}function Bpe(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e}function Epe(e={},t){return t.type==="SET_BLOCK_VISIBILITY"?{...e,...t.updates}:e}function K6(e={},t){switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return!t.updateSelection||!t.blocks.length?e:{clientId:t.blocks[0].clientId};case"REMOVE_BLOCKS":return!t.clientIds||!t.clientIds.length||t.clientIds.indexOf(e.clientId)===-1?e:{};case"REPLACE_BLOCKS":{if(t.clientIds.indexOf(e.clientId)===-1)return e;let o=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return o?o.clientId===e.clientId?e:{clientId:o.clientId}:{}}}return e}function Tpe(e={},t){switch(t.type){case"SELECTION_CHANGE":return t.clientId?{selectionStart:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset},selectionEnd:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset}}:{selectionStart:t.start||e.selectionStart,selectionEnd:t.end||e.selectionEnd};case"RESET_SELECTION":let{selectionStart:n,selectionEnd:i}=t;return{selectionStart:n,selectionEnd:i};case"MULTI_SELECT":let{start:s,end:a}=t;return s===e.selectionStart?.clientId&&a===e.selectionEnd?.clientId?e:{selectionStart:{clientId:s},selectionEnd:{clientId:a}};case"RESET_BLOCKS":let c=e?.selectionStart?.clientId,u=e?.selectionEnd?.clientId;if(!c&&!u)return e;if(!t.blocks.some(d=>d.clientId===c))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some(d=>d.clientId===u))return{...e,selectionEnd:e.selectionStart}}let o=K6(e.selectionStart,t),r=K6(e.selectionEnd,t);return o===e.selectionStart&&r===e.selectionEnd?e:{selectionStart:o,selectionEnd:r}}function Ipe(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e}function Ppe(e=!0,t){return t.type==="TOGGLE_SELECTION"?t.isSelectionEnabled:e}function Rpe(e=null,t){switch(t.type){case"SHOW_VIEWPORT_MODAL":return t.clientIds;case"HIDE_VIEWPORT_MODAL":return null}return e}function Ope(e=!1,t){switch(t.type){case"DISPLAY_BLOCK_REMOVAL_PROMPT":let{clientIds:o,selectPrevious:r,message:n}=t;return{clientIds:o,selectPrevious:r,message:n};case"CLEAR_BLOCK_REMOVAL_PROMPT":return!1}return e}function Ape(e=!1,t){return t.type==="SET_BLOCK_REMOVAL_RULES"?t.rules:e}function Lpe(e=null,t){return t.type==="REPLACE_BLOCKS"&&t.initialPosition!==void 0||["MULTI_SELECT","SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e}function Npe(e={},t){if(t.type==="TOGGLE_BLOCK_MODE"){let{clientId:o}=t;return{...e,[o]:e[o]&&e[o]==="html"?"visual":"html"}}return e}function Mpe(e=null,t){switch(t.type){case"SHOW_INSERTION_POINT":{let{rootClientId:o,index:r,__unstableWithInserter:n,operation:i,nearestSide:s}=t,a={rootClientId:o,index:r,__unstableWithInserter:n,operation:i,nearestSide:s};return(0,qk.default)(e,a)?e:a}case"HIDE_INSERTION_POINT":return null}return e}function Dpe(e={isValid:!0},t){return t.type==="SET_TEMPLATE_VALIDITY"?{...e,isValid:t.isValid}:e}function Vpe(e=Kk,t){if(t.type==="UPDATE_SETTINGS"){let o=t.reset?{...Kk,...t.settings}:{...e,...t.settings};return Object.defineProperty(o,"__unstableIsPreviewMode",{get(){return(0,Y6.default)("__unstableIsPreviewMode",{since:"6.8",alternative:"isPreviewMode"}),this.isPreviewMode}}),o}return e}function Fpe(e=H6,t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":{let o=t.blocks.reduce((r,n)=>{let{attributes:i,name:s}=n,a=s,c=(0,Zk.select)(E0.store).getActiveBlockVariation(s,i);return c?.name&&(a+="/"+c.name),s==="core/block"&&(a+="/"+i.ref),{...r,[a]:{time:t.time,count:r[a]?r[a].count+1:1}}},e.insertUsage);return{...e,insertUsage:o}}}return e}var zpe=(e={},t)=>{switch(t.type){case"REPLACE_BLOCKS":{let o=new Set,r=[...t.blocks];for(;r.length;){let n=r.shift();o.add(n.clientId),r.push(...n.innerBlocks)}return Object.fromEntries(Object.entries(e).filter(([n])=>!t.clientIds.includes(n)||o.has(n)))}case"REMOVE_BLOCKS":return Object.fromEntries(Object.entries(e).filter(([o])=>!t.clientIds.includes(o)));case"UPDATE_BLOCK_LIST_SETTINGS":{let o=typeof t.clientId=="string"?{[t.clientId]:t.settings}:t.clientId;for(let n in o)o[n]?(0,qk.default)(e[n],o[n])&&delete o[n]:e[n]||delete o[n];if(Object.keys(o).length===0)return e;let r={...e,...o};for(let n in o)o[n]||delete r[n];return r}}return e};function jpe(e=null,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return{[t.clientId]:t.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce((o,r)=>({...o,[r]:t.options?.uniqueByBlock?t.attributes[r]:t.attributes}),{})}return e}function Upe(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":let{clientId:o,isHighlighted:r}=t;return r?o:e===o?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e}function Hpe(e,t){switch(t.type){case"TOGGLE_BLOCK_SPOTLIGHT":let{clientId:o,hasBlockSpotlight:r}=t;return r?o:e===o?null:e;case"SELECT_BLOCK":return t.clientId!==e?null:e;case"SELECTION_CHANGE":return t.start?.clientId!==e||t.end?.clientId!==e?null:e;case"CLEAR_SELECTED_BLOCK":return null}return e}function Gpe(e=null,t){switch(t.type){case"SET_BLOCK_EXPANDED_IN_LIST_VIEW":return t.clientId;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e}function Wpe(e={},t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":if(!t.blocks.length)return e;let o=t.blocks.map(n=>n.clientId),r=t.meta?.source;return{clientIds:o,source:r};case"RESET_BLOCKS":return{}}return e}function $pe(e,t){if(t.type==="EDIT_CONTENT_ONLY_SECTION")return t.clientId;if(!e)return e;switch(t.type){case"REMOVE_BLOCKS":case"REPLACE_BLOCKS":if(t.clientIds.includes(e))return;break;case"RESET_BLOCKS":if(!Z6(t.blocks)[e])return;break}return e}function Kpe(e=new Map,t){switch(t.type){case"SET_STYLE_OVERRIDE":return new Map(e).set(t.id,t.style);case"DELETE_STYLE_OVERRIDE":{let o=new Map(e);return o.delete(t.id),o}}return e}function Ype(e=[],t){return t.type==="REGISTER_INSERTER_MEDIA_CATEGORY"?[...e,t.category]:e}function qpe(e=!1,t){return t.type==="LAST_FOCUS"?t.lastFocus:e}function Zpe(e=100,t){switch(t.type){case"SET_ZOOM_LEVEL":return t.zoom;case"RESET_ZOOM_LEVEL":return 100}return e}function Xpe(e=null,t){switch(t.type){case"SET_INSERTION_POINT":return t.value;case"SELECT_BLOCK":return null}return e}function Qpe(e={allOpen:!1,panels:{}},t){switch(t.type){case"SET_OPEN_LIST_VIEW_PANEL":return{allOpen:!1,panels:t.clientId?{[t.clientId]:!0}:{}};case"SET_ALL_LIST_VIEW_PANELS_OPEN":return{allOpen:!0,panels:{}};case"TOGGLE_LIST_VIEW_PANEL":return{allOpen:!1,panels:{...e.panels,[t.clientId]:t.isOpen}};case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":{if(!t.clientIds||t.clientIds.length===0)return e;let o={...e.panels},r=!1;return t.clientIds.forEach(n=>{n in o&&(delete o[n],r=!0)}),r?{...e,panels:o}:e}}return e}function Jpe(e=0,t){return t.type==="INCREMENT_LIST_VIEW_EXPAND_REVISION"?e+1:e}function ehe(e=!1,t){switch(t.type){case"OPEN_LIST_VIEW_CONTENT_PANEL":return!0;case"CLOSE_LIST_VIEW_CONTENT_PANEL":return!1;case"CLEAR_SELECTED_BLOCK":return!1}return e}function the(e=null,t){switch(t.type){case"REQUEST_INSPECTOR_TAB":return{tabName:t.tabName,options:t.options};case"CLEAR_REQUESTED_INSPECTOR_TAB":return null}return e}var ohe=(0,Zk.combineReducers)({blocks:_pe,isDragging:Cpe,isTyping:wpe,isBlockInterfaceHidden:xpe,draggedBlocks:Bpe,selection:Tpe,isMultiSelecting:Ipe,isSelectionEnabled:Ppe,initialPosition:Lpe,blocksMode:Npe,blockListSettings:zpe,insertionPoint:Xpe,insertionCue:Mpe,template:Dpe,settings:Vpe,preferences:Fpe,lastBlockAttributesChange:jpe,lastFocus:qpe,expandedBlock:Gpe,highlightedBlock:Upe,lastBlockInserted:Wpe,editedContentOnlySection:$pe,blockVisibility:Epe,viewportModalClientIds:Rpe,styleOverrides:Kpe,removalPromptData:Ope,blockRemovalRules:Ape,registeredInserterMediaCategories:Ype,zoomLevel:Zpe,hasBlockSpotlight:Hpe,openedListViewPanels:Qpe,listViewExpandRevision:Jpe,listViewContentPanelOpen:ehe,requestedInspectorTab:the});function X6(e,t){if(t===""){let n=e.blocks.tree.get(t);return n?{clientId:"",...n}:void 0}if(!e.blocks.controlledInnerBlocks[t])return e.blocks.tree.get(t);let o=e.blocks.tree.get(`controlled||${t}`);return{...e.blocks.tree.get(t),innerBlocks:o?.innerBlocks}}function IO(e,t,o){let r=X6(e,t);if(r&&(o(r),!!r?.innerBlocks?.length))for(let n of r?.innerBlocks)IO(e,n.clientId,o)}function Yk(e,t,o){if(!o.length)return;let r=e.blocks.parents.get(t);for(;r!==void 0;){if(o.includes(r))return r;r=e.blocks.parents.get(r)}}function rhe(e){return e?.attributes?.metadata?.bindings&&Object.keys(e?.attributes?.metadata?.bindings).length}function EO(e,t=""){let o=e?.zoomLevel<100||e?.zoomLevel==="auto-scaled",r=new Map,n=e.settings?.[Zc],i=e.blocks.order.get(n),s=Array.from(e.blocks.blockEditingModes).some(([,g])=>g==="disabled"),a=[],c=[];Object.keys(e.blocks.controlledInnerBlocks).forEach(g=>{let b=e.blocks.byClientId?.get(g);b?.name==="core/template-part"&&a.push(g),b?.name==="core/block"&&c.push(g)});let u=Object.keys(e.blockListSettings).filter(g=>e.blockListSettings[g]?.templateLock==="contentOnly"),d=e.settings?.[Xc],f=e.settings?.disableContentOnlyForUnsyncedPatterns,m=d||f?[]:Array.from(e.blocks.attributes.keys()).filter(g=>e.blocks.attributes.get(g)?.metadata?.patternName),h=e.settings?.disableContentOnlyForTemplateParts,p=[...u,...m,...d||h?[]:a];return IO(e,t,g=>{let{clientId:b,name:v}=g,k=!!e.editedContentOnlySection,y=!1;if(k&&(y=b===e.editedContentOnlySection||!!Yk(e,b,[e.editedContentOnlySection]),!y)){r.set(b,"disabled");return}if(!e.blocks.blockEditingModes.has(b)){if(s){let S,x=e.blocks.parents.get(b);for(;x!==void 0&&(e.blocks.blockEditingModes.has(x)&&(S=e.blocks.blockEditingModes.get(x)),!S);)x=e.blocks.parents.get(x);if(S==="disabled"){r.set(b,"disabled");return}}if(o){if(b===n){r.set(b,"contentOnly");return}if(!i?.length){r.set(b,"disabled");return}if(i.includes(b)){r.set(b,"contentOnly");return}r.set(b,"disabled");return}if(c.length){if(c.includes(b)){if(Yk(e,b,c)){r.set(b,"disabled");return}return}let S=Yk(e,b,c);if(S){if(Yk(e,S,c)){r.set(b,"disabled");return}if(rhe(g)){r.set(b,"contentOnly");return}r.set(b,"disabled");return}}if(k&&y){r.set(b,"default");return}p.length&&Yk(e,b,p)&&(upe(v)?r.set(b,"contentOnly"):r.set(b,"disabled"))}}),r}function Qc({prevState:e,nextState:t,addedBlocks:o,removedClientIds:r}){let n=e.derivedBlockEditingModes,i;return r?.forEach(s=>{IO(e,s,a=>{n.has(a.clientId)&&(i||(i=new Map(n)),i.delete(a.clientId))})}),o?.forEach(s=>{let a=EO(t,s.clientId);a.size&&(i?i=new Map([...i?.size?i:[],...a]):i=new Map([...n?.size?n:[],...a]))}),i}function nhe(e){return(t,o)=>{let r=e(t,o);if(o.type!=="SET_EDITOR_MODE"&&r===t)return t;switch(o.type){case"REMOVE_BLOCKS":{let n=Qc({prevState:t,nextState:r,removedClientIds:o.clientIds});if(n)return{...r,derivedBlockEditingModes:n??t.derivedBlockEditingModes};break}case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let n=Qc({prevState:t,nextState:r,addedBlocks:o.blocks});if(n)return{...r,derivedBlockEditingModes:n??t.derivedBlockEditingModes};break}case"UPDATE_BLOCK_ATTRIBUTES":{if(r.settings?.disableContentOnlyForUnsyncedPatterns)break;let i=[],s=[];for(let c of o?.clientIds){let u=o.options?.uniqueByBlock?o.attributes[c]:o.attributes;if(!u)break;u.metadata?.patternName&&!t.blocks.attributes.get(c)?.metadata?.patternName?i.push(r.blocks.tree.get(c)):u.metadata&&!u.metadata?.patternName&&t.blocks.attributes.get(c)?.metadata?.patternName&&s.push(c)}if(!i?.length&&!s?.length)break;let a=Qc({prevState:t,nextState:r,addedBlocks:i,removedClientIds:s});if(a)return{...r,derivedBlockEditingModes:a??t.derivedBlockEditingModes};break}case"UPDATE_BLOCK_LIST_SETTINGS":{let n=[],i=[],s=typeof o.clientId=="string"?{[o.clientId]:o.settings}:o.clientId;for(let c in s){let u=t.blockListSettings[c]?.templateLock!=="contentOnly"&&r.blockListSettings[c]?.templateLock==="contentOnly",d=t.blockListSettings[c]?.templateLock==="contentOnly"&&r.blockListSettings[c]?.templateLock!=="contentOnly";u?n.push(r.blocks.tree.get(c)):d&&i.push(c)}if(!n.length&&!i.length)break;let a=Qc({prevState:t,nextState:r,addedBlocks:n,removedClientIds:i});if(a)return{...r,derivedBlockEditingModes:a??t.derivedBlockEditingModes};break}case"SET_BLOCK_EDITING_MODE":case"UNSET_BLOCK_EDITING_MODE":case"SET_HAS_CONTROLLED_INNER_BLOCKS":{let n=X6(r,o.clientId);if(!n)break;let i=Qc({prevState:t,nextState:r,removedClientIds:[o.clientId],addedBlocks:[n]});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"REPLACE_BLOCKS":{let n=Qc({prevState:t,nextState:r,addedBlocks:o.blocks,removedClientIds:o.clientIds});if(n)return{...r,derivedBlockEditingModes:n??t.derivedBlockEditingModes};break}case"REPLACE_INNER_BLOCKS":{let n=t.blocks.order.get(o.rootClientId),i=Qc({prevState:t,nextState:r,addedBlocks:o.blocks,removedClientIds:n});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"MOVE_BLOCKS_TO_POSITION":{let n=o.clientIds.map(s=>r.blocks.byClientId.get(s)),i=Qc({prevState:t,nextState:r,addedBlocks:n,removedClientIds:o.clientIds});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"UPDATE_SETTINGS":{if(t?.settings?.[Zc]!==r?.settings?.[Zc]||!!t?.settings?.disableContentOnlyForUnsyncedPatterns!=!!r?.settings?.disableContentOnlyForUnsyncedPatterns||!!t?.settings?.[Xc]!=!!r?.settings?.[Xc]||!!t?.settings?.disableContentOnlyForTemplateParts!=!!r?.settings?.disableContentOnlyForTemplateParts)return{...r,derivedBlockEditingModes:EO(r)};break}case"RESET_BLOCKS":case"EDIT_CONTENT_ONLY_SECTION":case"SET_EDITOR_MODE":case"RESET_ZOOM_LEVEL":case"SET_ZOOM_LEVEL":return{...r,derivedBlockEditingModes:EO(r)}}return r.derivedBlockEditingModes=t?.derivedBlockEditingModes??new Map,r}}function ihe(e){return(t,o)=>{let r=e(t,o);return t?(r.automaticChangeStatus=t.automaticChangeStatus,o.type==="MARK_AUTOMATIC_CHANGE"?{...r,automaticChangeStatus:"pending"}:o.type==="MARK_AUTOMATIC_CHANGE_FINAL"&&t.automaticChangeStatus==="pending"?{...r,automaticChangeStatus:"final"}:r.blocks===t.blocks&&r.selection===t.selection||r.automaticChangeStatus!=="final"&&r.selection!==t.selection?r:{...r,automaticChangeStatus:void 0}):r}}var Q6=(0,TO.pipe)(nhe,ihe)(ohe);var rM={};Ip(rM,{__experimentalGetActiveBlockIdByBlockNames:()=>nbe,__experimentalGetAllowedBlocks:()=>Uge,__experimentalGetAllowedPatterns:()=>$ge,__experimentalGetBlockListSettingsForBlocks:()=>Xge,__experimentalGetDirectInsertBlock:()=>Hge,__experimentalGetGlobalBlocksByName:()=>Jhe,__experimentalGetLastBlockAttributeChanges:()=>ebe,__experimentalGetParsedPattern:()=>Gge,__experimentalGetPatternTransformItems:()=>qge,__experimentalGetPatternsByBlockTypes:()=>Yge,__experimentalGetReusableBlockTitle:()=>Qge,__unstableGetBlockWithoutInnerBlocks:()=>Zhe,__unstableGetClientIdWithClientIdsTree:()=>Sj,__unstableGetClientIdsTree:()=>_j,__unstableGetContentLockingParent:()=>fbe,__unstableGetSelectedBlocksWithPartialSelection:()=>Sge,__unstableGetTemporarilyEditingAsBlocks:()=>mbe,__unstableGetVisibleBlocks:()=>lbe,__unstableHasActiveBlockOverlayActive:()=>Dj,__unstableIsFullySelected:()=>bge,__unstableIsLastBlockChangeIgnored:()=>Jge,__unstableIsSelectionCollapsed:()=>kge,__unstableIsSelectionMergeable:()=>yge,__unstableIsWithinBlockOverlay:()=>cbe,__unstableSelectionHasUnmergeableBlock:()=>vge,areInnerBlocksControlled:()=>Ow,canEditBlock:()=>Lj,canInsertBlockType:()=>Df,canInsertBlocks:()=>Nge,canLockBlockType:()=>Dge,canMoveBlock:()=>Aj,canMoveBlocks:()=>Mge,canRemoveBlock:()=>QN,canRemoveBlocks:()=>Oj,didAutomaticChange:()=>obe,getAdjacentBlockClientId:()=>YN,getAllowedBlocks:()=>WN,getBlock:()=>xl,getBlockAttributes:()=>Ti,getBlockCount:()=>tge,getBlockEditingMode:()=>Ii,getBlockHierarchyRootClientId:()=>age,getBlockIndex:()=>Ej,getBlockInsertionPoint:()=>Rge,getBlockListSettings:()=>oM,getBlockMode:()=>Bge,getBlockName:()=>dt,getBlockNamesByClientId:()=>ege,getBlockOrder:()=>wr,getBlockParents:()=>ys,getBlockParentsByBlockName:()=>KN,getBlockRootClientId:()=>Po,getBlockSelectionEnd:()=>rge,getBlockSelectionStart:()=>oge,getBlockTransformItems:()=>zge,getBlocks:()=>Xhe,getBlocksByClientId:()=>Rw,getBlocksByName:()=>wj,getClientIdsOfDescendants:()=>xj,getClientIdsWithDescendants:()=>$p,getDirectInsertBlock:()=>Mj,getDraggedBlockClientIds:()=>Tge,getFirstMultiSelectedBlockClientId:()=>qN,getGlobalBlockCount:()=>Qhe,getHoveredBlockClientId:()=>abe,getInserterItems:()=>Fge,getLastMultiSelectedBlockClientId:()=>Cj,getLowestCommonAncestorWithSelectedBlock:()=>lge,getMultiSelectedBlockClientIds:()=>du,getMultiSelectedBlocks:()=>fge,getMultiSelectedBlocksEndClientId:()=>gge,getMultiSelectedBlocksStartClientId:()=>hge,getNextBlockClientId:()=>uge,getPatternsByBlockTypes:()=>Kge,getPreviousBlockClientId:()=>cge,getSelectedBlock:()=>sge,getSelectedBlockClientId:()=>Yp,getSelectedBlockClientIds:()=>qp,getSelectedBlockCount:()=>nge,getSelectedBlocksInitialCaretPosition:()=>dge,getSelectionEnd:()=>Ov,getSelectionStart:()=>Rv,getSettings:()=>su,getTemplate:()=>Lge,getTemplateLock:()=>fa,hasBlockMovingClientId:()=>tbe,hasDraggedInnerBlock:()=>Pj,hasInserterItems:()=>jge,hasMultiSelection:()=>xge,hasSelectedBlock:()=>ige,hasSelectedInnerBlock:()=>Ij,isAncestorBeingDragged:()=>Ige,isAncestorMultiSelected:()=>pge,isBlockBeingDragged:()=>ZN,isBlockHighlighted:()=>rbe,isBlockInsertionPointVisible:()=>Oge,isBlockMultiSelected:()=>Bj,isBlockSelected:()=>Tj,isBlockValid:()=>qhe,isBlockVisible:()=>sbe,isBlockWithinSelection:()=>_ge,isCaretWithinFormattedText:()=>Pge,isDraggingBlocks:()=>Rj,isFirstMultiSelectedBlock:()=>mge,isGroupable:()=>dbe,isLastBlockChangePersistent:()=>Zge,isMultiSelecting:()=>wge,isSelectionEnabled:()=>Cge,isTyping:()=>Ege,isUngroupable:()=>ube,isValidTemplate:()=>Age,wasBlockJustInserted:()=>ibe});var Oe=l($(),1),kj=l(R(),1),vj=l(ut(),1);var T0=l(R(),1),we=(0,T0.forwardRef)(({icon:e,size:t=24,...o},r)=>(0,T0.cloneElement)(e,{width:t,height:t,...o,ref:r}));var I0=l(q(),1),PO=l(w(),1),Sf=(0,PO.jsx)(I0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PO.jsx)(I0.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})});var P0=l(q(),1),RO=l(w(),1),OO=(0,RO.jsx)(P0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,RO.jsx)(P0.Path,{d:"M4 12.8h16v-1.5H4v1.5zm0 7h12.4v-1.5H4v1.5zM4 4.3v1.5h16V4.3H4z"})});var R0=l(q(),1),AO=l(w(),1),Jc=(0,AO.jsx)(R0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AO.jsx)(R0.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})});var O0=l(q(),1),LO=l(w(),1),_f=(0,LO.jsx)(O0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LO.jsx)(O0.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})});var A0=l(q(),1),NO=l(w(),1),eu=(0,NO.jsx)(A0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,NO.jsx)(A0.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})});var L0=l(q(),1),MO=l(w(),1),DO=(0,MO.jsx)(L0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MO.jsx)(L0.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})});var N0=l(q(),1),VO=l(w(),1),Xk=(0,VO.jsx)(N0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VO.jsx)(N0.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var M0=l(q(),1),FO=l(w(),1),Qk=(0,FO.jsx)(M0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FO.jsx)(M0.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})});var D0=l(q(),1),zO=l(w(),1),jO=(0,zO.jsx)(D0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zO.jsx)(D0.Path,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"})});var V0=l(q(),1),UO=l(w(),1),HO=(0,UO.jsx)(V0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,UO.jsx)(V0.Path,{d:"M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z"})});var F0=l(q(),1),GO=l(w(),1),Jk=(0,GO.jsx)(F0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GO.jsx)(F0.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})});var z0=l(q(),1),WO=l(w(),1),$O=(0,WO.jsx)(z0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,WO.jsx)(z0.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var j0=l(q(),1),KO=l(w(),1),gl=(0,KO.jsx)(j0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,KO.jsx)(j0.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var U0=l(q(),1),YO=l(w(),1),zn=(0,YO.jsx)(U0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YO.jsx)(U0.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var H0=l(q(),1),qO=l(w(),1),ev=(0,qO.jsx)(H0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,qO.jsx)(H0.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});var G0=l(q(),1),ZO=l(w(),1),Mr=(0,ZO.jsx)(G0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZO.jsx)(G0.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var W0=l(q(),1),XO=l(w(),1),tu=(0,XO.jsx)(W0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,XO.jsx)(W0.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})});var $0=l(q(),1),QO=l(w(),1),Vo=(0,QO.jsx)($0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QO.jsx)($0.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var K0=l(q(),1),JO=l(w(),1),xf=(0,JO.jsx)(K0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,JO.jsx)(K0.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var Y0=l(q(),1),eA=l(w(),1),wf=(0,eA.jsx)(Y0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eA.jsx)(Y0.Path,{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"})});var q0=l(q(),1),tA=l(w(),1),oA=(0,tA.jsx)(q0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,tA.jsx)(q0.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var Z0=l(q(),1),rA=l(w(),1),nA=(0,rA.jsx)(Z0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rA.jsx)(Z0.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"})});var X0=l(q(),1),iA=l(w(),1),Cf=(0,iA.jsx)(X0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,iA.jsx)(X0.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"})});var Q0=l(q(),1),sA=l(w(),1),aA=(0,sA.jsx)(Q0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,sA.jsx)(Q0.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5Zm-12.5 9v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})});var Bf=l(q(),1),Np=l(w(),1),lA=(0,Np.jsxs)(Bf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Np.jsx)(Bf.G,{opacity:".25",children:(0,Np.jsx)(Bf.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,Np.jsx)(Bf.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.75 15v3c0 .138.112.25.25.25h3v1.5H6A1.75 1.75 0 0 1 4.25 18v-3h1.5Z"})]});var Ef=l(q(),1),Mp=l(w(),1),cA=(0,Mp.jsxs)(Ef.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Mp.jsx)(Ef.G,{opacity:".25",children:(0,Mp.jsx)(Ef.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,Mp.jsx)(Ef.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 18.25h3a.25.25 0 0 0 .25-.25v-3h1.5v3A1.75 1.75 0 0 1 18 19.75h-3v-1.5Z"})]});var Tf=l(q(),1),Dp=l(w(),1),uA=(0,Dp.jsxs)(Tf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Dp.jsx)(Tf.G,{opacity:".25",children:(0,Dp.jsx)(Tf.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,Dp.jsx)(Tf.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.75a.25.25 0 0 0-.25.25v3h-1.5V6c0-.966.784-1.75 1.75-1.75h3v1.5H6Z"})]});var If=l(q(),1),Vp=l(w(),1),dA=(0,Vp.jsxs)(If.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Vp.jsx)(If.G,{opacity:".25",children:(0,Vp.jsx)(If.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,Vp.jsx)(If.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5Z"})]});var J0=l(q(),1),fA=l(w(),1),mA=(0,fA.jsx)(J0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fA.jsx)(J0.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"})});var ex=l(q(),1),pA=l(w(),1),tv=(0,pA.jsx)(ex.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pA.jsx)(ex.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})});var tx=l(q(),1),hA=l(w(),1),gA=(0,hA.jsx)(tx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hA.jsx)(tx.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M3 7c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Zm2-.5h14c.3 0 .5.2.5.5v1L12 13.5 4.5 7.9V7c0-.3.2-.5.5-.5Zm-.5 3.3V17c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V9.8L12 15.4 4.5 9.8Z"})});var ox=l(q(),1),bA=l(w(),1),Pf=(0,bA.jsx)(ox.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bA.jsx)(ox.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z"})});var rx=l(q(),1),kA=l(w(),1),vA=(0,kA.jsx)(rx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kA.jsx)(rx.Path,{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"})});var nx=l(q(),1),yA=l(w(),1),SA=(0,yA.jsx)(nx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yA.jsx)(nx.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var ix=l(q(),1),_A=l(w(),1),xA=(0,_A.jsx)(ix.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_A.jsx)(ix.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"})});var sx=l(q(),1),wA=l(w(),1),CA=(0,wA.jsx)(sx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wA.jsx)(sx.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"})});var ax=l(q(),1),BA=l(w(),1),EA=(0,BA.jsx)(ax.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BA.jsx)(ax.Path,{d:"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"})});var lx=l(q(),1),TA=l(w(),1),IA=(0,TA.jsx)(lx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TA.jsx)(lx.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"})});var cx=l(q(),1),PA=l(w(),1),RA=(0,PA.jsx)(cx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PA.jsx)(cx.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"})});var ux=l(q(),1),OA=l(w(),1),AA=(0,OA.jsx)(ux.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,OA.jsx)(ux.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"})});var dx=l(q(),1),LA=l(w(),1),NA=(0,LA.jsx)(dx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LA.jsx)(dx.Path,{d:"M12.75 19.45 15 17.5l1 1.1-4 3.4-4-3.4 1-1.1 2.25 1.95V14.5h1.5v4.95ZM19 12.75H5v-1.5h14v1.5ZM16 5.4l-1 1.1-2.25-1.95V9.5h-1.5V4.55L9 6.5 8 5.4 12 2l4 3.4Z"})});var fx=l(q(),1),MA=l(w(),1),mx=(0,MA.jsx)(fx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MA.jsx)(fx.Path,{d:"M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"})});var px=l(q(),1),DA=l(w(),1),ov=(0,DA.jsx)(px.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,DA.jsx)(px.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm6.5 8c0 .6 0 1.2-.2 1.8h-2.7c0-.6.2-1.1.2-1.8s0-1.2-.2-1.8h2.7c.2.6.2 1.1.2 1.8Zm-.9-3.2h-2.4c-.3-.9-.7-1.8-1.1-2.4-.1-.2-.2-.4-.3-.5 1.6.5 3 1.6 3.8 3ZM12.8 17c-.3.5-.6 1-.8 1.3-.2-.3-.5-.8-.8-1.3-.3-.5-.6-1.1-.8-1.7h3.3c-.2.6-.5 1.2-.8 1.7Zm-2.9-3.2c-.1-.6-.2-1.1-.2-1.8s0-1.2.2-1.8H14c.1.6.2 1.1.2 1.8s0 1.2-.2 1.8H9.9ZM11.2 7c.3-.5.6-1 .8-1.3.2.3.5.8.8 1.3.3.5.6 1.1.8 1.7h-3.3c.2-.6.5-1.2.8-1.7Zm-1-1.2c-.1.2-.2.3-.3.5-.4.7-.8 1.5-1.1 2.4H6.4c.8-1.4 2.2-2.5 3.8-3Zm-1.8 8H5.7c-.2-.6-.2-1.1-.2-1.8s0-1.2.2-1.8h2.7c0 .6-.2 1.1-.2 1.8s0 1.2.2 1.8Zm-2 1.4h2.4c.3.9.7 1.8 1.1 2.4.1.2.2.4.3.5-1.6-.5-3-1.6-3.8-3Zm7.4 3c.1-.2.2-.3.3-.5.4-.7.8-1.5 1.1-2.4h2.4c-.8 1.4-2.2 2.5-3.8 3Z"})});var hx=l(q(),1),VA=l(w(),1),rv=(0,VA.jsx)(hx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VA.jsx)(hx.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z"})});var gx=l(q(),1),FA=l(w(),1),nv=(0,FA.jsx)(gx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FA.jsx)(gx.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"})});var bx=l(q(),1),zA=l(w(),1),jA=(0,zA.jsx)(bx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zA.jsx)(bx.Path,{d:"M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z"})});var kx=l(q(),1),UA=l(w(),1),HA=(0,UA.jsx)(kx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,UA.jsx)(kx.Path,{d:"M9 11.1H5v-4H3v10h2v-4h4v4h2v-10H9v4zm8 4c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6v1.5h8v-2H17z"})});var vx=l(q(),1),GA=l(w(),1),WA=(0,GA.jsx)(vx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GA.jsx)(vx.Path,{d:"M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.3 1.7c-.4-.4-1-.7-1.6-.8v-.1c.6-.2 1.1-.5 1.5-.9.3-.4.5-.8.5-1.3 0-.4-.1-.8-.3-1.1-.2-.3-.5-.6-.8-.8-.4-.2-.8-.4-1.2-.5-.6-.1-1.1-.2-1.6-.2-.6 0-1.3.1-1.8.3s-1.1.5-1.6.9l1.2 1.4c.4-.2.7-.4 1.1-.6.3-.2.7-.3 1.1-.3.4 0 .8.1 1.1.3.3.2.4.5.4.8 0 .4-.2.7-.6.9-.7.3-1.5.5-2.2.4v1.6c.5 0 1 0 1.5.1.3.1.7.2 1 .3.2.1.4.2.5.4s.1.4.1.6c0 .3-.2.7-.5.8-.4.2-.9.3-1.4.3s-1-.1-1.4-.3c-.4-.2-.8-.4-1.2-.7L13 15.6c.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.6 0 1.1-.1 1.6-.2.4-.1.9-.2 1.3-.5.4-.2.7-.5.9-.9.2-.4.3-.8.3-1.2 0-.6-.3-1.1-.7-1.5z"})});var yx=l(q(),1),$A=l(w(),1),KA=(0,$A.jsx)(yx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$A.jsx)(yx.Path,{d:"M20 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z"})});var Sx=l(q(),1),YA=l(w(),1),qA=(0,YA.jsx)(Sx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YA.jsx)(Sx.Path,{d:"M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.7 1.2c-.2-.3-.5-.7-.8-.9-.3-.3-.7-.5-1.1-.6-.5-.1-.9-.2-1.4-.2-.2 0-.5.1-.7.1-.2.1-.5.1-.7.2l.1-1.9h4.3V7H14l-.3 5 1 .6.5-.2.4-.1c.1-.1.3-.1.4-.1h.5c.5 0 1 .1 1.4.4.4.2.6.7.6 1.1 0 .4-.2.8-.6 1.1-.4.3-.9.4-1.4.4-.4 0-.9-.1-1.3-.3-.4-.2-.7-.4-1.1-.7 0 0-1.1 1.4-1 1.5.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.5 0 1-.1 1.5-.3s.9-.4 1.3-.7c.4-.3.7-.7.9-1.1s.3-.9.3-1.4-.1-1-.3-1.4z"})});var _x=l(q(),1),ZA=l(w(),1),XA=(0,ZA.jsx)(_x.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZA.jsx)(_x.Path,{d:"M20.7 12.4c-.2-.3-.4-.6-.7-.9s-.6-.5-1-.6c-.4-.2-.8-.2-1.2-.2-.5 0-.9.1-1.3.3s-.8.5-1.2.8c0-.5 0-.9.2-1.4l.6-.9c.2-.2.5-.4.8-.5.6-.2 1.3-.2 1.9 0 .3.1.6.3.8.5 0 0 1.3-1.3 1.3-1.4-.4-.3-.9-.6-1.4-.8-.6-.2-1.3-.3-2-.3-.6 0-1.1.1-1.7.4-.5.2-1 .5-1.4.9-.4.4-.8 1-1 1.6-.3.7-.4 1.5-.4 2.3s.1 1.5.3 2.1c.2.6.6 1.1 1 1.5.4.4.9.7 1.4.9 1 .3 2 .3 3 0 .4-.1.8-.3 1.2-.6.3-.3.6-.6.8-1 .2-.5.3-.9.3-1.4s-.1-.9-.3-1.3zm-2 2.1c-.1.2-.3.4-.4.5-.1.1-.3.2-.5.2-.2.1-.4.1-.6.1-.2.1-.5 0-.7-.1-.2 0-.3-.2-.5-.3-.1-.2-.3-.4-.4-.6-.2-.3-.3-.7-.3-1 .3-.3.6-.5 1-.7.3-.1.7-.2 1-.2.4 0 .8.1 1.1.3.3.3.4.7.4 1.1 0 .2 0 .5-.1.7zM9 11H5V7H3v10h2v-4h4v4h2V7H9v4z"})});var xx=l(q(),1),QA=l(w(),1),JA=(0,QA.jsx)(xx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QA.jsx)(xx.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})});var wx=l(q(),1),eL=l(w(),1),iv=(0,eL.jsx)(wx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eL.jsx)(wx.Path,{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.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})});var Cx=l(q(),1),tL=l(w(),1),oL=(0,tL.jsx)(Cx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,tL.jsx)(Cx.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})});var Bx=l(q(),1),rL=l(w(),1),nL=(0,rL.jsx)(Bx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rL.jsx)(Bx.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})});var Ex=l(q(),1),iL=l(w(),1),sL=(0,iL.jsx)(Ex.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,iL.jsx)(Ex.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})});var Tx=l(q(),1),aL=l(w(),1),ou=(0,aL.jsx)(Tx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aL.jsx)(Tx.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})});var Ix=l(q(),1),lL=l(w(),1),ru=(0,lL.jsx)(Ix.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,lL.jsx)(Ix.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})});var Px=l(q(),1),cL=l(w(),1),nu=(0,cL.jsx)(Px.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cL.jsx)(Px.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})});var Rx=l(q(),1),uL=l(w(),1),dL=(0,uL.jsx)(Rx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,uL.jsx)(Rx.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})});var Ox=l(q(),1),fL=l(w(),1),Fp=(0,fL.jsx)(Ox.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fL.jsx)(Ox.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})});var Ax=l(q(),1),mL=l(w(),1),pL=(0,mL.jsx)(Ax.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mL.jsx)(Ax.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})});var Lx=l(q(),1),hL=l(w(),1),zp=(0,hL.jsx)(Lx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hL.jsx)(Lx.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})});var Nx=l(q(),1),gL=l(w(),1),bL=(0,gL.jsx)(Nx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gL.jsx)(Nx.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})});var Mx=l(q(),1),kL=l(w(),1),bl=(0,kL.jsx)(Mx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kL.jsx)(Mx.Path,{d:"m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734Z"})});var Dx=l(q(),1),vL=l(w(),1),yL=(0,vL.jsx)(Dx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,vL.jsx)(Dx.Path,{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"})});var Vx=l(q(),1),SL=l(w(),1),Ci=(0,SL.jsx)(Vx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,SL.jsx)(Vx.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})});var Fx=l(q(),1),_L=l(w(),1),fn=(0,_L.jsx)(Fx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_L.jsx)(Fx.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});var zx=l(q(),1),xL=l(w(),1),sv=(0,xL.jsx)(zx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xL.jsx)(zx.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});var jx=l(q(),1),wL=l(w(),1),CL=(0,wL.jsx)(jx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wL.jsx)(jx.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zM9.8 7c0-1.2 1-2.2 2.2-2.2 1.2 0 2.2 1 2.2 2.2v3H9.8V7zm6.7 11.5h-9v-7h9v7z"})});var Ux=l(q(),1),BL=l(w(),1),EL=(0,BL.jsx)(Ux.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BL.jsx)(Ux.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var Hx=l(q(),1),TL=l(w(),1),Rf=(0,TL.jsx)(Hx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TL.jsx)(Hx.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"})});var av=l(q(),1),lv=l(w(),1),jp=(0,lv.jsxs)(av.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,lv.jsx)(av.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,lv.jsx)(av.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})]});var Gx=l(q(),1),IL=l(w(),1),cv=(0,IL.jsx)(Gx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,IL.jsx)(Gx.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"})});var Wx=l(q(),1),PL=l(w(),1),ks=(0,PL.jsx)(Wx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PL.jsx)(Wx.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var uv=l(q(),1),dv=l(w(),1),kl=(0,dv.jsxs)(uv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,dv.jsx)(uv.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,dv.jsx)(uv.Path,{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"})]});var $x=l(q(),1),RL=l(w(),1),OL=(0,RL.jsx)($x.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,RL.jsx)($x.Path,{d:"m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z"})});var Kx=l(q(),1),AL=l(w(),1),Of=(0,AL.jsx)(Kx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AL.jsx)(Kx.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});var Yx=l(q(),1),LL=l(w(),1),NL=(0,LL.jsx)(Yx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LL.jsx)(Yx.Path,{d:"M10.97 10.159a3.382 3.382 0 0 0-2.857.955l1.724 1.723-2.836 2.913L7 17h1.25l2.913-2.837 1.723 1.723a3.38 3.38 0 0 0 .606-.825c.33-.63.446-1.343.35-2.032L17 10.695 13.305 7l-2.334 3.159Z"})});var qx=l(q(),1),ML=l(w(),1),Bi=(0,ML.jsx)(qx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ML.jsx)(qx.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var Zx=l(q(),1),DL=l(w(),1),VL=(0,DL.jsx)(Zx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,DL.jsx)(Zx.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})});var Xx=l(q(),1),FL=l(w(),1),zL=(0,FL.jsx)(Xx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FL.jsx)(Xx.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})});var Qx=l(q(),1),jL=l(w(),1),UL=(0,jL.jsx)(Qx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jL.jsx)(Qx.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var Jx=l(q(),1),HL=l(w(),1),GL=(0,HL.jsx)(Jx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,HL.jsx)(Jx.Path,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"})});var ew=l(q(),1),WL=l(w(),1),$L=(0,WL.jsx)(ew.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,WL.jsx)(ew.Path,{d:"M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z"})});var tw=l(q(),1),KL=l(w(),1),YL=(0,KL.jsx)(tw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,KL.jsx)(tw.Path,{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"})});var ow=l(q(),1),qL=l(w(),1),Dr=(0,qL.jsx)(ow.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,qL.jsx)(ow.Path,{d:"M7 11.5h10V13H7z"})});var rw=l(q(),1),ZL=l(w(),1),XL=(0,ZL.jsx)(rw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZL.jsx)(rw.Path,{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"})});var nw=l(q(),1),QL=l(w(),1),JL=(0,QL.jsx)(nw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QL.jsx)(nw.Path,{d:"M4 6.5h5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4V16h5a.5.5 0 0 0 .5-.5v-7A.5.5 0 0 0 9 8H4V6.5Zm16 0h-5a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h5V16h-5a.5.5 0 0 1-.5-.5v-7A.5.5 0 0 1 15 8h5V6.5Z"})});var iw=l(q(),1),eN=l(w(),1),tN=(0,eN.jsx)(iw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eN.jsx)(iw.Path,{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"})});var sw=l(q(),1),oN=l(w(),1),Af=(0,oN.jsx)(sw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oN.jsx)(sw.Path,{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"})});var fv=l(q(),1),mv=l(w(),1),rN=(0,mv.jsxs)(fv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,mv.jsx)(fv.Path,{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"}),(0,mv.jsx)(fv.Path,{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"})]});var aw=l(q(),1),nN=l(w(),1),iN=(0,nN.jsx)(aw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nN.jsx)(aw.Path,{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"})});var lw=l(q(),1),sN=l(w(),1),cw=(0,sN.jsx)(lw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,sN.jsx)(lw.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"})});var pv=l(q(),1),hv=l(w(),1),aN=(0,hv.jsxs)(pv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,hv.jsx)(pv.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,hv.jsx)(pv.Path,{d:"m16.5 19.5h-9v-1.5h9z"})]});var Up=l(q(),1),Hp=l(w(),1),lN=(0,Hp.jsxs)(Up.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Hp.jsx)(Up.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,Hp.jsx)(Up.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,Hp.jsx)(Up.Path,{d:"m18 7.5v9h1.5v-9z"})]});var gv=l(q(),1),bv=l(w(),1),cN=(0,bv.jsxs)(gv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,bv.jsx)(gv.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,bv.jsx)(gv.Path,{d:"m4.5 16.5v-9h1.5v9z"})]});var kv=l(q(),1),vv=l(w(),1),uN=(0,vv.jsxs)(kv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,vv.jsx)(kv.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,vv.jsx)(kv.Path,{d:"m18 16.5v-9h1.5v9z"})]});var yv=l(q(),1),Sv=l(w(),1),dN=(0,Sv.jsxs)(yv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Sv.jsx)(yv.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,Sv.jsx)(yv.Path,{d:"m16.5 6h-9v-1.5h9z"})]});var Gp=l(q(),1),Wp=l(w(),1),fN=(0,Wp.jsxs)(Gp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Wp.jsx)(Gp.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,Wp.jsx)(Gp.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,Wp.jsx)(Gp.Path,{d:"m7.5 19.5h9v-1.5h-9z"})]});var uw=l(q(),1),mN=l(w(),1),pN=(0,mN.jsx)(uw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mN.jsx)(uw.Path,{d:"M17.5 4v5a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V4H8v5a.5.5 0 0 0 .5.5h7A.5.5 0 0 0 16 9V4h1.5Zm0 16v-5a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v5H8v-5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v5h1.5Z"})});var dw=l(q(),1),hN=l(w(),1),_v=(0,hN.jsx)(dw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hN.jsx)(dw.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})});var fw=l(q(),1),gN=l(w(),1),Lf=(0,gN.jsx)(fw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gN.jsx)(fw.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var mw=l(q(),1),bN=l(w(),1),kN=(0,bN.jsx)(mw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bN.jsx)(mw.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z"})});var pw=l(q(),1),vN=l(w(),1),Ei=(0,vN.jsx)(pw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,vN.jsx)(pw.Path,{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"})});var hw=l(q(),1),yN=l(w(),1),SN=(0,yN.jsx)(hw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yN.jsx)(hw.Path,{d:"M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z"})});var gw=l(q(),1),_N=l(w(),1),xN=(0,_N.jsx)(gw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_N.jsx)(gw.Path,{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"})});var bw=l(q(),1),wN=l(w(),1),CN=(0,wN.jsx)(bw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wN.jsx)(bw.Path,{d:"M8.2 14.4h3.9L13 17h1.7L11 6.5H9.3L5.6 17h1.7l.9-2.6zm2-5.5 1.4 4H8.8l1.4-4zm7.4 7.5-1.3.8.8 1.4H5.5V20h14.3l-2.2-3.6z"})});var kw=l(q(),1),BN=l(w(),1),EN=(0,BN.jsx)(kw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BN.jsx)(kw.Path,{d:"M7 5.6v1.7l2.6.9v3.9L7 13v1.7L17.5 11V9.3L7 5.6zm4.2 6V8.8l4 1.4-4 1.4zm-5.7 5.6V5.5H4v14.3l3.6-2.2-.8-1.3-1.3.9z"})});var vw=l(q(),1),TN=l(w(),1),IN=(0,TN.jsx)(vw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TN.jsx)(vw.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var yw=l(q(),1),PN=l(w(),1),RN=(0,PN.jsx)(yw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PN.jsx)(yw.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7zm-5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h1V9H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-1h-1.5v1z"})});var Sw=l(q(),1),ON=l(w(),1),vl=(0,ON.jsx)(Sw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ON.jsx)(Sw.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8h1.5c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z"})});var _w=l(q(),1),AN=l(w(),1),vs=(0,AN.jsx)(_w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AN.jsx)(_w.Path,{d:"M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"})});var xw=l(q(),1),LN=l(w(),1),NN=(0,LN.jsx)(xw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LN.jsx)(xw.Path,{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"})});var ww=l(q(),1),MN=l(w(),1),DN=(0,MN.jsx)(ww.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MN.jsx)(ww.Path,{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"})});var Cw=l(q(),1),VN=l(w(),1),FN=(0,VN.jsx)(Cw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VN.jsx)(Cw.Path,{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"})});var _l=l(dr(),1),jn=l(Re(),1),Ee=l(F(),1);var hj=l($(),1),gj=l(oj(),1);var Kt="core/block-editor";var Tw={};Ip(Tw,{getAllPatterns:()=>xhe,getBlockRemovalRules:()=>bhe,getBlockSettings:()=>nj,getBlockStyles:()=>Ihe,getBlockWithoutAttributes:()=>fhe,getClosestAllowedInsertionPoint:()=>lj,getClosestAllowedInsertionPointForPattern:()=>Rhe,getContentLockingParent:()=>zN,getEditedContentOnlySection:()=>jN,getEnabledBlockParents:()=>hhe,getEnabledClientIdsTree:()=>phe,getExpandedBlock:()=>The,getInserterMediaCategories:()=>yhe,getInsertionPoint:()=>Ohe,getLastFocus:()=>Bhe,getLastInsertedBlocksClientIds:()=>dhe,getListViewExpandRevision:()=>zhe,getParentSectionBlock:()=>au,getPatternBySlug:()=>_he,getRegisteredInserterMediaCategories:()=>vhe,getRemovalPromptData:()=>ghe,getRequestedInspectorTab:()=>Uhe,getReusableBlocks:()=>Che,getSectionRootClientId:()=>Mf,getStyleOverrides:()=>khe,getViewportModalClientIds:()=>jhe,getZoomLevel:()=>Phe,hasAllowedPatterns:()=>She,hasBlockSpotlight:()=>Mhe,isBlockHiddenAnywhere:()=>Ahe,isBlockHiddenAtViewport:()=>cj,isBlockHiddenEverywhere:()=>GN,isBlockInterfaceHidden:()=>uhe,isBlockParentHiddenAtViewport:()=>Nhe,isBlockParentHiddenEverywhere:()=>Lhe,isBlockSubtreeDisabled:()=>mhe,isContainerInsertableToInContentOnlyMode:()=>wv,isDragging:()=>Ehe,isEditLockedBlock:()=>uj,isListViewContentPanelOpen:()=>Vhe,isListViewPanelOpened:()=>Fhe,isLockedBlock:()=>Dhe,isMoveLockedBlock:()=>dj,isRemoveLockedBlock:()=>fj,isSectionBlock:()=>lu,isWithinEditedContentOnlySection:()=>UN,isZoomOut:()=>HN});var Vr=l(F(),1),xv=l($(),1);var Bw=l(N(),1);var Et={desktop:{label:(0,Bw.__)("Desktop"),icon:mA,key:"desktop"},tablet:{label:(0,Bw.__)("Tablet"),icon:SN,key:"tablet"},mobile:{label:(0,Bw.__)("Mobile"),icon:cv,key:"mobile"}},iu=Object.entries(Et);var Ew=l($(),1),rj=l(ut(),1);function pe(e,t,o){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};let r=t.pop(),n=e;for(let i of t){let s=n[i];n=n[i]=Array.isArray(s)?[...s]:{...s}}return n[r]=o,e}var yl=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var she=["color","border","dimensions","typography","spacing"],ahe={"color.palette":e=>e.colors,"color.gradients":e=>e.gradients,"color.custom":e=>e.disableCustomColors===void 0?void 0:!e.disableCustomColors,"color.customGradient":e=>e.disableCustomGradients===void 0?void 0:!e.disableCustomGradients,"typography.fontSizes":e=>e.fontSizes,"typography.customFontSize":e=>e.disableCustomFontSizes===void 0?void 0:!e.disableCustomFontSizes,"typography.lineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(e.enableCustomUnits!==void 0)return e.enableCustomUnits===!0?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.padding":e=>e.enableCustomSpacing},lhe={"border.customColor":"border.color","border.customStyle":"border.style","border.customWidth":"border.width","typography.customFontStyle":"typography.fontStyle","typography.customFontWeight":"typography.fontWeight","typography.customLetterSpacing":"typography.letterSpacing","typography.customTextDecorations":"typography.textDecoration","typography.customTextTransforms":"typography.textTransform","border.customRadius":"border.radius","spacing.customMargin":"spacing.margin","spacing.customPadding":"spacing.padding","typography.customLineHeight":"typography.lineHeight"},che=e=>lhe[e]||e;function nj(e,t,...o){let r=dt(e,t),n=[];if(t){let i=t;do{let s=dt(e,i);(0,Ew.hasBlockSupport)(s,"__experimentalSettings",!1)&&n.push(i)}while(i=e.blocks.parents.get(i))}return o.map(i=>{if(she.includes(i)){console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");return}let s=(0,rj.applyFilters)("blockEditor.useSetting.before",void 0,i,t,r);if(s!==void 0)return s;let a=che(i);for(let d of n){let f=Ti(e,d);if(s=yl(f.settings?.blocks?.[r],a)??yl(f.settings,a),s!==void 0)break}let c=su(e);if(s===void 0&&r&&(s=yl(c.__experimentalFeatures?.blocks?.[r],a)),s===void 0&&(s=yl(c.__experimentalFeatures,a)),s!==void 0)return Ew.__EXPERIMENTAL_PATHS_WITH_OVERRIDE[a]?s.custom??s.theme??s.default:s;let u=ahe[a]?.(c);return u!==void 0?u:a==="typography.dropCap"?!0:void 0})}var{isContentBlock:ij}=M(xv.privateApis);function uhe(e){return e.isBlockInterfaceHidden}function dhe(e){return e?.lastBlockInserted?.clientIds}function fhe(e,t){return e.blocks.byClientId.get(t)}var mhe=(e,t)=>{let o=r=>Ii(e,r)==="disabled"&&wr(e,r).every(o);return wr(e,t).every(o)};function wv(e,t,o){let r=ij(t),n=dt(e,o),i=ij(n);return Mf(e)===o||i&&r}function sj(e,t){let o=wr(e,t),r=[];for(let n of o){let i=sj(e,n);Ii(e,n)!=="disabled"?r.push({clientId:n,innerBlocks:i}):r.push(...i)}return r}var phe=(0,Vr.createRegistrySelector)(()=>(0,Vr.createSelector)(sj,e=>[e.blocks.order,e.derivedBlockEditingModes,e.blocks.blockEditingModes])),hhe=(0,Vr.createSelector)((e,t,o=!1)=>ys(e,t,o).filter(r=>Ii(e,r)!=="disabled"),e=>[e.blocks.parents,e.blocks.blockEditingModes,e.settings.templateLock,e.blockListSettings]);function ghe(e){return e.removalPromptData}function bhe(e){return e.blockRemovalRules}var khe=(0,Vr.createSelector)(e=>{let o=$p(e).reduce((r,n,i)=>(r[n]=i,r),{});return[...e.styleOverrides].sort((r,n)=>{let[,{clientId:i}]=r,[,{clientId:s}]=n,a=o[i]??-1,c=o[s]??-1;return a-c})},e=>[e.blocks.order,e.styleOverrides]);function vhe(e){return e.registeredInserterMediaCategories}var yhe=(0,Vr.createSelector)(e=>{let{settings:{inserterMediaCategories:t,allowedMimeTypes:o,enableOpenverseMediaCategory:r},registeredInserterMediaCategories:n}=e;if(!t&&!n.length||!o)return;let i=t?.map(({name:a})=>a)||[];return[...t||[],...(n||[]).filter(({name:a})=>!i.includes(a))].filter(a=>!r&&a.name==="openverse"?!1:Object.values(o).some(c=>c.startsWith(`${a.mediaType}/`)))},e=>[e.settings.inserterMediaCategories,e.settings.allowedMimeTypes,e.settings.enableOpenverseMediaCategory,e.registeredInserterMediaCategories]),She=(0,Vr.createRegistrySelector)(e=>(0,Vr.createSelector)((t,o=null)=>{let{getAllPatterns:r}=M(e(Kt)),n=r(),{allowedBlockTypes:i}=su(t);return n.some(s=>{let{inserter:a=!0}=s;if(!a)return!1;let c=Nf(s);return Bv(c,i)&&c.every(({name:u})=>Df(t,u,o))})},(t,o)=>[...Ev(e)(t),...cu(e)(t,o)])),_he=(0,Vr.createRegistrySelector)(e=>(0,Vr.createSelector)((t,o)=>{if(o?.startsWith("core/block/")){let r=parseInt(o.slice(11),10),n=M(e(Kt)).getReusableBlocks().find(({id:i})=>i===r);return n?Cv(n,t.settings.__experimentalUserPatternCategories):null}return[...t.settings.__experimentalBlockPatterns??[],...t.settings[qc]?.(e)??[]].find(({name:r})=>r===o)},(t,o)=>o?.startsWith("core/block/")?[M(e(Kt)).getReusableBlocks(),t.settings.__experimentalReusableBlocks]:[t.settings.__experimentalBlockPatterns,t.settings[qc]?.(e)])),xhe=(0,Vr.createRegistrySelector)(e=>(0,Vr.createSelector)(t=>[...M(e(Kt)).getReusableBlocks().map(o=>Cv(o,t.settings.__experimentalUserPatternCategories)),...t.settings.__experimentalBlockPatterns??[],...t.settings[qc]?.(e)??[]].filter((o,r,n)=>r===n.findIndex(i=>o.name===i.name)),Ev(e))),whe=[],Che=(0,Vr.createRegistrySelector)(e=>t=>{let o=t.settings[S0];return(o?o(e):t.settings.__experimentalReusableBlocks)??whe});function Bhe(e){return e.lastFocus}function Ehe(e){return e.isDragging}function The(e){return e.expandedBlock}var zN=(e,t)=>{let o=t,r;for(;!r&&(o=e.blocks.parents.get(o));)fa(e,o)==="contentOnly"&&(r=o);return r};function aj(e,t){let o=dt(e,t);if(o==="core/block")return!0;let r=Ti(e,t),n=o==="core/template-part",i=e.settings?.[Xc],s=e.settings?.disableContentOnlyForUnsyncedPatterns,a=e.settings?.disableContentOnlyForTemplateParts;if((!s&&r?.metadata?.patternName||n&&!a)&&!i)return!0;let c=fa(e,t)==="contentOnly",u=Po(e,t),d=fa(e,u)==="contentOnly";return!!(c&&!d)}var au=(e,t)=>{if(UN(e,t))return;let o=t,r;for(;o=e.blocks.parents.get(o);)aj(e,o)&&(r=o);return r};function lu(e,t){return UN(e,t)||au(e,t)?!1:aj(e,t)}function jN(e){return e.editedContentOnlySection}function UN(e,t){if(!e.editedContentOnlySection)return!1;if(e.editedContentOnlySection===t)return!0;let o=t;for(;o=e.blocks.parents.get(o);)if(e.editedContentOnlySection===o)return!0;return!1}var Ihe=(0,Vr.createSelector)((e,t)=>t.reduce((o,r)=>(o[r]=e.blocks.attributes.get(r)?.style,o),{}),(e,t)=>[...t.map(o=>e.blocks.attributes.get(o)?.style)]);function Mf(e){return e.settings?.[Zc]}function HN(e){return e.zoomLevel==="auto-scaled"||e.zoomLevel<100}function Phe(e){return e.zoomLevel}function lj(e,t,o=""){let r=Array.isArray(t)?t:[t],n=s=>r.every(a=>Df(e,a,s));if(!o){if(n(o))return o;let s=Mf(e);return s&&n(s)?s:null}let i=o;for(;i!==null&&!n(i);)i=Po(e,i);return i}function Rhe(e,t,o){let{allowedBlockTypes:r}=su(e);if(!Bv(Nf(t),r))return null;let i=Nf(t).map(({blockName:s})=>s);return lj(e,i,o)}function Ohe(e){return e.insertionPoint}var Ahe=(e,t)=>{let o=dt(e,t);if(!(0,xv.hasBlockSupport)(o,"visibility",!0))return!1;let n=e.blocks.attributes.get(t)?.metadata?.blockVisibility;return n===!1?!0:typeof n?.viewport=="object"&&n?.viewport!==null?Object.values(Et).some(i=>n?.viewport?.[i.key]===!1):!1},GN=(e,t)=>{let o=dt(e,t);return(0,xv.hasBlockSupport)(o,"visibility",!0)?e.blocks.attributes.get(t)?.metadata?.blockVisibility===!1:!1},Lhe=(e,t)=>ys(e,t).some(r=>GN(e,r)),cj=(e,t,o)=>{if(GN(e,t))return!0;let n=e.blocks.attributes.get(t)?.metadata?.blockVisibility?.viewport;return typeof n=="object"&&n!==null&&typeof o=="string"?n?.[o.toLowerCase()]===!1:!1},Nhe=(e,t,o)=>ys(e,t).some(n=>cj(e,n,o));function Mhe(e){return!!e.hasBlockSpotlight||!!e.editedContentOnlySection}function uj(e,t){return!!Ti(e,t)?.lock?.edit}function dj(e,t){let o=Ti(e,t);if(o?.lock?.move!==void 0)return!!o?.lock?.move;let r=Po(e,t);return fa(e,r)==="all"}function fj(e,t){let o=Ti(e,t);if(o?.lock?.remove!==void 0)return!!o?.lock?.remove;let r=Po(e,t),n=fa(e,r);return n==="all"||n==="insert"}function Dhe(e,t){return uj(e,t)||dj(e,t)||fj(e,t)}function Vhe(e){return e.listViewContentPanelOpen}function Fhe(e,t){return e.openedListViewPanels?.allOpen?!0:e.openedListViewPanels?.panels?.[t]===!0}function zhe(e){return e.listViewExpandRevision||0}function jhe(e){return e.viewportModalClientIds}function Uhe(e){return e.requestedInspectorTab}var Iv=l(N(),1),Nt={user:"user",theme:"theme",directory:"directory"},Tv={full:"fully",unsynced:"unsynced"},Vf={name:"allPatterns",label:(0,Iv._x)("All","patterns")},Sl={name:"myPatterns",label:(0,Iv.__)("My patterns")},Kp={name:"core/starter-content",label:(0,Iv.__)("Starter content")};function Iw(e,t,o){let r=e.name.startsWith("core/block"),n=e.source==="core"||e.source?.startsWith("pattern-directory");return!!(t===Nt.theme&&(r||n)||t===Nt.directory&&(r||!n)||t===Nt.user&&e.type!==Nt.user||o===Tv.full&&e.syncStatus!==""||o===Tv.unsynced&&e.syncStatus!=="unsynced"&&r)}var uu=Symbol("isFiltered"),mj=new WeakMap,pj=new WeakMap;function Cv(e,t=[]){return{name:`core/block/${e.id}`,id:e.id,type:Nt.user,title:e.title?.raw,categories:e.wp_pattern_category?.map(o=>{let r=t.find(({id:n})=>n===o);return r?r.slug:o}),content:e.content?.raw,syncStatus:e.wp_pattern_sync_status}}function Hhe(e){let t=(0,hj.parse)(e.content,{__unstableSkipMigrationLogs:!0});return t.length===1&&(t[0].attributes={...t[0].attributes,metadata:{...t[0].attributes.metadata||{},categories:e.categories,patternName:e.name,name:t[0].attributes.metadata?.name||e.title}}),{...e,blocks:t}}function Pw(e){let t=mj.get(e);return t||(t=Hhe(e),mj.set(e,t)),t}function Nf(e){let t=pj.get(e);return t||(t=(0,gj.parse)(e.content),t=t.filter(o=>o.blockName!==null),pj.set(e,t)),t}var Ff=(e,t,o=null)=>typeof e=="boolean"?e:Array.isArray(e)?e.includes("core/post-content")&&t===null?!0:e.includes(t):o,Bv=(e,t)=>{if(typeof t=="boolean")return t;let o=[...e];for(;o.length>0;){let r=o.shift();if(!Ff(t,r.name||r.blockName,!0))return!1;r.innerBlocks?.forEach(i=>{o.push(i)})}return!0},Ev=e=>t=>[t.settings.__experimentalBlockPatterns,t.settings.__experimentalUserPatternCategories,t.settings.__experimentalReusableBlocks,t.settings[qc]?.(e),t.blockPatterns,M(e(Kt)).getReusableBlocks()],cu=()=>(e,t)=>[e.blockListSettings[t],e.blocks.byClientId.get(t),e.blocks.order.get(t||""),e.settings.allowedBlockTypes,e.settings.templateLock,Ii(e,t),Mf(e),lu(e,t),au(e,t)];var Ghe=(e,t,o)=>(r,n)=>{let i,s;if(typeof e=="function"?(i=e(r),s=e(n)):(i=r[e],s=n[e]),i>s)return o==="asc"?1:-1;if(s>i)return o==="asc"?-1:1;let a=t.findIndex(u=>u===r),c=t.findIndex(u=>u===n);return a>c?1:c>a?-1:0};function ma(e,t,o="asc"){return e.concat().sort(Ghe(t,e,o))}var{isContentBlock:$N}=M(Oe.privateApis),Whe=3600*1e3,$he=24*3600*1e3,Khe=168*3600*1e3,fr=[],Yhe=new Set,yj={[uu]:!0};function dt(e,t){let o=e.blocks.byClientId.get(t),r="core/social-link";if(kj.Platform.OS!=="web"&&o?.name===r){let n=e.blocks.attributes.get(t),{service:i}=n??{};return i?`${r}-${i}`:r}return o?o.name:null}function qhe(e,t){let o=e.blocks.byClientId.get(t);return!!o&&o.isValid}function Ti(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function xl(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}var Zhe=(0,Ee.createSelector)((e,t)=>{let o=e.blocks.byClientId.get(t);return o?{...o,attributes:Ti(e,t)}:null},(e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]);function Xhe(e,t){let o=!t||!Ow(e,t)?t||"":"controlled||"+t;return e.blocks.tree.get(o)?.innerBlocks||fr}var Sj=(0,Ee.createSelector)((e,t)=>((0,jn.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",{since:"6.3",version:"6.5"}),{clientId:t,innerBlocks:_j(e,t)}),e=>[e.blocks.order]),_j=(0,Ee.createSelector)((e,t="")=>((0,jn.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",{since:"6.3",version:"6.5"}),wr(e,t).map(o=>Sj(e,o))),e=>[e.blocks.order]),xj=(0,Ee.createSelector)((e,t)=>{t=Array.isArray(t)?[...t]:[t];let o=[];for(let n of t){let i=e.blocks.order.get(n);i&&o.push(...i)}let r=0;for(;r<o.length;){let n=o[r],i=e.blocks.order.get(n);i&&o.splice(r+1,0,...i),r++}return o},e=>[e.blocks.order]),$p=e=>xj(e,""),Qhe=(0,Ee.createSelector)((e,t)=>{let o=$p(e);if(!t)return o.length;let r=0;for(let n of o)e.blocks.byClientId.get(n).name===t&&r++;return r},e=>[e.blocks.order,e.blocks.byClientId]),wj=(0,Ee.createSelector)((e,t)=>{if(!t)return fr;let o=Array.isArray(t)?t:[t],n=$p(e).filter(i=>{let s=e.blocks.byClientId.get(i);return o.includes(s.name)});return n.length>0?n:fr},e=>[e.blocks.order,e.blocks.byClientId]);function Jhe(e,t){return(0,jn.default)("wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",{since:"6.5",alternative:"wp.data.select( 'core/block-editor' ).getBlocksByName"}),wj(e,t)}var Rw=(0,Ee.createSelector)((e,t)=>(Array.isArray(t)?t:[t]).map(o=>xl(e,o)),(e,t)=>(Array.isArray(t)?t:[t]).map(o=>e.blocks.tree.get(o))),ege=(0,Ee.createSelector)((e,t)=>Rw(e,t).filter(Boolean).map(o=>o.name),(e,t)=>Rw(e,t));function tge(e,t){return wr(e,t).length}function Rv(e){return e.selection.selectionStart}function Ov(e){return e.selection.selectionEnd}function oge(e){return e.selection.selectionStart.clientId}function rge(e){return e.selection.selectionEnd.clientId}function nge(e){let t=du(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function ige(e){let{selectionStart:t,selectionEnd:o}=e.selection;return!!t.clientId&&t.clientId===o.clientId}function Yp(e){let{selectionStart:t,selectionEnd:o}=e.selection,{clientId:r}=t;return!r||r!==o.clientId?null:r}function sge(e){let t=Yp(e);return t?xl(e,t):null}function Po(e,t){return e.blocks.parents.get(t)??null}var ys=(0,Ee.createSelector)((e,t,o=!1)=>{let r=[],n=t;for(;n=e.blocks.parents.get(n);)r.push(n);return r.length?o?r:r.reverse():fr},e=>[e.blocks.parents]),KN=(0,Ee.createSelector)((e,t,o,r=!1)=>{let n=ys(e,t,r),i=Array.isArray(o)?s=>o.includes(s):s=>o===s;return n.filter(s=>i(dt(e,s)))},e=>[e.blocks.parents]);function age(e,t){let o=t,r;do r=o,o=e.blocks.parents.get(o);while(o);return r}function lge(e,t){let o=Yp(e),r=[...ys(e,t),t],n=[...ys(e,o),o],i,s=Math.min(r.length,n.length);for(let a=0;a<s&&r[a]===n[a];a++)i=r[a];return i}function YN(e,t,o=1){if(t===void 0&&(t=Yp(e)),t===void 0&&(o<0?t=qN(e):t=Cj(e)),!t)return null;let r=Po(e,t);if(r===null)return null;let{order:n}=e.blocks,i=n.get(r),a=i.indexOf(t)+1*o;return a<0||a===i.length?null:i[a]}function cge(e,t){return YN(e,t,-1)}function uge(e,t){return YN(e,t,1)}function dge(e){return e.initialPosition}var qp=(0,Ee.createSelector)(e=>{let{selectionStart:t,selectionEnd:o}=e.selection;if(!t.clientId||!o.clientId)return fr;if(t.clientId===o.clientId)return[t.clientId];let r=Po(e,t.clientId);if(r===null)return fr;let n=wr(e,r),i=n.indexOf(t.clientId),s=n.indexOf(o.clientId);return i>s?n.slice(s,i+1):n.slice(i,s+1)},e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]);function du(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?fr:qp(e)}var fge=(0,Ee.createSelector)(e=>{let t=du(e);return t.length?t.map(o=>xl(e,o)):fr},e=>[...qp.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]);function qN(e){return du(e)[0]||null}function Cj(e){let t=du(e);return t[t.length-1]||null}function mge(e,t){return qN(e)===t}function Bj(e,t){return du(e).indexOf(t)!==-1}var pge=(0,Ee.createSelector)((e,t)=>{let o=t,r=!1;for(;o&&!r;)o=Po(e,o),r=Bj(e,o);return r},e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]);function hge(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:t.clientId||null}function gge(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:o.clientId||null}function bge(e){let t=Rv(e),o=Ov(e);return!t.attributeKey&&!o.attributeKey&&typeof t.offset>"u"&&typeof o.offset>"u"}function kge(e){let t=Rv(e),o=Ov(e);return!!t&&!!o&&t.clientId===o.clientId&&t.attributeKey===o.attributeKey&&t.offset===o.offset}function vge(e){return qp(e).some(t=>{let o=dt(e,t);return!(0,Oe.getBlockType)(o).merge})}function yge(e,t){let o=Rv(e),r=Ov(e);if(o.clientId===r.clientId||!o.attributeKey||!r.attributeKey||typeof o.offset>"u"||typeof r.offset>"u")return!1;let n=Po(e,o.clientId),i=Po(e,r.clientId);if(n!==i)return!1;let s=wr(e,n),a=s.indexOf(o.clientId),c=s.indexOf(r.clientId),u,d;a>c?(u=r,d=o):(u=o,d=r);let f=t?d.clientId:u.clientId,m=t?u.clientId:d.clientId,h=dt(e,f);if(!(0,Oe.getBlockType)(h).merge)return!1;let g=xl(e,m);if(g.name===h)return!0;let b=(0,Oe.switchToBlockType)(g,h);return b&&b.length}var Sge=e=>{let t=Rv(e),o=Ov(e);if(t.clientId===o.clientId||!t.attributeKey||!o.attributeKey||typeof t.offset>"u"||typeof o.offset>"u")return fr;let r=Po(e,t.clientId),n=Po(e,o.clientId);if(r!==n)return fr;let i=wr(e,r),s=i.indexOf(t.clientId),a=i.indexOf(o.clientId),[c,u]=s>a?[o,t]:[t,o],d=xl(e,c.clientId),f=xl(e,u.clientId),m=d.attributes[c.attributeKey],h=f.attributes[u.attributeKey],p=(0,_l.create)({html:m}),g=(0,_l.create)({html:h});return p=(0,_l.remove)(p,0,c.offset),g=(0,_l.remove)(g,u.offset,g.text.length),[{...d,attributes:{...d.attributes,[c.attributeKey]:(0,_l.toHTMLString)({value:p})}},{...f,attributes:{...f.attributes,[u.attributeKey]:(0,_l.toHTMLString)({value:g})}}]};function wr(e,t){return e.blocks.order.get(t||"")||fr}function Ej(e,t){let o=Po(e,t);return wr(e,o).indexOf(t)}function Tj(e,t){let{selectionStart:o,selectionEnd:r}=e.selection;return o.clientId!==r.clientId?!1:o.clientId===t}function Ij(e,t,o=!1){let r=qp(e);return r.length?o?r.some(n=>ys(e,n,!0).includes(t)):r.some(n=>Po(e,n)===t):!1}function Pj(e,t,o=!1){return wr(e,t).some(r=>ZN(e,r)||o&&Pj(e,r,o))}function _ge(e,t){if(!t)return!1;let o=du(e),r=o.indexOf(t);return r>-1&&r<o.length-1}function xge(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId!==o.clientId}function wge(e){return e.isMultiSelecting}function Cge(e){return e.isSelectionEnabled}function Bge(e,t){return e.blocksMode[t]||"visual"}function Ege(e){return e.isTyping}function Rj(e){return!!e.draggedBlocks.length}function Tge(e){return e.draggedBlocks}function ZN(e,t){return e.draggedBlocks.includes(t)}function Ige(e,t){return Rj(e)?ys(e,t).some(r=>ZN(e,r)):!1}function Pge(){return(0,jn.default)('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}var Rge=(0,Ee.createSelector)(e=>{let t,o,{insertionCue:r,selection:{selectionEnd:n}}=e;if(r!==null)return r;let{clientId:i}=n;return i?(t=Po(e,i)||void 0,o=Ej(e,n.clientId)+1):o=wr(e).length,{rootClientId:t,index:o}},e=>[e.insertionCue,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]);function Oge(e){return e.insertionCue!==null}function Age(e){return e.template.isValid}function Lge(e){return e.settings.template}function fa(e,t){if(!t)return e.settings.templateLock??!1;let o=oM(e,t)?.templateLock;return o==="contentOnly"&&e.editedContentOnlySection===t?!1:o??!1}var XN=(e,t,o=null)=>{let r,n;if(t&&typeof t=="object"?(r=t,n=t.name):(r=(0,Oe.getBlockType)(t),n=t),!r)return!1;let{allowedBlockTypes:i}=su(e);if(!Ff(i,n,!0))return!1;let a=(Array.isArray(r.parent)?r.parent:[]).concat(Array.isArray(r.ancestor)?r.ancestor:[]);if(a.length>0){if(a.includes("core/post-content"))return!0;let c=o,u=!1;do{if(a.includes(dt(e,c))){u=!0;break}c=e.blocks.parents.get(c)}while(c);return u}return!0},Av=(e,t,o=null)=>{if(e.settings.isPreviewMode||!XN(e,t,o))return!1;let r;t&&typeof t=="object"?(r=t,t=r.name):r=(0,Oe.getBlockType)(t);let n=fa(e,o);if(n&&n!=="contentOnly")return!1;let i=Ii(e,o??""),s=!!lu(e,o),a=s?o:au(e,o),c=!!a;if(i==="disabled"&&(!c||t!==(0,Oe.getDefaultBlockName)()))return!1;let u=oM(e,o);if(o&&u===void 0)return!1;let d=$N(t);if(c&&!d||c&&dt(e,a)==="core/block")return!1;if(c&&(s||i==="contentOnly"||i==="disabled")&&!wv(e,t,o)){let S=(0,Oe.getDefaultBlockName)();if(t===S){if(!wr(e,o).some(B=>dt(e,B)===S))return!1}else return!1}let f=dt(e,o),h=(0,Oe.getBlockType)(f)?.allowedBlocks,p=Ff(h,t);if(p!==!1){let S=u?.allowedBlocks,x=Ff(S,t);x!==null&&(p=x)}let g=r.parent,b=Ff(g,f),v=!0,k=r.ancestor;k&&(v=[o,...ys(e,o)].some(x=>Ff(k,dt(e,x))));let y=v&&(p===null&&b===null||p===!0||b===!0);return y&&(0,vj.applyFilters)("blockEditor.__unstableCanInsertBlockType",y,r,o,{getBlock:xl.bind(null,e),getBlockParentsByBlockName:KN.bind(null,e)})},Df=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)(Av,(t,o,r)=>cu(e)(t,r)));function Nge(e,t,o=null){return t.every(r=>Df(e,dt(e,r),o))}function QN(e,t){if(e.settings.isPreviewMode)return!1;let o=Ti(e,t);if(o===null)return!0;if(o.lock?.remove!==void 0)return!o.lock.remove;let r=Po(e,t),n=fa(e,r);if(n&&n!=="contentOnly")return!1;let i=!!lu(e,r),s=i?r:au(e,r),a=!!s,c=$N(dt(e,t));if(a&&!c||a&&dt(e,s)==="core/block")return!1;let u=Ii(e,r),d=dt(e,t),f=(0,Oe.getDefaultBlockName)();return a&&(i||d===f||u==="contentOnly")&&!wv(e,dt(e,t),r)?d===f?wr(e,r).filter(p=>dt(e,p)===f).length>1:!1:u!=="disabled"}function Oj(e,t){return t.every(o=>QN(e,o))}function Aj(e,t){if(e.settings.isPreviewMode)return!1;let o=Ti(e,t);if(o===null)return!0;if(o.lock?.move!==void 0)return!o.lock.move;let r=Po(e,t);if(fa(e,r)==="all")return!1;let i=!!au(e,t),s=$N(dt(e,t));if(i&&!s)return!1;let a=!!lu(e,r),c=Ii(e,r);return i&&(a||c==="contentOnly")&&!wv(e,dt(e,t),r)?!1:Ii(e,r)!=="disabled"}function Mge(e,t){return t.every(o=>Aj(e,o))}function Lj(e,t){if(e.settings.isPreviewMode)return!1;let o=Ti(e,t);if(o===null)return!0;let{lock:r}=o;return!r?.edit}function Dge(e,t){return e.settings.isPreviewMode||!(0,Oe.hasBlockSupport)(t,"lock",!0)?!1:!!e.settings?.canLockBlocks}function JN(e,t){return e.preferences.insertUsage?.[t]??null}var Pv=(e,t,o)=>(0,Oe.hasBlockSupport)(t,"inserter",!0)?Av(e,t.name,o):!1,Vge=(e,t)=>o=>{let r=`${t.id}/${o.name}`,{time:n,count:i=0}=JN(e,r)||{};return{...t,id:r,icon:o.icon||t.icon,title:o.title||t.title,description:o.description||t.description,category:o.category||t.category,example:o.hasOwnProperty("example")?o.example:t.example,initialAttributes:{...t.initialAttributes,...o.attributes},innerBlocks:o.innerBlocks,keywords:o.keywords||t.keywords,frecency:eM(n,i),isSearchOnly:o.isSearchOnly}},eM=(e,t)=>{if(!e)return t;let o=Date.now()-e;switch(!0){case o<Whe:return t*4;case o<$he:return t*2;case o<Khe:return t/2;default:return t/4}},Nj=(e,{buildScope:t="inserter"})=>o=>{let r=o.name,n=!1;(0,Oe.hasBlockSupport)(o.name,"multiple",!0)||(n=Rw(e,$p(e)).some(({name:f})=>f===o.name));let{time:i,count:s=0}=JN(e,r)||{},a={id:r,name:o.name,title:o.title,icon:o.icon,isDisabled:n,frecency:eM(i,s)};if(t==="transform")return a;let c=(0,Oe.getBlockVariations)(o.name,"inserter"),u=(0,Oe.getBlockVariations)(o.name,"block"),d=[...c,...u.filter(f=>o.name==="core/heading"&&["h1","h2","h3","h4","h5","h6"].includes(f.name)).map(f=>({...f,isSearchOnly:!0}))];return{...a,initialAttributes:{},description:o.description,category:o.category,keywords:o.keywords,parent:o.parent,ancestor:o.ancestor,variations:d,example:o.example,utility:1}},Fge=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o=null,r=yj)=>{let n=h=>{let p=h.wp_pattern_sync_status?Ei:{src:Ei,foreground:"var(--wp-block-synced-color)"},g=Cv(h),{time:b,count:v=0}=JN(t,g.name)||{},k=eM(b,v);return{id:g.name,name:"core/block",initialAttributes:{ref:h.id},title:g.title,icon:p,category:"reusable",keywords:["reusable"],isDisabled:!1,utility:1,frecency:k,content:g.content,get blocks(){return Pw(g).blocks},syncStatus:g.syncStatus}},i=Av(t,"core/block",o)?M(e(Kt)).getReusableBlocks().map(n):[],s=Nj(t,{buildScope:"inserter"}),a=(0,Oe.getBlockTypes)().filter(h=>(0,Oe.hasBlockSupport)(h,"inserter",!0)).map(s);if(r[uu]!==!1)a=a.filter(h=>Pv(t,h,o));else{let{getClosestAllowedInsertionPoint:h}=M(e(Kt));a=a.filter(p=>XN(t,p,o)&&h(p.name,o)!==null).map(p=>({...p,isAllowedInCurrentRoot:Pv(t,p,o)}))}let c=a.reduce((h,p)=>{let{variations:g=[]}=p;if(g.some(({isDefault:b})=>b)||h.push(p),g.length){let b=Vge(t,p);h.push(...g.map(b))}return h},[]),u=(h,p)=>{let{core:g,noncore:b}=h;return(p.name.startsWith("core/")?g:b).push(p),h},{core:d,noncore:f}=c.reduce(u,{core:[],noncore:[]});return[...[...d,...f],...i]},(t,o)=>[(0,Oe.getBlockTypes)(),M(e(Kt)).getReusableBlocks(),t.blocks.order,t.preferences.insertUsage,...cu(e)(t,o)])),zge=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o,r=null)=>{let n=Array.isArray(o)?o:[o],i=Nj(t,{buildScope:"transform"}),s=(0,Oe.getBlockTypes)().filter(u=>Pv(t,u,r)).map(i),a=Object.fromEntries(Object.entries(s).map(([,u])=>[u.name,u])),c=(0,Oe.getPossibleBlockTransformations)(n).reduce((u,d)=>(a[d?.name]&&u.push(a[d.name]),u),[]);return ma(c,u=>a[u.name].frecency,"desc")},(t,o,r)=>[(0,Oe.getBlockTypes)(),t.preferences.insertUsage,...cu(e)(t,r)])),jge=(e,t=null)=>(0,Oe.getBlockTypes)().some(n=>Pv(e,n,t))?!0:Av(e,"core/block",t),WN=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o=null)=>{if(!o)return;let r=(0,Oe.getBlockTypes)().filter(i=>Pv(t,i,o));return Av(t,"core/block",o)&&r.push("core/block"),r},(t,o)=>[(0,Oe.getBlockTypes)(),...cu(e)(t,o)])),Uge=(0,Ee.createSelector)((e,t=null)=>((0,jn.default)('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),WN(e,t)),(e,t)=>WN.getDependants(e,t));function Mj(e,t=null){if(!t)return;let{defaultBlock:o,directInsert:r}=e.blockListSettings[t]??{};if(!(!o||!r))return o}function Hge(e,t=null){return(0,jn.default)('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock',{alternative:'wp.data.select( "core/block-editor" ).getDirectInsertBlock',since:"6.3",version:"6.4"}),Mj(e,t)}var Gge=(0,Ee.createRegistrySelector)(e=>(t,o)=>{let r=M(e(Kt)).getPatternBySlug(o);return r?Pw(r):null}),tM=e=>(t,o)=>[...Ev(e)(t),...cu(e)(t,o)],bj=new WeakMap;function Wge(e){let t=bj.get(e);return t||(t={...e,get blocks(){return Pw(e).blocks}},bj.set(e,t)),t}var $ge=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o=null,r=yj)=>{let{getAllPatterns:n}=M(e(Kt)),i=n(),{allowedBlockTypes:s}=su(t);return i.filter(({inserter:d=!0})=>!!d).map(Wge).filter(d=>Bv(Nf(d),s)).filter(d=>Nf(d).every(({blockName:f})=>r[uu]!==!1?Df(t,f,o):XN(t,f,o)))},tM(e))),Kge=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o,r=null)=>{if(!o)return fr;let n=e(Kt).__experimentalGetAllowedPatterns(r),i=Array.isArray(o)?o:[o],s=n.filter(a=>a?.blockTypes?.some?.(c=>i.includes(c)));return s.length===0?fr:s},(t,o,r)=>tM(e)(t,r))),Yge=(0,Ee.createRegistrySelector)(e=>((0,jn.default)('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),e(Kt).getPatternsByBlockTypes)),qge=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o,r=null)=>{if(!o||o.some(({clientId:i,innerBlocks:s})=>s.length||Ow(t,i)))return fr;let n=Array.from(new Set(o.map(({name:i})=>i)));return e(Kt).getPatternsByBlockTypes(n,r)},(t,o,r)=>tM(e)(t,r)));function oM(e,t){return e.blockListSettings[t]}function su(e){return e.settings}function Zge(e){return e.blocks.isPersistentChange}var Xge=(0,Ee.createSelector)((e,t=[])=>t.reduce((o,r)=>e.blockListSettings[r]?{...o,[r]:e.blockListSettings[r]}:o,{}),e=>[e.blockListSettings]),Qge=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o)=>{(0,jn.default)("wp.data.select( 'core/block-editor' ).__experimentalGetReusableBlockTitle",{since:"6.6",version:"6.8"});let r=M(e(Kt)).getReusableBlocks().find(n=>n.id===o);return r?r.title?.raw:null},()=>[M(e(Kt)).getReusableBlocks()]));function Jge(e){return e.blocks.isIgnoredChange}function ebe(e){return e.lastBlockAttributesChange}function tbe(){return(0,jn.default)('wp.data.select( "core/block-editor" ).hasBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),!1}function obe(e){return!!e.automaticChangeStatus}function rbe(e,t){return e.highlightedBlock===t}function Ow(e,t){return!!e.blocks.controlledInnerBlocks[t]}var nbe=(0,Ee.createSelector)((e,t)=>{if(!t.length)return null;let o=Yp(e);if(t.includes(dt(e,o)))return o;let r=du(e),n=KN(e,o||r[0],t);return n?n[n.length-1]:null},(e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]);function ibe(e,t,o){let{lastBlockInserted:r}=e;return r.clientIds?.includes(t)&&r.source===o}function sbe(e,t){return e.blockVisibility?.[t]??!0}function abe(){(0,jn.default)("wp.data.select( 'core/block-editor' ).getHoveredBlockClientId",{since:"6.9",version:"7.1"})}var lbe=(0,Ee.createSelector)(e=>{let t=new Set(Object.keys(e.blockVisibility).filter(o=>e.blockVisibility[o]));return t.size===0?Yhe:t},e=>[e.blockVisibility]);function Dj(e,t){if(Ii(e,t)!=="default")return!1;if(!Lj(e,t))return!0;if(HN(e)){let n=Mf(e);if(n){if(wr(e,n)?.includes(t))return!0}else if(t&&!Po(e,t))return!0}return((0,Oe.hasBlockSupport)(dt(e,t),"__experimentalDisableBlockOverlay",!1)?!1:Ow(e,t))&&!Tj(e,t)&&!Ij(e,t,!0)}function cbe(e,t){let o=e.blocks.parents.get(t);for(;o;){if(Dj(e,o))return!0;o=e.blocks.parents.get(o)}return!1}function Ii(e,t=""){return t===null&&(t=""),e.derivedBlockEditingModes?.has(t)?e.derivedBlockEditingModes.get(t):e.blocks.blockEditingModes.has(t)?e.blocks.blockEditingModes.get(t):"default"}var ube=(0,Ee.createRegistrySelector)(e=>(t,o="")=>{let r=o||Yp(t);if(!r||lu(t,r))return!1;let{getGroupingBlockName:n}=e(Oe.store),i=xl(t,r),s=n();return i&&(i.name===s||(0,Oe.getBlockType)(i.name)?.transforms?.ungroup)&&!!i.innerBlocks.length&&QN(t,r)}),dbe=(0,Ee.createRegistrySelector)(e=>(t,o=fr)=>{let{getGroupingBlockName:r}=e(Oe.store),n=r(),i=o?.length?o:qp(t),s=i?.length?Po(t,i[0]):void 0;return Df(t,n,s)&&i.length&&Oj(t,i)}),fbe=(e,t)=>((0,jn.default)("wp.data.select( 'core/block-editor' ).__unstableGetContentLockingParent",{since:"6.1",version:"6.7"}),zN(e,t));function mbe(e){return(0,jn.default)("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingAsBlocks",{since:"6.1",version:"6.7"}),jN(e)}var Aw={};Ip(Aw,{__experimentalUpdateSettings:()=>nM,clearBlockRemovalPrompt:()=>vbe,clearRequestedInspectorTab:()=>Dbe,closeListViewContentPanel:()=>Abe,deleteStyleOverride:()=>_be,editContentOnlySection:()=>sM,ensureDefaultBlock:()=>Hj,expandBlock:()=>Bbe,hideBlockInterface:()=>gbe,hideViewportModal:()=>Nbe,openListViewContentPanel:()=>Obe,privateRemoveBlocks:()=>iM,requestInspectorTab:()=>Mbe,resetZoomLevel:()=>Pbe,setBlockRemovalRules:()=>ybe,setInsertionPoint:()=>Ebe,setLastFocus:()=>xbe,setStyleOverride:()=>Sbe,setZoomLevel:()=>Ibe,showBlockInterface:()=>bbe,showViewportModal:()=>Lbe,startDragging:()=>wbe,stopDragging:()=>Cbe,stopEditingContentOnlySection:()=>Tbe,toggleBlockSpotlight:()=>Rbe});var Fj=l(R(),1),zj=l(Re(),1),jj=l(Xo(),1),Uj=l(N(),1),pbe=e=>Array.isArray(e)?e:[e],hbe=["inserterMediaCategories","blockInspectorAnimation","mediaSideload"];function nM(e,{stripExperimentalSettings:t=!1,reset:o=!1}={}){let r=e;Object.hasOwn(r,"__unstableIsPreviewMode")&&((0,zj.default)("__unstableIsPreviewMode argument in wp.data.dispatch('core/block-editor').updateSettings",{since:"6.8",alternative:"isPreviewMode"}),r={...r},r.isPreviewMode=r.__unstableIsPreviewMode,delete r.__unstableIsPreviewMode);let n=r;if(t&&Fj.Platform.OS==="web"){n={};for(let i in r)hbe.includes(i)||(n[i]=r[i])}return{type:"UPDATE_SETTINGS",settings:n,reset:o}}function gbe(){return{type:"HIDE_BLOCK_INTERFACE"}}function bbe(){return{type:"SHOW_BLOCK_INTERFACE"}}var iM=(e,t=!0,o=!1)=>({select:r,dispatch:n,registry:i})=>{if(!e||!e.length||(e=pbe(e),!r.canRemoveBlocks(e)))return;let a=!o&&r.getBlockRemovalRules();if(a){let u=function(h){let p=[],g=[...h];for(;g.length;){let{innerBlocks:b,...v}=g.shift();g.push(...b),p.push(v)}return p};var c=u;let d=e.map(r.getBlock),f=u(d),m;for(let h of a)if(m=h.callback(f),m){n(kbe(e,t,m));return}}t&&n.selectPreviousBlock(e[0],t),i.batch(()=>{n({type:"REMOVE_BLOCKS",clientIds:e}),n(Hj())})},Hj=()=>({select:e,dispatch:t})=>{if(e.getBlockCount()>0)return;let{__unstableHasCustomAppender:r}=e.getSettings();r||t.insertDefaultBlock()};function kbe(e,t,o){return{type:"DISPLAY_BLOCK_REMOVAL_PROMPT",clientIds:e,selectPrevious:t,message:o}}function vbe(){return{type:"CLEAR_BLOCK_REMOVAL_PROMPT"}}function ybe(e=!1){return{type:"SET_BLOCK_REMOVAL_RULES",rules:e}}function Sbe(e,t){return{type:"SET_STYLE_OVERRIDE",id:e,style:t}}function _be(e){return{type:"DELETE_STYLE_OVERRIDE",id:e}}function xbe(e=null){return{type:"LAST_FOCUS",lastFocus:e}}function wbe(){return{type:"START_DRAGGING"}}function Cbe(){return{type:"STOP_DRAGGING"}}function Bbe(e){return{type:"SET_BLOCK_EXPANDED_IN_LIST_VIEW",clientId:e}}function Ebe(e){return{type:"SET_INSERTION_POINT",value:e}}function sM(e){return{type:"EDIT_CONTENT_ONLY_SECTION",clientId:e}}function Tbe(){return{type:"EDIT_CONTENT_ONLY_SECTION"}}var Ibe=(e=100)=>({select:t,dispatch:o})=>{if(e!==100){let r=t.getBlockSelectionStart(),n=t.getSectionRootClientId();if(r){let i;if(n){let s=t.getBlockOrder(n);s?.includes(r)?i=r:i=t.getBlockParents(r).find(a=>s.includes(a))}else i=t.getBlockHierarchyRootClientId(r);i?o.selectBlock(i):o.clearSelectedBlock(),(0,jj.speak)((0,Uj.__)("You are currently in zoom-out mode."))}}o({type:"SET_ZOOM_LEVEL",zoom:e})};function Pbe(){return{type:"RESET_ZOOM_LEVEL"}}function Rbe(e,t){return{type:"TOGGLE_BLOCK_SPOTLIGHT",clientId:e,hasBlockSpotlight:t}}function Obe(){return{type:"OPEN_LIST_VIEW_CONTENT_PANEL"}}function Abe(){return{type:"CLOSE_LIST_VIEW_CONTENT_PANEL"}}function Lbe(e){return{type:"SHOW_VIEWPORT_MODAL",clientIds:e}}function Nbe(){return{type:"HIDE_VIEWPORT_MODAL"}}function Mbe(e,t={}){return{type:"REQUEST_INSPECTOR_TAB",tabName:e,options:t}}function Dbe(){return{type:"CLEAR_REQUESTED_INSPECTOR_TAB"}}var cM={};Ip(cM,{__unstableDeleteSelection:()=>ake,__unstableExpandSelection:()=>cke,__unstableIncrementListViewExpandRevision:()=>Hke,__unstableMarkAutomaticChange:()=>Eke,__unstableMarkLastChangeAsPersistent:()=>Cke,__unstableMarkNextChangeAsNotPersistent:()=>Bke,__unstableSaveReusableBlock:()=>wke,__unstableSetAllListViewPanelsOpen:()=>jke,__unstableSetEditorMode:()=>Tke,__unstableSetOpenListViewPanel:()=>zke,__unstableSetTemporarilyEditingAsBlocks:()=>Mke,__unstableSplitSelection:()=>lke,__unstableToggleListViewPanel:()=>Uke,clearSelectedBlock:()=>Zbe,duplicateBlocks:()=>Pke,enterFormattedText:()=>kke,exitFormattedText:()=>vke,flashBlock:()=>Ake,hideInsertionPoint:()=>nke,hoverBlock:()=>Gbe,insertAfterBlock:()=>Oke,insertBeforeBlock:()=>Rke,insertBlock:()=>oke,insertBlocks:()=>Jj,insertDefaultBlock:()=>Ske,mergeBlocks:()=>uke,moveBlockToPosition:()=>tke,moveBlocksDown:()=>Jbe,moveBlocksToPosition:()=>Qj,moveBlocksUp:()=>eke,multiSelect:()=>qbe,receiveBlocks:()=>zbe,registerInserterMediaCategory:()=>Dke,removeBlock:()=>dke,removeBlocks:()=>eU,replaceBlock:()=>Qbe,replaceBlocks:()=>Zj,replaceInnerBlocks:()=>fke,resetBlocks:()=>Vbe,resetSelection:()=>Fbe,selectBlock:()=>Hbe,selectNextBlock:()=>$be,selectPreviousBlock:()=>Wbe,selectionChange:()=>yke,setBlockEditingMode:()=>Vke,setBlockMovingClientId:()=>Ike,setBlockVisibility:()=>Nke,setHasControlledInnerBlocks:()=>Lke,setTemplateValidity:()=>ike,showInsertionPoint:()=>rke,startDraggingBlocks:()=>gke,startMultiSelect:()=>Kbe,startTyping:()=>pke,stopDraggingBlocks:()=>bke,stopMultiSelect:()=>Ybe,stopTyping:()=>hke,synchronizeTemplate:()=>ske,toggleBlockHighlight:()=>lM,toggleBlockMode:()=>mke,toggleSelection:()=>Xbe,unsetBlockEditingMode:()=>Fke,updateBlock:()=>Ube,updateBlockAttributes:()=>jbe,updateBlockListSettings:()=>_ke,updateSettings:()=>xke,validateBlocksToTemplate:()=>qj});var be=l($(),1),Lw=l(Xo(),1),fu=l(N(),1),Kj=l(Un(),1),ft=l(dr(),1),mu=l(Re(),1),Yj=l(Zp(),1);var $j=l(dr(),1),wl="\x86";function Lv(e){if(e)return Object.keys(e).find(t=>{let o=e[t];return(typeof o=="string"||o instanceof $j.RichTextData)&&o.toString().indexOf(wl)!==-1})}function aM(e){for(let[t,o]of Object.entries(e.attributes))if(o.source==="rich-text"||o.source==="html")return t}var Xp=e=>Array.isArray(e)?e:[e],Vbe=e=>({dispatch:t})=>{t({type:"RESET_BLOCKS",blocks:e}),t(qj(e))},qj=e=>({select:t,dispatch:o})=>{let r=t.getTemplate(),n=t.getTemplateLock(),i=!r||n!=="all"||(0,be.doBlocksMatchTemplate)(e,r),s=t.isValidTemplate();if(i!==s)return o.setTemplateValidity(i),i};function Fbe(e,t,o){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:o}}function zbe(e){return(0,mu.default)('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function jbe(e,t,o={uniqueByBlock:!1}){return typeof o=="boolean"&&(o={uniqueByBlock:o}),{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Xp(e),attributes:t,options:o}}function Ube(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Hbe(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function Gbe(){return(0,mu.default)('wp.data.dispatch( "core/block-editor" ).hoverBlock',{since:"6.9",version:"7.1"}),{type:"DO_NOTHING"}}var Wbe=(e,t=!1)=>({select:o,dispatch:r})=>{let n=o.getPreviousBlockClientId(e);if(n)r.selectBlock(n,-1);else if(t){let i=o.getBlockRootClientId(e);if(i)r.selectBlock(i,-1);else{let s=o.getNextBlockClientId(e);s&&r.selectBlock(s,0)}}},$be=e=>({select:t,dispatch:o})=>{let r=t.getNextBlockClientId(e);r&&o.selectBlock(r)};function Kbe(){return{type:"START_MULTI_SELECT"}}function Ybe(){return{type:"STOP_MULTI_SELECT"}}var qbe=(e,t,o=0)=>({select:r,dispatch:n})=>{let i=r.getBlockRootClientId(e),s=r.getBlockRootClientId(t);if(i!==s)return;n({type:"MULTI_SELECT",start:e,end:t,initialPosition:o});let a=r.getSelectedBlockCount();(0,Lw.speak)((0,fu.sprintf)((0,fu._n)("%s block selected.","%s blocks selected.",a),a),"assertive")};function Zbe(){return{type:"CLEAR_SELECTED_BLOCK"}}function Xbe(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}var Zj=(e,t,o,r=0,n)=>({select:i,dispatch:s,registry:a})=>{e=Xp(e),t=Xp(t);let c=i.getBlockRootClientId(e[0]);for(let u=0;u<t.length;u++){let d=t[u];if(!i.canInsertBlockType(d.name,c))return}a.batch(()=>{s({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:o,initialPosition:r,meta:n}),s.ensureDefaultBlock()})};function Qbe(e,t){return Zj(e,t)}var Xj=e=>(t,o)=>({select:r,dispatch:n})=>{r.canMoveBlocks(t)&&n({type:e,clientIds:Xp(t),rootClientId:o})},Jbe=Xj("MOVE_BLOCKS_DOWN"),eke=Xj("MOVE_BLOCKS_UP"),Qj=(e,t="",o="",r)=>({select:n,dispatch:i})=>{n.canMoveBlocks(e)&&(t!==o&&(!n.canRemoveBlocks(e)||!n.canInsertBlocks(e,o))||i({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:o,clientIds:e,index:r}))};function tke(e,t="",o="",r){return Qj([e],t,o,r)}function oke(e,t,o,r,n,i){return Jj([e],t,o,r,n,i)}var Jj=(e,t,o,r=!0,n=0,i)=>({select:s,dispatch:a})=>{n!==null&&typeof n=="object"&&(i=n,n=0,(0,mu.default)("meta argument in wp.data.dispatch('core/block-editor')",{since:"5.8",hint:"The meta argument is now the 6th argument of the function"})),e=Xp(e);let c=[];for(let u of e)s.canInsertBlockType(u.name,o)&&c.push(u);c.length&&a({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:o,time:Date.now(),updateSelection:r,initialPosition:r?n:null,meta:i})};function rke(e,t,o={}){let{__unstableWithInserter:r,operation:n,nearestSide:i}=o;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:r,operation:n,nearestSide:i}}var nke=()=>({select:e,dispatch:t})=>{e.isBlockInsertionPointVisible()&&t({type:"HIDE_INSERTION_POINT"})};function ike(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}var ske=()=>({select:e,dispatch:t})=>{t({type:"SYNCHRONIZE_TEMPLATE"});let o=e.getBlocks(),r=e.getTemplate(),n=(0,be.synchronizeBlocksWithTemplate)(o,r);t.resetBlocks(n)},ake=e=>({registry:t,select:o,dispatch:r})=>{let n=o.getSelectionStart(),i=o.getSelectionEnd();if(n.clientId===i.clientId)return;if(!n.attributeKey||!i.attributeKey||typeof n.offset>"u"||typeof i.offset>"u")return!1;let s=o.getBlockRootClientId(n.clientId),a=o.getBlockRootClientId(i.clientId);if(s!==a)return;let c=o.getBlockOrder(s),u=c.indexOf(n.clientId),d=c.indexOf(i.clientId),f,m;u>d?(f=i,m=n):(f=n,m=i);let h=e?m:f,p=o.getBlock(h.clientId),g=(0,be.getBlockType)(p.name);if(!g.merge)return;let b=f,v=m,k=o.getBlock(b.clientId),y=o.getBlock(v.clientId),S=k.attributes[b.attributeKey],x=y.attributes[v.attributeKey],C=(0,ft.create)({html:S}),B=(0,ft.create)({html:x});C=(0,ft.remove)(C,b.offset,C.text.length),B=(0,ft.insert)(B,wl,0,v.offset);let I=(0,be.cloneBlock)(k,{[b.attributeKey]:(0,ft.toHTMLString)({value:C})}),P=(0,be.cloneBlock)(y,{[v.attributeKey]:(0,ft.toHTMLString)({value:B})}),E=e?I:P,L=k.name===y.name?[E]:(0,be.switchToBlockType)(E,g.name);if(!L||!L.length)return;let T;if(e){let se=L.pop();T=g.merge(se.attributes,P.attributes)}else{let se=L.shift();T=g.merge(I.attributes,se.attributes)}let O=Lv(T),D=T[O],U=(0,ft.create)({html:D}),G=U.text.indexOf(wl),j=(0,ft.remove)(U,G,G+1),z=(0,ft.toHTMLString)({value:j});T[O]=z;let W=o.getSelectedBlockClientIds(),ee=[...e?L:[],{...p,attributes:{...p.attributes,...T}},...e?[]:L];t.batch(()=>{r.selectionChange(p.clientId,O,G,G),r.replaceBlocks(W,ee,0,o.getSelectedBlocksInitialCaretPosition())})},lke=(e=[])=>({registry:t,select:o,dispatch:r})=>{let n=o.getSelectionStart(),i=o.getSelectionEnd(),s=o.getBlockRootClientId(n.clientId),a=o.getBlockRootClientId(i.clientId);if(s!==a)return;let c=o.getBlockOrder(s),u=c.indexOf(n.clientId),d=c.indexOf(i.clientId),f,m;u>d?(f=i,m=n):(f=n,m=i);let h=f,p=m,g=o.getBlock(h.clientId),b=o.getBlock(p.clientId),v=(0,be.getBlockType)(g.name),k=(0,be.getBlockType)(b.name),y=typeof h.attributeKey=="string"?h.attributeKey:aM(v),S=typeof p.attributeKey=="string"?p.attributeKey:aM(k),x=o.getBlockAttributes(h.clientId);if(x?.metadata?.bindings?.[y]){if(e.length){let{createWarningNotice:ie}=t.dispatch(Kj.store);ie((0,fu.__)("Blocks can't be inserted into other blocks with bindings"),{type:"snackbar"});return}r.insertAfterBlock(h.clientId);return}if(!y||!S||typeof n.offset>"u"||typeof i.offset>"u")return;if(h.clientId===p.clientId&&y===S&&h.offset===p.offset){if(e.length){if((0,be.isUnmodifiedDefaultBlock)(g,"content")){r.replaceBlocks([h.clientId],e,e.length-1,-1);return}}else if(!o.getBlockOrder(h.clientId).length){let ie=function(){let Q=(0,be.getDefaultBlockName)();return o.canInsertBlockType(Q,s)?(0,be.createBlock)(Q):(0,be.createBlock)(o.getBlockName(h.clientId))};var B=ie;let re=x[y].length;if(h.offset===0&&re){r.insertBlocks([ie()],o.getBlockIndex(h.clientId),s,!1);return}if(h.offset===re){r.insertBlocks([ie()],o.getBlockIndex(h.clientId)+1,s);return}}}let I=g.attributes[y],P=b.attributes[S],E=(0,ft.create)({html:I}),L=(0,ft.create)({html:P});E=(0,ft.remove)(E,h.offset,E.text.length),L=(0,ft.remove)(L,0,p.offset);let T={...g,innerBlocks:g.clientId===b.clientId?[]:g.innerBlocks,attributes:{...g.attributes,[y]:(0,ft.toHTMLString)({value:E})}},O={...b,clientId:g.clientId===b.clientId?(0,be.createBlock)(b.name).clientId:b.clientId,attributes:{...b.attributes,[S]:(0,ft.toHTMLString)({value:L})}},D=(0,be.getDefaultBlockName)();if(g.clientId===b.clientId&&D&&O.name!==D&&o.canInsertBlockType(D,s)){let ie=(0,be.switchToBlockType)(O,D);ie?.length===1&&(O=ie[0])}if(!e.length){r.replaceBlocks(o.getSelectedBlockClientIds(),[T,O]);return}let U,G=[],j=[...e],z=j.shift(),W=(0,be.getBlockType)(T.name),ee=W.merge&&z.name===W.name?[z]:(0,be.switchToBlockType)(z,W.name);if(ee?.length){let ie=ee.shift();T={...T,attributes:{...T.attributes,...W.merge(T.attributes,ie.attributes)}},G.push(T),U={clientId:T.clientId,attributeKey:y,offset:(0,ft.create)({html:T.attributes[y]}).text.length},j.unshift(...ee)}else(0,be.isUnmodifiedBlock)(T)||G.push(T),G.push(z);let se=j.pop(),ce=(0,be.getBlockType)(O.name);if(j.length&&G.push(...j),se){let ie=ce.merge&&ce.name===se.name?[se]:(0,be.switchToBlockType)(se,ce.name);if(ie?.length){let re=ie.pop();G.push({...O,attributes:{...O.attributes,...ce.merge(re.attributes,O.attributes)}}),G.push(...ie),U={clientId:O.clientId,attributeKey:S,offset:(0,ft.create)({html:re.attributes[S]}).text.length}}else G.push(se),(0,be.isUnmodifiedBlock)(O)||G.push(O)}else(0,be.isUnmodifiedBlock)(O)||G.push(O);t.batch(()=>{r.replaceBlocks(o.getSelectedBlockClientIds(),G,G.length-1,0),U&&r.selectionChange(U.clientId,U.attributeKey,U.offset,U.offset)})},cke=()=>({select:e,dispatch:t})=>{let o=e.getSelectionStart(),r=e.getSelectionEnd();t.selectionChange({start:{clientId:o.clientId},end:{clientId:r.clientId}})},uke=(e,t)=>({registry:o,select:r,dispatch:n})=>{let i=e,s=t,a=r.getBlock(i),c=(0,be.getBlockType)(a.name);if(!c||r.getBlockEditingMode(i)==="disabled"||r.getBlockEditingMode(s)==="disabled")return;let u=r.getBlock(s);if(!c.merge&&(0,be.getBlockSupport)(a.name,"__experimentalOnMerge")){let x=(0,be.switchToBlockType)(u,c.name);if(x?.length!==1){n.selectBlock(a.clientId);return}let[C]=x;if(C.innerBlocks.length<1){n.selectBlock(a.clientId);return}o.batch(()=>{n.insertBlocks(C.innerBlocks,void 0,i),n.removeBlock(s),n.selectBlock(C.innerBlocks[0].clientId);let B=r.getNextBlockClientId(i);if(B&&r.getBlockName(i)===r.getBlockName(B)){let I=r.getBlockAttributes(i),P=r.getBlockAttributes(B);Object.keys(I).every(E=>I[E]===P[E])&&(n.moveBlocksToPosition(r.getBlockOrder(B),B,i),n.removeBlock(B,!1))}});return}if((0,be.isUnmodifiedDefaultBlock)(a)){n.removeBlock(i,r.isBlockSelected(i));return}if((0,be.isUnmodifiedDefaultBlock)(u)){n.removeBlock(s,r.isBlockSelected(s));return}if(!c.merge){(0,be.isUnmodifiedBlock)(u,"content")?n.removeBlock(s,r.isBlockSelected(s)):n.selectBlock(a.clientId);return}let d=(0,be.getBlockType)(u.name),{clientId:f,attributeKey:m,offset:h}=r.getSelectionStart(),g=(f===i?c:d).attributes[m],b=(f===i||f===s)&&m!==void 0&&h!==void 0&&!!g;g||(typeof m=="number"?window.console.error(`RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was ${typeof m}`):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));let v=(0,be.cloneBlock)(a),k=(0,be.cloneBlock)(u);if(b){let x=f===i?v:k,C=x.attributes[m],B=(0,ft.insert)((0,ft.create)({html:C}),wl,h,h);x.attributes[m]=(0,ft.toHTMLString)({value:B})}let y=a.name===u.name?[k]:(0,be.switchToBlockType)(k,a.name);if(!y||!y.length)return;let S=c.merge(v.attributes,y[0].attributes);if(b){let x=Lv(S),C=S[x],B=(0,ft.create)({html:C}),I=B.text.indexOf(wl),P=(0,ft.remove)(B,I,I+1),E=(0,ft.toHTMLString)({value:P});S[x]=E,n.selectionChange(a.clientId,x,I,I)}n.replaceBlocks([a.clientId,u.clientId],[{...a,attributes:{...a.attributes,...S}},...y.slice(1)],0)},eU=(e,t=!0)=>iM(e,t);function dke(e,t){return eU([e],t)}function fke(e,t,o=!1,r=0){return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:o,initialPosition:o?r:null,time:Date.now()}}function mke(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function pke(){return{type:"START_TYPING"}}function hke(){return{type:"STOP_TYPING"}}function gke(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function bke(){return{type:"STOP_DRAGGING_BLOCKS"}}function kke(){return(0,mu.default)('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function vke(){return(0,mu.default)('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function yke(e,t,o,r){return typeof e=="string"?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:o,endOffset:r}:{type:"SELECTION_CHANGE",...e}}var Ske=(e,t,o)=>({dispatch:r})=>{let n=(0,be.getDefaultBlockName)();if(!n)return;let i=(0,be.createBlock)(n,e);return r.insertBlock(i,o,t)};function _ke(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function xke(e){return nM(e,{stripExperimentalSettings:!0})}function wke(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function Cke(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function Bke(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}var Eke=()=>({dispatch:e})=>{e({type:"MARK_AUTOMATIC_CHANGE"});let{requestIdleCallback:t=o=>setTimeout(o,100)}=window;t(()=>{e({type:"MARK_AUTOMATIC_CHANGE_FINAL"})})},Tke=e=>({registry:t})=>{t.dispatch(Yj.store).set("core","editorTool",e),e==="navigation"?(0,Lw.speak)((0,fu.__)("You are currently in Write mode.")):e==="edit"&&(0,Lw.speak)((0,fu.__)("You are currently in Design mode."))};function Ike(){return(0,mu.default)('wp.data.dispatch( "core/block-editor" ).setBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),{type:"DO_NOTHING"}}var Pke=(e,t=!0)=>({select:o,dispatch:r})=>{if(!e||!e.length)return;let n=o.getBlocksByClientId(e);if(n.some(d=>!d)||n.map(d=>d.name).some(d=>!(0,be.hasBlockSupport)(d,"multiple",!0)))return;let s=o.getBlockRootClientId(e[0]),a=Xp(e),c=o.getBlockIndex(a[a.length-1]),u=n.map(d=>(0,be.__experimentalCloneSanitizedBlock)(d));return r.insertBlocks(u,c+1,s,t),u.length>1&&t&&r.multiSelect(u[0].clientId,u[u.length-1].clientId),u.map(d=>d.clientId)},Rke=e=>({select:t,dispatch:o})=>{if(!e)return;let r=t.getBlockRootClientId(e),n=t.getBlockIndex(e),i=r?t.getDirectInsertBlock(r):null;if(!i)return o.insertDefaultBlock({},r,n);let s={};if(i.attributesToCopy){let c=t.getBlockAttributes(e);i.attributesToCopy.forEach(u=>{c[u]&&(s[u]=c[u])})}let a=(0,be.createBlock)(i.name,{...i.attributes,...s});return o.insertBlock(a,n,r)},Oke=e=>({select:t,dispatch:o})=>{if(!e)return;let r=t.getBlockRootClientId(e),n=t.getBlockIndex(e),i=r?t.getDirectInsertBlock(r):null;if(!i)return o.insertDefaultBlock({},r,n+1);let s={};if(i.attributesToCopy){let c=t.getBlockAttributes(e);i.attributesToCopy.forEach(u=>{c[u]&&(s[u]=c[u])})}let a=(0,be.createBlock)(i.name,{...i.attributes,...s});return o.insertBlock(a,n+1,r)};function lM(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}var Ake=(e,t=150)=>async({dispatch:o})=>{o(lM(e,!0)),await new Promise(r=>setTimeout(r,t)),o(lM(e,!1))};function Lke(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function Nke(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function Mke(e){return(0,mu.default)("wp.data.dispatch( 'core/block-editor' ).__unstableSetTemporarilyEditingAsBlocks",{since:"7.0"}),sM(e)}var Dke=e=>({select:t,dispatch:o})=>{if(!e||typeof e!="object"){console.error("Category should be an `InserterMediaCategory` object.");return}if(!e.name){console.error("Category should have a `name` that should be unique among all media categories.");return}if(!e.labels?.name){console.error("Category should have a `labels.name`.");return}if(!["image","audio","video"].includes(e.mediaType)){console.error("Category should have `mediaType` property that is one of `image|audio|video`.");return}if(!e.fetch||typeof e.fetch!="function"){console.error("Category should have a `fetch` function defined with the following signature `(InserterMediaRequest) => Promise<InserterMediaItem[]>`.");return}let r=t.getRegisteredInserterMediaCategories();if(r.some(({name:n})=>n===e.name)){console.error(`A category is already registered with the same name: "${e.name}".`);return}if(r.some(({labels:{name:n}={}})=>n===e.labels?.name)){console.error(`A category is already registered with the same labels.name: "${e.labels.name}".`);return}o({type:"REGISTER_INSERTER_MEDIA_CATEGORY",category:{...e,isExternalResource:!0}})};function Vke(e="",t){return{type:"SET_BLOCK_EDITING_MODE",clientId:e,mode:t}}function Fke(e=""){return{type:"UNSET_BLOCK_EDITING_MODE",clientId:e}}function zke(e){return{type:"SET_OPEN_LIST_VIEW_PANEL",clientId:e}}function jke(){return{type:"SET_ALL_LIST_VIEW_PANELS_OPEN"}}function Uke(e,t){return{type:"TOGGLE_LIST_VIEW_PANEL",clientId:e,isOpen:t}}function Hke(){return{type:"INCREMENT_LIST_VIEW_EXPAND_REVISION"}}var Qp={reducer:Q6,selectors:rM,actions:cM},_=(0,Nw.createReduxStore)(Kt,{...Qp,persist:["preferences"]}),tU=(0,Nw.registerStore)(Kt,{...Qp,persist:["preferences"]});M(tU).registerPrivateActions(Aw);M(tU).registerPrivateSelectors(Tw);M(_).registerPrivateActions(Aw);M(_).registerPrivateSelectors(Tw);var Jp=l(A(),1),oU=l(N(),1);var Ss=l(w(),1);function Gke({className:e,actions:t,children:o,secondaryActions:r}){return(0,Ss.jsx)("div",{style:{display:"contents",all:"initial"},children:(0,Ss.jsx)("div",{className:V(e,"block-editor-warning"),children:(0,Ss.jsxs)("div",{className:"block-editor-warning__contents",children:[(0,Ss.jsx)("p",{className:"block-editor-warning__message",children:o}),(t?.length>0||r)&&(0,Ss.jsxs)("div",{className:"block-editor-warning__actions",children:[t?.length>0&&t.map((n,i)=>(0,Ss.jsx)("span",{className:"block-editor-warning__action",children:n},i)),r&&(0,Ss.jsx)(Jp.DropdownMenu,{className:"block-editor-warning__secondary",icon:ks,label:(0,oU.__)("More options"),popoverProps:{placement:"bottom-end",className:"block-editor-warning__dropdown"},noIcons:!0,children:()=>(0,Ss.jsx)(Jp.MenuGroup,{children:r.map((n,i)=>(0,Ss.jsx)(Jp.MenuItem,{onClick:n.onClick,children:n.title},i))})})]})]})})})}var pu=Gke;var eh=l(w(),1);function iU({originalBlockClientId:e,name:t,onReplace:o}){let{selectBlock:r}=(0,nU.useDispatch)(_),n=(0,rU.getBlockType)(t);return(0,eh.jsxs)(pu,{actions:[(0,eh.jsx)(uM.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(e),children:(0,Mw.__)("Find original")},"find-original"),(0,eh.jsx)(uM.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>o([]),children:(0,Mw.__)("Remove")},"remove")],children:[(0,eh.jsxs)("strong",{children:[n?.title,": "]}),(0,Mw.__)("This block can only be used once.")]})}var Nv=l(w(),1);function Fw({mayDisplayControls:e,mayDisplayParentControls:t,mayDisplayPatternEditingControls:o,blockEditingMode:r,isPreviewMode:n,...i}){let{name:s,isSelected:a,clientId:c,attributes:u={},__unstableLayoutClassNames:d}=i,{layout:f=null,metadata:m={}}=u,{bindings:h}=m,p=(0,Dw.hasBlockSupport)(s,"layout",!1)||(0,Dw.hasBlockSupport)(s,"__experimentalLayout",!1),b=!!Ie()[Hk]||(0,Dw.hasBlockSupport)(s,"listView")||s==="core/navigation",{originalBlockClientId:v}=(0,Vw.useContext)(ur);return(0,Nv.jsxs)(f0,{value:(0,Vw.useMemo)(()=>({name:s,isSelected:a,clientId:c,layout:p?f:null,__unstableLayoutClassNames:d,[bs]:e,[Pp]:t,[$c]:o&&r!=="disabled",[u0]:r,[Rp]:h,[d0]:n,[Hk]:b}),[s,a,c,p,f,d,e,t,o,r,h,n,b]),children:[(0,Nv.jsx)(z6,{...i}),v&&(0,Nv.jsx)(iU,{originalBlockClientId:v,name:s,onReplace:i.onReplace})]})}function me(...e){let{clientId:t=null}=Ie();return(0,sU.useSelect)(o=>M(o(_)).getBlockSettings(t,...e),[t,...e])}function lU(e){(0,aU.default)("wp.blockEditor.useSetting",{since:"6.5",alternative:"wp.blockEditor.useSettings",note:"The new useSettings function can retrieve multiple settings at once, with better performance."});let[t]=me(e);return t}var jw=l(w(),1),{kebabCase:Wke}=M(uU.privateApis),cU=([e,...t])=>e.toUpperCase()+t.join(""),$ke=e=>(0,zf.createHigherOrderComponent)(t=>function(r){return(0,jw.jsx)(t,{...r,colors:e})},"withCustomColorPalette"),Kke=()=>(0,zf.createHigherOrderComponent)(e=>function(o){let[r,n,i]=me("color.palette.custom","color.palette.theme","color.palette.default"),s=(0,zw.useMemo)(()=>[...r||[],...n||[],...i||[]],[r,n,i]);return(0,jw.jsx)(e,{...o,colors:s})},"withEditorColorPalette");function dU(e,t){let o=e.reduce((r,n)=>({...r,...typeof n=="string"?{[n]:Wke(n)}:n}),{});return(0,zf.compose)([t,r=>class extends zw.Component{constructor(i){super(i),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(i){let{colors:s}=this.props;return P6(s,i)}createSetters(){return Object.keys(o).reduce((i,s)=>{let a=cU(s),c=`custom${a}`;return i[`set${a}`]=this.createSetColor(s,c),i},{})}createSetColor(i,s){return a=>{let c=p0(this.props.colors,a);this.props.setAttributes({[i]:c&&c.slug?c.slug:void 0,[s]:c&&c.slug?void 0:a})}}static getDerivedStateFromProps({attributes:i,colors:s},a){return Object.entries(o).reduce((c,[u,d])=>{let f=da(s,i[u],i[`custom${cU(u)}`]),m=a[u];return m?.color===f.color&&m?c[u]=m:c[u]={...f,class:_i(d,f.slug)},c},{})}render(){return(0,jw.jsx)(r,{...this.props,colors:void 0,...this.state,...this.setters,colorUtils:this.colorUtils})}}])}function fU(e){return(...t)=>{let o=$ke(e);return(0,zf.createHigherOrderComponent)(dU(t,o),"withCustomColors")}}function mU(...e){let t=Kke();return(0,zf.createHigherOrderComponent)(dU(e,t),"withColors")}var Uw=l(R(),1),Hw=l(F(),1);function th(e){if(e)return`has-${e}-gradient-background`}function Gw(e,t){let o=e?.find(r=>r.slug===t);return o&&o.gradient}function pU(e,t){return e?.find(r=>r.gradient===t)}function hU(e,t){let o=pU(e,t);return o&&o.slug}function Yke({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){let{clientId:o}=Ie(),[r,n,i]=me("color.gradients.custom","color.gradients.theme","color.gradients.default"),s=(0,Uw.useMemo)(()=>[...r||[],...n||[],...i||[]],[r,n,i]),{gradient:a,customGradient:c}=(0,Hw.useSelect)(h=>{let{getBlockAttributes:p}=h(_),g=p(o)||{};return{customGradient:g[t],gradient:g[e]}},[o,e,t]),{updateBlockAttributes:u}=(0,Hw.useDispatch)(_),d=(0,Uw.useCallback)(h=>{let p=hU(s,h);if(p){u(o,{[e]:p,[t]:void 0});return}u(o,{[e]:void 0,[t]:h})},[s,o,u]),f=th(a),m;return a?m=Gw(s,a):m=c,{gradientClass:f,gradientValue:m,setGradient:d}}var gU=l(A(),1);var{kebabCase:qke}=M(gU.privateApis),oh=(e,t,o)=>{if(t){let r=e?.find(({slug:n})=>n===t);if(r)return r}return{size:o}};function dM(e,t){let o=e?.find(({size:r})=>r===t);return o||{size:t}}function hu(e){if(e)return`has-${qke(e)}-font-size`}var Zke="1600px",Xke="320px",Qke=1,Jke=.25,eve=.75,tve="14px";function bU({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=Xke,maximumViewportWidth:n=Zke,scaleFactor:i=Qke,minimumFontSizeLimit:s}){if(s=gu(s)?s:tve,o){let y=gu(o);if(!y?.unit)return null;let S=gu(s,{coerceTo:y.unit});if(S?.value&&!e&&!t&&y?.value<=S?.value)return null;if(t||(t=`${y.value}${y.unit}`),!e){let x=y.unit==="px"?y.value:y.value*16,C=Math.min(Math.max(1-.075*Math.log2(x),Jke),eve),B=Mv(y.value*C,3);S?.value&&B<S?.value?e=`${S.value}${S.unit}`:e=`${B}${y.unit}`}}let a=gu(e),c=a?.unit||"rem",u=gu(t,{coerceTo:c});if(!a||!u)return null;let d=gu(e,{coerceTo:"rem"}),f=gu(n,{coerceTo:c}),m=gu(r,{coerceTo:c});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let p=Mv(m.value/100,3),g=Mv(p,3)+c,b=100*((u.value-a.value)/h),v=Mv((b||1)*i,3),k=`${d.value}${d.unit} + ((1vw - ${g}) * ${v})`;return`clamp(${e}, ${k}, ${t})`}function gu(e,t={}){if(typeof e!="string"&&typeof e!="number")return null;isFinite(e)&&(e=`${e}px`);let{coerceTo:o,rootSizeValue:r,acceptableUnits:n}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=n?.join("|"),s=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),a=e.match(s);if(!a||a.length<3)return null;let[,c,u]=a,d=parseFloat(c);return o==="px"&&(u==="em"||u==="rem")&&(d=d*r,u=o),u==="px"&&(o==="em"||o==="rem")&&(d=d/r,u=o),(o==="em"||o==="rem")&&(u==="em"||u==="rem")&&(u=o),{value:Mv(d,3),unit:u}}function Mv(e,t=3){let o=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*o)/o):void 0}var kU=l(A(),1);var vU=l(w(),1);function ove(e){let[t,o]=me("typography.fontSizes","typography.customFontSize");return(0,vU.jsx)(kU.FontSizePicker,{...e,fontSizes:t,disableCustomFontSizes:!o,__next40pxDefaultSize:!0})}var fM=ove;var Dv=l(Z(),1),SU=l(R(),1);var mM=l(w(),1),rve=[],yU=([e,...t])=>e.toUpperCase()+t.join(""),_U=(...e)=>{let t=e.reduce((o,r)=>(o[r]=`custom${yU(r)}`,o),{});return(0,Dv.createHigherOrderComponent)((0,Dv.compose)([(0,Dv.createHigherOrderComponent)(o=>function(n){let[i]=me("typography.fontSizes");return(0,mM.jsx)(o,{...n,fontSizes:i||rve})},"withFontSizes"),o=>class extends SU.Component{constructor(n){super(n),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(t).reduce((n,[i,s])=>{let a=yU(i);return n[`set${a}`]=this.createSetFontSize(i,s),n},{})}createSetFontSize(n,i){return s=>{let a=this.props.fontSizes?.find(({size:c})=>c===Number(s));this.props.setAttributes({[n]:a&&a.slug?a.slug:void 0,[i]:a&&a.slug?void 0:s})}}static getDerivedStateFromProps({attributes:n,fontSizes:i},s){let a=(u,d)=>s[d]?n[d]?n[d]!==s[d].slug:s[d].size!==n[u]:!0;if(!Object.values(t).some(a))return null;let c=Object.entries(t).filter(([u,d])=>a(d,u)).reduce((u,[d,f])=>{let m=n[d],h=oh(i,m,n[f]);return u[d]={...h,class:hu(m)},u},{});return{...s,...c}}render(){return(0,mM.jsx)(o,{...this.props,fontSizes:void 0,...this.state,...this.setters})}}]),"withFontSizes")};var bu=l(N(),1),Ww=l(A(),1);var xU=l(w(),1),nve=[{icon:Jc,title:(0,bu.__)("Align text left"),align:"left"},{icon:Sf,title:(0,bu.__)("Align text center"),align:"center"},{icon:eu,title:(0,bu.__)("Align text right"),align:"right"}],ive={placement:"bottom-start"};function sve({value:e,onChange:t,alignmentControls:o=nve,label:r=(0,bu.__)("Align text"),description:n=(0,bu.__)("Change text alignment"),isCollapsed:i=!0,isToolbar:s}){function a(m){return()=>t(e===m?void 0:m)}let c=o.find(m=>m.align===e);function u(){return c?c.icon:(0,bu.isRTL)()?eu:Jc}let d=s?Ww.ToolbarGroup:Ww.ToolbarDropdownMenu,f=s?{isCollapsed:i}:{toggleProps:{description:n},popoverProps:ive};return(0,xU.jsx)(d,{icon:u(),label:r,controls:o.map(m=>{let{align:h}=m;return{...m,isActive:e===h,role:i?"menuitemradio":void 0,onClick:a(h)}}),...f})}var pM=sve;var hM=l(w(),1),$w=e=>(0,hM.jsx)(pM,{...e,isToolbar:!1}),wU=e=>(0,hM.jsx)(pM,{...e,isToolbar:!0});var Jw=l(ut(),1),eC=l(A(),1),$U=l(R(),1),tC=l($(),1);var DU=l(F(),1),vu=l($(),1),yM=l(R(),1);var AU=l(TU(),1);var gM=function(e,t){return gM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,r){o.__proto__=r}||function(o,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(o[n]=r[n])},gM(e,t)};function IU(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");gM(e,t);function o(){this.constructor=e}e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}var Fo=function(){return Fo=Object.assign||function(t){for(var o,r=1,n=arguments.length;r<n;r++){o=arguments[r];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(t[i]=o[i])}return t},Fo.apply(this,arguments)};function PU(e){return e.toLowerCase()}var dve=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],fve=/[^A-Z0-9]+/gi;function OU(e,t){t===void 0&&(t={});for(var o=t.splitRegexp,r=o===void 0?dve:o,n=t.stripRegexp,i=n===void 0?fve:n,s=t.transform,a=s===void 0?PU:s,c=t.delimiter,u=c===void 0?" ":c,d=RU(RU(e,r,"$1\0$2"),i,"\0"),f=0,m=d.length;d.charAt(f)==="\0";)f++;for(;d.charAt(m-1)==="\0";)m--;return d.slice(f,m).split("\0").map(a).join(u)}function RU(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce(function(r,n){return r.replace(n,o)},e)}var mve=e=>e.name||"",pve=e=>e.title,hve=e=>e.description||"",gve=e=>e.keywords||[],bve=e=>e.category,kve=()=>null,vve=[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],yve=new RegExp("(\\p{C}|\\p{P}|\\p{S})+","giu"),bM=new Map,kM=new Map;function Yw(e=""){if(bM.has(e))return bM.get(e);let t=OU(e,{splitRegexp:vve,stripRegexp:yve}).split(" ").filter(Boolean);return bM.set(e,t),t}function Vv(e=""){if(kM.has(e))return kM.get(e);let t=(0,AU.default)(e);return t=t.replace(/^\//,""),t=t.toLowerCase(),kM.set(e,t),t}var Fv=(e="")=>Yw(Vv(e)),Sve=(e,t)=>e.filter(o=>!Fv(t).some(r=>r.includes(o))),qw=(e,t,o,r)=>Fv(r).length===0?e:zv(e,r,{getCategory:s=>t.find(({slug:a})=>a===s.category)?.title,getCollection:s=>o[s.name.split("/")[0]]?.title}),zv=(e=[],t="",o={})=>{if(Fv(t).length===0)return e;let n=e.map(i=>[i,_ve(i,t,o)]).filter(([,i])=>i>0);return n.sort(([,i],[,s])=>s-i),n.map(([i])=>i)};function _ve(e,t,o={}){let{getName:r=mve,getTitle:n=pve,getDescription:i=hve,getKeywords:s=gve,getCategory:a=bve,getCollection:c=kve}=o,u=r(e),d=n(e),f=i(e),m=s(e),h=a(e),p=c(e),g=Vv(t),b=Vv(d),v=0;if(g===b)v+=30;else if(b.startsWith(g))v+=20;else{let k=[u,d,f,...m,h,p].join(" "),y=Yw(g);Sve(y,k).length===0&&(v+=10)}if(v!==0&&u.startsWith("core/")){let k=u!==e.id;v+=k?1:2}return v}var pa=l($(),1),rh=l(F(),1),Zw=l(R(),1),LU=l(Un(),1),Xw=l(N(),1);var xve=(e,t,o)=>{let r=(0,Zw.useMemo)(()=>({[uu]:!!o}),[o]),[n]=(0,rh.useSelect)(d=>[d(_).getInserterItems(e,r)],[e,r]),{getClosestAllowedInsertionPoint:i}=M((0,rh.useSelect)(_)),{createErrorNotice:s}=(0,rh.useDispatch)(LU.store),[a,c]=(0,rh.useSelect)(d=>{let{getCategories:f,getCollections:m}=d(pa.store);return[f(),m()]},[]),u=(0,Zw.useCallback)(({name:d,initialAttributes:f,innerBlocks:m,syncStatus:h,content:p},g)=>{let b=i(d,e);if(b===null){let k=(0,pa.getBlockType)(d)?.title??d;s((0,Xw.sprintf)((0,Xw.__)(`Block "%s" can't be inserted.`),k),{type:"snackbar",id:"inserter-notice"});return}let v=h==="unsynced"?(0,pa.parse)(p,{__unstableSkipMigrationLogs:!0}):(0,pa.createBlock)(d,f,(0,pa.createBlocksFromInnerBlocksTemplate)(m));t(v,void 0,g,b)},[i,e,t,s]);return[n,a,c,u]},ku=xve;var NU=l(A(),1);var MU=l(R(),1),vM=l(w(),1);function wve({icon:e,showColors:t=!1,className:o,context:r}){e?.src==="block-default"&&(e={src:Jk});let n=(0,vM.jsx)(NU.Icon,{icon:e&&e.src?e.src:e,context:r}),i=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,vM.jsx)("span",{style:i,className:V("block-editor-block-icon",o,{"has-colors":t}),children:n})}var Ae=(0,MU.memo)(wve);var Qw=(e,t)=>(t&&e.sort(({id:o},{id:r})=>{let n=t.indexOf(o),i=t.indexOf(r);return n<0&&(n=t.length),i<0&&(i=t.length),n-i}),e);var nh=l(w(),1),Cve=()=>{},Bve=9;function Eve(){return{name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){let{rootClientId:t,selectedBlockId:o,prioritizedBlocks:r}=(0,DU.useSelect)(u=>{let{getSelectedBlockClientId:d,getBlock:f,getBlockListSettings:m,getBlockRootClientId:h}=u(_),{getActiveBlockVariation:p}=u(vu.store),g=d(),{name:b,attributes:v}=f(g),k=p(b,v),y=h(g);return{selectedBlockId:k?`${b}/${k.name}`:b,rootClientId:y,prioritizedBlocks:m(y)?.prioritizedInserterBlocks}},[]),[n,i,s]=ku(t,Cve,!0),a=(0,yM.useMemo)(()=>(e.trim()?qw(n,i,s,e):Qw(ma(n,"frecency","desc"),r)).filter(d=>d.id!==o).slice(0,Bve),[e,o,n,i,s,r]);return[(0,yM.useMemo)(()=>a.map(u=>{let{title:d,icon:f,isDisabled:m}=u;return{key:`block-${u.id}`,value:u,label:(0,nh.jsxs)(nh.Fragment,{children:[(0,nh.jsx)(Ae,{icon:f,showColors:!0},"icon"),d]}),isDisabled:m}}),[a])]},allowContext(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion(e){let{name:t,initialAttributes:o,innerBlocks:r,syncStatus:n,blocks:i}=e;return{action:"replace",value:n==="unsynced"?(i??[]).map(s=>(0,vu.cloneBlock)(s)):(0,vu.createBlock)(t,o,(0,vu.createBlocksFromInnerBlocksTemplate)(r))}}}}var VU=Eve();var UU=l(zU(),1),HU=l(dn(),1);var GU=l(SM(),1),jf=l(w(),1),Tve=10;function Ive(){return{name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await(0,UU.default)({path:(0,HU.addQueryArgs)("/wp/v2/search",{per_page:Tve,search:e,type:"post",order_by:"menu_order"})});return t=t.filter(o=>o.title!==""),t},getOptionKeywords(e){return[...e.title.split(/\s+/)]},getOptionLabel(e){return(0,jf.jsxs)(jf.Fragment,{children:[(0,jf.jsx)(we,{icon:e.subtype==="page"?kl:YL},"icon"),(0,GU.decodeEntities)(e.title)]})},getOptionCompletion(e){return(0,jf.jsx)("a",{href:e.url,children:e.title})}}}var WU=Ive();var KU=l(w(),1),Pve=[];function YU({completers:e=Pve}){let{name:t}=Ie();return(0,$U.useMemo)(()=>{let o=[...e,WU];return(t===(0,tC.getDefaultBlockName)()||(0,tC.getBlockSupport)(t,"__experimentalSlashInserter",!1))&&(o=[...o,VU]),(0,Jw.hasFilter)("editor.Autocomplete.completers")&&(o===e&&(o=o.map(r=>({...r}))),o=(0,Jw.applyFilters)("editor.Autocomplete.completers",o,t)),o},[e,t])}function qU(e){return(0,eC.__unstableUseAutocompleteProps)({...e,completers:YU(e)})}function Rve(e){return(0,KU.jsx)(eC.Autocomplete,{...e,completers:YU(e)})}var ZU=Rve;var BM=l(N(),1),xu=l(A(),1);var gH=l(F(),1);var aC=l(R(),1);var Pi=l(N(),1);var mn=l(A(),1);var ih=l(N(),1);var Hn={default:{name:"default",slug:"flow",className:"is-layout-flow",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},constrained:{name:"constrained",slug:"constrained",className:"is-layout-constrained",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > :where(:not(.alignleft):not(.alignright):not(.alignfull))",rules:{"max-width":"var(--wp--style--global--content-size)","margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > .alignwide",rules:{"max-width":"var(--wp--style--global--wide-size)"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},flex:{name:"flex",slug:"flex",className:"is-layout-flex",displayMode:"flex",baseStyles:[{selector:"",rules:{"flex-wrap":"wrap","align-items":"center"}},{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}};function Gn(e,t=""){return e.split(",").map(o=>`${o}${t?` ${t}`:""}`).join(",")}function yu(e,t=Hn,o,r){let n="";return t?.[o]?.spacingStyles?.length&&r&&t[o].spacingStyles.forEach(i=>{n+=`${Gn(e,i.selector.trim())} { `,n+=Object.entries(i.rules).map(([s,a])=>`${s}: ${a||r}`).join("; "),n+="; }"}),n}function oC(e){let{contentSize:t,wideSize:o,type:r="default"}=e,n={},i=/^(?!0)\d+(px|em|rem|vw|vh|%|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)?$/i;return i.test(t)&&r==="constrained"&&(n.none=(0,ih.sprintf)((0,ih.__)("Max %s wide"),t)),i.test(o)&&(n.wide=(0,ih.sprintf)((0,ih.__)("Max %s wide"),o)),n}var _s=l(N(),1);var XU=8,Su=["top","right","bottom","left"],QU={top:void 0,right:void 0,bottom:void 0,left:void 0},rC={custom:cw,axial:cw,horizontal:lN,vertical:fN,top:dN,right:uN,bottom:aN,left:cN},ha={default:(0,_s.__)("Spacing control"),top:(0,_s.__)("Top"),bottom:(0,_s.__)("Bottom"),left:(0,_s.__)("Left"),right:(0,_s.__)("Right"),mixed:(0,_s.__)("Mixed"),vertical:(0,_s.__)("Vertical"),horizontal:(0,_s.__)("Horizontal"),axial:(0,_s.__)("Horizontal & vertical"),custom:(0,_s.__)("Custom")},Cl={axial:"axial",top:"top",right:"right",bottom:"bottom",left:"left",custom:"custom"};function nC(e){return e?.includes?e==="0"||e.includes("var:preset|spacing|"):!1}function JU(e,t){if(!nC(e))return e;let o=Ove(e);return t.find(n=>String(n.slug)===o)?.size}function sh(e,t){if(!e||nC(e)||e==="0")return e;let o=t.find(r=>String(r.size)===String(e));return o?.slug?`var:preset|spacing|${o.slug}`:e}function jv(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function Ove(e){if(!e)return;if(e==="0"||e==="default")return e;let t=e.match(/var:preset\|spacing\|(.+)/);return t?t[1]:void 0}function _M(e,t){if(!e||!e.length)return!1;let o=e.includes("horizontal")||e.includes("left")&&e.includes("right"),r=e.includes("vertical")||e.includes("top")&&e.includes("bottom");return t==="horizontal"?o:t==="vertical"?r:o||r}function Ave(e=[]){let t={top:0,right:0,bottom:0,left:0};return e.forEach(o=>t[o]+=1),(t.top+t.bottom)%2===0&&(t.left+t.right)%2===0}function eH(e={},t){let{top:o,right:r,bottom:n,left:i}=e,s=[o,r,n,i].filter(Boolean),a=o===n&&i===r&&(!!o||!!i),c=!s.length&&Ave(t),u=t?.includes("horizontal")&&t?.includes("vertical")&&t?.length===2;if(_M(t)&&(a||c))return Cl.axial;if(u&&s.length===1){let d;return Object.entries(e).some(([f,m])=>(d=f,m!==void 0)),d}return t?.length===1&&!s.length?t[0]:Cl.custom}function Lve(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function mr(e,t="0"){let o=Lve(e);if(!o)return null;let r=jv(o?.top)||t,n=jv(o?.left)||t;return r===n?r:`${r} ${n}`}var oo=l(w(),1),Nve={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},tH={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},Mve={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},oH={horizontal:"center",vertical:"top"},Dve=["wrap","nowrap"],nH={name:"flex",label:(0,Pi.__)("Flex"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={}}){let{allowOrientation:n=!0,allowJustification:i=!0,allowWrap:s=!0}=r;return(0,oo.jsxs)(oo.Fragment,{children:[(0,oo.jsxs)(mn.Flex,{children:[i&&(0,oo.jsx)(mn.FlexItem,{children:(0,oo.jsx)(rH,{layout:t,onChange:o})}),n&&(0,oo.jsx)(mn.FlexItem,{children:(0,oo.jsx)(jve,{layout:t,onChange:o})})]}),s&&(0,oo.jsx)(zve,{layout:t,onChange:o})]})},toolBarControls:function({layout:t={},onChange:o,layoutBlockSupport:r}){let{allowVerticalAlignment:n=!0,allowJustification:i=!0}=r;return!i&&!n?null:(0,oo.jsxs)(Mt,{group:"block",__experimentalShareWithChildBlocks:!0,children:[i&&(0,oo.jsx)(rH,{layout:t,onChange:o,isToolbar:!0}),n&&(0,oo.jsx)(Vve,{layout:t,onChange:o})]})},getLayoutStyle:function({selector:t,layout:o,style:r,blockName:n,hasBlockGapSupport:i,globalBlockGapValue:s,layoutDefinitions:a=Hn}){let{orientation:c="horizontal"}=o,u="0.5em";if(s){let k=mr(s,"0.5em").split(" ");u=k.length>1?k[1]:k[0]}let d=r?.spacing?.blockGap&&!Ue(n,"spacing","blockGap")?mr(r?.spacing?.blockGap,u):void 0,f=Nve[o.justifyContent],m=Dve.includes(o.flexWrap)?o.flexWrap:"wrap",h=Mve[o.verticalAlignment],p=tH[o.justifyContent]||tH.left,g="",b=[];return m&&m!=="wrap"&&b.push(`flex-wrap: ${m}`),c==="horizontal"?(h&&b.push(`align-items: ${h}`),f&&b.push(`justify-content: ${f}`)):(h&&b.push(`justify-content: ${h}`),b.push("flex-direction: column"),b.push(`align-items: ${p}`)),b.length&&(g=`${Gn(t)} {
				${b.join("; ")};
			}`),i&&d&&(g+=yu(t,a,"flex",d)),g},getOrientation(e){let{orientation:t="horizontal"}=e;return t},getAlignments(){return[]}};function Vve({layout:e,onChange:t}){let{orientation:o="horizontal"}=e,r=o==="horizontal"?oH.horizontal:oH.vertical,{verticalAlignment:n=r}=e;return(0,oo.jsx)(iC,{onChange:s=>{t({...e,verticalAlignment:s})},value:n,controls:o==="horizontal"?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]})}var Fve={placement:"bottom-start"};function rH({layout:e,onChange:t,isToolbar:o=!1}){let{justifyContent:r="left",orientation:n="horizontal"}=e,i=c=>{t({...e,justifyContent:c})},s=["left","center","right"];if(n==="horizontal"?s.push("space-between"):s.push("stretch"),o)return(0,oo.jsx)(ah,{allowedControls:s,value:r,onChange:i,popoverProps:Fve});let a=[{value:"left",icon:ru,label:(0,Pi.__)("Justify items left")},{value:"center",icon:ou,label:(0,Pi.__)("Justify items center")},{value:"right",icon:nu,label:(0,Pi.__)("Justify items right")}];return n==="horizontal"?a.push({value:"space-between",icon:Fp,label:(0,Pi.__)("Space between items")}):a.push({value:"stretch",icon:zp,label:(0,Pi.__)("Stretch items")}),(0,oo.jsx)(mn.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Pi.__)("Justification"),value:r,onChange:i,className:"block-editor-hooks__flex-layout-justification-controls",children:a.map(({value:c,icon:u,label:d})=>(0,oo.jsx)(mn.__experimentalToggleGroupControlOptionIcon,{value:c,icon:u,label:d},c))})}function zve({layout:e,onChange:t}){let{flexWrap:o="wrap"}=e;return(0,oo.jsx)(mn.ToggleControl,{label:(0,Pi.__)("Allow to wrap to multiple lines"),onChange:r=>{t({...e,flexWrap:r?"wrap":"nowrap"})},checked:o==="wrap"})}function jve({layout:e,onChange:t}){let{orientation:o="horizontal",verticalAlignment:r,justifyContent:n}=e;return(0,oo.jsxs)(mn.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,Pi.__)("Orientation"),value:o,onChange:i=>{let s=r,a=n;return i==="horizontal"?(r==="space-between"&&(s="center"),n==="stretch"&&(a="left")):(r==="stretch"&&(s="top"),n==="space-between"&&(a="left")),t({...e,orientation:i,verticalAlignment:s,justifyContent:a})},children:[(0,oo.jsx)(mn.__experimentalToggleGroupControlOptionIcon,{icon:Qk,value:"horizontal",label:(0,Pi.__)("Horizontal")}),(0,oo.jsx)(mn.__experimentalToggleGroupControlOptionIcon,{icon:DO,value:"vertical",label:(0,Pi.__)("Vertical")})]})}var iH=l(N(),1);var sH={name:"default",label:(0,iH.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,style:o,blockName:r,hasBlockGapSupport:n,layoutDefinitions:i=Hn}){let s=mr(o?.spacing?.blockGap),a="";Ue(r,"spacing","blockGap")||(s?.top?a=mr(s?.top):typeof s=="string"&&(a=mr(s)));let c="";return n&&a&&(c+=yu(t,i,"default",a)),c},getOrientation(){return"vertical"},getAlignments(e,t){let o=oC(e);if(e.alignments!==void 0)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map(n=>({name:n,info:o[n]}));let r=[{name:"left"},{name:"center"},{name:"right"}];if(!t){let{contentSize:n,wideSize:i}=e;n&&r.unshift({name:"full"}),i&&r.unshift({name:"wide",info:o.wide})}return r.unshift({name:"none",info:o.none}),r}};var pn=l(A(),1),Bl=l(N(),1);var lH=l(Uv(),1);var Qo=l(w(),1),cH={name:"constrained",label:(0,Bl.__)("Constrained"),inspectorControls:function({layout:t,onChange:o,layoutBlockSupport:r={}}){let{wideSize:n,contentSize:i,justifyContent:s="center"}=t,{allowJustification:a=!0,allowCustomContentAndWideSize:c=!0}=r,u=h=>{o({...t,justifyContent:h})},d=[{value:"left",icon:ru,label:(0,Bl.__)("Justify items left")},{value:"center",icon:ou,label:(0,Bl.__)("Justify items center")},{value:"right",icon:nu,label:(0,Bl.__)("Justify items right")}],[f]=me("spacing.units"),m=(0,pn.__experimentalUseCustomUnits)({availableUnits:f||["%","px","em","rem","vw"]});return(0,Qo.jsxs)(pn.__experimentalVStack,{spacing:4,className:"block-editor-hooks__layout-constrained",children:[c&&(0,Qo.jsxs)(Qo.Fragment,{children:[(0,Qo.jsx)(pn.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Bl.__)("Content width"),labelPosition:"top",value:i||n||"",onChange:h=>{h=0>parseFloat(h)?"0":h,o({...t,contentSize:h!==""?h:void 0})},units:m,prefix:(0,Qo.jsx)(pn.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Qo.jsx)(we,{icon:_f})})}),(0,Qo.jsx)(pn.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Bl.__)("Wide width"),labelPosition:"top",value:n||i||"",onChange:h=>{h=0>parseFloat(h)?"0":h,o({...t,wideSize:h!==""?h:void 0})},units:m,prefix:(0,Qo.jsx)(pn.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Qo.jsx)(we,{icon:Lf})})}),(0,Qo.jsx)("p",{className:"block-editor-hooks__layout-constrained-helptext",children:(0,Bl.__)("Customize the width for all elements that are assigned to the center or wide columns.")})]}),a&&(0,Qo.jsx)(pn.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Bl.__)("Justification"),value:s,onChange:u,children:d.map(({value:h,icon:p,label:g})=>(0,Qo.jsx)(pn.__experimentalToggleGroupControlOptionIcon,{value:h,icon:p,label:g},h))})]})},toolBarControls:function({layout:t={},onChange:o,layoutBlockSupport:r}){let{allowJustification:n=!0}=r;return n?(0,Qo.jsx)(Mt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,Qo.jsx)(Hve,{layout:t,onChange:o})}):null},getLayoutStyle:function({selector:t,layout:o={},style:r,blockName:n,hasBlockGapSupport:i,layoutDefinitions:s=Hn}){let{contentSize:a,wideSize:c,justifyContent:u}=o,d=mr(r?.spacing?.blockGap),f="";Ue(n,"spacing","blockGap")||(d?.top?f=mr(d?.top):typeof d=="string"&&(f=mr(d)));let m=u==="left"?"0 !important":"auto !important",h=u==="right"?"0 !important":"auto !important",p=a||c?`
					${Gn(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {
						max-width: ${a??c};
						margin-left: ${m};
						margin-right: ${h};
					}
					${Gn(t,"> .alignwide")}  {
						max-width: ${c??a};
					}
					${Gn(t,"> .alignfull")} {
						max-width: none;
					}
				`:"";return u==="left"?p+=`${Gn(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}
			{ margin-left: ${m}; }`:u==="right"&&(p+=`${Gn(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}
			{ margin-right: ${h}; }`),r?.spacing?.padding&&(0,lH.getCSSRules)(r).forEach(b=>{if(b.key==="paddingRight"){let v=b.value==="0"?"0px":b.value;p+=`
					${Gn(t,"> .alignfull")} {
						margin-right: calc(${v} * -1);
					}
					`}else if(b.key==="paddingLeft"){let v=b.value==="0"?"0px":b.value;p+=`
					${Gn(t,"> .alignfull")} {
						margin-left: calc(${v} * -1);
					}
					`}}),i&&f&&(p+=yu(t,s,"constrained",f)),p},getOrientation(){return"vertical"},getAlignments(e){let t=oC(e);if(e.alignments!==void 0)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map(i=>({name:i,info:t[i]}));let{contentSize:o,wideSize:r}=e,n=[{name:"left"},{name:"center"},{name:"right"}];return o&&n.unshift({name:"full"}),r&&n.unshift({name:"wide",info:t.wide}),n.unshift({name:"none",info:t.none}),n}},Uve={placement:"bottom-start"};function Hve({layout:e,onChange:t}){let{justifyContent:o="center"}=e;return(0,Qo.jsx)(ah,{allowedControls:["left","center","right"],value:o,onChange:i=>{t({...e,justifyContent:i})},popoverProps:Uve})}var Fr=l(N(),1),nt=l(A(),1),sC=l(R(),1);var Ye=l(w(),1),Gve={px:600,"%":100,vw:100,vh:100,em:38,rem:38,svw:100,lvw:100,dvw:100,svh:100,lvh:100,dvh:100,vi:100,svi:100,lvi:100,dvi:100,vb:100,svb:100,lvb:100,dvb:100,vmin:100,svmin:100,lvmin:100,dvmin:100,vmax:100,svmax:100,lvmax:100,dvmax:100},Wve=[{value:"px",label:"px",default:0},{value:"rem",label:"rem",default:0},{value:"em",label:"em",default:0}],uH={name:"grid",label:(0,Fr.__)("Grid"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={}}){let{allowSizingOnChildren:n=!1}=r,i=!0,s=!t?.isManualPlacement||window.__experimentalEnableGridInteractivity;return(0,Ye.jsxs)(Ye.Fragment,{children:[window.__experimentalEnableGridInteractivity&&(0,Ye.jsx)(Yve,{layout:t,onChange:o}),(0,Ye.jsxs)(nt.__experimentalVStack,{spacing:4,children:[i&&(0,Ye.jsx)(Kve,{layout:t,onChange:o,allowSizingOnChildren:n}),s&&(0,Ye.jsx)($ve,{layout:t,onChange:o})]})]})},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,layout:o,style:r,blockName:n,hasBlockGapSupport:i,globalBlockGapValue:s,layoutDefinitions:a=Hn}){let{minimumColumnWidth:c=null,columnCount:u=null,rowCount:d=null}=o,f="1.2rem";if(s){let b=mr(s,"0.5em").split(" ");f=b.length>1?b[1]:b[0]}let m=r?.spacing?.blockGap&&!Ue(n,"spacing","blockGap")?mr(r?.spacing?.blockGap,f):void 0,h="",p=[];if(c&&u>0){let g=m||f;(g==="0"||g===0)&&(g="0px");let b=`max(min( ${c}, 100%), ( 100% - (${g}*${u-1}) ) / ${u})`;p.push(`grid-template-columns: repeat(auto-fill, minmax(${b}, 1fr))`,"container-type: inline-size"),d&&p.push(`grid-template-rows: repeat(${d}, minmax(1rem, auto))`)}else u?(p.push(`grid-template-columns: repeat(${u}, minmax(0, 1fr))`),d&&p.push(`grid-template-rows: repeat(${d}, minmax(1rem, auto))`)):p.push(`grid-template-columns: repeat(auto-fill, minmax(min(${c||"12rem"}, 100%), 1fr))`,"container-type: inline-size");return p.length&&(h=`${Gn(t)} { ${p.join("; ")}; }`),i&&m&&(h+=yu(t,a,"grid",m)),h},getOrientation(){return"horizontal"},getAlignments(){return[]}};function $ve({layout:e,onChange:t}){let{minimumColumnWidth:o,columnCount:r,isManualPlacement:n}=e,s=o||(n||r?null:"12rem"),[a,c="rem"]=(0,nt.__experimentalParseQuantityAndUnitFromRawValue)(s),u=f=>{t({...e,minimumColumnWidth:[f,c].join("")})},d=f=>{let m;["em","rem"].includes(f)&&c==="px"?m=(a/16).toFixed(2)+f:["em","rem"].includes(c)&&f==="px"&&(m=Math.round(a*16)+f),t({...e,minimumColumnWidth:m})};return(0,Ye.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-minimum-width-control",children:[(0,Ye.jsx)(nt.BaseControl.VisualLabel,{as:"legend",children:(0,Fr.__)("Min. column width")}),(0,Ye.jsxs)(nt.Flex,{gap:4,children:[(0,Ye.jsx)(nt.FlexItem,{isBlock:!0,children:(0,Ye.jsx)(nt.__experimentalUnitControl,{size:"__unstable-large",onChange:f=>{t({...e,minimumColumnWidth:f===""?void 0:f})},onUnitChange:d,value:s,units:Wve,min:0,label:(0,Fr.__)("Minimum column width"),hideLabelFromVision:!0})}),(0,Ye.jsx)(nt.FlexItem,{isBlock:!0,children:(0,Ye.jsx)(nt.RangeControl,{__next40pxDefaultSize:!0,onChange:u,value:a||0,min:0,max:Gve[c]||600,withInputField:!1,label:(0,Fr.__)("Minimum column width"),hideLabelFromVision:!0})})]}),(0,Ye.jsx)("p",{className:"components-base-control__help",children:(0,Fr.__)("Columns will wrap to fewer per row when they can no longer maintain the minimum width.")})]})}function Kve({layout:e,onChange:t,allowSizingOnChildren:o}){let{columnCount:n=void 0,rowCount:i,isManualPlacement:s}=e;return(0,Ye.jsx)(Ye.Fragment,{children:(0,Ye.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-columns-and-rows-controls",children:[!s&&(0,Ye.jsx)(nt.BaseControl.VisualLabel,{as:"legend",children:(0,Fr.__)("Max. columns")}),(0,Ye.jsxs)(nt.Flex,{gap:4,children:[(0,Ye.jsx)(nt.FlexItem,{isBlock:!0,children:(0,Ye.jsx)(nt.__experimentalNumberControl,{size:"__unstable-large",onChange:a=>{let u=a===""||a==="0"?s?1:void 0:parseInt(a,10);t({...e,columnCount:u})},value:n,min:1,label:(0,Fr.__)("Columns"),hideLabelFromVision:!s})}),(0,Ye.jsx)(nt.FlexItem,{isBlock:!0,children:o&&s?(0,Ye.jsx)(nt.__experimentalNumberControl,{size:"__unstable-large",onChange:a=>{let c=a===""||a==="0"?1:parseInt(a,10);t({...e,rowCount:c})},value:i,min:1,label:(0,Fr.__)("Rows")}):(0,Ye.jsx)(nt.RangeControl,{__next40pxDefaultSize:!0,value:n??1,onChange:a=>t({...e,columnCount:a===""||a==="0"?1:a}),min:1,max:16,withInputField:!1,label:(0,Fr.__)("Columns"),hideLabelFromVision:!0})})]})]})})}function Yve({layout:e,onChange:t}){let{columnCount:o,rowCount:r,minimumColumnWidth:n,isManualPlacement:i}=e,[s,a]=(0,sC.useState)(o||3),[c,u]=(0,sC.useState)(r),[d,f]=(0,sC.useState)(n||"12rem"),m=i?"manual":"auto",h=g=>{g==="manual"?f(n||"12rem"):(a(o||3),u(r)),t({...e,columnCount:s,rowCount:g==="manual"?c:void 0,isManualPlacement:g==="manual"?!0:void 0,minimumColumnWidth:g==="auto"?d:null})},p=m==="manual"?(0,Fr.__)("Grid items can be manually placed in any position on the grid."):(0,Fr.__)("Grid items are placed automatically depending on their order.");return(0,Ye.jsxs)(nt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Fr.__)("Grid item position"),value:m,onChange:h,isBlock:!0,help:p,children:[(0,Ye.jsx)(nt.__experimentalToggleGroupControlOption,{value:"auto",label:(0,Fr.__)("Auto")},"auto"),(0,Ye.jsx)(nt.__experimentalToggleGroupControlOption,{value:"manual",label:(0,Fr.__)("Manual")},"manual")]})}var dH=[sH,nH,cH,uH];function xs(e="default"){return dH.find(t=>t.name===e)}function fH(){return dH}var xM=l(w(),1),wM={type:"default"},CM=(0,aC.createContext)(wM);CM.displayName="BlockLayoutContext";var mH=CM.Provider;function Uf(){return(0,aC.useContext)(CM)}function pH({layout:e={},css:t,...o}){let r=xs(e.type),[n]=me("spacing.blockGap"),i=n!==null;if(r){if(t)return(0,xM.jsx)("style",{children:t});let s=r.getLayoutStyle?.({hasBlockGapSupport:i,layout:e,...o});if(s)return(0,xM.jsx)("style",{children:s})}return null}var lC=[],hH=["none","left","center","right","wide","full"],qve=["wide","full"];function Hv(e=hH){e.includes("none")||(e=["none",...e]);let t=e.length===1&&e[0]==="none",[o,r,n]=(0,gH.useSelect)(c=>{if(t)return[!1,!1,!1];let u=c(_).getSettings();return[u.alignWide??!1,u.supportsLayout,u.__unstableIsBlockBasedTheme]},[t]),i=Uf();if(t)return lC;let s=xs(i?.type);if(r){let u=s.getAlignments(i,n).filter(d=>e.includes(d.name));return u.length===1&&u[0].name==="none"?lC:u}if(s.name!=="default"&&s.name!=="constrained")return lC;let a=e.filter(c=>i.alignments?i.alignments.includes(c):!o&&qve.includes(c)?!1:hH.includes(c)).map(c=>({name:c}));return a.length===1&&a[0].name==="none"?lC:a}var _u=l(N(),1);var Gv={none:{icon:_f,title:(0,_u._x)("None","Alignment option")},left:{icon:zL,title:(0,_u.__)("Align left")},center:{icon:VL,title:(0,_u.__)("Align center")},right:{icon:UL,title:(0,_u.__)("Align right")},wide:{icon:Lf,title:(0,_u.__)("Wide width")},full:{icon:_v,title:(0,_u.__)("Full width")}},bH="none";var Hf=l(w(),1);function Zve({value:e,onChange:t,controls:o,isToolbar:r,isCollapsed:n=!0}){let i=Hv(o);if(!!!i.length)return null;function a(h){t([e,"none"].includes(h)?void 0:h)}let c=Gv[e],u=Gv[bH],d=r?xu.ToolbarGroup:xu.ToolbarDropdownMenu,f={icon:c?c.icon:u.icon,label:(0,BM.__)("Align")},m=r?{isCollapsed:n,controls:i.map(({name:h})=>({...Gv[h],isActive:e===h||!e&&h==="none",role:n?"menuitemradio":void 0,onClick:()=>a(h)}))}:{toggleProps:{description:(0,BM.__)("Change alignment")},children:({onClose:h})=>(0,Hf.jsx)(Hf.Fragment,{children:(0,Hf.jsx)(xu.MenuGroup,{className:"block-editor-block-alignment-control__menu-group",children:i.map(({name:p,info:g})=>{let{icon:b,title:v}=Gv[p],k=p===e||!e&&p==="none";return(0,Hf.jsx)(xu.MenuItem,{icon:b,iconPosition:"left",className:V("components-dropdown-menu__menu-item",{"is-active":k}),isSelected:k,onClick:()=>{a(p),h()},role:"menuitemradio",info:g,children:v},p)})})})};return(0,Hf.jsx)(d,{...f,...m})}var EM=Zve;var TM=l(w(),1),cC=e=>(0,TM.jsx)(EM,{...e,isToolbar:!1}),kH=e=>(0,TM.jsx)(EM,{...e,isToolbar:!0});var xH=l(yf(),1),mC=l(N(),1),pC=l($(),1),Cs=l(A(),1),RM=l(F(),1),wH=l(R(),1),CH=l(Z(),1);var PM=l(yf(),1),vH=l($(),1),yH=l(A(),1),SH=l(F(),1),dC=l(R(),1),_H=l(Z(),1);var uC=l(F(),1);function IM(e){return!e||Object.keys(e).length===0}function El(e){let{clientId:t}=Ie(),o=e||t,{updateBlockAttributes:r}=(0,uC.useDispatch)(_),{getBlockAttributes:n}=(0,uC.useRegistry)().select(_);return{updateBlockBindings:a=>{let{metadata:{bindings:c,...u}={}}=n(o),d={...c};Object.entries(a).forEach(([m,h])=>{if(!h&&d[m]){delete d[m];return}d[m]=h});let f={...u,bindings:d};IM(f.bindings)&&delete f.bindings,r(o,{metadata:IM(f)?void 0:f})},removeAllBlockBindings:()=>{let{metadata:{bindings:a,...c}={}}=n(o);r(o,{metadata:IM(c)?void 0:c})}}}var ws=l(w(),1),{Menu:wu}=M(yH.privateApis);function Xve({args:e,attribute:t,field:o,source:r,sourceKey:n}){let i=(0,dC.useMemo)(()=>({source:n,args:o.args||{key:o.key}}),[o.args,o.key,n]),s=(0,dC.useContext)(xr),a=(0,SH.useSelect)(u=>r.getValues({select:u,context:s,bindings:{[t]:i}}),[t,s,i,r]),{updateBlockBindings:c}=El();return(0,ws.jsxs)(wu.CheckboxItem,{onChange:()=>{let u=(0,PM.default)(e,o.args)??o.key===e?.key;c(u?{[t]:void 0}:{[t]:i})},name:t+"-binding",value:a[t],checked:(0,PM.default)(e,o.args)??o.key===e?.key,children:[(0,ws.jsx)(wu.ItemLabel,{children:o.label}),(0,ws.jsx)(wu.ItemHelpText,{children:a[t]})]})}function Wv({args:e,attribute:t,sourceKey:o,fields:r}){let n=(0,_H.useViewportMatch)("medium","<");if(!r||r.length===0)return null;let i=(0,vH.getBlockBindingsSource)(o);return(0,ws.jsxs)(wu,{placement:n?"bottom-start":"left-start",children:[(0,ws.jsx)(wu.SubmenuTriggerItem,{children:(0,ws.jsx)(wu.ItemLabel,{children:i.label})}),(0,ws.jsx)(wu.Popover,{gutter:8,children:(0,ws.jsx)(wu.Group,{children:r.map(s=>(0,ws.jsx)(Xve,{args:e,attribute:t,field:s,source:i,sourceKey:o},o+JSON.stringify(s.args)||s.key))})})]},o)}var Ri=l(w(),1),{Menu:fC}=M(Cs.privateApis);function $v({attribute:e,binding:t,blockName:o}){let{updateBlockBindings:r}=El(),n=(0,CH.useViewportMatch)("medium","<"),i=(0,wH.useContext)(xr),s=(0,RM.useSelect)(g=>{let{getAllBlockBindingsSources:b,getBlockBindingsSourceFieldsList:v,getBlockType:k}=M(g(pC.store)),y=k(o).attributes?.[e];if(y?.enum)return{};let S=y?.type==="rich-text"?"string":y?.type,x={};return Object.entries(b()).forEach(([C,B])=>{let I=v(B,i);if(!I?.length)return;let P=I.filter(E=>E.type===S);P.length&&(x[C]=P)}),x},[e,o,i]),{canUpdateBlockBindings:a}=(0,RM.useSelect)(g=>({canUpdateBlockBindings:g(_).getSettings().canUpdateBlockBindings})),c=Object.keys(s).length>0,u=!a||!c,{source:d,args:f}=t||{},m=(0,pC.getBlockBindingsSource)(d),h,p=!0;return t===void 0?(c?h=(0,mC.__)("Not connected"):h=(0,mC.__)("No sources available"),p=!0):m?h=s?.[d]?.find(g=>(0,xH.default)(g.args,f))?.label||m?.label||d:(p=!1,h=(0,mC.__)("Source not registered")),(0,Ri.jsx)(Cs.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:e,onDeselect:!!c&&(()=>{r({[e]:void 0})}),children:(0,Ri.jsxs)(fC,{placement:n?"bottom-start":"left-start",children:[(0,Ri.jsx)(fC.TriggerButton,{render:(0,Ri.jsx)(Cs.__experimentalItem,{}),disabled:!c,children:(0,Ri.jsxs)(Cs.__experimentalVStack,{className:"block-editor-bindings__item",spacing:0,children:[(0,Ri.jsx)(Cs.__experimentalText,{truncate:!0,children:e}),(0,Ri.jsx)(Cs.__experimentalText,{truncate:!0,variant:p?"muted":void 0,isDestructive:!p,children:h})]})}),!u&&(0,Ri.jsx)(fC.Popover,{gutter:n?8:36,children:(0,Ri.jsx)(fC,{placement:n?"bottom-start":"left-start",children:Object.entries(s).map(([g,b])=>(0,Ri.jsx)(Wv,{args:t?.args,attribute:e,sourceKey:g,fields:b},g))})})]})})}var BH=l(N(),1),EH=l(A(),1);var TH=l(w(),1);function Qve({isActive:e,label:t=(0,BH.__)("Full height"),onToggle:o,isDisabled:r}){return(0,TH.jsx)(EH.ToolbarButton,{isActive:e,icon:NA,label:t,onClick:()=>o(!e),disabled:r})}var IH=Qve;var RH=l(N(),1),OH=l(it(),1),Gf=l(A(),1),Kv=l(w(),1),Jve=()=>{};function eye(e){let{label:t=(0,RH.__)("Change matrix alignment"),onChange:o=Jve,value:r="center",isDisabled:n}=e,i=(0,Kv.jsx)(Gf.AlignmentMatrixControl.Icon,{value:r});return(0,Kv.jsx)(Gf.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:s,isOpen:a})=>(0,Kv.jsx)(Gf.ToolbarButton,{onClick:s,"aria-haspopup":"true","aria-expanded":a,onKeyDown:u=>{!a&&u.keyCode===OH.DOWN&&(u.preventDefault(),s())},label:t,icon:i,showTooltip:!0,disabled:n}),renderContent:()=>(0,Kv.jsx)(Gf.AlignmentMatrixControl,{onChange:o,value:r})})}var AH=eye;var LM=l(A(),1),bC=l(F(),1),kC=l(N(),1);var zH=l(R(),1);var LH=l(F(),1),hC=l($(),1);function zr({clientId:e,maximumLength:t,context:o}){let r=(0,LH.useSelect)(n=>{if(!e)return null;let{getBlockName:i,getBlockAttributes:s}=n(_),{getBlockType:a,getActiveBlockVariation:c}=n(hC.store),u=i(e),d=a(u);if(!d)return null;let f=s(e),m=(0,hC.__experimentalGetBlockLabel)(d,f,o);return m!==d.title?m:c(u,f)?.title||d.title},[e,o]);return r?t&&t>0&&r.length>t?r.slice(0,t-3)+"...":r:null}function Yv({clientId:e,maximumLength:t,context:o}){return zr({clientId:e,maximumLength:t,context:o})}var Wf=l(R(),1),DH=l(Z(),1);var gC=l(R(),1),OM=l(Z(),1),NH=l(w(),1),qv=(0,gC.createContext)({refsMap:(0,OM.observableMap)()});qv.displayName="BlockRefsContext";function MH({children:e}){let t=(0,gC.useMemo)(()=>({refsMap:(0,OM.observableMap)()}),[]);return(0,NH.jsx)(qv.Provider,{value:t,children:e})}function VH(e){let{refsMap:t}=(0,Wf.useContext)(qv);return(0,DH.useRefEffect)(o=>(t.set(e,o),()=>t.delete(e)),[e])}function AM(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function $f(e,t){let{refsMap:o}=(0,Wf.useContext)(qv);(0,Wf.useLayoutEffect)(()=>{AM(t,o.get(e));let r=o.subscribe(e,()=>AM(t,o.get(e)));return()=>{r(),AM(t,null)}},[o,e,t])}function Xe(e){let[t,o]=(0,Wf.useState)(null);return $f(e,o),t}function FH(e){if(!e)return null;let t=Array.from(document.querySelectorAll('iframe[name="editor-canvas"]').values()).find(o=>(o.contentDocument||o.contentWindow.document)===e.ownerDocument)??e;return t?.closest('[role="region"]')??t}var Wn=l(w(),1);function tye({rootLabelText:e}){let{selectBlock:t,clearSelectedBlock:o}=(0,bC.useDispatch)(_),{clientId:r,parents:n,hasSelection:i}=(0,bC.useSelect)(c=>{let{getSelectionStart:u,getSelectedBlockClientId:d,getEnabledBlockParents:f}=M(c(_)),m=d();return{parents:f(m),clientId:m,hasSelection:!!u().clientId}},[]),s=e||(0,kC._x)("Document","noun, breadcrumb"),a=(0,zH.useRef)();return $f(r,a),(0,Wn.jsxs)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,kC.__)("Block breadcrumb"),children:[(0,Wn.jsxs)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true",children:[i&&(0,Wn.jsx)(LM.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>{let c=a.current?.closest(".editor-styles-wrapper");o(),FH(c)?.focus()},children:s}),!i&&(0,Wn.jsx)("span",{children:s}),!!r&&(0,Wn.jsx)(we,{icon:tu,className:"block-editor-block-breadcrumb__separator"})]}),n.map(c=>(0,Wn.jsxs)("li",{children:[(0,Wn.jsx)(LM.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>t(c),children:(0,Wn.jsx)(Yv,{clientId:c,maximumLength:35,context:"breadcrumb"})}),(0,Wn.jsx)(we,{icon:tu,className:"block-editor-block-breadcrumb__separator"})]},c)),!!r&&(0,Wn.jsx)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true",children:(0,Wn.jsx)(Yv,{clientId:r,maximumLength:35,context:"breadcrumb"})})]})}var jH=tye;var UH=l(F(),1);function HH(e){return(0,UH.useSelect)(t=>{let{__unstableHasActiveBlockOverlayActive:o}=t(_);return o(e)},[e])}var wT=l(Z(),1),QQ=l(R(),1),JQ=l(F(),1),eJ=l(A(),1);var Gi=l(F(),1),XB=l(Z(),1),td=l(R(),1),lq=l($(),1);var Nu=l(R(),1),He=l($(),1),p9=l(A(),1),c1=l(F(),1),u1=l(Z(),1),h9=l(Fe(),1);var Tl=l(N(),1),yC=l(A(),1),Kf=l(R(),1),ch=l($(),1),SC=l(F(),1);var QH=l(YH(),1),vC=l(N(),1),JH=l($(),1);var qH=l(A(),1),ZH=l(R(),1),XH=l(Fe(),1),ga=l(w(),1);function MM({title:e,rawContent:t,renderedContent:o,action:r,actionText:n,className:i}){return(0,ga.jsxs)("div",{className:i,children:[(0,ga.jsxs)("div",{className:"block-editor-block-compare__content",children:[(0,ga.jsx)("h2",{className:"block-editor-block-compare__heading",children:e}),(0,ga.jsx)("div",{className:"block-editor-block-compare__html",children:t}),(0,ga.jsx)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor",children:(0,ga.jsx)(ZH.RawHTML,{children:(0,XH.safeHTML)(o)})})]}),(0,ga.jsx)("div",{className:"block-editor-block-compare__action",children:(0,ga.jsx)(qH.Button,{__next40pxDefaultSize:!0,variant:"secondary",tabIndex:"0",onClick:r,children:n})})]})}var lh=l(w(),1);function aye({block:e,onKeep:t,onConvert:o,convertor:r,convertButtonText:n}){function i(u,d){return(0,QH.diffChars)(u,d).map((m,h)=>{let p=V({"block-editor-block-compare__added":m.added,"block-editor-block-compare__removed":m.removed});return(0,lh.jsx)("span",{className:p,children:m.value},h)})}function s(u){return(Array.isArray(u)?u:[u]).map(m=>(0,JH.getSaveContent)(m.name,m.attributes,m.innerBlocks)).join("")}let a=s(r(e)),c=i(e.originalContent,a);return(0,lh.jsxs)("div",{className:"block-editor-block-compare__wrapper",children:[(0,lh.jsx)(MM,{title:(0,vC.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,vC.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,lh.jsx)(MM,{title:(0,vC.__)("After Conversion"),className:"block-editor-block-compare__converted",action:o,actionText:n,rawContent:c,renderedContent:a})]})}var e8=aye;var Il=l(w(),1),t8=e=>(0,ch.rawHandler)({HTML:e.originalContent});function o8({clientId:e}){let{block:t,canInsertHTMLBlock:o,canInsertClassicBlock:r}=(0,SC.useSelect)(d=>{let{canInsertBlockType:f,getBlock:m,getBlockRootClientId:h}=d(_),p=h(e);return{block:m(e),canInsertHTMLBlock:f("core/html",p),canInsertClassicBlock:f("core/freeform",p)}},[e]),{replaceBlock:n}=(0,SC.useDispatch)(_),[i,s]=(0,Kf.useState)(!1),a=(0,Kf.useCallback)(()=>s(!1),[]),c=(0,Kf.useMemo)(()=>({toClassic(){let d=(0,ch.createBlock)("core/freeform",{content:t.originalContent});return n(t.clientId,d)},toHTML(){let d=(0,ch.createBlock)("core/html",{content:t.originalContent});return n(t.clientId,d)},toBlocks(){let d=t8(t);return n(t.clientId,d)},toRecoveredBlock(){let d=(0,ch.createBlock)(t.name,t.attributes,t.innerBlocks);return n(t.clientId,d)}}),[t,n]),u=(0,Kf.useMemo)(()=>[{title:(0,Tl._x)("Resolve","imperative verb"),onClick:()=>s(!0)},o&&{title:(0,Tl.__)("Convert to HTML"),onClick:c.toHTML},r&&{title:(0,Tl.__)("Convert to Classic Block"),onClick:c.toClassic}].filter(Boolean),[o,r,c]);return(0,Il.jsxs)(Il.Fragment,{children:[(0,Il.jsx)(pu,{actions:[(0,Il.jsx)(yC.Button,{__next40pxDefaultSize:!0,onClick:c.toRecoveredBlock,variant:"primary",children:(0,Tl.__)("Attempt recovery")},"recover")],secondaryActions:u,children:(0,Tl.__)("Block contains unexpected or invalid content.")}),i&&(0,Il.jsx)(yC.Modal,{title:(0,Tl.__)("Resolve Block"),onRequestClose:a,className:"block-editor-block-compare",children:(0,Il.jsx)(e8,{block:t,onKeep:c.toHTML,onConvert:c.toBlocks,convertor:t8,convertButtonText:(0,Tl.__)("Convert to Blocks")})})]})}var r8=l(N(),1);var n8=l(w(),1),lye=(0,n8.jsx)(pu,{className:"block-editor-block-list__block-crash-warning",children:(0,r8.__)("This block has encountered an error and cannot be previewed.")}),i8=()=>lye;var s8=l(R(),1),cye=class extends s8.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}},a8=cye;var B8=l(FM(),1),uh=l(R(),1),CC=l(F(),1),ba=l($(),1);var E8=l(w(),1);function yye({clientId:e}){let[t,o]=(0,uh.useState)(""),r=(0,CC.useSelect)(a=>a(_).getBlock(e),[e]),{updateBlock:n}=(0,CC.useDispatch)(_),i=(0,uh.useMemo)(()=>r?(0,ba.getBlockContent)(r):"",[r]),s=()=>{let a=(0,ba.getBlockType)(r.name);if(!a)return;let c=(0,ba.getBlockAttributes)(a,t,r.attributes),u=t||(0,ba.getSaveContent)(a,c),[d]=t?(0,ba.validateBlock)({...r,attributes:c,originalContent:u}):[!0];n(e,{attributes:c,originalContent:u,isValid:d}),t||o(u)};return(0,uh.useEffect)(()=>{o(i)},[i]),(0,E8.jsx)(B8.default,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:s,onChange:a=>o(a.target.value)})}var T8=yye;var d9=l(R(),1),a1=l(N(),1),f9=l($(),1),Ch=l(Z(),1),m9=l(Qv(),1);var jM=ey(),Se=e=>Jv(e,jM),UM=ey();Se.write=e=>Jv(e,UM);var BC=ey();Se.onStart=e=>Jv(e,BC);var HM=ey();Se.onFrame=e=>Jv(e,HM);var GM=ey();Se.onFinish=e=>Jv(e,GM);var dh=[];Se.setTimeout=(e,t)=>{let o=Se.now()+t,r=()=>{let i=dh.findIndex(s=>s.cancel==r);~i&&dh.splice(i,1),Bu-=~i?1:0},n={time:o,handler:e,cancel:r};return dh.splice(P8(o),0,n),Bu+=1,R8(),n};var P8=e=>~(~dh.findIndex(t=>t.time>e)||~dh.length);Se.cancel=e=>{BC.delete(e),HM.delete(e),GM.delete(e),jM.delete(e),UM.delete(e)};Se.sync=e=>{zM=!0,Se.batchedUpdates(e),zM=!1};Se.throttle=e=>{let t;function o(){try{e(...t)}finally{t=null}}function r(...n){t=n,Se.onStart(o)}return r.handler=e,r.cancel=()=>{BC.delete(o),t=null},r};var WM=typeof window<"u"?window.requestAnimationFrame:()=>{};Se.use=e=>WM=e;Se.now=typeof performance<"u"?()=>performance.now():Date.now;Se.batchedUpdates=e=>e();Se.catch=console.error;Se.frameLoop="always";Se.advance=()=>{Se.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):A8()};var Cu=-1,Bu=0,zM=!1;function Jv(e,t){zM?(t.delete(e),e(0)):(t.add(e),R8())}function R8(){Cu<0&&(Cu=0,Se.frameLoop!=="demand"&&WM(O8))}function Sye(){Cu=-1}function O8(){~Cu&&(WM(O8),Se.batchedUpdates(A8))}function A8(){let e=Cu;Cu=Se.now();let t=P8(Cu);if(t&&(L8(dh.splice(0,t),o=>o.handler()),Bu-=t),!Bu){Sye();return}BC.flush(),jM.flush(e?Math.min(64,Cu-e):16.667),HM.flush(),UM.flush(),GM.flush()}function ey(){let e=new Set,t=e;return{add(o){Bu+=t==e&&!e.has(o)?1:0,e.add(o)},delete(o){return Bu-=t==e&&e.has(o)?1:0,e.delete(o)},flush(o){t.size&&(e=new Set,Bu-=t.size,L8(t,r=>r(o)&&e.add(r)),Bu+=e.size,t=e)}}}function L8(e,t){e.forEach(o=>{try{t(o)}catch(r){Se.catch(r)}})}var Ai=l(jr());function RC(){}var z8=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),ae={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 ka(e,t){if(ae.arr(e)){if(!ae.arr(t)||e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}return e===t}var bt=(e,t)=>e.forEach(t);function Li(e,t,o){if(ae.arr(e)){for(let r=0;r<e.length;r++)t.call(o,e[r],`${r}`);return}for(let r in e)e.hasOwnProperty(r)&&t.call(o,e[r],r)}var hn=e=>ae.und(e)?[]:ae.arr(e)?e:[e];function hh(e,t){if(e.size){let o=Array.from(e);e.clear(),bt(o,t)}}var gh=(e,...t)=>hh(e,o=>o(...t)),XM=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),QM,j8,Eu=null,U8=!1,JM=RC,_ye=e=>{e.to&&(j8=e.to),e.now&&(Se.now=e.now),e.colors!==void 0&&(Eu=e.colors),e.skipAnimation!=null&&(U8=e.skipAnimation),e.createStringInterpolator&&(QM=e.createStringInterpolator),e.requestAnimationFrame&&Se.use(e.requestAnimationFrame),e.batchedUpdates&&(Se.batchedUpdates=e.batchedUpdates),e.willAdvance&&(JM=e.willAdvance),e.frameLoop&&(Se.frameLoop=e.frameLoop)},$n=Object.freeze({__proto__:null,get createStringInterpolator(){return QM},get to(){return j8},get colors(){return Eu},get skipAnimation(){return U8},get willAdvance(){return JM},assign:_ye}),ty=new Set,Oi=[],$M=[],IC=0,bh={get idle(){return!ty.size&&!Oi.length},start(e){IC>e.priority?(ty.add(e),Se.onStart(xye)):(H8(e),Se(qM))},advance:qM,sort(e){if(IC)Se.onFrame(()=>bh.sort(e));else{let t=Oi.indexOf(e);~t&&(Oi.splice(t,1),G8(e))}},clear(){Oi=[],ty.clear()}};function xye(){ty.forEach(H8),ty.clear(),Se(qM)}function H8(e){Oi.includes(e)||G8(e)}function G8(e){Oi.splice(wye(Oi,t=>t.priority>e.priority),0,e)}function qM(e){let t=$M;for(let o=0;o<Oi.length;o++){let r=Oi[o];IC=r.priority,r.idle||(JM(r),r.advance(e),r.idle||t.push(r))}return IC=0,$M=Oi,$M.length=0,Oi=t,Oi.length>0}function wye(e,t){let o=e.findIndex(t);return o<0?e.length:o}var W8={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},Bs="[-+]?\\d*\\.?\\d+",PC=Bs+"%";function OC(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Cye=new RegExp("rgb"+OC(Bs,Bs,Bs)),Bye=new RegExp("rgba"+OC(Bs,Bs,Bs,Bs)),Eye=new RegExp("hsl"+OC(Bs,PC,PC)),Tye=new RegExp("hsla"+OC(Bs,PC,PC,Bs)),Iye=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Pye=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Rye=/^#([0-9a-fA-F]{6})$/,Oye=/^#([0-9a-fA-F]{8})$/;function Aye(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Rye.exec(e))?parseInt(t[1]+"ff",16)>>>0:Eu&&Eu[e]!==void 0?Eu[e]:(t=Cye.exec(e))?(fh(t[1])<<24|fh(t[2])<<16|fh(t[3])<<8|255)>>>0:(t=Bye.exec(e))?(fh(t[1])<<24|fh(t[2])<<16|fh(t[3])<<8|D8(t[4]))>>>0:(t=Iye.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Oye.exec(e))?parseInt(t[1],16)>>>0:(t=Pye.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Eye.exec(e))?(N8(M8(t[1]),EC(t[2]),EC(t[3]))|255)>>>0:(t=Tye.exec(e))?(N8(M8(t[1]),EC(t[2]),EC(t[3]))|D8(t[4]))>>>0:null}function KM(e,t,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+(t-e)*6*o:o<1/2?t:o<2/3?e+(t-e)*(2/3-o)*6:e}function N8(e,t,o){let r=o<.5?o*(1+t):o+t-o*t,n=2*o-r,i=KM(n,r,e+1/3),s=KM(n,r,e),a=KM(n,r,e-1/3);return Math.round(i*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function fh(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function M8(e){return(parseFloat(e)%360+360)%360/360}function D8(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function EC(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function V8(e){let t=Aye(e);if(t===null)return e;t=t||0;let o=(t&4278190080)>>>24,r=(t&16711680)>>>16,n=(t&65280)>>>8,i=(t&255)/255;return`rgba(${o}, ${r}, ${n}, ${i})`}var Tu=(e,t,o)=>{if(ae.fun(e))return e;if(ae.arr(e))return Tu({range:e,output:t,extrapolate:o});if(ae.str(e.output[0]))return QM(e);let r=e,n=r.output,i=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(u=>u);return u=>{let d=Nye(u,i);return Lye(u,i[d],i[d+1],n[d],n[d+1],c,s,a,r.map)}};function Lye(e,t,o,r,n,i,s,a,c){let u=c?c(e):e;if(u<t){if(s==="identity")return u;s==="clamp"&&(u=t)}if(u>o){if(a==="identity")return u;a==="clamp"&&(u=o)}return r===n?r:t===o?e<=t?r:n:(t===-1/0?u=-u:o===1/0?u=u-t:u=(u-t)/(o-t),u=i(u),r===-1/0?u=-u:n===1/0?u=u+r:u=u*(n-r)+r,u)}function Nye(e,t){for(var o=1;o<t.length-1&&!(t[o]>=e);++o);return o-1}function ZM(){return ZM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},ZM.apply(this,arguments)}var mh=Symbol.for("FluidValue.get"),Yf=Symbol.for("FluidValue.observers"),Ur=e=>!!(e&&e[mh]),pr=e=>e&&e[mh]?e[mh]():e,eD=e=>e[Yf]||null;function Mye(e,t){e.eventObserved?e.eventObserved(t):e(t)}function qf(e,t){let o=e[Yf];o&&o.forEach(r=>{Mye(r,t)})}var ph=class{constructor(t){if(this[mh]=void 0,this[Yf]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");Dye(this,t)}},Dye=(e,t)=>$8(e,mh,t);function Iu(e,t){if(e[mh]){let o=e[Yf];o||$8(e,Yf,o=new Set),o.has(t)||(o.add(t),e.observerAdded&&e.observerAdded(o.size,t))}return t}function Pu(e,t){let o=e[Yf];if(o&&o.has(t)){let r=o.size-1;r?o.delete(t):e[Yf]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var $8=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),TC=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Vye=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,F8=new RegExp(`(${TC.source})(%|[a-z]+)`,"i"),Fye=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,AC=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,K8=e=>{let[t,o]=zye(e);if(!t||XM())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(o&&o.startsWith("--")){let n=window.getComputedStyle(document.documentElement).getPropertyValue(o);return n||e}else{if(o&&AC.test(o))return K8(o);if(o)return o}return e},zye=e=>{let t=AC.exec(e);if(!t)return[,];let[,o,r]=t;return[o,r]},YM,jye=(e,t,o,r,n)=>`rgba(${Math.round(t)}, ${Math.round(o)}, ${Math.round(r)}, ${n})`,LC=e=>{YM||(YM=Eu?new RegExp(`(${Object.keys(Eu).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(i=>pr(i).replace(AC,K8).replace(Vye,V8).replace(YM,V8)),o=t.map(i=>i.match(TC).map(Number)),n=o[0].map((i,s)=>o.map(a=>{if(!(s in a))throw Error('The arity of each "output" value must be equal');return a[s]})).map(i=>Tu(ZM({},e,{output:i})));return i=>{var s;let a=!F8.test(t[0])&&((s=t.find(u=>F8.test(u)))==null?void 0:s.replace(TC,"")),c=0;return t[0].replace(TC,()=>`${n[c++](i)}${a||""}`).replace(Fye,jye)}},Y8="react-spring: ",q8=e=>{let t=e,o=!1;if(typeof t!="function")throw new TypeError(`${Y8}once requires a function parameter`);return(...r)=>{o||(t(...r),o=!0)}},Uye=q8(console.warn);function Z8(){Uye(`${Y8}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var Wze=q8(console.warn);function kh(e){return ae.str(e)&&(e[0]=="#"||/\d/.test(e)||!XM()&&AC.test(e)||e in(Eu||{}))}var oy=XM()?Ai.useEffect:Ai.useLayoutEffect,Hye=()=>{let e=(0,Ai.useRef)(!1);return oy(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function tD(){let e=(0,Ai.useState)()[1],t=Hye();return()=>{t.current&&e(Math.random())}}function X8(e,t){let[o]=(0,Ai.useState)(()=>({inputs:t,result:e()})),r=(0,Ai.useRef)(),n=r.current,i=n;return i?t&&i.inputs&&Gye(t,i.inputs)||(i={inputs:t,result:e()}):i=o,(0,Ai.useEffect)(()=>{r.current=i,n==o&&(o.inputs=o.result=void 0)},[i]),i.result}function Gye(e,t){if(e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}var oD=e=>(0,Ai.useEffect)(e,Wye),Wye=[];var fy=l(jr()),my=l(jr());var t7=l(jr()),Rl=l(jr()),ry=Symbol.for("Animated:node"),$ye=e=>!!e&&e[ry]===e,Es=e=>e&&e[ry],VC=(e,t)=>z8(e,ry,t),ny=e=>e&&e[ry]&&e[ry].getPayload(),NC=class{constructor(){this.payload=void 0,VC(this,this)}getPayload(){return this.payload||[]}},Zf=class e extends NC{constructor(t){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=t,ae.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new e(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,o){return ae.num(t)&&(this.lastPosition=t,o&&(t=Math.round(t/o)*o,this.done&&(this.lastPosition=t))),this._value===t?!1:(this._value=t,!0)}reset(){let{done:t}=this;this.done=!1,ae.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},Xf=class e extends Zf{constructor(t){super(0),this._string=null,this._toString=void 0,this._toString=Tu({output:[t,t]})}static create(t){return new e(t)}getValue(){let t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(ae.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=Tu({output:[this.getValue(),t]})),this._value=0,super.reset()}},MC={dependencies:null},Qf=class extends NC{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){let o={};return Li(this.source,(r,n)=>{$ye(r)?o[n]=r.getValue(t):Ur(r)?o[n]=pr(r):t||(o[n]=r)}),o}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&bt(this.payload,t=>t.reset())}_makePayload(t){if(t){let o=new Set;return Li(t,this._addToPayload,o),Array.from(o)}}_addToPayload(t){MC.dependencies&&Ur(t)&&MC.dependencies.add(t);let o=ny(t);o&&bt(o,r=>this.add(r))}},rD=class e extends Qf{constructor(t){super(t)}static create(t){return new e(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){let o=this.getPayload();return t.length==o.length?o.map((r,n)=>r.setValue(t[n])).some(Boolean):(super.setValue(t.map(Kye)),!0)}};function Kye(e){return(kh(e)?Xf:Zf).create(e)}function FC(e){let t=Es(e);return t?t.constructor:ae.arr(e)?rD:kh(e)?Xf:Zf}function DC(){return DC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},DC.apply(this,arguments)}var Q8=(e,t)=>{let o=!ae.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Rl.forwardRef)((r,n)=>{let i=(0,Rl.useRef)(null),s=o&&(0,Rl.useCallback)(p=>{i.current=qye(n,p)},[n]),[a,c]=Yye(r,t),u=tD(),d=()=>{let p=i.current;if(o&&!p)return;(p?t.applyAnimatedValues(p,a.getValue(!0)):!1)===!1&&u()},f=new nD(d,c),m=(0,Rl.useRef)();oy(()=>(m.current=f,bt(c,p=>Iu(p,f)),()=>{m.current&&(bt(m.current.deps,p=>Pu(p,m.current)),Se.cancel(m.current.update))})),(0,Rl.useEffect)(d,[]),oD(()=>()=>{let p=m.current;bt(p.deps,g=>Pu(g,p))});let h=t.getComponentProps(a.getValue());return t7.createElement(e,DC({},h,{ref:s}))})},nD=class{constructor(t,o){this.update=t,this.deps=o}eventObserved(t){t.type=="change"&&Se.write(this.update)}};function Yye(e,t){let o=new Set;return MC.dependencies=o,e.style&&(e=DC({},e,{style:t.createAnimatedStyle(e.style)})),e=new Qf(e),MC.dependencies=null,[e,o]}function qye(e,t){return e&&(ae.fun(e)?e(t):e.current=t),t}var J8=Symbol.for("AnimatedComponent"),o7=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:o=n=>new Qf(n),getComponentProps:r=n=>n}={})=>{let n={applyAnimatedValues:t,createAnimatedStyle:o,getComponentProps:r},i=s=>{let a=e7(s)||"Anonymous";return ae.str(s)?s=i[s]||(i[s]=Q8(s,n)):s=s[J8]||(s[J8]=Q8(s,n)),s.displayName=`Animated(${a})`,s};return Li(e,(s,a)=>{ae.arr(e)&&(a=e7(s)),i[a]=i(s)}),{animated:i}},e7=e=>ae.str(e)?e:e&&ae.str(e.displayName)?e.displayName:ae.fun(e)&&e.name||null;function Hr(){return Hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},Hr.apply(this,arguments)}function Jf(e,...t){return ae.fun(e)?e(...t):e}var ly=(e,t)=>e===!0||!!(t&&e&&(ae.fun(e)?e(t):hn(e).includes(t))),p7=(e,t)=>ae.obj(e)?t&&e[t]:e,h7=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,Zye=e=>e,g7=(e,t=Zye)=>{let o=Xye;e.default&&e.default!==!0&&(e=e.default,o=Object.keys(e));let r={};for(let n of o){let i=t(e[n],n);ae.und(i)||(r[n]=i)}return r},Xye=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Qye={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 Jye(e){let t={},o=0;if(Li(e,(r,n)=>{Qye[n]||(t[n]=r,o++)}),o)return t}function b7(e){let t=Jye(e);if(t){let o={to:t};return Li(e,(r,n)=>n in t||(o[n]=r)),o}return Hr({},e)}function cy(e){return e=pr(e),ae.arr(e)?e.map(cy):kh(e)?$n.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function aD(e){return ae.fun(e)||ae.arr(e)&&ae.obj(e[0])}var eSe={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}},UC=1.70158,zC=UC*1.525,r7=UC+1,n7=2*Math.PI/3,i7=2*Math.PI/4.5,jC=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,tSe={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=>r7*e*e*e-UC*e*e,easeOutBack:e=>1+r7*Math.pow(e-1,3)+UC*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((zC+1)*2*e-zC)/2:(Math.pow(2*e-2,2)*((zC+1)*(e*2-2)+zC)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*n7),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*n7)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*i7))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*i7)/2+1,easeInBounce:e=>1-jC(1-e),easeOutBounce:jC,easeInOutBounce:e=>e<.5?(1-jC(1-2*e))/2:(1+jC(2*e-1))/2},lD=Hr({},eSe.default,{mass:1,damping:1,easing:tSe.linear,clamp:!1}),cD=class{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,lD)}};function oSe(e,t,o){o&&(o=Hr({},o),s7(o,t),t=Hr({},o,t)),s7(e,t),Object.assign(e,t);for(let s in lD)e[s]==null&&(e[s]=lD[s]);let{mass:r,frequency:n,damping:i}=e;return ae.und(n)||(n<.01&&(n=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/n,2)*r,e.friction=4*Math.PI*i*r/n),e}function s7(e,t){if(!ae.und(t.decay))e.duration=void 0;else{let o=!ae.und(t.tension)||!ae.und(t.friction);(o||!ae.und(t.frequency)||!ae.und(t.damping)||!ae.und(t.mass))&&(e.duration=void 0,e.decay=void 0),o&&(e.frequency=void 0)}}var a7=[],uD=class{constructor(){this.changed=!1,this.values=a7,this.toValues=null,this.fromValues=a7,this.to=void 0,this.from=void 0,this.config=new cD,this.immediate=!1}};function k7(e,{key:t,props:o,defaultProps:r,state:n,actions:i}){return new Promise((s,a)=>{var c;let u,d,f=ly((c=o.cancel)!=null?c:r?.cancel,t);if(f)p();else{ae.und(o.pause)||(n.paused=ly(o.pause,t));let g=r?.pause;g!==!0&&(g=n.paused||ly(g,t)),u=Jf(o.delay||0,t),g?(n.resumeQueue.add(h),i.pause()):(i.resume(),h())}function m(){n.resumeQueue.add(h),n.timeouts.delete(d),d.cancel(),u=d.time-Se.now()}function h(){u>0&&!$n.skipAnimation?(n.delayed=!0,d=Se.setTimeout(p,u),n.pauseQueue.add(m),n.timeouts.add(d)):p()}function p(){n.delayed&&(n.delayed=!1),n.pauseQueue.delete(m),n.timeouts.delete(d),e<=(n.cancelId||0)&&(f=!0);try{i.start(Hr({},o,{callId:e,cancel:f}),s)}catch(g){a(g)}}})}var bD=(e,t)=>t.length==1?t[0]:t.some(o=>o.cancelled)?vh(e.get()):t.every(o=>o.noop)?v7(e.get()):Ts(e.get(),t.every(o=>o.finished)),v7=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Ts=(e,t,o=!1)=>({value:e,finished:t,cancelled:o}),vh=e=>({value:e,cancelled:!0,finished:!1});function y7(e,t,o,r){let{callId:n,parentId:i,onRest:s}=t,{asyncTo:a,promise:c}=o;return!i&&e===a&&!t.reset?c:o.promise=(async()=>{o.asyncId=n,o.asyncTo=e;let u=g7(t,(b,v)=>v==="onRest"?void 0:b),d,f,m=new Promise((b,v)=>(d=b,f=v)),h=b=>{let v=n<=(o.cancelId||0)&&vh(r)||n!==o.asyncId&&Ts(r,!1);if(v)throw b.result=v,f(b),b},p=(b,v)=>{let k=new HC,y=new GC;return(async()=>{if($n.skipAnimation)throw uy(o),y.result=Ts(r,!1),f(y),y;h(k);let S=ae.obj(b)?Hr({},b):Hr({},v,{to:b});S.parentId=n,Li(u,(C,B)=>{ae.und(S[B])&&(S[B]=C)});let x=await r.start(S);return h(k),o.paused&&await new Promise(C=>{o.resumeQueue.add(C)}),x})()},g;if($n.skipAnimation)return uy(o),Ts(r,!1);try{let b;ae.arr(e)?b=(async v=>{for(let k of v)await p(k)})(e):b=Promise.resolve(e(p,r.stop.bind(r))),await Promise.all([b.then(d),m]),g=Ts(r.get(),!0,!1)}catch(b){if(b instanceof HC)g=b.result;else if(b instanceof GC)g=b.result;else throw b}finally{n==o.asyncId&&(o.asyncId=i,o.asyncTo=i?a:void 0,o.promise=i?c:void 0)}return ae.fun(s)&&Se.batchedUpdates(()=>{s(g,r,r.item)}),g})()}function uy(e,t){hh(e.timeouts,o=>o.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var HC=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."),this.result=void 0}},GC=class extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}},dD=e=>e instanceof dy,rSe=1,dy=class extends ph{constructor(...t){super(...t),this.id=rSe++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(t){this._priority!=t&&(this._priority=t,this._onPriorityChange(t))}get(){let t=Es(this);return t&&t.getValue()}to(...t){return $n.to(this,t)}interpolate(...t){return Z8(),$n.to(this,t)}toJSON(){return this.get()}observerAdded(t){t==1&&this._attach()}observerRemoved(t){t==0&&this._detach()}_attach(){}_detach(){}_onChange(t,o=!1){qf(this,{type:"change",parent:this,value:t,idle:o})}_onPriorityChange(t){this.idle||bh.sort(this),qf(this,{type:"priority",parent:this,priority:t})}},em=Symbol.for("SpringPhase"),S7=1,fD=2,mD=4,iD=e=>(e[em]&S7)>0,Ru=e=>(e[em]&fD)>0,iy=e=>(e[em]&mD)>0,l7=(e,t)=>t?e[em]|=fD|S7:e[em]&=~fD,c7=(e,t)=>t?e[em]|=mD:e[em]&=~mD,pD=class extends dy{constructor(t,o){if(super(),this.key=void 0,this.animation=new uD,this.queue=void 0,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!ae.und(t)||!ae.und(o)){let r=ae.obj(t)?Hr({},t):Hr({},o,{from:t});ae.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(Ru(this)||this._state.asyncTo)||iy(this)}get goal(){return pr(this.animation.to)}get velocity(){let t=Es(this);return t instanceof Zf?t.lastVelocity||0:t.getPayload().map(o=>o.lastVelocity||0)}get hasAnimated(){return iD(this)}get isAnimating(){return Ru(this)}get isPaused(){return iy(this)}get isDelayed(){return this._state.delayed}advance(t){let o=!0,r=!1,n=this.animation,{config:i,toValues:s}=n,a=ny(n.to);!a&&Ur(n.to)&&(s=hn(pr(n.to))),n.values.forEach((d,f)=>{if(d.done)return;let m=d.constructor==Xf?1:a?a[f].lastPosition:s[f],h=n.immediate,p=m;if(!h){if(p=d.lastPosition,i.tension<=0){d.done=!0;return}let g=d.elapsedTime+=t,b=n.fromValues[f],v=d.v0!=null?d.v0:d.v0=ae.arr(i.velocity)?i.velocity[f]:i.velocity,k,y=i.precision||(b==m?.005:Math.min(1,Math.abs(m-b)*.001));if(ae.und(i.duration))if(i.decay){let S=i.decay===!0?.998:i.decay,x=Math.exp(-(1-S)*g);p=b+v/(1-S)*(1-x),h=Math.abs(d.lastPosition-p)<=y,k=v*x}else{k=d.lastVelocity==null?v:d.lastVelocity;let S=i.restVelocity||y/10,x=i.clamp?0:i.bounce,C=!ae.und(x),B=b==m?d.v0>0:b<m,I,P=!1,E=1,L=Math.ceil(t/E);for(let T=0;T<L&&(I=Math.abs(k)>S,!(!I&&(h=Math.abs(m-p)<=y,h)));++T){C&&(P=p==m||p>m==B,P&&(k=-k*x,p=m));let O=-i.tension*1e-6*(p-m),D=-i.friction*.001*k,U=(O+D)/i.mass;k=k+U*E,p=p+k*E}}else{let S=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,d.durationProgress>0&&(d.elapsedTime=i.duration*d.durationProgress,g=d.elapsedTime+=t)),S=(i.progress||0)+g/this._memoizedDuration,S=S>1?1:S<0?0:S,d.durationProgress=S),p=b+i.easing(S)*(m-b),k=(p-d.lastPosition)/t,h=S==1}d.lastVelocity=k,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),h=!0)}a&&!a[f].done&&(h=!1),h?d.done=!0:o=!1,d.setValue(p,i.round)&&(r=!0)});let c=Es(this),u=c.getValue();if(o){let d=pr(n.to);(u!==d||r)&&!i.decay?(c.setValue(d),this._onChange(d)):r&&i.decay&&this._onChange(u),this._stop()}else r&&this._onChange(u)}set(t){return Se.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Ru(this)){let{to:t,config:o}=this.animation;Se.batchedUpdates(()=>{this._onStart(),o.decay||this._set(t,!1),this._stop()})}return this}update(t){return(this.queue||(this.queue=[])).push(t),this}start(t,o){let r;return ae.und(t)?(r=this.queue||[],this.queue=[]):r=[ae.obj(t)?t:Hr({},o,{to:t})],Promise.all(r.map(n=>this._update(n))).then(n=>bD(this,n))}stop(t){let{to:o}=this.animation;return this._focus(this.get()),uy(this._state,t&&this._lastCallId),Se.batchedUpdates(()=>this._stop(o,t)),this}reset(){this._update({reset:!0})}eventObserved(t){t.type=="change"?this._start():t.type=="priority"&&(this.priority=t.priority+1)}_prepareNode(t){let o=this.key||"",{to:r,from:n}=t;r=ae.obj(r)?r[o]:r,(r==null||aD(r))&&(r=void 0),n=ae.obj(n)?n[o]:n,n==null&&(n=void 0);let i={to:r,from:n};return iD(this)||(t.reverse&&([r,n]=[n,r]),n=pr(n),ae.und(n)?Es(this)||this._set(r):this._set(n)),i}_update(t,o){let r=Hr({},t),{key:n,defaultProps:i}=this;r.default&&Object.assign(i,g7(r,(c,u)=>/^on/.test(u)?p7(c,n):c)),d7(this,r,"onProps"),ay(this,"onProps",r,this);let s=this._prepareNode(r);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 k7(++this._lastCallId,{key:n,props:r,defaultProps:i,state:a,actions:{pause:()=>{iy(this)||(c7(this,!0),gh(a.pauseQueue),ay(this,"onPause",Ts(this,sy(this,this.animation.to)),this))},resume:()=>{iy(this)&&(c7(this,!1),Ru(this)&&this._resume(),gh(a.resumeQueue),ay(this,"onResume",Ts(this,sy(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(c=>{if(r.loop&&c.finished&&!(o&&c.noop)){let u=_7(r);if(u)return this._update(u,!0)}return c})}_merge(t,o,r){if(o.cancel)return this.stop(!0),r(vh(this));let n=!ae.und(t.to),i=!ae.und(t.from);if(n||i)if(o.callId>this._lastToId)this._lastToId=o.callId;else return r(vh(this));let{key:s,defaultProps:a,animation:c}=this,{to:u,from:d}=c,{to:f=u,from:m=d}=t;i&&!n&&(!o.default||ae.und(f))&&(f=m),o.reverse&&([f,m]=[m,f]);let h=!ka(m,d);h&&(c.from=m),m=pr(m);let p=!ka(f,u);p&&this._focus(f);let g=aD(o.to),{config:b}=c,{decay:v,velocity:k}=b;(n||i)&&(b.velocity=0),o.config&&!g&&oSe(b,Jf(o.config,s),o.config!==a.config?Jf(a.config,s):void 0);let y=Es(this);if(!y||ae.und(f))return r(Ts(this,!0));let S=ae.und(o.reset)?i&&!o.default:!ae.und(m)&&ly(o.reset,s),x=S?m:this.get(),C=cy(f),B=ae.num(C)||ae.arr(C)||kh(C),I=!g&&(!B||ly(a.immediate||o.immediate,s));if(p){let T=FC(f);if(T!==y.constructor)if(I)y=this._set(C);else throw Error(`Cannot animate between ${y.constructor.name} and ${T.name}, as the "to" prop suggests`)}let P=y.constructor,E=Ur(f),L=!1;if(!E){let T=S||!iD(this)&&h;(p||T)&&(L=ka(cy(x),C),E=!L),(!ka(c.immediate,I)&&!I||!ka(b.decay,v)||!ka(b.velocity,k))&&(E=!0)}if(L&&Ru(this)&&(c.changed&&!S?E=!0:E||this._stop(u)),!g&&((E||Ur(u))&&(c.values=y.getPayload(),c.toValues=Ur(f)?null:P==Xf?[1]:hn(C)),c.immediate!=I&&(c.immediate=I,!I&&!S&&this._set(u)),E)){let{onRest:T}=c;bt(nSe,D=>d7(this,o,D));let O=Ts(this,sy(this,u));gh(this._pendingCalls,O),this._pendingCalls.add(r),c.changed&&Se.batchedUpdates(()=>{c.changed=!S,T?.(O,this),S?Jf(a.onRest,O):c.onStart==null||c.onStart(O,this)})}S&&this._set(x),g?r(y7(o.to,o,this._state,this)):E?this._start():Ru(this)&&!p?this._pendingCalls.add(r):r(v7(x))}_focus(t){let o=this.animation;t!==o.to&&(eD(this)&&this._detach(),o.to=t,eD(this)&&this._attach())}_attach(){let t=0,{to:o}=this.animation;Ur(o)&&(Iu(o,this),dD(o)&&(t=o.priority+1)),this.priority=t}_detach(){let{to:t}=this.animation;Ur(t)&&Pu(t,this)}_set(t,o=!0){let r=pr(t);if(!ae.und(r)){let n=Es(this);if(!n||!ka(r,n.getValue())){let i=FC(r);!n||n.constructor!=i?VC(this,i.create(r)):n.setValue(r),n&&Se.batchedUpdates(()=>{this._onChange(r,o)})}}return Es(this)}_onStart(){let t=this.animation;t.changed||(t.changed=!0,ay(this,"onStart",Ts(this,sy(this,t.to)),this))}_onChange(t,o){o||(this._onStart(),Jf(this.animation.onChange,t,this)),Jf(this.defaultProps.onChange,t,this),super._onChange(t,o)}_start(){let t=this.animation;Es(this).reset(pr(t.to)),t.immediate||(t.fromValues=t.values.map(o=>o.lastPosition)),Ru(this)||(l7(this,!0),iy(this)||this._resume())}_resume(){$n.skipAnimation?this.finish():bh.start(this)}_stop(t,o){if(Ru(this)){l7(this,!1);let r=this.animation;bt(r.values,i=>{i.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),qf(this,{type:"idle",parent:this});let n=o?vh(this.get()):Ts(this.get(),sy(this,t??r.to));gh(this._pendingCalls,n),r.changed&&(r.changed=!1,ay(this,"onRest",n,this))}}};function sy(e,t){let o=cy(t),r=cy(e.get());return ka(r,o)}function _7(e,t=e.loop,o=e.to){let r=Jf(t);if(r){let n=r!==!0&&b7(r),i=(n||e).reverse,s=!n||n.reset;return hD(Hr({},e,{loop:t,default:!1,pause:void 0,to:!i||aD(o)?o:void 0,from:s?e.from:void 0,reset:s},n))}}function hD(e){let{to:t,from:o}=e=b7(e),r=new Set;return ae.obj(t)&&u7(t,r),ae.obj(o)&&u7(o,r),e.keys=r.size?Array.from(r):null,e}function u7(e,t){Li(e,(o,r)=>o!=null&&t.add(r))}var nSe=["onStart","onRest","onChange","onPause","onResume"];function d7(e,t,o){e.animation[o]=t[o]!==h7(t,o)?p7(t[o],e.key):void 0}function ay(e,t,...o){var r,n,i,s;(r=(n=e.animation)[t])==null||r.call(n,...o),(i=(s=e.defaultProps)[t])==null||i.call(s,...o)}var iSe=["onStart","onChange","onRest"],sSe=1,WC=class{constructor(t,o){this.id=sSe++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),o&&(this._flush=o),t&&this.start(Hr({default:!0},t))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){let t={};return this.each((o,r)=>t[r]=o.get()),t}set(t){for(let o in t){let r=t[o];ae.und(r)||this.springs[o].set(r)}}update(t){return t&&this.queue.push(hD(t)),this}start(t){let{queue:o}=this;return t?o=hn(t).map(hD):this.queue=[],this._flush?this._flush(this,o):(w7(this,o),aSe(this,o))}stop(t,o){if(t!==!!t&&(o=t),o){let r=this.springs;bt(hn(o),n=>r[n].stop(!!t))}else uy(this._state,this._lastAsyncId),this.each(r=>r.stop(!!t));return this}pause(t){if(ae.und(t))this.start({pause:!0});else{let o=this.springs;bt(hn(t),r=>o[r].pause())}return this}resume(t){if(ae.und(t))this.start({pause:!1});else{let o=this.springs;bt(hn(t),r=>o[r].resume())}return this}each(t){Li(this.springs,t)}_onFrame(){let{onStart:t,onChange:o,onRest:r}=this._events,n=this._active.size>0,i=this._changed.size>0;(n&&!this._started||i&&!this._started)&&(this._started=!0,hh(t,([c,u])=>{u.value=this.get(),c(u,this,this._item)}));let s=!n&&this._started,a=i||s&&r.size?this.get():null;i&&o.size&&hh(o,([c,u])=>{u.value=a,c(u,this,this._item)}),s&&(this._started=!1,hh(r,([c,u])=>{u.value=a,c(u,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;Se.onFrame(this._onFrame)}};function aSe(e,t){return Promise.all(t.map(o=>x7(e,o))).then(o=>bD(e,o))}async function x7(e,t,o){let{keys:r,to:n,from:i,loop:s,onRest:a,onResolve:c}=t,u=ae.obj(t.default)&&t.default;s&&(t.loop=!1),n===!1&&(t.to=null),i===!1&&(t.from=null);let d=ae.arr(n)||ae.fun(n)?n:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):bt(iSe,g=>{let b=t[g];if(ae.fun(b)){let v=e._events[g];t[g]=({finished:k,cancelled:y})=>{let S=v.get(b);S?(k||(S.finished=!1),y&&(S.cancelled=!0)):v.set(b,{value:null,finished:k||!1,cancelled:y||!1})},u&&(u[g]=t[g])}});let f=e._state;t.pause===!f.paused?(f.paused=t.pause,gh(t.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(t.pause=!0);let m=(r||Object.keys(e.springs)).map(g=>e.springs[g].start(t)),h=t.cancel===!0||h7(t,"cancel")===!0;(d||h&&f.asyncId)&&m.push(k7(++e._lastAsyncId,{props:t,state:f,actions:{pause:RC,resume:RC,start(g,b){h?(uy(f,e._lastAsyncId),b(vh(e))):(g.onRest=a,b(y7(d,g,f,e)))}}})),f.paused&&await new Promise(g=>{f.resumeQueue.add(g)});let p=bD(e,await Promise.all(m));if(s&&p.finished&&!(o&&p.noop)){let g=_7(t,s,n);if(g)return w7(e,[g]),x7(e,g,!0)}return c&&Se.batchedUpdates(()=>c(p,e,e.item)),p}function lSe(e,t){let o=new pD;return o.key=e,t&&Iu(o,t),o}function cSe(e,t,o){t.keys&&bt(t.keys,r=>{(e[r]||(e[r]=o(r)))._prepareNode(t)})}function w7(e,t){bt(t,o=>{cSe(e.springs,o,r=>lSe(r,e))})}function uSe(e,t){if(e==null)return{};var o={},r=Object.keys(e),n,i;for(i=0;i<r.length;i++)n=r[i],!(t.indexOf(n)>=0)&&(o[n]=e[n]);return o}var dSe=["children"],kD=e=>{let{children:t}=e,o=uSe(e,dSe),r=(0,my.useContext)($C),n=o.pause||!!r.pause,i=o.immediate||!!r.immediate;o=X8(()=>({pause:n,immediate:i}),[n,i]);let{Provider:s}=$C;return fy.createElement(s,{value:o},t)},$C=fSe(kD,{});kD.Provider=$C.Provider;kD.Consumer=$C.Consumer;function fSe(e,t){return Object.assign(e,fy.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var f7;(function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"})(f7||(f7={}));var gD=class extends dy{constructor(t,o){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=Tu(...o);let r=this._get(),n=FC(r);VC(this,n.create(r))}advance(t){let o=this._get(),r=this.get();ka(o,r)||(Es(this).setValue(o),this._onChange(o,this.idle)),!this.idle&&m7(this._active)&&sD(this)}_get(){let t=ae.arr(this.source)?this.source.map(pr):hn(pr(this.source));return this.calc(...t)}_start(){this.idle&&!m7(this._active)&&(this.idle=!1,bt(ny(this),t=>{t.done=!1}),$n.skipAnimation?(Se.batchedUpdates(()=>this.advance()),sD(this)):bh.start(this))}_attach(){let t=1;bt(hn(this.source),o=>{Ur(o)&&Iu(o,this),dD(o)&&(o.idle||this._active.add(o),t=Math.max(t,o.priority+1))}),this.priority=t,this._start()}_detach(){bt(hn(this.source),t=>{Ur(t)&&Pu(t,this)}),this._active.clear(),sD(this)}eventObserved(t){t.type=="change"?t.idle?this.advance():(this._active.add(t.parent),this._start()):t.type=="idle"?this._active.delete(t.parent):t.type=="priority"&&(this.priority=hn(this.source).reduce((o,r)=>Math.max(o,(dD(r)?r.priority:0)+1),0))}};function mSe(e){return e.idle!==!1}function m7(e){return!e.size||Array.from(e).every(mSe)}function sD(e){e.idle||(e.idle=!0,bt(ny(e),t=>{t.done=!0}),qf(e,{type:"idle",parent:e}))}$n.assign({createStringInterpolator:LC,to:(e,t)=>new gD(e,t)});var t6e=bh.advance;var T7=l(B7());function _D(e,t){if(e==null)return{};var o={},r=Object.keys(e),n,i;for(i=0;i<r.length;i++)n=r[i],!(t.indexOf(n)>=0)&&(o[n]=e[n]);return o}var pSe=["style","children","scrollTop","scrollLeft"],I7=/^--/;function hSe(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!I7.test(e)&&!(py.hasOwnProperty(e)&&py[e])?t+"px":(""+t).trim()}var E7={};function gSe(e,t){if(!e.nodeType||!e.setAttribute)return!1;let o=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",r=t,{style:n,children:i,scrollTop:s,scrollLeft:a}=r,c=_D(r,pSe),u=Object.values(c),d=Object.keys(c).map(f=>o||e.hasAttribute(f)?f:E7[f]||(E7[f]=f.replace(/([A-Z])/g,m=>"-"+m.toLowerCase())));i!==void 0&&(e.textContent=i);for(let f in n)if(n.hasOwnProperty(f)){let m=hSe(f,n[f]);I7.test(f)?e.style.setProperty(f,m):e.style[f]=m}d.forEach((f,m)=>{e.setAttribute(f,u[m])}),s!==void 0&&(e.scrollTop=s),a!==void 0&&(e.scrollLeft=a)}var py={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},bSe=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),kSe=["Webkit","Ms","Moz","O"];py=Object.keys(py).reduce((e,t)=>(kSe.forEach(o=>e[bSe(o,t)]=e[t]),e),py);var vSe=["x","y","z"],ySe=/^(matrix|translate|scale|rotate|skew)/,SSe=/^(translate)/,_Se=/^(rotate|skew)/,vD=(e,t)=>ae.num(e)&&e!==0?e+t:e,KC=(e,t)=>ae.arr(e)?e.every(o=>KC(o,t)):ae.num(e)?e===t:parseFloat(e)===t,yD=class extends Qf{constructor(t){let{x:o,y:r,z:n}=t,i=_D(t,vSe),s=[],a=[];(o||r||n)&&(s.push([o||0,r||0,n||0]),a.push(c=>[`translate3d(${c.map(u=>vD(u,"px")).join(",")})`,KC(c,0)])),Li(i,(c,u)=>{if(u==="transform")s.push([c||""]),a.push(d=>[d,d===""]);else if(ySe.test(u)){if(delete i[u],ae.und(c))return;let d=SSe.test(u)?"px":_Se.test(u)?"deg":"";s.push(hn(c)),a.push(u==="rotate3d"?([f,m,h,p])=>[`rotate3d(${f},${m},${h},${vD(p,d)})`,KC(p,0)]:f=>[`${u}(${f.map(m=>vD(m,d)).join(",")})`,KC(f,u.startsWith("scale")?1:0)])}}),s.length&&(i.transform=new SD(s,a)),super(i)}},SD=class extends ph{constructor(t,o){super(),this._value=null,this.inputs=t,this.transforms=o}get(){return this._value||(this._value=this._get())}_get(){let t="",o=!0;return bt(this.inputs,(r,n)=>{let i=pr(r[0]),[s,a]=this.transforms[n](ae.arr(i)?i:r.map(pr));t+=" "+s,o=o&&a}),o?"none":t}observerAdded(t){t==1&&bt(this.inputs,o=>bt(o,r=>Ur(r)&&Iu(r,this)))}observerRemoved(t){t==0&&bt(this.inputs,o=>bt(o,r=>Ur(r)&&Pu(r,this)))}eventObserved(t){t.type=="change"&&(this._value=null),qf(this,t)}},xSe=["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"],wSe=["scrollTop","scrollLeft"];$n.assign({batchedUpdates:T7.unstable_batchedUpdates,createStringInterpolator:LC,colors:W8});var CSe=o7(xSe,{applyAnimatedValues:gSe,createAnimatedStyle:e=>new yD(e),getComponentProps:e=>_D(e,wSe)}),P7=CSe.animated;var yh=l(R(),1),O7=l(Fe(),1),A7=l(F(),1);var BSe=200;function R7(e){return{top:e.offsetTop,left:e.offsetLeft}}function ESe({triggerAnimationOnChange:e,clientId:t}){let o=(0,yh.useRef)(),{isTyping:r,getGlobalBlockCount:n,isBlockSelected:i,isFirstMultiSelectedBlock:s,isBlockMultiSelected:a,isAncestorMultiSelected:c,isDraggingBlocks:u}=(0,A7.useSelect)(_),{previous:d,prevRect:f}=(0,yh.useMemo)(()=>({previous:o.current&&R7(o.current),prevRect:o.current&&o.current.getBoundingClientRect()}),[e]);return(0,yh.useLayoutEffect)(()=>{if(!d||!o.current)return;let m=(0,O7.getScrollContainer)(o.current),h=i(t),p=h||s(t),g=u();function b(){if(!g&&p&&f){let P=o.current.getBoundingClientRect().top-f.top;P&&(m.scrollTop+=P)}}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||r()||n()>BSe){b();return}let k=h||a(t)||c(t);if(k&&g)return;let y=k?"1":"",S=new WC({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:I}){if(!o.current)return;let{x:P,y:E}=I;P=Math.round(P),E=Math.round(E);let L=P===0&&E===0;o.current.style.transformOrigin="center center",o.current.style.transform=L?null:`translate3d(${P}px,${E}px,0)`,o.current.style.zIndex=y,b()}});o.current.style.transform=void 0;let x=R7(o.current),C=Math.round(d.left-x.left),B=Math.round(d.top-x.top);return S.start({x:0,y:0,from:{x:C,y:B}}),()=>{S.stop(),S.set({x:0,y:0})}},[d,f,t,r,n,i,s,a,c,u]),o}var YC=ESe;var ZC=l(R(),1),Ol=l(Fe(),1),N7=l(F(),1);var qC=".block-editor-block-list__block",TSe=".block-list-appender",ISe=".block-editor-button-block-appender";function L7(e,t){return e.closest(qC)===t.closest(qC)}function va(e,t){return t.closest([qC,TSe,ISe].join(","))===e}function Ni(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;let o=e.closest(qC);if(o)return o.id.slice(6)}function xD(e,t){let o=Math.min(e.left,t.left),r=Math.max(e.right,t.right),n=Math.max(e.bottom,t.bottom),i=Math.min(e.top,t.top);return new window.DOMRectReadOnly(o,i,r-o,n-i)}function PSe(e){let t=e.ownerDocument.defaultView;if(!t||e.classList.contains("components-visually-hidden"))return!1;let o=e.getBoundingClientRect();if(o.width===0||o.height===0)return!1;if(e.checkVisibility)return e.checkVisibility?.({opacityProperty:!0,contentVisibilityAuto:!0,visibilityProperty:!0});let r=t.getComputedStyle(e);return!(r.display==="none"||r.visibility==="hidden"||r.opacity==="0")}function RSe(e){let t=window.getComputedStyle(e);return t.overflowX==="auto"||t.overflowX==="scroll"||t.overflowY==="auto"||t.overflowY==="scroll"}var OSe=["core/navigation"];function Sh(e){let t=e.ownerDocument.defaultView;if(!t)return new window.DOMRectReadOnly;let o=e.getBoundingClientRect(),r=e.getAttribute("data-type");if(r&&OSe.includes(r)){let s=[e],a;for(;a=s.pop();)if(!RSe(a)){for(let c of a.children)if(PSe(c)){let u=c.getBoundingClientRect();o=xD(o,u),s.push(c)}}}let n=Math.max(o.left,0),i=Math.min(o.right,t.innerWidth);return o=new window.DOMRectReadOnly(n,o.top,i-n,o.height),o}function M7({clientId:e,initialPosition:t}){let o=(0,ZC.useRef)(),{isBlockSelected:r,isMultiSelecting:n,isZoomOut:i}=M((0,N7.useSelect)(_));return(0,ZC.useEffect)(()=>{if(!r(e)||n()||i()||t==null||!o.current)return;let{ownerDocument:s}=o.current;if(va(o.current,s.activeElement))return;let a=Ol.focus.tabbable.find(o.current).filter(d=>(0,Ol.isTextField)(d)),c=t===-1,u=a[c?a.length-1:0]||o.current;if(!va(o.current,u)){o.current.focus();return}if(!o.current.getAttribute("contenteditable")){let d=Ol.focus.tabbable.findNext(o.current);if(d&&va(o.current,d)&&(0,Ol.isFormElement)(d)){d.focus();return}}(0,Ol.placeCaretAtHorizontalEdge)(u,c)},[t,e]),o}var D7=l(Z(),1);function XC(e){e.defaultPrevented||(e.preventDefault(),e.currentTarget.classList.toggle("is-hovered",e.type==="mouseover"))}function V7({isEnabled:e=!0}={}){return(0,D7.useRefEffect)(t=>{if(e)return t.addEventListener("mouseout",XC),t.addEventListener("mouseover",XC),()=>{t.removeEventListener("mouseout",XC),t.removeEventListener("mouseover",XC),t.classList.remove("is-hovered")}},[e])}var QC=l(F(),1),F7=l(Z(),1);function z7(e){let{isBlockSelected:t}=(0,QC.useSelect)(_),{selectBlock:o,selectionChange:r}=(0,QC.useDispatch)(_);return(0,F7.useRefEffect)(n=>{function i(s){if(!n.parentElement.closest('[contenteditable="true"]')){if(t(e)){s.target.isContentEditable||r(e);return}va(n,s.target)&&o(e)}}return n.addEventListener("focusin",i),()=>{n.removeEventListener("focusin",i)}},[t,o])}var _h=l($(),1),U7=l(Fe(),1),Ou=l(it(),1),JC=l(F(),1),H7=l(Z(),1);function j7(e){return!e||e==="transparent"||e==="rgba(0, 0, 0, 0)"}function G7({clientId:e,isSelected:t}){let{getBlockRootClientId:o,isZoomOut:r,hasMultiSelection:n,isSectionBlock:i,editedContentOnlySection:s,getBlock:a}=M((0,JC.useSelect)(_)),{insertAfterBlock:c,removeBlock:u,resetZoomLevel:d,startDraggingBlocks:f,stopDraggingBlocks:m,editContentOnlySection:h}=M((0,JC.useDispatch)(_));return(0,H7.useRefEffect)(p=>{if(!t)return;function g(k){let{keyCode:y,target:S}=k;y!==Ou.ENTER&&y!==Ou.BACKSPACE&&y!==Ou.DELETE||S!==p||(0,U7.isTextField)(S)||(k.preventDefault(),y===Ou.ENTER&&r()?d():y===Ou.ENTER?c(e):u(e))}function b(k){if(p!==k.target||p.isContentEditable||p.ownerDocument.activeElement!==p||n()){k.preventDefault();return}let y=JSON.stringify({type:"block",srcClientIds:[e],srcRootClientId:o(e)});k.dataTransfer.effectAllowed="move",k.dataTransfer.clearData(),k.dataTransfer.setData("wp-blocks",y);let{ownerDocument:S}=p,{defaultView:x}=S;x.getSelection().removeAllRanges();let B=S.createElement("div");B.style.width="1px",B.style.height="1px",B.style.position="fixed",B.style.visibility="hidden",S.body.appendChild(B),k.dataTransfer.setDragImage(B,0,0);let I=p.getBoundingClientRect(),P=p.id,E=p.cloneNode();E.style.display="none",p.id=null,p.after(E);let L=1;{let J=p;for(;J=J.parentElement;){let{scale:K}=x.getComputedStyle(J);if(K&&K!=="none"){L=parseFloat(K);break}}}let T=1/L,O={};for(let J of["transform","transformOrigin","transition","zIndex","position","top","left","pointerEvents","opacity","backgroundColor"])O[J]=p.style[J];let D=x.scrollY,U=x.scrollX,G=k.clientX,j=k.clientY;p.style.position="relative",p.style.top="0px",p.style.left="0px";let z=k.clientX-I.left,W=k.clientY-I.top,ee=I.height>200?200/I.height:1;if(p.style.zIndex="1000",p.style.transformOrigin=`${z*T}px ${W*T}px`,p.style.transition="transform 0.2s ease-out",p.style.transform=`scale(${ee})`,p.style.opacity="0.9",j7(x.getComputedStyle(p).backgroundColor)){let J="transparent",K=p;for(;K=K.parentElement;){let{backgroundColor:H}=x.getComputedStyle(K);if(!j7(H)){J=H;break}}p.style.backgroundColor=J}let se=!1,ce=G,ie=j;function re(J){J.clientX===ce&&J.clientY===ie||(ce=J.clientX,ie=J.clientY,Q())}function Q(){se||(se=!0,p.style.pointerEvents="none");let J=ie-j,K=ce-G,H=x.scrollY,X=x.scrollX,ne=H-D,le=X-U,ve=J+ne,he=K+le;p.style.top=`${ve*T}px`,p.style.left=`${he*T}px`}function Y(){S.removeEventListener("dragover",re),S.removeEventListener("dragend",Y),S.removeEventListener("drop",Y),S.removeEventListener("scroll",Q);for(let[J,K]of Object.entries(O))p.style[J]=K;E.remove(),p.id=P,B.remove(),m(),document.body.classList.remove("is-dragging-components-draggable"),S.documentElement.classList.remove("is-dragging")}S.addEventListener("dragover",re),S.addEventListener("dragend",Y),S.addEventListener("drop",Y),S.addEventListener("scroll",Q),f([e]),document.body.classList.add("is-dragging-components-draggable"),S.documentElement.classList.add("is-dragging")}p.addEventListener("keydown",g),p.addEventListener("dragstart",b);function v(k){let y=i(e),S=a(e),x=(0,_h.isReusableBlock)(S),C=(0,_h.isTemplatePart)(S);!y||s===e||x||C||(k.preventDefault(),h(e))}return p.addEventListener("dblclick",v),()=>{p.removeEventListener("keydown",g),p.removeEventListener("dragstart",b),p.removeEventListener("dblclick",v)}},[e,t,o,a,_h.isReusableBlock,_h.isTemplatePart,c,u,r,d,n,f,m,i,s,h])}var W7=l(Z(),1),$7=l(R(),1);function K7(){let e=(0,$7.useContext)(e1);return(0,W7.useRefEffect)(t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}},[e])}var t1=l(Z(),1);function Y7({isSelected:e}){let t=(0,t1.useReducedMotion)();return(0,t1.useRefEffect)(o=>{if(e){let{ownerDocument:r}=o,{defaultView:n}=r;if(!n.IntersectionObserver)return;let i=new n.IntersectionObserver(s=>{s[0].isIntersecting||o.scrollIntoView({behavior:t?"instant":"smooth"}),i.disconnect()});return i.observe(o),()=>{i.disconnect()}}},[e])}var q7=l(Z(),1),Z7=l(F(),1);function o1({clientId:e="",isEnabled:t=!0}={}){let{getEnabledClientIdsTree:o}=M((0,Z7.useSelect)(_));return(0,q7.useRefEffect)(r=>{if(!t)return;let n=()=>{o(e).forEach(({clientId:s})=>{let a=r.querySelector(`[data-block="${s}"]`);a&&(a.classList.remove("has-editable-outline"),a.offsetWidth,a.classList.add("has-editable-outline"))})},i=s=>{(s.target===r||s.target.classList.contains("is-root-container"))&&(s.defaultPrevented||(s.preventDefault(),n()))};return r.addEventListener("click",i),()=>r.removeEventListener("click",i)},[t])}var X7=l(Z(),1),hy=new Map;function ASe(e,t){let o=hy.get(e);o||(o=new Set,hy.set(e,o),e.addEventListener("pointerdown",J7)),o.add(t)}function LSe(e,t){let o=hy.get(e);o&&(o.delete(t),Q7(t),o.size===0&&(hy.delete(e),e.removeEventListener("pointerdown",J7)))}function Q7(e){let t=e.getAttribute("data-draggable");t&&(e.removeAttribute("data-draggable"),t==="true"&&!e.getAttribute("draggable")&&e.setAttribute("draggable","true"))}function J7(e){let{target:t}=e,{ownerDocument:o,isContentEditable:r,tagName:n}=t,i=["INPUT","TEXTAREA"].includes(n),s=hy.get(o);if(r||i)for(let a of s)a.getAttribute("draggable")==="true"&&a.contains(t)&&(a.removeAttribute("draggable"),a.setAttribute("data-draggable","true"));else for(let a of s)Q7(a)}function e9(){return(0,X7.useRefEffect)(e=>(ASe(e.ownerDocument,e),()=>{LSe(e.ownerDocument,e)}),[])}var mo=l(N(),1),gn=l(R(),1),Gr=l(A(),1),xh=l(F(),1),n9=l(Is(),1),i9=l(Un(),1);var gy=l(N(),1);function NSe(e,t){if(!e)return!1;let o=e.attributes?.metadata?.blockVisibility;if(o===!0||typeof o!="object")return!1;let r=o.viewport;return!r||typeof r!="object"||!iu.some(([,{key:n}])=>n===t)?!1:r[t]===!1}function o9(e,t){if(!e?.length)return!1;let o=e.filter(r=>NSe(r,t)).length;return o===0?!1:o===e.length?!0:null}function r9(e){if(!e?.length)return!1;let t=e.filter(o=>o&&o.attributes?.metadata?.blockVisibility===!1).length;return t===0?!1:t===e.length?!0:null}function by(e){if(!e&&e!==!1)return null;if(e===!1)return(0,gy.__)("Block is hidden");if(e?.viewport){let t=iu.filter(([o])=>e.viewport?.[o]===!1).map(([,o])=>o.label);if(t.length>0)return(0,gy.sprintf)((0,gy.__)("Block is hidden on %s"),t.join(", "))}return null}var ro=l(w(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='4334c7deb6']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","4334c7deb6"),e.appendChild(document.createTextNode(".block-editor-block-visibility-modal{z-index:1000001}.block-editor-block-visibility-modal__options{border:0;list-style:none;margin:24px 0;padding:0}.block-editor-block-visibility-modal__options-item{align-items:center;display:flex;gap:24px;justify-content:space-between;margin:0 0 16px}.block-editor-block-visibility-modal__options-item:last-child{margin:0}.block-editor-block-visibility-modal__options-item--everywhere{align-items:start;flex-direction:column}.block-editor-block-visibility-modal__options-checkbox--everywhere{font-weight:600}.block-editor-block-visibility-modal__options-icon--checked{fill:#ddd}.block-editor-block-visibility-modal__sub-options{padding-inline-start:12px;width:100%}.block-editor-block-visibility-modal__description{color:#757575;font-size:12px}.block-editor-block-visibility-info{align-items:center;display:flex;justify-content:start;margin:0 16px 16px;padding-bottom:4px;padding-top:4px}")),document.head.appendChild(e)}var MSe={[Et.mobile.key]:!1,[Et.tablet.key]:!1,[Et.desktop.key]:!1},DSe=[];function wD({clientIds:e,onClose:t}){let{createSuccessNotice:o}=(0,xh.useDispatch)(i9.store),{updateBlockAttributes:r}=(0,xh.useDispatch)(_),n=(0,xh.useSelect)(k=>k(_).getBlocksByClientId(e)??DSe,[e]),i=(0,xh.useSelect)(k=>k(n9.store).getShortcutRepresentation("core/editor/toggle-list-view"),[]),s=(0,gn.useMemo)(()=>{if(n?.length===0)return{hideEverywhere:!1,viewportChecked:{}};let k={};return iu.forEach(([,{key:y}])=>{k[y]=o9(n,y)}),{hideEverywhere:r9(n),viewportChecked:k}},[n]),[a,c]=(0,gn.useState)(s?.viewportChecked??{}),[u,d]=(0,gn.useState)(s?.hideEverywhere??!1),f=(0,gn.useCallback)((k,y)=>{c({...a,[k]:y})},[a]),m=(0,gn.useMemo)(()=>{if(!u)return(0,mo.sprintf)((0,mo.__)("Block visibility settings updated. You can access them via the List View (%s)."),i);let k=n?.length>1?(0,mo.__)("Blocks hidden. You can access them via the List View (%s)."):(0,mo.__)("Block hidden. You can access it via the List View (%s).");return(0,mo.sprintf)(k,i)},[u,n?.length,i]),h=(0,gn.useMemo)(()=>Object.values(a).some(k=>k===!0||k===null),[a]),p=(0,gn.useMemo)(()=>u!==s.hideEverywhere?!0:iu.some(([,{key:k}])=>a[k]!==s.viewportChecked[k]),[u,a,s]),g=(0,gn.useMemo)(()=>u===null?!0:Object.values(a).some(k=>k===null),[u,a]),b=(0,gn.useCallback)(k=>{k.preventDefault();let y=u?!1:{viewport:iu.reduce((x,[,{key:C}])=>(a[C]&&(x[C]=!1),x),{})},S=Object.fromEntries(n.map(({clientId:x,attributes:C})=>[x,{metadata:Me({...C?.metadata,blockVisibility:y})}]));r(e,S,{uniqueByBlock:!0}),o(m,{id:u?"block-visibility-hidden":"block-visibility-viewports-updated",type:"snackbar"}),t()},[n,e,o,u,m,t,r,a]),v=n?.length>1;return(0,ro.jsx)(Gr.Modal,{title:e?.length>1?(0,mo.__)("Hide blocks"):(0,mo.__)("Hide block"),onRequestClose:t,overlayClassName:"block-editor-block-visibility-modal",size:"small",children:(0,ro.jsxs)("form",{onSubmit:b,children:[(0,ro.jsxs)("fieldset",{children:[(0,ro.jsx)("legend",{children:v?(0,mo.__)("Select the viewport sizes for which you want to hide the blocks. Changes will apply to all selected blocks."):(0,mo.__)("Select the viewport size for which you want to hide the block.")}),(0,ro.jsx)("ul",{className:"block-editor-block-visibility-modal__options",children:(0,ro.jsxs)("li",{className:"block-editor-block-visibility-modal__options-item block-editor-block-visibility-modal__options-item--everywhere",children:[(0,ro.jsx)(Gr.CheckboxControl,{className:"block-editor-block-visibility-modal__options-checkbox--everywhere",label:(0,mo.__)("Omit from published content"),checked:u===!0,indeterminate:u===null,onChange:k=>{d(k),c(MSe)}}),u!==!0&&(0,ro.jsx)("ul",{className:"block-editor-block-visibility-modal__sub-options",children:iu.map(([,{label:k,icon:y,key:S}])=>(0,ro.jsxs)("li",{className:"block-editor-block-visibility-modal__options-item",children:[(0,ro.jsx)(Gr.CheckboxControl,{label:(0,mo.sprintf)((0,mo.__)("Hide on %s"),k),checked:a[S]??!1,indeterminate:a[S]===null,onChange:x=>f(S,x)}),(0,ro.jsx)(Gr.Icon,{icon:y,className:V({"block-editor-block-visibility-modal__options-icon--checked":a[S]})})]},S))})]})}),v&&g&&(0,ro.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,mo.__)("Selected blocks have different visibility settings. The checkboxes show an indeterminate state when settings differ.")}),!v&&u===!0&&(0,ro.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,mo.sprintf)((0,mo.__)("Block will be hidden in the editor, and omitted from the published markup on the frontend. You can configure it again by selecting it in the List View (%s)."),i)}),!v&&!u&&h&&(0,ro.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,gn.createInterpolateElement)((0,mo.sprintf)((0,mo.__)("Block will be hidden according to the selected viewports. It will be <strong>included in the published markup on the frontend</strong>. You can configure it again by selecting it in the List View (%s)."),i),{strong:(0,ro.jsx)("strong",{})})})]}),(0,ro.jsxs)(Gr.Flex,{className:"block-editor-block-visibility-modal__actions",justify:"flex-end",expanded:!1,children:[(0,ro.jsx)(Gr.FlexItem,{children:(0,ro.jsx)(Gr.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,mo.__)("Cancel")})}),(0,ro.jsx)(Gr.FlexItem,{children:(0,ro.jsx)(Gr.Button,{variant:"primary",type:"submit",disabled:!p,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,mo.__)("Apply")})})]})]})})}var CD=l(Z(),1);function Mi(e={}){let{blockVisibility:t=void 0,deviceType:o=Et.desktop.key,view:r=window}=e,n=(0,CD.useViewportMatch)("mobile",">=",r),i=(0,CD.useViewportMatch)("medium",">=",r),s;return o===Et.mobile.key?s=Et.mobile.key:o===Et.tablet.key?s=Et.tablet.key:n?n&&!i?s=Et.tablet.key:s=Et.desktop.key:s=Et.mobile.key,{isBlockCurrentlyHidden:t===!1||t?.viewport?.[s]===!1,currentViewport:s}}var BD=l(N(),1),r1=l(A(),1),n1=l(R(),1);var s9=l($(),1),i1=l(F(),1);var ED=l(w(),1);function TD({clientIds:e}){let t=(0,n1.useRef)(!1),{canToggleBlockVisibility:o,areBlocksHiddenAnywhere:r}=(0,i1.useSelect)(s=>{let{getBlocksByClientId:a,getBlockName:c,isBlockHiddenAnywhere:u}=M(s(_));return{canToggleBlockVisibility:a(e).every(({clientId:f})=>(0,s9.hasBlockSupport)(c(f),"visibility",!0)),areBlocksHiddenAnywhere:e?.every(f=>u(f))}},[e]),n=(0,i1.useDispatch)(_);if((0,n1.useEffect)(()=>{r&&(t.current=!0)},[r]),!r&&!t.current)return null;let{showViewportModal:i}=M(n);return(0,ED.jsx)(r1.ToolbarGroup,{className:"block-editor-block-visibility-toolbar",children:(0,ED.jsx)(r1.ToolbarButton,{disabled:!o,icon:r?vs:Af,label:r?(0,BD.__)("Hidden"):(0,BD.__)("Visible"),onClick:()=>i(e),"aria-haspopup":"dialog"})})}var ID=l(N(),1),a9=l(A(),1),s1=l(F(),1),l9=l(Is(),1);var c9=l(w(),1);function PD({clientIds:e}){let{areBlocksHiddenAnywhere:t,shortcut:o}=(0,s1.useSelect)(n=>{let{isBlockHiddenAnywhere:i}=M(n(_));return{areBlocksHiddenAnywhere:e?.every(s=>i(s)),shortcut:n(l9.store).getShortcutRepresentation("core/block-editor/toggle-block-visibility")}},[e]),{showViewportModal:r}=M((0,s1.useDispatch)(_));return(0,c9.jsx)(a9.MenuItem,{onClick:()=>r(e),shortcut:o,children:t?(0,ID.__)("Show"):(0,ID.__)("Hide")})}var Lu=l(A(),1),RD=l(F(),1),Au=l(N(),1);var wh=l(w(),1),{Badge:VSe}=M(Lu.privateApis),FSe={currentBlockVisibility:void 0,hasParentHiddenEverywhere:!1,selectedDeviceType:Et.desktop.value};function u9({clientId:e}){let{currentBlockVisibility:t,selectedDeviceType:o,hasParentHiddenEverywhere:r}=(0,RD.useSelect)(f=>{if(!e)return FSe;let{getBlockAttributes:m,isBlockParentHiddenEverywhere:h,getSettings:p}=M(f(_));return{currentBlockVisibility:m(e)?.metadata?.blockVisibility,selectedDeviceType:p()?.[wi]?.toLowerCase()||Et.desktop.value,hasParentHiddenEverywhere:h(e)}},[e]),i=Xe(e)?.ownerDocument?.defaultView,s=i===null?void 0:i,{isBlockCurrentlyHidden:a,currentViewport:c}=Mi({blockVisibility:t,deviceType:o,view:s}),u=(0,RD.useSelect)(f=>!e||!c?!1:M(f(_)).isBlockParentHiddenAtViewport(e,c),[e,c]);if(!(a||r||u))return null;let d;if(a)if(t===!1)d=(0,Au.__)("Block is hidden");else{let f=Et[c]?.label||c;d=(0,Au.sprintf)((0,Au.__)("Block is hidden on %s"),f)}if(r)d=(0,Au.__)("Parent block is hidden");else if(u){let f=Et[c]?.label||c;d=(0,Au.sprintf)((0,Au.__)("Parent block is hidden on %s"),f)}return(0,wh.jsx)(VSe,{className:"block-editor-block-visibility-info",children:(0,wh.jsxs)(Lu.__experimentalHStack,{spacing:2,justify:"start",children:[(0,wh.jsx)(Lu.Icon,{icon:vs}),(0,wh.jsx)(Lu.__experimentalText,{children:d})]})})}function ky(e={},{__unstableIsHtml:t}={}){let{clientId:o,className:r,wrapperProps:n={},isAligned:i,index:s,mode:a,name:c,blockApiVersion:u,blockTitle:d,isSelected:f,isSubtreeDisabled:m,hasOverlay:h,initialPosition:p,blockEditingMode:g,isHighlighted:b,isMultiSelected:v,isPartiallySelected:k,isReusable:y,isDragging:S,hasChildSelected:x,isEditingDisabled:C,hasEditableOutline:B,isEditingContentOnlySection:I,defaultClassName:P,isSectionBlock:E,isWithinSectionBlock:L,canMove:T,blockVisibility:O,deviceType:D}=(0,d9.useContext)(ur),U=(0,Ch.useRefEffect)(Y=>{if(Y){let{ownerDocument:J}=Y,{defaultView:K}=J;U.current=K}},[]),G=(0,a1.sprintf)((0,a1.__)("Block: %s"),d),j=a==="html"&&!t?"-visual":"",z=e9(),W=!L,ee=(0,Ch.useMergeRefs)([e.ref,U,M7({clientId:o,initialPosition:p}),VH(o),z7(o),G7({clientId:o,isSelected:f}),V7({isEnabled:W}),K7(),YC({triggerAnimationOnChange:s,clientId:o}),(0,Ch.useDisabled)({isDisabled:!h}),o1({clientId:o,isEnabled:E}),Y7({isSelected:f}),T?z:void 0]),se=Ie(),ie=!!se[Rp]?{"--wp-admin-theme-color":"var(--wp-block-synced-color)","--wp-admin-theme-color--rgb":"var(--wp-block-synced-color--rgb)"}:{},{isBlockCurrentlyHidden:re}=Mi({blockVisibility:O,deviceType:D,view:U.current});u<2&&o===se.clientId&&(0,m9.default)(`Block type "${c}" must support API version 2 or higher to work correctly with "useBlockProps" method.`);let Q=!1;return(n?.style?.marginTop?.charAt(0)==="-"||n?.style?.marginBottom?.charAt(0)==="-"||n?.style?.marginLeft?.charAt(0)==="-"||n?.style?.marginRight?.charAt(0)==="-")&&(Q=!0),{tabIndex:g==="disabled"?-1:0,draggable:T&&!x?!0:void 0,...n,...e,ref:ee,id:`block-${o}${j}`,role:"document","aria-label":G,"data-block":o,"data-type":c,"data-title":d,inert:m?"true":void 0,className:V("block-editor-block-list__block",{"wp-block":!i,"has-block-overlay":h,"is-selected":f,"is-highlighted":b,"is-multi-selected":v,"is-partially-selected":k,"is-reusable":y,"is-dragging":S,"has-child-selected":x,"is-editing-disabled":C,"has-editable-outline":B,"has-negative-margin":Q,"is-editing-content-only-section":I,"is-block-hidden":re},r,e.className,n.className,P),style:{...n.style,...e.style,...ie}}}ky.save=f9.__unstableGetBlockProps;var po=l(w(),1);function zSe(e,t){let o={...e,...t};return e?.hasOwnProperty("className")&&t?.hasOwnProperty("className")&&(o.className=V(e.className,t.className)),e?.hasOwnProperty("style")&&t?.hasOwnProperty("style")&&(o.style={...e.style,...t.style}),o}function l1({children:e,isHtml:t,...o}){return(0,po.jsx)("div",{...ky(o,{__unstableIsHtml:t}),children:e})}function OD({block:{__unstableBlockSource:e},mode:t,isLocked:o,canRemove:r,clientId:n,isSelected:i,isSelectionEnabled:s,className:a,__unstableLayoutClassNames:c,name:u,isValid:d,attributes:f,wrapperProps:m,setAttributes:h,onReplace:p,onRemove:g,onInsertBlocksAfter:b,onMerge:v,toggleSelection:k}){let{mayDisplayControls:y,mayDisplayParentControls:S,isSelectionWithinCurrentSection:x,themeSupportsLayout:C,...B}=(0,Nu.useContext)(ur),I=Uf()||{},P=(0,po.jsx)(Fw,{name:u,isSelected:i,attributes:f,setAttributes:h,insertBlocksAfter:o?void 0:b,onReplace:r?p:void 0,onRemove:r?g:void 0,mergeBlocks:r?v:void 0,clientId:n,isSelectionEnabled:s,toggleSelection:k,__unstableLayoutClassNames:c,__unstableParentLayout:Object.keys(I).length?I:void 0,mayDisplayControls:y,mayDisplayParentControls:S,mayDisplayPatternEditingControls:x,blockEditingMode:B.blockEditingMode,isPreviewMode:B.isPreviewMode}),E=(0,He.getBlockType)(u);E?.getEditWrapperProps&&(m=zSe(m,E.getEditWrapperProps(f)));let L=m&&!!m["data-align"]&&!C,T=a?.includes("is-position-sticky");L&&(P=(0,po.jsx)("div",{className:V("wp-block",T&&a),"data-align":m["data-align"],children:P}));let O;if(d)t==="html"?O=(0,po.jsxs)(po.Fragment,{children:[(0,po.jsx)("div",{style:{display:"none"},children:P}),(0,po.jsx)(l1,{isHtml:!0,children:(0,po.jsx)(T8,{clientId:n})})]}):E?.apiVersion>1?O=P:O=(0,po.jsx)(l1,{children:P});else{let j=e?(0,He.serializeRawBlock)(e):(0,He.getSaveContent)(E,f);O=(0,po.jsxs)(l1,{className:"has-warning",children:[(0,po.jsx)(o8,{clientId:n}),(0,po.jsx)(Nu.RawHTML,{children:(0,h9.safeHTML)(j)})]})}let{"data-align":D,...U}=m??{},G={...U,className:V(U.className,D&&C&&`align${D}`,!(D&&T)&&a)};return(0,po.jsx)(ur.Provider,{value:{wrapperProps:G,isAligned:L,isSelectionWithinCurrentSection:x,...B},children:(0,po.jsx)(a8,{fallback:(0,po.jsx)(l1,{className:"has-warning",children:(0,po.jsx)(i8,{})}),children:O})})}var jSe=(0,c1.withDispatch)((e,t,o)=>{let{updateBlockAttributes:r,insertBlocks:n,mergeBlocks:i,replaceBlocks:s,toggleSelection:a,__unstableMarkLastChangeAsPersistent:c,moveBlocksToPosition:u,removeBlock:d,selectBlock:f}=e(_);return{setAttributes(m){let{getMultiSelectedBlockClientIds:h}=o.select(_),p=h(),{clientId:g,attributes:b}=t,v=p.length?p:[g],k=typeof m=="function"?m(b):m;r(v,k)},onInsertBlocks(m,h){let{rootClientId:p}=t;n(m,h,p)},onInsertBlocksAfter(m){let{clientId:h,rootClientId:p}=t,{getBlockIndex:g}=o.select(_),b=g(h);n(m,b+1,p)},onMerge(m){let{clientId:h,rootClientId:p}=t,{getPreviousBlockClientId:g,getNextBlockClientId:b,getBlock:v,getBlockAttributes:k,getBlockName:y,getBlockOrder:S,getBlockIndex:x,getBlockRootClientId:C,canInsertBlockType:B}=o.select(_);function I(){let E=v(h),L=(0,He.getDefaultBlockName)(),T=(0,He.getBlockType)(L);if(y(h)!==L){let O=(0,He.switchToBlockType)(E,L);O&&O.length&&s(h,O)}else if((0,He.isUnmodifiedDefaultBlock)(E)){let O=b(h);O&&o.batch(()=>{d(h),f(O)})}else if(T.merge){let O=T.merge({},E.attributes);s([h],[(0,He.createBlock)(L,O)])}}function P(E,L=!0){let T=y(E),D=(0,He.getBlockType)(T).category==="text",U=C(E),G=S(E),[j]=G;G.length===1&&(0,He.isUnmodifiedBlock)(v(j))?d(E):D?o.batch(()=>{if(B(y(j),U))u([j],E,U,x(E));else{let z=(0,He.switchToBlockType)(v(j),(0,He.getDefaultBlockName)());z&&z.length&&z.every(W=>B(W.name,U))?(n(z,x(E),U,L),d(j,!1)):I()}!S(E).length&&(0,He.isUnmodifiedBlock)(v(E))&&d(E,!1)}):I()}if(m){if(p){let L=b(p);if(L)if(y(p)===y(L)){let T=k(p),O=k(L);if(Object.keys(T).every(D=>T[D]===O[D])){o.batch(()=>{u(S(L),L,p),d(L,!1)});return}}else{i(p,L);return}}let E=b(h);if(!E)return;S(E).length?P(E,!1):i(h,E)}else{let E=g(h);if(E)i(E,h);else if(p){let L=g(p);if(L&&y(p)===y(L)){let T=k(p),O=k(L);if(Object.keys(T).every(D=>T[D]===O[D])){o.batch(()=>{u(S(p),p,L),d(p,!1)});return}}P(p)}else I()}},onReplace(m,h,p){m.length&&!(0,He.isUnmodifiedDefaultBlock)(m[m.length-1])&&c();let g=m?.length===1&&Array.isArray(m[0])?m[0]:m;s([t.clientId],g,h,p)},onRemove(){d(t.clientId)},toggleSelection(m){a(m)}}});OD=(0,u1.compose)(jSe,(0,p9.withFilters)("editor.BlockListBlock"))(OD);function USe(e){let{clientId:t,rootClientId:o}=e,r=(0,c1.useSelect)(ne=>{let{isBlockSelected:le,getBlockMode:ve,isSelectionEnabled:he,getTemplateLock:xe,isSectionBlock:ze,getParentSectionBlock:ot,getBlockWithoutAttributes:Wt,getBlockAttributes:fo,canRemoveBlock:Do,canMoveBlock:rt,getSettings:ar,getEditedContentOnlySection:xt,getBlockEditingMode:At,getBlockName:Pe,isFirstMultiSelectedBlock:wt,getMultiSelectedBlockClientIds:qo,hasSelectedInnerBlock:$t,getBlocksByName:lr,getBlockIndex:ln,isBlockMultiSelected:je,isBlockSubtreeDisabled:Eo,isBlockHighlighted:Ze,__unstableIsFullySelected:Ve,__unstableSelectionHasUnmergeableBlock:gt,isBlockBeingDragged:To,isDragging:cr,__unstableHasActiveBlockOverlayActive:ge,getSelectedBlocksInitialCaretPosition:Ct}=M(ne(_)),Io=Wt(t);if(!Io)return;let{hasBlockSupport:Ke,getActiveBlockVariation:te}=ne(He.store),Le=fo(t),{name:ct,isValid:Gc}=Io,ua=(0,He.getBlockType)(ct),Bp=ar(),{supportsLayout:jk,isPreviewMode:hf,__experimentalBlockBindingsSupportedAttributes:cn}=Bp,Ep=cn?.[ct],Tp=Le?.metadata?.blockVisibility,s0=Bp?.[wi]?.toLowerCase()||"desktop",a0=ua?.apiVersion>1,Uk=je(t),ue=At(t),to={isPreviewMode:hf,blockWithoutAttributes:Io,name:ct,attributes:Le,isValid:Gc,themeSupportsLayout:jk,index:ln(t),isReusable:(0,He.isReusableBlock)(ua),className:a0?Le.className:void 0,defaultClassName:a0?(0,He.getBlockDefaultClassName)(ct):void 0,blockTitle:ua?.title,bindableAttributes:Ep,blockVisibility:Tp,deviceType:s0,isMultiSelected:Uk,blockEditingMode:ue,isEditingDisabled:ue==="disabled"};if(hf)return to;let ye=le(t),Lt=Do(t),un=rt(t),_r=te(ct,Le),Wc=!0,mO=$t(t,Wc),pO=ze(t)?t:ot(t),hO=(0,He.hasBlockSupport)(ct,"multiple",!0)?[]:lr(ct),Ume=hO.length&&hO[0]!==t;return{...to,mode:ve(t),isSelectionEnabled:he(),isLocked:!!xe(o),isSectionBlock:ze(t),isWithinSectionBlock:!!pO,isSelectionWithinCurrentSection:le(pO)||$t(pO,Wc),blockType:ua,canRemove:Lt,canMove:un,isSelected:ye,isEditingContentOnlySection:xt()===t,blockEditingMode:ue,mayDisplayControls:ye||wt(t)&&qo().every(Hme=>Pe(Hme)===ct),mayDisplayParentControls:Ke(Pe(t),"__experimentalExposeControlsToChildren",!1)&&$t(t),blockApiVersion:ua?.apiVersion||1,blockTitle:_r?.title||ua?.title,isSubtreeDisabled:ue==="disabled"&&Eo(t),hasOverlay:ge(t)&&!cr(),initialPosition:ye?Ct():void 0,isHighlighted:Ze(t),isMultiSelected:Uk,isPartiallySelected:Uk&&!Ve()&&!gt(),isDragging:To(t),hasChildSelected:mO,isEditingDisabled:ue==="disabled",hasEditableOutline:ue!=="disabled"&&At(o)==="disabled",originalBlockClientId:Ume?hO[0]:!1,blockVisibility:Tp,deviceType:s0}},[t,o]),n=(0,u1.useRefEffect)(ne=>{if(ne){let{ownerDocument:le}=ne,{defaultView:ve}=le;n.current=ve}},[]),{isBlockCurrentlyHidden:i}=Mi({blockVisibility:r?.blockVisibility,deviceType:r?.deviceType,view:n.current}),s=(0,Nu.useMemo)(()=>({...r?.blockWithoutAttributes,attributes:r?.attributes}),[r?.blockWithoutAttributes,r?.attributes]);if(!r)return null;let{isPreviewMode:a,mode:c="visual",isSelectionEnabled:u=!1,isLocked:d=!1,canRemove:f=!1,canMove:m=!1,name:h,attributes:p,isValid:g,isSelected:b=!1,themeSupportsLayout:v,isEditingContentOnlySection:k,blockEditingMode:y,mayDisplayControls:S,mayDisplayParentControls:x,index:C,blockApiVersion:B,blockType:I,blockTitle:P,isSubtreeDisabled:E,hasOverlay:L,initialPosition:T,isHighlighted:O,isMultiSelected:D,isPartiallySelected:U,isReusable:G,isDragging:j,hasChildSelected:z,isSectionBlock:W,isWithinSectionBlock:ee,isSelectionWithinCurrentSection:se,isEditingDisabled:ce,hasEditableOutline:ie,className:re,defaultClassName:Q,originalBlockClientId:Y,bindableAttributes:J,blockVisibility:K,deviceType:H}=r,X={isPreviewMode:a,clientId:t,className:re,index:C,mode:c,name:h,blockApiVersion:B,blockType:I,blockTitle:P,isSelected:b,isSubtreeDisabled:E,hasOverlay:L,initialPosition:T,blockEditingMode:y,isHighlighted:O,isMultiSelected:D,isPartiallySelected:U,isReusable:G,isDragging:j,hasChildSelected:z,isSectionBlock:W,isWithinSectionBlock:ee,isSelectionWithinCurrentSection:se,isEditingDisabled:ce,hasEditableOutline:ie,isEditingContentOnlySection:k,defaultClassName:Q,mayDisplayControls:S,mayDisplayParentControls:x,originalBlockClientId:Y,themeSupportsLayout:v,canMove:m,isBlockCurrentlyHidden:i,bindableAttributes:J,blockVisibility:K,deviceType:H};return i&&!b&&!D&&!z?null:(0,po.jsx)(ur.Provider,{value:X,children:(0,po.jsx)(OD,{...e,mode:c,isSelectionEnabled:u,isLocked:d,canRemove:f,canMove:m,block:s,name:h,attributes:p,isValid:g,isSelected:b})})}var g9=(0,Nu.memo)(USe);var Y5=l(F(),1),uY=l($(),1);var $5=l(N(),1),iY=l(SM(),1),AB=l(F(),1),LB=l(it(),1);var rY=l(Xo(),1),Gl=l(N(),1),PB=l(A(),1),nY=l(R(),1),RB=l(F(),1),OB=l(Z(),1),Yy=l($(),1);var Ft=l(R(),1),lg=l(A(),1),Xu=l(N(),1),Wy=l(Z(),1),QK=l(F(),1);var Bh=l(N(),1),Eh=l(R(),1),k9=l(A(),1),vy=l(w(),1),b9=[(0,Eh.createInterpolateElement)((0,Bh.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,vy.jsx)("kbd",{})}),(0,Eh.createInterpolateElement)((0,Bh.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,vy.jsx)("kbd",{})}),(0,Eh.createInterpolateElement)((0,Bh.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,vy.jsx)("kbd",{})}),(0,Bh.__)("Drag files into the editor to automatically insert media blocks."),(0,Bh.__)("Change a block's type by pressing the block icon on the toolbar.")];function HSe(){let[e]=(0,Eh.useState)(Math.floor(Math.random()*b9.length));return(0,vy.jsx)(k9.Tip,{children:b9[e]})}var v9=HSe;var $h=l($(),1),N$=l(R(),1),M$=l(N(),1);var bn=l(A(),1),d1=l(F(),1),y9=l(Re(),1),Mu=l(N(),1);var f1=l($(),1);var Cr=l(w(),1),{Badge:GSe}=M(bn.privateApis);function WSe({children:e,onClick:t}){return t?(0,Cr.jsx)(bn.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-card__parent-select-button",onClick:t,children:e}):e}function $Se({title:e,icon:t,description:o,blockType:r,className:n,name:i,allowParentNavigation:s,parentClientId:a,isChild:c,children:u,clientId:d}){r&&((0,y9.default)("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),{title:e,icon:t,description:o}=r);let{parentBlockClientId:f,parentBlockName:m}=(0,d1.useSelect)(g=>{if(a||c||!s)return{};let{getBlockParents:b,getBlockName:v}=g(_),y=b(d,!1).find(S=>{let x=v(S);return x==="core/navigation"||(0,f1.hasBlockSupport)(x,"listView")});return{parentBlockClientId:y,parentBlockName:y?v(y):null}},[d,s,c,a]),{selectBlock:h}=(0,d1.useDispatch)(_),p=a?"div":"h2";return(0,Cr.jsx)("div",{className:V("block-editor-block-card",{"is-parent":a,"is-child":c},n),children:(0,Cr.jsxs)(bn.__experimentalVStack,{children:[(0,Cr.jsxs)(bn.__experimentalHStack,{justify:"flex-start",spacing:0,children:[f&&(0,Cr.jsx)(bn.Button,{onClick:()=>h(f),label:m?(0,Mu.sprintf)((0,Mu.__)('Go to "%s" block'),(0,f1.getBlockType)(m)?.title):(0,Mu.__)("Go to parent block"),style:{minWidth:24,padding:0},icon:(0,Mu.isRTL)()?Vo:Mr,size:"small"}),c&&(0,Cr.jsx)("span",{className:"block-editor-block-card__child-indicator-icon",children:(0,Cr.jsx)(bn.Icon,{icon:(0,Mu.isRTL)()?Xk:Qk})}),(0,Cr.jsxs)(WSe,{onClick:a?()=>{h(a)}:void 0,children:[(0,Cr.jsx)(Ae,{icon:t,showColors:!0}),(0,Cr.jsxs)(bn.__experimentalVStack,{spacing:1,children:[(0,Cr.jsxs)(p,{className:"block-editor-block-card__title",children:[(0,Cr.jsx)("span",{className:"block-editor-block-card__name",children:i?.length?i:e}),!a&&!c&&!!i?.length&&(0,Cr.jsx)(GSe,{children:e})]}),u]})]})]}),!a&&!c&&o&&(0,Cr.jsx)(bn.__experimentalText,{className:"block-editor-block-card__description",children:o})]})})}var yy=$Se;var Z1=l(Z(),1),w5=l(F(),1),sm=l(R(),1),x5=l(Re(),1);var z9=l(F(),1),Du=l(R(),1),j9=l(A(),1),tm=l(_9(),1);var x9=l(R(),1),Th=l(F(),1),w9=l(Z(),1);var m1=l(w(),1);function KSe(e,t,o){if(!o)return t;let r=e.get(t);return r||(r=(0,Th.createRegistry)({},t),r.registerStore(Kt,Qp),e.set(t,r)),r}var YSe=(0,w9.createHigherOrderComponent)(e=>function({useSubRegistry:o=!0,...r}){let n=(0,Th.useRegistry)(),[i]=(0,x9.useState)(()=>new WeakMap),s=KSe(i,n,o);return s===n?(0,m1.jsx)(e,{registry:n,...r}):(0,m1.jsx)(Th.RegistryProvider,{value:s,children:(0,m1.jsx)(e,{registry:s,...r})})},"withRegistryProvider"),C9=YSe;var Wr=l(R(),1),I9=l(F(),1),P9=l($(),1);var B9=l(R(),1),qSe=()=>{},p1=(0,B9.createContext)({getSelection:()=>{},onChangeSelection:qSe});var E9=()=>{};function R9(e,t){let o=(0,P9.cloneBlock)(e);return t.externalToInternal.set(e.clientId,o.clientId),t.internalToExternal.set(o.clientId,e.clientId),e.innerBlocks?.length&&(o.innerBlocks=e.innerBlocks.map(r=>R9(r,t))),o}function O9(e,t){return e.map(o=>{let r=t.internalToExternal.get(o.clientId);return{...o,clientId:r??o.clientId,innerBlocks:O9(o.innerBlocks,t)}})}function T9(e,t){let{selectionStart:o,selectionEnd:r,initialPosition:n}=e,i=s=>{if(!s?.clientId)return s;let a=t.internalToExternal.get(s.clientId);return{...s,clientId:a??s.clientId}};return{selectionStart:i(o),selectionEnd:i(r),initialPosition:n}}function h1({clientId:e=null,value:t,onChange:o=E9,onInput:r=E9}){let n=(0,I9.useRegistry)(),{getSelection:i,onChangeSelection:s}=(0,Wr.useContext)(p1),{resetBlocks:a,resetSelection:c,replaceInnerBlocks:u,setHasControlledInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:f}=n.dispatch(_),{getBlockName:m,getBlocks:h,getSelectionStart:p,getSelectionEnd:g}=n.select(_),b=(0,Wr.useRef)({incoming:null,outgoing:[]}),v=(0,Wr.useRef)(!1),k=(0,Wr.useRef)({externalToInternal:new Map,internalToExternal:new Map}),y=(0,Wr.useRef)(null),S=(0,Wr.useRef)(!1),x=()=>{let E=i();if(!E?.selectionStart?.clientId||E===y.current)return;let L=E.selectionStart.clientId;if(e?k.current.externalToInternal.has(L):!!m(L)){y.current=E;let O=D=>!D?.clientId||!e?D:{...D,clientId:k.current.externalToInternal.get(D.clientId)??D.clientId};S.current=!0,c(O(E.selectionStart),O(E.selectionEnd),E.initialPosition),S.current=!1}},C=()=>{t&&(e?n.batch(()=>{k.current.externalToInternal.clear(),k.current.internalToExternal.clear();let E=t.map(L=>R9(L,k.current));d(e,!0),v.current&&(b.current.incoming=E),f(),u(e,E),y.current=null}):(v.current&&(b.current.incoming=t),f(),a(t)))},B=()=>{f(),e?(d(e,!1),f(),u(e,[])):a([])},I=(0,Wr.useRef)(r),P=(0,Wr.useRef)(o);(0,Wr.useEffect)(()=>{I.current=r,P.current=o},[r,o]),(0,Wr.useEffect)(()=>{let E=b.current.outgoing.includes(t),L=h(e)===t;E?b.current.outgoing[b.current.outgoing.length-1]===t&&(b.current.outgoing=[]):L||(b.current.outgoing=[],C(),x())},[t,e]),(0,Wr.useEffect)(()=>{let{getSelectedBlocksInitialCaretPosition:E,isLastBlockChangePersistent:L,__unstableIsLastBlockChangeIgnored:T,areInnerBlocksControlled:O,getBlockParents:D}=n.select(_),U=h(e),G=L(),j=!1,z=p(),W=g();v.current=!0;let ee=n.subscribe(()=>{if(e!==null&&m(e)===null)return;let se=L(),ce=h(e),ie=ce!==U;if(U=ce,ie&&(b.current.incoming||T())){b.current.incoming=null,G=se;return}let Q=ie||j&&!ie&&se&&!G,Y=p(),J=g(),K=Y!==z||J!==W;K&&(z=Y,W=J),(Q||K)&&n.batch(()=>{if(Q){G=se;let H=e?O9(U,k.current):U,X={selectionStart:Y,selectionEnd:J,initialPosition:E()},ne=e?T9(X,k.current):X;b.current.outgoing.push(H),(G?P.current:I.current)(H,{selection:ne})}if(K&&!Q&&Y?.clientId&&!S.current&&(e?k.current.internalToExternal.has(Y.clientId):!D(Y.clientId).some(X=>O(X)))){let X={selectionStart:Y,selectionEnd:J,initialPosition:E()};s(e?T9(X,k.current):X)}}),j=ie},_);return()=>{v.current=!1,ee()}},[n,e]),(0,Wr.useEffect)(()=>()=>{B()},[])}var A9=l(R(),1),L9=l(F(),1),N9=l(Is(),1),ho=l(N(),1);function M9(){return null}function ZSe(){let{registerShortcut:e}=(0,L9.useDispatch)(N9.store);return(0,A9.useEffect)(()=>{e({name:"core/block-editor/copy",category:"block",description:(0,ho.__)("Copy the selected block(s)."),keyCombination:{modifier:"primary",character:"c"}}),e({name:"core/block-editor/cut",category:"block",description:(0,ho.__)("Cut the selected block(s)."),keyCombination:{modifier:"primary",character:"x"}}),e({name:"core/block-editor/paste",category:"block",description:(0,ho.__)("Paste the selected block(s)."),keyCombination:{modifier:"primary",character:"v"}}),e({name:"core/block-editor/duplicate",category:"block",description:(0,ho.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,ho.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/paste-styles",category:"block",description:(0,ho.__)("Paste the copied style to the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"v"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,ho.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:(0,ho.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:(0,ho.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/stop-editing-as-blocks",category:"block",description:(0,ho.__)("Finish editing a design."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/select-all",category:"selection",description:(0,ho.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:(0,ho.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:(0,ho.__)("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,ho.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,ho.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,ho.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}}),e({name:"core/block-editor/collapse-list-view",category:"list-view",description:(0,ho.__)("Collapse all other items."),keyCombination:{modifier:"alt",character:"l"}}),e({name:"core/block-editor/group",category:"block",description:(0,ho.__)("Create a group block from the selected multiple blocks."),keyCombination:{modifier:"primary",character:"g"}}),e({name:"core/block-editor/toggle-block-visibility",category:"block",description:(0,ho.__)("Show or hide the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"h"}}),e({name:"core/block-editor/rename",category:"block",description:(0,ho.__)("Rename the selected block."),keyCombination:{modifier:"primaryAlt",character:"r"}})},[e]),null}M9.Register=ZSe;var g1=M9;var D9=l(R(),1);function XSe(e={}){return(0,D9.useMemo)(()=>({mediaUpload:e.mediaUpload,mediaSideload:e.mediaSideload,mediaFinalize:e.mediaFinalize,maxUploadFileSize:e.maxUploadFileSize,allowedMimeTypes:e.allowedMimeTypes,allImageSizes:e.allImageSizes,bigImageSizeThreshold:e.bigImageSizeThreshold}),[e])}var V9=XSe;var Al=l(w(),1),AD=()=>{},F9=!1,Ih=null;function QSe(){if(Ih!==null)return Ih;if(!window.__clientSideMediaProcessing||typeof tm.detectClientSideMediaSupport!="function")return Ih=!1,!1;let e=(0,tm.detectClientSideMediaSupport)();return!e||!e.supported?(F9||(console.info(`Client-side media processing unavailable: ${e.reason}. Using server-side processing.`),F9=!0),Ih=!1,!1):(Ih=!0,!0)}function JSe(e,t,{allowedTypes:o,additionalData:r={},filesList:n,onError:i=AD,onFileChange:s,onSuccess:a,onBatchSuccess:c}){e.dispatch(tm.store).addItems({files:Array.from(n),onChange:s,onSuccess:u=>{t?.[C0]?.(u),a?.(u)},onBatchSuccess:c,onError:u=>i(typeof u=="string"?u:u?.message??""),additionalData:r,allowedTypes:o})}function e_e(e){return h1(e),null}var Ph=C9(e=>{let{settings:t,registry:o,stripExperimentalSettings:r=!1}=e,n=V9(t),i=QSe(),s=!!t?.mediaUpload?.__isMediaUploadInterceptor,a=(0,Du.useMemo)(()=>{if(i&&t?.mediaUpload&&!s){let p=JSe.bind(null,o,t);return p.__isMediaUploadInterceptor=!0,{...t,mediaUpload:p}}return t},[t,o,i,s]),{__experimentalUpdateSettings:c}=M((0,z9.useDispatch)(_));(0,Du.useEffect)(()=>{c({...a,__internalIsInitialized:!0},{stripExperimentalSettings:r,reset:!0})},[a,r,c]);let u=(0,Du.useRef)(e.selection);u.current=e.selection;let d=(0,Du.useRef)(e.onChangeSelection??AD);d.current=e.onChangeSelection??AD;let f=(0,Du.useMemo)(()=>({getSelection:()=>u.current,onChangeSelection:(...p)=>d.current(...p)}),[]),m=(0,Al.jsxs)(j9.SlotFillProvider,{passthrough:!0,children:[!a?.isPreviewMode&&(0,Al.jsx)(g1.Register,{}),(0,Al.jsx)(MH,{children:e.children})]}),h=(0,Al.jsxs)(p1.Provider,{value:f,children:[(0,Al.jsx)(e_e,{clientId:e.clientId,value:e.value,onChange:e.onChange,onInput:e.onInput}),m]});return i&&!s?(0,Al.jsx)(tm.MediaUploadProvider,{settings:n,useSubRegistry:!1,children:h}):h}),t_e=e=>(0,Al.jsx)(Ph,{...e,stripExperimentalSettings:!0,children:e.children}),U9=t_e;var Dy=l(Z(),1),C$=l(F(),1),q1=l(R(),1),B$=l(A(),1);var om=l(R(),1),TG=l(N(),1),Vu=l(Z(),1),IG=l(A(),1),zD=l(F(),1);var SG=l(F(),1),_G=l(N(),1),wy=l(Z(),1),xG=l(R(),1);var H9=l(Z(),1),G9=l(F(),1);function o_e(e){let{isMultiSelecting:t,getMultiSelectedBlockClientIds:o,hasMultiSelection:r,getSelectedBlockClientId:n,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:s}=e(_);return{isMultiSelecting:t(),multiSelectedBlockClientIds:o(),hasMultiSelection:r(),selectedBlockClientId:n(),initialPosition:i(),isFullSelection:s()}}function W9(){let{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:o,hasMultiSelection:r,selectedBlockClientId:n,isFullSelection:i}=(0,G9.useSelect)(o_e,[]);return(0,H9.useRefEffect)(s=>{let{ownerDocument:a}=s,{defaultView:c}=a;if(e==null||!r||t)return;let{length:u}=o;u<2||i&&(s.contentEditable=!0,s.focus(),c.getSelection().removeAllRanges())},[r,t,o,n,e,i])}var Rh=l(Fe(),1),LD=l(it(),1),b1=l(F(),1),k1=l(Z(),1),Sy=l(R(),1);var ND=l(w(),1);function $9(){let e=(0,Sy.useRef)(),t=(0,Sy.useRef)(),o=(0,Sy.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:n,getBlockCount:i,getBlockOrder:s,getLastFocus:a,getSectionRootClientId:c,isZoomOut:u}=M((0,b1.useSelect)(_)),{setLastFocus:d}=M((0,b1.useDispatch)(_)),f=(0,Sy.useRef)();function m(v){let k=e.current.ownerDocument===v.target.ownerDocument?e.current:e.current.ownerDocument.defaultView.frameElement;if(f.current)f.current=null;else if(r())e.current.focus();else if(n())a()?.current?a().current.focus():e.current.querySelector(`[data-block="${n()}"]`).focus();else if(u()){let y=c(),S=s(y);S.length?e.current.querySelector(`[data-block="${S[0]}"]`).focus():y?e.current.querySelector(`[data-block="${y}"]`).focus():k.focus()}else{let y=v.target.compareDocumentPosition(k)&v.target.DOCUMENT_POSITION_FOLLOWING,S=Rh.focus.tabbable.find(e.current);S.length&&(y?S[0]:S[S.length-1]).focus()}}let h=(0,ND.jsx)("div",{ref:t,tabIndex:"0",onFocus:m}),p=(0,ND.jsx)("div",{ref:o,tabIndex:"0",onFocus:m}),g=(0,k1.useRefEffect)(v=>{function k(B){if(B.defaultPrevented||B.keyCode!==LD.TAB||!o.current||!t.current)return;let{target:I,shiftKey:P}=B,E=P?"findPrevious":"findNext",L=Rh.focus.tabbable[E](I),T=I.closest("[data-block]"),O=T&&L&&(L7(T,L)||va(T,L));if((0,Rh.isFormElement)(L)&&O)return;let D=P?t:o;f.current=!0,D.current.focus({preventScroll:!0})}function y(B){d({...a(),current:B.target});let{ownerDocument:I}=v;!B.relatedTarget&&B.target.hasAttribute("data-block")&&I.activeElement===I.body&&i()===0&&v.focus()}function S(B){if(B.keyCode!==LD.TAB||B.target?.getAttribute("role")==="region"||e.current===B.target)return;let P=B.shiftKey?"findPrevious":"findNext",E=Rh.focus.tabbable[P](B.target);(E===t.current||E===o.current)&&(B.preventDefault(),E.focus({preventScroll:!0}))}let{ownerDocument:x}=v,{defaultView:C}=x;return C.addEventListener("keydown",S),v.addEventListener("keydown",k),v.addEventListener("focusout",y),()=>{C.removeEventListener("keydown",S),v.removeEventListener("keydown",k),v.removeEventListener("focusout",y)}},[]),b=(0,k1.useMergeRefs)([e,g]);return[h,b,p]}var go=l(Fe(),1),ya=l(it(),1),v1=l(F(),1),K9=l(Z(),1);function r_e(e,t,o){let r=t===ya.UP||t===ya.DOWN,{tagName:n}=e,i=e.getAttribute("type");return r&&!o?n==="INPUT"?!["date","datetime-local","month","number","range","time","week"].includes(i):!0:n==="INPUT"?["button","checkbox","number","color","file","image","radio","reset","submit"].includes(i):n!=="TEXTAREA"}function MD(e,t,o,r){let n=go.focus.focusable.find(o);t&&n.reverse(),n=n.slice(n.indexOf(e)+1);let i;r&&(i=e.getBoundingClientRect());function s(a){if(a.contentEditable!=="true"&&Ni(a)&&go.focus.focusable.find(a).filter(c=>!(0,go.isFormElement)(c)).length!==0||!go.focus.tabbable.isTabbableIndex(a)||a.isContentEditable&&a.contentEditable!=="true")return!1;if(r){let c=a.getBoundingClientRect();if(c.left>=i.right||c.right<=i.left)return!1}return!0}return n.find(s)}function Y9(){let{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:o,hasMultiSelection:r,__unstableIsFullySelected:n}=(0,v1.useSelect)(_),{selectBlock:i}=(0,v1.useDispatch)(_);return(0,K9.useRefEffect)(s=>{let a;function c(){a=null}function u(f,m){let h=MD(f,m,s);return h&&Ni(h)}function d(f){if(f.defaultPrevented)return;let{keyCode:m,target:h,shiftKey:p,ctrlKey:g,altKey:b,metaKey:v}=f,k=m===ya.UP,y=m===ya.DOWN,S=m===ya.LEFT,x=m===ya.RIGHT,C=k||S,B=S||x,I=k||y,P=B||I,E=p||g||b||v,L=I?go.isVerticalEdge:go.isHorizontalEdge,{ownerDocument:T}=s,{defaultView:O}=T;if(!P||o().isPreviewMode)return;if(r()){if(p||!n())return;f.preventDefault(),C?i(e()):i(t(),-1);return}if(!r_e(h,m,E))return;I?a||(a=(0,go.computeCaretRect)(O)):a=null;let D=(0,go.isRTL)(h)?!C:C,{keepCaretInsideBlock:U}=o();if(p)u(h,C)&&L(h,C)&&(s.contentEditable=!0,s.focus());else if(I&&(0,go.isVerticalEdge)(h,C)&&(!b||(0,go.isHorizontalEdge)(h,D))&&!U){let G=MD(h,C,s,!0);G&&((0,go.placeCaretAtVerticalEdge)(G,b?!C:C,b?void 0:a),f.preventDefault())}else if(B&&O.getSelection().isCollapsed&&(0,go.isHorizontalEdge)(h,D)&&!U){let G=MD(h,D,s);(0,go.placeCaretAtHorizontalEdge)(G,C),f.preventDefault()}}return s.addEventListener("mousedown",c),s.addEventListener("keydown",d),()=>{s.removeEventListener("mousedown",c),s.removeEventListener("keydown",d)}},[])}var q9=l(Z(),1),Z9=l(F(),1),Sa=l(it(),1);function X9(){let e=(0,Z9.useSelect)(t=>t(_).getSettings().isPreviewMode,[]);return(0,q9.useRefEffect)(t=>{if(!e)return;function o(r){let{keyCode:n,shiftKey:i,target:s}=r,a=n===Sa.TAB,c=n===Sa.UP,u=n===Sa.DOWN,d=n===Sa.LEFT;if(!a&&!(c||u||d||n===Sa.RIGHT))return;let h=a?i:c||d,p=Array.from(t.querySelectorAll("[data-block]"));if(!p.length)return;let g=s.closest("[data-block]"),b=g?p.indexOf(g):-1;if(b===-1||a&&(h&&b===0||!h&&b===p.length-1))return;let v;h?v=b<=0?p.length-1:b-1:v=b===-1||b>=p.length-1?0:b+1,r.preventDefault(),p[v].focus()}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}},[e])}var Q9=l(Fe(),1),y1=l(F(),1),J9=l(Is(),1),eG=l(Z(),1);function tG(){let{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:o}=(0,y1.useSelect)(_),{multiSelect:r,selectBlock:n}=(0,y1.useDispatch)(_),i=(0,J9.__unstableUseShortcutEventMatch)();return(0,eG.useRefEffect)(s=>{function a(c){if(!i("core/block-editor/select-all",c))return;let u=t();if(u.length<2&&!(0,Q9.isEntirelySelected)(c.target))return;c.preventDefault();let{ownerDocument:d}=c.target,[f]=u,m=Ni(d.activeElement);if(m&&m!==f&&!va(d.getElementById("block-"+f),d.activeElement)){n(m);return}let h=o(f),p=e(h);if(u.length===p.length){h&&(s.ownerDocument.defaultView.getSelection().removeAllRanges(),n(h));return}r(p[0],p[p.length-1])}return s.addEventListener("keydown",a),()=>{s.removeEventListener("keydown",a)}},[])}var S1=l(F(),1),rG=l(Z(),1);function oG(e,t){e.contentEditable=t,t&&e.focus()}function nG(){let{startMultiSelect:e,stopMultiSelect:t}=(0,S1.useDispatch)(_),{getSettings:o,isSelectionEnabled:r,hasSelectedBlock:n,isDraggingBlocks:i,isMultiSelecting:s}=(0,S1.useSelect)(_);return(0,rG.useRefEffect)(a=>{let{ownerDocument:c}=a,{defaultView:u}=c,d,f;function m(){t(),u.removeEventListener("mouseup",m),f=u.requestAnimationFrame(()=>{if(!n())return;oG(a,!1);let b=u.getSelection();if(b.rangeCount){let v=b.getRangeAt(0),{commonAncestorContainer:k}=v,y=v.cloneRange();d.contains(k)&&(d.focus(),b.removeAllRanges(),b.addRange(y))}})}let h;function p({target:b}){h=b}function g({buttons:b,target:v,relatedTarget:k}){v.contains(h)&&(v.contains(k)||i()||b===1&&(s()||a!==v&&(v.getAttribute("contenteditable")!=="true"&&!o().isPreviewMode||r()&&(d=v,e(),u.addEventListener("mouseup",m),oG(a,!0)))))}return a.addEventListener("mouseout",g),a.addEventListener("mousedown",p),()=>{a.removeEventListener("mouseout",g),u.removeEventListener("mouseup",m),u.cancelAnimationFrame(f)}},[e,t,r,n])}var _1=l(F(),1),aG=l(Z(),1),DD=l(dr(),1),lG=l(Fe(),1);function n_e(e){let{anchorNode:t,anchorOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===0?t:t.childNodes[o-1]}function i_e(e){let{focusNode:t,focusOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===t.childNodes.length?t:o===0&&(0,lG.isSelectionForward)(e)?t.previousSibling??t.parentElement:t.childNodes[o]}function s_e(e,t){let o=0;for(;e[o]===t[o];)o++;return o}function iG(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t,t&&e.focus())}function sG(e){return(e.nodeType===e.ELEMENT_NODE?e:e.parentElement)?.closest("[data-wp-block-attribute-key]")}function cG(){let{multiSelect:e,selectBlock:t,selectionChange:o}=(0,_1.useDispatch)(_),{getBlockParents:r,getBlockSelectionStart:n,isMultiSelecting:i}=(0,_1.useSelect)(_);return(0,aG.useRefEffect)(s=>{let{ownerDocument:a}=s,{defaultView:c}=a;function u(d){let f=c.getSelection();if(!f.rangeCount)return;let m=n_e(f),h=i_e(f);if(!s.contains(m)||!s.contains(h))return;let p=d.shiftKey&&d.type==="mouseup";if(f.isCollapsed&&!p){if(s.contentEditable==="true"&&!i()){iG(s,!1);let k=m.nodeType===m.ELEMENT_NODE?m:m.parentElement;k=k?.closest("[contenteditable]"),k?.focus()}return}let g=Ni(m),b=Ni(h);if(p){let k=n(),y=Ni(d.target),S=y!==b;(g===b&&f.isCollapsed||!b||S)&&(b=y),g!==k&&(g=k)}if(g===void 0&&b===void 0){iG(s,!1);return}if(d.type==="mouseup"&&!d.shiftKey&&!i()&&g===b){let k=Ni(d.target);if(k&&k!==g){f.removeAllRanges();return}}if(g===b)i()?e(g,g):t(g);else{let k=[...r(g),g],y=[...r(b),b],S=s_e(k,y);if(k[S]!==g||y[S]!==b){e(k[S],y[S]);return}let x=sG(m),C=sG(h);if(x&&C){let B=f.getRangeAt(0),I=(0,DD.create)({element:x,range:B,__unstableIsEditableTree:!0}),P=(0,DD.create)({element:C,range:B,__unstableIsEditableTree:!0}),E=I.start??I.end,L=P.start??P.end;o({start:{clientId:g,attributeKey:x.dataset.wpBlockAttributeKey,offset:E},end:{clientId:b,attributeKey:C.dataset.wpBlockAttributeKey,offset:L}})}else e(g,b)}}return a.addEventListener("selectionchange",u),c.addEventListener("mouseup",u),()=>{a.removeEventListener("selectionchange",u),c.removeEventListener("mouseup",u)}},[e,t,o,r])}var x1=l(F(),1),uG=l(Z(),1);function dG(){let{selectBlock:e}=(0,x1.useDispatch)(_),{isSelectionEnabled:t,getBlockSelectionStart:o,hasMultiSelection:r}=(0,x1.useSelect)(_);return(0,uG.useRefEffect)(n=>{function i(s){if(!t()||s.button!==0)return;let a=o(),c=Ni(s.target);s.shiftKey?a&&a!==c&&(n.contentEditable=!0,n.focus()):r()&&e(c)}return n.addEventListener("mousedown",i),()=>{n.removeEventListener("mousedown",i)}},[e,t,o,r])}var w1=l(F(),1),fG=l(Z(),1),Ll=l(it(),1),Ps=l($(),1);function mG(){let{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,getSelectedBlockClientId:o,__unstableIsSelectionMergeable:r,hasMultiSelection:n,getBlockName:i,canInsertBlockType:s,getBlockRootClientId:a,getSelectionStart:c,getSelectionEnd:u,getBlockAttributes:d}=(0,w1.useSelect)(_),{replaceBlocks:f,__unstableSplitSelection:m,removeBlocks:h,__unstableDeleteSelection:p,__unstableExpandSelection:g,__unstableMarkAutomaticChange:b}=(0,w1.useDispatch)(_);return(0,fG.useRefEffect)(v=>{function k(x){v.contentEditable==="true"&&x.preventDefault()}function y(x){if(!x.defaultPrevented){if(!n()){if(x.keyCode===Ll.ENTER){if(x.shiftKey||e())return;let C=o(),B=i(C),I=c(),P=u();if(I.attributeKey===P.attributeKey){let E=d(C)[I.attributeKey],L=(0,Ps.getBlockTransforms)("from").filter(({type:O})=>O==="enter"),T=(0,Ps.findTransform)(L,O=>O.regExp.test(E));if(T){f(C,T.transform({content:E})),b();return}}if(!(0,Ps.hasBlockSupport)(B,"splitting",!1)&&!x.__deprecatedOnSplit)return;(s((0,Ps.getDefaultBlockName)(),a(C))||s(B,a(C)))&&(m(),x.preventDefault())}return}x.keyCode===Ll.ENTER?(v.contentEditable=!1,x.preventDefault(),e()?f(t(),(0,Ps.createBlock)((0,Ps.getDefaultBlockName)())):m()):x.keyCode===Ll.BACKSPACE||x.keyCode===Ll.DELETE?(v.contentEditable=!1,x.preventDefault(),e()?h(t()):r()?p(x.keyCode===Ll.DELETE):g()):x.key.length===1&&!(x.metaKey||x.ctrlKey)&&(v.contentEditable=!1,r()?p(x.keyCode===Ll.DELETE):(x.preventDefault(),v.ownerDocument.defaultView.getSelection().removeAllRanges()))}}function S(x){n()&&(v.contentEditable=!1,r()?p():(x.preventDefault(),v.ownerDocument.defaultView.getSelection().removeAllRanges()))}return v.addEventListener("beforeinput",k),v.addEventListener("keydown",y),v.addEventListener("compositionstart",S),()=>{v.removeEventListener("beforeinput",k),v.removeEventListener("keydown",y),v.removeEventListener("compositionstart",S)}},[])}var _a=l($(),1),B1=l(Fe(),1),Lh=l(F(),1),yG=l(Z(),1);var pG=l(R(),1),hG=l($(),1),_y=l(F(),1),Di=l(N(),1),gG=l(Un(),1);function Oh(){let{getBlockName:e}=(0,_y.useSelect)(_),{getBlockType:t}=(0,_y.useSelect)(hG.store),{createSuccessNotice:o}=(0,_y.useDispatch)(gG.store);return(0,pG.useCallback)((r,n)=>{let i="";if(r==="copyStyles")i=(0,Di.__)("Styles copied to clipboard.");else if(n.length===1){let s=n[0],a=t(e(s))?.title;r==="copy"?i=(0,Di.sprintf)((0,Di.__)('Copied "%s" to clipboard.'),a):i=(0,Di.sprintf)((0,Di.__)('Moved "%s" to clipboard.'),a)}else r==="copy"?i=(0,Di.sprintf)((0,Di._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",n.length),n.length):i=(0,Di.sprintf)((0,Di._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",n.length),n.length);o(i,{type:"snackbar"})},[o,e,t])}var kG=l(Fe(),1),Vi=l($(),1);var bG=l(Fe(),1);function a_e(e){let t="<!--StartFragment-->",o=e.indexOf(t);if(o>-1)e=e.substring(o+t.length);else return e;let n=e.indexOf("<!--EndFragment-->");return n>-1&&(e=e.substring(0,n)),e}function l_e(e){let t="<meta charset='utf-8'>";return e.startsWith(t)?e.slice(t.length):e}function Ah({clipboardData:e}){let t="",o="";try{t=e.getData("text/plain"),o=e.getData("text/html")}catch{return}o=a_e(o),o=l_e(o);let r=(0,bG.getFilesFromDataTransfer)(e);return r.length&&!c_e(r,o)?{files:r}:{html:o,plainText:t,files:[]}}function c_e(e,t){if(t&&e?.length===1&&e[0].type.indexOf("image/")===0){let o=/<\s*img\b/gi;if(t.match(o)?.length!==1)return!0;let r=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(r))return!0}return!1}var VD=Symbol("requiresWrapperOnCopy");function C1(e,t,o){let r=t,[n]=t;if(n&&o.select(Vi.store).getBlockType(n.name)[VD]){let{getBlockRootClientId:a,getBlockName:c,getBlockAttributes:u}=o.select(_),d=a(n.clientId),f=c(d);f&&(r=(0,Vi.createBlock)(f,u(d),r))}let i=(0,Vi.serialize)(r);e.clipboardData.setData("text/plain",u_e(i)),e.clipboardData.setData("text/html",i)}function vG(e,t){let{plainText:o,html:r,files:n}=Ah(e),i=[];if(n.length){let s=(0,Vi.getBlockTransforms)("from");i=n.reduce((a,c)=>{let u=(0,Vi.findTransform)(s,d=>d.type==="files"&&d.isMatch([c]));return u&&a.push(u.transform([c])),a},[]).flat()}else i=(0,Vi.pasteHandler)({HTML:r,plainText:o,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return i}function u_e(e){return e=e.replace(/<br>/g,`
`),(0,kG.__unstableStripHTML)(e).trim().replace(/\n\n+/g,`

`)}function xy(){let e=(0,Lh.useRegistry)(),{getBlocksByClientId:t,getSelectedBlockClientIds:o,hasMultiSelection:r,getSettings:n,getBlockName:i,__unstableIsFullySelected:s,__unstableIsSelectionCollapsed:a,__unstableIsSelectionMergeable:c,__unstableGetSelectedBlocksWithPartialSelection:u,canInsertBlockType:d,getBlockRootClientId:f}=(0,Lh.useSelect)(_),{flashBlock:m,removeBlocks:h,replaceBlocks:p,__unstableDeleteSelection:g,__unstableExpandSelection:b,__unstableSplitSelection:v}=(0,Lh.useDispatch)(_),k=Oh();return(0,yG.useRefEffect)(y=>{function S(x){if(x.defaultPrevented)return;let C=o();if(C.length===0)return;if(!r()){let{target:L}=x,{ownerDocument:T}=L;if(x.type==="copy"||x.type==="cut"?(0,B1.documentHasUncollapsedSelection)(T):(0,B1.documentHasSelection)(T)&&!T.activeElement.isContentEditable)return}let{activeElement:B}=x.target.ownerDocument;if(!y.contains(B))return;let I=c(),P=a()||s(),E=!P&&!I;if(x.type==="copy"||x.type==="cut")if(x.preventDefault(),C.length===1&&m(C[0]),E)b();else{k(x.type,C);let L;if(P)L=t(C);else{let[T,O]=u(),D=t(C.slice(1,C.length-1));L=[T,...D,O]}C1(x,L,e)}if(x.type==="cut")P&&!E?h(C):(x.target.ownerDocument.activeElement.contentEditable=!1,g());else if(x.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:L,mediaUpload:T}=n();if(x.clipboardData.getData("rich-text")==="true")return;let{plainText:D,html:U,files:G}=Ah(x),j=s(),z=[];if(G.length){if(!T){x.preventDefault();return}let ce=(0,_a.getBlockTransforms)("from");z=G.reduce((ie,re)=>{let Q=(0,_a.findTransform)(ce,Y=>Y.type==="files"&&Y.isMatch([re]));return Q&&ie.push(Q.transform([re])),ie},[]).flat()}else z=(0,_a.pasteHandler)({HTML:U,plainText:D,mode:j?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:L});if(typeof z=="string")return;if(j){p(C,z,z.length-1,-1),x.preventDefault();return}if(!r()&&!(0,_a.hasBlockSupport)(i(C[0]),"splitting",!1)&&!x.__deprecatedOnSplit)return;let[W]=C,ee=f(W),se=[];for(let ce of z)if(d(ce.name,ee))se.push(ce);else{let ie=i(ee),re=ce.name!==ie?(0,_a.switchToBlockType)(ce,ie):[ce];if(!re)return;for(let Q of re)for(let Y of Q.innerBlocks)se.push(Y)}v(se),x.preventDefault()}}return y.ownerDocument.addEventListener("copy",S),y.ownerDocument.addEventListener("cut",S),y.ownerDocument.addEventListener("paste",S),()=>{y.ownerDocument.removeEventListener("copy",S),y.ownerDocument.removeEventListener("cut",S),y.ownerDocument.removeEventListener("paste",S)}},[])}var Nh=l(w(),1);function FD(){let[e,t,o]=$9(),r=(0,SG.useSelect)(n=>n(_).hasMultiSelection(),[]);return[e,(0,wy.useMergeRefs)([t,xy(),mG(),nG(),cG(),dG(),W9(),tG(),Y9(),X9(),(0,wy.useRefEffect)(n=>(n.tabIndex=0,n.dataset.hasMultiSelection=r,r?(n.setAttribute("aria-label",(0,_G.__)("Multiple selected blocks")),()=>{delete n.dataset.hasMultiSelection,n.removeAttribute("aria-label")}):()=>{delete n.dataset.hasMultiSelection}),[r])]),o]}function d_e({children:e,...t},o){let[r,n,i]=FD();return(0,Nh.jsxs)(Nh.Fragment,{children:[r,(0,Nh.jsx)("div",{...t,ref:(0,wy.useMergeRefs)([n,o]),className:V(t.className,"block-editor-writing-flow"),children:e}),i]})}var E1=(0,xG.forwardRef)(d_e);var T1=null;function wG(){return T1||(T1=Array.from(document.styleSheets).reduce((e,t)=>{try{t.cssRules}catch{return e}let{ownerNode:o,cssRules:r}=t;if(o===null||!r||o.id.startsWith("wp-")||!o.id)return e;function n(i){return Array.from(i).find(({selectorText:s,conditionText:a,cssRules:c})=>a?n(c):s&&(s.includes(".editor-styles-wrapper")||s.includes(".wp-block")))}if(n(r)){let i=o.tagName==="STYLE";if(i){let s=o.id.replace("-inline-css","-css"),a=document.getElementById(s);a&&e.push(a.cloneNode(!0))}if(e.push(o.cloneNode(!0)),!i){let s=o.id.replace("-css","-inline-css"),a=document.getElementById(s);a&&e.push(a.cloneNode(!0))}}return e},[]),T1)}var kn=l(R(),1),Cy=l(Z(),1);function CG({frameSize:e,containerWidth:t,maxContainerWidth:o,scaleContainerWidth:r}){return(Math.min(t,o)-e*2)/r}function f_e(e,t){let{scaleValue:o,scrollHeight:r}=e,{frameSize:n,scaleValue:i}=t;return r*(i/o)+n*2}function m_e(e,t){let{containerHeight:o,frameSize:r,scaleValue:n,scrollTop:i}=e,{containerHeight:s,frameSize:a,scaleValue:c,scrollHeight:u}=t,d=i;d=(d+o/2-r)/n-o/2,d=(d+s/2)*c+a-s/2,d=i<=r?0:d;let f=u-s;return Math.round(Math.min(Math.max(0,d),Math.max(0,f)))}function p_e(e,t){let{scaleValue:o,frameSize:r,scrollTop:n}=e,{scaleValue:i,frameSize:s,scrollTop:a}=t;return[{translate:"0 0",scale:o,paddingTop:`${r/o}px`,paddingBottom:`${r/o}px`},{translate:`0 ${n-a}px`,scale:i,paddingTop:`${s/i}px`,paddingBottom:`${s/i}px`}]}function BG({frameSize:e,iframeDocument:t,maxContainerWidth:o=750,scale:r}){let[n,{height:i}]=(0,Cy.useResizeObserver)(),[s,{width:a,height:c}]=(0,Cy.useResizeObserver)(),u=(0,kn.useRef)(0),d=r!==1,f=(0,Cy.useReducedMotion)(),m=r==="auto-scaled",h=(0,kn.useRef)(!1),p=(0,kn.useRef)(null);(0,kn.useEffect)(()=>{d||(u.current=a)},[a,d]);let g=Math.max(u.current,a),b=m?CG({frameSize:e,containerWidth:a,maxContainerWidth:o,scaleContainerWidth:g}):r,v=(0,kn.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),k=(0,kn.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),y=(0,kn.useCallback)(()=>{let{scrollTop:C}=v.current,{scrollTop:B}=k.current;return t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top",`${C}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next",`${B}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior",v.current.scrollHeight===v.current.containerHeight?"auto":"scroll"),t.documentElement.classList.add("zoom-out-animation"),t.documentElement.animate(p_e(v.current,k.current),{easing:"cubic-bezier(0.46, 0.03, 0.52, 0.96)",duration:400})},[t]),S=(0,kn.useCallback)(()=>{h.current=!1,p.current=null,t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",k.current.scaleValue),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${k.current.frameSize}px`),t.documentElement.classList.remove("zoom-out-animation"),t.documentElement.scrollTop=k.current.scrollTop,t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior"),v.current=k.current},[t]),x=(0,kn.useRef)(!1);return(0,kn.useEffect)(()=>{let C=t&&x.current!==d;if(x.current=d,!!C&&(h.current=!0,!!d))return t.documentElement.classList.add("is-zoomed-out"),()=>{t.documentElement.classList.remove("is-zoomed-out")}},[t,d]),(0,kn.useEffect)(()=>{if(t&&(m&&v.current.scaleValue!==1&&(v.current.scaleValue=CG({frameSize:v.current.frameSize,containerWidth:a,maxContainerWidth:o,scaleContainerWidth:a})),b<1&&(h.current||(t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",b),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${e}px`)),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-content-height",`${i}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-inner-height",`${c}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-container-width",`${a}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale-container-width",`${g}px`)),h.current))if(h.current=!1,p.current){p.current.reverse();let C=v.current,B=k.current;v.current=B,k.current=C}else v.current.scrollTop=t.documentElement.scrollTop,v.current.scrollHeight=t.documentElement.scrollHeight,v.current.containerHeight=c,k.current={scaleValue:b,frameSize:e,containerHeight:t.documentElement.clientHeight},k.current.scrollHeight=f_e(v.current,k.current),k.current.scrollTop=m_e(v.current,k.current),p.current=y(),f?S():p.current.onfinish=S},[y,S,f,m,b,e,t,i,a,c,o,g]),{isZoomedOut:d,scaleContainerWidth:g,contentResizeListener:n,containerResizeListener:s}}var Rs=l(w(),1);function PG(e,t,o){let r={};for(let s in e)r[s]=e[s];if(e instanceof o.contentDocument.defaultView.MouseEvent){let s=o.getBoundingClientRect();r.clientX+=s.left,r.clientY+=s.top}let n=new t(e.type,r);r.defaultPrevented&&n.preventDefault(),!o.dispatchEvent(n)&&e.preventDefault()}function h_e(e){return(0,Vu.useRefEffect)(()=>{let{defaultView:t}=e;if(!t)return;let{frameElement:o}=t,r=e.documentElement,n=["dragover","mousemove"],i={};for(let s of n)i[s]=a=>{let u=Object.getPrototypeOf(a).constructor.name,d=window[u];PG(a,d,o)},r.addEventListener(s,i[s]);return()=>{for(let s of n)r.removeEventListener(s,i[s])}})}var EG=new WeakMap,g_e=globalThis.FinalizationRegistry?new globalThis.FinalizationRegistry(e=>URL.revokeObjectURL(e)):void 0;function b_e(e){let t=EG.get(e);if(t)return t;let o=`<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<base href="${window.location.href}">
		<script>window.frameElement._load()<\/script>
		<style>
			html{
				height: auto !important;
				min-height: 100%;
			}
			/* Lowest specificity to not override global styles */
			:where(body) {
				margin: 0;
				/* Default background color in case zoom out mode background
				colors the html element */
				background-color: white;
			}
		</style>
		${e.styles??""}
		${e.scripts??""}
	</head>
	<body>
		<script>document.currentScript.parentElement.remove()<\/script>
	</body>
</html>`;return t=URL.createObjectURL(new Blob([o],{type:"text/html"})),EG.set(e,t),g_e?.register(e,t),t}function k_e({contentRef:e,children:t,tabIndex:o=0,scale:r=1,frameSize:n=0,readonly:i,forwardedRef:s,title:a=(0,TG.__)("Editor canvas"),...c}){let{resolvedAssets:u,isPreviewMode:d}=(0,zD.useSelect)(T=>{let O=T(_).getSettings();return{resolvedAssets:O.__unstableResolvedAssets,isPreviewMode:O.isPreviewMode}},[]),[f,m]=(0,om.useState)(),[h,p]=(0,om.useState)([]),[g,b,v]=FD(),k=(0,Vu.useRefEffect)(T=>{T._load=()=>{m(T.contentDocument)};let O;function D(z){z.preventDefault()}function U(z){z.target.tagName==="A"&&z.target.getAttribute("href")?.startsWith("#")&&(z.preventDefault(),O.defaultView.location.hash=z.target.getAttribute("href").slice(1))}let{ownerDocument:G}=T;p(Array.from(G.body.classList).filter(z=>z.startsWith("admin-color-")||z.startsWith("post-type-")||z==="wp-embed-responsive"));function j(){let{contentDocument:z}=T,{documentElement:W}=z;O=z,W.classList.add("block-editor-iframe__html"),z.dir=G.dir;for(let ee of wG())z.getElementById(ee.id)||(z.head.appendChild(ee.cloneNode(!0)),d||console.warn(`${ee.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,ee));O.addEventListener("dragover",D,!1),O.addEventListener("drop",D,!1),O.addEventListener("click",U)}return T.addEventListener("load",j),()=>{delete T._load,T.removeEventListener("load",j),O?.removeEventListener("dragover",D),O?.removeEventListener("drop",D),O?.removeEventListener("click",U)}},[]),{contentResizeListener:y,containerResizeListener:S,isZoomedOut:x,scaleContainerWidth:C}=BG({scale:r,frameSize:parseInt(n),iframeDocument:f}),B=(0,Vu.useDisabled)({isDisabled:!i}),I=(0,Vu.useMergeRefs)([h_e(f),e,b,B]),P=b_e(u),E=o>=0&&!d,L=(0,Rs.jsxs)(Rs.Fragment,{children:[E&&g,(0,Rs.jsx)("iframe",{...c,style:{...c.style,height:c.style?.height,border:0},ref:(0,Vu.useMergeRefs)([s,k]),tabIndex:o,src:P,title:a,onKeyDown:T=>{if(c.onKeyDown&&c.onKeyDown(T),T.currentTarget.ownerDocument!==T.target.ownerDocument){let{stopPropagation:O}=T.nativeEvent;T.nativeEvent.stopPropagation=()=>{},T.stopPropagation(),T.nativeEvent.stopPropagation=O,PG(T,window.KeyboardEvent,T.currentTarget)}},children:f&&(0,om.createPortal)((0,Rs.jsxs)("body",{ref:I,className:V("block-editor-iframe__body","editor-styles-wrapper",...h),children:[y,(0,Rs.jsx)(IG.__experimentalStyleProvider,{document:f,children:t})]}),f.documentElement)}),E&&v]});return(0,Rs.jsxs)("div",{className:"block-editor-iframe__container",children:[S,(0,Rs.jsx)("div",{className:V("block-editor-iframe__scale-container",x&&"is-zoomed-out"),style:{"--wp-block-editor-iframe-zoom-out-scale-container-width":x&&`${C}px`},children:L})]})}function v_e(e,t){return(0,zD.useSelect)(r=>r(_).getSettings().__internalIsInitialized,[])?(0,Rs.jsx)(k_e,{...e,forwardedRef:t}):null}var Mh=(0,om.forwardRef)(v_e);var x$=l(A(),1),Hh=l(R(),1),w$=l(F(),1);var P1={attribute:/\[\s*(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?(?<name>[-\w\P{ASCII}]+)\s*(?:(?<operator>\W?=)\s*(?<value>.+?)\s*(\s(?<caseSensitive>[iIsS]))?\s*)?\]/gu,id:/#(?<name>[-\w\P{ASCII}]+)/gu,class:/\.(?<name>[-\w\P{ASCII}]+)/gu,comma:/\s*,\s*/g,combinator:/\s*[\s>+~]\s*/g,"pseudo-element":/::(?<name>[-\w\P{ASCII}]+)(?:\((?<argument>Â¶*)\))?/gu,"pseudo-class":/:(?<name>[-\w\P{ASCII}]+)(?:\((?<argument>Â¶*)\))?/gu,universal:/(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?\*/gu,type:/(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?(?<name>[-\w\P{ASCII}]+)/gu},y_e=new Set(["combinator","comma"]);var S_e=e=>{switch(e){case"pseudo-element":case"pseudo-class":return new RegExp(P1[e].source.replace("(?<argument>\xB6*)","(?<argument>.*)"),"gu");default:return P1[e]}};function __e(e,t){let o=0,r="";for(;t<e.length;t++){let n=e[t];switch(n){case"(":++o;break;case")":--o;break}if(r+=n,o===0)return r}return r}function x_e(e,t=P1){if(!e)return[];let o=[e];for(let[n,i]of Object.entries(t))for(let s=0;s<o.length;s++){let a=o[s];if(typeof a!="string")continue;i.lastIndex=0;let c=i.exec(a);if(!c)continue;let u=c.index-1,d=[],f=c[0],m=a.slice(0,u+1);m&&d.push(m),d.push({...c.groups,type:n,content:f});let h=a.slice(u+f.length+1);h&&d.push(h),o.splice(s,1,...d)}let r=0;for(let n of o)switch(typeof n){case"string":throw new Error(`Unexpected sequence ${n} found at index ${r}`);case"object":r+=n.content.length,n.pos=[r-n.content.length,r],y_e.has(n.type)&&(n.content=n.content.trim()||" ");break}return o}var w_e=/(['"])([^\\\n]+?)\1/g,C_e=/\\./g;function jD(e,t=P1){if(e=e.trim(),e==="")return[];let o=[];e=e.replace(C_e,(i,s)=>(o.push({value:i,offset:s}),"\uE000".repeat(i.length))),e=e.replace(w_e,(i,s,a,c)=>(o.push({value:i,offset:c}),`${s}${"\uE001".repeat(a.length)}${s}`));{let i=0,s;for(;(s=e.indexOf("(",i))>-1;){let a=__e(e,s);o.push({value:a,offset:s}),e=`${e.substring(0,s)}(${"\xB6".repeat(a.length-2)})${e.substring(s+a.length)}`,i=s+a.length}}let r=x_e(e,t),n=new Set;for(let i of o.reverse())for(let s of r){let{offset:a,value:c}=i;if(!(s.pos[0]<=a&&a+c.length<=s.pos[1]))continue;let{content:u}=s,d=a-s.pos[0];s.content=u.slice(0,d)+c+u.slice(d+c.length),s.content!==u&&n.add(s)}for(let i of n){let s=S_e(i.type);if(!s)throw new Error(`Unknown token type: ${i.type}`);s.lastIndex=0;let a=s.exec(i.content);if(!a)throw new Error(`Unable to parse content for ${i.type}: ${i.content}`);Object.assign(i,a.groups)}return r}function*I1(e,t){switch(e.type){case"list":for(let o of e.list)yield*I1(o,e);break;case"complex":yield*I1(e.left,e),yield*I1(e.right,e);break;case"compound":yield*e.list.map(o=>[o,e]);break;default:yield[e,t]}}function RG(e){let t;return Array.isArray(e)?t=e:t=[...I1(e)].map(([o])=>o),t.map(o=>o.content).join("")}var k$=l(XW(),1),v$=l(A1(),1),y$=l(e$(),1),S$=l(g$(),1),b$=new Map,_$=[{type:"type",content:"body"},{type:"type",content:"html"},{type:"pseudo-class",content:":root"},{type:"pseudo-class",content:":where(body)"},{type:"pseudo-class",content:":where(:root)"},{type:"pseudo-class",content:":where(html)"}];function D0e(e,t){let o=jD(t),r=o.findLastIndex(({content:s,type:a})=>_$.some(c=>s===c.content&&a===c.type)),n=-1;for(let s=r+1;s<o.length;s++)if(o[s].type==="combinator"){n=s;break}let i=jD(e);return o.splice(n===-1?o.length:n,0,{type:"combinator",content:" "},...i),RG(o)}function V0e({css:e,ignoredSelectors:t=[],baseURL:o},r="",n){if(!r&&!o)return e;try{let i=[...t,...n?.ignoredSelectors??[],r];return new k$.default([r&&(0,y$.default)({prefix:r,transform(s,a,c){return i.some(d=>d instanceof RegExp?a.match(d):a.includes(d))?a:_$.some(d=>a.startsWith(d.content))?D0e(s,a):c}}),o&&(0,S$.default)({rootUrl:o})].filter(Boolean)).process(e,{}).css}catch(i){return i instanceof v$.default?console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",i.message+`
`+i.showSourceCode(!1)):console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",i),null}}var F0e=(e,t="",o)=>{let r=b$.get(t);return r||(r=new WeakMap,b$.set(t,r)),e.map(n=>{let i=r.get(n);return i||(i=V0e(n,t,o),r.set(n,i)),i})},Uh=F0e;var Uu=l(w(),1);Kc([Yc,Op]);function z0e(e,t){return(0,Hh.useCallback)(o=>{if(!o)return;let{ownerDocument:r}=o,{defaultView:n,body:i}=r,s=t?r.querySelector(t):i,a;if(s)a=n?.getComputedStyle(s,null).getPropertyValue("background-color");else{let u=r.createElement("div");u.classList.add("editor-styles-wrapper"),i.appendChild(u),a=n?.getComputedStyle(u,null).getPropertyValue("background-color"),i.removeChild(u)}let c=Bt(a);c.luminance()>.5||c.alpha()===0?i.classList.remove("is-dark-theme"):i.classList.add("is-dark-theme")},[e,t])}function j0e({styles:e,scope:t,transformOptions:o}){let r=(0,w$.useSelect)(s=>M(s(_)).getStyleOverrides(),[]),[n,i]=(0,Hh.useMemo)(()=>{let s=Object.values(e??[]);for(let[a,c]of r){let u=s.findIndex(({id:f})=>a===f),d={...c,id:a};u===-1?s.push(d):s[u]=d}return[Uh(s.filter(a=>a?.css),t,o),s.filter(a=>a.__unstableType==="svgs").map(a=>a.assets).join("")]},[e,r,t,o]);return(0,Uu.jsxs)(Uu.Fragment,{children:[(0,Uu.jsx)("style",{ref:z0e(n,t)}),n.map((s,a)=>(0,Uu.jsx)("style",{children:s},a)),(0,Uu.jsx)(x$.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 0 0",width:"0",height:"0",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"},dangerouslySetInnerHTML:{__html:i}})]})}var Nl=(0,Hh.memo)(j0e);var Fi=l(w(),1),U0e=(0,q1.memo)(Gh),_5=2e3,H0e=[];function G0e({viewportWidth:e,containerWidth:t,minHeight:o,additionalStyles:r=H0e}){e||(e=t);let[n,{height:i}]=(0,Dy.useResizeObserver)(),{styles:s}=(0,C$.useSelect)(d=>({styles:d(_).getSettings().styles}),[]),a=(0,q1.useMemo)(()=>s&&[...s,{css:"body{height:auto;overflow:hidden;border:none;padding:0;}",__unstableType:"presets"},...r],[s,r]),c=t/e,u=i?t/(i*c):0;return(0,Fi.jsx)(B$.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${c})`,aspectRatio:u,maxHeight:i>_5?_5*c:void 0,minHeight:o},children:(0,Fi.jsxs)(Mh,{contentRef:(0,Dy.useRefEffect)(d=>{let{ownerDocument:{documentElement:f}}=d;f.classList.add("block-editor-block-preview__content-iframe"),f.style.position="absolute",f.style.width="100%",d.style.boxSizing="border-box",d.style.position="absolute",d.style.width="100%"},[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:e,height:i,pointerEvents:"none",maxHeight:_5,minHeight:c!==0&&c<1&&o?o/c:o},children:[(0,Fi.jsx)(Nl,{styles:a}),n,(0,Fi.jsx)(U0e,{renderAppender:!1})]})})}function E$(e){let[t,{width:o}]=(0,Dy.useResizeObserver)();return(0,Fi.jsxs)(Fi.Fragment,{children:[(0,Fi.jsx)("div",{style:{position:"relative",width:"100%",height:0},children:t}),(0,Fi.jsx)("div",{className:"block-editor-block-preview__container",children:!!o&&(0,Fi.jsx)(G0e,{...e,containerWidth:o})})]})}var Wh=l(R(),1),R$=l(I$(),1),P$=(0,R$.createQueue)();function O$({children:e,placeholder:t}){let[o,r]=(0,Wh.useState)(!1);return(0,Wh.useEffect)(()=>{let n={};return P$.add(n,()=>{(0,Wh.flushSync)(()=>{r(!0)})}),()=>{P$.cancel(n)}},[]),o?e:t}var am=l(w(),1),W0e=[];function $0e({blocks:e,viewportWidth:t=1200,minHeight:o,additionalStyles:r=W0e,__experimentalMinHeight:n,__experimentalPadding:i}){n&&(o=n,(0,x5.default)("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),i&&(r=[...r,{css:`body { padding: ${i}px; }`}],(0,x5.default)("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));let s=(0,w5.useSelect)(u=>u(_).getSettings(),[]),a=(0,sm.useMemo)(()=>({...s,focusMode:!1,isPreviewMode:!0}),[s]),c=(0,sm.useMemo)(()=>Array.isArray(e)?e:[e],[e]);return!e||e.length===0?null:(0,am.jsx)(Ph,{value:c,settings:a,children:(0,am.jsx)(E$,{viewportWidth:t,minHeight:o,additionalStyles:r})})}var A$=(0,sm.memo)($0e);A$.Async=O$;var vn=A$;function L$({blocks:e,props:t={},layout:o}){let r=(0,w5.useSelect)(u=>u(_).getSettings(),[]),n=(0,sm.useMemo)(()=>({...r,styles:void 0,focusMode:!1,isPreviewMode:!0}),[r]),i=(0,Z1.useDisabled)(),s=(0,Z1.useMergeRefs)([t.ref,i]),a=(0,sm.useMemo)(()=>Array.isArray(e)?e:[e],[e]),c=(0,am.jsxs)(Ph,{value:a,settings:n,children:[(0,am.jsx)(Nl,{}),(0,am.jsx)(Vy,{renderAppender:!1,layout:o})]});return{...t,ref:s,className:V(t.className,"block-editor-block-preview__live-content","components-disabled"),children:e?.length?c:null}}var Hu=l(w(),1);function K0e({item:e}){let{name:t,title:o,icon:r,description:n,initialAttributes:i,example:s}=e,a=(0,$h.isReusableBlock)(e),c=(0,N$.useMemo)(()=>s?(0,$h.getBlockFromExample)(t,{attributes:{...s.attributes,...i},innerBlocks:s.innerBlocks}):(0,$h.createBlock)(t,i),[t,s,i]),u=144,d=280,f=s?.viewportWidth??500,m=d/f,h=m!==0&&m<1&&u?u/m:u;return(0,Hu.jsxs)("div",{className:"block-editor-inserter__preview-container",children:[(0,Hu.jsx)("div",{className:"block-editor-inserter__preview",children:a||s?(0,Hu.jsx)("div",{className:"block-editor-inserter__preview-content",children:(0,Hu.jsx)(vn,{blocks:c,viewportWidth:f,minHeight:u,additionalStyles:[{css:`
										body { 
											padding: 24px;
											min-height:${Math.round(h)}px;
											display:flex;
											align-items:center;
										}
										.is-root-container { width: 100%; }
									`}]})}):(0,Hu.jsx)("div",{className:"block-editor-inserter__preview-content-missing",children:(0,M$.__)("No preview available.")})}),!a&&(0,Hu.jsx)(yy,{title:o,icon:r,description:n})]})}var X1=K0e;var Jh=l(N(),1),Vl=l(R(),1),R5=l(Z(),1);var Z$=l($(),1),X$=l(Z(),1);var Qh=l(R(),1),Gu=l($(),1),Y$=l(A(),1),Fy=l(it(),1);var G$=l(A(),1),W$=l(R(),1);var Kh=l(R(),1),D$=l(N(),1),V$=l(Xo(),1),F$=l(w(),1);function Y0e(e,t){let[o,r]=(0,Kh.useState)(!1);return(0,Kh.useEffect)(()=>{o&&(0,V$.speak)((0,D$.__)("Use left and right arrow keys to move through blocks"))},[o]),(0,F$.jsx)("div",{ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:n=>{!n.currentTarget.contains(n.relatedTarget)&&r(!1)},...e})}var C5=(0,Kh.forwardRef)(Y0e);var z$=l(R(),1),j$=l(A(),1),U$=l(w(),1);function q0e(e,t){return(0,U$.jsx)(j$.Composite.Group,{role:"presentation",ref:t,...e})}var B5=(0,z$.forwardRef)(q0e);var J1=l(A(),1),H$=l(R(),1),Q1=l(w(),1);function Z0e({isFirst:e,as:t,children:o,...r},n){return(0,Q1.jsx)(J1.Composite.Item,{ref:n,role:"option",accessibleWhenDisabled:!0,...r,render:i=>{let s={...i,tabIndex:e?0:i.tabIndex};return t?(0,Q1.jsx)(t,{...s,children:o}):typeof o=="function"?o(s):(0,Q1.jsx)(J1.Button,{__next40pxDefaultSize:!0,...s,children:o})}})}var E5=(0,H$.forwardRef)(Z0e);var T5=l(w(),1);function X0e({key:e,children:t}){return(0,T5.jsx)(W$.Fragment,{children:t},e)}function Q0e({children:e}){return(0,T5.jsx)(G$.Composite,{focusShift:!0,focusWrap:"horizontal",render:X0e,children:e})}var Yh=Q0e;var $$=l(A(),1),tB=l($(),1),oB=l(F(),1),K$=l(R(),1);var Zh=l(N(),1),qh=l(A(),1);var As=l(w(),1);function eB({count:e,icon:t,isPattern:o,fadeWhenDisabled:r}){let n=o&&(0,Zh.__)("Pattern");return(0,As.jsx)("div",{className:"block-editor-block-draggable-chip-wrapper",children:(0,As.jsx)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip",children:(0,As.jsxs)(qh.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content",children:[(0,As.jsx)(qh.FlexItem,{children:t?(0,As.jsx)(Ae,{icon:t}):n||(0,Zh.sprintf)((0,Zh._n)("%d block","%d blocks",e),e)}),(0,As.jsx)(qh.FlexItem,{children:(0,As.jsx)(Ae,{icon:tv})}),r&&(0,As.jsx)(qh.FlexItem,{className:"block-editor-block-draggable-chip__disabled",children:(0,As.jsx)("span",{className:"block-editor-block-draggable-chip__disabled-icon"})})]})})})}var I5=l(w(),1),J0e=({isEnabled:e,blocks:t,icon:o,children:r,pattern:n})=>{let i=t.length===1?t[0].name:void 0,s=(0,oB.useSelect)(f=>i&&f(tB.store).getBlockType(i)?.icon,[i]),{startDragging:a,stopDragging:c}=M((0,oB.useDispatch)(_)),u=(0,K$.useMemo)(()=>n?.type===Nt.user&&n?.syncStatus!=="unsynced"?[(0,tB.createBlock)("core/block",{ref:n.id})]:void 0,[n?.type,n?.syncStatus,n?.id]);if(!e)return r({draggable:!1,onDragStart:void 0,onDragEnd:void 0});let d=u??t;return(0,I5.jsx)($$.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:{type:"inserter",blocks:d},onDragStart:f=>{a();let m=new Set;for(let h of d){let p=`wp-block:${h.name}`;m.has(p)||(f.dataTransfer.items.add("",p),m.add(p))}},onDragEnd:()=>{c()},__experimentalDragComponent:(0,I5.jsx)(eB,{count:t.length,icon:o||!n&&s,isPattern:!!n}),children:({onDraggableStart:f,onDraggableEnd:m})=>r({draggable:!0,onDragStart:f,onDragEnd:m})})},Xh=J0e;var Ml=l(w(),1);function exe({className:e,isFirst:t,item:o,onSelect:r,onHover:n,isDraggable:i,...s}){let a=(0,Qh.useRef)(!1),c=o.icon?{backgroundColor:o.icon.background,color:o.icon.foreground}:{},u=(0,Qh.useMemo)(()=>[(0,Gu.createBlock)(o.name,o.initialAttributes,(0,Gu.createBlocksFromInnerBlocksTemplate)(o.innerBlocks))],[o.name,o.initialAttributes,o.innerBlocks]),d=(0,Gu.isReusableBlock)(o)&&o.syncStatus!=="unsynced"||(0,Gu.isTemplatePart)(o);return(0,Ml.jsx)(Xh,{isEnabled:i&&!o.isDisabled,blocks:u,icon:o.icon,children:({draggable:f,onDragStart:m,onDragEnd:h})=>(0,Ml.jsx)("div",{className:V("block-editor-block-types-list__list-item",{"is-synced":d}),draggable:f,onDragStart:p=>{a.current=!0,m&&(n(null),m(p))},onDragEnd:p=>{a.current=!1,h&&h(p)},children:(0,Ml.jsxs)(E5,{isFirst:t,className:V("block-editor-block-types-list__item",e),disabled:o.isDisabled,onClick:p=>{p.preventDefault(),r(o,(0,Fy.isAppleOS)()?p.metaKey:p.ctrlKey),n(null)},onKeyDown:p=>{let{keyCode:g}=p;g===Fy.ENTER&&(p.preventDefault(),r(o,(0,Fy.isAppleOS)()?p.metaKey:p.ctrlKey),n(null))},onMouseEnter:()=>{a.current||n(o)},onMouseLeave:()=>n(null),...s,children:[(0,Ml.jsx)("span",{className:"block-editor-block-types-list__item-icon",style:c,children:(0,Ml.jsx)(Ae,{icon:o.icon,showColors:!0})}),(0,Ml.jsx)("span",{className:"block-editor-block-types-list__item-title",children:(0,Ml.jsx)(Y$.__experimentalTruncate,{numberOfLines:3,children:o.title})})]})})})}var q$=(0,Qh.memo)(exe);var zy=l(w(),1);function txe(e,t){let o=[];for(let r=0,n=e.length;r<n;r+=t)o.push(e.slice(r,r+t));return o}function Q$({items:e=[],onSelect:t,onHover:o=()=>{},children:r,label:n,isDraggable:i=!0}){let s="block-editor-block-types-list",a=(0,X$.useInstanceId)(Q$,s);return(0,zy.jsxs)(C5,{className:s,"aria-label":n,children:[txe(e,3).map((c,u)=>(0,zy.jsx)(B5,{children:c.map((d,f)=>(0,zy.jsx)(q$,{item:d,className:(0,Z$.getBlockMenuDefaultClassName)(d.id),onSelect:t,onHover:o,isDraggable:i&&!d.isDisabled,isFirst:u===0&&f===0,rowId:`${a}-${u}`},d.id))},u)),r]})}var lm=Q$;var J$=l(A(),1),Dl=l(w(),1);function oxe({title:e,icon:t,children:o}){return(0,Dl.jsxs)(Dl.Fragment,{children:[(0,Dl.jsxs)("div",{className:"block-editor-inserter__panel-header",children:[(0,Dl.jsx)("h2",{className:"block-editor-inserter__panel-title",children:e}),(0,Dl.jsx)(J$.Icon,{icon:t})]}),(0,Dl.jsx)("div",{className:"block-editor-inserter__panel-content",children:o})]})}var Wu=oxe;var eK=l(N(),1),P5=l(w(),1);function rxe(){return(0,P5.jsx)("div",{className:"block-editor-inserter__no-results",children:(0,P5.jsx)("p",{children:(0,eK.__)("No results found.")})})}var Ls=rxe;var zo=l(w(),1),nxe=e=>e.name.split("/")[0],ixe=6,sxe=[];function tK({items:e,collections:t,categories:o,onSelectItem:r,onHover:n,showMostUsedBlocks:i,className:s}){let a=(0,Vl.useMemo)(()=>ma(e,"frecency","desc").slice(0,ixe),[e]),c=(0,Vl.useMemo)(()=>e.filter(p=>!p.category),[e]),u=(0,Vl.useMemo)(()=>{let p={...t};return Object.keys(t).forEach(g=>{p[g]=e.filter(b=>nxe(b)===g),p[g].length===0&&delete p[g]}),p},[e,t]);(0,Vl.useEffect)(()=>()=>n(null),[]);let d=(0,R5.useAsyncList)(o),f=o.length===d.length,m=(0,Vl.useMemo)(()=>Object.entries(t),[t]),h=(0,R5.useAsyncList)(f?m:sxe);return(0,zo.jsxs)("div",{className:s,children:[i&&e.length>3&&!!a.length&&(0,zo.jsx)(Wu,{title:(0,Jh._x)("Most used","blocks"),children:(0,zo.jsx)(lm,{items:a,onSelect:r,onHover:n,label:(0,Jh._x)("Most used","blocks")})}),d.map(p=>{let g=e.filter(b=>b.category===p.slug);return!g||!g.length?null:(0,zo.jsx)(Wu,{title:p.title,icon:p.icon,children:(0,zo.jsx)(lm,{items:g,onSelect:r,onHover:n,label:p.title})},p.slug)}),f&&c.length>0&&(0,zo.jsx)(Wu,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,Jh.__)("Uncategorized"),children:(0,zo.jsx)(lm,{items:c,onSelect:r,onHover:n,label:(0,Jh.__)("Uncategorized")})}),h.map(([p,g])=>{let b=u[p];return!b||!b.length?null:(0,zo.jsx)(Wu,{title:g.title,icon:g.icon,children:(0,zo.jsx)(lm,{items:b,onSelect:r,onHover:n,label:g.title})},p)})]})}function axe({rootClientId:e,onInsert:t,onHover:o,showMostUsedBlocks:r},n){let[i,s,a,c]=ku(e,t);if(!i.length)return(0,zo.jsx)(Ls,{});let u=[],d=[];for(let f of i)f.category!=="reusable"&&(f.isSearchOnly||(f.isAllowedInCurrentRoot?u.push(f):d.push(f)));return(0,zo.jsx)(Yh,{children:(0,zo.jsxs)("div",{ref:n,children:[!!u.length&&(0,zo.jsx)(zo.Fragment,{children:(0,zo.jsx)(tK,{items:u,categories:s,collections:a,onSelectItem:c,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__insertable-blocks-at-selection"})}),(0,zo.jsx)(tK,{items:d,categories:s,collections:a,onSelectItem:c,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__all-blocks"})]})})}var oK=(0,Vl.forwardRef)(axe);var xK=l(R(),1),wK=l(Z(),1),CK=l(A(),1),BK=l(N(),1);var bK=l(A(),1),D5=l(R(),1),kK=l(N(),1);var rB=l(A(),1),O5=l(N(),1),Fl=l(w(),1);function lxe({selectedCategory:e,patternCategories:t,onClickCategory:o}){let r="block-editor-block-patterns-explorer__sidebar";return(0,Fl.jsx)("div",{className:`${r}__categories-list`,children:t.map(({name:n,label:i})=>(0,Fl.jsx)(rB.Button,{__next40pxDefaultSize:!0,label:i,className:`${r}__categories-list__item`,isPressed:e===n,onClick:()=>{o(n)},children:i},n))})}function cxe({searchValue:e,setSearchValue:t}){return(0,Fl.jsx)("div",{className:"block-editor-block-patterns-explorer__search",children:(0,Fl.jsx)(rB.SearchControl,{onChange:t,value:e,label:(0,O5.__)("Search"),placeholder:(0,O5.__)("Search")})})}function uxe({selectedCategory:e,patternCategories:t,onClickCategory:o,searchValue:r,setSearchValue:n}){return(0,Fl.jsxs)("div",{className:"block-editor-block-patterns-explorer__sidebar",children:[(0,Fl.jsx)(cxe,{searchValue:r,setSearchValue:n}),!r&&(0,Fl.jsx)(lxe,{selectedCategory:e,patternCategories:t,onClickCategory:o})]})}var rK=uxe;var jl=l(R(),1),rg=l(N(),1),fK=l(Z(),1),mK=l(A(),1),pK=l(Xo(),1);var nK=l($(),1),wa=l(R(),1),zl=l(A(),1),iK=l(Z(),1),sK=l(N(),1);var yn=l(A(),1),zi=l(N(),1),Br=l(w(),1);function nB({currentPage:e,numPages:t,changePage:o,totalItems:r}){return(0,Br.jsxs)(yn.__experimentalVStack,{className:"block-editor-patterns__grid-pagination-wrapper",children:[(0,Br.jsx)(yn.__experimentalText,{variant:"muted",children:(0,zi.sprintf)((0,zi._n)("%s item","%s items",r),r)}),t>1&&(0,Br.jsxs)(yn.__experimentalHStack,{expanded:!1,spacing:3,justify:"flex-start",className:"block-editor-patterns__grid-pagination",children:[(0,Br.jsxs)(yn.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-previous",children:[(0,Br.jsx)(yn.Button,{variant:"tertiary",onClick:()=>o(1),disabled:e===1,"aria-label":(0,zi.__)("First page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Br.jsx)("span",{children:"\xAB"})}),(0,Br.jsx)(yn.Button,{variant:"tertiary",onClick:()=>o(e-1),disabled:e===1,"aria-label":(0,zi.__)("Previous page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Br.jsx)("span",{children:"\u2039"})})]}),(0,Br.jsx)(yn.__experimentalText,{variant:"muted",children:(0,zi.sprintf)((0,zi._x)("%1$s of %2$s","paging"),e,t)}),(0,Br.jsxs)(yn.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-next",children:[(0,Br.jsx)(yn.Button,{variant:"tertiary",onClick:()=>o(e+1),disabled:e===t,"aria-label":(0,zi.__)("Next page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Br.jsx)("span",{children:"\u203A"})}),(0,Br.jsx)(yn.Button,{variant:"tertiary",onClick:()=>o(t),disabled:e===t,"aria-label":(0,zi.__)("Last page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Br.jsx)("span",{children:"\xBB"})})]})]})]})}var Yt=l(w(),1),dxe=({showTooltip:e,title:t,children:o})=>e?(0,Yt.jsx)(zl.Tooltip,{text:t,children:o}):(0,Yt.jsx)(Yt.Fragment,{children:o});function aK({id:e,isDraggable:t,pattern:o,onClick:r,onHover:n,showTitlesAsTooltip:i,category:s,isSelected:a}){let[c,u]=(0,wa.useState)(!1),{blocks:d,viewportWidth:f}=o,h=`block-editor-block-patterns-list__item-description-${(0,iK.useInstanceId)(aK)}`,p=o.type===Nt.user,g=(0,wa.useMemo)(()=>!s||!t?d:(d??[]).map(b=>{let v=(0,nK.cloneBlock)(b);return v.attributes.metadata?.categories?.includes(s)&&(v.attributes.metadata.categories=[s]),v}),[d,t,s]);return(0,Yt.jsx)(Xh,{isEnabled:t,blocks:g,pattern:o,children:({draggable:b,onDragStart:v,onDragEnd:k})=>(0,Yt.jsx)("div",{className:"block-editor-block-patterns-list__list-item",draggable:b,onDragStart:y=>{u(!0),v&&(n?.(null),v(y))},onDragEnd:y=>{u(!1),k&&k(y)},children:(0,Yt.jsx)(dxe,{showTooltip:i&&!p,title:o.title,children:(0,Yt.jsxs)(zl.Composite.Item,{render:(0,Yt.jsx)("div",{role:"option","aria-label":o.title,"aria-describedby":o.description?h:void 0,className:V("block-editor-block-patterns-list__item",{"block-editor-block-patterns-list__list-item-synced":o.type===Nt.user&&!o.syncStatus,"is-selected":a})}),id:e,onClick:()=>{r(o,d),n?.(null)},onMouseEnter:()=>{c||n?.(o)},onMouseLeave:()=>n?.(null),children:[(0,Yt.jsx)(vn.Async,{placeholder:(0,Yt.jsx)(fxe,{}),children:(0,Yt.jsx)(vn,{blocks:d,viewportWidth:f})}),(!i||p)&&(0,Yt.jsxs)(zl.__experimentalHStack,{className:"block-editor-patterns__pattern-details",spacing:2,children:[p&&!o.syncStatus&&(0,Yt.jsx)("div",{className:"block-editor-patterns__pattern-icon-wrapper",children:(0,Yt.jsx)(we,{className:"block-editor-patterns__pattern-icon",icon:Ei})}),(0,Yt.jsx)("div",{className:"block-editor-block-patterns-list__item-title",children:o.title})]}),!!o.description&&(0,Yt.jsx)(zl.VisuallyHidden,{id:h,children:o.description})]})})})})}function fxe(){return(0,Yt.jsx)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}function mxe({isDraggable:e,blockPatterns:t,onHover:o,onClickPattern:r,orientation:n,label:i=(0,sK.__)("Block patterns"),category:s,showTitlesAsTooltip:a,pagingProps:c},u){let[d,f]=(0,wa.useState)(void 0),[m,h]=(0,wa.useState)(null);(0,wa.useEffect)(()=>{let g=t[0]?.name;f(g)},[t]);let p=(g,b)=>{h(g.name),r(g,b)};return(0,Yt.jsxs)(zl.Composite,{orientation:n,activeId:d,setActiveId:f,role:"listbox",className:"block-editor-block-patterns-list","aria-label":i,ref:u,children:[t.map(g=>(0,Yt.jsx)(aK,{id:g.name,pattern:g,onClick:p,onHover:o,isDraggable:e,showTitlesAsTooltip:a,category:s,isSelected:!!m&&m===g.name},g.name)),c&&(0,Yt.jsx)(nB,{...c})]})}var Ca=(0,wa.forwardRef)(mxe);var cm=l(F(),1),cK=l($(),1),iB=l(N(),1),uK=l(Xo(),1),A5=l(R(),1);function lK({destinationRootClientId:e,destinationIndex:t,rootClientId:o,registry:r}){if(o===e)return t;let n=["",...r.select(_).getBlockParents(e),e],i=n.indexOf(o);return i!==-1?r.select(_).getBlockIndex(n[i+1])+1:r.select(_).getBlockOrder(o).length}function pxe({rootClientId:e="",insertionIndex:t,clientId:o,isAppender:r,onSelect:n,shouldFocusBlock:i=!0,selectBlockOnInsert:s=!0}){let a=(0,cm.useRegistry)(),{getSelectedBlock:c,getClosestAllowedInsertionPoint:u,isBlockInsertionPointVisible:d}=M((0,cm.useSelect)(_)),{destinationRootClientId:f,destinationIndex:m}=(0,cm.useSelect)(S=>{let{getSelectedBlockClientId:x,getBlockRootClientId:C,getBlockIndex:B,getBlockOrder:I,getInsertionPoint:P}=M(S(_)),E=x(),L=e,T,O=P();return t!==void 0?T=t:O&&O.hasOwnProperty("index")?(L=O?.rootClientId?O.rootClientId:e,T=O.index):o?T=B(o):!r&&E?(L=C(E),T=B(E)+1):T=I(L).length,{destinationRootClientId:L,destinationIndex:T}},[e,t,o,r]),{replaceBlocks:h,insertBlocks:p,showInsertionPoint:g,hideInsertionPoint:b,setLastFocus:v}=M((0,cm.useDispatch)(_)),k=(0,A5.useCallback)((S,x,C=!1,B)=>{(C||i||s)&&v(null);let I=c();!r&&I&&(0,cK.isUnmodifiedDefaultBlock)(I,"content")?h(I.clientId,S,null,i||C?0:null,x):p(S,r||B===void 0?m:lK({destinationRootClientId:f,destinationIndex:m,rootClientId:B,registry:a}),r||B===void 0?f:B,s,i||C?0:null,x);let P=Array.isArray(S)?S.length:1,E=(0,iB.sprintf)((0,iB._n)("%d block added.","%d blocks added.",P),P);(0,uK.speak)(E),n&&n(S)},[r,c,h,p,f,m,n,i,s,v,a]),y=(0,A5.useCallback)(S=>{if(S&&!d()){let x=u(S.name,f);x!==null&&g(x,lK({destinationRootClientId:f,destinationIndex:m,rootClientId:x,registry:a}))}else b()},[u,d,g,b,f,m,a]);return[f,k,y]}var $u=pxe;var eg=l(R(),1),sB=l($(),1),tg=l(F(),1),aB=l(N(),1),dK=l(Un(),1);var hxe=(e,t,o,r)=>{let n=(0,eg.useMemo)(()=>({[uu]:!!r}),[r]),i=(0,tg.useSelect)(p=>{let{getSettings:g}=M(p(_));return g()[w0]??!1},[]),{patternCategories:s,patterns:a,userPatternCategories:c}=(0,tg.useSelect)(p=>{let{getSettings:g,__experimentalGetAllowedPatterns:b}=M(p(_)),{__experimentalUserPatternCategories:v,__experimentalBlockPatternCategories:k}=g();return{patterns:b(t,n),userPatternCategories:v,patternCategories:k}},[t,n]),u=(0,eg.useMemo)(()=>a.filter(p=>!(p.categories?.includes("navigation")&&!i)),[a,i]),{getClosestAllowedInsertionPointForPattern:d}=M((0,tg.useSelect)(_)),f=(0,eg.useMemo)(()=>{let p=[...s];return c?.forEach(g=>{p.find(b=>b.name===g.name)||p.push(g)}),p},[s,c]),{createSuccessNotice:m}=(0,tg.useDispatch)(dK.store),h=(0,eg.useCallback)((p,g)=>{let b=r?t:d(p,t);if(b===null)return;let v=p.type===Nt.user&&p.syncStatus!=="unsynced"?[(0,sB.createBlock)("core/block",{ref:p.id})]:g;e((v??[]).map(k=>{let y=(0,sB.cloneBlock)(k);return y.attributes.metadata?.categories?.includes(o)&&(y.attributes.metadata.categories=[o]),y}),p.name,!1,b),m((0,aB.sprintf)((0,aB.__)('Block pattern "%s" inserted.'),p.title),{type:"snackbar",id:"inserter-notice"})},[m,e,o,t,d,r]);return[u,f,h]},Ku=hxe;var og=l(R(),1),L5=l(Z(),1),N5=l(Fe(),1),lB=20;function cB(e,t,o,r=""){let[n,i]=(0,og.useState)(1),s=(0,L5.usePrevious)(t),a=(0,L5.usePrevious)(r);(s!==t||a!==r)&&n!==1&&i(1);let c=e.length,u=n-1,d=(0,og.useMemo)(()=>e.slice(u*lB,u*lB+lB),[u,e]),f=Math.ceil(e.length/lB),m=h=>{(0,N5.getScrollContainer)(o?.current)?.scrollTo(0,0),i(h)};return(0,og.useEffect)(function(){(0,N5.getScrollContainer)(o?.current)?.scrollTo(0,0)},[t,o]),{totalItems:c,categoryPatterns:d,numPages:f,changePage:m,currentPage:n}}var Ns=l(w(),1);function gxe({filterValue:e,filteredBlockPatternsLength:t}){return e?(0,Ns.jsx)(mK.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count",children:(0,rg.sprintf)((0,rg._n)("%d pattern found","%d patterns found",t),t)}):null}function bxe({searchValue:e,selectedCategory:t,patternCategories:o,rootClientId:r,onModalClose:n}){let i=(0,jl.useRef)(),s=(0,fK.useDebounce)(pK.speak,500),[a,c]=$u({rootClientId:r,shouldFocusBlock:!0}),[u,,d]=Ku(c,a,t),f=(0,jl.useMemo)(()=>o.map(v=>v.name),[o]),m=(0,jl.useMemo)(()=>{let v=u.filter(k=>{if(t===Vf.name||t===Sl.name&&k.type===Nt.user||t===Kp.name&&k.blockTypes?.includes("core/post-content"))return!0;if(t==="uncategorized"){let y=k.categories?.some(S=>f.includes(S))??!1;return!k.categories?.length||!y}return k.categories?.includes(t)});return e?zv(v,e):v},[e,u,t,f]);(0,jl.useEffect)(()=>{if(!e)return;let v=m.length,k=(0,rg.sprintf)((0,rg._n)("%d result found.","%d results found.",v),v);s(k)},[e,s,m.length]);let h=cB(m,t,i),[p,g]=(0,jl.useState)(e);e!==p&&(g(e),h.changePage(1));let b=!!m?.length;return(0,Ns.jsxs)("div",{className:"block-editor-block-patterns-explorer__list",ref:i,children:[(0,Ns.jsx)(gxe,{filterValue:e,filteredBlockPatternsLength:m.length}),(0,Ns.jsx)(Yh,{children:b&&(0,Ns.jsxs)(Ns.Fragment,{children:[(0,Ns.jsx)(Ca,{blockPatterns:h.categoryPatterns,onClickPattern:(v,k)=>{d(v,k),n()},isDraggable:!1}),(0,Ns.jsx)(nB,{...h})]})})]})}var hK=bxe;var M5=l(R(),1),ng=l(N(),1),gK=l(Xo(),1);function kxe(e,t){return!e.categories||!e.categories.length?!1:e.categories.some(o=>t.some(r=>r.name===o))}function ig(e,t="all"){let[o,r]=Ku(void 0,e),n=(0,M5.useMemo)(()=>t==="all"?o:o.filter(s=>!Iw(s,t)),[t,o]);return(0,M5.useMemo)(()=>{let s=r.filter(a=>n.some(c=>c.categories?.includes(a.name))).sort((a,c)=>a.label.localeCompare(c.label));return n.some(a=>!kxe(a,r))&&!s.find(a=>a.name==="uncategorized")&&s.push({name:"uncategorized",label:(0,ng._x)("Uncategorized")}),n.some(a=>a.blockTypes?.includes("core/post-content"))&&s.unshift(Kp),n.some(a=>a.type===Nt.user)&&s.unshift(Sl),n.length>0&&s.unshift({name:Vf.name,label:Vf.label}),(0,gK.speak)((0,ng.sprintf)((0,ng._n)("%d category button displayed.","%d category buttons displayed.",s.length),s.length)),s},[r,n])}var um=l(w(),1);function vxe({initialCategory:e,rootClientId:t,onModalClose:o}){let[r,n]=(0,D5.useState)(""),[i,s]=(0,D5.useState)(e?.name),a=ig(t);return(0,um.jsxs)("div",{className:"block-editor-block-patterns-explorer",children:[(0,um.jsx)(rK,{selectedCategory:i,patternCategories:a,onClickCategory:s,searchValue:r,setSearchValue:n}),(0,um.jsx)(hK,{searchValue:r,selectedCategory:i,patternCategories:a,rootClientId:t,onModalClose:o})]})}function yxe({onModalClose:e,...t}){return(0,um.jsx)(bK.Modal,{title:(0,kK.__)("Patterns"),onRequestClose:e,isFullScreen:!0,children:(0,um.jsx)(vxe,{onModalClose:e,...t})})}var vK=yxe;var sg=l(N(),1),Dt=l(A(),1);var Jo=l(w(),1);function Sxe({title:e}){return(0,Jo.jsx)(Dt.__experimentalVStack,{spacing:0,children:(0,Jo.jsx)(Dt.__experimentalView,{children:(0,Jo.jsx)(Dt.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,Jo.jsxs)(Dt.__experimentalHStack,{spacing:2,children:[(0,Jo.jsx)(Dt.Navigator.BackButton,{style:{minWidth:24,padding:0},icon:(0,sg.isRTL)()?Vo:Mr,size:"small",label:(0,sg.__)("Back")}),(0,Jo.jsx)(Dt.__experimentalSpacer,{children:(0,Jo.jsx)(Dt.__experimentalHeading,{level:5,children:e})})]})})})})}function uB({categories:e,children:t}){return(0,Jo.jsxs)(Dt.Navigator,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation",children:[(0,Jo.jsx)(Dt.Navigator.Screen,{path:"/",children:(0,Jo.jsx)(Dt.__experimentalItemGroup,{children:e.map(o=>(0,Jo.jsx)(Dt.Navigator.Button,{path:`/category/${o.name}`,as:Dt.__experimentalItem,isAction:!0,children:(0,Jo.jsxs)(Dt.__experimentalHStack,{children:[(0,Jo.jsx)(Dt.FlexBlock,{children:o.label}),(0,Jo.jsx)(we,{icon:(0,sg.isRTL)()?Mr:Vo})]})},o.name))})}),e.map(o=>(0,Jo.jsxs)(Dt.Navigator.Screen,{path:`/category/${o.name}`,children:[(0,Jo.jsx)(Sxe,{title:(0,sg.__)("Back")}),t(o)]},o.name))]})}var ji=l(R(),1),V5=l(N(),1),Ms=l(A(),1);var _n=l(A(),1),Sn=l(N(),1);var dB=l(R(),1);var hr=l(w(),1),yK=e=>e!=="all"&&e!=="user",_xe=e=>e.name===Sl.name,xxe=[{value:"all",label:(0,Sn._x)("All","patterns")},{value:Nt.directory,label:(0,Sn.__)("Pattern Directory")},{value:Nt.theme,label:(0,Sn.__)("Theme & Plugins")},{value:Nt.user,label:(0,Sn.__)("User")}];function SK({setPatternSyncFilter:e,setPatternSourceFilter:t,patternSyncFilter:o,patternSourceFilter:r,scrollContainerRef:n,category:i}){let s=i.name===Sl.name?Nt.user:r,a=yK(s),c=_xe(i),u=(0,dB.useMemo)(()=>[{value:"all",label:(0,Sn._x)("All","patterns")},{value:Tv.full,label:(0,Sn._x)("Synced","patterns"),disabled:a},{value:Tv.unsynced,label:(0,Sn._x)("Not synced","patterns"),disabled:a}],[a]);function d(f){t(f),yK(f)&&e("all")}return(0,hr.jsx)(hr.Fragment,{children:(0,hr.jsx)(_n.DropdownMenu,{popoverProps:{placement:"right-end"},label:(0,Sn.__)("Filter patterns"),toggleProps:{size:"compact"},icon:(0,hr.jsx)(we,{icon:(0,hr.jsx)(_n.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,hr.jsx)(_n.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z",fill:"currentColor"})})}),children:()=>(0,hr.jsxs)(hr.Fragment,{children:[!c&&(0,hr.jsx)(_n.MenuGroup,{label:(0,Sn.__)("Source"),children:(0,hr.jsx)(_n.MenuItemsChoice,{choices:xxe,onSelect:f=>{d(f),n.current?.scrollTo(0,0)},value:s})}),(0,hr.jsx)(_n.MenuGroup,{label:(0,Sn.__)("Type"),children:(0,hr.jsx)(_n.MenuItemsChoice,{choices:u,onSelect:f=>{e(f),n.current?.scrollTo(0,0)},value:o})}),(0,hr.jsx)("div",{className:"block-editor-inserter__patterns-filter-help",children:(0,dB.createInterpolateElement)((0,Sn.__)("Patterns are available from the <Link>WordPress.org Pattern Directory</Link>, bundled in the active theme, or created by users on this site. Only patterns created on this site can be synced."),{Link:(0,hr.jsx)(_n.ExternalLink,{href:(0,Sn.__)("https://wordpress.org/patterns/")})})})]})})})}var $r=l(w(),1),wxe=()=>{};function fB({rootClientId:e,onInsert:t,onHover:o=wxe,category:r,showTitlesAsTooltip:n}){let[i,,s]=Ku(t,e,r?.name),[a,c]=(0,ji.useState)("all"),[u,d]=(0,ji.useState)("all"),f=ig(e,u),m=(0,ji.useRef)(),h=(0,ji.useMemo)(()=>i.filter(k=>Iw(k,u,a)?!1:r.name===Vf.name||r.name===Sl.name&&k.type===Nt.user||r.name===Kp.name&&k.blockTypes?.includes("core/post-content")?!0:r.name==="uncategorized"?k.categories?!k.categories.some(y=>f.some(S=>S.name===y)):!0:k.categories?.includes(r.name)),[i,f,r.name,u,a]),p=cB(h,r,m),{changePage:g}=p;(0,ji.useEffect)(()=>()=>o(null),[]);let b=(0,ji.useCallback)(k=>{c(k),g(1)},[c,g]),v=(0,ji.useCallback)(k=>{d(k),g(1)},[d,g]);return(0,$r.jsxs)($r.Fragment,{children:[(0,$r.jsxs)(Ms.__experimentalVStack,{spacing:2,className:"block-editor-inserter__patterns-category-panel-header",children:[(0,$r.jsxs)(Ms.__experimentalHStack,{children:[(0,$r.jsx)(Ms.FlexBlock,{children:(0,$r.jsx)(Ms.__experimentalHeading,{className:"block-editor-inserter__patterns-category-panel-title",size:13,level:4,as:"div",children:r.label})}),(0,$r.jsx)(SK,{patternSyncFilter:a,patternSourceFilter:u,setPatternSyncFilter:b,setPatternSourceFilter:v,scrollContainerRef:m,category:r})]}),!h.length&&(0,$r.jsx)(Ms.__experimentalText,{variant:"muted",className:"block-editor-inserter__patterns-category-no-results",children:(0,V5.__)("No results found")})]}),h.length>0&&(0,$r.jsxs)($r.Fragment,{children:[(0,$r.jsx)(Ms.__experimentalText,{size:"12",as:"p",className:"block-editor-inserter__help-text",children:(0,V5.__)("Drag and drop patterns into the canvas.")}),(0,$r.jsx)(Ca,{ref:m,blockPatterns:p.categoryPatterns,onClickPattern:s,onHover:o,label:r.label,orientation:"vertical",category:r.name,isDraggable:!0,showTitlesAsTooltip:n,patternFilter:u,pagingProps:p})]})]})}var pB=l(Z(),1),hB=l(A(),1),_K=l(R(),1);var dm=l(w(),1),{Tabs:mB}=M(hB.privateApis);function Cxe({categories:e,selectedCategory:t,onSelectCategory:o,children:r}){let s={type:"tween",duration:(0,pB.useReducedMotion)()?0:.25,ease:[.6,0,.4,1]},a=(0,pB.usePrevious)(t),c=t?t.name:null,[u,d]=(0,_K.useState)(),f=e?.[0]?.name;return c===null&&!u&&f&&d(f),(0,dm.jsxs)(mB,{selectOnMove:!1,selectedTabId:c,orientation:"vertical",onSelect:m=>{o(e.find(h=>h.name===m))},activeTabId:u,onActiveTabIdChange:d,children:[(0,dm.jsx)(mB.TabList,{className:"block-editor-inserter__category-tablist",children:e.map(m=>(0,dm.jsx)(mB.Tab,{tabId:m.name,"aria-current":m===t?"true":void 0,children:m.label},m.name))}),e.map(m=>(0,dm.jsx)(mB.TabPanel,{tabId:m.name,focusable:!1,children:(0,dm.jsx)(hB.__unstableMotion.div,{className:"block-editor-inserter__category-panel",initial:a?"open":"closed",animate:"open",variants:{open:{transform:"translateX( 0 )",transitionEnd:{zIndex:"1"}},closed:{transform:"translateX( -100% )",zIndex:"-1"}},transition:s,children:r})},m.name))]})}var gB=Cxe;var Kn=l(w(),1);function Bxe({onSelectCategory:e,selectedCategory:t,onInsert:o,rootClientId:r,children:n}){let[i,s]=(0,xK.useState)(!1),a=ig(r),c=(0,wK.useViewportMatch)("medium","<");return a.length?(0,Kn.jsxs)(Kn.Fragment,{children:[!c&&(0,Kn.jsxs)("div",{className:"block-editor-inserter__block-patterns-tabs-container",children:[(0,Kn.jsx)(gB,{categories:a,selectedCategory:t,onSelectCategory:e,children:n}),(0,Kn.jsx)(CK.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__patterns-explore-button",onClick:()=>s(!0),variant:"secondary",children:(0,BK.__)("Explore all patterns")})]}),c&&(0,Kn.jsx)(uB,{categories:a,children:u=>(0,Kn.jsx)("div",{className:"block-editor-inserter__category-panel",children:(0,Kn.jsx)(fB,{onInsert:o,rootClientId:r,category:u},u.name)})}),i&&(0,Kn.jsx)(vK,{initialCategory:t||a[0],patternCategories:a,onModalClose:()=>s(!1),rootClientId:r})]}):(0,Kn.jsx)(Ls,{})}var EK=Bxe;var GK=l(N(),1),WK=l(Z(),1),$K=l(A(),1),vB=l(R(),1);var kB=l(A(),1),zK=l(N(),1),jK=l(Z(),1);var NK=l(A(),1),MK=l(N(),1);var Vt=l(A(),1),Yn=l(N(),1),Ba=l(R(),1),z5=l($(),1);var jy=l(F(),1),RK=l(Un(),1),OK=l(F5(),1),AK=l(dn(),1);var IK=l($(),1),PK=l(w(),1),Exe={image:"img",video:"video",audio:"audio"};function bB(e,t){let o={id:e.id||void 0,caption:e.caption||void 0},r=e.url,n=e.alt||void 0;t==="image"?(o.url=r,o.alt=n):["video","audio"].includes(t)&&(o.src=r);let i=Exe[t],s=(0,PK.jsx)(i,{src:e.previewUrl||r,alt:n,controls:t==="audio"?!0:void 0,inert:"true",onError:({currentTarget:a})=>{a.src===e.previewUrl&&(a.src=r)}});return[(0,IK.createBlock)(`core/${t}`,o),s]}var st=l(w(),1),Txe=["image"],Ixe={placement:"bottom-end",className:"block-editor-inserter__media-list__item-preview-options__popover"};function Pxe({category:e,media:t}){if(!e.getReportUrl)return null;let o=e.getReportUrl(t);return(0,st.jsx)(Vt.DropdownMenu,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,Yn.__)("Options"),popoverProps:Ixe,icon:ks,children:()=>(0,st.jsx)(Vt.MenuGroup,{children:(0,st.jsx)(Vt.MenuItem,{onClick:()=>window.open(o,"_blank").focus(),icon:vA,children:(0,Yn.sprintf)((0,Yn.__)("Report %s"),e.mediaType)})})})}function Rxe({onClose:e,onSubmit:t}){return(0,st.jsxs)(Vt.Modal,{title:(0,Yn.__)("Insert external image"),onRequestClose:e,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal",children:[(0,st.jsxs)(Vt.__experimentalVStack,{spacing:3,children:[(0,st.jsx)("p",{children:(0,Yn.__)("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")}),(0,st.jsx)("p",{children:(0,Yn.__)("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation.")})]}),(0,st.jsxs)(Vt.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,st.jsx)(Vt.FlexItem,{children:(0,st.jsx)(Vt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e,children:(0,Yn.__)("Cancel")})}),(0,st.jsx)(Vt.FlexItem,{children:(0,st.jsx)(Vt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:t,children:(0,Yn.__)("Insert")})})]})]})}function LK({media:e,onClick:t,category:o}){let[r,n]=(0,Ba.useState)(!1),[i,s]=(0,Ba.useState)(!1),[a,c]=(0,Ba.useState)(!1),[u,d]=(0,Ba.useMemo)(()=>bB(e,o.mediaType),[e,o.mediaType]),{createErrorNotice:f,createSuccessNotice:m}=(0,jy.useDispatch)(RK.store),{getSettings:h,getBlock:p}=(0,jy.useSelect)(_),{updateBlockAttributes:g}=(0,jy.useDispatch)(_),b=(0,Ba.useCallback)(S=>{if(a)return;let x=h(),C=(0,z5.cloneBlock)(S),{id:B,url:I,caption:P}=C.attributes;if(!B&&!x.mediaUpload){n(!0);return}if(B){t(C);return}c(!0),window.fetch(I).then(E=>E.blob()).then(E=>{let L=(0,AK.getFilename)(I)||"image.jpg",T=new File([E],L,{type:E.type});x.mediaUpload({filesList:[T],additionalData:{caption:P},onFileChange([O]){(0,OK.isBlobURL)(O.url)||(p(C.clientId)?g(C.clientId,{...C.attributes,id:O.id,url:O.url}):(t({...C,attributes:{...C.attributes,id:O.id,url:O.url}}),m((0,Yn.__)("Image uploaded and inserted."),{type:"snackbar",id:"inserter-notice"})),c(!1))},allowedTypes:Txe,onError(O){f(O,{type:"snackbar",id:"inserter-notice"}),c(!1)}})}).catch(()=>{n(!0),c(!1)})},[a,h,t,m,g,f,p]),v=typeof e.title=="string"?e.title:e.title?.rendered||(0,Yn.__)("no title"),k=(0,Ba.useCallback)(()=>s(!0),[]),y=(0,Ba.useCallback)(()=>s(!1),[]);return(0,st.jsxs)(st.Fragment,{children:[(0,st.jsx)(Xh,{isEnabled:!0,blocks:[u],children:({draggable:S,onDragStart:x,onDragEnd:C})=>(0,st.jsx)("div",{className:V("block-editor-inserter__media-list__list-item",{"is-hovered":i}),draggable:S,onDragStart:x,onDragEnd:C,children:(0,st.jsxs)("div",{onMouseEnter:k,onMouseLeave:y,children:[(0,st.jsx)(Vt.Tooltip,{text:v,children:(0,st.jsx)(Vt.Composite.Item,{render:(0,st.jsx)("div",{"aria-label":v,role:"option",className:"block-editor-inserter__media-list__item"}),onClick:()=>b(u),children:(0,st.jsxs)("div",{className:"block-editor-inserter__media-list__item-preview",children:[d,a&&(0,st.jsx)("div",{className:"block-editor-inserter__media-list__item-preview-spinner",children:(0,st.jsx)(Vt.Spinner,{})})]})})}),!a&&(0,st.jsx)(Pxe,{category:o,media:e})]})})}),r&&(0,st.jsx)(Rxe,{onClose:()=>n(!1),onSubmit:()=>{t((0,z5.cloneBlock)(u)),m((0,Yn.__)("Image inserted."),{type:"snackbar",id:"inserter-notice"}),n(!1)}})]})}var j5=l(w(),1);function Oxe({mediaList:e,category:t,onClick:o,label:r=(0,MK.__)("Media List")}){return(0,j5.jsx)(NK.Composite,{role:"listbox",className:"block-editor-inserter__media-list","aria-label":r,children:e.map((n,i)=>(0,j5.jsx)(LK,{media:n,category:t,onClick:o},n.id||n.sourceId||i))})}var DK=Oxe;var Ul=l(R(),1),U5=l(F(),1);function VK(e,t={}){let[o,r]=(0,Ul.useState)(),[n,i]=(0,Ul.useState)(!1),s=(0,Ul.useRef)();return(0,Ul.useEffect)(()=>{(async()=>{let a=JSON.stringify({category:e.name,...t});s.current=a,i(!0),r([]);let c=await e.fetch?.(t);a===s.current&&(r(c),i(!1))})()},[e.name,...Object.values(t)]),{mediaList:o,isLoading:n}}function FK(e){let[t,o]=(0,Ul.useState)([]),r=(0,U5.useSelect)(a=>M(a(_)).getInserterMediaCategories(),[]),{canInsertImage:n,canInsertVideo:i,canInsertAudio:s}=(0,U5.useSelect)(a=>{let{canInsertBlockType:c}=a(_);return{canInsertImage:c("core/image",e),canInsertVideo:c("core/video",e),canInsertAudio:c("core/audio",e)}},[e]);return(0,Ul.useEffect)(()=>{(async()=>{let a=[];if(!r)return;let c=new Map(await Promise.all(r.map(async d=>{if(d.isExternalResource)return[d.name,!0];let f=[];try{f=await d.fetch({per_page:1})}catch{}return[d.name,!!f.length]}))),u={image:n,video:i,audio:s};r.forEach(d=>{u[d.mediaType]&&c.get(d.name)&&a.push(d)}),a.length&&o(a)})()},[n,i,s,r]),t}var Yu=l(w(),1),Axe=10;function Uy({rootClientId:e,onInsert:t,category:o}){let[r,n,i]=(0,jK.useDebouncedInput)(),{mediaList:s,isLoading:a}=VK(o,{per_page:i?20:Axe,search:i}),c="block-editor-inserter__media-panel",u=o.labels.search_items||(0,zK.__)("Search");return(0,Yu.jsxs)("div",{className:c,children:[(0,Yu.jsx)(kB.SearchControl,{className:`${c}-search`,onChange:n,value:r,label:u,placeholder:u}),a&&(0,Yu.jsx)("div",{className:`${c}-spinner`,children:(0,Yu.jsx)(kB.Spinner,{})}),!a&&!s?.length&&(0,Yu.jsx)(Ls,{}),!a&&!!s?.length&&(0,Yu.jsx)(DK,{rootClientId:e,onClick:t,mediaList:s,category:o})]})}var UK=l(F(),1);function Lxe({fallback:e=null,children:t}){return(0,UK.useSelect)(r=>{let{getSettings:n}=r(_);return!!n().mediaUpload},[])?t:e}var Ds=Lxe;var HK=l(A(),1),Nxe=()=>null,qu=(0,HK.withFilters)("editor.MediaUpload")(Nxe);var qn=l(w(),1),Mxe=["image","video","audio"];function Dxe({rootClientId:e,selectedCategory:t,onSelectCategory:o,onInsert:r,children:n}){let i=FK(e),s=(0,WK.useViewportMatch)("medium","<"),a="block-editor-inserter__media-tabs",c=(0,vB.useCallback)(d=>{if(!d?.url)return;let f=window.__experimentalDataViewsMediaModal&&d.mime_type?d.mime_type.split("/")[0]:d.type,[m]=bB(d,f);r(m)},[r]),u=(0,vB.useMemo)(()=>i.map(d=>({...d,label:d.labels.name})),[i]);return u.length?(0,qn.jsxs)(qn.Fragment,{children:[!s&&(0,qn.jsxs)("div",{className:`${a}-container`,children:[(0,qn.jsx)(gB,{categories:u,selectedCategory:t,onSelectCategory:o,children:n}),(0,qn.jsx)(Ds,{children:(0,qn.jsx)(qu,{multiple:!1,onSelect:c,allowedTypes:Mxe,render:({open:d})=>(0,qn.jsx)($K.Button,{__next40pxDefaultSize:!0,onClick:f=>{f.target.focus(),d()},className:"block-editor-inserter__media-library-button",variant:"secondary","data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal",children:(0,GK.__)("Open Media Library")})})})]}),s&&(0,qn.jsx)(uB,{categories:u,children:d=>(0,qn.jsx)(Uy,{onInsert:r,rootClientId:e,category:d})})]}):(0,qn.jsx)(Ls,{})}var H5=Dxe;var Hy=l(R(),1),Zu=l(N(),1),G5=l(A(),1),SB=l(Z(),1),qK=l(Xo(),1),ZK=l(F(),1);var KK=l(A(),1),{Fill:YK,Slot:Vxe}=(0,KK.createSlotFill)("__unstableInserterMenuExtension");YK.Slot=Vxe;var yB=YK;var xn=l(w(),1),Fxe=9,zxe=[];function jxe({filterValue:e,onSelect:t,onHover:o,onHoverPattern:r,rootClientId:n,clientId:i,isAppender:s,__experimentalInsertionIndex:a,maxBlockPatterns:c,maxBlockTypes:u,showBlockDirectory:d=!1,isDraggable:f=!0,shouldFocusBlock:m=!0,prioritizePatterns:h,selectBlockOnInsert:p,isQuick:g}){let b=(0,SB.useDebounce)(qK.speak,500),{prioritizedBlocks:v}=(0,ZK.useSelect)(j=>({prioritizedBlocks:j(_).getBlockListSettings(n)?.prioritizedInserterBlocks||zxe}),[n]),[k,y]=$u({onSelect:t,rootClientId:n,clientId:i,isAppender:s,insertionIndex:a,shouldFocusBlock:m,selectBlockOnInsert:p}),[S,x,C,B]=ku(k,y,g),[I,,P]=Ku(y,k,void 0,g),E=(0,Hy.useMemo)(()=>{if(c===0)return[];let j=zv(I,e);return c!==void 0?j.slice(0,c):j},[e,I,c]),L=u;h&&E.length>2&&(L=0);let T=(0,Hy.useMemo)(()=>{if(L===0)return[];let j=S.filter(ee=>ee.name!=="core/block"),z=ma(j,"frecency","desc");!e&&v.length&&(z=Qw(z,v));let W=qw(z,x,C,e);return L!==void 0?W.slice(0,L):W},[e,S,x,C,L,v]);(0,Hy.useEffect)(()=>{if(!e)return;let j=T.length+E.length,z=(0,Zu.sprintf)((0,Zu._n)("%d result found.","%d results found.",j),j);b(z)},[e,b,T,E]);let O=(0,SB.useAsyncList)(T,{step:Fxe}),D=T.length>0||E.length>0,U=!!T.length&&(0,xn.jsx)(Wu,{title:(0,xn.jsx)(G5.VisuallyHidden,{children:(0,Zu.__)("Blocks")}),children:(0,xn.jsx)(lm,{items:O,onSelect:B,onHover:o,label:(0,Zu.__)("Blocks"),isDraggable:f})}),G=!!E.length&&(0,xn.jsx)(Wu,{title:(0,xn.jsx)(G5.VisuallyHidden,{children:(0,Zu.__)("Block patterns")}),children:(0,xn.jsx)("div",{className:"block-editor-inserter__quick-inserter-patterns",children:(0,xn.jsx)(Ca,{blockPatterns:E,onClickPattern:P,onHover:r,isDraggable:f})})});return(0,xn.jsxs)(Yh,{children:[!d&&!D&&(0,xn.jsx)(Ls,{}),h?G:U,!!T.length&&!!E.length&&(0,xn.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"}),h?U:G,d&&(0,xn.jsx)(yB.Slot,{fillProps:{onSelect:B,onHover:o,filterValue:e,hasItems:D,rootClientId:k},children:j=>j.length?j:D?null:(0,xn.jsx)(Ls,{})})]})}var _B=jxe;var wB=l(A(),1),XK=l(R(),1);var Hl=l(w(),1),{Tabs:xB}=M(wB.privateApis);function Uxe({defaultTabId:e,onClose:t,onSelect:o,selectedTab:r,tabs:n,closeButtonLabel:i},s){return(0,Hl.jsx)("div",{className:"block-editor-tabbed-sidebar",children:(0,Hl.jsxs)(xB,{selectOnMove:!1,defaultTabId:e,onSelect:o,selectedTabId:r,children:[(0,Hl.jsxs)("div",{className:"block-editor-tabbed-sidebar__tablist-and-close-button",children:[(0,Hl.jsx)(wB.Button,{className:"block-editor-tabbed-sidebar__close-button",icon:wf,label:i,onClick:()=>t(),size:"compact"}),(0,Hl.jsx)(xB.TabList,{className:"block-editor-tabbed-sidebar__tablist",ref:s,children:n.map(a=>(0,Hl.jsx)(xB.Tab,{tabId:a.name,className:"block-editor-tabbed-sidebar__tab",children:a.title},a.name))})]}),n.map(a=>(0,Hl.jsx)(xB.TabPanel,{tabId:a.name,focusable:!1,className:"block-editor-tabbed-sidebar__tabpanel",ref:a.panelRef,children:a.panel},a.name))]})})}var CB=(0,XK.forwardRef)(Uxe);var BB=l(F(),1),ag=l(R(),1);function Gy(e=!0){let{setZoomLevel:t,resetZoomLevel:o}=M((0,BB.useDispatch)(_)),{isZoomedOut:r,isZoomOut:n}=(0,BB.useSelect)(a=>{let{isZoomOut:c}=M(a(_));return{isZoomedOut:c(),isZoomOut:c}},[]),i=(0,ag.useRef)(!1),s=(0,ag.useRef)(e);(0,ag.useEffect)(()=>{r!==s.current&&(i.current=!1)},[r]),(0,ag.useEffect)(()=>(s.current=e,e!==n()&&(i.current=!0,e?t("auto-scaled"):o()),()=>{i.current&&n()&&o()}),[e,n,o,t])}var qe=l(w(),1),JK=()=>{};function Hxe({rootClientId:e,clientId:t,isAppender:o,__experimentalInsertionIndex:r,onSelect:n,showInserterHelpPanel:i,showMostUsedBlocks:s,__experimentalFilterValue:a="",shouldFocusBlock:c=!0,onPatternCategorySelection:u,onClose:d,__experimentalInitialTab:f,__experimentalInitialCategory:m},h){let{isZoomOutMode:p,hasSectionRootClientId:g}=(0,QK.useSelect)(he=>{let{isZoomOut:xe,getSectionRootClientId:ze}=M(he(_));return{isZoomOutMode:xe(),hasSectionRootClientId:!!ze()}},[]),[b,v,k]=(0,Wy.useDebouncedInput)(a),[y,S]=(0,Ft.useState)(null),[x,C]=(0,Ft.useState)(m),[B,I]=(0,Ft.useState)("all"),[P,E]=(0,Ft.useState)(null),L=(0,Wy.useViewportMatch)("large"),O=(0,Wy.useViewportMatch)("medium","<")?d:JK;function D(){return f||(p?"patterns":"blocks")}let[U,G]=(0,Ft.useState)(D());Gy(g&&(U==="patterns"||U==="media")&&L);let[z,W,ee]=$u({rootClientId:e,clientId:t,isAppender:o,insertionIndex:r,shouldFocusBlock:c}),se=(0,Ft.useRef)(),ce=(0,Ft.useCallback)((he,xe,ze,ot)=>{W(he,xe,ze,ot),n(he),O(),window.requestAnimationFrame(()=>{!c&&!se.current?.contains(h.current.ownerDocument.activeElement)&&se.current?.querySelector("button").focus()})},[W,O,n,h,c]),ie=(0,Ft.useCallback)((he,xe,...ze)=>{ee(!1),W(he,{patternName:xe},...ze),n(),O()},[W,O,n,ee]),re=(0,Ft.useCallback)(he=>{ee(he),S(he)},[ee,S]),Q=(0,Ft.useCallback)((he,xe)=>{C(he),I(xe),u?.()},[C,u]),Y=U==="patterns"&&!k&&!!x,J=U==="media"&&!!P,K=(0,Ft.useMemo)(()=>U==="media"?null:(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsx)(lg.SearchControl,{className:"block-editor-inserter__search",onChange:he=>{y&&S(null),v(he)},value:b,label:(0,Xu.__)("Search"),placeholder:(0,Xu.__)("Search")}),!!k&&(0,qe.jsx)(_B,{filterValue:k,onSelect:n,onHover:re,rootClientId:e,clientId:t,isAppender:o,__experimentalInsertionIndex:r,showBlockDirectory:!0,shouldFocusBlock:c,prioritizePatterns:U==="patterns"})]}),[U,y,S,v,b,k,n,re,c,t,e,r,o]),H=(0,Ft.useMemo)(()=>(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsx)("div",{className:"block-editor-inserter__block-list",children:(0,qe.jsx)(oK,{ref:se,rootClientId:z,onInsert:ce,onHover:re,showMostUsedBlocks:s})}),i&&(0,qe.jsxs)("div",{className:"block-editor-inserter__tips",children:[(0,qe.jsx)(lg.VisuallyHidden,{as:"h2",children:(0,Xu.__)("A tip for using the block editor")}),(0,qe.jsx)(v9,{})]})]}),[z,ce,re,s,i]),X=(0,Ft.useMemo)(()=>(0,qe.jsx)(EK,{rootClientId:z,onInsert:ie,onSelectCategory:Q,selectedCategory:x,children:Y&&(0,qe.jsx)(fB,{rootClientId:z,onInsert:ie,category:x,patternFilter:B,showTitlesAsTooltip:!0})}),[z,ie,Q,B,x,Y]),ne=(0,Ft.useMemo)(()=>(0,qe.jsx)(H5,{rootClientId:z,selectedCategory:P,onSelectCategory:E,onInsert:ce,children:J&&(0,qe.jsx)(Uy,{rootClientId:z,onInsert:ce,category:P})}),[z,ce,P,E,J]),le=he=>{he!=="patterns"&&C(null),G(he)},ve=(0,Ft.useRef)();return(0,Ft.useLayoutEffect)(()=>{ve.current&&window.requestAnimationFrame(()=>{ve.current.querySelector('[role="tab"][aria-selected="true"]')?.focus()})},[]),(0,qe.jsxs)("div",{className:V("block-editor-inserter__menu",{"show-panel":Y||J,"is-zoom-out":p}),ref:h,children:[(0,qe.jsx)("div",{className:"block-editor-inserter__main-area",children:(0,qe.jsx)(CB,{ref:ve,onSelect:le,onClose:d,selectedTab:U,closeButtonLabel:(0,Xu.__)("Close Block Inserter"),tabs:[{name:"blocks",title:(0,Xu.__)("Blocks"),panel:(0,qe.jsxs)(qe.Fragment,{children:[K,U==="blocks"&&!k&&H]})},{name:"patterns",title:(0,Xu.__)("Patterns"),panel:(0,qe.jsxs)(qe.Fragment,{children:[K,U==="patterns"&&!k&&X]})},{name:"media",title:(0,Xu.__)("Media"),panel:(0,qe.jsxs)(qe.Fragment,{children:[K,ne]})}]})}),i&&y&&(0,qe.jsx)(lg.Popover,{className:"block-editor-inserter__preview-container__popover",placement:"right-start",offset:16,focusOnMount:!1,animate:!1,children:(0,qe.jsx)(X1,{item:y})})]})}var W5=(0,Ft.forwardRef)(Hxe);function Gxe(e,t){return(0,qe.jsx)(W5,{...e,onPatternCategorySelection:JK,ref:t})}var eY=(0,Ft.forwardRef)(Gxe);var EB=l(R(),1),$y=l(N(),1),TB=l(A(),1),tY=l(F(),1);var fm=l(w(),1),Wxe=6,$xe=6,Kxe=2;function IB({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n,hasSearch:i=!0}){let[s,a]=(0,EB.useState)(""),[c,u]=$u({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n}),[d]=ku(c,u,!0),{setInserterIsOpened:f,insertionIndex:m}=(0,tY.useSelect)(g=>{let{getSettings:b,getBlockIndex:v,getBlockCount:k}=g(_),y=b(),S=v(o),x=k();return{setInserterIsOpened:y.__experimentalSetIsInserterOpened,insertionIndex:S===-1?x:S}},[o]),h=i&&d.length>Wxe;(0,EB.useEffect)(()=>{f&&f(!1)},[f]);let p=()=>{f({filterValue:s,onSelect:e,rootClientId:t,insertionIndex:m})};return(0,fm.jsxs)("div",{className:V("block-editor-inserter__quick-inserter",{"has-search":h,"has-expand":f}),children:[h&&(0,fm.jsx)(TB.SearchControl,{className:"block-editor-inserter__search",value:s,onChange:g=>{a(g)},label:(0,$y.__)("Search"),placeholder:(0,$y.__)("Search")}),(0,fm.jsx)("div",{className:"block-editor-inserter__quick-inserter-results",children:(0,fm.jsx)(_B,{filterValue:s,onSelect:e,rootClientId:t,clientId:o,isAppender:r,maxBlockPatterns:s?Kxe:0,maxBlockTypes:$xe,isDraggable:!1,selectBlockOnInsert:n,isQuick:!0})}),f&&(0,fm.jsx)(TB.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__quick-inserter-expand",onClick:p,"aria-label":(0,$y.__)("Browse all. This will open the main inserter panel in the editor toolbar."),children:(0,$y.__)("Browse all")})]})}var Yxe=50;function oY(e,t){if(!e||!e.attributes||!t?.__experimentalLabel)return null;let o=t.__experimentalLabel(e.attributes,{context:"appender"});return typeof o=="string"&&o.length<Yxe&&o.length>0?o:null}var Ky=l(w(),1),qxe=({onToggle:e,disabled:t,isOpen:o,blockTitle:r,hasSingleBlockType:n,appenderLabel:i,toggleProps:s={}})=>{let{as:a=PB.Button,label:c,onClick:u,...d}=s,f=c;!f&&i?f=i:!f&&n?f=(0,Gl.sprintf)((0,Gl._x)("Add %s","directly add the only allowed block"),r.toLowerCase()):f||(f=(0,Gl._x)("Add block","Generic label for block inserter button"));function m(h){e&&e(h),u&&u(h)}return(0,Ky.jsx)(a,{__next40pxDefaultSize:s.as?void 0:!0,icon:Bi,label:f,tooltipPosition:"bottom",onClick:m,className:"block-editor-inserter__toggle","aria-haspopup":n?!1:"true","aria-expanded":n?!1:o,disabled:t,...d})},Zxe=class extends nY.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){let{onToggle:t}=this.props;t&&t(e)}renderToggle({onToggle:e,isOpen:t}){let{disabled:o,blockTitle:r,hasSingleBlockType:n,appenderLabel:i,toggleProps:s,hasItems:a,renderToggle:c=qxe}=this.props;return c({onToggle:e,isOpen:t,disabled:o||!a,blockTitle:r,hasSingleBlockType:n,appenderLabel:i,toggleProps:s})}renderContent({onClose:e}){let{rootClientId:t,clientId:o,isAppender:r,showInserterHelpPanel:n,__experimentalIsQuick:i,onSelectOrClose:s,selectBlockOnInsert:a}=this.props;return i?(0,Ky.jsx)(IB,{onSelect:c=>{let u=Array.isArray(c)&&c?.length?c[0]:c;s&&typeof s=="function"&&s(u),e()},rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:a}):(0,Ky.jsx)(eY,{onSelect:()=>{e()},onClose:e,rootClientId:t,clientId:o,isAppender:r,showInserterHelpPanel:n})}render(){let{position:e,hasSingleBlockType:t,directInsertBlock:o,insertOnlyAllowedBlock:r,__experimentalIsQuick:n,onSelectOrClose:i}=this.props;return t||o?this.renderToggle({onToggle:r}):(0,Ky.jsx)(PB.Dropdown,{className:"block-editor-inserter",contentClassName:V("block-editor-inserter__popover",{"is-quick":n}),popoverProps:{position:e,shift:!0},onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,Gl.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:i})}},Ui=(0,OB.compose)([(0,RB.withSelect)((e,{clientId:t,rootClientId:o,shouldDirectInsert:r=!0})=>{let{getBlockRootClientId:n,hasInserterItems:i,getAllowedBlocks:s,getDirectInsertBlock:a}=e(_),{getBlockVariations:c,getBlockType:u}=e(Yy.store);o=o||n(t)||void 0;let d=s(o),f=r&&a(o),m=d?.length===1&&c(d[0].name,"inserter")?.length===0,h=!1;m&&(h=d[0]);let p=f?u(f.name):null,g=oY(f,p);return{hasItems:i(o),hasSingleBlockType:m,blockTitle:h?h.title:"",allowedBlockType:h,directInsertBlock:f,appenderLabel:g,rootClientId:o}}),(0,RB.withDispatch)((e,t,{select:o})=>({insertOnlyAllowedBlock(){let{rootClientId:r,clientId:n,isAppender:i,hasSingleBlockType:s,allowedBlockType:a,directInsertBlock:c,onSelectOrClose:u,selectBlockOnInsert:d}=t;if(!s&&!c)return;function f(b){let{getBlock:v,getPreviousBlockClientId:k}=o(_);if(!b||!n&&!r)return{};let y={},S={};if(n){let x=v(n),C=v(k(n));x?.name===C?.name&&(S=C?.attributes||{})}else{let x=v(r);if(x?.innerBlocks?.length){let C=x.innerBlocks[x.innerBlocks.length-1];c&&c?.name===C.name&&(S=C.attributes)}}return b.forEach(x=>{S.hasOwnProperty(x)&&(y[x]=S[x])}),y}function m(){let{getBlockIndex:b,getBlockSelectionEnd:v,getBlockOrder:k,getBlockRootClientId:y}=o(_);if(n)return b(n);let S=v();return!i&&S&&y(S)===r?b(S)+1:k(r).length}let{insertBlock:h}=e(_),p;if(c){let b=f(c.attributesToCopy);p=(0,Yy.createBlock)(c.name,{...c.attributes||{},...b})}else p=(0,Yy.createBlock)(a.name);h(p,m(),r,d),u&&u(p);let g=(0,Gl.sprintf)((0,Gl.__)("%s block added"),a.title);(0,rY.speak)(g)}})),(0,OB.ifCondition)(({hasItems:e,isAppender:t,rootClientId:o,clientId:r})=>e||!t&&!o&&!r)])(Zxe);var qy=l(w(),1),Xxe="\uFEFF";function cg({rootClientId:e}){let{showPrompt:t,isLocked:o,placeholder:r,isManualGrid:n}=(0,AB.useSelect)(u=>{let{getBlockCount:d,getSettings:f,getTemplateLock:m,getBlockAttributes:h}=u(_),p=!d(e),{bodyPlaceholder:g}=f();return{showPrompt:p,isLocked:!!m(e),placeholder:g,isManualGrid:h(e)?.layout?.isManualPlacement}},[e]),{insertDefaultBlock:i,startTyping:s}=(0,AB.useDispatch)(_);if(o||n)return null;let a=(0,iY.decodeEntities)(r)||(0,$5.__)("Type / to choose a block"),c=()=>{i(void 0,e),s()};return(0,qy.jsxs)("div",{"data-root-client-id":e||"",className:V("block-editor-default-block-appender",{"has-visible-prompt":t}),children:[(0,qy.jsx)("p",{tabIndex:"0",role:"button","aria-label":(0,$5.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:u=>{(LB.ENTER===u.keyCode||LB.SPACE===u.keyCode)&&c()},onClick:()=>c(),onFocus:()=>{t&&c()},children:t?a:Xxe}),(0,qy.jsx)(Ui,{rootClientId:e,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0})]})}var sY=l(A(),1),K5=l(R(),1),Zy=l(N(),1);var aY=l(Re(),1);var NB=l(w(),1);function lY({rootClientId:e,className:t,onFocus:o,tabIndex:r,onSelect:n},i){return(0,NB.jsx)(Ui,{position:"bottom center",rootClientId:e,__experimentalIsQuick:!0,onSelectOrClose:(...s)=>{n&&typeof n=="function"&&n(...s)},renderToggle:({onToggle:s,disabled:a,isOpen:c,blockTitle:u,hasSingleBlockType:d,appenderLabel:f})=>{let m=!d,h;return f?h=f:d?h=(0,Zy.sprintf)((0,Zy._x)("Add %s","directly add the only allowed block"),u.toLowerCase()):h=(0,Zy._x)("Add block","Generic label for block inserter button"),(0,NB.jsx)(sY.Button,{__next40pxDefaultSize:!0,ref:i,onFocus:o,tabIndex:r,className:V(t,"block-editor-button-block-appender"),onClick:s,"aria-haspopup":m?"true":void 0,"aria-expanded":m?c:void 0,disabled:a,label:h,showTooltip:!0,children:(0,NB.jsx)(we,{icon:Bi})})},isAppender:!0})}var cY=(0,K5.forwardRef)((e,t)=>((0,aY.default)("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),lY(e,t))),Qu=(0,K5.forwardRef)(lY);var ug=l(w(),1);function Qxe({rootClientId:e}){return(0,Y5.useSelect)(o=>o(_).canInsertBlockType((0,uY.getDefaultBlockName)(),e))?(0,ug.jsx)(cg,{rootClientId:e}):(0,ug.jsx)(Qu,{rootClientId:e,className:"block-list-appender__toggle"})}function dY({rootClientId:e,CustomAppender:t,className:o,tagName:r="div"}){let n=(0,Y5.useSelect)(i=>{let{getBlockInsertionPoint:s,isBlockInsertionPointVisible:a,getBlockCount:c}=i(_),u=s();return a()&&e===u?.rootClientId&&c(e)===0},[e]);return(0,ug.jsx)(r,{tabIndex:-1,className:V("block-list-appender wp-block",o,{"is-drag-over":n}),contentEditable:!1,"data-block":!0,children:t?(0,ug.jsx)(t,{}):(0,ug.jsx)(Qxe,{rootClientId:e})})}var BY=l(Z(),1),Qy=l(F(),1),EY=l(R(),1),TY=l(N(),1);var dg=l(F(),1),ed=l(R(),1),VB=l(A(),1),wY=l(Z(),1);var pY=l(F(),1),Ju=l(R(),1),hY=l(A(),1),gY=l(N(),1);var mY=l(Z(),1),q5=l(Fe(),1),fY=new WeakMap;function Jxe(e){let t=(0,mY.useRefEffect)(o=>{function r(i){let{deltaX:s,deltaY:a,target:c}=i,u=e.current,d=fY.get(u);d||(d=(0,q5.getScrollContainer)(u),fY.set(u,d));let f=(0,q5.getScrollContainer)(c);o.contains(f)||d.scrollBy(s,a)}let n={passive:!0};return o.addEventListener("wheel",r,n),()=>{o.removeEventListener("wheel",r,n)}},[e]);return e?t:null}var mm=Jxe;var Z5=l(w(),1),ewe=Number.MAX_SAFE_INTEGER;function twe({previousClientId:e,nextClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,operation:i="insert",nearestSide:s="right",...a}){let[c,u]=(0,Ju.useReducer)(k=>(k+1)%ewe,0),{orientation:d,rootClientId:f,isVisible:m}=(0,pY.useSelect)(k=>{let{getBlockListSettings:y,getBlockRootClientId:S,isBlockVisible:x}=k(_),C=S(e??t);return{orientation:y(C)?.orientation||"vertical",rootClientId:C,isVisible:x(e)&&x(t)}},[e,t]),h=Xe(e),p=Xe(t),g=d==="vertical",b=(0,Ju.useMemo)(()=>c<0||!h&&!p||!m?void 0:{contextElement:i==="group"?p||h:h||p,getBoundingClientRect(){let y=h?h.getBoundingClientRect():null,S=p?p.getBoundingClientRect():null,x=0,C=0,B=0,I=0;if(i==="group"){let P=S||y;C=P.top,B=0,I=P.bottom-P.top,x=s==="left"?P.left-2:P.right-2}else g?(C=y?y.bottom:S.top,B=y?y.width:S.width,I=S&&y?S.top-y.bottom:0,x=y?y.left:S.left):(C=y?y.top:S.top,I=y?y.height:S.height,(0,gY.isRTL)()?(x=S?S.right:y.left,B=y&&S?y.left-S.right:0):(x=y?y.right:S.left,B=y&&S?S.left-y.right:0),B=Math.max(B,0));return new window.DOMRect(x,C,B,I)}},[h,p,c,g,m,i,s]),v=mm(n);return(0,Ju.useLayoutEffect)(()=>{if(!h)return;let k=new window.MutationObserver(u);return k.observe(h,{attributes:!0}),()=>{k.disconnect()}},[h]),(0,Ju.useLayoutEffect)(()=>{if(!p)return;let k=new window.MutationObserver(u);return k.observe(p,{attributes:!0}),()=>{k.disconnect()}},[p]),(0,Ju.useLayoutEffect)(()=>{if(h)return h.ownerDocument.defaultView.addEventListener("resize",u),()=>{h.ownerDocument.defaultView?.removeEventListener("resize",u)}},[h]),!h&&!p||!m?null:(0,Z5.jsx)(hY.Popover,{ref:v,animate:!1,anchor:b,focusOnMount:!1,__unstableSlotName:r,inline:!r,...a,className:V("block-editor-block-popover","block-editor-block-popover__inbetween",a.className),resize:!1,flip:!1,placement:"overlay",variant:"unstyled",children:(0,Z5.jsx)("div",{className:"block-editor-block-popover__inbetween-container",children:o})},t+"--"+f)}var MB=twe;var yY=l(F(),1),SY=l(Z(),1),_Y=l(A(),1);var $l=l(R(),1);var bY=l(Z(),1),kY=l(A(),1),Wl=l(R(),1);var X5=l(w(),1),owe=Number.MAX_SAFE_INTEGER;function rwe({clientId:e,bottomClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,shift:i=!0,...s},a){let c=Xe(e),u=Xe(t??e),d=(0,bY.useMergeRefs)([a,mm(n)]),[f,m]=(0,Wl.useReducer)(p=>(p+1)%owe,0);(0,Wl.useLayoutEffect)(()=>{if(!c)return;let p=new window.MutationObserver(m);return p.observe(c,{attributes:!0}),()=>{p.disconnect()}},[c]);let h=(0,Wl.useMemo)(()=>{if(!(f<0||!c||t&&!u))return{getBoundingClientRect(){return u?xD(Sh(c),Sh(u)):Sh(c)},contextElement:c}},[f,c,t,u]);return!c||t&&!u?null:(0,X5.jsx)(kY.Popover,{ref:d,animate:!1,focusOnMount:!1,anchor:h,__unstableSlotName:r,inline:!r,placement:"top-start",resize:!1,flip:!1,shift:i,...s,className:V("block-editor-block-popover",s.className),variant:"unstyled",children:o})}var pm=(0,Wl.forwardRef)(rwe),nwe=({clientId:e,bottomClientId:t,children:o,...r},n)=>(0,X5.jsx)(pm,{...r,bottomClientId:t,clientId:e,__unstableContentRef:void 0,__unstablePopoverSlot:void 0,ref:n,children:o}),vY=(0,Wl.forwardRef)(nwe);var DB=l(w(),1);function iwe({clientId:e,bottomClientId:t,children:o,shift:r=!1,additionalStyles:n,...i},s){t??=e;let a=Xe(e);return(0,DB.jsx)(pm,{ref:s,clientId:e,bottomClientId:t,shift:r,...i,children:a&&e===t?(0,DB.jsx)(swe,{selectedElement:a,additionalStyles:n,children:o}):o})}function swe({selectedElement:e,additionalStyles:t={},children:o}){let[r,n]=(0,$l.useState)(e.offsetWidth),[i,s]=(0,$l.useState)(e.offsetHeight);(0,$l.useEffect)(()=>{let c=new window.ResizeObserver(()=>{n(e.offsetWidth),s(e.offsetHeight)});return c.observe(e,{box:"border-box"}),()=>c.disconnect()},[e]);let a=(0,$l.useMemo)(()=>({position:"absolute",width:r,height:i,...t}),[r,i,t]);return(0,DB.jsx)("div",{style:a,children:o})}var Hi=(0,$l.forwardRef)(iwe);var Q5=l(w(),1),Xy={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};function awe({__unstablePopoverSlot:e,__unstableContentRef:t}){let{clientId:o}=(0,yY.useSelect)(n=>{let{getBlockOrder:i,getBlockInsertionPoint:s}=n(_),a=s(),c=i(a.rootClientId);return c.length?{clientId:c[a.index]}:{}},[]),r=(0,SY.useReducedMotion)();return(0,Q5.jsx)(Hi,{clientId:o,__unstablePopoverSlot:e,__unstableContentRef:t,className:"block-editor-block-popover__drop-zone",children:(0,Q5.jsx)(_Y.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:r?Xy.show:Xy.hide,animate:Xy.show,exit:r?Xy.show:Xy.exit,className:"block-editor-block-popover__drop-zone-foreground"})})}var xY=awe;var Kl=l(w(),1),fg=(0,ed.createContext)();fg.displayName="InsertionPointOpenRefContext";function lwe({__unstablePopoverSlot:e,__unstableContentRef:t,operation:o="insert",nearestSide:r="right"}){let{selectBlock:n,hideInsertionPoint:i}=(0,dg.useDispatch)(_),s=(0,ed.useContext)(fg),a=(0,ed.useRef)(),{orientation:c,previousClientId:u,nextClientId:d,rootClientId:f,isInserterShown:m,isDistractionFree:h,isZoomOutMode:p}=(0,dg.useSelect)(P=>{let{getBlockOrder:E,getBlockListSettings:L,getBlockInsertionPoint:T,isBlockBeingDragged:O,getPreviousBlockClientId:D,getNextBlockClientId:U,getSettings:G,isZoomOut:j}=M(P(_)),z=T(),W=E(z.rootClientId);if(!W.length)return{};let ee=W[z.index-1],se=W[z.index];for(;O(ee);)ee=D(ee);for(;O(se);)se=U(se);let ce=G();return{previousClientId:ee,nextClientId:se,orientation:L(z.rootClientId)?.orientation||"vertical",rootClientId:z.rootClientId,isDistractionFree:ce.isDistractionFree,isInserterShown:z?.__unstableWithInserter,isZoomOutMode:j()}},[]),{getBlockEditingMode:g}=(0,dg.useSelect)(_),b=(0,wY.useReducedMotion)();function v(P){P.target===a.current&&d&&g(d)!=="disabled"&&n(d,-1)}function k(P){P.target===a.current&&!s.current&&i()}function y(P){P.target!==a.current&&(s.current=!0)}let S=(0,ed.useCallback)(P=>{!P&&s.current&&(s.current=!1)},[s]),x={start:{opacity:0,scale:0},rest:{opacity:1,scale:1,transition:{delay:m?.5:0,type:"tween"}},hover:{opacity:1,scale:1,transition:{delay:.5,type:"tween"}}},C={start:{scale:b?1:0},rest:{scale:1,transition:{delay:.4,type:"tween"}}};if(h||p&&o!=="insert")return null;let I=V("block-editor-block-list__insertion-point",c==="horizontal"||o==="group"?"is-horizontal":"is-vertical");return(0,Kl.jsx)(MB,{previousClientId:u,nextClientId:d,__unstablePopoverSlot:e,__unstableContentRef:t,operation:o,nearestSide:r,children:(0,Kl.jsxs)(VB.__unstableMotion.div,{layout:!b,initial:b?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:a,tabIndex:-1,onClick:v,onFocus:y,className:V(I,{"is-with-inserter":m}),onHoverEnd:k,children:[(0,Kl.jsx)(VB.__unstableMotion.div,{variants:x,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),m&&(0,Kl.jsx)(VB.__unstableMotion.div,{variants:C,className:V("block-editor-block-list__insertion-point-inserter"),children:(0,Kl.jsx)(Ui,{ref:S,position:"bottom center",clientId:d,rootClientId:f,__experimentalIsQuick:!0,onToggle:P=>{s.current=P},onSelectOrClose:()=>{s.current=!1}})})]})})}function CY(e){let{insertionPoint:t,isVisible:o,isBlockListEmpty:r}=(0,dg.useSelect)(n=>{let{getBlockInsertionPoint:i,isBlockInsertionPointVisible:s,getBlockCount:a}=n(_),c=i();return{insertionPoint:c,isVisible:s(),isBlockListEmpty:a(c?.rootClientId)===0}},[]);return!o||r?null:t.operation==="replace"?(0,Kl.jsx)(xY,{...e},`${t.rootClientId}-${t.index}`):(0,Kl.jsx)(lwe,{operation:t.operation,nearestSide:t.nearestSide,...e})}function IY(){let e=(0,EY.useContext)(fg),t=(0,Qy.useSelect)(g=>{let b=g(_).getSettings();return b.isDistractionFree||b.isPreviewMode||M(g(_)).isZoomOut()},[]),{getBlockListSettings:o,getBlockIndex:r,isMultiSelecting:n,getSelectedBlockClientIds:i,getSettings:s,getTemplateLock:a,__unstableIsWithinBlockOverlay:c,getBlockEditingMode:u,getBlockName:d,getBlockAttributes:f,getParentSectionBlock:m}=M((0,Qy.useSelect)(_)),{showInsertionPoint:h,hideInsertionPoint:p}=(0,Qy.useDispatch)(_);return(0,BY.useRefEffect)(g=>{if(t)return;function b(v){if(e===void 0||e.current||v.target.nodeType===v.target.TEXT_NODE||n())return;if(!v.target.classList.contains("block-editor-block-list__layout")){p();return}let k;if(v.target.classList.contains("is-root-container")||(k=(v.target.getAttribute("data-block")?v.target:v.target.closest("[data-block]")).getAttribute("data-block")),a(k)||u(k)==="disabled"||d(k)==="core/block"||k&&f(k).layout?.isManualPlacement)return;let y=o(k),S=y?.orientation||"vertical",x=!!y?.__experimentalCaptureToolbars,C=v.clientY,B=v.clientX,P=Array.from(v.target.children).find(O=>{let D=O.getBoundingClientRect();return O.classList.contains("wp-block")&&S==="vertical"&&D.top>C||O.classList.contains("wp-block")&&S==="horizontal"&&((0,TY.isRTL)()?D.right<B:D.left>B)});if(!P){p();return}if(!P.id&&(P=P.firstElementChild,!P)){p();return}let E=P.id.slice(6);if(!E||c(E)||m(E)||i().includes(E)&&S==="vertical"&&!x&&!s().hasFixedToolbar)return;let L=P.getBoundingClientRect();if(S==="horizontal"&&(v.clientY>L.bottom||v.clientY<L.top)||S==="vertical"&&(v.clientX>L.right||v.clientX<L.left)){p();return}let T=r(E);if(T===0){p();return}h(k,T,{__unstableWithInserter:!0})}return g.addEventListener("mousemove",b),()=>{g.removeEventListener("mousemove",b)}},[e,o,r,n,h,p,i,t])}var FB=l(F(),1),PY=l(Z(),1);var RY=l(w(),1);function hm(){let{getSettings:e,hasSelectedBlock:t,hasMultiSelection:o}=(0,FB.useSelect)(_),{clearSelectedBlock:r}=(0,FB.useDispatch)(_),{clearBlockSelection:n}=e();return(0,PY.useRefEffect)(i=>{if(!n)return;function s(a){!t()&&!o()||a.target===i&&r()}return i.addEventListener("mousedown",s),()=>{i.removeEventListener("mousedown",s)}},[t,o,r,n])}function OY(e){return(0,RY.jsx)("div",{ref:hm(),...e})}var JY=l(Z(),1),pg=l(R(),1),eq=l(F(),1),vm=l($(),1);var AY=l(w(),1);function LY({showSeparator:e,isFloating:t,onAddBlock:o,isToggle:r}){let{clientId:n}=Ie();return(0,AY.jsx)(Qu,{className:V({"block-list-appender__toggle":r}),rootClientId:n,showSeparator:e,isFloating:t,onAddBlock:o})}var NY=l(w(),1);function MY(){let{clientId:e}=Ie();return(0,NY.jsx)(cg,{rootClientId:e})}var jB=l(R(),1),FY=l(F(),1),zB=l(Re(),1),zY=l(Jy(),1);var eS=new WeakMap;function cwe(){let e;return t=>((e===void 0||!(0,zY.isShallowEqual)(e,t))&&(e=t),e)}function VY(e){let[t]=(0,jB.useState)(cwe);return t(e)}function jY(e,t,o,r,n,i,s,a,c,u,d,f){let m=(0,FY.useRegistry)(),h=VY(o),p=VY(r),g=c===void 0||t==="contentOnly"?t:c;(0,jB.useLayoutEffect)(()=>{let b={allowedBlocks:h,prioritizedInserterBlocks:p,templateLock:g};if(u!==void 0&&(b.__experimentalCaptureToolbars=u),d!==void 0)b.orientation=d;else{let v=xs(f?.type);b.orientation=v.getOrientation(f)}s!==void 0&&((0,zB.default)("__experimentalDefaultBlock",{alternative:"defaultBlock",since:"6.3",version:"6.4"}),b.defaultBlock=s),n!==void 0&&(b.defaultBlock=n),a!==void 0&&((0,zB.default)("__experimentalDirectInsert",{alternative:"directInsert",since:"6.3",version:"6.4"}),b.directInsert=a),i!==void 0&&(b.directInsert=i),b.directInsert!==void 0&&typeof b.directInsert!="boolean"&&(0,zB.default)("Using `Function` as a `directInsert` argument",{alternative:"`boolean` values",since:"6.5"}),eS.get(m)||eS.set(m,{}),eS.get(m)[e]=b,window.queueMicrotask(()=>{let v=eS.get(m);if(Object.keys(v).length){let{updateBlockListSettings:k}=m.dispatch(_);k(v),eS.set(m,{})}})},[e,h,p,g,n,i,s,a,u,d,f,m])}var J5=l(yf(),1),UB=l(R(),1),UY=l(F(),1),HY=l($(),1);function GY(e,t,o,r){let n=(0,UY.useRegistry)(),i=(0,UB.useRef)(null);(0,UB.useLayoutEffect)(()=>{let s=!1,{getBlocks:a,getSelectedBlocksInitialCaretPosition:c,isBlockSelected:u}=n.select(_),{replaceInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:f}=n.dispatch(_);return window.queueMicrotask(()=>{if(s)return;let m=a(e),h=m.length===0||o==="all"||o==="contentOnly",p=!(0,J5.default)(t,i.current);if(!h||!p)return;i.current=t;let g=(0,HY.synchronizeBlocksWithTemplate)(m,t);(0,J5.default)(g,m)||(f(),d(e,g,m.length===0&&r&&g.length!==0&&u(e),c()))}),()=>{s=!0}},[t,o,e,n,r])}var WY=l($(),1),$Y=l(F(),1);function KY(e){return(0,$Y.useSelect)(t=>{let o=t(_).getBlock(e);if(!o)return;let r=t(WY.store).getBlockType(o.name);if(r&&Object.keys(r.providesContext).length!==0)return Object.fromEntries(Object.entries(r.providesContext).map(([n,i])=>[n,o.attributes[i]]))},[e])}var km=l(F(),1),WB=l(R(),1),$B=l(Z(),1),XY=l(N(),1),mg=l($(),1);var eV=l(R(),1),Zn=l($(),1),gm=l(F(),1),YY=l(Fe(),1);function tV(e){let t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch{return t}return t}function uwe(e,t,o,r,n,i,s,a,c){return u=>{let{srcRootClientId:d,srcClientIds:f,type:m,blocks:h}=tV(u);if(m==="inserter"){s();let p=h.map(g=>(0,Zn.cloneBlock)(g));i(p,!0,null)}if(m==="block"){let p=o(f[0]);if(d===e&&p===t||f.includes(e)||r(f).some(k=>k===e))return;if(a==="group"){let k=f.map(y=>c(y));i(k,!0,null,f);return}let g=d===e,b=f.length,v=g&&p<t?t-b:t;n(f,d,v)}}}function dwe(e,t,o,r,n){return i=>{if(!t().mediaUpload)return;let s=(0,Zn.findTransform)((0,Zn.getBlockTransforms)("from"),a=>a.type==="files"&&r(a.blockName,e)&&a.isMatch(i));if(s){let a=s.transform(i,o);n(a)}}}function fwe(e){return t=>{let o=(0,Zn.pasteHandler)({HTML:t,mode:"BLOCKS"});o.length&&e(o)}}function HB(e,t,o={}){let{operation:r="insert",nearestSide:n="right"}=o,{canInsertBlockType:i,getBlockIndex:s,getClientIdsOfDescendants:a,getBlockOrder:c,getBlocksByClientId:u,getSettings:d,getBlock:f}=(0,gm.useSelect)(_),{getGroupingBlockName:m}=(0,gm.useSelect)(Zn.store),{insertBlocks:h,moveBlocksToPosition:p,updateBlockAttributes:g,clearSelectedBlock:b,replaceBlocks:v,removeBlocks:k}=(0,gm.useDispatch)(_),y=(0,gm.useRegistry)(),S=(0,eV.useCallback)((P,E=!0,L=0,T=[])=>{Array.isArray(P)||(P=[P]);let D=c(e)[t];if(r==="replace")v(D,P,void 0,L);else if(r==="group"){let U=f(D);n==="left"?P.push(U):P.unshift(U);let G=P.map(ee=>(0,Zn.createBlock)(ee.name,ee.attributes,ee.innerBlocks)),j=P.every(ee=>ee.name==="core/image"),z=i("core/gallery",e),W=(0,Zn.createBlock)(j&&z?"core/gallery":m(),{layout:{type:"flex",flexWrap:j&&z?null:"nowrap"}},G);v([D,...T],W,void 0,L)}else h(P,t,e,E,L)},[c,e,t,r,v,f,n,i,m,h]),x=(0,eV.useCallback)((P,E,L)=>{if(r==="replace"){let T=u(P),D=c(e)[t];y.batch(()=>{k(P,!1),v(D,T,void 0,0)})}else p(P,E,e,L)},[r,c,u,p,y,k,v,t,e]),C=uwe(e,t,s,a,x,S,b,r,f),B=dwe(e,d,g,i,S),I=fwe(S);return P=>{let E=(0,YY.getFilesFromDataTransfer)(P.dataTransfer),L=P.dataTransfer.getData("text/html");L?I(L):E.length?B(E):C(P)}}function mwe(e,t,o){let r=o==="top"||o==="bottom",{x:n,y:i}=e,s=r?n:i,a=r?i:n,c=r?t.left:t.top,u=r?t.right:t.bottom,d=t[o],f;return s>=c&&s<=u?f=s:s<u?f=c:f=u,Math.sqrt((s-f)**2+(a-d)**2)}function bm(e,t,o=["top","bottom","left","right"]){let r,n;return o.forEach(i=>{let s=mwe(e,t,i);(r===void 0||s<r)&&(r=s,n=i)}),[r,n]}function GB(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}function qY(e,t){return t.top<=e.y&&t.bottom>=e.y}var oV=30,pwe=120,hwe=120;function gwe(e,t,o="vertical",r={}){let n=o==="horizontal"?["left","right"]:["top","bottom"],i=0,s="before",a=1/0,c=null,u="right",{dropZoneElement:d,parentBlockOrientation:f,rootBlockIndex:m=0}=r;if(d&&f!=="horizontal"){let v=d.getBoundingClientRect(),[k,y]=bm(t,v,["top","bottom"]);if(v.height>pwe&&k<oV){if(y==="top")return[m,"before"];if(y==="bottom")return[m+1,"after"]}}let h=(0,XY.isRTL)();if(d&&f==="horizontal"){let v=d.getBoundingClientRect(),[k,y]=bm(t,v,["left","right"]);if(v.width>hwe&&k<oV){if(h&&y==="right"||!h&&y==="left")return[m,"before"];if(h&&y==="left"||!h&&y==="right")return[m+1,"after"]}}e.forEach(({isUnmodifiedDefaultBlock:v,getBoundingClientRect:k,blockIndex:y,blockOrientation:S})=>{let x=k();if(!x)return;let[C,B]=bm(t,x,n),[I,P]=bm(t,x,["left","right"]),E=GB(t,x);v&&E?C=0:o==="vertical"&&S!=="horizontal"&&(E&&I<oV||!E&&qY(t,x))&&(c=y,u=P),C<a&&(s=B==="bottom"||!h&&B==="right"||h&&B==="left"?"after":"before",a=C,i=y)});let p=i+(s==="after"?1:-1),g=!!e[i]?.isUnmodifiedDefaultBlock,b=!!e[p]?.isUnmodifiedDefaultBlock;return c!==null?[c,"group",u]:!g&&!b?[s==="after"?i+1:i,"insert"]:[g?i:p,"replace"]}function KB(e,t,o,r){let n=!0;if(t){let a=t?.map(({name:c})=>c);n=o.every(c=>a?.includes(c))}let s=o.map(a=>e(a)).every(a=>{let[c]=a?.parent||[];return c?c===r:!0});return n&&s}function ZY(e,t){let{defaultView:o}=t;return!!(o&&e instanceof o.HTMLElement&&e.closest("[data-is-insertion-point]"))}function QY({dropZoneElement:e,rootClientId:t="",parentClientId:o="",isDisabled:r=!1}={}){let n=(0,km.useRegistry)(),[i,s]=(0,WB.useState)({index:null,operation:"insert"}),{getBlockType:a,getBlockVariations:c,getGroupingBlockName:u}=(0,km.useSelect)(mg.store),{canInsertBlockType:d,getBlockListSettings:f,getBlocks:m,getBlockIndex:h,getDraggedBlockClientIds:p,getBlockNamesByClientId:g,getAllowedBlocks:b,isDragging:v,isGroupable:k,isZoomOut:y,getSectionRootClientId:S,getBlockParents:x}=M((0,km.useSelect)(_)),{showInsertionPoint:C,hideInsertionPoint:B,startDragging:I,stopDragging:P}=M((0,km.useDispatch)(_)),E=HB(i.operation==="before"||i.operation==="after"?o:t,i.index,{operation:i.operation,nearestSide:i.nearestSide}),L=(0,$B.useThrottle)((0,WB.useCallback)((T,O)=>{v()||I();let D=p(),U=[t,...x(t,!0)];if(D.some(H=>U.includes(H)))return;let j=b(t),z=g([t])[0],W=g(D);if(!KB(a,j,W,z))return;let se=S();if(y()&&se!==t)return;let ce=m(t).filter(H=>!((0,mg.hasBlockSupport)(H.name,"visibility",!0)&&H.attributes?.metadata?.blockVisibility===!1));if(ce.length===0){n.batch(()=>{s({index:0,operation:"insert"}),C(t,0,{operation:"insert"})});return}let ie=ce.map(H=>{let X=H.clientId;return{isUnmodifiedDefaultBlock:(0,mg.isUnmodifiedDefaultBlock)(H),getBoundingClientRect:()=>{let ne=O.getElementById(`block-${X}`);return ne?ne.getBoundingClientRect():null},blockIndex:h(X),blockOrientation:f(X)?.orientation}}),re=gwe(ie,{x:T.clientX,y:T.clientY},f(t)?.orientation,{dropZoneElement:e,parentBlockClientId:o,parentBlockOrientation:o?f(o)?.orientation:void 0,rootBlockIndex:h(t)}),[Q,Y,J]=re,K=ie[Q]?.isUnmodifiedDefaultBlock;if(!(y()&&!K&&Y!=="insert")){if(Y==="group"){let H=ce[Q],X=[H.name,...W].every(xe=>xe==="core/image"),ne=d("core/gallery",t),le=k([H.clientId,p()]),ve=c(u(),"block"),he=ve&&ve.find(({name:xe})=>xe==="group-row");if(X&&!ne&&(!le||!he)||!X&&(!le||!he))return}n.batch(()=>{s({index:Q,operation:Y,nearestSide:J});let H=["before","after"].includes(Y)?o:t;C(H,Q,{operation:Y,nearestSide:J})})}},[v,b,t,g,p,a,S,y,m,f,e,o,h,n,I,C,d,k,c,u]),200);return(0,$B.__experimentalUseDropZone)({dropZoneElement:e,isDisabled:r,onDrop:E,onDragOver(T){L(T,T.currentTarget.ownerDocument)},onDragLeave(T){let{ownerDocument:O}=T.currentTarget;ZY(T.relatedTarget,O)||ZY(T.target,O)||(L.cancel(),B())},onDragEnd(){L.cancel(),P(),B()}})}var Yl=l(w(),1),bwe={};function kwe({children:e,clientId:t}){let o=KY(t);return(0,Yl.jsx)(g0,{value:o,children:e})}var vwe=(0,pg.memo)(Vy);function tq(e){let{clientId:t,allowedBlocks:o,prioritizedInserterBlocks:r,defaultBlock:n,directInsert:i,__experimentalDefaultBlock:s,__experimentalDirectInsert:a,template:c,templateLock:u,wrapperRef:d,templateInsertUpdatesSelection:f,__experimentalCaptureToolbars:m,__experimentalAppenderTagName:h,renderAppender:p,orientation:g,placeholder:b,layout:v,name:k,blockType:y,parentLock:S,defaultLayout:x}=e;jY(t,S,o,r,n,i,s,a,u,m,g,v),GY(t,c,u,f);let C=(0,vm.getBlockSupport)(k,"layout")||(0,vm.getBlockSupport)(k,"__experimentalLayout")||bwe,{allowSizingOnChildren:B=!1}=C,I=v||C,P=(0,pg.useMemo)(()=>({...x,...I,...B&&{allowSizingOnChildren:!0}}),[x,I,B]),E=(0,Yl.jsx)(vwe,{rootClientId:t,renderAppender:p,__experimentalAppenderTagName:h,layout:P,wrapperRef:d,placeholder:b});return!y?.providesContext||Object.keys(y.providesContext).length===0?E:(0,Yl.jsx)(kwe,{clientId:t,children:E})}function ywe(e){return h1(e),(0,Yl.jsx)(tq,{...e})}var YB=(0,pg.forwardRef)((e,t)=>{let o=ym({ref:t},e);return(0,Yl.jsx)("div",{className:"block-editor-inner-blocks",children:(0,Yl.jsx)("div",{...o})})});function ym(e={},t={}){let{__unstableDisableLayoutClassNames:o,__unstableDisableDropZone:r,dropZoneElement:n}=t,{clientId:i,layout:s=null,__unstableLayoutClassNames:a=""}=Ie(),c=(0,eq.useSelect)(S=>{let{getBlockName:x,isZoomOut:C,getTemplateLock:B,getBlockRootClientId:I,getBlockEditingMode:P,getBlockSettings:E,getSectionRootClientId:L}=M(S(_));if(!i){let W=L();return{isDropZoneDisabled:C()&&W!==""}}let{hasBlockSupport:T,getBlockType:O}=S(vm.store),D=x(i),U=P(i),G=I(i),[j]=E(i,"layout"),z=U==="disabled";if(C()){let W=L();z=i!==W}return{__experimentalCaptureToolbars:T(D,"__experimentalExposeControlsToChildren",!1),name:D,blockType:O(D),parentLock:B(G),parentClientId:G,isDropZoneDisabled:z,defaultLayout:j}},[i]),{__experimentalCaptureToolbars:u,name:d,blockType:f,parentLock:m,parentClientId:h,isDropZoneDisabled:p,defaultLayout:g}=c,b=QY({dropZoneElement:n,rootClientId:i,parentClientId:h}),v=(0,JY.useMergeRefs)([e.ref,r||p||s?.isManualPlacement&&window.__experimentalEnableGridInteractivity?null:b]),k={__experimentalCaptureToolbars:u,layout:s,name:d,blockType:f,parentLock:m,defaultLayout:g,...t},y=k.value&&k.onChange?ywe:tq;return{...e,ref:v,className:V(e.className,"block-editor-block-list__layout",o?"":a),children:i?(0,Yl.jsx)(y,{...k,clientId:i}):(0,Yl.jsx)(Vy,{...t})}}ym.save=vm.__unstableGetInnerBlocksProps;YB.DefaultBlockAppender=MY;YB.ButtonBlockAppender=LY;YB.Content=()=>ym.save().children;var tS=YB;var oS=l(Z(),1),hg=l(F(),1),rV=l(Fe(),1),Er=l(it(),1);var oq=l(w(),1),Swe=new Set([Er.UP,Er.RIGHT,Er.DOWN,Er.LEFT,Er.ENTER,Er.BACKSPACE]);function _we(e){let{keyCode:t,shiftKey:o}=e;return!o&&Swe.has(t)}function rS(){let e=(0,hg.useSelect)(o=>o(_).isTyping(),[]),{stopTyping:t}=(0,hg.useDispatch)(_);return(0,oS.useRefEffect)(o=>{if(!e)return;let{ownerDocument:r}=o,n,i;function s(a){let{clientX:c,clientY:u}=a;n&&i&&(n!==c||i!==u)&&t(),n=c,i=u}return r.addEventListener("mousemove",s),()=>{r.removeEventListener("mousemove",s)}},[e,t])}function nS(){let{isTyping:e}=(0,hg.useSelect)(i=>{let{isTyping:s}=i(_);return{isTyping:s()}},[]),{startTyping:t,stopTyping:o}=(0,hg.useDispatch)(_),r=rS(),n=(0,oS.useRefEffect)(i=>{let{ownerDocument:s}=i,{defaultView:a}=s,c=a.getSelection();if(e){let h=function(v){let{target:k}=v;b=a.setTimeout(()=>{(0,rV.isTextField)(k)||o()})},p=function(v){let{keyCode:k}=v;(k===Er.ESCAPE||k===Er.TAB)&&o()},g=function(){c.isCollapsed||o()};var u=h,d=p,f=g;let b;return i.addEventListener("focus",h),i.addEventListener("keydown",p),s.addEventListener("selectionchange",g),()=>{a.clearTimeout(b),i.removeEventListener("focus",h),i.removeEventListener("keydown",p),s.removeEventListener("selectionchange",g)}}function m(h){let{type:p,target:g}=h;!(0,rV.isTextField)(g)||!i.contains(g)||p==="keydown"&&!_we(h)||t()}return i.addEventListener("keypress",m),i.addEventListener("keydown",m),()=>{i.removeEventListener("keypress",m),i.removeEventListener("keydown",m)}},[e,t,o]);return(0,oS.useMergeRefs)([r,n])}function xwe({children:e}){return(0,oq.jsx)("div",{ref:nS(),children:e})}var rq=xwe;var iS=l(A(),1),nq=l(Z(),1),iq=l(F(),1),sq=l(R(),1),aq=l(N(),1);var qB=l(w(),1);function nV({clientId:e,rootClientId:t="",position:o="top"}){let[r,n]=(0,sq.useState)(!1),{sectionRootClientId:i,sectionClientIds:s,insertionPoint:a,blockInsertionPointVisible:c,blockInsertionPoint:u,blocksBeingDragged:d}=(0,iq.useSelect)(x=>{let{getInsertionPoint:C,getBlockOrder:B,getSectionRootClientId:I,isBlockInsertionPointVisible:P,getBlockInsertionPoint:E,getDraggedBlockClientIds:L}=M(x(_)),T=I(),O=B(T);return{sectionRootClientId:T,sectionClientIds:O,insertionPoint:C(),blockInsertionPoint:E(),blockInsertionPointVisible:P(),blocksBeingDragged:L()}},[]),f=(0,nq.useReducedMotion)();if(!e)return;let m=!1;if(!(t===i&&s&&s.includes(e)))return null;let p=a?.index===0&&e===s[a.index],g=a&&a.hasOwnProperty("index")&&e===s[a.index-1];o==="top"&&(m=p||c&&u.index===0&&e===s[u.index]),o==="bottom"&&(m=g||c&&e===s[u.index-1]);let b=d[0],v=d.includes(e),k=s.indexOf(b),S=(k>0?s[k-1]:null)===e;return(v||S)&&(m=!1),(0,qB.jsx)(iS.__unstableAnimatePresence,{children:m&&(0,qB.jsx)(iS.__unstableMotion.div,{initial:{height:0},animate:{height:"calc(1 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)"},exit:{height:0},transition:{type:"tween",duration:f?0:.2,ease:[.6,0,.4,1]},className:V("block-editor-block-list__zoom-out-separator",{"is-dragged-over":r}),"data-is-insertion-point":"true",onDragOver:()=>n(!0),onDragLeave:()=>n(!1),children:(0,qB.jsx)(iS.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{delay:-.125}},transition:{ease:"linear",duration:.1,delay:.125},children:(0,aq.__)("Drop pattern.")})})})}var Kr=l(w(),1),e1=(0,td.createContext)();e1.displayName="IntersectionObserverContext";var ZB=new WeakMap,wwe={trailing:!0};function Cwe({className:e,...t}){let{isOutlineMode:o,isFocusMode:r,isPreviewMode:n,editedContentOnlySection:i}=(0,Gi.useSelect)(f=>{let{getSettings:m,isTyping:h,hasBlockSpotlight:p,getEditedContentOnlySection:g}=M(f(_)),{outlineMode:b,focusMode:v,isPreviewMode:k}=m();return{isOutlineMode:b&&!h(),isFocusMode:v||p(),isPreviewMode:k,editedContentOnlySection:g()}},[]),s=(0,Gi.useRegistry)(),{setBlockVisibility:a}=(0,Gi.useDispatch)(_),c=(0,XB.useDebounce)((0,td.useCallback)(()=>{let f={};ZB.get(s).forEach(([m,h])=>{f[m]=h}),a(f)},[s]),300,wwe),u=(0,td.useMemo)(()=>{let{IntersectionObserver:f}=window;if(f)return new f(m=>{ZB.get(s)||ZB.set(s,[]);for(let h of m){let p=h.target.getAttribute("data-block");ZB.get(s).push([p,h.isIntersecting])}c()})},[]),d=ym({ref:(0,XB.useMergeRefs)([hm(),IY(),nS()]),className:V("is-root-container",e,{"is-outline-mode":o,"is-focus-mode":r,"is-preview-mode":n})},t);return(0,Kr.jsxs)(e1.Provider,{value:u,children:[(0,Kr.jsx)("div",{...d}),!!i&&(0,Kr.jsx)(Bwe,{clientId:i})]})}function Bwe({clientId:e}){let{stopEditingContentOnlySection:t}=M((0,Gi.useDispatch)(_)),o=(0,Gi.useSelect)(r=>{let{isBlockSelected:n,hasSelectedInnerBlock:i,getBlockSelectionStart:s}=r(_);return!s()||n(e)||i(e,!0)},[e]);return(0,td.useEffect)(()=>{o||t()},[o,t]),null}function Gh(e){return(0,Kr.jsx)(f0,{value:gO,children:(0,Kr.jsx)(Cwe,{...e})})}var Ewe=[],Twe=new Set;function Iwe({placeholder:e,rootClientId:t,renderAppender:o,__experimentalAppenderTagName:r,layout:n=wM}){let i=o!==!1,s=!!o,{order:a,isZoomOut:c,selectedBlocks:u,visibleBlocks:d,shouldRenderAppender:f}=(0,Gi.useSelect)(m=>{let{getSettings:h,getBlockOrder:p,getSelectedBlockClientIds:g,__unstableGetVisibleBlocks:b,getTemplateLock:v,getBlockEditingMode:k,isSectionBlock:y,isContainerInsertableToInContentOnlyMode:S,getBlockName:x,isZoomOut:C,canInsertBlockType:B}=M(m(_)),I=p(t);if(h().isPreviewMode)return{order:I,selectedBlocks:Ewe,visibleBlocks:Twe};let P=g(),E=P[0],L=!t&&!E&&(!I.length||!B((0,lq.getDefaultBlockName)(),t)),T=!!(t&&E&&t===E),O=v(t);return{order:I,selectedBlocks:P,visibleBlocks:b(),isZoomOut:C(),shouldRenderAppender:(!y(t)||S(x(E),t))&&k(t)!=="disabled"&&(!O||O==="contentOnly")&&i&&!C()&&(s||T||L)}},[t,i,s]);return(0,Kr.jsxs)(mH,{value:n,children:[a.map(m=>(0,Kr.jsxs)(Gi.AsyncModeProvider,{value:!d.has(m)&&!u.includes(m),children:[c&&(0,Kr.jsx)(nV,{clientId:m,rootClientId:t,position:"top"}),(0,Kr.jsx)(g9,{rootClientId:t,clientId:m}),c&&(0,Kr.jsx)(nV,{clientId:m,rootClientId:t,position:"bottom"})]},m)),a.length<1&&e,f&&(0,Kr.jsx)(dY,{tagName:r,rootClientId:t,CustomAppender:o})]})}function Vy(e){return(0,Kr.jsx)(Gi.AsyncModeProvider,{value:!1,children:(0,Kr.jsx)(Iwe,{...e})})}var Ug=l(F(),1),JV=l(Fe(),1),e3=l(A(),1),YQ=l(Is(),1),ST=l(R(),1),Hg=l($(),1),t3=l(Xo(),1),Gg=l(N(),1);var Mq=l(Z(),1),Dq=l(F(),1),Vq=l(Fe(),1),Ea=l(R(),1);var Xn=l(N(),1),_m=l($(),1),sE=l(A(),1),Pq=l(Z(),1),Rq=l(F(),1),aE=l(R(),1);var aS=l(A(),1),mq=l(Qv(),1),pq=l(Re(),1),oE=l(R(),1);var Tr=l(A(),1),cq=(0,Tr.createSlotFill)("InspectorControls"),Pwe=(0,Tr.createSlotFill)("InspectorAdvancedControls"),Rwe=(0,Tr.createSlotFill)("InspectorControlsBindings"),Owe=(0,Tr.createSlotFill)("InspectorControlsBackground"),Awe=(0,Tr.createSlotFill)("InspectorControlsBorder"),Lwe=(0,Tr.createSlotFill)("InspectorControlsColor"),Nwe=(0,Tr.createSlotFill)("InspectorControlsFilter"),Mwe=(0,Tr.createSlotFill)("InspectorControlsDimensions"),Dwe=(0,Tr.createSlotFill)("InspectorControlsPosition"),Vwe=(0,Tr.createSlotFill)("InspectorControlsTypography"),Fwe=(0,Tr.createSlotFill)("InspectorControlsListView"),zwe=(0,Tr.createSlotFill)("InspectorControlsStyles"),jwe=(0,Tr.createSlotFill)("InspectorControlsEffects"),Uwe=(0,Tr.createSlotFill)("InspectorControlsContent"),Hwe={default:cq,advanced:Pwe,background:Owe,bindings:Rwe,border:Awe,color:Lwe,content:Uwe,dimensions:Mwe,effects:jwe,filter:Nwe,list:Fwe,position:Dwe,settings:cq,styles:zwe,typography:Vwe},Wi=Hwe,sS=(0,Tr.createSlotFill)(Symbol("PrivateInspectorControlsAllowedBlocks"));var gg=l(A(),1),JB=l(R(),1),uq=l(Z(),1),eE=l(F(),1);var QB=l(w(),1),dq=Symbol("ListViewContentPopover"),{Fill:fq,Slot:Gwe}=(0,gg.createSlotFill)(dq);function Wwe(){return(0,uq.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:35,resize:!1}}}function tE({listViewRef:e}){let{popoverProps:t}=Wwe(),o=(0,gg.__experimentalUseSlotFills)(dq),r=!!(o&&o.length),{selectedClientId:n,isOpen:i}=(0,eE.useSelect)(u=>{let{getSelectedBlockClientId:d}=u(_),f=M(u(_));return{selectedClientId:d(),isOpen:f.isListViewContentPanelOpen()}},[]),[s,a]=(0,JB.useState)(null);(0,JB.useLayoutEffect)(()=>{if(!n||!e?.current){a(null);return}let u=e.current.querySelector(`[data-block="${n}"]`);a(u)},[n,e]);let{closeListViewContentPanel:c}=M((0,eE.useDispatch)(_));return!i||!r||!s?null:(0,QB.jsx)(gg.Popover,{...t??{},className:"block-editor-inspector-list-view-content-popover",anchor:s,onClose:c,children:(0,QB.jsx)("div",{style:{width:"280px"},children:(0,QB.jsx)(Gwe,{})})})}var od=l(w(),1),$we=["content","list"],Kwe=["default","settings","advanced"];function Sm({children:e,group:t="default",__experimentalGroup:o,resetAllFilter:r}){o&&((0,pq.default)("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=o);let n=Ie(),i=Wi[t]?.Fill;if(!i)return(0,mq.default)(`Unknown InspectorControls group "${t}" provided.`),null;if(n[$c]){let s=n.name==="core/template-part",a=Kwe.includes(t),c=$we.includes(t);if(!(s&&a||c))return null}return!n[$c]&&!n[bs]?null:t==="content"&&n[Hk]&&n[$c]?n[bs]?(0,od.jsx)(aS.__experimentalStyleProvider,{document,children:(0,od.jsx)(fq,{children:e})}):null:(0,od.jsx)(aS.__experimentalStyleProvider,{document,children:(0,od.jsx)(i,{children:s=>(0,od.jsx)(qwe,{fillProps:s,children:e,resetAllFilter:r})})})}function Ywe({resetAllFilter:e,children:t}){let{registerResetAllFilter:o,deregisterResetAllFilter:r}=(0,oE.useContext)(aS.__experimentalToolsPanelContext);return(0,oE.useEffect)(()=>{if(e&&o&&r)return o(e),()=>{r(e)}},[e,o,r]),t}function qwe({children:e,resetAllFilter:t,fillProps:o}){let{forwardedContext:r=[]}=o,n=(0,od.jsx)(Ywe,{resetAllFilter:t,children:e});return r.reduce((i,[s,a])=>(0,od.jsx)(s,{...a,children:i}),n)}var _q=l(A(),1),xq=l(R(),1),wq=l(Qv(),1),Cq=l(Re(),1);var gq=l(A(),1),rE=l(F(),1),bq=l(R(),1);var hq=l(Z(),1);function Ro(){return(0,hq.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}function bg(e,t){if(!e||!t)return t;let o=e.split(","),r=t.split(","),n=[];return o.forEach(i=>{r.forEach(s=>{n.push(`${i.trim()} ${s.trim()}`)})}),n.join(", ")}var kq=l(w(),1);function vq({children:e,group:t,label:o}){let{updateBlockAttributes:r}=(0,rE.useDispatch)(_),{getBlockAttributes:n,getMultiSelectedBlockClientIds:i,getSelectedBlockClientId:s,hasMultiSelection:a}=(0,rE.useSelect)(_),c=Ro(),u=s(),d=(0,bq.useCallback)((f=[])=>{let m={},h=a()?i():[u];h.forEach(p=>{let{style:g}=n(p),b={style:g};f.forEach(v=>{b={...b,...v(b)}}),b={...b,style:Me(b.style)},m[p]=b}),r(h,m,!0)},[n,i,a,u,r]);return(0,kq.jsx)(gq.__experimentalToolsPanel,{className:`${t}-block-support-panel`,label:o,resetAll:d,panelId:u,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:c,children:e},u)}var iV=l(A(),1),nE=l(R(),1),yq=l(w(),1);function Sq({Slot:e,fillProps:t,...o}){let r=(0,nE.useContext)(iV.__experimentalToolsPanelContext),n=(0,nE.useMemo)(()=>({...t??{},forwardedContext:[...t?.forwardedContext??[],[iV.__experimentalToolsPanelContext.Provider,{value:r}]]}),[r,t]);return(0,yq.jsx)(e,{...o,fillProps:n,bubblesVirtually:!0})}var iE=l(w(),1);function Zwe({__experimentalGroup:e,group:t="default",label:o,fillProps:r,...n},i){e&&((0,Cq.default)("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=e);let s=Wi[t],a=(0,_q.__experimentalUseSlotFills)(s?.name);if(!s)return(0,wq.default)(`Unknown InspectorControls group "${t}" provided.`),null;if(!a?.length)return null;let{Slot:c}=s;return o?(0,iE.jsx)(vq,{group:t,label:o,children:(0,iE.jsx)(Sq,{...n,fillProps:r,Slot:c})}):(0,iE.jsx)(c,{...n,ref:i,fillProps:r,bubblesVirtually:!0})}var sV=(0,xq.forwardRef)(Zwe);var aV=l(w(),1),Bq=Sm;Bq.Slot=sV;var rd=e=>(0,aV.jsx)(Sm,{...e,group:"advanced"});rd.Slot=function(t){return(0,aV.jsx)(sV,{...t,group:"advanced"})};rd.slotName="InspectorAdvancedControls";var fe=Bq;var Tq=l(F(),1),nd=l($(),1),lS=l(N(),1);function Eq(e){let t=e?.style?.position?.type;return t==="sticky"?(0,lS.__)("Sticky"):t==="fixed"?(0,lS.__)("Fixed"):null}function Tt(e){return(0,Tq.useSelect)(t=>{if(!e)return null;let{getBlockName:o,getBlockAttributes:r,__experimentalGetParsedPattern:n}=t(_),{getBlockType:i,getActiveBlockVariation:s}=t(nd.store),a=o(e),c=i(a);if(!c)return null;let u=r(e),d=u?.metadata?.patternName;if(d){let v=n(d),k=Eq(u);return{isSynced:!1,title:(0,lS.__)("Pattern"),icon:Ei,description:v?.description||(0,lS.__)("A block pattern."),anchor:u?.anchor,positionLabel:k,positionType:u?.style?.position?.type,name:v?.title||u?.metadata?.name}}let f=s(a,u),m=(0,nd.isReusableBlock)(c)||(0,nd.isTemplatePart)(c),p=(m?(0,nd.__experimentalGetBlockLabel)(c,u):void 0)||c.title,g=Eq(u),b={isSynced:m,title:p,icon:c.icon,description:c.description,anchor:u?.anchor,positionLabel:g,positionType:u?.style?.position?.type,name:u?.metadata?.name};return f?{isSynced:m,title:f.title||c.title,icon:f.icon||c.icon,description:f.description||c.description,anchor:u?.anchor,positionLabel:g,positionType:u?.style?.position?.type,name:u?.metadata?.name}:b},[e])}var cS=l(w(),1),uS="position",lV={key:"default",value:"",name:(0,Xn.__)("Default")},cV={key:"sticky",value:"sticky",name:(0,Xn._x)("Sticky","Name for the value of the CSS position property"),hint:(0,Xn.__)("The block will stick to the top of the window instead of scrolling.")},Iq={key:"fixed",value:"fixed",name:(0,Xn._x)("Fixed","Name for the value of the CSS position property"),hint:(0,Xn.__)("The block will not move when the page is scrolled.")},Xwe=["top","right","bottom","left"],Qwe=["sticky","fixed"];function Jwe({selector:e,style:t}){let o="",{type:r}=t?.position||{};return Qwe.includes(r)&&(o+=`${e} {`,o+=`position: ${r};`,Xwe.forEach(n=>{t?.position?.[n]!==void 0&&(o+=`${n}: ${t.position[n]};`)}),(r==="sticky"||r==="fixed")&&(o+="z-index: 10"),o+="}"),o}function eCe(e){let t=(0,_m.getBlockSupport)(e,uS);return!!(t===!0||t?.sticky)}function tCe(e){let t=(0,_m.getBlockSupport)(e,uS);return!!(t===!0||t?.fixed)}function oCe(e){return!!(0,_m.getBlockSupport)(e,uS)}function Oq(e){let t=e?.style?.position?.type;return t==="sticky"||t==="fixed"}function Aq({name:e}={}){let[t,o]=me("position.fixed","position.sticky"),r=!t&&!o;return!oCe(e)||r}function rCe({style:e={},clientId:t,name:o,setAttributes:r}){let n=tCe(o),i=eCe(o),s=e?.position?.type,{firstParentClientId:a}=(0,Rq.useSelect)(h=>{let{getBlockParents:p}=h(_),g=p(t);return{firstParentClientId:g[g.length-1]}},[t]),c=Tt(a),u=i&&s===cV.value&&c?(0,Xn.sprintf)((0,Xn.__)("The block will stick to the scrollable area of the parent %s block."),c.title):null,d=(0,aE.useMemo)(()=>{let h=[lV];return(i||s===cV.value)&&h.push(cV),(n||s===Iq.value)&&h.push(Iq),h},[n,i,s]),f=h=>{let g={...e,position:{...e?.position,type:h,top:h==="sticky"||h==="fixed"?"0px":void 0}};r({style:Me(g)})},m=s&&d.find(h=>h.value===s)||lV;return aE.Platform.select({web:d.length>1?(0,cS.jsx)(fe,{group:"position",children:(0,cS.jsx)(sE.BaseControl,{help:u,children:(0,cS.jsx)(sE.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,Xn.__)("Position"),hideLabelFromVision:!0,describedBy:(0,Xn.sprintf)((0,Xn.__)("Currently selected position: %s"),m.name),options:d,value:m,onChange:({selectedItem:h})=>{f(h.value)},size:"__unstable-large"})})}):null,native:null})}var uV={edit:function(t){return Aq(t)?null:(0,cS.jsx)(rCe,{...t})},useBlockProps:iCe,attributeKeys:["style"],hasSupport(e){return(0,_m.hasBlockSupport)(e,uS)}},nCe={};function iCe({name:e,style:t}){let o=(0,_m.hasBlockSupport)(e,uS),r=Aq({name:e}),n=o&&!r,i=(0,Pq.useInstanceId)(nCe),s=`.wp-container-${i}.wp-container-${i}`,a;n&&(a=Jwe({selector:s,style:t})||"");let c=V({[`wp-container-${i}`]:n&&!!a,[`is-position-${t?.position?.type}`]:n&&!!a&&!!t?.position?.type});return Qn({css:a}),{className:c}}var Fq={placement:"top-start"},Lq={...Fq,flip:!1,shift:!0},sCe={...Fq,flip:!0,shift:!1};function Nq(e,t,o,r,n){if(!e||!t)return Lq;let i=o?.scrollTop||0,s=Sh(t),a=e.getBoundingClientRect(),c=i+a.top,u=e.ownerDocument.documentElement.clientHeight,d=c+r,f=s.top>d,m=s.height>u-r;return!n&&(f||m)?Lq:sCe}function lE({contentElement:e,clientId:t}){let o=Xe(t),[r,n]=(0,Ea.useState)(0),{blockIndex:i,isSticky:s}=(0,Dq.useSelect)(m=>{let{getBlockIndex:h,getBlockAttributes:p}=m(_);return{blockIndex:h(t),isSticky:Oq(p(t))}},[t]),a=(0,Ea.useMemo)(()=>{if(e)return(0,Vq.getScrollContainer)(e)},[e]),[c,u]=(0,Ea.useState)(()=>Nq(e,o,a,r,s)),d=(0,Mq.useRefEffect)(m=>{n(m.offsetHeight)},[]),f=(0,Ea.useCallback)(()=>u(Nq(e,o,a,r,s)),[e,o,a,r]);return(0,Ea.useLayoutEffect)(f,[i,f]),(0,Ea.useLayoutEffect)(()=>{if(!e||!o)return;let m=e?.ownerDocument?.defaultView;m?.addEventHandler?.("resize",f);let h,p=o?.ownerDocument?.defaultView;return p.ResizeObserver&&(h=new p.ResizeObserver(f),h.observe(o)),()=>{m?.removeEventHandler?.("resize",f),h&&h.disconnect()}},[f,e,o]),{...c,ref:d}}var zq=l(F(),1);function cE(e){return(0,zq.useSelect)(o=>{let{getBlockRootClientId:r,getBlockParents:n,__experimentalGetBlockListSettingsForBlocks:i,isBlockInsertionPointVisible:s,getBlockInsertionPoint:a,getBlockOrder:c,hasMultiSelection:u,getLastMultiSelectedBlockClientId:d}=o(_),f=n(e),m=i(f),h=f.find(g=>m[g]?.__experimentalCaptureToolbars),p=!1;if(s()){let g=a();p=c(g.rootClientId)[g.index]===e}return{capturingClientId:h,isInsertionPointVisible:p,lastClientId:u()?d():null,rootClientId:r(e)}},[e])}var uE=l(w(),1);function jq({clientId:e,__unstableContentRef:t}){let{capturingClientId:o,isInsertionPointVisible:r,lastClientId:n,rootClientId:i}=cE(e),s=lE({contentElement:t?.current,clientId:e});return(0,uE.jsx)(Hi,{clientId:o||e,bottomClientId:n,className:V("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":r}),__unstableContentRef:t,...s,children:(0,uE.jsx)("div",{className:"block-editor-block-list__empty-block-inserter",children:(0,uE.jsx)(Ui,{position:"bottom right",rootClientId:i,clientId:e,__experimentalIsQuick:!0})})})}var DQ=l(F(),1),jg=l(R(),1),VQ=l(Is(),1);var OQ=l(N(),1),AQ=l(F(),1),qV=l(R(),1),LQ=l(Z(),1),nc=l($(),1),NQ=l(A(),1);var xm=l(A(),1),Qq=l(F(),1),Jq=l(N(),1);var $q=l($(),1),Kq=l(A(),1),dS=l(F(),1),fS=l(R(),1),Yq=l(Z(),1);var Hq=l(Fe(),1),Ta=l(R(),1),dE=50,Gq=25,aCe=1e3,Uq=aCe*(Gq/1e3);function Wq(){let e=(0,Ta.useRef)(null),t=(0,Ta.useRef)(null),o=(0,Ta.useRef)(null),r=(0,Ta.useRef)(null);(0,Ta.useEffect)(()=>()=>{r.current&&(clearInterval(r.current),r.current=null)},[]);let n=(0,Ta.useCallback)(a=>{e.current=a.clientY,o.current=(0,Hq.getScrollContainer)(a.target),r.current=setInterval(()=>{if(o.current&&t.current){let c=o.current.scrollTop+t.current;o.current.scroll({top:c})}},Gq)},[]),i=(0,Ta.useCallback)(a=>{if(!o.current)return;let c=o.current.offsetHeight,u=e.current-o.current.offsetTop,d=a.clientY-o.current.offsetTop;if(a.clientY>u){let f=Math.max(c-u-dE,0),m=Math.max(d-u-dE,0),h=f===0||m===0?0:m/f;t.current=Uq*h}else if(a.clientY<u){let f=Math.max(u-dE,0),m=Math.max(u-d-dE,0),h=f===0||m===0?0:m/f;t.current=-Uq*h}else t.current=0},[]);return[n,i,()=>{e.current=null,o.current=null,r.current&&(clearInterval(r.current),r.current=null)}]}var dV=l(w(),1),lCe=({appendToOwnerDocument:e,children:t,clientIds:o,cloneClassname:r,elementId:n,onDragStart:i,onDragEnd:s,fadeWhenDisabled:a=!1,dragComponent:c})=>{let{srcRootClientId:u,isDraggable:d,icon:f,visibleInserter:m,getBlockType:h}=(0,dS.useSelect)(E=>{let{canMoveBlocks:L,getBlockRootClientId:T,getBlockName:O,getBlockAttributes:D,isBlockInsertionPointVisible:U}=E(_),{getBlockType:G,getActiveBlockVariation:j}=E($q.store),z=T(o[0]),W=O(o[0]),ee=j(W,D(o[0]));return{srcRootClientId:z,isDraggable:L(o),icon:ee?.icon||G(W)?.icon,visibleInserter:U(),getBlockType:G}},[o]),p=(0,fS.useRef)(!1),[g,b,v]=Wq(),{getAllowedBlocks:k,getBlockNamesByClientId:y,getBlockRootClientId:S}=(0,dS.useSelect)(_),{startDraggingBlocks:x,stopDraggingBlocks:C}=(0,dS.useDispatch)(_);(0,fS.useEffect)(()=>()=>{p.current&&C()},[]);let I=Xe(o[0])?.closest("body");return(0,fS.useEffect)(()=>{if(!I||!a)return;let L=(0,Yq.throttle)(T=>{if(!T.target.closest("[data-block]"))return;let O=y(o),D=T.target.closest("[data-block]").getAttribute("data-block"),U=k(D),G=y([D])[0],j;if(U?.length===0){let z=S(D),W=y([z])[0],ee=k(z);j=KB(h,ee,O,W)}else j=KB(h,U,O,G);!j&&!m?window?.document?.body?.classList?.add("block-draggable-invalid-drag-token"):window?.document?.body?.classList?.remove("block-draggable-invalid-drag-token")},200);return I.addEventListener("dragover",L),()=>{I.removeEventListener("dragover",L)}},[o,I,a,k,y,S,h,m]),d?(0,dV.jsx)(Kq.Draggable,{appendToOwnerDocument:e,cloneClassname:r,__experimentalTransferDataType:"wp-blocks",transferData:{type:"block",srcClientIds:o,srcRootClientId:u},onDragStart:E=>{window.requestAnimationFrame(()=>{x(o),p.current=!0,g(E),i&&i()})},onDragOver:b,onDragEnd:()=>{C(),p.current=!1,v(),s&&s()},__experimentalDragComponent:c!==void 0?c:(0,dV.jsx)(eB,{count:o.length,icon:f,fadeWhenDisabled:!0}),elementId:n,children:({onDraggableStart:E,onDraggableEnd:L})=>t({draggable:!0,onDragStart:E,onDragEnd:L})}):t({draggable:!1})},fE=lCe;var Zq=l($(),1),mE=l(A(),1),Xq=l(Z(),1),pE=l(F(),1),hE=l(R(),1),$i=l(N(),1);var ke=l(N(),1),id=(e,t)=>e==="up"?t==="horizontal"?(0,ke.isRTL)()?"right":"left":"up":e==="down"?t==="horizontal"?(0,ke.isRTL)()?"left":"right":"down":null;function qq(e,t,o,r,n,i,s){let a=o+1;if(e>1)return cCe(e,o,r,n,i,s);if(r&&n)return(0,ke.sprintf)((0,ke.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!n){let c=id("down",s);if(c==="down")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if(c==="left")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if(c==="right")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(i>0&&n){let c=id("down",s);if(c==="down")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the end of the content and can\u2019t be moved down"),t);if(c==="left")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the end of the content and can\u2019t be moved left"),t);if(c==="right")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the end of the content and can\u2019t be moved right"),t)}if(i<0&&!r){let c=id("up",s);if(c==="up")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if(c==="left")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if(c==="right")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(i<0&&r){let c=id("up",s);if(c==="up")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the beginning of the content and can\u2019t be moved up"),t);if(c==="left")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the beginning of the content and can\u2019t be moved left"),t);if(c==="right")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the beginning of the content and can\u2019t be moved right"),t)}}function cCe(e,t,o,r,n,i){let s=t+1;if(o&&r)return(0,ke.__)("All blocks are selected, and cannot be moved");if(n>0&&!r){let a=id("down",i);if(a==="down")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d down by one place"),e,s);if(a==="left")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n>0&&r){let a=id("down",i);if(a==="down")return(0,ke.__)("Blocks cannot be moved down as they are already at the bottom");if(a==="left")return(0,ke.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,ke.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(n<0&&!o){let a=id("up",i);if(a==="up")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d up by one place"),e,s);if(a==="left")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n<0&&o){let a=id("up",i);if(a==="up")return(0,ke.__)("Blocks cannot be moved up as they are already at the top");if(a==="left")return(0,ke.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,ke.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}var ql=l(w(),1),uCe=(e,t)=>e==="up"?t==="horizontal"?(0,$i.isRTL)()?Vo:Mr:xf:e==="down"?t==="horizontal"?(0,$i.isRTL)()?Mr:Vo:zn:null,dCe=(e,t)=>e==="up"?t==="horizontal"?(0,$i.isRTL)()?(0,$i.__)("Move right"):(0,$i.__)("Move left"):(0,$i.__)("Move up"):e==="down"?t==="horizontal"?(0,$i.isRTL)()?(0,$i.__)("Move left"):(0,$i.__)("Move right"):(0,$i.__)("Move down"):null,fV=(0,hE.forwardRef)(({clientIds:e,direction:t,orientation:o,...r},n)=>{let i=(0,Xq.useInstanceId)(fV),s=Array.isArray(e)?e:[e],a=s.length,{disabled:c}=r,{blockType:u,isDisabled:d,rootClientId:f,isFirst:m,isLast:h,firstIndex:p,orientation:g="vertical"}=(0,pE.useSelect)(x=>{let{getBlockIndex:C,getBlockRootClientId:B,getBlockOrder:I,getBlock:P,getBlockListSettings:E}=x(_),L=s[0],T=B(L),O=C(L),D=C(s[s.length-1]),U=I(T),G=P(L),j=O===0,z=D===U.length-1,{orientation:W}=E(T)||{};return{blockType:G?(0,Zq.getBlockType)(G.name):null,isDisabled:c||(t==="up"?j:z),rootClientId:T,firstIndex:O,isFirst:j,isLast:z,orientation:o||W}},[e,t]),{moveBlocksDown:b,moveBlocksUp:v}=(0,pE.useDispatch)(_),k=t==="up"?v:b,y=x=>{k(e,f),r.onClick&&r.onClick(x)},S=`block-editor-block-mover-button__description-${i}`;return(0,ql.jsxs)(ql.Fragment,{children:[(0,ql.jsx)(mE.Button,{__next40pxDefaultSize:!0,ref:n,className:V("block-editor-block-mover-button",`is-${t}-button`),icon:uCe(t,g),label:dCe(t,g),"aria-describedby":S,...r,onClick:d?null:y,disabled:d,accessibleWhenDisabled:!0}),(0,ql.jsx)(mE.VisuallyHidden,{id:S,children:qq(a,u&&u.title,p,m,h,t==="up"?-1:1,g)})]})}),gE=(0,hE.forwardRef)((e,t)=>(0,ql.jsx)(fV,{direction:"up",ref:t,...e})),bE=(0,hE.forwardRef)((e,t)=>(0,ql.jsx)(fV,{direction:"down",ref:t,...e}));var Ia=l(w(),1);function fCe({clientIds:e,hideDragHandle:t,isBlockMoverUpButtonDisabled:o,isBlockMoverDownButtonDisabled:r}){let{canMove:n,rootClientId:i,isFirst:s,isLast:a,orientation:c,isManualGrid:u}=(0,Qq.useSelect)(d=>{let{getBlockIndex:f,getBlockListSettings:m,canMoveBlocks:h,getBlockOrder:p,getBlockRootClientId:g,getBlockAttributes:b}=d(_),v=Array.isArray(e)?e:[e],k=v[0],y=g(k),S=f(k),x=f(v[v.length-1]),C=p(y),{layout:B={}}=b(y)??{};return{canMove:h(e),rootClientId:y,isFirst:S===0,isLast:x===C.length-1,orientation:m(y)?.orientation,isManualGrid:B.type==="grid"&&B.isManualPlacement&&window.__experimentalEnableGridInteractivity}},[e]);return!n||s&&a&&!i||t&&u?null:(0,Ia.jsxs)(xm.ToolbarGroup,{className:V("block-editor-block-mover",{"is-horizontal":c==="horizontal"}),children:[!t&&(0,Ia.jsx)(fE,{clientIds:e,fadeWhenDisabled:!0,children:d=>(0,Ia.jsx)(xm.Button,{__next40pxDefaultSize:!0,icon:tv,className:"block-editor-block-mover__drag-handle",label:(0,Jq.__)("Drag"),tabIndex:"-1",...d})}),!u&&(0,Ia.jsxs)("div",{className:"block-editor-block-mover__move-button-container",children:[(0,Ia.jsx)(xm.ToolbarItem,{children:d=>(0,Ia.jsx)(gE,{disabled:o,clientIds:e,...d})}),(0,Ia.jsx)(xm.ToolbarItem,{children:d=>(0,Ia.jsx)(bE,{disabled:r,clientIds:e,...d})})]})]})}var kE=fCe;var oZ=l(A(),1),yE=l(F(),1),SE=l(N(),1),rZ=l(R(),1);var mS=l(F(),1),sd=l(R(),1);var{clearTimeout:eZ,setTimeout:mCe}=window,tZ=200;function pCe({ref:e,isFocused:t,highlightParent:o,debounceTimeout:r=tZ}){let{getSelectedBlockClientId:n,getBlockRootClientId:i}=(0,mS.useSelect)(_),{toggleBlockHighlight:s}=(0,mS.useDispatch)(_),a=(0,sd.useRef)(),c=(0,mS.useSelect)(g=>g(_).getSettings().isDistractionFree,[]),u=g=>{if(g&&c)return;let b=n(),v=o?i(b):b;s(v,g)},d=()=>e?.current&&e.current.matches(":hover"),f=()=>{let g=d();return!t&&!g},m=()=>{let g=a.current;g&&eZ&&eZ(g)},h=g=>{g&&g.stopPropagation(),m(),u(!0)},p=g=>{g&&g.stopPropagation(),m(),a.current=mCe(()=>{f()&&u(!1)},r)};return(0,sd.useEffect)(()=>()=>{u(!1),m()},[]),{debouncedShowGestures:h,debouncedHideGestures:p}}function kg({ref:e,highlightParent:t=!1,debounceTimeout:o=tZ}){let[r,n]=(0,sd.useState)(!1),{debouncedShowGestures:i,debouncedHideGestures:s}=pCe({ref:e,debounceTimeout:o,isFocused:r,highlightParent:t}),a=(0,sd.useRef)(!1),c=()=>e?.current&&e.current.contains(e.current.ownerDocument.activeElement);return(0,sd.useEffect)(()=>{let u=e.current,d=()=>{c()&&(n(!0),i())},f=()=>{c()||(n(!1),s())};return u&&!a.current&&(u.addEventListener("focus",d,!0),u.addEventListener("blur",f,!0),a.current=!0),()=>{u&&(u.removeEventListener("focus",d),u.removeEventListener("blur",f))}},[e,a,n,i,s]),{onMouseMove:i,onMouseLeave:s}}var vE=l(w(),1);function nZ(){let{selectBlock:e}=(0,yE.useDispatch)(_),{parentClientId:t}=(0,yE.useSelect)(i=>{let{getBlockParents:s,getSelectedBlockClientId:a,getParentSectionBlock:c}=M(i(_)),u=a(),d=c(u),f=s(u);return{parentClientId:d??f[f.length-1]}},[]),o=Tt(t),r=(0,rZ.useRef)(),n=kg({ref:r,highlightParent:!0});return(0,vE.jsx)("div",{className:"block-editor-block-parent-selector",ref:r,...n,children:(0,vE.jsx)(oZ.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(t),label:(0,SE.sprintf)((0,SE.__)("Select parent block: %s"),o?.title),showTooltip:!0,icon:(0,vE.jsx)(Ae,{icon:o?.icon})})},t)}var _E=l(A(),1);var vg=l(A(),1),hCe=(0,vg.createSlotFill)("BlockControls"),gCe=(0,vg.createSlotFill)("BlockControlsBlock"),bCe=(0,vg.createSlotFill)("BlockFormatControls"),kCe=(0,vg.createSlotFill)("BlockControlsOther"),vCe=(0,vg.createSlotFill)("BlockControlsParent"),yCe={default:hCe,block:gCe,inline:bCe,other:kCe,parent:vCe},pS=yCe;function iZ(e,t){let o=Ie();return o[bs]?pS[e]?.Fill:o[Pp]&&t?pS.parent.Fill:null}var Zl=l(w(),1);function mV({group:e="default",controls:t,children:o,__experimentalShareWithChildBlocks:r=!1}){let n=iZ(e,r);if(!n)return null;let i=(0,Zl.jsxs)(Zl.Fragment,{children:[e==="default"&&(0,Zl.jsx)(_E.ToolbarGroup,{controls:t}),o]});return(0,Zl.jsx)(_E.__experimentalStyleProvider,{document,children:(0,Zl.jsx)(n,{children:s=>{let{forwardedContext:a=[]}=s;return a.reduce((c,[u,d])=>(0,Zl.jsx)(u,{...d,children:c}),i)}})})}var hS=l(R(),1),Xl=l(A(),1),aZ=l(Qv(),1);var pV=l(w(),1),{ComponentsContext:sZ}=M(Xl.privateApis);function hV({group:e="default",...t}){let o=(0,hS.useContext)(Xl.__experimentalToolbarContext),r=(0,hS.useContext)(sZ),n=(0,hS.useMemo)(()=>({forwardedContext:[[Xl.__experimentalToolbarContext.Provider,{value:o}],[sZ.Provider,{value:r}]]}),[o,r]),i=pS[e],s=(0,Xl.__experimentalUseSlotFills)(i.name);if(!i)return(0,aZ.default)(`Unknown BlockControls group "${e}" provided.`),null;if(!s?.length)return null;let{Slot:a}=i,c=(0,pV.jsx)(a,{...t,bubblesVirtually:!0,fillProps:n});return e==="default"?c:(0,pV.jsx)(Xl.ToolbarGroup,{children:c})}var gV=l(w(),1),lZ=mV;lZ.Slot=hV;var bV=e=>(0,gV.jsx)(mV,{group:"inline",...e});bV.Slot=function(t){return(0,gV.jsx)(hV,{group:"inline",...t})};var Mt=lZ;var cZ=l(A(),1),{Fill:uZ,Slot:SCe}=(0,cZ.createSlotFill)("__unstableBlockToolbarLastItem");uZ.Slot=SCe;var xE=uZ;var HE=l(A(),1);var wg=l($(),1),ti=l(A(),1),Om=l(F(),1);var jE=l(R(),1),Pa=l(N(),1),fX=l(Is(),1),Rm=l(Z(),1);var Sg=l(F(),1),ad=l($(),1);var EZ=l(R(),1),bS=l($(),1),gS=l(F(),1),TZ=l(Un(),1),Ql=l(N(),1);var Jn=l($(),1),dZ=l(R(),1),_Ce="align";var fZ="__experimentalBorder",wE="color",xCe="customClassName",mZ="typography.__experimentalFontFamily",pZ="typography.fontSize",wCe="typography.lineHeight",CCe="typography.__experimentalFontStyle",BCe="typography.__experimentalFontWeight",hZ="typography.textAlign",ECe="typography.textColumns",TCe="typography.__experimentalTextDecoration",ICe="typography.__experimentalWritingMode",PCe="typography.__experimentalTextTransform",RCe="typography.__experimentalLetterSpacing",OCe="layout",ACe=[wCe,pZ,CCe,BCe,mZ,hZ,ECe,TCe,PCe,ICe,RCe],LCe=["shadow"],NCe="spacing",MCe=[...LCe,...ACe,fZ,wE,NCe],gZ=e=>(0,Jn.hasBlockSupport)(e,_Ce);function bZ(e,t="any"){if(dZ.Platform.OS!=="web")return!1;let o=(0,Jn.getBlockSupport)(e,fZ);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}var kZ=e=>{let t=(0,Jn.getBlockSupport)(e,wE);return t!==null&&typeof t=="object"&&!!t.gradients},vZ=e=>{let t=(0,Jn.getBlockSupport)(e,wE);return t&&t.background!==!1},yZ=e=>(0,Jn.hasBlockSupport)(e,hZ);var SZ=e=>{let t=(0,Jn.getBlockSupport)(e,wE);return t&&t.text!==!1};var _Z=e=>(0,Jn.hasBlockSupport)(e,xCe,!0);var xZ=e=>(0,Jn.hasBlockSupport)(e,mZ);var wZ=e=>(0,Jn.hasBlockSupport)(e,pZ);var CZ=e=>(0,Jn.hasBlockSupport)(e,OCe);var BZ=e=>MCe.some(t=>(0,Jn.hasBlockSupport)(e,t));function DCe(e){try{let t=(0,bS.parse)(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return!(t.length===1&&t[0].name==="core/freeform")}catch{return!1}}var VCe={align:gZ,borderColor:e=>bZ(e,"color"),backgroundColor:vZ,textAlign:yZ,textColor:SZ,gradient:kZ,className:_Z,fontFamily:xZ,fontSize:wZ,layout:CZ,style:BZ};function FCe(e,t){return Object.entries(VCe).reduce((o,[r,n])=>(n(e.name)&&n(t.name)&&(o[r]=e.attributes[r]),o),{})}function kV(e,t,o){for(let r=0;r<Math.min(t.length,e.length);r+=1)o(e[r].clientId,FCe(t[r],e[r])),kV(e[r].innerBlocks,t[r].innerBlocks,o)}function yg(){let e=(0,gS.useRegistry)(),{updateBlockAttributes:t}=(0,gS.useDispatch)(_),{createSuccessNotice:o,createWarningNotice:r,createErrorNotice:n}=(0,gS.useDispatch)(TZ.store);return(0,EZ.useCallback)(async i=>{let s="";try{if(!window.navigator.clipboard){n((0,Ql.__)("Unable to paste styles. This feature is only available on secure (https) sites in supporting browsers."),{type:"snackbar"});return}s=await window.navigator.clipboard.readText()}catch{n((0,Ql.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"});return}if(!s||!DCe(s)){r((0,Ql.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});return}let a=(0,bS.parse)(s);if(a.length===1?e.batch(()=>{kV(i,i.map(()=>a[0]),t)}):e.batch(()=>{kV(i,a,t)}),i.length===1){let c=(0,bS.getBlockType)(i[0].name)?.title;o((0,Ql.sprintf)((0,Ql.__)("Pasted styles to %s."),c),{type:"snackbar"})}else o((0,Ql.sprintf)((0,Ql.__)("Pasted styles to %d blocks."),i.length),{type:"snackbar"})},[e.batch,t,o,r,n])}function IZ({clientIds:e,children:t,__experimentalUpdateSelection:o}){let{getDefaultBlockName:r,getGroupingBlockName:n}=(0,Sg.useSelect)(ad.store),i=(0,Sg.useSelect)(y=>{let{canInsertBlockType:S,getBlockRootClientId:x,getBlocksByClientId:C,getDirectInsertBlock:B,canRemoveBlocks:I}=y(_),P=C(e),E=x(e[0]),L=S(r(),E),T=E?B(E):null;return{canRemove:I(e),canInsertBlock:P.every(O=>(L||!!T)&&S(O.name,E)),canCopyStyles:P.every(O=>!!O&&((0,ad.hasBlockSupport)(O.name,"color")||(0,ad.hasBlockSupport)(O.name,"typography"))),canDuplicate:P.every(O=>!!O&&(0,ad.hasBlockSupport)(O.name,"multiple",!0)&&S(O.name,E))}},[e,r]),{getBlocksByClientId:s,getBlocks:a}=(0,Sg.useSelect)(_),{canRemove:c,canInsertBlock:u,canCopyStyles:d,canDuplicate:f}=i,{removeBlocks:m,replaceBlocks:h,duplicateBlocks:p,insertAfterBlock:g,insertBeforeBlock:b,flashBlock:v}=(0,Sg.useDispatch)(_),k=yg();return t({canCopyStyles:d,canDuplicate:f,canInsertBlock:u,canRemove:c,onDuplicate(){return p(e,o)},onRemove(){return m(e,o)},onInsertBefore(){b(e[0])},onInsertAfter(){g(e[e.length-1])},onGroup(){if(!e.length)return;let y=n(),S=(0,ad.switchToBlockType)(s(e),y);S&&h(e,S)},onUngroup(){if(!e.length)return;let y=a(e[0]);y.length&&h(e,y)},onCopy(){e.length===1&&v(e[0])},async onPasteStyles(){await k(s(e))}})}var PZ=l(A(),1),zCe=(0,PZ.createSlotFill)(Symbol("CommentIconSlotFill")),CE=zCe;var RZ=l(N(),1),OZ=l(A(),1),BE=l($(),1),EE=l(F(),1);var AZ=l(w(),1);function jCe({clientId:e}){let t=(0,EE.useSelect)(r=>r(_).getBlock(e),[e]),{replaceBlocks:o}=(0,EE.useDispatch)(_);return!t||t.name!=="core/html"?null:(0,AZ.jsx)(OZ.MenuItem,{onClick:()=>o(e,(0,BE.rawHandler)({HTML:(0,BE.getBlockContent)(t)})),children:(0,RZ.__)("Convert to Blocks")})}var LZ=jCe;var NZ=l(A(),1),{Fill:MZ,Slot:UCe}=(0,NZ.createSlotFill)("__unstableBlockSettingsMenuFirstItem");MZ.Slot=UCe;var TE=MZ;var xg=l(A(),1),nX=l($(),1),iX=l(F(),1);var yV=l(A(),1),SV=l(N(),1),FZ=l($(),1),RE=l(F(),1),zZ=l(it(),1);var DZ=l($(),1),VZ=l(F(),1);function kS(e){return(0,VZ.useSelect)(t=>{let{getBlocksByClientId:o,getSelectedBlockClientIds:r,isUngroupable:n,isGroupable:i}=t(_),{getGroupingBlockName:s,getBlockType:a}=t(DZ.store),c=e?.length?e:r(),u=o(c),[d]=u,f=c.length===1&&n(c[0]);return{clientIds:c,isGroupable:i(c),isUngroupable:f,blocksSelection:u,groupingBlockName:s(),onUngroup:f&&a(d.name)?.transforms?.ungroup}},[e])}var IE=l(F(),1),PE=l($(),1),wm=l(A(),1);var vS=l(N(),1);var Cm=l(w(),1),HCe={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"},grid:{type:"grid"}};function GCe(){let{blocksSelection:e,clientIds:t,groupingBlockName:o,isGroupable:r}=kS(),{replaceBlocks:n}=(0,IE.useDispatch)(_),{canRemove:i,variations:s}=(0,IE.useSelect)(p=>{let{canRemoveBlocks:g}=p(_),{getBlockVariations:b}=p(PE.store);return{canRemove:g(t),variations:b(o,"transform")}},[t,o]),a=p=>{let g=(0,PE.switchToBlockType)(e,o);typeof p!="string"&&(p="group"),g&&g.length>0&&(g[0].attributes.layout=HCe[p],n(t,g))},c=()=>a("row"),u=()=>a("stack"),d=()=>a("grid");if(!r||!i)return null;let f=!!s.find(({name:p})=>p==="group-row"),m=!!s.find(({name:p})=>p==="group-stack"),h=!!s.find(({name:p})=>p==="group-grid");return(0,Cm.jsxs)(wm.ToolbarGroup,{children:[(0,Cm.jsx)(wm.ToolbarButton,{icon:nv,label:(0,vS._x)("Group","action: convert blocks to group"),onClick:a}),f&&(0,Cm.jsx)(wm.ToolbarButton,{icon:JL,label:(0,vS._x)("Row","action: convert blocks to row"),onClick:c}),m&&(0,Cm.jsx)(wm.ToolbarButton,{icon:pN,label:(0,vS._x)("Stack","action: convert blocks to stack"),onClick:u}),h&&(0,Cm.jsx)(wm.ToolbarButton,{icon:rv,label:(0,vS._x)("Grid","action: convert blocks to grid"),onClick:d})]})}var vV=GCe;var Bm=l(w(),1);function jZ({clientIds:e,isGroupable:t,isUngroupable:o,onUngroup:r,blocksSelection:n,groupingBlockName:i,onClose:s=()=>{}}){let{getSelectedBlockClientIds:a}=(0,RE.useSelect)(_),{replaceBlocks:c}=(0,RE.useDispatch)(_),u=()=>{let m=(0,FZ.switchToBlockType)(n,i);m&&c(e,m)},d=()=>{let m=n[0].innerBlocks;m.length&&(r&&(m=r(n[0].attributes,n[0].innerBlocks)),c(e,m))};if(!t&&!o)return null;let f=a();return(0,Bm.jsxs)(Bm.Fragment,{children:[t&&(0,Bm.jsx)(yV.MenuItem,{shortcut:f.length>1?zZ.displayShortcut.primary("g"):void 0,onClick:()=>{u(),s()},children:(0,SV._x)("Group","verb")}),o&&(0,Bm.jsx)(yV.MenuItem,{onClick:()=>{d(),s()},children:(0,SV._x)("Ungroup","Ungrouping blocks from within a grouping block back into individual blocks within the Editor")})]})}var _V=l(N(),1),GZ=l(R(),1),WZ=l(A(),1);var UZ=l(F(),1);function ei(e){return(0,UZ.useSelect)(t=>{let{canLockBlockType:o,getBlockName:r,isEditLockedBlock:n,isMoveLockedBlock:i,isRemoveLockedBlock:s,isLockedBlock:a}=M(t(_));return{isEditLocked:n(e),isMoveLocked:i(e),isRemoveLocked:s(e),canLock:o(r(e)),isLocked:a(e)}},[e])}var Ki=l(N(),1),yS=l(R(),1),bo=l(A(),1);var OE=l(F(),1),HZ=l($(),1);var It=l(w(),1),WCe=["core/navigation"];function $Ce(e){return e.remove&&e.move?"all":e.remove&&!e.move?"insert":!1}function AE({clientId:e,onClose:t}){let[o,r]=(0,yS.useState)({move:!1,remove:!1}),{isEditLocked:n,isMoveLocked:i,isRemoveLocked:s}=ei(e),{allowsEditLocking:a,templateLock:c,hasTemplateLock:u}=(0,OE.useSelect)(v=>{let{getBlockName:k,getBlockAttributes:y}=v(_),S=k(e),x=(0,HZ.getBlockType)(S);return{allowsEditLocking:WCe.includes(S),templateLock:y(e)?.templateLock,hasTemplateLock:!!x?.attributes?.templateLock}},[e]),[d,f]=(0,yS.useState)(!!c),{updateBlockAttributes:m}=(0,OE.useDispatch)(_),h=Tt(e);(0,yS.useEffect)(()=>{r({move:i,remove:s,...a?{edit:n}:{}})},[n,i,s,a]);let p=Object.values(o).every(Boolean),g=Object.values(o).some(Boolean)&&!p,b=o.move!==i||o.remove!==s||a&&o.edit!==n||u&&d!==!!c;return(0,It.jsx)(bo.Modal,{title:(0,Ki.sprintf)((0,Ki.__)("Lock %s"),h.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:t,size:"small",children:(0,It.jsxs)("form",{onSubmit:v=>{v.preventDefault(),b&&(m([e],{lock:o,templateLock:d?$Ce(o):void 0}),t())},children:[(0,It.jsxs)("fieldset",{className:"block-editor-block-lock-modal__options",children:[(0,It.jsx)("legend",{children:(0,Ki.__)("Select the features you want to lock")}),(0,It.jsx)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:(0,It.jsxs)("li",{children:[(0,It.jsx)(bo.CheckboxControl,{className:"block-editor-block-lock-modal__options-all",label:(0,Ki.__)("Lock all"),checked:p,indeterminate:g,onChange:v=>r({move:v,remove:v,...a?{edit:v}:{}})}),(0,It.jsxs)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:[a&&(0,It.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,It.jsx)(bo.CheckboxControl,{label:(0,Ki.__)("Lock editing"),checked:!!o.edit,onChange:v=>r(k=>({...k,edit:v}))}),(0,It.jsx)(bo.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.edit?Rf:vl})]}),(0,It.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,It.jsx)(bo.CheckboxControl,{label:(0,Ki.__)("Lock movement"),checked:o.move,onChange:v=>r(k=>({...k,move:v}))}),(0,It.jsx)(bo.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.move?Rf:vl})]}),(0,It.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,It.jsx)(bo.CheckboxControl,{label:(0,Ki.__)("Lock removal"),checked:o.remove,onChange:v=>r(k=>({...k,remove:v}))}),(0,It.jsx)(bo.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.remove?Rf:vl})]})]})]})}),u&&(0,It.jsx)(bo.ToggleControl,{className:"block-editor-block-lock-modal__template-lock",label:(0,Ki.__)("Apply to all blocks inside"),checked:d,disabled:o.move&&!o.remove,onChange:()=>f(!d)})]}),(0,It.jsxs)(bo.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,It.jsx)(bo.FlexItem,{children:(0,It.jsx)(bo.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,Ki.__)("Cancel")})}),(0,It.jsx)(bo.FlexItem,{children:(0,It.jsx)(bo.Button,{variant:"primary",type:"submit",disabled:!b,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,Ki.__)("Apply")})})]})]})})}var Em=l(w(),1);function xV({clientId:e}){let{canLock:t,isLocked:o}=ei(e),[r,n]=(0,GZ.useReducer)(s=>!s,!1);if(!t)return null;let i=o?(0,_V.__)("Unlock"):(0,_V.__)("Lock");return(0,Em.jsxs)(Em.Fragment,{children:[(0,Em.jsx)(WZ.MenuItem,{icon:o?vl:CL,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog",children:i}),r&&(0,Em.jsx)(AE,{clientId:e,onClose:n})]})}var LE=l(N(),1),NE=l(A(),1),_g=l(R(),1);var ld=l(w(),1);function wV({clientId:e}){let{canLock:t,isLocked:o}=ei(e),[r,n]=(0,_g.useReducer)(a=>!a,!1),i=(0,_g.useRef)(!1);if((0,_g.useEffect)(()=>{o&&(i.current=!0)},[o]),!o&&!i.current)return null;let s=o?(0,LE.__)("Unlock"):(0,LE.__)("Lock");return!t&&o&&(s=(0,LE.__)("Locked")),(0,ld.jsxs)(ld.Fragment,{children:[(0,ld.jsx)(NE.ToolbarGroup,{className:"block-editor-block-lock-toolbar",children:(0,ld.jsx)(NE.ToolbarButton,{disabled:!t,icon:o?Rf:vl,label:s,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog"})}),r&&(0,ld.jsx)(AE,{clientId:e,onClose:n})]})}var CV=l(N(),1),$Z=l(A(),1),ME=l($(),1),DE=l(F(),1);var KZ=l(w(),1),KCe=()=>{};function YZ({clientId:e,onToggle:t=KCe}){let{blockType:o,mode:r,enabled:n}=(0,DE.useSelect)(a=>{let{getBlock:c,getBlockMode:u,getSettings:d}=a(_),f=c(e);return{mode:u(e),blockType:f?(0,ME.getBlockType)(f.name):null,enabled:d().codeEditingEnabled&&!!f?.isValid}},[e]),{toggleBlockMode:i}=(0,DE.useDispatch)(_);if(!o||!(0,ME.hasBlockSupport)(o,"html",!0)||!n)return null;let s=r==="visual"?(0,CV.__)("Edit as HTML"):(0,CV.__)("Edit visually");return(0,KZ.jsx)($Z.MenuItem,{onClick:()=>{i(e),t()},children:s})}var QZ=l(A(),1),JZ=l(N(),1),eX=l(R(),1),tX=l(F(),1),oX=l(Is(),1);var Fs=l(A(),1),Vs=l(N(),1),ZZ=l(R(),1),XZ=l(Xo(),1),VE=l(F(),1);function qZ(e){return e?.trim()?.length===0}var Jl=l(w(),1);function Tm({clientId:e,onClose:t}){let[o,r]=(0,ZZ.useState)(),n=Tt(e),{metadata:i}=(0,VE.useSelect)(b=>{let{getBlockAttributes:v}=b(_);return{metadata:v(e)?.metadata}},[e]),{updateBlockAttributes:s}=(0,VE.useDispatch)(_),a=i?.name||"",c=n?.title,u=!!a&&!!i?.bindings&&Object.values(i.bindings).some(b=>b.source==="core/pattern-overrides"),d=o!==void 0&&o!==a,f=o===c,m=qZ(o),h=d||f,p=b=>b.target.select(),g=()=>{let b=f||m?void 0:o,v=f||m?(0,Vs.sprintf)((0,Vs.__)('Block name reset to: "%s".'),o):(0,Vs.sprintf)((0,Vs.__)('Block name changed to: "%s".'),o);(0,XZ.speak)(v,"assertive"),s([e],{metadata:Me({...i,name:b})}),t()};return(0,Jl.jsx)(Fs.Modal,{title:(0,Vs.__)("Rename"),onRequestClose:t,overlayClassName:"block-editor-block-rename-modal",focusOnMount:"firstContentElement",size:"small",children:(0,Jl.jsx)("form",{onSubmit:b=>{b.preventDefault(),h&&g()},children:(0,Jl.jsxs)(Fs.__experimentalVStack,{spacing:"3",children:[(0,Jl.jsx)(Fs.TextControl,{__next40pxDefaultSize:!0,value:o??a,label:(0,Vs.__)("Name"),help:u?(0,Vs.__)("This block allows overrides. Changing the name can cause problems with content entered into instances of this pattern."):void 0,placeholder:c,onChange:r,onFocus:p}),(0,Jl.jsxs)(Fs.__experimentalHStack,{justify:"right",children:[(0,Jl.jsx)(Fs.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,Vs.__)("Cancel")}),(0,Jl.jsx)(Fs.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,disabled:!h,variant:"primary",type:"submit",children:(0,Vs.__)("Save")})]})]})})})}var Im=l(w(),1);function BV({clientId:e}){let[t,o]=(0,eX.useState)(!1),r=(0,tX.useSelect)(n=>n(oX.store).getShortcutRepresentation("core/block-editor/rename"),[]);return(0,Im.jsxs)(Im.Fragment,{children:[(0,Im.jsx)(QZ.MenuItem,{onClick:()=>{o(!0)},"aria-expanded":t,"aria-haspopup":"dialog",shortcut:r,children:(0,JZ.__)("Rename")}),t&&(0,Im.jsx)(Tm,{clientId:e,onClose:()=>o(!1)})]})}var rX=l($(),1);function Pm(e){return{canRename:!!e&&(0,rX.getBlockSupport)(e,"renaming",!0)}}var zs=l(w(),1),{Fill:YCe,Slot:qCe}=(0,xg.createSlotFill)("BlockSettingsMenuControls"),ZCe=({fillProps:e,clientIds:t=null})=>{let{selectedBlocks:o,selectedClientIds:r,isContentOnly:n,canToggleSelectedBlocksVisibility:i,canEdit:s}=(0,iX.useSelect)(b=>{let{getBlocksByClientId:v,getBlockNamesByClientId:k,getSelectedBlockClientIds:y,getBlockEditingMode:S,canEditBlock:x}=b(_),C=t!==null?t:y();return{selectedBlocks:k(C),selectedClientIds:C,isContentOnly:S(C[0])==="contentOnly",canToggleSelectedBlocksVisibility:v(C).every(B=>(0,nX.hasBlockSupport)(B.name,"visibility",!0)),canEdit:x(C[0])}},[t]),{canLock:a}=ei(r[0]),{canRename:c}=Pm(o[0]),u=r.length===1&&a&&!n,d=r.length===1&&c&&!n,f=i&&!n,m=kS(r),{isGroupable:h,isUngroupable:p}=m,g=(h||p)&&!n;return(0,zs.jsx)(qCe,{fillProps:{...e,canEdit:s,selectedBlocks:o,selectedClientIds:r},children:b=>!b?.length>0&&!g&&!u?null:(0,zs.jsxs)(xg.MenuGroup,{children:[g&&(0,zs.jsx)(jZ,{...m,onClose:e?.onClose}),s&&u&&(0,zs.jsx)(xV,{clientId:r[0]}),s&&d&&(0,zs.jsx)(BV,{clientId:r[0]}),s&&f&&(0,zs.jsx)(PD,{clientIds:r}),b,s&&e?.count===1&&!n&&(0,zs.jsx)(YZ,{clientId:e?.firstBlockClientId,onToggle:e?.onClose})]})})};function sX({...e}){return(0,zs.jsx)(xg.__experimentalStyleProvider,{document,children:(0,zs.jsx)(YCe,{...e})})}sX.Slot=ZCe;var FE=sX;var aX=l(R(),1),lX=l(A(),1),cX=l(Z(),1),uX=l(F(),1),zE=l(N(),1);var EV=l(w(),1);function dX({parentClientId:e,parentBlockType:t}){let o=(0,cX.useViewportMatch)("medium","<"),{selectBlock:r}=(0,uX.useDispatch)(_),n=(0,aX.useRef)(),i=kg({ref:n,highlightParent:!0});return o?(0,EV.jsx)(lX.MenuItem,{...i,ref:n,icon:(0,EV.jsx)(Ae,{icon:t.icon}),onClick:()=>r(e),children:(0,zE.sprintf)((0,zE.__)("Select parent block (%s)"),t.title)}):null}var kt=l(w(),1),XCe={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"};function TV({clientIds:e,onCopy:t,label:o,shortcut:r,eventType:n="copy",__experimentalUpdateSelection:i=!1}){let{getBlocksByClientId:s}=(0,Om.useSelect)(_),{removeBlocks:a}=(0,Om.useDispatch)(_),c=Oh(),u=(0,Rm.useCopyToClipboard)(()=>(0,wg.serialize)(s(e)),()=>{switch(n){case"copy":case"copyStyles":t(),c(n,e);break;case"cut":c(n,e),a(e,i);break;default:break}}),d=o||(0,Pa.__)("Copy");return(0,kt.jsx)(ti.MenuItem,{ref:u,shortcut:r,children:d})}function IV({block:e,clientIds:t,children:o,__experimentalSelectBlock:r,...n}){let i=t.length,s=t[0],{firstParentClientId:a,parentBlockType:c,previousBlockClientId:u,selectedBlockClientIds:d,isContentOnly:f,isZoomOut:m,canEdit:h}=(0,Om.useSelect)(C=>{let{getBlockName:B,getBlockRootClientId:I,getPreviousBlockClientId:P,getSelectedBlockClientIds:E,getBlockAttributes:L,getBlockEditingMode:T,isZoomOut:O,canEditBlock:D}=M(C(_)),{getActiveBlockVariation:U}=C(wg.store),G=I(s),j=G&&B(G);return{firstParentClientId:G,parentBlockType:G&&(U(j,L(G))||(0,wg.getBlockType)(j)),previousBlockClientId:P(s),selectedBlockClientIds:E(),isContentOnly:T(s)==="contentOnly",isZoomOut:O(),canEdit:D(s)}},[s]),{getBlockOrder:p,getSelectedBlockClientIds:g}=(0,Om.useSelect)(_),b=(0,Om.useSelect)(C=>{let{getShortcutRepresentation:B}=C(fX.store);return{copy:B("core/block-editor/copy"),cut:B("core/block-editor/cut"),duplicate:B("core/block-editor/duplicate"),remove:B("core/block-editor/remove"),insertAfter:B("core/block-editor/insert-after"),insertBefore:B("core/block-editor/insert-before")}},[]),v=d.length>0;async function k(C){if(!r)return;let B=await C;B&&B[0]&&r(B[0],!1)}function y(){if(!r)return;let C=u||a;C||(C=p()[0]);let B=v&&g().length===0;r(C,B)}let x=!d?.includes(a)&&!!a;return(0,kt.jsx)(IZ,{clientIds:t,__experimentalUpdateSelection:!r,children:({canCopyStyles:C,canDuplicate:B,canInsertBlock:I,canRemove:P,onDuplicate:E,onInsertAfter:L,onInsertBefore:T,onRemove:O,onCopy:D,onPasteStyles:U})=>!P&&!B&&!I&&f?null:(0,kt.jsx)(ti.DropdownMenu,{icon:ks,label:(0,Pa.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:XCe,noIcons:!0,...n,children:({onClose:j})=>(0,kt.jsxs)(kt.Fragment,{children:[(0,kt.jsxs)(ti.MenuGroup,{children:[(0,kt.jsx)(TE.Slot,{fillProps:{onClose:j}}),x&&(0,kt.jsx)(dX,{parentClientId:a,parentBlockType:c}),h&&i===1&&(0,kt.jsx)(LZ,{clientId:s}),!f&&(0,kt.jsx)(TV,{clientIds:t,onCopy:D,shortcut:b.copy}),P&&!f&&(0,kt.jsx)(TV,{clientIds:t,label:(0,Pa.__)("Cut"),eventType:"cut",shortcut:b.cut,__experimentalUpdateSelection:!r}),B&&(0,kt.jsx)(ti.MenuItem,{onClick:(0,Rm.pipe)(j,E,k),shortcut:b.duplicate,children:(0,Pa.__)("Duplicate")}),I&&!m&&(0,kt.jsxs)(kt.Fragment,{children:[(0,kt.jsx)(ti.MenuItem,{onClick:(0,Rm.pipe)(j,T),shortcut:b.insertBefore,children:(0,Pa.__)("Add before")}),(0,kt.jsx)(ti.MenuItem,{onClick:(0,Rm.pipe)(j,L),shortcut:b.insertAfter,children:(0,Pa.__)("Add after")})]}),h&&i===1&&(0,kt.jsx)(CE.Slot,{fillProps:{clientId:s,onClose:j}})]}),C&&!f&&(0,kt.jsxs)(ti.MenuGroup,{children:[(0,kt.jsx)(TV,{clientIds:t,onCopy:D,label:(0,Pa.__)("Copy styles"),eventType:"copyStyles"}),h&&(0,kt.jsx)(ti.MenuItem,{onClick:U,children:(0,Pa.__)("Paste styles")})]}),!f&&(0,kt.jsx)(FE.Slot,{fillProps:{onClose:j,count:i,firstBlockClientId:s},clientIds:t}),typeof o=="function"?o({onClose:j}):jE.Children.map(z=>(0,jE.cloneElement)(z,{onClose:j})),P&&(0,kt.jsx)(ti.MenuGroup,{children:(0,kt.jsx)(ti.MenuItem,{onClick:(0,Rm.pipe)(j,O,y),shortcut:b.remove,children:(0,Pa.__)("Delete")})})]})})})}var mX=IV;var pX=l(A(),1),QCe=(0,pX.createSlotFill)(Symbol("CommentIconToolbarSlotFill")),UE=QCe;var Cg=l(w(),1);function JCe({clientIds:e,...t}){return(0,Cg.jsxs)(HE.ToolbarGroup,{children:[(0,Cg.jsx)(UE.Slot,{}),(0,Cg.jsx)(HE.ToolbarItem,{children:o=>(0,Cg.jsx)(mX,{clientIds:e,toggleProps:o,...t})})]})}var GE=JCe;var WE=l(A(),1),hX=l(N(),1),$E=l(F(),1);var PV=l(w(),1);function gX({clientIds:e}){let t=e.length===1?e[0]:void 0,o=(0,$E.useSelect)(n=>!!t&&n(_).getBlockMode(t)==="html",[t]),{toggleBlockMode:r}=(0,$E.useDispatch)(_);return o?(0,PV.jsx)(WE.ToolbarGroup,{children:(0,PV.jsx)(WE.ToolbarButton,{onClick:()=>{r(t)},children:(0,hX.__)("Edit visually")})}):null}var KE=l(A(),1),Yr=l(R(),1),vX=l(F(),1),yX=l(Re(),1),OV=l(Fe(),1),SX=l(Is(),1),_X=l(it(),1);var RV=l(w(),1);function e1e(e){let t="toolbarItem";return!e.some(o=>!(t in o.dataset))}function bX(e){return Array.from(e.querySelectorAll("[data-toolbar-item]:not([disabled])"))}function kX(e){return e.contains(e.ownerDocument.activeElement)}function t1e(e){let[t]=OV.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}function o1e(e){let[o,r]=(0,Yr.useState)(!0),n=(0,Yr.useCallback)(()=>{let i=OV.focus.tabbable.find(e.current),s=e1e(i);s||(0,yX.default)("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem, ToolbarButton or ToolbarDropdownMenu components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),r(s)},[e]);return(0,Yr.useLayoutEffect)(()=>{let i=new window.MutationObserver(n);return i.observe(e.current,{childList:!0,subtree:!0}),()=>i.disconnect()},[n,o,e]),o}function r1e({toolbarRef:e,focusOnMount:t,isAccessibleToolbar:o,defaultIndex:r,onIndexChange:n,shouldUseKeyboardFocusShortcut:i,focusEditorOnEscape:s}){let[a]=(0,Yr.useState)(t),[c]=(0,Yr.useState)(r),u=(0,Yr.useCallback)(()=>{t1e(e.current)},[e]);(0,SX.useShortcut)("core/block-editor/focus-toolbar",()=>{i&&u()}),(0,Yr.useEffect)(()=>{a&&u()},[o,a,u]),(0,Yr.useEffect)(()=>{let m=e.current,h=0;return!a&&!kX(m)&&(h=window.requestAnimationFrame(()=>{let p=bX(m),g=c||0;p[g]&&kX(m)&&p[g].focus({preventScroll:!0})})),()=>{if(window.cancelAnimationFrame(h),!n||!m)return;let g=bX(m).findIndex(b=>b.tabIndex===0);n(g)}},[c,a,n,e]);let{getLastFocus:f}=M((0,vX.useSelect)(_));(0,Yr.useEffect)(()=>{let m=e.current;if(s){let h=p=>{let g=f();p.keyCode===_X.ESCAPE&&g?.current&&(p.preventDefault(),g.current.focus())};return m.addEventListener("keydown",h),()=>{m.removeEventListener("keydown",h)}}},[s,f,e])}function Bg({children:e,focusOnMount:t,focusEditorOnEscape:o=!1,shouldUseKeyboardFocusShortcut:r=!0,__experimentalInitialIndex:n,__experimentalOnIndexChange:i,orientation:s="horizontal",...a}){let c=(0,Yr.useRef)(),u=o1e(c);return r1e({toolbarRef:c,focusOnMount:t,defaultIndex:n,onIndexChange:i,isAccessibleToolbar:u,shouldUseKeyboardFocusShortcut:r,focusEditorOnEscape:o}),u?(0,RV.jsx)(KE.Toolbar,{label:a["aria-label"],ref:c,orientation:s,...a,children:e}):(0,RV.jsx)(KE.NavigableMenu,{orientation:s,role:"toolbar",ref:c,...a,children:e})}var xX=l(F(),1),YE=l($(),1);function qE(){return(0,xX.useSelect)(t=>{let{getBlockEditingMode:o,getBlockName:r,getBlockSelectionStart:n}=t(_),i=n(),s=i&&(0,YE.getBlockType)(r(i));return s&&(0,YE.hasBlockSupport)(s,"__experimentalToolbar",!0)&&o(i)!=="disabled"},[])}var cd=l(A(),1),wX=l(N(),1),CX=l($(),1),BX=l(R(),1),ZE=l(F(),1);var Eg=l(w(),1),AV=[],n1e=6,i1e={placement:"bottom-start"};function EX({clientId:e}){let{categories:t,currentPatternName:o,patterns:r}=(0,ZE.useSelect)(a=>{let{getBlockAttributes:c,getBlockRootClientId:u,__experimentalGetAllowedPatterns:d}=a(_),f=c(e),m=f?.metadata?.categories||AV,h=u(e),p=m.length>0?d(h):AV;return{categories:m,currentPatternName:f?.metadata?.patternName,patterns:p}},[e]),{replaceBlocks:n}=(0,ZE.useDispatch)(_),i=(0,BX.useMemo)(()=>t.length===0||!r||r.length===0?AV:r.filter(a=>{let c=a.source==="core"||a.source?.startsWith("pattern-directory")&&a.source!=="pattern-directory/theme";return a.blocks.length===1&&!c&&o!==a.name&&a.categories?.some(u=>t.includes(u))&&(a.syncStatus==="unsynced"||!a.id)}).slice(0,n1e),[t,o,r]);if(i.length<2)return null;let s=a=>{let c=(a.blocks??[]).map(u=>(0,CX.cloneBlock)(u));c[0].attributes.metadata={...c[0].attributes.metadata,categories:t},n(e,c)};return(0,Eg.jsx)(cd.Dropdown,{popoverProps:i1e,renderToggle:({onToggle:a,isOpen:c})=>(0,Eg.jsx)(cd.ToolbarGroup,{children:(0,Eg.jsx)(cd.ToolbarButton,{onClick:()=>a(!c),"aria-expanded":c,children:(0,wX.__)("Change design")})}),renderContent:()=>(0,Eg.jsx)(cd.__experimentalDropdownContentWrapper,{className:"block-editor-block-toolbar-change-design-content-wrapper",paddingSize:"none",children:(0,Eg.jsx)(Ca,{blockPatterns:i,onClickPattern:s,showTitlesAsTooltip:!0})})})}var Us=l(A(),1),XX=l(N(),1),iT=l(F(),1);var JE=l(F(),1),ud=l($(),1),OX=l(R(),1);var LV=l(XE(),1),IX=l(N(),1);function PX(e,t){for(let o of new LV.default(t).values()){if(o.indexOf("is-style-")===-1)continue;let r=o.substring(9),n=e?.find(({name:i})=>i===r);if(n)return n}return QE(e)}function Tg(e,t,o){let r=new LV.default(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+o.name),r.value}function RX(e){return!e||e.length===0?[]:QE(e)?e:[{name:"default",label:(0,IX._x)("Default","block style"),isDefault:!0},...e]}function QE(e){return e?.find(t=>t.isDefault)}function s1e(e,t){return(0,OX.useMemo)(()=>{let o=t?.example,r=t?.name;if(o&&r)return(0,ud.getBlockFromExample)(r,{attributes:o.attributes,innerBlocks:o.innerBlocks});if(e)return(0,ud.cloneBlock)(e)},[e,t?.example,t?.name])}function Ig({clientId:e,onSwitch:t}){let o=m=>{let{getBlock:h}=m(_),p=h(e);if(!p)return{};let g=(0,ud.getBlockType)(p.name),{getBlockStyles:b}=m(ud.store);return{block:g?.example?null:p,blockType:g,styles:b(p.name),className:p.attributes.className||""}},{styles:r,block:n,blockType:i,className:s}=(0,JE.useSelect)(o,[e]),{updateBlockAttributes:a}=(0,JE.useDispatch)(_),c=RX(r),u=PX(c,s),d=s1e(n,i);return{onSelect:m=>{let h=Tg(s,u,m);a(e,{className:h}),t()},stylesToRender:c,activeStyle:u,genericPreviewBlock:d,className:s}}var Lg=l($(),1),BS=l(F(),1),nT=l(R(),1);function AX(e,t,o){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};let r=t.pop(),n=e;for(let i of t){let s=n[i];n=n[i]=Array.isArray(s)?[...s]:{...s}}return n[r]=o,e}var Oo=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var NX=l(Uv(),1);var a1e="1600px",l1e="320px",c1e=1,u1e=.25,d1e=.75,f1e="14px";function LX({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=l1e,maximumViewportWidth:n=a1e,scaleFactor:i=c1e,minimumFontSizeLimit:s}){if(s=Ra(s)?s:f1e,o){let y=Ra(o);if(!y?.unit||!y?.value)return null;let S=Ra(s,{coerceTo:y.unit});if(S?.value&&!e&&!t&&y?.value<=S?.value)return null;if(t||(t=`${y.value}${y.unit}`),!e){let x=y.unit==="px"?y.value:y.value*16,C=Math.min(Math.max(1-.075*Math.log2(x),u1e),d1e),B=SS(y.value*C,3);S?.value&&B<S?.value?e=`${S.value}${S.unit}`:e=`${B}${y.unit}`}}let a=Ra(e),c=a?.unit||"rem",u=Ra(t,{coerceTo:c});if(!a||!u)return null;let d=Ra(e,{coerceTo:"rem"}),f=Ra(n,{coerceTo:c}),m=Ra(r,{coerceTo:c});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let p=SS(m.value/100,3),g=SS(p,3)+c,b=100*((u.value-a.value)/h),v=SS((b||1)*i,3),k=`${d.value}${d.unit} + ((1vw - ${g}) * ${v})`;return`clamp(${e}, ${k}, ${t})`}function Ra(e,t={}){if(typeof e!="string"&&typeof e!="number")return null;isFinite(e)&&(e=`${e}px`);let{coerceTo:o,rootSizeValue:r,acceptableUnits:n}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=n?.join("|"),s=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),a=e.toString().match(s);if(!a||a.length<3)return null;let[,c,u]=a,d=parseFloat(c);return o==="px"&&(u==="em"||u==="rem")&&(d=d*r,u=o),u==="px"&&(o==="em"||o==="rem")&&(d=d/r,u=o),(o==="em"||o==="rem")&&(u==="em"||u==="rem")&&(u=o),u?{value:SS(d,3),unit:u}:null}function SS(e,t=3){let o=Math.pow(10,t);return Math.round(e*o)/o}function NV(e){let t=e?.fluid;return t===!0||t&&typeof t=="object"&&Object.keys(t).length>0}function m1e(e){let t=e?.typography??{},o=e?.layout,r=Ra(o?.wideSize)?o?.wideSize:null;return NV(t)&&r?{fluid:{maxViewportWidth:r,...typeof t.fluid=="object"?t.fluid:{}}}:{fluid:t?.fluid}}function ec(e,t){let{size:o}=e;if(!o||o==="0"||e?.fluid===!1||!NV(t?.typography)&&!NV(e))return o;let r=m1e(t)?.fluid??{},n=LX({minimumFontSize:typeof e?.fluid=="boolean"?void 0:e?.fluid?.min,maximumFontSize:typeof e?.fluid=="boolean"?void 0:e?.fluid?.max,fontSize:o,minimumFontSizeLimit:typeof r=="object"?r?.minFontSize:void 0,maximumViewportWidth:typeof r=="object"?r?.maxViewportWidth:void 0,minimumViewportWidth:typeof r=="object"?r?.minViewportWidth:void 0});return n||o}var Oa="body",_S=":root",eT=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],valueKey:"colors",cssVarInfix:"duotone",valueFunc:({slug:e})=>`url( '#wp-duotone-${e}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>ec(e,t),valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:({size:e})=>e,classes:[]},{path:["border","radiusSizes"],valueKey:"size",cssVarInfix:"border-radius",classes:[]},{path:["dimensions","dimensionSizes"],valueKey:"size",cssVarInfix:"dimension",classes:[]}];function js(e,t){if(!e||!t)return t;let o=e.split(","),r=t.split(","),n=[];return o.forEach(i=>{r.forEach(s=>{n.push(`${i.trim()} ${s.trim()}`)})}),n.join(", ")}function MX(e,t){if(!e||!t)return;let o={};return Object.entries(t).forEach(([r,n])=>{typeof n=="string"&&(o[r]=js(e,n)),typeof n=="object"&&(o[r]={},Object.entries(n).forEach(([i,s])=>{o[r][i]=js(e,s)}))}),o}function DX(e,t){return e.includes(",")?e.split(",").map(n=>n+t).join(","):e+t}function VX(e,t){let o=`.is-style-${e}`;if(!t)return o;let r=/((?::\([^)]+\))?\s*)([^\s:]+)/,n=(s,a,c)=>a+c+o;return t.split(",").map(s=>s.replace(r,n)).join(",")}function p1e(e,t){if(!e||!t)return e;if(typeof e=="object"&&"ref"in e&&e?.ref){let o=(0,NX.getCSSValueFromRawStyle)(Oo(t,e.ref));return typeof o=="object"&&o!==null&&"ref"in o&&o?.ref?void 0:o===void 0?e:o}return e}function h1e(e,t){if(!e||!t||!Array.isArray(t))return e;let o=t.find(r=>r?.name===e);return o?.href?o?.href:e}function Pg(e,t){if(!e||!t)return e;let o=p1e(e,t);return typeof o=="object"&&o!==null&&"url"in o&&o?.url&&(o.url=h1e(o.url,t?._links?.["wp:theme-file"])),o}function FX(e,t,o=[],r="slug",n){let i=[t?Oo(e,["blocks",t,...o]):void 0,Oo(e,o)].filter(Boolean);for(let s of i)if(s){let a=["custom","theme","default"];for(let c of a){let u=s[c];if(u){let d=u.find(f=>f[r]===n);if(d)return r==="slug"||FX(e,t,o,"slug",d.slug)[r]===d[r]?d:void 0}}}}function g1e(e,t,o,[r,n]=[]){let i=eT.find(a=>a.cssVarInfix===r);if(!i||!e.settings)return o;let s=FX(e.settings,t,i.path,"slug",n);if(s){let{valueKey:a}=i,c=s[a];return wn(e,t,c)}return o}function b1e(e,t,o,r=[]){let n=(t?Oo(e?.settings??{},["blocks",t,"custom",...r]):void 0)??Oo(e?.settings??{},["custom",...r]);return n?wn(e,t,n):o}function wn(e,t,o){if(!o||typeof o!="string")if(typeof o=="object"&&o!==null&&"ref"in o&&typeof o.ref=="string"){let u=Oo(e,o.ref);if(!u||typeof u=="object"&&"ref"in u)return u;o=u}else return o;let r="var:",n="var(--wp--",i=")",s;if(o.startsWith(r))s=o.slice(r.length).split("|");else if(o.startsWith(n)&&o.endsWith(i))s=o.slice(n.length,-i.length).split("--");else return o;let[a,...c]=s;return a==="preset"?g1e(e,t,o,c):a==="custom"?b1e(e,t,o,c):o}var qr=l($(),1),wS=l(Uv(),1),YX=l(F(),1);function oi(e,t="root",o={}){if(!t)return null;let{fallback:r=!1}=o,{name:n,selectors:i,supports:s}=e,a=i&&Object.keys(i).length>0,c=Array.isArray(t)?t.join("."):t,u=null;if(a&&i.root?u=i?.root:s?.__experimentalSelector?u=s.__experimentalSelector:u=".wp-block-"+n.replace("core/","").replace("/","-"),c==="root")return u;let d=Array.isArray(t)?t:t.split(".");if(d.length===1){let m=r?u:null;if(a)return Oo(i,`${c}.root`,null)||Oo(i,c,null)||m;let h=s?Oo(s,`${c}.__experimentalSelector`,null):void 0;return h?js(u,h):m}let f;return a&&(f=Oo(i,c,null)),f||(r?oi(e,d[0],o):null)}function Og(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([0-9])([a-zA-Z])/g,"$1-$2").replace(/([a-zA-Z])([0-9])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function DV(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function R1e(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function VV(e,t="0"){let o=R1e(e);if(!o)return null;let r=DV(o?.top)||t,n=DV(o?.left)||t;return r===n?r:`${r} ${n}`}var HX={backgroundSize:"cover",backgroundPosition:"50% 50%"};function GX(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:HX.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:HX.backgroundPosition}),t}var WX={default:{name:"default",slug:"flow",className:"is-layout-flow",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},constrained:{name:"constrained",slug:"constrained",className:"is-layout-constrained",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > :where(:not(.alignleft):not(.alignright):not(.alignfull))",rules:{"max-width":"var(--wp--style--global--content-size)","margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > .alignwide",rules:{"max-width":"var(--wp--style--global--wide-size)"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},flex:{name:"flex",slug:"flex",className:"is-layout-flex",displayMode:"flex",baseStyles:[{selector:"",rules:{"flex-wrap":"wrap","align-items":"center"}},{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}};var O1e={button:"wp-element-button",caption:"wp-element-caption"},A1e={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"};function L1e(e="*",t={}){return eT.reduce((o,{path:r,cssVarInfix:n,classes:i})=>{if(!i)return o;let s=Oo(t,r,[]);return["default","theme","custom"].forEach(a=>{s[a]&&s[a].forEach(({slug:c})=>{i.forEach(({classSuffix:u,propertyName:d})=>{let f=`.has-${Og(c)}-${u}`,m=e.split(",").map(p=>`${p}${f}`).join(","),h=`var(--wp--preset--${n}--${Og(c)})`;o+=`${m}{${d}: ${h} !important;}`})})}),o},"")}function N1e(e,t){let o=e.split(","),r=[];return o.forEach(n=>{r.push(`${t.trim()}${n.trim()}`)}),r.join(", ")}var $X=(e,t,o)=>{if(o!=="core/paragraph"||(t?.blocks?.["core/paragraph"]?.typography?.textIndent??t?.typography?.textIndent??"subsequent")!=="all")return e;let i=".wp-block-paragraph + .wp-block-paragraph",s=".wp-block-paragraph";if(i in e){let a=e[i],c={...e};return delete c[i],c[s]=a,c}return e},KX=(e,t)=>{let o={};return Object.entries(e).forEach(([r,n])=>{if(r==="root"||!t?.[r])return;let i=typeof n=="string";if(!i&&typeof n=="object"&&n!==null&&Object.entries(n).forEach(([s,a])=>{if(s==="root"||!t?.[r][s])return;let c={[r]:{[s]:t[r][s]}},u=Ag(c);o[a]=[...o[a]||[],...u],delete t[r][s]}),i||typeof n=="object"&&n!==null&&"root"in n){let s=i?n:n.root,a={[r]:t[r]},c=Ag(a);o[s]=[...o[s]||[],...c],delete t[r]}}),o};function Ag(e={},t="",o,r={},n=!1){let i=Oa===t,s=Object.entries(qr.__EXPERIMENTAL_STYLE_PROPERTY).reduce((c,[u,{value:d,properties:f,useEngine:m,rootOnly:h}])=>{if(h&&!i)return c;let p=d;if(p[0]==="elements"||m)return c;let g=Oo(e,p);if(u==="--wp--style--root--padding"&&(typeof g=="string"||!o))return c;if(f&&typeof g!="string")Object.entries(f).forEach(b=>{let[v,k]=b;if(!Oo(g,[k],!1))return;let y=v.startsWith("--")?v:Og(v);c.push(`${y}: ${(0,wS.getCSSValueFromRawStyle)(Oo(g,[k]))}`)});else if(Oo(e,p,!1)){let b=u.startsWith("--")?u:Og(u);c.push(`${b}: ${(0,wS.getCSSValueFromRawStyle)(Oo(e,p))}`)}return c},[]);return e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=Pg(e.background.backgroundImage,r)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...GX(e.background)}})),(0,wS.getCSSRules)(e).forEach(c=>{if(i&&(o||n)&&c.key.startsWith("padding"))return;let u=c.key.startsWith("--")?c.key:Og(c.key),d=Pg(c.value,r);u==="font-size"&&(d=ec({name:"",slug:"",size:d},r?.settings)),u==="aspect-ratio"&&s.push("min-height: unset"),s.push(`${u}: ${d}`)}),s}function FV({layoutDefinitions:e=WX,style:t,selector:o,hasBlockGapSupport:r,hasFallbackGapSupport:n,fallbackGapValue:i}){let s="",a=r?VV(t?.spacing?.blockGap):"";if(n&&(o===Oa?a=a||"0.5em":!r&&i&&(a=i)),a&&e&&(Object.values(e).forEach(({className:c,name:u,spacingStyles:d})=>{!r&&u!=="flex"&&u!=="grid"||d?.length&&d.forEach(f=>{let m=[];if(f.rules&&Object.entries(f.rules).forEach(([h,p])=>{m.push(`${h}: ${p||a}`)}),m.length){let h="";r?h=o===Oa?`:root :where(.${c})${f?.selector||""}`:`:root :where(${o}-${c})${f?.selector||""}`:h=o===Oa?`:where(.${c}${f?.selector||""})`:`:where(${o}.${c}${f?.selector||""})`,s+=`${h} { ${m.join("; ")}; }`}})}),o===Oa&&r&&(s+=`${_S} { --wp--style--block-gap: ${a}; }`)),o===Oa&&e){let c=["block","flex","grid"];Object.values(e).forEach(({className:u,displayMode:d,baseStyles:f})=>{d&&c.includes(d)&&(s+=`${o} .${u} { display:${d}; }`),f?.length&&f.forEach(m=>{let h=[];if(m.rules&&Object.entries(m.rules).forEach(([p,g])=>{h.push(`${p}: ${g}`)}),h.length){let p=`.${u}${m?.selector||""}`;s+=`${p} { ${h.join("; ")}; }`}})})}return s}var M1e=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function tT(e){if(!e)return{};let r=Object.entries(e).filter(([n])=>M1e.includes(n)).map(([n,i])=>[n,JSON.parse(JSON.stringify(i))]);return Object.fromEntries(r)}var D1e=(e,t)=>{let o=[];if(!e?.styles)return o;let r=tT(e.styles);return r&&o.push({styles:r,selector:Oa,skipSelectorWrapper:!0}),Object.entries(qr.__EXPERIMENTAL_ELEMENTS).forEach(([n,i])=>{e.styles?.elements?.[n]&&o.push({styles:e.styles?.elements?.[n]??{},selector:i,skipSelectorWrapper:!O1e[n]})}),Object.entries(e.styles?.blocks??{}).forEach(([n,i])=>{let s=tT(i),a=i,c=[];if(a?.variations){let u={};Object.entries(a.variations).forEach(([d,f])=>{let m=f;u[d]=tT(m),m?.css&&(u[d].css=m.css);let h=typeof t!="string"?t[n]?.styleVariationSelectors?.[d]:void 0;Object.entries(m?.elements??{}).forEach(([p,g])=>{g&&qr.__EXPERIMENTAL_ELEMENTS[p]&&c.push({styles:g,selector:js(h,qr.__EXPERIMENTAL_ELEMENTS[p])})}),Object.entries(m?.blocks??{}).forEach(([p,g])=>{let b=typeof t!="string"?js(h,t[p]?.selector):void 0,v=typeof t!="string"?js(h,t[p]?.duotoneSelector):void 0,k=typeof t!="string"?MX(h,t[p]?.featureSelectors??{}):void 0,y=tT(g);g?.css&&(y.css=g.css),!(!b||typeof t=="string")&&(c.push({selector:b,duotoneSelector:v,featureSelectors:k,fallbackGapValue:t[p]?.fallbackGapValue,hasLayoutSupport:t[p]?.hasLayoutSupport,styles:y}),Object.entries(g.elements??{}).forEach(([S,x])=>{x&&qr.__EXPERIMENTAL_ELEMENTS[S]&&c.push({styles:x,selector:js(b,qr.__EXPERIMENTAL_ELEMENTS[S])})}))})}),s.variations=u}typeof t!="string"&&t?.[n]?.selector&&o.push({duotoneSelector:t[n].duotoneSelector,fallbackGapValue:t[n].fallbackGapValue,hasLayoutSupport:t[n].hasLayoutSupport,selector:t[n].selector,styles:s,featureSelectors:t[n].featureSelectors,styleVariationSelectors:t[n].styleVariationSelectors,name:n}),Object.entries(a?.elements??{}).forEach(([u,d])=>{typeof t!="string"&&d&&t?.[n]&&qr.__EXPERIMENTAL_ELEMENTS[u]&&o.push({styles:d,selector:t[n]?.selector.split(",").map(f=>qr.__EXPERIMENTAL_ELEMENTS[u].split(",").map(h=>f+" "+h)).join(",")})}),o.push(...c)}),o},V1e=(e,t)=>{let o=[];if(!e?.settings)return o;let r=s=>{let a={};return eT.forEach(({path:c})=>{let u=Oo(s,c,!1);u!==!1&&(a=AX(a,c,u))}),a},n=r(e.settings),i=e.settings?.custom;return(Object.keys(n).length>0||i)&&o.push({presets:n,custom:i,selector:_S}),Object.entries(e.settings?.blocks??{}).forEach(([s,a])=>{let c=a.custom;if(typeof t=="string"||!t[s])return;let u=r(a);(Object.keys(u).length>0||c)&&o.push({presets:u,custom:c,selector:t[s]?.selector})}),o};var oT=(e,t,o,r,n=!1,i=!1,s={})=>{let a={blockGap:!0,blockStyles:!0,layoutStyles:!0,marginReset:!0,presets:!0,rootPadding:!0,variationStyles:!1,...s},c=D1e(e,t),u=V1e(e,t),d=e?.settings?.useRootPaddingAwareAlignments,{contentSize:f,wideSize:m}=e?.settings?.layout||{},h=a.marginReset||a.rootPadding||a.layoutStyles,p="";if(a.presets&&(f||m)&&(p+=`${_S} {`,p=f?p+` --wp--style--global--content-size: ${f};`:p,p=m?p+` --wp--style--global--wide-size: ${m};`:p,p+="}"),h&&(p+=":where(body) {margin: 0;",a.rootPadding&&d&&(p+=`padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }
				.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
				.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;
				`),p+="}"),a.blockStyles&&c.forEach(({selector:g,duotoneSelector:b,styles:v,fallbackGapValue:k,hasLayoutSupport:y,featureSelectors:S,styleVariationSelectors:x,skipSelectorWrapper:C,name:B})=>{if(S){let E=KX(S,v);E=$X(E,e.settings,B),Object.entries(E).forEach(([L,T])=>{if(T.length){let O=T.join(";");p+=`:root :where(${L}){${O};}`}})}if(b){let E={};v?.filter&&(E.filter=v.filter,delete v.filter);let L=Ag(E);L.length&&(p+=`${b}{${L.join(";")};}`)}!n&&(Oa===g||y)&&(p+=FV({style:v,selector:g,hasBlockGapSupport:o,hasFallbackGapSupport:r,fallbackGapValue:k}));let I=Ag(v,g,d,e,i);if(I?.length){let E=C?g:`:root :where(${g})`;p+=`${E}{${I.join(";")};}`}v?.css&&(p+=CS(v.css,`:root :where(${g})`)),a.variationStyles&&x&&Object.entries(x).forEach(([E,L])=>{let T=v?.variations?.[E];if(T){if(S){let D=KX(S,T);D=$X(D,e.settings,B),Object.entries(D).forEach(([U,G])=>{if(G.length){let j=N1e(U,L),z=G.join(";");p+=`:root :where(${j}){${z};}`}})}let O=Ag(T,L,d,e);if(O.length&&(p+=`:root :where(${L}){${O.join(";")};}`),T?.css&&(p+=CS(T.css,`:root :where(${L})`)),y&&T?.spacing?.blockGap){let D=L+g;p+=FV({style:T,selector:D,hasBlockGapSupport:!0,hasFallbackGapSupport:r,fallbackGapValue:k})}}});let P=Object.entries(v).filter(([E])=>E.startsWith(":"));P?.length&&P.forEach(([E,L])=>{let T=Ag(L);if(!T?.length)return;let D=`:root :where(${g.split(",").map(U=>U+E).join(",")}){${T.join(";")};}`;p+=D})}),a.layoutStyles&&(p=p+".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",p=p+".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",p=p+".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),a.blockGap&&o){let g=VV(e?.styles?.spacing?.blockGap)||"0.5em";p=p+`:root :where(.wp-site-blocks) > * { margin-block-start: ${g}; margin-block-end: 0; }`,p=p+":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",p=p+":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return a.presets&&u.forEach(({selector:g,presets:b})=>{(Oa===g||_S===g)&&(g="");let v=L1e(g,b);v.length>0&&(p+=v)}),p};var F1e=(e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;let o={root:t};return Object.entries(A1e).forEach(([r,n])=>{let i=oi(e,r);i&&(o[n]=i)}),o},rT=(e,t)=>{let{getBlockStyles:o}=(0,YX.select)(qr.store),r={};return e.forEach(n=>{let i=n.name,s=oi(n);if(!s)return;let a=oi(n,"filter.duotone");if(!a){let h=oi(n),p=(0,qr.getBlockSupport)(n,"color.__experimentalDuotone",!1);a=p&&h&&js(h,p)}let c=!!n?.supports?.layout||!!n?.supports?.__experimentalLayout,u=n?.supports?.spacing?.blockGap?.__experimentalDefault,d=o(i),f={};d?.forEach(h=>{let p=t?`-${t}`:"",g=`${h.name}${p}`,b=VX(g,s);f[g]=b});let m=F1e(n,s);r[i]={duotoneSelector:a??void 0,fallbackGapValue:u,featureSelectors:Object.keys(m).length?m:void 0,hasLayoutSupport:c,name:i,selector:s,styleVariationSelectors:d?.length?f:void 0}}),r};function CS(e,t){let o="";return!e||e.trim()===""||e.split("&").forEach(n=>{if(!n||n.trim()==="")return;if(!n.includes("{"))o+=`:root :where(${t}){${n.trim()}}`;else{let s=n.replace("}","").split("{");if(s.length!==2)return;let[a,c]=s,u=a.match(/([>+~\s]*::[a-zA-Z-]+)/),d=u?u[1]:"",f=u?a.replace(d,"").trim():a.trim(),m;f===""?m=t:m=a.startsWith(" ")?js(t,f):DX(t,f),o+=`:root :where(${m})${d}{${c.trim()}}`}}),o}var ES=l(w(),1),zV="is-style-";function qX(e){return e?e.split(/\s+/).reduce((t,o)=>{if(o.startsWith(zV)){let r=o.slice(zV.length);r!=="default"&&t.push(r)}return t},[]):[]}function jV(e,t=[]){let o=qX(e);if(!o)return null;for(let r of o)if(t.some(n=>n.name===r))return r;return null}function z1e({override:e}){tc(e)}function UV({config:e}){let{getBlockStyles:t,overrides:o}=(0,BS.useSelect)(i=>({getBlockStyles:i(Lg.store).getBlockStyles,overrides:M(i(_)).getStyleOverrides()}),[]),{getBlockName:r}=(0,BS.useSelect)(_),n=(0,nT.useMemo)(()=>{if(!o?.length)return;let i=[],s=[];for(let[,a]of o)if(a?.variation&&a?.clientId&&!s.includes(a.clientId)){let c=r(a.clientId),u=e?.styles?.blocks?.[c]?.variations?.[a.variation];if(u){let d={settings:e?.settings,styles:{blocks:{[c]:{variations:{[`${a.variation}-${a.clientId}`]:u}}}}},f=rT((0,Lg.getBlockTypes)(),a.clientId),b=oT(d,f,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0});i.push({id:`${a.variation}-${a.clientId}`,css:b,__unstableType:"variation",variation:a.variation,clientId:a.clientId}),s.push(a.clientId)}}return i},[e,o,t,r]);return!n||!n.length?null:(0,ES.jsx)(ES.Fragment,{children:n.map(i=>(0,ES.jsx)(z1e,{override:i},i.id))})}function HV(e,t,o){if(!e?.styles?.blocks?.[t]?.variations?.[o])return;let r=i=>{Object.keys(i).forEach(s=>{let a=i[s];if(typeof a=="object"&&a!==null)if(a.ref!==void 0)if(typeof a.ref!="string"||a.ref.trim()==="")delete i[s];else{let c=yl(e,a.ref);c?i[s]=c:delete i[s]}else r(a),Object.keys(a).length===0&&delete i[s]})},n=JSON.parse(JSON.stringify(e.styles.blocks[t].variations[o]));return r(n),n}function j1e(e,t,o){let{globalSettings:r,globalStyles:n}=(0,BS.useSelect)(i=>{let s=i(_).getSettings();return{globalSettings:s.__experimentalFeatures,globalStyles:s[xi]}},[]);return(0,nT.useMemo)(()=>{let i=HV({settings:r,styles:n},e,t);return{settings:r,styles:{blocks:{[e]:{variations:{[`${t}-${o}`]:i}}}}}},[r,n,t,o,e])}function U1e({name:e,className:t,clientId:o}){let{getBlockStyles:r}=(0,BS.useSelect)(Lg.store),n=r(e),i=jV(t,n),s=`${zV}${i}-${o}`,{settings:a,styles:c}=j1e(e,i,o),u=(0,nT.useMemo)(()=>{if(!i)return;let d={settings:a,styles:c},f=rT((0,Lg.getBlockTypes)(),o);return oT(d,f,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0})},[i,a,c,o]);return tc({id:`variation-${o}`,css:u,__unstableType:"variation",variation:i,clientId:o}),i?{className:s}:{}}var ZX={hasSupport:()=>!0,attributeKeys:["className"],isMatch:({className:e})=>qX(e).length>0,useBlockProps:U1e};var dd=l(w(),1),H1e=(0,dd.jsxs)(Us.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:[(0,dd.jsx)(Us.Path,{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-3z"}),(0,dd.jsx)(Us.Path,{stroke:"currentColor",strokeWidth:"1.5",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-3z"})]});function G1e({clientId:e}){let{stylesToRender:t,activeStyle:o,className:r}=Ig({clientId:e}),{updateBlockAttributes:n}=(0,iT.useDispatch)(_),{globalSettings:i,globalStyles:s,blockName:a}=(0,iT.useSelect)(d=>{let f=d(_).getSettings();return{globalSettings:f.__experimentalFeatures,globalStyles:f[xi],blockName:d(_).getBlockName(e)}},[e]),c=o?.name?HV({settings:i,styles:s},a,o.name)?.color?.background:void 0;return!t||t.length===0?null:(0,dd.jsx)(Us.ToolbarGroup,{children:(0,dd.jsx)(Us.ToolbarButton,{onClick:()=>{let f=(t.findIndex(p=>p.name===o.name)+1)%t.length,m=t[f],h=Tg(r,o,m);n(e,{className:h})},label:(0,XX.__)("Shuffle styles"),children:(0,dd.jsx)(Us.Icon,{icon:H1e,style:{fill:c||"transparent"}})})})}var QX=G1e;var lT=l(A(),1),GV=l(N(),1),JX=l(F(),1),cT=l($(),1);var sT=l(F(),1);function aT(e){let{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i}=(0,sT.useSelect)(u=>{let{isSectionBlock:d,getParentSectionBlock:f,getEditedContentOnlySection:m,isWithinEditedContentOnlySection:h}=M(u(_)),p=m();return{isSectionBlock:d(e),isWithinSection:d(e)||!!f(e),isWithinEditedSection:h(e),isEditingContentOnlySection:p===e,editedContentOnlySection:p}},[e]),s=(0,sT.useDispatch)(_),{editContentOnlySection:a,stopEditingContentOnlySection:c}=M(s);return{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i,editContentOnlySection:a,stopEditingContentOnlySection:c}}var WV=l(w(),1);function eQ({clientId:e}){let{isSectionBlock:t,isEditingContentOnlySection:o,editContentOnlySection:r,stopEditingContentOnlySection:n}=aT(e),i=(0,JX.useSelect)(c=>{if(!e)return null;let{getBlockName:u}=c(_),d=u(e);return d?{name:d}:null},[e]);if(!e||!t&&!o||(0,cT.isReusableBlock)(i)||(0,cT.isTemplatePart)(i))return null;let s=o;return(0,WV.jsx)(lT.ToolbarGroup,{children:(0,WV.jsx)(lT.ToolbarButton,{onClick:()=>{s?n():r(e)},children:s?(0,GV.__)("Exit pattern"):(0,GV.__)("Edit pattern")})})}var EQ=l(A(),1),TQ=l(N(),1),IQ=l(F(),1);var PS=l($(),1),PQ=l(Zp(),1);var Aa=l(N(),1),La=l(A(),1),fd=l($(),1),bT=l(F(),1);var lQ=l(N(),1),TS=l(A(),1),fT=l($(),1),mT=l(R(),1);var tQ=l(N(),1),oQ=l(A(),1),rQ=l(Z(),1);var Am=l(w(),1);function uT({blocks:e}){return(0,rQ.useViewportMatch)("medium","<")?null:(0,Am.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,Am.jsx)(oQ.Popover,{className:"block-editor-block-switcher__popover-preview",placement:"right-start",focusOnMount:!1,offset:16,children:(0,Am.jsxs)("div",{className:"block-editor-block-switcher__preview",children:[(0,Am.jsx)("div",{className:"block-editor-block-switcher__preview-title",children:(0,tQ.__)("Preview")}),(0,Am.jsx)(vn,{viewportWidth:601,blocks:e})]})})})}var nQ=l(A(),1),Ng=l($(),1),iQ=l(F(),1),dT=l(R(),1);var oc=l(w(),1),W1e={};function sQ({clientIds:e,blocks:t}){let{activeBlockVariation:o,blockVariationTransformations:r}=(0,iQ.useSelect)(i=>{let{getBlockAttributes:s,canRemoveBlocks:a}=i(_),{getActiveBlockVariation:c,getBlockVariations:u}=i(Ng.store),d=a(e);if(t.length!==1||!d)return W1e;let[f]=t;return{blockVariationTransformations:u(f.name,"transform"),activeBlockVariation:c(f.name,s(f.clientId))}},[e,t]);return(0,dT.useMemo)(()=>r?.filter(({name:i})=>i!==o?.name),[r,o])}var $1e=({transformations:e,onSelect:t,blocks:o})=>{let[r,n]=(0,dT.useState)();return(0,oc.jsxs)(oc.Fragment,{children:[r&&(0,oc.jsx)(uT,{blocks:(0,Ng.cloneBlock)(o[0],e.find(({name:i})=>i===r).attributes)}),e?.map(i=>(0,oc.jsx)(K1e,{item:i,onSelect:t,setHoveredTransformItemName:n},i.name))]})};function K1e({item:e,onSelect:t,setHoveredTransformItemName:o}){let{name:r,icon:n,title:i}=e;return(0,oc.jsxs)(nQ.MenuItem,{className:(0,Ng.getBlockMenuDefaultClassName)(r),onClick:s=>{s.preventDefault(),t(r)},onMouseLeave:()=>o(null),onMouseEnter:()=>o(r),onFocus:()=>o(r),onBlur:()=>o(null),children:[(0,oc.jsx)(Ae,{icon:n,showColors:!0}),i]})}var aQ=$1e;var Cn=l(w(),1);function Y1e(e){let t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},o=(0,mT.useMemo)(()=>{let r=Object.keys(t),n=e.reduce((i,s)=>{let{name:a}=s;return r.includes(a)?i.priorityTextTransformations.push(s):i.restTransformations.push(s),i},{priorityTextTransformations:[],restTransformations:[]});if(n.priorityTextTransformations.length===1&&n.priorityTextTransformations[0].name==="core/quote"){let i=n.priorityTextTransformations.pop();n.restTransformations.push(i)}return n},[e]);return o.priorityTextTransformations.sort(({name:r},{name:n})=>t[r]<t[n]?-1:1),o}var q1e=({className:e,possibleBlockTransformations:t,possibleBlockVariationTransformations:o,onSelect:r,onSelectVariation:n,blocks:i})=>{let[s,a]=(0,mT.useState)(),{priorityTextTransformations:c,restTransformations:u}=Y1e(t),d=c.length&&u.length,f=!!u.length&&(0,Cn.jsx)(Z1e,{restTransformations:u,onSelect:r,setHoveredTransformItemName:a});return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsxs)(TS.MenuGroup,{label:(0,lQ.__)("Transform to"),className:e,children:[s&&(0,Cn.jsx)(uT,{blocks:(0,fT.switchToBlockType)(i,s)}),!!o?.length&&(0,Cn.jsx)(aQ,{transformations:o,blocks:i,onSelect:n}),c.map(m=>(0,Cn.jsx)(cQ,{item:m,onSelect:r,setHoveredTransformItemName:a},m.name)),!d&&f]}),!!d&&(0,Cn.jsx)(TS.MenuGroup,{className:e,children:f})]})};function Z1e({restTransformations:e,onSelect:t,setHoveredTransformItemName:o}){return e.map(r=>(0,Cn.jsx)(cQ,{item:r,onSelect:t,setHoveredTransformItemName:o},r.name))}function cQ({item:e,onSelect:t,setHoveredTransformItemName:o}){let{name:r,icon:n,title:i,isDisabled:s}=e;return(0,Cn.jsxs)(TS.MenuItem,{className:(0,fT.getBlockMenuDefaultClassName)(r),onClick:a=>{a.preventDefault(),t(r)},disabled:s,onMouseLeave:()=>o(null),onMouseEnter:()=>o(r),onFocus:()=>o(r),onBlur:()=>o(null),children:[(0,Cn.jsx)(Ae,{icon:n,showColors:!0}),i]})}var uQ=q1e;var fQ=l(N(),1),mQ=l(A(),1);var pT=l(A(),1);var Mg=l(w(),1),X1e=()=>{};function dQ({clientId:e,onSwitch:t=X1e}){let{onSelect:o,stylesToRender:r,activeStyle:n}=Ig({clientId:e,onSwitch:t});return!r||r.length===0?null:(0,Mg.jsx)(Mg.Fragment,{children:r.map(i=>{let s=i.label||i.name;return(0,Mg.jsx)(pT.MenuItem,{icon:n.name===i.name?gl:null,onClick:()=>o(i),children:(0,Mg.jsx)(pT.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0,children:s})},i.name)})})}var $V=l(w(),1);function hT({hoveredBlock:e,onSwitch:t}){let{clientId:o}=e;return(0,$V.jsx)(mQ.MenuGroup,{label:(0,fQ.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup",children:(0,$V.jsx)(dQ,{clientId:o,onSwitch:t})})}var YV=l(N(),1),vQ=l(R(),1),gT=l(Z(),1);var Hs=l(A(),1);var gQ=l(R(),1),bQ=l($(),1);var pQ=l($(),1),KV=(e,t,o=new Set)=>{let{clientId:r,name:n,innerBlocks:i=[]}=e;if(!o.has(r)){if(n===t)return e;for(let s of i){let a=KV(s,t,o);if(a)return a}}},hQ=(e,t)=>{let o=(0,pQ.getBlockAttributesNamesByRole)(e,"content");return o?.length?o.reduce((r,n)=>(t[n]&&(r[n]=t[n]),r),{}):t};var Q1e=(e,t)=>{let o=hQ(t.name,t.attributes);e.attributes={...e.attributes,...o}},J1e=(e,t)=>{let o=t.map(n=>(0,bQ.cloneBlock)(n)),r=new Set;for(let n of e){let i=!1;for(let s of o){let a=KV(s,n.name,r);if(a){i=!0,r.add(a.clientId),Q1e(a,n);break}}if(!i)return}return o},eBe=(e,t)=>(0,gQ.useMemo)(()=>e.reduce((o,r)=>{let n=J1e(t,r.blocks);return n&&o.push({...r,transformedBlocks:n}),o},[]),[e,t]),kQ=eBe;var gr=l(w(),1);function tBe({blocks:e,patterns:t,onSelect:o}){let[r,n]=(0,vQ.useState)(!1),i=kQ(t,e);return i.length?(0,gr.jsxs)(Hs.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup",children:[r&&(0,gr.jsx)(oBe,{patterns:i,onSelect:o}),(0,gr.jsx)(Hs.MenuItem,{onClick:s=>{s.preventDefault(),n(!r)},icon:Vo,children:(0,YV.__)("Patterns")})]}):null}function oBe({patterns:e,onSelect:t}){let o=(0,gT.useViewportMatch)("medium","<");return(0,gr.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,gr.jsx)(Hs.Popover,{className:"block-editor-block-switcher__popover-preview",placement:o?"bottom":"right-start",offset:16,children:(0,gr.jsx)("div",{className:"block-editor-block-switcher__preview is-pattern-list-preview",children:(0,gr.jsx)(rBe,{patterns:e,onSelect:t})})})})}function rBe({patterns:e,onSelect:t}){return(0,gr.jsx)(Hs.Composite,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,YV.__)("Patterns list"),children:e.map(o=>(0,gr.jsx)(yQ,{pattern:o,onSelect:t},o.name))})}function yQ({pattern:e,onSelect:t}){let o="block-editor-block-switcher__preview-patterns-container",r=(0,gT.useInstanceId)(yQ,`${o}-list__item-description`);return(0,gr.jsxs)("div",{className:`${o}-list__list-item`,children:[(0,gr.jsxs)(Hs.Composite.Item,{render:(0,gr.jsx)("div",{role:"option","aria-label":e.title,"aria-describedby":e.description?r:void 0,className:`${o}-list__item`}),onClick:()=>t(e.transformedBlocks),children:[(0,gr.jsx)(vn,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),(0,gr.jsx)("div",{className:`${o}-list__item-title`,children:e.title})]}),!!e.description&&(0,gr.jsx)(Hs.VisuallyHidden,{id:r,children:e.description})]})}var SQ=tBe;var ri=l(w(),1);function nBe({onClose:e,clientIds:t}){let{replaceBlocks:o,multiSelect:r,updateBlockAttributes:n}=(0,bT.useDispatch)(_),{possibleBlockTransformations:i,patterns:s,blocks:a,isUsingBindings:c,canRemove:u,hasBlockStyles:d}=(0,bT.useSelect)(I=>{let{getBlockAttributes:P,getBlocksByClientId:E,getBlockRootClientId:L,getBlockTransformItems:T,__experimentalGetPatternTransformItems:O,canRemoveBlocks:D,getBlockName:U}=I(_),{getBlockStyles:G}=I(fd.store),j=L(t[0]),z=E(t),W=t.length===1,ee=W&&U(t[0]),se=W&&!!G(ee)?.length;return{blocks:z,possibleBlockTransformations:T(z,j),patterns:O(z,j),isUsingBindings:t.every(ce=>!!P(ce)?.metadata?.bindings),canRemove:D(t),hasBlockStyles:se}},[t]),f=sQ({clientIds:t,blocks:a});function m(I){I.length>1&&r(I[0].clientId,I[I.length-1].clientId)}function h(I){let P=(0,fd.switchToBlockType)(a,I);o(t,P),m(P)}function p(I){n(a[0].clientId,{...f.find(({name:P})=>P===I).attributes})}function g(I){o(t,I),m(I)}let b=a.length===1,v=b&&((0,fd.isTemplatePart)(a[0])||(0,fd.isReusableBlock)(a[0])),k=!!i?.length&&u&&!v,y=!!f?.length,S=!!s?.length&&u,x=k||y;if(!(d||x||S))return(0,ri.jsx)("p",{className:"block-editor-block-switcher__no-transforms",children:(0,Aa.__)("No transforms.")});let B=b?(0,Aa._x)("This block is connected.","block toolbar button label and description"):(0,Aa._x)("These blocks are connected.","block toolbar button label and description");return(0,ri.jsxs)("div",{className:"block-editor-block-switcher__container",children:[S&&(0,ri.jsx)(SQ,{blocks:a,patterns:s,onSelect:I=>{g(I),e()}}),x&&(0,ri.jsx)(uQ,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,possibleBlockVariationTransformations:f,blocks:a,onSelect:I=>{h(I),e()},onSelectVariation:I=>{p(I),e()}}),d&&(0,ri.jsx)(hT,{hoveredBlock:a[0],onSwitch:e}),c&&(0,ri.jsx)(La.MenuGroup,{children:(0,ri.jsx)(La.__experimentalText,{className:"block-editor-block-switcher__binding-indicator",children:B})})]})}var iBe=({children:e,clientIds:t,label:o,text:r})=>{let i=t.length===1?(0,Aa.__)("Change block type or style"):(0,Aa.sprintf)((0,Aa._n)("Change type of %d block","Change type of %d blocks",t.length),t.length);return(0,ri.jsx)(La.ToolbarGroup,{children:(0,ri.jsx)(La.ToolbarItem,{children:s=>(0,ri.jsx)(La.DropdownMenu,{className:"block-editor-block-switcher",label:o,popoverProps:{placement:"bottom-start",className:"block-editor-block-switcher__popover"},icon:e,text:r,toggleProps:{description:i,...s},menuProps:{orientation:"both"},children:({onClose:a})=>(0,ri.jsx)(nBe,{onClose:a,clientIds:t})})})})},_Q=iBe;var xQ=l(N(),1),Vg=l(A(),1);var Dg=l(w(),1);function wQ({clientIds:e,children:t,label:o,text:r}){return(0,Dg.jsx)(Vg.ToolbarGroup,{children:(0,Dg.jsx)(Vg.ToolbarItem,{children:n=>(0,Dg.jsx)(Vg.DropdownMenu,{className:"block-editor-block-switcher",label:o,popoverProps:{placement:"bottom-start",className:"block-editor-block-switcher__popover"},icon:t,text:r,toggleProps:{description:(0,xQ.__)("Change block style"),...n},menuProps:{orientation:"both"},children:({onClose:i})=>(0,Dg.jsx)("div",{className:"block-editor-block-switcher__container",children:(0,Dg.jsx)(hT,{hoveredBlock:{clientId:e[0]},onSwitch:i})})})})})}var Fg=l(A(),1),IS=l(N(),1),kT=l(R(),1),CQ=l(F(),1);var rc=l(w(),1);function sBe({clientIds:e,blockTitle:t}){let o=(0,CQ.useSelect)(i=>{let{getBlockAttributes:s}=i(_);return s(e?.[0])?.metadata?.name},[e]),r=e.length===1,n;return r&&o?n=(0,IS.sprintf)((0,IS.__)('This %1$s is editable using the "%2$s" override.'),t.toLowerCase(),o):n=(0,IS.__)("These blocks are editable using overrides."),(0,rc.jsx)(Fg.__experimentalText,{children:n})}function BQ({icon:e,clientIds:t,blockTitle:o,label:r}){let[n,i]=(0,kT.useState)(!1),s=(0,kT.useRef)();return(0,rc.jsxs)(rc.Fragment,{children:[(0,rc.jsx)(Fg.ToolbarButton,{ref:s,className:"block-editor-block-toolbar__pattern-overrides-indicator",icon:e,label:r,onClick:()=>i(!n),"aria-expanded":n}),n&&(0,rc.jsx)(Fg.Popover,{anchor:s.current,onClose:()=>i(!1),placement:"bottom-start",offset:16,className:"block-editor-block-toolbar__pattern-overrides-popover",children:(0,rc.jsx)(sBe,{clientIds:t,blockTitle:o})})]})}var zg=l(w(),1);function aBe({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r,getBlockParentsByBlockName:n,canRemoveBlocks:i,getTemplateLock:s,getBlockEditingMode:a,canEditBlock:c}=M(e(_)),{getBlockStyles:u}=e(PS.store),d=t.some(P=>s(P)==="contentOnly"),f=t.length===1,m=f&&o(t[0]),h=f&&!!u(m)?.length,p=t.some(P=>!!r(P)?.metadata?.patternName),g=t.every(P=>Wk(r(P)?.metadata?.bindings)),b=t.every(P=>n(P,"core/block",!0).length>0),v=i(t),k=t.every(P=>c(P)),y=a(t[0]),S=y==="default",x=y==="contentOnly",B=!p&&S&&(h||v)&&!d&&k,I=g&&b;return B?"switcher":x&&h&&!g&&k?"styles-only":I?"pattern-overrides":"default"}function lBe({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r}=M(e(_)),n=t.length===1,i=t[0],s=r(i);if(n&&s?.metadata?.patternName)return Ei;let a=o(i),c=(0,PS.getBlockType)(a);if(n){let{getActiveBlockVariation:f}=e(PS.store);return f(a,s)?.icon||c?.icon}let u=t.map(f=>o(f));return new Set(u).size===1?c?.icon:Cf}function RQ({clientIds:e,isSynced:t}){let{icon:o,showIconLabels:r,variant:n}=(0,IQ.useSelect)(f=>({icon:lBe({select:f,clientIds:e}),showIconLabels:f(PQ.store).get("core","showIconLabels"),variant:aBe({select:f,clientIds:e})}),[e]),i=zr({clientId:e?.[0],maximumLength:35}),s=e.length===1,a=s&&t&&!r,c=s?i:(0,TQ.__)("Multiple blocks selected"),u=a&&i?i:void 0,d=(0,zg.jsx)(Ae,{className:"block-editor-block-toolbar__block-icon",icon:o});return n==="switcher"?(0,zg.jsx)(_Q,{clientIds:e,label:c,text:u,children:d}):n==="styles-only"?(0,zg.jsx)(wQ,{clientIds:e,label:c,text:u,children:d}):n==="pattern-overrides"?(0,zg.jsx)(BQ,{icon:d,clientIds:e,blockTitle:i,label:c}):(0,zg.jsx)(EQ.ToolbarButton,{disabled:!0,className:"block-editor-block-toolbar__block-icon-button",title:c,icon:d,text:u})}var Qe=l(w(),1);function ZV({hideDragHandle:e,focusOnMount:t,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,variant:n="unstyled"}){let{blockClientId:i,blockClientIds:s,isDefaultEditingMode:a,blockType:c,toolbarKey:u,shouldShowVisualToolbar:d,showParentSelector:f,isUsingBindings:m,isSectionContainer:h,hasContentOnlyLocking:p,showShuffleButton:g,showSlots:b,showGroupButtons:v,showLockButtons:k,showBlockVisibilityButton:y,showSwitchSectionStyleButton:S,areSelectedBlocksHiddenOnViewport:x,canEdit:C}=(0,AQ.useSelect)(G=>{let{canEditBlock:j}=G(_),{getBlockName:z,getBlockMode:W,getBlockParents:ee,getSelectedBlockClientIds:se,isBlockValid:ce,getBlockEditingMode:ie,getBlockAttributes:re,getSettings:Q,getTemplateLock:Y,getParentSectionBlock:J,isZoomOut:K,isSectionBlock:H,isBlockHiddenAtViewport:X}=M(G(_)),ne=se(),le=ne[0],ve=ee(le),xe=J(le)??ve[ve.length-1],ze=z(xe),ot=(0,nc.getBlockType)(ze),Wt=ie(le),fo=Wt==="default",Do=z(le),rt=ne.every(je=>ce(je)),ar=ne.every(je=>W(je)==="visual"),xt=ne.every(je=>!!re(je)?.metadata?.bindings),At=ne.some(je=>Y(je)==="contentOnly"),Pe=K(),wt=H(le),qo=j(le),$t=qo&&(Pe||wt),lr=Q()?.[wi]?.toLowerCase()||"desktop",ln=ne.length>0&&ne.every(je=>X(je,lr));return{blockClientId:le,blockClientIds:ne,isDefaultEditingMode:fo,blockType:le&&(0,nc.getBlockType)(Do),shouldShowVisualToolbar:rt&&ar,toolbarKey:`${le}${xe}`,showParentSelector:!Pe&&ot&&Wt!=="contentOnly"&&ie(xe)!=="disabled"&&(0,nc.hasBlockSupport)(ot,"__experimentalParentSelector",!0)&&ne.length===1,isUsingBindings:xt,isSectionContainer:wt,hasContentOnlyLocking:At,showShuffleButton:Pe,showSlots:!Pe,showGroupButtons:!Pe,showLockButtons:!Pe,showBlockVisibilityButton:!Pe,showSwitchSectionStyleButton:$t,areSelectedBlocksHiddenOnViewport:ln,canEdit:qo}},[]),B=(0,qV.useRef)(null),I=(0,qV.useRef)(),P=kg({ref:I}),E=!(0,LQ.useViewportMatch)("medium","<");if(!qE())return null;let T=s.length>1,O=(0,nc.isReusableBlock)(c)||(0,nc.isTemplatePart)(c),D=V("block-editor-block-contextual-toolbar",{"has-parent":f}),U=V("block-editor-block-toolbar",{"is-synced":O,"is-connected":m});return(0,Qe.jsx)(Bg,{focusEditorOnEscape:!0,className:D,"aria-label":(0,OQ.__)("Block tools"),variant:n==="toolbar"?void 0:n,focusOnMount:t,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,children:(0,Qe.jsxs)("div",{ref:B,className:U,children:[f&&!T&&E&&(0,Qe.jsx)(nZ,{}),(d||T)&&(0,Qe.jsx)("div",{ref:I,...P,children:(0,Qe.jsxs)(NQ.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls",children:[(0,Qe.jsx)(RQ,{clientIds:s,isSynced:O}),a&&y&&(0,Qe.jsx)(TD,{clientIds:s}),!T&&a&&k&&(0,Qe.jsx)(wV,{clientId:i}),(0,Qe.jsx)(kE,{clientIds:s,hideDragHandle:e})]})}),!x&&!p&&d&&T&&v&&(0,Qe.jsx)(vV,{}),!T&&C&&(0,Qe.jsx)(eQ,{clientId:s[0]}),!x&&g&&(0,Qe.jsx)(EX,{clientId:s[0]}),!x&&S&&(0,Qe.jsx)(QX,{clientId:s[0]}),!x&&d&&b&&(0,Qe.jsxs)(Qe.Fragment,{children:[!h&&(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)(Mt.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,Qe.jsx)(Mt.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,Qe.jsx)(Mt.Slot,{className:"block-editor-block-toolbar__slot"}),(0,Qe.jsx)(Mt.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"})]}),(0,Qe.jsx)(Mt.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,Qe.jsx)(xE.Slot,{})]}),(0,Qe.jsx)(gX,{clientIds:s}),(0,Qe.jsx)(GE,{clientIds:s})]})},u)}function MQ({hideDragHandle:e,variant:t}){return(0,Qe.jsx)(ZV,{hideDragHandle:e,variant:t,focusOnMount:void 0,__experimentalInitialIndex:void 0,__experimentalOnIndexChange:void 0})}var XV=l(w(),1);function FQ({clientId:e,isTyping:t,__unstableContentRef:o}){let{capturingClientId:r,isInsertionPointVisible:n,lastClientId:i}=cE(e),s=(0,jg.useRef)();(0,jg.useEffect)(()=>{s.current=void 0},[e]);let{stopTyping:a}=(0,DQ.useDispatch)(_),c=(0,jg.useRef)(!1);(0,VQ.useShortcut)("core/block-editor/focus-toolbar",()=>{c.current=!0,a(!0)}),(0,jg.useEffect)(()=>{c.current=!1});let u=r||e,d=lE({contentElement:o?.current,clientId:u});return!t&&(0,XV.jsx)(pm,{clientId:u,bottomClientId:i,className:V("block-editor-block-list__block-popover",{"is-insertion-point-visible":n}),resize:!1,...d,__unstableContentRef:o,children:(0,XV.jsx)(ZV,{focusOnMount:c.current,__experimentalInitialIndex:s.current,__experimentalOnIndexChange:f=>{s.current=f},variant:"toolbar"})})}var vT=l(F(),1),yT=l(R(),1);var zQ=l(A(),1);var jQ=l(N(),1),UQ=l(w(),1);function cBe({onClick:e}){return(0,UQ.jsx)(zQ.Button,{variant:"primary",icon:Bi,size:"compact",className:V("block-editor-button-pattern-inserter__button","block-editor-block-tools__zoom-out-mode-inserter-button"),onClick:e,label:(0,jQ._x)("Add pattern","Generic label for pattern inserter button")})}var HQ=cBe;var QV=l(w(),1);function uBe(){let[e,t]=(0,yT.useState)(!1),{hasSelection:o,blockOrder:r,setInserterIsOpened:n,sectionRootClientId:i,selectedBlockClientId:s,blockInsertionPoint:a,insertionPointVisible:c}=(0,vT.useSelect)(p=>{let{getSettings:g,getBlockOrder:b,getSelectionStart:v,getSelectedBlockClientId:k,getSectionRootClientId:y,getBlockInsertionPoint:S,isBlockInsertionPointVisible:x}=M(p(_)),C=y();return{hasSelection:!!v().clientId,blockOrder:b(C),sectionRootClientId:C,setInserterIsOpened:g().__experimentalSetIsInserterOpened,selectedBlockClientId:k(),blockInsertionPoint:S(),insertionPointVisible:x()}},[]),{showInsertionPoint:u}=M((0,vT.useDispatch)(_));if((0,yT.useEffect)(()=>{let p=setTimeout(()=>{t(!0)},500);return()=>{clearTimeout(p)}},[]),!e||!o)return null;let d=s,m=r.findIndex(p=>s===p)+1,h=r[m];return c&&a?.index===m?null:(0,QV.jsx)(MB,{previousClientId:d,nextClientId:h,children:(0,QV.jsx)(HQ,{onClick:()=>{n({rootClientId:i,insertionIndex:m,tab:"patterns",category:"all"}),u(i,m,{operation:"insert"})}})})}var GQ=uBe;var WQ=l(F(),1),$Q=l($(),1);function KQ(){return(0,WQ.useSelect)(e=>{let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getBlock:r,getBlockMode:n,getSettings:i,isTyping:s,isBlockInterfaceHidden:a}=M(e(_)),c=t()||o(),u=r(c),d=!!c&&!!u,f=d&&(0,$Q.isUnmodifiedDefaultBlock)(u,"content")&&n(c)!=="html",m=c&&!s()&&f,h=!a()&&!i().hasFixedToolbar&&!m&&d&&!f;return{showEmptyBlockSideInserter:m,showBlockToolbarPopover:h}},[])}var Yi=l(w(),1);function dBe(e){let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getSettings:r,isTyping:n,isDragging:i,isZoomOut:s,getViewportModalClientIds:a}=M(e(_));return{clientId:t()||o(),hasFixedToolbar:r().hasFixedToolbar,isTyping:n(),isZoomOutMode:s(),isDragging:i(),viewportModalClientIds:a()}}function RS({children:e,__unstableContentRef:t,...o}){let{clientId:r,hasFixedToolbar:n,isTyping:i,isZoomOutMode:s,isDragging:a,viewportModalClientIds:c}=(0,Ug.useSelect)(dBe,[]),u=(0,YQ.__unstableUseShortcutEventMatch)(),{getBlocksByClientId:d,getSelectedBlockClientIds:f,getBlockRootClientId:m,getBlockEditingMode:h,getBlockName:p,isGroupable:g,getEditedContentOnlySection:b,canEditBlock:v}=M((0,Ug.useSelect)(_)),{getGroupingBlockName:k}=(0,Ug.useSelect)(Hg.store),{showEmptyBlockSideInserter:y,showBlockToolbarPopover:S}=KQ(),x=yg(),[C,B]=(0,ST.useState)(null),{canRename:I}=Pm(p(f()[0])),{duplicateBlocks:P,removeBlocks:E,replaceBlocks:L,insertAfterBlock:T,insertBeforeBlock:O,selectBlock:D,moveBlocksUp:U,moveBlocksDown:G,expandBlock:j,stopEditingContentOnlySection:z,showViewportModal:W,hideViewportModal:ee}=M((0,Ug.useDispatch)(_));function se(re){if(!re.defaultPrevented){if(u("core/block-editor/move-up",re)||u("core/block-editor/move-down",re)){let Q=f();if(Q.length){re.preventDefault();let Y=m(Q[0]);(u("core/block-editor/move-up",re)?"up":"down")==="up"?U(Q,Y):G(Q,Y);let K=Array.isArray(Q)?Q.length:1,H=(0,Gg.sprintf)((0,Gg._n)("%d block moved.","%d blocks moved.",Q.length),K);(0,t3.speak)(H)}}else if(u("core/block-editor/duplicate",re)){let Q=f();Q.length&&(re.preventDefault(),P(Q))}else if(u("core/block-editor/remove",re)){let Q=f();Q.length&&(re.preventDefault(),E(Q))}else if(u("core/block-editor/paste-styles",re)){let Q=f();if(Q.length){re.preventDefault();let Y=d(Q);x(Y)}}else if(u("core/block-editor/insert-after",re)){let Q=f();Q.length&&(re.preventDefault(),T(Q[Q.length-1]))}else if(u("core/block-editor/insert-before",re)){let Q=f();Q.length&&(re.preventDefault(),O(Q[0]))}else if(u("core/block-editor/unselect",re)){if(re.target.closest("[role=toolbar]"))return;let Q=f();Q.length>1&&(re.preventDefault(),D(Q[0]))}else if(u("core/block-editor/collapse-list-view",re)){if((0,JV.isTextField)(re.target)||(0,JV.isTextField)(re.target?.contentWindow?.document?.activeElement))return;re.preventDefault(),j(r)}else if(u("core/block-editor/group",re)){let Q=f();if(Q.length>1&&g(Q)){re.preventDefault();let Y=d(Q),J=k(),K=(0,Hg.switchToBlockType)(Y,J);L(Q,K),(0,t3.speak)((0,Gg.__)("Selected blocks are grouped."))}}else if(u("core/block-editor/rename",re)){let Q=f();if(Q.length===1){let Y=h(Q[0])==="contentOnly";I&&!Y&&v(Q[0])&&(re.preventDefault(),B(Q[0]))}}else if(u("core/block-editor/toggle-block-visibility",re)){let Q=f();if(Q.length){if(re.preventDefault(),!d(Q).every(K=>(0,Hg.hasBlockSupport)(K.name,"visibility",!0))||Q.some(K=>h(K)!=="default"||!v(K)))return;W(Q)}}u("core/block-editor/stop-editing-as-blocks",re)&&b()&&z()}}let ce=mm(t),ie=mm(t);return(0,Yi.jsxs)("div",{...o,onKeyDown:se,className:V(o.className,{"block-editor-block-tools--is-dragging":a}),children:[(0,Yi.jsxs)(fg.Provider,{value:(0,ST.useRef)(!1),children:[!i&&!s&&(0,Yi.jsx)(CY,{__unstableContentRef:t}),y&&(0,Yi.jsx)(jq,{__unstableContentRef:t,clientId:r}),S&&(0,Yi.jsx)(FQ,{__unstableContentRef:t,clientId:r,isTyping:i}),!s&&!n&&(0,Yi.jsx)(e3.Popover.Slot,{name:"block-toolbar",ref:ce}),e,(0,Yi.jsx)(e3.Popover.Slot,{name:"__unstable-block-tools-after",ref:ie}),s&&!a&&(0,Yi.jsx)(GQ,{__unstableContentRef:t})]}),C&&(0,Yi.jsx)(Tm,{clientId:C,onClose:()=>B(null)}),c&&(0,Yi.jsx)(wD,{clientIds:c,onClose:ee})]})}var qi=l(N(),1),Na=l($(),1),ic=l(F(),1),o3=l(ZQ(),1);var fBe=()=>function(){let{replaceBlocks:t,multiSelect:o}=(0,ic.useDispatch)(_),{blocks:r,clientIds:n,canRemove:i,possibleBlockTransformations:s,invalidSelection:a}=(0,ic.useSelect)(h=>{let{getBlockRootClientId:p,getBlockTransformItems:g,getSelectedBlockClientIds:b,getBlocksByClientId:v,canRemoveBlocks:k}=h(_),y=b(),S=v(y);if(S.filter(C=>!C).length>0)return{invalidSelection:!0};let x=p(y[0]);return{blocks:S,clientIds:y,possibleBlockTransformations:g(S,x),canRemove:k(y),invalidSelection:!1}},[]);if(a)return{isLoading:!1,commands:[]};let c=r.length===1&&(0,Na.isTemplatePart)(r[0]);function u(h){h.length>1&&o(h[0].clientId,h[h.length-1].clientId)}function d(h){let p=(0,Na.switchToBlockType)(r,h);t(n,p),u(p)}let f=!!s.length&&i&&!c;return!n||n.length<1||!f?{isLoading:!1,commands:[]}:{isLoading:!1,commands:s.map(h=>{let{name:p,title:g,icon:b}=h,v=!b?.src||b?.src==="block-default"?{src:Jk}:b;return{name:"core/block-editor/transform-to-"+p.replace("/","-"),label:(0,qi.sprintf)((0,qi.__)("Transform to %s"),g),icon:v?.src,category:"command",callback:({close:k})=>{d(p),k()}}})}},mBe=()=>function(){let{clientIds:t,isUngroupable:o,isGroupable:r}=(0,ic.useSelect)(O=>{let{getSelectedBlockClientIds:D,isUngroupable:U,isGroupable:G}=O(_);return{clientIds:D(),isUngroupable:U(),isGroupable:G()}},[]),{canInsertBlockType:n,getBlockRootClientId:i,getBlocksByClientId:s,canRemoveBlocks:a,isBlockHiddenAnywhere:c}=M((0,ic.useSelect)(_)),{getBlockEditingMode:u}=(0,ic.useSelect)(_),{getDefaultBlockName:d,getGroupingBlockName:f}=(0,ic.useSelect)(Na.store),m=s(t),h=(0,ic.useDispatch)(_),{removeBlocks:p,replaceBlocks:g,duplicateBlocks:b,insertAfterBlock:v,insertBeforeBlock:k}=h,y=()=>{if(!m.length)return;let O=f(),D=(0,Na.switchToBlockType)(m,O);D&&g(t,D)},S=()=>{if(!m.length)return;let O=m[0].innerBlocks;O.length&&g(t,O)};if(!t||t.length<1)return{isLoading:!1,commands:[]};let{showViewportModal:x}=M(h),C=i(t[0]),B=n(d(),C),I=m.every(O=>!!O&&(0,Na.hasBlockSupport)(O.name,"multiple",!0)&&n(O.name,C)),P=a(t),E=[];I&&E.push({name:"duplicate",label:(0,qi.__)("Duplicate"),callback:()=>b(t,!0),icon:Cf}),B&&E.push({name:"add-before",label:(0,qi.__)("Add before"),callback:()=>{let O=Array.isArray(t)?t[0]:O;k(O)},icon:Bi},{name:"add-after",label:(0,qi.__)("Add after"),callback:()=>{let O=Array.isArray(t)?t[t.length-1]:O;v(O)},icon:Bi}),r&&E.push({name:"Group",label:(0,qi.__)("Group"),callback:y,icon:nv}),o&&E.push({name:"ungroup",label:(0,qi.__)("Ungroup"),callback:S,icon:RN}),P&&E.push({name:"remove",label:(0,qi.__)("Delete"),callback:()=>p(t,!0),icon:IN});let L=m.every(O=>!!O&&(0,Na.hasBlockSupport)(O.name,"visibility",!0)),T=t.every(O=>u(O)==="default");if(L&&T){let O=t.some(D=>c(D));E.push({name:"toggle-visibility",label:O?(0,qi.__)("Show"):(0,qi.__)("Hide"),callback:()=>x(t),icon:O?Af:vs})}return{isLoading:!1,commands:E.map(O=>({...O,name:"core/block-editor/action-"+O.name,category:"command",callback:({close:D})=>{O.callback(),D()}}))}},_T=()=>{(0,o3.useCommandLoader)({name:"core/block-editor/blockTransforms",hook:fBe()}),(0,o3.useCommandLoader)({name:"core/block-editor/blockQuickActions",hook:mBe(),context:"block-selection-edit"})};var Zr=l(w(),1),xT=(0,eJ.createSlotFill)(Symbol("BlockCanvasCover"));function XQ({children:e}){return(0,Zr.jsx)("div",{className:"block-canvas-cover",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none"},children:e})}var pBe={ignoredSelectors:[/\.editor-styles-wrapper/gi]};function r3({shouldIframe:e=!0,height:t="300px",children:o=(0,Zr.jsx)(Gh,{}),styles:r,contentRef:n,iframeProps:i}){_T();let s=(0,wT.useViewportMatch)("medium","<"),a=rS(),c=hm(),u=(0,QQ.useRef)(),d=(0,wT.useMergeRefs)([n,c,u]),f=(0,JQ.useSelect)(h=>M(h(_)).getZoomLevel(),[]),m=f!==100&&!s?{scale:f,frameSize:"40px"}:{};return e?(0,Zr.jsx)(RS,{__unstableContentRef:u,style:{height:t,display:"flex"},children:(0,Zr.jsxs)(Mh,{...i,...m,ref:a,contentRef:d,style:{...i?.style},name:"editor-canvas",children:[(0,Zr.jsx)(xT.Slot,{fillProps:{containerRef:u},children:h=>h.map((p,g)=>(0,Zr.jsx)(XQ,{children:p},g))}),(0,Zr.jsx)(Nl,{styles:r}),o]})}):(0,Zr.jsxs)(RS,{__unstableContentRef:u,style:{height:t,display:"flex"},children:[(0,Zr.jsx)(xT.Slot,{fillProps:{containerRef:u},children:h=>h.map((p,g)=>(0,Zr.jsx)(XQ,{children:p},g))}),(0,Zr.jsx)(Nl,{styles:r,scope:":where(.editor-styles-wrapper)",transformOptions:pBe}),(0,Zr.jsx)(E1,{ref:d,className:"editor-styles-wrapper",tabIndex:-1,style:{height:"100%",width:"100%",overflow:"auto"},children:o})]})}function hBe({children:e,height:t,styles:o}){return(0,Zr.jsx)(r3,{height:t,styles:o,children:e})}var tJ=hBe;var Ma=l(A(),1),oJ=l(N(),1),rJ=l(it(),1),nJ=l(Re(),1),Zi=l(w(),1),gBe=()=>(0,Zi.jsx)(Ma.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,Zi.jsx)(Ma.Path,{d:"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"})}),bBe=({style:e,className:t})=>(0,Zi.jsx)("div",{className:"block-library-colors-selector__icon-container",children:(0,Zi.jsx)("div",{className:`${t} block-library-colors-selector__state-selection`,style:e,children:(0,Zi.jsx)(gBe,{})})}),kBe=({TextColor:e,BackgroundColor:t})=>function({onToggle:r,isOpen:n}){let i=s=>{!n&&s.keyCode===rJ.DOWN&&(s.preventDefault(),r())};return(0,Zi.jsx)(Ma.ToolbarGroup,{children:(0,Zi.jsx)(Ma.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,oJ.__)("Open Colors Selector"),onClick:r,onKeyDown:i,icon:(0,Zi.jsx)(t,{children:(0,Zi.jsx)(e,{children:(0,Zi.jsx)(bBe,{})})})})})},vBe=({children:e,...t})=>((0,nJ.default)("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,Zi.jsx)(Ma.Dropdown,{popoverProps:{placement:"bottom-start"},className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:kBe(t),renderContent:()=>e})),iJ=vBe;var dee=l(Re(),1),jT=l(A(),1),c3=l(N(),1),fee=l(F(),1),mee=l(R(),1);var Xg=l(Z(),1),FT=l(A(),1),LS=l(F(),1),cee=l(Re(),1),vo=l(R(),1),l3=l(N(),1);var LT=l(A(),1),NT=l(R(),1),MT=l(F(),1);var aJ=l(Z(),1),lJ=l(Xo(),1),cJ=l(F(),1),IT=l(R(),1),Wg=l(N(),1);var CT=l(R(),1),BT=(0,CT.createContext)({});BT.displayName="ListViewContext";var md=()=>(0,CT.useContext)(BT);var ET=l(R(),1),sJ=l(w(),1);function TT({children:e,...t}){let o=(0,ET.useRef)();return(0,ET.useEffect)(()=>{o.current&&(o.current.textContent=o.current.textContent)},[e]),(0,sJ.jsx)("div",{hidden:!0,...t,ref:o,children:e})}var OS=l(w(),1),n3=(0,IT.forwardRef)(({nestingLevel:e,blockCount:t,clientId:o,...r},n)=>{let{insertedBlock:i,setInsertedBlock:s}=md(),a=(0,aJ.useInstanceId)(n3),{directInsert:c,hideInserter:u}=(0,cJ.useSelect)(p=>{let{getBlockListSettings:g,getTemplateLock:b,isZoomOut:v}=M(p(_)),y=g(o)?.directInsert||!1,S=!!b(o)||v();return{directInsert:y,hideInserter:S}},[o]),d=zr({clientId:o,context:"list-view"}),f=zr({clientId:i?.clientId,context:"list-view"});if((0,IT.useEffect)(()=>{f?.length&&(0,lJ.speak)((0,Wg.sprintf)((0,Wg.__)("%s block inserted"),f),"assertive")},[f]),u)return null;let m=`list-view-appender__${a}`,h=(0,Wg.sprintf)((0,Wg.__)("Append to %1$s block at position %2$d, Level %3$d"),d,t+1,e);return(0,OS.jsxs)("div",{className:"list-view-appender",children:[(0,OS.jsx)(Ui,{ref:n,rootClientId:o,position:"bottom right",isAppender:!0,selectBlockOnInsert:!1,shouldDirectInsert:c,__experimentalIsQuick:!0,...r,toggleProps:{"aria-describedby":m},onSelectOrClose:p=>{p?.clientId&&s(p)}}),(0,OS.jsx)(TT,{id:m,children:h})]})});var gd=l($(),1),Nm=l(A(),1),OT=l(Z(),1);var ko=l(R(),1),Kg=l(F(),1),s3=l(N(),1),AT=l(it(),1),LJ=l(Jy(),1),NJ=l(Is(),1),MJ=l(Xo(),1);var uJ=l(A(),1),dJ=l(Z(),1),fJ=l(R(),1);var mJ=l(w(),1),yBe=P7(uJ.__experimentalTreeGridRow),SBe=(0,fJ.forwardRef)(({isDragged:e,isSelected:t,position:o,level:r,rowCount:n,children:i,className:s,path:a,...c},u)=>{let d=YC({clientId:c["data-block"],enableAnimation:!0,triggerAnimationOnChange:a}),f=(0,dJ.useMergeRefs)([u,d]);return(0,mJ.jsx)(yBe,{ref:f,className:V("block-editor-list-view-leaf",s),level:r,positionInSet:o,setSize:n,isExpanded:void 0,...c,children:i})}),pJ=SBe;var hJ=l(Fe(),1),gJ=l(R(),1);function bJ({isSelected:e,selectedClientIds:t,rowItemRef:o}){let r=t.length===1;(0,gJ.useLayoutEffect)(()=>{if(!e||!r||!o.current)return;let n=(0,hJ.getScrollContainer)(o.current),{ownerDocument:i}=o.current;if(n===i.body||n===i.documentElement||!n)return;let a=o.current.getBoundingClientRect(),c=n.getBoundingClientRect();(a.top<c.top||a.bottom>c.bottom)&&o.current.scrollIntoView()},[e,r,o])}var BJ=l(R(),1);var pd=l(A(),1),xJ=l(R(),1);var RT=l(it(),1),wJ=l(F(),1);var kJ=l(N(),1),i3=l(w(),1);function PT({onClick:e}){return(0,i3.jsx)("span",{className:"block-editor-list-view__expander",onClick:t=>e(t,{forceToggle:!0}),"aria-hidden":"true","data-testid":"list-view-expander",children:(0,i3.jsx)(we,{icon:(0,kJ.isRTL)()?ev:tu})})}var vJ=l(R(),1),yJ=l(F(),1);var _Be=3,SJ={"core/image":({clientId:e,attributes:t})=>{if(t.url)return{url:t.url,alt:t.alt||"",clientId:e}},"core/cover":({clientId:e,attributes:t})=>{if(t.backgroundType==="image"&&t.url)return{url:t.url,alt:t.alt||"",clientId:e}},"core/media-text":({clientId:e,attributes:t})=>{if(t.mediaType==="image"&&t.mediaUrl)return{url:t.mediaUrl,alt:t.mediaAlt||"",clientId:e}},"core/gallery":({innerBlocks:e})=>{let t=[],o=e?.length?SJ[e[0].name]:void 0;if(!o)return t;for(let r of e){let n=o(r);if(n&&t.push(n),t.length>=_Be)return t}return t}};function xBe(e,t){let o=SJ[e.name],r=o?o(e):void 0;return r?Array.isArray(r)?t?[]:r:[r]:[]}function _J({clientId:e,isExpanded:t}){let{block:o}=(0,yJ.useSelect)(n=>({block:n(_).getBlock(e)}),[e]);return(0,vJ.useMemo)(()=>xBe(o,t),[o,t])}var jo=l(w(),1),{Badge:wBe}=M(pd.privateApis);function CBe({className:e,block:{clientId:t},onClick:o,onContextMenu:r,onMouseDown:n,onToggleExpanded:i,tabIndex:s,onFocus:a,onDragStart:c,onDragEnd:u,draggable:d,isExpanded:f,ariaDescribedBy:m},h){let p=Tt(t),g=zr({clientId:t,context:"list-view"}),{isLocked:b}=ei(t),{hasPatternName:v,blockVisibility:k}=(0,wJ.useSelect)(P=>{let{getBlockAttributes:E}=M(P(_)),L=E(t);return{hasPatternName:!!L?.metadata?.patternName,blockVisibility:L?.metadata?.blockVisibility}},[t]),y=b,S=p?.positionType==="sticky",x=_J({clientId:t,isExpanded:f}),C=by(k),B=P=>{P.dataTransfer.clearData(),c?.(P)};function I(P){(P.keyCode===RT.ENTER||P.keyCode===RT.SPACE)&&o(P)}return(0,jo.jsxs)("a",{className:V("block-editor-list-view-block-select-button",e),onClick:o,onContextMenu:r,onKeyDown:I,onMouseDown:n,ref:h,tabIndex:s,onFocus:a,onDragStart:B,onDragEnd:u,draggable:d,href:`#block-${t}`,"aria-describedby":m,"aria-expanded":f,children:[(0,jo.jsx)(PT,{onClick:i}),(0,jo.jsx)(Ae,{icon:v?Ei:p?.icon,showColors:!0,context:"list-view"}),(0,jo.jsxs)(pd.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:[(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,jo.jsx)(pd.__experimentalTruncate,{ellipsizeMode:"auto",children:g})}),p?.anchor&&(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper",children:(0,jo.jsx)(wBe,{className:"block-editor-list-view-block-select-button__anchor",children:p.anchor})}),S&&(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__sticky",children:(0,jo.jsx)(we,{icon:NL})}),x.length?(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__images","aria-hidden":!0,children:x.map((P,E)=>(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__image",style:{backgroundImage:`url(${P.url})`,zIndex:x.length-E}},P.clientId))}):null,!!C&&(0,jo.jsx)(pd.Tooltip,{text:C,children:(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__block-visibility","aria-hidden":"true",children:(0,jo.jsx)(we,{icon:vs})})}),y&&(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__lock",children:(0,jo.jsx)(we,{icon:EL})})]})]})}var CJ=(0,xJ.forwardRef)(CBe);var hd=l(w(),1),BBe=(0,BJ.forwardRef)(({onClick:e,onToggleExpanded:t,block:o,isSelected:r,position:n,siblingBlockCount:i,level:s,isExpanded:a,selectedClientIds:c,...u},d)=>{let{clientId:f}=o,{AdditionalBlockContent:m,insertedBlock:h,setInsertedBlock:p}=md(),g=c.includes(f)?c:[f];return(0,hd.jsxs)(hd.Fragment,{children:[m&&(0,hd.jsx)(m,{block:o,insertedBlock:h,setInsertedBlock:p}),(0,hd.jsx)(fE,{appendToOwnerDocument:!0,clientIds:g,cloneClassname:"block-editor-list-view-draggable-chip",children:({draggable:b,onDragStart:v,onDragEnd:k})=>(0,hd.jsx)(CJ,{ref:d,className:"block-editor-list-view-block-contents",block:o,onClick:e,onToggleExpanded:t,isSelected:r,position:n,siblingBlockCount:i,level:s,draggable:b,onDragStart:v,onDragEnd:k,isExpanded:a,...u})})]})}),EJ=BBe;var Lm=l(N(),1),TJ=l(Fe(),1),IJ=(e,t,o)=>(0,Lm.sprintf)((0,Lm.__)("Block %1$d of %2$d, Level %3$d."),e,t,o),PJ=(e,t)=>[e?.positionLabel?`${(0,Lm.sprintf)((0,Lm.__)("Position: %s"),e.positionLabel)}.`:void 0,t?(0,Lm.__)("This block is locked."):void 0].filter(Boolean).join(" "),RJ=(e,t)=>Array.isArray(t)&&t.length?t.indexOf(e)!==-1:t===e;function OJ(e,t,o,r){let n=[...o,e],i=[...r,t],s=Math.min(n.length,i.length)-1,a=n[s],c=i[s];return{start:a,end:c}}function $g(e,t){if(!t)return;let o=`[role=row][data-block="${e}"]`;return new Promise(r=>{if(t.querySelector(o))return r(t.querySelector(o));let n=null,i=new window.MutationObserver(()=>{t.querySelector(o)&&(clearTimeout(n),i.disconnect(),r(t.querySelector(o)))});i.observe(t,{childList:!0,subtree:!0}),n=setTimeout(()=>{i.disconnect(),r(null)},3e3)}).then(r=>{r&&r.isConnected&&TJ.focus.focusable.find(r)?.[0]?.focus()})}function AJ({blockIndexes:e,blockDropTargetIndex:t,blockDropPosition:o,clientId:r,firstDraggedBlockIndex:n,isDragged:i}){let s,a,c;if(!i){a=!1;let u=e[r];c=u>n,t!=null&&n!==void 0?u!==void 0&&(u>=n&&u<t?s="up":u<n&&u>=t?s="down":s="normal",a=typeof t=="number"&&t-1===u&&o==="inside"):t===null&&n!==void 0?u!==void 0&&u>=n?s="up":s="normal":t!=null&&n===void 0?u!==void 0&&(u<t?s="normal":s="down"):t===null&&(s="normal")}return{displacement:s,isNesting:a,isAfterDraggedBlocks:c}}var er=l(w(),1);function DJ({block:{clientId:e},displacement:t,isAfterDraggedBlocks:o,isDragged:r,isNesting:n,isSelected:i,isBranchSelected:s,selectBlock:a,position:c,level:u,rowCount:d,siblingBlockCount:f,showBlockMovers:m,path:h,isExpanded:p,selectedClientIds:g,isSyncedBranch:b}){let v=(0,ko.useRef)(null),k=(0,ko.useRef)(null),y=(0,ko.useRef)(null),[S,x]=(0,ko.useState)(!1),[C,B]=(0,ko.useState)(),[I,P]=(0,ko.useState)(!1),{isLocked:E}=ei(e),L=i&&g[0]===e,T=i&&g[g.length-1]===e,{toggleBlockHighlight:O,duplicateBlocks:D,multiSelect:U,replaceBlocks:G,removeBlocks:j,insertAfterBlock:z,insertBeforeBlock:W,showViewportModal:ee}=M((0,Kg.useDispatch)(_)),se=(0,OT.useDebounce)(O,50),{canInsertBlockType:ce,getSelectedBlockClientIds:ie,getPreviousBlockClientId:re,getBlockRootClientId:Q,getBlockOrder:Y,getBlockParents:J,getBlockEditingMode:K,getBlocksByClientId:H,canEditBlock:X,canMoveBlock:ne,canRemoveBlocks:le,isGroupable:ve}=(0,Kg.useSelect)(_),{getGroupingBlockName:he}=(0,Kg.useSelect)(gd.store),xe=Tt(e),ze=yg(),{block:ot,blockName:Wt,allowRightClickOverrides:fo}=(0,Kg.useSelect)(ue=>{let{getBlock:to,getBlockName:ye,getSettings:Lt}=M(ue(_));return{block:to(e),blockName:ye(e),allowRightClickOverrides:Lt().allowRightClickOverrides}},[e]),{canRename:Do}=Pm(Wt),rt=(0,gd.hasBlockSupport)(Wt,"__experimentalToolbar",!0),xt=`list-view-block-select-button__description-${(0,OT.useInstanceId)(DJ)}`,{expand:At,collapse:Pe,collapseAll:wt,BlockSettingsMenu:qo,listViewInstanceId:$t,expandedState:lr,setInsertedBlock:ln,treeGridElementRef:je,rootClientId:Eo}=md(),Ze=(0,NJ.__unstableUseShortcutEventMatch)();function Ve(){let ue=ie(),to=ue.includes(e),ye=to?ue[0]:e,Lt=Q(ye);return{blocksToUpdate:to?ue:[e],firstBlockClientId:ye,firstBlockRootClientId:Lt,selectedBlockClientIds:ue}}async function gt(ue){if(ue.defaultPrevented||ue.target.closest("[role=dialog]"))return;let to=[AT.BACKSPACE,AT.DELETE].includes(ue.keyCode);if(Ze("core/block-editor/unselect",ue)&&g.length>0)ue.stopPropagation(),ue.preventDefault(),a(ue,void 0);else if(to||Ze("core/block-editor/remove",ue)){let{blocksToUpdate:ye,firstBlockClientId:Lt,firstBlockRootClientId:un,selectedBlockClientIds:_r}=Ve();if(!le(ye))return;let Wc=re(Lt)??un;j(ye,!1);let mO=_r.length>0&&ie().length===0;Wc||(Wc=Y()[0]),Ct(Wc,mO)}else if(Ze("core/block-editor/paste-styles",ue)){ue.preventDefault();let{blocksToUpdate:ye}=Ve(),Lt=H(ye);ze(Lt)}else if(Ze("core/block-editor/duplicate",ue)){ue.preventDefault();let{blocksToUpdate:ye,firstBlockRootClientId:Lt}=Ve();if(H(ye).every(_r=>!!_r&&(0,gd.hasBlockSupport)(_r.name,"multiple",!0)&&ce(_r.name,Lt))){let _r=await D(ye,!1);_r?.length&&Ct(_r[0],!1)}}else if(Ze("core/block-editor/insert-before",ue)){ue.preventDefault();let{blocksToUpdate:ye}=Ve();await W(ye[0]);let Lt=ie();Ct(Lt[0],!1)}else if(Ze("core/block-editor/insert-after",ue)){ue.preventDefault();let{blocksToUpdate:ye}=Ve();await z(ye.at(-1));let Lt=ie();Ct(Lt[0],!1)}else if(Ze("core/block-editor/select-all",ue)){ue.preventDefault();let{firstBlockRootClientId:ye,selectedBlockClientIds:Lt}=Ve(),un=Y(ye);if(!un.length)return;if((0,LJ.isShallowEqual)(Lt,un)&&ye&&ye!==Eo){Ct(ye,!0);return}U(un[0],un[un.length-1],null)}else if(Ze("core/block-editor/collapse-list-view",ue)){ue.preventDefault();let{firstBlockClientId:ye}=Ve(),Lt=J(ye,!1);wt(),At(Lt)}else if(Ze("core/block-editor/group",ue)){let{blocksToUpdate:ye}=Ve();if(ye.length>1&&ve(ye)){ue.preventDefault();let Lt=H(ye),un=he(),_r=(0,gd.switchToBlockType)(Lt,un);G(ye,_r),(0,MJ.speak)((0,s3.__)("Selected blocks are grouped."));let Wc=ie();Ct(Wc[0],!1)}}else if(Ze("core/block-editor/toggle-block-visibility",ue)){ue.preventDefault();let{blocksToUpdate:ye}=Ve();if(!H(ye).every(_r=>(0,gd.hasBlockSupport)(_r.name,"visibility",!0))||ye.some(_r=>K(_r)!=="default"))return;ee(ye)}else if(Ze("core/block-editor/rename",ue)){let{blocksToUpdate:ye}=Ve(),Lt=K(ye[0])==="contentOnly";ye.length===1&&Do&&!Lt&&(ue.preventDefault(),P(!0))}}let To=(0,ko.useCallback)(()=>{x(!0),se(e,!0)},[e,x,se]),cr=(0,ko.useCallback)(()=>{x(!1),se(e,!1)},[e,x,se]),ge=(0,ko.useCallback)(ue=>{a(ue,e),ue.preventDefault()},[e,a]),Ct=(0,ko.useCallback)((ue,to)=>{to&&a(void 0,ue,null,null),$g(ue,je?.current)},[a,je]),Io=(0,ko.useCallback)(ue=>{ue.preventDefault(),ue.stopPropagation(),p===!0?Pe(e):p===!1&&At(e)},[e,At,Pe,p]),Ke=(0,ko.useCallback)(ue=>{let{ownerDocument:to}=y?.current||{};!to||!to.hasFocus()||rt&&fo&&(y.current?.click(),B(new window.DOMRect(ue.clientX,ue.clientY,0,0)),ue.preventDefault())},[fo,y,rt]),te=(0,ko.useCallback)(ue=>{fo&&ue.button===2&&ue.preventDefault()},[fo]),Le=(0,ko.useMemo)(()=>{let{ownerDocument:ue}=k?.current||{};if(!(!C||!ue))return{ownerDocument:ue,getBoundingClientRect(){return C}}},[C]),ct=(0,ko.useCallback)(()=>{B(void 0)},[B]);if(bJ({isSelected:i,rowItemRef:k,selectedClientIds:g}),!ot)return null;let Gc=IJ(c,f,u),ua=PJ(xe,E),Bp=by(ot?.attributes?.metadata?.blockVisibility),jk=f>0,hf=m&&jk,cn=V("block-editor-list-view-block__mover-cell",{"is-visible":S||i}),Ep=V("block-editor-list-view-block__menu-cell",{"is-visible":S||L}),Tp;hf?Tp=2:rt||(Tp=3);let s0=V({"is-selected":i,"is-first-selected":L,"is-last-selected":T,"is-branch-selected":s,"is-synced-branch":b,"is-dragging":r,"has-single-cell":!rt,"is-synced":xe?.isSynced,"is-draggable":ne,"is-displacement-normal":t==="normal","is-displacement-up":t==="up","is-displacement-down":t==="down","is-after-dragged-blocks":o,"is-nesting":n}),a0=g.includes(e)?g:[e],Uk=i&&g.length===1;return(0,er.jsxs)(pJ,{className:s0,isDragged:r,onKeyDown:gt,onMouseEnter:To,onMouseLeave:cr,onFocus:To,onBlur:cr,level:u,position:c,rowCount:d,path:h,id:`list-view-${$t}-block-${e}`,"data-block":e,"data-expanded":X?p:void 0,ref:k,children:[(0,er.jsx)(Nm.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:Tp,ref:v,"aria-selected":!!i,children:({ref:ue,tabIndex:to,onFocus:ye})=>(0,er.jsxs)("div",{className:"block-editor-list-view-block__contents-container",children:[(0,er.jsx)(EJ,{block:ot,onClick:ge,onContextMenu:Ke,onMouseDown:te,onToggleExpanded:Io,isSelected:i,position:c,siblingBlockCount:f,level:u,ref:ue,tabIndex:Uk?0:to,onFocus:ye,isExpanded:X?p:void 0,selectedClientIds:g,ariaDescribedBy:xt}),(0,er.jsx)(TT,{id:xt,children:[Gc,ua,Bp].filter(Boolean).join(" ")})]})}),hf&&(0,er.jsx)(er.Fragment,{children:(0,er.jsxs)(Nm.__experimentalTreeGridCell,{className:cn,withoutGridItem:!0,children:[(0,er.jsx)(Nm.__experimentalTreeGridItem,{children:({ref:ue,tabIndex:to,onFocus:ye})=>(0,er.jsx)(gE,{orientation:"vertical",clientIds:[e],ref:ue,tabIndex:to,onFocus:ye})}),(0,er.jsx)(Nm.__experimentalTreeGridItem,{children:({ref:ue,tabIndex:to,onFocus:ye})=>(0,er.jsx)(bE,{orientation:"vertical",clientIds:[e],ref:ue,tabIndex:to,onFocus:ye})})]})}),rt&&qo&&(0,er.jsx)(Nm.__experimentalTreeGridCell,{className:Ep,"aria-selected":!!i,ref:y,children:({ref:ue,tabIndex:to,onFocus:ye})=>(0,er.jsx)(qo,{clientIds:a0,block:ot,icon:ks,label:(0,s3.__)("Options"),popoverProps:{anchor:Le},toggleProps:{ref:ue,className:"block-editor-list-view-block__menu",tabIndex:to,onClick:ct,onFocus:ye,size:"small"},disableOpenOnArrowDown:!0,expand:At,expandedState:lr,setInsertedBlock:ln,__experimentalSelectBlock:Ct})}),I&&(0,er.jsx)(Tm,{clientId:e,onClose:()=>P(!1)})]})}var VJ=(0,ko.memo)(DJ);var ni=l(w(),1);function FJ(e,t,o,r){return o?.includes(e.clientId)?0:t[e.clientId]??r?1+e.innerBlocks.reduce(EBe(t,o,r),0):1}var EBe=(e,t,o)=>(r,n)=>t?.includes(n.clientId)?r:(e[n.clientId]??o)&&n.innerBlocks.length>0?r+FJ(n,e,t,o):r+1,TBe=()=>{};function zJ(e){let{blocks:t,selectBlock:o=TBe,showBlockMovers:r,selectedClientIds:n,level:i=1,path:s="",isBranchSelected:a=!1,listPosition:c=0,fixedListWindow:u,isExpanded:d,parentId:f,shouldShowInnerBlocks:m=!0,isSyncedBranch:h=!1,showAppender:p=!0}=e,g=Tt(f),b=h||!!g?.isSynced,v=(0,MT.useSelect)(O=>f?O(_).canEditBlock(f):!0,[f]),{blockDropPosition:k,blockDropTargetIndex:y,firstDraggedBlockIndex:S,blockIndexes:x,expandedState:C,draggedClientIds:B}=md(),I=(0,NT.useRef)();if(!v)return null;let P=p&&i===1,E=t.filter(Boolean),L=E.length,T=P?L+1:L;return I.current=c,(0,ni.jsxs)(ni.Fragment,{children:[E.map((O,D)=>{let{clientId:U,innerBlocks:G}=O;D>0&&(I.current+=FJ(E[D-1],C,B,d));let j=!!B?.includes(U),{displacement:z,isAfterDraggedBlocks:W,isNesting:ee}=AJ({blockIndexes:x,blockDropTargetIndex:y,blockDropPosition:k,clientId:U,firstDraggedBlockIndex:S,isDragged:j}),{itemInView:se}=u,ce=se(I.current),ie=D+1,re=s.length>0?`${s}_${ie}`:`${ie}`,Q=!!G?.length,Y=Q&&m?C[U]??d:void 0,J=RJ(U,n),K=a||J&&Q,H=j||ce||J&&U===n[0]||D===0||D===L-1;return(0,ni.jsxs)(MT.AsyncModeProvider,{value:!J,children:[H&&(0,ni.jsx)(VJ,{block:O,selectBlock:o,isSelected:J,isBranchSelected:K,isDragged:j,level:i,position:ie,rowCount:T,siblingBlockCount:L,showBlockMovers:r,path:re,isExpanded:j?!1:Y,listPosition:I.current,selectedClientIds:n,isSyncedBranch:b,displacement:z,isAfterDraggedBlocks:W,isNesting:ee}),!H&&(0,ni.jsx)("tr",{children:(0,ni.jsx)("td",{className:"block-editor-list-view-placeholder"})}),Q&&Y&&!j&&(0,ni.jsx)(zJ,{parentId:U,blocks:G,selectBlock:o,showBlockMovers:r,level:i+1,path:re,listPosition:I.current+1,fixedListWindow:u,isBranchSelected:K,selectedClientIds:n,isExpanded:d,isSyncedBranch:b})]},U)}),P&&(0,ni.jsx)(LT.__experimentalTreeGridRow,{level:i,setSize:T,positionInSet:T,isExpanded:!0,children:(0,ni.jsx)(LT.__experimentalTreeGridCell,{children:O=>(0,ni.jsx)(n3,{clientId:f,nestingLevel:i,blockCount:L,...O})})})]})}var jJ=(0,NT.memo)(zJ);var Yg=l(A(),1),DT=l(Fe(),1),sc=l(R(),1),a3=l(N(),1);var Xi=l(w(),1);function UJ({draggedBlockClientId:e,listViewRef:t,blockDropTarget:o}){let r=Tt(e),n=zr({clientId:e,context:"list-view"}),{rootClientId:i,clientId:s,dropPosition:a}=o||{},[c,u]=(0,sc.useMemo)(()=>{if(!t.current)return[];let k=i?t.current.querySelector(`[data-block="${i}"]`):void 0,y=s?t.current.querySelector(`[data-block="${s}"]`):void 0;return[k,y]},[t,i,s]),d=u||c,f=(0,a3.isRTL)(),m=(0,sc.useCallback)((k,y)=>{if(!d)return 0;let S=d.offsetWidth,x=(0,DT.getScrollContainer)(d,"horizontal"),C=d.ownerDocument,B=x===C.body||x===C.documentElement;if(x&&!B){let I=x.getBoundingClientRect(),P=(0,a3.isRTL)()?I.right-k.right:k.left-I.left,E=x.clientWidth;if(E<S+P&&(S=E-P),!f&&k.left+y<I.left)return S-=I.left-k.left,S;if(f&&k.right-y>I.right)return S-=k.right-I.right,S}return S-y},[f,d]),h=(0,sc.useMemo)(()=>{if(!d)return{};let k=d.getBoundingClientRect();return{width:m(k,0)}},[m,d]),p=(0,sc.useMemo)(()=>{if(!d)return{};let k=(0,DT.getScrollContainer)(d),y=d.ownerDocument,S=k===y.body||k===y.documentElement;if(k&&!S){let x=k.getBoundingClientRect(),C=d.getBoundingClientRect(),B=f?x.right-C.right:C.left-x.left;if(!f&&x.left>C.left)return{transform:`translateX( ${B}px )`};if(f&&x.right<C.right)return{transform:`translateX( ${B*-1}px )`}}return{}},[f,d]),g=(0,sc.useMemo)(()=>{if(!c)return 1;let k=parseInt(c.getAttribute("aria-level"),10);return k?k+1:1},[c]),b=(0,sc.useMemo)(()=>d?d.classList.contains("is-branch-selected"):!1,[d]),v=(0,sc.useMemo)(()=>{if(!(!d||!(a==="top"||a==="bottom"||a==="inside")))return{contextElement:d,getBoundingClientRect(){let y=d.getBoundingClientRect(),S=y.left,x=0,C=(0,DT.getScrollContainer)(d,"horizontal"),B=d.ownerDocument,I=C===B.body||C===B.documentElement;if(C&&!I){let L=C.getBoundingClientRect(),T=f?C.offsetWidth-C.clientWidth:0;S<L.left+T&&(S=L.left+T)}a==="top"?x=y.top-y.height*2:x=y.top;let P=m(y,0),E=y.height;return new window.DOMRect(S,x,P,E)}}},[d,a,m,f]);return d?(0,Xi.jsx)(Yg.Popover,{animate:!1,anchor:v,focusOnMount:!1,className:"block-editor-list-view-drop-indicator--preview",variant:"unstyled",flip:!1,resize:!0,children:(0,Xi.jsx)("div",{style:h,className:V("block-editor-list-view-drop-indicator__line",{"block-editor-list-view-drop-indicator__line--darker":b}),children:(0,Xi.jsxs)("div",{className:"block-editor-list-view-leaf","aria-level":g,children:[(0,Xi.jsxs)("div",{className:V("block-editor-list-view-block-select-button","block-editor-list-view-block-contents"),style:p,children:[(0,Xi.jsx)(PT,{onClick:()=>{}}),(0,Xi.jsx)(Ae,{icon:r?.icon,showColors:!0,context:"list-view"}),(0,Xi.jsx)(Yg.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:(0,Xi.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,Xi.jsx)(Yg.__experimentalTruncate,{ellipsizeMode:"auto",children:n})})})]}),(0,Xi.jsx)("div",{className:"block-editor-list-view-block__menu-cell"})]})})}):null}var HJ=l(Xo(),1),qg=l(N(),1),AS=l(F(),1),GJ=l(R(),1),ii=l(it(),1),WJ=l($(),1);function $J(){let{clearSelectedBlock:e,multiSelect:t,selectBlock:o}=(0,AS.useDispatch)(_),{getBlockName:r,getBlockParents:n,getBlockSelectionStart:i,getSelectedBlockClientIds:s,hasMultiSelection:a,hasSelectedBlock:c}=(0,AS.useSelect)(_),{getBlockType:u}=(0,AS.useSelect)(WJ.store);return{updateBlockSelection:(0,GJ.useCallback)(async(f,m,h,p)=>{if(!f?.shiftKey&&f?.keyCode!==ii.ESCAPE){o(m,p);return}f.preventDefault();let g=f.type==="keydown"&&f.keyCode===ii.ESCAPE,b=f.type==="keydown"&&(f.keyCode===ii.UP||f.keyCode===ii.DOWN||f.keyCode===ii.HOME||f.keyCode===ii.END);if(!b&&!c()&&!a()){o(m,null);return}let v=s(),k=[...n(m),m];if((g||b&&!v.some(C=>k.includes(C)))&&await e(),!g){let C=i(),B=m;b&&(!c()&&!a()&&(C=m),h&&(B=h));let I=n(C),P=n(B),{start:E,end:L}=OJ(C,B,I,P);await t(E,L,null)}let y=s();if((f.keyCode===ii.HOME||f.keyCode===ii.END)&&y.length>1)return;let S=v.filter(C=>!y.includes(C)),x;if(S.length===1){let C=u(r(S[0]))?.title;C&&(x=(0,qg.sprintf)((0,qg.__)("%s deselected."),C))}else S.length>1&&(x=(0,qg.sprintf)((0,qg.__)("%s blocks deselected."),S.length));x&&(0,HJ.speak)(x,"assertive")},[e,r,u,n,i,s,a,c,t,o])}}var KJ=l(R(),1);function YJ(e){return(0,KJ.useMemo)(()=>{let o={},r=0,n=i=>{i.forEach(s=>{o[s.clientId]=r,r++,s.innerBlocks.length>0&&n(s.innerBlocks)})};return n(e),o},[e])}var qJ=l(F(),1);function ZJ({blocks:e,rootClientId:t}){return(0,qJ.useSelect)(o=>{let{getDraggedBlockClientIds:r,getSelectedBlockClientIds:n,getEnabledClientIdsTree:i}=M(o(_));return{selectedClientIds:n(),draggedClientIds:r(),clientIdsTree:e??i(t)}},[e,t])}var XJ=l(R(),1),QJ=l(F(),1);function JJ({collapseAll:e,expand:t}){let{expandedBlock:o,getBlockParents:r}=(0,QJ.useSelect)(n=>{let{getBlockParents:i,getExpandedBlock:s}=M(n(_));return{expandedBlock:s(),getBlockParents:i}},[]);(0,XJ.useEffect)(()=>{if(o){let n=r(o,!1);e(),t(n)}},[e,t,o,r])}var eee=l(F(),1),Mm=l(R(),1),Dm=l(Z(),1),tee=l(N(),1);var ac=24;function IBe(e,t,o=1,r=!1){let n=r?t.right-o*ac:t.left+o*ac;return r?e.x>n:e.x<n}function PBe(e,t,o=1,r=!1){let n=r?t.right-o*ac:t.left+o*ac,i=r?n-e.x:e.x-n,s=Math.round(i/ac);return Math.abs(s)}function RBe(e,t){let o=[],r=e;for(;r;)o.push({...r}),r=t.find(n=>n.clientId===r.rootClientId);return o}function oee(e,t){let o=e[t+1];return o&&o.isDraggedBlock?oee(e,t+1):o}function OBe(e,t,o=1,r=!1){let n=r?t.right-o*ac:t.left+o*ac;return(r?e.x<n-ac:e.x>n+ac)&&e.y<t.bottom}var ABe=["top","bottom"];function LBe(e,t,o=!1){let r,n,i,s,a;for(let f=0;f<e.length;f++){let m=e[f];if(m.isDraggedBlock)continue;let h=m.element.getBoundingClientRect(),[p,g]=bm(t,h,ABe),b=GB(t,h);if(i===void 0||p<i||b){i=p;let v=e.indexOf(m),k=e[v-1];if(g==="top"&&k&&k.rootClientId===m.rootClientId&&!k.isDraggedBlock?(n=k,r="bottom",s=k.element.getBoundingClientRect(),a=v-1):(n=m,r=g,s=h,a=v),b)break}}if(!n)return;let c=RBe(n,e),u=r==="bottom";if(u&&n.canInsertDraggedBlocksAsChild&&(n.innerBlockCount>0&&n.isExpanded||OBe(t,s,c.length,o))){let f=n.isExpanded?0:n.innerBlockCount||0;return{rootClientId:n.clientId,clientId:n.clientId,blockIndex:f,dropPosition:"inside"}}if(u&&n.rootClientId&&IBe(t,s,c.length,o)){let f=oee(e,a),m=n.nestingLevel,h=f?f.nestingLevel:1;if(m&&h){let p=PBe(t,s,c.length,o),g=Math.max(Math.min(p,m-h),0);if(c[g]){let b=n.blockIndex;if(c[g].nestingLevel===f?.nestingLevel)b=f?.blockIndex;else for(let v=a;v>=0;v--){let k=e[v];if(k.rootClientId===c[g].rootClientId){b=k.blockIndex+1;break}}return{rootClientId:c[g].rootClientId,clientId:n.clientId,blockIndex:b,dropPosition:r}}}}if(!n.canInsertDraggedBlocksAsSibling)return;let d=u?1:0;return{rootClientId:n.rootClientId,clientId:n.clientId,blockIndex:n.blockIndex+d,dropPosition:r}}var NBe={leading:!1,trailing:!0};function ree({dropZoneElement:e,expandedState:t,setExpandedState:o}){let{getBlockRootClientId:r,getBlockIndex:n,getBlockCount:i,getDraggedBlockClientIds:s,canInsertBlocks:a}=(0,eee.useSelect)(_),[c,u]=(0,Mm.useState)(),{rootClientId:d,blockIndex:f}=c||{},m=HB(d,f),h=(0,tee.isRTL)(),p=(0,Dm.usePrevious)(d),g=(0,Mm.useCallback)((S,x)=>{let{rootClientId:C}=x||{};C&&x?.dropPosition==="inside"&&!S[C]&&o({type:"expand",clientIds:[C]})},[o]),b=(0,Dm.useThrottle)(g,500,NBe);(0,Mm.useEffect)(()=>{if(c?.dropPosition!=="inside"||p!==c?.rootClientId){b.cancel();return}b(t,c)},[t,p,c,b]);let v=s(),k=(0,Dm.useThrottle)((0,Mm.useCallback)((S,x)=>{let C={x:S.clientX,y:S.clientY},B=!!v?.length,P=Array.from(x.querySelectorAll("[data-block]")).map(L=>{let T=L.dataset.block,O=L.dataset.expanded==="true",D=L.classList.contains("is-dragging"),U=parseInt(L.getAttribute("aria-level"),10),G=r(T);return{clientId:T,isExpanded:O,rootClientId:G,blockIndex:n(T),element:L,nestingLevel:U||void 0,isDraggedBlock:B?D:!1,innerBlockCount:i(T),canInsertDraggedBlocksAsSibling:B?a(v,G):!0,canInsertDraggedBlocksAsChild:B?a(v,T):!0}}),E=LBe(P,C,h);E&&u(E)},[a,v,i,n,r,h]),50);return{ref:(0,Dm.__experimentalUseDropZone)({dropZoneElement:e,onDrop(S){k.cancel(),c&&m(S),u(void 0)},onDragLeave(){k.cancel(),u(null)},onDragOver(S){k(S,S.currentTarget)},onDragEnd(){k.cancel(),u(void 0)}}),target:c}}var VT=l(R(),1),nee=l(F(),1);function iee({firstSelectedBlockClientId:e,setExpandedState:t}){let[o,r]=(0,VT.useState)(null),{selectedBlockParentClientIds:n}=(0,nee.useSelect)(i=>{let{getBlockParents:s}=i(_);return{selectedBlockParentClientIds:s(e,!1)}},[e]);return(0,VT.useEffect)(()=>{o!==e&&n?.length&&t({type:"expand",clientIds:n})},[e,n,o,t]),{setSelectedTreeId:r}}var Zg=l(F(),1),see=l(Z(),1);function aee({selectBlock:e}){let t=(0,Zg.useRegistry)(),{getBlockOrder:o,getBlockRootClientId:r,getBlocksByClientId:n,getPreviousBlockClientId:i,getSelectedBlockClientIds:s,getSettings:a,canInsertBlockType:c,canRemoveBlocks:u}=(0,Zg.useSelect)(_),{flashBlock:d,removeBlocks:f,replaceBlocks:m,insertBlocks:h}=(0,Zg.useDispatch)(_),p=Oh();return(0,see.useRefEffect)(g=>{function b(y,S){S&&e(void 0,y,null,null),$g(y,g)}function v(y){let S=s(),x=S.includes(y),C=x?S[0]:y,B=r(C);return{blocksToUpdate:x?S:[y],firstBlockClientId:C,firstBlockRootClientId:B,originallySelectedBlockClientIds:S}}function k(y){if(y.defaultPrevented||!g.contains(y.target.ownerDocument.activeElement))return;let x=y.target.ownerDocument.activeElement?.closest("[role=row]")?.dataset?.block;if(!x)return;let{blocksToUpdate:C,firstBlockClientId:B,firstBlockRootClientId:I,originallySelectedBlockClientIds:P}=v(x);if(C.length!==0){if(y.preventDefault(),y.type==="copy"||y.type==="cut"){C.length===1&&d(C[0]),p(y.type,C);let E=n(C);C1(y,E,t)}if(y.type==="cut"){if(!u(C))return;let E=i(B)??I;f(C,!1);let L=P.length>0&&s().length===0;E||(E=o()[0]),b(E,L)}else if(y.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:E}=a(),L=vG(y,E);if(C.length===1){let[T]=C;if(L.every(O=>c(O.name,T))){h(L,void 0,T),b(L[0]?.clientId,!1);return}}m(C,L,L.length-1,-1),b(L[0]?.clientId,!1)}}}return g.ownerDocument.addEventListener("copy",k),g.ownerDocument.addEventListener("cut",k),g.ownerDocument.addEventListener("paste",k),()=>{g.ownerDocument.removeEventListener("copy",k),g.ownerDocument.removeEventListener("cut",k),g.ownerDocument.removeEventListener("paste",k)}},[])}var lc=l(w(),1),MBe=(e,t)=>t.type==="clear"?{}:Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce((o,r)=>({...o,[r]:t.type==="expand"}),{})}:e,lee=32;function uee({id:e,blocks:t,dropZoneElement:o,showBlockMovers:r=!1,isExpanded:n=!1,showAppender:i=!1,blockSettingsMenu:s=IV,rootClientId:a,description:c,onSelect:u,additionalBlockContent:d},f){t&&(0,cee.default)("`blocks` property in `wp.blockEditor.__experimentalListView`",{since:"6.3",alternative:"`rootClientId` property"});let m=(0,Xg.useInstanceId)(uee),{clientIdsTree:h,draggedClientIds:p,selectedClientIds:g}=ZJ({blocks:t,rootClientId:a}),b=YJ(h),{getBlock:v,getSelectedBlockClientIds:k}=(0,LS.useSelect)(_),{visibleBlockCount:y}=(0,LS.useSelect)(X=>{let{getGlobalBlockCount:ne,getClientIdsOfDescendants:le}=X(_),ve=p?.length>0?le(p).length+1:0;return{visibleBlockCount:ne()-ve}},[p]),{updateBlockSelection:S}=$J(),[x,C]=(0,vo.useReducer)(MBe,{}),[B,I]=(0,vo.useState)(null),{setSelectedTreeId:P}=iee({firstSelectedBlockClientId:g[0],setExpandedState:C}),E=(0,vo.useCallback)((X,ne,le)=>{S(X,ne,null,le),P(ne),u&&u(v(ne))},[P,S,u,v]),{ref:L,target:T}=ree({dropZoneElement:o,expandedState:x,setExpandedState:C}),O=(0,vo.useRef)(),D=aee({selectBlock:E}),U=(0,vo.useCallback)(X=>{let[ne]=k();ne&&X&&$g(ne,X)},[k]),G=(0,Xg.useMergeRefs)([D,U,O,L,f]),j=(0,vo.useCallback)(X=>{if(!X)return;let ne=Array.isArray(X)?X:[X];C({type:"expand",clientIds:ne})},[C]),z=(0,vo.useCallback)(X=>{X&&C({type:"collapse",clientIds:[X]})},[C]),W=(0,vo.useCallback)(()=>{C({type:"clear"})},[C]),ee=(0,vo.useCallback)(X=>{j(X?.dataset?.block)},[j]),se=(0,vo.useCallback)(X=>{z(X?.dataset?.block)},[z]),ce=(0,vo.useCallback)((X,ne,le)=>{X.shiftKey&&S(X,ne?.dataset?.block,le?.dataset?.block)},[S]);JJ({collapseAll:W,expand:j});let ie=p?.[0],{blockDropTargetIndex:re,blockDropPosition:Q,firstDraggedBlockIndex:Y}=(0,vo.useMemo)(()=>{let X,ne;if(T?.clientId){let le=b[T.clientId];X=le===void 0||T?.dropPosition==="top"?le:le+1}else T===null&&(X=null);if(ie){let le=b[ie];ne=le===void 0||T?.dropPosition==="top"?le:le+1}return{blockDropTargetIndex:X,blockDropPosition:T?.dropPosition,firstDraggedBlockIndex:ne}},[T,b,ie]),J=(0,vo.useMemo)(()=>({blockDropPosition:Q,blockDropTargetIndex:re,blockIndexes:b,draggedClientIds:p,expandedState:x,expand:j,firstDraggedBlockIndex:Y,collapse:z,collapseAll:W,BlockSettingsMenu:s,listViewInstanceId:m,AdditionalBlockContent:d,insertedBlock:B,setInsertedBlock:I,treeGridElementRef:O,rootClientId:a}),[Q,re,b,p,x,j,Y,z,W,s,m,d,B,I,a]),[K]=(0,Xg.__experimentalUseFixedWindowList)(O,lee,y,{expandedState:x,useWindowing:!0,windowOverscan:40});if(!h.length&&!i)return null;let H=c&&`block-editor-list-view-description-${m}`;return(0,lc.jsxs)(LS.AsyncModeProvider,{value:!0,children:[(0,lc.jsx)(UJ,{draggedBlockClientId:ie,listViewRef:O,blockDropTarget:T}),c&&(0,lc.jsx)(FT.VisuallyHidden,{id:H,children:c}),(0,lc.jsx)(FT.__experimentalTreeGrid,{id:e,className:V("block-editor-list-view-tree",{"is-dragging":p?.length>0&&re!==void 0}),"aria-label":(0,l3.__)("Block navigation structure"),ref:G,onCollapseRow:se,onExpandRow:ee,onFocusRow:ce,applicationAriaLabel:(0,l3.__)("Block navigation structure"),"aria-describedby":H,style:{"--wp-admin--list-view-dragged-items-height":p?.length?`${lee*(p.length-1)}px`:null},children:(0,lc.jsx)(BT.Provider,{value:J,children:(0,lc.jsx)(jJ,{blocks:h,parentId:a,selectBlock:E,showBlockMovers:r,fixedListWindow:K,selectedClientIds:g,isExpanded:n,showAppender:i})})})]})}var NS=(0,vo.forwardRef)(uee),zT=(0,vo.forwardRef)((e,t)=>(0,lc.jsx)(NS,{ref:t,...e,showAppender:!1,rootClientId:null,onSelect:null,additionalBlockContent:null,blockSettingsMenu:void 0}));var bd=l(w(),1);function DBe({isEnabled:e,onToggle:t,isOpen:o,innerRef:r,...n}){return(0,bd.jsx)(jT.Button,{__next40pxDefaultSize:!0,...n,ref:r,icon:sv,"aria-expanded":o,"aria-haspopup":"true",onClick:e?t:void 0,label:(0,c3.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!e})}function VBe({isDisabled:e,...t},o){(0,dee.default)("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});let n=(0,fee.useSelect)(i=>!!i(_).getBlockCount(),[])&&!e;return(0,bd.jsx)(jT.Dropdown,{contentClassName:"block-editor-block-navigation__popover",popoverProps:{placement:"bottom-start"},renderToggle:({isOpen:i,onToggle:s})=>(0,bd.jsx)(DBe,{...t,innerRef:o,isOpen:i,onToggle:s,isEnabled:n}),renderContent:()=>(0,bd.jsxs)("div",{className:"block-editor-block-navigation__container",children:[(0,bd.jsx)("p",{className:"block-editor-block-navigation__label",children:(0,c3.__)("List view")}),(0,bd.jsx)(zT,{})]})})}var pee=(0,mee.forwardRef)(VBe);var vee=l(R(),1),yee=l(F(),1),UT=l(Z(),1),Da=l(A(),1),u3=l(N(),1);var hee=l(R(),1);var gee=l(w(),1);function bee({genericPreviewBlock:e,style:t,className:o,activeStyle:r}){let n=Tg(o,r,t),i=(0,hee.useMemo)(()=>({name:e.name,title:t.label||t.name,description:t.description,initialAttributes:{...e.attributes,className:n+" block-editor-block-styles__block-preview-container"},example:e}),[e,t,n]);return(0,gee.jsx)(X1,{item:i})}var Gs=l(w(),1),kee=()=>{};function FBe({clientId:e,onSwitch:t=kee,onHoverClassName:o=kee}){let r=(0,yee.useSelect)(y=>y(_).canEditBlock(e),[e]),{onSelect:n,stylesToRender:i,activeStyle:s,genericPreviewBlock:a,className:c}=Ig({clientId:e,onSwitch:t}),[u,d]=(0,vee.useState)(null),f=(0,UT.useViewportMatch)("medium","<"),m=Ro();if(!r||!i||i.length===0)return null;let h=(0,UT.debounce)(d,250),p=y=>{n(y),o(null),d(null),h.cancel()},g=y=>{if(u===y){h.cancel();return}h(y),o(y?.name??null)},b=QE(i),v=()=>s?.name!==b?.name,k=()=>{p(b)};return(0,Gs.jsx)(Da.__experimentalToolsPanel,{label:(0,u3.__)("Styles"),resetAll:k,panelId:e,hasInnerWrapper:!0,dropdownMenuProps:m,children:(0,Gs.jsx)(Da.__experimentalToolsPanelItem,{hasValue:v,label:(0,u3.__)("Variation"),onDeselect:k,isShownByDefault:!0,panelId:e,children:(0,Gs.jsxs)("div",{className:"block-editor-block-styles",children:[(0,Gs.jsx)("div",{className:"block-editor-block-styles__variants",children:i.map(y=>{let S=y.label||y.name;return(0,Gs.jsx)(Da.Button,{__next40pxDefaultSize:!0,className:V("block-editor-block-styles__item",{"is-active":s.name===y.name}),variant:"secondary",label:S,onMouseEnter:()=>g(y),onFocus:()=>g(y),onMouseLeave:()=>g(null),onBlur:()=>g(null),onClick:()=>p(y),"aria-current":s.name===y.name,children:(0,Gs.jsx)(Da.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text",children:S})},y.name)})}),u&&!f&&(0,Gs.jsx)(Da.Popover,{placement:"left-start",offset:34,focusOnMount:!1,children:(0,Gs.jsx)("div",{className:"block-editor-block-styles__preview-panel",onMouseLeave:()=>g(null),children:(0,Gs.jsx)(bee,{activeStyle:s,className:c,genericPreviewBlock:a,style:u})})})]})})})}var Qg=FBe;var Cee=l(A(),1),Jg=l(N(),1);var _ee=l(A(),1),xee=l(w(),1),See={0:OL,1:jA,2:HA,3:WA,4:KA,5:qA,6:XA};function d3({level:e}){return See[e]?(0,xee.jsx)(_ee.Icon,{icon:See[e]}):null}var HT=l(w(),1),wee=[1,2,3,4,5,6],zBe={className:"block-library-heading-level-dropdown"};function Bee({options:e=wee,value:t,onChange:o}){let r=e.filter(n=>n===0||wee.includes(n)).sort((n,i)=>n-i);return(0,HT.jsx)(Cee.ToolbarDropdownMenu,{popoverProps:zBe,icon:(0,HT.jsx)(d3,{level:t}),label:(0,Jg.__)("Change level"),controls:r.map(n=>{let i=n===t;return{icon:(0,HT.jsx)(d3,{level:n}),title:n===0?(0,Jg.__)("Paragraph"):(0,Jg.sprintf)((0,Jg.__)("Heading %d"),n),isActive:i,onClick(){o(n)},role:"menuitemradio"}})})}var MS=l(N(),1),DS=l(A(),1);var cc=l(w(),1);function jBe({icon:e=yL,label:t=(0,MS.__)("Choose variation"),instructions:o=(0,MS.__)("Select a variation to start with:"),variations:r,onSelect:n,allowSkip:i}){let s=V("block-editor-block-variation-picker",{"has-many-variations":r.length>4});return(0,cc.jsxs)(DS.Placeholder,{icon:e,label:t,instructions:o,className:s,children:[(0,cc.jsx)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,MS.__)("Block variations"),children:r.map(a=>(0,cc.jsxs)("li",{children:[(0,cc.jsx)(DS.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:a.icon&&a.icon.src?a.icon.src:a.icon,iconSize:48,onClick:()=>n(a),className:"block-editor-block-variation-picker__variation",label:a.description||a.title}),(0,cc.jsx)("span",{className:"block-editor-block-variation-picker__variation-label",children:a.title})]},a.name))}),i&&(0,cc.jsx)("div",{className:"block-editor-block-variation-picker__skip",children:(0,cc.jsx)(DS.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>n(),children:(0,MS.__)("Skip")})})]})}var Eee=jBe;var Ree=l(F(),1),Oee=l($(),1),tb=l(A(),1),f3=l(R(),1),m3=l(Z(),1),Aee=l(N(),1);var uc=l(N(),1),eb=l(A(),1);var kd={carousel:"carousel",grid:"grid"};var si=l(w(),1),UBe=({onBlockPatternSelect:e})=>(0,si.jsx)("div",{className:"block-editor-block-pattern-setup__actions",children:(0,si.jsx)(eb.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:e,children:(0,uc.__)("Choose")})}),HBe=({handlePrevious:e,handleNext:t,activeSlide:o,totalSlides:r})=>(0,si.jsxs)("div",{className:"block-editor-block-pattern-setup__navigation",children:[(0,si.jsx)(eb.Button,{size:"compact",icon:(0,uc.isRTL)()?Vo:Mr,label:(0,uc.__)("Previous pattern"),onClick:e,disabled:o===0,accessibleWhenDisabled:!0}),(0,si.jsx)(eb.Button,{size:"compact",icon:(0,uc.isRTL)()?Mr:Vo,label:(0,uc.__)("Next pattern"),onClick:t,disabled:o===r-1,accessibleWhenDisabled:!0})]}),GBe=({viewMode:e,setViewMode:t,handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i,onBlockPatternSelect:s})=>{let a=e===kd.carousel,c=(0,si.jsxs)("div",{className:"block-editor-block-pattern-setup__display-controls",children:[(0,si.jsx)(eb.Button,{size:"compact",icon:_v,label:(0,uc.__)("Carousel view"),onClick:()=>t(kd.carousel),isPressed:a}),(0,si.jsx)(eb.Button,{size:"compact",icon:rv,label:(0,uc.__)("Grid view"),onClick:()=>t(kd.grid),isPressed:e===kd.grid})]});return(0,si.jsxs)("div",{className:"block-editor-block-pattern-setup__toolbar",children:[a&&(0,si.jsx)(HBe,{handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i}),c,a&&(0,si.jsx)(UBe,{onBlockPatternSelect:s})]})},Tee=GBe;var Iee=l(F(),1);function WBe(e,t,o){return(0,Iee.useSelect)(r=>{let{getBlockRootClientId:n,getPatternsByBlockTypes:i,__experimentalGetAllowedPatterns:s}=r(_),a=n(e);return o?s(a).filter(o):i(t,a)},[e,t,o])}var Pee=WBe;var zt=l(w(),1),$Be=({viewMode:e,activeSlide:t,patterns:o,onBlockPatternSelect:r,showTitles:n})=>{let i="block-editor-block-pattern-setup__container";if(e===kd.carousel){let s=new Map([[t,"active-slide"],[t-1,"previous-slide"],[t+1,"next-slide"]]);return(0,zt.jsx)("div",{className:"block-editor-block-pattern-setup__carousel",children:(0,zt.jsx)("div",{className:i,children:(0,zt.jsx)("div",{className:"carousel-container",children:o.map((a,c)=>(0,zt.jsx)(Nee,{active:c===t,className:s.get(c)||"",pattern:a},a.name))})})})}return(0,zt.jsx)("div",{className:"block-editor-block-pattern-setup__grid",children:(0,zt.jsx)(tb.Composite,{role:"listbox",className:i,"aria-label":(0,Aee.__)("Patterns list"),children:o.map(s=>(0,zt.jsx)(Lee,{pattern:s,onSelect:r,showTitles:n},s.name))})})};function Lee({pattern:e,onSelect:t,showTitles:o}){let r="block-editor-block-pattern-setup-list",{blocks:n,description:i,viewportWidth:s=700}=e,a=(0,m3.useInstanceId)(Lee,`${r}__item-description`);return(0,zt.jsx)("div",{className:`${r}__list-item`,children:(0,zt.jsxs)(tb.Composite.Item,{render:(0,zt.jsx)("div",{"aria-describedby":i?a:void 0,"aria-label":e.title,className:`${r}__item`}),id:`${r}__pattern__${e.name}`,role:"option",onClick:()=>t(n),children:[(0,zt.jsx)(vn,{blocks:n,viewportWidth:s}),o&&(0,zt.jsx)("div",{className:`${r}__item-title`,children:e.title}),!!i&&(0,zt.jsx)(tb.VisuallyHidden,{id:a,children:i})]})})}function Nee({active:e,className:t,pattern:o,minHeight:r}){let{blocks:n,title:i,description:s}=o,a=(0,m3.useInstanceId)(Nee,"block-editor-block-pattern-setup-list__item-description");return(0,zt.jsxs)("div",{"aria-hidden":!e,role:"img",className:`pattern-slide ${t}`,"aria-label":i,"aria-describedby":s?a:void 0,children:[(0,zt.jsx)(vn,{blocks:n,minHeight:r}),!!s&&(0,zt.jsx)(tb.VisuallyHidden,{id:a,children:s})]})}var KBe=({clientId:e,blockName:t,filterPatternsFn:o,onBlockPatternSelect:r,initialViewMode:n=kd.carousel,showTitles:i=!1})=>{let[s,a]=(0,f3.useState)(n),[c,u]=(0,f3.useState)(0),{replaceBlock:d}=(0,Ree.useDispatch)(_),f=Pee(e,t,o);if(!f?.length)return null;let h=r||(p=>{let g=p.map(b=>(0,Oee.cloneBlock)(b));d(e,g)});return(0,zt.jsx)(zt.Fragment,{children:(0,zt.jsxs)("div",{className:`block-editor-block-pattern-setup view-mode-${s}`,children:[(0,zt.jsx)($Be,{viewMode:s,activeSlide:c,patterns:f,onBlockPatternSelect:h,showTitles:i}),(0,zt.jsx)(Tee,{viewMode:s,setViewMode:a,activeSlide:c,totalSlides:f.length,handleNext:()=>{u(p=>Math.min(p+1,f.length-1))},handlePrevious:()=>{u(p=>Math.max(p-1,0))},onBlockPatternSelect:()=>{h(f[c].blocks)}})]})})},Mee=KBe;var p3=l($(),1),dc=l(N(),1),Ws=l(A(),1),GT=l(F(),1),Dee=l(R(),1);var Ao=l(w(),1),{Menu:Vm}=M(Ws.privateApis);function YBe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Ao.jsxs)("fieldset",{className:e,children:[(0,Ao.jsx)(Ws.VisuallyHidden,{as:"legend",children:(0,dc.__)("Transform to variation")}),r.map(n=>(0,Ao.jsx)(Ws.Button,{__next40pxDefaultSize:!0,size:"compact",icon:(0,Ao.jsx)(Ae,{icon:n.icon,showColors:!0}),isPressed:o===n.name,label:o===n.name?n.title:(0,dc.sprintf)((0,dc.__)("Transform to %s"),n.title),onClick:()=>t(n.name),"aria-label":n.title,showTooltip:!0},n.name))]})}function qBe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Ao.jsx)("div",{className:e,children:(0,Ao.jsxs)(Vm,{children:[(0,Ao.jsx)(Vm.TriggerButton,{render:(0,Ao.jsx)(Ws.Button,{className:"block-editor-block-variation-transforms__button",__next40pxDefaultSize:!0,variant:"secondary",children:(0,dc.__)("Transform to variation")})}),(0,Ao.jsx)(Vm.Popover,{position:"bottom",children:(0,Ao.jsx)(Vm.Group,{children:r.map(n=>(0,Ao.jsxs)(Vm.RadioItem,{value:n.name,checked:o===n.name,onChange:()=>t(n.name),children:[(0,Ao.jsx)(Vm.ItemLabel,{children:n.title}),n.description&&(0,Ao.jsx)(Vm.ItemHelpText,{children:n.description})]},n.name))})})]})})}function ZBe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Ao.jsx)("div",{className:e,children:(0,Ao.jsx)(Ws.__experimentalToggleGroupControl,{label:(0,dc.__)("Transform to variation"),value:o,hideLabelFromVision:!0,onChange:t,__next40pxDefaultSize:!0,children:r.map(n=>(0,Ao.jsx)(Ws.__experimentalToggleGroupControlOptionIcon,{icon:(0,Ao.jsx)(Ae,{icon:n.icon,showColors:!0}),value:n.name,label:o===n.name?n.title:(0,dc.sprintf)((0,dc.__)("Transform to %s"),n.title)},n.name))})})}function XBe({blockClientId:e}){let{updateBlockAttributes:t}=(0,GT.useDispatch)(_),{activeBlockVariation:o,variations:r,canEdit:n,isContentOnly:i,isSection:s}=(0,GT.useSelect)(p=>{let{getActiveBlockVariation:g,getBlockVariations:b}=p(p3.store),{getBlockName:v,getBlockAttributes:k,getBlockEditingMode:y,isSectionBlock:S}=M(p(_)),{canEditBlock:x}=p(_),C=e&&v(e),{hasContentRoleAttribute:B}=M(p(p3.store)),I=B(C);return{activeBlockVariation:g(C,k(e),"transform"),variations:C&&b(C,"transform"),canEdit:x(e),isContentOnly:y(e)==="contentOnly"&&!I,isSection:S(e)}},[e]),a=o?.name,c=(0,Dee.useMemo)(()=>{let p=new Set;return r?(r.forEach(g=>{g.icon&&p.add(g.icon?.src||g.icon)}),p.size===r.length):!1},[r]),u=p=>{t(e,{...r.find(({name:g})=>g===p).attributes})};if(!r?.length||!n||i||s)return null;let d="block-editor-block-variation-transforms",m=r.length>6?YBe:ZBe;return(0,Ao.jsx)(c?m:qBe,{className:d,onSelectVariation:u,selectedValue:a,variations:r})}var WT=XBe;var Fm=l(N(),1),$T=l(A(),1);var Vee=l(w(),1),h3={top:{icon:bL,title:(0,Fm._x)("Align top","Block vertical alignment setting")},center:{icon:sL,title:(0,Fm._x)("Align middle","Block vertical alignment setting")},bottom:{icon:nL,title:(0,Fm._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:pL,title:(0,Fm._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:dL,title:(0,Fm._x)("Space between","Block vertical alignment setting")}},QBe=["top","center","bottom"],JBe="top";function eEe({value:e,onChange:t,controls:o=QBe,isCollapsed:r=!0,isToolbar:n}){function i(d){return()=>t(e===d?void 0:d)}let s=h3[e],a=h3[JBe],c=n?$T.ToolbarGroup:$T.ToolbarDropdownMenu,u=n?{isCollapsed:r}:{};return(0,Vee.jsx)(c,{icon:s?s.icon:a.icon,label:(0,Fm._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map(d=>({...h3[d],isActive:e===d,role:r?"menuitemradio":void 0,onClick:i(d)})),...u})}var g3=eEe;var b3=l(w(),1),iC=e=>(0,b3.jsx)(g3,{...e,isToolbar:!1}),Fee=e=>(0,b3.jsx)(g3,{...e,isToolbar:!0});var Bn=l(A(),1),VS=l(R(),1),qT=l(N(),1);var zee=l(A(),1);var k3=l(N(),1),jee=l(w(),1);function Uee({isLinked:e,...t}){let o=e?(0,k3.__)("Unlink radii"):(0,k3.__)("Link radii");return(0,jee.jsx)(zee.Button,{...t,className:"components-border-radius-control__linked-button",size:"small",icon:e?fn:Ci,iconSize:24,label:o})}var Hee=l(A(),1);function tEe(e){return[...e].sort((o,r)=>e.filter(n=>n===r).length-e.filter(n=>n===o).length).shift()}function Gee(e={}){if(typeof e=="string")return e;let t=Object.values(e).map(a=>{let c=(0,Hee.__experimentalParseQuantityAndUnitFromRawValue)(a);return typeof a=="string"&&c[0]===void 0?[a,""]:c}),o=t.map(a=>a[0]??""),r=t.map(a=>a[1]),n=o.every(a=>a===o[0])?o[0]:"",i=tEe(r);return n===0||n?`${n}${i||""}`:void 0}function Wee(e={}){if(typeof e=="string"||!e||typeof e!="object")return!1;let t=Object.values(e);if(t.length===0)return!1;let o=t[0];return!t.every(n=>n===o)}function $ee(e){return e?typeof e=="string"?!0:!!Object.values(e).filter(o=>!!o||o===0).length:!1}var Qi=l(A(),1),Qee=l(Z(),1),yd=l(N(),1);var zm=l(R(),1);var v3=24,Kee=8,KT={px:{max:300,steps:1},"%":{max:100,steps:1},vw:{max:100,steps:1},vh:{max:100,steps:1},em:{max:10,steps:.1},rem:{max:10,steps:.1},svw:{max:100,steps:1},lvw:{max:100,steps:1},dvw:{max:100,steps:1},svh:{max:100,steps:1},lvh:{max:100,steps:1},dvh:{max:100,steps:1},vi:{max:100,steps:1},svi:{max:100,steps:1},lvi:{max:100,steps:1},dvi:{max:100,steps:1},vb:{max:100,steps:1},svb:{max:100,steps:1},lvb:{max:100,steps:1},dvb:{max:100,steps:1},vmin:{max:100,steps:1},svmin:{max:100,steps:1},lvmin:{max:100,steps:1},dvmin:{max:100,steps:1},vmax:{max:100,steps:1},svmax:{max:100,steps:1},lvmax:{max:100,steps:1},dvmax:{max:100,steps:1}};var vd=(e,t)=>e?.includes?e==="0"||e.includes(`var:preset|${t}|`):!1;function Yee(e,t){if(!e)return;if(e==="0"||e==="default")return e;let o=e.match(new RegExp(`var:preset\\|${t}\\|(.+)`));return o?o[1]:void 0}function qee(e,t,o){if(e===void 0)return 0;let r=parseFloat(e,10)===0?"0":Yee(e,o),n=t.findIndex(i=>String(i.slug)===r);return n!==-1?n:NaN}function y3(e,t,o){if(!vd(e,o))return e;let r=parseFloat(e,10)===0?"0":Yee(e,o);return t.find(i=>String(i.slug)===r)?.size}function Zee(e,t,o){if(!e||vd(e,o)||e==="0")return e;let r=t.find(n=>String(n.size)===String(e));return r?.slug?`var:preset|${o}|${r.slug}`:e}var ob=l(A(),1),fc=l(w(),1);function Xee({allowNegativeOnDrag:e,ariaLabel:t,allPlaceholder:o,minValue:r,parsedQuantity:n,computedUnit:i,units:s,isMixed:a,step:c,max:u,showTooltip:d,value:f,minimumCustomValue:m,onCustomValueChange:h,onCustomValueSliderChange:p,onUnitChange:g,onMouseOut:b,onMouseOver:v,setMinValue:k}){let y=(0,fc.jsx)(ob.__experimentalUnitControl,{className:"preset-input-control__unit-control",disableUnits:a,hideLabelFromVision:!0,label:t,min:r,onChange:h,onUnitChange:g,onBlur:b,onFocus:v,onMouseOut:b,onMouseOver:v,size:"__unstable-large",units:s,value:[n,i].join(""),placeholder:o,onDragStart:()=>{e&&f?.charAt(0)==="-"&&k(0)},onDrag:()=>{e&&f?.charAt(0)==="-"&&k(0)},onDragEnd:()=>{e&&k(m)}});return(0,fc.jsxs)(fc.Fragment,{children:[d?(0,fc.jsx)(ob.Tooltip,{text:t,placement:"top",children:(0,fc.jsx)("div",{className:"preset-input-control__tooltip-wrapper",children:y})}):y,(0,fc.jsx)(ob.RangeControl,{className:"preset-input-control__custom-value-range",hideLabelFromVision:!0,initialPosition:0,label:t,max:u,min:0,onBlur:b,onChange:p,onFocus:v,onMouseOut:b,onMouseOver:v,step:c,value:n,withInputField:!1,__next40pxDefaultSize:!0})]})}var Sd=l(w(),1);function jm({allowNegativeOnDrag:e=!1,ariaLabel:t,className:o,customValueSettings:r=KT,disableCustomValues:n,icon:i,isMixed:s,value:a,minimumCustomValue:c,onChange:u,onMouseOut:d,onMouseOver:f,onUnitChange:m,presets:h=[],presetType:p,selectedUnit:g,showTooltip:b,units:v}){let k=(0,zm.useMemo)(()=>Zee(a,h,p),[a,h,p]),y=o??"preset-input-control",S=h.slice(1,h.length-1).map((K,H)=>({value:H+1,label:void 0})),x=S.length>0,C=h.length<=Kee,B=s?(0,yd.__)("Mixed"):null,[I,P]=(0,zm.useState)(c),[E,L]=(0,zm.useState)(!n&&k!==void 0&&!vd(k,p)),T=null,O=(0,Qee.usePrevious)(k);(0,zm.useEffect)(()=>{k&&O!==k&&!vd(k,p)&&E!==!0&&L(!0)},[k,O,p,E]);let D=!C&&!E&&k!==void 0&&(!vd(k,p)||vd(k,p)&&s),U=h;D?(U=[...h,{name:s?(0,yd.__)("Mixed"):(0,yd.sprintf)((0,yd.__)("Custom (%s)"),k),slug:"custom",size:k}],T=U.length-1):s||(T=E?y3(k,h,p):qee(k,h,p));let G=U.map((K,H)=>({key:H,name:K.name})),j=vd(k,p)?y3(k,h,p):k,[z,W]=(0,Qi.__experimentalParseQuantityAndUnitFromRawValue)(j),ee=W||g||"px",se=v?.find(K=>K.value===ee),ce=se?.step??r[ee]?.steps??.1,ie=se?.max??r[ee]?.max??10,re=K=>{let X=!isNaN(parseFloat(K))?K:void 0;X!==void 0&&u(X)},Q=K=>{u([K,ee].join(""))},Y=K=>k===void 0?void 0:h[K]?.name,J=(K,H)=>{let X=parseInt(K,10);if(H==="selectList"){if(X===0&&h[0]?.slug==="0")return"0";if(X===0)return}else if(X===0)return"0";return`var:preset|${p}|${h[K]?.slug}`};return(0,Sd.jsxs)(Qi.__experimentalHStack,{className:`preset-input-control__wrapper ${y}__wrapper`,children:[i&&(0,Sd.jsx)(Qi.Icon,{className:"preset-input-control__icon",icon:i,size:v3}),(!x||E)&&(0,Sd.jsx)(Xee,{allowNegativeOnDrag:e,ariaLabel:t,allPlaceholder:B,minValue:I,parsedQuantity:z,computedUnit:ee,units:v,isMixed:s,step:ce,max:ie,showTooltip:b,value:k,minimumCustomValue:c,onCustomValueChange:re,onCustomValueSliderChange:Q,onUnitChange:m,onMouseOut:d,onMouseOver:f,setMinValue:P}),x&&C&&!E&&(0,Sd.jsx)(Qi.RangeControl,{"aria-valuenow":T,"aria-valuetext":h[T]?.name,className:"preset-input-control__preset-range",hideLabelFromVision:!0,initialPosition:0,label:t,max:h.length-1,marks:S,min:0,onBlur:d,onChange:K=>u(J(K)),onFocus:f,onMouseDown:K=>{K?.nativeEvent?.offsetX<35&&k===void 0&&u("0")},onMouseOut:d,onMouseOver:f,renderTooltipContent:Y,step:1,value:T,withInputField:!1,__next40pxDefaultSize:!0}),x&&!C&&!E&&(0,Sd.jsx)(Qi.CustomSelectControl,{className:"preset-input-control__custom-select-control",hideLabelFromVision:!0,label:t,onBlur:d,onChange:K=>{D&&K.selectedItem.key===G.length-1?L(!0):u(J(K.selectedItem.key,"selectList"))},onFocus:f,onMouseOut:d,onMouseOver:f,options:G,size:"__unstable-large",value:G.find(K=>K.key===T)||""}),x&&!n&&(0,Sd.jsx)(Qi.Button,{className:"preset-input-control__custom-toggle",icon:rN,iconSize:v3,isPressed:E,label:E?(0,yd.__)("Use preset"):(0,yd.__)("Set custom value"),onClick:()=>{L(!E)},size:"small"})]})}var rb=l(N(),1);var Jee=8,YT=[],S3={all:(0,rb.__)("Border radius"),topLeft:(0,rb.__)("Top left"),topRight:(0,rb.__)("Top right"),bottomLeft:(0,rb.__)("Bottom left"),bottomRight:(0,rb.__)("Bottom right")},_3={all:aA,topLeft:uA,topRight:dA,bottomLeft:lA,bottomRight:cA},x3=0;var mc=l(w(),1);function oEe(e){let t=e?.default??YT,o=e?.custom??YT,r=e?.theme??YT;return(0,VS.useMemo)(()=>{let n=[{name:(0,qT.__)("None"),slug:"0",size:0},...o,...r,...t];return n.length>Jee?[{name:(0,qT.__)("Default"),slug:"default",size:void 0},...n]:n},[o,r,t])}function ete(e,t){return t==="all"?Gee(e):typeof e=="string"?e:e?.[t]}function tte(e,t){return t==="all"?e.flat:e[t]}function ote(e,t,o){return r=>{o(e==="all"?{topLeft:r,topRight:r,bottomLeft:r,bottomRight:r}:{...typeof t!="string"?t||{}:{topLeft:t,topRight:t,bottomLeft:t,bottomRight:t},[e]:r})}}function rte(e,t,o){return r=>{let n={...t};e==="all"?(n.flat=r,n.topLeft=r,n.topRight=r,n.bottomLeft=r,n.bottomRight=r):n[e]=r,o(n)}}function ZT({onChange:e,values:t,presets:o}){let[r,n]=(0,VS.useState)(!$ee(t)||!Wee(t)),i=oEe(o),[s,a]=(0,VS.useState)({flat:typeof t=="string"?(0,Bn.__experimentalParseQuantityAndUnitFromRawValue)(t)[1]:void 0,topLeft:(0,Bn.__experimentalParseQuantityAndUnitFromRawValue)(t?.topLeft)[1],topRight:(0,Bn.__experimentalParseQuantityAndUnitFromRawValue)(t?.topRight)[1],bottomLeft:(0,Bn.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomLeft)[1],bottomRight:(0,Bn.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomRight)[1]}),[c]=me("spacing.units"),u=(0,Bn.__experimentalUseCustomUnits)({availableUnits:c||["px","em","rem"]}),d=()=>n(!r);return(0,mc.jsxs)("fieldset",{className:"components-border-radius-control",children:[(0,mc.jsxs)(Bn.__experimentalHStack,{className:"components-border-radius-control__header",children:[(0,mc.jsx)(Bn.BaseControl.VisualLabel,{as:"legend",children:(0,qT.__)("Radius")}),(0,mc.jsx)(Uee,{onClick:d,isLinked:r})]}),r?(0,mc.jsx)(jm,{ariaLabel:S3.all,className:"components-border-radius-control",icon:_3.all,minimumCustomValue:x3,onChange:ote("all",t,e),onUnitChange:rte("all",s,a),presets:i,presetType:"border-radius",selectedUnit:tte(s,"all"),showTooltip:!0,units:u,value:ete(t,"all")}):(0,mc.jsx)(Bn.__experimentalVStack,{children:["topLeft","topRight","bottomLeft","bottomRight"].map(f=>(0,mc.jsx)(jm,{ariaLabel:S3[f],className:"components-border-radius-control",icon:_3[f],minimumCustomValue:x3,onChange:ote(f,t,e),onUnitChange:rte(f,s,a),presets:i,presetType:"border-radius",selectedUnit:tte(s,f),showTooltip:!0,units:u,value:ete(t,f)},f))})]})}var ste=l(A(),1);var nte=l(Z(),1);var ite=l(w(),1),XT=(0,nte.createHigherOrderComponent)(e=>function(o){let[r,n,i,s,a]=me("color.palette.default","color.palette.theme","color.palette.custom","color.custom","color.defaultPalette"),c=a?[...n||[],...r||[],...i||[]]:[...n||[],...i||[]],{colors:u=c,disableCustomColors:d=!s}=o,f=u&&u.length>0||!d;return(0,ite.jsx)(e,{...o,colors:u,disableCustomColors:d,hasColorsToChoose:f})},"withColorContext");var ate=XT(ste.ColorPalette);var w3=l(N(),1),$s=l(A(),1);var yo=l(w(),1),{Tabs:nb}=M($s.privateApis),rEe=["colors","disableCustomColors","gradients","disableCustomGradients"],Va={color:"color",gradient:"gradient"};function lte({colors:e,gradients:t,disableCustomColors:o,disableCustomGradients:r,__experimentalIsRenderedInSidebar:n,className:i,label:s,onColorChange:a,onGradientChange:c,colorValue:u,gradientValue:d,clearable:f,showTitle:m=!0,enableAlpha:h,headingLevel:p}){let g=a&&(e&&e.length>0||!o),b=c&&(t&&t.length>0||!r);if(!g&&!b)return null;let v={[Va.color]:(0,yo.jsx)($s.ColorPalette,{value:u,onChange:b?y=>{a(y),c()}:a,colors:e,disableCustomColors:o,__experimentalIsRenderedInSidebar:n,clearable:f,enableAlpha:h,headingLevel:p}),[Va.gradient]:(0,yo.jsx)($s.GradientPicker,{value:d,onChange:g?y=>{c(y),a()}:c,gradients:t,disableCustomGradients:r,__experimentalIsRenderedInSidebar:n,clearable:f,headingLevel:p})},k=y=>(0,yo.jsx)("div",{className:"block-editor-color-gradient-control__panel",children:v[y]});return(0,yo.jsx)($s.BaseControl,{className:V("block-editor-color-gradient-control",i),children:(0,yo.jsx)("fieldset",{className:"block-editor-color-gradient-control__fieldset",children:(0,yo.jsxs)($s.__experimentalVStack,{spacing:1,children:[m&&(0,yo.jsx)("legend",{children:(0,yo.jsx)("div",{className:"block-editor-color-gradient-control__color-indicator",children:(0,yo.jsx)($s.BaseControl.VisualLabel,{children:s})})}),g&&b&&(0,yo.jsx)("div",{children:(0,yo.jsxs)(nb,{defaultTabId:d?Va.gradient:!!g&&Va.color,children:[(0,yo.jsxs)(nb.TabList,{children:[(0,yo.jsx)(nb.Tab,{tabId:Va.color,children:(0,w3.__)("Color")}),(0,yo.jsx)(nb.Tab,{tabId:Va.gradient,children:(0,w3.__)("Gradient")})]}),(0,yo.jsx)(nb.TabPanel,{tabId:Va.color,className:"block-editor-color-gradient-control__panel",focusable:!1,children:v.color}),(0,yo.jsx)(nb.TabPanel,{tabId:Va.gradient,className:"block-editor-color-gradient-control__panel",focusable:!1,children:v.gradient})]})}),!b&&k(Va.color),!g&&k(Va.gradient)]})})})}function nEe(e){let[t,o,r,n]=me("color.palette","color.gradients","color.custom","color.customGradient");return(0,yo.jsx)(lte,{colors:t,gradients:o,disableCustomColors:!r,disableCustomGradients:!n,...e})}function iEe(e){return rEe.every(t=>e.hasOwnProperty(t))?(0,yo.jsx)(lte,{...e}):(0,yo.jsx)(nEe,{...e})}var _d=iEe;var cte=l(w(),1);function ute({onChange:e,value:t,...o}){return(0,cte.jsx)(_d,{...o,onColorChange:e,colorValue:t,gradients:[],disableCustomGradients:!0})}var Ks=l(N(),1),dte=l(A(),1),fte=l(Xo(),1),C3=l(w(),1);Kc([Yc,Op]);function sEe({backgroundColor:e,fallbackBackgroundColor:t,fallbackTextColor:o,fallbackLinkColor:r,fontSize:n,isLargeText:i,textColor:s,linkColor:a,enableAlphaChecker:c=!1}){let u=e||t;if(!u)return null;let d=s||o,f=a||r;if(!d&&!f)return null;let m=[{color:d,description:(0,Ks.__)("text color")},{color:f,description:(0,Ks.__)("link color")}],h=Bt(u),p=h.alpha()<1,g=h.brightness(),b={level:"AA",size:i||i!==!1&&n>=24?"large":"small"},v="",k="";for(let y of m){if(!y.color)continue;let S=Bt(y.color),x=S.isReadable(h,b),C=S.alpha()<1;if(!x){if(p||C)continue;v=g<S.brightness()?(0,Ks.sprintf)((0,Ks.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s."),y.description):(0,Ks.sprintf)((0,Ks.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker %s."),y.description),k=(0,Ks.__)("This color combination may be hard for people to read.");break}C&&c&&(v=(0,Ks.__)("Transparent text may be hard for people to read."),k=(0,Ks.__)("Transparent text may be hard for people to read."))}return v?((0,fte.speak)(k),(0,C3.jsx)("div",{className:"block-editor-contrast-checker",children:(0,C3.jsx)(dte.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:v})})):null}var QT=sEe;var br=l(N(),1),FS=l(pc(),1),JT=l(R(),1),ai=l(A(),1),Fa=l(w(),1),xd=new Date;xd.setDate(20);xd.setMonth(xd.getMonth()-3);xd.getMonth()===4&&xd.setMonth(3);function pte({format:e,defaultFormat:t,onChange:o}){return(0,Fa.jsxs)(ai.__experimentalVStack,{as:"fieldset",spacing:4,className:"block-editor-date-format-picker",children:[(0,Fa.jsx)(ai.VisuallyHidden,{as:"legend",children:(0,br.__)("Date format")}),(0,Fa.jsx)(ai.ToggleControl,{label:(0,br.__)("Default format"),help:`${(0,br.__)("Example:")}  ${(0,FS.dateI18n)(t,xd)}`,checked:!e,onChange:r=>o(r?null:t)}),e&&(0,Fa.jsx)(aEe,{format:e,onChange:o})]})}function aEe({format:e,onChange:t}){let r=[...[...new Set(["Y-m-d",(0,br._x)("n/j/Y","short date format"),(0,br._x)("n/j/Y g:i A","short date format with time"),(0,br._x)("M j, Y","medium date format"),(0,br._x)("M j, Y g:i A","medium date format with time"),(0,br._x)("F j, Y","long date format"),(0,br._x)("M j","short date format without the year")])].map((a,c)=>({key:`suggested-${c}`,name:(0,FS.dateI18n)(a,xd),format:a})),{key:"human-diff",name:(0,FS.humanTimeDiff)(xd),format:"human-diff"}],n={key:"custom",name:(0,br.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",hint:(0,br.__)("Enter your own date format")},[i,s]=(0,JT.useState)(()=>!!e&&!r.some(a=>a.format===e));return(0,Fa.jsxs)(ai.__experimentalVStack,{children:[(0,Fa.jsx)(ai.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,br.__)("Choose a format"),options:[...r,n],value:i?n:r.find(a=>a.format===e)??n,onChange:({selectedItem:a})=>{a===n?s(!0):(s(!1),t(a.format))}}),i&&(0,Fa.jsx)(ai.TextControl,{__next40pxDefaultSize:!0,label:(0,br.__)("Custom format"),hideLabelFromVision:!0,help:(0,JT.createInterpolateElement)((0,br.__)("Enter a date or time <Link>format string</Link>."),{Link:(0,Fa.jsx)(ai.ExternalLink,{href:(0,br.__)("https://wordpress.org/documentation/article/customize-date-and-time-format/")})}),value:e,onChange:a=>t(a)})]})}var Ji=l(A(),1),zS=l(N(),1),hte=l(it(),1);var gte=l(Z(),1),za=l(w(),1);function bte({id:e,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s}){let a;i==="unset"?a=(0,za.jsx)(Ji.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):i?a=(0,za.jsx)(Ji.DuotoneSwatch,{values:i}):a=(0,za.jsx)(we,{icon:xA});let c=(0,zS.__)("Apply duotone filter"),d=`${(0,gte.useInstanceId)(bte,"duotone-control",e)}__description`;return(0,za.jsx)(Ji.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,zS.__)("Duotone")},renderToggle:({isOpen:f,onToggle:m})=>(0,za.jsx)(Ji.ToolbarButton,{showTooltip:!0,onClick:m,"aria-haspopup":"true","aria-expanded":f,onKeyDown:p=>{!f&&p.keyCode===hte.DOWN&&(p.preventDefault(),m())},label:c,icon:a}),renderContent:()=>(0,za.jsxs)(Ji.MenuGroup,{label:(0,zS.__)("Duotone"),children:[(0,za.jsx)("p",{children:(0,zS.__)("Create a two-tone color effect without losing your original image.")}),(0,za.jsx)(Ji.DuotonePicker,{"aria-label":c,"aria-describedby":d,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s})]})})}var eI=bte;var Ste=l(A(),1),_te=l(Re(),1),xte=l(R(),1),li=l(N(),1);var tr=l(N(),1);var tI=l(N(),1);function kte(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":t=(0,tI._x)("Regular","font style");break;case"italic":t=(0,tI._x)("Italic","font style");break;case"oblique":t=(0,tI._x)("Oblique","font style");break;default:t=e;break}return{name:t,value:e}}var Ys=l(N(),1);function B3(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":case"400":t=(0,Ys._x)("Regular","font weight");break;case"bold":case"700":t=(0,Ys._x)("Bold","font weight");break;case"100":t=(0,Ys._x)("Thin","font weight");break;case"200":t=(0,Ys._x)("Extra Light","font weight");break;case"300":t=(0,Ys._x)("Light","font weight");break;case"500":t=(0,Ys._x)("Medium","font weight");break;case"600":t=(0,Ys._x)("Semi Bold","font weight");break;case"800":t=(0,Ys._x)("Extra Bold","font weight");break;case"900":t=(0,Ys._x)("Black","font weight");break;case"1000":t=(0,Ys._x)("Extra Black","font weight");break;default:t=e;break}return{name:t,value:e}}var vte=[{name:(0,tr._x)("Regular","font style"),value:"normal"},{name:(0,tr._x)("Italic","font style"),value:"italic"}],yte=[{name:(0,tr._x)("Thin","font weight"),value:"100"},{name:(0,tr._x)("Extra Light","font weight"),value:"200"},{name:(0,tr._x)("Light","font weight"),value:"300"},{name:(0,tr._x)("Regular","font weight"),value:"400"},{name:(0,tr._x)("Medium","font weight"),value:"500"},{name:(0,tr._x)("Semi Bold","font weight"),value:"600"},{name:(0,tr._x)("Bold","font weight"),value:"700"},{name:(0,tr._x)("Extra Bold","font weight"),value:"800"},{name:(0,tr._x)("Black","font weight"),value:"900"},{name:(0,tr._x)("Extra Black","font weight"),value:"1000"}];function ib(e){let t=[],o=[],r=[],n=!e||e?.length===0,i=!1;return e?.forEach(s=>{if(typeof s.fontWeight=="string"&&/\s/.test(s.fontWeight.trim())){i=!0;let[u,d]=s.fontWeight.split(" ");u=parseInt(u.slice(0,1)),d==="1000"?d=10:d=parseInt(d.slice(0,1));for(let f=u;f<=d;f++){let m=`${f.toString()}00`;o.some(h=>h.value===m)||o.push(B3(m))}}let a=B3(typeof s.fontWeight=="number"?s.fontWeight.toString():s.fontWeight),c=kte(s.fontStyle);c&&Object.keys(c).length&&(t.some(u=>u.value===c.value)||t.push(c)),a&&Object.keys(a).length&&(o.some(u=>u.value===a.value)||i||o.push(a))}),o.some(s=>s.value>="600")||o.push({name:(0,tr._x)("Bold","font weight"),value:"700"}),t.some(s=>s.value==="italic")||t.push({name:(0,tr._x)("Italic","font style"),value:"italic"}),n&&(t=vte,o=yte),t=t.length===0?vte:t,o=o.length===0?yte:o,t.forEach(({name:s,value:a})=>{o.forEach(({name:c,value:u})=>{let d=a==="normal"?c:(0,tr.sprintf)((0,tr._x)("%1$s %2$s","font"),c,s);r.push({key:`${a}-${u}`,name:d,style:{fontStyle:a,fontWeight:u}})})}),{fontStyles:t,fontWeights:o,combinedStyleAndWeightOptions:r,isSystemFont:n,isVariableFont:i}}var wte=l(w(),1),lEe=(e,t)=>e?t?(0,li.__)("Appearance"):(0,li.__)("Font style"):(0,li.__)("Font weight");function oI(e){let{__next40pxDefaultSize:t=!1,onChange:o,hasFontStyles:r=!0,hasFontWeights:n=!0,fontFamilyFaces:i,value:{fontStyle:s,fontWeight:a},...c}=e,u=r||n,d=lEe(r,n),f={key:"default",name:(0,li.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},{fontStyles:m,fontWeights:h,combinedStyleAndWeightOptions:p}=ib(i),g=()=>{let x=[f];return p&&x.push(...p),x},b=()=>{let x=[f];return m.forEach(({name:C,value:B})=>{x.push({key:B,name:C,style:{fontStyle:B,fontWeight:void 0}})}),x},v=()=>{let x=[f];return h.forEach(({name:C,value:B})=>{x.push({key:B,name:C,style:{fontStyle:void 0,fontWeight:B}})}),x},k=(0,xte.useMemo)(()=>r&&n?g():r?b():v(),[e.options,m,h,p]),y=k.find(x=>x.style.fontStyle===s&&x.style.fontWeight===a)||k[0],S=()=>y?r?n?(0,li.sprintf)((0,li.__)("Currently selected font appearance: %s"),y.name):(0,li.sprintf)((0,li.__)("Currently selected font style: %s"),y.name):(0,li.sprintf)((0,li.__)("Currently selected font weight: %s"),y.name):(0,li.__)("No selected font appearance");return!t&&(c.size===void 0||c.size==="default")&&(0,_te.default)("36px default size for wp.blockEditor.__experimentalFontAppearanceControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),u&&(0,wte.jsx)(Ste.CustomSelectControl,{...c,className:"components-font-appearance-control",__next40pxDefaultSize:t,__shouldNotWarnDeprecated36pxSize:!0,label:d,describedBy:S(),options:k,value:y,onChange:({selectedItem:x})=>o(x.style)})}var Cte=l(A(),1),Bte=l(Re(),1),E3=l(N(),1);var Ete=l(w(),1);function rI({__next40pxDefaultSize:e=!1,value:t="",onChange:o,fontFamilies:r,className:n,...i}){let[s]=me("typography.fontFamilies");if(r||(r=s),!r||r.length===0)return null;let a=[{key:"",name:(0,E3.__)("Default")},...r.map(({fontFamily:u,name:d})=>({key:u,name:d||u,style:{fontFamily:u}}))];!e&&(i.size===void 0||i.size==="default")&&(0,Bte.default)("36px default size for wp.blockEditor.__experimentalFontFamilyControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."});let c=a.find(u=>u.key===t)??"";return(0,Ete.jsx)(Cte.CustomSelectControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,E3.__)("Font"),value:c,onChange:({selectedItem:u})=>o(u.key),options:a,className:V("block-editor-font-family-control",n),...i})}var nI=l(A(),1),Tte=l(Re(),1),Ite=l(N(),1);var Pte=l(w(),1);function iI({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",...n}){let[i]=me("spacing.units"),s=(0,nI.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return!e&&(n.size===void 0||n.size==="default")&&(0,Tte.default)("36px default size for wp.blockEditor.__experimentalLetterSpacingControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),(0,Pte.jsx)(nI.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...n,label:(0,Ite.__)("Letter spacing"),value:t,__unstableInputWidth:r,units:s,onChange:o})}var jS=l(N(),1),sI=l(A(),1),T3=l(w(),1),cEe=[{label:(0,jS.__)("None"),value:"none",icon:Dr},{label:(0,jS.__)("Underline"),value:"underline",icon:RA},{label:(0,jS.__)("Strikethrough"),value:"line-through",icon:IA}];function aI({value:e,onChange:t,className:o}){return(0,T3.jsx)(sI.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,jS.__)("Decoration"),className:V("block-editor-text-decoration-control",o),value:e,onChange:r=>{t(r===e?void 0:r)},children:cEe.map(r=>(0,T3.jsx)(sI.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var sb=l(N(),1);var lI=l(A(),1),I3=l(w(),1),uEe=[{label:(0,sb.__)("None"),value:"none",icon:Dr},{label:(0,sb.__)("Uppercase"),value:"uppercase",icon:AA},{label:(0,sb.__)("Lowercase"),value:"lowercase",icon:EA},{label:(0,sb.__)("Capitalize"),value:"capitalize",icon:CA}];function cI({className:e,value:t,onChange:o}){return(0,I3.jsx)(lI.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,sb.__)("Letter case"),className:V("block-editor-text-transform-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:uEe.map(r=>(0,I3.jsx)(lI.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var ab=l(N(),1);var uI=l(A(),1),P3=l(w(),1),dEe=[{label:(0,ab.__)("Horizontal"),value:"horizontal-tb",icon:CN},{label:(0,ab.__)("Vertical"),value:(0,ab.isRTL)()?"vertical-lr":"vertical-rl",icon:EN}];function dI({className:e,value:t,onChange:o}){return(0,P3.jsx)(uI.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,ab.__)("Orientation"),className:V("block-editor-writing-mode-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:dEe.map(r=>(0,P3.jsx)(uI.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var Xr=l(A(),1),Rte=l(R(),1),Ote=l(N(),1);var Uo=l(w(),1),fEe=({setting:e,children:t,panelId:o,...r})=>{let n=()=>{e.colorValue?e.onColorChange():e.gradientValue&&e.onGradientChange()};return(0,Uo.jsx)(Xr.__experimentalToolsPanelItem,{hasValue:()=>!!e.colorValue||!!e.gradientValue,label:e.label,onDeselect:n,isShownByDefault:e.isShownByDefault!==void 0?e.isShownByDefault:!0,...r,className:"block-editor-tools-panel-color-gradient-settings__item",panelId:o,resetAllFilter:e.resetAllFilter,children:t})},mEe=({colorValue:e,label:t})=>(0,Uo.jsxs)(Xr.__experimentalHStack,{justify:"flex-start",children:[(0,Uo.jsx)(Xr.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:e}),(0,Uo.jsx)(Xr.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:t,children:t})]}),pEe=e=>function({onToggle:o,isOpen:r}){let{clearable:n,colorValue:i,gradientValue:s,onColorChange:a,onGradientChange:c,label:u}=e,d=(0,Rte.useRef)(void 0),f={onClick:o,className:V("block-editor-panel-color-gradient-settings__dropdown",{"is-open":r}),"aria-expanded":r,ref:d},m=()=>{i?a():s&&c()},h=i??s;return(0,Uo.jsxs)(Uo.Fragment,{children:[(0,Uo.jsx)(Xr.Button,{__next40pxDefaultSize:!0,...f,children:(0,Uo.jsx)(mEe,{colorValue:h,label:u})}),n&&h&&(0,Uo.jsx)(Xr.Button,{__next40pxDefaultSize:!0,label:(0,Ote.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:Dr,onClick:()=>{m(),r&&o(),d.current?.focus()}})]})};function fI({colors:e,disableCustomColors:t,disableCustomGradients:o,enableAlpha:r,gradients:n,settings:i,__experimentalIsRenderedInSidebar:s,...a}){let c;return s&&(c={placement:"left-start",offset:36,shift:!0}),(0,Uo.jsx)(Uo.Fragment,{children:i.map((u,d)=>{let f={clearable:!1,colorValue:u.colorValue,colors:e,disableCustomColors:t,disableCustomGradients:o,enableAlpha:r,gradientValue:u.gradientValue,gradients:n,label:u.label,onColorChange:u.onColorChange,onGradientChange:u.onGradientChange,showTitle:!1,__experimentalIsRenderedInSidebar:s,...u},m={clearable:u.clearable,label:u.label,colorValue:u.colorValue,gradientValue:u.gradientValue,onColorChange:u.onColorChange,onGradientChange:u.onGradientChange};return u&&(0,Uo.jsx)(fEe,{setting:u,...a,children:(0,Uo.jsx)(Xr.Dropdown,{popoverProps:c,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:pEe(m),renderContent:()=>(0,Uo.jsx)(Xr.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,Uo.jsx)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:(0,Uo.jsx)(_d,{...f})})})})},d)})})}var mI=l(A(),1),Ate=l(F(),1),Lte=l(Z(),1);var R3=l(R(),1),Um=l(N(),1);function wd(){let[e,t,o,r,n,i,s,a,c,u]=me("color.custom","color.palette.custom","color.palette.theme","color.palette.default","color.defaultPalette","color.customGradient","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients"),d={disableCustomColors:!e,disableCustomGradients:!i};return d.colors=(0,R3.useMemo)(()=>{let f=[];return o&&o.length&&f.push({name:(0,Um._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",colors:o}),n&&r&&r.length&&f.push({name:(0,Um._x)("Default","Indicates this palette comes from WordPress."),slug:"default",colors:r}),t&&t.length&&f.push({name:(0,Um._x)("Custom","Indicates this palette is created by the user."),slug:"custom",colors:t}),f},[t,o,r,n]),d.gradients=(0,R3.useMemo)(()=>{let f=[];return a&&a.length&&f.push({name:(0,Um._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",gradients:a}),u&&c&&c.length&&f.push({name:(0,Um._x)("Default","Indicates this palette comes from WordPress."),slug:"default",gradients:c}),s&&s.length&&f.push({name:(0,Um._x)("Custom","Indicates this palette is created by the user."),slug:"custom",gradients:s}),f},[s,a,c,u]),d.hasColorsOrGradients=!!d.colors.length||!!d.gradients.length,d}var qs=l(w(),1),hEe=["colors","disableCustomColors","gradients","disableCustomGradients"],O3=({className:e,colors:t,gradients:o,disableCustomColors:r,disableCustomGradients:n,children:i,settings:s,title:a,showTitle:c=!0,__experimentalIsRenderedInSidebar:u,enableAlpha:d})=>{let f=(0,Lte.useInstanceId)(O3),{batch:m}=(0,Ate.useRegistry)();return(!t||t.length===0)&&(!o||o.length===0)&&r&&n&&s?.every(h=>(!h.colors||h.colors.length===0)&&(!h.gradients||h.gradients.length===0)&&(h.disableCustomColors===void 0||h.disableCustomColors)&&(h.disableCustomGradients===void 0||h.disableCustomGradients))?null:(0,qs.jsxs)(mI.__experimentalToolsPanel,{className:V("block-editor-panel-color-gradient-settings",e),label:c?a:void 0,resetAll:()=>{m(()=>{s.forEach(({colorValue:h,gradientValue:p,onColorChange:g,onGradientChange:b})=>{h?g():p&&b()})})},panelId:f,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:[(0,qs.jsx)(fI,{settings:s,panelId:f,colors:t,gradients:o,disableCustomColors:r,disableCustomGradients:n,__experimentalIsRenderedInSidebar:u,enableAlpha:d}),!!i&&(0,qs.jsxs)(qs.Fragment,{children:[(0,qs.jsx)(mI.__experimentalSpacer,{marginY:4})," ",i]})]})},gEe=e=>{let t=wd();return(0,qs.jsx)(O3,{...t,...e})},bEe=e=>hEe.every(t=>e.hasOwnProperty(t))?(0,qs.jsx)(O3,{...e}):(0,qs.jsx)(gEe,{...e}),pI=bEe;var hI=l(R(),1),Hm=l(A(),1),L3=l(N(),1);var US=l(w(),1),A3=[],kEe={...KT,px:{max:1e3,steps:1},em:{max:50,steps:.1},rem:{max:50,steps:.1}};function vEe(e){let t=e?.default??A3,o=e?.custom??A3,r=e?.theme??A3;return(0,hI.useMemo)(()=>[{name:(0,L3.__)("None"),slug:"0",size:0},...o,...r,...t],[o,r,t])}function lb({label:e=(0,L3.__)("Dimension"),onChange:t,value:o}){let[r,n]=me("dimensions.dimensionSizes","spacing.units"),i=(0,Hm.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vh","vw"]}),s=vEe(r),[a,c]=(0,hI.useState)(()=>{let[,d]=(0,Hm.__experimentalParseQuantityAndUnitFromRawValue)(o);return d||i[0]?.value||"px"}),u=d=>{let[f,m]=(0,Hm.__experimentalParseQuantityAndUnitFromRawValue)(o);["em","rem"].includes(d)&&m==="px"?t((f/16).toFixed(2)+d):["em","rem"].includes(m)&&d==="px"?t(Math.round(f*16)+d):["%","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax"].includes(d)&&f>100&&t(100+d),c(d)};return(0,US.jsxs)("fieldset",{className:"block-editor-dimension-control",children:[(0,US.jsx)(Hm.BaseControl.VisualLabel,{as:"legend",children:e}),(0,US.jsx)(jm,{ariaLabel:e,className:"block-editor-dimension-control",customValueSettings:kEe,minimumCustomValue:0,onChange:t,onUnitChange:u,presets:s,presetType:"dimension",selectedUnit:a,showTooltip:!0,units:i,value:o})]})}var Mte=l(R(),1),or=l(A(),1),Dte=l(N(),1),Vte=l(Re(),1);var ja=l(w(),1),Nte={px:{max:1e3,step:1},"%":{max:100,step:1},vw:{max:100,step:1},vh:{max:100,step:1},em:{max:50,step:.1},rem:{max:50,step:.1},svw:{max:100,step:1},lvw:{max:100,step:1},dvw:{max:100,step:1},svh:{max:100,step:1},lvh:{max:100,step:1},dvh:{max:100,step:1},vi:{max:100,step:1},svi:{max:100,step:1},lvi:{max:100,step:1},dvi:{max:100,step:1},vb:{max:100,step:1},svb:{max:100,step:1},lvb:{max:100,step:1},dvb:{max:100,step:1},vmin:{max:100,step:1},svmin:{max:100,step:1},lvmin:{max:100,step:1},dvmin:{max:100,step:1},vmax:{max:100,step:1},svmax:{max:100,step:1},lvmax:{max:100,step:1},dvmax:{max:100,step:1}};function Fte({label:e=(0,Dte.__)("Height"),onChange:t,value:o}){(0,Vte.default)("wp.blockEditor.HeightControl",{since:"7.0",version:"7.2",alternative:"wp.blockEditor.DimensionControl"});let r=parseFloat(o),[n]=me("spacing.units"),i=(0,or.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vh","vw"]}),s=(0,Mte.useMemo)(()=>(0,or.__experimentalParseQuantityAndUnitFromRawValue)(o),[o])[1]||i[0]?.value||"px",a=u=>{t([u,s].join(""))},c=u=>{let[d,f]=(0,or.__experimentalParseQuantityAndUnitFromRawValue)(o);["em","rem"].includes(u)&&f==="px"?t((d/16).toFixed(2)+u):["em","rem"].includes(f)&&u==="px"?t(Math.round(d*16)+u):["%","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax"].includes(u)&&d>100&&t(100+u)};return(0,ja.jsxs)("fieldset",{className:"block-editor-height-control",children:[(0,ja.jsx)(or.BaseControl.VisualLabel,{as:"legend",children:e}),(0,ja.jsxs)(or.Flex,{children:[(0,ja.jsx)(or.FlexItem,{isBlock:!0,children:(0,ja.jsx)(or.__experimentalUnitControl,{value:o,units:i,onChange:t,onUnitChange:c,min:0,size:"__unstable-large",label:e,hideLabelFromVision:!0})}),(0,ja.jsx)(or.FlexItem,{isBlock:!0,children:(0,ja.jsx)(or.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,ja.jsx)(or.RangeControl,{__next40pxDefaultSize:!0,value:r,min:0,max:Nte[s]?.max??100,step:Nte[s]?.step??.1,withInputField:!1,onChange:a,label:e,hideLabelFromVision:!0})})})]})]})}var $S=l(A(),1);var es=l(jr()),doe=l(soe());function wEe(e,t,o,r,n,i){i===void 0&&(i=0);var s=cb(e,t,i),a=s.width,c=s.height,u=Math.min(a,o),d=Math.min(c,r);return u>d*n?{width:d*n,height:d}:{width:u,height:u/n}}function CEe(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function HS(e,t,o,r,n){n===void 0&&(n=0);var i=cb(t.width,t.height,n),s=i.width,a=i.height;return{x:aoe(e.x,s,o.width,r),y:aoe(e.y,a,o.height,r)}}function aoe(e,t,o,r){var n=t*r/2-o/2;return SI(e,-n,n)}function loe(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function coe(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI}function BEe(e,t,o,r,n,i,s){i===void 0&&(i=0),s===void 0&&(s=!0);var a=s?EEe:TEe,c=cb(t.width,t.height,i),u=cb(t.naturalWidth,t.naturalHeight,i),d={x:a(100,((c.width-o.width/n)/2-e.x/n)/c.width*100),y:a(100,((c.height-o.height/n)/2-e.y/n)/c.height*100),width:a(100,o.width/c.width*100/n),height:a(100,o.height/c.height*100/n)},f=Math.round(a(u.width,d.width*u.width/100)),m=Math.round(a(u.height,d.height*u.height/100)),h=u.width>=u.height*r,p=h?{width:Math.round(m*r),height:m}:{width:f,height:Math.round(f/r)},g=Fo(Fo({},p),{x:Math.round(a(u.width-p.width,d.x*u.width/100)),y:Math.round(a(u.height-p.height,d.y*u.height/100))});return{croppedAreaPercentages:d,croppedAreaPixels:g}}function EEe(e,t){return Math.min(e,Math.max(0,t))}function TEe(e,t){return t}function IEe(e,t,o,r,n,i){var s=cb(t.width,t.height,o),a=SI(r.width/s.width*(100/e.width),n,i),c={x:a*s.width/2-r.width/2-s.width*a*(e.x/100),y:a*s.height/2-r.height/2-s.height*a*(e.y/100)};return{crop:c,zoom:a}}function PEe(e,t,o){var r=CEe(t);return o.height>o.width?o.height/(e.height*r):o.width/(e.width*r)}function REe(e,t,o,r,n,i){o===void 0&&(o=0);var s=cb(t.naturalWidth,t.naturalHeight,o),a=SI(PEe(e,t,r),n,i),c=r.height>r.width?r.height/e.height:r.width/e.width,u={x:((s.width-e.width)/2-e.x)*c,y:((s.height-e.height)/2-e.y)*c};return{crop:u,zoom:a}}function uoe(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function OEe(e){return e*Math.PI/180}function cb(e,t,o){var r=OEe(o);return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function SI(e,t,o){return Math.min(Math.max(e,t),o)}function yI(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(o){return typeof o=="string"&&o.length>0}).join(" ").trim()}var AEe=`.reactEasyCrop_Container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  cursor: move;
  display: flex;
  justify-content: center;
  align-items: center;
}

.reactEasyCrop_Image,
.reactEasyCrop_Video {
  will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */
}

.reactEasyCrop_Contain {
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}
.reactEasyCrop_Cover_Horizontal {
  width: 100%;
  height: auto;
}
.reactEasyCrop_Cover_Vertical {
  width: auto;
  height: 100%;
}

.reactEasyCrop_CropArea {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-sizing: border-box;
  box-shadow: 0 0 0 9999em;
  color: rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.reactEasyCrop_CropAreaRound {
  border-radius: 50%;
}

.reactEasyCrop_CropAreaGrid::before {
  content: ' ';
  box-sizing: border-box;
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.5);
  top: 0;
  bottom: 0;
  left: 33.33%;
  right: 33.33%;
  border-top: 0;
  border-bottom: 0;
}

.reactEasyCrop_CropAreaGrid::after {
  content: ' ';
  box-sizing: border-box;
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.5);
  top: 33.33%;
  bottom: 33.33%;
  left: 0;
  right: 0;
  border-left: 0;
  border-right: 0;
}
`,LEe=1,NEe=3,MEe=1,foe=(function(e){IU(t,e);function t(){var o=e!==null&&e.apply(this,arguments)||this;return o.cropperRef=es.createRef(),o.imageRef=es.createRef(),o.videoRef=es.createRef(),o.containerPosition={x:0,y:0},o.containerRef=null,o.styleRef=null,o.containerRect=null,o.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},o.dragStartPosition={x:0,y:0},o.dragStartCrop={x:0,y:0},o.gestureZoomStart=0,o.gestureRotationStart=0,o.isTouching=!1,o.lastPinchDistance=0,o.lastPinchRotation=0,o.rafDragTimeout=null,o.rafPinchTimeout=null,o.wheelTimer=null,o.currentDoc=typeof document<"u"?document:null,o.currentWindow=typeof window<"u"?window:null,o.resizeObserver=null,o.previousCropSize=null,o.isInitialized=!1,o.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},o.initResizeObserver=function(){if(!(typeof window.ResizeObserver>"u"||!o.containerRef)){var r=!0;o.resizeObserver=new window.ResizeObserver(function(n){if(r){r=!1;return}o.computeSizes()}),o.resizeObserver.observe(o.containerRef)}},o.preventZoomSafari=function(r){return r.preventDefault()},o.cleanEvents=function(){o.currentDoc&&(o.currentDoc.removeEventListener("mousemove",o.onMouseMove),o.currentDoc.removeEventListener("mouseup",o.onDragStopped),o.currentDoc.removeEventListener("touchmove",o.onTouchMove),o.currentDoc.removeEventListener("touchend",o.onDragStopped),o.currentDoc.removeEventListener("gesturechange",o.onGestureChange),o.currentDoc.removeEventListener("gestureend",o.onGestureEnd),o.currentDoc.removeEventListener("scroll",o.onScroll))},o.clearScrollEvent=function(){o.containerRef&&o.containerRef.removeEventListener("wheel",o.onWheel),o.wheelTimer&&clearTimeout(o.wheelTimer)},o.onMediaLoad=function(){var r=o.computeSizes();r&&(o.previousCropSize=r,o.emitCropData(),o.setInitialCrop(r),o.isInitialized=!0),o.props.onMediaLoaded&&o.props.onMediaLoaded(o.mediaSize)},o.setInitialCrop=function(r){if(o.props.initialCroppedAreaPercentages){var n=IEe(o.props.initialCroppedAreaPercentages,o.mediaSize,o.props.rotation,r,o.props.minZoom,o.props.maxZoom),i=n.crop,s=n.zoom;o.props.onCropChange(i),o.props.onZoomChange&&o.props.onZoomChange(s)}else if(o.props.initialCroppedAreaPixels){var a=REe(o.props.initialCroppedAreaPixels,o.mediaSize,o.props.rotation,r,o.props.minZoom,o.props.maxZoom),i=a.crop,s=a.zoom;o.props.onCropChange(i),o.props.onZoomChange&&o.props.onZoomChange(s)}},o.computeSizes=function(){var r,n,i,s,a,c,u=o.imageRef.current||o.videoRef.current;if(u&&o.containerRef){o.containerRect=o.containerRef.getBoundingClientRect(),o.saveContainerPosition();var d=o.containerRect.width/o.containerRect.height,f=((r=o.imageRef.current)===null||r===void 0?void 0:r.naturalWidth)||((n=o.videoRef.current)===null||n===void 0?void 0:n.videoWidth)||0,m=((i=o.imageRef.current)===null||i===void 0?void 0:i.naturalHeight)||((s=o.videoRef.current)===null||s===void 0?void 0:s.videoHeight)||0,h=u.offsetWidth<f||u.offsetHeight<m,p=f/m,g=void 0;if(h)switch(o.state.mediaObjectFit){default:case"contain":g=d>p?{width:o.containerRect.height*p,height:o.containerRect.height}:{width:o.containerRect.width,height:o.containerRect.width/p};break;case"horizontal-cover":g={width:o.containerRect.width,height:o.containerRect.width/p};break;case"vertical-cover":g={width:o.containerRect.height*p,height:o.containerRect.height};break}else g={width:u.offsetWidth,height:u.offsetHeight};o.mediaSize=Fo(Fo({},g),{naturalWidth:f,naturalHeight:m}),o.props.setMediaSize&&o.props.setMediaSize(o.mediaSize);var b=o.props.cropSize?o.props.cropSize:wEe(o.mediaSize.width,o.mediaSize.height,o.containerRect.width,o.containerRect.height,o.props.aspect,o.props.rotation);return(((a=o.state.cropSize)===null||a===void 0?void 0:a.height)!==b.height||((c=o.state.cropSize)===null||c===void 0?void 0:c.width)!==b.width)&&o.props.onCropSizeChange&&o.props.onCropSizeChange(b),o.setState({cropSize:b},o.recomputeCropPosition),o.props.setCropSize&&o.props.setCropSize(b),b}},o.saveContainerPosition=function(){if(o.containerRef){var r=o.containerRef.getBoundingClientRect();o.containerPosition={x:r.left,y:r.top}}},o.onMouseDown=function(r){o.currentDoc&&(r.preventDefault(),o.currentDoc.addEventListener("mousemove",o.onMouseMove),o.currentDoc.addEventListener("mouseup",o.onDragStopped),o.saveContainerPosition(),o.onDragStart(t.getMousePoint(r)))},o.onMouseMove=function(r){return o.onDrag(t.getMousePoint(r))},o.onScroll=function(r){o.currentDoc&&(r.preventDefault(),o.saveContainerPosition())},o.onTouchStart=function(r){o.currentDoc&&(o.isTouching=!0,!(o.props.onTouchRequest&&!o.props.onTouchRequest(r))&&(o.currentDoc.addEventListener("touchmove",o.onTouchMove,{passive:!1}),o.currentDoc.addEventListener("touchend",o.onDragStopped),o.saveContainerPosition(),r.touches.length===2?o.onPinchStart(r):r.touches.length===1&&o.onDragStart(t.getTouchPoint(r.touches[0]))))},o.onTouchMove=function(r){r.preventDefault(),r.touches.length===2?o.onPinchMove(r):r.touches.length===1&&o.onDrag(t.getTouchPoint(r.touches[0]))},o.onGestureStart=function(r){o.currentDoc&&(r.preventDefault(),o.currentDoc.addEventListener("gesturechange",o.onGestureChange),o.currentDoc.addEventListener("gestureend",o.onGestureEnd),o.gestureZoomStart=o.props.zoom,o.gestureRotationStart=o.props.rotation)},o.onGestureChange=function(r){if(r.preventDefault(),!o.isTouching){var n=t.getMousePoint(r),i=o.gestureZoomStart-1+r.scale;if(o.setNewZoom(i,n,{shouldUpdatePosition:!0}),o.props.onRotationChange){var s=o.gestureRotationStart+r.rotation;o.props.onRotationChange(s)}}},o.onGestureEnd=function(r){o.cleanEvents()},o.onDragStart=function(r){var n,i,s=r.x,a=r.y;o.dragStartPosition={x:s,y:a},o.dragStartCrop=Fo({},o.props.crop),(i=(n=o.props).onInteractionStart)===null||i===void 0||i.call(n)},o.onDrag=function(r){var n=r.x,i=r.y;o.currentWindow&&(o.rafDragTimeout&&o.currentWindow.cancelAnimationFrame(o.rafDragTimeout),o.rafDragTimeout=o.currentWindow.requestAnimationFrame(function(){if(o.state.cropSize&&!(n===void 0||i===void 0)){var s=n-o.dragStartPosition.x,a=i-o.dragStartPosition.y,c={x:o.dragStartCrop.x+s,y:o.dragStartCrop.y+a},u=o.props.restrictPosition?HS(c,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):c;o.props.onCropChange(u)}}))},o.onDragStopped=function(){var r,n;o.isTouching=!1,o.cleanEvents(),o.emitCropData(),(n=(r=o.props).onInteractionEnd)===null||n===void 0||n.call(r)},o.onWheel=function(r){if(o.currentWindow&&!(o.props.onWheelRequest&&!o.props.onWheelRequest(r))){r.preventDefault();var n=t.getMousePoint(r),i=(0,doe.default)(r).pixelY,s=o.props.zoom-i*o.props.zoomSpeed/200;o.setNewZoom(s,n,{shouldUpdatePosition:!0}),o.state.hasWheelJustStarted||o.setState({hasWheelJustStarted:!0},function(){var a,c;return(c=(a=o.props).onInteractionStart)===null||c===void 0?void 0:c.call(a)}),o.wheelTimer&&clearTimeout(o.wheelTimer),o.wheelTimer=o.currentWindow.setTimeout(function(){return o.setState({hasWheelJustStarted:!1},function(){var a,c;return(c=(a=o.props).onInteractionEnd)===null||c===void 0?void 0:c.call(a)})},250)}},o.getPointOnContainer=function(r,n){var i=r.x,s=r.y;if(!o.containerRect)throw new Error("The Cropper is not mounted");return{x:o.containerRect.width/2-(i-n.x),y:o.containerRect.height/2-(s-n.y)}},o.getPointOnMedia=function(r){var n=r.x,i=r.y,s=o.props,a=s.crop,c=s.zoom;return{x:(n+a.x)/c,y:(i+a.y)/c}},o.setNewZoom=function(r,n,i){var s=i===void 0?{}:i,a=s.shouldUpdatePosition,c=a===void 0?!0:a;if(!(!o.state.cropSize||!o.props.onZoomChange)){var u=SI(r,o.props.minZoom,o.props.maxZoom);if(c){var d=o.getPointOnContainer(n,o.containerPosition),f=o.getPointOnMedia(d),m={x:f.x*u-d.x,y:f.y*u-d.y},h=o.props.restrictPosition?HS(m,o.mediaSize,o.state.cropSize,u,o.props.rotation):m;o.props.onCropChange(h)}o.props.onZoomChange(u)}},o.getCropData=function(){if(!o.state.cropSize)return null;var r=o.props.restrictPosition?HS(o.props.crop,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):o.props.crop;return BEe(r,o.mediaSize,o.state.cropSize,o.getAspect(),o.props.zoom,o.props.rotation,o.props.restrictPosition)},o.emitCropData=function(){var r=o.getCropData();if(r){var n=r.croppedAreaPercentages,i=r.croppedAreaPixels;o.props.onCropComplete&&o.props.onCropComplete(n,i),o.props.onCropAreaChange&&o.props.onCropAreaChange(n,i)}},o.emitCropAreaChange=function(){var r=o.getCropData();if(r){var n=r.croppedAreaPercentages,i=r.croppedAreaPixels;o.props.onCropAreaChange&&o.props.onCropAreaChange(n,i)}},o.recomputeCropPosition=function(){if(o.state.cropSize){var r=o.props.crop;if(o.isInitialized&&o.previousCropSize){var n=Math.abs(o.previousCropSize.width-o.state.cropSize.width)>1e-6||Math.abs(o.previousCropSize.height-o.state.cropSize.height)>1e-6;if(n){var i=o.state.cropSize.width/o.previousCropSize.width,s=o.state.cropSize.height/o.previousCropSize.height;r={x:o.props.crop.x*i,y:o.props.crop.y*s}}}var a=o.props.restrictPosition?HS(r,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):r;o.previousCropSize=o.state.cropSize,o.props.onCropChange(a),o.emitCropData()}},o.onKeyDown=function(r){var n,i,s=o.props,a=s.crop,c=s.onCropChange,u=s.keyboardStep,d=s.zoom,f=s.rotation,m=u;if(o.state.cropSize){r.shiftKey&&(m*=.2);var h=Fo({},a);switch(r.key){case"ArrowUp":h.y-=m,r.preventDefault();break;case"ArrowDown":h.y+=m,r.preventDefault();break;case"ArrowLeft":h.x-=m,r.preventDefault();break;case"ArrowRight":h.x+=m,r.preventDefault();break;default:return}o.props.restrictPosition&&(h=HS(h,o.mediaSize,o.state.cropSize,d,f)),r.repeat||(i=(n=o.props).onInteractionStart)===null||i===void 0||i.call(n),c(h)}},o.onKeyUp=function(r){var n,i;switch(r.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":r.preventDefault();break;default:return}o.emitCropData(),(i=(n=o.props).onInteractionEnd)===null||i===void 0||i.call(n)},o}return t.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),typeof window.ResizeObserver>"u"&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=AEe,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef),this.props.setCropperRef&&this.props.setCropperRef(this.cropperRef))},t.prototype.componentWillUnmount=function(){var o,r;!this.currentDoc||!this.currentWindow||(typeof window.ResizeObserver>"u"&&this.currentWindow.removeEventListener("resize",this.computeSizes),(o=this.resizeObserver)===null||o===void 0||o.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&((r=this.styleRef.parentNode)===null||r===void 0||r.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(o){var r,n,i,s,a,c,u,d,f;o.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):o.aspect!==this.props.aspect?this.computeSizes():o.objectFit!==this.props.objectFit?this.computeSizes():o.zoom!==this.props.zoom?this.recomputeCropPosition():((r=o.cropSize)===null||r===void 0?void 0:r.height)!==((n=this.props.cropSize)===null||n===void 0?void 0:n.height)||((i=o.cropSize)===null||i===void 0?void 0:i.width)!==((s=this.props.cropSize)===null||s===void 0?void 0:s.width)?this.computeSizes():(((a=o.crop)===null||a===void 0?void 0:a.x)!==((c=this.props.crop)===null||c===void 0?void 0:c.x)||((u=o.crop)===null||u===void 0?void 0:u.y)!==((d=this.props.crop)===null||d===void 0?void 0:d.y))&&this.emitCropAreaChange(),o.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),o.video!==this.props.video&&((f=this.videoRef.current)===null||f===void 0||f.load());var m=this.getObjectFit();m!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:m},this.computeSizes)},t.prototype.getAspect=function(){var o=this.props,r=o.cropSize,n=o.aspect;return r?r.width/r.height:n},t.prototype.getObjectFit=function(){var o,r,n,i;if(this.props.objectFit==="cover"){var s=this.imageRef.current||this.videoRef.current;if(s&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var a=this.containerRect.width/this.containerRect.height,c=((o=this.imageRef.current)===null||o===void 0?void 0:o.naturalWidth)||((r=this.videoRef.current)===null||r===void 0?void 0:r.videoWidth)||0,u=((n=this.imageRef.current)===null||n===void 0?void 0:n.naturalHeight)||((i=this.videoRef.current)===null||i===void 0?void 0:i.videoHeight)||0,d=c/u;return d<a?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(o){var r=t.getTouchPoint(o.touches[0]),n=t.getTouchPoint(o.touches[1]);this.lastPinchDistance=loe(r,n),this.lastPinchRotation=coe(r,n),this.onDragStart(uoe(r,n))},t.prototype.onPinchMove=function(o){var r=this;if(!(!this.currentDoc||!this.currentWindow)){var n=t.getTouchPoint(o.touches[0]),i=t.getTouchPoint(o.touches[1]),s=uoe(n,i);this.onDrag(s),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var a=loe(n,i),c=r.props.zoom*(a/r.lastPinchDistance);r.setNewZoom(c,s,{shouldUpdatePosition:!1}),r.lastPinchDistance=a;var u=coe(n,i),d=r.props.rotation+(u-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(d),r.lastPinchRotation=u})}},t.prototype.render=function(){var o=this,r,n=this.props,i=n.image,s=n.video,a=n.mediaProps,c=n.cropperProps,u=n.transform,d=n.crop,f=d.x,m=d.y,h=n.rotation,p=n.zoom,g=n.cropShape,b=n.showGrid,v=n.roundCropAreaPixels,k=n.style,y=k.containerStyle,S=k.cropAreaStyle,x=k.mediaStyle,C=n.classes,B=C.containerClassName,I=C.cropAreaClassName,P=C.mediaClassName,E=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return es.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(T){return o.containerRef=T},"data-testid":"container",style:y,className:yI("reactEasyCrop_Container",B)},i?es.createElement("img",Fo({alt:"",className:yI("reactEasyCrop_Image",E==="contain"&&"reactEasyCrop_Contain",E==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",E==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",P)},a,{src:i,ref:this.imageRef,style:Fo(Fo({},x),{transform:u||"translate(".concat(f,"px, ").concat(m,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):s&&es.createElement("video",Fo({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:yI("reactEasyCrop_Video",E==="contain"&&"reactEasyCrop_Contain",E==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",E==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",P)},a,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:Fo(Fo({},x),{transform:u||"translate(".concat(f,"px, ").concat(m,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),controls:!1}),(Array.isArray(s)?s:[{src:s}]).map(function(L){return es.createElement("source",Fo({key:L.src},L))})),this.state.cropSize&&es.createElement("div",Fo({ref:this.cropperRef,style:Fo(Fo({},S),{width:v?Math.round(this.state.cropSize.width):this.state.cropSize.width,height:v?Math.round(this.state.cropSize.height):this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,"data-testid":"cropper",className:yI("reactEasyCrop_CropArea",g==="round"&&"reactEasyCrop_CropAreaRound",b&&"reactEasyCrop_CropAreaGrid",I)},c)))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:NEe,minZoom:LEe,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:MEe},t.getMousePoint=function(o){return{x:Number(o.clientX),y:Number(o.clientY)}},t.getTouchPoint=function(o){return{x:Number(o.clientX),y:Number(o.clientY)}},t})(es.Component);var Soe=l(R(),1);var db=l(R(),1);var moe=Object.prototype.hasOwnProperty;function poe(e,t,o){for(o of e.keys())if(Wm(o,t))return o}function Wm(e,t){var o,r,n;if(e===t)return!0;if(e&&t&&(o=e.constructor)===t.constructor){if(o===Date)return e.getTime()===t.getTime();if(o===RegExp)return e.toString()===t.toString();if(o===Array){if((r=e.length)===t.length)for(;r--&&Wm(e[r],t[r]););return r===-1}if(o===Set){if(e.size!==t.size)return!1;for(r of e)if(n=r,n&&typeof n=="object"&&(n=poe(t,n),!n)||!t.has(n))return!1;return!0}if(o===Map){if(e.size!==t.size)return!1;for(r of e)if(n=r[0],n&&typeof n=="object"&&(n=poe(t,n),!n)||!Wm(r[1],t.get(n)))return!1;return!0}if(o===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(o===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!o||typeof e=="object"){r=0;for(o in e)if(moe.call(e,o)&&++r&&!moe.call(t,o)||!(o in t)||!Wm(e[o],t[o]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}var Zs=l(R(),1);var ub=1,hoe=5;var _I=e=>e>=0?e%360:(360+e%360)%360,DEe=e=>new Promise((t,o)=>{let r=new Image;r.addEventListener("load",()=>t(r)),r.addEventListener("error",n=>o(n)),r.setAttribute("crossOrigin","anonymous"),r.src=e});function goe(e){return e*Math.PI/180}function VEe(e,t,o){let r=goe(o);return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}async function boe(e,t,o=0,r={horizontal:!1,vertical:!1}){try{let n=await DEe(e),i=document.createElement("canvas"),s=i.getContext("2d");if(!s)return null;let a=goe(o),{width:c,height:u}=VEe(n.width,n.height,o);i.width=c,i.height=u,s.translate(c/2,u/2),s.rotate(a),s.scale(r.horizontal?-1:1,r.vertical?-1:1),s.translate(-n.width/2,-n.height/2),s.drawImage(n,0,0);let d=document.createElement("canvas"),f=d.getContext("2d");return f?(d.width=t.width,d.height=t.height,f.drawImage(i,t.x,t.y,t.width,t.height,0,0,t.width,t.height),new Promise(m=>{d.toBlob(h=>{h&&m(URL.createObjectURL(h))},"image/jpeg")})):null}catch{return null}}var $m={crop:{x:0,y:0,width:100,height:100},zoom:ub,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1}},FEe={x:0,y:0},H3={crop:FEe,croppedArea:$m.crop,croppedAreaPixels:null,zoom:$m.zoom,rotation:$m.rotation,flip:$m.flip,aspectRatio:$m.aspectRatio,mediaSize:null};function koe(){let[e,t]=(0,Zs.useState)(H3),[o,r]=(0,Zs.useState)(null),n=(0,Zs.useCallback)(u=>{t(d=>{let m={...typeof u=="function"?u(d):u};return"rotation"in m&&m.rotation!==void 0&&(m.rotation=_I(m.rotation)),{...d,...m}})},[]),i=(0,Zs.useCallback)((u=null)=>{if(!u){r(null),n(H3);return}if(typeof u=="object"){let d={...$m,...u};r(d),n(d)}},[n,r]),s=(0,Zs.useCallback)(()=>{if(o){let u={crop:{x:0,y:0},croppedAreaPixels:null};o.crop&&(u.croppedArea=o.crop),o.zoom!==void 0&&(u.zoom=o.zoom),o.rotation!==void 0&&(u.rotation=o.rotation),o.aspectRatio!==void 0&&(u.aspectRatio=o.aspectRatio),o.flip!==void 0&&(u.flip=o.flip),n(u)}else n({...H3})},[o,n]),a=(0,Zs.useMemo)(()=>{if(o){let d={crop:e.croppedAreaPixels||e.croppedArea,zoom:e.zoom,rotation:_I(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return Wm(d,o)===!1}let u={crop:e.croppedArea,zoom:e.zoom,rotation:_I(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return Wm(u,$m)===!1},[e,o]),c=(0,Zs.useCallback)(async u=>e.croppedAreaPixels?boe(u,e.croppedAreaPixels,e.rotation,e.flip):null,[e.croppedAreaPixels,e.rotation,e.flip]);return(0,Zs.useMemo)(()=>({cropperState:e,setCropperState:n,resetState:o,setResetState:i,isDirty:a,reset:s,getCroppedImage:c}),[e,n,o,i,a,s,c])}var voe=l(w(),1),yoe=(0,db.createContext)({cropperState:{crop:{x:0,y:0},croppedArea:{x:0,y:0,width:100,height:100},croppedAreaPixels:null,zoom:ub,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1},mediaSize:null},setCropperState:()=>{},resetState:null,setResetState:()=>{},isDirty:!1,reset:()=>{},getCroppedImage:()=>Promise.resolve(null)});function G3({children:e}){let t=koe(),o=(0,db.useMemo)(()=>({...t}),[t]);return(0,voe.jsx)(yoe.Provider,{value:o,children:e})}var GS=()=>{let e=(0,db.useContext)(yoe);if(!e)throw new Error("Missing ImageCropperContext");return e};var _oe=l(w(),1);function W3({src:e,onLoad:t,minZoom:o=ub,maxZoom:r=hoe,...n}){let{cropperState:i,setCropperState:s}=GS(),{crop:a,zoom:c,rotation:u,aspectRatio:d,flip:f}=i,m=v=>s({crop:v}),h=v=>s({zoom:v}),p=v=>s({rotation:v}),g=v=>s({mediaSize:v}),b=(0,Soe.useCallback)((v,k)=>{s({croppedArea:v,croppedAreaPixels:k})},[s]);return(0,_oe.jsx)(foe,{classes:{containerClassName:"image-cropper__container",cropAreaClassName:"image-cropper__crop-area",mediaClassName:"image-cropper__image"},minZoom:o,maxZoom:r,rotation:u,image:e,setMediaSize:g,crop:a,zoom:c,aspect:d,onCropChange:m,onZoomChange:h,onCropComplete:b,onMediaLoaded:v=>{t?.(v)},onRotationChange:p,transform:[`translate(${a.x}px, ${a.y}px)`,`rotateZ(${u}deg)`,`rotateY(${f.horizontal?180:0}deg)`,`rotateX(${f.vertical?180:0}deg)`,`scale(${c})`].join(" "),...n})}var pb=l(A(),1),mb=l(N(),1);var xoe=100,woe=300,xI={placement:"bottom-start"};var fb=l(R(),1);var wI=l(F(),1),Km=l(R(),1),hc=l(N(),1),Coe=l(Un(),1),Boe=l(Fe(),1);var zEe={crop:(0,hc.__)("Image cropped."),rotate:(0,hc.__)("Image rotated."),cropAndRotate:(0,hc.__)("Image cropped and rotated.")};function Eoe({crop:e,rotation:t,url:o,id:r,onSaveImage:n,onFinishEditing:i}){let{createErrorNotice:s,createSuccessNotice:a}=(0,wI.useDispatch)(Coe.store),[c,u]=(0,Km.useState)(!1),{editMediaEntity:d}=(0,wI.useSelect)(h=>({editMediaEntity:h(_).getSettings()?.[_0]}),[]),f=(0,Km.useCallback)(()=>{u(!1),i()},[i]),m=(0,Km.useCallback)(async()=>{if(!d){i(),s((0,hc.__)("Sorry, you are not allowed to edit images on this site."),{id:"image-editing-error",type:"snackbar"});return}u(!0);let h=[];if(t>0&&h.push({type:"rotate",args:{angle:t}}),(e.width<99.9||e.height<99.9)&&h.push({type:"crop",args:{left:e.x,top:e.y,width:e.width,height:e.height}}),h.length===0){u(!1),i();return}let p=h.length===1?h[0].type:"cropAndRotate";try{let g=await d(r,{src:o,modifiers:h},{throwOnError:!0});g&&(n({id:g.id,url:g.source_url}),a(zEe[p],{type:"snackbar",actions:[{label:(0,hc.__)("Undo"),onClick:()=>{n({id:r,url:o})}}]}))}catch(g){s((0,hc.sprintf)((0,hc.__)("Could not edit image. %s"),(0,Boe.__unstableStripHTML)(g.message)),{id:"image-editing-error",type:"snackbar"})}finally{u(!1),i()}},[e,t,r,o,n,s,a,i,d]);return(0,Km.useMemo)(()=>({isInProgress:c,apply:m,cancel:f}),[c,m,f])}var Xs=l(R(),1),Toe=l(ut(),1);function Ioe({url:e,naturalWidth:t,naturalHeight:o}){let[r,n]=(0,Xs.useState)(),{cropperState:i,setCropperState:s}=GS(),{zoom:a,aspectRatio:c,crop:u,croppedArea:d}=i,f=(0,Xs.useCallback)(k=>{s({zoom:k})},[s]),m=(0,Xs.useCallback)(k=>{s({aspectRatio:k})},[s]),h=t/o,p=o/t;(0,Xs.useEffect)(()=>{m(h)},[]);let[g,b]=(0,Xs.useState)(0),v=(0,Xs.useCallback)(()=>{let k=(g+90)%360,y=h,x=a!==1||!(h===c||p===c);if(g%180===90&&(y=1/h),k===0){n(),b(k),s({aspectRatio:x?c:h,crop:{x:-(u.y*y),y:u.x*y}});return}function C(P){let E=document.createElement("canvas"),L=0,T=0;k%180?(E.width=P.target.height,E.height=P.target.width):(E.width=P.target.width,E.height=P.target.height),(k===90||k===180)&&(L=E.width),(k===270||k===180)&&(T=E.height);let O=E.getContext("2d");O.translate(L,T),O.rotate(k*Math.PI/180),O.drawImage(P.target,0,0),E.toBlob(D=>{n(URL.createObjectURL(D)),b(k);let U=x?c:E.width/E.height;s({aspectRatio:U,crop:{x:-(u.y*y),y:u.x*y}})})}let B=new window.Image;B.src=e,B.onload=C;let I=(0,Toe.applyFilters)("media.crossOrigin",void 0,e);typeof I=="string"&&(B.crossOrigin=I)},[g,h,e,s,u,a,c,p,b]);return(0,Xs.useMemo)(()=>({editedUrl:r,setEditedUrl:n,crop:d,zoom:a,setZoom:f,rotation:g,rotateClockwise:v,aspect:c,setAspect:m,defaultAspect:h}),[r,d,a,f,g,v,c,m,h])}var Poe=l(w(),1),$3=(0,fb.createContext)({});$3.displayName="ImageEditingContext";var Ua=()=>(0,fb.useContext)($3);function Roe({id:e,url:t,naturalWidth:o,naturalHeight:r,onFinishEditing:n,onSaveImage:i,children:s}){let a=Ioe({url:t,naturalWidth:o,naturalHeight:r}),c=Eoe({id:e,url:t,onSaveImage:i,onFinishEditing:n,...a}),u=(0,fb.useMemo)(()=>({...a,...c}),[a,c]);return(0,Poe.jsx)($3.Provider,{value:u,children:s})}var ts=l(w(),1);function CI({aspectRatios:e,isDisabled:t,label:o,onClick:r,value:n}){return(0,ts.jsx)(pb.MenuGroup,{label:o,children:e.map(({name:i,slug:s,ratio:a})=>(0,ts.jsx)(pb.MenuItem,{disabled:t,onClick:()=>{r(a)},role:"menuitemradio",isSelected:a===n,icon:a===n?gl:void 0,children:i},s))})}function jEe(e){let[t,o,...r]=e.split("/").map(Number);return t<=0||o<=0||Number.isNaN(t)||Number.isNaN(o)||r.length?NaN:o?t/o:t}function K3({ratio:e,...t}){return{ratio:jEe(e),...t}}function Ooe({toggleProps:e}){let{isInProgress:t,aspect:o,setAspect:r,defaultAspect:n}=Ua(),[i,s,a]=me("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios");return(0,ts.jsx)(pb.DropdownMenu,{icon:jO,label:(0,mb.__)("Aspect Ratio"),popoverProps:xI,toggleProps:e,children:({onClose:c})=>(0,ts.jsxs)(ts.Fragment,{children:[(0,ts.jsx)(CI,{isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:[{slug:"original",name:(0,mb.__)("Original"),ratio:n},...a?i.map(K3).filter(({ratio:u})=>u===1):[]]}),s?.length>0&&(0,ts.jsx)(CI,{label:(0,mb.__)("Theme"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:s}),a&&(0,ts.jsx)(CI,{label:(0,mb.__)("Landscape"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:i.map(K3).filter(({ratio:u})=>u>1)}),a&&(0,ts.jsx)(CI,{label:(0,mb.__)("Portrait"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:i.map(K3).filter(({ratio:u})=>u<1)})]})})}var Aoe=l(A(),1),Loe=l(Z(),1);var Cd=l(w(),1);function Noe({url:e,width:t,height:o,naturalHeight:r,naturalWidth:n,borderProps:i}){let{isInProgress:s,editedUrl:a,rotation:c}=Ua(),[u,{width:d}]=(0,Loe.useResizeObserver)(),f=o||d*r/n;c%180===90&&(f=d*n/r);let m=(0,Cd.jsxs)("div",{className:V("wp-block-image__crop-area",i?.className,{"is-applying":s}),style:{...i?.style,width:t||d,height:f},children:[(0,Cd.jsx)(W3,{src:a||e}),s&&(0,Cd.jsx)(Aoe.Spinner,{})]});return(0,Cd.jsxs)(Cd.Fragment,{children:[u,m]})}var Bd=l(A(),1),Y3=l(N(),1);var WS=l(w(),1);function Moe(){let{isInProgress:e,zoom:t,setZoom:o}=Ua();return(0,WS.jsx)(Bd.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:xI,renderToggle:({isOpen:r,onToggle:n})=>(0,WS.jsx)(Bd.ToolbarButton,{icon:tN,label:(0,Y3.__)("Zoom"),onClick:n,"aria-expanded":r,disabled:e}),renderContent:()=>(0,WS.jsx)(Bd.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,WS.jsx)(Bd.RangeControl,{__next40pxDefaultSize:!0,label:(0,Y3.__)("Zoom"),min:xoe,max:woe,value:Math.round(t*100),onChange:r=>o(r/100)})})})}var Doe=l(A(),1),Voe=l(N(),1);var Foe=l(w(),1);function zoe(){let{isInProgress:e,rotateClockwise:t}=Ua();return(0,Foe.jsx)(Doe.ToolbarButton,{icon:XL,label:(0,Voe.__)("Rotate"),onClick:t,disabled:e})}var q3=l(A(),1),Z3=l(N(),1);var Ym=l(w(),1);function joe(){let{isInProgress:e,apply:t,cancel:o}=Ua();return(0,Ym.jsxs)(Ym.Fragment,{children:[(0,Ym.jsx)(q3.ToolbarButton,{onClick:t,disabled:e,children:(0,Z3.__)("Apply")}),(0,Ym.jsx)(q3.ToolbarButton,{onClick:o,children:(0,Z3.__)("Cancel")})]})}var ci=l(w(),1);function Uoe({id:e,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i,onSaveImage:s,onFinishEditing:a,borderProps:c}){return(0,ci.jsx)(G3,{children:(0,ci.jsxs)(Roe,{id:e,url:t,naturalWidth:i,naturalHeight:n,onSaveImage:s,onFinishEditing:a,children:[(0,ci.jsx)(Noe,{borderProps:c,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i}),(0,ci.jsxs)(Mt,{children:[(0,ci.jsxs)($S.ToolbarGroup,{children:[(0,ci.jsx)(Moe,{}),(0,ci.jsx)($S.ToolbarItem,{children:u=>(0,ci.jsx)(Ooe,{toggleProps:u})}),(0,ci.jsx)(zoe,{})]}),(0,ci.jsx)($S.ToolbarGroup,{children:(0,ci.jsx)(joe,{})})]})]})})}var ui=l(A(),1),Ed=l(N(),1);var hb=l(R(),1);function Hoe(e,t,o,r,n){let[i,s]=(0,hb.useState)(t??r??""),[a,c]=(0,hb.useState)(e??o??"");return(0,hb.useEffect)(()=>{t===void 0&&r!==void 0&&s(r),e===void 0&&o!==void 0&&c(o)},[r,o]),(0,hb.useEffect)(()=>{t!==void 0&&Number.parseInt(t)!==Number.parseInt(i)&&s(t),e!==void 0&&Number.parseInt(e)!==Number.parseInt(a)&&c(e)},[t,e]),{currentHeight:a,currentWidth:i,updateDimension:(f,m)=>{let h=m===""?void 0:parseInt(m,10);f==="width"?s(h):c(h),n({[f]:h})},updateDimensions:(f,m)=>{c(f??o),s(m??r),n({height:f,width:m})}}}var os=l(w(),1),Goe=[25,50,75,100],UEe=()=>{};function Woe(e,t,o){let r=Math.round(t*(e/100)),n=Math.round(o*(e/100));return{scaledWidth:r,scaledHeight:n}}function $oe({imageSizeHelp:e,imageWidth:t,imageHeight:o,imageSizeOptions:r=[],isResizable:n=!0,slug:i,width:s,height:a,onChange:c,onChangeImage:u=UEe}){let{currentHeight:d,currentWidth:f,updateDimension:m,updateDimensions:h}=Hoe(a,s,o,t,c),p=b=>{if(b===void 0){h();return}let{scaledWidth:v,scaledHeight:k}=Woe(b,t,o);h(k,v)},g=Goe.find(b=>{let{scaledWidth:v,scaledHeight:k}=Woe(b,t,o);return f===v&&d===k});return(0,os.jsxs)(ui.__experimentalVStack,{className:"block-editor-image-size-control",spacing:"4",children:[r&&r.length>0&&(0,os.jsx)(ui.SelectControl,{label:(0,Ed.__)("Resolution"),value:i,options:r,onChange:u,help:e,size:"__unstable-large"}),n&&(0,os.jsxs)(os.Fragment,{children:[(0,os.jsxs)(ui.__experimentalHStack,{align:"baseline",spacing:"4",children:[(0,os.jsx)(ui.__experimentalNumberControl,{label:(0,Ed.__)("Width"),value:f,min:1,onChange:b=>m("width",b),size:"__unstable-large"}),(0,os.jsx)(ui.__experimentalNumberControl,{label:(0,Ed.__)("Height"),value:d,min:1,onChange:b=>m("height",b),size:"__unstable-large"})]}),(0,os.jsx)(ui.__experimentalToggleGroupControl,{label:(0,Ed.__)("Image size presets"),hideLabelFromVision:!0,onChange:p,value:g,isBlock:!0,__next40pxDefaultSize:!0,children:Goe.map(b=>(0,os.jsx)(ui.__experimentalToggleGroupControlOption,{value:b,label:(0,Ed.sprintf)((0,Ed.__)("%d%%"),b)},b))})]})]})}var BI=l(A(),1);var qm=l(N(),1),Yoe=l(w(),1),Koe={left:ru,center:ou,right:nu,"space-between":Fp,stretch:zp};function HEe({allowedControls:e=["left","center","right","space-between"],isCollapsed:t=!0,onChange:o,value:r,popoverProps:n,isToolbar:i}){let s=f=>{o(f===r?void 0:f)},a=r?Koe[r]:Koe.left,c=[{name:"left",icon:ru,title:(0,qm.__)("Justify items left"),isActive:r==="left",onClick:()=>s("left")},{name:"center",icon:ou,title:(0,qm.__)("Justify items center"),isActive:r==="center",onClick:()=>s("center")},{name:"right",icon:nu,title:(0,qm.__)("Justify items right"),isActive:r==="right",onClick:()=>s("right")},{name:"space-between",icon:Fp,title:(0,qm.__)("Space between items"),isActive:r==="space-between",onClick:()=>s("space-between")},{name:"stretch",icon:zp,title:(0,qm.__)("Stretch items"),isActive:r==="stretch",onClick:()=>s("stretch")}],u=i?BI.ToolbarGroup:BI.ToolbarDropdownMenu,d=i?{isCollapsed:t}:{};return(0,Yoe.jsx)(u,{icon:a,popoverProps:n,label:(0,qm.__)("Change items justification"),controls:c.filter(f=>e.includes(f.name)),...d})}var X3=HEe;var Q3=l(w(),1),ah=e=>(0,Q3.jsx)(X3,{...e,isToolbar:!1}),qoe=e=>(0,Q3.jsx)(X3,{...e,isToolbar:!0});var Qr=l(A(),1),Qs=l(N(),1),no=l(R(),1),zre=l(Z(),1),jre=l(Fe(),1),Ure=l(it(),1),Hre=l(Jy(),1),zI=l(F(),1),aF=l(Zp(),1);var Gre=l(Re(),1),jI=l(dn(),1);var gb=l(A(),1);var EI=l(Z(),1),TI=l(N(),1),Zoe=l(R(),1),gc=l(w(),1);function Xoe({children:e,settingsOpen:t,setSettingsOpen:o}){let r=(0,EI.useReducedMotion)(),n=r?Zoe.Fragment:gb.__unstableAnimatePresence,i=r?"div":gb.__unstableMotion.div,a=`link-control-settings-drawer-${(0,EI.useInstanceId)(Xoe)}`;return(0,gc.jsxs)(gc.Fragment,{children:[(0,gc.jsx)(gb.Button,{__next40pxDefaultSize:!0,className:"block-editor-link-control__drawer-toggle","aria-expanded":t,onClick:()=>o(!t),icon:(0,TI.isRTL)()?ev:tu,"aria-controls":a,children:(0,TI._x)("Advanced","Additional link settings")}),(0,gc.jsx)(n,{children:t&&(0,gc.jsx)(i,{className:"block-editor-link-control__drawer",hidden:!t,id:a,initial:"collapsed",animate:"open",exit:"collapsed",variants:{open:{opacity:1,height:"auto"},collapsed:{opacity:0,height:0}},transition:{duration:.1},children:(0,gc.jsx)("div",{className:"block-editor-link-control__drawer-inner",children:e})})})]})}var Qoe=Xoe;var LI=l(R(),1),iF=l(N(),1),bre=l(Re(),1);var KS=l(N(),1),cre=l(A(),1);var II=l(N(),1),Joe=l(A(),1),ere=l(R(),1);var J3=l(w(),1),GEe=({searchTerm:e,onClick:t,itemProps:o,buttonText:r})=>{if(!e)return null;let n;return r?n=typeof r=="function"?r(e):r:n=(0,ere.createInterpolateElement)((0,II.sprintf)((0,II.__)("Create: <mark>%s</mark>"),e),{mark:(0,J3.jsx)("mark",{})}),(0,J3.jsx)(Joe.MenuItem,{...o,iconPosition:"left",icon:Bi,className:"block-editor-link-control__search-item",onClick:t,children:n})},tre=GEe;var bc=l(N(),1),RI=l(A(),1);var ore=l(Fe(),1),kb=l(dn(),1),rre=l(Z(),1),nre=l(Re(),1),bb=l(w(),1),PI={post:{icon:$L,label:(0,bc.__)("Post")},page:{icon:kl,label:(0,bc.__)("Page")},post_tag:{icon:xN,label:(0,bc.__)("Tag")},category:{icon:$O,label:(0,bc.__)("Category")},attachment:{icon:SA,label:(0,bc.__)("Attachment")}};function WEe({isURL:e,suggestion:t}){let o=null;return e?o=ov:t.type in PI&&(o=PI[t.type].icon,t.type==="page"&&(t.isFrontPage&&(o=JA),t.isBlogHome&&(o=DN))),o?(0,bb.jsx)(we,{className:"block-editor-link-control__search-item-icon",icon:o}):null}function $Ee(e){return e?.trim()?.length?e?.replace(/^\/?/,"/"):e}function KEe(e){return e?.trim()?.length?e?.replace(/\/$/,""):e}var YEe=(e,...t)=>(...o)=>e(...o,...t),qEe=e=>t=>t==null||t!==t?e:t;function ZEe(e){return e&&(0,rre.pipe)(kb.safeDecodeURI,kb.getPath,qEe(""),YEe(kb.filterURLForDisplay,24),KEe,$Ee)(e)}var ire=({itemProps:e,suggestion:t,searchTerm:o,onClick:r,isURL:n=!1,shouldShowType:i=!1})=>{let s=n?(0,bc.__)("Press ENTER to add this link"):ZEe(t.url);return(0,bb.jsx)(RI.MenuItem,{...e,info:s,iconPosition:"left",icon:(0,bb.jsx)(WEe,{suggestion:t,isURL:n}),onClick:r,shortcut:i&&XEe(t),className:"block-editor-link-control__search-item",children:(0,bb.jsx)(RI.TextHighlight,{text:(0,ore.__unstableStripHTML)(t.title),highlight:o})})};function XEe(e){return e.isFrontPage?(0,bc.__)("Front page"):e.isBlogHome?(0,bc.__)("Blog home"):e.type in PI?PI[e.type].label:e.type}var sre=ire,are=e=>((0,nre.default)("wp.blockEditor.__experimentalLinkControlSearchItem",{since:"6.8"}),(0,bb.jsx)(ire,{...e}));var lre=l(N(),1),Zm="__CREATE__",eF="tel",OI="link",tF="mailto",oF="internal",vb=[OI,tF,eF,oF],rF=[{id:"opensInNewTab",title:(0,lre.__)("Open in new tab")}];var ure=l(Re(),1),Xm=l(w(),1);function dre({withCreateSuggestion:e,currentInputValue:t,handleSuggestionClick:o,suggestionsListProps:r,buildSuggestionItemProps:n,suggestions:i,selectedSuggestion:s,isLoading:a,isInitialSuggestions:c,createSuggestionButtonText:u,suggestionsQuery:d}){let f=V("block-editor-link-control__search-results",{"is-loading":a}),m=i.length===1&&vb.includes(i[0].type),h=e&&!m&&!c,p=!d?.type,g=c?(0,KS.__)("Suggestions"):(0,KS.sprintf)((0,KS.__)('Search results for "%s"'),t);return(0,Xm.jsx)("div",{className:"block-editor-link-control__search-results-wrapper",children:(0,Xm.jsx)("div",{...r,className:f,"aria-label":g,children:(0,Xm.jsx)(cre.MenuGroup,{children:i.map((b,v)=>h&&Zm===b.type?(0,Xm.jsx)(tre,{searchTerm:t,buttonText:u,onClick:()=>o(b),itemProps:n(b,v),isSelected:v===s},b.type):Zm===b.type?null:(0,Xm.jsx)(sre,{itemProps:n(b,v),suggestion:b,index:v,onClick:()=>{o(b)},isSelected:v===s,isURL:vb.includes(b.type),searchTerm:t,shouldShowType:p,isFrontPage:b?.isFrontPage,isBlogHome:b?.isBlogHome},`${b.id}-${b.type}`))})})})}var fre=dre,mre=e=>((0,ure.default)("wp.blockEditor.__experimentalLinkControlSearchResults",{since:"6.8"}),(0,Xm.jsx)(dre,{...e}));var pre=l(R(),1),hre=l(F(),1);var AI=l(dn(),1);function YS(e){let t=e?.trim();if(!t)return{url:t,type:OI};let o=OI,r=(0,AI.getProtocol)(t)||"";return r.includes("mailto")?o=tF:r.includes("tel")?o=eF:t?.startsWith("#")&&(o=oF),gf(t)||bf(t)||t.startsWith("?")||r?{url:t,type:o}:{url:(0,AI.prependHTTPS)(t),type:o}}var QEe=()=>Promise.resolve([]),JEe=e=>{let{url:t,type:o}=YS(e);return Promise.resolve([{id:e,title:e,url:t,type:o}])},eTe=async(e,t,o,r,n,i)=>{let{isInitialSuggestions:s}=t,a=await o(e,t);return a.map(c=>Number(c.id)===n?(c.isFrontPage=!0,c):(Number(c.id)===i&&(c.isBlogHome=!0),c)),s||kf(e)||!r?a:a.concat({title:e,url:e,type:Zm})};function gre(e,t,o){let{fetchSearchSuggestions:r,pageOnFront:n,pageForPosts:i}=(0,hre.useSelect)(a=>{let{getSettings:c}=a(_);return{pageOnFront:c().pageOnFront,pageForPosts:c().pageForPosts,fetchSearchSuggestions:c().__experimentalFetchLinkSuggestions}},[]),s=t?JEe:QEe;return(0,pre.useCallback)((a,{isInitialSuggestions:c})=>kf(a)?s(a,{isInitialSuggestions:c}):eTe(a,{...e,isInitialSuggestions:c},r,o,n,i),[s,r,n,i,e,o])}var yb=l(w(),1),tTe=()=>Promise.resolve([]),nF=()=>{},kre=(0,LI.forwardRef)(({value:e,children:t,currentLink:o={},className:r=null,placeholder:n=null,withCreateSuggestion:i=!1,onCreateSuggestion:s=nF,onChange:a=nF,onSelect:c=nF,showSuggestions:u=!0,renderSuggestions:d=C=>(0,yb.jsx)(fre,{...C}),fetchSuggestions:f=null,allowDirectEntry:m=!0,showInitialSuggestions:h=!1,suggestionsQuery:p={},withURLSuggestion:g=!0,createSuggestionButtonText:b,hideLabelFromVision:v=!1,suffix:k,isEntity:y=!1,customValidity:S},x)=>{let C=gre(p,m,i,g),B=u?f||C:tTe,[I,P]=(0,LI.useState)(),E=(U,G)=>{a(U),P(G)},L=U=>d({...U,withCreateSuggestion:i,createSuggestionButtonText:b,suggestionsQuery:p,handleSuggestionClick:G=>{U.handleSuggestionClick&&U.handleSuggestionClick(G),T(G)}}),T=async U=>{let G=U;if(Zm===U.type){try{G=await s(U.title),G?.url&&c(G)}catch{}return}if(m||G&&Object.keys(G).length>=1){let{id:j,url:z,kind:W,type:ee,...se}=o??{};c({...se,...G},G)}},O=n??(0,iF.__)("Search or type URL"),D=v&&n!==""?O:(0,iF.__)("Link");return(0,yb.jsxs)("div",{className:"block-editor-link-control__search-input-container",children:[(0,yb.jsx)(Td,{disableSuggestions:o?.url===e,label:D,hideLabelFromVision:v,className:r,value:e,onChange:E,placeholder:O,__experimentalRenderSuggestions:u?L:null,__experimentalFetchLinkSuggestions:B,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:h,customValidity:S,required:!1,onSubmit:(U,G)=>{let j=U||I;!j&&!e?.trim()?.length?G.preventDefault():T(j||{url:e})},inputRef:x,suffix:k,disabled:y}),t]})}),vre=kre,yre=e=>((0,bre.default)("wp.blockEditor.__experimentalLinkControlSearchInput",{since:"6.8"}),(0,yb.jsx)(kre,{...e}));var Id=l(N(),1),Lo=l(A(),1),Cre=l(Z(),1),DI=l(dn(),1);var Bre=l(Fe(),1),VI=l(F(),1),Ere=l(Un(),1),Tre=l(Zp(),1);var Sre=l(A(),1),{Slot:_re,Fill:xre}=(0,Sre.createSlotFill)("BlockEditorLinkControlViewer");var wre=l(F(),1),NI=l(R(),1);function oTe(e,t){switch(t.type){case"RESOLVED":return{...e,isFetching:!1,richData:t.richData};case"ERROR":return{...e,isFetching:!1,richData:null};case"LOADING":return{...e,isFetching:!0};default:throw new Error(`Unexpected action type ${t.type}`)}}function rTe(e){let[t,o]=(0,NI.useReducer)(oTe,{richData:null,isFetching:!1}),{fetchRichUrlData:r}=(0,wre.useSelect)(n=>{let{getSettings:i}=n(_);return{fetchRichUrlData:i().__experimentalFetchRichUrlData}},[]);return(0,NI.useEffect)(()=>{if(e?.length&&r&&typeof AbortController<"u"){o({type:"LOADING"});let n=new window.AbortController,i=n.signal;return r(e,{signal:i}).then(s=>{o({type:"RESOLVED",richData:s})}).catch(()=>{i.aborted||o({type:"ERROR"})}),()=>{n.abort()}}},[e]),t}var MI=rTe;var vt=l(w(),1),{Badge:nTe}=M(Lo.privateApis);function Ire({value:e,onEditClick:t,hasRichPreviews:o=!1,hasUnlinkControl:r=!1,onRemove:n}){let i=(0,VI.useSelect)(b=>b(Tre.store).get("core","showIconLabels"),[]),s=o?e?.url:null,{richData:a,isFetching:c}=MI(s),u=a&&Object.keys(a).length,d=e&&(0,DI.filterURLForDisplay)((0,DI.safeDecodeURI)(e.url),24)||"",f=!e?.url?.length,m=!f&&(0,Bre.__unstableStripHTML)(a?.title||e?.title||d),h;a?.icon?h=(0,vt.jsx)("img",{src:a?.icon,alt:""}):f?h=(0,vt.jsx)(we,{icon:oL,size:32}):h=(0,vt.jsx)(we,{icon:ov});let{createNotice:p}=(0,VI.useDispatch)(Ere.store),g=(0,Cre.useCopyToClipboard)(e.url,()=>{p("info",(0,Id.__)("Link copied to clipboard."),{isDismissible:!0,type:"snackbar"})});return(0,vt.jsx)(Lo.Flex,{role:"group","aria-label":(0,Id.__)("Manage link"),className:V("block-editor-link-control__preview",{"is-current":!0,"is-rich":u,"is-fetching":!!c,"is-preview":!0,"is-error":f,"is-url-title":m===d}),children:(0,vt.jsxs)(Lo.Flex,{gap:0,align:"flex-start",children:[(0,vt.jsxs)(Lo.Flex,{className:"block-editor-link-control__link-information",role:"figure","aria-label":(0,Id.__)("Link information"),justify:"start",align:"flex-start",children:[e?.image?(0,vt.jsx)(Lo.Flex,{className:"block-editor-link-control__preview-image",justify:"center",children:(0,vt.jsx)("img",{src:e?.image,alt:""})}):(0,vt.jsx)(Lo.Flex,{className:V("block-editor-link-control__preview-icon",{"is-image":a?.icon}),justify:"center",children:h}),(0,vt.jsx)(Lo.Flex,{className:"block-editor-link-control__preview-details",direction:"column",gap:2,children:f?(0,vt.jsx)("span",{className:"block-editor-link-control__preview-error-notice",children:(0,Id.__)("Link is empty")}):(0,vt.jsxs)(vt.Fragment,{children:[(0,vt.jsx)(Lo.ExternalLink,{className:"block-editor-link-control__preview-title",href:e.url,children:(0,vt.jsx)(Lo.__experimentalTruncate,{numberOfLines:1,children:m})}),(0,vt.jsx)("span",{className:"block-editor-link-control__preview-info",children:(0,vt.jsx)(Lo.__experimentalTruncate,{numberOfLines:1,children:d})}),e?.badges?.length>0&&(0,vt.jsx)(Lo.__experimentalHStack,{className:"block-editor-link-control__preview-badges",alignment:"left",gap:1,children:e.badges.map((b,v)=>(0,vt.jsx)(nTe,{intent:b.intent,children:b.label},`${b.label}|${b.intent}|${v}`))})]})})]}),(0,vt.jsx)(Lo.Button,{icon:Of,label:(0,Id.__)("Edit link"),onClick:t,size:"compact",showTooltip:!i}),r&&(0,vt.jsx)(Lo.Button,{icon:Ci,label:(0,Id.__)("Remove link"),onClick:n,size:"compact",showTooltip:!i}),(0,vt.jsx)(Lo.Button,{icon:nA,label:(0,Id.__)("Copy link"),ref:g,accessibleWhenDisabled:!0,disabled:f,size:"compact",showTooltip:!i}),(0,vt.jsx)(_re,{fillProps:e})]})})}var Pre=l(N(),1),FI=l(A(),1),Sb=l(w(),1),iTe=()=>{},sTe=({value:e,onChange:t=iTe,settings:o})=>{if(!o||!o.length)return null;let r=i=>s=>{t({...e,[i.id]:s})},n=o.map(i=>{if("render"in i){if(typeof i.render=="function"){let s=i.render(i,e,t);return(0,Sb.jsx)("div",{className:"block-editor-link-control__setting",children:s},i.id)}return null}return(0,Sb.jsx)(FI.CheckboxControl,{className:"block-editor-link-control__setting",label:i.title,onChange:r(i),checked:e?!!e[i.id]:!1,help:i?.help},i.id)}).filter(Boolean);return(0,Sb.jsxs)("fieldset",{className:"block-editor-link-control__settings",children:[(0,Sb.jsx)(FI.VisuallyHidden,{as:"legend",children:(0,Pre.__)("Currently selected link settings")}),n]})},Rre=sTe;var Ore=l(N(),1),Qm=l(R(),1);function Are(e){let t=(0,Qm.useRef)(),[o,r]=(0,Qm.useState)(!1),[n,i]=(0,Qm.useState)(null),s=async function(a){r(!0),i(null);try{return t.current=aTe(Promise.resolve(e(a))),await t.current.promise}catch(c){if(c&&c.isCanceled)return;throw i(c.message||(0,Ore.__)("An unknown error occurred during creation. Please try again.")),c}finally{r(!1)}};return(0,Qm.useEffect)(()=>()=>{t.current&&t.current.cancel()},[]),{createPage:s,isCreatingPage:o,errorMessage:n}}var aTe=e=>{let t=!1;return{promise:new Promise((r,n)=>{e.then(i=>t?n({isCanceled:!0}):r(i),i=>n(t?{isCanceled:!0}:i))}),cancel(){t=!0}}};var sF=l(R(),1),Mre=l(Nre(),1);function Dre(e){let[t,o]=(0,sF.useState)(e||{}),[r,n]=(0,sF.useState)(e);return(0,Mre.default)(e,r)||(n(e),o(e)),[t,o,c=>{o({...t,url:c})},c=>{o({...t,title:c})},c=>u=>{let d=Object.keys(u).reduce((f,m)=>(c.includes(m)&&(f[m]=u[m]),f),{});o({...t,...d})}]}var Pt=l(w(),1),lF=()=>{},Vre="core/block-editor",Fre="linkControlSettingsDrawer";function Jm({searchInputPlaceholder:e,value:t,settings:o=rF,onChange:r=lF,onInputChange:n,onRemove:i,onCancel:s,noDirectEntry:a=!1,showSuggestions:c=!0,showInitialSuggestions:u,forceIsEditingLink:d,createSuggestion:f,withCreateSuggestion:m,inputValue:h="",suggestionsQuery:p={},noURLSuggestion:g=!1,createSuggestionButtonText:b,hasRichPreviews:v=!1,hasTextControl:k=!1,renderControlBottom:y=null,handleEntities:S=!1}){m===void 0&&f&&(m=!0);let[x,C]=(0,no.useState)(!1),[B,I]=(0,no.useState)(void 0),{advancedSettingsPreference:P}=(0,zI.useSelect)(ge=>({advancedSettingsPreference:ge(aF.store).get(Vre,Fre)??!1}),[]),{set:E}=(0,zI.useDispatch)(aF.store),L=ge=>{E&&E(Vre,Fre,ge),C(ge)},T=P||x,O=(0,no.useRef)(!0),D=(0,no.useRef)(),U=(0,no.useRef)(),G=(0,no.useRef)(),j=(0,no.useRef)(),z=o.map(({id:ge})=>ge),[W,ee,se,ce,ie]=Dre(t),re=ge=>{se(ge),n?.(ge)},Q=S&&!!W?.id,Y=(0,zre.useInstanceId)(Jm,"link-control"),J=Q?`${Y}__help`:null,K=t&&!(0,Hre.isShallowEqualObjects)(W,t),[H,X]=(0,no.useState)(d!==void 0?d:!t||!t.url),{createPage:ne,isCreatingPage:le,errorMessage:ve}=Are(f);(0,no.useEffect)(()=>{d!==void 0&&X(d)},[d]),(0,no.useEffect)(()=>{if(O.current)return;(jre.focus.focusable.find(D.current)[0]||D.current).focus()},[H,le]),(0,no.useEffect)(()=>(O.current=!1,()=>{O.current=!0}),[]);let he=(0,no.useRef)();(0,no.useEffect)(()=>{if(he.current===void 0){he.current=h;return}he.current!==h&&(console.warn("LinkControl: The inputValue prop is uncontrolled and only sets the initial value. onInputChange is an observer for the input value. Changes to inputValue from the parent will not update the search input."),he.current=h)},[h]),(0,no.useEffect)(()=>{if(B?.type==="invalid"){let ge=G.current;ge&&typeof ge.reportValidity=="function"&&ge.reportValidity()}},[B]);let xe=t?.url?.trim()?.length>0,ze=()=>{X(!1)},ot=ge=>{let Ct={type:"invalid",message:(0,Qs.__)("Please enter a valid URL.")},Io={type:"valid"},Ke=ge?.trim();if(!Ke?.length||!kf(Ke))return Ct;if(gf(Ke)||bf(Ke))return Io;let te=(0,jI.prependHTTPS)(Ke);return(0,jI.isURL)(te)?Io:Ct},Wt=ge=>{if(!(ge&&ge.id&&ge.type&&!vb.includes(ge.type))){let Ke=ge?.url||$t,te=ot(Ke);if(te.type==="invalid"){I(te);return}let{url:Le}=YS(Ke);ge={...ge,url:Le}}ge?.kind==="taxonomy"&&ge?.url&&(j.current=ge.url);let Io=Object.keys(ge).reduce((Ke,te)=>(z.includes(te)||(Ke[te]=ge[te]),Ke),{});r({...W,...Io,title:W?.title||ge?.title}),I(void 0),ze()},fo=()=>{if(lr)return!1;let ge=$t.trim(),Ct=W&&W.id&&W.type&&!vb.includes(W.type),Io=t?.url===ge;if(Ct&&Io)return I(void 0),!0;let Ke=ot($t);return Ke.type==="invalid"?(I(Ke),!1):(I(void 0),!0)},Do=()=>{K&&r({...t,...W,url:YS($t).url}),ze(),I(void 0)},rt=()=>{fo()&&Do()},ar=ge=>{let{keyCode:Ct}=ge;Ct===Ure.ENTER&&!lr&&(ge.preventDefault(),rt())},xt=()=>{ee(t)},At=ge=>{ge.preventDefault(),ge.stopPropagation(),xt(),I(void 0),xe?ze():i?.(),s?.()},[Pe,wt]=(0,no.useState)(!1),qo=()=>{let{id:ge,kind:Ct,type:Io,...Ke}=W;ee({...Ke,id:void 0,kind:void 0,type:void 0,url:void 0}),wt(!0)};(0,no.useEffect)(()=>{Pe&&(G.current?.focus(),wt(!1))},[Pe]);let $t=W?.url!==void 0?W.url:h||"",lr=!$t?.trim()?.length;(0,no.useEffect)(()=>{I(void 0)},[$t]);let ln=!B,je=i&&t&&!H&&!le,Eo=H&&xe,Ze=xe&&k,Ve=(H||!t)&&!le,gt=lr||!ln||t&&!K,To=!!o?.length&&H&&xe,cr=(0,no.useMemo)(()=>t?.kind==="taxonomy"&&!t?.url&&j.current?{...t,url:j.current}:t,[t]);return(0,Pt.jsxs)("div",{tabIndex:-1,ref:D,className:"block-editor-link-control",children:[le&&(0,Pt.jsxs)("div",{className:"block-editor-link-control__loading",children:[(0,Pt.jsx)(Qr.Spinner,{})," ",(0,Qs.__)("Creating"),"\u2026"]}),Ve&&(0,Pt.jsxs)(Pt.Fragment,{children:[(0,Pt.jsxs)("div",{className:V({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":Ze,"has-actions":Eo}),children:[Ze&&(0,Pt.jsx)(Qr.TextControl,{ref:U,className:"block-editor-link-control__field block-editor-link-control__text-content",label:(0,Qs.__)("Text"),value:W?.title,onChange:ce,onKeyDown:ar,__next40pxDefaultSize:!0}),(0,Pt.jsx)(vre,{ref:G,currentLink:t,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:e,value:$t,withCreateSuggestion:m,onCreateSuggestion:ne,onChange:re,onSelect:Wt,showInitialSuggestions:u,allowDirectEntry:!a,showSuggestions:c,suggestionsQuery:p,withURLSuggestion:!g,createSuggestionButtonText:b,hideLabelFromVision:!Ze,isEntity:Q,customValidity:B,suffix:(0,Pt.jsx)(lTe,{isEntity:Q,showActions:Eo,isDisabled:gt,onUnlink:qo,onSubmit:rt,helpTextId:J})}),Q&&J&&(0,Pt.jsx)("p",{id:J,className:"block-editor-link-control__help",children:(0,Qs.sprintf)((0,Qs.__)("Synced with the selected %s."),W?.type||"item")})]}),ve&&(0,Pt.jsx)(Qr.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1,children:ve})]}),t&&!H&&!le&&(0,Pt.jsx)(Ire,{value:cr,onEditClick:()=>X(!0),hasRichPreviews:v,hasUnlinkControl:je,onRemove:()=>{i(),X(!0)}},cr?.url),To&&(0,Pt.jsx)("div",{className:"block-editor-link-control__tools",children:!lr&&(0,Pt.jsx)(Qoe,{settingsOpen:T,setSettingsOpen:L,children:(0,Pt.jsx)(Rre,{value:W,settings:o,onChange:ie(z)})})}),Eo&&(0,Pt.jsxs)(Qr.__experimentalHStack,{justify:"right",className:"block-editor-link-control__search-actions",children:[(0,Pt.jsx)(Qr.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:At,children:(0,Qs.__)("Cancel")}),(0,Pt.jsx)(Qr.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:gt?lF:rt,className:"block-editor-link-control__search-submit","aria-disabled":gt,children:(0,Qs.__)("Apply")})]}),!le&&y&&y()]})}function lTe({isEntity:e,showActions:t,isDisabled:o,onUnlink:r,onSubmit:n,helpTextId:i}){if(e)return(0,Pt.jsx)(Qr.Button,{icon:Ci,onClick:r,"aria-describedby":i,showTooltip:!0,label:(0,Qs.__)("Unsync and edit"),__next40pxDefaultSize:!0});if(!t)return(0,Pt.jsx)(Qr.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Pt.jsx)(Qr.Button,{onClick:o?lF:n,label:(0,Qs.__)("Submit"),icon:bl,className:"block-editor-link-control__search-submit","aria-disabled":o,size:"small"})})}Jm.ViewerFill=xre;Jm.DEFAULT_LINK_SETTINGS=rF;var UI=e=>((0,Gre.default)("wp.blockEditor.__experimentalLinkControl",{since:"6.8",alternative:"wp.blockEditor.LinkControl"}),(0,Pt.jsx)(Jm,{...e}));UI.ViewerFill=Jm.ViewerFill;UI.DEFAULT_LINK_SETTINGS=Jm.DEFAULT_LINK_SETTINGS;var Pd=Jm;var $re=l(N(),1),Kre=l(A(),1),Yre=l(Re(),1);var qS=1.5,cF=.01,uF=10,dF="";function Wre(e){return e!==void 0&&e!==dF}var fF=l(w(),1),cTe=({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",...n})=>{let i=Wre(t),s=(d,f)=>{if(i)return d;let m=cF*uF;switch(`${d}`){case`${m}`:return qS+m;case"0":return f?d:qS-m;case"":return qS;default:return d}},a=(d,f)=>{let m=["insertText","insertFromPaste"].includes(f.payload.event.nativeEvent?.inputType),h=s(d.value,m);return{...d,value:h}},c=i?t:dF,u=(d,{event:f})=>{if(d===""){o();return}if(f.type==="click"){o(s(`${d}`,!1));return}o(`${d}`)};return!e&&(n.size===void 0||n.size==="default")&&(0,Yre.default)("36px default size for wp.blockEditor.LineHeightControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),(0,fF.jsx)("div",{className:"block-editor-line-height-control",children:(0,fF.jsx)(Kre.__experimentalNumberControl,{...n,__shouldNotWarnDeprecated36pxSize:!0,__next40pxDefaultSize:e,__unstableInputWidth:r,__unstableStateReducer:a,onChange:u,label:(0,$re.__)("Line height"),placeholder:qS,step:cF,spinFactor:uF,value:c,min:0,spinControls:"custom"})})},HI=cTe;var Ha=l(N(),1),qre=l(Xo(),1),Jr=l(A(),1),WI=l(F(),1),Zre=l(it(),1);var Xre=l(Z(),1),Qre=l(Fe(),1),Jre=l(Un(),1),ene=l(R(),1);function GI(e,t,o){if(o)return o;if(!t||typeof t!="object"||Object.keys(t).length===0)return e&&e.length>0?e.map(n=>`${n}/*`).join(","):void 0;if(!e||e.length===0)return;let r=[];for(let[,n]of Object.entries(t))e.some(s=>s.includes("/")?n===s:n.startsWith(`${s}/`))&&r.push(n);return r.length>0?r.join(","):e.map(n=>`${n}/*`).join(",")}var rr=l(w(),1),uTe=()=>{},dTe=0,fTe=({mediaURL:e,mediaId:t,mediaIds:o,allowedTypes:r,accept:n,onError:i,onSelect:s,onSelectURL:a,onReset:c,onToggleFeaturedImage:u,useFeaturedImage:d,onFilesUpload:f=uTe,name:m=(0,Ha.__)("Replace"),createNotice:h,removeNotice:p,children:g,multiple:b=!1,addToGallery:v,handleUpload:k=!0,variant:y,popoverProps:S,renderToggle:x,className:C})=>{let{mediaUpload:B,allowedMimeTypes:I}=(0,WI.useSelect)(z=>{let{getSettings:W}=z(_),ee=W();return{mediaUpload:ee.mediaUpload,allowedMimeTypes:ee.allowedMimeTypes}},[]),P=`block-editor/media-replace-flow/error-notice/${++dTe}`,E=(0,ene.useMemo)(()=>GI(r,I,n),[r,I,n]),L=z=>{let W=(0,Qre.__unstableStripHTML)(z);if(i){i(W);return}setTimeout(()=>{h("error",W,{speak:!0,id:P,isDismissible:!0})},1e3)},T=(z,W)=>{d&&u&&u(),W(),s(z),(0,qre.speak)((0,Ha.__)("The media file has been replaced")),p(P)},O=(z,W)=>{let ee=z.target.files;if(!k)return W(),s(ee);f(ee),B({allowedTypes:r,filesList:ee,onFileChange:([se])=>{T(se,W)},onError:L})},D=z=>{z.keyCode===Zre.DOWN&&(z.preventDefault(),z.target.click())},G=b&&(!r||r.length===0?!1:r.every(z=>z==="image"||z.startsWith("image/"))),j={...S,variant:y};return(0,rr.jsx)(Jr.Dropdown,{popoverProps:j,className:C,contentClassName:V("block-editor-media-replace-flow__options",y&&`is-variant-${y}`),renderToggle:({isOpen:z,onToggle:W})=>x?x({"aria-expanded":z,"aria-haspopup":"true",onClick:W,onKeyDown:D,children:m}):(0,rr.jsx)(Jr.ToolbarButton,{"aria-expanded":z,"aria-haspopup":"true",onClick:W,onKeyDown:D,children:m}),renderContent:({onClose:z})=>(0,rr.jsxs)(rr.Fragment,{children:[(0,rr.jsxs)(Jr.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu",children:[(0,rr.jsxs)(Ds,{children:[(0,rr.jsx)(qu,{gallery:G,addToGallery:v,multiple:b,value:b?o:t,onSelect:W=>T(W,z),allowedTypes:r,render:({open:W})=>(0,rr.jsx)(Jr.MenuItem,{icon:jp,onClick:W,children:(0,Ha.__)("Open Media Library")})}),(0,rr.jsx)(Jr.FormFileUpload,{onChange:W=>{O(W,z)},accept:E,multiple:!!b,render:({openFileDialog:W})=>(0,rr.jsx)(Jr.MenuItem,{icon:NN,onClick:()=>{W()},children:(0,Ha._x)("Upload","verb")})})]}),u&&(0,rr.jsx)(Jr.MenuItem,{icon:GL,onClick:u,isPressed:d,children:(0,Ha.__)("Use featured image")}),typeof g=="function"?g({onClose:z}):g,e&&c&&(0,rr.jsx)(Jr.MenuItem,{onClick:()=>{c(),z()},children:(0,Ha.__)("Reset")})]}),a&&(0,rr.jsxs)("form",{className:"block-editor-media-flow__url-input",children:[(0,rr.jsx)("span",{className:"block-editor-media-replace-flow__image-url-label",children:(0,Ha.__)("Current media URL:")}),(0,rr.jsx)(Pd,{value:{url:e},settings:[],showSuggestions:!1,onChange:({url:W})=>{a(W)},searchInputPlaceholder:(0,Ha.__)("Paste or type URL")})]})]})})},_b=(0,Xre.compose)([(0,WI.withDispatch)(e=>{let{createNotice:t,removeNotice:o}=e(Jre.store);return{createNotice:t,removeNotice:o}}),(0,Jr.withFilters)("editor.MediaReplaceFlow")])(fTe);var _o=l(A(),1),So=l(N(),1),Ld=l(R(),1),pne=l(F(),1);var hne=l(Re(),1);var pF=l(N(),1),KI=l(R(),1),xb=l(A(),1);var mne=l(Re(),1);var rne=l(N(),1),nne=l(A(),1);var tne=l(A(),1),$I=l(dn(),1),mF=l(w(),1);function one({url:e,urlLabel:t,className:o}){let r=V(o,"block-editor-url-popover__link-viewer-url");return e?(0,mF.jsx)(tne.ExternalLink,{className:r,href:e,children:t||(0,$I.filterURLForDisplay)((0,$I.safeDecodeURI)(e))}):(0,mF.jsx)("span",{className:r})}var ZS=l(w(),1);function ine({className:e,linkClassName:t,onEditLinkClick:o,url:r,urlLabel:n,...i}){return(0,ZS.jsxs)("div",{className:V("block-editor-url-popover__link-viewer",e),...i,children:[(0,ZS.jsx)(one,{url:r,urlLabel:n,className:t}),o&&(0,ZS.jsx)(nne.Button,{icon:Of,label:(0,rne.__)("Edit"),onClick:o,size:"compact"})]})}var une=l(N(),1),dne=l(A(),1);var kc=l(N(),1),XS=l(R(),1),Js=l(it(),1),Tn=l(A(),1),Rd=l(Z(),1),sne=l(F(),1),ane=l(dn(),1);var Ga=l(w(),1),lne=l(jr(),1),{ValidatedInputControl:mTe}=M(Tn.privateApis);function cne(e){return typeof e=="function"}var pTe=class extends XS.Component{constructor(e){super(e),this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.selectLink=this.selectLink.bind(this),this.handleOnClick=this.handleOnClick.bind(this),this.bindSuggestionNode=this.bindSuggestionNode.bind(this),this.autocompleteRef=e.autocompleteRef||(0,XS.createRef)(),this.inputRef=e.inputRef||(0,XS.createRef)(),this.hasRenderedValidation={current:!1},this.updateSuggestions=(0,Rd.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.suggestionsRequest=null,this.state={suggestions:[],showSuggestions:!1,suggestionsValue:null,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){let{showSuggestions:t,selectedSuggestion:o}=this.state,{value:r,__experimentalShowInitialSuggestions:n=!1}=this.props;t&&o!==null&&this.suggestionNodes[o]&&this.suggestionNodes[o].scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"}),e.value!==r&&!this.props.disableSuggestions&&(r?.length?this.updateSuggestions(r):n&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){let{__experimentalShowInitialSuggestions:e=!1,value:t}=this.props;return e&&!(t&&t.length)}updateSuggestions(e=""){let{__experimentalFetchLinkSuggestions:t,__experimentalHandleURLSuggestions:o}=this.props;if(!t)return;let r=!e?.length;if(e=e.trim(),!r&&(e.length<2||!o&&(0,ane.isURL)(e))){this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null,this.setState({suggestions:[],showSuggestions:!1,suggestionsValue:e,selectedSuggestion:null,loading:!1});return}this.setState({selectedSuggestion:null,loading:!0});let n=t(e,{isInitialSuggestions:r});n.then(i=>{this.suggestionsRequest===n&&(this.setState({suggestions:i,suggestionsValue:e,loading:!1,showSuggestions:!!i.length}),i.length?this.props.debouncedSpeak((0,kc.sprintf)((0,kc._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",i.length),i.length),"assertive"):this.props.debouncedSpeak((0,kc.__)("No results."),"assertive"))}).catch(()=>{this.suggestionsRequest===n&&this.setState({loading:!1})}).finally(()=>{this.suggestionsRequest===n&&(this.suggestionsRequest=null)}),this.suggestionsRequest=n}onChange(e){this.props.onChange(e)}onFocus(){let{suggestions:e}=this.state,{disableSuggestions:t,value:o}=this.props;o&&!t&&!(e&&e.length)&&this.suggestionsRequest===null&&this.updateSuggestions(o)}onKeyDown(e){this.props.onKeyDown?.(e);let{showSuggestions:t,selectedSuggestion:o,suggestions:r,loading:n}=this.state;if(!t||!r.length||n){switch(e.keyCode){case Js.UP:{e.target.selectionStart!==0&&(e.preventDefault(),e.target.setSelectionRange(0,0));break}case Js.DOWN:{this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break}case Js.ENTER:{this.props.onSubmit&&(e.preventDefault(),this.props.onSubmit(null,e));break}}return}let i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case Js.UP:{e.preventDefault();let s=o?o-1:r.length-1;this.setState({selectedSuggestion:s});break}case Js.DOWN:{e.preventDefault();let s=o===null||o===r.length-1?0:o+1;this.setState({selectedSuggestion:s});break}case Js.TAB:{this.state.selectedSuggestion!==null&&(this.selectLink(i),this.props.speak((0,kc.__)("Link selected.")));break}case Js.ENTER:{e.preventDefault(),this.state.selectedSuggestion!==null?(this.selectLink(i),this.props.onSubmit&&this.props.onSubmit(i,e)):this.props.onSubmit&&this.props.onSubmit(null,e);break}}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps({value:e,instanceId:t,disableSuggestions:o,__experimentalShowInitialSuggestions:r=!1},{showSuggestions:n}){let i=n,s=e&&e.length;return!r&&!s&&(i=!1),o===!0&&(i=!1),{showSuggestions:i,suggestionsListboxId:`block-editor-url-input-suggestions-${t}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${t}`}}render(){return(0,Ga.jsxs)(Ga.Fragment,{children:[this.renderControl(),this.renderSuggestions()]})}renderControl(){let{label:e=null,className:t,isFullWidth:o,instanceId:r,placeholder:n=(0,kc.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:s="",hideLabelFromVision:a=!1,help:c=null,disabled:u=!1,customValidity:d,markWhenOptional:f}=this.props,{loading:m,showSuggestions:h,selectedSuggestion:p,suggestionsListboxId:g,suggestionOptionIdPrefix:b}=this.state,v=`url-input-control-${r}`,k={id:v,label:e,className:V("block-editor-url-input",t,{"is-full-width":o}),hideLabelFromVision:a},y={id:v,value:s,required:this.props.required??!0,type:"text",name:v,autoComplete:"off",onChange:u?()=>{}:this.onChange,onFocus:u?()=>{}:this.onFocus,placeholder:n,onKeyDown:u?()=>{}:this.onKeyDown,role:"combobox","aria-label":e?void 0:(0,kc.__)("URL"),"aria-expanded":h,"aria-autocomplete":"list","aria-owns":g,"aria-activedescendant":p!==null?`${b}-${p}`:void 0,ref:this.inputRef,disabled:u,suffix:this.props.suffix,help:c},S={customValidity:d,...f!==void 0&&{markWhenOptional:f}};if(i)return i(k,y,m);d!==void 0&&(this.hasRenderedValidation.current=!0);let x=this.hasRenderedValidation.current?mTe:Tn.__experimentalInputControl;return(0,Ga.jsxs)(Tn.BaseControl,{...k,children:[(0,Ga.jsx)(x,{...y,...this.hasRenderedValidation.current?S:{},__next40pxDefaultSize:!0}),m&&(0,Ga.jsx)(Tn.Spinner,{})]})}renderSuggestions(){let{className:e,__experimentalRenderSuggestions:t}=this.props,{showSuggestions:o,suggestions:r,suggestionsValue:n,selectedSuggestion:i,suggestionsListboxId:s,suggestionOptionIdPrefix:a,loading:c}=this.state;if(!o||r.length===0)return null;let u={id:s,ref:this.autocompleteRef,role:"listbox"},d=(f,m)=>({role:"option",tabIndex:"-1",id:`${a}-${m}`,ref:this.bindSuggestionNode(m),"aria-selected":m===i?!0:void 0});return cne(t)?t({suggestions:r,selectedSuggestion:i,suggestionsListProps:u,buildSuggestionItemProps:d,isLoading:c,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!n?.length,currentInputValue:n}):(0,Ga.jsx)(Tn.Popover,{placement:"bottom",focusOnMount:!1,children:(0,Ga.jsx)("div",{...u,className:V("block-editor-url-input__suggestions",{[`${e}__suggestions`]:e}),children:r.map((f,m)=>(0,lne.createElement)(Tn.Button,{__next40pxDefaultSize:!0,...d(f,m),key:f.id,className:V("block-editor-url-input__suggestion",{"is-selected":m===i}),onClick:()=>this.handleOnClick(f)},f.title))})})}},Td=(0,Rd.compose)(Rd.withSafeTimeout,Tn.withSpokenMessages,Rd.withInstanceId,(0,sne.withSelect)((e,t)=>{if(cne(t.__experimentalFetchLinkSuggestions))return;let{getSettings:o}=e(_);return{__experimentalFetchLinkSuggestions:o().__experimentalFetchLinkSuggestions}}))(pTe);var QS=l(w(),1);function fne({autocompleteRef:e,className:t,onChangeInputValue:o,value:r,...n}){return(0,QS.jsxs)("form",{className:V("block-editor-url-popover__link-editor",t),...n,children:[(0,QS.jsx)(Td,{value:r,onChange:o,autocompleteRef:e}),(0,QS.jsx)(dne.Button,{icon:bl,label:(0,une.__)("Apply"),type:"submit",size:"compact"})]})}var Od=l(w(),1),{__experimentalPopoverLegacyPositionToPlacement:hTe}=M(xb.privateApis),gTe="bottom",hF=(0,KI.forwardRef)(({additionalControls:e,children:t,renderSettings:o,placement:r,focusOnMount:n="firstElement",position:i,...s},a)=>{i!==void 0&&(0,mne.default)("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"});let c;r!==void 0?c=r:i!==void 0&&(c=hTe(i)),c=c||gTe;let[u,d]=(0,KI.useState)(!1),f=!!o&&u,m=()=>{d(!u)};return(0,Od.jsxs)(xb.Popover,{ref:a,role:"dialog","aria-modal":"true","aria-label":(0,pF.__)("Edit URL"),className:"block-editor-url-popover",focusOnMount:n,placement:c,shift:!0,variant:"toolbar",...s,children:[(0,Od.jsx)("div",{className:"block-editor-url-popover__input-container",children:(0,Od.jsxs)("div",{className:"block-editor-url-popover__row",children:[t,!!o&&(0,Od.jsx)(xb.Button,{className:"block-editor-url-popover__settings-toggle",icon:zn,label:(0,pF.__)("Link settings"),onClick:m,"aria-expanded":u,size:"compact"})]})}),f&&(0,Od.jsx)("div",{className:"block-editor-url-popover__settings",children:o()}),e&&!f&&(0,Od.jsx)("div",{className:"block-editor-url-popover__additional-controls",children:e})]})});hF.LinkEditor=fne;hF.LinkViewer=ine;var Ad=hF;var Ge=l(w(),1),bTe=()=>{},kTe=({src:e,onChange:t,onSubmit:o,onClose:r,popoverAnchor:n})=>(0,Ge.jsx)(Ad,{anchor:n,onClose:r,children:(0,Ge.jsx)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:o,children:(0,Ge.jsx)(_o.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,So.__)("URL"),type:"text",hideLabelFromVision:!0,placeholder:(0,So.__)("Paste or type URL"),onChange:t,value:e,suffix:(0,Ge.jsx)(_o.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Ge.jsx)(_o.Button,{size:"small",icon:bl,label:(0,So.__)("Apply"),type:"submit"})})})})}),vTe=({src:e,onChangeSrc:t,onSelectURL:o})=>{let[r,n]=(0,Ld.useState)(null),[i,s]=(0,Ld.useState)(!1),a=()=>{s(!0)},c=()=>{s(!1),r?.focus()},u=d=>{d.preventDefault(),e&&o&&(o(e),c())};return(0,Ge.jsxs)("div",{className:"block-editor-media-placeholder__url-input-container",children:[(0,Ge.jsx)(_o.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:a,isPressed:i,variant:"secondary","aria-haspopup":"dialog",ref:n,children:(0,So.__)("Insert from URL")}),i&&(0,Ge.jsx)(kTe,{src:e,onChange:t,onSubmit:u,onClose:c,popoverAnchor:r})]})};function yTe({value:e={},allowedTypes:t,className:o,icon:r,labels:n={},mediaPreview:i,notices:s,isAppender:a,accept:c,addToGallery:u,multiple:d=!1,handleUpload:f=!0,disableDropZone:m,disableMediaButtons:h,onError:p,onSelect:g,onCancel:b,onSelectURL:v,onToggleFeaturedImage:k,onDoubleClick:y,onFilesPreUpload:S=bTe,onHTMLDrop:x,children:C,mediaLibraryButton:B,placeholder:I,style:P}){x&&(0,hne.default)("wp.blockEditor.MediaPlaceholder onHTMLDrop prop",{since:"6.2",version:"6.4"});let{mediaUpload:E,allowedMimeTypes:L}=(0,pne.useSelect)(Y=>{let{getSettings:J}=Y(_),K=J();return{mediaUpload:K.mediaUpload,allowedMimeTypes:K.allowedMimeTypes}},[]),[T,O]=(0,Ld.useState)("");(0,Ld.useEffect)(()=>{O(e?.src??"")},[e?.src]);let D=(0,Ld.useMemo)(()=>GI(t,L,c),[t,L,c]),U=()=>!t||t.length===0?!1:t.every(Y=>Y==="image"||Y.startsWith("image/")),G=Y=>{if(!f||typeof f=="function"&&!f(Y))return g(Y);S(Y);let J;if(d)if(u){let K=[];J=H=>{let X=(e??[]).filter(ne=>ne.id?!K.some(({id:le})=>Number(le)===Number(ne.id)):!K.some(({urlSlug:le})=>ne.url.includes(le)));g(X.concat(H)),K=H.map(ne=>{let le=ne.url.lastIndexOf("."),ve=ne.url.slice(0,le);return{id:ne.id,urlSlug:ve}})}}else J=g;else J=([K])=>g(K);E({allowedTypes:t,filesList:Y,onFileChange:J,onError:p,multiple:d})};async function j(Y){let{blocks:J}=tV(Y);if(!J?.length)return;let K=await Promise.all(J.map(H=>{let X=H.name.split("/")[1];return H.attributes.id?(H.attributes.type=X,H.attributes):new Promise((ne,le)=>{window.fetch(H.attributes.url).then(ve=>ve.blob()).then(ve=>E({filesList:[ve],additionalData:{title:H.attributes.title,alt_text:H.attributes.alt,caption:H.attributes.caption,type:X},onFileChange:([he])=>{he.id&&ne(he)},allowedTypes:t,onError:le})).catch(()=>ne(H.attributes.url))})})).catch(H=>p(H));K?.length&&g(d?K:K[0])}let z=Y=>{G(Y.target.files)},ee=I??(Y=>{let{instructions:J,title:K}=n;if(!E&&!v&&(J=(0,So.__)("To edit this block, you need permission to upload media.")),J===void 0||K===void 0){let X=t??[],[ne]=X,le=X.length===1,ve=le&&ne==="audio",he=le&&ne==="image",xe=le&&ne==="video";J===void 0&&E&&(J=(0,So.__)("Drag and drop an image or video, upload, or choose from your library."),ve?J=(0,So.__)("Drag and drop an audio file, upload, or choose from your library."):he?J=(0,So.__)("Drag and drop an image, upload, or choose from your library."):xe&&(J=(0,So.__)("Drag and drop a video, upload, or choose from your library."))),K===void 0&&(K=(0,So.__)("Media"),ve?K=(0,So.__)("Audio"):he?K=(0,So.__)("Image"):xe&&(K=(0,So.__)("Video")))}let H=V("block-editor-media-placeholder",o,{"is-appender":a});return(0,Ge.jsxs)(_o.Placeholder,{icon:r,label:K,instructions:J,className:H,notices:s,onDoubleClick:y,preview:i,style:P,children:[Y,C]})}),se=()=>m?null:(0,Ge.jsx)(_o.DropZone,{onFilesDrop:G,onDrop:j,isEligible:Y=>{let J="wp-block:core/",K=[];for(let H of Y.types)H.startsWith(J)&&K.push(H.slice(J.length));return K.every(H=>t.includes(H))&&(d?!0:K.length===1)}}),ce=()=>b&&(0,Ge.jsx)(_o.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__cancel-button",title:(0,So.__)("Cancel"),variant:"link",onClick:b,children:(0,So.__)("Cancel")}),ie=()=>v&&(0,Ge.jsx)(vTe,{src:T,onChangeSrc:O,onSelectURL:v}),re=()=>k&&(0,Ge.jsx)("div",{className:"block-editor-media-placeholder__url-input-container",children:(0,Ge.jsx)(_o.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:k,variant:"secondary",children:(0,So.__)("Use featured image")})}),Q=()=>{let J=B??(({open:H})=>(0,Ge.jsx)(_o.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{H()},children:(0,So.__)("Media Library")})),K=(0,Ge.jsx)(qu,{addToGallery:u,gallery:d&&U(),multiple:d,onSelect:g,allowedTypes:t,mode:"browse",value:Array.isArray(e)?e.map(({id:H})=>H):e.id,render:J});if(E&&a)return(0,Ge.jsxs)(Ge.Fragment,{children:[se(),(0,Ge.jsx)(_o.FormFileUpload,{onChange:z,accept:D,multiple:!!d,render:({openFileDialog:H})=>{let X=(0,Ge.jsxs)(Ge.Fragment,{children:[(0,Ge.jsx)(_o.Button,{__next40pxDefaultSize:!0,variant:"primary",className:V("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:H,children:(0,So._x)("Upload","verb")}),K,ie(),re(),ce()]});return ee(X)}})]});if(E){let H=(0,Ge.jsxs)(Ge.Fragment,{children:[se(),(0,Ge.jsx)(_o.FormFileUpload,{render:({openFileDialog:X})=>(0,Ge.jsx)(_o.Button,{__next40pxDefaultSize:!0,onClick:X,variant:"primary",className:V("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),children:(0,So._x)("Upload","verb")}),onChange:z,accept:D,multiple:!!d}),K,ie(),re(),ce()]});return ee(H)}return ee(K)};return h?(0,Ge.jsx)(Ds,{children:se()}):(0,Ge.jsx)(Ds,{fallback:ee(ie()),children:Q()})}var gne=(0,_o.withFilters)("editor.MediaPlaceholder")(yTe);var bne=l(w(),1),STe=({colorSettings:e,...t})=>{let o=e.map(r=>{if(!r)return r;let{value:n,onChange:i,...s}=r;return{...s,colorValue:n,onColorChange:i}});return(0,bne.jsx)(pI,{settings:o,gradients:[],disableCustomGradients:!0,...t})},kne=STe;var pie=l(FM(),1);var hie=l(R(),1);var die=l(R(),1);var iie=l(yf(),1),nr=l(R(),1),Md=l(F(),1),lP=l(Z(),1),sie=l(dr(),1),aie=l(A(),1),lie=l($(),1),cie=l(Re(),1),Ab=l(N(),1);var vne=l(N(),1),YI=l(A(),1);var gF=l(N(),1),ep=l(A(),1);var vc=l(w(),1),_Te={placement:"bottom-start"},xTe=()=>(0,vc.jsxs)(vc.Fragment,{children:[["bold","italic","link","unknown"].map(e=>(0,vc.jsx)(ep.Slot,{name:`RichText.ToolbarControls.${e}`},e)),(0,vc.jsx)(ep.Slot,{name:"RichText.ToolbarControls",children:e=>{if(!e.length)return null;let o=e.map(([{props:r}])=>r).some(({isActive:r})=>r);return(0,vc.jsx)(ep.ToolbarItem,{children:r=>(0,vc.jsx)(ep.DropdownMenu,{icon:zn,label:(0,gF.__)("More"),toggleProps:{...r,className:V(r.className,{"is-pressed":o}),description:(0,gF.__)("Displays more block tools")},controls:ma(e.map(([{props:n}])=>n),"title"),popoverProps:_Te})})}})]}),bF=xTe;var Nd=l(w(),1);function wTe({popoverAnchor:e}){return(0,Nd.jsx)(YI.Popover,{placement:"top",focusOnMount:!1,anchor:e,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar",children:(0,Nd.jsx)(Bg,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,vne.__)("Format tools"),children:(0,Nd.jsx)(YI.ToolbarGroup,{children:(0,Nd.jsx)(bF,{})})})})}var CTe=({inline:e,editableContentElement:t})=>e?(0,Nd.jsx)(wTe,{popoverAnchor:t}):(0,Nd.jsx)(Mt,{group:"inline",children:(0,Nd.jsx)(bF,{})}),yne=CTe;var qI=l(R(),1),Sne=l(F(),1);function _ne({html:e,value:t}){let o=(0,qI.useRef)(),r=!!t.activeFormats?.length,{__unstableMarkLastChangeAsPersistent:n}=(0,Sne.useDispatch)(_);(0,qI.useLayoutEffect)(()=>{if(!o.current){o.current=t.text;return}if(o.current!==t.text){let i=window.setTimeout(()=>{n()},1e3);return o.current=t.text,()=>{window.clearTimeout(i)}}n()},[e,r])}var Bb=l(R(),1),jne=l(Z(),1);var JS=l(dr(),1),xne=l(ut(),1);var BTe=["`",'"',"'","\u201C\u201D","\u2018\u2019"],wne=e=>t=>{function o(r){let{inputType:n,data:i}=r,{value:s,onChange:a,registry:c}=e.current;if(n!=="insertText"||(0,JS.isCollapsed)(s))return;let u=(0,xne.applyFilters)("blockEditor.wrapSelectionSettings",BTe).find(([x,C])=>x===i||C===i);if(!u)return;let[d,f=d]=u,m=s.start,h=s.end+d.length,p=(0,JS.insert)(s,d,m,m);p=(0,JS.insert)(p,f,h,h);let{__unstableMarkLastChangeAsPersistent:g,__unstableMarkAutomaticChange:b}=c.dispatch(_);g(),a(p),b();let v={};for(let x in r)v[x]=r[x];v.data=f;let{ownerDocument:k}=t,{defaultView:y}=k,S=new y.InputEvent("input",v);window.queueMicrotask(()=>{r.target.dispatchEvent(S)}),r.preventDefault()}return t.addEventListener("beforeinput",o),()=>{t.removeEventListener("beforeinput",o)}};var ZI=l(dr(),1),wb=l($(),1);var Cne=l(dr(),1);function Bne(e){let t="tales of gutenberg",o=" \u{1F421}\u{1F422}\u{1F980}\u{1F424}\u{1F98B}\u{1F418}\u{1F427}\u{1F439}\u{1F981}\u{1F984}\u{1F98D}\u{1F43C}\u{1F43F}\u{1F383}\u{1F434}\u{1F41D}\u{1F406}\u{1F995}\u{1F994}\u{1F331}\u{1F347}\u03C0\u{1F34C}\u{1F409}\u{1F4A7}\u{1F968}\u{1F30C}\u{1F342}\u{1F360}\u{1F966}\u{1F95A}\u{1F95D}\u{1F39F}\u{1F965}\u{1F952}\u{1F6F5}\u{1F956}\u{1F352}\u{1F36F}\u{1F3BE}\u{1F3B2}\u{1F43A}\u{1F41A}\u{1F42E}\u231B\uFE0F",{start:r,text:n}=e;return r<t.length||n.slice(r-t.length,r).toLowerCase()!==t?e:(0,Cne.insert)(e,o)}function Ene(e){let t=e.length;for(;t--;){let o=Lv(e[t].attributes);if(o)return e[t].attributes[o]=e[t].attributes[o].toString().replace(wl,""),[e[t].clientId,o,0,0];let r=Ene(e[t].innerBlocks);if(r)return r}return[]}var Tne=e=>t=>{function o(){let{getValue:n,onReplace:i,selectionChange:s,registry:a}=e.current;if(!i)return;let c=n(),{start:u,text:d}=c;if(d.slice(u-1,u)!==" ")return;let m=d.slice(0,u).trim(),h=(0,wb.getBlockTransforms)("from").filter(({type:v})=>v==="prefix"),p=(0,wb.findTransform)(h,({prefix:v})=>m===v);if(!p)return;let g=(0,ZI.toHTMLString)({value:(0,ZI.insert)(c,wl,0,u)}),b=p.transform(g);return s(...Ene([b])),i([b]),a.dispatch(_).__unstableMarkAutomaticChange(),!0}function r(n){let{inputType:i,type:s}=n,{getValue:a,onChange:c,__unstableAllowPrefixTransformations:u,formatTypes:d,registry:f,onReplace:m}=e.current;if(i!=="insertText"&&s!=="compositionend"||u&&o())return;let h=a(),p=(0,wb.getBlockTransforms)("from").filter(y=>y.type==="input"),g=(0,wb.findTransform)(p,y=>y.regExp.test(h.text));if(g){m(g.transform()),f.dispatch(_).__unstableMarkAutomaticChange();return}let b=d.reduce((y,{__unstableInputRule:S})=>(S&&(y=S(y)),y),Bne(h)),{__unstableMarkLastChangeAsPersistent:v,__unstableMarkAutomaticChange:k}=f.dispatch(_);b!==h&&(v(),c({...b,activeFormats:h.activeFormats}),k())}return t.addEventListener("input",r),t.addEventListener("compositionend",r),()=>{t.removeEventListener("input",r),t.removeEventListener("compositionend",r)}};var Ine=e=>t=>{function o(r){if(r.inputType!=="insertReplacementText")return;let{registry:n}=e.current;n.dispatch(_).__unstableMarkLastChangeAsPersistent()}return t.addEventListener("beforeinput",o),()=>{t.removeEventListener("beforeinput",o)}};var XI=l(it(),1),Pne=()=>e=>{function t(o){(XI.isKeyboardEvent.primary(o,"z")||XI.isKeyboardEvent.primary(o,"y")||XI.isKeyboardEvent.primaryShift(o,"z"))&&o.preventDefault()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}};var Rne=e=>t=>{let{keyboardShortcuts:o}=e.current;function r(n){for(let i of o.current)i(n)}return t.addEventListener("keydown",r),()=>{t.removeEventListener("keydown",r)}};var One=e=>t=>{let{inputEvents:o}=e.current;function r(n){for(let i of o.current)i(n)}return t.addEventListener("input",r),()=>{t.removeEventListener("input",r)}};var QI=l(it(),1);var Ane=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented||n!==QI.BACKSPACE&&n!==QI.ESCAPE)return;let{registry:i}=e.current,{didAutomaticChange:s,getSettings:a}=i.select(_),{__experimentalUndo:c}=a();c&&s()&&(r.preventDefault(),c())}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}};var Nne=l($(),1),Wa=l(dr(),1),Mne=l(dn(),1);var ETe=l(R(),1),TTe=l($(),1),ITe=l(w(),1);function Lne(e,t){if(t?.length){let o=e.formats.length;for(;o--;)e.formats[o]=[...t,...e.formats[o]||[]]}}function JI(e){if(!(e!==!0&&e!=="p"&&e!=="li"))return e===!0?"p":e}function Cb({allowedFormats:e,disableFormats:t}){return t?Cb.EMPTY_ARRAY:e}Cb.EMPTY_ARRAY=[];var Dne=e=>t=>{function o(n){let{disableFormats:i,onChange:s,value:a,formatTypes:c,tagName:u,onReplace:d,__unstableEmbedURLOnPaste:f,preserveWhiteSpace:m,pastePlainText:h}=e.current;if(!t.contains(n.target)||n.defaultPrevented)return;let{plainText:p,html:g}=Ah(n);if(n.preventDefault(),window.console.log(`Received HTML (RichText):

`,g),window.console.log(`Received plain text (RichText):

`,p),i){s((0,Wa.insert)(a,p));return}let b=n.clipboardData.getData("rich-text")==="true";function v(x){let C=c.reduce((B,{__unstablePasteRule:I})=>(I&&B===a&&(B=I(a,{html:g,plainText:p})),B),a);if(C!==a)s(C);else{let B=(0,Wa.create)({html:x});Lne(B,a.activeFormats),s((0,Wa.insert)(a,B))}}if(b){v(g);return}if(h){s((0,Wa.insert)(a,(0,Wa.create)({text:p})));return}let k="INLINE",y=p.trim();f&&(0,Wa.isEmpty)(a)&&(0,Mne.isURL)(y)&&/^https?:/.test(y)&&(k="BLOCKS");let S=(0,Nne.pasteHandler)({HTML:g,plainText:p,mode:k,tagName:u,preserveWhiteSpace:m});typeof S=="string"?v(S):S.length>0&&d&&(0,Wa.isEmpty)(a)&&d(S,S.length-1,-1)}let{defaultView:r}=t.ownerDocument;return r.addEventListener("paste",o),()=>{r.removeEventListener("paste",o)}};var e_=l(it(),1),eP=l(dr(),1),Vne=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented)return;let{value:i,onMerge:s,onRemove:a}=e.current;if(n===e_.DELETE||n===e_.BACKSPACE){let{start:c,end:u,text:d}=i,f=n===e_.BACKSPACE,m=i.activeFormats&&!!i.activeFormats.length;if(!(0,eP.isCollapsed)(i)||m||f&&c!==0||!f&&u!==d.length)return;s?s(!f):a&&(0,eP.isEmpty)(i)&&f&&a(!f),r.preventDefault()}}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}};var kF=l(it(),1),t_=l(dr(),1),Fne=e=>t=>{function o(i){if(i.keyCode!==kF.ENTER)return;let{onReplace:s,onSplit:a}=e.current;s&&a&&(i.__deprecatedOnSplit=!0)}function r(i){if(i.defaultPrevented||i.target!==t||i.keyCode!==kF.ENTER)return;let{value:s,onChange:a,disableLineBreaks:c,onSplitAtEnd:u,onSplitAtDoubleLineEnd:d,registry:f}=e.current;i.preventDefault();let{text:m,start:h,end:p}=s;i.shiftKey?c||a((0,t_.insert)(s,`
`)):u&&h===p&&p===m.length?u():d&&h===p&&p===m.length&&m.slice(-2)===`

`?f.batch(()=>{let g={...s};g.start=g.end-2,a((0,t_.remove)(g)),d()}):c||a((0,t_.insert)(s,`
`))}let{defaultView:n}=t.ownerDocument;return n.addEventListener("keydown",r),t.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",r),t.removeEventListener("keydown",o)}};var zne=e=>t=>{function o(){let{registry:r}=e.current;if(!r.select(_).isMultiSelecting())return;let n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",o),()=>{t.removeEventListener("focus",o)}};var PTe=[wne,Tne,Ine,Pne,Rne,One,Ane,Dne,Vne,Fne,zne];function tP(e){let t=(0,Bb.useRef)(e);(0,Bb.useInsertionEffect)(()=>{t.current=e});let o=(0,Bb.useMemo)(()=>PTe.map(r=>r(t)),[t]);return(0,jne.useRefEffect)(r=>{if(!e.isSelected)return;let n=o.map(i=>i(r));return()=>{n.forEach(i=>i())}},[o,e.isSelected])}var oP=l(dr(),1),rP=l(R(),1);var Une=l(w(),1),Hne=l(jr(),1),RTe={},vF=Symbol("usesContext");function OTe({onChange:e,onFocus:t,value:o,forwardedRef:r,settings:n,isVisible:i}){let{name:s,edit:a,[vF]:c}=n,u=(0,rP.useContext)(xr),d=(0,rP.useMemo)(()=>c?Object.fromEntries(Object.entries(u).filter(([g])=>c.includes(g))):RTe,[c,u]);if(!a)return null;let f=(0,oP.getActiveFormat)(o,s),m=f!==void 0,h=(0,oP.getActiveObject)(o),p=h!==void 0&&h.type===s;return(0,Une.jsx)(a,{isActive:m,isVisible:i,activeAttributes:m?f.attributes||{}:{},isObjectActive:p,activeObjectAttributes:p?h.attributes||{}:{},value:o,onChange:e,onFocus:t,contentRef:r,context:d},s)}function nP({formatTypes:e,...t}){return e.map(o=>(0,Hne.createElement)(OTe,{settings:o,...t,key:o.name}))}var Gne=l(R(),1),Wne=l($(),1),$ne=l(Re(),1);var yF=l(w(),1);function SF(e,t){if(Eb.isEmpty(e)){let o=JI(t);return o?`<${o}></${o}>`:""}return Array.isArray(e)?((0,$ne.default)("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),Wne.children.toHTML(e)):typeof e=="string"?e:e.toHTMLString()}function o_({value:e,tagName:t,multiline:o,format:r,...n}){return e=(0,yF.jsx)(Gne.RawHTML,{children:SF(e,o)}),t?(0,yF.jsx)(t,{...n,children:e}):e}var Xne=l(R(),1),xF=l($(),1),Qne=l(dr(),1),Jne=l(Re(),1);var Kne=l(R(),1),Yne=l(Re(),1),iP=l(F(),1),qne=l(it(),1),Tb=l(dr(),1);var _F=l(w(),1);function ATe({children:e,identifier:t,tagName:o="div",value:r="",onChange:n,multiline:i,...s},a){(0,Yne.default)("wp.blockEditor.RichText multiline prop",{since:"6.1",version:"6.3",alternative:"nested blocks (InnerBlocks)",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/"});let{clientId:c}=Ie(),{getSelectionStart:u,getSelectionEnd:d}=(0,iP.useSelect)(_),{selectionChange:f}=(0,iP.useDispatch)(_),m=JI(i);r=r||`<${m}></${m}>`;let p=`</${m}>${r}<${m}>`.split(`</${m}><${m}>`);p.shift(),p.pop();function g(b){n(`<${m}>${b.join(`</${m}><${m}>`)}</${m}>`)}return(0,_F.jsx)(o,{ref:a,children:p.map((b,v)=>(0,_F.jsx)(sP,{identifier:`${t}-${v}`,tagName:m,value:b,onChange:k=>{let y=p.slice();y[v]=k,g(y)},isSelected:void 0,onKeyDown:k=>{if(k.keyCode!==qne.ENTER)return;k.preventDefault();let{offset:y}=u(),{offset:S}=d();if(typeof y!="number"||typeof S!="number")return;let x=(0,Tb.create)({html:b});x.start=y,x.end=S;let C=(0,Tb.split)(x).map(I=>(0,Tb.toHTMLString)({value:I})),B=p.slice();B.splice(v,1,...C),g(B),f(c,`${t}-${v+1}`,0,0)},onMerge:k=>{let y=p.slice(),S=0;if(k){if(!y[v+1])return;y.splice(v,2,y[v]+y[v+1]),S=y[v].length-1}else{if(!y[v-1])return;y.splice(v-1,2,y[v-1]+y[v]),S=y[v-1].length-1}g(y),f(c,`${t}-${v-(k?0:1)}`,S,S)},...s},v))})}var Zne=(0,Kne.forwardRef)(ATe);var eie=l(w(),1);function tie(e){return(0,Xne.forwardRef)((t,o)=>{let r=t.value,n=t.onChange;Array.isArray(r)&&((0,Jne.default)("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),r=xF.children.toHTML(t.value),n=s=>t.onChange(xF.children.fromDOM((0,Qne.__unstableCreateElement)(document,s).childNodes)));let i=t.multiline?Zne:e;return(0,eie.jsx)(i,{...t,value:r,onChange:n,ref:o})})}var oie=l(it(),1),Ib=l(R(),1);function wF({character:e,type:t,onUse:o}){let r=(0,Ib.useContext)(Pb),n=(0,Ib.useRef)();return n.current=o,(0,Ib.useEffect)(()=>{function i(s){oie.isKeyboardEvent[t](s,e)&&(n.current(),s.preventDefault())}return r.current.add(i),()=>{r.current.delete(i)}},[e,t]),null}var aP=l(A(),1),rie=l(it(),1),CF=l(w(),1);function BF({name:e,shortcutType:t,shortcutCharacter:o,...r}){let n,i="RichText.ToolbarControls";return e&&(i+=`.${e}`),t&&o&&(n=rie.displayShortcut[t](o)),(0,CF.jsx)(aP.Fill,{name:i,children:(0,CF.jsx)(aP.ToolbarButton,{...r,shortcut:n})})}var Rb=l(R(),1);function EF({inputType:e,onInput:t}){let o=(0,Rb.useContext)(Ob),r=(0,Rb.useRef)();return r.current=t,(0,Rb.useEffect)(()=>{function n(i){i.inputType===e&&(r.current(),i.preventDefault())}return o.current.add(n),()=>{o.current.delete(n)}},[e]),null}var di=l(w(),1),{useRichText:LTe}=M(sie.privateApis),Pb=(0,nr.createContext)();Pb.displayName="keyboardShortcutContext";var Ob=(0,nr.createContext)();Ob.displayName="inputEventContext";var nie=Symbol("instanceId");function uie(e){let{__unstableMobileNoFocusOnMount:t,deleteEnter:o,placeholderTextColor:r,textAlign:n,selectionColor:i,tagsToEliminate:s,disableEditingMenu:a,fontSize:c,fontFamily:u,fontWeight:d,fontStyle:f,minWidth:m,maxWidth:h,disableSuggestions:p,disableAutocorrection:g,...b}=e;return b}function sP({children:e,tagName:t="div",value:o="",onChange:r,isSelected:n,multiline:i,inlineToolbar:s,wrapperClassName:a,autocompleters:c,onReplace:u,placeholder:d,allowedFormats:f,withoutInteractiveFormatting:m,onRemove:h,onMerge:p,onSplit:g,__unstableOnSplitAtEnd:b,__unstableOnSplitAtDoubleLineEnd:v,identifier:k,preserveWhiteSpace:y,__unstablePastePlainText:S,__unstableEmbedURLOnPaste:x,__unstableDisableFormats:C,disableLineBreaks:B,__unstableAllowPrefixTransformations:I,readOnly:P,...E},L){E=uie(E),g&&(0,cie.default)("wp.blockEditor.RichText onSplit prop",{since:"6.4",alternative:'block.json support key: "splitting"'});let T=(0,lP.useInstanceId)(sP),O=(0,nr.useRef)(),[D,U]=(0,nr.useState)(null),G=Ie(),{clientId:j,isSelected:z,name:W}=G,ee=G[Rp],se=(0,nr.useContext)(xr),ce=(0,Md.useRegistry)(),ie=je=>{if(!z)return{isSelected:!1};let{getSelectionStart:Eo,getSelectionEnd:Ze}=je(_),Ve=Eo(),gt=Ze(),To;return n===void 0?To=Ve.clientId===j&&gt.clientId===j&&(k?Ve.attributeKey===k:Ve[nie]===T):n&&(To=Ve.clientId===j),{selectionStart:To?Ve.offset:void 0,selectionEnd:To?gt.offset:void 0,isSelected:To}},{selectionStart:re,selectionEnd:Q,isSelected:Y}=(0,Md.useSelect)(ie,[j,k,T,n,z]),{disableBoundBlock:J,bindingsPlaceholder:K,bindingsLabel:H}=(0,Md.useSelect)(je=>{if(!ee?.[k])return{};let{__experimentalBlockBindingsSupportedAttributes:Eo}=je(_).getSettings();if(!Eo?.[W])return{};let Ve=ee[k],gt=(0,lie.getBlockBindingsSource)(Ve.source),To={};if(gt?.usesContext?.length)for(let ct of gt.usesContext)To[ct]=se[ct];let cr=!gt?.canUserEditValue?.({select:je,context:To,args:Ve.args});if(o.length>0)return{disableBoundBlock:cr,bindingsPlaceholder:null,bindingsLabel:null};let{getBlockAttributes:ge}=je(_),Ct=ge(j),Io=null;gt?.getFieldsList&&(Io=gt.getFieldsList({select:je,context:To})?.find(Gc=>(0,iie.default)(Gc.args,Ve?.args))?.label);let Ke=Io??gt?.label,te=cr?Ke:(0,Ab.sprintf)((0,Ab.__)("Add %s"),Ke),Le=cr?Ve?.args?.key||gt?.label:(0,Ab.sprintf)((0,Ab.__)("Empty %s; start writing to edit its value"),Ve?.args?.key||gt?.label);return{disableBoundBlock:cr,bindingsPlaceholder:Ct?.placeholder||te,bindingsLabel:Le}},[ee,k,W,o,j,se]),X=!!se?.["pattern/overrides"],ne=ee?.__default?.source==="core/pattern-overrides",ve=P||J||X&&!ne,{getSelectionStart:he,getSelectionEnd:xe,getBlockRootClientId:ze}=(0,Md.useSelect)(_),{selectionChange:ot}=(0,Md.useDispatch)(_),Wt=Cb({allowedFormats:f,disableFormats:C}),fo=!Wt||Wt.length>0,Do=(0,nr.useCallback)((je,Eo)=>{let Ze={},Ve=je===void 0&&Eo===void 0,gt={clientId:j,[k?"attributeKey":nie]:k||T};if(typeof je=="number"||Ve){if(Eo===void 0&&ze(j)!==ze(xe().clientId))return;Ze.start={...gt,offset:je}}if(typeof Eo=="number"||Ve){if(je===void 0&&ze(j)!==ze(he().clientId))return;Ze.end={...gt,offset:Eo}}ot(Ze)},[j,ze,xe,he,k,T,ot]),{value:rt,getValue:ar,onChange:xt,ref:At,formatTypes:Pe}=LTe({value:o,onChange:r,selectionStart:re,selectionEnd:Q,onSelectionChange:Do,placeholder:K||d,__unstableIsSelected:Y,__unstableDisableFormats:C,preserveWhiteSpace:y,__unstableDependencies:[t],allowedFormats:Wt,withoutInteractiveFormatting:m,__unstableFormatTypeHandlerContext:(0,nr.useMemo)(()=>({richTextIdentifier:k,blockClientId:j}),[k,j])}),wt=qU({onReplace:u,completers:c,record:rt,onChange:xt});_ne({html:o,value:rt});let qo=(0,nr.useRef)(new Set),$t=(0,nr.useRef)(new Set);function lr(){O.current?.focus()}let ln=t;return(0,di.jsxs)(di.Fragment,{children:[Y&&(0,di.jsx)(Pb.Provider,{value:qo,children:(0,di.jsx)(Ob.Provider,{value:$t,children:(0,di.jsxs)(aie.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after",children:[e&&e({value:rt,onChange:xt,onFocus:lr}),(0,di.jsx)(nP,{value:rt,onChange:xt,onFocus:lr,formatTypes:Pe,forwardedRef:O})]})})}),Y&&fo&&(0,di.jsx)(yne,{inline:s,editableContentElement:D}),(0,di.jsx)(ln,{role:"textbox","aria-multiline":!B,"aria-readonly":ve,...E,draggable:void 0,"aria-label":H||E["aria-label"]||d,...wt,ref:(0,lP.useMergeRefs)([At,L,wt.ref,E.ref,tP({registry:ce,getValue:ar,onChange:xt,__unstableAllowPrefixTransformations:I,formatTypes:Pe,onReplace:u,selectionChange:ot,isSelected:Y,disableFormats:C,value:rt,tagName:t,onSplit:g,__unstableEmbedURLOnPaste:x,pastePlainText:S,onMerge:p,onRemove:h,disableLineBreaks:B,onSplitAtEnd:b,onSplitAtDoubleLineEnd:v,keyboardShortcuts:qo,inputEvents:$t}),O,U]),contentEditable:!ve,suppressContentEditableWarning:!0,className:V("block-editor-rich-text__editable",E.className,"rich-text"),tabIndex:E.tabIndex===0&&!ve?null:E.tabIndex,"data-wp-block-attribute-key":k})]})}var r_=tie((0,nr.forwardRef)(sP));r_.Content=o_;r_.isEmpty=e=>!e||e.length===0;var TF=(0,nr.forwardRef)((e,t)=>{if(Ie()[d0]){let{children:n,tagName:i="div",value:s,onChange:a,isSelected:c,multiline:u,inlineToolbar:d,wrapperClassName:f,autocompleters:m,onReplace:h,placeholder:p,allowedFormats:g,withoutInteractiveFormatting:b,onRemove:v,onMerge:k,onSplit:y,__unstableOnSplitAtEnd:S,__unstableOnSplitAtDoubleLineEnd:x,identifier:C,preserveWhiteSpace:B,__unstablePastePlainText:I,__unstableEmbedURLOnPaste:P,__unstableDisableFormats:E,disableLineBreaks:L,__unstableAllowPrefixTransformations:T,readOnly:O,...D}=uie(e);return(0,di.jsx)(i,{ref:t,...D,dangerouslySetInnerHTML:{__html:SF(s,u)||"<br>"}})}return(0,di.jsx)(r_,{ref:t,...e,readOnly:!1})});TF.Content=o_;TF.isEmpty=e=>!e||e.length===0;var Eb=TF;var IF=l(w(),1),fie=(0,die.forwardRef)((e,t)=>(0,IF.jsx)(Eb,{ref:t,...e,__unstableDisableFormats:!0}));fie.Content=function({value:t="",tagName:o="div",...r}){return(0,IF.jsx)(o,{...r,children:t})};var mie=fie;var PF=l(w(),1),NTe=(0,hie.forwardRef)(({__experimentalVersion:e,...t},o)=>{if(e===2)return(0,PF.jsx)(mie,{ref:o,...t});let{className:r,onChange:n,...i}=t;return(0,PF.jsx)(pie.default,{ref:o,className:V("block-editor-plain-text",r),onChange:s=>n(s.target.value),...i})}),gie=NTe;var $a=l(N(),1),vie=l(R(),1),yie=l(A(),1);var bie=l(Z(),1),kie=l(A(),1),cP=l(N(),1),tp=l(w(),1);function uP({property:e,viewport:t,desc:o}){let r=(0,bie.useInstanceId)(uP),n=o||(0,cP.sprintf)((0,cP._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),e,t.label);return(0,tp.jsxs)(tp.Fragment,{children:[(0,tp.jsx)("span",{"aria-describedby":`rbc-desc-${r}`,children:t.label}),(0,tp.jsx)(kie.VisuallyHidden,{as:"span",id:`rbc-desc-${r}`,children:n})]})}var Ka=l(w(),1);function MTe(e){let{title:t,property:o,toggleLabel:r,onIsResponsiveChange:n,renderDefaultControl:i,renderResponsiveControls:s,isResponsive:a=!1,defaultLabel:c={id:"all",label:(0,$a._x)("All","screen sizes")},viewports:u=[{id:"small",label:(0,$a.__)("Small screens")},{id:"medium",label:(0,$a.__)("Medium screens")},{id:"large",label:(0,$a.__)("Large screens")}]}=e;if(!t||!o||!i)return null;let d=r||(0,$a.sprintf)((0,$a.__)("Use the same %s on all screen sizes."),o),f=(0,$a.__)("Choose whether to use the same value for all screen sizes or a unique value for each screen size."),m=i((0,Ka.jsx)(uP,{property:o,viewport:c}),c),h=()=>u.map(p=>(0,Ka.jsx)(vie.Fragment,{children:i((0,Ka.jsx)(uP,{property:o,viewport:p}),p)},p.id));return(0,Ka.jsxs)("fieldset",{className:"block-editor-responsive-block-control",children:[(0,Ka.jsx)("legend",{className:"block-editor-responsive-block-control__title",children:t}),(0,Ka.jsxs)("div",{className:"block-editor-responsive-block-control__inner",children:[(0,Ka.jsx)(yie.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:d,checked:!a,onChange:n,help:f}),(0,Ka.jsxs)("div",{className:V("block-editor-responsive-block-control__group",{"is-responsive":a}),children:[!a&&m,a&&(s?s(u):h())]})]})]})}var Sie=MTe;var dP=l(A(),1);var _ie=l(w(),1);function xie({units:e,...t}){let[o]=me("spacing.units"),r=(0,dP.__experimentalUseCustomUnits)({availableUnits:o||["%","px","em","rem","vw"],units:e});return(0,_ie.jsx)(dP.__experimentalUnitControl,{units:r,...t})}var n_=l(N(),1),wie=l(R(),1),Lb=l(A(),1);var Ya=l(w(),1);function DTe({url:e,onChange:t}){let[o,r]=(0,wie.useReducer)(i=>!i,!1),n=i=>{i.preventDefault(),r()};return(0,Ya.jsxs)("div",{className:"block-editor-url-input__button",children:[(0,Ya.jsx)(Lb.Button,{size:"compact",icon:fn,label:e?(0,n_.__)("Edit link"):(0,n_.__)("Insert link"),onClick:r,className:"components-toolbar__control",isPressed:!!e}),o&&(0,Ya.jsx)("form",{className:"block-editor-url-input__button-modal",onSubmit:n,children:(0,Ya.jsxs)("div",{className:"block-editor-url-input__button-modal-line",children:[(0,Ya.jsx)(Lb.Button,{__next40pxDefaultSize:!0,className:"block-editor-url-input__back",icon:Xk,label:(0,n_.__)("Close"),onClick:r}),(0,Ya.jsx)(Td,{value:e||"",onChange:t,suffix:(0,Ya.jsx)(Lb.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Ya.jsx)(Lb.Button,{size:"small",icon:bl,label:(0,n_.__)("Submit"),type:"submit"})})})]})})]})}var Cie=DTe;var In=l(N(),1),rs=l(R(),1),Pie=l(Fe(),1),Ho=l(A(),1);var Rie=l(dn(),1);var yt=l(w(),1),RF="none",Bie="custom",Eie="media",Tie="attachment",Iie=["noreferrer","noopener"],Oie=({linkDestination:e,onChangeUrl:t,url:o,mediaType:r="image",mediaUrl:n,mediaLink:i,linkTarget:s,linkClass:a,rel:c,showLightboxSetting:u,lightboxEnabled:d,onSetLightbox:f,resetLightbox:m})=>{let[h,p]=(0,rs.useState)(!1),[g,b]=(0,rs.useState)(null),v=()=>{p(!0)},[k,y]=(0,rs.useState)(!1),[S,x]=(0,rs.useState)(null),C=(0,rs.useRef)(null),B=(0,rs.useRef)();(0,rs.useEffect)(()=>{if(!B.current)return;(Pie.focus.focusable.find(B.current)[0]||B.current).focus()},[k,o,d]);let I=()=>{(e===Eie||e===Tie)&&x(""),y(!0)},P=()=>{y(!1)},E=()=>{x(null),P(),p(!1)},L=Y=>{let J=Y?"_blank":void 0,K;if(J){let H=(c??"").split(" ");Iie.forEach(X=>{H.includes(X)||H.push(X)}),K=H.join(" ")}else{let H=(c??"").split(" ").filter(X=>Iie.includes(X)===!1);K=H.length?H.join(" "):void 0}return{linkTarget:J,rel:K}},T=()=>Y=>{let J=C.current;J&&J.contains(Y.target)||(p(!1),x(null),P())},O=()=>Y=>{if(S){let J=U().find(K=>K.url===S)?.linkDestination||Bie;t({href:(0,Rie.prependHTTPS)(S),linkDestination:J,lightbox:{enabled:!1}})}P(),x(null),Y.preventDefault()},D=()=>{t({linkDestination:RF,href:""})},U=()=>{let Y=[{linkDestination:Eie,title:(0,In.__)("Link to image file"),url:r==="image"?n:void 0,icon:iv}];return r==="image"&&i&&Y.push({linkDestination:Tie,title:(0,In.__)("Link to attachment page"),url:r==="image"?i:void 0,icon:kl}),Y},G=Y=>{let J=U(),K;Y?K=(J.find(H=>H.url===Y)||{linkDestination:Bie}).linkDestination:K=RF,t({linkDestination:K,href:Y})},j=Y=>{let J=L(Y);t(J)},z=Y=>{t({rel:Y})},W=Y=>{t({linkClass:Y})},ee=(0,yt.jsxs)(Ho.__experimentalVStack,{spacing:"3",children:[(0,yt.jsx)(Ho.ToggleControl,{label:(0,In.__)("Open in new tab"),onChange:j,checked:s==="_blank"}),(0,yt.jsx)(Ho.TextControl,{__next40pxDefaultSize:!0,label:(0,In.__)("Link relation"),value:c??"",onChange:z,help:(0,rs.createInterpolateElement)((0,In.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,yt.jsx)(Ho.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})})}),(0,yt.jsx)(Ho.TextControl,{__next40pxDefaultSize:!0,label:(0,In.__)("Link CSS class"),value:a||"",onChange:W})]}),se=S!==null?S:o,ce=!d||d&&!u,ie=!se&&ce,re=(U().find(Y=>Y.linkDestination===e)||{}).title,Q=()=>{if(d&&u&&!o&&!k)return(0,yt.jsxs)("div",{className:"block-editor-url-popover__expand-on-click",children:[(0,yt.jsx)(we,{icon:mx}),(0,yt.jsxs)("div",{className:"text",children:[(0,yt.jsx)("p",{children:(0,In.__)("Enlarge on click")}),(0,yt.jsx)("p",{className:"description",children:(0,In.__)("Scales the image with a lightbox effect")})]}),(0,yt.jsx)(Ho.Button,{icon:Ci,label:(0,In.__)("Disable enlarge on click"),onClick:()=>{f?.(!1)},size:"compact"})]});if(!o||k)return(0,yt.jsx)(Ad.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:se,onChangeInputValue:x,onSubmit:O(),autocompleteRef:C});if(o&&!k)return(0,yt.jsxs)(yt.Fragment,{children:[(0,yt.jsx)(Ad.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:o,onEditLinkClick:I,urlLabel:re}),(0,yt.jsx)(Ho.Button,{icon:Ci,label:(0,In.__)("Remove link"),onClick:()=>{D(),m?.()},size:"compact"})]})};return(0,yt.jsxs)(yt.Fragment,{children:[(0,yt.jsx)(Ho.ToolbarButton,{icon:fn,className:"components-toolbar__control",label:(0,In.__)("Link"),"aria-expanded":h,onClick:v,ref:b,isActive:!!o||d&&u}),h&&(0,yt.jsx)(Ad,{ref:B,anchor:g,onFocusOutside:T(),onClose:E,renderSettings:ce?()=>ee:null,additionalControls:ie&&(0,yt.jsxs)(Ho.NavigableMenu,{children:[U().map(Y=>(0,yt.jsx)(Ho.MenuItem,{icon:Y.icon,iconPosition:"left",onClick:()=>{x(null),G(Y.url),P()},children:Y.title},Y.linkDestination)),u&&(0,yt.jsx)(Ho.MenuItem,{className:"block-editor-url-popover__expand-on-click",icon:mx,info:(0,In.__)("Scale the image with a lightbox effect."),iconPosition:"left",onClick:()=>{x(null),t({linkDestination:RF,href:""}),f?.(!0),P()},children:(0,In.__)("Enlarge on click")},"expand-on-click")]}),offset:13,children:Q()})]})};var Mb=l(A(),1),$ie=l(R(),1),pP=l(N(),1);var Aie=l(R(),1),AF=l(N(),1);var OF=[],VTe=new Intl.Collator("und",{numeric:!0}).compare;function fP(){let[e,t,o,r]=me("spacing.spacingSizes.custom","spacing.spacingSizes.theme","spacing.spacingSizes.default","spacing.defaultSpacingSizes"),n=e??OF,i=t??OF,s=o&&r!==!1?o:OF;return(0,Aie.useMemo)(()=>{let a=[{name:(0,AF.__)("None"),slug:"0",size:0},...n,...i,...s];return a.every(({slug:c})=>/^[0-9]/.test(c))&&a.sort((c,u)=>VTe(c.slug,u.slug)),a.length>XU?[{name:(0,AF.__)("Default"),slug:"default",size:void 0},...a]:a},[n,i,s])}var Lie=l(R(),1),Nie=l(F(),1),mP=l(N(),1),Mie=l(A(),1);var Die=l(w(),1),FTe={px:{max:300,steps:1},"%":{max:100,steps:1},vw:{max:100,steps:1},vh:{max:100,steps:1},em:{max:10,steps:.1},rm:{max:10,steps:.1},svw:{max:100,steps:1},lvw:{max:100,steps:1},dvw:{max:100,steps:1},svh:{max:100,steps:1},lvh:{max:100,steps:1},dvh:{max:100,steps:1},vi:{max:100,steps:1},svi:{max:100,steps:1},lvi:{max:100,steps:1},dvi:{max:100,steps:1},vb:{max:100,steps:1},svb:{max:100,steps:1},lvb:{max:100,steps:1},dvb:{max:100,steps:1},vmin:{max:100,steps:1},svmin:{max:100,steps:1},lvmin:{max:100,steps:1},dvmin:{max:100,steps:1},vmax:{max:100,steps:1},svmax:{max:100,steps:1},lvmax:{max:100,steps:1},dvmax:{max:100,steps:1}};function Nb({icon:e,isMixed:t=!1,minimumCustomValue:o,onChange:r,onMouseOut:n,onMouseOver:i,showSideInLabel:s=!0,side:a,spacingSizes:c,type:u,value:d,...f}){let m=(0,Nie.useSelect)(S=>S(_).getSettings()?.disableCustomSpacingSizes),[h]=me("spacing.units"),p=(0,Mie.__experimentalUseCustomUnits)({availableUnits:h||["px","em","rem"]}),g=(0,Lie.useMemo)(()=>c?.map(S=>({name:S.name,slug:S.slug,size:S.size}))||[],[c]),b=(Su.includes(a)||["vertical","horizontal"].includes(a))&&s?ha[a]:"",v=s?u?.toLowerCase():u,k=(0,mP.sprintf)((0,mP._x)("%1$s %2$s","spacing"),b,v).trim(),y=p[0]?.value||"px";return(0,Die.jsx)(jm,{allowNegativeOnDrag:o<0,ariaLabel:k,className:"spacing-sizes-control",customValueSettings:FTe,disableCustomValues:m,icon:e,isMixed:t,minimumCustomValue:o,onChange:r,onMouseOut:n,onMouseOver:i,presets:g,presetType:"spacing",selectedUnit:y,units:p,value:d,...f})}var i_=l(w(),1),Vie=["vertical","horizontal"];function Fie({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,sides:n,spacingSizes:i,type:s,values:a}){let c=d=>f=>{if(!t)return;let m={...Object.keys(a).reduce((h,p)=>(h[p]=sh(a[p],i),h),{})};d==="vertical"&&(m.top=f,m.bottom=f),d==="horizontal"&&(m.left=f,m.right=f),t(m)},u=n?.length?Vie.filter(d=>_M(n,d)):Vie;return(0,i_.jsx)(i_.Fragment,{children:u.map(d=>{let f=d==="vertical"?a.top:a.left;return(0,i_.jsx)(Nb,{icon:rC[d],label:ha[d],minimumCustomValue:e,onChange:c(d),onMouseOut:o,onMouseOver:r,side:d,spacingSizes:i,type:s,value:f,withInputField:!1},`spacing-sizes-control-${d}`)})})}var s_=l(w(),1);function zie({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,sides:n,spacingSizes:i,type:s,values:a}){let c=n?.length?Su.filter(d=>n.includes(d)):Su,u=d=>f=>{let m={...Object.keys(a).reduce((h,p)=>(h[p]=sh(a[p],i),h),{})};m[d]=f,t(m)};return(0,s_.jsx)(s_.Fragment,{children:c.map(d=>(0,s_.jsx)(Nb,{icon:rC[d],label:ha[d],minimumCustomValue:e,onChange:u(d),onMouseOut:o,onMouseOver:r,side:d,spacingSizes:i,type:s,value:a[d],withInputField:!1},`spacing-sizes-control-${d}`))})}var jie=l(w(),1);function Uie({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,showSideInLabel:n,side:i,spacingSizes:s,type:a,values:c}){let u=d=>f=>{let m={...Object.keys(c).reduce((h,p)=>(h[p]=sh(c[p],s),h),{})};m[d]=f,t(m)};return(0,jie.jsx)(Nb,{label:ha[i],minimumCustomValue:e,onChange:u(i),onMouseOut:o,onMouseOver:r,showSideInLabel:n,side:i,spacingSizes:s,type:a,value:c[i],withInputField:!1})}var Hie=l(A(),1);var LF=l(N(),1),Gie=l(w(),1);function Wie({isLinked:e,...t}){let o=e?(0,LF.__)("Unlink sides"):(0,LF.__)("Link sides");return(0,Gie.jsx)(Hie.Button,{...t,size:"small",icon:e?fn:Ci,iconSize:24,label:o})}var qa=l(w(),1);function Db({inputProps:e,label:t,minimumCustomValue:o=0,onChange:r,onMouseOut:n,onMouseOver:i,showSideInLabel:s=!0,sides:a=Su,useSelect:c,values:u}){let d=fP(),f=u||QU,m=a?.length===1,h=a?.includes("horizontal")&&a?.includes("vertical")&&a?.length===2,[p,g]=(0,$ie.useState)(eH(f,a)),b=()=>{g(p===Cl.axial?Cl.custom:Cl.axial)},k={...e,minimumCustomValue:o,onChange:C=>{let B={...u,...C};r(B)},onMouseOut:n,onMouseOver:i,sides:a,spacingSizes:d,type:t,useSelect:c,values:f},y=()=>p===Cl.axial?(0,qa.jsx)(Fie,{...k}):p===Cl.custom?(0,qa.jsx)(zie,{...k}):(0,qa.jsx)(Uie,{side:p,...k,showSideInLabel:s}),S=Su.includes(p)&&s?ha[p]:"",x=(0,pP.sprintf)((0,pP._x)("%1$s %2$s","spacing"),t,S).trim();return(0,qa.jsxs)("fieldset",{className:"spacing-sizes-control",children:[(0,qa.jsxs)(Mb.__experimentalHStack,{className:"spacing-sizes-control__header",children:[(0,qa.jsx)(Mb.BaseControl.VisualLabel,{as:"legend",className:"spacing-sizes-control__label",children:x}),!m&&!h&&(0,qa.jsx)(Wie,{label:t,onClick:b,isLinked:p===Cl.axial})]}),(0,qa.jsx)(Mb.__experimentalVStack,{spacing:.5,children:y()})]})}var Kie=l(Re(),1);function Yie(){return(0,Kie.default)("wp.blockEditor.PreviewOptions",{version:"6.5"}),null}var hP=l(R(),1);function qie(e){let[t,o]=(0,hP.useState)(window.innerWidth);(0,hP.useEffect)(()=>{if(e==="Desktop")return;let i=()=>o(window.innerWidth);return window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[e]);let r=i=>{let s;switch(i){case"Tablet":s=781;break;case"Mobile":s=479;break;default:return null}return s<t?s:t};return(i=>{let s=i==="Mobile"?"768px":"1024px",a="40px",c="auto";switch(i){case"Tablet":case"Mobile":return{width:r(i),marginTop:a,marginBottom:a,marginLeft:c,marginRight:c,height:s,overflowY:"auto"};default:return{marginLeft:c,marginRight:c}}})(e)}var tk=l(N(),1),zd=l($(),1),zae=l(A(),1),n4=l(F(),1),jae=l(R(),1);var Vb=l(A(),1),gP=l(N(),1),Zie=l(F(),1),bP=l($(),1);var op=l(w(),1);function zTe({block:e,onNavigateToEntityRecord:t,isSyncedPattern:o,isTemplatePartBlock:r}){let n=e?.attributes||{};return(0,op.jsx)(Vb.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,op.jsx)(Vb.Button,{className:"block-editor-block-inspector-edit-contents__button",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{if(o)t({postId:n.ref,postType:"wp_block"});else if(r){let{theme:s,slug:a}=n,c=s&&a?`${s}//${a}`:null;c&&t({postId:c,postType:"wp_template_part"})}},children:(0,gP.__)("Edit original")})})}function jTe({clientId:e,editedContentOnlySection:t,editContentOnlySection:o,stopEditingContentOnlySection:r}){return(0,op.jsx)(Vb.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,op.jsx)(Vb.Button,{className:"block-editor-block-inspector-edit-contents__button",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{t?r():o(e)},children:t?(0,gP.__)("Exit pattern"):(0,gP.__)("Edit pattern")})})}function Xie({clientId:e}){let{isWithinSection:t,isWithinEditedSection:o,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i}=aT(e),{block:s,onNavigateToEntityRecord:a,canEdit:c}=(0,Zie.useSelect)(m=>{let{getBlock:h,getSettings:p,canEditBlock:g}=m(_);return{block:h(e),onNavigateToEntityRecord:p().onNavigateToEntityRecord,canEdit:g(e)}},[e]);if(!c||!t&&!o)return null;let u=(0,bP.isReusableBlock)(s),d=(0,bP.isTemplatePart)(s);return(u||d)&&a?(0,op.jsx)(zTe,{block:s,onNavigateToEntityRecord:a,isSyncedPattern:u,isTemplatePartBlock:d}):(0,op.jsx)(jTe,{clientId:e,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i})}var Qie=l(F(),1),Jie=l(N(),1),ese=l(A(),1),tse=l(R(),1);var ose=l(w(),1);function kP(){let e=(0,Qie.useSelect)(r=>r(_).getBlockSelectionStart(),[]),t=(0,tse.useRef)();return $f(e,t),e?(0,ose.jsx)(ese.Button,{__next40pxDefaultSize:!0,variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current?.focus()},children:(0,Jie.__)("Skip to the selected block")}):null}var vP=l(N(),1),rse=l(F(),1);var nse=l(A(),1);var a_=l(w(),1);function NF(){let e=(0,rse.useSelect)(t=>t(_).getSelectedBlockCount(),[]);return(0,a_.jsxs)(nse.__experimentalHStack,{justify:"flex-start",spacing:2,className:"block-editor-multi-selection-inspector__card",children:[(0,a_.jsx)(Ae,{icon:Cf,showColors:!0}),(0,a_.jsx)("div",{className:"block-editor-multi-selection-inspector__card-title",children:(0,vP.sprintf)((0,vP._n)("%d Block","%d Blocks",e),e)})]})}var ek=l(A(),1),oa=l(R(),1),Aae=l(Zp(),1),Jb=l(F(),1);var l_=l(N(),1),yP={name:"settings",title:(0,l_.__)("Settings"),value:"settings",icon:oA},SP={name:"styles",title:(0,l_.__)("Styles"),value:"styles",icon:kN},_P={name:"content",title:(0,l_.__)("Content"),value:"content",icon:kl},yc={name:"list",title:(0,l_.__)("List View"),value:"list-view",icon:sv};var BP=l(A(),1);var c_=l(A(),1),ise=l(N(),1);var u_=l(w(),1),UTe=({initialOpen:e=!1})=>{let t=(0,c_.__experimentalUseSlotFills)(rd.slotName),o=(0,c_.__experimentalUseSlotFills)(sS.name),r=!!(t&&t.length),n=!!(o&&o.length);return!r&&!n?null:(0,u_.jsxs)(c_.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,ise.__)("Advanced"),initialOpen:e,children:[(0,u_.jsx)(fe.Slot,{group:"advanced"}),(0,u_.jsx)(sS.Slot,{})]})},xP=UTe;var Fb=l(A(),1),wP=l(F(),1),MF=l(N(),1);var d_=l(w(),1),HTe=()=>{let{selectedClientIds:e,selectedBlocks:t,hasPositionAttribute:o}=(0,wP.useSelect)(s=>{let{getBlocksByClientId:a,getSelectedBlockClientIds:c}=s(_),u=c(),d=a(u);return{selectedClientIds:u,selectedBlocks:d,hasPositionAttribute:d?.some(({attributes:f})=>!!f?.style?.position?.type)}},[]),{updateBlockAttributes:r}=(0,wP.useDispatch)(_),n=Ro();function i(){if(!e?.length||!t?.length)return;let s=Object.fromEntries(t?.map(({clientId:a,attributes:c})=>[a,{style:Me({...c?.style,position:{...c?.style?.position,type:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0}})}]));r(e,s,!0)}return(0,d_.jsx)(Fb.__experimentalToolsPanel,{className:"block-editor-block-inspector__position",label:(0,MF.__)("Position"),resetAll:i,dropdownMenuProps:n,children:(0,d_.jsx)(Fb.__experimentalToolsPanelItem,{isShownByDefault:o,label:(0,MF.__)("Position"),hasValue:()=>o,onDeselect:i,children:(0,d_.jsx)(fe.Slot,{group:"position"})})})},GTe=()=>{let e=(0,Fb.__experimentalUseSlotFills)(Wi.position.name);return!(e&&e.length)?null:(0,d_.jsx)(HTe,{})},CP=GTe;var Za=l(w(),1),WTe=({showAdvancedControls:e=!1})=>{let t=(0,BP.__experimentalUseSlotFills)(Wi.default.name),o=(0,BP.__experimentalUseSlotFills)(Wi.position.name),r=(0,BP.__experimentalUseSlotFills)(Wi.bindings.name),n=!!t?.length||!!o?.length||!!r?.length;return(0,Za.jsxs)(Za.Fragment,{children:[(0,Za.jsx)(fe.Slot,{}),(0,Za.jsx)(CP,{}),(0,Za.jsx)(fe.Slot,{group:"bindings"}),e&&(0,Za.jsx)("div",{children:(0,Za.jsx)(xP,{initialOpen:!n})})]})},sse=WTe;var Xb=l(N(),1),m2=l(F(),1);var y_=l($(),1),$F=l(A(),1),Zb=l(R(),1),uae=l(ut(),1),dae=l(F(),1);var WF={};Ip(WF,{AdvancedPanel:()=>ZP,BackgroundPanel:()=>o2,BorderPanel:()=>jP,ColorPanel:()=>WP,DimensionsPanel:()=>DP,FiltersPanel:()=>KP,ImageSettingsPanel:()=>tae,TypographyPanel:()=>OP,useHasBackgroundPanel:()=>v_,useHasBorderPanel:()=>zP,useHasBorderPanelControls:()=>p_,useHasColorPanel:()=>GP,useHasDimensionsPanel:()=>MP,useHasFiltersPanel:()=>Qse,useHasImageSettingsPanel:()=>eae,useHasTypographyPanel:()=>RP,useSettingsForBlockElement:()=>TP});var EP=l(R(),1),ase=l(F(),1),DF=l($(),1),rp=l(N(),1);function TP(e,t,o){let{supportedStyles:r,supports:n}=(0,ase.useSelect)(i=>({supportedStyles:M(i(DF.store)).getSupportedStyles(t,o),supports:i(DF.store).getBlockType(t)?.supports}),[t,o]);return(0,EP.useMemo)(()=>{let i={...e};return r.includes("fontSize")||(i.typography={...i.typography,fontSizes:{},customFontSize:!1,defaultFontSizes:!1}),r.includes("fontFamily")||(i.typography={...i.typography,fontFamilies:{}}),i.color={...i.color,text:i.color?.text&&r.includes("color"),background:i.color?.background&&(r.includes("background")||r.includes("backgroundColor")),button:i.color?.button&&r.includes("buttonColor"),heading:i.color?.heading&&r.includes("headingColor"),link:i.color?.link&&r.includes("linkColor"),caption:i.color?.caption&&r.includes("captionColor")},r.includes("background")||(i.color.gradients=[],i.color.customGradient=!1),r.includes("filter")||(i.color.defaultDuotone=!1,i.color.customDuotone=!1),["lineHeight","fontStyle","fontWeight","letterSpacing","textAlign","textTransform","textDecoration","textIndent","writingMode"].forEach(s=>{r.includes(s)||(i.typography={...i.typography,[s]:!1})}),r.includes("textIndent")&&(i.typography={...i.typography,textIndent:i.typography?.textIndent??"subsequent"}),r.includes("columnCount")||(i.typography={...i.typography,textColumns:!1}),["contentSize","wideSize"].forEach(s=>{r.includes(s)||(i.layout={...i.layout,[s]:!1})}),["padding","margin","blockGap"].forEach(s=>{r.includes(s)||(i.spacing={...i.spacing,[s]:!1});let a=Array.isArray(n?.spacing?.[s])?n?.spacing?.[s]:n?.spacing?.[s]?.sides;a?.length&&i.spacing?.[s]&&(i.spacing={...i.spacing,[s]:{...i.spacing?.[s],sides:a}})}),["aspectRatio","height","minHeight","width"].forEach(s=>{r.includes(s)||(i.dimensions={...i.dimensions,[s]:!1})}),["radius","color","style","width"].forEach(s=>{r.includes("border"+s.charAt(0).toUpperCase()+s.slice(1))||(i.border={...i.border,[s]:!1})}),["backgroundImage","backgroundSize"].forEach(s=>{r.includes(s)||(i.background={...i.background,[s]:!1})}),i.shadow=r.includes("shadow")?i.shadow:!1,i},[e,r,n])}function Xa(e){let t=e?.color?.palette?.custom,o=e?.color?.palette?.theme,r=e?.color?.palette?.default,n=e?.color?.defaultPalette;return(0,EP.useMemo)(()=>{let i=[];return o&&o.length&&i.push({name:(0,rp._x)("Theme","Indicates this palette comes from the theme."),colors:o}),n&&r&&r.length&&i.push({name:(0,rp._x)("Default","Indicates this palette comes from WordPress."),colors:r}),t&&t.length&&i.push({name:(0,rp._x)("Custom","Indicates this palette is created by the user."),colors:t}),i},[t,o,r,n])}function f_(e){let t=e?.color?.gradients?.custom,o=e?.color?.gradients?.theme,r=e?.color?.gradients?.default,n=e?.color?.defaultGradients;return(0,EP.useMemo)(()=>{let i=[];return o&&o.length&&i.push({name:(0,rp._x)("Theme","Indicates this palette comes from the theme."),gradients:o}),n&&r&&r.length&&i.push({name:(0,rp._x)("Default","Indicates this palette comes from WordPress."),gradients:r}),t&&t.length&&i.push({name:(0,rp._x)("Custom","Indicates this palette is created by the user."),gradients:t}),i},[t,o,r,n])}var io=l(A(),1),Mo=l(N(),1),jb=l(R(),1);var zb=l(N(),1);var lse=l(R(),1),IP=l(A(),1),VF=l(w(),1),$Te=[{label:(0,zb.__)("Align text left"),value:"left",icon:Jc},{label:(0,zb.__)("Align text center"),value:"center",icon:Sf},{label:(0,zb.__)("Align text right"),value:"right",icon:eu},{label:(0,zb.__)("Justify text"),value:"justify",icon:OO}],KTe=["left","center","right"];function PP({className:e,value:t,onChange:o,options:r=KTe}){let n=(0,lse.useMemo)(()=>$Te.filter(i=>r.includes(i.value)),[r]);return n.length?(0,VF.jsx)(IP.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,zb.__)("Text alignment"),className:V("block-editor-text-alignment-control",e),value:t,onChange:i=>{o(i===t?void 0:i)},children:n.map(i=>(0,VF.jsx)(IP.__experimentalToggleGroupControlOptionIcon,{value:i.value,icon:i.icon,label:i.label},i.value))}):null}var No=l(A(),1),m_=l(N(),1);var ns=l(w(),1);function cse({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",withSlider:n=!1,hasBottomMargin:i=!1,help:s,...a}){let[c]=me("spacing.units"),u=(0,No.__experimentalUseCustomUnits)({availableUnits:c||["px","em","rem","ch","%","vw","vh"],defaultValues:{px:16,em:2,rem:2,ch:2}}),[d,f]=(0,No.__experimentalParseQuantityAndUnitFromRawValue)(t,u),m=!!f&&["em","rem","%","ch","vw","vh"].includes(f);return n?(0,ns.jsxs)(No.__experimentalView,{style:i?{marginBottom:12}:void 0,children:[(0,ns.jsx)(No.BaseControl.VisualLabel,{children:(0,m_.__)("Line indent")}),(0,ns.jsxs)(No.Flex,{children:[(0,ns.jsx)(No.FlexItem,{isBlock:!0,children:(0,ns.jsx)(No.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,m_.__)("Line indent"),labelPosition:"top",hideLabelFromVision:!0,value:t,onChange:o,size:a.size,units:u,__unstableInputWidth:r,min:0})}),n&&(0,ns.jsx)(No.FlexItem,{isBlock:!0,children:(0,ns.jsx)(No.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,ns.jsx)(No.RangeControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,m_.__)("Line indent"),hideLabelFromVision:!0,value:d,withInputField:!1,onChange:h=>{o?.(h===void 0?void 0:h+(f??"px"))},min:0,max:m?10:100,step:m?.1:1,initialPosition:0})})})]}),s&&(0,ns.jsx)("p",{className:"components-base-control__help",children:s})]}):(0,ns.jsx)(No.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...a,label:(0,m_.__)("Line indent"),value:t,__unstableInputWidth:r,units:u,onChange:o,help:s})}function dse(e,t){let o=e?.typography?.fontFamilies,r=["default","theme","custom"].flatMap(i=>o?.[i]??[]),n=r.find(i=>i.fontFamily===t)?.fontFace??[];return{fontFamilies:r,fontFamilyFaces:n}}function use(e,t){return t=typeof t=="number"?t.toString():t,!t||typeof t!="string"?"":!e||e.length===0?t:e?.reduce((r,{value:n})=>{let i=Math.abs(parseInt(n)-parseInt(t)),s=Math.abs(parseInt(r)-parseInt(t));return i<s?n:r},e[0]?.value)}function YTe(e,t){return typeof t!="string"||!t||!["normal","italic","oblique"].includes(t)?"":!e||e.length===0||e.find(r=>r.value===t)?t:t==="oblique"&&!e.find(r=>r.value==="oblique")?"italic":""}function fse(e,t,o){let r=t,n=o,{fontStyles:i,fontWeights:s,combinedStyleAndWeightOptions:a}=ib(e),c=i?.some(({value:d})=>d===t),u=s?.some(({value:d})=>d?.toString()===o?.toString());return c||(r=t?YTe(i,t):a?.find(d=>d.style.fontWeight===use(s,o))?.style?.fontStyle),u||(n=o?use(s,o):a?.find(d=>d.style.fontStyle===(r||t))?.style?.fontWeight),{nearestFontStyle:r,nearestFontWeight:n}}var Je=l(w(),1),qTe=1,ZTe=6;function RP(e){let t=pse(e),o=hse(e),r=gse(e),n=bse(e),i=vse(e),s=kse(e),a=yse(e),c=xse(e),u=Sse(e),d=_se(e),f=mse(e);return t||o||r||n||i||s||f||a||c||u||d}function mse(e){return e?.typography?.defaultFontSizes!==!1&&e?.typography?.fontSizes?.default?.length||e?.typography?.fontSizes?.theme?.length||e?.typography?.fontSizes?.custom?.length||e?.typography?.customFontSize}function pse(e){return["default","theme","custom"].some(t=>e?.typography?.fontFamilies?.[t]?.length)}function hse(e){return e?.typography?.lineHeight}function gse(e){return e?.typography?.fontStyle||e?.typography?.fontWeight}function XTe(e){return e?.typography?.fontStyle?e?.typography?.fontWeight?(0,Mo.__)("Appearance"):(0,Mo.__)("Font style"):(0,Mo.__)("Font weight")}function bse(e){return e?.typography?.letterSpacing}function kse(e){return e?.typography?.textTransform}function vse(e){return e?.typography?.textAlign}function yse(e){return e?.typography?.textDecoration}function Sse(e){return e?.typography?.writingMode}function _se(e){return e?.typography?.textColumns}function xse(e){return e?.typography?.textIndent}function QTe(e){let t=e?.typography?.fontSizes,o=!!e?.typography?.defaultFontSizes;return[...t?.custom??[],...t?.theme??[],...o?t?.default??[]:[]]}function JTe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=Ro(),s=()=>{let a=e(o);t(a)};return(0,Je.jsx)(io.__experimentalToolsPanel,{label:(0,Mo.__)("Typography"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var eIe={fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!0,textAlign:!0,textTransform:!0,textDecoration:!0,textIndent:!0,writingMode:!0,textColumns:!0};function OP({as:e=JTe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=eIe,isGlobalStyles:a=!1}){let c=te=>wn({settings:n},"",te),u=pse(n),d=c(r?.typography?.fontFamily),{fontFamilies:f,fontFamilyFaces:m}=(0,jb.useMemo)(()=>dse(n,d),[n,d]),h=te=>{let Le=f?.find(({fontFamily:cn})=>cn===te)?.slug,ct=pe(t,["typography","fontFamily"],Le?`var:preset|font-family|${Le}`:te||void 0),Gc=f?.find(({fontFamily:cn})=>cn===te)?.fontFace??[],{fontStyles:ua,fontWeights:Bp}=ib(Gc),jk=ua?.some(({value:cn})=>cn===T),hf=Bp?.some(({value:cn})=>cn?.toString()===O?.toString());if(!jk||!hf){let{nearestFontStyle:cn,nearestFontWeight:Ep}=fse(Gc,T,O);cn||Ep?ct={...ct,typography:{...ct?.typography,fontStyle:cn||void 0,fontWeight:Ep||void 0}}:(T||O)&&(ct={...ct,typography:{...ct?.typography,fontStyle:void 0,fontWeight:void 0}})}o(ct)},p=()=>!!t?.typography?.fontFamily,g=()=>h(void 0),b=mse(n),v=!n?.typography?.customFontSize,k=QTe(n),y=c(r?.typography?.fontSize),S=(()=>{let te=r?.typography?.fontSize;if(!te||typeof te!="string")return;if(te.startsWith("var:preset|font-size|"))return te.replace("var:preset|font-size|","");let Le=te.match(/^var\(--wp--preset--font-size--([^)]+)\)$/);if(Le)return Le[1]})(),x=(te,Le)=>{let ct=Le?.slug?`var:preset|font-size|${Le?.slug}`:te;o(pe(t,["typography","fontSize"],ct||void 0))},C=()=>!!t?.typography?.fontSize,B=()=>x(void 0),I=gse(n),P=XTe(n),E=n?.typography?.fontStyle,L=n?.typography?.fontWeight,T=c(r?.typography?.fontStyle),O=c(r?.typography?.fontWeight),D=(0,jb.useCallback)(({fontStyle:te,fontWeight:Le})=>{(te!==T||Le!==O)&&o({...t,typography:{...t?.typography,fontStyle:te||void 0,fontWeight:Le||void 0}})},[T,O,o,t]),U=()=>!!t?.typography?.fontStyle||!!t?.typography?.fontWeight,G=(0,jb.useCallback)(()=>{D({})},[D]),j=hse(n),z=c(r?.typography?.lineHeight),W=te=>{o(pe(t,["typography","lineHeight"],te||void 0))},ee=()=>t?.typography?.lineHeight!==void 0,se=()=>W(void 0),ce=bse(n),ie=c(r?.typography?.letterSpacing),re=te=>{o(pe(t,["typography","letterSpacing"],te||void 0))},Q=()=>!!t?.typography?.letterSpacing,Y=()=>re(void 0),J=xse(n),K=c(r?.typography?.textIndent),X=(n?.typography?.textIndent??"subsequent")==="all",ne=te=>{o(pe(t,["typography","textIndent"],te||void 0))},le=te=>{o({...t,settings:{typography:{textIndent:te?"all":"subsequent"}}})},ve=()=>!!t?.typography?.textIndent,he=()=>{o(pe(t,["typography","textIndent"],void 0))},xe=X?(0,Mo.__)("Indents the first line of all paragraphs."):(0,Mo.__)("Indents the first line of each paragraph after the first one."),ze=_se(n),ot=c(r?.typography?.textColumns),Wt=te=>{o(pe(t,["typography","textColumns"],te||void 0))},fo=()=>!!t?.typography?.textColumns,Do=()=>Wt(void 0),rt=kse(n),ar=c(r?.typography?.textTransform),xt=te=>{o(pe(t,["typography","textTransform"],te||void 0))},At=()=>!!t?.typography?.textTransform,Pe=()=>xt(void 0),wt=yse(n),qo=c(r?.typography?.textDecoration),$t=te=>{o(pe(t,["typography","textDecoration"],te||void 0))},lr=()=>!!t?.typography?.textDecoration,ln=()=>$t(void 0),je=Sse(n),Eo=c(r?.typography?.writingMode),Ze=te=>{o(pe(t,["typography","writingMode"],te||void 0))},Ve=()=>!!t?.typography?.writingMode,gt=()=>Ze(void 0),To=vse(n),cr=c(r?.typography?.textAlign),ge=te=>{o(pe(t,["typography","textAlign"],te||void 0))},Ct=()=>!!t?.typography?.textAlign,Io=()=>ge(void 0),Ke=(0,jb.useCallback)(te=>({...te,typography:{}}),[]);return(0,Je.jsxs)(e,{resetAllFilter:Ke,value:t,onChange:o,panelId:i,children:[u&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{label:(0,Mo.__)("Font"),hasValue:p,onDeselect:g,isShownByDefault:s.fontFamily,panelId:i,children:(0,Je.jsx)(rI,{fontFamilies:f,value:d,onChange:h,size:"__unstable-large"})}),b&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{label:(0,Mo.__)("Size"),hasValue:C,onDeselect:B,isShownByDefault:s.fontSize,panelId:i,children:(0,Je.jsx)(io.FontSizePicker,{value:S||y,valueMode:S?"slug":"literal",onChange:x,fontSizes:k,disableCustomFontSizes:v,withReset:!1,withSlider:!0,size:"__unstable-large"})}),I&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{label:P,hasValue:U,onDeselect:G,isShownByDefault:s.fontAppearance,panelId:i,children:(0,Je.jsx)(oI,{value:{fontStyle:T,fontWeight:O},onChange:D,hasFontStyles:E,hasFontWeights:L,fontFamilyFaces:m,size:"__unstable-large"})}),j&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{className:"single-column",label:(0,Mo.__)("Line height"),hasValue:ee,onDeselect:se,isShownByDefault:s.lineHeight,panelId:i,children:(0,Je.jsx)(HI,{__unstableInputWidth:"auto",value:z,onChange:W,size:"__unstable-large"})}),ce&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{className:"single-column",label:(0,Mo.__)("Letter spacing"),hasValue:Q,onDeselect:Y,isShownByDefault:s.letterSpacing,panelId:i,children:(0,Je.jsx)(iI,{value:ie,onChange:re,size:"__unstable-large",__unstableInputWidth:"auto"})}),J&&(0,Je.jsxs)(io.__experimentalToolsPanelItem,{label:(0,Mo.__)("Line indent"),hasValue:ve,onDeselect:he,isShownByDefault:s.textIndent,panelId:i,children:[(0,Je.jsx)(cse,{value:K,onChange:ne,size:"__unstable-large",__unstableInputWidth:"auto",withSlider:!0,hasBottomMargin:a}),a&&(0,Je.jsx)(io.ToggleControl,{label:(0,Mo.__)("Indent all paragraphs"),checked:X,onChange:le,help:xe})]}),ze&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{className:"single-column",label:(0,Mo.__)("Columns"),hasValue:fo,onDeselect:Do,isShownByDefault:s.textColumns,panelId:i,children:(0,Je.jsx)(io.__experimentalNumberControl,{label:(0,Mo.__)("Columns"),max:ZTe,min:qTe,onChange:Wt,size:"__unstable-large",spinControls:"custom",value:ot,initialPosition:1})}),wt&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{className:"single-column",label:(0,Mo.__)("Decoration"),hasValue:lr,onDeselect:ln,isShownByDefault:s.textDecoration,panelId:i,children:(0,Je.jsx)(aI,{value:qo,onChange:$t,size:"__unstable-large",__unstableInputWidth:"auto"})}),je&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{className:"single-column",label:(0,Mo.__)("Orientation"),hasValue:Ve,onDeselect:gt,isShownByDefault:s.writingMode,panelId:i,children:(0,Je.jsx)(dI,{value:Eo,onChange:Ze,size:"__unstable-large"})}),rt&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{label:(0,Mo.__)("Letter case"),hasValue:At,onDeselect:Pe,isShownByDefault:s.textTransform,panelId:i,children:(0,Je.jsx)(cI,{value:ar,onChange:xt,showNone:!0,isBlock:!0,size:"__unstable-large"})}),To&&(0,Je.jsxs)(io.__experimentalToolsPanelItem,{label:(0,Mo.__)("Text alignment"),hasValue:Ct,onDeselect:Io,isShownByDefault:s.textAlign,panelId:i,children:[(0,Je.jsx)(PP,{value:cr,onChange:ge,options:["left","center","right","justify"],size:"__unstable-large"}),cr==="justify"&&(0,Je.jsx)("div",{children:(0,Je.jsx)(io.Notice,{status:"warning",isDismissible:!1,children:(0,Mo.__)("Justified text can reduce readability. For better accessibility, use left-aligned text instead.")})})]})]})}var Zt=l(N(),1),jt=l(A(),1);var Hb=l(R(),1);var et=l(A(),1),Go=l(N(),1),Cse=l(R(),1),AP=l(F(),1);var wse=l(F(),1);function np(e,t){let{getBlockOrder:o,getBlockAttributes:r}=(0,wse.useSelect)(_);return(i,s)=>{let a=(s-1)*t+i-1,c=0;for(let u of o(e)){let{columnStart:d,rowStart:f}=r(u).style?.layout??{};(f-1)*t+d-1<a&&c++}return c}}var qt=l(w(),1);function tIe(e,t){let{orientation:o="horizontal"}=t;return e==="fill"?(0,Go.__)("Stretch to fill available space."):e==="fixed"&&o==="horizontal"?(0,Go.__)("Specify a fixed width."):e==="fixed"?(0,Go.__)("Specify a fixed height."):(0,Go.__)("Fit contents.")}function Bse({value:e={},onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}){let{type:i,default:{type:s="default"}={}}=o??{},a=i||s;return a==="flex"?(0,qt.jsx)(oIe,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}):a==="grid"?(0,qt.jsx)(nIe,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}):null}function oIe({childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}){let{selfStretch:i,flexSize:s}=e,{orientation:a="horizontal"}=o??{},c=()=>!!i,u=a==="horizontal"?(0,Go.__)("Width"):(0,Go.__)("Height"),[d]=me("spacing.units"),f=(0,et.__experimentalUseCustomUnits)({availableUnits:d||["%","px","em","rem","vh","vw"]}),m=()=>{t({selfStretch:void 0,flexSize:void 0})};return(0,Cse.useEffect)(()=>{i==="fixed"&&!s&&t({...e,selfStretch:"fit"})},[]),(0,qt.jsxs)(et.__experimentalVStack,{as:et.__experimentalToolsPanelItem,spacing:2,hasValue:c,label:u,onDeselect:m,isShownByDefault:r,panelId:n,children:[(0,qt.jsxs)(et.__experimentalToggleGroupControl,{size:"__unstable-large",label:rIe(o),value:i||"fit",help:tIe(i,o),onChange:h=>{t({selfStretch:h,flexSize:h!=="fixed"?null:s})},isBlock:!0,children:[(0,qt.jsx)(et.__experimentalToggleGroupControlOption,{value:"fit",label:(0,Go._x)("Fit","Intrinsic block width in flex layout")},"fit"),(0,qt.jsx)(et.__experimentalToggleGroupControlOption,{value:"fill",label:(0,Go._x)("Grow","Block with expanding width in flex layout")},"fill"),(0,qt.jsx)(et.__experimentalToggleGroupControlOption,{value:"fixed",label:(0,Go._x)("Fixed","Block with fixed width in flex layout")},"fixed")]}),i==="fixed"&&(0,qt.jsx)(et.__experimentalUnitControl,{size:"__unstable-large",units:f,onChange:h=>{t({selfStretch:i,flexSize:h})},value:s,min:0,label:u,hideLabelFromVision:!0})]})}function rIe(e){let{orientation:t="horizontal"}=e;return t==="horizontal"?(0,Go.__)("Width"):(0,Go.__)("Height")}function nIe({childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}){let{columnStart:i,rowStart:s,columnSpan:a,rowSpan:c}=e,{columnCount:u,rowCount:d}=o??{},f=(0,AP.useSelect)(x=>x(_).getBlockRootClientId(n)),{moveBlocksToPosition:m,__unstableMarkNextChangeAsNotPersistent:h}=(0,AP.useDispatch)(_),p=np(f,u||3),g=()=>!!i||!!s,b=()=>!!a||!!c,v=()=>{t({columnStart:void 0,rowStart:void 0})},k=()=>{t({columnSpan:void 0,rowSpan:void 0})},y=u?u-(i??1)+1:void 0,S=window.__experimentalEnableGridInteractivity&&d?d-(s??1)+1:void 0;return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(et.Flex,{as:et.__experimentalToolsPanelItem,hasValue:b,label:(0,Go.__)("Grid span"),onDeselect:k,isShownByDefault:r,panelId:n,children:[(0,qt.jsx)(et.FlexItem,{style:{width:"50%"},children:(0,qt.jsx)(et.__experimentalInputControl,{size:"__unstable-large",label:(0,Go.__)("Column span"),type:"number",onChange:x=>{let C=x===""?1:parseInt(x,10),B=y?Math.min(C,y):C;t({columnStart:i,rowStart:s,rowSpan:c,columnSpan:B})},value:a??1,min:1,max:y})}),(0,qt.jsx)(et.FlexItem,{style:{width:"50%"},children:(0,qt.jsx)(et.__experimentalInputControl,{size:"__unstable-large",label:(0,Go.__)("Row span"),type:"number",onChange:x=>{let C=x===""?1:parseInt(x,10),B=S?Math.min(C,S):C;t({columnStart:i,rowStart:s,columnSpan:a,rowSpan:B})},value:c??1,min:1,max:S})})]}),window.__experimentalEnableGridInteractivity&&(0,qt.jsxs)(et.Flex,{as:et.__experimentalToolsPanelItem,hasValue:g,label:(0,Go.__)("Grid placement"),onDeselect:v,isShownByDefault:!1,panelId:n,children:[(0,qt.jsx)(et.FlexItem,{style:{width:"50%"},children:(0,qt.jsx)(et.__experimentalInputControl,{size:"__unstable-large",label:(0,Go.__)("Column"),type:"number",onChange:x=>{let C=x===""?1:parseInt(x,10);t({columnStart:C,rowStart:s,columnSpan:a,rowSpan:c}),h(),m([n],f,f,p(C,s))},value:i??1,min:1,max:u?u-(a??1)+1:void 0})}),(0,qt.jsx)(et.FlexItem,{style:{width:"50%"},children:(0,qt.jsx)(et.__experimentalInputControl,{size:"__unstable-large",label:(0,Go.__)("Row"),type:"number",onChange:x=>{let C=x===""?1:parseInt(x,10);t({columnStart:i,rowStart:C,columnSpan:a,rowSpan:c}),h(),m([n],f,f,p(i,C))},value:s??1,min:1,max:d?d-(c??1)+1:void 0})})]})]})}var LP=l(A(),1),Ub=l(N(),1);var FF=l(w(),1);function NP({panelId:e,value:t,onChange:o=()=>{},options:r,defaultValue:n="auto",hasValue:i,isShownByDefault:s=!0}){let a=t??"auto",[c,u,d]=me("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),f=u?.map(({name:p,ratio:g})=>({label:p,value:g})),m=c?.map(({name:p,ratio:g})=>({label:p,value:g})),h=[{label:(0,Ub._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...d?m:[],...f||[],{label:(0,Ub._x)("Custom","Aspect ratio option for dimensions control"),value:"custom",disabled:!0,hidden:!0}];return(0,FF.jsx)(LP.__experimentalToolsPanelItem,{hasValue:i||(()=>a!==n),label:(0,Ub.__)("Aspect ratio"),onDeselect:()=>o(void 0),isShownByDefault:s,panelId:e,children:(0,FF.jsx)(LP.SelectControl,{label:(0,Ub.__)("Aspect ratio"),value:a,options:r??h,onChange:o,size:"__unstable-large"})})}var We=l(w(),1),zF=["horizontal","vertical"];function MP(e){let t=Ise(e),o=Pse(e),r=Rse(e),n=Ose(e),i=Ase(e),s=Lse(e),a=Nse(e),c=Mse(e),u=Dse(e),d=Vse(e);return Hb.Platform.OS==="web"&&(t||o||r||n||i||s||a||c||u||d)}function Ise(e){return e?.layout?.contentSize}function Pse(e){return e?.layout?.wideSize}function Rse(e){return e?.spacing?.padding}function Ose(e){return e?.spacing?.margin}function Ase(e){return e?.spacing?.blockGap}function Lse(e){return e?.dimensions?.height}function Nse(e){return e?.dimensions?.minHeight}function Mse(e){return e?.dimensions?.width}function Dse(e){return e?.dimensions?.aspectRatio}function Vse(e){let{type:t="default",default:{type:o="default"}={},allowSizingOnChildren:r=!1}=e?.parentLayout??{},n=(o==="flex"||t==="flex"||o==="grid"||t==="grid")&&r;return!!e?.layout&&n}function iIe(e){let{defaultSpacingSizes:t,spacingSizes:o}=e?.spacing||{};return t!==!1&&o?.default?.length>0||o?.theme?.length>0||o?.custom?.length>0}function Ese(e,t){if(!t||!e)return e;let o={};return t.forEach(r=>{r==="vertical"&&(o.top=e.top,o.bottom=e.bottom),r==="horizontal"&&(o.left=e.left,o.right=e.right),o[r]=e?.[r]}),o}function Tse(e){return e&&typeof e=="string"?{top:e,right:e,bottom:e,left:e}:e}function sIe(e,t){return e&&(typeof e=="string"?t?{top:e,right:e,bottom:e,left:e}:{top:e}:{...e,right:e?.left,bottom:e?.top})}function aIe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=Ro(),s=()=>{let a=e(o);t(a)};return(0,We.jsx)(jt.__experimentalToolsPanel,{label:(0,Zt.__)("Dimensions"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var ea={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,height:!0,minHeight:!0,width:!0,aspectRatio:!0,childLayout:!0};function DP({as:e=aIe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=ea,onVisualize:a=()=>{},includeLayoutControls:c=!1}){let{dimensions:u,spacing:d}=n,f=te=>te&&typeof te=="object"?Object.keys(te).reduce((Le,ct)=>(Le[ct]=wn({settings:{dimensions:u,spacing:d}},"",te[ct]),Le),{}):wn({settings:{dimensions:u,spacing:d}},"",te),m=iIe(n),h=(0,jt.__experimentalUseCustomUnits)({availableUnits:n?.spacing?.units||["%","px","em","rem","vw"]}),p=-1/0,[g,b]=(0,Hb.useState)(p),v=Ise(n)&&c,k=f(r?.layout?.contentSize),y=te=>{o(pe(t,["layout","contentSize"],te||void 0))},S=()=>!!t?.layout?.contentSize,x=()=>y(void 0),C=Pse(n)&&c,B=f(r?.layout?.wideSize),I=te=>{o(pe(t,["layout","wideSize"],te||void 0))},P=()=>!!t?.layout?.wideSize,E=()=>I(void 0),L=Rse(n),T=f(r?.spacing?.padding),O=Tse(T),D=Array.isArray(n?.spacing?.padding)?n?.spacing?.padding:n?.spacing?.padding?.sides,U=D&&D.some(te=>zF.includes(te)),G=te=>{let Le=Ese(te,D);o(pe(t,["spacing","padding"],Le))},j=()=>!!t?.spacing?.padding&&Object.keys(t?.spacing?.padding).length,z=()=>G(void 0),W=()=>a("padding"),ee=Ose(n),se=f(r?.spacing?.margin),ce=Tse(se),ie=Array.isArray(n?.spacing?.margin)?n?.spacing?.margin:n?.spacing?.margin?.sides,re=ie&&ie.some(te=>zF.includes(te)),Q=te=>{let Le=Ese(te,ie);o(pe(t,["spacing","margin"],Le))},Y=()=>!!t?.spacing?.margin&&Object.keys(t?.spacing?.margin).length,J=()=>Q(void 0),K=()=>a("margin"),H=Ase(n),X=Array.isArray(n?.spacing?.blockGap)?n?.spacing?.blockGap:n?.spacing?.blockGap?.sides,ne=X&&X.some(te=>zF.includes(te)),le=f(r?.spacing?.blockGap),ve=sIe(le,ne),he=te=>{o(pe(t,["spacing","blockGap"],te))},xe=te=>{te||he(null),!ne&&te?.hasOwnProperty("top")?he(te.top):he({top:te?.top,left:te?.left})},ze=()=>he(void 0),ot=()=>!!t?.spacing?.blockGap,Wt=Nse(n),fo=f(r?.dimensions?.minHeight),Do=te=>{let Le=pe(t,["dimensions","minHeight"],te);o(pe(Le,["dimensions","aspectRatio"],void 0))},rt=()=>{Do(void 0)},ar=()=>!!t?.dimensions?.minHeight,xt=Lse(n),At=f(r?.dimensions?.height),Pe=te=>{let Le=pe(t,["dimensions","height"],te);o(pe(Le,["dimensions","aspectRatio"],void 0))},wt=()=>{Pe(void 0)},qo=()=>!!t?.dimensions?.height,$t=Mse(n),lr=f(r?.dimensions?.width),ln=te=>{o(pe(t,["dimensions","width"],te))},je=()=>{ln(void 0)},Eo=()=>!!t?.dimensions?.width,Ze=Dse(n),Ve=f(r?.dimensions?.aspectRatio),gt=te=>{let Le=pe(t,["dimensions","aspectRatio"],te);o(pe(Le,["dimensions","minHeight"],void 0))},To=()=>!!t?.dimensions?.aspectRatio,cr=Vse(n),ge=r?.layout,Ct=te=>{o({...t,layout:{...te}})},Io=(0,Hb.useCallback)(te=>({...te,layout:Me({...te?.layout,contentSize:void 0,wideSize:void 0,selfStretch:void 0,flexSize:void 0,columnStart:void 0,rowStart:void 0,columnSpan:void 0,rowSpan:void 0}),spacing:{...te?.spacing,padding:void 0,margin:void 0,blockGap:void 0},dimensions:{...te?.dimensions,height:void 0,minHeight:void 0,aspectRatio:void 0,width:void 0}}),[]),Ke=()=>a(!1);return(0,We.jsxs)(e,{resetAllFilter:Io,value:t,onChange:o,panelId:i,children:[(v||C)&&(0,We.jsx)("span",{className:"span-columns",children:(0,Zt.__)("Set the width of the main content area.")}),v&&(0,We.jsx)(jt.__experimentalToolsPanelItem,{label:(0,Zt.__)("Content width"),hasValue:S,onDeselect:x,isShownByDefault:s.contentSize??ea.contentSize,panelId:i,children:(0,We.jsx)(jt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Zt.__)("Content width"),labelPosition:"top",value:k||"",onChange:te=>{y(te)},units:h,prefix:(0,We.jsx)(jt.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,We.jsx)(we,{icon:_f})})})}),C&&(0,We.jsx)(jt.__experimentalToolsPanelItem,{label:(0,Zt.__)("Wide width"),hasValue:P,onDeselect:E,isShownByDefault:s.wideSize??ea.wideSize,panelId:i,children:(0,We.jsx)(jt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Zt.__)("Wide width"),labelPosition:"top",value:B||"",onChange:te=>{I(te)},units:h,prefix:(0,We.jsx)(jt.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,We.jsx)(we,{icon:Lf})})})}),L&&(0,We.jsxs)(jt.__experimentalToolsPanelItem,{hasValue:j,label:(0,Zt.__)("Padding"),onDeselect:z,isShownByDefault:s.padding??ea.padding,className:V({"tools-panel-item-spacing":m}),panelId:i,children:[!m&&(0,We.jsx)(jt.BoxControl,{__next40pxDefaultSize:!0,values:O,onChange:G,label:(0,Zt.__)("Padding"),sides:D,units:h,allowReset:!1,splitOnAxis:U,inputProps:{onMouseOver:W,onMouseOut:Ke}}),m&&(0,We.jsx)(Db,{values:O,onChange:G,label:(0,Zt.__)("Padding"),sides:D,units:h,allowReset:!1,onMouseOver:W,onMouseOut:Ke})]}),ee&&(0,We.jsxs)(jt.__experimentalToolsPanelItem,{hasValue:Y,label:(0,Zt.__)("Margin"),onDeselect:J,isShownByDefault:s.margin??ea.margin,className:V({"tools-panel-item-spacing":m}),panelId:i,children:[!m&&(0,We.jsx)(jt.BoxControl,{__next40pxDefaultSize:!0,values:ce,onChange:Q,inputProps:{min:g,onDragStart:()=>{b(0)},onDragEnd:()=>{b(p)},onMouseOver:K,onMouseOut:Ke},label:(0,Zt.__)("Margin"),sides:ie,units:h,allowReset:!1,splitOnAxis:re}),m&&(0,We.jsx)(Db,{values:ce,onChange:Q,minimumCustomValue:-1/0,label:(0,Zt.__)("Margin"),sides:ie,units:h,allowReset:!1,onMouseOver:K,onMouseOut:Ke})]}),H&&(0,We.jsxs)(jt.__experimentalToolsPanelItem,{hasValue:ot,label:(0,Zt.__)("Block spacing"),onDeselect:ze,isShownByDefault:s.blockGap??ea.blockGap,className:V({"tools-panel-item-spacing":m,"single-column":!m&&!ne}),panelId:i,children:[!m&&(ne?(0,We.jsx)(jt.BoxControl,{__next40pxDefaultSize:!0,label:(0,Zt.__)("Block spacing"),min:0,onChange:xe,units:h,sides:X,values:ve,allowReset:!1,splitOnAxis:ne}):(0,We.jsx)(jt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Zt.__)("Block spacing"),min:0,onChange:he,units:h,value:le})),m&&(0,We.jsx)(Db,{label:(0,Zt.__)("Block spacing"),min:0,onChange:xe,showSideInLabel:!1,sides:ne?X:["top"],values:ve,allowReset:!1})]}),cr&&(0,We.jsx)(Bse,{value:ge,onChange:Ct,parentLayout:n?.parentLayout,panelId:i,isShownByDefault:s.childLayout??ea.childLayout}),Wt&&(0,We.jsx)(jt.__experimentalToolsPanelItem,{hasValue:ar,label:(0,Zt.__)("Minimum height"),onDeselect:rt,isShownByDefault:s.minHeight??ea.minHeight,panelId:i,children:(0,We.jsx)(lb,{label:(0,Zt.__)("Minimum height"),value:fo,onChange:Do})}),xt&&(0,We.jsx)(jt.__experimentalToolsPanelItem,{hasValue:qo,label:(0,Zt.__)("Height"),onDeselect:wt,isShownByDefault:s.height??ea.height,panelId:i,children:(0,We.jsx)(lb,{label:(0,Zt.__)("Height"),value:At,onChange:Pe})}),$t&&(0,We.jsx)(jt.__experimentalToolsPanelItem,{hasValue:Eo,label:(0,Zt.__)("Width"),onDeselect:je,isShownByDefault:s.width??ea.width,panelId:i,children:(0,We.jsx)(lb,{label:(0,Zt.__)("Width"),value:lr,onChange:ln})}),Ze&&(0,We.jsx)(NP,{hasValue:To,value:Ve,onChange:gt,panelId:i,isShownByDefault:s.aspectRatio??ea.aspectRatio})]})}var en=l(A(),1),Wb=l(R(),1),Gb=l(N(),1);var ip=l(N(),1),xo=l(A(),1),FP=l(R(),1);var Rt=l(w(),1),VP=[];function lIe({shadow:e,onShadowChange:t,settings:o}){let r=jF(o);return(0,Rt.jsx)("div",{className:"block-editor-global-styles__shadow-popover-container",children:(0,Rt.jsxs)(xo.__experimentalVStack,{spacing:4,children:[(0,Rt.jsx)(xo.__experimentalHeading,{level:5,children:(0,ip.__)("Drop shadow")}),(0,Rt.jsx)(cIe,{presets:r,activeShadow:e,onSelect:t}),(0,Rt.jsx)("div",{className:"block-editor-global-styles__clear-shadow",children:(0,Rt.jsx)(xo.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t(void 0),disabled:!e,accessibleWhenDisabled:!0,children:(0,ip.__)("Clear")})})]})})}function cIe({presets:e,activeShadow:t,onSelect:o}){return e?(0,Rt.jsx)(xo.Composite,{role:"listbox",className:"block-editor-global-styles__shadow__list","aria-label":(0,ip.__)("Drop shadows"),children:e.map(({name:r,slug:n,shadow:i})=>(0,Rt.jsx)(uIe,{label:r,isActive:i===t,type:n==="unset"?"unset":"preset",onSelect:()=>o(i===t?void 0:i),shadow:i},n))}):null}function uIe({type:e,label:t,isActive:o,onSelect:r,shadow:n}){return(0,Rt.jsx)(xo.Tooltip,{text:t,children:(0,Rt.jsx)(xo.Composite.Item,{role:"option","aria-label":t,"aria-selected":o,className:V("block-editor-global-styles__shadow__item",{"is-active":o}),render:(0,Rt.jsx)("button",{className:V("block-editor-global-styles__shadow-indicator",{unset:e==="unset"}),onClick:r,style:{boxShadow:n},"aria-label":t,children:o&&(0,Rt.jsx)(we,{icon:gl})})})})}function Fse({shadow:e,onShadowChange:t,settings:o}){return(0,Rt.jsx)(xo.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles__shadow-dropdown",renderToggle:dIe(e,t),renderContent:()=>(0,Rt.jsx)(xo.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,Rt.jsx)(lIe,{shadow:e,onShadowChange:t,settings:o})})})}function dIe(e,t){return function({onToggle:r,isOpen:n}){let i=(0,FP.useRef)(void 0),s={onClick:r,className:V("block-editor-global-styles__shadow-dropdown-toggle",{"is-open":n}),"aria-expanded":n,ref:i},a={onClick:()=>{n&&r(),t(void 0),i.current?.focus()},className:V("block-editor-global-styles__shadow-editor__remove-button",{"is-open":n}),label:(0,ip.__)("Remove")};return(0,Rt.jsxs)(Rt.Fragment,{children:[(0,Rt.jsx)(xo.Button,{__next40pxDefaultSize:!0,...s,children:(0,Rt.jsxs)(xo.__experimentalHStack,{justify:"flex-start",children:[(0,Rt.jsx)(we,{className:"block-editor-global-styles__toggle-icon",icon:iN,size:24}),(0,Rt.jsx)(xo.FlexItem,{children:(0,ip.__)("Drop shadow")})]})}),!!e&&(0,Rt.jsx)(xo.Button,{__next40pxDefaultSize:!0,size:"small",icon:Dr,...a})]})}}function jF(e){return(0,FP.useMemo)(()=>{if(!e?.shadow)return VP;let t=e?.shadow?.defaultPresets,{default:o,theme:r,custom:n}=e?.shadow?.presets??{},i={name:(0,ip.__)("Unset"),slug:"unset",shadow:"none"},s=[...t&&o||VP,...r||VP,...n||VP];return s.length&&s.unshift(i),s},[e])}var ta=l(w(),1);function zP(e){return Object.values(p_(e)).some(Boolean)}function p_(e){return{hasBorderColor:zse(e),hasBorderRadius:jse(e),hasBorderStyle:Use(e),hasBorderWidth:Hse(e),hasShadow:Gse(e)}}function zse(e){return e?.border?.color}function jse(e){return e?.border?.radius}function Use(e){return e?.border?.style}function Hse(e){return e?.border?.width}function Gse(e){let t=jF(e);return!!e?.shadow&&t.length>0}function fIe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=Ro();return(0,ta.jsx)(en.__experimentalToolsPanel,{label:i,resetAll:()=>{let c=e(o);t(c)},panelId:r,dropdownMenuProps:s,children:n})}var mIe={radius:!0,color:!0,width:!0,shadow:!0};function jP({as:e=fIe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,name:s,defaultControls:a=mIe}){let c=Xa(n),u=(0,Wb.useCallback)(j=>wn({settings:n},"",j),[n]),d=j=>{let W=c.flatMap(({colors:ee})=>ee).find(({color:ee})=>ee===j);return W?"var:preset|color|"+W.slug:j},f=(0,Wb.useMemo)(()=>{if((0,en.__experimentalHasSplitBorders)(r?.border)){let j={...r?.border};return["top","right","bottom","left"].forEach(z=>{j[z]={...j[z],color:u(j[z]?.color)}}),j}return{...r?.border,color:r?.border?.color?u(r?.border?.color):void 0}},[r?.border,u]),m=j=>o({...t,border:j}),h=zse(n),p=Use(n),g=Hse(n),b=jse(n),v=(0,Wb.useMemo)(()=>typeof r?.border?.radius!="object"?u(r?.border?.radius):{topLeft:u(r?.border?.radius?.topLeft),topRight:u(r?.border?.radius?.topRight),bottomLeft:u(r?.border?.radius?.bottomLeft),bottomRight:u(r?.border?.radius?.bottomRight)},[r?.border?.radius,u]),k=j=>m({...f,radius:j}),y=()=>{let j=t?.border?.radius;return typeof j=="object"?Object.entries(j).some(Boolean):!!j},S=Gse(n),x=u(r?.shadow),C=n?.shadow?.presets??{},B=C.custom??C.theme??C.default??[],I=j=>{let z=B?.find(({shadow:W})=>W===j)?.slug;o(pe(t,["shadow"],z?`var:preset|shadow|${z}`:j||void 0))},P=()=>!!t?.shadow,E=()=>I(void 0),L=()=>{if(y())return m({radius:t?.border?.radius});m(void 0)},T=j=>{let z={...j};(0,en.__experimentalHasSplitBorders)(z)?["top","right","bottom","left"].forEach(W=>{z[W]&&(z[W]={...z[W],color:d(z[W]?.color)})}):z&&(z.color=d(z.color)),m({radius:f?.radius,...z})},O=(0,Wb.useCallback)(j=>({...j,border:void 0,shadow:void 0}),[]),D=a?.color||a?.width,U=h||p||g||b,G=$b({blockName:s,hasShadowControl:S,hasBorderControl:U});return(0,ta.jsxs)(e,{resetAllFilter:O,value:t,onChange:o,panelId:i,label:G,children:[(g||h)&&(0,ta.jsx)(en.__experimentalToolsPanelItem,{hasValue:()=>(0,en.__experimentalIsDefinedBorder)(t?.border),label:(0,Gb.__)("Border"),onDeselect:()=>L(),isShownByDefault:D,panelId:i,children:(0,ta.jsx)(en.BorderBoxControl,{colors:c,enableAlpha:!0,enableStyle:p,onChange:T,popoverOffset:40,popoverPlacement:"left-start",value:f,__experimentalIsRenderedInSidebar:!0,size:"__unstable-large",hideLabelFromVision:!S,label:(0,Gb.__)("Border")})}),b&&(0,ta.jsx)(en.__experimentalToolsPanelItem,{hasValue:y,label:(0,Gb.__)("Radius"),onDeselect:()=>k(void 0),isShownByDefault:a.radius,panelId:i,children:(0,ta.jsx)(ZT,{presets:n?.border?.radiusSizes,values:v,onChange:j=>{k(j||void 0)}})}),S&&(0,ta.jsxs)(en.__experimentalToolsPanelItem,{label:(0,Gb.__)("Shadow"),hasValue:P,onDeselect:E,isShownByDefault:a.shadow,panelId:i,children:[U?(0,ta.jsx)(en.BaseControl.VisualLabel,{as:"legend",children:(0,Gb.__)("Shadow")}):null,(0,ta.jsx)(Fse,{shadow:x,onShadowChange:I,settings:n})]})]})}var Qt=l(A(),1),HP=l(R(),1),Xt=l(N(),1);var at=l(w(),1);function GP(e){let t=$se(e),o=Zse(e),r=Kse(e),n=Dd(e),i=qse(e),s=Yse(e);return t||o||r||n||i||s}function $se(e){let t=Xa(e);return e?.color?.text&&(t?.length>0||e?.color?.custom)}function Kse(e){let t=Xa(e);return e?.color?.link&&(t?.length>0||e?.color?.custom)}function Yse(e){let t=Xa(e);return e?.color?.caption&&(t?.length>0||e?.color?.custom)}function Dd(e){let t=Xa(e),o=f_(e);return e?.color?.heading&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function qse(e){let t=Xa(e),o=f_(e);return e?.color?.button&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function Zse(e){let t=Xa(e),o=f_(e);return e?.color?.background&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function UF({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=Ro(),a=()=>{let c=e(o);t(c)};return(0,at.jsx)(Qt.__experimentalToolsPanel,{label:i||(0,Xt.__)("Elements"),resetAll:a,panelId:r,hasInnerWrapper:!0,headingLevel:3,className:"color-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:s,children:(0,at.jsx)("div",{className:"color-block-support-panel__inner-wrapper",children:n})})}var pIe={text:!0,background:!0,link:!0,heading:!0,button:!0,caption:!0},hIe={placement:"left-start",offset:36,shift:!0},{Tabs:UP}=M(Qt.privateApis),gIe=({indicators:e,label:t})=>(0,at.jsxs)(Qt.__experimentalHStack,{justify:"flex-start",children:[(0,at.jsx)(Qt.__experimentalZStack,{isLayered:!1,offset:-8,children:e.map((o,r)=>(0,at.jsx)(Qt.Flex,{expanded:!1,children:(0,at.jsx)(Qt.ColorIndicator,{colorValue:o})},r))}),(0,at.jsx)(Qt.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",children:t})]});function Wse({isGradient:e,inheritedValue:t,userValue:o,setValue:r,colorGradientControlSettings:n}){return(0,at.jsx)(_d,{...n,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,colorValue:e?void 0:t,gradientValue:e?t:void 0,onColorChange:e?void 0:r,onGradientChange:e?r:void 0,clearable:t===o,headingLevel:3})}function bIe({label:e,hasValue:t,resetValue:o,isShownByDefault:r,indicators:n,tabs:i,colorGradientControlSettings:s,panelId:a}){let c=i.find(m=>m.userValue!==void 0),{key:u,...d}=i[0]??{},f=(0,HP.useRef)(void 0);return(0,at.jsx)(Qt.__experimentalToolsPanelItem,{className:"block-editor-tools-panel-color-gradient-settings__item",hasValue:t,label:e,onDeselect:o,isShownByDefault:r,panelId:a,children:(0,at.jsx)(Qt.Dropdown,{popoverProps:hIe,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:({onToggle:m,isOpen:h})=>{let p={onClick:m,className:V("block-editor-panel-color-gradient-settings__dropdown",{"is-open":h}),"aria-expanded":h,ref:f};return(0,at.jsxs)(at.Fragment,{children:[(0,at.jsx)(Qt.Button,{...p,__next40pxDefaultSize:!0,children:(0,at.jsx)(gIe,{indicators:n,label:e})}),t()&&(0,at.jsx)(Qt.Button,{__next40pxDefaultSize:!0,label:(0,Xt.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:Dr,onClick:()=>{o(),h&&m(),f.current?.focus()}})]})},renderContent:()=>(0,at.jsx)(Qt.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,at.jsxs)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:[i.length===1&&(0,at.jsx)(Wse,{...d,colorGradientControlSettings:s},u),i.length>1&&(0,at.jsxs)(UP,{defaultTabId:c?.key,children:[(0,at.jsx)(UP.TabList,{children:i.map(m=>(0,at.jsx)(UP.Tab,{tabId:m.key,children:m.label},m.key))}),i.map(m=>{let{key:h,...p}=m;return(0,at.jsx)(UP.TabPanel,{tabId:h,focusable:!1,children:(0,at.jsx)(Wse,{...p,colorGradientControlSettings:s},h)},h)})]})]})})})})}function WP({as:e=UF,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=pIe,label:a,children:c}){let u=Xa(n),d=f_(n),f=n?.color?.custom,m=n?.color?.customGradient,h=u.length>0||f,p=d.length>0||m,g=H=>wn({settings:n},"",H),b=H=>{let ne=u.flatMap(({colors:le})=>le).find(({color:le})=>le===H);return ne?"var:preset|color|"+ne.slug:H},v=H=>{let ne=d.flatMap(({gradients:le})=>le).find(({gradient:le})=>le===H);return ne?"var:preset|gradient|"+ne.slug:H},k=Zse(n),y=g(r?.color?.background),S=g(t?.color?.background),x=g(r?.color?.gradient),C=g(t?.color?.gradient),B=()=>!!S||!!C,I=H=>{let X=pe(t,["color","background"],b(H));X.color.gradient=void 0,o(X)},P=H=>{let X=pe(t,["color","gradient"],v(H));X.color.background=void 0,o(X)},E=()=>{let H=pe(t,["color","background"],void 0);H.color.gradient=void 0,o(H)},L=Kse(n),T=g(r?.elements?.link?.color?.text),O=g(t?.elements?.link?.color?.text),D=H=>{o(pe(t,["elements","link","color","text"],b(H)))},U=g(r?.elements?.link?.[":hover"]?.color?.text),G=g(t?.elements?.link?.[":hover"]?.color?.text),j=H=>{o(pe(t,["elements","link",":hover","color","text"],b(H)))},z=()=>!!O||!!G,W=()=>{let H=pe(t,["elements","link",":hover","color","text"],void 0);H=pe(H,["elements","link","color","text"],void 0),o(H)},ee=$se(n),se=g(r?.color?.text),ce=g(t?.color?.text),ie=()=>!!ce,re=H=>{let X=pe(t,["color","text"],b(H));se===T&&(X=pe(X,["elements","link","color","text"],b(H))),o(X)},Q=()=>re(void 0),Y=[{name:"caption",label:(0,Xt.__)("Captions"),showPanel:Yse(n)},{name:"button",label:(0,Xt.__)("Button"),showPanel:qse(n)},{name:"heading",label:(0,Xt.__)("Heading"),showPanel:Dd(n)},{name:"h1",label:(0,Xt.__)("H1"),showPanel:Dd(n)},{name:"h2",label:(0,Xt.__)("H2"),showPanel:Dd(n)},{name:"h3",label:(0,Xt.__)("H3"),showPanel:Dd(n)},{name:"h4",label:(0,Xt.__)("H4"),showPanel:Dd(n)},{name:"h5",label:(0,Xt.__)("H5"),showPanel:Dd(n)},{name:"h6",label:(0,Xt.__)("H6"),showPanel:Dd(n)}],J=(0,HP.useCallback)(H=>({...H,color:void 0,elements:{...H?.elements,link:{...H?.elements?.link,color:void 0,":hover":{color:void 0}},...Y.reduce((X,ne)=>({...X,[ne.name]:{...H?.elements?.[ne.name],color:void 0}}),{})}}),[Y]),K=[ee&&{key:"text",label:(0,Xt.__)("Text"),hasValue:ie,resetValue:Q,isShownByDefault:s.text,indicators:[se],tabs:[{key:"text",label:(0,Xt.__)("Text"),inheritedValue:se,setValue:re,userValue:ce}]},k&&{key:"background",label:(0,Xt.__)("Background"),hasValue:B,resetValue:E,isShownByDefault:s.background,indicators:[x??y],tabs:[h&&{key:"background",label:(0,Xt.__)("Color"),inheritedValue:y,setValue:I,userValue:S},p&&{key:"gradient",label:(0,Xt.__)("Gradient"),inheritedValue:x,setValue:P,userValue:C,isGradient:!0}].filter(Boolean)},L&&{key:"link",label:(0,Xt.__)("Link"),hasValue:z,resetValue:W,isShownByDefault:s.link,indicators:[T,U],tabs:[{key:"link",label:(0,Xt.__)("Default"),inheritedValue:T,setValue:D,userValue:O},{key:"hover",label:(0,Xt.__)("Hover"),inheritedValue:U,setValue:j,userValue:G}]}].filter(Boolean);return Y.forEach(({name:H,label:X,showPanel:ne})=>{if(!ne)return;let le=g(r?.elements?.[H]?.color?.background),ve=g(r?.elements?.[H]?.color?.gradient),he=g(r?.elements?.[H]?.color?.text),xe=g(t?.elements?.[H]?.color?.background),ze=g(t?.elements?.[H]?.color?.gradient),ot=g(t?.elements?.[H]?.color?.text),Wt=()=>!!(ot||xe||ze),fo=()=>{let Pe=pe(t,["elements",H,"color","background"],void 0);Pe.elements[H].color.gradient=void 0,Pe.elements[H].color.text=void 0,o(Pe)},Do=Pe=>{o(pe(t,["elements",H,"color","text"],b(Pe)))},rt=Pe=>{let wt=pe(t,["elements",H,"color","background"],b(Pe));wt.elements[H].color.gradient=void 0,o(wt)},ar=Pe=>{let wt=pe(t,["elements",H,"color","gradient"],v(Pe));wt.elements[H].color.background=void 0,o(wt)},xt=!0,At=H!=="caption";K.push({key:H,label:X,hasValue:Wt,resetValue:fo,isShownByDefault:s[H],indicators:xt&&At?[he,ve??le]:[xt?he:ve??le],tabs:[h&&xt&&{key:"text",label:(0,Xt.__)("Text"),inheritedValue:he,setValue:Do,userValue:ot},h&&At&&{key:"background",label:(0,Xt.__)("Background"),inheritedValue:le,setValue:rt,userValue:xe},p&&At&&{key:"gradient",label:(0,Xt.__)("Gradient"),inheritedValue:ve,setValue:ar,userValue:ze,isGradient:!0}].filter(Boolean)})}),(0,at.jsxs)(e,{resetAllFilter:J,value:t,onChange:o,panelId:i,label:a,children:[K.map(H=>{let{key:X,...ne}=H;return(0,at.jsx)(bIe,{...ne,colorGradientControlSettings:{colors:u,disableCustomColors:!f,gradients:d,disableCustomGradients:!m},panelId:i},X)}),c]})}var mt=l(A(),1),Sc=l(N(),1),Kb=l(R(),1);var so=l(w(),1),$P=[];function Xse(e,{presetSetting:t,defaultSetting:o}){let r=!e?.color?.[o],n=e?.color?.[t]?.custom||$P,i=e?.color?.[t]?.theme||$P,s=e?.color?.[t]?.default||$P;return(0,Kb.useMemo)(()=>[...n,...i,...r?$P:s],[r,n,i,s])}function Qse(e){return Jse(e)}function Jse(e){return e.color.customDuotone||e.color.defaultDuotone||e.color.duotone.length>0}function kIe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=Ro(),s=()=>{let a=e(o);t(a)};return(0,so.jsx)(mt.__experimentalToolsPanel,{label:(0,Sc._x)("Filters","Name for applying graphical effects"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var vIe={duotone:!0},yIe={placement:"left-start",offset:36,shift:!0,className:"block-editor-duotone-control__popover",headerTitle:(0,Sc.__)("Duotone")},SIe=({indicator:e,label:t})=>(0,so.jsxs)(mt.__experimentalHStack,{justify:"flex-start",children:[(0,so.jsx)(mt.__experimentalZStack,{isLayered:!1,offset:-8,children:(0,so.jsx)(mt.Flex,{expanded:!1,children:e==="unset"||!e?(0,so.jsx)(mt.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):(0,so.jsx)(mt.DuotoneSwatch,{values:e})})}),(0,so.jsx)(mt.FlexItem,{title:t,children:t})]}),_Ie=(e,t)=>function({onToggle:r,isOpen:n}){let i=(0,Kb.useRef)(void 0),s={onClick:r,className:V("block-editor-global-styles-filters-panel__dropdown-toggle",{"is-open":n}),"aria-expanded":n,ref:i},a={onClick:()=>{n&&r(),t(),i.current?.focus()},className:"block-editor-panel-duotone-settings__reset",label:(0,Sc.__)("Reset")};return(0,so.jsxs)(so.Fragment,{children:[(0,so.jsx)(mt.Button,{__next40pxDefaultSize:!0,...s,children:(0,so.jsx)(SIe,{indicator:e,label:(0,Sc.__)("Duotone")})}),e&&(0,so.jsx)(mt.Button,{size:"small",icon:Dr,...a})]})};function KP({as:e=kIe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=vIe}){let a=b=>wn({settings:n},"",b),c=Jse(n),u=Xse(n,{presetSetting:"duotone",defaultSetting:"defaultDuotone"}),d=Xse(n,{presetSetting:"palette",defaultSetting:"defaultPalette"}),f=a(r?.filter?.duotone),m=b=>{let v=u.find(({colors:y})=>y===b),k=v?`var:preset|duotone|${v.slug}`:b;o(pe(t,["filter","duotone"],k))},h=()=>!!t?.filter?.duotone,p=()=>m(void 0),g=(0,Kb.useCallback)(b=>({...b,filter:{...b.filter,duotone:void 0}}),[]);return(0,so.jsx)(e,{resetAllFilter:g,value:t,onChange:o,panelId:i,children:c&&(0,so.jsx)(mt.__experimentalToolsPanelItem,{label:(0,Sc.__)("Duotone"),hasValue:h,onDeselect:p,isShownByDefault:s.duotone,panelId:i,children:(0,so.jsx)(mt.Dropdown,{popoverProps:yIe,className:"block-editor-global-styles-filters-panel__dropdown",renderToggle:_Ie(f,p),renderContent:()=>(0,so.jsx)(mt.__experimentalDropdownContentWrapper,{paddingSize:"small",children:(0,so.jsxs)(mt.MenuGroup,{label:(0,Sc.__)("Duotone"),children:[(0,so.jsx)("p",{children:(0,Sc.__)("Create a two-tone color effect without losing your original image.")}),(0,so.jsx)(mt.DuotonePicker,{colorPalette:d,duotonePalette:u,disableCustomColors:!0,disableCustomDuotone:!0,value:f,onChange:m})]})})})})})}var Yb=l(A(),1),h_=l(N(),1);var sp=l(w(),1);function eae(e,t,o){return e==="core/image"&&o?.lightbox?.allowEditing||!!t?.lightbox}function tae({onChange:e,value:t,inheritedValue:o,panelId:r}){let n=Ro(),i=()=>{e(void 0)},s=c=>{e({enabled:c})},a=!1;return o?.lightbox?.enabled&&(a=o.lightbox.enabled),(0,sp.jsx)(sp.Fragment,{children:(0,sp.jsx)(Yb.__experimentalToolsPanel,{label:(0,h_._x)("Settings","Image settings"),resetAll:i,panelId:r,dropdownMenuProps:n,children:(0,sp.jsx)(Yb.__experimentalToolsPanelItem,{hasValue:()=>!!t?.lightbox,label:(0,h_.__)("Enlarge on click"),onDeselect:i,isShownByDefault:!0,panelId:r,children:(0,sp.jsx)(Yb.ToggleControl,{label:(0,h_.__)("Enlarge on click"),checked:a,onChange:s})})})})}var qb=l(A(),1),oae=l(R(),1),YP=l(N(),1);var g_=l(w(),1);function qP(e){return!(typeof e=="string"&&/<\/?\w/.test(e))}function ZP({value:e,onChange:t,inheritedValue:o=e,help:r}){let[n,i]=(0,oae.useState)(null),s=o?.css;function a(u){if(t({...e,css:u}),!qP(u)){i((0,YP.__)("The custom CSS is invalid. Do not use <> markup."));return}n&&i(null)}function c(u){let d=u?.target?.value;if(!d||!qP(d))return;let[f]=Uh([{css:d}],".for-validation-only");i(f===null?(0,YP.__)("There is an error with your CSS structure."):null)}return(0,g_.jsxs)(qb.__experimentalVStack,{spacing:3,children:[n&&(0,g_.jsx)(qb.Notice,{status:"error",onRemove:()=>i(null),children:n}),(0,g_.jsx)(qb.TextareaControl,{label:(0,YP.__)("Additional CSS"),value:s,onChange:u=>a(u),onBlur:c,className:"block-editor-global-styles-advanced-panel__custom-css-input",spellCheck:!1,help:r})]})}var e2=l(A(),1),t2=l(R(),1),GF=l(N(),1);var Be=l(A(),1);var Ot=l(N(),1),nae=l(Un(),1),HF=l(dn(),1),_c=l(R(),1),b_=l(F(),1),iae=l(Fe(),1),sae=l(F5(),1);var Te=l(w(),1),XP="image",xIe={placement:"left-start",offset:36,shift:!0,className:"block-editor-global-styles-background-panel__popover"},JP=()=>{},QP=e=>{window.requestAnimationFrame(()=>{let[t]=iae.focus.tabbable.find(e?.current);t&&t.focus()})};function wIe(e){return e==="cover"||e===void 0?(0,Ot.__)("Image covers the space evenly."):e==="contain"?(0,Ot.__)("Image is contained without distortion."):(0,Ot.__)("Image has a fixed width.")}var CIe=e=>{if(!e||isNaN(e.x)&&isNaN(e.y))return;let t=isNaN(e.x)?.5:e.x,o=isNaN(e.y)?.5:e.y;return`${t*100}% ${o*100}%`},BIe=e=>{if(!e)return{x:void 0,y:void 0};let[t,o]=e.split(" ").map(r=>parseFloat(r)/100);return t=isNaN(t)?void 0:t,o=isNaN(o)?t:o,{x:t,y:o}};function aae({as:e="span",imgUrl:t,toggleProps:o={},filename:r,label:n,onToggleCallback:i=JP}){let{isOpen:s,...a}=o;(0,_c.useEffect)(()=>{typeof s<"u"&&i(s)},[s,i]);let c=()=>(0,Te.jsxs)(Be.__experimentalHStack,{className:"block-editor-global-styles-background-panel__inspector-preview-inner",children:[(0,Te.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator",style:{backgroundImage:t?`url(${t})`:void 0}}),(0,Te.jsxs)(Be.FlexBlock,{children:[(0,Te.jsx)(Be.__experimentalTruncate,{numberOfLines:1,className:"block-editor-global-styles-background-panel__inspector-media-replace-title",children:n}),(0,Te.jsx)(Be.VisuallyHidden,{as:"span",children:t?(0,Ot.sprintf)((0,Ot.__)("Background image: %s"),r||n):(0,Ot.__)("No background image selected")})]})]});return e==="button"?(0,Te.jsx)(Be.Button,{__next40pxDefaultSize:!0,...a,children:c()}):c()}function EIe({label:e,filename:t,url:o,children:r,onToggle:n=JP,hasImageValue:i,onReset:s,containerRef:a}){if(!i)return;let c=e||(0,HF.getFilename)(o)||(0,Ot.__)("Image");return(0,Te.jsx)(Be.Dropdown,{popoverProps:xIe,renderToggle:({onToggle:u,isOpen:d})=>{let f={onClick:u,className:"block-editor-global-styles-background-panel__dropdown-toggle","aria-expanded":d,"aria-label":(0,Ot.__)("Background size, position and repeat options."),isOpen:d};return(0,Te.jsxs)(Te.Fragment,{children:[(0,Te.jsx)(aae,{imgUrl:o,filename:t,label:c,toggleProps:f,as:"button",onToggleCallback:n}),s&&(0,Te.jsx)(Be.Button,{__next40pxDefaultSize:!0,label:(0,Ot.__)("Reset"),className:"block-editor-global-styles-background-panel__reset",size:"small",icon:Dr,onClick:()=>{s(),d&&u(),QP(a)}})]})},renderContent:()=>(0,Te.jsx)(Be.__experimentalDropdownContentWrapper,{className:"block-editor-global-styles-background-panel__dropdown-content-wrapper",paddingSize:"medium",children:r})})}function TIe(){return(0,Te.jsx)(Be.Placeholder,{className:"block-editor-global-styles-background-panel__loading",children:(0,Te.jsx)(Be.Spinner,{})})}function rae({onChange:e,style:t,inheritedValue:o,onRemoveImage:r=JP,onResetImage:n=JP,displayInPanel:i,defaultValues:s,containerRef:a}){let[c,u]=(0,_c.useState)(!1),{getSettings:d}=(0,b_.useSelect)(_),{id:f,title:m,url:h}=t?.background?.backgroundImage||{...o?.background?.backgroundImage},{createErrorNotice:p}=(0,b_.useDispatch)(nae.store),g=B=>{p(B,{type:"snackbar"}),u(!1)},b=()=>e(pe(t,["background","backgroundImage"],void 0)),v=B=>{if(!B||!B.url){b(),u(!1);return}if((0,sae.isBlobURL)(B.url)){u(!0);return}if(B.media_type&&B.media_type!==XP||!B.media_type&&B.type&&B.type!==XP){g((0,Ot.__)("Only images can be used as a background image."));return}let I=t?.background?.backgroundSize||s?.backgroundSize,P=t?.background?.backgroundPosition;e(pe(t,["background"],{...t?.background,backgroundImage:{url:B.url,id:B.id,source:"file",title:B.title||void 0},backgroundPosition:!P&&(I==="auto"||!I)?"50% 0":P,backgroundSize:I})),u(!1),QP(a)},k=B=>{d().mediaUpload({allowedTypes:[XP],filesList:B,onFileChange([I]){v(I)},onError:g,multiple:!1})},y=ap(t),S=()=>e(pe(t,["background"],{backgroundImage:"none"})),x=!y&&ap(o),C=m||(0,HF.getFilename)(h)||(0,Ot.__)("Image");return(0,Te.jsxs)("div",{className:"block-editor-global-styles-background-panel__image-tools-panel-item",children:[c&&(0,Te.jsx)(TIe,{}),(0,Te.jsx)(_b,{mediaId:f,mediaURL:h,allowedTypes:[XP],accept:"image/*",onSelect:v,popoverProps:{className:V({"block-editor-global-styles-background-panel__media-replace-popover":i})},name:(0,Te.jsx)(aae,{imgUrl:h,filename:m,label:C}),renderToggle:B=>(0,Te.jsx)(Be.Button,{...B,__next40pxDefaultSize:!0}),onError:g,onReset:()=>{QP(a),n()},children:x&&(0,Te.jsx)(Be.MenuItem,{onClick:()=>{QP(a),S(),r()},children:(0,Ot.__)("Remove")})}),(0,Te.jsx)(Be.DropZone,{onFilesDrop:k,label:(0,Ot.__)("Drop to upload")})]})}function IIe({onChange:e,style:t,inheritedValue:o,defaultValues:r}){let n=t?.background?.backgroundSize||o?.background?.backgroundSize,i=t?.background?.backgroundRepeat||o?.background?.backgroundRepeat,s=t?.background?.backgroundImage?.url||o?.background?.backgroundImage?.url,a=t?.background?.backgroundImage?.id,c=t?.background?.backgroundPosition||o?.background?.backgroundPosition,u=t?.background?.backgroundAttachment||o?.background?.backgroundAttachment,d=!n&&a?r?.backgroundSize:n||"auto";d=["cover","contain","auto"].includes(d)?d:"auto";let f=!(i==="no-repeat"||d==="cover"&&i===void 0),m=v=>{let k=i,y=c;v==="contain"&&(k="no-repeat",y=void 0),v==="cover"&&(k=void 0,y=void 0),(d==="cover"||d==="contain")&&v==="auto"&&(k=void 0,t?.background?.backgroundImage?.id&&(y="50% 0")),!v&&d==="auto"&&(v="auto"),e(pe(t,["background"],{...t?.background,backgroundPosition:y,backgroundRepeat:k,backgroundSize:v}))},h=v=>{e(pe(t,["background","backgroundPosition"],CIe(v)))},p=()=>e(pe(t,["background","backgroundRepeat"],f===!0?"no-repeat":"repeat")),g=()=>e(pe(t,["background","backgroundAttachment"],u==="fixed"?"scroll":"fixed")),b=!c&&a&&n==="contain"?r?.backgroundPosition:c;return(0,Te.jsxs)(Be.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,Te.jsx)(Be.FocalPointPicker,{label:(0,Ot.__)("Focal point"),url:s,value:BIe(b),onChange:h}),(0,Te.jsx)(Be.ToggleControl,{label:(0,Ot.__)("Fixed background"),checked:u==="fixed",onChange:g}),(0,Te.jsxs)(Be.__experimentalToggleGroupControl,{size:"__unstable-large",label:(0,Ot.__)("Size"),value:d,onChange:m,isBlock:!0,help:wIe(n||r?.backgroundSize),children:[(0,Te.jsx)(Be.__experimentalToggleGroupControlOption,{value:"cover",label:(0,Ot._x)("Cover","Size option for background image control")},"cover"),(0,Te.jsx)(Be.__experimentalToggleGroupControlOption,{value:"contain",label:(0,Ot._x)("Contain","Size option for background image control")},"contain"),(0,Te.jsx)(Be.__experimentalToggleGroupControlOption,{value:"auto",label:(0,Ot._x)("Tile","Size option for background image control")},"tile")]}),(0,Te.jsxs)(Be.__experimentalHStack,{justify:"flex-start",spacing:2,as:"span",children:[(0,Te.jsx)(Be.__experimentalUnitControl,{"aria-label":(0,Ot.__)("Background image width"),onChange:m,value:n,size:"__unstable-large",__unstableInputWidth:"100px",min:0,placeholder:(0,Ot.__)("Auto"),disabled:d!=="auto"||d===void 0}),(0,Te.jsx)(Be.ToggleControl,{label:(0,Ot.__)("Repeat"),checked:f,onChange:p,disabled:d==="cover"})]})]})}function lae({value:e,onChange:t,inheritedValue:o=e,settings:r,defaultValues:n={}}){let{globalStyles:i,_links:s}=(0,b_.useSelect)(v=>{let{getSettings:k}=v(_),y=k();return{globalStyles:y[xi],_links:y[y0]}},[]),a=(0,_c.useMemo)(()=>{let v={background:{}};return o?.background?(Object.entries(o?.background).forEach(([k,y])=>{v.background[k]=Pg(y,{styles:i,_links:s})}),v):o},[i,s,o]),c=()=>t(pe(e,["background"],{})),{title:u,url:d}=e?.background?.backgroundImage||{...a?.background?.backgroundImage},f=ap(e)||ap(a),m=e?.background?.backgroundImage||o?.background?.backgroundImage,h=f&&m!=="none"&&(r?.background?.backgroundSize||r?.background?.backgroundPosition||r?.background?.backgroundRepeat),[p,g]=(0,_c.useState)(!1),b=(0,_c.useRef)();return(0,Te.jsx)("div",{ref:b,className:V("block-editor-global-styles-background-panel__inspector-media-replace-container",{"is-open":p}),children:h?(0,Te.jsx)(EIe,{label:u,filename:u,url:d,onToggle:g,hasImageValue:f,onReset:c,containerRef:b,children:(0,Te.jsxs)(Be.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,Te.jsx)(rae,{onChange:t,style:e,inheritedValue:a,displayInPanel:!0,onResetImage:()=>{g(!1),c()},onRemoveImage:()=>g(!1),defaultValues:n,containerRef:b}),(0,Te.jsx)(IIe,{onChange:t,style:e,defaultValues:n,inheritedValue:a})]})}):(0,Te.jsx)(rae,{onChange:t,style:e,inheritedValue:a,defaultValues:n,onResetImage:()=>{g(!1),c()},onRemoveImage:()=>g(!1),containerRef:b})})}var k_=l(w(),1),PIe={backgroundImage:!0};function v_(e){return t2.Platform.OS==="web"&&e?.background?.backgroundImage}function ap(e){return!!e?.background?.backgroundImage?.id||typeof e?.background?.backgroundImage=="string"||!!e?.background?.backgroundImage?.url}function RIe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,headerLabel:i}){let s=Ro();return(0,k_.jsx)(e2.__experimentalToolsPanel,{label:i,resetAll:()=>{let c=e(o);t(c)},panelId:r,dropdownMenuProps:s,children:n})}function o2({as:e=RIe,value:t,onChange:o,inheritedValue:r,settings:n,panelId:i,defaultControls:s=PIe,defaultValues:a={},headerLabel:c=(0,GF.__)("Background")}){let u=v_(n),d=()=>o(pe(t,["background"],{})),f=(0,t2.useCallback)(m=>({...m,background:{}}),[]);return(0,k_.jsx)(e,{resetAllFilter:f,value:t,onChange:o,panelId:i,headerLabel:c,children:u&&(0,k_.jsx)(e2.__experimentalToolsPanelItem,{hasValue:()=>!!t?.background,label:(0,GF.__)("Image"),onDeselect:d,isShownByDefault:s.backgroundImage,panelId:i,children:(0,k_.jsx)(lae,{value:t,onChange:o,settings:n,inheritedValue:r,defaultControls:s,defaultValues:a})})})}var n2=l(N(),1),KF=l(w(),1),cp="__experimentalBorder",S_="shadow",cae=(e,t,o)=>{let r;return e.some(n=>n.colors.some(i=>i[t]===o?(r=i,!0):!1)),r},lp=({colors:e,namedColor:t,customColor:o})=>{if(t){let n=cae(e,"slug",t);if(n)return n}if(!o)return{color:void 0};let r=cae(e,"color",o);return r||{color:o}};function r2(e){let t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function fae(e){if((0,$F.__experimentalHasSplitBorders)(e?.border))return{style:e,borderColor:void 0};let t=e?.border?.color,o=t?.startsWith("var:preset|color|")?t.substring(17):void 0,r={...e};return r.border={...r.border,color:o?void 0:t},{style:Me(r),borderColor:o}}function mae(e){return(0,$F.__experimentalHasSplitBorders)(e.style?.border)?e.style:{...e.style,border:{...e.style?.border,color:e.borderColor?"var:preset|color|"+e.borderColor:e.style?.border?.color}}}function OIe({label:e,children:t,resetAllFilter:o}){let r=(0,Zb.useCallback)(n=>{let i=mae(n),s=o(i);return{...n,...fae(s)}},[o]);return(0,KF.jsx)(fe,{group:"border",resetAllFilter:r,label:e,children:t})}function pae({clientId:e,name:t,setAttributes:o,settings:r}){let n=zP(r),{style:i,borderColor:s}=(0,dae.useSelect)(d=>{if(!n)return{};let{style:f,borderColor:m}=d(_).getBlockAttributes(e)||{};return{style:f,borderColor:m}},[e,n]),a=(0,Zb.useMemo)(()=>mae({style:i,borderColor:s}),[i,s]),c=d=>{o(fae(d))};if(!n)return null;let u={...(0,y_.getBlockSupport)(t,[cp,"__experimentalDefaultControls"]),...(0,y_.getBlockSupport)(t,[S_,"__experimentalDefaultControls"])};return(0,KF.jsx)(jP,{as:OIe,panelId:e,settings:r,value:a,onChange:c,defaultControls:u})}function i2(e,t="any"){if(Zb.Platform.OS!=="web")return!1;let o=(0,y_.getBlockSupport)(e,cp);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}function $b({blockName:e,hasBorderControl:t,hasShadowControl:o}={}){let r=is(e),n=p_(r);return!t&&!o&&e&&(t=n?.hasBorderColor||n?.hasBorderStyle||n?.hasBorderWidth||n?.hasBorderRadius,o=n?.hasShadow),t&&o?(0,n2.__)("Border & Shadow"):o?(0,n2.__)("Shadow"):(0,n2.__)("Border")}function AIe(e){return!i2(e,"color")||e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}}function hae(e,t,o){if(!i2(t,"color")||Ue(t,cp,"color"))return e;let r=YF(o),n=V(e.className,r);return e.className=n||void 0,e}function YF(e){let{borderColor:t,style:o}=e,r=_i("border-color",t);return V({"has-border-color":t||o?.border?.color,[r]:!!r})}function LIe({name:e,borderColor:t,style:o}){let{colors:r}=wd();if(!i2(e,"color")||Ue(e,cp,"color"))return{};let{color:n}=lp({colors:r,namedColor:t}),{color:i}=lp({colors:r,namedColor:r2(o?.border?.top?.color)}),{color:s}=lp({colors:r,namedColor:r2(o?.border?.right?.color)}),{color:a}=lp({colors:r,namedColor:r2(o?.border?.bottom?.color)}),{color:c}=lp({colors:r,namedColor:r2(o?.border?.left?.color)});return hae({style:Me({borderTopColor:i||n,borderRightColor:s||n,borderBottomColor:a||n,borderLeftColor:c||n})||{}},e,{borderColor:t,style:o})}var qF={useBlockProps:LIe,addSaveProps:hae,attributeKeys:["borderColor","style"],hasSupport(e){return i2(e,"color")}};(0,uae.addFilter)("blocks.registerBlockType","core/border/addAttributes",AIe);var JF=l(ut(),1),xc=l($(),1),Vd=l(R(),1),Bae=l(F(),1);var XF=l($(),1),gae=l(F(),1),bae=l(R(),1);var QF=l(w(),1),up="background",ZF={backgroundSize:"cover",backgroundPosition:"50% 50%"};function s2(e,t="any"){let o=(0,XF.getBlockSupport)(e,up);return o===!0?!0:t==="any"?!!o?.backgroundImage||!!o?.backgroundSize||!!o?.backgroundRepeat:!!o?.[t]}function a2(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:ZF.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:ZF.backgroundPosition}),t}function NIe({name:e,style:t}){if(!s2(e)||!t?.background?.backgroundImage)return;let o=a2(t?.background);if(o)return{style:{...o}}}function kae(e){return ap(e)?"has-background":""}function MIe({children:e}){let t=(0,bae.useCallback)(o=>({...o,style:{...o.style,background:void 0}}),[]);return(0,QF.jsx)(fe,{group:"background",resetAllFilter:t,children:e})}function vae({clientId:e,name:t,setAttributes:o,settings:r}){let{style:n,inheritedValue:i}=(0,gae.useSelect)(u=>{let{getBlockAttributes:d,getSettings:f}=u(_),m=f();return{style:d(e)?.style,inheritedValue:m[xi]?.blocks?.[t]}},[e,t]);if(!v_(r)||!s2(t,"backgroundImage"))return null;let s=u=>{o({style:Me(u)})},a={...r,background:{...r.background,backgroundSize:r?.background?.backgroundSize&&s2(t,"backgroundSize")}},c=(0,XF.getBlockSupport)(t,[up,"defaultControls"]);return(0,QF.jsx)(o2,{inheritedValue:i,as:MIe,panelId:e,defaultValues:ZF,settings:a,onChange:s,defaultControls:c,value:n})}var yae={useBlockProps:NIe,attributeKeys:["style"],hasSupport:s2};var __=l(R(),1),_ae=l(F(),1),xae=l($(),1);var wae=l(w(),1);function l2(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function Sae(e,t){if(!e||!t)return{};let o=oi(t,"color.text",{fallback:!0}),r=oi(t,"color.background",{fallback:!0}),n=e.querySelector(o)||e,i=e.querySelector(r)||e,s=e.querySelector("a"),a=l2(n,"color"),c=s&&s.textContent?l2(s,"color"):void 0,u=i,d=l2(u,"background-color");for(;d==="rgba(0, 0, 0, 0)"&&u.parentNode&&u.parentNode.nodeType===u.parentNode.ELEMENT_NODE;)u=u.parentNode,d=l2(u,"background-color");return{textColor:a,backgroundColor:d,linkColor:c}}function DIe(e,t){return Object.keys(t).some(r=>e[r]!==t[r])?t:e}function Cae({clientId:e,name:t}){let o=Xe(e),[r,n]=(0,__.useReducer)(DIe,{}),i=(0,_ae.useSelect)(s=>t?s(xae.store).getBlockType(t):void 0,[t]);return(0,__.useLayoutEffect)(()=>{!o||!i||window.requestAnimationFrame(()=>window.requestAnimationFrame(()=>n(Sae(o,i))))}),(0,__.useLayoutEffect)(()=>{if(!o||!i)return;let s=new window.MutationObserver(()=>{n(Sae(o,i))});return s.observe(o,{attributes:!0,attributeFilter:["class","style"]}),()=>{s.disconnect()}},[o,i]),(0,wae.jsx)(QT,{backgroundColor:r.backgroundColor,textColor:r.textColor,linkColor:r.linkColor,enableAlphaChecker:!0})}var c2=l(w(),1),ir="color",u2=e=>{let t=(0,xc.getBlockSupport)(e,ir);return t&&(t.link===!0||t.gradient===!0||t.background!==!1||t.text!==!1)},VIe=e=>{if(Vd.Platform.OS!=="web")return!1;let t=(0,xc.getBlockSupport)(e,ir);return t!==null&&typeof t=="object"&&!!t.link},e4=e=>{let t=(0,xc.getBlockSupport)(e,ir);return t!==null&&typeof t=="object"&&!!t.gradients},FIe=e=>{let t=(0,xc.getBlockSupport)(e,ir);return t&&t.background!==!1},zIe=e=>{let t=(0,xc.getBlockSupport)(e,ir);return t&&t.text!==!1};function jIe(e){return u2(e)&&(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),e4(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}})),e}function Eae(e,t,o){if(!u2(t)||Ue(t,ir))return e;let r=e4(t),{backgroundColor:n,textColor:i,gradient:s,style:a}=o,c=g=>!Ue(t,ir,g),u=c("text")?_i("color",i):void 0,d=c("gradients")?th(s):void 0,f=c("background")?_i("background-color",n):void 0,m=c("background")||c("gradients"),h=n||a?.color?.background||r&&(s||a?.color?.gradient),p=V(e.className,u,d,{[f]:(!r||!a?.color?.gradient)&&!!f,"has-text-color":c("text")&&(i||a?.color?.text),"has-background":m&&h,"has-link-color":c("link")&&a?.elements?.link?.color});return e.className=p||void 0,e}function Tae(e){let t=e?.color?.text,o=t?.startsWith("var:preset|color|")?t.substring(17):void 0,r=e?.color?.background,n=r?.startsWith("var:preset|color|")?r.substring(17):void 0,i=e?.color?.gradient,s=i?.startsWith("var:preset|gradient|")?i.substring(20):void 0,a={...e};return a.color={...a.color,text:o?void 0:t,background:n?void 0:r,gradient:s?void 0:i},{style:Me(a),textColor:o,backgroundColor:n,gradient:s}}function Iae(e){return{...e.style,color:{...e.style?.color,text:e.textColor?"var:preset|color|"+e.textColor:e.style?.color?.text,background:e.backgroundColor?"var:preset|color|"+e.backgroundColor:e.style?.color?.background,gradient:e.gradient?"var:preset|gradient|"+e.gradient:e.style?.color?.gradient}}}function UIe({children:e,resetAllFilter:t}){let o=(0,Vd.useCallback)(r=>{let n=Iae(r),i=t(n);return{...r,...Tae(i)}},[t]);return(0,c2.jsx)(fe,{group:"color",resetAllFilter:o,children:e})}function d2({clientId:e,name:t,setAttributes:o,settings:r,asWrapper:n,label:i,defaultControls:s}){let a=GP(r),{style:c,textColor:u,backgroundColor:d,gradient:f}=(0,Bae.useSelect)(b=>{if(!a)return{};let{style:v,textColor:k,backgroundColor:y,gradient:S}=b(_).getBlockAttributes(e)||{};return{style:v,textColor:k,backgroundColor:y,gradient:S}},[e,a]),m=(0,Vd.useMemo)(()=>Iae({style:c,textColor:u,backgroundColor:d,gradient:f}),[c,u,d,f]),h=b=>{o(Tae(b))};if(!a)return null;s=s||(0,xc.getBlockSupport)(t,[ir,"__experimentalDefaultControls"]);let p=Vd.Platform.OS==="web"&&!m?.color?.gradient&&(r?.color?.text||r?.color?.link)&&(0,xc.getBlockSupport)(t,[ir,"enableContrastChecker"])!==!1;return(0,c2.jsx)(WP,{as:n||UIe,panelId:e,settings:r,value:m,onChange:h,defaultControls:s,label:i,enableContrastChecker:(0,xc.getBlockSupport)(t,[ir,"enableContrastChecker"])!==!1,children:p&&(0,c2.jsx)(Cae,{clientId:e,name:t})})}function HIe({name:e,backgroundColor:t,textColor:o,gradient:r,style:n}){let[i,s,a]=me("color.palette.custom","color.palette.theme","color.palette.default"),c=(0,Vd.useMemo)(()=>[...i||[],...s||[],...a||[]],[i,s,a]);if(!u2(e)||Ue(e,ir))return{};let u={};o&&!Ue(e,ir,"text")&&(u.color=da(c,o)?.color),t&&!Ue(e,ir,"background")&&(u.backgroundColor=da(c,t)?.color);let d=Eae({style:u},e,{textColor:o,backgroundColor:t,gradient:r,style:n}),f=t||n?.color?.background||r||n?.color?.gradient;return{...d,className:V(d.className,!f&&kae(n))}}var t4={useBlockProps:HIe,addSaveProps:Eae,attributeKeys:["backgroundColor","textColor","gradient","style"],hasSupport:u2},GIe={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};function WIe(e,t,o,r){let n=e.name,i={linkColor:VIe(n),textColor:zIe(n),backgroundColor:FIe(n),gradient:e4(n)};return f2(i,GIe,e,t,o,r)}(0,JF.addFilter)("blocks.registerBlockType","core/color/addAttribute",jIe);(0,JF.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",WIe);var kr=l(w(),1);function $Ie({blockName:e,clientId:t,contentClientIds:o}){let r=is(e),{updateBlockAttributes:n}=(0,m2.useDispatch)(_),{hasButtons:i,hasHeading:s}=(0,m2.useSelect)(c=>{let u=c(_).getBlockNamesByClientId(o);return{hasButtons:u.includes("core/buttons"),hasHeading:u.includes("core/heading")}},[o]);return(0,kr.jsx)(d2,{clientId:t,name:e,settings:r,setAttributes:c=>{n(t,c)},asWrapper:UF,label:(0,Xb.__)("Color"),defaultControls:{text:!0,background:!0,button:i,heading:s}})}var KIe=({blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:r,contentClientIds:n})=>{let i=$b({blockName:e});return(0,kr.jsxs)(kr.Fragment,{children:[o&&(0,kr.jsx)(Qg,{clientId:t}),r&&(0,kr.jsx)($Ie,{blockName:e,clientId:t,contentClientIds:n}),!r&&(0,kr.jsxs)(kr.Fragment,{children:[(0,kr.jsx)(fe.Slot,{group:"color",label:(0,Xb.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,kr.jsx)(fe.Slot,{group:"background",label:(0,Xb.__)("Background image")}),(0,kr.jsx)(fe.Slot,{group:"filter"}),(0,kr.jsx)(fe.Slot,{group:"typography",label:(0,Xb.__)("Typography")}),(0,kr.jsx)(fe.Slot,{group:"dimensions",label:(0,Xb.__)("Dimensions")}),(0,kr.jsx)(fe.Slot,{group:"border",label:i}),(0,kr.jsx)(fe.Slot,{group:"styles"})]})]})},Pae=KIe;var Rae=l(A(),1),Oae=l(N(),1);var p2=l($(),1),h2=l(F(),1),fi=l(A(),1);var ss=l(w(),1);function g2({clientIds:e,onSelect:t,onSwitchToListView:o,hasListViewTab:r}){return e.length?(0,ss.jsx)(fi.__experimentalVStack,{spacing:1,children:e.map(n=>(0,ss.jsx)(YIe,{onSelect:t,onSwitchToListView:o,hasListViewTab:r,clientId:n},n))}):null}function YIe({clientId:e,onSelect:t,onSwitchToListView:o,hasListViewTab:r}){let n=Tt(e),{isSelected:i,childBlocks:s,hasListViewSupport:a,blockName:c}=(0,h2.useSelect)(p=>{let{isBlockSelected:g,hasSelectedInnerBlock:b,getBlockOrder:v,getBlockName:k}=p(_),y=k(e);return{isSelected:g(e)||b(e,!0),childBlocks:v(e),hasListViewSupport:y==="core/navigation"||(0,p2.hasBlockSupport)(y,"listView"),blockName:y}},[e]),d=(0,p2.getBlockType)(c)?.title||c,{selectBlock:f}=(0,h2.useDispatch)(_),h=s&&s.length>0&&r&&a;return(0,ss.jsx)(fi.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-quick-navigation__item",isPressed:i,onClick:async()=>{await f(e),h&&o&&o(e),t&&t(e)},children:(0,ss.jsxs)(fi.Flex,{children:[(0,ss.jsx)(fi.FlexItem,{children:(0,ss.jsx)(Ae,{icon:n?.icon})}),(0,ss.jsx)(fi.FlexBlock,{style:{textAlign:"left"},children:(0,ss.jsx)(fi.__experimentalTruncate,{children:d})}),h&&(0,ss.jsx)(fi.FlexItem,{children:(0,ss.jsx)(we,{icon:Vo,size:24})})]})})}var Qb=l(w(),1),qIe=({contentClientIds:e,onSwitchToListView:t,hasListViewTab:o})=>{if(!e||e.length===0)return null;let r=window?.__experimentalContentOnlyInspectorFields;return(0,Qb.jsx)(Qb.Fragment,{children:!r&&(0,Qb.jsx)(Rae.PanelBody,{title:(0,Oae.__)("Content"),children:(0,Qb.jsx)(g2,{clientIds:e,onSwitchToListView:t,hasListViewTab:o})})})},b2=qIe;var Wo=l(w(),1),{Tabs:Fd}=M(ek.privateApis);function o4({blockName:e,clientId:t,hasBlockStyles:o,tabs:r,isSectionBlock:n,contentClientIds:i}){let s=(0,oa.useRef)(null),a=(0,Jb.useSelect)(S=>S(Aae.store).get("core","showIconLabels"),[]),{requestedTab:c}=(0,Jb.useSelect)(S=>({requestedTab:M(S(_)).getRequestedInspectorTab()})),[u,d]=(0,oa.useState)(()=>c?.tabName??r[0]?.name),f=(0,oa.useRef)(!1),m=(0,oa.useRef)(!1),{__unstableSetOpenListViewPanel:h,__unstableIncrementListViewExpandRevision:p,__unstableSetAllListViewPanelsOpen:g}=(0,Jb.useDispatch)(_),{clearRequestedInspectorTab:b}=M((0,Jb.useDispatch)(_));(0,oa.useEffect)(()=>{f.current=!1},[t]),(0,oa.useEffect)(()=>{c&&(d(c.tabName),c.tabName===yc.name&&c.options?.openPanel&&(h(c.options.openPanel),p()),m.current=!0,f.current=!0,b())},[c,h,p,b]),(0,oa.useEffect)(()=>{u===yc.name&&!f.current&&(g(),p())},[t,u,g,p]),(0,oa.useEffect)(()=>{if(!r?.length||f.current&&r.some(x=>x.name===u))return;let S=r[0]?.name;u!==S&&d(S)},[r,u]);let v=S=>{d(S),f.current=!0,S===yc.name&&!m.current&&(g(),p()),m.current=!1},k=r.some(S=>S.name===yc.name),y=S=>{k&&(h(S),p(),m.current=!0,v(yc.name))};return(0,Wo.jsx)("div",{className:"block-editor-block-inspector__tabs",children:(0,Wo.jsxs)(Fd,{selectedTabId:u,onSelect:v,children:[(0,Wo.jsx)(Fd.TabList,{children:r.map(S=>a?(0,Wo.jsx)(Fd.Tab,{tabId:S.name,children:S.title},S.name):(0,Wo.jsx)(ek.Tooltip,{text:S.title,children:(0,Wo.jsx)(Fd.Tab,{tabId:S.name,"aria-label":S.title,children:(0,Wo.jsx)(ek.Icon,{icon:S.icon})})},S.name))}),(0,Wo.jsxs)(Fd.TabPanel,{tabId:_P.name,focusable:!1,children:[(0,Wo.jsx)(b2,{contentClientIds:i,onSwitchToListView:y,hasListViewTab:k}),(0,Wo.jsx)(fe.Slot,{group:"content"})]}),(0,Wo.jsxs)(Fd.TabPanel,{tabId:yc.name,focusable:!1,children:[(0,Wo.jsx)(fe.Slot,{group:"list",ref:s}),(0,Wo.jsx)(tE,{listViewRef:s})]}),(0,Wo.jsx)(Fd.TabPanel,{tabId:yP.name,focusable:!1,children:(0,Wo.jsx)(sse,{showAdvancedControls:!!e})}),(0,Wo.jsx)(Fd.TabPanel,{tabId:SP.name,focusable:!1,children:(0,Wo.jsx)(Pae,{blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:n,contentClientIds:i})})]},t)})}var mi=l(A(),1),Lae=l(F(),1);var ZIe=[];function XIe(e,t={}){return t[e]!==void 0?t[e]:t.default!==void 0?t.default:!0}function Nae(e,t,o,r){let n=[],{bindings:i,border:s,color:a,content:c,default:u,dimensions:d,list:f,position:m,styles:h,typography:p,effects:g}=Wi,b=(0,mi.__experimentalUseSlotFills)(f.name),v=!!b&&b.length,k=(0,mi.__experimentalUseSlotFills)(c.name),y=!!k&&k.length,x=[...(0,mi.__experimentalUseSlotFills)(s.name)||[],...(0,mi.__experimentalUseSlotFills)(a.name)||[],...(0,mi.__experimentalUseSlotFills)(d.name)||[],...(0,mi.__experimentalUseSlotFills)(h.name)||[],...(0,mi.__experimentalUseSlotFills)(p.name)||[],...(0,mi.__experimentalUseSlotFills)(g.name)||[]].length,C=[...(0,mi.__experimentalUseSlotFills)(rd.slotName)||[],...(0,mi.__experimentalUseSlotFills)(i.name)||[]],B=[...(0,mi.__experimentalUseSlotFills)(u.name)||[],...(0,mi.__experimentalUseSlotFills)(m.name)||[],...v&&x>1?C:[]],I=window?.__experimentalContentOnlyInspectorFields,P=y||!I&&t?.length;P&&n.push(_P),v&&n.push(yc),(B.length||C.length&&(P||v))&&n.push(yP);let{tabSettings:E,isPreviewMode:L}=(0,Lae.useSelect)(O=>{let D=O(_).getSettings();return{tabSettings:D.blockInspectorTabs,isPreviewMode:D.isPreviewMode}},[]);return!L&&(r||x)&&n.push(SP),XIe(e,E)?n:ZIe}var Mae=l(A(),1);var r4=l(w(),1),{Fill:QIe,Slot:JIe}=(0,Mae.createSlotFill)(Symbol("InspectorControlsLastItem")),Dae=e=>Ie()[bs]?(0,r4.jsx)(QIe,{...e}):null;Dae.Slot=function(t){return(0,r4.jsx)(JIe,{...t})};var k2=Dae;var Vae=l(F(),1);function Fae(e){return(0,Vae.useSelect)(t=>{if(e){let o=t(_).getSettings().blockInspectorAnimation,r=o?.animationParent,{getSelectedBlockClientId:n,getBlockParentsByBlockName:i}=t(_),s=n();return!i(s,r,!0)[0]&&e.name!==r?null:o?.[e.name]}return null},[e])}var _e=l(w(),1);function Uae({blockName:e,showAdvancedControls:t=!0,showPositionControls:o=!0,showBindingsControls:r=!0}){let n=$b({blockName:e});return(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(fe.Slot,{}),(0,_e.jsx)(fe.Slot,{group:"color",label:(0,tk.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,_e.jsx)(fe.Slot,{group:"background",label:(0,tk.__)("Background image")}),(0,_e.jsx)(fe.Slot,{group:"typography",label:(0,tk.__)("Typography")}),(0,_e.jsx)(fe.Slot,{group:"dimensions",label:(0,tk.__)("Dimensions")}),(0,_e.jsx)(fe.Slot,{group:"border",label:n}),(0,_e.jsx)(fe.Slot,{group:"styles"}),o&&(0,_e.jsx)(CP,{}),r&&(0,_e.jsx)(fe.Slot,{group:"bindings"}),t&&(0,_e.jsx)("div",{children:(0,_e.jsx)(xP,{})})]})}function ePe(){let{selectedBlockCount:e,renderedBlockName:t,renderedBlockClientId:o,blockType:r,isSectionBlock:n,isSectionBlockInSelection:i,hasBlockStyles:s,editedContentOnlySection:a}=(0,n4.useSelect)(g=>{let{getSelectedBlockClientId:b,getSelectedBlockClientIds:v,getSelectedBlockCount:k,getBlockName:y,getParentSectionBlock:S,isSectionBlock:x,getEditedContentOnlySection:C,isWithinEditedContentOnlySection:B}=M(g(_)),{getBlockStyles:I}=g(zd.store),P=b(),L=B(P)?P:S(P)||P,T=L&&y(L),O=T&&(0,zd.getBlockType)(T),U=v().some(z=>x(z)),G=T&&I(T),j=G&&G.length>0;return{selectedBlockCount:k(),renderedBlockClientId:L,renderedBlockName:T,blockType:O,isSectionBlockInSelection:U,isSectionBlock:x(L),hasBlockStyles:j,editedContentOnlySection:C()}},[]),c=(0,n4.useSelect)(g=>{if(!n||!o)return[];let{getClientIdsOfDescendants:b,getBlockName:v,getBlockEditingMode:k}=M(g(_)),y=b(o),S=new Set;return y.forEach(x=>{let C=v(x);(C==="core/navigation"||(0,zd.hasBlockSupport)(C,"listView"))&&b(x).forEach(I=>S.add(I))}),y.filter(x=>!S.has(x)&&k(x)==="contentOnly")},[n,o]),u=Nae(r?.name,c,n,s),d=u?.length>1,f=Fae(r),m=e>1;if(m&&!i)return(0,_e.jsxs)("div",{className:"block-editor-block-inspector",children:[(0,_e.jsx)(NF,{}),d?(0,_e.jsx)(o4,{tabs:u}):(0,_e.jsx)(Uae,{blockName:t,showAdvancedControls:!1,showPositionControls:!1,showBindingsControls:!1})]});if(m&&i)return(0,_e.jsx)("div",{className:"block-editor-block-inspector",children:(0,_e.jsx)(NF,{})});let h=t===(0,zd.getUnregisteredTypeHandlerName)();return!r||!o||h?(0,_e.jsx)("span",{className:"block-editor-block-inspector__no-blocks",children:(0,tk.__)("No block selected.")}):(0,_e.jsx)(tPe,{animate:f,wrapper:g=>(0,_e.jsx)(oPe,{blockInspectorAnimationSettings:f,renderedBlockClientId:o,children:g}),children:(0,_e.jsx)(rPe,{renderedBlockClientId:o,blockName:r.name,isSectionBlock:n,availableTabs:u,contentClientIds:c,hasBlockStyles:s,editedContentOnlySection:a})})}var tPe=({animate:e,wrapper:t,children:o})=>e?t(o):o,oPe=({blockInspectorAnimationSettings:e,renderedBlockClientId:t,children:o})=>{let r=e&&e.enterDirection==="leftToRight"?-50:50;return(0,_e.jsx)(zae.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:r,opacity:0},children:o},t)},rPe=({renderedBlockClientId:e,blockName:t,isSectionBlock:o,availableTabs:r,contentClientIds:n,hasBlockStyles:i,editedContentOnlySection:s})=>{let a=(0,jae.useRef)(null),c=r?.length>1,u=s&&s!==e,d=Tt(s),f=Tt(e),m=f.isSynced;return(0,_e.jsxs)("div",{className:"block-editor-block-inspector",children:[u&&(0,_e.jsx)(yy,{...d,className:d?.isSynced&&"is-synced",parentClientId:s}),(0,_e.jsx)(yy,{...f,allowParentNavigation:!0,className:m&&"is-synced",isChild:u,clientId:e}),(0,_e.jsx)(u9,{clientId:e}),(0,_e.jsx)(Xie,{clientId:e}),(0,_e.jsx)(WT,{blockClientId:e}),c&&(0,_e.jsx)(_e.Fragment,{children:(0,_e.jsx)(o4,{hasBlockStyles:i,clientId:e,blockName:t,tabs:r,isSectionBlock:o,contentClientIds:n})}),!c&&(0,_e.jsxs)(_e.Fragment,{children:[i&&(0,_e.jsx)(Qg,{clientId:e}),(0,_e.jsx)(b2,{contentClientIds:n}),(0,_e.jsx)(fe.Slot,{group:"content"}),(0,_e.jsx)(fe.Slot,{group:"list",ref:a}),(0,_e.jsx)(tE,{listViewRef:a}),!o&&(0,_e.jsx)(Uae,{blockName:t})]}),(0,_e.jsx)(k2.Slot,{}),(0,_e.jsx)(kP,{},"back")]})},Hae=ePe;var i4=l(Re(),1);var Gae=l(w(),1),Wae=()=>((0,i4.default)("__unstableUseClipboardHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),xy());function $ae(e){return(0,i4.default)("CopyHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),(0,Gae.jsx)("div",{...e,ref:xy()})}var Kae=l(F(),1),s4=l(R(),1);var a4=l(w(),1),nPe=()=>{};function iPe({rootClientId:e,clientId:t,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:n=!1,__experimentalInsertionIndex:i,__experimentalInitialTab:s,__experimentalInitialCategory:a,__experimentalFilterValue:c,onPatternCategorySelection:u,onSelect:d=nPe,shouldFocusBlock:f=!1,onClose:m},h){let{destinationRootClientId:p}=(0,Kae.useSelect)(g=>{let{getBlockRootClientId:b}=g(_);return{destinationRootClientId:e||b(t)||void 0}},[t,e]);return(0,a4.jsx)(W5,{onSelect:d,rootClientId:p,clientId:t,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:n,__experimentalInsertionIndex:i,__experimentalFilterValue:c,onPatternCategorySelection:u,__experimentalInitialTab:s,__experimentalInitialCategory:a,shouldFocusBlock:f,ref:h,onClose:m})}var l4=(0,s4.forwardRef)(iPe);function sPe(e,t){return(0,a4.jsx)(l4,{...e,onPatternCategorySelection:void 0,ref:t})}var Yae=(0,s4.forwardRef)(sPe);var qae=l(Re(),1);function Zae(){return(0,qae.default)("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}var Xae=l(Z(),1),x_=l(Fe(),1),Qae=l(F(),1),jd=l(it(),1);var Jae=l(w(),1),aPe=window.navigator.userAgent.indexOf("Trident")!==-1,lPe=new Set([jd.UP,jd.DOWN,jd.LEFT,jd.RIGHT]),cPe=.75;function c4(){let e=(0,Qae.useSelect)(t=>t(_).hasSelectedBlock(),[]);return(0,Xae.useRefEffect)(t=>{if(!e)return;let{ownerDocument:o}=t,{defaultView:r}=o,n,i,s;function a(){n||(n=r.requestAnimationFrame(()=>{m(),n=null}))}function c(g){i&&r.cancelAnimationFrame(i),i=r.requestAnimationFrame(()=>{u(g),i=null})}function u({keyCode:g}){if(!h())return;let b=(0,x_.computeCaretRect)(r);if(!b)return;if(!s){s=b;return}if(lPe.has(g)){s=b;return}let v=b.top-s.top;if(v===0)return;let k=(0,x_.getScrollContainer)(t);if(!k)return;let y=k===o.body||k===o.documentElement,S=y?r.scrollY:k.scrollTop,x=y?0:k.getBoundingClientRect().top,C=y?s.top/r.innerHeight:(s.top-x)/(r.innerHeight-x);if(S===0&&C<cPe&&p()){s=b;return}let B=y?r.innerHeight:k.clientHeight;if(s.top+s.height>x+B||s.top<x){s=b;return}y?r.scrollBy(0,v):k.scrollTop+=v}function d(){o.addEventListener("selectionchange",f)}function f(){o.removeEventListener("selectionchange",f),m()}function m(){h()&&(s=(0,x_.computeCaretRect)(r))}function h(){return t.contains(o.activeElement)&&o.activeElement.isContentEditable}function p(){let g=t.querySelectorAll('[contenteditable="true"]');return g[g.length-1]===o.activeElement}return r.addEventListener("scroll",a,!0),r.addEventListener("resize",a,!0),t.addEventListener("keydown",c),t.addEventListener("keyup",u),t.addEventListener("mousedown",d),t.addEventListener("touchstart",d),()=>{r.removeEventListener("scroll",a,!0),r.removeEventListener("resize",a,!0),t.removeEventListener("keydown",c),t.removeEventListener("keyup",u),t.removeEventListener("mousedown",d),t.removeEventListener("touchstart",d),o.removeEventListener("selectionchange",f),r.cancelAnimationFrame(n),r.cancelAnimationFrame(i)}},[e])}function uPe({children:e}){return(0,Jae.jsx)("div",{ref:c4(),className:"block-editor__typewriter",children:e})}var dPe=aPe?e=>e.children:uPe,ele=dPe;var dp=l(R(),1),u4=l(Re(),1);var d4=l(w(),1),v2=(0,dp.createContext)({});v2.displayName="RenderedRefsContext";function fPe(e,t,o){let r={...e,[t]:e[t]?new Set(e[t]):new Set};return r[t].add(o),r}function f4({children:e,uniqueId:t,blockName:o=""}){let r=(0,dp.useContext)(v2),{name:n}=Ie();o=o||n;let i=(0,dp.useMemo)(()=>fPe(r,o,t),[r,o,t]);return(0,d4.jsx)(v2.Provider,{value:i,children:e})}function m4(e,t=""){let o=(0,dp.useContext)(v2),{name:r}=Ie();return t=t||r,!!o[t]?.has(e)}var tle=e=>((0,u4.default)("wp.blockEditor.__experimentalRecursionProvider",{since:"6.5",alternative:"wp.blockEditor.RecursionProvider"}),(0,d4.jsx)(f4,{...e})),ole=(...e)=>((0,u4.default)("wp.blockEditor.__experimentalUseHasRecursion",{since:"6.5",alternative:"wp.blockEditor.useHasRecursion"}),m4(...e));var S2=l(A(),1),p4=l(N(),1),h4=l(R(),1),nle=l(pc(),1);var pi=l(A(),1);var rle=l(N(),1),wc=l(w(),1);function y2({title:e,help:t,actions:o=[],onClose:r}){return(0,wc.jsxs)(pi.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4,children:[(0,wc.jsxs)(pi.__experimentalHStack,{alignment:"center",children:[(0,wc.jsx)(pi.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13,children:e}),(0,wc.jsx)(pi.__experimentalSpacer,{}),o.map(({label:n,icon:i,onClick:s})=>(0,wc.jsx)(pi.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:n,icon:i,variant:!i&&"tertiary",onClick:s,children:!i&&n},n)),r&&(0,wc.jsx)(pi.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:(0,rle.__)("Close"),icon:wf,onClick:r})]}),t&&(0,wc.jsx)(pi.__experimentalText,{children:t})]})}var ok=l(w(),1);function mPe({onClose:e,onChange:t,showPopoverHeaderActions:o,isCompact:r,currentDate:n,title:i,...s},a){let c={startOfWeek:(0,nle.getSettings)().l10n.startOfWeek,onChange:t,currentDate:r?void 0:n,currentTime:r?n:void 0,...s},u=r?S2.TimePicker:S2.DateTimePicker;return(0,ok.jsxs)("div",{ref:a,className:"block-editor-publish-date-time-picker",children:[(0,ok.jsx)(y2,{title:i||(0,p4.__)("Publish"),actions:o?[{label:(0,p4.__)("Now"),onClick:()=>t?.(null)}]:void 0,onClose:e}),(0,ok.jsx)(u,{...c})]})}var g4=(0,h4.forwardRef)(mPe);function pPe(e,t){return(0,ok.jsx)(g4,{...e,showPopoverHeaderActions:!0,isCompact:!1,ref:t})}var ile=(0,h4.forwardRef)(pPe);var _2=l(F(),1),sle=l(R(),1);function ao(e){let t=Ie(),{clientId:o=""}=t,{setBlockEditingMode:r,unsetBlockEditingMode:n}=(0,_2.useDispatch)(_),i=(0,_2.useSelect)(s=>o?null:s(_).getBlockEditingMode(),[o]);return(0,sle.useEffect)(()=>(e&&r(o,e),()=>{e&&n(o)}),[o,e,r,n]),o?t[u0]:i}var ale=l(Re(),1),lle=l(R(),1);function hPe(){return(0,ale.default)("wp.blockEditor.ToolSelector",{since:"6.9",hint:"The ToolSelector component no longer renders anything."}),null}var cle=(0,lle.forwardRef)(hPe);var C_=l(w(),1),Me=e=>{if(e===null||typeof e!="object"||Array.isArray(e))return e;let t=Object.entries(e).map(([o,r])=>[o,Me(r)]).filter(([,o])=>o!==void 0);return t.length?Object.fromEntries(t):void 0};function f2(e,t,o,r,n,i){if(Object.values(e??{}).every(c=>!c)||i.length===1&&o.innerBlocks.length===r.length)return o;let s=r[0]?.attributes;if(i.length>1&&r.length>1)if(r[n])s=r[n]?.attributes;else return o;let a=o;return Object.entries(e).forEach(([c,u])=>{u&&t[c].forEach(d=>{let f=yl(s,d);f&&(a={...a,attributes:pe(a.attributes,d,f)})})}),a}function Ue(e,t,o){let n=(0,ule.getBlockSupport)(e,t)?.__experimentalSkipSerialization;return Array.isArray(n)?n.includes(o):n}var Cc=new WeakMap;function Qn({id:e,css:t}){return tc({id:e,css:t})}function tc({id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i}={}){let{setStyleOverride:s,deleteStyleOverride:a}=M((0,x2.useDispatch)(_)),c=(0,x2.useRegistry)(),u=(0,as.useId)();(0,as.useEffect)(()=>{if(!t&&!o)return;let d=e||u,f={id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i};return Cc.get(c)||Cc.set(c,[]),Cc.get(c).push([d,f]),window.queueMicrotask(()=>{Cc.get(c)?.length&&c.batch(()=>{Cc.get(c).forEach(m=>{s(...m)}),Cc.set(c,[])})}),()=>{Cc.get(c)?.find(([h])=>h===d)?Cc.set(c,Cc.get(c).filter(([h])=>h!==d)):a(d)}},[e,t,i,o,r,u,s,a,c,n])}function is(e,t){let[o,r,n,i,s,a,c,u,d,f,m,h,p,g,b,v,k,y,S,x,C,B,I,P,E,L,T,O,D,U,G,j,z,W,ee,se,ce,ie,re,Q,Y,J,K,H,X,ne,le,ve,he,xe,ze,ot,Wt,fo,Do,rt,ar,xt,At,Pe,wt]=me("background.backgroundImage","background.backgroundSize","typography.fontFamilies.custom","typography.fontFamilies.default","typography.fontFamilies.theme","typography.defaultFontSizes","typography.fontSizes.custom","typography.fontSizes.default","typography.fontSizes.theme","typography.customFontSize","typography.fontStyle","typography.fontWeight","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textIndent","typography.writingMode","typography.textTransform","typography.letterSpacing","spacing.padding","spacing.margin","spacing.blockGap","spacing.defaultSpacingSizes","spacing.customSpacingSize","spacing.spacingSizes.custom","spacing.spacingSizes.default","spacing.spacingSizes.theme","spacing.units","dimensions.aspectRatio","dimensions.height","dimensions.minHeight","dimensions.width","dimensions.dimensionSizes","layout","border.color","border.radius","border.style","border.width","border.radiusSizes","color.custom","color.palette.custom","color.customDuotone","color.palette.theme","color.palette.default","color.defaultPalette","color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients","color.customGradient","color.background","color.link","color.text","color.heading","color.button","shadow"),qo=(0,as.useMemo)(()=>({background:{backgroundImage:o,backgroundSize:r},color:{palette:{custom:J,theme:H,default:X},gradients:{custom:ze,theme:ot,default:Wt},duotone:{custom:ve,theme:he,default:xe},defaultGradients:fo,defaultPalette:ne,defaultDuotone:le,custom:Y,customGradient:Do,customDuotone:K,background:rt,link:ar,heading:At,button:Pe,text:xt},typography:{fontFamilies:{custom:n,default:i,theme:s},fontSizes:{custom:c,default:u,theme:d},customFontSize:f,defaultFontSizes:a,fontStyle:m,fontWeight:h,lineHeight:p,textAlign:g,textColumns:b,textDecoration:v,textIndent:k,textTransform:S,letterSpacing:x,writingMode:y},spacing:{spacingSizes:{custom:L,default:T,theme:O},customSpacingSize:E,defaultSpacingSizes:P,padding:C,margin:B,blockGap:I,units:D},border:{color:se,radius:ce,style:ie,width:re,radiusSizes:Q},dimensions:{aspectRatio:U,height:G,minHeight:j,width:z,dimensionSizes:W},layout:ee,parentLayout:t,shadow:wt}),[o,r,n,i,s,a,c,u,d,f,m,h,p,g,b,v,k,S,x,y,C,B,I,P,E,L,T,O,D,U,G,j,z,W,ee,t,se,ce,ie,re,Q,Y,J,K,H,X,ne,le,ve,he,xe,ze,ot,Wt,fo,Do,rt,ar,xt,At,Pe,wt]);return TP(qo,e)}function dle(e){e=e.map(o=>({...o,Edit:(0,as.memo)(o.edit)}));let t=(0,b4.createHigherOrderComponent)(o=>function(n){let i=Ie();return[...e.map((s,a)=>{let{Edit:c,hasSupport:u,attributeKeys:d=[],shareWithChildBlocks:f,supportsPatternEditing:m}=s;if(!(m&&i[$c]||i[bs]||i[Pp]&&f)||!u(n.name))return null;let p={};for(let g of d)n.attributes[g]&&(p[g]=n.attributes[g]);return(0,C_.jsx)(c,{name:n.name,isSelected:n.isSelected,clientId:n.clientId,setAttributes:n.setAttributes,__unstableParentLayout:n.__unstableParentLayout,...p},a)}),(0,C_.jsx)(o,{...n},"edit")]},"withBlockEditHooks");(0,w_.addFilter)("editor.BlockEdit","core/editor/hooks",t)}function gPe({index:e,useBlockProps:t,setAllWrapperProps:o,...r}){let n=t(r),i=s=>o(a=>{let c=[...a];return c[e]=s,c});return(0,as.useEffect)(()=>(i(n),()=>{i(void 0)})),null}var bPe=(0,as.memo)(gPe);function fle(e){let t=(0,b4.createHigherOrderComponent)(o=>function(n){let[i,s]=(0,as.useState)(Array(e.length).fill(void 0));return[...e.map((a,c)=>{let{hasSupport:u,attributeKeys:d=[],useBlockProps:f,isMatch:m}=a,h={};for(let p of d)n.attributes[p]&&(h[p]=n.attributes[p]);return!Object.keys(h).length||!u(n.name)||m&&!m(h)?null:(0,C_.jsx)(bPe,{index:c,useBlockProps:f,setAllWrapperProps:s,name:n.name,clientId:n.clientId,...h},c)}),(0,C_.jsx)(o,{...n,wrapperProps:i.filter(Boolean).reduce((a,c)=>({...a,...c,className:V(a.className,c.className),style:{...a.style,...c.style}}),n.wrapperProps||{})},"edit")]},"withBlockListBlockHooks");(0,w_.addFilter)("editor.BlockListBlock","core/editor/hooks",t)}function mle(e){function t(o,r,n){return e.reduce((i,s)=>{let{hasSupport:a,attributeKeys:c=[],addSaveProps:u}=s,d={};for(let f of c)n[f]&&(d[f]=n[f]);return!Object.keys(d).length||!a(r)?i:u(i,r,d)},o)}(0,w_.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",t,0),(0,w_.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",o=>(o.hasOwnProperty("className")&&!o.className&&delete o.className,o))}var ple=l($(),1),hle=l(ut(),1);function kPe(e){let{apiVersion:t=1}=e;return t<2&&(0,ple.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}(0,hle.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",kPe);function gle(e){e.hasAttribute("crossorigin")||e.setAttribute("crossorigin","anonymous")}if(window.crossOriginIsolated){let e=function(){document.body?t.observe(document.body,{childList:!0,attributes:!0,subtree:!0}):document.readyState==="loading"&&document.addEventListener("DOMContentLoaded",()=>{document.body&&t.observe(document.body,{childList:!0,attributes:!0,subtree:!0})})};vPe=e;let t=new window.MutationObserver(o=>{o.forEach(r=>{[r.addedNodes,r.target].forEach(n=>{(n instanceof window.NodeList?n:[n]).forEach(s=>{let a=s;a.querySelectorAll&&(a.querySelectorAll("source,script,video,link").forEach(c=>{gle(c)}),["SOURCE","SCRIPT","VIDEO","LINK"].includes(a.nodeName)&&gle(a))})})})});e()}var vPe;var ble=l(ut(),1),ls=l($(),1);var k4=l(w(),1),v4=["left","center","right","wide","full"],yPe=["wide","full"];function y4(e,t=!0,o=!0){let r;return Array.isArray(e)?r=v4.filter(n=>e.includes(n)):e===!0?r=[...v4]:r=[],!o||e===!0&&!t?r.filter(n=>!yPe.includes(n)):r}function SPe(e){return"type"in(e.attributes?.align??{})||(0,ls.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...v4,""]}}),e}function _Pe({name:e,align:t,setAttributes:o}){let r=y4((0,ls.getBlockSupport)(e,"align"),(0,ls.hasBlockSupport)(e,"alignWide",!0)),n=Hv(r).map(({name:a})=>a),i=ao();return!n.length||i!=="default"?null:(0,k4.jsx)(Mt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,k4.jsx)(cC,{value:t,onChange:a=>{a||(0,ls.getBlockType)(e)?.attributes?.align?.default&&(a=""),o({align:a})},controls:n})})}var w2={shareWithChildBlocks:!0,edit:_Pe,useBlockProps:xPe,addSaveProps:wPe,attributeKeys:["align"],hasSupport(e){return(0,ls.hasBlockSupport)(e,"align",!1)}};function xPe({name:e,align:t}){let o=y4((0,ls.getBlockSupport)(e,"align"),(0,ls.hasBlockSupport)(e,"alignWide",!0));return Hv(o).some(n=>n.name===t)?{"data-align":t}:{}}function wPe(e,t,o){let{align:r}=o,n=(0,ls.getBlockSupport)(t,"align"),i=(0,ls.hasBlockSupport)(t,"alignWide",!0);return y4(n,i).includes(r)&&(e.className=V(`align${r}`,e.className)),e}(0,ble.addFilter)("blocks.registerBlockType","core/editor/align/addAttribute",SPe);var kle=l(ut(),1);function CPe(e){return"type"in(e.attributes?.lock??{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}(0,kle.addFilter)("blocks.registerBlockType","core/lock/addAttribute",CPe);var C4=l(ut(),1),ak=l($(),1);var B_=l(A(),1),E2=l(N(),1),Ple=l(R(),1),Rle=l(F(),1),T2=l($(),1);var Pn=l(A(),1),Ele=l(R(),1),sk=l(N(),1),Tle=l(F(),1);var x4=l($(),1),wle=l(F(),1),ik=l(A(),1),ra=l(N(),1),C2=l(R(),1),Cle=l(Z(),1),Ble=l(Xo(),1);var S4=l(R(),1),Sle=l(Z(),1),_le=l(A(),1);var vle=l(A(),1);var rk=l(w(),1);function BPe({blockTypes:e,value:t,onItemChange:o}){return(0,rk.jsx)("ul",{className:"block-editor-block-manager__checklist",children:e.map(r=>(0,rk.jsxs)("li",{className:"block-editor-block-manager__checklist-item",children:[(0,rk.jsx)(vle.CheckboxControl,{label:r.title,checked:t.includes(r.name),onChange:(...n)=>o(r,...n)}),(0,rk.jsx)(Ae,{icon:r.icon})]},r.name))})}var yle=BPe;var nk=l(w(),1);function xle({title:e,blockTypes:t,selectedBlockTypes:o,onChange:r}){let n=(0,Sle.useInstanceId)(xle),i=(0,S4.useCallback)((f,m)=>{r(m?[...o,f]:o.filter(({name:h})=>h!==f.name))},[o,r]),s=(0,S4.useCallback)(f=>{r(f?[...o,...t.filter(m=>!o.find(({name:h})=>h===m.name))]:o.filter(m=>!t.find(({name:h})=>h===m.name)))},[t,o,r]);if(!t.length)return null;let a=t.map(({name:f})=>f).filter(f=>(o??[]).some(m=>m.name===f)),c="block-editor-block-manager__category-title-"+n,u=a.length===t.length,d=!u&&a.length>0;return(0,nk.jsxs)("div",{role:"group","aria-labelledby":c,className:"block-editor-block-manager__category",children:[(0,nk.jsx)(_le.CheckboxControl,{checked:u,onChange:s,className:"block-editor-block-manager__category-title",indeterminate:d,label:(0,nk.jsx)("span",{id:c,children:e})}),(0,nk.jsx)(yle,{blockTypes:t,value:a,onItemChange:i})]})}var _4=xle;var Bc=l(w(),1);function B2({blockTypes:e,selectedBlockTypes:t,onChange:o,showSelectAll:r=!0}){let n=(0,Cle.useDebounce)(Ble.speak,500),[i,s]=(0,C2.useState)(""),{categories:a,isMatchingSearchTerm:c}=(0,wle.useSelect)(m=>({categories:m(x4.store).getCategories(),isMatchingSearchTerm:m(x4.store).isMatchingSearchTerm}),[]),u=e.filter(m=>!i||c(m,i)),d=t.length>0&&t.length!==e.length,f=e.length>0&&t.length===e.length;return(0,C2.useEffect)(()=>{if(!i)return;let m=u.length,h=(0,ra.sprintf)((0,ra._n)("%d result found.","%d results found.",m),m);n(h)},[u?.length,i,n]),(0,Bc.jsxs)(ik.__experimentalVStack,{className:"block-editor-block-manager__content",spacing:4,children:[(0,Bc.jsx)(ik.SearchControl,{label:(0,ra.__)("Search for a block"),placeholder:(0,ra.__)("Search for a block"),value:i,onChange:m=>s(m),className:"block-editor-block-manager__search"}),r&&(0,Bc.jsx)(ik.CheckboxControl,{className:"block-editor-block-manager__select-all",label:(0,ra.__)("Select all"),checked:f,onChange:()=>{o(f?[]:e)},indeterminate:d}),(0,Bc.jsxs)("div",{tabIndex:"0",role:"region","aria-label":(0,ra.__)("Available block types"),className:"block-editor-block-manager__results",children:[u.length===0&&(0,Bc.jsx)("p",{className:"block-editor-block-manager__no-results",children:(0,ra.__)("No blocks found.")}),a.map(m=>(0,Bc.jsx)(_4,{title:m.title,blockTypes:u.filter(h=>h.category===m.slug),selectedBlockTypes:t,onChange:o},m.slug)),(0,Bc.jsx)(_4,{title:(0,ra.__)("Uncategorized"),blockTypes:u.filter(({category:m})=>!m),selectedBlockTypes:t,onChange:o})]})]})}var na=l(w(),1);function Ile({clientId:e,blockTypes:t,selectedBlockTypes:o,onClose:r}){let[n,i]=(0,Ele.useState)(o),{updateBlockAttributes:s}=(0,Tle.useDispatch)(_),a=()=>{let c=n.length===t.length,u=n.map(({name:d})=>d);s(e,{allowedBlocks:c?void 0:u}),r()};return(0,na.jsx)(Pn.Modal,{title:(0,sk._x)("Manage allowed blocks","modal title"),onRequestClose:r,overlayClassName:"block-editor-block-allowed-blocks-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,na.jsxs)(Pn.__experimentalVStack,{as:"form",onSubmit:c=>{c.preventDefault(),a()},spacing:"4",children:[(0,na.jsx)(Pn.__experimentalText,{children:(0,sk.__)("Select which blocks can be added inside this container.")}),(0,na.jsx)(B2,{blockTypes:t,selectedBlockTypes:n,onChange:c=>{i(c)}}),(0,na.jsxs)(Pn.Flex,{className:"block-editor-block-allowed-blocks-modal__actions",justify:"flex-end",expanded:!1,children:[(0,na.jsx)(Pn.FlexItem,{children:(0,na.jsx)(Pn.Button,{variant:"tertiary",onClick:r,__next40pxDefaultSize:!0,children:(0,sk.__)("Cancel")})}),(0,na.jsx)(Pn.FlexItem,{children:(0,na.jsx)(Pn.Button,{variant:"primary",type:"submit",__next40pxDefaultSize:!0,children:(0,sk.__)("Apply")})})]})]})})}var fp=l(w(),1);function Ole({clientId:e}){let[t,o]=(0,Ple.useState)(!1),{blockTypes:r,selectedBlockNames:n}=(0,Rle.useSelect)(a=>{let{getBlockAttributes:c}=a(_);return{blockTypes:a(T2.store).getBlockTypes(),selectedBlockNames:c(e)?.allowedBlocks}},[e]),i=r.filter(a=>(0,T2.hasBlockSupport)(a,"inserter",!0)&&(!a.parent||a.parent.includes("core/post-content")));if(!i)return null;let s=n===void 0?i:i.filter(a=>n.includes(a.name));return(0,fp.jsxs)("div",{className:"block-editor-block-allowed-blocks-control",children:[(0,fp.jsxs)(B_.BaseControl,{help:(0,E2.__)("Specify which blocks are allowed inside this container."),children:[(0,fp.jsx)(B_.BaseControl.VisualLabel,{children:(0,E2.__)("Allowed Blocks")}),(0,fp.jsx)(B_.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{o(!0)},className:"block-editor-block-allowed-blocks-control__button",children:(0,E2.__)("Manage allowed blocks")})]}),t&&(0,fp.jsx)(Ile,{clientId:e,blockTypes:i,selectedBlockTypes:s,onClose:()=>o(!1)})]})}var w4=l(w(),1);function EPe({clientId:e}){return ao()==="contentOnly"?null:(0,w4.jsx)(sS.Fill,{children:(0,w4.jsx)(Ole,{clientId:e})})}var Ale={edit:EPe,attributeKeys:["allowedBlocks"],hasSupport(e){return(0,ak.hasBlockSupport)(e,"allowedBlocks")}};function TPe(e){return e?.attributes?.allowedBlocks?.type||(0,ak.hasBlockSupport)(e,"allowedBlocks")&&(e.attributes={...e.attributes,allowedBlocks:{type:"array"}}),e}(0,C4.addFilter)("blocks.registerBlockType","core/allowedBlocks/attribute",TPe);function IPe(e,t,o,r){if(!(0,ak.hasBlockSupport)(e.name,"allowedBlocks")||t.length!==1&&r.length===1&&e.innerBlocks.length===t.length||r.length===1&&t.length>1||r.length>1&&t.length===1||r.length>1&&t.length>1&&r.length!==t.length||e.attributes.allowedBlocks)return e;let n=t[o]?.attributes?.allowedBlocks;if(!n)return e;let s=(0,ak.getBlockType)(e.name)?.allowedBlocks||[];if(!s.length)return{...e,attributes:{...e.attributes,allowedBlocks:n}};let a=n.filter(c=>s.includes(c));return{...e,attributes:{...e.attributes,allowedBlocks:a}}}(0,C4.addFilter)("blocks.switchToBlockType.transformedBlock","core/allowedBlocks/addTransforms",IPe);var Lle=l(ut(),1),I2=l(A(),1),lk=l(N(),1),P2=l($(),1),Nle=l(R(),1);var Qa=l(w(),1),PPe=/[\s#]/g;function RPe(e){return"type"in(e.attributes?.anchor??{})||(0,P2.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:{type:"string"}}),e}function OPe({anchor:e,setAttributes:t}){if(ao()!=="default")return null;let r=Nle.Platform.OS==="web";return(0,Qa.jsx)(fe,{group:"advanced",children:(0,Qa.jsx)(I2.TextControl,{__next40pxDefaultSize:!0,className:"html-anchor-control",label:(0,lk.__)("HTML anchor"),help:(0,Qa.jsxs)(Qa.Fragment,{children:[(0,lk.__)("Enter a word or two\u2014without spaces\u2014to make a unique web address just for this block, called an \u201Canchor\u201D. Then, you\u2019ll be able to link directly to this section of your page."),r&&(0,Qa.jsxs)(Qa.Fragment,{children:[" ",(0,Qa.jsx)(I2.ExternalLink,{href:(0,lk.__)("https://wordpress.org/documentation/article/page-jumps/"),children:(0,lk.__)("Learn more about anchors")})]})]}),value:e||"",placeholder:r?null:(0,lk.__)("Add an anchor"),onChange:n=>{n=n.replace(PPe,"-"),t({anchor:n!==""?n:void 0})},autoCapitalize:"none",autoComplete:"off"})})}var B4={addSaveProps:APe,edit:OPe,attributeKeys:["anchor"],hasSupport(e){return(0,P2.hasBlockSupport)(e,"anchor")}};function APe(e,t,o){return(0,P2.hasBlockSupport)(t,"anchor")&&(e.id=o.anchor===""?null:o.anchor),e}(0,Lle.addFilter)("blocks.registerBlockType","core/anchor/attribute",RPe);var Mle=l(ut(),1),R2=l($(),1);function LPe(e){return e?.attributes?.ariaLabel?.type||(0,R2.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:{type:"string"}}),e}function NPe(e,t,o){return(0,R2.hasBlockSupport)(t,"ariaLabel")&&!Ue(t,"ariaLabel","ariaLabel")&&(e["aria-label"]=o.ariaLabel===""?null:o.ariaLabel),e}var Dle={addSaveProps:NPe,attributeKeys:["ariaLabel"],hasSupport(e){return(0,R2.hasBlockSupport)(e,"ariaLabel")}};(0,Mle.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",LPe);var Bk=l($(),1),OR=l(A(),1),$de=l(F(),1);var Fle=l(jr(),1),Vle={};function E4(e,t){let o=Fle.useRef(Vle);return o.current===Vle&&(o.current=e(t)),o}function T4(e,...t){let o=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(r=>o.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${o} for the full message.`}var O2=l(jr(),1);function I4(e,t,o,r){let n=E4(jle).current;return MPe(n,e,t,o,r)&&Ule(n,[e,t,o,r]),n.callback}function zle(e){let t=E4(jle).current;return DPe(t,e)&&Ule(t,e),t.callback}function jle(){return{callback:null,cleanup:null,refs:[]}}function MPe(e,t,o,r,n){return e.refs[0]!==t||e.refs[1]!==o||e.refs[2]!==r||e.refs[3]!==n}function DPe(e,t){return e.refs.length!==t.length||e.refs.some((o,r)=>o!==t[r])}function Ule(e,t){if(e.refs=t,t.every(o=>o==null)){e.callback=null;return}e.callback=o=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),o!=null){let r=Array(t.length).fill(null);for(let n=0;n<t.length;n+=1){let i=t[n];if(i!=null)switch(typeof i){case"function":{let s=i(o);typeof s=="function"&&(r[n]=s);break}case"object":{i.current=o;break}default:}}e.cleanup=()=>{for(let n=0;n<t.length;n+=1){let i=t[n];if(i!=null)switch(typeof i){case"function":{let s=r[n];typeof s=="function"?s():i(null);break}case"object":{i.current=null;break}default:}}}}}}var Wle=l(jr(),1);var Hle=l(jr(),1),VPe=parseInt(Hle.version,10);function Gle(e){return VPe>=e}function P4(e){if(!Wle.isValidElement(e))return null;let t=e,o=t.props;return(Gle(19)?o?.ref:t.ref)??null}function E_(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function $le(e,t){let o={};for(let r in e){let n=e[r];if(t?.hasOwnProperty(r)){let i=t[r](n);i!=null&&Object.assign(o,i);continue}n===!0?o[`data-${r.toLowerCase()}`]="":n&&(o[`data-${r.toLowerCase()}`]=n.toString())}return o}function Kle(e,t){return typeof e=="function"?e(t):e}function Yle(e,t){return typeof e=="function"?e(t):e}var I_={};function ck(e,t,o,r,n){let i={...R4(e,I_)};return t&&(i=T_(i,t)),o&&(i=T_(i,o)),r&&(i=T_(i,r)),n&&(i=T_(i,n)),i}function qle(e){if(e.length===0)return I_;if(e.length===1)return R4(e[0],I_);let t={...R4(e[0],I_)};for(let o=1;o<e.length;o+=1)t=T_(t,e[o]);return t}function T_(e,t){return Zle(t)?t(e):FPe(e,t)}function FPe(e,t){if(!t)return e;for(let o in t){let r=t[o];switch(o){case"style":{e[o]=E_(e.style,r);break}case"className":{e[o]=O4(e.className,r);break}default:zPe(o,r)?e[o]=jPe(e[o],r):e[o]=r}}return e}function zPe(e,t){let o=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2);return o===111&&r===110&&n>=65&&n<=90&&(typeof t=="function"||typeof t>"u")}function Zle(e){return typeof e=="function"}function R4(e,t){return Zle(e)?e(t):e??I_}function jPe(e,t){return t?e?o=>{if(HPe(o)){let n=o;UPe(n);let i=t(n);return n.baseUIHandlerPrevented||e?.(n),i}let r=t(o);return e?.(o),r}:t:e}function UPe(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function O4(e,t){return t?e?t+" "+e:t:e}function HPe(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var GPe=Object.freeze([]),Ud=Object.freeze({});var A4=l(jr(),1);function Xle(e,t,o={}){let r=t.render,n=WPe(t,o);if(o.enabled===!1)return null;let i=o.state??Ud;return $Pe(e,r,n,i)}function WPe(e,t={}){let{className:o,style:r,render:n}=e,{state:i=Ud,ref:s,props:a,stateAttributesMapping:c,enabled:u=!0}=t,d=u?Kle(o,i):void 0,f=u?Yle(r,i):void 0,m=u?$le(i,c):Ud,h=u?E_(m,Array.isArray(a)?qle(a):a)??Ud:Ud;return typeof document<"u"&&(u?Array.isArray(s)?h.ref=zle([h.ref,P4(n),...s]):h.ref=I4(h.ref,P4(n),s):I4(null,null)),u?(d!==void 0&&(h.className=O4(h.className,d)),f!==void 0&&(h.style=E_(h.style,f)),h):Ud}function $Pe(e,t,o,r){if(t){if(typeof t=="function")return t(o,r);let n=ck(o,t.props);return n.ref=o.ref,O2.cloneElement(t,n)}if(e&&typeof e=="string")return KPe(e,o);throw new Error(T4(8))}function KPe(e,t){return e==="button"?(0,A4.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,A4.createElement)("img",{alt:"",...t,key:t.key}):O2.createElement(e,t)}function A2(e){return Xle(e.defaultTagName??"div",e,e)}var Jle=l(R(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='244b5c59c0']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","244b5c59c0"),e.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-sm,12px);font-weight:var(--wpds-font-weight-regular,400);line-height:var(--wpds-font-line-height-xs,16px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-bg-surface-error,#f6e6e3);color:var(--wpds-color-fg-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-bg-surface-warning,#fde6bd);color:var(--wpds-color-fg-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution,#fee994);color:var(--wpds-color-fg-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success,#c5f7cc);color:var(--wpds-color-fg-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-bg-surface-info,#deebfa);color:var(--wpds-color-fg-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);color:var(--wpds-color-fg-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-bg-surface-neutral,#f8f8f8);color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d)}}')),document.head.appendChild(e)}var Qle={badge:"_96e6251aad1a6136__badge","is-high-intent":"_99f7158cb520f750__is-high-intent","is-medium-intent":"c20ebef2365bc8b7__is-medium-intent","is-low-intent":"_365e1626c6202e52__is-low-intent","is-stable-intent":"_33f8198127ddf4ef__is-stable-intent","is-informational-intent":"_04c1aca8fc449412__is-informational-intent","is-draft-intent":"_90726e69d495ec19__is-draft-intent","is-none-intent":"_898f4a544993bd39__is-none-intent"},L4=(0,Jle.forwardRef)(function({children:t,intent:o="none",render:r,className:n,...i},s){return A2({render:r,defaultTagName:"span",ref:s,props:ck(i,{className:V(Qle.badge,Qle[`is-${o}-intent`],n),children:t})})});var ece=l(R(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='71d20935c2']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","71d20935c2"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}")),document.head.appendChild(e)}var YPe={stack:"_19ce0419607e1896__stack"},qPe={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},De=(0,ece.forwardRef)(function({direction:t,gap:o,align:r,justify:n,wrap:i,render:s,...a},c){let u={gap:o&&qPe[o],alignItems:r,justifyContent:n,flexDirection:t,flexWrap:i};return A2({render:s,ref:c,props:ck(a,{style:u,className:YPe.stack})})});var N4=l(N(),1);var Ut="isAny",Ht="isNone",Ir="isAll",Pr="isNotAll",tn="between",on="inThePast",Rn="over",Jt="is",eo="isNot",Hd="lessThan",Gd="greaterThan",Wd="lessThanOrEqual",$d="greaterThanOrEqual",Kd="before",Yd="after",qd="beforeInc",Zd="afterInc",Ja="contains",el="notContains",tl="startsWith",Xd="on",Qd="notOn";var Hht={asc:(0,N4.__)("Sort ascending"),desc:(0,N4.__)("Sort descending")};var tce=l(CO(),1),{lock:Wht,unlock:St}=(0,tce.__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");var P_=l(R(),1),ZPe=[];function On({elements:e,getElements:t}){let o=Array.isArray(e)&&e.length>0?e:ZPe,[r,n]=(0,P_.useState)(o),[i,s]=(0,P_.useState)(!1);return(0,P_.useEffect)(()=>{if(!t){n(o);return}let a=!1;return s(!0),t().then(c=>{if(!a){let u=Array.isArray(c)&&c.length>0?c:o;n(u)}}).catch(()=>{a||n(o)}).finally(()=>{a||s(!1)}),()=>{a=!0}},[t,o]),{elements:r,isLoading:i}}var XPe=Math.pow(10,8)*24*60*60*1e3,Yht=-XPe,L2=6048e5,oce=864e5;var QPe=3600;var rce=QPe*24,qht=rce*7,JPe=rce*365.2425,e2e=JPe/12,Zht=e2e*3,M4=Symbol.for("constructDateFrom");function $o(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&M4 in e?e[M4](t):e instanceof Date?new e.constructor(t):new Date(t)}function lt(e,t){return $o(t||e,e)}function N2(e,t,o){let r=lt(e,o?.in);return isNaN(t)?$o(o?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function M2(e,t,o){let r=lt(e,o?.in);if(isNaN(t))return $o(o?.in||e,NaN);if(!t)return r;let n=r.getDate(),i=$o(o?.in||e,r.getTime());i.setMonth(r.getMonth()+t+1,0);let s=i.getDate();return n>=s?i:(r.setFullYear(i.getFullYear(),i.getMonth(),n),r)}var t2e={};function Jd(){return t2e}function Ec(e,t){let o=Jd(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,n=lt(e,t?.in),i=n.getDay(),s=(i<r?7:0)+i-r;return n.setDate(n.getDate()-s),n.setHours(0,0,0,0),n}function mp(e,t){return Ec(e,{...t,weekStartsOn:1})}function D2(e,t){let o=lt(e,t?.in),r=o.getFullYear(),n=$o(o,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);let i=mp(n),s=$o(o,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);let a=mp(s);return o.getTime()>=i.getTime()?r+1:o.getTime()>=a.getTime()?r:r-1}function D4(e){let t=lt(e),o=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return o.setUTCFullYear(t.getFullYear()),+e-+o}function nce(e,...t){let o=$o.bind(null,e||t.find(r=>typeof r=="object"));return t.map(o)}function V4(e,t){let o=lt(e,t?.in);return o.setHours(0,0,0,0),o}function ice(e,t,o){let[r,n]=nce(o?.in,e,t),i=V4(r),s=V4(n),a=+i-D4(i),c=+s-D4(s);return Math.round((a-c)/oce)}function sce(e,t){let o=D2(e,t),r=$o(t?.in||e,0);return r.setFullYear(o,0,4),r.setHours(0,0,0,0),mp(r)}function ace(e,t,o){return N2(e,t*7,o)}function lce(e,t,o){return M2(e,t*12,o)}function cce(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function uk(e){return!(!cce(e)&&typeof e!="number"||isNaN(+lt(e)))}function uce(e,t){let o=lt(e,t?.in);return o.setDate(1),o.setHours(0,0,0,0),o}function V2(e,t){let o=lt(e,t?.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}var o2e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},dce=(e,t,o)=>{let r,n=o2e[e];return typeof n=="string"?r=n:t===1?r=n.one:r=n.other.replace("{{count}}",t.toString()),o?.addSuffix?o.comparison&&o.comparison>0?"in "+r:r+" ago":r};function F2(e){return(t={})=>{let o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}var r2e={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},n2e={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},i2e={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},fce={date:F2({formats:r2e,defaultWidth:"full"}),time:F2({formats:n2e,defaultWidth:"full"}),dateTime:F2({formats:i2e,defaultWidth:"full"})};var s2e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},mce=(e,t,o,r)=>s2e[e];function dk(e){return(t,o)=>{let r=o?.context?String(o.context):"standalone",n;if(r==="formatting"&&e.formattingValues){let s=e.defaultFormattingWidth||e.defaultWidth,a=o?.width?String(o.width):s;n=e.formattingValues[a]||e.formattingValues[s]}else{let s=e.defaultWidth,a=o?.width?String(o.width):e.defaultWidth;n=e.values[a]||e.values[s]}let i=e.argumentCallback?e.argumentCallback(t):t;return n[i]}}var a2e={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},l2e={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},c2e={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},u2e={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},d2e={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},f2e={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},m2e=(e,t)=>{let o=Number(e),r=o%100;if(r>20||r<10)switch(r%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},pce={ordinalNumber:m2e,era:dk({values:a2e,defaultWidth:"wide"}),quarter:dk({values:l2e,defaultWidth:"wide",argumentCallback:e=>e-1}),month:dk({values:c2e,defaultWidth:"wide"}),day:dk({values:u2e,defaultWidth:"wide"}),dayPeriod:dk({values:d2e,defaultWidth:"wide",formattingValues:f2e,defaultFormattingWidth:"wide"})};function fk(e){return(t,o={})=>{let r=o.width,n=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(n);if(!i)return null;let s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(a)?h2e(a,f=>f.test(s)):p2e(a,f=>f.test(s)),u;u=e.valueCallback?e.valueCallback(c):c,u=o.valueCallback?o.valueCallback(u):u;let d=t.slice(s.length);return{value:u,rest:d}}}function p2e(e,t){for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function h2e(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function hce(e){return(t,o={})=>{let r=t.match(e.matchPattern);if(!r)return null;let n=r[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=o.valueCallback?o.valueCallback(s):s;let a=t.slice(n.length);return{value:s,rest:a}}}var g2e=/^(\d+)(th|st|nd|rd)?/i,b2e=/\d+/i,k2e={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},v2e={any:[/^b/i,/^(a|c)/i]},y2e={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},S2e={any:[/1/i,/2/i,/3/i,/4/i]},_2e={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},x2e={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},w2e={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},C2e={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},B2e={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},E2e={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},gce={ordinalNumber:hce({matchPattern:g2e,parsePattern:b2e,valueCallback:e=>parseInt(e,10)}),era:fk({matchPatterns:k2e,defaultMatchWidth:"wide",parsePatterns:v2e,defaultParseWidth:"any"}),quarter:fk({matchPatterns:y2e,defaultMatchWidth:"wide",parsePatterns:S2e,defaultParseWidth:"any",valueCallback:e=>e+1}),month:fk({matchPatterns:_2e,defaultMatchWidth:"wide",parsePatterns:x2e,defaultParseWidth:"any"}),day:fk({matchPatterns:w2e,defaultMatchWidth:"wide",parsePatterns:C2e,defaultParseWidth:"any"}),dayPeriod:fk({matchPatterns:B2e,defaultMatchWidth:"any",parsePatterns:E2e,defaultParseWidth:"any"})};var F4={code:"en-US",formatDistance:dce,formatLong:fce,formatRelative:mce,localize:pce,match:gce,options:{weekStartsOn:0,firstWeekContainsDate:1}};function bce(e,t){let o=lt(e,t?.in);return ice(o,V2(o))+1}function kce(e,t){let o=lt(e,t?.in),r=+mp(o)-+sce(o);return Math.round(r/L2)+1}function z2(e,t){let o=lt(e,t?.in),r=o.getFullYear(),n=Jd(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=$o(t?.in||e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);let a=Ec(s,t),c=$o(t?.in||e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);let u=Ec(c,t);return+o>=+a?r+1:+o>=+u?r:r-1}function vce(e,t){let o=Jd(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=z2(e,t),i=$o(t?.in||e,0);return i.setFullYear(n,0,r),i.setHours(0,0,0,0),Ec(i,t)}function yce(e,t){let o=lt(e,t?.in),r=+Ec(o,t)-+vce(o,t);return Math.round(r/L2)+1}function $e(e,t){let o=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return o+r}var Tc={y(e,t){let o=e.getFullYear(),r=o>0?o:1-o;return $e(t==="yy"?r%100:r,t.length)},M(e,t){let o=e.getMonth();return t==="M"?String(o+1):$e(o+1,2)},d(e,t){return $e(e.getDate(),t.length)},a(e,t){let o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return o.toUpperCase();case"aaa":return o;case"aaaaa":return o[0];default:return o==="am"?"a.m.":"p.m."}},h(e,t){return $e(e.getHours()%12||12,t.length)},H(e,t){return $e(e.getHours(),t.length)},m(e,t){return $e(e.getMinutes(),t.length)},s(e,t){return $e(e.getSeconds(),t.length)},S(e,t){let o=t.length,r=e.getMilliseconds(),n=Math.trunc(r*Math.pow(10,o-3));return $e(n,t.length)}};var mk={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},z4={G:function(e,t,o){let r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return o.era(r,{width:"abbreviated"});case"GGGGG":return o.era(r,{width:"narrow"});default:return o.era(r,{width:"wide"})}},y:function(e,t,o){if(t==="yo"){let r=e.getFullYear(),n=r>0?r:1-r;return o.ordinalNumber(n,{unit:"year"})}return Tc.y(e,t)},Y:function(e,t,o,r){let n=z2(e,r),i=n>0?n:1-n;if(t==="YY"){let s=i%100;return $e(s,2)}return t==="Yo"?o.ordinalNumber(i,{unit:"year"}):$e(i,t.length)},R:function(e,t){let o=D2(e);return $e(o,t.length)},u:function(e,t){let o=e.getFullYear();return $e(o,t.length)},Q:function(e,t,o){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return $e(r,2);case"Qo":return o.ordinalNumber(r,{unit:"quarter"});case"QQQ":return o.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return o.quarter(r,{width:"narrow",context:"formatting"});default:return o.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,o){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return $e(r,2);case"qo":return o.ordinalNumber(r,{unit:"quarter"});case"qqq":return o.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return o.quarter(r,{width:"narrow",context:"standalone"});default:return o.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,o){let r=e.getMonth();switch(t){case"M":case"MM":return Tc.M(e,t);case"Mo":return o.ordinalNumber(r+1,{unit:"month"});case"MMM":return o.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return o.month(r,{width:"narrow",context:"formatting"});default:return o.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,o){let r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return $e(r+1,2);case"Lo":return o.ordinalNumber(r+1,{unit:"month"});case"LLL":return o.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return o.month(r,{width:"narrow",context:"standalone"});default:return o.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,o,r){let n=yce(e,r);return t==="wo"?o.ordinalNumber(n,{unit:"week"}):$e(n,t.length)},I:function(e,t,o){let r=kce(e);return t==="Io"?o.ordinalNumber(r,{unit:"week"}):$e(r,t.length)},d:function(e,t,o){return t==="do"?o.ordinalNumber(e.getDate(),{unit:"date"}):Tc.d(e,t)},D:function(e,t,o){let r=bce(e);return t==="Do"?o.ordinalNumber(r,{unit:"dayOfYear"}):$e(r,t.length)},E:function(e,t,o){let r=e.getDay();switch(t){case"E":case"EE":case"EEE":return o.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return o.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(r,{width:"short",context:"formatting"});default:return o.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,o,r){let n=e.getDay(),i=(n-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return $e(i,2);case"eo":return o.ordinalNumber(i,{unit:"day"});case"eee":return o.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"});default:return o.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,o,r){let n=e.getDay(),i=(n-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return $e(i,t.length);case"co":return o.ordinalNumber(i,{unit:"day"});case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"});default:return o.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,o){let r=e.getDay(),n=r===0?7:r;switch(t){case"i":return String(n);case"ii":return $e(n,t.length);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return o.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return o.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return o.day(r,{width:"short",context:"formatting"});default:return o.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,o){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,o){let r=e.getHours(),n;switch(r===12?n=mk.noon:r===0?n=mk.midnight:n=r/12>=1?"pm":"am",t){case"b":case"bb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,o){let r=e.getHours(),n;switch(r>=17?n=mk.evening:r>=12?n=mk.afternoon:r>=4?n=mk.morning:n=mk.night,t){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,o){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),o.ordinalNumber(r,{unit:"hour"})}return Tc.h(e,t)},H:function(e,t,o){return t==="Ho"?o.ordinalNumber(e.getHours(),{unit:"hour"}):Tc.H(e,t)},K:function(e,t,o){let r=e.getHours()%12;return t==="Ko"?o.ordinalNumber(r,{unit:"hour"}):$e(r,t.length)},k:function(e,t,o){let r=e.getHours();return r===0&&(r=24),t==="ko"?o.ordinalNumber(r,{unit:"hour"}):$e(r,t.length)},m:function(e,t,o){return t==="mo"?o.ordinalNumber(e.getMinutes(),{unit:"minute"}):Tc.m(e,t)},s:function(e,t,o){return t==="so"?o.ordinalNumber(e.getSeconds(),{unit:"second"}):Tc.s(e,t)},S:function(e,t){return Tc.S(e,t)},X:function(e,t,o){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return _ce(r);case"XXXX":case"XX":return pp(r);default:return pp(r,":")}},x:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"x":return _ce(r);case"xxxx":case"xx":return pp(r);default:return pp(r,":")}},O:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Sce(r,":");default:return"GMT"+pp(r,":")}},z:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Sce(r,":");default:return"GMT"+pp(r,":")}},t:function(e,t,o){let r=Math.trunc(+e/1e3);return $e(r,t.length)},T:function(e,t,o){return $e(+e,t.length)}};function Sce(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),n=Math.trunc(r/60),i=r%60;return i===0?o+String(n):o+String(n)+t+$e(i,2)}function _ce(e,t){return e%60===0?(e>0?"-":"+")+$e(Math.abs(e)/60,2):pp(e,t)}function pp(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),n=$e(Math.trunc(r/60),2),i=$e(r%60,2);return o+n+t+i}var xce=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},wce=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},T2e=(e,t)=>{let o=e.match(/(P+)(p+)?/)||[],r=o[1],n=o[2];if(!n)return xce(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",xce(r,t)).replace("{{time}}",wce(n,t))},Cce={p:wce,P:T2e};var I2e=/^D+$/,P2e=/^Y+$/,R2e=["D","DD","YY","YYYY"];function Bce(e){return I2e.test(e)}function Ece(e){return P2e.test(e)}function Tce(e,t,o){let r=O2e(e,t,o);if(console.warn(r),R2e.includes(e))throw new RangeError(r)}function O2e(e,t,o){let r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var A2e=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,L2e=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,N2e=/^'([^]*?)'?$/,M2e=/''/g,D2e=/[a-zA-Z]/;function j4(e,t,o){let r=Jd(),n=o?.locale??r.locale??F4,i=o?.firstWeekContainsDate??o?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=o?.weekStartsOn??o?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=lt(e,o?.in);if(!uk(a))throw new RangeError("Invalid time value");let c=t.match(L2e).map(d=>{let f=d[0];if(f==="p"||f==="P"){let m=Cce[f];return m(d,n.formatLong)}return d}).join("").match(A2e).map(d=>{if(d==="''")return{isToken:!1,value:"'"};let f=d[0];if(f==="'")return{isToken:!1,value:V2e(d)};if(z4[f])return{isToken:!0,value:d};if(f.match(D2e))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:d}});n.localize.preprocessor&&(c=n.localize.preprocessor(a,c));let u={firstWeekContainsDate:i,weekStartsOn:s,locale:n};return c.map(d=>{if(!d.isToken)return d.value;let f=d.value;(!o?.useAdditionalWeekYearTokens&&Ece(f)||!o?.useAdditionalDayOfYearTokens&&Bce(f))&&Tce(f,t,String(e));let m=z4[f[0]];return m(a,f,n.localize,u)}).join("")}function V2e(e){let t=e.match(N2e);return t?t[1].replace(M2e,"'"):e}function hp(e,t,o){return N2(e,-t,o)}function j2(e,t,o){return M2(e,-t,o)}function Ice(e,t,o){return ace(e,-t,o)}function U2(e,t,o){return lce(e,-t,o)}var de=l(N(),1),lo=l(R(),1),rn=l(pc(),1);var U4=l(w(),1),wo={Name:(0,U4.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,U4.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};function Pce(e,t){switch(t){case"days":return hp(new Date,e);case"weeks":return Ice(new Date,e);case"months":return j2(new Date,e);case"years":return U2(new Date,e);default:return new Date}}var Rce={label:(0,de.__)("Is none of"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),wo),filter:((e,t,o)=>{if(!o?.length)return!0;let r=t.getValue({item:e});return Array.isArray(r)?!o.some(n=>r.includes(n)):typeof r=="string"?!o.includes(r):!1}),selection:"multi"},Oce=[{name:Ut,label:(0,de.__)("Includes"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),wo),filter(e,t,o){if(!o?.length)return!0;let r=t.getValue({item:e});return Array.isArray(r)?o.some(n=>r.includes(n)):typeof r=="string"?o.includes(r):!1},selection:"multi"},{name:Ht,...Rce},{name:Ir,label:(0,de.__)("Includes all"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),wo),filter(e,t,o){return o?.length?o.every(r=>t.getValue({item:e})?.includes(r)):!0},selection:"multi"},{name:Pr,...Rce},{name:tn,label:(0,de.__)("Between (inc)"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"),e.name,t[0].label[0],t[0].label[1]),wo),filter(e,t,o){if(!Array.isArray(o)||o.length!==2||o[0]===void 0||o[1]===void 0)return!0;let r=t.getValue({item:e});return typeof r=="number"||r instanceof Date||typeof r=="string"?r>=o[0]&&r<=o[1]:!1},selection:"custom"},{name:on,label:(0,de.__)("In the past"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),wo),filter(e,t,o){if(o?.value===void 0||o?.unit===void 0)return!0;let r=Pce(o.value,o.unit),n=(0,rn.getDate)(t.getValue({item:e}));return n>=r&&n<=new Date},selection:"custom"},{name:Rn,label:(0,de.__)("Over"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),wo),filter(e,t,o){if(o?.value===void 0||o?.unit===void 0)return!0;let r=Pce(o.value,o.unit);return(0,rn.getDate)(t.getValue({item:e}))<r},selection:"custom"},{name:Jt,label:(0,de.__)("Is"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){return o===t.getValue({item:e})||o===void 0},selection:"single"},{name:eo,label:(0,de.__)("Is not"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){return o!==t.getValue({item:e})},selection:"single"},{name:Hd,label:(0,de.__)("Less than"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})<o},selection:"single"},{name:Gd,label:(0,de.__)("Greater than"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})>o},selection:"single"},{name:Wd,label:(0,de.__)("Less than or equal"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})<=o},selection:"single"},{name:$d,label:(0,de.__)("Greater than or equal"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})>=o},selection:"single"},{name:Kd,label:(0,de.__)("Before"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){if(o===void 0)return!0;let r=(0,rn.getDate)(o);return(0,rn.getDate)(t.getValue({item:e}))<r},selection:"single"},{name:Yd,label:(0,de.__)("After"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){if(o===void 0)return!0;let r=(0,rn.getDate)(o);return(0,rn.getDate)(t.getValue({item:e}))>r},selection:"single"},{name:qd,label:(0,de.__)("Before (inc)"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){if(o===void 0)return!0;let r=(0,rn.getDate)(o);return(0,rn.getDate)(t.getValue({item:e}))<=r},selection:"single"},{name:Zd,label:(0,de.__)("After (inc)"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){if(o===void 0)return!0;let r=(0,rn.getDate)(o);return(0,rn.getDate)(t.getValue({item:e}))>=r},selection:"single"},{name:Ja,label:(0,de.__)("Contains"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){if(o===void 0)return!0;let r=t.getValue({item:e});return typeof r=="string"&&o&&r.toLowerCase().includes(String(o).toLowerCase())},selection:"single"},{name:el,label:(0,de.__)("Doesn't contain"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){if(o===void 0)return!0;let r=t.getValue({item:e});return typeof r=="string"&&o&&!r.toLowerCase().includes(String(o).toLowerCase())},selection:"single"},{name:tl,label:(0,de.__)("Starts with"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){if(o===void 0)return!0;let r=t.getValue({item:e});return typeof r=="string"&&o&&r.toLowerCase().startsWith(String(o).toLowerCase())},selection:"single"},{name:Xd,label:(0,de.__)("On"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){if(o===void 0)return!0;let r=(0,rn.getDate)(o),n=(0,rn.getDate)(t.getValue({item:e}));return r.getTime()===n.getTime()},selection:"single"},{name:Qd,label:(0,de.__)("Not on"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){if(o===void 0)return!0;let r=(0,rn.getDate)(o),n=(0,rn.getDate)(t.getValue({item:e}));return r.getTime()!==n.getTime()},selection:"single"}],Ace=e=>Oce.find(t=>t.name===e),Lce=()=>Oce.map(e=>e.name);var Nce=l(A(),1),Mce=l(R(),1);function pt(e,t){let o;return e?.required&&t?.required?o=t?.required?.message?t.required:void 0:e?.pattern&&t?.pattern?o=t.pattern:e?.min&&t?.min?o=t.min:e?.max&&t?.max?o=t.max:e?.minLength&&t?.minLength?o=t.minLength:e?.maxLength&&t?.maxLength?o=t.maxLength:e?.elements&&t?.elements?o=t.elements:t?.custom&&(o=t.custom),o}var Dce=l(w(),1),{ValidatedCheckboxControl:F2e}=St(Nce.privateApis);function Vce({field:e,onChange:t,data:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{getValue:s,setValue:a,label:c,description:u,isValid:d}=e,f=(0,Mce.useCallback)(()=>{t(a({item:o,value:!s({item:o})}))},[o,s,t,a]);return(0,Dce.jsx)(F2e,{required:!!e.isValid?.required,markWhenOptional:n,customValidity:pt(d,i),hidden:r,label:c,help:u,checked:s({item:o}),onChange:f})}var H2=l(A(),1),Fce=l(R(),1);var H4=l(w(),1),{ValidatedComboboxControl:z2e}=St(H2.privateApis);function G2({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{label:i,description:s,placeholder:a,getValue:c,setValue:u,isValid:d}=t,f=c({item:e})??"",m=(0,Fce.useCallback)(g=>o(u({item:e,value:g??""})),[e,o,u]),{elements:h,isLoading:p}=On({elements:t.elements,getElements:t.getElements});return p?(0,H4.jsx)(H2.Spinner,{}):(0,H4.jsx)(z2e,{required:!!t.isValid?.required,customValidity:pt(d,n),label:i,value:f,help:s,placeholder:a,options:h,onChange:m,hideLabelFromVision:r,allowReset:!0,expandOnFocus:!0})}var Y2=l(A(),1),cs=l(R(),1),K2=l(N(),1),hi=l(pc(),1);var hk=l(A(),1),G4=l(R(),1),ol=l(N(),1);var pk=l(w(),1),j2e={[on]:[{value:"days",label:(0,ol.__)("Days")},{value:"weeks",label:(0,ol.__)("Weeks")},{value:"months",label:(0,ol.__)("Months")},{value:"years",label:(0,ol.__)("Years")}],[Rn]:[{value:"days",label:(0,ol.__)("Days ago")},{value:"weeks",label:(0,ol.__)("Weeks ago")},{value:"months",label:(0,ol.__)("Months ago")},{value:"years",label:(0,ol.__)("Years ago")}]};function W2({className:e,data:t,field:o,onChange:r,hideLabelFromVision:n,operator:i}){let s=j2e[i===on?"inThePast":"over"],{id:a,label:c,getValue:u,setValue:d}=o,f=u({item:t}),{value:m="",unit:h=s[0].value}=f&&typeof f=="object"?f:{},p=(0,G4.useCallback)(b=>r(d({item:t,value:{value:Number(b),unit:h}})),[r,d,t,h]),g=(0,G4.useCallback)(b=>r(d({item:t,value:{value:m,unit:b}})),[r,d,t,m]);return(0,pk.jsx)(hk.BaseControl,{id:a,className:V(e,"dataviews-controls__relative-date"),label:c,hideLabelFromVision:n,children:(0,pk.jsxs)(De,{direction:"row",gap:"sm",children:[(0,pk.jsx)(hk.__experimentalNumberControl,{__next40pxDefaultSize:!0,className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:m,onChange:p}),(0,pk.jsx)(hk.SelectControl,{className:"dataviews-controls__relative-date-unit",__next40pxDefaultSize:!0,label:(0,ol.__)("Unit"),value:h,options:s,onChange:g,hideLabelFromVision:!0})]})})}var zce=l(pc(),1);function $2(e){if(!e)return null;let t=(0,zce.getDate)(e);return t&&uk(t)?t:null}var ef=l(w(),1),{DateCalendar:U2e,ValidatedInputControl:H2e}=St(Y2.privateApis),G2e=e=>e?(0,hi.dateI18n)("Y-m-d\\TH:i",(0,hi.getDate)(e)):"";function W2e({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{id:s,label:a,description:c,setValue:u,getValue:d,isValid:f}=t,m=d({item:e}),h=typeof m=="string"?m:void 0,[p,g]=(0,cs.useState)(()=>$2(h)||new Date),b=(0,cs.useRef)(null),v=(0,cs.useRef)(void 0),k=(0,cs.useRef)(null),y=(0,cs.useCallback)(E=>o(u({item:e,value:E})),[e,o,u]);(0,cs.useEffect)(()=>()=>{v.current&&clearTimeout(v.current)},[]);let S=(0,cs.useCallback)(E=>{let L;if(E){let T=(0,hi.dateI18n)("Y-m-d",E),O;h?O=(0,hi.dateI18n)("H:i",(0,hi.getDate)(h)):O=(0,hi.dateI18n)("H:i",E),L=(0,hi.getDate)(`${T}T${O}`).toISOString(),y(L),v.current&&clearTimeout(v.current)}else y(void 0);k.current=b.current&&b.current.ownerDocument.activeElement,v.current=setTimeout(()=>{b.current&&(b.current.focus(),b.current.blur(),y(L),k.current&&k.current instanceof HTMLElement&&k.current.focus())},0)},[y,h]),x=(0,cs.useCallback)(E=>{if(E){let L=(0,hi.getDate)(E);y(L.toISOString());let T=$2(L.toISOString());T&&g(T)}else y(void 0)},[y]),{format:C}=t,B=C.weekStartsOn??(0,hi.getSettings)().l10n.startOfWeek,{timezone:{string:I}}=(0,hi.getSettings)(),P=a;return f?.required&&!n&&!r?P=`${a} (${(0,K2.__)("Required")})`:!f?.required&&n&&!r&&(P=`${a} (${(0,K2.__)("Optional")})`),(0,ef.jsx)(Y2.BaseControl,{id:s,label:P,help:c,hideLabelFromVision:r,children:(0,ef.jsxs)(De,{direction:"column",gap:"lg",children:[(0,ef.jsx)(U2e,{style:{width:"100%"},selected:h&&$2(h)||void 0,onSelect:S,month:p,onMonthChange:g,timeZone:I||void 0,weekStartsOn:B}),(0,ef.jsx)(H2e,{ref:b,__next40pxDefaultSize:!0,required:!!f?.required,customValidity:pt(f,i),type:"datetime-local",label:(0,K2.__)("Date time"),hideLabelFromVision:!0,value:G2e(h),onChange:x})]})})}function jce({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s}){return i===on||i===Rn?(0,ef.jsx)(W2,{className:"dataviews-controls__datetime",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:i}):(0,ef.jsx)(W2e,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s})}var Or=l(A(),1),tt=l(R(),1),Ko=l(N(),1),Rr=l(pc(),1);var ht=l(w(),1),{DateCalendar:$2e,DateRangeCalendar:K2e}=St(Or.privateApis),Y2e=[{id:"today",label:(0,Ko.__)("Today"),getValue:()=>(0,Rr.getDate)(null)},{id:"yesterday",label:(0,Ko.__)("Yesterday"),getValue:()=>{let e=(0,Rr.getDate)(null);return hp(e,1)}},{id:"past-week",label:(0,Ko.__)("Past week"),getValue:()=>{let e=(0,Rr.getDate)(null);return hp(e,7)}},{id:"past-month",label:(0,Ko.__)("Past month"),getValue:()=>{let e=(0,Rr.getDate)(null);return j2(e,1)}}],q2e=[{id:"last-7-days",label:(0,Ko.__)("Last 7 days"),getValue:()=>{let e=(0,Rr.getDate)(null);return[hp(e,7),e]}},{id:"last-30-days",label:(0,Ko.__)("Last 30 days"),getValue:()=>{let e=(0,Rr.getDate)(null);return[hp(e,30),e]}},{id:"month-to-date",label:(0,Ko.__)("Month to date"),getValue:()=>{let e=(0,Rr.getDate)(null);return[uce(e),e]}},{id:"last-year",label:(0,Ko.__)("Last year"),getValue:()=>{let e=(0,Rr.getDate)(null);return[U2(e,1),e]}},{id:"year-to-date",label:(0,Ko.__)("Year to date"),getValue:()=>{let e=(0,Rr.getDate)(null);return[V2(e),e]}}],gk=e=>{if(!e)return null;let t=(0,Rr.getDate)(e);return t&&uk(t)?t:null},W4=e=>e?typeof e=="string"?e:j4(e,"yyyy-MM-dd"):"";function Uce({field:e,validity:t,inputRefs:o,isTouched:r,setIsTouched:n,children:i}){let{isValid:s}=e,[a,c]=(0,tt.useState)(void 0),u=(0,tt.useCallback)(()=>{let f=Array.isArray(o)?o:[o];for(let m of f){let h=m.current;if(h&&!h.validity.valid){c({type:"invalid",message:h.validationMessage});return}}c(void 0)},[o]);return(0,tt.useEffect)(()=>{let f=Array.isArray(o)?o:[o],m=t?pt(s,t):void 0;for(let h of f){let p=h.current;p&&p.setCustomValidity(m?.type==="invalid"&&m.message?m.message:"")}},[o,s,t]),(0,tt.useEffect)(()=>{let f=Array.isArray(o)?o:[o],m=h=>{h.preventDefault(),n(!0)};for(let h of f)h.current?.addEventListener("invalid",m);return()=>{for(let h of f)h.current?.removeEventListener("invalid",m)}},[o,n]),(0,tt.useEffect)(()=>{if(!r)return;let f=t?pt(s,t):void 0;f?c(f):u()},[r,s,t,u]),(0,ht.jsxs)("div",{onBlur:f=>{r||(!f.relatedTarget||!f.currentTarget.contains(f.relatedTarget))&&n(!0)},children:[i,(0,ht.jsx)("div",{"aria-live":"polite",children:a&&(0,ht.jsxs)("p",{className:V("components-validated-control__indicator",a.type==="invalid"?"is-invalid":void 0),children:[(0,ht.jsx)(Or.Icon,{className:"components-validated-control__indicator-icon",icon:Pf,size:16,fill:"currentColor"}),a.message]})})]})}function Z2e({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{id:s,label:a,setValue:c,getValue:u,isValid:d,format:f}=t,[m,h]=(0,tt.useState)(null),p=f.weekStartsOn??(0,Rr.getSettings)().l10n.startOfWeek,g=u({item:e}),b=typeof g=="string"?g:void 0,[v,k]=(0,tt.useState)(()=>gk(b)||new Date),[y,S]=(0,tt.useState)(!1),x=(0,tt.useRef)(null),C=(0,tt.useCallback)(T=>o(c({item:e,value:T})),[e,o,c]),B=(0,tt.useCallback)(T=>{let O=T?j4(T,"yyyy-MM-dd"):void 0;C(O),h(null),S(!0)},[C]),I=(0,tt.useCallback)(T=>{let O=T.getValue(),D=W4(O);k(O),C(D),h(T.id),S(!0)},[C]),P=(0,tt.useCallback)(T=>{if(C(T),T){let O=gk(T);O&&k(O)}h(null),S(!0)},[C]),{timezone:{string:E}}=(0,Rr.getSettings)(),L=a;return d?.required&&!n?L=`${a} (${(0,Ko.__)("Required")})`:!d?.required&&n&&(L=`${a} (${(0,Ko.__)("Optional")})`),(0,ht.jsx)(Uce,{field:t,validity:i,inputRefs:x,isTouched:y,setIsTouched:S,children:(0,ht.jsx)(Or.BaseControl,{id:s,className:"dataviews-controls__date",label:L,hideLabelFromVision:r,children:(0,ht.jsxs)(De,{direction:"column",gap:"lg",children:[(0,ht.jsxs)(De,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[Y2e.map(T=>{let O=m===T.id;return(0,ht.jsx)(Or.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:O,size:"small",onClick:()=>I(T),children:T.label},T.id)}),(0,ht.jsx)(Or.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!m,size:"small",disabled:!!m,accessibleWhenDisabled:!1,children:(0,Ko.__)("Custom")})]}),(0,ht.jsx)(Or.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:x,type:"date",label:(0,Ko.__)("Date"),hideLabelFromVision:!0,value:b,onChange:P,required:!!t.isValid?.required}),(0,ht.jsx)($2e,{style:{width:"100%"},selected:b&&gk(b)||void 0,onSelect:B,month:v,onMonthChange:k,timeZone:E||void 0,weekStartsOn:p})]})})})}function X2e({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{id:s,label:a,getValue:c,setValue:u,format:d}=t,f,m=c({item:e});Array.isArray(m)&&m.length===2&&m.every(D=>typeof D=="string")&&(f=m);let h=d.weekStartsOn??(0,Rr.getSettings)().l10n.startOfWeek,p=(0,tt.useCallback)(D=>{o(u({item:e,value:D}))},[e,o,u]),[g,b]=(0,tt.useState)(null),v=(0,tt.useMemo)(()=>{if(!f)return{from:void 0,to:void 0};let[D,U]=f;return{from:gk(D)||void 0,to:gk(U)||void 0}},[f]),[k,y]=(0,tt.useState)(()=>v.from||new Date),[S,x]=(0,tt.useState)(!1),C=(0,tt.useRef)(null),B=(0,tt.useRef)(null),I=(0,tt.useCallback)((D,U)=>{D&&U?p([W4(D),W4(U)]):!D&&!U&&p(void 0)},[p]),P=(0,tt.useCallback)(D=>{I(D?.from,D?.to),b(null),x(!0)},[I]),E=(0,tt.useCallback)(D=>{let[U,G]=D.getValue();y(U),I(U,G),b(D.id),x(!0)},[I]),L=(0,tt.useCallback)((D,U)=>{let[G,j]=f||[void 0,void 0];if(I(D==="from"?U:G,D==="to"?U:j),U){let ee=gk(U);ee&&y(ee)}b(null),x(!0)},[f,I]),{timezone:T}=(0,Rr.getSettings)(),O=a;return t.isValid?.required&&!n?O=`${a} (${(0,Ko.__)("Required")})`:!t.isValid?.required&&n&&(O=`${a} (${(0,Ko.__)("Optional")})`),(0,ht.jsx)(Uce,{field:t,validity:i,inputRefs:[C,B],isTouched:S,setIsTouched:x,children:(0,ht.jsx)(Or.BaseControl,{id:s,className:"dataviews-controls__date",label:O,hideLabelFromVision:r,children:(0,ht.jsxs)(De,{direction:"column",gap:"lg",children:[(0,ht.jsxs)(De,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[q2e.map(D=>{let U=g===D.id;return(0,ht.jsx)(Or.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:U,size:"small",onClick:()=>E(D),children:D.label},D.id)}),(0,ht.jsx)(Or.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!g,size:"small",accessibleWhenDisabled:!1,disabled:!!g,children:(0,Ko.__)("Custom")})]}),(0,ht.jsxs)(De,{direction:"row",gap:"sm",justify:"space-between",className:"dataviews-controls__date-range-inputs",children:[(0,ht.jsx)(Or.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:C,type:"date",label:(0,Ko.__)("From"),hideLabelFromVision:!0,value:f?.[0],onChange:D=>L("from",D),required:!!t.isValid?.required}),(0,ht.jsx)(Or.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:B,type:"date",label:(0,Ko.__)("To"),hideLabelFromVision:!0,value:f?.[1],onChange:D=>L("to",D),required:!!t.isValid?.required})]}),(0,ht.jsx)(K2e,{style:{width:"100%"},selected:v,onSelect:P,month:k,onMonthChange:y,timeZone:T.string||void 0,weekStartsOn:h})]})})})}function Hce({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s}){return i===on||i===Rn?(0,ht.jsx)(W2,{className:"dataviews-controls__date",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:i}):i===tn?(0,ht.jsx)(X2e,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s}):(0,ht.jsx)(Z2e,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s})}var q2=l(A(),1),Gce=l(R(),1);var $4=l(w(),1),{ValidatedSelectControl:Q2e}=St(q2.privateApis);function Z2({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{type:s,label:a,description:c,getValue:u,setValue:d,isValid:f}=t,m=s==="array",h=u({item:e})??(m?[]:""),p=(0,Gce.useCallback)(v=>o(d({item:e,value:v})),[e,o,d]),{elements:g,isLoading:b}=On({elements:t.elements,getElements:t.getElements});return b?(0,$4.jsx)(q2.Spinner,{}):(0,$4.jsx)(Q2e,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:pt(f,i),label:a,value:h,help:c,options:g,onChange:p,__next40pxDefaultSize:!0,hideLabelFromVision:r,multiple:m})}var K4=l(w(),1),J2e=10;function Wce(e){let{field:t}=e,{elements:o}=On({elements:t.elements,getElements:t.getElements});return o.length>=J2e?(0,K4.jsx)(G2,{...e}):(0,K4.jsx)(Z2,{...e})}var Q2=l(A(),1);var $ce=l(A(),1),Kce=l(R(),1);var Yce=l(w(),1),{ValidatedInputControl:eRe}=St($ce.privateApis);function rl({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,type:i,prefix:s,suffix:a,validity:c}){let{label:u,placeholder:d,description:f,getValue:m,setValue:h,isValid:p}=t,g=m({item:e}),b=(0,Kce.useCallback)(v=>o(h({item:e,value:v})),[e,h,o]);return(0,Yce.jsx)(eRe,{required:!!p.required,markWhenOptional:n,customValidity:pt(p,c),label:u,placeholder:d,value:g??"",help:f,onChange:b,hideLabelFromVision:r,type:i,prefix:s,suffix:a,pattern:p.pattern?p.pattern.constraint:void 0,minLength:p.minLength?p.minLength.constraint:void 0,maxLength:p.maxLength?p.maxLength.constraint:void 0,__next40pxDefaultSize:!0})}var X2=l(w(),1);function qce({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,X2.jsx)(rl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"email",prefix:(0,X2.jsx)(Q2.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,X2.jsx)(Q2.Icon,{icon:gA})})})}var eR=l(A(),1);var J2=l(w(),1);function Zce({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,J2.jsx)(rl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"tel",prefix:(0,J2.jsx)(eR.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,J2.jsx)(eR.Icon,{icon:cv})})})}var oR=l(A(),1);var tR=l(w(),1);function Xce({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,tR.jsx)(rl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"url",prefix:(0,tR.jsx)(oR.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,tR.jsx)(oR.Icon,{icon:fn})})})}var Ic=l(A(),1),R_=l(R(),1),rR=l(N(),1);var tf=l(w(),1),{ValidatedNumberControl:tRe}=St(Ic.privateApis);function Qce(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function oRe({value:e,onChange:t,hideLabelFromVision:o,step:r}){let[n="",i=""]=e,s=(0,R_.useCallback)(c=>t([Qce(c),i]),[t,i]),a=(0,R_.useCallback)(c=>t([n,Qce(c)]),[t,n]);return(0,tf.jsx)(Ic.BaseControl,{help:(0,rR.__)("The max. value must be greater than the min. value."),children:(0,tf.jsxs)(Ic.Flex,{direction:"row",gap:4,children:[(0,tf.jsx)(Ic.__experimentalNumberControl,{label:(0,rR.__)("Min."),value:n,max:i?Number(i)-r:void 0,onChange:s,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:r}),(0,tf.jsx)(Ic.__experimentalNumberControl,{label:(0,rR.__)("Max."),value:i,min:n?Number(n)+r:void 0,onChange:a,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:r})]})})}function nR({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s}){let a=t.format?.decimals??0,c=Math.pow(10,Math.abs(a)*-1),{label:u,description:d,getValue:f,setValue:m,isValid:h}=t,p=f({item:e})??"",g=(0,R_.useCallback)(v=>{o(m({item:e,value:["",void 0].includes(v)?void 0:Number(v)}))},[e,o,m]),b=(0,R_.useCallback)(v=>{o(m({item:e,value:v}))},[e,o,m]);if(i===tn){let v=["",""];return Array.isArray(p)&&p.length===2&&p.every(k=>typeof k=="number"||k==="")&&(v=p),(0,tf.jsx)(oRe,{value:v,onChange:b,hideLabelFromVision:r,step:c})}return(0,tf.jsx)(tRe,{required:!!h.required,markWhenOptional:n,customValidity:pt(h,s),label:u,help:d,value:p,onChange:g,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:c,min:h.min?h.min.constraint:void 0,max:h.max?h.max.constraint:void 0})}var Jce=l(w(),1);function eue(e){return(0,Jce.jsx)(nR,{...e})}var tue=l(w(),1);function oue(e){return(0,tue.jsx)(nR,{...e})}var iR=l(A(),1),rue=l(R(),1);var Y4=l(w(),1),{ValidatedRadioControl:rRe}=St(iR.privateApis);function nue({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,description:a,getValue:c,setValue:u,isValid:d}=t,{elements:f,isLoading:m}=On({elements:t.elements,getElements:t.getElements}),h=c({item:e}),p=(0,rue.useCallback)(g=>o(u({item:e,value:g})),[e,o,u]);return m?(0,Y4.jsx)(iR.Spinner,{}):(0,Y4.jsx)(rRe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:pt(d,i),label:s,help:a,onChange:p,options:f,selected:h,hideLabelFromVision:r})}var q4=l(R(),1);var iue=l(w(),1);function sue({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,config:i,validity:s}){let{prefix:a,suffix:c}=i||{};return(0,iue.jsx)(rl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s,prefix:a?(0,q4.createElement)(a):void 0,suffix:c?(0,q4.createElement)(c):void 0})}var aue=l(A(),1),lue=l(R(),1);var cue=l(w(),1),{ValidatedToggleControl:nRe}=St(aue.privateApis);function uue({field:e,onChange:t,data:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,description:a,getValue:c,setValue:u,isValid:d}=e,f=(0,lue.useCallback)(()=>{t(u({item:o,value:!c({item:o})}))},[t,u,o,c]);return(0,cue.jsx)(nRe,{required:!!d.required,markWhenOptional:n,customValidity:pt(d,i),hidden:r,label:s,help:a,checked:c({item:o}),onChange:f})}var due=l(A(),1),fue=l(R(),1);var mue=l(w(),1),{ValidatedTextareaControl:iRe}=St(due.privateApis);function pue({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,config:i,validity:s}){let{rows:a=4}=i||{},{label:c,placeholder:u,description:d,setValue:f,isValid:m}=t,h=t.getValue({item:e}),p=(0,fue.useCallback)(g=>o(f({item:e,value:g})),[e,o,f]);return(0,mue.jsx)(iRe,{required:!!m.required,markWhenOptional:n,customValidity:pt(m,s),label:c,placeholder:u,value:h??"",help:d,onChange:p,rows:a,minLength:m.minLength?m.minLength.constraint:void 0,maxLength:m.maxLength?m.maxLength.constraint:void 0,__next40pxDefaultSize:!0,hideLabelFromVision:r})}var bk=l(A(),1),hue=l(R(),1);var sR=l(w(),1),{ValidatedToggleGroupControl:sRe}=St(bk.privateApis);function gue({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{getValue:s,setValue:a,isValid:c}=t,u=s({item:e}),d=(0,hue.useCallback)(p=>o(a({item:e,value:p})),[e,o,a]),{elements:f,isLoading:m}=On({elements:t.elements,getElements:t.getElements});if(m)return(0,sR.jsx)(bk.Spinner,{});if(f.length===0)return null;let h=f.find(p=>p.value===u);return(0,sR.jsx)(sRe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:pt(c,i),__next40pxDefaultSize:!0,isBlock:!0,label:t.label,help:h?.description||t.description,onChange:d,value:u,hideLabelFromVision:r,children:f.map(p=>(0,sR.jsx)(bk.__experimentalToggleGroupControlOption,{label:p.label,value:p.value},p.value))})}var aR=l(A(),1),lR=l(R(),1);var O_=l(w(),1),{ValidatedFormTokenField:aRe}=St(aR.privateApis);function bue({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,placeholder:a,getValue:c,setValue:u,isValid:d}=t,f=c({item:e}),{elements:m,isLoading:h}=On({elements:t.elements,getElements:t.getElements}),p=(0,lR.useMemo)(()=>Array.isArray(f)?f.map(b=>m?.find(k=>k.value===b)||{value:b,label:b}):[],[f,m]),g=(0,lR.useCallback)(b=>{let v=b.map(k=>typeof k=="object"&&"value"in k?k.value:k);o(u({item:e,value:v}))},[o,u,e]);return h?(0,O_.jsx)(aR.Spinner,{}):(0,O_.jsx)(aRe,{required:!!d?.required,markWhenOptional:n,customValidity:pt(d,i),label:r?void 0:s,value:p,onChange:g,placeholder:a,suggestions:m?.map(b=>b.value),__experimentalValidateInput:b=>t.isValid?.elements&&m?m.some(v=>v.value===b||v.label===b):!0,__experimentalExpandOnFocus:m&&m.length>0,__experimentalShowHowTo:!t.isValid?.elements,displayTransform:b=>typeof b=="object"&&"label"in b?b.label:typeof b=="string"&&m&&m.find(k=>k.value===b)?.label||b,__experimentalRenderItem:({item:b})=>{if(typeof b=="string"&&m){let v=m.find(k=>k.value===b);return(0,O_.jsx)("span",{children:v?.label||b})}return(0,O_.jsx)("span",{children:b})}})}var An=l(A(),1),Z4=l(R(),1),kue=l(N(),1);var Pc=l(w(),1),{ValidatedInputControl:lRe}=St(An.privateApis),cRe=({color:e,onColorChange:t})=>{let o=e&&Bt(e).isValid()?e:"#ffffff";return(0,Pc.jsx)(An.Dropdown,{className:"dataviews-controls__color-picker-dropdown",popoverProps:{resize:!1},renderToggle:({onToggle:r})=>(0,Pc.jsx)(An.Button,{onClick:r,"aria-label":(0,kue.__)("Open color picker"),size:"small",icon:()=>(0,Pc.jsx)(An.ColorIndicator,{colorValue:o})}),renderContent:()=>(0,Pc.jsx)(An.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,Pc.jsx)(An.ColorPicker,{color:o,onChange:t,enableAlpha:!0})})})};function vue({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,placeholder:a,description:c,setValue:u,isValid:d}=t,f=t.getValue({item:e})||"",m=(0,Z4.useCallback)(p=>{o(u({item:e,value:p}))},[e,o,u]),h=(0,Z4.useCallback)(p=>{o(u({item:e,value:p||""}))},[e,o,u]);return(0,Pc.jsx)(lRe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:pt(d,i),label:s,placeholder:a,value:f,help:c,onChange:h,hideLabelFromVision:r,type:"text",prefix:(0,Pc.jsx)(An.__experimentalInputControlPrefixWrapper,{variant:"control",children:(0,Pc.jsx)(cRe,{color:f,onColorChange:m})})})}var uR=l(A(),1),dR=l(R(),1),X4=l(N(),1);var cR=l(w(),1);function yue({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let[s,a]=(0,dR.useState)(!1),c=(0,dR.useCallback)(()=>{a(u=>!u)},[]);return(0,cR.jsx)(rl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:s?"text":"password",suffix:(0,cR.jsx)(uR.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,cR.jsx)(uR.Button,{icon:s?vs:Af,onClick:c,size:"small",label:s?(0,X4.__)("Hide password"):(0,X4.__)("Show password")})})})}function fR(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var _ue=l(w(),1),Sue={adaptiveSelect:Wce,array:bue,checkbox:Vce,color:vue,combobox:G2,datetime:jce,date:Hce,email:qce,telephone:Zce,url:Xce,integer:eue,number:oue,password:yue,radio:nue,select:Z2,text:sue,toggle:uue,textarea:pue,toggleGroup:gue};function uRe(e){return e&&typeof e=="object"&&typeof e.control=="string"}function dRe(e){let{control:t,...o}=e,r=mR(t);return r===null?null:function(i){return(0,_ue.jsx)(r,{...i,config:o})}}function xue(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?mR(e.Edit):uRe(e.Edit)?dRe(e.Edit):fR(e)&&e.type!=="array"?mR("adaptiveSelect"):t===null?null:mR(t)}function mR(e){return Object.keys(Sue).includes(e)?Sue[e]:null}function fRe(e,t,o){if(e.filterBy===!1)return!1;let r=e.filterBy?.operators?.filter(n=>o.includes(n))??t;return r.length===0?!1:{isPrimary:!!e.filterBy?.isPrimary,operators:r}}var wue=fRe;var mRe=e=>({item:t})=>{let o=e.split("."),r=t;for(let n of o)r.hasOwnProperty(n)?r=r[n]:r=void 0;return r},Cue=mRe;var pRe=e=>({value:t})=>{let o=e.split("."),r={},n=r;for(let i of o.slice(0,-1))n[i]={},n=n[i];return n[o.at(-1)]=t,r},Bue=pRe;var Tue=l(N(),1);function pR({item:e,field:t}){let{elements:o,isLoading:r}=On({elements:t.elements,getElements:t.getElements}),n=t.getValue({item:e});return r||o.length===0?n:o?.find(i=>i.value===n)?.label||t.getValue({item:e})}var Eue=l(w(),1);function co({item:e,field:t}){return t.hasElements?(0,Eue.jsx)(pR,{item:e,field:t}):t.getValueFormatted({item:e,field:t})}var nl=(e,t,o)=>o==="asc"?e.localeCompare(t):t.localeCompare(e);function uo(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)}function il(e,t){if(typeof t.isValid.minLength?.constraint!="number")return!1;let o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:String(o).length>=t.isValid.minLength.constraint}function sl(e,t){if(typeof t.isValid.maxLength?.constraint!="number")return!1;let o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:String(o).length<=t.isValid.maxLength.constraint}function al(e,t){if(t.isValid.pattern?.constraint===void 0)return!0;try{let o=new RegExp(t.isValid.pattern.constraint),r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:o.test(String(r))}catch{return!1}}function _t(e,t){let r=(t.elements??[]).map(i=>i.value);if(r.length===0)return!0;let n=t.getValue({item:e});return[].concat(n).every(i=>r.includes(i))}function hRe({item:e,field:t}){return t.getValue({item:e})}var nn=hRe;var gRe=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function bRe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!gRe.test(o)?(0,Tue.__)("Value must be a valid email address."):null}var Iue={type:"email",render:co,Edit:"email",sort:nl,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Ht],validOperators:[Jt,eo,Ja,el,tl,Ut,Ht,Ir,Pr],format:{},getValueFormatted:nn,validate:{required:uo,pattern:al,minLength:il,maxLength:sl,elements:_t,custom:bRe}};var Pue=l(N(),1);var kk=(e,t,o)=>o==="asc"?e-t:t-e;function hR(e,t){if(typeof t.isValid.min?.constraint!="number")return!1;let o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:Number(o)>=t.isValid.min.constraint}function gR(e,t){if(typeof t.isValid.max?.constraint!="number")return!1;let o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:Number(o)<=t.isValid.max.constraint}var Rue={separatorThousand:","};function kRe({item:e,field:t}){let o=t.getValue({item:e});if(o==null)return"";if(o=Number(o),!Number.isFinite(o))return String(o);let r;t.type!=="integer"?r=Rue:r=t.format;let{separatorThousand:n}=r,i=Math.trunc(o);return n?String(i).replace(/\B(?=(\d{3})+(?!\d))/g,n):String(i)}function vRe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Number.isInteger(o)?(0,Pue.__)("Value must be an integer."):null}var Oue={type:"integer",render:co,Edit:"integer",sort:kk,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Jt,eo,Hd,Gd,Wd,$d,tn],validOperators:[Jt,eo,Hd,Gd,Wd,$d,tn,Ut,Ht,Ir,Pr],format:Rue,getValueFormatted:kRe,validate:{required:uo,min:hR,max:gR,elements:_t,custom:vRe}};var Aue=l(N(),1);var Lue={separatorThousand:",",separatorDecimal:".",decimals:2};function yRe({item:e,field:t}){let o=t.getValue({item:e});if(o==null)return"";if(o=Number(o),!Number.isFinite(o))return String(o);let r;t.type!=="number"?r=Lue:r=t.format;let{separatorThousand:n,separatorDecimal:i,decimals:s}=r,a=o.toFixed(s),[c,u]=a.split("."),d=n?c.replace(/\B(?=(\d{3})+(?!\d))/g,n):c;return s===0?d:d+i+u}function SRe(e){return e===""||e===void 0||e===null}function _Re(e,t){let o=t.getValue({item:e});return!SRe(o)&&!Number.isFinite(o)?(0,Aue.__)("Value must be a number."):null}var Nue={type:"number",render:co,Edit:"number",sort:kk,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Jt,eo,Hd,Gd,Wd,$d,tn],validOperators:[Jt,eo,Hd,Gd,Wd,$d,tn,Ut,Ht,Ir,Pr],format:Lue,getValueFormatted:yRe,validate:{required:uo,min:hR,max:gR,elements:_t,custom:_Re}};var Mue={type:"text",render:co,Edit:"text",sort:nl,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Ht],validOperators:[Jt,eo,Ja,el,tl,Ut,Ht,Ir,Pr],format:{},getValueFormatted:nn,validate:{required:uo,pattern:al,minLength:il,maxLength:sl,elements:_t}};var gp=l(pc(),1);var Due={datetime:(0,gp.getSettings)().formats.datetime,weekStartsOn:(0,gp.getSettings)().l10n.startOfWeek};function xRe({item:e,field:t}){let o=t.getValue({item:e});if(["",void 0,null].includes(o))return"";let r;return t.type!=="datetime"?r=Due:r=t.format,(0,gp.dateI18n)(r.datetime,(0,gp.getDate)(o))}var wRe=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},Vue={type:"datetime",render:co,Edit:"datetime",sort:wRe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Xd,Qd,Kd,Yd,qd,Zd,on,Rn],validOperators:[Xd,Qd,Kd,Yd,qd,Zd,on,Rn],format:Due,getValueFormatted:xRe,validate:{required:uo,elements:_t}};var bp=l(pc(),1);var Fue={date:(0,bp.getSettings)().formats.date,weekStartsOn:(0,bp.getSettings)().l10n.startOfWeek};function CRe({item:e,field:t}){let o=t.getValue({item:e});if(["",void 0,null].includes(o))return"";let r;return t.type!=="date"?r=Fue:r=t.format,(0,bp.dateI18n)(r.date,(0,bp.getDate)(o))}var BRe=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},zue={type:"date",render:co,Edit:"date",sort:BRe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Xd,Qd,Kd,Yd,qd,Zd,on,Rn,tn],validOperators:[Xd,Qd,Kd,Yd,qd,Zd,on,Rn,tn],format:Fue,getValueFormatted:CRe,validate:{required:uo,elements:_t}};var bR=l(N(),1);function jue(e,t){return t.getValue({item:e})===!0}function ERe({item:e,field:t}){let o=t.getValue({item:e});return o===!0?(0,bR.__)("True"):o===!1?(0,bR.__)("False"):""}function TRe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&![!0,!1].includes(o)?(0,bR.__)("Value must be true, false, or undefined"):null}var IRe=(e,t,o)=>{let r=!!e;return r===!!t?0:o==="asc"?r?1:-1:r?-1:1},Uue={type:"boolean",render:co,Edit:"checkbox",sort:IRe,validate:{required:jue,elements:_t,custom:TRe},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Jt,eo],validOperators:[Jt,eo],format:{},getValueFormatted:ERe};var Hue={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:nn,validate:{}};var Q4=l(N(),1);function Gue(e,t){let o=t.getValue({item:e});return Array.isArray(o)&&o.length>0&&o.every(r=>![void 0,"",null].includes(r))}function Wue({item:e,field:t}){let o=t.getValue({item:e});return(Array.isArray(o)?o:[]).join(", ")}function PRe({item:e,field:t}){return Wue({item:e,field:t})}function RRe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Array.isArray(o)?(0,Q4.__)("Value must be an array."):o.every(r=>typeof r=="string")?null:(0,Q4.__)("Every value must be a string.")}var ORe=(e,t,o)=>{let r=Array.isArray(e)?e:[],n=Array.isArray(t)?t:[];if(r.length!==n.length)return o==="asc"?r.length-n.length:n.length-r.length;let i=r.join(","),s=n.join(",");return o==="asc"?i.localeCompare(s):s.localeCompare(i)},$ue={type:"array",render:PRe,Edit:"array",sort:ORe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Ht],validOperators:[Ut,Ht,Ir,Pr],format:{},getValueFormatted:Wue,validate:{required:Gue,elements:_t,custom:RRe}};function ARe({item:e,field:t}){return t.getValue({item:e})?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":""}var Kue={type:"password",render:co,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:ARe,validate:{required:uo,pattern:al,minLength:il,maxLength:sl,elements:_t}};var Yue={type:"telephone",render:co,Edit:"telephone",sort:nl,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Ht],validOperators:[Jt,eo,Ja,el,tl,Ut,Ht,Ir,Pr],format:{},getValueFormatted:nn,validate:{required:uo,pattern:al,minLength:il,maxLength:sl,elements:_t}};var que=l(N(),1);var vk=l(w(),1);function LRe({item:e,field:t}){if(t.hasElements)return(0,vk.jsx)(pR,{item:e,field:t});let o=nn({item:e,field:t});return!o||!Bt(o).isValid()?o:(0,vk.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,vk.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:o,border:"1px solid #ddd",flexShrink:0}}),(0,vk.jsx)("span",{children:o})]})}function NRe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Bt(o).isValid()?(0,que.__)("Value must be a valid color."):null}var MRe=(e,t,o)=>{let r=Bt(e),n=Bt(t);if(!r.isValid()&&!n.isValid())return 0;if(!r.isValid())return o==="asc"?1:-1;if(!n.isValid())return o==="asc"?-1:1;let i=r.toHsl(),s=n.toHsl();return i.h!==s.h?o==="asc"?i.h-s.h:s.h-i.h:i.s!==s.s?o==="asc"?i.s-s.s:s.s-i.s:o==="asc"?i.l-s.l:s.l-i.l},Zue={type:"color",render:LRe,Edit:"color",sort:MRe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Ht],validOperators:[Jt,eo,Ut,Ht],format:{},getValueFormatted:nn,validate:{required:uo,elements:_t,custom:NRe}};var Xue={type:"url",render:co,Edit:"url",sort:nl,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Ht],validOperators:[Jt,eo,Ja,el,tl,Ut,Ht,Ir,Pr],format:{},getValueFormatted:nn,validate:{required:uo,pattern:al,minLength:il,maxLength:sl,elements:_t}};var DRe=(e,t,o)=>typeof e=="number"&&typeof t=="number"?kk(e,t,o):nl(e,t,o),Que={render:co,Edit:null,sort:DRe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Jt,eo],validOperators:Lce(),format:{},getValueFormatted:nn,validate:{required:uo,elements:_t}};function Jue(e,t){let o;e.isValid?.required===!0&&t.validate.required!==void 0&&(o={constraint:!0,validate:t.validate.required});let r;(e.isValid?.elements===!0||e.isValid?.elements===void 0&&(e.elements||e.getElements))&&t.validate.elements!==void 0&&(r={constraint:!0,validate:t.validate.elements});let n;typeof e.isValid?.min=="number"&&t.validate.min!==void 0&&(n={constraint:e.isValid.min,validate:t.validate.min});let i;typeof e.isValid?.max=="number"&&t.validate.max!==void 0&&(i={constraint:e.isValid.max,validate:t.validate.max});let s;typeof e.isValid?.minLength=="number"&&t.validate.minLength!==void 0&&(s={constraint:e.isValid.minLength,validate:t.validate.minLength});let a;typeof e.isValid?.maxLength=="number"&&t.validate.maxLength!==void 0&&(a={constraint:e.isValid.maxLength,validate:t.validate.maxLength});let c;e.isValid?.pattern!==void 0&&t.validate.pattern!==void 0&&(c={constraint:e.isValid?.pattern,validate:t.validate.pattern});let u=e.isValid?.custom??t.validate.custom;return{required:o,elements:r,min:n,max:i,minLength:s,maxLength:a,pattern:c,custom:u}}function ede(e){return e.validOperators.reduce((t,o)=>{let r=Ace(o);return r?.filter&&(t[o]=r.filter),t},{})}function VRe(e,t){return{...t.format,...e.format}}var tde=VRe;function FRe(e){let t=[Iue,Oue,Nue,Mue,Vue,zue,Uue,Hue,$ue,Kue,Yue,Zue,Xue].find(o=>o?.type===e);return t||Que}function A_(e){return e.map(t=>{let o=FRe(t.type),r=t.getValue||Cue(t.id),n=function(i,s,a){let c=r({item:i}),u=r({item:s});return t.sort?t.sort(c,u,a):o.sort(c,u,a)};return{id:t.id,label:t.label||t.id,header:t.header||t.label||t.id,description:t.description,placeholder:t.placeholder,getValue:r,setValue:t.setValue||Bue(t.id),elements:t.elements,getElements:t.getElements,hasElements:fR(t),isVisible:t.isVisible,enableHiding:t.enableHiding??!0,readOnly:t.readOnly??!1,type:o.type,render:t.render??o.render,Edit:xue(t,o.Edit),sort:n,enableSorting:t.enableSorting??o.enableSorting,enableGlobalSearch:t.enableGlobalSearch??o.enableGlobalSearch,isValid:Jue(t,o),filterBy:wue(t,o.defaultOperators,o.validOperators),filter:ede(o),format:tde(t,o),getValueFormatted:t.getValueFormatted??o.getValueFormatted}})}var sz=l(R(),1);var ode=l(R(),1),rde=l(w(),1),J4=(0,ode.createContext)({fields:[]});J4.displayName="DataFormContext";function nde({fields:e,children:t}){return(0,rde.jsx)(J4.Provider,{value:{fields:e},children:t})}var us=J4;var ER=l(R(),1);var vR=l(R(),1),L_=l(A(),1);var Ar={type:"regular",labelPosition:"top"},zRe=e=>typeof e=="string"?[{id:e,visibility:"when-collapsed"}]:e.map(t=>typeof t=="string"?{id:t,visibility:"when-collapsed"}:{id:t.id,visibility:t.visibility});function ide(e){let t=Ar;if(e?.type==="regular")t={type:"regular",labelPosition:e?.labelPosition??"top"};else if(e?.type==="panel"){let o=e.summary??[],r=Array.isArray(o)?o:[o];t={type:"panel",labelPosition:e?.labelPosition??"side",openAs:e?.openAs??"dropdown",summary:r,editVisibility:e?.editVisibility??"on-hover"}}else if(e?.type==="card")if(e.withHeader===!1)t={type:"card",withHeader:!1,isOpened:!0,summary:[],isCollapsible:!1};else{let o=e.summary??[];t={type:"card",withHeader:!0,isOpened:typeof e.isOpened=="boolean"?e.isOpened:!0,summary:zRe(o),isCollapsible:e.isCollapsible===void 0?!0:e.isCollapsible}}else e?.type==="row"?t={type:"row",alignment:e?.alignment??"center",styles:e?.styles??{}}:e?.type==="details"&&(t={type:"details",summary:e?.summary??""});return t}function sde(e){let t=ide(e?.layout),o=(e.fields??[]).map(r=>{if(typeof r=="string")return{id:r,layout:t};let n=r.layout?ide(r.layout):t;return{id:r.id,layout:n,...!!r.label&&{label:r.label},...!!r.description&&{description:r.description},..."children"in r&&Array.isArray(r.children)&&{children:sde({fields:r.children,layout:Ar}).fields}}});return{layout:t,fields:o}}var kR=sde;var Gt=l(w(),1);function jRe({title:e}){return(0,Gt.jsx)(De,{direction:"column",className:"dataforms-layouts-regular__header",gap:"lg",children:(0,Gt.jsx)(De,{direction:"row",align:"center",children:(0,Gt.jsx)(L_.__experimentalHeading,{level:2,size:13,children:e})})})}function ade({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{fields:s}=(0,vR.useContext)(us),a=t.layout,c=(0,vR.useMemo)(()=>({layout:Ar,fields:t.children?t.children:[]}),[t]);if(t.children)return(0,Gt.jsxs)(Gt.Fragment,{children:[!r&&t.label&&(0,Gt.jsx)(jRe,{title:t.label}),(0,Gt.jsx)(Ln,{data:e,form:c,onChange:o,validity:i?.children})]});let u=a.labelPosition,d=s.find(f=>f.id===t.id);return!d||!d.Edit?null:u==="side"?(0,Gt.jsxs)(De,{direction:"row",className:"dataforms-layouts-regular__field",gap:"sm",children:[(0,Gt.jsx)("div",{className:V("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${u}`),children:(0,Gt.jsx)(L_.BaseControl.VisualLabel,{children:d.label})}),(0,Gt.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:d.readOnly===!0?(0,Gt.jsx)(d.render,{item:e,field:d}):(0,Gt.jsx)(d.Edit,{data:e,field:d,onChange:o,hideLabelFromVision:!0,markWhenOptional:n,validity:i},d.id)})]}):(0,Gt.jsx)("div",{className:"dataforms-layouts-regular__field",children:d.readOnly===!0?(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Gt.Fragment,{children:[!r&&u!=="none"&&(0,Gt.jsx)(L_.BaseControl.VisualLabel,{children:d.label}),(0,Gt.jsx)(d.render,{item:e,field:d})]})}):(0,Gt.jsx)(d.Edit,{data:e,field:d,onChange:o,hideLabelFromVision:u==="none"?!0:r,markWhenOptional:n,validity:i})})}var tz=l(MV(),1),kp=l(A(),1),oz=l(N(),1),ia=l(R(),1),xR=l(Z(),1);var Sk=l(A(),1),yk=l(N(),1);var fde=l(Z(),1),mde=l(R(),1);function URe(e,t){return V("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${e}`,{"has-error":t})}var lde=URe;var yR=l(A(),1);var N_=l(w(),1);function HRe(e,t,o){return e?(0,N_.jsx)(yR.Tooltip,{text:t,placement:"top",children:(0,N_.jsxs)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:[(0,N_.jsx)(yR.Icon,{icon:Pf,size:16}),o]})}):o}var cde=HRe;function ude(e){if(!e)return;let t=Object.keys(e).filter(o=>o!=="children");for(let o of t){let r=e[o];if(r!==void 0&&r.type==="invalid")return r.message?r.message:o==="required"?"A required field is empty":"Unidentified validation error"}if(e.children)for(let o of Object.values(e.children)){let r=ude(o);if(r)return r}}var dde=ude;var gi=l(w(),1);function M_({data:e,field:t,fieldLabel:o,summaryFields:r,validity:n,touched:i,disabled:s,onClick:a,"aria-expanded":c}){let{labelPosition:u,editVisibility:d}=t.layout,f=dde(n),m=i&&!!f,h=lde(u,m),p=cde(m,f,o),g=V("dataforms-layouts-panel__field-trigger",`dataforms-layouts-panel__field-trigger--label-${u}`,{"is-disabled":s,"dataforms-layouts-panel__field-trigger--edit-always":d==="always"}),b=(0,fde.useInstanceId)(M_,"dataforms-layouts-panel__field-control"),v=m?(0,yk.sprintf)((0,yk._x)("Edit %s (has errors)","field"),o||""):(0,yk.sprintf)((0,yk._x)("Edit %s","field"),o||""),k=(0,mde.useRef)(null);return(0,gi.jsxs)("div",{ref:k,className:g,onClick:s?void 0:()=>{let x=k.current?.ownerDocument.defaultView?.getSelection();x&&x.toString().length>0||a()},onKeyDown:s?void 0:x=>{x.target===x.currentTarget&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),a())},children:[u!=="none"&&(0,gi.jsx)("span",{className:h,children:p}),u==="none"&&m&&(0,gi.jsx)(Sk.Tooltip,{text:f,placement:"top",children:(0,gi.jsx)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:(0,gi.jsx)(Sk.Icon,{icon:Pf,size:16})})}),(0,gi.jsx)("span",{id:`${b}`,className:"dataforms-layouts-panel__field-control",children:r.length>1?(0,gi.jsx)("span",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:r.map(x=>(0,gi.jsx)("span",{style:{width:"100%"},children:(0,gi.jsx)(x.render,{item:e,field:x})},x.id))}):r.map(x=>(0,gi.jsx)(x.render,{item:e,field:x},x.id))}),!s&&(0,gi.jsx)(Sk.Button,{className:"dataforms-layouts-panel__field-trigger-icon",label:v,showTooltip:!1,icon:Of,size:"small","aria-expanded":c,"aria-haspopup":"dialog","aria-describedby":`${b}`})]})}var pde=l(MV(),1),ez=l(yf(),1),ll=l(R(),1),sn=l(N(),1);function hde(e){return e?Object.values(e).every(t=>Object.entries(t).every(([o,r])=>o==="children"&&r&&typeof r=="object"?hde(r):r.type!=="invalid"&&r.type!=="validating")):!0}function GRe(e,t){let o=kR(e);if(o.fields.length===0)return[];let r=new Map;t.forEach(s=>{r.set(s.id,s)});function n(s){if("children"in s&&Array.isArray(s.children)){let u=s.children.map(n).filter(f=>f!==null);if(u.length===0)return null;let d=r.get(s.id);if(d){let[f]=A_([d]);return{id:s.id,children:u,field:f}}return{id:s.id,children:u}}let a=r.get(s.id);if(!a)return null;let[c]=A_([a]);return{id:s.id,children:[],field:c}}return o.fields.map(n).filter(s=>s!==null)}function _k(e,t,o){if(e||(e={}),o.length===0)return e;let r={...e},n=r;for(let s=0;s<o.length-1;s++){let a=o[s];n[a]||(n[a]={}),n[a]={...n[a]},n=n[a]}let i=o[o.length-1];return n[i]={...n[i]||{},...t},r}function gde(e,t,o){if(!e||t.length===0)return e;let r={...e},n=r;for(let a=0;a<t.length-1;a++){let c=t[a];if(!n[c])return e;n[c]={...n[c]},n=n[c]}let i=t[t.length-1];if(!n[i])return e;let s={...n[i]};if(delete s[o],Object.keys(s).length===0?delete n[i]:n[i]=s,Object.keys(r).length!==0)return r}function WRe(e,t,o){let{elementsCounterRef:r,setFormValidity:n,path:i,item:s}=o,a=(r.current[t.id]||0)+1;r.current[t.id]=a,e.then(c=>{if(a===r.current[t.id]){if(!Array.isArray(c)){n(u=>_k(u,{elements:{type:"invalid",message:(0,sn.__)("Could not validate elements.")}},[...i,t.id]));return}t.field?.isValid.elements&&!t.field.isValid.elements.validate(s,{...t.field,elements:c})?n(u=>_k(u,{elements:{type:"invalid",message:(0,sn.__)("Value must be one of the elements.")}},[...i,t.id])):n(u=>gde(u,[...i,t.id],"elements"))}}).catch(c=>{if(a!==r.current[t.id])return;let u;c instanceof Error?u=c.message:u=String(c)||(0,sn.__)("Unknown error when running elements validation asynchronously."),n(d=>_k(d,{elements:{type:"invalid",message:u}},[...i,t.id]))})}function $Re(e,t,o){let{customCounterRef:r,setFormValidity:n,path:i}=o,s=(r.current[t.id]||0)+1;r.current[t.id]=s,e.then(a=>{if(s===r.current[t.id]){if(a===null){n(c=>gde(c,[...i,t.id],"custom"));return}if(typeof a=="string"){n(c=>_k(c,{custom:{type:"invalid",message:a}},[...i,t.id]));return}n(c=>_k(c,{custom:{type:"invalid",message:(0,sn.__)("Validation could not be processed.")}},[...i,t.id]))}}).catch(a=>{if(s!==r.current[t.id])return;let c;a instanceof Error?c=a.message:c=String(a)||(0,sn.__)("Unknown error when running custom validation asynchronously."),n(u=>_k(u,{custom:{type:"invalid",message:c}},[...i,t.id]))})}function bde(e,t,o){if(t.field?.isValid.required&&!t.field.isValid.required.validate(e,t.field))return{required:{type:"invalid"}};if(t.field?.isValid.pattern&&!t.field.isValid.pattern.validate(e,t.field))return{pattern:{type:"invalid",message:(0,sn.__)("Value does not match the required pattern.")}};if(t.field?.isValid.min&&!t.field.isValid.min.validate(e,t.field))return{min:{type:"invalid",message:(0,sn.__)("Value is below the minimum.")}};if(t.field?.isValid.max&&!t.field.isValid.max.validate(e,t.field))return{max:{type:"invalid",message:(0,sn.__)("Value is above the maximum.")}};if(t.field?.isValid.minLength&&!t.field.isValid.minLength.validate(e,t.field))return{minLength:{type:"invalid",message:(0,sn.__)("Value is too short.")}};if(t.field?.isValid.maxLength&&!t.field.isValid.maxLength.validate(e,t.field))return{maxLength:{type:"invalid",message:(0,sn.__)("Value is too long.")}};if(t.field?.isValid.elements&&t.field.hasElements&&!t.field.getElements&&Array.isArray(t.field.elements)&&!t.field.isValid.elements.validate(e,t.field))return{elements:{type:"invalid",message:(0,sn.__)("Value must be one of the elements.")}};let r;if(t.field&&t.field.isValid.custom)try{let i=t.field.getValue({item:e});r=t.field.isValid.custom((0,pde.default)(e,t.field.setValue({item:e,value:i})),t.field)}catch(i){let s;return i instanceof Error?s=i.message:s=String(i)||(0,sn.__)("Unknown error when running custom validation."),{custom:{type:"invalid",message:s}}}if(typeof r=="string")return{custom:{type:"invalid",message:r}};let n={};if(t.field&&t.field.isValid.elements&&t.field.hasElements&&typeof t.field.getElements=="function"&&(WRe(t.field.getElements(),t,o),n.elements={type:"validating",message:(0,sn.__)("Validating\u2026")}),r instanceof Promise&&($Re(r,t,o),n.custom={type:"validating",message:(0,sn.__)("Validating\u2026")}),Object.keys(n).length>0)return n;if(t.children.length>0){let i={};t.children.forEach(a=>{i[a.id]=bde(e,a,{...o,path:[...o.path,t.id,"children"]})});let s={};return Object.entries(i).forEach(([a,c])=>{c!==void 0&&(s[a]=c)}),Object.keys(s).length===0?void 0:{children:s}}}function kde(e,t){let o=e?.field?.getValue({item:t});if(e.children.length===0)return o;let r=e.children.map(n=>kde(n,t));return r?{value:o,children:r}:o}function KRe(e,t,o){let[r,n]=(0,ll.useState)(),i=(0,ll.useRef)({}),s=(0,ll.useRef)({}),a=(0,ll.useRef)({}),c=(0,ll.useCallback)(()=>{let u={customCounterRef:i,elementsCounterRef:s,setFormValidity:n,path:[],item:e},d=GRe(o,t);if(d.length===0){n(void 0);return}let f={},m=[];d.forEach(h=>{let p=kde(h,e);if(a.current.hasOwnProperty(h.id)&&(0,ez.default)(a.current[h.id],p)){m.push(h.id);return}a.current[h.id]=p;let g=bde(e,h,u);g!==void 0&&(f[h.id]=g)}),n(h=>{let p={...h,...f},g=[...m,...Object.keys(f)];return Object.keys(p).forEach(v=>{p&&!g.includes(v)&&delete p[v]}),Object.keys(p).length===0&&(p=void 0),(0,ez.default)(h,p)?h:p})},[e,t,o]);return(0,ll.useEffect)(()=>{c()},[c]),{validity:r,isValid:hde(r)}}var vde=KRe;var yde=l(R(),1);function of(e,t){(0,yde.useEffect)(()=>{t&&e.current&&e.current.querySelectorAll("input, textarea, select").forEach(r=>{r.reportValidity()})},[t,e])}var Sde=l(R(),1);function YRe(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.id):[]}var SR=(e,t)=>Array.isArray(e)&&e.length>0?YRe(e).map(r=>t.find(n=>n.id===r)).filter(r=>r!==void 0):[];var qRe=(e,t)=>{let o=t.find(r=>r.id===e.id);return o||t.find(r=>{if(e.children){let n=e.children.filter(i=>!i.children);return n.length===0?!1:r.id===n[0].id}return r.id===e.id})};function ZRe(e){let{fields:t}=(0,Sde.useContext)(us),o=e.layout,r=SR(o.summary,t),n=qRe(e,t),i=e.children?e.label:n?.label;return r.length===0?{summaryFields:n?[n]:[],fieldDefinition:n,fieldLabel:i}:{summaryFields:r,fieldDefinition:n,fieldLabel:i}}var _R=ZRe;var an=l(w(),1);function XRe({data:e,field:t,onChange:o,fieldLabel:r,onClose:n,touched:i}){let{fields:s}=(0,ia.useContext)(us),[a,c]=(0,ia.useState)({}),u=(0,ia.useMemo)(()=>(0,tz.default)(e,a,{arrayMerge:(k,y)=>y}),[e,a]),d=(0,ia.useMemo)(()=>({layout:Ar,fields:t.children?t.children:[{id:t.id,layout:Ar}]}),[t]),f=s.map(k=>({...k,Edit:k.Edit===null?void 0:k.Edit,isValid:{required:k.isValid.required?.constraint,elements:k.isValid.elements?.constraint,min:k.isValid.min?.constraint,max:k.isValid.max?.constraint,pattern:k.isValid.pattern?.constraint,minLength:k.isValid.minLength?.constraint,maxLength:k.isValid.maxLength?.constraint}})),{validity:m}=vde(u,f,d),h=()=>{o(a),n()},p=k=>{c(y=>(0,tz.default)(y,k,{arrayMerge:(S,x)=>x}))},g=(0,xR.useFocusOnMount)("firstInputElement"),b=(0,ia.useRef)(null),v=(0,xR.useMergeRefs)([g,b]);return of(b,i),(0,an.jsxs)(kp.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:n,isFullScreen:!1,title:r,size:"medium",children:[(0,an.jsx)("div",{ref:v,children:(0,an.jsx)(Ln,{data:u,form:d,onChange:p,validity:m,children:(k,y,S,x)=>(0,an.jsx)(k,{data:u,field:y,onChange:p,hideLabelFromVision:d.fields.length<2,markWhenOptional:x,validity:S},y.id)})}),(0,an.jsxs)(De,{direction:"row",className:"dataforms-layouts-panel__modal-footer",gap:"md",children:[(0,an.jsx)(kp.__experimentalSpacer,{style:{flex:1}}),(0,an.jsx)(kp.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:(0,oz.__)("Cancel")}),(0,an.jsx)(kp.Button,{variant:"primary",onClick:h,__next40pxDefaultSize:!0,children:(0,oz.__)("Apply")})]})]})}function QRe({data:e,field:t,onChange:o,validity:r}){let[n,i]=(0,ia.useState)(!1),[s,a]=(0,ia.useState)(!1),{fieldDefinition:c,fieldLabel:u,summaryFields:d}=_R(t);if(!c)return null;let f=()=>{a(!1),i(!0)};return(0,an.jsxs)(an.Fragment,{children:[(0,an.jsx)(M_,{data:e,field:t,fieldLabel:u,summaryFields:d,validity:r,touched:n,disabled:c.readOnly===!0,onClick:()=>a(!0),"aria-expanded":s}),s&&(0,an.jsx)(XRe,{data:e,field:t,onChange:o,fieldLabel:u??"",onClose:f,touched:n})]})}var _de=QRe;var rf=l(A(),1),xde=l(N(),1),Rc=l(R(),1);var wde=l(Z(),1);var Lr=l(w(),1);function JRe({title:e,onClose:t}){return(0,Lr.jsx)(De,{direction:"column",className:"dataforms-layouts-panel__dropdown-header",gap:"lg",children:(0,Lr.jsxs)(De,{direction:"row",gap:"sm",align:"center",children:[e&&(0,Lr.jsx)(rf.__experimentalHeading,{level:2,size:13,children:e}),(0,Lr.jsx)(rf.__experimentalSpacer,{style:{flex:1}}),t&&(0,Lr.jsx)(rf.Button,{label:(0,xde.__)("Close"),icon:wf,onClick:t,size:"small"})]})})}function eOe({touched:e,children:t}){let o=(0,Rc.useRef)(null);return of(o,e),(0,Lr.jsx)("div",{ref:o,children:t})}function tOe({data:e,field:t,onChange:o,validity:r}){let[n,i]=(0,Rc.useState)(!1),[s,a]=(0,Rc.useState)(null),c=(0,Rc.useMemo)(()=>({anchor:s,placement:"left-start",offset:36,shift:!0}),[s]),[u,d]=(0,wde.__experimentalUseDialog)({focusOnMount:"firstInputElement"}),f=(0,Rc.useMemo)(()=>({layout:Ar,fields:t.children?t.children:[{id:t.id,layout:Ar}]}),[t]),m=(0,Rc.useMemo)(()=>{if(r!==void 0)return t.children?r?.children:{[t.id]:r}},[r,t]),{fieldDefinition:h,fieldLabel:p,summaryFields:g}=_R(t);return h?(0,Lr.jsx)("div",{ref:a,className:"dataforms-layouts-panel__field-dropdown-anchor",children:(0,Lr.jsx)(rf.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:c,focusOnMount:!1,onToggle:b=>{b||i(!0)},renderToggle:({isOpen:b,onToggle:v})=>(0,Lr.jsx)(M_,{data:e,field:t,fieldLabel:p,summaryFields:g,validity:r,touched:n,disabled:h.readOnly===!0,onClick:v,"aria-expanded":b}),renderContent:({onClose:b})=>(0,Lr.jsx)(eOe,{touched:n,children:(0,Lr.jsxs)("div",{ref:u,...d,children:[(0,Lr.jsx)(JRe,{title:p,onClose:b}),(0,Lr.jsx)(Ln,{data:e,form:f,onChange:o,validity:m,children:(v,k,y,S)=>(0,Lr.jsx)(v,{data:e,field:k,onChange:o,hideLabelFromVision:(f?.fields??[]).length<2,markWhenOptional:S,validity:y},k.id)})]})})})}):null}var Cde=tOe;var rz=l(w(),1);function Bde({data:e,field:t,onChange:o,validity:r}){return t.layout.openAs==="modal"?(0,rz.jsx)(_de,{data:e,field:t,onChange:o,validity:r}):(0,rz.jsx)(Cde,{data:e,field:t,onChange:o,validity:r})}var nf=l(A(),1),Ide=l(Z(),1),Nn=l(R(),1),nz=l(N(),1);var wR=l(N(),1),Ede=l(w(),1);function Tde(e){if(!e)return 0;let t=0,o=Object.keys(e).filter(r=>r!=="children");for(let r of o)e[r]?.type==="invalid"&&t++;if(e.children)for(let r of Object.values(e.children))t+=Tde(r);return t}function CR({validity:e}){let t=Tde(e);return t===0?null:(0,Ede.jsx)(L4,{intent:"high",children:(0,wR.sprintf)((0,wR._n)("%d field needs attention","%d fields need attention",t),t)})}var vr=l(w(),1);function oOe(e,t,o){if(!t||Array.isArray(t)&&t.length===0)return!1;let n=(Array.isArray(t)?t:[t]).find(i=>typeof i=="string"?i===e.id:typeof i=="object"&&"id"in i?i.id===e.id:!1);return n?typeof n=="string"?!0:typeof n=="object"&&"visibility"in n?n.visibility==="always"||n.visibility==="when-collapsed"&&!o:!0:!1}function iz({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{fields:s}=(0,Nn.useContext)(us),a=t.layout,c=(0,Nn.useRef)(null),u=(0,Ide.useInstanceId)(iz,"dataforms-layouts-card-card-body"),d=(0,Nn.useMemo)(()=>({layout:Ar,fields:t.children??[]}),[t]),{isOpened:f,isCollapsible:m}=a,[h,p]=(0,Nn.useState)(f),[g,b]=(0,Nn.useState)(!1);(0,Nn.useEffect)(()=>{p(f)},[f]);let v=(0,Nn.useCallback)(()=>{p(T=>(T&&b(!0),!T))},[]),k=m?h:!0,y=(0,Nn.useCallback)(()=>{b(!0)},[b]);of(c,k&&g);let x=SR(a.summary,s).filter(T=>oOe(T,a.summary,k)),C=g&&a.isCollapsible?(0,vr.jsx)(CR,{validity:i}):null,B={blockStart:"medium",blockEnd:"medium",inlineStart:"medium",inlineEnd:"medium"},I=t.label,P,E;if(t.children)P=!!I&&a.withHeader,E=(0,vr.jsxs)(vr.Fragment,{children:[t.description&&(0,vr.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,vr.jsx)(Ln,{data:e,form:d,onChange:o,validity:i?.children})]});else{let T=s.find(D=>D.id===t.id);if(!T||!T.Edit)return null;let O=vp("regular")?.component;if(!O)return null;I=T.label,P=!!I&&a.withHeader,E=(0,vr.jsx)(O,{data:e,field:t,onChange:o,hideLabelFromVision:r||P,markWhenOptional:n,validity:i})}let L={blockStart:P?"none":"medium",blockEnd:"medium",inlineStart:"medium",inlineEnd:"medium"};return(0,vr.jsxs)(nf.Card,{className:"dataforms-layouts-card__field",size:B,children:[P&&(0,vr.jsxs)(nf.CardHeader,{className:"dataforms-layouts-card__field-header",onClick:m?v:void 0,style:{cursor:m?"pointer":void 0},isBorderless:!0,children:[(0,vr.jsxs)("div",{style:{height:m?void 0:"40px",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,vr.jsx)("span",{className:"dataforms-layouts-card__field-header-label",children:I}),C,x.length>0&&a.withHeader&&(0,vr.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:x.map(T=>(0,vr.jsx)(T.render,{item:e,field:T},T.id))})]}),m&&(0,vr.jsx)(nf.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:k?xf:zn,"aria-expanded":k,"aria-controls":u,"aria-label":k?(0,nz.__)("Collapse"):(0,nz.__)("Expand")})]}),(k||!P)&&(0,vr.jsx)(nf.CardBody,{id:u,size:L,className:"dataforms-layouts-card__field-control",ref:c,onBlur:y,children:E})]})}var Pde=l(A(),1);var sr=l(w(),1);function rOe({title:e}){return(0,sr.jsx)(De,{direction:"column",className:"dataforms-layouts-row__header",gap:"lg",children:(0,sr.jsx)(De,{direction:"row",align:"center",children:(0,sr.jsx)(Pde.__experimentalHeading,{level:2,size:13,children:e})})})}var nOe=({children:e})=>(0,sr.jsx)(sr.Fragment,{children:e});function Rde({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let s=t.layout;if(t.children){let c={layout:Ar,fields:t.children};return(0,sr.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!r&&t.label&&(0,sr.jsx)(rOe,{title:t.label}),(0,sr.jsx)(De,{direction:"row",align:s.alignment,gap:"lg",children:(0,sr.jsx)(Ln,{data:e,form:c,onChange:o,validity:i?.children,as:nOe,children:(u,d,f)=>(0,sr.jsx)("div",{className:"dataforms-layouts-row__field-control",style:s.styles[d.id],children:(0,sr.jsx)(u,{data:e,field:d,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:f})},d.id)})})]})}let a=vp("regular")?.component;return a?(0,sr.jsx)(sr.Fragment,{children:(0,sr.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,sr.jsx)(a,{data:e,field:t,onChange:o,markWhenOptional:n,validity:i})})}):null}var Mn=l(R(),1),Ode=l(N(),1);var Oc=l(w(),1);function Ade({data:e,field:t,onChange:o,validity:r}){let{fields:n}=(0,Mn.useContext)(us),i=(0,Mn.useRef)(null),s=(0,Mn.useRef)(null),[a,c]=(0,Mn.useState)(!1),[u,d]=(0,Mn.useState)(!1),f=(0,Mn.useMemo)(()=>({layout:Ar,fields:t.children??[]}),[t]);(0,Mn.useEffect)(()=>{let b=i.current;if(!b)return;let v=()=>{let k=b.open;k||c(!0),d(k)};return b.addEventListener("toggle",v),()=>{b.removeEventListener("toggle",v)}},[]),of(s,u&&a);let m=(0,Mn.useCallback)(()=>{c(!0)},[]);if(!t.children)return null;let h=t.layout.summary??"",p=h?n.find(b=>b.id===h):void 0,g;return p&&p.render?g=(0,Oc.jsx)(p.render,{item:e,field:p}):g=t.label||(0,Ode.__)("More details"),(0,Oc.jsxs)("details",{ref:i,className:"dataforms-layouts-details__details",children:[(0,Oc.jsx)("summary",{className:"dataforms-layouts-details__summary",children:(0,Oc.jsxs)(De,{direction:"row",align:"center",gap:"md",className:"dataforms-layouts-details__summary-content",children:[g,a&&(0,Oc.jsx)(CR,{validity:r})]})}),(0,Oc.jsx)("div",{ref:s,className:"dataforms-layouts-details__content",onBlur:m,children:(0,Oc.jsx)(Ln,{data:e,form:f,onChange:o,validity:r?.children})})]})}var yp=l(w(),1),iOe=[{type:"regular",component:ade,wrapper:({children:e})=>(0,yp.jsx)(De,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e})},{type:"panel",component:Bde,wrapper:({children:e})=>(0,yp.jsx)(De,{direction:"column",className:"dataforms-layouts__wrapper",gap:"md",children:e})},{type:"card",component:iz,wrapper:({children:e})=>(0,yp.jsx)(De,{direction:"column",className:"dataforms-layouts__wrapper",gap:"xl",children:e})},{type:"row",component:Rde,wrapper:({children:e,layout:t})=>(0,yp.jsx)(De,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:(0,yp.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,yp.jsx)(De,{direction:"row",gap:"lg",align:t.alignment,children:e})})})},{type:"details",component:Ade}];function vp(e){return iOe.find(t=>t.type===e)}var BR=l(w(),1),sOe=({children:e})=>(0,BR.jsx)(De,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e});function Ln({data:e,form:t,onChange:o,validity:r,children:n,as:i}){let{fields:s}=(0,ER.useContext)(us),a=(0,ER.useMemo)(()=>{let d=s.filter(m=>!!m.isValid?.required).length,f=s.length-d;return d>f},[s]);function c(d){return s.find(f=>f.id===d.id)}let u=i??vp(t.layout.type)?.wrapper??sOe;return(0,BR.jsx)(u,{layout:t.layout,children:t.fields.map(d=>{let f=vp(d.layout.type)?.component;if(!f)return null;let m=d.children?void 0:c(d);return m&&m.isVisible&&!m.isVisible(e)?null:n?n(f,d,r?.[d.id],a):(0,BR.jsx)(f,{data:e,field:d,onChange:o,markWhenOptional:a,validity:r?.[d.id]},d.id)})})}var az=l(w(),1);function D_({data:e,form:t,fields:o,onChange:r,validity:n}){let i=(0,sz.useMemo)(()=>kR(t),[t]),s=(0,sz.useMemo)(()=>A_(o),[o]);return t.fields?(0,az.jsx)(nde,{fields:s,children:(0,az.jsx)(Ln,{data:e,form:i,onChange:r,validity:n})}):null}var sf=l(R(),1),Kde=l(N(),1);var wk=l(A(),1);var lz=l(N(),1);var Lde=l(Z(),1);function xk({isControl:e}={isControl:!1}){return(0,Lde.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:e?35:259}}}var TR=l(w(),1);function Nde({fields:e,visibleFields:t,onToggleField:o}){let{popoverProps:r}=xk();return!e||e.length===0?null:(0,TR.jsx)(wk.DropdownMenu,{icon:ks,label:(0,lz.__)("Options"),popoverProps:r,toggleProps:{size:"small"},children:({onClose:n})=>(0,TR.jsx)(wk.MenuGroup,{label:(0,lz.__)("Show / Hide"),children:e.map(i=>{let s=t.includes(i.id);return(0,TR.jsx)(wk.MenuItem,{isSelected:s,onClick:()=>{o(i.id),n()},role:"menuitemcheckbox",icon:s?gl:null,children:i.label},i.id)})})})}var IR=l(A(),1),Mde=l(Z(),1),Dde=l(F(),1),Ac=l(R(),1),Vde=l(dr(),1);var sa=l(w(),1),{useRichText:aOe}=M(Vde.privateApis);function Fde({data:e,field:t,hideLabelFromVision:o,onChange:r,config:n={}}){let i=(0,Dde.useRegistry)(),s=t.getValue({item:e}),a=t.config||{},{clientId:c}=n,[u,d]=(0,Ac.useState)({start:void 0,end:void 0}),[f,m]=(0,Ac.useState)(!1),h=(0,Ac.useRef)(),p=(0,Ac.useRef)(new Set),g=(0,Ac.useRef)(new Set),b=Cb({allowedFormats:a?.allowedFormats,disableFormats:a?.disableFormats});function v(){h.current?.focus()}let{value:k,getValue:y,onChange:S,ref:x,formatTypes:C}=aOe({value:s,onChange(P){r(t.setValue({item:e,value:P}))},selectionStart:u.start,selectionEnd:u.end,onSelectionChange:(P,E)=>d({start:P,end:E}),__unstableIsSelected:f,preserveWhiteSpace:!!a?.preserveWhiteSpace,placeholder:a?.placeholder,__unstableDisableFormats:a?.disableFormats,allowedFormats:b,withoutInteractiveFormatting:a?.withoutInteractiveFormatting,__unstableFormatTypeHandlerContext:(0,Ac.useMemo)(()=>({richTextIdentifier:t.id,blockClientId:c}),[t.id,c])}),{baseControlProps:B,controlProps:I}=(0,IR.useBaseControlProps)({hideLabelFromVision:o??t.hideLabelFromVision,label:t.label});return(0,sa.jsxs)(sa.Fragment,{children:[f&&(0,sa.jsx)(Pb.Provider,{value:g,children:(0,sa.jsx)(Ob.Provider,{value:p,children:(0,sa.jsx)("div",{children:(0,sa.jsx)(nP,{value:k,onChange:S,onFocus:v,formatTypes:C,forwardedRef:h,isVisible:!1})})})}),(0,sa.jsx)(IR.BaseControl,{...B,children:(0,sa.jsx)("div",{className:"block-editor-content-only-controls__rich-text",role:"textbox","aria-multiline":!a?.disableLineBreaks,ref:(0,Mde.useMergeRefs)([x,tP({registry:i,getValue:y,onChange:S,formatTypes:C,selectionChange:d,isSelected:f,disableFormats:a?.disableFormats,value:k,tagName:"div",disableLineBreaks:a?.disableLineBreaks,keyboardShortcuts:g,inputEvents:p}),h]),onFocus:()=>m(!0),onBlur:()=>m(!1),contentEditable:!0,...I})})]})}var Sp=l(A(),1),zde=l(F(),1),Ck=l(N(),1);var Co=l(w(),1);function lOe({data:e,field:t,attachment:o,config:r}){let{allowedTypes:n=[],multiple:i=!1}=r||{};if(i)return"todo multiple";if(o?.media_type==="image"||o?.poster)return(0,Co.jsx)("div",{className:"block-editor-content-only-controls__media-thumbnail",children:(0,Co.jsx)("img",{alt:"",width:24,height:24,src:o.media_type==="image"?o.source_url:o.poster})});if(n.length===1){let a=t.getValue({item:e})?.url;if(n[0]==="image"&&a)return(0,Co.jsx)("div",{className:"block-editor-content-only-controls__media-thumbnail",children:(0,Co.jsx)("img",{alt:"",width:24,height:24,src:a})});let c;if(n[0]==="image"?c=iv:n[0]==="video"?c=FN:n[0]==="audio"?c=HO:c=jp,c)return(0,Co.jsx)(Sp.Icon,{icon:c,size:24})}return(0,Co.jsx)(Sp.Icon,{icon:jp,size:24})}function jde({data:e,field:t,onChange:o,config:r={}}){let{popoverProps:n}=xk({isControl:!0}),i=t.getValue({item:e}),{allowedTypes:s=[],multiple:a=!1,useFeaturedImage:c=!1}=r,u=i?.id,d=i?.url,f=(0,zde.useSelect)(h=>{if(!u)return;let g=h(_).getSettings()[x0];if(g)return g(h,u)},[u]),m;if(s.length===1){let h=s[0];h==="image"?m=(0,Ck.__)("Choose an image\u2026"):h==="video"?m=(0,Ck.__)("Choose a video\u2026"):h==="application"?m=(0,Ck.__)("Choose a file\u2026"):m=(0,Ck.__)("Choose a media item\u2026")}else m=(0,Ck.__)("Choose a media item\u2026");return(0,Co.jsx)(Ds,{children:(0,Co.jsx)(_b,{className:"block-editor-content-only-controls__media-replace-flow",allowedTypes:s,mediaId:u,mediaURL:d,multiple:a,popoverProps:n,onReset:()=>{o(t.setValue({item:e,value:{}}))},...c&&{useFeaturedImage:!!i?.featuredImage,onToggleFeaturedImage:()=>{o(t.setValue({item:e,value:{featuredImage:!i?.featuredImage}}))}},onSelect:h=>{if(h.id&&h.url){let p={...h,mediaType:h.media_type};c&&(p.featuredImage=!1),o(t.setValue({item:e,value:p}))}},renderToggle:h=>(0,Co.jsx)(Sp.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__media",...h,children:(0,Co.jsxs)(Sp.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"24px 1fr",className:"block-editor-content-only-controls__media-row",children:[d&&(0,Co.jsxs)(Co.Fragment,{children:[(0,Co.jsx)(lOe,{attachment:f,field:t,data:e,config:r}),(0,Co.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:f?.title?.raw&&f?.title?.raw!==""?f?.title?.raw:d})]}),!d&&(0,Co.jsxs)(Co.Fragment,{children:[(0,Co.jsx)("span",{className:"block-editor-content-only-controls__media-placeholder",style:{width:"24px",height:"24px"}}),(0,Co.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:m})]})]})})})})}var Lc=l(A(),1),RR=l(R(),1),Ude=l(N(),1);var Hde=l(dn(),1);var yr=l(w(),1),cz="noreferrer noopener",Gde="_blank",PR="nofollow";function cOe({rel:e="",url:t="",opensInNewTab:o,nofollow:r}){let n,i=e;if(o)n=Gde,i=i?.includes(cz)?i:i+` ${cz}`;else{let s=new RegExp(`\\b${cz}\\s*`,"g");i=i?.replace(s,"").trim()}if(r)i=i?.includes(PR)?i:(i+` ${PR}`).trim();else{let s=new RegExp(`\\b${PR}\\s*`,"g");i=i?.replace(s,"").trim()}return{url:(0,Hde.prependHTTP)(t),linkTarget:n,rel:i||void 0}}function Wde({data:e,field:t,onChange:o}){let[r,n]=(0,RR.useState)(!1),{popoverProps:i}=xk({isControl:!0}),s=t.getValue({item:e}),a=s?.url,c=s?.rel||"",d=s?.linkTarget===Gde,f=c===PR,m=(0,RR.useMemo)(()=>({url:a,opensInNewTab:d,nofollow:f}),[a,d,f]);return(0,yr.jsxs)(yr.Fragment,{children:[(0,yr.jsx)(Lc.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__link",onClick:()=>{n(!0)},children:(0,yr.jsxs)(Lc.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"24px 1fr",className:"block-editor-content-only-controls__link-row",children:[a&&(0,yr.jsxs)(yr.Fragment,{children:[(0,yr.jsx)(Lc.Icon,{icon:fn,size:24}),(0,yr.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:a})]}),!a&&(0,yr.jsxs)(yr.Fragment,{children:[(0,yr.jsx)(Lc.Icon,{icon:fn,size:24,style:{opacity:.3}}),(0,yr.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:(0,Ude.__)("Link")})]})]})}),r&&(0,yr.jsx)(Lc.Popover,{onClose:()=>{n(!1)},...i??{},children:(0,yr.jsx)(Pd,{value:m,onChange:h=>{let p=cOe({rel:c,...h});o(t.setValue({item:e,value:p}))},onRemove:()=>{o(t.setValue({item:e,value:{}}))}})})]})}var Sr=l(w(),1),{fieldsKey:Yde,formKey:uz}=M(Bk.privateApis);function dz(e,t={}){return function(r){return(0,Sr.jsx)(e,{...r,config:t})}}function uOe({clientId:e,blockType:t,setAttributes:o,isCollapsed:r=!1}){let n=zr({clientId:e,context:"list-view"}),i=Tt(e),s=t?.[Yde],a=(0,sf.useContext)(xr),c=(0,$de.useSelect)(p=>{let g=p(_).getBlockAttributes(e);if(!g?.metadata?.bindings)return g;let{getBlockBindingsSource:b}=M(p(Bk.store));return Object.entries(g.metadata.bindings).reduce((v,[k,y])=>{let S=b(y.source);if(!S)return v;let x=S.getValues({select:p,context:a,bindings:{[k]:y}});return{...v,...x}},g)},[a,e]),u=(0,sf.useMemo)(()=>r?{...t?.[uz],fields:[t?.[uz]?.fields?.[0]]}:t?.[uz],[t,r]),[d,f]=(0,sf.useState)(u),m=(0,sf.useMemo)(()=>s?.length?s.map(p=>{let g={...p};return typeof p.Edit=="string"&&p.Edit==="rich-text"?g.Edit=dz(Fde,{clientId:e}):typeof p.Edit=="string"&&p.Edit==="link"?g.Edit=dz(Wde):typeof p.Edit=="object"&&p.Edit.control==="media"&&(g.Edit=dz(jde,{...p.Edit})),g}):[],[s,e]);if(!s?.length)return null;let h=p=>{f(g=>g.fields?.includes(p)?{...g,fields:g.fields.filter(b=>b!==p)}:{...g,fields:[...g.fields||[],p]})};return(0,Sr.jsxs)("div",{className:"block-editor-block-fields__container",children:[(0,Sr.jsx)("div",{className:"block-editor-block-fields__header",children:(0,Sr.jsxs)(OR.__experimentalHStack,{spacing:1,children:[r&&(0,Sr.jsxs)(Sr.Fragment,{children:[(0,Sr.jsx)(Ae,{className:"block-editor-block-fields__header-icon",icon:i?.icon}),(0,Sr.jsx)("h2",{className:"block-editor-block-fields__header-title",children:(0,Sr.jsx)(OR.__experimentalTruncate,{numberOfLines:1,children:n})}),(0,Sr.jsx)(Nde,{fields:m,visibleFields:d.fields,onToggleField:h})]}),!r&&(0,Sr.jsx)("h2",{className:"block-editor-block-fields__header-title",children:(0,Kde.__)("Content")})]})}),(0,Sr.jsx)(D_,{data:c,fields:m,form:d,onChange:o})]})}function dOe(e){return!!(window?.__experimentalContentOnlyInspectorFields&&(0,Bk.getBlockType)(e)?.[Yde])}function fOe(e){let{blockType:t,isSelectionWithinCurrentSection:o}=(0,sf.useContext)(ur);return(0,Sr.jsx)(Sm,{group:"content",children:(0,Sr.jsx)(uOe,{...e,blockType:t,isCollapsed:o})})}var qde={edit:fOe,hasSupport:dOe,attributeKeys:[],supportsPatternEditing:!0};var pz=l(ut(),1),Zde=l(A(),1),fz=l(N(),1),V_=l($(),1);var mz=l(w(),1);function mOe(e){return(0,V_.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e}function pOe({className:e,setAttributes:t}){return ao()!=="default"?null:(0,mz.jsx)(fe,{group:"advanced",children:(0,mz.jsx)(Zde.TextControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,fz.__)("Additional CSS class(es)"),value:e||"",onChange:r=>{t({className:r!==""?r:void 0})},help:(0,fz.__)("Separate multiple classes with spaces.")})})}var hz={edit:pOe,addSaveProps:hOe,attributeKeys:["className"],hasSupport(e){return(0,V_.hasBlockSupport)(e,"customClassName",!0)}};function hOe(e,t,o){return(0,V_.hasBlockSupport)(t,"customClassName",!0)&&o.className&&(e.className=V(e.className,o.className)),e}function gOe(e,t,o,r){if(!(0,V_.hasBlockSupport)(e.name,"customClassName",!0)||r.length===1&&e.innerBlocks.length===t.length||r.length===1&&t.length>1||r.length>1&&t.length===1)return e;if(t[o]){let n=t[o]?.attributes.className;if(n&&e.attributes.className===void 0)return{...e,attributes:{...e.attributes,className:n}}}return e}(0,pz.addFilter)("blocks.registerBlockType","core/editor/custom-class-name/attribute",mOe);(0,pz.addFilter)("blocks.switchToBlockType.transformedBlock","core/customClassName/addTransforms",gOe);var Xde=l(ut(),1),F_=l($(),1);function bOe(e,t){return(0,F_.hasBlockSupport)(t,"className",!0)&&(typeof e.className=="string"?e.className=[...new Set([(0,F_.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,F_.getBlockDefaultClassName)(t.name)),e}(0,Xde.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",bOe);var Ife=l(R(),1),Pfe=l(ut(),1),Dc=l($(),1),Rfe=l(Z(),1),Pk=l(Uv(),1);var xz=l($(),1),VR=l(R(),1),gfe=l(F(),1);var kOe=l($(),1);var vOe=l(w(),1),Qde="typography.lineHeight";var Jde=l(ut(),1),AR=l($(),1),efe=l(XE(),1),tfe=l(A(),1);var z_="typography.__experimentalFontFamily",{kebabCase:yOe}=M(tfe.privateApis);function SOe(e){return(0,AR.hasBlockSupport)(e,z_)&&(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}})),e}function ofe(e,t,o){if(!(0,AR.hasBlockSupport)(t,z_)||Ue(t,ds,"fontFamily")||!o?.fontFamily)return e;let r=new efe.default(e.className);r.add(`has-${yOe(o?.fontFamily)}-font-family`);let n=r.value;return e.className=n||void 0,e}function _Oe({name:e,fontFamily:t}){return ofe({},e,{fontFamily:t})}var gz={useBlockProps:_Oe,addSaveProps:ofe,attributeKeys:["fontFamily"],hasSupport(e){return(0,AR.hasBlockSupport)(e,z_)}};(0,Jde.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",SOe);var bz=l(ut(),1),Ek=l($(),1),rfe=l(XE(),1);var xOe=l(w(),1),_p="typography.fontSize";function wOe(e){return(0,Ek.hasBlockSupport)(e,_p)&&(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}})),e}function nfe(e,t,o){if(!(0,Ek.hasBlockSupport)(t,_p)||Ue(t,ds,"fontSize"))return e;let r=new rfe.default(e.className);r.add(hu(o.fontSize));let n=r.value;return e.className=n||void 0,e}function COe({name:e,fontSize:t,style:o}){let[r,n,i]=me("typography.fontSizes","typography.fluid","layout");if(!(0,Ek.hasBlockSupport)(e,_p)||Ue(e,ds,"fontSize")||!t&&!o?.typography?.fontSize)return;let s;if(o?.typography?.fontSize&&(s={style:{fontSize:ec({size:o.typography.fontSize},{typography:{fluid:n},layout:i})}}),t&&(s={style:{fontSize:oh(r,t,o?.typography?.fontSize).size}}),!!s)return nfe(s,e,{fontSize:t})}var kz={useBlockProps:COe,addSaveProps:nfe,attributeKeys:["fontSize","style"],hasSupport(e){return(0,Ek.hasBlockSupport)(e,_p)}},BOe={fontSize:[["fontSize"],["style","typography","fontSize"]]};function EOe(e,t,o,r){let n=e.name,i={fontSize:(0,Ek.hasBlockSupport)(n,_p)};return f2(i,BOe,e,t,o,r)}(0,bz.addFilter)("blocks.registerBlockType","core/font/addAttribute",wOe);(0,bz.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",EOe);var LR=l(N(),1),Tk=l($(),1);var vz=l(w(),1),Ik="typography.textAlign",TOe=[{icon:Jc,title:(0,LR.__)("Align text left"),align:"left"},{icon:Sf,title:(0,LR.__)("Align text center"),align:"center"},{icon:eu,title:(0,LR.__)("Align text right"),align:"right"}],ife=["left","center","right"],IOe=[];function yz(e){return Array.isArray(e)?ife.filter(t=>e.includes(t)):e===!0?ife:IOe}function POe({style:e,name:t,setAttributes:o}){let n=is(t)?.typography?.textAlign,i=ao();if(!n||i!=="default")return null;let s=yz((0,Tk.getBlockSupport)(t,Ik));if(!s.length)return null;let a=TOe.filter(u=>s.includes(u.align)),c=u=>{let d={...e,typography:{...e?.typography,textAlign:u}};o({style:Me(d)})};return(0,vz.jsx)(Mt,{group:"block",children:(0,vz.jsx)($w,{value:e?.typography?.textAlign,onChange:c,alignmentControls:a})})}var NR={edit:POe,useBlockProps:ROe,addSaveProps:OOe,attributeKeys:["style"],hasSupport(e){return(0,Tk.hasBlockSupport)(e,Ik,!1)}};function ROe({name:e,style:t}){if(!t?.typography?.textAlign||!yz((0,Tk.getBlockSupport)(e,Ik)).length||Ue(e,ds,"textAlign"))return null;let r=t.typography.textAlign;return{className:V({[`has-text-align-${r}`]:r})}}function OOe(e,t,o){if(!o?.style?.typography?.textAlign)return e;let{textAlign:r}=o.style.typography,n=(0,Tk.getBlockSupport)(t,Ik);return yz(n).includes(r)&&!Ue(t,ds,"textAlign")&&(e.className=V(`has-text-align-${r}`,e.className)),e}var _z=l(ut(),1),af=l($(),1),xp=l(R(),1),mfe=l(F(),1),j_=l(N(),1),MR=l(A(),1),pfe=l(Z(),1);function AOe(e,t){let o=e.scrollHeight>e.clientHeight,r=0,n=2400,i=r,s=window.getComputedStyle(e),a=parseFloat(s.paddingLeft)||0,c=parseFloat(s.paddingRight)||0,u=document.createRange();u.selectNodeContents(e);let d=e,f=e.parentElement;if(f){let h=window.getComputedStyle(f);h?.display==="flex"&&(d=f,a+=parseFloat(h.paddingLeft)||0,c+=parseFloat(h.paddingRight)||0)}let m=d.clientHeight;for(;r<=n;){let h=Math.floor((r+n)/2);t(h);let g=u.getBoundingClientRect().width,b=e.scrollWidth<=d.clientWidth&&g<=d.clientWidth-a-c,v=o||e.scrollHeight<=d.clientHeight||e.scrollHeight<=m;d.clientHeight>m&&(m=d.clientHeight),b&&v?(i=h,r=h+1):n=h-1}return u.detach(),i}function sfe(e,t){if(!e)return;t(0);let o=AOe(e,t);return t(o),o}var afe=l(R(),1),lfe=l(N(),1),cfe=l(A(),1),ufe=l(Xo(),1),Sz=l(w(),1);function dfe(){let e=(0,lfe.__)("The text may be too small to read. Consider using a larger container or less text.");return(0,afe.useEffect)(()=>{(0,ufe.speak)(e)},[e]),(0,Sz.jsx)("div",{className:"block-editor-fit-text-size-warning",children:(0,Sz.jsx)(cfe.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:e})})}var Dn=l(w(),1),LOe={},NOe=12,Nc="typography.fitText";function MOe(e){return!(0,af.hasBlockSupport)(e,Nc)||e.attributes?.fitText?e:{...e,attributes:{...e.attributes,fitText:{type:"boolean"}}}}function DOe({fitText:e,name:t,clientId:o}){let[r,n]=(0,xp.useState)(null),i=(0,af.hasBlockSupport)(t,Nc),s=Xe(o),{blockAttributes:a,parentId:c,blockMode:u}=(0,mfe.useSelect)(f=>{if(!o||!i||!e)return LOe;let m=f(_).getBlockMode(o);return m==="html"?{blockMode:m}:{blockAttributes:f(_).getBlockAttributes(o),parentId:f(_).getBlockRootClientId(o),blockMode:m}},[o,i,e]),d=(0,xp.useCallback)(()=>{if(!s||!i||!e)return;let f=`fit-text-${o}`,m=s.ownerDocument.getElementById(f);m||(m=s.ownerDocument.createElement("style"),m.id=f,s.ownerDocument.head.appendChild(m));let h=`#block-${o}`,g=sfe(s,b=>{b===0?m.textContent="":m.textContent=`${h} { font-size: ${b}px !important; }`});n(g)},[s,o,i,e]);return(0,xp.useEffect)(()=>{if(!e||!s||!o||!i||u==="html")return;let f=s,m=f.style.visibility,h=null,p=null,g=null;h=window.requestAnimationFrame(()=>{f.style.visibility="hidden",p=window.requestAnimationFrame(()=>{d(),g=setTimeout(()=>{f.style.visibility=m},10)})});let b;return window.ResizeObserver&&f.parentElement&&(b=new window.ResizeObserver(d),b.observe(f.parentElement),b.observe(f)),()=>{h!==null&&window.cancelAnimationFrame(h),p!==null&&window.cancelAnimationFrame(p),g!==null&&clearTimeout(g),b&&b.disconnect();let v=`fit-text-${o}`,k=f.ownerDocument.getElementById(v);k&&k.remove()}},[e,o,c,d,s,i,u]),(0,xp.useEffect)(()=>{if(e&&s&&i&&u!=="html"){let f=window.requestAnimationFrame(()=>{s&&d()});return()=>window.cancelAnimationFrame(f)}},[a,e,d,s,i,u]),{fontSize:r}}function ffe({clientId:e,fitText:t=!1,setAttributes:o,name:r,fontSize:n,style:i,warning:s}){return(0,af.hasBlockSupport)(r,Nc)?(0,Dn.jsx)(fe,{group:"typography",children:(0,Dn.jsxs)(MR.__experimentalToolsPanelItem,{hasValue:()=>t,label:(0,j_.__)("Fit text"),onDeselect:()=>o({fitText:void 0}),resetAllFilter:()=>({fitText:void 0}),panelId:e,children:[(0,Dn.jsx)(MR.ToggleControl,{label:(0,j_.__)("Fit text"),checked:t,onChange:()=>{let a=!t||void 0,c={fitText:a};a&&(n&&(c.fontSize=void 0),i?.typography?.fontSize&&(c.style={...i,typography:{...i?.typography,fontSize:void 0}})),o(c)},help:t?(0,j_.__)("Text will resize to fit its container."):(0,j_.__)("The text will resize to fit its container, resetting other font size settings.")}),s]})}):null}function VOe(e,t,o){if(!(0,af.hasBlockSupport)(t,Nc))return e;let{fitText:r}=o;if(!r)return e;let n=e.className?`${e.className} has-fit-text`:"has-fit-text";return{...e,className:n}}function FOe({name:e,fitText:t}){return t&&(0,af.hasBlockSupport)(e,Nc)?{className:"has-fit-text"}:{}}(0,_z.addFilter)("blocks.registerBlockType","core/fit-text/addAttribute",MOe);var zOe=e=>(0,af.hasBlockSupport)(e,Nc);function jOe({fitText:e,name:t,clientId:o,children:r}){let{fontSize:n}=DOe({fitText:e,name:t,clientId:o});return r(n)}var UOe=(0,pfe.createHigherOrderComponent)(e=>function(o){let{name:r,attributes:n,clientId:i,isSelected:s,setAttributes:a}=o,{fitText:c}=n;return(0,af.hasBlockSupport)(r,Nc)?(0,Dn.jsxs)(Dn.Fragment,{children:[(0,Dn.jsx)(e,{...o}),c&&(0,Dn.jsx)(jOe,{fitText:c,name:r,clientId:i,children:d=>s&&(0,Dn.jsx)(ffe,{clientId:i,fitText:c,setAttributes:a,name:r,fontSize:n.fontSize,style:n.style,warning:d<NOe&&(0,Dn.jsx)(dfe,{})})}),!c&&s&&(0,Dn.jsx)(ffe,{clientId:i,fitText:c,setAttributes:a,name:r,fontSize:n.fontSize,style:n.style})]}):(0,Dn.jsx)(e,{...o})},"addFitTextControl");(0,_z.addFilter)("editor.BlockEdit","core/fit-text/add-fit-text-control",UOe);var DR={useBlockProps:FOe,addSaveProps:VOe,attributeKeys:["fitText","fontSize","style"],hasSupport:zOe,edit:()=>null};var wz=l(w(),1);function hfe(e,t){return Object.fromEntries(Object.entries(e).filter(([o])=>!t.includes(o)))}var HOe="typography.__experimentalLetterSpacing",GOe="typography.__experimentalTextTransform",WOe="typography.__experimentalTextDecoration",$Oe="typography.textIndent",KOe="typography.textColumns",YOe="typography.__experimentalFontStyle",qOe="typography.__experimentalFontWeight",ZOe="typography.__experimentalWritingMode",ds="typography",bfe=[Qde,_p,YOe,qOe,z_,Ik,KOe,WOe,$Oe,ZOe,GOe,HOe,Nc];function kfe(e){let t={...hfe(e,["fontFamily"])},o=e?.typography?.fontSize,r=e?.typography?.fontFamily,n=typeof o=="string"&&o?.startsWith("var:preset|font-size|")?o.substring(21):void 0,i=r?.startsWith("var:preset|font-family|")?r.substring(23):void 0;return t.typography={...hfe(t.typography,["fontFamily"]),fontSize:n?void 0:o},{style:Me(t),fontFamily:i,fontSize:n}}function vfe(e){return{...e.style,typography:{...e.style?.typography,fontFamily:e.fontFamily?"var:preset|font-family|"+e.fontFamily:void 0,fontSize:e.fontSize?"var:preset|font-size|"+e.fontSize:e.style?.typography?.fontSize}}}function XOe({children:e,resetAllFilter:t}){let o=(0,VR.useCallback)(r=>{let n=vfe(r),i=t(n);return{...r,...kfe(i)}},[t]);return(0,wz.jsx)(fe,{group:"typography",resetAllFilter:o,children:e})}function yfe({clientId:e,name:t,setAttributes:o,settings:r}){let n=RP(r),{style:i,fontFamily:s,fontSize:a,fitText:c}=(0,gfe.useSelect)(m=>{if(!n)return{};let{style:h,fontFamily:p,fontSize:g,fitText:b}=m(_).getBlockAttributes(e)||{};return{style:h,fontFamily:p,fontSize:g,fitText:b}},[e,n]),u=(0,VR.useMemo)(()=>vfe({style:i,fontFamily:s,fontSize:a}),[i,a,s]),d=m=>{let h=kfe(m);(h.fontSize||h.style?.typography?.fontSize)&&c&&(h.fitText=void 0),o(h)};if(!n)return null;let f=(0,xz.getBlockSupport)(t,[ds,"__experimentalDefaultControls"]);return(0,wz.jsx)(OP,{as:XOe,panelId:e,settings:r,value:u,onChange:d,defaultControls:f})}var cf=l(R(),1),zR=l(F(),1),FR=l($(),1),Cfe=l(Re(),1);var cl=l(R(),1),Sfe=l(Jy(),1);var U_=l(w(),1);function _fe({clientId:e,value:t,computeStyle:o,forceShow:r}){let n=Xe(e),[i,s]=(0,cl.useReducer)(()=>o(n));(0,cl.useEffect)(()=>{n&&r&&s()},[n,r]),(0,cl.useEffect)(()=>{if(!n)return;let d=new window.MutationObserver(s);return d.observe(n,{attributes:!0,attributeFilter:["style","class"]}),()=>{d.disconnect()}},[n]);let a=(0,cl.useRef)(t),[c,u]=(0,cl.useState)(!1);return(0,cl.useEffect)(()=>{if((0,Sfe.isShallowEqual)(t,a.current)||r)return;u(!0),a.current=t;let d=setTimeout(()=>{u(!1)},400);return()=>{u(!1),clearTimeout(d)}},[t,r]),!c&&!r?null:(0,U_.jsx)(Hi,{clientId:e,__unstablePopoverSlot:"block-toolbar",children:(0,U_.jsx)("div",{className:"block-editor__spacing-visualizer",style:i})})}function lf(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function xfe({clientId:e,value:t,forceShow:o}){return(0,U_.jsx)(_fe,{clientId:e,value:t?.spacing?.margin,computeStyle:r=>{let n=lf(r,"margin-top"),i=lf(r,"margin-right"),s=lf(r,"margin-bottom"),a=lf(r,"margin-left");return{borderTopWidth:n,borderRightWidth:i,borderBottomWidth:s,borderLeftWidth:a,top:n?`-${n}`:0,right:i?`-${i}`:0,bottom:s?`-${s}`:0,left:a?`-${a}`:0}},forceShow:o})}function wfe({clientId:e,value:t,forceShow:o}){return(0,U_.jsx)(_fe,{clientId:e,value:t?.spacing?.padding,computeStyle:r=>({borderTopWidth:lf(r,"padding-top"),borderRightWidth:lf(r,"padding-right"),borderBottomWidth:lf(r,"padding-bottom"),borderLeftWidth:lf(r,"padding-left")}),forceShow:o})}var Mc=l(w(),1),ul="dimensions",H_="spacing";function QOe(){let[e,t]=(0,cf.useState)(!1),{hideBlockInterface:o,showBlockInterface:r}=M((0,zR.useDispatch)(_));return(0,cf.useEffect)(()=>{e?o():r()},[e,r,o]),[e,t]}function JOe({children:e,resetAllFilter:t}){let o=(0,cf.useCallback)(r=>{let n=r.style,i=t(n);return{...r,style:i}},[t]);return(0,Mc.jsx)(fe,{group:"dimensions",resetAllFilter:o,children:e})}function Bfe({clientId:e,name:t,setAttributes:o,settings:r}){let n=MP(r),i=(0,zR.useSelect)(m=>{if(n)return m(_).getBlockAttributes(e)?.style},[e,n]),[s,a]=QOe(),c=m=>{o({style:Me(m)})};if(!n)return null;let u=(0,FR.getBlockSupport)(t,[ul,"__experimentalDefaultControls"]),d=(0,FR.getBlockSupport)(t,[H_,"__experimentalDefaultControls"]),f={...u,...d};return(0,Mc.jsxs)(Mc.Fragment,{children:[(0,Mc.jsx)(DP,{as:JOe,panelId:e,settings:r,value:i,onChange:c,defaultControls:f,onVisualize:a}),!!r?.spacing?.padding&&s==="padding"&&(0,Mc.jsx)(wfe,{forceShow:s==="padding",clientId:e,value:i}),!!r?.spacing?.margin&&s==="margin"&&(0,Mc.jsx)(xfe,{forceShow:s==="margin",clientId:e,value:i})]})}function Efe(e,t="any"){if(cf.Platform.OS!=="web")return!1;let o=(0,FR.getBlockSupport)(e,ul);return o===!0?!0:t==="any"?!!(o?.aspectRatio||o?.height||o?.minHeight||o?.width):!!o?.[t]}var Tfe={useBlockProps:eAe,attributeKeys:["height","minHeight","width","style"],hasSupport(e){return Efe(e)}};function eAe({name:e,height:t,minHeight:o,style:r}){if(!Efe(e,"aspectRatio")||Ue(e,ul,"aspectRatio"))return{};let n=V({"has-aspect-ratio":!!r?.dimensions?.aspectRatio}),i={};return r?.dimensions?.aspectRatio?(i.minHeight="unset",i.height="unset"):(o||r?.dimensions?.minHeight||t||r?.dimensions?.height)&&(i.aspectRatio="unset"),{className:n,style:i}}function Cz(){(0,Cfe.default)("wp.blockEditor.__experimentalUseCustomSides",{since:"6.3",version:"6.4"})}var dl=l(w(),1),tAe=[...bfe,cp,ir,ul,up,H_,S_],Ez=e=>tAe.some(t=>(0,Dc.hasBlockSupport)(e,t));function bi(e={}){let t={};return(0,Pk.getCSSRules)(e).forEach(o=>{t[o.key]=o.value}),t}function oAe(e){return!Ez(e)&&!(0,Dc.hasBlockSupport)(e,"customCSS",!0)||e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e}var Ofe={[`${cp}.__experimentalSkipSerialization`]:["border"],[`${ir}.__experimentalSkipSerialization`]:[ir],[`${ds}.__experimentalSkipSerialization`]:[ds],[`${ul}.__experimentalSkipSerialization`]:[ul],[`${H_}.__experimentalSkipSerialization`]:[H_],[`${S_}.__experimentalSkipSerialization`]:[S_]},rAe={...Ofe,[`${ul}.aspectRatio`]:[`${ul}.aspectRatio`],[`${up}`]:[up]},nAe={[`${ul}.aspectRatio`]:!0,[`${up}`]:!0},iAe={gradients:"gradient"};function Bz(e,t,o=!1){if(!e)return e;let r=e;return o||(r=JSON.parse(JSON.stringify(e))),Array.isArray(t)||(t=[t]),t.forEach(n=>{if(Array.isArray(n)||(n=n.split(".")),n.length>1){let[i,...s]=n;Bz(r[i],[s],!0)}else n.length===1&&delete r[n[0]]}),r}function Afe(e,t,o,r=rAe){if(!Ez(t))return e;let{style:n}=o;return Object.entries(r).forEach(([i,s])=>{let a=nAe[i]||(0,Dc.getBlockSupport)(t,i);a===!0&&(n=Bz(n,s)),Array.isArray(a)&&a.forEach(c=>{let u=iAe[c]||c;n=Bz(n,[[...s,u]])})}),e.style={...bi(n),...e.style},e}function sAe({clientId:e,name:t,setAttributes:o,__unstableParentLayout:r}){let n=is(t,r),i=ao(),s={clientId:e,name:t,setAttributes:o,settings:{...n,typography:{...n.typography,textAlign:!1}}};return i!=="default"?null:(0,dl.jsxs)(dl.Fragment,{children:[(0,dl.jsx)(d2,{...s}),(0,dl.jsx)(vae,{...s}),(0,dl.jsx)(yfe,{...s}),(0,dl.jsx)(pae,{...s}),(0,dl.jsx)(Bfe,{...s})]})}var jR={edit:sAe,hasSupport:Ez,addSaveProps:Afe,attributeKeys:["style"],useBlockProps:cAe},aAe=[{elementType:"button"},{elementType:"link",pseudo:[":hover"]},{elementType:"heading",elements:["h1","h2","h3","h4","h5","h6"]}],lAe={};function cAe({name:e,style:t}){let o=(0,Rfe.useInstanceId)(lAe,"wp-elements"),r=`.${o}`,n=t?.elements,i=(0,Ife.useMemo)(()=>{if(!n)return;let s=[];return aAe.forEach(({elementType:a,pseudo:c,elements:u})=>{if(Ue(e,ir,a))return;let f=n?.[a];if(f){let m=bg(r,Dc.__EXPERIMENTAL_ELEMENTS[a]);s.push((0,Pk.compileCSS)(f,{selector:m})),c&&c.forEach(h=>{f[h]&&s.push((0,Pk.compileCSS)(f[h],{selector:bg(r,`${Dc.__EXPERIMENTAL_ELEMENTS[a]}${h}`)}))})}u&&u.forEach(m=>{n[m]&&s.push((0,Pk.compileCSS)(n[m],{selector:bg(r,Dc.__EXPERIMENTAL_ELEMENTS[m])}))})}),s.length>0?s.join(""):void 0},[r,n,e]);return Qn({css:i}),Afe({className:o},e,{style:t},Ofe)}(0,Pfe.addFilter)("blocks.registerBlockType","core/style/addAttribute",oAe);var Lfe=l(ut(),1),Nfe=l($(),1),uAe=e=>(0,Nfe.hasBlockSupport)(e,"__experimentalSettings",!1);function dAe(e){return uAe(e)&&(e?.attributes?.settings||(e.attributes={...e.attributes,settings:{type:"object"}})),e}(0,Lfe.addFilter)("blocks.registerBlockType","core/settings/addAttribute",dAe);var uf=l($(),1),Vfe=l(Z(),1),Ffe=l(ut(),1),G_=l(R(),1);function fAe(e=[]){let t={r:[],g:[],b:[],a:[]};return e.forEach(o=>{let r=Bt(o).toRgb();t.r.push(r.r/255),t.g.push(r.g/255),t.b.push(r.b/255),t.a.push(r.a)}),t}function Mfe(e){return`${e}{filter:none}`}function Dfe(e,t){return`${e}{filter:url(#${t})}`}function UR(e,t){let o=fAe(t);return`
<svg
	xmlns:xlink="http://www.w3.org/1999/xlink"
	viewBox="0 0 0 0"
	width="0"
	height="0"
	focusable="false"
	role="none"
	aria-hidden="true"
	style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
>
	<defs>
		<filter id="${e}">
			<!--
				Use sRGB instead of linearRGB so transparency looks correct.
				Use perceptual brightness to convert to grayscale.
			-->
			<feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix>
			<!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. -->
			<feComponentTransfer color-interpolation-filters="sRGB">
				<feFuncR type="table" tableValues="${o.r.join(" ")}"></feFuncR>
				<feFuncG type="table" tableValues="${o.g.join(" ")}"></feFuncG>
				<feFuncB type="table" tableValues="${o.b.join(" ")}"></feFuncB>
				<feFuncA type="table" tableValues="${o.a.join(" ")}"></feFuncA>
			</feComponentTransfer>
			<!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. -->
			<feComposite in2="SourceGraphic" operator="in"></feComposite>
		</filter>
	</defs>
</svg>`}var Vc=l(w(),1),Tz=[],mAe=window?.navigator.userAgent&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&!window.navigator.userAgent.includes("Chromium");Kc([Yc]);function Iz({presetSetting:e,defaultSetting:t}){let[o,r,n,i]=me(t,`${e}.custom`,`${e}.theme`,`${e}.default`);return(0,G_.useMemo)(()=>[...r||Tz,...n||Tz,...o&&i||Tz],[o,r,n,i])}function zfe(e,t){if(!e)return;let o=t?.find(({slug:r})=>e===`var:preset|duotone|${r}`);return o?o.colors:void 0}function pAe(e,t){if(!e||!Array.isArray(e))return;let o=t?.find(r=>r?.colors?.every((n,i)=>n===e[i]));return o?`var:preset|duotone|${o.slug}`:void 0}function hAe({style:e,setAttributes:t,name:o}){let r=e?.color?.duotone,n=is(o),i=ao(),s=Iz({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),a=Iz({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),[c,u]=me("color.custom","color.customDuotone"),d=!c,f=!u||a?.length===0&&d;if(s?.length===0&&f||i!=="default")return null;let m=r==="unset"||Array.isArray(r)?r:zfe(r,s);return(0,Vc.jsxs)(Vc.Fragment,{children:[(0,Vc.jsx)(fe,{group:"filter",children:(0,Vc.jsx)(KP,{value:{filter:{duotone:m}},onChange:h=>{let p={...e,color:{...h?.filter}};t({style:Me(p)})},settings:n})}),(0,Vc.jsx)(Mt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,Vc.jsx)(eI,{duotonePalette:s,colorPalette:a,disableCustomDuotone:f,disableCustomColors:d,value:m,onChange:h=>{let p=pAe(h,s),g={...e,color:{...e?.color,duotone:p??h}};t({style:Me(g)})},settings:n})})]})}var Pz={shareWithChildBlocks:!0,edit:hAe,useBlockProps:vAe,attributeKeys:["style"],hasSupport(e){return(0,uf.hasBlockSupport)(e,"filter.duotone")}};function gAe(e){return(0,uf.hasBlockSupport)(e,"filter.duotone")&&(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}})),e}function bAe({clientId:e,id:t,selector:o,attribute:r}){let n=Iz({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),i=Array.isArray(r),s=i?void 0:zfe(r,n),a=typeof r=="string"&&s,c=typeof r=="string"&&!a,u=null;a?u=s:(c||i)&&(u=r);let m=o.split(",").map(g=>`.${t}${g.trim()}`).join(", "),h=Array.isArray(u)||u==="unset";tc(h?{css:u!=="unset"?Dfe(m,t):Mfe(m),__unstableType:"presets"}:void 0),tc(h?{assets:u!=="unset"?UR(t,u):"",__unstableType:"svgs"}:void 0);let p=Xe(e);(0,G_.useEffect)(()=>{if(h&&p&&mAe){let g=p.style.display;p.style.setProperty("display","inline-block"),p.offsetHeight,p.style.setProperty("display",g)}},[h,p,u])}var kAe={};function vAe({clientId:e,name:t,style:o}){let r=(0,Vfe.useInstanceId)(kAe),n=(0,G_.useMemo)(()=>{let c=(0,uf.getBlockType)(t);if(c){if(!(0,uf.getBlockSupport)(c,"filter.duotone",!1))return null;let d=(0,uf.getBlockSupport)(c,"color.__experimentalDuotone",!1);if(d){let f=oi(c);return typeof d=="string"?bg(f,d):f}return oi(c,"filter.duotone",{fallback:!0})}},[t]),i=o?.color?.duotone,s=`wp-duotone-${r}`,a=n&&i;return bAe({clientId:e,id:s,selector:n,attribute:i}),{className:a?s:""}}(0,Ffe.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",gAe);var GR=l(R(),1),W_=l(F(),1),jfe=l(Z(),1),$_=l($(),1),K_=l(N(),1);var Ufe=l(Un(),1);var HR=l(w(),1),yAe={},SAe={};function _Ae({blockName:e,setAttributes:t,style:o}){if(ao()!=="default")return null;let n=(0,$_.getBlockType)(e);function i(a){let c=a?.css?.trim()?a.css:void 0;t({style:Me({...a,css:c})})}let s=(0,K_.sprintf)((0,K_.__)("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, e.g. color: red;."),n?.title);return(0,HR.jsx)(fe,{group:"advanced",children:(0,HR.jsx)(ZP,{value:o,onChange:i,inheritedValue:o,help:s})})}var xAe="custom-css-edit-warning";function wAe({clientId:e,name:t,setAttributes:o}){let{style:r,canEditCSS:n}=(0,W_.useSelect)(i=>{let{getBlockAttributes:s,getSettings:a}=i(_);return{style:s(e)?.style||SAe,canEditCSS:a().canEditCSS}},[e]);return n?(0,HR.jsx)(_Ae,{blockName:t,setAttributes:o,style:r}):null}function CAe({style:e}){let t=e?.css,o=typeof t=="string"&&t.trim().length>0&&qP(t),r=(0,W_.useSelect)(u=>u(_).getSettings().canEditCSS,[]),{createWarningNotice:n}=(0,W_.useDispatch)(Ufe.store),i=!!t?.trim();(0,GR.useEffect)(()=>{!r&&i&&n((0,K_.__)("This post contains blocks with custom CSS. You do not have permission to edit CSS. If you save this post, the custom CSS will be removed."),{id:xAe,isDismissible:!0})},[r,i,n]);let s=(0,jfe.useInstanceId)(yAe,"wp-custom-css"),a=`.${s}`,c=(0,GR.useMemo)(()=>{if(o)return CS(t,a)},[t,a,o]);return Qn({css:c}),o?{className:`has-custom-css ${s}`}:{}}function BAe(e,t,o){if(!(0,$_.hasBlockSupport)(t,"customCSS",!0)||!o?.style?.css?.trim())return e;let r=e.className?`${e.className} has-custom-css`:"has-custom-css";return{...e,className:r}}var WR={edit:wAe,useBlockProps:CAe,addSaveProps:BAe,attributeKeys:["style"],hasSupport(e){return(0,$_.hasBlockSupport)(e,"customCSS",!0)}};var $R=l(Z(),1),Oz=l(ut(),1),Fc=l($(),1),KR=l(F(),1),fl=l(A(),1),Rk=l(N(),1);var Yo=l(w(),1),EAe="is-style-",Az="layout",{kebabCase:Rz}=M(fl.privateApis);function Lz(e){return(0,Fc.hasBlockSupport)(e,"layout")||(0,Fc.hasBlockSupport)(e,"__experimentalLayout")}function YR(e={},t=""){let{layout:o}=e,{default:r}=(0,Fc.getBlockSupport)(t,Az)||{},n=o?.inherit||o?.contentSize||o?.wideSize?{...o,type:"constrained"}:o||r||{},i=[];if(Hn[n?.type||"default"]?.className){let a=Hn[n?.type||"default"]?.className,c=t.split("/"),d=`wp-block-${c[0]==="core"?c.pop():c.join("-")}-${a}`;i.push(a,d)}return(0,KR.useSelect)(a=>!n?.inherit&&!n?.contentSize&&n?.type!=="constrained"?!1:a(_).getSettings().__experimentalFeatures?.useRootPaddingAwareAlignments,[n?.contentSize,n?.inherit,n?.type])&&i.push("has-global-padding"),n?.orientation&&i.push(`is-${Rz(n.orientation)}`),n?.justifyContent&&i.push(`is-content-justification-${Rz(n.justifyContent)}`),n?.flexWrap&&n.flexWrap==="nowrap"&&i.push("is-nowrap"),i}function Nz(e={},t,o){let{layout:r={},style:n={}}=e,i=r?.inherit||r?.contentSize||r?.wideSize?{...r,type:"constrained"}:r||{},s=xs(i?.type||"default"),[a]=me("spacing.blockGap"),c=a!==null;return s?.getLayoutStyle?.({blockName:t,selector:o,layout:r,style:n,hasBlockGapSupport:c})}function TAe({layout:e,setAttributes:t,name:o,clientId:r}){let n=is(o),{layout:i}=n,{themeSupportsLayout:s}=(0,KR.useSelect)(T=>{let{getSettings:O}=T(_);return{themeSupportsLayout:O().supportsLayout}},[]);if(ao()!=="default")return null;let c=(0,Fc.getBlockSupport)(o,Az,{}),u={...i,...c},{allowSwitching:d,allowEditing:f=!0,allowInheriting:m=!0,default:h}=u;if(!f)return null;let p={...c,...e},{type:g,default:{type:b="default"}={}}=p,v=g||b,k=!!(m&&(!v||v==="default"||v==="constrained"||p.inherit)),y=e||h||{},{inherit:S=!1,contentSize:x=null}=y;if((v==="default"||v==="constrained")&&!s)return null;let C=xs(v),B=xs("constrained"),I=!y.type&&(x||S),P=!!S||!!x,E=T=>t({layout:{type:T}}),L=T=>t({layout:T});return(0,Yo.jsxs)(Yo.Fragment,{children:[(0,Yo.jsx)(fe,{children:(0,Yo.jsxs)(fl.PanelBody,{title:(0,Rk.__)("Layout"),children:[k&&(0,Yo.jsx)(Yo.Fragment,{children:(0,Yo.jsx)(fl.ToggleControl,{label:(0,Rk.__)("Inner blocks use content width"),checked:C?.name==="constrained"||P,onChange:()=>t({layout:{type:C?.name==="constrained"||P?"default":"constrained"}}),help:C?.name==="constrained"||P?(0,Rk.__)("Nested blocks use content width with options for full and wide widths."):(0,Rk.__)("Nested blocks will fill the width of this container.")})}),!S&&d&&(0,Yo.jsx)(IAe,{type:v,onChange:E}),C&&C.name!=="default"&&(0,Yo.jsx)(C.inspectorControls,{layout:y,onChange:L,layoutBlockSupport:u,name:o,clientId:r}),B&&I&&(0,Yo.jsx)(B.inspectorControls,{layout:y,onChange:L,layoutBlockSupport:u,name:o,clientId:r})]})}),!S&&C&&(0,Yo.jsx)(C.toolBarControls,{layout:y,onChange:L,layoutBlockSupport:c,name:o,clientId:r})]})}var Hfe={shareWithChildBlocks:!0,edit:TAe,attributeKeys:["layout"],hasSupport(e){return Lz(e)}};function IAe({type:e,onChange:t}){return(0,Yo.jsx)(fl.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,Rk.__)("Layout type"),hideLabelFromVision:!0,isAdaptiveWidth:!0,value:e,onChange:t,children:fH().map(({name:o,label:r})=>(0,Yo.jsx)(fl.__experimentalToggleGroupControlOption,{value:o,label:r},o))})}function PAe(e){return"type"in(e.attributes?.layout??{})||Lz(e)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e}function RAe({block:e,props:t,blockGapSupport:o,globalBlockGapValue:r,layoutClasses:n}){let{name:i,attributes:s}=t,a=(0,$R.useInstanceId)(e),{layout:c}=s,{default:u}=(0,Fc.getBlockSupport)(i,Az)||{},d=c?.inherit||c?.contentSize||c?.wideSize?{...c,type:"constrained"}:c||u||{},f=`wp-container-${Rz(i)}-is-layout-`,m=`.${f}${a}`,h=o!==null,g=xs(d?.type||"default")?.getLayoutStyle?.({blockName:i,selector:m,layout:d,style:s?.style,hasBlockGapSupport:h,globalBlockGapValue:r}),b=V({[`${f}${a}`]:!!g},n);return Qn({css:g}),(0,Yo.jsx)(e,{...t,__unstableLayoutClassNames:b})}var OAe=(0,$R.createHigherOrderComponent)(e=>function(o){let{clientId:r,name:n,attributes:i}=o,s=Lz(n),a=YR(i,n),c=(0,KR.useSelect)(u=>{if(!s)return;let{getSettings:d,getBlockSettings:f}=M(u(_)),m=d(),{disableLayoutStyles:h}=m;if(h)return;let[p]=f(r,"spacing.blockGap"),g=m[xi],b,v=i?.className;if(v?.includes(EAe)){let{getBlockStyles:y}=u(Fc.store),S=y(n),x=jV(v,S);b=x?g?.blocks?.[n]?.variations?.[x]?.spacing?.blockGap:void 0}let k=b??g?.blocks?.[n]?.spacing?.blockGap??g?.spacing?.blockGap;return{blockGapSupport:p,globalBlockGapValue:k}},[s,r,i?.className,n]);return c?(0,Yo.jsx)(RAe,{block:e,props:o,layoutClasses:a,...c}):(0,Yo.jsx)(e,{...o,__unstableLayoutClassNames:s?a:void 0})},"withLayoutStyles");(0,Oz.addFilter)("blocks.registerBlockType","core/layout/addAttribute",PAe);(0,Oz.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",OAe);var Xfe=l(Z(),1),zz=l(F(),1),Qfe=l(R(),1);var fs=l(R(),1),df=l(F(),1),Wfe=l(Z(),1);function q_(e,t){return Array.from({length:t},(o,r)=>e+r)}var aa=class{constructor({columnStart:e,rowStart:t,columnEnd:o,rowEnd:r,columnSpan:n,rowSpan:i}={}){this.columnStart=e??1,this.rowStart=t??1,n!==void 0?this.columnEnd=this.columnStart+n-1:this.columnEnd=o??this.columnStart,i!==void 0?this.rowEnd=this.rowStart+i-1:this.rowEnd=r??this.rowStart}get columnSpan(){return this.columnEnd-this.columnStart+1}get rowSpan(){return this.rowEnd-this.rowStart+1}contains(e,t){return e>=this.columnStart&&e<=this.columnEnd&&t>=this.rowStart&&t<=this.rowEnd}containsRect(e){return this.contains(e.columnStart,e.rowStart)&&this.contains(e.columnEnd,e.rowEnd)}intersectsRect(e){return this.columnStart<=e.columnEnd&&this.columnEnd>=e.columnStart&&this.rowStart<=e.rowEnd&&this.rowEnd>=e.rowStart}};function Bo(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function Y_(e,t){let o=[];for(let r of e.split(" ")){let n=o[o.length-1],i=n?n.end+t:0,s=i+parseFloat(r);o.push({start:i,end:s})}return o}function zc(e,t,o="start"){return e.reduce((r,n,i)=>Math.abs(n[o]-t)<Math.abs(e[r][o]-t)?i:r,0)}function AAe(e,t){let o=parseFloat(Bo(e,"column-gap")),r=parseFloat(Bo(e,"row-gap")),n=Y_(Bo(e,"grid-template-columns"),o),i=Y_(Bo(e,"grid-template-rows"),r),s=zc(n,t.left)+1,a=zc(i,t.top)+1,c=zc(n,t.right,"end")+1,u=zc(i,t.bottom,"end")+1;return new aa({columnStart:s,columnEnd:c,rowStart:a,rowEnd:u})}function Gfe(e){return AAe(e.parentElement,new window.DOMRect(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight))}function Mz(e){let t=Bo(e,"grid-template-columns"),o=Bo(e,"grid-template-rows"),r=Bo(e,"border-top-width"),n=Bo(e,"border-right-width"),i=Bo(e,"border-bottom-width"),s=Bo(e,"border-left-width"),a=Bo(e,"padding-top"),c=Bo(e,"padding-right"),u=Bo(e,"padding-bottom"),d=Bo(e,"padding-left"),f=t.split(" ").length,m=o.split(" ").length,h=f*m;return{numColumns:f,numRows:m,numItems:h,currentColor:Bo(e,"color"),style:{gridTemplateColumns:t,gridTemplateRows:o,gap:Bo(e,"gap"),inset:`
				calc(${a} + ${r})
				calc(${c} + ${n})
				calc(${u} + ${i})
				calc(${d} + ${s})
			`}}}var ki=l(w(),1);function Z_({clientId:e,contentRef:t,parentLayout:o,childGridClientId:r}){let n=(0,df.useSelect)(a=>a(_).getSettings().isDistractionFree,[]),i=Xe(e);if(n||!i)return null;let s=o?.isManualPlacement&&window.__experimentalEnableGridInteractivity;return(0,ki.jsx)(LAe,{gridClientId:e,gridElement:i,isManualGrid:s,ref:t,childGridClientId:r})}var LAe=(0,fs.forwardRef)(({gridClientId:e,gridElement:t,isManualGrid:o,childGridClientId:r},n)=>{let[i,s]=(0,fs.useState)(()=>Mz(t)),[a,c]=(0,fs.useState)(!1),u=Xe(r),d=(0,fs.useMemo)(()=>u?Gfe(u):null,[u]);return(0,fs.useEffect)(()=>{let f=()=>s(Mz(t)),m=new window.ResizeObserver(f);m.observe(t,{box:"border-box"});let h=new window.ResizeObserver(f);return h.observe(t),()=>{m.disconnect(),h.disconnect()}},[t]),(0,fs.useEffect)(()=>{function f(){c(!0)}function m(){c(!1)}return document.addEventListener("drag",f),document.addEventListener("dragend",m),()=>{document.removeEventListener("drag",f),document.removeEventListener("dragend",m)}},[]),(0,ki.jsx)(Hi,{className:V("block-editor-grid-visualizer",{"is-dropping-allowed":a}),clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",children:(0,ki.jsx)("div",{ref:n,className:"block-editor-grid-visualizer__grid",style:i.style,children:o?(0,ki.jsx)(MAe,{gridClientId:e,gridInfo:i,childGridRect:d}):(0,ki.jsx)(NAe,{gridInfo:i,childGridRect:d})})})});function NAe({gridInfo:e,childGridRect:t}){return q_(1,e.numRows).map(o=>q_(1,e.numColumns).map(r=>{let n=e.currentColor;return t?.contains(r,o)&&(n="transparent"),(0,ki.jsx)($fe,{color:n},`${o}-${r}`)}))}function MAe({gridClientId:e,gridInfo:t,childGridRect:o}){let[r,n]=(0,fs.useState)(null),i=(0,df.useSelect)(a=>{let{getBlockOrder:c,getBlockStyles:u}=M(a(_)),d=c(e);return u(d)},[e]),s=(0,fs.useMemo)(()=>{let a=[];for(let c of Object.values(i)){let{columnStart:u,rowStart:d,columnSpan:f=1,rowSpan:m=1}=c?.layout??{};!u||!d||a.push(new aa({columnStart:u,rowStart:d,columnSpan:f,rowSpan:m}))}return a},[i]);return q_(1,t.numRows).map(a=>q_(1,t.numColumns).map(c=>{let u=o?.contains(c,a),d=t.currentColor;u&&(d="transparent");let f=s.some(h=>h.contains(c,a)),m=r?.contains(c,a)??!1;return(0,ki.jsx)($fe,{color:d,className:m&&"is-highlighted",children:f&&!u?(0,ki.jsx)(DAe,{column:c,row:a,gridClientId:e,gridInfo:t,setHighlightedRect:n}):(0,ki.jsx)(VAe,{column:c,row:a,gridClientId:e,gridInfo:t,setHighlightedRect:n})},`${a}-${c}`)}))}function $fe({color:e,children:t,className:o}){return(0,ki.jsx)("div",{className:V("block-editor-grid-visualizer__cell",o),style:{boxShadow:`inset 0 0 0 1px color-mix(in srgb, ${e} 20%, #0000)`,color:e},children:t})}function Kfe(e,t,o,r,n){let{getBlockAttributes:i,getBlockRootClientId:s,canInsertBlockType:a,getBlockName:c}=(0,df.useSelect)(_),{updateBlockAttributes:u,moveBlocksToPosition:d,__unstableMarkNextChangeAsNotPersistent:f}=(0,df.useDispatch)(_),m=np(o,r.numColumns);return FAe({validateDrag(h){let p=c(h);if(!a(p,o))return!1;let g=i(h),b=new aa({columnStart:e,rowStart:t,columnSpan:g.style?.layout?.columnSpan,rowSpan:g.style?.layout?.rowSpan});return new aa({columnSpan:r.numColumns,rowSpan:r.numRows}).containsRect(b)},onDragEnter(h){let p=i(h);n(new aa({columnStart:e,rowStart:t,columnSpan:p.style?.layout?.columnSpan,rowSpan:p.style?.layout?.rowSpan}))},onDragLeave(){n(h=>h?.columnStart===e&&h?.rowStart===t?null:h)},onDrop(h){n(null);let p=i(h);u(h,{style:{...p.style,layout:{...p.style?.layout,columnStart:e,rowStart:t}}}),f(),d([h],s(h),o,m(e,t))}})}function DAe({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){return(0,ki.jsx)("div",{className:"block-editor-grid-visualizer__drop-zone",ref:Kfe(e,t,o,r,n)})}function VAe({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){let{updateBlockAttributes:i,moveBlocksToPosition:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,df.useDispatch)(_),c=np(o,r.numColumns);return(0,ki.jsx)(Qu,{rootClientId:o,className:"block-editor-grid-visualizer__appender",ref:Kfe(e,t,o,r,n),style:{color:r.currentColor},onSelect:u=>{u&&(i(u.clientId,{style:{layout:{columnStart:e,rowStart:t}}}),a(),s([u.clientId],o,o,c(e,t)))}})}function FAe({validateDrag:e,onDragEnter:t,onDragLeave:o,onDrop:r}){let{getDraggedBlockClientIds:n}=(0,df.useSelect)(_);return(0,Wfe.__experimentalUseDropZone)({onDragEnter(){let[i]=n();i&&e(i)&&t(i)},onDragLeave(){o()},onDrop(){let[i]=n();i&&e(i)&&r(i)}})}var Yfe=l(A(),1),X_=l(R(),1);var qR=l(w(),1);function Dz({clientId:e,bounds:t,onChange:o,parentLayout:r}){let n=Xe(e),i=n?.parentElement,{isManualPlacement:s}=r;return!n||!i?null:(0,qR.jsx)(zAe,{clientId:e,bounds:t,blockElement:n,rootBlockElement:i,onChange:o,isManualGrid:s&&window.__experimentalEnableGridInteractivity})}function zAe({clientId:e,bounds:t,blockElement:o,rootBlockElement:r,onChange:n,isManualGrid:i}){let[s,a]=(0,X_.useState)(null),[c,u]=(0,X_.useState)({top:!1,bottom:!1,left:!1,right:!1});(0,X_.useEffect)(()=>{let h=new window.ResizeObserver(()=>{let p=o.getBoundingClientRect(),g=r.getBoundingClientRect(),b=p.top>g.top,v=p.bottom<g.bottom,k=p.left>g.left,y=p.right<g.right;u({top:(i||!v)&&b,bottom:v,left:(i||!y)&&k,right:y})});return h.observe(o),()=>h.disconnect()},[o,r,i]);let d={right:"left",left:"right"},f={top:"flex-end",bottom:"flex-start"},m={display:"flex",justifyContent:"center",alignItems:"center",...d[s]&&{justifyContent:d[s]},...f[s]&&{alignItems:f[s]}};return(0,qR.jsx)(Hi,{className:"block-editor-grid-item-resizer",clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",additionalStyles:m,children:(0,qR.jsx)(Yfe.ResizableBox,{className:"block-editor-grid-item-resizer__box",size:{width:"100%",height:"100%"},enable:{bottom:c.bottom,bottomLeft:!1,bottomRight:!1,left:c.left,right:c.right,top:c.top,topLeft:!1,topRight:!1},bounds:t,boundsByDirection:!0,onPointerDown:({target:h,pointerId:p})=>{h.setPointerCapture(p)},onResizeStart:(h,p)=>{a(p)},onResizeStop:(h,p,g)=>{let b=parseFloat(Bo(r,"column-gap")),v=parseFloat(Bo(r,"row-gap")),k=Y_(Bo(r,"grid-template-columns"),b),y=Y_(Bo(r,"grid-template-rows"),v),S=new window.DOMRect(o.offsetLeft+g.offsetLeft,o.offsetTop+g.offsetTop,g.offsetWidth,g.offsetHeight),x=zc(k,S.left)+1,C=zc(y,S.top)+1,B=zc(k,S.right,"end")+1,I=zc(y,S.bottom,"end")+1;n({columnSpan:B-x+1,rowSpan:I-C+1,columnStart:i?x:void 0,rowStart:i?C:void 0})}})})}var ms=l(N(),1),Ok=l(A(),1);var qfe=l(F(),1),Zfe=l(Z(),1);var Nr=l(w(),1);function Vz({layout:e,parentLayout:t,onChange:o,gridClientId:r,blockClientId:n}){let{moveBlocksToPosition:i,__unstableMarkNextChangeAsNotPersistent:s}=(0,qfe.useDispatch)(_),a=e?.columnStart??1,c=e?.rowStart??1,u=e?.columnSpan??1,d=e?.rowSpan??1,f=a+u-1,m=c+d-1,h=t?.columnCount,p=t?.rowCount,g=np(r,h);return(0,Nr.jsx)(Mt,{group:"parent",children:(0,Nr.jsxs)(Ok.ToolbarGroup,{className:"block-editor-grid-item-mover__move-button-container",children:[(0,Nr.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-left",children:(0,Nr.jsx)(Q_,{icon:(0,ms.isRTL)()?Vo:Mr,label:(0,ms.__)("Move left"),description:(0,ms.__)("Move left"),isDisabled:a<=1,onClick:()=>{o({columnStart:a-1}),s(),i([n],r,r,g(a-1,c))}})}),(0,Nr.jsxs)("div",{className:"block-editor-grid-item-mover__move-vertical-button-container",children:[(0,Nr.jsx)(Q_,{className:"is-up-button",icon:xf,label:(0,ms.__)("Move up"),description:(0,ms.__)("Move up"),isDisabled:c<=1,onClick:()=>{o({rowStart:c-1}),s(),i([n],r,r,g(a,c-1))}}),(0,Nr.jsx)(Q_,{className:"is-down-button",icon:zn,label:(0,ms.__)("Move down"),description:(0,ms.__)("Move down"),isDisabled:p&&m>=p,onClick:()=>{o({rowStart:c+1}),s(),i([n],r,r,g(a,c+1))}})]}),(0,Nr.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-right",children:(0,Nr.jsx)(Q_,{icon:(0,ms.isRTL)()?Mr:Vo,label:(0,ms.__)("Move right"),description:(0,ms.__)("Move right"),isDisabled:h&&f>=h,onClick:()=>{o({columnStart:a+1}),s(),i([n],r,r,g(a+1,c))}})})]})})}function Q_({className:e,icon:t,label:o,isDisabled:r,onClick:n,description:i}){let a=`block-editor-grid-item-mover-button__description-${(0,Zfe.useInstanceId)(Q_)}`;return(0,Nr.jsxs)(Nr.Fragment,{children:[(0,Nr.jsx)(Ok.ToolbarButton,{className:V("block-editor-grid-item-mover-button",e),icon:t,label:o,"aria-describedby":a,onClick:r?null:n,disabled:r,accessibleWhenDisabled:!0}),(0,Nr.jsx)(Ok.VisuallyHidden,{id:a,children:i})]})}var J_=l(F(),1),XR=l(R(),1),ZR=l(Z(),1);function Fz({clientId:e}){let{gridLayout:t,blockOrder:o,selectedBlockLayout:r}=(0,J_.useSelect)(m=>{let{getBlockAttributes:h,getBlockOrder:p}=m(_),g=m(_).getSelectedBlock();return{gridLayout:h(e).layout??{},blockOrder:p(e),selectedBlockLayout:g?.attributes.style?.layout}},[e]),{getBlockAttributes:n,getBlockRootClientId:i}=(0,J_.useSelect)(_),{updateBlockAttributes:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,J_.useDispatch)(_),c=(0,XR.useMemo)(()=>r?new aa(r):null,[r]),u=(0,ZR.usePrevious)(c),d=(0,ZR.usePrevious)(t.isManualPlacement),f=(0,ZR.usePrevious)(o);(0,XR.useEffect)(()=>{let m={};if(t.isManualPlacement){let h=[];for(let g of o){let{columnStart:b,rowStart:v,columnSpan:k=1,rowSpan:y=1}=n(g).style?.layout??{};!b||!v||h.push(new aa({columnStart:b,rowStart:v,columnSpan:k,rowSpan:y}))}for(let g of o){let b=n(g),{columnStart:v,rowStart:k,columnSpan:y=1,rowSpan:S=1}=b.style?.layout??{};if(v&&k)continue;let[x,C]=jAe(h,t.columnCount,y,S,u?.columnEnd,u?.rowEnd);h.push(new aa({columnStart:x,rowStart:C,columnSpan:y,rowSpan:S})),m[g]={style:{...b.style,layout:{...b.style?.layout,columnStart:x,rowStart:C}}}}let p=Math.max(...h.map(g=>g.rowEnd));(!t.rowCount||t.rowCount<p)&&(m[e]={layout:{...t,rowCount:p}});for(let g of f??[])if(!o.includes(g)){let b=i(g);if(b===null||n(b)?.layout?.type==="grid")continue;let k=n(g),{columnStart:y,rowStart:S,columnSpan:x,rowSpan:C,...B}=k.style?.layout??{};if(y||S||x||C){let I=Object.keys(B).length===0;m[g]=pe(k,["style","layout"],I?void 0:B)}}}else{if(d===!0)for(let h of o){let p=n(h),{columnStart:g,rowStart:b,...v}=p.style?.layout??{};if(g||b){let k=Object.keys(v).length===0;m[h]=pe(p,["style","layout"],k?void 0:v)}}t.rowCount&&(m[e]={layout:{...t,rowCount:void 0}})}Object.keys(m).length&&(a(),s(Object.keys(m),m,!0))},[e,t,f,o,u,d,a,n,i,s])}function jAe(e,t,o,r,n=1,i=1){for(let s=i;;s++)for(let a=s===i?n:1;a<=t;a++){let c=new aa({columnStart:a,rowStart:s,columnSpan:o,rowSpan:r});if(!e.some(u=>u.intersectsRect(c)))return[a,s]}}var jc=l(w(),1),UAe={};function HAe({style:e}){let t=(0,zz.useSelect)(g=>!g(_).getSettings().disableLayoutStyles),o=e?.layout??{},{selfStretch:r,flexSize:n,columnStart:i,rowStart:s,columnSpan:a,rowSpan:c}=o,u=Uf()||{},{columnCount:d,minimumColumnWidth:f}=u,m=(0,Xfe.useInstanceId)(UAe),h=`.wp-container-content-${m}`,p="";if(t&&(r==="fixed"&&n?p=`${h} {
				flex-basis: ${n};
				box-sizing: border-box;
			}`:r==="fill"?p=`${h} {
				flex-grow: 1;
			}`:i&&a?p=`${h} {
				grid-column: ${i} / span ${a};
			}`:i?p=`${h} {
				grid-column: ${i};
			}`:a&&(p=`${h} {
				grid-column: span ${a};
			}`),s&&c?p+=`${h} {
				grid-row: ${s} / span ${c};
			}`:s?p+=`${h} {
				grid-row: ${s};
			}`:c&&(p+=`${h} {
				grid-row: span ${c};
			}`),(a||i)&&(f||!d))){let g=parseFloat(f);isNaN(g)&&(g=12);let b=f?.replace(g,"");["px","rem","em"].includes(b)||(b="rem");let v=2;a&&i?v=a+i-1:a?v=a:v=i;let k=b==="px"?24:1.5,y=v*g+(v-1)*k,S=g*2+k-1,x=a&&a>1?"1/-1":"auto";p+=`@container (max-width: ${Math.max(y,S)}${b}) {
				${h} {
					grid-column: ${x};
					grid-row: auto;
				}
			}`}if(Qn({css:p}),!!p)return{className:`wp-container-content-${m}`}}function GAe({clientId:e,style:t,setAttributes:o}){let r=Uf()||{},{type:n="default",allowSizingOnChildren:i=!1,isManualPlacement:s}=r;return n!=="grid"?null:(0,jc.jsx)(WAe,{clientId:e,style:t,setAttributes:o,allowSizingOnChildren:i,isManualPlacement:s,parentLayout:r})}function WAe({clientId:e,style:t,setAttributes:o,allowSizingOnChildren:r,isManualPlacement:n,parentLayout:i}){let{rootClientId:s,isVisible:a,parentBlockVisibility:c,blockBlockVisibility:u,deviceType:d,isChildBlockAGrid:f}=(0,zz.useSelect)(y=>{let{getBlockRootClientId:S,getBlockEditingMode:x,getTemplateLock:C,getBlockAttributes:B,getSettings:I}=y(_),P=S(e);if(C(P)||x(P)!=="default")return{rootClientId:P,isVisible:!1};let E=B(P),L=B(e),T=I();return{rootClientId:P,isVisible:!0,parentBlockVisibility:E?.metadata?.blockVisibility,blockBlockVisibility:L?.metadata?.blockVisibility,deviceType:T?.[wi]?.toLowerCase()||Et.desktop.value,isChildBlockAGrid:L?.layout?.type==="grid"}},[e]),{isBlockCurrentlyHidden:m}=Mi({blockVisibility:c,deviceType:d}),{isBlockCurrentlyHidden:h}=Mi({blockVisibility:u,deviceType:d}),[p,g]=(0,Qfe.useState)(),b=f?e:void 0;if(!a||m)return null;let v=r&&!h;function k(y){o({style:{...t,layout:{...t?.layout,...y}}})}return(0,jc.jsxs)(jc.Fragment,{children:[(0,jc.jsx)(Z_,{clientId:s,contentRef:g,parentLayout:i,childGridClientId:b}),v&&(0,jc.jsx)(Dz,{clientId:e,bounds:p,onChange:k,parentLayout:i}),n&&window.__experimentalEnableGridInteractivity&&(0,jc.jsx)(Vz,{layout:t?.layout,parentLayout:i,onChange:k,gridClientId:s,blockClientId:e})]})}var jz={useBlockProps:HAe,edit:GAe,attributeKeys:["style"],hasSupport(){return!0}};var Hz=l(ut(),1),Uz=l($(),1),Jfe="metadata";function $Ae(e){return e?.attributes?.[Jfe]?.type||(e.attributes={...e.attributes,[Jfe]:{type:"object"}}),e}function KAe(e,t,o,r){if(r.length===1&&e.innerBlocks.length===t.length||r.length===1&&t.length>1||r.length>1&&t.length===1||r.length>1&&t.length>1&&r.length!==t.length)return e;let n=t[o]?.attributes?.metadata;if(!n)return e;let i={};return n.noteId&&!e.attributes?.metadata?.noteId&&(i.noteId=n.noteId),n.name&&!e.attributes?.metadata?.name&&(0,Uz.hasBlockSupport)(e.name,"renaming",!0)&&(i.name=n.name),n.blockVisibility!==void 0&&!e.attributes?.metadata?.blockVisibility&&(0,Uz.hasBlockSupport)(e.name,"visibility",!0)&&(i.blockVisibility=n.blockVisibility),Object.keys(i).length>0?{...e,attributes:{...e.attributes,metadata:{...e.attributes.metadata,...i}}}:e}(0,Hz.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",$Ae);(0,Hz.addFilter)("blocks.switchToBlockType.transformedBlock","core/metadata/addTransforms",KAe);var Gz=l(N(),1),QR=l(R(),1),JR=l(A(),1),eO=l($(),1),Ak=l(F(),1);var ff=l(w(),1),YAe={};function qAe({name:e,clientId:t,metadata:{ignoredHookedBlocks:o=[]}={}}){let r=(0,Ak.useSelect)(h=>h(eO.store).getBlockTypes(),[]),n=(0,QR.useMemo)(()=>r?.filter(({name:h,blockHooks:p})=>p&&e in p||o.includes(h)),[r,e,o]),i=(0,Ak.useSelect)(h=>{let{getBlocks:p,getBlockRootClientId:g,getGlobalBlockCount:b}=h(_),v=g(t),k=n.reduce((y,S)=>{if(b(S.name)===0)return y;let x=S?.blockHooks?.[e],C;switch(x){case"before":case"after":C=p(v);break;case"first_child":case"last_child":C=p(t);break;case void 0:C=[...p(v),...p(t)];break}let B=C?.find(I=>I.name===S.name);return B?{...y,[S.name]:B.clientId}:y},{});return Object.values(k).length>0?k:YAe},[n,e,t]),{getBlockIndex:s,getBlockCount:a,getBlockRootClientId:c}=(0,Ak.useSelect)(_),{insertBlock:u,removeBlock:d}=(0,Ak.useDispatch)(_);if(!n.length)return null;let f=n.reduce((h,p)=>{let[g]=p.name.split("/");return h[g]||(h[g]=[]),h[g].push(p),h},{}),m=(h,p)=>{let g=s(t),b=a(t),v=c(t);switch(p){case"before":case"after":u(h,p==="after"?g+1:g,v,!1);break;case"first_child":case"last_child":u(h,p==="first_child"?0:b,t,!1);break;case void 0:u(h,g+1,v,!1);break}};return(0,ff.jsx)(fe,{children:(0,ff.jsxs)(JR.PanelBody,{className:"block-editor-hooks__block-hooks",title:(0,Gz.__)("Plugins"),initialOpen:!0,children:[(0,ff.jsx)("p",{className:"block-editor-hooks__block-hooks-helptext",children:(0,Gz.__)("Manage the inclusion of blocks added automatically by plugins.")}),Object.keys(f).map(h=>(0,ff.jsxs)(QR.Fragment,{children:[(0,ff.jsx)("h3",{children:h}),f[h].map(p=>{let g=p.name in i;return(0,ff.jsx)(JR.ToggleControl,{checked:g,label:p.title,onChange:()=>{if(!g){let b=p.blockHooks[e];m((0,eO.createBlock)(p.name),b);return}d(i[p.name],!1)}},p.title)})]},h))]})})}var eme={edit:qAe,attributeKeys:["metadata"],hasSupport(){return!0}};var Wz=l(N(),1),tme=l($(),1),Lk=l(A(),1),ome=l(F(),1),rme=l(R(),1),nme=l(Z(),1);var mf=l(w(),1),ZAe=()=>(0,nme.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},XAe=({name:e,metadata:t})=>{let o=(0,rme.useContext)(xr),{removeAllBlockBindings:r}=El(),n=ZAe(),{bindableAttributes:i,hasCompatibleFields:s}=(0,ome.useSelect)(c=>{let{__experimentalBlockBindingsSupportedAttributes:u}=c(_).getSettings(),{getAllBlockBindingsSources:d,getBlockBindingsSourceFieldsList:f}=M(c(tme.store));return{bindableAttributes:u?.[e],hasCompatibleFields:Object.values(d()).some(m=>f(m,o)?.length>0)}},[e,o]);if(!i||i.length===0)return null;let{bindings:a}=t||{};return a===void 0&&!s?null:(0,mf.jsx)(fe,{group:"bindings",children:(0,mf.jsxs)(Lk.__experimentalToolsPanel,{label:(0,Wz.__)("Attributes"),resetAll:()=>{r()},dropdownMenuProps:n,className:"block-editor-bindings__panel",children:[(0,mf.jsx)(Lk.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:i.map(c=>(0,mf.jsx)($v,{attribute:c,blockName:e,binding:a?.[c]},c))}),(0,mf.jsx)(Lk.__experimentalText,{as:"div",variant:"muted",children:(0,mf.jsx)("p",{children:(0,Wz.__)("Attributes connected to custom fields or other dynamic data.")})})]})})},ime={edit:XAe,attributeKeys:["metadata"],hasSupport(e){return!["core/post-date","core/navigation-link","core/navigation-submenu"].includes(e)}};var sme=l(N(),1),ame=l(A(),1),rO=l(F(),1),e0=l($(),1),lme=l(R(),1);var tO=l(F(),1);function oO(e){let{isOpened:t,expandRevision:o}=(0,tO.useSelect)(i=>{let{isListViewPanelOpened:s,getListViewExpandRevision:a}=M(i(_));return{isOpened:s(e),expandRevision:a()}},[e]),{__unstableToggleListViewPanel:r}=(0,tO.useDispatch)(_);return{isOpened:t,expandRevision:o,handleToggle:i=>{r(e,i)}}}var Nk=l(w(),1),QAe="listView";function cme(e){return(0,e0.hasBlockSupport)(e,QAe)}function JAe({clientId:e,name:t}){let{isSelectionWithinCurrentSection:o}=(0,lme.useContext)(ur),{isOpened:r,expandRevision:n,handleToggle:i}=oO(e),{openListViewContentPanel:s}=M((0,rO.useDispatch)(_)),a=cme(t),{hasChildren:c,isNestedListView:u}=(0,rO.useSelect)(h=>{let{getBlockCount:p,getBlockParents:g,getBlockName:b}=h(_),k=g(e,!1).find(y=>{let S=b(y);return S==="core/navigation"||(0,e0.hasBlockSupport)(S,"listView")});return{hasChildren:!!p(e),isNestedListView:k}},[e]),f=(0,e0.getBlockType)(t)?.title||t;return!a||u?null:(0,Nk.jsx)(Sm,{group:"list",children:(0,Nk.jsxs)(ame.PanelBody,{title:o?f:void 0,opened:r,onToggle:i,children:[!c&&(0,Nk.jsx)("p",{className:"block-editor-block-inspector__no-blocks",children:(0,sme.__)("No items yet.")}),(0,Nk.jsx)(NS,{rootClientId:e,isExpanded:!0,description:f,showAppender:!0,onSelect:s},`${e}-${n}`)]})})}var ume={edit:JAe,hasSupport:cme,attributeKeys:[],supportsPatternEditing:!0};var dme=l(ut(),1),fme=l($(),1);function eLe(e){return e.__experimentalLabel||(0,fme.hasBlockSupport)(e,"renaming",!0)&&(e.__experimentalLabel=(o,{context:r})=>{let{metadata:n}=o;if((r==="list-view"||r==="breadcrumb")&&n?.name)return n.name}),e}(0,dme.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",eLe);var mme=l(Z(),1),pme=l(ut(),1),hme=l(F(),1);var ps=l(w(),1);function tLe(e){Fz(e)}function oLe({clientId:e,layout:t}){let{isVisible:o,blockVisibility:r,deviceType:n,isAnyAncestorHidden:i}=(0,hme.useSelect)(a=>{let{isBlockSelected:c,hasSelectedInnerBlock:u,isDraggingBlocks:d,getTemplateLock:f,getBlockEditingMode:m,getBlockAttributes:h,getSettings:p}=a(_);if(!d()&&!c(e)||f(e)||m(e)!=="default"||u(e))return{isVisible:!1};let{isBlockParentHiddenAtViewport:g}=M(a(_)),b=h(e),k=p()?.[wi]?.toLowerCase()||Et.desktop.value;return{isVisible:!0,blockVisibility:b?.metadata?.blockVisibility,deviceType:k,isAnyAncestorHidden:g(e,k)}},[e]),{isBlockCurrentlyHidden:s}=Mi({blockVisibility:r,deviceType:n});return(0,ps.jsxs)(ps.Fragment,{children:[(0,ps.jsx)(tLe,{clientId:e}),o&&!s&&!i&&(0,ps.jsx)(Z_,{clientId:e,parentLayout:t})]})}var rLe=(0,mme.createHigherOrderComponent)(e=>function(o){return o.attributes.layout?.type!=="grid"?(0,ps.jsx)(e,{...o},"edit"):(0,ps.jsxs)(ps.Fragment,{children:[(0,ps.jsx)(oLe,{clientId:o.clientId,layout:o.attributes.layout}),(0,ps.jsx)(e,{...o},"edit")]})},"addGridVisualizerToBlockEdit");(0,pme.addFilter)("editor.BlockEdit","core/editor/grid-visualizer",rLe);var t0=l($(),1),bme=l(A(),1),kme=l(F(),1);var iO=l(R(),1),vme=l(N(),1);function gme(e){let t=[],o=[];return Object.entries(e).forEach(([r,n])=>{if(!n.autoGenerateControl)return;let i=nLe(r,n);i&&(t.push(i),o.push(r))}),{fields:t,form:{fields:o}}}function nLe(e,t){let o=t.type,r={id:e,label:t.label||e,type:o==="string"?"text":o};return t.enum&&Array.isArray(t.enum)&&(r.elements=t.enum.map(n=>({value:n,label:String(n)}))),r}var nO=l(w(),1);function iLe(e){return e?Object.values(e).some(t=>t?.autoGenerateControl):!1}function sLe({name:e,clientId:t,setAttributes:o}){let r=ao(),n=(0,iO.useContext)(xr),i=(0,kme.useSelect)(u=>{let d=u(_).getBlockAttributes(t);if(!d?.metadata?.bindings)return d;let{getBlockBindingsSource:f}=M(u(t0.store));return Object.entries(d.metadata.bindings).reduce((m,[h,p])=>{let g=f(p.source);if(!g)return m;let b=g.getValues({select:u,context:n,bindings:{[h]:p}});return{...m,...b}},d)},[n,t]),s=(0,t0.getBlockType)(e),{fields:a,form:c}=(0,iO.useMemo)(()=>s?.attributes?gme(s.attributes):{fields:[],form:{fields:[]}},[s?.attributes]);return r!=="default"||!a||a.length===0?null:(0,nO.jsx)(fe,{children:(0,nO.jsx)(bme.PanelBody,{title:(0,vme.__)("Settings"),children:(0,nO.jsx)(D_,{data:i,fields:a,form:c,onChange:o})})})}var yme={edit:sLe,attributeKeys:[],hasSupport(e){let t=(0,t0.getBlockType)(e);return iLe(t?.attributes)}};function $z(e){let{style:t}=e,o=t?.dimensions||{},r=bi({dimensions:o});return{className:o.aspectRatio?"has-aspect-ratio":void 0,style:r}}function sO(e){let t=e.style?.border||{};return{className:YF(e)||void 0,style:bi({border:t})}}function Kz(e){let{colors:t}=wd(),o=sO(e),{borderColor:r}=e;if(r){let n=lp({colors:t,namedColor:r});o.style.borderColor=n.color}return o}function Yz(e){let t=e.style?.shadow||"";return{style:bi({shadow:t})}}var qz=l(R(),1);function aO(e){let{backgroundColor:t,textColor:o,gradient:r,style:n}=e,i=_i("background-color",t),s=_i("color",o),a=th(r),c=a||n?.color?.gradient,u=V(s,a,{[i]:!c&&!!i,"has-text-color":o||n?.color?.text,"has-background":t||n?.color?.background||r||n?.color?.gradient,"has-link-color":n?.elements?.link?.color}),d=n?.color||{},f=bi({color:d});return{className:u||void 0,style:f}}function Zz(e){let{backgroundColor:t,textColor:o,gradient:r}=e,[n,i,s,a,c,u]=me("color.palette.custom","color.palette.theme","color.palette.default","color.gradients.custom","color.gradients.theme","color.gradients.default"),d=(0,qz.useMemo)(()=>[...n||[],...i||[],...s||[]],[n,i,s]),f=(0,qz.useMemo)(()=>[...a||[],...c||[],...u||[]],[a,c,u]),m=aO(e);if(t){let h=da(d,t);m.style.backgroundColor=h.color}if(r&&(m.style.background=Gw(f,r)),o){let h=da(d,o);m.style.color=h.color}return m}function Xz(e){let{style:t}=e,o=t?.spacing||{};return{style:bi({spacing:o})}}var Sme=l(A(),1);var{kebabCase:aLe}=M(Sme.privateApis);function Qz(e,t){let o=e?.style?.typography||{};o={...o,fontSize:ec({size:e?.style?.typography?.fontSize},t)};let r=bi({typography:o}),n=e?.fontFamily?`has-${aLe(e.fontFamily)}-font-family`:"",i=e?.style?.typography?.textAlign?`has-text-align-${e?.style?.typography?.textAlign}`:"";return{className:V(n,i,hu(e?.fontSize)),style:r}}var lO=l(R(),1);function Jz(e){let[t,o]=(0,lO.useState)(e);return(0,lO.useEffect)(()=>{e&&o(e)},[e]),t}dle([w2,NR,B4,hz,jR,WR,Pz,DR,uV,Hfe,eme,ime,jz,Ale,qde,ume,yme].filter(Boolean));fle([w2,NR,yae,jR,t4,Tfe,Pz,gz,kz,DR,qF,WR,uV,ZX,jz]);mle([w2,NR,B4,Dle,hz,qF,WR,DR,t4,jR,gz,kz]);var _me={button:"wp-element-button",caption:"wp-element-caption"},lLe=e=>_me[e]?_me[e]:"";var xme=()=>"";var Mk=l(R(),1),o0=l($(),1),t6=l(dr(),1);var wme=l(w(),1);function o6(e,t,o){if(e==null||e===!1)return;if(Array.isArray(e))return e6(e,t,o);switch(typeof e){case"string":case"number":return}let{type:r,props:n}=e;switch(r){case Mk.StrictMode:case Mk.Fragment:return e6(n.children,t,o);case Mk.RawHTML:return;case tS.Content:return Cme(t,o);case o_:t.push(n.value);return}switch(typeof r){case"string":return typeof n.children<"u"?e6(n.children,t,o):void 0;case"function":let i=r.prototype&&typeof r.prototype.render=="function"?new r(n).render():r(n);return o6(i,t,o)}}function e6(e,...t){e=Array.isArray(e)?e:[e];for(let o=0;o<e.length;o++)o6(e[o],...t)}function Cme(e,t){for(let o=0;o<t.length;o++){let{name:r,attributes:n,innerBlocks:i}=t[o],s=(0,o0.getSaveElement)(r,n,(0,wme.jsx)(tS.Content,{}));o6(s,e,i)}}function Bme(e=[]){o0.__unstableGetBlockProps.skipFilters=!0;let t=[];return Cme(t,e),o0.__unstableGetBlockProps.skipFilters=!1,t.map(o=>o instanceof t6.RichTextData?o:t6.RichTextData.fromHTMLString(o))}var Eme=l(A(),1);var r6=l(w(),1);function Tme({clientId:e,resizableBoxProps:t,...o}){return(0,r6.jsx)(Hi,{clientId:e,__unstablePopoverSlot:"block-toolbar",...o,children:(0,r6.jsx)(Eme.ResizableBox,{...t})})}var n0=l(R(),1),cO=l(F(),1),la=l(A(),1),r0=l(N(),1);var hs=l(w(),1);function Ime({rules:e}){let[t,o]=(0,n0.useState)(!1),{clientIds:r,selectPrevious:n,message:i}=(0,cO.useSelect)(p=>M(p(_)).getRemovalPromptData()),{clearBlockRemovalPrompt:s,setBlockRemovalRules:a,privateRemoveBlocks:c}=M((0,cO.useDispatch)(_));if((0,n0.useEffect)(()=>(a(e),()=>{a()}),[e,a]),(0,n0.useEffect)(()=>{o(!1)},[r]),!i)return;let u=typeof i=="object"&&i!==null,d=u?i.description:i,f=u&&i.requireConfirmation,m=f&&!t,h=()=>{c(r,n,!0),s()};return(0,hs.jsx)(la.Modal,{title:(0,r0.__)("Confirm deletion"),onRequestClose:s,size:"medium",children:(0,hs.jsxs)(la.__experimentalVStack,{spacing:4,children:[(0,hs.jsxs)("div",{children:[(0,hs.jsx)("p",{children:d}),u&&(i.warning||i.subtext)&&(0,hs.jsxs)("p",{children:[i.warning&&(0,hs.jsx)("strong",{children:i.warning}),i.warning&&i.subtext&&" ",i.subtext]})]}),f&&(0,hs.jsx)(la.CheckboxControl,{label:(0,r0.__)("I understand the consequences"),checked:t,onChange:o}),(0,hs.jsxs)(la.__experimentalHStack,{justify:"right",children:[(0,hs.jsx)(la.Button,{variant:"tertiary",onClick:s,__next40pxDefaultSize:!0,children:(0,r0.__)("Cancel")}),(0,hs.jsx)(la.Button,{variant:"primary",onClick:h,disabled:m,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,r0.__)("Delete")})]})]})})}var n6=l(R(),1);var Dk=l(A(),1),Rme=l(R(),1),Vn=l(N(),1),uO=l(w(),1),Pme=[{value:"fill",label:(0,Vn._x)("Fill","Scale option for dimensions control"),help:(0,Vn.__)("Fill the space by stretching the content.")},{value:"contain",label:(0,Vn._x)("Contain","Scale option for dimensions control"),help:(0,Vn.__)("Fit the content to the space without clipping.")},{value:"cover",label:(0,Vn._x)("Cover","Scale option for dimensions control"),help:(0,Vn.__)("Fill the space by clipping what doesn't fit.")},{value:"none",label:(0,Vn._x)("None","Scale option for dimensions control"),help:(0,Vn.__)("Do not adjust the sizing of the content. Content that is too large will be clipped, and content that is too small will have additional padding.")},{value:"scale-down",label:(0,Vn._x)("Scale down","Scale option for dimensions control"),help:(0,Vn.__)("Scale down the content to fit the space if it is too big. Content that is too small will have additional padding.")}];function Ome({panelId:e,value:t,onChange:o,options:r=Pme,defaultValue:n=Pme[0].value,isShownByDefault:i=!0}){let s=t??"fill",a=(0,Rme.useMemo)(()=>r.reduce((c,u)=>(c[u.value]=u.help,c),{}),[r]);return(0,uO.jsx)(Dk.__experimentalToolsPanelItem,{label:(0,Vn._x)("Scale","Image scaling options"),isShownByDefault:i,hasValue:()=>s!==n,onDeselect:()=>o(n),panelId:e,children:(0,uO.jsx)(Dk.__experimentalToggleGroupControl,{label:(0,Vn._x)("Scale","Image scaling options"),isBlock:!0,help:a[s],value:s,onChange:o,size:"__unstable-large",children:r.map(c=>(0,uO.jsx)(Dk.__experimentalToggleGroupControlOption,{...c},c.value))})})}var Vk=l(A(),1),wp=l(N(),1),Uc=l(w(),1);function Ame({panelId:e,value:t={},onChange:o=()=>{},units:r,isShownByDefault:n=!0}){let i=t.width==="auto"?"":t.width??"",s=t.height==="auto"?"":t.height??"",a=c=>u=>{let d={...t};u?d[c]=u:delete d[c],o(d)};return(0,Uc.jsxs)(Uc.Fragment,{children:[(0,Uc.jsx)(Vk.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,wp.__)("Width"),isShownByDefault:n,hasValue:()=>i!=="",onDeselect:a("width"),panelId:e,children:(0,Uc.jsx)(Vk.__experimentalUnitControl,{label:(0,wp.__)("Width"),placeholder:(0,wp.__)("Auto"),labelPosition:"top",units:r,min:0,value:i,onChange:a("width"),size:"__unstable-large"})}),(0,Uc.jsx)(Vk.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,wp.__)("Height"),isShownByDefault:n,hasValue:()=>s!=="",onDeselect:a("height"),panelId:e,children:(0,Uc.jsx)(Vk.__experimentalUnitControl,{label:(0,wp.__)("Height"),placeholder:(0,wp.__)("Auto"),labelPosition:"top",units:r,min:0,value:s,onChange:a("height"),size:"__unstable-large"})})]})}var pf=l(w(),1);function cLe({panelId:e,value:t={},onChange:o=()=>{},aspectRatioOptions:r,defaultAspectRatio:n="auto",scaleOptions:i,defaultScale:s="fill",unitsOptions:a,tools:c=["aspectRatio","widthHeight","scale"]}){let u=t.width===void 0||t.width==="auto"?null:t.width,d=t.height===void 0||t.height==="auto"?null:t.height,f=t.aspectRatio===void 0||t.aspectRatio==="auto"?null:t.aspectRatio,m=t.scale===void 0||t.scale==="fill"?null:t.scale,[h,p]=(0,n6.useState)(m),[g,b]=(0,n6.useState)(f),v=u&&d?"custom":g,k=f||u&&d;return(0,pf.jsxs)(pf.Fragment,{children:[c.includes("aspectRatio")&&(0,pf.jsx)(NP,{panelId:e,options:r,defaultValue:n,value:v,onChange:y=>{let S={...t};y=y==="auto"?null:y,b(y),y?S.aspectRatio=y:delete S.aspectRatio,y?h?S.scale=h:(S.scale=s,p(s)):delete S.scale,y!=="custom"&&u&&d&&delete S.height,o(S)}}),c.includes("widthHeight")&&(0,pf.jsx)(Ame,{panelId:e,units:a,value:{width:u,height:d},onChange:({width:y,height:S})=>{let x={...t};y=y==="auto"?null:y,S=S==="auto"?null:S,y?x.width=y:delete x.width,S?x.height=S:delete x.height,y&&S?delete x.aspectRatio:g&&(x.aspectRatio=g),!g&&!!y!=!!S?delete x.scale:h?x.scale=h:(x.scale=s,p(s)),o(x)}}),c.includes("scale")&&k&&(0,pf.jsx)(Ome,{panelId:e,options:i,defaultValue:s,value:h,onChange:y=>{let S={...t};y=y==="fill"?null:y,p(y),y?S.scale=y:delete S.scale,o(S)}})]})}var Lme=cLe;var dO=l(A(),1),Hc=l(N(),1),i6=l(w(),1),Nme=[{label:(0,Hc._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,Hc._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,Hc._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,Hc._x)("Full Size","Image size option for resolution control"),value:"full"}];function Mme({panelId:e,value:t,onChange:o,options:r=Nme,defaultValue:n=Nme[0].value,isShownByDefault:i=!0,resetAllFilter:s}){let a=t??n;return(0,i6.jsx)(dO.__experimentalToolsPanelItem,{hasValue:()=>a!==n,label:(0,Hc.__)("Resolution"),onDeselect:()=>o(n),isShownByDefault:i,panelId:e,resetAllFilter:s,children:(0,i6.jsx)(dO.SelectControl,{label:(0,Hc.__)("Resolution"),value:a,options:r,onChange:o,help:(0,Hc.__)("Select the size of the source image."),size:"__unstable-large"})})}var Cp=l(N(),1),Fk=l(A(),1),Vme=l(F(),1);var ca=l(N(),1),Dme={a:(0,ca.__)("The <a> element should be used for links that navigate to a different page or to a different section within the same page."),article:(0,ca.__)("The <article> element should represent a self-contained, syndicatable portion of the document."),aside:(0,ca.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."),button:(0,ca.__)("The <button> element should be used for interactive controls that perform an action on the current page, such as opening a modal or toggling content visibility."),div:(0,ca.__)("The <div> element should only be used if the block is a design element with no semantic meaning."),footer:(0,ca.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.)."),header:(0,ca.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,ca.__)("The <main> element should be used for the primary content of your document only."),nav:(0,ca.__)("The <nav> element should be used to identify groups of links that are intended to be used for website or page content navigation."),section:(0,ca.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element.")};var i0=l(w(),1);function Fme({tagName:e,onChange:t,clientId:o,options:r=[{label:(0,Cp.__)("Default (<div>)"),value:"div"},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"}]}){let n=!!o&&r.some(a=>a.value==="main"),i=(0,Vme.useSelect)(a=>{if(!n)return!1;let{getClientIdsWithDescendants:c,getBlockAttributes:u}=a(_);return c().some(d=>d===o?!1:u(d)?.tagName==="main")},[o,n]),s=r.map(a=>a.value==="main"&&i&&e!=="main"?{...a,disabled:!0,label:(0,Cp.sprintf)((0,Cp.__)("%s (Already in use)"),a.label)}:a);return(0,i0.jsxs)(Fk.__experimentalVStack,{spacing:2,className:"block-editor-html-element-control",children:[(0,i0.jsx)(Fk.SelectControl,{__next40pxDefaultSize:!0,label:(0,Cp.__)("HTML element"),options:s,value:e,onChange:t,help:Dme[e]}),e==="main"&&i&&(0,i0.jsx)(Fk.Notice,{status:"warning",isDismissible:!1,children:(0,Cp.__)("Multiple <main> elements detected. The duplicate may be in your content or template. This is not valid HTML and may cause accessibility issues. Please change this HTML element.")})]})}var gs=l(A(),1),zk=l(R(),1),fO=l(N(),1);var Fn=l(A(),1);var zme=l(Fe(),1);var vi=l(w(),1),{Badge:uLe}=M(Fn.privateApis);function jme({title:e,url:t,image:o,badges:r}){return(0,vi.jsxs)(Fn.__experimentalHStack,{justify:"space-between",alignment:"top",children:[(0,vi.jsx)(Fn.FlexItem,{className:"link-preview-button__content",children:(0,vi.jsxs)(Fn.__experimentalHStack,{alignment:"top",children:[o&&(0,vi.jsx)(Fn.FlexItem,{className:"link-preview-button__image-container",children:(0,vi.jsx)("img",{className:"link-preview-button__image",src:o,alt:""})}),(0,vi.jsxs)(Fn.__experimentalVStack,{className:"link-preview-button__details",alignment:"topLeft",children:[(0,vi.jsx)(Fn.__experimentalTruncate,{numberOfLines:1,className:"link-preview-button__title",children:(0,zme.__unstableStripHTML)(e)}),t&&(0,vi.jsx)(Fn.__experimentalTruncate,{numberOfLines:1,className:"link-preview-button__hint",children:t}),r&&r.length>0&&(0,vi.jsx)(Fn.__experimentalHStack,{className:"link-preview-button__badges",alignment:"left",children:r.map(n=>(0,vi.jsx)(uLe,{intent:n.intent,children:n.label},`${n.label}|${n.intent}`))})]})]})}),(0,vi.jsx)(we,{icon:zn,className:"link-preview-button__icon"})]})}var yi=l(w(),1);function s6({preview:e,onSelect:t,suggestionsQuery:o,label:r,help:n}){let[i,s]=(0,zk.useState)(!1),a=(0,zk.useId)(),c=`link-picker-title-${a}`,u=`link-picker-description-${a}`,d=(0,zk.useRef)(null),{baseControlProps:f,controlProps:m}=(0,gs.useBaseControlProps)({help:n}),h=p=>{if(s(!1),p){let g={url:p.url,kind:p.kind,type:p.type,id:p.id,title:p.title};t(g)}};return(0,yi.jsxs)(gs.BaseControl,{...f,children:[(0,yi.jsx)(gs.BaseControl.VisualLabel,{children:r}),(0,yi.jsxs)(gs.Button,{ref:d,onClick:()=>s(!i),"aria-haspopup":"dialog","aria-expanded":i,"aria-describedby":m["aria-describedby"],variant:"secondary",__next40pxDefaultSize:!0,className:"link-preview-button",children:[r&&(0,yi.jsxs)(gs.VisuallyHidden,{children:[r,":"]}),(0,yi.jsx)(jme,{title:e.title||(0,fO.__)("Add link"),url:e.url,image:e.image,badges:e.badges})]}),i&&(0,yi.jsx)(gs.Popover,{anchor:d.current,onClose:()=>s(!1),placement:"left-start",offset:36,shift:!0,children:(0,yi.jsxs)("div",{role:"dialog","aria-labelledby":c,"aria-describedby":u,children:[(0,yi.jsxs)(gs.VisuallyHidden,{children:[(0,yi.jsx)("h2",{id:c,children:(0,fO.__)("Select a link")}),(0,yi.jsx)("p",{id:u,children:(0,fO.__)("Search for and add a link to the navigation item.")})]}),(0,yi.jsx)(Pd,{value:null,onChange:h,suggestionsQuery:o,showInitialSuggestions:!0,forceIsEditingLink:!0,settings:[]})]})})]})}var a6={};T6(a6,{...WF,ExperimentalBlockCanvas:r3,BlockCanvasCover:xT,ExperimentalBlockEditorProvider:Ph,getDuotoneFilter:UR,getRichTextValues:Bme,PrivateQuickInserter:IB,extractWords:Yw,getNormalizedSearchTerms:Fv,normalizeString:Vv,PrivateListView:NS,ResizableBoxPopover:Tme,InspectorControlsLastItem:k2,useHasBlockToolbar:qE,cleanEmptyObject:Me,usePrivateStyleOverride:tc,BlockQuickNavigation:g2,LayoutStyle:pH,BlockManager:B2,BlockRemovalWarningModal:Ime,useLayoutClasses:YR,useLayoutStyles:Nz,DimensionsTool:Lme,ResolutionTool:Mme,TabbedSidebar:CB,TextAlignmentControl:PP,usesContextKey:vF,useFlashEditableBlocks:o1,HTMLElementControl:Fme,useZoomOut:Gy,globalStylesDataKey:xi,globalStylesLinksDataKey:y0,selectBlockPatternsKey:qc,requiresWrapperOnCopy:VD,PrivateRichText:r_,PrivateInserterLibrary:l4,reusableBlocksSelectKey:S0,PrivateBlockPopover:pm,PrivatePublishDateTimePicker:g4,useSpacingSizes:fP,useBlockDisplayTitle:zr,__unstableBlockStyleVariationOverridesWithConfig:UV,setBackgroundStyleDefaults:a2,sectionRootClientIdKey:Zc,CommentIconSlotFill:CE,CommentIconToolbarSlotFill:UE,mediaEditKey:_0,getMediaSelectKey:x0,deviceTypeKey:wi,isIsolatedEditorKey:Xc,isNavigationOverlayContextKey:w0,mediaUploadOnSuccessKey:C0,useBlockElement:Xe,useBlockElementRef:$f,LinkPicker:s6,useRemoteUrlData:MI,PrivateBlockContext:ur,useListViewPanelState:oO,isHashLink:gf,isRelativePath:bf});return qme(dLe);})();
/*! Bundled license information:

autosize/dist/autosize.js:
  (*!
  	autosize 4.0.2
  	license: MIT
  	http://www.jacklmoore.com/autosize
  *)

normalize-wheel/src/isEventSupported.js:
  (**
   * Checks if an event is supported in the current execution environment.
   *
   * NOTE: This will not work correctly for non-generic events such as `change`,
   * `reset`, `load`, `error`, and `select`.
   *
   * Borrows from Modernizr.
   *
   * @param {string} eventNameSuffix Event name, e.g. "click".
   * @param {?boolean} capture Check if the capture phase is supported.
   * @return {boolean} True if the event is supported.
   * @internal
   * @license Modernizr 3.0.0pre (Custom Build) | MIT
   *)
*/
                                                                                                                                                                                                                                                                                                                                               dist/block-library.js                                                                               0000644                 00012212404 15212563763 0010621 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).blockLibrary = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __require = /* @__PURE__ */ ((x2) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x2, {
    get: (a2, b2) => (typeof require !== "undefined" ? require : a2)[b2]
  }) : x2)(function(x2) {
    if (typeof require !== "undefined") return require.apply(this, arguments);
    throw Error('Dynamic require of "' + x2 + '" is not supported');
  });
  var __commonJS = (cb, mod) => function __require2() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name123 in all)
      __defProp(target, name123, { get: all[name123], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/blocks
  var require_blocks = __commonJS({
    "package-external:@wordpress/blocks"(exports, module) {
      module.exports = window.wp.blocks;
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/block-editor
  var require_block_editor = __commonJS({
    "package-external:@wordpress/block-editor"(exports, module) {
      module.exports = window.wp.blockEditor;
    }
  });

  // package-external:@wordpress/server-side-render
  var require_server_side_render = __commonJS({
    "package-external:@wordpress/server-side-render"(exports, module) {
      module.exports = window.wp.serverSideRender;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // node_modules/html-dom-parser/node_modules/domelementtype/lib/index.js
  var require_lib = __commonJS({
    "node_modules/html-dom-parser/node_modules/domelementtype/lib/index.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.Doctype = exports.CDATA = exports.Tag = exports.Style = exports.Script = exports.Comment = exports.Directive = exports.Text = exports.Root = exports.isTag = exports.ElementType = void 0;
      var ElementType;
      (function(ElementType2) {
        ElementType2["Root"] = "root";
        ElementType2["Text"] = "text";
        ElementType2["Directive"] = "directive";
        ElementType2["Comment"] = "comment";
        ElementType2["Script"] = "script";
        ElementType2["Style"] = "style";
        ElementType2["Tag"] = "tag";
        ElementType2["CDATA"] = "cdata";
        ElementType2["Doctype"] = "doctype";
      })(ElementType = exports.ElementType || (exports.ElementType = {}));
      function isTag(elem) {
        return elem.type === ElementType.Tag || elem.type === ElementType.Script || elem.type === ElementType.Style;
      }
      exports.isTag = isTag;
      exports.Root = ElementType.Root;
      exports.Text = ElementType.Text;
      exports.Directive = ElementType.Directive;
      exports.Comment = ElementType.Comment;
      exports.Script = ElementType.Script;
      exports.Style = ElementType.Style;
      exports.Tag = ElementType.Tag;
      exports.CDATA = ElementType.CDATA;
      exports.Doctype = ElementType.Doctype;
    }
  });

  // node_modules/html-dom-parser/node_modules/domhandler/lib/node.js
  var require_node = __commonJS({
    "node_modules/html-dom-parser/node_modules/domhandler/lib/node.js"(exports) {
      "use strict";
      var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
        var extendStatics = function(d2, b2) {
          extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
            d3.__proto__ = b3;
          } || function(d3, b3) {
            for (var p2 in b3) if (Object.prototype.hasOwnProperty.call(b3, p2)) d3[p2] = b3[p2];
          };
          return extendStatics(d2, b2);
        };
        return function(d2, b2) {
          if (typeof b2 !== "function" && b2 !== null)
            throw new TypeError("Class extends value " + String(b2) + " is not a constructor or null");
          extendStatics(d2, b2);
          function __268() {
            this.constructor = d2;
          }
          d2.prototype = b2 === null ? Object.create(b2) : (__268.prototype = b2.prototype, new __268());
        };
      })();
      var __assign2 = exports && exports.__assign || function() {
        __assign2 = Object.assign || function(t2) {
          for (var s2, i2 = 1, n2 = arguments.length; i2 < n2; i2++) {
            s2 = arguments[i2];
            for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2))
              t2[p2] = s2[p2];
          }
          return t2;
        };
        return __assign2.apply(this, arguments);
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.cloneNode = exports.hasChildren = exports.isDocument = exports.isDirective = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = exports.Element = exports.Document = exports.CDATA = exports.NodeWithChildren = exports.ProcessingInstruction = exports.Comment = exports.Text = exports.DataNode = exports.Node = void 0;
      var domelementtype_1 = require_lib();
      var Node = (
        /** @class */
        (function() {
          function Node2() {
            this.parent = null;
            this.prev = null;
            this.next = null;
            this.startIndex = null;
            this.endIndex = null;
          }
          Object.defineProperty(Node2.prototype, "parentNode", {
            // Read-write aliases for properties
            /**
             * Same as {@link parent}.
             * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
             */
            get: function() {
              return this.parent;
            },
            set: function(parent) {
              this.parent = parent;
            },
            enumerable: false,
            configurable: true
          });
          Object.defineProperty(Node2.prototype, "previousSibling", {
            /**
             * Same as {@link prev}.
             * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
             */
            get: function() {
              return this.prev;
            },
            set: function(prev) {
              this.prev = prev;
            },
            enumerable: false,
            configurable: true
          });
          Object.defineProperty(Node2.prototype, "nextSibling", {
            /**
             * Same as {@link next}.
             * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
             */
            get: function() {
              return this.next;
            },
            set: function(next) {
              this.next = next;
            },
            enumerable: false,
            configurable: true
          });
          Node2.prototype.cloneNode = function(recursive) {
            if (recursive === void 0) {
              recursive = false;
            }
            return cloneNode(this, recursive);
          };
          return Node2;
        })()
      );
      exports.Node = Node;
      var DataNode = (
        /** @class */
        (function(_super) {
          __extends(DataNode2, _super);
          function DataNode2(data) {
            var _this = _super.call(this) || this;
            _this.data = data;
            return _this;
          }
          Object.defineProperty(DataNode2.prototype, "nodeValue", {
            /**
             * Same as {@link data}.
             * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
             */
            get: function() {
              return this.data;
            },
            set: function(data) {
              this.data = data;
            },
            enumerable: false,
            configurable: true
          });
          return DataNode2;
        })(Node)
      );
      exports.DataNode = DataNode;
      var Text4 = (
        /** @class */
        (function(_super) {
          __extends(Text5, _super);
          function Text5() {
            var _this = _super !== null && _super.apply(this, arguments) || this;
            _this.type = domelementtype_1.ElementType.Text;
            return _this;
          }
          Object.defineProperty(Text5.prototype, "nodeType", {
            get: function() {
              return 3;
            },
            enumerable: false,
            configurable: true
          });
          return Text5;
        })(DataNode)
      );
      exports.Text = Text4;
      var Comment2 = (
        /** @class */
        (function(_super) {
          __extends(Comment3, _super);
          function Comment3() {
            var _this = _super !== null && _super.apply(this, arguments) || this;
            _this.type = domelementtype_1.ElementType.Comment;
            return _this;
          }
          Object.defineProperty(Comment3.prototype, "nodeType", {
            get: function() {
              return 8;
            },
            enumerable: false,
            configurable: true
          });
          return Comment3;
        })(DataNode)
      );
      exports.Comment = Comment2;
      var ProcessingInstruction2 = (
        /** @class */
        (function(_super) {
          __extends(ProcessingInstruction3, _super);
          function ProcessingInstruction3(name123, data) {
            var _this = _super.call(this, data) || this;
            _this.name = name123;
            _this.type = domelementtype_1.ElementType.Directive;
            return _this;
          }
          Object.defineProperty(ProcessingInstruction3.prototype, "nodeType", {
            get: function() {
              return 1;
            },
            enumerable: false,
            configurable: true
          });
          return ProcessingInstruction3;
        })(DataNode)
      );
      exports.ProcessingInstruction = ProcessingInstruction2;
      var NodeWithChildren = (
        /** @class */
        (function(_super) {
          __extends(NodeWithChildren2, _super);
          function NodeWithChildren2(children) {
            var _this = _super.call(this) || this;
            _this.children = children;
            return _this;
          }
          Object.defineProperty(NodeWithChildren2.prototype, "firstChild", {
            // Aliases
            /** First child of the node. */
            get: function() {
              var _a;
              return (_a = this.children[0]) !== null && _a !== void 0 ? _a : null;
            },
            enumerable: false,
            configurable: true
          });
          Object.defineProperty(NodeWithChildren2.prototype, "lastChild", {
            /** Last child of the node. */
            get: function() {
              return this.children.length > 0 ? this.children[this.children.length - 1] : null;
            },
            enumerable: false,
            configurable: true
          });
          Object.defineProperty(NodeWithChildren2.prototype, "childNodes", {
            /**
             * Same as {@link children}.
             * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
             */
            get: function() {
              return this.children;
            },
            set: function(children) {
              this.children = children;
            },
            enumerable: false,
            configurable: true
          });
          return NodeWithChildren2;
        })(Node)
      );
      exports.NodeWithChildren = NodeWithChildren;
      var CDATA = (
        /** @class */
        (function(_super) {
          __extends(CDATA2, _super);
          function CDATA2() {
            var _this = _super !== null && _super.apply(this, arguments) || this;
            _this.type = domelementtype_1.ElementType.CDATA;
            return _this;
          }
          Object.defineProperty(CDATA2.prototype, "nodeType", {
            get: function() {
              return 4;
            },
            enumerable: false,
            configurable: true
          });
          return CDATA2;
        })(NodeWithChildren)
      );
      exports.CDATA = CDATA;
      var Document = (
        /** @class */
        (function(_super) {
          __extends(Document2, _super);
          function Document2() {
            var _this = _super !== null && _super.apply(this, arguments) || this;
            _this.type = domelementtype_1.ElementType.Root;
            return _this;
          }
          Object.defineProperty(Document2.prototype, "nodeType", {
            get: function() {
              return 9;
            },
            enumerable: false,
            configurable: true
          });
          return Document2;
        })(NodeWithChildren)
      );
      exports.Document = Document;
      var Element2 = (
        /** @class */
        (function(_super) {
          __extends(Element3, _super);
          function Element3(name123, attribs, children, type) {
            if (children === void 0) {
              children = [];
            }
            if (type === void 0) {
              type = name123 === "script" ? domelementtype_1.ElementType.Script : name123 === "style" ? domelementtype_1.ElementType.Style : domelementtype_1.ElementType.Tag;
            }
            var _this = _super.call(this, children) || this;
            _this.name = name123;
            _this.attribs = attribs;
            _this.type = type;
            return _this;
          }
          Object.defineProperty(Element3.prototype, "nodeType", {
            get: function() {
              return 1;
            },
            enumerable: false,
            configurable: true
          });
          Object.defineProperty(Element3.prototype, "tagName", {
            // DOM Level 1 aliases
            /**
             * Same as {@link name}.
             * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
             */
            get: function() {
              return this.name;
            },
            set: function(name123) {
              this.name = name123;
            },
            enumerable: false,
            configurable: true
          });
          Object.defineProperty(Element3.prototype, "attributes", {
            get: function() {
              var _this = this;
              return Object.keys(this.attribs).map(function(name123) {
                var _a, _b;
                return {
                  name: name123,
                  value: _this.attribs[name123],
                  namespace: (_a = _this["x-attribsNamespace"]) === null || _a === void 0 ? void 0 : _a[name123],
                  prefix: (_b = _this["x-attribsPrefix"]) === null || _b === void 0 ? void 0 : _b[name123]
                };
              });
            },
            enumerable: false,
            configurable: true
          });
          return Element3;
        })(NodeWithChildren)
      );
      exports.Element = Element2;
      function isTag(node) {
        return (0, domelementtype_1.isTag)(node);
      }
      exports.isTag = isTag;
      function isCDATA(node) {
        return node.type === domelementtype_1.ElementType.CDATA;
      }
      exports.isCDATA = isCDATA;
      function isText(node) {
        return node.type === domelementtype_1.ElementType.Text;
      }
      exports.isText = isText;
      function isComment(node) {
        return node.type === domelementtype_1.ElementType.Comment;
      }
      exports.isComment = isComment;
      function isDirective(node) {
        return node.type === domelementtype_1.ElementType.Directive;
      }
      exports.isDirective = isDirective;
      function isDocument(node) {
        return node.type === domelementtype_1.ElementType.Root;
      }
      exports.isDocument = isDocument;
      function hasChildren(node) {
        return Object.prototype.hasOwnProperty.call(node, "children");
      }
      exports.hasChildren = hasChildren;
      function cloneNode(node, recursive) {
        if (recursive === void 0) {
          recursive = false;
        }
        var result;
        if (isText(node)) {
          result = new Text4(node.data);
        } else if (isComment(node)) {
          result = new Comment2(node.data);
        } else if (isTag(node)) {
          var children = recursive ? cloneChildren(node.children) : [];
          var clone_1 = new Element2(node.name, __assign2({}, node.attribs), children);
          children.forEach(function(child) {
            return child.parent = clone_1;
          });
          if (node.namespace != null) {
            clone_1.namespace = node.namespace;
          }
          if (node["x-attribsNamespace"]) {
            clone_1["x-attribsNamespace"] = __assign2({}, node["x-attribsNamespace"]);
          }
          if (node["x-attribsPrefix"]) {
            clone_1["x-attribsPrefix"] = __assign2({}, node["x-attribsPrefix"]);
          }
          result = clone_1;
        } else if (isCDATA(node)) {
          var children = recursive ? cloneChildren(node.children) : [];
          var clone_2 = new CDATA(children);
          children.forEach(function(child) {
            return child.parent = clone_2;
          });
          result = clone_2;
        } else if (isDocument(node)) {
          var children = recursive ? cloneChildren(node.children) : [];
          var clone_3 = new Document(children);
          children.forEach(function(child) {
            return child.parent = clone_3;
          });
          if (node["x-mode"]) {
            clone_3["x-mode"] = node["x-mode"];
          }
          result = clone_3;
        } else if (isDirective(node)) {
          var instruction = new ProcessingInstruction2(node.name, node.data);
          if (node["x-name"] != null) {
            instruction["x-name"] = node["x-name"];
            instruction["x-publicId"] = node["x-publicId"];
            instruction["x-systemId"] = node["x-systemId"];
          }
          result = instruction;
        } else {
          throw new Error("Not implemented yet: ".concat(node.type));
        }
        result.startIndex = node.startIndex;
        result.endIndex = node.endIndex;
        if (node.sourceCodeLocation != null) {
          result.sourceCodeLocation = node.sourceCodeLocation;
        }
        return result;
      }
      exports.cloneNode = cloneNode;
      function cloneChildren(childs) {
        var children = childs.map(function(child) {
          return cloneNode(child, true);
        });
        for (var i2 = 1; i2 < children.length; i2++) {
          children[i2].prev = children[i2 - 1];
          children[i2 - 1].next = children[i2];
        }
        return children;
      }
    }
  });

  // node_modules/html-dom-parser/node_modules/domhandler/lib/index.js
  var require_lib2 = __commonJS({
    "node_modules/html-dom-parser/node_modules/domhandler/lib/index.js"(exports) {
      "use strict";
      var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o2, m2, k2, k22) {
        if (k22 === void 0) k22 = k2;
        var desc = Object.getOwnPropertyDescriptor(m2, k2);
        if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
          desc = { enumerable: true, get: function() {
            return m2[k2];
          } };
        }
        Object.defineProperty(o2, k22, desc);
      }) : (function(o2, m2, k2, k22) {
        if (k22 === void 0) k22 = k2;
        o2[k22] = m2[k2];
      }));
      var __exportStar = exports && exports.__exportStar || function(m2, exports2) {
        for (var p2 in m2) if (p2 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p2)) __createBinding(exports2, m2, p2);
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.DomHandler = void 0;
      var domelementtype_1 = require_lib();
      var node_js_1 = require_node();
      __exportStar(require_node(), exports);
      var defaultOpts = {
        withStartIndices: false,
        withEndIndices: false,
        xmlMode: false
      };
      var DomHandler = (
        /** @class */
        (function() {
          function DomHandler2(callback, options2, elementCB) {
            this.dom = [];
            this.root = new node_js_1.Document(this.dom);
            this.done = false;
            this.tagStack = [this.root];
            this.lastNode = null;
            this.parser = null;
            if (typeof options2 === "function") {
              elementCB = options2;
              options2 = defaultOpts;
            }
            if (typeof callback === "object") {
              options2 = callback;
              callback = void 0;
            }
            this.callback = callback !== null && callback !== void 0 ? callback : null;
            this.options = options2 !== null && options2 !== void 0 ? options2 : defaultOpts;
            this.elementCB = elementCB !== null && elementCB !== void 0 ? elementCB : null;
          }
          DomHandler2.prototype.onparserinit = function(parser) {
            this.parser = parser;
          };
          DomHandler2.prototype.onreset = function() {
            this.dom = [];
            this.root = new node_js_1.Document(this.dom);
            this.done = false;
            this.tagStack = [this.root];
            this.lastNode = null;
            this.parser = null;
          };
          DomHandler2.prototype.onend = function() {
            if (this.done)
              return;
            this.done = true;
            this.parser = null;
            this.handleCallback(null);
          };
          DomHandler2.prototype.onerror = function(error) {
            this.handleCallback(error);
          };
          DomHandler2.prototype.onclosetag = function() {
            this.lastNode = null;
            var elem = this.tagStack.pop();
            if (this.options.withEndIndices) {
              elem.endIndex = this.parser.endIndex;
            }
            if (this.elementCB)
              this.elementCB(elem);
          };
          DomHandler2.prototype.onopentag = function(name123, attribs) {
            var type = this.options.xmlMode ? domelementtype_1.ElementType.Tag : void 0;
            var element = new node_js_1.Element(name123, attribs, void 0, type);
            this.addNode(element);
            this.tagStack.push(element);
          };
          DomHandler2.prototype.ontext = function(data) {
            var lastNode = this.lastNode;
            if (lastNode && lastNode.type === domelementtype_1.ElementType.Text) {
              lastNode.data += data;
              if (this.options.withEndIndices) {
                lastNode.endIndex = this.parser.endIndex;
              }
            } else {
              var node = new node_js_1.Text(data);
              this.addNode(node);
              this.lastNode = node;
            }
          };
          DomHandler2.prototype.oncomment = function(data) {
            if (this.lastNode && this.lastNode.type === domelementtype_1.ElementType.Comment) {
              this.lastNode.data += data;
              return;
            }
            var node = new node_js_1.Comment(data);
            this.addNode(node);
            this.lastNode = node;
          };
          DomHandler2.prototype.oncommentend = function() {
            this.lastNode = null;
          };
          DomHandler2.prototype.oncdatastart = function() {
            var text = new node_js_1.Text("");
            var node = new node_js_1.CDATA([text]);
            this.addNode(node);
            text.parent = node;
            this.lastNode = text;
          };
          DomHandler2.prototype.oncdataend = function() {
            this.lastNode = null;
          };
          DomHandler2.prototype.onprocessinginstruction = function(name123, data) {
            var node = new node_js_1.ProcessingInstruction(name123, data);
            this.addNode(node);
          };
          DomHandler2.prototype.handleCallback = function(error) {
            if (typeof this.callback === "function") {
              this.callback(error, this.dom);
            } else if (error) {
              throw error;
            }
          };
          DomHandler2.prototype.addNode = function(node) {
            var parent = this.tagStack[this.tagStack.length - 1];
            var previousSibling = parent.children[parent.children.length - 1];
            if (this.options.withStartIndices) {
              node.startIndex = this.parser.startIndex;
            }
            if (this.options.withEndIndices) {
              node.endIndex = this.parser.endIndex;
            }
            parent.children.push(node);
            if (previousSibling) {
              node.prev = previousSibling;
              previousSibling.next = node;
            }
            node.parent = parent;
            this.lastNode = null;
          };
          return DomHandler2;
        })()
      );
      exports.DomHandler = DomHandler;
      exports.default = DomHandler;
    }
  });

  // node_modules/html-dom-parser/lib/client/constants.js
  var require_constants = __commonJS({
    "node_modules/html-dom-parser/lib/client/constants.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.CARRIAGE_RETURN_PLACEHOLDER_REGEX = exports.CARRIAGE_RETURN_PLACEHOLDER = exports.CARRIAGE_RETURN_REGEX = exports.CARRIAGE_RETURN = exports.CASE_SENSITIVE_TAG_NAMES_MAP = exports.CASE_SENSITIVE_TAG_NAMES = void 0;
      exports.CASE_SENSITIVE_TAG_NAMES = [
        "animateMotion",
        "animateTransform",
        "clipPath",
        "feBlend",
        "feColorMatrix",
        "feComponentTransfer",
        "feComposite",
        "feConvolveMatrix",
        "feDiffuseLighting",
        "feDisplacementMap",
        "feDropShadow",
        "feFlood",
        "feFuncA",
        "feFuncB",
        "feFuncG",
        "feFuncR",
        "feGaussianBlur",
        "feImage",
        "feMerge",
        "feMergeNode",
        "feMorphology",
        "feOffset",
        "fePointLight",
        "feSpecularLighting",
        "feSpotLight",
        "feTile",
        "feTurbulence",
        "foreignObject",
        "linearGradient",
        "radialGradient",
        "textPath"
      ];
      exports.CASE_SENSITIVE_TAG_NAMES_MAP = exports.CASE_SENSITIVE_TAG_NAMES.reduce(function(accumulator, tagName) {
        accumulator[tagName.toLowerCase()] = tagName;
        return accumulator;
      }, {});
      exports.CARRIAGE_RETURN = "\r";
      exports.CARRIAGE_RETURN_REGEX = new RegExp(exports.CARRIAGE_RETURN, "g");
      exports.CARRIAGE_RETURN_PLACEHOLDER = "__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(), "__");
      exports.CARRIAGE_RETURN_PLACEHOLDER_REGEX = new RegExp(exports.CARRIAGE_RETURN_PLACEHOLDER, "g");
    }
  });

  // node_modules/html-dom-parser/lib/client/utilities.js
  var require_utilities = __commonJS({
    "node_modules/html-dom-parser/lib/client/utilities.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.formatAttributes = formatAttributes;
      exports.escapeSpecialCharacters = escapeSpecialCharacters;
      exports.revertEscapedCharacters = revertEscapedCharacters;
      exports.formatDOM = formatDOM;
      var domhandler_1 = require_lib2();
      var constants_1 = require_constants();
      function getCaseSensitiveTagName(tagName) {
        return constants_1.CASE_SENSITIVE_TAG_NAMES_MAP[tagName];
      }
      function formatAttributes(attributes2) {
        var map = {};
        var index = 0;
        var attributesLength = attributes2.length;
        for (; index < attributesLength; index++) {
          var attribute = attributes2[index];
          map[attribute.name] = attribute.value;
        }
        return map;
      }
      function formatTagName(tagName) {
        tagName = tagName.toLowerCase();
        var caseSensitiveTagName = getCaseSensitiveTagName(tagName);
        if (caseSensitiveTagName) {
          return caseSensitiveTagName;
        }
        return tagName;
      }
      function escapeSpecialCharacters(html) {
        return html.replace(constants_1.CARRIAGE_RETURN_REGEX, constants_1.CARRIAGE_RETURN_PLACEHOLDER);
      }
      function revertEscapedCharacters(text) {
        return text.replace(constants_1.CARRIAGE_RETURN_PLACEHOLDER_REGEX, constants_1.CARRIAGE_RETURN);
      }
      function formatDOM(nodes, parent, directive) {
        if (parent === void 0) {
          parent = null;
        }
        var domNodes = [];
        var current;
        var index = 0;
        var nodesLength = nodes.length;
        for (; index < nodesLength; index++) {
          var node = nodes[index];
          switch (node.nodeType) {
            case 1: {
              var tagName = formatTagName(node.nodeName);
              current = new domhandler_1.Element(tagName, formatAttributes(node.attributes));
              current.children = formatDOM(
                // template children are on content
                tagName === "template" ? node.content.childNodes : node.childNodes,
                current
              );
              break;
            }
            case 3:
              current = new domhandler_1.Text(revertEscapedCharacters(node.nodeValue));
              break;
            case 8:
              current = new domhandler_1.Comment(node.nodeValue);
              break;
            default:
              continue;
          }
          var prev = domNodes[index - 1] || null;
          if (prev) {
            prev.next = current;
          }
          current.parent = parent;
          current.prev = prev;
          current.next = null;
          domNodes.push(current);
        }
        if (directive) {
          current = new domhandler_1.ProcessingInstruction(directive.substring(0, directive.indexOf(" ")).toLowerCase(), directive);
          current.next = domNodes[0] || null;
          current.parent = parent;
          domNodes.unshift(current);
          if (domNodes[1]) {
            domNodes[1].prev = domNodes[0];
          }
        }
        return domNodes;
      }
    }
  });

  // node_modules/html-dom-parser/lib/client/domparser.js
  var require_domparser = __commonJS({
    "node_modules/html-dom-parser/lib/client/domparser.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.default = domparser;
      var utilities_1 = require_utilities();
      var HTML = "html";
      var HEAD = "head";
      var BODY = "body";
      var FIRST_TAG_REGEX = /<([a-zA-Z]+[0-9]?)/;
      var HEAD_TAG_REGEX = /<head[^]*>/i;
      var BODY_TAG_REGEX = /<body[^]*>/i;
      var parseFromDocument = function(html, tagName) {
        throw new Error("This browser does not support `document.implementation.createHTMLDocument`");
      };
      var parseFromString = function(html, tagName) {
        throw new Error("This browser does not support `DOMParser.prototype.parseFromString`");
      };
      var DOMParser = typeof window === "object" && window.DOMParser;
      if (typeof DOMParser === "function") {
        domParser_1 = new DOMParser();
        mimeType_1 = "text/html";
        parseFromString = function(html, tagName) {
          if (tagName) {
            html = "<".concat(tagName, ">").concat(html, "</").concat(tagName, ">");
          }
          return domParser_1.parseFromString(html, mimeType_1);
        };
        parseFromDocument = parseFromString;
      }
      var domParser_1;
      var mimeType_1;
      if (typeof document === "object" && document.implementation) {
        htmlDocument_1 = document.implementation.createHTMLDocument();
        parseFromDocument = function(html, tagName) {
          if (tagName) {
            var element = htmlDocument_1.documentElement.querySelector(tagName);
            if (element) {
              element.innerHTML = html;
            }
            return htmlDocument_1;
          }
          htmlDocument_1.documentElement.innerHTML = html;
          return htmlDocument_1;
        };
      }
      var htmlDocument_1;
      var template = typeof document === "object" && document.createElement("template");
      var parseFromTemplate;
      if (template && template.content) {
        parseFromTemplate = function(html) {
          template.innerHTML = html;
          return template.content.childNodes;
        };
      }
      function domparser(html) {
        var _a, _b;
        html = (0, utilities_1.escapeSpecialCharacters)(html);
        var match = html.match(FIRST_TAG_REGEX);
        var firstTagName = match && match[1] ? match[1].toLowerCase() : "";
        switch (firstTagName) {
          case HTML: {
            var doc = parseFromString(html);
            if (!HEAD_TAG_REGEX.test(html)) {
              var element = doc.querySelector(HEAD);
              (_a = element === null || element === void 0 ? void 0 : element.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(element);
            }
            if (!BODY_TAG_REGEX.test(html)) {
              var element = doc.querySelector(BODY);
              (_b = element === null || element === void 0 ? void 0 : element.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(element);
            }
            return doc.querySelectorAll(HTML);
          }
          case HEAD:
          case BODY: {
            var elements = parseFromDocument(html).querySelectorAll(firstTagName);
            if (BODY_TAG_REGEX.test(html) && HEAD_TAG_REGEX.test(html)) {
              return elements[0].parentNode.childNodes;
            }
            return elements;
          }
          // low-level tag or text
          default: {
            if (parseFromTemplate) {
              return parseFromTemplate(html);
            }
            var element = parseFromDocument(html, BODY).querySelector(BODY);
            return element.childNodes;
          }
        }
      }
    }
  });

  // node_modules/html-dom-parser/lib/client/html-to-dom.js
  var require_html_to_dom = __commonJS({
    "node_modules/html-dom-parser/lib/client/html-to-dom.js"(exports) {
      "use strict";
      var __importDefault = exports && exports.__importDefault || function(mod) {
        return mod && mod.__esModule ? mod : { "default": mod };
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.default = HTMLDOMParser;
      var domparser_1 = __importDefault(require_domparser());
      var utilities_1 = require_utilities();
      var DIRECTIVE_REGEX = /<(![a-zA-Z\s]+)>/;
      function HTMLDOMParser(html) {
        if (typeof html !== "string") {
          throw new TypeError("First argument must be a string");
        }
        if (!html) {
          return [];
        }
        var match = html.match(DIRECTIVE_REGEX);
        var directive = match ? match[1] : void 0;
        return (0, utilities_1.formatDOM)((0, domparser_1.default)(html), null, directive);
      }
    }
  });

  // node_modules/react-property/lib/possibleStandardNamesOptimized.js
  var require_possibleStandardNamesOptimized = __commonJS({
    "node_modules/react-property/lib/possibleStandardNamesOptimized.js"(exports) {
      var SAME = 0;
      exports.SAME = SAME;
      var CAMELCASE = 1;
      exports.CAMELCASE = CAMELCASE;
      exports.possibleStandardNames = {
        accept: 0,
        acceptCharset: 1,
        "accept-charset": "acceptCharset",
        accessKey: 1,
        action: 0,
        allowFullScreen: 1,
        alt: 0,
        as: 0,
        async: 0,
        autoCapitalize: 1,
        autoComplete: 1,
        autoCorrect: 1,
        autoFocus: 1,
        autoPlay: 1,
        autoSave: 1,
        capture: 0,
        cellPadding: 1,
        cellSpacing: 1,
        challenge: 0,
        charSet: 1,
        checked: 0,
        children: 0,
        cite: 0,
        class: "className",
        classID: 1,
        className: 1,
        cols: 0,
        colSpan: 1,
        content: 0,
        contentEditable: 1,
        contextMenu: 1,
        controls: 0,
        controlsList: 1,
        coords: 0,
        crossOrigin: 1,
        dangerouslySetInnerHTML: 1,
        data: 0,
        dateTime: 1,
        default: 0,
        defaultChecked: 1,
        defaultValue: 1,
        defer: 0,
        dir: 0,
        disabled: 0,
        disablePictureInPicture: 1,
        disableRemotePlayback: 1,
        download: 0,
        draggable: 0,
        encType: 1,
        enterKeyHint: 1,
        for: "htmlFor",
        form: 0,
        formMethod: 1,
        formAction: 1,
        formEncType: 1,
        formNoValidate: 1,
        formTarget: 1,
        frameBorder: 1,
        headers: 0,
        height: 0,
        hidden: 0,
        high: 0,
        href: 0,
        hrefLang: 1,
        htmlFor: 1,
        httpEquiv: 1,
        "http-equiv": "httpEquiv",
        icon: 0,
        id: 0,
        innerHTML: 1,
        inputMode: 1,
        integrity: 0,
        is: 0,
        itemID: 1,
        itemProp: 1,
        itemRef: 1,
        itemScope: 1,
        itemType: 1,
        keyParams: 1,
        keyType: 1,
        kind: 0,
        label: 0,
        lang: 0,
        list: 0,
        loop: 0,
        low: 0,
        manifest: 0,
        marginWidth: 1,
        marginHeight: 1,
        max: 0,
        maxLength: 1,
        media: 0,
        mediaGroup: 1,
        method: 0,
        min: 0,
        minLength: 1,
        multiple: 0,
        muted: 0,
        name: 0,
        noModule: 1,
        nonce: 0,
        noValidate: 1,
        open: 0,
        optimum: 0,
        pattern: 0,
        placeholder: 0,
        playsInline: 1,
        poster: 0,
        preload: 0,
        profile: 0,
        radioGroup: 1,
        readOnly: 1,
        referrerPolicy: 1,
        rel: 0,
        required: 0,
        reversed: 0,
        role: 0,
        rows: 0,
        rowSpan: 1,
        sandbox: 0,
        scope: 0,
        scoped: 0,
        scrolling: 0,
        seamless: 0,
        selected: 0,
        shape: 0,
        size: 0,
        sizes: 0,
        span: 0,
        spellCheck: 1,
        src: 0,
        srcDoc: 1,
        srcLang: 1,
        srcSet: 1,
        start: 0,
        step: 0,
        style: 0,
        summary: 0,
        tabIndex: 1,
        target: 0,
        title: 0,
        type: 0,
        useMap: 1,
        value: 0,
        width: 0,
        wmode: 0,
        wrap: 0,
        about: 0,
        accentHeight: 1,
        "accent-height": "accentHeight",
        accumulate: 0,
        additive: 0,
        alignmentBaseline: 1,
        "alignment-baseline": "alignmentBaseline",
        allowReorder: 1,
        alphabetic: 0,
        amplitude: 0,
        arabicForm: 1,
        "arabic-form": "arabicForm",
        ascent: 0,
        attributeName: 1,
        attributeType: 1,
        autoReverse: 1,
        azimuth: 0,
        baseFrequency: 1,
        baselineShift: 1,
        "baseline-shift": "baselineShift",
        baseProfile: 1,
        bbox: 0,
        begin: 0,
        bias: 0,
        by: 0,
        calcMode: 1,
        capHeight: 1,
        "cap-height": "capHeight",
        clip: 0,
        clipPath: 1,
        "clip-path": "clipPath",
        clipPathUnits: 1,
        clipRule: 1,
        "clip-rule": "clipRule",
        color: 0,
        colorInterpolation: 1,
        "color-interpolation": "colorInterpolation",
        colorInterpolationFilters: 1,
        "color-interpolation-filters": "colorInterpolationFilters",
        colorProfile: 1,
        "color-profile": "colorProfile",
        colorRendering: 1,
        "color-rendering": "colorRendering",
        contentScriptType: 1,
        contentStyleType: 1,
        cursor: 0,
        cx: 0,
        cy: 0,
        d: 0,
        datatype: 0,
        decelerate: 0,
        descent: 0,
        diffuseConstant: 1,
        direction: 0,
        display: 0,
        divisor: 0,
        dominantBaseline: 1,
        "dominant-baseline": "dominantBaseline",
        dur: 0,
        dx: 0,
        dy: 0,
        edgeMode: 1,
        elevation: 0,
        enableBackground: 1,
        "enable-background": "enableBackground",
        end: 0,
        exponent: 0,
        externalResourcesRequired: 1,
        fill: 0,
        fillOpacity: 1,
        "fill-opacity": "fillOpacity",
        fillRule: 1,
        "fill-rule": "fillRule",
        filter: 0,
        filterRes: 1,
        filterUnits: 1,
        floodOpacity: 1,
        "flood-opacity": "floodOpacity",
        floodColor: 1,
        "flood-color": "floodColor",
        focusable: 0,
        fontFamily: 1,
        "font-family": "fontFamily",
        fontSize: 1,
        "font-size": "fontSize",
        fontSizeAdjust: 1,
        "font-size-adjust": "fontSizeAdjust",
        fontStretch: 1,
        "font-stretch": "fontStretch",
        fontStyle: 1,
        "font-style": "fontStyle",
        fontVariant: 1,
        "font-variant": "fontVariant",
        fontWeight: 1,
        "font-weight": "fontWeight",
        format: 0,
        from: 0,
        fx: 0,
        fy: 0,
        g1: 0,
        g2: 0,
        glyphName: 1,
        "glyph-name": "glyphName",
        glyphOrientationHorizontal: 1,
        "glyph-orientation-horizontal": "glyphOrientationHorizontal",
        glyphOrientationVertical: 1,
        "glyph-orientation-vertical": "glyphOrientationVertical",
        glyphRef: 1,
        gradientTransform: 1,
        gradientUnits: 1,
        hanging: 0,
        horizAdvX: 1,
        "horiz-adv-x": "horizAdvX",
        horizOriginX: 1,
        "horiz-origin-x": "horizOriginX",
        ideographic: 0,
        imageRendering: 1,
        "image-rendering": "imageRendering",
        in2: 0,
        in: 0,
        inlist: 0,
        intercept: 0,
        k1: 0,
        k2: 0,
        k3: 0,
        k4: 0,
        k: 0,
        kernelMatrix: 1,
        kernelUnitLength: 1,
        kerning: 0,
        keyPoints: 1,
        keySplines: 1,
        keyTimes: 1,
        lengthAdjust: 1,
        letterSpacing: 1,
        "letter-spacing": "letterSpacing",
        lightingColor: 1,
        "lighting-color": "lightingColor",
        limitingConeAngle: 1,
        local: 0,
        markerEnd: 1,
        "marker-end": "markerEnd",
        markerHeight: 1,
        markerMid: 1,
        "marker-mid": "markerMid",
        markerStart: 1,
        "marker-start": "markerStart",
        markerUnits: 1,
        markerWidth: 1,
        mask: 0,
        maskContentUnits: 1,
        maskUnits: 1,
        mathematical: 0,
        mode: 0,
        numOctaves: 1,
        offset: 0,
        opacity: 0,
        operator: 0,
        order: 0,
        orient: 0,
        orientation: 0,
        origin: 0,
        overflow: 0,
        overlinePosition: 1,
        "overline-position": "overlinePosition",
        overlineThickness: 1,
        "overline-thickness": "overlineThickness",
        paintOrder: 1,
        "paint-order": "paintOrder",
        panose1: 0,
        "panose-1": "panose1",
        pathLength: 1,
        patternContentUnits: 1,
        patternTransform: 1,
        patternUnits: 1,
        pointerEvents: 1,
        "pointer-events": "pointerEvents",
        points: 0,
        pointsAtX: 1,
        pointsAtY: 1,
        pointsAtZ: 1,
        prefix: 0,
        preserveAlpha: 1,
        preserveAspectRatio: 1,
        primitiveUnits: 1,
        property: 0,
        r: 0,
        radius: 0,
        refX: 1,
        refY: 1,
        renderingIntent: 1,
        "rendering-intent": "renderingIntent",
        repeatCount: 1,
        repeatDur: 1,
        requiredExtensions: 1,
        requiredFeatures: 1,
        resource: 0,
        restart: 0,
        result: 0,
        results: 0,
        rotate: 0,
        rx: 0,
        ry: 0,
        scale: 0,
        security: 0,
        seed: 0,
        shapeRendering: 1,
        "shape-rendering": "shapeRendering",
        slope: 0,
        spacing: 0,
        specularConstant: 1,
        specularExponent: 1,
        speed: 0,
        spreadMethod: 1,
        startOffset: 1,
        stdDeviation: 1,
        stemh: 0,
        stemv: 0,
        stitchTiles: 1,
        stopColor: 1,
        "stop-color": "stopColor",
        stopOpacity: 1,
        "stop-opacity": "stopOpacity",
        strikethroughPosition: 1,
        "strikethrough-position": "strikethroughPosition",
        strikethroughThickness: 1,
        "strikethrough-thickness": "strikethroughThickness",
        string: 0,
        stroke: 0,
        strokeDasharray: 1,
        "stroke-dasharray": "strokeDasharray",
        strokeDashoffset: 1,
        "stroke-dashoffset": "strokeDashoffset",
        strokeLinecap: 1,
        "stroke-linecap": "strokeLinecap",
        strokeLinejoin: 1,
        "stroke-linejoin": "strokeLinejoin",
        strokeMiterlimit: 1,
        "stroke-miterlimit": "strokeMiterlimit",
        strokeWidth: 1,
        "stroke-width": "strokeWidth",
        strokeOpacity: 1,
        "stroke-opacity": "strokeOpacity",
        suppressContentEditableWarning: 1,
        suppressHydrationWarning: 1,
        surfaceScale: 1,
        systemLanguage: 1,
        tableValues: 1,
        targetX: 1,
        targetY: 1,
        textAnchor: 1,
        "text-anchor": "textAnchor",
        textDecoration: 1,
        "text-decoration": "textDecoration",
        textLength: 1,
        textRendering: 1,
        "text-rendering": "textRendering",
        to: 0,
        transform: 0,
        typeof: 0,
        u1: 0,
        u2: 0,
        underlinePosition: 1,
        "underline-position": "underlinePosition",
        underlineThickness: 1,
        "underline-thickness": "underlineThickness",
        unicode: 0,
        unicodeBidi: 1,
        "unicode-bidi": "unicodeBidi",
        unicodeRange: 1,
        "unicode-range": "unicodeRange",
        unitsPerEm: 1,
        "units-per-em": "unitsPerEm",
        unselectable: 0,
        vAlphabetic: 1,
        "v-alphabetic": "vAlphabetic",
        values: 0,
        vectorEffect: 1,
        "vector-effect": "vectorEffect",
        version: 0,
        vertAdvY: 1,
        "vert-adv-y": "vertAdvY",
        vertOriginX: 1,
        "vert-origin-x": "vertOriginX",
        vertOriginY: 1,
        "vert-origin-y": "vertOriginY",
        vHanging: 1,
        "v-hanging": "vHanging",
        vIdeographic: 1,
        "v-ideographic": "vIdeographic",
        viewBox: 1,
        viewTarget: 1,
        visibility: 0,
        vMathematical: 1,
        "v-mathematical": "vMathematical",
        vocab: 0,
        widths: 0,
        wordSpacing: 1,
        "word-spacing": "wordSpacing",
        writingMode: 1,
        "writing-mode": "writingMode",
        x1: 0,
        x2: 0,
        x: 0,
        xChannelSelector: 1,
        xHeight: 1,
        "x-height": "xHeight",
        xlinkActuate: 1,
        "xlink:actuate": "xlinkActuate",
        xlinkArcrole: 1,
        "xlink:arcrole": "xlinkArcrole",
        xlinkHref: 1,
        "xlink:href": "xlinkHref",
        xlinkRole: 1,
        "xlink:role": "xlinkRole",
        xlinkShow: 1,
        "xlink:show": "xlinkShow",
        xlinkTitle: 1,
        "xlink:title": "xlinkTitle",
        xlinkType: 1,
        "xlink:type": "xlinkType",
        xmlBase: 1,
        "xml:base": "xmlBase",
        xmlLang: 1,
        "xml:lang": "xmlLang",
        xmlns: 0,
        "xml:space": "xmlSpace",
        xmlnsXlink: 1,
        "xmlns:xlink": "xmlnsXlink",
        xmlSpace: 1,
        y1: 0,
        y2: 0,
        y: 0,
        yChannelSelector: 1,
        z: 0,
        zoomAndPan: 1
      };
    }
  });

  // node_modules/react-property/lib/index.js
  var require_lib3 = __commonJS({
    "node_modules/react-property/lib/index.js"(exports) {
      "use strict";
      var RESERVED = 0;
      var STRING = 1;
      var BOOLEANISH_STRING = 2;
      var BOOLEAN = 3;
      var OVERLOADED_BOOLEAN = 4;
      var NUMERIC = 5;
      var POSITIVE_NUMERIC = 6;
      function getPropertyInfo(name123) {
        return properties.hasOwnProperty(name123) ? properties[name123] : null;
      }
      function PropertyInfoRecord(name123, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
        this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
        this.attributeName = attributeName;
        this.attributeNamespace = attributeNamespace;
        this.mustUseProperty = mustUseProperty;
        this.propertyName = name123;
        this.type = type;
        this.sanitizeURL = sanitizeURL;
        this.removeEmptyString = removeEmptyString;
      }
      var properties = {};
      var reservedProps = [
        "children",
        "dangerouslySetInnerHTML",
        // TODO: This prevents the assignment of defaultValue to regular
        // elements (not just inputs). Now that ReactDOMInput assigns to the
        // defaultValue property -- do we need this?
        "defaultValue",
        "defaultChecked",
        "innerHTML",
        "suppressContentEditableWarning",
        "suppressHydrationWarning",
        "style"
      ];
      reservedProps.forEach((name123) => {
        properties[name123] = new PropertyInfoRecord(
          name123,
          RESERVED,
          false,
          // mustUseProperty
          name123,
          // attributeName
          null,
          // attributeNamespace
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      [
        ["acceptCharset", "accept-charset"],
        ["className", "class"],
        ["htmlFor", "for"],
        ["httpEquiv", "http-equiv"]
      ].forEach(([name123, attributeName]) => {
        properties[name123] = new PropertyInfoRecord(
          name123,
          STRING,
          false,
          // mustUseProperty
          attributeName,
          // attributeName
          null,
          // attributeNamespace
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      ["contentEditable", "draggable", "spellCheck", "value"].forEach((name123) => {
        properties[name123] = new PropertyInfoRecord(
          name123,
          BOOLEANISH_STRING,
          false,
          // mustUseProperty
          name123.toLowerCase(),
          // attributeName
          null,
          // attributeNamespace
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      [
        "autoReverse",
        "externalResourcesRequired",
        "focusable",
        "preserveAlpha"
      ].forEach((name123) => {
        properties[name123] = new PropertyInfoRecord(
          name123,
          BOOLEANISH_STRING,
          false,
          // mustUseProperty
          name123,
          // attributeName
          null,
          // attributeNamespace
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      [
        "allowFullScreen",
        "async",
        // Note: there is a special case that prevents it from being written to the DOM
        // on the client side because the browsers are inconsistent. Instead we call focus().
        "autoFocus",
        "autoPlay",
        "controls",
        "default",
        "defer",
        "disabled",
        "disablePictureInPicture",
        "disableRemotePlayback",
        "formNoValidate",
        "hidden",
        "loop",
        "noModule",
        "noValidate",
        "open",
        "playsInline",
        "readOnly",
        "required",
        "reversed",
        "scoped",
        "seamless",
        // Microdata
        "itemScope"
      ].forEach((name123) => {
        properties[name123] = new PropertyInfoRecord(
          name123,
          BOOLEAN,
          false,
          // mustUseProperty
          name123.toLowerCase(),
          // attributeName
          null,
          // attributeNamespace
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      [
        "checked",
        // Note: `option.selected` is not updated if `select.multiple` is
        // disabled with `removeAttribute`. We have special logic for handling this.
        "multiple",
        "muted",
        "selected"
        // NOTE: if you add a camelCased prop to this list,
        // you'll need to set attributeName to name.toLowerCase()
        // instead in the assignment below.
      ].forEach((name123) => {
        properties[name123] = new PropertyInfoRecord(
          name123,
          BOOLEAN,
          true,
          // mustUseProperty
          name123,
          // attributeName
          null,
          // attributeNamespace
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      [
        "capture",
        "download"
        // NOTE: if you add a camelCased prop to this list,
        // you'll need to set attributeName to name.toLowerCase()
        // instead in the assignment below.
      ].forEach((name123) => {
        properties[name123] = new PropertyInfoRecord(
          name123,
          OVERLOADED_BOOLEAN,
          false,
          // mustUseProperty
          name123,
          // attributeName
          null,
          // attributeNamespace
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      [
        "cols",
        "rows",
        "size",
        "span"
        // NOTE: if you add a camelCased prop to this list,
        // you'll need to set attributeName to name.toLowerCase()
        // instead in the assignment below.
      ].forEach((name123) => {
        properties[name123] = new PropertyInfoRecord(
          name123,
          POSITIVE_NUMERIC,
          false,
          // mustUseProperty
          name123,
          // attributeName
          null,
          // attributeNamespace
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      ["rowSpan", "start"].forEach((name123) => {
        properties[name123] = new PropertyInfoRecord(
          name123,
          NUMERIC,
          false,
          // mustUseProperty
          name123.toLowerCase(),
          // attributeName
          null,
          // attributeNamespace
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      var CAMELIZE = /[\-\:]([a-z])/g;
      var capitalize2 = (token) => token[1].toUpperCase();
      [
        "accent-height",
        "alignment-baseline",
        "arabic-form",
        "baseline-shift",
        "cap-height",
        "clip-path",
        "clip-rule",
        "color-interpolation",
        "color-interpolation-filters",
        "color-profile",
        "color-rendering",
        "dominant-baseline",
        "enable-background",
        "fill-opacity",
        "fill-rule",
        "flood-color",
        "flood-opacity",
        "font-family",
        "font-size",
        "font-size-adjust",
        "font-stretch",
        "font-style",
        "font-variant",
        "font-weight",
        "glyph-name",
        "glyph-orientation-horizontal",
        "glyph-orientation-vertical",
        "horiz-adv-x",
        "horiz-origin-x",
        "image-rendering",
        "letter-spacing",
        "lighting-color",
        "marker-end",
        "marker-mid",
        "marker-start",
        "overline-position",
        "overline-thickness",
        "paint-order",
        "panose-1",
        "pointer-events",
        "rendering-intent",
        "shape-rendering",
        "stop-color",
        "stop-opacity",
        "strikethrough-position",
        "strikethrough-thickness",
        "stroke-dasharray",
        "stroke-dashoffset",
        "stroke-linecap",
        "stroke-linejoin",
        "stroke-miterlimit",
        "stroke-opacity",
        "stroke-width",
        "text-anchor",
        "text-decoration",
        "text-rendering",
        "underline-position",
        "underline-thickness",
        "unicode-bidi",
        "unicode-range",
        "units-per-em",
        "v-alphabetic",
        "v-hanging",
        "v-ideographic",
        "v-mathematical",
        "vector-effect",
        "vert-adv-y",
        "vert-origin-x",
        "vert-origin-y",
        "word-spacing",
        "writing-mode",
        "xmlns:xlink",
        "x-height"
        // NOTE: if you add a camelCased prop to this list,
        // you'll need to set attributeName to name.toLowerCase()
        // instead in the assignment below.
      ].forEach((attributeName) => {
        const name123 = attributeName.replace(CAMELIZE, capitalize2);
        properties[name123] = new PropertyInfoRecord(
          name123,
          STRING,
          false,
          // mustUseProperty
          attributeName,
          null,
          // attributeNamespace
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      [
        "xlink:actuate",
        "xlink:arcrole",
        "xlink:role",
        "xlink:show",
        "xlink:title",
        "xlink:type"
        // NOTE: if you add a camelCased prop to this list,
        // you'll need to set attributeName to name.toLowerCase()
        // instead in the assignment below.
      ].forEach((attributeName) => {
        const name123 = attributeName.replace(CAMELIZE, capitalize2);
        properties[name123] = new PropertyInfoRecord(
          name123,
          STRING,
          false,
          // mustUseProperty
          attributeName,
          "http://www.w3.org/1999/xlink",
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      [
        "xml:base",
        "xml:lang",
        "xml:space"
        // NOTE: if you add a camelCased prop to this list,
        // you'll need to set attributeName to name.toLowerCase()
        // instead in the assignment below.
      ].forEach((attributeName) => {
        const name123 = attributeName.replace(CAMELIZE, capitalize2);
        properties[name123] = new PropertyInfoRecord(
          name123,
          STRING,
          false,
          // mustUseProperty
          attributeName,
          "http://www.w3.org/XML/1998/namespace",
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      ["tabIndex", "crossOrigin"].forEach((attributeName) => {
        properties[attributeName] = new PropertyInfoRecord(
          attributeName,
          STRING,
          false,
          // mustUseProperty
          attributeName.toLowerCase(),
          // attributeName
          null,
          // attributeNamespace
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      var xlinkHref = "xlinkHref";
      properties[xlinkHref] = new PropertyInfoRecord(
        "xlinkHref",
        STRING,
        false,
        // mustUseProperty
        "xlink:href",
        "http://www.w3.org/1999/xlink",
        true,
        // sanitizeURL
        false
        // removeEmptyString
      );
      ["src", "href", "action", "formAction"].forEach((attributeName) => {
        properties[attributeName] = new PropertyInfoRecord(
          attributeName,
          STRING,
          false,
          // mustUseProperty
          attributeName.toLowerCase(),
          // attributeName
          null,
          // attributeNamespace
          true,
          // sanitizeURL
          true
          // removeEmptyString
        );
      });
      var {
        CAMELCASE,
        SAME,
        possibleStandardNames: possibleStandardNamesOptimized
      } = require_possibleStandardNamesOptimized();
      var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
      var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
      var isCustomAttribute = RegExp.prototype.test.bind(
        // eslint-disable-next-line no-misleading-character-class
        new RegExp("^(data|aria)-[" + ATTRIBUTE_NAME_CHAR + "]*$")
      );
      var possibleStandardNames = Object.keys(
        possibleStandardNamesOptimized
      ).reduce((accumulator, standardName) => {
        const propName = possibleStandardNamesOptimized[standardName];
        if (propName === SAME) {
          accumulator[standardName] = standardName;
        } else if (propName === CAMELCASE) {
          accumulator[standardName.toLowerCase()] = standardName;
        } else {
          accumulator[standardName] = propName;
        }
        return accumulator;
      }, {});
      exports.BOOLEAN = BOOLEAN;
      exports.BOOLEANISH_STRING = BOOLEANISH_STRING;
      exports.NUMERIC = NUMERIC;
      exports.OVERLOADED_BOOLEAN = OVERLOADED_BOOLEAN;
      exports.POSITIVE_NUMERIC = POSITIVE_NUMERIC;
      exports.RESERVED = RESERVED;
      exports.STRING = STRING;
      exports.getPropertyInfo = getPropertyInfo;
      exports.isCustomAttribute = isCustomAttribute;
      exports.possibleStandardNames = possibleStandardNames;
    }
  });

  // vendor-external:react
  var require_react = __commonJS({
    "vendor-external:react"(exports, module) {
      module.exports = window.React;
    }
  });

  // node_modules/inline-style-parser/cjs/index.js
  var require_cjs = __commonJS({
    "node_modules/inline-style-parser/cjs/index.js"(exports, module) {
      "use strict";
      var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
      var NEWLINE_REGEX = /\n/g;
      var WHITESPACE_REGEX = /^\s*/;
      var PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/;
      var COLON_REGEX = /^:\s*/;
      var VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/;
      var SEMICOLON_REGEX = /^[;\s]*/;
      var TRIM_REGEX = /^\s+|\s+$/g;
      var NEWLINE = "\n";
      var FORWARD_SLASH = "/";
      var ASTERISK = "*";
      var EMPTY_STRING = "";
      var TYPE_COMMENT = "comment";
      var TYPE_DECLARATION = "declaration";
      function index(style2, options2) {
        if (typeof style2 !== "string") {
          throw new TypeError("First argument must be a string");
        }
        if (!style2) return [];
        options2 = options2 || {};
        var lineno = 1;
        var column = 1;
        function updatePosition(str) {
          var lines = str.match(NEWLINE_REGEX);
          if (lines) lineno += lines.length;
          var i2 = str.lastIndexOf(NEWLINE);
          column = ~i2 ? str.length - i2 : column + str.length;
        }
        function position() {
          var start = { line: lineno, column };
          return function(node) {
            node.position = new Position(start);
            whitespace();
            return node;
          };
        }
        function Position(start) {
          this.start = start;
          this.end = { line: lineno, column };
          this.source = options2.source;
        }
        Position.prototype.content = style2;
        function error(msg) {
          var err = new Error(
            options2.source + ":" + lineno + ":" + column + ": " + msg
          );
          err.reason = msg;
          err.filename = options2.source;
          err.line = lineno;
          err.column = column;
          err.source = style2;
          if (options2.silent) ;
          else {
            throw err;
          }
        }
        function match(re) {
          var m2 = re.exec(style2);
          if (!m2) return;
          var str = m2[0];
          updatePosition(str);
          style2 = style2.slice(str.length);
          return m2;
        }
        function whitespace() {
          match(WHITESPACE_REGEX);
        }
        function comments(rules) {
          var c2;
          rules = rules || [];
          while (c2 = comment()) {
            if (c2 !== false) {
              rules.push(c2);
            }
          }
          return rules;
        }
        function comment() {
          var pos = position();
          if (FORWARD_SLASH != style2.charAt(0) || ASTERISK != style2.charAt(1)) return;
          var i2 = 2;
          while (EMPTY_STRING != style2.charAt(i2) && (ASTERISK != style2.charAt(i2) || FORWARD_SLASH != style2.charAt(i2 + 1))) {
            ++i2;
          }
          i2 += 2;
          if (EMPTY_STRING === style2.charAt(i2 - 1)) {
            return error("End of comment missing");
          }
          var str = style2.slice(2, i2 - 2);
          column += 2;
          updatePosition(str);
          style2 = style2.slice(i2);
          column += 2;
          return pos({
            type: TYPE_COMMENT,
            comment: str
          });
        }
        function declaration() {
          var pos = position();
          var prop = match(PROPERTY_REGEX);
          if (!prop) return;
          comment();
          if (!match(COLON_REGEX)) return error("property missing ':'");
          var val = match(VALUE_REGEX);
          var ret = pos({
            type: TYPE_DECLARATION,
            property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),
            value: val ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING)) : EMPTY_STRING
          });
          match(SEMICOLON_REGEX);
          return ret;
        }
        function declarations() {
          var decls = [];
          comments(decls);
          var decl;
          while (decl = declaration()) {
            if (decl !== false) {
              decls.push(decl);
              comments(decls);
            }
          }
          return decls;
        }
        whitespace();
        return declarations();
      }
      function trim(str) {
        return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;
      }
      module.exports = index;
    }
  });

  // node_modules/style-to-object/cjs/index.js
  var require_cjs2 = __commonJS({
    "node_modules/style-to-object/cjs/index.js"(exports) {
      "use strict";
      var __importDefault = exports && exports.__importDefault || function(mod) {
        return mod && mod.__esModule ? mod : { "default": mod };
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.default = StyleToObject;
      var inline_style_parser_1 = __importDefault(require_cjs());
      function StyleToObject(style2, iterator) {
        let styleObject = null;
        if (!style2 || typeof style2 !== "string") {
          return styleObject;
        }
        const declarations = (0, inline_style_parser_1.default)(style2);
        const hasIterator = typeof iterator === "function";
        declarations.forEach((declaration) => {
          if (declaration.type !== "declaration") {
            return;
          }
          const { property, value } = declaration;
          if (hasIterator) {
            iterator(property, value, declaration);
          } else if (value) {
            styleObject = styleObject || {};
            styleObject[property] = value;
          }
        });
        return styleObject;
      }
    }
  });

  // node_modules/style-to-js/cjs/utilities.js
  var require_utilities2 = __commonJS({
    "node_modules/style-to-js/cjs/utilities.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.camelCase = void 0;
      var CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9_-]+$/;
      var HYPHEN_REGEX = /-([a-z])/g;
      var NO_HYPHEN_REGEX = /^[^-]+$/;
      var VENDOR_PREFIX_REGEX = /^-(webkit|moz|ms|o|khtml)-/;
      var MS_VENDOR_PREFIX_REGEX = /^-(ms)-/;
      var skipCamelCase = function(property) {
        return !property || NO_HYPHEN_REGEX.test(property) || CUSTOM_PROPERTY_REGEX.test(property);
      };
      var capitalize2 = function(match, character) {
        return character.toUpperCase();
      };
      var trimHyphen = function(match, prefix) {
        return "".concat(prefix, "-");
      };
      var camelCase = function(property, options2) {
        if (options2 === void 0) {
          options2 = {};
        }
        if (skipCamelCase(property)) {
          return property;
        }
        property = property.toLowerCase();
        if (options2.reactCompat) {
          property = property.replace(MS_VENDOR_PREFIX_REGEX, trimHyphen);
        } else {
          property = property.replace(VENDOR_PREFIX_REGEX, trimHyphen);
        }
        return property.replace(HYPHEN_REGEX, capitalize2);
      };
      exports.camelCase = camelCase;
    }
  });

  // node_modules/style-to-js/cjs/index.js
  var require_cjs3 = __commonJS({
    "node_modules/style-to-js/cjs/index.js"(exports, module) {
      "use strict";
      var __importDefault = exports && exports.__importDefault || function(mod) {
        return mod && mod.__esModule ? mod : { "default": mod };
      };
      var style_to_object_1 = __importDefault(require_cjs2());
      var utilities_1 = require_utilities2();
      function StyleToJS(style2, options2) {
        var output = {};
        if (!style2 || typeof style2 !== "string") {
          return output;
        }
        (0, style_to_object_1.default)(style2, function(property, value) {
          if (property && value) {
            output[(0, utilities_1.camelCase)(property, options2)] = value;
          }
        });
        return output;
      }
      StyleToJS.default = StyleToJS;
      module.exports = StyleToJS;
    }
  });

  // node_modules/html-react-parser/lib/utilities.js
  var require_utilities3 = __commonJS({
    "node_modules/html-react-parser/lib/utilities.js"(exports) {
      "use strict";
      var __importDefault = exports && exports.__importDefault || function(mod) {
        return mod && mod.__esModule ? mod : { "default": mod };
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.returnFirstArg = exports.canTextBeChildOfNode = exports.ELEMENTS_WITH_NO_TEXT_CHILDREN = exports.PRESERVE_CUSTOM_ATTRIBUTES = void 0;
      exports.isCustomComponent = isCustomComponent;
      exports.setStyleProp = setStyleProp;
      var react_1 = require_react();
      var style_to_js_1 = __importDefault(require_cjs3());
      var RESERVED_SVG_MATHML_ELEMENTS = /* @__PURE__ */ new Set([
        "annotation-xml",
        "color-profile",
        "font-face",
        "font-face-src",
        "font-face-uri",
        "font-face-format",
        "font-face-name",
        "missing-glyph"
      ]);
      function isCustomComponent(tagName, props) {
        if (!tagName.includes("-")) {
          return Boolean(props && typeof props.is === "string");
        }
        if (RESERVED_SVG_MATHML_ELEMENTS.has(tagName)) {
          return false;
        }
        return true;
      }
      var styleOptions = {
        reactCompat: true
      };
      function setStyleProp(style2, props) {
        if (typeof style2 !== "string") {
          return;
        }
        if (!style2.trim()) {
          props.style = {};
          return;
        }
        try {
          props.style = (0, style_to_js_1.default)(style2, styleOptions);
        } catch (error) {
          props.style = {};
        }
      }
      exports.PRESERVE_CUSTOM_ATTRIBUTES = Number(react_1.version.split(".")[0]) >= 16;
      exports.ELEMENTS_WITH_NO_TEXT_CHILDREN = /* @__PURE__ */ new Set([
        "tr",
        "tbody",
        "thead",
        "tfoot",
        "colgroup",
        "table",
        "head",
        "html",
        "frameset"
      ]);
      var canTextBeChildOfNode = function(node) {
        return !exports.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(node.name);
      };
      exports.canTextBeChildOfNode = canTextBeChildOfNode;
      var returnFirstArg = function(arg) {
        return arg;
      };
      exports.returnFirstArg = returnFirstArg;
    }
  });

  // node_modules/html-react-parser/lib/attributes-to-props.js
  var require_attributes_to_props = __commonJS({
    "node_modules/html-react-parser/lib/attributes-to-props.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.default = attributesToProps2;
      var react_property_1 = require_lib3();
      var utilities_1 = require_utilities3();
      var UNCONTROLLED_COMPONENT_ATTRIBUTES = ["checked", "value"];
      var UNCONTROLLED_COMPONENT_NAMES = ["input", "select", "textarea"];
      var valueOnlyInputs = {
        reset: true,
        submit: true
      };
      function attributesToProps2(attributes2, nodeName) {
        if (attributes2 === void 0) {
          attributes2 = {};
        }
        var props = {};
        var isInputValueOnly = Boolean(attributes2.type && valueOnlyInputs[attributes2.type]);
        for (var attributeName in attributes2) {
          var attributeValue = attributes2[attributeName];
          if ((0, react_property_1.isCustomAttribute)(attributeName)) {
            props[attributeName] = attributeValue;
            continue;
          }
          var attributeNameLowerCased = attributeName.toLowerCase();
          var propName = getPropName(attributeNameLowerCased);
          if (propName) {
            var propertyInfo = (0, react_property_1.getPropertyInfo)(propName);
            if (UNCONTROLLED_COMPONENT_ATTRIBUTES.includes(propName) && UNCONTROLLED_COMPONENT_NAMES.includes(nodeName) && !isInputValueOnly) {
              propName = getPropName("default" + attributeNameLowerCased);
            }
            props[propName] = attributeValue;
            switch (propertyInfo && propertyInfo.type) {
              case react_property_1.BOOLEAN:
                props[propName] = true;
                break;
              case react_property_1.OVERLOADED_BOOLEAN:
                if (attributeValue === "") {
                  props[propName] = true;
                }
                break;
            }
            continue;
          }
          if (utilities_1.PRESERVE_CUSTOM_ATTRIBUTES) {
            props[attributeName] = attributeValue;
          }
        }
        (0, utilities_1.setStyleProp)(attributes2.style, props);
        return props;
      }
      function getPropName(attributeName) {
        return react_property_1.possibleStandardNames[attributeName];
      }
    }
  });

  // node_modules/html-react-parser/lib/dom-to-react.js
  var require_dom_to_react = __commonJS({
    "node_modules/html-react-parser/lib/dom-to-react.js"(exports) {
      "use strict";
      var __importDefault = exports && exports.__importDefault || function(mod) {
        return mod && mod.__esModule ? mod : { "default": mod };
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.default = domToReact2;
      var react_1 = require_react();
      var attributes_to_props_1 = __importDefault(require_attributes_to_props());
      var utilities_1 = require_utilities3();
      var React = {
        cloneElement: react_1.cloneElement,
        createElement: react_1.createElement,
        isValidElement: react_1.isValidElement
      };
      function domToReact2(nodes, options2) {
        if (options2 === void 0) {
          options2 = {};
        }
        var reactElements = [];
        var hasReplace = typeof options2.replace === "function";
        var transform = options2.transform || utilities_1.returnFirstArg;
        var _a = options2.library || React, cloneElement2 = _a.cloneElement, createElement2 = _a.createElement, isValidElement = _a.isValidElement;
        var nodesLength = nodes.length;
        for (var index = 0; index < nodesLength; index++) {
          var node = nodes[index];
          if (hasReplace) {
            var replaceElement = options2.replace(node, index);
            if (isValidElement(replaceElement)) {
              if (nodesLength > 1) {
                replaceElement = cloneElement2(replaceElement, {
                  key: replaceElement.key || index
                });
              }
              reactElements.push(transform(replaceElement, node, index));
              continue;
            }
          }
          if (node.type === "text") {
            var isWhitespace = !node.data.trim().length;
            if (isWhitespace && node.parent && !(0, utilities_1.canTextBeChildOfNode)(node.parent)) {
              continue;
            }
            if (options2.trim && isWhitespace) {
              continue;
            }
            reactElements.push(transform(node.data, node, index));
            continue;
          }
          var element = node;
          var props = {};
          if (skipAttributesToProps(element)) {
            (0, utilities_1.setStyleProp)(element.attribs.style, element.attribs);
            props = element.attribs;
          } else if (element.attribs) {
            props = (0, attributes_to_props_1.default)(element.attribs, element.name);
          }
          var children = void 0;
          switch (node.type) {
            case "script":
            case "style":
              if (node.children[0]) {
                props.dangerouslySetInnerHTML = {
                  __html: node.children[0].data
                };
              }
              break;
            case "tag":
              if (node.name === "textarea" && node.children[0]) {
                props.defaultValue = node.children[0].data;
              } else if (node.children && node.children.length) {
                children = domToReact2(node.children, options2);
              }
              break;
            // skip all other cases (e.g., comment)
            default:
              continue;
          }
          if (nodesLength > 1) {
            props.key = index;
          }
          reactElements.push(transform(createElement2(node.name, props, children), node, index));
        }
        return reactElements.length === 1 ? reactElements[0] : reactElements;
      }
      function skipAttributesToProps(node) {
        return utilities_1.PRESERVE_CUSTOM_ATTRIBUTES && node.type === "tag" && (0, utilities_1.isCustomComponent)(node.name, node.attribs);
      }
    }
  });

  // node_modules/html-react-parser/node_modules/domelementtype/lib/index.js
  var require_lib4 = __commonJS({
    "node_modules/html-react-parser/node_modules/domelementtype/lib/index.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.Doctype = exports.CDATA = exports.Tag = exports.Style = exports.Script = exports.Comment = exports.Directive = exports.Text = exports.Root = exports.isTag = exports.ElementType = void 0;
      var ElementType;
      (function(ElementType2) {
        ElementType2["Root"] = "root";
        ElementType2["Text"] = "text";
        ElementType2["Directive"] = "directive";
        ElementType2["Comment"] = "comment";
        ElementType2["Script"] = "script";
        ElementType2["Style"] = "style";
        ElementType2["Tag"] = "tag";
        ElementType2["CDATA"] = "cdata";
        ElementType2["Doctype"] = "doctype";
      })(ElementType = exports.ElementType || (exports.ElementType = {}));
      function isTag(elem) {
        return elem.type === ElementType.Tag || elem.type === ElementType.Script || elem.type === ElementType.Style;
      }
      exports.isTag = isTag;
      exports.Root = ElementType.Root;
      exports.Text = ElementType.Text;
      exports.Directive = ElementType.Directive;
      exports.Comment = ElementType.Comment;
      exports.Script = ElementType.Script;
      exports.Style = ElementType.Style;
      exports.Tag = ElementType.Tag;
      exports.CDATA = ElementType.CDATA;
      exports.Doctype = ElementType.Doctype;
    }
  });

  // node_modules/html-react-parser/node_modules/domhandler/lib/node.js
  var require_node2 = __commonJS({
    "node_modules/html-react-parser/node_modules/domhandler/lib/node.js"(exports) {
      "use strict";
      var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
        var extendStatics = function(d2, b2) {
          extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
            d3.__proto__ = b3;
          } || function(d3, b3) {
            for (var p2 in b3) if (Object.prototype.hasOwnProperty.call(b3, p2)) d3[p2] = b3[p2];
          };
          return extendStatics(d2, b2);
        };
        return function(d2, b2) {
          if (typeof b2 !== "function" && b2 !== null)
            throw new TypeError("Class extends value " + String(b2) + " is not a constructor or null");
          extendStatics(d2, b2);
          function __268() {
            this.constructor = d2;
          }
          d2.prototype = b2 === null ? Object.create(b2) : (__268.prototype = b2.prototype, new __268());
        };
      })();
      var __assign2 = exports && exports.__assign || function() {
        __assign2 = Object.assign || function(t2) {
          for (var s2, i2 = 1, n2 = arguments.length; i2 < n2; i2++) {
            s2 = arguments[i2];
            for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2))
              t2[p2] = s2[p2];
          }
          return t2;
        };
        return __assign2.apply(this, arguments);
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.cloneNode = exports.hasChildren = exports.isDocument = exports.isDirective = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = exports.Element = exports.Document = exports.CDATA = exports.NodeWithChildren = exports.ProcessingInstruction = exports.Comment = exports.Text = exports.DataNode = exports.Node = void 0;
      var domelementtype_1 = require_lib4();
      var Node = (
        /** @class */
        (function() {
          function Node2() {
            this.parent = null;
            this.prev = null;
            this.next = null;
            this.startIndex = null;
            this.endIndex = null;
          }
          Object.defineProperty(Node2.prototype, "parentNode", {
            // Read-write aliases for properties
            /**
             * Same as {@link parent}.
             * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
             */
            get: function() {
              return this.parent;
            },
            set: function(parent) {
              this.parent = parent;
            },
            enumerable: false,
            configurable: true
          });
          Object.defineProperty(Node2.prototype, "previousSibling", {
            /**
             * Same as {@link prev}.
             * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
             */
            get: function() {
              return this.prev;
            },
            set: function(prev) {
              this.prev = prev;
            },
            enumerable: false,
            configurable: true
          });
          Object.defineProperty(Node2.prototype, "nextSibling", {
            /**
             * Same as {@link next}.
             * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
             */
            get: function() {
              return this.next;
            },
            set: function(next) {
              this.next = next;
            },
            enumerable: false,
            configurable: true
          });
          Node2.prototype.cloneNode = function(recursive) {
            if (recursive === void 0) {
              recursive = false;
            }
            return cloneNode(this, recursive);
          };
          return Node2;
        })()
      );
      exports.Node = Node;
      var DataNode = (
        /** @class */
        (function(_super) {
          __extends(DataNode2, _super);
          function DataNode2(data) {
            var _this = _super.call(this) || this;
            _this.data = data;
            return _this;
          }
          Object.defineProperty(DataNode2.prototype, "nodeValue", {
            /**
             * Same as {@link data}.
             * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
             */
            get: function() {
              return this.data;
            },
            set: function(data) {
              this.data = data;
            },
            enumerable: false,
            configurable: true
          });
          return DataNode2;
        })(Node)
      );
      exports.DataNode = DataNode;
      var Text4 = (
        /** @class */
        (function(_super) {
          __extends(Text5, _super);
          function Text5() {
            var _this = _super !== null && _super.apply(this, arguments) || this;
            _this.type = domelementtype_1.ElementType.Text;
            return _this;
          }
          Object.defineProperty(Text5.prototype, "nodeType", {
            get: function() {
              return 3;
            },
            enumerable: false,
            configurable: true
          });
          return Text5;
        })(DataNode)
      );
      exports.Text = Text4;
      var Comment2 = (
        /** @class */
        (function(_super) {
          __extends(Comment3, _super);
          function Comment3() {
            var _this = _super !== null && _super.apply(this, arguments) || this;
            _this.type = domelementtype_1.ElementType.Comment;
            return _this;
          }
          Object.defineProperty(Comment3.prototype, "nodeType", {
            get: function() {
              return 8;
            },
            enumerable: false,
            configurable: true
          });
          return Comment3;
        })(DataNode)
      );
      exports.Comment = Comment2;
      var ProcessingInstruction2 = (
        /** @class */
        (function(_super) {
          __extends(ProcessingInstruction3, _super);
          function ProcessingInstruction3(name123, data) {
            var _this = _super.call(this, data) || this;
            _this.name = name123;
            _this.type = domelementtype_1.ElementType.Directive;
            return _this;
          }
          Object.defineProperty(ProcessingInstruction3.prototype, "nodeType", {
            get: function() {
              return 1;
            },
            enumerable: false,
            configurable: true
          });
          return ProcessingInstruction3;
        })(DataNode)
      );
      exports.ProcessingInstruction = ProcessingInstruction2;
      var NodeWithChildren = (
        /** @class */
        (function(_super) {
          __extends(NodeWithChildren2, _super);
          function NodeWithChildren2(children) {
            var _this = _super.call(this) || this;
            _this.children = children;
            return _this;
          }
          Object.defineProperty(NodeWithChildren2.prototype, "firstChild", {
            // Aliases
            /** First child of the node. */
            get: function() {
              var _a;
              return (_a = this.children[0]) !== null && _a !== void 0 ? _a : null;
            },
            enumerable: false,
            configurable: true
          });
          Object.defineProperty(NodeWithChildren2.prototype, "lastChild", {
            /** Last child of the node. */
            get: function() {
              return this.children.length > 0 ? this.children[this.children.length - 1] : null;
            },
            enumerable: false,
            configurable: true
          });
          Object.defineProperty(NodeWithChildren2.prototype, "childNodes", {
            /**
             * Same as {@link children}.
             * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
             */
            get: function() {
              return this.children;
            },
            set: function(children) {
              this.children = children;
            },
            enumerable: false,
            configurable: true
          });
          return NodeWithChildren2;
        })(Node)
      );
      exports.NodeWithChildren = NodeWithChildren;
      var CDATA = (
        /** @class */
        (function(_super) {
          __extends(CDATA2, _super);
          function CDATA2() {
            var _this = _super !== null && _super.apply(this, arguments) || this;
            _this.type = domelementtype_1.ElementType.CDATA;
            return _this;
          }
          Object.defineProperty(CDATA2.prototype, "nodeType", {
            get: function() {
              return 4;
            },
            enumerable: false,
            configurable: true
          });
          return CDATA2;
        })(NodeWithChildren)
      );
      exports.CDATA = CDATA;
      var Document = (
        /** @class */
        (function(_super) {
          __extends(Document2, _super);
          function Document2() {
            var _this = _super !== null && _super.apply(this, arguments) || this;
            _this.type = domelementtype_1.ElementType.Root;
            return _this;
          }
          Object.defineProperty(Document2.prototype, "nodeType", {
            get: function() {
              return 9;
            },
            enumerable: false,
            configurable: true
          });
          return Document2;
        })(NodeWithChildren)
      );
      exports.Document = Document;
      var Element2 = (
        /** @class */
        (function(_super) {
          __extends(Element3, _super);
          function Element3(name123, attribs, children, type) {
            if (children === void 0) {
              children = [];
            }
            if (type === void 0) {
              type = name123 === "script" ? domelementtype_1.ElementType.Script : name123 === "style" ? domelementtype_1.ElementType.Style : domelementtype_1.ElementType.Tag;
            }
            var _this = _super.call(this, children) || this;
            _this.name = name123;
            _this.attribs = attribs;
            _this.type = type;
            return _this;
          }
          Object.defineProperty(Element3.prototype, "nodeType", {
            get: function() {
              return 1;
            },
            enumerable: false,
            configurable: true
          });
          Object.defineProperty(Element3.prototype, "tagName", {
            // DOM Level 1 aliases
            /**
             * Same as {@link name}.
             * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
             */
            get: function() {
              return this.name;
            },
            set: function(name123) {
              this.name = name123;
            },
            enumerable: false,
            configurable: true
          });
          Object.defineProperty(Element3.prototype, "attributes", {
            get: function() {
              var _this = this;
              return Object.keys(this.attribs).map(function(name123) {
                var _a, _b;
                return {
                  name: name123,
                  value: _this.attribs[name123],
                  namespace: (_a = _this["x-attribsNamespace"]) === null || _a === void 0 ? void 0 : _a[name123],
                  prefix: (_b = _this["x-attribsPrefix"]) === null || _b === void 0 ? void 0 : _b[name123]
                };
              });
            },
            enumerable: false,
            configurable: true
          });
          return Element3;
        })(NodeWithChildren)
      );
      exports.Element = Element2;
      function isTag(node) {
        return (0, domelementtype_1.isTag)(node);
      }
      exports.isTag = isTag;
      function isCDATA(node) {
        return node.type === domelementtype_1.ElementType.CDATA;
      }
      exports.isCDATA = isCDATA;
      function isText(node) {
        return node.type === domelementtype_1.ElementType.Text;
      }
      exports.isText = isText;
      function isComment(node) {
        return node.type === domelementtype_1.ElementType.Comment;
      }
      exports.isComment = isComment;
      function isDirective(node) {
        return node.type === domelementtype_1.ElementType.Directive;
      }
      exports.isDirective = isDirective;
      function isDocument(node) {
        return node.type === domelementtype_1.ElementType.Root;
      }
      exports.isDocument = isDocument;
      function hasChildren(node) {
        return Object.prototype.hasOwnProperty.call(node, "children");
      }
      exports.hasChildren = hasChildren;
      function cloneNode(node, recursive) {
        if (recursive === void 0) {
          recursive = false;
        }
        var result;
        if (isText(node)) {
          result = new Text4(node.data);
        } else if (isComment(node)) {
          result = new Comment2(node.data);
        } else if (isTag(node)) {
          var children = recursive ? cloneChildren(node.children) : [];
          var clone_1 = new Element2(node.name, __assign2({}, node.attribs), children);
          children.forEach(function(child) {
            return child.parent = clone_1;
          });
          if (node.namespace != null) {
            clone_1.namespace = node.namespace;
          }
          if (node["x-attribsNamespace"]) {
            clone_1["x-attribsNamespace"] = __assign2({}, node["x-attribsNamespace"]);
          }
          if (node["x-attribsPrefix"]) {
            clone_1["x-attribsPrefix"] = __assign2({}, node["x-attribsPrefix"]);
          }
          result = clone_1;
        } else if (isCDATA(node)) {
          var children = recursive ? cloneChildren(node.children) : [];
          var clone_2 = new CDATA(children);
          children.forEach(function(child) {
            return child.parent = clone_2;
          });
          result = clone_2;
        } else if (isDocument(node)) {
          var children = recursive ? cloneChildren(node.children) : [];
          var clone_3 = new Document(children);
          children.forEach(function(child) {
            return child.parent = clone_3;
          });
          if (node["x-mode"]) {
            clone_3["x-mode"] = node["x-mode"];
          }
          result = clone_3;
        } else if (isDirective(node)) {
          var instruction = new ProcessingInstruction2(node.name, node.data);
          if (node["x-name"] != null) {
            instruction["x-name"] = node["x-name"];
            instruction["x-publicId"] = node["x-publicId"];
            instruction["x-systemId"] = node["x-systemId"];
          }
          result = instruction;
        } else {
          throw new Error("Not implemented yet: ".concat(node.type));
        }
        result.startIndex = node.startIndex;
        result.endIndex = node.endIndex;
        if (node.sourceCodeLocation != null) {
          result.sourceCodeLocation = node.sourceCodeLocation;
        }
        return result;
      }
      exports.cloneNode = cloneNode;
      function cloneChildren(childs) {
        var children = childs.map(function(child) {
          return cloneNode(child, true);
        });
        for (var i2 = 1; i2 < children.length; i2++) {
          children[i2].prev = children[i2 - 1];
          children[i2 - 1].next = children[i2];
        }
        return children;
      }
    }
  });

  // node_modules/html-react-parser/node_modules/domhandler/lib/index.js
  var require_lib5 = __commonJS({
    "node_modules/html-react-parser/node_modules/domhandler/lib/index.js"(exports) {
      "use strict";
      var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o2, m2, k2, k22) {
        if (k22 === void 0) k22 = k2;
        var desc = Object.getOwnPropertyDescriptor(m2, k2);
        if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
          desc = { enumerable: true, get: function() {
            return m2[k2];
          } };
        }
        Object.defineProperty(o2, k22, desc);
      }) : (function(o2, m2, k2, k22) {
        if (k22 === void 0) k22 = k2;
        o2[k22] = m2[k2];
      }));
      var __exportStar = exports && exports.__exportStar || function(m2, exports2) {
        for (var p2 in m2) if (p2 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p2)) __createBinding(exports2, m2, p2);
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.DomHandler = void 0;
      var domelementtype_1 = require_lib4();
      var node_js_1 = require_node2();
      __exportStar(require_node2(), exports);
      var defaultOpts = {
        withStartIndices: false,
        withEndIndices: false,
        xmlMode: false
      };
      var DomHandler = (
        /** @class */
        (function() {
          function DomHandler2(callback, options2, elementCB) {
            this.dom = [];
            this.root = new node_js_1.Document(this.dom);
            this.done = false;
            this.tagStack = [this.root];
            this.lastNode = null;
            this.parser = null;
            if (typeof options2 === "function") {
              elementCB = options2;
              options2 = defaultOpts;
            }
            if (typeof callback === "object") {
              options2 = callback;
              callback = void 0;
            }
            this.callback = callback !== null && callback !== void 0 ? callback : null;
            this.options = options2 !== null && options2 !== void 0 ? options2 : defaultOpts;
            this.elementCB = elementCB !== null && elementCB !== void 0 ? elementCB : null;
          }
          DomHandler2.prototype.onparserinit = function(parser) {
            this.parser = parser;
          };
          DomHandler2.prototype.onreset = function() {
            this.dom = [];
            this.root = new node_js_1.Document(this.dom);
            this.done = false;
            this.tagStack = [this.root];
            this.lastNode = null;
            this.parser = null;
          };
          DomHandler2.prototype.onend = function() {
            if (this.done)
              return;
            this.done = true;
            this.parser = null;
            this.handleCallback(null);
          };
          DomHandler2.prototype.onerror = function(error) {
            this.handleCallback(error);
          };
          DomHandler2.prototype.onclosetag = function() {
            this.lastNode = null;
            var elem = this.tagStack.pop();
            if (this.options.withEndIndices) {
              elem.endIndex = this.parser.endIndex;
            }
            if (this.elementCB)
              this.elementCB(elem);
          };
          DomHandler2.prototype.onopentag = function(name123, attribs) {
            var type = this.options.xmlMode ? domelementtype_1.ElementType.Tag : void 0;
            var element = new node_js_1.Element(name123, attribs, void 0, type);
            this.addNode(element);
            this.tagStack.push(element);
          };
          DomHandler2.prototype.ontext = function(data) {
            var lastNode = this.lastNode;
            if (lastNode && lastNode.type === domelementtype_1.ElementType.Text) {
              lastNode.data += data;
              if (this.options.withEndIndices) {
                lastNode.endIndex = this.parser.endIndex;
              }
            } else {
              var node = new node_js_1.Text(data);
              this.addNode(node);
              this.lastNode = node;
            }
          };
          DomHandler2.prototype.oncomment = function(data) {
            if (this.lastNode && this.lastNode.type === domelementtype_1.ElementType.Comment) {
              this.lastNode.data += data;
              return;
            }
            var node = new node_js_1.Comment(data);
            this.addNode(node);
            this.lastNode = node;
          };
          DomHandler2.prototype.oncommentend = function() {
            this.lastNode = null;
          };
          DomHandler2.prototype.oncdatastart = function() {
            var text = new node_js_1.Text("");
            var node = new node_js_1.CDATA([text]);
            this.addNode(node);
            text.parent = node;
            this.lastNode = text;
          };
          DomHandler2.prototype.oncdataend = function() {
            this.lastNode = null;
          };
          DomHandler2.prototype.onprocessinginstruction = function(name123, data) {
            var node = new node_js_1.ProcessingInstruction(name123, data);
            this.addNode(node);
          };
          DomHandler2.prototype.handleCallback = function(error) {
            if (typeof this.callback === "function") {
              this.callback(error, this.dom);
            } else if (error) {
              throw error;
            }
          };
          DomHandler2.prototype.addNode = function(node) {
            var parent = this.tagStack[this.tagStack.length - 1];
            var previousSibling = parent.children[parent.children.length - 1];
            if (this.options.withStartIndices) {
              node.startIndex = this.parser.startIndex;
            }
            if (this.options.withEndIndices) {
              node.endIndex = this.parser.endIndex;
            }
            parent.children.push(node);
            if (previousSibling) {
              node.prev = previousSibling;
              previousSibling.next = node;
            }
            node.parent = parent;
            this.lastNode = null;
          };
          return DomHandler2;
        })()
      );
      exports.DomHandler = DomHandler;
      exports.default = DomHandler;
    }
  });

  // node_modules/html-react-parser/lib/index.js
  var require_lib6 = __commonJS({
    "node_modules/html-react-parser/lib/index.js"(exports) {
      "use strict";
      var __importDefault = exports && exports.__importDefault || function(mod) {
        return mod && mod.__esModule ? mod : { "default": mod };
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.htmlToDOM = exports.domToReact = exports.attributesToProps = exports.Text = exports.ProcessingInstruction = exports.Element = exports.Comment = void 0;
      exports.default = HTMLReactParser2;
      var html_dom_parser_1 = __importDefault(require_html_to_dom());
      exports.htmlToDOM = html_dom_parser_1.default;
      var attributes_to_props_1 = __importDefault(require_attributes_to_props());
      exports.attributesToProps = attributes_to_props_1.default;
      var dom_to_react_1 = __importDefault(require_dom_to_react());
      exports.domToReact = dom_to_react_1.default;
      var domhandler_1 = require_lib5();
      Object.defineProperty(exports, "Comment", { enumerable: true, get: function() {
        return domhandler_1.Comment;
      } });
      Object.defineProperty(exports, "Element", { enumerable: true, get: function() {
        return domhandler_1.Element;
      } });
      Object.defineProperty(exports, "ProcessingInstruction", { enumerable: true, get: function() {
        return domhandler_1.ProcessingInstruction;
      } });
      Object.defineProperty(exports, "Text", { enumerable: true, get: function() {
        return domhandler_1.Text;
      } });
      var domParserOptions = { lowerCaseAttributeNames: false };
      function HTMLReactParser2(html, options2) {
        if (typeof html !== "string") {
          throw new TypeError("First argument must be a string");
        }
        if (!html) {
          return [];
        }
        return (0, dom_to_react_1.default)((0, html_dom_parser_1.default)(html, (options2 === null || options2 === void 0 ? void 0 : options2.htmlparser2) || domParserOptions), options2);
      }
    }
  });

  // package-external:@wordpress/dom
  var require_dom = __commonJS({
    "package-external:@wordpress/dom"(exports, module) {
      module.exports = window.wp.dom;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/primitives
  var require_primitives = __commonJS({
    "package-external:@wordpress/primitives"(exports, module) {
      module.exports = window.wp.primitives;
    }
  });

  // package-external:@wordpress/components
  var require_components = __commonJS({
    "package-external:@wordpress/components"(exports, module) {
      module.exports = window.wp.components;
    }
  });

  // package-external:@wordpress/blob
  var require_blob = __commonJS({
    "package-external:@wordpress/blob"(exports, module) {
      module.exports = window.wp.blob;
    }
  });

  // package-external:@wordpress/core-data
  var require_core_data = __commonJS({
    "package-external:@wordpress/core-data"(exports, module) {
      module.exports = window.wp.coreData;
    }
  });

  // package-external:@wordpress/url
  var require_url = __commonJS({
    "package-external:@wordpress/url"(exports, module) {
      module.exports = window.wp.url;
    }
  });

  // package-external:@wordpress/html-entities
  var require_html_entities = __commonJS({
    "package-external:@wordpress/html-entities"(exports, module) {
      module.exports = window.wp.htmlEntities;
    }
  });

  // package-external:@wordpress/notices
  var require_notices = __commonJS({
    "package-external:@wordpress/notices"(exports, module) {
      module.exports = window.wp.notices;
    }
  });

  // package-external:@wordpress/private-apis
  var require_private_apis = __commonJS({
    "package-external:@wordpress/private-apis"(exports, module) {
      module.exports = window.wp.privateApis;
    }
  });

  // package-external:@wordpress/keycodes
  var require_keycodes = __commonJS({
    "package-external:@wordpress/keycodes"(exports, module) {
      module.exports = window.wp.keycodes;
    }
  });

  // package-external:@wordpress/deprecated
  var require_deprecated = __commonJS({
    "package-external:@wordpress/deprecated"(exports, module) {
      module.exports = window.wp.deprecated;
    }
  });

  // package-external:@wordpress/rich-text
  var require_rich_text = __commonJS({
    "package-external:@wordpress/rich-text"(exports, module) {
      module.exports = window.wp.richText;
    }
  });

  // package-external:@wordpress/date
  var require_date = __commonJS({
    "package-external:@wordpress/date"(exports, module) {
      module.exports = window.wp.date;
    }
  });

  // package-external:@wordpress/api-fetch
  var require_api_fetch = __commonJS({
    "package-external:@wordpress/api-fetch"(exports, module) {
      module.exports = window.wp.apiFetch;
    }
  });

  // package-external:@wordpress/hooks
  var require_hooks = __commonJS({
    "package-external:@wordpress/hooks"(exports, module) {
      module.exports = window.wp.hooks;
    }
  });

  // node_modules/remove-accents/index.js
  var require_remove_accents = __commonJS({
    "node_modules/remove-accents/index.js"(exports, module) {
      var characterMap = {
        "\xC0": "A",
        "\xC1": "A",
        "\xC2": "A",
        "\xC3": "A",
        "\xC4": "A",
        "\xC5": "A",
        "\u1EA4": "A",
        "\u1EAE": "A",
        "\u1EB2": "A",
        "\u1EB4": "A",
        "\u1EB6": "A",
        "\xC6": "AE",
        "\u1EA6": "A",
        "\u1EB0": "A",
        "\u0202": "A",
        "\u1EA2": "A",
        "\u1EA0": "A",
        "\u1EA8": "A",
        "\u1EAA": "A",
        "\u1EAC": "A",
        "\xC7": "C",
        "\u1E08": "C",
        "\xC8": "E",
        "\xC9": "E",
        "\xCA": "E",
        "\xCB": "E",
        "\u1EBE": "E",
        "\u1E16": "E",
        "\u1EC0": "E",
        "\u1E14": "E",
        "\u1E1C": "E",
        "\u0206": "E",
        "\u1EBA": "E",
        "\u1EBC": "E",
        "\u1EB8": "E",
        "\u1EC2": "E",
        "\u1EC4": "E",
        "\u1EC6": "E",
        "\xCC": "I",
        "\xCD": "I",
        "\xCE": "I",
        "\xCF": "I",
        "\u1E2E": "I",
        "\u020A": "I",
        "\u1EC8": "I",
        "\u1ECA": "I",
        "\xD0": "D",
        "\xD1": "N",
        "\xD2": "O",
        "\xD3": "O",
        "\xD4": "O",
        "\xD5": "O",
        "\xD6": "O",
        "\xD8": "O",
        "\u1ED0": "O",
        "\u1E4C": "O",
        "\u1E52": "O",
        "\u020E": "O",
        "\u1ECE": "O",
        "\u1ECC": "O",
        "\u1ED4": "O",
        "\u1ED6": "O",
        "\u1ED8": "O",
        "\u1EDC": "O",
        "\u1EDE": "O",
        "\u1EE0": "O",
        "\u1EDA": "O",
        "\u1EE2": "O",
        "\xD9": "U",
        "\xDA": "U",
        "\xDB": "U",
        "\xDC": "U",
        "\u1EE6": "U",
        "\u1EE4": "U",
        "\u1EEC": "U",
        "\u1EEE": "U",
        "\u1EF0": "U",
        "\xDD": "Y",
        "\xE0": "a",
        "\xE1": "a",
        "\xE2": "a",
        "\xE3": "a",
        "\xE4": "a",
        "\xE5": "a",
        "\u1EA5": "a",
        "\u1EAF": "a",
        "\u1EB3": "a",
        "\u1EB5": "a",
        "\u1EB7": "a",
        "\xE6": "ae",
        "\u1EA7": "a",
        "\u1EB1": "a",
        "\u0203": "a",
        "\u1EA3": "a",
        "\u1EA1": "a",
        "\u1EA9": "a",
        "\u1EAB": "a",
        "\u1EAD": "a",
        "\xE7": "c",
        "\u1E09": "c",
        "\xE8": "e",
        "\xE9": "e",
        "\xEA": "e",
        "\xEB": "e",
        "\u1EBF": "e",
        "\u1E17": "e",
        "\u1EC1": "e",
        "\u1E15": "e",
        "\u1E1D": "e",
        "\u0207": "e",
        "\u1EBB": "e",
        "\u1EBD": "e",
        "\u1EB9": "e",
        "\u1EC3": "e",
        "\u1EC5": "e",
        "\u1EC7": "e",
        "\xEC": "i",
        "\xED": "i",
        "\xEE": "i",
        "\xEF": "i",
        "\u1E2F": "i",
        "\u020B": "i",
        "\u1EC9": "i",
        "\u1ECB": "i",
        "\xF0": "d",
        "\xF1": "n",
        "\xF2": "o",
        "\xF3": "o",
        "\xF4": "o",
        "\xF5": "o",
        "\xF6": "o",
        "\xF8": "o",
        "\u1ED1": "o",
        "\u1E4D": "o",
        "\u1E53": "o",
        "\u020F": "o",
        "\u1ECF": "o",
        "\u1ECD": "o",
        "\u1ED5": "o",
        "\u1ED7": "o",
        "\u1ED9": "o",
        "\u1EDD": "o",
        "\u1EDF": "o",
        "\u1EE1": "o",
        "\u1EDB": "o",
        "\u1EE3": "o",
        "\xF9": "u",
        "\xFA": "u",
        "\xFB": "u",
        "\xFC": "u",
        "\u1EE7": "u",
        "\u1EE5": "u",
        "\u1EED": "u",
        "\u1EEF": "u",
        "\u1EF1": "u",
        "\xFD": "y",
        "\xFF": "y",
        "\u0100": "A",
        "\u0101": "a",
        "\u0102": "A",
        "\u0103": "a",
        "\u0104": "A",
        "\u0105": "a",
        "\u0106": "C",
        "\u0107": "c",
        "\u0108": "C",
        "\u0109": "c",
        "\u010A": "C",
        "\u010B": "c",
        "\u010C": "C",
        "\u010D": "c",
        "C\u0306": "C",
        "c\u0306": "c",
        "\u010E": "D",
        "\u010F": "d",
        "\u0110": "D",
        "\u0111": "d",
        "\u0112": "E",
        "\u0113": "e",
        "\u0114": "E",
        "\u0115": "e",
        "\u0116": "E",
        "\u0117": "e",
        "\u0118": "E",
        "\u0119": "e",
        "\u011A": "E",
        "\u011B": "e",
        "\u011C": "G",
        "\u01F4": "G",
        "\u011D": "g",
        "\u01F5": "g",
        "\u011E": "G",
        "\u011F": "g",
        "\u0120": "G",
        "\u0121": "g",
        "\u0122": "G",
        "\u0123": "g",
        "\u0124": "H",
        "\u0125": "h",
        "\u0126": "H",
        "\u0127": "h",
        "\u1E2A": "H",
        "\u1E2B": "h",
        "\u0128": "I",
        "\u0129": "i",
        "\u012A": "I",
        "\u012B": "i",
        "\u012C": "I",
        "\u012D": "i",
        "\u012E": "I",
        "\u012F": "i",
        "\u0130": "I",
        "\u0131": "i",
        "\u0132": "IJ",
        "\u0133": "ij",
        "\u0134": "J",
        "\u0135": "j",
        "\u0136": "K",
        "\u0137": "k",
        "\u1E30": "K",
        "\u1E31": "k",
        "K\u0306": "K",
        "k\u0306": "k",
        "\u0139": "L",
        "\u013A": "l",
        "\u013B": "L",
        "\u013C": "l",
        "\u013D": "L",
        "\u013E": "l",
        "\u013F": "L",
        "\u0140": "l",
        "\u0141": "l",
        "\u0142": "l",
        "\u1E3E": "M",
        "\u1E3F": "m",
        "M\u0306": "M",
        "m\u0306": "m",
        "\u0143": "N",
        "\u0144": "n",
        "\u0145": "N",
        "\u0146": "n",
        "\u0147": "N",
        "\u0148": "n",
        "\u0149": "n",
        "N\u0306": "N",
        "n\u0306": "n",
        "\u014C": "O",
        "\u014D": "o",
        "\u014E": "O",
        "\u014F": "o",
        "\u0150": "O",
        "\u0151": "o",
        "\u0152": "OE",
        "\u0153": "oe",
        "P\u0306": "P",
        "p\u0306": "p",
        "\u0154": "R",
        "\u0155": "r",
        "\u0156": "R",
        "\u0157": "r",
        "\u0158": "R",
        "\u0159": "r",
        "R\u0306": "R",
        "r\u0306": "r",
        "\u0212": "R",
        "\u0213": "r",
        "\u015A": "S",
        "\u015B": "s",
        "\u015C": "S",
        "\u015D": "s",
        "\u015E": "S",
        "\u0218": "S",
        "\u0219": "s",
        "\u015F": "s",
        "\u0160": "S",
        "\u0161": "s",
        "\u0162": "T",
        "\u0163": "t",
        "\u021B": "t",
        "\u021A": "T",
        "\u0164": "T",
        "\u0165": "t",
        "\u0166": "T",
        "\u0167": "t",
        "T\u0306": "T",
        "t\u0306": "t",
        "\u0168": "U",
        "\u0169": "u",
        "\u016A": "U",
        "\u016B": "u",
        "\u016C": "U",
        "\u016D": "u",
        "\u016E": "U",
        "\u016F": "u",
        "\u0170": "U",
        "\u0171": "u",
        "\u0172": "U",
        "\u0173": "u",
        "\u0216": "U",
        "\u0217": "u",
        "V\u0306": "V",
        "v\u0306": "v",
        "\u0174": "W",
        "\u0175": "w",
        "\u1E82": "W",
        "\u1E83": "w",
        "X\u0306": "X",
        "x\u0306": "x",
        "\u0176": "Y",
        "\u0177": "y",
        "\u0178": "Y",
        "Y\u0306": "Y",
        "y\u0306": "y",
        "\u0179": "Z",
        "\u017A": "z",
        "\u017B": "Z",
        "\u017C": "z",
        "\u017D": "Z",
        "\u017E": "z",
        "\u017F": "s",
        "\u0192": "f",
        "\u01A0": "O",
        "\u01A1": "o",
        "\u01AF": "U",
        "\u01B0": "u",
        "\u01CD": "A",
        "\u01CE": "a",
        "\u01CF": "I",
        "\u01D0": "i",
        "\u01D1": "O",
        "\u01D2": "o",
        "\u01D3": "U",
        "\u01D4": "u",
        "\u01D5": "U",
        "\u01D6": "u",
        "\u01D7": "U",
        "\u01D8": "u",
        "\u01D9": "U",
        "\u01DA": "u",
        "\u01DB": "U",
        "\u01DC": "u",
        "\u1EE8": "U",
        "\u1EE9": "u",
        "\u1E78": "U",
        "\u1E79": "u",
        "\u01FA": "A",
        "\u01FB": "a",
        "\u01FC": "AE",
        "\u01FD": "ae",
        "\u01FE": "O",
        "\u01FF": "o",
        "\xDE": "TH",
        "\xFE": "th",
        "\u1E54": "P",
        "\u1E55": "p",
        "\u1E64": "S",
        "\u1E65": "s",
        "X\u0301": "X",
        "x\u0301": "x",
        "\u0403": "\u0413",
        "\u0453": "\u0433",
        "\u040C": "\u041A",
        "\u045C": "\u043A",
        "A\u030B": "A",
        "a\u030B": "a",
        "E\u030B": "E",
        "e\u030B": "e",
        "I\u030B": "I",
        "i\u030B": "i",
        "\u01F8": "N",
        "\u01F9": "n",
        "\u1ED2": "O",
        "\u1ED3": "o",
        "\u1E50": "O",
        "\u1E51": "o",
        "\u1EEA": "U",
        "\u1EEB": "u",
        "\u1E80": "W",
        "\u1E81": "w",
        "\u1EF2": "Y",
        "\u1EF3": "y",
        "\u0200": "A",
        "\u0201": "a",
        "\u0204": "E",
        "\u0205": "e",
        "\u0208": "I",
        "\u0209": "i",
        "\u020C": "O",
        "\u020D": "o",
        "\u0210": "R",
        "\u0211": "r",
        "\u0214": "U",
        "\u0215": "u",
        "B\u030C": "B",
        "b\u030C": "b",
        "\u010C\u0323": "C",
        "\u010D\u0323": "c",
        "\xCA\u030C": "E",
        "\xEA\u030C": "e",
        "F\u030C": "F",
        "f\u030C": "f",
        "\u01E6": "G",
        "\u01E7": "g",
        "\u021E": "H",
        "\u021F": "h",
        "J\u030C": "J",
        "\u01F0": "j",
        "\u01E8": "K",
        "\u01E9": "k",
        "M\u030C": "M",
        "m\u030C": "m",
        "P\u030C": "P",
        "p\u030C": "p",
        "Q\u030C": "Q",
        "q\u030C": "q",
        "\u0158\u0329": "R",
        "\u0159\u0329": "r",
        "\u1E66": "S",
        "\u1E67": "s",
        "V\u030C": "V",
        "v\u030C": "v",
        "W\u030C": "W",
        "w\u030C": "w",
        "X\u030C": "X",
        "x\u030C": "x",
        "Y\u030C": "Y",
        "y\u030C": "y",
        "A\u0327": "A",
        "a\u0327": "a",
        "B\u0327": "B",
        "b\u0327": "b",
        "\u1E10": "D",
        "\u1E11": "d",
        "\u0228": "E",
        "\u0229": "e",
        "\u0190\u0327": "E",
        "\u025B\u0327": "e",
        "\u1E28": "H",
        "\u1E29": "h",
        "I\u0327": "I",
        "i\u0327": "i",
        "\u0197\u0327": "I",
        "\u0268\u0327": "i",
        "M\u0327": "M",
        "m\u0327": "m",
        "O\u0327": "O",
        "o\u0327": "o",
        "Q\u0327": "Q",
        "q\u0327": "q",
        "U\u0327": "U",
        "u\u0327": "u",
        "X\u0327": "X",
        "x\u0327": "x",
        "Z\u0327": "Z",
        "z\u0327": "z",
        "\u0439": "\u0438",
        "\u0419": "\u0418",
        "\u0451": "\u0435",
        "\u0401": "\u0415"
      };
      var chars = Object.keys(characterMap).join("|");
      var allAccents = new RegExp(chars, "g");
      var firstAccent = new RegExp(chars, "");
      function matcher(match) {
        return characterMap[match];
      }
      var removeAccents5 = function(string) {
        return string.replace(allAccents, matcher);
      };
      var hasAccents = function(string) {
        return !!string.match(firstAccent);
      };
      module.exports = removeAccents5;
      module.exports.has = hasAccents;
      module.exports.remove = removeAccents5;
    }
  });

  // package-external:@wordpress/upload-media
  var require_upload_media = __commonJS({
    "package-external:@wordpress/upload-media"(exports, module) {
      module.exports = window.wp.uploadMedia;
    }
  });

  // package-external:@wordpress/a11y
  var require_a11y = __commonJS({
    "package-external:@wordpress/a11y"(exports, module) {
      module.exports = window.wp.a11y;
    }
  });

  // package-external:@wordpress/escape-html
  var require_escape_html = __commonJS({
    "package-external:@wordpress/escape-html"(exports, module) {
      module.exports = window.wp.escapeHtml;
    }
  });

  // package-external:@wordpress/wordcount
  var require_wordcount = __commonJS({
    "package-external:@wordpress/wordcount"(exports, module) {
      module.exports = window.wp.wordcount;
    }
  });

  // package-external:@wordpress/patterns
  var require_patterns = __commonJS({
    "package-external:@wordpress/patterns"(exports, module) {
      module.exports = window.wp.patterns;
    }
  });

  // package-external:@wordpress/autop
  var require_autop = __commonJS({
    "package-external:@wordpress/autop"(exports, module) {
      module.exports = window.wp.autop;
    }
  });

  // node_modules/fast-deep-equal/es6/index.js
  var require_es6 = __commonJS({
    "node_modules/fast-deep-equal/es6/index.js"(exports, module) {
      "use strict";
      module.exports = function equal(a2, b2) {
        if (a2 === b2) return true;
        if (a2 && b2 && typeof a2 == "object" && typeof b2 == "object") {
          if (a2.constructor !== b2.constructor) return false;
          var length, i2, keys;
          if (Array.isArray(a2)) {
            length = a2.length;
            if (length != b2.length) return false;
            for (i2 = length; i2-- !== 0; )
              if (!equal(a2[i2], b2[i2])) return false;
            return true;
          }
          if (a2 instanceof Map && b2 instanceof Map) {
            if (a2.size !== b2.size) return false;
            for (i2 of a2.entries())
              if (!b2.has(i2[0])) return false;
            for (i2 of a2.entries())
              if (!equal(i2[1], b2.get(i2[0]))) return false;
            return true;
          }
          if (a2 instanceof Set && b2 instanceof Set) {
            if (a2.size !== b2.size) return false;
            for (i2 of a2.entries())
              if (!b2.has(i2[0])) return false;
            return true;
          }
          if (ArrayBuffer.isView(a2) && ArrayBuffer.isView(b2)) {
            length = a2.length;
            if (length != b2.length) return false;
            for (i2 = length; i2-- !== 0; )
              if (a2[i2] !== b2[i2]) return false;
            return true;
          }
          if (a2.constructor === RegExp) return a2.source === b2.source && a2.flags === b2.flags;
          if (a2.valueOf !== Object.prototype.valueOf) return a2.valueOf() === b2.valueOf();
          if (a2.toString !== Object.prototype.toString) return a2.toString() === b2.toString();
          keys = Object.keys(a2);
          length = keys.length;
          if (length !== Object.keys(b2).length) return false;
          for (i2 = length; i2-- !== 0; )
            if (!Object.prototype.hasOwnProperty.call(b2, keys[i2])) return false;
          for (i2 = length; i2-- !== 0; ) {
            var key = keys[i2];
            if (!equal(a2[key], b2[key])) return false;
          }
          return true;
        }
        return a2 !== a2 && b2 !== b2;
      };
    }
  });

  // package-external:@wordpress/keyboard-shortcuts
  var require_keyboard_shortcuts = __commonJS({
    "package-external:@wordpress/keyboard-shortcuts"(exports, module) {
      module.exports = window.wp.keyboardShortcuts;
    }
  });

  // packages/block-library/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    __experimentalGetCoreBlocks: () => __experimentalGetCoreBlocks,
    __experimentalRegisterExperimentalCoreBlocks: () => __experimentalRegisterExperimentalCoreBlocks,
    privateApis: () => privateApis3,
    registerCoreBlocks: () => registerCoreBlocks
  });
  var import_blocks129 = __toESM(require_blocks(), 1);
  var import_compose61 = __toESM(require_compose(), 1);
  var import_data170 = __toESM(require_data(), 1);
  var import_block_editor296 = __toESM(require_block_editor(), 1);
  var import_server_side_render7 = __toESM(require_server_side_render(), 1);
  var import_i18n274 = __toESM(require_i18n(), 1);

  // node_modules/clsx/dist/clsx.mjs
  function r(e2) {
    var t2, f2, n2 = "";
    if ("string" == typeof e2 || "number" == typeof e2) n2 += e2;
    else if ("object" == typeof e2) if (Array.isArray(e2)) {
      var o2 = e2.length;
      for (t2 = 0; t2 < o2; t2++) e2[t2] && (f2 = r(e2[t2])) && (n2 && (n2 += " "), n2 += f2);
    } else for (f2 in e2) e2[f2] && (n2 && (n2 += " "), n2 += f2);
    return n2;
  }
  function clsx() {
    for (var e2, t2, f2 = 0, n2 = "", o2 = arguments.length; f2 < o2; f2++) (e2 = arguments[f2]) && (t2 = r(e2)) && (n2 && (n2 += " "), n2 += t2);
    return n2;
  }
  var clsx_default = clsx;

  // node_modules/html-react-parser/esm/index.mjs
  var import_lib = __toESM(require_lib6(), 1);
  var import_lib2 = __toESM(require_lib6(), 1);
  var esm_default = import_lib.default.default || import_lib.default;

  // packages/block-library/build-module/utils/html-renderer.mjs
  var import_dom = __toESM(require_dom(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  var HtmlRenderer = ({ wrapperProps = {}, html = "" }) => {
    const options2 = {
      replace: ({ name: name123, type, attribs, parent, children }) => {
        if (type === "tag" && name123) {
          const parsedProps = (0, import_lib2.attributesToProps)(attribs || {});
          const TagName2 = name123;
          if (!parent) {
            const mergedProps = {
              ...parsedProps,
              ...wrapperProps,
              className: clsx_default(
                parsedProps.className,
                wrapperProps.className
              ),
              style: {
                ...parsedProps.style || {},
                ...wrapperProps.style || {}
              }
            };
            return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TagName2, { ...mergedProps, children: (0, import_lib2.domToReact)(children, options2) });
          }
        }
      }
    };
    const sanitizedContent = (0, import_dom.safeHTML)(html);
    const parsedContent = esm_default(sanitizedContent, options2);
    return parsedContent;
  };
  var html_renderer_default = HtmlRenderer;

  // packages/block-library/build-module/accordion/index.mjs
  var accordion_exports = {};
  __export(accordion_exports, {
    init: () => init,
    metadata: () => block_default,
    name: () => name,
    settings: () => settings
  });
  var import_i18n2 = __toESM(require_i18n(), 1);

  // packages/icons/build-module/icon/index.mjs
  var import_element = __toESM(require_element(), 1);
  var icon_default = (0, import_element.forwardRef)(
    ({ icon: icon4, size = 24, ...props }, ref) => {
      return (0, import_element.cloneElement)(icon4, {
        width: size,
        height: size,
        ...props,
        ref
      });
    }
  );

  // packages/icons/build-module/library/accordion-heading.mjs
  var import_primitives = __toESM(require_primitives(), 1);
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  var accordion_heading_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M19.5 12.75L9.5 12.75L9.5 11.25L19.5 11.25L19.5 12.75Z" }),
    /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives.Path, { d: "M4.5 9.5L8.5 12L4.5 14.5L4.5 9.5Z" })
  ] });

  // packages/icons/build-module/library/accordion-item.mjs
  var import_primitives2 = __toESM(require_primitives(), 1);
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
  var accordion_item_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives2.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M19.5 9.5L9.5 9.5L9.5 8L19.5 8L19.5 9.5Z" }),
    /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives2.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M19.5 13L9.5 13L9.5 11.5L19.5 11.5L19.5 13Z" }),
    /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives2.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M19.5 16.3999L9.5 16.3999L9.5 14.8999L19.5 14.8999L19.5 16.3999Z" }),
    /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives2.Path, { d: "M4.5 6.25L8.5 8.75L4.5 11.25L4.5 6.25Z" })
  ] });

  // packages/icons/build-module/library/accordion.mjs
  var import_primitives3 = __toESM(require_primitives(), 1);
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
  var accordion_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives3.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M19.5 9.25L9.5 9.25L9.5 7.75L19.5 7.75L19.5 9.25Z" }),
    /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives3.Path, { d: "M4.5 6L8.5 8.5L4.5 11L4.5 6Z" }),
    /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives3.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M19.5 16.25L9.5 16.25L9.5 14.75L19.5 14.75L19.5 16.25Z" }),
    /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives3.Path, { d: "M4.5 13L8.5 15.5L4.5 18L4.5 13Z" })
  ] });

  // packages/icons/build-module/library/add-submenu.mjs
  var import_primitives4 = __toESM(require_primitives(), 1);
  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
  var add_submenu_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives4.Path, { d: "M2 12c0 3.6 2.4 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.5 0-4.5-1.5-4.5-4s2-4.5 4.5-4.5h3.5V6H8c-3.6 0-6 2.4-6 6zm19.5-1h-8v1.5h8V11zm0 5h-8v1.5h8V16zm0-10h-8v1.5h8V6z" }) });

  // packages/icons/build-module/library/align-center.mjs
  var import_primitives5 = __toESM(require_primitives(), 1);
  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
  var align_center_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives5.Path, { d: "M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z" }) });

  // packages/icons/build-module/library/align-left.mjs
  var import_primitives6 = __toESM(require_primitives(), 1);
  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
  var align_left_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives6.Path, { d: "M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z" }) });

  // packages/icons/build-module/library/align-none.mjs
  var import_primitives7 = __toESM(require_primitives(), 1);
  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
  var align_none_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives7.Path, { d: "M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z" }) });

  // packages/icons/build-module/library/align-right.mjs
  var import_primitives8 = __toESM(require_primitives(), 1);
  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
  var align_right_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives8.Path, { d: "M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z" }) });

  // packages/icons/build-module/library/archive.mjs
  var import_primitives9 = __toESM(require_primitives(), 1);
  var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
  var archive_default = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives9.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/audio.mjs
  var import_primitives10 = __toESM(require_primitives(), 1);
  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
  var audio_default = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives10.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives10.Path, { d: "M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z" }) });

  // packages/icons/build-module/library/block-default.mjs
  var import_primitives11 = __toESM(require_primitives(), 1);
  var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
  var block_default_default = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives11.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives11.Path, { d: "M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z" }) });

  // packages/icons/build-module/library/block-table.mjs
  var import_primitives12 = __toESM(require_primitives(), 1);
  var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
  var block_table_default = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives12.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives12.Path, { 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" }) });

  // packages/icons/build-module/library/breadcrumbs.mjs
  var import_primitives13 = __toESM(require_primitives(), 1);
  var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
  var breadcrumbs_default = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives13.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives13.Path, { d: "M4 13.5h3v-3H4v3Zm6-3.5 2 2-2 2 1 1 3-3-3-3-1 1Zm7 .5v3h3v-3h-3Z" }) });

  // packages/icons/build-module/library/button.mjs
  var import_primitives14 = __toESM(require_primitives(), 1);
  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
  var button_default = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives14.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives14.Path, { d: "M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z" }) });

  // packages/icons/build-module/library/buttons.mjs
  var import_primitives15 = __toESM(require_primitives(), 1);
  var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
  var buttons_default = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives15.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives15.Path, { d: "M14.5 17.5H9.5V16H14.5V17.5Z M14.5 8H9.5V6.5H14.5V8Z M7 3.5H17C18.1046 3.5 19 4.39543 19 5.5V9C19 10.1046 18.1046 11 17 11H7C5.89543 11 5 10.1046 5 9V5.5C5 4.39543 5.89543 3.5 7 3.5ZM17 5H7C6.72386 5 6.5 5.22386 6.5 5.5V9C6.5 9.27614 6.72386 9.5 7 9.5H17C17.2761 9.5 17.5 9.27614 17.5 9V5.5C17.5 5.22386 17.2761 5 17 5Z M7 13H17C18.1046 13 19 13.8954 19 15V18.5C19 19.6046 18.1046 20.5 17 20.5H7C5.89543 20.5 5 19.6046 5 18.5V15C5 13.8954 5.89543 13 7 13ZM17 14.5H7C6.72386 14.5 6.5 14.7239 6.5 15V18.5C6.5 18.7761 6.72386 19 7 19H17C17.2761 19 17.5 18.7761 17.5 18.5V15C17.5 14.7239 17.2761 14.5 17 14.5Z" }) });

  // packages/icons/build-module/library/calendar.mjs
  var import_primitives16 = __toESM(require_primitives(), 1);
  var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
  var calendar_default = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives16.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives16.Path, { 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" }) });

  // packages/icons/build-module/library/caption.mjs
  var import_primitives17 = __toESM(require_primitives(), 1);
  var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
  var caption_default = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_primitives17.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_primitives17.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M6 5.5h12a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5ZM4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6Zm4 10h2v-1.5H8V16Zm5 0h-2v-1.5h2V16Zm1 0h2v-1.5h-2V16Z" }) });

  // packages/icons/build-module/library/category.mjs
  var import_primitives18 = __toESM(require_primitives(), 1);
  var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
  var category_default = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_primitives18.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_primitives18.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/chevron-down.mjs
  var import_primitives19 = __toESM(require_primitives(), 1);
  var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
  var chevron_down_default = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_primitives19.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_primitives19.Path, { d: "M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z" }) });

  // packages/icons/build-module/library/chevron-left-small.mjs
  var import_primitives20 = __toESM(require_primitives(), 1);
  var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
  var chevron_left_small_default = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_primitives20.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_primitives20.Path, { d: "m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z" }) });

  // packages/icons/build-module/library/chevron-left.mjs
  var import_primitives21 = __toESM(require_primitives(), 1);
  var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
  var chevron_left_default = /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives21.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives21.Path, { d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z" }) });

  // packages/icons/build-module/library/chevron-right-small.mjs
  var import_primitives22 = __toESM(require_primitives(), 1);
  var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
  var chevron_right_small_default = /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_primitives22.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_primitives22.Path, { d: "M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z" }) });

  // packages/icons/build-module/library/chevron-right.mjs
  var import_primitives23 = __toESM(require_primitives(), 1);
  var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
  var chevron_right_default = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_primitives23.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_primitives23.Path, { d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z" }) });

  // packages/icons/build-module/library/chevron-up.mjs
  var import_primitives24 = __toESM(require_primitives(), 1);
  var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
  var chevron_up_default = /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_primitives24.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_primitives24.Path, { d: "M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z" }) });

  // packages/icons/build-module/library/classic.mjs
  var import_primitives25 = __toESM(require_primitives(), 1);
  var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
  var classic_default = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_primitives25.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_primitives25.Path, { d: "M20 6H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H4c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h16c.3 0 .5.2.5.5v9zM10 10H8v2h2v-2zm-5 2h2v-2H5v2zm8-2h-2v2h2v-2zm-5 6h8v-2H8v2zm6-4h2v-2h-2v2zm3 0h2v-2h-2v2zm0 4h2v-2h-2v2zM5 16h2v-2H5v2z" }) });

  // packages/icons/build-module/library/close.mjs
  var import_primitives26 = __toESM(require_primitives(), 1);
  var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
  var close_default = /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_primitives26.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_primitives26.Path, { d: "m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z" }) });

  // packages/icons/build-module/library/code.mjs
  var import_primitives27 = __toESM(require_primitives(), 1);
  var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
  var code_default = /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_primitives27.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_primitives27.Path, { d: "M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z" }) });

  // packages/icons/build-module/library/column.mjs
  var import_primitives28 = __toESM(require_primitives(), 1);
  var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
  var column_default = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_primitives28.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_primitives28.Path, { d: "M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM6 17.5c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h3v10H6zm13.5-.5c0 .3-.2.5-.5.5h-3v-10h3c.3 0 .5.2.5.5v9z" }) });

  // packages/icons/build-module/library/columns.mjs
  var import_primitives29 = __toESM(require_primitives(), 1);
  var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
  var columns_default = /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_primitives29.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_primitives29.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M15 7.5h-5v10h5v-10Zm1.5 0v10H19a.5.5 0 0 0 .5-.5V8a.5.5 0 0 0-.5-.5h-2.5ZM6 7.5h2.5v10H6a.5.5 0 0 1-.5-.5V8a.5.5 0 0 1 .5-.5ZM6 6h13a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2Z" }) });

  // packages/icons/build-module/library/comment-author-avatar.mjs
  var import_primitives30 = __toESM(require_primitives(), 1);
  var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
  var comment_author_avatar_default = /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_primitives30.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_primitives30.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/comment-author-name.mjs
  var import_primitives31 = __toESM(require_primitives(), 1);
  var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
  var comment_author_name_default = /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_primitives31.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_primitives31.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z" }),
    /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_primitives31.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M15 15V15C15 13.8954 14.1046 13 13 13L11 13C9.89543 13 9 13.8954 9 15V15" }),
    /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_primitives31.Circle, { cx: "12", cy: "9", r: "2", fillRule: "evenodd", clipRule: "evenodd" })
  ] });

  // packages/icons/build-module/library/comment-content.mjs
  var import_primitives32 = __toESM(require_primitives(), 1);
  var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
  var comment_content_default = /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_primitives32.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_primitives32.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M6.68822 16.625L5.5 17.8145L5.5 5.5L18.5 5.5L18.5 16.625L6.68822 16.625ZM7.31 18.125L19 18.125C19.5523 18.125 20 17.6773 20 17.125L20 5C20 4.44772 19.5523 4 19 4H5C4.44772 4 4 4.44772 4 5V19.5247C4 19.8173 4.16123 20.086 4.41935 20.2237C4.72711 20.3878 5.10601 20.3313 5.35252 20.0845L7.31 18.125ZM16 9.99997H8V8.49997H16V9.99997ZM8 14H13V12.5H8V14Z" }) });

  // packages/icons/build-module/library/comment-edit-link.mjs
  var import_primitives33 = __toESM(require_primitives(), 1);
  var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
  var comment_edit_link_default = /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_primitives33.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_primitives33.Path, { d: "m6.249 11.065.44-.44h3.186l-1.5 1.5H7.31l-1.957 1.96A.792.792 0 0 1 4 13.524V5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v1.5L12.5 8V5.5h-7v6.315l.749-.75ZM20 19.75H7v-1.5h13v1.5Zm0-12.653-8.967 9.064L8 17l.867-2.935L17.833 5 20 7.097Z" }) });

  // packages/icons/build-module/library/comment-reply-link.mjs
  var import_primitives34 = __toESM(require_primitives(), 1);
  var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
  var comment_reply_link_default = /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_primitives34.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_primitives34.Path, { d: "M6.68822 10.625L6.24878 11.0649L5.5 11.8145L5.5 5.5L12.5 5.5V8L14 6.5V5C14 4.44772 13.5523 4 13 4H5C4.44772 4 4 4.44771 4 5V13.5247C4 13.8173 4.16123 14.086 4.41935 14.2237C4.72711 14.3878 5.10601 14.3313 5.35252 14.0845L7.31 12.125H8.375L9.875 10.625H7.31H6.68822ZM14.5605 10.4983L11.6701 13.75H16.9975C17.9963 13.75 18.7796 14.1104 19.3553 14.7048C19.9095 15.2771 20.2299 16.0224 20.4224 16.7443C20.7645 18.0276 20.7543 19.4618 20.7487 20.2544C20.7481 20.345 20.7475 20.4272 20.7475 20.4999L19.2475 20.5001C19.2475 20.4191 19.248 20.3319 19.2484 20.2394V20.2394C19.2526 19.4274 19.259 18.2035 18.973 17.1307C18.8156 16.5401 18.586 16.0666 18.2778 15.7483C17.9909 15.4521 17.5991 15.25 16.9975 15.25H11.8106L14.5303 17.9697L13.4696 19.0303L8.96956 14.5303L13.4394 9.50171L14.5605 10.4983Z" }) });

  // packages/icons/build-module/library/comment.mjs
  var import_primitives35 = __toESM(require_primitives(), 1);
  var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
  var comment_default = /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_primitives35.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_primitives35.Path, { d: "M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z" }) });

  // packages/icons/build-module/library/contents.mjs
  var import_primitives36 = __toESM(require_primitives(), 1);
  var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
  var contents_default = /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_primitives36.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_primitives36.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M8.10417 6.00024H6.5C5.39543 6.00024 4.5 6.89567 4.5 8.00024V10.3336H6V8.00024C6 7.7241 6.22386 7.50024 6.5 7.50024H8.10417V6.00024ZM4.5 13.6669V16.0002C4.5 17.1048 5.39543 18.0002 6.5 18.0002H8.10417V16.5002H6.5C6.22386 16.5002 6 16.2764 6 16.0002V13.6669H4.5ZM10.3958 6.00024V7.50024H13.6042V6.00024H10.3958ZM15.8958 6.00024V7.50024H17.5C17.7761 7.50024 18 7.7241 18 8.00024V10.3336H19.5V8.00024C19.5 6.89567 18.6046 6.00024 17.5 6.00024H15.8958ZM19.5 13.6669H18V16.0002C18 16.2764 17.7761 16.5002 17.5 16.5002H15.8958V18.0002H17.5C18.6046 18.0002 19.5 17.1048 19.5 16.0002V13.6669ZM13.6042 18.0002V16.5002H10.3958V18.0002H13.6042Z" }) });

  // packages/icons/build-module/library/cover.mjs
  var import_primitives37 = __toESM(require_primitives(), 1);
  var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
  var cover_default = /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_primitives37.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_primitives37.Path, { 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-.8h6.2v8.9l2.5-3.1 2.5 3.1V4.5h2.2c.4 0 .8.4.8.8v13.4z" }) });

  // packages/icons/build-module/library/crop.mjs
  var import_primitives38 = __toESM(require_primitives(), 1);
  var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
  var crop_default = /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_primitives38.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_primitives38.Path, { d: "M18 20v-2h2v-1.5H7.75a.25.25 0 0 1-.25-.25V4H6v2H4v1.5h2v8.75c0 .966.784 1.75 1.75 1.75h8.75v2H18ZM9.273 7.5h6.977a.25.25 0 0 1 .25.25v6.977H18V7.75A1.75 1.75 0 0 0 16.25 6H9.273v1.5Z" }) });

  // packages/icons/build-module/library/custom-link.mjs
  var import_primitives39 = __toESM(require_primitives(), 1);
  var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
  var custom_link_default = /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_primitives39.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_primitives39.Path, { d: "M12.5 14.5h-1V16h1c2.2 0 4-1.8 4-4s-1.8-4-4-4h-1v1.5h1c1.4 0 2.5 1.1 2.5 2.5s-1.1 2.5-2.5 2.5zm-4 1.5v-1.5h-1C6.1 14.5 5 13.4 5 12s1.1-2.5 2.5-2.5h1V8h-1c-2.2 0-4 1.8-4 4s1.8 4 4 4h1zm-1-3.2h5v-1.5h-5v1.5zM18 4H9c-1.1 0-2 .9-2 2v.5h1.5V6c0-.3.2-.5.5-.5h9c.3 0 .5.2.5.5v12c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5v-.5H7v.5c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2z" }) });

  // packages/icons/build-module/library/custom-post-type.mjs
  var import_primitives40 = __toESM(require_primitives(), 1);
  var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
  var custom_post_type_default = /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_primitives40.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_primitives40.Path, { d: "M4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4zm.8-4l.7.7 2-2V12h1V9.2l2 2 .7-.7-2-2H12v-1H9.2l2-2-.7-.7-2 2V4h-1v2.8l-2-2-.7.7 2 2H4v1h2.8l-2 2z" }) });

  // packages/icons/build-module/library/details.mjs
  var import_primitives41 = __toESM(require_primitives(), 1);
  var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
  var details_default = /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_primitives41.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_primitives41.Path, { d: "M4 16h10v1.5H4V16Zm0-4.5h16V13H4v-1.5ZM10 7h10v1.5H10V7Z", fillRule: "evenodd", clipRule: "evenodd" }),
    /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_primitives41.Path, { d: "m4 5.25 4 2.5-4 2.5v-5Z" })
  ] });

  // packages/icons/build-module/library/external.mjs
  var import_primitives42 = __toESM(require_primitives(), 1);
  var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
  var external_default = /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_primitives42.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_primitives42.Path, { 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" }) });

  // packages/icons/build-module/library/file.mjs
  var import_primitives43 = __toESM(require_primitives(), 1);
  var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
  var file_default = /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_primitives43.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_primitives43.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/footer.mjs
  var import_primitives44 = __toESM(require_primitives(), 1);
  var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
  var footer_default = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_primitives44.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_primitives44.Path, { fillRule: "evenodd", d: "M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z" }) });

  // packages/icons/build-module/library/format-indent-rtl.mjs
  var import_primitives45 = __toESM(require_primitives(), 1);
  var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
  var format_indent_rtl_default = /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_primitives45.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_primitives45.Path, { d: "M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM20.0303 9.03033L17.0607 12L20.0303 14.9697L18.9697 16.0303L15.4697 12.5303L14.9393 12L15.4697 11.4697L18.9697 7.96967L20.0303 9.03033Z" }) });

  // packages/icons/build-module/library/format-indent.mjs
  var import_primitives46 = __toESM(require_primitives(), 1);
  var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
  var format_indent_default = /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_primitives46.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_primitives46.Path, { d: "M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-8-3.5l3 3-3 3 1 1 4-4-4-4-1 1z" }) });

  // packages/icons/build-module/library/format-list-bullets-rtl.mjs
  var import_primitives47 = __toESM(require_primitives(), 1);
  var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
  var format_list_bullets_rtl_default = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_primitives47.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_primitives47.Path, { 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" }) });

  // packages/icons/build-module/library/format-list-bullets.mjs
  var import_primitives48 = __toESM(require_primitives(), 1);
  var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
  var format_list_bullets_default = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_primitives48.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_primitives48.Path, { 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" }) });

  // packages/icons/build-module/library/format-list-numbered-rtl.mjs
  var import_primitives49 = __toESM(require_primitives(), 1);
  var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
  var format_list_numbered_rtl_default = /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_primitives49.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_primitives49.Path, { d: "M3.8 15.8h8.9v-1.5H3.8v1.5zm0-7h8.9V7.2H3.8v1.6zm14.7-2.1V10h1V5.3l-2.2.7.3 1 .9-.3zm1.2 6.1c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5H20v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3 0-.8-.3-1.1z" }) });

  // packages/icons/build-module/library/format-list-numbered.mjs
  var import_primitives50 = __toESM(require_primitives(), 1);
  var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
  var format_list_numbered_default = /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_primitives50.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_primitives50.Path, { d: "M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM5 6.7V10h1V5.3L3.8 6l.4 1 .8-.3zm-.4 5.7c-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-1c.3-.6.8-1.4.9-2.1.1-.3 0-.8-.2-1.1-.5-.6-1.3-.5-1.7-.4z" }) });

  // packages/icons/build-module/library/format-ltr.mjs
  var import_primitives51 = __toESM(require_primitives(), 1);
  var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
  var format_ltr_default = /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_primitives51.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_primitives51.Path, { d: "M3 9c0 2.8 2.2 5 5 5v-.2V20h1.5V5.5H12V20h1.5V5.5h3V4H8C5.2 4 3 6.2 3 9Zm15.9-1-1.1 1 2.6 3-2.6 3 1.1 1 3.4-4-3.4-4Z" }) });

  // packages/icons/build-module/library/format-outdent-rtl.mjs
  var import_primitives52 = __toESM(require_primitives(), 1);
  var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
  var format_outdent_rtl_default = /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_primitives52.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_primitives52.Path, { d: "M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM15.4697 14.9697L18.4393 12L15.4697 9.03033L16.5303 7.96967L20.0303 11.4697L20.5607 12L20.0303 12.5303L16.5303 16.0303L15.4697 14.9697Z" }) });

  // packages/icons/build-module/library/format-outdent.mjs
  var import_primitives53 = __toESM(require_primitives(), 1);
  var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
  var format_outdent_default = /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_primitives53.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_primitives53.Path, { d: "M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-4-4.6l-4 4 4 4 1-1-3-3 3-3-1-1z" }) });

  // packages/icons/build-module/library/fullscreen.mjs
  var import_primitives54 = __toESM(require_primitives(), 1);
  var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
  var fullscreen_default = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_primitives54.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_primitives54.Path, { d: "M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z" }) });

  // packages/icons/build-module/library/gallery.mjs
  var import_primitives55 = __toESM(require_primitives(), 1);
  var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
  var gallery_default = /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_primitives55.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_primitives55.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M16.375 4.5H4.625a.125.125 0 0 0-.125.125v8.254l2.859-1.54a.75.75 0 0 1 .68-.016l2.384 1.142 2.89-2.074a.75.75 0 0 1 .874 0l2.313 1.66V4.625a.125.125 0 0 0-.125-.125Zm.125 9.398-2.75-1.975-2.813 2.02a.75.75 0 0 1-.76.067l-2.444-1.17L4.5 14.583v1.792c0 .069.056.125.125.125h11.75a.125.125 0 0 0 .125-.125v-2.477ZM4.625 3C3.728 3 3 3.728 3 4.625v11.75C3 17.273 3.728 18 4.625 18h11.75c.898 0 1.625-.727 1.625-1.625V4.625C18 3.728 17.273 3 16.375 3H4.625ZM20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z" }) });

  // packages/icons/build-module/library/grid.mjs
  var import_primitives56 = __toESM(require_primitives(), 1);
  var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1);
  var grid_default = /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_primitives56.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_primitives56.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z" }) });

  // packages/icons/build-module/library/group.mjs
  var import_primitives57 = __toESM(require_primitives(), 1);
  var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1);
  var group_default = /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_primitives57.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_primitives57.Path, { d: "M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z" }) });

  // packages/icons/build-module/library/header.mjs
  var import_primitives58 = __toESM(require_primitives(), 1);
  var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1);
  var header_default = /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_primitives58.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_primitives58.Path, { d: "M18.5 10.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" }) });

  // packages/icons/build-module/library/heading-level-1.mjs
  var import_primitives59 = __toESM(require_primitives(), 1);
  var import_jsx_runtime60 = __toESM(require_jsx_runtime(), 1);
  var heading_level_1_default = /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_primitives59.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_primitives59.Path, { d: "M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z" }) });

  // packages/icons/build-module/library/heading-level-2.mjs
  var import_primitives60 = __toESM(require_primitives(), 1);
  var import_jsx_runtime61 = __toESM(require_jsx_runtime(), 1);
  var heading_level_2_default = /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_primitives60.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_primitives60.Path, { d: "M9 11.1H5v-4H3v10h2v-4h4v4h2v-10H9v4zm8 4c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6v1.5h8v-2H17z" }) });

  // packages/icons/build-module/library/heading-level-3.mjs
  var import_primitives61 = __toESM(require_primitives(), 1);
  var import_jsx_runtime62 = __toESM(require_jsx_runtime(), 1);
  var heading_level_3_default = /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_primitives61.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_primitives61.Path, { d: "M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.3 1.7c-.4-.4-1-.7-1.6-.8v-.1c.6-.2 1.1-.5 1.5-.9.3-.4.5-.8.5-1.3 0-.4-.1-.8-.3-1.1-.2-.3-.5-.6-.8-.8-.4-.2-.8-.4-1.2-.5-.6-.1-1.1-.2-1.6-.2-.6 0-1.3.1-1.8.3s-1.1.5-1.6.9l1.2 1.4c.4-.2.7-.4 1.1-.6.3-.2.7-.3 1.1-.3.4 0 .8.1 1.1.3.3.2.4.5.4.8 0 .4-.2.7-.6.9-.7.3-1.5.5-2.2.4v1.6c.5 0 1 0 1.5.1.3.1.7.2 1 .3.2.1.4.2.5.4s.1.4.1.6c0 .3-.2.7-.5.8-.4.2-.9.3-1.4.3s-1-.1-1.4-.3c-.4-.2-.8-.4-1.2-.7L13 15.6c.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.6 0 1.1-.1 1.6-.2.4-.1.9-.2 1.3-.5.4-.2.7-.5.9-.9.2-.4.3-.8.3-1.2 0-.6-.3-1.1-.7-1.5z" }) });

  // packages/icons/build-module/library/heading-level-4.mjs
  var import_primitives62 = __toESM(require_primitives(), 1);
  var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1);
  var heading_level_4_default = /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_primitives62.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_primitives62.Path, { d: "M20 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z" }) });

  // packages/icons/build-module/library/heading-level-5.mjs
  var import_primitives63 = __toESM(require_primitives(), 1);
  var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
  var heading_level_5_default = /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_primitives63.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_primitives63.Path, { d: "M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.7 1.2c-.2-.3-.5-.7-.8-.9-.3-.3-.7-.5-1.1-.6-.5-.1-.9-.2-1.4-.2-.2 0-.5.1-.7.1-.2.1-.5.1-.7.2l.1-1.9h4.3V7H14l-.3 5 1 .6.5-.2.4-.1c.1-.1.3-.1.4-.1h.5c.5 0 1 .1 1.4.4.4.2.6.7.6 1.1 0 .4-.2.8-.6 1.1-.4.3-.9.4-1.4.4-.4 0-.9-.1-1.3-.3-.4-.2-.7-.4-1.1-.7 0 0-1.1 1.4-1 1.5.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.5 0 1-.1 1.5-.3s.9-.4 1.3-.7c.4-.3.7-.7.9-1.1s.3-.9.3-1.4-.1-1-.3-1.4z" }) });

  // packages/icons/build-module/library/heading-level-6.mjs
  var import_primitives64 = __toESM(require_primitives(), 1);
  var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1);
  var heading_level_6_default = /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_primitives64.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_primitives64.Path, { d: "M20.7 12.4c-.2-.3-.4-.6-.7-.9s-.6-.5-1-.6c-.4-.2-.8-.2-1.2-.2-.5 0-.9.1-1.3.3s-.8.5-1.2.8c0-.5 0-.9.2-1.4l.6-.9c.2-.2.5-.4.8-.5.6-.2 1.3-.2 1.9 0 .3.1.6.3.8.5 0 0 1.3-1.3 1.3-1.4-.4-.3-.9-.6-1.4-.8-.6-.2-1.3-.3-2-.3-.6 0-1.1.1-1.7.4-.5.2-1 .5-1.4.9-.4.4-.8 1-1 1.6-.3.7-.4 1.5-.4 2.3s.1 1.5.3 2.1c.2.6.6 1.1 1 1.5.4.4.9.7 1.4.9 1 .3 2 .3 3 0 .4-.1.8-.3 1.2-.6.3-.3.6-.6.8-1 .2-.5.3-.9.3-1.4s-.1-.9-.3-1.3zm-2 2.1c-.1.2-.3.4-.4.5-.1.1-.3.2-.5.2-.2.1-.4.1-.6.1-.2.1-.5 0-.7-.1-.2 0-.3-.2-.5-.3-.1-.2-.3-.4-.4-.6-.2-.3-.3-.7-.3-1 .3-.3.6-.5 1-.7.3-.1.7-.2 1-.2.4 0 .8.1 1.1.3.3.3.4.7.4 1.1 0 .2 0 .5-.1.7zM9 11H5V7H3v10h2v-4h4v4h2V7H9v4z" }) });

  // packages/icons/build-module/library/heading.mjs
  var import_primitives65 = __toESM(require_primitives(), 1);
  var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1);
  var heading_default = /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_primitives65.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_primitives65.Path, { d: "M6 5V18.5911L12 13.8473L18 18.5911V5H6Z" }) });

  // packages/icons/build-module/library/home.mjs
  var import_primitives66 = __toESM(require_primitives(), 1);
  var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
  var home_default = /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_primitives66.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_primitives66.Path, { d: "M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z" }) });

  // packages/icons/build-module/library/html.mjs
  var import_primitives67 = __toESM(require_primitives(), 1);
  var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
  var html_default = /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_primitives67.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_primitives67.Path, { d: "M4.8 11.4H2.1V9H1v6h1.1v-2.6h2.7V15h1.1V9H4.8v2.4zm1.9-1.3h1.7V15h1.1v-4.9h1.7V9H6.7v1.1zM16.2 9l-1.5 2.7L13.3 9h-.9l-.8 6h1.1l.5-4 1.5 2.8 1.5-2.8.5 4h1.1L17 9h-.8zm3.8 5V9h-1.1v6h3.6v-1H20z" }) });

  // packages/icons/build-module/library/image.mjs
  var import_primitives68 = __toESM(require_primitives(), 1);
  var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
  var image_default = /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_primitives68.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_primitives68.Path, { 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.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z" }) });

  // packages/icons/build-module/library/keyboard-return.mjs
  var import_primitives69 = __toESM(require_primitives(), 1);
  var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
  var keyboard_return_default = /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_primitives69.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_primitives69.Path, { d: "m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734Z" }) });

  // packages/icons/build-module/library/layout.mjs
  var import_primitives70 = __toESM(require_primitives(), 1);
  var import_jsx_runtime71 = __toESM(require_jsx_runtime(), 1);
  var layout_default = /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_primitives70.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_primitives70.Path, { 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" }) });

  // packages/icons/build-module/library/link-off.mjs
  var import_primitives71 = __toESM(require_primitives(), 1);
  var import_jsx_runtime72 = __toESM(require_jsx_runtime(), 1);
  var link_off_default = /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_primitives71.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_primitives71.Path, { d: "M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z" }) });

  // packages/icons/build-module/library/link.mjs
  var import_primitives72 = __toESM(require_primitives(), 1);
  var import_jsx_runtime73 = __toESM(require_jsx_runtime(), 1);
  var link_default = /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_primitives72.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_primitives72.Path, { d: "M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z" }) });

  // packages/icons/build-module/library/list-item.mjs
  var import_primitives73 = __toESM(require_primitives(), 1);
  var import_jsx_runtime74 = __toESM(require_jsx_runtime(), 1);
  var list_item_default = /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_primitives73.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_primitives73.Path, { d: "M12 11v1.5h8V11h-8zm-6-1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" }) });

  // packages/icons/build-module/library/list.mjs
  var import_primitives74 = __toESM(require_primitives(), 1);
  var import_jsx_runtime75 = __toESM(require_jsx_runtime(), 1);
  var list_default = /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_primitives74.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_primitives74.Path, { 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" }) });

  // packages/icons/build-module/library/login.mjs
  var import_primitives75 = __toESM(require_primitives(), 1);
  var import_jsx_runtime76 = __toESM(require_jsx_runtime(), 1);
  var login_default = /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_primitives75.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_primitives75.Path, { d: "M11 14.5l1.1 1.1 3-3 .5-.5-.6-.6-3-3-1 1 1.7 1.7H5v1.5h7.7L11 14.5zM16.8 5h-7c-1.1 0-2 .9-2 2v1.5h1.5V7c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v10c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5v-1.5H7.8V17c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2z" }) });

  // packages/icons/build-module/library/loop.mjs
  var import_primitives76 = __toESM(require_primitives(), 1);
  var import_jsx_runtime77 = __toESM(require_jsx_runtime(), 1);
  var loop_default = /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_primitives76.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_primitives76.Path, { d: "M18.1823 11.6392C18.1823 13.0804 17.0139 14.2487 15.5727 14.2487C14.3579 14.2487 13.335 13.4179 13.0453 12.2922L13.0377 12.2625L13.0278 12.2335L12.3985 10.377L12.3942 10.3785C11.8571 8.64997 10.246 7.39405 8.33961 7.39405C5.99509 7.39405 4.09448 9.29465 4.09448 11.6392C4.09448 13.9837 5.99509 15.8843 8.33961 15.8843C8.88499 15.8843 9.40822 15.781 9.88943 15.5923L9.29212 14.0697C8.99812 14.185 8.67729 14.2487 8.33961 14.2487C6.89838 14.2487 5.73003 13.0804 5.73003 11.6392C5.73003 10.1979 6.89838 9.02959 8.33961 9.02959C9.55444 9.02959 10.5773 9.86046 10.867 10.9862L10.8772 10.9836L11.4695 12.7311C11.9515 14.546 13.6048 15.8843 15.5727 15.8843C17.9172 15.8843 19.8178 13.9837 19.8178 11.6392C19.8178 9.29465 17.9172 7.39404 15.5727 7.39404C15.0287 7.39404 14.5066 7.4968 14.0264 7.6847L14.6223 9.20781C14.9158 9.093 15.2358 9.02959 15.5727 9.02959C17.0139 9.02959 18.1823 10.1979 18.1823 11.6392Z" }) });

  // packages/icons/build-module/library/map-marker.mjs
  var import_primitives77 = __toESM(require_primitives(), 1);
  var import_jsx_runtime78 = __toESM(require_jsx_runtime(), 1);
  var map_marker_default = /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_primitives77.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_primitives77.Path, { d: "M12 9c-.8 0-1.5.7-1.5 1.5S11.2 12 12 12s1.5-.7 1.5-1.5S12.8 9 12 9zm0-5c-3.6 0-6.5 2.8-6.5 6.2 0 .8.3 1.8.9 3.1.5 1.1 1.2 2.3 2 3.6.7 1 3 3.8 3.2 3.9l.4.5.4-.5c.2-.2 2.6-2.9 3.2-3.9.8-1.2 1.5-2.5 2-3.6.6-1.3.9-2.3.9-3.1C18.5 6.8 15.6 4 12 4zm4.3 8.7c-.5 1-1.1 2.2-1.9 3.4-.5.7-1.7 2.2-2.4 3-.7-.8-1.9-2.3-2.4-3-.8-1.2-1.4-2.3-1.9-3.3-.6-1.4-.7-2.2-.7-2.5 0-2.6 2.2-4.7 5-4.7s5 2.1 5 4.7c0 .2-.1 1-.7 2.4z" }) });

  // packages/icons/build-module/library/math.mjs
  var import_primitives78 = __toESM(require_primitives(), 1);
  var import_jsx_runtime79 = __toESM(require_jsx_runtime(), 1);
  var math_default = /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_primitives78.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_primitives78.Path, { d: "M11.2 6.8c-.7 0-1.4.5-1.6 1.1l-2.8 7.5-1.2-1.8c-.1-.2-.4-.3-.6-.3H3v1.5h1.6l1.2 1.8c.6.9 1.9.7 2.2-.3l2.9-7.9s.1-.2.2-.2h7.8V6.7h-7.8Zm5.3 3.4-1.9 1.9-1.9-1.9-1.1 1.1 1.9 1.9-1.9 1.9 1.1 1.1 1.9-1.9 1.9 1.9 1.1-1.1-1.9-1.9 1.9-1.9-1.1-1.1Z" }) });

  // packages/icons/build-module/library/media-and-text.mjs
  var import_primitives79 = __toESM(require_primitives(), 1);
  var import_jsx_runtime80 = __toESM(require_jsx_runtime(), 1);
  var media_and_text_default = /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_primitives79.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_primitives79.Path, { d: "M3 6v11.5h8V6H3Zm11 3h7V7.5h-7V9Zm7 3.5h-7V11h7v1.5ZM14 16h7v-1.5h-7V16Z" }) });

  // packages/icons/build-module/library/media.mjs
  var import_primitives80 = __toESM(require_primitives(), 1);
  var import_jsx_runtime81 = __toESM(require_jsx_runtime(), 1);
  var media_default = /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_primitives80.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_primitives80.Path, { d: "m7 6.5 4 2.5-4 2.5z" }),
    /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_primitives80.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" })
  ] });

  // packages/icons/build-module/library/menu.mjs
  var import_primitives81 = __toESM(require_primitives(), 1);
  var import_jsx_runtime82 = __toESM(require_jsx_runtime(), 1);
  var menu_default = /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_primitives81.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_primitives81.Path, { d: "M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z" }) });

  // packages/icons/build-module/library/more-vertical.mjs
  var import_primitives82 = __toESM(require_primitives(), 1);
  var import_jsx_runtime83 = __toESM(require_jsx_runtime(), 1);
  var more_vertical_default = /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_primitives82.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_primitives82.Path, { d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" }) });

  // packages/icons/build-module/library/more.mjs
  var import_primitives83 = __toESM(require_primitives(), 1);
  var import_jsx_runtime84 = __toESM(require_jsx_runtime(), 1);
  var more_default = /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_primitives83.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_primitives83.Path, { d: "M4 9v1.5h16V9H4zm12 5.5h4V13h-4v1.5zm-6 0h4V13h-4v1.5zm-6 0h4V13H4v1.5z" }) });

  // packages/icons/build-module/library/navigation-overlay.mjs
  var import_primitives84 = __toESM(require_primitives(), 1);
  var import_jsx_runtime85 = __toESM(require_jsx_runtime(), 1);
  var navigation_overlay_default = /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_primitives84.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_primitives84.Path, { d: "M18.5 10a1.5 1.5 0 0 1 1.5 1.5v7a1.5 1.5 0 0 1-1.5 1.5h-7a1.5 1.5 0 0 1-1.5-1.5v-7a1.5 1.5 0 0 1 1.5-1.5zM16 4a2 2 0 0 1 2 2v2h-1.5V6a.5.5 0 0 0-.5-.5H6a.5.5 0 0 0-.5.5v3H8v1.5H5.5V16a.5.5 0 0 0 .5.5h2V18H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z" }) });

  // packages/icons/build-module/library/navigation.mjs
  var import_primitives85 = __toESM(require_primitives(), 1);
  var import_jsx_runtime86 = __toESM(require_jsx_runtime(), 1);
  var navigation_default = /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_primitives85.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_primitives85.Path, { 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" }) });

  // packages/icons/build-module/library/next.mjs
  var import_primitives86 = __toESM(require_primitives(), 1);
  var import_jsx_runtime87 = __toESM(require_jsx_runtime(), 1);
  var next_default = /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_primitives86.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_primitives86.Path, { 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" }) });

  // packages/icons/build-module/library/overlay-text.mjs
  var import_primitives87 = __toESM(require_primitives(), 1);
  var import_jsx_runtime88 = __toESM(require_jsx_runtime(), 1);
  var overlay_text_default = /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_primitives87.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_primitives87.Path, { d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12-9.8c.4 0 .8-.3.9-.7l1.1-3h3.6l.5 1.7h1.9L13 9h-2.2l-3.4 9.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12H20V6c0-1.1-.9-2-2-2zm-6 7l1.4 3.9h-2.7L12 11z" }) });

  // packages/icons/build-module/library/page-break.mjs
  var import_primitives88 = __toESM(require_primitives(), 1);
  var import_jsx_runtime89 = __toESM(require_jsx_runtime(), 1);
  var page_break_default = /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_primitives88.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_primitives88.Path, { d: "M17.5 9V6a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v3H8V6a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v3h1.5Zm0 6.5V18a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2v-2.5H8V18a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 .5-.5v-2.5h1.5ZM4 13h16v-1.5H4V13Z" }) });

  // packages/icons/build-module/library/page.mjs
  var import_primitives89 = __toESM(require_primitives(), 1);
  var import_jsx_runtime90 = __toESM(require_jsx_runtime(), 1);
  var page_default = /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(import_primitives89.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_primitives89.Path, { d: "M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z" }),
    /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_primitives89.Path, { 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" })
  ] });

  // packages/icons/build-module/library/pages.mjs
  var import_primitives90 = __toESM(require_primitives(), 1);
  var import_jsx_runtime91 = __toESM(require_jsx_runtime(), 1);
  var pages_default = /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(import_primitives90.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_primitives90.Path, { d: "M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z" }),
    /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_primitives90.Path, { 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" }),
    /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_primitives90.Path, { d: "M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z" })
  ] });

  // packages/icons/build-module/library/paragraph.mjs
  var import_primitives91 = __toESM(require_primitives(), 1);
  var import_jsx_runtime92 = __toESM(require_jsx_runtime(), 1);
  var paragraph_default = /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_primitives91.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_primitives91.Path, { d: "m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z" }) });

  // packages/icons/build-module/library/pencil.mjs
  var import_primitives92 = __toESM(require_primitives(), 1);
  var import_jsx_runtime93 = __toESM(require_jsx_runtime(), 1);
  var pencil_default = /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_primitives92.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_primitives92.Path, { d: "m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z" }) });

  // packages/icons/build-module/library/pin.mjs
  var import_primitives93 = __toESM(require_primitives(), 1);
  var import_jsx_runtime94 = __toESM(require_jsx_runtime(), 1);
  var pin_default = /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_primitives93.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_primitives93.Path, { 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" }) });

  // packages/icons/build-module/library/plugins.mjs
  var import_primitives94 = __toESM(require_primitives(), 1);
  var import_jsx_runtime95 = __toESM(require_jsx_runtime(), 1);
  var plugins_default = /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_primitives94.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_primitives94.Path, { 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" }) });

  // packages/icons/build-module/library/plus.mjs
  var import_primitives95 = __toESM(require_primitives(), 1);
  var import_jsx_runtime96 = __toESM(require_jsx_runtime(), 1);
  var plus_default = /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_primitives95.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_primitives95.Path, { d: "M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z" }) });

  // packages/icons/build-module/library/position-center.mjs
  var import_primitives96 = __toESM(require_primitives(), 1);
  var import_jsx_runtime97 = __toESM(require_jsx_runtime(), 1);
  var position_center_default = /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_primitives96.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_primitives96.Path, { d: "M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z" }) });

  // packages/icons/build-module/library/position-left.mjs
  var import_primitives97 = __toESM(require_primitives(), 1);
  var import_jsx_runtime98 = __toESM(require_jsx_runtime(), 1);
  var position_left_default = /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_primitives97.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_primitives97.Path, { d: "M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z" }) });

  // packages/icons/build-module/library/position-right.mjs
  var import_primitives98 = __toESM(require_primitives(), 1);
  var import_jsx_runtime99 = __toESM(require_jsx_runtime(), 1);
  var position_right_default = /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_primitives98.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_primitives98.Path, { d: "M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z" }) });

  // packages/icons/build-module/library/post-author.mjs
  var import_primitives99 = __toESM(require_primitives(), 1);
  var import_jsx_runtime100 = __toESM(require_jsx_runtime(), 1);
  var post_author_default = /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_primitives99.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_primitives99.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/post-categories.mjs
  var import_primitives100 = __toESM(require_primitives(), 1);
  var import_jsx_runtime101 = __toESM(require_jsx_runtime(), 1);
  var post_categories_default = /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_primitives100.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_primitives100.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M20 4H4v1.5h16V4zm-2 9h-3c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3zM4 9.5h9V8H4v1.5zM9 13H6c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3z" }) });

  // packages/icons/build-module/library/post-comments-count.mjs
  var import_primitives101 = __toESM(require_primitives(), 1);
  var import_jsx_runtime102 = __toESM(require_jsx_runtime(), 1);
  var post_comments_count_default = /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_primitives101.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_primitives101.Path, { d: "M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1V13c0-.6-.4-1-1-1zm-2.2 6.6H7l1.6-2.2c.3-.4.5-.7.6-.9.1-.2.2-.4.2-.5 0-.2-.1-.3-.1-.4-.1-.1-.2-.1-.4-.1s-.4 0-.6.1c-.3.1-.5.3-.7.4l-.2.2-.2-1.2.1-.1c.3-.2.5-.3.8-.4.3-.1.6-.1.9-.1.3 0 .6.1.9.2.2.1.4.3.6.5.1.2.2.5.2.7 0 .3-.1.6-.2.9-.1.3-.4.7-.7 1.1l-.5.6h1.6v1.2z" }) });

  // packages/icons/build-module/library/post-comments-form.mjs
  var import_primitives102 = __toESM(require_primitives(), 1);
  var import_jsx_runtime103 = __toESM(require_jsx_runtime(), 1);
  var post_comments_form_default = /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_primitives102.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_primitives102.Path, { d: "M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1V13c0-.6-.4-1-1-1zm-.5 6.6H6.7l-1.2 1.2v-6.3h7v5.1z" }) });

  // packages/icons/build-module/library/post-comments.mjs
  var import_primitives103 = __toESM(require_primitives(), 1);
  var import_jsx_runtime104 = __toESM(require_jsx_runtime(), 1);
  var post_comments_default = /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_primitives103.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_primitives103.Path, { d: "M14 10.1V4c0-.6-.4-1-1-1H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1zm-1.5-.5H6.7l-1.2 1.2V4.5h7v5.1zM19 12h-8c-.6 0-1 .4-1 1v6.1c0 .6.4 1 1 1h5.7l1.8 1.8c.1.2.4.3.6.3.1 0 .2 0 .3-.1.4-.1.6-.5.6-.8V13c0-.6-.4-1-1-1zm-.5 7.8l-1.2-1.2h-5.8v-5.1h7v6.3z" }) });

  // packages/icons/build-module/library/post-content.mjs
  var import_primitives104 = __toESM(require_primitives(), 1);
  var import_jsx_runtime105 = __toESM(require_jsx_runtime(), 1);
  var post_content_default = /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_primitives104.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_primitives104.Path, { d: "M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z" }) });

  // packages/icons/build-module/library/post-date.mjs
  var import_primitives105 = __toESM(require_primitives(), 1);
  var import_jsx_runtime106 = __toESM(require_jsx_runtime(), 1);
  var post_date_default = /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(import_primitives105.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_primitives105.Path, { 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" }),
    /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_primitives105.Path, { 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" })
  ] });

  // packages/icons/build-module/library/post-excerpt.mjs
  var import_primitives106 = __toESM(require_primitives(), 1);
  var import_jsx_runtime107 = __toESM(require_jsx_runtime(), 1);
  var post_excerpt_default = /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_primitives106.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_primitives106.Path, { d: "M8.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H4v-3h4.001ZM4 20h9v-1.5H4V20Zm16-4H4v-1.5h16V16ZM13.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H9v-3h4.001Z" }) });

  // packages/icons/build-module/library/post-featured-image.mjs
  var import_primitives107 = __toESM(require_primitives(), 1);
  var import_jsx_runtime108 = __toESM(require_jsx_runtime(), 1);
  var post_featured_image_default = /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_primitives107.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_primitives107.Path, { d: "M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z" }) });

  // packages/icons/build-module/library/post-list.mjs
  var import_primitives108 = __toESM(require_primitives(), 1);
  var import_jsx_runtime109 = __toESM(require_jsx_runtime(), 1);
  var post_list_default = /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_primitives108.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_primitives108.Path, { d: "M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z" }) });

  // packages/icons/build-module/library/post-terms.mjs
  var import_primitives109 = __toESM(require_primitives(), 1);
  var import_jsx_runtime110 = __toESM(require_jsx_runtime(), 1);
  var post_terms_default = /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_primitives109.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_primitives109.Path, { d: "M8.1 12.3c.1.1.3.3.5.3.2.1.4.1.6.1.2 0 .4 0 .6-.1.2-.1.4-.2.5-.3l3-3c.3-.3.5-.7.5-1.1 0-.4-.2-.8-.5-1.1L9.7 3.5c-.1-.2-.3-.3-.5-.3H5c-.4 0-.8.4-.8.8v4.2c0 .2.1.4.2.5l3.7 3.6zM5.8 4.8h3.1l3.4 3.4v.1l-3 3 .5.5-.7-.5-3.3-3.4V4.8zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z" }) });

  // packages/icons/build-module/library/preformatted.mjs
  var import_primitives110 = __toESM(require_primitives(), 1);
  var import_jsx_runtime111 = __toESM(require_jsx_runtime(), 1);
  var preformatted_default = /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_primitives110.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_primitives110.Path, { d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 16.5h6V15H7v1.5zm4-4h6V11h-6v1.5zM9 11H7v1.5h2V11zm6 5.5h2V15h-2v1.5z" }) });

  // packages/icons/build-module/library/previous.mjs
  var import_primitives111 = __toESM(require_primitives(), 1);
  var import_jsx_runtime112 = __toESM(require_jsx_runtime(), 1);
  var previous_default = /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_primitives111.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_primitives111.Path, { 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" }) });

  // packages/icons/build-module/library/pull-left.mjs
  var import_primitives112 = __toESM(require_primitives(), 1);
  var import_jsx_runtime113 = __toESM(require_jsx_runtime(), 1);
  var pull_left_default = /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_primitives112.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_primitives112.Path, { d: "M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z" }) });

  // packages/icons/build-module/library/pull-right.mjs
  var import_primitives113 = __toESM(require_primitives(), 1);
  var import_jsx_runtime114 = __toESM(require_jsx_runtime(), 1);
  var pull_right_default = /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_primitives113.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_primitives113.Path, { d: "M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z" }) });

  // packages/icons/build-module/library/pullquote.mjs
  var import_primitives114 = __toESM(require_primitives(), 1);
  var import_jsx_runtime115 = __toESM(require_jsx_runtime(), 1);
  var pullquote_default = /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_primitives114.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_primitives114.Path, { d: "M18 8H6c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v4zM4 4v1.5h16V4H4zm0 16h16v-1.5H4V20z" }) });

  // packages/icons/build-module/library/query-pagination-next.mjs
  var import_primitives115 = __toESM(require_primitives(), 1);
  var import_jsx_runtime116 = __toESM(require_jsx_runtime(), 1);
  var query_pagination_next_default = /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_primitives115.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_primitives115.Path, { d: "M5 13.5h3v-3H5v3zm5 0h3v-3h-3v3zM17 9l-1 1 2 2-2 2 1 1 3-3-3-3z" }) });

  // packages/icons/build-module/library/query-pagination-numbers.mjs
  var import_primitives116 = __toESM(require_primitives(), 1);
  var import_jsx_runtime117 = __toESM(require_jsx_runtime(), 1);
  var query_pagination_numbers_default = /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_primitives116.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_primitives116.Path, { d: "M4 13.5h6v-3H4v3zm8.2-2.5.8-.3V14h1V9.3l-2.2.7.4 1zm7.1-1.2c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3-.1-.8-.3-1.1z" }) });

  // packages/icons/build-module/library/query-pagination-previous.mjs
  var import_primitives117 = __toESM(require_primitives(), 1);
  var import_jsx_runtime118 = __toESM(require_jsx_runtime(), 1);
  var query_pagination_previous_default = /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_primitives117.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_primitives117.Path, { d: "M16 10.5v3h3v-3h-3zm-5 3h3v-3h-3v3zM7 9l-3 3 3 3 1-1-2-2 2-2-1-1z" }) });

  // packages/icons/build-module/library/query-pagination.mjs
  var import_primitives118 = __toESM(require_primitives(), 1);
  var import_jsx_runtime119 = __toESM(require_jsx_runtime(), 1);
  var query_pagination_default = /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_primitives118.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_primitives118.Path, { d: "M4 13.5h6v-3H4v3zm8 0h3v-3h-3v3zm5-3v3h3v-3h-3z" }) });

  // packages/icons/build-module/library/quote.mjs
  var import_primitives119 = __toESM(require_primitives(), 1);
  var import_jsx_runtime120 = __toESM(require_jsx_runtime(), 1);
  var quote_default = /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_primitives119.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_primitives119.Path, { d: "M13 6v6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H13zm-9 6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H4v6z" }) });

  // packages/icons/build-module/library/remove-submenu.mjs
  var import_primitives120 = __toESM(require_primitives(), 1);
  var import_jsx_runtime121 = __toESM(require_jsx_runtime(), 1);
  var remove_submenu_default = /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_primitives120.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_primitives120.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "m13.955 20.748 8-17.5-.91-.416L19.597 6H13.5v1.5h5.411l-1.6 3.5H13.5v1.5h3.126l-1.6 3.5H13.5l.028 1.5h.812l-1.295 2.832.91.416ZM17.675 16l-.686 1.5h4.539L21.5 16h-3.825Zm2.286-5-.686 1.5H21.5V11h-1.54ZM2 12c0 3.58 2.42 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.48 0-4.5-1.52-4.5-4S5.52 7.5 8 7.5h3.5V6H8c-3.58 0-6 2.42-6 6Z" }) });

  // packages/icons/build-module/library/resize-corner-ne.mjs
  var import_primitives121 = __toESM(require_primitives(), 1);
  var import_jsx_runtime122 = __toESM(require_jsx_runtime(), 1);
  var resize_corner_ne_default = /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_primitives121.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_primitives121.Path, { d: "M7 18h4.5v1.5h-7v-7H6V17L17 6h-4.5V4.5h7v7H18V7L7 18Z" }) });

  // packages/icons/build-module/library/row.mjs
  var import_primitives122 = __toESM(require_primitives(), 1);
  var import_jsx_runtime123 = __toESM(require_jsx_runtime(), 1);
  var row_default = /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_primitives122.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_primitives122.Path, { d: "M4 6.5h5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4V16h5a.5.5 0 0 0 .5-.5v-7A.5.5 0 0 0 9 8H4V6.5Zm16 0h-5a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h5V16h-5a.5.5 0 0 1-.5-.5v-7A.5.5 0 0 1 15 8h5V6.5Z" }) });

  // packages/icons/build-module/library/rss.mjs
  var import_primitives123 = __toESM(require_primitives(), 1);
  var import_jsx_runtime124 = __toESM(require_jsx_runtime(), 1);
  var rss_default = /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_primitives123.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_primitives123.Path, { d: "M5 10.2h-.8v1.5H5c1.9 0 3.8.8 5.1 2.1 1.4 1.4 2.1 3.2 2.1 5.1v.8h1.5V19c0-2.3-.9-4.5-2.6-6.2-1.6-1.6-3.8-2.6-6.1-2.6zm10.4-1.6C12.6 5.8 8.9 4.2 5 4.2h-.8v1.5H5c3.5 0 6.9 1.4 9.4 3.9s3.9 5.8 3.9 9.4v.8h1.5V19c0-3.9-1.6-7.6-4.4-10.4zM4 20h3v-3H4v3z" }) });

  // packages/icons/build-module/library/search.mjs
  var import_primitives124 = __toESM(require_primitives(), 1);
  var import_jsx_runtime125 = __toESM(require_jsx_runtime(), 1);
  var search_default = /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_primitives124.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_primitives124.Path, { 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" }) });

  // packages/icons/build-module/library/separator.mjs
  var import_primitives125 = __toESM(require_primitives(), 1);
  var import_jsx_runtime126 = __toESM(require_jsx_runtime(), 1);
  var separator_default = /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_primitives125.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_primitives125.Path, { d: "M4.5 12.5v4H3V7h1.5v3.987h15V7H21v9.5h-1.5v-4h-15Z" }) });

  // packages/icons/build-module/library/share.mjs
  var import_primitives126 = __toESM(require_primitives(), 1);
  var import_jsx_runtime127 = __toESM(require_jsx_runtime(), 1);
  var share_default = /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_primitives126.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_primitives126.Path, { d: "M9 11.8l6.1-4.5c.1.4.4.7.9.7h2c.6 0 1-.4 1-1V5c0-.6-.4-1-1-1h-2c-.6 0-1 .4-1 1v.4l-6.4 4.8c-.2-.1-.4-.2-.6-.2H6c-.6 0-1 .4-1 1v2c0 .6.4 1 1 1h2c.2 0 .4-.1.6-.2l6.4 4.8v.4c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-2c0-.6-.4-1-1-1h-2c-.5 0-.8.3-.9.7L9 12.2v-.4z" }) });

  // packages/icons/build-module/library/shortcode.mjs
  var import_primitives127 = __toESM(require_primitives(), 1);
  var import_jsx_runtime128 = __toESM(require_jsx_runtime(), 1);
  var shortcode_default = /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_primitives127.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_primitives127.Path, { d: "M16 4.2v1.5h2.5v12.5H16v1.5h4V4.2h-4zM4.2 19.8h4v-1.5H5.8V5.8h2.5V4.2h-4l-.1 15.6zm5.1-3.1l1.4.6 4-10-1.4-.6-4 10z" }) });

  // packages/icons/build-module/library/sidebar.mjs
  var import_primitives128 = __toESM(require_primitives(), 1);
  var import_jsx_runtime129 = __toESM(require_jsx_runtime(), 1);
  var sidebar_default = /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_primitives128.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_primitives128.Path, { 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.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z" }) });

  // packages/icons/build-module/library/site-logo.mjs
  var import_primitives129 = __toESM(require_primitives(), 1);
  var import_jsx_runtime130 = __toESM(require_jsx_runtime(), 1);
  var site_logo_default = /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_primitives129.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_primitives129.Path, { 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 1.5c3.4 0 6.2 2.7 6.5 6l-1.2-.6-.8-.4c-.1 0-.2 0-.3-.1H16c-.1-.2-.4-.2-.7 0l-2.9 2.1L9 11.3h-.7L5.5 13v-1.1c0-3.6 2.9-6.5 6.5-6.5Zm0 13c-2.7 0-5-1.7-6-4l2.8-1.7 3.5 1.2h.4s.2 0 .4-.2l2.9-2.1.4.2c.6.3 1.4.7 2.1 1.1-.5 3.1-3.2 5.4-6.4 5.4Z" }) });

  // packages/icons/build-module/library/square.mjs
  var import_primitives130 = __toESM(require_primitives(), 1);
  var import_jsx_runtime131 = __toESM(require_jsx_runtime(), 1);
  var square_default = /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_primitives130.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_primitives130.Path, { fill: "none", d: "M5.75 12.75V18.25H11.25M12.75 5.75H18.25V11.25", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "square" }) });

  // packages/icons/build-module/library/stack.mjs
  var import_primitives131 = __toESM(require_primitives(), 1);
  var import_jsx_runtime132 = __toESM(require_jsx_runtime(), 1);
  var stack_default = /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_primitives131.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_primitives131.Path, { d: "M17.5 4v5a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V4H8v5a.5.5 0 0 0 .5.5h7A.5.5 0 0 0 16 9V4h1.5Zm0 16v-5a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v5H8v-5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v5h1.5Z" }) });

  // packages/icons/build-module/library/symbol-filled.mjs
  var import_primitives132 = __toESM(require_primitives(), 1);
  var import_jsx_runtime133 = __toESM(require_jsx_runtime(), 1);
  var symbol_filled_default = /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_primitives132.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_primitives132.Path, { 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" }) });

  // packages/icons/build-module/library/symbol.mjs
  var import_primitives133 = __toESM(require_primitives(), 1);
  var import_jsx_runtime134 = __toESM(require_jsx_runtime(), 1);
  var symbol_default = /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_primitives133.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_primitives133.Path, { 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" }) });

  // packages/icons/build-module/library/tab.mjs
  var import_primitives134 = __toESM(require_primitives(), 1);
  var import_jsx_runtime135 = __toESM(require_jsx_runtime(), 1);
  var tab_default = /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_primitives134.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_primitives134.Path, { d: "M4 16.5h13V15H4v1.5ZM4 12v1.5h16V12H4Zm1.5-4.2c0-.1.1-.2.2-.2h3.5c.1 0 .2.1.2.2v2.5h1.5V7.8c0-1-.8-1.8-1.8-1.8H5.6c-1 0-1.8.8-1.8 1.8v2.5h1.5V7.8Z" }) });

  // packages/icons/build-module/library/table-column-after.mjs
  var import_primitives135 = __toESM(require_primitives(), 1);
  var import_jsx_runtime136 = __toESM(require_jsx_runtime(), 1);
  var table_column_after_default = /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_primitives135.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_primitives135.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14.2c.1.9.9 1.7 1.8 1.8H19.2c1-.1 1.8-1 1.8-2V5c0-1.1-.9-2-2-2ZM8.5 19.5H5c-.3 0-.5-.2-.5-.5v-3.5h4v4Zm0-5.5h-4v-4h4v4Zm0-5.5h-4V5c0-.3.2-.5.5-.5h3.5v4Zm11 10.5c0 .3-.2.5-.5.5h-9v-15h9c.3 0 .5.2.5.5v14Zm-4-10.8H14v3h-3v1.5h3v3h1.5v-3h3v-1.5h-3v-3Z" }) });

  // packages/icons/build-module/library/table-column-before.mjs
  var import_primitives136 = __toESM(require_primitives(), 1);
  var import_jsx_runtime137 = __toESM(require_jsx_runtime(), 1);
  var table_column_before_default = /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_primitives136.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_primitives136.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1 .8 1.9 1.8 2H19.2c.9-.1 1.7-.9 1.8-1.8V5c0-1.1-.9-2-2-2Zm-5 16.5H5c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h9v15Zm5.5-.5c0 .3-.2.5-.5.5h-3.5v-4h4V19Zm0-5h-4v-4h4v4Zm0-5.5h-4v-4H19c.3 0 .5.2.5.5v3.5Zm-11 7.3H10v-3h3v-1.5h-3v-3H8.5v3h-3v1.5h3v3Z" }) });

  // packages/icons/build-module/library/table-column-delete.mjs
  var import_primitives137 = __toESM(require_primitives(), 1);
  var import_jsx_runtime138 = __toESM(require_jsx_runtime(), 1);
  var table_column_delete_default = /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_primitives137.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_primitives137.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14.2c.1.9.9 1.7 1.8 1.8H19.2c1-.1 1.8-1 1.8-2V5c0-1.1-.9-2-2-2ZM8.5 19.5H5c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h3.5v15Zm11-.5c0 .3-.2.5-.5.5h-9v-15h9c.3 0 .5.2.5.5v14ZM16.9 8.8l-2.1 2.1-2.1-2.1-1.1 1.1 2.1 2.1-2.1 2.1 1.1 1.1 2.1-2.1 2.1 2.1 1.1-1.1-2.1-2.1L18 9.9l-1.1-1.1Z" }) });

  // packages/icons/build-module/library/table-of-contents.mjs
  var import_primitives138 = __toESM(require_primitives(), 1);
  var import_jsx_runtime139 = __toESM(require_jsx_runtime(), 1);
  var table_of_contents_default = /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_primitives138.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_primitives138.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M20 9.484h-8.889v-1.5H20v1.5Zm0 7h-4.889v-1.5H20v1.5Zm-14 .032a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 1a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z" }),
    /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_primitives138.Path, { d: "M13 15.516a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM8 8.484a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z" })
  ] });

  // packages/icons/build-module/library/table-row-after.mjs
  var import_primitives139 = __toESM(require_primitives(), 1);
  var import_jsx_runtime140 = __toESM(require_jsx_runtime(), 1);
  var table_row_after_default = /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_primitives139.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_primitives139.Path, { d: "M19 3H4.8c-.9.1-1.7.9-1.8 1.8V19.2c.1 1 1 1.8 2 1.8h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm-9 1.5h4v4h-4v-4ZM4.5 5c0-.3.2-.5.5-.5h3.5v4h-4V5Zm15 14c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-9h15v9Zm0-10.5h-4v-4H19c.3 0 .5.2.5.5v3.5Zm-8.3 10h1.5v-3h3V14h-3v-3h-1.5v3h-3v1.5h3v3Z" }) });

  // packages/icons/build-module/library/table-row-before.mjs
  var import_primitives140 = __toESM(require_primitives(), 1);
  var import_jsx_runtime141 = __toESM(require_jsx_runtime(), 1);
  var table_row_before_default = /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_primitives140.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_primitives140.Path, { d: "M21 5c0-1.1-.9-2-2-2H5c-1 0-1.9.8-2 1.8V19.2c.1.9.9 1.7 1.8 1.8H19c1.1 0 2-.9 2-2V5ZM4.5 14V5c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v9h-15Zm4 5.5H5c-.3 0-.5-.2-.5-.5v-3.5h4v4Zm5.5 0h-4v-4h4v4Zm5.5-.5c0 .3-.2.5-.5.5h-3.5v-4h4V19ZM11.2 10h-3V8.5h3v-3h1.5v3h3V10h-3v3h-1.5v-3Z" }) });

  // packages/icons/build-module/library/table-row-delete.mjs
  var import_primitives141 = __toESM(require_primitives(), 1);
  var import_jsx_runtime142 = __toESM(require_jsx_runtime(), 1);
  var table_row_delete_default = /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_primitives141.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_primitives141.Path, { d: "M19 3H4.8c-.9.1-1.7.9-1.8 1.8V19.2c.1 1 1 1.8 2 1.8h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-9h15v9Zm0-10.5h-15V5c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v3.5Zm-9.6 9.4 2.1-2.1 2.1 2.1 1.1-1.1-2.1-2.1 2.1-2.1-1.1-1.1-2.1 2.1-2.1-2.1-1.1 1.1 2.1 2.1-2.1 2.1 1.1 1.1Z" }) });

  // packages/icons/build-module/library/table.mjs
  var import_primitives142 = __toESM(require_primitives(), 1);
  var import_jsx_runtime143 = __toESM(require_jsx_runtime(), 1);
  var table_default = /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_primitives142.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_primitives142.Path, { 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 2v6.2h-6.8V4.4h6.2c.3 0 .5.2.5.5ZM5 4.5h6.2v6.8H4.4V5.1c0-.3.2-.5.5-.5ZM4.5 19v-6.2h6.8v6.8H5.1c-.3 0-.5-.2-.5-.5Zm14.5.5h-6.2v-6.8h6.8v6.2c0 .3-.2.5-.5.5Z" }) });

  // packages/icons/build-module/library/tabs-menu-item.mjs
  var import_primitives143 = __toESM(require_primitives(), 1);
  var import_jsx_runtime144 = __toESM(require_jsx_runtime(), 1);
  var tabs_menu_item_default = /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_primitives143.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_primitives143.Path, { d: "M14 11.25a.25.25 0 0 0-.25-.25h-3.5a.25.25 0 0 0-.25.25v2.5H8.5v-2.5c0-.966.784-1.75 1.75-1.75h3.5c.966 0 1.75.784 1.75 1.75v2.5H14v-2.5Z" }) });

  // packages/icons/build-module/library/tabs-menu.mjs
  var import_primitives144 = __toESM(require_primitives(), 1);
  var import_jsx_runtime145 = __toESM(require_jsx_runtime(), 1);
  var tabs_menu_default = /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_primitives144.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_primitives144.Path, { d: "M18.2 9.5h-3.5c-1 0-1.8.8-1.8 1.8v2.5h1.5v-2.5c0-.1.1-.2.2-.2h3.5c.1 0 .2.1.2.2v2.5h1.5v-2.5c0-1-.8-1.8-1.8-1.8Zm-9 0H5.7c-1 0-1.8.8-1.8 1.8v2.5h7v-2.5c0-1-.8-1.8-1.8-1.8Z" }) });

  // packages/icons/build-module/library/tabs.mjs
  var import_primitives145 = __toESM(require_primitives(), 1);
  var import_jsx_runtime146 = __toESM(require_jsx_runtime(), 1);
  var tabs_default = /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_primitives145.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_primitives145.Path, { d: "M4 16.5h13V15H4v1.5Zm0-3h16V12H4v1.5ZM18.2 6h-3.5c-1 0-1.8.8-1.8 1.8v2.5h1.5V7.8c0-.1.1-.2.2-.2h3.5c.1 0 .2.1.2.2v2.5h1.5V7.8c0-1-.8-1.8-1.8-1.8ZM11 7.8c0-1-.8-1.8-1.8-1.8H5.7c-1 0-1.8.8-1.8 1.8v2.5h7V7.8Z" }) });

  // packages/icons/build-module/library/tag.mjs
  var import_primitives146 = __toESM(require_primitives(), 1);
  var import_jsx_runtime147 = __toESM(require_jsx_runtime(), 1);
  var tag_default = /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_primitives146.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_primitives146.Path, { 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" }) });

  // packages/icons/build-module/library/term-count.mjs
  var import_primitives147 = __toESM(require_primitives(), 1);
  var import_jsx_runtime148 = __toESM(require_jsx_runtime(), 1);
  var term_count_default = /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)(import_primitives147.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_primitives147.Path, { d: "M 12.841306,16.677917 12.001264,12.71529 Q 11.835801,11.930402 11.695793,11.417042 11.560029,10.89944 11.398809,10.568514 11.237588,10.237588 11,10 10.635133,9.6351329 10.219354,9.6351329 9.8078183,9.6308902 9.4387086,10 8.9932313,10.445477 8.8574668,11.022476 8.7259449,11.595233 8.7259449,12.155262 L 7.4955791,11.196425 Q 7.5719467,10.509117 7.8307477,9.9109045 8.0937915,9.3084495 8.6410921,8.7611489 9.1799075,8.2223335 9.7569066,8.086569 q 0.5812414,-0.1400071 1.1242994,0.046669 0.543058,0.1866762 0.975808,0.6194255 0.335168,0.3351686 0.581242,0.767918 0.24183,0.4285067 0.436992,1.0564174 0.195161,0.619426 0.381837,1.527351 l 0.364867,1.756453 1.883733,-1.883732 1.018234,1.018233 z" }),
    /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_primitives147.Path, { d: "M12.574 4a.75.75 0 0 1 .53.22l6.723 6.724a2.315 2.315 0 0 1 0 3.264l-.532-.528.531.53-5.61 5.611a2.31 2.31 0 0 1-3.276.001l-6.72-6.716a.75.75 0 0 1-.22-.53V4.75A.75.75 0 0 1 4.75 4h7.824ZM5.5 5.5v6.764l6.501 6.497a.817.817 0 0 0 .889.178.816.816 0 0 0 .264-.178l5.61-5.61a.816.816 0 0 0-.001-1.149l-6.5-6.502H5.5Z" })
  ] });

  // packages/icons/build-module/library/term-description.mjs
  var import_primitives148 = __toESM(require_primitives(), 1);
  var import_jsx_runtime149 = __toESM(require_jsx_runtime(), 1);
  var term_description_default = /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_primitives148.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_primitives148.Path, { d: "M6.08 10.103h2.914L9.657 12h1.417L8.23 4H6.846L4 12h1.417l.663-1.897Zm1.463-4.137.994 2.857h-2l1.006-2.857ZM11 16H4v-1.5h7V16Zm1 0h8v-1.5h-8V16Zm-4 4H4v-1.5h4V20Zm7-1.5V20H9v-1.5h6Z" }) });

  // packages/icons/build-module/library/term-name.mjs
  var import_primitives149 = __toESM(require_primitives(), 1);
  var import_jsx_runtime150 = __toESM(require_jsx_runtime(), 1);
  var term_name_default = /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(import_primitives149.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_primitives149.Path, { d: "m14.95 13.889-1.061 1.061-5.552-5.553 1.06-1.06 5.552 5.552Z" }),
    /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_primitives149.Path, { d: "M12.574 4a.75.75 0 0 1 .53.22l6.723 6.724a2.315 2.315 0 0 1 0 3.264l-.532-.528.531.53-5.61 5.611a2.31 2.31 0 0 1-3.276.001l-6.72-6.716a.75.75 0 0 1-.22-.53V4.75A.75.75 0 0 1 4.75 4h7.824ZM5.5 5.5v6.764l6.501 6.497a.817.817 0 0 0 .889.178.816.816 0 0 0 .264-.178l5.61-5.61a.816.816 0 0 0-.001-1.149l-6.5-6.502H5.5Z" })
  ] });

  // packages/icons/build-module/library/time-to-read.mjs
  var import_primitives150 = __toESM(require_primitives(), 1);
  var import_jsx_runtime151 = __toESM(require_jsx_runtime(), 1);
  var time_to_read_default = /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(import_primitives150.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(import_primitives150.Path, { d: "M12 3c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16.5c-4.1 0-7.5-3.4-7.5-7.5S7.9 4.5 12 4.5s7.5 3.4 7.5 7.5-3.4 7.5-7.5 7.5zM12 7l-1 5c0 .3.2.6.4.8l4.2 2.8-2.7-4.1L12 7z" }) });

  // packages/icons/build-module/library/title.mjs
  var import_primitives151 = __toESM(require_primitives(), 1);
  var import_jsx_runtime152 = __toESM(require_jsx_runtime(), 1);
  var title_default = /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(import_primitives151.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(import_primitives151.Path, { d: "m4 5.5h2v6.5h1.5v-6.5h2v-1.5h-5.5zm16 10.5h-16v-1.5h16zm-7 4h-9v-1.5h9z" }) });

  // packages/icons/build-module/library/upload.mjs
  var import_primitives152 = __toESM(require_primitives(), 1);
  var import_jsx_runtime153 = __toESM(require_jsx_runtime(), 1);
  var upload_default = /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(import_primitives152.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(import_primitives152.Path, { 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" }) });

  // packages/icons/build-module/library/verse.mjs
  var import_primitives153 = __toESM(require_primitives(), 1);
  var import_jsx_runtime154 = __toESM(require_jsx_runtime(), 1);
  var verse_default = /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(import_primitives153.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(import_primitives153.Path, { 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" }) });

  // packages/icons/build-module/library/video.mjs
  var import_primitives154 = __toESM(require_primitives(), 1);
  var import_jsx_runtime155 = __toESM(require_jsx_runtime(), 1);
  var video_default = /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(import_primitives154.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(import_primitives154.Path, { 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" }) });

  // packages/icons/build-module/library/word-count.mjs
  var import_primitives155 = __toESM(require_primitives(), 1);
  var import_jsx_runtime156 = __toESM(require_jsx_runtime(), 1);
  var word_count_default = /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(import_primitives155.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(import_primitives155.Path, { d: "M19 5c1.1 0 2 .9 2 2v10c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2zM5 6.5c-.3 0-.5.2-.5.5v10c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V7c0-.3-.2-.5-.5-.5zM14.734 9q.714 0 1.15.253.437.247.639.84.2.591.2 1.61v1.15q0 .402.036.667.04.258.172.39.138.127.437.127h.104l-.162.828h-.08q-.5 0-.776-.097a.9.9 0 0 1-.414-.283 2 2 0 0 1-.259-.448q-.316.367-.748.598-.43.23-.977.23-.524 0-.914-.213a1.56 1.56 0 0 1-.61-.58 1.65 1.65 0 0 1-.213-.84q0-.477.207-.817.213-.345.564-.568.357-.23.794-.363.437-.139.902-.196.471-.062.902-.068 0-.805-.315-1.053-.316-.247-.915-.247-.316 0-.678.098-.356.097-.805.408l-.15-.84a2.8 2.8 0 0 1 .846-.419A3.4 3.4 0 0 1 14.734 9m-5.877 1.669H9.86l.59-1.531h.689l-.585 1.53h.898l-.249.727h-.922l-.337.866h1.019l-.354.773h-.962l-.681 1.804h-.701l.69-1.804h-.999l-.693 1.804h-.69l.685-1.804H6.3l.34-.773h.915l.333-.866h-.994l.244-.726H8.16l.594-1.531h.693zm6.832 1.264q-.823.029-1.335.16-.506.133-.74.397-.236.265-.236.685 0 .454.241.66.248.202.632.202.414 0 .8-.207.39-.207.637-.552zm-7.441.328h1l.34-.866h-1z" }) });

  // packages/block-library/build-module/accordion/edit.mjs
  var import_block_editor2 = __toESM(require_block_editor(), 1);
  var import_i18n = __toESM(require_i18n(), 1);
  var import_components = __toESM(require_components(), 1);
  var import_data2 = __toESM(require_data(), 1);
  var import_blocks = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/utils/hooks.mjs
  var import_data = __toESM(require_data(), 1);
  var import_element2 = __toESM(require_element(), 1);
  var import_blob = __toESM(require_blob(), 1);
  var import_block_editor = __toESM(require_block_editor(), 1);
  var import_core_data = __toESM(require_core_data(), 1);
  var import_compose = __toESM(require_compose(), 1);
  function useCanEditEntity(kind, name123, recordId) {
    return (0, import_data.useSelect)(
      (select9) => select9(import_core_data.store).canUser("update", {
        kind,
        name: name123,
        id: recordId
      }),
      [kind, name123, recordId]
    );
  }
  function useUploadMediaFromBlobURL(args = {}) {
    const latestArgsRef = (0, import_element2.useRef)(args);
    const hasUploadStartedRef = (0, import_element2.useRef)(false);
    const { getSettings: getSettings2 } = (0, import_data.useSelect)(import_block_editor.store);
    (0, import_element2.useLayoutEffect)(() => {
      latestArgsRef.current = args;
    });
    (0, import_element2.useEffect)(() => {
      if (hasUploadStartedRef.current) {
        return;
      }
      if (!latestArgsRef.current.url || !(0, import_blob.isBlobURL)(latestArgsRef.current.url)) {
        return;
      }
      const file = (0, import_blob.getBlobByURL)(latestArgsRef.current.url);
      if (!file) {
        return;
      }
      const { url, allowedTypes, onChange, onError } = latestArgsRef.current;
      const { mediaUpload } = getSettings2();
      if (!mediaUpload) {
        return;
      }
      hasUploadStartedRef.current = true;
      mediaUpload({
        filesList: [file],
        allowedTypes,
        onFileChange: ([media]) => {
          if ((0, import_blob.isBlobURL)(media?.url)) {
            return;
          }
          (0, import_blob.revokeBlobURL)(url);
          onChange(media);
          hasUploadStartedRef.current = false;
        },
        onError: (message) => {
          (0, import_blob.revokeBlobURL)(url);
          onError(message);
          hasUploadStartedRef.current = false;
        }
      });
    }, [getSettings2]);
  }
  function useDefaultAvatar() {
    const avatarURL = (0, import_data.useSelect)((select9) => {
      const { getSettings: getSettings2 } = select9(import_block_editor.store);
      const { __experimentalDiscussionSettings } = getSettings2();
      return __experimentalDiscussionSettings?.avatarURL ?? "";
    }, []);
    return avatarURL;
  }
  function useToolsPanelDropdownMenuProps() {
    const isMobile = (0, import_compose.useViewportMatch)("medium", "<");
    return !isMobile ? {
      popoverProps: {
        placement: "left-start",
        // For non-mobile, inner sidebar width (248px) - button width (24px) - border (1px) + padding (16px) + spacing (20px)
        offset: 259
      }
    } : {};
  }

  // packages/block-library/build-module/accordion/edit.mjs
  var import_jsx_runtime157 = __toESM(require_jsx_runtime(), 1);
  var ACCORDION_BLOCK_NAME = "core/accordion-item";
  var ACCORDION_HEADING_BLOCK_NAME = "core/accordion-heading";
  var ACCORDION_BLOCK = {
    name: ACCORDION_BLOCK_NAME
  };
  function Edit({
    attributes: {
      autoclose,
      iconPosition,
      showIcon,
      headingLevel,
      levelOptions
    },
    clientId,
    setAttributes,
    isSelected: isSingleSelected
  }) {
    const registry = (0, import_data2.useRegistry)();
    const { getBlockOrder } = (0, import_data2.useSelect)(import_block_editor2.store);
    const blockProps = (0, import_block_editor2.useBlockProps)({
      role: "group"
    });
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const { updateBlockAttributes, insertBlock } = (0, import_data2.useDispatch)(import_block_editor2.store);
    const blockEditingMode = (0, import_block_editor2.useBlockEditingMode)();
    const isContentOnlyMode = blockEditingMode === "contentOnly";
    const innerBlocksProps = (0, import_block_editor2.useInnerBlocksProps)(blockProps, {
      template: [[ACCORDION_BLOCK_NAME]],
      defaultBlock: ACCORDION_BLOCK,
      directInsert: true,
      templateInsertUpdatesSelection: true
    });
    const addAccordionItemBlock = () => {
      const newAccordionItem = (0, import_blocks.createBlock)(ACCORDION_BLOCK_NAME, {}, [
        (0, import_blocks.createBlock)(ACCORDION_HEADING_BLOCK_NAME, {
          level: headingLevel
        }),
        (0, import_blocks.createBlock)("core/accordion-panel", {})
      ]);
      insertBlock(newAccordionItem, void 0, clientId);
    };
    const updateHeadingLevel = (newHeadingLevel) => {
      const innerBlockClientIds = getBlockOrder(clientId);
      const accordionHeaderClientIds = [];
      innerBlockClientIds.forEach((contentClientId) => {
        const headerClientIds = getBlockOrder(contentClientId);
        accordionHeaderClientIds.push(...headerClientIds);
      });
      registry.batch(() => {
        setAttributes({ headingLevel: newHeadingLevel });
        updateBlockAttributes(accordionHeaderClientIds, {
          level: newHeadingLevel
        });
      });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)(import_jsx_runtime157.Fragment, { children: [
      isSingleSelected && !isContentOnlyMode && /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)(import_jsx_runtime157.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(import_block_editor2.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(import_components.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
          import_block_editor2.HeadingLevelDropdown,
          {
            value: headingLevel,
            options: levelOptions,
            onChange: updateHeadingLevel
          }
        ) }) }),
        /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(import_block_editor2.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(import_components.ToolbarButton, { onClick: addAccordionItemBlock, children: (0, import_i18n.__)("Add item") }) })
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(import_block_editor2.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)(
        import_components.__experimentalToolsPanel,
        {
          label: (0, import_i18n.__)("Settings"),
          resetAll: () => {
            setAttributes({
              autoclose: false,
              showIcon: true,
              iconPosition: "right"
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
              import_components.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n.__)("Auto-close"),
                isShownByDefault: true,
                hasValue: () => !!autoclose,
                onDeselect: () => setAttributes({ autoclose: false }),
                children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
                  import_components.ToggleControl,
                  {
                    isBlock: true,
                    label: (0, import_i18n.__)("Auto-close"),
                    onChange: (value) => {
                      setAttributes({
                        autoclose: value
                      });
                    },
                    checked: autoclose,
                    help: (0, import_i18n.__)(
                      "Automatically close accordions when a new one is opened."
                    )
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
              import_components.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n.__)("Show icon"),
                isShownByDefault: true,
                hasValue: () => !showIcon,
                onDeselect: () => setAttributes({ showIcon: true }),
                children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
                  import_components.ToggleControl,
                  {
                    isBlock: true,
                    label: (0, import_i18n.__)("Show icon"),
                    onChange: (value) => {
                      setAttributes({
                        showIcon: value,
                        iconPosition: value ? iconPosition : "right"
                      });
                    },
                    checked: showIcon,
                    help: (0, import_i18n.__)(
                      "Display a plus icon next to the accordion header."
                    )
                  }
                )
              }
            ),
            showIcon && /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
              import_components.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n.__)("Icon Position"),
                isShownByDefault: true,
                hasValue: () => iconPosition !== "right",
                onDeselect: () => setAttributes({ iconPosition: "right" }),
                children: /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)(
                  import_components.__experimentalToggleGroupControl,
                  {
                    __next40pxDefaultSize: true,
                    isBlock: true,
                    label: (0, import_i18n.__)("Icon Position"),
                    value: iconPosition,
                    onChange: (value) => {
                      setAttributes({ iconPosition: value });
                    },
                    children: [
                      /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
                        import_components.__experimentalToggleGroupControlOption,
                        {
                          label: (0, import_i18n.__)("Left"),
                          value: "left"
                        }
                      ),
                      /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
                        import_components.__experimentalToggleGroupControlOption,
                        {
                          label: (0, import_i18n.__)("Right"),
                          value: "right"
                        }
                      )
                    ]
                  }
                )
              }
            )
          ]
        }
      ) }, "setting"),
      /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("div", { ...innerBlocksProps })
    ] });
  }

  // packages/block-library/build-module/accordion/save.mjs
  var import_block_editor3 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime158 = __toESM(require_jsx_runtime(), 1);
  function save() {
    const blockProps = import_block_editor3.useBlockProps.save({
      role: "group"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("div", { ...import_block_editor3.useInnerBlocksProps.save(blockProps) });
  }

  // packages/block-library/build-module/accordion/block.json
  var block_default = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/accordion",
    title: "Accordion",
    category: "design",
    description: "Displays a foldable layout that groups content in collapsible sections.",
    example: {},
    supports: {
      anchor: true,
      html: false,
      align: ["wide", "full"],
      background: {
        backgroundImage: true,
        backgroundSize: true,
        __experimentalDefaultControls: {
          backgroundImage: true
        }
      },
      color: {
        background: true,
        gradients: true
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      spacing: {
        padding: true,
        margin: ["top", "bottom"],
        blockGap: true
      },
      shadow: true,
      layout: true,
      ariaLabel: true,
      interactivity: true,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      contentRole: true,
      listView: true
    },
    attributes: {
      iconPosition: {
        type: "string",
        default: "right"
      },
      showIcon: {
        type: "boolean",
        default: true
      },
      autoclose: {
        type: "boolean",
        default: false
      },
      headingLevel: {
        type: "number",
        default: 3
      },
      levelOptions: {
        type: "array"
      }
    },
    providesContext: {
      "core/accordion-icon-position": "iconPosition",
      "core/accordion-show-icon": "showIcon",
      "core/accordion-heading-level": "headingLevel"
    },
    allowedBlocks: ["core/accordion-item"],
    textdomain: "default",
    viewScriptModule: "@wordpress/block-library/accordion/view"
  };

  // packages/block-library/build-module/utils/init-block.mjs
  var import_blocks2 = __toESM(require_blocks(), 1);
  function initBlock(block) {
    if (!block) {
      return;
    }
    const { metadata, settings: settings122, name: name123 } = block;
    return (0, import_blocks2.registerBlockType)({ name: name123, ...metadata }, settings122);
  }

  // packages/block-library/build-module/accordion/index.mjs
  var { name } = block_default;
  var settings = {
    icon: accordion_default,
    example: {
      innerBlocks: [
        {
          name: "core/accordion-item",
          innerBlocks: [
            {
              name: "core/accordion-heading",
              attributes: {
                title: (0, import_i18n2.__)(
                  "Lorem ipsum dolor sit amet, consectetur."
                )
              }
            }
          ]
        },
        {
          name: "core/accordion-item",
          innerBlocks: [
            {
              name: "core/accordion-heading",
              attributes: {
                title: (0, import_i18n2.__)(
                  "Suspendisse commodo lacus, interdum et."
                )
              }
            }
          ]
        }
      ]
    },
    edit: Edit,
    save
  };
  var init = () => initBlock({ name, metadata: block_default, settings });

  // packages/block-library/build-module/accordion-item/index.mjs
  var accordion_item_exports = {};
  __export(accordion_item_exports, {
    init: () => init2,
    metadata: () => block_default2,
    name: () => name2,
    settings: () => settings2
  });

  // packages/block-library/build-module/accordion-item/edit.mjs
  var import_i18n3 = __toESM(require_i18n(), 1);
  var import_block_editor4 = __toESM(require_block_editor(), 1);
  var import_data3 = __toESM(require_data(), 1);
  var import_components2 = __toESM(require_components(), 1);
  var import_jsx_runtime159 = __toESM(require_jsx_runtime(), 1);
  var TEMPLATE = [["core/accordion-heading"], ["core/accordion-panel"]];
  function Edit2({
    attributes: attributes2,
    clientId,
    setAttributes,
    isSelected: isSingleSelected
  }) {
    const { openByDefault } = attributes2;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const { isSelected } = (0, import_data3.useSelect)(
      (select9) => {
        if (isSingleSelected || openByDefault) {
          return { isSelected: true };
        }
        return {
          isSelected: select9(import_block_editor4.store).hasSelectedInnerBlock(
            clientId,
            true
          )
        };
      },
      [clientId, isSingleSelected, openByDefault]
    );
    const blockProps = (0, import_block_editor4.useBlockProps)({
      className: clsx_default({
        "is-open": openByDefault || isSelected
      })
    });
    const innerBlocksProps = (0, import_block_editor4.useInnerBlocksProps)(blockProps, {
      template: TEMPLATE,
      templateLock: "all",
      directInsert: true,
      templateInsertUpdatesSelection: true
    });
    return /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)(import_jsx_runtime159.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(import_block_editor4.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
        import_components2.__experimentalToolsPanel,
        {
          label: (0, import_i18n3.__)("Settings"),
          resetAll: () => {
            setAttributes({ openByDefault: false });
          },
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
            import_components2.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n3.__)("Open by default"),
              isShownByDefault: true,
              hasValue: () => !!openByDefault,
              onDeselect: () => {
                setAttributes({ openByDefault: false });
              },
              children: /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
                import_components2.ToggleControl,
                {
                  label: (0, import_i18n3.__)("Open by default"),
                  onChange: (value) => {
                    setAttributes({
                      openByDefault: value
                    });
                  },
                  checked: openByDefault,
                  help: (0, import_i18n3.__)(
                    "Accordion content will be displayed by default."
                  )
                }
              )
            }
          )
        }
      ) }, "setting"),
      /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { ...innerBlocksProps })
    ] });
  }

  // packages/block-library/build-module/accordion-item/save.mjs
  var import_block_editor5 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime160 = __toESM(require_jsx_runtime(), 1);
  function save2({ attributes: attributes2 }) {
    const { openByDefault } = attributes2;
    const blockProps = import_block_editor5.useBlockProps.save({
      className: clsx_default({
        "is-open": openByDefault
      })
    });
    const innerBlocksProps = import_block_editor5.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime160.jsx)("div", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/accordion-item/block.json
  var block_default2 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/accordion-item",
    title: "Accordion Item",
    category: "design",
    description: "Wraps the heading and panel in one unit.",
    parent: ["core/accordion"],
    allowedBlocks: ["core/accordion-heading", "core/accordion-panel"],
    supports: {
      html: false,
      color: {
        background: true,
        gradients: true
      },
      interactivity: true,
      spacing: {
        margin: ["top", "bottom"],
        blockGap: true
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      shadow: true,
      layout: {
        allowEditing: false
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      contentRole: true
    },
    attributes: {
      openByDefault: {
        type: "boolean",
        default: false
      }
    },
    providesContext: {
      "core/accordion-open-by-default": "openByDefault"
    },
    textdomain: "default",
    style: "wp-block-accordion-item"
  };

  // packages/block-library/build-module/accordion-item/index.mjs
  var { name: name2 } = block_default2;
  var settings2 = {
    icon: accordion_item_default,
    edit: Edit2,
    save: save2
  };
  var init2 = () => initBlock({ name: name2, metadata: block_default2, settings: settings2 });

  // packages/block-library/build-module/accordion-heading/index.mjs
  var accordion_heading_exports = {};
  __export(accordion_heading_exports, {
    init: () => init3,
    metadata: () => block_default3,
    name: () => name3,
    settings: () => settings3
  });

  // packages/block-library/build-module/accordion-heading/edit.mjs
  var import_i18n4 = __toESM(require_i18n(), 1);
  var import_element3 = __toESM(require_element(), 1);
  var import_block_editor6 = __toESM(require_block_editor(), 1);
  var import_data4 = __toESM(require_data(), 1);
  var import_jsx_runtime161 = __toESM(require_jsx_runtime(), 1);
  function Edit3({ attributes: attributes2, setAttributes, context }) {
    const { title } = attributes2;
    const {
      "core/accordion-icon-position": iconPosition,
      "core/accordion-show-icon": showIcon,
      "core/accordion-heading-level": headingLevel
    } = context;
    const TagName2 = "h" + headingLevel;
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data4.useDispatch)(import_block_editor6.store);
    (0, import_element3.useEffect)(() => {
      if (iconPosition !== void 0 && showIcon !== void 0) {
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({
          iconPosition,
          showIcon
        });
      }
    }, [
      iconPosition,
      showIcon,
      setAttributes,
      __unstableMarkNextChangeAsNotPersistent
    ]);
    const [fluidTypographySettings, layout] = (0, import_block_editor6.useSettings)(
      "typography.fluid",
      "layout"
    );
    const typographyProps = (0, import_block_editor6.getTypographyClassesAndStyles)(attributes2, {
      typography: {
        fluid: fluidTypographySettings
      },
      layout: {
        wideSize: layout?.wideSize
      }
    });
    const blockProps = (0, import_block_editor6.useBlockProps)();
    const spacingProps = (0, import_block_editor6.__experimentalGetSpacingClassesAndStyles)(attributes2);
    return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime161.jsxs)(
      "button",
      {
        className: "wp-block-accordion-heading__toggle",
        style: spacingProps.style,
        tabIndex: "-1",
        children: [
          showIcon && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
            "span",
            {
              className: "wp-block-accordion-heading__toggle-icon",
              "aria-hidden": "true",
              children: "+"
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
            import_block_editor6.RichText,
            {
              withoutInteractiveFormatting: true,
              disableLineBreaks: true,
              tagName: "span",
              value: title,
              onChange: (newTitle) => setAttributes({ title: newTitle }),
              placeholder: (0, import_i18n4.__)("Accordion title"),
              className: "wp-block-accordion-heading__toggle-title",
              style: {
                letterSpacing: typographyProps.style.letterSpacing,
                textDecoration: typographyProps.style.textDecoration
              }
            }
          ),
          showIcon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
            "span",
            {
              className: "wp-block-accordion-heading__toggle-icon",
              "aria-hidden": "true",
              children: "+"
            }
          )
        ]
      }
    ) });
  }

  // packages/block-library/build-module/accordion-heading/save.mjs
  var import_block_editor7 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime162 = __toESM(require_jsx_runtime(), 1);
  function save3({ attributes: attributes2 }) {
    const { level, title, iconPosition, showIcon } = attributes2;
    const TagName2 = "h" + (level || 3);
    const typographyProps = (0, import_block_editor7.getTypographyClassesAndStyles)(attributes2);
    const blockProps = import_block_editor7.useBlockProps.save();
    const spacingProps = (0, import_block_editor7.__experimentalGetSpacingClassesAndStyles)(attributes2);
    return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime162.jsxs)(
      "button",
      {
        type: "button",
        className: "wp-block-accordion-heading__toggle",
        style: spacingProps.style,
        children: [
          showIcon && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
            "span",
            {
              className: "wp-block-accordion-heading__toggle-icon",
              "aria-hidden": "true",
              children: "+"
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
            import_block_editor7.RichText.Content,
            {
              className: "wp-block-accordion-heading__toggle-title",
              tagName: "span",
              value: title,
              style: {
                letterSpacing: typographyProps.style.letterSpacing,
                textDecoration: typographyProps.style.textDecoration
              }
            }
          ),
          showIcon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
            "span",
            {
              className: "wp-block-accordion-heading__toggle-icon",
              "aria-hidden": "true",
              children: "+"
            }
          )
        ]
      }
    ) });
  }

  // packages/block-library/build-module/accordion-heading/block.json
  var block_default3 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/accordion-heading",
    title: "Accordion Heading",
    category: "design",
    description: "Displays a heading that toggles the accordion panel.",
    parent: ["core/accordion-item"],
    usesContext: [
      "core/accordion-icon-position",
      "core/accordion-show-icon",
      "core/accordion-heading-level"
    ],
    supports: {
      anchor: true,
      color: {
        background: true,
        gradients: true
      },
      align: false,
      interactivity: true,
      spacing: {
        padding: true,
        __experimentalDefaultControls: {
          padding: true
        },
        __experimentalSkipSerialization: true,
        __experimentalSelector: ".wp-block-accordion-heading__toggle"
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      typography: {
        __experimentalSkipSerialization: [
          "textDecoration",
          "letterSpacing"
        ],
        fontSize: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true,
          fontFamily: true
        }
      },
      shadow: true,
      visibility: false,
      lock: false
    },
    selectors: {
      typography: {
        letterSpacing: ".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title",
        textDecoration: ".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title"
      }
    },
    attributes: {
      openByDefault: {
        type: "boolean",
        default: false
      },
      title: {
        type: "rich-text",
        source: "rich-text",
        selector: ".wp-block-accordion-heading__toggle-title",
        role: "content"
      },
      level: {
        type: "number"
      },
      iconPosition: {
        type: "string",
        enum: ["left", "right"],
        default: "right"
      },
      showIcon: {
        type: "boolean",
        default: true
      }
    },
    textdomain: "default"
  };

  // packages/block-library/build-module/accordion-heading/deprecated.mjs
  var import_block_editor8 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime163 = __toESM(require_jsx_runtime(), 1);
  var v1 = {
    attributes: {
      openByDefault: {
        type: "boolean",
        default: false
      },
      title: {
        type: "rich-text",
        source: "rich-text",
        selector: ".wp-block-accordion-heading__toggle-title",
        role: "content"
      },
      level: {
        type: "number"
      },
      iconPosition: {
        type: "string",
        enum: ["left", "right"],
        default: "right"
      },
      showIcon: {
        type: "boolean",
        default: true
      }
    },
    supports: {
      anchor: true,
      color: {
        background: true,
        gradients: true
      },
      align: false,
      interactivity: true,
      spacing: {
        padding: true,
        __experimentalDefaultControls: {
          padding: true
        },
        __experimentalSkipSerialization: true,
        __experimentalSelector: ".wp-block-accordion-heading__toggle"
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      typography: {
        fontSize: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true,
          fontFamily: true
        }
      },
      shadow: true,
      visibility: false
    },
    save({ attributes: attributes2 }) {
      const { level, title, iconPosition, showIcon } = attributes2;
      const TagName2 = "h" + (level || 3);
      const blockProps = import_block_editor8.useBlockProps.save();
      const spacingProps = (0, import_block_editor8.__experimentalGetSpacingClassesAndStyles)(attributes2);
      return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime163.jsxs)(
        "button",
        {
          className: "wp-block-accordion-heading__toggle",
          style: spacingProps.style,
          children: [
            showIcon && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
              "span",
              {
                className: "wp-block-accordion-heading__toggle-icon",
                "aria-hidden": "true",
                children: "+"
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
              import_block_editor8.RichText.Content,
              {
                className: "wp-block-accordion-heading__toggle-title",
                tagName: "span",
                value: title
              }
            ),
            showIcon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
              "span",
              {
                className: "wp-block-accordion-heading__toggle-icon",
                "aria-hidden": "true",
                children: "+"
              }
            )
          ]
        }
      ) });
    }
  };
  var v2 = {
    attributes: {
      openByDefault: {
        type: "boolean",
        default: false
      },
      title: {
        type: "rich-text",
        source: "rich-text",
        selector: ".wp-block-accordion-heading__toggle-title",
        role: "content"
      },
      level: {
        type: "number"
      },
      iconPosition: {
        type: "string",
        enum: ["left", "right"],
        default: "right"
      },
      showIcon: {
        type: "boolean",
        default: true
      }
    },
    supports: {
      anchor: true,
      color: {
        background: true,
        gradients: true
      },
      align: false,
      interactivity: true,
      spacing: {
        padding: true,
        __experimentalDefaultControls: {
          padding: true
        },
        __experimentalSkipSerialization: true,
        __experimentalSelector: ".wp-block-accordion-heading__toggle"
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      typography: {
        __experimentalSkipSerialization: [
          "textDecoration",
          "letterSpacing"
        ],
        fontSize: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true,
          fontFamily: true
        }
      },
      shadow: true,
      visibility: false,
      lock: false
    },
    save({ attributes: attributes2 }) {
      const { level, title, iconPosition, showIcon } = attributes2;
      const TagName2 = "h" + (level || 3);
      const typographyProps = (0, import_block_editor8.getTypographyClassesAndStyles)(attributes2);
      const blockProps = import_block_editor8.useBlockProps.save();
      const spacingProps = (0, import_block_editor8.__experimentalGetSpacingClassesAndStyles)(attributes2);
      return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime163.jsxs)(
        "button",
        {
          className: "wp-block-accordion-heading__toggle",
          style: spacingProps.style,
          children: [
            showIcon && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
              "span",
              {
                className: "wp-block-accordion-heading__toggle-icon",
                "aria-hidden": "true",
                children: "+"
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
              import_block_editor8.RichText.Content,
              {
                className: "wp-block-accordion-heading__toggle-title",
                tagName: "span",
                value: title,
                style: {
                  letterSpacing: typographyProps.style.letterSpacing,
                  textDecoration: typographyProps.style.textDecoration
                }
              }
            ),
            showIcon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
              "span",
              {
                className: "wp-block-accordion-heading__toggle-icon",
                "aria-hidden": "true",
                children: "+"
              }
            )
          ]
        }
      ) });
    }
  };
  var deprecated_default = [v1, v2];

  // packages/block-library/build-module/accordion-heading/index.mjs
  var { name: name3 } = block_default3;
  var settings3 = {
    icon: accordion_heading_default,
    edit: Edit3,
    save: save3,
    deprecated: deprecated_default
  };
  var init3 = () => initBlock({ name: name3, metadata: block_default3, settings: settings3 });

  // packages/block-library/build-module/accordion-panel/index.mjs
  var accordion_panel_exports = {};
  __export(accordion_panel_exports, {
    init: () => init4,
    metadata: () => block_default4,
    name: () => name4,
    settings: () => settings4
  });

  // packages/block-library/build-module/accordion-panel/edit.mjs
  var import_block_editor9 = __toESM(require_block_editor(), 1);
  var import_data5 = __toESM(require_data(), 1);
  var import_jsx_runtime164 = __toESM(require_jsx_runtime(), 1);
  function Edit4({ attributes: attributes2, context, clientId, isSelected }) {
    const { allowedBlocks, templateLock } = attributes2;
    const openByDefault = context["core/accordion-open-by-default"];
    const { hasSelection } = (0, import_data5.useSelect)(
      (select9) => {
        if (isSelected || openByDefault) {
          return { hasSelection: true };
        }
        const {
          getBlockRootClientId,
          isBlockSelected,
          hasSelectedInnerBlock
        } = select9(import_block_editor9.store);
        const rootClientId = getBlockRootClientId(clientId);
        return {
          hasSelection: isBlockSelected(rootClientId) || hasSelectedInnerBlock(rootClientId, true)
        };
      },
      [clientId, isSelected, openByDefault]
    );
    const blockProps = (0, import_block_editor9.useBlockProps)({
      "aria-hidden": !hasSelection,
      role: "region"
    });
    const innerBlocksProps = (0, import_block_editor9.useInnerBlocksProps)(blockProps, {
      allowedBlocks,
      template: [["core/paragraph", {}]],
      templateLock
    });
    return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)("div", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/accordion-panel/save.mjs
  var import_block_editor10 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime165 = __toESM(require_jsx_runtime(), 1);
  function save4() {
    const blockProps = import_block_editor10.useBlockProps.save({
      role: "region"
    });
    const innerBlocksProps = import_block_editor10.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)("div", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/accordion-panel/block.json
  var block_default4 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/accordion-panel",
    title: "Accordion Panel",
    category: "design",
    description: "Contains the hidden or revealed content beneath the heading.",
    parent: ["core/accordion-item"],
    usesContext: ["core/accordion-open-by-default"],
    supports: {
      html: false,
      color: {
        background: true,
        gradients: true
      },
      interactivity: true,
      spacing: {
        padding: true,
        blockGap: true,
        __experimentalDefaultControls: {
          padding: true,
          blockGap: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      shadow: true,
      layout: {
        allowEditing: false
      },
      visibility: false,
      contentRole: true,
      allowedBlocks: true,
      lock: false
    },
    attributes: {
      templateLock: {
        type: ["string", "boolean"],
        enum: ["all", "insert", "contentOnly", false],
        default: false
      }
    },
    textdomain: "default",
    style: "wp-block-accordion-panel"
  };

  // packages/block-library/build-module/accordion-panel/index.mjs
  var { name: name4 } = block_default4;
  var settings4 = {
    icon: contents_default,
    edit: Edit4,
    save: save4
  };
  var init4 = () => initBlock({ name: name4, metadata: block_default4, settings: settings4 });

  // packages/block-library/build-module/archives/index.mjs
  var archives_exports = {};
  __export(archives_exports, {
    init: () => init5,
    metadata: () => block_default5,
    name: () => name5,
    settings: () => settings5
  });

  // packages/block-library/build-module/archives/block.json
  var block_default5 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/archives",
    title: "Archives",
    category: "widgets",
    description: "Display a date archive of your posts.",
    textdomain: "default",
    attributes: {
      displayAsDropdown: {
        type: "boolean",
        default: false
      },
      showLabel: {
        type: "boolean",
        default: true
      },
      showPostCounts: {
        type: "boolean",
        default: false
      },
      type: {
        type: "string",
        default: "monthly"
      }
    },
    supports: {
      anchor: true,
      align: true,
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      html: false,
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    }
  };

  // packages/block-library/build-module/archives/edit.mjs
  var import_components3 = __toESM(require_components(), 1);
  var import_i18n5 = __toESM(require_i18n(), 1);
  var import_block_editor11 = __toESM(require_block_editor(), 1);
  var import_server_side_render = __toESM(require_server_side_render(), 1);
  var import_compose2 = __toESM(require_compose(), 1);
  var import_jsx_runtime166 = __toESM(require_jsx_runtime(), 1);
  function ArchivesEdit({ attributes: attributes2, setAttributes, name: name123 }) {
    const { showLabel, showPostCounts, displayAsDropdown, type } = attributes2;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const { content, status, error } = (0, import_server_side_render.useServerSideRender)({
      attributes: attributes2,
      skipBlockSupportAttributes: true,
      block: name123
    });
    const disabledRef = (0, import_compose2.useDisabled)();
    const blockProps = (0, import_block_editor11.useBlockProps)({ ref: disabledRef });
    return /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)(import_jsx_runtime166.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(import_block_editor11.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)(
        import_components3.__experimentalToolsPanel,
        {
          label: (0, import_i18n5.__)("Settings"),
          resetAll: () => {
            setAttributes({
              displayAsDropdown: false,
              showLabel: true,
              showPostCounts: false,
              type: "monthly"
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
              import_components3.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n5.__)("Display as dropdown"),
                isShownByDefault: true,
                hasValue: () => displayAsDropdown,
                onDeselect: () => setAttributes({ displayAsDropdown: false }),
                children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
                  import_components3.ToggleControl,
                  {
                    label: (0, import_i18n5.__)("Display as dropdown"),
                    checked: displayAsDropdown,
                    onChange: () => setAttributes({
                      displayAsDropdown: !displayAsDropdown
                    })
                  }
                )
              }
            ),
            displayAsDropdown && /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
              import_components3.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n5.__)("Show label"),
                isShownByDefault: true,
                hasValue: () => !showLabel,
                onDeselect: () => setAttributes({ showLabel: true }),
                children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
                  import_components3.ToggleControl,
                  {
                    label: (0, import_i18n5.__)("Show label"),
                    checked: showLabel,
                    onChange: () => setAttributes({
                      showLabel: !showLabel
                    })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
              import_components3.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n5.__)("Show post counts"),
                isShownByDefault: true,
                hasValue: () => showPostCounts,
                onDeselect: () => setAttributes({ showPostCounts: false }),
                children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
                  import_components3.ToggleControl,
                  {
                    label: (0, import_i18n5.__)("Show post counts"),
                    checked: showPostCounts,
                    onChange: () => setAttributes({
                      showPostCounts: !showPostCounts
                    })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
              import_components3.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n5.__)("Group by"),
                isShownByDefault: true,
                hasValue: () => type !== "monthly",
                onDeselect: () => setAttributes({ type: "monthly" }),
                children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
                  import_components3.SelectControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n5.__)("Group by"),
                    options: [
                      { label: (0, import_i18n5.__)("Year"), value: "yearly" },
                      { label: (0, import_i18n5.__)("Month"), value: "monthly" },
                      { label: (0, import_i18n5.__)("Week"), value: "weekly" },
                      { label: (0, import_i18n5.__)("Day"), value: "daily" }
                    ],
                    value: type,
                    onChange: (value) => setAttributes({ type: value })
                  }
                )
              }
            )
          ]
        }
      ) }),
      status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime166.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(import_components3.Spinner, {}) }),
      status === "error" && /* @__PURE__ */ (0, import_jsx_runtime166.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)("p", { children: (0, import_i18n5.sprintf)(
        /* translators: %s: error message returned when rendering the block. */
        (0, import_i18n5.__)("Error: %s"),
        error
      ) }) }),
      status === "success" && /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(html_renderer_default, { wrapperProps: blockProps, html: content })
    ] });
  }

  // packages/block-library/build-module/archives/index.mjs
  var { name: name5 } = block_default5;
  var settings5 = {
    icon: archive_default,
    example: {},
    edit: ArchivesEdit
  };
  var init5 = () => initBlock({ name: name5, metadata: block_default5, settings: settings5 });

  // packages/block-library/build-module/avatar/index.mjs
  var avatar_exports = {};
  __export(avatar_exports, {
    init: () => init6,
    metadata: () => block_default6,
    name: () => name6,
    settings: () => settings6
  });

  // packages/block-library/build-module/avatar/block.json
  var block_default6 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/avatar",
    title: "Avatar",
    category: "theme",
    description: "Add a user\u2019s avatar.",
    textdomain: "default",
    attributes: {
      userId: {
        type: "number"
      },
      size: {
        type: "number",
        default: 96
      },
      isLink: {
        type: "boolean",
        default: false
      },
      linkTarget: {
        type: "string",
        default: "_self"
      }
    },
    usesContext: ["postType", "postId", "commentId"],
    supports: {
      anchor: true,
      html: false,
      align: true,
      alignWide: false,
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      __experimentalBorder: {
        __experimentalSkipSerialization: true,
        radius: true,
        width: true,
        color: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true
        }
      },
      color: {
        text: false,
        background: false
      },
      filter: {
        duotone: true
      },
      interactivity: {
        clientNavigation: true
      }
    },
    selectors: {
      border: ".wp-block-avatar img",
      filter: {
        duotone: ".wp-block-avatar img"
      }
    },
    editorStyle: "wp-block-avatar-editor",
    style: "wp-block-avatar"
  };

  // packages/block-library/build-module/avatar/edit.mjs
  var import_block_editor12 = __toESM(require_block_editor(), 1);
  var import_components5 = __toESM(require_components(), 1);
  var import_i18n8 = __toESM(require_i18n(), 1);
  var import_url = __toESM(require_url(), 1);

  // packages/block-library/build-module/avatar/hooks.mjs
  var import_core_data2 = __toESM(require_core_data(), 1);
  var import_i18n6 = __toESM(require_i18n(), 1);
  var import_data6 = __toESM(require_data(), 1);
  function getAvatarSizes(sizes) {
    const minSize = sizes ? sizes[0] : 24;
    const maxSize = sizes ? sizes[sizes.length - 1] : 96;
    const maxSizeBuffer = Math.floor(maxSize * 2.5);
    return {
      minSize,
      maxSize: maxSizeBuffer
    };
  }
  function useCommentAvatar({ commentId }) {
    const [avatars] = (0, import_core_data2.useEntityProp)(
      "root",
      "comment",
      "author_avatar_urls",
      commentId
    );
    const [authorName] = (0, import_core_data2.useEntityProp)(
      "root",
      "comment",
      "author_name",
      commentId
    );
    const avatarUrls = avatars ? Object.values(avatars) : null;
    const sizes = avatars ? Object.keys(avatars) : null;
    const { minSize, maxSize } = getAvatarSizes(sizes);
    const defaultAvatar = useDefaultAvatar();
    return {
      src: avatarUrls ? avatarUrls[avatarUrls.length - 1] : defaultAvatar,
      minSize,
      maxSize,
      alt: authorName ? (
        // translators: %s: Author name.
        (0, import_i18n6.sprintf)((0, import_i18n6.__)("%s Avatar"), authorName)
      ) : (0, import_i18n6.__)("Default Avatar")
    };
  }
  function useUserAvatar({ userId, postId, postType }) {
    const { authorDetails } = (0, import_data6.useSelect)(
      (select9) => {
        const { getEditedEntityRecord, getUser } = select9(import_core_data2.store);
        if (userId) {
          return {
            authorDetails: getUser(userId)
          };
        }
        const _authorId = getEditedEntityRecord(
          "postType",
          postType,
          postId
        )?.author;
        return {
          authorDetails: _authorId ? getUser(_authorId) : null
        };
      },
      [postType, postId, userId]
    );
    const avatarUrls = authorDetails?.avatar_urls ? Object.values(authorDetails.avatar_urls) : null;
    const sizes = authorDetails?.avatar_urls ? Object.keys(authorDetails.avatar_urls) : null;
    const { minSize, maxSize } = getAvatarSizes(sizes);
    const defaultAvatar = useDefaultAvatar();
    return {
      src: avatarUrls ? avatarUrls[avatarUrls.length - 1] : defaultAvatar,
      minSize,
      maxSize,
      alt: authorDetails ? (
        // translators: %s: Author name.
        (0, import_i18n6.sprintf)((0, import_i18n6.__)("%s Avatar"), authorDetails?.name)
      ) : (0, import_i18n6.__)("Default Avatar")
    };
  }

  // packages/block-library/build-module/avatar/user-control.mjs
  var import_i18n7 = __toESM(require_i18n(), 1);
  var import_components4 = __toESM(require_components(), 1);
  var import_data7 = __toESM(require_data(), 1);
  var import_core_data3 = __toESM(require_core_data(), 1);
  var import_element4 = __toESM(require_element(), 1);
  var import_compose3 = __toESM(require_compose(), 1);
  var import_html_entities = __toESM(require_html_entities(), 1);
  var import_jsx_runtime167 = __toESM(require_jsx_runtime(), 1);
  var AUTHORS_QUERY = {
    who: "authors",
    per_page: 100,
    _fields: "id,name",
    context: "view"
  };
  function UserControl({ value, onChange }) {
    const [filterValue, setFilterValue] = (0, import_element4.useState)("");
    const { authors, isLoading } = (0, import_data7.useSelect)(
      (select9) => {
        const { getUsers, isResolving } = select9(import_core_data3.store);
        const query = { ...AUTHORS_QUERY };
        if (filterValue) {
          query.search = filterValue;
          query.search_columns = ["name"];
        }
        return {
          authors: getUsers(query),
          isLoading: isResolving("getUsers", [query])
        };
      },
      [filterValue]
    );
    const options2 = (0, import_element4.useMemo)(() => {
      return (authors ?? []).map((author) => {
        return {
          value: author.id,
          label: (0, import_html_entities.decodeEntities)(author.name)
        };
      });
    }, [authors]);
    return /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
      import_components4.ComboboxControl,
      {
        __next40pxDefaultSize: true,
        label: (0, import_i18n7.__)("User"),
        help: (0, import_i18n7.__)(
          "Select the avatar user to display, if it is blank it will use the post/page author."
        ),
        value,
        onChange,
        options: options2,
        onFilterValueChange: (0, import_compose3.debounce)(setFilterValue, 300),
        isLoading
      }
    );
  }

  // packages/block-library/build-module/avatar/edit.mjs
  var import_jsx_runtime168 = __toESM(require_jsx_runtime(), 1);
  var AvatarInspectorControls = ({
    setAttributes,
    avatar,
    attributes: attributes2,
    selectUser
  }) => {
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(import_block_editor12.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime168.jsxs)(
      import_components5.__experimentalToolsPanel,
      {
        label: (0, import_i18n8.__)("Settings"),
        resetAll: () => {
          setAttributes({
            size: 96,
            isLink: false,
            linkTarget: "_self",
            userId: void 0
          });
        },
        dropdownMenuProps,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
            import_components5.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n8.__)("Image size"),
              isShownByDefault: true,
              hasValue: () => attributes2?.size !== 96,
              onDeselect: () => setAttributes({ size: 96 }),
              children: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
                import_components5.RangeControl,
                {
                  __next40pxDefaultSize: true,
                  label: (0, import_i18n8.__)("Image size"),
                  onChange: (newSize) => setAttributes({
                    size: newSize
                  }),
                  min: avatar.minSize,
                  max: avatar.maxSize,
                  initialPosition: attributes2?.size,
                  value: attributes2?.size
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
            import_components5.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n8.__)("Link to user profile"),
              isShownByDefault: true,
              hasValue: () => attributes2?.isLink,
              onDeselect: () => setAttributes({ isLink: false }),
              children: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
                import_components5.ToggleControl,
                {
                  label: (0, import_i18n8.__)("Link to user profile"),
                  onChange: () => setAttributes({ isLink: !attributes2.isLink }),
                  checked: attributes2.isLink
                }
              )
            }
          ),
          attributes2.isLink && /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
            import_components5.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n8.__)("Open in new tab"),
              isShownByDefault: true,
              hasValue: () => attributes2?.linkTarget !== "_self",
              onDeselect: () => setAttributes({ linkTarget: "_self" }),
              children: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
                import_components5.ToggleControl,
                {
                  label: (0, import_i18n8.__)("Open in new tab"),
                  onChange: (value) => setAttributes({
                    linkTarget: value ? "_blank" : "_self"
                  }),
                  checked: attributes2.linkTarget === "_blank"
                }
              )
            }
          ),
          selectUser && /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
            import_components5.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n8.__)("User"),
              isShownByDefault: true,
              hasValue: () => !!attributes2?.userId,
              onDeselect: () => setAttributes({ userId: void 0 }),
              children: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
                UserControl,
                {
                  value: attributes2?.userId,
                  onChange: (value) => {
                    setAttributes({
                      userId: value
                    });
                  }
                }
              )
            }
          )
        ]
      }
    ) });
  };
  var AvatarLinkWrapper = ({ children, isLink }) => isLink ? /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
    "a",
    {
      href: "#avatar-pseudo-link",
      className: "wp-block-avatar__link",
      onClick: (event) => event.preventDefault(),
      children
    }
  ) : children;
  var ResizableAvatar = ({
    setAttributes,
    attributes: attributes2,
    avatar,
    blockProps,
    isSelected
  }) => {
    const borderProps = (0, import_block_editor12.__experimentalUseBorderProps)(attributes2);
    const doubledSizedSrc = (0, import_url.addQueryArgs)(
      (0, import_url.removeQueryArgs)(avatar?.src, ["s"]),
      {
        s: attributes2?.size * 2
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime168.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(AvatarLinkWrapper, { isLink: attributes2.isLink, children: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
      import_components5.ResizableBox,
      {
        size: {
          width: attributes2.size,
          height: attributes2.size
        },
        showHandle: isSelected,
        onResizeStop: (event, direction, elt, delta) => {
          setAttributes({
            size: parseInt(
              attributes2.size + (delta.height || delta.width),
              10
            )
          });
        },
        lockAspectRatio: true,
        enable: {
          top: false,
          right: !(0, import_i18n8.isRTL)(),
          bottom: true,
          left: (0, import_i18n8.isRTL)()
        },
        minWidth: avatar.minSize,
        maxWidth: avatar.maxSize,
        children: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
          "img",
          {
            src: doubledSizedSrc,
            alt: avatar.alt,
            className: clsx_default(
              "avatar",
              "avatar-" + attributes2.size,
              "photo",
              "wp-block-avatar__image",
              borderProps.className
            ),
            style: borderProps.style
          }
        )
      }
    ) }) });
  };
  var CommentEdit = ({ attributes: attributes2, context, setAttributes, isSelected }) => {
    const { commentId } = context;
    const blockProps = (0, import_block_editor12.useBlockProps)();
    const avatar = useCommentAvatar({ commentId });
    return /* @__PURE__ */ (0, import_jsx_runtime168.jsxs)(import_jsx_runtime168.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
        AvatarInspectorControls,
        {
          avatar,
          setAttributes,
          attributes: attributes2,
          selectUser: false
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
        ResizableAvatar,
        {
          attributes: attributes2,
          avatar,
          blockProps,
          isSelected,
          setAttributes
        }
      )
    ] });
  };
  var UserEdit = ({ attributes: attributes2, context, setAttributes, isSelected }) => {
    const { postId, postType } = context;
    const avatar = useUserAvatar({
      userId: attributes2?.userId,
      postId,
      postType
    });
    const blockProps = (0, import_block_editor12.useBlockProps)();
    return /* @__PURE__ */ (0, import_jsx_runtime168.jsxs)(import_jsx_runtime168.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
        AvatarInspectorControls,
        {
          selectUser: true,
          attributes: attributes2,
          avatar,
          setAttributes
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
        ResizableAvatar,
        {
          attributes: attributes2,
          avatar,
          blockProps,
          isSelected,
          setAttributes
        }
      )
    ] });
  };
  function Edit5(props) {
    if (props?.context?.commentId || props?.context?.commentId === null) {
      return /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(CommentEdit, { ...props });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(UserEdit, { ...props });
  }

  // packages/block-library/build-module/avatar/index.mjs
  var { name: name6 } = block_default6;
  var settings6 = {
    icon: comment_author_avatar_default,
    edit: Edit5,
    example: {}
  };
  var init6 = () => initBlock({ name: name6, metadata: block_default6, settings: settings6 });

  // packages/block-library/build-module/audio/index.mjs
  var audio_exports = {};
  __export(audio_exports, {
    init: () => init7,
    metadata: () => block_default8,
    name: () => name7,
    settings: () => settings7
  });
  var import_i18n11 = __toESM(require_i18n(), 1);
  var import_blocks6 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/audio/deprecated.mjs
  var import_block_editor13 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime169 = __toESM(require_jsx_runtime(), 1);
  var deprecated_default2 = [
    {
      attributes: {
        src: {
          type: "string",
          source: "attribute",
          selector: "audio",
          attribute: "src"
        },
        caption: {
          type: "string",
          source: "html",
          selector: "figcaption"
        },
        id: {
          type: "number"
        },
        autoplay: {
          type: "boolean",
          source: "attribute",
          selector: "audio",
          attribute: "autoplay"
        },
        loop: {
          type: "boolean",
          source: "attribute",
          selector: "audio",
          attribute: "loop"
        },
        preload: {
          type: "string",
          source: "attribute",
          selector: "audio",
          attribute: "preload"
        }
      },
      supports: {
        align: true
      },
      save({ attributes: attributes2 }) {
        const { autoplay, caption, loop, preload, src } = attributes2;
        return /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)("figure", { children: [
          /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
            "audio",
            {
              controls: "controls",
              src,
              autoPlay: autoplay,
              loop,
              preload
            }
          ),
          !import_block_editor13.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
            import_block_editor13.RichText.Content,
            {
              tagName: "figcaption",
              value: caption
            }
          )
        ] });
      }
    }
  ];

  // packages/block-library/build-module/audio/edit.mjs
  var import_blob2 = __toESM(require_blob(), 1);
  var import_components8 = __toESM(require_components(), 1);
  var import_block_editor15 = __toESM(require_block_editor(), 1);
  var import_i18n10 = __toESM(require_i18n(), 1);
  var import_data8 = __toESM(require_data(), 1);
  var import_notices = __toESM(require_notices(), 1);
  var import_element7 = __toESM(require_element(), 1);

  // node_modules/memize/dist/index.js
  function memize(fn, options2) {
    var size = 0;
    var head;
    var tail;
    options2 = options2 || {};
    function memoized() {
      var node = head, len = arguments.length, args, i2;
      searchCache: while (node) {
        if (node.args.length !== arguments.length) {
          node = node.next;
          continue;
        }
        for (i2 = 0; i2 < len; i2++) {
          if (node.args[i2] !== arguments[i2]) {
            node = node.next;
            continue searchCache;
          }
        }
        if (node !== head) {
          if (node === tail) {
            tail = node.prev;
          }
          node.prev.next = node.next;
          if (node.next) {
            node.next.prev = node.prev;
          }
          node.next = head;
          node.prev = null;
          head.prev = node;
          head = node;
        }
        return node.val;
      }
      args = new Array(len);
      for (i2 = 0; i2 < len; i2++) {
        args[i2] = arguments[i2];
      }
      node = {
        args,
        // Generate the result from original function
        val: fn.apply(null, args)
      };
      if (head) {
        head.prev = node;
        node.next = head;
      } else {
        tail = node;
      }
      if (size === /** @type {MemizeOptions} */
      options2.maxSize) {
        tail = /** @type {MemizeCacheNode} */
        tail.prev;
        tail.next = null;
      } else {
        size++;
      }
      head = node;
      return node.val;
    }
    memoized.clear = function() {
      head = null;
      tail = null;
      size = 0;
    };
    return memoized;
  }

  // packages/block-library/build-module/embed/util.mjs
  var import_components6 = __toESM(require_components(), 1);
  var import_element5 = __toESM(require_element(), 1);
  var import_blocks3 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/embed/block.json
  var block_default7 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/embed",
    title: "Embed",
    category: "embed",
    description: "Add a block that displays content pulled from other sites, like Twitter or YouTube.",
    textdomain: "default",
    attributes: {
      url: {
        type: "string",
        role: "content"
      },
      caption: {
        type: "rich-text",
        source: "rich-text",
        selector: "figcaption",
        role: "content"
      },
      type: {
        type: "string",
        role: "content"
      },
      providerNameSlug: {
        type: "string",
        role: "content"
      },
      allowResponsive: {
        type: "boolean",
        default: true
      },
      responsive: {
        type: "boolean",
        default: false,
        role: "content"
      },
      previewable: {
        type: "boolean",
        default: true,
        role: "content"
      }
    },
    supports: {
      anchor: true,
      align: true,
      spacing: {
        margin: true
      },
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-embed-editor",
    style: "wp-block-embed"
  };

  // packages/block-library/build-module/embed/constants.mjs
  var ASPECT_RATIOS = [
    // Common video resolutions.
    { ratio: "2.33", className: "wp-embed-aspect-21-9" },
    { ratio: "2.00", className: "wp-embed-aspect-18-9" },
    { ratio: "1.78", className: "wp-embed-aspect-16-9" },
    { ratio: "1.33", className: "wp-embed-aspect-4-3" },
    // Vertical video and instagram square video support.
    { ratio: "1.00", className: "wp-embed-aspect-1-1" },
    { ratio: "0.56", className: "wp-embed-aspect-9-16" },
    { ratio: "0.50", className: "wp-embed-aspect-1-2" }
  ];
  var WP_EMBED_TYPE = "wp-embed";

  // packages/block-library/build-module/lock-unlock.mjs
  var import_private_apis = __toESM(require_private_apis(), 1);
  var { lock, unlock } = (0, import_private_apis.__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/block-library"
  );

  // packages/block-library/build-module/embed/util.mjs
  var import_jsx_runtime170 = __toESM(require_jsx_runtime(), 1);
  var { name: DEFAULT_EMBED_BLOCK } = block_default7;
  var { kebabCase } = unlock(import_components6.privateApis);
  var getEmbedInfoByProvider = (provider) => (0, import_blocks3.getBlockVariations)(DEFAULT_EMBED_BLOCK)?.find(
    ({ name: name123 }) => name123 === provider
  );
  var matchesPatterns = (url, patterns = []) => patterns.some((pattern) => url.match(pattern));
  var findMoreSuitableBlock = (url) => (0, import_blocks3.getBlockVariations)(DEFAULT_EMBED_BLOCK)?.find(
    ({ patterns }) => matchesPatterns(url, patterns)
  );
  var isFromWordPress = (html) => html && html.includes('class="wp-embedded-content"');
  var getPhotoHtml = (photo) => {
    const imageUrl = photo.url || photo.thumbnail_url;
    const photoPreview = /* @__PURE__ */ (0, import_jsx_runtime170.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime170.jsx)("img", { src: imageUrl, alt: photo.title, width: "100%" }) });
    return (0, import_element5.renderToString)(photoPreview);
  };
  var createUpgradedEmbedBlock = (props, attributesFromPreview = {}) => {
    const { preview, attributes: attributes2 = {} } = props;
    const { url, providerNameSlug, type, ...restAttributes } = attributes2;
    if (!url || !(0, import_blocks3.getBlockType)(DEFAULT_EMBED_BLOCK)) {
      return;
    }
    const matchedBlock = findMoreSuitableBlock(url);
    const isCurrentBlockWP = providerNameSlug === "wordpress" || type === WP_EMBED_TYPE;
    const shouldCreateNewBlock = !isCurrentBlockWP && matchedBlock && (matchedBlock.attributes.providerNameSlug !== providerNameSlug || !providerNameSlug);
    if (shouldCreateNewBlock) {
      return (0, import_blocks3.createBlock)(DEFAULT_EMBED_BLOCK, {
        url,
        ...restAttributes,
        ...matchedBlock.attributes
      });
    }
    const wpVariation = (0, import_blocks3.getBlockVariations)(DEFAULT_EMBED_BLOCK)?.find(
      ({ name: name123 }) => name123 === "wordpress"
    );
    if (!wpVariation || !preview || !isFromWordPress(preview.html) || isCurrentBlockWP) {
      return;
    }
    return (0, import_blocks3.createBlock)(DEFAULT_EMBED_BLOCK, {
      url,
      ...wpVariation.attributes,
      // By now we have the preview, but when the new block first renders, it
      // won't have had all the attributes set, and so won't get the correct
      // type and it won't render correctly. So, we pass through the current attributes
      // here so that the initial render works when we switch to the WordPress
      // block. This only affects the WordPress block because it can't be
      // rendered in the usual Sandbox (it has a sandbox of its own) and it
      // relies on the preview to set the correct render type.
      ...attributesFromPreview
    });
  };
  var hasAspectRatioClass = (existingClassNames) => {
    if (!existingClassNames) {
      return false;
    }
    return ASPECT_RATIOS.some(
      ({ className }) => existingClassNames.includes(className)
    );
  };
  var removeAspectRatioClasses = (existingClassNames) => {
    if (!existingClassNames) {
      return existingClassNames;
    }
    const aspectRatioClassNames = ASPECT_RATIOS.reduce(
      (accumulator, { className }) => {
        accumulator.push(className);
        return accumulator;
      },
      ["wp-has-aspect-ratio"]
    );
    let outputClassNames = existingClassNames;
    for (const className of aspectRatioClassNames) {
      outputClassNames = outputClassNames.replace(className, "");
    }
    return outputClassNames.trim();
  };
  function hasInlineResponsivePadding(html) {
    const paddingPattern = /padding-(top|bottom)\s*:\s*[\d.]+%/i;
    return paddingPattern.test(html);
  }
  function getClassNames(html, existingClassNames, allowResponsive = true) {
    if (!allowResponsive) {
      return removeAspectRatioClasses(existingClassNames);
    }
    if (hasInlineResponsivePadding(html)) {
      return removeAspectRatioClasses(existingClassNames);
    }
    const previewDocument = document.implementation.createHTMLDocument("");
    previewDocument.body.innerHTML = html;
    const iframe = previewDocument.body.querySelector("iframe");
    if (iframe && iframe.height && iframe.width) {
      const aspectRatio = (iframe.width / iframe.height).toFixed(2);
      for (let ratioIndex = 0; ratioIndex < ASPECT_RATIOS.length; ratioIndex++) {
        const potentialRatio = ASPECT_RATIOS[ratioIndex];
        if (aspectRatio >= potentialRatio.ratio) {
          const ratioDiff = aspectRatio - potentialRatio.ratio;
          if (ratioDiff > 0.1) {
            return removeAspectRatioClasses(existingClassNames);
          }
          return clsx_default(
            removeAspectRatioClasses(existingClassNames),
            potentialRatio.className,
            "wp-has-aspect-ratio"
          );
        }
      }
    }
    return existingClassNames;
  }
  function fallback(url, onReplace) {
    const link = /* @__PURE__ */ (0, import_jsx_runtime170.jsx)("a", { href: url, children: url });
    onReplace(
      (0, import_blocks3.createBlock)("core/paragraph", { content: (0, import_element5.renderToString)(link) })
    );
  }
  var getAttributesFromPreview = memize(
    (preview, title, currentClassNames, isResponsive, allowResponsive = true) => {
      if (!preview) {
        return {};
      }
      const attributes2 = {};
      let { type = "rich" } = preview;
      const { html, provider_name: providerName } = preview;
      const providerNameSlug = kebabCase(
        (providerName || title).toLowerCase()
      );
      if (isFromWordPress(html)) {
        type = WP_EMBED_TYPE;
      }
      if (html || "photo" === type) {
        attributes2.type = type;
        attributes2.providerNameSlug = providerNameSlug;
      }
      if (hasAspectRatioClass(currentClassNames)) {
        return attributes2;
      }
      attributes2.className = getClassNames(
        html,
        currentClassNames,
        isResponsive && allowResponsive
      );
      return attributes2;
    }
  );
  var getMergedAttributesWithPreview = (currentAttributes, preview, title, isResponsive) => {
    const { allowResponsive, className } = currentAttributes;
    return {
      ...currentAttributes,
      ...getAttributesFromPreview(
        preview,
        title,
        className,
        isResponsive,
        allowResponsive
      )
    };
  };

  // packages/block-library/build-module/utils/caption.mjs
  var import_element6 = __toESM(require_element(), 1);
  var import_compose4 = __toESM(require_compose(), 1);
  var import_i18n9 = __toESM(require_i18n(), 1);
  var import_block_editor14 = __toESM(require_block_editor(), 1);
  var import_components7 = __toESM(require_components(), 1);
  var import_blocks4 = __toESM(require_blocks(), 1);
  var import_jsx_runtime171 = __toESM(require_jsx_runtime(), 1);
  function Caption({
    attributeKey = "caption",
    attributes: attributes2,
    setAttributes,
    isSelected,
    insertBlocksAfter,
    placeholder: placeholder2 = (0, import_i18n9.__)("Add caption"),
    label = (0, import_i18n9.__)("Caption text"),
    showToolbarButton = true,
    excludeElementClassName,
    className,
    readOnly,
    tagName = "figcaption",
    addLabel = (0, import_i18n9.__)("Add caption"),
    removeLabel = (0, import_i18n9.__)("Remove caption"),
    icon: icon4 = caption_default,
    ...props
  }) {
    const caption = attributes2[attributeKey];
    const prevCaption = (0, import_compose4.usePrevious)(caption);
    const isCaptionEmpty = import_block_editor14.RichText.isEmpty(caption);
    const isPrevCaptionEmpty = import_block_editor14.RichText.isEmpty(prevCaption);
    const [showCaption, setShowCaption] = (0, import_element6.useState)(!isCaptionEmpty);
    (0, import_element6.useEffect)(() => {
      if (!isCaptionEmpty && isPrevCaptionEmpty) {
        setShowCaption(true);
      }
    }, [isCaptionEmpty, isPrevCaptionEmpty]);
    (0, import_element6.useEffect)(() => {
      if (!isSelected && isCaptionEmpty) {
        setShowCaption(false);
      }
    }, [isSelected, isCaptionEmpty]);
    const ref = (0, import_element6.useCallback)(
      (node) => {
        if (node && isCaptionEmpty) {
          node.focus();
        }
      },
      [isCaptionEmpty]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime171.jsxs)(import_jsx_runtime171.Fragment, { children: [
      showToolbarButton && /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(import_block_editor14.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
        import_components7.ToolbarButton,
        {
          onClick: () => {
            setShowCaption(!showCaption);
            if (showCaption && caption) {
              setAttributes({
                [attributeKey]: void 0
              });
            }
          },
          icon: icon4,
          isPressed: showCaption,
          label: showCaption ? removeLabel : addLabel
        }
      ) }),
      showCaption && (!import_block_editor14.RichText.isEmpty(caption) || isSelected) && /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
        import_block_editor14.RichText,
        {
          identifier: attributeKey,
          tagName,
          className: clsx_default(
            className,
            excludeElementClassName ? "" : (0, import_block_editor14.__experimentalGetElementClassName)("caption")
          ),
          ref,
          "aria-label": label,
          placeholder: placeholder2,
          value: caption,
          onChange: (value) => setAttributes({ [attributeKey]: value }),
          inlineToolbar: true,
          __unstableOnSplitAtEnd: () => insertBlocksAfter(
            (0, import_blocks4.createBlock)((0, import_blocks4.getDefaultBlockName)())
          ),
          readOnly,
          ...props
        }
      )
    ] });
  }

  // packages/block-library/build-module/audio/edit.mjs
  var import_jsx_runtime172 = __toESM(require_jsx_runtime(), 1);
  var ALLOWED_MEDIA_TYPES = ["audio"];
  function AudioEdit({
    attributes: attributes2,
    className,
    setAttributes,
    onReplace,
    isSelected: isSingleSelected,
    insertBlocksAfter
  }) {
    const { id, autoplay, loop, preload, src } = attributes2;
    const [temporaryURL, setTemporaryURL] = (0, import_element7.useState)(attributes2.blob);
    const blockEditingMode = (0, import_block_editor15.useBlockEditingMode)();
    const hasNonContentControls = blockEditingMode === "default";
    useUploadMediaFromBlobURL({
      url: temporaryURL,
      allowedTypes: ALLOWED_MEDIA_TYPES,
      onChange: onSelectAudio,
      onError: onUploadError
    });
    function toggleAttribute(attribute) {
      return (newValue) => {
        setAttributes({ [attribute]: newValue });
      };
    }
    function onSelectURL(newSrc) {
      if (newSrc !== src) {
        const embedBlock = createUpgradedEmbedBlock({
          attributes: { url: newSrc }
        });
        if (void 0 !== embedBlock && onReplace) {
          onReplace(embedBlock);
          return;
        }
        setAttributes({ src: newSrc, id: void 0, blob: void 0 });
        setTemporaryURL();
      }
    }
    const { createErrorNotice } = (0, import_data8.useDispatch)(import_notices.store);
    function onUploadError(message) {
      createErrorNotice(message, { type: "snackbar" });
    }
    function getAutoplayHelp(checked) {
      return checked ? (0, import_i18n10.__)("Autoplay may cause usability issues for some users.") : null;
    }
    function onSelectAudio(media) {
      if (!media || !media.url) {
        setAttributes({
          src: void 0,
          id: void 0,
          caption: void 0,
          blob: void 0
        });
        setTemporaryURL();
        return;
      }
      if ((0, import_blob2.isBlobURL)(media.url)) {
        setTemporaryURL(media.url);
        return;
      }
      setAttributes({
        blob: void 0,
        src: media.url,
        id: media.id,
        caption: media.caption
      });
      setTemporaryURL();
    }
    const classes = clsx_default(className, {
      "is-transient": !!temporaryURL
    });
    const blockProps = (0, import_block_editor15.useBlockProps)({
      className: classes
    });
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    if (!src && !temporaryURL) {
      return /* @__PURE__ */ (0, import_jsx_runtime172.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
        import_block_editor15.MediaPlaceholder,
        {
          icon: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(import_block_editor15.BlockIcon, { icon: audio_default }),
          onSelect: onSelectAudio,
          onSelectURL,
          accept: "audio/*",
          allowedTypes: ALLOWED_MEDIA_TYPES,
          value: attributes2,
          onError: onUploadError
        }
      ) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime172.jsxs)(import_jsx_runtime172.Fragment, { children: [
      isSingleSelected && /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(import_block_editor15.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
        import_block_editor15.MediaReplaceFlow,
        {
          mediaId: id,
          mediaURL: src,
          allowedTypes: ALLOWED_MEDIA_TYPES,
          accept: "audio/*",
          onSelect: onSelectAudio,
          onSelectURL,
          onError: onUploadError,
          onReset: () => onSelectAudio(void 0),
          variant: "toolbar"
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(import_block_editor15.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime172.jsxs)(
        import_components8.__experimentalToolsPanel,
        {
          label: (0, import_i18n10.__)("Settings"),
          resetAll: () => {
            setAttributes({
              autoplay: false,
              loop: false,
              preload: void 0
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
              import_components8.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n10.__)("Autoplay"),
                isShownByDefault: true,
                hasValue: () => !!autoplay,
                onDeselect: () => setAttributes({
                  autoplay: false
                }),
                children: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
                  import_components8.ToggleControl,
                  {
                    label: (0, import_i18n10.__)("Autoplay"),
                    onChange: toggleAttribute("autoplay"),
                    checked: !!autoplay,
                    help: getAutoplayHelp
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
              import_components8.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n10.__)("Loop"),
                isShownByDefault: true,
                hasValue: () => !!loop,
                onDeselect: () => setAttributes({
                  loop: false
                }),
                children: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
                  import_components8.ToggleControl,
                  {
                    label: (0, import_i18n10.__)("Loop"),
                    onChange: toggleAttribute("loop"),
                    checked: !!loop
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
              import_components8.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n10.__)("Preload"),
                isShownByDefault: true,
                hasValue: () => !!preload,
                onDeselect: () => setAttributes({
                  preload: void 0
                }),
                children: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
                  import_components8.SelectControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n10._x)(
                      "Preload",
                      "noun; Audio block parameter"
                    ),
                    value: preload || "",
                    onChange: (value) => setAttributes({
                      preload: value || void 0
                    }),
                    options: [
                      { value: "", label: (0, import_i18n10.__)("Browser default") },
                      { value: "auto", label: (0, import_i18n10.__)("Auto") },
                      { value: "metadata", label: (0, import_i18n10.__)("Metadata") },
                      {
                        value: "none",
                        label: (0, import_i18n10._x)("None", "Preload value")
                      }
                    ]
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime172.jsxs)("figure", { ...blockProps, children: [
        /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(import_components8.Disabled, { isDisabled: !isSingleSelected, children: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)("audio", { controls: "controls", src: src ?? temporaryURL }) }),
        !!temporaryURL && /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(import_components8.Spinner, {}),
        /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
          Caption,
          {
            attributes: attributes2,
            setAttributes,
            isSelected: isSingleSelected,
            insertBlocksAfter,
            label: (0, import_i18n10.__)("Audio caption text"),
            showToolbarButton: isSingleSelected && hasNonContentControls
          }
        )
      ] })
    ] });
  }
  var edit_default = AudioEdit;

  // packages/block-library/build-module/audio/block.json
  var block_default8 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/audio",
    title: "Audio",
    category: "media",
    description: "Embed a simple audio player.",
    keywords: ["music", "sound", "podcast", "recording"],
    textdomain: "default",
    attributes: {
      blob: {
        type: "string",
        role: "local"
      },
      src: {
        type: "string",
        source: "attribute",
        selector: "audio",
        attribute: "src",
        role: "content"
      },
      caption: {
        type: "rich-text",
        source: "rich-text",
        selector: "figcaption",
        role: "content"
      },
      id: {
        type: "number",
        role: "content"
      },
      autoplay: {
        type: "boolean",
        source: "attribute",
        selector: "audio",
        attribute: "autoplay"
      },
      loop: {
        type: "boolean",
        source: "attribute",
        selector: "audio",
        attribute: "loop"
      },
      preload: {
        type: "string",
        source: "attribute",
        selector: "audio",
        attribute: "preload"
      }
    },
    supports: {
      anchor: true,
      align: true,
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-audio-editor",
    style: "wp-block-audio"
  };

  // packages/block-library/build-module/audio/save.mjs
  var import_block_editor16 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime173 = __toESM(require_jsx_runtime(), 1);
  function save5({ attributes: attributes2 }) {
    const { autoplay, caption, loop, preload, src } = attributes2;
    return src && /* @__PURE__ */ (0, import_jsx_runtime173.jsxs)("figure", { ...import_block_editor16.useBlockProps.save(), children: [
      /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
        "audio",
        {
          controls: "controls",
          src,
          autoPlay: autoplay,
          loop,
          preload
        }
      ),
      !import_block_editor16.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
        import_block_editor16.RichText.Content,
        {
          tagName: "figcaption",
          value: caption,
          className: (0, import_block_editor16.__experimentalGetElementClassName)(
            "caption"
          )
        }
      )
    ] });
  }

  // packages/block-library/build-module/audio/transforms.mjs
  var import_blob3 = __toESM(require_blob(), 1);
  var import_blocks5 = __toESM(require_blocks(), 1);
  var transforms = {
    from: [
      {
        type: "files",
        isMatch(files) {
          return files.length === 1 && files[0].type.indexOf("audio/") === 0;
        },
        transform(files) {
          const file = files[0];
          const block = (0, import_blocks5.createBlock)("core/audio", {
            blob: (0, import_blob3.createBlobURL)(file)
          });
          return block;
        }
      },
      {
        type: "shortcode",
        tag: "audio",
        attributes: {
          src: {
            type: "string",
            shortcode: ({
              named: { src, mp3, m4a, ogg, wav, wma }
            }) => {
              return src || mp3 || m4a || ogg || wav || wma;
            }
          },
          loop: {
            type: "string",
            shortcode: ({ named: { loop } }) => {
              return loop;
            }
          },
          autoplay: {
            type: "string",
            shortcode: ({ named: { autoplay } }) => {
              return autoplay;
            }
          },
          preload: {
            type: "string",
            shortcode: ({ named: { preload } }) => {
              return preload;
            }
          }
        }
      }
    ]
  };
  var transforms_default = transforms;

  // packages/block-library/build-module/audio/index.mjs
  var { fieldsKey, formKey } = unlock(import_blocks6.privateApis);
  var { name: name7 } = block_default8;
  var settings7 = {
    icon: audio_default,
    example: {
      attributes: {
        src: "https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg"
      },
      viewportWidth: 350
    },
    transforms: transforms_default,
    deprecated: deprecated_default2,
    edit: edit_default,
    save: save5
  };
  if (window.__experimentalContentOnlyInspectorFields) {
    settings7[fieldsKey] = [
      {
        id: "audio",
        label: (0, import_i18n11.__)("Audio"),
        type: "media",
        Edit: {
          control: "media",
          // TODO: replace with custom component
          allowedTypes: ["audio"],
          multiple: false
        },
        getValue: ({ item }) => ({
          id: item.id,
          url: item.src
        }),
        setValue: ({ value }) => ({
          id: value.id,
          src: value.url
        })
      },
      {
        id: "caption",
        label: (0, import_i18n11.__)("Caption"),
        type: "text",
        Edit: "rich-text"
        // TODO: replace with custom component
      }
    ];
    settings7[formKey] = {
      fields: ["audio", "caption"]
    };
  }
  var init7 = () => initBlock({ name: name7, metadata: block_default8, settings: settings7 });

  // packages/block-library/build-module/breadcrumbs/index.mjs
  var breadcrumbs_exports = {};
  __export(breadcrumbs_exports, {
    init: () => init8,
    metadata: () => block_default9,
    name: () => name8,
    settings: () => settings8
  });

  // packages/block-library/build-module/breadcrumbs/block.json
  var block_default9 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/breadcrumbs",
    title: "Breadcrumbs",
    category: "theme",
    description: "Display a breadcrumb trail showing the path to the current page.",
    textdomain: "default",
    attributes: {
      prefersTaxonomy: {
        type: "boolean",
        default: false
      },
      separator: {
        type: "string",
        default: "/"
      },
      showHomeItem: {
        type: "boolean",
        default: true
      },
      showCurrentItem: {
        type: "boolean",
        default: true
      },
      showOnHomePage: {
        type: "boolean",
        default: false
      }
    },
    usesContext: ["postId", "postType", "templateSlug"],
    supports: {
      anchor: true,
      html: false,
      align: ["wide", "full"],
      spacing: {
        margin: true,
        padding: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: false,
          color: true,
          width: true,
          style: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    style: "wp-block-breadcrumbs"
  };

  // packages/block-library/build-module/breadcrumbs/edit.mjs
  var import_i18n12 = __toESM(require_i18n(), 1);
  var import_block_editor17 = __toESM(require_block_editor(), 1);
  var import_components9 = __toESM(require_components(), 1);
  var import_data9 = __toESM(require_data(), 1);
  var import_core_data4 = __toESM(require_core_data(), 1);
  var import_element8 = __toESM(require_element(), 1);
  var import_server_side_render2 = __toESM(require_server_side_render(), 1);
  var import_compose5 = __toESM(require_compose(), 1);
  var import_jsx_runtime174 = __toESM(require_jsx_runtime(), 1);
  var separatorDefaultValue = "/";
  function BreadcrumbEdit({
    attributes: attributes2,
    setAttributes,
    name: name123,
    context: { postId, postType, templateSlug }
  }) {
    const {
      separator,
      showHomeItem,
      showCurrentItem,
      prefersTaxonomy,
      showOnHomePage
    } = attributes2;
    const {
      post,
      isPostTypeHierarchical,
      postTypeHasTaxonomies,
      hasTermsAssigned,
      isLoading
    } = (0, import_data9.useSelect)(
      (select9) => {
        if (!postType) {
          return {};
        }
        const _post = select9(import_core_data4.store).getEntityRecord(
          "postType",
          postType,
          postId
        );
        const postTypeObject = select9(import_core_data4.store).getPostType(postType);
        const _postTypeHasTaxonomies = postTypeObject && postTypeObject.taxonomies.length;
        let taxonomies;
        if (_postTypeHasTaxonomies) {
          taxonomies = select9(import_core_data4.store).getTaxonomies({
            type: postType,
            per_page: -1
          });
        }
        return {
          post: _post,
          isPostTypeHierarchical: postTypeObject?.hierarchical,
          postTypeHasTaxonomies: _postTypeHasTaxonomies,
          hasTermsAssigned: _post && (taxonomies || []).filter(
            ({ visibility }) => visibility?.publicly_queryable
          ).some((taxonomy) => {
            return !!_post[taxonomy.rest_base]?.length;
          }),
          isLoading: postId && !_post || !postTypeObject || _postTypeHasTaxonomies && !taxonomies
        };
      },
      [postType, postId]
    );
    const [invalidationKey, setInvalidationKey] = (0, import_element8.useState)(0);
    (0, import_element8.useEffect)(() => {
      setInvalidationKey((c2) => c2 + 1);
    }, [post]);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const { content, status, error } = (0, import_server_side_render2.useServerSideRender)({
      attributes: attributes2,
      skipBlockSupportAttributes: true,
      block: name123,
      urlQueryArgs: { post_id: postId, invalidationKey }
    });
    const prevContentRef = (0, import_element8.useRef)("");
    (0, import_element8.useEffect)(() => {
      if (status === "success") {
        prevContentRef.current = content;
      }
    }, [content, status]);
    const [showLoader, setShowLoader] = (0, import_element8.useState)(false);
    (0, import_element8.useEffect)(() => {
      if (status !== "loading") {
        return;
      }
      const timeout = setTimeout(() => {
        setShowLoader(true);
      }, 400);
      return () => {
        clearTimeout(timeout);
        setShowLoader(false);
      };
    }, [status]);
    const disabledRef = (0, import_compose5.useDisabled)();
    const blockProps = (0, import_block_editor17.useBlockProps)({ ref: disabledRef });
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_components9.Spinner, {}) });
    }
    let _showTerms;
    if (!isPostTypeHierarchical && !post?.parent) {
      _showTerms = true;
    } else if (!postTypeHasTaxonomies) {
      _showTerms = false;
    } else {
      _showTerms = prefersTaxonomy;
    }
    let placeholder2 = null;
    const showPlaceholder = !postId || !postType || // When `templateSlug` is set only show placeholder if the post type is not.
    // This is needed because when we are showing the template in post editor we
    // want to show the real breadcrumbs if we have the post type.
    templateSlug && !postType || !_showTerms && !isPostTypeHierarchical || _showTerms && !hasTermsAssigned;
    if (showPlaceholder) {
      const placeholderItems = [];
      if (showHomeItem) {
        placeholderItems.push((0, import_i18n12.__)("Home"));
      }
      if (templateSlug && !postId) {
        placeholderItems.push((0, import_i18n12.__)("Page"));
      } else if (_showTerms) {
        placeholderItems.push((0, import_i18n12.__)("Category"));
      } else {
        placeholderItems.push((0, import_i18n12.__)("Ancestor"), (0, import_i18n12.__)("Parent"));
      }
      placeholder2 = /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
        "nav",
        {
          ...blockProps,
          style: {
            "--separator": `"${separator.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`,
            ...blockProps.style
          },
          children: /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)("ol", { children: [
            placeholderItems.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("a", { href: `#breadcrumbs-pseudo-link-${index}`, children: text }) }, index)),
            showCurrentItem && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("span", { "aria-current": "page", children: (0, import_i18n12.__)("Current") }) })
          ] })
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(import_jsx_runtime174.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_block_editor17.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(
        import_components9.__experimentalToolsPanel,
        {
          label: (0, import_i18n12.__)("Settings"),
          resetAll: () => {
            setAttributes({
              separator: separatorDefaultValue,
              showHomeItem: true,
              showCurrentItem: true
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
              import_components9.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n12.__)("Show home breadcrumb"),
                isShownByDefault: true,
                hasValue: () => !showHomeItem,
                onDeselect: () => setAttributes({
                  showHomeItem: true
                }),
                children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
                  import_components9.ToggleControl,
                  {
                    label: (0, import_i18n12.__)("Show home breadcrumb"),
                    onChange: (value) => setAttributes({ showHomeItem: value }),
                    checked: showHomeItem
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
              import_components9.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n12.__)("Show current breadcrumb"),
                isShownByDefault: true,
                hasValue: () => !showCurrentItem,
                onDeselect: () => setAttributes({
                  showCurrentItem: true
                }),
                children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
                  import_components9.ToggleControl,
                  {
                    label: (0, import_i18n12.__)("Show current breadcrumb"),
                    onChange: (value) => setAttributes({ showCurrentItem: value }),
                    checked: showCurrentItem
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
              import_components9.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n12.__)("Separator"),
                isShownByDefault: true,
                hasValue: () => separator !== separatorDefaultValue,
                onDeselect: () => setAttributes({
                  separator: separatorDefaultValue
                }),
                children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
                  import_components9.TextControl,
                  {
                    __next40pxDefaultSize: true,
                    autoComplete: "off",
                    label: (0, import_i18n12.__)("Separator"),
                    value: separator,
                    onChange: (value) => setAttributes({ separator: value }),
                    onBlur: () => {
                      if (!separator) {
                        setAttributes({
                          separator: separatorDefaultValue
                        });
                      }
                    }
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(import_block_editor17.InspectorControls, { group: "advanced", children: [
        /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
          import_components9.CheckboxControl,
          {
            label: (0, import_i18n12.__)("Show on homepage"),
            checked: showOnHomePage,
            onChange: (value) => setAttributes({ showOnHomePage: value }),
            help: (0, import_i18n12.__)(
              "If this breadcrumbs block appears in a template or template part that\u2019s shown on the homepage, enable this option to display the breadcrumb trail. Otherwise, this setting has no effect."
            )
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
          import_components9.CheckboxControl,
          {
            label: (0, import_i18n12.__)("Prefer taxonomy terms"),
            checked: prefersTaxonomy,
            onChange: (value) => setAttributes({ prefersTaxonomy: value }),
            help: (0, import_i18n12.__)(
              "The exact type of breadcrumbs shown will vary automatically depending on the page in which this block is displayed. In the specific case of a hierarchical post type with taxonomies, the breadcrumbs can either reflect its post hierarchy (default) or the hierarchy of its assigned taxonomy terms."
            )
          }
        )
      ] }),
      status === "loading" && !showPlaceholder && (prevContentRef.current ? /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
        html_renderer_default,
        {
          wrapperProps: {
            ...blockProps,
            style: {
              ...blockProps.style,
              opacity: showLoader ? 0.3 : 1
            }
          },
          html: prevContentRef.current
        }
      ) : /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_components9.Spinner, {}) })),
      status === "error" && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("p", { children: (0, import_i18n12.sprintf)(
        /* translators: %s: error message returned when rendering the block. */
        (0, import_i18n12.__)("Error: %s"),
        error
      ) }) }),
      showPlaceholder && placeholder2,
      !showPlaceholder && status === "success" && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(html_renderer_default, { wrapperProps: blockProps, html: content })
    ] });
  }

  // packages/block-library/build-module/breadcrumbs/index.mjs
  var { name: name8 } = block_default9;
  var settings8 = {
    icon: breadcrumbs_default,
    example: {},
    edit: BreadcrumbEdit
  };
  var init8 = () => initBlock({ name: name8, metadata: block_default9, settings: settings8 });

  // packages/block-library/build-module/button/index.mjs
  var button_exports = {};
  __export(button_exports, {
    init: () => init9,
    metadata: () => block_default10,
    name: () => name9,
    settings: () => settings9
  });
  var import_i18n14 = __toESM(require_i18n(), 1);
  var import_blocks8 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/button/deprecated.mjs
  var import_block_editor19 = __toESM(require_block_editor(), 1);
  var import_compose6 = __toESM(require_compose(), 1);

  // packages/block-library/build-module/utils/migrate-font-family.mjs
  var import_block_editor18 = __toESM(require_block_editor(), 1);
  var { cleanEmptyObject } = unlock(import_block_editor18.privateApis);
  function migrate_font_family_default(attributes2) {
    if (!attributes2?.style?.typography?.fontFamily) {
      return attributes2;
    }
    const { fontFamily, ...typography } = attributes2.style.typography;
    return {
      ...attributes2,
      style: cleanEmptyObject({
        ...attributes2.style,
        typography
      }),
      fontFamily: fontFamily.split("|").pop()
    };
  }

  // packages/block-library/build-module/utils/migrate-text-align.mjs
  function migrate_text_align_default(attributes2) {
    const { textAlign, ...restAttributes } = attributes2;
    if (!textAlign) {
      return attributes2;
    }
    return {
      ...restAttributes,
      style: {
        ...attributes2.style,
        typography: {
          ...attributes2.style?.typography,
          textAlign
        }
      }
    };
  }

  // packages/block-library/build-module/button/deprecated.mjs
  var import_jsx_runtime175 = __toESM(require_jsx_runtime(), 1);
  var migrateBorderRadius = (attributes2) => {
    const { borderRadius, ...newAttributes } = attributes2;
    const oldBorderRadius = [
      borderRadius,
      newAttributes.style?.border?.radius
    ].find((possibleBorderRadius) => {
      return typeof possibleBorderRadius === "number" && possibleBorderRadius !== 0;
    });
    if (!oldBorderRadius) {
      return newAttributes;
    }
    return {
      ...newAttributes,
      style: {
        ...newAttributes.style,
        border: {
          ...newAttributes.style?.border,
          radius: `${oldBorderRadius}px`
        }
      }
    };
  };
  function migrateAlign(attributes2) {
    if (!attributes2.align) {
      return attributes2;
    }
    const { align, ...otherAttributes } = attributes2;
    return {
      ...otherAttributes,
      className: clsx_default(
        otherAttributes.className,
        `align${attributes2.align}`
      )
    };
  }
  var migrateCustomColorsAndGradients = (attributes2) => {
    if (!attributes2.customTextColor && !attributes2.customBackgroundColor && !attributes2.customGradient) {
      return attributes2;
    }
    const style2 = { color: {} };
    if (attributes2.customTextColor) {
      style2.color.text = attributes2.customTextColor;
    }
    if (attributes2.customBackgroundColor) {
      style2.color.background = attributes2.customBackgroundColor;
    }
    if (attributes2.customGradient) {
      style2.color.gradient = attributes2.customGradient;
    }
    const {
      customTextColor,
      customBackgroundColor,
      customGradient,
      ...restAttributes
    } = attributes2;
    return {
      ...restAttributes,
      style: style2
    };
  };
  var oldColorsMigration = (attributes2) => {
    const { color, textColor, ...restAttributes } = {
      ...attributes2,
      customTextColor: attributes2.textColor && "#" === attributes2.textColor[0] ? attributes2.textColor : void 0,
      customBackgroundColor: attributes2.color && "#" === attributes2.color[0] ? attributes2.color : void 0
    };
    return migrateCustomColorsAndGradients(restAttributes);
  };
  var blockAttributes = {
    url: {
      type: "string",
      source: "attribute",
      selector: "a",
      attribute: "href"
    },
    title: {
      type: "string",
      source: "attribute",
      selector: "a",
      attribute: "title"
    },
    text: {
      type: "string",
      source: "html",
      selector: "a"
    }
  };
  var v13 = {
    attributes: {
      tagName: {
        type: "string",
        enum: ["a", "button"],
        default: "a"
      },
      type: {
        type: "string",
        default: "button"
      },
      textAlign: {
        type: "string"
      },
      url: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "href",
        role: "content"
      },
      title: {
        type: "string",
        source: "attribute",
        selector: "a,button",
        attribute: "title",
        role: "content"
      },
      text: {
        type: "rich-text",
        source: "rich-text",
        selector: "a,button",
        role: "content"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "target",
        role: "content"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "rel",
        role: "content"
      },
      placeholder: {
        type: "string"
      },
      backgroundColor: {
        type: "string"
      },
      textColor: {
        type: "string"
      },
      gradient: {
        type: "string"
      },
      width: {
        type: "number"
      }
    },
    supports: {
      anchor: true,
      align: true,
      alignWide: false,
      color: {
        __experimentalSkipSerialization: true,
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        __experimentalSkipSerialization: [
          "fontSize",
          "lineHeight",
          "fontFamily",
          "fontWeight",
          "fontStyle",
          "textTransform",
          "textDecoration",
          "letterSpacing"
        ],
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalWritingMode: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      reusable: false,
      shadow: {
        __experimentalSkipSerialization: true
      },
      spacing: {
        __experimentalSkipSerialization: true,
        padding: ["horizontal", "vertical"],
        __experimentalDefaultControls: {
          padding: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    selectors: {
      root: ".wp-block-button .wp-block-button__link",
      typography: {
        writingMode: ".wp-block-button"
      }
    },
    save({ attributes: attributes2, className }) {
      const {
        tagName,
        type,
        textAlign,
        fontSize,
        linkTarget,
        rel,
        style: style2,
        text,
        title,
        url,
        width
      } = attributes2;
      const TagName2 = tagName || "a";
      const isButtonTag = "button" === TagName2;
      const buttonType = type || "button";
      const borderProps = (0, import_block_editor19.__experimentalGetBorderClassesAndStyles)(attributes2);
      const colorProps = (0, import_block_editor19.__experimentalGetColorClassesAndStyles)(attributes2);
      const spacingProps = (0, import_block_editor19.__experimentalGetSpacingClassesAndStyles)(attributes2);
      const shadowProps = (0, import_block_editor19.__experimentalGetShadowClassesAndStyles)(attributes2);
      const typographyProps = (0, import_block_editor19.getTypographyClassesAndStyles)(attributes2);
      const buttonClasses = clsx_default(
        "wp-block-button__link",
        colorProps.className,
        borderProps.className,
        typographyProps.className,
        {
          [`has-text-align-${textAlign}`]: textAlign,
          // For backwards compatibility add style that isn't provided via
          // block support.
          "no-border-radius": style2?.border?.radius === 0,
          [`has-custom-font-size`]: fontSize || style2?.typography?.fontSize
        },
        (0, import_block_editor19.__experimentalGetElementClassName)("button")
      );
      const buttonStyle = {
        ...borderProps.style,
        ...colorProps.style,
        ...spacingProps.style,
        ...shadowProps.style,
        ...typographyProps.style,
        writingMode: void 0
      };
      const wrapperClasses = clsx_default(className, {
        [`has-custom-width wp-block-button__width-${width}`]: width
      });
      return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { ...import_block_editor19.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
        import_block_editor19.RichText.Content,
        {
          tagName: TagName2,
          type: isButtonTag ? buttonType : null,
          className: buttonClasses,
          href: isButtonTag ? null : url,
          title,
          style: buttonStyle,
          value: text,
          target: isButtonTag ? null : linkTarget,
          rel: isButtonTag ? null : rel
        }
      ) });
    },
    isEligible(attributes2) {
      return !!attributes2.textAlign;
    },
    migrate: migrate_text_align_default
  };
  var v12 = {
    attributes: {
      tagName: {
        type: "string",
        enum: ["a", "button"],
        default: "a"
      },
      type: {
        type: "string",
        default: "button"
      },
      textAlign: {
        type: "string"
      },
      url: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "href"
      },
      title: {
        type: "string",
        source: "attribute",
        selector: "a,button",
        attribute: "title",
        role: "content"
      },
      text: {
        type: "rich-text",
        source: "rich-text",
        selector: "a,button",
        role: "content"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "target",
        role: "content"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "rel",
        role: "content"
      },
      placeholder: {
        type: "string"
      },
      backgroundColor: {
        type: "string"
      },
      textColor: {
        type: "string"
      },
      gradient: {
        type: "string"
      },
      width: {
        type: "number"
      }
    },
    supports: {
      anchor: true,
      align: true,
      alignWide: false,
      color: {
        __experimentalSkipSerialization: true,
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalWritingMode: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      reusable: false,
      shadow: {
        __experimentalSkipSerialization: true
      },
      spacing: {
        __experimentalSkipSerialization: true,
        padding: ["horizontal", "vertical"],
        __experimentalDefaultControls: {
          padding: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      __experimentalSelector: ".wp-block-button__link",
      interactivity: {
        clientNavigation: true
      }
    },
    save({ attributes: attributes2, className }) {
      const {
        tagName,
        type,
        textAlign,
        fontSize,
        linkTarget,
        rel,
        style: style2,
        text,
        title,
        url,
        width
      } = attributes2;
      const TagName2 = tagName || "a";
      const isButtonTag = "button" === TagName2;
      const buttonType = type || "button";
      const borderProps = (0, import_block_editor19.__experimentalGetBorderClassesAndStyles)(attributes2);
      const colorProps = (0, import_block_editor19.__experimentalGetColorClassesAndStyles)(attributes2);
      const spacingProps = (0, import_block_editor19.__experimentalGetSpacingClassesAndStyles)(attributes2);
      const shadowProps = (0, import_block_editor19.__experimentalGetShadowClassesAndStyles)(attributes2);
      const buttonClasses = clsx_default(
        "wp-block-button__link",
        colorProps.className,
        borderProps.className,
        {
          [`has-text-align-${textAlign}`]: textAlign,
          // For backwards compatibility add style that isn't provided via
          // block support.
          "no-border-radius": style2?.border?.radius === 0
        },
        (0, import_block_editor19.__experimentalGetElementClassName)("button")
      );
      const buttonStyle = {
        ...borderProps.style,
        ...colorProps.style,
        ...spacingProps.style,
        ...shadowProps.style
      };
      const wrapperClasses = clsx_default(className, {
        [`has-custom-width wp-block-button__width-${width}`]: width,
        [`has-custom-font-size`]: fontSize || style2?.typography?.fontSize
      });
      return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { ...import_block_editor19.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
        import_block_editor19.RichText.Content,
        {
          tagName: TagName2,
          type: isButtonTag ? buttonType : null,
          className: buttonClasses,
          href: isButtonTag ? null : url,
          title,
          style: buttonStyle,
          value: text,
          target: isButtonTag ? null : linkTarget,
          rel: isButtonTag ? null : rel
        }
      ) });
    }
  };
  var v11 = {
    attributes: {
      url: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "href"
      },
      title: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "title"
      },
      text: {
        type: "string",
        source: "html",
        selector: "a"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "target"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "rel"
      },
      placeholder: {
        type: "string"
      },
      backgroundColor: {
        type: "string"
      },
      textColor: {
        type: "string"
      },
      gradient: {
        type: "string"
      },
      width: {
        type: "number"
      }
    },
    supports: {
      anchor: true,
      align: true,
      alignWide: false,
      color: {
        __experimentalSkipSerialization: true,
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        __experimentalFontFamily: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      reusable: false,
      spacing: {
        __experimentalSkipSerialization: true,
        padding: ["horizontal", "vertical"],
        __experimentalDefaultControls: {
          padding: true
        }
      },
      __experimentalBorder: {
        radius: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          radius: true
        }
      },
      __experimentalSelector: ".wp-block-button__link"
    },
    save({ attributes: attributes2, className }) {
      const { fontSize, linkTarget, rel, style: style2, text, title, url, width } = attributes2;
      if (!text) {
        return null;
      }
      const borderProps = (0, import_block_editor19.__experimentalGetBorderClassesAndStyles)(attributes2);
      const colorProps = (0, import_block_editor19.__experimentalGetColorClassesAndStyles)(attributes2);
      const spacingProps = (0, import_block_editor19.__experimentalGetSpacingClassesAndStyles)(attributes2);
      const buttonClasses = clsx_default(
        "wp-block-button__link",
        colorProps.className,
        borderProps.className,
        {
          // For backwards compatibility add style that isn't provided via
          // block support.
          "no-border-radius": style2?.border?.radius === 0
        }
      );
      const buttonStyle = {
        ...borderProps.style,
        ...colorProps.style,
        ...spacingProps.style
      };
      const wrapperClasses = clsx_default(className, {
        [`has-custom-width wp-block-button__width-${width}`]: width,
        [`has-custom-font-size`]: fontSize || style2?.typography?.fontSize
      });
      return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { ...import_block_editor19.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
        import_block_editor19.RichText.Content,
        {
          tagName: "a",
          className: buttonClasses,
          href: url,
          title,
          style: buttonStyle,
          value: text,
          target: linkTarget,
          rel
        }
      ) });
    }
  };
  var v10 = {
    attributes: {
      url: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "href"
      },
      title: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "title"
      },
      text: {
        type: "string",
        source: "html",
        selector: "a"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "target"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "rel"
      },
      placeholder: {
        type: "string"
      },
      backgroundColor: {
        type: "string"
      },
      textColor: {
        type: "string"
      },
      gradient: {
        type: "string"
      },
      width: {
        type: "number"
      }
    },
    supports: {
      anchor: true,
      align: true,
      alignWide: false,
      color: {
        __experimentalSkipSerialization: true,
        gradients: true
      },
      typography: {
        fontSize: true,
        __experimentalFontFamily: true
      },
      reusable: false,
      spacing: {
        __experimentalSkipSerialization: true,
        padding: ["horizontal", "vertical"],
        __experimentalDefaultControls: {
          padding: true
        }
      },
      __experimentalBorder: {
        radius: true,
        __experimentalSkipSerialization: true
      },
      __experimentalSelector: ".wp-block-button__link"
    },
    save({ attributes: attributes2, className }) {
      const { fontSize, linkTarget, rel, style: style2, text, title, url, width } = attributes2;
      if (!text) {
        return null;
      }
      const borderProps = (0, import_block_editor19.__experimentalGetBorderClassesAndStyles)(attributes2);
      const colorProps = (0, import_block_editor19.__experimentalGetColorClassesAndStyles)(attributes2);
      const spacingProps = (0, import_block_editor19.__experimentalGetSpacingClassesAndStyles)(attributes2);
      const buttonClasses = clsx_default(
        "wp-block-button__link",
        colorProps.className,
        borderProps.className,
        {
          // For backwards compatibility add style that isn't provided via
          // block support.
          "no-border-radius": style2?.border?.radius === 0
        }
      );
      const buttonStyle = {
        ...borderProps.style,
        ...colorProps.style,
        ...spacingProps.style
      };
      const wrapperClasses = clsx_default(className, {
        [`has-custom-width wp-block-button__width-${width}`]: width,
        [`has-custom-font-size`]: fontSize || style2?.typography?.fontSize
      });
      return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { ...import_block_editor19.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
        import_block_editor19.RichText.Content,
        {
          tagName: "a",
          className: buttonClasses,
          href: url,
          title,
          style: buttonStyle,
          value: text,
          target: linkTarget,
          rel
        }
      ) });
    },
    migrate: migrate_font_family_default,
    isEligible({ style: style2 }) {
      return style2?.typography?.fontFamily;
    }
  };
  var deprecated = [
    v13,
    v12,
    v11,
    v10,
    {
      supports: {
        anchor: true,
        align: true,
        alignWide: false,
        color: {
          __experimentalSkipSerialization: true,
          gradients: true
        },
        typography: {
          fontSize: true,
          __experimentalFontFamily: true
        },
        reusable: false,
        __experimentalSelector: ".wp-block-button__link"
      },
      attributes: {
        ...blockAttributes,
        linkTarget: {
          type: "string",
          source: "attribute",
          selector: "a",
          attribute: "target"
        },
        rel: {
          type: "string",
          source: "attribute",
          selector: "a",
          attribute: "rel"
        },
        placeholder: {
          type: "string"
        },
        backgroundColor: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        gradient: {
          type: "string"
        },
        width: {
          type: "number"
        }
      },
      isEligible({ style: style2 }) {
        return typeof style2?.border?.radius === "number";
      },
      save({ attributes: attributes2, className }) {
        const {
          fontSize,
          linkTarget,
          rel,
          style: style2,
          text,
          title,
          url,
          width
        } = attributes2;
        if (!text) {
          return null;
        }
        const borderRadius = style2?.border?.radius;
        const colorProps = (0, import_block_editor19.__experimentalGetColorClassesAndStyles)(attributes2);
        const buttonClasses = clsx_default(
          "wp-block-button__link",
          colorProps.className,
          {
            "no-border-radius": style2?.border?.radius === 0
          }
        );
        const buttonStyle = {
          borderRadius: borderRadius ? borderRadius : void 0,
          ...colorProps.style
        };
        const wrapperClasses = clsx_default(className, {
          [`has-custom-width wp-block-button__width-${width}`]: width,
          [`has-custom-font-size`]: fontSize || style2?.typography?.fontSize
        });
        return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { ...import_block_editor19.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
          import_block_editor19.RichText.Content,
          {
            tagName: "a",
            className: buttonClasses,
            href: url,
            title,
            style: buttonStyle,
            value: text,
            target: linkTarget,
            rel
          }
        ) });
      },
      migrate: (0, import_compose6.compose)(migrate_font_family_default, migrateBorderRadius)
    },
    {
      supports: {
        anchor: true,
        align: true,
        alignWide: false,
        color: {
          __experimentalSkipSerialization: true
        },
        reusable: false,
        __experimentalSelector: ".wp-block-button__link"
      },
      attributes: {
        ...blockAttributes,
        linkTarget: {
          type: "string",
          source: "attribute",
          selector: "a",
          attribute: "target"
        },
        rel: {
          type: "string",
          source: "attribute",
          selector: "a",
          attribute: "rel"
        },
        placeholder: {
          type: "string"
        },
        borderRadius: {
          type: "number"
        },
        backgroundColor: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        gradient: {
          type: "string"
        },
        style: {
          type: "object"
        },
        width: {
          type: "number"
        }
      },
      save({ attributes: attributes2, className }) {
        const { borderRadius, linkTarget, rel, text, title, url, width } = attributes2;
        const colorProps = (0, import_block_editor19.__experimentalGetColorClassesAndStyles)(attributes2);
        const buttonClasses = clsx_default(
          "wp-block-button__link",
          colorProps.className,
          {
            "no-border-radius": borderRadius === 0
          }
        );
        const buttonStyle = {
          borderRadius: borderRadius ? borderRadius + "px" : void 0,
          ...colorProps.style
        };
        const wrapperClasses = clsx_default(className, {
          [`has-custom-width wp-block-button__width-${width}`]: width
        });
        return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { ...import_block_editor19.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
          import_block_editor19.RichText.Content,
          {
            tagName: "a",
            className: buttonClasses,
            href: url,
            title,
            style: buttonStyle,
            value: text,
            target: linkTarget,
            rel
          }
        ) });
      },
      migrate: (0, import_compose6.compose)(migrate_font_family_default, migrateBorderRadius)
    },
    {
      supports: {
        anchor: true,
        align: true,
        alignWide: false,
        color: {
          __experimentalSkipSerialization: true
        },
        reusable: false,
        __experimentalSelector: ".wp-block-button__link"
      },
      attributes: {
        ...blockAttributes,
        linkTarget: {
          type: "string",
          source: "attribute",
          selector: "a",
          attribute: "target"
        },
        rel: {
          type: "string",
          source: "attribute",
          selector: "a",
          attribute: "rel"
        },
        placeholder: {
          type: "string"
        },
        borderRadius: {
          type: "number"
        },
        backgroundColor: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        gradient: {
          type: "string"
        },
        style: {
          type: "object"
        },
        width: {
          type: "number"
        }
      },
      save({ attributes: attributes2, className }) {
        const { borderRadius, linkTarget, rel, text, title, url, width } = attributes2;
        const colorProps = (0, import_block_editor19.__experimentalGetColorClassesAndStyles)(attributes2);
        const buttonClasses = clsx_default(
          "wp-block-button__link",
          colorProps.className,
          {
            "no-border-radius": borderRadius === 0
          }
        );
        const buttonStyle = {
          borderRadius: borderRadius ? borderRadius + "px" : void 0,
          ...colorProps.style
        };
        const wrapperClasses = clsx_default(className, {
          [`has-custom-width wp-block-button__width-${width}`]: width
        });
        return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { ...import_block_editor19.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
          import_block_editor19.RichText.Content,
          {
            tagName: "a",
            className: buttonClasses,
            href: url,
            title,
            style: buttonStyle,
            value: text,
            target: linkTarget,
            rel
          }
        ) });
      },
      migrate: (0, import_compose6.compose)(migrate_font_family_default, migrateBorderRadius)
    },
    {
      supports: {
        align: true,
        alignWide: false,
        color: { gradients: true }
      },
      attributes: {
        ...blockAttributes,
        linkTarget: {
          type: "string",
          source: "attribute",
          selector: "a",
          attribute: "target"
        },
        rel: {
          type: "string",
          source: "attribute",
          selector: "a",
          attribute: "rel"
        },
        placeholder: {
          type: "string"
        },
        borderRadius: {
          type: "number"
        },
        backgroundColor: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        gradient: {
          type: "string"
        },
        style: {
          type: "object"
        }
      },
      save({ attributes: attributes2 }) {
        const { borderRadius, linkTarget, rel, text, title, url } = attributes2;
        const buttonClasses = clsx_default("wp-block-button__link", {
          "no-border-radius": borderRadius === 0
        });
        const buttonStyle = {
          borderRadius: borderRadius ? borderRadius + "px" : void 0
        };
        return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
          import_block_editor19.RichText.Content,
          {
            tagName: "a",
            className: buttonClasses,
            href: url,
            title,
            style: buttonStyle,
            value: text,
            target: linkTarget,
            rel
          }
        );
      },
      migrate: migrateBorderRadius
    },
    {
      supports: {
        align: true,
        alignWide: false
      },
      attributes: {
        ...blockAttributes,
        linkTarget: {
          type: "string",
          source: "attribute",
          selector: "a",
          attribute: "target"
        },
        rel: {
          type: "string",
          source: "attribute",
          selector: "a",
          attribute: "rel"
        },
        placeholder: {
          type: "string"
        },
        borderRadius: {
          type: "number"
        },
        backgroundColor: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        },
        customTextColor: {
          type: "string"
        },
        customGradient: {
          type: "string"
        },
        gradient: {
          type: "string"
        }
      },
      isEligible: (attributes2) => !!attributes2.customTextColor || !!attributes2.customBackgroundColor || !!attributes2.customGradient || !!attributes2.align,
      migrate: (0, import_compose6.compose)(
        migrateBorderRadius,
        migrateCustomColorsAndGradients,
        migrateAlign
      ),
      save({ attributes: attributes2 }) {
        const {
          backgroundColor,
          borderRadius,
          customBackgroundColor,
          customTextColor,
          customGradient,
          linkTarget,
          gradient,
          rel,
          text,
          textColor,
          title,
          url
        } = attributes2;
        const textClass = (0, import_block_editor19.getColorClassName)("color", textColor);
        const backgroundClass = !customGradient && (0, import_block_editor19.getColorClassName)("background-color", backgroundColor);
        const gradientClass = (0, import_block_editor19.__experimentalGetGradientClass)(gradient);
        const buttonClasses = clsx_default("wp-block-button__link", {
          "has-text-color": textColor || customTextColor,
          [textClass]: textClass,
          "has-background": backgroundColor || customBackgroundColor || customGradient || gradient,
          [backgroundClass]: backgroundClass,
          "no-border-radius": borderRadius === 0,
          [gradientClass]: gradientClass
        });
        const buttonStyle = {
          background: customGradient ? customGradient : void 0,
          backgroundColor: backgroundClass || customGradient || gradient ? void 0 : customBackgroundColor,
          color: textClass ? void 0 : customTextColor,
          borderRadius: borderRadius ? borderRadius + "px" : void 0
        };
        return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
          import_block_editor19.RichText.Content,
          {
            tagName: "a",
            className: buttonClasses,
            href: url,
            title,
            style: buttonStyle,
            value: text,
            target: linkTarget,
            rel
          }
        ) });
      }
    },
    {
      attributes: {
        ...blockAttributes,
        align: {
          type: "string",
          default: "none"
        },
        backgroundColor: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        },
        customTextColor: {
          type: "string"
        },
        linkTarget: {
          type: "string",
          source: "attribute",
          selector: "a",
          attribute: "target"
        },
        rel: {
          type: "string",
          source: "attribute",
          selector: "a",
          attribute: "rel"
        },
        placeholder: {
          type: "string"
        }
      },
      isEligible(attribute) {
        return attribute.className && attribute.className.includes("is-style-squared");
      },
      migrate(attributes2) {
        let newClassName = attributes2.className;
        if (newClassName) {
          newClassName = newClassName.replace(/is-style-squared[\s]?/, "").trim();
        }
        return migrateBorderRadius(
          migrateCustomColorsAndGradients({
            ...attributes2,
            className: newClassName ? newClassName : void 0,
            borderRadius: 0
          })
        );
      },
      save({ attributes: attributes2 }) {
        const {
          backgroundColor,
          customBackgroundColor,
          customTextColor,
          linkTarget,
          rel,
          text,
          textColor,
          title,
          url
        } = attributes2;
        const textClass = (0, import_block_editor19.getColorClassName)("color", textColor);
        const backgroundClass = (0, import_block_editor19.getColorClassName)(
          "background-color",
          backgroundColor
        );
        const buttonClasses = clsx_default("wp-block-button__link", {
          "has-text-color": textColor || customTextColor,
          [textClass]: textClass,
          "has-background": backgroundColor || customBackgroundColor,
          [backgroundClass]: backgroundClass
        });
        const buttonStyle = {
          backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
          color: textClass ? void 0 : customTextColor
        };
        return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
          import_block_editor19.RichText.Content,
          {
            tagName: "a",
            className: buttonClasses,
            href: url,
            title,
            style: buttonStyle,
            value: text,
            target: linkTarget,
            rel
          }
        ) });
      }
    },
    {
      attributes: {
        ...blockAttributes,
        align: {
          type: "string",
          default: "none"
        },
        backgroundColor: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        },
        customTextColor: {
          type: "string"
        }
      },
      migrate: oldColorsMigration,
      save({ attributes: attributes2 }) {
        const {
          url,
          text,
          title,
          backgroundColor,
          textColor,
          customBackgroundColor,
          customTextColor
        } = attributes2;
        const textClass = (0, import_block_editor19.getColorClassName)("color", textColor);
        const backgroundClass = (0, import_block_editor19.getColorClassName)(
          "background-color",
          backgroundColor
        );
        const buttonClasses = clsx_default("wp-block-button__link", {
          "has-text-color": textColor || customTextColor,
          [textClass]: textClass,
          "has-background": backgroundColor || customBackgroundColor,
          [backgroundClass]: backgroundClass
        });
        const buttonStyle = {
          backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
          color: textClass ? void 0 : customTextColor
        };
        return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
          import_block_editor19.RichText.Content,
          {
            tagName: "a",
            className: buttonClasses,
            href: url,
            title,
            style: buttonStyle,
            value: text
          }
        ) });
      }
    },
    {
      attributes: {
        ...blockAttributes,
        color: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        align: {
          type: "string",
          default: "none"
        }
      },
      save({ attributes: attributes2 }) {
        const { url, text, title, align, color, textColor } = attributes2;
        const buttonStyle = {
          backgroundColor: color,
          color: textColor
        };
        const linkClass = "wp-block-button__link";
        return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { className: `align${align}`, children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
          import_block_editor19.RichText.Content,
          {
            tagName: "a",
            className: linkClass,
            href: url,
            title,
            style: buttonStyle,
            value: text
          }
        ) });
      },
      migrate: oldColorsMigration
    },
    {
      attributes: {
        ...blockAttributes,
        color: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        align: {
          type: "string",
          default: "none"
        }
      },
      save({ attributes: attributes2 }) {
        const { url, text, title, align, color, textColor } = attributes2;
        return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
          "div",
          {
            className: `align${align}`,
            style: { backgroundColor: color },
            children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
              import_block_editor19.RichText.Content,
              {
                tagName: "a",
                href: url,
                title,
                style: { color: textColor },
                value: text
              }
            )
          }
        );
      },
      migrate: oldColorsMigration
    }
  ];
  var deprecated_default3 = deprecated;

  // packages/block-library/build-module/button/edit.mjs
  var import_i18n13 = __toESM(require_i18n(), 1);
  var import_element10 = __toESM(require_element(), 1);
  var import_components10 = __toESM(require_components(), 1);
  var import_block_editor21 = __toESM(require_block_editor(), 1);
  var import_keycodes = __toESM(require_keycodes(), 1);
  var import_blocks7 = __toESM(require_blocks(), 1);
  var import_compose8 = __toESM(require_compose(), 1);
  var import_data11 = __toESM(require_data(), 1);

  // packages/block-library/build-module/button/constants.mjs
  var NEW_TAB_REL = "noreferrer noopener";
  var NEW_TAB_TARGET = "_blank";
  var NOFOLLOW_REL = "nofollow";

  // packages/block-library/build-module/button/get-updated-link-attributes.mjs
  var import_url2 = __toESM(require_url(), 1);
  function getUpdatedLinkAttributes({
    rel = "",
    url = "",
    opensInNewTab,
    nofollow
  }) {
    let newLinkTarget;
    let updatedRel = rel;
    if (opensInNewTab) {
      newLinkTarget = NEW_TAB_TARGET;
      updatedRel = updatedRel?.includes(NEW_TAB_REL) ? updatedRel : updatedRel + ` ${NEW_TAB_REL}`;
    } else {
      const relRegex = new RegExp(`\\b${NEW_TAB_REL}\\s*`, "g");
      updatedRel = updatedRel?.replace(relRegex, "").trim();
    }
    if (nofollow) {
      updatedRel = updatedRel?.includes(NOFOLLOW_REL) ? updatedRel : (updatedRel + ` ${NOFOLLOW_REL}`).trim();
    } else {
      const relRegex = new RegExp(`\\b${NOFOLLOW_REL}\\s*`, "g");
      updatedRel = updatedRel?.replace(relRegex, "").trim();
    }
    return {
      url: (0, import_url2.prependHTTPS)(url),
      linkTarget: newLinkTarget,
      rel: updatedRel || void 0
    };
  }

  // packages/block-library/build-module/utils/remove-anchor-tag.mjs
  function removeAnchorTag(value) {
    return value.toString().replace(/<\/?a[^>]*>/g, "");
  }

  // packages/block-library/build-module/utils/deprecated-text-align-attributes.mjs
  var import_compose7 = __toESM(require_compose(), 1);
  var import_element9 = __toESM(require_element(), 1);
  var import_deprecated3 = __toESM(require_deprecated(), 1);
  var import_data10 = __toESM(require_data(), 1);
  var import_block_editor20 = __toESM(require_block_editor(), 1);
  function useDeprecatedTextAlign(props) {
    const { name: name123, attributes: attributes2, setAttributes } = props;
    const { textAlign } = attributes2;
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data10.useDispatch)(import_block_editor20.store);
    const updateStyleWithAlign = (0, import_compose7.useEvent)(() => {
      (0, import_deprecated3.default)(`textAlign attribute in ${name123}`, {
        alternative: "style.typography.textAlign",
        since: "7.0"
      });
      __unstableMarkNextChangeAsNotPersistent();
      setAttributes((currentAttr) => ({
        style: {
          ...currentAttr.style,
          typography: {
            ...currentAttr.style?.typography,
            textAlign
          }
        }
      }));
    });
    const lastUpdatedAlignRef = (0, import_element9.useRef)();
    (0, import_element9.useEffect)(() => {
      if (textAlign === lastUpdatedAlignRef.current) {
        return;
      }
      lastUpdatedAlignRef.current = textAlign;
      updateStyleWithAlign();
    }, [textAlign, updateStyleWithAlign]);
  }

  // packages/block-library/build-module/button/edit.mjs
  var import_jsx_runtime176 = __toESM(require_jsx_runtime(), 1);
  var { HTMLElementControl } = unlock(import_block_editor21.privateApis);
  var LINK_SETTINGS = [
    ...import_block_editor21.LinkControl.DEFAULT_LINK_SETTINGS,
    {
      id: "nofollow",
      title: (0, import_i18n13.__)("Mark as nofollow")
    }
  ];
  function useEnter(props) {
    const { replaceBlocks, selectionChange } = (0, import_data11.useDispatch)(import_block_editor21.store);
    const { getBlock, getBlockRootClientId, getBlockIndex } = (0, import_data11.useSelect)(import_block_editor21.store);
    const propsRef = (0, import_element10.useRef)(props);
    propsRef.current = props;
    return (0, import_compose8.useRefEffect)((element) => {
      function onKeyDown(event) {
        if (event.defaultPrevented || event.keyCode !== import_keycodes.ENTER) {
          return;
        }
        const { content, clientId } = propsRef.current;
        if (content.length) {
          return;
        }
        event.preventDefault();
        const topParentListBlock = getBlock(
          getBlockRootClientId(clientId)
        );
        const blockIndex = getBlockIndex(clientId);
        const head = (0, import_blocks7.cloneBlock)({
          ...topParentListBlock,
          innerBlocks: topParentListBlock.innerBlocks.slice(
            0,
            blockIndex
          )
        });
        const middle = (0, import_blocks7.createBlock)((0, import_blocks7.getDefaultBlockName)());
        const after = topParentListBlock.innerBlocks.slice(
          blockIndex + 1
        );
        const tail = after.length ? [
          (0, import_blocks7.cloneBlock)({
            ...topParentListBlock,
            innerBlocks: after
          })
        ] : [];
        replaceBlocks(
          topParentListBlock.clientId,
          [head, middle, ...tail],
          1
        );
        selectionChange(middle.clientId);
      }
      element.addEventListener("keydown", onKeyDown);
      return () => {
        element.removeEventListener("keydown", onKeyDown);
      };
    }, []);
  }
  function WidthPanel({ selectedWidth, setAttributes }) {
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
      import_components10.__experimentalToolsPanel,
      {
        label: (0, import_i18n13.__)("Settings"),
        resetAll: () => setAttributes({ width: void 0 }),
        dropdownMenuProps,
        children: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
          import_components10.__experimentalToolsPanelItem,
          {
            label: (0, import_i18n13.__)("Width"),
            isShownByDefault: true,
            hasValue: () => !!selectedWidth,
            onDeselect: () => setAttributes({ width: void 0 }),
            children: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
              import_components10.__experimentalToggleGroupControl,
              {
                label: (0, import_i18n13.__)("Width"),
                value: selectedWidth,
                onChange: (newWidth) => setAttributes({ width: newWidth }),
                isBlock: true,
                __next40pxDefaultSize: true,
                children: [25, 50, 75, 100].map((widthValue) => {
                  return /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
                    import_components10.__experimentalToggleGroupControlOption,
                    {
                      value: widthValue,
                      label: (0, import_i18n13.sprintf)(
                        /* translators: %d: Percentage value. */
                        (0, import_i18n13.__)("%d%%"),
                        widthValue
                      )
                    },
                    widthValue
                  );
                })
              }
            )
          }
        )
      }
    );
  }
  function ButtonEdit(props) {
    const {
      attributes: attributes2,
      setAttributes,
      className,
      isSelected,
      onReplace,
      mergeBlocks,
      clientId,
      context
    } = props;
    const {
      tagName,
      linkTarget,
      placeholder: placeholder2,
      rel,
      style: style2,
      text,
      url,
      width,
      metadata
    } = attributes2;
    useDeprecatedTextAlign(props);
    const TagName2 = tagName || "a";
    function onKeyDown(event) {
      if (import_keycodes.isKeyboardEvent.primary(event, "k")) {
        startEditing(event);
      } else if (import_keycodes.isKeyboardEvent.primaryShift(event, "k")) {
        unlink();
        richTextRef.current?.focus();
      }
    }
    const [popoverAnchor, setPopoverAnchor] = (0, import_element10.useState)(null);
    const borderProps = (0, import_block_editor21.__experimentalUseBorderProps)(attributes2);
    const colorProps = (0, import_block_editor21.__experimentalUseColorProps)(attributes2);
    const spacingProps = (0, import_block_editor21.__experimentalGetSpacingClassesAndStyles)(attributes2);
    const shadowProps = (0, import_block_editor21.__experimentalGetShadowClassesAndStyles)(attributes2);
    const ref = (0, import_element10.useRef)();
    const richTextRef = (0, import_element10.useRef)();
    const blockProps = (0, import_block_editor21.useBlockProps)({
      ref: (0, import_compose8.useMergeRefs)([setPopoverAnchor, ref]),
      onKeyDown
    });
    const blockEditingMode = (0, import_block_editor21.useBlockEditingMode)();
    const [isEditingURL, setIsEditingURL] = (0, import_element10.useState)(false);
    const isURLSet = !!url;
    const opensInNewTab = linkTarget === NEW_TAB_TARGET;
    const nofollow = !!rel?.includes(NOFOLLOW_REL);
    const isLinkTag = "a" === TagName2;
    const {
      createPageEntity,
      userCanCreatePages,
      lockUrlControls = false
    } = (0, import_data11.useSelect)(
      (select9) => {
        if (!isSelected) {
          return {};
        }
        const _settings = select9(import_block_editor21.store).getSettings();
        const blockBindingsSource = (0, import_blocks7.getBlockBindingsSource)(
          metadata?.bindings?.url?.source
        );
        return {
          createPageEntity: _settings.__experimentalCreatePageEntity,
          userCanCreatePages: _settings.__experimentalUserCanCreatePages,
          lockUrlControls: !!metadata?.bindings?.url && !blockBindingsSource?.canUserEditValue?.({
            select: select9,
            context,
            args: metadata?.bindings?.url?.args
          })
        };
      },
      [context, isSelected, metadata?.bindings?.url]
    );
    async function handleCreate(pageTitle) {
      const page = await createPageEntity({
        title: pageTitle,
        status: "draft"
      });
      return {
        id: page.id,
        type: page.type,
        title: page.title.rendered,
        url: page.link,
        kind: "post-type"
      };
    }
    function createButtonText(searchTerm) {
      return (0, import_element10.createInterpolateElement)(
        (0, import_i18n13.sprintf)(
          /* translators: %s: search term. */
          (0, import_i18n13.__)("Create page: <mark>%s</mark>"),
          searchTerm
        ),
        { mark: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)("mark", {}) }
      );
    }
    function startEditing(event) {
      event.preventDefault();
      setIsEditingURL(true);
    }
    function unlink() {
      setAttributes({
        url: void 0,
        linkTarget: void 0,
        rel: void 0
      });
      setIsEditingURL(false);
    }
    (0, import_element10.useEffect)(() => {
      if (!isSelected) {
        setIsEditingURL(false);
      }
    }, [isSelected]);
    const linkValue = (0, import_element10.useMemo)(
      () => ({ url, opensInNewTab, nofollow }),
      [url, opensInNewTab, nofollow]
    );
    const useEnterRef = useEnter({ content: text, clientId });
    const mergedRef = (0, import_compose8.useMergeRefs)([useEnterRef, richTextRef]);
    const [fluidTypographySettings, layout] = (0, import_block_editor21.useSettings)(
      "typography.fluid",
      "layout"
    );
    const typographyProps = (0, import_block_editor21.getTypographyClassesAndStyles)(attributes2, {
      typography: {
        fluid: fluidTypographySettings
      },
      layout: {
        wideSize: layout?.wideSize
      }
    });
    const hasNonContentControls = blockEditingMode === "default";
    const hasBlockControls = hasNonContentControls || isLinkTag && !lockUrlControls;
    return /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(import_jsx_runtime176.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
        "div",
        {
          ...blockProps,
          className: clsx_default(blockProps.className, {
            [`has-custom-width wp-block-button__width-${width}`]: width
          }),
          children: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
            import_block_editor21.RichText,
            {
              ref: mergedRef,
              "aria-label": (0, import_i18n13.__)("Button text"),
              placeholder: placeholder2 || (0, import_i18n13.__)("Add text\u2026"),
              value: text,
              onChange: (value) => setAttributes({
                text: removeAnchorTag(value)
              }),
              withoutInteractiveFormatting: true,
              className: clsx_default(
                className,
                "wp-block-button__link",
                colorProps.className,
                borderProps.className,
                typographyProps.className,
                {
                  // For backwards compatibility add style that isn't
                  // provided via block support.
                  "no-border-radius": style2?.border?.radius === 0,
                  [`has-custom-font-size`]: blockProps.style.fontSize
                },
                (0, import_block_editor21.__experimentalGetElementClassName)("button")
              ),
              style: {
                ...borderProps.style,
                ...colorProps.style,
                ...spacingProps.style,
                ...shadowProps.style,
                ...typographyProps.style,
                writingMode: void 0
              },
              onReplace,
              onMerge: mergeBlocks,
              identifier: "text"
            }
          )
        }
      ),
      hasBlockControls && /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(import_block_editor21.BlockControls, { group: "block", children: isLinkTag && !lockUrlControls && /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
        import_components10.ToolbarButton,
        {
          name: "link",
          icon: !isURLSet ? link_default : link_off_default,
          title: !isURLSet ? (0, import_i18n13.__)("Link") : (0, import_i18n13.__)("Unlink"),
          shortcut: !isURLSet ? import_keycodes.displayShortcut.primary("k") : import_keycodes.displayShortcut.primaryShift("k"),
          onClick: !isURLSet ? startEditing : unlink,
          isActive: isURLSet
        }
      ) }),
      isLinkTag && isSelected && (isEditingURL || isURLSet) && !lockUrlControls && /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
        import_components10.Popover,
        {
          placement: "bottom",
          onClose: () => {
            setIsEditingURL(false);
            richTextRef.current?.focus();
          },
          anchor: popoverAnchor,
          focusOnMount: isEditingURL ? "firstElement" : false,
          __unstableSlotName: "__unstable-block-tools-after",
          shift: true,
          children: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
            import_block_editor21.LinkControl,
            {
              value: linkValue,
              onChange: ({
                url: newURL,
                opensInNewTab: newOpensInNewTab,
                nofollow: newNofollow
              }) => setAttributes(
                getUpdatedLinkAttributes({
                  rel,
                  url: newURL,
                  opensInNewTab: newOpensInNewTab,
                  nofollow: newNofollow
                })
              ),
              onRemove: () => {
                unlink();
                richTextRef.current?.focus();
              },
              forceIsEditingLink: isEditingURL,
              settings: LINK_SETTINGS,
              createSuggestion: createPageEntity && handleCreate,
              withCreateSuggestion: userCanCreatePages,
              createSuggestionButtonText: createButtonText
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(import_block_editor21.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
        WidthPanel,
        {
          selectedWidth: width,
          setAttributes
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(import_block_editor21.InspectorControls, { group: "advanced", children: [
        /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
          HTMLElementControl,
          {
            tagName,
            onChange: (value) => setAttributes({ tagName: value }),
            options: [
              { label: (0, import_i18n13.__)("Default (<a>)"), value: "a" },
              { label: "<button>", value: "button" }
            ]
          }
        ),
        isLinkTag && /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
          import_components10.TextControl,
          {
            __next40pxDefaultSize: true,
            label: (0, import_i18n13.__)("Link relation"),
            help: (0, import_element10.createInterpolateElement)(
              (0, import_i18n13.__)(
                "The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."
              ),
              {
                a: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(import_components10.ExternalLink, { href: "https://developer.mozilla.org/docs/Web/HTML/Attributes/rel" })
              }
            ),
            value: rel || "",
            onChange: (newRel) => setAttributes({ rel: newRel })
          }
        )
      ] })
    ] });
  }
  var edit_default2 = ButtonEdit;

  // packages/block-library/build-module/button/block.json
  var block_default10 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/button",
    title: "Button",
    category: "design",
    parent: ["core/buttons"],
    description: "Prompt visitors to take action with a button-style link.",
    keywords: ["link"],
    textdomain: "default",
    attributes: {
      tagName: {
        type: "string",
        enum: ["a", "button"],
        default: "a"
      },
      type: {
        type: "string",
        default: "button"
      },
      url: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "href",
        role: "content"
      },
      title: {
        type: "string",
        source: "attribute",
        selector: "a,button",
        attribute: "title",
        role: "content"
      },
      text: {
        type: "rich-text",
        source: "rich-text",
        selector: "a,button",
        role: "content"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "target",
        role: "content"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "rel",
        role: "content"
      },
      placeholder: {
        type: "string"
      },
      backgroundColor: {
        type: "string"
      },
      textColor: {
        type: "string"
      },
      gradient: {
        type: "string"
      },
      width: {
        type: "number"
      }
    },
    supports: {
      anchor: true,
      splitting: true,
      align: false,
      alignWide: false,
      color: {
        __experimentalSkipSerialization: true,
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        __experimentalSkipSerialization: [
          "fontSize",
          "lineHeight",
          "textAlign",
          "fontFamily",
          "fontWeight",
          "fontStyle",
          "textTransform",
          "textDecoration",
          "letterSpacing"
        ],
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalWritingMode: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      reusable: false,
      shadow: {
        __experimentalSkipSerialization: true
      },
      spacing: {
        __experimentalSkipSerialization: true,
        padding: ["horizontal", "vertical"],
        __experimentalDefaultControls: {
          padding: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    styles: [
      { name: "fill", label: "Fill", isDefault: true },
      { name: "outline", label: "Outline" }
    ],
    editorStyle: "wp-block-button-editor",
    style: "wp-block-button",
    selectors: {
      root: ".wp-block-button .wp-block-button__link",
      typography: {
        writingMode: ".wp-block-button"
      }
    }
  };

  // packages/block-library/build-module/button/save.mjs
  var import_block_editor22 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime177 = __toESM(require_jsx_runtime(), 1);
  function save6({ attributes: attributes2, className }) {
    const {
      tagName,
      type,
      fontSize,
      linkTarget,
      rel,
      style: style2,
      text,
      title,
      url,
      width
    } = attributes2;
    const TagName2 = tagName || "a";
    const isButtonTag = "button" === TagName2;
    const buttonType = type || "button";
    const borderProps = (0, import_block_editor22.__experimentalGetBorderClassesAndStyles)(attributes2);
    const colorProps = (0, import_block_editor22.__experimentalGetColorClassesAndStyles)(attributes2);
    const spacingProps = (0, import_block_editor22.__experimentalGetSpacingClassesAndStyles)(attributes2);
    const shadowProps = (0, import_block_editor22.__experimentalGetShadowClassesAndStyles)(attributes2);
    const typographyProps = (0, import_block_editor22.getTypographyClassesAndStyles)(attributes2);
    const buttonClasses = clsx_default(
      "wp-block-button__link",
      colorProps.className,
      borderProps.className,
      typographyProps.className,
      {
        // For backwards compatibility add style that isn't provided via
        // block support.
        "no-border-radius": style2?.border?.radius === 0,
        [`has-custom-font-size`]: fontSize || style2?.typography?.fontSize
      },
      (0, import_block_editor22.__experimentalGetElementClassName)("button")
    );
    const buttonStyle = {
      ...borderProps.style,
      ...colorProps.style,
      ...spacingProps.style,
      ...shadowProps.style,
      ...typographyProps.style,
      writingMode: void 0
    };
    const wrapperClasses = clsx_default(className, {
      [`has-custom-width wp-block-button__width-${width}`]: width
    });
    return /* @__PURE__ */ (0, import_jsx_runtime177.jsx)("div", { ...import_block_editor22.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(
      import_block_editor22.RichText.Content,
      {
        tagName: TagName2,
        type: isButtonTag ? buttonType : null,
        className: buttonClasses,
        href: isButtonTag ? null : url,
        title,
        style: buttonStyle,
        value: text,
        target: isButtonTag ? null : linkTarget,
        rel: isButtonTag ? null : rel
      }
    ) });
  }

  // packages/block-library/build-module/button/index.mjs
  var { fieldsKey: fieldsKey2, formKey: formKey2 } = unlock(import_blocks8.privateApis);
  var { name: name9 } = block_default10;
  var settings9 = {
    icon: button_default,
    example: {
      attributes: {
        className: "is-style-fill",
        text: (0, import_i18n14.__)("Call to action")
      }
    },
    edit: edit_default2,
    save: save6,
    deprecated: deprecated_default3,
    merge: (a2, { text = "" }) => ({
      ...a2,
      text: (a2.text || "") + text
    }),
    __experimentalLabel(attributes2, { context }) {
      const { text } = attributes2;
      const customName = attributes2?.metadata?.name;
      const hasContent = text?.trim().length > 0;
      if (context === "list-view" && (customName || hasContent)) {
        return customName || text;
      }
      if (context === "breadcrumb" && customName) {
        return customName;
      }
    }
  };
  if (window.__experimentalContentOnlyInspectorFields) {
    settings9[fieldsKey2] = [
      {
        id: "text",
        label: (0, import_i18n14.__)("Content"),
        type: "text",
        Edit: "rich-text"
        // TODO: replace with custom component
      },
      {
        id: "link",
        label: (0, import_i18n14.__)("Link"),
        type: "url",
        Edit: "link",
        // TODO: replace with custom component
        getValue: ({ item }) => ({
          url: item.url,
          rel: item.rel,
          linkTarget: item.linkTarget
        }),
        setValue: ({ value }) => ({
          url: value.url,
          rel: value.rel,
          linkTarget: value.linkTarget
        })
      }
    ];
    settings9[formKey2] = {
      fields: ["text", "link"]
    };
  }
  var init9 = () => initBlock({ name: name9, metadata: block_default10, settings: settings9 });

  // packages/block-library/build-module/buttons/index.mjs
  var buttons_exports = {};
  __export(buttons_exports, {
    init: () => init10,
    metadata: () => block_default11,
    name: () => name10,
    settings: () => settings10
  });
  var import_i18n15 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/buttons/deprecated.mjs
  var import_block_editor23 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime178 = __toESM(require_jsx_runtime(), 1);
  var migrateWithLayout = (attributes2) => {
    if (!!attributes2.layout) {
      return attributes2;
    }
    const { contentJustification, orientation, ...updatedAttributes } = attributes2;
    if (contentJustification || orientation) {
      Object.assign(updatedAttributes, {
        layout: {
          type: "flex",
          ...contentJustification && {
            justifyContent: contentJustification
          },
          ...orientation && { orientation }
        }
      });
    }
    return updatedAttributes;
  };
  var deprecated3 = [
    {
      attributes: {
        contentJustification: {
          type: "string"
        },
        orientation: {
          type: "string",
          default: "horizontal"
        }
      },
      supports: {
        anchor: true,
        align: ["wide", "full"],
        __experimentalExposeControlsToChildren: true,
        spacing: {
          blockGap: true,
          margin: ["top", "bottom"],
          __experimentalDefaultControls: {
            blockGap: true
          }
        }
      },
      isEligible: ({ contentJustification, orientation }) => !!contentJustification || !!orientation,
      migrate: migrateWithLayout,
      save({ attributes: { contentJustification, orientation } }) {
        return /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
          "div",
          {
            ...import_block_editor23.useBlockProps.save({
              className: clsx_default({
                [`is-content-justification-${contentJustification}`]: contentJustification,
                "is-vertical": orientation === "vertical"
              })
            }),
            children: /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(import_block_editor23.InnerBlocks.Content, {})
          }
        );
      }
    },
    {
      supports: {
        align: ["center", "left", "right"],
        anchor: true
      },
      save() {
        return /* @__PURE__ */ (0, import_jsx_runtime178.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(import_block_editor23.InnerBlocks.Content, {}) });
      },
      isEligible({ align }) {
        return align && ["center", "left", "right"].includes(align);
      },
      migrate(attributes2) {
        return migrateWithLayout({
          ...attributes2,
          align: void 0,
          // Floating Buttons blocks shouldn't have been supported in the
          // first place. Most users using them probably expected them to
          // act like content justification controls, so these blocks are
          // migrated to use content justification.
          // As for center-aligned Buttons blocks, the content justification
          // equivalent will create an identical end result in most cases.
          contentJustification: attributes2.align
        });
      }
    }
  ];
  var deprecated_default4 = deprecated3;

  // packages/block-library/build-module/buttons/transforms.mjs
  var import_blocks10 = __toESM(require_blocks(), 1);
  var import_rich_text = __toESM(require_rich_text(), 1);

  // packages/block-library/build-module/utils/get-transformed-attributes.mjs
  var import_blocks9 = __toESM(require_blocks(), 1);
  function getTransformedAttributes(attributes2, newBlockName, bindingsCallback = null) {
    if (!attributes2) {
      return void 0;
    }
    const newBlockType = (0, import_blocks9.getBlockType)(newBlockName);
    if (!newBlockType) {
      return void 0;
    }
    const transformedAttributes = {};
    if ((0, import_blocks9.hasBlockSupport)(newBlockType, "anchor") && attributes2.anchor) {
      transformedAttributes.anchor = attributes2.anchor;
    }
    if ((0, import_blocks9.hasBlockSupport)(newBlockType, "ariaLabel") && attributes2.ariaLabel) {
      transformedAttributes.ariaLabel = attributes2.ariaLabel;
    }
    if (attributes2.metadata) {
      const transformedMetadata = [];
      if (bindingsCallback) {
        transformedMetadata.push("id", "bindings");
      }
      if (transformedMetadata.length > 0) {
        const newMetadata = Object.entries(attributes2.metadata).reduce(
          (obj, [prop, value]) => {
            if (!transformedMetadata.includes(prop)) {
              return obj;
            }
            obj[prop] = prop === "bindings" ? bindingsCallback(value) : value;
            return obj;
          },
          {}
        );
        if (Object.keys(newMetadata).length > 0) {
          transformedAttributes.metadata = newMetadata;
        }
      }
    }
    if (Object.keys(transformedAttributes).length === 0) {
      return void 0;
    }
    return transformedAttributes;
  }

  // packages/block-library/build-module/buttons/transforms.mjs
  var transforms2 = {
    from: [
      {
        type: "block",
        isMultiBlock: true,
        blocks: ["core/button"],
        transform: (buttons) => (
          // Creates the buttons block.
          (0, import_blocks10.createBlock)(
            "core/buttons",
            {},
            // Loop the selected buttons.
            buttons.map(
              (attributes2) => (
                // Create singular button in the buttons block.
                (0, import_blocks10.createBlock)("core/button", attributes2)
              )
            )
          )
        )
      },
      {
        type: "block",
        isMultiBlock: true,
        blocks: ["core/paragraph"],
        transform: (buttons) => (
          // Creates the buttons block.
          (0, import_blocks10.createBlock)(
            "core/buttons",
            {},
            // Loop the selected buttons.
            buttons.map((attributes2) => {
              const { content } = attributes2;
              const element = (0, import_rich_text.__unstableCreateElement)(document, content);
              const text = element.innerText || "";
              const link = element.querySelector("a");
              const url = link?.getAttribute("href");
              return (0, import_blocks10.createBlock)("core/button", {
                ...attributes2,
                ...getTransformedAttributes(
                  attributes2,
                  "core/button",
                  ({ content: contentBinding }) => ({
                    text: contentBinding
                  })
                ),
                text,
                url
              });
            })
          )
        ),
        isMatch: (paragraphs) => {
          return paragraphs.every((attributes2) => {
            const element = (0, import_rich_text.__unstableCreateElement)(
              document,
              attributes2.content
            );
            const text = element.innerText || "";
            const links = element.querySelectorAll("a");
            return text.length <= 30 && links.length <= 1;
          });
        }
      }
    ]
  };
  var transforms_default2 = transforms2;

  // packages/block-library/build-module/buttons/edit.mjs
  var import_block_editor24 = __toESM(require_block_editor(), 1);
  var import_data12 = __toESM(require_data(), 1);
  var import_blocks11 = __toESM(require_blocks(), 1);
  var import_jsx_runtime179 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_BLOCK = {
    name: "core/button",
    attributesToCopy: [
      "backgroundColor",
      "border",
      "className",
      "fontFamily",
      "fontSize",
      "gradient",
      "style",
      "textColor",
      "width"
    ]
  };
  function ButtonsEdit({ attributes: attributes2, className }) {
    const { fontSize, layout, style: style2 } = attributes2;
    const blockProps = (0, import_block_editor24.useBlockProps)({
      className: clsx_default(className, {
        "has-custom-font-size": fontSize || style2?.typography?.fontSize
      })
    });
    const { hasButtonVariations } = (0, import_data12.useSelect)((select9) => {
      const buttonVariations = select9(import_blocks11.store).getBlockVariations(
        "core/button",
        "inserter"
      );
      return {
        hasButtonVariations: buttonVariations.length > 0
      };
    }, []);
    const innerBlocksProps = (0, import_block_editor24.useInnerBlocksProps)(blockProps, {
      defaultBlock: DEFAULT_BLOCK,
      // This check should be handled by the `Inserter` internally to be consistent across all blocks that use it.
      directInsert: !hasButtonVariations,
      template: [["core/button"]],
      templateInsertUpdatesSelection: true,
      orientation: layout?.orientation ?? "horizontal"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime179.jsx)("div", { ...innerBlocksProps });
  }
  var edit_default3 = ButtonsEdit;

  // packages/block-library/build-module/buttons/block.json
  var block_default11 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/buttons",
    title: "Buttons",
    category: "design",
    allowedBlocks: ["core/button"],
    description: "Prompt visitors to take action with a group of button-style links.",
    keywords: ["link"],
    textdomain: "default",
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      __experimentalExposeControlsToChildren: true,
      color: {
        gradients: true,
        text: false,
        __experimentalDefaultControls: {
          background: true
        }
      },
      spacing: {
        blockGap: ["horizontal", "vertical"],
        padding: true,
        margin: ["top", "bottom"],
        __experimentalDefaultControls: {
          blockGap: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      layout: {
        allowSwitching: false,
        allowInheriting: false,
        default: {
          type: "flex"
        }
      },
      interactivity: {
        clientNavigation: true
      },
      listView: true,
      contentRole: true
    },
    editorStyle: "wp-block-buttons-editor",
    style: "wp-block-buttons"
  };

  // packages/block-library/build-module/buttons/save.mjs
  var import_block_editor25 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime180 = __toESM(require_jsx_runtime(), 1);
  function save7({ attributes: attributes2, className }) {
    const { fontSize, style: style2 } = attributes2;
    const blockProps = import_block_editor25.useBlockProps.save({
      className: clsx_default(className, {
        "has-custom-font-size": fontSize || style2?.typography?.fontSize
      })
    });
    const innerBlocksProps = import_block_editor25.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime180.jsx)("div", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/buttons/index.mjs
  var { name: name10 } = block_default11;
  var settings10 = {
    icon: buttons_default,
    example: {
      attributes: {
        layout: {
          type: "flex",
          justifyContent: "center"
        }
      },
      innerBlocks: [
        {
          name: "core/button",
          attributes: { text: (0, import_i18n15.__)("Find out more") }
        },
        {
          name: "core/button",
          attributes: { text: (0, import_i18n15.__)("Contact us") }
        }
      ]
    },
    deprecated: deprecated_default4,
    transforms: transforms_default2,
    edit: edit_default3,
    save: save7
  };
  var init10 = () => initBlock({ name: name10, metadata: block_default11, settings: settings10 });

  // packages/block-library/build-module/calendar/index.mjs
  var calendar_exports = {};
  __export(calendar_exports, {
    init: () => init11,
    metadata: () => block_default12,
    name: () => name11,
    settings: () => settings11
  });

  // packages/block-library/build-module/calendar/block.json
  var block_default12 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/calendar",
    title: "Calendar",
    category: "widgets",
    description: "A calendar of your site\u2019s posts.",
    keywords: ["posts", "archive"],
    textdomain: "default",
    attributes: {
      month: {
        type: "integer"
      },
      year: {
        type: "integer"
      }
    },
    supports: {
      anchor: true,
      align: true,
      html: false,
      color: {
        link: true,
        __experimentalSkipSerialization: ["text", "background"],
        __experimentalDefaultControls: {
          background: true,
          text: true
        },
        __experimentalSelector: "table, th"
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    style: "wp-block-calendar"
  };

  // packages/block-library/build-module/calendar/edit.mjs
  var import_components11 = __toESM(require_components(), 1);
  var import_data13 = __toESM(require_data(), 1);
  var import_server_side_render3 = __toESM(require_server_side_render(), 1);
  var import_block_editor26 = __toESM(require_block_editor(), 1);
  var import_core_data5 = __toESM(require_core_data(), 1);
  var import_i18n16 = __toESM(require_i18n(), 1);
  var import_compose9 = __toESM(require_compose(), 1);
  var import_jsx_runtime181 = __toESM(require_jsx_runtime(), 1);
  var getYearMonth = memize((date) => {
    if (!date) {
      return {};
    }
    const dateObj = new Date(date);
    return {
      year: dateObj.getFullYear(),
      month: dateObj.getMonth() + 1
    };
  });
  function CalendarEdit({ attributes: attributes2, name: name123 }) {
    const { date, hasPosts, hasPostsResolved } = (0, import_data13.useSelect)((select9) => {
      const { getEntityRecords, hasFinishedResolution } = select9(import_core_data5.store);
      const singlePublishedPostQuery = {
        status: "publish",
        per_page: 1
      };
      const posts = getEntityRecords(
        "postType",
        "post",
        singlePublishedPostQuery
      );
      const postsResolved = hasFinishedResolution("getEntityRecords", [
        "postType",
        "post",
        singlePublishedPostQuery
      ]);
      let _date;
      const editorSelectors = select9("core/editor");
      if (editorSelectors) {
        const postType = editorSelectors.getEditedPostAttribute("type");
        if (postType === "post") {
          _date = editorSelectors.getEditedPostAttribute("date");
        }
      }
      return {
        date: _date,
        hasPostsResolved: postsResolved,
        hasPosts: postsResolved && posts?.length === 1
      };
    }, []);
    const { content, status, error } = (0, import_server_side_render3.useServerSideRender)({
      attributes: {
        ...attributes2,
        ...getYearMonth(date)
      },
      block: name123
    });
    const disabledRef = (0, import_compose9.useDisabled)();
    const blockProps = (0, import_block_editor26.useBlockProps)({ ref: disabledRef });
    if (!hasPosts) {
      return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(import_components11.Placeholder, { icon: calendar_default, label: (0, import_i18n16.__)("Calendar"), children: !hasPostsResolved ? /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(import_components11.Spinner, {}) : (0, import_i18n16.__)("No published posts found.") }) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(import_jsx_runtime181.Fragment, { children: [
      status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(import_components11.Spinner, {}) }),
      status === "error" && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("p", { children: (0, import_i18n16.sprintf)(
        /* translators: %s: error message returned when rendering the block. */
        (0, import_i18n16.__)("Error: %s"),
        error
      ) }) }),
      status === "success" && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(html_renderer_default, { wrapperProps: blockProps, html: content })
    ] });
  }

  // packages/block-library/build-module/calendar/transforms.mjs
  var import_blocks12 = __toESM(require_blocks(), 1);
  var transforms3 = {
    from: [
      {
        type: "block",
        blocks: ["core/archives"],
        transform: () => (0, import_blocks12.createBlock)("core/calendar")
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/archives"],
        transform: () => (0, import_blocks12.createBlock)("core/archives")
      }
    ]
  };
  var transforms_default3 = transforms3;

  // packages/block-library/build-module/calendar/index.mjs
  var { name: name11 } = block_default12;
  var settings11 = {
    icon: calendar_default,
    example: {},
    edit: CalendarEdit,
    transforms: transforms_default3
  };
  var init11 = () => initBlock({ name: name11, metadata: block_default12, settings: settings11 });

  // packages/block-library/build-module/categories/index.mjs
  var categories_exports = {};
  __export(categories_exports, {
    init: () => init12,
    metadata: () => block_default13,
    name: () => name12,
    settings: () => settings12
  });

  // packages/block-library/build-module/categories/block.json
  var block_default13 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/categories",
    title: "Terms List",
    category: "widgets",
    description: "Display a list of all terms of a given taxonomy.",
    keywords: ["categories"],
    textdomain: "default",
    attributes: {
      taxonomy: {
        type: "string",
        default: "category"
      },
      displayAsDropdown: {
        type: "boolean",
        default: false
      },
      showHierarchy: {
        type: "boolean",
        default: false
      },
      showPostCounts: {
        type: "boolean",
        default: false
      },
      showOnlyTopLevel: {
        type: "boolean",
        default: false
      },
      showEmpty: {
        type: "boolean",
        default: false
      },
      label: {
        type: "string",
        role: "content"
      },
      showLabel: {
        type: "boolean",
        default: true
      }
    },
    usesContext: ["enhancedPagination"],
    supports: {
      anchor: true,
      align: true,
      html: false,
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    editorStyle: "wp-block-categories-editor",
    style: "wp-block-categories"
  };

  // packages/block-library/build-module/categories/edit.mjs
  var import_components12 = __toESM(require_components(), 1);
  var import_compose10 = __toESM(require_compose(), 1);
  var import_block_editor27 = __toESM(require_block_editor(), 1);
  var import_html_entities2 = __toESM(require_html_entities(), 1);
  var import_i18n17 = __toESM(require_i18n(), 1);
  var import_core_data6 = __toESM(require_core_data(), 1);
  var import_data14 = __toESM(require_data(), 1);
  var import_notices2 = __toESM(require_notices(), 1);
  var import_jsx_runtime182 = __toESM(require_jsx_runtime(), 1);
  function CategoriesEdit({
    attributes: {
      displayAsDropdown,
      showHierarchy,
      showPostCounts,
      showOnlyTopLevel,
      showEmpty,
      label,
      showLabel,
      taxonomy: taxonomySlug
    },
    setAttributes,
    className,
    clientId
  }) {
    const selectId = (0, import_compose10.useInstanceId)(CategoriesEdit, "blocks-category-select");
    const { records: allTaxonomies, isResolvingTaxonomies } = (0, import_core_data6.useEntityRecords)(
      "root",
      "taxonomy",
      { per_page: -1 }
    );
    const taxonomies = allTaxonomies?.filter((t2) => t2.visibility.public);
    const taxonomy = taxonomies?.find((t2) => t2.slug === taxonomySlug);
    const isHierarchicalTaxonomy = !isResolvingTaxonomies && taxonomy?.hierarchical;
    const query = { per_page: -1, hide_empty: !showEmpty, context: "view" };
    if (isHierarchicalTaxonomy && showOnlyTopLevel) {
      query.parent = 0;
    }
    const { records: categories, isResolving } = (0, import_core_data6.useEntityRecords)(
      "taxonomy",
      taxonomySlug,
      query
    );
    const { createWarningNotice } = (0, import_data14.useDispatch)(import_notices2.store);
    const showRedirectionPreventedNotice = (event) => {
      event.preventDefault();
      createWarningNotice((0, import_i18n17.__)("Links are disabled in the editor."), {
        id: `block-library/core/categories/redirection-prevented/${clientId}`,
        type: "snackbar"
      });
    };
    const getCategoriesList = (parentId) => {
      if (!categories?.length) {
        return [];
      }
      if (parentId === null) {
        return categories;
      }
      return categories.filter(({ parent }) => parent === parentId);
    };
    const toggleAttribute = (attributeName) => (newValue) => setAttributes({ [attributeName]: newValue });
    const renderCategoryName = (name123) => !name123 ? (0, import_i18n17.__)("(Untitled)") : (0, import_html_entities2.decodeEntities)(name123).trim();
    const renderCategoryList = () => {
      const parentId = isHierarchicalTaxonomy && showHierarchy ? 0 : null;
      const categoriesList = getCategoriesList(parentId);
      return categoriesList.map(
        (category) => renderCategoryListItem(category)
      );
    };
    const renderCategoryListItem = (category) => {
      const childCategories = getCategoriesList(category.id);
      const { id, link, count, name: name123 } = category;
      return /* @__PURE__ */ (0, import_jsx_runtime182.jsxs)("li", { className: `cat-item cat-item-${id}`, children: [
        /* @__PURE__ */ (0, import_jsx_runtime182.jsx)("a", { href: link, onClick: showRedirectionPreventedNotice, children: renderCategoryName(name123) }),
        showPostCounts && ` (${count})`,
        isHierarchicalTaxonomy && showHierarchy && !!childCategories.length && /* @__PURE__ */ (0, import_jsx_runtime182.jsx)("ul", { className: "children", children: childCategories.map(
          (childCategory) => renderCategoryListItem(childCategory)
        ) })
      ] }, id);
    };
    const renderCategoryDropdown = () => {
      const parentId = isHierarchicalTaxonomy && showHierarchy ? 0 : null;
      const categoriesList = getCategoriesList(parentId);
      return /* @__PURE__ */ (0, import_jsx_runtime182.jsxs)(import_jsx_runtime182.Fragment, { children: [
        showLabel ? /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
          import_block_editor27.RichText,
          {
            className: "wp-block-categories__label",
            "aria-label": (0, import_i18n17.__)("Label text"),
            placeholder: taxonomy?.name,
            withoutInteractiveFormatting: true,
            value: label,
            onChange: (html) => setAttributes({ label: html })
          }
        ) : /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(import_components12.VisuallyHidden, { as: "label", htmlFor: selectId, children: label ? label : taxonomy?.name }),
        /* @__PURE__ */ (0, import_jsx_runtime182.jsxs)("select", { id: selectId, children: [
          /* @__PURE__ */ (0, import_jsx_runtime182.jsx)("option", { children: (0, import_i18n17.sprintf)(
            /* translators: %s: taxonomy's singular name */
            (0, import_i18n17.__)("Select %s"),
            taxonomy?.labels?.singular_name
          ) }),
          categoriesList.map(
            (category) => renderCategoryDropdownItem(category, 0)
          )
        ] })
      ] });
    };
    const renderCategoryDropdownItem = (category, level) => {
      const { id, count, name: name123 } = category;
      const childCategories = getCategoriesList(id);
      return [
        /* @__PURE__ */ (0, import_jsx_runtime182.jsxs)("option", { className: `level-${level}`, children: [
          Array.from({ length: level * 3 }).map(() => "\xA0"),
          renderCategoryName(name123),
          showPostCounts && ` (${count})`
        ] }, id),
        isHierarchicalTaxonomy && showHierarchy && !!childCategories.length && childCategories.map(
          (childCategory) => renderCategoryDropdownItem(childCategory, level + 1)
        )
      ];
    };
    const TagName2 = !!categories?.length && !displayAsDropdown && !isResolving ? "ul" : "div";
    const classes = clsx_default(
      className,
      `wp-block-categories-taxonomy-${taxonomySlug}`,
      {
        "wp-block-categories-list": !!categories?.length && !displayAsDropdown && !isResolving,
        "wp-block-categories-dropdown": !!categories?.length && displayAsDropdown && !isResolving
      }
    );
    const blockProps = (0, import_block_editor27.useBlockProps)({
      className: classes
    });
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime182.jsxs)(TagName2, { ...blockProps, children: [
      /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(import_block_editor27.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime182.jsxs)(
        import_components12.__experimentalToolsPanel,
        {
          label: (0, import_i18n17.__)("Settings"),
          resetAll: () => {
            setAttributes({
              taxonomy: "category",
              displayAsDropdown: false,
              showHierarchy: false,
              showPostCounts: false,
              showOnlyTopLevel: false,
              showEmpty: false,
              showLabel: true
            });
          },
          dropdownMenuProps,
          children: [
            Array.isArray(taxonomies) && /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
              import_components12.__experimentalToolsPanelItem,
              {
                hasValue: () => {
                  return taxonomySlug !== "category";
                },
                label: (0, import_i18n17.__)("Taxonomy"),
                onDeselect: () => {
                  setAttributes({ taxonomy: "category" });
                },
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
                  import_components12.SelectControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n17.__)("Taxonomy"),
                    options: taxonomies.map((t2) => ({
                      label: t2.name,
                      value: t2.slug
                    })),
                    value: taxonomySlug,
                    onChange: (selectedTaxonomy) => setAttributes({
                      taxonomy: selectedTaxonomy
                    })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
              import_components12.__experimentalToolsPanelItem,
              {
                hasValue: () => !!displayAsDropdown,
                label: (0, import_i18n17.__)("Display as dropdown"),
                onDeselect: () => setAttributes({ displayAsDropdown: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
                  import_components12.ToggleControl,
                  {
                    label: (0, import_i18n17.__)("Display as dropdown"),
                    checked: displayAsDropdown,
                    onChange: toggleAttribute("displayAsDropdown")
                  }
                )
              }
            ),
            displayAsDropdown && /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
              import_components12.__experimentalToolsPanelItem,
              {
                hasValue: () => !showLabel,
                label: (0, import_i18n17.__)("Show label"),
                onDeselect: () => setAttributes({ showLabel: true }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
                  import_components12.ToggleControl,
                  {
                    className: "wp-block-categories__indentation",
                    label: (0, import_i18n17.__)("Show label"),
                    checked: showLabel,
                    onChange: toggleAttribute("showLabel")
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
              import_components12.__experimentalToolsPanelItem,
              {
                hasValue: () => !!showPostCounts,
                label: (0, import_i18n17.__)("Show post counts"),
                onDeselect: () => setAttributes({ showPostCounts: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
                  import_components12.ToggleControl,
                  {
                    label: (0, import_i18n17.__)("Show post counts"),
                    checked: showPostCounts,
                    onChange: toggleAttribute("showPostCounts")
                  }
                )
              }
            ),
            isHierarchicalTaxonomy && /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
              import_components12.__experimentalToolsPanelItem,
              {
                hasValue: () => !!showOnlyTopLevel,
                label: (0, import_i18n17.__)("Show only top level terms"),
                onDeselect: () => setAttributes({ showOnlyTopLevel: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
                  import_components12.ToggleControl,
                  {
                    label: (0, import_i18n17.__)("Show only top level terms"),
                    checked: showOnlyTopLevel,
                    onChange: toggleAttribute(
                      "showOnlyTopLevel"
                    )
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
              import_components12.__experimentalToolsPanelItem,
              {
                hasValue: () => !!showEmpty,
                label: (0, import_i18n17.__)("Show empty terms"),
                onDeselect: () => setAttributes({ showEmpty: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
                  import_components12.ToggleControl,
                  {
                    label: (0, import_i18n17.__)("Show empty terms"),
                    checked: showEmpty,
                    onChange: toggleAttribute("showEmpty")
                  }
                )
              }
            ),
            isHierarchicalTaxonomy && !showOnlyTopLevel && /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
              import_components12.__experimentalToolsPanelItem,
              {
                hasValue: () => !!showHierarchy,
                label: (0, import_i18n17.__)("Show hierarchy"),
                onDeselect: () => setAttributes({ showHierarchy: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
                  import_components12.ToggleControl,
                  {
                    label: (0, import_i18n17.__)("Show hierarchy"),
                    checked: showHierarchy,
                    onChange: toggleAttribute("showHierarchy")
                  }
                )
              }
            )
          ]
        }
      ) }),
      isResolving && /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(import_components12.Placeholder, { icon: pin_default, label: (0, import_i18n17.__)("Terms"), children: /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(import_components12.Spinner, {}) }),
      !isResolving && categories?.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime182.jsx)("p", { children: taxonomy.labels.no_terms }),
      !isResolving && categories?.length > 0 && (displayAsDropdown ? renderCategoryDropdown() : renderCategoryList())
    ] });
  }

  // packages/block-library/build-module/categories/variations.mjs
  var import_i18n18 = __toESM(require_i18n(), 1);
  var variations = [
    {
      name: "terms",
      title: (0, import_i18n18.__)("Terms List"),
      icon: category_default,
      attributes: {
        // We need to set an attribute here that will be set when inserting the block.
        // We cannot leave this empty, as that would be interpreted as the default value,
        // which is `category` -- for which we're defining a distinct variation below,
        // for backwards compatibility reasons.
        // The logical fallback is thus the only other built-in and public taxonomy: Tags.
        taxonomy: "post_tag"
      },
      isActive: (blockAttributes8) => (
        // This variation is used for any taxonomy other than `category`.
        blockAttributes8.taxonomy !== "category"
      )
    },
    {
      name: "categories",
      title: (0, import_i18n18.__)("Categories List"),
      description: (0, import_i18n18.__)("Display a list of all categories."),
      icon: category_default,
      attributes: {
        taxonomy: "category"
      },
      isActive: ["taxonomy"],
      // The following is needed to prevent "Terms List" from showing up twice in the inserter
      // (once for the block, once for the variation). Fortunately, it does not collide with
      // `categories` being the default value of the `taxonomy` attribute.
      isDefault: true
    }
  ];
  var variations_default = variations;

  // packages/block-library/build-module/categories/index.mjs
  var { name: name12 } = block_default13;
  var settings12 = {
    icon: category_default,
    example: {},
    edit: CategoriesEdit,
    variations: variations_default
  };
  var init12 = () => initBlock({ name: name12, metadata: block_default13, settings: settings12 });

  // packages/block-library/build-module/freeform/index.mjs
  var freeform_exports = {};
  __export(freeform_exports, {
    init: () => init13,
    metadata: () => block_default14,
    name: () => name13,
    settings: () => settings13
  });

  // packages/block-library/build-module/freeform/edit.mjs
  var import_block_editor30 = __toESM(require_block_editor(), 1);
  var import_data17 = __toESM(require_data(), 1);
  var import_components15 = __toESM(require_components(), 1);
  var import_element12 = __toESM(require_element(), 1);
  var import_i18n21 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/freeform/convert-to-blocks-button.mjs
  var import_i18n19 = __toESM(require_i18n(), 1);
  var import_components13 = __toESM(require_components(), 1);
  var import_data15 = __toESM(require_data(), 1);
  var import_blocks13 = __toESM(require_blocks(), 1);
  var import_block_editor28 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime183 = __toESM(require_jsx_runtime(), 1);
  var ConvertToBlocksButton = ({ clientId }) => {
    const { replaceBlocks } = (0, import_data15.useDispatch)(import_block_editor28.store);
    const block = (0, import_data15.useSelect)(
      (select9) => {
        return select9(import_block_editor28.store).getBlock(clientId);
      },
      [clientId]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
      import_components13.ToolbarButton,
      {
        onClick: () => replaceBlocks(
          block.clientId,
          (0, import_blocks13.rawHandler)({ HTML: (0, import_blocks13.serialize)(block) })
        ),
        children: (0, import_i18n19.__)("Convert to blocks")
      }
    );
  };
  var convert_to_blocks_button_default = ConvertToBlocksButton;

  // packages/block-library/build-module/freeform/modal.mjs
  var import_block_editor29 = __toESM(require_block_editor(), 1);
  var import_components14 = __toESM(require_components(), 1);
  var import_element11 = __toESM(require_element(), 1);
  var import_i18n20 = __toESM(require_i18n(), 1);
  var import_data16 = __toESM(require_data(), 1);
  var import_compose11 = __toESM(require_compose(), 1);
  var import_jsx_runtime184 = __toESM(require_jsx_runtime(), 1);
  function ModalAuxiliaryActions({ onClick, isModalFullScreen }) {
    const isMobileViewport = (0, import_compose11.useViewportMatch)("small", "<");
    if (isMobileViewport) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
      import_components14.Button,
      {
        size: "compact",
        onClick,
        icon: fullscreen_default,
        isPressed: isModalFullScreen,
        label: isModalFullScreen ? (0, import_i18n20.__)("Exit fullscreen") : (0, import_i18n20.__)("Enter fullscreen")
      }
    );
  }
  function ClassicEdit(props) {
    const styles = (0, import_data16.useSelect)(
      (select9) => select9(import_block_editor29.store).getSettings().styles
    );
    (0, import_element11.useEffect)(() => {
      const { baseURL, suffix, settings: settings122 } = window.wpEditorL10n.tinymce;
      window.tinymce.EditorManager.overrideDefaults({
        base_url: baseURL,
        suffix
      });
      window.wp.oldEditor.initialize(props.id, {
        tinymce: {
          ...settings122,
          setup(editor) {
            editor.on("init", () => {
              const doc = editor.getDoc();
              styles.forEach(({ css }) => {
                const styleEl = doc.createElement("style");
                styleEl.innerHTML = css;
                doc.head.appendChild(styleEl);
              });
            });
          }
        }
      });
      return () => {
        window.wp.oldEditor.remove(props.id);
      };
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime184.jsx)("textarea", { ...props });
  }
  function ModalEdit({ clientId, content, onClose, onChange }) {
    const [isModalFullScreen, setIsModalFullScreen] = (0, import_element11.useState)(false);
    const id = `editor-${clientId}`;
    return /* @__PURE__ */ (0, import_jsx_runtime184.jsxs)(
      import_components14.Modal,
      {
        title: (0, import_i18n20.__)("Classic Editor"),
        onRequestClose: onClose,
        shouldCloseOnClickOutside: false,
        overlayClassName: "block-editor-freeform-modal",
        isFullScreen: isModalFullScreen,
        className: "block-editor-freeform-modal__content",
        headerActions: /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
          ModalAuxiliaryActions,
          {
            onClick: () => setIsModalFullScreen(!isModalFullScreen),
            isModalFullScreen
          }
        ),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(ClassicEdit, { id, defaultValue: content }),
          /* @__PURE__ */ (0, import_jsx_runtime184.jsxs)(
            import_components14.Flex,
            {
              className: "block-editor-freeform-modal__actions",
              justify: "flex-end",
              expanded: false,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(import_components14.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
                  import_components14.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "tertiary",
                    onClick: onClose,
                    children: (0, import_i18n20.__)("Cancel")
                  }
                ) }),
                /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(import_components14.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
                  import_components14.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "primary",
                    onClick: () => {
                      onChange(window.wp.oldEditor.getContent(id));
                      onClose();
                    },
                    children: (0, import_i18n20.__)("Save")
                  }
                ) })
              ]
            }
          )
        ]
      }
    );
  }

  // packages/block-library/build-module/freeform/edit.mjs
  var import_jsx_runtime185 = __toESM(require_jsx_runtime(), 1);
  function FreeformEdit({
    attributes: attributes2,
    setAttributes,
    clientId
  }) {
    const { content } = attributes2;
    const [isOpen, setOpen] = (0, import_element12.useState)(false);
    const editButtonRef = (0, import_element12.useRef)(null);
    const canRemove = (0, import_data17.useSelect)(
      (select9) => select9(import_block_editor30.store).canRemoveBlock(clientId),
      [clientId]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)(import_jsx_runtime185.Fragment, { children: [
      canRemove && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(import_block_editor30.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(import_components15.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(convert_to_blocks_button_default, { clientId }) }) }),
      /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(import_block_editor30.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(import_components15.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
        import_components15.ToolbarButton,
        {
          ref: editButtonRef,
          onClick: () => setOpen(true),
          children: (0, import_i18n21.__)("Edit")
        }
      ) }) }),
      /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)("div", { ...(0, import_block_editor30.useBlockProps)(), children: [
        content ? /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(import_element12.RawHTML, { children: content }) : /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
          import_components15.Placeholder,
          {
            icon: /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(import_block_editor30.BlockIcon, { icon: classic_default }),
            label: (0, import_i18n21.__)("Classic"),
            instructions: (0, import_i18n21.__)(
              "Use the classic editor to add content."
            ),
            children: /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
              import_components15.Button,
              {
                __next40pxDefaultSize: true,
                variant: "primary",
                onClick: () => setOpen(true),
                children: (0, import_i18n21.__)("Edit contents")
              }
            )
          }
        ),
        isOpen && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
          ModalEdit,
          {
            clientId,
            content,
            onClose: () => {
              setOpen(false);
              if (editButtonRef.current) {
                editButtonRef.current.focus();
              }
            },
            onChange: (newContent) => setAttributes({ content: newContent })
          }
        )
      ] })
    ] });
  }

  // packages/block-library/build-module/freeform/block.json
  var block_default14 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/freeform",
    title: "Classic",
    category: "text",
    description: "Use the classic WordPress editor.",
    textdomain: "default",
    attributes: {
      content: {
        type: "string",
        source: "raw"
      }
    },
    supports: {
      className: false,
      customClassName: false,
      lock: false,
      reusable: false,
      renaming: false,
      visibility: false,
      customCSS: false
    },
    editorStyle: "wp-block-freeform-editor"
  };

  // packages/block-library/build-module/freeform/save.mjs
  var import_element13 = __toESM(require_element(), 1);
  var import_jsx_runtime186 = __toESM(require_jsx_runtime(), 1);
  function save8({ attributes: attributes2 }) {
    const { content } = attributes2;
    return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(import_element13.RawHTML, { children: content });
  }

  // packages/block-library/build-module/freeform/index.mjs
  var { name: name13 } = block_default14;
  var settings13 = {
    icon: classic_default,
    edit: FreeformEdit,
    save: save8
  };
  var init13 = () => initBlock({ name: name13, metadata: block_default14, settings: settings13 });

  // packages/block-library/build-module/code/index.mjs
  var code_exports = {};
  __export(code_exports, {
    init: () => init14,
    metadata: () => block_default15,
    name: () => name14,
    settings: () => settings14
  });
  var import_i18n23 = __toESM(require_i18n(), 1);
  var import_blocks16 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/code/edit.mjs
  var import_i18n22 = __toESM(require_i18n(), 1);
  var import_block_editor31 = __toESM(require_block_editor(), 1);
  var import_blocks14 = __toESM(require_blocks(), 1);
  var import_jsx_runtime187 = __toESM(require_jsx_runtime(), 1);
  function CodeEdit({
    attributes: attributes2,
    setAttributes,
    onRemove,
    insertBlocksAfter,
    mergeBlocks
  }) {
    const blockProps = (0, import_block_editor31.useBlockProps)();
    return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)("pre", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
      import_block_editor31.RichText,
      {
        tagName: "code",
        identifier: "content",
        value: attributes2.content,
        onChange: (content) => setAttributes({ content }),
        onRemove,
        onMerge: mergeBlocks,
        placeholder: (0, import_i18n22.__)("Write code\u2026"),
        "aria-label": (0, import_i18n22.__)("Code"),
        preserveWhiteSpace: true,
        __unstablePastePlainText: true,
        __unstableOnSplitAtDoubleLineEnd: () => insertBlocksAfter((0, import_blocks14.createBlock)((0, import_blocks14.getDefaultBlockName)()))
      }
    ) });
  }

  // packages/block-library/build-module/code/block.json
  var block_default15 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/code",
    title: "Code",
    category: "text",
    description: "Display code snippets that respect your spacing and tabs.",
    textdomain: "default",
    attributes: {
      content: {
        type: "rich-text",
        source: "rich-text",
        selector: "code",
        __unstablePreserveWhiteSpace: true,
        role: "content"
      }
    },
    supports: {
      align: ["wide"],
      anchor: true,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      spacing: {
        margin: ["top", "bottom"],
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          width: true,
          color: true
        }
      },
      color: {
        text: true,
        background: true,
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    style: "wp-block-code"
  };

  // packages/block-library/build-module/code/save.mjs
  var import_block_editor32 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/code/utils.mjs
  var import_compose12 = __toESM(require_compose(), 1);
  function escape(content) {
    return (0, import_compose12.pipe)(
      escapeOpeningSquareBrackets,
      escapeProtocolInIsolatedUrls
    )(content || "");
  }
  function escapeOpeningSquareBrackets(content) {
    return content.replace(/\[/g, "&#91;");
  }
  function escapeProtocolInIsolatedUrls(content) {
    return content.replace(
      /^(\s*https?:)\/\/([^\s<>"]+\s*)$/m,
      "$1&#47;&#47;$2"
    );
  }

  // packages/block-library/build-module/code/save.mjs
  var import_jsx_runtime188 = __toESM(require_jsx_runtime(), 1);
  function save9({ attributes: attributes2 }) {
    return /* @__PURE__ */ (0, import_jsx_runtime188.jsx)("pre", { ...import_block_editor32.useBlockProps.save(), children: /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(
      import_block_editor32.RichText.Content,
      {
        tagName: "code",
        value: escape(
          typeof attributes2.content === "string" ? attributes2.content : attributes2.content.toHTMLString({
            preserveWhiteSpace: true
          })
        )
      }
    ) });
  }

  // packages/block-library/build-module/code/transforms.mjs
  var import_blocks15 = __toESM(require_blocks(), 1);
  var import_rich_text2 = __toESM(require_rich_text(), 1);
  var transforms4 = {
    from: [
      {
        type: "input",
        regExp: /^```$/,
        transform: () => (0, import_blocks15.createBlock)("core/code")
      },
      {
        type: "block",
        blocks: ["core/paragraph"],
        transform: (attributes2) => {
          const { content } = attributes2;
          return (0, import_blocks15.createBlock)("core/code", {
            ...attributes2,
            ...getTransformedAttributes(attributes2, "core/code"),
            content
          });
        }
      },
      {
        type: "block",
        blocks: ["core/html"],
        transform: (attributes2) => {
          const { content: text } = attributes2;
          return (0, import_blocks15.createBlock)("core/code", {
            ...attributes2,
            ...getTransformedAttributes(attributes2, "core/code"),
            // The HTML is plain text (with plain line breaks), so
            // convert it to rich text.
            content: (0, import_rich_text2.toHTMLString)({ value: (0, import_rich_text2.create)({ text }) })
          });
        }
      },
      {
        type: "raw",
        isMatch: (node) => node.nodeName === "PRE" && node.children.length === 1 && node.firstChild.nodeName === "CODE",
        schema: {
          pre: {
            children: {
              code: {
                children: {
                  "#text": {}
                }
              }
            }
          }
        }
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/paragraph"],
        transform: (attributes2) => {
          const { content } = attributes2;
          return (0, import_blocks15.createBlock)("core/paragraph", {
            ...getTransformedAttributes(attributes2, "core/paragraph"),
            content
          });
        }
      }
    ]
  };
  var transforms_default4 = transforms4;

  // packages/block-library/build-module/code/index.mjs
  var { fieldsKey: fieldsKey3, formKey: formKey3 } = unlock(import_blocks16.privateApis);
  var { name: name14 } = block_default15;
  var settings14 = {
    icon: code_default,
    example: {
      attributes: {
        /* eslint-disable @wordpress/i18n-no-collapsible-whitespace */
        // translators: Preserve \n markers for line breaks
        content: (0, import_i18n23.__)(
          "// A \u201Cblock\u201D is the abstract term used\n// to describe units of markup that\n// when composed together, form the\n// content or layout of a page.\nregisterBlockType( name, settings );"
        )
        /* eslint-enable @wordpress/i18n-no-collapsible-whitespace */
      }
    },
    merge(attributes2, attributesToMerge) {
      return {
        content: attributes2.content + "\n\n" + attributesToMerge.content
      };
    },
    transforms: transforms_default4,
    edit: CodeEdit,
    save: save9
  };
  if (window.__experimentalContentOnlyInspectorFields) {
    settings14[fieldsKey3] = [
      {
        id: "content",
        label: (0, import_i18n23.__)("Code"),
        type: "text",
        Edit: "rich-text"
        // TODO: replace with custom component
      }
    ];
    settings14[formKey3] = {
      fields: ["content"]
    };
  }
  var init14 = () => initBlock({ name: name14, metadata: block_default15, settings: settings14 });

  // packages/block-library/build-module/column/index.mjs
  var column_exports = {};
  __export(column_exports, {
    init: () => init15,
    metadata: () => block_default16,
    name: () => name15,
    settings: () => settings15
  });

  // packages/block-library/build-module/column/deprecated.mjs
  var import_block_editor33 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime189 = __toESM(require_jsx_runtime(), 1);
  var deprecated4 = [
    {
      attributes: {
        verticalAlignment: {
          type: "string"
        },
        width: {
          type: "number",
          min: 0,
          max: 100
        }
      },
      isEligible({ width }) {
        return isFinite(width);
      },
      migrate(attributes2) {
        return {
          ...attributes2,
          width: `${attributes2.width}%`
        };
      },
      save({ attributes: attributes2 }) {
        const { verticalAlignment, width } = attributes2;
        const wrapperClasses = clsx_default({
          [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment
        });
        const style2 = { flexBasis: width + "%" };
        return /* @__PURE__ */ (0, import_jsx_runtime189.jsx)("div", { className: wrapperClasses, style: style2, children: /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(import_block_editor33.InnerBlocks.Content, {}) });
      }
    }
  ];
  var deprecated_default5 = deprecated4;

  // packages/block-library/build-module/column/edit.mjs
  var import_block_editor34 = __toESM(require_block_editor(), 1);
  var import_components16 = __toESM(require_components(), 1);
  var import_data18 = __toESM(require_data(), 1);
  var import_i18n24 = __toESM(require_i18n(), 1);
  var import_jsx_runtime190 = __toESM(require_jsx_runtime(), 1);
  function ColumnInspectorControls({ width, setAttributes }) {
    const [availableUnits] = (0, import_block_editor34.useSettings)("spacing.units");
    const units = (0, import_components16.__experimentalUseCustomUnits)({
      availableUnits: availableUnits || ["%", "px", "em", "rem", "vw"]
    });
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
      import_components16.__experimentalToolsPanel,
      {
        label: (0, import_i18n24.__)("Settings"),
        resetAll: () => {
          setAttributes({ width: void 0 });
        },
        dropdownMenuProps,
        children: /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
          import_components16.__experimentalToolsPanelItem,
          {
            hasValue: () => width !== void 0,
            label: (0, import_i18n24.__)("Width"),
            onDeselect: () => setAttributes({ width: void 0 }),
            isShownByDefault: true,
            children: /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
              import_components16.__experimentalUnitControl,
              {
                label: (0, import_i18n24.__)("Width"),
                __unstableInputWidth: "calc(50% - 8px)",
                __next40pxDefaultSize: true,
                value: width || "",
                onChange: (nextWidth) => {
                  nextWidth = 0 > parseFloat(nextWidth) ? "0" : nextWidth;
                  setAttributes({ width: nextWidth });
                },
                units
              }
            )
          }
        )
      }
    );
  }
  function ColumnEdit({
    attributes: { verticalAlignment, width, templateLock, allowedBlocks },
    setAttributes,
    clientId
  }) {
    const classes = clsx_default("block-core-columns", {
      [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment
    });
    const { columnsIds, hasChildBlocks, rootClientId } = (0, import_data18.useSelect)(
      (select9) => {
        const { getBlockOrder, getBlockRootClientId } = select9(import_block_editor34.store);
        const rootId = getBlockRootClientId(clientId);
        return {
          hasChildBlocks: getBlockOrder(clientId).length > 0,
          rootClientId: rootId,
          columnsIds: getBlockOrder(rootId)
        };
      },
      [clientId]
    );
    const { updateBlockAttributes } = (0, import_data18.useDispatch)(import_block_editor34.store);
    const updateAlignment = (value) => {
      setAttributes({ verticalAlignment: value });
      updateBlockAttributes(rootClientId, {
        verticalAlignment: null
      });
    };
    const widthWithUnit = Number.isFinite(width) ? width + "%" : width;
    const blockProps = (0, import_block_editor34.useBlockProps)({
      className: classes,
      style: widthWithUnit ? { flexBasis: widthWithUnit } : void 0
    });
    const columnsCount = columnsIds.length;
    const currentColumnPosition = columnsIds.indexOf(clientId) + 1;
    const label = (0, import_i18n24.sprintf)(
      /* translators: 1: Block label (i.e. "Block: Column"), 2: Position of the selected block, 3: Total number of sibling blocks of the same type */
      (0, import_i18n24.__)("%1$s (%2$d of %3$d)"),
      blockProps["aria-label"],
      currentColumnPosition,
      columnsCount
    );
    const innerBlocksProps = (0, import_block_editor34.useInnerBlocksProps)(
      { ...blockProps, "aria-label": label },
      {
        templateLock,
        allowedBlocks,
        renderAppender: hasChildBlocks ? void 0 : import_block_editor34.InnerBlocks.ButtonBlockAppender
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(import_jsx_runtime190.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(import_block_editor34.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
        import_block_editor34.BlockVerticalAlignmentToolbar,
        {
          onChange: updateAlignment,
          value: verticalAlignment,
          controls: ["top", "center", "bottom", "stretch"]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(import_block_editor34.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
        ColumnInspectorControls,
        {
          width,
          setAttributes
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime190.jsx)("div", { ...innerBlocksProps })
    ] });
  }
  var edit_default4 = ColumnEdit;

  // packages/block-library/build-module/column/block.json
  var block_default16 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/column",
    title: "Column",
    category: "design",
    parent: ["core/columns"],
    description: "A single column within a columns block.",
    textdomain: "default",
    attributes: {
      verticalAlignment: {
        type: "string"
      },
      width: {
        type: "string"
      },
      templateLock: {
        type: ["string", "boolean"],
        enum: ["all", "insert", "contentOnly", false]
      }
    },
    supports: {
      __experimentalOnEnter: true,
      anchor: true,
      reusable: false,
      html: false,
      color: {
        gradients: true,
        heading: true,
        button: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      shadow: true,
      spacing: {
        blockGap: true,
        padding: true,
        __experimentalDefaultControls: {
          padding: true,
          blockGap: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      layout: true,
      interactivity: {
        clientNavigation: true
      },
      allowedBlocks: true
    }
  };

  // packages/block-library/build-module/column/save.mjs
  var import_block_editor35 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime191 = __toESM(require_jsx_runtime(), 1);
  function save10({ attributes: attributes2 }) {
    const { verticalAlignment, width } = attributes2;
    const wrapperClasses = clsx_default({
      [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment
    });
    let style2;
    if (width && /\d/.test(width)) {
      let flexBasis = Number.isFinite(width) ? width + "%" : width;
      if (!Number.isFinite(width) && width?.endsWith("%")) {
        const multiplier = 1e12;
        flexBasis = Math.round(Number.parseFloat(width) * multiplier) / multiplier + "%";
      }
      style2 = { flexBasis };
    }
    const blockProps = import_block_editor35.useBlockProps.save({
      className: wrapperClasses,
      style: style2
    });
    const innerBlocksProps = import_block_editor35.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("div", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/column/index.mjs
  var { name: name15 } = block_default16;
  var settings15 = {
    icon: column_default,
    edit: edit_default4,
    save: save10,
    deprecated: deprecated_default5
  };
  var init15 = () => initBlock({ name: name15, metadata: block_default16, settings: settings15 });

  // packages/block-library/build-module/columns/index.mjs
  var columns_exports = {};
  __export(columns_exports, {
    init: () => init16,
    metadata: () => block_default17,
    name: () => name16,
    settings: () => settings16
  });
  var import_i18n27 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/columns/deprecated.mjs
  var import_blocks17 = __toESM(require_blocks(), 1);
  var import_block_editor36 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime192 = __toESM(require_jsx_runtime(), 1);
  function getDeprecatedLayoutColumn(originalContent) {
    let { doc } = getDeprecatedLayoutColumn;
    if (!doc) {
      doc = document.implementation.createHTMLDocument("");
      getDeprecatedLayoutColumn.doc = doc;
    }
    let columnMatch;
    doc.body.innerHTML = originalContent;
    for (const classListItem of doc.body.firstChild.classList) {
      if (columnMatch = classListItem.match(/^layout-column-(\d+)$/)) {
        return Number(columnMatch[1]) - 1;
      }
    }
  }
  var migrateCustomColors = (attributes2) => {
    if (!attributes2.customTextColor && !attributes2.customBackgroundColor) {
      return attributes2;
    }
    const style2 = { color: {} };
    if (attributes2.customTextColor) {
      style2.color.text = attributes2.customTextColor;
    }
    if (attributes2.customBackgroundColor) {
      style2.color.background = attributes2.customBackgroundColor;
    }
    const { customTextColor, customBackgroundColor, ...restAttributes } = attributes2;
    return {
      ...restAttributes,
      style: style2,
      isStackedOnMobile: true
    };
  };
  var deprecated_default6 = [
    {
      attributes: {
        verticalAlignment: {
          type: "string"
        },
        backgroundColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        },
        customTextColor: {
          type: "string"
        },
        textColor: {
          type: "string"
        }
      },
      migrate: migrateCustomColors,
      save({ attributes: attributes2 }) {
        const {
          verticalAlignment,
          backgroundColor,
          customBackgroundColor,
          textColor,
          customTextColor
        } = attributes2;
        const backgroundClass = (0, import_block_editor36.getColorClassName)(
          "background-color",
          backgroundColor
        );
        const textClass = (0, import_block_editor36.getColorClassName)("color", textColor);
        const className = clsx_default({
          "has-background": backgroundColor || customBackgroundColor,
          "has-text-color": textColor || customTextColor,
          [backgroundClass]: backgroundClass,
          [textClass]: textClass,
          [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment
        });
        const style2 = {
          backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
          color: textClass ? void 0 : customTextColor
        };
        return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
          "div",
          {
            className: className ? className : void 0,
            style: style2,
            children: /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(import_block_editor36.InnerBlocks.Content, {})
          }
        );
      }
    },
    {
      attributes: {
        columns: {
          type: "number",
          default: 2
        }
      },
      isEligible(attributes2, innerBlocks) {
        const isFastPassEligible = innerBlocks.some(
          (innerBlock) => /layout-column-\d+/.test(innerBlock.originalContent)
        );
        if (!isFastPassEligible) {
          return false;
        }
        return innerBlocks.some(
          (innerBlock) => getDeprecatedLayoutColumn(innerBlock.originalContent) !== void 0
        );
      },
      migrate(attributes2, innerBlocks) {
        const columns = innerBlocks.reduce((accumulator, innerBlock) => {
          const { originalContent } = innerBlock;
          let columnIndex = getDeprecatedLayoutColumn(originalContent);
          if (columnIndex === void 0) {
            columnIndex = 0;
          }
          if (!accumulator[columnIndex]) {
            accumulator[columnIndex] = [];
          }
          accumulator[columnIndex].push(innerBlock);
          return accumulator;
        }, []);
        const migratedInnerBlocks = columns.map(
          (columnBlocks) => (0, import_blocks17.createBlock)("core/column", {}, columnBlocks)
        );
        const { columns: ignoredColumns, ...restAttributes } = attributes2;
        return [
          {
            ...restAttributes,
            isStackedOnMobile: true
          },
          migratedInnerBlocks
        ];
      },
      save({ attributes: attributes2 }) {
        const { columns } = attributes2;
        return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)("div", { className: `has-${columns}-columns`, children: /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(import_block_editor36.InnerBlocks.Content, {}) });
      }
    },
    {
      attributes: {
        columns: {
          type: "number",
          default: 2
        }
      },
      migrate(attributes2, innerBlocks) {
        const { columns, ...restAttributes } = attributes2;
        attributes2 = {
          ...restAttributes,
          isStackedOnMobile: true
        };
        return [attributes2, innerBlocks];
      },
      save({ attributes: attributes2 }) {
        const { verticalAlignment, columns } = attributes2;
        const wrapperClasses = clsx_default(`has-${columns}-columns`, {
          [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment
        });
        return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)("div", { className: wrapperClasses, children: /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(import_block_editor36.InnerBlocks.Content, {}) });
      }
    }
  ];

  // packages/block-library/build-module/columns/edit.mjs
  var import_i18n25 = __toESM(require_i18n(), 1);
  var import_components17 = __toESM(require_components(), 1);
  var import_block_editor37 = __toESM(require_block_editor(), 1);
  var import_data19 = __toESM(require_data(), 1);
  var import_blocks18 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/columns/utils.mjs
  var toWidthPrecision = (value) => {
    const unitlessValue = parseFloat(value);
    return Number.isFinite(unitlessValue) ? parseFloat(unitlessValue.toFixed(2)) : void 0;
  };
  function getEffectiveColumnWidth(block, totalBlockCount) {
    const { width = 100 / totalBlockCount } = block.attributes;
    return toWidthPrecision(width);
  }
  function getTotalColumnsWidth(blocks, totalBlockCount = blocks.length) {
    return blocks.reduce(
      (sum, block) => sum + getEffectiveColumnWidth(block, totalBlockCount),
      0
    );
  }
  function getColumnWidths(blocks, totalBlockCount = blocks.length) {
    return blocks.reduce((accumulator, block) => {
      const width = getEffectiveColumnWidth(block, totalBlockCount);
      return Object.assign(accumulator, { [block.clientId]: width });
    }, {});
  }
  function getRedistributedColumnWidths(blocks, availableWidth, totalBlockCount = blocks.length) {
    const totalWidth = getTotalColumnsWidth(blocks, totalBlockCount);
    return Object.fromEntries(
      Object.entries(getColumnWidths(blocks, totalBlockCount)).map(
        ([clientId, width]) => {
          const newWidth = availableWidth * width / totalWidth;
          return [clientId, toWidthPrecision(newWidth)];
        }
      )
    );
  }
  function hasExplicitPercentColumnWidths(blocks) {
    return blocks.every((block) => {
      const blockWidth = block.attributes.width;
      return Number.isFinite(
        blockWidth?.endsWith?.("%") ? parseFloat(blockWidth) : blockWidth
      );
    });
  }
  function getMappedColumnWidths(blocks, widths) {
    return blocks.map((block) => ({
      ...block,
      attributes: {
        ...block.attributes,
        width: `${widths[block.clientId]}%`
      }
    }));
  }

  // packages/block-library/build-module/columns/edit.mjs
  var import_jsx_runtime193 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_BLOCK2 = {
    name: "core/column"
  };
  function ColumnInspectorControls2({
    clientId,
    setAttributes,
    isStackedOnMobile
  }) {
    const { count, canInsertColumnBlock, minCount } = (0, import_data19.useSelect)(
      (select9) => {
        const { canInsertBlockType, canRemoveBlock, getBlockOrder } = select9(import_block_editor37.store);
        const blockOrder = getBlockOrder(clientId);
        const preventRemovalBlockIndexes = blockOrder.reduce(
          (acc, blockId, index) => {
            if (!canRemoveBlock(blockId)) {
              acc.push(index);
            }
            return acc;
          },
          []
        );
        return {
          count: blockOrder.length,
          canInsertColumnBlock: canInsertBlockType(
            "core/column",
            clientId
          ),
          minCount: Math.max(...preventRemovalBlockIndexes) + 1
        };
      },
      [clientId]
    );
    const { getBlocks } = (0, import_data19.useSelect)(import_block_editor37.store);
    const { replaceInnerBlocks } = (0, import_data19.useDispatch)(import_block_editor37.store);
    function updateColumns(previousColumns, newColumns) {
      let innerBlocks = getBlocks(clientId);
      const hasExplicitWidths = hasExplicitPercentColumnWidths(innerBlocks);
      const isAddingColumn = newColumns > previousColumns;
      if (isAddingColumn && hasExplicitWidths) {
        const newColumnWidth = toWidthPrecision(100 / newColumns);
        const newlyAddedColumns = newColumns - previousColumns;
        const widths = getRedistributedColumnWidths(
          innerBlocks,
          100 - newColumnWidth * newlyAddedColumns
        );
        innerBlocks = [
          ...getMappedColumnWidths(innerBlocks, widths),
          ...Array.from({
            length: newlyAddedColumns
          }).map(() => {
            return (0, import_blocks18.createBlock)("core/column", {
              width: `${newColumnWidth}%`
            });
          })
        ];
      } else if (isAddingColumn) {
        innerBlocks = [
          ...innerBlocks,
          ...Array.from({
            length: newColumns - previousColumns
          }).map(() => {
            return (0, import_blocks18.createBlock)("core/column");
          })
        ];
      } else if (newColumns < previousColumns) {
        innerBlocks = innerBlocks.slice(
          0,
          -(previousColumns - newColumns)
        );
        if (hasExplicitWidths) {
          const widths = getRedistributedColumnWidths(innerBlocks, 100);
          innerBlocks = getMappedColumnWidths(innerBlocks, widths);
        }
      }
      replaceInnerBlocks(clientId, innerBlocks);
    }
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(
      import_components17.__experimentalToolsPanel,
      {
        label: (0, import_i18n25.__)("Settings"),
        resetAll: () => {
          setAttributes({
            isStackedOnMobile: true
          });
        },
        dropdownMenuProps,
        children: [
          canInsertColumnBlock && /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(import_components17.__experimentalVStack, { spacing: 4, style: { gridColumn: "1 / -1" }, children: [
            /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
              import_components17.RangeControl,
              {
                __next40pxDefaultSize: true,
                label: (0, import_i18n25.__)("Columns"),
                value: count,
                onChange: (value) => updateColumns(count, Math.max(minCount, value)),
                min: Math.max(1, minCount),
                max: Math.max(6, count)
              }
            ),
            count > 6 && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(import_components17.Notice, { status: "warning", isDismissible: false, children: (0, import_i18n25.__)(
              "This column count exceeds the recommended amount and may cause visual breakage."
            ) })
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
            import_components17.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n25.__)("Stack on mobile"),
              isShownByDefault: true,
              hasValue: () => isStackedOnMobile !== true,
              onDeselect: () => setAttributes({
                isStackedOnMobile: true
              }),
              children: /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
                import_components17.ToggleControl,
                {
                  label: (0, import_i18n25.__)("Stack on mobile"),
                  checked: isStackedOnMobile,
                  onChange: () => setAttributes({
                    isStackedOnMobile: !isStackedOnMobile
                  })
                }
              )
            }
          )
        ]
      }
    );
  }
  function ColumnsEditContainer({ attributes: attributes2, setAttributes, clientId }) {
    const { isStackedOnMobile, verticalAlignment, templateLock } = attributes2;
    const registry = (0, import_data19.useRegistry)();
    const { getBlockOrder } = (0, import_data19.useSelect)(import_block_editor37.store);
    const { updateBlockAttributes } = (0, import_data19.useDispatch)(import_block_editor37.store);
    const classes = clsx_default({
      [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
      [`is-not-stacked-on-mobile`]: !isStackedOnMobile
    });
    const blockProps = (0, import_block_editor37.useBlockProps)({
      className: classes
    });
    const innerBlocksProps = (0, import_block_editor37.useInnerBlocksProps)(blockProps, {
      defaultBlock: DEFAULT_BLOCK2,
      directInsert: true,
      orientation: "horizontal",
      renderAppender: false,
      templateLock
    });
    function updateAlignment(newVerticalAlignment) {
      const innerBlockClientIds = getBlockOrder(clientId);
      registry.batch(() => {
        setAttributes({ verticalAlignment: newVerticalAlignment });
        updateBlockAttributes(innerBlockClientIds, {
          verticalAlignment: newVerticalAlignment
        });
      });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(import_jsx_runtime193.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(import_block_editor37.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
        import_block_editor37.BlockVerticalAlignmentToolbar,
        {
          onChange: updateAlignment,
          value: verticalAlignment
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(import_block_editor37.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
        ColumnInspectorControls2,
        {
          clientId,
          setAttributes,
          isStackedOnMobile
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime193.jsx)("div", { ...innerBlocksProps })
    ] });
  }
  function Placeholder4({ clientId, name: name123, setAttributes }) {
    const { blockType, defaultVariation, variations: variations18 } = (0, import_data19.useSelect)(
      (select9) => {
        const {
          getBlockVariations: getBlockVariations3,
          getBlockType: getBlockType5,
          getDefaultBlockVariation
        } = select9(import_blocks18.store);
        return {
          blockType: getBlockType5(name123),
          defaultVariation: getDefaultBlockVariation(name123, "block"),
          variations: getBlockVariations3(name123, "block")
        };
      },
      [name123]
    );
    const { replaceInnerBlocks } = (0, import_data19.useDispatch)(import_block_editor37.store);
    const blockProps = (0, import_block_editor37.useBlockProps)();
    return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
      import_block_editor37.__experimentalBlockVariationPicker,
      {
        icon: blockType?.icon?.src,
        label: blockType?.title,
        variations: variations18,
        instructions: (0, import_i18n25.__)("Divide into columns. Select a layout:"),
        onSelect: (nextVariation = defaultVariation) => {
          if (nextVariation.attributes) {
            setAttributes(nextVariation.attributes);
          }
          if (nextVariation.innerBlocks) {
            replaceInnerBlocks(
              clientId,
              (0, import_blocks18.createBlocksFromInnerBlocksTemplate)(
                nextVariation.innerBlocks
              ),
              true
            );
          }
        },
        allowSkip: true
      }
    ) });
  }
  var ColumnsEdit = (props) => {
    const { clientId } = props;
    const hasInnerBlocks = (0, import_data19.useSelect)(
      (select9) => select9(import_block_editor37.store).getBlocks(clientId).length > 0,
      [clientId]
    );
    const Component = hasInnerBlocks ? ColumnsEditContainer : Placeholder4;
    return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(Component, { ...props });
  };
  var edit_default5 = ColumnsEdit;

  // packages/block-library/build-module/columns/block.json
  var block_default17 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/columns",
    title: "Columns",
    category: "design",
    allowedBlocks: ["core/column"],
    description: "Display content in multiple columns, with blocks added to each column.",
    textdomain: "default",
    attributes: {
      verticalAlignment: {
        type: "string"
      },
      isStackedOnMobile: {
        type: "boolean",
        default: true
      },
      templateLock: {
        type: ["string", "boolean"],
        enum: ["all", "insert", "contentOnly", false]
      }
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true,
        link: true,
        heading: true,
        button: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        blockGap: {
          __experimentalDefault: "2em",
          sides: ["horizontal", "vertical"]
        },
        margin: ["top", "bottom"],
        padding: true,
        __experimentalDefaultControls: {
          padding: true,
          blockGap: true
        }
      },
      layout: {
        allowSwitching: false,
        allowInheriting: false,
        allowEditing: false,
        default: {
          type: "flex",
          flexWrap: "nowrap"
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      shadow: true
    },
    editorStyle: "wp-block-columns-editor",
    style: "wp-block-columns"
  };

  // packages/block-library/build-module/columns/save.mjs
  var import_block_editor38 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime194 = __toESM(require_jsx_runtime(), 1);
  function save11({ attributes: attributes2 }) {
    const { isStackedOnMobile, verticalAlignment } = attributes2;
    const className = clsx_default({
      [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
      [`is-not-stacked-on-mobile`]: !isStackedOnMobile
    });
    const blockProps = import_block_editor38.useBlockProps.save({ className });
    const innerBlocksProps = import_block_editor38.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime194.jsx)("div", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/columns/variations.mjs
  var import_components18 = __toESM(require_components(), 1);
  var import_i18n26 = __toESM(require_i18n(), 1);
  var import_jsx_runtime195 = __toESM(require_jsx_runtime(), 1);
  var variations2 = [
    {
      name: "one-column-full",
      title: (0, import_i18n26.__)("100"),
      description: (0, import_i18n26.__)("One column"),
      icon: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
        import_components18.SVG,
        {
          xmlns: "http://www.w3.org/2000/svg",
          width: "48",
          height: "48",
          viewBox: "0 0 48 48",
          children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(import_components18.Path, { d: "M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Z" })
        }
      ),
      innerBlocks: [["core/column"]],
      scope: ["block"]
    },
    {
      name: "two-columns-equal",
      title: (0, import_i18n26.__)("50 / 50"),
      description: (0, import_i18n26.__)("Two columns; equal split"),
      icon: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
        import_components18.SVG,
        {
          xmlns: "http://www.w3.org/2000/svg",
          width: "48",
          height: "48",
          viewBox: "0 0 48 48",
          children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(import_components18.Path, { d: "M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10Z" })
        }
      ),
      isDefault: true,
      innerBlocks: [["core/column"], ["core/column"]],
      scope: ["block"]
    },
    {
      name: "two-columns-one-third-two-thirds",
      title: (0, import_i18n26.__)("33 / 66"),
      description: (0, import_i18n26.__)("Two columns; one-third, two-thirds split"),
      icon: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
        import_components18.SVG,
        {
          xmlns: "http://www.w3.org/2000/svg",
          width: "48",
          height: "48",
          viewBox: "0 0 48 48",
          children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(import_components18.Path, { d: "M0 10a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm17 0a2 2 0 0 1 2-2h27a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H19a2 2 0 0 1-2-2V10Z" })
        }
      ),
      innerBlocks: [
        ["core/column", { width: "33.33%" }],
        ["core/column", { width: "66.66%" }]
      ],
      scope: ["block"]
    },
    {
      name: "two-columns-two-thirds-one-third",
      title: (0, import_i18n26.__)("66 / 33"),
      description: (0, import_i18n26.__)("Two columns; two-thirds, one-third split"),
      icon: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
        import_components18.SVG,
        {
          xmlns: "http://www.w3.org/2000/svg",
          width: "48",
          height: "48",
          viewBox: "0 0 48 48",
          children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(import_components18.Path, { d: "M0 10a2 2 0 0 1 2-2h27a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm33 0a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H35a2 2 0 0 1-2-2V10Z" })
        }
      ),
      innerBlocks: [
        ["core/column", { width: "66.66%" }],
        ["core/column", { width: "33.33%" }]
      ],
      scope: ["block"]
    },
    {
      name: "three-columns-equal",
      title: (0, import_i18n26.__)("33 / 33 / 33"),
      description: (0, import_i18n26.__)("Three columns; equal split"),
      icon: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
        import_components18.SVG,
        {
          xmlns: "http://www.w3.org/2000/svg",
          width: "48",
          height: "48",
          viewBox: "0 0 48 48",
          children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(import_components18.Path, { d: "M0 10a2 2 0 0 1 2-2h10.531c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H2a2 2 0 0 1-2-2V10Zm16.5 0c0-1.105.864-2 1.969-2H29.53c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H18.47c-1.105 0-1.969-.895-1.969-2V10Zm17 0c0-1.105.864-2 1.969-2H46a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H35.469c-1.105 0-1.969-.895-1.969-2V10Z" })
        }
      ),
      innerBlocks: [
        ["core/column"],
        ["core/column"],
        ["core/column"]
      ],
      scope: ["block"]
    },
    {
      name: "three-columns-wider-center",
      title: (0, import_i18n26.__)("25 / 50 / 25"),
      description: (0, import_i18n26.__)("Three columns; wide center column"),
      icon: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
        import_components18.SVG,
        {
          xmlns: "http://www.w3.org/2000/svg",
          width: "48",
          height: "48",
          viewBox: "0 0 48 48",
          children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(import_components18.Path, { d: "M0 10a2 2 0 0 1 2-2h7.531c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H2a2 2 0 0 1-2-2V10Zm13.5 0c0-1.105.864-2 1.969-2H32.53c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H15.47c-1.105 0-1.969-.895-1.969-2V10Zm23 0c0-1.105.864-2 1.969-2H46a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2h-7.531c-1.105 0-1.969-.895-1.969-2V10Z" })
        }
      ),
      innerBlocks: [
        ["core/column", { width: "25%" }],
        ["core/column", { width: "50%" }],
        ["core/column", { width: "25%" }]
      ],
      scope: ["block"]
    }
  ];
  var variations_default2 = variations2;

  // packages/block-library/build-module/columns/transforms.mjs
  var import_blocks19 = __toESM(require_blocks(), 1);
  var MAXIMUM_SELECTED_BLOCKS = 6;
  var transforms5 = {
    from: [
      {
        type: "block",
        isMultiBlock: true,
        blocks: ["*"],
        __experimentalConvert: (blocks) => {
          const columnWidth = +(100 / blocks.length).toFixed(2);
          const innerBlocksTemplate = blocks.map(
            ({ name: name123, attributes: attributes2, innerBlocks }) => [
              "core/column",
              { width: `${columnWidth}%` },
              [[name123, { ...attributes2 }, innerBlocks]]
            ]
          );
          return (0, import_blocks19.createBlock)(
            "core/columns",
            {},
            (0, import_blocks19.createBlocksFromInnerBlocksTemplate)(innerBlocksTemplate)
          );
        },
        isMatch: ({ length: selectedBlocksLength }, blocks) => {
          if (blocks.length === 1 && blocks[0].name === "core/columns") {
            return false;
          }
          return selectedBlocksLength && selectedBlocksLength <= MAXIMUM_SELECTED_BLOCKS;
        }
      },
      {
        type: "block",
        blocks: ["core/media-text"],
        priority: 1,
        transform: (attributes2, innerBlocks) => {
          const {
            align,
            backgroundColor,
            textColor,
            style: style2,
            mediaAlt: alt,
            mediaId: id,
            mediaPosition: mediaPosition3,
            mediaSizeSlug: sizeSlug,
            mediaType,
            mediaUrl: url,
            mediaWidth,
            verticalAlignment
          } = attributes2;
          let media;
          if (mediaType === "image" || !mediaType) {
            const imageAttrs = { id, alt, url, sizeSlug };
            const linkAttrs = {
              href: attributes2.href,
              linkClass: attributes2.linkClass,
              linkDestination: attributes2.linkDestination,
              linkTarget: attributes2.linkTarget,
              rel: attributes2.rel
            };
            media = ["core/image", { ...imageAttrs, ...linkAttrs }];
          } else {
            media = ["core/video", { id, src: url }];
          }
          const innerBlocksTemplate = [
            ["core/column", { width: `${mediaWidth}%` }, [media]],
            [
              "core/column",
              { width: `${100 - mediaWidth}%` },
              innerBlocks
            ]
          ];
          if (mediaPosition3 === "right") {
            innerBlocksTemplate.reverse();
          }
          return (0, import_blocks19.createBlock)(
            "core/columns",
            {
              align,
              backgroundColor,
              textColor,
              style: style2,
              verticalAlignment
            },
            (0, import_blocks19.createBlocksFromInnerBlocksTemplate)(innerBlocksTemplate)
          );
        }
      }
    ],
    ungroup: (attributes2, innerBlocks) => innerBlocks.flatMap((innerBlock) => innerBlock.innerBlocks)
  };
  var transforms_default5 = transforms5;

  // packages/block-library/build-module/columns/index.mjs
  var { name: name16 } = block_default17;
  var settings16 = {
    icon: columns_default,
    variations: variations_default2,
    example: {
      viewportWidth: 782,
      // Columns collapse "@media (max-width: 781px)".
      innerBlocks: [
        {
          name: "core/column",
          innerBlocks: [
            {
              name: "core/paragraph",
              attributes: {
                /* translators: example text. */
                content: (0, import_i18n27.__)(
                  "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis."
                )
              }
            },
            {
              name: "core/image",
              attributes: {
                url: "https://s.w.org/images/core/5.3/Windbuchencom.jpg"
              }
            },
            {
              name: "core/paragraph",
              attributes: {
                /* translators: example text. */
                content: (0, import_i18n27.__)(
                  "Suspendisse commodo neque lacus, a dictum orci interdum et."
                )
              }
            }
          ]
        },
        {
          name: "core/column",
          innerBlocks: [
            {
              name: "core/paragraph",
              attributes: {
                /* translators: example text. */
                content: (0, import_i18n27.__)(
                  "Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit."
                )
              }
            },
            {
              name: "core/paragraph",
              attributes: {
                /* translators: example text. */
                content: (0, import_i18n27.__)(
                  "Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim."
                )
              }
            }
          ]
        }
      ]
    },
    deprecated: deprecated_default6,
    edit: edit_default5,
    save: save11,
    transforms: transforms_default5
  };
  var init16 = () => initBlock({ name: name16, metadata: block_default17, settings: settings16 });

  // packages/block-library/build-module/comments/index.mjs
  var comments_exports = {};
  __export(comments_exports, {
    init: () => init17,
    metadata: () => block_default18,
    name: () => name17,
    settings: () => settings17
  });

  // packages/block-library/build-module/comments/block.json
  var block_default18 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/comments",
    title: "Comments",
    category: "theme",
    description: "An advanced block that allows displaying post comments using different visual configurations.",
    textdomain: "default",
    attributes: {
      tagName: {
        type: "string",
        default: "div"
      },
      legacy: {
        type: "boolean",
        default: false
      }
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true,
        heading: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    editorStyle: "wp-block-comments-editor",
    usesContext: ["postId", "postType"]
  };

  // packages/block-library/build-module/comments/deprecated.mjs
  var import_block_editor39 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime196 = __toESM(require_jsx_runtime(), 1);
  var v14 = {
    attributes: {
      tagName: {
        type: "string",
        default: "div"
      }
    },
    apiVersion: 3,
    supports: {
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      }
    },
    save({ attributes: { tagName: Tag } }) {
      const blockProps = import_block_editor39.useBlockProps.save();
      const { className } = blockProps;
      const classes = className?.split(" ") || [];
      const newClasses = classes?.filter(
        (cls) => cls !== "wp-block-comments"
      );
      const newBlockProps = {
        ...blockProps,
        className: newClasses.join(" ")
      };
      return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(Tag, { ...newBlockProps, children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(import_block_editor39.InnerBlocks.Content, {}) });
    }
  };
  var deprecated_default7 = [v14];

  // packages/block-library/build-module/comments/edit/index.mjs
  var import_block_editor44 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/comments/edit/comments-inspector-controls.mjs
  var import_i18n28 = __toESM(require_i18n(), 1);
  var import_block_editor40 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime197 = __toESM(require_jsx_runtime(), 1);
  var { HTMLElementControl: HTMLElementControl2 } = unlock(import_block_editor40.privateApis);
  function CommentsInspectorControls({
    attributes: { tagName },
    setAttributes
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(import_block_editor40.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(import_block_editor40.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
      HTMLElementControl2,
      {
        tagName,
        onChange: (value) => setAttributes({ tagName: value }),
        options: [
          { label: (0, import_i18n28.__)("Default (<div>)"), value: "div" },
          { label: "<section>", value: "section" },
          { label: "<aside>", value: "aside" }
        ]
      }
    ) }) });
  }

  // packages/block-library/build-module/comments/edit/comments-legacy.mjs
  var import_block_editor43 = __toESM(require_block_editor(), 1);
  var import_i18n31 = __toESM(require_i18n(), 1);
  var import_components20 = __toESM(require_components(), 1);

  // packages/block-library/build-module/comments/edit/placeholder.mjs
  var import_block_editor42 = __toESM(require_block_editor(), 1);
  var import_i18n30 = __toESM(require_i18n(), 1);
  var import_data21 = __toESM(require_data(), 1);
  var import_core_data8 = __toESM(require_core_data(), 1);
  var import_element14 = __toESM(require_element(), 1);

  // packages/block-library/build-module/post-comments-form/form.mjs
  var import_i18n29 = __toESM(require_i18n(), 1);
  var import_block_editor41 = __toESM(require_block_editor(), 1);
  var import_components19 = __toESM(require_components(), 1);
  var import_compose13 = __toESM(require_compose(), 1);
  var import_core_data7 = __toESM(require_core_data(), 1);
  var import_data20 = __toESM(require_data(), 1);
  var import_jsx_runtime198 = __toESM(require_jsx_runtime(), 1);
  var CommentsFormPlaceholder = () => {
    const instanceId = (0, import_compose13.useInstanceId)(CommentsFormPlaceholder);
    return /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)("div", { className: "comment-respond", children: [
      /* @__PURE__ */ (0, import_jsx_runtime198.jsx)("h3", { className: "comment-reply-title", children: (0, import_i18n29.__)("Leave a Reply") }),
      /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(
        "form",
        {
          noValidate: true,
          className: "comment-form",
          onSubmit: (event) => event.preventDefault(),
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)("p", { children: [
              /* @__PURE__ */ (0, import_jsx_runtime198.jsx)("label", { htmlFor: `comment-${instanceId}`, children: (0, import_i18n29.__)("Comment") }),
              /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
                "textarea",
                {
                  id: `comment-${instanceId}`,
                  name: "comment",
                  cols: "45",
                  rows: "8",
                  readOnly: true
                }
              )
            ] }),
            /* @__PURE__ */ (0, import_jsx_runtime198.jsx)("p", { className: "form-submit wp-block-button", children: /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
              "input",
              {
                name: "submit",
                type: "submit",
                className: clsx_default(
                  "wp-block-button__link",
                  (0, import_block_editor41.__experimentalGetElementClassName)("button")
                ),
                label: (0, import_i18n29.__)("Post Comment"),
                value: (0, import_i18n29.__)("Post Comment"),
                "aria-disabled": "true"
              }
            ) })
          ]
        }
      )
    ] });
  };
  var CommentsForm = ({ postId, postType }) => {
    const [commentStatus, setCommentStatus] = (0, import_core_data7.useEntityProp)(
      "postType",
      postType,
      "comment_status",
      postId
    );
    const isSiteEditor = postType === void 0 || postId === void 0;
    const defaultCommentStatus = (0, import_data20.useSelect)(
      (select9) => select9(import_block_editor41.store).getSettings().__experimentalDiscussionSettings?.defaultCommentStatus,
      []
    );
    const postTypeSupportsComments = (0, import_data20.useSelect)(
      (select9) => postType ? !!select9(import_core_data7.store).getPostType(postType)?.supports.comments : false
    );
    if (!isSiteEditor && "open" !== commentStatus) {
      if ("closed" === commentStatus) {
        const actions = [
          /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
            import_components19.Button,
            {
              __next40pxDefaultSize: true,
              onClick: () => setCommentStatus("open"),
              variant: "primary",
              children: (0, import_i18n29._x)(
                "Enable comments",
                "action that affects the current post"
              )
            },
            "enableComments"
          )
        ];
        return /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(import_block_editor41.Warning, { actions, children: (0, import_i18n29.__)(
          "Post Comments Form block: Comments are not enabled for this item."
        ) });
      } else if (!postTypeSupportsComments) {
        return /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(import_block_editor41.Warning, { children: (0, import_i18n29.sprintf)(
          /* translators: %s: Post type (i.e. "post", "page") */
          (0, import_i18n29.__)(
            "Post Comments Form block: Comments are not enabled for this post type (%s)."
          ),
          postType
        ) });
      } else if ("open" !== defaultCommentStatus) {
        return /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(import_block_editor41.Warning, { children: (0, import_i18n29.__)(
          "Post Comments Form block: Comments are not enabled."
        ) });
      }
    }
    return /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(CommentsFormPlaceholder, {});
  };
  var form_default = CommentsForm;

  // packages/block-library/build-module/comments/edit/placeholder.mjs
  var import_jsx_runtime199 = __toESM(require_jsx_runtime(), 1);
  function PostCommentsPlaceholder({ postType, postId }) {
    let [postTitle] = (0, import_core_data8.useEntityProp)("postType", postType, "title", postId);
    postTitle = postTitle || (0, import_i18n30.__)("Post Title");
    const avatarURL = (0, import_data21.useSelect)(
      (select9) => select9(import_block_editor42.store).getSettings().__experimentalDiscussionSettings?.avatarURL,
      []
    );
    return /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)("div", { className: "wp-block-comments__legacy-placeholder", inert: "true", children: [
      /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("h3", {
        /* translators: %s: Post title. */
        children: (0, import_i18n30.sprintf)((0, import_i18n30.__)("One response to %s"), postTitle)
      }),
      /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)("div", { className: "navigation", children: [
        /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("div", { className: "alignleft", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)("a", { href: "#top", children: [
          "\xAB ",
          (0, import_i18n30.__)("Older Comments")
        ] }) }),
        /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("div", { className: "alignright", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)("a", { href: "#top", children: [
          (0, import_i18n30.__)("Newer Comments"),
          " \xBB"
        ] }) })
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("ol", { className: "commentlist", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("li", { className: "comment even thread-even depth-1", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)("article", { className: "comment-body", children: [
        /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)("footer", { className: "comment-meta", children: [
          /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)("div", { className: "comment-author vcard", children: [
            /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
              "img",
              {
                alt: (0, import_i18n30.__)("Commenter Avatar"),
                src: avatarURL,
                className: "avatar avatar-32 photo",
                height: "32",
                width: "32",
                loading: "lazy"
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("b", { className: "fn", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("a", { href: "#top", className: "url", children: (0, import_i18n30.__)("A WordPress Commenter") }) }),
            " ",
            /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)("span", { className: "says", children: [
              (0, import_i18n30.__)("says"),
              ":"
            ] })
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)("div", { className: "comment-metadata", children: [
            /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("a", { href: "#top", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("time", { dateTime: "2000-01-01T00:00:00+00:00", children: (0, import_i18n30.__)("January 1, 2000 at 00:00 am") }) }),
            " ",
            /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("span", { className: "edit-link", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
              "a",
              {
                className: "comment-edit-link",
                href: "#top",
                children: (0, import_i18n30.__)("Edit")
              }
            ) })
          ] })
        ] }),
        /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("div", { className: "comment-content", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)("p", { children: [
          (0, import_i18n30.__)("Hi, this is a comment."),
          /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("br", {}),
          (0, import_i18n30.__)(
            "To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard."
          ),
          /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("br", {}),
          (0, import_element14.createInterpolateElement)(
            (0, import_i18n30.__)(
              "Commenter avatars come from <a>Gravatar</a>."
            ),
            {
              a: (
                // eslint-disable-next-line jsx-a11y/anchor-has-content
                /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("a", { href: "https://gravatar.com/" })
              )
            }
          )
        ] }) }),
        /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("div", { className: "reply", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
          "a",
          {
            className: "comment-reply-link",
            href: "#top",
            "aria-label": (0, import_i18n30.__)(
              "Reply to A WordPress Commenter"
            ),
            /* translators: Comment reply button text. */
            children: (0, import_i18n30._x)("Reply", "verb")
          }
        ) })
      ] }) }) }),
      /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)("div", { className: "navigation", children: [
        /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("div", { className: "alignleft", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)("a", { href: "#top", children: [
          "\xAB ",
          (0, import_i18n30.__)("Older Comments")
        ] }) }),
        /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("div", { className: "alignright", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)("a", { href: "#top", children: [
          (0, import_i18n30.__)("Newer Comments"),
          " \xBB"
        ] }) })
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(form_default, { postId, postType })
    ] });
  }

  // packages/block-library/build-module/comments/edit/comments-legacy.mjs
  var import_jsx_runtime200 = __toESM(require_jsx_runtime(), 1);
  function CommentsLegacy({
    attributes: attributes2,
    setAttributes,
    context: { postType, postId }
  }) {
    const { textAlign } = attributes2;
    const actions = [
      /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
        import_components20.Button,
        {
          __next40pxDefaultSize: true,
          onClick: () => void setAttributes({ legacy: false }),
          variant: "primary",
          children: (0, import_i18n31.__)("Switch to editable mode")
        },
        "convert"
      )
    ];
    const blockProps = (0, import_block_editor43.useBlockProps)({
      className: clsx_default({
        [`has-text-align-${textAlign}`]: textAlign
      })
    });
    return /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(import_jsx_runtime200.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(import_block_editor43.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
        import_block_editor43.AlignmentControl,
        {
          value: textAlign,
          onChange: (nextAlign) => {
            setAttributes({ textAlign: nextAlign });
          }
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)("div", { ...blockProps, children: [
        /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(import_block_editor43.Warning, { actions, children: (0, import_i18n31.__)(
          "Comments block: You\u2019re currently using the legacy version of the block. The following is just a placeholder - the final styling will likely look different. For a better representation and more customization options, switch the block to its editable mode."
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(PostCommentsPlaceholder, { postId, postType })
      ] })
    ] });
  }

  // packages/block-library/build-module/comments/edit/template.mjs
  var TEMPLATE2 = [
    ["core/comments-title"],
    [
      "core/comment-template",
      {},
      [
        [
          "core/columns",
          {},
          [
            [
              "core/column",
              { width: "40px" },
              [
                [
                  "core/avatar",
                  {
                    size: 40,
                    style: {
                      border: { radius: "20px" }
                    }
                  }
                ]
              ]
            ],
            [
              "core/column",
              {},
              [
                [
                  "core/comment-author-name",
                  {
                    fontSize: "small"
                  }
                ],
                [
                  "core/group",
                  {
                    layout: { type: "flex" },
                    style: {
                      spacing: {
                        margin: {
                          top: "0px",
                          bottom: "0px"
                        }
                      }
                    }
                  },
                  [
                    [
                      "core/comment-date",
                      {
                        fontSize: "small"
                      }
                    ],
                    [
                      "core/comment-edit-link",
                      {
                        fontSize: "small"
                      }
                    ]
                  ]
                ],
                ["core/comment-content"],
                [
                  "core/comment-reply-link",
                  {
                    fontSize: "small"
                  }
                ]
              ]
            ]
          ]
        ]
      ]
    ],
    ["core/comments-pagination"],
    ["core/post-comments-form"]
  ];
  var template_default = TEMPLATE2;

  // packages/block-library/build-module/comments/edit/index.mjs
  var import_jsx_runtime201 = __toESM(require_jsx_runtime(), 1);
  function CommentsEdit(props) {
    const { attributes: attributes2, setAttributes, clientId } = props;
    const { tagName: TagName2, legacy } = attributes2;
    const blockProps = (0, import_block_editor44.useBlockProps)();
    const innerBlocksProps = (0, import_block_editor44.useInnerBlocksProps)(blockProps, {
      template: template_default
    });
    if (legacy) {
      return /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(CommentsLegacy, { ...props });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime201.jsxs)(import_jsx_runtime201.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
        CommentsInspectorControls,
        {
          attributes: attributes2,
          setAttributes,
          clientId
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(TagName2, { ...innerBlocksProps })
    ] });
  }

  // packages/block-library/build-module/comments/save.mjs
  var import_block_editor45 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime202 = __toESM(require_jsx_runtime(), 1);
  function save12({ attributes: { tagName: Tag, legacy } }) {
    const blockProps = import_block_editor45.useBlockProps.save();
    const innerBlocksProps = import_block_editor45.useInnerBlocksProps.save(blockProps);
    return legacy ? null : /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(Tag, { ...innerBlocksProps });
  }

  // packages/block-library/build-module/comments/index.mjs
  var { name: name17 } = block_default18;
  var settings17 = {
    icon: post_comments_default,
    example: {},
    edit: CommentsEdit,
    save: save12,
    deprecated: deprecated_default7
  };
  var init17 = () => initBlock({ name: name17, metadata: block_default18, settings: settings17 });

  // packages/block-library/build-module/comment-author-avatar/index.mjs
  var comment_author_avatar_exports = {};
  __export(comment_author_avatar_exports, {
    init: () => init18,
    metadata: () => block_default19,
    name: () => name18,
    settings: () => settings18
  });

  // packages/block-library/build-module/comment-author-avatar/block.json
  var block_default19 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    __experimental: "fse",
    name: "core/comment-author-avatar",
    title: "Comment Author Avatar (deprecated)",
    category: "theme",
    ancestor: ["core/comment-template"],
    description: "This block is deprecated. Please use the Avatar block instead.",
    textdomain: "default",
    attributes: {
      width: {
        type: "number",
        default: 96
      },
      height: {
        type: "number",
        default: 96
      }
    },
    usesContext: ["commentId"],
    supports: {
      html: false,
      inserter: false,
      __experimentalBorder: {
        radius: true,
        width: true,
        color: true,
        style: true
      },
      color: {
        background: true,
        text: false,
        __experimentalDefaultControls: {
          background: true
        }
      },
      spacing: {
        __experimentalSkipSerialization: true,
        margin: true,
        padding: true
      },
      interactivity: {
        clientNavigation: true
      }
    }
  };

  // packages/block-library/build-module/comment-author-avatar/edit.mjs
  var import_block_editor46 = __toESM(require_block_editor(), 1);
  var import_components21 = __toESM(require_components(), 1);
  var import_core_data9 = __toESM(require_core_data(), 1);
  var import_data22 = __toESM(require_data(), 1);
  var import_i18n32 = __toESM(require_i18n(), 1);
  var import_jsx_runtime203 = __toESM(require_jsx_runtime(), 1);
  function Edit6({
    attributes: attributes2,
    context: { commentId },
    setAttributes,
    isSelected
  }) {
    const { height, width } = attributes2;
    const [avatars] = (0, import_core_data9.useEntityProp)(
      "root",
      "comment",
      "author_avatar_urls",
      commentId
    );
    const [authorName] = (0, import_core_data9.useEntityProp)(
      "root",
      "comment",
      "author_name",
      commentId
    );
    const avatarUrls = avatars ? Object.values(avatars) : null;
    const sizes = avatars ? Object.keys(avatars) : null;
    const minSize = sizes ? sizes[0] : 24;
    const maxSize = sizes ? sizes[sizes.length - 1] : 96;
    const blockProps = (0, import_block_editor46.useBlockProps)();
    const spacingProps = (0, import_block_editor46.__experimentalGetSpacingClassesAndStyles)(attributes2);
    const maxSizeBuffer = Math.floor(maxSize * 2.5);
    const avatarURL = (0, import_data22.useSelect)((select9) => {
      const { __experimentalDiscussionSettings } = select9(import_block_editor46.store).getSettings();
      return __experimentalDiscussionSettings?.avatarURL;
    }, []);
    const inspectorControls = /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(import_block_editor46.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(import_components21.PanelBody, { title: (0, import_i18n32.__)("Settings"), children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
      import_components21.RangeControl,
      {
        __next40pxDefaultSize: true,
        label: (0, import_i18n32.__)("Image size"),
        onChange: (newWidth) => setAttributes({
          width: newWidth,
          height: newWidth
        }),
        min: minSize,
        max: maxSizeBuffer,
        initialPosition: width,
        value: width
      }
    ) }) });
    const resizableAvatar = /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
      import_components21.ResizableBox,
      {
        size: {
          width,
          height
        },
        showHandle: isSelected,
        onResizeStop: (event, direction, elt, delta) => {
          setAttributes({
            height: parseInt(height + delta.height, 10),
            width: parseInt(width + delta.width, 10)
          });
        },
        lockAspectRatio: true,
        enable: {
          top: false,
          right: !(0, import_i18n32.isRTL)(),
          bottom: true,
          left: (0, import_i18n32.isRTL)()
        },
        minWidth: minSize,
        maxWidth: maxSizeBuffer,
        children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
          "img",
          {
            src: avatarUrls ? avatarUrls[avatarUrls.length - 1] : avatarURL,
            alt: `${authorName} ${(0, import_i18n32.__)("Avatar")}`,
            ...blockProps
          }
        )
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime203.jsxs)(import_jsx_runtime203.Fragment, { children: [
      inspectorControls,
      /* @__PURE__ */ (0, import_jsx_runtime203.jsx)("div", { ...spacingProps, children: resizableAvatar })
    ] });
  }

  // packages/block-library/build-module/comment-author-avatar/index.mjs
  var { name: name18 } = block_default19;
  var settings18 = {
    icon: comment_author_avatar_default,
    edit: Edit6
  };
  var init18 = () => initBlock({ name: name18, metadata: block_default19, settings: settings18 });

  // packages/block-library/build-module/comment-author-name/index.mjs
  var comment_author_name_exports = {};
  __export(comment_author_name_exports, {
    init: () => init19,
    metadata: () => block_default20,
    name: () => name19,
    settings: () => settings19
  });

  // packages/block-library/build-module/comment-author-name/block.json
  var block_default20 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/comment-author-name",
    title: "Comment Author Name",
    category: "theme",
    ancestor: ["core/comment-template"],
    description: "Displays the name of the author of the comment.",
    textdomain: "default",
    attributes: {
      isLink: {
        type: "boolean",
        default: true
      },
      linkTarget: {
        type: "string",
        default: "_self"
      }
    },
    usesContext: ["commentId"],
    supports: {
      anchor: true,
      html: false,
      spacing: {
        margin: true,
        padding: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-comment-author-name"
  };

  // packages/block-library/build-module/comment-author-name/edit.mjs
  var import_i18n33 = __toESM(require_i18n(), 1);
  var import_data23 = __toESM(require_data(), 1);
  var import_block_editor47 = __toESM(require_block_editor(), 1);
  var import_core_data10 = __toESM(require_core_data(), 1);
  var import_components22 = __toESM(require_components(), 1);
  var import_jsx_runtime204 = __toESM(require_jsx_runtime(), 1);
  function Edit7(props) {
    const {
      attributes: { isLink, linkTarget },
      context: { commentId },
      setAttributes
    } = props;
    useDeprecatedTextAlign(props);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const blockProps = (0, import_block_editor47.useBlockProps)();
    let displayName = (0, import_data23.useSelect)(
      (select9) => {
        const { getEntityRecord } = select9(import_core_data10.store);
        const comment = getEntityRecord("root", "comment", commentId);
        const authorName = comment?.author_name;
        if (comment && !authorName) {
          const user = getEntityRecord("root", "user", comment.author);
          return user?.name ?? (0, import_i18n33.__)("Anonymous");
        }
        return authorName ?? "";
      },
      [commentId]
    );
    const inspectorControls = /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(import_block_editor47.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime204.jsxs)(
      import_components22.__experimentalToolsPanel,
      {
        label: (0, import_i18n33.__)("Settings"),
        resetAll: () => {
          setAttributes({
            isLink: true,
            linkTarget: "_self"
          });
        },
        dropdownMenuProps,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
            import_components22.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n33.__)("Link to authors URL"),
              isShownByDefault: true,
              hasValue: () => !isLink,
              onDeselect: () => setAttributes({
                isLink: true
              }),
              children: /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
                import_components22.ToggleControl,
                {
                  label: (0, import_i18n33.__)("Link to authors URL"),
                  onChange: () => setAttributes({ isLink: !isLink }),
                  checked: isLink
                }
              )
            }
          ),
          isLink && /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
            import_components22.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n33.__)("Open in new tab"),
              isShownByDefault: true,
              hasValue: () => linkTarget !== "_self",
              onDeselect: () => setAttributes({
                linkTarget: "_self"
              }),
              children: /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
                import_components22.ToggleControl,
                {
                  label: (0, import_i18n33.__)("Open in new tab"),
                  onChange: (value) => setAttributes({
                    linkTarget: value ? "_blank" : "_self"
                  }),
                  checked: linkTarget === "_blank"
                }
              )
            }
          )
        ]
      }
    ) });
    if (!commentId || !displayName) {
      displayName = (0, import_i18n33._x)("Comment Author", "block title");
    }
    const displayAuthor = isLink ? /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
      "a",
      {
        href: "#comment-author-pseudo-link",
        onClick: (event) => event.preventDefault(),
        children: displayName
      }
    ) : displayName;
    return /* @__PURE__ */ (0, import_jsx_runtime204.jsxs)(import_jsx_runtime204.Fragment, { children: [
      inspectorControls,
      /* @__PURE__ */ (0, import_jsx_runtime204.jsx)("div", { ...blockProps, children: displayAuthor })
    ] });
  }

  // packages/block-library/build-module/comment-author-name/deprecated.mjs
  var v22 = {
    attributes: {
      isLink: {
        type: "boolean",
        default: true
      },
      linkTarget: {
        type: "string",
        default: "_self"
      },
      textAlign: {
        type: "string"
      }
    },
    usesContext: ["commentId"],
    supports: {
      html: false,
      spacing: {
        margin: true,
        padding: true
      },
      color: {
        gradients: true,
        link: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      }
    },
    save() {
      return null;
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    }
  };
  var v15 = {
    attributes: {
      isLink: {
        type: "boolean",
        default: false
      },
      linkTarget: {
        type: "string",
        default: "_self"
      }
    },
    supports: {
      html: false,
      color: {
        gradients: true,
        link: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalLetterSpacing: true
      }
    },
    save() {
      return null;
    },
    migrate: migrate_font_family_default,
    isEligible({ style: style2 }) {
      return style2?.typography?.fontFamily;
    }
  };
  var deprecated_default8 = [v22, v15];

  // packages/block-library/build-module/comment-author-name/index.mjs
  var { name: name19 } = block_default20;
  var settings19 = {
    icon: comment_author_name_default,
    edit: Edit7,
    deprecated: deprecated_default8,
    example: {}
  };
  var init19 = () => initBlock({ name: name19, metadata: block_default20, settings: settings19 });

  // packages/block-library/build-module/comment-content/index.mjs
  var comment_content_exports = {};
  __export(comment_content_exports, {
    init: () => init20,
    metadata: () => block_default21,
    name: () => name20,
    settings: () => settings20
  });

  // packages/block-library/build-module/comment-content/block.json
  var block_default21 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/comment-content",
    title: "Comment Content",
    category: "theme",
    ancestor: ["core/comment-template"],
    description: "Displays the contents of a comment.",
    textdomain: "default",
    usesContext: ["commentId"],
    supports: {
      anchor: true,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      },
      spacing: {
        padding: ["horizontal", "vertical"],
        __experimentalDefaultControls: {
          padding: true
        }
      },
      html: false
    },
    style: "wp-block-comment-content"
  };

  // packages/block-library/build-module/comment-content/edit.mjs
  var import_i18n34 = __toESM(require_i18n(), 1);
  var import_element15 = __toESM(require_element(), 1);
  var import_components23 = __toESM(require_components(), 1);
  var import_core_data11 = __toESM(require_core_data(), 1);
  var import_block_editor48 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime205 = __toESM(require_jsx_runtime(), 1);
  function Edit8(props) {
    const {
      context: { commentId }
    } = props;
    useDeprecatedTextAlign(props);
    const blockProps = (0, import_block_editor48.useBlockProps)();
    const [content] = (0, import_core_data11.useEntityProp)(
      "root",
      "comment",
      "content",
      commentId
    );
    if (!commentId || !content) {
      return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(import_jsx_runtime205.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime205.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime205.jsx)("p", { children: (0, import_i18n34._x)("Comment Content", "block title") }) }) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(import_jsx_runtime205.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime205.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(import_components23.Disabled, { children: /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(import_element15.RawHTML, { children: content.rendered }, "html") }) }) });
  }

  // packages/block-library/build-module/comment-content/deprecated.mjs
  var v16 = {
    attributes: {
      textAlign: {
        type: "string"
      }
    },
    usesContext: ["commentId"],
    supports: {
      anchor: true,
      color: {
        gradients: true,
        link: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      spacing: {
        padding: ["horizontal", "vertical"]
      },
      html: false
    },
    save() {
      return null;
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    }
  };
  var deprecated_default9 = [v16];

  // packages/block-library/build-module/comment-content/index.mjs
  var { name: name20 } = block_default21;
  var settings20 = {
    icon: comment_content_default,
    edit: Edit8,
    deprecated: deprecated_default9,
    example: {}
  };
  var init20 = () => initBlock({ name: name20, metadata: block_default21, settings: settings20 });

  // packages/block-library/build-module/comment-date/index.mjs
  var comment_date_exports = {};
  __export(comment_date_exports, {
    init: () => init21,
    metadata: () => block_default22,
    name: () => name21,
    settings: () => settings21
  });

  // packages/block-library/build-module/comment-date/block.json
  var block_default22 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/comment-date",
    title: "Comment Date",
    category: "theme",
    ancestor: ["core/comment-template"],
    description: "Displays the date on which the comment was posted.",
    textdomain: "default",
    attributes: {
      format: {
        type: "string"
      },
      isLink: {
        type: "boolean",
        default: true
      }
    },
    usesContext: ["commentId"],
    supports: {
      anchor: true,
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-comment-date"
  };

  // packages/block-library/build-module/comment-date/edit.mjs
  var import_core_data12 = __toESM(require_core_data(), 1);
  var import_date = __toESM(require_date(), 1);
  var import_block_editor49 = __toESM(require_block_editor(), 1);
  var import_components24 = __toESM(require_components(), 1);
  var import_i18n35 = __toESM(require_i18n(), 1);
  var import_jsx_runtime206 = __toESM(require_jsx_runtime(), 1);
  function Edit9({
    attributes: { format: format3, isLink },
    context: { commentId },
    setAttributes
  }) {
    const blockProps = (0, import_block_editor49.useBlockProps)();
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    let [date] = (0, import_core_data12.useEntityProp)("root", "comment", "date", commentId);
    const [siteFormat = (0, import_date.getSettings)().formats.date] = (0, import_core_data12.useEntityProp)(
      "root",
      "site",
      "date_format"
    );
    const inspectorControls = /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(import_block_editor49.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(
      import_components24.__experimentalToolsPanel,
      {
        label: (0, import_i18n35.__)("Settings"),
        resetAll: () => {
          setAttributes({
            format: void 0,
            isLink: true
          });
        },
        dropdownMenuProps,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
            import_components24.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n35.__)("Date format"),
              hasValue: () => format3 !== void 0,
              onDeselect: () => setAttributes({ format: void 0 }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
                import_block_editor49.__experimentalDateFormatPicker,
                {
                  format: format3,
                  defaultFormat: siteFormat,
                  onChange: (nextFormat) => setAttributes({ format: nextFormat })
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
            import_components24.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n35.__)("Link to comment"),
              hasValue: () => !isLink,
              onDeselect: () => setAttributes({ isLink: true }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
                import_components24.ToggleControl,
                {
                  label: (0, import_i18n35.__)("Link to comment"),
                  onChange: () => setAttributes({ isLink: !isLink }),
                  checked: isLink
                }
              )
            }
          )
        ]
      }
    ) });
    if (!commentId || !date) {
      date = (0, import_i18n35._x)("Comment Date", "block title");
    }
    let commentDate = date instanceof Date ? /* @__PURE__ */ (0, import_jsx_runtime206.jsx)("time", { dateTime: (0, import_date.dateI18n)("c", date), children: format3 === "human-diff" ? (0, import_date.humanTimeDiff)(date) : (0, import_date.dateI18n)(format3 || siteFormat, date) }) : /* @__PURE__ */ (0, import_jsx_runtime206.jsx)("time", { children: date });
    if (isLink) {
      commentDate = /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
        "a",
        {
          href: "#comment-date-pseudo-link",
          onClick: (event) => event.preventDefault(),
          children: commentDate
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(import_jsx_runtime206.Fragment, { children: [
      inspectorControls,
      /* @__PURE__ */ (0, import_jsx_runtime206.jsx)("div", { ...blockProps, children: commentDate })
    ] });
  }

  // packages/block-library/build-module/comment-date/deprecated.mjs
  var v17 = {
    attributes: {
      format: {
        type: "string"
      },
      isLink: {
        type: "boolean",
        default: false
      }
    },
    supports: {
      html: false,
      color: {
        gradients: true,
        link: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalLetterSpacing: true
      }
    },
    save() {
      return null;
    },
    migrate: migrate_font_family_default,
    isEligible({ style: style2 }) {
      return style2?.typography?.fontFamily;
    }
  };
  var deprecated_default10 = [v17];

  // packages/block-library/build-module/comment-date/index.mjs
  var { name: name21 } = block_default22;
  var settings21 = {
    icon: post_date_default,
    edit: Edit9,
    deprecated: deprecated_default10,
    example: {}
  };
  var init21 = () => initBlock({ name: name21, metadata: block_default22, settings: settings21 });

  // packages/block-library/build-module/comment-edit-link/index.mjs
  var comment_edit_link_exports = {};
  __export(comment_edit_link_exports, {
    init: () => init22,
    metadata: () => block_default23,
    name: () => name22,
    settings: () => settings22
  });

  // packages/block-library/build-module/comment-edit-link/block.json
  var block_default23 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/comment-edit-link",
    title: "Comment Edit Link",
    category: "theme",
    ancestor: ["core/comment-template"],
    description: "Displays a link to edit the comment in the WordPress Dashboard. This link is only visible to users with the edit comment capability.",
    textdomain: "default",
    usesContext: ["commentId"],
    attributes: {
      linkTarget: {
        type: "string",
        default: "_self"
      }
    },
    supports: {
      anchor: true,
      html: false,
      color: {
        link: true,
        gradients: true,
        text: false,
        __experimentalDefaultControls: {
          background: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      }
    },
    style: "wp-block-comment-edit-link"
  };

  // packages/block-library/build-module/comment-edit-link/edit.mjs
  var import_block_editor50 = __toESM(require_block_editor(), 1);
  var import_components25 = __toESM(require_components(), 1);
  var import_i18n36 = __toESM(require_i18n(), 1);
  var import_jsx_runtime207 = __toESM(require_jsx_runtime(), 1);
  function Edit10(props) {
    const { attributes: attributes2, setAttributes } = props;
    const { linkTarget } = attributes2;
    useDeprecatedTextAlign(props);
    const blockProps = (0, import_block_editor50.useBlockProps)();
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const inspectorControls = /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(import_block_editor50.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
      import_components25.__experimentalToolsPanel,
      {
        label: (0, import_i18n36.__)("Settings"),
        resetAll: () => {
          setAttributes({
            linkTarget: "_self"
          });
        },
        dropdownMenuProps,
        children: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
          import_components25.__experimentalToolsPanelItem,
          {
            label: (0, import_i18n36.__)("Open in new tab"),
            isShownByDefault: true,
            hasValue: () => linkTarget === "_blank",
            onDeselect: () => setAttributes({ linkTarget: "_self" }),
            children: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
              import_components25.ToggleControl,
              {
                label: (0, import_i18n36.__)("Open in new tab"),
                onChange: (value) => setAttributes({
                  linkTarget: value ? "_blank" : "_self"
                }),
                checked: linkTarget === "_blank"
              }
            )
          }
        )
      }
    ) });
    return /* @__PURE__ */ (0, import_jsx_runtime207.jsxs)(import_jsx_runtime207.Fragment, { children: [
      inspectorControls,
      /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
        "a",
        {
          href: "#edit-comment-pseudo-link",
          onClick: (event) => event.preventDefault(),
          children: (0, import_i18n36.__)("Edit")
        }
      ) })
    ] });
  }

  // packages/block-library/build-module/comment-edit-link/deprecated.mjs
  var v18 = {
    attributes: {
      linkTarget: {
        type: "string",
        default: "_self"
      },
      textAlign: {
        type: "string"
      }
    },
    usesContext: ["commentId"],
    supports: {
      anchor: true,
      html: false,
      color: {
        link: true,
        gradients: true,
        text: false
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      }
    },
    save() {
      return null;
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    }
  };
  var deprecated_default11 = [v18];

  // packages/block-library/build-module/comment-edit-link/index.mjs
  var { name: name22 } = block_default23;
  var settings22 = {
    icon: comment_edit_link_default,
    edit: Edit10,
    deprecated: deprecated_default11,
    example: {}
  };
  var init22 = () => initBlock({ name: name22, metadata: block_default23, settings: settings22 });

  // packages/block-library/build-module/comment-reply-link/index.mjs
  var comment_reply_link_exports = {};
  __export(comment_reply_link_exports, {
    init: () => init23,
    metadata: () => block_default24,
    name: () => name23,
    settings: () => settings23
  });

  // packages/block-library/build-module/comment-reply-link/block.json
  var block_default24 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/comment-reply-link",
    title: "Comment Reply Link",
    category: "theme",
    ancestor: ["core/comment-template"],
    description: "Displays a link to reply to a comment.",
    textdomain: "default",
    usesContext: ["commentId"],
    supports: {
      anchor: true,
      color: {
        gradients: true,
        link: true,
        text: false,
        __experimentalDefaultControls: {
          background: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      html: false
    },
    style: "wp-block-comment-reply-link"
  };

  // packages/block-library/build-module/comment-reply-link/edit.mjs
  var import_i18n37 = __toESM(require_i18n(), 1);
  var import_block_editor51 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime208 = __toESM(require_jsx_runtime(), 1);
  function Edit11(props) {
    useDeprecatedTextAlign(props);
    const blockProps = (0, import_block_editor51.useBlockProps)();
    return /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(import_jsx_runtime208.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime208.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
      "a",
      {
        href: "#comment-reply-pseudo-link",
        onClick: (event) => event.preventDefault(),
        /* translators: Comment reply button text. */
        children: (0, import_i18n37._x)("Reply", "verb")
      }
    ) }) });
  }
  var edit_default6 = Edit11;

  // packages/block-library/build-module/comment-reply-link/deprecated.mjs
  var v19 = {
    attributes: {
      textAlign: {
        type: "string"
      }
    },
    usesContext: ["commentId"],
    supports: {
      anchor: true,
      color: {
        gradients: true,
        link: true,
        text: false
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      html: false
    },
    save() {
      return null;
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    }
  };
  var deprecated_default12 = [v19];

  // packages/block-library/build-module/comment-reply-link/index.mjs
  var { name: name23 } = block_default24;
  var settings23 = {
    edit: edit_default6,
    icon: comment_reply_link_default,
    deprecated: deprecated_default12,
    example: {}
  };
  var init23 = () => initBlock({ name: name23, metadata: block_default24, settings: settings23 });

  // packages/block-library/build-module/comment-template/index.mjs
  var comment_template_exports = {};
  __export(comment_template_exports, {
    init: () => init24,
    metadata: () => block_default25,
    name: () => name24,
    settings: () => settings24
  });

  // packages/block-library/build-module/comment-template/block.json
  var block_default25 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/comment-template",
    title: "Comment Template",
    category: "design",
    parent: ["core/comments"],
    description: "Contains the block elements used to display a comment, like the title, date, author, avatar and more.",
    textdomain: "default",
    usesContext: ["postId"],
    supports: {
      anchor: true,
      align: true,
      html: false,
      reusable: false,
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-comment-template"
  };

  // packages/block-library/build-module/comment-template/edit.mjs
  var import_element17 = __toESM(require_element(), 1);
  var import_data25 = __toESM(require_data(), 1);
  var import_i18n38 = __toESM(require_i18n(), 1);
  var import_block_editor53 = __toESM(require_block_editor(), 1);
  var import_components26 = __toESM(require_components(), 1);
  var import_core_data13 = __toESM(require_core_data(), 1);

  // packages/block-library/build-module/comment-template/hooks.mjs
  var import_element16 = __toESM(require_element(), 1);
  var import_data24 = __toESM(require_data(), 1);
  var import_block_editor52 = __toESM(require_block_editor(), 1);
  var import_url3 = __toESM(require_url(), 1);
  var import_api_fetch = __toESM(require_api_fetch(), 1);
  var MAX_COMMENTS_PER_PAGE = 100;
  var useCommentQueryArgs = ({ postId }) => {
    const queryArgs = {
      status: "approve",
      order: "asc",
      context: "embed",
      parent: 0,
      _embed: "children"
    };
    const {
      pageComments,
      commentsPerPage,
      defaultCommentsPage: defaultPage
    } = (0, import_data24.useSelect)((select9) => {
      const { getSettings: getSettings2 } = select9(import_block_editor52.store);
      const { __experimentalDiscussionSettings } = getSettings2();
      return __experimentalDiscussionSettings ?? {};
    }, []);
    const perPage = pageComments ? Math.min(commentsPerPage, MAX_COMMENTS_PER_PAGE) : MAX_COMMENTS_PER_PAGE;
    const page = useDefaultPageIndex({
      defaultPage,
      postId,
      perPage,
      queryArgs
    });
    return (0, import_element16.useMemo)(() => {
      return page ? {
        ...queryArgs,
        post: postId,
        per_page: perPage,
        page
      } : null;
    }, [postId, perPage, page]);
  };
  var useDefaultPageIndex = ({ defaultPage, postId, perPage, queryArgs }) => {
    const [defaultPages, setDefaultPages] = (0, import_element16.useState)({});
    const key = `${postId}_${perPage}`;
    const page = defaultPages[key] || 0;
    (0, import_element16.useEffect)(() => {
      if (page || defaultPage !== "newest") {
        return;
      }
      (0, import_api_fetch.default)({
        path: (0, import_url3.addQueryArgs)("/wp/v2/comments", {
          ...queryArgs,
          post: postId,
          per_page: perPage,
          _fields: "id"
        }),
        method: "HEAD",
        parse: false
      }).then((res) => {
        const pages = parseInt(res.headers.get("X-WP-TotalPages"));
        setDefaultPages({
          ...defaultPages,
          [key]: pages <= 1 ? 1 : pages
          // If there are 0 pages, it means that there are no comments, but there is no 0th page.
        });
      }).catch(() => {
        setDefaultPages({
          ...defaultPages,
          [key]: 1
        });
      });
    }, [defaultPage, postId, perPage, setDefaultPages]);
    return defaultPage === "newest" ? page : 1;
  };
  var useCommentTree = (topLevelComments) => {
    const commentTree = (0, import_element16.useMemo)(
      () => topLevelComments?.map(({ id, _embedded }) => {
        const [children] = _embedded?.children || [[]];
        return {
          commentId: id,
          children: children.map((child) => ({
            commentId: child.id
          }))
        };
      }),
      [topLevelComments]
    );
    return commentTree;
  };

  // packages/block-library/build-module/comment-template/edit.mjs
  var import_jsx_runtime209 = __toESM(require_jsx_runtime(), 1);
  var TEMPLATE3 = [
    ["core/avatar"],
    ["core/comment-author-name"],
    ["core/comment-date"],
    ["core/comment-content"],
    ["core/comment-reply-link"],
    ["core/comment-edit-link"]
  ];
  var getCommentsPlaceholder = ({
    perPage,
    pageComments,
    threadComments,
    threadCommentsDepth
  }) => {
    const commentsDepth = !threadComments ? 1 : Math.min(threadCommentsDepth, 3);
    const buildChildrenComment = (commentsLevel) => {
      if (commentsLevel < commentsDepth) {
        const nextLevel = commentsLevel + 1;
        return [
          {
            commentId: -(commentsLevel + 3),
            children: buildChildrenComment(nextLevel)
          }
        ];
      }
      return [];
    };
    const placeholderComments = [
      { commentId: -1, children: buildChildrenComment(1) }
    ];
    if ((!pageComments || perPage >= 2) && commentsDepth < 3) {
      placeholderComments.push({
        commentId: -2,
        children: []
      });
    }
    if ((!pageComments || perPage >= 3) && commentsDepth < 2) {
      placeholderComments.push({
        commentId: -3,
        children: []
      });
    }
    return placeholderComments;
  };
  function CommentTemplateInnerBlocks({
    comment,
    activeCommentId,
    setActiveCommentId,
    firstCommentId,
    blocks
  }) {
    const { children, ...innerBlocksProps } = (0, import_block_editor53.useInnerBlocksProps)(
      {},
      { template: TEMPLATE3 }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)("li", { ...innerBlocksProps, children: [
      comment.commentId === (activeCommentId || firstCommentId) ? children : null,
      /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
        MemoizedCommentTemplatePreview,
        {
          blocks,
          commentId: comment.commentId,
          setActiveCommentId,
          isHidden: comment.commentId === (activeCommentId || firstCommentId)
        }
      ),
      comment?.children?.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
        CommentsList,
        {
          comments: comment.children,
          activeCommentId,
          setActiveCommentId,
          blocks,
          firstCommentId
        }
      ) : null
    ] });
  }
  var CommentTemplatePreview = ({
    blocks,
    commentId,
    setActiveCommentId,
    isHidden
  }) => {
    const blockPreviewProps = (0, import_block_editor53.__experimentalUseBlockPreview)({
      blocks
    });
    const handleOnClick = () => {
      setActiveCommentId(commentId);
    };
    const style2 = {
      display: isHidden ? "none" : void 0
    };
    return /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
      "div",
      {
        ...blockPreviewProps,
        tabIndex: 0,
        role: "button",
        style: style2,
        onClick: handleOnClick,
        onKeyPress: handleOnClick
      }
    );
  };
  var MemoizedCommentTemplatePreview = (0, import_element17.memo)(CommentTemplatePreview);
  var CommentsList = ({
    comments,
    blockProps,
    activeCommentId,
    setActiveCommentId,
    blocks,
    firstCommentId
  }) => /* @__PURE__ */ (0, import_jsx_runtime209.jsx)("ol", { ...blockProps, children: comments && comments.map(({ commentId, ...comment }, index) => /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
    import_block_editor53.BlockContextProvider,
    {
      value: {
        // If the commentId is negative it means that this comment is a
        // "placeholder" and that the block is most likely being used in the
        // site editor. In this case, we have to set the commentId to `null`
        // because otherwise the (non-existent) comment with a negative ID
        // would be requested from the REST API.
        commentId: commentId < 0 ? null : commentId
      },
      children: /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
        CommentTemplateInnerBlocks,
        {
          comment: { commentId, ...comment },
          activeCommentId,
          setActiveCommentId,
          blocks,
          firstCommentId
        }
      )
    },
    comment.commentId || index
  )) });
  function CommentTemplateEdit({
    clientId,
    context: { postId }
  }) {
    const blockProps = (0, import_block_editor53.useBlockProps)();
    const [activeCommentId, setActiveCommentId] = (0, import_element17.useState)();
    const {
      commentOrder,
      threadCommentsDepth,
      threadComments,
      commentsPerPage,
      pageComments
    } = (0, import_data25.useSelect)((select9) => {
      const { getSettings: getSettings2 } = select9(import_block_editor53.store);
      return getSettings2().__experimentalDiscussionSettings ?? {};
    }, []);
    const commentQuery = useCommentQueryArgs({
      postId
    });
    const { topLevelComments, blocks } = (0, import_data25.useSelect)(
      (select9) => {
        const { getEntityRecords } = select9(import_core_data13.store);
        const { getBlocks } = select9(import_block_editor53.store);
        return {
          // Request only top-level comments. Replies are embedded.
          topLevelComments: commentQuery ? getEntityRecords("root", "comment", commentQuery) : null,
          blocks: getBlocks(clientId)
        };
      },
      [clientId, commentQuery]
    );
    let commentTree = useCommentTree(
      // Reverse the order of top comments if needed.
      commentOrder === "desc" && topLevelComments ? [...topLevelComments].reverse() : topLevelComments
    );
    if (!topLevelComments) {
      return /* @__PURE__ */ (0, import_jsx_runtime209.jsx)("p", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(import_components26.Spinner, {}) });
    }
    if (!postId) {
      commentTree = getCommentsPlaceholder({
        perPage: commentsPerPage,
        pageComments,
        threadComments,
        threadCommentsDepth
      });
    }
    if (!commentTree.length) {
      return /* @__PURE__ */ (0, import_jsx_runtime209.jsx)("p", { ...blockProps, children: (0, import_i18n38.__)("No results found.") });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
      CommentsList,
      {
        comments: commentTree,
        blockProps,
        blocks,
        activeCommentId,
        setActiveCommentId,
        firstCommentId: commentTree[0]?.commentId
      }
    );
  }

  // packages/block-library/build-module/comment-template/save.mjs
  var import_block_editor54 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime210 = __toESM(require_jsx_runtime(), 1);
  function CommentTemplateSave() {
    return /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_block_editor54.InnerBlocks.Content, {});
  }

  // packages/block-library/build-module/comment-template/index.mjs
  var { name: name24 } = block_default25;
  var settings24 = {
    icon: layout_default,
    edit: CommentTemplateEdit,
    save: CommentTemplateSave
  };
  var init24 = () => initBlock({ name: name24, metadata: block_default25, settings: settings24 });

  // packages/block-library/build-module/comments-pagination-previous/index.mjs
  var comments_pagination_previous_exports = {};
  __export(comments_pagination_previous_exports, {
    init: () => init25,
    metadata: () => block_default26,
    name: () => name25,
    settings: () => settings25
  });
  var import_i18n40 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/comments-pagination-previous/block.json
  var block_default26 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/comments-pagination-previous",
    title: "Comments Previous Page",
    category: "theme",
    parent: ["core/comments-pagination"],
    description: "Displays the previous comment's page link.",
    textdomain: "default",
    attributes: {
      label: {
        type: "string"
      }
    },
    usesContext: ["postId", "comments/paginationArrow"],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      color: {
        gradients: true,
        text: false,
        __experimentalDefaultControls: {
          background: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    }
  };

  // packages/block-library/build-module/comments-pagination-previous/edit.mjs
  var import_i18n39 = __toESM(require_i18n(), 1);
  var import_block_editor55 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime211 = __toESM(require_jsx_runtime(), 1);
  var arrowMap = {
    none: "",
    arrow: "\u2190",
    chevron: "\xAB"
  };
  function CommentsPaginationPreviousEdit({
    attributes: { label },
    setAttributes,
    context: { "comments/paginationArrow": paginationArrow }
  }) {
    const displayArrow = arrowMap[paginationArrow];
    return /* @__PURE__ */ (0, import_jsx_runtime211.jsxs)(
      "a",
      {
        href: "#comments-pagination-previous-pseudo-link",
        onClick: (event) => event.preventDefault(),
        ...(0, import_block_editor55.useBlockProps)(),
        children: [
          displayArrow && /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
            "span",
            {
              className: `wp-block-comments-pagination-previous-arrow is-arrow-${paginationArrow}`,
              children: displayArrow
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
            import_block_editor55.PlainText,
            {
              __experimentalVersion: 2,
              tagName: "span",
              "aria-label": (0, import_i18n39.__)("Older comments page link"),
              placeholder: (0, import_i18n39.__)("Older Comments"),
              value: label,
              onChange: (newLabel) => setAttributes({ label: newLabel })
            }
          )
        ]
      }
    );
  }

  // packages/block-library/build-module/comments-pagination-previous/index.mjs
  var { name: name25 } = block_default26;
  var settings25 = {
    icon: query_pagination_previous_default,
    edit: CommentsPaginationPreviousEdit,
    example: {
      attributes: {
        label: (0, import_i18n40.__)("Older Comments")
      }
    }
  };
  var init25 = () => initBlock({ name: name25, metadata: block_default26, settings: settings25 });

  // packages/block-library/build-module/comments-pagination/index.mjs
  var comments_pagination_exports = {};
  __export(comments_pagination_exports, {
    init: () => init26,
    metadata: () => block_default27,
    name: () => name26,
    settings: () => settings26
  });

  // packages/block-library/build-module/comments-pagination/block.json
  var block_default27 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/comments-pagination",
    title: "Comments Pagination",
    category: "theme",
    parent: ["core/comments"],
    allowedBlocks: [
      "core/comments-pagination-previous",
      "core/comments-pagination-numbers",
      "core/comments-pagination-next"
    ],
    description: "Displays a paginated navigation to next/previous set of comments, when applicable.",
    textdomain: "default",
    attributes: {
      paginationArrow: {
        type: "string",
        default: "none"
      }
    },
    example: {
      attributes: {
        paginationArrow: "none"
      }
    },
    providesContext: {
      "comments/paginationArrow": "paginationArrow"
    },
    supports: {
      anchor: true,
      align: true,
      reusable: false,
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      layout: {
        allowSwitching: false,
        allowInheriting: false,
        default: {
          type: "flex"
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-comments-pagination-editor",
    style: "wp-block-comments-pagination"
  };

  // packages/block-library/build-module/comments-pagination/edit.mjs
  var import_i18n42 = __toESM(require_i18n(), 1);
  var import_block_editor56 = __toESM(require_block_editor(), 1);
  var import_data26 = __toESM(require_data(), 1);
  var import_components28 = __toESM(require_components(), 1);

  // packages/block-library/build-module/comments-pagination/comments-pagination-arrow-controls.mjs
  var import_i18n41 = __toESM(require_i18n(), 1);
  var import_components27 = __toESM(require_components(), 1);
  var import_jsx_runtime212 = __toESM(require_jsx_runtime(), 1);
  function CommentsPaginationArrowControls({ value, onChange }) {
    return /* @__PURE__ */ (0, import_jsx_runtime212.jsxs)(
      import_components27.__experimentalToggleGroupControl,
      {
        __next40pxDefaultSize: true,
        label: (0, import_i18n41.__)("Arrow"),
        value,
        onChange,
        help: (0, import_i18n41.__)(
          "A decorative arrow appended to the next and previous comments link."
        ),
        isBlock: true,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(
            import_components27.__experimentalToggleGroupControlOption,
            {
              value: "none",
              label: (0, import_i18n41._x)(
                "None",
                "Arrow option for Comments Pagination Next/Previous blocks"
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(
            import_components27.__experimentalToggleGroupControlOption,
            {
              value: "arrow",
              label: (0, import_i18n41._x)(
                "Arrow",
                "Arrow option for Comments Pagination Next/Previous blocks"
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(
            import_components27.__experimentalToggleGroupControlOption,
            {
              value: "chevron",
              label: (0, import_i18n41._x)(
                "Chevron",
                "Arrow option for Comments Pagination Next/Previous blocks"
              )
            }
          )
        ]
      }
    );
  }

  // packages/block-library/build-module/comments-pagination/edit.mjs
  var import_jsx_runtime213 = __toESM(require_jsx_runtime(), 1);
  var TEMPLATE4 = [
    ["core/comments-pagination-previous"],
    ["core/comments-pagination-numbers"],
    ["core/comments-pagination-next"]
  ];
  function QueryPaginationEdit({
    attributes: { paginationArrow },
    setAttributes,
    clientId
  }) {
    const hasNextPreviousBlocks = (0, import_data26.useSelect)((select9) => {
      const { getBlocks } = select9(import_block_editor56.store);
      const innerBlocks = getBlocks(clientId);
      return innerBlocks?.find((innerBlock) => {
        return [
          "core/comments-pagination-previous",
          "core/comments-pagination-next"
        ].includes(innerBlock.name);
      });
    }, []);
    const blockProps = (0, import_block_editor56.useBlockProps)();
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const innerBlocksProps = (0, import_block_editor56.useInnerBlocksProps)(blockProps, {
      template: TEMPLATE4
    });
    const pageComments = (0, import_data26.useSelect)((select9) => {
      const { getSettings: getSettings2 } = select9(import_block_editor56.store);
      const { __experimentalDiscussionSettings } = getSettings2();
      return __experimentalDiscussionSettings?.pageComments;
    }, []);
    if (!pageComments) {
      return /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(import_block_editor56.Warning, { children: (0, import_i18n42.__)(
        "Comments Pagination block: paging comments is disabled in the Discussion Settings"
      ) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime213.jsxs)(import_jsx_runtime213.Fragment, { children: [
      hasNextPreviousBlocks && /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(import_block_editor56.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
        import_components28.__experimentalToolsPanel,
        {
          label: (0, import_i18n42.__)("Settings"),
          dropdownMenuProps,
          resetAll: () => setAttributes({ paginationArrow: "none" }),
          children: /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
            import_components28.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n42.__)("Arrow"),
              hasValue: () => paginationArrow !== "none",
              onDeselect: () => setAttributes({ paginationArrow: "none" }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
                CommentsPaginationArrowControls,
                {
                  value: paginationArrow,
                  onChange: (value) => {
                    setAttributes({ paginationArrow: value });
                  }
                }
              )
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime213.jsx)("div", { ...innerBlocksProps })
    ] });
  }

  // packages/block-library/build-module/comments-pagination/save.mjs
  var import_block_editor57 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime214 = __toESM(require_jsx_runtime(), 1);
  function save13() {
    return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(import_block_editor57.InnerBlocks.Content, {});
  }

  // packages/block-library/build-module/comments-pagination/index.mjs
  var { name: name26 } = block_default27;
  var settings26 = {
    icon: query_pagination_default,
    edit: QueryPaginationEdit,
    save: save13
  };
  var init26 = () => initBlock({ name: name26, metadata: block_default27, settings: settings26 });

  // packages/block-library/build-module/comments-pagination-next/index.mjs
  var comments_pagination_next_exports = {};
  __export(comments_pagination_next_exports, {
    init: () => init27,
    metadata: () => block_default28,
    name: () => name27,
    settings: () => settings27
  });
  var import_i18n44 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/comments-pagination-next/block.json
  var block_default28 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/comments-pagination-next",
    title: "Comments Next Page",
    category: "theme",
    parent: ["core/comments-pagination"],
    description: "Displays the next comment's page link.",
    textdomain: "default",
    attributes: {
      label: {
        type: "string"
      }
    },
    usesContext: ["postId", "comments/paginationArrow"],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      color: {
        gradients: true,
        text: false,
        __experimentalDefaultControls: {
          background: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    }
  };

  // packages/block-library/build-module/comments-pagination-next/edit.mjs
  var import_i18n43 = __toESM(require_i18n(), 1);
  var import_block_editor58 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime215 = __toESM(require_jsx_runtime(), 1);
  var arrowMap2 = {
    none: "",
    arrow: "\u2192",
    chevron: "\xBB"
  };
  function CommentsPaginationNextEdit({
    attributes: { label },
    setAttributes,
    context: { "comments/paginationArrow": paginationArrow }
  }) {
    const displayArrow = arrowMap2[paginationArrow];
    return /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)(
      "a",
      {
        href: "#comments-pagination-next-pseudo-link",
        onClick: (event) => event.preventDefault(),
        ...(0, import_block_editor58.useBlockProps)(),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(
            import_block_editor58.PlainText,
            {
              __experimentalVersion: 2,
              tagName: "span",
              "aria-label": (0, import_i18n43.__)("Newer comments page link"),
              placeholder: (0, import_i18n43.__)("Newer Comments"),
              value: label,
              onChange: (newLabel) => setAttributes({ label: newLabel })
            }
          ),
          displayArrow && /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(
            "span",
            {
              className: `wp-block-comments-pagination-next-arrow is-arrow-${paginationArrow}`,
              children: displayArrow
            }
          )
        ]
      }
    );
  }

  // packages/block-library/build-module/comments-pagination-next/index.mjs
  var { name: name27 } = block_default28;
  var settings27 = {
    icon: query_pagination_next_default,
    edit: CommentsPaginationNextEdit,
    example: {
      attributes: {
        label: (0, import_i18n44.__)("Newer Comments")
      }
    }
  };
  var init27 = () => initBlock({ name: name27, metadata: block_default28, settings: settings27 });

  // packages/block-library/build-module/comments-pagination-numbers/index.mjs
  var comments_pagination_numbers_exports = {};
  __export(comments_pagination_numbers_exports, {
    init: () => init28,
    metadata: () => block_default29,
    name: () => name28,
    settings: () => settings28
  });

  // packages/block-library/build-module/comments-pagination-numbers/block.json
  var block_default29 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/comments-pagination-numbers",
    title: "Comments Page Numbers",
    category: "theme",
    parent: ["core/comments-pagination"],
    description: "Displays a list of page numbers for comments pagination.",
    textdomain: "default",
    usesContext: ["postId"],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      color: {
        gradients: true,
        text: false,
        __experimentalDefaultControls: {
          background: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          padding: true
        }
      }
    }
  };

  // packages/block-library/build-module/comments-pagination-numbers/edit.mjs
  var import_block_editor59 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime216 = __toESM(require_jsx_runtime(), 1);
  var PaginationItem = ({ content, tag: Tag = "a", extraClass = "" }) => Tag === "a" ? /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
    Tag,
    {
      className: `page-numbers ${extraClass}`,
      href: "#comments-pagination-numbers-pseudo-link",
      onClick: (event) => event.preventDefault(),
      children: content
    }
  ) : /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(Tag, { className: `page-numbers ${extraClass}`, children: content });
  function CommentsPaginationNumbersEdit() {
    return /* @__PURE__ */ (0, import_jsx_runtime216.jsxs)("div", { ...(0, import_block_editor59.useBlockProps)(), children: [
      /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(PaginationItem, { content: "1" }),
      /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(PaginationItem, { content: "2" }),
      /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(PaginationItem, { content: "3", tag: "span", extraClass: "current" }),
      /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(PaginationItem, { content: "4" }),
      /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(PaginationItem, { content: "5" }),
      /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(PaginationItem, { content: "...", tag: "span", extraClass: "dots" }),
      /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(PaginationItem, { content: "8" })
    ] });
  }

  // packages/block-library/build-module/comments-pagination-numbers/index.mjs
  var { name: name28 } = block_default29;
  var settings28 = {
    icon: query_pagination_numbers_default,
    edit: CommentsPaginationNumbersEdit,
    example: {}
  };
  var init28 = () => initBlock({ name: name28, metadata: block_default29, settings: settings28 });

  // packages/block-library/build-module/comments-title/index.mjs
  var comments_title_exports = {};
  __export(comments_title_exports, {
    init: () => init29,
    metadata: () => block_default30,
    name: () => name29,
    settings: () => settings29
  });

  // packages/block-library/build-module/comments-title/block.json
  var block_default30 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/comments-title",
    title: "Comments Title",
    category: "theme",
    ancestor: ["core/comments"],
    description: "Displays a title with the number of comments.",
    textdomain: "default",
    usesContext: ["postId", "postType"],
    attributes: {
      showPostTitle: {
        type: "boolean",
        default: true
      },
      showCommentsCount: {
        type: "boolean",
        default: true
      },
      level: {
        type: "number",
        default: 2
      },
      levelOptions: {
        type: "array"
      }
    },
    supports: {
      anchor: true,
      align: true,
      html: false,
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true,
          __experimentalFontFamily: true,
          __experimentalFontStyle: true,
          __experimentalFontWeight: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    }
  };

  // packages/block-library/build-module/comments-title/edit.mjs
  var import_block_editor60 = __toESM(require_block_editor(), 1);
  var import_i18n45 = __toESM(require_i18n(), 1);
  var import_core_data14 = __toESM(require_core_data(), 1);
  var import_components29 = __toESM(require_components(), 1);
  var import_element18 = __toESM(require_element(), 1);
  var import_data27 = __toESM(require_data(), 1);
  var import_api_fetch2 = __toESM(require_api_fetch(), 1);
  var import_url4 = __toESM(require_url(), 1);
  var import_jsx_runtime217 = __toESM(require_jsx_runtime(), 1);
  function Edit12(props) {
    useDeprecatedTextAlign(props);
    const { attributes: attributes2, setAttributes, context } = props;
    const {
      showPostTitle,
      showCommentsCount,
      level = 2,
      levelOptions
    } = attributes2;
    const { postId, postType } = context;
    const TagName2 = "h" + level;
    const [commentsCount, setCommentsCount] = (0, import_element18.useState)();
    const [rawTitle] = (0, import_core_data14.useEntityProp)("postType", postType, "title", postId);
    const isSiteEditor = typeof postId === "undefined";
    const blockProps = (0, import_block_editor60.useBlockProps)();
    const {
      threadCommentsDepth,
      threadComments,
      commentsPerPage,
      pageComments
    } = (0, import_data27.useSelect)((select9) => {
      const { getSettings: getSettings2 } = select9(import_block_editor60.store);
      return getSettings2().__experimentalDiscussionSettings ?? {};
    }, []);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    (0, import_element18.useEffect)(() => {
      if (isSiteEditor) {
        const nestedCommentsNumber = threadComments ? Math.min(threadCommentsDepth, 3) - 1 : 0;
        const topLevelCommentsNumber = pageComments ? commentsPerPage : 3;
        const commentsNumber = parseInt(nestedCommentsNumber) + parseInt(topLevelCommentsNumber);
        setCommentsCount(Math.min(commentsNumber, 3));
        return;
      }
      const currentPostId = postId;
      (0, import_api_fetch2.default)({
        path: (0, import_url4.addQueryArgs)("/wp/v2/comments", {
          post: postId,
          _fields: "id"
        }),
        method: "HEAD",
        parse: false
      }).then((res) => {
        if (currentPostId === postId) {
          setCommentsCount(
            parseInt(res.headers.get("X-WP-Total"))
          );
        }
      }).catch(() => {
        setCommentsCount(0);
      });
    }, [postId]);
    const blockControls = /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(import_block_editor60.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
      import_block_editor60.HeadingLevelDropdown,
      {
        value: level,
        options: levelOptions,
        onChange: (newLevel) => setAttributes({ level: newLevel })
      }
    ) });
    const inspectorControls = /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(import_block_editor60.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)(
      import_components29.__experimentalToolsPanel,
      {
        label: (0, import_i18n45.__)("Settings"),
        resetAll: () => {
          setAttributes({
            showPostTitle: true,
            showCommentsCount: true
          });
        },
        dropdownMenuProps,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
            import_components29.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n45.__)("Show post title"),
              isShownByDefault: true,
              hasValue: () => !showPostTitle,
              onDeselect: () => setAttributes({ showPostTitle: true }),
              children: /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
                import_components29.ToggleControl,
                {
                  label: (0, import_i18n45.__)("Show post title"),
                  checked: showPostTitle,
                  onChange: (value) => setAttributes({ showPostTitle: value })
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
            import_components29.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n45.__)("Show comments count"),
              isShownByDefault: true,
              hasValue: () => !showCommentsCount,
              onDeselect: () => setAttributes({ showCommentsCount: true }),
              children: /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
                import_components29.ToggleControl,
                {
                  label: (0, import_i18n45.__)("Show comments count"),
                  checked: showCommentsCount,
                  onChange: (value) => setAttributes({ showCommentsCount: value })
                }
              )
            }
          )
        ]
      }
    ) });
    const postTitle = isSiteEditor ? (0, import_i18n45.__)("Post Title") : rawTitle;
    let placeholder2;
    if (showCommentsCount && commentsCount !== void 0) {
      if (showPostTitle) {
        if (commentsCount === 1) {
          placeholder2 = (0, import_i18n45.sprintf)(
            /* translators: %s: Post title. */
            (0, import_i18n45.__)('One response to "%s"'),
            postTitle
          );
        } else {
          placeholder2 = (0, import_i18n45.sprintf)(
            /* translators: 1: Number of comments, 2: Post title. */
            (0, import_i18n45._n)(
              '%1$s response to "%2$s"',
              '%1$s responses to "%2$s"',
              commentsCount
            ),
            commentsCount,
            postTitle
          );
        }
      } else if (commentsCount === 1) {
        placeholder2 = (0, import_i18n45.__)("One response");
      } else {
        placeholder2 = (0, import_i18n45.sprintf)(
          /* translators: %s: Number of comments. */
          (0, import_i18n45._n)("%s response", "%s responses", commentsCount),
          commentsCount
        );
      }
    } else if (showPostTitle) {
      if (commentsCount === 1) {
        placeholder2 = (0, import_i18n45.sprintf)((0, import_i18n45.__)('Response to "%s"'), postTitle);
      } else {
        placeholder2 = (0, import_i18n45.sprintf)((0, import_i18n45.__)('Responses to "%s"'), postTitle);
      }
    } else if (commentsCount === 1) {
      placeholder2 = (0, import_i18n45.__)("Response");
    } else {
      placeholder2 = (0, import_i18n45.__)("Responses");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)(import_jsx_runtime217.Fragment, { children: [
      blockControls,
      inspectorControls,
      /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(TagName2, { ...blockProps, children: placeholder2 })
    ] });
  }

  // packages/block-library/build-module/comments-title/deprecated.mjs
  var v23 = {
    attributes: {
      textAlign: {
        type: "string"
      },
      showPostTitle: {
        type: "boolean",
        default: true
      },
      showCommentsCount: {
        type: "boolean",
        default: true
      },
      level: {
        type: "number",
        default: 2
      },
      levelOptions: {
        type: "array"
      }
    },
    supports: {
      anchor: true,
      align: true,
      html: false,
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true,
          __experimentalFontFamily: true,
          __experimentalFontStyle: true,
          __experimentalFontWeight: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    migrate: (oldAttributes) => {
      const { singleCommentLabel, multipleCommentsLabel, ...newAttributes } = oldAttributes;
      return migrate_text_align_default(newAttributes);
    },
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    },
    save: () => null
  };
  var v110 = {
    attributes: {
      textAlign: {
        type: "string"
      },
      showPostTitle: {
        type: "boolean",
        default: true
      },
      showCommentsCount: {
        type: "boolean",
        default: true
      },
      level: {
        type: "number",
        default: 2
      },
      levelOptions: {
        type: "array"
      },
      singleCommentLabel: {
        type: "string"
      },
      multipleCommentsLabel: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      align: true,
      html: false,
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true,
          __experimentalFontFamily: true,
          __experimentalFontStyle: true,
          __experimentalFontWeight: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    migrate: (oldAttributes) => {
      const { singleCommentLabel, multipleCommentsLabel, ...newAttributes } = oldAttributes;
      return migrate_text_align_default(newAttributes);
    },
    isEligible: ({ multipleCommentsLabel, singleCommentLabel }) => multipleCommentsLabel || singleCommentLabel,
    save: () => null
  };
  var deprecated_default13 = [v23, v110];

  // packages/block-library/build-module/comments-title/index.mjs
  var { name: name29 } = block_default30;
  var settings29 = {
    icon: title_default,
    edit: Edit12,
    deprecated: deprecated_default13,
    example: {}
  };
  var init29 = () => initBlock({ name: name29, metadata: block_default30, settings: settings29 });

  // packages/block-library/build-module/cover/index.mjs
  var cover_exports = {};
  __export(cover_exports, {
    init: () => init30,
    metadata: () => block_default31,
    name: () => name30,
    settings: () => settings30
  });
  var import_i18n54 = __toESM(require_i18n(), 1);
  var import_blocks23 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/cover/deprecated.mjs
  var import_blocks20 = __toESM(require_blocks(), 1);
  var import_block_editor61 = __toESM(require_block_editor(), 1);
  var import_i18n46 = __toESM(require_i18n(), 1);
  var import_compose14 = __toESM(require_compose(), 1);

  // packages/block-library/build-module/cover/shared.mjs
  var import_blob4 = __toESM(require_blob(), 1);
  var POSITION_CLASSNAMES = {
    "top left": "is-position-top-left",
    "top center": "is-position-top-center",
    "top right": "is-position-top-right",
    "center left": "is-position-center-left",
    "center center": "is-position-center-center",
    center: "is-position-center-center",
    "center right": "is-position-center-right",
    "bottom left": "is-position-bottom-left",
    "bottom center": "is-position-bottom-center",
    "bottom right": "is-position-bottom-right"
  };
  var IMAGE_BACKGROUND_TYPE = "image";
  var VIDEO_BACKGROUND_TYPE = "video";
  var EMBED_VIDEO_BACKGROUND_TYPE = "embed-video";
  var COVER_MIN_HEIGHT = 50;
  var DEFAULT_FOCAL_POINT = { x: 0.5, y: 0.5 };
  var ALLOWED_MEDIA_TYPES2 = ["image", "video"];
  function mediaPosition({ x: x2, y: y2 } = DEFAULT_FOCAL_POINT) {
    return `${Math.round(x2 * 100)}% ${Math.round(y2 * 100)}%`;
  }
  function dimRatioToClass(ratio) {
    return ratio === 50 || ratio === void 0 ? null : "has-background-dim-" + 10 * Math.round(ratio / 10);
  }
  function attributesFromMedia(media) {
    if (!media || !media.url && !media.src) {
      return {
        url: void 0,
        id: void 0
      };
    }
    if ((0, import_blob4.isBlobURL)(media.url)) {
      media.type = (0, import_blob4.getBlobTypeByURL)(media.url);
    }
    let mediaType;
    if (media.media_type) {
      if (media.media_type === IMAGE_BACKGROUND_TYPE) {
        mediaType = IMAGE_BACKGROUND_TYPE;
      } else {
        mediaType = VIDEO_BACKGROUND_TYPE;
      }
    } else if (media.type && (media.type === IMAGE_BACKGROUND_TYPE || media.type === VIDEO_BACKGROUND_TYPE)) {
      mediaType = media.type;
    } else {
      return;
    }
    return {
      url: media.url || media.src,
      id: media.id,
      alt: media?.alt,
      backgroundType: mediaType,
      ...mediaType === VIDEO_BACKGROUND_TYPE ? { hasParallax: void 0 } : {}
    };
  }
  function isContentPositionCenter(contentPosition) {
    return !contentPosition || contentPosition === "center center" || contentPosition === "center";
  }
  function getPositionClassName(contentPosition) {
    if (isContentPositionCenter(contentPosition)) {
      return "";
    }
    return POSITION_CLASSNAMES[contentPosition];
  }

  // packages/block-library/build-module/cover/deprecated.mjs
  var import_jsx_runtime218 = __toESM(require_jsx_runtime(), 1);
  function backgroundImageStyles(url) {
    return url ? { backgroundImage: `url(${url})` } : {};
  }
  function dimRatioToClassV1(ratio) {
    return ratio === 0 || ratio === 50 || !ratio ? null : "has-background-dim-" + 10 * Math.round(ratio / 10);
  }
  function migrateDimRatio(attributes2) {
    return {
      ...attributes2,
      dimRatio: !attributes2.url ? 100 : attributes2.dimRatio
    };
  }
  function migrateTag(attributes2) {
    if (!attributes2.tagName) {
      attributes2 = {
        ...attributes2,
        tagName: "div"
      };
    }
    return {
      ...attributes2
    };
  }
  var blockAttributes2 = {
    url: {
      type: "string"
    },
    id: {
      type: "number"
    },
    hasParallax: {
      type: "boolean",
      default: false
    },
    dimRatio: {
      type: "number",
      default: 50
    },
    overlayColor: {
      type: "string"
    },
    customOverlayColor: {
      type: "string"
    },
    backgroundType: {
      type: "string",
      default: "image"
    },
    focalPoint: {
      type: "object"
    }
  };
  var v8ToV11BlockAttributes = {
    url: {
      type: "string"
    },
    id: {
      type: "number"
    },
    alt: {
      type: "string",
      source: "attribute",
      selector: "img",
      attribute: "alt",
      default: ""
    },
    hasParallax: {
      type: "boolean",
      default: false
    },
    isRepeated: {
      type: "boolean",
      default: false
    },
    dimRatio: {
      type: "number",
      default: 100
    },
    overlayColor: {
      type: "string"
    },
    customOverlayColor: {
      type: "string"
    },
    backgroundType: {
      type: "string",
      default: "image"
    },
    focalPoint: {
      type: "object"
    },
    minHeight: {
      type: "number"
    },
    minHeightUnit: {
      type: "string"
    },
    gradient: {
      type: "string"
    },
    customGradient: {
      type: "string"
    },
    contentPosition: {
      type: "string"
    },
    isDark: {
      type: "boolean",
      default: true
    },
    allowedBlocks: {
      type: "array"
    },
    templateLock: {
      type: ["string", "boolean"],
      enum: ["all", "insert", false]
    }
  };
  var v12toV13BlockAttributes = {
    ...v8ToV11BlockAttributes,
    useFeaturedImage: {
      type: "boolean",
      default: false
    },
    tagName: {
      type: "string",
      default: "div"
    }
  };
  var v14BlockAttributes = {
    ...v12toV13BlockAttributes,
    isUserOverlayColor: {
      type: "boolean"
    },
    sizeSlug: {
      type: "string"
    },
    alt: {
      type: "string",
      default: ""
    }
  };
  var v7toV11BlockSupports = {
    anchor: true,
    align: true,
    html: false,
    spacing: {
      padding: true,
      __experimentalDefaultControls: {
        padding: true
      }
    },
    color: {
      __experimentalDuotone: "> .wp-block-cover__image-background, > .wp-block-cover__video-background",
      text: false,
      background: false
    }
  };
  var v12BlockSupports = {
    ...v7toV11BlockSupports,
    spacing: {
      padding: true,
      margin: ["top", "bottom"],
      blockGap: true,
      __experimentalDefaultControls: {
        padding: true,
        blockGap: true
      }
    },
    __experimentalBorder: {
      color: true,
      radius: true,
      style: true,
      width: true,
      __experimentalDefaultControls: {
        color: true,
        radius: true,
        style: true,
        width: true
      }
    },
    color: {
      __experimentalDuotone: "> .wp-block-cover__image-background, > .wp-block-cover__video-background",
      heading: true,
      text: true,
      background: false,
      __experimentalSkipSerialization: ["gradients"],
      enableContrastChecker: false
    },
    typography: {
      fontSize: true,
      lineHeight: true,
      __experimentalFontFamily: true,
      __experimentalFontWeight: true,
      __experimentalFontStyle: true,
      __experimentalTextTransform: true,
      __experimentalTextDecoration: true,
      __experimentalLetterSpacing: true,
      __experimentalDefaultControls: {
        fontSize: true
      }
    },
    layout: {
      allowJustification: false
    }
  };
  var v14BlockSupports = {
    ...v12BlockSupports,
    shadow: true,
    dimensions: {
      aspectRatio: true
    },
    interactivity: {
      clientNavigation: true
    }
  };
  var v142 = {
    attributes: v14BlockAttributes,
    supports: v14BlockSupports,
    save({ attributes: attributes2 }) {
      const {
        backgroundType,
        gradient,
        contentPosition,
        customGradient,
        customOverlayColor,
        dimRatio,
        focalPoint,
        useFeaturedImage,
        hasParallax,
        isDark: isDark2,
        isRepeated,
        overlayColor,
        url,
        alt,
        id,
        minHeight: minHeightProp,
        minHeightUnit,
        tagName: Tag,
        sizeSlug
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const gradientClass = (0, import_block_editor61.__experimentalGetGradientClass)(gradient);
      const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
      const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
      const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
      const isImgElement = !(hasParallax || isRepeated);
      const style2 = {
        minHeight: minHeight || void 0
      };
      const bgStyle = {
        backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
        background: customGradient ? customGradient : void 0
      };
      const objectPosition = (
        // prettier-ignore
        focalPoint && isImgElement ? mediaPosition(focalPoint) : void 0
      );
      const backgroundImage = url ? `url(${url})` : void 0;
      const backgroundPosition = mediaPosition(focalPoint);
      const classes = clsx_default(
        {
          "is-light": !isDark2,
          "has-parallax": hasParallax,
          "is-repeated": isRepeated,
          "has-custom-content-position": !isContentPositionCenter(contentPosition)
        },
        getPositionClassName(contentPosition)
      );
      const imgClasses = clsx_default(
        "wp-block-cover__image-background",
        id ? `wp-image-${id}` : null,
        {
          [`size-${sizeSlug}`]: sizeSlug,
          "has-parallax": hasParallax,
          "is-repeated": isRepeated
        }
      );
      const gradientValue = gradient || customGradient;
      return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)(Tag, { ...import_block_editor61.useBlockProps.save({ className: classes, style: style2 }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "span",
          {
            "aria-hidden": "true",
            className: clsx_default(
              "wp-block-cover__background",
              overlayColorClass,
              dimRatioToClass(dimRatio),
              {
                "has-background-dim": dimRatio !== void 0,
                // For backwards compatibility. Former versions of the Cover Block applied
                // `.wp-block-cover__gradient-background` in the presence of
                // media, a gradient and a dim.
                "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
                "has-background-gradient": gradientValue,
                [gradientClass]: gradientClass
              }
            ),
            style: bgStyle
          }
        ),
        !useFeaturedImage && isImageBackground && url && (isImgElement ? /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "img",
          {
            className: imgClasses,
            alt,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ) : /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "div",
          {
            role: alt ? "img" : void 0,
            "aria-label": alt ? alt : void 0,
            className: imgClasses,
            style: { backgroundPosition, backgroundImage }
          }
        )),
        isVideoBackground && url && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "video",
          {
            className: clsx_default(
              "wp-block-cover__video-background",
              "intrinsic-ignore"
            ),
            autoPlay: true,
            muted: true,
            loop: true,
            playsInline: true,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "div",
          {
            ...import_block_editor61.useInnerBlocksProps.save({
              className: "wp-block-cover__inner-container"
            })
          }
        )
      ] });
    }
  };
  var v132 = {
    attributes: v12toV13BlockAttributes,
    supports: v12BlockSupports,
    save({ attributes: attributes2 }) {
      const {
        backgroundType,
        gradient,
        contentPosition,
        customGradient,
        customOverlayColor,
        dimRatio,
        focalPoint,
        useFeaturedImage,
        hasParallax,
        isDark: isDark2,
        isRepeated,
        overlayColor,
        url,
        alt,
        id,
        minHeight: minHeightProp,
        minHeightUnit,
        tagName: Tag
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const gradientClass = (0, import_block_editor61.__experimentalGetGradientClass)(gradient);
      const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
      const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
      const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
      const isImgElement = !(hasParallax || isRepeated);
      const style2 = {
        minHeight: minHeight || void 0
      };
      const bgStyle = {
        backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
        background: customGradient ? customGradient : void 0
      };
      const objectPosition = (
        // prettier-ignore
        focalPoint && isImgElement ? mediaPosition(focalPoint) : void 0
      );
      const backgroundImage = url ? `url(${url})` : void 0;
      const backgroundPosition = mediaPosition(focalPoint);
      const classes = clsx_default(
        {
          "is-light": !isDark2,
          "has-parallax": hasParallax,
          "is-repeated": isRepeated,
          "has-custom-content-position": !isContentPositionCenter(contentPosition)
        },
        getPositionClassName(contentPosition)
      );
      const imgClasses = clsx_default(
        "wp-block-cover__image-background",
        id ? `wp-image-${id}` : null,
        {
          "has-parallax": hasParallax,
          "is-repeated": isRepeated
        }
      );
      const gradientValue = gradient || customGradient;
      return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)(Tag, { ...import_block_editor61.useBlockProps.save({ className: classes, style: style2 }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "span",
          {
            "aria-hidden": "true",
            className: clsx_default(
              "wp-block-cover__background",
              overlayColorClass,
              dimRatioToClass(dimRatio),
              {
                "has-background-dim": dimRatio !== void 0,
                // For backwards compatibility. Former versions of the Cover Block applied
                // `.wp-block-cover__gradient-background` in the presence of
                // media, a gradient and a dim.
                "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
                "has-background-gradient": gradientValue,
                [gradientClass]: gradientClass
              }
            ),
            style: bgStyle
          }
        ),
        !useFeaturedImage && isImageBackground && url && (isImgElement ? /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "img",
          {
            className: imgClasses,
            alt,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ) : /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "div",
          {
            role: "img",
            className: imgClasses,
            style: { backgroundPosition, backgroundImage }
          }
        )),
        isVideoBackground && url && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "video",
          {
            className: clsx_default(
              "wp-block-cover__video-background",
              "intrinsic-ignore"
            ),
            autoPlay: true,
            muted: true,
            loop: true,
            playsInline: true,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "div",
          {
            ...import_block_editor61.useInnerBlocksProps.save({
              className: "wp-block-cover__inner-container"
            })
          }
        )
      ] });
    }
  };
  var v122 = {
    attributes: v12toV13BlockAttributes,
    supports: v12BlockSupports,
    isEligible(attributes2) {
      return (attributes2.customOverlayColor !== void 0 || attributes2.overlayColor !== void 0) && attributes2.isUserOverlayColor === void 0;
    },
    migrate(attributes2) {
      return {
        ...attributes2,
        isUserOverlayColor: true
      };
    },
    save({ attributes: attributes2 }) {
      const {
        backgroundType,
        gradient,
        contentPosition,
        customGradient,
        customOverlayColor,
        dimRatio,
        focalPoint,
        useFeaturedImage,
        hasParallax,
        isDark: isDark2,
        isRepeated,
        overlayColor,
        url,
        alt,
        id,
        minHeight: minHeightProp,
        minHeightUnit,
        tagName: Tag
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const gradientClass = (0, import_block_editor61.__experimentalGetGradientClass)(gradient);
      const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
      const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
      const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
      const isImgElement = !(hasParallax || isRepeated);
      const style2 = {
        minHeight: minHeight || void 0
      };
      const bgStyle = {
        backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
        background: customGradient ? customGradient : void 0
      };
      const objectPosition = (
        // prettier-ignore
        focalPoint && isImgElement ? mediaPosition(focalPoint) : void 0
      );
      const backgroundImage = url ? `url(${url})` : void 0;
      const backgroundPosition = mediaPosition(focalPoint);
      const classes = clsx_default(
        {
          "is-light": !isDark2,
          "has-parallax": hasParallax,
          "is-repeated": isRepeated,
          "has-custom-content-position": !isContentPositionCenter(contentPosition)
        },
        getPositionClassName(contentPosition)
      );
      const imgClasses = clsx_default(
        "wp-block-cover__image-background",
        id ? `wp-image-${id}` : null,
        {
          "has-parallax": hasParallax,
          "is-repeated": isRepeated
        }
      );
      const gradientValue = gradient || customGradient;
      return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)(Tag, { ...import_block_editor61.useBlockProps.save({ className: classes, style: style2 }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "span",
          {
            "aria-hidden": "true",
            className: clsx_default(
              "wp-block-cover__background",
              overlayColorClass,
              dimRatioToClass(dimRatio),
              {
                "has-background-dim": dimRatio !== void 0,
                // For backwards compatibility. Former versions of the Cover Block applied
                // `.wp-block-cover__gradient-background` in the presence of
                // media, a gradient and a dim.
                "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
                "has-background-gradient": gradientValue,
                [gradientClass]: gradientClass
              }
            ),
            style: bgStyle
          }
        ),
        !useFeaturedImage && isImageBackground && url && (isImgElement ? /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "img",
          {
            className: imgClasses,
            alt,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ) : /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "div",
          {
            role: "img",
            className: imgClasses,
            style: { backgroundPosition, backgroundImage }
          }
        )),
        isVideoBackground && url && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "video",
          {
            className: clsx_default(
              "wp-block-cover__video-background",
              "intrinsic-ignore"
            ),
            autoPlay: true,
            muted: true,
            loop: true,
            playsInline: true,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "div",
          {
            ...import_block_editor61.useInnerBlocksProps.save({
              className: "wp-block-cover__inner-container"
            })
          }
        )
      ] });
    }
  };
  var v112 = {
    attributes: v8ToV11BlockAttributes,
    supports: v7toV11BlockSupports,
    save({ attributes: attributes2 }) {
      const {
        backgroundType,
        gradient,
        contentPosition,
        customGradient,
        customOverlayColor,
        dimRatio,
        focalPoint,
        useFeaturedImage,
        hasParallax,
        isDark: isDark2,
        isRepeated,
        overlayColor,
        url,
        alt,
        id,
        minHeight: minHeightProp,
        minHeightUnit
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const gradientClass = (0, import_block_editor61.__experimentalGetGradientClass)(gradient);
      const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
      const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
      const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
      const isImgElement = !(hasParallax || isRepeated);
      const style2 = {
        minHeight: minHeight || void 0
      };
      const bgStyle = {
        backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
        background: customGradient ? customGradient : void 0
      };
      const objectPosition = (
        // prettier-ignore
        focalPoint && isImgElement ? mediaPosition(focalPoint) : void 0
      );
      const backgroundImage = url ? `url(${url})` : void 0;
      const backgroundPosition = mediaPosition(focalPoint);
      const classes = clsx_default(
        {
          "is-light": !isDark2,
          "has-parallax": hasParallax,
          "is-repeated": isRepeated,
          "has-custom-content-position": !isContentPositionCenter(contentPosition)
        },
        getPositionClassName(contentPosition)
      );
      const imgClasses = clsx_default(
        "wp-block-cover__image-background",
        id ? `wp-image-${id}` : null,
        {
          "has-parallax": hasParallax,
          "is-repeated": isRepeated
        }
      );
      const gradientValue = gradient || customGradient;
      return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)("div", { ...import_block_editor61.useBlockProps.save({ className: classes, style: style2 }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "span",
          {
            "aria-hidden": "true",
            className: clsx_default(
              "wp-block-cover__background",
              overlayColorClass,
              dimRatioToClass(dimRatio),
              {
                "has-background-dim": dimRatio !== void 0,
                // For backwards compatibility. Former versions of the Cover Block applied
                // `.wp-block-cover__gradient-background` in the presence of
                // media, a gradient and a dim.
                "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
                "has-background-gradient": gradientValue,
                [gradientClass]: gradientClass
              }
            ),
            style: bgStyle
          }
        ),
        !useFeaturedImage && isImageBackground && url && (isImgElement ? /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "img",
          {
            className: imgClasses,
            alt,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ) : /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "div",
          {
            role: "img",
            className: imgClasses,
            style: { backgroundPosition, backgroundImage }
          }
        )),
        isVideoBackground && url && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "video",
          {
            className: clsx_default(
              "wp-block-cover__video-background",
              "intrinsic-ignore"
            ),
            autoPlay: true,
            muted: true,
            loop: true,
            playsInline: true,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "div",
          {
            ...import_block_editor61.useInnerBlocksProps.save({
              className: "wp-block-cover__inner-container"
            })
          }
        )
      ] });
    },
    migrate: migrateTag
  };
  var v102 = {
    attributes: v8ToV11BlockAttributes,
    supports: v7toV11BlockSupports,
    save({ attributes: attributes2 }) {
      const {
        backgroundType,
        gradient,
        contentPosition,
        customGradient,
        customOverlayColor,
        dimRatio,
        focalPoint,
        useFeaturedImage,
        hasParallax,
        isDark: isDark2,
        isRepeated,
        overlayColor,
        url,
        alt,
        id,
        minHeight: minHeightProp,
        minHeightUnit
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const gradientClass = (0, import_block_editor61.__experimentalGetGradientClass)(gradient);
      const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
      const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
      const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
      const isImgElement = !(hasParallax || isRepeated);
      const style2 = {
        ...isImageBackground && !isImgElement && !useFeaturedImage ? backgroundImageStyles(url) : {},
        minHeight: minHeight || void 0
      };
      const bgStyle = {
        backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
        background: customGradient ? customGradient : void 0
      };
      const objectPosition = (
        // prettier-ignore
        focalPoint && isImgElement ? `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%` : void 0
      );
      const classes = clsx_default(
        {
          "is-light": !isDark2,
          "has-parallax": hasParallax,
          "is-repeated": isRepeated,
          "has-custom-content-position": !isContentPositionCenter(contentPosition)
        },
        getPositionClassName(contentPosition)
      );
      const gradientValue = gradient || customGradient;
      return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)("div", { ...import_block_editor61.useBlockProps.save({ className: classes, style: style2 }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "span",
          {
            "aria-hidden": "true",
            className: clsx_default(
              "wp-block-cover__background",
              overlayColorClass,
              dimRatioToClass(dimRatio),
              {
                "has-background-dim": dimRatio !== void 0,
                // For backwards compatibility. Former versions of the Cover Block applied
                // `.wp-block-cover__gradient-background` in the presence of
                // media, a gradient and a dim.
                "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
                "has-background-gradient": gradientValue,
                [gradientClass]: gradientClass
              }
            ),
            style: bgStyle
          }
        ),
        !useFeaturedImage && isImageBackground && isImgElement && url && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "img",
          {
            className: clsx_default(
              "wp-block-cover__image-background",
              id ? `wp-image-${id}` : null
            ),
            alt,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ),
        isVideoBackground && url && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "video",
          {
            className: clsx_default(
              "wp-block-cover__video-background",
              "intrinsic-ignore"
            ),
            autoPlay: true,
            muted: true,
            loop: true,
            playsInline: true,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "div",
          {
            ...import_block_editor61.useInnerBlocksProps.save({
              className: "wp-block-cover__inner-container"
            })
          }
        )
      ] });
    },
    migrate: migrateTag
  };
  var v9 = {
    attributes: v8ToV11BlockAttributes,
    supports: v7toV11BlockSupports,
    save({ attributes: attributes2 }) {
      const {
        backgroundType,
        gradient,
        contentPosition,
        customGradient,
        customOverlayColor,
        dimRatio,
        focalPoint,
        hasParallax,
        isDark: isDark2,
        isRepeated,
        overlayColor,
        url,
        alt,
        id,
        minHeight: minHeightProp,
        minHeightUnit
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const gradientClass = (0, import_block_editor61.__experimentalGetGradientClass)(gradient);
      const minHeight = minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
      const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
      const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
      const isImgElement = !(hasParallax || isRepeated);
      const style2 = {
        ...isImageBackground && !isImgElement ? backgroundImageStyles(url) : {},
        minHeight: minHeight || void 0
      };
      const bgStyle = {
        backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
        background: customGradient ? customGradient : void 0
      };
      const objectPosition = (
        // prettier-ignore
        focalPoint && isImgElement ? `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%` : void 0
      );
      const classes = clsx_default(
        {
          "is-light": !isDark2,
          "has-parallax": hasParallax,
          "is-repeated": isRepeated,
          "has-custom-content-position": !isContentPositionCenter(contentPosition)
        },
        getPositionClassName(contentPosition)
      );
      const gradientValue = gradient || customGradient;
      return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)("div", { ...import_block_editor61.useBlockProps.save({ className: classes, style: style2 }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "span",
          {
            "aria-hidden": "true",
            className: clsx_default(
              "wp-block-cover__background",
              overlayColorClass,
              dimRatioToClass(dimRatio),
              {
                "has-background-dim": dimRatio !== void 0,
                // For backwards compatibility. Former versions of the Cover Block applied
                // `.wp-block-cover__gradient-background` in the presence of
                // media, a gradient and a dim.
                "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
                "has-background-gradient": gradientValue,
                [gradientClass]: gradientClass
              }
            ),
            style: bgStyle
          }
        ),
        isImageBackground && isImgElement && url && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "img",
          {
            className: clsx_default(
              "wp-block-cover__image-background",
              id ? `wp-image-${id}` : null
            ),
            alt,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ),
        isVideoBackground && url && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "video",
          {
            className: clsx_default(
              "wp-block-cover__video-background",
              "intrinsic-ignore"
            ),
            autoPlay: true,
            muted: true,
            loop: true,
            playsInline: true,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "div",
          {
            ...import_block_editor61.useInnerBlocksProps.save({
              className: "wp-block-cover__inner-container"
            })
          }
        )
      ] });
    },
    migrate: migrateTag
  };
  var v8 = {
    attributes: v8ToV11BlockAttributes,
    supports: v7toV11BlockSupports,
    save({ attributes: attributes2 }) {
      const {
        backgroundType,
        gradient,
        contentPosition,
        customGradient,
        customOverlayColor,
        dimRatio,
        focalPoint,
        hasParallax,
        isDark: isDark2,
        isRepeated,
        overlayColor,
        url,
        alt,
        id,
        minHeight: minHeightProp,
        minHeightUnit
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const gradientClass = (0, import_block_editor61.__experimentalGetGradientClass)(gradient);
      const minHeight = minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
      const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
      const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
      const isImgElement = !(hasParallax || isRepeated);
      const style2 = {
        ...isImageBackground && !isImgElement ? backgroundImageStyles(url) : {},
        minHeight: minHeight || void 0
      };
      const bgStyle = {
        backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
        background: customGradient ? customGradient : void 0
      };
      const objectPosition = (
        // prettier-ignore
        focalPoint && isImgElement ? `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%` : void 0
      );
      const classes = clsx_default(
        {
          "is-light": !isDark2,
          "has-parallax": hasParallax,
          "is-repeated": isRepeated,
          "has-custom-content-position": !isContentPositionCenter(contentPosition)
        },
        getPositionClassName(contentPosition)
      );
      return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)("div", { ...import_block_editor61.useBlockProps.save({ className: classes, style: style2 }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "span",
          {
            "aria-hidden": "true",
            className: clsx_default(
              overlayColorClass,
              dimRatioToClass(dimRatio),
              "wp-block-cover__gradient-background",
              gradientClass,
              {
                "has-background-dim": dimRatio !== void 0,
                "has-background-gradient": gradient || customGradient,
                [gradientClass]: !url && gradientClass
              }
            ),
            style: bgStyle
          }
        ),
        isImageBackground && isImgElement && url && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "img",
          {
            className: clsx_default(
              "wp-block-cover__image-background",
              id ? `wp-image-${id}` : null
            ),
            alt,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ),
        isVideoBackground && url && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "video",
          {
            className: clsx_default(
              "wp-block-cover__video-background",
              "intrinsic-ignore"
            ),
            autoPlay: true,
            muted: true,
            loop: true,
            playsInline: true,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "div",
          {
            ...import_block_editor61.useInnerBlocksProps.save({
              className: "wp-block-cover__inner-container"
            })
          }
        )
      ] });
    },
    migrate: migrateTag
  };
  var v7 = {
    attributes: {
      ...blockAttributes2,
      isRepeated: {
        type: "boolean",
        default: false
      },
      minHeight: {
        type: "number"
      },
      minHeightUnit: {
        type: "string"
      },
      gradient: {
        type: "string"
      },
      customGradient: {
        type: "string"
      },
      contentPosition: {
        type: "string"
      },
      alt: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "alt",
        default: ""
      }
    },
    supports: v7toV11BlockSupports,
    save({ attributes: attributes2 }) {
      const {
        backgroundType,
        gradient,
        contentPosition,
        customGradient,
        customOverlayColor,
        dimRatio,
        focalPoint,
        hasParallax,
        isRepeated,
        overlayColor,
        url,
        alt,
        id,
        minHeight: minHeightProp,
        minHeightUnit
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const gradientClass = (0, import_block_editor61.__experimentalGetGradientClass)(gradient);
      const minHeight = minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
      const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
      const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
      const isImgElement = !(hasParallax || isRepeated);
      const style2 = {
        ...isImageBackground && !isImgElement ? backgroundImageStyles(url) : {},
        backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
        background: customGradient && !url ? customGradient : void 0,
        minHeight: minHeight || void 0
      };
      const objectPosition = (
        // prettier-ignore
        focalPoint && isImgElement ? `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%` : void 0
      );
      const classes = clsx_default(
        dimRatioToClassV1(dimRatio),
        overlayColorClass,
        {
          "has-background-dim": dimRatio !== 0,
          "has-parallax": hasParallax,
          "is-repeated": isRepeated,
          "has-background-gradient": gradient || customGradient,
          [gradientClass]: !url && gradientClass,
          "has-custom-content-position": !isContentPositionCenter(contentPosition)
        },
        getPositionClassName(contentPosition)
      );
      return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)("div", { ...import_block_editor61.useBlockProps.save({ className: classes, style: style2 }), children: [
        url && (gradient || customGradient) && dimRatio !== 0 && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "span",
          {
            "aria-hidden": "true",
            className: clsx_default(
              "wp-block-cover__gradient-background",
              gradientClass
            ),
            style: customGradient ? { background: customGradient } : void 0
          }
        ),
        isImageBackground && isImgElement && url && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "img",
          {
            className: clsx_default(
              "wp-block-cover__image-background",
              id ? `wp-image-${id}` : null
            ),
            alt,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ),
        isVideoBackground && url && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "video",
          {
            className: clsx_default(
              "wp-block-cover__video-background",
              "intrinsic-ignore"
            ),
            autoPlay: true,
            muted: true,
            loop: true,
            playsInline: true,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime218.jsx)("div", { className: "wp-block-cover__inner-container", children: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(import_block_editor61.InnerBlocks.Content, {}) })
      ] });
    },
    migrate: (0, import_compose14.compose)(migrateDimRatio, migrateTag)
  };
  var v6 = {
    attributes: {
      ...blockAttributes2,
      isRepeated: {
        type: "boolean",
        default: false
      },
      minHeight: {
        type: "number"
      },
      minHeightUnit: {
        type: "string"
      },
      gradient: {
        type: "string"
      },
      customGradient: {
        type: "string"
      },
      contentPosition: {
        type: "string"
      }
    },
    supports: {
      align: true
    },
    save({ attributes: attributes2 }) {
      const {
        backgroundType,
        gradient,
        contentPosition,
        customGradient,
        customOverlayColor,
        dimRatio,
        focalPoint,
        hasParallax,
        isRepeated,
        overlayColor,
        url,
        minHeight: minHeightProp,
        minHeightUnit
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const gradientClass = (0, import_block_editor61.__experimentalGetGradientClass)(gradient);
      const minHeight = minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
      const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
      const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
      const style2 = isImageBackground ? backgroundImageStyles(url) : {};
      const videoStyle = {};
      if (!overlayColorClass) {
        style2.backgroundColor = customOverlayColor;
      }
      if (customGradient && !url) {
        style2.background = customGradient;
      }
      style2.minHeight = minHeight || void 0;
      let positionValue;
      if (focalPoint) {
        positionValue = `${Math.round(
          focalPoint.x * 100
        )}% ${Math.round(focalPoint.y * 100)}%`;
        if (isImageBackground && !hasParallax) {
          style2.backgroundPosition = positionValue;
        }
        if (isVideoBackground) {
          videoStyle.objectPosition = positionValue;
        }
      }
      const classes = clsx_default(
        dimRatioToClassV1(dimRatio),
        overlayColorClass,
        {
          "has-background-dim": dimRatio !== 0,
          "has-parallax": hasParallax,
          "is-repeated": isRepeated,
          "has-background-gradient": gradient || customGradient,
          [gradientClass]: !url && gradientClass,
          "has-custom-content-position": !isContentPositionCenter(contentPosition)
        },
        getPositionClassName(contentPosition)
      );
      return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)("div", { ...import_block_editor61.useBlockProps.save({ className: classes, style: style2 }), children: [
        url && (gradient || customGradient) && dimRatio !== 0 && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "span",
          {
            "aria-hidden": "true",
            className: clsx_default(
              "wp-block-cover__gradient-background",
              gradientClass
            ),
            style: customGradient ? { background: customGradient } : void 0
          }
        ),
        isVideoBackground && url && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "video",
          {
            className: "wp-block-cover__video-background",
            autoPlay: true,
            muted: true,
            loop: true,
            playsInline: true,
            src: url,
            style: videoStyle
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime218.jsx)("div", { className: "wp-block-cover__inner-container", children: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(import_block_editor61.InnerBlocks.Content, {}) })
      ] });
    },
    migrate: (0, import_compose14.compose)(migrateDimRatio, migrateTag)
  };
  var v5 = {
    attributes: {
      ...blockAttributes2,
      minHeight: {
        type: "number"
      },
      gradient: {
        type: "string"
      },
      customGradient: {
        type: "string"
      }
    },
    supports: {
      align: true
    },
    save({ attributes: attributes2 }) {
      const {
        backgroundType,
        gradient,
        customGradient,
        customOverlayColor,
        dimRatio,
        focalPoint,
        hasParallax,
        overlayColor,
        url,
        minHeight
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const gradientClass = (0, import_block_editor61.__experimentalGetGradientClass)(gradient);
      const style2 = backgroundType === IMAGE_BACKGROUND_TYPE ? backgroundImageStyles(url) : {};
      if (!overlayColorClass) {
        style2.backgroundColor = customOverlayColor;
      }
      if (focalPoint && !hasParallax) {
        style2.backgroundPosition = `${Math.round(
          focalPoint.x * 100
        )}% ${Math.round(focalPoint.y * 100)}%`;
      }
      if (customGradient && !url) {
        style2.background = customGradient;
      }
      style2.minHeight = minHeight || void 0;
      const classes = clsx_default(
        dimRatioToClassV1(dimRatio),
        overlayColorClass,
        {
          "has-background-dim": dimRatio !== 0,
          "has-parallax": hasParallax,
          "has-background-gradient": customGradient,
          [gradientClass]: !url && gradientClass
        }
      );
      return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)("div", { className: classes, style: style2, children: [
        url && (gradient || customGradient) && dimRatio !== 0 && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "span",
          {
            "aria-hidden": "true",
            className: clsx_default(
              "wp-block-cover__gradient-background",
              gradientClass
            ),
            style: customGradient ? { background: customGradient } : void 0
          }
        ),
        VIDEO_BACKGROUND_TYPE === backgroundType && url && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "video",
          {
            className: "wp-block-cover__video-background",
            autoPlay: true,
            muted: true,
            loop: true,
            src: url
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime218.jsx)("div", { className: "wp-block-cover__inner-container", children: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(import_block_editor61.InnerBlocks.Content, {}) })
      ] });
    },
    migrate: (0, import_compose14.compose)(migrateDimRatio, migrateTag)
  };
  var v4 = {
    attributes: {
      ...blockAttributes2,
      minHeight: {
        type: "number"
      },
      gradient: {
        type: "string"
      },
      customGradient: {
        type: "string"
      }
    },
    supports: {
      align: true
    },
    save({ attributes: attributes2 }) {
      const {
        backgroundType,
        gradient,
        customGradient,
        customOverlayColor,
        dimRatio,
        focalPoint,
        hasParallax,
        overlayColor,
        url,
        minHeight
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const gradientClass = (0, import_block_editor61.__experimentalGetGradientClass)(gradient);
      const style2 = backgroundType === IMAGE_BACKGROUND_TYPE ? backgroundImageStyles(url) : {};
      if (!overlayColorClass) {
        style2.backgroundColor = customOverlayColor;
      }
      if (focalPoint && !hasParallax) {
        style2.backgroundPosition = `${focalPoint.x * 100}% ${focalPoint.y * 100}%`;
      }
      if (customGradient && !url) {
        style2.background = customGradient;
      }
      style2.minHeight = minHeight || void 0;
      const classes = clsx_default(
        dimRatioToClassV1(dimRatio),
        overlayColorClass,
        {
          "has-background-dim": dimRatio !== 0,
          "has-parallax": hasParallax,
          "has-background-gradient": customGradient,
          [gradientClass]: !url && gradientClass
        }
      );
      return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)("div", { className: classes, style: style2, children: [
        url && (gradient || customGradient) && dimRatio !== 0 && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "span",
          {
            "aria-hidden": "true",
            className: clsx_default(
              "wp-block-cover__gradient-background",
              gradientClass
            ),
            style: customGradient ? { background: customGradient } : void 0
          }
        ),
        VIDEO_BACKGROUND_TYPE === backgroundType && url && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "video",
          {
            className: "wp-block-cover__video-background",
            autoPlay: true,
            muted: true,
            loop: true,
            src: url
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime218.jsx)("div", { className: "wp-block-cover__inner-container", children: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(import_block_editor61.InnerBlocks.Content, {}) })
      ] });
    },
    migrate: (0, import_compose14.compose)(migrateDimRatio, migrateTag)
  };
  var v3 = {
    attributes: {
      ...blockAttributes2,
      title: {
        type: "string",
        source: "html",
        selector: "p"
      },
      contentAlign: {
        type: "string",
        default: "center"
      }
    },
    supports: {
      align: true
    },
    save({ attributes: attributes2 }) {
      const {
        backgroundType,
        contentAlign,
        customOverlayColor,
        dimRatio,
        focalPoint,
        hasParallax,
        overlayColor,
        title,
        url
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const style2 = backgroundType === IMAGE_BACKGROUND_TYPE ? backgroundImageStyles(url) : {};
      if (!overlayColorClass) {
        style2.backgroundColor = customOverlayColor;
      }
      if (focalPoint && !hasParallax) {
        style2.backgroundPosition = `${focalPoint.x * 100}% ${focalPoint.y * 100}%`;
      }
      const classes = clsx_default(
        dimRatioToClassV1(dimRatio),
        overlayColorClass,
        {
          "has-background-dim": dimRatio !== 0,
          "has-parallax": hasParallax,
          [`has-${contentAlign}-content`]: contentAlign !== "center"
        }
      );
      return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)("div", { className: classes, style: style2, children: [
        VIDEO_BACKGROUND_TYPE === backgroundType && url && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          "video",
          {
            className: "wp-block-cover__video-background",
            autoPlay: true,
            muted: true,
            loop: true,
            src: url
          }
        ),
        !import_block_editor61.RichText.isEmpty(title) && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          import_block_editor61.RichText.Content,
          {
            tagName: "p",
            className: "wp-block-cover-text",
            value: title
          }
        )
      ] });
    },
    migrate(attributes2) {
      const newAttribs = {
        ...attributes2,
        dimRatio: !attributes2.url ? 100 : attributes2.dimRatio,
        tagName: !attributes2.tagName ? "div" : attributes2.tagName
      };
      const { title, contentAlign, ...restAttributes } = newAttribs;
      return [
        restAttributes,
        [
          (0, import_blocks20.createBlock)("core/paragraph", {
            content: attributes2.title,
            style: {
              typography: {
                textAlign: attributes2.contentAlign
              }
            },
            fontSize: "large",
            placeholder: (0, import_i18n46.__)("Write title\u2026")
          })
        ]
      ];
    }
  };
  var v24 = {
    attributes: {
      ...blockAttributes2,
      title: {
        type: "string",
        source: "html",
        selector: "p"
      },
      contentAlign: {
        type: "string",
        default: "center"
      },
      align: {
        type: "string"
      }
    },
    supports: {
      className: false
    },
    save({ attributes: attributes2 }) {
      const {
        url,
        title,
        hasParallax,
        dimRatio,
        align,
        contentAlign,
        overlayColor,
        customOverlayColor
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const style2 = backgroundImageStyles(url);
      if (!overlayColorClass) {
        style2.backgroundColor = customOverlayColor;
      }
      const classes = clsx_default(
        "wp-block-cover-image",
        dimRatioToClassV1(dimRatio),
        overlayColorClass,
        {
          "has-background-dim": dimRatio !== 0,
          "has-parallax": hasParallax,
          [`has-${contentAlign}-content`]: contentAlign !== "center"
        },
        align ? `align${align}` : null
      );
      return /* @__PURE__ */ (0, import_jsx_runtime218.jsx)("div", { className: classes, style: style2, children: !import_block_editor61.RichText.isEmpty(title) && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
        import_block_editor61.RichText.Content,
        {
          tagName: "p",
          className: "wp-block-cover-image-text",
          value: title
        }
      ) });
    },
    migrate(attributes2) {
      const newAttribs = {
        ...attributes2,
        dimRatio: !attributes2.url ? 100 : attributes2.dimRatio,
        tagName: !attributes2.tagName ? "div" : attributes2.tagName
      };
      const { title, contentAlign, align, ...restAttributes } = newAttribs;
      return [
        restAttributes,
        [
          (0, import_blocks20.createBlock)("core/paragraph", {
            content: attributes2.title,
            style: {
              typography: {
                textAlign: attributes2.contentAlign
              }
            },
            fontSize: "large",
            placeholder: (0, import_i18n46.__)("Write title\u2026")
          })
        ]
      ];
    }
  };
  var v111 = {
    attributes: {
      ...blockAttributes2,
      title: {
        type: "string",
        source: "html",
        selector: "h2"
      },
      align: {
        type: "string"
      },
      contentAlign: {
        type: "string",
        default: "center"
      }
    },
    supports: {
      className: false
    },
    save({ attributes: attributes2 }) {
      const { url, title, hasParallax, dimRatio, align } = attributes2;
      const style2 = backgroundImageStyles(url);
      const classes = clsx_default(
        "wp-block-cover-image",
        dimRatioToClassV1(dimRatio),
        {
          "has-background-dim": dimRatio !== 0,
          "has-parallax": hasParallax
        },
        align ? `align${align}` : null
      );
      return /* @__PURE__ */ (0, import_jsx_runtime218.jsx)("section", { className: classes, style: style2, children: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(import_block_editor61.RichText.Content, { tagName: "h2", value: title }) });
    },
    migrate(attributes2) {
      const newAttribs = {
        ...attributes2,
        dimRatio: !attributes2.url ? 100 : attributes2.dimRatio,
        tagName: !attributes2.tagName ? "div" : attributes2.tagName
      };
      const { title, contentAlign, align, ...restAttributes } = newAttribs;
      return [
        restAttributes,
        [
          (0, import_blocks20.createBlock)("core/paragraph", {
            content: attributes2.title,
            style: {
              typography: {
                textAlign: attributes2.contentAlign
              }
            },
            fontSize: "large",
            placeholder: (0, import_i18n46.__)("Write title\u2026")
          })
        ]
      ];
    }
  };
  var deprecated_default14 = [v142, v132, v122, v112, v102, v9, v8, v7, v6, v5, v4, v3, v24, v111];

  // packages/block-library/build-module/cover/edit/index.mjs
  var import_core_data16 = __toESM(require_core_data(), 1);
  var import_element24 = __toESM(require_element(), 1);
  var import_components34 = __toESM(require_components(), 1);
  var import_compose17 = __toESM(require_compose(), 1);
  var import_block_editor67 = __toESM(require_block_editor(), 1);
  var import_i18n52 = __toESM(require_i18n(), 1);
  var import_data30 = __toESM(require_data(), 1);
  var import_blob6 = __toESM(require_blob(), 1);
  var import_notices4 = __toESM(require_notices(), 1);

  // packages/block-library/build-module/cover/edit/inspector-controls.mjs
  var import_element20 = __toESM(require_element(), 1);
  var import_components31 = __toESM(require_components(), 1);
  var import_compose16 = __toESM(require_compose(), 1);
  var import_block_editor63 = __toESM(require_block_editor(), 1);
  var import_i18n48 = __toESM(require_i18n(), 1);
  var import_data29 = __toESM(require_data(), 1);
  var import_core_data15 = __toESM(require_core_data(), 1);

  // packages/block-library/build-module/cover/constants.mjs
  var DEFAULT_MEDIA_SIZE_SLUG = "full";

  // packages/block-library/build-module/utils/poster-image.mjs
  var import_block_editor62 = __toESM(require_block_editor(), 1);
  var import_notices3 = __toESM(require_notices(), 1);
  var import_components30 = __toESM(require_components(), 1);
  var import_blob5 = __toESM(require_blob(), 1);
  var import_i18n47 = __toESM(require_i18n(), 1);
  var import_element19 = __toESM(require_element(), 1);
  var import_compose15 = __toESM(require_compose(), 1);
  var import_data28 = __toESM(require_data(), 1);
  var import_jsx_runtime219 = __toESM(require_jsx_runtime(), 1);
  var POSTER_IMAGE_ALLOWED_MEDIA_TYPES = ["image"];
  function PosterImage({ poster, onChange }) {
    const posterButtonRef = (0, import_element19.useRef)();
    const [isLoading, setIsLoading] = (0, import_element19.useState)(false);
    const descriptionId = (0, import_compose15.useInstanceId)(
      PosterImage,
      "block-library-poster-image-description"
    );
    const { getSettings: getSettings2 } = (0, import_data28.useSelect)(import_block_editor62.store);
    const { createErrorNotice } = (0, import_data28.useDispatch)(import_notices3.store);
    const onDropFiles = (filesList) => {
      getSettings2().mediaUpload({
        allowedTypes: POSTER_IMAGE_ALLOWED_MEDIA_TYPES,
        filesList,
        onFileChange: ([image]) => {
          if ((0, import_blob5.isBlobURL)(image?.url)) {
            setIsLoading(true);
            return;
          }
          if (image) {
            onChange(image);
          }
          setIsLoading(false);
        },
        onError: (message) => {
          createErrorNotice(message, {
            id: "poster-image-upload-notice",
            type: "snackbar"
          });
          setIsLoading(false);
        },
        multiple: false
      });
    };
    const getPosterButtonContent = () => {
      if (!poster && isLoading) {
        return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(import_components30.Spinner, {});
      }
      return !poster ? (0, import_i18n47.__)("Set poster image") : (0, import_i18n47.__)("Replace");
    };
    return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(import_block_editor62.MediaUploadCheck, { children: /* @__PURE__ */ (0, import_jsx_runtime219.jsxs)(
      import_components30.__experimentalToolsPanelItem,
      {
        label: (0, import_i18n47.__)("Poster image"),
        isShownByDefault: true,
        hasValue: () => !!poster,
        onDeselect: () => onChange(void 0),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(import_components30.BaseControl.VisualLabel, { children: (0, import_i18n47.__)("Poster image") }),
          /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
            import_block_editor62.MediaUpload,
            {
              title: (0, import_i18n47.__)("Select poster image"),
              onSelect: onChange,
              allowedTypes: POSTER_IMAGE_ALLOWED_MEDIA_TYPES,
              render: ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime219.jsxs)("div", { className: "block-library-poster-image__container", children: [
                poster && /* @__PURE__ */ (0, import_jsx_runtime219.jsxs)(
                  import_components30.Button,
                  {
                    __next40pxDefaultSize: true,
                    onClick: open,
                    "aria-haspopup": "dialog",
                    "aria-label": (0, import_i18n47.__)(
                      "Edit or replace the poster image."
                    ),
                    className: "block-library-poster-image__preview",
                    disabled: isLoading,
                    accessibleWhenDisabled: true,
                    children: [
                      /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
                        "img",
                        {
                          src: poster,
                          alt: (0, import_i18n47.__)("Poster image preview"),
                          className: "block-library-poster-image__preview-image"
                        }
                      ),
                      isLoading && /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(import_components30.Spinner, {})
                    ]
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime219.jsxs)(
                  import_components30.__experimentalHStack,
                  {
                    className: clsx_default(
                      "block-library-poster-image__actions",
                      {
                        "block-library-poster-image__actions-select": !poster
                      }
                    ),
                    children: [
                      /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
                        import_components30.Button,
                        {
                          __next40pxDefaultSize: true,
                          onClick: open,
                          ref: posterButtonRef,
                          className: "block-library-poster-image__action",
                          "aria-describedby": descriptionId,
                          "aria-haspopup": "dialog",
                          variant: !poster ? "secondary" : void 0,
                          disabled: isLoading,
                          accessibleWhenDisabled: true,
                          children: getPosterButtonContent()
                        }
                      ),
                      /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("p", { id: descriptionId, hidden: true, children: poster ? (0, import_i18n47.sprintf)(
                        /* translators: %s: poster image URL. */
                        (0, import_i18n47.__)(
                          "The current poster image url is %s."
                        ),
                        poster
                      ) : (0, import_i18n47.__)(
                        "There is no poster image currently selected."
                      ) }),
                      !!poster && /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
                        import_components30.Button,
                        {
                          __next40pxDefaultSize: true,
                          onClick: () => {
                            onChange(void 0);
                            posterButtonRef.current.focus();
                          },
                          className: "block-library-poster-image__action",
                          disabled: isLoading,
                          accessibleWhenDisabled: true,
                          children: (0, import_i18n47.__)("Remove")
                        }
                      )
                    ]
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(import_components30.DropZone, { onFilesDrop: onDropFiles })
              ] })
            }
          )
        ]
      }
    ) });
  }
  var poster_image_default = PosterImage;

  // packages/block-library/build-module/cover/edit/inspector-controls.mjs
  var import_jsx_runtime220 = __toESM(require_jsx_runtime(), 1);
  var { cleanEmptyObject: cleanEmptyObject2, ResolutionTool, HTMLElementControl: HTMLElementControl3 } = unlock(
    import_block_editor63.privateApis
  );
  function CoverHeightInput({
    onChange,
    onUnitChange,
    unit = "px",
    value = ""
  }) {
    const instanceId = (0, import_compose16.useInstanceId)(import_components31.__experimentalUnitControl);
    const inputId = `block-cover-height-input-${instanceId}`;
    const isPx = unit === "px";
    const [availableUnits] = (0, import_block_editor63.useSettings)("spacing.units");
    const units = (0, import_components31.__experimentalUseCustomUnits)({
      availableUnits: availableUnits || ["px", "em", "rem", "vw", "vh"],
      defaultValues: { px: 430, "%": 20, em: 20, rem: 20, vw: 20, vh: 50 }
    });
    const handleOnChange = (unprocessedValue) => {
      const inputValue = unprocessedValue !== "" ? parseFloat(unprocessedValue) : void 0;
      if (isNaN(inputValue) && inputValue !== void 0) {
        return;
      }
      onChange(inputValue);
    };
    const computedValue = (0, import_element20.useMemo)(() => {
      const [parsedQuantity] = (0, import_components31.__experimentalParseQuantityAndUnitFromRawValue)(value);
      return [parsedQuantity, unit].join("");
    }, [unit, value]);
    const min = isPx ? COVER_MIN_HEIGHT : 0;
    return /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
      import_components31.__experimentalUnitControl,
      {
        __next40pxDefaultSize: true,
        label: (0, import_i18n48.__)("Minimum height"),
        id: inputId,
        isResetValueOnUnitChange: true,
        min,
        onChange: handleOnChange,
        onUnitChange,
        units,
        value: computedValue
      }
    );
  }
  function CoverInspectorControls({
    attributes: attributes2,
    setAttributes,
    clientId,
    setOverlayColor,
    coverRef,
    currentSettings,
    updateDimRatio,
    featuredImage
  }) {
    const {
      useFeaturedImage,
      id,
      dimRatio,
      focalPoint,
      hasParallax,
      isRepeated,
      minHeight,
      minHeightUnit,
      alt,
      tagName,
      poster
    } = attributes2;
    const {
      isVideoBackground,
      isImageBackground,
      mediaElement,
      url,
      overlayColor
    } = currentSettings;
    const sizeSlug = attributes2.sizeSlug || DEFAULT_MEDIA_SIZE_SLUG;
    const { gradientValue, setGradient } = (0, import_block_editor63.__experimentalUseGradient)();
    const { getSettings: getSettings2 } = (0, import_data29.useSelect)(import_block_editor63.store);
    const imageSizes = getSettings2()?.imageSizes;
    const image = (0, import_data29.useSelect)(
      (select9) => id && isImageBackground ? select9(import_core_data15.store).getEntityRecord(
        "postType",
        "attachment",
        id,
        { context: "view" }
      ) : null,
      [id, isImageBackground]
    );
    const currentBackgroundImage = useFeaturedImage ? featuredImage : image;
    function updateImage(newSizeSlug) {
      const newUrl = currentBackgroundImage?.media_details?.sizes?.[newSizeSlug]?.source_url;
      if (!newUrl) {
        return null;
      }
      setAttributes({
        url: newUrl,
        sizeSlug: newSizeSlug
      });
    }
    const imageSizeOptions = imageSizes?.filter(
      ({ slug }) => currentBackgroundImage?.media_details?.sizes?.[slug]?.source_url
    )?.map(({ name: name123, slug }) => ({ value: slug, label: name123 }));
    const toggleParallax = () => {
      setAttributes({
        hasParallax: !hasParallax,
        ...!hasParallax ? { focalPoint: void 0 } : {}
      });
    };
    const toggleIsRepeated = () => {
      setAttributes({
        isRepeated: !isRepeated
      });
    };
    const showFocalPointPicker = isVideoBackground || isImageBackground;
    const imperativeFocalPointPreview = (value) => {
      const [styleOfRef, property] = mediaElement.current ? [mediaElement.current.style, "objectPosition"] : [coverRef.current.style, "backgroundPosition"];
      styleOfRef[property] = mediaPosition(value);
    };
    const colorGradientSettings = (0, import_block_editor63.__experimentalUseMultipleOriginColorsAndGradients)();
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime220.jsxs)(import_jsx_runtime220.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(import_block_editor63.InspectorControls, { children: (!!url || useFeaturedImage) && /* @__PURE__ */ (0, import_jsx_runtime220.jsxs)(
        import_components31.__experimentalToolsPanel,
        {
          label: (0, import_i18n48.__)("Settings"),
          resetAll: () => {
            setAttributes({
              hasParallax: false,
              focalPoint: void 0,
              isRepeated: false,
              alt: "",
              poster: void 0
            });
            updateImage(DEFAULT_MEDIA_SIZE_SLUG);
          },
          dropdownMenuProps,
          children: [
            isImageBackground && /* @__PURE__ */ (0, import_jsx_runtime220.jsxs)(import_jsx_runtime220.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
                import_components31.__experimentalToolsPanelItem,
                {
                  label: (0, import_i18n48.__)("Fixed background"),
                  isShownByDefault: true,
                  hasValue: () => !!hasParallax,
                  onDeselect: () => setAttributes({
                    hasParallax: false,
                    focalPoint: void 0
                  }),
                  children: /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
                    import_components31.ToggleControl,
                    {
                      label: (0, import_i18n48.__)("Fixed background"),
                      checked: !!hasParallax,
                      onChange: toggleParallax
                    }
                  )
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
                import_components31.__experimentalToolsPanelItem,
                {
                  label: (0, import_i18n48.__)("Repeated background"),
                  isShownByDefault: true,
                  hasValue: () => isRepeated,
                  onDeselect: () => setAttributes({
                    isRepeated: false
                  }),
                  children: /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
                    import_components31.ToggleControl,
                    {
                      label: (0, import_i18n48.__)("Repeated background"),
                      checked: isRepeated,
                      onChange: toggleIsRepeated
                    }
                  )
                }
              )
            ] }),
            showFocalPointPicker && /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
              import_components31.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n48.__)("Focal point"),
                isShownByDefault: true,
                hasValue: () => !!focalPoint,
                onDeselect: () => setAttributes({
                  focalPoint: void 0
                }),
                children: /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
                  import_components31.FocalPointPicker,
                  {
                    label: (0, import_i18n48.__)("Focal point"),
                    url,
                    value: focalPoint,
                    onDragStart: imperativeFocalPointPreview,
                    onDrag: imperativeFocalPointPreview,
                    onChange: (newFocalPoint) => setAttributes({
                      focalPoint: newFocalPoint
                    })
                  }
                )
              }
            ),
            isVideoBackground && /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
              poster_image_default,
              {
                poster,
                onChange: (posterImage) => setAttributes({
                  poster: posterImage?.url
                })
              }
            ),
            !useFeaturedImage && url && !isVideoBackground && /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
              import_components31.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n48.__)("Alternative text"),
                isShownByDefault: true,
                hasValue: () => !!alt,
                onDeselect: () => setAttributes({ alt: "" }),
                children: /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
                  import_components31.TextareaControl,
                  {
                    label: (0, import_i18n48.__)("Alternative text"),
                    value: alt,
                    onChange: (newAlt) => setAttributes({ alt: newAlt }),
                    help: /* @__PURE__ */ (0, import_jsx_runtime220.jsxs)(import_jsx_runtime220.Fragment, { children: [
                      /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
                        import_components31.ExternalLink,
                        {
                          href: (
                            // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
                            (0, import_i18n48.__)(
                              "https://www.w3.org/WAI/tutorials/images/decision-tree/"
                            )
                          ),
                          children: (0, import_i18n48.__)(
                            "Describe the purpose of the image."
                          )
                        }
                      ),
                      /* @__PURE__ */ (0, import_jsx_runtime220.jsx)("br", {}),
                      (0, import_i18n48.__)(
                        "Leave empty if decorative."
                      )
                    ] })
                  }
                )
              }
            ),
            !!imageSizeOptions?.length && /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
              ResolutionTool,
              {
                value: sizeSlug,
                onChange: updateImage,
                options: imageSizeOptions,
                defaultValue: DEFAULT_MEDIA_SIZE_SLUG
              }
            )
          ]
        }
      ) }),
      colorGradientSettings.hasColorsOrGradients && /* @__PURE__ */ (0, import_jsx_runtime220.jsxs)(import_block_editor63.InspectorControls, { group: "color", children: [
        /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
          import_block_editor63.__experimentalColorGradientSettingsDropdown,
          {
            __experimentalIsRenderedInSidebar: true,
            settings: [
              {
                colorValue: overlayColor.color,
                gradientValue,
                label: (0, import_i18n48.__)("Overlay"),
                onColorChange: setOverlayColor,
                onGradientChange: setGradient,
                isShownByDefault: true,
                resetAllFilter: () => ({
                  overlayColor: void 0,
                  customOverlayColor: void 0,
                  gradient: void 0,
                  customGradient: void 0
                }),
                clearable: true
              }
            ],
            panelId: clientId,
            ...colorGradientSettings
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
          import_components31.__experimentalToolsPanelItem,
          {
            hasValue: () => {
              return dimRatio === void 0 ? false : dimRatio !== (url ? 50 : 100);
            },
            label: (0, import_i18n48.__)("Overlay opacity"),
            onDeselect: () => updateDimRatio(url ? 50 : 100),
            resetAllFilter: () => ({
              dimRatio: url ? 50 : 100
            }),
            isShownByDefault: true,
            panelId: clientId,
            children: /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
              import_components31.RangeControl,
              {
                label: (0, import_i18n48.__)("Overlay opacity"),
                value: dimRatio,
                onChange: (newDimRatio) => updateDimRatio(newDimRatio),
                min: 0,
                max: 100,
                step: 10,
                required: true,
                __next40pxDefaultSize: true
              }
            )
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(import_block_editor63.InspectorControls, { group: "dimensions", children: /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
        import_components31.__experimentalToolsPanelItem,
        {
          className: "single-column",
          hasValue: () => !!minHeight,
          label: (0, import_i18n48.__)("Minimum height"),
          onDeselect: () => setAttributes({
            minHeight: void 0,
            minHeightUnit: void 0
          }),
          resetAllFilter: () => ({
            minHeight: void 0,
            minHeightUnit: void 0
          }),
          isShownByDefault: true,
          panelId: clientId,
          children: /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
            CoverHeightInput,
            {
              value: attributes2?.style?.dimensions?.aspectRatio ? "" : minHeight,
              unit: minHeightUnit,
              onChange: (newMinHeight) => setAttributes({
                minHeight: newMinHeight,
                style: cleanEmptyObject2({
                  ...attributes2?.style,
                  dimensions: {
                    ...attributes2?.style?.dimensions,
                    aspectRatio: void 0
                    // Reset aspect ratio when minHeight is set.
                  }
                })
              }),
              onUnitChange: (nextUnit) => setAttributes({
                minHeightUnit: nextUnit
              })
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(import_block_editor63.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
        HTMLElementControl3,
        {
          tagName,
          onChange: (value) => setAttributes({ tagName: value }),
          clientId,
          options: [
            { label: (0, import_i18n48.__)("Default (<div>)"), value: "div" },
            { label: "<header>", value: "header" },
            { label: "<main>", value: "main" },
            { label: "<section>", value: "section" },
            { label: "<article>", value: "article" },
            { label: "<aside>", value: "aside" },
            { label: "<footer>", value: "footer" }
          ]
        }
      ) })
    ] });
  }

  // packages/block-library/build-module/cover/edit/block-controls.mjs
  var import_element22 = __toESM(require_element(), 1);
  var import_block_editor64 = __toESM(require_block_editor(), 1);
  var import_i18n50 = __toESM(require_i18n(), 1);
  var import_components33 = __toESM(require_components(), 1);

  // packages/block-library/build-module/cover/edit/embed-video-url-input.mjs
  var import_element21 = __toESM(require_element(), 1);
  var import_components32 = __toESM(require_components(), 1);
  var import_i18n49 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/cover/embed-video-utils.mjs
  var import_blocks21 = __toESM(require_blocks(), 1);
  var DEFAULT_EMBED_BLOCK2 = "core/embed";
  var VIDEO_PROVIDERS = [
    "youtube",
    "vimeo",
    "videopress",
    "animoto",
    "tiktok",
    "wordpress-tv"
  ];
  function isValidVideoEmbedUrl(url) {
    if (!url) {
      return false;
    }
    const embedBlock = findVideoEmbedProvider(url);
    return embedBlock !== null;
  }
  function findVideoEmbedProvider(url) {
    const embedVariations = (0, import_blocks21.getBlockVariations)(DEFAULT_EMBED_BLOCK2);
    if (!embedVariations) {
      return null;
    }
    const matchingVariation = embedVariations.find(
      ({ patterns }) => matchesPatterns(url, patterns)
    );
    if (!matchingVariation || !VIDEO_PROVIDERS.includes(matchingVariation.name)) {
      return null;
    }
    return matchingVariation;
  }
  function getBackgroundEmbedHtml(html) {
    const srcMatch = html?.match(/src=["']([^"']+)["']/);
    if (!srcMatch) {
      return null;
    }
    const iframeSrc = srcMatch[1];
    const backgroundSrc = getBackgroundVideoSrc(iframeSrc);
    return html.replace(iframeSrc, backgroundSrc);
  }
  function detectProviderFromSrc(src) {
    if (!src) {
      return null;
    }
    const lowerSrc = src.toLowerCase();
    if (lowerSrc.includes("youtube.com") || lowerSrc.includes("youtu.be")) {
      return "youtube";
    }
    if (lowerSrc.includes("vimeo.com")) {
      return "vimeo";
    }
    if (lowerSrc.includes("videopress.com")) {
      return "videopress";
    }
    if (lowerSrc.includes("animoto.com")) {
      return "animoto";
    }
    if (lowerSrc.includes("tiktok.com")) {
      return "tiktok";
    }
    if (lowerSrc.includes("wordpress.tv")) {
      return "wordpress-tv";
    }
    return null;
  }
  function getBackgroundVideoSrc(src) {
    if (!src) {
      return src;
    }
    try {
      const url = new URL(src);
      const provider = detectProviderFromSrc(src);
      switch (provider) {
        case "youtube":
          url.searchParams.set("autoplay", "1");
          url.searchParams.set("mute", "1");
          url.searchParams.set("loop", "1");
          url.searchParams.set("controls", "0");
          url.searchParams.set("showinfo", "0");
          url.searchParams.set("modestbranding", "1");
          url.searchParams.set("playsinline", "1");
          url.searchParams.set("rel", "0");
          const videoId = url.pathname.split("/").pop();
          if (videoId) {
            url.searchParams.set("playlist", videoId);
          }
          break;
        case "vimeo":
          url.searchParams.set("autoplay", "1");
          url.searchParams.set("muted", "1");
          url.searchParams.set("loop", "1");
          url.searchParams.set("background", "1");
          url.searchParams.set("controls", "0");
          break;
        case "videopress":
        case "wordpress-tv":
          url.searchParams.set("autoplay", "1");
          url.searchParams.set("loop", "1");
          url.searchParams.set("muted", "1");
          break;
        default:
          url.searchParams.set("autoplay", "1");
          url.searchParams.set("muted", "1");
          url.searchParams.set("loop", "1");
          break;
      }
      return url.toString();
    } catch (error) {
      return src;
    }
  }

  // packages/block-library/build-module/cover/edit/embed-video-url-input.mjs
  var import_jsx_runtime221 = __toESM(require_jsx_runtime(), 1);
  function EmbedVideoUrlInput({
    onSubmit,
    onClose,
    initialUrl = ""
  }) {
    const [url, setUrl] = (0, import_element21.useState)(initialUrl);
    const [error, setError] = (0, import_element21.useState)("");
    const handleConfirm = () => {
      if (!url) {
        setError((0, import_i18n49.__)("Please enter a URL."));
        return;
      }
      if (!isValidVideoEmbedUrl(url)) {
        setError(
          (0, import_i18n49.__)(
            "This URL is not supported. Please enter a valid video link from a supported provider."
          )
        );
        return;
      }
      onSubmit(url);
      onClose();
    };
    return /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
      import_components32.__experimentalConfirmDialog,
      {
        isOpen: true,
        onConfirm: handleConfirm,
        onCancel: onClose,
        confirmButtonText: (0, import_i18n49.__)("Add video"),
        size: "medium",
        children: /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)(import_components32.__experimentalVStack, { spacing: 4, children: [
          error && /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(import_components32.Notice, { status: "error", isDismissible: false, children: error }),
          /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
            import_components32.TextControl,
            {
              type: "url",
              __next40pxDefaultSize: true,
              label: (0, import_i18n49.__)("Video URL"),
              value: url,
              onChange: (value) => {
                setUrl(value);
                setError("");
              },
              placeholder: (0, import_i18n49.__)(
                "Enter YouTube, Vimeo, or other video URL"
              ),
              help: (0, import_i18n49.__)(
                "Add a background video to the cover block that will autoplay in a loop."
              )
            }
          )
        ] })
      }
    );
  }

  // packages/block-library/build-module/cover/edit/block-controls.mjs
  var import_jsx_runtime222 = __toESM(require_jsx_runtime(), 1);
  var { cleanEmptyObject: cleanEmptyObject3 } = unlock(import_block_editor64.privateApis);
  function CoverBlockControls({
    attributes: attributes2,
    setAttributes,
    onSelectMedia,
    currentSettings,
    toggleUseFeaturedImage,
    onClearMedia,
    onSelectEmbedUrl,
    blockEditingMode
  }) {
    const {
      contentPosition,
      id,
      useFeaturedImage,
      minHeight,
      minHeightUnit,
      backgroundType
    } = attributes2;
    const { hasInnerBlocks, url } = currentSettings;
    const [prevMinHeightValue, setPrevMinHeightValue] = (0, import_element22.useState)(minHeight);
    const [prevMinHeightUnit, setPrevMinHeightUnit] = (0, import_element22.useState)(minHeightUnit);
    const [isEmbedUrlInputOpen, setIsEmbedUrlInputOpen] = (0, import_element22.useState)(false);
    const isMinFullHeight = minHeightUnit === "vh" && minHeight === 100 && !attributes2?.style?.dimensions?.aspectRatio;
    const isContentOnlyMode = blockEditingMode === "contentOnly";
    const toggleMinFullHeight = () => {
      if (isMinFullHeight) {
        if (prevMinHeightUnit === "vh" && prevMinHeightValue === 100) {
          return setAttributes({
            minHeight: void 0,
            minHeightUnit: void 0
          });
        }
        return setAttributes({
          minHeight: prevMinHeightValue,
          minHeightUnit: prevMinHeightUnit
        });
      }
      setPrevMinHeightValue(minHeight);
      setPrevMinHeightUnit(minHeightUnit);
      return setAttributes({
        minHeight: 100,
        minHeightUnit: "vh",
        style: cleanEmptyObject3({
          ...attributes2?.style,
          dimensions: {
            ...attributes2?.style?.dimensions,
            aspectRatio: void 0
            // Reset aspect ratio when minHeight is set.
          }
        })
      });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime222.jsxs)(import_jsx_runtime222.Fragment, { children: [
      !isContentOnlyMode && /* @__PURE__ */ (0, import_jsx_runtime222.jsxs)(import_block_editor64.BlockControls, { group: "block", children: [
        /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(
          import_block_editor64.__experimentalBlockAlignmentMatrixControl,
          {
            label: (0, import_i18n50.__)("Change content position"),
            value: contentPosition,
            onChange: (nextPosition) => setAttributes({
              contentPosition: nextPosition
            }),
            isDisabled: !hasInnerBlocks
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(
          import_block_editor64.__experimentalBlockFullHeightAligmentControl,
          {
            isActive: isMinFullHeight,
            onToggle: toggleMinFullHeight,
            isDisabled: !hasInnerBlocks
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(import_block_editor64.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(
        import_block_editor64.MediaReplaceFlow,
        {
          mediaId: id,
          mediaURL: url,
          allowedTypes: ALLOWED_MEDIA_TYPES2,
          onSelect: onSelectMedia,
          onToggleFeaturedImage: toggleUseFeaturedImage,
          useFeaturedImage,
          name: !url ? (0, import_i18n50.__)("Add media") : (0, import_i18n50.__)("Replace"),
          onReset: onClearMedia,
          variant: "toolbar",
          children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(
            import_components33.MenuItem,
            {
              icon: link_default,
              onClick: () => {
                setIsEmbedUrlInputOpen(true);
                onClose();
              },
              children: (0, import_i18n50.__)("Embed video from URL")
            }
          )
        }
      ) }),
      isEmbedUrlInputOpen && /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(
        EmbedVideoUrlInput,
        {
          onSubmit: (embedUrl) => {
            onSelectEmbedUrl(embedUrl);
          },
          onClose: () => setIsEmbedUrlInputOpen(false),
          initialUrl: backgroundType === EMBED_VIDEO_BACKGROUND_TYPE ? url : ""
        }
      )
    ] });
  }

  // packages/block-library/build-module/cover/edit/cover-placeholder.mjs
  var import_block_editor65 = __toESM(require_block_editor(), 1);
  var import_i18n51 = __toESM(require_i18n(), 1);
  var import_jsx_runtime223 = __toESM(require_jsx_runtime(), 1);
  function CoverPlaceholder({
    disableMediaButtons = false,
    children,
    onSelectMedia,
    onError,
    style: style2,
    toggleUseFeaturedImage
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(
      import_block_editor65.MediaPlaceholder,
      {
        icon: /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(import_block_editor65.BlockIcon, { icon: cover_default }),
        labels: {
          title: (0, import_i18n51.__)("Cover")
        },
        onSelect: onSelectMedia,
        allowedTypes: ALLOWED_MEDIA_TYPES2,
        disableMediaButtons,
        onToggleFeaturedImage: toggleUseFeaturedImage,
        onError,
        style: style2,
        children
      }
    );
  }

  // packages/block-library/build-module/cover/edit/resizable-cover-popover.mjs
  var import_element23 = __toESM(require_element(), 1);
  var import_block_editor66 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime224 = __toESM(require_jsx_runtime(), 1);
  var RESIZABLE_BOX_ENABLE_OPTION = {
    top: false,
    right: false,
    bottom: true,
    left: false,
    topRight: false,
    bottomRight: false,
    bottomLeft: false,
    topLeft: false
  };
  var { ResizableBoxPopover } = unlock(import_block_editor66.privateApis);
  function ResizableCoverPopover({
    className,
    height,
    minHeight,
    onResize,
    onResizeStart,
    onResizeStop,
    showHandle,
    size,
    width,
    ...props
  }) {
    const [isResizing, setIsResizing] = (0, import_element23.useState)(false);
    const resizableBoxProps = {
      className: clsx_default(className, { "is-resizing": isResizing }),
      enable: RESIZABLE_BOX_ENABLE_OPTION,
      onResizeStart: (_event, _direction, elt) => {
        onResizeStart(elt.clientHeight);
        onResize(elt.clientHeight);
      },
      onResize: (_event, _direction, elt) => {
        onResize(elt.clientHeight);
        if (!isResizing) {
          setIsResizing(true);
        }
      },
      onResizeStop: (_event, _direction, elt) => {
        onResizeStop(elt.clientHeight);
        setIsResizing(false);
      },
      showHandle,
      size,
      __experimentalShowTooltip: true,
      __experimentalTooltipProps: {
        axis: "y",
        position: "bottom",
        isVisible: isResizing
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
      ResizableBoxPopover,
      {
        className: "block-library-cover__resizable-box-popover",
        resizableBoxProps,
        ...props
      }
    );
  }

  // node_modules/colord/index.mjs
  var r2 = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) };
  var t = function(r3) {
    return "string" == typeof r3 ? r3.length > 0 : "number" == typeof r3;
  };
  var n = function(r3, t2, n2) {
    return void 0 === t2 && (t2 = 0), void 0 === n2 && (n2 = Math.pow(10, t2)), Math.round(n2 * r3) / n2 + 0;
  };
  var e = function(r3, t2, n2) {
    return void 0 === t2 && (t2 = 0), void 0 === n2 && (n2 = 1), r3 > n2 ? n2 : r3 > t2 ? r3 : t2;
  };
  var u = function(r3) {
    return (r3 = isFinite(r3) ? r3 % 360 : 0) > 0 ? r3 : r3 + 360;
  };
  var a = function(r3) {
    return { r: e(r3.r, 0, 255), g: e(r3.g, 0, 255), b: e(r3.b, 0, 255), a: e(r3.a) };
  };
  var o = function(r3) {
    return { r: n(r3.r), g: n(r3.g), b: n(r3.b), a: n(r3.a, 3) };
  };
  var i = /^#([0-9a-f]{3,8})$/i;
  var s = function(r3) {
    var t2 = r3.toString(16);
    return t2.length < 2 ? "0" + t2 : t2;
  };
  var h = function(r3) {
    var t2 = r3.r, n2 = r3.g, e2 = r3.b, u2 = r3.a, a2 = Math.max(t2, n2, e2), o2 = a2 - Math.min(t2, n2, e2), i2 = o2 ? a2 === t2 ? (n2 - e2) / o2 : a2 === n2 ? 2 + (e2 - t2) / o2 : 4 + (t2 - n2) / o2 : 0;
    return { h: 60 * (i2 < 0 ? i2 + 6 : i2), s: a2 ? o2 / a2 * 100 : 0, v: a2 / 255 * 100, a: u2 };
  };
  var b = function(r3) {
    var t2 = r3.h, n2 = r3.s, e2 = r3.v, u2 = r3.a;
    t2 = t2 / 360 * 6, n2 /= 100, e2 /= 100;
    var a2 = Math.floor(t2), o2 = e2 * (1 - n2), i2 = e2 * (1 - (t2 - a2) * n2), s2 = e2 * (1 - (1 - t2 + a2) * n2), h2 = a2 % 6;
    return { r: 255 * [e2, i2, o2, o2, s2, e2][h2], g: 255 * [s2, e2, e2, i2, o2, o2][h2], b: 255 * [o2, o2, s2, e2, e2, i2][h2], a: u2 };
  };
  var g = function(r3) {
    return { h: u(r3.h), s: e(r3.s, 0, 100), l: e(r3.l, 0, 100), a: e(r3.a) };
  };
  var d = function(r3) {
    return { h: n(r3.h), s: n(r3.s), l: n(r3.l), a: n(r3.a, 3) };
  };
  var f = function(r3) {
    return b((n2 = (t2 = r3).s, { h: t2.h, s: (n2 *= ((e2 = t2.l) < 50 ? e2 : 100 - e2) / 100) > 0 ? 2 * n2 / (e2 + n2) * 100 : 0, v: e2 + n2, a: t2.a }));
    var t2, n2, e2;
  };
  var c = function(r3) {
    return { h: (t2 = h(r3)).h, s: (u2 = (200 - (n2 = t2.s)) * (e2 = t2.v) / 100) > 0 && u2 < 200 ? n2 * e2 / 100 / (u2 <= 100 ? u2 : 200 - u2) * 100 : 0, l: u2 / 2, a: t2.a };
    var t2, n2, e2, u2;
  };
  var l = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var p = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var v = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var m = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var y = { string: [[function(r3) {
    var t2 = i.exec(r3);
    return t2 ? (r3 = t2[1]).length <= 4 ? { r: parseInt(r3[0] + r3[0], 16), g: parseInt(r3[1] + r3[1], 16), b: parseInt(r3[2] + r3[2], 16), a: 4 === r3.length ? n(parseInt(r3[3] + r3[3], 16) / 255, 2) : 1 } : 6 === r3.length || 8 === r3.length ? { r: parseInt(r3.substr(0, 2), 16), g: parseInt(r3.substr(2, 2), 16), b: parseInt(r3.substr(4, 2), 16), a: 8 === r3.length ? n(parseInt(r3.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
  }, "hex"], [function(r3) {
    var t2 = v.exec(r3) || m.exec(r3);
    return t2 ? t2[2] !== t2[4] || t2[4] !== t2[6] ? null : a({ r: Number(t2[1]) / (t2[2] ? 100 / 255 : 1), g: Number(t2[3]) / (t2[4] ? 100 / 255 : 1), b: Number(t2[5]) / (t2[6] ? 100 / 255 : 1), a: void 0 === t2[7] ? 1 : Number(t2[7]) / (t2[8] ? 100 : 1) }) : null;
  }, "rgb"], [function(t2) {
    var n2 = l.exec(t2) || p.exec(t2);
    if (!n2) return null;
    var e2, u2, a2 = g({ h: (e2 = n2[1], u2 = n2[2], void 0 === u2 && (u2 = "deg"), Number(e2) * (r2[u2] || 1)), s: Number(n2[3]), l: Number(n2[4]), a: void 0 === n2[5] ? 1 : Number(n2[5]) / (n2[6] ? 100 : 1) });
    return f(a2);
  }, "hsl"]], object: [[function(r3) {
    var n2 = r3.r, e2 = r3.g, u2 = r3.b, o2 = r3.a, i2 = void 0 === o2 ? 1 : o2;
    return t(n2) && t(e2) && t(u2) ? a({ r: Number(n2), g: Number(e2), b: Number(u2), a: Number(i2) }) : null;
  }, "rgb"], [function(r3) {
    var n2 = r3.h, e2 = r3.s, u2 = r3.l, a2 = r3.a, o2 = void 0 === a2 ? 1 : a2;
    if (!t(n2) || !t(e2) || !t(u2)) return null;
    var i2 = g({ h: Number(n2), s: Number(e2), l: Number(u2), a: Number(o2) });
    return f(i2);
  }, "hsl"], [function(r3) {
    var n2 = r3.h, a2 = r3.s, o2 = r3.v, i2 = r3.a, s2 = void 0 === i2 ? 1 : i2;
    if (!t(n2) || !t(a2) || !t(o2)) return null;
    var h2 = (function(r4) {
      return { h: u(r4.h), s: e(r4.s, 0, 100), v: e(r4.v, 0, 100), a: e(r4.a) };
    })({ h: Number(n2), s: Number(a2), v: Number(o2), a: Number(s2) });
    return b(h2);
  }, "hsv"]] };
  var N = function(r3, t2) {
    for (var n2 = 0; n2 < t2.length; n2++) {
      var e2 = t2[n2][0](r3);
      if (e2) return [e2, t2[n2][1]];
    }
    return [null, void 0];
  };
  var x = function(r3) {
    return "string" == typeof r3 ? N(r3.trim(), y.string) : "object" == typeof r3 && null !== r3 ? N(r3, y.object) : [null, void 0];
  };
  var M = function(r3, t2) {
    var n2 = c(r3);
    return { h: n2.h, s: e(n2.s + 100 * t2, 0, 100), l: n2.l, a: n2.a };
  };
  var H = function(r3) {
    return (299 * r3.r + 587 * r3.g + 114 * r3.b) / 1e3 / 255;
  };
  var $ = function(r3, t2) {
    var n2 = c(r3);
    return { h: n2.h, s: n2.s, l: e(n2.l + 100 * t2, 0, 100), a: n2.a };
  };
  var j = (function() {
    function r3(r4) {
      this.parsed = x(r4)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
    }
    return r3.prototype.isValid = function() {
      return null !== this.parsed;
    }, r3.prototype.brightness = function() {
      return n(H(this.rgba), 2);
    }, r3.prototype.isDark = function() {
      return H(this.rgba) < 0.5;
    }, r3.prototype.isLight = function() {
      return H(this.rgba) >= 0.5;
    }, r3.prototype.toHex = function() {
      return r4 = o(this.rgba), t2 = r4.r, e2 = r4.g, u2 = r4.b, i2 = (a2 = r4.a) < 1 ? s(n(255 * a2)) : "", "#" + s(t2) + s(e2) + s(u2) + i2;
      var r4, t2, e2, u2, a2, i2;
    }, r3.prototype.toRgb = function() {
      return o(this.rgba);
    }, r3.prototype.toRgbString = function() {
      return r4 = o(this.rgba), t2 = r4.r, n2 = r4.g, e2 = r4.b, (u2 = r4.a) < 1 ? "rgba(" + t2 + ", " + n2 + ", " + e2 + ", " + u2 + ")" : "rgb(" + t2 + ", " + n2 + ", " + e2 + ")";
      var r4, t2, n2, e2, u2;
    }, r3.prototype.toHsl = function() {
      return d(c(this.rgba));
    }, r3.prototype.toHslString = function() {
      return r4 = d(c(this.rgba)), t2 = r4.h, n2 = r4.s, e2 = r4.l, (u2 = r4.a) < 1 ? "hsla(" + t2 + ", " + n2 + "%, " + e2 + "%, " + u2 + ")" : "hsl(" + t2 + ", " + n2 + "%, " + e2 + "%)";
      var r4, t2, n2, e2, u2;
    }, r3.prototype.toHsv = function() {
      return r4 = h(this.rgba), { h: n(r4.h), s: n(r4.s), v: n(r4.v), a: n(r4.a, 3) };
      var r4;
    }, r3.prototype.invert = function() {
      return w({ r: 255 - (r4 = this.rgba).r, g: 255 - r4.g, b: 255 - r4.b, a: r4.a });
      var r4;
    }, r3.prototype.saturate = function(r4) {
      return void 0 === r4 && (r4 = 0.1), w(M(this.rgba, r4));
    }, r3.prototype.desaturate = function(r4) {
      return void 0 === r4 && (r4 = 0.1), w(M(this.rgba, -r4));
    }, r3.prototype.grayscale = function() {
      return w(M(this.rgba, -1));
    }, r3.prototype.lighten = function(r4) {
      return void 0 === r4 && (r4 = 0.1), w($(this.rgba, r4));
    }, r3.prototype.darken = function(r4) {
      return void 0 === r4 && (r4 = 0.1), w($(this.rgba, -r4));
    }, r3.prototype.rotate = function(r4) {
      return void 0 === r4 && (r4 = 15), this.hue(this.hue() + r4);
    }, r3.prototype.alpha = function(r4) {
      return "number" == typeof r4 ? w({ r: (t2 = this.rgba).r, g: t2.g, b: t2.b, a: r4 }) : n(this.rgba.a, 3);
      var t2;
    }, r3.prototype.hue = function(r4) {
      var t2 = c(this.rgba);
      return "number" == typeof r4 ? w({ h: r4, s: t2.s, l: t2.l, a: t2.a }) : n(t2.h);
    }, r3.prototype.isEqual = function(r4) {
      return this.toHex() === w(r4).toHex();
    }, r3;
  })();
  var w = function(r3) {
    return r3 instanceof j ? r3 : new j(r3);
  };
  var S = [];
  var k = function(r3) {
    r3.forEach(function(r4) {
      S.indexOf(r4) < 0 && (r4(j, y), S.push(r4));
    });
  };

  // node_modules/colord/plugins/names.mjs
  function names_default(e2, f2) {
    var a2 = { white: "#ffffff", bisque: "#ffe4c4", blue: "#0000ff", cadetblue: "#5f9ea0", chartreuse: "#7fff00", chocolate: "#d2691e", coral: "#ff7f50", antiquewhite: "#faebd7", aqua: "#00ffff", azure: "#f0ffff", whitesmoke: "#f5f5f5", papayawhip: "#ffefd5", plum: "#dda0dd", blanchedalmond: "#ffebcd", black: "#000000", gold: "#ffd700", goldenrod: "#daa520", gainsboro: "#dcdcdc", cornsilk: "#fff8dc", cornflowerblue: "#6495ed", burlywood: "#deb887", aquamarine: "#7fffd4", beige: "#f5f5dc", crimson: "#dc143c", cyan: "#00ffff", darkblue: "#00008b", darkcyan: "#008b8b", darkgoldenrod: "#b8860b", darkkhaki: "#bdb76b", darkgray: "#a9a9a9", darkgreen: "#006400", darkgrey: "#a9a9a9", peachpuff: "#ffdab9", darkmagenta: "#8b008b", darkred: "#8b0000", darkorchid: "#9932cc", darkorange: "#ff8c00", darkslateblue: "#483d8b", gray: "#808080", darkslategray: "#2f4f4f", darkslategrey: "#2f4f4f", deeppink: "#ff1493", deepskyblue: "#00bfff", wheat: "#f5deb3", firebrick: "#b22222", floralwhite: "#fffaf0", ghostwhite: "#f8f8ff", darkviolet: "#9400d3", magenta: "#ff00ff", green: "#008000", dodgerblue: "#1e90ff", grey: "#808080", honeydew: "#f0fff0", hotpink: "#ff69b4", blueviolet: "#8a2be2", forestgreen: "#228b22", lawngreen: "#7cfc00", indianred: "#cd5c5c", indigo: "#4b0082", fuchsia: "#ff00ff", brown: "#a52a2a", maroon: "#800000", mediumblue: "#0000cd", lightcoral: "#f08080", darkturquoise: "#00ced1", lightcyan: "#e0ffff", ivory: "#fffff0", lightyellow: "#ffffe0", lightsalmon: "#ffa07a", lightseagreen: "#20b2aa", linen: "#faf0e6", mediumaquamarine: "#66cdaa", lemonchiffon: "#fffacd", lime: "#00ff00", khaki: "#f0e68c", mediumseagreen: "#3cb371", limegreen: "#32cd32", mediumspringgreen: "#00fa9a", lightskyblue: "#87cefa", lightblue: "#add8e6", midnightblue: "#191970", lightpink: "#ffb6c1", mistyrose: "#ffe4e1", moccasin: "#ffe4b5", mintcream: "#f5fffa", lightslategray: "#778899", lightslategrey: "#778899", navajowhite: "#ffdead", navy: "#000080", mediumvioletred: "#c71585", powderblue: "#b0e0e6", palegoldenrod: "#eee8aa", oldlace: "#fdf5e6", paleturquoise: "#afeeee", mediumturquoise: "#48d1cc", mediumorchid: "#ba55d3", rebeccapurple: "#663399", lightsteelblue: "#b0c4de", mediumslateblue: "#7b68ee", thistle: "#d8bfd8", tan: "#d2b48c", orchid: "#da70d6", mediumpurple: "#9370db", purple: "#800080", pink: "#ffc0cb", skyblue: "#87ceeb", springgreen: "#00ff7f", palegreen: "#98fb98", red: "#ff0000", yellow: "#ffff00", slateblue: "#6a5acd", lavenderblush: "#fff0f5", peru: "#cd853f", palevioletred: "#db7093", violet: "#ee82ee", teal: "#008080", slategray: "#708090", slategrey: "#708090", aliceblue: "#f0f8ff", darkseagreen: "#8fbc8f", darkolivegreen: "#556b2f", greenyellow: "#adff2f", seagreen: "#2e8b57", seashell: "#fff5ee", tomato: "#ff6347", silver: "#c0c0c0", sienna: "#a0522d", lavender: "#e6e6fa", lightgreen: "#90ee90", orange: "#ffa500", orangered: "#ff4500", steelblue: "#4682b4", royalblue: "#4169e1", turquoise: "#40e0d0", yellowgreen: "#9acd32", salmon: "#fa8072", saddlebrown: "#8b4513", sandybrown: "#f4a460", rosybrown: "#bc8f8f", darksalmon: "#e9967a", lightgoldenrodyellow: "#fafad2", snow: "#fffafa", lightgrey: "#d3d3d3", lightgray: "#d3d3d3", dimgray: "#696969", dimgrey: "#696969", olivedrab: "#6b8e23", olive: "#808000" }, r3 = {};
    for (var d2 in a2) r3[a2[d2]] = d2;
    var l2 = {};
    e2.prototype.toName = function(f3) {
      if (!(this.rgba.a || this.rgba.r || this.rgba.g || this.rgba.b)) return "transparent";
      var d3, i2, n2 = r3[this.toHex()];
      if (n2) return n2;
      if (null == f3 ? void 0 : f3.closest) {
        var o2 = this.toRgb(), t2 = 1 / 0, b2 = "black";
        if (!l2.length) for (var c2 in a2) l2[c2] = new e2(a2[c2]).toRgb();
        for (var g2 in a2) {
          var u2 = (d3 = o2, i2 = l2[g2], Math.pow(d3.r - i2.r, 2) + Math.pow(d3.g - i2.g, 2) + Math.pow(d3.b - i2.b, 2));
          u2 < t2 && (t2 = u2, b2 = g2);
        }
        return b2;
      }
    };
    f2.string.push([function(f3) {
      var r4 = f3.toLowerCase(), d3 = "transparent" === r4 ? "#0000" : a2[r4];
      return d3 ? new e2(d3).toRgb() : null;
    }, "name"]);
  }

  // node_modules/fast-average-color/dist/index.esm.js
  function toHex(num) {
    var str = num.toString(16);
    return str.length === 1 ? "0" + str : str;
  }
  function arrayToHex(arr) {
    return "#" + arr.map(toHex).join("");
  }
  function isDark(color) {
    var result = (color[0] * 299 + color[1] * 587 + color[2] * 114) / 1e3;
    return result < 128;
  }
  function prepareIgnoredColor(color) {
    if (!color) {
      return [];
    }
    return isRGBArray(color) ? color : [color];
  }
  function isRGBArray(value) {
    return Array.isArray(value[0]);
  }
  function isIgnoredColor(data, index, ignoredColor) {
    for (var i2 = 0; i2 < ignoredColor.length; i2++) {
      if (isIgnoredColorAsNumbers(data, index, ignoredColor[i2])) {
        return true;
      }
    }
    return false;
  }
  function isIgnoredColorAsNumbers(data, index, ignoredColor) {
    switch (ignoredColor.length) {
      case 3:
        if (isIgnoredRGBColor(data, index, ignoredColor)) {
          return true;
        }
        break;
      case 4:
        if (isIgnoredRGBAColor(data, index, ignoredColor)) {
          return true;
        }
        break;
      case 5:
        if (isIgnoredRGBAColorWithThreshold(data, index, ignoredColor)) {
          return true;
        }
        break;
      default:
        return false;
    }
  }
  function isIgnoredRGBColor(data, index, ignoredColor) {
    if (data[index + 3] !== 255) {
      return true;
    }
    if (data[index] === ignoredColor[0] && data[index + 1] === ignoredColor[1] && data[index + 2] === ignoredColor[2]) {
      return true;
    }
    return false;
  }
  function isIgnoredRGBAColor(data, index, ignoredColor) {
    if (data[index + 3] && ignoredColor[3]) {
      return data[index] === ignoredColor[0] && data[index + 1] === ignoredColor[1] && data[index + 2] === ignoredColor[2] && data[index + 3] === ignoredColor[3];
    }
    return data[index + 3] === ignoredColor[3];
  }
  function inRange(colorComponent, ignoredColorComponent, value) {
    return colorComponent >= ignoredColorComponent - value && colorComponent <= ignoredColorComponent + value;
  }
  function isIgnoredRGBAColorWithThreshold(data, index, ignoredColor) {
    var redIgnored = ignoredColor[0];
    var greenIgnored = ignoredColor[1];
    var blueIgnored = ignoredColor[2];
    var alphaIgnored = ignoredColor[3];
    var threshold = ignoredColor[4];
    var alphaData = data[index + 3];
    var alphaInRange = inRange(alphaData, alphaIgnored, threshold);
    if (!alphaIgnored) {
      return alphaInRange;
    }
    if (!alphaData && alphaInRange) {
      return true;
    }
    if (inRange(data[index], redIgnored, threshold) && inRange(data[index + 1], greenIgnored, threshold) && inRange(data[index + 2], blueIgnored, threshold) && alphaInRange) {
      return true;
    }
    return false;
  }
  function dominantAlgorithm(arr, len, options2) {
    var colorHash = {};
    var divider = 24;
    var ignoredColor = options2.ignoredColor;
    var step = options2.step;
    var max = [0, 0, 0, 0, 0];
    for (var i2 = 0; i2 < len; i2 += step) {
      var red = arr[i2];
      var green = arr[i2 + 1];
      var blue = arr[i2 + 2];
      var alpha = arr[i2 + 3];
      if (ignoredColor && isIgnoredColor(arr, i2, ignoredColor)) {
        continue;
      }
      var key = Math.round(red / divider) + "," + Math.round(green / divider) + "," + Math.round(blue / divider);
      if (colorHash[key]) {
        colorHash[key] = [
          colorHash[key][0] + red * alpha,
          colorHash[key][1] + green * alpha,
          colorHash[key][2] + blue * alpha,
          colorHash[key][3] + alpha,
          colorHash[key][4] + 1
        ];
      } else {
        colorHash[key] = [red * alpha, green * alpha, blue * alpha, alpha, 1];
      }
      if (max[4] < colorHash[key][4]) {
        max = colorHash[key];
      }
    }
    var redTotal = max[0];
    var greenTotal = max[1];
    var blueTotal = max[2];
    var alphaTotal = max[3];
    var count = max[4];
    return alphaTotal ? [
      Math.round(redTotal / alphaTotal),
      Math.round(greenTotal / alphaTotal),
      Math.round(blueTotal / alphaTotal),
      Math.round(alphaTotal / count)
    ] : options2.defaultColor;
  }
  function simpleAlgorithm(arr, len, options2) {
    var redTotal = 0;
    var greenTotal = 0;
    var blueTotal = 0;
    var alphaTotal = 0;
    var count = 0;
    var ignoredColor = options2.ignoredColor;
    var step = options2.step;
    for (var i2 = 0; i2 < len; i2 += step) {
      var alpha = arr[i2 + 3];
      var red = arr[i2] * alpha;
      var green = arr[i2 + 1] * alpha;
      var blue = arr[i2 + 2] * alpha;
      if (ignoredColor && isIgnoredColor(arr, i2, ignoredColor)) {
        continue;
      }
      redTotal += red;
      greenTotal += green;
      blueTotal += blue;
      alphaTotal += alpha;
      count++;
    }
    return alphaTotal ? [
      Math.round(redTotal / alphaTotal),
      Math.round(greenTotal / alphaTotal),
      Math.round(blueTotal / alphaTotal),
      Math.round(alphaTotal / count)
    ] : options2.defaultColor;
  }
  function sqrtAlgorithm(arr, len, options2) {
    var redTotal = 0;
    var greenTotal = 0;
    var blueTotal = 0;
    var alphaTotal = 0;
    var count = 0;
    var ignoredColor = options2.ignoredColor;
    var step = options2.step;
    for (var i2 = 0; i2 < len; i2 += step) {
      var red = arr[i2];
      var green = arr[i2 + 1];
      var blue = arr[i2 + 2];
      var alpha = arr[i2 + 3];
      if (ignoredColor && isIgnoredColor(arr, i2, ignoredColor)) {
        continue;
      }
      redTotal += red * red * alpha;
      greenTotal += green * green * alpha;
      blueTotal += blue * blue * alpha;
      alphaTotal += alpha;
      count++;
    }
    return alphaTotal ? [
      Math.round(Math.sqrt(redTotal / alphaTotal)),
      Math.round(Math.sqrt(greenTotal / alphaTotal)),
      Math.round(Math.sqrt(blueTotal / alphaTotal)),
      Math.round(alphaTotal / count)
    ] : options2.defaultColor;
  }
  function getDefaultColor(options2) {
    return getOption(options2, "defaultColor", [0, 0, 0, 0]);
  }
  function getOption(options2, name123, defaultValue) {
    return options2[name123] === void 0 ? defaultValue : options2[name123];
  }
  var MIN_SIZE = 10;
  var MAX_SIZE = 100;
  function isSvg(filename) {
    return filename.search(/\.svg(\?|$)/i) !== -1;
  }
  function getOriginalSize(resource) {
    if (isInstanceOfHTMLImageElement(resource)) {
      var width = resource.naturalWidth;
      var height = resource.naturalHeight;
      if (!resource.naturalWidth && isSvg(resource.src)) {
        width = height = MAX_SIZE;
      }
      return {
        width,
        height
      };
    }
    if (isInstanceOfHTMLVideoElement(resource)) {
      return {
        width: resource.videoWidth,
        height: resource.videoHeight
      };
    }
    return {
      width: resource.width,
      height: resource.height
    };
  }
  function getSrc(resource) {
    if (isInstanceOfHTMLCanvasElement(resource)) {
      return "canvas";
    }
    if (isInstanceOfOffscreenCanvas(resource)) {
      return "offscreencanvas";
    }
    if (isInstanceOfImageBitmap(resource)) {
      return "imagebitmap";
    }
    return resource.src;
  }
  function isInstanceOfHTMLImageElement(resource) {
    return typeof HTMLImageElement !== "undefined" && resource instanceof HTMLImageElement;
  }
  function isInstanceOfOffscreenCanvas(resource) {
    return typeof OffscreenCanvas !== "undefined" && resource instanceof OffscreenCanvas;
  }
  function isInstanceOfHTMLVideoElement(resource) {
    return typeof HTMLVideoElement !== "undefined" && resource instanceof HTMLVideoElement;
  }
  function isInstanceOfHTMLCanvasElement(resource) {
    return typeof HTMLCanvasElement !== "undefined" && resource instanceof HTMLCanvasElement;
  }
  function isInstanceOfImageBitmap(resource) {
    return typeof ImageBitmap !== "undefined" && resource instanceof ImageBitmap;
  }
  function prepareSizeAndPosition(originalSize, options2) {
    var srcLeft = getOption(options2, "left", 0);
    var srcTop = getOption(options2, "top", 0);
    var srcWidth = getOption(options2, "width", originalSize.width);
    var srcHeight = getOption(options2, "height", originalSize.height);
    var destWidth = srcWidth;
    var destHeight = srcHeight;
    if (options2.mode === "precision") {
      return {
        srcLeft,
        srcTop,
        srcWidth,
        srcHeight,
        destWidth,
        destHeight
      };
    }
    var factor;
    if (srcWidth > srcHeight) {
      factor = srcWidth / srcHeight;
      destWidth = MAX_SIZE;
      destHeight = Math.round(destWidth / factor);
    } else {
      factor = srcHeight / srcWidth;
      destHeight = MAX_SIZE;
      destWidth = Math.round(destHeight / factor);
    }
    if (destWidth > srcWidth || destHeight > srcHeight || destWidth < MIN_SIZE || destHeight < MIN_SIZE) {
      destWidth = srcWidth;
      destHeight = srcHeight;
    }
    return {
      srcLeft,
      srcTop,
      srcWidth,
      srcHeight,
      destWidth,
      destHeight
    };
  }
  var isWebWorkers = typeof window === "undefined";
  function makeCanvas() {
    return isWebWorkers ? new OffscreenCanvas(1, 1) : document.createElement("canvas");
  }
  var ERROR_PREFIX = "FastAverageColor: ";
  function outputError(message, silent, error) {
    if (!silent) {
      console.error(ERROR_PREFIX + message);
      if (error) {
        console.error(error);
      }
    }
  }
  function getError(text) {
    return Error(ERROR_PREFIX + text);
  }
  var FastAverageColor = (
    /** @class */
    (function() {
      function FastAverageColor2() {
        this.canvas = null;
        this.ctx = null;
      }
      FastAverageColor2.prototype.getColorAsync = function(resource, options2) {
        if (!resource) {
          return Promise.reject(getError("call .getColorAsync() without resource."));
        }
        if (typeof resource === "string") {
          if (typeof Image === "undefined") {
            return Promise.reject(getError("resource as string is not supported in this environment"));
          }
          var img = new Image();
          img.crossOrigin = options2 && options2.crossOrigin || "";
          img.src = resource;
          return this.bindImageEvents(img, options2);
        } else if (isInstanceOfHTMLImageElement(resource) && !resource.complete) {
          return this.bindImageEvents(resource, options2);
        } else {
          var result = this.getColor(resource, options2);
          return result.error ? Promise.reject(result.error) : Promise.resolve(result);
        }
      };
      FastAverageColor2.prototype.getColor = function(resource, options2) {
        options2 = options2 || {};
        var defaultColor = getDefaultColor(options2);
        if (!resource) {
          outputError("call .getColor(null) without resource", options2.silent);
          return this.prepareResult(defaultColor);
        }
        var originalSize = getOriginalSize(resource);
        var size = prepareSizeAndPosition(originalSize, options2);
        if (!size.srcWidth || !size.srcHeight || !size.destWidth || !size.destHeight) {
          outputError('incorrect sizes for resource "'.concat(getSrc(resource), '"'), options2.silent);
          return this.prepareResult(defaultColor);
        }
        if (!this.canvas) {
          this.canvas = makeCanvas();
        }
        if (!this.ctx) {
          this.ctx = this.canvas.getContext && this.canvas.getContext("2d");
          if (!this.ctx) {
            outputError("Canvas Context 2D is not supported in this browser", options2.silent);
            return this.prepareResult(defaultColor);
          }
        }
        this.canvas.width = size.destWidth;
        this.canvas.height = size.destHeight;
        var value = defaultColor;
        try {
          this.ctx.clearRect(0, 0, size.destWidth, size.destHeight);
          this.ctx.drawImage(resource, size.srcLeft, size.srcTop, size.srcWidth, size.srcHeight, 0, 0, size.destWidth, size.destHeight);
          var bitmapData = this.ctx.getImageData(0, 0, size.destWidth, size.destHeight).data;
          value = this.getColorFromArray4(bitmapData, options2);
        } catch (e2) {
          outputError("security error (CORS) for resource ".concat(getSrc(resource), ".\nDetails: https://developer.mozilla.org/en/docs/Web/HTML/CORS_enabled_image"), options2.silent, e2);
        }
        return this.prepareResult(value);
      };
      FastAverageColor2.prototype.getColorFromArray4 = function(arr, options2) {
        options2 = options2 || {};
        var bytesPerPixel = 4;
        var arrLength = arr.length;
        var defaultColor = getDefaultColor(options2);
        if (arrLength < bytesPerPixel) {
          return defaultColor;
        }
        var len = arrLength - arrLength % bytesPerPixel;
        var step = (options2.step || 1) * bytesPerPixel;
        var algorithm;
        switch (options2.algorithm || "sqrt") {
          case "simple":
            algorithm = simpleAlgorithm;
            break;
          case "sqrt":
            algorithm = sqrtAlgorithm;
            break;
          case "dominant":
            algorithm = dominantAlgorithm;
            break;
          default:
            throw getError("".concat(options2.algorithm, " is unknown algorithm"));
        }
        return algorithm(arr, len, {
          defaultColor,
          ignoredColor: prepareIgnoredColor(options2.ignoredColor),
          step
        });
      };
      FastAverageColor2.prototype.prepareResult = function(value) {
        var rgb = value.slice(0, 3);
        var rgba = [value[0], value[1], value[2], value[3] / 255];
        var isDarkColor = isDark(value);
        return {
          value: [value[0], value[1], value[2], value[3]],
          rgb: "rgb(" + rgb.join(",") + ")",
          rgba: "rgba(" + rgba.join(",") + ")",
          hex: arrayToHex(rgb),
          hexa: arrayToHex(value),
          isDark: isDarkColor,
          isLight: !isDarkColor
        };
      };
      FastAverageColor2.prototype.destroy = function() {
        if (this.canvas) {
          this.canvas.width = 1;
          this.canvas.height = 1;
          this.canvas = null;
        }
        this.ctx = null;
      };
      FastAverageColor2.prototype.bindImageEvents = function(resource, options2) {
        var _this = this;
        return new Promise(function(resolve, reject) {
          var onload = function() {
            unbindEvents();
            var result = _this.getColor(resource, options2);
            if (result.error) {
              reject(result.error);
            } else {
              resolve(result);
            }
          };
          var onerror = function() {
            unbindEvents();
            reject(getError('Error loading image "'.concat(resource.src, '".')));
          };
          var onabort = function() {
            unbindEvents();
            reject(getError('Image "'.concat(resource.src, '" loading aborted')));
          };
          var unbindEvents = function() {
            resource.removeEventListener("load", onload);
            resource.removeEventListener("error", onerror);
            resource.removeEventListener("abort", onabort);
          };
          resource.addEventListener("load", onload);
          resource.addEventListener("error", onerror);
          resource.addEventListener("abort", onabort);
        });
      };
      return FastAverageColor2;
    })()
  );

  // packages/block-library/build-module/cover/edit/color-utils.mjs
  var import_hooks20 = __toESM(require_hooks(), 1);
  k([names_default]);
  var DEFAULT_BACKGROUND_COLOR = "#FFF";
  var DEFAULT_OVERLAY_COLOR = "#000";
  function compositeSourceOver(source, dest) {
    return {
      r: source.r * source.a + dest.r * dest.a * (1 - source.a),
      g: source.g * source.a + dest.g * dest.a * (1 - source.a),
      b: source.b * source.a + dest.b * dest.a * (1 - source.a),
      a: source.a + dest.a * (1 - source.a)
    };
  }
  function retrieveFastAverageColor() {
    if (!retrieveFastAverageColor.fastAverageColor) {
      retrieveFastAverageColor.fastAverageColor = new FastAverageColor();
    }
    return retrieveFastAverageColor.fastAverageColor;
  }
  var getMediaColor = memize(async (url) => {
    if (!url) {
      return DEFAULT_BACKGROUND_COLOR;
    }
    const { r: r3, g: g2, b: b2, a: a2 } = w(DEFAULT_BACKGROUND_COLOR).toRgb();
    try {
      const imgCrossOrigin = (0, import_hooks20.applyFilters)(
        "media.crossOrigin",
        void 0,
        url
      );
      const color = await retrieveFastAverageColor().getColorAsync(url, {
        // The default color is white, which is the color
        // that is returned if there's an error.
        // colord returns alpga 0-1, FAC needs 0-255
        defaultColor: [r3, g2, b2, a2 * 255],
        // Errors that come up don't reject the promise,
        // so error logging has to be silenced
        // with this option.
        silent: false,
        crossOrigin: imgCrossOrigin
      });
      return color.hex;
    } catch (error) {
      return DEFAULT_BACKGROUND_COLOR;
    }
  });
  function compositeIsDark(dimRatio, overlayColor, backgroundColor) {
    if (overlayColor === backgroundColor || dimRatio === 100) {
      return w(overlayColor).isDark();
    }
    const overlay = w(overlayColor).alpha(dimRatio / 100).toRgb();
    const background = w(backgroundColor).toRgb();
    const composite = compositeSourceOver(overlay, background);
    return w(composite).isDark();
  }

  // packages/block-library/build-module/cover/edit/index.mjs
  var import_jsx_runtime225 = __toESM(require_jsx_runtime(), 1);
  function getInnerBlocksTemplate(attributes2) {
    return [
      [
        "core/paragraph",
        {
          style: {
            typography: {
              textAlign: "center"
            }
          },
          placeholder: (0, import_i18n52.__)("Write title\u2026"),
          ...attributes2
        }
      ]
    ];
  }
  var isTemporaryMedia = (id, url) => !id && (0, import_blob6.isBlobURL)(url);
  function CoverEdit({
    attributes: attributes2,
    clientId,
    isSelected,
    overlayColor,
    setAttributes,
    setOverlayColor,
    toggleSelection,
    context: { postId, postType }
  }) {
    const {
      contentPosition,
      id,
      url: originalUrl,
      backgroundType: originalBackgroundType,
      useFeaturedImage,
      dimRatio,
      focalPoint,
      hasParallax,
      isDark: isDark2,
      isRepeated,
      minHeight,
      minHeightUnit,
      alt,
      allowedBlocks,
      templateLock,
      tagName: TagName2 = "div",
      isUserOverlayColor,
      sizeSlug,
      poster
    } = attributes2;
    const [featuredImage] = (0, import_core_data16.useEntityProp)(
      "postType",
      postType,
      "featured_media",
      postId
    );
    const { getSettings: getSettings2 } = (0, import_data30.useSelect)(import_block_editor67.store);
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data30.useDispatch)(import_block_editor67.store);
    const propsRef = (0, import_element24.useRef)({ attributes: attributes2, overlayColor });
    (0, import_element24.useLayoutEffect)(() => {
      propsRef.current = { attributes: attributes2, overlayColor };
    });
    const { media } = (0, import_data30.useSelect)(
      (select9) => {
        return {
          media: featuredImage && useFeaturedImage ? select9(import_core_data16.store).getEntityRecord(
            "postType",
            "attachment",
            featuredImage,
            {
              context: "view"
            }
          ) : void 0
        };
      },
      [featuredImage, useFeaturedImage]
    );
    const mediaUrl = media?.media_details?.sizes?.[sizeSlug]?.source_url ?? media?.source_url;
    (0, import_element24.useEffect)(() => {
      (async () => {
        if (!useFeaturedImage) {
          return;
        }
        const averageBackgroundColor = await getMediaColor(mediaUrl);
        const { attributes: currentAttrs, overlayColor: currentOverlay } = propsRef.current;
        let newOverlayColor = currentOverlay.color;
        if (!currentAttrs.isUserOverlayColor) {
          newOverlayColor = averageBackgroundColor;
          __unstableMarkNextChangeAsNotPersistent();
          setOverlayColor(newOverlayColor);
        }
        const newIsDark = compositeIsDark(
          currentAttrs.dimRatio,
          newOverlayColor,
          averageBackgroundColor
        );
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({
          isDark: newIsDark,
          isUserOverlayColor: currentAttrs.isUserOverlayColor || false
        });
      })();
    }, [
      mediaUrl,
      __unstableMarkNextChangeAsNotPersistent,
      setAttributes,
      setOverlayColor,
      useFeaturedImage
    ]);
    const url = useFeaturedImage ? mediaUrl : (
      // Ensure the url is not malformed due to sanitization through `wp_kses`.
      originalUrl?.replaceAll("&amp;", "&")
    );
    const backgroundType = useFeaturedImage ? IMAGE_BACKGROUND_TYPE : originalBackgroundType;
    const { createErrorNotice } = (0, import_data30.useDispatch)(import_notices4.store);
    const { gradientClass, gradientValue } = (0, import_block_editor67.__experimentalUseGradient)();
    const onSelectMedia = async (newMedia) => {
      const mediaAttributes = attributesFromMedia(newMedia);
      const isImage = [newMedia?.type, newMedia?.media_type].includes(
        IMAGE_BACKGROUND_TYPE
      );
      const averageBackgroundColor = await getMediaColor(
        isImage ? newMedia?.url : void 0
      );
      const { attributes: currentAttrs, overlayColor: currentOverlay } = propsRef.current;
      let newOverlayColor = currentOverlay.color;
      if (!currentAttrs.isUserOverlayColor) {
        newOverlayColor = averageBackgroundColor;
        setOverlayColor(newOverlayColor);
        __unstableMarkNextChangeAsNotPersistent();
      }
      const newDimRatio = currentAttrs.url === void 0 && currentAttrs.dimRatio === 100 ? 50 : currentAttrs.dimRatio;
      const newIsDark = compositeIsDark(
        newDimRatio,
        newOverlayColor,
        averageBackgroundColor
      );
      if (backgroundType === IMAGE_BACKGROUND_TYPE && mediaAttributes?.id) {
        const { imageDefaultSize } = getSettings2();
        if (sizeSlug && (newMedia?.sizes?.[sizeSlug] || newMedia?.media_details?.sizes?.[sizeSlug])) {
          mediaAttributes.sizeSlug = sizeSlug;
          mediaAttributes.url = newMedia?.sizes?.[sizeSlug]?.url || newMedia?.media_details?.sizes?.[sizeSlug]?.source_url;
        } else if (newMedia?.sizes?.[imageDefaultSize] || newMedia?.media_details?.sizes?.[imageDefaultSize]) {
          mediaAttributes.sizeSlug = imageDefaultSize;
          mediaAttributes.url = newMedia?.sizes?.[imageDefaultSize]?.url || newMedia?.media_details?.sizes?.[imageDefaultSize]?.source_url;
        } else {
          mediaAttributes.sizeSlug = DEFAULT_MEDIA_SIZE_SLUG;
        }
      }
      setAttributes({
        ...mediaAttributes,
        focalPoint: void 0,
        useFeaturedImage: void 0,
        dimRatio: newDimRatio,
        isDark: newIsDark,
        isUserOverlayColor: currentAttrs.isUserOverlayColor || false
      });
    };
    const onClearMedia = () => {
      let newOverlayColor = overlayColor.color;
      if (!isUserOverlayColor) {
        newOverlayColor = DEFAULT_OVERLAY_COLOR;
        setOverlayColor(void 0);
        __unstableMarkNextChangeAsNotPersistent();
      }
      const newIsDark = compositeIsDark(
        dimRatio,
        newOverlayColor,
        DEFAULT_BACKGROUND_COLOR
      );
      setAttributes({
        url: void 0,
        id: void 0,
        backgroundType: void 0,
        focalPoint: void 0,
        hasParallax: void 0,
        isRepeated: void 0,
        useFeaturedImage: void 0,
        isDark: newIsDark
      });
    };
    const onSetOverlayColor = async (newOverlayColor) => {
      const averageBackgroundColor = await getMediaColor(url);
      const { attributes: currentAttrs } = propsRef.current;
      const newIsDark = compositeIsDark(
        currentAttrs.dimRatio,
        newOverlayColor,
        averageBackgroundColor
      );
      setOverlayColor(newOverlayColor);
      __unstableMarkNextChangeAsNotPersistent();
      setAttributes({
        isUserOverlayColor: true,
        isDark: newIsDark
      });
    };
    const onUpdateDimRatio = async (newDimRatio) => {
      const averageBackgroundColor = await getMediaColor(url);
      const { overlayColor: currentOverlay } = propsRef.current;
      const newIsDark = compositeIsDark(
        newDimRatio,
        currentOverlay.color,
        averageBackgroundColor
      );
      setAttributes({
        dimRatio: newDimRatio,
        isDark: newIsDark
      });
    };
    const onUploadError = (message) => {
      createErrorNotice(message, { type: "snackbar" });
    };
    const onSelectEmbedUrl = (embedUrl) => {
      const newDimRatio = originalUrl === void 0 && dimRatio === 100 ? 50 : dimRatio;
      setAttributes({
        url: embedUrl,
        backgroundType: EMBED_VIDEO_BACKGROUND_TYPE,
        dimRatio: newDimRatio,
        id: void 0,
        focalPoint: void 0,
        hasParallax: void 0,
        isRepeated: void 0,
        useFeaturedImage: void 0
      });
    };
    const { embedPreview, isFetchingEmbed } = (0, import_data30.useSelect)(
      (select9) => {
        if (backgroundType !== EMBED_VIDEO_BACKGROUND_TYPE || !url) {
          return {
            embedPreview: void 0,
            isFetchingEmbed: false
          };
        }
        const { getEmbedPreview, isRequestingEmbedPreview } = select9(import_core_data16.store);
        return {
          embedPreview: getEmbedPreview(url),
          isFetchingEmbed: isRequestingEmbedPreview(url)
        };
      },
      [url, backgroundType]
    );
    const embedHtml = (0, import_element24.useMemo)(() => {
      if (backgroundType !== EMBED_VIDEO_BACKGROUND_TYPE || !embedPreview?.html) {
        return null;
      }
      return getBackgroundEmbedHtml(embedPreview.html);
    }, [embedPreview, backgroundType]);
    const isUploadingMedia = isTemporaryMedia(id, url);
    const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
    const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
    const isEmbedVideoBackground = EMBED_VIDEO_BACKGROUND_TYPE === backgroundType;
    const blockEditingMode = (0, import_block_editor67.useBlockEditingMode)();
    const hasNonContentControls = blockEditingMode === "default";
    const [resizeListener, { height, width }] = (0, import_compose17.useResizeObserver)();
    const resizableBoxDimensions = (0, import_element24.useMemo)(() => {
      return {
        height: minHeightUnit === "px" && minHeight ? minHeight : "auto",
        width: "auto"
      };
    }, [minHeight, minHeightUnit]);
    const minHeightWithUnit = minHeight && minHeightUnit ? `${minHeight}${minHeightUnit}` : minHeight;
    const isImgElement = !(hasParallax || isRepeated);
    const style2 = {
      minHeight: minHeightWithUnit || void 0
    };
    const backgroundImage = url ? `url(${url})` : void 0;
    const backgroundPosition = mediaPosition(focalPoint);
    const bgStyle = { backgroundColor: overlayColor.color };
    const mediaStyle = {
      objectPosition: focalPoint && isImgElement ? mediaPosition(focalPoint) : void 0
    };
    const hasBackground = !!(url || overlayColor.color || gradientValue);
    const hasInnerBlocks = (0, import_data30.useSelect)(
      (select9) => select9(import_block_editor67.store).getBlock(clientId).innerBlocks.length > 0,
      [clientId]
    );
    const ref = (0, import_element24.useRef)();
    const blockProps = (0, import_block_editor67.useBlockProps)({ ref });
    const [fontSizes] = (0, import_block_editor67.useSettings)("typography.fontSizes");
    const hasFontSizes = fontSizes?.length > 0;
    const innerBlocksTemplate = getInnerBlocksTemplate({
      fontSize: hasFontSizes ? "large" : void 0
    });
    const innerBlocksProps = (0, import_block_editor67.useInnerBlocksProps)(
      {
        className: "wp-block-cover__inner-container"
      },
      {
        // Avoid template sync when the `templateLock` value is `all` or `contentOnly`.
        // See: https://github.com/WordPress/gutenberg/pull/45632
        template: !hasInnerBlocks ? innerBlocksTemplate : void 0,
        templateInsertUpdatesSelection: true,
        allowedBlocks,
        templateLock,
        dropZoneElement: ref.current
      }
    );
    const mediaElement = (0, import_element24.useRef)();
    const currentSettings = {
      isVideoBackground,
      isImageBackground,
      mediaElement,
      hasInnerBlocks,
      url,
      isImgElement,
      overlayColor
    };
    const toggleUseFeaturedImage = async () => {
      const newUseFeaturedImage = !useFeaturedImage;
      const averageBackgroundColor = newUseFeaturedImage ? await getMediaColor(mediaUrl) : DEFAULT_BACKGROUND_COLOR;
      const { attributes: currentAttrs, overlayColor: currentOverlay } = propsRef.current;
      const newOverlayColor = !currentAttrs.isUserOverlayColor ? averageBackgroundColor : currentOverlay.color;
      if (!currentAttrs.isUserOverlayColor) {
        if (newUseFeaturedImage) {
          setOverlayColor(newOverlayColor);
        } else {
          setOverlayColor(void 0);
        }
        __unstableMarkNextChangeAsNotPersistent();
      }
      const newDimRatio = currentAttrs.dimRatio === 100 ? 50 : currentAttrs.dimRatio;
      const newIsDark = compositeIsDark(
        newDimRatio,
        newOverlayColor,
        averageBackgroundColor
      );
      setAttributes({
        id: void 0,
        url: void 0,
        useFeaturedImage: newUseFeaturedImage,
        dimRatio: newDimRatio,
        backgroundType: useFeaturedImage ? IMAGE_BACKGROUND_TYPE : void 0,
        isDark: newIsDark
      });
    };
    const blockControls = /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
      CoverBlockControls,
      {
        attributes: attributes2,
        setAttributes,
        onSelectMedia,
        onSelectEmbedUrl,
        currentSettings,
        toggleUseFeaturedImage,
        onClearMedia,
        blockEditingMode
      }
    );
    const inspectorControls = /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
      CoverInspectorControls,
      {
        attributes: attributes2,
        setAttributes,
        clientId,
        setOverlayColor: onSetOverlayColor,
        coverRef: ref,
        currentSettings,
        toggleUseFeaturedImage,
        updateDimRatio: onUpdateDimRatio,
        onClearMedia,
        featuredImage: media
      }
    );
    const resizableCoverProps = {
      className: "block-library-cover__resize-container",
      clientId,
      height,
      minHeight: minHeightWithUnit,
      onResizeStart: () => {
        setAttributes({ minHeightUnit: "px" });
        toggleSelection(false);
      },
      onResize: (value) => {
        setAttributes({ minHeight: value });
      },
      onResizeStop: (newMinHeight) => {
        toggleSelection(true);
        setAttributes({ minHeight: newMinHeight });
      },
      // Hide the resize handle if an aspect ratio is set, as the aspect ratio takes precedence.
      showHandle: !attributes2.style?.dimensions?.aspectRatio,
      size: resizableBoxDimensions,
      width
    };
    if (!useFeaturedImage && !hasInnerBlocks && !hasBackground) {
      return /* @__PURE__ */ (0, import_jsx_runtime225.jsxs)(import_jsx_runtime225.Fragment, { children: [
        blockControls,
        inspectorControls,
        hasNonContentControls && isSelected && /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(ResizableCoverPopover, { ...resizableCoverProps }),
        /* @__PURE__ */ (0, import_jsx_runtime225.jsxs)(
          TagName2,
          {
            ...blockProps,
            className: clsx_default("is-placeholder", blockProps.className),
            style: {
              ...blockProps.style,
              minHeight: minHeightWithUnit || void 0
            },
            children: [
              resizeListener,
              /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
                CoverPlaceholder,
                {
                  onSelectMedia,
                  onError: onUploadError,
                  toggleUseFeaturedImage,
                  children: /* @__PURE__ */ (0, import_jsx_runtime225.jsx)("div", { className: "wp-block-cover__placeholder-background-options", children: /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
                    import_block_editor67.ColorPalette,
                    {
                      disableCustomColors: true,
                      value: overlayColor.color,
                      onChange: onSetOverlayColor,
                      clearable: false,
                      asButtons: true,
                      "aria-label": (0, import_i18n52.__)("Overlay color")
                    }
                  ) })
                }
              )
            ]
          }
        )
      ] });
    }
    const classes = clsx_default(
      {
        "is-dark-theme": isDark2,
        "is-light": !isDark2,
        "is-transient": isUploadingMedia,
        "has-parallax": hasParallax,
        "is-repeated": isRepeated,
        "has-custom-content-position": !isContentPositionCenter(contentPosition)
      },
      getPositionClassName(contentPosition)
    );
    const showOverlay = url || !useFeaturedImage || useFeaturedImage && !url;
    return /* @__PURE__ */ (0, import_jsx_runtime225.jsxs)(import_jsx_runtime225.Fragment, { children: [
      blockControls,
      inspectorControls,
      /* @__PURE__ */ (0, import_jsx_runtime225.jsxs)(
        TagName2,
        {
          ...blockProps,
          className: clsx_default(classes, blockProps.className),
          style: { ...style2, ...blockProps.style },
          "data-url": url,
          children: [
            resizeListener,
            !url && useFeaturedImage && /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
              import_components34.Placeholder,
              {
                className: "wp-block-cover__image--placeholder-image",
                withIllustration: true
              }
            ),
            url && isImageBackground && (isImgElement ? /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
              "img",
              {
                ref: mediaElement,
                className: "wp-block-cover__image-background",
                alt,
                src: url,
                style: mediaStyle
              }
            ) : /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
              "div",
              {
                ref: mediaElement,
                role: alt ? "img" : void 0,
                "aria-label": alt ? alt : void 0,
                className: clsx_default(
                  classes,
                  "wp-block-cover__image-background"
                ),
                style: { backgroundImage, backgroundPosition }
              }
            )),
            url && isVideoBackground && /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
              "video",
              {
                ref: mediaElement,
                className: "wp-block-cover__video-background",
                autoPlay: true,
                muted: true,
                loop: true,
                src: url,
                poster,
                style: mediaStyle
              }
            ),
            isEmbedVideoBackground && embedHtml && /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
              "div",
              {
                ref: mediaElement,
                className: "wp-block-cover__video-background wp-block-cover__embed-background",
                style: mediaStyle,
                children: /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
                  import_components34.SandBox,
                  {
                    allowSameOrigin: true,
                    html: embedHtml,
                    title: "Background video",
                    styles: [
                      "iframe{position:fixed;top:0;left:0;width:100%;height:100%;}"
                    ]
                  }
                )
              }
            ),
            isEmbedVideoBackground && !embedHtml && isFetchingEmbed && /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(import_components34.Spinner, {}),
            showOverlay && /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
              "span",
              {
                "aria-hidden": "true",
                className: clsx_default(
                  "wp-block-cover__background",
                  dimRatioToClass(dimRatio),
                  {
                    [overlayColor.class]: overlayColor.class,
                    "has-background-dim": dimRatio !== void 0,
                    // For backwards compatibility. Former versions of the Cover Block applied
                    // `.wp-block-cover__gradient-background` in the presence of
                    // media, a gradient and a dim.
                    "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
                    "has-background-gradient": gradientValue,
                    [gradientClass]: gradientClass
                  }
                ),
                style: { backgroundImage: gradientValue, ...bgStyle }
              }
            ),
            isUploadingMedia && /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(import_components34.Spinner, {}),
            /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
              CoverPlaceholder,
              {
                disableMediaButtons: true,
                onSelectMedia,
                onError: onUploadError,
                toggleUseFeaturedImage
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime225.jsx)("div", { ...innerBlocksProps })
          ]
        }
      ),
      hasNonContentControls && isSelected && /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(ResizableCoverPopover, { ...resizableCoverProps })
    ] });
  }
  var edit_default7 = (0, import_compose17.compose)([
    (0, import_block_editor67.withColors)({ overlayColor: "background-color" })
  ])(CoverEdit);

  // packages/block-library/build-module/cover/block.json
  var block_default31 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/cover",
    title: "Cover",
    category: "media",
    description: "Add an image or video with a text overlay.",
    textdomain: "default",
    attributes: {
      url: {
        type: "string",
        role: "content"
      },
      useFeaturedImage: {
        type: "boolean",
        default: false
      },
      id: {
        type: "number"
      },
      alt: {
        type: "string",
        default: ""
      },
      hasParallax: {
        type: "boolean",
        default: false
      },
      isRepeated: {
        type: "boolean",
        default: false
      },
      dimRatio: {
        type: "number",
        default: 100
      },
      overlayColor: {
        type: "string"
      },
      customOverlayColor: {
        type: "string"
      },
      isUserOverlayColor: {
        type: "boolean"
      },
      backgroundType: {
        type: "string",
        default: "image"
      },
      focalPoint: {
        type: "object"
      },
      minHeight: {
        type: "number"
      },
      minHeightUnit: {
        type: "string"
      },
      gradient: {
        type: "string"
      },
      customGradient: {
        type: "string"
      },
      contentPosition: {
        type: "string"
      },
      isDark: {
        type: "boolean",
        default: true
      },
      templateLock: {
        type: ["string", "boolean"],
        enum: ["all", "insert", "contentOnly", false]
      },
      tagName: {
        type: "string",
        default: "div"
      },
      sizeSlug: {
        type: "string"
      },
      poster: {
        type: "string",
        source: "attribute",
        selector: "video",
        attribute: "poster"
      }
    },
    usesContext: ["postId", "postType"],
    supports: {
      anchor: true,
      align: true,
      html: false,
      shadow: true,
      spacing: {
        padding: true,
        margin: ["top", "bottom"],
        blockGap: true,
        __experimentalDefaultControls: {
          padding: true,
          blockGap: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      color: {
        heading: true,
        text: true,
        background: false,
        __experimentalSkipSerialization: ["gradients"],
        enableContrastChecker: false
      },
      dimensions: {
        aspectRatio: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      layout: {
        allowJustification: false
      },
      interactivity: {
        clientNavigation: true
      },
      filter: {
        duotone: true
      },
      allowedBlocks: true
    },
    selectors: {
      filter: {
        duotone: ".wp-block-cover > .wp-block-cover__image-background, .wp-block-cover > .wp-block-cover__video-background"
      }
    },
    editorStyle: "wp-block-cover-editor",
    style: "wp-block-cover"
  };

  // packages/block-library/build-module/cover/save.mjs
  var import_block_editor68 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime226 = __toESM(require_jsx_runtime(), 1);
  function save14({ attributes: attributes2 }) {
    const {
      backgroundType,
      gradient,
      contentPosition,
      customGradient,
      customOverlayColor,
      dimRatio,
      focalPoint,
      useFeaturedImage,
      hasParallax,
      isDark: isDark2,
      isRepeated,
      overlayColor,
      url,
      alt,
      id,
      minHeight: minHeightProp,
      minHeightUnit,
      tagName: Tag,
      sizeSlug,
      poster
    } = attributes2;
    const overlayColorClass = (0, import_block_editor68.getColorClassName)(
      "background-color",
      overlayColor
    );
    const gradientClass = (0, import_block_editor68.__experimentalGetGradientClass)(gradient);
    const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
    const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
    const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
    const isEmbedVideoBackground = EMBED_VIDEO_BACKGROUND_TYPE === backgroundType;
    const isImgElement = !(hasParallax || isRepeated);
    const style2 = {
      minHeight: minHeight || void 0
    };
    const bgStyle = {
      backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
      background: customGradient ? customGradient : void 0
    };
    const objectPosition = (
      // prettier-ignore
      focalPoint && isImgElement ? mediaPosition(focalPoint) : void 0
    );
    const backgroundImage = url ? `url(${url})` : void 0;
    const backgroundPosition = mediaPosition(focalPoint);
    const classes = clsx_default(
      {
        "is-light": !isDark2,
        "has-parallax": hasParallax,
        "is-repeated": isRepeated,
        "has-custom-content-position": !isContentPositionCenter(contentPosition)
      },
      getPositionClassName(contentPosition)
    );
    const imgClasses = clsx_default(
      "wp-block-cover__image-background",
      id ? `wp-image-${id}` : null,
      {
        [`size-${sizeSlug}`]: sizeSlug,
        "has-parallax": hasParallax,
        "is-repeated": isRepeated
      }
    );
    const gradientValue = gradient || customGradient;
    return /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(Tag, { ...import_block_editor68.useBlockProps.save({ className: classes, style: style2 }), children: [
      !useFeaturedImage && isImageBackground && url && (isImgElement ? /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
        "img",
        {
          className: imgClasses,
          alt,
          src: url,
          style: { objectPosition },
          "data-object-fit": "cover",
          "data-object-position": objectPosition
        }
      ) : /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
        "div",
        {
          role: alt ? "img" : void 0,
          "aria-label": alt ? alt : void 0,
          className: imgClasses,
          style: { backgroundPosition, backgroundImage }
        }
      )),
      isVideoBackground && url && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
        "video",
        {
          className: clsx_default(
            "wp-block-cover__video-background",
            "intrinsic-ignore"
          ),
          autoPlay: true,
          muted: true,
          loop: true,
          playsInline: true,
          src: url,
          poster,
          style: { objectPosition },
          "data-object-fit": "cover",
          "data-object-position": objectPosition
        }
      ),
      isEmbedVideoBackground && url && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
        "figure",
        {
          className: clsx_default(
            "wp-block-cover__video-background",
            "wp-block-cover__embed-background",
            "wp-block-embed"
          ),
          children: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)("div", { className: "wp-block-embed__wrapper", children: url })
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
        "span",
        {
          "aria-hidden": "true",
          className: clsx_default(
            "wp-block-cover__background",
            overlayColorClass,
            dimRatioToClass(dimRatio),
            {
              "has-background-dim": dimRatio !== void 0,
              // For backwards compatibility. Former versions of the Cover Block applied
              // `.wp-block-cover__gradient-background` in the presence of
              // media, a gradient and a dim.
              "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
              "has-background-gradient": gradientValue,
              [gradientClass]: gradientClass
            }
          ),
          style: bgStyle
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
        "div",
        {
          ...import_block_editor68.useInnerBlocksProps.save({
            className: "wp-block-cover__inner-container"
          })
        }
      )
    ] });
  }

  // packages/block-library/build-module/cover/transforms.mjs
  var import_blocks22 = __toESM(require_blocks(), 1);
  var import_block_editor69 = __toESM(require_block_editor(), 1);
  var { cleanEmptyObject: cleanEmptyObject4 } = unlock(import_block_editor69.privateApis);
  var transforms6 = {
    from: [
      {
        type: "block",
        blocks: ["core/image"],
        transform: ({ caption, url, alt, align, id, anchor, style: style2 }) => (0, import_blocks22.createBlock)(
          "core/cover",
          {
            dimRatio: 50,
            url,
            alt,
            align,
            id,
            anchor,
            style: {
              color: {
                duotone: style2?.color?.duotone
              }
            }
          },
          [
            (0, import_blocks22.createBlock)("core/paragraph", {
              content: caption,
              fontSize: "large",
              style: {
                typography: {
                  textAlign: "center"
                }
              }
            })
          ]
        )
      },
      {
        type: "block",
        blocks: ["core/video"],
        transform: ({ caption, src, align, id, anchor }) => (0, import_blocks22.createBlock)(
          "core/cover",
          {
            dimRatio: 50,
            url: src,
            align,
            id,
            backgroundType: VIDEO_BACKGROUND_TYPE,
            anchor
          },
          [
            (0, import_blocks22.createBlock)("core/paragraph", {
              content: caption,
              fontSize: "large",
              style: {
                typography: {
                  textAlign: "center"
                }
              }
            })
          ]
        )
      },
      {
        type: "block",
        blocks: ["core/group"],
        transform: (attributes2, innerBlocks) => {
          const { align, anchor, backgroundColor, gradient, style: style2 } = attributes2;
          if (innerBlocks?.length === 1 && innerBlocks[0]?.name === "core/cover") {
            return (0, import_blocks22.createBlock)(
              "core/cover",
              innerBlocks[0].attributes,
              innerBlocks[0].innerBlocks
            );
          }
          const dimRatio = backgroundColor || gradient || style2?.color?.background || style2?.color?.gradient ? void 0 : 50;
          const parentAttributes = {
            align,
            anchor,
            dimRatio,
            overlayColor: backgroundColor,
            customOverlayColor: style2?.color?.background,
            gradient,
            customGradient: style2?.color?.gradient
          };
          const attributesWithoutBackgroundColors = {
            ...attributes2,
            backgroundColor: void 0,
            gradient: void 0,
            style: cleanEmptyObject4({
              ...attributes2?.style,
              color: style2?.color ? {
                ...style2?.color,
                background: void 0,
                gradient: void 0
              } : void 0
            })
          };
          return (0, import_blocks22.createBlock)("core/cover", parentAttributes, [
            (0, import_blocks22.createBlock)(
              "core/group",
              attributesWithoutBackgroundColors,
              innerBlocks
            )
          ]);
        }
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/image"],
        isMatch: ({
          backgroundType,
          url,
          overlayColor,
          customOverlayColor,
          gradient,
          customGradient
        }) => {
          if (url) {
            return backgroundType === IMAGE_BACKGROUND_TYPE;
          }
          return !overlayColor && !customOverlayColor && !gradient && !customGradient;
        },
        transform: ({ title, url, alt, align, id, anchor, style: style2 }) => (0, import_blocks22.createBlock)("core/image", {
          caption: title,
          url,
          alt,
          align,
          id,
          anchor,
          style: {
            color: {
              duotone: style2?.color?.duotone
            }
          }
        })
      },
      {
        type: "block",
        blocks: ["core/video"],
        isMatch: ({
          backgroundType,
          url,
          overlayColor,
          customOverlayColor,
          gradient,
          customGradient
        }) => {
          if (url) {
            return backgroundType === VIDEO_BACKGROUND_TYPE;
          }
          return !overlayColor && !customOverlayColor && !gradient && !customGradient;
        },
        transform: ({ title, url, align, id, anchor }) => (0, import_blocks22.createBlock)("core/video", {
          caption: title,
          src: url,
          id,
          align,
          anchor
        })
      },
      {
        type: "block",
        blocks: ["core/group"],
        isMatch: ({ url, useFeaturedImage }) => {
          if (url || useFeaturedImage) {
            return false;
          }
          return true;
        },
        transform: (attributes2, innerBlocks) => {
          const transformedColorAttributes = {
            backgroundColor: attributes2?.overlayColor,
            gradient: attributes2?.gradient,
            style: cleanEmptyObject4({
              ...attributes2?.style,
              color: attributes2?.customOverlayColor || attributes2?.customGradient || attributes2?.style?.color ? {
                background: attributes2?.customOverlayColor,
                gradient: attributes2?.customGradient,
                ...attributes2?.style?.color
              } : void 0
            })
          };
          if (innerBlocks?.length === 1 && innerBlocks[0]?.name === "core/group") {
            const groupAttributes = cleanEmptyObject4(
              innerBlocks[0].attributes || {}
            );
            if (groupAttributes?.backgroundColor || groupAttributes?.gradient || groupAttributes?.style?.color?.background || groupAttributes?.style?.color?.gradient) {
              return (0, import_blocks22.createBlock)(
                "core/group",
                groupAttributes,
                innerBlocks[0]?.innerBlocks
              );
            }
            return (0, import_blocks22.createBlock)(
              "core/group",
              {
                ...transformedColorAttributes,
                ...groupAttributes,
                style: cleanEmptyObject4({
                  ...groupAttributes?.style,
                  color: transformedColorAttributes?.style?.color || groupAttributes?.style?.color ? {
                    ...transformedColorAttributes?.style?.color,
                    ...groupAttributes?.style?.color
                  } : void 0
                })
              },
              innerBlocks[0]?.innerBlocks
            );
          }
          return (0, import_blocks22.createBlock)(
            "core/group",
            { ...attributes2, ...transformedColorAttributes },
            innerBlocks
          );
        }
      }
    ]
  };
  var transforms_default6 = transforms6;

  // packages/block-library/build-module/cover/variations.mjs
  var import_i18n53 = __toESM(require_i18n(), 1);
  var variations3 = [
    {
      name: "cover",
      title: (0, import_i18n53.__)("Cover"),
      description: (0, import_i18n53.__)("Add an image or video with a text overlay."),
      attributes: { layout: { type: "constrained" } },
      isDefault: true,
      icon: cover_default
    }
  ];
  var variations_default3 = variations3;

  // packages/block-library/build-module/cover/index.mjs
  var { fieldsKey: fieldsKey4, formKey: formKey4 } = unlock(import_blocks23.privateApis);
  var { name: name30 } = block_default31;
  var settings30 = {
    icon: cover_default,
    example: {
      attributes: {
        customOverlayColor: "#065174",
        dimRatio: 40,
        url: "https://s.w.org/images/core/5.3/Windbuchencom.jpg",
        style: {
          typography: {
            fontSize: 48
          },
          color: {
            text: "white"
          }
        }
      },
      innerBlocks: [
        {
          name: "core/paragraph",
          attributes: {
            content: `<strong>${(0, import_i18n54.__)("Snow Patrol")}</strong>`,
            style: {
              typography: {
                textAlign: "center"
              }
            }
          }
        }
      ]
    },
    transforms: transforms_default6,
    save: save14,
    edit: edit_default7,
    deprecated: deprecated_default14,
    variations: variations_default3
  };
  if (window.__experimentalContentOnlyInspectorFields) {
    settings30[fieldsKey4] = [
      {
        id: "background",
        label: (0, import_i18n54.__)("Background"),
        type: "media",
        Edit: {
          control: "media",
          // TODO: replace with custom component
          // TODO - How to support custom gradient?
          // Build it into Media, or use a custom control?
          allowedTypes: ["image", "video"],
          multiple: false,
          useFeaturedImage: true
        },
        getValue: ({ item }) => ({
          id: item.id,
          url: item.url,
          alt: item.alt,
          mediaType: item.backgroundType,
          featuredImage: item.useFeaturedImage
        }),
        setValue: ({ value }) => ({
          id: value.id,
          url: value.url,
          alt: value.alt,
          mediaType: value.backgroundType,
          useFeaturedImage: value.featuredImage
        })
      }
    ];
    settings30[formKey4] = {
      fields: ["background"]
    };
  }
  var init30 = () => initBlock({ name: name30, metadata: block_default31, settings: settings30 });

  // packages/block-library/build-module/details/index.mjs
  var details_exports = {};
  __export(details_exports, {
    init: () => init31,
    metadata: () => block_default32,
    name: () => name31,
    settings: () => settings31
  });
  var import_i18n56 = __toESM(require_i18n(), 1);
  var import_blocks25 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/details/block.json
  var block_default32 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/details",
    title: "Details",
    category: "text",
    description: "Hide and show additional content.",
    keywords: ["summary", "toggle", "disclosure"],
    textdomain: "default",
    attributes: {
      showContent: {
        type: "boolean",
        default: false
      },
      summary: {
        type: "rich-text",
        source: "rich-text",
        selector: "summary",
        role: "content"
      },
      name: {
        type: "string",
        source: "attribute",
        attribute: "name",
        selector: ".wp-block-details"
      },
      placeholder: {
        type: "string"
      }
    },
    supports: {
      __experimentalOnEnter: true,
      align: ["wide", "full"],
      anchor: true,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      __experimentalBorder: {
        color: true,
        width: true,
        style: true
      },
      html: false,
      spacing: {
        margin: true,
        padding: true,
        blockGap: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      layout: {
        allowEditing: false
      },
      interactivity: {
        clientNavigation: true
      },
      allowedBlocks: true
    },
    editorStyle: "wp-block-details-editor",
    style: "wp-block-details"
  };

  // packages/block-library/build-module/details/edit.mjs
  var import_block_editor70 = __toESM(require_block_editor(), 1);
  var import_components35 = __toESM(require_components(), 1);
  var import_i18n55 = __toESM(require_i18n(), 1);
  var import_element25 = __toESM(require_element(), 1);
  var import_data31 = __toESM(require_data(), 1);
  var import_jsx_runtime227 = __toESM(require_jsx_runtime(), 1);
  var { withIgnoreIMEEvents } = unlock(import_components35.privateApis);
  var TEMPLATE5 = [
    [
      "core/paragraph",
      {
        placeholder: (0, import_i18n55.__)("Type / to add a hidden block")
      }
    ]
  ];
  function DetailsEdit({ attributes: attributes2, setAttributes, clientId }) {
    const { name: name123, showContent, summary, allowedBlocks, placeholder: placeholder2 } = attributes2;
    const blockProps = (0, import_block_editor70.useBlockProps)();
    const innerBlocksProps = (0, import_block_editor70.useInnerBlocksProps)(blockProps, {
      template: TEMPLATE5,
      __experimentalCaptureToolbars: true,
      allowedBlocks
    });
    const [isOpen, setIsOpen] = (0, import_element25.useState)(showContent);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const hasSelectedInnerBlock = (0, import_data31.useSelect)(
      (select9) => select9(import_block_editor70.store).hasSelectedInnerBlock(clientId, true),
      [clientId]
    );
    const handleSummaryKeyDown = (event) => {
      if (event.key === "Enter" && !event.shiftKey) {
        setIsOpen((prevIsOpen) => !prevIsOpen);
        event.preventDefault();
      }
    };
    const handleSummaryKeyUp = (event) => {
      if (event.key === " ") {
        event.preventDefault();
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(import_jsx_runtime227.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(import_block_editor70.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
        import_components35.__experimentalToolsPanel,
        {
          label: (0, import_i18n55.__)("Settings"),
          resetAll: () => {
            setAttributes({
              showContent: false
            });
          },
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
            import_components35.__experimentalToolsPanelItem,
            {
              isShownByDefault: true,
              label: (0, import_i18n55.__)("Open by default"),
              hasValue: () => showContent,
              onDeselect: () => {
                setAttributes({
                  showContent: false
                });
              },
              children: /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
                import_components35.ToggleControl,
                {
                  label: (0, import_i18n55.__)("Open by default"),
                  checked: showContent,
                  onChange: () => setAttributes({
                    showContent: !showContent
                  })
                }
              )
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(import_block_editor70.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
        import_components35.TextControl,
        {
          __next40pxDefaultSize: true,
          label: (0, import_i18n55.__)("Name attribute"),
          value: name123 || "",
          onChange: (newName) => setAttributes({ name: newName }),
          help: (0, import_i18n55.__)(
            "Enables multiple Details blocks with the same name attribute to be connected, with only one open at a time."
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(
        "details",
        {
          ...innerBlocksProps,
          open: isOpen || hasSelectedInnerBlock,
          onToggle: (event) => setIsOpen(event.target.open),
          name: name123 || "",
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
              "summary",
              {
                onKeyDown: withIgnoreIMEEvents(handleSummaryKeyDown),
                onKeyUp: handleSummaryKeyUp,
                children: /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
                  import_block_editor70.RichText,
                  {
                    identifier: "summary",
                    "aria-label": (0, import_i18n55.__)(
                      "Write summary. Press Enter to expand or collapse the details."
                    ),
                    placeholder: placeholder2 || (0, import_i18n55.__)("Write summary\u2026"),
                    withoutInteractiveFormatting: true,
                    value: summary,
                    onChange: (newSummary) => setAttributes({ summary: newSummary })
                  }
                )
              }
            ),
            innerBlocksProps.children
          ]
        }
      )
    ] });
  }
  var edit_default8 = DetailsEdit;

  // packages/block-library/build-module/details/save.mjs
  var import_block_editor71 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime228 = __toESM(require_jsx_runtime(), 1);
  function save15({ attributes: attributes2 }) {
    const { name: name123, showContent } = attributes2;
    const summary = attributes2.summary ? attributes2.summary : "Details";
    const blockProps = import_block_editor71.useBlockProps.save();
    return /* @__PURE__ */ (0, import_jsx_runtime228.jsxs)(
      "details",
      {
        ...blockProps,
        name: name123 || void 0,
        open: showContent,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime228.jsx)("summary", { children: /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(import_block_editor71.RichText.Content, { value: summary }) }),
          /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(import_block_editor71.InnerBlocks.Content, {})
        ]
      }
    );
  }

  // packages/block-library/build-module/details/transforms.mjs
  var import_blocks24 = __toESM(require_blocks(), 1);
  var transforms_default7 = {
    from: [
      {
        type: "block",
        isMultiBlock: true,
        blocks: ["*"],
        isMatch({}, blocks) {
          return !(blocks.length === 1 && blocks[0].name === "core/details");
        },
        __experimentalConvert(blocks) {
          return (0, import_blocks24.createBlock)(
            "core/details",
            {},
            blocks.map((block) => (0, import_blocks24.cloneBlock)(block))
          );
        }
      }
    ]
  };

  // packages/block-library/build-module/details/index.mjs
  var { fieldsKey: fieldsKey5, formKey: formKey5 } = unlock(import_blocks25.privateApis);
  var { name: name31 } = block_default32;
  var settings31 = {
    icon: details_default,
    example: {
      attributes: {
        summary: (0, import_i18n56.__)("La Mancha"),
        showContent: true
      },
      innerBlocks: [
        {
          name: "core/paragraph",
          attributes: {
            content: (0, import_i18n56.__)(
              "In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing."
            )
          }
        }
      ]
    },
    __experimentalLabel(attributes2, { context }) {
      const { summary } = attributes2;
      const customName = attributes2?.metadata?.name;
      const hasSummary = summary?.trim().length > 0;
      if (context === "list-view" && (customName || hasSummary)) {
        return customName || summary;
      }
      if (context === "breadcrumb" && customName) {
        return customName;
      }
      if (context === "accessibility") {
        return !hasSummary ? (0, import_i18n56.__)("Details. Empty.") : (0, import_i18n56.sprintf)(
          /* translators: %s: accessibility text; summary title. */
          (0, import_i18n56.__)("Details. %s"),
          summary
        );
      }
    },
    save: save15,
    edit: edit_default8,
    transforms: transforms_default7
  };
  if (window.__experimentalContentOnlyInspectorFields) {
    settings31[fieldsKey5] = [
      {
        id: "summary",
        label: (0, import_i18n56.__)("Summary"),
        type: "text",
        Edit: "rich-text"
        // TODO: replace with custom component
      }
    ];
    settings31[formKey5] = {
      fields: ["summary"]
    };
  }
  var init31 = () => initBlock({ name: name31, metadata: block_default32, settings: settings31 });

  // packages/block-library/build-module/embed/index.mjs
  var embed_exports = {};
  __export(embed_exports, {
    init: () => init32,
    metadata: () => block_default7,
    name: () => name32,
    settings: () => settings32
  });

  // packages/block-library/build-module/embed/embed-controls.mjs
  var import_i18n57 = __toESM(require_i18n(), 1);
  var import_components36 = __toESM(require_components(), 1);
  var import_block_editor72 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime229 = __toESM(require_jsx_runtime(), 1);
  function getResponsiveHelp(checked) {
    return checked ? (0, import_i18n57.__)(
      "This embed will preserve its aspect ratio when the browser is resized."
    ) : (0, import_i18n57.__)(
      "This embed may not preserve its aspect ratio when the browser is resized."
    );
  }
  var EmbedControls = ({
    blockSupportsResponsive,
    showEditButton,
    themeSupportsResponsive,
    allowResponsive,
    toggleResponsive,
    switchBackToURLInput
  }) => {
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime229.jsxs)(import_jsx_runtime229.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(import_block_editor72.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(import_components36.ToolbarGroup, { children: showEditButton && /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
        import_components36.ToolbarButton,
        {
          className: "components-toolbar__control",
          label: (0, import_i18n57.__)("Edit URL"),
          icon: pencil_default,
          onClick: switchBackToURLInput
        }
      ) }) }),
      themeSupportsResponsive && blockSupportsResponsive && /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(import_block_editor72.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
        import_components36.__experimentalToolsPanel,
        {
          label: (0, import_i18n57.__)("Media settings"),
          resetAll: () => {
            toggleResponsive(true);
          },
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
            import_components36.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n57.__)("Media settings"),
              isShownByDefault: true,
              hasValue: () => !allowResponsive,
              onDeselect: () => {
                toggleResponsive(!allowResponsive);
              },
              children: /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
                import_components36.ToggleControl,
                {
                  label: (0, import_i18n57.__)("Resize for smaller devices"),
                  checked: allowResponsive,
                  help: getResponsiveHelp,
                  onChange: toggleResponsive
                }
              )
            }
          )
        }
      ) })
    ] });
  };
  var embed_controls_default = EmbedControls;

  // packages/block-library/build-module/embed/icons.mjs
  var import_components37 = __toESM(require_components(), 1);
  var import_jsx_runtime230 = __toESM(require_jsx_runtime(), 1);
  var embedContentIcon = /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.Path, { 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-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zm-6-9.5L16 12l-2.5 2.8 1.1 1L18 12l-3.5-3.5-1 1zm-3 0l-1-1L6 12l3.5 3.8 1.1-1L8 12l2.5-2.5z" }) });
  var embedAudioIcon = /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.Path, { 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-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM13.2 7.7c-.4.4-.7 1.1-.7 1.9v3.7c-.4-.3-.8-.4-1.3-.4-1.2 0-2.2 1-2.2 2.2 0 1.2 1 2.2 2.2 2.2.5 0 1-.2 1.4-.5.9-.6 1.4-1.6 1.4-2.6V9.6c0-.4.1-.6.2-.8.3-.3 1-.3 1.6-.3h.2V7h-.2c-.7 0-1.8 0-2.6.7z" }) });
  var embedPhotoIcon = /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.Path, { 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-2zM9.2 4.5H19c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V9.8l4.6-5.3zm9.8 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z" }) });
  var embedVideoIcon = /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.Path, { 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-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM10 15l5-3-5-3v6z" }) });
  var embedTwitterIcon = {
    foreground: "#000000",
    src: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.Path, { d: "M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" }) })
  };
  var embedYouTubeIcon = {
    foreground: "#ff0000",
    src: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.Path, { d: "M21.8 8s-.195-1.377-.795-1.984c-.76-.797-1.613-.8-2.004-.847-2.798-.203-6.996-.203-6.996-.203h-.01s-4.197 0-6.996.202c-.39.046-1.242.05-2.003.846C2.395 6.623 2.2 8 2.2 8S2 9.62 2 11.24v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.76.797 1.76.77 2.205.855 1.6.153 6.8.2 6.8.2s4.203-.005 7-.208c.392-.047 1.244-.05 2.005-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517C22 9.62 21.8 8 21.8 8zM9.935 14.595v-5.62l5.403 2.82-5.403 2.8z" }) })
  };
  var embedFacebookIcon = {
    foreground: "#3b5998",
    src: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.Path, { d: "M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z" }) })
  };
  var embedInstagramIcon = /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.G, { children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.Path, { d: "M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z" }) }) });
  var embedWordPressIcon = {
    foreground: "#0073AA",
    src: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.G, { children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.Path, { d: "M12.158 12.786l-2.698 7.84c.806.236 1.657.365 2.54.365 1.047 0 2.05-.18 2.986-.51-.024-.037-.046-.078-.065-.123l-2.762-7.57zM3.008 12c0 3.56 2.07 6.634 5.068 8.092L3.788 8.342c-.5 1.117-.78 2.354-.78 3.658zm15.06-.454c0-1.112-.398-1.88-.74-2.48-.456-.74-.883-1.368-.883-2.11 0-.825.627-1.595 1.51-1.595.04 0 .078.006.116.008-1.598-1.464-3.73-2.36-6.07-2.36-3.14 0-5.904 1.613-7.512 4.053.21.008.41.012.58.012.94 0 2.395-.114 2.395-.114.484-.028.54.684.057.74 0 0-.487.058-1.03.086l3.275 9.74 1.968-5.902-1.4-3.838c-.485-.028-.944-.085-.944-.085-.486-.03-.43-.77.056-.742 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.486-.028.543.684.058.74 0 0-.488.058-1.03.086l3.25 9.665.897-2.997c.456-1.17.684-2.137.684-2.907zm1.82-3.86c.04.286.06.593.06.924 0 .912-.17 1.938-.683 3.22l-2.746 7.94c2.672-1.558 4.47-4.454 4.47-7.77 0-1.564-.4-3.033-1.1-4.314zM12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10z" }) }) })
  };
  var embedSpotifyIcon = {
    foreground: "#1db954",
    src: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.Path, { d: "M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424c-.18.295-.563.387-.857.207-2.35-1.434-5.305-1.76-8.786-.963-.335.077-.67-.133-.746-.47-.077-.334.132-.67.47-.745 3.808-.87 7.076-.496 9.712 1.115.293.18.386.563.206.857M17.81 13.7c-.226.367-.706.482-1.072.257-2.687-1.652-6.785-2.13-9.965-1.166-.413.127-.848-.106-.973-.517-.125-.413.108-.848.52-.973 3.632-1.102 8.147-.568 11.234 1.328.366.226.48.707.256 1.072m.105-2.835C14.692 8.95 9.375 8.775 6.297 9.71c-.493.15-1.016-.13-1.166-.624-.148-.495.13-1.017.625-1.167 3.532-1.073 9.404-.866 13.115 1.337.445.264.59.838.327 1.282-.264.443-.838.59-1.282.325" }) })
  };
  var embedFlickrIcon = /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.Path, { d: "m6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5zm11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5z" }) });
  var embedVimeoIcon = {
    foreground: "#1ab7ea",
    src: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.G, { children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.Path, { d: "M22.396 7.164c-.093 2.026-1.507 4.8-4.245 8.32C15.323 19.16 12.93 21 10.97 21c-1.214 0-2.24-1.12-3.08-3.36-.56-2.052-1.118-4.105-1.68-6.158-.622-2.24-1.29-3.36-2.004-3.36-.156 0-.7.328-1.634.98l-.978-1.26c1.027-.903 2.04-1.806 3.037-2.71C6 3.95 7.03 3.328 7.716 3.265c1.62-.156 2.616.95 2.99 3.32.404 2.558.685 4.148.84 4.77.468 2.12.982 3.18 1.543 3.18.435 0 1.09-.687 1.963-2.064.872-1.376 1.34-2.422 1.402-3.142.125-1.187-.343-1.782-1.4-1.782-.5 0-1.013.115-1.542.34 1.023-3.35 2.977-4.976 5.862-4.883 2.14.063 3.148 1.45 3.024 4.16z" }) }) })
  };
  var embedRedditIcon = /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.Path, { d: "M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z" }) });
  var embedTumblrIcon = {
    foreground: "#35465c",
    src: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.Path, { d: "M19 3H5a2 2 0 00-2 2v14c0 1.1.9 2 2 2h14a2 2 0 002-2V5a2 2 0 00-2-2zm-5.69 14.66c-2.72 0-3.1-1.9-3.1-3.16v-3.56H8.49V8.99c1.7-.62 2.54-1.99 2.64-2.87 0-.06.06-.41.06-.58h1.9v3.1h2.17v2.3h-2.18v3.1c0 .47.13 1.3 1.2 1.26h1.1v2.36c-1.01.02-2.07 0-2.07 0z" }) })
  };
  var embedAmazonIcon = /* @__PURE__ */ (0, import_jsx_runtime230.jsxs)(import_components37.SVG, { viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.Path, { d: "M18.42 14.58c-.51-.66-1.05-1.23-1.05-2.5V7.87c0-1.8.15-3.45-1.2-4.68-1.05-1.02-2.79-1.35-4.14-1.35-2.6 0-5.52.96-6.12 4.14-.06.36.18.54.4.57l2.66.3c.24-.03.42-.27.48-.5.24-1.12 1.17-1.63 2.2-1.63.56 0 1.22.21 1.55.7.4.56.33 1.31.33 1.97v.36c-1.59.18-3.66.27-5.16.93a4.63 4.63 0 0 0-2.93 4.44c0 2.82 1.8 4.23 4.1 4.23 1.95 0 3.03-.45 4.53-1.98.51.72.66 1.08 1.59 1.83.18.09.45.09.63-.1v.04l2.1-1.8c.24-.21.2-.48.03-.75zm-5.4-1.2c-.45.75-1.14 1.23-1.92 1.23-1.05 0-1.65-.81-1.65-1.98 0-2.31 2.1-2.73 4.08-2.73v.6c0 1.05.03 1.92-.5 2.88z" }),
    /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.Path, { d: "M21.69 19.2a17.62 17.62 0 0 1-21.6-1.57c-.23-.2 0-.5.28-.33a23.88 23.88 0 0 0 20.93 1.3c.45-.19.84.3.39.6z" }),
    /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.Path, { d: "M22.8 17.96c-.36-.45-2.22-.2-3.1-.12-.23.03-.3-.18-.05-.36 1.5-1.05 3.96-.75 4.26-.39.3.36-.1 2.82-1.5 4.02-.21.18-.42.1-.3-.15.3-.8 1.02-2.58.69-3z" })
  ] });
  var embedAnimotoIcon = /* @__PURE__ */ (0, import_jsx_runtime230.jsxs)(import_components37.SVG, { viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
      import_components37.Path,
      {
        d: "m.0206909 21 19.8160091-13.07806 3.5831 6.20826z",
        fill: "#4bc7ee"
      }
    ),
    /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
      import_components37.Path,
      {
        d: "m23.7254 19.0205-10.1074-17.18468c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418h22.5655c1.279 0 1.8019-.8905 1.1599-1.9795z",
        fill: "#d4cdcb"
      }
    ),
    /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
      import_components37.Path,
      {
        d: "m.0206909 21 15.2439091-16.38571 4.3029 7.32271z",
        fill: "#c3d82e"
      }
    ),
    /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
      import_components37.Path,
      {
        d: "m13.618 1.83582c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418 15.2646-16.38573z",
        fill: "#e4ecb0"
      }
    ),
    /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.Path, { d: "m.0206909 21 19.5468091-9.063 1.6621 2.8344z", fill: "#209dbd" }),
    /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
      import_components37.Path,
      {
        d: "m.0206909 21 17.9209091-11.82623 1.6259 2.76323z",
        fill: "#7cb3c9"
      }
    )
  ] });
  var embedDailymotionIcon = /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
    import_components37.Path,
    {
      d: "M11.903 16.568c-1.82 0-3.124-1.281-3.124-2.967a2.987 2.987 0 0 1 2.989-2.989c1.663 0 2.944 1.304 2.944 3.034 0 1.663-1.281 2.922-2.81 2.922ZM17.997 3l-3.308.73v5.107c-.809-1.034-2.045-1.37-3.505-1.37-1.529 0-2.9.561-4.023 1.662-1.259 1.214-1.933 2.764-1.933 4.495 0 1.888.72 3.506 2.113 4.742 1.056.944 2.314 1.415 3.775 1.415 1.438 0 2.517-.382 3.573-1.415v1.415h3.308V3Z",
      fill: "#333436"
    }
  ) });
  var embedPinterestIcon = /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.Path, { d: "M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2" }) });
  var embedWolframIcon = /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.SVG, { viewBox: "0 0 44 44", children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.Path, { d: "M32.59521,22.001l4.31885-4.84473-6.34131-1.38379.646-6.459-5.94336,2.61035L22,6.31934l-3.27344,5.60351L12.78418,9.3125l.645,6.458L7.08643,17.15234,11.40479,21.999,7.08594,26.84375l6.34131,1.38379-.64551,6.458,5.94287-2.60938L22,37.68066l3.27344-5.60351,5.94287,2.61035-.64551-6.458,6.34277-1.38183Zm.44385,2.75244L30.772,23.97827l-1.59558-2.07391,1.97888.735Zm-8.82147,6.1579L22.75,33.424V30.88977l1.52228-2.22168ZM18.56226,13.48816,19.819,15.09534l-2.49219-.88642L15.94037,12.337Zm6.87719.00116,2.62043-1.15027-1.38654,1.86981L24.183,15.0946Zm3.59357,2.6029-1.22546,1.7381.07525-2.73486,1.44507-1.94867ZM22,29.33008l-2.16406-3.15686L22,23.23688l2.16406,2.93634Zm-4.25458-9.582-.10528-3.836,3.60986,1.284v3.73242Zm5.00458-2.552,3.60986-1.284-.10528,3.836L22.75,20.92853Zm-7.78174-1.10559-.29352-2.94263,1.44245,1.94739.07519,2.73321Zm2.30982,5.08319,3.50817,1.18164-2.16247,2.9342-3.678-1.08447Zm2.4486,7.49285L21.25,30.88977v2.53485L19.78052,30.91Zm3.48707-6.31121,3.50817-1.18164,2.33228,3.03137-3.678,1.08447Zm10.87219-4.28113-2.714,3.04529L28.16418,19.928l1.92176-2.72565ZM24.06036,12.81769l-2.06012,2.6322-2.059-2.63318L22,9.292ZM9.91455,18.07227l4.00079-.87195,1.921,2.72735-3.20794,1.19019Zm2.93024,4.565,1.9801-.73462L13.228,23.97827l-2.26838.77429Zm-1.55591,3.58819L13.701,25.4021l2.64935.78058-2.14447.67853Zm3.64868,1.977L18.19,27.17334l.08313,3.46332L14.52979,32.2793Zm10.7876,2.43549.08447-3.464,3.25165,1.03052.407,4.07684Zm4.06824-3.77478-2.14545-.68,2.65063-.781,2.41266.825Z" }) });
  var embedPocketCastsIcon = {
    foreground: "#f43e37",
    src: /* @__PURE__ */ (0, import_jsx_runtime230.jsxs)(
      import_components37.SVG,
      {
        width: "24",
        height: "24",
        viewBox: "0 0 24 24",
        fill: "none",
        xmlns: "http://www.w3.org/2000/svg",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
            import_components37.Path,
            {
              fillRule: "evenodd",
              clipRule: "evenodd",
              d: "M24,12A12,12,0,1,1,12,0,12,12,0,0,1,24,12Z"
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
            import_components37.Path,
            {
              fillRule: "evenodd",
              clipRule: "evenodd",
              d: "M2.67,12a9.33,9.33,0,0,1,18.66,0H19a7,7,0,1,0-7,7v2.33A9.33,9.33,0,0,1,2.67,12ZM12,17.6A5.6,5.6,0,1,1,17.6,12h-2A3.56,3.56,0,1,0,12,15.56Z",
              fill: "#fff"
            }
          )
        ]
      }
    )
  };
  var embedBlueskyIcon = /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
    import_components37.Path,
    {
      fill: "#0a7aff",
      d: "M6.3,4.2c2.3,1.7,4.8,5.3,5.7,7.2.9-1.9,3.4-5.4,5.7-7.2,1.7-1.3,4.3-2.2,4.3.9s-.4,5.2-.6,5.9c-.7,2.6-3.3,3.2-5.6,2.8,4,.7,5.1,3,2.9,5.3-5,5.2-6.7-2.8-6.7-2.8,0,0-1.7,8-6.7,2.8-2.2-2.3-1.2-4.6,2.9-5.3-2.3.4-4.9-.3-5.6-2.8-.2-.7-.6-5.3-.6-5.9,0-3.1,2.7-2.1,4.3-.9h0Z"
    }
  ) });

  // packages/block-library/build-module/embed/embed-loading.mjs
  var import_components38 = __toESM(require_components(), 1);
  var import_jsx_runtime231 = __toESM(require_jsx_runtime(), 1);
  var EmbedLoading = () => /* @__PURE__ */ (0, import_jsx_runtime231.jsx)("div", { className: "wp-block-embed is-loading", children: /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(import_components38.Spinner, {}) });
  var embed_loading_default = EmbedLoading;

  // packages/block-library/build-module/embed/embed-placeholder.mjs
  var import_i18n58 = __toESM(require_i18n(), 1);
  var import_components39 = __toESM(require_components(), 1);
  var import_block_editor73 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime232 = __toESM(require_jsx_runtime(), 1);
  var EmbedPlaceholder = ({
    icon: icon4,
    label,
    value,
    onSubmit,
    onChange,
    cannotEmbed,
    fallback: fallback2,
    tryAgain
  }) => {
    return /* @__PURE__ */ (0, import_jsx_runtime232.jsxs)(
      import_components39.Placeholder,
      {
        icon: /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(import_block_editor73.BlockIcon, { icon: icon4, showColors: true }),
        label,
        className: "wp-block-embed",
        instructions: (0, import_i18n58.__)(
          "Paste a link to the content you want to display on your site."
        ),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime232.jsxs)("form", { onSubmit, children: [
            /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
              import_components39.__experimentalInputControl,
              {
                __next40pxDefaultSize: true,
                type: "url",
                value: value || "",
                className: "wp-block-embed__placeholder-input",
                label,
                hideLabelFromVision: true,
                placeholder: (0, import_i18n58.__)("Enter URL to embed here\u2026"),
                onChange
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(import_components39.Button, { __next40pxDefaultSize: true, variant: "primary", type: "submit", children: (0, import_i18n58._x)("Embed", "button label") })
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime232.jsx)("div", { className: "wp-block-embed__learn-more", children: /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
            import_components39.ExternalLink,
            {
              href: (0, import_i18n58.__)(
                "https://wordpress.org/documentation/article/embeds/"
              ),
              children: (0, import_i18n58.__)("Learn more about embeds")
            }
          ) }),
          cannotEmbed && /* @__PURE__ */ (0, import_jsx_runtime232.jsxs)(import_components39.__experimentalVStack, { spacing: 3, className: "components-placeholder__error", children: [
            /* @__PURE__ */ (0, import_jsx_runtime232.jsx)("div", { className: "components-placeholder__instructions", children: (0, import_i18n58.__)("Sorry, this content could not be embedded.") }),
            /* @__PURE__ */ (0, import_jsx_runtime232.jsxs)(
              import_components39.__experimentalHStack,
              {
                expanded: false,
                spacing: 3,
                justify: "flex-start",
                children: [
                  /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
                    import_components39.Button,
                    {
                      __next40pxDefaultSize: true,
                      variant: "secondary",
                      onClick: tryAgain,
                      children: (0, import_i18n58._x)("Try again", "button label")
                    }
                  ),
                  " ",
                  /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
                    import_components39.Button,
                    {
                      __next40pxDefaultSize: true,
                      variant: "secondary",
                      onClick: fallback2,
                      children: (0, import_i18n58._x)("Convert to link", "button label")
                    }
                  )
                ]
              }
            )
          ] })
        ]
      }
    );
  };
  var embed_placeholder_default = EmbedPlaceholder;

  // packages/block-library/build-module/embed/embed-preview.mjs
  var import_i18n59 = __toESM(require_i18n(), 1);
  var import_components40 = __toESM(require_components(), 1);
  var import_block_editor74 = __toESM(require_block_editor(), 1);
  var import_element27 = __toESM(require_element(), 1);
  var import_url5 = __toESM(require_url(), 1);

  // packages/block-library/build-module/embed/wp-embed-preview.mjs
  var import_compose18 = __toESM(require_compose(), 1);
  var import_element26 = __toESM(require_element(), 1);
  var import_jsx_runtime233 = __toESM(require_jsx_runtime(), 1);
  var attributeMap = {
    class: "className",
    frameborder: "frameBorder",
    marginheight: "marginHeight",
    marginwidth: "marginWidth"
  };
  function WpEmbedPreview({ html }) {
    const ref = (0, import_element26.useRef)();
    const props = (0, import_element26.useMemo)(() => {
      const doc = new window.DOMParser().parseFromString(html, "text/html");
      const iframe = doc.querySelector("iframe");
      const iframeProps = {};
      if (!iframe) {
        return iframeProps;
      }
      Array.from(iframe.attributes).forEach(({ name: name123, value }) => {
        if (name123 === "style") {
          return;
        }
        iframeProps[attributeMap[name123] || name123] = value;
      });
      return iframeProps;
    }, [html]);
    (0, import_element26.useEffect)(() => {
      const { ownerDocument } = ref.current;
      const { defaultView } = ownerDocument;
      function resizeWPembeds({ data: { secret, message, value } = {} }) {
        if (message !== "height" || secret !== props["data-secret"]) {
          return;
        }
        ref.current.height = value;
      }
      defaultView.addEventListener("message", resizeWPembeds);
      return () => {
        defaultView.removeEventListener("message", resizeWPembeds);
      };
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime233.jsx)("div", { className: "wp-block-embed__wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
      "iframe",
      {
        ref: (0, import_compose18.useMergeRefs)([ref, (0, import_compose18.useFocusableIframe)()]),
        title: props.title,
        ...props
      }
    ) });
  }

  // packages/block-library/build-module/embed/embed-preview.mjs
  var import_jsx_runtime234 = __toESM(require_jsx_runtime(), 1);
  function EmbedPreview({
    preview,
    previewable,
    url,
    type,
    isSelected,
    className,
    icon: icon4,
    label
  }) {
    const [interactive, setInteractive] = (0, import_element27.useState)(false);
    if (!isSelected && interactive) {
      setInteractive(false);
    }
    const hideOverlay = () => {
      setInteractive(true);
    };
    const { scripts } = preview;
    const html = "photo" === type ? getPhotoHtml(preview) : preview.html;
    const embedSourceUrl = (0, import_url5.getAuthority)(url);
    const iframeTitle = (0, import_i18n59.sprintf)(
      // translators: %s: host providing embed content e.g: www.youtube.com
      (0, import_i18n59.__)("Embedded content from %s"),
      embedSourceUrl
    );
    const sandboxClassnames = clsx_default(
      type,
      className,
      "wp-block-embed__wrapper"
    );
    const embedWrapper = "wp-embed" === type ? /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(WpEmbedPreview, { html }) : /* @__PURE__ */ (0, import_jsx_runtime234.jsxs)("div", { className: "wp-block-embed__wrapper", children: [
      /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
        import_components40.SandBox,
        {
          allowSameOrigin: true,
          html,
          scripts,
          title: iframeTitle,
          type: sandboxClassnames,
          onFocus: hideOverlay
        }
      ),
      !interactive && /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
        "div",
        {
          className: "block-library-embed__interactive-overlay",
          onMouseUp: hideOverlay
        }
      )
    ] });
    return /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(import_jsx_runtime234.Fragment, { children: previewable ? embedWrapper : /* @__PURE__ */ (0, import_jsx_runtime234.jsxs)(
      import_components40.Placeholder,
      {
        icon: /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(import_block_editor74.BlockIcon, { icon: icon4, showColors: true }),
        label,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime234.jsx)("p", { className: "components-placeholder__error", children: /* @__PURE__ */ (0, import_jsx_runtime234.jsx)("a", { href: url, children: url }) }),
          /* @__PURE__ */ (0, import_jsx_runtime234.jsx)("p", { className: "components-placeholder__error", children: (0, import_i18n59.sprintf)(
            /* translators: %s: host providing embed content e.g: www.youtube.com */
            (0, import_i18n59.__)(
              "Embedded content from %s can't be previewed in the editor."
            ),
            embedSourceUrl
          ) })
        ]
      }
    ) });
  }

  // packages/block-library/build-module/embed/edit.mjs
  var import_i18n60 = __toESM(require_i18n(), 1);
  var import_element28 = __toESM(require_element(), 1);
  var import_data32 = __toESM(require_data(), 1);
  var import_block_editor75 = __toESM(require_block_editor(), 1);
  var import_core_data17 = __toESM(require_core_data(), 1);
  var import_primitives156 = __toESM(require_primitives(), 1);
  var import_url6 = __toESM(require_url(), 1);
  var import_jsx_runtime235 = __toESM(require_jsx_runtime(), 1);
  var EmbedEdit = (props) => {
    const {
      attributes: {
        providerNameSlug,
        previewable,
        responsive,
        url: attributesUrl
      },
      attributes: attributes2,
      isSelected,
      onReplace,
      setAttributes,
      insertBlocksAfter,
      onFocus
    } = props;
    const defaultEmbedInfo = {
      title: (0, import_i18n60._x)("Embed", "block title"),
      icon: embedContentIcon
    };
    const { icon: icon4, title } = getEmbedInfoByProvider(providerNameSlug) || defaultEmbedInfo;
    const [url, setURL] = (0, import_element28.useState)(attributesUrl);
    const [isEditingURL, setIsEditingURL] = (0, import_element28.useState)(false);
    const { invalidateResolution } = (0, import_data32.useDispatch)(import_core_data17.store);
    const {
      preview,
      fetching,
      themeSupportsResponsive,
      cannotEmbed,
      hasResolved
    } = (0, import_data32.useSelect)(
      (select9) => {
        const {
          getEmbedPreview,
          isPreviewEmbedFallback,
          isRequestingEmbedPreview,
          getThemeSupports,
          hasFinishedResolution
        } = select9(import_core_data17.store);
        if (!attributesUrl) {
          return { fetching: false, cannotEmbed: false };
        }
        const embedPreview = getEmbedPreview(attributesUrl);
        const previewIsFallback = isPreviewEmbedFallback(attributesUrl);
        const badEmbedProvider = embedPreview?.html === false && embedPreview?.type === void 0;
        const wordpressCantEmbed = embedPreview?.data?.status === 404;
        const validPreview = !!embedPreview && !badEmbedProvider && !wordpressCantEmbed;
        return {
          preview: validPreview ? embedPreview : void 0,
          fetching: isRequestingEmbedPreview(attributesUrl),
          themeSupportsResponsive: getThemeSupports()["responsive-embeds"],
          cannotEmbed: !validPreview || previewIsFallback,
          hasResolved: hasFinishedResolution("getEmbedPreview", [
            attributesUrl
          ])
        };
      },
      [attributesUrl]
    );
    const getMergedAttributes = () => getMergedAttributesWithPreview(
      attributes2,
      preview,
      title,
      responsive
    );
    function toggleResponsive(newAllowResponsive) {
      const { className: className2 } = attributes2;
      const { html } = preview;
      setAttributes({
        allowResponsive: newAllowResponsive,
        className: getClassNames(
          html,
          className2,
          responsive && newAllowResponsive
        )
      });
    }
    (0, import_element28.useEffect)(() => {
      if (preview?.html || !cannotEmbed || !hasResolved) {
        return;
      }
      const newURL = attributesUrl.replace(/\/$/, "");
      setURL(newURL);
      setIsEditingURL(false);
      setAttributes({ url: newURL });
    }, [
      preview?.html,
      attributesUrl,
      cannotEmbed,
      hasResolved,
      setAttributes
    ]);
    (0, import_element28.useEffect)(() => {
      if (!cannotEmbed || fetching || !url) {
        return;
      }
      if ((0, import_url6.getAuthority)(url) === "x.com") {
        const newURL = new URL(url);
        newURL.host = "twitter.com";
        setAttributes({ url: newURL.toString() });
      }
    }, [url, cannotEmbed, fetching, setAttributes]);
    (0, import_element28.useEffect)(() => {
      if (preview && !isEditingURL) {
        const mergedAttributes = getMergedAttributes();
        const hasChanges = Object.keys(mergedAttributes).some(
          (key) => mergedAttributes[key] !== attributes2[key]
        );
        if (hasChanges) {
          setAttributes(mergedAttributes);
        }
        if (onReplace) {
          const upgradedBlock = createUpgradedEmbedBlock(
            props,
            mergedAttributes
          );
          if (upgradedBlock) {
            onReplace(upgradedBlock);
          }
        }
      }
    }, [preview, isEditingURL]);
    const blockProps = (0, import_block_editor75.useBlockProps)();
    if (fetching) {
      return /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(import_primitives156.View, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(embed_loading_default, {}) });
    }
    const label = (0, import_i18n60.sprintf)((0, import_i18n60.__)("%s URL"), title);
    const showEmbedPlaceholder = !preview || cannotEmbed || isEditingURL;
    if (showEmbedPlaceholder) {
      return /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(import_primitives156.View, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(
        embed_placeholder_default,
        {
          icon: icon4,
          label,
          onFocus,
          onSubmit: (event) => {
            if (event) {
              event.preventDefault();
            }
            const blockClass = removeAspectRatioClasses(
              attributes2.className
            );
            setIsEditingURL(false);
            setAttributes({ url, className: blockClass });
          },
          value: url,
          cannotEmbed,
          onChange: (value) => setURL(value),
          fallback: () => fallback(url, onReplace),
          tryAgain: () => {
            invalidateResolution("getEmbedPreview", [url]);
          }
        }
      ) });
    }
    const {
      caption,
      type,
      allowResponsive,
      className: classFromPreview
    } = getMergedAttributes();
    const className = clsx_default(classFromPreview, props.className);
    return /* @__PURE__ */ (0, import_jsx_runtime235.jsxs)(import_jsx_runtime235.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(
        embed_controls_default,
        {
          showEditButton: preview && !cannotEmbed,
          themeSupportsResponsive,
          blockSupportsResponsive: responsive,
          allowResponsive,
          toggleResponsive,
          switchBackToURLInput: () => setIsEditingURL(true)
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime235.jsxs)(
        "figure",
        {
          ...blockProps,
          className: clsx_default(blockProps.className, className, {
            [`is-type-${type}`]: type,
            [`is-provider-${providerNameSlug}`]: providerNameSlug,
            [`wp-block-embed-${providerNameSlug}`]: providerNameSlug
          }),
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(
              EmbedPreview,
              {
                preview,
                previewable,
                className,
                url,
                type,
                caption,
                onCaptionChange: (value) => setAttributes({ caption: value }),
                isSelected,
                icon: icon4,
                label,
                insertBlocksAfter,
                attributes: attributes2,
                setAttributes
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(
              Caption,
              {
                attributes: attributes2,
                setAttributes,
                isSelected,
                insertBlocksAfter,
                label: (0, import_i18n60.__)("Embed caption text"),
                showToolbarButton: isSelected
              }
            )
          ]
        }
      )
    ] });
  };
  var edit_default9 = EmbedEdit;

  // packages/block-library/build-module/embed/save.mjs
  var import_block_editor76 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime236 = __toESM(require_jsx_runtime(), 1);
  function save16({ attributes: attributes2 }) {
    const { url, caption, type, providerNameSlug } = attributes2;
    if (!url) {
      return null;
    }
    const className = clsx_default("wp-block-embed", {
      [`is-type-${type}`]: type,
      [`is-provider-${providerNameSlug}`]: providerNameSlug,
      [`wp-block-embed-${providerNameSlug}`]: providerNameSlug
    });
    return /* @__PURE__ */ (0, import_jsx_runtime236.jsxs)("figure", { ...import_block_editor76.useBlockProps.save({ className }), children: [
      /* @__PURE__ */ (0, import_jsx_runtime236.jsx)("div", { className: "wp-block-embed__wrapper", children: `
${url}
` }),
      !import_block_editor76.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
        import_block_editor76.RichText.Content,
        {
          className: (0, import_block_editor76.__experimentalGetElementClassName)("caption"),
          tagName: "figcaption",
          value: caption
        }
      )
    ] });
  }

  // packages/block-library/build-module/embed/transforms.mjs
  var import_blocks26 = __toESM(require_blocks(), 1);
  var { name: EMBED_BLOCK } = block_default7;
  var transforms7 = {
    from: [
      {
        type: "raw",
        isMatch: (node) => node.nodeName === "P" && /^\s*(https?:\/\/\S+)\s*$/i.test(node.textContent) && node.textContent?.match(/https/gi)?.length === 1,
        transform: (node) => {
          return (0, import_blocks26.createBlock)(EMBED_BLOCK, {
            url: node.textContent.trim()
          });
        }
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/paragraph"],
        isMatch: ({ url }) => !!url,
        transform: ({ url, caption, className }) => {
          let value = `<a href="${url}">${url}</a>`;
          if (caption?.trim()) {
            value += `<br />${caption}`;
          }
          return (0, import_blocks26.createBlock)("core/paragraph", {
            content: value,
            className: removeAspectRatioClasses(className)
          });
        }
      }
    ]
  };
  var transforms_default8 = transforms7;

  // packages/block-library/build-module/embed/variations.mjs
  var import_i18n61 = __toESM(require_i18n(), 1);
  function getTitle(providerName) {
    return (0, import_i18n61.sprintf)(
      /* translators: %s: provider name */
      (0, import_i18n61.__)("%s Embed"),
      providerName
    );
  }
  var variations4 = [
    {
      name: "twitter",
      title: getTitle("X"),
      icon: embedTwitterIcon,
      keywords: ["x", "twitter", "tweet", (0, import_i18n61.__)("social")],
      description: (0, import_i18n61.__)("Embed an X post."),
      patterns: [/^https?:\/\/(www\.)?twitter\.com\/.+/i],
      attributes: { providerNameSlug: "twitter", responsive: true }
    },
    {
      name: "youtube",
      title: getTitle("YouTube"),
      icon: embedYouTubeIcon,
      keywords: [(0, import_i18n61.__)("music"), (0, import_i18n61.__)("video")],
      description: (0, import_i18n61.__)("Embed a YouTube video."),
      patterns: [
        /^https?:\/\/((m|www)\.)?youtube\.com\/.+/i,
        /^https?:\/\/youtu\.be\/.+/i
      ],
      attributes: { providerNameSlug: "youtube", responsive: true }
    },
    {
      // Deprecate Facebook Embed per FB policy
      // See: https://developers.facebook.com/docs/plugins/oembed-legacy
      name: "facebook",
      title: getTitle("Facebook"),
      icon: embedFacebookIcon,
      keywords: [(0, import_i18n61.__)("social")],
      description: (0, import_i18n61.__)("Embed a Facebook post."),
      scope: ["block"],
      patterns: [],
      attributes: {
        providerNameSlug: "facebook",
        previewable: false,
        responsive: true
      }
    },
    {
      // Deprecate Instagram per FB policy
      // See: https://developers.facebook.com/docs/instagram/oembed-legacy
      name: "instagram",
      title: getTitle("Instagram"),
      icon: embedInstagramIcon,
      keywords: [(0, import_i18n61.__)("image"), (0, import_i18n61.__)("social")],
      description: (0, import_i18n61.__)("Embed an Instagram post."),
      scope: ["block"],
      patterns: [],
      attributes: { providerNameSlug: "instagram", responsive: true }
    },
    {
      name: "wordpress",
      title: getTitle("WordPress"),
      icon: embedWordPressIcon,
      keywords: [(0, import_i18n61.__)("post"), (0, import_i18n61.__)("blog")],
      description: (0, import_i18n61.__)("Embed a WordPress post."),
      attributes: {
        providerNameSlug: "wordpress"
      }
    },
    {
      name: "soundcloud",
      title: getTitle("SoundCloud"),
      icon: embedAudioIcon,
      keywords: [(0, import_i18n61.__)("music"), (0, import_i18n61.__)("audio")],
      description: (0, import_i18n61.__)("Embed SoundCloud content."),
      patterns: [/^https?:\/\/(www\.)?soundcloud\.com\/.+/i],
      attributes: { providerNameSlug: "soundcloud", responsive: true }
    },
    {
      name: "spotify",
      title: getTitle("Spotify"),
      icon: embedSpotifyIcon,
      keywords: [(0, import_i18n61.__)("music"), (0, import_i18n61.__)("audio")],
      description: (0, import_i18n61.__)("Embed Spotify content."),
      patterns: [/^https?:\/\/(open|play)\.spotify\.com\/.+/i],
      attributes: { providerNameSlug: "spotify", responsive: true }
    },
    {
      name: "flickr",
      title: getTitle("Flickr"),
      icon: embedFlickrIcon,
      keywords: [(0, import_i18n61.__)("image")],
      description: (0, import_i18n61.__)("Embed Flickr content."),
      patterns: [
        /^https?:\/\/(www\.)?flickr\.com\/.+/i,
        /^https?:\/\/flic\.kr\/.+/i
      ],
      attributes: { providerNameSlug: "flickr", responsive: true }
    },
    {
      name: "vimeo",
      title: getTitle("Vimeo"),
      icon: embedVimeoIcon,
      keywords: [(0, import_i18n61.__)("video")],
      description: (0, import_i18n61.__)("Embed a Vimeo video."),
      patterns: [/^https?:\/\/(www\.)?vimeo\.com\/.+/i],
      attributes: { providerNameSlug: "vimeo", responsive: true }
    },
    {
      name: "animoto",
      title: getTitle("Animoto"),
      icon: embedAnimotoIcon,
      description: (0, import_i18n61.__)("Embed an Animoto video."),
      patterns: [/^https?:\/\/(www\.)?(animoto|video214)\.com\/.+/i],
      attributes: { providerNameSlug: "animoto", responsive: true }
    },
    {
      name: "cloudup",
      title: getTitle("Cloudup"),
      icon: embedContentIcon,
      description: (0, import_i18n61.__)("Embed Cloudup content."),
      patterns: [/^https?:\/\/cloudup\.com\/.+/i],
      attributes: { providerNameSlug: "cloudup", responsive: true }
    },
    {
      // Deprecated since CollegeHumor content is now powered by YouTube.
      name: "collegehumor",
      title: getTitle("CollegeHumor"),
      icon: embedVideoIcon,
      description: (0, import_i18n61.__)("Embed CollegeHumor content."),
      scope: ["block"],
      patterns: [],
      attributes: { providerNameSlug: "collegehumor", responsive: true }
    },
    {
      name: "crowdsignal",
      title: getTitle("Crowdsignal"),
      icon: embedContentIcon,
      keywords: ["polldaddy", (0, import_i18n61.__)("survey")],
      description: (0, import_i18n61.__)("Embed Crowdsignal (formerly Polldaddy) content."),
      patterns: [
        /^https?:\/\/((.+\.)?polldaddy\.com|poll\.fm|.+\.crowdsignal\.net|.+\.survey\.fm)\/.+/i
      ],
      attributes: { providerNameSlug: "crowdsignal", responsive: true }
    },
    {
      name: "dailymotion",
      title: getTitle("Dailymotion"),
      icon: embedDailymotionIcon,
      keywords: [(0, import_i18n61.__)("video")],
      description: (0, import_i18n61.__)("Embed a Dailymotion video."),
      patterns: [/^https?:\/\/(www\.)?dailymotion\.com\/.+/i],
      attributes: { providerNameSlug: "dailymotion", responsive: true }
    },
    {
      name: "imgur",
      title: getTitle("Imgur"),
      icon: embedPhotoIcon,
      description: (0, import_i18n61.__)("Embed Imgur content."),
      patterns: [/^https?:\/\/(.+\.)?imgur\.com\/.+/i],
      attributes: { providerNameSlug: "imgur", responsive: true }
    },
    {
      name: "issuu",
      title: getTitle("Issuu"),
      icon: embedContentIcon,
      description: (0, import_i18n61.__)("Embed Issuu content."),
      patterns: [/^https?:\/\/(www\.)?issuu\.com\/.+/i],
      attributes: { providerNameSlug: "issuu", responsive: true }
    },
    {
      name: "kickstarter",
      title: getTitle("Kickstarter"),
      icon: embedContentIcon,
      description: (0, import_i18n61.__)("Embed Kickstarter content."),
      patterns: [
        /^https?:\/\/(www\.)?kickstarter\.com\/.+/i,
        /^https?:\/\/kck\.st\/.+/i
      ],
      attributes: { providerNameSlug: "kickstarter", responsive: true }
    },
    {
      name: "mixcloud",
      title: getTitle("Mixcloud"),
      icon: embedAudioIcon,
      keywords: [(0, import_i18n61.__)("music"), (0, import_i18n61.__)("audio")],
      description: (0, import_i18n61.__)("Embed Mixcloud content."),
      patterns: [/^https?:\/\/(www\.)?mixcloud\.com\/.+/i],
      attributes: { providerNameSlug: "mixcloud", responsive: true }
    },
    {
      name: "pocket-casts",
      title: getTitle("Pocket Casts"),
      icon: embedPocketCastsIcon,
      keywords: [(0, import_i18n61.__)("podcast"), (0, import_i18n61.__)("audio")],
      description: (0, import_i18n61.__)("Embed a podcast player from Pocket Casts."),
      patterns: [/^https:\/\/pca.st\/\w+/i],
      attributes: { providerNameSlug: "pocket-casts", responsive: true }
    },
    {
      name: "reddit",
      title: getTitle("Reddit"),
      icon: embedRedditIcon,
      description: (0, import_i18n61.__)("Embed a Reddit thread."),
      patterns: [/^https?:\/\/(www\.)?reddit\.com\/.+/i],
      attributes: { providerNameSlug: "reddit", responsive: true }
    },
    {
      name: "reverbnation",
      title: getTitle("ReverbNation"),
      icon: embedAudioIcon,
      description: (0, import_i18n61.__)("Embed ReverbNation content."),
      patterns: [/^https?:\/\/(www\.)?reverbnation\.com\/.+/i],
      attributes: { providerNameSlug: "reverbnation", responsive: true }
    },
    {
      name: "scribd",
      title: getTitle("Scribd"),
      icon: embedContentIcon,
      description: (0, import_i18n61.__)("Embed Scribd content."),
      patterns: [/^https?:\/\/(www\.)?scribd\.com\/.+/i],
      attributes: { providerNameSlug: "scribd", responsive: true }
    },
    {
      name: "smugmug",
      title: getTitle("SmugMug"),
      icon: embedPhotoIcon,
      description: (0, import_i18n61.__)("Embed SmugMug content."),
      patterns: [/^https?:\/\/(.+\.)?smugmug\.com\/.*/i],
      attributes: {
        providerNameSlug: "smugmug",
        previewable: false,
        responsive: true
      }
    },
    {
      name: "speaker-deck",
      title: getTitle("Speaker Deck"),
      icon: embedContentIcon,
      description: (0, import_i18n61.__)("Embed Speaker Deck content."),
      patterns: [/^https?:\/\/(www\.)?speakerdeck\.com\/.+/i],
      attributes: { providerNameSlug: "speaker-deck", responsive: true }
    },
    {
      name: "tiktok",
      title: getTitle("TikTok"),
      icon: embedVideoIcon,
      keywords: [(0, import_i18n61.__)("video")],
      description: (0, import_i18n61.__)("Embed a TikTok video."),
      patterns: [/^https?:\/\/(www\.)?tiktok\.com\/.+/i],
      attributes: { providerNameSlug: "tiktok", responsive: true }
    },
    {
      name: "ted",
      title: getTitle("TED"),
      icon: embedVideoIcon,
      description: (0, import_i18n61.__)("Embed a TED video."),
      patterns: [/^https?:\/\/(www\.|embed\.)?ted\.com\/.+/i],
      attributes: { providerNameSlug: "ted", responsive: true }
    },
    {
      name: "tumblr",
      title: getTitle("Tumblr"),
      icon: embedTumblrIcon,
      keywords: [(0, import_i18n61.__)("social")],
      description: (0, import_i18n61.__)("Embed a Tumblr post."),
      patterns: [/^https?:\/\/(.+)\.tumblr\.com\/.+/i],
      attributes: { providerNameSlug: "tumblr", responsive: true }
    },
    {
      name: "videopress",
      title: getTitle("VideoPress"),
      icon: embedVideoIcon,
      keywords: [(0, import_i18n61.__)("video")],
      description: (0, import_i18n61.__)("Embed a VideoPress video."),
      patterns: [/^https?:\/\/videopress\.com\/.+/i],
      attributes: { providerNameSlug: "videopress", responsive: true }
    },
    {
      name: "wordpress-tv",
      title: getTitle("WordPress.tv"),
      icon: embedVideoIcon,
      description: (0, import_i18n61.__)("Embed a WordPress.tv video."),
      patterns: [/^https?:\/\/wordpress\.tv\/.+/i],
      attributes: { providerNameSlug: "wordpress-tv", responsive: true }
    },
    {
      name: "amazon-kindle",
      title: getTitle("Amazon Kindle"),
      icon: embedAmazonIcon,
      keywords: [(0, import_i18n61.__)("ebook")],
      description: (0, import_i18n61.__)("Embed Amazon Kindle content."),
      patterns: [
        /^https?:\/\/([a-z0-9-]+\.)?(amazon|amzn)(\.[a-z]{2,4})+\/.+/i,
        /^https?:\/\/(www\.)?(a\.co|z\.cn)\/.+/i
      ],
      attributes: { providerNameSlug: "amazon-kindle" }
    },
    {
      name: "pinterest",
      title: getTitle("Pinterest"),
      icon: embedPinterestIcon,
      keywords: [(0, import_i18n61.__)("social"), (0, import_i18n61.__)("bookmark")],
      description: (0, import_i18n61.__)("Embed Pinterest pins, boards, and profiles."),
      patterns: [
        /^https?:\/\/([a-z]{2}|www)\.pinterest\.com(\.(au|mx))?\/.*/i
      ],
      attributes: { providerNameSlug: "pinterest" }
    },
    {
      name: "wolfram-cloud",
      title: getTitle("Wolfram"),
      icon: embedWolframIcon,
      description: (0, import_i18n61.__)("Embed Wolfram notebook content."),
      patterns: [/^https?:\/\/(www\.)?wolframcloud\.com\/obj\/.+/i],
      attributes: { providerNameSlug: "wolfram-cloud", responsive: true }
    },
    {
      name: "bluesky",
      title: getTitle("Bluesky"),
      icon: embedBlueskyIcon,
      description: (0, import_i18n61.__)("Embed a Bluesky post."),
      patterns: [/^https?:\/\/bsky\.app\/profile\/.+\/post\/.+/i],
      attributes: { providerNameSlug: "bluesky" }
    }
  ];
  variations4.forEach((variation) => {
    if (variation.isActive) {
      return;
    }
    variation.isActive = (blockAttributes8, variationAttributes) => blockAttributes8.providerNameSlug === variationAttributes.providerNameSlug;
  });
  var variations_default4 = variations4;

  // packages/block-library/build-module/embed/deprecated.mjs
  var import_block_editor77 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime237 = __toESM(require_jsx_runtime(), 1);
  var { attributes: blockAttributes3 } = block_default7;
  var v25 = {
    attributes: blockAttributes3,
    save({ attributes: attributes2 }) {
      const { url, caption, type, providerNameSlug } = attributes2;
      if (!url) {
        return null;
      }
      const className = clsx_default("wp-block-embed", {
        [`is-type-${type}`]: type,
        [`is-provider-${providerNameSlug}`]: providerNameSlug,
        [`wp-block-embed-${providerNameSlug}`]: providerNameSlug
      });
      return /* @__PURE__ */ (0, import_jsx_runtime237.jsxs)("figure", { ...import_block_editor77.useBlockProps.save({ className }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime237.jsx)("div", { className: "wp-block-embed__wrapper", children: `
${url}
` }),
        !import_block_editor77.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(import_block_editor77.RichText.Content, { tagName: "figcaption", value: caption })
      ] });
    }
  };
  var v113 = {
    attributes: blockAttributes3,
    save({ attributes: { url, caption, type, providerNameSlug } }) {
      if (!url) {
        return null;
      }
      const embedClassName = clsx_default("wp-block-embed", {
        [`is-type-${type}`]: type,
        [`is-provider-${providerNameSlug}`]: providerNameSlug
      });
      return /* @__PURE__ */ (0, import_jsx_runtime237.jsxs)("figure", { className: embedClassName, children: [
        `
${url}
`,
        !import_block_editor77.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(import_block_editor77.RichText.Content, { tagName: "figcaption", value: caption })
      ] });
    }
  };
  var deprecated5 = [v25, v113];
  var deprecated_default15 = deprecated5;

  // packages/block-library/build-module/embed/index.mjs
  var { name: name32 } = block_default7;
  var settings32 = {
    icon: embedContentIcon,
    edit: edit_default9,
    save: save16,
    transforms: transforms_default8,
    variations: variations_default4,
    deprecated: deprecated_default15
  };
  var init32 = () => initBlock({ name: name32, metadata: block_default7, settings: settings32 });

  // packages/block-library/build-module/file/index.mjs
  var file_exports = {};
  __export(file_exports, {
    init: () => init33,
    metadata: () => block_default33,
    name: () => name33,
    settings: () => settings33
  });
  var import_i18n65 = __toESM(require_i18n(), 1);
  var import_blocks28 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/file/deprecated.mjs
  var import_block_editor78 = __toESM(require_block_editor(), 1);
  var import_i18n62 = __toESM(require_i18n(), 1);
  var import_jsx_runtime238 = __toESM(require_jsx_runtime(), 1);
  var v32 = {
    attributes: {
      id: {
        type: "number"
      },
      href: {
        type: "string"
      },
      fileId: {
        type: "string",
        source: "attribute",
        selector: "a:not([download])",
        attribute: "id"
      },
      fileName: {
        type: "string",
        source: "html",
        selector: "a:not([download])"
      },
      textLinkHref: {
        type: "string",
        source: "attribute",
        selector: "a:not([download])",
        attribute: "href"
      },
      textLinkTarget: {
        type: "string",
        source: "attribute",
        selector: "a:not([download])",
        attribute: "target"
      },
      showDownloadButton: {
        type: "boolean",
        default: true
      },
      downloadButtonText: {
        type: "string",
        source: "html",
        selector: "a[download]"
      },
      displayPreview: {
        type: "boolean"
      },
      previewHeight: {
        type: "number",
        default: 600
      }
    },
    supports: {
      anchor: true,
      align: true
    },
    save({ attributes: attributes2 }) {
      const {
        href,
        fileId,
        fileName,
        textLinkHref,
        textLinkTarget,
        showDownloadButton,
        downloadButtonText,
        displayPreview,
        previewHeight
      } = attributes2;
      const pdfEmbedLabel = import_block_editor78.RichText.isEmpty(fileName) ? (0, import_i18n62.__)("PDF embed") : (0, import_i18n62.sprintf)(
        /* translators: %s: filename. */
        (0, import_i18n62.__)("Embed of %s."),
        fileName
      );
      const hasFilename = !import_block_editor78.RichText.isEmpty(fileName);
      const describedById = hasFilename ? fileId : void 0;
      return href && /* @__PURE__ */ (0, import_jsx_runtime238.jsxs)("div", { ...import_block_editor78.useBlockProps.save(), children: [
        displayPreview && /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(import_jsx_runtime238.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
          "object",
          {
            className: "wp-block-file__embed",
            data: href,
            type: "application/pdf",
            style: {
              width: "100%",
              height: `${previewHeight}px`
            },
            "aria-label": pdfEmbedLabel
          }
        ) }),
        hasFilename && /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
          "a",
          {
            id: describedById,
            href: textLinkHref,
            target: textLinkTarget,
            rel: textLinkTarget ? "noreferrer noopener" : void 0,
            children: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(import_block_editor78.RichText.Content, { value: fileName })
          }
        ),
        showDownloadButton && /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
          "a",
          {
            href,
            className: clsx_default(
              "wp-block-file__button",
              (0, import_block_editor78.__experimentalGetElementClassName)("button")
            ),
            download: true,
            "aria-describedby": describedById,
            children: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(import_block_editor78.RichText.Content, { value: downloadButtonText })
          }
        )
      ] });
    }
  };
  var v26 = {
    attributes: {
      id: {
        type: "number"
      },
      href: {
        type: "string"
      },
      fileId: {
        type: "string",
        source: "attribute",
        selector: "a:not([download])",
        attribute: "id"
      },
      fileName: {
        type: "string",
        source: "html",
        selector: "a:not([download])"
      },
      textLinkHref: {
        type: "string",
        source: "attribute",
        selector: "a:not([download])",
        attribute: "href"
      },
      textLinkTarget: {
        type: "string",
        source: "attribute",
        selector: "a:not([download])",
        attribute: "target"
      },
      showDownloadButton: {
        type: "boolean",
        default: true
      },
      downloadButtonText: {
        type: "string",
        source: "html",
        selector: "a[download]"
      },
      displayPreview: {
        type: "boolean"
      },
      previewHeight: {
        type: "number",
        default: 600
      }
    },
    supports: {
      anchor: true,
      align: true
    },
    save({ attributes: attributes2 }) {
      const {
        href,
        fileId,
        fileName,
        textLinkHref,
        textLinkTarget,
        showDownloadButton,
        downloadButtonText,
        displayPreview,
        previewHeight
      } = attributes2;
      const pdfEmbedLabel = import_block_editor78.RichText.isEmpty(fileName) ? (0, import_i18n62.__)("PDF embed") : (0, import_i18n62.sprintf)(
        /* translators: %s: filename. */
        (0, import_i18n62.__)("Embed of %s."),
        fileName
      );
      const hasFilename = !import_block_editor78.RichText.isEmpty(fileName);
      const describedById = hasFilename ? fileId : void 0;
      return href && /* @__PURE__ */ (0, import_jsx_runtime238.jsxs)("div", { ...import_block_editor78.useBlockProps.save(), children: [
        displayPreview && /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(import_jsx_runtime238.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
          "object",
          {
            className: "wp-block-file__embed",
            data: href,
            type: "application/pdf",
            style: {
              width: "100%",
              height: `${previewHeight}px`
            },
            "aria-label": pdfEmbedLabel
          }
        ) }),
        hasFilename && /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
          "a",
          {
            id: describedById,
            href: textLinkHref,
            target: textLinkTarget,
            rel: textLinkTarget ? "noreferrer noopener" : void 0,
            children: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(import_block_editor78.RichText.Content, { value: fileName })
          }
        ),
        showDownloadButton && /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
          "a",
          {
            href,
            className: "wp-block-file__button",
            download: true,
            "aria-describedby": describedById,
            children: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(import_block_editor78.RichText.Content, { value: downloadButtonText })
          }
        )
      ] });
    }
  };
  var v114 = {
    attributes: {
      id: {
        type: "number"
      },
      href: {
        type: "string"
      },
      fileName: {
        type: "string",
        source: "html",
        selector: "a:not([download])"
      },
      textLinkHref: {
        type: "string",
        source: "attribute",
        selector: "a:not([download])",
        attribute: "href"
      },
      textLinkTarget: {
        type: "string",
        source: "attribute",
        selector: "a:not([download])",
        attribute: "target"
      },
      showDownloadButton: {
        type: "boolean",
        default: true
      },
      downloadButtonText: {
        type: "string",
        source: "html",
        selector: "a[download]"
      },
      displayPreview: {
        type: "boolean"
      },
      previewHeight: {
        type: "number",
        default: 600
      }
    },
    supports: {
      anchor: true,
      align: true
    },
    save({ attributes: attributes2 }) {
      const {
        href,
        fileName,
        textLinkHref,
        textLinkTarget,
        showDownloadButton,
        downloadButtonText,
        displayPreview,
        previewHeight
      } = attributes2;
      const pdfEmbedLabel = import_block_editor78.RichText.isEmpty(fileName) ? (0, import_i18n62.__)("PDF embed") : (0, import_i18n62.sprintf)(
        /* translators: %s: filename. */
        (0, import_i18n62.__)("Embed of %s."),
        fileName
      );
      return href && /* @__PURE__ */ (0, import_jsx_runtime238.jsxs)("div", { ...import_block_editor78.useBlockProps.save(), children: [
        displayPreview && /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(import_jsx_runtime238.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
          "object",
          {
            className: "wp-block-file__embed",
            data: href,
            type: "application/pdf",
            style: {
              width: "100%",
              height: `${previewHeight}px`
            },
            "aria-label": pdfEmbedLabel
          }
        ) }),
        !import_block_editor78.RichText.isEmpty(fileName) && /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
          "a",
          {
            href: textLinkHref,
            target: textLinkTarget,
            rel: textLinkTarget ? "noreferrer noopener" : void 0,
            children: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(import_block_editor78.RichText.Content, { value: fileName })
          }
        ),
        showDownloadButton && /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
          "a",
          {
            href,
            className: "wp-block-file__button",
            download: true,
            children: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(import_block_editor78.RichText.Content, { value: downloadButtonText })
          }
        )
      ] });
    }
  };
  var deprecated6 = [v32, v26, v114];
  var deprecated_default16 = deprecated6;

  // packages/block-library/build-module/file/edit.mjs
  var import_blob7 = __toESM(require_blob(), 1);
  var import_components42 = __toESM(require_components(), 1);
  var import_data33 = __toESM(require_data(), 1);
  var import_block_editor80 = __toESM(require_block_editor(), 1);
  var import_element29 = __toESM(require_element(), 1);
  var import_compose19 = __toESM(require_compose(), 1);
  var import_i18n64 = __toESM(require_i18n(), 1);
  var import_core_data18 = __toESM(require_core_data(), 1);
  var import_notices5 = __toESM(require_notices(), 1);
  var import_url7 = __toESM(require_url(), 1);

  // packages/block-library/build-module/file/inspector.mjs
  var import_i18n63 = __toESM(require_i18n(), 1);
  var import_components41 = __toESM(require_components(), 1);
  var import_block_editor79 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime239 = __toESM(require_jsx_runtime(), 1);
  function FileBlockInspector({
    hrefs,
    openInNewWindow,
    showDownloadButton,
    changeLinkDestinationOption,
    changeOpenInNewWindow,
    changeShowDownloadButton,
    displayPreview,
    changeDisplayPreview,
    previewHeight,
    changePreviewHeight
  }) {
    const { href, textLinkHref, attachmentPage } = hrefs;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    let linkDestinationOptions = [{ value: href, label: (0, import_i18n63.__)("URL") }];
    if (attachmentPage) {
      linkDestinationOptions = [
        { value: href, label: (0, import_i18n63.__)("Media file") },
        { value: attachmentPage, label: (0, import_i18n63.__)("Attachment page") }
      ];
    }
    return /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(import_jsx_runtime239.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime239.jsxs)(import_block_editor79.InspectorControls, { children: [
      href.endsWith(".pdf") && /* @__PURE__ */ (0, import_jsx_runtime239.jsxs)(
        import_components41.__experimentalToolsPanel,
        {
          label: (0, import_i18n63.__)("PDF settings"),
          resetAll: () => {
            changeDisplayPreview(true);
            changePreviewHeight(600);
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
              import_components41.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n63.__)("Show inline embed"),
                isShownByDefault: true,
                hasValue: () => !displayPreview,
                onDeselect: () => changeDisplayPreview(true),
                children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
                  import_components41.ToggleControl,
                  {
                    label: (0, import_i18n63.__)("Show inline embed"),
                    help: displayPreview ? (0, import_i18n63.__)(
                      "Note: Most phone and tablet browsers won't display embedded PDFs."
                    ) : null,
                    checked: !!displayPreview,
                    onChange: changeDisplayPreview
                  }
                )
              }
            ),
            displayPreview && /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
              import_components41.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n63.__)("Height in pixels"),
                isShownByDefault: true,
                hasValue: () => previewHeight !== 600,
                onDeselect: () => changePreviewHeight(600),
                children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
                  import_components41.RangeControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n63.__)("Height in pixels"),
                    min: MIN_PREVIEW_HEIGHT,
                    max: Math.max(
                      MAX_PREVIEW_HEIGHT,
                      previewHeight
                    ),
                    value: previewHeight,
                    onChange: changePreviewHeight
                  }
                )
              }
            )
          ]
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime239.jsxs)(
        import_components41.__experimentalToolsPanel,
        {
          label: (0, import_i18n63.__)("Settings"),
          resetAll: () => {
            changeLinkDestinationOption(href);
            changeOpenInNewWindow(false);
            changeShowDownloadButton(true);
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
              import_components41.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n63.__)("Link to"),
                isShownByDefault: true,
                hasValue: () => textLinkHref !== href,
                onDeselect: () => changeLinkDestinationOption(href),
                children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
                  import_components41.SelectControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n63.__)("Link to"),
                    value: textLinkHref,
                    options: linkDestinationOptions,
                    onChange: changeLinkDestinationOption
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
              import_components41.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n63.__)("Open in new tab"),
                isShownByDefault: true,
                hasValue: () => !!openInNewWindow,
                onDeselect: () => changeOpenInNewWindow(false),
                children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
                  import_components41.ToggleControl,
                  {
                    label: (0, import_i18n63.__)("Open in new tab"),
                    checked: openInNewWindow,
                    onChange: changeOpenInNewWindow
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
              import_components41.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n63.__)("Show download button"),
                isShownByDefault: true,
                hasValue: () => !showDownloadButton,
                onDeselect: () => changeShowDownloadButton(true),
                children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
                  import_components41.ToggleControl,
                  {
                    label: (0, import_i18n63.__)("Show download button"),
                    checked: showDownloadButton,
                    onChange: changeShowDownloadButton
                  }
                )
              }
            )
          ]
        }
      )
    ] }) });
  }

  // packages/block-library/build-module/file/utils/index.mjs
  var browserSupportsPdfs = () => {
    if (window.navigator.pdfViewerEnabled) {
      return true;
    }
    if (window.navigator.userAgent.indexOf("Mobi") > -1) {
      return false;
    }
    if (window.navigator.userAgent.indexOf("Android") > -1) {
      return false;
    }
    if (window.navigator.userAgent.indexOf("Macintosh") > -1 && window.navigator.maxTouchPoints && window.navigator.maxTouchPoints > 2) {
      return false;
    }
    if (!!(window.ActiveXObject || "ActiveXObject" in window) && !(createActiveXObject("AcroPDF.PDF") || createActiveXObject("PDF.PdfCtrl"))) {
      return false;
    }
    return true;
  };
  var createActiveXObject = (type) => {
    let ax;
    try {
      ax = new window.ActiveXObject(type);
    } catch (e2) {
      ax = void 0;
    }
    return ax;
  };

  // packages/block-library/build-module/file/edit.mjs
  var import_jsx_runtime240 = __toESM(require_jsx_runtime(), 1);
  var MIN_PREVIEW_HEIGHT = 200;
  var MAX_PREVIEW_HEIGHT = 2e3;
  function ClipboardToolbarButton({ text, disabled }) {
    const { createNotice } = (0, import_data33.useDispatch)(import_notices5.store);
    const ref = (0, import_compose19.useCopyToClipboard)(text, () => {
      createNotice("info", (0, import_i18n64.__)("Copied URL to clipboard."), {
        isDismissible: true,
        type: "snackbar"
      });
    });
    return /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(
      import_components42.ToolbarButton,
      {
        className: "components-clipboard-toolbar-button",
        ref,
        disabled,
        children: (0, import_i18n64.__)("Copy URL")
      }
    );
  }
  function FileEdit({ attributes: attributes2, isSelected, setAttributes, clientId }) {
    const {
      id,
      fileName,
      href,
      textLinkHref,
      textLinkTarget,
      showDownloadButton,
      downloadButtonText,
      displayPreview,
      previewHeight
    } = attributes2;
    const [temporaryURL, setTemporaryURL] = (0, import_element29.useState)(attributes2.blob);
    const { media } = (0, import_data33.useSelect)(
      (select9) => ({
        media: id === void 0 ? void 0 : select9(import_core_data18.store).getEntityRecord(
          "postType",
          "attachment",
          id
        )
      }),
      [id]
    );
    const { createErrorNotice } = (0, import_data33.useDispatch)(import_notices5.store);
    const { toggleSelection, __unstableMarkNextChangeAsNotPersistent } = (0, import_data33.useDispatch)(import_block_editor80.store);
    useUploadMediaFromBlobURL({
      url: temporaryURL,
      onChange: onSelectFile,
      onError: onUploadError
    });
    (0, import_element29.useEffect)(() => {
      if (import_block_editor80.RichText.isEmpty(downloadButtonText)) {
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({
          downloadButtonText: (0, import_i18n64._x)("Download", "button label")
        });
      }
    }, []);
    function onSelectFile(newMedia) {
      if (!newMedia || !newMedia.url) {
        setAttributes({
          href: void 0,
          fileName: void 0,
          textLinkHref: void 0,
          id: void 0,
          fileId: void 0,
          displayPreview: void 0,
          previewHeight: void 0
        });
        setTemporaryURL();
        return;
      }
      if ((0, import_blob7.isBlobURL)(newMedia.url)) {
        setTemporaryURL(newMedia.url);
        return;
      }
      const isPdf = (
        // Media Library and REST API use different properties for mime type.
        (newMedia.mime || newMedia.mime_type) === "application/pdf" || (0, import_url7.getFilename)(newMedia.url).toLowerCase().endsWith(".pdf")
      );
      const pdfAttributes = {
        displayPreview: isPdf ? attributes2.displayPreview ?? true : void 0,
        previewHeight: isPdf ? attributes2.previewHeight ?? 600 : void 0
      };
      setAttributes({
        href: newMedia.url,
        fileName: newMedia.title,
        textLinkHref: newMedia.url,
        id: newMedia.id,
        fileId: `wp-block-file--media-${clientId}`,
        blob: void 0,
        ...pdfAttributes
      });
      setTemporaryURL();
    }
    function onUploadError(message) {
      setAttributes({ href: void 0 });
      createErrorNotice(message, { type: "snackbar" });
    }
    function changeLinkDestinationOption(newHref) {
      setAttributes({ textLinkHref: newHref });
    }
    function changeOpenInNewWindow(newValue) {
      setAttributes({
        textLinkTarget: newValue ? "_blank" : false
      });
    }
    function changeShowDownloadButton(newValue) {
      setAttributes({ showDownloadButton: newValue });
    }
    function changeDisplayPreview(newValue) {
      setAttributes({ displayPreview: newValue });
    }
    function handleOnResizeStop(event, direction, elt, delta) {
      toggleSelection(true);
      const newHeight = parseInt(previewHeight + delta.height, 10);
      setAttributes({ previewHeight: newHeight });
    }
    function changePreviewHeight(newValue) {
      const newHeight = Math.max(
        parseInt(newValue, 10),
        MIN_PREVIEW_HEIGHT
      );
      setAttributes({ previewHeight: newHeight });
    }
    const attachmentPage = media && media.link;
    const blockProps = (0, import_block_editor80.useBlockProps)({
      className: clsx_default(
        !!temporaryURL && (0, import_components42.__unstableGetAnimateClassName)({ type: "loading" }),
        {
          "is-transient": !!temporaryURL
        }
      )
    });
    const displayPreviewInEditor = browserSupportsPdfs() && displayPreview;
    if (!href && !temporaryURL) {
      return /* @__PURE__ */ (0, import_jsx_runtime240.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(
        import_block_editor80.MediaPlaceholder,
        {
          icon: /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(import_block_editor80.BlockIcon, { icon: file_default }),
          labels: {
            title: (0, import_i18n64.__)("File"),
            instructions: (0, import_i18n64.__)(
              "Drag and drop a file, upload, or choose from your library."
            )
          },
          onSelect: onSelectFile,
          onError: onUploadError,
          accept: "*"
        }
      ) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime240.jsxs)(import_jsx_runtime240.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(
        FileBlockInspector,
        {
          hrefs: {
            href: href || temporaryURL,
            textLinkHref,
            attachmentPage
          },
          ...{
            openInNewWindow: !!textLinkTarget,
            showDownloadButton,
            changeLinkDestinationOption,
            changeOpenInNewWindow,
            changeShowDownloadButton,
            displayPreview,
            changeDisplayPreview,
            previewHeight,
            changePreviewHeight
          }
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime240.jsxs)(import_block_editor80.BlockControls, { group: "other", children: [
        /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(
          import_block_editor80.MediaReplaceFlow,
          {
            mediaId: id,
            mediaURL: href,
            accept: "*",
            onSelect: onSelectFile,
            onError: onUploadError,
            onReset: () => onSelectFile(void 0)
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(
          ClipboardToolbarButton,
          {
            text: href,
            disabled: (0, import_blob7.isBlobURL)(href)
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime240.jsxs)("div", { ...blockProps, children: [
        displayPreviewInEditor && /* @__PURE__ */ (0, import_jsx_runtime240.jsxs)(
          import_components42.ResizableBox,
          {
            size: { height: previewHeight, width: "100%" },
            minHeight: MIN_PREVIEW_HEIGHT,
            maxHeight: MAX_PREVIEW_HEIGHT,
            grid: [1, 10],
            enable: {
              top: false,
              right: false,
              bottom: true,
              left: false,
              topRight: false,
              bottomRight: false,
              bottomLeft: false,
              topLeft: false
            },
            onResizeStart: () => toggleSelection(false),
            onResizeStop: handleOnResizeStop,
            showHandle: isSelected,
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(
                "object",
                {
                  className: "wp-block-file__preview",
                  data: href,
                  type: "application/pdf",
                  "aria-label": (0, import_i18n64.__)(
                    "Embed of the selected PDF file."
                  )
                }
              ),
              !isSelected && /* @__PURE__ */ (0, import_jsx_runtime240.jsx)("div", { className: "wp-block-file__preview-overlay" })
            ]
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime240.jsxs)("div", { className: "wp-block-file__content-wrapper", children: [
          /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(
            import_block_editor80.RichText,
            {
              identifier: "fileName",
              tagName: "a",
              value: fileName,
              placeholder: (0, import_i18n64.__)("Write file name\u2026"),
              withoutInteractiveFormatting: true,
              onChange: (text) => setAttributes({
                fileName: removeAnchorTag(text)
              }),
              href: textLinkHref
            }
          ),
          showDownloadButton && /* @__PURE__ */ (0, import_jsx_runtime240.jsx)("div", { className: "wp-block-file__button-richtext-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(
            import_block_editor80.RichText,
            {
              identifier: "downloadButtonText",
              tagName: "div",
              "aria-label": (0, import_i18n64.__)("Download button text"),
              className: clsx_default(
                "wp-block-file__button",
                (0, import_block_editor80.__experimentalGetElementClassName)(
                  "button"
                )
              ),
              value: downloadButtonText,
              withoutInteractiveFormatting: true,
              placeholder: (0, import_i18n64.__)("Add text\u2026"),
              onChange: (text) => setAttributes({
                downloadButtonText: removeAnchorTag(text)
              })
            }
          ) })
        ] })
      ] })
    ] });
  }
  var edit_default10 = FileEdit;

  // packages/block-library/build-module/file/block.json
  var block_default33 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/file",
    title: "File",
    category: "media",
    description: "Add a link to a downloadable file.",
    keywords: ["document", "pdf", "download"],
    textdomain: "default",
    attributes: {
      id: {
        type: "number"
      },
      blob: {
        type: "string",
        role: "local"
      },
      href: {
        type: "string",
        role: "content"
      },
      fileId: {
        type: "string",
        source: "attribute",
        selector: "a:not([download])",
        attribute: "id"
      },
      fileName: {
        type: "rich-text",
        source: "rich-text",
        selector: "a:not([download])",
        role: "content"
      },
      textLinkHref: {
        type: "string",
        source: "attribute",
        selector: "a:not([download])",
        attribute: "href",
        role: "content"
      },
      textLinkTarget: {
        type: "string",
        source: "attribute",
        selector: "a:not([download])",
        attribute: "target"
      },
      showDownloadButton: {
        type: "boolean",
        default: true
      },
      downloadButtonText: {
        type: "rich-text",
        source: "rich-text",
        selector: "a[download]",
        role: "content"
      },
      displayPreview: {
        type: "boolean"
      },
      previewHeight: {
        type: "number",
        default: 600
      }
    },
    supports: {
      anchor: true,
      align: true,
      spacing: {
        margin: true,
        padding: true
      },
      color: {
        gradients: true,
        link: true,
        text: false,
        __experimentalDefaultControls: {
          background: true,
          link: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      },
      interactivity: true
    },
    editorStyle: "wp-block-file-editor",
    style: "wp-block-file"
  };

  // packages/block-library/build-module/file/save.mjs
  var import_block_editor81 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime241 = __toESM(require_jsx_runtime(), 1);
  function save17({ attributes: attributes2 }) {
    const {
      href,
      fileId,
      fileName,
      textLinkHref,
      textLinkTarget,
      showDownloadButton,
      downloadButtonText,
      displayPreview,
      previewHeight
    } = attributes2;
    const pdfEmbedLabel = import_block_editor81.RichText.isEmpty(fileName) ? "PDF embed" : (
      // To do: use toPlainText, but we need ensure it's RichTextData. See
      // https://github.com/WordPress/gutenberg/pull/56710.
      fileName.toString()
    );
    const hasFilename = !import_block_editor81.RichText.isEmpty(fileName);
    const describedById = hasFilename ? fileId : void 0;
    return href && /* @__PURE__ */ (0, import_jsx_runtime241.jsxs)("div", { ...import_block_editor81.useBlockProps.save(), children: [
      displayPreview && /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(import_jsx_runtime241.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
        "object",
        {
          className: "wp-block-file__embed",
          data: href,
          type: "application/pdf",
          style: {
            width: "100%",
            height: `${previewHeight}px`
          },
          "aria-label": pdfEmbedLabel
        }
      ) }),
      hasFilename && /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
        "a",
        {
          id: describedById,
          href: textLinkHref,
          target: textLinkTarget,
          rel: textLinkTarget ? "noreferrer noopener" : void 0,
          children: /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(import_block_editor81.RichText.Content, { value: fileName })
        }
      ),
      showDownloadButton && /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
        "a",
        {
          href,
          className: clsx_default(
            "wp-block-file__button",
            (0, import_block_editor81.__experimentalGetElementClassName)("button")
          ),
          download: true,
          "aria-describedby": describedById,
          children: /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(import_block_editor81.RichText.Content, { value: downloadButtonText })
        }
      )
    ] });
  }

  // packages/block-library/build-module/file/transforms.mjs
  var import_blob8 = __toESM(require_blob(), 1);
  var import_blocks27 = __toESM(require_blocks(), 1);
  var import_data34 = __toESM(require_data(), 1);
  var import_core_data19 = __toESM(require_core_data(), 1);
  var import_url8 = __toESM(require_url(), 1);
  var transforms8 = {
    from: [
      {
        type: "files",
        isMatch(files) {
          return files.length > 0;
        },
        // We define a lower priority (higher number) than the default of 10. This
        // ensures that the File block is only created as a fallback.
        priority: 15,
        transform: (files) => {
          const blocks = [];
          files.forEach((file) => {
            const blobURL = (0, import_blob8.createBlobURL)(file);
            if (file.type.startsWith("video/")) {
              blocks.push(
                (0, import_blocks27.createBlock)("core/video", {
                  blob: (0, import_blob8.createBlobURL)(file)
                })
              );
            } else if (file.type.startsWith("image/")) {
              blocks.push(
                (0, import_blocks27.createBlock)("core/image", {
                  blob: (0, import_blob8.createBlobURL)(file)
                })
              );
            } else if (file.type.startsWith("audio/")) {
              blocks.push(
                (0, import_blocks27.createBlock)("core/audio", {
                  blob: (0, import_blob8.createBlobURL)(file)
                })
              );
            } else {
              blocks.push(
                (0, import_blocks27.createBlock)("core/file", {
                  blob: blobURL,
                  fileName: file.name
                })
              );
            }
          });
          return blocks;
        }
      },
      {
        type: "block",
        blocks: ["core/audio"],
        transform: (attributes2) => {
          return (0, import_blocks27.createBlock)("core/file", {
            href: attributes2.src,
            fileName: attributes2.caption,
            textLinkHref: attributes2.src,
            id: attributes2.id,
            anchor: attributes2.anchor
          });
        }
      },
      {
        type: "block",
        blocks: ["core/video"],
        transform: (attributes2) => {
          return (0, import_blocks27.createBlock)("core/file", {
            href: attributes2.src,
            fileName: attributes2.caption,
            textLinkHref: attributes2.src,
            id: attributes2.id,
            anchor: attributes2.anchor
          });
        }
      },
      {
        type: "block",
        blocks: ["core/image"],
        transform: (attributes2) => {
          return (0, import_blocks27.createBlock)("core/file", {
            href: attributes2.url,
            fileName: attributes2.caption || (0, import_url8.getFilename)(attributes2.url),
            textLinkHref: attributes2.url,
            id: attributes2.id,
            anchor: attributes2.anchor
          });
        }
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/audio"],
        isMatch: ({ id }) => {
          if (!id) {
            return false;
          }
          const { getEntityRecord } = (0, import_data34.select)(import_core_data19.store);
          const media = getEntityRecord("postType", "attachment", id);
          return !!media && media.mime_type.includes("audio");
        },
        transform: (attributes2) => {
          return (0, import_blocks27.createBlock)("core/audio", {
            src: attributes2.href,
            caption: attributes2.fileName,
            id: attributes2.id,
            anchor: attributes2.anchor
          });
        }
      },
      {
        type: "block",
        blocks: ["core/video"],
        isMatch: ({ id }) => {
          if (!id) {
            return false;
          }
          const { getEntityRecord } = (0, import_data34.select)(import_core_data19.store);
          const media = getEntityRecord("postType", "attachment", id);
          return !!media && media.mime_type.includes("video");
        },
        transform: (attributes2) => {
          return (0, import_blocks27.createBlock)("core/video", {
            src: attributes2.href,
            caption: attributes2.fileName,
            id: attributes2.id,
            anchor: attributes2.anchor
          });
        }
      },
      {
        type: "block",
        blocks: ["core/image"],
        isMatch: ({ id }) => {
          if (!id) {
            return false;
          }
          const { getEntityRecord } = (0, import_data34.select)(import_core_data19.store);
          const media = getEntityRecord("postType", "attachment", id);
          return !!media && media.mime_type.includes("image");
        },
        transform: (attributes2) => {
          return (0, import_blocks27.createBlock)("core/image", {
            url: attributes2.href,
            caption: attributes2.fileName,
            id: attributes2.id,
            anchor: attributes2.anchor
          });
        }
      }
    ]
  };
  var transforms_default9 = transforms8;

  // packages/block-library/build-module/file/index.mjs
  var { fieldsKey: fieldsKey6, formKey: formKey6 } = unlock(import_blocks28.privateApis);
  var { name: name33 } = block_default33;
  var settings33 = {
    icon: file_default,
    example: {
      attributes: {
        href: "https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg",
        fileName: (0, import_i18n65._x)("Armstrong_Small_Step", "Name of the file")
      }
    },
    transforms: transforms_default9,
    deprecated: deprecated_default16,
    edit: edit_default10,
    save: save17
  };
  if (window.__experimentalContentOnlyInspectorFields) {
    settings33[fieldsKey6] = [
      {
        id: "file",
        label: (0, import_i18n65.__)("File"),
        type: "media",
        Edit: {
          control: "media",
          // TODO: replace with custom component
          allowedTypes: [],
          multiple: false
        },
        getValue: ({ item }) => ({
          id: item.id,
          url: item.href
        }),
        setValue: ({ value }) => ({
          id: value.id,
          href: value.url
        })
      },
      {
        id: "fileName",
        label: (0, import_i18n65.__)("Filename"),
        type: "text",
        Edit: "rich-text"
        // TODO: replace with custom component
      },
      {
        id: "downloadButtonText",
        label: (0, import_i18n65.__)("Button Text"),
        type: "text",
        Edit: "rich-text"
        // TODO: replace with custom component
      }
    ];
    settings33[formKey6] = {
      fields: ["file", "fileName", "downloadButtonText"]
    };
  }
  var init33 = () => initBlock({ name: name33, metadata: block_default33, settings: settings33 });

  // packages/block-library/build-module/form/index.mjs
  var form_exports = {};
  __export(form_exports, {
    init: () => init34,
    metadata: () => block_default34,
    name: () => name34,
    settings: () => settings34
  });
  var import_hooks26 = __toESM(require_hooks(), 1);

  // packages/block-library/build-module/form/edit.mjs
  var import_i18n67 = __toESM(require_i18n(), 1);
  var import_block_editor82 = __toESM(require_block_editor(), 1);
  var import_components43 = __toESM(require_components(), 1);
  var import_data35 = __toESM(require_data(), 1);

  // packages/block-library/build-module/form/utils.mjs
  var import_i18n66 = __toESM(require_i18n(), 1);
  var formSubmissionNotificationSuccess = [
    "core/form-submission-notification",
    {
      type: "success"
    },
    [
      [
        "core/paragraph",
        {
          content: '<mark style="background-color:rgba(0, 0, 0, 0);color:#345C00" class="has-inline-color">' + (0, import_i18n66.__)("Your form has been submitted successfully") + "</mark>"
        }
      ]
    ]
  ];
  var formSubmissionNotificationError = [
    "core/form-submission-notification",
    {
      type: "error"
    },
    [
      [
        "core/paragraph",
        {
          content: '<mark style="background-color:rgba(0, 0, 0, 0);color:#CF2E2E" class="has-inline-color">' + (0, import_i18n66.__)("There was an error submitting your form.") + "</mark>"
        }
      ]
    ]
  ];

  // packages/block-library/build-module/form/edit.mjs
  var import_jsx_runtime242 = __toESM(require_jsx_runtime(), 1);
  var TEMPLATE6 = [
    formSubmissionNotificationSuccess,
    formSubmissionNotificationError,
    [
      "core/form-input",
      {
        type: "text",
        label: (0, import_i18n67.__)("Name"),
        required: true
      }
    ],
    [
      "core/form-input",
      {
        type: "email",
        label: (0, import_i18n67.__)("Email"),
        required: true
      }
    ],
    [
      "core/form-input",
      {
        type: "textarea",
        label: (0, import_i18n67.__)("Comment"),
        required: true
      }
    ],
    ["core/form-submit-button", {}]
  ];
  var Edit13 = ({ attributes: attributes2, setAttributes, clientId }) => {
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const resetAllSettings = () => {
      setAttributes({
        submissionMethod: "email",
        email: void 0,
        action: void 0,
        method: "post"
      });
    };
    const { action, method, email, submissionMethod } = attributes2;
    const blockProps = (0, import_block_editor82.useBlockProps)();
    const { hasInnerBlocks } = (0, import_data35.useSelect)(
      (select9) => {
        const { getBlock } = select9(import_block_editor82.store);
        const block = getBlock(clientId);
        return {
          hasInnerBlocks: !!(block && block.innerBlocks.length)
        };
      },
      [clientId]
    );
    const innerBlocksProps = (0, import_block_editor82.useInnerBlocksProps)(blockProps, {
      template: TEMPLATE6,
      renderAppender: hasInnerBlocks ? void 0 : import_block_editor82.InnerBlocks.ButtonBlockAppender
    });
    return /* @__PURE__ */ (0, import_jsx_runtime242.jsxs)(import_jsx_runtime242.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(import_block_editor82.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime242.jsxs)(
        import_components43.__experimentalToolsPanel,
        {
          dropdownMenuProps,
          label: (0, import_i18n67.__)("Settings"),
          resetAll: resetAllSettings,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
              import_components43.__experimentalToolsPanelItem,
              {
                hasValue: () => submissionMethod !== "email",
                label: (0, import_i18n67.__)("Submissions method"),
                onDeselect: () => setAttributes({
                  submissionMethod: "email"
                }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
                  import_components43.SelectControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n67.__)("Submissions method"),
                    options: [
                      // TODO: Allow plugins to add their own submission methods.
                      {
                        label: (0, import_i18n67.__)("Send email"),
                        value: "email"
                      },
                      {
                        label: (0, import_i18n67.__)("- Custom -"),
                        value: "custom"
                      }
                    ],
                    value: submissionMethod,
                    onChange: (value) => setAttributes({ submissionMethod: value }),
                    help: submissionMethod === "custom" ? (0, import_i18n67.__)(
                      'Select the method to use for form submissions. Additional options for the "custom" mode can be found in the "Advanced" section.'
                    ) : (0, import_i18n67.__)(
                      "Select the method to use for form submissions."
                    )
                  }
                )
              }
            ),
            submissionMethod === "email" && /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
              import_components43.__experimentalToolsPanelItem,
              {
                hasValue: () => !!email,
                label: (0, import_i18n67.__)("Email for form submissions"),
                onDeselect: () => setAttributes({
                  email: void 0,
                  action: void 0,
                  method: "post"
                }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
                  import_components43.TextControl,
                  {
                    __next40pxDefaultSize: true,
                    autoComplete: "off",
                    label: (0, import_i18n67.__)("Email for form submissions"),
                    value: email || "",
                    required: true,
                    onChange: (value) => {
                      setAttributes({ email: value });
                      setAttributes({
                        action: `mailto:${value}`
                      });
                      setAttributes({ method: "post" });
                    },
                    help: (0, import_i18n67.__)(
                      "The email address where form submissions will be sent. Separate multiple email addresses with a comma."
                    ),
                    type: "email"
                  }
                )
              }
            )
          ]
        }
      ) }),
      submissionMethod !== "email" && /* @__PURE__ */ (0, import_jsx_runtime242.jsxs)(import_block_editor82.InspectorControls, { group: "advanced", children: [
        /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
          import_components43.SelectControl,
          {
            __next40pxDefaultSize: true,
            label: (0, import_i18n67.__)("Method"),
            options: [
              { label: "Get", value: "get" },
              { label: "Post", value: "post" }
            ],
            value: method,
            onChange: (value) => setAttributes({ method: value }),
            help: (0, import_i18n67.__)(
              "Select the method to use for form submissions."
            )
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
          import_components43.TextControl,
          {
            __next40pxDefaultSize: true,
            autoComplete: "off",
            label: (0, import_i18n67.__)("Form action"),
            value: action,
            onChange: (newVal) => {
              setAttributes({
                action: newVal
              });
            },
            help: (0, import_i18n67.__)(
              "The URL where the form should be submitted."
            ),
            type: "url"
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
        "form",
        {
          ...innerBlocksProps,
          encType: submissionMethod === "email" ? "text/plain" : null
        }
      )
    ] });
  };
  var edit_default11 = Edit13;

  // packages/block-library/build-module/form/block.json
  var block_default34 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    __experimental: true,
    name: "core/form",
    title: "Form",
    category: "common",
    allowedBlocks: [
      "core/paragraph",
      "core/heading",
      "core/form-input",
      "core/form-submit-button",
      "core/form-submission-notification",
      "core/group",
      "core/columns"
    ],
    description: "A form.",
    keywords: ["container", "wrapper", "row", "section"],
    textdomain: "default",
    attributes: {
      submissionMethod: {
        type: "string",
        default: "email"
      },
      method: {
        type: "string",
        default: "post"
      },
      action: {
        type: "string"
      },
      email: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalTextDecoration: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      }
    }
  };

  // packages/block-library/build-module/form/save.mjs
  var import_block_editor83 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime243 = __toESM(require_jsx_runtime(), 1);
  function save18({ attributes: attributes2 }) {
    const blockProps = import_block_editor83.useBlockProps.save();
    const { submissionMethod } = attributes2;
    return /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
      "form",
      {
        ...blockProps,
        encType: submissionMethod === "email" ? "text/plain" : null,
        children: /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(import_block_editor83.InnerBlocks.Content, {})
      }
    );
  }

  // packages/block-library/build-module/form/variations.mjs
  var import_i18n68 = __toESM(require_i18n(), 1);
  var variations5 = [
    {
      name: "comment-form",
      title: (0, import_i18n68.__)("Experimental Comment form"),
      description: (0, import_i18n68.__)("A comment form for posts and pages."),
      attributes: {
        submissionMethod: "custom",
        action: "{SITE_URL}/wp-comments-post.php",
        method: "post",
        anchor: "comment-form"
      },
      isDefault: false,
      innerBlocks: [
        [
          "core/form-input",
          {
            type: "text",
            name: "author",
            label: (0, import_i18n68.__)("Name"),
            required: true,
            visibilityPermissions: "logged-out"
          }
        ],
        [
          "core/form-input",
          {
            type: "email",
            name: "email",
            label: (0, import_i18n68.__)("Email"),
            required: true,
            visibilityPermissions: "logged-out"
          }
        ],
        [
          "core/form-input",
          {
            type: "textarea",
            name: "comment",
            label: (0, import_i18n68.__)("Comment"),
            required: true,
            visibilityPermissions: "all"
          }
        ],
        ["core/form-submit-button", {}]
      ],
      scope: ["inserter", "transform"],
      isActive: (blockAttributes8) => !blockAttributes8?.type || blockAttributes8?.type === "text"
    },
    {
      name: "wp-privacy-form",
      title: (0, import_i18n68.__)("Experimental Privacy Request Form"),
      keywords: ["GDPR"],
      description: (0, import_i18n68.__)("A form to request data exports and/or deletion."),
      attributes: {
        submissionMethod: "custom",
        action: "",
        method: "post",
        anchor: "gdpr-form"
      },
      isDefault: false,
      innerBlocks: [
        formSubmissionNotificationSuccess,
        formSubmissionNotificationError,
        [
          "core/paragraph",
          {
            content: (0, import_i18n68.__)(
              "To request an export or deletion of your personal data on this site, please fill-in the form below. You can define the type of request you wish to perform, and your email address. Once the form is submitted, you will receive a confirmation email with instructions on the next steps."
            )
          }
        ],
        [
          "core/form-input",
          {
            type: "email",
            name: "email",
            label: (0, import_i18n68.__)("Enter your email address."),
            required: true,
            visibilityPermissions: "all"
          }
        ],
        [
          "core/form-input",
          {
            type: "checkbox",
            name: "export_personal_data",
            label: (0, import_i18n68.__)("Request data export"),
            required: false,
            visibilityPermissions: "all"
          }
        ],
        [
          "core/form-input",
          {
            type: "checkbox",
            name: "remove_personal_data",
            label: (0, import_i18n68.__)("Request data deletion"),
            required: false,
            visibilityPermissions: "all"
          }
        ],
        ["core/form-submit-button", {}],
        [
          "core/form-input",
          {
            type: "hidden",
            name: "wp-action",
            value: "wp_privacy_send_request"
          }
        ],
        [
          "core/form-input",
          {
            type: "hidden",
            name: "wp-privacy-request",
            value: "1"
          }
        ]
      ],
      scope: ["inserter", "transform"],
      isActive: (blockAttributes8) => !blockAttributes8?.type || blockAttributes8?.type === "text"
    }
  ];
  var variations_default5 = variations5;

  // packages/block-library/build-module/form/deprecated.mjs
  var import_block_editor84 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime244 = __toESM(require_jsx_runtime(), 1);
  var v115 = {
    // The block supports here are deliberately empty despite this
    // deprecated version of the block having adopted block supports.
    // The attributes added by these supports have been manually
    // added to this deprecated version's attributes definition so
    // that the data isn't lost on migration. All this is so that the
    // automatic application of block support classes doesn't occur
    // as this version of the block had a bug that overrode those
    // classes. If those block support classes are applied during the
    // deprecation process, this deprecation doesn't match and won't
    // run.
    // @see https://github.com/WordPress/gutenberg/pull/55755
    supports: {},
    attributes: {
      submissionMethod: {
        type: "string",
        default: "email"
      },
      method: {
        type: "string",
        default: "post"
      },
      action: {
        type: "string"
      },
      email: {
        type: "string"
      },
      // The following attributes have been added to match the block
      // supports at the time of the deprecation. See above for details.
      anchor: {
        type: "string",
        source: "attribute",
        attribute: "id",
        selector: "*"
      },
      backgroundColor: {
        type: "string"
      },
      textColor: {
        type: "string"
      },
      gradient: {
        type: "string"
      },
      style: {
        type: "object"
      },
      fontFamily: {
        type: "string"
      },
      fontSize: {
        type: "string"
      }
    },
    save({ attributes: attributes2 }) {
      const { submissionMethod } = attributes2;
      const colorProps = (0, import_block_editor84.__experimentalGetColorClassesAndStyles)(attributes2);
      const typographyProps = (0, import_block_editor84.getTypographyClassesAndStyles)(attributes2);
      const spacingProps = (0, import_block_editor84.__experimentalGetSpacingClassesAndStyles)(attributes2);
      const blockProps = import_block_editor84.useBlockProps.save({
        // In this deprecated version, the block support is deliberately empty.
        // As a result, the useBlockProps.save() does not output style or id attributes,
        // so we apply them explicitly here.
        style: {
          ...colorProps.style,
          ...typographyProps.style,
          ...spacingProps.style
        },
        id: attributes2.anchor
      });
      return /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(
        "form",
        {
          ...blockProps,
          className: "wp-block-form",
          encType: submissionMethod === "email" ? "text/plain" : null,
          children: /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(import_block_editor84.InnerBlocks.Content, {})
        }
      );
    }
  };
  var deprecated_default17 = [v115];

  // packages/block-library/build-module/form/icons.mjs
  var import_primitives157 = __toESM(require_primitives(), 1);
  var import_jsx_runtime245 = __toESM(require_jsx_runtime(), 1);
  var icon = /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(import_primitives157.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(import_primitives157.Path, { d: "M18 16H6c-1.1 0-2 .9-2 2s.9 2 2 2h12c1.1 0 2-.9 2-2s-.9-2-2-2Zm0 2.5H6c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h12c.3 0 .5.2.5.5s-.2.5-.5.5ZM13 13H4v1.5h9V13Zm-7-2h12c1.1 0 2-.9 2-2s-.9-2-2-2H6c-1.1 0-2 .9-2 2s.9 2 2 2Zm0-2.5h12c.3 0 .5.2.5.5s-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5s.2-.5.5-.5ZM13 4H4v1.5h9V4Z" }) });

  // packages/block-library/build-module/form/index.mjs
  var { name: name34 } = block_default34;
  var settings34 = {
    icon,
    edit: edit_default11,
    save: save18,
    deprecated: deprecated_default17,
    variations: variations_default5,
    example: {}
  };
  var init34 = () => {
    const DISALLOWED_PARENTS = ["core/form"];
    (0, import_hooks26.addFilter)(
      "blockEditor.__unstableCanInsertBlockType",
      "core/block-library/preventInsertingFormIntoAnotherForm",
      (canInsert, blockType, rootClientId, { getBlock, getBlockParentsByBlockName }) => {
        if (blockType.name !== "core/form") {
          return canInsert;
        }
        for (const disallowedParentType of DISALLOWED_PARENTS) {
          const hasDisallowedParent = getBlock(rootClientId)?.name === disallowedParentType || getBlockParentsByBlockName(
            rootClientId,
            disallowedParentType
          ).length;
          if (hasDisallowedParent) {
            return false;
          }
        }
        return true;
      }
    );
    return initBlock({ name: name34, metadata: block_default34, settings: settings34 });
  };

  // packages/block-library/build-module/form-input/index.mjs
  var form_input_exports = {};
  __export(form_input_exports, {
    init: () => init35,
    metadata: () => block_default35,
    name: () => name35,
    settings: () => settings35
  });

  // packages/block-library/build-module/form-input/deprecated.mjs
  var import_remove_accents = __toESM(require_remove_accents(), 1);
  var import_block_editor85 = __toESM(require_block_editor(), 1);
  var import_dom2 = __toESM(require_dom(), 1);
  var import_jsx_runtime246 = __toESM(require_jsx_runtime(), 1);
  var getNameFromLabelV1 = (content) => {
    return (0, import_remove_accents.default)((0, import_dom2.__unstableStripHTML)(content)).replace(/[^\p{L}\p{N}]+/gu, "-").toLowerCase().replace(/(^-+)|(-+$)/g, "");
  };
  var v27 = {
    attributes: {
      type: {
        type: "string",
        default: "text"
      },
      name: {
        type: "string"
      },
      label: {
        type: "string",
        default: "Label",
        selector: ".wp-block-form-input__label-content",
        source: "html",
        role: "content"
      },
      inlineLabel: {
        type: "boolean",
        default: false
      },
      required: {
        type: "boolean",
        default: false,
        selector: ".wp-block-form-input__input",
        source: "attribute",
        attribute: "required"
      },
      placeholder: {
        type: "string",
        selector: ".wp-block-form-input__input",
        source: "attribute",
        attribute: "placeholder",
        role: "content"
      },
      value: {
        type: "string",
        default: "",
        selector: "input",
        source: "attribute",
        attribute: "value"
      },
      visibilityPermissions: {
        type: "string",
        default: "all"
      }
    },
    supports: {
      anchor: true,
      reusable: false,
      spacing: {
        margin: ["top", "bottom"]
      },
      __experimentalBorder: {
        radius: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          radius: true
        }
      }
    },
    save({ attributes: attributes2 }) {
      const { type, name: name123, label, inlineLabel, required, placeholder: placeholder2, value } = attributes2;
      const borderProps = (0, import_block_editor85.__experimentalGetBorderClassesAndStyles)(attributes2);
      const colorProps = (0, import_block_editor85.__experimentalGetColorClassesAndStyles)(attributes2);
      const inputStyle = {
        ...borderProps.style,
        ...colorProps.style
      };
      const inputClasses = clsx_default(
        "wp-block-form-input__input",
        colorProps.className,
        borderProps.className
      );
      const TagName2 = type === "textarea" ? "textarea" : "input";
      const blockProps = import_block_editor85.useBlockProps.save();
      if ("hidden" === type) {
        return /* @__PURE__ */ (0, import_jsx_runtime246.jsx)("input", { type, name: name123, value });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime246.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime246.jsxs)(
        "label",
        {
          className: clsx_default("wp-block-form-input__label", {
            "is-label-inline": inlineLabel
          }),
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime246.jsx)("span", { className: "wp-block-form-input__label-content", children: /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(import_block_editor85.RichText.Content, { value: label }) }),
            /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
              TagName2,
              {
                className: inputClasses,
                type: "textarea" === type ? void 0 : type,
                name: name123 || getNameFromLabelV1(label),
                required,
                "aria-required": required,
                placeholder: placeholder2 || void 0,
                style: inputStyle
              }
            )
          ]
        }
      ) });
    }
  };
  var v116 = {
    attributes: {
      type: {
        type: "string",
        default: "text"
      },
      name: {
        type: "string"
      },
      label: {
        type: "string",
        default: "Label",
        selector: ".wp-block-form-input__label-content",
        source: "html",
        role: "content"
      },
      inlineLabel: {
        type: "boolean",
        default: false
      },
      required: {
        type: "boolean",
        default: false,
        selector: ".wp-block-form-input__input",
        source: "attribute",
        attribute: "required"
      },
      placeholder: {
        type: "string",
        selector: ".wp-block-form-input__input",
        source: "attribute",
        attribute: "placeholder",
        role: "content"
      },
      value: {
        type: "string",
        default: "",
        selector: "input",
        source: "attribute",
        attribute: "value"
      },
      visibilityPermissions: {
        type: "string",
        default: "all"
      }
    },
    supports: {
      className: false,
      anchor: true,
      reusable: false,
      spacing: {
        margin: ["top", "bottom"]
      },
      __experimentalBorder: {
        radius: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          radius: true
        }
      }
    },
    save({ attributes: attributes2 }) {
      const { type, name: name123, label, inlineLabel, required, placeholder: placeholder2, value } = attributes2;
      const borderProps = (0, import_block_editor85.__experimentalGetBorderClassesAndStyles)(attributes2);
      const colorProps = (0, import_block_editor85.__experimentalGetColorClassesAndStyles)(attributes2);
      const inputStyle = {
        ...borderProps.style,
        ...colorProps.style
      };
      const inputClasses = clsx_default(
        "wp-block-form-input__input",
        colorProps.className,
        borderProps.className
      );
      const TagName2 = type === "textarea" ? "textarea" : "input";
      if ("hidden" === type) {
        return /* @__PURE__ */ (0, import_jsx_runtime246.jsx)("input", { type, name: name123, value });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime246.jsxs)(
        "label",
        {
          className: clsx_default("wp-block-form-input__label", {
            "is-label-inline": inlineLabel
          }),
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime246.jsx)("span", { className: "wp-block-form-input__label-content", children: /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(import_block_editor85.RichText.Content, { value: label }) }),
            /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
              TagName2,
              {
                className: inputClasses,
                type: "textarea" === type ? void 0 : type,
                name: name123 || getNameFromLabelV1(label),
                required,
                "aria-required": required,
                placeholder: placeholder2 || void 0,
                style: inputStyle
              }
            )
          ]
        }
      );
    }
  };
  var deprecated7 = [v27, v116];
  var deprecated_default18 = deprecated7;

  // packages/block-library/build-module/form-input/edit.mjs
  var import_i18n69 = __toESM(require_i18n(), 1);
  var import_block_editor86 = __toESM(require_block_editor(), 1);
  var import_components44 = __toESM(require_components(), 1);
  var import_element30 = __toESM(require_element(), 1);
  var import_jsx_runtime247 = __toESM(require_jsx_runtime(), 1);
  function InputFieldBlock({ attributes: attributes2, setAttributes, className }) {
    const { type, name: name123, label, inlineLabel, required, placeholder: placeholder2, value } = attributes2;
    const blockProps = (0, import_block_editor86.useBlockProps)();
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const ref = (0, import_element30.useRef)();
    const TagName2 = type === "textarea" ? "textarea" : "input";
    const borderProps = (0, import_block_editor86.__experimentalUseBorderProps)(attributes2);
    const colorProps = (0, import_block_editor86.__experimentalUseColorProps)(attributes2);
    if (ref.current) {
      ref.current.focus();
    }
    const isCheckboxOrRadio = type === "checkbox" || type === "radio";
    const controls = /* @__PURE__ */ (0, import_jsx_runtime247.jsxs)(import_jsx_runtime247.Fragment, { children: [
      "hidden" !== type && /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(import_block_editor86.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime247.jsxs)(
        import_components44.__experimentalToolsPanel,
        {
          label: (0, import_i18n69.__)("Settings"),
          resetAll: () => {
            setAttributes({
              inlineLabel: false,
              required: false
            });
          },
          dropdownMenuProps,
          children: [
            "checkbox" !== type && /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
              import_components44.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n69.__)("Inline label"),
                hasValue: () => !!inlineLabel,
                onDeselect: () => setAttributes({ inlineLabel: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
                  import_components44.CheckboxControl,
                  {
                    label: (0, import_i18n69.__)("Inline label"),
                    checked: inlineLabel,
                    onChange: (newVal) => {
                      setAttributes({
                        inlineLabel: newVal
                      });
                    }
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
              import_components44.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n69.__)("Required"),
                hasValue: () => !!required,
                onDeselect: () => setAttributes({ required: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
                  import_components44.CheckboxControl,
                  {
                    label: (0, import_i18n69.__)("Required"),
                    checked: required,
                    onChange: (newVal) => {
                      setAttributes({
                        required: newVal
                      });
                    }
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(import_block_editor86.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
        import_components44.TextControl,
        {
          __next40pxDefaultSize: true,
          autoComplete: "off",
          label: (0, import_i18n69.__)("Name"),
          value: name123,
          onChange: (newVal) => {
            setAttributes({
              name: newVal
            });
          },
          help: (0, import_i18n69.__)(
            'Affects the "name" attribute of the input element, and is used as a name for the form submission results.'
          )
        }
      ) })
    ] });
    const content = /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
      import_block_editor86.RichText,
      {
        tagName: "span",
        className: "wp-block-form-input__label-content",
        value: label,
        onChange: (newLabel) => setAttributes({ label: newLabel }),
        "aria-label": label ? (0, import_i18n69.__)("Label") : (0, import_i18n69.__)("Empty label"),
        "data-empty": !label,
        placeholder: (0, import_i18n69.__)("Type the label for this input")
      }
    );
    if ("hidden" === type) {
      return /* @__PURE__ */ (0, import_jsx_runtime247.jsxs)(import_jsx_runtime247.Fragment, { children: [
        controls,
        /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
          "input",
          {
            type: "hidden",
            className: clsx_default(
              className,
              "wp-block-form-input__input",
              colorProps.className,
              borderProps.className
            ),
            "aria-label": (0, import_i18n69.__)("Value"),
            value,
            onChange: (event) => setAttributes({ value: event.target.value })
          }
        )
      ] });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime247.jsxs)("div", { ...blockProps, children: [
      controls,
      /* @__PURE__ */ (0, import_jsx_runtime247.jsxs)(
        "span",
        {
          className: clsx_default("wp-block-form-input__label", {
            "is-label-inline": inlineLabel || "checkbox" === type
          }),
          children: [
            !isCheckboxOrRadio && content,
            /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
              TagName2,
              {
                type: "textarea" === type ? void 0 : type,
                className: clsx_default(
                  className,
                  "wp-block-form-input__input",
                  colorProps.className,
                  borderProps.className
                ),
                "aria-label": (0, import_i18n69.__)("Optional placeholder text"),
                placeholder: placeholder2 ? void 0 : (0, import_i18n69.__)("Optional placeholder\u2026"),
                value: placeholder2,
                onChange: (event) => setAttributes({ placeholder: event.target.value }),
                "aria-required": required,
                style: {
                  ...borderProps.style,
                  ...colorProps.style
                }
              }
            ),
            isCheckboxOrRadio && content
          ]
        }
      )
    ] });
  }
  var edit_default12 = InputFieldBlock;

  // packages/block-library/build-module/form-input/block.json
  var block_default35 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    __experimental: true,
    name: "core/form-input",
    title: "Input Field",
    category: "common",
    ancestor: ["core/form"],
    description: "The basic building block for forms.",
    keywords: ["input", "form"],
    textdomain: "default",
    attributes: {
      type: {
        type: "string",
        default: "text"
      },
      name: {
        type: "string"
      },
      label: {
        type: "rich-text",
        default: "Label",
        selector: ".wp-block-form-input__label-content",
        source: "rich-text",
        role: "content"
      },
      inlineLabel: {
        type: "boolean",
        default: false
      },
      required: {
        type: "boolean",
        default: false,
        selector: ".wp-block-form-input__input",
        source: "attribute",
        attribute: "required"
      },
      placeholder: {
        type: "string",
        selector: ".wp-block-form-input__input",
        source: "attribute",
        attribute: "placeholder",
        role: "content"
      },
      value: {
        type: "string",
        default: "",
        selector: "input",
        source: "attribute",
        attribute: "value"
      },
      visibilityPermissions: {
        type: "string",
        default: "all"
      }
    },
    supports: {
      anchor: true,
      reusable: false,
      spacing: {
        margin: ["top", "bottom"]
      },
      __experimentalBorder: {
        radius: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          radius: true
        }
      }
    },
    style: ["wp-block-form-input"]
  };

  // packages/block-library/build-module/form-input/save.mjs
  var import_remove_accents2 = __toESM(require_remove_accents(), 1);
  var import_block_editor87 = __toESM(require_block_editor(), 1);
  var import_dom3 = __toESM(require_dom(), 1);
  var import_jsx_runtime248 = __toESM(require_jsx_runtime(), 1);
  var getNameFromLabel = (content) => {
    return (0, import_remove_accents2.default)((0, import_dom3.__unstableStripHTML)(content)).replace(/[^\p{L}\p{N}]+/gu, "-").toLowerCase().replace(/(^-+)|(-+$)/g, "");
  };
  function save19({ attributes: attributes2 }) {
    const { type, name: name123, label, inlineLabel, required, placeholder: placeholder2, value } = attributes2;
    const borderProps = (0, import_block_editor87.__experimentalGetBorderClassesAndStyles)(attributes2);
    const colorProps = (0, import_block_editor87.__experimentalGetColorClassesAndStyles)(attributes2);
    const inputStyle = {
      ...borderProps.style,
      ...colorProps.style
    };
    const inputClasses = clsx_default(
      "wp-block-form-input__input",
      colorProps.className,
      borderProps.className
    );
    const TagName2 = type === "textarea" ? "textarea" : "input";
    const blockProps = import_block_editor87.useBlockProps.save();
    const isCheckboxOrRadio = type === "checkbox" || type === "radio";
    if ("hidden" === type) {
      return /* @__PURE__ */ (0, import_jsx_runtime248.jsx)("input", { type, name: name123, value });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime248.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime248.jsxs)(
      "label",
      {
        className: clsx_default("wp-block-form-input__label", {
          "is-label-inline": inlineLabel
        }),
        children: [
          !isCheckboxOrRadio && /* @__PURE__ */ (0, import_jsx_runtime248.jsx)("span", { className: "wp-block-form-input__label-content", children: /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(import_block_editor87.RichText.Content, { value: label }) }),
          /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(
            TagName2,
            {
              className: inputClasses,
              type: "textarea" === type ? void 0 : type,
              name: name123 || getNameFromLabel(label),
              required,
              "aria-required": required,
              placeholder: placeholder2 || void 0,
              style: inputStyle
            }
          ),
          isCheckboxOrRadio && /* @__PURE__ */ (0, import_jsx_runtime248.jsx)("span", { className: "wp-block-form-input__label-content", children: /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(import_block_editor87.RichText.Content, { value: label }) })
        ]
      }
    ) });
  }

  // packages/block-library/build-module/form-input/variations.mjs
  var import_i18n70 = __toESM(require_i18n(), 1);
  var variations6 = [
    {
      name: "text",
      title: (0, import_i18n70.__)("Text Input"),
      description: (0, import_i18n70.__)("A generic text input."),
      attributes: { type: "text" },
      isDefault: true,
      scope: ["inserter", "transform"],
      isActive: (blockAttributes8) => !blockAttributes8?.type || blockAttributes8?.type === "text"
    },
    {
      name: "textarea",
      title: (0, import_i18n70.__)("Textarea Input"),
      description: (0, import_i18n70.__)(
        "A textarea input to allow entering multiple lines of text."
      ),
      attributes: { type: "textarea" },
      isDefault: true,
      scope: ["inserter", "transform"],
      isActive: (blockAttributes8) => blockAttributes8?.type === "textarea"
    },
    {
      name: "checkbox",
      title: (0, import_i18n70.__)("Checkbox Input"),
      description: (0, import_i18n70.__)("A simple checkbox input."),
      attributes: { type: "checkbox", inlineLabel: true },
      isDefault: true,
      scope: ["inserter", "transform"],
      isActive: (blockAttributes8) => blockAttributes8?.type === "checkbox"
    },
    {
      name: "email",
      title: (0, import_i18n70.__)("Email Input"),
      description: (0, import_i18n70.__)("Used for email addresses."),
      attributes: { type: "email" },
      isDefault: true,
      scope: ["inserter", "transform"],
      isActive: (blockAttributes8) => blockAttributes8?.type === "email"
    },
    {
      name: "url",
      title: (0, import_i18n70.__)("URL Input"),
      description: (0, import_i18n70.__)("Used for URLs."),
      attributes: { type: "url" },
      isDefault: true,
      scope: ["inserter", "transform"],
      isActive: (blockAttributes8) => blockAttributes8?.type === "url"
    },
    {
      name: "tel",
      title: (0, import_i18n70.__)("Telephone Input"),
      description: (0, import_i18n70.__)("Used for phone numbers."),
      attributes: { type: "tel" },
      isDefault: true,
      scope: ["inserter", "transform"],
      isActive: (blockAttributes8) => blockAttributes8?.type === "tel"
    },
    {
      name: "number",
      title: (0, import_i18n70.__)("Number Input"),
      description: (0, import_i18n70.__)("A numeric input."),
      attributes: { type: "number" },
      isDefault: true,
      scope: ["inserter", "transform"],
      isActive: (blockAttributes8) => blockAttributes8?.type === "number"
    }
  ];
  var variations_default6 = variations6;

  // packages/block-library/build-module/form-input/icons.mjs
  var import_primitives158 = __toESM(require_primitives(), 1);
  var import_jsx_runtime249 = __toESM(require_jsx_runtime(), 1);
  var icon2 = /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(import_primitives158.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(import_primitives158.Path, { d: "M5.547 18.892A.99.99 0 0 0 6 19h.72v1H6a1.99 1.99 0 0 1-.908-.22l.455-.888ZM9.12 20H7.68v-1h1.44v1Zm2.4 0h-1.44v-1h1.44v1Zm2.4 0h-1.44v-1h1.44v1Zm2.4 0h-1.44v-1h1.44v1Zm2.587-.22c-.272.14-.58.22-.907.22h-.72v-1H18a.99.99 0 0 0 .453-.108l.454.888ZM5.108 17.547a.99.99 0 0 0 0 .906l-.89.454a1.99 1.99 0 0 1 0-1.815l.89.455Zm14.672-.455a1.99 1.99 0 0 1 0 1.815l-.888-.454a.99.99 0 0 0 0-.906l.888-.455ZM6.72 17H6a.99.99 0 0 0-.453.108l-.455-.89A1.99 1.99 0 0 1 6 16h.72v1ZM18 16c.327 0 .635.08.907.219l-.454.89A.99.99 0 0 0 18 17h-.72v-1H18Zm-8.88 1H7.68v-1h1.44v1Zm2.4 0h-1.44v-1h1.44v1Zm2.4 0h-1.44v-1h1.44v1Zm2.4 0h-1.44v-1h1.44v1ZM5.5 14.28H4.25v-1H5.5v1Zm2.5 0H6.5v-1H8v1Zm2.5 0H9v-1h1.5v1Zm2.25 0H11.5v-1h1.25v1ZM18 7a2 2 0 1 1 0 4H6a2 2 0 1 1 0-4h12ZM6 8.5a.5.5 0 0 0 0 1h12a.5.5 0 0 0 0-1H6Zm7-3H4V4h9v1.5Z" }) });

  // packages/block-library/build-module/form-input/index.mjs
  var { name: name35 } = block_default35;
  var settings35 = {
    icon: icon2,
    deprecated: deprecated_default18,
    edit: edit_default12,
    save: save19,
    variations: variations_default6,
    example: {}
  };
  var init35 = () => initBlock({ name: name35, metadata: block_default35, settings: settings35 });

  // packages/block-library/build-module/form-submit-button/index.mjs
  var form_submit_button_exports = {};
  __export(form_submit_button_exports, {
    init: () => init36,
    metadata: () => block_default36,
    name: () => name36,
    settings: () => settings36
  });

  // packages/block-library/build-module/form-submit-button/edit.mjs
  var import_i18n71 = __toESM(require_i18n(), 1);
  var import_block_editor88 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime250 = __toESM(require_jsx_runtime(), 1);
  var TEMPLATE7 = [
    [
      "core/buttons",
      {},
      [
        [
          "core/button",
          {
            text: (0, import_i18n71.__)("Submit"),
            tagName: "button",
            type: "submit"
          }
        ]
      ]
    ]
  ];
  var Edit14 = () => {
    const blockProps = (0, import_block_editor88.useBlockProps)();
    const innerBlocksProps = (0, import_block_editor88.useInnerBlocksProps)(blockProps, {
      template: TEMPLATE7,
      templateLock: "all"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime250.jsx)("div", { className: "wp-block-form-submit-wrapper", ...innerBlocksProps });
  };
  var edit_default13 = Edit14;

  // packages/block-library/build-module/form-submit-button/block.json
  var block_default36 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    __experimental: true,
    name: "core/form-submit-button",
    title: "Form Submit Button",
    category: "common",
    icon: "button",
    ancestor: ["core/form"],
    allowedBlocks: ["core/buttons", "core/button"],
    description: "A submission button for forms.",
    keywords: ["submit", "button", "form"],
    textdomain: "default",
    style: ["wp-block-form-submit-button"]
  };

  // packages/block-library/build-module/form-submit-button/save.mjs
  var import_block_editor89 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime251 = __toESM(require_jsx_runtime(), 1);
  function save20() {
    const blockProps = import_block_editor89.useBlockProps.save();
    return /* @__PURE__ */ (0, import_jsx_runtime251.jsx)("div", { className: "wp-block-form-submit-wrapper", ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(import_block_editor89.InnerBlocks.Content, {}) });
  }

  // packages/block-library/build-module/form-submit-button/index.mjs
  var { name: name36 } = block_default36;
  var settings36 = {
    edit: edit_default13,
    save: save20,
    example: {}
  };
  var init36 = () => initBlock({ name: name36, metadata: block_default36, settings: settings36 });

  // packages/block-library/build-module/form-submission-notification/index.mjs
  var form_submission_notification_exports = {};
  __export(form_submission_notification_exports, {
    init: () => init37,
    metadata: () => block_default37,
    name: () => name37,
    settings: () => settings37
  });

  // packages/block-library/build-module/form-submission-notification/edit.mjs
  var import_i18n72 = __toESM(require_i18n(), 1);
  var import_block_editor90 = __toESM(require_block_editor(), 1);
  var import_data36 = __toESM(require_data(), 1);
  var import_jsx_runtime252 = __toESM(require_jsx_runtime(), 1);
  var TEMPLATE8 = [
    [
      "core/paragraph",
      {
        content: (0, import_i18n72.__)(
          "Enter the message you wish displayed for form submission error/success, and select the type of the message (success/error) from the block's options."
        )
      }
    ]
  ];
  var Edit15 = ({ attributes: attributes2, clientId }) => {
    const { type } = attributes2;
    const blockProps = (0, import_block_editor90.useBlockProps)({
      className: clsx_default("wp-block-form-submission-notification", {
        [`form-notification-type-${type}`]: type
      })
    });
    const { hasInnerBlocks } = (0, import_data36.useSelect)(
      (select9) => {
        const { getBlock } = select9(import_block_editor90.store);
        const block = getBlock(clientId);
        return {
          hasInnerBlocks: !!(block && block.innerBlocks.length)
        };
      },
      [clientId]
    );
    const innerBlocksProps = (0, import_block_editor90.useInnerBlocksProps)(blockProps, {
      template: TEMPLATE8,
      renderAppender: hasInnerBlocks ? void 0 : import_block_editor90.InnerBlocks.ButtonBlockAppender
    });
    return /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(
      "div",
      {
        ...innerBlocksProps,
        "data-message-success": (0, import_i18n72.__)("Submission success notification"),
        "data-message-error": (0, import_i18n72.__)("Submission error notification")
      }
    );
  };
  var edit_default14 = Edit15;

  // packages/block-library/build-module/form-submission-notification/block.json
  var block_default37 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    __experimental: true,
    name: "core/form-submission-notification",
    title: "Form Submission Notification",
    category: "common",
    ancestor: ["core/form"],
    description: "Provide a notification message after the form has been submitted.",
    keywords: ["form", "feedback", "notification", "message"],
    textdomain: "default",
    icon: "feedback",
    attributes: {
      type: {
        type: "string",
        default: "success"
      }
    }
  };

  // packages/block-library/build-module/form-submission-notification/save.mjs
  var import_block_editor91 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime253 = __toESM(require_jsx_runtime(), 1);
  function save21({ attributes: attributes2 }) {
    const { type } = attributes2;
    return /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(
      "div",
      {
        ...import_block_editor91.useInnerBlocksProps.save(
          import_block_editor91.useBlockProps.save({
            className: clsx_default("wp-block-form-submission-notification", {
              [`form-notification-type-${type}`]: type
            })
          })
        )
      }
    );
  }

  // packages/block-library/build-module/form-submission-notification/variations.mjs
  var import_i18n73 = __toESM(require_i18n(), 1);
  var variations7 = [
    {
      name: "form-submission-success",
      title: (0, import_i18n73.__)("Form Submission Success"),
      description: (0, import_i18n73.__)("Success message for form submissions."),
      attributes: {
        type: "success"
      },
      isDefault: true,
      innerBlocks: [
        [
          "core/paragraph",
          {
            content: (0, import_i18n73.__)("Your form has been submitted successfully."),
            backgroundColor: "#00D084",
            textColor: "#000000",
            style: {
              elements: { link: { color: { text: "#000000" } } }
            }
          }
        ]
      ],
      scope: ["inserter", "transform"],
      isActive: (blockAttributes8) => !blockAttributes8?.type || blockAttributes8?.type === "success"
    },
    {
      name: "form-submission-error",
      title: (0, import_i18n73.__)("Form Submission Error"),
      description: (0, import_i18n73.__)("Error/failure message for form submissions."),
      attributes: {
        type: "error"
      },
      isDefault: false,
      innerBlocks: [
        [
          "core/paragraph",
          {
            content: (0, import_i18n73.__)("There was an error submitting your form."),
            backgroundColor: "#CF2E2E",
            textColor: "#FFFFFF",
            style: {
              elements: { link: { color: { text: "#FFFFFF" } } }
            }
          }
        ]
      ],
      scope: ["inserter", "transform"],
      isActive: (blockAttributes8) => !blockAttributes8?.type || blockAttributes8?.type === "error"
    }
  ];
  var variations_default7 = variations7;

  // packages/block-library/build-module/form-submission-notification/index.mjs
  var { name: name37 } = block_default37;
  var settings37 = {
    icon: group_default,
    edit: edit_default14,
    save: save21,
    variations: variations_default7,
    example: {}
  };
  var init37 = () => initBlock({ name: name37, metadata: block_default37, settings: settings37 });

  // packages/block-library/build-module/gallery/index.mjs
  var gallery_exports = {};
  __export(gallery_exports, {
    init: () => init38,
    metadata: () => block_default38,
    name: () => name38,
    settings: () => settings38
  });

  // packages/block-library/build-module/gallery/deprecated.mjs
  var import_block_editor92 = __toESM(require_block_editor(), 1);
  var import_blocks29 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/gallery/constants.mjs
  var LINK_DESTINATION_NONE = "none";
  var LINK_DESTINATION_MEDIA = "media";
  var LINK_DESTINATION_LIGHTBOX = "lightbox";
  var LINK_DESTINATION_ATTACHMENT = "attachment";
  var LINK_DESTINATION_MEDIA_WP_CORE = "file";
  var LINK_DESTINATION_ATTACHMENT_WP_CORE = "post";
  var DEFAULT_MEDIA_SIZE_SLUG2 = "large";

  // packages/block-library/build-module/gallery/deprecated.mjs
  var import_jsx_runtime254 = __toESM(require_jsx_runtime(), 1);
  var DEPRECATED_LINK_DESTINATION_MEDIA = "file";
  var DEPRECATED_LINK_DESTINATION_ATTACHMENT = "post";
  function defaultColumnsNumberV1(attributes2) {
    return Math.min(3, attributes2?.images?.length);
  }
  function getHrefAndDestination(image, destination) {
    switch (destination) {
      case DEPRECATED_LINK_DESTINATION_MEDIA:
        return {
          href: image?.source_url || image?.url,
          linkDestination: LINK_DESTINATION_MEDIA
        };
      case DEPRECATED_LINK_DESTINATION_ATTACHMENT:
        return {
          href: image?.link,
          linkDestination: LINK_DESTINATION_ATTACHMENT
        };
      case LINK_DESTINATION_MEDIA:
        return {
          href: image?.source_url || image?.url,
          linkDestination: LINK_DESTINATION_MEDIA
        };
      case LINK_DESTINATION_ATTACHMENT:
        return {
          href: image?.link,
          linkDestination: LINK_DESTINATION_ATTACHMENT
        };
      case LINK_DESTINATION_NONE:
        return {
          href: void 0,
          linkDestination: LINK_DESTINATION_NONE
        };
    }
    return {};
  }
  function runV2Migration(attributes2) {
    let linkTo = attributes2.linkTo ? attributes2.linkTo : "none";
    if (linkTo === "post") {
      linkTo = "attachment";
    } else if (linkTo === "file") {
      linkTo = "media";
    }
    const imageBlocks = attributes2.images.map((image) => {
      return getImageBlock(image, attributes2.sizeSlug, linkTo);
    });
    const { images, ids, ...restAttributes } = attributes2;
    return [
      {
        ...restAttributes,
        linkTo,
        allowResize: false
      },
      imageBlocks
    ];
  }
  function getImageBlock(image, sizeSlug, linkTo) {
    return (0, import_blocks29.createBlock)("core/image", {
      ...image.id && { id: parseInt(image.id) },
      url: image.url,
      alt: image.alt,
      caption: image.caption,
      sizeSlug,
      ...getHrefAndDestination(image, linkTo)
    });
  }
  var v72 = {
    attributes: {
      images: {
        type: "array",
        default: [],
        source: "query",
        selector: ".blocks-gallery-item",
        query: {
          url: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "src"
          },
          fullUrl: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "data-full-url"
          },
          link: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "data-link"
          },
          alt: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "alt",
            default: ""
          },
          id: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "data-id"
          },
          caption: {
            type: "string",
            source: "html",
            selector: ".blocks-gallery-item__caption"
          }
        }
      },
      ids: {
        type: "array",
        items: {
          type: "number"
        },
        default: []
      },
      shortCodeTransforms: {
        type: "array",
        default: [],
        items: {
          type: "object"
        }
      },
      columns: {
        type: "number",
        minimum: 1,
        maximum: 8
      },
      caption: {
        type: "string",
        source: "html",
        selector: ".blocks-gallery-caption"
      },
      imageCrop: {
        type: "boolean",
        default: true
      },
      fixedHeight: {
        type: "boolean",
        default: true
      },
      linkTarget: {
        type: "string"
      },
      linkTo: {
        type: "string"
      },
      sizeSlug: {
        type: "string",
        default: "large"
      },
      allowResize: {
        type: "boolean",
        default: false
      }
    },
    save({ attributes: attributes2 }) {
      const { caption, columns, imageCrop } = attributes2;
      const className = clsx_default("has-nested-images", {
        [`columns-${columns}`]: columns !== void 0,
        [`columns-default`]: columns === void 0,
        "is-cropped": imageCrop
      });
      const blockProps = import_block_editor92.useBlockProps.save({ className });
      const innerBlocksProps = import_block_editor92.useInnerBlocksProps.save(blockProps);
      return /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)("figure", { ...innerBlocksProps, children: [
        innerBlocksProps.children,
        !import_block_editor92.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
          import_block_editor92.RichText.Content,
          {
            tagName: "figcaption",
            className: "blocks-gallery-caption",
            value: caption
          }
        )
      ] });
    }
  };
  var v62 = {
    attributes: {
      images: {
        type: "array",
        default: [],
        source: "query",
        selector: ".blocks-gallery-item",
        query: {
          url: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "src"
          },
          fullUrl: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "data-full-url"
          },
          link: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "data-link"
          },
          alt: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "alt",
            default: ""
          },
          id: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "data-id"
          },
          caption: {
            type: "string",
            source: "html",
            selector: ".blocks-gallery-item__caption"
          }
        }
      },
      ids: {
        type: "array",
        items: {
          type: "number"
        },
        default: []
      },
      columns: {
        type: "number",
        minimum: 1,
        maximum: 8
      },
      caption: {
        type: "string",
        source: "html",
        selector: ".blocks-gallery-caption"
      },
      imageCrop: {
        type: "boolean",
        default: true
      },
      fixedHeight: {
        type: "boolean",
        default: true
      },
      linkTo: {
        type: "string"
      },
      sizeSlug: {
        type: "string",
        default: "large"
      }
    },
    supports: {
      anchor: true,
      align: true
    },
    save({ attributes: attributes2 }) {
      const {
        images,
        columns = defaultColumnsNumberV1(attributes2),
        imageCrop,
        caption,
        linkTo
      } = attributes2;
      const className = `columns-${columns} ${imageCrop ? "is-cropped" : ""}`;
      return /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)("figure", { ...import_block_editor92.useBlockProps.save({ className }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime254.jsx)("ul", { className: "blocks-gallery-grid", children: images.map((image) => {
          let href;
          switch (linkTo) {
            case DEPRECATED_LINK_DESTINATION_MEDIA:
              href = image.fullUrl || image.url;
              break;
            case DEPRECATED_LINK_DESTINATION_ATTACHMENT:
              href = image.link;
              break;
          }
          const img = /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
            "img",
            {
              src: image.url,
              alt: image.alt,
              "data-id": image.id,
              "data-full-url": image.fullUrl,
              "data-link": image.link,
              className: image.id ? `wp-image-${image.id}` : null
            }
          );
          return /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
            "li",
            {
              className: "blocks-gallery-item",
              children: /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)("figure", { children: [
                href ? /* @__PURE__ */ (0, import_jsx_runtime254.jsx)("a", { href, children: img }) : img,
                !import_block_editor92.RichText.isEmpty(image.caption) && /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
                  import_block_editor92.RichText.Content,
                  {
                    tagName: "figcaption",
                    className: "blocks-gallery-item__caption",
                    value: image.caption
                  }
                )
              ] })
            },
            image.id || image.url
          );
        }) }),
        !import_block_editor92.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
          import_block_editor92.RichText.Content,
          {
            tagName: "figcaption",
            className: "blocks-gallery-caption",
            value: caption
          }
        )
      ] });
    },
    migrate(attributes2) {
      return runV2Migration(attributes2);
    }
  };
  var v52 = {
    attributes: {
      images: {
        type: "array",
        default: [],
        source: "query",
        selector: ".blocks-gallery-item",
        query: {
          url: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "src"
          },
          fullUrl: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "data-full-url"
          },
          link: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "data-link"
          },
          alt: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "alt",
            default: ""
          },
          id: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "data-id"
          },
          caption: {
            type: "string",
            source: "html",
            selector: ".blocks-gallery-item__caption"
          }
        }
      },
      ids: {
        type: "array",
        items: {
          type: "number"
        },
        default: []
      },
      columns: {
        type: "number",
        minimum: 1,
        maximum: 8
      },
      caption: {
        type: "string",
        source: "html",
        selector: ".blocks-gallery-caption"
      },
      imageCrop: {
        type: "boolean",
        default: true
      },
      linkTo: {
        type: "string",
        default: "none"
      },
      sizeSlug: {
        type: "string",
        default: "large"
      }
    },
    supports: {
      align: true
    },
    isEligible({ linkTo }) {
      return !linkTo || linkTo === "attachment" || linkTo === "media";
    },
    migrate(attributes2) {
      return runV2Migration(attributes2);
    },
    save({ attributes: attributes2 }) {
      const {
        images,
        columns = defaultColumnsNumberV1(attributes2),
        imageCrop,
        caption,
        linkTo
      } = attributes2;
      return /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)(
        "figure",
        {
          className: `columns-${columns} ${imageCrop ? "is-cropped" : ""}`,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime254.jsx)("ul", { className: "blocks-gallery-grid", children: images.map((image) => {
              let href;
              switch (linkTo) {
                case "media":
                  href = image.fullUrl || image.url;
                  break;
                case "attachment":
                  href = image.link;
                  break;
              }
              const img = /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
                "img",
                {
                  src: image.url,
                  alt: image.alt,
                  "data-id": image.id,
                  "data-full-url": image.fullUrl,
                  "data-link": image.link,
                  className: image.id ? `wp-image-${image.id}` : null
                }
              );
              return /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
                "li",
                {
                  className: "blocks-gallery-item",
                  children: /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)("figure", { children: [
                    href ? /* @__PURE__ */ (0, import_jsx_runtime254.jsx)("a", { href, children: img }) : img,
                    !import_block_editor92.RichText.isEmpty(image.caption) && /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
                      import_block_editor92.RichText.Content,
                      {
                        tagName: "figcaption",
                        className: "blocks-gallery-item__caption",
                        value: image.caption
                      }
                    )
                  ] })
                },
                image.id || image.url
              );
            }) }),
            !import_block_editor92.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
              import_block_editor92.RichText.Content,
              {
                tagName: "figcaption",
                className: "blocks-gallery-caption",
                value: caption
              }
            )
          ]
        }
      );
    }
  };
  var v42 = {
    attributes: {
      images: {
        type: "array",
        default: [],
        source: "query",
        selector: ".blocks-gallery-item",
        query: {
          url: {
            source: "attribute",
            selector: "img",
            attribute: "src"
          },
          fullUrl: {
            source: "attribute",
            selector: "img",
            attribute: "data-full-url"
          },
          link: {
            source: "attribute",
            selector: "img",
            attribute: "data-link"
          },
          alt: {
            source: "attribute",
            selector: "img",
            attribute: "alt",
            default: ""
          },
          id: {
            source: "attribute",
            selector: "img",
            attribute: "data-id"
          },
          caption: {
            type: "string",
            source: "html",
            selector: ".blocks-gallery-item__caption"
          }
        }
      },
      ids: {
        type: "array",
        default: []
      },
      columns: {
        type: "number"
      },
      caption: {
        type: "string",
        source: "html",
        selector: ".blocks-gallery-caption"
      },
      imageCrop: {
        type: "boolean",
        default: true
      },
      linkTo: {
        type: "string",
        default: "none"
      }
    },
    supports: {
      align: true
    },
    isEligible({ ids }) {
      return ids && ids.some((id) => typeof id === "string");
    },
    migrate(attributes2) {
      return runV2Migration(attributes2);
    },
    save({ attributes: attributes2 }) {
      const {
        images,
        columns = defaultColumnsNumberV1(attributes2),
        imageCrop,
        caption,
        linkTo
      } = attributes2;
      return /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)(
        "figure",
        {
          className: `columns-${columns} ${imageCrop ? "is-cropped" : ""}`,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime254.jsx)("ul", { className: "blocks-gallery-grid", children: images.map((image) => {
              let href;
              switch (linkTo) {
                case "media":
                  href = image.fullUrl || image.url;
                  break;
                case "attachment":
                  href = image.link;
                  break;
              }
              const img = /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
                "img",
                {
                  src: image.url,
                  alt: image.alt,
                  "data-id": image.id,
                  "data-full-url": image.fullUrl,
                  "data-link": image.link,
                  className: image.id ? `wp-image-${image.id}` : null
                }
              );
              return /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
                "li",
                {
                  className: "blocks-gallery-item",
                  children: /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)("figure", { children: [
                    href ? /* @__PURE__ */ (0, import_jsx_runtime254.jsx)("a", { href, children: img }) : img,
                    !import_block_editor92.RichText.isEmpty(image.caption) && /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
                      import_block_editor92.RichText.Content,
                      {
                        tagName: "figcaption",
                        className: "blocks-gallery-item__caption",
                        value: image.caption
                      }
                    )
                  ] })
                },
                image.id || image.url
              );
            }) }),
            !import_block_editor92.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
              import_block_editor92.RichText.Content,
              {
                tagName: "figcaption",
                className: "blocks-gallery-caption",
                value: caption
              }
            )
          ]
        }
      );
    }
  };
  var v33 = {
    attributes: {
      images: {
        type: "array",
        default: [],
        source: "query",
        selector: "ul.wp-block-gallery .blocks-gallery-item",
        query: {
          url: {
            source: "attribute",
            selector: "img",
            attribute: "src"
          },
          fullUrl: {
            source: "attribute",
            selector: "img",
            attribute: "data-full-url"
          },
          alt: {
            source: "attribute",
            selector: "img",
            attribute: "alt",
            default: ""
          },
          id: {
            source: "attribute",
            selector: "img",
            attribute: "data-id"
          },
          link: {
            source: "attribute",
            selector: "img",
            attribute: "data-link"
          },
          caption: {
            type: "string",
            source: "html",
            selector: "figcaption"
          }
        }
      },
      ids: {
        type: "array",
        default: []
      },
      columns: {
        type: "number"
      },
      imageCrop: {
        type: "boolean",
        default: true
      },
      linkTo: {
        type: "string",
        default: "none"
      }
    },
    supports: {
      align: true
    },
    save({ attributes: attributes2 }) {
      const {
        images,
        columns = defaultColumnsNumberV1(attributes2),
        imageCrop,
        linkTo
      } = attributes2;
      return /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
        "ul",
        {
          className: `columns-${columns} ${imageCrop ? "is-cropped" : ""}`,
          children: images.map((image) => {
            let href;
            switch (linkTo) {
              case "media":
                href = image.fullUrl || image.url;
                break;
              case "attachment":
                href = image.link;
                break;
            }
            const img = /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
              "img",
              {
                src: image.url,
                alt: image.alt,
                "data-id": image.id,
                "data-full-url": image.fullUrl,
                "data-link": image.link,
                className: image.id ? `wp-image-${image.id}` : null
              }
            );
            return /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
              "li",
              {
                className: "blocks-gallery-item",
                children: /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)("figure", { children: [
                  href ? /* @__PURE__ */ (0, import_jsx_runtime254.jsx)("a", { href, children: img }) : img,
                  image.caption && image.caption.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
                    import_block_editor92.RichText.Content,
                    {
                      tagName: "figcaption",
                      value: image.caption
                    }
                  )
                ] })
              },
              image.id || image.url
            );
          })
        }
      );
    },
    migrate(attributes2) {
      return runV2Migration(attributes2);
    }
  };
  var v28 = {
    attributes: {
      images: {
        type: "array",
        default: [],
        source: "query",
        selector: "ul.wp-block-gallery .blocks-gallery-item",
        query: {
          url: {
            source: "attribute",
            selector: "img",
            attribute: "src"
          },
          alt: {
            source: "attribute",
            selector: "img",
            attribute: "alt",
            default: ""
          },
          id: {
            source: "attribute",
            selector: "img",
            attribute: "data-id"
          },
          link: {
            source: "attribute",
            selector: "img",
            attribute: "data-link"
          },
          caption: {
            type: "string",
            source: "html",
            selector: "figcaption"
          }
        }
      },
      columns: {
        type: "number"
      },
      imageCrop: {
        type: "boolean",
        default: true
      },
      linkTo: {
        type: "string",
        default: "none"
      }
    },
    isEligible({ images, ids }) {
      return images && images.length > 0 && (!ids && images || ids && images && ids.length !== images.length || images.some((id, index) => {
        if (!id && ids[index] !== null) {
          return true;
        }
        return parseInt(id, 10) !== ids[index];
      }));
    },
    migrate(attributes2) {
      return runV2Migration(attributes2);
    },
    supports: {
      align: true
    },
    save({ attributes: attributes2 }) {
      const {
        images,
        columns = defaultColumnsNumberV1(attributes2),
        imageCrop,
        linkTo
      } = attributes2;
      return /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
        "ul",
        {
          className: `columns-${columns} ${imageCrop ? "is-cropped" : ""}`,
          children: images.map((image) => {
            let href;
            switch (linkTo) {
              case "media":
                href = image.url;
                break;
              case "attachment":
                href = image.link;
                break;
            }
            const img = /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
              "img",
              {
                src: image.url,
                alt: image.alt,
                "data-id": image.id,
                "data-link": image.link,
                className: image.id ? `wp-image-${image.id}` : null
              }
            );
            return /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
              "li",
              {
                className: "blocks-gallery-item",
                children: /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)("figure", { children: [
                  href ? /* @__PURE__ */ (0, import_jsx_runtime254.jsx)("a", { href, children: img }) : img,
                  image.caption && image.caption.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
                    import_block_editor92.RichText.Content,
                    {
                      tagName: "figcaption",
                      value: image.caption
                    }
                  )
                ] })
              },
              image.id || image.url
            );
          })
        }
      );
    }
  };
  var v117 = {
    attributes: {
      images: {
        type: "array",
        default: [],
        source: "query",
        selector: "div.wp-block-gallery figure.blocks-gallery-image img",
        query: {
          url: {
            source: "attribute",
            attribute: "src"
          },
          alt: {
            source: "attribute",
            attribute: "alt",
            default: ""
          },
          id: {
            source: "attribute",
            attribute: "data-id"
          }
        }
      },
      columns: {
        type: "number"
      },
      imageCrop: {
        type: "boolean",
        default: true
      },
      linkTo: {
        type: "string",
        default: "none"
      },
      align: {
        type: "string",
        default: "none"
      }
    },
    supports: {
      align: true
    },
    save({ attributes: attributes2 }) {
      const {
        images,
        columns = defaultColumnsNumberV1(attributes2),
        align,
        imageCrop,
        linkTo
      } = attributes2;
      const className = clsx_default(`columns-${columns}`, {
        alignnone: align === "none",
        "is-cropped": imageCrop
      });
      return /* @__PURE__ */ (0, import_jsx_runtime254.jsx)("div", { className, children: images.map((image) => {
        let href;
        switch (linkTo) {
          case "media":
            href = image.url;
            break;
          case "attachment":
            href = image.link;
            break;
        }
        const img = /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
          "img",
          {
            src: image.url,
            alt: image.alt,
            "data-id": image.id
          }
        );
        return /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
          "figure",
          {
            className: "blocks-gallery-image",
            children: href ? /* @__PURE__ */ (0, import_jsx_runtime254.jsx)("a", { href, children: img }) : img
          },
          image.id || image.url
        );
      }) });
    },
    migrate(attributes2) {
      return runV2Migration(attributes2);
    }
  };
  var deprecated_default19 = [v72, v62, v52, v42, v33, v28, v117];

  // packages/block-library/build-module/gallery/edit.mjs
  var import_components45 = __toESM(require_components(), 1);
  var import_block_editor95 = __toESM(require_block_editor(), 1);
  var import_element33 = __toESM(require_element(), 1);
  var import_i18n75 = __toESM(require_i18n(), 1);
  var import_data38 = __toESM(require_data(), 1);
  var import_primitives160 = __toESM(require_primitives(), 1);
  var import_blocks30 = __toESM(require_blocks(), 1);
  var import_blob9 = __toESM(require_blob(), 1);
  var import_notices6 = __toESM(require_notices(), 1);

  // packages/block-library/build-module/gallery/shared-icon.mjs
  var import_block_editor93 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime255 = __toESM(require_jsx_runtime(), 1);
  var sharedIcon = /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(import_block_editor93.BlockIcon, { icon: gallery_default });

  // packages/block-library/build-module/gallery/shared.mjs
  function defaultColumnsNumber(imageCount) {
    return imageCount ? Math.min(3, imageCount) : 3;
  }
  var pickRelevantMediaFiles = (image, sizeSlug = "large") => {
    const imageProps = Object.fromEntries(
      Object.entries(image ?? {}).filter(
        ([key]) => ["alt", "id", "link"].includes(key)
      )
    );
    imageProps.url = image?.sizes?.[sizeSlug]?.url || image?.media_details?.sizes?.[sizeSlug]?.source_url || image?.url || image?.source_url;
    const fullUrl = image?.sizes?.full?.url || image?.media_details?.sizes?.full?.source_url;
    if (fullUrl) {
      imageProps.fullUrl = fullUrl;
    }
    return imageProps;
  };

  // packages/block-library/build-module/image/constants.mjs
  var MIN_SIZE2 = 20;
  var LINK_DESTINATION_NONE2 = "none";
  var LINK_DESTINATION_MEDIA2 = "media";
  var LINK_DESTINATION_ATTACHMENT2 = "attachment";
  var LINK_DESTINATION_CUSTOM = "custom";
  var NEW_TAB_REL2 = ["noreferrer", "noopener"];
  var ALLOWED_MEDIA_TYPES3 = ["image"];
  var SIZED_LAYOUTS = ["flex", "grid"];
  var DEFAULT_MEDIA_SIZE_SLUG3 = "full";

  // packages/block-library/build-module/gallery/utils.mjs
  function getHrefAndDestination2(image, galleryDestination, imageDestination, attributes2, lightboxSetting) {
    switch (imageDestination ? imageDestination : galleryDestination) {
      case LINK_DESTINATION_MEDIA_WP_CORE:
      case LINK_DESTINATION_MEDIA:
        return {
          href: image?.source_url || image?.url,
          linkDestination: LINK_DESTINATION_MEDIA2,
          lightbox: lightboxSetting?.enabled ? { ...attributes2?.lightbox, enabled: false } : void 0
        };
      case LINK_DESTINATION_ATTACHMENT_WP_CORE:
      case LINK_DESTINATION_ATTACHMENT:
        return {
          href: image?.link,
          linkDestination: LINK_DESTINATION_ATTACHMENT2,
          lightbox: lightboxSetting?.enabled ? { ...attributes2?.lightbox, enabled: false } : void 0
        };
      case LINK_DESTINATION_LIGHTBOX:
        return {
          href: void 0,
          lightbox: !lightboxSetting?.enabled ? { ...attributes2?.lightbox, enabled: true } : void 0,
          linkDestination: LINK_DESTINATION_NONE2
        };
      case LINK_DESTINATION_NONE:
        return {
          href: void 0,
          linkDestination: LINK_DESTINATION_NONE2,
          lightbox: void 0
        };
    }
    return {};
  }

  // packages/block-library/build-module/image/utils.mjs
  function evalAspectRatio(value) {
    const [width, height = 1] = value.split("/").map(Number);
    const aspectRatio = width / height;
    return aspectRatio === Infinity || aspectRatio === 0 ? NaN : aspectRatio;
  }
  function removeNewTabRel(currentRel) {
    let newRel = currentRel;
    if (currentRel !== void 0 && newRel) {
      NEW_TAB_REL2.forEach((relVal) => {
        const regExp = new RegExp("\\b" + relVal + "\\b", "gi");
        newRel = newRel.replace(regExp, "");
      });
      if (newRel !== currentRel) {
        newRel = newRel.trim();
      }
      if (!newRel) {
        newRel = void 0;
      }
    }
    return newRel;
  }
  function getUpdatedLinkTargetSettings(value, { rel }) {
    const linkTarget = value ? "_blank" : void 0;
    let updatedRel;
    if (!linkTarget && !rel) {
      updatedRel = void 0;
    } else {
      updatedRel = removeNewTabRel(rel);
    }
    return {
      linkTarget,
      rel: updatedRel
    };
  }
  function getImageSizeAttributes(image, size) {
    const url = image?.media_details?.sizes?.[size]?.source_url;
    if (url) {
      return { url, width: void 0, height: void 0, sizeSlug: size };
    }
    return {};
  }
  function isValidFileType(file) {
    return ALLOWED_MEDIA_TYPES3.some(
      (mediaType) => file.type.indexOf(mediaType) === 0
    );
  }
  function mediaPosition2({ x: x2, y: y2 } = { x: 0.5, y: 0.5 }) {
    return `${Math.round(x2 * 100)}% ${Math.round(y2 * 100)}%`;
  }

  // packages/block-library/build-module/gallery/gallery.mjs
  var import_i18n74 = __toESM(require_i18n(), 1);
  var import_primitives159 = __toESM(require_primitives(), 1);
  var import_jsx_runtime256 = __toESM(require_jsx_runtime(), 1);
  function Gallery(props) {
    const {
      attributes: attributes2,
      isSelected,
      setAttributes,
      mediaPlaceholder,
      insertBlocksAfter,
      blockProps,
      __unstableLayoutClassNames: layoutClassNames,
      isContentLocked,
      multiGallerySelection
    } = props;
    const { align, columns, imageCrop } = attributes2;
    return /* @__PURE__ */ (0, import_jsx_runtime256.jsxs)(
      "figure",
      {
        ...blockProps,
        className: clsx_default(
          blockProps.className,
          layoutClassNames,
          "blocks-gallery-grid",
          {
            [`align${align}`]: align,
            [`columns-${columns}`]: columns !== void 0,
            [`columns-default`]: columns === void 0,
            "is-cropped": imageCrop
          }
        ),
        children: [
          blockProps.children,
          isSelected && !blockProps.children && /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(import_primitives159.View, { className: "blocks-gallery-media-placeholder-wrapper", children: mediaPlaceholder }),
          /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(
            Caption,
            {
              attributes: attributes2,
              setAttributes,
              isSelected,
              insertBlocksAfter,
              showToolbarButton: !multiGallerySelection && !isContentLocked,
              className: "blocks-gallery-caption",
              label: (0, import_i18n74.__)("Gallery caption text"),
              placeholder: (0, import_i18n74.__)("Add gallery caption")
            }
          )
        ]
      }
    );
  }

  // packages/block-library/build-module/gallery/use-image-sizes.mjs
  var import_element31 = __toESM(require_element(), 1);
  function useImageSizes(images, isSelected, getSettings2) {
    return (0, import_element31.useMemo)(() => getImageSizing(), [images, isSelected]);
    function getImageSizing() {
      if (!images || images.length === 0) {
        return;
      }
      const { imageSizes } = getSettings2();
      let resizedImages = {};
      if (isSelected) {
        resizedImages = images.reduce((currentResizedImages, img) => {
          if (!img.id) {
            return currentResizedImages;
          }
          const sizes = imageSizes.reduce((currentSizes, size) => {
            const defaultUrl = img.sizes?.[size.slug]?.url;
            const mediaDetailsUrl = img.media_details?.sizes?.[size.slug]?.source_url;
            return {
              ...currentSizes,
              [size.slug]: defaultUrl || mediaDetailsUrl
            };
          }, {});
          return {
            ...currentResizedImages,
            [parseInt(img.id, 10)]: sizes
          };
        }, {});
      }
      const resizedImageSizes = Object.values(resizedImages);
      return imageSizes.filter(
        ({ slug }) => resizedImageSizes.some((sizes) => sizes[slug])
      ).map(({ name: name123, slug }) => ({ value: slug, label: name123 }));
    }
  }

  // packages/block-library/build-module/gallery/use-get-new-images.mjs
  var import_element32 = __toESM(require_element(), 1);
  function useGetNewImages(images, imageData) {
    const [currentImages, setCurrentImages] = (0, import_element32.useState)([]);
    return (0, import_element32.useMemo)(() => getNewImages(), [images, imageData]);
    function getNewImages() {
      let imagesUpdated = false;
      const newCurrentImages = currentImages.filter(
        (currentImg) => images.find((img) => {
          return currentImg.clientId === img.clientId;
        })
      );
      if (newCurrentImages.length < currentImages.length) {
        imagesUpdated = true;
      }
      images.forEach((image) => {
        if (image.fromSavedContent && !newCurrentImages.find(
          (currentImage) => currentImage.id === image.id
        )) {
          imagesUpdated = true;
          newCurrentImages.push(image);
        }
      });
      const newImages = images.filter(
        (image) => !newCurrentImages.find(
          (currentImage) => image.clientId && currentImage.clientId === image.clientId
        ) && imageData?.find((img) => img.id === image.id) && !image.fromSavedContent
      );
      if (imagesUpdated || newImages?.length > 0) {
        setCurrentImages([...newCurrentImages, ...newImages]);
      }
      return newImages.length > 0 ? newImages : null;
    }
  }

  // packages/block-library/build-module/gallery/use-get-media.mjs
  var import_data37 = __toESM(require_data(), 1);
  var import_core_data20 = __toESM(require_core_data(), 1);
  var EMPTY_IMAGE_MEDIA = [];
  function useGetMedia(innerBlockImages) {
    return (0, import_data37.useSelect)(
      (select9) => {
        const imageIds = innerBlockImages.map((imageBlock) => imageBlock.attributes.id).filter((id) => id !== void 0);
        if (imageIds.length === 0) {
          return EMPTY_IMAGE_MEDIA;
        }
        return select9(import_core_data20.store).getEntityRecords(
          "postType",
          "attachment",
          {
            include: imageIds.join(","),
            per_page: -1,
            orderby: "include"
          }
        ) ?? EMPTY_IMAGE_MEDIA;
      },
      [innerBlockImages]
    );
  }

  // packages/block-library/build-module/gallery/gap-styles.mjs
  var import_block_editor94 = __toESM(require_block_editor(), 1);
  function GapStyles({ blockGap, clientId }) {
    const fallbackValue = `var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) )`;
    let gapValue = fallbackValue;
    let column = fallbackValue;
    let row;
    if (!!blockGap) {
      row = typeof blockGap === "string" ? (0, import_block_editor94.__experimentalGetGapCSSValue)(blockGap) : (0, import_block_editor94.__experimentalGetGapCSSValue)(blockGap?.top) || fallbackValue;
      column = typeof blockGap === "string" ? (0, import_block_editor94.__experimentalGetGapCSSValue)(blockGap) : (0, import_block_editor94.__experimentalGetGapCSSValue)(blockGap?.left) || fallbackValue;
      gapValue = row === column ? row : `${row} ${column}`;
    }
    const gap = `#block-${clientId} {
		--wp--style--unstable-gallery-gap: ${column === "0" ? "0px" : column};
		gap: ${gapValue}
	}`;
    (0, import_block_editor94.useStyleOverride)({ css: gap });
    return null;
  }

  // packages/block-library/build-module/gallery/edit.mjs
  var import_jsx_runtime257 = __toESM(require_jsx_runtime(), 1);
  var MAX_COLUMNS = 8;
  var LINK_OPTIONS = [
    {
      icon: custom_link_default,
      label: (0, import_i18n75.__)("Link images to attachment pages"),
      value: LINK_DESTINATION_ATTACHMENT,
      noticeText: (0, import_i18n75.__)("Attachment Pages")
    },
    {
      icon: image_default,
      label: (0, import_i18n75.__)("Link images to media files"),
      value: LINK_DESTINATION_MEDIA,
      noticeText: (0, import_i18n75.__)("Media Files")
    },
    {
      icon: fullscreen_default,
      label: (0, import_i18n75.__)("Enlarge on click"),
      value: LINK_DESTINATION_LIGHTBOX,
      noticeText: (0, import_i18n75.__)("Lightbox effect"),
      infoText: (0, import_i18n75.__)("Scale images with a lightbox effect")
    },
    {
      icon: link_off_default,
      label: (0, import_i18n75._x)("None", "Media item link option"),
      value: LINK_DESTINATION_NONE,
      noticeText: (0, import_i18n75.__)("None")
    }
  ];
  var NAVIGATION_BUTTON_TYPE_OPTIONS = [
    {
      label: (0, import_i18n75.__)("Icon"),
      value: "icon"
    },
    {
      label: (0, import_i18n75.__)("Text"),
      value: "text"
    },
    {
      label: (0, import_i18n75.__)("Both"),
      value: "both"
    }
  ];
  var ALLOWED_MEDIA_TYPES4 = ["image"];
  var PLACEHOLDER_TEXT = import_element33.Platform.isNative ? (0, import_i18n75.__)("Add media") : (0, import_i18n75.__)("Drag and drop images, upload, or choose from your library.");
  var MOBILE_CONTROL_PROPS_RANGE_CONTROL = import_element33.Platform.isNative ? { type: "stepper" } : {};
  var DEFAULT_BLOCK3 = { name: "core/image" };
  var EMPTY_ARRAY = [];
  function GalleryEdit(props) {
    const {
      setAttributes,
      attributes: attributes2,
      className,
      clientId,
      isSelected,
      insertBlocksAfter,
      isContentLocked,
      onFocus
    } = props;
    const [lightboxSetting, defaultRatios, themeRatios, showDefaultRatios] = (0, import_block_editor95.useSettings)(
      "blocks.core/image.lightbox",
      "dimensions.aspectRatios.default",
      "dimensions.aspectRatios.theme",
      "dimensions.defaultAspectRatios"
    );
    const linkOptions = !lightboxSetting?.allowEditing ? LINK_OPTIONS.filter(
      (option) => option.value !== LINK_DESTINATION_LIGHTBOX
    ) : LINK_OPTIONS;
    const {
      navigationButtonType,
      columns,
      imageCrop,
      randomOrder,
      linkTarget,
      linkTo,
      sizeSlug,
      aspectRatio
    } = attributes2;
    const {
      __unstableMarkNextChangeAsNotPersistent,
      replaceInnerBlocks,
      updateBlockAttributes,
      selectBlock
    } = (0, import_data38.useDispatch)(import_block_editor95.store);
    const { createSuccessNotice, createErrorNotice } = (0, import_data38.useDispatch)(import_notices6.store);
    const {
      getBlock,
      getSettings: getSettings2,
      innerBlockImages,
      blockWasJustInserted,
      multiGallerySelection
    } = (0, import_data38.useSelect)(
      (select9) => {
        const {
          getBlockName,
          getMultiSelectedBlockClientIds,
          getSettings: _getSettings,
          getBlock: _getBlock,
          wasBlockJustInserted
        } = select9(import_block_editor95.store);
        const multiSelectedClientIds = getMultiSelectedBlockClientIds();
        return {
          getBlock: _getBlock,
          getSettings: _getSettings,
          innerBlockImages: _getBlock(clientId)?.innerBlocks ?? EMPTY_ARRAY,
          blockWasJustInserted: wasBlockJustInserted(
            clientId,
            "inserter_menu"
          ),
          multiGallerySelection: multiSelectedClientIds.length && multiSelectedClientIds.every(
            (_clientId) => getBlockName(_clientId) === "core/gallery"
          )
        };
      },
      [clientId]
    );
    const images = (0, import_element33.useMemo)(
      () => innerBlockImages?.map((block) => ({
        clientId: block.clientId,
        id: block.attributes.id,
        url: block.attributes.url,
        attributes: block.attributes,
        fromSavedContent: Boolean(block.originalContent)
      })),
      [innerBlockImages]
    );
    const imageData = useGetMedia(innerBlockImages);
    const newImages = useGetNewImages(images, imageData);
    const hasLightboxImages = lightboxSetting?.enabled ? images.filter(
      (image) => image.attributes?.lightbox?.enabled === void 0 || image.attributes?.lightbox?.enabled === true
    ).length > 0 : images.filter((image) => image.attributes.lightbox?.enabled).length > 0;
    const themeOptions = themeRatios?.map(({ name: name123, ratio }) => ({
      label: name123,
      value: ratio
    }));
    const defaultOptions = defaultRatios?.map(({ name: name123, ratio }) => ({
      label: name123,
      value: ratio
    }));
    const aspectRatioOptions = [
      {
        label: (0, import_i18n75._x)(
          "Original",
          "Aspect ratio option for dimensions control"
        ),
        value: "auto"
      },
      ...showDefaultRatios ? defaultOptions || [] : [],
      ...themeOptions || []
    ];
    (0, import_element33.useEffect)(() => {
      newImages?.forEach((newImage) => {
        __unstableMarkNextChangeAsNotPersistent();
        updateBlockAttributes(newImage.clientId, {
          ...buildImageAttributes(newImage.attributes),
          id: newImage.id,
          align: void 0
        });
      });
    }, [newImages]);
    const imageSizeOptions = useImageSizes(
      imageData,
      isSelected,
      getSettings2
    );
    function buildImageAttributes(imageAttributes) {
      const image = imageAttributes.id ? imageData.find(({ id }) => id === imageAttributes.id) : null;
      let newClassName;
      if (imageAttributes.className && imageAttributes.className !== "") {
        newClassName = imageAttributes.className;
      }
      let newLinkTarget;
      if (imageAttributes.linkTarget || imageAttributes.rel) {
        newLinkTarget = {
          linkTarget: imageAttributes.linkTarget,
          rel: imageAttributes.rel
        };
      } else {
        newLinkTarget = getUpdatedLinkTargetSettings(
          linkTarget,
          attributes2
        );
      }
      return {
        ...pickRelevantMediaFiles(image, sizeSlug),
        ...getHrefAndDestination2(
          image,
          linkTo,
          imageAttributes?.linkDestination
        ),
        ...newLinkTarget,
        className: newClassName,
        sizeSlug,
        caption: imageAttributes.caption.length > 0 ? imageAttributes.caption : image.caption?.raw,
        alt: imageAttributes.alt || image.alt_text,
        aspectRatio: aspectRatio === "auto" ? void 0 : aspectRatio
      };
    }
    function isValidFileType2(file) {
      const nativeFileData = import_element33.Platform.isNative && file.id ? imageData.find(({ id }) => id === file.id) : null;
      const mediaTypeSelector = nativeFileData ? nativeFileData?.media_type : file.type;
      return ALLOWED_MEDIA_TYPES4.some(
        (mediaType) => mediaTypeSelector?.indexOf(mediaType) === 0
      ) || file.blob;
    }
    function updateImages(selectedImages) {
      const newFileUploads = Object.prototype.toString.call(selectedImages) === "[object FileList]";
      const imageArray = newFileUploads ? Array.from(selectedImages).map((file) => {
        if (!file.url) {
          return {
            blob: (0, import_blob9.createBlobURL)(file)
          };
        }
        return file;
      }) : selectedImages;
      if (!imageArray.every(isValidFileType2)) {
        createErrorNotice(
          (0, import_i18n75.__)(
            "If uploading to a gallery all files need to be image formats"
          ),
          { id: "gallery-upload-invalid-file", type: "snackbar" }
        );
      }
      const processedImages = imageArray.filter((file) => file.url || isValidFileType2(file)).map((file) => {
        if (!file.url) {
          return {
            blob: file.blob || (0, import_blob9.createBlobURL)(file)
          };
        }
        return file;
      });
      const newOrderMap = processedImages.reduce(
        (result, image, index) => (result[image.id] = index, result),
        {}
      );
      const existingImageBlocks = !newFileUploads ? innerBlockImages.filter(
        (block) => processedImages.find(
          (img) => img.id === block.attributes.id
        )
      ) : innerBlockImages;
      const newImageList = processedImages.filter(
        (img) => !existingImageBlocks.find(
          (existingImg) => img.id === existingImg.attributes.id
        )
      );
      const newBlocks = newImageList.map((image) => {
        return (0, import_blocks30.createBlock)("core/image", {
          id: image.id,
          blob: image.blob,
          url: image.url,
          caption: image.caption,
          alt: image.alt
        });
      });
      replaceInnerBlocks(
        clientId,
        existingImageBlocks.concat(newBlocks).sort(
          (a2, b2) => newOrderMap[a2.attributes.id] - newOrderMap[b2.attributes.id]
        )
      );
      if (newBlocks?.length > 0) {
        selectBlock(newBlocks[0].clientId);
      }
    }
    function onUploadError(message) {
      createErrorNotice(message, { type: "snackbar" });
    }
    function setLinkTo(value) {
      setAttributes({ linkTo: value });
      const changedAttributes = {};
      const blocks = [];
      getBlock(clientId).innerBlocks.forEach((block) => {
        blocks.push(block.clientId);
        const image = block.attributes.id ? imageData.find(({ id }) => id === block.attributes.id) : null;
        changedAttributes[block.clientId] = getHrefAndDestination2(
          image,
          value,
          false,
          block.attributes,
          lightboxSetting
        );
      });
      updateBlockAttributes(blocks, changedAttributes, {
        uniqueByBlock: true
      });
      const linkToText = [...linkOptions].find(
        (linkType) => linkType.value === value
      );
      createSuccessNotice(
        (0, import_i18n75.sprintf)(
          /* translators: %s: image size settings */
          (0, import_i18n75.__)("All gallery image links updated to: %s"),
          linkToText.noticeText
        ),
        {
          id: "gallery-attributes-linkTo",
          type: "snackbar"
        }
      );
    }
    function setColumnsNumber(value) {
      setAttributes({ columns: value });
    }
    function toggleImageCrop() {
      setAttributes({ imageCrop: !imageCrop });
    }
    function toggleRandomOrder() {
      setAttributes({ randomOrder: !randomOrder });
    }
    function toggleOpenInNewTab(openInNewTab) {
      const newLinkTarget = openInNewTab ? "_blank" : void 0;
      setAttributes({ linkTarget: newLinkTarget });
      const changedAttributes = {};
      const blocks = [];
      getBlock(clientId).innerBlocks.forEach((block) => {
        blocks.push(block.clientId);
        changedAttributes[block.clientId] = getUpdatedLinkTargetSettings(
          newLinkTarget,
          block.attributes
        );
      });
      updateBlockAttributes(blocks, changedAttributes, {
        uniqueByBlock: true
      });
      const noticeText = openInNewTab ? (0, import_i18n75.__)("All gallery images updated to open in new tab") : (0, import_i18n75.__)("All gallery images updated to not open in new tab");
      createSuccessNotice(noticeText, {
        id: "gallery-attributes-openInNewTab",
        type: "snackbar"
      });
    }
    function updateImagesSize(newSizeSlug) {
      setAttributes({ sizeSlug: newSizeSlug });
      const changedAttributes = {};
      const blocks = [];
      getBlock(clientId).innerBlocks.forEach((block) => {
        blocks.push(block.clientId);
        const image = block.attributes.id ? imageData.find(({ id }) => id === block.attributes.id) : null;
        changedAttributes[block.clientId] = getImageSizeAttributes(
          image,
          newSizeSlug
        );
      });
      updateBlockAttributes(blocks, changedAttributes, {
        uniqueByBlock: true
      });
      const imageSize = imageSizeOptions.find(
        (size) => size.value === newSizeSlug
      );
      createSuccessNotice(
        (0, import_i18n75.sprintf)(
          /* translators: %s: image size settings */
          (0, import_i18n75.__)("All gallery image sizes updated to: %s"),
          imageSize?.label ?? newSizeSlug
        ),
        {
          id: "gallery-attributes-sizeSlug",
          type: "snackbar"
        }
      );
    }
    function setAspectRatio(value) {
      setAttributes({ aspectRatio: value });
      const changedAttributes = {};
      const blocks = [];
      getBlock(clientId).innerBlocks.forEach((block) => {
        blocks.push(block.clientId);
        changedAttributes[block.clientId] = {
          aspectRatio: value === "auto" ? void 0 : value
        };
      });
      updateBlockAttributes(blocks, changedAttributes, true);
      const aspectRatioText = aspectRatioOptions.find(
        (option) => option.value === value
      );
      createSuccessNotice(
        (0, import_i18n75.sprintf)(
          /* translators: %s: aspect ratio setting */
          (0, import_i18n75.__)("All gallery images updated to aspect ratio: %s"),
          aspectRatioText?.label || value
        ),
        {
          id: "gallery-attributes-aspectRatio",
          type: "snackbar"
        }
      );
    }
    (0, import_element33.useEffect)(() => {
      if (!linkTo) {
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({
          linkTo: window?.wp?.media?.view?.settings?.defaultProps?.link || LINK_DESTINATION_NONE
        });
      }
    }, [linkTo]);
    const hasImages = !!images.length;
    const hasImageIds = hasImages && images.some((image) => !!image.id);
    const imagesUploading = images.some(
      (img) => !import_element33.Platform.isNative ? !img.id && img.url?.indexOf("blob:") === 0 : img.url?.indexOf("file:") === 0
    );
    const mediaPlaceholderProps = import_element33.Platform.select({
      web: {
        addToGallery: false,
        disableMediaButtons: imagesUploading,
        value: {}
      },
      native: {
        addToGallery: hasImageIds,
        isAppender: hasImages,
        disableMediaButtons: hasImages && !isSelected || imagesUploading,
        value: hasImageIds ? images : {},
        autoOpenMediaUpload: !hasImages && isSelected && blockWasJustInserted,
        onFocus
      }
    });
    const mediaPlaceholder = /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
      import_block_editor95.MediaPlaceholder,
      {
        handleUpload: false,
        icon: sharedIcon,
        labels: {
          title: (0, import_i18n75.__)("Gallery"),
          instructions: PLACEHOLDER_TEXT
        },
        onSelect: updateImages,
        allowedTypes: ALLOWED_MEDIA_TYPES4,
        multiple: true,
        onError: onUploadError,
        ...mediaPlaceholderProps
      }
    );
    const blockProps = (0, import_block_editor95.useBlockProps)({
      className: clsx_default(className, "has-nested-images")
    });
    const nativeInnerBlockProps = import_element33.Platform.isNative && {
      marginHorizontal: 0,
      marginVertical: 0
    };
    const innerBlocksProps = (0, import_block_editor95.useInnerBlocksProps)(blockProps, {
      defaultBlock: DEFAULT_BLOCK3,
      directInsert: true,
      orientation: "horizontal",
      renderAppender: false,
      ...nativeInnerBlockProps
    });
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    if (!hasImages) {
      return /* @__PURE__ */ (0, import_jsx_runtime257.jsxs)(import_primitives160.View, { ...innerBlocksProps, children: [
        innerBlocksProps.children,
        mediaPlaceholder
      ] });
    }
    const hasLinkTo = linkTo && linkTo !== "none";
    return /* @__PURE__ */ (0, import_jsx_runtime257.jsxs)(import_jsx_runtime257.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime257.jsxs)(import_block_editor95.InspectorControls, { children: [
        import_element33.Platform.isWeb && /* @__PURE__ */ (0, import_jsx_runtime257.jsxs)(
          import_components45.__experimentalToolsPanel,
          {
            label: (0, import_i18n75.__)("Settings"),
            resetAll: () => {
              setAttributes({
                navigationButtonType: "icon",
                columns: void 0,
                imageCrop: true,
                randomOrder: false
              });
              setAspectRatio("auto");
              if (sizeSlug !== DEFAULT_MEDIA_SIZE_SLUG2) {
                updateImagesSize(DEFAULT_MEDIA_SIZE_SLUG2);
              }
              if (linkTarget) {
                toggleOpenInNewTab(false);
              }
            },
            dropdownMenuProps,
            children: [
              images.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
                import_components45.__experimentalToolsPanelItem,
                {
                  isShownByDefault: true,
                  label: (0, import_i18n75.__)("Columns"),
                  hasValue: () => !!columns && columns !== images.length,
                  onDeselect: () => setColumnsNumber(void 0),
                  children: /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
                    import_components45.RangeControl,
                    {
                      label: (0, import_i18n75.__)("Columns"),
                      value: columns ? columns : defaultColumnsNumber(
                        images.length
                      ),
                      onChange: setColumnsNumber,
                      min: 1,
                      max: Math.min(
                        MAX_COLUMNS,
                        images.length
                      ),
                      required: true,
                      __next40pxDefaultSize: true
                    }
                  )
                }
              ),
              imageSizeOptions?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
                import_components45.__experimentalToolsPanelItem,
                {
                  isShownByDefault: true,
                  label: (0, import_i18n75.__)("Resolution"),
                  hasValue: () => sizeSlug !== DEFAULT_MEDIA_SIZE_SLUG2,
                  onDeselect: () => updateImagesSize(DEFAULT_MEDIA_SIZE_SLUG2),
                  children: /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
                    import_components45.SelectControl,
                    {
                      label: (0, import_i18n75.__)("Resolution"),
                      help: (0, import_i18n75.__)(
                        "Select the size of the source images."
                      ),
                      value: sizeSlug,
                      options: imageSizeOptions,
                      onChange: updateImagesSize,
                      hideCancelButton: true,
                      size: "__unstable-large"
                    }
                  )
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
                import_components45.__experimentalToolsPanelItem,
                {
                  isShownByDefault: true,
                  label: (0, import_i18n75.__)("Crop images to fit"),
                  hasValue: () => !imageCrop,
                  onDeselect: () => setAttributes({ imageCrop: true }),
                  children: /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
                    import_components45.ToggleControl,
                    {
                      label: (0, import_i18n75.__)("Crop images to fit"),
                      checked: !!imageCrop,
                      onChange: toggleImageCrop
                    }
                  )
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
                import_components45.__experimentalToolsPanelItem,
                {
                  isShownByDefault: true,
                  label: (0, import_i18n75.__)("Randomize order"),
                  hasValue: () => !!randomOrder,
                  onDeselect: () => setAttributes({ randomOrder: false }),
                  children: /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
                    import_components45.ToggleControl,
                    {
                      label: (0, import_i18n75.__)("Randomize order"),
                      checked: !!randomOrder,
                      onChange: toggleRandomOrder
                    }
                  )
                }
              ),
              hasLinkTo && /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
                import_components45.__experimentalToolsPanelItem,
                {
                  isShownByDefault: true,
                  label: (0, import_i18n75.__)("Open images in new tab"),
                  hasValue: () => !!linkTarget,
                  onDeselect: () => toggleOpenInNewTab(false),
                  children: /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
                    import_components45.ToggleControl,
                    {
                      label: (0, import_i18n75.__)("Open images in new tab"),
                      checked: linkTarget === "_blank",
                      onChange: toggleOpenInNewTab
                    }
                  )
                }
              ),
              aspectRatioOptions.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
                import_components45.__experimentalToolsPanelItem,
                {
                  hasValue: () => !!aspectRatio && aspectRatio !== "auto",
                  label: (0, import_i18n75.__)("Aspect ratio"),
                  onDeselect: () => setAspectRatio("auto"),
                  isShownByDefault: true,
                  children: /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
                    import_components45.SelectControl,
                    {
                      __next40pxDefaultSize: true,
                      label: (0, import_i18n75.__)("Aspect ratio"),
                      help: (0, import_i18n75.__)(
                        "Set a consistent aspect ratio for all images in the gallery."
                      ),
                      value: aspectRatio,
                      options: aspectRatioOptions,
                      onChange: setAspectRatio
                    }
                  )
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
                import_components45.__experimentalToolsPanelItem,
                {
                  label: (0, import_i18n75.__)("Navigation button type"),
                  isShownByDefault: true,
                  hasValue: () => navigationButtonType !== "icon",
                  onDeselect: () => setAttributes({
                    navigationButtonType: "icon"
                  }),
                  children: hasLightboxImages && /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
                    import_components45.__experimentalToggleGroupControl,
                    {
                      label: (0, import_i18n75.__)("Navigation button type"),
                      value: navigationButtonType,
                      onChange: (value) => setAttributes({
                        navigationButtonType: value
                      }),
                      isBlock: true,
                      __next40pxDefaultSize: true,
                      help: (0, import_i18n75.__)(
                        "Adjust the appearance of buttons in the lightbox."
                      ),
                      children: NAVIGATION_BUTTON_TYPE_OPTIONS.map(
                        (option) => /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
                          import_components45.__experimentalToggleGroupControlOption,
                          {
                            value: option.value,
                            label: option.label
                          },
                          option.value
                        )
                      )
                    }
                  )
                }
              )
            ]
          }
        ),
        import_element33.Platform.isNative && /* @__PURE__ */ (0, import_jsx_runtime257.jsxs)(import_components45.PanelBody, { title: (0, import_i18n75.__)("Settings"), children: [
          images.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
            import_components45.RangeControl,
            {
              label: (0, import_i18n75.__)("Columns"),
              value: columns ? columns : defaultColumnsNumber(images.length),
              onChange: setColumnsNumber,
              min: 1,
              max: Math.min(MAX_COLUMNS, images.length),
              ...MOBILE_CONTROL_PROPS_RANGE_CONTROL,
              required: true,
              __next40pxDefaultSize: true
            }
          ),
          imageSizeOptions?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
            import_components45.SelectControl,
            {
              label: (0, import_i18n75.__)("Resolution"),
              help: (0, import_i18n75.__)(
                "Select the size of the source images."
              ),
              value: sizeSlug,
              options: imageSizeOptions,
              onChange: updateImagesSize,
              hideCancelButton: true,
              size: "__unstable-large"
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
            import_components45.SelectControl,
            {
              label: (0, import_i18n75.__)("Link"),
              value: linkTo,
              onChange: setLinkTo,
              options: linkOptions,
              hideCancelButton: true,
              size: "__unstable-large"
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
            import_components45.ToggleControl,
            {
              label: (0, import_i18n75.__)("Crop images to fit"),
              checked: !!imageCrop,
              onChange: toggleImageCrop
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
            import_components45.ToggleControl,
            {
              label: (0, import_i18n75.__)("Randomize order"),
              checked: !!randomOrder,
              onChange: toggleRandomOrder
            }
          ),
          hasLinkTo && /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
            import_components45.ToggleControl,
            {
              label: (0, import_i18n75.__)("Open images in new tab"),
              checked: linkTarget === "_blank",
              onChange: toggleOpenInNewTab
            }
          ),
          aspectRatioOptions.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
            import_components45.SelectControl,
            {
              label: (0, import_i18n75.__)("Aspect Ratio"),
              help: (0, import_i18n75.__)(
                "Set a consistent aspect ratio for all images in the gallery."
              ),
              value: aspectRatio,
              options: aspectRatioOptions,
              onChange: setAspectRatio,
              hideCancelButton: true,
              size: "__unstable-large"
            }
          )
        ] })
      ] }),
      import_element33.Platform.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(import_block_editor95.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
        import_components45.ToolbarDropdownMenu,
        {
          icon: link_default,
          label: (0, import_i18n75.__)("Link"),
          children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(import_components45.MenuGroup, { children: linkOptions.map((linkItem) => {
            const isOptionSelected = linkTo === linkItem.value;
            return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
              import_components45.MenuItem,
              {
                isSelected: isOptionSelected,
                className: clsx_default(
                  "components-dropdown-menu__menu-item",
                  {
                    "is-active": isOptionSelected
                  }
                ),
                iconPosition: "left",
                icon: linkItem.icon,
                onClick: () => {
                  setLinkTo(linkItem.value);
                  onClose();
                },
                role: "menuitemradio",
                info: linkItem.infoText,
                children: linkItem.label
              },
              linkItem.value
            );
          }) })
        }
      ) }) : null,
      import_element33.Platform.isWeb && /* @__PURE__ */ (0, import_jsx_runtime257.jsxs)(import_jsx_runtime257.Fragment, { children: [
        !multiGallerySelection && /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(import_block_editor95.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
          import_block_editor95.MediaReplaceFlow,
          {
            allowedTypes: ALLOWED_MEDIA_TYPES4,
            handleUpload: false,
            onSelect: updateImages,
            name: (0, import_i18n75.__)("Add"),
            multiple: true,
            mediaIds: images.filter((image) => image.id).map((image) => image.id),
            addToGallery: hasImageIds,
            variant: "toolbar"
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
          GapStyles,
          {
            blockGap: attributes2.style?.spacing?.blockGap,
            clientId
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
        Gallery,
        {
          ...props,
          isContentLocked,
          images,
          mediaPlaceholder: !hasImages || import_element33.Platform.isNative ? mediaPlaceholder : void 0,
          blockProps: innerBlocksProps,
          insertBlocksAfter,
          multiGallerySelection
        }
      )
    ] });
  }

  // packages/block-library/build-module/gallery/block.json
  var block_default38 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/gallery",
    title: "Gallery",
    category: "media",
    usesContext: ["galleryId"],
    allowedBlocks: ["core/image"],
    description: "Display multiple images in a rich gallery.",
    keywords: ["images", "photos"],
    textdomain: "default",
    attributes: {
      images: {
        type: "array",
        default: [],
        source: "query",
        selector: ".blocks-gallery-item",
        query: {
          url: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "src"
          },
          fullUrl: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "data-full-url"
          },
          link: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "data-link"
          },
          alt: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "alt",
            default: ""
          },
          id: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "data-id"
          },
          caption: {
            type: "rich-text",
            source: "rich-text",
            selector: ".blocks-gallery-item__caption"
          }
        }
      },
      ids: {
        type: "array",
        items: {
          type: "number"
        },
        default: []
      },
      navigationButtonType: {
        type: "string",
        default: "icon",
        enum: ["icon", "text", "both"]
      },
      shortCodeTransforms: {
        type: "array",
        items: {
          type: "object"
        },
        default: []
      },
      columns: {
        type: "number",
        minimum: 1,
        maximum: 8
      },
      caption: {
        type: "rich-text",
        source: "rich-text",
        selector: ".blocks-gallery-caption",
        role: "content"
      },
      imageCrop: {
        type: "boolean",
        default: true
      },
      randomOrder: {
        type: "boolean",
        default: false
      },
      fixedHeight: {
        type: "boolean",
        default: true
      },
      linkTarget: {
        type: "string"
      },
      linkTo: {
        type: "string"
      },
      sizeSlug: {
        type: "string",
        default: "large"
      },
      allowResize: {
        type: "boolean",
        default: false
      },
      aspectRatio: {
        type: "string",
        default: "auto"
      }
    },
    providesContext: {
      allowResize: "allowResize",
      imageCrop: "imageCrop",
      fixedHeight: "fixedHeight",
      navigationButtonType: "navigationButtonType"
    },
    supports: {
      anchor: true,
      align: true,
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true
        }
      },
      html: false,
      units: ["px", "em", "rem", "vh", "vw"],
      spacing: {
        margin: true,
        padding: true,
        blockGap: ["horizontal", "vertical"],
        __experimentalSkipSerialization: ["blockGap"],
        __experimentalDefaultControls: {
          blockGap: true,
          margin: false,
          padding: false
        }
      },
      color: {
        text: false,
        background: true,
        gradients: true
      },
      layout: {
        allowSwitching: false,
        allowInheriting: false,
        allowEditing: false,
        default: {
          type: "flex"
        }
      },
      interactivity: {
        clientNavigation: true
      },
      listView: true
    },
    editorStyle: "wp-block-gallery-editor",
    style: "wp-block-gallery"
  };

  // packages/block-library/build-module/gallery/save.mjs
  var import_block_editor96 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime258 = __toESM(require_jsx_runtime(), 1);
  function saveWithInnerBlocks({ attributes: attributes2 }) {
    const { caption, columns, imageCrop } = attributes2;
    const className = clsx_default("has-nested-images", {
      [`columns-${columns}`]: columns !== void 0,
      [`columns-default`]: columns === void 0,
      "is-cropped": imageCrop
    });
    const blockProps = import_block_editor96.useBlockProps.save({ className });
    const innerBlocksProps = import_block_editor96.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime258.jsxs)("figure", { ...innerBlocksProps, children: [
      innerBlocksProps.children,
      !import_block_editor96.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
        import_block_editor96.RichText.Content,
        {
          tagName: "figcaption",
          className: clsx_default(
            "blocks-gallery-caption",
            (0, import_block_editor96.__experimentalGetElementClassName)("caption")
          ),
          value: caption
        }
      )
    ] });
  }

  // packages/block-library/build-module/gallery/transforms.mjs
  var import_blocks31 = __toESM(require_blocks(), 1);
  var import_blob10 = __toESM(require_blob(), 1);
  var import_hooks29 = __toESM(require_hooks(), 1);
  var parseShortcodeIds = (ids) => {
    if (!ids) {
      return [];
    }
    return ids.split(",").map((id) => parseInt(id, 10));
  };
  function updateThirdPartyTransformToGallery(block) {
    if (block.name === "core/gallery" && block.attributes?.images.length > 0) {
      const innerBlocks = block.attributes.images.map(
        ({ url, id, alt }) => {
          return (0, import_blocks31.createBlock)("core/image", {
            url,
            id: id ? parseInt(id, 10) : null,
            alt,
            sizeSlug: block.attributes.sizeSlug,
            linkDestination: block.attributes.linkDestination
          });
        }
      );
      delete block.attributes.ids;
      delete block.attributes.images;
      block.innerBlocks = innerBlocks;
    }
    return block;
  }
  (0, import_hooks29.addFilter)(
    "blocks.switchToBlockType.transformedBlock",
    "core/gallery/update-third-party-transform-to",
    updateThirdPartyTransformToGallery
  );
  function updateThirdPartyTransformFromGallery(toBlock, fromBlocks) {
    const from = Array.isArray(fromBlocks) ? fromBlocks : [fromBlocks];
    const galleryBlock = from.find(
      (transformedBlock) => transformedBlock.name === "core/gallery" && transformedBlock.innerBlocks.length > 0 && !transformedBlock.attributes.images?.length > 0 && !toBlock.name.includes("core/")
    );
    if (galleryBlock) {
      const images = galleryBlock.innerBlocks.map(
        ({ attributes: { url, id, alt } }) => ({
          url,
          id: id ? parseInt(id, 10) : null,
          alt
        })
      );
      const ids = images.map(({ id }) => id);
      galleryBlock.attributes.images = images;
      galleryBlock.attributes.ids = ids;
    }
    return toBlock;
  }
  (0, import_hooks29.addFilter)(
    "blocks.switchToBlockType.transformedBlock",
    "core/gallery/update-third-party-transform-from",
    updateThirdPartyTransformFromGallery
  );
  var transforms9 = {
    from: [
      {
        type: "block",
        isMultiBlock: true,
        blocks: ["core/image"],
        transform: (attributes2) => {
          let { align, sizeSlug } = attributes2[0];
          align = attributes2.every(
            (attribute) => attribute.align === align
          ) ? align : void 0;
          sizeSlug = attributes2.every(
            (attribute) => attribute.sizeSlug === sizeSlug
          ) ? sizeSlug : void 0;
          const validImages = attributes2.filter(({ url }) => url);
          const innerBlocks = validImages.map((image) => {
            image.width = void 0;
            image.height = void 0;
            return (0, import_blocks31.createBlock)("core/image", image);
          });
          return (0, import_blocks31.createBlock)(
            "core/gallery",
            {
              align,
              sizeSlug
            },
            innerBlocks
          );
        }
      },
      {
        type: "shortcode",
        tag: "gallery",
        transform({ named: { ids, columns = 3, link, orderby, size } }) {
          const imageIds = parseShortcodeIds(ids).map(
            (id) => parseInt(id, 10)
          );
          let linkTo = LINK_DESTINATION_NONE;
          if (link === "post") {
            linkTo = LINK_DESTINATION_ATTACHMENT;
          } else if (link === "file") {
            linkTo = LINK_DESTINATION_MEDIA;
          }
          const galleryBlock = (0, import_blocks31.createBlock)(
            "core/gallery",
            {
              columns: parseInt(columns, 10),
              linkTo,
              randomOrder: orderby === "rand",
              ...size && { sizeSlug: size }
            },
            imageIds.map(
              (imageId) => (0, import_blocks31.createBlock)("core/image", {
                id: imageId,
                ...size && { sizeSlug: size }
              })
            )
          );
          return galleryBlock;
        },
        isMatch({ named }) {
          return void 0 !== named.ids;
        }
      },
      {
        // When created by drag and dropping multiple files on an insertion point. Because multiple
        // files must not be transformed to a gallery when dropped within a gallery there is another transform
        // within the image block to handle that case. Therefore this transform has to have priority 1
        // set so that it overrides the image block transformation when multiple images are dropped outside
        // of a gallery block.
        type: "files",
        priority: 1,
        isMatch(files) {
          return files.length !== 1 && files.every(
            (file) => file.type.indexOf("image/") === 0
          );
        },
        transform(files) {
          const innerBlocks = files.map(
            (file) => (0, import_blocks31.createBlock)("core/image", {
              blob: (0, import_blob10.createBlobURL)(file)
            })
          );
          return (0, import_blocks31.createBlock)("core/gallery", {}, innerBlocks);
        }
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/image"],
        transform: ({ align }, innerBlocks) => {
          if (innerBlocks.length > 0) {
            return innerBlocks.map(
              ({
                attributes: {
                  url,
                  alt,
                  caption,
                  title,
                  href,
                  rel,
                  linkClass,
                  id,
                  sizeSlug: imageSizeSlug,
                  linkDestination,
                  linkTarget,
                  anchor,
                  className
                }
              }) => (0, import_blocks31.createBlock)("core/image", {
                align,
                url,
                alt,
                caption,
                title,
                href,
                rel,
                linkClass,
                id,
                sizeSlug: imageSizeSlug,
                linkDestination,
                linkTarget,
                anchor,
                className
              })
            );
          }
          return (0, import_blocks31.createBlock)("core/image", { align });
        }
      }
    ]
  };
  var transforms_default10 = transforms9;

  // packages/block-library/build-module/gallery/index.mjs
  var { name: name38 } = block_default38;
  var settings38 = {
    icon: gallery_default,
    example: {
      attributes: {
        columns: 2
      },
      innerBlocks: [
        {
          name: "core/image",
          attributes: {
            url: "https://s.w.org/images/core/5.3/Glacial_lakes%2C_Bhutan.jpg"
          }
        },
        {
          name: "core/image",
          attributes: {
            url: "https://s.w.org/images/core/5.3/Sediment_off_the_Yucatan_Peninsula.jpg"
          }
        }
      ]
    },
    transforms: transforms_default10,
    edit: GalleryEdit,
    save: saveWithInnerBlocks,
    deprecated: deprecated_default19
  };
  var init38 = () => initBlock({ name: name38, metadata: block_default38, settings: settings38 });

  // packages/block-library/build-module/group/index.mjs
  var group_exports = {};
  __export(group_exports, {
    init: () => init39,
    metadata: () => block_default39,
    name: () => name39,
    settings: () => settings39
  });
  var import_i18n79 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/group/deprecated.mjs
  var import_block_editor97 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime259 = __toESM(require_jsx_runtime(), 1);
  var migrateAttributes = (attributes2) => {
    if (!attributes2.tagName) {
      attributes2 = {
        ...attributes2,
        tagName: "div"
      };
    }
    if (!attributes2.customTextColor && !attributes2.customBackgroundColor) {
      return attributes2;
    }
    const style2 = { color: {} };
    if (attributes2.customTextColor) {
      style2.color.text = attributes2.customTextColor;
    }
    if (attributes2.customBackgroundColor) {
      style2.color.background = attributes2.customBackgroundColor;
    }
    const { customTextColor, customBackgroundColor, ...restAttributes } = attributes2;
    return {
      ...restAttributes,
      style: style2
    };
  };
  var deprecated8 = [
    // Version with default layout.
    {
      attributes: {
        tagName: {
          type: "string",
          default: "div"
        },
        templateLock: {
          type: ["string", "boolean"],
          enum: ["all", "insert", false]
        }
      },
      supports: {
        __experimentalOnEnter: true,
        __experimentalSettings: true,
        align: ["wide", "full"],
        anchor: true,
        ariaLabel: true,
        html: false,
        color: {
          gradients: true,
          link: true,
          __experimentalDefaultControls: {
            background: true,
            text: true
          }
        },
        spacing: {
          margin: ["top", "bottom"],
          padding: true,
          blockGap: true,
          __experimentalDefaultControls: {
            padding: true,
            blockGap: true
          }
        },
        __experimentalBorder: {
          color: true,
          radius: true,
          style: true,
          width: true,
          __experimentalDefaultControls: {
            color: true,
            radius: true,
            style: true,
            width: true
          }
        },
        typography: {
          fontSize: true,
          lineHeight: true,
          __experimentalFontStyle: true,
          __experimentalFontWeight: true,
          __experimentalLetterSpacing: true,
          __experimentalTextTransform: true,
          __experimentalDefaultControls: {
            fontSize: true
          }
        },
        layout: true
      },
      save({ attributes: { tagName: Tag } }) {
        return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(Tag, { ...import_block_editor97.useInnerBlocksProps.save(import_block_editor97.useBlockProps.save()) });
      },
      isEligible: ({ layout }) => layout?.inherit || layout?.contentSize && layout?.type !== "constrained",
      migrate: (attributes2) => {
        const { layout = null } = attributes2;
        if (layout?.inherit || layout?.contentSize) {
          return {
            ...attributes2,
            layout: {
              ...layout,
              type: "constrained"
            }
          };
        }
      }
    },
    // Version of the block with the double div.
    {
      attributes: {
        tagName: {
          type: "string",
          default: "div"
        },
        templateLock: {
          type: ["string", "boolean"],
          enum: ["all", "insert", false]
        }
      },
      supports: {
        align: ["wide", "full"],
        anchor: true,
        color: {
          gradients: true,
          link: true
        },
        spacing: {
          padding: true
        },
        __experimentalBorder: {
          radius: true
        }
      },
      save({ attributes: attributes2 }) {
        const { tagName: Tag } = attributes2;
        return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(Tag, { ...import_block_editor97.useBlockProps.save(), children: /* @__PURE__ */ (0, import_jsx_runtime259.jsx)("div", { className: "wp-block-group__inner-container", children: /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(import_block_editor97.InnerBlocks.Content, {}) }) });
      }
    },
    // Version of the block without global styles support
    {
      attributes: {
        backgroundColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        customTextColor: {
          type: "string"
        }
      },
      supports: {
        align: ["wide", "full"],
        anchor: true,
        html: false
      },
      migrate: migrateAttributes,
      save({ attributes: attributes2 }) {
        const {
          backgroundColor,
          customBackgroundColor,
          textColor,
          customTextColor
        } = attributes2;
        const backgroundClass = (0, import_block_editor97.getColorClassName)(
          "background-color",
          backgroundColor
        );
        const textClass = (0, import_block_editor97.getColorClassName)("color", textColor);
        const className = clsx_default(backgroundClass, textClass, {
          "has-text-color": textColor || customTextColor,
          "has-background": backgroundColor || customBackgroundColor
        });
        const styles = {
          backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
          color: textClass ? void 0 : customTextColor
        };
        return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)("div", { className, style: styles, children: /* @__PURE__ */ (0, import_jsx_runtime259.jsx)("div", { className: "wp-block-group__inner-container", children: /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(import_block_editor97.InnerBlocks.Content, {}) }) });
      }
    },
    // Version of the group block with a bug that made text color class not applied.
    {
      attributes: {
        backgroundColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        customTextColor: {
          type: "string"
        }
      },
      migrate: migrateAttributes,
      supports: {
        align: ["wide", "full"],
        anchor: true,
        html: false
      },
      save({ attributes: attributes2 }) {
        const {
          backgroundColor,
          customBackgroundColor,
          textColor,
          customTextColor
        } = attributes2;
        const backgroundClass = (0, import_block_editor97.getColorClassName)(
          "background-color",
          backgroundColor
        );
        const textClass = (0, import_block_editor97.getColorClassName)("color", textColor);
        const className = clsx_default(backgroundClass, {
          "has-text-color": textColor || customTextColor,
          "has-background": backgroundColor || customBackgroundColor
        });
        const styles = {
          backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
          color: textClass ? void 0 : customTextColor
        };
        return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)("div", { className, style: styles, children: /* @__PURE__ */ (0, import_jsx_runtime259.jsx)("div", { className: "wp-block-group__inner-container", children: /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(import_block_editor97.InnerBlocks.Content, {}) }) });
      }
    },
    // v1 of group block. Deprecated to add an inner-container div around `InnerBlocks.Content`.
    {
      attributes: {
        backgroundColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        }
      },
      supports: {
        align: ["wide", "full"],
        anchor: true,
        html: false
      },
      migrate: migrateAttributes,
      save({ attributes: attributes2 }) {
        const { backgroundColor, customBackgroundColor } = attributes2;
        const backgroundClass = (0, import_block_editor97.getColorClassName)(
          "background-color",
          backgroundColor
        );
        const className = clsx_default(backgroundClass, {
          "has-background": backgroundColor || customBackgroundColor
        });
        const styles = {
          backgroundColor: backgroundClass ? void 0 : customBackgroundColor
        };
        return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)("div", { className, style: styles, children: /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(import_block_editor97.InnerBlocks.Content, {}) });
      }
    }
  ];
  var deprecated_default20 = deprecated8;

  // packages/block-library/build-module/group/edit.mjs
  var import_data40 = __toESM(require_data(), 1);
  var import_block_editor99 = __toESM(require_block_editor(), 1);
  var import_element35 = __toESM(require_element(), 1);
  var import_i18n77 = __toESM(require_i18n(), 1);
  var import_primitives161 = __toESM(require_primitives(), 1);

  // packages/block-library/build-module/group/placeholder.mjs
  var import_data39 = __toESM(require_data(), 1);
  var import_block_editor98 = __toESM(require_block_editor(), 1);
  var import_i18n76 = __toESM(require_i18n(), 1);
  var import_blocks32 = __toESM(require_blocks(), 1);
  var import_components46 = __toESM(require_components(), 1);
  var import_element34 = __toESM(require_element(), 1);
  var import_jsx_runtime260 = __toESM(require_jsx_runtime(), 1);
  var getGroupPlaceholderIcons = (name123 = "group") => {
    const icons = {
      group: /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
        import_components46.SVG,
        {
          xmlns: "http://www.w3.org/2000/svg",
          width: "48",
          height: "48",
          viewBox: "0 0 48 48",
          children: /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(import_components46.Path, { d: "M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Z" })
        }
      ),
      "group-row": /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
        import_components46.SVG,
        {
          xmlns: "http://www.w3.org/2000/svg",
          width: "48",
          height: "48",
          viewBox: "0 0 48 48",
          children: /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(import_components46.Path, { d: "M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10Z" })
        }
      ),
      "group-stack": /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
        import_components46.SVG,
        {
          xmlns: "http://www.w3.org/2000/svg",
          width: "48",
          height: "48",
          viewBox: "0 0 48 48",
          children: /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(import_components46.Path, { d: "M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm0 17a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V27Z" })
        }
      ),
      "group-grid": /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
        import_components46.SVG,
        {
          xmlns: "http://www.w3.org/2000/svg",
          width: "48",
          height: "48",
          viewBox: "0 0 48 48",
          children: /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(import_components46.Path, { d: "M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10ZM0 27a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V27Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V27Z" })
        }
      )
    };
    return icons?.[name123];
  };
  function useShouldShowPlaceHolder({
    attributes: attributes2 = {
      style: void 0,
      backgroundColor: void 0,
      textColor: void 0,
      fontSize: void 0
    },
    usedLayoutType = "",
    hasInnerBlocks = false
  }) {
    const { style: style2, backgroundColor, textColor, fontSize } = attributes2;
    const [showPlaceholder, setShowPlaceholder] = (0, import_element34.useState)(
      !hasInnerBlocks && !backgroundColor && !fontSize && !textColor && !style2 && usedLayoutType !== "flex" && usedLayoutType !== "grid"
    );
    (0, import_element34.useEffect)(() => {
      if (!!hasInnerBlocks || !!backgroundColor || !!fontSize || !!textColor || !!style2 || usedLayoutType === "flex") {
        setShowPlaceholder(false);
      }
    }, [
      backgroundColor,
      fontSize,
      textColor,
      style2,
      usedLayoutType,
      hasInnerBlocks
    ]);
    return [showPlaceholder, setShowPlaceholder];
  }
  function GroupPlaceHolder({ name: name123, onSelect }) {
    const variations18 = (0, import_data39.useSelect)(
      (select9) => select9(import_blocks32.store).getBlockVariations(name123, "block"),
      [name123]
    );
    const blockProps = (0, import_block_editor98.useBlockProps)({
      className: "wp-block-group__placeholder"
    });
    (0, import_element34.useEffect)(() => {
      if (variations18 && variations18.length === 1) {
        onSelect(variations18[0]);
      }
    }, [onSelect, variations18]);
    return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
      import_components46.Placeholder,
      {
        instructions: (0, import_i18n76.__)("Group blocks together. Select a layout:"),
        children: /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
          "ul",
          {
            role: "list",
            className: "wp-block-group-placeholder__variations",
            "aria-label": (0, import_i18n76.__)("Block variations"),
            children: variations18.map((variation) => /* @__PURE__ */ (0, import_jsx_runtime260.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
              import_components46.Button,
              {
                __next40pxDefaultSize: true,
                variant: "tertiary",
                icon: getGroupPlaceholderIcons(
                  variation.name
                ),
                iconSize: 48,
                onClick: () => onSelect(variation),
                className: "wp-block-group-placeholder__variation-button",
                label: `${variation.title}: ${variation.description}`
              }
            ) }, variation.name))
          }
        )
      }
    ) });
  }
  var placeholder_default = GroupPlaceHolder;

  // packages/block-library/build-module/group/edit.mjs
  var import_jsx_runtime261 = __toESM(require_jsx_runtime(), 1);
  var { HTMLElementControl: HTMLElementControl4 } = unlock(import_block_editor99.privateApis);
  function GroupEditControls({ tagName, onSelectTagName, clientId }) {
    return /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(import_block_editor99.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
      HTMLElementControl4,
      {
        tagName,
        onChange: onSelectTagName,
        clientId,
        options: [
          { label: (0, import_i18n77.__)("Default (<div>)"), value: "div" },
          { label: "<header>", value: "header" },
          { label: "<main>", value: "main" },
          { label: "<section>", value: "section" },
          { label: "<article>", value: "article" },
          { label: "<aside>", value: "aside" },
          { label: "<footer>", value: "footer" }
        ]
      }
    ) });
  }
  function GroupEdit({ attributes: attributes2, name: name123, setAttributes, clientId }) {
    const { hasInnerBlocks, themeSupportsLayout } = (0, import_data40.useSelect)(
      (select9) => {
        const { getBlock, getSettings: getSettings2 } = select9(import_block_editor99.store);
        const block = getBlock(clientId);
        return {
          hasInnerBlocks: !!(block && block.innerBlocks.length),
          themeSupportsLayout: getSettings2()?.supportsLayout
        };
      },
      [clientId]
    );
    const {
      tagName: TagName2 = "div",
      templateLock,
      allowedBlocks,
      layout = {}
    } = attributes2;
    const { type = "default" } = layout;
    const layoutSupportEnabled = themeSupportsLayout || type === "flex" || type === "grid";
    const ref = (0, import_element35.useRef)();
    const blockProps = (0, import_block_editor99.useBlockProps)({ ref });
    const [showPlaceholder, setShowPlaceholder] = useShouldShowPlaceHolder({
      attributes: attributes2,
      usedLayoutType: type,
      hasInnerBlocks
    });
    let renderAppender;
    if (showPlaceholder) {
      renderAppender = false;
    } else if (!hasInnerBlocks) {
      renderAppender = import_block_editor99.InnerBlocks.ButtonBlockAppender;
    }
    const innerBlocksProps = (0, import_block_editor99.useInnerBlocksProps)(
      layoutSupportEnabled ? blockProps : { className: "wp-block-group__inner-container" },
      {
        dropZoneElement: ref.current,
        templateLock,
        allowedBlocks,
        renderAppender
      }
    );
    const { selectBlock } = (0, import_data40.useDispatch)(import_block_editor99.store);
    const selectVariation = (nextVariation) => {
      setAttributes(nextVariation.attributes);
      selectBlock(clientId, -1);
      setShowPlaceholder(false);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(import_jsx_runtime261.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
        GroupEditControls,
        {
          tagName: TagName2,
          onSelectTagName: (value) => setAttributes({ tagName: value }),
          clientId
        }
      ),
      showPlaceholder && /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(import_primitives161.View, { children: [
        innerBlocksProps.children,
        /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
          placeholder_default,
          {
            name: name123,
            onSelect: selectVariation
          }
        )
      ] }),
      layoutSupportEnabled && !showPlaceholder && /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(TagName2, { ...innerBlocksProps }),
      !layoutSupportEnabled && !showPlaceholder && /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime261.jsx)("div", { ...innerBlocksProps }) })
    ] });
  }
  var edit_default15 = GroupEdit;

  // packages/block-library/build-module/group/block.json
  var block_default39 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/group",
    title: "Group",
    category: "design",
    description: "Gather blocks in a layout container.",
    keywords: ["container", "wrapper", "row", "section"],
    textdomain: "default",
    attributes: {
      tagName: {
        type: "string",
        default: "div"
      },
      templateLock: {
        type: ["string", "boolean"],
        enum: ["all", "insert", "contentOnly", false]
      }
    },
    supports: {
      __experimentalOnEnter: true,
      __experimentalOnMerge: true,
      __experimentalSettings: true,
      align: ["wide", "full"],
      anchor: true,
      ariaLabel: true,
      html: false,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        __experimentalDefaultControls: {
          backgroundImage: true
        }
      },
      color: {
        gradients: true,
        heading: true,
        button: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      shadow: true,
      spacing: {
        margin: ["top", "bottom"],
        padding: true,
        blockGap: true,
        __experimentalDefaultControls: {
          padding: true,
          blockGap: true
        }
      },
      dimensions: {
        minHeight: true
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      position: {
        sticky: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      layout: {
        allowSizingOnChildren: true
      },
      interactivity: {
        clientNavigation: true
      },
      allowedBlocks: true
    },
    editorStyle: "wp-block-group-editor",
    style: "wp-block-group"
  };

  // packages/block-library/build-module/group/save.mjs
  var import_block_editor100 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime262 = __toESM(require_jsx_runtime(), 1);
  function save22({ attributes: { tagName: Tag } }) {
    return /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(Tag, { ...import_block_editor100.useInnerBlocksProps.save(import_block_editor100.useBlockProps.save()) });
  }

  // packages/block-library/build-module/group/transforms.mjs
  var import_blocks33 = __toESM(require_blocks(), 1);
  var transforms10 = {
    from: [
      {
        type: "block",
        isMultiBlock: true,
        blocks: ["*"],
        __experimentalConvert(blocks) {
          const alignments = ["wide", "full"];
          const widestAlignment = blocks.reduce(
            (accumulator, block) => {
              const { align } = block.attributes;
              return alignments.indexOf(align) > alignments.indexOf(accumulator) ? align : accumulator;
            },
            void 0
          );
          const groupInnerBlocks = blocks.map((block) => {
            return (0, import_blocks33.createBlock)(
              block.name,
              block.attributes,
              block.innerBlocks
            );
          });
          return (0, import_blocks33.createBlock)(
            "core/group",
            {
              align: widestAlignment,
              layout: { type: "constrained" }
            },
            groupInnerBlocks
          );
        }
      }
    ]
  };
  var transforms_default11 = transforms10;

  // packages/block-library/build-module/group/variations.mjs
  var import_i18n78 = __toESM(require_i18n(), 1);
  var example = {
    innerBlocks: [
      {
        name: "core/paragraph",
        attributes: {
          content: (0, import_i18n78.__)("One.")
        }
      },
      {
        name: "core/paragraph",
        attributes: {
          content: (0, import_i18n78.__)("Two.")
        }
      },
      {
        name: "core/paragraph",
        attributes: {
          content: (0, import_i18n78.__)("Three.")
        }
      },
      {
        name: "core/paragraph",
        attributes: {
          content: (0, import_i18n78.__)("Four.")
        }
      },
      {
        name: "core/paragraph",
        attributes: {
          content: (0, import_i18n78.__)("Five.")
        }
      },
      {
        name: "core/paragraph",
        attributes: {
          content: (0, import_i18n78.__)("Six.")
        }
      }
    ]
  };
  var variations8 = [
    {
      name: "group",
      title: (0, import_i18n78.__)("Group"),
      description: (0, import_i18n78.__)("Gather blocks in a container."),
      attributes: { layout: { type: "constrained" } },
      isDefault: true,
      scope: ["block", "inserter", "transform"],
      icon: group_default
    },
    {
      name: "group-row",
      title: (0, import_i18n78._x)("Row", "single horizontal line"),
      description: (0, import_i18n78.__)("Arrange blocks horizontally."),
      attributes: { layout: { type: "flex", flexWrap: "nowrap" } },
      scope: ["block", "inserter", "transform"],
      isActive: ["layout.type"],
      icon: row_default,
      example
    },
    {
      name: "group-stack",
      title: (0, import_i18n78.__)("Stack"),
      description: (0, import_i18n78.__)("Arrange blocks vertically."),
      attributes: { layout: { type: "flex", orientation: "vertical" } },
      scope: ["block", "inserter", "transform"],
      isActive: ["layout.type", "layout.orientation"],
      icon: stack_default,
      example
    },
    {
      name: "group-grid",
      title: (0, import_i18n78.__)("Grid"),
      description: (0, import_i18n78.__)("Arrange blocks in a grid."),
      attributes: { layout: { type: "grid" } },
      scope: ["block", "inserter", "transform"],
      isActive: ["layout.type"],
      icon: grid_default,
      example
    }
  ];
  var variations_default8 = variations8;

  // packages/block-library/build-module/group/index.mjs
  var { name: name39 } = block_default39;
  var settings39 = {
    icon: group_default,
    example: {
      attributes: {
        layout: {
          type: "constrained",
          justifyContent: "center"
        },
        style: {
          spacing: {
            padding: {
              top: "4em",
              right: "3em",
              bottom: "4em",
              left: "3em"
            }
          }
        }
      },
      innerBlocks: [
        {
          name: "core/heading",
          attributes: {
            content: (0, import_i18n79.__)("La Mancha"),
            style: {
              typography: {
                textAlign: "center"
              }
            }
          }
        },
        {
          name: "core/paragraph",
          attributes: {
            style: {
              typography: {
                textAlign: "center"
              }
            },
            content: (0, import_i18n79.__)(
              "In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing."
            )
          }
        },
        {
          name: "core/spacer",
          attributes: {
            height: "10px"
          }
        },
        {
          name: "core/button",
          attributes: {
            text: (0, import_i18n79.__)("Read more")
          }
        }
      ],
      viewportWidth: 600
    },
    transforms: transforms_default11,
    edit: edit_default15,
    save: save22,
    deprecated: deprecated_default20,
    variations: variations_default8
  };
  var init39 = () => initBlock({ name: name39, metadata: block_default39, settings: settings39 });

  // packages/block-library/build-module/heading/index.mjs
  var heading_exports = {};
  __export(heading_exports, {
    init: () => init40,
    metadata: () => block_default40,
    name: () => name40,
    settings: () => settings40
  });
  var import_i18n82 = __toESM(require_i18n(), 1);
  var import_blocks35 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/heading/deprecated.mjs
  var import_block_editor101 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime263 = __toESM(require_jsx_runtime(), 1);
  var blockSupports = {
    className: false,
    anchor: true
  };
  var blockAttributes4 = {
    align: {
      type: "string"
    },
    content: {
      type: "string",
      source: "html",
      selector: "h1,h2,h3,h4,h5,h6",
      default: ""
    },
    level: {
      type: "number",
      default: 2
    },
    placeholder: {
      type: "string"
    }
  };
  var migrateCustomColors2 = (attributes2) => {
    if (!attributes2.customTextColor) {
      return attributes2;
    }
    const style2 = {
      color: {
        text: attributes2.customTextColor
      }
    };
    const { customTextColor, ...restAttributes } = attributes2;
    return {
      ...restAttributes,
      style: style2
    };
  };
  var TEXT_ALIGN_OPTIONS = ["left", "right", "center"];
  var migrateTextAlign = (attributes2) => {
    const { align, ...rest } = attributes2;
    return TEXT_ALIGN_OPTIONS.includes(align) ? { ...rest, textAlign: align } : attributes2;
  };
  var v118 = {
    supports: blockSupports,
    attributes: {
      ...blockAttributes4,
      customTextColor: {
        type: "string"
      },
      textColor: {
        type: "string"
      }
    },
    migrate: (attributes2) => migrate_text_align_default(
      migrateCustomColors2(migrateTextAlign(attributes2))
    ),
    save({ attributes: attributes2 }) {
      const { align, level, content, textColor, customTextColor } = attributes2;
      const tagName = "h" + level;
      const textClass = (0, import_block_editor101.getColorClassName)("color", textColor);
      const className = clsx_default({
        [textClass]: textClass
      });
      return /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
        import_block_editor101.RichText.Content,
        {
          className: className ? className : void 0,
          tagName,
          style: {
            textAlign: align,
            color: textClass ? void 0 : customTextColor
          },
          value: content
        }
      );
    }
  };
  var v29 = {
    attributes: {
      ...blockAttributes4,
      customTextColor: {
        type: "string"
      },
      textColor: {
        type: "string"
      }
    },
    migrate: (attributes2) => migrate_text_align_default(
      migrateCustomColors2(migrateTextAlign(attributes2))
    ),
    save({ attributes: attributes2 }) {
      const { align, content, customTextColor, level, textColor } = attributes2;
      const tagName = "h" + level;
      const textClass = (0, import_block_editor101.getColorClassName)("color", textColor);
      const className = clsx_default({
        [textClass]: textClass,
        [`has-text-align-${align}`]: align
      });
      return /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
        import_block_editor101.RichText.Content,
        {
          className: className ? className : void 0,
          tagName,
          style: {
            color: textClass ? void 0 : customTextColor
          },
          value: content
        }
      );
    },
    supports: blockSupports
  };
  var v34 = {
    supports: blockSupports,
    attributes: {
      ...blockAttributes4,
      customTextColor: {
        type: "string"
      },
      textColor: {
        type: "string"
      }
    },
    migrate: (attributes2) => migrate_text_align_default(
      migrateCustomColors2(migrateTextAlign(attributes2))
    ),
    save({ attributes: attributes2 }) {
      const { align, content, customTextColor, level, textColor } = attributes2;
      const tagName = "h" + level;
      const textClass = (0, import_block_editor101.getColorClassName)("color", textColor);
      const className = clsx_default({
        [textClass]: textClass,
        "has-text-color": textColor || customTextColor,
        [`has-text-align-${align}`]: align
      });
      return /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
        import_block_editor101.RichText.Content,
        {
          className: className ? className : void 0,
          tagName,
          style: {
            color: textClass ? void 0 : customTextColor
          },
          value: content
        }
      );
    }
  };
  var v43 = {
    supports: {
      align: ["wide", "full"],
      anchor: true,
      className: false,
      color: { link: true },
      fontSize: true,
      lineHeight: true,
      __experimentalSelector: {
        "core/heading/h1": "h1",
        "core/heading/h2": "h2",
        "core/heading/h3": "h3",
        "core/heading/h4": "h4",
        "core/heading/h5": "h5",
        "core/heading/h6": "h6"
      },
      __unstablePasteTextInline: true
    },
    attributes: blockAttributes4,
    isEligible: ({ align }) => TEXT_ALIGN_OPTIONS.includes(align),
    migrate: (attributes2) => migrate_text_align_default(
      migrateCustomColors2(migrateTextAlign(attributes2))
    ),
    save({ attributes: attributes2 }) {
      const { align, content, level } = attributes2;
      const TagName2 = "h" + level;
      const className = clsx_default({
        [`has-text-align-${align}`]: align
      });
      return /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(TagName2, { ...import_block_editor101.useBlockProps.save({ className }), children: /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(import_block_editor101.RichText.Content, { value: content }) });
    }
  };
  var v53 = {
    supports: {
      align: ["wide", "full"],
      anchor: true,
      className: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalDefaultControls: {
          fontSize: true,
          fontAppearance: true,
          textTransform: true
        }
      },
      __experimentalSelector: "h1,h2,h3,h4,h5,h6",
      __unstablePasteTextInline: true,
      __experimentalSlashInserter: true
    },
    attributes: {
      textAlign: {
        type: "string"
      },
      content: {
        type: "string",
        source: "html",
        selector: "h1,h2,h3,h4,h5,h6",
        default: "",
        role: "content"
      },
      level: {
        type: "number",
        default: 2
      },
      placeholder: {
        type: "string"
      }
    },
    save({ attributes: attributes2 }) {
      const { textAlign, content, level } = attributes2;
      const TagName2 = "h" + level;
      const className = clsx_default({
        [`has-text-align-${textAlign}`]: textAlign
      });
      return /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(TagName2, { ...import_block_editor101.useBlockProps.save({ className }), children: /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(import_block_editor101.RichText.Content, { value: content }) });
    },
    migrate: (attributes2) => migrate_text_align_default(
      migrateCustomColors2(migrateTextAlign(attributes2))
    )
  };
  var v63 = {
    supports: {
      align: ["wide", "full"],
      anchor: true,
      className: true,
      splitting: true,
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalWritingMode: true,
        fitText: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __unstablePasteTextInline: true,
      __experimentalSlashInserter: true,
      interactivity: {
        clientNavigation: true
      }
    },
    attributes: {
      textAlign: {
        type: "string"
      },
      content: {
        type: "string",
        source: "html",
        selector: "h1,h2,h3,h4,h5,h6",
        default: "",
        role: "content"
      },
      level: {
        type: "number",
        default: 2
      },
      levelOptions: {
        type: "array"
      },
      placeholder: {
        type: "string"
      }
    },
    save({ attributes: attributes2 }) {
      const { textAlign, content, level } = attributes2;
      const TagName2 = "h" + level;
      const className = clsx_default({
        [`has-text-align-${textAlign}`]: textAlign
      });
      return /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(TagName2, { ...import_block_editor101.useBlockProps.save({ className }), children: /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(import_block_editor101.RichText.Content, { value: content }) });
    },
    migrate: (attributes2) => migrate_text_align_default(
      migrateCustomColors2(migrateTextAlign(attributes2))
    ),
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    }
  };
  var deprecated9 = [v63, v53, v43, v34, v29, v118];
  var deprecated_default21 = deprecated9;

  // packages/block-library/build-module/heading/edit.mjs
  var import_i18n80 = __toESM(require_i18n(), 1);
  var import_element36 = __toESM(require_element(), 1);
  var import_data41 = __toESM(require_data(), 1);
  var import_block_editor102 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/heading/autogenerate-anchors.mjs
  var import_remove_accents3 = __toESM(require_remove_accents(), 1);
  var anchors = {};
  var getTextWithoutMarkup = (text) => {
    const dummyElement = document.createElement("div");
    dummyElement.innerHTML = text;
    return dummyElement.innerText;
  };
  var getSlug = (content) => {
    return (0, import_remove_accents3.default)(getTextWithoutMarkup(content)).replace(/[^\p{L}\p{N}]+/gu, "-").toLowerCase().replace(/(^-+)|(-+$)/g, "");
  };
  var generateAnchor = (clientId, content) => {
    const slug = getSlug(content);
    if ("" === slug) {
      return null;
    }
    delete anchors[clientId];
    let anchor = slug;
    let i2 = 0;
    while (Object.values(anchors).includes(anchor)) {
      i2 += 1;
      anchor = slug + "-" + i2;
    }
    return anchor;
  };
  var setAnchor = (clientId, anchor) => {
    anchors[clientId] = anchor;
  };

  // packages/block-library/build-module/heading/edit.mjs
  var import_jsx_runtime264 = __toESM(require_jsx_runtime(), 1);
  function HeadingEdit(props) {
    const {
      attributes: attributes2,
      setAttributes,
      mergeBlocks,
      onReplace,
      style: style2,
      clientId
    } = props;
    useDeprecatedTextAlign(props);
    const { content, level, placeholder: placeholder2, anchor } = attributes2;
    const tagName = "h" + level;
    const blockProps = (0, import_block_editor102.useBlockProps)({
      style: style2
    });
    const { canGenerateAnchors } = (0, import_data41.useSelect)((select9) => {
      const { getGlobalBlockCount, getSettings: getSettings2 } = select9(import_block_editor102.store);
      const settings122 = getSettings2();
      return {
        canGenerateAnchors: !!settings122.generateAnchors || getGlobalBlockCount("core/table-of-contents") > 0
      };
    }, []);
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data41.useDispatch)(import_block_editor102.store);
    (0, import_element36.useEffect)(() => {
      if (!canGenerateAnchors) {
        return;
      }
      if (!anchor && content) {
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({
          anchor: generateAnchor(clientId, content)
        });
      }
      setAnchor(clientId, anchor);
      return () => setAnchor(clientId, null);
    }, [anchor, content, clientId, canGenerateAnchors]);
    const onContentChange = (value) => {
      const newAttrs = { content: value };
      if (canGenerateAnchors && (!anchor || !value || generateAnchor(clientId, content) === anchor)) {
        newAttrs.anchor = generateAnchor(clientId, value);
      }
      setAttributes(newAttrs);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(import_jsx_runtime264.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(
      import_block_editor102.RichText,
      {
        identifier: "content",
        tagName,
        value: content,
        onChange: onContentChange,
        onMerge: mergeBlocks,
        onReplace,
        onRemove: () => onReplace([]),
        placeholder: placeholder2 || (0, import_i18n80.__)("Heading"),
        ...import_element36.Platform.isNative && { deleteEnter: true },
        ...blockProps
      }
    ) });
  }
  var edit_default16 = HeadingEdit;

  // packages/block-library/build-module/heading/block.json
  var block_default40 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/heading",
    title: "Heading",
    category: "text",
    description: "Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.",
    keywords: ["title", "subtitle"],
    textdomain: "default",
    attributes: {
      content: {
        type: "rich-text",
        source: "rich-text",
        selector: "h1,h2,h3,h4,h5,h6",
        role: "content"
      },
      level: {
        type: "number",
        default: 2
      },
      levelOptions: {
        type: "array"
      },
      placeholder: {
        type: "string"
      }
    },
    supports: {
      align: ["wide", "full"],
      anchor: true,
      className: true,
      splitting: true,
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalWritingMode: true,
        fitText: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __unstablePasteTextInline: true,
      __experimentalSlashInserter: true,
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-heading-editor",
    style: "wp-block-heading"
  };

  // packages/block-library/build-module/heading/save.mjs
  var import_block_editor103 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime265 = __toESM(require_jsx_runtime(), 1);
  function save23({ attributes: attributes2 }) {
    const { content, level } = attributes2;
    const TagName2 = "h" + level;
    return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(TagName2, { ...import_block_editor103.useBlockProps.save(), children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(import_block_editor103.RichText.Content, { value: content }) });
  }

  // packages/block-library/build-module/heading/transforms.mjs
  var import_blocks34 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/heading/shared.mjs
  function getLevelFromHeadingNodeName(nodeName) {
    return Number(nodeName.substr(1));
  }

  // packages/block-library/build-module/heading/transforms.mjs
  var transforms11 = {
    from: [
      {
        type: "block",
        isMultiBlock: true,
        blocks: ["core/paragraph"],
        transform: (attributes2) => attributes2.map((_attributes) => {
          const { content, anchor, style: style2 } = _attributes;
          const textAlign = style2?.typography?.textAlign;
          return (0, import_blocks34.createBlock)("core/heading", {
            ...getTransformedAttributes(
              _attributes,
              "core/heading",
              ({ content: contentBinding }) => ({
                content: contentBinding
              })
            ),
            content,
            anchor,
            ...textAlign && {
              style: {
                typography: {
                  textAlign
                }
              }
            }
          });
        })
      },
      {
        type: "raw",
        selector: "h1,h2,h3,h4,h5,h6",
        schema: ({ phrasingContentSchema, isPaste }) => {
          const schema2 = {
            children: phrasingContentSchema,
            attributes: isPaste ? [] : ["style", "id"]
          };
          return {
            h1: schema2,
            h2: schema2,
            h3: schema2,
            h4: schema2,
            h5: schema2,
            h6: schema2
          };
        },
        transform(node) {
          const attributes2 = (0, import_blocks34.getBlockAttributes)(
            "core/heading",
            node.outerHTML
          );
          const { textAlign } = node.style || {};
          attributes2.level = getLevelFromHeadingNodeName(node.nodeName);
          if (textAlign === "left" || textAlign === "center" || textAlign === "right") {
            attributes2.style = {
              ...attributes2.style,
              typography: {
                ...attributes2.style?.typography,
                textAlign
              }
            };
          }
          return (0, import_blocks34.createBlock)("core/heading", attributes2);
        }
      },
      ...[1, 2, 3, 4, 5, 6].map((level) => ({
        type: "prefix",
        prefix: Array(level + 1).join("#"),
        transform(content) {
          return (0, import_blocks34.createBlock)("core/heading", {
            level,
            content
          });
        }
      })),
      ...[1, 2, 3, 4, 5, 6].map((level) => ({
        type: "enter",
        regExp: new RegExp(`^/(h|H)${level}$`),
        transform: () => (0, import_blocks34.createBlock)("core/heading", { level })
      }))
    ],
    to: [
      {
        type: "block",
        isMultiBlock: true,
        blocks: ["core/paragraph"],
        transform: (attributes2) => attributes2.map((_attributes) => {
          const { content, style: style2 } = _attributes;
          const textAlign = style2?.typography?.textAlign;
          return (0, import_blocks34.createBlock)("core/paragraph", {
            ...getTransformedAttributes(
              _attributes,
              "core/paragraph",
              ({ content: contentBinding }) => ({
                content: contentBinding
              })
            ),
            content,
            ...textAlign && {
              style: {
                typography: {
                  textAlign
                }
              }
            }
          });
        })
      }
    ]
  };
  var transforms_default12 = transforms11;

  // packages/block-library/build-module/heading/variations.mjs
  var import_i18n81 = __toESM(require_i18n(), 1);
  var LEVEL_ICONS = [
    heading_level_1_default,
    heading_level_2_default,
    heading_level_3_default,
    heading_level_4_default,
    heading_level_5_default,
    heading_level_6_default
  ];
  var variations9 = [
    ...[1, 2, 3, 4, 5, 6].map((level) => ({
      name: `h${level}`,
      title: (0, import_i18n81.sprintf)(
        /* translators: %d: heading level e.g: "1", "2", "3" */
        (0, import_i18n81.__)("Heading %d"),
        level
      ),
      description: (0, import_i18n81.__)(
        "Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content."
      ),
      icon: LEVEL_ICONS[level - 1],
      attributes: { level },
      scope: ["block", "transform"],
      keywords: [`h${level}`],
      isActive: (blockAttributes8) => blockAttributes8.level === level
    }))
  ];
  var variations_default9 = variations9;

  // packages/block-library/build-module/heading/index.mjs
  var { fieldsKey: fieldsKey7, formKey: formKey7 } = unlock(import_blocks35.privateApis);
  var { name: name40 } = block_default40;
  var settings40 = {
    icon: heading_default,
    example: {
      attributes: {
        content: (0, import_i18n82.__)("Code is Poetry"),
        level: 2,
        style: {
          typography: {
            textAlign: "center"
          }
        }
      }
    },
    __experimentalLabel(attributes2, { context }) {
      const { content, level } = attributes2;
      const customName = attributes2?.metadata?.name;
      const hasContent = content?.trim().length > 0;
      if (context === "list-view" && (customName || hasContent)) {
        return customName || content;
      }
      if (context === "breadcrumb" && customName) {
        return customName;
      }
      if (context === "accessibility") {
        return !hasContent ? (0, import_i18n82.sprintf)(
          /* translators: accessibility text. %s: heading level. */
          (0, import_i18n82.__)("Level %s. Empty."),
          level
        ) : (0, import_i18n82.sprintf)(
          /* translators: accessibility text. 1: heading level. 2: heading content. */
          (0, import_i18n82.__)("Level %1$s. %2$s"),
          level,
          content
        );
      }
    },
    transforms: transforms_default12,
    deprecated: deprecated_default21,
    merge(attributes2, attributesToMerge) {
      return {
        content: (attributes2.content || "") + (attributesToMerge.content || "")
      };
    },
    edit: edit_default16,
    save: save23,
    variations: variations_default9
  };
  if (window.__experimentalContentOnlyInspectorFields) {
    settings40[fieldsKey7] = [
      {
        id: "content",
        label: (0, import_i18n82.__)("Content"),
        type: "text",
        Edit: "rich-text"
        // TODO: replace with custom component
      }
    ];
    settings40[formKey7] = {
      fields: ["content"]
    };
  }
  var init40 = () => {
    const block = initBlock({ name: name40, metadata: block_default40, settings: settings40 });
    const levelOptions = (0, import_blocks35.getBlockType)(name40)?.attributes?.levelOptions?.default;
    if (levelOptions) {
      [1, 2, 3, 4, 5, 6].forEach((level) => {
        if (!levelOptions.includes(level)) {
          (0, import_blocks35.unregisterBlockVariation)(name40, `h${level}`);
        }
      });
    }
    return block;
  };

  // packages/block-library/build-module/home-link/index.mjs
  var home_link_exports = {};
  __export(home_link_exports, {
    init: () => init41,
    metadata: () => block_default41,
    name: () => name41,
    settings: () => settings41
  });
  var import_i18n84 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/home-link/block.json
  var block_default41 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/home-link",
    category: "design",
    parent: ["core/navigation"],
    title: "Home Link",
    description: "Create a link that always points to the homepage of the site. Usually not necessary if there is already a site title link present in the header.",
    textdomain: "default",
    attributes: {
      label: {
        type: "string",
        role: "content"
      }
    },
    usesContext: [
      "textColor",
      "customTextColor",
      "backgroundColor",
      "customBackgroundColor",
      "fontSize",
      "customFontSize",
      "style"
    ],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-home-link-editor",
    style: "wp-block-home-link"
  };

  // packages/block-library/build-module/home-link/edit.mjs
  var import_block_editor104 = __toESM(require_block_editor(), 1);
  var import_i18n83 = __toESM(require_i18n(), 1);
  var import_data42 = __toESM(require_data(), 1);
  var import_core_data21 = __toESM(require_core_data(), 1);
  var import_jsx_runtime266 = __toESM(require_jsx_runtime(), 1);
  var preventDefault = (event) => event.preventDefault();
  function HomeEdit({ attributes: attributes2, setAttributes, context }) {
    const homeUrl = (0, import_data42.useSelect)((select9) => {
      return select9(import_core_data21.store).getEntityRecord("root", "__unstableBase")?.home;
    }, []);
    const { textColor, backgroundColor, style: style2 } = context;
    const blockProps = (0, import_block_editor104.useBlockProps)({
      className: clsx_default("wp-block-navigation-item", {
        "has-text-color": !!textColor || !!style2?.color?.text,
        [`has-${textColor}-color`]: !!textColor,
        "has-background": !!backgroundColor || !!style2?.color?.background,
        [`has-${backgroundColor}-background-color`]: !!backgroundColor
      }),
      style: {
        color: style2?.color?.text,
        backgroundColor: style2?.color?.background
      }
    });
    return /* @__PURE__ */ (0, import_jsx_runtime266.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(
      "a",
      {
        className: "wp-block-home-link__content wp-block-navigation-item__content",
        href: homeUrl,
        onClick: preventDefault,
        children: /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(
          import_block_editor104.RichText,
          {
            identifier: "label",
            className: "wp-block-home-link__label",
            value: attributes2.label ?? (0, import_i18n83.__)("Home"),
            onChange: (labelValue) => {
              setAttributes({ label: labelValue });
            },
            "aria-label": (0, import_i18n83.__)("Home link text"),
            placeholder: (0, import_i18n83.__)("Add home link"),
            withoutInteractiveFormatting: true
          }
        )
      }
    ) });
  }

  // packages/block-library/build-module/home-link/save.mjs
  var import_block_editor105 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime267 = __toESM(require_jsx_runtime(), 1);
  function save24() {
    return /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(import_block_editor105.InnerBlocks.Content, {});
  }

  // packages/block-library/build-module/home-link/index.mjs
  var { name: name41 } = block_default41;
  var settings41 = {
    icon: home_default,
    edit: HomeEdit,
    save: save24,
    example: {
      attributes: {
        label: (0, import_i18n84._x)("Home Link", "block example")
      }
    }
  };
  var init41 = () => initBlock({ name: name41, metadata: block_default41, settings: settings41 });

  // packages/block-library/build-module/html/index.mjs
  var html_exports = {};
  __export(html_exports, {
    init: () => init42,
    metadata: () => block_default42,
    name: () => name42,
    settings: () => settings42
  });
  var import_i18n88 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/html/edit.mjs
  var import_i18n87 = __toESM(require_i18n(), 1);
  var import_element39 = __toESM(require_element(), 1);
  var import_block_editor108 = __toESM(require_block_editor(), 1);
  var import_components49 = __toESM(require_components(), 1);

  // packages/block-library/build-module/html/preview.mjs
  var import_element37 = __toESM(require_element(), 1);
  var import_block_editor106 = __toESM(require_block_editor(), 1);
  var import_components47 = __toESM(require_components(), 1);
  var import_data43 = __toESM(require_data(), 1);
  var import_i18n85 = __toESM(require_i18n(), 1);
  var import_jsx_runtime268 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_STYLES = `
	html,body,:root {
		margin: 0 !important;
		padding: 0 !important;
		overflow: visible !important;
		min-height: auto !important;
	}
`;
  function HTMLEditPreview({ content, isSelected }) {
    const settingStyles = (0, import_data43.useSelect)(
      (select9) => select9(import_block_editor106.store).getSettings().styles,
      []
    );
    const styles = (0, import_element37.useMemo)(
      () => [
        DEFAULT_STYLES,
        ...(0, import_block_editor106.transformStyles)(
          (settingStyles ?? []).filter((style2) => style2.css)
        )
      ],
      [settingStyles]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime268.jsxs)(import_jsx_runtime268.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
        import_components47.SandBox,
        {
          html: content,
          styles,
          title: (0, import_i18n85.__)("Custom HTML Preview"),
          tabIndex: -1
        }
      ),
      !isSelected && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)("div", { className: "block-library-html__preview-overlay" })
    ] });
  }

  // packages/block-library/build-module/html/modal.mjs
  var import_i18n86 = __toESM(require_i18n(), 1);
  var import_element38 = __toESM(require_element(), 1);
  var import_data44 = __toESM(require_data(), 1);
  var import_components48 = __toESM(require_components(), 1);
  var import_block_editor107 = __toESM(require_block_editor(), 1);
  var import_compose20 = __toESM(require_compose(), 1);

  // packages/block-library/build-module/html/utils.mjs
  function parseContent(content = "") {
    if (!content || !content.trim()) {
      return { html: "", css: "", js: "" };
    }
    const doc = document.implementation.createHTMLDocument("");
    doc.body.innerHTML = content;
    const styleTag = doc.body.querySelector(
      'style[data-wp-block-html="css"]'
    );
    const css = styleTag ? styleTag.textContent.trim() : "";
    if (styleTag) {
      styleTag.remove();
    }
    const scriptTag = doc.body.querySelector(
      'script[data-wp-block-html="js"]'
    );
    const js = scriptTag ? scriptTag.textContent.trim() : "";
    if (scriptTag) {
      scriptTag.remove();
    }
    const html = doc.body.innerHTML.trim();
    return { html, css, js };
  }
  function serializeContent({ html = "", css = "", js = "" }) {
    const parts = [];
    if (css.trim()) {
      parts.push(`<style data-wp-block-html="css">
${css}
</style>`);
    }
    if (js.trim()) {
      parts.push(`<script data-wp-block-html="js">
${js}
<\/script>`);
    }
    if (html.trim()) {
      parts.push(html);
    }
    return parts.join("\n\n");
  }

  // packages/block-library/build-module/html/modal.mjs
  var import_jsx_runtime269 = __toESM(require_jsx_runtime(), 1);
  var { Tabs } = unlock(import_components48.privateApis);
  function HTMLEditModal({
    isOpen,
    onRequestClose,
    content,
    setAttributes
  }) {
    const { html, css, js } = parseContent(content);
    const [editedHtml, setEditedHtml] = (0, import_element38.useState)(html);
    const [editedCss, setEditedCss] = (0, import_element38.useState)(css);
    const [editedJs, setEditedJs] = (0, import_element38.useState)(js);
    const [isFullscreen, setIsFullscreen] = (0, import_element38.useState)(false);
    const isMobileViewport = (0, import_compose20.useViewportMatch)("small", "<");
    const { canUserUseUnfilteredHTML } = (0, import_data44.useSelect)((select9) => {
      const settings122 = select9(import_block_editor107.store).getSettings();
      return {
        canUserUseUnfilteredHTML: settings122.__experimentalCanUserUseUnfilteredHTML
      };
    }, []);
    const hasRestrictedContent = !canUserUseUnfilteredHTML && (css.trim() || js.trim());
    if (!isOpen) {
      return null;
    }
    const handleUpdate = () => {
      setAttributes({
        content: serializeContent({
          html: editedHtml,
          css: canUserUseUnfilteredHTML ? editedCss : "",
          js: canUserUseUnfilteredHTML ? editedJs : ""
        })
      });
    };
    const handleUpdateAndClose = () => {
      handleUpdate();
      onRequestClose();
    };
    const toggleFullscreen = () => {
      setIsFullscreen((prevState) => !prevState);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(import_jsx_runtime269.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
      import_components48.Modal,
      {
        title: (0, import_i18n86.__)("Edit HTML"),
        onRequestClose,
        className: "block-library-html__modal",
        size: "large",
        isDismissible: false,
        shouldCloseOnClickOutside: false,
        isFullScreen: isFullscreen,
        __experimentalHideHeader: true,
        children: /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(Tabs, { orientation: "horizontal", defaultTabId: "html", children: /* @__PURE__ */ (0, import_jsx_runtime269.jsxs)(import_components48.__experimentalVStack, { expanded: true, children: [
          /* @__PURE__ */ (0, import_jsx_runtime269.jsxs)(
            import_components48.__experimentalHStack,
            {
              justify: "space-between",
              className: "block-library-html__modal-header",
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime269.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime269.jsxs)(Tabs.TabList, { children: [
                  /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(Tabs.Tab, { tabId: "html", children: "HTML" }),
                  canUserUseUnfilteredHTML && /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(Tabs.Tab, { tabId: "css", children: "CSS" }),
                  canUserUseUnfilteredHTML && /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(Tabs.Tab, { tabId: "js", children: (0, import_i18n86.__)("JavaScript") })
                ] }) }),
                !isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime269.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
                  import_components48.Button,
                  {
                    __next40pxDefaultSize: true,
                    icon: isFullscreen ? square_default : fullscreen_default,
                    label: (0, import_i18n86.__)(
                      "Enable/disable fullscreen"
                    ),
                    onClick: toggleFullscreen,
                    variant: "tertiary"
                  }
                ) })
              ]
            }
          ),
          hasRestrictedContent && /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
            import_components48.Notice,
            {
              status: "warning",
              isDismissible: false,
              className: "block-library-html__modal-notice",
              children: (0, import_i18n86.__)(
                "This block contains CSS or JavaScript that will be removed when you save because you do not have permission to use unfiltered HTML."
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime269.jsxs)(
            import_components48.Flex,
            {
              direction: isMobileViewport ? "column" : "row",
              className: "block-library-html__modal-tabs",
              align: "stretch",
              gap: 8,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime269.jsxs)("div", { className: "block-library-html__modal-content", children: [
                  /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
                    Tabs.TabPanel,
                    {
                      tabId: "html",
                      focusable: false,
                      className: "block-library-html__modal-tab",
                      children: /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
                        import_block_editor107.PlainText,
                        {
                          value: editedHtml,
                          onChange: setEditedHtml,
                          placeholder: (0, import_i18n86.__)("Write HTML\u2026"),
                          "aria-label": (0, import_i18n86.__)("HTML"),
                          className: "block-library-html__modal-editor"
                        }
                      )
                    }
                  ),
                  canUserUseUnfilteredHTML && /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
                    Tabs.TabPanel,
                    {
                      tabId: "css",
                      focusable: false,
                      className: "block-library-html__modal-tab",
                      children: /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
                        import_block_editor107.PlainText,
                        {
                          value: editedCss,
                          onChange: setEditedCss,
                          placeholder: (0, import_i18n86.__)("Write CSS\u2026"),
                          "aria-label": (0, import_i18n86.__)("CSS"),
                          className: "block-library-html__modal-editor"
                        }
                      )
                    }
                  ),
                  canUserUseUnfilteredHTML && /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
                    Tabs.TabPanel,
                    {
                      tabId: "js",
                      focusable: false,
                      className: "block-library-html__modal-tab",
                      children: /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
                        import_block_editor107.PlainText,
                        {
                          value: editedJs,
                          onChange: setEditedJs,
                          placeholder: (0, import_i18n86.__)(
                            "Write JavaScript\u2026"
                          ),
                          "aria-label": (0, import_i18n86.__)("JavaScript"),
                          className: "block-library-html__modal-editor"
                        }
                      )
                    }
                  )
                ] }),
                /* @__PURE__ */ (0, import_jsx_runtime269.jsx)("div", { className: "block-library-html__preview", children: /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
                  HTMLEditPreview,
                  {
                    content: serializeContent({
                      html: editedHtml,
                      css: editedCss,
                      js: editedJs
                    })
                  }
                ) })
              ]
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime269.jsxs)(
            import_components48.__experimentalHStack,
            {
              alignment: "center",
              justify: "flex-end",
              spacing: 4,
              className: "block-library-html__modal-footer",
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
                  import_components48.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "tertiary",
                    onClick: onRequestClose,
                    children: (0, import_i18n86.__)("Cancel")
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
                  import_components48.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "primary",
                    onClick: handleUpdateAndClose,
                    children: (0, import_i18n86.__)("Update")
                  }
                )
              ]
            }
          )
        ] }) })
      }
    ) });
  }

  // packages/block-library/build-module/html/edit.mjs
  var import_jsx_runtime270 = __toESM(require_jsx_runtime(), 1);
  function HTMLEdit({ attributes: attributes2, setAttributes, isSelected }) {
    const [isModalOpen, setIsModalOpen] = (0, import_element39.useState)(false);
    const blockProps = (0, import_block_editor108.useBlockProps)({
      className: "block-library-html__edit"
    });
    if (!attributes2.content?.trim()) {
      return /* @__PURE__ */ (0, import_jsx_runtime270.jsxs)("div", { ...blockProps, children: [
        /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
          import_components49.Placeholder,
          {
            icon: /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(import_block_editor108.BlockIcon, { icon: code_default }),
            label: (0, import_i18n87.__)("Custom HTML"),
            instructions: (0, import_i18n87.__)(
              "Add custom HTML code and preview how it looks."
            ),
            children: /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
              import_components49.Button,
              {
                __next40pxDefaultSize: true,
                variant: "primary",
                onClick: () => setIsModalOpen(true),
                children: (0, import_i18n87.__)("Edit HTML")
              }
            )
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
          HTMLEditModal,
          {
            isOpen: isModalOpen,
            onRequestClose: () => setIsModalOpen(false),
            content: attributes2.content,
            setAttributes
          }
        )
      ] });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime270.jsxs)("div", { ...blockProps, children: [
      /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(import_block_editor108.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(import_components49.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(import_components49.ToolbarButton, { onClick: () => setIsModalOpen(true), children: (0, import_i18n87.__)("Edit code") }) }) }),
      /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(import_block_editor108.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
        import_components49.__experimentalVStack,
        {
          className: "block-editor-block-inspector-edit-contents",
          expanded: true,
          children: /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
            import_components49.Button,
            {
              className: "block-editor-block-inspector-edit-contents__button",
              __next40pxDefaultSize: true,
              variant: "secondary",
              onClick: () => setIsModalOpen(true),
              children: (0, import_i18n87.__)("Edit code")
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(HTMLEditPreview, { content: attributes2.content, isSelected }),
      /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
        HTMLEditModal,
        {
          isOpen: isModalOpen,
          onRequestClose: () => setIsModalOpen(false),
          content: attributes2.content,
          setAttributes
        }
      )
    ] });
  }

  // packages/block-library/build-module/html/block.json
  var block_default42 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/html",
    title: "Custom HTML",
    category: "widgets",
    description: "Add custom HTML code and preview it as you edit.",
    keywords: ["embed"],
    textdomain: "default",
    attributes: {
      content: {
        type: "string",
        source: "raw",
        role: "content"
      }
    },
    supports: {
      customClassName: false,
      className: false,
      html: false,
      interactivity: {
        clientNavigation: true
      },
      customCSS: false,
      visibility: false
    },
    editorStyle: "wp-block-html-editor"
  };

  // packages/block-library/build-module/html/save.mjs
  var import_element40 = __toESM(require_element(), 1);
  var import_jsx_runtime271 = __toESM(require_jsx_runtime(), 1);
  function save25({ attributes: attributes2 }) {
    return /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(import_element40.RawHTML, { children: attributes2.content });
  }

  // packages/block-library/build-module/html/transforms.mjs
  var import_blocks36 = __toESM(require_blocks(), 1);
  var import_rich_text3 = __toESM(require_rich_text(), 1);
  var transforms12 = {
    from: [
      {
        type: "block",
        blocks: ["core/code"],
        transform: ({ content: html }) => {
          return (0, import_blocks36.createBlock)("core/html", {
            // The code block may output HTML formatting, so convert it
            // to plain text.
            content: (0, import_rich_text3.create)({ html }).text
          });
        }
      }
    ]
  };
  var transforms_default13 = transforms12;

  // packages/block-library/build-module/html/index.mjs
  var { name: name42 } = block_default42;
  var settings42 = {
    icon: html_default,
    example: {
      attributes: {
        content: "<marquee>" + (0, import_i18n88.__)("Welcome to the wonderful world of blocks\u2026") + "</marquee>"
      }
    },
    edit: HTMLEdit,
    save: save25,
    transforms: transforms_default13
  };
  var init42 = () => initBlock({ name: name42, metadata: block_default42, settings: settings42 });

  // packages/block-library/build-module/icon/index.mjs
  var icon_exports = {};
  __export(icon_exports, {
    init: () => init43,
    metadata: () => block_default43,
    name: () => name43,
    settings: () => settings43
  });

  // packages/block-library/build-module/icon/edit.mjs
  var import_i18n91 = __toESM(require_i18n(), 1);
  var import_components52 = __toESM(require_components(), 1);
  var import_block_editor109 = __toESM(require_block_editor(), 1);
  var import_element42 = __toESM(require_element(), 1);
  var import_primitives162 = __toESM(require_primitives(), 1);
  var import_data45 = __toESM(require_data(), 1);
  var import_core_data22 = __toESM(require_core_data(), 1);

  // packages/block-library/build-module/icon/components/custom-inserter/index.mjs
  var import_i18n90 = __toESM(require_i18n(), 1);
  var import_components51 = __toESM(require_components(), 1);
  var import_element41 = __toESM(require_element(), 1);
  var import_compose21 = __toESM(require_compose(), 1);

  // packages/block-library/build-module/icon/components/custom-inserter/icon-grid.mjs
  var import_i18n89 = __toESM(require_i18n(), 1);
  var import_components50 = __toESM(require_components(), 1);
  var import_jsx_runtime272 = __toESM(require_jsx_runtime(), 1);
  function IconGrid({ icons, onChange, attributes: attributes2 }) {
    return /* @__PURE__ */ (0, import_jsx_runtime272.jsx)("div", { className: "wp-block-icon__inserter-grid", children: !icons?.length ? /* @__PURE__ */ (0, import_jsx_runtime272.jsx)("div", { className: "wp-block-icon__inserter-grid-no-results", children: /* @__PURE__ */ (0, import_jsx_runtime272.jsx)("p", { children: (0, import_i18n89.__)("No results found.") }) }) : /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(
      "div",
      {
        className: "wp-block-icon__inserter-grid-icons-list",
        "aria-label": (0, import_i18n89.__)("Icon library"),
        children: icons.map((icon4) => {
          return /* @__PURE__ */ (0, import_jsx_runtime272.jsxs)(
            import_components50.Button,
            {
              className: "wp-block-icon__inserter-grid-icons-list-item",
              onClick: () => onChange(icon4.name),
              variant: icon4.name === attributes2?.icon ? "primary" : void 0,
              __next40pxDefaultSize: true,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime272.jsx)("span", { className: "wp-block-icon__inserter-grid-icons-list-item-icon", children: /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(
                  html_renderer_default,
                  {
                    html: icon4.content,
                    wrapperProps: {
                      style: { width: "24px" }
                    }
                  }
                ) }),
                /* @__PURE__ */ (0, import_jsx_runtime272.jsx)("span", { className: "wp-block-icon__inserter-grid-icons-list-item-title", children: icon4.label })
              ]
            },
            icon4.name
          );
        })
      }
    ) });
  }

  // packages/block-library/build-module/utils/search-patterns.mjs
  var import_remove_accents4 = __toESM(require_remove_accents(), 1);
  function normalizeSearchInput(input = "") {
    input = (0, import_remove_accents4.default)(input);
    input = input.trim().toLowerCase();
    return input;
  }
  function getPatternSearchRank(pattern, searchValue) {
    const normalizedSearchValue = normalizeSearchInput(searchValue);
    const normalizedTitle = normalizeSearchInput(pattern.title);
    let rank = 0;
    if (normalizedSearchValue === normalizedTitle) {
      rank += 30;
    } else if (normalizedTitle.startsWith(normalizedSearchValue)) {
      rank += 20;
    } else {
      const searchTerms = normalizedSearchValue.split(" ");
      const hasMatchedTerms = searchTerms.every(
        (searchTerm) => normalizedTitle.includes(searchTerm)
      );
      if (hasMatchedTerms) {
        rank += 10;
      }
    }
    return rank;
  }
  function searchPatterns(patterns = [], searchValue = "") {
    if (!searchValue) {
      return patterns;
    }
    const rankedPatterns = patterns.map((pattern) => {
      return [pattern, getPatternSearchRank(pattern, searchValue)];
    }).filter(([, rank]) => rank > 0);
    rankedPatterns.sort(([, rank1], [, rank2]) => rank2 - rank1);
    return rankedPatterns.map(([pattern]) => pattern);
  }

  // packages/block-library/build-module/icon/components/custom-inserter/index.mjs
  var import_jsx_runtime273 = __toESM(require_jsx_runtime(), 1);
  function CustomInserterModal({
    icons = [],
    setInserterOpen,
    attributes: attributes2,
    setAttributes
  }) {
    const [searchInput, setSearchInput] = (0, import_element41.useState)("");
    const debouncedSetSearchInput = (0, import_compose21.useDebounce)(setSearchInput, 300);
    const setIcon = (0, import_element41.useCallback)(
      (name123) => {
        setAttributes({
          icon: name123
        });
        setInserterOpen(false);
      },
      [setAttributes, setInserterOpen]
    );
    const filteredIcons = (0, import_element41.useMemo)(() => {
      if (searchInput) {
        const input = normalizeSearchInput(searchInput);
        return icons.filter((icon4) => {
          const iconName = normalizeSearchInput(icon4.name);
          const iconLabel = normalizeSearchInput(icon4.label);
          return iconName.includes(input) || iconLabel.includes(input);
        });
      }
      return icons;
    }, [searchInput, icons]);
    return /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
      import_components51.Modal,
      {
        className: "wp-block-icon__inserter-modal",
        title: (0, import_i18n90.__)("Icon library"),
        onRequestClose: () => setInserterOpen(false),
        isFullScreen: true,
        children: /* @__PURE__ */ (0, import_jsx_runtime273.jsxs)("div", { className: "wp-block-icon__inserter", children: [
          /* @__PURE__ */ (0, import_jsx_runtime273.jsx)("div", { className: "wp-block-icon__inserter-header", children: /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
            import_components51.SearchControl,
            {
              value: searchInput,
              onChange: debouncedSetSearchInput
            }
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
            IconGrid,
            {
              icons: filteredIcons,
              onChange: setIcon,
              attributes: attributes2
            }
          )
        ] })
      }
    );
  }

  // packages/block-library/build-module/icon/edit.mjs
  var import_jsx_runtime274 = __toESM(require_jsx_runtime(), 1);
  var IconPlaceholder = ({ className, style: style2 }) => /* @__PURE__ */ (0, import_jsx_runtime274.jsxs)(
    import_primitives162.SVG,
    {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 60 60",
      preserveAspectRatio: "none",
      fill: "none",
      "aria-hidden": "true",
      className: clsx_default("wp-block-icon__placeholder", className),
      style: style2,
      children: [
        /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(import_primitives162.Rect, { width: "60", height: "60", fill: "currentColor", fillOpacity: 0.1 }),
        /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
          import_primitives162.Path,
          {
            vectorEffect: "non-scaling-stroke",
            stroke: "currentColor",
            strokeOpacity: 0.25,
            d: "M60 60 0 0"
          }
        )
      ]
    }
  );
  function Edit16({ attributes: attributes2, setAttributes }) {
    const { icon: icon4, ariaLabel } = attributes2;
    const [isInserterOpen, setInserterOpen] = (0, import_element42.useState)(false);
    const isContentOnlyMode = (0, import_block_editor109.useBlockEditingMode)() === "contentOnly";
    const colorProps = (0, import_block_editor109.__experimentalUseColorProps)(attributes2);
    const spacingProps = (0, import_block_editor109.__experimentalGetSpacingClassesAndStyles)(attributes2);
    const borderProps = (0, import_block_editor109.__experimentalUseBorderProps)(attributes2);
    const dimensionsProps = (0, import_block_editor109.getDimensionsClassesAndStyles)(attributes2);
    const { selectedIcon, allIcons = [] } = (0, import_data45.useSelect)(
      (select9) => {
        const { getEntityRecord, getEntityRecords } = select9(import_core_data22.store);
        return {
          selectedIcon: icon4 ? getEntityRecord("root", "icon", icon4) : null,
          allIcons: isInserterOpen ? getEntityRecords("root", "icon", {
            per_page: -1
          }) : void 0
        };
      },
      [isInserterOpen, icon4]
    );
    const iconToDisplay = selectedIcon?.content || "";
    const blockControls = /* @__PURE__ */ (0, import_jsx_runtime274.jsxs)(import_jsx_runtime274.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(import_block_editor109.BlockControls, { group: isContentOnlyMode ? "inline" : "other", children: /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
        import_components52.ToolbarButton,
        {
          onClick: () => {
            setInserterOpen(true);
          },
          children: icon4 ? (0, import_i18n91.__)("Replace") : (0, import_i18n91.__)("Choose icon")
        }
      ) }),
      isContentOnlyMode && icon4 && // Add some extra controls for content attributes when content only mode is active.
      // With content only mode active, the inspector is hidden, so users need another way
      // to edit these attributes.
      /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(import_block_editor109.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(import_components52.ToolbarGroup, { className: "components-toolbar-group", children: /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
        import_components52.DropdownMenu,
        {
          icon: "",
          popoverProps: {
            className: "is-alternate"
          },
          text: (0, import_i18n91.__)("Label"),
          children: () => /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
            import_components52.TextControl,
            {
              className: "wp-block-icon__toolbar-content",
              label: (0, import_i18n91.__)("Label"),
              value: ariaLabel || "",
              onChange: (value) => setAttributes({ ariaLabel: value }),
              help: (0, import_i18n91.__)(
                "Briefly describe the icon to help screen reader users. Leave blank for decorative icons."
              ),
              __next40pxDefaultSize: true
            }
          )
        }
      ) }) })
    ] });
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const inspectorControls = icon4 && /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(import_jsx_runtime274.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(import_block_editor109.InspectorControls, { group: "settings", children: /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
      import_components52.__experimentalToolsPanel,
      {
        label: (0, import_i18n91.__)("Settings"),
        resetAll: () => setAttributes({
          ariaLabel: void 0
        }),
        dropdownMenuProps,
        children: /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
          import_components52.__experimentalToolsPanelItem,
          {
            label: (0, import_i18n91.__)("Label"),
            isShownByDefault: true,
            hasValue: () => !!ariaLabel,
            onDeselect: () => setAttributes({ ariaLabel: void 0 }),
            children: /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
              import_components52.TextControl,
              {
                label: (0, import_i18n91.__)("Label"),
                help: (0, import_i18n91.__)(
                  "Briefly describe the icon to help screen reader users. Leave blank for decorative icons."
                ),
                value: ariaLabel || "",
                onChange: (value) => setAttributes({ ariaLabel: value }),
                __next40pxDefaultSize: true
              }
            )
          }
        )
      }
    ) }) });
    return /* @__PURE__ */ (0, import_jsx_runtime274.jsxs)(import_jsx_runtime274.Fragment, { children: [
      blockControls,
      inspectorControls,
      /* @__PURE__ */ (0, import_jsx_runtime274.jsx)("div", { ...(0, import_block_editor109.useBlockProps)(), children: icon4 ? /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
        html_renderer_default,
        {
          html: iconToDisplay,
          wrapperProps: {
            className: clsx_default(
              colorProps.className,
              borderProps.className,
              spacingProps.className,
              dimensionsProps.className
            ),
            style: {
              ...colorProps.style,
              ...borderProps.style,
              ...spacingProps.style,
              ...dimensionsProps.style
            }
          }
        }
      ) : /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
        IconPlaceholder,
        {
          className: clsx_default(
            borderProps.className,
            spacingProps.className,
            dimensionsProps.className
          ),
          style: {
            ...borderProps.style,
            ...spacingProps.style,
            ...dimensionsProps.style,
            height: "auto"
          }
        }
      ) }),
      isInserterOpen && /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
        CustomInserterModal,
        {
          icons: allIcons,
          setInserterOpen,
          attributes: attributes2,
          setAttributes
        }
      )
    ] });
  }
  var edit_default17 = Edit16;

  // packages/block-library/build-module/icon/block.json
  var block_default43 = {
    apiVersion: 3,
    $schema: "https://schemas.wp.org/trunk/block.json",
    name: "core/icon",
    title: "Icon",
    category: "media",
    description: "Insert an SVG icon.",
    keywords: ["icon", "svg"],
    textdomain: "default",
    attributes: {
      icon: {
        type: "string",
        role: "content"
      }
    },
    supports: {
      anchor: true,
      ariaLabel: {
        __experimentalSkipSerialization: true
      },
      align: ["left", "center", "right"],
      html: false,
      color: {
        background: true,
        text: true,
        __experimentalSkipSerialization: true
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          color: false,
          radius: false,
          style: false,
          width: false
        }
      },
      spacing: {
        padding: true,
        margin: true,
        __experimentalSkipSerialization: ["padding"],
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      dimensions: {
        width: true,
        __experimentalSkipSerialization: ["width"],
        __experimentalDefaultControls: {
          width: true
        }
      }
    },
    selectors: {
      root: ".wp-block-icon svg",
      css: ".wp-block-icon",
      spacing: {
        margin: ".wp-block-icon"
      }
    },
    style: "wp-block-icon",
    editorStyle: "wp-block-icon-editor"
  };

  // packages/block-library/build-module/icon/icon.mjs
  var import_components54 = __toESM(require_components(), 1);
  var import_jsx_runtime275 = __toESM(require_jsx_runtime(), 1);
  var icon3 = /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components54.SVG, { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components54.Path, { d: "M6 9.5h3.5V6H6v3.5Zm5 .5a1 1 0 0 1-.898.995L10 11H5.5l-.103-.005a1 1 0 0 1-.892-.893L4.5 10V5.5a1 1 0 0 1 1-1H10a1 1 0 0 1 1 1V10ZM18.25 7.75a2 2 0 1 0-4 0 2 2 0 0 0 4 0Zm1.5 0a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0ZM6.88 13.535a1 1 0 0 1 1.74 0l2.534 4.472a1 1 0 0 1-.87 1.493H5.216a1 1 0 0 1-.87-1.493l2.534-4.472ZM6.074 18h3.352L7.75 15.041l-1.676 2.96ZM14.952 13h2.596a1 1 0 0 1 .866.5l1.298 2.25a1 1 0 0 1 0 1L18.414 19l-.074.11a1 1 0 0 1-.792.39h-2.596a1 1 0 0 1-.792-.39l-.074-.11-1.298-2.25a1.001 1.001 0 0 1 0-1l1.298-2.25a1 1 0 0 1 .866-.5Zm-.72 3.25 1.01 1.75h2.017l1.009-1.75-1.01-1.75h-2.017l-1.01 1.75Z" }) });
  var icon_default2 = icon3;

  // packages/block-library/build-module/icon/index.mjs
  var { name: name43 } = block_default43;
  var settings43 = {
    icon: icon_default2,
    example: {
      attributes: {
        icon: "core/audio",
        style: {
          dimensions: {
            width: "48px"
          }
        }
      }
    },
    edit: edit_default17
  };
  var init43 = () => initBlock({ name: name43, metadata: block_default43, settings: settings43 });

  // packages/block-library/build-module/image/index.mjs
  var image_exports = {};
  __export(image_exports, {
    init: () => init44,
    metadata: () => block_default44,
    name: () => name44,
    settings: () => settings44
  });
  var import_i18n95 = __toESM(require_i18n(), 1);
  var import_blocks40 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/image/deprecated.mjs
  var import_block_editor110 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime276 = __toESM(require_jsx_runtime(), 1);
  var v119 = {
    attributes: {
      url: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "src"
      },
      alt: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "alt",
        default: ""
      },
      caption: {
        type: "array",
        source: "children",
        selector: "figcaption"
      },
      href: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "href"
      },
      id: {
        type: "number"
      },
      align: {
        type: "string"
      },
      width: {
        type: "number"
      },
      height: {
        type: "number"
      }
    },
    save({ attributes: attributes2 }) {
      const { url, alt, caption, align, href, width, height } = attributes2;
      const extraImageProps = width || height ? { width, height } : {};
      const image = /* @__PURE__ */ (0, import_jsx_runtime276.jsx)("img", { src: url, alt, ...extraImageProps });
      let figureStyle = {};
      if (width) {
        figureStyle = { width };
      } else if (align === "left" || align === "right") {
        figureStyle = { maxWidth: "50%" };
      }
      return /* @__PURE__ */ (0, import_jsx_runtime276.jsxs)(
        "figure",
        {
          className: align ? `align${align}` : null,
          style: figureStyle,
          children: [
            href ? /* @__PURE__ */ (0, import_jsx_runtime276.jsx)("a", { href, children: image }) : image,
            !import_block_editor110.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(import_block_editor110.RichText.Content, { tagName: "figcaption", value: caption })
          ]
        }
      );
    }
  };
  var v210 = {
    attributes: {
      url: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "src"
      },
      alt: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "alt",
        default: ""
      },
      caption: {
        type: "array",
        source: "children",
        selector: "figcaption"
      },
      href: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "href"
      },
      id: {
        type: "number"
      },
      align: {
        type: "string"
      },
      width: {
        type: "number"
      },
      height: {
        type: "number"
      }
    },
    save({ attributes: attributes2 }) {
      const { url, alt, caption, align, href, width, height, id } = attributes2;
      const image = /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
        "img",
        {
          src: url,
          alt,
          className: id ? `wp-image-${id}` : null,
          width,
          height
        }
      );
      return /* @__PURE__ */ (0, import_jsx_runtime276.jsxs)("figure", { className: align ? `align${align}` : null, children: [
        href ? /* @__PURE__ */ (0, import_jsx_runtime276.jsx)("a", { href, children: image }) : image,
        !import_block_editor110.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(import_block_editor110.RichText.Content, { tagName: "figcaption", value: caption })
      ] });
    }
  };
  var v35 = {
    attributes: {
      url: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "src"
      },
      alt: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "alt",
        default: ""
      },
      caption: {
        type: "array",
        source: "children",
        selector: "figcaption"
      },
      href: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "href"
      },
      id: {
        type: "number"
      },
      align: {
        type: "string"
      },
      width: {
        type: "number"
      },
      height: {
        type: "number"
      },
      linkDestination: {
        type: "string",
        default: "none"
      }
    },
    save({ attributes: attributes2 }) {
      const { url, alt, caption, align, href, width, height, id } = attributes2;
      const classes = clsx_default({
        [`align${align}`]: align,
        "is-resized": width || height
      });
      const image = /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
        "img",
        {
          src: url,
          alt,
          className: id ? `wp-image-${id}` : null,
          width,
          height
        }
      );
      return /* @__PURE__ */ (0, import_jsx_runtime276.jsxs)("figure", { className: classes, children: [
        href ? /* @__PURE__ */ (0, import_jsx_runtime276.jsx)("a", { href, children: image }) : image,
        !import_block_editor110.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(import_block_editor110.RichText.Content, { tagName: "figcaption", value: caption })
      ] });
    }
  };
  var v44 = {
    attributes: {
      align: {
        type: "string"
      },
      url: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "src"
      },
      alt: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "alt",
        default: ""
      },
      caption: {
        type: "string",
        source: "html",
        selector: "figcaption"
      },
      title: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "title"
      },
      href: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "href"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "rel"
      },
      linkClass: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "class"
      },
      id: {
        type: "number"
      },
      width: {
        type: "number"
      },
      height: {
        type: "number"
      },
      sizeSlug: {
        type: "string"
      },
      linkDestination: {
        type: "string"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "target"
      }
    },
    supports: {
      anchor: true
    },
    save({ attributes: attributes2 }) {
      const {
        url,
        alt,
        caption,
        align,
        href,
        rel,
        linkClass,
        width,
        height,
        id,
        linkTarget,
        sizeSlug,
        title
      } = attributes2;
      const newRel = !rel ? void 0 : rel;
      const classes = clsx_default({
        [`align${align}`]: align,
        [`size-${sizeSlug}`]: sizeSlug,
        "is-resized": width || height
      });
      const image = /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
        "img",
        {
          src: url,
          alt,
          className: id ? `wp-image-${id}` : null,
          width,
          height,
          title
        }
      );
      const figure = /* @__PURE__ */ (0, import_jsx_runtime276.jsxs)(import_jsx_runtime276.Fragment, { children: [
        href ? /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
          "a",
          {
            className: linkClass,
            href,
            target: linkTarget,
            rel: newRel,
            children: image
          }
        ) : image,
        !import_block_editor110.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(import_block_editor110.RichText.Content, { tagName: "figcaption", value: caption })
      ] });
      if ("left" === align || "right" === align || "center" === align) {
        return /* @__PURE__ */ (0, import_jsx_runtime276.jsx)("div", { ...import_block_editor110.useBlockProps.save(), children: /* @__PURE__ */ (0, import_jsx_runtime276.jsx)("figure", { className: classes, children: figure }) });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime276.jsx)("figure", { ...import_block_editor110.useBlockProps.save({ className: classes }), children: figure });
    }
  };
  var v54 = {
    attributes: {
      align: {
        type: "string"
      },
      url: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "src"
      },
      alt: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "alt",
        default: ""
      },
      caption: {
        type: "string",
        source: "html",
        selector: "figcaption"
      },
      title: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "title"
      },
      href: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "href"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "rel"
      },
      linkClass: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "class"
      },
      id: {
        type: "number"
      },
      width: {
        type: "number"
      },
      height: {
        type: "number"
      },
      sizeSlug: {
        type: "string"
      },
      linkDestination: {
        type: "string"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "target"
      }
    },
    supports: {
      anchor: true,
      color: {
        __experimentalDuotone: "img",
        text: false,
        background: false
      },
      __experimentalBorder: {
        radius: true,
        __experimentalDefaultControls: {
          radius: true
        }
      },
      __experimentalStyle: {
        spacing: {
          margin: "0 0 1em 0"
        }
      }
    },
    save({ attributes: attributes2 }) {
      const {
        url,
        alt,
        caption,
        align,
        href,
        rel,
        linkClass,
        width,
        height,
        id,
        linkTarget,
        sizeSlug,
        title
      } = attributes2;
      const newRel = !rel ? void 0 : rel;
      const classes = clsx_default({
        [`align${align}`]: align,
        [`size-${sizeSlug}`]: sizeSlug,
        "is-resized": width || height
      });
      const image = /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
        "img",
        {
          src: url,
          alt,
          className: id ? `wp-image-${id}` : null,
          width,
          height,
          title
        }
      );
      const figure = /* @__PURE__ */ (0, import_jsx_runtime276.jsxs)(import_jsx_runtime276.Fragment, { children: [
        href ? /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
          "a",
          {
            className: linkClass,
            href,
            target: linkTarget,
            rel: newRel,
            children: image
          }
        ) : image,
        !import_block_editor110.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(import_block_editor110.RichText.Content, { tagName: "figcaption", value: caption })
      ] });
      return /* @__PURE__ */ (0, import_jsx_runtime276.jsx)("figure", { ...import_block_editor110.useBlockProps.save({ className: classes }), children: figure });
    }
  };
  var v64 = {
    attributes: {
      align: {
        type: "string"
      },
      url: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "src",
        role: "content"
      },
      alt: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "alt",
        default: "",
        role: "content"
      },
      caption: {
        type: "string",
        source: "html",
        selector: "figcaption",
        role: "content"
      },
      title: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "title",
        role: "content"
      },
      href: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "href",
        role: "content"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "rel"
      },
      linkClass: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "class"
      },
      id: {
        type: "number",
        role: "content"
      },
      width: {
        type: "number"
      },
      height: {
        type: "number"
      },
      aspectRatio: {
        type: "string"
      },
      scale: {
        type: "string"
      },
      sizeSlug: {
        type: "string"
      },
      linkDestination: {
        type: "string"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "target"
      }
    },
    supports: {
      anchor: true,
      color: {
        text: false,
        background: false
      },
      filter: {
        duotone: true
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        width: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          width: true
        }
      }
    },
    migrate(attributes2) {
      const { height, width } = attributes2;
      return {
        ...attributes2,
        width: typeof width === "number" ? `${width}px` : width,
        height: typeof height === "number" ? `${height}px` : height
      };
    },
    save({ attributes: attributes2 }) {
      const {
        url,
        alt,
        caption,
        align,
        href,
        rel,
        linkClass,
        width,
        height,
        aspectRatio,
        scale,
        id,
        linkTarget,
        sizeSlug,
        title
      } = attributes2;
      const newRel = !rel ? void 0 : rel;
      const borderProps = (0, import_block_editor110.__experimentalGetBorderClassesAndStyles)(attributes2);
      const classes = clsx_default({
        [`align${align}`]: align,
        [`size-${sizeSlug}`]: sizeSlug,
        "is-resized": width || height,
        "has-custom-border": !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
      });
      const imageClasses = clsx_default(borderProps.className, {
        [`wp-image-${id}`]: !!id
      });
      const image = /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
        "img",
        {
          src: url,
          alt,
          className: imageClasses || void 0,
          style: {
            ...borderProps.style,
            aspectRatio,
            objectFit: scale
          },
          width,
          height,
          title
        }
      );
      const figure = /* @__PURE__ */ (0, import_jsx_runtime276.jsxs)(import_jsx_runtime276.Fragment, { children: [
        href ? /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
          "a",
          {
            className: linkClass,
            href,
            target: linkTarget,
            rel: newRel,
            children: image
          }
        ) : image,
        !import_block_editor110.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
          import_block_editor110.RichText.Content,
          {
            className: (0, import_block_editor110.__experimentalGetElementClassName)(
              "caption"
            ),
            tagName: "figcaption",
            value: caption
          }
        )
      ] });
      return /* @__PURE__ */ (0, import_jsx_runtime276.jsx)("figure", { ...import_block_editor110.useBlockProps.save({ className: classes }), children: figure });
    }
  };
  var v73 = {
    attributes: {
      align: {
        type: "string"
      },
      url: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "src",
        role: "content"
      },
      alt: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "alt",
        default: "",
        role: "content"
      },
      caption: {
        type: "string",
        source: "html",
        selector: "figcaption",
        role: "content"
      },
      title: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "title",
        role: "content"
      },
      href: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "href",
        role: "content"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "rel"
      },
      linkClass: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "class"
      },
      id: {
        type: "number",
        role: "content"
      },
      width: {
        type: "number"
      },
      height: {
        type: "number"
      },
      aspectRatio: {
        type: "string"
      },
      scale: {
        type: "string"
      },
      sizeSlug: {
        type: "string"
      },
      linkDestination: {
        type: "string"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "target"
      }
    },
    supports: {
      anchor: true,
      color: {
        text: false,
        background: false
      },
      filter: {
        duotone: true
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        width: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          width: true
        }
      }
    },
    migrate({ width, height, ...attributes2 }) {
      return {
        ...attributes2,
        width: `${width}px`,
        height: `${height}px`
      };
    },
    save({ attributes: attributes2 }) {
      const {
        url,
        alt,
        caption,
        align,
        href,
        rel,
        linkClass,
        width,
        height,
        aspectRatio,
        scale,
        id,
        linkTarget,
        sizeSlug,
        title
      } = attributes2;
      const newRel = !rel ? void 0 : rel;
      const borderProps = (0, import_block_editor110.__experimentalGetBorderClassesAndStyles)(attributes2);
      const classes = clsx_default({
        [`align${align}`]: align,
        [`size-${sizeSlug}`]: sizeSlug,
        "is-resized": width || height,
        "has-custom-border": !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
      });
      const imageClasses = clsx_default(borderProps.className, {
        [`wp-image-${id}`]: !!id
      });
      const image = /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
        "img",
        {
          src: url,
          alt,
          className: imageClasses || void 0,
          style: {
            ...borderProps.style,
            aspectRatio,
            objectFit: scale,
            width,
            height
          },
          width,
          height,
          title
        }
      );
      const figure = /* @__PURE__ */ (0, import_jsx_runtime276.jsxs)(import_jsx_runtime276.Fragment, { children: [
        href ? /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
          "a",
          {
            className: linkClass,
            href,
            target: linkTarget,
            rel: newRel,
            children: image
          }
        ) : image,
        !import_block_editor110.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
          import_block_editor110.RichText.Content,
          {
            className: (0, import_block_editor110.__experimentalGetElementClassName)(
              "caption"
            ),
            tagName: "figcaption",
            value: caption
          }
        )
      ] });
      return /* @__PURE__ */ (0, import_jsx_runtime276.jsx)("figure", { ...import_block_editor110.useBlockProps.save({ className: classes }), children: figure });
    }
  };
  var v82 = {
    attributes: {
      align: {
        type: "string"
      },
      behaviors: {
        type: "object"
      },
      url: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "src",
        role: "content"
      },
      alt: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "alt",
        default: "",
        role: "content"
      },
      caption: {
        type: "string",
        source: "html",
        selector: "figcaption",
        role: "content"
      },
      title: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "title",
        role: "content"
      },
      href: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "href",
        role: "content"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "rel"
      },
      linkClass: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "class"
      },
      id: {
        type: "number",
        role: "content"
      },
      width: {
        type: "string"
      },
      height: {
        type: "string"
      },
      aspectRatio: {
        type: "string"
      },
      scale: {
        type: "string"
      },
      sizeSlug: {
        type: "string"
      },
      linkDestination: {
        type: "string"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "target"
      }
    },
    supports: {
      anchor: true,
      color: {
        text: false,
        background: false
      },
      filter: {
        duotone: true
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        width: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          width: true
        }
      }
    },
    migrate({ width, height, ...attributes2 }) {
      if (!attributes2.behaviors?.lightbox) {
        return attributes2;
      }
      const {
        behaviors: {
          lightbox: { enabled }
        }
      } = attributes2;
      const newAttributes = {
        ...attributes2,
        lightbox: {
          enabled
        }
      };
      delete newAttributes.behaviors;
      return newAttributes;
    },
    isEligible(attributes2) {
      return !!attributes2.behaviors;
    },
    save({ attributes: attributes2 }) {
      const {
        url,
        alt,
        caption,
        align,
        href,
        rel,
        linkClass,
        width,
        height,
        aspectRatio,
        scale,
        id,
        linkTarget,
        sizeSlug,
        title
      } = attributes2;
      const newRel = !rel ? void 0 : rel;
      const borderProps = (0, import_block_editor110.__experimentalGetBorderClassesAndStyles)(attributes2);
      const classes = clsx_default({
        [`align${align}`]: align,
        [`size-${sizeSlug}`]: sizeSlug,
        "is-resized": width || height,
        "has-custom-border": !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
      });
      const imageClasses = clsx_default(borderProps.className, {
        [`wp-image-${id}`]: !!id
      });
      const image = /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
        "img",
        {
          src: url,
          alt,
          className: imageClasses || void 0,
          style: {
            ...borderProps.style,
            aspectRatio,
            objectFit: scale,
            width,
            height
          },
          title
        }
      );
      const figure = /* @__PURE__ */ (0, import_jsx_runtime276.jsxs)(import_jsx_runtime276.Fragment, { children: [
        href ? /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
          "a",
          {
            className: linkClass,
            href,
            target: linkTarget,
            rel: newRel,
            children: image
          }
        ) : image,
        !import_block_editor110.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
          import_block_editor110.RichText.Content,
          {
            className: (0, import_block_editor110.__experimentalGetElementClassName)(
              "caption"
            ),
            tagName: "figcaption",
            value: caption
          }
        )
      ] });
      return /* @__PURE__ */ (0, import_jsx_runtime276.jsx)("figure", { ...import_block_editor110.useBlockProps.save({ className: classes }), children: figure });
    }
  };
  var deprecated_default22 = [v82, v73, v64, v54, v44, v35, v210, v119];

  // packages/block-library/build-module/image/edit.mjs
  var import_blob12 = __toESM(require_blob(), 1);
  var import_blocks38 = __toESM(require_blocks(), 1);
  var import_components57 = __toESM(require_components(), 1);
  var import_data48 = __toESM(require_data(), 1);
  var import_block_editor113 = __toESM(require_block_editor(), 1);
  var import_element45 = __toESM(require_element(), 1);
  var import_i18n94 = __toESM(require_i18n(), 1);
  var import_notices8 = __toESM(require_notices(), 1);
  var import_compose24 = __toESM(require_compose(), 1);
  var import_url10 = __toESM(require_url(), 1);
  var import_upload_media = __toESM(require_upload_media(), 1);

  // packages/block-library/build-module/image/image.mjs
  var import_blob11 = __toESM(require_blob(), 1);
  var import_components56 = __toESM(require_components(), 1);
  var import_compose22 = __toESM(require_compose(), 1);
  var import_data47 = __toESM(require_data(), 1);
  var import_block_editor112 = __toESM(require_block_editor(), 1);
  var import_element43 = __toESM(require_element(), 1);
  var import_i18n93 = __toESM(require_i18n(), 1);
  var import_url9 = __toESM(require_url(), 1);
  var import_blocks37 = __toESM(require_blocks(), 1);
  var import_notices7 = __toESM(require_notices(), 1);
  var import_core_data23 = __toESM(require_core_data(), 1);

  // packages/block-library/build-module/utils/media-control.mjs
  var import_components55 = __toESM(require_components(), 1);
  var import_block_editor111 = __toESM(require_block_editor(), 1);
  var import_i18n92 = __toESM(require_i18n(), 1);
  var import_data46 = __toESM(require_data(), 1);
  var import_jsx_runtime277 = __toESM(require_jsx_runtime(), 1);
  function MediaControlPreview({
    url,
    alt,
    filename,
    itemGroupProps,
    className
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(import_components55.__experimentalItemGroup, { ...itemGroupProps, as: "span", children: /* @__PURE__ */ (0, import_jsx_runtime277.jsxs)(import_components55.__experimentalHStack, { justify: "flex-start", as: "span", children: [
      /* @__PURE__ */ (0, import_jsx_runtime277.jsx)("img", { src: url, alt }),
      /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(import_components55.FlexItem, { as: "span", children: /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(import_components55.__experimentalTruncate, { numberOfLines: 1, className, children: filename }) })
    ] }) });
  }
  function MediaControl({
    mediaId,
    mediaUrl,
    alt = "",
    filename,
    allowedTypes,
    onSelect,
    onSelectURL,
    onError,
    onReset,
    isUploading = false,
    emptyLabel = (0, import_i18n92.__)("Add media")
  }) {
    const { getSettings: getSettings2 } = (0, import_data46.useSelect)(import_block_editor111.store);
    const onFilesDrop = (filesList) => {
      const { mediaUpload } = getSettings2();
      if (!mediaUpload) {
        return;
      }
      mediaUpload({
        allowedTypes,
        filesList,
        onFileChange([media]) {
          onSelect(media);
        },
        onError,
        multiple: false
      });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime277.jsxs)("div", { className: "block-library-utils__media-control", children: [
      /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
        import_block_editor111.MediaReplaceFlow,
        {
          mediaId,
          mediaURL: mediaUrl,
          allowedTypes,
          onSelect,
          onSelectURL,
          onError,
          name: mediaUrl ? /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
            MediaControlPreview,
            {
              url: mediaUrl,
              alt,
              filename
            }
          ) : emptyLabel,
          renderToggle: (props) => /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(import_components55.Button, { ...props, __next40pxDefaultSize: true, children: isUploading ? /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(import_components55.Spinner, {}) : props.children }),
          onReset
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(import_components55.DropZone, { onFilesDrop })
    ] });
  }

  // packages/block-library/build-module/image/image.mjs
  var import_jsx_runtime278 = __toESM(require_jsx_runtime(), 1);
  var { DimensionsTool, ResolutionTool: ResolutionTool2 } = unlock(import_block_editor112.privateApis);
  var scaleOptions = [
    {
      value: "cover",
      label: (0, import_i18n93._x)("Cover", "Scale option for dimensions control"),
      help: (0, import_i18n93.__)("Image covers the space evenly.")
    },
    {
      value: "contain",
      label: (0, import_i18n93._x)("Contain", "Scale option for dimensions control"),
      help: (0, import_i18n93.__)("Image is contained without distortion.")
    }
  ];
  var WRITEMODE_POPOVER_PROPS = {
    placement: "bottom-start"
  };
  var ImageWrapper = ({ href, children }) => {
    if (!href) {
      return children;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
      "a",
      {
        href,
        onClick: (event) => event.preventDefault(),
        "aria-disabled": true,
        style: {
          // When the Image block is linked,
          // it's wrapped with a disabled <a /> tag.
          // Restore cursor style so it doesn't appear 'clickable'
          // and remove pointer events. Safari needs the display property.
          pointerEvents: "none",
          cursor: "default",
          display: "inline"
        },
        children
      }
    );
  };
  function ContentOnlyControls({
    attributes: attributes2,
    setAttributes,
    lockAltControls,
    lockAltControlsMessage,
    lockTitleControls,
    lockTitleControlsMessage
  }) {
    const [popoverAnchor, setPopoverAnchor] = (0, import_element43.useState)(null);
    const [isAltDialogOpen, setIsAltDialogOpen] = (0, import_element43.useState)(false);
    const [isTitleDialogOpen, setIsTitleDialogOpen] = (0, import_element43.useState)(false);
    return /* @__PURE__ */ (0, import_jsx_runtime278.jsxs)(import_jsx_runtime278.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(import_components56.ToolbarItem, { ref: setPopoverAnchor, children: (toggleProps) => /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
        import_components56.DropdownMenu,
        {
          icon: chevron_down_default,
          label: (0, import_i18n93.__)("More"),
          toggleProps: {
            ...toggleProps,
            description: (0, import_i18n93.__)("Displays more controls.")
          },
          popoverProps: WRITEMODE_POPOVER_PROPS,
          children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime278.jsxs)(import_jsx_runtime278.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
              import_components56.MenuItem,
              {
                onClick: () => {
                  setIsAltDialogOpen(true);
                  onClose();
                },
                "aria-haspopup": "dialog",
                children: (0, import_i18n93._x)(
                  "Alternative text",
                  "Alternative text for an image. Block toolbar label, a low character count is preferred."
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
              import_components56.MenuItem,
              {
                onClick: () => {
                  setIsTitleDialogOpen(true);
                  onClose();
                },
                "aria-haspopup": "dialog",
                children: (0, import_i18n93.__)("Title text")
              }
            )
          ] })
        }
      ) }),
      isAltDialogOpen && /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
        import_components56.Popover,
        {
          placement: "bottom-start",
          anchor: popoverAnchor,
          onClose: () => setIsAltDialogOpen(false),
          offset: 13,
          variant: "toolbar",
          children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)("div", { className: "wp-block-image__toolbar_content_textarea__container", children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
            import_components56.TextareaControl,
            {
              className: "wp-block-image__toolbar_content_textarea",
              label: (0, import_i18n93.__)("Alternative text"),
              value: attributes2.alt || "",
              onChange: (value) => setAttributes({ alt: value }),
              disabled: lockAltControls,
              help: lockAltControls ? /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(import_jsx_runtime278.Fragment, { children: lockAltControlsMessage }) : /* @__PURE__ */ (0, import_jsx_runtime278.jsxs)(import_jsx_runtime278.Fragment, { children: [
                /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
                  import_components56.ExternalLink,
                  {
                    href: (
                      // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
                      (0, import_i18n93.__)(
                        "https://www.w3.org/WAI/tutorials/images/decision-tree/"
                      )
                    ),
                    children: (0, import_i18n93.__)(
                      "Describe the purpose of the image."
                    )
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime278.jsx)("br", {}),
                (0, import_i18n93.__)("Leave empty if decorative.")
              ] })
            }
          ) })
        }
      ),
      isTitleDialogOpen && /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
        import_components56.Popover,
        {
          placement: "bottom-start",
          anchor: popoverAnchor,
          onClose: () => setIsTitleDialogOpen(false),
          offset: 13,
          variant: "toolbar",
          children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)("div", { className: "wp-block-image__toolbar_content_textarea__container", children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
            import_components56.TextControl,
            {
              __next40pxDefaultSize: true,
              className: "wp-block-image__toolbar_content_textarea",
              label: (0, import_i18n93.__)("Title attribute"),
              value: attributes2.title || "",
              onChange: (value) => setAttributes({
                title: value
              }),
              disabled: lockTitleControls,
              help: lockTitleControls ? /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(import_jsx_runtime278.Fragment, { children: lockTitleControlsMessage }) : (0, import_element43.createInterpolateElement)(
                (0, import_i18n93.__)(
                  "Describe the role of this image on the page. <a>(Note: many devices and browsers do not display this text.)</a>"
                ),
                {
                  a: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(import_components56.ExternalLink, { href: "https://www.w3.org/TR/html52/dom.html#the-title-attribute" })
                }
              )
            }
          ) })
        }
      )
    ] });
  }
  function Image2({
    temporaryURL,
    isSideloading,
    attributes: attributes2,
    setAttributes,
    isSingleSelected,
    insertBlocksAfter,
    onReplace,
    onSelectImage,
    onSelectURL,
    onUploadError,
    context,
    clientId,
    blockEditingMode,
    parentLayoutType,
    maxContentWidth
  }) {
    const {
      url = "",
      alt,
      align,
      id,
      href,
      rel,
      linkClass,
      linkDestination,
      title,
      width,
      height,
      aspectRatio,
      scale,
      focalPoint,
      linkTarget,
      sizeSlug,
      lightbox,
      metadata
    } = attributes2;
    const [imageElement, setImageElement] = (0, import_element43.useState)();
    const [resizeDelta, setResizeDelta] = (0, import_element43.useState)(null);
    const [pixelSize, setPixelSize] = (0, import_element43.useState)({});
    const [offsetTop, setOffsetTop] = (0, import_element43.useState)(0);
    const setResizeObserved = (0, import_compose22.useResizeObserver)(([entry]) => {
      if (!resizeDelta) {
        const [box] = entry.borderBoxSize;
        setPixelSize({ width: box.inlineSize, height: box.blockSize });
      }
      setOffsetTop(entry.target.offsetTop);
    });
    const effectResizeableBoxPlacement = (0, import_element43.useCallback)(() => {
      setOffsetTop(imageElement?.offsetTop ?? 0);
    }, [imageElement]);
    const setRefs = (0, import_compose22.useMergeRefs)([setImageElement, setResizeObserved]);
    const { allowResize = true } = context;
    const { image, canUserEdit } = (0, import_data47.useSelect)(
      (select9) => {
        const imageRecord = id && isSingleSelected ? select9(import_core_data23.store).getEntityRecord(
          "postType",
          "attachment",
          id,
          { context: "view" }
        ) : null;
        let canEdit = false;
        if (id && isSingleSelected && window?.__experimentalMediaEditor) {
          const { getEntityRecordPermissions } = unlock(
            select9(import_core_data23.store)
          );
          const permissions = getEntityRecordPermissions(
            "postType",
            "attachment",
            id
          );
          canEdit = permissions?.update || false;
        }
        return {
          image: imageRecord,
          canUserEdit: canEdit
        };
      },
      [id, isSingleSelected]
    );
    const { canInsertCover, imageEditing, imageSizes, maxWidth } = (0, import_data47.useSelect)(
      (select9) => {
        const { getBlockRootClientId, canInsertBlockType, getSettings: getSettings22 } = select9(import_block_editor112.store);
        const rootClientId = getBlockRootClientId(clientId);
        const settings122 = getSettings22();
        return {
          imageEditing: settings122.imageEditing,
          imageSizes: settings122.imageSizes,
          maxWidth: settings122.maxWidth,
          canInsertCover: canInsertBlockType(
            "core/cover",
            rootClientId
          )
        };
      },
      [clientId]
    );
    const { getBlock, getSettings: getSettings2 } = (0, import_data47.useSelect)(import_block_editor112.store);
    const onNavigateToEntityRecord = getSettings2().onNavigateToEntityRecord;
    const { replaceBlocks, toggleSelection } = (0, import_data47.useDispatch)(import_block_editor112.store);
    const { createErrorNotice, createSuccessNotice } = (0, import_data47.useDispatch)(import_notices7.store);
    const { editEntityRecord } = (0, import_data47.useDispatch)(import_core_data23.store);
    const isLargeViewport = (0, import_compose22.useViewportMatch)("medium");
    const isWideAligned = ["wide", "full"].includes(align);
    const [
      { loadedNaturalWidth, loadedNaturalHeight },
      setLoadedNaturalSize
    ] = (0, import_element43.useState)({});
    const [isEditingImage, setIsEditingImage] = (0, import_element43.useState)(false);
    const [externalBlob, setExternalBlob] = (0, import_element43.useState)();
    const [hasImageErrored, setHasImageErrored] = (0, import_element43.useState)(false);
    const hasNonContentControls = blockEditingMode === "default";
    const isContentOnlyMode = blockEditingMode === "contentOnly";
    const showDimensionsControls = allowResize && hasNonContentControls;
    const isResizable = allowResize && hasNonContentControls && !isWideAligned && isLargeViewport;
    const imageSizeOptions = imageSizes.filter(
      ({ slug }) => image?.media_details?.sizes?.[slug]?.source_url
    ).map(({ name: name123, slug }) => ({ value: slug, label: name123 }));
    (0, import_element43.useEffect)(() => {
      if (!isExternalImage(id, url) || !isSingleSelected || !getSettings2().mediaUpload) {
        setExternalBlob();
        return;
      }
      if (externalBlob) {
        return;
      }
      window.fetch(url.includes("?") ? url : url + "?").then((response) => response.blob()).then((blob) => setExternalBlob(blob)).catch(() => {
      });
    }, [id, url, isSingleSelected, externalBlob, getSettings2]);
    const { naturalWidth, naturalHeight } = (0, import_element43.useMemo)(() => {
      return {
        naturalWidth: imageElement?.naturalWidth || loadedNaturalWidth || void 0,
        naturalHeight: imageElement?.naturalHeight || loadedNaturalHeight || void 0
      };
    }, [loadedNaturalWidth, loadedNaturalHeight, imageElement?.complete]);
    function onImageError() {
      setHasImageErrored(true);
      const embedBlock = createUpgradedEmbedBlock({ attributes: { url } });
      if (void 0 !== embedBlock) {
        onReplace(embedBlock);
      }
    }
    function onImageLoad(event) {
      setHasImageErrored(false);
      setLoadedNaturalSize({
        loadedNaturalWidth: event.target?.naturalWidth,
        loadedNaturalHeight: event.target?.naturalHeight
      });
    }
    function onSetHref(props) {
      setAttributes(props);
    }
    function onSetLightbox(enable) {
      if (enable && !lightboxSetting?.enabled) {
        setAttributes({
          lightbox: { enabled: true }
        });
      } else if (!enable && lightboxSetting?.enabled) {
        setAttributes({
          lightbox: { enabled: false }
        });
      } else {
        setAttributes({
          lightbox: void 0
        });
      }
    }
    function resetLightbox() {
      if (lightboxSetting?.enabled && lightboxSetting?.allowEditing) {
        setAttributes({
          lightbox: { enabled: false }
        });
      } else {
        setAttributes({
          lightbox: void 0
        });
      }
    }
    function onSetTitle(value) {
      setAttributes({ title: value });
    }
    function updateAlt(newAlt) {
      setAttributes({ alt: newAlt });
    }
    const imperativeFocalPointPreview = (value) => {
      if (imageElement) {
        imageElement.style.setProperty(
          "object-position",
          mediaPosition2(value)
        );
      }
    };
    function updateImage(newSizeSlug) {
      const newUrl = image?.media_details?.sizes?.[newSizeSlug]?.source_url;
      if (!newUrl) {
        return null;
      }
      setAttributes({
        url: newUrl,
        sizeSlug: newSizeSlug
      });
    }
    function uploadExternal() {
      const { mediaUpload } = getSettings2();
      if (!mediaUpload) {
        return;
      }
      mediaUpload({
        filesList: [externalBlob],
        onFileChange([img2]) {
          onSelectImage(img2);
          if ((0, import_blob11.isBlobURL)(img2.url)) {
            return;
          }
          setExternalBlob();
          createSuccessNotice((0, import_i18n93.__)("Image uploaded."), {
            type: "snackbar"
          });
        },
        allowedTypes: ALLOWED_MEDIA_TYPES3,
        onError(message) {
          createErrorNotice(message, { type: "snackbar" });
        }
      });
    }
    (0, import_element43.useEffect)(() => {
      if (!isSingleSelected) {
        setIsEditingImage(false);
      }
    }, [isSingleSelected]);
    const canEditImage = id && naturalWidth && naturalHeight && imageEditing;
    const allowCrop = isSingleSelected && canEditImage && !isEditingImage && !isContentOnlyMode;
    function switchToCover() {
      replaceBlocks(
        clientId,
        (0, import_blocks37.switchToBlockType)(getBlock(clientId), "core/cover")
      );
    }
    const dimensionsUnitsOptions = (0, import_components56.__experimentalUseCustomUnits)({
      availableUnits: ["px"]
    });
    const [lightboxSetting] = (0, import_block_editor112.useSettings)("lightbox");
    const showLightboxSetting = (
      // If a block-level override is set, we should give users the option to
      // remove that override, even if the lightbox UI is disabled in the settings.
      !!lightbox && lightbox?.enabled !== lightboxSetting?.enabled || lightboxSetting?.allowEditing
    );
    const lightboxChecked = !!lightbox?.enabled || !lightbox && !!lightboxSetting?.enabled;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const dimensionsControl = showDimensionsControls && (SIZED_LAYOUTS.includes(parentLayoutType) ? /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
      DimensionsTool,
      {
        panelId: clientId,
        value: { aspectRatio },
        onChange: ({ aspectRatio: newAspectRatio }) => {
          setAttributes({
            aspectRatio: newAspectRatio,
            scale: "cover"
          });
        },
        defaultAspectRatio: "auto",
        tools: ["aspectRatio"]
      }
    ) : /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
      DimensionsTool,
      {
        panelId: clientId,
        value: { width, height, scale, aspectRatio },
        onChange: ({
          width: newWidth,
          height: newHeight,
          scale: newScale,
          aspectRatio: newAspectRatio
        }) => {
          setAttributes({
            // CSS includes `height: auto`, but we need
            // `width: auto` to fix the aspect ratio when
            // only height is set due to the width and
            // height attributes set via the server.
            width: !newWidth && newHeight ? "auto" : newWidth,
            height: newHeight,
            scale: newScale,
            aspectRatio: newAspectRatio
          });
        },
        defaultScale: "cover",
        defaultAspectRatio: "auto",
        scaleOptions,
        unitsOptions: dimensionsUnitsOptions,
        tools: isWideAligned ? ["aspectRatio", "scale"] : ["aspectRatio", "widthHeight", "scale"]
      }
    ));
    const resetSettings = () => {
      setAttributes({
        lightbox: void 0
      });
      updateImage(DEFAULT_MEDIA_SIZE_SLUG3);
    };
    const arePatternOverridesEnabled = metadata?.bindings?.__default?.source === "core/pattern-overrides";
    const {
      lockUrlControls = false,
      lockHrefControls = false,
      lockAltControls = false,
      lockAltControlsMessage,
      lockTitleControls = false,
      lockTitleControlsMessage,
      hideCaptionControls = false
    } = (0, import_data47.useSelect)(
      (select9) => {
        if (!isSingleSelected) {
          return {};
        }
        const {
          url: urlBinding,
          alt: altBinding,
          title: titleBinding,
          caption: captionBinding
        } = metadata?.bindings || {};
        const hasParentPattern = !!context["pattern/overrides"];
        const urlBindingSource = (0, import_blocks37.getBlockBindingsSource)(
          urlBinding?.source
        );
        const altBindingSource = (0, import_blocks37.getBlockBindingsSource)(
          altBinding?.source
        );
        const titleBindingSource = (0, import_blocks37.getBlockBindingsSource)(
          titleBinding?.source
        );
        return {
          lockUrlControls: !!urlBinding && !urlBindingSource?.canUserEditValue?.({
            select: select9,
            context,
            args: urlBinding?.args
          }),
          lockHrefControls: (
            // Disable editing the link of the URL if the image is inside a pattern instance.
            // This is a temporary solution until we support overriding the link on the frontend.
            hasParentPattern || arePatternOverridesEnabled
          ),
          hideCaptionControls: !!captionBinding,
          lockAltControls: !!altBinding && !altBindingSource?.canUserEditValue?.({
            select: select9,
            context,
            args: altBinding?.args
          }),
          lockAltControlsMessage: altBindingSource?.label ? (0, import_i18n93.sprintf)(
            /* translators: %s: Label of the bindings source. */
            (0, import_i18n93.__)("Connected to %s"),
            altBindingSource.label
          ) : (0, import_i18n93.__)("Connected to dynamic data"),
          lockTitleControls: !!titleBinding && !titleBindingSource?.canUserEditValue?.({
            select: select9,
            context,
            args: titleBinding?.args
          }),
          lockTitleControlsMessage: titleBindingSource?.label ? (0, import_i18n93.sprintf)(
            /* translators: %s: Label of the bindings source. */
            (0, import_i18n93.__)("Connected to %s"),
            titleBindingSource.label
          ) : (0, import_i18n93.__)("Connected to dynamic data")
        };
      },
      [
        arePatternOverridesEnabled,
        context,
        isSingleSelected,
        metadata?.bindings
      ]
    );
    const showUrlInput = isSingleSelected && !isEditingImage && !lockHrefControls && !lockUrlControls;
    const showCoverControls = isSingleSelected && canInsertCover && !isContentOnlyMode;
    const showBlockControls = showUrlInput || allowCrop || showCoverControls;
    const mediaReplaceFlow = isSingleSelected && !isEditingImage && !lockUrlControls && // For contentOnly mode, put this button in its own area so it has borders around it.
    /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(import_block_editor112.BlockControls, { group: isContentOnlyMode ? "inline" : "other", children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
      import_block_editor112.MediaReplaceFlow,
      {
        mediaId: id,
        mediaURL: url,
        allowedTypes: ALLOWED_MEDIA_TYPES3,
        onSelect: onSelectImage,
        onSelectURL,
        onError: onUploadError,
        name: !url ? (0, import_i18n93.__)("Add image") : (0, import_i18n93.__)("Replace"),
        onReset: () => onSelectImage(void 0),
        variant: "toolbar"
      }
    ) });
    const hasDataFormBlockFields = window?.__experimentalContentOnlyInspectorFields;
    const editMediaButton = window?.__experimentalMediaEditor && id && isSingleSelected && canUserEdit && !isExternalImage(id, url) && !isEditingImage && onNavigateToEntityRecord && /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(import_block_editor112.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
      import_components56.ToolbarButton,
      {
        onClick: () => {
          onNavigateToEntityRecord({
            postId: id,
            postType: "attachment"
          });
        },
        children: (0, import_i18n93.__)("Edit media")
      }
    ) });
    const controls = /* @__PURE__ */ (0, import_jsx_runtime278.jsxs)(import_jsx_runtime278.Fragment, { children: [
      showBlockControls && /* @__PURE__ */ (0, import_jsx_runtime278.jsxs)(import_block_editor112.BlockControls, { group: "block", children: [
        showUrlInput && /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
          import_block_editor112.__experimentalImageURLInputUI,
          {
            url: href || "",
            onChangeUrl: onSetHref,
            linkDestination,
            mediaUrl: image && image.source_url || url,
            mediaLink: image && image.link,
            linkTarget,
            linkClass,
            rel,
            showLightboxSetting,
            lightboxEnabled: lightboxChecked,
            onSetLightbox,
            resetLightbox
          }
        ),
        allowCrop && /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
          import_components56.ToolbarButton,
          {
            onClick: () => setIsEditingImage(true),
            icon: crop_default,
            label: (0, import_i18n93.__)("Crop")
          }
        ),
        showCoverControls && /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
          import_components56.ToolbarButton,
          {
            icon: overlay_text_default,
            label: (0, import_i18n93.__)("Add text over image"),
            onClick: switchToCover
          }
        )
      ] }),
      isSingleSelected && externalBlob && /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(import_block_editor112.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(import_components56.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
        import_components56.ToolbarButton,
        {
          onClick: uploadExternal,
          icon: upload_default,
          label: (0, import_i18n93.__)("Upload to Media Library")
        }
      ) }) }),
      isContentOnlyMode && // Add some extra controls for content attributes when content only mode is active.
      // With content only mode active, the inspector is hidden, so users need another way
      // to edit these attributes.
      /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(import_block_editor112.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
        ContentOnlyControls,
        {
          attributes: attributes2,
          setAttributes,
          lockAltControls,
          lockAltControlsMessage,
          lockTitleControls,
          lockTitleControlsMessage
        }
      ) }),
      !hasDataFormBlockFields && isSingleSelected && /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(import_block_editor112.InspectorControls, { group: "content", children: /* @__PURE__ */ (0, import_jsx_runtime278.jsxs)(
        import_components56.__experimentalToolsPanel,
        {
          label: (0, import_i18n93.__)("Media"),
          resetAll: () => onSelectImage(void 0),
          dropdownMenuProps,
          children: [
            !lockUrlControls && /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
              import_components56.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n93.__)("Image"),
                hasValue: () => !!url,
                onDeselect: () => onSelectImage(void 0),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
                  MediaControl,
                  {
                    mediaId: id,
                    mediaUrl: url,
                    alt,
                    filename: image?.media_details?.sizes?.full?.file || image?.slug || (0, import_url9.getFilename)(url),
                    allowedTypes: ALLOWED_MEDIA_TYPES3,
                    onSelect: onSelectImage,
                    onSelectURL,
                    onError: onUploadError,
                    onReset: () => onSelectImage(void 0),
                    isUploading: !!temporaryURL || isSideloading,
                    emptyLabel: (0, import_i18n93.__)("Add image")
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
              import_components56.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n93.__)("Alternative text"),
                isShownByDefault: true,
                hasValue: () => !!alt,
                onDeselect: () => setAttributes({ alt: void 0 }),
                children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
                  import_components56.TextareaControl,
                  {
                    label: (0, import_i18n93.__)("Alternative text"),
                    value: alt || "",
                    onChange: updateAlt,
                    readOnly: lockAltControls,
                    help: lockAltControls ? /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(import_jsx_runtime278.Fragment, { children: lockAltControlsMessage }) : /* @__PURE__ */ (0, import_jsx_runtime278.jsxs)(import_jsx_runtime278.Fragment, { children: [
                      /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
                        import_components56.ExternalLink,
                        {
                          href: (
                            // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
                            (0, import_i18n93.__)(
                              "https://www.w3.org/WAI/tutorials/images/decision-tree/"
                            )
                          ),
                          children: (0, import_i18n93.__)(
                            "Describe the purpose of the image."
                          )
                        }
                      ),
                      /* @__PURE__ */ (0, import_jsx_runtime278.jsx)("br", {}),
                      (0, import_i18n93.__)(
                        "Leave empty if decorative."
                      )
                    ] })
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime278.jsxs)(
        import_block_editor112.InspectorControls,
        {
          group: "dimensions",
          resetAllFilter: (attrs) => ({
            ...attrs,
            aspectRatio: void 0,
            width: void 0,
            height: void 0,
            scale: void 0,
            focalPoint: void 0
          }),
          children: [
            dimensionsControl,
            url && scale && /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
              import_components56.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n93.__)("Focal point"),
                isShownByDefault: true,
                hasValue: () => !!focalPoint,
                onDeselect: () => setAttributes({
                  focalPoint: void 0
                }),
                panelId: clientId,
                children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
                  import_components56.FocalPointPicker,
                  {
                    label: (0, import_i18n93.__)("Focal point"),
                    url,
                    value: focalPoint,
                    onDragStart: imperativeFocalPointPreview,
                    onDrag: imperativeFocalPointPreview,
                    onChange: (newFocalPoint) => setAttributes({
                      focalPoint: newFocalPoint
                    })
                  }
                )
              }
            )
          ]
        }
      ),
      !!imageSizeOptions.length && /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(import_block_editor112.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
        import_components56.__experimentalToolsPanel,
        {
          label: (0, import_i18n93.__)("Settings"),
          resetAll: resetSettings,
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
            ResolutionTool2,
            {
              value: sizeSlug,
              defaultValue: DEFAULT_MEDIA_SIZE_SLUG3,
              onChange: updateImage,
              options: imageSizeOptions
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(import_block_editor112.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
        import_components56.TextControl,
        {
          __next40pxDefaultSize: true,
          label: (0, import_i18n93.__)("Title attribute"),
          value: title || "",
          onChange: onSetTitle,
          readOnly: lockTitleControls,
          help: lockTitleControls ? /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(import_jsx_runtime278.Fragment, { children: lockTitleControlsMessage }) : (0, import_element43.createInterpolateElement)(
            (0, import_i18n93.__)(
              "Describe the role of this image on the page. <a>(Note: many devices and browsers do not display this text.)</a>"
            ),
            {
              a: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(import_components56.ExternalLink, { href: "https://www.w3.org/TR/html52/dom.html#the-title-attribute" })
            }
          )
        }
      ) })
    ] });
    const filename = (0, import_url9.getFilename)(url);
    let defaultedAlt;
    if (alt) {
      defaultedAlt = alt;
    } else if (filename) {
      defaultedAlt = (0, import_i18n93.sprintf)(
        /* translators: %s: file name */
        (0, import_i18n93.__)("This image has an empty alt attribute; its file name is %s"),
        filename
      );
    } else {
      defaultedAlt = (0, import_i18n93.__)("This image has an empty alt attribute");
    }
    const borderProps = (0, import_block_editor112.__experimentalUseBorderProps)(attributes2);
    const shadowProps = (0, import_block_editor112.__experimentalGetShadowClassesAndStyles)(attributes2);
    const isRounded = attributes2.className?.includes("is-style-rounded");
    const { postType, postId, queryId } = context;
    const isDescendentOfQueryLoop = Number.isFinite(queryId);
    let img = temporaryURL && hasImageErrored ? (
      // Show a placeholder during upload when the blob URL can't be loaded. This can
      // happen when the user uploads a HEIC image in a browser that doesn't support them.
      /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
        import_components56.Placeholder,
        {
          className: "wp-block-image__placeholder",
          withIllustration: true,
          children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(import_components56.Spinner, {})
        }
      )
    ) : /* @__PURE__ */ (0, import_jsx_runtime278.jsxs)(import_jsx_runtime278.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
        "img",
        {
          src: temporaryURL || url,
          alt: defaultedAlt,
          onError: onImageError,
          onLoad: onImageLoad,
          ref: setRefs,
          className: borderProps.className,
          width: naturalWidth,
          height: naturalHeight,
          style: {
            aspectRatio,
            ...resizeDelta ? {
              width: pixelSize.width + resizeDelta.width,
              height: pixelSize.height + resizeDelta.height
            } : { width, height },
            objectFit: scale,
            objectPosition: focalPoint && scale ? mediaPosition2(focalPoint) : void 0,
            ...borderProps.style,
            ...shadowProps.style
          }
        }
      ),
      (temporaryURL || isSideloading) && /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(import_components56.Spinner, {})
    ] });
    if (canEditImage && isEditingImage) {
      img = /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(ImageWrapper, { href, children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
        import_block_editor112.__experimentalImageEditor,
        {
          id,
          url,
          ...pixelSize,
          naturalHeight,
          naturalWidth,
          onSaveImage: (imageAttributes) => setAttributes(imageAttributes),
          onFinishEditing: () => {
            setIsEditingImage(false);
          },
          borderProps: isRounded ? void 0 : borderProps
        }
      ) });
    } else {
      img = /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(ImageWrapper, { href, children: img });
    }
    let resizableBox;
    if (isResizable && isSingleSelected && !isEditingImage && !SIZED_LAYOUTS.includes(parentLayoutType)) {
      const numericRatio = aspectRatio && evalAspectRatio(aspectRatio);
      const customRatio = pixelSize.width / pixelSize.height;
      const naturalRatio = naturalWidth / naturalHeight;
      const ratio = numericRatio || customRatio || naturalRatio || 1;
      const minWidth = naturalWidth < naturalHeight ? MIN_SIZE2 : MIN_SIZE2 * ratio;
      const minHeight = naturalHeight < naturalWidth ? MIN_SIZE2 : MIN_SIZE2 / ratio;
      const maxWidthBuffer = maxWidth * 2.5;
      const maxResizeWidth = maxContentWidth || maxWidthBuffer;
      let showRightHandle = false;
      let showLeftHandle = false;
      if (align === "center") {
        showRightHandle = true;
        showLeftHandle = true;
      } else if ((0, import_i18n93.isRTL)()) {
        if (align === "left") {
          showRightHandle = true;
        } else {
          showLeftHandle = true;
        }
      } else {
        if (align === "right") {
          showLeftHandle = true;
        } else {
          showRightHandle = true;
        }
      }
      resizableBox = /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
        import_components56.ResizableBox,
        {
          ref: effectResizeableBoxPlacement,
          style: {
            position: "absolute",
            // To match the vertical-align: bottom of the img (from style.scss)
            // syncs the top with the img. This matters when the img height is
            // less than the line-height.
            inset: `${offsetTop}px 0 0 0`
          },
          size: pixelSize,
          minWidth,
          maxWidth: maxResizeWidth,
          minHeight,
          maxHeight: maxResizeWidth / ratio,
          lockAspectRatio: ratio,
          enable: {
            top: false,
            right: showRightHandle,
            bottom: true,
            left: showLeftHandle
          },
          onResizeStart: () => {
            toggleSelection(false);
          },
          onResize: (event, direction, elt, delta) => {
            setResizeDelta(delta);
          },
          onResizeStop: (event, direction, elt, delta) => {
            toggleSelection(true);
            setResizeDelta(null);
            setPixelSize((current) => ({
              width: current.width + delta.width,
              height: current.height + delta.height
            }));
            if (maxContentWidth && // Only do this if the image is bigger than the container to prevent it from being squished.
            // TODO: Remove this check if the image support setting 100% width.
            naturalWidth >= maxContentWidth && Math.abs(elt.offsetWidth - maxContentWidth) < 10) {
              setAttributes({
                width: void 0,
                height: void 0
              });
              return;
            }
            setAttributes({
              width: `${elt.offsetWidth}px`,
              height: "auto",
              aspectRatio: ratio === naturalRatio ? void 0 : String(ratio)
            });
          },
          resizeRatio: align === "center" ? 2 : 1
        }
      );
    }
    if (!url && !temporaryURL) {
      return /* @__PURE__ */ (0, import_jsx_runtime278.jsxs)(import_jsx_runtime278.Fragment, { children: [
        mediaReplaceFlow,
        controls
      ] });
    }
    const setPostFeatureImage = () => {
      editEntityRecord("postType", postType, postId, {
        featured_media: id
      });
      createSuccessNotice((0, import_i18n93.__)("Post featured image updated."), {
        type: "snackbar"
      });
    };
    const featuredImageControl = !isDescendentOfQueryLoop && postId && id ? /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(import_block_editor112.BlockSettingsMenuControls, { children: ({ canEdit, selectedClientIds }) => canEdit && selectedClientIds.length === 1 && clientId === selectedClientIds[0] && /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(import_components56.MenuItem, { onClick: setPostFeatureImage, children: (0, import_i18n93.__)("Set as featured image") }) }) : null;
    return /* @__PURE__ */ (0, import_jsx_runtime278.jsxs)(import_jsx_runtime278.Fragment, { children: [
      editMediaButton,
      mediaReplaceFlow,
      controls,
      featuredImageControl,
      img,
      resizableBox,
      /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
        Caption,
        {
          attributes: attributes2,
          setAttributes,
          isSelected: isSingleSelected,
          insertBlocksAfter,
          label: (0, import_i18n93.__)("Image caption text"),
          showToolbarButton: isSingleSelected && (hasNonContentControls || isContentOnlyMode) && !hideCaptionControls
        }
      )
    ] });
  }

  // packages/block-library/build-module/image/use-max-width-observer.mjs
  var import_element44 = __toESM(require_element(), 1);
  var import_compose23 = __toESM(require_compose(), 1);
  var import_jsx_runtime279 = __toESM(require_jsx_runtime(), 1);
  function useMaxWidthObserver() {
    const [contentResizeListener, { width }] = (0, import_compose23.useResizeObserver)();
    const observerRef = (0, import_element44.useRef)();
    const maxWidthObserver = /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(
      "div",
      {
        className: "wp-block",
        "aria-hidden": "true",
        style: {
          position: "absolute",
          inset: 0,
          width: "100%",
          height: 0,
          margin: 0
        },
        ref: observerRef,
        children: contentResizeListener
      }
    );
    return [maxWidthObserver, width];
  }

  // packages/block-library/build-module/image/edit.mjs
  var import_jsx_runtime280 = __toESM(require_jsx_runtime(), 1);
  var pickRelevantMediaFiles2 = (image, size) => {
    const imageProps = Object.fromEntries(
      Object.entries(image ?? {}).filter(
        ([key]) => ["alt", "id", "link", "caption"].includes(key)
      )
    );
    imageProps.url = image?.sizes?.[size]?.url || image?.media_details?.sizes?.[size]?.source_url || image.url;
    return imageProps;
  };
  var isExternalImage = (id, url) => url && !id && !(0, import_blob12.isBlobURL)(url);
  function hasSize(image, size) {
    return "url" in (image?.sizes?.[size] ?? {}) || "source_url" in (image?.media_details?.sizes?.[size] ?? {});
  }
  function ImageEdit({
    attributes: attributes2,
    setAttributes,
    isSelected: isSingleSelected,
    className,
    insertBlocksAfter,
    onReplace,
    context,
    clientId,
    __unstableParentLayout: parentLayout
  }) {
    const {
      url = "",
      caption,
      id,
      width,
      height,
      sizeSlug,
      aspectRatio,
      scale,
      align,
      metadata
    } = attributes2;
    const [temporaryURL, setTemporaryURL] = (0, import_element45.useState)(attributes2.blob);
    const containerRef = (0, import_element45.useRef)();
    const layoutType = parentLayout?.type || parentLayout?.default?.type;
    const isMaxWidthContainerWidth = !layoutType || layoutType !== "flex" && layoutType !== "grid";
    const [maxWidthObserver, maxContentWidth] = useMaxWidthObserver();
    const [placeholderResizeListener, { width: placeholderWidth }] = (0, import_compose24.useResizeObserver)();
    const isSmallContainer = placeholderWidth && placeholderWidth < 160;
    const captionRef = (0, import_element45.useRef)();
    (0, import_element45.useEffect)(() => {
      captionRef.current = caption;
    }, [caption]);
    const { __unstableMarkNextChangeAsNotPersistent, replaceBlock } = (0, import_data48.useDispatch)(import_block_editor113.store);
    (0, import_element45.useEffect)(() => {
      if (["wide", "full"].includes(align)) {
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({
          width: void 0,
          height: void 0,
          aspectRatio: void 0,
          scale: void 0
        });
      }
    }, [__unstableMarkNextChangeAsNotPersistent, align, setAttributes]);
    const {
      getSettings: getSettings2,
      getBlockRootClientId,
      getBlockName,
      canInsertBlockType
    } = (0, import_data48.useSelect)(import_block_editor113.store);
    const blockEditingMode = (0, import_block_editor113.useBlockEditingMode)();
    const { createErrorNotice } = (0, import_data48.useDispatch)(import_notices8.store);
    function onUploadError(message) {
      createErrorNotice(message, { type: "snackbar" });
      setAttributes({
        src: void 0,
        id: void 0,
        url: void 0,
        blob: void 0
      });
    }
    function onSelectImagesList(images) {
      const win = containerRef.current?.ownerDocument.defaultView;
      if (images.every((file) => file instanceof win.File)) {
        const files = images;
        const rootClientId = getBlockRootClientId(clientId);
        if (files.some((file) => !isValidFileType(file))) {
          createErrorNotice(
            (0, import_i18n94.__)(
              "If uploading to a gallery all files need to be image formats"
            ),
            { id: "gallery-upload-invalid-file", type: "snackbar" }
          );
        }
        const imageBlocks = files.filter((file) => isValidFileType(file)).map(
          (file) => (0, import_blocks38.createBlock)("core/image", {
            blob: (0, import_blob12.createBlobURL)(file)
          })
        );
        if (getBlockName(rootClientId) === "core/gallery") {
          replaceBlock(clientId, imageBlocks);
        } else if (canInsertBlockType("core/gallery", rootClientId)) {
          const galleryBlock = (0, import_blocks38.createBlock)(
            "core/gallery",
            {},
            imageBlocks
          );
          replaceBlock(clientId, galleryBlock);
        }
      }
    }
    function onSelectImage(media) {
      if (Array.isArray(media)) {
        onSelectImagesList(media);
        return;
      }
      if (!media || !media.url) {
        setAttributes({
          url: void 0,
          alt: void 0,
          id: void 0,
          title: void 0,
          caption: void 0,
          blob: void 0
        });
        setTemporaryURL();
        return;
      }
      if ((0, import_blob12.isBlobURL)(media.url)) {
        setTemporaryURL(media.url);
        return;
      }
      const { imageDefaultSize } = getSettings2();
      let newSize = DEFAULT_MEDIA_SIZE_SLUG3;
      if (sizeSlug && hasSize(media, sizeSlug)) {
        newSize = sizeSlug;
      } else if (hasSize(media, imageDefaultSize)) {
        newSize = imageDefaultSize;
      }
      let mediaAttributes = pickRelevantMediaFiles2(media, newSize);
      if (typeof mediaAttributes.caption === "string" && mediaAttributes.caption.includes("\n")) {
        mediaAttributes.caption = mediaAttributes.caption.replace(
          /\n/g,
          "<br>"
        );
      }
      if (captionRef.current && !mediaAttributes.caption) {
        const { caption: omittedCaption, ...restMediaAttributes } = mediaAttributes;
        mediaAttributes = restMediaAttributes;
      }
      let additionalAttributes;
      if (!media.id || media.id !== id) {
        additionalAttributes = {
          sizeSlug: newSize
        };
      }
      let linkDestination = attributes2.linkDestination;
      if (!linkDestination) {
        switch (window?.wp?.media?.view?.settings?.defaultProps?.link || LINK_DESTINATION_NONE2) {
          case "file":
          case LINK_DESTINATION_MEDIA2:
            linkDestination = LINK_DESTINATION_MEDIA2;
            break;
          case "post":
          case LINK_DESTINATION_ATTACHMENT2:
            linkDestination = LINK_DESTINATION_ATTACHMENT2;
            break;
          case LINK_DESTINATION_CUSTOM:
            linkDestination = LINK_DESTINATION_CUSTOM;
            break;
          case LINK_DESTINATION_NONE2:
            linkDestination = LINK_DESTINATION_NONE2;
            break;
        }
      }
      let href;
      switch (linkDestination) {
        case LINK_DESTINATION_MEDIA2:
          href = media.url;
          break;
        case LINK_DESTINATION_ATTACHMENT2:
          href = media.link;
          break;
      }
      mediaAttributes.href = href;
      setAttributes({
        blob: void 0,
        ...mediaAttributes,
        ...additionalAttributes,
        linkDestination
      });
      setTemporaryURL();
    }
    function onSelectURL(newURL) {
      const normalizedNewURL = (0, import_url10.getProtocol)(newURL) ? newURL : (0, import_url10.prependHTTPS)(newURL);
      if (normalizedNewURL !== url) {
        setAttributes({
          blob: void 0,
          url: normalizedNewURL,
          id: void 0,
          sizeSlug: getSettings2().imageDefaultSize
        });
        setTemporaryURL();
      }
    }
    useUploadMediaFromBlobURL({
      url: temporaryURL,
      allowedTypes: ALLOWED_MEDIA_TYPES3,
      onChange: onSelectImage,
      onError: onUploadError
    });
    const isExternal = isExternalImage(id, url);
    const src = isExternal ? url : void 0;
    const isSideloading = (0, import_data48.useSelect)(
      (select9) => {
        if (!window.__clientSideMediaProcessing || !id) {
          return false;
        }
        return select9(import_upload_media.store).isUploadingById(id);
      },
      [id]
    );
    const mediaPreview = !!url && /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
      "img",
      {
        alt: (0, import_i18n94.__)("Edit image"),
        title: (0, import_i18n94.__)("Edit image"),
        className: "edit-image-preview",
        src: url
      }
    );
    const borderProps = (0, import_block_editor113.__experimentalUseBorderProps)(attributes2);
    const shadowProps = (0, import_block_editor113.__experimentalGetShadowClassesAndStyles)(attributes2);
    const classes = clsx_default(className, {
      "is-transient": !!temporaryURL || isSideloading,
      "is-resized": !!width || !!height,
      [`size-${sizeSlug}`]: sizeSlug,
      "has-custom-border": !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
    });
    const blockProps = (0, import_block_editor113.useBlockProps)({
      ref: containerRef,
      className: classes
    });
    const { lockUrlControls = false, lockUrlControlsMessage } = (0, import_data48.useSelect)(
      (select9) => {
        if (!isSingleSelected) {
          return {};
        }
        const blockBindingsSource = (0, import_blocks38.getBlockBindingsSource)(
          metadata?.bindings?.url?.source
        );
        return {
          lockUrlControls: !!metadata?.bindings?.url && !blockBindingsSource?.canUserEditValue?.({
            select: select9,
            context,
            args: metadata?.bindings?.url?.args
          }),
          lockUrlControlsMessage: blockBindingsSource?.label ? (0, import_i18n94.sprintf)(
            /* translators: %s: Label of the bindings source. */
            (0, import_i18n94.__)("Connected to %s"),
            blockBindingsSource.label
          ) : (0, import_i18n94.__)("Connected to dynamic data")
        };
      },
      [context, isSingleSelected, metadata?.bindings?.url]
    );
    const placeholder2 = (content) => {
      return /* @__PURE__ */ (0, import_jsx_runtime280.jsxs)(
        import_components57.Placeholder,
        {
          className: clsx_default("block-editor-media-placeholder", {
            [borderProps.className]: !!borderProps.className && !isSingleSelected
          }),
          icon: !isSmallContainer && (lockUrlControls ? plugins_default : image_default),
          withIllustration: !isSingleSelected || isSmallContainer,
          label: !isSmallContainer && (0, import_i18n94.__)("Image"),
          instructions: !lockUrlControls && !isSmallContainer && (0, import_i18n94.__)(
            "Drag and drop an image, upload, or choose from your library."
          ),
          style: {
            aspectRatio: !(width && height) && aspectRatio ? aspectRatio : void 0,
            width: height && aspectRatio ? "100%" : width,
            height: width && aspectRatio ? "100%" : height,
            objectFit: scale,
            ...borderProps.style,
            ...shadowProps.style
          },
          children: [
            lockUrlControls && !isSmallContainer && lockUrlControlsMessage,
            !lockUrlControls && !isSmallContainer && content,
            placeholderResizeListener
          ]
        }
      );
    };
    return /* @__PURE__ */ (0, import_jsx_runtime280.jsxs)(import_jsx_runtime280.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime280.jsxs)("figure", { ...blockProps, children: [
        /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
          Image2,
          {
            temporaryURL,
            isSideloading,
            attributes: attributes2,
            setAttributes,
            isSingleSelected,
            insertBlocksAfter,
            onReplace,
            onSelectImage,
            onSelectURL,
            onUploadError,
            context,
            clientId,
            blockEditingMode,
            parentLayoutType: layoutType,
            maxContentWidth
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
          import_block_editor113.MediaPlaceholder,
          {
            icon: /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(import_block_editor113.BlockIcon, { icon: image_default }),
            onSelect: onSelectImage,
            onSelectURL,
            onError: onUploadError,
            placeholder: placeholder2,
            allowedTypes: ALLOWED_MEDIA_TYPES3,
            handleUpload: (files) => files.length === 1,
            value: { id, src },
            mediaPreview,
            disableMediaButtons: temporaryURL || url
          }
        )
      ] }),
      // The listener cannot be placed as the first element as it will break the in-between inserter.
      // See https://github.com/WordPress/gutenberg/blob/71134165868298fc15e22896d0c28b41b3755ff7/packages/block-editor/src/components/block-list/use-in-between-inserter.js#L120
      isSingleSelected && isMaxWidthContainerWidth && maxWidthObserver
    ] });
  }
  var edit_default18 = ImageEdit;

  // packages/block-library/build-module/image/block.json
  var block_default44 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/image",
    title: "Image",
    category: "media",
    usesContext: [
      "allowResize",
      "imageCrop",
      "fixedHeight",
      "navigationButtonType",
      "postId",
      "postType",
      "queryId",
      "galleryId"
    ],
    description: "Insert an image to make a visual statement.",
    keywords: ["img", "photo", "picture"],
    textdomain: "default",
    attributes: {
      blob: {
        type: "string",
        role: "local"
      },
      url: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "src",
        role: "content"
      },
      alt: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "alt",
        default: "",
        role: "content"
      },
      caption: {
        type: "rich-text",
        source: "rich-text",
        selector: "figcaption",
        role: "content"
      },
      lightbox: {
        type: "object",
        enabled: {
          type: "boolean"
        }
      },
      title: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "title",
        role: "content"
      },
      href: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "href",
        role: "content"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "rel"
      },
      linkClass: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "class"
      },
      id: {
        type: "number",
        role: "content"
      },
      width: {
        type: "string"
      },
      height: {
        type: "string"
      },
      aspectRatio: {
        type: "string"
      },
      scale: {
        type: "string"
      },
      focalPoint: {
        type: "object"
      },
      sizeSlug: {
        type: "string"
      },
      linkDestination: {
        type: "string"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "target"
      }
    },
    supports: {
      interactivity: true,
      align: ["left", "center", "right", "wide", "full"],
      anchor: true,
      color: {
        text: false,
        background: false
      },
      filter: {
        duotone: true
      },
      spacing: {
        margin: true
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        width: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          width: true
        }
      },
      shadow: {
        __experimentalSkipSerialization: true
      }
    },
    selectors: {
      border: ".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder",
      shadow: ".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder",
      filter: {
        duotone: ".wp-block-image img, .wp-block-image .components-placeholder"
      }
    },
    styles: [
      {
        name: "default",
        label: "Default",
        isDefault: true
      },
      { name: "rounded", label: "Rounded" }
    ],
    editorStyle: "wp-block-image-editor",
    style: "wp-block-image"
  };

  // packages/block-library/build-module/image/save.mjs
  var import_block_editor114 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime281 = __toESM(require_jsx_runtime(), 1);
  function save26({ attributes: attributes2 }) {
    const {
      url,
      alt,
      caption,
      align,
      href,
      rel,
      linkClass,
      width,
      height,
      aspectRatio,
      scale,
      focalPoint,
      id,
      linkTarget,
      sizeSlug,
      title,
      metadata: { bindings = {} } = {}
    } = attributes2;
    const newRel = !rel ? void 0 : rel;
    const borderProps = (0, import_block_editor114.__experimentalGetBorderClassesAndStyles)(attributes2);
    const shadowProps = (0, import_block_editor114.__experimentalGetShadowClassesAndStyles)(attributes2);
    const classes = clsx_default({
      // All other align classes are handled by block supports.
      // `{ align: 'none' }` is unique to transforms for the image block.
      alignnone: "none" === align,
      [`size-${sizeSlug}`]: sizeSlug,
      "is-resized": width || height,
      "has-custom-border": !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
    });
    const imageClasses = clsx_default(borderProps.className, {
      [`wp-image-${id}`]: !!id
    });
    const image = /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
      "img",
      {
        src: url,
        alt,
        className: imageClasses || void 0,
        style: {
          ...borderProps.style,
          ...shadowProps.style,
          aspectRatio,
          objectFit: scale,
          objectPosition: focalPoint && scale ? mediaPosition2(focalPoint) : void 0,
          width,
          height
        },
        title
      }
    );
    const displayCaption = !import_block_editor114.RichText.isEmpty(caption) || bindings.caption || bindings?.__default?.source === "core/pattern-overrides";
    const figure = /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)(import_jsx_runtime281.Fragment, { children: [
      href ? /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
        "a",
        {
          className: linkClass,
          href,
          target: linkTarget,
          rel: newRel,
          children: image
        }
      ) : image,
      displayCaption && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
        import_block_editor114.RichText.Content,
        {
          className: (0, import_block_editor114.__experimentalGetElementClassName)("caption"),
          tagName: "figcaption",
          value: caption
        }
      )
    ] });
    return /* @__PURE__ */ (0, import_jsx_runtime281.jsx)("figure", { ...import_block_editor114.useBlockProps.save({ className: classes }), children: figure });
  }

  // packages/block-library/build-module/image/transforms.mjs
  var import_blob13 = __toESM(require_blob(), 1);
  var import_blocks39 = __toESM(require_blocks(), 1);
  function stripFirstImage(attributes2, { shortcode }) {
    const { body } = document.implementation.createHTMLDocument("");
    body.innerHTML = shortcode.content;
    let nodeToRemove = body.querySelector("img");
    while (nodeToRemove && nodeToRemove.parentNode && nodeToRemove.parentNode !== body) {
      nodeToRemove = nodeToRemove.parentNode;
    }
    if (nodeToRemove) {
      nodeToRemove.parentNode.removeChild(nodeToRemove);
    }
    return body.innerHTML.trim();
  }
  function getFirstAnchorAttributeFormHTML(html, attributeName) {
    const { body } = document.implementation.createHTMLDocument("");
    body.innerHTML = html;
    const { firstElementChild } = body;
    if (firstElementChild && firstElementChild.nodeName === "A") {
      return firstElementChild.getAttribute(attributeName) || void 0;
    }
  }
  var imageSchema = {
    img: {
      attributes: ["src", "alt", "title"],
      classes: [
        "alignleft",
        "aligncenter",
        "alignright",
        "alignnone",
        /^wp-image-\d+$/
      ]
    }
  };
  var schema = ({ phrasingContentSchema }) => ({
    figure: {
      require: ["img"],
      children: {
        ...imageSchema,
        a: {
          attributes: ["href", "rel", "target"],
          classes: ["*"],
          children: imageSchema
        },
        figcaption: {
          children: phrasingContentSchema
        }
      }
    }
  });
  var transforms13 = {
    from: [
      {
        type: "raw",
        isMatch: (node) => node.nodeName === "FIGURE" && !!node.querySelector("img"),
        schema,
        transform: (node) => {
          const className = node.className + " " + node.querySelector("img").className;
          const alignMatches = /(?:^|\s)align(left|center|right)(?:$|\s)/.exec(
            className
          );
          const anchor = node.id === "" ? void 0 : node.id;
          const align = alignMatches ? alignMatches[1] : void 0;
          const idMatches = /(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(
            className
          );
          const id = idMatches ? Number(idMatches[1]) : void 0;
          const anchorElement = node.querySelector("a");
          const linkDestination = anchorElement && anchorElement.href ? "custom" : void 0;
          const href = anchorElement && anchorElement.href ? anchorElement.href : void 0;
          const rel = anchorElement && anchorElement.rel ? anchorElement.rel : void 0;
          const linkClass = anchorElement && anchorElement.className ? anchorElement.className : void 0;
          const attributes2 = (0, import_blocks39.getBlockAttributes)(
            "core/image",
            node.outerHTML,
            {
              align,
              id,
              linkDestination,
              href,
              rel,
              linkClass,
              anchor
            }
          );
          if ((0, import_blob13.isBlobURL)(attributes2.url)) {
            attributes2.blob = attributes2.url;
            delete attributes2.url;
          }
          return (0, import_blocks39.createBlock)("core/image", attributes2);
        }
      },
      {
        // Note: when dragging and dropping multiple files onto a gallery this overrides the
        // gallery transform in order to add new images to the gallery instead of
        // creating a new gallery.
        type: "files",
        isMatch(files) {
          return files.every(
            (file) => file.type.indexOf("image/") === 0
          );
        },
        transform(files) {
          const blocks = files.map((file) => {
            return (0, import_blocks39.createBlock)("core/image", {
              blob: (0, import_blob13.createBlobURL)(file)
            });
          });
          return blocks;
        }
      },
      {
        type: "shortcode",
        tag: "caption",
        attributes: {
          url: {
            type: "string",
            source: "attribute",
            attribute: "src",
            selector: "img"
          },
          alt: {
            type: "string",
            source: "attribute",
            attribute: "alt",
            selector: "img"
          },
          caption: {
            shortcode: stripFirstImage
          },
          href: {
            shortcode: (attributes2, { shortcode }) => {
              return getFirstAnchorAttributeFormHTML(
                shortcode.content,
                "href"
              );
            }
          },
          rel: {
            shortcode: (attributes2, { shortcode }) => {
              return getFirstAnchorAttributeFormHTML(
                shortcode.content,
                "rel"
              );
            }
          },
          linkClass: {
            shortcode: (attributes2, { shortcode }) => {
              return getFirstAnchorAttributeFormHTML(
                shortcode.content,
                "class"
              );
            }
          },
          id: {
            type: "number",
            shortcode: ({ named: { id } }) => {
              if (!id) {
                return;
              }
              return parseInt(id.replace("attachment_", ""), 10);
            }
          },
          align: {
            type: "string",
            shortcode: ({ named: { align = "alignnone" } }) => {
              return align.replace("align", "");
            }
          }
        }
      }
    ]
  };
  var transforms_default14 = transforms13;

  // packages/block-library/build-module/image/index.mjs
  var { fieldsKey: fieldsKey8, formKey: formKey8 } = unlock(import_blocks40.privateApis);
  var { name: name44 } = block_default44;
  var settings44 = {
    icon: image_default,
    example: {
      attributes: {
        sizeSlug: "large",
        url: "https://s.w.org/images/core/5.3/MtBlanc1.jpg",
        // translators: Caption accompanying an image of the Mont Blanc, which serves as an example for the Image block.
        caption: (0, import_i18n95.__)("Mont Blanc appears\u2014still, snowy, and serene.")
      }
    },
    __experimentalLabel(attributes2, { context }) {
      const customName = attributes2?.metadata?.name;
      if ((context === "list-view" || context === "breadcrumb") && customName) {
        return customName;
      }
      if (context === "accessibility") {
        const { caption, alt, url } = attributes2;
        if (!url) {
          return (0, import_i18n95.__)("Empty");
        }
        if (!alt) {
          return caption || "";
        }
        return alt + (caption ? ". " + caption : "");
      }
    },
    getEditWrapperProps(attributes2) {
      return {
        "data-align": attributes2.align
      };
    },
    transforms: transforms_default14,
    edit: edit_default18,
    save: save26,
    deprecated: deprecated_default22
  };
  if (window.__experimentalContentOnlyInspectorFields) {
    settings44[fieldsKey8] = [
      {
        id: "image",
        label: (0, import_i18n95.__)("Image"),
        type: "media",
        Edit: {
          control: "media",
          // TODO: replace with custom component
          allowedTypes: ["image"],
          multiple: false
        },
        getValue: ({ item }) => ({
          id: item.id,
          url: item.url,
          alt: item.alt,
          caption: item.caption
        }),
        setValue: ({ value }) => ({
          id: value.id,
          url: value.url,
          alt: value.alt,
          caption: value.caption
        })
      },
      {
        id: "link",
        label: (0, import_i18n95.__)("Link"),
        type: "url",
        Edit: "link",
        // TODO: replace with custom component
        getValue: ({ item }) => ({
          url: item.href,
          rel: item.rel,
          linkTarget: item.linkTarget
        }),
        setValue: ({ value }) => ({
          href: value.url,
          rel: value.rel,
          linkTarget: value.linkTarget
        })
      },
      {
        id: "caption",
        label: (0, import_i18n95.__)("Caption"),
        type: "text",
        Edit: "rich-text"
        // TODO: replace with custom component
      },
      {
        id: "alt",
        label: (0, import_i18n95.__)("Alt text"),
        type: "text"
      }
    ];
    settings44[formKey8] = {
      fields: ["image", "link", "caption", "alt"]
    };
  }
  var init44 = () => initBlock({ name: name44, metadata: block_default44, settings: settings44 });

  // packages/block-library/build-module/latest-comments/index.mjs
  var latest_comments_exports = {};
  __export(latest_comments_exports, {
    init: () => init45,
    metadata: () => block_default45,
    name: () => name45,
    settings: () => settings45
  });

  // packages/block-library/build-module/latest-comments/block.json
  var block_default45 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/latest-comments",
    title: "Latest Comments",
    category: "widgets",
    description: "Display a list of your most recent comments.",
    keywords: ["recent comments"],
    textdomain: "default",
    attributes: {
      commentsToShow: {
        type: "number",
        default: 5,
        minimum: 1,
        maximum: 100
      },
      displayAvatar: {
        type: "boolean",
        default: true
      },
      displayDate: {
        type: "boolean",
        default: true
      },
      displayContent: {
        type: "string",
        default: "excerpt",
        enum: ["none", "excerpt", "full"]
      }
    },
    supports: {
      anchor: true,
      align: true,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      html: false,
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    style: "wp-block-latest-comments"
  };

  // packages/block-library/build-module/latest-comments/edit.mjs
  var import_block_editor115 = __toESM(require_block_editor(), 1);
  var import_components58 = __toESM(require_components(), 1);
  var import_i18n96 = __toESM(require_i18n(), 1);
  var import_server_side_render4 = __toESM(require_server_side_render(), 1);
  var import_compose25 = __toESM(require_compose(), 1);
  var import_jsx_runtime282 = __toESM(require_jsx_runtime(), 1);
  var MIN_COMMENTS = 1;
  var MAX_COMMENTS = 100;
  function LatestComments({ attributes: attributes2, setAttributes, name: name123 }) {
    const { commentsToShow, displayAvatar, displayDate, displayContent } = attributes2;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const { content, status, error } = (0, import_server_side_render4.useServerSideRender)({
      attributes: attributes2,
      skipBlockSupportAttributes: true,
      block: name123,
      urlQueryArgs: {
        // The preview uses the site's locale to make it more true to how
        // the block appears on the frontend. Setting the locale
        // explicitly prevents any middleware from setting it to 'user'.
        _locale: "site"
      }
    });
    const disabledRef = (0, import_compose25.useDisabled)();
    const blockProps = (0, import_block_editor115.useBlockProps)({ ref: disabledRef });
    return /* @__PURE__ */ (0, import_jsx_runtime282.jsxs)(import_jsx_runtime282.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(import_block_editor115.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime282.jsxs)(
        import_components58.__experimentalToolsPanel,
        {
          label: (0, import_i18n96.__)("Settings"),
          resetAll: () => {
            setAttributes({
              commentsToShow: 5,
              displayAvatar: true,
              displayDate: true,
              displayContent: "excerpt"
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
              import_components58.__experimentalToolsPanelItem,
              {
                hasValue: () => !displayAvatar,
                label: (0, import_i18n96.__)("Display avatar"),
                onDeselect: () => setAttributes({ displayAvatar: true }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
                  import_components58.ToggleControl,
                  {
                    label: (0, import_i18n96.__)("Display avatar"),
                    checked: displayAvatar,
                    onChange: () => setAttributes({
                      displayAvatar: !displayAvatar
                    })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
              import_components58.__experimentalToolsPanelItem,
              {
                hasValue: () => !displayDate,
                label: (0, import_i18n96.__)("Display date"),
                onDeselect: () => setAttributes({ displayDate: true }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
                  import_components58.ToggleControl,
                  {
                    label: (0, import_i18n96.__)("Display date"),
                    checked: displayDate,
                    onChange: () => setAttributes({ displayDate: !displayDate })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
              import_components58.__experimentalToolsPanelItem,
              {
                hasValue: () => displayContent !== "excerpt",
                label: (0, import_i18n96.__)("Display content"),
                onDeselect: () => setAttributes({ displayContent: "excerpt" }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
                  import_components58.SelectControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n96.__)("Display content"),
                    value: displayContent,
                    options: [
                      { label: (0, import_i18n96.__)("No content"), value: "none" },
                      { label: (0, import_i18n96.__)("Excerpt"), value: "excerpt" },
                      { label: (0, import_i18n96.__)("Full content"), value: "full" }
                    ],
                    onChange: (value) => setAttributes({
                      displayContent: value
                    })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
              import_components58.__experimentalToolsPanelItem,
              {
                hasValue: () => commentsToShow !== 5,
                label: (0, import_i18n96.__)("Number of comments"),
                onDeselect: () => setAttributes({ commentsToShow: 5 }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
                  import_components58.RangeControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n96.__)("Number of comments"),
                    value: commentsToShow,
                    onChange: (value) => setAttributes({ commentsToShow: value }),
                    min: MIN_COMMENTS,
                    max: MAX_COMMENTS,
                    required: true
                  }
                )
              }
            )
          ]
        }
      ) }),
      status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime282.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(import_components58.Spinner, {}) }),
      status === "error" && /* @__PURE__ */ (0, import_jsx_runtime282.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime282.jsx)("p", { children: (0, import_i18n96.sprintf)(
        /* translators: %s: error message returned when rendering the block. */
        (0, import_i18n96.__)("Error: %s"),
        error
      ) }) }),
      status === "success" && /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(html_renderer_default, { wrapperProps: blockProps, html: content })
    ] });
  }

  // packages/block-library/build-module/latest-comments/deprecated.mjs
  var v120 = {
    attributes: {
      commentsToShow: {
        type: "number",
        default: 5,
        minimum: 1,
        maximum: 100
      },
      displayAvatar: {
        type: "boolean",
        default: true
      },
      displayDate: {
        type: "boolean",
        default: true
      },
      displayExcerpt: {
        type: "boolean",
        default: true
      }
    },
    supports: {
      align: true,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      html: false,
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    isEligible(attributes2) {
      return attributes2?.displayExcerpt === false;
    },
    migrate(attributes2) {
      return {
        ...attributes2,
        displayContent: attributes2.displayExcerpt ? "excerpt" : "none"
      };
    }
  };
  var deprecated_default23 = [v120];

  // packages/block-library/build-module/latest-comments/index.mjs
  var { name: name45 } = block_default45;
  var settings45 = {
    icon: comment_default,
    example: {},
    edit: LatestComments,
    deprecated: deprecated_default23
  };
  var init45 = () => initBlock({ name: name45, metadata: block_default45, settings: settings45 });

  // packages/block-library/build-module/latest-posts/index.mjs
  var latest_posts_exports = {};
  __export(latest_posts_exports, {
    init: () => init46,
    metadata: () => block_default46,
    name: () => name46,
    settings: () => settings46
  });

  // packages/block-library/build-module/latest-posts/block.json
  var block_default46 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/latest-posts",
    title: "Latest Posts",
    category: "widgets",
    description: "Display a list of your most recent posts.",
    keywords: ["recent posts"],
    textdomain: "default",
    attributes: {
      categories: {
        type: "array",
        items: {
          type: "object"
        }
      },
      selectedAuthor: {
        type: "number"
      },
      postsToShow: {
        type: "number",
        default: 5
      },
      displayPostContent: {
        type: "boolean",
        default: false
      },
      displayPostContentRadio: {
        type: "string",
        default: "excerpt"
      },
      excerptLength: {
        type: "number",
        default: 55
      },
      displayAuthor: {
        type: "boolean",
        default: false
      },
      displayPostDate: {
        type: "boolean",
        default: false
      },
      postLayout: {
        type: "string",
        default: "list"
      },
      columns: {
        type: "number",
        default: 3
      },
      order: {
        type: "string",
        default: "desc"
      },
      orderBy: {
        type: "string",
        default: "date"
      },
      displayFeaturedImage: {
        type: "boolean",
        default: false
      },
      featuredImageAlign: {
        type: "string",
        enum: ["left", "center", "right"]
      },
      featuredImageSizeSlug: {
        type: "string",
        default: "thumbnail"
      },
      featuredImageSizeWidth: {
        type: "number",
        default: null
      },
      featuredImageSizeHeight: {
        type: "number",
        default: null
      },
      addLinkToFeaturedImage: {
        type: "boolean",
        default: false
      }
    },
    supports: {
      anchor: true,
      align: true,
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-latest-posts-editor",
    style: "wp-block-latest-posts"
  };

  // packages/block-library/build-module/latest-posts/deprecated.mjs
  var { attributes } = block_default46;
  var deprecated_default24 = [
    {
      attributes: {
        ...attributes,
        categories: {
          type: "string"
        }
      },
      supports: {
        align: true,
        html: false
      },
      migrate: (oldAttributes) => {
        return {
          ...oldAttributes,
          categories: [{ id: Number(oldAttributes.categories) }]
        };
      },
      isEligible: ({ categories }) => categories && "string" === typeof categories,
      save: () => null
    }
  ];

  // packages/block-library/build-module/latest-posts/edit.mjs
  var import_components59 = __toESM(require_components(), 1);
  var import_i18n97 = __toESM(require_i18n(), 1);
  var import_date2 = __toESM(require_date(), 1);
  var import_block_editor116 = __toESM(require_block_editor(), 1);
  var import_data49 = __toESM(require_data(), 1);
  var import_core_data24 = __toESM(require_core_data(), 1);
  var import_notices9 = __toESM(require_notices(), 1);
  var import_compose26 = __toESM(require_compose(), 1);
  var import_element46 = __toESM(require_element(), 1);

  // packages/block-library/build-module/latest-posts/constants.mjs
  var MIN_EXCERPT_LENGTH = 10;
  var MAX_EXCERPT_LENGTH = 100;
  var MAX_POSTS_COLUMNS = 6;
  var DEFAULT_EXCERPT_LENGTH = 55;

  // packages/block-library/build-module/latest-posts/edit.mjs
  var import_jsx_runtime283 = __toESM(require_jsx_runtime(), 1);
  var CATEGORIES_LIST_QUERY = {
    per_page: -1,
    _fields: "id,name",
    context: "view"
  };
  var USERS_LIST_QUERY = {
    per_page: -1,
    has_published_posts: ["post"],
    context: "view"
  };
  var imageAlignmentOptions = [
    {
      value: "none",
      icon: align_none_default,
      label: (0, import_i18n97.__)("None")
    },
    {
      value: "left",
      icon: position_left_default,
      label: (0, import_i18n97.__)("Left")
    },
    {
      value: "center",
      icon: position_center_default,
      label: (0, import_i18n97.__)("Center")
    },
    {
      value: "right",
      icon: position_right_default,
      label: (0, import_i18n97.__)("Right")
    }
  ];
  function getFeaturedImageDetails(post, size) {
    const image = post._embedded?.["wp:featuredmedia"]?.["0"];
    return {
      url: image?.media_details?.sizes?.[size]?.source_url ?? image?.source_url,
      alt: image?.alt_text
    };
  }
  function getCurrentAuthor(post) {
    return post._embedded?.author?.[0];
  }
  function Controls({ attributes: attributes2, setAttributes, postCount }) {
    const {
      postsToShow,
      order,
      orderBy,
      categories,
      selectedAuthor,
      displayFeaturedImage,
      displayPostContentRadio,
      displayPostContent,
      displayPostDate,
      displayAuthor,
      postLayout,
      columns,
      excerptLength,
      featuredImageAlign,
      featuredImageSizeSlug,
      featuredImageSizeWidth,
      featuredImageSizeHeight,
      addLinkToFeaturedImage
    } = attributes2;
    const {
      imageSizes,
      defaultImageWidth,
      defaultImageHeight,
      categoriesList,
      authorList
    } = (0, import_data49.useSelect)(
      (select9) => {
        const { getEntityRecords, getUsers } = select9(import_core_data24.store);
        const settings122 = select9(import_block_editor116.store).getSettings();
        return {
          defaultImageWidth: settings122.imageDimensions?.[featuredImageSizeSlug]?.width ?? 0,
          defaultImageHeight: settings122.imageDimensions?.[featuredImageSizeSlug]?.height ?? 0,
          imageSizes: settings122.imageSizes,
          categoriesList: getEntityRecords(
            "taxonomy",
            "category",
            CATEGORIES_LIST_QUERY
          ),
          authorList: getUsers(USERS_LIST_QUERY)
        };
      },
      [featuredImageSizeSlug]
    );
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const imageSizeOptions = imageSizes.filter(({ slug }) => slug !== "full").map(({ name: name123, slug }) => ({
      value: slug,
      label: name123
    }));
    const categorySuggestions = categoriesList?.reduce(
      (accumulator, category) => ({
        ...accumulator,
        [category.name]: category
      }),
      {}
    ) ?? {};
    const selectCategories = (tokens) => {
      const hasNoSuggestion = tokens.some(
        (token) => typeof token === "string" && !categorySuggestions[token]
      );
      if (hasNoSuggestion) {
        return;
      }
      const allCategories = tokens.map((token) => {
        return typeof token === "string" ? categorySuggestions[token] : token;
      });
      if (allCategories.includes(null)) {
        return false;
      }
      setAttributes({ categories: allCategories });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(import_jsx_runtime283.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(
        import_components59.__experimentalToolsPanel,
        {
          label: (0, import_i18n97.__)("Post content"),
          resetAll: () => setAttributes({
            displayPostContent: false,
            displayPostContentRadio: "excerpt",
            excerptLength: DEFAULT_EXCERPT_LENGTH
          }),
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
              import_components59.__experimentalToolsPanelItem,
              {
                hasValue: () => !!displayPostContent,
                label: (0, import_i18n97.__)("Display post content"),
                onDeselect: () => setAttributes({ displayPostContent: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
                  import_components59.ToggleControl,
                  {
                    label: (0, import_i18n97.__)("Display post content"),
                    checked: displayPostContent,
                    onChange: (value) => setAttributes({ displayPostContent: value })
                  }
                )
              }
            ),
            displayPostContent && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
              import_components59.__experimentalToolsPanelItem,
              {
                hasValue: () => displayPostContentRadio !== "excerpt",
                label: (0, import_i18n97.__)("Content length"),
                onDeselect: () => setAttributes({
                  displayPostContentRadio: "excerpt"
                }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
                  import_components59.RadioControl,
                  {
                    label: (0, import_i18n97.__)("Content length"),
                    selected: displayPostContentRadio,
                    options: [
                      { label: (0, import_i18n97.__)("Excerpt"), value: "excerpt" },
                      {
                        label: (0, import_i18n97.__)("Full post"),
                        value: "full_post"
                      }
                    ],
                    onChange: (value) => setAttributes({
                      displayPostContentRadio: value
                    })
                  }
                )
              }
            ),
            displayPostContent && displayPostContentRadio === "excerpt" && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
              import_components59.__experimentalToolsPanelItem,
              {
                hasValue: () => excerptLength !== DEFAULT_EXCERPT_LENGTH,
                label: (0, import_i18n97.__)("Max number of words"),
                onDeselect: () => setAttributes({
                  excerptLength: DEFAULT_EXCERPT_LENGTH
                }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
                  import_components59.RangeControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n97.__)("Max number of words"),
                    value: excerptLength,
                    onChange: (value) => setAttributes({ excerptLength: value }),
                    min: MIN_EXCERPT_LENGTH,
                    max: MAX_EXCERPT_LENGTH
                  }
                )
              }
            )
          ]
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(
        import_components59.__experimentalToolsPanel,
        {
          label: (0, import_i18n97.__)("Post meta"),
          resetAll: () => setAttributes({
            displayAuthor: false,
            displayPostDate: false
          }),
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
              import_components59.__experimentalToolsPanelItem,
              {
                hasValue: () => !!displayAuthor,
                label: (0, import_i18n97.__)("Display author name"),
                onDeselect: () => setAttributes({ displayAuthor: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
                  import_components59.ToggleControl,
                  {
                    label: (0, import_i18n97.__)("Display author name"),
                    checked: displayAuthor,
                    onChange: (value) => setAttributes({ displayAuthor: value })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
              import_components59.__experimentalToolsPanelItem,
              {
                hasValue: () => !!displayPostDate,
                label: (0, import_i18n97.__)("Display post date"),
                onDeselect: () => setAttributes({ displayPostDate: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
                  import_components59.ToggleControl,
                  {
                    label: (0, import_i18n97.__)("Display post date"),
                    checked: displayPostDate,
                    onChange: (value) => setAttributes({ displayPostDate: value })
                  }
                )
              }
            )
          ]
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(
        import_components59.__experimentalToolsPanel,
        {
          label: (0, import_i18n97.__)("Featured image"),
          resetAll: () => setAttributes({
            displayFeaturedImage: false,
            featuredImageAlign: void 0,
            featuredImageSizeSlug: "thumbnail",
            featuredImageSizeWidth: null,
            featuredImageSizeHeight: null,
            addLinkToFeaturedImage: false
          }),
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
              import_components59.__experimentalToolsPanelItem,
              {
                hasValue: () => !!displayFeaturedImage,
                label: (0, import_i18n97.__)("Display featured image"),
                onDeselect: () => setAttributes({ displayFeaturedImage: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
                  import_components59.ToggleControl,
                  {
                    label: (0, import_i18n97.__)("Display featured image"),
                    checked: displayFeaturedImage,
                    onChange: (value) => setAttributes({ displayFeaturedImage: value })
                  }
                )
              }
            ),
            displayFeaturedImage && /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(import_jsx_runtime283.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
                import_components59.__experimentalToolsPanelItem,
                {
                  hasValue: () => featuredImageSizeSlug !== "thumbnail" || featuredImageSizeWidth !== null || featuredImageSizeHeight !== null,
                  label: (0, import_i18n97.__)("Image size"),
                  onDeselect: () => setAttributes({
                    featuredImageSizeSlug: "thumbnail",
                    featuredImageSizeWidth: null,
                    featuredImageSizeHeight: null
                  }),
                  isShownByDefault: true,
                  children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
                    import_block_editor116.__experimentalImageSizeControl,
                    {
                      onChange: (value) => {
                        const newAttrs = {};
                        if (value.hasOwnProperty("width")) {
                          newAttrs.featuredImageSizeWidth = value.width;
                        }
                        if (value.hasOwnProperty("height")) {
                          newAttrs.featuredImageSizeHeight = value.height;
                        }
                        setAttributes(newAttrs);
                      },
                      slug: featuredImageSizeSlug,
                      width: featuredImageSizeWidth,
                      height: featuredImageSizeHeight,
                      imageWidth: defaultImageWidth,
                      imageHeight: defaultImageHeight,
                      imageSizeOptions,
                      imageSizeHelp: (0, import_i18n97.__)(
                        "Select the size of the source image."
                      ),
                      onChangeImage: (value) => setAttributes({
                        featuredImageSizeSlug: value,
                        featuredImageSizeWidth: void 0,
                        featuredImageSizeHeight: void 0
                      })
                    }
                  )
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
                import_components59.__experimentalToolsPanelItem,
                {
                  hasValue: () => !!featuredImageAlign,
                  label: (0, import_i18n97.__)("Image alignment"),
                  onDeselect: () => setAttributes({
                    featuredImageAlign: void 0
                  }),
                  isShownByDefault: true,
                  children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
                    import_components59.__experimentalToggleGroupControl,
                    {
                      className: "editor-latest-posts-image-alignment-control",
                      __next40pxDefaultSize: true,
                      label: (0, import_i18n97.__)("Image alignment"),
                      value: featuredImageAlign || "none",
                      onChange: (value) => setAttributes({
                        featuredImageAlign: value !== "none" ? value : void 0
                      }),
                      children: imageAlignmentOptions.map(
                        ({ value, icon: icon4, label }) => {
                          return /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
                            import_components59.__experimentalToggleGroupControlOptionIcon,
                            {
                              value,
                              icon: icon4,
                              label
                            },
                            value
                          );
                        }
                      )
                    }
                  )
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
                import_components59.__experimentalToolsPanelItem,
                {
                  hasValue: () => !!addLinkToFeaturedImage,
                  label: (0, import_i18n97.__)("Add link to featured image"),
                  onDeselect: () => setAttributes({
                    addLinkToFeaturedImage: false
                  }),
                  isShownByDefault: true,
                  children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
                    import_components59.ToggleControl,
                    {
                      label: (0, import_i18n97.__)("Add link to featured image"),
                      checked: addLinkToFeaturedImage,
                      onChange: (value) => setAttributes({
                        addLinkToFeaturedImage: value
                      })
                    }
                  )
                }
              )
            ] })
          ]
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(
        import_components59.__experimentalToolsPanel,
        {
          label: (0, import_i18n97.__)("Sorting and filtering"),
          resetAll: () => setAttributes({
            order: "desc",
            orderBy: "date",
            postsToShow: 5,
            categories: void 0,
            selectedAuthor: void 0,
            columns: 3
          }),
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
              import_components59.__experimentalToolsPanelItem,
              {
                hasValue: () => order !== "desc" || orderBy !== "date" || postsToShow !== 5 || categories?.length > 0 || !!selectedAuthor,
                label: (0, import_i18n97.__)("Sort and filter"),
                onDeselect: () => setAttributes({
                  order: "desc",
                  orderBy: "date",
                  postsToShow: 5,
                  categories: void 0,
                  selectedAuthor: void 0
                }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
                  import_components59.QueryControls,
                  {
                    ...{ order, orderBy },
                    numberOfItems: postsToShow,
                    onOrderChange: (value) => setAttributes({ order: value }),
                    onOrderByChange: (value) => setAttributes({ orderBy: value }),
                    onNumberOfItemsChange: (value) => setAttributes({ postsToShow: value }),
                    categorySuggestions,
                    onCategoryChange: selectCategories,
                    selectedCategories: categories,
                    onAuthorChange: (value) => setAttributes({
                      selectedAuthor: "" !== value ? Number(value) : void 0
                    }),
                    authorList: authorList ?? [],
                    selectedAuthorId: selectedAuthor
                  }
                )
              }
            ),
            postLayout === "grid" && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
              import_components59.__experimentalToolsPanelItem,
              {
                hasValue: () => columns !== 3,
                label: (0, import_i18n97.__)("Columns"),
                onDeselect: () => setAttributes({
                  columns: 3
                }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
                  import_components59.RangeControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n97.__)("Columns"),
                    value: columns,
                    onChange: (value) => setAttributes({ columns: value }),
                    min: 2,
                    max: !postCount ? MAX_POSTS_COLUMNS : Math.min(MAX_POSTS_COLUMNS, postCount),
                    required: true
                  }
                )
              }
            )
          ]
        }
      )
    ] });
  }
  function LatestPostsEdit({ attributes: attributes2, setAttributes }) {
    const instanceId = (0, import_compose26.useInstanceId)(LatestPostsEdit);
    const {
      postsToShow,
      order,
      orderBy,
      categories,
      selectedAuthor,
      displayFeaturedImage,
      displayPostContentRadio,
      displayPostContent,
      displayPostDate,
      displayAuthor,
      postLayout,
      columns,
      excerptLength,
      featuredImageAlign,
      featuredImageSizeSlug,
      featuredImageSizeWidth,
      featuredImageSizeHeight,
      addLinkToFeaturedImage
    } = attributes2;
    const { latestPosts } = (0, import_data49.useSelect)(
      (select9) => {
        const { getEntityRecords } = select9(import_core_data24.store);
        const catIds = categories && categories.length > 0 ? categories.map((cat) => cat.id) : [];
        const latestPostsQuery = Object.fromEntries(
          Object.entries({
            categories: catIds,
            author: selectedAuthor,
            order,
            orderby: orderBy,
            per_page: postsToShow,
            _embed: "author,wp:featuredmedia",
            ignore_sticky: true
          }).filter(([, value]) => typeof value !== "undefined")
        );
        return {
          latestPosts: getEntityRecords(
            "postType",
            "post",
            latestPostsQuery
          )
        };
      },
      [postsToShow, order, orderBy, categories, selectedAuthor]
    );
    const { createWarningNotice } = (0, import_data49.useDispatch)(import_notices9.store);
    const showRedirectionPreventedNotice = (event) => {
      event.preventDefault();
      createWarningNotice((0, import_i18n97.__)("Links are disabled in the editor."), {
        id: `block-library/core/latest-posts/redirection-prevented/${instanceId}`,
        type: "snackbar"
      });
    };
    const hasPosts = !!latestPosts?.length;
    const inspectorControls = /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(import_block_editor116.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
      Controls,
      {
        attributes: attributes2,
        setAttributes,
        postCount: latestPosts?.length ?? 0
      }
    ) });
    const blockProps = (0, import_block_editor116.useBlockProps)({
      className: clsx_default({
        "wp-block-latest-posts__list": true,
        "is-grid": postLayout === "grid",
        "has-dates": displayPostDate,
        "has-author": displayAuthor,
        [`columns-${columns}`]: postLayout === "grid"
      })
    });
    if (!hasPosts) {
      return /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)("div", { ...blockProps, children: [
        inspectorControls,
        /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(import_components59.Placeholder, { icon: pin_default, label: (0, import_i18n97.__)("Latest Posts"), children: !Array.isArray(latestPosts) ? /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(import_components59.Spinner, {}) : (0, import_i18n97.__)("No posts found.") })
      ] });
    }
    const displayPosts = latestPosts.length > postsToShow ? latestPosts.slice(0, postsToShow) : latestPosts;
    const layoutControls = [
      {
        icon: list_default,
        title: (0, import_i18n97._x)("List view", "Latest posts block display setting"),
        onClick: () => setAttributes({ postLayout: "list" }),
        isActive: postLayout === "list"
      },
      {
        icon: grid_default,
        title: (0, import_i18n97._x)("Grid view", "Latest posts block display setting"),
        onClick: () => setAttributes({ postLayout: "grid" }),
        isActive: postLayout === "grid"
      }
    ];
    const dateFormat = (0, import_date2.getSettings)().formats.date;
    return /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(import_jsx_runtime283.Fragment, { children: [
      inspectorControls,
      /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(import_block_editor116.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(import_components59.ToolbarGroup, { controls: layoutControls }) }),
      /* @__PURE__ */ (0, import_jsx_runtime283.jsx)("ul", { ...blockProps, children: displayPosts.map((post) => {
        const titleTrimmed = post.title.rendered.trim();
        let excerpt = post.excerpt.rendered;
        const currentAuthor = getCurrentAuthor(post);
        const excerptElement = document.createElement("div");
        excerptElement.innerHTML = excerpt;
        excerpt = excerptElement.textContent || excerptElement.innerText || "";
        const { url: imageSourceUrl, alt: featuredImageAlt } = getFeaturedImageDetails(post, featuredImageSizeSlug);
        const imageClasses = clsx_default({
          "wp-block-latest-posts__featured-image": true,
          [`align${featuredImageAlign}`]: !!featuredImageAlign
        });
        const renderFeaturedImage = displayFeaturedImage && imageSourceUrl;
        const featuredImage = renderFeaturedImage && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
          "img",
          {
            src: imageSourceUrl,
            alt: featuredImageAlt,
            style: {
              maxWidth: featuredImageSizeWidth,
              maxHeight: featuredImageSizeHeight
            }
          }
        );
        const needsReadMore = excerptLength < excerpt.trim().split(" ").length && post.excerpt.raw === "";
        const postExcerpt = needsReadMore ? /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(import_jsx_runtime283.Fragment, { children: [
          excerpt.trim().split(" ", excerptLength).join(" "),
          (0, import_element46.createInterpolateElement)(
            (0, import_i18n97.sprintf)(
              /* translators: 1: Hidden accessibility text: Post title */
              (0, import_i18n97.__)(
                "\u2026 <a>Read more<span>: %1$s</span></a>"
              ),
              titleTrimmed || (0, import_i18n97.__)("(no title)")
            ),
            {
              a: (
                // eslint-disable-next-line jsx-a11y/anchor-has-content
                /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
                  "a",
                  {
                    className: "wp-block-latest-posts__read-more",
                    href: post.link,
                    rel: "noopener noreferrer",
                    onClick: showRedirectionPreventedNotice
                  }
                )
              ),
              span: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)("span", { className: "screen-reader-text" })
            }
          )
        ] }) : excerpt;
        return /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)("li", { children: [
          renderFeaturedImage && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)("div", { className: imageClasses, children: addLinkToFeaturedImage ? /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
            "a",
            {
              href: post.link,
              onClick: showRedirectionPreventedNotice,
              children: featuredImage
            }
          ) : featuredImage }),
          /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
            "a",
            {
              className: "wp-block-latest-posts__post-title",
              href: post.link,
              dangerouslySetInnerHTML: !!titleTrimmed ? {
                __html: titleTrimmed
              } : void 0,
              onClick: showRedirectionPreventedNotice,
              children: !titleTrimmed ? (0, import_i18n97.__)("(no title)") : null
            }
          ),
          displayAuthor && currentAuthor && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)("div", { className: "wp-block-latest-posts__post-author", children: (0, import_i18n97.sprintf)(
            /* translators: byline. %s: author. */
            (0, import_i18n97.__)("by %s"),
            currentAuthor.name
          ) }),
          displayPostDate && post.date_gmt && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
            "time",
            {
              dateTime: (0, import_date2.format)("c", post.date_gmt),
              className: "wp-block-latest-posts__post-date",
              children: (0, import_date2.dateI18n)(dateFormat, post.date_gmt)
            }
          ),
          displayPostContent && displayPostContentRadio === "excerpt" && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)("div", { className: "wp-block-latest-posts__post-excerpt", children: postExcerpt }),
          displayPostContent && displayPostContentRadio === "full_post" && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
            "div",
            {
              className: "wp-block-latest-posts__post-full-content",
              dangerouslySetInnerHTML: {
                __html: post.content.raw.trim()
              }
            }
          )
        ] }, post.id);
      }) })
    ] });
  }

  // packages/block-library/build-module/latest-posts/index.mjs
  var { name: name46 } = block_default46;
  var settings46 = {
    icon: post_list_default,
    example: {},
    edit: LatestPostsEdit,
    deprecated: deprecated_default24
  };
  var init46 = () => initBlock({ name: name46, metadata: block_default46, settings: settings46 });

  // packages/block-library/build-module/list/index.mjs
  var list_exports = {};
  __export(list_exports, {
    init: () => init47,
    metadata: () => block_default47,
    name: () => name47,
    settings: () => settings47
  });
  var import_i18n100 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/list/deprecated.mjs
  var import_block_editor117 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/list/utils.mjs
  var import_blocks41 = __toESM(require_blocks(), 1);
  var LIST_STYLES = {
    A: "upper-alpha",
    a: "lower-alpha",
    I: "upper-roman",
    i: "lower-roman"
  };
  function createListBlockFromDOMElement(listElement) {
    const type = listElement.getAttribute("type");
    const listAttributes = {
      ordered: "OL" === listElement.tagName,
      anchor: listElement.id ? listElement.id : void 0,
      start: listElement.getAttribute("start") ? parseInt(listElement.getAttribute("start"), 10) : void 0,
      reversed: listElement.hasAttribute("reversed") ? true : void 0,
      type: type && LIST_STYLES[type] ? LIST_STYLES[type] : void 0
    };
    const innerBlocks = Array.from(listElement.children).map(
      (listItem) => {
        const children = Array.from(listItem.childNodes).filter(
          (node) => node.nodeType !== node.TEXT_NODE || node.textContent.trim().length !== 0
        );
        children.reverse();
        const [nestedList, ...nodes] = children;
        const hasNestedList = nestedList?.tagName === "UL" || nestedList?.tagName === "OL";
        if (!hasNestedList) {
          return (0, import_blocks41.createBlock)("core/list-item", {
            content: listItem.innerHTML
          });
        }
        const htmlNodes = nodes.map((node) => {
          if (node.nodeType === node.TEXT_NODE) {
            return node.textContent;
          }
          return node.outerHTML;
        });
        htmlNodes.reverse();
        const childAttributes = {
          content: htmlNodes.join("").trim()
        };
        const childInnerBlocks = [
          createListBlockFromDOMElement(nestedList)
        ];
        return (0, import_blocks41.createBlock)(
          "core/list-item",
          childAttributes,
          childInnerBlocks
        );
      }
    );
    return (0, import_blocks41.createBlock)("core/list", listAttributes, innerBlocks);
  }
  function migrateToListV2(attributes2) {
    const { values, start, reversed, ordered, type, ...otherAttributes } = attributes2;
    const list = document.createElement(ordered ? "ol" : "ul");
    list.innerHTML = values;
    if (start) {
      list.setAttribute("start", start);
    }
    if (reversed) {
      list.setAttribute("reversed", true);
    }
    if (type) {
      list.setAttribute("type", type);
    }
    const [listBlock] = (0, import_blocks41.rawHandler)({ HTML: list.outerHTML });
    return [
      { ...otherAttributes, ...listBlock.attributes },
      listBlock.innerBlocks
    ];
  }
  function migrateTypeToInlineStyle(attributes2) {
    const { type } = attributes2;
    if (type && LIST_STYLES[type]) {
      return {
        ...attributes2,
        type: LIST_STYLES[type]
      };
    }
    return attributes2;
  }

  // packages/block-library/build-module/list/deprecated.mjs
  var import_jsx_runtime284 = __toESM(require_jsx_runtime(), 1);
  var v0 = {
    attributes: {
      ordered: {
        type: "boolean",
        default: false,
        role: "content"
      },
      values: {
        type: "string",
        source: "html",
        selector: "ol,ul",
        multiline: "li",
        __unstableMultilineWrapperTags: ["ol", "ul"],
        default: "",
        role: "content"
      },
      type: {
        type: "string"
      },
      start: {
        type: "number"
      },
      reversed: {
        type: "boolean"
      },
      placeholder: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      className: false,
      typography: {
        fontSize: true,
        __experimentalFontFamily: true
      },
      color: {
        gradients: true,
        link: true
      },
      __unstablePasteTextInline: true,
      __experimentalSelector: "ol,ul",
      __experimentalSlashInserter: true
    },
    save({ attributes: attributes2 }) {
      const { ordered, values, type, reversed, start } = attributes2;
      const TagName2 = ordered ? "ol" : "ul";
      return /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(TagName2, { ...import_block_editor117.useBlockProps.save({ type, reversed, start }), children: /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(import_block_editor117.RichText.Content, { value: values, multiline: "li" }) });
    },
    migrate: migrate_font_family_default,
    isEligible({ style: style2 }) {
      return style2?.typography?.fontFamily;
    }
  };
  var v121 = {
    attributes: {
      ordered: {
        type: "boolean",
        default: false,
        role: "content"
      },
      values: {
        type: "string",
        source: "html",
        selector: "ol,ul",
        multiline: "li",
        __unstableMultilineWrapperTags: ["ol", "ul"],
        default: "",
        role: "content"
      },
      type: {
        type: "string"
      },
      start: {
        type: "number"
      },
      reversed: {
        type: "boolean"
      },
      placeholder: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      className: false,
      typography: {
        fontSize: true,
        __experimentalFontFamily: true,
        lineHeight: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      __unstablePasteTextInline: true,
      __experimentalSelector: "ol,ul",
      __experimentalSlashInserter: true
    },
    save({ attributes: attributes2 }) {
      const { ordered, values, type, reversed, start } = attributes2;
      const TagName2 = ordered ? "ol" : "ul";
      return /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(TagName2, { ...import_block_editor117.useBlockProps.save({ type, reversed, start }), children: /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(import_block_editor117.RichText.Content, { value: values, multiline: "li" }) });
    },
    migrate: migrateToListV2
  };
  var v211 = {
    attributes: {
      ordered: {
        type: "boolean",
        default: false,
        role: "content"
      },
      values: {
        type: "string",
        source: "html",
        selector: "ol,ul",
        multiline: "li",
        __unstableMultilineWrapperTags: ["ol", "ul"],
        default: "",
        role: "content"
      },
      type: {
        type: "string"
      },
      start: {
        type: "number"
      },
      reversed: {
        type: "boolean"
      },
      placeholder: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      className: false,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      __unstablePasteTextInline: true,
      __experimentalSelector: "ol,ul",
      __experimentalSlashInserter: true
    },
    isEligible({ type }) {
      return !!type;
    },
    save({ attributes: attributes2 }) {
      const { ordered, type, reversed, start } = attributes2;
      const TagName2 = ordered ? "ol" : "ul";
      return /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(TagName2, { ...import_block_editor117.useBlockProps.save({ type, reversed, start }), children: /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(import_block_editor117.InnerBlocks.Content, {}) });
    },
    migrate: migrateTypeToInlineStyle
  };
  var v36 = {
    attributes: {
      ordered: {
        type: "boolean",
        default: false,
        role: "content"
      },
      values: {
        type: "string",
        source: "html",
        selector: "ol,ul",
        multiline: "li",
        __unstableMultilineWrapperTags: ["ol", "ul"],
        default: "",
        role: "content"
      },
      type: {
        type: "string"
      },
      start: {
        type: "number"
      },
      reversed: {
        type: "boolean"
      },
      placeholder: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      className: false,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      __unstablePasteTextInline: true,
      __experimentalSelector: "ol,ul",
      __experimentalOnMerge: "true",
      __experimentalSlashInserter: true
    },
    save({ attributes: attributes2 }) {
      const { ordered, type, reversed, start } = attributes2;
      const TagName2 = ordered ? "ol" : "ul";
      return /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
        TagName2,
        {
          ...import_block_editor117.useBlockProps.save({
            reversed,
            start,
            style: {
              listStyleType: ordered && type !== "decimal" ? type : void 0
            }
          }),
          children: /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(import_block_editor117.InnerBlocks.Content, {})
        }
      );
    }
  };
  var deprecated_default25 = [v36, v211, v121, v0];

  // packages/block-library/build-module/list/edit.mjs
  var import_block_editor119 = __toESM(require_block_editor(), 1);
  var import_components61 = __toESM(require_components(), 1);
  var import_data50 = __toESM(require_data(), 1);
  var import_i18n99 = __toESM(require_i18n(), 1);
  var import_blocks42 = __toESM(require_blocks(), 1);
  var import_element49 = __toESM(require_element(), 1);
  var import_deprecated26 = __toESM(require_deprecated(), 1);

  // packages/block-library/build-module/list/ordered-list-settings.mjs
  var import_i18n98 = __toESM(require_i18n(), 1);
  var import_block_editor118 = __toESM(require_block_editor(), 1);
  var import_components60 = __toESM(require_components(), 1);
  var import_element47 = __toESM(require_element(), 1);
  var import_jsx_runtime285 = __toESM(require_jsx_runtime(), 1);
  var LIST_STYLE_OPTIONS = [
    {
      label: (0, import_i18n98.__)("Numbers"),
      value: "decimal"
    },
    {
      label: (0, import_i18n98.__)("Uppercase letters"),
      value: "upper-alpha"
    },
    {
      label: (0, import_i18n98.__)("Lowercase letters"),
      value: "lower-alpha"
    },
    {
      label: (0, import_i18n98.__)("Uppercase Roman numerals"),
      value: "upper-roman"
    },
    {
      label: (0, import_i18n98.__)("Lowercase Roman numerals"),
      value: "lower-roman"
    }
  ];
  var OrderedListSettings = ({ setAttributes, reversed, start, type }) => {
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(import_block_editor118.InspectorControls, { children: import_element47.Platform.isNative ? /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(import_components60.PanelBody, { title: (0, import_i18n98.__)("Settings"), children: [
      /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
        import_components60.SelectControl,
        {
          __next40pxDefaultSize: true,
          label: (0, import_i18n98.__)("List style"),
          options: LIST_STYLE_OPTIONS,
          value: type,
          onChange: (newValue) => setAttributes({ type: newValue })
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
        import_components60.TextControl,
        {
          __next40pxDefaultSize: true,
          label: (0, import_i18n98.__)("Start value"),
          type: "number",
          onChange: (value) => {
            const int = parseInt(value, 10);
            setAttributes({
              // It should be possible to unset the value,
              // e.g. with an empty string.
              start: isNaN(int) ? void 0 : int
            });
          },
          value: Number.isInteger(start) ? start.toString(10) : "",
          step: "1"
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
        import_components60.ToggleControl,
        {
          label: (0, import_i18n98.__)("Reverse order"),
          checked: reversed || false,
          onChange: (value) => {
            setAttributes({
              // Unset the attribute if not reversed.
              reversed: value || void 0
            });
          }
        }
      )
    ] }) : /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(
      import_components60.__experimentalToolsPanel,
      {
        label: (0, import_i18n98.__)("Settings"),
        resetAll: () => {
          setAttributes({
            type: void 0,
            start: void 0,
            reversed: void 0
          });
        },
        dropdownMenuProps,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
            import_components60.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n98.__)("List style"),
              isShownByDefault: true,
              hasValue: () => !!type,
              onDeselect: () => setAttributes({
                type: void 0
              }),
              children: /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
                import_components60.SelectControl,
                {
                  __next40pxDefaultSize: true,
                  label: (0, import_i18n98.__)("List style"),
                  options: LIST_STYLE_OPTIONS,
                  value: type || "decimal",
                  onChange: (newValue) => setAttributes({ type: newValue })
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
            import_components60.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n98.__)("Start value"),
              isShownByDefault: true,
              hasValue: () => !!start,
              onDeselect: () => setAttributes({
                start: void 0
              }),
              children: /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
                import_components60.TextControl,
                {
                  __next40pxDefaultSize: true,
                  label: (0, import_i18n98.__)("Start value"),
                  type: "number",
                  onChange: (value) => {
                    const int = parseInt(value, 10);
                    setAttributes({
                      // It should be possible to unset the value,
                      // e.g. with an empty string.
                      start: isNaN(int) ? void 0 : int
                    });
                  },
                  value: Number.isInteger(start) ? start.toString(10) : "",
                  step: "1"
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
            import_components60.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n98.__)("Reverse order"),
              isShownByDefault: true,
              hasValue: () => !!reversed,
              onDeselect: () => setAttributes({
                reversed: void 0
              }),
              children: /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
                import_components60.ToggleControl,
                {
                  label: (0, import_i18n98.__)("Reverse order"),
                  checked: reversed || false,
                  onChange: (value) => {
                    setAttributes({
                      // Unset the attribute if not reversed.
                      reversed: value || void 0
                    });
                  }
                }
              )
            }
          )
        ]
      }
    ) });
  };
  var ordered_list_settings_default = OrderedListSettings;

  // packages/block-library/build-module/list/tag-name.mjs
  var import_element48 = __toESM(require_element(), 1);
  var import_jsx_runtime286 = __toESM(require_jsx_runtime(), 1);
  function TagName(props, ref) {
    const { ordered, ...extraProps } = props;
    const Tag = ordered ? "ol" : "ul";
    return /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(Tag, { ref, ...extraProps });
  }
  var tag_name_default = (0, import_element48.forwardRef)(TagName);

  // packages/block-library/build-module/list/edit.mjs
  var import_jsx_runtime287 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_BLOCK4 = {
    name: "core/list-item"
  };
  var TEMPLATE9 = [["core/list-item"]];
  var NATIVE_MARGIN_SPACING = 8;
  function useMigrateOnLoad(attributes2, clientId) {
    const registry = (0, import_data50.useRegistry)();
    const { updateBlockAttributes, replaceInnerBlocks } = (0, import_data50.useDispatch)(import_block_editor119.store);
    (0, import_element49.useEffect)(() => {
      if (!attributes2.values) {
        return;
      }
      const [newAttributes, newInnerBlocks] = migrateToListV2(attributes2);
      (0, import_deprecated26.default)("Value attribute on the list block", {
        since: "6.0",
        version: "6.5",
        alternative: "inner blocks"
      });
      registry.batch(() => {
        updateBlockAttributes(clientId, newAttributes);
        replaceInnerBlocks(clientId, newInnerBlocks);
      });
    }, [attributes2.values]);
  }
  function useOutdentList(clientId) {
    const { replaceBlocks, selectionChange } = (0, import_data50.useDispatch)(import_block_editor119.store);
    const { getBlockRootClientId, getBlockAttributes: getBlockAttributes4, getBlock } = (0, import_data50.useSelect)(import_block_editor119.store);
    return (0, import_element49.useCallback)(() => {
      const parentBlockId = getBlockRootClientId(clientId);
      const parentBlockAttributes = getBlockAttributes4(parentBlockId);
      const newParentBlock = (0, import_blocks42.createBlock)(
        "core/list-item",
        parentBlockAttributes
      );
      const { innerBlocks } = getBlock(clientId);
      replaceBlocks([parentBlockId], [newParentBlock, ...innerBlocks]);
      selectionChange(innerBlocks[innerBlocks.length - 1].clientId);
    }, [clientId]);
  }
  function IndentUI({ clientId }) {
    const outdentList = useOutdentList(clientId);
    const canOutdent = (0, import_data50.useSelect)(
      (select9) => {
        const { getBlockRootClientId, getBlockName } = select9(import_block_editor119.store);
        return getBlockName(getBlockRootClientId(clientId)) === "core/list-item";
      },
      [clientId]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(import_jsx_runtime287.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
      import_components61.ToolbarButton,
      {
        icon: (0, import_i18n99.isRTL)() ? format_outdent_rtl_default : format_outdent_default,
        title: (0, import_i18n99.__)("Outdent"),
        description: (0, import_i18n99.__)("Outdent list item"),
        disabled: !canOutdent,
        onClick: outdentList
      }
    ) });
  }
  function Edit17({ attributes: attributes2, setAttributes, clientId, style: style2 }) {
    const { ordered, type, reversed, start } = attributes2;
    const blockProps = (0, import_block_editor119.useBlockProps)({
      style: {
        ...import_element49.Platform.isNative && style2,
        listStyleType: ordered && type !== "decimal" ? type : void 0
      }
    });
    const innerBlocksProps = (0, import_block_editor119.useInnerBlocksProps)(blockProps, {
      defaultBlock: DEFAULT_BLOCK4,
      directInsert: true,
      template: TEMPLATE9,
      templateLock: false,
      templateInsertUpdatesSelection: true,
      ...import_element49.Platform.isNative && {
        marginVertical: NATIVE_MARGIN_SPACING,
        marginHorizontal: NATIVE_MARGIN_SPACING,
        renderAppender: false
      },
      __experimentalCaptureToolbars: true
    });
    useMigrateOnLoad(attributes2, clientId);
    const controls = /* @__PURE__ */ (0, import_jsx_runtime287.jsxs)(import_block_editor119.BlockControls, { group: "block", children: [
      /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
        import_components61.ToolbarButton,
        {
          icon: (0, import_i18n99.isRTL)() ? format_list_bullets_rtl_default : format_list_bullets_default,
          title: (0, import_i18n99.__)("Unordered"),
          description: (0, import_i18n99.__)("Convert to unordered list"),
          isActive: ordered === false,
          onClick: () => {
            setAttributes({ ordered: false });
          }
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
        import_components61.ToolbarButton,
        {
          icon: (0, import_i18n99.isRTL)() ? format_list_numbered_rtl_default : format_list_numbered_default,
          title: (0, import_i18n99.__)("Ordered"),
          description: (0, import_i18n99.__)("Convert to ordered list"),
          isActive: ordered === true,
          onClick: () => {
            setAttributes({ ordered: true });
          }
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(IndentUI, { clientId })
    ] });
    return /* @__PURE__ */ (0, import_jsx_runtime287.jsxs)(import_jsx_runtime287.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
        tag_name_default,
        {
          ordered,
          reversed,
          start,
          ...innerBlocksProps
        }
      ),
      controls,
      ordered && /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
        ordered_list_settings_default,
        {
          ...{
            setAttributes,
            reversed,
            start,
            type
          }
        }
      )
    ] });
  }

  // packages/block-library/build-module/list/block.json
  var block_default47 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/list",
    title: "List",
    category: "text",
    allowedBlocks: ["core/list-item"],
    description: "An organized collection of items displayed in a specific order.",
    keywords: ["bullet list", "ordered list", "numbered list"],
    textdomain: "default",
    attributes: {
      ordered: {
        type: "boolean",
        default: false,
        role: "content"
      },
      values: {
        type: "string",
        source: "html",
        selector: "ol,ul",
        multiline: "li",
        default: "",
        role: "content"
      },
      type: {
        type: "string"
      },
      start: {
        type: "number"
      },
      reversed: {
        type: "boolean"
      },
      placeholder: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      html: false,
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      __unstablePasteTextInline: true,
      __experimentalOnMerge: true,
      __experimentalSlashInserter: true,
      interactivity: {
        clientNavigation: true
      },
      listView: true
    },
    selectors: {
      border: ".wp-block-list:not(.wp-block-list .wp-block-list)"
    },
    editorStyle: "wp-block-list-editor",
    style: "wp-block-list"
  };

  // packages/block-library/build-module/list/save.mjs
  var import_block_editor120 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime288 = __toESM(require_jsx_runtime(), 1);
  function save27({ attributes: attributes2 }) {
    const { ordered, type, reversed, start } = attributes2;
    const TagName2 = ordered ? "ol" : "ul";
    return /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
      TagName2,
      {
        ...import_block_editor120.useBlockProps.save({
          reversed,
          start,
          style: {
            listStyleType: ordered && type !== "decimal" ? type : void 0
          }
        }),
        children: /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(import_block_editor120.InnerBlocks.Content, {})
      }
    );
  }

  // packages/block-library/build-module/list/transforms.mjs
  var import_blocks43 = __toESM(require_blocks(), 1);
  var import_rich_text4 = __toESM(require_rich_text(), 1);
  function getListContentSchema({ phrasingContentSchema }) {
    const listContentSchema = {
      ...phrasingContentSchema,
      ul: {},
      ol: { attributes: ["type", "start", "reversed"] }
    };
    ["ul", "ol"].forEach((tag) => {
      listContentSchema[tag].children = {
        li: {
          children: listContentSchema
        }
      };
    });
    return listContentSchema;
  }
  function getListContentFlat(blocks) {
    return blocks.flatMap(({ name: name123, attributes: attributes2, innerBlocks = [] }) => {
      if (name123 === "core/list-item") {
        return [attributes2.content, ...getListContentFlat(innerBlocks)];
      }
      return getListContentFlat(innerBlocks);
    });
  }
  var transforms14 = {
    from: [
      {
        type: "block",
        isMultiBlock: true,
        blocks: ["core/paragraph", "core/heading"],
        transform: (blockAttributes8) => {
          let childBlocks = [];
          if (blockAttributes8.length > 1) {
            childBlocks = blockAttributes8.map(({ content }) => {
              return (0, import_blocks43.createBlock)("core/list-item", { content });
            });
          } else if (blockAttributes8.length === 1) {
            const value = (0, import_rich_text4.create)({
              html: blockAttributes8[0].content
            });
            childBlocks = (0, import_rich_text4.split)(value, "\n").map((result) => {
              return (0, import_blocks43.createBlock)("core/list-item", {
                content: (0, import_rich_text4.toHTMLString)({ value: result })
              });
            });
          }
          return (0, import_blocks43.createBlock)(
            "core/list",
            {
              anchor: blockAttributes8.anchor
            },
            childBlocks
          );
        }
      },
      {
        type: "raw",
        selector: "ol,ul",
        schema: (args) => ({
          ol: getListContentSchema(args).ol,
          ul: getListContentSchema(args).ul
        }),
        transform: createListBlockFromDOMElement
      },
      ...["*", "-"].map((prefix) => ({
        type: "prefix",
        prefix,
        transform(content) {
          return (0, import_blocks43.createBlock)("core/list", {}, [
            (0, import_blocks43.createBlock)("core/list-item", { content })
          ]);
        }
      })),
      ...["1.", "1)"].map((prefix) => ({
        type: "prefix",
        prefix,
        transform(content) {
          return (0, import_blocks43.createBlock)(
            "core/list",
            {
              ordered: true
            },
            [(0, import_blocks43.createBlock)("core/list-item", { content })]
          );
        }
      }))
    ],
    to: [
      ...["core/paragraph", "core/heading"].map((block) => ({
        type: "block",
        blocks: [block],
        transform: (_attributes, childBlocks) => {
          return getListContentFlat(childBlocks).map(
            (content) => (0, import_blocks43.createBlock)(block, {
              content
            })
          );
        }
      }))
    ]
  };
  var transforms_default15 = transforms14;

  // packages/block-library/build-module/list/index.mjs
  var { name: name47 } = block_default47;
  var settings47 = {
    icon: list_default,
    example: {
      innerBlocks: [
        {
          name: "core/list-item",
          attributes: { content: (0, import_i18n100.__)("Alice.") }
        },
        {
          name: "core/list-item",
          attributes: { content: (0, import_i18n100.__)("The White Rabbit.") }
        },
        {
          name: "core/list-item",
          attributes: { content: (0, import_i18n100.__)("The Cheshire Cat.") }
        },
        {
          name: "core/list-item",
          attributes: { content: (0, import_i18n100.__)("The Mad Hatter.") }
        },
        {
          name: "core/list-item",
          attributes: { content: (0, import_i18n100.__)("The Queen of Hearts.") }
        }
      ]
    },
    transforms: transforms_default15,
    edit: Edit17,
    save: save27,
    deprecated: deprecated_default25
  };
  var init47 = () => initBlock({ name: name47, metadata: block_default47, settings: settings47 });

  // packages/block-library/build-module/math/index.mjs
  var math_exports = {};
  __export(math_exports, {
    init: () => init48,
    metadata: () => block_default48,
    name: () => name48,
    settings: () => settings48
  });

  // packages/block-library/build-module/math/edit.mjs
  var import_i18n101 = __toESM(require_i18n(), 1);
  var import_block_editor121 = __toESM(require_block_editor(), 1);
  var import_components62 = __toESM(require_components(), 1);
  var import_element50 = __toESM(require_element(), 1);
  var import_data51 = __toESM(require_data(), 1);
  var import_a11y = __toESM(require_a11y(), 1);
  var import_jsx_runtime289 = __toESM(require_jsx_runtime(), 1);
  var { Badge } = unlock(import_components62.privateApis);
  function MathEdit({ attributes: attributes2, setAttributes, isSelected }) {
    const { latex, mathML } = attributes2;
    const [blockRef, setBlockRef] = (0, import_element50.useState)();
    const [error, setError] = (0, import_element50.useState)(null);
    const [latexToMathML, setLatexToMathML] = (0, import_element50.useState)();
    const initialLatex = (0, import_element50.useRef)(latex);
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data51.useDispatch)(import_block_editor121.store);
    (0, import_element50.useEffect)(() => {
      import("@wordpress/latex-to-mathml").then((module) => {
        setLatexToMathML(() => module.default);
        if (initialLatex.current) {
          __unstableMarkNextChangeAsNotPersistent();
          setAttributes({
            mathML: module.default(initialLatex.current, {
              displayMode: true
            })
          });
        }
      });
    }, [
      initialLatex,
      setAttributes,
      __unstableMarkNextChangeAsNotPersistent
    ]);
    const blockProps = (0, import_block_editor121.useBlockProps)({
      ref: setBlockRef,
      position: "relative"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime289.jsxs)("div", { ...blockProps, children: [
      mathML ? /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(
        "math",
        {
          display: "block",
          dangerouslySetInnerHTML: { __html: mathML }
        }
      ) : "\u200B",
      isSelected && /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(
        import_components62.Popover,
        {
          placement: "bottom-start",
          offset: 8,
          anchor: blockRef,
          focusOnMount: false,
          __unstableSlotName: "__unstable-block-tools-after",
          children: /* @__PURE__ */ (0, import_jsx_runtime289.jsx)("div", { style: { padding: "4px", minWidth: "300px" }, children: /* @__PURE__ */ (0, import_jsx_runtime289.jsxs)(import_components62.__experimentalVStack, { spacing: 1, children: [
            /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(
              import_components62.TextareaControl,
              {
                __next40pxDefaultSize: true,
                label: (0, import_i18n101.__)("LaTeX math syntax"),
                hideLabelFromVision: true,
                value: latex,
                className: "wp-block-math__textarea-control",
                onChange: (newLatex) => {
                  if (!latexToMathML) {
                    setAttributes({ latex: newLatex });
                    return;
                  }
                  let newMathML = "";
                  try {
                    newMathML = latexToMathML(newLatex, {
                      displayMode: true
                    });
                    setError(null);
                  } catch (err) {
                    setError(err.message);
                    (0, import_a11y.speak)(
                      (0, import_i18n101.sprintf)(
                        /* translators: %s: error message returned when parsing LaTeX. */
                        (0, import_i18n101.__)(
                          "Error parsing mathematical expression: %s"
                        ),
                        err.message
                      )
                    );
                  }
                  setAttributes({
                    mathML: newMathML,
                    latex: newLatex
                  });
                },
                placeholder: (0, import_i18n101.__)("e.g., x^2, \\frac{a}{b}")
              }
            ),
            error && /* @__PURE__ */ (0, import_jsx_runtime289.jsxs)(import_jsx_runtime289.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(
                Badge,
                {
                  intent: "error",
                  className: "wp-block-math__error",
                  children: (0, import_i18n101.sprintf)(
                    /* translators: %s: error message returned when parsing LaTeX. */
                    (0, import_i18n101.__)("Error: %s"),
                    error
                  )
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime289.jsx)("style", { children: ".wp-block-math__error .components-badge__content{white-space:normal}" })
            ] })
          ] }) })
        }
      )
    ] });
  }

  // packages/block-library/build-module/math/block.json
  var block_default48 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/math",
    title: "Math",
    category: "text",
    description: "Display mathematical notation using LaTeX.",
    keywords: ["equation", "formula", "latex", "mathematics"],
    textdomain: "default",
    supports: {
      anchor: true,
      html: false,
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true
      },
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      }
    },
    attributes: {
      latex: {
        type: "string",
        role: "content"
      },
      mathML: {
        type: "string",
        source: "html",
        selector: "math"
      }
    }
  };

  // packages/block-library/build-module/math/save.mjs
  var import_block_editor122 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime290 = __toESM(require_jsx_runtime(), 1);
  function save28({ attributes: attributes2 }) {
    const { latex, mathML } = attributes2;
    if (!latex) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime290.jsx)("div", { ...import_block_editor122.useBlockProps.save(), children: /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
      "math",
      {
        display: "block",
        dangerouslySetInnerHTML: { __html: mathML }
      }
    ) });
  }

  // packages/block-library/build-module/math/deprecated.mjs
  var import_block_editor123 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime291 = __toESM(require_jsx_runtime(), 1);
  var v123 = {
    attributes: {
      latex: {
        type: "string",
        role: "content"
      },
      mathML: {
        type: "string",
        source: "html",
        selector: "math"
      }
    },
    save({ attributes: attributes2 }) {
      const { latex, mathML } = attributes2;
      if (!latex) {
        return null;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
        "math",
        {
          ...import_block_editor123.useBlockProps.save(),
          display: "block",
          dangerouslySetInnerHTML: { __html: mathML }
        }
      );
    }
  };
  var deprecated_default26 = [v123];

  // packages/block-library/build-module/math/index.mjs
  var { name: name48 } = block_default48;
  var settings48 = {
    icon: math_default,
    example: {
      attributes: {
        latex: "x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}",
        mathML: '<semantics><mrow><mi>x</mi><mo>=</mo><mfrac><mrow><mo lspace="0em" rspace="0em">\u2212</mo><mi>b</mi><mo>\xB1</mo><msqrt><mrow><msup><mi>b</mi><mn>2</mn></msup><mo>\u2212</mo><mn>4</mn><mi>a</mi><mi>c</mi></mrow></msqrt></mrow><mrow><mn>2</mn><mi>a</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}</annotation></semantics>'
      },
      viewportWidth: 300
    },
    edit: MathEdit,
    save: save28,
    deprecated: deprecated_default26
  };
  var init48 = () => initBlock({ name: name48, metadata: block_default48, settings: settings48 });

  // packages/block-library/build-module/list-item/index.mjs
  var list_item_exports = {};
  __export(list_item_exports, {
    init: () => init49,
    metadata: () => block_default49,
    name: () => name49,
    settings: () => settings49
  });
  var import_i18n103 = __toESM(require_i18n(), 1);
  var import_block_editor131 = __toESM(require_block_editor(), 1);
  var import_blocks49 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/list-item/block.json
  var block_default49 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/list-item",
    title: "List Item",
    category: "text",
    parent: ["core/list"],
    allowedBlocks: ["core/list"],
    description: "An individual item within a list.",
    textdomain: "default",
    attributes: {
      placeholder: {
        type: "string"
      },
      content: {
        type: "rich-text",
        source: "rich-text",
        selector: "li",
        role: "content"
      }
    },
    supports: {
      anchor: true,
      className: false,
      splitting: true,
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true
      },
      color: {
        gradients: true,
        link: true,
        background: true,
        __experimentalDefaultControls: {
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    selectors: {
      root: ".wp-block-list > li",
      border: ".wp-block-list:not(.wp-block-list .wp-block-list) > li"
    }
  };

  // packages/block-library/build-module/list-item/edit.mjs
  var import_block_editor129 = __toESM(require_block_editor(), 1);
  var import_i18n102 = __toESM(require_i18n(), 1);
  var import_components63 = __toESM(require_components(), 1);
  var import_compose29 = __toESM(require_compose(), 1);
  var import_data57 = __toESM(require_data(), 1);
  var import_keycodes4 = __toESM(require_keycodes(), 1);

  // packages/block-library/build-module/list-item/hooks/use-outdent-list-item.mjs
  var import_element51 = __toESM(require_element(), 1);
  var import_data52 = __toESM(require_data(), 1);
  var import_block_editor124 = __toESM(require_block_editor(), 1);
  var import_blocks44 = __toESM(require_blocks(), 1);
  function useOutdentListItem() {
    const registry = (0, import_data52.useRegistry)();
    const {
      moveBlocksToPosition,
      removeBlock,
      insertBlock,
      updateBlockListSettings
    } = (0, import_data52.useDispatch)(import_block_editor124.store);
    const {
      getBlockRootClientId,
      getBlockName,
      getBlockOrder,
      getBlockIndex,
      getSelectedBlockClientIds,
      getBlock,
      getBlockListSettings
    } = (0, import_data52.useSelect)(import_block_editor124.store);
    function getParentListItemId(id) {
      const listId = getBlockRootClientId(id);
      const parentListItemId = getBlockRootClientId(listId);
      if (!parentListItemId) {
        return;
      }
      if (getBlockName(parentListItemId) !== "core/list-item") {
        return;
      }
      return parentListItemId;
    }
    return (0, import_element51.useCallback)((clientIds = getSelectedBlockClientIds()) => {
      if (!Array.isArray(clientIds)) {
        clientIds = [clientIds];
      }
      if (!clientIds.length) {
        return;
      }
      const firstClientId = clientIds[0];
      if (getBlockName(firstClientId) !== "core/list-item") {
        return;
      }
      const parentListItemId = getParentListItemId(firstClientId);
      if (!parentListItemId) {
        return;
      }
      const parentListId = getBlockRootClientId(firstClientId);
      const lastClientId = clientIds[clientIds.length - 1];
      const order = getBlockOrder(parentListId);
      const followingListItems = order.slice(
        getBlockIndex(lastClientId) + 1
      );
      registry.batch(() => {
        if (followingListItems.length) {
          let nestedListId = getBlockOrder(firstClientId)[0];
          if (!nestedListId) {
            const nestedListBlock = (0, import_blocks44.cloneBlock)(
              getBlock(parentListId),
              {},
              []
            );
            nestedListId = nestedListBlock.clientId;
            insertBlock(nestedListBlock, 0, firstClientId, false);
            updateBlockListSettings(
              nestedListId,
              getBlockListSettings(parentListId)
            );
          }
          moveBlocksToPosition(
            followingListItems,
            parentListId,
            nestedListId
          );
        }
        moveBlocksToPosition(
          clientIds,
          parentListId,
          getBlockRootClientId(parentListItemId),
          getBlockIndex(parentListItemId) + 1
        );
        if (!getBlockOrder(parentListId).length) {
          const shouldSelectParent = false;
          removeBlock(parentListId, shouldSelectParent);
        }
      });
      return true;
    }, []);
  }

  // packages/block-library/build-module/list-item/hooks/use-indent-list-item.mjs
  var import_element52 = __toESM(require_element(), 1);
  var import_data53 = __toESM(require_data(), 1);
  var import_block_editor125 = __toESM(require_block_editor(), 1);
  var import_blocks45 = __toESM(require_blocks(), 1);
  function useIndentListItem(clientId) {
    const { replaceBlocks, selectionChange, multiSelect } = (0, import_data53.useDispatch)(import_block_editor125.store);
    const {
      getBlock,
      getPreviousBlockClientId,
      getSelectionStart,
      getSelectionEnd,
      hasMultiSelection,
      getMultiSelectedBlockClientIds
    } = (0, import_data53.useSelect)(import_block_editor125.store);
    return (0, import_element52.useCallback)(() => {
      const _hasMultiSelection = hasMultiSelection();
      const clientIds = _hasMultiSelection ? getMultiSelectedBlockClientIds() : [clientId];
      const clonedBlocks = clientIds.map(
        (_clientId) => (0, import_blocks45.cloneBlock)(getBlock(_clientId))
      );
      const previousSiblingId = getPreviousBlockClientId(clientId);
      const newListItem = (0, import_blocks45.cloneBlock)(getBlock(previousSiblingId));
      if (!newListItem.innerBlocks?.length) {
        newListItem.innerBlocks = [(0, import_blocks45.createBlock)("core/list")];
      }
      newListItem.innerBlocks[newListItem.innerBlocks.length - 1].innerBlocks.push(...clonedBlocks);
      const selectionStart = getSelectionStart();
      const selectionEnd = getSelectionEnd();
      replaceBlocks([previousSiblingId, ...clientIds], [newListItem]);
      if (!_hasMultiSelection) {
        selectionChange(
          clonedBlocks[0].clientId,
          selectionEnd.attributeKey,
          selectionEnd.clientId === selectionStart.clientId ? selectionStart.offset : selectionEnd.offset,
          selectionEnd.offset
        );
      } else {
        multiSelect(
          clonedBlocks[0].clientId,
          clonedBlocks[clonedBlocks.length - 1].clientId
        );
      }
      return true;
    }, [clientId]);
  }

  // packages/block-library/build-module/list-item/hooks/use-enter.mjs
  var import_blocks46 = __toESM(require_blocks(), 1);
  var import_element53 = __toESM(require_element(), 1);
  var import_compose27 = __toESM(require_compose(), 1);
  var import_keycodes2 = __toESM(require_keycodes(), 1);
  var import_data54 = __toESM(require_data(), 1);
  var import_block_editor126 = __toESM(require_block_editor(), 1);
  function useEnter2(props) {
    const { replaceBlocks, selectionChange } = (0, import_data54.useDispatch)(import_block_editor126.store);
    const { getBlock, getBlockRootClientId, getBlockIndex, getBlockName } = (0, import_data54.useSelect)(import_block_editor126.store);
    const propsRef = (0, import_element53.useRef)(props);
    propsRef.current = props;
    const outdentListItem = useOutdentListItem();
    return (0, import_compose27.useRefEffect)((element) => {
      function onKeyDown(event) {
        if (event.defaultPrevented || event.keyCode !== import_keycodes2.ENTER) {
          return;
        }
        const { content, clientId } = propsRef.current;
        if (content.length) {
          return;
        }
        event.preventDefault();
        const canOutdent = getBlockName(
          getBlockRootClientId(
            getBlockRootClientId(propsRef.current.clientId)
          )
        ) === "core/list-item";
        if (canOutdent) {
          outdentListItem();
          return;
        }
        const topParentListBlock = getBlock(
          getBlockRootClientId(clientId)
        );
        const blockIndex = getBlockIndex(clientId);
        const head = (0, import_blocks46.cloneBlock)({
          ...topParentListBlock,
          innerBlocks: topParentListBlock.innerBlocks.slice(
            0,
            blockIndex
          )
        });
        const middle = (0, import_blocks46.createBlock)((0, import_blocks46.getDefaultBlockName)());
        const after = [
          ...topParentListBlock.innerBlocks[blockIndex].innerBlocks[0]?.innerBlocks || [],
          ...topParentListBlock.innerBlocks.slice(blockIndex + 1)
        ];
        const tail = after.length ? [
          (0, import_blocks46.cloneBlock)({
            ...topParentListBlock,
            innerBlocks: after
          })
        ] : [];
        replaceBlocks(
          topParentListBlock.clientId,
          [head, middle, ...tail],
          1
        );
        selectionChange(middle.clientId);
      }
      element.addEventListener("keydown", onKeyDown);
      return () => {
        element.removeEventListener("keydown", onKeyDown);
      };
    }, []);
  }

  // packages/block-library/build-module/list-item/hooks/use-space.mjs
  var import_compose28 = __toESM(require_compose(), 1);
  var import_keycodes3 = __toESM(require_keycodes(), 1);
  var import_block_editor127 = __toESM(require_block_editor(), 1);
  var import_data55 = __toESM(require_data(), 1);
  function useSpace(clientId) {
    const { getSelectionStart, getSelectionEnd, getBlockIndex } = (0, import_data55.useSelect)(import_block_editor127.store);
    const indentListItem = useIndentListItem(clientId);
    const outdentListItem = useOutdentListItem();
    return (0, import_compose28.useRefEffect)(
      (element) => {
        function onKeyDown(event) {
          const { keyCode, shiftKey, altKey, metaKey, ctrlKey } = event;
          if (event.defaultPrevented || keyCode !== import_keycodes3.SPACE && keyCode !== import_keycodes3.TAB || // Only override when no modifiers are pressed.
          altKey || metaKey || ctrlKey) {
            return;
          }
          const selectionStart = getSelectionStart();
          const selectionEnd = getSelectionEnd();
          if (selectionStart.offset === 0 && selectionEnd.offset === 0) {
            if (shiftKey) {
              if (keyCode === import_keycodes3.TAB) {
                if (outdentListItem()) {
                  event.preventDefault();
                }
              }
            } else if (getBlockIndex(clientId) !== 0) {
              if (indentListItem()) {
                event.preventDefault();
              }
            }
          }
        }
        element.addEventListener("keydown", onKeyDown);
        return () => {
          element.removeEventListener("keydown", onKeyDown);
        };
      },
      [clientId, indentListItem]
    );
  }

  // packages/block-library/build-module/list-item/hooks/use-merge.mjs
  var import_data56 = __toESM(require_data(), 1);
  var import_block_editor128 = __toESM(require_block_editor(), 1);
  var import_blocks47 = __toESM(require_blocks(), 1);
  function useMerge(clientId, onMerge) {
    const registry = (0, import_data56.useRegistry)();
    const {
      getPreviousBlockClientId,
      getNextBlockClientId,
      getBlockOrder,
      getBlockRootClientId,
      getBlockName,
      getBlock
    } = (0, import_data56.useSelect)(import_block_editor128.store);
    const { mergeBlocks, moveBlocksToPosition, removeBlock } = (0, import_data56.useDispatch)(import_block_editor128.store);
    const outdentListItem = useOutdentListItem();
    function getTrailingId(id) {
      const order = getBlockOrder(id);
      if (!order.length) {
        return id;
      }
      return getTrailingId(order[order.length - 1]);
    }
    function getParentListItemId(id) {
      const listId = getBlockRootClientId(id);
      const parentListItemId = getBlockRootClientId(listId);
      if (!parentListItemId) {
        return;
      }
      if (getBlockName(parentListItemId) !== "core/list-item") {
        return;
      }
      return parentListItemId;
    }
    function _getNextId(id) {
      const next = getNextBlockClientId(id);
      if (next) {
        return next;
      }
      const parentListItemId = getParentListItemId(id);
      if (!parentListItemId) {
        return;
      }
      return _getNextId(parentListItemId);
    }
    function getNextId(id) {
      const order = getBlockOrder(id);
      if (!order.length) {
        return _getNextId(id);
      }
      return getBlockOrder(order[0])[0];
    }
    return (forward) => {
      function mergeWithNested(clientIdA, clientIdB) {
        registry.batch(() => {
          const [nestedListClientId] = getBlockOrder(clientIdB);
          if (nestedListClientId) {
            if (getPreviousBlockClientId(clientIdB) === clientIdA && !getBlockOrder(clientIdA).length) {
              moveBlocksToPosition(
                [nestedListClientId],
                clientIdB,
                clientIdA
              );
            } else {
              moveBlocksToPosition(
                getBlockOrder(nestedListClientId),
                nestedListClientId,
                getBlockRootClientId(clientIdA)
              );
            }
          }
          mergeBlocks(clientIdA, clientIdB);
        });
      }
      if (forward) {
        const nextBlockClientId = getNextId(clientId);
        if (!nextBlockClientId) {
          onMerge(forward);
          return;
        }
        if (getParentListItemId(nextBlockClientId)) {
          outdentListItem(nextBlockClientId);
        } else {
          mergeWithNested(clientId, nextBlockClientId);
        }
      } else {
        if (getParentListItemId(clientId)) {
          outdentListItem(clientId);
          return;
        }
        const previousBlockClientId = getPreviousBlockClientId(clientId);
        if (previousBlockClientId) {
          const trailingId = getTrailingId(previousBlockClientId);
          mergeWithNested(trailingId, clientId);
          return;
        }
        const blockOrder = getBlockOrder(clientId);
        if ((0, import_blocks47.isUnmodifiedBlock)(getBlock(clientId), "content") && blockOrder.length > 0) {
          registry.batch(() => {
            outdentListItem(getBlockOrder(blockOrder[0]));
            removeBlock(clientId, true);
          });
        } else {
          onMerge(forward);
        }
      }
    };
  }

  // packages/block-library/build-module/list-item/edit.mjs
  var import_jsx_runtime292 = __toESM(require_jsx_runtime(), 1);
  function IndentUI2({ clientId }) {
    const indentListItem = useIndentListItem(clientId);
    const outdentListItem = useOutdentListItem();
    const { canIndent, canOutdent } = (0, import_data57.useSelect)(
      (select9) => {
        const { getBlockIndex, getBlockRootClientId, getBlockName } = select9(import_block_editor129.store);
        return {
          canIndent: getBlockIndex(clientId) > 0,
          canOutdent: getBlockName(
            getBlockRootClientId(getBlockRootClientId(clientId))
          ) === "core/list-item"
        };
      },
      [clientId]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime292.jsxs)(import_jsx_runtime292.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime292.jsx)(
        import_components63.ToolbarButton,
        {
          icon: (0, import_i18n102.isRTL)() ? format_outdent_rtl_default : format_outdent_default,
          title: (0, import_i18n102.__)("Outdent"),
          shortcut: import_keycodes4.displayShortcut.shift("Tab"),
          description: (0, import_i18n102.__)("Outdent list item"),
          disabled: !canOutdent,
          onClick: () => outdentListItem()
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime292.jsx)(
        import_components63.ToolbarButton,
        {
          icon: (0, import_i18n102.isRTL)() ? format_indent_rtl_default : format_indent_default,
          title: (0, import_i18n102.__)("Indent"),
          shortcut: "Tab",
          description: (0, import_i18n102.__)("Indent list item"),
          disabled: !canIndent,
          onClick: () => indentListItem()
        }
      )
    ] });
  }
  function ListItemEdit({
    attributes: attributes2,
    setAttributes,
    clientId,
    mergeBlocks
  }) {
    const { placeholder: placeholder2, content } = attributes2;
    const blockProps = (0, import_block_editor129.useBlockProps)();
    const innerBlocksProps = (0, import_block_editor129.useInnerBlocksProps)(blockProps, {
      renderAppender: false,
      __unstableDisableDropZone: true
    });
    const useEnterRef = useEnter2({ content, clientId });
    const useSpaceRef = useSpace(clientId);
    const onMerge = useMerge(clientId, mergeBlocks);
    return /* @__PURE__ */ (0, import_jsx_runtime292.jsxs)(import_jsx_runtime292.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime292.jsxs)("li", { ...innerBlocksProps, children: [
        /* @__PURE__ */ (0, import_jsx_runtime292.jsx)(
          import_block_editor129.RichText,
          {
            ref: (0, import_compose29.useMergeRefs)([useEnterRef, useSpaceRef]),
            identifier: "content",
            tagName: "div",
            onChange: (nextContent) => setAttributes({ content: nextContent }),
            value: content,
            "aria-label": (0, import_i18n102.__)("List text"),
            placeholder: placeholder2 || (0, import_i18n102.__)("List"),
            onMerge
          }
        ),
        innerBlocksProps.children
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime292.jsx)(import_block_editor129.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime292.jsx)(IndentUI2, { clientId }) })
    ] });
  }

  // packages/block-library/build-module/list-item/save.mjs
  var import_block_editor130 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime293 = __toESM(require_jsx_runtime(), 1);
  function save29({ attributes: attributes2 }) {
    return /* @__PURE__ */ (0, import_jsx_runtime293.jsxs)("li", { ...import_block_editor130.useBlockProps.save(), children: [
      /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(import_block_editor130.RichText.Content, { value: attributes2.content }),
      /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(import_block_editor130.InnerBlocks.Content, {})
    ] });
  }

  // packages/block-library/build-module/list-item/transforms.mjs
  var import_blocks48 = __toESM(require_blocks(), 1);
  var transforms15 = {
    to: [
      {
        type: "block",
        blocks: ["core/paragraph"],
        transform: (attributes2, innerBlocks = []) => [
          (0, import_blocks48.createBlock)("core/paragraph", attributes2),
          ...innerBlocks.map((block) => (0, import_blocks48.cloneBlock)(block))
        ]
      }
    ]
  };
  var transforms_default16 = transforms15;

  // packages/block-library/build-module/list-item/index.mjs
  var { fieldsKey: fieldsKey9, formKey: formKey9 } = unlock(import_blocks49.privateApis);
  var { name: name49 } = block_default49;
  var settings49 = {
    icon: list_item_default,
    edit: ListItemEdit,
    save: save29,
    merge(attributes2, attributesToMerge) {
      return {
        ...attributes2,
        content: attributes2.content + attributesToMerge.content
      };
    },
    transforms: transforms_default16,
    [unlock(import_block_editor131.privateApis).requiresWrapperOnCopy]: true,
    __experimentalLabel(attributes2, { context }) {
      const { content } = attributes2;
      const customName = attributes2?.metadata?.name;
      const hasContent = content?.trim().length > 0;
      if (context === "list-view" && (customName || hasContent)) {
        return customName || content;
      }
      if (context === "breadcrumb" && customName) {
        return customName;
      }
    }
  };
  if (window.__experimentalContentOnlyInspectorFields) {
    settings49[fieldsKey9] = [
      {
        id: "content",
        label: (0, import_i18n103.__)("Content"),
        type: "text",
        Edit: "rich-text"
        // TODO: replace with custom component
      }
    ];
    settings49[formKey9] = {
      fields: ["content"]
    };
  }
  var init49 = () => initBlock({ name: name49, metadata: block_default49, settings: settings49 });

  // packages/block-library/build-module/loginout/index.mjs
  var loginout_exports = {};
  __export(loginout_exports, {
    init: () => init50,
    metadata: () => block_default50,
    name: () => name50,
    settings: () => settings50
  });

  // packages/block-library/build-module/loginout/edit.mjs
  var import_block_editor132 = __toESM(require_block_editor(), 1);
  var import_components64 = __toESM(require_components(), 1);
  var import_i18n104 = __toESM(require_i18n(), 1);
  var import_jsx_runtime294 = __toESM(require_jsx_runtime(), 1);
  function LoginOutEdit({ attributes: attributes2, setAttributes }) {
    const { displayLoginAsForm, redirectToCurrent } = attributes2;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(import_jsx_runtime294.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(import_block_editor132.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(
        import_components64.__experimentalToolsPanel,
        {
          label: (0, import_i18n104.__)("Settings"),
          resetAll: () => {
            setAttributes({
              displayLoginAsForm: false,
              redirectToCurrent: true
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
              import_components64.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n104.__)("Display login as form"),
                isShownByDefault: true,
                hasValue: () => displayLoginAsForm,
                onDeselect: () => setAttributes({ displayLoginAsForm: false }),
                children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
                  import_components64.ToggleControl,
                  {
                    label: (0, import_i18n104.__)("Display login as form"),
                    checked: displayLoginAsForm,
                    onChange: () => setAttributes({
                      displayLoginAsForm: !displayLoginAsForm
                    })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
              import_components64.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n104.__)("Redirect to current URL"),
                isShownByDefault: true,
                hasValue: () => !redirectToCurrent,
                onDeselect: () => setAttributes({ redirectToCurrent: true }),
                children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
                  import_components64.ToggleControl,
                  {
                    label: (0, import_i18n104.__)("Redirect to current URL"),
                    checked: redirectToCurrent,
                    onChange: () => setAttributes({
                      redirectToCurrent: !redirectToCurrent
                    })
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
        "div",
        {
          ...(0, import_block_editor132.useBlockProps)({
            className: "logged-in"
          }),
          children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)("a", { href: "#login-pseudo-link", children: (0, import_i18n104.__)("Log out") })
        }
      )
    ] });
  }

  // packages/block-library/build-module/loginout/block.json
  var block_default50 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/loginout",
    title: "Login/out",
    category: "theme",
    description: "Show login & logout links.",
    keywords: ["login", "logout", "form"],
    textdomain: "default",
    attributes: {
      displayLoginAsForm: {
        type: "boolean",
        default: false
      },
      redirectToCurrent: {
        type: "boolean",
        default: true
      }
    },
    example: {
      viewportWidth: 350
    },
    supports: {
      anchor: true,
      className: true,
      color: {
        background: true,
        text: false,
        gradients: true,
        link: true
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      interactivity: {
        clientNavigation: true
      }
    },
    style: "wp-block-loginout"
  };

  // packages/block-library/build-module/loginout/index.mjs
  var { name: name50 } = block_default50;
  var settings50 = {
    icon: login_default,
    edit: LoginOutEdit
  };
  var init50 = () => initBlock({ name: name50, metadata: block_default50, settings: settings50 });

  // packages/block-library/build-module/media-text/index.mjs
  var media_text_exports = {};
  __export(media_text_exports, {
    init: () => init51,
    metadata: () => block_default51,
    name: () => name51,
    settings: () => settings51
  });
  var import_i18n108 = __toESM(require_i18n(), 1);
  var import_blocks51 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/media-text/deprecated.mjs
  var import_block_editor133 = __toESM(require_block_editor(), 1);
  var import_compose30 = __toESM(require_compose(), 1);

  // packages/block-library/build-module/media-text/constants.mjs
  var import_i18n105 = __toESM(require_i18n(), 1);
  var DEFAULT_MEDIA_SIZE_SLUG4 = "full";
  var WIDTH_CONSTRAINT_PERCENTAGE = 15;
  var LINK_DESTINATION_NONE3 = "none";
  var LINK_DESTINATION_MEDIA3 = "media";
  var LINK_DESTINATION_ATTACHMENT3 = "attachment";
  var TEMPLATE10 = [
    [
      "core/paragraph",
      {
        placeholder: (0, import_i18n105._x)("Content\u2026", "content placeholder")
      }
    ]
  ];

  // packages/block-library/build-module/media-text/deprecated.mjs
  var import_jsx_runtime295 = __toESM(require_jsx_runtime(), 1);
  var v1ToV5ImageFillStyles = (url, focalPoint) => {
    return url ? {
      backgroundImage: `url(${url})`,
      backgroundPosition: focalPoint ? `${focalPoint.x * 100}% ${focalPoint.y * 100}%` : `50% 50%`
    } : {};
  };
  var v6ToV7ImageFillStyles = (url, focalPoint) => {
    return url ? {
      backgroundImage: `url(${url})`,
      backgroundPosition: focalPoint ? `${Math.round(focalPoint.x * 100)}% ${Math.round(
        focalPoint.y * 100
      )}%` : `50% 50%`
    } : {};
  };
  var DEFAULT_MEDIA_WIDTH = 50;
  var noop = () => {
  };
  var migrateCustomColors3 = (attributes2) => {
    if (!attributes2.customBackgroundColor) {
      return attributes2;
    }
    const style2 = {
      color: {
        background: attributes2.customBackgroundColor
      }
    };
    const { customBackgroundColor, ...restAttributes } = attributes2;
    return {
      ...restAttributes,
      style: style2
    };
  };
  var migrateDefaultAlign = (attributes2) => {
    if (attributes2.align) {
      return attributes2;
    }
    return {
      ...attributes2,
      align: "wide"
    };
  };
  var v0Attributes = {
    align: {
      type: "string",
      default: "wide"
    },
    mediaAlt: {
      type: "string",
      source: "attribute",
      selector: "figure img",
      attribute: "alt",
      default: ""
    },
    mediaPosition: {
      type: "string",
      default: "left"
    },
    mediaId: {
      type: "number"
    },
    mediaType: {
      type: "string"
    },
    mediaWidth: {
      type: "number",
      default: 50
    },
    isStackedOnMobile: {
      type: "boolean",
      default: false
    }
  };
  var v4ToV5BlockAttributes = {
    ...v0Attributes,
    isStackedOnMobile: {
      type: "boolean",
      default: true
    },
    mediaUrl: {
      type: "string",
      source: "attribute",
      selector: "figure video,figure img",
      attribute: "src"
    },
    mediaLink: {
      type: "string"
    },
    linkDestination: {
      type: "string"
    },
    linkTarget: {
      type: "string",
      source: "attribute",
      selector: "figure a",
      attribute: "target"
    },
    href: {
      type: "string",
      source: "attribute",
      selector: "figure a",
      attribute: "href"
    },
    rel: {
      type: "string",
      source: "attribute",
      selector: "figure a",
      attribute: "rel"
    },
    linkClass: {
      type: "string",
      source: "attribute",
      selector: "figure a",
      attribute: "class"
    },
    mediaSizeSlug: {
      type: "string"
    },
    verticalAlignment: {
      type: "string"
    },
    imageFill: {
      type: "boolean"
    },
    focalPoint: {
      type: "object"
    }
  };
  var v6Attributes = {
    ...v4ToV5BlockAttributes,
    mediaAlt: {
      type: "string",
      source: "attribute",
      selector: "figure img",
      attribute: "alt",
      default: "",
      role: "content"
    },
    mediaId: {
      type: "number",
      role: "content"
    },
    mediaUrl: {
      type: "string",
      source: "attribute",
      selector: "figure video,figure img",
      attribute: "src",
      role: "content"
    },
    href: {
      type: "string",
      source: "attribute",
      selector: "figure a",
      attribute: "href",
      role: "content"
    },
    mediaType: {
      type: "string",
      role: "content"
    }
  };
  var v7Attributes = {
    ...v6Attributes,
    align: {
      type: "string",
      // v7 changed the default for the `align` attribute.
      default: "none"
    },
    // New attribute.
    useFeaturedImage: {
      type: "boolean",
      default: false
    }
  };
  var v4ToV5Supports = {
    anchor: true,
    align: ["wide", "full"],
    html: false,
    color: {
      gradients: true,
      link: true
    }
  };
  var v6Supports = {
    ...v4ToV5Supports,
    color: {
      gradients: true,
      link: true,
      __experimentalDefaultControls: {
        background: true,
        text: true
      }
    },
    spacing: {
      margin: true,
      padding: true
    },
    typography: {
      fontSize: true,
      lineHeight: true,
      __experimentalFontFamily: true,
      __experimentalFontWeight: true,
      __experimentalFontStyle: true,
      __experimentalTextTransform: true,
      __experimentalTextDecoration: true,
      __experimentalLetterSpacing: true,
      __experimentalDefaultControls: {
        fontSize: true
      }
    }
  };
  var v7Supports = {
    ...v6Supports,
    __experimentalBorder: {
      color: true,
      radius: true,
      style: true,
      width: true,
      __experimentalDefaultControls: {
        color: true,
        radius: true,
        style: true,
        width: true
      }
    },
    color: {
      gradients: true,
      heading: true,
      link: true,
      __experimentalDefaultControls: {
        background: true,
        text: true
      }
    },
    interactivity: {
      clientNavigation: true
    }
  };
  var v74 = {
    attributes: v7Attributes,
    supports: v7Supports,
    usesContext: ["postId", "postType"],
    save({ attributes: attributes2 }) {
      const {
        isStackedOnMobile,
        mediaAlt,
        mediaPosition: mediaPosition3,
        mediaType,
        mediaUrl,
        mediaWidth,
        mediaId,
        verticalAlignment,
        imageFill,
        focalPoint,
        linkClass,
        href,
        linkTarget,
        rel
      } = attributes2;
      const mediaSizeSlug = attributes2.mediaSizeSlug || DEFAULT_MEDIA_SIZE_SLUG4;
      const newRel = !rel ? void 0 : rel;
      const imageClasses = clsx_default({
        [`wp-image-${mediaId}`]: mediaId && mediaType === "image",
        [`size-${mediaSizeSlug}`]: mediaId && mediaType === "image"
      });
      let image = mediaUrl ? /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
        "img",
        {
          src: mediaUrl,
          alt: mediaAlt,
          className: imageClasses || null
        }
      ) : null;
      if (href) {
        image = /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
          "a",
          {
            className: linkClass,
            href,
            target: linkTarget,
            rel: newRel,
            children: image
          }
        );
      }
      const mediaTypeRenders = {
        image: () => image,
        video: () => /* @__PURE__ */ (0, import_jsx_runtime295.jsx)("video", { controls: true, src: mediaUrl })
      };
      const className = clsx_default({
        "has-media-on-the-right": "right" === mediaPosition3,
        "is-stacked-on-mobile": isStackedOnMobile,
        [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
        "is-image-fill": imageFill
      });
      const backgroundStyles = imageFill ? v6ToV7ImageFillStyles(mediaUrl, focalPoint) : {};
      let gridTemplateColumns;
      if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
        gridTemplateColumns = "right" === mediaPosition3 ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
      }
      const style2 = {
        gridTemplateColumns
      };
      if ("right" === mediaPosition3) {
        return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)("div", { ...import_block_editor133.useBlockProps.save({ className, style: style2 }), children: [
          /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
            "div",
            {
              ...import_block_editor133.useInnerBlocksProps.save({
                className: "wp-block-media-text__content"
              })
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
            "figure",
            {
              className: "wp-block-media-text__media",
              style: backgroundStyles,
              children: (mediaTypeRenders[mediaType] || noop)()
            }
          )
        ] });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)("div", { ...import_block_editor133.useBlockProps.save({ className, style: style2 }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
          "figure",
          {
            className: "wp-block-media-text__media",
            style: backgroundStyles,
            children: (mediaTypeRenders[mediaType] || noop)()
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
          "div",
          {
            ...import_block_editor133.useInnerBlocksProps.save({
              className: "wp-block-media-text__content"
            })
          }
        )
      ] });
    }
  };
  var v65 = {
    attributes: v6Attributes,
    supports: v6Supports,
    save({ attributes: attributes2 }) {
      const {
        isStackedOnMobile,
        mediaAlt,
        mediaPosition: mediaPosition3,
        mediaType,
        mediaUrl,
        mediaWidth,
        mediaId,
        verticalAlignment,
        imageFill,
        focalPoint,
        linkClass,
        href,
        linkTarget,
        rel
      } = attributes2;
      const mediaSizeSlug = attributes2.mediaSizeSlug || DEFAULT_MEDIA_SIZE_SLUG4;
      const newRel = !rel ? void 0 : rel;
      const imageClasses = clsx_default({
        [`wp-image-${mediaId}`]: mediaId && mediaType === "image",
        [`size-${mediaSizeSlug}`]: mediaId && mediaType === "image"
      });
      let image = /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
        "img",
        {
          src: mediaUrl,
          alt: mediaAlt,
          className: imageClasses || null
        }
      );
      if (href) {
        image = /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
          "a",
          {
            className: linkClass,
            href,
            target: linkTarget,
            rel: newRel,
            children: image
          }
        );
      }
      const mediaTypeRenders = {
        image: () => image,
        video: () => /* @__PURE__ */ (0, import_jsx_runtime295.jsx)("video", { controls: true, src: mediaUrl })
      };
      const className = clsx_default({
        "has-media-on-the-right": "right" === mediaPosition3,
        "is-stacked-on-mobile": isStackedOnMobile,
        [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
        "is-image-fill": imageFill
      });
      const backgroundStyles = imageFill ? v6ToV7ImageFillStyles(mediaUrl, focalPoint) : {};
      let gridTemplateColumns;
      if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
        gridTemplateColumns = "right" === mediaPosition3 ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
      }
      const style2 = {
        gridTemplateColumns
      };
      if ("right" === mediaPosition3) {
        return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)("div", { ...import_block_editor133.useBlockProps.save({ className, style: style2 }), children: [
          /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
            "div",
            {
              ...import_block_editor133.useInnerBlocksProps.save({
                className: "wp-block-media-text__content"
              })
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
            "figure",
            {
              className: "wp-block-media-text__media",
              style: backgroundStyles,
              children: (mediaTypeRenders[mediaType] || noop)()
            }
          )
        ] });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)("div", { ...import_block_editor133.useBlockProps.save({ className, style: style2 }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
          "figure",
          {
            className: "wp-block-media-text__media",
            style: backgroundStyles,
            children: (mediaTypeRenders[mediaType] || noop)()
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
          "div",
          {
            ...import_block_editor133.useInnerBlocksProps.save({
              className: "wp-block-media-text__content"
            })
          }
        )
      ] });
    },
    migrate: migrateDefaultAlign,
    isEligible(attributes2, innerBlocks, { block }) {
      const { attributes: finalizedAttributes } = block;
      return attributes2.align === void 0 && !!finalizedAttributes.className?.includes("alignwide");
    }
  };
  var v55 = {
    attributes: v4ToV5BlockAttributes,
    supports: v4ToV5Supports,
    save({ attributes: attributes2 }) {
      const {
        isStackedOnMobile,
        mediaAlt,
        mediaPosition: mediaPosition3,
        mediaType,
        mediaUrl,
        mediaWidth,
        mediaId,
        verticalAlignment,
        imageFill,
        focalPoint,
        linkClass,
        href,
        linkTarget,
        rel
      } = attributes2;
      const mediaSizeSlug = attributes2.mediaSizeSlug || DEFAULT_MEDIA_SIZE_SLUG4;
      const newRel = !rel ? void 0 : rel;
      const imageClasses = clsx_default({
        [`wp-image-${mediaId}`]: mediaId && mediaType === "image",
        [`size-${mediaSizeSlug}`]: mediaId && mediaType === "image"
      });
      let image = /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
        "img",
        {
          src: mediaUrl,
          alt: mediaAlt,
          className: imageClasses || null
        }
      );
      if (href) {
        image = /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
          "a",
          {
            className: linkClass,
            href,
            target: linkTarget,
            rel: newRel,
            children: image
          }
        );
      }
      const mediaTypeRenders = {
        image: () => image,
        video: () => /* @__PURE__ */ (0, import_jsx_runtime295.jsx)("video", { controls: true, src: mediaUrl })
      };
      const className = clsx_default({
        "has-media-on-the-right": "right" === mediaPosition3,
        "is-stacked-on-mobile": isStackedOnMobile,
        [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
        "is-image-fill": imageFill
      });
      const backgroundStyles = imageFill ? v1ToV5ImageFillStyles(mediaUrl, focalPoint) : {};
      let gridTemplateColumns;
      if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
        gridTemplateColumns = "right" === mediaPosition3 ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
      }
      const style2 = {
        gridTemplateColumns
      };
      if ("right" === mediaPosition3) {
        return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)("div", { ...import_block_editor133.useBlockProps.save({ className, style: style2 }), children: [
          /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
            "div",
            {
              ...import_block_editor133.useInnerBlocksProps.save({
                className: "wp-block-media-text__content"
              })
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
            "figure",
            {
              className: "wp-block-media-text__media",
              style: backgroundStyles,
              children: (mediaTypeRenders[mediaType] || noop)()
            }
          )
        ] });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)("div", { ...import_block_editor133.useBlockProps.save({ className, style: style2 }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
          "figure",
          {
            className: "wp-block-media-text__media",
            style: backgroundStyles,
            children: (mediaTypeRenders[mediaType] || noop)()
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
          "div",
          {
            ...import_block_editor133.useInnerBlocksProps.save({
              className: "wp-block-media-text__content"
            })
          }
        )
      ] });
    },
    migrate: migrateDefaultAlign
  };
  var v45 = {
    attributes: v4ToV5BlockAttributes,
    supports: v4ToV5Supports,
    save({ attributes: attributes2 }) {
      const {
        isStackedOnMobile,
        mediaAlt,
        mediaPosition: mediaPosition3,
        mediaType,
        mediaUrl,
        mediaWidth,
        mediaId,
        verticalAlignment,
        imageFill,
        focalPoint,
        linkClass,
        href,
        linkTarget,
        rel
      } = attributes2;
      const mediaSizeSlug = attributes2.mediaSizeSlug || DEFAULT_MEDIA_SIZE_SLUG4;
      const newRel = !rel ? void 0 : rel;
      const imageClasses = clsx_default({
        [`wp-image-${mediaId}`]: mediaId && mediaType === "image",
        [`size-${mediaSizeSlug}`]: mediaId && mediaType === "image"
      });
      let image = /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
        "img",
        {
          src: mediaUrl,
          alt: mediaAlt,
          className: imageClasses || null
        }
      );
      if (href) {
        image = /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
          "a",
          {
            className: linkClass,
            href,
            target: linkTarget,
            rel: newRel,
            children: image
          }
        );
      }
      const mediaTypeRenders = {
        image: () => image,
        video: () => /* @__PURE__ */ (0, import_jsx_runtime295.jsx)("video", { controls: true, src: mediaUrl })
      };
      const className = clsx_default({
        "has-media-on-the-right": "right" === mediaPosition3,
        "is-stacked-on-mobile": isStackedOnMobile,
        [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
        "is-image-fill": imageFill
      });
      const backgroundStyles = imageFill ? v1ToV5ImageFillStyles(mediaUrl, focalPoint) : {};
      let gridTemplateColumns;
      if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
        gridTemplateColumns = "right" === mediaPosition3 ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
      }
      const style2 = {
        gridTemplateColumns
      };
      return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)("div", { ...import_block_editor133.useBlockProps.save({ className, style: style2 }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
          "figure",
          {
            className: "wp-block-media-text__media",
            style: backgroundStyles,
            children: (mediaTypeRenders[mediaType] || noop)()
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
          "div",
          {
            ...import_block_editor133.useInnerBlocksProps.save({
              className: "wp-block-media-text__content"
            })
          }
        )
      ] });
    },
    migrate: migrateDefaultAlign
  };
  var v37 = {
    attributes: {
      ...v0Attributes,
      isStackedOnMobile: {
        type: "boolean",
        default: true
      },
      backgroundColor: {
        type: "string"
      },
      customBackgroundColor: {
        type: "string"
      },
      mediaLink: {
        type: "string"
      },
      linkDestination: {
        type: "string"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "figure a",
        attribute: "target"
      },
      href: {
        type: "string",
        source: "attribute",
        selector: "figure a",
        attribute: "href"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "figure a",
        attribute: "rel"
      },
      linkClass: {
        type: "string",
        source: "attribute",
        selector: "figure a",
        attribute: "class"
      },
      verticalAlignment: {
        type: "string"
      },
      imageFill: {
        type: "boolean"
      },
      focalPoint: {
        type: "object"
      }
    },
    migrate: (0, import_compose30.compose)(migrateCustomColors3, migrateDefaultAlign),
    save({ attributes: attributes2 }) {
      const {
        backgroundColor,
        customBackgroundColor,
        isStackedOnMobile,
        mediaAlt,
        mediaPosition: mediaPosition3,
        mediaType,
        mediaUrl,
        mediaWidth,
        mediaId,
        verticalAlignment,
        imageFill,
        focalPoint,
        linkClass,
        href,
        linkTarget,
        rel
      } = attributes2;
      const newRel = !rel ? void 0 : rel;
      let image = /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
        "img",
        {
          src: mediaUrl,
          alt: mediaAlt,
          className: mediaId && mediaType === "image" ? `wp-image-${mediaId}` : null
        }
      );
      if (href) {
        image = /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
          "a",
          {
            className: linkClass,
            href,
            target: linkTarget,
            rel: newRel,
            children: image
          }
        );
      }
      const mediaTypeRenders = {
        image: () => image,
        video: () => /* @__PURE__ */ (0, import_jsx_runtime295.jsx)("video", { controls: true, src: mediaUrl })
      };
      const backgroundClass = (0, import_block_editor133.getColorClassName)(
        "background-color",
        backgroundColor
      );
      const className = clsx_default({
        "has-media-on-the-right": "right" === mediaPosition3,
        "has-background": backgroundClass || customBackgroundColor,
        [backgroundClass]: backgroundClass,
        "is-stacked-on-mobile": isStackedOnMobile,
        [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
        "is-image-fill": imageFill
      });
      const backgroundStyles = imageFill ? v1ToV5ImageFillStyles(mediaUrl, focalPoint) : {};
      let gridTemplateColumns;
      if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
        gridTemplateColumns = "right" === mediaPosition3 ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
      }
      const style2 = {
        backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
        gridTemplateColumns
      };
      return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)("div", { className, style: style2, children: [
        /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
          "figure",
          {
            className: "wp-block-media-text__media",
            style: backgroundStyles,
            children: (mediaTypeRenders[mediaType] || noop)()
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime295.jsx)("div", { className: "wp-block-media-text__content", children: /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(import_block_editor133.InnerBlocks.Content, {}) })
      ] });
    }
  };
  var v212 = {
    attributes: {
      ...v0Attributes,
      backgroundColor: {
        type: "string"
      },
      customBackgroundColor: {
        type: "string"
      },
      mediaUrl: {
        type: "string",
        source: "attribute",
        selector: "figure video,figure img",
        attribute: "src"
      },
      verticalAlignment: {
        type: "string"
      },
      imageFill: {
        type: "boolean"
      },
      focalPoint: {
        type: "object"
      }
    },
    migrate: (0, import_compose30.compose)(migrateCustomColors3, migrateDefaultAlign),
    save({ attributes: attributes2 }) {
      const {
        backgroundColor,
        customBackgroundColor,
        isStackedOnMobile,
        mediaAlt,
        mediaPosition: mediaPosition3,
        mediaType,
        mediaUrl,
        mediaWidth,
        mediaId,
        verticalAlignment,
        imageFill,
        focalPoint
      } = attributes2;
      const mediaTypeRenders = {
        image: () => /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
          "img",
          {
            src: mediaUrl,
            alt: mediaAlt,
            className: mediaId && mediaType === "image" ? `wp-image-${mediaId}` : null
          }
        ),
        video: () => /* @__PURE__ */ (0, import_jsx_runtime295.jsx)("video", { controls: true, src: mediaUrl })
      };
      const backgroundClass = (0, import_block_editor133.getColorClassName)(
        "background-color",
        backgroundColor
      );
      const className = clsx_default({
        "has-media-on-the-right": "right" === mediaPosition3,
        [backgroundClass]: backgroundClass,
        "is-stacked-on-mobile": isStackedOnMobile,
        [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
        "is-image-fill": imageFill
      });
      const backgroundStyles = imageFill ? v1ToV5ImageFillStyles(mediaUrl, focalPoint) : {};
      let gridTemplateColumns;
      if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
        gridTemplateColumns = "right" === mediaPosition3 ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
      }
      const style2 = {
        backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
        gridTemplateColumns
      };
      return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)("div", { className, style: style2, children: [
        /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
          "figure",
          {
            className: "wp-block-media-text__media",
            style: backgroundStyles,
            children: (mediaTypeRenders[mediaType] || noop)()
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime295.jsx)("div", { className: "wp-block-media-text__content", children: /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(import_block_editor133.InnerBlocks.Content, {}) })
      ] });
    }
  };
  var v124 = {
    attributes: {
      ...v0Attributes,
      backgroundColor: {
        type: "string"
      },
      customBackgroundColor: {
        type: "string"
      },
      mediaUrl: {
        type: "string",
        source: "attribute",
        selector: "figure video,figure img",
        attribute: "src"
      }
    },
    migrate: migrateDefaultAlign,
    save({ attributes: attributes2 }) {
      const {
        backgroundColor,
        customBackgroundColor,
        isStackedOnMobile,
        mediaAlt,
        mediaPosition: mediaPosition3,
        mediaType,
        mediaUrl,
        mediaWidth
      } = attributes2;
      const mediaTypeRenders = {
        image: () => /* @__PURE__ */ (0, import_jsx_runtime295.jsx)("img", { src: mediaUrl, alt: mediaAlt }),
        video: () => /* @__PURE__ */ (0, import_jsx_runtime295.jsx)("video", { controls: true, src: mediaUrl })
      };
      const backgroundClass = (0, import_block_editor133.getColorClassName)(
        "background-color",
        backgroundColor
      );
      const className = clsx_default({
        "has-media-on-the-right": "right" === mediaPosition3,
        [backgroundClass]: backgroundClass,
        "is-stacked-on-mobile": isStackedOnMobile
      });
      let gridTemplateColumns;
      if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
        gridTemplateColumns = "right" === mediaPosition3 ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
      }
      const style2 = {
        backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
        gridTemplateColumns
      };
      return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)("div", { className, style: style2, children: [
        /* @__PURE__ */ (0, import_jsx_runtime295.jsx)("figure", { className: "wp-block-media-text__media", children: (mediaTypeRenders[mediaType] || noop)() }),
        /* @__PURE__ */ (0, import_jsx_runtime295.jsx)("div", { className: "wp-block-media-text__content", children: /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(import_block_editor133.InnerBlocks.Content, {}) })
      ] });
    }
  };
  var deprecated_default27 = [v74, v65, v55, v45, v37, v212, v124];

  // packages/block-library/build-module/media-text/edit.mjs
  var import_i18n107 = __toESM(require_i18n(), 1);
  var import_data59 = __toESM(require_data(), 1);
  var import_element55 = __toESM(require_element(), 1);
  var import_block_editor135 = __toESM(require_block_editor(), 1);
  var import_components66 = __toESM(require_components(), 1);
  var import_blob15 = __toESM(require_blob(), 1);
  var import_core_data25 = __toESM(require_core_data(), 1);

  // packages/block-library/build-module/media-text/media-container.mjs
  var import_components65 = __toESM(require_components(), 1);
  var import_block_editor134 = __toESM(require_block_editor(), 1);
  var import_i18n106 = __toESM(require_i18n(), 1);
  var import_compose31 = __toESM(require_compose(), 1);
  var import_data58 = __toESM(require_data(), 1);
  var import_element54 = __toESM(require_element(), 1);
  var import_blob14 = __toESM(require_blob(), 1);
  var import_notices10 = __toESM(require_notices(), 1);

  // packages/block-library/build-module/media-text/image-fill.mjs
  function imageFillStyles(url, focalPoint) {
    return url ? {
      objectPosition: focalPoint ? `${Math.round(focalPoint.x * 100)}% ${Math.round(
        focalPoint.y * 100
      )}%` : `50% 50%`
    } : {};
  }

  // packages/block-library/build-module/media-text/media-container.mjs
  var import_jsx_runtime296 = __toESM(require_jsx_runtime(), 1);
  var ALLOWED_MEDIA_TYPES5 = ["image", "video"];
  var noop2 = () => {
  };
  var ResizableBoxContainer = (0, import_element54.forwardRef)(
    ({ isSelected, isStackedOnMobile, ...props }, ref) => {
      const isMobile = (0, import_compose31.useViewportMatch)("small", "<");
      return /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
        import_components65.ResizableBox,
        {
          ref,
          showHandle: isSelected && (!isMobile || !isStackedOnMobile),
          ...props
        }
      );
    }
  );
  function ToolbarEditButton({
    mediaId,
    mediaUrl,
    onSelectMedia,
    toggleUseFeaturedImage,
    useFeaturedImage
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(import_block_editor134.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
      import_block_editor134.MediaReplaceFlow,
      {
        mediaId,
        mediaURL: mediaUrl,
        allowedTypes: ALLOWED_MEDIA_TYPES5,
        onSelect: onSelectMedia,
        onToggleFeaturedImage: toggleUseFeaturedImage,
        useFeaturedImage,
        onReset: () => onSelectMedia(void 0)
      }
    ) });
  }
  function PlaceholderContainer({
    className,
    mediaUrl,
    onSelectMedia,
    toggleUseFeaturedImage
  }) {
    const { createErrorNotice } = (0, import_data58.useDispatch)(import_notices10.store);
    const onUploadError = (message) => {
      createErrorNotice(message, { type: "snackbar" });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
      import_block_editor134.MediaPlaceholder,
      {
        icon: /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(import_block_editor134.BlockIcon, { icon: media_default }),
        labels: {
          title: (0, import_i18n106.__)("Media area")
        },
        className,
        onSelect: onSelectMedia,
        onToggleFeaturedImage: toggleUseFeaturedImage,
        allowedTypes: ALLOWED_MEDIA_TYPES5,
        onError: onUploadError,
        disableMediaButtons: mediaUrl
      }
    );
  }
  function MediaContainer(props, ref) {
    const {
      className,
      commitWidthChange,
      focalPoint,
      imageFill,
      isSelected,
      isStackedOnMobile,
      mediaAlt,
      mediaId,
      mediaPosition: mediaPosition3,
      mediaType,
      mediaUrl,
      mediaWidth,
      onSelectMedia,
      onWidthChange,
      enableResize,
      toggleUseFeaturedImage,
      useFeaturedImage,
      featuredImageURL,
      featuredImageAlt,
      refMedia
    } = props;
    const isTemporaryMedia2 = !mediaId && (0, import_blob14.isBlobURL)(mediaUrl);
    const { toggleSelection } = (0, import_data58.useDispatch)(import_block_editor134.store);
    if (mediaUrl || featuredImageURL || useFeaturedImage) {
      const onResizeStart = () => {
        toggleSelection(false);
      };
      const onResize = (event, direction, elt) => {
        onWidthChange(parseInt(elt.style.width));
      };
      const onResizeStop = (event, direction, elt) => {
        toggleSelection(true);
        commitWidthChange(parseInt(elt.style.width));
      };
      const enablePositions = {
        right: enableResize && mediaPosition3 === "left",
        left: enableResize && mediaPosition3 === "right"
      };
      const positionStyles = mediaType === "image" && imageFill ? imageFillStyles(mediaUrl || featuredImageURL, focalPoint) : {};
      const mediaTypeRenderers = {
        image: () => useFeaturedImage && featuredImageURL ? /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
          "img",
          {
            ref: refMedia,
            src: featuredImageURL,
            alt: featuredImageAlt,
            style: positionStyles
          }
        ) : mediaUrl && /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
          "img",
          {
            ref: refMedia,
            src: mediaUrl,
            alt: mediaAlt,
            style: positionStyles
          }
        ),
        video: () => /* @__PURE__ */ (0, import_jsx_runtime296.jsx)("video", { controls: true, ref: refMedia, src: mediaUrl })
      };
      return /* @__PURE__ */ (0, import_jsx_runtime296.jsxs)(
        ResizableBoxContainer,
        {
          as: "figure",
          className: clsx_default(
            className,
            "editor-media-container__resizer",
            { "is-transient": isTemporaryMedia2 }
          ),
          size: { width: mediaWidth + "%" },
          minWidth: "10%",
          maxWidth: "100%",
          enable: enablePositions,
          onResizeStart,
          onResize,
          onResizeStop,
          axis: "x",
          isSelected,
          isStackedOnMobile,
          ref,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
              ToolbarEditButton,
              {
                onSelectMedia,
                mediaUrl: useFeaturedImage && featuredImageURL ? featuredImageURL : mediaUrl,
                mediaId,
                toggleUseFeaturedImage,
                useFeaturedImage
              }
            ),
            (mediaTypeRenderers[mediaType] || noop2)(),
            isTemporaryMedia2 && /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(import_components65.Spinner, {}),
            !useFeaturedImage && /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(PlaceholderContainer, { ...props }),
            !featuredImageURL && useFeaturedImage && /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
              import_components65.Placeholder,
              {
                className: "wp-block-media-text--placeholder-image",
                style: positionStyles,
                withIllustration: true
              }
            )
          ]
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(PlaceholderContainer, { ...props });
  }
  var media_container_default = (0, import_element54.forwardRef)(MediaContainer);

  // packages/block-library/build-module/media-text/edit.mjs
  var import_jsx_runtime297 = __toESM(require_jsx_runtime(), 1);
  var { ResolutionTool: ResolutionTool3 } = unlock(import_block_editor135.privateApis);
  var applyWidthConstraints = (width) => Math.max(
    WIDTH_CONSTRAINT_PERCENTAGE,
    Math.min(width, 100 - WIDTH_CONSTRAINT_PERCENTAGE)
  );
  function getImageSourceUrlBySizeSlug(image, slug) {
    return image?.media_details?.sizes?.[slug]?.source_url;
  }
  function attributesFromMedia2({
    attributes: { linkDestination, href },
    setAttributes
  }) {
    return (media) => {
      if (!media || !media.url) {
        setAttributes({
          mediaAlt: void 0,
          mediaId: void 0,
          mediaType: void 0,
          mediaUrl: void 0,
          mediaLink: void 0,
          href: void 0,
          focalPoint: void 0,
          useFeaturedImage: false
        });
        return;
      }
      if ((0, import_blob15.isBlobURL)(media.url)) {
        media.type = (0, import_blob15.getBlobTypeByURL)(media.url);
      }
      let mediaType;
      let src;
      if (media.media_type) {
        if (media.media_type === "image") {
          mediaType = "image";
        } else {
          mediaType = "video";
        }
      } else {
        mediaType = media.type;
      }
      if (mediaType === "image") {
        src = media.sizes?.large?.url || media.media_details?.sizes?.large?.source_url;
      }
      let newLinkDestination = linkDestination;
      let newHref = href;
      if (mediaType === "image") {
        if (!newLinkDestination) {
          switch (window?.wp?.media?.view?.settings?.defaultProps?.link || LINK_DESTINATION_NONE3) {
            case "file":
            case LINK_DESTINATION_MEDIA3:
              newLinkDestination = LINK_DESTINATION_MEDIA3;
              break;
            case "post":
            case LINK_DESTINATION_ATTACHMENT3:
              newLinkDestination = LINK_DESTINATION_ATTACHMENT3;
              break;
            case LINK_DESTINATION_NONE3:
            default:
              newLinkDestination = LINK_DESTINATION_NONE3;
              break;
          }
        }
        switch (newLinkDestination) {
          case LINK_DESTINATION_MEDIA3:
            newHref = media.url;
            break;
          case LINK_DESTINATION_ATTACHMENT3:
            newHref = media.link;
            break;
        }
      }
      setAttributes({
        mediaAlt: media.alt,
        mediaId: media.id,
        mediaType,
        mediaUrl: src || media.url,
        mediaLink: media.link || void 0,
        href: newHref,
        linkDestination: newLinkDestination,
        focalPoint: void 0,
        useFeaturedImage: false
      });
    };
  }
  function MediaTextResolutionTool({ image, value, onChange }) {
    const { imageSizes } = (0, import_data59.useSelect)((select9) => {
      const { getSettings: getSettings2 } = select9(import_block_editor135.store);
      return {
        imageSizes: getSettings2().imageSizes
      };
    }, []);
    if (!imageSizes?.length) {
      return null;
    }
    const imageSizeOptions = imageSizes.filter(({ slug }) => getImageSourceUrlBySizeSlug(image, slug)).map(({ name: name123, slug }) => ({ value: slug, label: name123 }));
    return /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
      ResolutionTool3,
      {
        value,
        defaultValue: DEFAULT_MEDIA_SIZE_SLUG4,
        options: imageSizeOptions,
        onChange
      }
    );
  }
  function MediaTextEdit({
    attributes: attributes2,
    isSelected,
    setAttributes,
    context: { postId, postType }
  }) {
    const {
      focalPoint,
      href,
      imageFill,
      isStackedOnMobile,
      linkClass,
      linkDestination,
      linkTarget,
      mediaAlt,
      mediaId,
      mediaPosition: mediaPosition3,
      mediaType,
      mediaUrl,
      mediaWidth,
      mediaSizeSlug,
      rel,
      verticalAlignment,
      allowedBlocks,
      useFeaturedImage
    } = attributes2;
    const [featuredImage] = (0, import_core_data25.useEntityProp)(
      "postType",
      postType,
      "featured_media",
      postId
    );
    const { featuredImageMedia } = (0, import_data59.useSelect)(
      (select9) => {
        return {
          featuredImageMedia: featuredImage && useFeaturedImage ? select9(import_core_data25.store).getEntityRecord(
            "postType",
            "attachment",
            featuredImage,
            {
              context: "view"
            }
          ) : void 0
        };
      },
      [featuredImage, useFeaturedImage]
    );
    const { image } = (0, import_data59.useSelect)(
      (select9) => {
        return {
          image: mediaId && isSelected ? select9(import_core_data25.store).getEntityRecord(
            "postType",
            "attachment",
            mediaId,
            {
              context: "view"
            }
          ) : null
        };
      },
      [isSelected, mediaId]
    );
    const featuredImageURL = useFeaturedImage ? featuredImageMedia?.source_url : "";
    const featuredImageAlt = useFeaturedImage ? featuredImageMedia?.alt_text : "";
    const toggleUseFeaturedImage = () => {
      setAttributes({
        imageFill: false,
        mediaType: "image",
        mediaId: void 0,
        mediaUrl: void 0,
        mediaAlt: void 0,
        mediaLink: void 0,
        linkDestination: void 0,
        linkTarget: void 0,
        linkClass: void 0,
        rel: void 0,
        href: void 0,
        useFeaturedImage: !useFeaturedImage
      });
    };
    const refMedia = (0, import_element55.useRef)();
    const imperativeFocalPointPreview = (value) => {
      const { style: style22 } = refMedia.current;
      const { x: x2, y: y2 } = value;
      style22.objectPosition = `${x2 * 100}% ${y2 * 100}%`;
    };
    const [temporaryMediaWidth, setTemporaryMediaWidth] = (0, import_element55.useState)(null);
    const onSelectMedia = attributesFromMedia2({ attributes: attributes2, setAttributes });
    const onSetHref = (props) => {
      setAttributes(props);
    };
    const onWidthChange = (width) => {
      setTemporaryMediaWidth(applyWidthConstraints(width));
    };
    const commitWidthChange = (width) => {
      setAttributes({
        mediaWidth: applyWidthConstraints(width)
      });
      setTemporaryMediaWidth(null);
    };
    const classNames = clsx_default({
      "has-media-on-the-right": "right" === mediaPosition3,
      "is-selected": isSelected,
      "is-stacked-on-mobile": isStackedOnMobile,
      [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
      "is-image-fill-element": imageFill
    });
    const widthString = `${temporaryMediaWidth || mediaWidth}%`;
    const gridTemplateColumns = "right" === mediaPosition3 ? `1fr ${widthString}` : `${widthString} 1fr`;
    const style2 = {
      gridTemplateColumns,
      msGridColumns: gridTemplateColumns
    };
    const onMediaAltChange = (newMediaAlt) => {
      setAttributes({ mediaAlt: newMediaAlt });
    };
    const onVerticalAlignmentChange = (alignment) => {
      setAttributes({ verticalAlignment: alignment });
    };
    const updateImage = (newMediaSizeSlug) => {
      const newUrl = getImageSourceUrlBySizeSlug(image, newMediaSizeSlug);
      if (!newUrl) {
        return null;
      }
      setAttributes({
        mediaUrl: newUrl,
        mediaSizeSlug: newMediaSizeSlug
      });
    };
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const mediaTextGeneralSettings = /* @__PURE__ */ (0, import_jsx_runtime297.jsxs)(
      import_components66.__experimentalToolsPanel,
      {
        label: (0, import_i18n107.__)("Settings"),
        resetAll: () => {
          setAttributes({
            isStackedOnMobile: true,
            imageFill: false,
            mediaAlt: "",
            focalPoint: void 0,
            mediaWidth: 50
          });
          updateImage(DEFAULT_MEDIA_SIZE_SLUG4);
        },
        dropdownMenuProps,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
            import_components66.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n107.__)("Media width"),
              isShownByDefault: true,
              hasValue: () => mediaWidth !== 50,
              onDeselect: () => setAttributes({ mediaWidth: 50 }),
              children: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
                import_components66.RangeControl,
                {
                  __next40pxDefaultSize: true,
                  label: (0, import_i18n107.__)("Media width"),
                  value: temporaryMediaWidth || mediaWidth,
                  onChange: commitWidthChange,
                  min: WIDTH_CONSTRAINT_PERCENTAGE,
                  max: 100 - WIDTH_CONSTRAINT_PERCENTAGE
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
            import_components66.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n107.__)("Stack on mobile"),
              isShownByDefault: true,
              hasValue: () => !isStackedOnMobile,
              onDeselect: () => setAttributes({ isStackedOnMobile: true }),
              children: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
                import_components66.ToggleControl,
                {
                  label: (0, import_i18n107.__)("Stack on mobile"),
                  checked: isStackedOnMobile,
                  onChange: () => setAttributes({
                    isStackedOnMobile: !isStackedOnMobile
                  })
                }
              )
            }
          ),
          mediaType === "image" && /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
            import_components66.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n107.__)("Crop image to fill"),
              isShownByDefault: true,
              hasValue: () => !!imageFill,
              onDeselect: () => setAttributes({ imageFill: false }),
              children: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
                import_components66.ToggleControl,
                {
                  label: (0, import_i18n107.__)("Crop image to fill"),
                  checked: !!imageFill,
                  onChange: () => setAttributes({
                    imageFill: !imageFill
                  })
                }
              )
            }
          ),
          imageFill && (mediaUrl || featuredImageURL) && mediaType === "image" && /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
            import_components66.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n107.__)("Focal point"),
              isShownByDefault: true,
              hasValue: () => !!focalPoint,
              onDeselect: () => setAttributes({ focalPoint: void 0 }),
              children: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
                import_components66.FocalPointPicker,
                {
                  label: (0, import_i18n107.__)("Focal point"),
                  url: useFeaturedImage && featuredImageURL ? featuredImageURL : mediaUrl,
                  value: focalPoint,
                  onChange: (value) => setAttributes({ focalPoint: value }),
                  onDragStart: imperativeFocalPointPreview,
                  onDrag: imperativeFocalPointPreview
                }
              )
            }
          ),
          mediaType === "image" && mediaUrl && !useFeaturedImage && /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
            import_components66.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n107.__)("Alternative text"),
              isShownByDefault: true,
              hasValue: () => !!mediaAlt,
              onDeselect: () => setAttributes({ mediaAlt: "" }),
              children: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
                import_components66.TextareaControl,
                {
                  label: (0, import_i18n107.__)("Alternative text"),
                  value: mediaAlt,
                  onChange: onMediaAltChange,
                  help: /* @__PURE__ */ (0, import_jsx_runtime297.jsxs)(import_jsx_runtime297.Fragment, { children: [
                    /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
                      import_components66.ExternalLink,
                      {
                        href: (
                          // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
                          (0, import_i18n107.__)(
                            "https://www.w3.org/WAI/tutorials/images/decision-tree/"
                          )
                        ),
                        children: (0, import_i18n107.__)(
                          "Describe the purpose of the image."
                        )
                      }
                    ),
                    /* @__PURE__ */ (0, import_jsx_runtime297.jsx)("br", {}),
                    (0, import_i18n107.__)("Leave empty if decorative.")
                  ] })
                }
              )
            }
          ),
          mediaType === "image" && !useFeaturedImage && /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
            MediaTextResolutionTool,
            {
              image,
              value: mediaSizeSlug,
              onChange: updateImage
            }
          )
        ]
      }
    );
    const blockProps = (0, import_block_editor135.useBlockProps)({
      className: classNames,
      style: style2
    });
    const innerBlocksProps = (0, import_block_editor135.useInnerBlocksProps)(
      { className: "wp-block-media-text__content" },
      { template: TEMPLATE10, allowedBlocks }
    );
    const blockEditingMode = (0, import_block_editor135.useBlockEditingMode)();
    return /* @__PURE__ */ (0, import_jsx_runtime297.jsxs)(import_jsx_runtime297.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(import_block_editor135.InspectorControls, { children: mediaTextGeneralSettings }),
      /* @__PURE__ */ (0, import_jsx_runtime297.jsxs)(import_block_editor135.BlockControls, { group: "block", children: [
        blockEditingMode === "default" && /* @__PURE__ */ (0, import_jsx_runtime297.jsxs)(import_jsx_runtime297.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
            import_block_editor135.BlockVerticalAlignmentControl,
            {
              onChange: onVerticalAlignmentChange,
              value: verticalAlignment
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
            import_components66.ToolbarButton,
            {
              icon: pull_left_default,
              title: (0, import_i18n107.__)("Show media on left"),
              isActive: mediaPosition3 === "left",
              onClick: () => setAttributes({ mediaPosition: "left" })
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
            import_components66.ToolbarButton,
            {
              icon: pull_right_default,
              title: (0, import_i18n107.__)("Show media on right"),
              isActive: mediaPosition3 === "right",
              onClick: () => setAttributes({ mediaPosition: "right" })
            }
          )
        ] }),
        mediaType === "image" && !useFeaturedImage && /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
          import_block_editor135.__experimentalImageURLInputUI,
          {
            url: href || "",
            onChangeUrl: onSetHref,
            linkDestination,
            mediaType,
            mediaUrl: image && image.source_url,
            mediaLink: image && image.link,
            linkTarget,
            linkClass,
            rel
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime297.jsxs)("div", { ...blockProps, children: [
        mediaPosition3 === "right" && /* @__PURE__ */ (0, import_jsx_runtime297.jsx)("div", { ...innerBlocksProps }),
        /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
          media_container_default,
          {
            className: "wp-block-media-text__media",
            onSelectMedia,
            onWidthChange,
            commitWidthChange,
            refMedia,
            enableResize: blockEditingMode === "default",
            toggleUseFeaturedImage,
            ...{
              focalPoint,
              imageFill,
              isSelected,
              isStackedOnMobile,
              mediaAlt,
              mediaId,
              mediaPosition: mediaPosition3,
              mediaType,
              mediaUrl,
              mediaWidth,
              useFeaturedImage,
              featuredImageURL,
              featuredImageAlt
            }
          }
        ),
        mediaPosition3 !== "right" && /* @__PURE__ */ (0, import_jsx_runtime297.jsx)("div", { ...innerBlocksProps })
      ] })
    ] });
  }
  var edit_default19 = MediaTextEdit;

  // packages/block-library/build-module/media-text/block.json
  var block_default51 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/media-text",
    title: "Media & Text",
    category: "media",
    description: "Set media and words side-by-side for a richer layout.",
    keywords: ["image", "video"],
    textdomain: "default",
    attributes: {
      align: {
        type: "string",
        default: "none"
      },
      mediaAlt: {
        type: "string",
        source: "attribute",
        selector: "figure img",
        attribute: "alt",
        default: "",
        role: "content"
      },
      mediaPosition: {
        type: "string",
        default: "left"
      },
      mediaId: {
        type: "number",
        role: "content"
      },
      mediaUrl: {
        type: "string",
        source: "attribute",
        selector: "figure video,figure img",
        attribute: "src",
        role: "content"
      },
      mediaLink: {
        type: "string"
      },
      linkDestination: {
        type: "string"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "figure a",
        attribute: "target"
      },
      href: {
        type: "string",
        source: "attribute",
        selector: "figure a",
        attribute: "href",
        role: "content"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "figure a",
        attribute: "rel"
      },
      linkClass: {
        type: "string",
        source: "attribute",
        selector: "figure a",
        attribute: "class"
      },
      mediaType: {
        type: "string",
        role: "content"
      },
      mediaWidth: {
        type: "number",
        default: 50
      },
      mediaSizeSlug: {
        type: "string"
      },
      isStackedOnMobile: {
        type: "boolean",
        default: true
      },
      verticalAlignment: {
        type: "string"
      },
      imageFill: {
        type: "boolean"
      },
      focalPoint: {
        type: "object"
      },
      useFeaturedImage: {
        type: "boolean",
        default: false
      }
    },
    usesContext: ["postId", "postType"],
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      color: {
        gradients: true,
        heading: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      allowedBlocks: true
    },
    editorStyle: "wp-block-media-text-editor",
    style: "wp-block-media-text"
  };

  // packages/block-library/build-module/media-text/save.mjs
  var import_block_editor136 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime298 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_MEDIA_WIDTH2 = 50;
  var noop3 = () => {
  };
  function save30({ attributes: attributes2 }) {
    const {
      isStackedOnMobile,
      mediaAlt,
      mediaPosition: mediaPosition3,
      mediaType,
      mediaUrl,
      mediaWidth,
      mediaId,
      verticalAlignment,
      imageFill,
      focalPoint,
      linkClass,
      href,
      linkTarget,
      rel
    } = attributes2;
    const mediaSizeSlug = attributes2.mediaSizeSlug || DEFAULT_MEDIA_SIZE_SLUG4;
    const newRel = !rel ? void 0 : rel;
    const imageClasses = clsx_default({
      [`wp-image-${mediaId}`]: mediaId && mediaType === "image",
      [`size-${mediaSizeSlug}`]: mediaId && mediaType === "image"
    });
    const positionStyles = imageFill ? imageFillStyles(mediaUrl, focalPoint) : {};
    let image = mediaUrl ? /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
      "img",
      {
        src: mediaUrl,
        alt: mediaAlt,
        className: imageClasses || null,
        style: positionStyles
      }
    ) : null;
    if (href) {
      image = /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
        "a",
        {
          className: linkClass,
          href,
          target: linkTarget,
          rel: newRel,
          children: image
        }
      );
    }
    const mediaTypeRenders = {
      image: () => image,
      video: () => /* @__PURE__ */ (0, import_jsx_runtime298.jsx)("video", { controls: true, src: mediaUrl })
    };
    const className = clsx_default({
      "has-media-on-the-right": "right" === mediaPosition3,
      "is-stacked-on-mobile": isStackedOnMobile,
      [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
      "is-image-fill-element": imageFill
    });
    let gridTemplateColumns;
    if (mediaWidth !== DEFAULT_MEDIA_WIDTH2) {
      gridTemplateColumns = "right" === mediaPosition3 ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
    }
    const style2 = {
      gridTemplateColumns
    };
    if ("right" === mediaPosition3) {
      return /* @__PURE__ */ (0, import_jsx_runtime298.jsxs)("div", { ...import_block_editor136.useBlockProps.save({ className, style: style2 }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
          "div",
          {
            ...import_block_editor136.useInnerBlocksProps.save({
              className: "wp-block-media-text__content"
            })
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime298.jsx)("figure", { className: "wp-block-media-text__media", children: (mediaTypeRenders[mediaType] || noop3)() })
      ] });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime298.jsxs)("div", { ...import_block_editor136.useBlockProps.save({ className, style: style2 }), children: [
      /* @__PURE__ */ (0, import_jsx_runtime298.jsx)("figure", { className: "wp-block-media-text__media", children: (mediaTypeRenders[mediaType] || noop3)() }),
      /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
        "div",
        {
          ...import_block_editor136.useInnerBlocksProps.save({
            className: "wp-block-media-text__content"
          })
        }
      )
    ] });
  }

  // packages/block-library/build-module/media-text/transforms.mjs
  var import_blocks50 = __toESM(require_blocks(), 1);
  var transforms16 = {
    from: [
      {
        type: "block",
        blocks: ["core/image"],
        transform: ({ alt, url, id, anchor }) => (0, import_blocks50.createBlock)("core/media-text", {
          mediaAlt: alt,
          mediaId: id,
          mediaUrl: url,
          mediaType: "image",
          anchor
        })
      },
      {
        type: "block",
        blocks: ["core/video"],
        transform: ({ src, id, anchor }) => (0, import_blocks50.createBlock)("core/media-text", {
          mediaId: id,
          mediaUrl: src,
          mediaType: "video",
          anchor
        })
      },
      {
        type: "block",
        blocks: ["core/cover"],
        transform: ({
          align,
          alt,
          anchor,
          backgroundType,
          customGradient,
          customOverlayColor,
          gradient,
          id,
          overlayColor,
          style: style2,
          textColor,
          url,
          useFeaturedImage
        }, innerBlocks) => {
          let additionalAttributes = {};
          if (customGradient) {
            additionalAttributes = {
              style: {
                color: {
                  gradient: customGradient
                }
              }
            };
          } else if (customOverlayColor) {
            additionalAttributes = {
              style: {
                color: {
                  background: customOverlayColor
                }
              }
            };
          }
          if (style2?.color?.text) {
            additionalAttributes.style = {
              color: {
                ...additionalAttributes.style?.color,
                text: style2.color.text
              }
            };
          }
          return (0, import_blocks50.createBlock)(
            "core/media-text",
            {
              align,
              anchor,
              backgroundColor: overlayColor,
              gradient,
              mediaAlt: alt,
              mediaId: id,
              mediaType: backgroundType,
              mediaUrl: url,
              textColor,
              useFeaturedImage,
              ...additionalAttributes
            },
            innerBlocks
          );
        }
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/image"],
        isMatch: ({ mediaType, mediaUrl }) => {
          return !mediaUrl || mediaType === "image";
        },
        transform: ({ mediaAlt, mediaId, mediaUrl, anchor }) => {
          return (0, import_blocks50.createBlock)("core/image", {
            alt: mediaAlt,
            id: mediaId,
            url: mediaUrl,
            anchor
          });
        }
      },
      {
        type: "block",
        blocks: ["core/video"],
        isMatch: ({ mediaType, mediaUrl }) => {
          return !mediaUrl || mediaType === "video";
        },
        transform: ({ mediaId, mediaUrl, anchor }) => {
          return (0, import_blocks50.createBlock)("core/video", {
            id: mediaId,
            src: mediaUrl,
            anchor
          });
        }
      },
      {
        type: "block",
        blocks: ["core/cover"],
        transform: ({
          align,
          anchor,
          backgroundColor,
          focalPoint,
          gradient,
          mediaAlt,
          mediaId,
          mediaType,
          mediaUrl,
          style: style2,
          textColor,
          useFeaturedImage
        }, innerBlocks) => {
          const additionalAttributes = {};
          if (style2?.color?.gradient) {
            additionalAttributes.customGradient = style2.color.gradient;
          } else if (style2?.color?.background) {
            additionalAttributes.customOverlayColor = style2.color.background;
          }
          if (style2?.color?.text) {
            additionalAttributes.style = {
              color: { text: style2.color.text }
            };
          }
          const coverAttributes = {
            align,
            alt: mediaAlt,
            anchor,
            backgroundType: mediaType,
            dimRatio: !!mediaUrl || useFeaturedImage ? 50 : 100,
            focalPoint,
            gradient,
            id: mediaId,
            overlayColor: backgroundColor,
            textColor,
            url: mediaUrl,
            useFeaturedImage,
            ...additionalAttributes
          };
          return (0, import_blocks50.createBlock)(
            "core/cover",
            coverAttributes,
            innerBlocks
          );
        }
      }
    ]
  };
  var transforms_default17 = transforms16;

  // packages/block-library/build-module/media-text/index.mjs
  var { fieldsKey: fieldsKey10, formKey: formKey10 } = unlock(import_blocks51.privateApis);
  var { name: name51 } = block_default51;
  var settings51 = {
    icon: media_and_text_default,
    example: {
      viewportWidth: 601,
      // Columns collapse "@media (max-width: 600px)".
      attributes: {
        mediaType: "image",
        mediaUrl: "https://s.w.org/images/core/5.3/Biologia_Centrali-Americana_-_Cantorchilus_semibadius_1902.jpg"
      },
      innerBlocks: [
        {
          name: "core/paragraph",
          attributes: {
            content: (0, import_i18n108.__)(
              "The wren<br>Earns his living<br>Noiselessly."
            )
          }
        },
        {
          name: "core/paragraph",
          attributes: {
            content: (0, import_i18n108.__)("\u2014 Kobayashi Issa (\u4E00\u8336)")
          }
        }
      ]
    },
    transforms: transforms_default17,
    edit: edit_default19,
    save: save30,
    deprecated: deprecated_default27
  };
  if (window.__experimentalContentOnlyInspectorFields) {
    settings51[fieldsKey10] = [
      {
        id: "media",
        label: (0, import_i18n108.__)("Media"),
        type: "media",
        Edit: {
          control: "media",
          // TODO: replace with custom component
          allowedTypes: ["image", "video"],
          multiple: false
        },
        getValue: ({ item }) => ({
          id: item.mediaId,
          url: item.mediaUrl,
          mediaType: item.mediaType,
          link: item.mediaLink
        }),
        setValue: ({ value }) => ({
          mediaId: value.id,
          mediaUrl: value.url,
          mediaType: value.mediaType,
          mediaLink: value.link
        })
      },
      {
        id: "link",
        label: (0, import_i18n108.__)("Link"),
        type: "url",
        Edit: "link",
        // TODO: replace with custom component
        getValue: ({ item }) => ({
          url: item.href,
          rel: item.rel,
          linkTarget: item.linkTarget
        }),
        setValue: ({ value }) => ({
          href: value.url,
          rel: value.rel,
          linkTarget: value.linkTarget
        })
      }
    ];
    settings51[formKey10] = {
      fields: ["media", "link"]
    };
  }
  var init51 = () => initBlock({ name: name51, metadata: block_default51, settings: settings51 });

  // packages/block-library/build-module/missing/index.mjs
  var missing_exports = {};
  __export(missing_exports, {
    init: () => init52,
    metadata: () => block_default52,
    name: () => name52,
    settings: () => settings52
  });
  var import_blocks53 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/missing/edit.mjs
  var import_i18n109 = __toESM(require_i18n(), 1);
  var import_element56 = __toESM(require_element(), 1);
  var import_components67 = __toESM(require_components(), 1);
  var import_blocks52 = __toESM(require_blocks(), 1);
  var import_data60 = __toESM(require_data(), 1);
  var import_block_editor137 = __toESM(require_block_editor(), 1);
  var import_dom4 = __toESM(require_dom(), 1);
  var import_jsx_runtime299 = __toESM(require_jsx_runtime(), 1);
  function MissingEdit({ attributes: attributes2, clientId }) {
    const { originalName, originalUndelimitedContent } = attributes2;
    const hasContent = !!originalUndelimitedContent;
    const { hasFreeformBlock, hasHTMLBlock } = (0, import_data60.useSelect)(
      (select9) => {
        const { canInsertBlockType, getBlockRootClientId } = select9(import_block_editor137.store);
        return {
          hasFreeformBlock: canInsertBlockType(
            "core/freeform",
            getBlockRootClientId(clientId)
          ),
          hasHTMLBlock: canInsertBlockType(
            "core/html",
            getBlockRootClientId(clientId)
          )
        };
      },
      [clientId]
    );
    const { replaceBlock } = (0, import_data60.useDispatch)(import_block_editor137.store);
    function convertToHTML() {
      replaceBlock(
        clientId,
        (0, import_blocks52.createBlock)("core/html", {
          content: originalUndelimitedContent
        })
      );
    }
    const actions = [];
    let messageHTML;
    const convertToHtmlButton = /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
      import_components67.Button,
      {
        __next40pxDefaultSize: true,
        onClick: convertToHTML,
        variant: "primary",
        children: (0, import_i18n109.__)("Keep as HTML")
      },
      "convert"
    );
    if (hasContent && !hasFreeformBlock && (!originalName || originalName === "core/freeform")) {
      if (hasHTMLBlock) {
        messageHTML = (0, import_i18n109.__)(
          "It appears you are trying to use the deprecated Classic block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely. Alternatively, if you have unsaved changes, you can save them and refresh to use the Classic block."
        );
        actions.push(convertToHtmlButton);
      } else {
        messageHTML = (0, import_i18n109.__)(
          "It appears you are trying to use the deprecated Classic block. You can leave this block intact, or remove it entirely. Alternatively, if you have unsaved changes, you can save them and refresh to use the Classic block."
        );
      }
    } else if (hasContent && hasHTMLBlock) {
      messageHTML = (0, import_i18n109.sprintf)(
        /* translators: %s: block name */
        (0, import_i18n109.__)(
          'Your site doesn\u2019t include support for the "%s" block. You can leave it as-is, convert it to custom HTML, or remove it.'
        ),
        originalName
      );
      actions.push(convertToHtmlButton);
    } else {
      messageHTML = (0, import_i18n109.sprintf)(
        /* translators: %s: block name */
        (0, import_i18n109.__)(
          'Your site doesn\u2019t include support for the "%s" block. You can leave it as-is or remove it.'
        ),
        originalName
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { ...(0, import_block_editor137.useBlockProps)({ className: "has-warning" }), children: [
      /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(import_block_editor137.Warning, { actions, children: messageHTML }),
      /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(import_element56.RawHTML, { children: (0, import_dom4.safeHTML)(originalUndelimitedContent) })
    ] });
  }

  // packages/block-library/build-module/missing/block.json
  var block_default52 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/missing",
    title: "Unsupported",
    category: "text",
    description: "Your site doesn\u2019t include support for this block.",
    textdomain: "default",
    attributes: {
      originalName: {
        type: "string"
      },
      originalUndelimitedContent: {
        type: "string"
      },
      originalContent: {
        type: "string",
        source: "raw"
      }
    },
    supports: {
      className: false,
      customClassName: false,
      inserter: false,
      html: false,
      lock: false,
      reusable: false,
      renaming: false,
      visibility: false,
      interactivity: {
        clientNavigation: true
      },
      customCSS: false
    }
  };

  // packages/block-library/build-module/missing/save.mjs
  var import_element57 = __toESM(require_element(), 1);
  var import_jsx_runtime300 = __toESM(require_jsx_runtime(), 1);
  function save31({ attributes: attributes2 }) {
    return /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(import_element57.RawHTML, { children: attributes2.originalContent });
  }

  // packages/block-library/build-module/missing/index.mjs
  var { name: name52 } = block_default52;
  var settings52 = {
    name: name52,
    __experimentalLabel(attributes2, { context }) {
      if (context === "accessibility") {
        const { originalName } = attributes2;
        const originalBlockType = originalName ? (0, import_blocks53.getBlockType)(originalName) : void 0;
        if (originalBlockType) {
          return originalBlockType.settings.title || originalName;
        }
        return "";
      }
    },
    edit: MissingEdit,
    save: save31
  };
  var init52 = () => initBlock({ name: name52, metadata: block_default52, settings: settings52 });

  // packages/block-library/build-module/more/index.mjs
  var more_exports = {};
  __export(more_exports, {
    init: () => init53,
    metadata: () => block_default53,
    name: () => name53,
    settings: () => settings53
  });
  var import_i18n111 = __toESM(require_i18n(), 1);
  var import_blocks56 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/more/edit.mjs
  var import_i18n110 = __toESM(require_i18n(), 1);
  var import_components68 = __toESM(require_components(), 1);
  var import_block_editor138 = __toESM(require_block_editor(), 1);
  var import_blocks54 = __toESM(require_blocks(), 1);
  var import_jsx_runtime301 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_TEXT = (0, import_i18n110.__)("Read more");
  function MoreEdit({
    attributes: { customText, noTeaser },
    insertBlocksAfter,
    setAttributes
  }) {
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(import_jsx_runtime301.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(import_block_editor138.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
        import_components68.__experimentalToolsPanel,
        {
          label: (0, import_i18n110.__)("Settings"),
          resetAll: () => {
            setAttributes({
              noTeaser: false
            });
          },
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
            import_components68.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n110.__)("Hide excerpt"),
              isShownByDefault: true,
              hasValue: () => noTeaser,
              onDeselect: () => setAttributes({ noTeaser: false }),
              children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
                import_components68.ToggleControl,
                {
                  label: (0, import_i18n110.__)(
                    "Hide the excerpt on the full content page"
                  ),
                  checked: !!noTeaser,
                  onChange: () => setAttributes({ noTeaser: !noTeaser }),
                  help: (checked) => checked ? (0, import_i18n110.__)("The excerpt is hidden.") : (0, import_i18n110.__)("The excerpt is visible.")
                }
              )
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime301.jsx)("div", { ...(0, import_block_editor138.useBlockProps)(), children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
        import_block_editor138.PlainText,
        {
          __experimentalVersion: 2,
          tagName: "span",
          "aria-label": (0, import_i18n110.__)('"Read more" text'),
          value: customText,
          placeholder: DEFAULT_TEXT,
          onChange: (value) => setAttributes({ customText: value }),
          disableLineBreaks: true,
          __unstableOnSplitAtEnd: () => insertBlocksAfter(
            (0, import_blocks54.createBlock)((0, import_blocks54.getDefaultBlockName)())
          )
        }
      ) })
    ] });
  }

  // packages/block-library/build-module/more/block.json
  var block_default53 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/more",
    title: "More",
    category: "design",
    description: "Content before this block will be shown in the excerpt on your archives page.",
    keywords: ["read more"],
    textdomain: "default",
    attributes: {
      customText: {
        type: "string",
        default: "",
        role: "content"
      },
      noTeaser: {
        type: "boolean",
        default: false
      }
    },
    supports: {
      customClassName: false,
      className: false,
      html: false,
      multiple: false,
      visibility: false,
      interactivity: {
        clientNavigation: true
      },
      customCSS: false
    },
    editorStyle: "wp-block-more-editor"
  };

  // packages/block-library/build-module/more/save.mjs
  var import_element58 = __toESM(require_element(), 1);
  var import_jsx_runtime302 = __toESM(require_jsx_runtime(), 1);
  function save32({ attributes: { customText, noTeaser } }) {
    const moreTag = customText ? `<!--more ${customText}-->` : "<!--more-->";
    const noTeaserTag = noTeaser ? "<!--noteaser-->" : "";
    return /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(import_element58.RawHTML, { children: [moreTag, noTeaserTag].filter(Boolean).join("\n") });
  }

  // packages/block-library/build-module/more/transforms.mjs
  var import_blocks55 = __toESM(require_blocks(), 1);
  var transforms17 = {
    from: [
      {
        type: "raw",
        schema: {
          "wp-block": { attributes: ["data-block"] }
        },
        isMatch: (node) => node.dataset && node.dataset.block === "core/more",
        transform(node) {
          const { customText, noTeaser } = node.dataset;
          const attrs = {};
          if (customText) {
            attrs.customText = customText;
          }
          if (noTeaser === "") {
            attrs.noTeaser = true;
          }
          return (0, import_blocks55.createBlock)("core/more", attrs);
        }
      }
    ]
  };
  var transforms_default18 = transforms17;

  // packages/block-library/build-module/more/index.mjs
  var { fieldsKey: fieldsKey11, formKey: formKey11 } = unlock(import_blocks56.privateApis);
  var { name: name53 } = block_default53;
  var settings53 = {
    icon: more_default,
    example: {},
    __experimentalLabel(attributes2, { context }) {
      const customName = attributes2?.metadata?.name;
      if ((context === "list-view" || context === "breadcrumb") && customName) {
        return customName;
      }
      if (context === "accessibility") {
        return attributes2.customText;
      }
    },
    transforms: transforms_default18,
    edit: MoreEdit,
    save: save32
  };
  if (window.__experimentalContentOnlyInspectorFields) {
    settings53[fieldsKey11] = [
      {
        id: "customText",
        label: (0, import_i18n111.__)("Content"),
        type: "text",
        Edit: "rich-text"
        // TODO: replace with custom component
      }
    ];
    settings53[formKey11] = {
      fields: ["customText"]
    };
  }
  var init53 = () => initBlock({ name: name53, metadata: block_default53, settings: settings53 });

  // packages/block-library/build-module/navigation/index.mjs
  var navigation_exports = {};
  __export(navigation_exports, {
    init: () => init54,
    metadata: () => block_default54,
    name: () => name54,
    settings: () => settings54
  });
  var import_i18n142 = __toESM(require_i18n(), 1);
  var import_data87 = __toESM(require_data(), 1);
  var import_core_data50 = __toESM(require_core_data(), 1);
  var import_html_entities7 = __toESM(require_html_entities(), 1);

  // packages/block-library/build-module/navigation/block.json
  var block_default54 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/navigation",
    title: "Navigation",
    category: "theme",
    allowedBlocks: [
      "core/navigation-link",
      "core/search",
      "core/social-links",
      "core/page-list",
      "core/spacer",
      "core/home-link",
      "core/icon",
      "core/site-title",
      "core/site-logo",
      "core/navigation-submenu",
      "core/loginout",
      "core/buttons"
    ],
    description: "A collection of blocks that allow visitors to get around your site.",
    keywords: ["menu", "navigation", "links"],
    textdomain: "default",
    attributes: {
      ref: {
        type: "number"
      },
      textColor: {
        type: "string"
      },
      customTextColor: {
        type: "string"
      },
      rgbTextColor: {
        type: "string"
      },
      backgroundColor: {
        type: "string"
      },
      customBackgroundColor: {
        type: "string"
      },
      rgbBackgroundColor: {
        type: "string"
      },
      showSubmenuIcon: {
        type: "boolean",
        default: true
      },
      submenuVisibility: {
        type: "string",
        enum: ["hover", "click", "always"],
        default: "hover"
      },
      overlayMenu: {
        type: "string",
        default: "mobile"
      },
      overlay: {
        type: "string"
      },
      icon: {
        type: "string",
        default: "handle"
      },
      hasIcon: {
        type: "boolean",
        default: true
      },
      __unstableLocation: {
        type: "string"
      },
      overlayBackgroundColor: {
        type: "string"
      },
      customOverlayBackgroundColor: {
        type: "string"
      },
      overlayTextColor: {
        type: "string"
      },
      customOverlayTextColor: {
        type: "string"
      },
      maxNestingLevel: {
        type: "number",
        default: 5
      },
      templateLock: {
        type: ["string", "boolean"],
        enum: ["all", "insert", "contentOnly", false]
      }
    },
    providesContext: {
      textColor: "textColor",
      customTextColor: "customTextColor",
      backgroundColor: "backgroundColor",
      customBackgroundColor: "customBackgroundColor",
      overlayTextColor: "overlayTextColor",
      customOverlayTextColor: "customOverlayTextColor",
      overlayBackgroundColor: "overlayBackgroundColor",
      customOverlayBackgroundColor: "customOverlayBackgroundColor",
      fontSize: "fontSize",
      customFontSize: "customFontSize",
      showSubmenuIcon: "showSubmenuIcon",
      submenuVisibility: "submenuVisibility",
      openSubmenusOnClick: "openSubmenusOnClick",
      style: "style",
      maxNestingLevel: "maxNestingLevel"
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      ariaLabel: true,
      contentRole: true,
      html: false,
      inserter: true,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalTextTransform: true,
        __experimentalFontFamily: true,
        __experimentalLetterSpacing: true,
        __experimentalTextDecoration: true,
        __experimentalSkipSerialization: ["textDecoration"],
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      spacing: {
        blockGap: true,
        units: ["px", "em", "rem", "vh", "vw"],
        __experimentalDefaultControls: {
          blockGap: true
        }
      },
      layout: {
        allowSwitching: false,
        allowInheriting: false,
        allowVerticalAlignment: false,
        allowSizingOnChildren: true,
        default: {
          type: "flex"
        }
      },
      interactivity: true,
      renaming: false
    },
    editorStyle: "wp-block-navigation-editor",
    style: "wp-block-navigation"
  };

  // packages/block-library/build-module/navigation/edit/index.mjs
  var import_element80 = __toESM(require_element(), 1);
  var import_block_editor157 = __toESM(require_block_editor(), 1);
  var import_core_data49 = __toESM(require_core_data(), 1);
  var import_data86 = __toESM(require_data(), 1);
  var import_components93 = __toESM(require_components(), 1);
  var import_i18n141 = __toESM(require_i18n(), 1);
  var import_a11y3 = __toESM(require_a11y(), 1);
  var import_blocks62 = __toESM(require_blocks(), 1);
  var import_compose35 = __toESM(require_compose(), 1);

  // packages/block-library/build-module/navigation/use-navigation-menu.mjs
  var import_core_data26 = __toESM(require_core_data(), 1);
  var import_data61 = __toESM(require_data(), 1);

  // packages/block-library/build-module/navigation/constants.mjs
  var DEFAULT_BLOCK5 = {
    name: "core/navigation-link",
    attributes: {
      kind: "post-type",
      type: "page"
    }
  };
  var PRIORITIZED_INSERTER_BLOCKS = [
    "core/navigation-link/page",
    "core/navigation-link"
  ];
  var PRELOADED_NAVIGATION_MENUS_QUERY = {
    per_page: 100,
    status: ["publish", "draft"],
    order: "desc",
    orderby: "date"
  };
  var SELECT_NAVIGATION_MENUS_ARGS = [
    "postType",
    "wp_navigation",
    PRELOADED_NAVIGATION_MENUS_QUERY
  ];
  var NAVIGATION_OVERLAY_TEMPLATE_PART_AREA = "navigation-overlay";

  // packages/block-library/build-module/navigation/use-navigation-menu.mjs
  function useNavigationMenu(ref) {
    const permissions = (0, import_core_data26.useResourcePermissions)({
      kind: "postType",
      name: "wp_navigation",
      id: ref
    });
    const {
      navigationMenu,
      isNavigationMenuResolved,
      isNavigationMenuMissing
    } = (0, import_data61.useSelect)(
      (select9) => {
        return selectExistingMenu(select9, ref);
      },
      [ref]
    );
    const {
      // Can the user create navigation menus?
      canCreate: canCreateNavigationMenus,
      // Can the user update the specific navigation menu with the given post ID?
      canUpdate: canUpdateNavigationMenu,
      // Can the user delete the specific navigation menu with the given post ID?
      canDelete: canDeleteNavigationMenu,
      isResolving: isResolvingPermissions,
      hasResolved: hasResolvedPermissions
    } = permissions;
    const {
      records: navigationMenus,
      isResolving: isResolvingNavigationMenus,
      hasResolved: hasResolvedNavigationMenus
    } = (0, import_core_data26.useEntityRecords)(
      "postType",
      `wp_navigation`,
      PRELOADED_NAVIGATION_MENUS_QUERY
    );
    const canSwitchNavigationMenu = ref ? navigationMenus?.length > 1 : navigationMenus?.length > 0;
    return {
      navigationMenu,
      isNavigationMenuResolved,
      isNavigationMenuMissing,
      navigationMenus,
      isResolvingNavigationMenus,
      hasResolvedNavigationMenus,
      canSwitchNavigationMenu,
      canUserCreateNavigationMenus: canCreateNavigationMenus,
      isResolvingCanUserCreateNavigationMenus: isResolvingPermissions,
      hasResolvedCanUserCreateNavigationMenus: hasResolvedPermissions,
      canUserUpdateNavigationMenu: canUpdateNavigationMenu,
      hasResolvedCanUserUpdateNavigationMenu: ref ? hasResolvedPermissions : void 0,
      canUserDeleteNavigationMenu: canDeleteNavigationMenu,
      hasResolvedCanUserDeleteNavigationMenu: ref ? hasResolvedPermissions : void 0
    };
  }
  function selectExistingMenu(select9, ref) {
    if (!ref) {
      return {
        isNavigationMenuResolved: false,
        isNavigationMenuMissing: true
      };
    }
    const { getEntityRecord, getEditedEntityRecord, hasFinishedResolution } = select9(import_core_data26.store);
    const args = ["postType", "wp_navigation", ref];
    const navigationMenu = getEntityRecord(...args);
    const editedNavigationMenu = getEditedEntityRecord(...args);
    const hasResolvedNavigationMenu = hasFinishedResolution(
      "getEditedEntityRecord",
      args
    );
    const isNavigationMenuPublishedOrDraft = editedNavigationMenu.status === "publish" || editedNavigationMenu.status === "draft";
    return {
      isNavigationMenuResolved: hasResolvedNavigationMenu,
      isNavigationMenuMissing: hasResolvedNavigationMenu && (!navigationMenu || !isNavigationMenuPublishedOrDraft),
      // getEditedEntityRecord will return the post regardless of status.
      // Therefore if the found post is not published then we should ignore it.
      navigationMenu: isNavigationMenuPublishedOrDraft ? editedNavigationMenu : null
    };
  }

  // packages/block-library/build-module/navigation/use-navigation-entities.mjs
  var import_core_data27 = __toESM(require_core_data(), 1);
  function useNavigationEntities(menuId) {
    const {
      records: menus,
      isResolving: isResolvingMenus,
      hasResolved: hasResolvedMenus
    } = (0, import_core_data27.useEntityRecords)("root", "menu", { per_page: -1, context: "view" });
    const {
      records: pages,
      isResolving: isResolvingPages,
      hasResolved: hasResolvedPages
    } = (0, import_core_data27.useEntityRecords)("postType", "page", {
      parent: 0,
      order: "asc",
      orderby: "id",
      per_page: -1,
      context: "view"
    });
    const { records: menuItems, hasResolved: hasResolvedMenuItems } = (0, import_core_data27.useEntityRecords)(
      "root",
      "menuItem",
      {
        menus: menuId,
        per_page: -1,
        context: "view"
      },
      { enabled: !!menuId }
    );
    return {
      pages,
      isResolvingPages,
      hasResolvedPages,
      hasPages: !!(hasResolvedPages && pages?.length),
      menus,
      isResolvingMenus,
      hasResolvedMenus,
      hasMenus: !!(hasResolvedMenus && menus?.length),
      menuItems,
      hasResolvedMenuItems
    };
  }

  // packages/block-library/build-module/navigation/edit/placeholder/index.mjs
  var import_components70 = __toESM(require_components(), 1);
  var import_i18n114 = __toESM(require_i18n(), 1);
  var import_a11y2 = __toESM(require_a11y(), 1);
  var import_element60 = __toESM(require_element(), 1);

  // packages/block-library/build-module/navigation/edit/placeholder/placeholder-preview.mjs
  var import_i18n112 = __toESM(require_i18n(), 1);
  var import_jsx_runtime303 = __toESM(require_jsx_runtime(), 1);
  var PlaceholderPreview = ({ isVisible = true }) => {
    return /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
      "div",
      {
        "aria-hidden": !isVisible ? true : void 0,
        className: "wp-block-navigation-placeholder__preview",
        children: /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("div", { className: "wp-block-navigation-placeholder__actions__indicator", children: [
          /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(icon_default, { icon: navigation_default }),
          (0, import_i18n112.__)("Navigation")
        ] })
      }
    );
  };
  var placeholder_preview_default = PlaceholderPreview;

  // packages/block-library/build-module/navigation/edit/navigation-menu-selector.mjs
  var import_components69 = __toESM(require_components(), 1);
  var import_i18n113 = __toESM(require_i18n(), 1);
  var import_html_entities3 = __toESM(require_html_entities(), 1);
  var import_element59 = __toESM(require_element(), 1);
  var import_core_data28 = __toESM(require_core_data(), 1);
  var import_jsx_runtime304 = __toESM(require_jsx_runtime(), 1);
  function buildMenuLabel(title, id, status) {
    if (!title) {
      return (0, import_i18n113.sprintf)((0, import_i18n113.__)("(no title %s)"), id);
    }
    if (status === "publish") {
      return (0, import_html_entities3.decodeEntities)(title);
    }
    return (0, import_i18n113.sprintf)(
      // translators: 1: title of the menu. 2: status of the menu (draft, pending, etc.).
      (0, import_i18n113.__)("%1$s (%2$s)"),
      (0, import_html_entities3.decodeEntities)(title),
      status
    );
  }
  function NavigationMenuSelector({
    currentMenuId,
    onSelectNavigationMenu,
    onSelectClassicMenu,
    onCreateNew,
    actionLabel: actionLabel2,
    createNavigationMenuIsSuccess,
    createNavigationMenuIsError
  }) {
    const createActionLabel = (0, import_i18n113.__)("Create from '%s'");
    const [isUpdatingMenuRef, setIsUpdatingMenuRef] = (0, import_element59.useState)(false);
    actionLabel2 = actionLabel2 || createActionLabel;
    const { menus: classicMenus } = useNavigationEntities();
    const {
      navigationMenus,
      isResolvingNavigationMenus,
      hasResolvedNavigationMenus,
      canUserCreateNavigationMenus,
      canSwitchNavigationMenu,
      isNavigationMenuMissing
    } = useNavigationMenu(currentMenuId);
    const [currentTitle] = (0, import_core_data28.useEntityProp)(
      "postType",
      "wp_navigation",
      "title",
      currentMenuId
    );
    const menuChoices = (0, import_element59.useMemo)(() => {
      return navigationMenus?.map(({ id, title, status }, index) => {
        const label = buildMenuLabel(
          title?.rendered,
          index + 1,
          status
        );
        return {
          value: id,
          label,
          ariaLabel: (0, import_i18n113.sprintf)(actionLabel2, label),
          disabled: isUpdatingMenuRef || isResolvingNavigationMenus || !hasResolvedNavigationMenus
        };
      }) || [];
    }, [
      navigationMenus,
      actionLabel2,
      isResolvingNavigationMenus,
      hasResolvedNavigationMenus,
      isUpdatingMenuRef
    ]);
    const hasNavigationMenus = !!navigationMenus?.length;
    const hasClassicMenus = !!classicMenus?.length;
    const showNavigationMenus = !!canSwitchNavigationMenu;
    const showClassicMenus = !!canUserCreateNavigationMenus;
    const noMenuSelected = hasNavigationMenus && !currentMenuId;
    const noBlockMenus = !hasNavigationMenus && hasResolvedNavigationMenus;
    const menuUnavailable = hasResolvedNavigationMenus && currentMenuId === null;
    const navMenuHasBeenDeleted = currentMenuId && isNavigationMenuMissing;
    let selectorLabel = "";
    if (isResolvingNavigationMenus) {
      selectorLabel = (0, import_i18n113.__)("Loading\u2026");
    } else if (noMenuSelected || noBlockMenus || menuUnavailable || navMenuHasBeenDeleted) {
      selectorLabel = (0, import_i18n113.__)("Choose or create a Navigation Menu");
    } else {
      selectorLabel = currentTitle;
    }
    (0, import_element59.useEffect)(() => {
      if (isUpdatingMenuRef && (createNavigationMenuIsSuccess || createNavigationMenuIsError)) {
        setIsUpdatingMenuRef(false);
      }
    }, [
      hasResolvedNavigationMenus,
      createNavigationMenuIsSuccess,
      canUserCreateNavigationMenus,
      createNavigationMenuIsError,
      isUpdatingMenuRef,
      menuUnavailable,
      noBlockMenus,
      noMenuSelected
    ]);
    const NavigationMenuSelectorDropdown = /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
      import_components69.DropdownMenu,
      {
        label: selectorLabel,
        icon: more_vertical_default,
        toggleProps: { size: "small" },
        children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime304.jsxs)(import_jsx_runtime304.Fragment, { children: [
          showNavigationMenus && hasNavigationMenus && /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(import_components69.MenuGroup, { label: (0, import_i18n113.__)("Menus"), children: /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
            import_components69.MenuItemsChoice,
            {
              value: currentMenuId,
              onSelect: (menuId) => {
                onSelectNavigationMenu(menuId);
                onClose();
              },
              choices: menuChoices
            }
          ) }),
          showClassicMenus && hasClassicMenus && /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(import_components69.MenuGroup, { label: (0, import_i18n113.__)("Import Classic Menus"), children: classicMenus?.map((menu) => {
            const label = (0, import_html_entities3.decodeEntities)(menu.name);
            return /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
              import_components69.MenuItem,
              {
                onClick: async () => {
                  setIsUpdatingMenuRef(true);
                  await onSelectClassicMenu(menu);
                  setIsUpdatingMenuRef(false);
                  onClose();
                },
                "aria-label": (0, import_i18n113.sprintf)(
                  createActionLabel,
                  label
                ),
                disabled: isUpdatingMenuRef || isResolvingNavigationMenus || !hasResolvedNavigationMenus,
                children: label
              },
              menu.id
            );
          }) }),
          canUserCreateNavigationMenus && /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(import_components69.MenuGroup, { label: (0, import_i18n113.__)("Tools"), children: /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
            import_components69.MenuItem,
            {
              onClick: async () => {
                setIsUpdatingMenuRef(true);
                await onCreateNew();
                setIsUpdatingMenuRef(false);
                onClose();
              },
              disabled: isUpdatingMenuRef || isResolvingNavigationMenus || !hasResolvedNavigationMenus,
              children: (0, import_i18n113.__)("Create new Menu")
            }
          ) })
        ] })
      }
    );
    return NavigationMenuSelectorDropdown;
  }
  var navigation_menu_selector_default = NavigationMenuSelector;

  // packages/block-library/build-module/navigation/edit/placeholder/index.mjs
  var import_jsx_runtime305 = __toESM(require_jsx_runtime(), 1);
  function NavigationPlaceholder({
    isSelected,
    currentMenuId,
    clientId,
    canUserCreateNavigationMenus = false,
    isResolvingCanUserCreateNavigationMenus,
    onSelectNavigationMenu,
    onSelectClassicMenu,
    onCreateEmpty
  }) {
    const { isResolvingMenus, hasResolvedMenus } = useNavigationEntities();
    (0, import_element60.useEffect)(() => {
      if (!isSelected) {
        return;
      }
      if (isResolvingMenus) {
        (0, import_a11y2.speak)((0, import_i18n114.__)("Loading navigation block setup options\u2026"));
      }
      if (hasResolvedMenus) {
        (0, import_a11y2.speak)((0, import_i18n114.__)("Navigation block setup options ready."));
      }
    }, [hasResolvedMenus, isResolvingMenus, isSelected]);
    const isResolvingActions = isResolvingMenus && isResolvingCanUserCreateNavigationMenus;
    return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(import_jsx_runtime305.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)(import_components70.Placeholder, { className: "wp-block-navigation-placeholder", children: [
      /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(placeholder_preview_default, { isVisible: !isSelected }),
      /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
        "div",
        {
          "aria-hidden": !isSelected ? true : void 0,
          className: "wp-block-navigation-placeholder__controls",
          children: /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("div", { className: "wp-block-navigation-placeholder__actions", children: [
            /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("div", { className: "wp-block-navigation-placeholder__actions__indicator", children: [
              /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(icon_default, { icon: navigation_default }),
              " ",
              (0, import_i18n114.__)("Navigation")
            ] }),
            /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("hr", {}),
            isResolvingActions && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(import_components70.Spinner, {}),
            /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
              navigation_menu_selector_default,
              {
                currentMenuId,
                clientId,
                onSelectNavigationMenu,
                onSelectClassicMenu
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("hr", {}),
            canUserCreateNavigationMenus && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
              import_components70.Button,
              {
                __next40pxDefaultSize: true,
                variant: "tertiary",
                onClick: onCreateEmpty,
                children: (0, import_i18n114.__)("Start empty")
              }
            )
          ] })
        }
      )
    ] }) });
  }

  // packages/block-library/build-module/navigation/edit/responsive-wrapper.mjs
  var import_components71 = __toESM(require_components(), 1);
  var import_i18n115 = __toESM(require_i18n(), 1);
  var import_block_editor139 = __toESM(require_block_editor(), 1);
  var import_data62 = __toESM(require_data(), 1);
  var import_core_data29 = __toESM(require_core_data(), 1);

  // packages/block-library/build-module/navigation/edit/overlay-menu-icon.mjs
  var import_primitives163 = __toESM(require_primitives(), 1);
  var import_jsx_runtime306 = __toESM(require_jsx_runtime(), 1);
  function OverlayMenuIcon({ icon: icon4 }) {
    if (icon4 === "menu") {
      return /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(icon_default, { icon: menu_default });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)(
      import_primitives163.SVG,
      {
        xmlns: "http://www.w3.org/2000/svg",
        viewBox: "0 0 24 24",
        width: "24",
        height: "24",
        "aria-hidden": "true",
        focusable: "false",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(import_primitives163.Rect, { x: "4", y: "7.5", width: "16", height: "1.5" }),
          /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(import_primitives163.Rect, { x: "4", y: "15", width: "16", height: "1.5" })
        ]
      }
    );
  }

  // packages/block-library/build-module/template-part/edit/utils/create-template-part-id.mjs
  function createTemplatePartId(theme, slug) {
    return theme && slug ? theme + "//" + slug : null;
  }

  // packages/block-library/build-module/navigation/edit/responsive-wrapper.mjs
  var import_jsx_runtime307 = __toESM(require_jsx_runtime(), 1);
  function ResponsiveWrapper({
    children,
    id,
    isOpen,
    isResponsive,
    onToggle,
    isHiddenByDefault,
    overlayBackgroundColor,
    overlayTextColor,
    hasIcon,
    icon: icon4,
    overlay,
    onNavigateToEntityRecord
  }) {
    const currentTheme = (0, import_data62.useSelect)(
      (select9) => select9(import_core_data29.store).getCurrentTheme()?.stylesheet,
      []
    );
    if (!isResponsive) {
      return children;
    }
    const hasCustomOverlay = !!overlay;
    const responsiveContainerClasses = clsx_default(
      "wp-block-navigation__responsive-container",
      !hasCustomOverlay && {
        "has-text-color": !!overlayTextColor.color || !!overlayTextColor?.class,
        [(0, import_block_editor139.getColorClassName)("color", overlayTextColor?.slug)]: !!overlayTextColor?.slug,
        "has-background": !!overlayBackgroundColor.color || overlayBackgroundColor?.class,
        [(0, import_block_editor139.getColorClassName)(
          "background-color",
          overlayBackgroundColor?.slug
        )]: !!overlayBackgroundColor?.slug
      },
      {
        "is-menu-open": isOpen,
        "hidden-by-default": isHiddenByDefault
      }
    );
    const styles = !hasCustomOverlay ? {
      color: !overlayTextColor?.slug && overlayTextColor?.color,
      backgroundColor: !overlayBackgroundColor?.slug && overlayBackgroundColor?.color && overlayBackgroundColor.color
    } : {};
    const openButtonClasses = clsx_default(
      "wp-block-navigation__responsive-container-open",
      { "always-shown": isHiddenByDefault }
    );
    const modalId = `${id}-modal`;
    const dialogProps = {
      className: "wp-block-navigation__responsive-dialog",
      ...isOpen && {
        role: "dialog",
        "aria-modal": true,
        "aria-label": (0, import_i18n115.__)("Menu")
      }
    };
    const handleToggleClick = () => {
      if (overlay && onNavigateToEntityRecord) {
        const templatePartId = createTemplatePartId(
          currentTheme,
          overlay
        );
        onNavigateToEntityRecord({
          postId: templatePartId,
          postType: "wp_template_part"
        });
        return;
      }
      onToggle(true);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime307.jsxs)(import_jsx_runtime307.Fragment, { children: [
      !isOpen && /* @__PURE__ */ (0, import_jsx_runtime307.jsxs)(
        import_components71.Button,
        {
          __next40pxDefaultSize: true,
          "aria-haspopup": "true",
          "aria-label": hasIcon && (0, import_i18n115.__)("Open menu"),
          className: openButtonClasses,
          onClick: handleToggleClick,
          children: [
            hasIcon && /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(OverlayMenuIcon, { icon: icon4 }),
            !hasIcon && (0, import_i18n115.__)("Menu")
          ]
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
        "div",
        {
          className: responsiveContainerClasses,
          style: styles,
          id: modalId,
          children: /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
            "div",
            {
              className: "wp-block-navigation__responsive-close",
              tabIndex: "-1",
              children: /* @__PURE__ */ (0, import_jsx_runtime307.jsxs)("div", { ...dialogProps, children: [
                /* @__PURE__ */ (0, import_jsx_runtime307.jsxs)(
                  import_components71.Button,
                  {
                    __next40pxDefaultSize: true,
                    className: "wp-block-navigation__responsive-container-close",
                    "aria-label": hasIcon && (0, import_i18n115.__)("Close menu"),
                    onClick: () => onToggle(false),
                    children: [
                      hasIcon && /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(icon_default, { icon: close_default }),
                      !hasIcon && (0, import_i18n115.__)("Close")
                    ]
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
                  "div",
                  {
                    className: "wp-block-navigation__responsive-container-content",
                    id: `${modalId}-content`,
                    children
                  }
                )
              ] })
            }
          )
        }
      )
    ] });
  }

  // packages/block-library/build-module/navigation/edit/inner-blocks.mjs
  var import_core_data30 = __toESM(require_core_data(), 1);
  var import_block_editor140 = __toESM(require_block_editor(), 1);
  var import_data63 = __toESM(require_data(), 1);
  var import_element61 = __toESM(require_element(), 1);
  var import_jsx_runtime308 = __toESM(require_jsx_runtime(), 1);
  function NavigationInnerBlocks({
    clientId,
    hasCustomPlaceholder,
    orientation,
    templateLock
  }) {
    const {
      isImmediateParentOfSelectedBlock,
      selectedBlockHasChildren,
      isSelected,
      hasSelectedDescendant
    } = (0, import_data63.useSelect)(
      (select9) => {
        const {
          getBlockCount,
          hasSelectedInnerBlock,
          getSelectedBlockClientId
        } = select9(import_block_editor140.store);
        const selectedBlockId = getSelectedBlockClientId();
        return {
          isImmediateParentOfSelectedBlock: hasSelectedInnerBlock(
            clientId,
            false
          ),
          selectedBlockHasChildren: !!getBlockCount(selectedBlockId),
          hasSelectedDescendant: hasSelectedInnerBlock(clientId, true),
          // This prop is already available but computing it here ensures it's
          // fresh compared to isImmediateParentOfSelectedBlock.
          isSelected: selectedBlockId === clientId
        };
      },
      [clientId]
    );
    const [blocks, onInput, onChange] = (0, import_core_data30.useEntityBlockEditor)(
      "postType",
      "wp_navigation"
    );
    const parentOrChildHasSelection = isSelected || isImmediateParentOfSelectedBlock && !selectedBlockHasChildren;
    const placeholder2 = (0, import_element61.useMemo)(() => /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(placeholder_preview_default, {}), []);
    const hasMenuItems = !!blocks?.length;
    const showPlaceholder = !hasCustomPlaceholder && !hasMenuItems && !isSelected;
    const innerBlocksProps = (0, import_block_editor140.useInnerBlocksProps)(
      {
        className: "wp-block-navigation__container"
      },
      {
        value: blocks,
        onInput,
        onChange,
        prioritizedInserterBlocks: PRIORITIZED_INSERTER_BLOCKS,
        defaultBlock: DEFAULT_BLOCK5,
        directInsert: true,
        orientation,
        templateLock,
        // As an exception to other blocks which feature nesting, show
        // the block appender even when a child block is selected.
        // This should be a temporary fix, to be replaced by improvements to
        // the sibling inserter.
        // See https://github.com/WordPress/gutenberg/issues/37572.
        renderAppender: isSelected || isImmediateParentOfSelectedBlock && !selectedBlockHasChildren || hasSelectedDescendant || // Show the appender while dragging to allow inserting element between item and the appender.
        parentOrChildHasSelection ? import_block_editor140.InnerBlocks.ButtonBlockAppender : false,
        placeholder: showPlaceholder ? placeholder2 : void 0,
        __experimentalCaptureToolbars: true,
        __unstableDisableLayoutClassNames: true
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime308.jsx)("div", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/navigation/edit/navigation-menu-name-control.mjs
  var import_components72 = __toESM(require_components(), 1);
  var import_core_data31 = __toESM(require_core_data(), 1);
  var import_i18n116 = __toESM(require_i18n(), 1);
  var import_jsx_runtime309 = __toESM(require_jsx_runtime(), 1);
  function NavigationMenuNameControl() {
    const [title, updateTitle] = (0, import_core_data31.useEntityProp)(
      "postType",
      "wp_navigation",
      "title"
    );
    return /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
      import_components72.TextControl,
      {
        __next40pxDefaultSize: true,
        label: (0, import_i18n116.__)("Menu name"),
        value: title,
        onChange: updateTitle
      }
    );
  }

  // packages/block-library/build-module/navigation/edit/unsaved-inner-blocks.mjs
  var import_block_editor141 = __toESM(require_block_editor(), 1);
  var import_components73 = __toESM(require_components(), 1);
  var import_core_data32 = __toESM(require_core_data(), 1);
  var import_data64 = __toESM(require_data(), 1);
  var import_element62 = __toESM(require_element(), 1);

  // packages/block-library/build-module/navigation/edit/are-blocks-dirty.mjs
  function areBlocksDirty(originalBlocks, blocks) {
    return !isDeepEqual(originalBlocks, blocks, (prop, x2) => {
      if (x2?.name === "core/page-list" && prop === "innerBlocks") {
        return true;
      }
    });
  }
  var isDeepEqual = (x2, y2, shouldSkip) => {
    if (x2 === y2) {
      return true;
    } else if (typeof x2 === "object" && x2 !== null && x2 !== void 0 && typeof y2 === "object" && y2 !== null && y2 !== void 0) {
      if (Object.keys(x2).length !== Object.keys(y2).length) {
        return false;
      }
      for (const prop in x2) {
        if (y2.hasOwnProperty(prop)) {
          if (shouldSkip && shouldSkip(prop, x2)) {
            return true;
          }
          if (!isDeepEqual(x2[prop], y2[prop], shouldSkip)) {
            return false;
          }
        } else {
          return false;
        }
      }
      return true;
    }
    return false;
  };

  // packages/block-library/build-module/navigation/edit/unsaved-inner-blocks.mjs
  var import_jsx_runtime310 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_OBJECT = {};
  function UnsavedInnerBlocks({
    blocks,
    createNavigationMenu,
    hasSelection
  }) {
    const originalBlocksRef = (0, import_element62.useRef)();
    (0, import_element62.useEffect)(() => {
      if (!originalBlocksRef?.current) {
        originalBlocksRef.current = blocks;
      }
    }, [blocks]);
    const innerBlocksAreDirty = areBlocksDirty(
      originalBlocksRef?.current,
      blocks
    );
    const isDisabled = (0, import_element62.useContext)(import_components73.Disabled.Context);
    const innerBlocksProps = (0, import_block_editor141.useInnerBlocksProps)(
      {
        className: "wp-block-navigation__container"
      },
      {
        renderAppender: hasSelection ? void 0 : false,
        defaultBlock: DEFAULT_BLOCK5,
        directInsert: true
      }
    );
    const { isSaving, hasResolvedAllNavigationMenus } = (0, import_data64.useSelect)(
      (select9) => {
        if (isDisabled) {
          return EMPTY_OBJECT;
        }
        const { hasFinishedResolution, isSavingEntityRecord } = select9(import_core_data32.store);
        return {
          isSaving: isSavingEntityRecord("postType", "wp_navigation"),
          hasResolvedAllNavigationMenus: hasFinishedResolution(
            "getEntityRecords",
            SELECT_NAVIGATION_MENUS_ARGS
          )
        };
      },
      [isDisabled]
    );
    (0, import_element62.useEffect)(() => {
      if (isDisabled || isSaving || !hasResolvedAllNavigationMenus || !hasSelection || !innerBlocksAreDirty) {
        return;
      }
      createNavigationMenu(null, blocks);
    }, [
      blocks,
      createNavigationMenu,
      isDisabled,
      isSaving,
      hasResolvedAllNavigationMenus,
      innerBlocksAreDirty,
      hasSelection
    ]);
    const Wrapper = isSaving ? import_components73.Disabled : "div";
    return /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(Wrapper, { ...innerBlocksProps });
  }

  // packages/block-library/build-module/navigation/edit/navigation-menu-delete-control.mjs
  var import_components74 = __toESM(require_components(), 1);
  var import_core_data33 = __toESM(require_core_data(), 1);
  var import_data65 = __toESM(require_data(), 1);
  var import_element63 = __toESM(require_element(), 1);
  var import_i18n117 = __toESM(require_i18n(), 1);
  var import_jsx_runtime311 = __toESM(require_jsx_runtime(), 1);
  function NavigationMenuDeleteControl({ onDelete }) {
    const [isConfirmDialogVisible, setIsConfirmDialogVisible] = (0, import_element63.useState)(false);
    const id = (0, import_core_data33.useEntityId)("postType", "wp_navigation");
    const { deleteEntityRecord } = (0, import_data65.useDispatch)(import_core_data33.store);
    return /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)(import_jsx_runtime311.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
        import_components74.Button,
        {
          __next40pxDefaultSize: true,
          className: "wp-block-navigation-delete-menu-button",
          variant: "secondary",
          isDestructive: true,
          onClick: () => {
            setIsConfirmDialogVisible(true);
          },
          children: (0, import_i18n117.__)("Delete menu")
        }
      ),
      isConfirmDialogVisible && /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
        import_components74.__experimentalConfirmDialog,
        {
          isOpen: true,
          onConfirm: () => {
            deleteEntityRecord("postType", "wp_navigation", id, {
              force: true
            });
            onDelete();
          },
          onCancel: () => {
            setIsConfirmDialogVisible(false);
          },
          confirmButtonText: (0, import_i18n117.__)("Delete"),
          size: "medium",
          children: (0, import_i18n117.__)(
            "Are you sure you want to delete this Navigation Menu?"
          )
        }
      )
    ] });
  }

  // packages/block-library/build-module/navigation/edit/use-navigation-notice.mjs
  var import_element64 = __toESM(require_element(), 1);
  var import_data66 = __toESM(require_data(), 1);
  var import_notices11 = __toESM(require_notices(), 1);
  function useNavigationNotice({ name: name123, message = "" } = {}) {
    const noticeRef = (0, import_element64.useRef)();
    const { createWarningNotice, removeNotice } = (0, import_data66.useDispatch)(import_notices11.store);
    const showNotice = (0, import_element64.useCallback)(
      (customMsg) => {
        if (noticeRef.current) {
          return;
        }
        noticeRef.current = name123;
        createWarningNotice(customMsg || message, {
          id: noticeRef.current,
          type: "snackbar"
        });
      },
      [noticeRef, createWarningNotice, message, name123]
    );
    const hideNotice = (0, import_element64.useCallback)(() => {
      if (!noticeRef.current) {
        return;
      }
      removeNotice(noticeRef.current);
      noticeRef.current = null;
    }, [noticeRef, removeNotice]);
    return [showNotice, hideNotice];
  }
  var use_navigation_notice_default = useNavigationNotice;

  // packages/block-library/build-module/navigation/edit/overlay-menu-preview.mjs
  var import_components75 = __toESM(require_components(), 1);
  var import_i18n118 = __toESM(require_i18n(), 1);
  var import_jsx_runtime312 = __toESM(require_jsx_runtime(), 1);
  function OverlayMenuPreview({ setAttributes, hasIcon, icon: icon4 }) {
    return /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(import_jsx_runtime312.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
        import_components75.__experimentalToolsPanelItem,
        {
          label: (0, import_i18n118.__)("Show icon button"),
          isShownByDefault: true,
          hasValue: () => !hasIcon,
          onDeselect: () => setAttributes({ hasIcon: true }),
          children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
            import_components75.ToggleControl,
            {
              label: (0, import_i18n118.__)("Show icon button"),
              help: (0, import_i18n118.__)(
                "Configure the visual appearance of the button that toggles the overlay menu."
              ),
              onChange: (value) => setAttributes({ hasIcon: value }),
              checked: hasIcon
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
        import_components75.__experimentalToolsPanelItem,
        {
          label: (0, import_i18n118.__)("Icon"),
          isShownByDefault: true,
          hasValue: () => icon4 !== "handle",
          onDeselect: () => setAttributes({ icon: "handle" }),
          children: /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(
            import_components75.__experimentalToggleGroupControl,
            {
              __next40pxDefaultSize: true,
              className: "wp-block-navigation__overlay-menu-icon-toggle-group",
              label: (0, import_i18n118.__)("Icon"),
              value: icon4,
              onChange: (value) => setAttributes({ icon: value }),
              isBlock: true,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
                  import_components75.__experimentalToggleGroupControlOption,
                  {
                    value: "handle",
                    "aria-label": (0, import_i18n118.__)("handle"),
                    label: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(OverlayMenuIcon, { icon: "handle" })
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
                  import_components75.__experimentalToggleGroupControlOption,
                  {
                    value: "menu",
                    "aria-label": (0, import_i18n118.__)("menu"),
                    label: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(OverlayMenuIcon, { icon: "menu" })
                  }
                )
              ]
            }
          )
        }
      )
    ] });
  }

  // packages/block-library/build-module/navigation/edit/overlay-panel.mjs
  var import_components82 = __toESM(require_components(), 1);
  var import_i18n126 = __toESM(require_i18n(), 1);
  var import_element69 = __toESM(require_element(), 1);

  // packages/block-library/build-module/navigation/edit/overlay-template-part-selector.mjs
  var import_element67 = __toESM(require_element(), 1);
  var import_compose32 = __toESM(require_compose(), 1);
  var import_core_data35 = __toESM(require_core_data(), 1);
  var import_data68 = __toESM(require_data(), 1);
  var import_components77 = __toESM(require_components(), 1);
  var import_i18n121 = __toESM(require_i18n(), 1);
  var import_html_entities4 = __toESM(require_html_entities(), 1);
  var import_notices12 = __toESM(require_notices(), 1);

  // packages/block-library/build-module/navigation/edit/use-create-overlay.mjs
  var import_element65 = __toESM(require_element(), 1);
  var import_data67 = __toESM(require_data(), 1);
  var import_core_data34 = __toESM(require_core_data(), 1);
  var import_block_editor142 = __toESM(require_block_editor(), 1);
  var import_i18n119 = __toESM(require_i18n(), 1);
  var import_blocks57 = __toESM(require_blocks(), 1);

  // node_modules/tslib/tslib.es6.mjs
  var __assign = function() {
    __assign = Object.assign || function __assign2(t2) {
      for (var s2, i2 = 1, n2 = arguments.length; i2 < n2; i2++) {
        s2 = arguments[i2];
        for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2)) t2[p2] = s2[p2];
      }
      return t2;
    };
    return __assign.apply(this, arguments);
  };

  // node_modules/lower-case/dist.es2015/index.js
  function lowerCase(str) {
    return str.toLowerCase();
  }

  // node_modules/no-case/dist.es2015/index.js
  var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
  var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
  function noCase(input, options2) {
    if (options2 === void 0) {
      options2 = {};
    }
    var _a = options2.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options2.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options2.transform, transform = _c === void 0 ? lowerCase : _c, _d = options2.delimiter, delimiter = _d === void 0 ? " " : _d;
    var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
    var start = 0;
    var end = result.length;
    while (result.charAt(start) === "\0")
      start++;
    while (result.charAt(end - 1) === "\0")
      end--;
    return result.slice(start, end).split("\0").map(transform).join(delimiter);
  }
  function replace(input, re, value) {
    if (re instanceof RegExp)
      return input.replace(re, value);
    return re.reduce(function(input2, re2) {
      return input2.replace(re2, value);
    }, input);
  }

  // node_modules/upper-case-first/dist.es2015/index.js
  function upperCaseFirst(input) {
    return input.charAt(0).toUpperCase() + input.substr(1);
  }

  // node_modules/capital-case/dist.es2015/index.js
  function capitalCaseTransform(input) {
    return upperCaseFirst(input.toLowerCase());
  }
  function capitalCase(input, options2) {
    if (options2 === void 0) {
      options2 = {};
    }
    return noCase(input, __assign({ delimiter: " ", transform: capitalCaseTransform }, options2));
  }

  // node_modules/dot-case/dist.es2015/index.js
  function dotCase(input, options2) {
    if (options2 === void 0) {
      options2 = {};
    }
    return noCase(input, __assign({ delimiter: "." }, options2));
  }

  // node_modules/param-case/dist.es2015/index.js
  function paramCase(input, options2) {
    if (options2 === void 0) {
      options2 = {};
    }
    return dotCase(input, __assign({ delimiter: "-" }, options2));
  }

  // packages/block-library/build-module/navigation/edit/utils.mjs
  function getComputedStyle(node) {
    return node.ownerDocument.defaultView.getComputedStyle(node);
  }
  function detectColors(colorsDetectionElement, setColor, setBackground) {
    if (!colorsDetectionElement) {
      return;
    }
    setColor(getComputedStyle(colorsDetectionElement).color);
    let backgroundColorNode = colorsDetectionElement;
    let backgroundColor = getComputedStyle(backgroundColorNode).backgroundColor;
    while (backgroundColor === "rgba(0, 0, 0, 0)" && backgroundColorNode.parentNode && backgroundColorNode.parentNode.nodeType === backgroundColorNode.parentNode.ELEMENT_NODE) {
      backgroundColorNode = backgroundColorNode.parentNode;
      backgroundColor = getComputedStyle(backgroundColorNode).backgroundColor;
    }
    setBackground(backgroundColor);
  }
  function getColors(context, isSubMenu) {
    const {
      textColor,
      customTextColor,
      backgroundColor,
      customBackgroundColor,
      overlayTextColor,
      customOverlayTextColor,
      overlayBackgroundColor,
      customOverlayBackgroundColor,
      style: style2
    } = context;
    const colors = {};
    if (isSubMenu && !!customOverlayTextColor) {
      colors.customTextColor = customOverlayTextColor;
    } else if (isSubMenu && !!overlayTextColor) {
      colors.textColor = overlayTextColor;
    } else if (!!customTextColor) {
      colors.customTextColor = customTextColor;
    } else if (!!textColor) {
      colors.textColor = textColor;
    } else if (!!style2?.color?.text) {
      colors.customTextColor = style2.color.text;
    }
    if (isSubMenu && !!customOverlayBackgroundColor) {
      colors.customBackgroundColor = customOverlayBackgroundColor;
    } else if (isSubMenu && !!overlayBackgroundColor) {
      colors.backgroundColor = overlayBackgroundColor;
    } else if (!!customBackgroundColor) {
      colors.customBackgroundColor = customBackgroundColor;
    } else if (!!backgroundColor) {
      colors.backgroundColor = backgroundColor;
    } else if (!!style2?.color?.background) {
      colors.customTextColor = style2.color.background;
    }
    return colors;
  }
  function getNavigationChildBlockProps(innerBlocksColors) {
    return {
      className: clsx_default("wp-block-navigation__submenu-container", {
        "has-text-color": !!(innerBlocksColors.textColor || innerBlocksColors.customTextColor),
        [`has-${innerBlocksColors.textColor}-color`]: !!innerBlocksColors.textColor,
        "has-background": !!(innerBlocksColors.backgroundColor || innerBlocksColors.customBackgroundColor),
        [`has-${innerBlocksColors.backgroundColor}-background-color`]: !!innerBlocksColors.backgroundColor
      }),
      style: {
        color: innerBlocksColors.customTextColor,
        backgroundColor: innerBlocksColors.customBackgroundColor
      }
    };
  }
  var getUniqueTemplatePartTitle = (title, templateParts) => {
    const lowercaseTitle = title.toLowerCase();
    const existingTitles = templateParts.map(
      (templatePart) => templatePart.title.rendered.toLowerCase()
    );
    if (!existingTitles.includes(lowercaseTitle)) {
      return title;
    }
    let suffix = 2;
    while (existingTitles.includes(`${lowercaseTitle} ${suffix}`)) {
      suffix++;
    }
    return `${title} ${suffix}`;
  };
  var getCleanTemplatePartSlug = (title) => {
    return paramCase(title).replace(/[^\w-]+/g, "") || "wp-custom-part";
  };

  // packages/block-library/build-module/navigation/edit/use-create-overlay.mjs
  function useCreateOverlayTemplatePart(overlayTemplateParts) {
    const { saveEntityRecord } = (0, import_data67.useDispatch)(import_core_data34.store);
    const pattern = (0, import_data67.useSelect)(
      (select9) => unlock(select9(import_block_editor142.store)).getPatternBySlug(
        "core/navigation-overlay"
      ),
      []
    );
    const createOverlayTemplatePart = (0, import_element65.useCallback)(async () => {
      const templatePartsWithTitles = overlayTemplateParts.filter(
        (templatePart2) => templatePart2.title?.rendered
      );
      const uniqueTitle = getUniqueTemplatePartTitle(
        (0, import_i18n119.__)("Navigation Overlay"),
        templatePartsWithTitles
      );
      const cleanSlug = getCleanTemplatePartSlug(uniqueTitle);
      let initialContent = "";
      if (pattern?.content) {
        const blocks = (0, import_blocks57.parse)(pattern.content, {
          __unstableSkipMigrationLogs: true
        });
        initialContent = (0, import_blocks57.serialize)(blocks);
      } else {
        initialContent = (0, import_blocks57.serialize)([(0, import_blocks57.createBlock)("core/paragraph")]);
      }
      const templatePart = await saveEntityRecord(
        "postType",
        "wp_template_part",
        {
          slug: cleanSlug,
          title: uniqueTitle,
          content: initialContent,
          area: NAVIGATION_OVERLAY_TEMPLATE_PART_AREA
        },
        { throwOnError: true }
      );
      return templatePart;
    }, [overlayTemplateParts, saveEntityRecord, pattern]);
    return createOverlayTemplatePart;
  }

  // packages/block-library/build-module/navigation/edit/deleted-overlay-warning.mjs
  var import_components76 = __toESM(require_components(), 1);
  var import_i18n120 = __toESM(require_i18n(), 1);
  var import_element66 = __toESM(require_element(), 1);
  var import_jsx_runtime313 = __toESM(require_jsx_runtime(), 1);
  function DeletedOverlayWarning({ onClear, onCreate, isCreating = false }) {
    const message = (0, import_element66.createInterpolateElement)(
      (0, import_i18n120.__)(
        "The selected overlay template part is missing or has been deleted. <clearButton>Reset to default overlay</clearButton> or <createButton>create a new overlay</createButton>."
      ),
      {
        clearButton: /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
          import_components76.Button,
          {
            __next40pxDefaultSize: true,
            onClick: onClear,
            variant: "link",
            disabled: isCreating,
            accessibleWhenDisabled: true
          }
        ),
        createButton: /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
          import_components76.Button,
          {
            __next40pxDefaultSize: true,
            onClick: onCreate,
            variant: "link",
            disabled: isCreating,
            accessibleWhenDisabled: true,
            isBusy: isCreating
          }
        )
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
      import_components76.Notice,
      {
        status: "warning",
        isDismissible: false,
        className: "wp-block-navigation__deleted-overlay-warning",
        children: message
      }
    );
  }
  var deleted_overlay_warning_default = DeletedOverlayWarning;

  // packages/block-library/build-module/navigation/edit/overlay-template-part-selector.mjs
  var import_jsx_runtime314 = __toESM(require_jsx_runtime(), 1);
  function OverlayTemplatePartSelector({
    overlay,
    overlayMenu,
    setAttributes,
    onNavigateToEntityRecord,
    isCreatingOverlay,
    setIsCreatingOverlay
  }) {
    const headingId = (0, import_compose32.useInstanceId)(
      OverlayTemplatePartSelector,
      "wp-block-navigation__overlay-selector-heading"
    );
    const {
      records: templateParts,
      isResolving,
      hasResolved
    } = (0, import_core_data35.useEntityRecords)("postType", "wp_template_part", {
      per_page: -1
    });
    const { createErrorNotice } = (0, import_data68.useDispatch)(import_notices12.store);
    const currentTheme = (0, import_data68.useSelect)(
      (select9) => select9(import_core_data35.store).getCurrentTheme()?.stylesheet,
      []
    );
    const [localIsCreating, setLocalIsCreating] = (0, import_element67.useState)(false);
    const isCreating = isCreatingOverlay !== void 0 ? isCreatingOverlay : localIsCreating;
    const setIsCreating = setIsCreatingOverlay !== void 0 ? setIsCreatingOverlay : setLocalIsCreating;
    const overlayTemplateParts = (0, import_element67.useMemo)(() => {
      if (!templateParts) {
        return [];
      }
      return templateParts.filter(
        (templatePart) => templatePart.area === NAVIGATION_OVERLAY_TEMPLATE_PART_AREA
      );
    }, [templateParts]);
    const createOverlayTemplatePart = useCreateOverlayTemplatePart(overlayTemplateParts);
    const selectedTemplatePart = (0, import_element67.useMemo)(() => {
      if (!overlay || !overlayTemplateParts) {
        return null;
      }
      return overlayTemplateParts.find(
        (templatePart) => templatePart.slug === overlay
      );
    }, [overlay, overlayTemplateParts]);
    const options2 = (0, import_element67.useMemo)(() => {
      const baseOptions = [
        {
          label: (0, import_i18n121.__)("Default"),
          value: ""
        }
      ];
      if (!hasResolved || isResolving) {
        return baseOptions;
      }
      const templatePartOptions = overlayTemplateParts.map(
        (templatePart) => {
          const label = templatePart.title?.rendered ? (0, import_html_entities4.decodeEntities)(templatePart.title.rendered) : templatePart.slug;
          return {
            label,
            value: templatePart.slug
          };
        }
      );
      if (overlay && !selectedTemplatePart) {
        templatePartOptions.unshift({
          label: (0, import_i18n121.sprintf)(
            /* translators: %s: Overlay slug. */
            (0, import_i18n121.__)("%s (missing)"),
            overlay
          ),
          value: overlay
        });
      }
      return [...baseOptions, ...templatePartOptions];
    }, [
      overlayTemplateParts,
      hasResolved,
      isResolving,
      overlay,
      selectedTemplatePart
    ]);
    const handleSelectChange = (value) => {
      setAttributes({
        overlay: value || void 0
      });
    };
    const handleEditClick = () => {
      if (!overlay || !selectedTemplatePart || !onNavigateToEntityRecord) {
        return;
      }
      const theme = selectedTemplatePart.theme || currentTheme;
      const templatePartId = createTemplatePartId(theme, overlay);
      const params = {
        postId: templatePartId,
        postType: "wp_template_part"
      };
      if (overlayMenu === "mobile") {
        params.viewport = "mobile";
      }
      onNavigateToEntityRecord(params);
    };
    const handleCreateOverlay = (0, import_element67.useCallback)(async () => {
      try {
        setIsCreating(true);
        const templatePart = await createOverlayTemplatePart();
        setAttributes({
          overlay: templatePart.slug
        });
        if (onNavigateToEntityRecord) {
          const theme = templatePart.theme || currentTheme;
          const templatePartId = createTemplatePartId(
            theme,
            templatePart.slug
          );
          const params = {
            postId: templatePartId,
            postType: "wp_template_part"
          };
          if (overlayMenu === "mobile") {
            params.viewport = "mobile";
          }
          onNavigateToEntityRecord(params);
        } else {
          setIsCreating(false);
        }
      } catch (error) {
        const errorMessage = error instanceof Error && "code" in error && error.message && error.code !== "unknown_error" ? error.message : (0, import_i18n121.__)("An error occurred while creating the overlay.");
        createErrorNotice(errorMessage, { type: "snackbar" });
        setIsCreating(false);
      }
    }, [
      createOverlayTemplatePart,
      setAttributes,
      onNavigateToEntityRecord,
      createErrorNotice,
      currentTheme,
      setIsCreating,
      overlayMenu
    ]);
    const handleClearOverlay = (0, import_element67.useCallback)(() => {
      setAttributes({ overlay: void 0 });
    }, [setAttributes]);
    const isCreateButtonDisabled = isResolving || isCreating;
    const isOverlayMissing = (0, import_element67.useMemo)(() => {
      return overlay && hasResolved && !isResolving && !selectedTemplatePart;
    }, [overlay, hasResolved, isResolving, selectedTemplatePart]);
    const helpText = (0, import_element67.useMemo)(() => {
      if (overlayTemplateParts.length === 0 && hasResolved) {
        return (0, import_i18n121.__)("No overlays found.");
      }
      return (0, import_i18n121.__)("Select an overlay for navigation.");
    }, [overlayTemplateParts.length, hasResolved]);
    const editButtonLabel = (0, import_element67.useMemo)(() => {
      return selectedTemplatePart ? (0, import_i18n121.sprintf)(
        /* translators: %s: Overlay title. */
        (0, import_i18n121.__)("Edit overlay: %s"),
        selectedTemplatePart.title?.rendered ? (0, import_html_entities4.decodeEntities)(selectedTemplatePart.title.rendered) : selectedTemplatePart.slug
      ) : (0, import_i18n121.__)("Edit overlay");
    }, [selectedTemplatePart]);
    return /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "wp-block-navigation__overlay-selector", children: [
      /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
        "h3",
        {
          id: headingId,
          className: "wp-block-navigation__overlay-selector-header",
          children: (0, import_i18n121.__)("Overlay template")
        }
      ),
      hasResolved && (overlayTemplateParts.length === 0 || isCreating && overlayTemplateParts.length === 1) ? /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(import_jsx_runtime314.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
        import_components77.Button,
        {
          __next40pxDefaultSize: true,
          variant: "secondary",
          onClick: handleCreateOverlay,
          disabled: isCreateButtonDisabled,
          accessibleWhenDisabled: true,
          isBusy: isCreating,
          className: "wp-block-navigation__overlay-create-button-prominent",
          children: (0, import_i18n121.__)("Create overlay")
        }
      ) }) : /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)(import_jsx_runtime314.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
          import_components77.Button,
          {
            size: "small",
            icon: plus_default,
            onClick: handleCreateOverlay,
            disabled: isCreateButtonDisabled,
            accessibleWhenDisabled: true,
            isBusy: isCreating,
            label: (0, import_i18n121.__)("Create new overlay template"),
            showTooltip: true,
            className: "wp-block-navigation__overlay-create-button"
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)(
          import_components77.__experimentalHStack,
          {
            alignment: "flex-start",
            className: "wp-block-navigation__overlay-selector-controls",
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(import_components77.FlexBlock, { children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
                import_components77.SelectControl,
                {
                  __next40pxDefaultSize: true,
                  label: (0, import_i18n121.__)("Overlay template"),
                  hideLabelFromVision: true,
                  "aria-labelledby": headingId,
                  value: overlay || "",
                  options: options2,
                  onChange: handleSelectChange,
                  disabled: isResolving,
                  accessibleWhenDisabled: true,
                  help: helpText
                }
              ) }),
              overlay && hasResolved && selectedTemplatePart && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(import_components77.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
                import_components77.Button,
                {
                  __next40pxDefaultSize: true,
                  variant: "secondary",
                  onClick: handleEditClick,
                  disabled: !onNavigateToEntityRecord,
                  accessibleWhenDisabled: true,
                  label: editButtonLabel,
                  showTooltip: true,
                  className: "wp-block-navigation__overlay-edit-button",
                  children: (0, import_i18n121.__)("Edit")
                }
              ) })
            ]
          }
        ),
        isOverlayMissing && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
          deleted_overlay_warning_default,
          {
            onClear: handleClearOverlay,
            onCreate: handleCreateOverlay,
            isCreating
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
        import_components77.__experimentalHStack,
        {
          alignment: "flex-start",
          className: "wp-block-navigation__overlay-help-text-wrapper",
          children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
            import_components77.__experimentalText,
            {
              variant: "muted",
              isBlock: true,
              className: "wp-block-navigation__overlay-help-text",
              children: (0, import_i18n121.__)(
                "An overlay template allows you to customize the appearance of the dialog that opens when the menu button is pressed."
              )
            }
          )
        }
      )
    ] });
  }

  // packages/block-library/build-module/navigation/edit/overlay-visibility-control.mjs
  var import_components78 = __toESM(require_components(), 1);
  var import_i18n122 = __toESM(require_i18n(), 1);
  var import_jsx_runtime315 = __toESM(require_jsx_runtime(), 1);
  function OverlayVisibilityControl({
    overlayMenu,
    setAttributes
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)(
      import_components78.__experimentalToggleGroupControl,
      {
        __next40pxDefaultSize: true,
        label: (0, import_i18n122.__)("Overlay Visibility"),
        "aria-label": (0, import_i18n122.__)("Configure overlay visibility"),
        value: overlayMenu,
        help: (0, import_i18n122.__)(
          "Collapses the navigation options in a menu icon opening an overlay."
        ),
        onChange: (value) => setAttributes({ overlayMenu: value }),
        isBlock: true,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(import_components78.__experimentalToggleGroupControlOption, { value: "never", label: (0, import_i18n122.__)("Off") }),
          /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(import_components78.__experimentalToggleGroupControlOption, { value: "mobile", label: (0, import_i18n122.__)("Mobile") }),
          /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(import_components78.__experimentalToggleGroupControlOption, { value: "always", label: (0, import_i18n122.__)("Always") })
        ]
      }
    );
  }

  // packages/block-library/build-module/navigation/edit/overlay-menu-preview-button.mjs
  var import_components80 = __toESM(require_components(), 1);
  var import_i18n124 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/navigation/edit/overlay-menu-preview-controls.mjs
  var import_components79 = __toESM(require_components(), 1);
  var import_i18n123 = __toESM(require_i18n(), 1);
  var import_jsx_runtime316 = __toESM(require_jsx_runtime(), 1);
  function OverlayMenuPreviewControls({
    hasIcon,
    icon: icon4,
    setAttributes
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime316.jsxs)(import_components79.__experimentalVStack, { spacing: 4, children: [
      /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
        import_components79.ToggleControl,
        {
          label: (0, import_i18n123.__)("Show icon button"),
          help: (0, import_i18n123.__)(
            "Configure the visual appearance of the button that toggles the overlay menu."
          ),
          onChange: (value) => setAttributes({ hasIcon: value }),
          checked: hasIcon
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime316.jsxs)(
        import_components79.__experimentalToggleGroupControl,
        {
          __next40pxDefaultSize: true,
          className: "wp-block-navigation__overlay-menu-icon-toggle-group",
          label: (0, import_i18n123.__)("Icon"),
          value: icon4,
          onChange: (value) => setAttributes({ icon: value }),
          isBlock: true,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
              import_components79.__experimentalToggleGroupControlOption,
              {
                value: "handle",
                "aria-label": (0, import_i18n123.__)("handle"),
                label: /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(OverlayMenuIcon, { icon: "handle" })
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
              import_components79.__experimentalToggleGroupControlOption,
              {
                value: "menu",
                "aria-label": (0, import_i18n123.__)("menu"),
                label: /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(OverlayMenuIcon, { icon: "menu" })
              }
            )
          ]
        }
      )
    ] });
  }

  // packages/block-library/build-module/navigation/edit/overlay-menu-preview-button.mjs
  var import_jsx_runtime317 = __toESM(require_jsx_runtime(), 1);
  function OverlayMenuPreviewButton({
    isResponsive,
    overlayMenuPreview,
    setOverlayMenuPreview,
    hasIcon,
    icon: icon4,
    setAttributes,
    overlayMenuPreviewClasses,
    overlayMenuPreviewId,
    containerStyle
  }) {
    if (!isResponsive) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)(import_jsx_runtime317.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)(
        import_components80.Button,
        {
          __next40pxDefaultSize: true,
          className: overlayMenuPreviewClasses,
          onClick: () => setOverlayMenuPreview(!overlayMenuPreview),
          "aria-label": (0, import_i18n124.__)("Overlay menu controls"),
          "aria-controls": overlayMenuPreviewId,
          "aria-expanded": overlayMenuPreview,
          children: [
            hasIcon && /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)(import_jsx_runtime317.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(OverlayMenuIcon, { icon: icon4 }),
              /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(icon_default, { icon: close_default })
            ] }),
            !hasIcon && /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)(import_jsx_runtime317.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime317.jsx)("span", { children: (0, import_i18n124.__)("Menu") }),
              /* @__PURE__ */ (0, import_jsx_runtime317.jsx)("span", { children: (0, import_i18n124.__)("Close") })
            ] })
          ]
        }
      ),
      overlayMenuPreview && /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
        import_components80.__experimentalVStack,
        {
          id: overlayMenuPreviewId,
          spacing: 4,
          style: containerStyle,
          children: /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
            OverlayMenuPreviewControls,
            {
              hasIcon,
              icon: icon4,
              setAttributes
            }
          )
        }
      )
    ] });
  }

  // packages/block-library/build-module/navigation/edit/overlay-preview.mjs
  var import_data69 = __toESM(require_data(), 1);
  var import_core_data36 = __toESM(require_core_data(), 1);
  var import_element68 = __toESM(require_element(), 1);
  var import_blocks58 = __toESM(require_blocks(), 1);
  var import_components81 = __toESM(require_components(), 1);
  var import_i18n125 = __toESM(require_i18n(), 1);
  var import_block_editor143 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime318 = __toESM(require_jsx_runtime(), 1);
  function OverlayPreview({ overlay, currentTheme }) {
    const templatePartId = (0, import_element68.useMemo)(() => {
      if (!overlay || !currentTheme) {
        return null;
      }
      return createTemplatePartId(currentTheme, overlay);
    }, [currentTheme, overlay]);
    const { content, editedBlocks, hasResolved } = (0, import_data69.useSelect)(
      (select9) => {
        if (!templatePartId) {
          return {
            content: null,
            editedBlocks: null,
            hasResolved: true
          };
        }
        const { getEditedEntityRecord, hasFinishedResolution } = select9(import_core_data36.store);
        const editedRecord = getEditedEntityRecord(
          "postType",
          "wp_template_part",
          templatePartId,
          { context: "view" }
        );
        return {
          content: editedRecord?.content,
          editedBlocks: editedRecord?.blocks,
          hasResolved: hasFinishedResolution("getEditedEntityRecord", [
            "postType",
            "wp_template_part",
            templatePartId,
            { context: "view" }
          ])
        };
      },
      [templatePartId]
    );
    const blocks = (0, import_element68.useMemo)(() => {
      if (!templatePartId) {
        return null;
      }
      if (editedBlocks && editedBlocks.length > 0) {
        return editedBlocks;
      }
      if (content && typeof content === "string") {
        return (0, import_blocks58.parse)(content);
      }
      return [];
    }, [templatePartId, editedBlocks, content]);
    if (!overlay) {
      return null;
    }
    if (!hasResolved) {
      return /* @__PURE__ */ (0, import_jsx_runtime318.jsx)("div", { className: "wp-block-navigation__overlay-preview-loading", children: /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(import_components81.Spinner, {}) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
      "div",
      {
        className: "wp-block-navigation__overlay-preview",
        "aria-label": (0, import_i18n125.__)("Navigation Overlay template part preview"),
        role: "region",
        children: /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
          import_block_editor143.BlockPreview.Async,
          {
            placeholder: /* @__PURE__ */ (0, import_jsx_runtime318.jsx)("div", { className: "wp-block-navigation__overlay-preview-placeholder" }),
            children: /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
              import_block_editor143.BlockPreview,
              {
                blocks,
                viewportWidth: 400,
                minHeight: 200
              }
            )
          }
        )
      }
    );
  }

  // packages/block-library/build-module/navigation/edit/overlay-panel.mjs
  var import_jsx_runtime319 = __toESM(require_jsx_runtime(), 1);
  function OverlayPanel({
    overlayMenu,
    overlay,
    setAttributes,
    onNavigateToEntityRecord,
    overlayMenuPreview,
    setOverlayMenuPreview,
    hasIcon,
    icon: icon4,
    overlayMenuPreviewClasses,
    overlayMenuPreviewId,
    isResponsive,
    currentTheme,
    hasOverlays
  }) {
    const [isCreatingOverlay, setIsCreatingOverlay] = (0, import_element69.useState)(false);
    return /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(import_components82.PanelBody, { title: (0, import_i18n126.__)("Overlay"), initialOpen: true, children: /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)(import_components82.__experimentalVStack, { spacing: 4, children: [
      /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
        OverlayVisibilityControl,
        {
          overlayMenu,
          setAttributes
        }
      ),
      overlayMenu !== "never" && /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
        OverlayMenuPreviewButton,
        {
          isResponsive,
          overlayMenuPreview,
          setOverlayMenuPreview,
          hasIcon,
          icon: icon4,
          setAttributes,
          overlayMenuPreviewClasses,
          overlayMenuPreviewId
        }
      ),
      overlayMenu !== "never" && /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
        OverlayTemplatePartSelector,
        {
          overlay,
          overlayMenu,
          setAttributes,
          onNavigateToEntityRecord,
          isCreatingOverlay,
          setIsCreatingOverlay
        }
      ),
      overlayMenu !== "never" && overlay && hasOverlays && !isCreatingOverlay && /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
        OverlayPreview,
        {
          overlay,
          currentTheme
        }
      )
    ] }) });
  }

  // packages/block-library/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.mjs
  var import_data71 = __toESM(require_data(), 1);
  var import_core_data38 = __toESM(require_core_data(), 1);
  var import_element71 = __toESM(require_element(), 1);
  var import_i18n127 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/navigation/menu-items-to-blocks.mjs
  var import_blocks59 = __toESM(require_blocks(), 1);
  var import_hooks40 = __toESM(require_hooks(), 1);

  // packages/block-library/build-module/navigation-link/shared/use-entity-binding.mjs
  var import_element70 = __toESM(require_element(), 1);
  var import_block_editor144 = __toESM(require_block_editor(), 1);
  var import_data70 = __toESM(require_data(), 1);
  var import_core_data37 = __toESM(require_core_data(), 1);
  function buildNavigationLinkEntityBinding(kind) {
    if (kind === void 0) {
      throw new Error(
        'buildNavigationLinkEntityBinding requires a kind parameter. Only "post-type" and "taxonomy" are supported.'
      );
    }
    if (kind !== "post-type" && kind !== "taxonomy") {
      throw new Error(
        `Invalid kind "${kind}" provided to buildNavigationLinkEntityBinding. Only 'post-type' and 'taxonomy' are supported.`
      );
    }
    const source = kind === "taxonomy" ? "core/term-data" : "core/post-data";
    return {
      url: {
        source,
        args: {
          field: "link"
        }
      }
    };
  }
  function useEntityBinding({ clientId, attributes: attributes2 }) {
    const { updateBlockBindings } = (0, import_block_editor144.useBlockBindingsUtils)(clientId);
    const { metadata, id, kind, type } = attributes2;
    const blockEditingMode = (0, import_block_editor144.useBlockEditingMode)();
    const hasUrlBinding = !!metadata?.bindings?.url && !!id;
    const expectedSource = kind === "post-type" ? "core/post-data" : "core/term-data";
    const hasCorrectBinding = hasUrlBinding && metadata?.bindings?.url?.source === expectedSource;
    const { isBoundEntityAvailable, entityRecord } = (0, import_data70.useSelect)(
      (select9) => {
        if (!hasCorrectBinding || !id) {
          return { isBoundEntityAvailable: false, entityRecord: null };
        }
        const isPostType = kind === "post-type";
        const isTaxonomy = kind === "taxonomy";
        if (!isPostType && !isTaxonomy) {
          return { isBoundEntityAvailable: false, entityRecord: null };
        }
        if (blockEditingMode === "disabled") {
          return { isBoundEntityAvailable: true, entityRecord: null };
        }
        const { getEntityRecord, hasFinishedResolution } = select9(import_core_data37.store);
        const entityType = isTaxonomy ? "taxonomy" : "postType";
        const typeForAPI = type === "tag" ? "post_tag" : type;
        const record = getEntityRecord(entityType, typeForAPI, id);
        const hasResolved = hasFinishedResolution("getEntityRecord", [
          entityType,
          typeForAPI,
          id
        ]);
        const isAvailable = hasResolved ? record !== void 0 : true;
        return {
          isBoundEntityAvailable: isAvailable,
          entityRecord: record || null
        };
      },
      [kind, type, id, hasCorrectBinding, blockEditingMode]
    );
    const clearBinding = (0, import_element70.useCallback)(() => {
      if (hasUrlBinding) {
        updateBlockBindings({ url: void 0 });
      }
    }, [updateBlockBindings, hasUrlBinding]);
    const createBinding = (0, import_element70.useCallback)(
      (updatedAttributes) => {
        const kindToUse = updatedAttributes?.kind ?? kind;
        if (!kindToUse) {
          return;
        }
        try {
          const binding = buildNavigationLinkEntityBinding(kindToUse);
          updateBlockBindings(binding);
        } catch (error) {
          console.warn(
            "Failed to create entity binding:",
            error.message
          );
        }
      },
      [updateBlockBindings, kind]
    );
    return {
      hasUrlBinding: hasCorrectBinding,
      isBoundEntityAvailable,
      entityRecord,
      clearBinding,
      createBinding
    };
  }

  // packages/block-library/build-module/navigation/menu-items-to-blocks.mjs
  function menuItemsToBlocks(menuItems) {
    if (!menuItems) {
      return null;
    }
    const menuTree = createDataTree(menuItems);
    const blocks = mapMenuItemsToBlocks(menuTree);
    return (0, import_hooks40.applyFilters)(
      "blocks.navigation.__unstableMenuItemsToBlocks",
      blocks,
      menuItems
    );
  }
  function mapMenuItemsToBlocks(menuItems, level = 0) {
    let mapping = {};
    const sortedItems = [...menuItems].sort(
      (a2, b2) => a2.menu_order - b2.menu_order
    );
    const innerBlocks = sortedItems.map((menuItem) => {
      if (menuItem.type === "block") {
        const [block2] = (0, import_blocks59.parse)(menuItem.content.raw);
        if (!block2) {
          return (0, import_blocks59.createBlock)("core/freeform", {
            content: menuItem.content
          });
        }
        return block2;
      }
      const blockType = menuItem.children?.length ? "core/navigation-submenu" : "core/navigation-link";
      const attributes2 = menuItemToBlockAttributes(
        menuItem,
        blockType,
        level
      );
      const {
        innerBlocks: nestedBlocks = [],
        // alias to avoid shadowing
        mapping: nestedMapping = {}
        // alias to avoid shadowing
      } = menuItem.children?.length ? mapMenuItemsToBlocks(menuItem.children, level + 1) : {};
      mapping = {
        ...mapping,
        ...nestedMapping
      };
      const block = (0, import_blocks59.createBlock)(blockType, attributes2, nestedBlocks);
      mapping[menuItem.id] = block.clientId;
      return block;
    });
    return {
      innerBlocks,
      mapping
    };
  }
  function menuItemToBlockAttributes({
    title: menuItemTitleField,
    xfn,
    classes,
    // eslint-disable-next-line camelcase
    attr_title,
    object,
    // eslint-disable-next-line camelcase
    object_id,
    description,
    url,
    type: menuItemTypeField,
    target
  }, blockType, level) {
    if (object && object === "post_tag") {
      object = "tag";
    }
    const inferredKind = menuItemTypeField?.replace("_", "-") || "custom";
    return {
      label: menuItemTitleField?.rendered || "",
      ...object?.length && {
        type: object
      },
      kind: inferredKind,
      url: url || "",
      ...xfn?.length && xfn.join(" ").trim() && {
        rel: xfn.join(" ").trim()
      },
      ...classes?.length && classes.join(" ").trim() && {
        className: classes.join(" ").trim()
      },
      /* eslint-disable camelcase */
      ...attr_title?.length && {
        title: attr_title
      },
      ...object_id && (inferredKind === "post-type" || inferredKind === "taxonomy") && {
        id: object_id,
        metadata: {
          bindings: buildNavigationLinkEntityBinding(inferredKind)
        }
      },
      /* eslint-enable camelcase */
      ...description?.length && {
        description
      },
      ...target === "_blank" && {
        opensInNewTab: true
      },
      ...blockType === "core/navigation-submenu" && {
        isTopLevelItem: level === 0
      },
      ...blockType === "core/navigation-link" && {
        isTopLevelLink: level === 0
      }
    };
  }
  function createDataTree(dataset, id = "id", relation = "parent") {
    const hashTable = /* @__PURE__ */ Object.create(null);
    const dataTree = [];
    for (const data of dataset) {
      hashTable[data[id]] = {
        ...data,
        children: []
      };
      if (data[relation]) {
        hashTable[data[relation]] = hashTable[data[relation]] || {};
        hashTable[data[relation]].children = hashTable[data[relation]].children || [];
        hashTable[data[relation]].children.push(
          hashTable[data[id]]
        );
      } else {
        dataTree.push(hashTable[data[id]]);
      }
    }
    return dataTree;
  }

  // packages/block-library/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.mjs
  var CLASSIC_MENU_CONVERSION_SUCCESS = "success";
  var CLASSIC_MENU_CONVERSION_ERROR = "error";
  var CLASSIC_MENU_CONVERSION_PENDING = "pending";
  var CLASSIC_MENU_CONVERSION_IDLE = "idle";
  var classicMenuBeingConvertedId = null;
  function useConvertClassicToBlockMenu(createNavigationMenu, { throwOnError = false } = {}) {
    const registry = (0, import_data71.useRegistry)();
    const { editEntityRecord } = (0, import_data71.useDispatch)(import_core_data38.store);
    const [status, setStatus] = (0, import_element71.useState)(CLASSIC_MENU_CONVERSION_IDLE);
    const [error, setError] = (0, import_element71.useState)(null);
    const convertClassicMenuToBlockMenu = (0, import_element71.useCallback)(
      async (menuId, menuName, postStatus = "publish") => {
        let navigationMenu;
        let classicMenuItems;
        try {
          classicMenuItems = await registry.resolveSelect(import_core_data38.store).getMenuItems({
            menus: menuId,
            per_page: -1,
            context: "view"
          });
        } catch (err) {
          throw new Error(
            (0, import_i18n127.sprintf)(
              // translators: %s: The name of a menu (e.g. Header menu).
              (0, import_i18n127.__)(`Unable to fetch classic menu "%s" from API.`),
              menuName
            ),
            {
              cause: err
            }
          );
        }
        if (classicMenuItems === null) {
          throw new Error(
            (0, import_i18n127.sprintf)(
              // translators: %s: The name of a menu (e.g. Header menu).
              (0, import_i18n127.__)(`Unable to fetch classic menu "%s" from API.`),
              menuName
            )
          );
        }
        const { innerBlocks } = menuItemsToBlocks(classicMenuItems);
        try {
          navigationMenu = await createNavigationMenu(
            menuName,
            innerBlocks,
            postStatus
          );
          await editEntityRecord(
            "postType",
            "wp_navigation",
            navigationMenu.id,
            {
              status: "publish"
            },
            { throwOnError: true }
          );
        } catch (err) {
          throw new Error(
            (0, import_i18n127.sprintf)(
              // translators: %s: The name of a menu (e.g. Header menu).
              (0, import_i18n127.__)(`Unable to create Navigation Menu "%s".`),
              menuName
            ),
            {
              cause: err
            }
          );
        }
        return navigationMenu;
      },
      [createNavigationMenu, editEntityRecord, registry]
    );
    const convert = (0, import_element71.useCallback)(
      async (menuId, menuName, postStatus) => {
        if (classicMenuBeingConvertedId === menuId) {
          return;
        }
        classicMenuBeingConvertedId = menuId;
        if (!menuId || !menuName) {
          setError("Unable to convert menu. Missing menu details.");
          setStatus(CLASSIC_MENU_CONVERSION_ERROR);
          return;
        }
        setStatus(CLASSIC_MENU_CONVERSION_PENDING);
        setError(null);
        return await convertClassicMenuToBlockMenu(
          menuId,
          menuName,
          postStatus
        ).then((navigationMenu) => {
          setStatus(CLASSIC_MENU_CONVERSION_SUCCESS);
          classicMenuBeingConvertedId = null;
          return navigationMenu;
        }).catch((err) => {
          setError(err?.message);
          setStatus(CLASSIC_MENU_CONVERSION_ERROR);
          classicMenuBeingConvertedId = null;
          if (throwOnError) {
            throw new Error(
              (0, import_i18n127.sprintf)(
                // translators: %s: The name of a menu (e.g. Header menu).
                (0, import_i18n127.__)(`Unable to create Navigation Menu "%s".`),
                menuName
              ),
              {
                cause: err
              }
            );
          }
        });
      },
      [convertClassicMenuToBlockMenu, throwOnError]
    );
    return {
      convert,
      status,
      error
    };
  }
  var use_convert_classic_menu_to_block_menu_default = useConvertClassicToBlockMenu;

  // packages/block-library/build-module/navigation/edit/use-create-navigation-menu.mjs
  var import_blocks60 = __toESM(require_blocks(), 1);
  var import_core_data41 = __toESM(require_core_data(), 1);
  var import_data74 = __toESM(require_data(), 1);
  var import_element73 = __toESM(require_element(), 1);

  // packages/block-library/build-module/navigation/edit/use-generate-default-navigation-title.mjs
  var import_components83 = __toESM(require_components(), 1);
  var import_core_data40 = __toESM(require_core_data(), 1);
  var import_data73 = __toESM(require_data(), 1);
  var import_element72 = __toESM(require_element(), 1);
  var import_i18n128 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/navigation/use-template-part-area-label.mjs
  var import_block_editor145 = __toESM(require_block_editor(), 1);
  var import_core_data39 = __toESM(require_core_data(), 1);
  var import_data72 = __toESM(require_data(), 1);

  // packages/block-library/build-module/template-part/edit/utils/get-template-part-icon.mjs
  var getTemplatePartIcon = (areaOrIconName) => {
    if ("header" === areaOrIconName) {
      return header_default;
    } else if ("footer" === areaOrIconName) {
      return footer_default;
    } else if ("sidebar" === areaOrIconName) {
      return sidebar_default;
    } else if ("navigation-overlay" === areaOrIconName) {
      return navigation_overlay_default;
    }
    return symbol_filled_default;
  };

  // packages/block-library/build-module/navigation/use-template-part-area-label.mjs
  function useTemplatePartAreaLabel(clientId) {
    return (0, import_data72.useSelect)(
      (select9) => {
        if (!clientId) {
          return;
        }
        const { getBlock, getBlockParentsByBlockName } = select9(import_block_editor145.store);
        const withAscendingResults = true;
        const parentTemplatePartClientIds = getBlockParentsByBlockName(
          clientId,
          "core/template-part",
          withAscendingResults
        );
        if (!parentTemplatePartClientIds?.length) {
          return;
        }
        const { getCurrentTheme, getEditedEntityRecord } = select9(import_core_data39.store);
        const currentTheme = getCurrentTheme();
        const defaultTemplatePartAreas = currentTheme?.default_template_part_areas || [];
        const definedAreas = defaultTemplatePartAreas.map((item) => ({
          ...item,
          icon: getTemplatePartIcon(item.icon)
        }));
        for (const templatePartClientId of parentTemplatePartClientIds) {
          const templatePartBlock = getBlock(templatePartClientId);
          const { theme = currentTheme?.stylesheet, slug } = templatePartBlock.attributes;
          const templatePartEntityId = createTemplatePartId(
            theme,
            slug
          );
          const templatePartEntity = getEditedEntityRecord(
            "postType",
            "wp_template_part",
            templatePartEntityId
          );
          if (templatePartEntity?.area) {
            return definedAreas.find(
              (definedArea) => definedArea.area !== "uncategorized" && definedArea.area === templatePartEntity.area
            )?.label;
          }
        }
      },
      [clientId]
    );
  }

  // packages/block-library/build-module/navigation/edit/use-generate-default-navigation-title.mjs
  var DRAFT_MENU_PARAMS = [
    "postType",
    "wp_navigation",
    { status: "draft", per_page: -1 }
  ];
  var PUBLISHED_MENU_PARAMS = [
    "postType",
    "wp_navigation",
    { per_page: -1, status: "publish" }
  ];
  function useGenerateDefaultNavigationTitle(clientId) {
    const isDisabled = (0, import_element72.useContext)(import_components83.Disabled.Context);
    const area = useTemplatePartAreaLabel(isDisabled ? void 0 : clientId);
    const registry = (0, import_data73.useRegistry)();
    return (0, import_element72.useCallback)(async () => {
      if (isDisabled) {
        return "";
      }
      const { getEntityRecords } = registry.resolveSelect(import_core_data40.store);
      const [draftNavigationMenus, navigationMenus] = await Promise.all([
        getEntityRecords(...DRAFT_MENU_PARAMS),
        getEntityRecords(...PUBLISHED_MENU_PARAMS)
      ]);
      const title = area ? (0, import_i18n128.sprintf)(
        // translators: %s: the name of a menu (e.g. Header menu).
        (0, import_i18n128.__)("%s menu"),
        area
      ) : (
        // translators: 'menu' as in website navigation menu.
        (0, import_i18n128.__)("Menu")
      );
      const matchingMenuTitleCount = [
        ...draftNavigationMenus,
        ...navigationMenus
      ].reduce(
        (count, menu) => menu?.title?.raw?.startsWith(title) ? count + 1 : count,
        0
      );
      const titleWithCount = matchingMenuTitleCount > 0 ? `${title} ${matchingMenuTitleCount + 1}` : title;
      return titleWithCount || "";
    }, [isDisabled, area, registry]);
  }

  // packages/block-library/build-module/navigation/edit/use-create-navigation-menu.mjs
  var CREATE_NAVIGATION_MENU_SUCCESS = "success";
  var CREATE_NAVIGATION_MENU_ERROR = "error";
  var CREATE_NAVIGATION_MENU_PENDING = "pending";
  var CREATE_NAVIGATION_MENU_IDLE = "idle";
  function useCreateNavigationMenu(clientId) {
    const [status, setStatus] = (0, import_element73.useState)(CREATE_NAVIGATION_MENU_IDLE);
    const [value, setValue] = (0, import_element73.useState)(null);
    const [error, setError] = (0, import_element73.useState)(null);
    const { saveEntityRecord, editEntityRecord } = (0, import_data74.useDispatch)(import_core_data41.store);
    const generateDefaultTitle = useGenerateDefaultNavigationTitle(clientId);
    const create5 = (0, import_element73.useCallback)(
      async (title = null, blocks = [], postStatus) => {
        if (title && typeof title !== "string") {
          setError(
            "Invalid title supplied when creating Navigation Menu."
          );
          setStatus(CREATE_NAVIGATION_MENU_ERROR);
          throw new Error(
            `Value of supplied title argument was not a string.`
          );
        }
        setStatus(CREATE_NAVIGATION_MENU_PENDING);
        setValue(null);
        setError(null);
        if (!title) {
          title = await generateDefaultTitle().catch((err) => {
            setError(err?.message);
            setStatus(CREATE_NAVIGATION_MENU_ERROR);
            throw new Error(
              "Failed to create title when saving new Navigation Menu.",
              {
                cause: err
              }
            );
          });
        }
        const record = {
          title,
          content: (0, import_blocks60.serialize)(blocks),
          status: postStatus
        };
        return saveEntityRecord("postType", "wp_navigation", record).then((response) => {
          setValue(response);
          setStatus(CREATE_NAVIGATION_MENU_SUCCESS);
          if (postStatus !== "publish") {
            editEntityRecord(
              "postType",
              "wp_navigation",
              response.id,
              { status: "publish" }
            );
          }
          return response;
        }).catch((err) => {
          setError(err?.message);
          setStatus(CREATE_NAVIGATION_MENU_ERROR);
          throw new Error("Unable to save new Navigation Menu", {
            cause: err
          });
        });
      },
      [saveEntityRecord, editEntityRecord, generateDefaultTitle]
    );
    return {
      create: create5,
      status,
      value,
      error,
      isIdle: status === CREATE_NAVIGATION_MENU_IDLE,
      isPending: status === CREATE_NAVIGATION_MENU_PENDING,
      isSuccess: status === CREATE_NAVIGATION_MENU_SUCCESS,
      isError: status === CREATE_NAVIGATION_MENU_ERROR
    };
  }

  // packages/block-library/build-module/navigation/edit/use-inner-blocks.mjs
  var import_data75 = __toESM(require_data(), 1);
  var import_block_editor146 = __toESM(require_block_editor(), 1);
  var EMPTY_ARRAY2 = [];
  function useInnerBlocks(clientId) {
    return (0, import_data75.useSelect)(
      (select9) => {
        const { getBlock, getBlocks, hasSelectedInnerBlock } = select9(import_block_editor146.store);
        const _uncontrolledInnerBlocks = getBlock(clientId).innerBlocks;
        const _hasUncontrolledInnerBlocks = !!_uncontrolledInnerBlocks?.length;
        const _controlledInnerBlocks = _hasUncontrolledInnerBlocks ? EMPTY_ARRAY2 : getBlocks(clientId);
        return {
          innerBlocks: _hasUncontrolledInnerBlocks ? _uncontrolledInnerBlocks : _controlledInnerBlocks,
          hasUncontrolledInnerBlocks: _hasUncontrolledInnerBlocks,
          uncontrolledInnerBlocks: _uncontrolledInnerBlocks,
          controlledInnerBlocks: _controlledInnerBlocks,
          isInnerBlockSelected: hasSelectedInnerBlock(clientId, true)
        };
      },
      [clientId]
    );
  }

  // packages/block-library/build-module/navigation/edit/manage-menus-button.mjs
  var import_url11 = __toESM(require_url(), 1);
  var import_components84 = __toESM(require_components(), 1);
  var import_i18n129 = __toESM(require_i18n(), 1);
  var import_jsx_runtime320 = __toESM(require_jsx_runtime(), 1);
  var ManageMenusButton = ({
    className = "",
    disabled,
    isMenuItem = false
  }) => {
    let ComponentName = import_components84.Button;
    if (isMenuItem) {
      ComponentName = import_components84.MenuItem;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
      ComponentName,
      {
        variant: "link",
        disabled,
        className,
        href: (0, import_url11.addQueryArgs)("edit.php", {
          post_type: "wp_navigation"
        }),
        children: (0, import_i18n129.__)("Manage menus")
      }
    );
  };
  var manage_menus_button_default = ManageMenusButton;

  // packages/block-library/build-module/navigation/edit/menu-inspector-controls.mjs
  var import_block_editor156 = __toESM(require_block_editor(), 1);
  var import_components91 = __toESM(require_components(), 1);
  var import_data84 = __toESM(require_data(), 1);
  var import_i18n139 = __toESM(require_i18n(), 1);
  var import_element79 = __toESM(require_element(), 1);

  // packages/block-library/build-module/navigation/edit/deleted-navigation-warning.mjs
  var import_block_editor147 = __toESM(require_block_editor(), 1);
  var import_components85 = __toESM(require_components(), 1);
  var import_i18n130 = __toESM(require_i18n(), 1);
  var import_element74 = __toESM(require_element(), 1);
  var import_jsx_runtime321 = __toESM(require_jsx_runtime(), 1);
  function DeletedNavigationWarning({ onCreateNew, isNotice = false }) {
    const [isButtonDisabled, setIsButtonDisabled] = (0, import_element74.useState)(false);
    const handleButtonClick = () => {
      setIsButtonDisabled(true);
      onCreateNew();
    };
    const message = (0, import_element74.createInterpolateElement)(
      (0, import_i18n130.__)(
        "Navigation Menu has been deleted or is unavailable. <button>Create a new Menu?</button>"
      ),
      {
        button: /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(
          import_components85.Button,
          {
            __next40pxDefaultSize: true,
            onClick: handleButtonClick,
            variant: "link",
            disabled: isButtonDisabled,
            accessibleWhenDisabled: true
          }
        )
      }
    );
    return isNotice ? /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(import_components85.Notice, { status: "warning", isDismissible: false, children: message }) : /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(import_block_editor147.Warning, { children: message });
  }
  var deleted_navigation_warning_default = DeletedNavigationWarning;

  // packages/block-library/build-module/navigation/edit/leaf-more-menu.mjs
  var import_blocks61 = __toESM(require_blocks(), 1);
  var import_components86 = __toESM(require_components(), 1);
  var import_data76 = __toESM(require_data(), 1);
  var import_i18n131 = __toESM(require_i18n(), 1);
  var import_block_editor148 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime322 = __toESM(require_jsx_runtime(), 1);
  var POPOVER_PROPS = {
    className: "block-editor-block-settings-menu__popover",
    placement: "bottom-start"
  };
  var BLOCKS_THAT_CAN_BE_CONVERTED_TO_SUBMENU = [
    "core/navigation-link",
    "core/navigation-submenu"
  ];
  function AddSubmenuItem({
    block,
    onClose,
    expandedState,
    expand,
    setInsertedBlock
  }) {
    const { insertBlock, replaceBlock, replaceInnerBlocks } = (0, import_data76.useDispatch)(import_block_editor148.store);
    const clientId = block.clientId;
    const isDisabled = !BLOCKS_THAT_CAN_BE_CONVERTED_TO_SUBMENU.includes(
      block.name
    );
    return /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
      import_components86.MenuItem,
      {
        icon: add_submenu_default,
        disabled: isDisabled,
        onClick: () => {
          const updateSelectionOnInsert = false;
          const newLink = (0, import_blocks61.createBlock)(
            DEFAULT_BLOCK5.name,
            DEFAULT_BLOCK5.attributes
          );
          if (block.name === "core/navigation-submenu") {
            insertBlock(
              newLink,
              block.innerBlocks.length,
              clientId,
              updateSelectionOnInsert
            );
          } else {
            const newSubmenu = (0, import_blocks61.createBlock)(
              "core/navigation-submenu",
              block.attributes,
              block.innerBlocks
            );
            replaceBlock(clientId, newSubmenu);
            replaceInnerBlocks(
              newSubmenu.clientId,
              [newLink],
              updateSelectionOnInsert
            );
          }
          setInsertedBlock(newLink);
          if (!expandedState[block.clientId]) {
            expand(block.clientId);
          }
          onClose();
        },
        children: (0, import_i18n131.__)("Add submenu link")
      }
    );
  }
  function LeafMoreMenu(props) {
    const { block } = props;
    const { clientId } = block;
    const { moveBlocksDown, moveBlocksUp, removeBlocks } = (0, import_data76.useDispatch)(import_block_editor148.store);
    const removeLabel = (0, import_i18n131.sprintf)(
      /* translators: %s: block name */
      (0, import_i18n131.__)("Remove %s"),
      (0, import_block_editor148.BlockTitle)({ clientId, maximumLength: 25 })
    );
    const rootClientId = (0, import_data76.useSelect)(
      (select9) => {
        const { getBlockRootClientId } = select9(import_block_editor148.store);
        return getBlockRootClientId(clientId);
      },
      [clientId]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
      import_components86.DropdownMenu,
      {
        icon: more_vertical_default,
        label: (0, import_i18n131.__)("Options"),
        className: "block-editor-block-settings-menu",
        popoverProps: POPOVER_PROPS,
        noIcons: true,
        ...props,
        children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)(import_jsx_runtime322.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)(import_components86.MenuGroup, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
              import_components86.MenuItem,
              {
                icon: chevron_up_default,
                onClick: () => {
                  moveBlocksUp([clientId], rootClientId);
                  onClose();
                },
                children: (0, import_i18n131.__)("Move up")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
              import_components86.MenuItem,
              {
                icon: chevron_down_default,
                onClick: () => {
                  moveBlocksDown([clientId], rootClientId);
                  onClose();
                },
                children: (0, import_i18n131.__)("Move down")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
              AddSubmenuItem,
              {
                block,
                onClose,
                expandedState: props.expandedState,
                expand: props.expand,
                setInsertedBlock: props.setInsertedBlock
              }
            )
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(import_components86.MenuGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
            import_components86.MenuItem,
            {
              onClick: () => {
                removeBlocks([clientId], false);
                onClose();
              },
              children: removeLabel
            }
          ) })
        ] })
      }
    );
  }

  // packages/block-library/build-module/navigation-link/shared/controls.mjs
  var import_components90 = __toESM(require_components(), 1);
  var import_i18n137 = __toESM(require_i18n(), 1);
  var import_dom7 = __toESM(require_dom(), 1);
  var import_block_editor154 = __toESM(require_block_editor(), 1);
  var import_data82 = __toESM(require_data(), 1);
  var import_core_data46 = __toESM(require_core_data(), 1);

  // packages/block-library/build-module/navigation-link/shared/use-handle-link-change.mjs
  var import_element75 = __toESM(require_element(), 1);
  var import_data77 = __toESM(require_data(), 1);
  var import_block_editor149 = __toESM(require_block_editor(), 1);
  var import_dom5 = __toESM(require_dom(), 1);
  var import_escape_html2 = __toESM(require_escape_html(), 1);

  // packages/block-library/build-module/navigation-link/shared/update-attributes.mjs
  var import_escape_html = __toESM(require_escape_html(), 1);
  var import_url12 = __toESM(require_url(), 1);
  var shouldSeverEntityLink = (originalUrl, newUrl) => {
    if (!originalUrl || !newUrl) {
      return false;
    }
    const normalizePath = (path) => {
      if (!path) {
        return "";
      }
      return path.replace(/\/+$/, "");
    };
    const createUrlObject = (url, baseUrl = null) => {
      try {
        const base = baseUrl || (typeof window !== "undefined" ? window.location.origin : "https://wordpress.org");
        return new URL(url, base);
      } catch (error) {
        return null;
      }
    };
    const originalUrlObj = createUrlObject(originalUrl);
    if (!originalUrlObj) {
      return true;
    }
    const newUrlObj = createUrlObject(newUrl, originalUrl);
    if (!newUrlObj) {
      return true;
    }
    const originalHostname = originalUrlObj.hostname;
    const newHostname = newUrlObj.hostname;
    const originalPath = normalizePath((0, import_url12.getPath)(originalUrlObj.toString()));
    const newPath = normalizePath((0, import_url12.getPath)(newUrlObj.toString()));
    if (originalHostname !== newHostname || originalPath !== newPath) {
      return true;
    }
    const originalP = originalUrlObj.searchParams.get("p");
    const newP = newUrlObj.searchParams.get("p");
    if (originalP && newP && originalP !== newP) {
      return true;
    }
    const originalPageId = originalUrlObj.searchParams.get("page_id");
    const newPageId = newUrlObj.searchParams.get("page_id");
    if (originalPageId && newPageId && originalPageId !== newPageId) {
      return true;
    }
    if (originalP && newPageId || originalPageId && newP) {
      return true;
    }
    return false;
  };
  var updateAttributes = (updatedValue = {}, setAttributes, blockAttributes8 = {}) => {
    const {
      label: originalLabel = "",
      kind: originalKind = "",
      type: originalType = ""
    } = blockAttributes8;
    const {
      title: newLabel = "",
      // the title of any provided Post.
      label: newLabelFromLabel = "",
      // alternative to title
      url: newUrl,
      opensInNewTab,
      id: newID,
      kind: newKind = originalKind,
      type: newType = originalType
    } = updatedValue;
    const finalNewLabel = newLabel || newLabelFromLabel;
    const newLabelWithoutHttp = finalNewLabel.replace(/http(s?):\/\//gi, "");
    const newUrlWithoutHttp = newUrl?.replace(/http(s?):\/\//gi, "") ?? "";
    const useNewLabel = finalNewLabel && finalNewLabel !== originalLabel && // LinkControl without the title field relies
    // on the check below. Specifically, it assumes that
    // the URL is the same as a title.
    // This logic a) looks suspicious and b) should really
    // live in the LinkControl and not here. It's a great
    // candidate for future refactoring.
    newLabelWithoutHttp !== newUrlWithoutHttp;
    const label = useNewLabel ? (0, import_escape_html.escapeHTML)(finalNewLabel) : originalLabel || (0, import_escape_html.escapeHTML)(newUrlWithoutHttp);
    const type = newType === "post_tag" ? "tag" : newType.replace("-", "_");
    const isBuiltInType = ["post", "page", "tag", "category"].indexOf(type) > -1;
    const isCustomLink = !newKind && !isBuiltInType || newKind === "custom";
    const kind = isCustomLink ? "custom" : newKind;
    const attributes2 = {
      // Passed `url` may already be encoded. To prevent double encoding, decodeURI is executed to revert to the original string.
      ...newUrl !== void 0 ? { url: newUrl ? encodeURI((0, import_url12.safeDecodeURI)(newUrl)) : newUrl } : {},
      ...label && { label },
      ...void 0 !== opensInNewTab && { opensInNewTab },
      ...kind && { kind },
      ...type && type !== "URL" && { type }
    };
    if (newUrl && !newID && blockAttributes8.id) {
      const shouldSever = shouldSeverEntityLink(
        blockAttributes8.url,
        newUrl
      );
      if (shouldSever) {
        attributes2.id = void 0;
        attributes2.kind = "custom";
        attributes2.type = "custom";
      }
    } else if (newID && Number.isInteger(newID)) {
      attributes2.id = newID;
    } else if (blockAttributes8.id) {
      attributes2.kind = kind;
      attributes2.type = type;
    }
    setAttributes(attributes2);
    const finalId = "id" in attributes2 ? attributes2.id : blockAttributes8.id;
    const finalKind = "kind" in attributes2 ? attributes2.kind : blockAttributes8.kind;
    return {
      isEntityLink: !!finalId && finalKind !== "custom",
      attributes: attributes2
      // Return the computed attributes object
    };
  };

  // packages/block-library/build-module/navigation-link/shared/use-handle-link-change.mjs
  function useHandleLinkChange({
    clientId,
    attributes: attributes2,
    setAttributes,
    allowTextUpdate = false
  }) {
    const { updateBlockAttributes } = (0, import_data77.useDispatch)(import_block_editor149.store);
    const { hasUrlBinding, createBinding, clearBinding } = useEntityBinding({
      clientId,
      attributes: attributes2
    });
    return (0, import_element75.useCallback)(
      (updatedLink) => {
        if (!updatedLink) {
          return;
        }
        const attrs = {
          url: updatedLink.url,
          kind: updatedLink.kind,
          type: updatedLink.type,
          id: updatedLink.id
        };
        const currentText = attributes2.label ? (0, import_dom5.__unstableStripHTML)(attributes2.label) : "";
        const updatedText = updatedLink.title ?? "";
        const hasTextUpdate = allowTextUpdate && updatedLink.title !== void 0 && updatedText !== currentText;
        const textUpdateAttributes = hasTextUpdate ? { label: (0, import_escape_html2.escapeHTML)(updatedText) } : {};
        if (!attributes2.label || attributes2.label === "" || hasTextUpdate) {
          attrs.title = updatedLink.title;
        }
        const willBeCustomLink = !updatedLink.id && hasUrlBinding;
        if (willBeCustomLink) {
          clearBinding();
          updateBlockAttributes(clientId, {
            url: updatedLink.url,
            kind: "custom",
            type: "custom",
            id: void 0,
            ...textUpdateAttributes
          });
        } else {
          const { isEntityLink, attributes: updatedAttributes } = updateAttributes(attrs, setAttributes, attributes2);
          if (isEntityLink) {
            createBinding(updatedAttributes);
          } else {
            clearBinding();
          }
          if (Object.keys(textUpdateAttributes).length) {
            updateBlockAttributes(clientId, textUpdateAttributes);
          }
        }
      },
      [
        attributes2,
        allowTextUpdate,
        clientId,
        hasUrlBinding,
        createBinding,
        clearBinding,
        setAttributes,
        updateBlockAttributes
      ]
    );
  }

  // packages/block-library/build-module/navigation-link/link-ui/index.mjs
  var import_dom6 = __toESM(require_dom(), 1);
  var import_components89 = __toESM(require_components(), 1);
  var import_i18n135 = __toESM(require_i18n(), 1);
  var import_block_editor151 = __toESM(require_block_editor(), 1);
  var import_element77 = __toESM(require_element(), 1);
  var import_core_data43 = __toESM(require_core_data(), 1);
  var import_compose34 = __toESM(require_compose(), 1);
  var import_url13 = __toESM(require_url(), 1);

  // packages/block-library/build-module/navigation-link/link-ui/page-creator.mjs
  var import_components88 = __toESM(require_components(), 1);
  var import_i18n133 = __toESM(require_i18n(), 1);
  var import_data78 = __toESM(require_data(), 1);
  var import_core_data42 = __toESM(require_core_data(), 1);
  var import_notices13 = __toESM(require_notices(), 1);
  var import_html_entities5 = __toESM(require_html_entities(), 1);
  var import_element76 = __toESM(require_element(), 1);

  // packages/block-library/build-module/navigation-link/link-ui/dialog-wrapper.mjs
  var import_components87 = __toESM(require_components(), 1);
  var import_i18n132 = __toESM(require_i18n(), 1);
  var import_compose33 = __toESM(require_compose(), 1);
  var import_jsx_runtime323 = __toESM(require_jsx_runtime(), 1);
  function BackButton({ className, onBack }) {
    return /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
      import_components87.Button,
      {
        className,
        icon: (0, import_i18n132.isRTL)() ? chevron_right_small_default : chevron_left_small_default,
        onClick: (e2) => {
          e2.preventDefault();
          onBack();
        },
        size: "small",
        children: (0, import_i18n132.__)("Back")
      }
    );
  }
  function DialogWrapper({ className, title, description, onBack, children }) {
    const dialogTitleId = (0, import_compose33.useInstanceId)(
      DialogWrapper,
      "link-ui-dialog-title"
    );
    const dialogDescriptionId = (0, import_compose33.useInstanceId)(
      DialogWrapper,
      "link-ui-dialog-description"
    );
    const focusOnMountRef = (0, import_compose33.useFocusOnMount)("firstElement");
    const backButtonClassName = `${className}__back`;
    return /* @__PURE__ */ (0, import_jsx_runtime323.jsxs)(
      "div",
      {
        className,
        role: "dialog",
        "aria-labelledby": dialogTitleId,
        "aria-describedby": dialogDescriptionId,
        ref: focusOnMountRef,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime323.jsxs)(import_components87.VisuallyHidden, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime323.jsx)("h2", { id: dialogTitleId, children: title }),
            /* @__PURE__ */ (0, import_jsx_runtime323.jsx)("p", { id: dialogDescriptionId, children: description })
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(BackButton, { className: backButtonClassName, onBack }),
          children
        ]
      }
    );
  }
  var dialog_wrapper_default = DialogWrapper;

  // packages/block-library/build-module/navigation-link/link-ui/page-creator.mjs
  var import_jsx_runtime324 = __toESM(require_jsx_runtime(), 1);
  function LinkUIPageCreator({
    postType,
    onBack,
    onPageCreated,
    initialTitle = ""
  }) {
    const [title, setTitle] = (0, import_element76.useState)(initialTitle);
    const [shouldPublish, setShouldPublish] = (0, import_element76.useState)(true);
    const isTitleValid = title.trim().length > 0;
    const { lastError, isSaving } = (0, import_data78.useSelect)(
      (select9) => ({
        lastError: select9(import_core_data42.store).getLastEntitySaveError(
          "postType",
          postType
        ),
        isSaving: select9(import_core_data42.store).isSavingEntityRecord(
          "postType",
          postType
        )
      }),
      [postType]
    );
    const { saveEntityRecord } = (0, import_data78.useDispatch)(import_core_data42.store);
    const { createSuccessNotice, createErrorNotice } = (0, import_data78.useDispatch)(import_notices13.store);
    async function createPage(event) {
      event.preventDefault();
      if (isSaving || !isTitleValid) {
        return;
      }
      try {
        const savedRecord = await saveEntityRecord(
          "postType",
          postType,
          {
            title,
            status: shouldPublish ? "publish" : "draft"
          },
          { throwOnError: true }
        );
        if (savedRecord) {
          const pageLink = {
            id: savedRecord.id,
            type: postType,
            title: (0, import_html_entities5.decodeEntities)(savedRecord.title.rendered),
            url: savedRecord.link,
            kind: "post-type"
          };
          createSuccessNotice(
            (0, import_i18n133.sprintf)(
              // translators: %s: the name of the new page being created.
              (0, import_i18n133.__)("%s page created successfully."),
              (0, import_html_entities5.decodeEntities)(savedRecord.title.rendered)
            ),
            {
              type: "snackbar",
              id: "page-created-success"
            }
          );
          onPageCreated(pageLink);
        }
      } catch (error) {
        createErrorNotice(
          (0, import_i18n133.__)("Failed to create page. Please try again."),
          {
            type: "snackbar",
            id: "page-created-error"
          }
        );
      }
    }
    const isSubmitDisabled = isSaving || !isTitleValid;
    return /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
      dialog_wrapper_default,
      {
        className: "link-ui-page-creator",
        title: (0, import_i18n133.__)("Create page"),
        description: (0, import_i18n133.__)("Create a new page to add to your Navigation."),
        onBack,
        children: /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(import_components88.__experimentalVStack, { className: "link-ui-page-creator__inner", spacing: 4, children: /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("form", { onSubmit: createPage, children: /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)(import_components88.__experimentalVStack, { spacing: 4, children: [
          /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
            import_components88.TextControl,
            {
              __next40pxDefaultSize: true,
              label: (0, import_i18n133.__)("Title"),
              onChange: setTitle,
              placeholder: (0, import_i18n133.__)("No title"),
              value: title
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
            import_components88.CheckboxControl,
            {
              label: (0, import_i18n133.__)("Publish"),
              help: (0, import_i18n133.__)(
                "Turn off to save as a draft. Drafts won't appear on your site until published."
              ),
              checked: shouldPublish,
              onChange: setShouldPublish
            }
          ),
          lastError && /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(import_components88.Notice, { status: "error", isDismissible: false, children: lastError.message }),
          /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)(import_components88.__experimentalHStack, { spacing: 2, justify: "flex-end", children: [
            /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
              import_components88.Button,
              {
                __next40pxDefaultSize: true,
                variant: "tertiary",
                onClick: onBack,
                disabled: isSaving,
                accessibleWhenDisabled: true,
                children: (0, import_i18n133.__)("Cancel")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
              import_components88.Button,
              {
                __next40pxDefaultSize: true,
                variant: "primary",
                type: "submit",
                isBusy: isSaving,
                "aria-disabled": isSubmitDisabled,
                children: (0, import_i18n133.__)("Create page")
              }
            )
          ] })
        ] }) }) })
      }
    );
  }

  // packages/block-library/build-module/navigation-link/link-ui/block-inserter.mjs
  var import_i18n134 = __toESM(require_i18n(), 1);
  var import_data79 = __toESM(require_data(), 1);
  var import_block_editor150 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime325 = __toESM(require_jsx_runtime(), 1);
  var { PrivateQuickInserter: QuickInserter } = unlock(
    import_block_editor150.privateApis
  );
  function LinkUIBlockInserter({ clientId, onBack, onBlockInsert }) {
    const { rootBlockClientId } = (0, import_data79.useSelect)(
      (select9) => {
        const { getBlockRootClientId } = select9(import_block_editor150.store);
        return {
          rootBlockClientId: getBlockRootClientId(clientId)
        };
      },
      [clientId]
    );
    if (!clientId) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
      dialog_wrapper_default,
      {
        className: "link-ui-block-inserter",
        title: (0, import_i18n134.__)("Add block"),
        description: (0, import_i18n134.__)("Choose a block to add to your Navigation."),
        onBack,
        children: /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
          QuickInserter,
          {
            rootClientId: rootBlockClientId,
            clientId,
            isAppender: false,
            prioritizePatterns: false,
            selectBlockOnInsert: !onBlockInsert,
            onSelect: onBlockInsert ? onBlockInsert : void 0,
            hasSearch: false
          }
        )
      }
    );
  }
  var block_inserter_default = LinkUIBlockInserter;

  // packages/block-library/build-module/navigation-link/link-ui/index.mjs
  var import_jsx_runtime326 = __toESM(require_jsx_runtime(), 1);
  function getSuggestionsQuery(type, kind) {
    const perPage = 20;
    switch (type) {
      case "post":
      case "page":
        return { type: "post", subtype: type, perPage };
      case "category":
        return { type: "term", subtype: "category", perPage };
      case "tag":
        return { type: "term", subtype: "post_tag", perPage };
      case "post_format":
        return { type: "post-format", perPage };
      default:
        if (kind === "taxonomy") {
          return { type: "term", subtype: type, perPage };
        }
        if (kind === "post-type") {
          return { type: "post", subtype: type, perPage };
        }
        return {
          // for custom link which has no type
          // always show pages as initial suggestions
          initialSuggestionsSearchOptions: {
            type: "post",
            subtype: "page",
            perPage
          }
        };
    }
  }
  function UnforwardedLinkUI(props, ref) {
    const { label, url, opensInNewTab, type, kind, id } = props.link;
    const { entityRecord, hasBinding, isEntityAvailable } = props.entity || {};
    const { image, badges } = useLinkPreview({
      url,
      entityRecord,
      type,
      hasBinding,
      isEntityAvailable
    });
    const { clientId } = props;
    const postType = type || "page";
    const [addingBlock, setAddingBlock] = (0, import_element77.useState)(false);
    const [addingPage, setAddingPage] = (0, import_element77.useState)(false);
    const [shouldFocusPane, setShouldFocusPane] = (0, import_element77.useState)(null);
    const [initialSearchValue, setInitialSearchValue] = (0, import_element77.useState)("");
    const searchInputValueRef = (0, import_element77.useRef)("");
    const updateSearchValue = (value) => {
      searchInputValueRef.current = value;
      setInitialSearchValue(value);
    };
    const linkControlWrapperRef = (0, import_element77.useRef)();
    const addPageButtonRef = (0, import_element77.useRef)();
    const addBlockButtonRef = (0, import_element77.useRef)();
    const permissions = (0, import_core_data43.useResourcePermissions)({
      kind: "postType",
      name: postType
    });
    const { isBoundEntityAvailable } = useEntityBinding({
      clientId,
      attributes: props.link
    });
    const link = (0, import_element77.useMemo)(
      () => ({
        url,
        opensInNewTab,
        title: label && (0, import_dom6.__unstableStripHTML)(label),
        kind,
        type,
        id,
        image,
        badges
      }),
      [label, opensInNewTab, url, kind, type, id, image, badges]
    );
    const handlePageCreated = (pageLink) => {
      props.onChange(pageLink);
      setAddingPage(false);
      setShouldFocusPane(true);
      updateSearchValue("");
    };
    const dialogTitleId = (0, import_compose34.useInstanceId)(
      LinkUI,
      "link-ui-link-control__title"
    );
    const dialogDescriptionId = (0, import_compose34.useInstanceId)(
      LinkUI,
      "link-ui-link-control__description"
    );
    (0, import_element77.useEffect)(() => {
      if (shouldFocusPane && linkControlWrapperRef.current) {
        if (shouldFocusPane?.current) {
          shouldFocusPane.current.focus();
        } else {
          const tabbableElements = import_dom6.focus.tabbable.find(
            linkControlWrapperRef.current
          );
          const nextFocusTarget = tabbableElements[0] || linkControlWrapperRef.current;
          nextFocusTarget.focus();
        }
        setShouldFocusPane(false);
      }
    }, [shouldFocusPane]);
    const blockEditingMode = (0, import_block_editor151.useBlockEditingMode)();
    return /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)(
      import_components89.Popover,
      {
        ref,
        placement: "bottom",
        onClose: props.onClose,
        anchor: props.anchor,
        shift: true,
        children: [
          !addingBlock && !addingPage && /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)(
            "div",
            {
              ref: linkControlWrapperRef,
              role: "dialog",
              "aria-labelledby": dialogTitleId,
              "aria-describedby": dialogDescriptionId,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)(import_components89.VisuallyHidden, { children: [
                  /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("h2", { id: dialogTitleId, children: (0, import_i18n135.__)("Add link") }),
                  /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("p", { id: dialogDescriptionId, children: (0, import_i18n135.__)(
                    "Search for and add a link to your Navigation."
                  ) })
                ] }),
                /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
                  import_block_editor151.LinkControl,
                  {
                    hasTextControl: true,
                    hasRichPreviews: true,
                    value: link,
                    showInitialSuggestions: true,
                    withCreateSuggestion: false,
                    noDirectEntry: !!type,
                    noURLSuggestion: !!type,
                    suggestionsQuery: getSuggestionsQuery(type, kind),
                    onChange: props.onChange,
                    onInputChange: (value) => {
                      searchInputValueRef.current = value;
                    },
                    inputValue: initialSearchValue,
                    onRemove: props.onRemove,
                    onCancel: props.onCancel,
                    handleEntities: isBoundEntityAvailable,
                    forceIsEditingLink: link?.url ? false : void 0,
                    renderControlBottom: () => {
                      if (link?.url?.length) {
                        return null;
                      }
                      return /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
                        LinkUITools,
                        {
                          addPageButtonRef,
                          addBlockButtonRef,
                          setAddingBlock: () => {
                            setAddingBlock(true);
                          },
                          setAddingPage: () => {
                            setAddingPage(true);
                          },
                          canAddPage: permissions?.canCreate && type === "page",
                          canAddBlock: blockEditingMode === "default"
                        }
                      );
                    }
                  }
                )
              ]
            }
          ),
          addingBlock && /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
            block_inserter_default,
            {
              clientId: props.clientId,
              onBack: () => {
                setAddingBlock(false);
                setShouldFocusPane(addBlockButtonRef);
                updateSearchValue(searchInputValueRef.current);
              },
              onBlockInsert: props?.onBlockInsert
            }
          ),
          addingPage && /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
            LinkUIPageCreator,
            {
              postType,
              onBack: () => {
                setAddingPage(false);
                setShouldFocusPane(addPageButtonRef);
                updateSearchValue(searchInputValueRef.current);
              },
              onPageCreated: handlePageCreated,
              initialTitle: searchInputValueRef.current && !(0, import_url13.isURL)(searchInputValueRef.current) ? searchInputValueRef.current : ""
            }
          )
        ]
      }
    );
  }
  var LinkUI = (0, import_element77.forwardRef)(UnforwardedLinkUI);
  var LinkUITools = ({
    addPageButtonRef,
    addBlockButtonRef,
    setAddingBlock,
    setAddingPage,
    canAddPage,
    canAddBlock
  }) => {
    const blockInserterAriaRole = "listbox";
    if (!canAddPage && !canAddBlock) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)(import_components89.__experimentalVStack, { spacing: 0, className: "link-ui-tools", children: [
      canAddPage && /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
        import_components89.Button,
        {
          __next40pxDefaultSize: true,
          ref: addPageButtonRef,
          icon: plus_default,
          onClick: (e2) => {
            e2.preventDefault();
            setAddingPage(true);
          },
          "aria-haspopup": blockInserterAriaRole,
          children: (0, import_i18n135.__)("Create page")
        }
      ),
      canAddBlock && /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
        import_components89.Button,
        {
          __next40pxDefaultSize: true,
          ref: addBlockButtonRef,
          icon: plus_default,
          onClick: (e2) => {
            e2.preventDefault();
            setAddingBlock(true);
          },
          "aria-haspopup": blockInserterAriaRole,
          children: (0, import_i18n135.__)("Add block")
        }
      )
    ] });
  };

  // packages/block-library/build-module/navigation-link/shared/use-link-preview.mjs
  var import_i18n136 = __toESM(require_i18n(), 1);
  var import_url14 = __toESM(require_url(), 1);
  var import_block_editor152 = __toESM(require_block_editor(), 1);
  var import_data80 = __toESM(require_data(), 1);
  var import_core_data44 = __toESM(require_core_data(), 1);
  var { useRemoteUrlData, isHashLink, isRelativePath } = unlock(
    import_block_editor152.privateApis
  );
  function capitalize(str) {
    return str.charAt(0).toUpperCase() + str.slice(1);
  }
  function computeDisplayUrl({ linkUrl, homeUrl } = {}) {
    if (!linkUrl) {
      return { displayUrl: "", isExternal: false };
    }
    let displayUrl = (0, import_url14.safeDecodeURI)(linkUrl);
    let isExternal = false;
    if (isRelativePath(linkUrl) || isHashLink(linkUrl)) {
      return { displayUrl, isExternal: false };
    }
    try {
      const parsedUrl = new URL(linkUrl);
      const siteHost = new URL(homeUrl).host;
      if (parsedUrl.host === siteHost) {
        let path = parsedUrl.pathname + parsedUrl.search + parsedUrl.hash;
        if (path.endsWith("/") && path.length > 1) {
          path = path.slice(0, -1);
        }
        displayUrl = path;
      } else {
        isExternal = true;
      }
    } catch (e2) {
      isExternal = true;
    }
    return { displayUrl, isExternal };
  }
  function computeBadges({
    url,
    type,
    isExternal,
    entityStatus,
    hasBinding,
    isEntityAvailable
  }) {
    const badges = [];
    if (url) {
      if (isExternal) {
        badges.push({
          label: (0, import_i18n136.__)("External link"),
          intent: "default"
        });
      } else if (isHashLink(url)) {
        badges.push({
          label: (0, import_i18n136.__)("Internal link"),
          intent: "default"
        });
      } else if (type && type !== "custom") {
        badges.push({ label: capitalize(type), intent: "default" });
      } else {
        badges.push({
          label: (0, import_i18n136.__)("Page"),
          intent: "default"
        });
      }
    }
    if (hasBinding && !isEntityAvailable) {
      badges.push({
        label: (0, import_i18n136.sprintf)(
          /* translators: %s is the entity type (e.g., "page", "post", "category") */
          (0, import_i18n136.__)("Missing %s"),
          type
        ),
        intent: "error"
      });
    } else if (!url) {
      badges.push({ label: (0, import_i18n136.__)("No link selected"), intent: "error" });
    } else if (entityStatus) {
      const statusMap = {
        publish: { label: (0, import_i18n136.__)("Published"), intent: "success" },
        future: { label: (0, import_i18n136.__)("Scheduled"), intent: "warning" },
        draft: { label: (0, import_i18n136.__)("Draft"), intent: "warning" },
        pending: { label: (0, import_i18n136.__)("Pending"), intent: "warning" },
        private: { label: (0, import_i18n136.__)("Private"), intent: "default" },
        trash: { label: (0, import_i18n136.__)("Trash"), intent: "error" }
      };
      const badge = statusMap[entityStatus];
      if (badge) {
        badges.push(badge);
      }
    }
    return badges;
  }
  function useLinkPreview({
    url,
    entityRecord,
    type,
    hasBinding,
    isEntityAvailable
  }) {
    const homeUrl = (0, import_data80.useSelect)((select9) => {
      return select9(import_core_data44.store).getEntityRecord(
        "root",
        "__unstableBase"
      )?.home;
    }, []);
    const title = entityRecord?.title?.rendered || entityRecord?.title || entityRecord?.name;
    const { richData } = useRemoteUrlData(title ? null : url);
    const { displayUrl, isExternal } = computeDisplayUrl({
      linkUrl: url,
      homeUrl
    });
    const image = (0, import_data80.useSelect)(
      (select9) => {
        if (!entityRecord?.featured_media) {
          return null;
        }
        const { getEntityRecord } = select9(import_core_data44.store);
        const media = getEntityRecord(
          "postType",
          "attachment",
          entityRecord.featured_media
        );
        return media?.media_details?.sizes?.thumbnail?.source_url || media?.media_details?.sizes?.medium?.source_url || media?.source_url || null;
      },
      [entityRecord?.featured_media]
    );
    const badges = computeBadges({
      url,
      type,
      isExternal,
      entityStatus: entityRecord?.status,
      hasBinding,
      isEntityAvailable
    });
    const displayTitle = url ? title || richData?.title || (0, import_url14.safeDecodeURI)(url) : (0, import_i18n136.__)("Add link");
    return {
      title: displayTitle,
      url: displayUrl,
      image,
      badges
    };
  }

  // packages/block-library/build-module/navigation-link/shared/use-is-invalid-link.mjs
  var import_data81 = __toESM(require_data(), 1);
  var import_core_data45 = __toESM(require_core_data(), 1);
  var import_block_editor153 = __toESM(require_block_editor(), 1);
  var useIsInvalidLink = (kind, type, id, enabled) => {
    const isPostType = kind === "post-type" || type === "post" || type === "page";
    const hasId = Number.isInteger(id);
    const blockEditingMode = (0, import_block_editor153.useBlockEditingMode)();
    const { postStatus, isDeleted } = (0, import_data81.useSelect)(
      (select9) => {
        if (!isPostType) {
          return { postStatus: null, isDeleted: false };
        }
        if (blockEditingMode === "disabled" || !enabled) {
          return { postStatus: null, isDeleted: false };
        }
        const { getEntityRecord, hasFinishedResolution } = select9(import_core_data45.store);
        const entityRecord = getEntityRecord("postType", type, id);
        const hasResolved = hasFinishedResolution("getEntityRecord", [
          "postType",
          type,
          id
        ]);
        const deleted = hasResolved && entityRecord === void 0;
        return {
          postStatus: entityRecord?.status,
          isDeleted: deleted
        };
      },
      [isPostType, blockEditingMode, enabled, type, id]
    );
    const isInvalid = isPostType && hasId && (isDeleted || postStatus && "trash" === postStatus);
    const isDraft = "draft" === postStatus;
    return [isInvalid, isDraft];
  };

  // packages/block-library/build-module/navigation-link/shared/controls.mjs
  var import_jsx_runtime327 = __toESM(require_jsx_runtime(), 1);
  var { LinkPicker, isHashLink: isHashLink2, isRelativePath: isRelativePath2 } = unlock(
    import_block_editor154.privateApis
  );
  function getEntityTypeName(type, kind) {
    if (kind === "post-type") {
      switch (type) {
        case "post":
          return (0, import_i18n137.__)("post");
        case "page":
          return (0, import_i18n137.__)("page");
        default:
          return type || (0, import_i18n137.__)("post");
      }
    }
    if (kind === "taxonomy") {
      switch (type) {
        case "category":
          return (0, import_i18n137.__)("category");
        case "tag":
          return (0, import_i18n137.__)("tag");
        default:
          return type || (0, import_i18n137.__)("term");
      }
    }
    return type || (0, import_i18n137.__)("item");
  }
  function Controls2({
    attributes: attributes2,
    setAttributes,
    clientId,
    isLinkEditable = true
  }) {
    const { label, url, description, rel, opensInNewTab } = attributes2;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const { hasUrlBinding, isBoundEntityAvailable, entityRecord } = useEntityBinding({
      clientId,
      attributes: attributes2
    });
    const [isInvalid, isDraft] = useIsInvalidLink(
      attributes2.kind,
      attributes2.type,
      entityRecord?.id,
      hasUrlBinding
    );
    let helpText = "";
    if (isInvalid || hasUrlBinding && !isBoundEntityAvailable) {
      helpText = getInvalidLinkHelpText();
    } else if (isDraft) {
      helpText = getDraftHelpText({
        type: attributes2.type,
        kind: attributes2.kind
      });
    }
    const handleLinkChange = useHandleLinkChange({
      clientId,
      attributes: attributes2,
      setAttributes
    });
    const onNavigateToEntityRecord = (0, import_data82.useSelect)(
      (select9) => select9(import_block_editor154.store).getSettings().onNavigateToEntityRecord,
      []
    );
    const homeUrl = (0, import_data82.useSelect)((select9) => {
      return select9(import_core_data46.store).getEntityRecord("root", "__unstableBase")?.home;
    }, []);
    const blockEditingMode = (0, import_data82.useSelect)(
      (select9) => select9(import_block_editor154.store).getBlockEditingMode(clientId),
      [clientId]
    );
    const isContentOnly = blockEditingMode === "contentOnly";
    const preview = useLinkPreview({
      url,
      entityRecord,
      type: attributes2.type,
      hasBinding: hasUrlBinding,
      isEntityAvailable: isBoundEntityAvailable
    });
    const isViewableUrl = !!url && (!isHashLink2(url) || isRelativePath2(url) && !url.startsWith("/"));
    const viewUrl = isViewableUrl && url.startsWith("/") && homeUrl ? homeUrl + url : url;
    return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)(
      import_components90.__experimentalToolsPanel,
      {
        label: (0, import_i18n137.__)("Settings"),
        resetAll: () => {
          setAttributes({
            label: "",
            url: "",
            description: "",
            rel: "",
            opensInNewTab: false
          });
        },
        dropdownMenuProps,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
            import_components90.__experimentalToolsPanelItem,
            {
              hasValue: () => !!label,
              label: (0, import_i18n137.__)("Text"),
              onDeselect: () => setAttributes({ label: "" }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
                import_components90.TextControl,
                {
                  __next40pxDefaultSize: true,
                  label: (0, import_i18n137.__)("Text"),
                  value: label ? (0, import_dom7.__unstableStripHTML)(label) : "",
                  onChange: (labelValue) => {
                    setAttributes({ label: labelValue });
                  },
                  autoComplete: "off"
                }
              )
            }
          ),
          isLinkEditable && /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)(import_jsx_runtime327.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
              import_components90.__experimentalToolsPanelItem,
              {
                hasValue: () => !!url,
                label: (0, import_i18n137.__)("Link to"),
                onDeselect: () => setAttributes({
                  url: void 0,
                  id: void 0,
                  kind: void 0,
                  type: void 0
                }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
                  LinkPicker,
                  {
                    preview,
                    onSelect: handleLinkChange,
                    suggestionsQuery: getSuggestionsQuery(
                      attributes2.type,
                      attributes2.kind
                    ),
                    label: (0, import_i18n137.__)("Link to"),
                    help: helpText ? helpText : void 0
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
              import_components90.__experimentalToolsPanelItem,
              {
                hasValue: () => !!opensInNewTab,
                label: (0, import_i18n137.__)("Open in new tab"),
                onDeselect: () => setAttributes({ opensInNewTab: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
                  import_components90.CheckboxControl,
                  {
                    label: (0, import_i18n137.__)("Open in new tab"),
                    checked: opensInNewTab,
                    onChange: (value) => setAttributes({ opensInNewTab: value })
                  }
                )
              }
            ),
            !!url && hasUrlBinding && isBoundEntityAvailable && entityRecord?.id && attributes2.kind === "post-type" && onNavigateToEntityRecord && /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
              import_components90.Button,
              {
                variant: "secondary",
                onClick: () => {
                  onNavigateToEntityRecord({
                    postId: entityRecord.id,
                    postType: attributes2.type
                  });
                },
                __next40pxDefaultSize: true,
                className: "navigation-link-to__action-button",
                children: (0, import_i18n137.__)("Edit")
              }
            ),
            isViewableUrl && /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
              import_components90.Button,
              {
                variant: "secondary",
                href: viewUrl,
                target: "_blank",
                icon: external_default,
                iconPosition: "right",
                __next40pxDefaultSize: true,
                className: "navigation-link-to__action-button",
                children: (0, import_i18n137.__)("View")
              }
            )
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
            import_components90.__experimentalToolsPanelItem,
            {
              hasValue: () => !!description,
              label: (0, import_i18n137.__)("Description"),
              onDeselect: () => setAttributes({ description: "" }),
              isShownByDefault: !isContentOnly,
              children: /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
                import_components90.TextareaControl,
                {
                  label: (0, import_i18n137.__)("Description"),
                  value: description || "",
                  onChange: (descriptionValue) => {
                    setAttributes({ description: descriptionValue });
                  },
                  help: (0, import_i18n137.__)(
                    "The description will be displayed in the menu if the current theme supports it."
                  )
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
            import_components90.__experimentalToolsPanelItem,
            {
              hasValue: () => !!rel,
              label: (0, import_i18n137.__)("Rel attribute"),
              onDeselect: () => setAttributes({ rel: "" }),
              isShownByDefault: !isContentOnly,
              children: /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
                import_components90.TextControl,
                {
                  __next40pxDefaultSize: true,
                  label: (0, import_i18n137.__)("Rel attribute"),
                  value: rel || "",
                  onChange: (relValue) => {
                    setAttributes({ rel: relValue });
                  },
                  autoComplete: "off",
                  help: (0, import_i18n137.__)(
                    "The relationship of the linked URL as space-separated link types."
                  )
                }
              )
            }
          )
        ]
      }
    );
  }
  function getInvalidLinkHelpText() {
    return (0, import_i18n137.__)(
      "This link is invalid and will not appear on your site. Please update the link."
    );
  }
  function getDraftHelpText({ type, kind }) {
    const entityType = getEntityTypeName(type, kind);
    return (0, import_i18n137.sprintf)(
      /* translators: %1$s is the entity type (e.g., "page", "post", "category") */
      (0, import_i18n137.__)(
        "This link is to a draft %1$s and will not appear on your site until the %1$s is published."
      ),
      entityType
    );
  }

  // packages/block-library/build-module/navigation-link/shared/invalid-draft-display.mjs
  var import_i18n138 = __toESM(require_i18n(), 1);
  var import_html_entities6 = __toESM(require_html_entities(), 1);
  var import_jsx_runtime328 = __toESM(require_jsx_runtime(), 1);
  function InvalidDraftDisplay({
    label,
    isInvalid,
    isDraft,
    className = "wp-block-navigation-link__label"
  }) {
    if (!isInvalid && !isDraft) {
      return null;
    }
    const statusText = isInvalid ? (
      /* translators: Indicating that the navigation link is Invalid. */
      (0, import_i18n138.__)("Invalid")
    ) : (
      /* translators: Indicating that the navigation link is a Draft. */
      (0, import_i18n138.__)("Draft")
    );
    return /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
      "div",
      {
        className: clsx_default(
          "wp-block-navigation-link__placeholder-text",
          className,
          {
            "is-invalid": isInvalid,
            "is-draft": isDraft
          }
        ),
        children: /* @__PURE__ */ (0, import_jsx_runtime328.jsx)("span", {
          // Some attributes are stored in an escaped form. It's a legacy issue.
          // Ideally they would be stored in a raw, unescaped form.
          // Unescape is used here to "recover" the escaped characters
          // so they display without encoding.
          // See `updateAttributes` for more details.
          children: `${(0, import_html_entities6.decodeEntities)(label)} (${statusText})`.trim()
        })
      }
    );
  }

  // packages/block-library/build-module/navigation-link/shared/use-enable-link-status-validation.mjs
  var import_data83 = __toESM(require_data(), 1);
  var import_block_editor155 = __toESM(require_block_editor(), 1);
  function useEnableLinkStatusValidation(clientId) {
    return (0, import_data83.useSelect)(
      (select9) => {
        const {
          getSelectedBlockClientId,
          hasSelectedInnerBlock,
          getBlockParentsByBlockName
        } = select9(import_block_editor155.store);
        const selectedBlockId = getSelectedBlockClientId();
        const rootNavigationId = getBlockParentsByBlockName(
          clientId,
          "core/navigation"
        )[0];
        return selectedBlockId === rootNavigationId || hasSelectedInnerBlock(rootNavigationId, true);
      },
      [clientId]
    );
  }

  // packages/block-library/build-module/navigation-link/shared/use-is-dragging-within.mjs
  var import_element78 = __toESM(require_element(), 1);
  var useIsDraggingWithin = (elementRef) => {
    const [isDraggingWithin, setIsDraggingWithin] = (0, import_element78.useState)(false);
    (0, import_element78.useEffect)(() => {
      const { ownerDocument } = elementRef.current;
      function handleDragStart(event) {
        handleDragEnter(event);
      }
      function handleDragEnd() {
        setIsDraggingWithin(false);
      }
      function handleDragEnter(event) {
        if (elementRef.current.contains(event.target)) {
          setIsDraggingWithin(true);
        } else {
          setIsDraggingWithin(false);
        }
      }
      ownerDocument.addEventListener("dragstart", handleDragStart);
      ownerDocument.addEventListener("dragend", handleDragEnd);
      ownerDocument.addEventListener("dragenter", handleDragEnter);
      return () => {
        ownerDocument.removeEventListener("dragstart", handleDragStart);
        ownerDocument.removeEventListener("dragend", handleDragEnd);
        ownerDocument.removeEventListener("dragenter", handleDragEnter);
      };
    }, [elementRef]);
    return isDraggingWithin;
  };

  // packages/block-library/build-module/navigation-link/shared/select-label-text.mjs
  function selectLabelText(ref) {
    ref.current.focus();
    const { ownerDocument } = ref.current;
    const { defaultView } = ownerDocument;
    const selection = defaultView.getSelection();
    const range = ownerDocument.createRange();
    range.selectNodeContents(ref.current);
    selection.removeAllRanges();
    selection.addRange(range);
  }

  // packages/block-library/build-module/navigation/edit/menu-inspector-controls.mjs
  var import_jsx_runtime329 = __toESM(require_jsx_runtime(), 1);
  var actionLabel = (
    /* translators: %s: The name of a menu. */
    (0, import_i18n139.__)("Switch to '%s'")
  );
  var BLOCKS_WITH_LINK_UI_SUPPORT = [
    "core/navigation-link",
    "core/navigation-submenu"
  ];
  var {
    PrivateListView,
    useBlockDisplayTitle,
    PrivateBlockContext,
    useListViewPanelState
  } = unlock(import_block_editor156.privateApis);
  function AdditionalBlockContent({ block, insertedBlock, setInsertedBlock }) {
    const { updateBlockAttributes, removeBlock } = (0, import_data84.useDispatch)(import_block_editor156.store);
    const supportsLinkControls = BLOCKS_WITH_LINK_UI_SUPPORT?.includes(
      insertedBlock?.name
    );
    const blockWasJustInserted = insertedBlock?.clientId === block.clientId;
    const showLinkControls = supportsLinkControls && blockWasJustInserted;
    const { createBinding, clearBinding } = useEntityBinding({
      clientId: insertedBlock?.clientId,
      attributes: insertedBlock?.attributes || {}
    });
    if (!showLinkControls) {
      return null;
    }
    const cleanupInsertedBlock = () => {
      const shouldAutoSelectBlock = false;
      if (!insertedBlock?.attributes?.url && insertedBlock?.clientId) {
        removeBlock(insertedBlock.clientId, shouldAutoSelectBlock);
      }
      setInsertedBlock(null);
    };
    const setInsertedBlockAttributes = (_insertedBlockClientId) => (_updatedAttributes) => {
      if (!_insertedBlockClientId) {
        return;
      }
      updateBlockAttributes(_insertedBlockClientId, _updatedAttributes);
    };
    const handleSetInsertedBlock = (newBlock) => {
      const shouldAutoSelectBlock = false;
      if (insertedBlock?.clientId && newBlock) {
        removeBlock(insertedBlock.clientId, shouldAutoSelectBlock);
      }
      setInsertedBlock(newBlock);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
      LinkUI,
      {
        clientId: insertedBlock?.clientId,
        link: insertedBlock?.attributes,
        onBlockInsert: handleSetInsertedBlock,
        onClose: () => {
          cleanupInsertedBlock();
        },
        onChange: (updatedValue) => {
          const { isEntityLink, attributes: updatedAttributes } = updateAttributes(
            updatedValue,
            setInsertedBlockAttributes(insertedBlock?.clientId),
            insertedBlock?.attributes
          );
          if (isEntityLink) {
            createBinding(updatedAttributes);
          } else {
            clearBinding();
          }
          setInsertedBlock(null);
        }
      }
    );
  }
  var MainContent = ({
    clientId,
    currentMenuId,
    isLoading,
    isNavigationMenuMissing,
    onCreateNew,
    expandRevision
  }) => {
    const hasChildren = (0, import_data84.useSelect)(
      (select9) => {
        return !!select9(import_block_editor156.store).getBlockCount(clientId);
      },
      [clientId]
    );
    const { openListViewContentPanel } = unlock(
      (0, import_data84.useDispatch)(import_block_editor156.store)
    );
    const { navigationMenu } = useNavigationMenu(currentMenuId);
    if (currentMenuId && isNavigationMenuMissing) {
      return /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(deleted_navigation_warning_default, { onCreateNew, isNotice: true });
    }
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(import_components91.Spinner, {});
    }
    const description = navigationMenu ? (0, import_i18n139.sprintf)(
      /* translators: %s: The name of a menu. */
      (0, import_i18n139.__)("Structure for Navigation Menu: %s"),
      navigationMenu?.title || (0, import_i18n139.__)("Untitled menu")
    ) : (0, import_i18n139.__)(
      "You have not yet created any menus. Displaying a list of your Pages"
    );
    return /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)("div", { className: "wp-block-navigation__menu-inspector-controls", children: [
      !hasChildren && /* @__PURE__ */ (0, import_jsx_runtime329.jsx)("p", { className: "wp-block-navigation__menu-inspector-controls__empty-message", children: (0, import_i18n139.__)("This Navigation Menu is empty.") }),
      /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
        PrivateListView,
        {
          rootClientId: clientId,
          isExpanded: true,
          description,
          showAppender: true,
          blockSettingsMenu: LeafMoreMenu,
          additionalBlockContent: AdditionalBlockContent,
          onSelect: openListViewContentPanel
        },
        `${clientId}-${expandRevision}`
      )
    ] });
  };
  var MenuInspectorControls = (props) => {
    const {
      clientId,
      createNavigationMenuIsSuccess,
      createNavigationMenuIsError,
      currentMenuId = null,
      onCreateNew,
      onSelectClassicMenu,
      onSelectNavigationMenu,
      isManageMenusButtonDisabled,
      blockEditingMode
    } = props;
    const { isSelectionWithinCurrentSection } = (0, import_element79.useContext)(PrivateBlockContext);
    const blockTitle = useBlockDisplayTitle({
      clientId,
      context: "list-view"
    });
    const showBlockTitle = isSelectionWithinCurrentSection;
    const { isOpened, expandRevision, handleToggle } = useListViewPanelState(clientId);
    if (!showBlockTitle) {
      return /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(import_block_editor156.InspectorControls, { group: "list", children: /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)(import_components91.PanelBody, { title: null, children: [
        /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)(import_components91.__experimentalHStack, { className: "wp-block-navigation-off-canvas-editor__header", children: [
          /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
            import_components91.__experimentalHeading,
            {
              className: "wp-block-navigation-off-canvas-editor__title",
              level: 2,
              children: blockTitle
            }
          ),
          blockEditingMode === "default" && /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
            navigation_menu_selector_default,
            {
              currentMenuId,
              onSelectClassicMenu,
              onSelectNavigationMenu,
              onCreateNew,
              createNavigationMenuIsSuccess,
              createNavigationMenuIsError,
              actionLabel,
              isManageMenusButtonDisabled
            }
          )
        ] }),
        /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
          MainContent,
          {
            ...props,
            expandRevision
          }
        )
      ] }) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(import_block_editor156.InspectorControls, { group: "list", children: /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)(
      import_components91.PanelBody,
      {
        title: (0, import_i18n139.__)("Navigation"),
        opened: isOpened,
        onToggle: handleToggle,
        children: [
          blockEditingMode === "default" && /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
            navigation_menu_selector_default,
            {
              currentMenuId,
              onSelectClassicMenu,
              onSelectNavigationMenu,
              onCreateNew,
              createNavigationMenuIsSuccess,
              createNavigationMenuIsError,
              actionLabel,
              isManageMenusButtonDisabled
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(MainContent, { ...props, expandRevision })
        ]
      }
    ) });
  };
  var menu_inspector_controls_default = MenuInspectorControls;

  // packages/block-library/build-module/navigation/edit/accessible-description.mjs
  var import_components92 = __toESM(require_components(), 1);
  var import_jsx_runtime330 = __toESM(require_jsx_runtime(), 1);
  function AccessibleDescription({ id, children }) {
    return /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(import_components92.VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime330.jsx)("div", { id, className: "wp-block-navigation__description", children }) });
  }

  // packages/block-library/build-module/navigation/edit/accessible-menu-description.mjs
  var import_core_data47 = __toESM(require_core_data(), 1);
  var import_i18n140 = __toESM(require_i18n(), 1);
  var import_jsx_runtime331 = __toESM(require_jsx_runtime(), 1);
  function AccessibleMenuDescription({ id }) {
    const [menuTitle] = (0, import_core_data47.useEntityProp)("postType", "wp_navigation", "title");
    const description = (0, import_i18n140.sprintf)((0, import_i18n140.__)(`Navigation Menu: "%s"`), menuTitle);
    return /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(AccessibleDescription, { id, children: description });
  }

  // packages/block-library/build-module/utils/is-within-overlay.mjs
  var import_data85 = __toESM(require_data(), 1);
  var import_core_data48 = __toESM(require_core_data(), 1);
  function isWithinNavigationOverlay() {
    const editorStore = (0, import_data85.select)("core/editor");
    if (!editorStore) {
      return false;
    }
    const { getCurrentPostType, getCurrentPostId } = editorStore;
    const { getEditedEntityRecord } = (0, import_data85.select)(import_core_data48.store);
    const postType = getCurrentPostType?.();
    const postId = getCurrentPostId?.();
    if (postType === "wp_template_part" && postId) {
      const templatePart = getEditedEntityRecord(
        "postType",
        "wp_template_part",
        postId
      );
      return templatePart?.area === NAVIGATION_OVERLAY_TEMPLATE_PART_AREA;
    }
    return false;
  }

  // packages/block-library/build-module/navigation/edit/index.mjs
  var import_jsx_runtime332 = __toESM(require_jsx_runtime(), 1);
  function NavigationAddPageButton({ clientId }) {
    const { insertBlock } = (0, import_data86.useDispatch)(import_block_editor157.store);
    const { getBlockCount } = (0, import_data86.useSelect)(import_block_editor157.store);
    const onAddPage = (0, import_element80.useCallback)(() => {
      const blockCount = getBlockCount(clientId);
      const newBlock = (0, import_blocks62.createBlock)(DEFAULT_BLOCK5.name, {
        kind: DEFAULT_BLOCK5.attributes.kind,
        type: DEFAULT_BLOCK5.attributes.type
      });
      insertBlock(newBlock, blockCount, clientId);
    }, [clientId, insertBlock, getBlockCount]);
    return /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(import_block_editor157.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(import_components93.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
      import_components93.ToolbarButton,
      {
        name: "add-page",
        icon: page_default,
        onClick: onAddPage,
        children: (0, import_i18n141.__)("Add page")
      }
    ) }) });
  }
  function ColorTools({
    textColor,
    setTextColor,
    backgroundColor,
    setBackgroundColor,
    overlayTextColor,
    setOverlayTextColor,
    overlayBackgroundColor,
    setOverlayBackgroundColor,
    clientId,
    navRef,
    hasCustomOverlay
  }) {
    const [detectedBackgroundColor, setDetectedBackgroundColor] = (0, import_element80.useState)();
    const [detectedColor, setDetectedColor] = (0, import_element80.useState)();
    const [
      detectedOverlayBackgroundColor,
      setDetectedOverlayBackgroundColor
    ] = (0, import_element80.useState)();
    const [detectedOverlayColor, setDetectedOverlayColor] = (0, import_element80.useState)();
    const isWithinOverlay = (0, import_data86.useSelect)(() => isWithinNavigationOverlay(), []);
    const enableContrastChecking = import_element80.Platform.OS === "web";
    (0, import_element80.useEffect)(() => {
      if (!enableContrastChecking) {
        return;
      }
      detectColors(
        navRef.current,
        setDetectedColor,
        setDetectedBackgroundColor
      );
      const subMenuElement = navRef.current?.querySelector(
        '[data-type="core/navigation-submenu"] [data-type="core/navigation-link"]'
      );
      if (!subMenuElement) {
        return;
      }
      if (overlayTextColor.color || overlayBackgroundColor.color) {
        detectColors(
          subMenuElement,
          setDetectedOverlayColor,
          setDetectedOverlayBackgroundColor
        );
      }
    }, [
      enableContrastChecking,
      overlayTextColor.color,
      overlayBackgroundColor.color,
      navRef
    ]);
    const colorGradientSettings = (0, import_block_editor157.__experimentalUseMultipleOriginColorsAndGradients)();
    if (!colorGradientSettings.hasColorsOrGradients) {
      return null;
    }
    const colorSettings = [
      {
        colorValue: textColor.color,
        label: (0, import_i18n141.__)("Text"),
        onColorChange: setTextColor,
        resetAllFilter: () => setTextColor(),
        clearable: true,
        enableAlpha: true
      },
      {
        colorValue: backgroundColor.color,
        label: (0, import_i18n141.__)("Background"),
        onColorChange: setBackgroundColor,
        resetAllFilter: () => setBackgroundColor(),
        clearable: true,
        enableAlpha: true
      }
    ];
    colorSettings.push(
      {
        colorValue: overlayTextColor.color,
        label: hasCustomOverlay || isWithinOverlay ? (0, import_i18n141.__)("Submenu text") : (0, import_i18n141.__)("Submenu & overlay text"),
        onColorChange: setOverlayTextColor,
        resetAllFilter: () => setOverlayTextColor(),
        clearable: true,
        enableAlpha: true
      },
      {
        colorValue: overlayBackgroundColor.color,
        label: hasCustomOverlay || isWithinOverlay ? (0, import_i18n141.__)("Submenu background") : (0, import_i18n141.__)("Submenu & overlay background"),
        onColorChange: setOverlayBackgroundColor,
        resetAllFilter: () => setOverlayBackgroundColor(),
        clearable: true,
        enableAlpha: true
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)(import_jsx_runtime332.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
        import_block_editor157.__experimentalColorGradientSettingsDropdown,
        {
          __experimentalIsRenderedInSidebar: true,
          settings: colorSettings,
          panelId: clientId,
          ...colorGradientSettings,
          gradients: [],
          disableCustomGradients: true
        }
      ),
      enableContrastChecking && /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)(import_jsx_runtime332.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
          import_block_editor157.ContrastChecker,
          {
            backgroundColor: detectedBackgroundColor,
            textColor: detectedColor
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
          import_block_editor157.ContrastChecker,
          {
            backgroundColor: detectedOverlayBackgroundColor,
            textColor: detectedOverlayColor
          }
        )
      ] })
    ] });
  }
  function Navigation({
    attributes: attributes2,
    setAttributes,
    clientId,
    isSelected,
    className,
    backgroundColor,
    setBackgroundColor,
    textColor,
    setTextColor,
    overlayBackgroundColor,
    setOverlayBackgroundColor,
    overlayTextColor,
    setOverlayTextColor,
    // These props are used by the navigation editor to override specific
    // navigation block settings.
    customPlaceholder: CustomPlaceholder = null,
    __unstableLayoutClassNames: layoutClassNames
  }) {
    const {
      submenuVisibility,
      overlayMenu,
      overlay,
      showSubmenuIcon,
      templateLock,
      layout: {
        justifyContent,
        orientation = "horizontal",
        flexWrap = "wrap"
      } = {},
      hasIcon,
      icon: icon4 = "handle"
    } = attributes2;
    const ref = attributes2.ref;
    const setRef = (0, import_element80.useCallback)(
      (postId) => {
        setAttributes({ ref: postId });
      },
      [setAttributes]
    );
    (0, import_element80.useEffect)(() => {
      if (orientation === "horizontal" && submenuVisibility === "always") {
        setAttributes({
          submenuVisibility: "hover",
          showSubmenuIcon: true
        });
      }
    }, [orientation, submenuVisibility, setAttributes]);
    const recursionId = `navigationMenu/${ref}`;
    const recursionDetected = (0, import_block_editor157.useHasRecursion)(recursionId);
    const { isPreviewMode, onNavigateToEntityRecord, currentTheme } = (0, import_data86.useSelect)(
      (select9) => {
        const { getSettings: getSettings2 } = select9(import_block_editor157.store);
        const settings122 = getSettings2();
        return {
          isPreviewMode: settings122.isPreviewMode,
          onNavigateToEntityRecord: settings122?.onNavigateToEntityRecord,
          // Needed to construct the template part ID for the overlay preview.
          currentTheme: select9(import_core_data49.store).getCurrentTheme()?.stylesheet
        };
      },
      []
    );
    const hasAlreadyRendered = isPreviewMode ? false : recursionDetected;
    const blockEditingMode = (0, import_block_editor157.useBlockEditingMode)();
    const { menus: classicMenus } = useNavigationEntities();
    const [showNavigationMenuStatusNotice, hideNavigationMenuStatusNotice] = use_navigation_notice_default({
      name: "block-library/core/navigation/status"
    });
    const [showClassicMenuConversionNotice, hideClassicMenuConversionNotice] = use_navigation_notice_default({
      name: "block-library/core/navigation/classic-menu-conversion"
    });
    const [
      showNavigationMenuPermissionsNotice,
      hideNavigationMenuPermissionsNotice
    ] = use_navigation_notice_default({
      name: "block-library/core/navigation/permissions/update"
    });
    const {
      create: createNavigationMenu,
      status: createNavigationMenuStatus,
      error: createNavigationMenuError,
      value: createNavigationMenuPost,
      isPending: isCreatingNavigationMenu,
      isSuccess: createNavigationMenuIsSuccess,
      isError: createNavigationMenuIsError
    } = useCreateNavigationMenu(clientId);
    const createUntitledEmptyNavigationMenu = async () => {
      await createNavigationMenu("");
    };
    const {
      hasUncontrolledInnerBlocks,
      uncontrolledInnerBlocks,
      isInnerBlockSelected,
      innerBlocks
    } = useInnerBlocks(clientId);
    const hasPageListWithSubmenuRef = (0, import_element80.useRef)(false);
    const hasSubmenus = (0, import_data86.useSelect)(
      (select9) => {
        const hasNavigationSubmenu = innerBlocks.some(
          (block) => block.name === "core/navigation-submenu"
        );
        if (hasNavigationSubmenu) {
          return true;
        }
        const pageList = innerBlocks.find(
          (block) => block.name === "core/page-list"
        );
        if (!pageList) {
          hasPageListWithSubmenuRef.current = false;
          return false;
        }
        if (hasPageListWithSubmenuRef.current) {
          return true;
        }
        const { getBlocks } = select9(import_block_editor157.store);
        const pageListBlocks = getBlocks(pageList.clientId);
        if (pageListBlocks.length > 0) {
          hasPageListWithSubmenuRef.current = true;
          return true;
        }
        return false;
      },
      [innerBlocks]
    );
    const { records: overlayTemplateParts } = (0, import_core_data49.useEntityRecords)(
      "postType",
      "wp_template_part",
      {
        per_page: -1
      }
    );
    const hasOverlays = overlayTemplateParts?.some(
      (templatePart) => templatePart.area === NAVIGATION_OVERLAY_TEMPLATE_PART_AREA
    ) ?? false;
    const {
      replaceInnerBlocks,
      selectBlock,
      __unstableMarkNextChangeAsNotPersistent
    } = (0, import_data86.useDispatch)(import_block_editor157.store);
    const [isResponsiveMenuOpen, setResponsiveMenuVisibility] = (0, import_element80.useState)(false);
    const [overlayMenuPreview, setOverlayMenuPreview] = (0, import_element80.useState)(false);
    const {
      hasResolvedNavigationMenus,
      isNavigationMenuResolved,
      isNavigationMenuMissing,
      canUserUpdateNavigationMenu,
      hasResolvedCanUserUpdateNavigationMenu,
      canUserDeleteNavigationMenu,
      hasResolvedCanUserDeleteNavigationMenu,
      canUserCreateNavigationMenus,
      isResolvingCanUserCreateNavigationMenus,
      hasResolvedCanUserCreateNavigationMenus
    } = useNavigationMenu(ref);
    const navMenuResolvedButMissing = hasResolvedNavigationMenus && isNavigationMenuMissing;
    const {
      convert: convertClassicMenu,
      status: classicMenuConversionStatus,
      error: classicMenuConversionError
    } = use_convert_classic_menu_to_block_menu_default(createNavigationMenu);
    const isConvertingClassicMenu = classicMenuConversionStatus === CLASSIC_MENU_CONVERSION_PENDING;
    const handleUpdateMenu = (0, import_element80.useCallback)(
      (menuId, options2 = { focusNavigationBlock: false }) => {
        const { focusNavigationBlock } = options2;
        setRef(menuId);
        if (focusNavigationBlock) {
          selectBlock(clientId);
        }
      },
      [selectBlock, clientId, setRef]
    );
    const isEntityAvailable = !isNavigationMenuMissing && isNavigationMenuResolved;
    const hasUnsavedBlocks = hasUncontrolledInnerBlocks && !isEntityAvailable;
    const { getNavigationFallbackId } = unlock((0, import_data86.useSelect)(import_core_data49.store));
    const navigationFallbackId = !(ref || hasUnsavedBlocks) ? getNavigationFallbackId() : null;
    (0, import_element80.useEffect)(() => {
      if (ref || hasUnsavedBlocks || !navigationFallbackId) {
        return;
      }
      __unstableMarkNextChangeAsNotPersistent();
      setRef(navigationFallbackId);
    }, [
      ref,
      setRef,
      hasUnsavedBlocks,
      navigationFallbackId,
      __unstableMarkNextChangeAsNotPersistent
    ]);
    const navRef = (0, import_element80.useRef)();
    const isWithinOverlay = (0, import_data86.useSelect)(() => isWithinNavigationOverlay(), []);
    const TagName2 = isWithinOverlay ? "div" : "nav";
    const isPlaceholder = !ref && !isCreatingNavigationMenu && !isConvertingClassicMenu && hasResolvedNavigationMenus && classicMenus?.length === 0 && !hasUncontrolledInnerBlocks;
    const isLoading = !hasResolvedNavigationMenus || isCreatingNavigationMenu || isConvertingClassicMenu || !!(ref && !isEntityAvailable && !isConvertingClassicMenu);
    const textDecoration = attributes2.style?.typography?.textDecoration;
    const hasBlockOverlay = (0, import_data86.useSelect)(
      (select9) => select9(import_block_editor157.store).__unstableHasActiveBlockOverlayActive(
        clientId
      ),
      [clientId]
    );
    const hasSetOverlayDefault = (0, import_element80.useRef)(false);
    (0, import_element80.useEffect)(() => {
      if (!isWithinOverlay) {
        return;
      }
      if (overlayMenu !== "never") {
        setAttributes({ overlayMenu: "never" });
      }
      if (!hasSetOverlayDefault.current && !ref) {
        hasSetOverlayDefault.current = true;
        setAttributes({
          submenuVisibility: "always",
          layout: {
            ...attributes2.layout,
            orientation: "vertical"
          },
          showSubmenuIcon: false
        });
      }
    }, [
      attributes2.layout,
      isWithinOverlay,
      overlayMenu,
      ref,
      setAttributes
    ]);
    const isResponsive = "never" !== overlayMenu;
    const blockProps = (0, import_block_editor157.useBlockProps)({
      ref: navRef,
      className: clsx_default(
        className,
        {
          "items-justified-right": justifyContent === "right",
          "items-justified-space-between": justifyContent === "space-between",
          "items-justified-left": justifyContent === "left",
          "items-justified-center": justifyContent === "center",
          "is-vertical": orientation === "vertical",
          "no-wrap": flexWrap === "nowrap",
          "is-responsive": isResponsive,
          "has-text-color": !!textColor.color || !!textColor?.class,
          [(0, import_block_editor157.getColorClassName)("color", textColor?.slug)]: !!textColor?.slug,
          "has-background": !!backgroundColor.color || backgroundColor.class,
          [(0, import_block_editor157.getColorClassName)(
            "background-color",
            backgroundColor?.slug
          )]: !!backgroundColor?.slug,
          [`has-text-decoration-${textDecoration}`]: textDecoration,
          "block-editor-block-content-overlay": hasBlockOverlay
        },
        layoutClassNames
      ),
      style: {
        color: !textColor?.slug && textColor?.color,
        backgroundColor: !backgroundColor?.slug && backgroundColor?.color
      }
    });
    const onSelectClassicMenu = async (classicMenu) => {
      return convertClassicMenu(classicMenu.id, classicMenu.name, "draft");
    };
    const onSelectNavigationMenu = (menuId) => {
      handleUpdateMenu(menuId);
    };
    (0, import_element80.useEffect)(() => {
      hideNavigationMenuStatusNotice();
      if (isCreatingNavigationMenu) {
        (0, import_a11y3.speak)((0, import_i18n141.__)(`Creating Navigation Menu.`));
      }
      if (createNavigationMenuIsSuccess) {
        handleUpdateMenu(createNavigationMenuPost?.id, {
          focusNavigationBlock: true
        });
        showNavigationMenuStatusNotice(
          (0, import_i18n141.__)(`Navigation Menu successfully created.`)
        );
      }
      if (createNavigationMenuIsError) {
        showNavigationMenuStatusNotice(
          (0, import_i18n141.__)("Failed to create Navigation Menu.")
        );
      }
    }, [
      createNavigationMenuStatus,
      createNavigationMenuError,
      createNavigationMenuPost?.id,
      createNavigationMenuIsError,
      createNavigationMenuIsSuccess,
      isCreatingNavigationMenu,
      handleUpdateMenu,
      hideNavigationMenuStatusNotice,
      showNavigationMenuStatusNotice
    ]);
    (0, import_element80.useEffect)(() => {
      hideClassicMenuConversionNotice();
      if (classicMenuConversionStatus === CLASSIC_MENU_CONVERSION_PENDING) {
        (0, import_a11y3.speak)((0, import_i18n141.__)("Classic menu importing."));
      }
      if (classicMenuConversionStatus === CLASSIC_MENU_CONVERSION_SUCCESS) {
        showClassicMenuConversionNotice(
          (0, import_i18n141.__)("Classic menu imported successfully.")
        );
        handleUpdateMenu(createNavigationMenuPost?.id, {
          focusNavigationBlock: true
        });
      }
      if (classicMenuConversionStatus === CLASSIC_MENU_CONVERSION_ERROR) {
        showClassicMenuConversionNotice(
          (0, import_i18n141.__)("Classic menu import failed.")
        );
      }
    }, [
      classicMenuConversionStatus,
      classicMenuConversionError,
      hideClassicMenuConversionNotice,
      showClassicMenuConversionNotice,
      createNavigationMenuPost?.id,
      handleUpdateMenu
    ]);
    (0, import_element80.useEffect)(() => {
      if (!isSelected && !isInnerBlockSelected) {
        hideNavigationMenuPermissionsNotice();
      }
      if (isSelected || isInnerBlockSelected) {
        if (ref && !navMenuResolvedButMissing && hasResolvedCanUserUpdateNavigationMenu && !canUserUpdateNavigationMenu) {
          showNavigationMenuPermissionsNotice(
            (0, import_i18n141.__)(
              "You do not have permission to edit this Menu. Any changes made will not be saved."
            )
          );
        }
        if (!ref && hasResolvedCanUserCreateNavigationMenus && !canUserCreateNavigationMenus) {
          showNavigationMenuPermissionsNotice(
            (0, import_i18n141.__)(
              "You do not have permission to create Navigation Menus."
            )
          );
        }
      }
    }, [
      isSelected,
      isInnerBlockSelected,
      canUserUpdateNavigationMenu,
      hasResolvedCanUserUpdateNavigationMenu,
      canUserCreateNavigationMenus,
      hasResolvedCanUserCreateNavigationMenus,
      ref,
      hideNavigationMenuPermissionsNotice,
      showNavigationMenuPermissionsNotice,
      navMenuResolvedButMissing
    ]);
    const hasManagePermissions = canUserCreateNavigationMenus || canUserUpdateNavigationMenu;
    const overlayMenuPreviewClasses = clsx_default(
      "wp-block-navigation__overlay-menu-preview",
      { open: overlayMenuPreview }
    );
    const submenuAccessibilityNotice = !showSubmenuIcon && submenuVisibility !== "click" && submenuVisibility !== "always" ? (0, import_i18n141.__)(
      'The current menu options offer reduced accessibility for users and are not recommended. Enabling either "Open on Click" or "Show arrow" offers enhanced accessibility by allowing keyboard users to browse submenus selectively.'
    ) : "";
    const isFirstRender = (0, import_element80.useRef)(true);
    (0, import_element80.useEffect)(() => {
      if (!isFirstRender.current && submenuAccessibilityNotice) {
        (0, import_a11y3.speak)(submenuAccessibilityNotice);
      }
      isFirstRender.current = false;
    }, [submenuAccessibilityNotice]);
    const overlayMenuPreviewId = (0, import_compose35.useInstanceId)(
      OverlayMenuPreview,
      `overlay-menu-preview`
    );
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const stylingInspectorControls = /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)(import_jsx_runtime332.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(import_block_editor157.InspectorControls, { children: hasSubmenus && /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
        import_components93.__experimentalToolsPanel,
        {
          label: (0, import_i18n141.__)("Display"),
          resetAll: () => {
            setAttributes({
              showSubmenuIcon: true,
              submenuVisibility: "hover",
              overlayMenu: "mobile",
              hasIcon: true,
              icon: "handle"
            });
          },
          dropdownMenuProps,
          children: hasSubmenus && /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)(import_jsx_runtime332.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime332.jsx)("h3", { className: "wp-block-navigation__submenu-header", children: (0, import_i18n141.__)("Submenus") }),
            /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
              import_components93.__experimentalToolsPanelItem,
              {
                hasValue: () => submenuVisibility !== "hover",
                label: (0, import_i18n141.__)("Submenu Visibility"),
                onDeselect: () => setAttributes({
                  submenuVisibility: "hover"
                }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)(
                  import_components93.__experimentalToggleGroupControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n141.__)("Submenu Visibility"),
                    value: submenuVisibility,
                    onChange: (value) => {
                      const newAttributes = {
                        submenuVisibility: value
                      };
                      const prevSubmenuVisibility = submenuVisibility;
                      if (value === "always") {
                        newAttributes.showSubmenuIcon = false;
                      } else if (value === "click" || prevSubmenuVisibility === "always") {
                        newAttributes.showSubmenuIcon = true;
                      }
                      setAttributes(newAttributes);
                    },
                    isBlock: true,
                    children: [
                      /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
                        import_components93.__experimentalToggleGroupControlOption,
                        {
                          value: "hover",
                          label: (0, import_i18n141.__)("Hover")
                        }
                      ),
                      /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
                        import_components93.__experimentalToggleGroupControlOption,
                        {
                          value: "click",
                          label: (0, import_i18n141.__)("Click")
                        }
                      ),
                      orientation === "vertical" && /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
                        import_components93.__experimentalToggleGroupControlOption,
                        {
                          value: "always",
                          label: (0, import_i18n141.__)("Always")
                        }
                      )
                    ]
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
              import_components93.__experimentalToolsPanelItem,
              {
                hasValue: () => !showSubmenuIcon,
                label: (0, import_i18n141.__)("Show arrow"),
                onDeselect: () => setAttributes({
                  showSubmenuIcon: true
                }),
                isDisabled: submenuVisibility === "click" || submenuVisibility === "always",
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
                  import_components93.ToggleControl,
                  {
                    checked: showSubmenuIcon,
                    onChange: (value) => {
                      setAttributes({
                        showSubmenuIcon: value
                      });
                    },
                    disabled: submenuVisibility === "click" || submenuVisibility === "always",
                    label: (0, import_i18n141.__)("Show arrow")
                  }
                )
              }
            ),
            submenuAccessibilityNotice && /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
              import_components93.Notice,
              {
                spokenMessage: null,
                status: "warning",
                isDismissible: false,
                className: "wp-block-navigation__submenu-accessibility-notice",
                children: submenuAccessibilityNotice
              }
            )
          ] })
        }
      ) }),
      !isWithinOverlay && /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(import_block_editor157.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
        OverlayPanel,
        {
          overlayMenu,
          overlay,
          setAttributes,
          onNavigateToEntityRecord,
          overlayMenuPreview,
          setOverlayMenuPreview,
          hasIcon,
          icon: icon4,
          overlayMenuPreviewClasses,
          overlayMenuPreviewId,
          isResponsive,
          currentTheme,
          hasOverlays
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(import_block_editor157.InspectorControls, { group: "color", children: /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
        ColorTools,
        {
          textColor,
          setTextColor,
          backgroundColor,
          setBackgroundColor,
          overlayTextColor,
          setOverlayTextColor,
          overlayBackgroundColor,
          setOverlayBackgroundColor,
          clientId,
          navRef,
          hasCustomOverlay: !!overlay
        }
      ) })
    ] });
    const accessibleDescriptionId = `${clientId}-desc`;
    const isHiddenByDefault = "always" === overlayMenu;
    const isManageMenusButtonDisabled = !hasManagePermissions || !hasResolvedNavigationMenus;
    if (hasUnsavedBlocks && !isCreatingNavigationMenu) {
      return /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)(import_jsx_runtime332.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
          menu_inspector_controls_default,
          {
            clientId,
            createNavigationMenuIsSuccess,
            createNavigationMenuIsError,
            currentMenuId: ref,
            isNavigationMenuMissing,
            isManageMenusButtonDisabled,
            onCreateNew: createUntitledEmptyNavigationMenu,
            onSelectClassicMenu,
            onSelectNavigationMenu,
            isLoading,
            blockEditingMode
          }
        ),
        blockEditingMode === "default" && stylingInspectorControls,
        /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)(
          TagName2,
          {
            ...blockProps,
            "aria-describedby": !isPlaceholder ? accessibleDescriptionId : void 0,
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(AccessibleDescription, { id: accessibleDescriptionId, children: (0, import_i18n141.__)("Unsaved Navigation Menu.") }),
              /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
                ResponsiveWrapper,
                {
                  id: clientId,
                  onToggle: setResponsiveMenuVisibility,
                  isOpen: isResponsiveMenuOpen,
                  hasIcon,
                  icon: icon4,
                  isResponsive,
                  isHiddenByDefault,
                  overlayBackgroundColor,
                  overlayTextColor,
                  overlay,
                  onNavigateToEntityRecord,
                  children: /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
                    UnsavedInnerBlocks,
                    {
                      createNavigationMenu,
                      blocks: uncontrolledInnerBlocks,
                      hasSelection: isSelected || isInnerBlockSelected
                    }
                  )
                }
              )
            ]
          }
        )
      ] });
    }
    if (ref && isNavigationMenuMissing) {
      return /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)(import_jsx_runtime332.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
          menu_inspector_controls_default,
          {
            clientId,
            createNavigationMenuIsSuccess,
            createNavigationMenuIsError,
            currentMenuId: ref,
            isNavigationMenuMissing,
            isManageMenusButtonDisabled,
            onCreateNew: createUntitledEmptyNavigationMenu,
            onSelectClassicMenu,
            onSelectNavigationMenu,
            isLoading,
            blockEditingMode
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
          deleted_navigation_warning_default,
          {
            onCreateNew: createUntitledEmptyNavigationMenu
          }
        ) })
      ] });
    }
    if (isEntityAvailable && hasAlreadyRendered) {
      return /* @__PURE__ */ (0, import_jsx_runtime332.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(import_block_editor157.Warning, { children: (0, import_i18n141.__)("Block cannot be rendered inside itself.") }) });
    }
    const PlaceholderComponent = CustomPlaceholder ? CustomPlaceholder : NavigationPlaceholder;
    if (isPlaceholder && CustomPlaceholder) {
      return /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
        PlaceholderComponent,
        {
          isSelected,
          currentMenuId: ref,
          clientId,
          canUserCreateNavigationMenus,
          isResolvingCanUserCreateNavigationMenus,
          onSelectNavigationMenu,
          onSelectClassicMenu,
          onCreateEmpty: createUntitledEmptyNavigationMenu
        }
      ) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)(import_jsx_runtime332.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
        menu_inspector_controls_default,
        {
          clientId,
          createNavigationMenuIsSuccess,
          createNavigationMenuIsError,
          currentMenuId: ref,
          isNavigationMenuMissing,
          isManageMenusButtonDisabled,
          onCreateNew: createUntitledEmptyNavigationMenu,
          onSelectClassicMenu,
          onSelectNavigationMenu,
          isLoading,
          blockEditingMode
        }
      ),
      blockEditingMode === "default" && stylingInspectorControls,
      /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(import_core_data49.EntityProvider, { kind: "postType", type: "wp_navigation", id: ref, children: /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)(import_block_editor157.RecursionProvider, { uniqueId: recursionId, children: [
        blockEditingMode === "contentOnly" && isEntityAvailable && /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(NavigationAddPageButton, { clientId }),
        blockEditingMode === "default" && isEntityAvailable && /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)(import_block_editor157.InspectorControls, { group: "advanced", children: [
          hasResolvedCanUserUpdateNavigationMenu && canUserUpdateNavigationMenu && /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(NavigationMenuNameControl, {}),
          hasResolvedCanUserDeleteNavigationMenu && canUserDeleteNavigationMenu && /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
            NavigationMenuDeleteControl,
            {
              onDelete: () => {
                replaceInnerBlocks(clientId, []);
                showNavigationMenuStatusNotice(
                  (0, import_i18n141.__)(
                    "Navigation Menu successfully deleted."
                  )
                );
              }
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
            manage_menus_button_default,
            {
              disabled: isManageMenusButtonDisabled,
              className: "wp-block-navigation-manage-menus-button"
            }
          )
        ] }),
        /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)(
          TagName2,
          {
            ...blockProps,
            "aria-describedby": !isPlaceholder && !isLoading ? accessibleDescriptionId : void 0,
            children: [
              isLoading && !isHiddenByDefault && /* @__PURE__ */ (0, import_jsx_runtime332.jsx)("div", { className: "wp-block-navigation__loading-indicator-container", children: /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(import_components93.Spinner, { className: "wp-block-navigation__loading-indicator" }) }),
              (!isLoading || isHiddenByDefault) && /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)(import_jsx_runtime332.Fragment, { children: [
                /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
                  AccessibleMenuDescription,
                  {
                    id: accessibleDescriptionId
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
                  ResponsiveWrapper,
                  {
                    id: clientId,
                    onToggle: setResponsiveMenuVisibility,
                    hasIcon,
                    icon: icon4,
                    isOpen: isResponsiveMenuOpen,
                    isResponsive,
                    isHiddenByDefault,
                    overlayBackgroundColor,
                    overlayTextColor,
                    overlay,
                    onNavigateToEntityRecord,
                    children: isEntityAvailable && /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
                      NavigationInnerBlocks,
                      {
                        clientId,
                        hasCustomPlaceholder: !!CustomPlaceholder,
                        templateLock,
                        orientation
                      }
                    )
                  }
                )
              ] })
            ]
          }
        )
      ] }) })
    ] });
  }
  var edit_default20 = (0, import_block_editor157.withColors)(
    { textColor: "color" },
    { backgroundColor: "color" },
    { overlayBackgroundColor: "color" },
    { overlayTextColor: "color" }
  )(Navigation);

  // packages/block-library/build-module/navigation/save.mjs
  var import_block_editor158 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime333 = __toESM(require_jsx_runtime(), 1);
  function save33({ attributes: attributes2 }) {
    if (attributes2.ref) {
      return;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(import_block_editor158.InnerBlocks.Content, {});
  }

  // packages/block-library/build-module/navigation/deprecated.mjs
  var import_block_editor159 = __toESM(require_block_editor(), 1);
  var import_compose36 = __toESM(require_compose(), 1);
  var import_jsx_runtime334 = __toESM(require_jsx_runtime(), 1);
  var TYPOGRAPHY_PRESET_DEPRECATION_MAP = {
    fontStyle: "var:preset|font-style|",
    fontWeight: "var:preset|font-weight|",
    textDecoration: "var:preset|text-decoration|",
    textTransform: "var:preset|text-transform|"
  };
  var migrateIdToRef = ({ navigationMenuId, ...attributes2 }) => {
    return {
      ...attributes2,
      ref: navigationMenuId
    };
  };
  var migrateWithLayout2 = (attributes2) => {
    if (!!attributes2.layout) {
      return attributes2;
    }
    const { itemsJustification, orientation, ...updatedAttributes } = attributes2;
    if (itemsJustification || orientation) {
      Object.assign(updatedAttributes, {
        layout: {
          type: "flex",
          ...itemsJustification && {
            justifyContent: itemsJustification
          },
          ...orientation && { orientation }
        }
      });
    }
    return updatedAttributes;
  };
  var migrateOpenSubmenusOnClick = (attributes2) => {
    const { openSubmenusOnClick, ...restAttributes } = attributes2;
    if (openSubmenusOnClick === null || openSubmenusOnClick === void 0) {
      return attributes2;
    }
    return {
      ...restAttributes,
      submenuVisibility: restAttributes.submenuVisibility ?? (openSubmenusOnClick ? "click" : "hover")
    };
  };
  var v75 = {
    attributes: {
      ref: {
        type: "number"
      },
      textColor: {
        type: "string"
      },
      customTextColor: {
        type: "string"
      },
      rgbTextColor: {
        type: "string"
      },
      backgroundColor: {
        type: "string"
      },
      customBackgroundColor: {
        type: "string"
      },
      rgbBackgroundColor: {
        type: "string"
      },
      showSubmenuIcon: {
        type: "boolean",
        default: true
      },
      openSubmenusOnClick: {
        type: "boolean",
        default: false
      },
      overlayMenu: {
        type: "string",
        default: "mobile"
      },
      icon: {
        type: "string",
        default: "handle"
      },
      hasIcon: {
        type: "boolean",
        default: true
      },
      __unstableLocation: {
        type: "string"
      },
      overlayBackgroundColor: {
        type: "string"
      },
      customOverlayBackgroundColor: {
        type: "string"
      },
      overlayTextColor: {
        type: "string"
      },
      customOverlayTextColor: {
        type: "string"
      },
      maxNestingLevel: {
        type: "number",
        default: 5
      },
      templateLock: {
        type: ["string", "boolean"],
        enum: ["all", "insert", "contentOnly", false]
      }
    },
    supports: {
      align: ["wide", "full"],
      anchor: true,
      html: false,
      inserter: true,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalTextTransform: true,
        __experimentalFontFamily: true,
        __experimentalLetterSpacing: true,
        __experimentalTextDecoration: true,
        __experimentalSkipSerialization: ["textDecoration"],
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      spacing: {
        blockGap: true,
        units: ["px", "em", "rem", "vh", "vw"],
        __experimentalDefaultControls: {
          blockGap: true
        }
      },
      layout: {
        allowSwitching: false,
        allowInheriting: false,
        allowVerticalAlignment: false,
        allowSizingOnChildren: true,
        default: {
          type: "flex"
        }
      },
      interactivity: true,
      renaming: false
    },
    save() {
      return /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(import_block_editor159.InnerBlocks.Content, {});
    },
    isEligible: ({ openSubmenusOnClick }) => openSubmenusOnClick !== null && openSubmenusOnClick !== void 0,
    migrate: migrateOpenSubmenusOnClick
  };
  var v66 = {
    attributes: {
      navigationMenuId: {
        type: "number"
      },
      textColor: {
        type: "string"
      },
      customTextColor: {
        type: "string"
      },
      rgbTextColor: {
        type: "string"
      },
      backgroundColor: {
        type: "string"
      },
      customBackgroundColor: {
        type: "string"
      },
      rgbBackgroundColor: {
        type: "string"
      },
      showSubmenuIcon: {
        type: "boolean",
        default: true
      },
      overlayMenu: {
        type: "string",
        default: "mobile"
      },
      __unstableLocation: {
        type: "string"
      },
      overlayBackgroundColor: {
        type: "string"
      },
      customOverlayBackgroundColor: {
        type: "string"
      },
      overlayTextColor: {
        type: "string"
      },
      customOverlayTextColor: {
        type: "string"
      }
    },
    supports: {
      align: ["wide", "full"],
      anchor: true,
      html: false,
      inserter: true,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalTextTransform: true,
        __experimentalFontFamily: true,
        __experimentalTextDecoration: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      spacing: {
        blockGap: true,
        units: ["px", "em", "rem", "vh", "vw"],
        __experimentalDefaultControls: {
          blockGap: true
        }
      },
      layout: {
        allowSwitching: false,
        allowInheriting: false,
        default: {
          type: "flex"
        }
      }
    },
    save() {
      return /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(import_block_editor159.InnerBlocks.Content, {});
    },
    isEligible: ({ navigationMenuId }) => !!navigationMenuId,
    migrate: migrateIdToRef
  };
  var v56 = {
    attributes: {
      navigationMenuId: {
        type: "number"
      },
      orientation: {
        type: "string",
        default: "horizontal"
      },
      textColor: {
        type: "string"
      },
      customTextColor: {
        type: "string"
      },
      rgbTextColor: {
        type: "string"
      },
      backgroundColor: {
        type: "string"
      },
      customBackgroundColor: {
        type: "string"
      },
      rgbBackgroundColor: {
        type: "string"
      },
      itemsJustification: {
        type: "string"
      },
      showSubmenuIcon: {
        type: "boolean",
        default: true
      },
      openSubmenusOnClick: {
        type: "boolean",
        default: false
      },
      overlayMenu: {
        type: "string",
        default: "never"
      },
      __unstableLocation: {
        type: "string"
      },
      overlayBackgroundColor: {
        type: "string"
      },
      customOverlayBackgroundColor: {
        type: "string"
      },
      overlayTextColor: {
        type: "string"
      },
      customOverlayTextColor: {
        type: "string"
      }
    },
    supports: {
      align: ["wide", "full"],
      anchor: true,
      html: false,
      inserter: true,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalTextTransform: true,
        __experimentalFontFamily: true,
        __experimentalTextDecoration: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      spacing: {
        blockGap: true,
        units: ["px", "em", "rem", "vh", "vw"],
        __experimentalDefaultControls: {
          blockGap: true
        }
      }
    },
    save() {
      return /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(import_block_editor159.InnerBlocks.Content, {});
    },
    isEligible: ({ itemsJustification, orientation }) => !!itemsJustification || !!orientation,
    migrate: (0, import_compose36.compose)(
      migrateIdToRef,
      migrateWithLayout2,
      migrateOpenSubmenusOnClick
    )
  };
  var v46 = {
    attributes: {
      orientation: {
        type: "string",
        default: "horizontal"
      },
      textColor: {
        type: "string"
      },
      customTextColor: {
        type: "string"
      },
      rgbTextColor: {
        type: "string"
      },
      backgroundColor: {
        type: "string"
      },
      customBackgroundColor: {
        type: "string"
      },
      rgbBackgroundColor: {
        type: "string"
      },
      itemsJustification: {
        type: "string"
      },
      showSubmenuIcon: {
        type: "boolean",
        default: true
      },
      openSubmenusOnClick: {
        type: "boolean",
        default: false
      },
      overlayMenu: {
        type: "string",
        default: "never"
      },
      __unstableLocation: {
        type: "string"
      },
      overlayBackgroundColor: {
        type: "string"
      },
      customOverlayBackgroundColor: {
        type: "string"
      },
      overlayTextColor: {
        type: "string"
      },
      customOverlayTextColor: {
        type: "string"
      }
    },
    supports: {
      align: ["wide", "full"],
      anchor: true,
      html: false,
      inserter: true,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalTextTransform: true,
        __experimentalFontFamily: true,
        __experimentalTextDecoration: true
      },
      spacing: {
        blockGap: true,
        units: ["px", "em", "rem", "vh", "vw"],
        __experimentalDefaultControls: {
          blockGap: true
        }
      }
    },
    save() {
      return /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(import_block_editor159.InnerBlocks.Content, {});
    },
    migrate: (0, import_compose36.compose)(
      migrateIdToRef,
      migrateWithLayout2,
      migrate_font_family_default,
      migrateOpenSubmenusOnClick
    ),
    isEligible({ style: style2 }) {
      return style2?.typography?.fontFamily;
    }
  };
  var migrateIsResponsive = function(attributes2) {
    delete attributes2.isResponsive;
    return {
      ...attributes2,
      overlayMenu: "mobile"
    };
  };
  var migrateTypographyPresets = function(attributes2) {
    return {
      ...attributes2,
      style: {
        ...attributes2.style,
        typography: Object.fromEntries(
          Object.entries(attributes2.style.typography ?? {}).map(
            ([key, value]) => {
              const prefix = TYPOGRAPHY_PRESET_DEPRECATION_MAP[key];
              if (prefix && value.startsWith(prefix)) {
                const newValue = value.slice(prefix.length);
                if ("textDecoration" === key && "strikethrough" === newValue) {
                  return [key, "line-through"];
                }
                return [key, newValue];
              }
              return [key, value];
            }
          )
        )
      }
    };
  };
  var deprecated11 = [
    v75,
    v66,
    v56,
    v46,
    // Remove `isResponsive` attribute.
    {
      attributes: {
        orientation: {
          type: "string",
          default: "horizontal"
        },
        textColor: {
          type: "string"
        },
        customTextColor: {
          type: "string"
        },
        rgbTextColor: {
          type: "string"
        },
        backgroundColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        },
        rgbBackgroundColor: {
          type: "string"
        },
        itemsJustification: {
          type: "string"
        },
        showSubmenuIcon: {
          type: "boolean",
          default: true
        },
        openSubmenusOnClick: {
          type: "boolean",
          default: false
        },
        isResponsive: {
          type: "boolean",
          default: "false"
        },
        __unstableLocation: {
          type: "string"
        },
        overlayBackgroundColor: {
          type: "string"
        },
        customOverlayBackgroundColor: {
          type: "string"
        },
        overlayTextColor: {
          type: "string"
        },
        customOverlayTextColor: {
          type: "string"
        }
      },
      supports: {
        align: ["wide", "full"],
        anchor: true,
        html: false,
        inserter: true,
        typography: {
          fontSize: true,
          lineHeight: true,
          __experimentalFontStyle: true,
          __experimentalFontWeight: true,
          __experimentalTextTransform: true,
          __experimentalFontFamily: true,
          __experimentalTextDecoration: true
        }
      },
      isEligible(attributes2) {
        return attributes2.isResponsive;
      },
      migrate: (0, import_compose36.compose)(
        migrateIdToRef,
        migrateWithLayout2,
        migrate_font_family_default,
        migrateIsResponsive,
        migrateOpenSubmenusOnClick
      ),
      save() {
        return /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(import_block_editor159.InnerBlocks.Content, {});
      }
    },
    {
      attributes: {
        orientation: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        customTextColor: {
          type: "string"
        },
        rgbTextColor: {
          type: "string"
        },
        backgroundColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        },
        rgbBackgroundColor: {
          type: "string"
        },
        itemsJustification: {
          type: "string"
        },
        showSubmenuIcon: {
          type: "boolean",
          default: true
        }
      },
      supports: {
        align: ["wide", "full"],
        anchor: true,
        html: false,
        inserter: true,
        fontSize: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalTextTransform: true,
        color: true,
        __experimentalFontFamily: true,
        __experimentalTextDecoration: true
      },
      save() {
        return /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(import_block_editor159.InnerBlocks.Content, {});
      },
      isEligible(attributes2) {
        if (!attributes2.style || !attributes2.style.typography) {
          return false;
        }
        for (const styleAttribute in TYPOGRAPHY_PRESET_DEPRECATION_MAP) {
          const attributeValue = attributes2.style.typography[styleAttribute];
          if (attributeValue && attributeValue.startsWith(
            TYPOGRAPHY_PRESET_DEPRECATION_MAP[styleAttribute]
          )) {
            return true;
          }
        }
        return false;
      },
      migrate: (0, import_compose36.compose)(
        migrateIdToRef,
        migrateWithLayout2,
        migrate_font_family_default,
        migrateTypographyPresets
      )
    },
    {
      attributes: {
        className: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        rgbTextColor: {
          type: "string"
        },
        backgroundColor: {
          type: "string"
        },
        rgbBackgroundColor: {
          type: "string"
        },
        fontSize: {
          type: "string"
        },
        customFontSize: {
          type: "number"
        },
        itemsJustification: {
          type: "string"
        },
        showSubmenuIcon: {
          type: "boolean"
        }
      },
      isEligible(attribute) {
        return attribute.rgbTextColor || attribute.rgbBackgroundColor;
      },
      supports: {
        align: ["wide", "full"],
        anchor: true,
        html: false,
        inserter: true
      },
      migrate: (0, import_compose36.compose)(migrateIdToRef, (attributes2) => {
        const { rgbTextColor, rgbBackgroundColor, ...restAttributes } = attributes2;
        return {
          ...restAttributes,
          customTextColor: attributes2.textColor ? void 0 : attributes2.rgbTextColor,
          customBackgroundColor: attributes2.backgroundColor ? void 0 : attributes2.rgbBackgroundColor
        };
      }),
      save() {
        return /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(import_block_editor159.InnerBlocks.Content, {});
      }
    }
  ];
  var deprecated_default28 = deprecated11;

  // packages/block-library/build-module/navigation/index.mjs
  var { name: name54 } = block_default54;
  var settings54 = {
    icon: navigation_default,
    example: {
      attributes: {
        overlayMenu: "never"
      },
      innerBlocks: [
        {
          name: "core/navigation-link",
          attributes: {
            // translators: 'Home' as in a website's home page.
            label: (0, import_i18n142.__)("Home"),
            url: "https://make.wordpress.org/"
          }
        },
        {
          name: "core/navigation-link",
          attributes: {
            // translators: 'About' as in a website's about page.
            label: (0, import_i18n142.__)("About"),
            url: "https://make.wordpress.org/"
          }
        },
        {
          name: "core/navigation-link",
          attributes: {
            // translators: 'Contact' as in a website's contact page.
            label: (0, import_i18n142.__)("Contact"),
            url: "https://make.wordpress.org/"
          }
        }
      ]
    },
    edit: edit_default20,
    save: save33,
    __experimentalLabel: ({ ref }) => {
      if (!ref) {
        return;
      }
      const navigation = (0, import_data87.select)(import_core_data50.store).getEditedEntityRecord(
        "postType",
        "wp_navigation",
        ref
      );
      if (!navigation?.title) {
        return;
      }
      return (0, import_html_entities7.decodeEntities)(navigation.title);
    },
    deprecated: deprecated_default28
  };
  var init54 = () => initBlock({ name: name54, metadata: block_default54, settings: settings54 });

  // packages/block-library/build-module/navigation-link/index.mjs
  var navigation_link_exports = {};
  __export(navigation_link_exports, {
    init: () => init55,
    metadata: () => block_default55,
    name: () => name55,
    settings: () => settings55
  });
  var import_i18n144 = __toESM(require_i18n(), 1);
  var import_block_editor162 = __toESM(require_block_editor(), 1);
  var import_hooks43 = __toESM(require_hooks(), 1);
  var import_blocks65 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/navigation-link/block.json
  var block_default55 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/navigation-link",
    title: "Custom Link",
    category: "design",
    parent: ["core/navigation"],
    allowedBlocks: [
      "core/navigation-link",
      "core/navigation-submenu",
      "core/page-list"
    ],
    description: "Add a page, link, or another item to your navigation.",
    textdomain: "default",
    attributes: {
      label: {
        type: "string",
        role: "content"
      },
      type: {
        type: "string"
      },
      description: {
        type: "string"
      },
      rel: {
        type: "string"
      },
      id: {
        type: "number"
      },
      opensInNewTab: {
        type: "boolean",
        default: false
      },
      url: {
        type: "string",
        role: "content"
      },
      title: {
        type: "string"
      },
      kind: {
        type: "string"
      },
      isTopLevelLink: {
        type: "boolean"
      }
    },
    usesContext: [
      "textColor",
      "customTextColor",
      "backgroundColor",
      "customBackgroundColor",
      "overlayTextColor",
      "customOverlayTextColor",
      "overlayBackgroundColor",
      "customOverlayBackgroundColor",
      "fontSize",
      "customFontSize",
      "showSubmenuIcon",
      "maxNestingLevel",
      "style"
    ],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      __experimentalSlashInserter: true,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      renaming: false,
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-navigation-link-editor",
    style: "wp-block-navigation-link"
  };

  // packages/block-library/build-module/navigation-link/edit.mjs
  var import_blocks63 = __toESM(require_blocks(), 1);
  var import_data88 = __toESM(require_data(), 1);
  var import_components94 = __toESM(require_components(), 1);
  var import_keycodes5 = __toESM(require_keycodes(), 1);
  var import_i18n143 = __toESM(require_i18n(), 1);
  var import_block_editor160 = __toESM(require_block_editor(), 1);
  var import_url15 = __toESM(require_url(), 1);
  var import_element81 = __toESM(require_element(), 1);
  var import_compose37 = __toESM(require_compose(), 1);
  var import_jsx_runtime335 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_BLOCK6 = { name: "core/navigation-link" };
  var NESTING_BLOCK_NAMES = [
    "core/navigation-link",
    "core/navigation-submenu"
  ];
  function getMissingText(type) {
    let missingText = "";
    switch (type) {
      case "post":
        missingText = (0, import_i18n143.__)("Select post");
        break;
      case "page":
        missingText = (0, import_i18n143.__)("Select page");
        break;
      case "category":
        missingText = (0, import_i18n143.__)("Select category");
        break;
      case "tag":
        missingText = (0, import_i18n143.__)("Select tag");
        break;
      default:
        missingText = (0, import_i18n143.__)("Add link");
    }
    return missingText;
  }
  function NavigationLinkEdit({
    attributes: attributes2,
    isSelected,
    setAttributes,
    insertBlocksAfter,
    mergeBlocks,
    onReplace,
    context,
    clientId
  }) {
    const { id, label, type, url, description, kind, metadata } = attributes2;
    const { maxNestingLevel } = context;
    const {
      replaceBlock,
      __unstableMarkNextChangeAsNotPersistent,
      selectBlock
    } = (0, import_data88.useDispatch)(import_block_editor160.store);
    const [isLinkOpen, setIsLinkOpen] = (0, import_element81.useState)(isSelected && !url);
    const [popoverAnchor, setPopoverAnchor] = (0, import_element81.useState)(null);
    const listItemRef = (0, import_element81.useRef)(null);
    const isDraggingWithin = useIsDraggingWithin(listItemRef);
    const itemLabelPlaceholder = (0, import_i18n143.__)("Add label\u2026");
    const ref = (0, import_element81.useRef)();
    const linkUIref = (0, import_element81.useRef)();
    const isNewLink = (0, import_element81.useRef)(label === void 0);
    const shouldSelectSubmenuAppenderOnClose = (0, import_element81.useRef)(false);
    const {
      isAtMaxNesting,
      isTopLevelLink,
      isParentOfSelectedBlock,
      hasChildren,
      parentBlockClientId,
      isSubmenu
    } = (0, import_data88.useSelect)(
      (select9) => {
        const {
          getBlockCount,
          getBlockName,
          getBlockRootClientId,
          hasSelectedInnerBlock,
          getBlockParentsByBlockName
        } = select9(import_block_editor160.store);
        const rootClientId = getBlockRootClientId(clientId);
        const parentBlockName = getBlockName(rootClientId);
        const isTopLevel = parentBlockName === "core/navigation";
        const rootNavigationClientId = isTopLevel ? rootClientId : getBlockParentsByBlockName(
          clientId,
          "core/navigation"
        )[0];
        const parentBlockId = parentBlockName === "core/navigation-submenu" ? rootClientId : rootNavigationClientId;
        return {
          isAtMaxNesting: getBlockParentsByBlockName(clientId, NESTING_BLOCK_NAMES).length >= maxNestingLevel,
          isTopLevelLink: isTopLevel,
          isParentOfSelectedBlock: hasSelectedInnerBlock(
            clientId,
            true
          ),
          hasChildren: !!getBlockCount(clientId),
          parentBlockClientId: parentBlockId,
          isSubmenu: parentBlockName === "core/navigation-submenu"
        };
      },
      [clientId, maxNestingLevel]
    );
    const validateLinkStatus = useEnableLinkStatusValidation(clientId);
    const { getBlocks } = (0, import_data88.useSelect)(import_block_editor160.store);
    const { hasUrlBinding, isBoundEntityAvailable, entityRecord } = useEntityBinding({
      clientId,
      attributes: attributes2
    });
    const handleLinkChange = useHandleLinkChange({
      clientId,
      attributes: attributes2,
      setAttributes,
      allowTextUpdate: true
    });
    const [isInvalid, isDraft] = useIsInvalidLink(
      kind,
      type,
      id,
      validateLinkStatus
    );
    const transformToSubmenu = (0, import_element81.useCallback)(() => {
      let innerBlocks = getBlocks(clientId);
      if (innerBlocks.length === 0) {
        innerBlocks = [(0, import_blocks63.createBlock)("core/navigation-link")];
        selectBlock(innerBlocks[0].clientId);
      }
      const newSubmenu = (0, import_blocks63.createBlock)(
        "core/navigation-submenu",
        attributes2,
        innerBlocks
      );
      replaceBlock(clientId, newSubmenu);
    }, [getBlocks, clientId, selectBlock, replaceBlock, attributes2]);
    (0, import_element81.useEffect)(() => {
      if (isNewLink.current && isSelected) {
        selectBlock(parentBlockClientId);
      }
    }, []);
    (0, import_element81.useEffect)(() => {
      if (hasChildren) {
        __unstableMarkNextChangeAsNotPersistent();
        transformToSubmenu();
      }
    }, [
      hasChildren,
      __unstableMarkNextChangeAsNotPersistent,
      transformToSubmenu
    ]);
    (0, import_element81.useEffect)(() => {
      if (!isNewLink.current || !url || !isLinkOpen) {
        return;
      }
      isNewLink.current = false;
      if ((0, import_url15.isURL)((0, import_url15.prependHTTP)(label)) && /^.+\.[a-z]+/.test(label)) {
        selectLabelText(ref);
      } else {
        selectBlock(clientId, null);
        if (isSubmenu) {
          const parentBlocks = getBlocks(parentBlockClientId);
          if (parentBlocks.length === 1 && parentBlocks[0].clientId === clientId) {
            shouldSelectSubmenuAppenderOnClose.current = true;
          }
        }
      }
    }, [url, isLinkOpen, isNewLink, label]);
    function removeLink() {
      setAttributes({
        url: void 0,
        label: void 0,
        id: void 0,
        kind: void 0,
        type: void 0,
        opensInNewTab: false
      });
      setIsLinkOpen(false);
    }
    const {
      textColor,
      customTextColor,
      backgroundColor,
      customBackgroundColor
    } = getColors(context, !isTopLevelLink);
    function onKeyDown(event) {
      if (import_keycodes5.isKeyboardEvent.primary(event, "k")) {
        event.preventDefault();
        event.stopPropagation();
        setIsLinkOpen(true);
      }
    }
    const instanceId = (0, import_compose37.useInstanceId)(NavigationLinkEdit);
    const hasMissingEntity = hasUrlBinding && !isBoundEntityAvailable;
    const missingEntityDescriptionId = hasMissingEntity ? (0, import_i18n143.sprintf)("navigation-link-edit-%d-desc", instanceId) : void 0;
    const blockProps = (0, import_block_editor160.useBlockProps)({
      ref: (0, import_compose37.useMergeRefs)([setPopoverAnchor, listItemRef]),
      className: clsx_default("wp-block-navigation-item", {
        "is-editing": isSelected || isParentOfSelectedBlock,
        "is-dragging-within": isDraggingWithin,
        "has-link": !!url,
        "has-child": hasChildren,
        "has-text-color": !!textColor || !!customTextColor,
        [(0, import_block_editor160.getColorClassName)("color", textColor)]: !!textColor,
        "has-background": !!backgroundColor || customBackgroundColor,
        [(0, import_block_editor160.getColorClassName)("background-color", backgroundColor)]: !!backgroundColor
      }),
      "aria-describedby": missingEntityDescriptionId,
      "aria-invalid": hasMissingEntity,
      style: {
        color: !textColor && customTextColor,
        backgroundColor: !backgroundColor && customBackgroundColor
      },
      onKeyDown
    });
    const innerBlocksProps = (0, import_block_editor160.useInnerBlocksProps)(
      {
        ...blockProps,
        className: "remove-outline"
        // Remove the outline from the inner blocks container.
      },
      {
        defaultBlock: DEFAULT_BLOCK6,
        directInsert: true,
        renderAppender: false
      }
    );
    const needsValidLink = !url && !(hasUrlBinding && isBoundEntityAvailable) || isInvalid || isDraft || hasUrlBinding && !isBoundEntityAvailable;
    if (needsValidLink) {
      blockProps.onClick = () => {
        setIsLinkOpen(true);
      };
    }
    const classes = clsx_default("wp-block-navigation-item__content", {
      "wp-block-navigation-link__placeholder": needsValidLink
    });
    const missingText = getMissingText(type);
    const invalidLinkHelpText = getInvalidLinkHelpText();
    return /* @__PURE__ */ (0, import_jsx_runtime335.jsxs)(import_jsx_runtime335.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(import_block_editor160.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime335.jsxs)(import_components94.ToolbarGroup, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
          import_components94.ToolbarButton,
          {
            name: "link",
            icon: link_default,
            title: (0, import_i18n143.__)("Link"),
            shortcut: import_keycodes5.displayShortcut.primary("k"),
            onClick: () => {
              setIsLinkOpen(true);
            }
          }
        ),
        !isAtMaxNesting && /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
          import_components94.ToolbarButton,
          {
            name: "submenu",
            icon: add_submenu_default,
            title: (0, import_i18n143.__)("Add submenu"),
            onClick: transformToSubmenu
          }
        )
      ] }) }),
      /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(import_block_editor160.InspectorControls, { group: "content", children: /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
        Controls2,
        {
          attributes: attributes2,
          setAttributes,
          clientId
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime335.jsxs)("div", { ...blockProps, children: [
        hasMissingEntity && /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(import_components94.VisuallyHidden, { id: missingEntityDescriptionId, children: invalidLinkHelpText }),
        /* @__PURE__ */ (0, import_jsx_runtime335.jsxs)("a", { className: classes, children: [
          !url && !metadata?.bindings?.url ? /* @__PURE__ */ (0, import_jsx_runtime335.jsx)("div", { className: "wp-block-navigation-link__placeholder-text", children: /* @__PURE__ */ (0, import_jsx_runtime335.jsx)("span", { children: missingText }) }) : /* @__PURE__ */ (0, import_jsx_runtime335.jsxs)(import_jsx_runtime335.Fragment, { children: [
            !isInvalid && !isDraft && /* @__PURE__ */ (0, import_jsx_runtime335.jsxs)(import_jsx_runtime335.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
                import_block_editor160.RichText,
                {
                  ref,
                  identifier: "label",
                  className: "wp-block-navigation-item__label",
                  value: label,
                  onChange: (labelValue) => setAttributes({
                    label: labelValue
                  }),
                  onMerge: mergeBlocks,
                  onReplace,
                  __unstableOnSplitAtEnd: () => insertBlocksAfter(
                    (0, import_blocks63.createBlock)(
                      "core/navigation-link"
                    )
                  ),
                  "aria-label": (0, import_i18n143.__)(
                    "Navigation link text"
                  ),
                  placeholder: itemLabelPlaceholder,
                  withoutInteractiveFormatting: true
                }
              ),
              description && /* @__PURE__ */ (0, import_jsx_runtime335.jsx)("span", { className: "wp-block-navigation-item__description", children: description })
            ] }),
            (isInvalid || isDraft) && /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
              InvalidDraftDisplay,
              {
                label,
                isInvalid,
                isDraft,
                className: "wp-block-navigation-link__label"
              }
            )
          ] }),
          isLinkOpen && /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
            LinkUI,
            {
              ref: linkUIref,
              clientId,
              link: attributes2,
              entity: {
                entityRecord,
                hasBinding: hasUrlBinding,
                isEntityAvailable: isBoundEntityAvailable
              },
              onClose: () => {
                setIsLinkOpen(false);
                if (!url && !hasUrlBinding) {
                  onReplace([]);
                  return;
                }
                if (shouldSelectSubmenuAppenderOnClose.current) {
                  shouldSelectSubmenuAppenderOnClose.current = false;
                  if (listItemRef.current?.nextElementSibling) {
                    const appenderButton = listItemRef.current.nextElementSibling.querySelector(
                      ".block-editor-button-block-appender"
                    );
                    if (appenderButton) {
                      appenderButton.focus();
                    }
                  }
                }
              },
              anchor: popoverAnchor,
              onRemove: removeLink,
              onChange: handleLinkChange
            }
          )
        ] }),
        /* @__PURE__ */ (0, import_jsx_runtime335.jsx)("div", { ...innerBlocksProps })
      ] })
    ] });
  }

  // packages/block-library/build-module/navigation-link/save.mjs
  var import_block_editor161 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime336 = __toESM(require_jsx_runtime(), 1);
  function save34() {
    return /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(import_block_editor161.InnerBlocks.Content, {});
  }

  // packages/block-library/build-module/navigation-link/hooks.mjs
  function getIcon(variationName) {
    switch (variationName) {
      case "post":
        return post_list_default;
      case "page":
        return page_default;
      case "tag":
        return tag_default;
      case "category":
        return category_default;
      default:
        return custom_post_type_default;
    }
  }
  function enhanceNavigationLinkVariations(settings122, name123) {
    if (name123 !== "core/navigation-link") {
      return settings122;
    }
    if (settings122.variations) {
      const isActive = (blockAttributes8, variationAttributes) => {
        return blockAttributes8.type === variationAttributes.type;
      };
      const variations18 = settings122.variations.map((variation) => {
        return {
          ...variation,
          ...!variation.icon && {
            icon: getIcon(variation.name)
          },
          ...!variation.isActive && {
            isActive
          }
        };
      });
      return {
        ...settings122,
        variations: variations18
      };
    }
    return settings122;
  }

  // packages/block-library/build-module/navigation-link/transforms.mjs
  var import_blocks64 = __toESM(require_blocks(), 1);
  var transforms18 = {
    from: [
      {
        type: "block",
        blocks: ["core/site-logo"],
        transform: () => {
          return (0, import_blocks64.createBlock)("core/navigation-link");
        }
      },
      {
        type: "block",
        blocks: ["core/spacer"],
        transform: () => {
          return (0, import_blocks64.createBlock)("core/navigation-link");
        }
      },
      {
        type: "block",
        blocks: ["core/home-link"],
        transform: () => {
          return (0, import_blocks64.createBlock)("core/navigation-link");
        }
      },
      {
        type: "block",
        blocks: ["core/social-links"],
        transform: () => {
          return (0, import_blocks64.createBlock)("core/navigation-link");
        }
      },
      {
        type: "block",
        blocks: ["core/search"],
        transform: () => {
          return (0, import_blocks64.createBlock)("core/navigation-link");
        }
      },
      {
        type: "block",
        blocks: ["core/page-list"],
        transform: () => {
          return (0, import_blocks64.createBlock)("core/navigation-link");
        }
      },
      {
        type: "block",
        blocks: ["core/buttons"],
        transform: () => {
          return (0, import_blocks64.createBlock)("core/navigation-link");
        }
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/navigation-submenu"],
        transform: (attributes2, innerBlocks) => (0, import_blocks64.createBlock)(
          "core/navigation-submenu",
          attributes2,
          innerBlocks
        )
      },
      {
        type: "block",
        blocks: ["core/spacer"],
        transform: () => {
          return (0, import_blocks64.createBlock)("core/spacer");
        }
      },
      {
        type: "block",
        blocks: ["core/site-logo"],
        transform: () => {
          return (0, import_blocks64.createBlock)("core/site-logo");
        }
      },
      {
        type: "block",
        blocks: ["core/home-link"],
        transform: () => {
          return (0, import_blocks64.createBlock)("core/home-link");
        }
      },
      {
        type: "block",
        blocks: ["core/social-links"],
        transform: () => {
          return (0, import_blocks64.createBlock)("core/social-links");
        }
      },
      {
        type: "block",
        blocks: ["core/search"],
        transform: () => {
          return (0, import_blocks64.createBlock)("core/search", {
            showLabel: false,
            buttonUseIcon: true,
            buttonPosition: "button-inside"
          });
        }
      },
      {
        type: "block",
        blocks: ["core/page-list"],
        transform: () => {
          return (0, import_blocks64.createBlock)("core/page-list");
        }
      },
      {
        type: "block",
        blocks: ["core/buttons"],
        transform: ({ label, url, rel, title, opensInNewTab }) => {
          return (0, import_blocks64.createBlock)("core/buttons", {}, [
            (0, import_blocks64.createBlock)("core/button", {
              text: label,
              url,
              rel,
              title,
              linkTarget: opensInNewTab ? "_blank" : void 0
            })
          ]);
        }
      }
    ]
  };
  var transforms_default19 = transforms18;

  // packages/block-library/build-module/navigation-link/index.mjs
  var import_jsx_runtime337 = __toESM(require_jsx_runtime(), 1);
  var { fieldsKey: fieldsKey12, formKey: formKey12 } = unlock(import_blocks65.privateApis);
  var { name: name55 } = block_default55;
  var settings55 = {
    icon: custom_link_default,
    __experimentalLabel(attributes2, { context }) {
      if (context === "list-view") {
        return attributes2?.label;
      }
      if (context === "appender") {
        const type = attributes2?.type || "link";
        return (0, import_i18n144.sprintf)(
          /* translators: %s: block type (e.g., 'page', 'post', 'category') */
          (0, import_i18n144._x)("Add %s", "add default block type"),
          type
        );
      }
      return attributes2?.label;
    },
    merge(leftAttributes, { label: rightLabel = "" }) {
      return {
        ...leftAttributes,
        label: leftAttributes.label + rightLabel
      };
    },
    edit: NavigationLinkEdit,
    save: save34,
    example: {
      attributes: {
        label: (0, import_i18n144._x)("Example Link", "navigation link preview example"),
        url: "https://example.com"
      }
    },
    deprecated: [
      {
        isEligible(attributes2) {
          return attributes2.nofollow;
        },
        attributes: {
          label: {
            type: "string"
          },
          type: {
            type: "string"
          },
          nofollow: {
            type: "boolean"
          },
          description: {
            type: "string"
          },
          id: {
            type: "number"
          },
          opensInNewTab: {
            type: "boolean",
            default: false
          },
          url: {
            type: "string"
          }
        },
        migrate({ nofollow, ...rest }) {
          return {
            rel: nofollow ? "nofollow" : "",
            ...rest
          };
        },
        save() {
          return /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(import_block_editor162.InnerBlocks.Content, {});
        }
      }
    ],
    transforms: transforms_default19
  };
  if (window.__experimentalContentOnlyInspectorFields) {
    settings55[fieldsKey12] = [
      {
        id: "label",
        label: (0, import_i18n144.__)("Label"),
        type: "text",
        Edit: "rich-text"
      },
      {
        id: "link",
        label: (0, import_i18n144.__)("Link"),
        type: "url",
        Edit: "link",
        getValue: ({ item }) => ({
          url: item.url,
          rel: item.rel
        }),
        setValue: ({ value }) => ({
          url: value.url,
          rel: value.rel
        })
      }
    ];
    settings55[formKey12] = {
      fields: ["label", "link"]
    };
  }
  var init55 = () => {
    (0, import_hooks43.addFilter)(
      "blocks.registerBlockType",
      "core/navigation-link",
      enhanceNavigationLinkVariations
    );
    return initBlock({ name: name55, metadata: block_default55, settings: settings55 });
  };

  // packages/block-library/build-module/navigation-submenu/index.mjs
  var navigation_submenu_exports = {};
  __export(navigation_submenu_exports, {
    init: () => init56,
    metadata: () => block_default56,
    name: () => name56,
    settings: () => settings56
  });
  var import_i18n146 = __toESM(require_i18n(), 1);
  var import_blocks68 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/navigation-submenu/block.json
  var block_default56 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/navigation-submenu",
    title: "Submenu",
    category: "design",
    parent: ["core/navigation"],
    description: "Add a submenu to your navigation.",
    textdomain: "default",
    attributes: {
      label: {
        type: "string",
        role: "content"
      },
      type: {
        type: "string"
      },
      description: {
        type: "string"
      },
      rel: {
        type: "string"
      },
      id: {
        type: "number"
      },
      opensInNewTab: {
        type: "boolean",
        default: false
      },
      url: {
        type: "string",
        role: "content"
      },
      title: {
        type: "string"
      },
      kind: {
        type: "string"
      },
      isTopLevelItem: {
        type: "boolean"
      }
    },
    usesContext: [
      "textColor",
      "customTextColor",
      "backgroundColor",
      "customBackgroundColor",
      "overlayTextColor",
      "customOverlayTextColor",
      "overlayBackgroundColor",
      "customOverlayBackgroundColor",
      "fontSize",
      "customFontSize",
      "showSubmenuIcon",
      "maxNestingLevel",
      "openSubmenusOnClick",
      "submenuVisibility",
      "style"
    ],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-navigation-submenu-editor",
    style: "wp-block-navigation-submenu"
  };

  // packages/block-library/build-module/navigation-submenu/edit.mjs
  var import_data89 = __toESM(require_data(), 1);
  var import_components96 = __toESM(require_components(), 1);
  var import_keycodes6 = __toESM(require_keycodes(), 1);
  var import_i18n145 = __toESM(require_i18n(), 1);
  var import_block_editor163 = __toESM(require_block_editor(), 1);
  var import_url16 = __toESM(require_url(), 1);
  var import_element82 = __toESM(require_element(), 1);
  var import_a11y4 = __toESM(require_a11y(), 1);
  var import_blocks66 = __toESM(require_blocks(), 1);
  var import_compose38 = __toESM(require_compose(), 1);

  // packages/block-library/build-module/navigation-submenu/icons.mjs
  var import_components95 = __toESM(require_components(), 1);
  var import_jsx_runtime338 = __toESM(require_jsx_runtime(), 1);
  var ItemSubmenuIcon = () => /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(
    import_components95.SVG,
    {
      xmlns: "http://www.w3.org/2000/svg",
      width: "12",
      height: "12",
      viewBox: "0 0 12 12",
      fill: "none",
      children: /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(import_components95.Path, { d: "M1.50002 4L6.00002 8L10.5 4", strokeWidth: "1.5" })
    }
  );

  // packages/block-library/build-module/navigation-submenu/edit.mjs
  var import_jsx_runtime339 = __toESM(require_jsx_runtime(), 1);
  var ALLOWED_BLOCKS = [
    "core/navigation-link",
    "core/navigation-submenu",
    "core/page-list"
  ];
  function NavigationSubmenuEdit({
    attributes: attributes2,
    isSelected,
    setAttributes,
    mergeBlocks,
    onReplace,
    context,
    clientId
  }) {
    const { label, url, description, kind, type, id } = attributes2;
    const { showSubmenuIcon, maxNestingLevel, submenuVisibility } = context;
    const blockEditingMode = (0, import_block_editor163.useBlockEditingMode)();
    const openSubmenusOnClick = blockEditingMode !== "default" ? true : submenuVisibility === "click";
    const { hasUrlBinding, isBoundEntityAvailable, entityRecord } = useEntityBinding({
      clientId,
      attributes: attributes2
    });
    const handleLinkChange = useHandleLinkChange({
      clientId,
      attributes: attributes2,
      setAttributes,
      allowTextUpdate: true
    });
    const { __unstableMarkNextChangeAsNotPersistent, replaceBlock } = (0, import_data89.useDispatch)(import_block_editor163.store);
    const [isLinkOpen, setIsLinkOpen] = (0, import_element82.useState)(false);
    const [popoverAnchor, setPopoverAnchor] = (0, import_element82.useState)(null);
    const listItemRef = (0, import_element82.useRef)(null);
    const isDraggingWithin = useIsDraggingWithin(listItemRef);
    const itemLabelPlaceholder = (0, import_i18n145.__)("Add text\u2026");
    const ref = (0, import_element82.useRef)();
    const {
      parentCount,
      isParentOfSelectedBlock,
      isImmediateParentOfSelectedBlock,
      hasChildren,
      selectedBlockHasChildren,
      onlyDescendantIsEmptyLink
    } = (0, import_data89.useSelect)(
      (select9) => {
        const {
          hasSelectedInnerBlock,
          getSelectedBlockClientId,
          getBlockParentsByBlockName,
          getBlock,
          getBlockCount,
          getBlockOrder
        } = select9(import_block_editor163.store);
        let _onlyDescendantIsEmptyLink;
        const selectedBlockId = getSelectedBlockClientId();
        const selectedBlockChildren = getBlockOrder(selectedBlockId);
        if (selectedBlockChildren?.length === 1) {
          const singleBlock = getBlock(selectedBlockChildren[0]);
          _onlyDescendantIsEmptyLink = singleBlock?.name === "core/navigation-link" && !singleBlock?.attributes?.label;
        }
        return {
          parentCount: getBlockParentsByBlockName(
            clientId,
            "core/navigation-submenu"
          ).length,
          isParentOfSelectedBlock: hasSelectedInnerBlock(
            clientId,
            true
          ),
          isImmediateParentOfSelectedBlock: hasSelectedInnerBlock(
            clientId,
            false
          ),
          hasChildren: !!getBlockCount(clientId),
          selectedBlockHasChildren: !!selectedBlockChildren?.length,
          onlyDescendantIsEmptyLink: _onlyDescendantIsEmptyLink
        };
      },
      [clientId]
    );
    const validateLinkStatus = useEnableLinkStatusValidation(clientId);
    const prevHasChildren = (0, import_compose38.usePrevious)(hasChildren);
    const [isInvalid, isDraft] = useIsInvalidLink(
      kind,
      type,
      id,
      validateLinkStatus
    );
    (0, import_element82.useEffect)(() => {
      if (!openSubmenusOnClick && !url) {
        setIsLinkOpen(true);
      }
    }, []);
    (0, import_element82.useEffect)(() => {
      if (!isSelected) {
        setIsLinkOpen(false);
      }
    }, [isSelected]);
    (0, import_element82.useEffect)(() => {
      if (isLinkOpen && url) {
        if ((0, import_url16.isURL)((0, import_url16.prependHTTP)(label)) && /^.+\.[a-z]+/.test(label)) {
          selectLabelText(ref);
        }
      }
    }, [url]);
    const {
      textColor,
      customTextColor,
      backgroundColor,
      customBackgroundColor
    } = getColors(context, parentCount > 0);
    function onKeyDown(event) {
      if (import_keycodes6.isKeyboardEvent.primary(event, "k")) {
        event.preventDefault();
        event.stopPropagation();
        setIsLinkOpen(true);
      }
    }
    const blockProps = (0, import_block_editor163.useBlockProps)({
      ref: (0, import_compose38.useMergeRefs)([setPopoverAnchor, listItemRef]),
      className: clsx_default("wp-block-navigation-item", {
        "is-editing": isSelected || isParentOfSelectedBlock,
        "is-dragging-within": isDraggingWithin,
        "has-link": !!url,
        "has-child": hasChildren,
        "has-text-color": !!textColor || !!customTextColor,
        [(0, import_block_editor163.getColorClassName)("color", textColor)]: !!textColor,
        "has-background": !!backgroundColor || customBackgroundColor,
        [(0, import_block_editor163.getColorClassName)("background-color", backgroundColor)]: !!backgroundColor,
        "open-on-click": openSubmenusOnClick,
        "open-always": submenuVisibility === "always"
      }),
      style: {
        color: !textColor && customTextColor,
        backgroundColor: !backgroundColor && customBackgroundColor
      },
      onKeyDown
    });
    const innerBlocksColors = getColors(context, true);
    const allowedBlocks = parentCount >= maxNestingLevel ? ALLOWED_BLOCKS.filter(
      (blockName) => blockName !== "core/navigation-submenu"
    ) : ALLOWED_BLOCKS;
    const navigationChildBlockProps = getNavigationChildBlockProps(innerBlocksColors);
    const innerBlocksProps = (0, import_block_editor163.useInnerBlocksProps)(navigationChildBlockProps, {
      allowedBlocks,
      defaultBlock: DEFAULT_BLOCK5,
      directInsert: true,
      // Ensure block toolbar is not too far removed from item
      // being edited.
      // see: https://github.com/WordPress/gutenberg/pull/34615.
      __experimentalCaptureToolbars: true,
      renderAppender: isSelected || isImmediateParentOfSelectedBlock && !selectedBlockHasChildren || // Show the appender while dragging to allow inserting element between item and the appender.
      hasChildren ? import_block_editor163.InnerBlocks.ButtonBlockAppender : false
    });
    const ParentElement = openSubmenusOnClick ? "button" : "a";
    function transformToLink() {
      const newLinkBlock = (0, import_blocks66.createBlock)("core/navigation-link", attributes2);
      replaceBlock(clientId, newLinkBlock);
    }
    (0, import_element82.useEffect)(() => {
      if (!hasChildren && prevHasChildren) {
        __unstableMarkNextChangeAsNotPersistent();
        transformToLink();
      }
    }, [hasChildren, prevHasChildren]);
    const canConvertToLink = !selectedBlockHasChildren || onlyDescendantIsEmptyLink;
    return /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)(import_jsx_runtime339.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(import_block_editor163.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)(import_components96.ToolbarGroup, { children: [
        !openSubmenusOnClick && /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
          import_components96.ToolbarButton,
          {
            name: "link",
            icon: link_default,
            title: (0, import_i18n145.__)("Link"),
            shortcut: import_keycodes6.displayShortcut.primary("k"),
            onClick: () => {
              setIsLinkOpen(true);
            }
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
          import_components96.ToolbarButton,
          {
            name: "revert",
            icon: remove_submenu_default,
            title: (0, import_i18n145.__)("Convert to Link"),
            onClick: transformToLink,
            className: "wp-block-navigation__submenu__revert",
            disabled: !canConvertToLink
          }
        )
      ] }) }),
      /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(import_block_editor163.InspectorControls, { group: "content", children: /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
        Controls2,
        {
          attributes: attributes2,
          setAttributes,
          clientId,
          isLinkEditable: !openSubmenusOnClick
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)("div", { ...blockProps, children: [
        /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)(ParentElement, { className: "wp-block-navigation-item__content", children: [
          !isInvalid && !isDraft && /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)(import_jsx_runtime339.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
              import_block_editor163.RichText,
              {
                ref,
                identifier: "label",
                className: "wp-block-navigation-item__label",
                value: label,
                onChange: (labelValue) => setAttributes({ label: labelValue }),
                onMerge: mergeBlocks,
                onReplace,
                "aria-label": (0, import_i18n145.__)("Navigation link text"),
                placeholder: itemLabelPlaceholder,
                withoutInteractiveFormatting: true,
                onClick: () => {
                  if (!openSubmenusOnClick && !url) {
                    setIsLinkOpen(true);
                  }
                }
              }
            ),
            description && /* @__PURE__ */ (0, import_jsx_runtime339.jsx)("span", { className: "wp-block-navigation-item__description", children: description })
          ] }),
          (isInvalid || isDraft) && /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
            InvalidDraftDisplay,
            {
              label,
              isInvalid,
              isDraft,
              className: "wp-block-navigation-item__label"
            }
          ),
          !openSubmenusOnClick && isLinkOpen && /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
            LinkUI,
            {
              clientId,
              link: attributes2,
              entity: {
                entityRecord,
                hasBinding: hasUrlBinding,
                isEntityAvailable: isBoundEntityAvailable
              },
              onClose: () => {
                setIsLinkOpen(false);
              },
              anchor: popoverAnchor,
              onRemove: () => {
                setAttributes({ url: "" });
                (0, import_a11y4.speak)((0, import_i18n145.__)("Link removed."), "assertive");
              },
              onChange: handleLinkChange
            }
          )
        ] }),
        (showSubmenuIcon || openSubmenusOnClick) && /* @__PURE__ */ (0, import_jsx_runtime339.jsx)("span", { className: "wp-block-navigation__submenu-icon", children: /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(ItemSubmenuIcon, {}) }),
        /* @__PURE__ */ (0, import_jsx_runtime339.jsx)("div", { ...innerBlocksProps })
      ] })
    ] });
  }

  // packages/block-library/build-module/navigation-submenu/save.mjs
  var import_block_editor164 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime340 = __toESM(require_jsx_runtime(), 1);
  function save35() {
    return /* @__PURE__ */ (0, import_jsx_runtime340.jsx)(import_block_editor164.InnerBlocks.Content, {});
  }

  // packages/block-library/build-module/navigation-submenu/transforms.mjs
  var import_blocks67 = __toESM(require_blocks(), 1);
  var transforms19 = {
    to: [
      {
        type: "block",
        blocks: ["core/navigation-link"],
        isMatch: (attributes2, block) => block?.innerBlocks?.length === 0,
        transform: (attributes2) => (0, import_blocks67.createBlock)("core/navigation-link", attributes2)
      },
      {
        type: "block",
        blocks: ["core/spacer"],
        isMatch: (attributes2, block) => block?.innerBlocks?.length === 0,
        transform: () => {
          return (0, import_blocks67.createBlock)("core/spacer");
        }
      },
      {
        type: "block",
        blocks: ["core/site-logo"],
        isMatch: (attributes2, block) => block?.innerBlocks?.length === 0,
        transform: () => {
          return (0, import_blocks67.createBlock)("core/site-logo");
        }
      },
      {
        type: "block",
        blocks: ["core/home-link"],
        isMatch: (attributes2, block) => block?.innerBlocks?.length === 0,
        transform: () => {
          return (0, import_blocks67.createBlock)("core/home-link");
        }
      },
      {
        type: "block",
        blocks: ["core/social-links"],
        isMatch: (attributes2, block) => block?.innerBlocks?.length === 0,
        transform: () => {
          return (0, import_blocks67.createBlock)("core/social-links");
        }
      },
      {
        type: "block",
        blocks: ["core/search"],
        isMatch: (attributes2, block) => block?.innerBlocks?.length === 0,
        transform: () => {
          return (0, import_blocks67.createBlock)("core/search");
        }
      }
    ]
  };
  var transforms_default20 = transforms19;

  // packages/block-library/build-module/navigation-submenu/index.mjs
  var { fieldsKey: fieldsKey13, formKey: formKey13 } = unlock(import_blocks68.privateApis);
  var { name: name56 } = block_default56;
  var settings56 = {
    icon: ({ context }) => {
      if (context === "list-view") {
        return page_default;
      }
      return add_submenu_default;
    },
    __experimentalLabel(attributes2, { context }) {
      const { label } = attributes2;
      const customName = attributes2?.metadata?.name;
      if ((context === "list-view" || context === "breadcrumb") && customName) {
        return customName;
      }
      return label;
    },
    edit: NavigationSubmenuEdit,
    example: {
      attributes: {
        label: (0, import_i18n146._x)("About", "Example link text for Navigation Submenu"),
        type: "page"
      }
    },
    save: save35,
    transforms: transforms_default20
  };
  if (window.__experimentalContentOnlyInspectorFields) {
    settings56[fieldsKey13] = [
      {
        id: "label",
        label: (0, import_i18n146.__)("Label"),
        type: "text",
        Edit: "rich-text"
        //TODO: replace with custom component
      },
      {
        id: "link",
        label: (0, import_i18n146.__)("Link"),
        type: "url",
        Edit: "link",
        // TODO: replace with custom component
        getValue: ({ item }) => ({
          url: item.url,
          rel: item.rel
        }),
        setValue: ({ value }) => ({
          url: value.url,
          rel: value.rel
        })
      }
    ];
    settings56[formKey13] = {
      fields: ["label", "link"]
    };
  }
  var init56 = () => initBlock({ name: name56, metadata: block_default56, settings: settings56 });

  // packages/block-library/build-module/nextpage/index.mjs
  var nextpage_exports = {};
  __export(nextpage_exports, {
    init: () => init57,
    metadata: () => block_default57,
    name: () => name57,
    settings: () => settings57
  });

  // packages/block-library/build-module/nextpage/edit.mjs
  var import_i18n147 = __toESM(require_i18n(), 1);
  var import_block_editor165 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime341 = __toESM(require_jsx_runtime(), 1);
  function NextPageEdit() {
    return /* @__PURE__ */ (0, import_jsx_runtime341.jsx)("div", { ...(0, import_block_editor165.useBlockProps)(), children: /* @__PURE__ */ (0, import_jsx_runtime341.jsx)("span", { children: (0, import_i18n147.__)("Page break") }) });
  }

  // packages/block-library/build-module/nextpage/block.json
  var block_default57 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/nextpage",
    title: "Page Break",
    category: "design",
    description: "Separate your content into a multi-page experience.",
    keywords: ["next page", "pagination"],
    parent: ["core/post-content"],
    textdomain: "default",
    supports: {
      customClassName: false,
      className: false,
      html: false,
      visibility: false,
      interactivity: {
        clientNavigation: true
      },
      customCSS: false
    },
    editorStyle: "wp-block-nextpage-editor"
  };

  // packages/block-library/build-module/nextpage/save.mjs
  var import_element83 = __toESM(require_element(), 1);
  var import_jsx_runtime342 = __toESM(require_jsx_runtime(), 1);
  function save36() {
    return /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(import_element83.RawHTML, { children: "<!--nextpage-->" });
  }

  // packages/block-library/build-module/nextpage/transforms.mjs
  var import_blocks69 = __toESM(require_blocks(), 1);
  var transforms20 = {
    from: [
      {
        type: "raw",
        schema: {
          "wp-block": { attributes: ["data-block"] }
        },
        isMatch: (node) => node.dataset && node.dataset.block === "core/nextpage",
        transform() {
          return (0, import_blocks69.createBlock)("core/nextpage", {});
        }
      }
    ]
  };
  var transforms_default21 = transforms20;

  // packages/block-library/build-module/nextpage/index.mjs
  var { name: name57 } = block_default57;
  var settings57 = {
    icon: page_break_default,
    example: {},
    transforms: transforms_default21,
    edit: NextPageEdit,
    save: save36
  };
  var init57 = () => initBlock({ name: name57, metadata: block_default57, settings: settings57 });

  // packages/block-library/build-module/navigation-overlay-close/index.mjs
  var navigation_overlay_close_exports = {};
  __export(navigation_overlay_close_exports, {
    init: () => init58,
    metadata: () => block_default58,
    name: () => name58,
    settings: () => settings58
  });
  var import_hooks46 = __toESM(require_hooks(), 1);

  // packages/block-library/build-module/navigation-overlay-close/edit.mjs
  var import_block_editor166 = __toESM(require_block_editor(), 1);
  var import_components97 = __toESM(require_components(), 1);
  var import_i18n148 = __toESM(require_i18n(), 1);
  var import_jsx_runtime343 = __toESM(require_jsx_runtime(), 1);
  function NavigationOverlayCloseEdit({
    attributes: attributes2,
    setAttributes
  }) {
    const { displayMode, text } = attributes2;
    const showIcon = displayMode === "icon" || displayMode === "both";
    const showText = displayMode === "text" || displayMode === "both";
    const displayText = text || (0, import_i18n148.__)("Close");
    const blockProps = (0, import_block_editor166.useBlockProps)({
      className: "wp-block-navigation-overlay-close"
    });
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime343.jsxs)(import_jsx_runtime343.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime343.jsx)(import_block_editor166.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime343.jsx)(
        import_components97.__experimentalToolsPanel,
        {
          label: (0, import_i18n148.__)("Settings"),
          resetAll: () => setAttributes({ displayMode: "icon" }),
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime343.jsx)(
            import_components97.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n148.__)("Display Mode"),
              isShownByDefault: true,
              hasValue: () => displayMode !== "icon",
              onDeselect: () => setAttributes({ displayMode: "icon" }),
              children: /* @__PURE__ */ (0, import_jsx_runtime343.jsxs)(
                import_components97.__experimentalToggleGroupControl,
                {
                  label: (0, import_i18n148.__)("Display Mode"),
                  value: displayMode,
                  onChange: (value) => setAttributes({ displayMode: value }),
                  isBlock: true,
                  __next40pxDefaultSize: true,
                  children: [
                    /* @__PURE__ */ (0, import_jsx_runtime343.jsx)(
                      import_components97.__experimentalToggleGroupControlOption,
                      {
                        value: "icon",
                        label: (0, import_i18n148.__)("Icon")
                      }
                    ),
                    /* @__PURE__ */ (0, import_jsx_runtime343.jsx)(
                      import_components97.__experimentalToggleGroupControlOption,
                      {
                        value: "text",
                        label: (0, import_i18n148.__)("Text")
                      }
                    ),
                    /* @__PURE__ */ (0, import_jsx_runtime343.jsx)(
                      import_components97.__experimentalToggleGroupControlOption,
                      {
                        value: "both",
                        label: (0, import_i18n148.__)("Both")
                      }
                    )
                  ]
                }
              )
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime343.jsxs)(
        "button",
        {
          ...blockProps,
          type: "button",
          "aria-label": !showText ? (0, import_i18n148.__)("Close") : void 0,
          children: [
            showIcon && /* @__PURE__ */ (0, import_jsx_runtime343.jsx)(icon_default, { icon: close_default }),
            showText && /* @__PURE__ */ (0, import_jsx_runtime343.jsx)(
              import_block_editor166.RichText,
              {
                identifier: "text",
                value: displayText,
                onChange: (value) => setAttributes({ text: value }),
                tagName: "span",
                className: "wp-block-navigation-overlay-close__text",
                allowedFormats: ["core/bold", "core/italic"]
              }
            )
          ]
        }
      )
    ] });
  }

  // packages/block-library/build-module/navigation-overlay-close/block.json
  var block_default58 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/navigation-overlay-close",
    title: "Navigation Overlay Close",
    category: "design",
    description: "A customizable button to close overlays.",
    keywords: ["close", "overlay", "navigation", "menu"],
    textdomain: "default",
    attributes: {
      displayMode: {
        type: "string",
        enum: ["icon", "text", "both"],
        default: "icon"
      },
      text: {
        type: "string"
      }
    },
    supports: {
      color: {
        gradients: false,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        padding: true,
        __experimentalDefaultControls: {
          padding: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      }
    },
    style: "wp-block-navigation-overlay-close"
  };

  // packages/block-library/build-module/navigation-overlay-close/icon.mjs
  var import_primitives164 = __toESM(require_primitives(), 1);
  var import_jsx_runtime344 = __toESM(require_jsx_runtime(), 1);
  var icon_default3 = /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(import_primitives164.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(import_primitives164.Path, { d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2Zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12ZM15 8l-3 3-3-3-1.1 1.1 3 3-3 3L9 16.2l3-3 3 3 1.1-1.1-3-3 3-3L15 8Z" }) });

  // packages/block-library/build-module/navigation-overlay-close/index.mjs
  var { name: name58 } = block_default58;
  var settings58 = {
    icon: icon_default3,
    edit: NavigationOverlayCloseEdit
  };
  var init58 = () => {
    (0, import_hooks46.addFilter)(
      "blockEditor.__unstableCanInsertBlockType",
      "core/navigation-overlay-close/restrict-to-overlay-template-parts",
      (canInsert, blockType) => {
        if (blockType.name !== "core/navigation-overlay-close") {
          return canInsert;
        }
        if (!canInsert) {
          return canInsert;
        }
        return isWithinNavigationOverlay();
      }
    );
    return initBlock({ name: name58, metadata: block_default58, settings: settings58 });
  };

  // packages/block-library/build-module/pattern/index.mjs
  var pattern_exports = {};
  __export(pattern_exports, {
    init: () => init59,
    metadata: () => block_default59,
    name: () => name59,
    settings: () => settings59
  });

  // packages/block-library/build-module/pattern/block.json
  var block_default59 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/pattern",
    title: "Pattern Placeholder",
    category: "theme",
    description: "Show a block pattern.",
    supports: {
      html: false,
      inserter: false,
      renaming: false,
      visibility: false,
      interactivity: {
        clientNavigation: true
      }
    },
    textdomain: "default",
    attributes: {
      slug: {
        type: "string"
      }
    }
  };

  // packages/block-library/build-module/pattern/edit.mjs
  var import_blocks70 = __toESM(require_blocks(), 1);
  var import_data91 = __toESM(require_data(), 1);
  var import_element84 = __toESM(require_element(), 1);
  var import_block_editor167 = __toESM(require_block_editor(), 1);
  var import_core_data51 = __toESM(require_core_data(), 1);
  var import_i18n149 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/pattern/recursion-detector.mjs
  var import_data90 = __toESM(require_data(), 1);
  var cachedParsers = /* @__PURE__ */ new WeakMap();
  function useParsePatternDependencies() {
    const registry = (0, import_data90.useRegistry)();
    if (!cachedParsers.has(registry)) {
      const deps = /* @__PURE__ */ new Map();
      cachedParsers.set(
        registry,
        parsePatternDependencies.bind(null, deps)
      );
    }
    return cachedParsers.get(registry);
  }
  function parsePatternDependencies(deps, { name: name123, blocks }) {
    const queue = [...blocks];
    while (queue.length) {
      const block = queue.shift();
      for (const innerBlock of block.innerBlocks ?? []) {
        queue.unshift(innerBlock);
      }
      if (block.name === "core/pattern") {
        registerDependency(deps, name123, block.attributes.slug);
      }
    }
  }
  function registerDependency(deps, a2, b2) {
    if (!deps.has(a2)) {
      deps.set(a2, /* @__PURE__ */ new Set());
    }
    deps.get(a2).add(b2);
    if (hasCycle(deps, a2)) {
      throw new TypeError(
        `Pattern ${a2} has a circular dependency and cannot be rendered.`
      );
    }
  }
  function hasCycle(deps, slug, visitedNodes = /* @__PURE__ */ new Set(), currentPath = /* @__PURE__ */ new Set()) {
    visitedNodes.add(slug);
    currentPath.add(slug);
    const dependencies = deps.get(slug) ?? /* @__PURE__ */ new Set();
    for (const dependency of dependencies) {
      if (!visitedNodes.has(dependency)) {
        if (hasCycle(deps, dependency, visitedNodes, currentPath)) {
          return true;
        }
      } else if (currentPath.has(dependency)) {
        return true;
      }
    }
    currentPath.delete(slug);
    return false;
  }

  // packages/block-library/build-module/pattern/edit.mjs
  var import_jsx_runtime345 = __toESM(require_jsx_runtime(), 1);
  var PatternEdit = ({ attributes: attributes2, clientId }) => {
    const registry = (0, import_data91.useRegistry)();
    const selectedPattern = (0, import_data91.useSelect)(
      (select9) => select9(import_block_editor167.store).__experimentalGetParsedPattern(
        attributes2.slug
      ),
      [attributes2.slug]
    );
    const currentThemeStylesheet = (0, import_data91.useSelect)(
      (select9) => select9(import_core_data51.store).getCurrentTheme()?.stylesheet,
      []
    );
    const {
      replaceBlocks,
      setBlockEditingMode,
      __unstableMarkNextChangeAsNotPersistent
    } = (0, import_data91.useDispatch)(import_block_editor167.store);
    const { getBlockRootClientId, getBlockEditingMode } = (0, import_data91.useSelect)(import_block_editor167.store);
    const [hasRecursionError, setHasRecursionError] = (0, import_element84.useState)(false);
    const parsePatternDependencies2 = useParsePatternDependencies();
    function injectThemeAttributeInBlockTemplateContent(block) {
      if (block.innerBlocks.find(
        (innerBlock) => innerBlock.name === "core/template-part"
      )) {
        block.innerBlocks = block.innerBlocks.map((innerBlock) => {
          if (innerBlock.name === "core/template-part" && innerBlock.attributes.theme === void 0) {
            innerBlock.attributes.theme = currentThemeStylesheet;
          }
          return innerBlock;
        });
      }
      if (block.name === "core/template-part" && block.attributes.theme === void 0) {
        block.attributes.theme = currentThemeStylesheet;
      }
      return block;
    }
    (0, import_element84.useEffect)(() => {
      if (!hasRecursionError && selectedPattern?.blocks) {
        try {
          parsePatternDependencies2(selectedPattern);
        } catch (error) {
          setHasRecursionError(true);
          return;
        }
        window.queueMicrotask(() => {
          const rootClientId = getBlockRootClientId(clientId);
          const clonedBlocks = selectedPattern.blocks.map(
            (block) => (0, import_blocks70.cloneBlock)(
              injectThemeAttributeInBlockTemplateContent(block)
            )
          );
          if (clonedBlocks.length === 1 && selectedPattern.categories?.length > 0) {
            clonedBlocks[0].attributes = {
              ...clonedBlocks[0].attributes,
              metadata: {
                ...clonedBlocks[0].attributes.metadata,
                categories: selectedPattern.categories,
                patternName: selectedPattern.name,
                name: clonedBlocks[0].attributes.metadata.name || selectedPattern.title
              }
            };
          }
          const rootEditingMode = getBlockEditingMode(rootClientId);
          registry.batch(() => {
            __unstableMarkNextChangeAsNotPersistent();
            setBlockEditingMode(rootClientId, "default");
            __unstableMarkNextChangeAsNotPersistent();
            replaceBlocks(clientId, clonedBlocks);
            __unstableMarkNextChangeAsNotPersistent();
            setBlockEditingMode(rootClientId, rootEditingMode);
          });
        });
      }
    }, [
      clientId,
      hasRecursionError,
      selectedPattern,
      __unstableMarkNextChangeAsNotPersistent,
      replaceBlocks,
      getBlockEditingMode,
      setBlockEditingMode,
      getBlockRootClientId
    ]);
    const props = (0, import_block_editor167.useBlockProps)();
    if (hasRecursionError) {
      return /* @__PURE__ */ (0, import_jsx_runtime345.jsx)("div", { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(import_block_editor167.Warning, { children: (0, import_i18n149.sprintf)(
        // translators: A warning in which %s is the name of a pattern.
        (0, import_i18n149.__)('Pattern "%s" cannot be rendered inside itself.'),
        selectedPattern?.name
      ) }) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime345.jsx)("div", { ...props });
  };
  var edit_default21 = PatternEdit;

  // packages/block-library/build-module/pattern/index.mjs
  var { name: name59 } = block_default59;
  var settings59 = {
    edit: edit_default21
  };
  var init59 = () => initBlock({ name: name59, metadata: block_default59, settings: settings59 });

  // packages/block-library/build-module/page-list/index.mjs
  var page_list_exports = {};
  __export(page_list_exports, {
    init: () => init60,
    metadata: () => block_default60,
    name: () => name60,
    settings: () => settings60
  });

  // packages/block-library/build-module/page-list/block.json
  var block_default60 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/page-list",
    title: "Page List",
    category: "widgets",
    allowedBlocks: ["core/page-list-item"],
    description: "Display a list of all pages.",
    keywords: ["menu", "navigation"],
    textdomain: "default",
    attributes: {
      parentPageID: {
        type: "integer",
        default: 0
      },
      isNested: {
        type: "boolean",
        default: false
      }
    },
    usesContext: [
      "textColor",
      "customTextColor",
      "backgroundColor",
      "customBackgroundColor",
      "overlayTextColor",
      "customOverlayTextColor",
      "overlayBackgroundColor",
      "customOverlayBackgroundColor",
      "fontSize",
      "customFontSize",
      "showSubmenuIcon",
      "style",
      "openSubmenusOnClick",
      "submenuVisibility"
    ],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      color: {
        text: true,
        background: true,
        link: true,
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      spacing: {
        padding: true,
        margin: true,
        __experimentalDefaultControls: {
          padding: false,
          margin: false
        }
      },
      contentRole: true
    },
    editorStyle: "wp-block-page-list-editor",
    style: "wp-block-page-list"
  };

  // packages/block-library/build-module/page-list/edit.mjs
  var import_blocks72 = __toESM(require_blocks(), 1);
  var import_block_editor169 = __toESM(require_block_editor(), 1);
  var import_components99 = __toESM(require_components(), 1);
  var import_i18n151 = __toESM(require_i18n(), 1);
  var import_element85 = __toESM(require_element(), 1);
  var import_core_data52 = __toESM(require_core_data(), 1);
  var import_data93 = __toESM(require_data(), 1);

  // packages/block-library/build-module/page-list/use-convert-to-navigation-links.mjs
  var import_blocks71 = __toESM(require_blocks(), 1);
  var import_data92 = __toESM(require_data(), 1);
  var import_block_editor168 = __toESM(require_block_editor(), 1);
  function createNavigationLinks(pages = []) {
    const POST_TYPE_KIND = "post-type";
    const linkMap = {};
    const navigationLinks = [];
    pages.forEach(({ id, title, link: url, type, parent }) => {
      const innerBlocks = linkMap[id]?.innerBlocks ?? [];
      linkMap[id] = (0, import_blocks71.createBlock)(
        "core/navigation-link",
        {
          id,
          label: title.rendered,
          url,
          type,
          kind: POST_TYPE_KIND,
          metadata: {
            bindings: buildNavigationLinkEntityBinding(POST_TYPE_KIND)
          }
        },
        innerBlocks
      );
      if (!parent) {
        navigationLinks.push(linkMap[id]);
      } else {
        if (!linkMap[parent]) {
          linkMap[parent] = { innerBlocks: [] };
        }
        const parentLinkInnerBlocks = linkMap[parent].innerBlocks;
        parentLinkInnerBlocks.push(linkMap[id]);
      }
    });
    return navigationLinks;
  }
  function findNavigationLinkById(navigationLinks, id) {
    for (const navigationLink of navigationLinks) {
      if (navigationLink.attributes.id === id) {
        return navigationLink;
      }
      if (navigationLink.innerBlocks && navigationLink.innerBlocks.length) {
        const foundNavigationLink = findNavigationLinkById(
          navigationLink.innerBlocks,
          id
        );
        if (foundNavigationLink) {
          return foundNavigationLink;
        }
      }
    }
    return null;
  }
  function convertToNavigationLinks(pages = [], parentPageID = null) {
    let navigationLinks = createNavigationLinks(pages);
    if (parentPageID) {
      const parentPage = findNavigationLinkById(
        navigationLinks,
        parentPageID
      );
      if (parentPage && parentPage.innerBlocks) {
        navigationLinks = parentPage.innerBlocks;
      }
    }
    const transformSubmenus = (listOfLinks) => {
      listOfLinks.forEach((block, index, listOfLinksArray) => {
        const { attributes: attributes2, innerBlocks } = block;
        if (innerBlocks.length !== 0) {
          transformSubmenus(innerBlocks);
          const transformedBlock = (0, import_blocks71.createBlock)(
            "core/navigation-submenu",
            attributes2,
            innerBlocks
          );
          listOfLinksArray[index] = transformedBlock;
        }
      });
    };
    transformSubmenus(navigationLinks);
    return navigationLinks;
  }
  function useConvertToNavigationLinks({
    clientId,
    pages,
    parentClientId,
    parentPageID
  }) {
    const { replaceBlock, selectBlock } = (0, import_data92.useDispatch)(import_block_editor168.store);
    return () => {
      const navigationLinks = convertToNavigationLinks(pages, parentPageID);
      replaceBlock(clientId, navigationLinks);
      selectBlock(parentClientId);
    };
  }

  // packages/block-library/build-module/page-list/convert-to-links-modal.mjs
  var import_components98 = __toESM(require_components(), 1);
  var import_compose39 = __toESM(require_compose(), 1);
  var import_i18n150 = __toESM(require_i18n(), 1);
  var import_jsx_runtime346 = __toESM(require_jsx_runtime(), 1);
  var convertDescription = (0, import_i18n150.__)(
    "This Navigation Menu displays your website's pages. Editing it will enable you to add, delete, or reorder pages. However, new pages will no longer be added automatically."
  );
  function ConvertToLinksModal({ onClick, onClose, disabled }) {
    return /* @__PURE__ */ (0, import_jsx_runtime346.jsxs)(
      import_components98.Modal,
      {
        onRequestClose: onClose,
        title: (0, import_i18n150.__)("Edit Page List"),
        className: "wp-block-page-list-modal",
        aria: {
          describedby: (0, import_compose39.useInstanceId)(
            ConvertToLinksModal,
            "wp-block-page-list-modal__description"
          )
        },
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
            "p",
            {
              id: (0, import_compose39.useInstanceId)(
                ConvertToLinksModal,
                "wp-block-page-list-modal__description"
              ),
              children: convertDescription
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime346.jsxs)("div", { className: "wp-block-page-list-modal-buttons", children: [
            /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
              import_components98.Button,
              {
                __next40pxDefaultSize: true,
                variant: "tertiary",
                onClick: onClose,
                children: (0, import_i18n150.__)("Cancel")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
              import_components98.Button,
              {
                __next40pxDefaultSize: true,
                variant: "primary",
                accessibleWhenDisabled: true,
                disabled,
                onClick,
                children: (0, import_i18n150.__)("Edit")
              }
            )
          ] })
        ]
      }
    );
  }

  // packages/block-library/build-module/page-list/edit.mjs
  var import_jsx_runtime347 = __toESM(require_jsx_runtime(), 1);
  var MAX_PAGE_COUNT = 100;
  var NOOP = () => {
  };
  function BlockContent({
    blockProps,
    innerBlocksProps,
    hasResolvedPages,
    blockList,
    pages,
    parentPageID
  }) {
    if (!hasResolvedPages) {
      return /* @__PURE__ */ (0, import_jsx_runtime347.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime347.jsx)("div", { className: "wp-block-page-list__loading-indicator-container", children: /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(import_components99.Spinner, { className: "wp-block-page-list__loading-indicator" }) }) });
    }
    if (pages === null) {
      return /* @__PURE__ */ (0, import_jsx_runtime347.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(import_components99.Notice, { status: "warning", isDismissible: false, children: (0, import_i18n151.__)("Page List: Cannot retrieve Pages.") }) });
    }
    if (pages.length === 0) {
      return /* @__PURE__ */ (0, import_jsx_runtime347.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(import_components99.Notice, { status: "info", isDismissible: false, children: (0, import_i18n151.__)("Page List: Cannot retrieve Pages.") }) });
    }
    if (blockList.length === 0) {
      const parentPageDetails = pages.find(
        (page) => page.id === parentPageID
      );
      if (parentPageDetails?.title?.rendered) {
        return /* @__PURE__ */ (0, import_jsx_runtime347.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(import_block_editor169.Warning, { children: (0, import_i18n151.sprintf)(
          // translators: %s: Page title.
          (0, import_i18n151.__)('Page List: "%s" page has no children.'),
          parentPageDetails.title.rendered
        ) }) });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime347.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(import_components99.Notice, { status: "warning", isDismissible: false, children: (0, import_i18n151.__)("Page List: Cannot retrieve Pages.") }) });
    }
    if (pages.length > 0) {
      return /* @__PURE__ */ (0, import_jsx_runtime347.jsx)("ul", { ...innerBlocksProps });
    }
  }
  function PageListEdit({
    context,
    clientId,
    attributes: attributes2,
    setAttributes
  }) {
    const { parentPageID } = attributes2;
    const [isOpen, setOpen] = (0, import_element85.useState)(false);
    const openModal = (0, import_element85.useCallback)(() => setOpen(true), []);
    const closeModal = () => setOpen(false);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const { records: pages, hasResolved: hasResolvedPages } = (0, import_core_data52.useEntityRecords)(
      "postType",
      "page",
      {
        per_page: MAX_PAGE_COUNT,
        _fields: ["id", "link", "menu_order", "parent", "title", "type"],
        // TODO: When https://core.trac.wordpress.org/ticket/39037 REST API support for multiple orderby
        // values is resolved, update 'orderby' to [ 'menu_order', 'post_title' ] to provide a consistent
        // sort.
        orderby: "menu_order",
        order: "asc"
      }
    );
    const allowConvertToLinks = "showSubmenuIcon" in context && pages?.length > 0 && pages?.length <= MAX_PAGE_COUNT;
    const pagesByParentId = (0, import_element85.useMemo)(() => {
      if (pages === null) {
        return /* @__PURE__ */ new Map();
      }
      const sortedPages = pages.sort((a2, b2) => {
        if (a2.menu_order === b2.menu_order) {
          return a2.title.rendered.localeCompare(b2.title.rendered);
        }
        return a2.menu_order - b2.menu_order;
      });
      return sortedPages.reduce((accumulator, page) => {
        const { parent } = page;
        if (accumulator.has(parent)) {
          accumulator.get(parent).push(page);
        } else {
          accumulator.set(parent, [page]);
        }
        return accumulator;
      }, /* @__PURE__ */ new Map());
    }, [pages]);
    const blockProps = (0, import_block_editor169.useBlockProps)({
      className: clsx_default("wp-block-page-list", {
        "has-text-color": !!context.textColor,
        [(0, import_block_editor169.getColorClassName)("color", context.textColor)]: !!context.textColor,
        "has-background": !!context.backgroundColor,
        [(0, import_block_editor169.getColorClassName)(
          "background-color",
          context.backgroundColor
        )]: !!context.backgroundColor,
        "open-on-click": context.submenuVisibility === "click",
        "open-always": context.submenuVisibility === "always"
      }),
      style: { ...context.style?.color }
    });
    const pagesTree = (0, import_element85.useMemo)(
      function makePagesTree(parentId = 0, level = 0) {
        const childPages = pagesByParentId.get(parentId);
        if (!childPages?.length) {
          return [];
        }
        return childPages.reduce((tree, page) => {
          const hasChildren = pagesByParentId.has(page.id);
          const item = {
            value: page.id,
            label: "\u2014 ".repeat(level) + page.title.rendered,
            rawName: page.title.rendered
          };
          tree.push(item);
          if (hasChildren) {
            tree.push(...makePagesTree(page.id, level + 1));
          }
          return tree;
        }, []);
      },
      [pagesByParentId]
    );
    const blockList = (0, import_element85.useMemo)(
      function getBlockList(parentId = parentPageID) {
        const childPages = pagesByParentId.get(parentId);
        if (!childPages?.length) {
          return [];
        }
        return childPages.reduce((template, page) => {
          const hasChildren = pagesByParentId.has(page.id);
          const pageProps = {
            id: page.id,
            label: (
              // translators: displayed when a page has an empty title.
              page.title?.rendered?.trim() !== "" ? page.title?.rendered : (0, import_i18n151.__)("(no title)")
            ),
            title: (
              // translators: displayed when a page has an empty title.
              page.title?.rendered?.trim() !== "" ? page.title?.rendered : (0, import_i18n151.__)("(no title)")
            ),
            link: page.url,
            hasChildren
          };
          let item = null;
          const children = getBlockList(page.id);
          item = (0, import_blocks72.createBlock)(
            "core/page-list-item",
            pageProps,
            children
          );
          template.push(item);
          return template;
        }, []);
      },
      [pagesByParentId, parentPageID]
    );
    const {
      isNested,
      hasSelectedChild,
      parentClientId,
      hasDraggedChild,
      isChildOfNavigation
    } = (0, import_data93.useSelect)(
      (select9) => {
        const {
          getBlockParentsByBlockName,
          hasSelectedInnerBlock,
          hasDraggedInnerBlock
        } = select9(import_block_editor169.store);
        const blockParents = getBlockParentsByBlockName(
          clientId,
          "core/navigation-submenu",
          true
        );
        const navigationBlockParents = getBlockParentsByBlockName(
          clientId,
          "core/navigation",
          true
        );
        return {
          isNested: blockParents.length > 0,
          isChildOfNavigation: navigationBlockParents.length > 0,
          hasSelectedChild: hasSelectedInnerBlock(clientId, true),
          hasDraggedChild: hasDraggedInnerBlock(clientId, true),
          parentClientId: navigationBlockParents[0]
        };
      },
      [clientId]
    );
    const convertToNavigationLinks2 = useConvertToNavigationLinks({
      clientId,
      pages,
      parentClientId,
      parentPageID
    });
    const innerBlocksProps = (0, import_block_editor169.useInnerBlocksProps)(blockProps, {
      renderAppender: false,
      __unstableDisableDropZone: true,
      templateLock: isChildOfNavigation ? false : "all",
      onInput: NOOP,
      onChange: NOOP,
      value: blockList
    });
    const { selectBlock } = (0, import_data93.useDispatch)(import_block_editor169.store);
    (0, import_element85.useEffect)(() => {
      if (hasSelectedChild || hasDraggedChild) {
        openModal();
        selectBlock(parentClientId);
      }
    }, [
      hasSelectedChild,
      hasDraggedChild,
      parentClientId,
      selectBlock,
      openModal
    ]);
    (0, import_element85.useEffect)(() => {
      setAttributes({ isNested });
    }, [isNested, setAttributes]);
    return /* @__PURE__ */ (0, import_jsx_runtime347.jsxs)(import_jsx_runtime347.Fragment, { children: [
      (pagesTree.length > 0 || allowConvertToLinks) && /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(import_block_editor169.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime347.jsxs)(
        import_components99.__experimentalToolsPanel,
        {
          label: (0, import_i18n151.__)("Settings"),
          resetAll: () => {
            setAttributes({ parentPageID: 0 });
          },
          dropdownMenuProps,
          children: [
            pagesTree.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(
              import_components99.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n151.__)("Parent Page"),
                hasValue: () => parentPageID !== 0,
                onDeselect: () => setAttributes({ parentPageID: 0 }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(
                  import_components99.ComboboxControl,
                  {
                    __next40pxDefaultSize: true,
                    className: "editor-page-attributes__parent",
                    label: (0, import_i18n151.__)("Parent"),
                    value: parentPageID,
                    options: pagesTree,
                    onChange: (value) => setAttributes({
                      parentPageID: value ?? 0
                    }),
                    help: (0, import_i18n151.__)(
                      "Choose a page to show only its subpages."
                    )
                  }
                )
              }
            ),
            allowConvertToLinks && /* @__PURE__ */ (0, import_jsx_runtime347.jsxs)("div", { style: { gridColumn: "1 / -1" }, children: [
              /* @__PURE__ */ (0, import_jsx_runtime347.jsx)("p", { children: convertDescription }),
              /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(
                import_components99.Button,
                {
                  __next40pxDefaultSize: true,
                  variant: "primary",
                  accessibleWhenDisabled: true,
                  disabled: !hasResolvedPages,
                  onClick: convertToNavigationLinks2,
                  children: (0, import_i18n151.__)("Edit")
                }
              )
            ] })
          ]
        }
      ) }),
      allowConvertToLinks && /* @__PURE__ */ (0, import_jsx_runtime347.jsxs)(import_jsx_runtime347.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(import_block_editor169.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(
          import_components99.ToolbarButton,
          {
            title: (0, import_i18n151.__)("Edit"),
            onClick: openModal,
            children: (0, import_i18n151.__)("Edit")
          }
        ) }),
        isOpen && /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(
          ConvertToLinksModal,
          {
            onClick: convertToNavigationLinks2,
            onClose: closeModal,
            disabled: !hasResolvedPages
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(
        BlockContent,
        {
          blockProps,
          innerBlocksProps,
          hasResolvedPages,
          blockList,
          pages,
          parentPageID
        }
      )
    ] });
  }

  // packages/block-library/build-module/page-list/index.mjs
  var { name: name60 } = block_default60;
  var settings60 = {
    icon: pages_default,
    example: {},
    edit: PageListEdit
  };
  var init60 = () => initBlock({ name: name60, metadata: block_default60, settings: settings60 });

  // packages/block-library/build-module/page-list-item/index.mjs
  var page_list_item_exports = {};
  __export(page_list_item_exports, {
    init: () => init61,
    metadata: () => block_default61,
    name: () => name61,
    settings: () => settings61
  });

  // packages/block-library/build-module/page-list-item/block.json
  var block_default61 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/page-list-item",
    title: "Page List Item",
    category: "widgets",
    parent: ["core/page-list"],
    description: "Displays a page inside a list of all pages.",
    keywords: ["page", "menu", "navigation"],
    textdomain: "default",
    attributes: {
      id: {
        type: "number"
      },
      label: {
        type: "string"
      },
      title: {
        type: "string"
      },
      link: {
        type: "string"
      },
      hasChildren: {
        type: "boolean"
      }
    },
    usesContext: [
      "textColor",
      "customTextColor",
      "backgroundColor",
      "customBackgroundColor",
      "overlayTextColor",
      "customOverlayTextColor",
      "overlayBackgroundColor",
      "customOverlayBackgroundColor",
      "fontSize",
      "customFontSize",
      "showSubmenuIcon",
      "style",
      "openSubmenusOnClick",
      "submenuVisibility"
    ],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      lock: false,
      inserter: false,
      __experimentalToolbar: false,
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-page-list-editor",
    style: "wp-block-page-list"
  };

  // packages/block-library/build-module/page-list-item/edit.mjs
  var import_block_editor170 = __toESM(require_block_editor(), 1);
  var import_data94 = __toESM(require_data(), 1);
  var import_core_data53 = __toESM(require_core_data(), 1);
  var import_dom8 = __toESM(require_dom(), 1);

  // packages/block-library/build-module/navigation-link/icons.mjs
  var import_components100 = __toESM(require_components(), 1);
  var import_jsx_runtime348 = __toESM(require_jsx_runtime(), 1);
  var ItemSubmenuIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime348.jsx)(
    import_components100.SVG,
    {
      xmlns: "http://www.w3.org/2000/svg",
      width: "12",
      height: "12",
      viewBox: "0 0 12 12",
      fill: "none",
      children: /* @__PURE__ */ (0, import_jsx_runtime348.jsx)(import_components100.Path, { d: "M1.50002 4L6.00002 8L10.5 4", strokeWidth: "1.5" })
    }
  );

  // packages/block-library/build-module/page-list-item/edit.mjs
  var import_jsx_runtime349 = __toESM(require_jsx_runtime(), 1);
  function useFrontPageId() {
    return (0, import_data94.useSelect)((select9) => {
      const canReadSettings = select9(import_core_data53.store).canUser("read", {
        kind: "root",
        name: "site"
      });
      if (!canReadSettings) {
        return void 0;
      }
      const site = select9(import_core_data53.store).getEntityRecord("root", "site");
      return site?.show_on_front === "page" && site?.page_on_front;
    }, []);
  }
  function PageListItemEdit({ context, attributes: attributes2 }) {
    const { id, label, link, hasChildren, title } = attributes2;
    const isNavigationChild = "showSubmenuIcon" in context;
    const frontPageId = useFrontPageId();
    const submenuVisibility = context.submenuVisibility;
    const openOnClick = submenuVisibility === "click";
    const innerBlocksColors = getColors(context, true);
    const navigationChildBlockProps = getNavigationChildBlockProps(innerBlocksColors);
    const blockProps = (0, import_block_editor170.useBlockProps)(navigationChildBlockProps, {
      className: "wp-block-pages-list__item"
    });
    const innerBlocksProps = (0, import_block_editor170.useInnerBlocksProps)(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime349.jsxs)(
      "li",
      {
        className: clsx_default("wp-block-pages-list__item", {
          "has-child": hasChildren,
          "wp-block-navigation-item": isNavigationChild,
          // Class assignment logic matches PHP rendering in page-list/index.php
          "open-on-click": openOnClick,
          "open-always": submenuVisibility === "always",
          // Must check hover mode explicitly to match PHP elseif structure (index.php:212)
          "open-on-hover-click": submenuVisibility === "hover" && context.showSubmenuIcon,
          "menu-item-home": id === frontPageId
        }),
        children: [
          hasChildren && openOnClick ? /* @__PURE__ */ (0, import_jsx_runtime349.jsxs)(import_jsx_runtime349.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(
              "button",
              {
                type: "button",
                className: "wp-block-navigation-item__content wp-block-navigation-submenu__toggle",
                "aria-expanded": "false",
                dangerouslySetInnerHTML: {
                  __html: (0, import_dom8.safeHTML)(label)
                }
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime349.jsx)("span", { className: "wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon", children: /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(ItemSubmenuIcon2, {}) })
          ] }) : /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(
            "a",
            {
              className: clsx_default("wp-block-pages-list__item__link", {
                "wp-block-navigation-item__content": isNavigationChild
              }),
              href: link,
              dangerouslySetInnerHTML: {
                __html: (0, import_dom8.safeHTML)(title)
              }
            }
          ),
          hasChildren && /* @__PURE__ */ (0, import_jsx_runtime349.jsxs)(import_jsx_runtime349.Fragment, { children: [
            !openOnClick && context.showSubmenuIcon && /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(
              "button",
              {
                className: "wp-block-navigation-item__content wp-block-navigation-submenu__toggle wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon",
                "aria-expanded": "false",
                type: "button",
                children: /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(ItemSubmenuIcon2, {})
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime349.jsx)("ul", { ...innerBlocksProps })
          ] })
        ]
      },
      id
    );
  }

  // packages/block-library/build-module/page-list-item/index.mjs
  var { name: name61 } = block_default61;
  var settings61 = {
    __experimentalLabel: ({ label }) => label,
    icon: page_default,
    example: {},
    edit: PageListItemEdit
  };
  var init61 = () => initBlock({ name: name61, metadata: block_default61, settings: settings61 });

  // packages/block-library/build-module/paragraph/index.mjs
  var paragraph_exports = {};
  __export(paragraph_exports, {
    init: () => init62,
    metadata: () => block_default62,
    name: () => name63,
    settings: () => settings62
  });
  var import_i18n155 = __toESM(require_i18n(), 1);
  var import_blocks76 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/paragraph/deprecated.mjs
  var import_element86 = __toESM(require_element(), 1);
  var import_block_editor171 = __toESM(require_block_editor(), 1);
  var import_i18n152 = __toESM(require_i18n(), 1);
  var import_jsx_runtime350 = __toESM(require_jsx_runtime(), 1);
  var supports = {
    className: false
  };
  var blockAttributes5 = {
    align: {
      type: "string"
    },
    content: {
      type: "string",
      source: "html",
      selector: "p",
      default: ""
    },
    dropCap: {
      type: "boolean",
      default: false
    },
    placeholder: {
      type: "string"
    },
    textColor: {
      type: "string"
    },
    backgroundColor: {
      type: "string"
    },
    fontSize: {
      type: "string"
    },
    direction: {
      type: "string",
      enum: ["ltr", "rtl"]
    },
    style: {
      type: "object"
    }
  };
  var migrateCustomColorsAndFontSizes = (attributes2) => {
    if (!attributes2.customTextColor && !attributes2.customBackgroundColor && !attributes2.customFontSize) {
      return attributes2;
    }
    const style2 = {};
    if (attributes2.customTextColor || attributes2.customBackgroundColor) {
      style2.color = {};
    }
    if (attributes2.customTextColor) {
      style2.color.text = attributes2.customTextColor;
    }
    if (attributes2.customBackgroundColor) {
      style2.color.background = attributes2.customBackgroundColor;
    }
    if (attributes2.customFontSize) {
      style2.typography = { fontSize: attributes2.customFontSize };
    }
    const {
      customTextColor,
      customBackgroundColor,
      customFontSize,
      ...restAttributes
    } = attributes2;
    return {
      ...restAttributes,
      style: style2
    };
  };
  var migrateTextAlign2 = (attributes2) => {
    const { align, ...restAttributes } = attributes2;
    if (!align) {
      return attributes2;
    }
    return {
      ...restAttributes,
      style: {
        ...attributes2.style,
        typography: {
          ...attributes2.style?.typography,
          textAlign: align
        }
      }
    };
  };
  var { style, ...restBlockAttributes } = blockAttributes5;
  var deprecated12 = [
    // Version with `align` attribute.
    {
      supports: {
        className: false,
        typography: {
          fontSize: true
        }
      },
      attributes: blockAttributes5,
      isEligible(attributes2) {
        return !!attributes2.align || !!attributes2.className?.match(
          /\bhas-text-align-(left|center|right)\b/
        );
      },
      save({ attributes: attributes2 }) {
        const { align, content, dropCap, direction } = attributes2;
        const className = clsx_default({
          "has-drop-cap": align === ((0, import_i18n152.isRTL)() ? "left" : "right") || align === "center" ? false : dropCap,
          [`has-text-align-${align}`]: align
        });
        return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)("p", { ...import_block_editor171.useBlockProps.save({ className, dir: direction }), children: /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(import_block_editor171.RichText.Content, { value: content }) });
      },
      migrate: migrateTextAlign2
    },
    // Version without drop cap on aligned text.
    {
      supports,
      attributes: {
        ...restBlockAttributes,
        customTextColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        },
        customFontSize: {
          type: "number"
        }
      },
      migrate: migrateTextAlign2,
      save({ attributes: attributes2 }) {
        const { align, content, dropCap, direction } = attributes2;
        const className = clsx_default({
          "has-drop-cap": align === ((0, import_i18n152.isRTL)() ? "left" : "right") || align === "center" ? false : dropCap,
          [`has-text-align-${align}`]: align
        });
        return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)("p", { ...import_block_editor171.useBlockProps.save({ className, dir: direction }), children: /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(import_block_editor171.RichText.Content, { value: content }) });
      }
    },
    {
      supports,
      attributes: {
        ...restBlockAttributes,
        customTextColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        },
        customFontSize: {
          type: "number"
        }
      },
      migrate(attributes2) {
        return migrateCustomColorsAndFontSizes(
          migrateTextAlign2(attributes2)
        );
      },
      save({ attributes: attributes2 }) {
        const {
          align,
          content,
          dropCap,
          backgroundColor,
          textColor,
          customBackgroundColor,
          customTextColor,
          fontSize,
          customFontSize,
          direction
        } = attributes2;
        const textClass = (0, import_block_editor171.getColorClassName)("color", textColor);
        const backgroundClass = (0, import_block_editor171.getColorClassName)(
          "background-color",
          backgroundColor
        );
        const fontSizeClass = (0, import_block_editor171.getFontSizeClass)(fontSize);
        const className = clsx_default({
          "has-text-color": textColor || customTextColor,
          "has-background": backgroundColor || customBackgroundColor,
          "has-drop-cap": dropCap,
          [`has-text-align-${align}`]: align,
          [fontSizeClass]: fontSizeClass,
          [textClass]: textClass,
          [backgroundClass]: backgroundClass
        });
        const styles = {
          backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
          color: textClass ? void 0 : customTextColor,
          fontSize: fontSizeClass ? void 0 : customFontSize
        };
        return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
          import_block_editor171.RichText.Content,
          {
            tagName: "p",
            style: styles,
            className: className ? className : void 0,
            value: content,
            dir: direction
          }
        );
      }
    },
    {
      supports,
      attributes: {
        ...restBlockAttributes,
        customTextColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        },
        customFontSize: {
          type: "number"
        }
      },
      migrate(attributes2) {
        return migrateCustomColorsAndFontSizes(
          migrateTextAlign2(attributes2)
        );
      },
      save({ attributes: attributes2 }) {
        const {
          align,
          content,
          dropCap,
          backgroundColor,
          textColor,
          customBackgroundColor,
          customTextColor,
          fontSize,
          customFontSize,
          direction
        } = attributes2;
        const textClass = (0, import_block_editor171.getColorClassName)("color", textColor);
        const backgroundClass = (0, import_block_editor171.getColorClassName)(
          "background-color",
          backgroundColor
        );
        const fontSizeClass = (0, import_block_editor171.getFontSizeClass)(fontSize);
        const className = clsx_default({
          "has-text-color": textColor || customTextColor,
          "has-background": backgroundColor || customBackgroundColor,
          "has-drop-cap": dropCap,
          [fontSizeClass]: fontSizeClass,
          [textClass]: textClass,
          [backgroundClass]: backgroundClass
        });
        const styles = {
          backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
          color: textClass ? void 0 : customTextColor,
          fontSize: fontSizeClass ? void 0 : customFontSize,
          textAlign: align
        };
        return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
          import_block_editor171.RichText.Content,
          {
            tagName: "p",
            style: styles,
            className: className ? className : void 0,
            value: content,
            dir: direction
          }
        );
      }
    },
    {
      supports,
      attributes: {
        ...restBlockAttributes,
        customTextColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        },
        customFontSize: {
          type: "number"
        },
        width: {
          type: "string"
        }
      },
      migrate(attributes2) {
        return migrateCustomColorsAndFontSizes(
          migrateTextAlign2(attributes2)
        );
      },
      save({ attributes: attributes2 }) {
        const {
          width,
          align,
          content,
          dropCap,
          backgroundColor,
          textColor,
          customBackgroundColor,
          customTextColor,
          fontSize,
          customFontSize
        } = attributes2;
        const textClass = (0, import_block_editor171.getColorClassName)("color", textColor);
        const backgroundClass = (0, import_block_editor171.getColorClassName)(
          "background-color",
          backgroundColor
        );
        const fontSizeClass = fontSize && `is-${fontSize}-text`;
        const className = clsx_default({
          [`align${width}`]: width,
          "has-background": backgroundColor || customBackgroundColor,
          "has-drop-cap": dropCap,
          [fontSizeClass]: fontSizeClass,
          [textClass]: textClass,
          [backgroundClass]: backgroundClass
        });
        const styles = {
          backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
          color: textClass ? void 0 : customTextColor,
          fontSize: fontSizeClass ? void 0 : customFontSize,
          textAlign: align
        };
        return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
          import_block_editor171.RichText.Content,
          {
            tagName: "p",
            style: styles,
            className: className ? className : void 0,
            value: content
          }
        );
      }
    },
    {
      supports,
      attributes: {
        ...restBlockAttributes,
        fontSize: {
          type: "number"
        }
      },
      save({ attributes: attributes2 }) {
        const {
          width,
          align,
          content,
          dropCap,
          backgroundColor,
          textColor,
          fontSize
        } = attributes2;
        const className = clsx_default({
          [`align${width}`]: width,
          "has-background": backgroundColor,
          "has-drop-cap": dropCap
        });
        const styles = {
          backgroundColor,
          color: textColor,
          fontSize,
          textAlign: align
        };
        return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
          "p",
          {
            style: styles,
            className: className ? className : void 0,
            children: content
          }
        );
      },
      migrate(attributes2) {
        return migrateCustomColorsAndFontSizes(
          migrateTextAlign2({
            ...attributes2,
            customFontSize: Number.isFinite(attributes2.fontSize) ? attributes2.fontSize : void 0,
            customTextColor: attributes2.textColor && "#" === attributes2.textColor[0] ? attributes2.textColor : void 0,
            customBackgroundColor: attributes2.backgroundColor && "#" === attributes2.backgroundColor[0] ? attributes2.backgroundColor : void 0
          })
        );
      }
    },
    {
      supports,
      attributes: {
        ...blockAttributes5,
        content: {
          type: "string",
          source: "html",
          default: ""
        }
      },
      save({ attributes: attributes2 }) {
        return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(import_element86.RawHTML, { children: attributes2.content });
      },
      migrate: (attributes2) => attributes2
    }
  ];
  var deprecated_default29 = deprecated12;

  // packages/block-library/build-module/paragraph/edit.mjs
  var import_i18n153 = __toESM(require_i18n(), 1);
  var import_components101 = __toESM(require_components(), 1);
  var import_block_editor174 = __toESM(require_block_editor(), 1);
  var import_blocks74 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/paragraph/use-enter.mjs
  var import_element87 = __toESM(require_element(), 1);
  var import_compose40 = __toESM(require_compose(), 1);
  var import_keycodes7 = __toESM(require_keycodes(), 1);
  var import_data95 = __toESM(require_data(), 1);
  var import_block_editor172 = __toESM(require_block_editor(), 1);
  var import_blocks73 = __toESM(require_blocks(), 1);
  function useOnEnter(props) {
    const { batch } = (0, import_data95.useRegistry)();
    const {
      moveBlocksToPosition,
      replaceInnerBlocks,
      duplicateBlocks,
      insertBlock
    } = (0, import_data95.useDispatch)(import_block_editor172.store);
    const {
      getBlockRootClientId,
      getBlockIndex,
      getBlockOrder,
      getBlockName,
      getBlock,
      getNextBlockClientId,
      canInsertBlockType
    } = (0, import_data95.useSelect)(import_block_editor172.store);
    const propsRef = (0, import_element87.useRef)(props);
    propsRef.current = props;
    return (0, import_compose40.useRefEffect)((element) => {
      function onKeyDown(event) {
        if (event.defaultPrevented) {
          return;
        }
        if (event.keyCode !== import_keycodes7.ENTER) {
          return;
        }
        const { content, clientId } = propsRef.current;
        if (content.length) {
          return;
        }
        const wrapperClientId = getBlockRootClientId(clientId);
        if (!(0, import_blocks73.hasBlockSupport)(
          getBlockName(wrapperClientId),
          "__experimentalOnEnter",
          false
        )) {
          return;
        }
        const order = getBlockOrder(wrapperClientId);
        const position = order.indexOf(clientId);
        if (position === order.length - 1) {
          let newWrapperClientId = wrapperClientId;
          while (!canInsertBlockType(
            getBlockName(clientId),
            getBlockRootClientId(newWrapperClientId)
          )) {
            newWrapperClientId = getBlockRootClientId(newWrapperClientId);
          }
          if (typeof newWrapperClientId === "string") {
            event.preventDefault();
            moveBlocksToPosition(
              [clientId],
              wrapperClientId,
              getBlockRootClientId(newWrapperClientId),
              getBlockIndex(newWrapperClientId) + 1
            );
          }
          return;
        }
        const defaultBlockName = (0, import_blocks73.getDefaultBlockName)();
        if (!canInsertBlockType(
          defaultBlockName,
          getBlockRootClientId(wrapperClientId)
        )) {
          return;
        }
        event.preventDefault();
        const wrapperBlock = getBlock(wrapperClientId);
        batch(() => {
          duplicateBlocks([wrapperClientId]);
          const blockIndex = getBlockIndex(wrapperClientId);
          replaceInnerBlocks(
            wrapperClientId,
            wrapperBlock.innerBlocks.slice(0, position)
          );
          replaceInnerBlocks(
            getNextBlockClientId(wrapperClientId),
            wrapperBlock.innerBlocks.slice(position + 1)
          );
          insertBlock(
            (0, import_blocks73.createBlock)(defaultBlockName),
            blockIndex + 1,
            getBlockRootClientId(wrapperClientId),
            true
          );
        });
      }
      element.addEventListener("keydown", onKeyDown);
      return () => {
        element.removeEventListener("keydown", onKeyDown);
      };
    }, []);
  }

  // packages/block-library/build-module/paragraph/deprecated-attributes.mjs
  var import_compose41 = __toESM(require_compose(), 1);
  var import_element88 = __toESM(require_element(), 1);
  var import_deprecated31 = __toESM(require_deprecated(), 1);
  var import_data96 = __toESM(require_data(), 1);
  var import_block_editor173 = __toESM(require_block_editor(), 1);
  function useDeprecatedAlign(align, style2, setAttributes) {
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data96.useDispatch)(import_block_editor173.store);
    const updateStyleWithAlign = (0, import_compose41.useEvent)(() => {
      (0, import_deprecated31.default)("align attribute in paragraph block", {
        alternative: "style.typography.textAlign",
        since: "7.0"
      });
      __unstableMarkNextChangeAsNotPersistent();
      setAttributes({
        style: {
          ...style2,
          typography: {
            ...style2?.typography,
            textAlign: align
          }
        }
      });
    });
    const lastUpdatedAlignRef = (0, import_element88.useRef)();
    (0, import_element88.useEffect)(() => {
      if (align === "full" || align === "wide" || align === lastUpdatedAlignRef.current) {
        return;
      }
      lastUpdatedAlignRef.current = align;
      updateStyleWithAlign();
    }, [align, updateStyleWithAlign]);
  }

  // packages/block-library/build-module/paragraph/edit.mjs
  var import_jsx_runtime351 = __toESM(require_jsx_runtime(), 1);
  function ParagraphRTLControl({ direction, setDirection }) {
    return (0, import_i18n153.isRTL)() && /* @__PURE__ */ (0, import_jsx_runtime351.jsx)(
      import_components101.ToolbarButton,
      {
        icon: format_ltr_default,
        title: (0, import_i18n153._x)("Left to right", "editor button"),
        isActive: direction === "ltr",
        onClick: () => {
          setDirection(direction === "ltr" ? void 0 : "ltr");
        }
      }
    );
  }
  function hasDropCapDisabled(align) {
    return align === ((0, import_i18n153.isRTL)() ? "left" : "right") || align === "center";
  }
  function DropCapControl({ clientId, attributes: attributes2, setAttributes, name: name123 }) {
    const [isDropCapFeatureEnabled] = (0, import_block_editor174.useSettings)("typography.dropCap");
    if (!isDropCapFeatureEnabled) {
      return null;
    }
    const { style: style2, dropCap } = attributes2;
    const textAlign = style2?.typography?.textAlign;
    let helpText;
    if (hasDropCapDisabled(textAlign)) {
      helpText = (0, import_i18n153.__)("Not available for aligned text.");
    } else if (dropCap) {
      helpText = (0, import_i18n153.__)("Showing large initial letter.");
    } else {
      helpText = (0, import_i18n153.__)("Show a large initial letter.");
    }
    const isDropCapControlEnabledByDefault = (0, import_blocks74.getBlockSupport)(
      name123,
      "typography.defaultControls.dropCap",
      false
    );
    return /* @__PURE__ */ (0, import_jsx_runtime351.jsx)(import_block_editor174.InspectorControls, { group: "typography", children: /* @__PURE__ */ (0, import_jsx_runtime351.jsx)(
      import_components101.__experimentalToolsPanelItem,
      {
        hasValue: () => !!dropCap,
        label: (0, import_i18n153.__)("Drop cap"),
        isShownByDefault: isDropCapControlEnabledByDefault,
        onDeselect: () => setAttributes({ dropCap: false }),
        resetAllFilter: () => ({ dropCap: false }),
        panelId: clientId,
        children: /* @__PURE__ */ (0, import_jsx_runtime351.jsx)(
          import_components101.ToggleControl,
          {
            label: (0, import_i18n153.__)("Drop cap"),
            checked: !!dropCap,
            onChange: () => setAttributes({ dropCap: !dropCap }),
            help: helpText,
            disabled: hasDropCapDisabled(textAlign)
          }
        )
      }
    ) });
  }
  function ParagraphBlock({
    attributes: attributes2,
    mergeBlocks,
    onReplace,
    onRemove,
    setAttributes,
    clientId,
    isSelected: isSingleSelected,
    name: name123
  }) {
    const { content, direction, dropCap, placeholder: placeholder2, style: style2 } = attributes2;
    const textAlign = style2?.typography?.textAlign;
    useDeprecatedAlign(attributes2.align, style2, setAttributes);
    const blockProps = (0, import_block_editor174.useBlockProps)({
      ref: useOnEnter({ clientId, content }),
      className: clsx_default({
        "has-drop-cap": hasDropCapDisabled(textAlign) ? false : dropCap
      }),
      style: { direction }
    });
    const blockEditingMode = (0, import_block_editor174.useBlockEditingMode)();
    return /* @__PURE__ */ (0, import_jsx_runtime351.jsxs)(import_jsx_runtime351.Fragment, { children: [
      blockEditingMode === "default" && /* @__PURE__ */ (0, import_jsx_runtime351.jsx)(import_block_editor174.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime351.jsx)(
        ParagraphRTLControl,
        {
          direction,
          setDirection: (newDirection) => setAttributes({ direction: newDirection })
        }
      ) }),
      isSingleSelected && /* @__PURE__ */ (0, import_jsx_runtime351.jsx)(
        DropCapControl,
        {
          name: name123,
          clientId,
          attributes: attributes2,
          setAttributes
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime351.jsx)(
        import_block_editor174.RichText,
        {
          identifier: "content",
          tagName: "p",
          ...blockProps,
          value: content,
          onChange: (newContent) => setAttributes({ content: newContent }),
          onMerge: mergeBlocks,
          onReplace,
          onRemove,
          "aria-label": import_block_editor174.RichText.isEmpty(content) ? (0, import_i18n153.__)(
            "Empty block; start writing or type forward slash to choose a block"
          ) : (0, import_i18n153.__)("Block: Paragraph"),
          "data-empty": import_block_editor174.RichText.isEmpty(content),
          placeholder: placeholder2 || (0, import_i18n153.__)("Type / to choose a block"),
          "data-custom-placeholder": placeholder2 ? true : void 0,
          __unstableEmbedURLOnPaste: true,
          __unstableAllowPrefixTransformations: true
        }
      )
    ] });
  }
  var edit_default22 = ParagraphBlock;

  // packages/block-library/build-module/paragraph/block.json
  var block_default62 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/paragraph",
    title: "Paragraph",
    category: "text",
    description: "Start with the basic building block of all narrative.",
    keywords: ["text"],
    textdomain: "default",
    attributes: {
      content: {
        type: "rich-text",
        source: "rich-text",
        selector: "p",
        role: "content"
      },
      dropCap: {
        type: "boolean",
        default: false
      },
      placeholder: {
        type: "string"
      },
      direction: {
        type: "string",
        enum: ["ltr", "rtl"]
      }
    },
    supports: {
      align: ["wide", "full"],
      splitting: true,
      anchor: true,
      className: false,
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        textColumns: true,
        textIndent: true,
        __experimentalFontFamily: true,
        __experimentalTextDecoration: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalWritingMode: true,
        fitText: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalSelector: "p",
      __unstablePasteTextInline: true,
      interactivity: {
        clientNavigation: true
      }
    },
    selectors: {
      root: "p",
      typography: {
        textIndent: ".wp-block-paragraph + .wp-block-paragraph"
      }
    },
    editorStyle: "wp-block-paragraph-editor",
    style: "wp-block-paragraph"
  };

  // packages/block-library/build-module/paragraph/save.mjs
  var import_block_editor175 = __toESM(require_block_editor(), 1);
  var import_i18n154 = __toESM(require_i18n(), 1);
  var import_jsx_runtime352 = __toESM(require_jsx_runtime(), 1);
  function save37({ attributes: attributes2 }) {
    const { content, dropCap, direction, style: style2 } = attributes2;
    const textAlign = style2?.typography?.textAlign;
    const className = clsx_default({
      "has-drop-cap": textAlign === ((0, import_i18n154.isRTL)() ? "left" : "right") || textAlign === "center" ? false : dropCap
    });
    return /* @__PURE__ */ (0, import_jsx_runtime352.jsx)("p", { ...import_block_editor175.useBlockProps.save({ className, dir: direction }), children: /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(import_block_editor175.RichText.Content, { value: content }) });
  }

  // packages/block-library/build-module/paragraph/transforms.mjs
  var import_blocks75 = __toESM(require_blocks(), 1);
  var { name: name62 } = block_default62;
  var transforms21 = {
    from: [
      {
        type: "raw",
        // Paragraph is a fallback and should be matched last.
        priority: 20,
        selector: "p",
        schema: ({ phrasingContentSchema, isPaste }) => ({
          p: {
            children: phrasingContentSchema,
            attributes: isPaste ? [] : ["style", "id"]
          }
        }),
        transform(node) {
          const attributes2 = (0, import_blocks75.getBlockAttributes)(name62, node.outerHTML);
          const { textAlign } = node.style || {};
          if (textAlign === "left" || textAlign === "center" || textAlign === "right") {
            attributes2.style = {
              ...attributes2.style,
              typography: {
                ...attributes2.style?.typography,
                textAlign
              }
            };
          }
          return (0, import_blocks75.createBlock)(name62, attributes2);
        }
      }
    ]
  };
  var transforms_default22 = transforms21;

  // packages/block-library/build-module/paragraph/index.mjs
  var { fieldsKey: fieldsKey14, formKey: formKey14 } = unlock(import_blocks76.privateApis);
  var { name: name63 } = block_default62;
  var settings62 = {
    icon: paragraph_default,
    example: {
      attributes: {
        content: (0, import_i18n155.__)(
          "In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing."
        )
      }
    },
    __experimentalLabel(attributes2, { context }) {
      const customName = attributes2?.metadata?.name;
      if ((context === "list-view" || context === "breadcrumb") && customName) {
        return customName;
      }
      if (context === "accessibility") {
        if (customName) {
          return customName;
        }
        const { content } = attributes2;
        return !content || content.length === 0 ? (0, import_i18n155.__)("Empty") : content;
      }
    },
    transforms: transforms_default22,
    deprecated: deprecated_default29,
    merge(attributes2, attributesToMerge) {
      return {
        content: (attributes2.content || "") + (attributesToMerge.content || "")
      };
    },
    edit: edit_default22,
    save: save37
  };
  if (window.__experimentalContentOnlyInspectorFields) {
    settings62[fieldsKey14] = [
      {
        id: "content",
        label: (0, import_i18n155.__)("Content"),
        type: "text",
        Edit: "rich-text"
        // TODO: replace with custom component
      }
    ];
    settings62[formKey14] = {
      fields: ["content"]
    };
  }
  var init62 = () => initBlock({ name: name63, metadata: block_default62, settings: settings62 });

  // packages/block-library/build-module/playlist/index.mjs
  var playlist_exports = {};
  __export(playlist_exports, {
    init: () => init63,
    metadata: () => block_default63,
    name: () => name64,
    settings: () => settings63
  });

  // packages/block-library/build-module/playlist/block.json
  var block_default63 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    __experimental: true,
    name: "core/playlist",
    title: "Playlist",
    category: "media",
    description: "Embed a simple playlist.",
    keywords: ["music", "sound"],
    textdomain: "default",
    allowedBlocks: ["core/playlist-track"],
    attributes: {
      currentTrack: {
        type: "string"
      },
      type: {
        type: "string",
        default: "audio"
      },
      order: {
        type: "string",
        default: "asc"
      },
      showTracklist: {
        type: "boolean",
        default: true
      },
      showImages: {
        type: "boolean",
        default: true
      },
      showArtists: {
        type: "boolean",
        default: true
      },
      showNumbers: {
        type: "boolean",
        default: true
      },
      caption: {
        type: "string"
      }
    },
    providesContext: {
      showArtists: "showArtists",
      currentTrack: "currentTrack"
    },
    supports: {
      anchor: true,
      align: true,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      interactivity: true,
      spacing: {
        margin: true,
        padding: true
      }
    },
    editorStyle: "wp-block-playlist-editor",
    style: "wp-block-playlist"
  };

  // node_modules/uuid/dist/esm-browser/rng.js
  var getRandomValues;
  var rnds8 = new Uint8Array(16);
  function rng() {
    if (!getRandomValues) {
      getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
      if (!getRandomValues) {
        throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
      }
    }
    return getRandomValues(rnds8);
  }

  // node_modules/uuid/dist/esm-browser/stringify.js
  var byteToHex = [];
  for (let i2 = 0; i2 < 256; ++i2) {
    byteToHex.push((i2 + 256).toString(16).slice(1));
  }
  function unsafeStringify(arr, offset = 0) {
    return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
  }

  // node_modules/uuid/dist/esm-browser/native.js
  var randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
  var native_default = {
    randomUUID
  };

  // node_modules/uuid/dist/esm-browser/v4.js
  function v47(options2, buf, offset) {
    if (native_default.randomUUID && !buf && !options2) {
      return native_default.randomUUID();
    }
    options2 = options2 || {};
    const rnds = options2.random || (options2.rng || rng)();
    rnds[6] = rnds[6] & 15 | 64;
    rnds[8] = rnds[8] & 63 | 128;
    if (buf) {
      offset = offset || 0;
      for (let i2 = 0; i2 < 16; ++i2) {
        buf[offset + i2] = rnds[i2];
      }
      return buf;
    }
    return unsafeStringify(rnds);
  }
  var v4_default = v47;

  // packages/block-library/build-module/playlist/edit.mjs
  var import_element89 = __toESM(require_element(), 1);
  var import_block_editor176 = __toESM(require_block_editor(), 1);
  var import_components102 = __toESM(require_components(), 1);
  var import_data97 = __toESM(require_data(), 1);
  var import_notices14 = __toESM(require_notices(), 1);
  var import_i18n156 = __toESM(require_i18n(), 1);
  var import_dom9 = __toESM(require_dom(), 1);
  var import_blocks77 = __toESM(require_blocks(), 1);
  var import_jsx_runtime353 = __toESM(require_jsx_runtime(), 1);
  var ALLOWED_MEDIA_TYPES6 = ["audio"];
  var CurrentTrack = ({ track, showImages, onTrackEnd }) => {
    const trackTitle = {
      dangerouslySetInnerHTML: {
        __html: (0, import_dom9.safeHTML)(track?.title ? track.title : (0, import_i18n156.__)("Untitled"))
      }
    };
    const trackArtist = {
      dangerouslySetInnerHTML: {
        __html: (0, import_dom9.safeHTML)(
          track?.artist ? track.artist : (0, import_i18n156.__)("Unknown artist")
        )
      }
    };
    const trackAlbum = {
      dangerouslySetInnerHTML: {
        __html: (0, import_dom9.safeHTML)(
          track?.album ? track.album : (0, import_i18n156.__)("Unknown album")
        )
      }
    };
    let ariaLabel;
    if (track?.title && track?.artist && track?.album) {
      ariaLabel = (0, import_dom9.__unstableStripHTML)(
        (0, import_i18n156.sprintf)(
          /* translators: %1$s: track title, %2$s artist name, %3$s: album name. */
          (0, import_i18n156._x)(
            "%1$s by %2$s from the album %3$s",
            "track title, artist name, album name"
          ),
          track?.title,
          track?.artist,
          track?.album
        )
      );
    } else if (track?.title) {
      ariaLabel = (0, import_dom9.__unstableStripHTML)(track.title);
    } else {
      ariaLabel = (0, import_dom9.__unstableStripHTML)((0, import_i18n156.__)("Untitled"));
    }
    return /* @__PURE__ */ (0, import_jsx_runtime353.jsxs)(import_jsx_runtime353.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime353.jsxs)("div", { className: "wp-block-playlist__current-item", children: [
        showImages && track?.image && /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
          "img",
          {
            className: "wp-block-playlist__item-image",
            src: track.image,
            alt: "",
            width: "70px",
            height: "70px"
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime353.jsxs)("div", { children: [
          !track?.title ? /* @__PURE__ */ (0, import_jsx_runtime353.jsx)("span", { className: "wp-block-playlist__item-title", children: /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(import_components102.Spinner, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
            "span",
            {
              className: "wp-block-playlist__item-title",
              ...trackTitle
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime353.jsxs)("div", { className: "wp-block-playlist__current-item-artist-album", children: [
            /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
              "span",
              {
                className: "wp-block-playlist__item-artist",
                ...trackArtist
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
              "span",
              {
                className: "wp-block-playlist__item-album",
                ...trackAlbum
              }
            )
          ] })
        ] })
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
        "audio",
        {
          controls: "controls",
          src: track?.url ? track.url : "",
          onEnded: onTrackEnd,
          "aria-label": ariaLabel,
          tabIndex: 0
        }
      )
    ] });
  };
  var PlaylistEdit = ({
    attributes: attributes2,
    setAttributes,
    isSelected,
    insertBlocksAfter,
    clientId
  }) => {
    const {
      order,
      showTracklist,
      showNumbers,
      showImages,
      showArtists,
      currentTrack
    } = attributes2;
    const [trackListIndex, setTrackListIndex] = (0, import_element89.useState)(0);
    const blockProps = (0, import_block_editor176.useBlockProps)();
    const { replaceInnerBlocks, __unstableMarkNextChangeAsNotPersistent } = (0, import_data97.useDispatch)(import_block_editor176.store);
    const { createErrorNotice } = (0, import_data97.useDispatch)(import_notices14.store);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    function onUploadError(message) {
      createErrorNotice(message, { type: "snackbar" });
    }
    const { updateBlockAttributes } = (0, import_data97.useDispatch)(import_block_editor176.store);
    const { innerBlockTracks } = (0, import_data97.useSelect)(
      (select9) => {
        const { getBlock: _getBlock } = select9(import_block_editor176.store);
        return {
          innerBlockTracks: _getBlock(clientId)?.innerBlocks ?? []
        };
      },
      [clientId]
    );
    (0, import_element89.useEffect)(() => {
      const seen = /* @__PURE__ */ new Set();
      let hasDuplicates = false;
      const updatedBlocks = innerBlockTracks.map((block) => {
        if (seen.has(block.attributes.uniqueId)) {
          hasDuplicates = true;
          return {
            ...block,
            attributes: {
              ...block.attributes,
              uniqueId: v4_default()
            }
          };
        }
        seen.add(block.attributes.uniqueId);
        return block;
      });
      if (hasDuplicates) {
        replaceInnerBlocks(clientId, updatedBlocks);
      }
    }, [innerBlockTracks, clientId, replaceInnerBlocks]);
    const validTracks = innerBlockTracks.filter(
      (block) => !!block.attributes.uniqueId
    );
    const tracks = validTracks.map((block) => block.attributes);
    const firstTrackId = validTracks[0]?.attributes?.uniqueId;
    (0, import_element89.useEffect)(() => {
      if (tracks.length === 0) {
        if (currentTrack !== null) {
          updateBlockAttributes(clientId, { currentTrack: null });
        }
      } else if (
        // If the currentTrack is not the first track, update it to the first track.
        firstTrackId && firstTrackId !== currentTrack
      ) {
        updateBlockAttributes(clientId, { currentTrack: firstTrackId });
      }
    }, [
      tracks,
      currentTrack,
      firstTrackId,
      clientId,
      updateBlockAttributes
    ]);
    const onSelectTracks = (0, import_element89.useCallback)(
      (media) => {
        if (!media) {
          return;
        }
        if (!Array.isArray(media)) {
          media = [media];
        }
        const trackAttributes = (track) => ({
          id: track.id || track.url,
          // Attachment ID or URL.
          uniqueId: v4_default(),
          // Unique ID for the track.
          src: track.url,
          title: track.title,
          artist: track.artist || track?.meta?.artist || track?.media_details?.artist || (0, import_i18n156.__)("Unknown artist"),
          album: track.album || track?.meta?.album || track?.media_details?.album || (0, import_i18n156.__)("Unknown album"),
          length: track?.fileLength || track?.media_details?.length_formatted,
          // Prevent using the default media attachment icon as the track image.
          // Note: Image is not available when a new track is uploaded.
          image: track?.image?.src && track?.image?.src.endsWith("/images/media/audio.svg") ? "" : track?.image?.src
        });
        const trackList = media.map(trackAttributes);
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({
          currentTrack: trackList.length > 0 ? trackList[0].uniqueId : null
        });
        const newBlocks = trackList.map(
          (track) => (0, import_blocks77.createBlock)("core/playlist-track", track)
        );
        replaceInnerBlocks(clientId, newBlocks);
      },
      [
        __unstableMarkNextChangeAsNotPersistent,
        setAttributes,
        replaceInnerBlocks,
        clientId
      ]
    );
    const onTrackEnd = (0, import_element89.useCallback)(() => {
      if (trackListIndex < tracks.length - 1) {
        if (tracks[trackListIndex + 1]?.uniqueId) {
          setTrackListIndex(trackListIndex + 1);
          setAttributes({
            currentTrack: tracks[trackListIndex + 1].uniqueId
          });
        }
      } else {
        setTrackListIndex(0);
        if (tracks[0].uniqueId) {
          setAttributes({ currentTrack: tracks[0].uniqueId });
        } else if (tracks.length > 0) {
          const validTrack = tracks.find(
            (track) => track.uniqueId !== void 0
          );
          if (validTrack) {
            setAttributes({ currentTrack: validTrack.uniqueId });
          }
        }
      }
    }, [setAttributes, trackListIndex, tracks]);
    const onChangeOrder = (0, import_element89.useCallback)(
      (trackOrder) => {
        const sortedBlocks = [...innerBlockTracks].sort((a2, b2) => {
          const titleA = a2.attributes.title || "";
          const titleB = b2.attributes.title || "";
          if (trackOrder === "asc") {
            return titleA.localeCompare(titleB);
          }
          return titleB.localeCompare(titleA);
        });
        const sortedTracks = sortedBlocks.map(
          (block) => block.attributes
        );
        replaceInnerBlocks(clientId, sortedBlocks);
        setAttributes({
          order: trackOrder,
          currentTrack: sortedTracks.length > 0 && sortedTracks[0].uniqueId !== currentTrack ? sortedTracks[0].uniqueId : currentTrack
        });
      },
      [
        clientId,
        currentTrack,
        innerBlockTracks,
        replaceInnerBlocks,
        setAttributes
      ]
    );
    function toggleAttribute(attribute) {
      return (newValue) => {
        setAttributes({ [attribute]: newValue });
      };
    }
    const hasSelectedChild = (0, import_data97.useSelect)(
      (select9) => select9(import_block_editor176.store).hasSelectedInnerBlock(clientId),
      [clientId]
    );
    const hasAnySelected = isSelected || hasSelectedChild;
    const innerBlocksProps = (0, import_block_editor176.useInnerBlocksProps)(blockProps, {
      __experimentalAppenderTagName: "li",
      renderAppender: hasAnySelected && import_block_editor176.InnerBlocks.ButtonBlockAppender
    });
    if (!tracks || Array.isArray(tracks) && tracks.length === 0) {
      return /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
        "div",
        {
          ...blockProps,
          className: clsx_default("is-placeholder", blockProps.className),
          children: /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
            import_block_editor176.MediaPlaceholder,
            {
              icon: /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(import_block_editor176.BlockIcon, { icon: audio_default }),
              labels: {
                title: (0, import_i18n156.__)("Playlist"),
                instructions: (0, import_i18n156.__)(
                  "Upload an audio file or pick one from your media library."
                )
              },
              onSelect: onSelectTracks,
              accept: "audio/*",
              multiple: true,
              allowedTypes: ALLOWED_MEDIA_TYPES6,
              onError: onUploadError
            }
          )
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime353.jsxs)(import_jsx_runtime353.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(import_block_editor176.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
        import_block_editor176.MediaReplaceFlow,
        {
          name: (0, import_i18n156.__)("Edit"),
          onSelect: onSelectTracks,
          accept: "audio/*",
          multiple: true,
          mediaIds: tracks.filter((track) => track.id).map((track) => track.id),
          allowedTypes: ALLOWED_MEDIA_TYPES6,
          onError: onUploadError
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(import_block_editor176.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime353.jsxs)(
        import_components102.__experimentalToolsPanel,
        {
          label: (0, import_i18n156.__)("Settings"),
          resetAll: () => {
            setAttributes({
              showTracklist: true,
              showArtists: true,
              showNumbers: true,
              showImages: true,
              order: "asc"
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
              import_components102.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n156.__)("Show Tracklist"),
                isShownByDefault: true,
                hasValue: () => showTracklist !== true,
                onDeselect: () => setAttributes({ showTracklist: true }),
                children: /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
                  import_components102.ToggleControl,
                  {
                    label: (0, import_i18n156.__)("Show Tracklist"),
                    onChange: toggleAttribute("showTracklist"),
                    checked: showTracklist
                  }
                )
              }
            ),
            showTracklist && /* @__PURE__ */ (0, import_jsx_runtime353.jsxs)(import_jsx_runtime353.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
                import_components102.__experimentalToolsPanelItem,
                {
                  label: (0, import_i18n156.__)("Show artist name in Tracklist"),
                  isShownByDefault: true,
                  hasValue: () => showArtists !== true,
                  onDeselect: () => setAttributes({ showArtists: true }),
                  children: /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
                    import_components102.ToggleControl,
                    {
                      label: (0, import_i18n156.__)(
                        "Show artist name in Tracklist"
                      ),
                      onChange: toggleAttribute(
                        "showArtists"
                      ),
                      checked: showArtists
                    }
                  )
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
                import_components102.__experimentalToolsPanelItem,
                {
                  label: (0, import_i18n156.__)("Show number in Tracklist"),
                  isShownByDefault: true,
                  hasValue: () => showNumbers !== true,
                  onDeselect: () => setAttributes({ showNumbers: true }),
                  children: /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
                    import_components102.ToggleControl,
                    {
                      label: (0, import_i18n156.__)("Show number in Tracklist"),
                      onChange: toggleAttribute(
                        "showNumbers"
                      ),
                      checked: showNumbers
                    }
                  )
                }
              )
            ] }),
            /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
              import_components102.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n156.__)("Show images"),
                isShownByDefault: true,
                hasValue: () => showImages !== true,
                onDeselect: () => setAttributes({ showImages: true }),
                children: /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
                  import_components102.ToggleControl,
                  {
                    label: (0, import_i18n156.__)("Show images"),
                    onChange: toggleAttribute("showImages"),
                    checked: showImages
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
              import_components102.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n156.__)("Order"),
                isShownByDefault: true,
                hasValue: () => order !== "asc",
                onDeselect: () => setAttributes({ order: "asc" }),
                children: /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
                  import_components102.SelectControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n156.__)("Order"),
                    value: order,
                    options: [
                      { label: (0, import_i18n156.__)("Descending"), value: "desc" },
                      { label: (0, import_i18n156.__)("Ascending"), value: "asc" }
                    ],
                    onChange: (value) => onChangeOrder(value)
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime353.jsxs)("figure", { ...blockProps, children: [
        /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(import_components102.Disabled, { isDisabled: !isSelected, children: /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
          CurrentTrack,
          {
            track: tracks[trackListIndex],
            showImages,
            onTrackEnd
          }
        ) }),
        showTracklist && /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
          "ol",
          {
            className: clsx_default("wp-block-playlist__tracklist", {
              "wp-block-playlist__tracklist-show-numbers": showNumbers
            }),
            children: innerBlocksProps.children
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
          Caption,
          {
            attributes: attributes2,
            setAttributes,
            isSelected,
            insertBlocksAfter,
            label: (0, import_i18n156.__)("Playlist caption text"),
            showToolbarButton: isSelected,
            style: { marginTop: 16 }
          }
        )
      ] })
    ] });
  };
  var edit_default23 = PlaylistEdit;

  // packages/block-library/build-module/playlist/save.mjs
  var import_block_editor177 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime354 = __toESM(require_jsx_runtime(), 1);
  function saveWithInnerBlocks2({ attributes: attributes2 }) {
    const { caption, showNumbers, showTracklist, showArtists } = attributes2;
    const blockProps = import_block_editor177.useBlockProps.save();
    const innerBlocksProps = import_block_editor177.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime354.jsxs)("figure", { ...innerBlocksProps, children: [
      /* @__PURE__ */ (0, import_jsx_runtime354.jsx)(
        "ol",
        {
          className: clsx_default("wp-block-playlist__tracklist", {
            "wp-block-playlist__tracklist-is-hidden": !showTracklist,
            "wp-block-playlist__tracklist-artist-is-hidden": !showArtists,
            "wp-block-playlist__tracklist-show-numbers": showNumbers
          }),
          children: innerBlocksProps.children
        }
      ),
      !import_block_editor177.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime354.jsx)(
        import_block_editor177.RichText.Content,
        {
          tagName: "figcaption",
          className: (0, import_block_editor177.__experimentalGetElementClassName)("caption"),
          value: caption
        }
      )
    ] });
  }

  // packages/block-library/build-module/playlist/index.mjs
  var { name: name64 } = block_default63;
  var settings63 = {
    icon: audio_default,
    edit: edit_default23,
    save: saveWithInnerBlocks2
  };
  var init63 = () => initBlock({ name: name64, metadata: block_default63, settings: settings63 });

  // packages/block-library/build-module/playlist-track/index.mjs
  var playlist_track_exports = {};
  __export(playlist_track_exports, {
    init: () => init64,
    metadata: () => block_default64,
    name: () => name65,
    settings: () => settings64
  });

  // packages/block-library/build-module/playlist-track/block.json
  var block_default64 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    __experimental: true,
    name: "core/playlist-track",
    title: "Playlist track",
    category: "media",
    parent: ["core/playlist"],
    description: "Playlist track.",
    keywords: ["music", "sound"],
    textdomain: "default",
    usesContext: ["showArtists", "currentTrack"],
    attributes: {
      blob: {
        type: "string",
        role: "local"
      },
      id: {
        type: "number"
      },
      uniqueId: {
        type: "string"
      },
      src: {
        type: "string"
      },
      type: {
        type: "string",
        default: "audio"
      },
      album: {
        type: "string"
      },
      artist: {
        type: "string"
      },
      image: {
        type: "string"
      },
      length: {
        type: "string"
      },
      title: {
        type: "string"
      }
    },
    supports: {
      html: false,
      interactivity: {
        clientNavigation: true
      },
      reusable: false
    },
    style: "wp-block-playlist-track"
  };

  // packages/block-library/build-module/playlist-track/edit.mjs
  var import_blob16 = __toESM(require_blob(), 1);
  var import_element90 = __toESM(require_element(), 1);
  var import_block_editor178 = __toESM(require_block_editor(), 1);
  var import_components103 = __toESM(require_components(), 1);
  var import_data98 = __toESM(require_data(), 1);
  var import_notices15 = __toESM(require_notices(), 1);
  var import_i18n157 = __toESM(require_i18n(), 1);
  var import_dom10 = __toESM(require_dom(), 1);
  var import_jsx_runtime355 = __toESM(require_jsx_runtime(), 1);
  var ALLOWED_MEDIA_TYPES7 = ["audio"];
  var ALBUM_COVER_ALLOWED_MEDIA_TYPES = ["image"];
  var PlaylistTrackEdit = ({ attributes: attributes2, setAttributes, context }) => {
    const { id, uniqueId, src, album, artist, image, length, title } = attributes2;
    const [temporaryURL, setTemporaryURL] = (0, import_element90.useState)(attributes2.blob);
    const showArtists = context?.showArtists;
    const currentTrack = context?.currentTrack;
    const imageButton = (0, import_element90.useRef)();
    const blockProps = (0, import_block_editor178.useBlockProps)();
    const { createErrorNotice } = (0, import_data98.useDispatch)(import_notices15.store);
    function onUploadError(message) {
      createErrorNotice(message, { type: "snackbar" });
    }
    useUploadMediaFromBlobURL({
      src: temporaryURL,
      allowedTypes: ALLOWED_MEDIA_TYPES7,
      onChange: onSelectTrack,
      onError: onUploadError
    });
    function onSelectTrack(media) {
      if (!media || !media.url) {
        setAttributes({
          blob: void 0,
          id: void 0,
          uniqueId: void 0,
          artist: void 0,
          album: void 0,
          image: void 0,
          length: void 0,
          title: void 0,
          url: void 0
        });
        setTemporaryURL();
        return;
      }
      if ((0, import_blob16.isBlobURL)(media.url)) {
        setTemporaryURL(media.url);
        return;
      }
      setAttributes({
        blob: void 0,
        id: media.id,
        uniqueId: v4_default(),
        src: media.url,
        artist: media.artist || media?.meta?.artist || media?.media_details?.artist || (0, import_i18n157.__)("Unknown artist"),
        album: media.album || media?.meta?.album || media?.media_details?.album || (0, import_i18n157.__)("Unknown album"),
        // Prevent using the default media attachment icon as the track image.
        image: media?.image?.src && media?.image?.src.endsWith("/images/media/audio.svg") ? "" : media?.image?.src,
        length: media?.fileLength || media?.media_details?.length_formatted,
        title: media.title
      });
      setTemporaryURL();
    }
    function onSelectAlbumCoverImage(coverImage) {
      setAttributes({ image: coverImage.url });
    }
    function onRemoveAlbumCoverImage() {
      setAttributes({ image: void 0 });
      imageButton.current.focus();
    }
    if (!src && !temporaryURL) {
      return /* @__PURE__ */ (0, import_jsx_runtime355.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
        import_block_editor178.MediaPlaceholder,
        {
          icon: /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(import_block_editor178.BlockIcon, { icon: audio_default }),
          labels: {
            title: (0, import_i18n157.__)("Track"),
            instructions: (0, import_i18n157.__)(
              "Upload an audio file or pick one from your media library."
            )
          },
          onSelect: onSelectTrack,
          accept: "audio/*",
          allowedTypes: ALLOWED_MEDIA_TYPES7,
          value: attributes2,
          onError: onUploadError
        }
      ) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)(import_jsx_runtime355.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(import_block_editor178.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
        import_block_editor178.MediaReplaceFlow,
        {
          name: (0, import_i18n157.__)("Replace"),
          onSelect: onSelectTrack,
          accept: "audio/*",
          mediaId: id,
          mediaURL: src,
          allowedTypes: ALLOWED_MEDIA_TYPES7,
          onError: onUploadError
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(import_block_editor178.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)(import_components103.PanelBody, { title: (0, import_i18n157.__)("Settings"), children: [
        /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
          import_components103.TextControl,
          {
            __next40pxDefaultSize: true,
            label: (0, import_i18n157.__)("Artist"),
            value: artist ? (0, import_dom10.__unstableStripHTML)(artist) : "",
            onChange: (artistValue) => {
              setAttributes({ artist: artistValue });
            }
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
          import_components103.TextControl,
          {
            __next40pxDefaultSize: true,
            label: (0, import_i18n157.__)("Album"),
            value: album ? (0, import_dom10.__unstableStripHTML)(album) : "",
            onChange: (albumValue) => {
              setAttributes({ album: albumValue });
            }
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
          import_components103.TextControl,
          {
            __next40pxDefaultSize: true,
            label: (0, import_i18n157.__)("Title"),
            value: title ? (0, import_dom10.__unstableStripHTML)(title) : "",
            placeholder: title ? (0, import_dom10.__unstableStripHTML)(title) : "",
            onChange: (titleValue) => {
              setAttributes({ title: titleValue });
            }
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(import_block_editor178.MediaUploadCheck, { children: /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)("div", { className: "editor-video-poster-control", children: [
          /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(import_components103.BaseControl.VisualLabel, { children: (0, import_i18n157.__)("Album cover image") }),
          !!image && /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
            "img",
            {
              src: image,
              alt: (0, import_i18n157.__)(
                "Preview of the album cover image"
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
            import_block_editor178.MediaUpload,
            {
              title: (0, import_i18n157.__)("Select image"),
              onSelect: onSelectAlbumCoverImage,
              allowedTypes: ALBUM_COVER_ALLOWED_MEDIA_TYPES,
              render: ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
                import_components103.Button,
                {
                  __next40pxDefaultSize: true,
                  variant: "primary",
                  onClick: open,
                  ref: imageButton,
                  children: !image ? (0, import_i18n157.__)("Select") : (0, import_i18n157.__)("Replace")
                }
              )
            }
          ),
          !!image && /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
            import_components103.Button,
            {
              __next40pxDefaultSize: true,
              onClick: onRemoveAlbumCoverImage,
              variant: "tertiary",
              children: (0, import_i18n157.__)("Remove")
            }
          )
        ] }) })
      ] }) }),
      /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)("li", { ...blockProps, children: [
        !!temporaryURL && /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(import_components103.Spinner, {}),
        /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)(
          "button",
          {
            className: "wp-block-playlist-track__button",
            "data-wp-context": JSON.stringify({ uniqueId }),
            "aria-current": currentTrack === uniqueId ? "true" : "false",
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)("span", { className: "wp-block-playlist-track__content", children: [
                /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
                  import_block_editor178.RichText,
                  {
                    tagName: "span",
                    className: "wp-block-playlist-track__title",
                    value: title,
                    placeholder: (0, import_i18n157.__)("Add title"),
                    onChange: (value) => {
                      setAttributes({ title: value });
                    },
                    allowedFormats: [],
                    withoutInteractiveFormatting: true
                  }
                ),
                showArtists && /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
                  import_block_editor178.RichText,
                  {
                    tagName: "span",
                    className: "wp-block-playlist-track__artist",
                    value: artist,
                    placeholder: (0, import_i18n157.__)("Add artist"),
                    onChange: (value) => setAttributes({ artist: value }),
                    allowedFormats: [],
                    withoutInteractiveFormatting: true
                  }
                )
              ] }),
              /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)("span", { className: "wp-block-playlist-track__length", children: [
                length && /* @__PURE__ */ (0, import_jsx_runtime355.jsx)("span", {
                  className: "screen-reader-text",
                  /* translators: %s: Visually hidden label for the track length (screen reader text). */
                  children: (0, import_i18n157.__)("Length:")
                }),
                length
              ] }),
              /* @__PURE__ */ (0, import_jsx_runtime355.jsx)("span", { className: "screen-reader-text", children: (0, import_i18n157.__)("Select to play this track") })
            ]
          }
        )
      ] })
    ] });
  };
  var edit_default24 = PlaylistTrackEdit;

  // packages/block-library/build-module/playlist-track/index.mjs
  var { name: name65 } = block_default64;
  var settings64 = {
    icon: audio_default,
    edit: edit_default24
  };
  var init64 = () => initBlock({ name: name65, metadata: block_default64, settings: settings64 });

  // packages/block-library/build-module/post-author/index.mjs
  var post_author_exports = {};
  __export(post_author_exports, {
    init: () => init65,
    metadata: () => block_default65,
    name: () => name66,
    settings: () => settings65
  });
  var import_i18n160 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/post-author/block.json
  var block_default65 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-author",
    title: "Author (deprecated)",
    category: "theme",
    description: "This block is deprecated. Please use the Avatar block, the Author Name block, and the Author Biography block instead.",
    textdomain: "default",
    attributes: {
      textAlign: {
        type: "string"
      },
      avatarSize: {
        type: "number",
        default: 48
      },
      showAvatar: {
        type: "boolean",
        default: true
      },
      showBio: {
        type: "boolean"
      },
      byline: {
        type: "string"
      },
      isLink: {
        type: "boolean",
        default: false,
        role: "content"
      },
      linkTarget: {
        type: "string",
        default: "_self",
        role: "content"
      }
    },
    usesContext: ["postType", "postId", "queryId"],
    supports: {
      inserter: false,
      anchor: true,
      html: false,
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      },
      filter: {
        duotone: true
      }
    },
    selectors: {
      filter: {
        duotone: ".wp-block-post-author .wp-block-post-author__avatar img"
      }
    },
    editorStyle: "wp-block-post-author-editor",
    style: "wp-block-post-author"
  };

  // packages/block-library/build-module/post-author/edit.mjs
  var import_block_editor180 = __toESM(require_block_editor(), 1);
  var import_components104 = __toESM(require_components(), 1);
  var import_compose42 = __toESM(require_compose(), 1);
  var import_core_data54 = __toESM(require_core_data(), 1);
  var import_data99 = __toESM(require_data(), 1);
  var import_element91 = __toESM(require_element(), 1);
  var import_html_entities8 = __toESM(require_html_entities(), 1);
  var import_i18n159 = __toESM(require_i18n(), 1);
  var import_blocks79 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/post-author/utils.mjs
  var import_blocks78 = __toESM(require_blocks(), 1);
  var import_i18n158 = __toESM(require_i18n(), 1);
  var import_block_editor179 = __toESM(require_block_editor(), 1);
  var { cleanEmptyObject: cleanEmptyObject5 } = unlock(import_block_editor179.privateApis);
  function recreateWithRecommendedBlocks(attributes2, blockTypes) {
    const {
      avatarSize,
      byline,
      showAvatar,
      showBio,
      isLink,
      linkTarget,
      textAlign,
      style: style2,
      ...restAttributes
    } = attributes2;
    const shouldInsertAvatarBlock = showAvatar && blockTypes.some((blockType) => blockType.name === "core/avatar");
    const shouldInsertParagraphBlock = byline && blockTypes.some((blockType) => blockType.name === "core/paragraph");
    const shouldInsertPostAuthorNameBlock = blockTypes.some(
      (blockType) => blockType.name === "core/post-author-name"
    );
    const shouldInsertPostAuthorBiographyBlock = showBio && blockTypes.some(
      (blockType) => blockType.name === "core/post-author-biography"
    );
    return (0, import_blocks78.createBlock)(
      "core/group",
      {
        ...restAttributes,
        style: cleanEmptyObject5({
          ...style2,
          spacing: {
            ...style2?.spacing,
            blockGap: "1em"
          },
          color: {
            ...style2?.color,
            // Duotone must be applied to the avatar block.
            duotone: void 0
          }
        }),
        layout: {
          type: "flex",
          flexWrap: "nowrap",
          verticalAlignment: "top"
        }
      },
      [
        shouldInsertAvatarBlock && (0, import_blocks78.createBlock)("core/avatar", {
          size: avatarSize,
          style: cleanEmptyObject5({
            border: {
              radius: "0px"
            },
            color: {
              duotone: style2?.color?.duotone
            }
          })
        }),
        (0, import_blocks78.createBlock)(
          "core/group",
          {
            style: {
              layout: {
                selfStretch: "fill",
                flexSize: null
              },
              spacing: {
                blockGap: "0"
              }
            },
            layout: {
              type: "flex",
              orientation: "vertical",
              justifyContent: "stretch"
            }
          },
          [
            shouldInsertParagraphBlock && (0, import_blocks78.createBlock)("core/paragraph", {
              content: byline,
              placeholder: (0, import_i18n158.__)("Write byline\u2026"),
              style: {
                typography: {
                  fontSize: "0.5em",
                  textAlign
                }
              }
            }),
            shouldInsertPostAuthorNameBlock && (0, import_blocks78.createBlock)("core/post-author-name", {
              isLink,
              linkTarget,
              style: {
                typography: {
                  fontSize: "1em",
                  textAlign
                }
              }
            }),
            shouldInsertPostAuthorBiographyBlock && (0, import_blocks78.createBlock)("core/post-author-biography", {
              style: {
                typography: {
                  fontSize: "0.7em",
                  textAlign
                }
              }
            })
          ].filter(Boolean)
        )
      ].filter(Boolean)
    );
  }

  // packages/block-library/build-module/post-author/edit.mjs
  var import_jsx_runtime356 = __toESM(require_jsx_runtime(), 1);
  var { InspectorControlsLastItem } = unlock(import_block_editor180.privateApis);
  var AUTHORS_QUERY2 = {
    who: "authors",
    per_page: 100,
    _fields: "id,name",
    context: "view"
  };
  function AuthorCombobox({ value, onChange }) {
    const [filterValue, setFilterValue] = (0, import_element91.useState)("");
    const { authors, isLoading } = (0, import_data99.useSelect)(
      (select9) => {
        const { getUsers, isResolving } = select9(import_core_data54.store);
        const query = { ...AUTHORS_QUERY2 };
        if (filterValue) {
          query.search = filterValue;
          query.search_columns = ["name"];
        }
        return {
          authors: getUsers(query),
          isLoading: isResolving("getUsers", [query])
        };
      },
      [filterValue]
    );
    const authorOptions = (0, import_element91.useMemo)(() => {
      const fetchedAuthors = (authors ?? []).map((author) => {
        return {
          value: author.id,
          label: (0, import_html_entities8.decodeEntities)(author.name)
        };
      });
      const foundAuthor = fetchedAuthors.findIndex(
        (fetchedAuthor) => value?.id === fetchedAuthor.value
      );
      let currentAuthor = [];
      if (foundAuthor < 0 && value) {
        currentAuthor = [
          {
            value: value.id,
            label: (0, import_html_entities8.decodeEntities)(value.name)
          }
        ];
      } else if (foundAuthor < 0 && !value) {
        currentAuthor = [
          {
            value: 0,
            label: (0, import_i18n159.__)("(No author)")
          }
        ];
      }
      return [...currentAuthor, ...fetchedAuthors];
    }, [authors, value]);
    return /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
      import_components104.ComboboxControl,
      {
        __next40pxDefaultSize: true,
        label: (0, import_i18n159.__)("Author"),
        options: authorOptions,
        value: value?.id,
        onFilterValueChange: (0, import_compose42.debounce)(setFilterValue, 300),
        onChange,
        allowReset: false,
        isLoading
      }
    );
  }
  function PostAuthorEdit({
    isSelected,
    context: { postType, postId, queryId },
    attributes: attributes2,
    setAttributes,
    clientId
  }) {
    const isDescendentOfQueryLoop = Number.isFinite(queryId);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const defaultAvatar = useDefaultAvatar();
    const { authorDetails, canAssignAuthor, supportsAuthor } = (0, import_data99.useSelect)(
      (select9) => {
        const { getEditedEntityRecord, getUser, getPostType } = select9(import_core_data54.store);
        const currentPost = getEditedEntityRecord(
          "postType",
          postType,
          postId
        );
        const authorId = currentPost?.author;
        return {
          authorDetails: authorId ? getUser(authorId, { context: "view" }) : null,
          supportsAuthor: getPostType(postType)?.supports?.author ?? false,
          canAssignAuthor: currentPost?._links?.["wp:action-assign-author"] ? true : false
        };
      },
      [postType, postId]
    );
    const blockTypes = (0, import_data99.useSelect)(
      (select9) => select9(import_blocks79.store).getBlockTypes(),
      []
    );
    const { editEntityRecord } = (0, import_data99.useDispatch)(import_core_data54.store);
    const { replaceBlock } = (0, import_data99.useDispatch)(import_block_editor180.store);
    const {
      textAlign,
      showAvatar,
      showBio,
      byline,
      isLink,
      linkTarget,
      avatarSize
    } = attributes2;
    const avatarSizes = [];
    const authorName = authorDetails?.name || (0, import_i18n159.__)("Post Author");
    if (authorDetails?.avatar_urls) {
      Object.keys(authorDetails.avatar_urls).forEach((size) => {
        avatarSizes.push({
          value: size,
          label: `${size} x ${size}`
        });
      });
    }
    const blockProps = (0, import_block_editor180.useBlockProps)({
      className: clsx_default({
        [`has-text-align-${textAlign}`]: textAlign
      })
    });
    const handleSelect = (nextAuthorId) => {
      editEntityRecord("postType", postType, postId, {
        author: nextAuthorId
      });
    };
    const showAuthorControl = !!postId && !isDescendentOfQueryLoop && canAssignAuthor;
    if (!supportsAuthor && postType !== void 0) {
      return /* @__PURE__ */ (0, import_jsx_runtime356.jsx)("div", { ...blockProps, children: (0, import_i18n159.sprintf)(
        // translators: %s: Name of the post type e.g: "post".
        (0, import_i18n159.__)("This post type (%s) does not support the author."),
        postType
      ) });
    }
    function transformBlock() {
      replaceBlock(
        clientId,
        recreateWithRecommendedBlocks(attributes2, blockTypes)
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)(import_jsx_runtime356.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(import_block_editor180.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)(
        import_components104.__experimentalToolsPanel,
        {
          label: (0, import_i18n159.__)("Settings"),
          resetAll: () => {
            setAttributes({
              avatarSize: 48,
              showAvatar: true,
              isLink: false,
              linkTarget: "_self"
            });
          },
          dropdownMenuProps,
          children: [
            showAuthorControl && /* @__PURE__ */ (0, import_jsx_runtime356.jsx)("div", { style: { gridColumn: "1 / -1" }, children: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
              AuthorCombobox,
              {
                value: authorDetails,
                onChange: handleSelect
              }
            ) }),
            /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
              import_components104.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n159.__)("Show avatar"),
                isShownByDefault: true,
                hasValue: () => !showAvatar,
                onDeselect: () => setAttributes({ showAvatar: true }),
                children: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
                  import_components104.ToggleControl,
                  {
                    label: (0, import_i18n159.__)("Show avatar"),
                    checked: showAvatar,
                    onChange: () => setAttributes({
                      showAvatar: !showAvatar
                    })
                  }
                )
              }
            ),
            showAvatar && /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
              import_components104.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n159.__)("Avatar size"),
                isShownByDefault: true,
                hasValue: () => avatarSize !== 48,
                onDeselect: () => setAttributes({ avatarSize: 48 }),
                children: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
                  import_components104.SelectControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n159.__)("Avatar size"),
                    value: avatarSize,
                    options: avatarSizes,
                    onChange: (size) => {
                      setAttributes({
                        avatarSize: Number(size)
                      });
                    }
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
              import_components104.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n159.__)("Show bio"),
                isShownByDefault: true,
                hasValue: () => !!showBio,
                onDeselect: () => setAttributes({ showBio: void 0 }),
                children: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
                  import_components104.ToggleControl,
                  {
                    label: (0, import_i18n159.__)("Show bio"),
                    checked: !!showBio,
                    onChange: () => setAttributes({ showBio: !showBio })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
              import_components104.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n159.__)("Link author name to author page"),
                isShownByDefault: true,
                hasValue: () => !!isLink,
                onDeselect: () => setAttributes({ isLink: false }),
                children: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
                  import_components104.ToggleControl,
                  {
                    label: (0, import_i18n159.__)("Link author name to author page"),
                    checked: isLink,
                    onChange: () => setAttributes({ isLink: !isLink })
                  }
                )
              }
            ),
            isLink && /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
              import_components104.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n159.__)("Link target"),
                isShownByDefault: true,
                hasValue: () => linkTarget !== "_self",
                onDeselect: () => setAttributes({ linkTarget: "_self" }),
                children: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
                  import_components104.ToggleControl,
                  {
                    label: (0, import_i18n159.__)("Open in new tab"),
                    onChange: (value) => setAttributes({
                      linkTarget: value ? "_blank" : "_self"
                    }),
                    checked: linkTarget === "_blank"
                  }
                )
              }
            )
          ]
        }
      ) }),
      blockTypes.some(
        (blockType) => blockType.name === "core/group"
      ) && /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(InspectorControlsLastItem, { children: /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)(
        import_components104.__experimentalVStack,
        {
          className: "wp-block-post-author__transform",
          alignment: "left",
          spacing: 4,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(import_components104.__experimentalText, { as: "p", children: (0, import_i18n159.__)(
              "This block is no longer supported. Recreate its design with the Avatar, Author Name and Author Biography blocks."
            ) }),
            /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
              import_components104.Button,
              {
                variant: "primary",
                onClick: transformBlock,
                __next40pxDefaultSize: true,
                children: (0, import_i18n159.__)("Recreate")
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(import_block_editor180.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
        import_block_editor180.AlignmentControl,
        {
          value: textAlign,
          onChange: (nextAlign) => {
            setAttributes({ textAlign: nextAlign });
          }
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)("div", { ...blockProps, children: [
        showAvatar && /* @__PURE__ */ (0, import_jsx_runtime356.jsx)("div", { className: "wp-block-post-author__avatar", children: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
          "img",
          {
            width: avatarSize,
            src: authorDetails?.avatar_urls?.[avatarSize] || defaultAvatar,
            alt: authorDetails?.name || (0, import_i18n159.__)("Default Avatar")
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)("div", { className: "wp-block-post-author__content", children: [
          (!import_block_editor180.RichText.isEmpty(byline) || isSelected) && /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
            import_block_editor180.RichText,
            {
              identifier: "byline",
              className: "wp-block-post-author__byline",
              "aria-label": (0, import_i18n159.__)("Post author byline text"),
              placeholder: (0, import_i18n159.__)("Write byline\u2026"),
              value: byline,
              onChange: (value) => setAttributes({ byline: value })
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime356.jsx)("p", { className: "wp-block-post-author__name", children: isLink ? /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
            "a",
            {
              href: "#post-author-pseudo-link",
              onClick: (event) => event.preventDefault(),
              children: authorName
            }
          ) : authorName }),
          showBio && /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
            "p",
            {
              className: "wp-block-post-author__bio",
              dangerouslySetInnerHTML: {
                __html: authorDetails?.description
              }
            }
          )
        ] })
      ] })
    ] });
  }
  var edit_default25 = PostAuthorEdit;

  // packages/block-library/build-module/post-author/index.mjs
  var { name: name66 } = block_default65;
  var settings65 = {
    icon: post_author_default,
    example: {
      viewportWidth: 350,
      attributes: {
        showBio: true,
        byline: (0, import_i18n160.__)("Posted by")
      }
    },
    edit: edit_default25
  };
  var init65 = () => initBlock({ name: name66, metadata: block_default65, settings: settings65 });

  // packages/block-library/build-module/post-author-name/index.mjs
  var post_author_name_exports = {};
  __export(post_author_name_exports, {
    init: () => init66,
    metadata: () => block_default66,
    name: () => name67,
    settings: () => settings66
  });

  // packages/block-library/build-module/post-author-name/block.json
  var block_default66 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-author-name",
    title: "Author Name",
    category: "theme",
    description: "The author name.",
    textdomain: "default",
    attributes: {
      isLink: {
        type: "boolean",
        default: false,
        role: "content"
      },
      linkTarget: {
        type: "string",
        default: "_self",
        role: "content"
      }
    },
    usesContext: ["postType", "postId"],
    example: {
      viewportWidth: 350
    },
    supports: {
      anchor: true,
      html: false,
      spacing: {
        margin: true,
        padding: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-post-author-name"
  };

  // packages/block-library/build-module/post-author-name/edit.mjs
  var import_block_editor181 = __toESM(require_block_editor(), 1);
  var import_data100 = __toESM(require_data(), 1);
  var import_i18n161 = __toESM(require_i18n(), 1);
  var import_core_data55 = __toESM(require_core_data(), 1);
  var import_components105 = __toESM(require_components(), 1);
  var import_jsx_runtime357 = __toESM(require_jsx_runtime(), 1);
  function PostAuthorNameEdit(props) {
    useDeprecatedTextAlign(props);
    const {
      attributes: { isLink, linkTarget },
      setAttributes,
      context: { postType, postId }
    } = props;
    const { authorName, supportsAuthor } = (0, import_data100.useSelect)(
      (select9) => {
        const { getEditedEntityRecord, getUser, getPostType } = select9(import_core_data55.store);
        const _authorId = getEditedEntityRecord(
          "postType",
          postType,
          postId
        )?.author;
        return {
          authorName: _authorId ? getUser(_authorId) : null,
          supportsAuthor: getPostType(postType)?.supports?.author ?? false
        };
      },
      [postType, postId]
    );
    const blockProps = (0, import_block_editor181.useBlockProps)();
    const displayName = authorName?.name || (0, import_i18n161.__)("Author Name");
    const displayAuthor = isLink ? /* @__PURE__ */ (0, import_jsx_runtime357.jsx)(
      "a",
      {
        href: "#author-pseudo-link",
        onClick: (event) => event.preventDefault(),
        className: "wp-block-post-author-name__link",
        children: displayName
      }
    ) : displayName;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime357.jsxs)(import_jsx_runtime357.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime357.jsx)(import_block_editor181.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime357.jsxs)(
        import_components105.__experimentalToolsPanel,
        {
          label: (0, import_i18n161.__)("Settings"),
          resetAll: () => {
            setAttributes({
              isLink: false,
              linkTarget: "_self"
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime357.jsx)(
              import_components105.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n161.__)("Link to author archive"),
                isShownByDefault: true,
                hasValue: () => isLink,
                onDeselect: () => setAttributes({ isLink: false }),
                children: /* @__PURE__ */ (0, import_jsx_runtime357.jsx)(
                  import_components105.ToggleControl,
                  {
                    label: (0, import_i18n161.__)("Link to author archive"),
                    onChange: () => setAttributes({ isLink: !isLink }),
                    checked: isLink
                  }
                )
              }
            ),
            isLink && /* @__PURE__ */ (0, import_jsx_runtime357.jsx)(
              import_components105.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n161.__)("Open in new tab"),
                isShownByDefault: true,
                hasValue: () => linkTarget !== "_self",
                onDeselect: () => setAttributes({ linkTarget: "_self" }),
                children: /* @__PURE__ */ (0, import_jsx_runtime357.jsx)(
                  import_components105.ToggleControl,
                  {
                    label: (0, import_i18n161.__)("Open in new tab"),
                    onChange: (value) => setAttributes({
                      linkTarget: value ? "_blank" : "_self"
                    }),
                    checked: linkTarget === "_blank"
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime357.jsx)("div", { ...blockProps, children: !supportsAuthor && postType !== void 0 ? (0, import_i18n161.sprintf)(
        // translators: %s: Name of the post type e.g: "post".
        (0, import_i18n161.__)(
          "This post type (%s) does not support the author."
        ),
        postType
      ) : displayAuthor })
    ] });
  }
  var edit_default26 = PostAuthorNameEdit;

  // packages/block-library/build-module/post-author-name/deprecated.mjs
  var v125 = {
    attributes: {
      isLink: {
        type: "boolean",
        default: false,
        role: "content"
      },
      linkTarget: {
        type: "string",
        default: "_self",
        role: "content"
      },
      textAlign: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      html: false,
      spacing: {
        margin: true,
        padding: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    },
    save: () => null
  };
  var deprecated_default30 = [v125];

  // packages/block-library/build-module/post-author-name/transforms.mjs
  var import_blocks80 = __toESM(require_blocks(), 1);
  var transforms22 = {
    from: [
      {
        type: "block",
        blocks: ["core/post-author"],
        transform: ({ textAlign }) => (0, import_blocks80.createBlock)("core/post-author-name", {
          style: { typography: { textAlign } }
        })
      }
    ]
  };
  var transforms_default23 = transforms22;

  // packages/block-library/build-module/post-author-name/index.mjs
  var { name: name67 } = block_default66;
  var settings66 = {
    icon: post_author_default,
    transforms: transforms_default23,
    edit: edit_default26,
    deprecated: deprecated_default30
  };
  var init66 = () => initBlock({ name: name67, metadata: block_default66, settings: settings66 });

  // packages/block-library/build-module/post-author-biography/index.mjs
  var post_author_biography_exports = {};
  __export(post_author_biography_exports, {
    init: () => init67,
    metadata: () => block_default67,
    name: () => name68,
    settings: () => settings67
  });

  // packages/block-library/build-module/post-author-biography/block.json
  var block_default67 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-author-biography",
    title: "Author Biography",
    category: "theme",
    description: "The author biography.",
    textdomain: "default",
    usesContext: ["postType", "postId"],
    example: {
      viewportWidth: 350
    },
    supports: {
      anchor: true,
      spacing: {
        margin: true,
        padding: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-post-author-biography"
  };

  // packages/block-library/build-module/post-author-biography/edit.mjs
  var import_block_editor182 = __toESM(require_block_editor(), 1);
  var import_data101 = __toESM(require_data(), 1);
  var import_i18n162 = __toESM(require_i18n(), 1);
  var import_core_data56 = __toESM(require_core_data(), 1);
  var import_jsx_runtime358 = __toESM(require_jsx_runtime(), 1);
  function PostAuthorBiographyEdit(props) {
    useDeprecatedTextAlign(props);
    const {
      context: { postType, postId }
    } = props;
    const { authorDetails } = (0, import_data101.useSelect)(
      (select9) => {
        const { getEditedEntityRecord, getUser } = select9(import_core_data56.store);
        const _authorId = getEditedEntityRecord(
          "postType",
          postType,
          postId
        )?.author;
        return {
          authorDetails: _authorId ? getUser(_authorId) : null
        };
      },
      [postType, postId]
    );
    const blockProps = (0, import_block_editor182.useBlockProps)();
    const displayAuthorBiography = authorDetails?.description || (0, import_i18n162.__)("Author Biography");
    return /* @__PURE__ */ (0, import_jsx_runtime358.jsx)(import_jsx_runtime358.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime358.jsx)(
      "div",
      {
        ...blockProps,
        dangerouslySetInnerHTML: { __html: displayAuthorBiography }
      }
    ) });
  }
  var edit_default27 = PostAuthorBiographyEdit;

  // packages/block-library/build-module/post-author-biography/deprecated.mjs
  var v126 = {
    attributes: {
      textAlign: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      spacing: {
        margin: true,
        padding: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    },
    save: () => null
  };
  var deprecated_default31 = [v126];

  // packages/block-library/build-module/post-author-biography/index.mjs
  var { name: name68 } = block_default67;
  var settings67 = {
    icon: post_author_default,
    edit: edit_default27,
    deprecated: deprecated_default31
  };
  var init67 = () => initBlock({ name: name68, metadata: block_default67, settings: settings67 });

  // packages/block-library/build-module/post-comment/index.mjs
  var post_comment_exports = {};
  __export(post_comment_exports, {
    init: () => init68,
    metadata: () => block_default68,
    name: () => name69,
    settings: () => settings68
  });

  // packages/block-library/build-module/post-comment/block.json
  var block_default68 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    __experimental: "fse",
    name: "core/post-comment",
    title: "Comment (deprecated)",
    category: "theme",
    allowedBlocks: [
      "core/avatar",
      "core/comment-author-name",
      "core/comment-content",
      "core/comment-date",
      "core/comment-edit-link",
      "core/comment-reply-link"
    ],
    description: "This block is deprecated. Please use the Comments block instead.",
    textdomain: "default",
    attributes: {
      commentId: {
        type: "number"
      }
    },
    providesContext: {
      commentId: "commentId"
    },
    supports: {
      html: false,
      inserter: false,
      interactivity: {
        clientNavigation: true
      }
    }
  };

  // packages/block-library/build-module/post-comment/edit.mjs
  var import_i18n163 = __toESM(require_i18n(), 1);
  var import_components106 = __toESM(require_components(), 1);
  var import_element92 = __toESM(require_element(), 1);
  var import_block_editor183 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime359 = __toESM(require_jsx_runtime(), 1);
  var TEMPLATE11 = [
    ["core/avatar"],
    ["core/comment-author-name"],
    ["core/comment-date"],
    ["core/comment-content"],
    ["core/comment-reply-link"],
    ["core/comment-edit-link"]
  ];
  function Edit18({ attributes: { commentId }, setAttributes }) {
    const [commentIdInput, setCommentIdInput] = (0, import_element92.useState)(commentId);
    const blockProps = (0, import_block_editor183.useBlockProps)();
    const innerBlocksProps = (0, import_block_editor183.useInnerBlocksProps)(blockProps, {
      template: TEMPLATE11
    });
    if (!commentId) {
      return /* @__PURE__ */ (0, import_jsx_runtime359.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime359.jsxs)(
        import_components106.Placeholder,
        {
          icon: block_default_default,
          label: (0, import_i18n163._x)("Post Comment", "block title"),
          instructions: (0, import_i18n163.__)(
            "To show a comment, input the comment ID."
          ),
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime359.jsx)(
              import_components106.TextControl,
              {
                __next40pxDefaultSize: true,
                value: commentId,
                onChange: (val) => setCommentIdInput(parseInt(val))
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime359.jsx)(
              import_components106.Button,
              {
                __next40pxDefaultSize: true,
                variant: "primary",
                onClick: () => {
                  setAttributes({ commentId: commentIdInput });
                },
                children: (0, import_i18n163.__)("Save")
              }
            )
          ]
        }
      ) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime359.jsx)("div", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/post-comment/save.mjs
  var import_block_editor184 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime360 = __toESM(require_jsx_runtime(), 1);
  function save38() {
    const blockProps = import_block_editor184.useBlockProps.save();
    const innerBlocksProps = import_block_editor184.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime360.jsx)("div", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/post-comment/index.mjs
  var { name: name69 } = block_default68;
  var settings68 = {
    icon: comment_default,
    edit: Edit18,
    save: save38
  };
  var init68 = () => initBlock({ name: name69, metadata: block_default68, settings: settings68 });

  // packages/block-library/build-module/post-comments-count/index.mjs
  var post_comments_count_exports = {};
  __export(post_comments_count_exports, {
    init: () => init69,
    metadata: () => block_default69,
    name: () => name70,
    settings: () => settings69
  });

  // packages/block-library/build-module/post-comments-count/block.json
  var block_default69 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-comments-count",
    title: "Comments Count",
    category: "theme",
    description: "Display a post's comments count.",
    textdomain: "default",
    usesContext: ["postId"],
    example: {
      viewportWidth: 350
    },
    supports: {
      anchor: true,
      html: false,
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      interactivity: {
        clientNavigation: true
      }
    },
    style: "wp-block-post-comments-count"
  };

  // packages/block-library/build-module/post-comments-count/edit.mjs
  var import_block_editor185 = __toESM(require_block_editor(), 1);
  var import_element93 = __toESM(require_element(), 1);
  var import_api_fetch3 = __toESM(require_api_fetch(), 1);
  var import_url17 = __toESM(require_url(), 1);
  var import_jsx_runtime361 = __toESM(require_jsx_runtime(), 1);
  function PostCommentsCountEdit({ context }) {
    const { postId } = context;
    const [commentsCount, setCommentsCount] = (0, import_element93.useState)();
    const blockProps = (0, import_block_editor185.useBlockProps)();
    (0, import_element93.useEffect)(() => {
      if (!postId) {
        return;
      }
      const currentPostId = postId;
      (0, import_api_fetch3.default)({
        path: (0, import_url17.addQueryArgs)("/wp/v2/comments", {
          post: postId
        }),
        parse: false
      }).then((res) => {
        if (currentPostId === postId) {
          setCommentsCount(res.headers.get("X-WP-Total"));
        }
      });
    }, [postId]);
    const hasPostAndComments = postId && commentsCount !== void 0;
    const blockStyles = {
      ...blockProps.style,
      textDecoration: hasPostAndComments ? blockProps.style?.textDecoration : void 0
    };
    return /* @__PURE__ */ (0, import_jsx_runtime361.jsx)("div", { ...blockProps, style: blockStyles, children: hasPostAndComments ? commentsCount : "0" });
  }

  // packages/block-library/build-module/post-comments-count/transforms.mjs
  var import_blocks81 = __toESM(require_blocks(), 1);
  var transforms23 = {
    to: [
      {
        type: "block",
        blocks: ["core/post-comments-link"],
        transform: ({ style: style2 }) => {
          const textAlign = style2?.typography?.textAlign;
          return (0, import_blocks81.createBlock)("core/post-comments-link", {
            ...textAlign && {
              style: {
                typography: {
                  textAlign
                }
              }
            }
          });
        }
      }
    ]
  };
  var transforms_default24 = transforms23;

  // packages/block-library/build-module/post-comments-count/deprecated.mjs
  var v127 = {
    attributes: {
      textAlign: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      html: false,
      spacing: {
        margin: true,
        padding: true
      },
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      }
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    },
    save: () => null
  };
  var deprecated_default32 = [v127];

  // packages/block-library/build-module/post-comments-count/index.mjs
  var { name: name70 } = block_default69;
  var settings69 = {
    icon: post_comments_count_default,
    edit: PostCommentsCountEdit,
    transforms: transforms_default24,
    deprecated: deprecated_default32
  };
  var init69 = () => initBlock({ name: name70, metadata: block_default69, settings: settings69 });

  // packages/block-library/build-module/post-comments-form/index.mjs
  var post_comments_form_exports = {};
  __export(post_comments_form_exports, {
    init: () => init70,
    metadata: () => block_default70,
    name: () => name71,
    settings: () => settings70
  });

  // packages/block-library/build-module/post-comments-form/block.json
  var block_default70 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-comments-form",
    title: "Comments Form",
    category: "theme",
    description: "Display a post's comments form.",
    textdomain: "default",
    usesContext: ["postId", "postType"],
    supports: {
      anchor: true,
      html: false,
      color: {
        gradients: true,
        heading: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    editorStyle: "wp-block-post-comments-form-editor",
    style: [
      "wp-block-post-comments-form",
      "wp-block-buttons",
      "wp-block-button"
    ],
    example: {
      attributes: {
        style: {
          typography: {
            textAlign: "center"
          }
        }
      }
    }
  };

  // packages/block-library/build-module/post-comments-form/edit.mjs
  var import_block_editor186 = __toESM(require_block_editor(), 1);
  var import_components107 = __toESM(require_components(), 1);
  var import_compose43 = __toESM(require_compose(), 1);
  var import_i18n164 = __toESM(require_i18n(), 1);
  var import_jsx_runtime362 = __toESM(require_jsx_runtime(), 1);
  function PostCommentsFormEdit({ context }) {
    const { postId, postType } = context;
    const instanceId = (0, import_compose43.useInstanceId)(PostCommentsFormEdit);
    const instanceIdDesc = (0, import_i18n164.sprintf)("comments-form-edit-%d-desc", instanceId);
    const blockProps = (0, import_block_editor186.useBlockProps)({
      "aria-describedby": instanceIdDesc
    });
    return /* @__PURE__ */ (0, import_jsx_runtime362.jsxs)("div", { ...blockProps, children: [
      /* @__PURE__ */ (0, import_jsx_runtime362.jsx)(form_default, { postId, postType }),
      /* @__PURE__ */ (0, import_jsx_runtime362.jsx)(import_components107.VisuallyHidden, { id: instanceIdDesc, children: (0, import_i18n164.__)("Comments form disabled in editor.") })
    ] });
  }

  // packages/block-library/build-module/post-comments-form/deprecated.mjs
  var v128 = {
    attributes: {
      textAlign: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      html: false,
      spacing: {
        margin: true,
        padding: true
      },
      color: {
        gradients: true,
        heading: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    },
    save: () => null
  };
  var deprecated_default33 = [v128];

  // packages/block-library/build-module/post-comments-form/index.mjs
  var { name: name71 } = block_default70;
  var settings70 = {
    icon: post_comments_form_default,
    edit: PostCommentsFormEdit,
    deprecated: deprecated_default33
  };
  var init70 = () => initBlock({ name: name71, metadata: block_default70, settings: settings70 });

  // packages/block-library/build-module/post-comments-link/index.mjs
  var post_comments_link_exports = {};
  __export(post_comments_link_exports, {
    init: () => init71,
    metadata: () => block_default71,
    name: () => name72,
    settings: () => settings71
  });

  // packages/block-library/build-module/post-comments-link/block.json
  var block_default71 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-comments-link",
    title: "Comments Link",
    category: "theme",
    description: "Displays the link to the current post comments.",
    textdomain: "default",
    usesContext: ["postType", "postId"],
    example: {
      viewportWidth: 350
    },
    supports: {
      anchor: true,
      html: false,
      color: {
        link: true,
        text: false,
        __experimentalDefaultControls: {
          background: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-post-comments-link"
  };

  // packages/block-library/build-module/post-comments-link/edit.mjs
  var import_block_editor187 = __toESM(require_block_editor(), 1);
  var import_element94 = __toESM(require_element(), 1);
  var import_data102 = __toESM(require_data(), 1);
  var import_api_fetch4 = __toESM(require_api_fetch(), 1);
  var import_url18 = __toESM(require_url(), 1);
  var import_i18n165 = __toESM(require_i18n(), 1);
  var import_core_data57 = __toESM(require_core_data(), 1);
  var import_jsx_runtime363 = __toESM(require_jsx_runtime(), 1);
  function PostCommentsLinkEdit({ context }) {
    const { postType, postId } = context;
    const [commentsCount, setCommentsCount] = (0, import_element94.useState)();
    const blockProps = (0, import_block_editor187.useBlockProps)();
    (0, import_element94.useEffect)(() => {
      if (!postId) {
        return;
      }
      const currentPostId = postId;
      (0, import_api_fetch4.default)({
        path: (0, import_url18.addQueryArgs)("/wp/v2/comments", {
          post: postId
        }),
        parse: false
      }).then((res) => {
        if (currentPostId === postId) {
          setCommentsCount(res.headers.get("X-WP-Total"));
        }
      });
    }, [postId]);
    const post = (0, import_data102.useSelect)(
      (select9) => select9(import_core_data57.store).getEditedEntityRecord(
        "postType",
        postType,
        postId
      ),
      [postType, postId]
    );
    let commentsText;
    if (commentsCount !== void 0) {
      const commentsNumber = parseInt(commentsCount);
      if (commentsNumber === 0) {
        commentsText = (0, import_i18n165.__)("No comments");
      } else {
        commentsText = (0, import_i18n165.sprintf)(
          /* translators: %s: Number of comments */
          (0, import_i18n165._n)("%s comment", "%s comments", commentsNumber),
          commentsNumber.toLocaleString()
        );
      }
    }
    return /* @__PURE__ */ (0, import_jsx_runtime363.jsx)("div", { ...blockProps, children: post?.link && commentsText !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime363.jsx)(
      "a",
      {
        href: post?.link + "#comments",
        onClick: (event) => event.preventDefault(),
        children: commentsText
      }
    ) : /* @__PURE__ */ (0, import_jsx_runtime363.jsx)(
      "a",
      {
        href: "#post-comments-link-pseudo-link",
        onClick: (event) => event.preventDefault(),
        children: (0, import_i18n165.__)("No comments")
      }
    ) });
  }
  var edit_default28 = PostCommentsLinkEdit;

  // packages/block-library/build-module/post-comments-link/transforms.mjs
  var import_blocks82 = __toESM(require_blocks(), 1);
  var transforms24 = {
    to: [
      {
        type: "block",
        blocks: ["core/post-comments-count"],
        transform: ({ style: style2 }) => {
          const textAlign = style2?.typography?.textAlign;
          return (0, import_blocks82.createBlock)("core/post-comments-count", {
            ...textAlign && {
              style: {
                typography: {
                  textAlign
                }
              }
            }
          });
        }
      }
    ]
  };
  var transforms_default25 = transforms24;

  // packages/block-library/build-module/post-comments-link/deprecated.mjs
  var v129 = {
    attributes: {
      textAlign: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      html: false,
      spacing: {
        margin: true,
        padding: true
      },
      color: {
        link: true,
        text: false,
        __experimentalDefaultControls: {
          background: true,
          link: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    },
    save: () => null
  };
  var deprecated_default34 = [v129];

  // packages/block-library/build-module/post-comments-link/index.mjs
  var { name: name72 } = block_default71;
  var settings71 = {
    edit: edit_default28,
    icon: post_comments_count_default,
    transforms: transforms_default25,
    deprecated: deprecated_default34
  };
  var init71 = () => initBlock({ name: name72, metadata: block_default71, settings: settings71 });

  // packages/block-library/build-module/post-content/index.mjs
  var post_content_exports = {};
  __export(post_content_exports, {
    init: () => init72,
    metadata: () => block_default72,
    name: () => name73,
    settings: () => settings72
  });

  // packages/block-library/build-module/post-content/block.json
  var block_default72 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-content",
    title: "Content",
    category: "theme",
    description: "Displays the contents of a post or page.",
    textdomain: "default",
    usesContext: ["postId", "postType", "queryId"],
    attributes: {
      tagName: {
        type: "string",
        default: "div"
      }
    },
    example: {
      viewportWidth: 350
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      layout: true,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        __experimentalDefaultControls: {
          backgroundImage: true
        }
      },
      dimensions: {
        minHeight: true
      },
      spacing: {
        blockGap: true,
        padding: true,
        margin: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      color: {
        gradients: true,
        heading: true,
        link: true,
        __experimentalDefaultControls: {
          background: false,
          text: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-post-content",
    editorStyle: "wp-block-post-content-editor"
  };

  // packages/block-library/build-module/post-content/edit.mjs
  var import_i18n166 = __toESM(require_i18n(), 1);
  var import_block_editor188 = __toESM(require_block_editor(), 1);
  var import_blocks83 = __toESM(require_blocks(), 1);
  var import_core_data58 = __toESM(require_core_data(), 1);
  var import_data103 = __toESM(require_data(), 1);
  var import_element95 = __toESM(require_element(), 1);
  var import_jsx_runtime364 = __toESM(require_jsx_runtime(), 1);
  var { HTMLElementControl: HTMLElementControl5 } = unlock(import_block_editor188.privateApis);
  function ReadOnlyContent({
    parentLayout,
    layoutClassNames,
    userCanEdit,
    postType,
    postId,
    tagName: TagName2 = "div"
  }) {
    const [, , content] = (0, import_core_data58.useEntityProp)(
      "postType",
      postType,
      "content",
      postId
    );
    const blockProps = (0, import_block_editor188.useBlockProps)({ className: layoutClassNames });
    const blocks = (0, import_element95.useMemo)(() => {
      return content?.raw ? (0, import_blocks83.parse)(content.raw) : [];
    }, [content?.raw]);
    const blockPreviewProps = (0, import_block_editor188.__experimentalUseBlockPreview)({
      blocks,
      props: blockProps,
      layout: parentLayout
    });
    if (userCanEdit) {
      return /* @__PURE__ */ (0, import_jsx_runtime364.jsx)("div", { ...blockPreviewProps });
    }
    return content?.protected ? /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(import_block_editor188.Warning, { children: (0, import_i18n166.__)("This content is password protected.") }) }) : /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
      TagName2,
      {
        ...blockProps,
        dangerouslySetInnerHTML: { __html: content?.rendered }
      }
    );
  }
  function EditableContent({ context = {}, tagName: TagName2 = "div" }) {
    const { postType, postId } = context;
    const [blocks, onInput, onChange] = (0, import_core_data58.useEntityBlockEditor)(
      "postType",
      postType,
      { id: postId }
    );
    const entityRecord = (0, import_data103.useSelect)(
      (select9) => {
        return select9(import_core_data58.store).getEntityRecord(
          "postType",
          postType,
          postId
        );
      },
      [postType, postId]
    );
    const hasInnerBlocks = !!entityRecord?.content?.raw || blocks?.length;
    const initialInnerBlocks = [["core/paragraph"]];
    const props = (0, import_block_editor188.useInnerBlocksProps)(
      (0, import_block_editor188.useBlockProps)({ className: "entry-content" }),
      {
        value: blocks,
        onInput,
        onChange,
        template: !hasInnerBlocks ? initialInnerBlocks : void 0
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(TagName2, { ...props });
  }
  function Content(props) {
    const {
      context: { queryId, postType, postId } = {},
      layoutClassNames,
      tagName
    } = props;
    const userCanEdit = useCanEditEntity("postType", postType, postId);
    if (userCanEdit === void 0) {
      return null;
    }
    const isDescendentOfQueryLoop = Number.isFinite(queryId);
    const isEditable = userCanEdit && !isDescendentOfQueryLoop;
    return isEditable ? /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(EditableContent, { ...props }) : /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
      ReadOnlyContent,
      {
        parentLayout: props.parentLayout,
        layoutClassNames,
        userCanEdit,
        postType,
        postId,
        tagName
      }
    );
  }
  function Placeholder16({ layoutClassNames }) {
    const blockProps = (0, import_block_editor188.useBlockProps)({ className: layoutClassNames });
    return /* @__PURE__ */ (0, import_jsx_runtime364.jsxs)("div", { ...blockProps, children: [
      /* @__PURE__ */ (0, import_jsx_runtime364.jsx)("p", { children: (0, import_i18n166.__)(
        "This is the Content block, it will display all the blocks in any single post or page."
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime364.jsx)("p", { children: (0, import_i18n166.__)(
        "That might be a simple arrangement like consecutive paragraphs in a blog post, or a more elaborate composition that includes image galleries, videos, tables, columns, and any other block types."
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime364.jsx)("p", { children: (0, import_i18n166.__)(
        "If there are any Custom Post Types registered at your site, the Content block can display the contents of those entries as well."
      ) })
    ] });
  }
  function RecursionError() {
    const blockProps = (0, import_block_editor188.useBlockProps)();
    return /* @__PURE__ */ (0, import_jsx_runtime364.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(import_block_editor188.Warning, { children: (0, import_i18n166.__)("Block cannot be rendered inside itself.") }) });
  }
  function PostContentEditControls({ tagName, onSelectTagName, clientId }) {
    return /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(import_block_editor188.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
      HTMLElementControl5,
      {
        tagName,
        onChange: onSelectTagName,
        clientId,
        options: [
          { label: (0, import_i18n166.__)("Default (<div>)"), value: "div" },
          { label: "<main>", value: "main" },
          { label: "<section>", value: "section" },
          { label: "<article>", value: "article" }
        ]
      }
    ) });
  }
  function PostContentEdit({
    context,
    attributes: { tagName = "div" },
    setAttributes,
    clientId,
    __unstableLayoutClassNames: layoutClassNames,
    __unstableParentLayout: parentLayout
  }) {
    const { postId: contextPostId, postType: contextPostType } = context;
    const hasAlreadyRendered = (0, import_block_editor188.useHasRecursion)(contextPostId);
    if (contextPostId && contextPostType && hasAlreadyRendered) {
      return /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(RecursionError, {});
    }
    const handleSelectTagName = (value) => {
      setAttributes({ tagName: value });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime364.jsxs)(import_jsx_runtime364.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
        PostContentEditControls,
        {
          tagName,
          onSelectTagName: handleSelectTagName,
          clientId
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(import_block_editor188.RecursionProvider, { uniqueId: contextPostId, children: contextPostId && contextPostType ? /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
        Content,
        {
          context,
          parentLayout,
          layoutClassNames
        }
      ) : /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(Placeholder16, { layoutClassNames }) })
    ] });
  }

  // packages/block-library/build-module/post-content/index.mjs
  var { name: name73 } = block_default72;
  var settings72 = {
    icon: post_content_default,
    edit: PostContentEdit
  };
  var init72 = () => initBlock({ name: name73, metadata: block_default72, settings: settings72 });

  // packages/block-library/build-module/post-date/index.mjs
  var post_date_exports = {};
  __export(post_date_exports, {
    init: () => init73,
    metadata: () => block_default73,
    name: () => name74,
    settings: () => settings73
  });

  // packages/block-library/build-module/post-date/block.json
  var block_default73 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-date",
    title: "Date",
    category: "theme",
    description: "Display a custom date.",
    textdomain: "default",
    attributes: {
      datetime: {
        type: "string",
        role: "content"
      },
      textAlign: {
        type: "string"
      },
      format: {
        type: "string"
      },
      isLink: {
        type: "boolean",
        default: false,
        role: "content"
      }
    },
    usesContext: ["postId", "postType", "queryId"],
    example: {
      viewportWidth: 350
    },
    supports: {
      anchor: true,
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    }
  };

  // packages/block-library/build-module/post-date/edit.mjs
  var import_core_data59 = __toESM(require_core_data(), 1);
  var import_element96 = __toESM(require_element(), 1);
  var import_date3 = __toESM(require_date(), 1);
  var import_block_editor189 = __toESM(require_block_editor(), 1);
  var import_components108 = __toESM(require_components(), 1);
  var import_i18n167 = __toESM(require_i18n(), 1);
  var import_keycodes8 = __toESM(require_keycodes(), 1);
  var import_data104 = __toESM(require_data(), 1);
  var import_blocks84 = __toESM(require_blocks(), 1);
  var import_jsx_runtime365 = __toESM(require_jsx_runtime(), 1);
  function PostDateEdit({
    attributes: attributes2,
    context: { postType: postTypeSlug, queryId },
    setAttributes,
    name: name123
  }) {
    const { datetime, textAlign, format: format3, isLink } = attributes2;
    const blockProps = (0, import_block_editor189.useBlockProps)({
      className: clsx_default({
        [`has-text-align-${textAlign}`]: textAlign
      })
    });
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const [popoverAnchor, setPopoverAnchor] = (0, import_element96.useState)(null);
    const popoverProps = (0, import_element96.useMemo)(
      () => ({ anchor: popoverAnchor }),
      [popoverAnchor]
    );
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data104.useDispatch)(import_block_editor189.store);
    (0, import_element96.useEffect)(() => {
      if (datetime === void 0) {
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({ datetime: /* @__PURE__ */ new Date() });
      }
    }, [datetime]);
    const isDescendentOfQueryLoop = Number.isFinite(queryId);
    const dateSettings = (0, import_date3.getSettings)();
    const {
      postType,
      siteFormat = dateSettings.formats.date,
      siteTimeFormat = dateSettings.formats.time
    } = (0, import_data104.useSelect)(
      (select9) => {
        const { getPostType, getEntityRecord } = select9(import_core_data59.store);
        const siteSettings = getEntityRecord("root", "site");
        return {
          siteFormat: siteSettings?.date_format,
          siteTimeFormat: siteSettings?.time_format,
          postType: postTypeSlug ? getPostType(postTypeSlug) : null
        };
      },
      [postTypeSlug]
    );
    const activeBlockVariationName = (0, import_data104.useSelect)(
      (select9) => select9(import_blocks84.store).getActiveBlockVariation(name123, attributes2)?.name,
      [name123, attributes2]
    );
    const blockEditingMode = (0, import_block_editor189.useBlockEditingMode)();
    let postDate2 = /* @__PURE__ */ (0, import_jsx_runtime365.jsx)("time", { dateTime: (0, import_date3.dateI18n)("c", datetime), ref: setPopoverAnchor, children: format3 === "human-diff" ? (0, import_date3.humanTimeDiff)(datetime) : (0, import_date3.dateI18n)(format3 || siteFormat, datetime) });
    if (isLink && datetime) {
      postDate2 = /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
        "a",
        {
          href: "#post-date-pseudo-link",
          onClick: (event) => event.preventDefault(),
          children: postDate2
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime365.jsxs)(import_jsx_runtime365.Fragment, { children: [
      (blockEditingMode === "default" || !isDescendentOfQueryLoop) && /* @__PURE__ */ (0, import_jsx_runtime365.jsxs)(import_block_editor189.BlockControls, { group: "block", children: [
        /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
          import_block_editor189.AlignmentControl,
          {
            value: textAlign,
            onChange: (nextAlign) => {
              setAttributes({ textAlign: nextAlign });
            }
          }
        ),
        activeBlockVariationName !== "post-date-modified" && (!isDescendentOfQueryLoop || !activeBlockVariationName) && /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(import_components108.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
          import_components108.Dropdown,
          {
            popoverProps,
            renderContent: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
              import_block_editor189.__experimentalPublishDateTimePicker,
              {
                title: activeBlockVariationName === "post-date" ? (0, import_i18n167.__)("Publish Date") : (0, import_i18n167.__)("Date"),
                currentDate: datetime,
                onChange: (newDatetime) => setAttributes({
                  datetime: newDatetime
                }),
                is12Hour: is12HourFormat(
                  siteTimeFormat
                ),
                onClose,
                dateOrder: (
                  /* translators: Order of day, month, and year. Available formats are 'dmy', 'mdy', and 'ymd'. */
                  (0, import_i18n167._x)("dmy", "date order")
                )
              }
            ),
            renderToggle: ({ isOpen, onToggle }) => {
              const openOnArrowDown = (event) => {
                if (!isOpen && event.keyCode === import_keycodes8.DOWN) {
                  event.preventDefault();
                  onToggle();
                }
              };
              return /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
                import_components108.ToolbarButton,
                {
                  "aria-expanded": isOpen,
                  icon: pencil_default,
                  title: (0, import_i18n167.__)("Change Date"),
                  onClick: onToggle,
                  onKeyDown: openOnArrowDown
                }
              );
            }
          }
        ) })
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(import_block_editor189.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime365.jsxs)(
        import_components108.__experimentalToolsPanel,
        {
          label: (0, import_i18n167.__)("Settings"),
          resetAll: () => {
            setAttributes({
              datetime: void 0,
              format: void 0,
              isLink: false
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
              import_components108.__experimentalToolsPanelItem,
              {
                hasValue: () => !!format3,
                label: (0, import_i18n167.__)("Date Format"),
                onDeselect: () => setAttributes({ format: void 0 }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
                  import_block_editor189.__experimentalDateFormatPicker,
                  {
                    format: format3,
                    defaultFormat: siteFormat,
                    onChange: (nextFormat) => setAttributes({ format: nextFormat })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
              import_components108.__experimentalToolsPanelItem,
              {
                hasValue: () => isLink !== false,
                label: postType?.labels.singular_name ? (0, import_i18n167.sprintf)(
                  // translators: %s: Name of the post type e.g: "post".
                  (0, import_i18n167.__)("Link to %s"),
                  postType.labels.singular_name.toLowerCase()
                ) : (0, import_i18n167.__)("Link to post"),
                onDeselect: () => setAttributes({ isLink: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
                  import_components108.ToggleControl,
                  {
                    label: postType?.labels.singular_name ? (0, import_i18n167.sprintf)(
                      // translators: %s: Name of the post type e.g: "post".
                      (0, import_i18n167.__)("Link to %s"),
                      postType.labels.singular_name.toLowerCase()
                    ) : (0, import_i18n167.__)("Link to post"),
                    onChange: () => setAttributes({ isLink: !isLink }),
                    checked: isLink
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime365.jsx)("div", { ...blockProps, children: postDate2 })
    ] });
  }
  function is12HourFormat(format3) {
    return /(?:^|[^\\])[aAgh]/.test(format3);
  }

  // packages/block-library/build-module/post-date/deprecated.mjs
  var v38 = {
    attributes: {
      datetime: {
        type: "string",
        role: "content"
      },
      textAlign: {
        type: "string"
      },
      format: {
        type: "string"
      },
      isLink: {
        type: "boolean",
        default: false,
        role: "content"
      }
    },
    supports: {
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    save() {
      return null;
    },
    migrate({
      metadata: {
        bindings: {
          datetime: {
            source,
            args: { key, ...otherArgs }
          },
          ...otherBindings
        },
        ...otherMetadata
      },
      ...otherAttributes
    }) {
      return {
        metadata: {
          bindings: {
            datetime: {
              source,
              args: { field: key, ...otherArgs }
            },
            ...otherBindings
          },
          ...otherMetadata
        },
        ...otherAttributes
      };
    },
    isEligible(attributes2) {
      return attributes2?.metadata?.bindings?.datetime?.source === "core/post-data" && !!attributes2?.metadata?.bindings?.datetime?.args?.key;
    }
  };
  var v213 = {
    attributes: {
      textAlign: {
        type: "string"
      },
      format: {
        type: "string"
      },
      isLink: {
        type: "boolean",
        default: false,
        role: "content"
      },
      displayType: {
        type: "string",
        default: "date"
      }
    },
    supports: {
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    save() {
      return null;
    },
    migrate({ className, displayType, metadata, ...otherAttributes }) {
      if (displayType === "date" || displayType === "modified") {
        if (displayType === "modified") {
          className = clsx_default(
            className,
            "wp-block-post-date__modified-date"
          );
        }
        return {
          ...otherAttributes,
          className,
          metadata: {
            ...metadata,
            bindings: {
              datetime: {
                source: "core/post-data",
                args: { field: displayType }
              }
            }
          }
        };
      }
    },
    isEligible(attributes2) {
      return !attributes2.datetime && !attributes2?.metadata?.bindings?.datetime;
    }
  };
  var v130 = {
    attributes: {
      textAlign: {
        type: "string"
      },
      format: {
        type: "string"
      },
      isLink: {
        type: "boolean",
        default: false
      }
    },
    supports: {
      html: false,
      color: {
        gradients: true,
        link: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalLetterSpacing: true
      }
    },
    save() {
      return null;
    },
    migrate: migrate_font_family_default,
    isEligible({ style: style2 }) {
      return style2?.typography?.fontFamily;
    }
  };
  var deprecated_default35 = [v38, v213, v130];

  // packages/block-library/build-module/post-date/variations.mjs
  var import_i18n168 = __toESM(require_i18n(), 1);
  var variations10 = [
    {
      name: "post-date",
      title: (0, import_i18n168.__)("Post Date"),
      description: (0, import_i18n168.__)("Display a post's publish date."),
      attributes: {
        metadata: {
          bindings: {
            datetime: {
              source: "core/post-data",
              args: { field: "date" }
            }
          }
        }
      },
      scope: ["inserter", "transform"],
      isActive: (blockAttributes8) => blockAttributes8?.metadata?.bindings?.datetime?.source === "core/post-data" && blockAttributes8?.metadata?.bindings?.datetime?.args?.field === "date"
    },
    {
      name: "post-date-modified",
      title: (0, import_i18n168.__)("Modified Date"),
      description: (0, import_i18n168.__)("Display a post's last updated date."),
      attributes: {
        metadata: {
          bindings: {
            datetime: {
              source: "core/post-data",
              args: { field: "modified" }
            }
          }
        },
        className: "wp-block-post-date__modified-date"
      },
      scope: ["inserter", "transform"],
      isActive: (blockAttributes8) => blockAttributes8?.metadata?.bindings?.datetime?.source === "core/post-data" && blockAttributes8?.metadata?.bindings?.datetime?.args?.field === "modified"
    }
  ];
  var variations_default10 = variations10;

  // packages/block-library/build-module/post-date/index.mjs
  var { name: name74 } = block_default73;
  var settings73 = {
    icon: post_date_default,
    edit: PostDateEdit,
    deprecated: deprecated_default35,
    variations: variations_default10
  };
  var init73 = () => initBlock({ name: name74, metadata: block_default73, settings: settings73 });

  // packages/block-library/build-module/post-excerpt/index.mjs
  var post_excerpt_exports = {};
  __export(post_excerpt_exports, {
    init: () => init74,
    metadata: () => block_default74,
    name: () => name75,
    settings: () => settings74
  });

  // packages/block-library/build-module/post-excerpt/block.json
  var block_default74 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-excerpt",
    title: "Excerpt",
    category: "theme",
    description: "Display the excerpt.",
    textdomain: "default",
    attributes: {
      textAlign: {
        type: "string"
      },
      moreText: {
        type: "string",
        role: "content"
      },
      showMoreOnNewLine: {
        type: "boolean",
        default: true
      },
      excerptLength: {
        type: "number",
        default: 55
      }
    },
    usesContext: ["postId", "postType", "queryId"],
    example: {
      viewportWidth: 350
    },
    supports: {
      anchor: true,
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textColumns: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    editorStyle: "wp-block-post-excerpt-editor",
    style: "wp-block-post-excerpt"
  };

  // packages/block-library/build-module/post-excerpt/edit.mjs
  var import_core_data60 = __toESM(require_core_data(), 1);
  var import_element97 = __toESM(require_element(), 1);
  var import_block_editor190 = __toESM(require_block_editor(), 1);
  var import_components109 = __toESM(require_components(), 1);
  var import_i18n169 = __toESM(require_i18n(), 1);
  var import_data105 = __toESM(require_data(), 1);
  var import_jsx_runtime366 = __toESM(require_jsx_runtime(), 1);
  var ELLIPSIS = "\u2026";
  function PostExcerptEditor({
    attributes: { textAlign, moreText, showMoreOnNewLine, excerptLength },
    setAttributes,
    isSelected,
    context: { postId, postType, queryId }
  }) {
    const blockEditingMode = (0, import_block_editor190.useBlockEditingMode)();
    const showControls = blockEditingMode === "default";
    const isDescendentOfQueryLoop = Number.isFinite(queryId);
    const userCanEdit = useCanEditEntity("postType", postType, postId);
    const [
      rawExcerpt,
      setExcerpt,
      { rendered: renderedExcerpt, protected: isProtected } = {}
    ] = (0, import_core_data60.useEntityProp)("postType", postType, "excerpt", postId);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const postTypeSupportsExcerpts = (0, import_data105.useSelect)(
      (select9) => {
        if (postType === "page") {
          return true;
        }
        return !!select9(import_core_data60.store).getPostType(postType)?.supports?.excerpt;
      },
      [postType]
    );
    const isEditable = userCanEdit && !isDescendentOfQueryLoop && postTypeSupportsExcerpts;
    const blockProps = (0, import_block_editor190.useBlockProps)({
      className: clsx_default({
        [`has-text-align-${textAlign}`]: textAlign
      })
    });
    const wordCountType = (0, import_i18n169._x)("words", "Word count type. Do not translate!");
    const strippedRenderedExcerpt = (0, import_element97.useMemo)(() => {
      if (!renderedExcerpt) {
        return "";
      }
      const document2 = new window.DOMParser().parseFromString(
        renderedExcerpt,
        "text/html"
      );
      return document2.body.textContent || document2.body.innerText || "";
    }, [renderedExcerpt]);
    if (!postType || !postId) {
      return /* @__PURE__ */ (0, import_jsx_runtime366.jsxs)(import_jsx_runtime366.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(import_block_editor190.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
          import_block_editor190.AlignmentToolbar,
          {
            value: textAlign,
            onChange: (newAlign) => setAttributes({ textAlign: newAlign })
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime366.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime366.jsx)("p", { children: (0, import_i18n169.__)("This block will display the excerpt.") }) })
      ] });
    }
    if (isProtected && !userCanEdit) {
      return /* @__PURE__ */ (0, import_jsx_runtime366.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(import_block_editor190.Warning, { children: (0, import_i18n169.__)(
        "The content is currently protected and does not have the available excerpt."
      ) }) });
    }
    const readMoreLink = /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
      import_block_editor190.RichText,
      {
        identifier: "moreText",
        className: "wp-block-post-excerpt__more-link",
        tagName: "a",
        "aria-label": (0, import_i18n169.__)("\u201CRead more\u201D link text"),
        placeholder: (0, import_i18n169.__)('Add "read more" link text'),
        value: moreText,
        onChange: (newMoreText) => setAttributes({ moreText: newMoreText }),
        withoutInteractiveFormatting: true
      }
    );
    const excerptClassName = clsx_default("wp-block-post-excerpt__excerpt", {
      "is-inline": !showMoreOnNewLine
    });
    const rawOrRenderedExcerpt = (rawExcerpt || strippedRenderedExcerpt).trim();
    let trimmedExcerpt = "";
    if (wordCountType === "words") {
      trimmedExcerpt = rawOrRenderedExcerpt.split(/\s+/, excerptLength).join(" ");
    } else if (wordCountType === "characters_excluding_spaces") {
      const excerptWithSpaces = rawOrRenderedExcerpt.split("", excerptLength).join("");
      const numberOfSpaces = excerptWithSpaces.length - excerptWithSpaces.replaceAll(" ", "").length;
      trimmedExcerpt = rawOrRenderedExcerpt.split("", excerptLength + numberOfSpaces).join("");
    } else if (wordCountType === "characters_including_spaces") {
      trimmedExcerpt = rawOrRenderedExcerpt.split("", excerptLength).join("");
    }
    const isTrimmed = trimmedExcerpt !== rawOrRenderedExcerpt;
    const excerptContent = isEditable ? /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
      import_block_editor190.RichText,
      {
        className: excerptClassName,
        "aria-label": (0, import_i18n169.__)("Excerpt text"),
        value: isSelected ? rawOrRenderedExcerpt : (!isTrimmed ? rawOrRenderedExcerpt : trimmedExcerpt + ELLIPSIS) || (0, import_i18n169.__)("No excerpt found"),
        onChange: setExcerpt,
        tagName: "p",
        allowedFormats: [],
        preserveWhiteSpace: true
      }
    ) : /* @__PURE__ */ (0, import_jsx_runtime366.jsx)("p", { className: excerptClassName, children: !isTrimmed ? rawOrRenderedExcerpt || (0, import_i18n169.__)("No excerpt found") : trimmedExcerpt + ELLIPSIS });
    return /* @__PURE__ */ (0, import_jsx_runtime366.jsxs)(import_jsx_runtime366.Fragment, { children: [
      showControls && /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(import_block_editor190.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
        import_block_editor190.AlignmentToolbar,
        {
          value: textAlign,
          onChange: (newAlign) => setAttributes({ textAlign: newAlign })
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(import_block_editor190.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime366.jsxs)(
        import_components109.__experimentalToolsPanel,
        {
          label: (0, import_i18n169.__)("Settings"),
          resetAll: () => {
            setAttributes({
              showMoreOnNewLine: true,
              excerptLength: 55
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
              import_components109.__experimentalToolsPanelItem,
              {
                hasValue: () => showMoreOnNewLine !== true,
                label: (0, import_i18n169.__)("Show link on new line"),
                onDeselect: () => setAttributes({ showMoreOnNewLine: true }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
                  import_components109.ToggleControl,
                  {
                    label: (0, import_i18n169.__)("Show link on new line"),
                    checked: showMoreOnNewLine,
                    onChange: (newShowMoreOnNewLine) => setAttributes({
                      showMoreOnNewLine: newShowMoreOnNewLine
                    })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
              import_components109.__experimentalToolsPanelItem,
              {
                hasValue: () => excerptLength !== 55,
                label: (0, import_i18n169.__)("Max number of words"),
                onDeselect: () => setAttributes({ excerptLength: 55 }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
                  import_components109.RangeControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n169.__)("Max number of words"),
                    value: excerptLength,
                    onChange: (value) => {
                      setAttributes({ excerptLength: value });
                    },
                    min: "10",
                    max: "100"
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime366.jsxs)("div", { ...blockProps, children: [
        excerptContent,
        !showMoreOnNewLine && " ",
        showMoreOnNewLine ? /* @__PURE__ */ (0, import_jsx_runtime366.jsx)("p", { className: "wp-block-post-excerpt__more-text", children: readMoreLink }) : readMoreLink
      ] })
    ] });
  }

  // packages/block-library/build-module/post-excerpt/transforms.mjs
  var import_blocks85 = __toESM(require_blocks(), 1);
  var transforms25 = {
    from: [
      {
        type: "block",
        blocks: ["core/post-content"],
        transform: () => (0, import_blocks85.createBlock)("core/post-excerpt")
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/post-content"],
        transform: () => (0, import_blocks85.createBlock)("core/post-content")
      }
    ]
  };
  var transforms_default26 = transforms25;

  // packages/block-library/build-module/post-excerpt/index.mjs
  var { name: name75 } = block_default74;
  var settings74 = {
    icon: post_excerpt_default,
    transforms: transforms_default26,
    edit: PostExcerptEditor
  };
  var init74 = () => initBlock({ name: name75, metadata: block_default74, settings: settings74 });

  // packages/block-library/build-module/post-featured-image/index.mjs
  var post_featured_image_exports = {};
  __export(post_featured_image_exports, {
    init: () => init75,
    metadata: () => block_default75,
    name: () => name76,
    settings: () => settings75
  });

  // packages/block-library/build-module/post-featured-image/block.json
  var block_default75 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-featured-image",
    title: "Featured Image",
    category: "theme",
    description: "Display a post's featured image.",
    textdomain: "default",
    attributes: {
      isLink: {
        type: "boolean",
        default: false,
        role: "content"
      },
      aspectRatio: {
        type: "string"
      },
      width: {
        type: "string"
      },
      height: {
        type: "string"
      },
      scale: {
        type: "string",
        default: "cover"
      },
      sizeSlug: {
        type: "string"
      },
      rel: {
        type: "string",
        attribute: "rel",
        default: "",
        role: "content"
      },
      linkTarget: {
        type: "string",
        default: "_self",
        role: "content"
      },
      overlayColor: {
        type: "string"
      },
      customOverlayColor: {
        type: "string"
      },
      dimRatio: {
        type: "number",
        default: 0
      },
      gradient: {
        type: "string"
      },
      customGradient: {
        type: "string"
      },
      useFirstImageFromPost: {
        type: "boolean",
        default: false
      }
    },
    usesContext: ["postId", "postType", "queryId"],
    example: {
      viewportWidth: 350
    },
    supports: {
      anchor: true,
      align: ["left", "right", "center", "wide", "full"],
      color: {
        text: false,
        background: false
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        width: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          width: true
        }
      },
      filter: {
        duotone: true
      },
      shadow: {
        __experimentalSkipSerialization: true
      },
      html: false,
      spacing: {
        margin: true,
        padding: true
      },
      interactivity: {
        clientNavigation: true
      }
    },
    selectors: {
      border: ".wp-block-post-featured-image img, .wp-block-post-featured-image .block-editor-media-placeholder, .wp-block-post-featured-image .wp-block-post-featured-image__overlay",
      shadow: ".wp-block-post-featured-image img, .wp-block-post-featured-image .components-placeholder",
      filter: {
        duotone: ".wp-block-post-featured-image img, .wp-block-post-featured-image .wp-block-post-featured-image__placeholder, .wp-block-post-featured-image .components-placeholder__illustration, .wp-block-post-featured-image .components-placeholder::before"
      }
    },
    editorStyle: "wp-block-post-featured-image-editor",
    style: "wp-block-post-featured-image"
  };

  // packages/block-library/build-module/post-featured-image/edit.mjs
  var import_blob17 = __toESM(require_blob(), 1);
  var import_core_data61 = __toESM(require_core_data(), 1);
  var import_data106 = __toESM(require_data(), 1);
  var import_components112 = __toESM(require_components(), 1);
  var import_block_editor194 = __toESM(require_block_editor(), 1);
  var import_element98 = __toESM(require_element(), 1);
  var import_i18n172 = __toESM(require_i18n(), 1);
  var import_notices16 = __toESM(require_notices(), 1);

  // packages/block-library/build-module/post-featured-image/dimension-controls.mjs
  var import_i18n170 = __toESM(require_i18n(), 1);
  var import_components110 = __toESM(require_components(), 1);
  var import_block_editor191 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime367 = __toESM(require_jsx_runtime(), 1);
  var SCALE_OPTIONS = /* @__PURE__ */ (0, import_jsx_runtime367.jsxs)(import_jsx_runtime367.Fragment, { children: [
    /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
      import_components110.__experimentalToggleGroupControlOption,
      {
        value: "cover",
        label: (0, import_i18n170._x)("Cover", "Scale option for Image dimension control")
      }
    ),
    /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
      import_components110.__experimentalToggleGroupControlOption,
      {
        value: "contain",
        label: (0, import_i18n170._x)(
          "Contain",
          "Scale option for Image dimension control"
        )
      }
    ),
    /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
      import_components110.__experimentalToggleGroupControlOption,
      {
        value: "fill",
        label: (0, import_i18n170._x)("Fill", "Scale option for Image dimension control")
      }
    )
  ] });
  var DEFAULT_SCALE = "cover";
  var scaleHelp = {
    cover: (0, import_i18n170.__)(
      "Image is scaled and cropped to fill the entire space without being distorted."
    ),
    contain: (0, import_i18n170.__)(
      "Image is scaled to fill the space without clipping nor distorting."
    ),
    fill: (0, import_i18n170.__)(
      "Image will be stretched and distorted to completely fill the space."
    )
  };
  var DimensionControls = ({
    clientId,
    attributes: { aspectRatio, width, height, scale },
    setAttributes
  }) => {
    const [availableUnits, defaultRatios, themeRatios, showDefaultRatios] = (0, import_block_editor191.useSettings)(
      "spacing.units",
      "dimensions.aspectRatios.default",
      "dimensions.aspectRatios.theme",
      "dimensions.defaultAspectRatios"
    );
    const units = (0, import_components110.__experimentalUseCustomUnits)({
      availableUnits: availableUnits || ["px", "%", "vw", "em", "rem"]
    });
    const onDimensionChange = (dimension, nextValue) => {
      const parsedValue = parseFloat(nextValue);
      if (isNaN(parsedValue) && nextValue) {
        return;
      }
      setAttributes({
        [dimension]: parsedValue < 0 ? "0" : nextValue
      });
    };
    const scaleLabel = (0, import_i18n170._x)("Scale", "Image scaling options");
    const showScaleControl = height || aspectRatio && aspectRatio !== "auto";
    const themeOptions = themeRatios?.map(({ name: name123, ratio }) => ({
      label: name123,
      value: ratio
    }));
    const defaultOptions = defaultRatios?.map(({ name: name123, ratio }) => ({
      label: name123,
      value: ratio
    }));
    const aspectRatioOptions = [
      {
        label: (0, import_i18n170._x)(
          "Original",
          "Aspect ratio option for dimensions control"
        ),
        value: "auto"
      },
      ...showDefaultRatios ? defaultOptions : [],
      ...themeOptions ? themeOptions : []
    ];
    return /* @__PURE__ */ (0, import_jsx_runtime367.jsxs)(import_jsx_runtime367.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
        import_components110.__experimentalToolsPanelItem,
        {
          hasValue: () => !!aspectRatio,
          label: (0, import_i18n170.__)("Aspect ratio"),
          onDeselect: () => setAttributes({ aspectRatio: void 0 }),
          resetAllFilter: () => ({
            aspectRatio: void 0
          }),
          isShownByDefault: true,
          panelId: clientId,
          children: /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
            import_components110.SelectControl,
            {
              __next40pxDefaultSize: true,
              label: (0, import_i18n170.__)("Aspect ratio"),
              value: aspectRatio || "auto",
              options: aspectRatioOptions,
              onChange: (nextAspectRatio) => setAttributes({ aspectRatio: nextAspectRatio })
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
        import_components110.__experimentalToolsPanelItem,
        {
          className: "single-column",
          hasValue: () => !!height,
          label: (0, import_i18n170.__)("Height"),
          onDeselect: () => setAttributes({ height: void 0 }),
          resetAllFilter: () => ({
            height: void 0
          }),
          isShownByDefault: true,
          panelId: clientId,
          children: /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
            import_components110.__experimentalUnitControl,
            {
              __next40pxDefaultSize: true,
              label: (0, import_i18n170.__)("Height"),
              labelPosition: "top",
              value: height || "",
              min: 0,
              onChange: (nextHeight) => onDimensionChange("height", nextHeight),
              units
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
        import_components110.__experimentalToolsPanelItem,
        {
          className: "single-column",
          hasValue: () => !!width,
          label: (0, import_i18n170.__)("Width"),
          onDeselect: () => setAttributes({ width: void 0 }),
          resetAllFilter: () => ({
            width: void 0
          }),
          isShownByDefault: true,
          panelId: clientId,
          children: /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
            import_components110.__experimentalUnitControl,
            {
              __next40pxDefaultSize: true,
              label: (0, import_i18n170.__)("Width"),
              labelPosition: "top",
              value: width || "",
              min: 0,
              onChange: (nextWidth) => onDimensionChange("width", nextWidth),
              units
            }
          )
        }
      ),
      showScaleControl && /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
        import_components110.__experimentalToolsPanelItem,
        {
          hasValue: () => !!scale && scale !== DEFAULT_SCALE,
          label: scaleLabel,
          onDeselect: () => setAttributes({
            scale: DEFAULT_SCALE
          }),
          resetAllFilter: () => ({
            scale: DEFAULT_SCALE
          }),
          isShownByDefault: true,
          panelId: clientId,
          children: /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
            import_components110.__experimentalToggleGroupControl,
            {
              __next40pxDefaultSize: true,
              label: scaleLabel,
              value: scale,
              help: scaleHelp[scale],
              onChange: (value) => setAttributes({
                scale: value
              }),
              isBlock: true,
              children: SCALE_OPTIONS
            }
          )
        }
      )
    ] });
  };
  var dimension_controls_default = DimensionControls;

  // packages/block-library/build-module/post-featured-image/overlay-controls.mjs
  var import_components111 = __toESM(require_components(), 1);
  var import_block_editor192 = __toESM(require_block_editor(), 1);
  var import_compose44 = __toESM(require_compose(), 1);
  var import_i18n171 = __toESM(require_i18n(), 1);
  var import_jsx_runtime368 = __toESM(require_jsx_runtime(), 1);
  var Overlay = ({
    clientId,
    attributes: attributes2,
    setAttributes,
    overlayColor,
    setOverlayColor
  }) => {
    const { dimRatio } = attributes2;
    const { gradientValue, setGradient } = (0, import_block_editor192.__experimentalUseGradient)();
    const colorGradientSettings = (0, import_block_editor192.__experimentalUseMultipleOriginColorsAndGradients)();
    if (!colorGradientSettings.hasColorsOrGradients) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime368.jsxs)(import_jsx_runtime368.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(
        import_block_editor192.__experimentalColorGradientSettingsDropdown,
        {
          __experimentalIsRenderedInSidebar: true,
          settings: [
            {
              colorValue: overlayColor.color,
              gradientValue,
              label: (0, import_i18n171.__)("Overlay"),
              onColorChange: setOverlayColor,
              onGradientChange: setGradient,
              isShownByDefault: true,
              resetAllFilter: () => ({
                overlayColor: void 0,
                customOverlayColor: void 0,
                gradient: void 0,
                customGradient: void 0
              }),
              clearable: true
            }
          ],
          panelId: clientId,
          ...colorGradientSettings
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(
        import_components111.__experimentalToolsPanelItem,
        {
          hasValue: () => dimRatio !== void 0,
          label: (0, import_i18n171.__)("Overlay opacity"),
          onDeselect: () => setAttributes({ dimRatio: 0 }),
          resetAllFilter: () => ({
            dimRatio: 0
          }),
          isShownByDefault: true,
          panelId: clientId,
          children: /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(
            import_components111.RangeControl,
            {
              label: (0, import_i18n171.__)("Overlay opacity"),
              value: dimRatio,
              onChange: (newDimRatio) => setAttributes({
                dimRatio: newDimRatio
              }),
              min: 0,
              max: 100,
              step: 10,
              required: true,
              __next40pxDefaultSize: true
            }
          )
        }
      )
    ] });
  };
  var overlay_controls_default = (0, import_compose44.compose)([
    (0, import_block_editor192.withColors)({ overlayColor: "background-color" })
  ])(Overlay);

  // packages/block-library/build-module/post-featured-image/overlay.mjs
  var import_block_editor193 = __toESM(require_block_editor(), 1);
  var import_compose45 = __toESM(require_compose(), 1);

  // packages/block-library/build-module/post-featured-image/utils.mjs
  function dimRatioToClass2(ratio) {
    return ratio === void 0 ? null : "has-background-dim-" + 10 * Math.round(ratio / 10);
  }

  // packages/block-library/build-module/post-featured-image/overlay.mjs
  var import_jsx_runtime369 = __toESM(require_jsx_runtime(), 1);
  var Overlay2 = ({ attributes: attributes2, overlayColor }) => {
    const { dimRatio } = attributes2;
    const { gradientClass, gradientValue } = (0, import_block_editor193.__experimentalUseGradient)();
    const colorGradientSettings = (0, import_block_editor193.__experimentalUseMultipleOriginColorsAndGradients)();
    const borderProps = (0, import_block_editor193.__experimentalUseBorderProps)(attributes2);
    const overlayStyles = {
      backgroundColor: overlayColor.color,
      backgroundImage: gradientValue,
      ...borderProps.style
    };
    if (!colorGradientSettings.hasColorsOrGradients || !dimRatio) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime369.jsx)(
      "span",
      {
        "aria-hidden": "true",
        className: clsx_default(
          "wp-block-post-featured-image__overlay",
          dimRatioToClass2(dimRatio),
          {
            [overlayColor.class]: overlayColor.class,
            "has-background-dim": dimRatio !== void 0,
            "has-background-gradient": gradientValue,
            [gradientClass]: gradientClass
          },
          borderProps.className
        ),
        style: overlayStyles
      }
    );
  };
  var overlay_default = (0, import_compose45.compose)([
    (0, import_block_editor193.withColors)({ overlayColor: "background-color" })
  ])(Overlay2);

  // packages/block-library/build-module/post-featured-image/edit.mjs
  var import_jsx_runtime370 = __toESM(require_jsx_runtime(), 1);
  var ALLOWED_MEDIA_TYPES8 = ["image"];
  var { ResolutionTool: ResolutionTool4 } = unlock(import_block_editor194.privateApis);
  var DEFAULT_MEDIA_SIZE_SLUG5 = "full";
  function FeaturedImageResolutionTool({ image, value, onChange }) {
    const { imageSizes } = (0, import_data106.useSelect)((select9) => {
      const { getSettings: getSettings2 } = select9(import_block_editor194.store);
      return {
        imageSizes: getSettings2().imageSizes
      };
    }, []);
    if (!imageSizes?.length) {
      return null;
    }
    const imageSizeOptions = imageSizes.filter(
      ({ slug }) => image?.media_details?.sizes?.[slug]?.source_url
    ).map(({ name: name123, slug }) => ({ value: slug, label: name123 }));
    return /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
      ResolutionTool4,
      {
        value,
        defaultValue: DEFAULT_MEDIA_SIZE_SLUG5,
        options: imageSizeOptions,
        onChange
      }
    );
  }
  function PostFeaturedImageEdit({
    clientId,
    attributes: attributes2,
    setAttributes,
    context: { postId, postType: postTypeSlug, queryId }
  }) {
    const isDescendentOfQueryLoop = Number.isFinite(queryId);
    const {
      isLink,
      aspectRatio,
      height,
      width,
      scale,
      sizeSlug,
      rel,
      linkTarget,
      useFirstImageFromPost
    } = attributes2;
    const [temporaryURL, setTemporaryURL] = (0, import_element98.useState)();
    const [storedFeaturedImage, setFeaturedImage] = (0, import_core_data61.useEntityProp)(
      "postType",
      postTypeSlug,
      "featured_media",
      postId
    );
    const [postContent] = (0, import_core_data61.useEntityProp)(
      "postType",
      postTypeSlug,
      "content",
      postId
    );
    const featuredImage = (0, import_element98.useMemo)(() => {
      if (storedFeaturedImage) {
        return storedFeaturedImage;
      }
      if (!useFirstImageFromPost) {
        return;
      }
      const imageOpener = /<!--\s+wp:(?:core\/)?image\s+(?<attrs>{(?:(?:[^}]+|}+(?=})|(?!}\s+\/?-->).)*)?}\s+)?-->/.exec(
        postContent
      );
      const imageId = imageOpener?.groups?.attrs && JSON.parse(imageOpener.groups.attrs)?.id;
      return imageId;
    }, [storedFeaturedImage, useFirstImageFromPost, postContent]);
    const { media, postType, postPermalink } = (0, import_data106.useSelect)(
      (select9) => {
        const { getEntityRecord, getPostType, getEditedEntityRecord } = select9(import_core_data61.store);
        return {
          media: featuredImage && getEntityRecord("postType", "attachment", featuredImage, {
            context: "view"
          }),
          postType: postTypeSlug && getPostType(postTypeSlug),
          postPermalink: getEditedEntityRecord(
            "postType",
            postTypeSlug,
            postId
          )?.link
        };
      },
      [featuredImage, postTypeSlug, postId]
    );
    const mediaUrl = media?.media_details?.sizes?.[sizeSlug]?.source_url || media?.source_url;
    const blockProps = (0, import_block_editor194.useBlockProps)({
      style: { width, height, aspectRatio },
      className: clsx_default({
        "is-transient": temporaryURL
      })
    });
    const borderProps = (0, import_block_editor194.__experimentalUseBorderProps)(attributes2);
    const shadowProps = (0, import_block_editor194.__experimentalGetShadowClassesAndStyles)(attributes2);
    const blockEditingMode = (0, import_block_editor194.useBlockEditingMode)();
    const placeholder2 = (content) => {
      return /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
        import_components112.Placeholder,
        {
          className: clsx_default(
            "block-editor-media-placeholder",
            borderProps.className
          ),
          withIllustration: true,
          style: {
            height: !!aspectRatio && "100%",
            width: !!aspectRatio && "100%",
            ...borderProps.style,
            ...shadowProps.style
          },
          children: content
        }
      );
    };
    const onSelectImage = (value) => {
      if (value?.id) {
        setFeaturedImage(value.id);
      }
      if (value?.url && (0, import_blob17.isBlobURL)(value.url)) {
        setTemporaryURL(value.url);
      }
    };
    const onResetImage = () => {
      setAttributes({
        isLink: false,
        linkTarget: "_self",
        rel: "",
        sizeSlug: void 0
      });
      setFeaturedImage(0);
    };
    (0, import_element98.useEffect)(() => {
      if (mediaUrl && temporaryURL) {
        setTemporaryURL();
      }
    }, [mediaUrl, temporaryURL]);
    const { createErrorNotice } = (0, import_data106.useDispatch)(import_notices16.store);
    const onUploadError = (message) => {
      createErrorNotice(message, { type: "snackbar" });
      setTemporaryURL();
    };
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const controls = blockEditingMode === "default" && /* @__PURE__ */ (0, import_jsx_runtime370.jsxs)(import_jsx_runtime370.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(import_block_editor194.InspectorControls, { group: "color", children: /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
        overlay_controls_default,
        {
          attributes: attributes2,
          setAttributes,
          clientId
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(import_block_editor194.InspectorControls, { group: "dimensions", children: /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
        dimension_controls_default,
        {
          clientId,
          attributes: attributes2,
          setAttributes,
          media
        }
      ) }),
      (featuredImage || isDescendentOfQueryLoop || !postId) && /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(import_block_editor194.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime370.jsxs)(
        import_components112.__experimentalToolsPanel,
        {
          label: (0, import_i18n172.__)("Settings"),
          resetAll: () => {
            setAttributes({
              isLink: false,
              linkTarget: "_self",
              rel: "",
              sizeSlug: DEFAULT_MEDIA_SIZE_SLUG5
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
              import_components112.__experimentalToolsPanelItem,
              {
                label: postType?.labels.singular_name ? (0, import_i18n172.sprintf)(
                  // translators: %s: Name of the post type e.g: "post".
                  (0, import_i18n172.__)("Link to %s"),
                  postType.labels.singular_name
                ) : (0, import_i18n172.__)("Link to post"),
                isShownByDefault: true,
                hasValue: () => !!isLink,
                onDeselect: () => setAttributes({
                  isLink: false
                }),
                children: /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
                  import_components112.ToggleControl,
                  {
                    label: postType?.labels.singular_name ? (0, import_i18n172.sprintf)(
                      // translators: %s: Name of the post type e.g: "post".
                      (0, import_i18n172.__)("Link to %s"),
                      postType.labels.singular_name
                    ) : (0, import_i18n172.__)("Link to post"),
                    onChange: () => setAttributes({ isLink: !isLink }),
                    checked: isLink
                  }
                )
              }
            ),
            isLink && /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
              import_components112.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n172.__)("Open in new tab"),
                isShownByDefault: true,
                hasValue: () => "_self" !== linkTarget,
                onDeselect: () => setAttributes({
                  linkTarget: "_self"
                }),
                children: /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
                  import_components112.ToggleControl,
                  {
                    label: (0, import_i18n172.__)("Open in new tab"),
                    onChange: (value) => setAttributes({
                      linkTarget: value ? "_blank" : "_self"
                    }),
                    checked: linkTarget === "_blank"
                  }
                )
              }
            ),
            isLink && /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
              import_components112.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n172.__)("Link relation"),
                isShownByDefault: true,
                hasValue: () => !!rel,
                onDeselect: () => setAttributes({
                  rel: ""
                }),
                children: /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
                  import_components112.TextControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n172.__)("Link relation"),
                    help: (0, import_element98.createInterpolateElement)(
                      (0, import_i18n172.__)(
                        "The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."
                      ),
                      {
                        a: /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(import_components112.ExternalLink, { href: "https://developer.mozilla.org/docs/Web/HTML/Attributes/rel" })
                      }
                    ),
                    value: rel,
                    onChange: (newRel) => setAttributes({ rel: newRel })
                  }
                )
              }
            ),
            !!media && /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
              FeaturedImageResolutionTool,
              {
                image: media,
                value: sizeSlug,
                onChange: (nextSizeSlug) => setAttributes({ sizeSlug: nextSizeSlug })
              }
            )
          ]
        }
      ) })
    ] });
    let image;
    if (!featuredImage && (isDescendentOfQueryLoop || !postId)) {
      return /* @__PURE__ */ (0, import_jsx_runtime370.jsxs)(import_jsx_runtime370.Fragment, { children: [
        controls,
        /* @__PURE__ */ (0, import_jsx_runtime370.jsxs)("div", { ...blockProps, children: [
          !!isLink ? /* @__PURE__ */ (0, import_jsx_runtime370.jsx)("a", { href: postPermalink, target: linkTarget, children: placeholder2() }) : placeholder2(),
          /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
            overlay_default,
            {
              attributes: attributes2,
              setAttributes,
              clientId
            }
          )
        ] })
      ] });
    }
    const label = (0, import_i18n172.__)("Add a featured image");
    const imageStyles = {
      ...borderProps.style,
      ...shadowProps.style,
      height: aspectRatio ? "100%" : height,
      width: !!aspectRatio && "100%",
      objectFit: !!(height || aspectRatio) && scale
    };
    if (!featuredImage && !temporaryURL) {
      image = /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
        import_block_editor194.MediaPlaceholder,
        {
          onSelect: onSelectImage,
          accept: "image/*",
          allowedTypes: ALLOWED_MEDIA_TYPES8,
          onError: onUploadError,
          placeholder: placeholder2,
          mediaLibraryButton: ({ open }) => {
            return /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
              import_components112.Button,
              {
                __next40pxDefaultSize: true,
                icon: upload_default,
                variant: "primary",
                label,
                showTooltip: true,
                tooltipPosition: "top center",
                onClick: () => {
                  open();
                }
              }
            );
          }
        }
      );
    } else {
      image = !media && !temporaryURL ? placeholder2() : /* @__PURE__ */ (0, import_jsx_runtime370.jsxs)(import_jsx_runtime370.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
          "img",
          {
            className: borderProps.className,
            src: temporaryURL || mediaUrl,
            alt: media && media?.alt_text ? (0, import_i18n172.sprintf)(
              // translators: %s: The image's alt text.
              (0, import_i18n172.__)("Featured image: %s"),
              media.alt_text
            ) : (0, import_i18n172.__)("Featured image"),
            style: imageStyles
          }
        ),
        temporaryURL && /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(import_components112.Spinner, {})
      ] });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime370.jsxs)(import_jsx_runtime370.Fragment, { children: [
      !temporaryURL && controls,
      !!media && !isDescendentOfQueryLoop && /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(import_block_editor194.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
        import_block_editor194.MediaReplaceFlow,
        {
          mediaId: featuredImage,
          mediaURL: mediaUrl,
          allowedTypes: ALLOWED_MEDIA_TYPES8,
          accept: "image/*",
          onSelect: onSelectImage,
          onError: onUploadError,
          onReset: onResetImage
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime370.jsxs)("figure", { ...blockProps, children: [
        !!isLink ? /* @__PURE__ */ (0, import_jsx_runtime370.jsx)("a", { href: postPermalink, target: linkTarget, children: image }) : image,
        /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
          overlay_default,
          {
            attributes: attributes2,
            setAttributes,
            clientId
          }
        )
      ] })
    ] });
  }

  // packages/block-library/build-module/post-featured-image/index.mjs
  var { name: name76 } = block_default75;
  var settings75 = {
    icon: post_featured_image_default,
    edit: PostFeaturedImageEdit
  };
  var init75 = () => initBlock({ name: name76, metadata: block_default75, settings: settings75 });

  // packages/block-library/build-module/post-navigation-link/index.mjs
  var post_navigation_link_exports = {};
  __export(post_navigation_link_exports, {
    init: () => init76,
    metadata: () => block_default76,
    name: () => name77,
    settings: () => settings76
  });
  var import_i18n175 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/post-navigation-link/block.json
  var block_default76 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-navigation-link",
    title: "Post Navigation Link",
    category: "theme",
    description: "Displays the next or previous post link that is adjacent to the current post.",
    textdomain: "default",
    attributes: {
      textAlign: {
        type: "string"
      },
      type: {
        type: "string",
        default: "next"
      },
      label: {
        type: "string",
        role: "content"
      },
      showTitle: {
        type: "boolean",
        default: false
      },
      linkLabel: {
        type: "boolean",
        default: false
      },
      arrow: {
        type: "string",
        default: "none"
      },
      taxonomy: {
        type: "string",
        default: ""
      }
    },
    usesContext: ["postType"],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      color: {
        link: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalWritingMode: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    style: "wp-block-post-navigation-link"
  };

  // packages/block-library/build-module/post-navigation-link/edit.mjs
  var import_components113 = __toESM(require_components(), 1);
  var import_block_editor195 = __toESM(require_block_editor(), 1);
  var import_i18n173 = __toESM(require_i18n(), 1);
  var import_data107 = __toESM(require_data(), 1);
  var import_core_data62 = __toESM(require_core_data(), 1);
  var import_jsx_runtime371 = __toESM(require_jsx_runtime(), 1);
  function PostNavigationLinkEdit({
    context: { postType },
    attributes: {
      type,
      label,
      showTitle,
      textAlign,
      linkLabel,
      arrow,
      taxonomy
    },
    setAttributes
  }) {
    const blockEditingMode = (0, import_block_editor195.useBlockEditingMode)();
    const showControls = blockEditingMode === "default";
    const isNext = type === "next";
    let placeholder2 = isNext ? (0, import_i18n173.__)("Next") : (0, import_i18n173.__)("Previous");
    const arrowMap5 = {
      none: "",
      arrow: isNext ? "\u2192" : "\u2190",
      chevron: isNext ? "\xBB" : "\xAB"
    };
    const displayArrow = arrowMap5[arrow];
    if (showTitle) {
      placeholder2 = isNext ? (
        /* translators: Label before for next and previous post. There is a space after the colon. */
        (0, import_i18n173.__)("Next: ")
      ) : (
        /* translators: Label before for next and previous post. There is a space after the colon. */
        (0, import_i18n173.__)("Previous: ")
      );
    }
    const ariaLabel = isNext ? (0, import_i18n173.__)("Next post") : (0, import_i18n173.__)("Previous post");
    const blockProps = (0, import_block_editor195.useBlockProps)({
      className: clsx_default({
        [`has-text-align-${textAlign}`]: textAlign
      })
    });
    const taxonomies = (0, import_data107.useSelect)(
      (select9) => {
        const { getTaxonomies } = select9(import_core_data62.store);
        const filteredTaxonomies = getTaxonomies({
          type: postType,
          per_page: -1
        });
        return filteredTaxonomies;
      },
      [postType]
    );
    const getTaxonomyOptions = () => {
      const selectOption = {
        label: (0, import_i18n173.__)("Unfiltered"),
        value: ""
      };
      const taxonomyOptions = (taxonomies ?? []).filter(({ visibility }) => !!visibility?.publicly_queryable).map((item) => {
        return {
          value: item.slug,
          label: item.name
        };
      });
      return [selectOption, ...taxonomyOptions];
    };
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime371.jsxs)(import_jsx_runtime371.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(import_block_editor195.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime371.jsxs)(
        import_components113.__experimentalToolsPanel,
        {
          label: (0, import_i18n173.__)("Settings"),
          resetAll: () => {
            setAttributes({
              showTitle: false,
              linkLabel: false,
              arrow: "none"
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
              import_components113.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n173.__)("Display the title as a link"),
                isShownByDefault: true,
                hasValue: () => showTitle,
                onDeselect: () => setAttributes({ showTitle: false }),
                children: /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
                  import_components113.ToggleControl,
                  {
                    label: (0, import_i18n173.__)("Display the title as a link"),
                    help: (0, import_i18n173.__)(
                      "If you have entered a custom label, it will be prepended before the title."
                    ),
                    checked: !!showTitle,
                    onChange: () => setAttributes({
                      showTitle: !showTitle
                    })
                  }
                )
              }
            ),
            showTitle && /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
              import_components113.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n173.__)(
                  "Include the label as part of the link"
                ),
                isShownByDefault: true,
                hasValue: () => !!linkLabel,
                onDeselect: () => setAttributes({ linkLabel: false }),
                children: /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
                  import_components113.ToggleControl,
                  {
                    label: (0, import_i18n173.__)(
                      "Include the label as part of the link"
                    ),
                    checked: !!linkLabel,
                    onChange: () => setAttributes({
                      linkLabel: !linkLabel
                    })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
              import_components113.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n173.__)("Arrow"),
                isShownByDefault: true,
                hasValue: () => arrow !== "none",
                onDeselect: () => setAttributes({ arrow: "none" }),
                children: /* @__PURE__ */ (0, import_jsx_runtime371.jsxs)(
                  import_components113.__experimentalToggleGroupControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n173.__)("Arrow"),
                    value: arrow,
                    onChange: (value) => {
                      setAttributes({ arrow: value });
                    },
                    help: (0, import_i18n173.__)(
                      "A decorative arrow for the next and previous link."
                    ),
                    isBlock: true,
                    children: [
                      /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
                        import_components113.__experimentalToggleGroupControlOption,
                        {
                          value: "none",
                          label: (0, import_i18n173._x)(
                            "None",
                            "Arrow option for Next/Previous link"
                          )
                        }
                      ),
                      /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
                        import_components113.__experimentalToggleGroupControlOption,
                        {
                          value: "arrow",
                          label: (0, import_i18n173._x)(
                            "Arrow",
                            "Arrow option for Next/Previous link"
                          )
                        }
                      ),
                      /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
                        import_components113.__experimentalToggleGroupControlOption,
                        {
                          value: "chevron",
                          label: (0, import_i18n173._x)(
                            "Chevron",
                            "Arrow option for Next/Previous link"
                          )
                        }
                      )
                    ]
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(import_block_editor195.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
        import_components113.SelectControl,
        {
          __next40pxDefaultSize: true,
          label: (0, import_i18n173.__)("Filter by taxonomy"),
          value: taxonomy,
          options: getTaxonomyOptions(),
          onChange: (value) => setAttributes({
            taxonomy: value
          }),
          help: (0, import_i18n173.__)(
            "Only link to posts that have the same taxonomy terms as the current post. For example the same tags or categories."
          )
        }
      ) }),
      showControls && /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(import_block_editor195.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
        import_block_editor195.AlignmentToolbar,
        {
          value: textAlign,
          onChange: (nextAlign) => {
            setAttributes({ textAlign: nextAlign });
          }
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime371.jsxs)("div", { ...blockProps, children: [
        !isNext && displayArrow && /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
          "span",
          {
            className: `wp-block-post-navigation-link__arrow-previous is-arrow-${arrow}`,
            children: displayArrow
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
          import_block_editor195.RichText,
          {
            tagName: "a",
            identifier: "label",
            "aria-label": ariaLabel,
            placeholder: placeholder2,
            value: label,
            withoutInteractiveFormatting: true,
            onChange: (newLabel) => setAttributes({ label: newLabel })
          }
        ),
        showTitle && /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
          "a",
          {
            href: "#post-navigation-pseudo-link",
            onClick: (event) => event.preventDefault(),
            children: (0, import_i18n173.__)("An example title")
          }
        ),
        isNext && displayArrow && /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
          "span",
          {
            className: `wp-block-post-navigation-link__arrow-next is-arrow-${arrow}`,
            "aria-hidden": true,
            children: displayArrow
          }
        )
      ] })
    ] });
  }

  // packages/block-library/build-module/post-navigation-link/variations.mjs
  var import_i18n174 = __toESM(require_i18n(), 1);
  var variations11 = [
    {
      name: "post-previous",
      title: (0, import_i18n174.__)("Previous Post"),
      description: (0, import_i18n174.__)(
        "Displays the post link that precedes the current post."
      ),
      icon: previous_default,
      attributes: { type: "previous" },
      scope: ["inserter", "transform"],
      example: {
        attributes: {
          label: (0, import_i18n174.__)("Previous post"),
          arrow: "arrow"
        }
      }
    },
    {
      isDefault: true,
      name: "post-next",
      title: (0, import_i18n174.__)("Next Post"),
      description: (0, import_i18n174.__)(
        "Displays the post link that follows the current post."
      ),
      icon: next_default,
      attributes: { type: "next" },
      scope: ["inserter", "transform"],
      example: {
        attributes: {
          label: (0, import_i18n174.__)("Next post"),
          arrow: "arrow"
        }
      }
    }
  ];
  variations11.forEach((variation) => {
    if (variation.isActive) {
      return;
    }
    variation.isActive = (blockAttributes8, variationAttributes) => blockAttributes8.type === variationAttributes.type;
  });
  var variations_default11 = variations11;

  // packages/block-library/build-module/post-navigation-link/index.mjs
  var { name: name77 } = block_default76;
  var settings76 = {
    edit: PostNavigationLinkEdit,
    variations: variations_default11,
    example: {
      attributes: {
        label: (0, import_i18n175.__)("Next post"),
        arrow: "arrow"
      }
    }
  };
  var init76 = () => initBlock({ name: name77, metadata: block_default76, settings: settings76 });

  // packages/block-library/build-module/post-template/index.mjs
  var post_template_exports = {};
  __export(post_template_exports, {
    init: () => init77,
    metadata: () => block_default77,
    name: () => name78,
    settings: () => settings77
  });

  // packages/block-library/build-module/post-template/block.json
  var block_default77 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-template",
    title: "Post Template",
    category: "theme",
    ancestor: ["core/query"],
    description: "Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.",
    textdomain: "default",
    usesContext: [
      "queryId",
      "query",
      "displayLayout",
      "templateSlug",
      "previewPostType",
      "enhancedPagination",
      "postType"
    ],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      align: ["wide", "full"],
      layout: true,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        blockGap: {
          __experimentalDefault: "1.25em"
        },
        __experimentalDefaultControls: {
          blockGap: true,
          padding: false,
          margin: false
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      }
    },
    style: "wp-block-post-template",
    editorStyle: "wp-block-post-template-editor"
  };

  // packages/block-library/build-module/post-template/edit.mjs
  var import_element99 = __toESM(require_element(), 1);
  var import_data108 = __toESM(require_data(), 1);
  var import_i18n176 = __toESM(require_i18n(), 1);
  var import_block_editor196 = __toESM(require_block_editor(), 1);
  var import_components114 = __toESM(require_components(), 1);
  var import_core_data63 = __toESM(require_core_data(), 1);
  var import_jsx_runtime372 = __toESM(require_jsx_runtime(), 1);
  var TEMPLATE12 = [
    ["core/post-title"],
    [
      "core/post-date",
      {
        metadata: {
          bindings: {
            datetime: {
              source: "core/post-data",
              args: { field: "date" }
            }
          }
        }
      }
    ],
    ["core/post-excerpt"]
  ];
  function PostTemplateInnerBlocks({ classList }) {
    const innerBlocksProps = (0, import_block_editor196.useInnerBlocksProps)(
      { className: clsx_default("wp-block-post", classList) },
      { template: TEMPLATE12, __unstableDisableLayoutClassNames: true }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime372.jsx)("li", { ...innerBlocksProps });
  }
  function PostTemplateBlockPreview({
    blocks,
    blockContextId,
    classList,
    isHidden,
    setActiveBlockContextId
  }) {
    const blockPreviewProps = (0, import_block_editor196.__experimentalUseBlockPreview)({
      blocks,
      props: {
        className: clsx_default("wp-block-post", classList)
      }
    });
    const handleOnClick = () => {
      setActiveBlockContextId(blockContextId);
    };
    const style2 = {
      display: isHidden ? "none" : void 0
    };
    return /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(
      "li",
      {
        ...blockPreviewProps,
        tabIndex: 0,
        role: "button",
        onClick: handleOnClick,
        onKeyPress: handleOnClick,
        style: style2
      }
    );
  }
  var MemoizedPostTemplateBlockPreview = (0, import_element99.memo)(PostTemplateBlockPreview);
  function PostTemplateEdit({
    setAttributes,
    clientId,
    context: {
      query: {
        perPage,
        offset = 0,
        postType,
        order,
        orderBy,
        author,
        search,
        exclude,
        sticky,
        inherit,
        taxQuery,
        parents,
        pages,
        format: format3,
        // We gather extra query args to pass to the REST API call.
        // This way extenders of Query Loop can add their own query args,
        // and have accurate previews in the editor.
        // Noting though that these args should either be supported by the
        // REST API or be handled by custom REST filters like `rest_{$this->post_type}_query`.
        ...restQueryArgs
      } = {},
      templateSlug,
      previewPostType
    },
    attributes: { layout },
    __unstableLayoutClassNames
  }) {
    const { type: layoutType, columnCount = 3 } = layout || {};
    const [activeBlockContextId, setActiveBlockContextId] = (0, import_element99.useState)();
    const { posts, blocks } = (0, import_data108.useSelect)(
      (select9) => {
        const { getEntityRecords, getTaxonomies } = select9(import_core_data63.store);
        const { getBlocks } = select9(import_block_editor196.store);
        const templateCategory = inherit && templateSlug?.startsWith("category-") && getEntityRecords("taxonomy", "category", {
          context: "view",
          per_page: 1,
          _fields: ["id"],
          slug: templateSlug.replace("category-", "")
        });
        const templateTag = inherit && templateSlug?.startsWith("tag-") && getEntityRecords("taxonomy", "post_tag", {
          context: "view",
          per_page: 1,
          _fields: ["id"],
          slug: templateSlug.replace("tag-", "")
        });
        const query = {
          offset: offset || 0,
          order,
          orderby: orderBy
        };
        if (taxQuery && !inherit) {
          const taxonomies = getTaxonomies({
            type: postType,
            per_page: -1,
            context: "view"
          });
          const buildTaxQuery = (terms, suffix = "") => {
            return Object.entries(terms || {}).reduce(
              (accumulator, [taxonomySlug, termIds]) => {
                const taxonomy = taxonomies?.find(
                  ({ slug }) => slug === taxonomySlug
                );
                if (taxonomy?.rest_base && termIds?.length) {
                  accumulator[taxonomy.rest_base + suffix] = termIds;
                }
                return accumulator;
              },
              {}
            );
          };
          const builtTaxQuery = buildTaxQuery(taxQuery.include);
          if (taxQuery.exclude) {
            Object.assign(
              builtTaxQuery,
              buildTaxQuery(taxQuery.exclude, "_exclude")
            );
          }
          if (!!Object.keys(builtTaxQuery).length) {
            Object.assign(query, builtTaxQuery);
          }
        }
        if (perPage) {
          query.per_page = perPage;
        }
        if (author) {
          query.author = author;
        }
        if (search) {
          query.search = search;
        }
        if (exclude?.length) {
          query.exclude = exclude;
        }
        if (parents?.length) {
          query.parent = parents;
        }
        if (format3?.length) {
          query.format = format3;
        }
        if (["exclude", "only"].includes(sticky)) {
          query.sticky = sticky === "only";
        }
        if (["", "ignore"].includes(sticky)) {
          delete query.sticky;
          query.ignore_sticky = sticky === "ignore";
        }
        let currentPostType = postType;
        if (inherit) {
          if (templateSlug?.startsWith("archive-")) {
            query.postType = templateSlug.replace("archive-", "");
            currentPostType = query.postType;
          } else if (templateCategory) {
            query.categories = templateCategory[0]?.id;
          } else if (templateTag) {
            query.tags = templateTag[0]?.id;
          } else if (templateSlug?.startsWith("taxonomy-post_format")) {
            query.format = templateSlug.replace(
              "taxonomy-post_format-post-format-",
              ""
            );
          }
        }
        const usedPostType = previewPostType || currentPostType;
        return {
          posts: getEntityRecords("postType", usedPostType, {
            ...query,
            ...restQueryArgs
          }),
          blocks: getBlocks(clientId)
        };
      },
      [
        perPage,
        offset,
        order,
        orderBy,
        clientId,
        author,
        search,
        postType,
        exclude,
        sticky,
        inherit,
        templateSlug,
        taxQuery,
        parents,
        format3,
        restQueryArgs,
        previewPostType
      ]
    );
    const blockContexts = (0, import_element99.useMemo)(
      () => posts?.map((post) => ({
        postType: post.type,
        postId: post.id,
        classList: post.class_list ?? ""
      })),
      [posts]
    );
    const blockProps = (0, import_block_editor196.useBlockProps)({
      className: clsx_default(__unstableLayoutClassNames, {
        [`columns-${columnCount}`]: layoutType === "grid" && columnCount
        // Ensure column count is flagged via classname for backwards compatibility.
      })
    });
    if (!posts) {
      return /* @__PURE__ */ (0, import_jsx_runtime372.jsx)("p", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(import_components114.Spinner, {}) });
    }
    if (!posts.length) {
      return /* @__PURE__ */ (0, import_jsx_runtime372.jsxs)("p", { ...blockProps, children: [
        " ",
        (0, import_i18n176.__)("No results found.")
      ] });
    }
    const setDisplayLayout = (newDisplayLayout) => setAttributes({
      layout: { ...layout, ...newDisplayLayout }
    });
    const displayLayoutControls = [
      {
        icon: list_default,
        title: (0, import_i18n176._x)("List view", "Post template block display setting"),
        onClick: () => setDisplayLayout({ type: "default" }),
        isActive: layoutType === "default" || layoutType === "constrained"
      },
      {
        icon: grid_default,
        title: (0, import_i18n176._x)("Grid view", "Post template block display setting"),
        onClick: () => setDisplayLayout({
          type: "grid",
          columnCount
        }),
        isActive: layoutType === "grid"
      }
    ];
    return /* @__PURE__ */ (0, import_jsx_runtime372.jsxs)(import_jsx_runtime372.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(import_block_editor196.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(import_components114.ToolbarGroup, { controls: displayLayoutControls }) }),
      /* @__PURE__ */ (0, import_jsx_runtime372.jsx)("ul", { ...blockProps, children: blockContexts && blockContexts.map((blockContext) => /* @__PURE__ */ (0, import_jsx_runtime372.jsxs)(
        import_block_editor196.BlockContextProvider,
        {
          value: blockContext,
          children: [
            blockContext.postId === (activeBlockContextId || blockContexts[0]?.postId) ? /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(
              PostTemplateInnerBlocks,
              {
                classList: blockContext.classList
              }
            ) : null,
            /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(
              MemoizedPostTemplateBlockPreview,
              {
                blocks,
                blockContextId: blockContext.postId,
                classList: blockContext.classList,
                setActiveBlockContextId,
                isHidden: blockContext.postId === (activeBlockContextId || blockContexts[0]?.postId)
              }
            )
          ]
        },
        blockContext.postId
      )) })
    ] });
  }

  // packages/block-library/build-module/post-template/save.mjs
  var import_block_editor197 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime373 = __toESM(require_jsx_runtime(), 1);
  function PostTemplateSave() {
    return /* @__PURE__ */ (0, import_jsx_runtime373.jsx)(import_block_editor197.InnerBlocks.Content, {});
  }

  // packages/block-library/build-module/post-template/index.mjs
  var { name: name78 } = block_default77;
  var settings77 = {
    icon: layout_default,
    edit: PostTemplateEdit,
    save: PostTemplateSave
  };
  var init77 = () => initBlock({ name: name78, metadata: block_default77, settings: settings77 });

  // packages/block-library/build-module/post-terms/index.mjs
  var post_terms_exports = {};
  __export(post_terms_exports, {
    init: () => init78,
    metadata: () => block_default78,
    name: () => name79,
    settings: () => settings78
  });
  var import_hooks57 = __toESM(require_hooks(), 1);

  // packages/block-library/build-module/post-terms/block.json
  var block_default78 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-terms",
    title: "Post Terms",
    category: "theme",
    description: "Post terms.",
    textdomain: "default",
    attributes: {
      term: {
        type: "string"
      },
      separator: {
        type: "string",
        default: ", "
      },
      prefix: {
        type: "string",
        default: "",
        role: "content"
      },
      suffix: {
        type: "string",
        default: "",
        role: "content"
      }
    },
    usesContext: ["postId", "postType"],
    example: {
      viewportWidth: 350
    },
    supports: {
      anchor: true,
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-post-terms"
  };

  // packages/block-library/build-module/post-terms/edit.mjs
  var import_block_editor198 = __toESM(require_block_editor(), 1);
  var import_blocks86 = __toESM(require_blocks(), 1);
  var import_components115 = __toESM(require_components(), 1);
  var import_data110 = __toESM(require_data(), 1);
  var import_html_entities9 = __toESM(require_html_entities(), 1);
  var import_i18n177 = __toESM(require_i18n(), 1);
  var import_core_data65 = __toESM(require_core_data(), 1);

  // packages/block-library/build-module/post-terms/use-post-terms.mjs
  var import_core_data64 = __toESM(require_core_data(), 1);
  var import_data109 = __toESM(require_data(), 1);
  var EMPTY_ARRAY3 = [];
  function usePostTerms({ postId, term }) {
    const { slug } = term;
    return (0, import_data109.useSelect)(
      (select9) => {
        const visible = term?.visibility?.publicly_queryable;
        if (!visible || !postId) {
          return {
            postTerms: EMPTY_ARRAY3,
            isLoading: false,
            hasPostTerms: false
          };
        }
        const { getEntityRecords, isResolving } = select9(import_core_data64.store);
        const taxonomyArgs = [
          "taxonomy",
          slug,
          {
            post: postId,
            per_page: -1,
            context: "view"
          }
        ];
        const terms = getEntityRecords(...taxonomyArgs);
        return {
          postTerms: terms,
          isLoading: isResolving("getEntityRecords", taxonomyArgs),
          hasPostTerms: !!terms?.length
        };
      },
      [postId, term?.visibility?.publicly_queryable, slug]
    );
  }

  // packages/block-library/build-module/post-terms/edit.mjs
  var import_jsx_runtime374 = __toESM(require_jsx_runtime(), 1);
  var ALLOWED_FORMATS = [
    "core/bold",
    "core/image",
    "core/italic",
    "core/link",
    "core/strikethrough",
    "core/text-color"
  ];
  function PostTermsEdit({
    attributes: attributes2,
    clientId,
    context,
    isSelected,
    setAttributes,
    insertBlocksAfter
  }) {
    const { term, separator, prefix, suffix } = attributes2;
    const { postId, postType } = context;
    const selectedTerm = (0, import_data110.useSelect)(
      (select9) => {
        if (!term) {
          return {};
        }
        const { getTaxonomy } = select9(import_core_data65.store);
        const taxonomy = getTaxonomy(term);
        return taxonomy?.visibility?.publicly_queryable ? taxonomy : {};
      },
      [term]
    );
    const { postTerms, hasPostTerms, isLoading } = usePostTerms({
      postId,
      term: selectedTerm
    });
    const hasPost = postId && postType;
    const blockInformation = (0, import_block_editor198.useBlockDisplayInformation)(clientId);
    const blockProps = (0, import_block_editor198.useBlockProps)({
      className: term && `taxonomy-${term}`
    });
    return /* @__PURE__ */ (0, import_jsx_runtime374.jsxs)(import_jsx_runtime374.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime374.jsx)(import_block_editor198.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime374.jsx)(
        import_components115.TextControl,
        {
          __next40pxDefaultSize: true,
          autoComplete: "off",
          label: (0, import_i18n177.__)("Separator"),
          value: separator || "",
          onChange: (nextValue) => {
            setAttributes({ separator: nextValue });
          },
          help: (0, import_i18n177.__)("Enter character(s) used to separate terms.")
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime374.jsxs)("div", { ...blockProps, children: [
        isLoading && hasPost && /* @__PURE__ */ (0, import_jsx_runtime374.jsx)(import_components115.Spinner, {}),
        !isLoading && (isSelected || prefix) && /* @__PURE__ */ (0, import_jsx_runtime374.jsx)(
          import_block_editor198.RichText,
          {
            identifier: "prefix",
            allowedFormats: ALLOWED_FORMATS,
            className: "wp-block-post-terms__prefix",
            "aria-label": (0, import_i18n177.__)("Prefix"),
            placeholder: (0, import_i18n177.__)("Prefix") + " ",
            value: prefix,
            onChange: (value) => setAttributes({ prefix: value }),
            tagName: "span"
          }
        ),
        (!hasPost || !term) && /* @__PURE__ */ (0, import_jsx_runtime374.jsx)("span", { children: blockInformation.title }),
        hasPost && !isLoading && hasPostTerms && postTerms.map((postTerm) => /* @__PURE__ */ (0, import_jsx_runtime374.jsx)(
          "a",
          {
            href: postTerm.link,
            onClick: (event) => event.preventDefault(),
            rel: "tag",
            children: (0, import_html_entities9.decodeEntities)(postTerm.name)
          },
          postTerm.id
        )).reduce((prev, curr) => /* @__PURE__ */ (0, import_jsx_runtime374.jsxs)(import_jsx_runtime374.Fragment, { children: [
          prev,
          /* @__PURE__ */ (0, import_jsx_runtime374.jsx)("span", { className: "wp-block-post-terms__separator", children: separator || " " }),
          curr
        ] })),
        hasPost && !isLoading && !hasPostTerms && (selectedTerm?.labels?.no_terms || (0, import_i18n177.__)("Term items not found.")),
        !isLoading && (isSelected || suffix) && /* @__PURE__ */ (0, import_jsx_runtime374.jsx)(
          import_block_editor198.RichText,
          {
            identifier: "suffix",
            allowedFormats: ALLOWED_FORMATS,
            className: "wp-block-post-terms__suffix",
            "aria-label": (0, import_i18n177.__)("Suffix"),
            placeholder: " " + (0, import_i18n177.__)("Suffix"),
            value: suffix,
            onChange: (value) => setAttributes({ suffix: value }),
            tagName: "span",
            __unstableOnSplitAtEnd: () => insertBlocksAfter(
              (0, import_blocks86.createBlock)((0, import_blocks86.getDefaultBlockName)())
            )
          }
        )
      ] })
    ] });
  }

  // packages/block-library/build-module/post-terms/hooks.mjs
  var variationIconMap = {
    category: post_categories_default,
    post_tag: post_terms_default
  };
  function enhanceVariations(settings122, name123) {
    if (name123 !== "core/post-terms") {
      return settings122;
    }
    const variations18 = settings122.variations.map((variation) => ({
      ...variation,
      ...{
        icon: variationIconMap[variation.name] ?? post_categories_default
      }
    }));
    return {
      ...settings122,
      variations: variations18
    };
  }

  // packages/block-library/build-module/post-terms/deprecated.mjs
  var v131 = {
    attributes: {
      textAlign: {
        type: "string"
      },
      term: {
        type: "string"
      },
      separator: {
        type: "string",
        default: ", "
      },
      prefix: {
        type: "string",
        default: "",
        role: "content"
      },
      suffix: {
        type: "string",
        default: "",
        role: "content"
      }
    },
    supports: {
      anchor: true,
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    },
    save: () => null
  };
  var deprecated_default36 = [v131];

  // packages/block-library/build-module/post-terms/index.mjs
  var { name: name79 } = block_default78;
  var settings78 = {
    icon: post_categories_default,
    edit: PostTermsEdit,
    deprecated: deprecated_default36
  };
  var init78 = () => {
    (0, import_hooks57.addFilter)(
      "blocks.registerBlockType",
      "core/template-part",
      enhanceVariations
    );
    return initBlock({ name: name79, metadata: block_default78, settings: settings78 });
  };

  // packages/block-library/build-module/post-time-to-read/index.mjs
  var post_time_to_read_exports = {};
  __export(post_time_to_read_exports, {
    init: () => init79,
    metadata: () => block_default79,
    name: () => name80,
    settings: () => settings79
  });

  // packages/block-library/build-module/post-time-to-read/block.json
  var block_default79 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-time-to-read",
    title: "Time to Read",
    category: "theme",
    description: "Show minutes required to finish reading the post. Can also show a word count.",
    textdomain: "default",
    usesContext: ["postId", "postType"],
    attributes: {
      displayAsRange: {
        type: "boolean",
        default: true
      },
      displayMode: {
        type: "string",
        default: "time"
      },
      averageReadingSpeed: {
        type: "number",
        default: 189
      }
    },
    supports: {
      anchor: true,
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      html: false,
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      }
    }
  };

  // packages/block-library/build-module/post-time-to-read/edit.mjs
  var import_i18n178 = __toESM(require_i18n(), 1);
  var import_element100 = __toESM(require_element(), 1);
  var import_block_editor199 = __toESM(require_block_editor(), 1);
  var import_components116 = __toESM(require_components(), 1);
  var import_blocks87 = __toESM(require_blocks(), 1);
  var import_core_data66 = __toESM(require_core_data(), 1);
  var import_wordcount = __toESM(require_wordcount(), 1);
  var import_jsx_runtime375 = __toESM(require_jsx_runtime(), 1);
  function PostTimeToReadEdit({ attributes: attributes2, setAttributes, context }) {
    const { displayAsRange, displayMode, averageReadingSpeed } = attributes2;
    const { postId, postType } = context;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const [contentStructure] = (0, import_core_data66.useEntityProp)(
      "postType",
      postType,
      "content",
      postId
    );
    const [blocks] = (0, import_core_data66.useEntityBlockEditor)("postType", postType, {
      id: postId
    });
    const displayString = (0, import_element100.useMemo)(() => {
      let content;
      if (contentStructure instanceof Function) {
        content = contentStructure({ blocks });
      } else if (blocks) {
        content = (0, import_blocks87.__unstableSerializeAndClean)(blocks);
      } else {
        content = contentStructure;
      }
      const wordCountType = (0, import_i18n178._x)(
        "words",
        "Word count type. Do not translate!"
      );
      const totalWords = (0, import_wordcount.count)(content || "", wordCountType);
      if (displayMode === "time") {
        if (displayAsRange) {
          let maxMinutes = Math.max(
            1,
            Math.round(totalWords / averageReadingSpeed * 1.2)
          );
          const minMinutes = Math.max(
            1,
            Math.round(totalWords / averageReadingSpeed * 0.8)
          );
          if (minMinutes === maxMinutes) {
            maxMinutes = maxMinutes + 1;
          }
          const rangeLabel = (0, import_i18n178._x)(
            "%1$s\u2013%2$s minutes",
            "Range of minutes to read"
          );
          return (0, import_i18n178.sprintf)(rangeLabel, minMinutes, maxMinutes);
        }
        const minutesToRead = Math.max(
          1,
          Math.round(totalWords / averageReadingSpeed)
        );
        return (0, import_i18n178.sprintf)(
          /* translators: %s: the number of minutes to read the post. */
          (0, import_i18n178._n)("%s minute", "%s minutes", minutesToRead),
          minutesToRead
        );
      }
      if (displayMode === "words") {
        return wordCountType === "words" ? (0, import_i18n178.sprintf)(
          /* translators: %s: the number of words in the post. */
          (0, import_i18n178._n)("%s word", "%s words", totalWords),
          totalWords.toLocaleString()
        ) : (0, import_i18n178.sprintf)(
          /* translators: %s: the number of characters in the post. */
          (0, import_i18n178._n)("%s character", "%s characters", totalWords),
          totalWords.toLocaleString()
        );
      }
    }, [
      contentStructure,
      blocks,
      displayAsRange,
      displayMode,
      averageReadingSpeed
    ]);
    const blockProps = (0, import_block_editor199.useBlockProps)();
    return /* @__PURE__ */ (0, import_jsx_runtime375.jsxs)(import_jsx_runtime375.Fragment, { children: [
      displayMode === "time" && /* @__PURE__ */ (0, import_jsx_runtime375.jsx)(import_block_editor199.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime375.jsx)(
        import_components116.__experimentalToolsPanel,
        {
          label: (0, import_i18n178.__)("Settings"),
          resetAll: () => {
            setAttributes({
              displayAsRange: true
            });
          },
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime375.jsx)(
            import_components116.__experimentalToolsPanelItem,
            {
              isShownByDefault: true,
              label: (0, import_i18n178._x)(
                "Display as range",
                "Turns reading time range display on or off"
              ),
              hasValue: () => !displayAsRange,
              onDeselect: () => {
                setAttributes({
                  displayAsRange: true
                });
              },
              children: /* @__PURE__ */ (0, import_jsx_runtime375.jsx)(
                import_components116.ToggleControl,
                {
                  label: (0, import_i18n178.__)("Display as range"),
                  checked: !!displayAsRange,
                  onChange: () => setAttributes({
                    displayAsRange: !displayAsRange
                  })
                }
              )
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime375.jsx)("div", { ...blockProps, children: displayString })
    ] });
  }
  var edit_default29 = PostTimeToReadEdit;

  // packages/block-library/build-module/post-time-to-read/variations.mjs
  var import_i18n179 = __toESM(require_i18n(), 1);
  var variations12 = [
    {
      name: "time-to-read",
      title: (0, import_i18n179.__)("Time to Read"),
      description: (0, import_i18n179.__)("Show minutes required to finish reading the post."),
      attributes: {
        displayMode: "time"
      },
      scope: ["inserter", "transform"],
      isActive: (blockAttributes8) => blockAttributes8?.displayMode === "time",
      icon: time_to_read_default,
      isDefault: true
    },
    {
      name: "word-count",
      title: (0, import_i18n179.__)("Word Count"),
      description: (0, import_i18n179.__)("Show the number of words in the post."),
      attributes: {
        displayMode: "words"
      },
      scope: ["inserter", "transform"],
      isActive: (blockAttributes8) => blockAttributes8?.displayMode === "words",
      icon: word_count_default
    }
  ];
  var variations_default12 = variations12;

  // packages/block-library/build-module/post-time-to-read/deprecated.mjs
  var v133 = {
    attributes: {
      textAlign: {
        type: "string"
      },
      displayAsRange: {
        type: "boolean",
        default: true
      },
      displayMode: {
        type: "string",
        default: "time"
      },
      averageReadingSpeed: {
        type: "number",
        default: 189
      }
    },
    supports: {
      anchor: true,
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      html: false,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      }
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    },
    save: () => null
  };
  var deprecated_default37 = [v133];

  // packages/block-library/build-module/post-time-to-read/index.mjs
  var { name: name80 } = block_default79;
  var settings79 = {
    icon: time_to_read_default,
    edit: edit_default29,
    variations: variations_default12,
    example: {},
    deprecated: deprecated_default37
  };
  var init79 = () => initBlock({ name: name80, metadata: block_default79, settings: settings79 });

  // packages/block-library/build-module/post-title/index.mjs
  var post_title_exports = {};
  __export(post_title_exports, {
    init: () => init80,
    metadata: () => block_default80,
    name: () => name81,
    settings: () => settings80
  });

  // packages/block-library/build-module/post-title/block.json
  var block_default80 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-title",
    title: "Title",
    category: "theme",
    description: "Displays the title of a post, page, or any other content-type.",
    textdomain: "default",
    usesContext: ["postId", "postType", "queryId"],
    attributes: {
      textAlign: {
        type: "string"
      },
      level: {
        type: "number",
        default: 2
      },
      levelOptions: {
        type: "array"
      },
      isLink: {
        type: "boolean",
        default: false,
        role: "content"
      },
      rel: {
        type: "string",
        attribute: "rel",
        default: "",
        role: "content"
      },
      linkTarget: {
        type: "string",
        default: "_self",
        role: "content"
      }
    },
    example: {
      viewportWidth: 350
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-post-title"
  };

  // packages/block-library/build-module/post-title/edit.mjs
  var import_block_editor200 = __toESM(require_block_editor(), 1);
  var import_components117 = __toESM(require_components(), 1);
  var import_i18n180 = __toESM(require_i18n(), 1);
  var import_blocks88 = __toESM(require_blocks(), 1);
  var import_core_data67 = __toESM(require_core_data(), 1);
  var import_data111 = __toESM(require_data(), 1);
  var import_element101 = __toESM(require_element(), 1);
  var import_jsx_runtime376 = __toESM(require_jsx_runtime(), 1);
  function PostTitleEdit({
    attributes: { level, levelOptions, textAlign, isLink, rel, linkTarget },
    setAttributes,
    context: { postType, postId, queryId },
    insertBlocksAfter
  }) {
    const TagName2 = level === 0 ? "p" : `h${level}`;
    const isDescendentOfQueryLoop = Number.isFinite(queryId);
    const userCanEdit = (0, import_data111.useSelect)(
      (select9) => {
        if (isDescendentOfQueryLoop) {
          return false;
        }
        return select9(import_core_data67.store).canUser("update", {
          kind: "postType",
          name: postType,
          id: postId
        });
      },
      [isDescendentOfQueryLoop, postType, postId]
    );
    const [rawTitle = "", setTitle, fullTitle] = (0, import_core_data67.useEntityProp)(
      "postType",
      postType,
      "title",
      postId
    );
    const [link] = (0, import_core_data67.useEntityProp)("postType", postType, "link", postId);
    const onSplitAtEnd = () => {
      insertBlocksAfter((0, import_blocks88.createBlock)((0, import_blocks88.getDefaultBlockName)()));
    };
    const blockProps = (0, import_block_editor200.useBlockProps)({
      className: clsx_default({
        [`has-text-align-${textAlign}`]: textAlign
      })
    });
    const blockEditingMode = (0, import_block_editor200.useBlockEditingMode)();
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    let titleElement = /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(TagName2, { ...blockProps, children: (0, import_i18n180.__)("Title") });
    if (postType && postId) {
      titleElement = userCanEdit ? /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(
        import_block_editor200.PlainText,
        {
          tagName: TagName2,
          placeholder: (0, import_i18n180.__)("(no title)"),
          value: rawTitle,
          onChange: setTitle,
          __experimentalVersion: 2,
          __unstableOnSplitAtEnd: onSplitAtEnd,
          ...blockProps
        }
      ) : /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(
        TagName2,
        {
          ...blockProps,
          dangerouslySetInnerHTML: {
            __html: fullTitle?.rendered || (0, import_i18n180.__)("(no title)")
          }
        }
      );
    }
    if (isLink && postType && postId) {
      titleElement = userCanEdit ? /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(
        import_block_editor200.PlainText,
        {
          tagName: "a",
          href: link,
          target: linkTarget,
          rel,
          placeholder: !rawTitle.length ? (0, import_i18n180.__)("(no title)") : null,
          value: rawTitle,
          onChange: setTitle,
          __experimentalVersion: 2,
          __unstableOnSplitAtEnd: onSplitAtEnd
        }
      ) }) : /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(
        "a",
        {
          href: link,
          target: linkTarget,
          rel,
          onClick: (event) => event.preventDefault(),
          dangerouslySetInnerHTML: {
            __html: fullTitle?.rendered || (0, import_i18n180.__)("(no title)")
          }
        }
      ) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime376.jsxs)(import_jsx_runtime376.Fragment, { children: [
      blockEditingMode === "default" && /* @__PURE__ */ (0, import_jsx_runtime376.jsxs)(import_jsx_runtime376.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime376.jsxs)(import_block_editor200.BlockControls, { group: "block", children: [
          /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(
            import_block_editor200.HeadingLevelDropdown,
            {
              value: level,
              options: levelOptions,
              onChange: (newLevel) => setAttributes({ level: newLevel })
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(
            import_block_editor200.AlignmentControl,
            {
              value: textAlign,
              onChange: (nextAlign) => {
                setAttributes({ textAlign: nextAlign });
              }
            }
          )
        ] }),
        /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(import_block_editor200.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime376.jsxs)(
          import_components117.__experimentalToolsPanel,
          {
            label: (0, import_i18n180.__)("Settings"),
            resetAll: () => {
              setAttributes({
                rel: "",
                linkTarget: "_self",
                isLink: false
              });
            },
            dropdownMenuProps,
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(
                import_components117.__experimentalToolsPanelItem,
                {
                  label: (0, import_i18n180.__)("Make title a link"),
                  isShownByDefault: true,
                  hasValue: () => isLink,
                  onDeselect: () => setAttributes({ isLink: false }),
                  children: /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(
                    import_components117.ToggleControl,
                    {
                      label: (0, import_i18n180.__)("Make title a link"),
                      onChange: () => setAttributes({ isLink: !isLink }),
                      checked: isLink
                    }
                  )
                }
              ),
              isLink && /* @__PURE__ */ (0, import_jsx_runtime376.jsxs)(import_jsx_runtime376.Fragment, { children: [
                /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(
                  import_components117.__experimentalToolsPanelItem,
                  {
                    label: (0, import_i18n180.__)("Open in new tab"),
                    isShownByDefault: true,
                    hasValue: () => linkTarget === "_blank",
                    onDeselect: () => setAttributes({
                      linkTarget: "_self"
                    }),
                    children: /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(
                      import_components117.ToggleControl,
                      {
                        label: (0, import_i18n180.__)("Open in new tab"),
                        onChange: (value) => setAttributes({
                          linkTarget: value ? "_blank" : "_self"
                        }),
                        checked: linkTarget === "_blank"
                      }
                    )
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(
                  import_components117.__experimentalToolsPanelItem,
                  {
                    label: (0, import_i18n180.__)("Link relation"),
                    isShownByDefault: true,
                    hasValue: () => !!rel,
                    onDeselect: () => setAttributes({ rel: "" }),
                    children: /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(
                      import_components117.TextControl,
                      {
                        __next40pxDefaultSize: true,
                        label: (0, import_i18n180.__)("Link relation"),
                        help: (0, import_element101.createInterpolateElement)(
                          (0, import_i18n180.__)(
                            "The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."
                          ),
                          {
                            a: /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(import_components117.ExternalLink, { href: "https://developer.mozilla.org/docs/Web/HTML/Attributes/rel" })
                          }
                        ),
                        value: rel,
                        onChange: (newRel) => setAttributes({ rel: newRel })
                      }
                    )
                  }
                )
              ] })
            ]
          }
        ) })
      ] }),
      titleElement
    ] });
  }

  // packages/block-library/build-module/post-title/deprecated.mjs
  var v134 = {
    attributes: {
      textAlign: {
        type: "string"
      },
      level: {
        type: "number",
        default: 2
      },
      isLink: {
        type: "boolean",
        default: false
      },
      rel: {
        type: "string",
        attribute: "rel",
        default: ""
      },
      linkTarget: {
        type: "string",
        default: "_self"
      }
    },
    supports: {
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true,
        link: true
      },
      spacing: {
        margin: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true
      }
    },
    save() {
      return null;
    },
    migrate: migrate_font_family_default,
    isEligible({ style: style2 }) {
      return style2?.typography?.fontFamily;
    }
  };
  var deprecated_default38 = [v134];

  // packages/block-library/build-module/post-title/index.mjs
  var { name: name81 } = block_default80;
  var settings80 = {
    icon: title_default,
    edit: PostTitleEdit,
    deprecated: deprecated_default38
  };
  var init80 = () => initBlock({ name: name81, metadata: block_default80, settings: settings80 });

  // packages/block-library/build-module/preformatted/index.mjs
  var preformatted_exports = {};
  __export(preformatted_exports, {
    init: () => init81,
    metadata: () => block_default81,
    name: () => name82,
    settings: () => settings81
  });
  var import_i18n182 = __toESM(require_i18n(), 1);
  var import_blocks91 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/preformatted/edit.mjs
  var import_i18n181 = __toESM(require_i18n(), 1);
  var import_block_editor201 = __toESM(require_block_editor(), 1);
  var import_blocks89 = __toESM(require_blocks(), 1);
  var import_jsx_runtime377 = __toESM(require_jsx_runtime(), 1);
  function PreformattedEdit({
    attributes: attributes2,
    mergeBlocks,
    setAttributes,
    onRemove,
    insertBlocksAfter,
    style: style2
  }) {
    const { content } = attributes2;
    const blockProps = (0, import_block_editor201.useBlockProps)({ style: style2 });
    return /* @__PURE__ */ (0, import_jsx_runtime377.jsx)(
      import_block_editor201.RichText,
      {
        tagName: "pre",
        identifier: "content",
        preserveWhiteSpace: true,
        value: content,
        onChange: (nextContent) => {
          setAttributes({
            content: nextContent
          });
        },
        onRemove,
        "aria-label": (0, import_i18n181.__)("Preformatted text"),
        placeholder: (0, import_i18n181.__)("Write preformatted text\u2026"),
        onMerge: mergeBlocks,
        ...blockProps,
        __unstablePastePlainText: true,
        __unstableOnSplitAtDoubleLineEnd: () => insertBlocksAfter((0, import_blocks89.createBlock)((0, import_blocks89.getDefaultBlockName)()))
      }
    );
  }

  // packages/block-library/build-module/preformatted/block.json
  var block_default81 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/preformatted",
    title: "Preformatted",
    category: "text",
    description: "Add text that respects your spacing and tabs, and also allows styling.",
    textdomain: "default",
    attributes: {
      content: {
        type: "rich-text",
        source: "rich-text",
        selector: "pre",
        __unstablePreserveWhiteSpace: true,
        role: "content"
      }
    },
    supports: {
      anchor: true,
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        padding: true,
        margin: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-preformatted"
  };

  // packages/block-library/build-module/preformatted/save.mjs
  var import_block_editor202 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime378 = __toESM(require_jsx_runtime(), 1);
  function save39({ attributes: attributes2 }) {
    const { content } = attributes2;
    return /* @__PURE__ */ (0, import_jsx_runtime378.jsx)("pre", { ...import_block_editor202.useBlockProps.save(), children: /* @__PURE__ */ (0, import_jsx_runtime378.jsx)(import_block_editor202.RichText.Content, { value: content }) });
  }

  // packages/block-library/build-module/preformatted/transforms.mjs
  var import_blocks90 = __toESM(require_blocks(), 1);
  var transforms26 = {
    from: [
      {
        type: "block",
        blocks: ["core/code", "core/paragraph", "core/verse"],
        transform: ({ content, anchor }) => (0, import_blocks90.createBlock)("core/preformatted", {
          content,
          anchor
        })
      },
      {
        type: "raw",
        isMatch: (node) => node.nodeName === "PRE" && !(node.children.length === 1 && node.firstChild.nodeName === "CODE"),
        schema: ({ phrasingContentSchema }) => ({
          pre: {
            children: phrasingContentSchema
          }
        })
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/paragraph"],
        transform: (attributes2) => (0, import_blocks90.createBlock)("core/paragraph", attributes2)
      },
      {
        type: "block",
        blocks: ["core/code"],
        transform: (attributes2) => (0, import_blocks90.createBlock)("core/code", attributes2)
      },
      {
        type: "block",
        blocks: ["core/verse"],
        transform: (attributes2) => (0, import_blocks90.createBlock)("core/verse", attributes2)
      }
    ]
  };
  var transforms_default27 = transforms26;

  // packages/block-library/build-module/preformatted/index.mjs
  var { fieldsKey: fieldsKey15, formKey: formKey15 } = unlock(import_blocks91.privateApis);
  var { name: name82 } = block_default81;
  var settings81 = {
    icon: preformatted_default,
    example: {
      attributes: {
        /* eslint-disable @wordpress/i18n-no-collapsible-whitespace */
        // translators: Sample content for the Preformatted block. Can be replaced with a more locale-adequate work.
        content: (0, import_i18n182.__)(
          "EXT. XANADU - FAINT DAWN - 1940 (MINIATURE)\nWindow, very small in the distance, illuminated.\nAll around this is an almost totally black screen. Now, as the camera moves slowly towards the window which is almost a postage stamp in the frame, other forms appear;"
        )
        /* eslint-enable @wordpress/i18n-no-collapsible-whitespace */
      }
    },
    transforms: transforms_default27,
    edit: PreformattedEdit,
    save: save39,
    merge(attributes2, attributesToMerge) {
      return {
        content: attributes2.content + "\n\n" + attributesToMerge.content
      };
    }
  };
  if (window.__experimentalContentOnlyInspectorFields) {
    settings81[fieldsKey15] = [
      {
        id: "content",
        label: (0, import_i18n182.__)("Content"),
        type: "text",
        Edit: "rich-text"
        // TODO: replace with custom component
      }
    ];
    settings81[formKey15] = {
      fields: ["content"]
    };
  }
  var init81 = () => initBlock({ name: name82, metadata: block_default81, settings: settings81 });

  // packages/block-library/build-module/pullquote/index.mjs
  var pullquote_exports = {};
  __export(pullquote_exports, {
    init: () => init82,
    metadata: () => block_default82,
    name: () => name83,
    settings: () => settings82
  });
  var import_i18n184 = __toESM(require_i18n(), 1);
  var import_blocks94 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/pullquote/deprecated.mjs
  var import_block_editor203 = __toESM(require_block_editor(), 1);
  var import_data112 = __toESM(require_data(), 1);

  // packages/block-library/build-module/pullquote/shared.mjs
  var SOLID_COLOR_CLASS = `is-style-solid-color`;

  // packages/block-library/build-module/pullquote/deprecated.mjs
  var import_jsx_runtime379 = __toESM(require_jsx_runtime(), 1);
  var blockAttributes6 = {
    value: {
      type: "string",
      source: "html",
      selector: "blockquote",
      multiline: "p"
    },
    citation: {
      type: "string",
      source: "html",
      selector: "cite",
      default: ""
    },
    mainColor: {
      type: "string"
    },
    customMainColor: {
      type: "string"
    },
    textColor: {
      type: "string"
    },
    customTextColor: {
      type: "string"
    }
  };
  function parseBorderColor(styleString) {
    if (!styleString) {
      return;
    }
    const matches = styleString.match(/border-color:([^;]+)[;]?/);
    if (matches && matches[1]) {
      return matches[1];
    }
  }
  function multilineToInline(value) {
    value = value || `<p></p>`;
    const padded = `</p>${value}<p>`;
    const values = padded.split(`</p><p>`);
    values.shift();
    values.pop();
    return values.join("<br>");
  }
  var v57 = {
    attributes: {
      value: {
        type: "string",
        source: "html",
        selector: "blockquote",
        multiline: "p",
        role: "content"
      },
      citation: {
        type: "string",
        source: "html",
        selector: "cite",
        default: "",
        role: "content"
      },
      textAlign: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      align: ["left", "right", "wide", "full"],
      color: {
        gradients: true,
        background: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true,
          fontAppearance: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      __experimentalStyle: {
        typography: {
          fontSize: "1.5em",
          lineHeight: "1.6"
        }
      }
    },
    save({ attributes: attributes2 }) {
      const { textAlign, citation, value } = attributes2;
      const shouldShowCitation = !import_block_editor203.RichText.isEmpty(citation);
      return /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(
        "figure",
        {
          ...import_block_editor203.useBlockProps.save({
            className: clsx_default({
              [`has-text-align-${textAlign}`]: textAlign
            })
          }),
          children: /* @__PURE__ */ (0, import_jsx_runtime379.jsxs)("blockquote", { children: [
            /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(import_block_editor203.RichText.Content, { value, multiline: true }),
            shouldShowCitation && /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(import_block_editor203.RichText.Content, { tagName: "cite", value: citation })
          ] })
        }
      );
    },
    migrate({ value, ...attributes2 }) {
      return {
        value: multilineToInline(value),
        ...attributes2
      };
    }
  };
  var v48 = {
    attributes: {
      ...blockAttributes6
    },
    supports: {
      anchor: true,
      align: ["left", "right", "wide", "full"],
      color: {
        gradients: true,
        background: true,
        link: true
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true
      }
    },
    save({ attributes: attributes2 }) {
      const {
        mainColor,
        customMainColor,
        customTextColor,
        textColor,
        value,
        citation,
        className
      } = attributes2;
      const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS);
      let figureClasses, figureStyles;
      if (isSolidColorStyle) {
        const backgroundClass = (0, import_block_editor203.getColorClassName)(
          "background-color",
          mainColor
        );
        figureClasses = clsx_default({
          "has-background": backgroundClass || customMainColor,
          [backgroundClass]: backgroundClass
        });
        figureStyles = {
          backgroundColor: backgroundClass ? void 0 : customMainColor
        };
      } else if (customMainColor) {
        figureStyles = {
          borderColor: customMainColor
        };
      }
      const blockquoteTextColorClass = (0, import_block_editor203.getColorClassName)(
        "color",
        textColor
      );
      const blockquoteClasses = clsx_default({
        "has-text-color": textColor || customTextColor,
        [blockquoteTextColorClass]: blockquoteTextColorClass
      });
      const blockquoteStyles = blockquoteTextColorClass ? void 0 : { color: customTextColor };
      return /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(
        "figure",
        {
          ...import_block_editor203.useBlockProps.save({
            className: figureClasses,
            style: figureStyles
          }),
          children: /* @__PURE__ */ (0, import_jsx_runtime379.jsxs)(
            "blockquote",
            {
              className: blockquoteClasses,
              style: blockquoteStyles,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(import_block_editor203.RichText.Content, { value, multiline: true }),
                !import_block_editor203.RichText.isEmpty(citation) && /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(import_block_editor203.RichText.Content, { tagName: "cite", value: citation })
              ]
            }
          )
        }
      );
    },
    migrate({
      value,
      className,
      mainColor,
      customMainColor,
      customTextColor,
      ...attributes2
    }) {
      const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS);
      let style2;
      if (customMainColor) {
        if (!isSolidColorStyle) {
          style2 = {
            border: {
              color: customMainColor
            }
          };
        } else {
          style2 = {
            color: {
              background: customMainColor
            }
          };
        }
      }
      if (customTextColor && style2) {
        style2.color = {
          ...style2.color,
          text: customTextColor
        };
      }
      return {
        value: multilineToInline(value),
        className,
        backgroundColor: isSolidColorStyle ? mainColor : void 0,
        borderColor: isSolidColorStyle ? void 0 : mainColor,
        textAlign: isSolidColorStyle ? "left" : void 0,
        ...attributes2,
        style: style2
      };
    }
  };
  var v39 = {
    attributes: {
      ...blockAttributes6,
      // figureStyle is an attribute that never existed.
      // We are using it as a way to access the styles previously applied to the figure.
      figureStyle: {
        source: "attribute",
        selector: "figure",
        attribute: "style"
      }
    },
    save({ attributes: attributes2 }) {
      const {
        mainColor,
        customMainColor,
        textColor,
        customTextColor,
        value,
        citation,
        className,
        figureStyle
      } = attributes2;
      const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS);
      let figureClasses, figureStyles;
      if (isSolidColorStyle) {
        const backgroundClass = (0, import_block_editor203.getColorClassName)(
          "background-color",
          mainColor
        );
        figureClasses = clsx_default({
          "has-background": backgroundClass || customMainColor,
          [backgroundClass]: backgroundClass
        });
        figureStyles = {
          backgroundColor: backgroundClass ? void 0 : customMainColor
        };
      } else if (customMainColor) {
        figureStyles = {
          borderColor: customMainColor
        };
      } else if (mainColor) {
        const borderColor = parseBorderColor(figureStyle);
        figureStyles = {
          borderColor
        };
      }
      const blockquoteTextColorClass = (0, import_block_editor203.getColorClassName)(
        "color",
        textColor
      );
      const blockquoteClasses = (textColor || customTextColor) && clsx_default("has-text-color", {
        [blockquoteTextColorClass]: blockquoteTextColorClass
      });
      const blockquoteStyles = blockquoteTextColorClass ? void 0 : { color: customTextColor };
      return /* @__PURE__ */ (0, import_jsx_runtime379.jsx)("figure", { className: figureClasses, style: figureStyles, children: /* @__PURE__ */ (0, import_jsx_runtime379.jsxs)(
        "blockquote",
        {
          className: blockquoteClasses,
          style: blockquoteStyles,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(import_block_editor203.RichText.Content, { value, multiline: true }),
            !import_block_editor203.RichText.isEmpty(citation) && /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(import_block_editor203.RichText.Content, { tagName: "cite", value: citation })
          ]
        }
      ) });
    },
    migrate({
      value,
      className,
      figureStyle,
      mainColor,
      customMainColor,
      customTextColor,
      ...attributes2
    }) {
      const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS);
      let style2;
      if (customMainColor) {
        if (!isSolidColorStyle) {
          style2 = {
            border: {
              color: customMainColor
            }
          };
        } else {
          style2 = {
            color: {
              background: customMainColor
            }
          };
        }
      }
      if (customTextColor && style2) {
        style2.color = {
          ...style2.color,
          text: customTextColor
        };
      }
      if (!isSolidColorStyle && mainColor && figureStyle) {
        const borderColor = parseBorderColor(figureStyle);
        if (borderColor) {
          return {
            value: multilineToInline(value),
            ...attributes2,
            className,
            // Block supports: Set style.border.color if a deprecated block has `mainColor`, inline border CSS and is not a solid color style.
            style: {
              border: {
                color: borderColor
              }
            }
          };
        }
      }
      return {
        value: multilineToInline(value),
        className,
        backgroundColor: isSolidColorStyle ? mainColor : void 0,
        borderColor: isSolidColorStyle ? void 0 : mainColor,
        textAlign: isSolidColorStyle ? "left" : void 0,
        ...attributes2,
        style: style2
      };
    }
  };
  var v214 = {
    attributes: blockAttributes6,
    save({ attributes: attributes2 }) {
      const {
        mainColor,
        customMainColor,
        textColor,
        customTextColor,
        value,
        citation,
        className
      } = attributes2;
      const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS);
      let figureClass, figureStyles;
      if (isSolidColorStyle) {
        figureClass = (0, import_block_editor203.getColorClassName)("background-color", mainColor);
        if (!figureClass) {
          figureStyles = {
            backgroundColor: customMainColor
          };
        }
      } else if (customMainColor) {
        figureStyles = {
          borderColor: customMainColor
        };
      } else if (mainColor) {
        const colors = (0, import_data112.select)(import_block_editor203.store).getSettings().colors ?? [];
        const colorObject = (0, import_block_editor203.getColorObjectByAttributeValues)(
          colors,
          mainColor
        );
        figureStyles = {
          borderColor: colorObject.color
        };
      }
      const blockquoteTextColorClass = (0, import_block_editor203.getColorClassName)(
        "color",
        textColor
      );
      const blockquoteClasses = textColor || customTextColor ? clsx_default("has-text-color", {
        [blockquoteTextColorClass]: blockquoteTextColorClass
      }) : void 0;
      const blockquoteStyle = blockquoteTextColorClass ? void 0 : { color: customTextColor };
      return /* @__PURE__ */ (0, import_jsx_runtime379.jsx)("figure", { className: figureClass, style: figureStyles, children: /* @__PURE__ */ (0, import_jsx_runtime379.jsxs)(
        "blockquote",
        {
          className: blockquoteClasses,
          style: blockquoteStyle,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(import_block_editor203.RichText.Content, { value, multiline: true }),
            !import_block_editor203.RichText.isEmpty(citation) && /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(import_block_editor203.RichText.Content, { tagName: "cite", value: citation })
          ]
        }
      ) });
    },
    migrate({
      value,
      className,
      mainColor,
      customMainColor,
      customTextColor,
      ...attributes2
    }) {
      const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS);
      let style2 = {};
      if (customMainColor) {
        if (!isSolidColorStyle) {
          style2 = {
            border: {
              color: customMainColor
            }
          };
        } else {
          style2 = {
            color: {
              background: customMainColor
            }
          };
        }
      }
      if (customTextColor && style2) {
        style2.color = {
          ...style2.color,
          text: customTextColor
        };
      }
      return {
        value: multilineToInline(value),
        className,
        backgroundColor: isSolidColorStyle ? mainColor : void 0,
        borderColor: isSolidColorStyle ? void 0 : mainColor,
        textAlign: isSolidColorStyle ? "left" : void 0,
        ...attributes2,
        style: style2
      };
    }
  };
  var v135 = {
    attributes: {
      ...blockAttributes6
    },
    save({ attributes: attributes2 }) {
      const { value, citation } = attributes2;
      return /* @__PURE__ */ (0, import_jsx_runtime379.jsxs)("blockquote", { children: [
        /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(import_block_editor203.RichText.Content, { value, multiline: true }),
        !import_block_editor203.RichText.isEmpty(citation) && /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(import_block_editor203.RichText.Content, { tagName: "cite", value: citation })
      ] });
    },
    migrate({ value, ...attributes2 }) {
      return {
        value: multilineToInline(value),
        ...attributes2
      };
    }
  };
  var v02 = {
    attributes: {
      ...blockAttributes6,
      citation: {
        type: "string",
        source: "html",
        selector: "footer"
      },
      align: {
        type: "string",
        default: "none"
      }
    },
    save({ attributes: attributes2 }) {
      const { value, citation, align } = attributes2;
      return /* @__PURE__ */ (0, import_jsx_runtime379.jsxs)("blockquote", { className: `align${align}`, children: [
        /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(import_block_editor203.RichText.Content, { value, multiline: true }),
        !import_block_editor203.RichText.isEmpty(citation) && /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(import_block_editor203.RichText.Content, { tagName: "footer", value: citation })
      ] });
    },
    migrate({ value, ...attributes2 }) {
      return {
        value: multilineToInline(value),
        ...attributes2
      };
    }
  };
  var deprecated_default39 = [v57, v48, v39, v214, v135, v02];

  // packages/block-library/build-module/pullquote/edit.mjs
  var import_i18n183 = __toESM(require_i18n(), 1);
  var import_block_editor204 = __toESM(require_block_editor(), 1);
  var import_blocks92 = __toESM(require_blocks(), 1);
  var import_element102 = __toESM(require_element(), 1);

  // packages/block-library/build-module/pullquote/figure.mjs
  var Figure = "figure";

  // packages/block-library/build-module/pullquote/blockquote.mjs
  var BlockQuote = "blockquote";

  // packages/block-library/build-module/pullquote/edit.mjs
  var import_jsx_runtime380 = __toESM(require_jsx_runtime(), 1);
  var isWebPlatform = import_element102.Platform.OS === "web";
  function PullQuoteEdit({
    attributes: attributes2,
    setAttributes,
    isSelected,
    insertBlocksAfter
  }) {
    const { textAlign, citation, value } = attributes2;
    const blockProps = (0, import_block_editor204.useBlockProps)({
      className: clsx_default({
        [`has-text-align-${textAlign}`]: textAlign
      })
    });
    const shouldShowCitation = !import_block_editor204.RichText.isEmpty(citation) || isSelected;
    return /* @__PURE__ */ (0, import_jsx_runtime380.jsxs)(import_jsx_runtime380.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(import_block_editor204.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(
        import_block_editor204.AlignmentControl,
        {
          value: textAlign,
          onChange: (nextAlign) => {
            setAttributes({ textAlign: nextAlign });
          }
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(Figure, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime380.jsxs)(BlockQuote, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(
          import_block_editor204.RichText,
          {
            identifier: "value",
            tagName: "p",
            value,
            onChange: (nextValue) => setAttributes({
              value: nextValue
            }),
            "aria-label": (0, import_i18n183.__)("Pullquote text"),
            placeholder: (
              // translators: placeholder text used for the quote
              (0, import_i18n183.__)("Add quote")
            ),
            textAlign: "center"
          }
        ),
        shouldShowCitation && /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(
          import_block_editor204.RichText,
          {
            identifier: "citation",
            tagName: isWebPlatform ? "cite" : void 0,
            style: { display: "block" },
            value: citation,
            "aria-label": (0, import_i18n183.__)("Pullquote citation text"),
            placeholder: (
              // translators: placeholder text used for the citation
              (0, import_i18n183.__)("Add citation")
            ),
            onChange: (nextCitation) => setAttributes({
              citation: nextCitation
            }),
            className: "wp-block-pullquote__citation",
            __unstableMobileNoFocusOnMount: true,
            textAlign: "center",
            __unstableOnSplitAtEnd: () => insertBlocksAfter(
              (0, import_blocks92.createBlock)((0, import_blocks92.getDefaultBlockName)())
            )
          }
        )
      ] }) })
    ] });
  }
  var edit_default30 = PullQuoteEdit;

  // packages/block-library/build-module/pullquote/block.json
  var block_default82 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/pullquote",
    title: "Pullquote",
    category: "text",
    description: "Give special visual emphasis to a quote from your text.",
    textdomain: "default",
    attributes: {
      value: {
        type: "rich-text",
        source: "rich-text",
        selector: "p",
        role: "content"
      },
      citation: {
        type: "rich-text",
        source: "rich-text",
        selector: "cite",
        role: "content"
      },
      textAlign: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      align: ["left", "right", "wide", "full"],
      background: {
        backgroundImage: true,
        backgroundSize: true,
        __experimentalDefaultControls: {
          backgroundImage: true
        }
      },
      color: {
        gradients: true,
        background: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      dimensions: {
        minHeight: true,
        __experimentalDefaultControls: {
          minHeight: false
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      __experimentalStyle: {
        typography: {
          fontSize: "1.5em",
          lineHeight: "1.6"
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-pullquote-editor",
    style: "wp-block-pullquote"
  };

  // packages/block-library/build-module/pullquote/save.mjs
  var import_block_editor205 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime381 = __toESM(require_jsx_runtime(), 1);
  function save40({ attributes: attributes2 }) {
    const { textAlign, citation, value } = attributes2;
    const shouldShowCitation = !import_block_editor205.RichText.isEmpty(citation);
    return /* @__PURE__ */ (0, import_jsx_runtime381.jsx)(
      "figure",
      {
        ...import_block_editor205.useBlockProps.save({
          className: clsx_default({
            [`has-text-align-${textAlign}`]: textAlign
          })
        }),
        children: /* @__PURE__ */ (0, import_jsx_runtime381.jsxs)("blockquote", { children: [
          /* @__PURE__ */ (0, import_jsx_runtime381.jsx)(import_block_editor205.RichText.Content, { tagName: "p", value }),
          shouldShowCitation && /* @__PURE__ */ (0, import_jsx_runtime381.jsx)(import_block_editor205.RichText.Content, { tagName: "cite", value: citation })
        ] })
      }
    );
  }

  // packages/block-library/build-module/pullquote/transforms.mjs
  var import_blocks93 = __toESM(require_blocks(), 1);
  var import_rich_text5 = __toESM(require_rich_text(), 1);
  var transforms27 = {
    from: [
      {
        type: "block",
        isMultiBlock: true,
        blocks: ["core/paragraph"],
        transform: (attributes2) => {
          return (0, import_blocks93.createBlock)("core/pullquote", {
            value: (0, import_rich_text5.toHTMLString)({
              value: (0, import_rich_text5.join)(
                attributes2.map(
                  ({ content }) => (0, import_rich_text5.create)({ html: content })
                ),
                "\n"
              )
            }),
            anchor: attributes2.anchor
          });
        }
      },
      {
        type: "block",
        blocks: ["core/heading"],
        transform: ({ content, anchor }) => {
          return (0, import_blocks93.createBlock)("core/pullquote", {
            value: content,
            anchor
          });
        }
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/paragraph"],
        transform: ({ value, citation }) => {
          const paragraphs = [];
          if (value) {
            paragraphs.push(
              (0, import_blocks93.createBlock)("core/paragraph", {
                content: value
              })
            );
          }
          if (citation) {
            paragraphs.push(
              (0, import_blocks93.createBlock)("core/paragraph", {
                content: citation
              })
            );
          }
          if (paragraphs.length === 0) {
            return (0, import_blocks93.createBlock)("core/paragraph", {
              content: ""
            });
          }
          return paragraphs;
        }
      },
      {
        type: "block",
        blocks: ["core/heading"],
        transform: ({ value, citation }) => {
          if (!value) {
            return (0, import_blocks93.createBlock)("core/heading", {
              content: citation
            });
          }
          const headingBlock = (0, import_blocks93.createBlock)("core/heading", {
            content: value
          });
          if (!citation) {
            return headingBlock;
          }
          return [
            headingBlock,
            (0, import_blocks93.createBlock)("core/heading", {
              content: citation
            })
          ];
        }
      }
    ]
  };
  var transforms_default28 = transforms27;

  // packages/block-library/build-module/pullquote/index.mjs
  var { fieldsKey: fieldsKey16, formKey: formKey16 } = unlock(import_blocks94.privateApis);
  var { name: name83 } = block_default82;
  var settings82 = {
    icon: pullquote_default,
    example: {
      attributes: {
        value: (
          // translators: Quote serving as example for the Pullquote block. Attributed to Matt Mullenweg.
          (0, import_i18n184.__)(
            "One of the hardest things to do in technology is disrupt yourself."
          )
        ),
        citation: (0, import_i18n184.__)("Matt Mullenweg")
      }
    },
    transforms: transforms_default28,
    edit: edit_default30,
    save: save40,
    deprecated: deprecated_default39
  };
  if (window.__experimentalContentOnlyInspectorFields) {
    settings82[fieldsKey16] = [
      {
        id: "value",
        label: (0, import_i18n184.__)("Content"),
        type: "text",
        Edit: "rich-text"
        // TODO: replace with custom component
      },
      {
        id: "citation",
        label: (0, import_i18n184.__)("Citation"),
        type: "text",
        Edit: "rich-text"
        // TODO: replace with custom component
      }
    ];
    settings82[formKey16] = {
      fields: ["value", "citation"]
    };
  }
  var init82 = () => initBlock({ name: name83, metadata: block_default82, settings: settings82 });

  // packages/block-library/build-module/query/index.mjs
  var query_exports = {};
  __export(query_exports, {
    init: () => init83,
    metadata: () => block_default83,
    name: () => name84,
    settings: () => settings83
  });

  // packages/block-library/build-module/query/block.json
  var block_default83 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/query",
    title: "Query Loop",
    category: "theme",
    description: "An advanced block that allows displaying post types based on different query parameters and visual configurations.",
    keywords: ["posts", "list", "blog", "blogs", "custom post types"],
    textdomain: "default",
    attributes: {
      queryId: {
        type: "number"
      },
      query: {
        type: "object",
        default: {
          perPage: null,
          pages: 0,
          offset: 0,
          postType: "post",
          order: "desc",
          orderBy: "date",
          author: "",
          search: "",
          exclude: [],
          sticky: "",
          inherit: true,
          taxQuery: null,
          parents: [],
          format: []
        }
      },
      tagName: {
        type: "string",
        default: "div"
      },
      namespace: {
        type: "string"
      },
      enhancedPagination: {
        type: "boolean",
        default: false
      }
    },
    usesContext: ["templateSlug"],
    providesContext: {
      queryId: "queryId",
      query: "query",
      displayLayout: "displayLayout",
      enhancedPagination: "enhancedPagination"
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      layout: true,
      interactivity: true
    },
    editorStyle: "wp-block-query-editor"
  };

  // packages/block-library/build-module/query/edit/index.mjs
  var import_data123 = __toESM(require_data(), 1);
  var import_element111 = __toESM(require_element(), 1);
  var import_block_editor211 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/query/edit/query-content.mjs
  var import_data121 = __toESM(require_data(), 1);
  var import_compose49 = __toESM(require_compose(), 1);
  var import_element109 = __toESM(require_element(), 1);
  var import_block_editor209 = __toESM(require_block_editor(), 1);
  var import_i18n200 = __toESM(require_i18n(), 1);
  var import_core_data74 = __toESM(require_core_data(), 1);

  // packages/block-library/build-module/query/edit/inspector-controls/enhanced-pagination-control.mjs
  var import_components118 = __toESM(require_components(), 1);
  var import_i18n186 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/query/utils.mjs
  var import_data113 = __toESM(require_data(), 1);
  var import_element103 = __toESM(require_element(), 1);
  var import_core_data68 = __toESM(require_core_data(), 1);
  var import_block_editor206 = __toESM(require_block_editor(), 1);
  var import_html_entities10 = __toESM(require_html_entities(), 1);
  var import_i18n185 = __toESM(require_i18n(), 1);
  var import_blocks95 = __toESM(require_blocks(), 1);
  var getEntitiesInfo = (entities) => {
    const mapping = entities?.reduce(
      (accumulator, entity) => {
        const { mapById, mapByName, names } = accumulator;
        mapById[entity.id] = entity;
        mapByName[entity.name] = entity;
        names.push(entity.name);
        return accumulator;
      },
      { mapById: {}, mapByName: {}, names: [] }
    );
    return {
      entities,
      ...mapping
    };
  };
  var getValueFromObjectPath = (object, path) => {
    const normalizedPath = path.split(".");
    let value = object;
    normalizedPath.forEach((fieldName) => {
      value = value?.[fieldName];
    });
    return value;
  };
  var mapToIHasNameAndId = (entities, path) => {
    return (entities || []).map((entity) => ({
      ...entity,
      name: (0, import_html_entities10.decodeEntities)(getValueFromObjectPath(entity, path))
    }));
  };
  var usePostTypes = () => {
    const postTypes = (0, import_data113.useSelect)((select9) => {
      const { getPostTypes } = select9(import_core_data68.store);
      const excludedPostTypes = ["attachment"];
      const filteredPostTypes = getPostTypes({ per_page: -1 })?.filter(
        ({ viewable, slug }) => viewable && !excludedPostTypes.includes(slug)
      );
      return filteredPostTypes;
    }, []);
    const postTypesTaxonomiesMap = (0, import_element103.useMemo)(() => {
      if (!postTypes?.length) {
        return;
      }
      return postTypes.reduce((accumulator, type) => {
        accumulator[type.slug] = type.taxonomies;
        return accumulator;
      }, {});
    }, [postTypes]);
    const postTypesSelectOptions = (0, import_element103.useMemo)(
      () => (postTypes || []).map(({ labels, slug }) => ({
        label: labels.singular_name,
        value: slug
      })),
      [postTypes]
    );
    const postTypeFormatSupportMap = (0, import_element103.useMemo)(() => {
      if (!postTypes?.length) {
        return {};
      }
      return postTypes.reduce((accumulator, type) => {
        accumulator[type.slug] = type.supports?.["post-formats"] || false;
        return accumulator;
      }, {});
    }, [postTypes]);
    return {
      postTypesTaxonomiesMap,
      postTypesSelectOptions,
      postTypeFormatSupportMap
    };
  };
  var useTaxonomies = (postType) => {
    const taxonomies = (0, import_data113.useSelect)(
      (select9) => {
        const { getTaxonomies, getPostType } = select9(import_core_data68.store);
        if (getPostType(postType)?.taxonomies?.length > 0) {
          return getTaxonomies({
            type: postType,
            per_page: -1
          });
        }
        return [];
      },
      [postType]
    );
    return (0, import_element103.useMemo)(() => {
      return taxonomies?.filter(
        ({ visibility }) => !!visibility?.publicly_queryable
      );
    }, [taxonomies]);
  };
  function useIsPostTypeHierarchical(postType) {
    return (0, import_data113.useSelect)(
      (select9) => {
        const type = select9(import_core_data68.store).getPostType(postType);
        return type?.viewable && type?.hierarchical;
      },
      [postType]
    );
  }
  function useOrderByOptions(postType) {
    const supportsCustomOrder = (0, import_data113.useSelect)(
      (select9) => {
        const type = select9(import_core_data68.store).getPostType(postType);
        return !!type?.supports?.["page-attributes"];
      },
      [postType]
    );
    return (0, import_element103.useMemo)(() => {
      const orderByOptions = [
        {
          label: (0, import_i18n185.__)("Newest to oldest"),
          value: "date/desc"
        },
        {
          label: (0, import_i18n185.__)("Oldest to newest"),
          value: "date/asc"
        },
        {
          /* translators: Label for ordering posts by title in ascending order. */
          label: (0, import_i18n185.__)("A \u2192 Z"),
          value: "title/asc"
        },
        {
          /* translators: Label for ordering posts by title in descending order. */
          label: (0, import_i18n185.__)("Z \u2192 A"),
          value: "title/desc"
        }
      ];
      if (supportsCustomOrder) {
        orderByOptions.push(
          {
            /* translators: Label for ordering posts by ascending menu order. */
            label: (0, import_i18n185.__)("Ascending by order"),
            value: "menu_order/asc"
          },
          {
            /* translators: Label for ordering posts by descending menu order. */
            label: (0, import_i18n185.__)("Descending by order"),
            value: "menu_order/desc"
          }
        );
      }
      return orderByOptions;
    }, [supportsCustomOrder]);
  }
  function useAllowedControls(attributes2) {
    return (0, import_data113.useSelect)(
      (select9) => select9(import_blocks95.store).getActiveBlockVariation(
        "core/query",
        attributes2
      )?.allowedControls,
      [attributes2]
    );
  }
  function isControlAllowed(allowedControls, key) {
    if (!allowedControls) {
      return true;
    }
    return allowedControls.includes(key);
  }
  var getTransformedBlocksFromPattern = (blocks, queryBlockAttributes) => {
    const {
      query: { postType, inherit },
      namespace
    } = queryBlockAttributes;
    const clonedBlocks = blocks.map((block) => (0, import_blocks95.cloneBlock)(block));
    const queryClientIds = [];
    const blocksQueue = [...clonedBlocks];
    while (blocksQueue.length > 0) {
      const block = blocksQueue.shift();
      if (block.name === "core/query") {
        block.attributes.query = {
          ...block.attributes.query,
          postType,
          inherit
        };
        if (namespace) {
          block.attributes.namespace = namespace;
        }
        queryClientIds.push(block.clientId);
      }
      block.innerBlocks?.forEach((innerBlock) => {
        blocksQueue.push(innerBlock);
      });
    }
    return { newBlocks: clonedBlocks, queryClientIds };
  };
  function useBlockNameForPatterns(clientId, attributes2) {
    return (0, import_data113.useSelect)(
      (select9) => {
        const activeVariationName = select9(
          import_blocks95.store
        ).getActiveBlockVariation("core/query", attributes2)?.name;
        if (!activeVariationName) {
          return "core/query";
        }
        const { getBlockRootClientId, getPatternsByBlockTypes } = select9(import_block_editor206.store);
        const rootClientId = getBlockRootClientId(clientId);
        const activePatterns = getPatternsByBlockTypes(
          `core/query/${activeVariationName}`,
          rootClientId
        );
        return activePatterns.length > 0 ? `core/query/${activeVariationName}` : "core/query";
      },
      [clientId, attributes2]
    );
  }
  function useScopedBlockVariations(attributes2) {
    const { activeVariationName, blockVariations } = (0, import_data113.useSelect)(
      (select9) => {
        const { getActiveBlockVariation, getBlockVariations: getBlockVariations3 } = select9(import_blocks95.store);
        return {
          activeVariationName: getActiveBlockVariation(
            "core/query",
            attributes2
          )?.name,
          blockVariations: getBlockVariations3("core/query", "block")
        };
      },
      [attributes2]
    );
    const variations18 = (0, import_element103.useMemo)(() => {
      const isNotConnected = (variation) => !variation.attributes?.namespace;
      if (!activeVariationName) {
        return blockVariations.filter(isNotConnected);
      }
      const connectedVariations = blockVariations.filter(
        (variation) => variation.attributes?.namespace?.includes(activeVariationName)
      );
      if (!!connectedVariations.length) {
        return connectedVariations;
      }
      return blockVariations.filter(isNotConnected);
    }, [activeVariationName, blockVariations]);
    return variations18;
  }
  var usePatterns = (clientId, name123) => {
    return (0, import_data113.useSelect)(
      (select9) => {
        const { getBlockRootClientId, getPatternsByBlockTypes } = select9(import_block_editor206.store);
        const rootClientId = getBlockRootClientId(clientId);
        return getPatternsByBlockTypes(name123, rootClientId);
      },
      [name123, clientId]
    );
  };
  var useUnsupportedBlocks = (clientId) => {
    return (0, import_data113.useSelect)(
      (select9) => {
        const { getClientIdsOfDescendants, getBlockName } = select9(import_block_editor206.store);
        return getClientIdsOfDescendants(clientId).some(
          (descendantClientId) => {
            const blockName = getBlockName(descendantClientId);
            const blockSupportsInteractivity = Object.is(
              (0, import_blocks95.getBlockSupport)(blockName, "interactivity"),
              true
            );
            const blockSupportsInteractivityClientNavigation = (0, import_blocks95.getBlockSupport)(
              blockName,
              "interactivity.clientNavigation"
            );
            return !blockSupportsInteractivity && !blockSupportsInteractivityClientNavigation;
          }
        );
      },
      [clientId]
    );
  };
  function getQueryContextFromTemplate(templateSlug) {
    if (!templateSlug) {
      return { isSingular: true };
    }
    let isSingular = false;
    let templateType = templateSlug === "wp" ? "custom" : templateSlug;
    const singularTemplates = ["404", "blank", "single", "page", "custom"];
    const templateTypeFromSlug = templateSlug.includes("-") ? templateSlug.split("-", 1)[0] : templateSlug;
    const queryFromTemplateSlug = templateSlug.includes("-") ? templateSlug.split("-").slice(1).join("-") : "";
    if (queryFromTemplateSlug) {
      templateType = templateTypeFromSlug;
    }
    isSingular = singularTemplates.includes(templateType);
    return { isSingular, templateType };
  }

  // packages/block-library/build-module/query/edit/inspector-controls/enhanced-pagination-control.mjs
  var import_jsx_runtime382 = __toESM(require_jsx_runtime(), 1);
  function EnhancedPaginationControl({
    enhancedPagination,
    setAttributes,
    clientId
  }) {
    const hasUnsupportedBlocks = useUnsupportedBlocks(clientId);
    let help = (0, import_i18n186.__)(
      "Reload the full page\u2014instead of just the posts list\u2014when visitors navigate between pages."
    );
    if (hasUnsupportedBlocks) {
      help = (0, import_i18n186.__)(
        "Enhancement disabled because there are non-compatible blocks inside the Query block."
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(import_jsx_runtime382.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(
      import_components118.ToggleControl,
      {
        label: (0, import_i18n186.__)("Reload full page"),
        help,
        checked: !enhancedPagination,
        disabled: hasUnsupportedBlocks,
        onChange: (value) => {
          setAttributes({
            enhancedPagination: !value
          });
        }
      }
    ) });
  }

  // packages/block-library/build-module/query/edit/inspector-controls/index.mjs
  var import_components128 = __toESM(require_components(), 1);
  var import_data118 = __toESM(require_data(), 1);
  var import_core_data73 = __toESM(require_core_data(), 1);
  var import_i18n196 = __toESM(require_i18n(), 1);
  var import_compose48 = __toESM(require_compose(), 1);
  var import_element106 = __toESM(require_element(), 1);

  // packages/block-library/build-module/query/edit/inspector-controls/order-control.mjs
  var import_components119 = __toESM(require_components(), 1);
  var import_i18n187 = __toESM(require_i18n(), 1);
  var import_jsx_runtime383 = __toESM(require_jsx_runtime(), 1);
  var defaultOrderByOptions = [
    {
      label: (0, import_i18n187.__)("Newest to oldest"),
      value: "date/desc"
    },
    {
      label: (0, import_i18n187.__)("Oldest to newest"),
      value: "date/asc"
    },
    {
      /* translators: Label for ordering posts by title in ascending order. */
      label: (0, import_i18n187.__)("A \u2192 Z"),
      value: "title/asc"
    },
    {
      /* translators: Label for ordering posts by title in descending order. */
      label: (0, import_i18n187.__)("Z \u2192 A"),
      value: "title/desc"
    }
  ];
  function OrderControl({
    order,
    orderBy,
    orderByOptions = defaultOrderByOptions,
    onChange
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime383.jsx)(
      import_components119.SelectControl,
      {
        __next40pxDefaultSize: true,
        label: (0, import_i18n187.__)("Order by"),
        value: `${orderBy}/${order}`,
        options: orderByOptions,
        onChange: (value) => {
          const [newOrderBy, newOrder] = value.split("/");
          onChange({ order: newOrder, orderBy: newOrderBy });
        }
      }
    );
  }
  var order_control_default = OrderControl;

  // packages/block-library/build-module/query/edit/inspector-controls/author-control.mjs
  var import_i18n188 = __toESM(require_i18n(), 1);
  var import_components120 = __toESM(require_components(), 1);
  var import_data114 = __toESM(require_data(), 1);
  var import_core_data69 = __toESM(require_core_data(), 1);
  var import_jsx_runtime384 = __toESM(require_jsx_runtime(), 1);
  var AUTHORS_QUERY3 = {
    who: "authors",
    per_page: -1,
    _fields: "id,name",
    context: "view"
  };
  function AuthorControl({ value, onChange }) {
    const authorsList = (0, import_data114.useSelect)((select9) => {
      const { getUsers } = select9(import_core_data69.store);
      return getUsers(AUTHORS_QUERY3);
    }, []);
    if (!authorsList) {
      return null;
    }
    const authorsInfo = getEntitiesInfo(authorsList);
    const normalizedValue = !value ? [] : value.toString().split(",");
    const sanitizedValue = normalizedValue.reduce(
      (accumulator, authorId) => {
        const author = authorsInfo.mapById[authorId];
        if (author) {
          accumulator.push({
            id: authorId,
            value: author.name
          });
        }
        return accumulator;
      },
      []
    );
    const getIdByValue = (entitiesMappedByName, authorValue) => {
      const id = authorValue?.id || entitiesMappedByName[authorValue]?.id;
      if (id) {
        return id;
      }
    };
    const onAuthorChange = (newValue) => {
      const ids = Array.from(
        newValue.reduce((accumulator, author) => {
          const id = getIdByValue(authorsInfo.mapByName, author);
          if (id) {
            accumulator.add(id);
          }
          return accumulator;
        }, /* @__PURE__ */ new Set())
      );
      onChange({ author: ids.join(",") });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime384.jsx)(
      import_components120.FormTokenField,
      {
        label: (0, import_i18n188.__)("Authors"),
        value: sanitizedValue,
        suggestions: authorsInfo.names,
        onChange: onAuthorChange,
        __experimentalShowHowTo: false,
        __next40pxDefaultSize: true
      }
    );
  }
  var author_control_default = AuthorControl;

  // packages/block-library/build-module/query/edit/inspector-controls/parent-control.mjs
  var import_i18n189 = __toESM(require_i18n(), 1);
  var import_components121 = __toESM(require_components(), 1);
  var import_data115 = __toESM(require_data(), 1);
  var import_core_data70 = __toESM(require_core_data(), 1);
  var import_element104 = __toESM(require_element(), 1);
  var import_compose46 = __toESM(require_compose(), 1);
  var import_jsx_runtime385 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_ARRAY4 = [];
  var BASE_QUERY = {
    order: "asc",
    _fields: "id,title",
    context: "view"
  };
  function ParentControl({ parents, postType, onChange }) {
    const [search, setSearch] = (0, import_element104.useState)("");
    const [value, setValue] = (0, import_element104.useState)(EMPTY_ARRAY4);
    const [suggestions, setSuggestions] = (0, import_element104.useState)(EMPTY_ARRAY4);
    const debouncedSearch = (0, import_compose46.useDebounce)(setSearch, 250);
    const { searchResults, searchHasResolved } = (0, import_data115.useSelect)(
      (select9) => {
        if (!search) {
          return { searchResults: EMPTY_ARRAY4, searchHasResolved: true };
        }
        const { getEntityRecords, hasFinishedResolution } = select9(import_core_data70.store);
        const selectorArgs = [
          "postType",
          postType,
          {
            ...BASE_QUERY,
            search,
            orderby: "relevance",
            exclude: parents,
            per_page: 20
          }
        ];
        return {
          searchResults: getEntityRecords(...selectorArgs),
          searchHasResolved: hasFinishedResolution(
            "getEntityRecords",
            selectorArgs
          )
        };
      },
      [search, postType, parents]
    );
    const currentParents = (0, import_data115.useSelect)(
      (select9) => {
        if (!parents?.length) {
          return EMPTY_ARRAY4;
        }
        const { getEntityRecords } = select9(import_core_data70.store);
        return getEntityRecords("postType", postType, {
          ...BASE_QUERY,
          include: parents,
          per_page: parents.length
        });
      },
      [parents, postType]
    );
    (0, import_element104.useEffect)(() => {
      if (!parents?.length) {
        setValue(EMPTY_ARRAY4);
      }
      if (!currentParents?.length) {
        return;
      }
      const currentParentsInfo = getEntitiesInfo(
        mapToIHasNameAndId(currentParents, "title.rendered")
      );
      const sanitizedValue = parents.reduce((accumulator, id) => {
        const entity = currentParentsInfo.mapById[id];
        if (entity) {
          accumulator.push({
            id,
            value: entity.name
          });
        }
        return accumulator;
      }, []);
      setValue(sanitizedValue);
    }, [parents, currentParents]);
    const entitiesInfo = (0, import_element104.useMemo)(() => {
      if (!searchResults?.length) {
        return EMPTY_ARRAY4;
      }
      return getEntitiesInfo(
        mapToIHasNameAndId(searchResults, "title.rendered")
      );
    }, [searchResults]);
    (0, import_element104.useEffect)(() => {
      if (!searchHasResolved) {
        return;
      }
      setSuggestions(entitiesInfo.names);
    }, [entitiesInfo.names, searchHasResolved]);
    const getIdByValue = (entitiesMappedByName, entity) => {
      const id = entity?.id || entitiesMappedByName?.[entity]?.id;
      if (id) {
        return id;
      }
    };
    const onParentChange = (newValue) => {
      const ids = Array.from(
        newValue.reduce((accumulator, entity) => {
          const id = getIdByValue(entitiesInfo.mapByName, entity);
          if (id) {
            accumulator.add(id);
          }
          return accumulator;
        }, /* @__PURE__ */ new Set())
      );
      setSuggestions(EMPTY_ARRAY4);
      onChange({ parents: ids });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime385.jsx)(
      import_components121.FormTokenField,
      {
        __next40pxDefaultSize: true,
        label: (0, import_i18n189.__)("Parents"),
        value,
        onInputChange: debouncedSearch,
        suggestions,
        onChange: onParentChange,
        __experimentalShowHowTo: false
      }
    );
  }
  var parent_control_default = ParentControl;

  // packages/block-library/build-module/query/edit/inspector-controls/taxonomy-controls.mjs
  var import_components122 = __toESM(require_components(), 1);
  var import_data116 = __toESM(require_data(), 1);
  var import_core_data71 = __toESM(require_core_data(), 1);
  var import_element105 = __toESM(require_element(), 1);
  var import_compose47 = __toESM(require_compose(), 1);
  var import_html_entities11 = __toESM(require_html_entities(), 1);
  var import_i18n190 = __toESM(require_i18n(), 1);
  var import_jsx_runtime386 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_ARRAY5 = [];
  var BASE_QUERY2 = {
    order: "asc",
    _fields: "id,name",
    context: "view"
  };
  var getTermIdByTermValue = (terms, termValue) => {
    const termId = termValue?.id || terms?.find((term) => term.name === termValue)?.id;
    if (termId) {
      return termId;
    }
    const termValueLower = termValue.toLocaleLowerCase();
    return terms?.find(
      (term) => term.name.toLocaleLowerCase() === termValueLower
    )?.id;
  };
  function TaxonomyControls({ onChange, query }) {
    const { postType, taxQuery } = query;
    const taxonomies = useTaxonomies(postType);
    if (!taxonomies?.length) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime386.jsx)(import_components122.__experimentalVStack, { spacing: 4, children: taxonomies.map((taxonomy) => {
      const includeTermIds = taxQuery?.include?.[taxonomy.slug] || [];
      const excludeTermIds = taxQuery?.exclude?.[taxonomy.slug] || [];
      const onChangeTaxQuery = (newTermIds, key) => {
        const newPartialTaxQuery = {
          ...taxQuery?.[key],
          [taxonomy.slug]: newTermIds
        };
        if (!newTermIds.length) {
          delete newPartialTaxQuery[taxonomy.slug];
        }
        const newTaxQuery = {
          ...taxQuery,
          [key]: !!Object.keys(newPartialTaxQuery).length ? newPartialTaxQuery : void 0
        };
        onChange({
          // Clean up `taxQuery` if all filters are removed.
          taxQuery: Object.values(newTaxQuery).every(
            (value) => !value
          ) ? void 0 : newTaxQuery
        });
      };
      return /* @__PURE__ */ (0, import_jsx_runtime386.jsxs)(import_element105.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime386.jsx)(
          TaxonomyItem,
          {
            taxonomy,
            termIds: includeTermIds,
            oppositeTermIds: excludeTermIds,
            onChange: (value) => onChangeTaxQuery(value, "include"),
            label: taxonomy.name
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime386.jsx)(
          TaxonomyItem,
          {
            taxonomy,
            termIds: excludeTermIds,
            oppositeTermIds: includeTermIds,
            onChange: (value) => onChangeTaxQuery(value, "exclude"),
            label: (
              /* translators: %s: taxonomy name */
              (0, import_i18n190.sprintf)((0, import_i18n190.__)("Exclude: %s"), taxonomy.name)
            )
          }
        )
      ] }, taxonomy.slug);
    }) });
  }
  function TaxonomyItem({
    taxonomy,
    termIds,
    oppositeTermIds,
    onChange,
    label
  }) {
    const [search, setSearch] = (0, import_element105.useState)("");
    const [value, setValue] = (0, import_element105.useState)(EMPTY_ARRAY5);
    const [suggestions, setSuggestions] = (0, import_element105.useState)(EMPTY_ARRAY5);
    const debouncedSearch = (0, import_compose47.useDebounce)(setSearch, 250);
    const { searchResults, searchHasResolved } = (0, import_data116.useSelect)(
      (select9) => {
        if (!search) {
          return { searchResults: EMPTY_ARRAY5, searchHasResolved: true };
        }
        const { getEntityRecords, hasFinishedResolution } = select9(import_core_data71.store);
        const combinedExclude = [...termIds, ...oppositeTermIds];
        const selectorArgs = [
          "taxonomy",
          taxonomy.slug,
          {
            ...BASE_QUERY2,
            search,
            orderby: "name",
            exclude: combinedExclude,
            per_page: 20
          }
        ];
        return {
          searchResults: getEntityRecords(...selectorArgs),
          searchHasResolved: hasFinishedResolution(
            "getEntityRecords",
            selectorArgs
          )
        };
      },
      [search, taxonomy.slug, termIds, oppositeTermIds]
    );
    const existingTerms = (0, import_data116.useSelect)(
      (select9) => {
        if (!termIds?.length) {
          return EMPTY_ARRAY5;
        }
        const { getEntityRecords } = select9(import_core_data71.store);
        return getEntityRecords("taxonomy", taxonomy.slug, {
          ...BASE_QUERY2,
          include: termIds,
          per_page: termIds.length
        });
      },
      [taxonomy.slug, termIds]
    );
    (0, import_element105.useEffect)(() => {
      if (!termIds?.length) {
        setValue(EMPTY_ARRAY5);
      }
      if (!existingTerms?.length) {
        return;
      }
      const sanitizedValue = termIds.reduce((accumulator, id) => {
        const entity = existingTerms.find((term) => term.id === id);
        if (entity) {
          accumulator.push({
            id,
            value: entity.name
          });
        }
        return accumulator;
      }, []);
      setValue(sanitizedValue);
    }, [termIds, existingTerms]);
    (0, import_element105.useEffect)(() => {
      if (!searchHasResolved) {
        return;
      }
      setSuggestions(searchResults.map((result) => result.name));
    }, [searchResults, searchHasResolved]);
    const onTermsChange = (newTermValues) => {
      const newTermIds = /* @__PURE__ */ new Set();
      for (const termValue of newTermValues) {
        const termId = getTermIdByTermValue(searchResults, termValue);
        if (termId) {
          newTermIds.add(termId);
        }
      }
      setSuggestions(EMPTY_ARRAY5);
      onChange(Array.from(newTermIds));
    };
    return /* @__PURE__ */ (0, import_jsx_runtime386.jsx)("div", { className: "block-library-query-inspector__taxonomy-control", children: /* @__PURE__ */ (0, import_jsx_runtime386.jsx)(
      import_components122.FormTokenField,
      {
        label,
        value,
        onInputChange: debouncedSearch,
        suggestions,
        displayTransform: import_html_entities11.decodeEntities,
        onChange: onTermsChange,
        __experimentalShowHowTo: false,
        __next40pxDefaultSize: true
      }
    ) });
  }

  // packages/block-library/build-module/query/edit/inspector-controls/format-controls.mjs
  var import_components123 = __toESM(require_components(), 1);
  var import_data117 = __toESM(require_data(), 1);
  var import_core_data72 = __toESM(require_core_data(), 1);
  var import_i18n191 = __toESM(require_i18n(), 1);
  var import_jsx_runtime387 = __toESM(require_jsx_runtime(), 1);
  var POST_FORMATS = [
    { value: "aside", label: (0, import_i18n191.__)("Aside") },
    { value: "audio", label: (0, import_i18n191.__)("Audio") },
    { value: "chat", label: (0, import_i18n191.__)("Chat") },
    { value: "gallery", label: (0, import_i18n191.__)("Gallery") },
    { value: "image", label: (0, import_i18n191.__)("Image") },
    { value: "link", label: (0, import_i18n191.__)("Link") },
    { value: "quote", label: (0, import_i18n191.__)("Quote") },
    { value: "standard", label: (0, import_i18n191.__)("Standard") },
    { value: "status", label: (0, import_i18n191.__)("Status") },
    { value: "video", label: (0, import_i18n191.__)("Video") }
  ].sort((a2, b2) => {
    const normalizedA = a2.label.toUpperCase();
    const normalizedB = b2.label.toUpperCase();
    if (normalizedA < normalizedB) {
      return -1;
    }
    if (normalizedA > normalizedB) {
      return 1;
    }
    return 0;
  });
  function formatNamesToValues(names, formats) {
    return names.map((name123) => {
      return formats.find(
        (item) => item.label.toLocaleLowerCase() === name123.toLocaleLowerCase()
      )?.value;
    }).filter(Boolean);
  }
  function FormatControls({ onChange, query: { format: format3 } }) {
    const normalizedFormats = Array.isArray(format3) ? format3 : [format3];
    const { supportedFormats } = (0, import_data117.useSelect)((select9) => {
      const themeSupports = select9(import_core_data72.store).getThemeSupports();
      return {
        supportedFormats: themeSupports.formats
      };
    }, []);
    const formats = POST_FORMATS.filter(
      (item) => supportedFormats.includes(item.value)
    );
    const values = normalizedFormats.map(
      (name123) => formats.find((item) => item.value === name123)?.label
    ).filter(Boolean);
    const suggestions = formats.filter((item) => !normalizedFormats.includes(item.value)).map((item) => item.label);
    return /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
      import_components123.FormTokenField,
      {
        label: (0, import_i18n191.__)("Formats"),
        value: values,
        suggestions,
        onChange: (newValues) => {
          onChange({
            format: formatNamesToValues(newValues, formats)
          });
        },
        __experimentalShowHowTo: false,
        __experimentalExpandOnFocus: true,
        __next40pxDefaultSize: true
      }
    );
  }

  // packages/block-library/build-module/query/edit/inspector-controls/sticky-control.mjs
  var import_components124 = __toESM(require_components(), 1);
  var import_i18n192 = __toESM(require_i18n(), 1);
  var import_jsx_runtime388 = __toESM(require_jsx_runtime(), 1);
  var stickyOptions = [
    { label: (0, import_i18n192.__)("Include"), value: "" },
    { label: (0, import_i18n192.__)("Ignore"), value: "ignore" },
    { label: (0, import_i18n192.__)("Exclude"), value: "exclude" },
    { label: (0, import_i18n192.__)("Only"), value: "only" }
  ];
  function StickyControl({ value, onChange }) {
    return /* @__PURE__ */ (0, import_jsx_runtime388.jsx)(
      import_components124.SelectControl,
      {
        __next40pxDefaultSize: true,
        label: (0, import_i18n192.__)("Sticky posts"),
        options: stickyOptions,
        value,
        onChange,
        help: (0, import_i18n192.__)(
          "Sticky posts always appear first, regardless of their publish date."
        )
      }
    );
  }

  // packages/block-library/build-module/query/edit/inspector-controls/per-page-control.mjs
  var import_components125 = __toESM(require_components(), 1);
  var import_i18n193 = __toESM(require_i18n(), 1);
  var import_jsx_runtime389 = __toESM(require_jsx_runtime(), 1);
  var MIN_POSTS_PER_PAGE = 1;
  var MAX_POSTS_PER_PAGE = 100;
  var PerPageControl = ({ perPage, offset = 0, onChange }) => {
    return /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(
      import_components125.RangeControl,
      {
        __next40pxDefaultSize: true,
        label: (0, import_i18n193.__)("Items per page"),
        min: MIN_POSTS_PER_PAGE,
        max: MAX_POSTS_PER_PAGE,
        onChange: (newPerPage) => {
          if (isNaN(newPerPage) || newPerPage < MIN_POSTS_PER_PAGE || newPerPage > MAX_POSTS_PER_PAGE) {
            return;
          }
          onChange({ perPage: newPerPage, offset });
        },
        value: parseInt(perPage, 10)
      }
    );
  };
  var per_page_control_default = PerPageControl;

  // packages/block-library/build-module/query/edit/inspector-controls/offset-controls.mjs
  var import_components126 = __toESM(require_components(), 1);
  var import_i18n194 = __toESM(require_i18n(), 1);
  var import_jsx_runtime390 = __toESM(require_jsx_runtime(), 1);
  var MIN_OFFSET = 0;
  var MAX_OFFSET = 100;
  var OffsetControl = ({ offset = 0, onChange }) => {
    return /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
      import_components126.__experimentalNumberControl,
      {
        __next40pxDefaultSize: true,
        label: (0, import_i18n194.__)("Offset"),
        value: offset,
        min: MIN_OFFSET,
        onChange: (newOffset) => {
          if (isNaN(newOffset) || newOffset < MIN_OFFSET || newOffset > MAX_OFFSET) {
            return;
          }
          onChange({ offset: newOffset });
        }
      }
    );
  };
  var offset_controls_default = OffsetControl;

  // packages/block-library/build-module/query/edit/inspector-controls/pages-control.mjs
  var import_components127 = __toESM(require_components(), 1);
  var import_i18n195 = __toESM(require_i18n(), 1);
  var import_jsx_runtime391 = __toESM(require_jsx_runtime(), 1);
  var PagesControl = ({ pages, onChange }) => {
    return /* @__PURE__ */ (0, import_jsx_runtime391.jsx)(
      import_components127.__experimentalNumberControl,
      {
        __next40pxDefaultSize: true,
        label: (0, import_i18n195.__)("Max pages to show"),
        value: pages,
        min: 0,
        onChange: (newPages) => {
          if (isNaN(newPages) || newPages < 0) {
            return;
          }
          onChange({ pages: newPages });
        },
        help: (0, import_i18n195.__)(
          "Limit the pages you want to show, even if the query has more results. To show all pages use 0 (zero)."
        )
      }
    );
  };
  var pages_control_default = PagesControl;

  // packages/block-library/build-module/query/edit/inspector-controls/index.mjs
  var import_jsx_runtime392 = __toESM(require_jsx_runtime(), 1);
  function QueryInspectorControls(props) {
    const { attributes: attributes2, setQuery, isSingular } = props;
    const { query } = attributes2;
    const {
      order,
      orderBy,
      author: authorIds,
      pages,
      postType,
      perPage,
      offset,
      sticky,
      inherit,
      taxQuery,
      parents,
      format: format3
    } = query;
    const allowedControls = useAllowedControls(attributes2);
    const showSticky = postType === "post";
    const {
      postTypesTaxonomiesMap,
      postTypesSelectOptions,
      postTypeFormatSupportMap
    } = usePostTypes();
    const taxonomies = useTaxonomies(postType);
    const isPostTypeHierarchical = useIsPostTypeHierarchical(postType);
    const onPostTypeChange = (newValue) => {
      const updateQuery = { postType: newValue };
      const supportedTaxonomies = postTypesTaxonomiesMap[newValue];
      if (!!supportedTaxonomies?.length && !!taxQuery) {
        const buildTaxQuery = (_taxQuery) => {
          return Object.entries(_taxQuery || {}).reduce(
            (accumulator, [taxonomy, terms]) => {
              if (supportedTaxonomies.includes(taxonomy)) {
                accumulator[taxonomy] = terms;
              }
              return accumulator;
            },
            {}
          );
        };
        const updatedTaxQuery = {};
        const builtIncludeTaxQuery = buildTaxQuery(taxQuery.include);
        if (!!Object.keys(builtIncludeTaxQuery).length) {
          updatedTaxQuery.include = builtIncludeTaxQuery;
        }
        const builtExcludeTaxQuery = buildTaxQuery(taxQuery.exclude);
        if (!!Object.keys(builtExcludeTaxQuery).length) {
          updatedTaxQuery.exclude = builtExcludeTaxQuery;
        }
        updateQuery.taxQuery = !!Object.keys(updatedTaxQuery).length ? updatedTaxQuery : void 0;
      }
      if (newValue !== "post") {
        updateQuery.sticky = "";
      }
      updateQuery.parents = [];
      const hasFormatSupport = postTypeFormatSupportMap[newValue];
      if (!hasFormatSupport) {
        updateQuery.format = [];
      }
      setQuery(updateQuery);
    };
    const [querySearch, setQuerySearch] = (0, import_element106.useState)(query.search);
    const debouncedQuerySearch = (0, import_element106.useMemo)(() => {
      return (0, import_compose48.debounce)((newQuerySearch) => {
        setQuery({ search: newQuerySearch });
      }, 250);
    }, [setQuery]);
    const orderByOptions = useOrderByOptions(postType);
    const showInheritControl = isControlAllowed(allowedControls, "inherit");
    const showPostTypeControl = !inherit && isControlAllowed(allowedControls, "postType");
    const postTypeControlLabel = (0, import_i18n196.__)("Post type");
    const postTypeControlHelp = (0, import_i18n196.__)(
      "Select the type of content to display: posts, pages, or custom post types."
    );
    const showOrderControl = !inherit && isControlAllowed(allowedControls, "order");
    const showStickyControl = !inherit && showSticky && isControlAllowed(allowedControls, "sticky");
    const showSettingsPanel = showInheritControl || showPostTypeControl || showOrderControl || showStickyControl;
    const showTaxControl = !!taxonomies?.length && isControlAllowed(allowedControls, "taxQuery");
    const showAuthorControl = isControlAllowed(allowedControls, "author");
    const showSearchControl = isControlAllowed(allowedControls, "search");
    const showParentControl = isControlAllowed(allowedControls, "parents") && isPostTypeHierarchical;
    const postTypeHasFormatSupport = postTypeFormatSupportMap[postType];
    const showFormatControl = (0, import_data118.useSelect)(
      (select9) => {
        if (!postTypeHasFormatSupport || !isControlAllowed(allowedControls, "format")) {
          return false;
        }
        const themeSupports = select9(import_core_data73.store).getThemeSupports();
        return themeSupports.formats && themeSupports.formats.length > 0 && themeSupports.formats.some((type) => type !== "standard");
      },
      [allowedControls, postTypeHasFormatSupport]
    );
    const showFiltersPanel = showTaxControl || showAuthorControl || showSearchControl || showParentControl || showFormatControl;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const showPostCountControl = isControlAllowed(
      allowedControls,
      "postCount"
    );
    const showOffSetControl = isControlAllowed(allowedControls, "offset");
    const showPagesControl = isControlAllowed(allowedControls, "pages");
    const showDisplayPanel = showPostCountControl || showOffSetControl || showPagesControl;
    const hasInheritanceWarning = isSingular && inherit;
    return /* @__PURE__ */ (0, import_jsx_runtime392.jsxs)(import_jsx_runtime392.Fragment, { children: [
      showSettingsPanel && /* @__PURE__ */ (0, import_jsx_runtime392.jsxs)(
        import_components128.__experimentalToolsPanel,
        {
          label: (0, import_i18n196.__)("Settings"),
          resetAll: () => {
            setQuery({
              postType: "post",
              order: "desc",
              orderBy: "date",
              sticky: "",
              inherit: true
            });
          },
          dropdownMenuProps,
          children: [
            showInheritControl && /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
              import_components128.__experimentalToolsPanelItem,
              {
                hasValue: () => !inherit,
                label: (0, import_i18n196.__)("Query type"),
                onDeselect: () => setQuery({ inherit: true }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime392.jsxs)(import_components128.__experimentalVStack, { spacing: 4, children: [
                  /* @__PURE__ */ (0, import_jsx_runtime392.jsxs)(
                    import_components128.__experimentalToggleGroupControl,
                    {
                      __next40pxDefaultSize: true,
                      label: (0, import_i18n196.__)("Query type"),
                      isBlock: true,
                      onChange: (value) => {
                        setQuery({
                          inherit: value === "default"
                        });
                      },
                      help: inherit ? (0, import_i18n196.__)(
                        "Display a list of posts or custom post types based on the current template."
                      ) : (0, import_i18n196.__)(
                        "Display a list of posts or custom post types based on specific criteria."
                      ),
                      value: !!inherit ? "default" : "custom",
                      children: [
                        /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
                          import_components128.__experimentalToggleGroupControlOption,
                          {
                            value: "default",
                            label: (0, import_i18n196.__)("Default")
                          }
                        ),
                        /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
                          import_components128.__experimentalToggleGroupControlOption,
                          {
                            value: "custom",
                            label: (0, import_i18n196.__)("Custom")
                          }
                        )
                      ]
                    }
                  ),
                  hasInheritanceWarning && /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
                    import_components128.Notice,
                    {
                      status: "warning",
                      isDismissible: false,
                      children: (0, import_i18n196.__)(
                        "Cannot inherit the current template query when placed inside the singular content (e.g., post, page, 404, blank)."
                      )
                    }
                  )
                ] })
              }
            ),
            showPostTypeControl && /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
              import_components128.__experimentalToolsPanelItem,
              {
                hasValue: () => postType !== "post",
                label: postTypeControlLabel,
                onDeselect: () => onPostTypeChange("post"),
                isShownByDefault: true,
                children: postTypesSelectOptions.length > 2 ? /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
                  import_components128.SelectControl,
                  {
                    __next40pxDefaultSize: true,
                    options: postTypesSelectOptions,
                    value: postType,
                    label: postTypeControlLabel,
                    onChange: onPostTypeChange,
                    help: postTypeControlHelp
                  }
                ) : /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
                  import_components128.__experimentalToggleGroupControl,
                  {
                    __next40pxDefaultSize: true,
                    isBlock: true,
                    value: postType,
                    label: postTypeControlLabel,
                    onChange: onPostTypeChange,
                    help: postTypeControlHelp,
                    children: postTypesSelectOptions.map(
                      (option) => /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
                        import_components128.__experimentalToggleGroupControlOption,
                        {
                          value: option.value,
                          label: option.label
                        },
                        option.value
                      )
                    )
                  }
                )
              }
            ),
            showOrderControl && /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
              import_components128.__experimentalToolsPanelItem,
              {
                hasValue: () => order !== "desc" || orderBy !== "date",
                label: (0, import_i18n196.__)("Order by"),
                onDeselect: () => setQuery({ order: "desc", orderBy: "date" }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
                  order_control_default,
                  {
                    ...{ order, orderBy, orderByOptions },
                    onChange: setQuery
                  }
                )
              }
            ),
            showStickyControl && /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
              import_components128.__experimentalToolsPanelItem,
              {
                hasValue: () => !!sticky,
                label: (0, import_i18n196.__)("Sticky posts"),
                onDeselect: () => setQuery({ sticky: "" }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
                  StickyControl,
                  {
                    value: sticky,
                    onChange: (value) => setQuery({ sticky: value })
                  }
                )
              }
            )
          ]
        }
      ),
      !inherit && showDisplayPanel && /* @__PURE__ */ (0, import_jsx_runtime392.jsxs)(
        import_components128.__experimentalToolsPanel,
        {
          className: "block-library-query-toolspanel__display",
          label: (0, import_i18n196.__)("Display"),
          resetAll: () => {
            setQuery({
              offset: 0,
              pages: 0
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
              import_components128.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n196.__)("Items per page"),
                hasValue: () => perPage > 0,
                children: /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
                  per_page_control_default,
                  {
                    perPage,
                    offset,
                    onChange: setQuery
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
              import_components128.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n196.__)("Offset"),
                hasValue: () => offset > 0,
                onDeselect: () => setQuery({ offset: 0 }),
                children: /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
                  offset_controls_default,
                  {
                    offset,
                    onChange: setQuery
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
              import_components128.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n196.__)("Max pages to show"),
                hasValue: () => pages > 0,
                onDeselect: () => setQuery({ pages: 0 }),
                children: /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(pages_control_default, { pages, onChange: setQuery })
              }
            )
          ]
        }
      ),
      !inherit && showFiltersPanel && /* @__PURE__ */ (0, import_jsx_runtime392.jsxs)(
        import_components128.__experimentalToolsPanel,
        {
          className: "block-library-query-toolspanel__filters",
          label: (0, import_i18n196.__)("Filters"),
          resetAll: () => {
            setQuery({
              author: "",
              parents: [],
              search: "",
              taxQuery: null,
              format: []
            });
            setQuerySearch("");
          },
          dropdownMenuProps,
          children: [
            showTaxControl && /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
              import_components128.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n196.__)("Taxonomies"),
                hasValue: () => Object.values(taxQuery || {}).some(
                  (value) => Object.values(value || {}).some(
                    (termIds) => !!termIds?.length
                  )
                ),
                onDeselect: () => setQuery({ taxQuery: null }),
                children: /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
                  TaxonomyControls,
                  {
                    onChange: setQuery,
                    query
                  }
                )
              }
            ),
            showAuthorControl && /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
              import_components128.__experimentalToolsPanelItem,
              {
                hasValue: () => !!authorIds,
                label: (0, import_i18n196.__)("Authors"),
                onDeselect: () => setQuery({ author: "" }),
                children: /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
                  author_control_default,
                  {
                    value: authorIds,
                    onChange: setQuery
                  }
                )
              }
            ),
            showSearchControl && /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
              import_components128.__experimentalToolsPanelItem,
              {
                hasValue: () => !!querySearch,
                label: (0, import_i18n196.__)("Keyword"),
                onDeselect: () => {
                  setQuery({ search: "" });
                  setQuerySearch("");
                },
                children: /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
                  import_components128.TextControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n196.__)("Keyword"),
                    value: querySearch,
                    onChange: (newQuerySearch) => {
                      debouncedQuerySearch(newQuerySearch);
                      setQuerySearch(newQuerySearch);
                    }
                  }
                )
              }
            ),
            showParentControl && /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
              import_components128.__experimentalToolsPanelItem,
              {
                hasValue: () => !!parents?.length,
                label: (0, import_i18n196.__)("Parents"),
                onDeselect: () => setQuery({ parents: [] }),
                children: /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
                  parent_control_default,
                  {
                    parents,
                    postType,
                    onChange: setQuery
                  }
                )
              }
            ),
            showFormatControl && /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
              import_components128.__experimentalToolsPanelItem,
              {
                hasValue: () => !!format3?.length,
                label: (0, import_i18n196.__)("Formats"),
                onDeselect: () => setQuery({ format: [] }),
                children: /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
                  FormatControls,
                  {
                    onChange: setQuery,
                    query
                  }
                )
              }
            )
          ]
        }
      )
    ] });
  }

  // packages/block-library/build-module/query/edit/enhanced-pagination-modal.mjs
  var import_components129 = __toESM(require_components(), 1);
  var import_i18n197 = __toESM(require_i18n(), 1);
  var import_element107 = __toESM(require_element(), 1);
  var import_jsx_runtime393 = __toESM(require_jsx_runtime(), 1);
  var modalDescriptionId = "wp-block-query-enhanced-pagination-modal__description";
  function EnhancedPaginationModal({
    clientId,
    attributes: { enhancedPagination },
    setAttributes
  }) {
    const [isOpen, setOpen] = (0, import_element107.useState)(false);
    const hasUnsupportedBlocks = useUnsupportedBlocks(clientId);
    (0, import_element107.useEffect)(() => {
      if (enhancedPagination && hasUnsupportedBlocks) {
        setAttributes({ enhancedPagination: false });
        setOpen(true);
      }
    }, [enhancedPagination, hasUnsupportedBlocks, setAttributes]);
    const closeModal = () => {
      setOpen(false);
    };
    const notice = (0, import_i18n197.__)(
      "Currently, avoiding full page reloads is not possible when non-interactive or non-client Navigation compatible blocks from plugins are present inside the Query block."
    ) + " " + (0, import_i18n197.__)(
      'If you still want to prevent full page reloads, remove that block, then disable "Reload full page" again in the Query Block settings.'
    );
    return isOpen && /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
      import_components129.Modal,
      {
        title: (0, import_i18n197.__)("Query block: Reload full page enabled"),
        className: "wp-block-query__enhanced-pagination-modal",
        aria: {
          describedby: modalDescriptionId
        },
        role: "alertdialog",
        focusOnMount: "firstElement",
        isDismissible: false,
        onRequestClose: closeModal,
        children: /* @__PURE__ */ (0, import_jsx_runtime393.jsxs)(import_components129.__experimentalVStack, { alignment: "right", spacing: 5, children: [
          /* @__PURE__ */ (0, import_jsx_runtime393.jsx)("span", { id: modalDescriptionId, children: notice }),
          /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
            import_components129.Button,
            {
              __next40pxDefaultSize: true,
              variant: "primary",
              onClick: closeModal,
              children: (0, import_i18n197.__)("OK")
            }
          )
        ] })
      }
    );
  }

  // packages/block-library/build-module/query/edit/query-toolbar.mjs
  var import_components131 = __toESM(require_components(), 1);
  var import_i18n199 = __toESM(require_i18n(), 1);
  var import_data120 = __toESM(require_data(), 1);
  var import_block_editor208 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/query/edit/pattern-selection.mjs
  var import_element108 = __toESM(require_element(), 1);
  var import_data119 = __toESM(require_data(), 1);
  var import_components130 = __toESM(require_components(), 1);
  var import_block_editor207 = __toESM(require_block_editor(), 1);
  var import_i18n198 = __toESM(require_i18n(), 1);
  var import_jsx_runtime394 = __toESM(require_jsx_runtime(), 1);
  function PatternSelectionModal({
    clientId,
    attributes: attributes2,
    setIsPatternSelectionModalOpen
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
      import_components130.Modal,
      {
        overlayClassName: "block-library-query-pattern__selection-modal",
        title: (0, import_i18n198.__)("Choose a pattern"),
        onRequestClose: () => setIsPatternSelectionModalOpen(false),
        isFullScreen: true,
        children: /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(PatternSelection, { clientId, attributes: attributes2 })
      }
    );
  }
  function useBlockPatterns(clientId, attributes2) {
    const blockNameForPatterns = useBlockNameForPatterns(
      clientId,
      attributes2
    );
    const allPatterns = usePatterns(clientId, blockNameForPatterns);
    const rootBlockPatterns = (0, import_element108.useMemo)(() => {
      return allPatterns.filter((pattern) => {
        return pattern.blocks?.[0]?.name === "core/query";
      });
    }, [allPatterns]);
    return rootBlockPatterns;
  }
  function PatternSelection({
    clientId,
    attributes: attributes2,
    showTitlesAsTooltip = false,
    showSearch = true
  }) {
    const [searchValue, setSearchValue] = (0, import_element108.useState)("");
    const { replaceBlock, selectBlock } = (0, import_data119.useDispatch)(import_block_editor207.store);
    const blockPatterns = useBlockPatterns(clientId, attributes2);
    const blockPreviewContext = (0, import_element108.useMemo)(
      () => ({
        previewPostType: attributes2.query.postType
      }),
      [attributes2.query.postType]
    );
    const filteredBlockPatterns = (0, import_element108.useMemo)(() => {
      return searchPatterns(blockPatterns, searchValue);
    }, [blockPatterns, searchValue]);
    const onBlockPatternSelect = (pattern, blocks) => {
      const { newBlocks, queryClientIds } = getTransformedBlocksFromPattern(
        blocks,
        attributes2
      );
      replaceBlock(clientId, newBlocks);
      if (queryClientIds[0]) {
        selectBlock(queryClientIds[0]);
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime394.jsxs)("div", { className: "block-library-query-pattern__selection-content", children: [
      showSearch && /* @__PURE__ */ (0, import_jsx_runtime394.jsx)("div", { className: "block-library-query-pattern__selection-search", children: /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
        import_components130.SearchControl,
        {
          onChange: setSearchValue,
          value: searchValue,
          label: (0, import_i18n198.__)("Search"),
          placeholder: (0, import_i18n198.__)("Search")
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(import_block_editor207.BlockContextProvider, { value: blockPreviewContext, children: /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
        import_block_editor207.__experimentalBlockPatternsList,
        {
          blockPatterns: filteredBlockPatterns,
          onClickPattern: onBlockPatternSelect,
          showTitlesAsTooltip
        }
      ) })
    ] });
  }

  // packages/block-library/build-module/query/edit/query-toolbar.mjs
  var import_jsx_runtime395 = __toESM(require_jsx_runtime(), 1);
  function PatternPicker({ clientId, attributes: attributes2, hasInnerBlocks }) {
    const hasPatterns = useBlockPatterns(clientId, attributes2).length;
    if (!hasPatterns) {
      return null;
    }
    const buttonLabel = hasInnerBlocks ? (0, import_i18n199.__)("Change design") : (0, import_i18n199.__)("Choose pattern");
    return /* @__PURE__ */ (0, import_jsx_runtime395.jsx)(import_block_editor208.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime395.jsx)(import_components131.__experimentalDropdownContentWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime395.jsx)(
      import_components131.Dropdown,
      {
        contentClassName: "block-editor-block-settings-menu__popover",
        focusOnMount: "firstElement",
        expandOnMobile: true,
        renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime395.jsx)(
          import_components131.ToolbarButton,
          {
            "aria-haspopup": "true",
            "aria-expanded": isOpen,
            onClick: onToggle,
            children: buttonLabel
          }
        ),
        renderContent: () => /* @__PURE__ */ (0, import_jsx_runtime395.jsx)(
          PatternSelection,
          {
            clientId,
            attributes: attributes2,
            showSearch: false,
            showTitlesAsTooltip: true
          }
        )
      }
    ) }) });
  }
  function QueryToolbar(props) {
    const isLocked = (0, import_data120.useSelect)(
      (select9) => {
        const { isLockedBlock } = unlock(select9(import_block_editor208.store));
        return isLockedBlock(props.clientId);
      },
      [props.clientId]
    );
    if (isLocked) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime395.jsx)(PatternPicker, { ...props });
  }

  // packages/block-library/build-module/query/edit/query-content.mjs
  var import_jsx_runtime396 = __toESM(require_jsx_runtime(), 1);
  var { HTMLElementControl: HTMLElementControl6 } = unlock(import_block_editor209.privateApis);
  var DEFAULTS_POSTS_PER_PAGE = 3;
  var TEMPLATE13 = [["core/post-template"]];
  function QueryContent({
    attributes: attributes2,
    setAttributes,
    clientId,
    context,
    name: name123,
    isSelected
  }) {
    const {
      queryId,
      query,
      enhancedPagination,
      tagName: TagName2 = "div",
      query: { inherit } = {}
    } = attributes2;
    const { templateSlug } = context;
    const { isSingular } = getQueryContextFromTemplate(templateSlug);
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data121.useDispatch)(import_block_editor209.store);
    const instanceId = (0, import_compose49.useInstanceId)(QueryContent);
    const blockProps = (0, import_block_editor209.useBlockProps)();
    const innerBlocksProps = (0, import_block_editor209.useInnerBlocksProps)(blockProps, {
      template: TEMPLATE13
    });
    const { postsPerPage } = (0, import_data121.useSelect)((select9) => {
      const { getSettings: getSettings2 } = select9(import_block_editor209.store);
      const { getEntityRecord, getEntityRecordEdits, canUser } = select9(import_core_data74.store);
      const settingPerPage = canUser("read", {
        kind: "root",
        name: "site"
      }) ? +getEntityRecord("root", "site")?.posts_per_page : +getSettings2().postsPerPage;
      const editedSettingPerPage = +getEntityRecordEdits("root", "site")?.posts_per_page;
      return {
        postsPerPage: editedSettingPerPage || settingPerPage || DEFAULTS_POSTS_PER_PAGE
      };
    }, []);
    const updateQuery = (0, import_element109.useCallback)(
      (newQuery) => setAttributes((prevAttributes) => ({
        query: { ...prevAttributes.query, ...newQuery }
      })),
      [setAttributes]
    );
    (0, import_element109.useEffect)(() => {
      const newQuery = {};
      if (inherit && query.perPage !== postsPerPage) {
        newQuery.perPage = postsPerPage;
      } else if (!query.perPage && postsPerPage) {
        newQuery.perPage = postsPerPage;
      }
      if (!!Object.keys(newQuery).length) {
        __unstableMarkNextChangeAsNotPersistent();
        updateQuery(newQuery);
      }
    }, [
      query.perPage,
      inherit,
      postsPerPage,
      __unstableMarkNextChangeAsNotPersistent,
      updateQuery
    ]);
    (0, import_element109.useEffect)(() => {
      if (!Number.isFinite(queryId)) {
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({ queryId: instanceId });
      }
    }, [
      queryId,
      instanceId,
      __unstableMarkNextChangeAsNotPersistent,
      setAttributes
    ]);
    return /* @__PURE__ */ (0, import_jsx_runtime396.jsxs)(import_jsx_runtime396.Fragment, { children: [
      isSelected && /* @__PURE__ */ (0, import_jsx_runtime396.jsx)(
        QueryToolbar,
        {
          clientId,
          attributes: attributes2,
          hasInnerBlocks: true
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime396.jsx)(
        EnhancedPaginationModal,
        {
          attributes: attributes2,
          setAttributes,
          clientId
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime396.jsx)(import_block_editor209.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime396.jsx)(
        QueryInspectorControls,
        {
          name: name123,
          attributes: attributes2,
          setQuery: updateQuery,
          setAttributes,
          clientId,
          isSingular
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime396.jsxs)(import_block_editor209.InspectorControls, { group: "advanced", children: [
        /* @__PURE__ */ (0, import_jsx_runtime396.jsx)(
          HTMLElementControl6,
          {
            tagName: TagName2,
            onChange: (value) => setAttributes({ tagName: value }),
            clientId,
            options: [
              { label: (0, import_i18n200.__)("Default (<div>)"), value: "div" },
              { label: "<main>", value: "main" },
              { label: "<section>", value: "section" },
              { label: "<aside>", value: "aside" }
            ]
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime396.jsx)(
          EnhancedPaginationControl,
          {
            enhancedPagination,
            setAttributes,
            clientId
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime396.jsx)(TagName2, { ...innerBlocksProps })
    ] });
  }

  // packages/block-library/build-module/query/edit/query-placeholder.mjs
  var import_data122 = __toESM(require_data(), 1);
  var import_blocks96 = __toESM(require_blocks(), 1);
  var import_element110 = __toESM(require_element(), 1);
  var import_block_editor210 = __toESM(require_block_editor(), 1);
  var import_components132 = __toESM(require_components(), 1);
  var import_i18n201 = __toESM(require_i18n(), 1);
  var import_compose50 = __toESM(require_compose(), 1);
  var import_jsx_runtime397 = __toESM(require_jsx_runtime(), 1);
  function QueryPlaceholder({
    attributes: attributes2,
    clientId,
    name: name123,
    openPatternSelectionModal,
    isSelected
  }) {
    const [isStartingBlank, setIsStartingBlank] = (0, import_element110.useState)(false);
    const [containerWidth, setContainerWidth] = (0, import_element110.useState)(0);
    const resizeObserverRef = (0, import_compose50.useResizeObserver)(([entry]) => {
      setContainerWidth(entry.contentRect.width);
    });
    const SMALL_CONTAINER_BREAKPOINT = 160;
    const isSmallContainer = containerWidth > 0 && containerWidth < SMALL_CONTAINER_BREAKPOINT;
    const { blockType, activeBlockVariation } = (0, import_data122.useSelect)(
      (select9) => {
        const { getActiveBlockVariation, getBlockType: getBlockType5 } = select9(import_blocks96.store);
        return {
          blockType: getBlockType5(name123),
          activeBlockVariation: getActiveBlockVariation(
            name123,
            attributes2
          )
        };
      },
      [name123, attributes2]
    );
    const hasPatterns = !!useBlockPatterns(clientId, attributes2).length;
    const icon4 = activeBlockVariation?.icon?.src || activeBlockVariation?.icon || blockType?.icon?.src;
    const label = activeBlockVariation?.title || blockType?.title;
    const blockProps = (0, import_block_editor210.useBlockProps)({
      ref: resizeObserverRef
    });
    if (isStartingBlank) {
      return /* @__PURE__ */ (0, import_jsx_runtime397.jsx)(
        QueryVariationPicker,
        {
          clientId,
          attributes: attributes2,
          icon: icon4,
          label
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime397.jsxs)("div", { ...blockProps, children: [
      isSelected && /* @__PURE__ */ (0, import_jsx_runtime397.jsx)(
        QueryToolbar,
        {
          clientId,
          attributes: attributes2,
          hasInnerBlocks: false
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime397.jsxs)(
        import_components132.Placeholder,
        {
          className: "block-editor-media-placeholder",
          icon: !isSmallContainer && icon4,
          label: !isSmallContainer && label,
          instructions: !isSmallContainer && (0, import_i18n201.__)("Choose a pattern for the query loop or start blank."),
          withIllustration: isSmallContainer,
          children: [
            !!hasPatterns && !isSmallContainer && /* @__PURE__ */ (0, import_jsx_runtime397.jsx)(
              import_components132.Button,
              {
                __next40pxDefaultSize: true,
                variant: "primary",
                onClick: openPatternSelectionModal,
                children: (0, import_i18n201.__)("Choose")
              }
            ),
            !isSmallContainer && /* @__PURE__ */ (0, import_jsx_runtime397.jsx)(
              import_components132.Button,
              {
                __next40pxDefaultSize: true,
                variant: "secondary",
                onClick: () => {
                  setIsStartingBlank(true);
                },
                children: (0, import_i18n201.__)("Start blank")
              }
            )
          ]
        }
      )
    ] });
  }
  function QueryVariationPicker({ clientId, attributes: attributes2, icon: icon4, label }) {
    const scopeVariations = useScopedBlockVariations(attributes2);
    const { replaceInnerBlocks } = (0, import_data122.useDispatch)(import_block_editor210.store);
    const blockProps = (0, import_block_editor210.useBlockProps)();
    return /* @__PURE__ */ (0, import_jsx_runtime397.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime397.jsx)(
      import_block_editor210.__experimentalBlockVariationPicker,
      {
        icon: icon4,
        label,
        variations: scopeVariations,
        onSelect: (variation) => {
          if (variation.innerBlocks) {
            replaceInnerBlocks(
              clientId,
              (0, import_blocks96.createBlocksFromInnerBlocksTemplate)(
                variation.innerBlocks
              ),
              false
            );
          }
        }
      }
    ) });
  }

  // packages/block-library/build-module/query/edit/index.mjs
  var import_jsx_runtime398 = __toESM(require_jsx_runtime(), 1);
  var QueryEdit = (props) => {
    const { clientId, attributes: attributes2 } = props;
    const [isPatternSelectionModalOpen, setIsPatternSelectionModalOpen] = (0, import_element111.useState)(false);
    const hasInnerBlocks = (0, import_data123.useSelect)(
      (select9) => !!select9(import_block_editor211.store).getBlocks(clientId).length,
      [clientId]
    );
    const Component = hasInnerBlocks ? QueryContent : QueryPlaceholder;
    return /* @__PURE__ */ (0, import_jsx_runtime398.jsxs)(import_jsx_runtime398.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime398.jsx)(
        Component,
        {
          ...props,
          openPatternSelectionModal: () => setIsPatternSelectionModalOpen(true)
        }
      ),
      isPatternSelectionModalOpen && /* @__PURE__ */ (0, import_jsx_runtime398.jsx)(
        PatternSelectionModal,
        {
          clientId,
          attributes: attributes2,
          setIsPatternSelectionModalOpen
        }
      )
    ] });
  };
  var edit_default31 = QueryEdit;

  // packages/block-library/build-module/query/save.mjs
  var import_block_editor212 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime399 = __toESM(require_jsx_runtime(), 1);
  function save41({ attributes: { tagName: Tag = "div" } }) {
    const blockProps = import_block_editor212.useBlockProps.save();
    const innerBlocksProps = import_block_editor212.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime399.jsx)(Tag, { ...innerBlocksProps });
  }

  // packages/block-library/build-module/query/variations.mjs
  var import_i18n202 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/query/icons.mjs
  var import_components133 = __toESM(require_components(), 1);
  var import_jsx_runtime400 = __toESM(require_jsx_runtime(), 1);
  var titleDate = /* @__PURE__ */ (0, import_jsx_runtime400.jsx)(import_components133.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", children: /* @__PURE__ */ (0, import_jsx_runtime400.jsx)(import_components133.Path, { d: "M41 9H7v3h34V9zm-22 5H7v1h12v-1zM7 26h12v1H7v-1zm34-5H7v3h34v-3zM7 38h12v1H7v-1zm34-5H7v3h34v-3z" }) });
  var titleExcerpt = /* @__PURE__ */ (0, import_jsx_runtime400.jsx)(import_components133.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", children: /* @__PURE__ */ (0, import_jsx_runtime400.jsx)(import_components133.Path, { d: "M41 9H7v3h34V9zm-4 5H7v1h30v-1zm4 3H7v1h34v-1zM7 20h30v1H7v-1zm0 12h30v1H7v-1zm34 3H7v1h34v-1zM7 38h30v1H7v-1zm34-11H7v3h34v-3z" }) });
  var titleDateExcerpt = /* @__PURE__ */ (0, import_jsx_runtime400.jsx)(import_components133.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", children: /* @__PURE__ */ (0, import_jsx_runtime400.jsx)(import_components133.Path, { d: "M41 9H7v3h34V9zm-22 5H7v1h12v-1zm22 3H7v1h34v-1zM7 20h34v1H7v-1zm0 12h12v1H7v-1zm34 3H7v1h34v-1zM7 38h34v1H7v-1zm34-11H7v3h34v-3z" }) });
  var imageDateTitle = /* @__PURE__ */ (0, import_jsx_runtime400.jsx)(import_components133.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", children: /* @__PURE__ */ (0, import_jsx_runtime400.jsx)(import_components133.Path, { d: "M7 9h34v6H7V9zm12 8H7v1h12v-1zm18 3H7v1h30v-1zm0 18H7v1h30v-1zM7 35h12v1H7v-1zm34-8H7v6h34v-6z" }) });

  // packages/block-library/build-module/query/variations.mjs
  var postDate = [
    "core/post-date",
    {
      metadata: {
        bindings: {
          datetime: {
            source: "core/post-data",
            args: { field: "date" }
          }
        }
      }
    }
  ];
  var variations13 = [
    {
      name: "title-date",
      title: (0, import_i18n202.__)("Title & Date"),
      icon: titleDate,
      attributes: {},
      innerBlocks: [
        ["core/post-template", {}, [["core/post-title"], postDate]],
        ["core/query-pagination"],
        ["core/query-no-results"]
      ],
      scope: ["block"]
    },
    {
      name: "title-excerpt",
      title: (0, import_i18n202.__)("Title & Excerpt"),
      icon: titleExcerpt,
      attributes: {},
      innerBlocks: [
        [
          "core/post-template",
          {},
          [["core/post-title"], ["core/post-excerpt"]]
        ],
        ["core/query-pagination"],
        ["core/query-no-results"]
      ],
      scope: ["block"]
    },
    {
      name: "title-date-excerpt",
      title: (0, import_i18n202.__)("Title, Date, & Excerpt"),
      icon: titleDateExcerpt,
      attributes: {},
      innerBlocks: [
        [
          "core/post-template",
          {},
          [["core/post-title"], postDate, ["core/post-excerpt"]]
        ],
        ["core/query-pagination"],
        ["core/query-no-results"]
      ],
      scope: ["block"]
    },
    {
      name: "image-date-title",
      title: (0, import_i18n202.__)("Image, Date, & Title"),
      icon: imageDateTitle,
      attributes: {},
      innerBlocks: [
        [
          "core/post-template",
          {},
          [
            ["core/post-featured-image"],
            postDate,
            ["core/post-title"]
          ]
        ],
        ["core/query-pagination"],
        ["core/query-no-results"]
      ],
      scope: ["block"]
    }
  ];
  var variations_default13 = variations13;

  // packages/block-library/build-module/query/deprecated.mjs
  var import_blocks97 = __toESM(require_blocks(), 1);
  var import_block_editor213 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime401 = __toESM(require_jsx_runtime(), 1);
  var { cleanEmptyObject: cleanEmptyObject6 } = unlock(import_block_editor213.privateApis);
  var migrateToTaxQuery = (attributes2) => {
    const { query } = attributes2;
    const { categoryIds, tagIds, taxQuery, ...newQuery } = query;
    if (!!categoryIds?.length || !!tagIds?.length) {
      newQuery.taxQuery = {
        include: {
          category: !!categoryIds?.length ? categoryIds : void 0,
          post_tag: !!tagIds?.length ? tagIds : void 0
        }
      };
    }
    if (!!Object.keys(taxQuery || {}).length) {
      newQuery.taxQuery = { include: taxQuery };
    }
    return {
      ...attributes2,
      query: newQuery
    };
  };
  var migrateColors = (attributes2, innerBlocks) => {
    const { style: style2, backgroundColor, gradient, textColor, ...newAttributes } = attributes2;
    const hasColorStyles = backgroundColor || gradient || textColor || style2?.color || style2?.elements?.link;
    if (!hasColorStyles) {
      return [attributes2, innerBlocks];
    }
    if (style2) {
      newAttributes.style = cleanEmptyObject6({
        ...style2,
        color: void 0,
        elements: {
          ...style2.elements,
          link: void 0
        }
      });
    }
    if (hasSingleInnerGroupBlock(innerBlocks)) {
      const groupBlock = innerBlocks[0];
      const hasStyles = style2?.color || style2?.elements?.link || groupBlock.attributes.style;
      const newStyles = hasStyles ? cleanEmptyObject6({
        ...groupBlock.attributes.style,
        color: style2?.color,
        elements: style2?.elements?.link ? { link: style2?.elements?.link } : void 0
      }) : void 0;
      const updatedGroupBlock = (0, import_blocks97.createBlock)(
        "core/group",
        {
          ...groupBlock.attributes,
          backgroundColor,
          gradient,
          textColor,
          style: newStyles
        },
        groupBlock.innerBlocks
      );
      return [newAttributes, [updatedGroupBlock]];
    }
    const newGroupBlock = (0, import_blocks97.createBlock)(
      "core/group",
      {
        backgroundColor,
        gradient,
        textColor,
        style: cleanEmptyObject6({
          color: style2?.color,
          elements: style2?.elements?.link ? { link: style2?.elements?.link } : void 0
        })
      },
      innerBlocks
    );
    return [newAttributes, [newGroupBlock]];
  };
  var hasSingleInnerGroupBlock = (innerBlocks = []) => innerBlocks.length === 1 && innerBlocks[0].name === "core/group";
  var migrateToConstrainedLayout = (attributes2) => {
    const { layout = null } = attributes2;
    if (!layout) {
      return attributes2;
    }
    const { inherit = null, contentSize = null, ...newLayout } = layout;
    if (inherit || contentSize) {
      return {
        ...attributes2,
        layout: {
          ...newLayout,
          contentSize,
          type: "constrained"
        }
      };
    }
    return attributes2;
  };
  var findPostTemplateBlock = (innerBlocks = []) => {
    let foundBlock = null;
    for (const block of innerBlocks) {
      if (block.name === "core/post-template") {
        foundBlock = block;
        break;
      } else if (block.innerBlocks.length) {
        foundBlock = findPostTemplateBlock(block.innerBlocks);
      }
    }
    return foundBlock;
  };
  var replacePostTemplateBlock = (innerBlocks = [], replacementBlock) => {
    innerBlocks.forEach((block, index) => {
      if (block.name === "core/post-template") {
        innerBlocks.splice(index, 1, replacementBlock);
      } else if (block.innerBlocks.length) {
        block.innerBlocks = replacePostTemplateBlock(
          block.innerBlocks,
          replacementBlock
        );
      }
    });
    return innerBlocks;
  };
  var migrateDisplayLayout = (attributes2, innerBlocks) => {
    const { displayLayout = null, ...newAttributes } = attributes2;
    if (!displayLayout) {
      return [attributes2, innerBlocks];
    }
    const postTemplateBlock = findPostTemplateBlock(innerBlocks);
    if (!postTemplateBlock) {
      return [attributes2, innerBlocks];
    }
    const { type, columns } = displayLayout;
    const updatedLayoutType = type === "flex" ? "grid" : "default";
    const newPostTemplateBlock = (0, import_blocks97.createBlock)(
      "core/post-template",
      {
        ...postTemplateBlock.attributes,
        layout: {
          type: updatedLayoutType,
          ...columns && { columnCount: columns }
        }
      },
      postTemplateBlock.innerBlocks
    );
    return [
      newAttributes,
      replacePostTemplateBlock(innerBlocks, newPostTemplateBlock)
    ];
  };
  var v136 = {
    attributes: {
      queryId: {
        type: "number"
      },
      query: {
        type: "object",
        default: {
          perPage: null,
          pages: 0,
          offset: 0,
          postType: "post",
          categoryIds: [],
          tagIds: [],
          order: "desc",
          orderBy: "date",
          author: "",
          search: "",
          exclude: [],
          sticky: "",
          inherit: true
        }
      },
      layout: {
        type: "object",
        default: {
          type: "list"
        }
      }
    },
    supports: {
      html: false
    },
    migrate(attributes2, innerBlocks) {
      const withTaxQuery = migrateToTaxQuery(attributes2);
      const { layout, ...restWithTaxQuery } = withTaxQuery;
      const newAttributes = {
        ...restWithTaxQuery,
        displayLayout: withTaxQuery.layout
      };
      return migrateDisplayLayout(newAttributes, innerBlocks);
    },
    save() {
      return /* @__PURE__ */ (0, import_jsx_runtime401.jsx)(import_block_editor213.InnerBlocks.Content, {});
    }
  };
  var v215 = {
    attributes: {
      queryId: {
        type: "number"
      },
      query: {
        type: "object",
        default: {
          perPage: null,
          pages: 0,
          offset: 0,
          postType: "post",
          categoryIds: [],
          tagIds: [],
          order: "desc",
          orderBy: "date",
          author: "",
          search: "",
          exclude: [],
          sticky: "",
          inherit: true
        }
      },
      tagName: {
        type: "string",
        default: "div"
      },
      displayLayout: {
        type: "object",
        default: {
          type: "list"
        }
      }
    },
    supports: {
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true,
        link: true
      },
      layout: true
    },
    isEligible: ({ query: { categoryIds, tagIds } = {} }) => categoryIds || tagIds,
    migrate(attributes2, innerBlocks) {
      const withTaxQuery = migrateToTaxQuery(attributes2);
      const [withColorAttributes, withColorInnerBlocks] = migrateColors(
        withTaxQuery,
        innerBlocks
      );
      const withConstrainedLayoutAttributes = migrateToConstrainedLayout(withColorAttributes);
      return migrateDisplayLayout(
        withConstrainedLayoutAttributes,
        withColorInnerBlocks
      );
    },
    save({ attributes: { tagName: Tag = "div" } }) {
      const blockProps = import_block_editor213.useBlockProps.save();
      const innerBlocksProps = import_block_editor213.useInnerBlocksProps.save(blockProps);
      return /* @__PURE__ */ (0, import_jsx_runtime401.jsx)(Tag, { ...innerBlocksProps });
    }
  };
  var v310 = {
    attributes: {
      queryId: {
        type: "number"
      },
      query: {
        type: "object",
        default: {
          perPage: null,
          pages: 0,
          offset: 0,
          postType: "post",
          order: "desc",
          orderBy: "date",
          author: "",
          search: "",
          exclude: [],
          sticky: "",
          inherit: true,
          taxQuery: null,
          parents: []
        }
      },
      tagName: {
        type: "string",
        default: "div"
      },
      displayLayout: {
        type: "object",
        default: {
          type: "list"
        }
      },
      namespace: {
        type: "string"
      }
    },
    supports: {
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      layout: true
    },
    isEligible(attributes2) {
      const { style: style2, backgroundColor, gradient, textColor } = attributes2;
      return backgroundColor || gradient || textColor || style2?.color || style2?.elements?.link;
    },
    migrate(attributes2, innerBlocks) {
      const [withColorAttributes, withColorInnerBlocks] = migrateColors(
        attributes2,
        innerBlocks
      );
      const withConstrainedLayoutAttributes = migrateToConstrainedLayout(withColorAttributes);
      return migrateDisplayLayout(
        withConstrainedLayoutAttributes,
        withColorInnerBlocks
      );
    },
    save({ attributes: { tagName: Tag = "div" } }) {
      const blockProps = import_block_editor213.useBlockProps.save();
      const innerBlocksProps = import_block_editor213.useInnerBlocksProps.save(blockProps);
      return /* @__PURE__ */ (0, import_jsx_runtime401.jsx)(Tag, { ...innerBlocksProps });
    }
  };
  var v49 = {
    attributes: {
      queryId: {
        type: "number"
      },
      query: {
        type: "object",
        default: {
          perPage: null,
          pages: 0,
          offset: 0,
          postType: "post",
          order: "desc",
          orderBy: "date",
          author: "",
          search: "",
          exclude: [],
          sticky: "",
          inherit: true,
          taxQuery: null,
          parents: []
        }
      },
      tagName: {
        type: "string",
        default: "div"
      },
      displayLayout: {
        type: "object",
        default: {
          type: "list"
        }
      },
      namespace: {
        type: "string"
      }
    },
    supports: {
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      layout: true
    },
    save({ attributes: { tagName: Tag = "div" } }) {
      const blockProps = import_block_editor213.useBlockProps.save();
      const innerBlocksProps = import_block_editor213.useInnerBlocksProps.save(blockProps);
      return /* @__PURE__ */ (0, import_jsx_runtime401.jsx)(Tag, { ...innerBlocksProps });
    },
    isEligible: ({ layout }) => layout?.inherit || layout?.contentSize && layout?.type !== "constrained",
    migrate(attributes2, innerBlocks) {
      const withConstrainedLayoutAttributes = migrateToConstrainedLayout(attributes2);
      return migrateDisplayLayout(
        withConstrainedLayoutAttributes,
        innerBlocks
      );
    }
  };
  var v58 = {
    attributes: {
      queryId: {
        type: "number"
      },
      query: {
        type: "object",
        default: {
          perPage: null,
          pages: 0,
          offset: 0,
          postType: "post",
          order: "desc",
          orderBy: "date",
          author: "",
          search: "",
          exclude: [],
          sticky: "",
          inherit: true,
          taxQuery: null,
          parents: []
        }
      },
      tagName: {
        type: "string",
        default: "div"
      },
      displayLayout: {
        type: "object",
        default: {
          type: "list"
        }
      },
      namespace: {
        type: "string"
      }
    },
    supports: {
      align: ["wide", "full"],
      anchor: true,
      html: false,
      layout: true
    },
    save({ attributes: { tagName: Tag = "div" } }) {
      const blockProps = import_block_editor213.useBlockProps.save();
      const innerBlocksProps = import_block_editor213.useInnerBlocksProps.save(blockProps);
      return /* @__PURE__ */ (0, import_jsx_runtime401.jsx)(Tag, { ...innerBlocksProps });
    },
    isEligible: ({ displayLayout }) => {
      return !!displayLayout;
    },
    migrate: migrateDisplayLayout
  };
  var v67 = {
    attributes: {
      queryId: {
        type: "number"
      },
      query: {
        type: "object",
        default: {
          perPage: null,
          pages: 0,
          offset: 0,
          postType: "post",
          order: "desc",
          orderBy: "date",
          author: "",
          search: "",
          exclude: [],
          sticky: "",
          inherit: true,
          taxQuery: null,
          parents: [],
          format: []
        }
      },
      tagName: {
        type: "string",
        default: "div"
      },
      namespace: {
        type: "string"
      },
      enhancedPagination: {
        type: "boolean",
        default: false
      }
    },
    supports: {
      align: ["wide", "full"],
      html: false,
      layout: true,
      interactivity: true,
      contentRole: true
    },
    save({ attributes: { tagName: Tag = "div" } }) {
      const blockProps = import_block_editor213.useBlockProps.save();
      const innerBlocksProps = import_block_editor213.useInnerBlocksProps.save(blockProps);
      return /* @__PURE__ */ (0, import_jsx_runtime401.jsx)(Tag, { ...innerBlocksProps });
    },
    isEligible: ({ query: { taxQuery } = {} }) => !!taxQuery && Object.keys(taxQuery).some(
      (key) => !["include", "exclude"].includes(key)
    ),
    migrate(attributes2, innerBlocks) {
      const withTaxQuery = migrateToTaxQuery(attributes2);
      return migrateDisplayLayout(withTaxQuery, innerBlocks);
    }
  };
  var deprecated14 = [v67, v58, v49, v310, v215, v136];
  var deprecated_default40 = deprecated14;

  // packages/block-library/build-module/query/index.mjs
  var { name: name84 } = block_default83;
  var settings83 = {
    icon: loop_default,
    edit: edit_default31,
    example: {
      viewportWidth: 650,
      attributes: {
        namespace: "core/posts-list",
        query: {
          perPage: 4,
          pages: 1,
          offset: 0,
          postType: "post",
          order: "desc",
          orderBy: "date",
          author: "",
          search: "",
          sticky: "exclude",
          inherit: false
        }
      },
      innerBlocks: [
        {
          name: "core/post-template",
          attributes: {
            layout: {
              type: "grid",
              columnCount: 2
            }
          },
          innerBlocks: [
            {
              name: "core/post-title"
            },
            {
              name: "core/post-date",
              attributes: {
                metadata: {
                  bindings: {
                    datetime: {
                      source: "core/post-data",
                      args: { field: "date" }
                    }
                  }
                }
              }
            },
            {
              name: "core/post-excerpt"
            }
          ]
        }
      ]
    },
    save: save41,
    variations: variations_default13,
    deprecated: deprecated_default40
  };
  var init83 = () => initBlock({ name: name84, metadata: block_default83, settings: settings83 });

  // packages/block-library/build-module/query-no-results/index.mjs
  var query_no_results_exports = {};
  __export(query_no_results_exports, {
    init: () => init84,
    metadata: () => block_default84,
    name: () => name85,
    settings: () => settings84
  });
  var import_i18n204 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/query-no-results/block.json
  var block_default84 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/query-no-results",
    title: "No Results",
    category: "theme",
    description: "Contains the block elements used to render content when no query results are found.",
    ancestor: ["core/query"],
    textdomain: "default",
    usesContext: ["queryId", "query"],
    supports: {
      anchor: true,
      align: true,
      reusable: false,
      html: false,
      color: {
        gradients: true,
        link: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    }
  };

  // packages/block-library/build-module/query-no-results/edit.mjs
  var import_block_editor214 = __toESM(require_block_editor(), 1);
  var import_i18n203 = __toESM(require_i18n(), 1);
  var import_jsx_runtime402 = __toESM(require_jsx_runtime(), 1);
  var TEMPLATE14 = [
    [
      "core/paragraph",
      {
        placeholder: (0, import_i18n203.__)(
          "Add text or blocks that will display when a query returns no results."
        )
      }
    ]
  ];
  function QueryNoResultsEdit() {
    const blockProps = (0, import_block_editor214.useBlockProps)();
    const innerBlocksProps = (0, import_block_editor214.useInnerBlocksProps)(blockProps, {
      template: TEMPLATE14
    });
    return /* @__PURE__ */ (0, import_jsx_runtime402.jsx)("div", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/query-no-results/save.mjs
  var import_block_editor215 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime403 = __toESM(require_jsx_runtime(), 1);
  function save42() {
    return /* @__PURE__ */ (0, import_jsx_runtime403.jsx)(import_block_editor215.InnerBlocks.Content, {});
  }

  // packages/block-library/build-module/query-no-results/index.mjs
  var { name: name85 } = block_default84;
  var settings84 = {
    icon: loop_default,
    edit: QueryNoResultsEdit,
    save: save42,
    example: {
      innerBlocks: [
        {
          name: "core/paragraph",
          attributes: {
            content: (0, import_i18n204.__)("No posts were found.")
          }
        }
      ]
    }
  };
  var init84 = () => initBlock({ name: name85, metadata: block_default84, settings: settings84 });

  // packages/block-library/build-module/query-pagination/index.mjs
  var query_pagination_exports = {};
  __export(query_pagination_exports, {
    init: () => init85,
    metadata: () => block_default85,
    name: () => name86,
    settings: () => settings85
  });

  // packages/block-library/build-module/query-pagination/block.json
  var block_default85 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/query-pagination",
    title: "Pagination",
    category: "theme",
    ancestor: ["core/query"],
    allowedBlocks: [
      "core/query-pagination-previous",
      "core/query-pagination-numbers",
      "core/query-pagination-next"
    ],
    description: "Displays a paginated navigation to next/previous set of posts, when applicable.",
    textdomain: "default",
    attributes: {
      paginationArrow: {
        type: "string",
        default: "none"
      },
      showLabel: {
        type: "boolean",
        default: true
      }
    },
    usesContext: ["queryId", "query"],
    providesContext: {
      paginationArrow: "paginationArrow",
      showLabel: "showLabel"
    },
    supports: {
      anchor: true,
      align: true,
      reusable: false,
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      layout: {
        allowSwitching: false,
        allowInheriting: false,
        default: {
          type: "flex"
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-query-pagination-editor",
    style: "wp-block-query-pagination"
  };

  // packages/block-library/build-module/query-pagination/edit.mjs
  var import_i18n207 = __toESM(require_i18n(), 1);
  var import_block_editor216 = __toESM(require_block_editor(), 1);
  var import_data124 = __toESM(require_data(), 1);
  var import_components136 = __toESM(require_components(), 1);
  var import_element112 = __toESM(require_element(), 1);

  // packages/block-library/build-module/query-pagination/query-pagination-arrow-controls.mjs
  var import_i18n205 = __toESM(require_i18n(), 1);
  var import_components134 = __toESM(require_components(), 1);
  var import_jsx_runtime404 = __toESM(require_jsx_runtime(), 1);
  function QueryPaginationArrowControls({ value, onChange }) {
    return /* @__PURE__ */ (0, import_jsx_runtime404.jsxs)(
      import_components134.__experimentalToggleGroupControl,
      {
        __next40pxDefaultSize: true,
        label: (0, import_i18n205.__)("Arrow"),
        value,
        onChange,
        help: (0, import_i18n205.__)(
          "A decorative arrow appended to the next and previous page link."
        ),
        isBlock: true,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
            import_components134.__experimentalToggleGroupControlOption,
            {
              value: "none",
              label: (0, import_i18n205._x)(
                "None",
                "Arrow option for Query Pagination Next/Previous blocks"
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
            import_components134.__experimentalToggleGroupControlOption,
            {
              value: "arrow",
              label: (0, import_i18n205._x)(
                "Arrow",
                "Arrow option for Query Pagination Next/Previous blocks"
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
            import_components134.__experimentalToggleGroupControlOption,
            {
              value: "chevron",
              label: (0, import_i18n205._x)(
                "Chevron",
                "Arrow option for Query Pagination Next/Previous blocks"
              )
            }
          )
        ]
      }
    );
  }

  // packages/block-library/build-module/query-pagination/query-pagination-label-control.mjs
  var import_i18n206 = __toESM(require_i18n(), 1);
  var import_components135 = __toESM(require_components(), 1);
  var import_jsx_runtime405 = __toESM(require_jsx_runtime(), 1);
  function QueryPaginationLabelControl({ value, onChange }) {
    return /* @__PURE__ */ (0, import_jsx_runtime405.jsx)(
      import_components135.ToggleControl,
      {
        label: (0, import_i18n206.__)("Show label text"),
        help: (0, import_i18n206.__)('Make label text visible, e.g. "Next Page".'),
        onChange,
        checked: value === true
      }
    );
  }

  // packages/block-library/build-module/query-pagination/edit.mjs
  var import_jsx_runtime406 = __toESM(require_jsx_runtime(), 1);
  var TEMPLATE15 = [
    ["core/query-pagination-previous"],
    ["core/query-pagination-numbers"],
    ["core/query-pagination-next"]
  ];
  function QueryPaginationEdit2({
    attributes: { paginationArrow, showLabel },
    setAttributes,
    clientId
  }) {
    const hasNextPreviousBlocks = (0, import_data124.useSelect)(
      (select9) => {
        const { getBlocks } = select9(import_block_editor216.store);
        const innerBlocks = getBlocks(clientId);
        return innerBlocks?.find((innerBlock) => {
          return [
            "core/query-pagination-next",
            "core/query-pagination-previous"
          ].includes(innerBlock.name);
        });
      },
      [clientId]
    );
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data124.useDispatch)(import_block_editor216.store);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const blockProps = (0, import_block_editor216.useBlockProps)();
    const innerBlocksProps = (0, import_block_editor216.useInnerBlocksProps)(blockProps, {
      template: TEMPLATE15
    });
    (0, import_element112.useEffect)(() => {
      if (paginationArrow === "none" && !showLabel) {
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({ showLabel: true });
      }
    }, [
      paginationArrow,
      setAttributes,
      showLabel,
      __unstableMarkNextChangeAsNotPersistent
    ]);
    return /* @__PURE__ */ (0, import_jsx_runtime406.jsxs)(import_jsx_runtime406.Fragment, { children: [
      hasNextPreviousBlocks && /* @__PURE__ */ (0, import_jsx_runtime406.jsx)(import_block_editor216.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime406.jsxs)(
        import_components136.__experimentalToolsPanel,
        {
          label: (0, import_i18n207.__)("Settings"),
          resetAll: () => {
            setAttributes({
              paginationArrow: "none",
              showLabel: true
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime406.jsx)(
              import_components136.__experimentalToolsPanelItem,
              {
                hasValue: () => paginationArrow !== "none",
                label: (0, import_i18n207.__)("Pagination arrow"),
                onDeselect: () => setAttributes({ paginationArrow: "none" }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime406.jsx)(
                  QueryPaginationArrowControls,
                  {
                    value: paginationArrow,
                    onChange: (value) => {
                      setAttributes({ paginationArrow: value });
                    }
                  }
                )
              }
            ),
            paginationArrow !== "none" && /* @__PURE__ */ (0, import_jsx_runtime406.jsx)(
              import_components136.__experimentalToolsPanelItem,
              {
                hasValue: () => !showLabel,
                label: (0, import_i18n207.__)("Show text"),
                onDeselect: () => setAttributes({ showLabel: true }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime406.jsx)(
                  QueryPaginationLabelControl,
                  {
                    value: showLabel,
                    onChange: (value) => {
                      setAttributes({ showLabel: value });
                    }
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime406.jsx)("nav", { ...innerBlocksProps })
    ] });
  }

  // packages/block-library/build-module/query-pagination/save.mjs
  var import_block_editor217 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime407 = __toESM(require_jsx_runtime(), 1);
  function save43() {
    return /* @__PURE__ */ (0, import_jsx_runtime407.jsx)(import_block_editor217.InnerBlocks.Content, {});
  }

  // packages/block-library/build-module/query-pagination/deprecated.mjs
  var import_block_editor218 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime408 = __toESM(require_jsx_runtime(), 1);
  var deprecated15 = [
    // Version with wrapper `div` element.
    {
      save() {
        return /* @__PURE__ */ (0, import_jsx_runtime408.jsx)("div", { ...import_block_editor218.useBlockProps.save(), children: /* @__PURE__ */ (0, import_jsx_runtime408.jsx)(import_block_editor218.InnerBlocks.Content, {}) });
      }
    }
  ];
  var deprecated_default41 = deprecated15;

  // packages/block-library/build-module/query-pagination/index.mjs
  var { name: name86 } = block_default85;
  var settings85 = {
    icon: query_pagination_default,
    edit: QueryPaginationEdit2,
    save: save43,
    deprecated: deprecated_default41
  };
  var init85 = () => initBlock({ name: name86, metadata: block_default85, settings: settings85 });

  // packages/block-library/build-module/query-pagination-next/index.mjs
  var query_pagination_next_exports = {};
  __export(query_pagination_next_exports, {
    init: () => init86,
    metadata: () => block_default86,
    name: () => name87,
    settings: () => settings86
  });

  // packages/block-library/build-module/query-pagination-next/block.json
  var block_default86 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/query-pagination-next",
    title: "Next Page",
    category: "theme",
    parent: ["core/query-pagination"],
    description: "Displays the next posts page link.",
    textdomain: "default",
    attributes: {
      label: {
        type: "string"
      }
    },
    usesContext: [
      "queryId",
      "query",
      "paginationArrow",
      "showLabel",
      "enhancedPagination"
    ],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      color: {
        gradients: true,
        text: false,
        __experimentalDefaultControls: {
          background: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    }
  };

  // packages/block-library/build-module/query-pagination-next/edit.mjs
  var import_i18n208 = __toESM(require_i18n(), 1);
  var import_block_editor219 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime409 = __toESM(require_jsx_runtime(), 1);
  var arrowMap3 = {
    none: "",
    arrow: "\u2192",
    chevron: "\xBB"
  };
  function QueryPaginationNextEdit({
    attributes: { label },
    setAttributes,
    context: { paginationArrow, showLabel }
  }) {
    const displayArrow = arrowMap3[paginationArrow];
    return /* @__PURE__ */ (0, import_jsx_runtime409.jsxs)(
      "a",
      {
        href: "#pagination-next-pseudo-link",
        onClick: (event) => event.preventDefault(),
        ...(0, import_block_editor219.useBlockProps)(),
        children: [
          showLabel && /* @__PURE__ */ (0, import_jsx_runtime409.jsx)(
            import_block_editor219.PlainText,
            {
              __experimentalVersion: 2,
              tagName: "span",
              "aria-label": (0, import_i18n208.__)("Next page link"),
              placeholder: (0, import_i18n208.__)("Next Page"),
              value: label,
              onChange: (newLabel) => setAttributes({ label: newLabel })
            }
          ),
          displayArrow && /* @__PURE__ */ (0, import_jsx_runtime409.jsx)(
            "span",
            {
              className: `wp-block-query-pagination-next-arrow is-arrow-${paginationArrow}`,
              "aria-hidden": true,
              children: displayArrow
            }
          )
        ]
      }
    );
  }

  // packages/block-library/build-module/query-pagination-next/index.mjs
  var { name: name87 } = block_default86;
  var settings86 = {
    icon: query_pagination_next_default,
    edit: QueryPaginationNextEdit
  };
  var init86 = () => initBlock({ name: name87, metadata: block_default86, settings: settings86 });

  // packages/block-library/build-module/query-pagination-numbers/index.mjs
  var query_pagination_numbers_exports = {};
  __export(query_pagination_numbers_exports, {
    init: () => init87,
    metadata: () => block_default87,
    name: () => name88,
    settings: () => settings87
  });

  // packages/block-library/build-module/query-pagination-numbers/block.json
  var block_default87 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/query-pagination-numbers",
    title: "Page Numbers",
    category: "theme",
    parent: ["core/query-pagination"],
    description: "Displays a list of page numbers for pagination.",
    textdomain: "default",
    attributes: {
      midSize: {
        type: "number",
        default: 2
      }
    },
    usesContext: ["queryId", "query", "enhancedPagination"],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      color: {
        gradients: true,
        text: false,
        __experimentalDefaultControls: {
          background: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-query-pagination-numbers-editor"
  };

  // packages/block-library/build-module/query-pagination-numbers/edit.mjs
  var import_i18n209 = __toESM(require_i18n(), 1);
  var import_block_editor220 = __toESM(require_block_editor(), 1);
  var import_components137 = __toESM(require_components(), 1);
  var import_jsx_runtime410 = __toESM(require_jsx_runtime(), 1);
  var createPaginationItem = (content, Tag = "a", extraClass = "") => /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(Tag, { className: `page-numbers ${extraClass}`, children: content }, content);
  var previewPaginationNumbers = (midSize) => {
    const paginationItems = [];
    for (let i2 = 1; i2 <= midSize; i2++) {
      paginationItems.push(createPaginationItem(i2));
    }
    paginationItems.push(
      createPaginationItem(midSize + 1, "span", "current")
    );
    for (let i2 = 1; i2 <= midSize; i2++) {
      paginationItems.push(createPaginationItem(midSize + 1 + i2));
    }
    paginationItems.push(createPaginationItem("...", "span", "dots"));
    paginationItems.push(createPaginationItem(midSize * 2 + 3));
    return /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(import_jsx_runtime410.Fragment, { children: paginationItems });
  };
  function QueryPaginationNumbersEdit({
    attributes: attributes2,
    setAttributes
  }) {
    const { midSize } = attributes2;
    const paginationNumbers = previewPaginationNumbers(
      parseInt(midSize, 10)
    );
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime410.jsxs)(import_jsx_runtime410.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(import_block_editor220.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(
        import_components137.__experimentalToolsPanel,
        {
          label: (0, import_i18n209.__)("Settings"),
          resetAll: () => setAttributes({ midSize: 2 }),
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(
            import_components137.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n209.__)("Number of links"),
              hasValue: () => midSize !== 2,
              onDeselect: () => setAttributes({ midSize: 2 }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(
                import_components137.RangeControl,
                {
                  __next40pxDefaultSize: true,
                  label: (0, import_i18n209.__)("Number of links"),
                  help: (0, import_i18n209.__)(
                    "Specify how many links can appear before and after the current page number. Links to the first, current and last page are always visible."
                  ),
                  value: midSize,
                  onChange: (value) => {
                    setAttributes({
                      midSize: parseInt(value, 10)
                    });
                  },
                  min: 0,
                  max: 5,
                  withInputField: false
                }
              )
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime410.jsx)("div", { ...(0, import_block_editor220.useBlockProps)(), children: paginationNumbers })
    ] });
  }

  // packages/block-library/build-module/query-pagination-numbers/index.mjs
  var { name: name88 } = block_default87;
  var settings87 = {
    icon: query_pagination_numbers_default,
    edit: QueryPaginationNumbersEdit,
    example: {}
  };
  var init87 = () => initBlock({ name: name88, metadata: block_default87, settings: settings87 });

  // packages/block-library/build-module/query-pagination-previous/index.mjs
  var query_pagination_previous_exports = {};
  __export(query_pagination_previous_exports, {
    init: () => init88,
    metadata: () => block_default88,
    name: () => name89,
    settings: () => settings88
  });

  // packages/block-library/build-module/query-pagination-previous/block.json
  var block_default88 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/query-pagination-previous",
    title: "Previous Page",
    category: "theme",
    parent: ["core/query-pagination"],
    description: "Displays the previous posts page link.",
    textdomain: "default",
    attributes: {
      label: {
        type: "string"
      }
    },
    usesContext: [
      "queryId",
      "query",
      "paginationArrow",
      "showLabel",
      "enhancedPagination"
    ],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      color: {
        gradients: true,
        text: false,
        __experimentalDefaultControls: {
          background: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    }
  };

  // packages/block-library/build-module/query-pagination-previous/edit.mjs
  var import_i18n210 = __toESM(require_i18n(), 1);
  var import_block_editor221 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime411 = __toESM(require_jsx_runtime(), 1);
  var arrowMap4 = {
    none: "",
    arrow: "\u2190",
    chevron: "\xAB"
  };
  function QueryPaginationPreviousEdit({
    attributes: { label },
    setAttributes,
    context: { paginationArrow, showLabel }
  }) {
    const displayArrow = arrowMap4[paginationArrow];
    return /* @__PURE__ */ (0, import_jsx_runtime411.jsxs)(
      "a",
      {
        href: "#pagination-previous-pseudo-link",
        onClick: (event) => event.preventDefault(),
        ...(0, import_block_editor221.useBlockProps)(),
        children: [
          displayArrow && /* @__PURE__ */ (0, import_jsx_runtime411.jsx)(
            "span",
            {
              className: `wp-block-query-pagination-previous-arrow is-arrow-${paginationArrow}`,
              "aria-hidden": true,
              children: displayArrow
            }
          ),
          showLabel && /* @__PURE__ */ (0, import_jsx_runtime411.jsx)(
            import_block_editor221.PlainText,
            {
              __experimentalVersion: 2,
              tagName: "span",
              "aria-label": (0, import_i18n210.__)("Previous page link"),
              placeholder: (0, import_i18n210.__)("Previous Page"),
              value: label,
              onChange: (newLabel) => setAttributes({ label: newLabel })
            }
          )
        ]
      }
    );
  }

  // packages/block-library/build-module/query-pagination-previous/index.mjs
  var { name: name89 } = block_default88;
  var settings88 = {
    icon: query_pagination_previous_default,
    edit: QueryPaginationPreviousEdit
  };
  var init88 = () => initBlock({ name: name89, metadata: block_default88, settings: settings88 });

  // packages/block-library/build-module/query-title/index.mjs
  var query_title_exports = {};
  __export(query_title_exports, {
    init: () => init89,
    metadata: () => block_default89,
    name: () => name90,
    settings: () => settings89
  });

  // packages/block-library/build-module/query-title/block.json
  var block_default89 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/query-title",
    title: "Query Title",
    category: "theme",
    description: "Display the query title.",
    textdomain: "default",
    attributes: {
      type: {
        type: "string"
      },
      textAlign: {
        type: "string"
      },
      level: {
        type: "number",
        default: 1
      },
      levelOptions: {
        type: "array"
      },
      showPrefix: {
        type: "boolean",
        default: true
      },
      showSearchTerm: {
        type: "boolean",
        default: true
      }
    },
    example: {
      attributes: {
        type: "search"
      }
    },
    usesContext: ["query"],
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-query-title"
  };

  // packages/block-library/build-module/query-title/edit.mjs
  var import_block_editor222 = __toESM(require_block_editor(), 1);
  var import_components138 = __toESM(require_components(), 1);
  var import_i18n211 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/query-title/use-archive-label.mjs
  var import_core_data75 = __toESM(require_core_data(), 1);
  var import_data125 = __toESM(require_data(), 1);
  function useArchiveLabel() {
    const templateSlug = (0, import_data125.useSelect)((select9) => {
      const { getCurrentPostId, getCurrentPostType, getCurrentTemplateId } = select9("core/editor");
      const currentPostType = getCurrentPostType();
      const templateId = getCurrentTemplateId() || (currentPostType === "wp_template" ? getCurrentPostId() : null);
      return templateId ? select9(import_core_data75.store).getEditedEntityRecord(
        "postType",
        "wp_template",
        templateId
      )?.slug : null;
    }, []);
    const taxonomyMatches = templateSlug?.match(
      /^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/
    );
    let taxonomy;
    let term;
    let isAuthor = false;
    let authorSlug;
    if (taxonomyMatches) {
      if (taxonomyMatches[1]) {
        taxonomy = taxonomyMatches[2] ? taxonomyMatches[2] : taxonomyMatches[1];
      } else if (taxonomyMatches[3]) {
        taxonomy = taxonomyMatches[6] ? taxonomyMatches[6] : taxonomyMatches[4];
        term = taxonomyMatches[7];
      }
      taxonomy = taxonomy === "tag" ? "post_tag" : taxonomy;
    } else {
      const authorMatches = templateSlug?.match(/^(author)$|^author-(.+)$/);
      if (authorMatches) {
        isAuthor = true;
        if (authorMatches[2]) {
          authorSlug = authorMatches[2];
        }
      }
    }
    return (0, import_data125.useSelect)(
      (select9) => {
        const { getEntityRecords, getTaxonomy, getAuthors } = select9(import_core_data75.store);
        let archiveTypeLabel;
        let archiveNameLabel;
        if (taxonomy) {
          archiveTypeLabel = getTaxonomy(taxonomy)?.labels?.singular_name;
        }
        if (term) {
          const records = getEntityRecords("taxonomy", taxonomy, {
            slug: term,
            per_page: 1
          });
          if (records && records[0]) {
            archiveNameLabel = records[0].name;
          }
        }
        if (isAuthor) {
          archiveTypeLabel = "Author";
          if (authorSlug) {
            const authorRecords = getAuthors({ slug: authorSlug });
            if (authorRecords && authorRecords[0]) {
              archiveNameLabel = authorRecords[0].name;
            }
          }
        }
        return {
          archiveTypeLabel,
          archiveNameLabel
        };
      },
      [authorSlug, isAuthor, taxonomy, term]
    );
  }

  // packages/block-library/build-module/query-title/use-post-type-label.mjs
  var import_core_data76 = __toESM(require_core_data(), 1);
  var import_data126 = __toESM(require_data(), 1);
  function usePostTypeLabel(contextPostType) {
    const currentPostType = (0, import_data126.useSelect)((select9) => {
      const { getCurrentPostType } = select9("core/editor");
      return getCurrentPostType();
    }, []);
    return (0, import_data126.useSelect)(
      (select9) => {
        const { getPostType } = select9(import_core_data76.store);
        const postTypeSlug = contextPostType || currentPostType;
        const postType = getPostType(postTypeSlug);
        return {
          postTypeLabel: postType ? postType.labels.singular_name : ""
        };
      },
      [contextPostType, currentPostType]
    );
  }

  // packages/block-library/build-module/query-title/edit.mjs
  var import_jsx_runtime412 = __toESM(require_jsx_runtime(), 1);
  var SUPPORTED_TYPES = ["archive", "search", "post-type"];
  function QueryTitleEdit({
    attributes: {
      type,
      level,
      levelOptions,
      textAlign,
      showPrefix,
      showSearchTerm
    },
    setAttributes,
    context: { query }
  }) {
    const { archiveTypeLabel, archiveNameLabel } = useArchiveLabel();
    const { postTypeLabel } = usePostTypeLabel(query?.postType);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const TagName2 = level === 0 ? "p" : `h${level}`;
    const blockProps = (0, import_block_editor222.useBlockProps)({
      className: clsx_default("wp-block-query-title__placeholder", {
        [`has-text-align-${textAlign}`]: textAlign
      })
    });
    if (!SUPPORTED_TYPES.includes(type)) {
      return /* @__PURE__ */ (0, import_jsx_runtime412.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(import_block_editor222.Warning, { children: (0, import_i18n211.__)("Provided type is not supported.") }) });
    }
    let titleElement;
    if (type === "archive") {
      let title;
      if (archiveTypeLabel) {
        if (showPrefix) {
          if (archiveNameLabel) {
            title = (0, import_i18n211.sprintf)(
              /* translators: 1: Archive type title e.g: "Category", 2: Label of the archive e.g: "Shoes" */
              (0, import_i18n211._x)("%1$s: %2$s", "archive label"),
              archiveTypeLabel,
              archiveNameLabel
            );
          } else {
            title = (0, import_i18n211.sprintf)(
              /* translators: %s: Archive type title e.g: "Category", "Tag"... */
              (0, import_i18n211.__)("%s: Name"),
              archiveTypeLabel
            );
          }
        } else if (archiveNameLabel) {
          title = archiveNameLabel;
        } else {
          title = (0, import_i18n211.sprintf)(
            /* translators: %s: Archive type title e.g: "Category", "Tag"... */
            (0, import_i18n211.__)("%s name"),
            archiveTypeLabel
          );
        }
      } else {
        title = showPrefix ? (0, import_i18n211.__)("Archive type: Name") : (0, import_i18n211.__)("Archive title");
      }
      titleElement = /* @__PURE__ */ (0, import_jsx_runtime412.jsxs)(import_jsx_runtime412.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(import_block_editor222.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(
          import_components138.__experimentalToolsPanel,
          {
            label: (0, import_i18n211.__)("Settings"),
            resetAll: () => setAttributes({
              showPrefix: true
            }),
            dropdownMenuProps,
            children: /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(
              import_components138.__experimentalToolsPanelItem,
              {
                hasValue: () => !showPrefix,
                label: (0, import_i18n211.__)("Show archive type in title"),
                onDeselect: () => setAttributes({ showPrefix: true }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(
                  import_components138.ToggleControl,
                  {
                    label: (0, import_i18n211.__)("Show archive type in title"),
                    onChange: () => setAttributes({
                      showPrefix: !showPrefix
                    }),
                    checked: showPrefix
                  }
                )
              }
            )
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(TagName2, { ...blockProps, children: title })
      ] });
    }
    if (type === "search") {
      titleElement = /* @__PURE__ */ (0, import_jsx_runtime412.jsxs)(import_jsx_runtime412.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(import_block_editor222.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(
          import_components138.__experimentalToolsPanel,
          {
            label: (0, import_i18n211.__)("Settings"),
            resetAll: () => setAttributes({
              showSearchTerm: true
            }),
            dropdownMenuProps,
            children: /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(
              import_components138.__experimentalToolsPanelItem,
              {
                hasValue: () => !showSearchTerm,
                label: (0, import_i18n211.__)("Show search term in title"),
                onDeselect: () => setAttributes({ showSearchTerm: true }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(
                  import_components138.ToggleControl,
                  {
                    label: (0, import_i18n211.__)("Show search term in title"),
                    onChange: () => setAttributes({
                      showSearchTerm: !showSearchTerm
                    }),
                    checked: showSearchTerm
                  }
                )
              }
            )
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(TagName2, { ...blockProps, children: showSearchTerm ? (0, import_i18n211.__)("Search results for: \u201Csearch term\u201D") : (0, import_i18n211.__)("Search results") })
      ] });
    }
    if (type === "post-type") {
      let title;
      if (postTypeLabel) {
        if (showPrefix) {
          title = (0, import_i18n211.sprintf)(
            /* translators: %s: Singular post type name of the queried object */
            (0, import_i18n211.__)('Post Type: "%s"'),
            postTypeLabel
          );
        } else {
          title = postTypeLabel;
        }
      } else {
        title = showPrefix ? (0, import_i18n211.__)("Post Type: Name") : (0, import_i18n211.__)("Name");
      }
      titleElement = /* @__PURE__ */ (0, import_jsx_runtime412.jsxs)(import_jsx_runtime412.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(import_block_editor222.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(
          import_components138.__experimentalToolsPanel,
          {
            label: (0, import_i18n211.__)("Settings"),
            resetAll: () => setAttributes({
              showPrefix: true
            }),
            dropdownMenuProps,
            children: /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(
              import_components138.__experimentalToolsPanelItem,
              {
                hasValue: () => !showPrefix,
                label: (0, import_i18n211.__)("Show post type label"),
                onDeselect: () => setAttributes({ showPrefix: true }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(
                  import_components138.ToggleControl,
                  {
                    label: (0, import_i18n211.__)("Show post type label"),
                    onChange: () => setAttributes({
                      showPrefix: !showPrefix
                    }),
                    checked: showPrefix
                  }
                )
              }
            )
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(TagName2, { ...blockProps, children: title })
      ] });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime412.jsxs)(import_jsx_runtime412.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime412.jsxs)(import_block_editor222.BlockControls, { group: "block", children: [
        /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(
          import_block_editor222.HeadingLevelDropdown,
          {
            value: level,
            options: levelOptions,
            onChange: (newLevel) => setAttributes({ level: newLevel })
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(
          import_block_editor222.AlignmentControl,
          {
            value: textAlign,
            onChange: (nextAlign) => {
              setAttributes({ textAlign: nextAlign });
            }
          }
        )
      ] }),
      titleElement
    ] });
  }

  // packages/block-library/build-module/query-title/variations.mjs
  var import_i18n212 = __toESM(require_i18n(), 1);
  var variations14 = [
    {
      isDefault: true,
      name: "archive-title",
      title: (0, import_i18n212.__)("Archive Title"),
      description: (0, import_i18n212.__)(
        "Display the archive title based on the queried object."
      ),
      icon: title_default,
      attributes: {
        type: "archive"
      },
      scope: ["inserter"]
    },
    {
      isDefault: false,
      name: "search-title",
      title: (0, import_i18n212.__)("Search Results Title"),
      description: (0, import_i18n212.__)(
        "Display the search results title based on the queried object."
      ),
      icon: title_default,
      attributes: {
        type: "search"
      },
      scope: ["inserter"]
    },
    {
      isDefault: false,
      name: "post-type-label",
      title: (0, import_i18n212.__)("Post Type Label"),
      description: (0, import_i18n212.__)(
        "Display the post type label based on the queried object."
      ),
      icon: title_default,
      attributes: {
        type: "post-type"
      },
      scope: ["inserter"]
    }
  ];
  variations14.forEach((variation) => {
    if (variation.isActive) {
      return;
    }
    variation.isActive = (blockAttributes8, variationAttributes) => blockAttributes8.type === variationAttributes.type;
  });
  var variations_default14 = variations14;

  // packages/block-library/build-module/query-title/deprecated.mjs
  var v137 = {
    attributes: {
      type: {
        type: "string"
      },
      textAlign: {
        type: "string"
      },
      level: {
        type: "number",
        default: 1
      }
    },
    supports: {
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true
      },
      spacing: {
        margin: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true
      }
    },
    save() {
      return null;
    },
    migrate: migrate_font_family_default,
    isEligible({ style: style2 }) {
      return style2?.typography?.fontFamily;
    }
  };
  var deprecated_default42 = [v137];

  // packages/block-library/build-module/query-title/index.mjs
  var { name: name90 } = block_default89;
  var settings89 = {
    icon: title_default,
    edit: QueryTitleEdit,
    variations: variations_default14,
    deprecated: deprecated_default42
  };
  var init89 = () => initBlock({ name: name90, metadata: block_default89, settings: settings89 });

  // packages/block-library/build-module/query-total/index.mjs
  var query_total_exports = {};
  __export(query_total_exports, {
    init: () => init90,
    metadata: () => block_default90,
    name: () => name91,
    settings: () => settings90
  });

  // packages/block-library/build-module/query-total/block.json
  var block_default90 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/query-total",
    title: "Query Total",
    category: "theme",
    ancestor: ["core/query"],
    description: "Display the total number of results in a query.",
    textdomain: "default",
    attributes: {
      displayType: {
        type: "string",
        default: "total-results"
      }
    },
    usesContext: ["queryId", "query"],
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      spacing: {
        margin: true,
        padding: true
      },
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    style: "wp-block-query-total"
  };

  // packages/block-library/build-module/query-total/edit.mjs
  var import_block_editor223 = __toESM(require_block_editor(), 1);
  var import_components140 = __toESM(require_components(), 1);
  var import_i18n213 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/query-total/icons.mjs
  var import_components139 = __toESM(require_components(), 1);
  var import_jsx_runtime413 = __toESM(require_jsx_runtime(), 1);
  var resultsFound = /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(
    import_components139.SVG,
    {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24",
      width: "24",
      height: "24",
      "aria-hidden": "true",
      focusable: "false",
      children: /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(import_components139.Path, { d: "M4 11h4v2H4v-2zm6 0h6v2h-6v-2zm8 0h2v2h-2v-2z" })
    }
  );
  var displayingResults = /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(
    import_components139.SVG,
    {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24",
      width: "24",
      height: "24",
      "aria-hidden": "true",
      focusable: "false",
      children: /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(import_components139.Path, { d: "M4 13h2v-2H4v2zm4 0h10v-2H8v2zm12 0h2v-2h-2v2z" })
    }
  );
  var queryTotal = /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(
    import_components139.SVG,
    {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24",
      width: "24",
      height: "24",
      "aria-hidden": "true",
      focusable: "false",
      children: /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(import_components139.Path, { d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2Zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12Zm-7-6-4.1 5h8.8v-3h-1.5v1.5h-4.2l2.9-3.5-2.9-3.5h4.2V10h1.5V7H7.4l4.1 5Z" })
    }
  );

  // packages/block-library/build-module/query-total/edit.mjs
  var import_jsx_runtime414 = __toESM(require_jsx_runtime(), 1);
  function QueryTotalEdit({ attributes: attributes2, setAttributes }) {
    const { displayType } = attributes2;
    const blockProps = (0, import_block_editor223.useBlockProps)();
    const getButtonPositionIcon = () => {
      switch (displayType) {
        case "total-results":
          return resultsFound;
        case "range-display":
          return displayingResults;
      }
    };
    const buttonPositionControls = [
      {
        role: "menuitemradio",
        title: (0, import_i18n213.__)("Total results"),
        isActive: displayType === "total-results",
        icon: resultsFound,
        onClick: () => {
          setAttributes({ displayType: "total-results" });
        }
      },
      {
        role: "menuitemradio",
        title: (0, import_i18n213.__)("Range display"),
        isActive: displayType === "range-display",
        icon: displayingResults,
        onClick: () => {
          setAttributes({ displayType: "range-display" });
        }
      }
    ];
    const controls = /* @__PURE__ */ (0, import_jsx_runtime414.jsx)(import_block_editor223.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime414.jsx)(import_components140.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime414.jsx)(
      import_components140.ToolbarDropdownMenu,
      {
        icon: getButtonPositionIcon(),
        label: (0, import_i18n213.__)("Change display type"),
        controls: buttonPositionControls
      }
    ) }) });
    const renderDisplay = () => {
      if (displayType === "total-results") {
        return /* @__PURE__ */ (0, import_jsx_runtime414.jsx)(import_jsx_runtime414.Fragment, { children: (0, import_i18n213.__)("12 results found") });
      }
      if (displayType === "range-display") {
        return /* @__PURE__ */ (0, import_jsx_runtime414.jsx)(import_jsx_runtime414.Fragment, { children: (0, import_i18n213.__)("Displaying 1 \u2013 10 of 12") });
      }
      return null;
    };
    return /* @__PURE__ */ (0, import_jsx_runtime414.jsxs)("div", { ...blockProps, children: [
      controls,
      renderDisplay()
    ] });
  }

  // packages/block-library/build-module/query-total/index.mjs
  var { name: name91 } = block_default90;
  var settings90 = {
    icon: queryTotal,
    edit: QueryTotalEdit
  };
  var init90 = () => initBlock({ name: name91, metadata: block_default90, settings: settings90 });

  // packages/block-library/build-module/quote/index.mjs
  var quote_exports = {};
  __export(quote_exports, {
    init: () => init91,
    metadata: () => block_default91,
    name: () => name92,
    settings: () => settings91
  });
  var import_i18n215 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/quote/deprecated.mjs
  var import_blocks98 = __toESM(require_blocks(), 1);
  var import_block_editor224 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime415 = __toESM(require_jsx_runtime(), 1);
  var migrateToQuoteV2 = (attributes2) => {
    const { value, ...restAttributes } = attributes2;
    return [
      {
        ...restAttributes
      },
      value ? (0, import_blocks98.parseWithAttributeSchema)(value, {
        type: "array",
        source: "query",
        selector: "p",
        query: {
          content: {
            type: "string",
            source: "html"
          }
        }
      }).map(
        ({ content }) => (0, import_blocks98.createBlock)("core/paragraph", { content })
      ) : (0, import_blocks98.createBlock)("core/paragraph")
    ];
  };
  var TEXT_ALIGN_OPTIONS2 = ["left", "right", "center"];
  var migrateTextAlign3 = (attributes2, innerBlocks) => {
    const { align, ...rest } = attributes2;
    const migratedAttributes = TEXT_ALIGN_OPTIONS2.includes(align) ? { ...rest, textAlign: align } : attributes2;
    return [migratedAttributes, innerBlocks];
  };
  var migrateLargeStyle = (attributes2, innerBlocks) => {
    return [
      {
        ...attributes2,
        className: attributes2.className ? attributes2.className + " is-style-large" : "is-style-large"
      },
      innerBlocks
    ];
  };
  var v410 = {
    attributes: {
      value: {
        type: "string",
        source: "html",
        selector: "blockquote",
        multiline: "p",
        default: "",
        role: "content"
      },
      citation: {
        type: "string",
        source: "html",
        selector: "cite",
        default: "",
        role: "content"
      },
      align: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      html: false,
      __experimentalOnEnter: true,
      __experimentalOnMerge: true,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true,
          fontAppearance: true
        }
      },
      color: {
        gradients: true,
        heading: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      }
    },
    isEligible: ({ align }) => TEXT_ALIGN_OPTIONS2.includes(align),
    save({ attributes: attributes2 }) {
      const { align, citation } = attributes2;
      const className = clsx_default({
        [`has-text-align-${align}`]: align
      });
      return /* @__PURE__ */ (0, import_jsx_runtime415.jsxs)("blockquote", { ...import_block_editor224.useBlockProps.save({ className }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime415.jsx)(import_block_editor224.InnerBlocks.Content, {}),
        !import_block_editor224.RichText.isEmpty(citation) && /* @__PURE__ */ (0, import_jsx_runtime415.jsx)(import_block_editor224.RichText.Content, { tagName: "cite", value: citation })
      ] });
    },
    migrate: migrateTextAlign3
  };
  var v311 = {
    attributes: {
      value: {
        type: "string",
        source: "html",
        selector: "blockquote",
        multiline: "p",
        default: "",
        role: "content"
      },
      citation: {
        type: "string",
        source: "html",
        selector: "cite",
        default: "",
        role: "content"
      },
      align: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      __experimentalSlashInserter: true,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalDefaultControls: {
          fontSize: true,
          fontAppearance: true
        }
      }
    },
    save({ attributes: attributes2 }) {
      const { align, value, citation } = attributes2;
      const className = clsx_default({
        [`has-text-align-${align}`]: align
      });
      return /* @__PURE__ */ (0, import_jsx_runtime415.jsxs)("blockquote", { ...import_block_editor224.useBlockProps.save({ className }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime415.jsx)(import_block_editor224.RichText.Content, { multiline: true, value }),
        !import_block_editor224.RichText.isEmpty(citation) && /* @__PURE__ */ (0, import_jsx_runtime415.jsx)(import_block_editor224.RichText.Content, { tagName: "cite", value: citation })
      ] });
    },
    migrate(attributes2) {
      return migrateTextAlign3(...migrateToQuoteV2(attributes2));
    }
  };
  var v216 = {
    attributes: {
      value: {
        type: "string",
        source: "html",
        selector: "blockquote",
        multiline: "p",
        default: ""
      },
      citation: {
        type: "string",
        source: "html",
        selector: "cite",
        default: ""
      },
      align: {
        type: "string"
      }
    },
    migrate(attributes2) {
      return migrateTextAlign3(...migrateToQuoteV2(attributes2));
    },
    save({ attributes: attributes2 }) {
      const { align, value, citation } = attributes2;
      return /* @__PURE__ */ (0, import_jsx_runtime415.jsxs)("blockquote", { style: { textAlign: align ? align : null }, children: [
        /* @__PURE__ */ (0, import_jsx_runtime415.jsx)(import_block_editor224.RichText.Content, { multiline: true, value }),
        !import_block_editor224.RichText.isEmpty(citation) && /* @__PURE__ */ (0, import_jsx_runtime415.jsx)(import_block_editor224.RichText.Content, { tagName: "cite", value: citation })
      ] });
    }
  };
  var v138 = {
    attributes: {
      value: {
        type: "string",
        source: "html",
        selector: "blockquote",
        multiline: "p",
        default: ""
      },
      citation: {
        type: "string",
        source: "html",
        selector: "cite",
        default: ""
      },
      align: {
        type: "string"
      },
      style: {
        type: "number",
        default: 1
      }
    },
    migrate(attributes2) {
      if (attributes2.style === 2) {
        const { style: style2, ...restAttributes } = attributes2;
        return migrateTextAlign3(
          ...migrateLargeStyle(...migrateToQuoteV2(restAttributes))
        );
      }
      return migrateTextAlign3(...migrateToQuoteV2(attributes2));
    },
    save({ attributes: attributes2 }) {
      const { align, value, citation, style: style2 } = attributes2;
      return /* @__PURE__ */ (0, import_jsx_runtime415.jsxs)(
        "blockquote",
        {
          className: style2 === 2 ? "is-large" : "",
          style: { textAlign: align ? align : null },
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime415.jsx)(import_block_editor224.RichText.Content, { multiline: true, value }),
            !import_block_editor224.RichText.isEmpty(citation) && /* @__PURE__ */ (0, import_jsx_runtime415.jsx)(import_block_editor224.RichText.Content, { tagName: "cite", value: citation })
          ]
        }
      );
    }
  };
  var v03 = {
    attributes: {
      value: {
        type: "string",
        source: "html",
        selector: "blockquote",
        multiline: "p",
        default: ""
      },
      citation: {
        type: "string",
        source: "html",
        selector: "footer",
        default: ""
      },
      align: {
        type: "string"
      },
      style: {
        type: "number",
        default: 1
      }
    },
    migrate(attributes2) {
      if (!isNaN(parseInt(attributes2.style))) {
        const { style: style2, ...restAttributes } = attributes2;
        return migrateTextAlign3(...migrateToQuoteV2(restAttributes));
      }
      return migrateTextAlign3(...migrateToQuoteV2(attributes2));
    },
    save({ attributes: attributes2 }) {
      const { align, value, citation, style: style2 } = attributes2;
      return /* @__PURE__ */ (0, import_jsx_runtime415.jsxs)(
        "blockquote",
        {
          className: `blocks-quote-style-${style2}`,
          style: { textAlign: align ? align : null },
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime415.jsx)(import_block_editor224.RichText.Content, { multiline: true, value }),
            !import_block_editor224.RichText.isEmpty(citation) && /* @__PURE__ */ (0, import_jsx_runtime415.jsx)(import_block_editor224.RichText.Content, { tagName: "footer", value: citation })
          ]
        }
      );
    }
  };
  var deprecated_default43 = [v410, v311, v216, v138, v03];

  // packages/block-library/build-module/quote/edit.mjs
  var import_i18n214 = __toESM(require_i18n(), 1);
  var import_block_editor225 = __toESM(require_block_editor(), 1);
  var import_components141 = __toESM(require_components(), 1);
  var import_data127 = __toESM(require_data(), 1);
  var import_element113 = __toESM(require_element(), 1);
  var import_deprecated46 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime416 = __toESM(require_jsx_runtime(), 1);
  var isWebPlatform2 = import_element113.Platform.OS === "web";
  var TEMPLATE16 = [["core/paragraph", {}]];
  var useMigrateOnLoad2 = (attributes2, clientId) => {
    const registry = (0, import_data127.useRegistry)();
    const { updateBlockAttributes, replaceInnerBlocks } = (0, import_data127.useDispatch)(import_block_editor225.store);
    (0, import_element113.useEffect)(() => {
      if (!attributes2.value) {
        return;
      }
      const [newAttributes, newInnerBlocks] = migrateToQuoteV2(attributes2);
      (0, import_deprecated46.default)("Value attribute on the quote block", {
        since: "6.0",
        version: "6.5",
        alternative: "inner blocks"
      });
      registry.batch(() => {
        updateBlockAttributes(clientId, newAttributes);
        replaceInnerBlocks(clientId, newInnerBlocks);
      });
    }, [attributes2.value]);
  };
  function QuoteEdit({
    attributes: attributes2,
    setAttributes,
    insertBlocksAfter,
    clientId,
    className,
    style: style2,
    isSelected
  }) {
    const { textAlign, allowedBlocks } = attributes2;
    useMigrateOnLoad2(attributes2, clientId);
    const blockProps = (0, import_block_editor225.useBlockProps)({
      className: clsx_default(className, {
        [`has-text-align-${textAlign}`]: textAlign
      }),
      ...!isWebPlatform2 && { style: style2 }
    });
    const innerBlocksProps = (0, import_block_editor225.useInnerBlocksProps)(blockProps, {
      template: TEMPLATE16,
      templateInsertUpdatesSelection: true,
      __experimentalCaptureToolbars: true,
      renderAppender: false,
      allowedBlocks
    });
    return /* @__PURE__ */ (0, import_jsx_runtime416.jsxs)(import_jsx_runtime416.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(import_block_editor225.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
        import_block_editor225.AlignmentControl,
        {
          value: textAlign,
          onChange: (nextAlign) => {
            setAttributes({ textAlign: nextAlign });
          }
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime416.jsxs)(import_components141.BlockQuotation, { ...innerBlocksProps, children: [
        innerBlocksProps.children,
        /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
          Caption,
          {
            attributeKey: "citation",
            tagName: isWebPlatform2 ? "cite" : "p",
            style: isWebPlatform2 && { display: "block" },
            isSelected,
            attributes: attributes2,
            setAttributes,
            __unstableMobileNoFocusOnMount: true,
            icon: verse_default,
            label: (0, import_i18n214.__)("Quote citation"),
            placeholder: (
              // translators: placeholder text used for the
              // citation
              (0, import_i18n214.__)("Add citation")
            ),
            addLabel: (0, import_i18n214.__)("Add citation"),
            removeLabel: (0, import_i18n214.__)("Remove citation"),
            excludeElementClassName: true,
            className: "wp-block-quote__citation",
            insertBlocksAfter,
            ...!isWebPlatform2 ? { textAlign } : {}
          }
        )
      ] })
    ] });
  }

  // packages/block-library/build-module/quote/block.json
  var block_default91 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/quote",
    title: "Quote",
    category: "text",
    description: 'Give quoted text visual emphasis. "In quoting others, we cite ourselves." \u2014 Julio Cort\xE1zar',
    keywords: ["blockquote", "cite"],
    textdomain: "default",
    attributes: {
      value: {
        type: "string",
        source: "html",
        selector: "blockquote",
        multiline: "p",
        default: "",
        role: "content"
      },
      citation: {
        type: "rich-text",
        source: "rich-text",
        selector: "cite",
        role: "content"
      },
      textAlign: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      align: ["left", "right", "wide", "full"],
      html: false,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        __experimentalDefaultControls: {
          backgroundImage: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      dimensions: {
        minHeight: true,
        __experimentalDefaultControls: {
          minHeight: false
        }
      },
      __experimentalOnEnter: true,
      __experimentalOnMerge: true,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      color: {
        gradients: true,
        heading: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      layout: {
        allowEditing: false
      },
      spacing: {
        blockGap: true,
        padding: true,
        margin: true
      },
      interactivity: {
        clientNavigation: true
      },
      allowedBlocks: true
    },
    styles: [
      {
        name: "default",
        label: "Default",
        isDefault: true
      },
      { name: "plain", label: "Plain" }
    ],
    editorStyle: "wp-block-quote-editor",
    style: "wp-block-quote"
  };

  // packages/block-library/build-module/quote/save.mjs
  var import_block_editor226 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime417 = __toESM(require_jsx_runtime(), 1);
  function save44({ attributes: attributes2 }) {
    const { textAlign, citation } = attributes2;
    const className = clsx_default({
      [`has-text-align-${textAlign}`]: textAlign
    });
    return /* @__PURE__ */ (0, import_jsx_runtime417.jsxs)("blockquote", { ...import_block_editor226.useBlockProps.save({ className }), children: [
      /* @__PURE__ */ (0, import_jsx_runtime417.jsx)(import_block_editor226.InnerBlocks.Content, {}),
      !import_block_editor226.RichText.isEmpty(citation) && /* @__PURE__ */ (0, import_jsx_runtime417.jsx)(import_block_editor226.RichText.Content, { tagName: "cite", value: citation })
    ] });
  }

  // packages/block-library/build-module/quote/transforms.mjs
  var import_block_editor227 = __toESM(require_block_editor(), 1);
  var import_blocks99 = __toESM(require_blocks(), 1);
  var transforms28 = {
    from: [
      {
        type: "block",
        blocks: ["core/verse"],
        transform: ({ content }) => {
          return (0, import_blocks99.createBlock)("core/quote", {}, [
            (0, import_blocks99.createBlock)("core/paragraph", { content })
          ]);
        }
      },
      {
        type: "block",
        blocks: ["core/pullquote"],
        transform: ({
          value,
          align,
          citation,
          anchor,
          fontSize,
          style: style2
        }) => {
          return (0, import_blocks99.createBlock)(
            "core/quote",
            {
              align,
              citation,
              anchor,
              fontSize,
              style: style2
            },
            [(0, import_blocks99.createBlock)("core/paragraph", { content: value })]
          );
        }
      },
      {
        type: "prefix",
        prefix: ">",
        transform: (content) => (0, import_blocks99.createBlock)("core/quote", {}, [
          (0, import_blocks99.createBlock)("core/paragraph", { content })
        ])
      },
      {
        type: "raw",
        schema: () => ({
          blockquote: {
            children: "*"
          }
        }),
        selector: "blockquote",
        transform: (node, handler) => {
          return (0, import_blocks99.createBlock)(
            "core/quote",
            // Don't try to parse any `cite` out of this content.
            // * There may be more than one cite.
            // * There may be more attribution text than just the cite.
            // * If the cite is nested in the quoted text, it's wrong to
            //   remove it.
            {},
            handler({
              HTML: node.innerHTML,
              mode: "BLOCKS"
            })
          );
        }
      },
      {
        type: "block",
        isMultiBlock: true,
        blocks: ["*"],
        isMatch: ({}, blocks) => {
          if (blocks.length === 1) {
            return [
              "core/paragraph",
              "core/heading",
              "core/list",
              "core/pullquote"
            ].includes(blocks[0].name);
          }
          return !blocks.some(({ name: name123 }) => name123 === "core/quote");
        },
        __experimentalConvert: (blocks) => (0, import_blocks99.createBlock)(
          "core/quote",
          {},
          blocks.map(
            (block) => (0, import_blocks99.createBlock)(
              block.name,
              block.attributes,
              block.innerBlocks
            )
          )
        )
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/pullquote"],
        isMatch: ({}, block) => {
          return block.innerBlocks.every(
            ({ name: name123 }) => name123 === "core/paragraph"
          );
        },
        transform: ({ align, citation, anchor, fontSize, style: style2 }, innerBlocks) => {
          const value = innerBlocks.map(({ attributes: attributes2 }) => `${attributes2.content}`).join("<br>");
          return (0, import_blocks99.createBlock)("core/pullquote", {
            value,
            align,
            citation,
            anchor,
            fontSize,
            style: style2
          });
        }
      },
      {
        type: "block",
        blocks: ["core/verse"],
        isMatch: ({}, block) => {
          return block.innerBlocks.every((innerBlock) => {
            if (innerBlock.name === "core/paragraph") {
              return true;
            }
            const converted = (0, import_blocks99.switchToBlockType)(
              innerBlock,
              "core/paragraph"
            );
            return converted !== null;
          });
        },
        transform: ({}, innerBlocks) => {
          const paragraphs = innerBlocks.flatMap((innerBlock) => {
            if (innerBlock.name === "core/paragraph") {
              return innerBlock;
            }
            return (0, import_blocks99.switchToBlockType)(innerBlock, "core/paragraph") || [];
          });
          const content = paragraphs.map(({ attributes: attributes2 }) => attributes2.content || "").filter(Boolean).join("<br>");
          return (0, import_blocks99.createBlock)("core/verse", { content });
        }
      },
      {
        type: "block",
        blocks: ["core/paragraph"],
        isMatch: ({ citation }, block) => {
          const innerBlocks = block.innerBlocks;
          if (!innerBlocks.length) {
            return !import_block_editor227.RichText.isEmpty(citation);
          }
          return innerBlocks.every((innerBlock) => {
            if (innerBlock.name === "core/paragraph") {
              return true;
            }
            const converted = (0, import_blocks99.switchToBlockType)(
              innerBlock,
              "core/paragraph"
            );
            return converted !== null;
          });
        },
        transform: ({ citation }, innerBlocks) => {
          const paragraphs = innerBlocks.flatMap((innerBlock) => {
            if (innerBlock.name === "core/paragraph") {
              return innerBlock;
            }
            return (0, import_blocks99.switchToBlockType)(innerBlock, "core/paragraph") || [];
          });
          return import_block_editor227.RichText.isEmpty(citation) ? paragraphs : [
            ...paragraphs,
            (0, import_blocks99.createBlock)("core/paragraph", {
              content: citation
            })
          ];
        }
      },
      {
        type: "block",
        blocks: ["core/group"],
        transform: ({ citation, anchor }, innerBlocks) => (0, import_blocks99.createBlock)(
          "core/group",
          { anchor },
          import_block_editor227.RichText.isEmpty(citation) ? innerBlocks : [
            ...innerBlocks,
            (0, import_blocks99.createBlock)("core/paragraph", {
              content: citation
            })
          ]
        )
      }
    ],
    ungroup: ({ citation }, innerBlocks) => import_block_editor227.RichText.isEmpty(citation) ? innerBlocks : [
      ...innerBlocks,
      (0, import_blocks99.createBlock)("core/paragraph", {
        content: citation
      })
    ]
  };
  var transforms_default29 = transforms28;

  // packages/block-library/build-module/quote/index.mjs
  var { name: name92 } = block_default91;
  var settings91 = {
    icon: quote_default,
    example: {
      attributes: {
        citation: (0, import_i18n215.__)("Julio Cort\xE1zar")
      },
      innerBlocks: [
        {
          name: "core/paragraph",
          attributes: {
            content: (0, import_i18n215.__)("In quoting others, we cite ourselves.")
          }
        }
      ]
    },
    transforms: transforms_default29,
    edit: QuoteEdit,
    save: save44,
    deprecated: deprecated_default43
  };
  var init91 = () => initBlock({ name: name92, metadata: block_default91, settings: settings91 });

  // packages/block-library/build-module/block/index.mjs
  var block_exports = {};
  __export(block_exports, {
    init: () => init92,
    metadata: () => block_default92,
    name: () => name93,
    settings: () => settings92
  });
  var import_core_data78 = __toESM(require_core_data(), 1);
  var import_data129 = __toESM(require_data(), 1);
  var import_html_entities12 = __toESM(require_html_entities(), 1);

  // packages/block-library/build-module/block/block.json
  var block_default92 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/block",
    title: "Pattern",
    category: "reusable",
    description: "Reuse this design across your site.",
    keywords: ["reusable"],
    textdomain: "default",
    attributes: {
      ref: {
        type: "number"
      },
      content: {
        type: "object",
        default: {}
      }
    },
    providesContext: {
      "pattern/overrides": "content"
    },
    supports: {
      customClassName: false,
      html: false,
      inserter: false,
      renaming: false,
      interactivity: {
        clientNavigation: true
      },
      customCSS: false
    }
  };

  // packages/block-library/build-module/block/edit.mjs
  var import_data128 = __toESM(require_data(), 1);
  var import_element114 = __toESM(require_element(), 1);
  var import_core_data77 = __toESM(require_core_data(), 1);
  var import_components142 = __toESM(require_components(), 1);
  var import_i18n216 = __toESM(require_i18n(), 1);
  var import_block_editor228 = __toESM(require_block_editor(), 1);
  var import_patterns = __toESM(require_patterns(), 1);
  var import_blocks100 = __toESM(require_blocks(), 1);
  var import_jsx_runtime418 = __toESM(require_jsx_runtime(), 1);
  var { useLayoutClasses } = unlock(import_block_editor228.privateApis);
  var { isOverridableBlock } = unlock(import_patterns.privateApis);
  var fullAlignments = ["full", "wide", "left", "right"];
  var useInferredLayout = (blocks, parentLayout) => {
    const initialInferredAlignmentRef = (0, import_element114.useRef)();
    return (0, import_element114.useMemo)(() => {
      if (!blocks?.length) {
        return {};
      }
      let alignment = initialInferredAlignmentRef.current;
      if (alignment === void 0) {
        const isConstrained = parentLayout?.type === "constrained";
        const hasFullAlignment = blocks.some(
          (block) => fullAlignments.includes(block.attributes.align)
        );
        alignment = isConstrained && hasFullAlignment ? "full" : null;
        initialInferredAlignmentRef.current = alignment;
      }
      const layout = alignment ? parentLayout : void 0;
      return { alignment, layout };
    }, [blocks, parentLayout]);
  };
  function RecursionWarning() {
    const blockProps = (0, import_block_editor228.useBlockProps)();
    return /* @__PURE__ */ (0, import_jsx_runtime418.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime418.jsx)(import_block_editor228.Warning, { children: (0, import_i18n216.__)("Block cannot be rendered inside itself.") }) });
  }
  var NOOP2 = () => {
  };
  function ReusableBlockEditRecursionWrapper(props) {
    const { ref } = props.attributes;
    const hasAlreadyRendered = (0, import_block_editor228.useHasRecursion)(ref);
    if (hasAlreadyRendered) {
      return /* @__PURE__ */ (0, import_jsx_runtime418.jsx)(RecursionWarning, {});
    }
    return /* @__PURE__ */ (0, import_jsx_runtime418.jsx)(import_block_editor228.RecursionProvider, { uniqueId: ref, children: /* @__PURE__ */ (0, import_jsx_runtime418.jsx)(ReusableBlockEdit, { ...props }) });
  }
  function ReusableBlockControl({
    recordId,
    canOverrideBlocks,
    hasContent,
    handleEditOriginal,
    resetContent
  }) {
    const canUserEdit = (0, import_data128.useSelect)(
      (select9) => !!select9(import_core_data77.store).canUser("update", {
        kind: "postType",
        name: "wp_block",
        id: recordId
      }),
      [recordId]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime418.jsxs)(import_jsx_runtime418.Fragment, { children: [
      canUserEdit && !!handleEditOriginal && /* @__PURE__ */ (0, import_jsx_runtime418.jsx)(import_block_editor228.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime418.jsx)(import_components142.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime418.jsx)(import_components142.ToolbarButton, { onClick: handleEditOriginal, children: (0, import_i18n216.__)("Edit original") }) }) }),
      canOverrideBlocks && /* @__PURE__ */ (0, import_jsx_runtime418.jsx)(import_block_editor228.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime418.jsx)(import_components142.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime418.jsx)(
        import_components142.ToolbarButton,
        {
          onClick: resetContent,
          disabled: !hasContent,
          children: (0, import_i18n216.__)("Reset")
        }
      ) }) })
    ] });
  }
  var EMPTY_OBJECT2 = {};
  function ReusableBlockEdit({
    name: name123,
    attributes: { ref, content },
    __unstableParentLayout: parentLayout,
    setAttributes
  }) {
    const { record, hasResolved } = (0, import_core_data77.useEntityRecord)(
      "postType",
      "wp_block",
      ref
    );
    const [blocks] = (0, import_core_data77.useEntityBlockEditor)("postType", "wp_block", {
      id: ref
    });
    const isMissing = hasResolved && !record;
    const { __unstableMarkLastChangeAsPersistent } = (0, import_data128.useDispatch)(import_block_editor228.store);
    const {
      onNavigateToEntityRecord,
      hasPatternOverridesSource,
      supportedBlockTypesRaw
    } = (0, import_data128.useSelect)((select9) => {
      const { getSettings: getSettings2 } = select9(import_block_editor228.store);
      return {
        onNavigateToEntityRecord: getSettings2().onNavigateToEntityRecord,
        hasPatternOverridesSource: !!(0, import_blocks100.getBlockBindingsSource)(
          "core/pattern-overrides"
        ),
        supportedBlockTypesRaw: getSettings2().__experimentalBlockBindingsSupportedAttributes || EMPTY_OBJECT2
      };
    }, []);
    const canOverrideBlocks = (0, import_element114.useMemo)(() => {
      const supportedBlockTypes = Object.keys(supportedBlockTypesRaw);
      const hasOverridableBlocks = (_blocks) => _blocks.some((block) => {
        if (supportedBlockTypes.includes(block.name) && isOverridableBlock(block)) {
          return true;
        }
        return hasOverridableBlocks(block.innerBlocks);
      });
      return hasPatternOverridesSource && hasOverridableBlocks(blocks);
    }, [hasPatternOverridesSource, blocks, supportedBlockTypesRaw]);
    const { alignment, layout } = useInferredLayout(blocks, parentLayout);
    const layoutClasses = useLayoutClasses({ layout }, name123);
    const blockProps = (0, import_block_editor228.useBlockProps)({
      className: clsx_default(
        "block-library-block__reusable-block-container",
        layout && layoutClasses,
        { [`align${alignment}`]: alignment }
      )
    });
    const innerBlocksProps = (0, import_block_editor228.useInnerBlocksProps)(blockProps, {
      layout,
      value: blocks,
      onInput: NOOP2,
      onChange: NOOP2,
      renderAppender: blocks?.length ? void 0 : import_block_editor228.InnerBlocks.ButtonBlockAppender
    });
    const handleEditOriginal = () => {
      onNavigateToEntityRecord({
        postId: ref,
        postType: "wp_block"
      });
    };
    const resetContent = () => {
      if (content) {
        __unstableMarkLastChangeAsPersistent();
        setAttributes({ content: void 0 });
      }
    };
    let children = null;
    if (isMissing) {
      children = /* @__PURE__ */ (0, import_jsx_runtime418.jsx)(import_block_editor228.Warning, { children: (0, import_i18n216.__)("Block has been deleted or is unavailable.") });
    }
    if (!hasResolved) {
      children = /* @__PURE__ */ (0, import_jsx_runtime418.jsx)(import_components142.Placeholder, { children: /* @__PURE__ */ (0, import_jsx_runtime418.jsx)(import_components142.Spinner, {}) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime418.jsxs)(import_jsx_runtime418.Fragment, { children: [
      hasResolved && !isMissing && /* @__PURE__ */ (0, import_jsx_runtime418.jsx)(
        ReusableBlockControl,
        {
          recordId: ref,
          canOverrideBlocks,
          hasContent: !!content,
          handleEditOriginal: onNavigateToEntityRecord ? handleEditOriginal : void 0,
          resetContent
        }
      ),
      children === null ? /* @__PURE__ */ (0, import_jsx_runtime418.jsx)("div", { ...innerBlocksProps }) : /* @__PURE__ */ (0, import_jsx_runtime418.jsx)("div", { ...blockProps, children })
    ] });
  }

  // packages/block-library/build-module/block/deprecated.mjs
  var isObject = (obj) => typeof obj === "object" && !Array.isArray(obj) && obj !== null;
  var v217 = {
    attributes: {
      ref: {
        type: "number"
      },
      content: {
        type: "object"
      }
    },
    supports: {
      customClassName: false,
      html: false,
      inserter: false,
      renaming: false
    },
    // Force this deprecation to run whenever there's a values sub-property that's an object.
    //
    // This could fail in the future if a block ever has binding to a `values` attribute.
    // Some extra protection is added to ensure `values` is an object, but this only reduces
    // the likelihood, it doesn't solve it completely.
    isEligible({ content }) {
      return !!content && Object.keys(content).every(
        (contentKey) => content[contentKey].values && isObject(content[contentKey].values)
      );
    },
    /*
     * Old attribute format:
     * content: {
     *     "V98q_x": {
     * 	   		// The attribute values are now stored as a 'values' sub-property.
     *         values: { content: 'My content value' },
     * 	       // ... additional metadata, like the block name can be stored here.
     *     }
     * }
     *
     * New attribute format:
     * content: {
     *     "V98q_x": {
     *         content: 'My content value',
     *     }
     * }
     */
    migrate(attributes2) {
      const { content, ...retainedAttributes } = attributes2;
      if (content && Object.keys(content).length) {
        const updatedContent = { ...content };
        for (const contentKey in content) {
          updatedContent[contentKey] = content[contentKey].values;
        }
        return {
          ...retainedAttributes,
          content: updatedContent
        };
      }
      return attributes2;
    }
  };
  var v139 = {
    attributes: {
      ref: {
        type: "number"
      },
      overrides: {
        type: "object"
      }
    },
    supports: {
      customClassName: false,
      html: false,
      inserter: false,
      renaming: false
    },
    // Force this deprecation to run whenever there's an `overrides` object.
    isEligible({ overrides }) {
      return !!overrides;
    },
    /*
     * Old attribute format:
     * overrides: {
     *     // An key is an id that represents a block.
     *     // The values are the attribute values of the block.
     *     "V98q_x": { content: 'My content value' }
     * }
     *
     * New attribute format:
     * content: {
     *     "V98q_x": { content: 'My content value' }
     * }
     *
     */
    migrate(attributes2) {
      const { overrides, ...retainedAttributes } = attributes2;
      const content = {};
      Object.keys(overrides).forEach((id) => {
        content[id] = overrides[id];
      });
      return {
        ...retainedAttributes,
        content
      };
    }
  };
  var deprecated_default44 = [v217, v139];

  // packages/block-library/build-module/block/index.mjs
  var { name: name93 } = block_default92;
  var settings92 = {
    deprecated: deprecated_default44,
    edit: ReusableBlockEditRecursionWrapper,
    icon: symbol_default,
    __experimentalLabel: ({ ref }) => {
      if (!ref) {
        return;
      }
      const entity = (0, import_data129.select)(import_core_data78.store).getEditedEntityRecord(
        "postType",
        "wp_block",
        ref
      );
      if (!entity?.title) {
        return;
      }
      return (0, import_html_entities12.decodeEntities)(entity.title);
    }
  };
  var init92 = () => initBlock({ name: name93, metadata: block_default92, settings: settings92 });

  // packages/block-library/build-module/read-more/index.mjs
  var read_more_exports = {};
  __export(read_more_exports, {
    init: () => init93,
    metadata: () => block_default93,
    name: () => name94,
    settings: () => settings93
  });
  var import_i18n218 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/read-more/block.json
  var block_default93 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/read-more",
    title: "Read More",
    category: "theme",
    description: "Displays the link of a post, page, or any other content-type.",
    textdomain: "default",
    attributes: {
      content: {
        type: "string",
        role: "content"
      },
      linkTarget: {
        type: "string",
        default: "_self"
      }
    },
    usesContext: ["postId"],
    supports: {
      anchor: true,
      html: false,
      color: {
        gradients: true,
        text: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalLetterSpacing: true,
        __experimentalTextDecoration: true,
        __experimentalDefaultControls: {
          fontSize: true,
          textDecoration: true
        }
      },
      spacing: {
        margin: ["top", "bottom"],
        padding: true,
        __experimentalDefaultControls: {
          padding: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        width: true,
        __experimentalDefaultControls: {
          width: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    style: "wp-block-read-more"
  };

  // packages/block-library/build-module/read-more/edit.mjs
  var import_block_editor229 = __toESM(require_block_editor(), 1);
  var import_components143 = __toESM(require_components(), 1);
  var import_blocks101 = __toESM(require_blocks(), 1);
  var import_i18n217 = __toESM(require_i18n(), 1);
  var import_jsx_runtime419 = __toESM(require_jsx_runtime(), 1);
  function ReadMore({
    attributes: { content, linkTarget },
    setAttributes,
    insertBlocksAfter
  }) {
    const blockProps = (0, import_block_editor229.useBlockProps)();
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime419.jsxs)(import_jsx_runtime419.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(import_block_editor229.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(
        import_components143.__experimentalToolsPanel,
        {
          label: (0, import_i18n217.__)("Settings"),
          resetAll: () => setAttributes({ linkTarget: "_self" }),
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(
            import_components143.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n217.__)("Open in new tab"),
              isShownByDefault: true,
              hasValue: () => linkTarget !== "_self",
              onDeselect: () => setAttributes({ linkTarget: "_self" }),
              children: /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(
                import_components143.ToggleControl,
                {
                  label: (0, import_i18n217.__)("Open in new tab"),
                  onChange: (value) => setAttributes({
                    linkTarget: value ? "_blank" : "_self"
                  }),
                  checked: linkTarget === "_blank"
                }
              )
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(
        import_block_editor229.RichText,
        {
          identifier: "content",
          tagName: "a",
          "aria-label": (0, import_i18n217.__)("\u201CRead more\u201D link text"),
          placeholder: (0, import_i18n217.__)("Read more"),
          value: content,
          onChange: (newValue) => setAttributes({ content: newValue }),
          __unstableOnSplitAtEnd: () => insertBlocksAfter((0, import_blocks101.createBlock)((0, import_blocks101.getDefaultBlockName)())),
          withoutInteractiveFormatting: true,
          ...blockProps
        }
      )
    ] });
  }

  // packages/block-library/build-module/read-more/index.mjs
  var { name: name94 } = block_default93;
  var settings93 = {
    icon: link_default,
    edit: ReadMore,
    example: {
      attributes: {
        content: (0, import_i18n218.__)("Read more")
      }
    }
  };
  var init93 = () => initBlock({ name: name94, metadata: block_default93, settings: settings93 });

  // packages/block-library/build-module/rss/index.mjs
  var rss_exports = {};
  __export(rss_exports, {
    init: () => init94,
    metadata: () => block_default94,
    name: () => name95,
    settings: () => settings94
  });

  // packages/block-library/build-module/rss/block.json
  var block_default94 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/rss",
    title: "RSS",
    category: "widgets",
    description: "Display entries from any RSS or Atom feed.",
    keywords: ["atom", "feed"],
    textdomain: "default",
    attributes: {
      columns: {
        type: "number",
        default: 2
      },
      blockLayout: {
        type: "string",
        default: "list"
      },
      feedURL: {
        type: "string",
        default: "",
        role: "content"
      },
      itemsToShow: {
        type: "number",
        default: 5
      },
      displayExcerpt: {
        type: "boolean",
        default: false
      },
      displayAuthor: {
        type: "boolean",
        default: false
      },
      displayDate: {
        type: "boolean",
        default: false
      },
      excerptLength: {
        type: "number",
        default: 55
      },
      openInNewTab: {
        type: "boolean",
        default: false
      },
      rel: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      align: true,
      html: false,
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          padding: false,
          margin: false
        }
      },
      color: {
        background: true,
        text: true,
        gradients: true,
        link: true
      }
    },
    editorStyle: "wp-block-rss-editor",
    style: "wp-block-rss"
  };

  // packages/block-library/build-module/rss/edit.mjs
  var import_block_editor230 = __toESM(require_block_editor(), 1);
  var import_components144 = __toESM(require_components(), 1);
  var import_element115 = __toESM(require_element(), 1);
  var import_i18n219 = __toESM(require_i18n(), 1);
  var import_url19 = __toESM(require_url(), 1);
  var import_server_side_render5 = __toESM(require_server_side_render(), 1);
  var import_compose51 = __toESM(require_compose(), 1);
  var import_jsx_runtime420 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_MIN_ITEMS = 1;
  var DEFAULT_MAX_ITEMS = 20;
  function RSSEdit({ attributes: attributes2, setAttributes, name: name123 }) {
    const [isEditing, setIsEditing] = (0, import_element115.useState)(!attributes2.feedURL);
    const {
      blockLayout,
      columns,
      displayAuthor,
      displayDate,
      displayExcerpt,
      excerptLength,
      feedURL,
      itemsToShow,
      openInNewTab,
      rel
    } = attributes2;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    function toggleAttribute(propName) {
      return () => {
        const value = attributes2[propName];
        setAttributes({ [propName]: !value });
      };
    }
    function onSubmitURL(event) {
      event.preventDefault();
      if (feedURL) {
        setAttributes({ feedURL: (0, import_url19.prependHTTPS)(feedURL) });
        setIsEditing(false);
      }
    }
    const { content, status, error } = (0, import_server_side_render5.useServerSideRender)({
      attributes: attributes2,
      skipBlockSupportAttributes: true,
      block: name123
    });
    const disabledRef = (0, import_compose51.useDisabled)();
    const blockProps = (0, import_block_editor230.useBlockProps)({ ref: isEditing ? null : disabledRef });
    const label = (0, import_i18n219.__)("RSS URL");
    if (isEditing) {
      return /* @__PURE__ */ (0, import_jsx_runtime420.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
        import_components144.Placeholder,
        {
          icon: rss_default,
          label,
          instructions: (0, import_i18n219.__)(
            "Display entries from any RSS or Atom feed."
          ),
          children: /* @__PURE__ */ (0, import_jsx_runtime420.jsxs)(
            "form",
            {
              onSubmit: onSubmitURL,
              className: "wp-block-rss__placeholder-form",
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
                  import_components144.__experimentalInputControl,
                  {
                    __next40pxDefaultSize: true,
                    label,
                    type: "url",
                    hideLabelFromVision: true,
                    placeholder: (0, import_i18n219.__)("Enter URL here\u2026"),
                    value: feedURL,
                    onChange: (value) => setAttributes({ feedURL: value }),
                    className: "wp-block-rss__placeholder-input"
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
                  import_components144.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "primary",
                    type: "submit",
                    children: (0, import_i18n219.__)("Apply")
                  }
                )
              ]
            }
          )
        }
      ) });
    }
    const toolbarControls = [
      {
        icon: pencil_default,
        title: (0, import_i18n219.__)("Edit RSS URL"),
        onClick: () => setIsEditing(true)
      },
      {
        icon: list_default,
        title: (0, import_i18n219._x)("List view", "RSS block display setting"),
        onClick: () => setAttributes({ blockLayout: "list" }),
        isActive: blockLayout === "list"
      },
      {
        icon: grid_default,
        title: (0, import_i18n219._x)("Grid view", "RSS block display setting"),
        onClick: () => setAttributes({ blockLayout: "grid" }),
        isActive: blockLayout === "grid"
      }
    ];
    return /* @__PURE__ */ (0, import_jsx_runtime420.jsxs)(import_jsx_runtime420.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(import_block_editor230.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(import_components144.ToolbarGroup, { controls: toolbarControls }) }),
      /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(import_block_editor230.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime420.jsxs)(
        import_components144.__experimentalToolsPanel,
        {
          label: (0, import_i18n219.__)("Settings"),
          resetAll: () => {
            setAttributes({
              itemsToShow: 5,
              displayAuthor: false,
              displayDate: false,
              displayExcerpt: false,
              excerptLength: 55,
              columns: 2,
              openInNewTab: false
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
              import_components144.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n219.__)("Number of items"),
                hasValue: () => itemsToShow !== 5,
                onDeselect: () => setAttributes({ itemsToShow: 5 }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
                  import_components144.RangeControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n219.__)("Number of items"),
                    value: itemsToShow,
                    onChange: (value) => setAttributes({ itemsToShow: value }),
                    min: DEFAULT_MIN_ITEMS,
                    max: DEFAULT_MAX_ITEMS,
                    required: true
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
              import_components144.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n219.__)("Display author"),
                hasValue: () => !!displayAuthor,
                onDeselect: () => setAttributes({ displayAuthor: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
                  import_components144.ToggleControl,
                  {
                    label: (0, import_i18n219.__)("Display author"),
                    checked: displayAuthor,
                    onChange: toggleAttribute("displayAuthor")
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
              import_components144.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n219.__)("Display date"),
                hasValue: () => !!displayDate,
                onDeselect: () => setAttributes({ displayDate: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
                  import_components144.ToggleControl,
                  {
                    label: (0, import_i18n219.__)("Display date"),
                    checked: displayDate,
                    onChange: toggleAttribute("displayDate")
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
              import_components144.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n219.__)("Display excerpt"),
                hasValue: () => !!displayExcerpt,
                onDeselect: () => setAttributes({ displayExcerpt: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
                  import_components144.ToggleControl,
                  {
                    label: (0, import_i18n219.__)("Display excerpt"),
                    checked: displayExcerpt,
                    onChange: toggleAttribute("displayExcerpt")
                  }
                )
              }
            ),
            displayExcerpt && /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
              import_components144.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n219.__)("Max number of words in excerpt"),
                hasValue: () => excerptLength !== 55,
                onDeselect: () => setAttributes({ excerptLength: 55 }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
                  import_components144.RangeControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n219.__)("Max number of words in excerpt"),
                    value: excerptLength,
                    onChange: (value) => setAttributes({ excerptLength: value }),
                    min: 10,
                    max: 100,
                    required: true
                  }
                )
              }
            ),
            blockLayout === "grid" && /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
              import_components144.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n219.__)("Columns"),
                hasValue: () => columns !== 2,
                onDeselect: () => setAttributes({ columns: 2 }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
                  import_components144.RangeControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n219.__)("Columns"),
                    value: columns,
                    onChange: (value) => setAttributes({ columns: value }),
                    min: 2,
                    max: 6,
                    required: true
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
              import_components144.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n219.__)("Open links in new tab"),
                hasValue: () => !!openInNewTab,
                onDeselect: () => setAttributes({ openInNewTab: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
                  import_components144.ToggleControl,
                  {
                    label: (0, import_i18n219.__)("Open links in new tab"),
                    checked: openInNewTab,
                    onChange: (value) => setAttributes({ openInNewTab: value })
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(import_block_editor230.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
        import_components144.TextControl,
        {
          __next40pxDefaultSize: true,
          label: (0, import_i18n219.__)("Link relation"),
          help: (0, import_element115.createInterpolateElement)(
            (0, import_i18n219.__)(
              "The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."
            ),
            {
              a: /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(import_components144.ExternalLink, { href: "https://developer.mozilla.org/docs/Web/HTML/Attributes/rel" })
            }
          ),
          value: rel || "",
          onChange: (value) => setAttributes({ rel: value })
        }
      ) }),
      status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime420.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(import_components144.Spinner, {}) }),
      status === "error" && /* @__PURE__ */ (0, import_jsx_runtime420.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime420.jsx)("p", { children: (0, import_i18n219.sprintf)(
        /* translators: %s: error message returned when rendering the block. */
        (0, import_i18n219.__)("Error: %s"),
        error
      ) }) }),
      status === "success" && /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(html_renderer_default, { wrapperProps: blockProps, html: content })
    ] });
  }

  // packages/block-library/build-module/rss/index.mjs
  var { name: name95 } = block_default94;
  var settings94 = {
    icon: rss_default,
    example: {
      attributes: {
        feedURL: "https://wordpress.org"
      }
    },
    edit: RSSEdit
  };
  var init94 = () => initBlock({ name: name95, metadata: block_default94, settings: settings94 });

  // packages/block-library/build-module/search/index.mjs
  var search_exports = {};
  __export(search_exports, {
    init: () => init95,
    metadata: () => block_default95,
    name: () => name96,
    settings: () => settings95
  });
  var import_i18n222 = __toESM(require_i18n(), 1);
  var import_blocks102 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/search/block.json
  var block_default95 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/search",
    title: "Search",
    category: "widgets",
    description: "Help visitors find your content.",
    keywords: ["find"],
    textdomain: "default",
    attributes: {
      label: {
        type: "string",
        role: "content"
      },
      showLabel: {
        type: "boolean",
        default: true
      },
      placeholder: {
        type: "string",
        default: "",
        role: "content"
      },
      width: {
        type: "number"
      },
      widthUnit: {
        type: "string"
      },
      buttonText: {
        type: "string",
        role: "content"
      },
      buttonPosition: {
        type: "string",
        default: "button-outside"
      },
      buttonUseIcon: {
        type: "boolean",
        default: false
      },
      query: {
        type: "object",
        default: {}
      },
      isSearchFieldHidden: {
        type: "boolean",
        default: false
      }
    },
    supports: {
      anchor: true,
      align: ["left", "center", "right"],
      color: {
        gradients: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      interactivity: true,
      typography: {
        __experimentalSkipSerialization: true,
        __experimentalSelector: ".wp-block-search__label, .wp-block-search__input, .wp-block-search__button",
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        width: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          width: true
        }
      },
      spacing: {
        margin: true
      },
      html: false
    },
    editorStyle: "wp-block-search-editor",
    style: "wp-block-search"
  };

  // packages/block-library/build-module/search/edit.mjs
  var import_block_editor231 = __toESM(require_block_editor(), 1);
  var import_data130 = __toESM(require_data(), 1);
  var import_element116 = __toESM(require_element(), 1);
  var import_components145 = __toESM(require_components(), 1);
  var import_compose52 = __toESM(require_compose(), 1);
  var import_i18n220 = __toESM(require_i18n(), 1);
  var import_dom11 = __toESM(require_dom(), 1);

  // packages/block-library/build-module/search/utils.mjs
  var PC_WIDTH_DEFAULT = 50;
  var PX_WIDTH_DEFAULT = 350;
  var MIN_WIDTH = 220;
  function isPercentageUnit(unit) {
    return unit === "%";
  }

  // packages/block-library/build-module/search/edit.mjs
  var import_jsx_runtime421 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_INNER_PADDING = "4px";
  var PERCENTAGE_WIDTHS = [25, 50, 75, 100];
  function SearchEdit({
    className,
    attributes: attributes2,
    setAttributes,
    toggleSelection,
    isSelected,
    clientId
  }) {
    const {
      label,
      showLabel,
      placeholder: placeholder2,
      width,
      widthUnit,
      align,
      buttonText,
      buttonPosition,
      buttonUseIcon,
      isSearchFieldHidden,
      style: style2
    } = attributes2;
    const wasJustInsertedIntoNavigationBlock = (0, import_data130.useSelect)(
      (select9) => {
        const { getBlockParentsByBlockName, wasBlockJustInserted } = select9(import_block_editor231.store);
        return !!getBlockParentsByBlockName(clientId, "core/navigation")?.length && wasBlockJustInserted(clientId);
      },
      [clientId]
    );
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data130.useDispatch)(import_block_editor231.store);
    (0, import_element116.useEffect)(() => {
      if (wasJustInsertedIntoNavigationBlock) {
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({
          showLabel: false,
          buttonUseIcon: true,
          buttonPosition: "button-inside"
        });
      }
    }, [
      __unstableMarkNextChangeAsNotPersistent,
      wasJustInsertedIntoNavigationBlock,
      setAttributes
    ]);
    const borderRadius = style2?.border?.radius;
    let borderProps = (0, import_block_editor231.__experimentalUseBorderProps)(attributes2);
    if (typeof borderRadius === "number") {
      borderProps = {
        ...borderProps,
        style: {
          ...borderProps.style,
          borderRadius: `${borderRadius}px`
        }
      };
    }
    const colorProps = (0, import_block_editor231.__experimentalUseColorProps)(attributes2);
    const [fluidTypographySettings, layout] = (0, import_block_editor231.useSettings)(
      "typography.fluid",
      "layout"
    );
    const typographyProps = (0, import_block_editor231.getTypographyClassesAndStyles)(attributes2, {
      typography: {
        fluid: fluidTypographySettings
      },
      layout: {
        wideSize: layout?.wideSize
      }
    });
    const unitControlInstanceId = (0, import_compose52.useInstanceId)(import_components145.__experimentalUnitControl);
    const unitControlInputId = `wp-block-search__width-${unitControlInstanceId}`;
    const isButtonPositionInside = "button-inside" === buttonPosition;
    const isButtonPositionOutside = "button-outside" === buttonPosition;
    const hasNoButton = "no-button" === buttonPosition;
    const hasOnlyButton = "button-only" === buttonPosition;
    const searchFieldRef = (0, import_element116.useRef)();
    const buttonRef = (0, import_element116.useRef)();
    const units = (0, import_components145.__experimentalUseCustomUnits)({
      availableUnits: ["%", "px"],
      defaultValues: { "%": PC_WIDTH_DEFAULT, px: PX_WIDTH_DEFAULT }
    });
    (0, import_element116.useEffect)(() => {
      if (hasOnlyButton && !isSelected) {
        setAttributes({
          isSearchFieldHidden: true
        });
      }
    }, [hasOnlyButton, isSelected, setAttributes]);
    (0, import_element116.useEffect)(() => {
      if (!hasOnlyButton || !isSelected) {
        return;
      }
      setAttributes({
        isSearchFieldHidden: false
      });
    }, [hasOnlyButton, isSelected, setAttributes, width]);
    const getBlockClassNames = () => {
      return clsx_default(
        className,
        isButtonPositionInside ? "wp-block-search__button-inside" : void 0,
        isButtonPositionOutside ? "wp-block-search__button-outside" : void 0,
        hasNoButton ? "wp-block-search__no-button" : void 0,
        hasOnlyButton ? "wp-block-search__button-only" : void 0,
        !buttonUseIcon && !hasNoButton ? "wp-block-search__text-button" : void 0,
        buttonUseIcon && !hasNoButton ? "wp-block-search__icon-button" : void 0,
        hasOnlyButton && isSearchFieldHidden ? "wp-block-search__searchfield-hidden" : void 0
      );
    };
    const buttonPositionControls = [
      {
        label: (0, import_i18n220.__)("Button outside"),
        value: "button-outside"
      },
      {
        label: (0, import_i18n220.__)("Button inside"),
        value: "button-inside"
      },
      {
        label: (0, import_i18n220.__)("No button"),
        value: "no-button"
      },
      {
        label: (0, import_i18n220.__)("Button only"),
        value: "button-only"
      }
    ];
    const getResizableSides = () => {
      if (hasOnlyButton) {
        return {};
      }
      return {
        right: align !== "right",
        left: align === "right"
      };
    };
    const renderTextField = () => {
      const textFieldClasses = clsx_default(
        "wp-block-search__input",
        isButtonPositionInside ? void 0 : borderProps.className,
        typographyProps.className
      );
      const textFieldStyles = {
        ...isButtonPositionInside ? {
          borderRadius: borderProps.style?.borderRadius,
          borderTopLeftRadius: borderProps.style?.borderTopLeftRadius,
          borderTopRightRadius: borderProps.style?.borderTopRightRadius,
          borderBottomLeftRadius: borderProps.style?.borderBottomLeftRadius,
          borderBottomRightRadius: borderProps.style?.borderBottomRightRadius
        } : borderProps.style,
        ...typographyProps.style,
        textDecoration: void 0
      };
      return /* @__PURE__ */ (0, import_jsx_runtime421.jsx)(
        "input",
        {
          type: "search",
          className: textFieldClasses,
          style: textFieldStyles,
          "aria-label": (0, import_i18n220.__)("Optional placeholder text"),
          placeholder: placeholder2 ? void 0 : (0, import_i18n220.__)("Optional placeholder\u2026"),
          value: placeholder2,
          onChange: (event) => setAttributes({ placeholder: event.target.value }),
          ref: searchFieldRef
        }
      );
    };
    const renderButton = () => {
      const buttonClasses = clsx_default(
        "wp-block-search__button",
        colorProps.className,
        typographyProps.className,
        isButtonPositionInside ? void 0 : borderProps.className,
        buttonUseIcon ? "has-icon" : void 0,
        (0, import_block_editor231.__experimentalGetElementClassName)("button")
      );
      const buttonStyles = {
        ...colorProps.style,
        ...typographyProps.style,
        ...isButtonPositionInside ? {
          borderRadius: borderProps.style?.borderRadius,
          borderTopLeftRadius: borderProps.style?.borderTopLeftRadius,
          borderTopRightRadius: borderProps.style?.borderTopRightRadius,
          borderBottomLeftRadius: borderProps.style?.borderBottomLeftRadius,
          borderBottomRightRadius: borderProps.style?.borderBottomRightRadius
        } : borderProps.style
      };
      const handleButtonClick = () => {
        if (hasOnlyButton) {
          setAttributes({
            isSearchFieldHidden: !isSearchFieldHidden
          });
        }
      };
      return /* @__PURE__ */ (0, import_jsx_runtime421.jsxs)(import_jsx_runtime421.Fragment, { children: [
        buttonUseIcon && /* @__PURE__ */ (0, import_jsx_runtime421.jsx)(
          "button",
          {
            type: "button",
            className: buttonClasses,
            style: buttonStyles,
            "aria-label": buttonText ? (0, import_dom11.__unstableStripHTML)(buttonText) : (0, import_i18n220.__)("Search"),
            onClick: handleButtonClick,
            ref: buttonRef,
            children: /* @__PURE__ */ (0, import_jsx_runtime421.jsx)(icon_default, { icon: search_default })
          }
        ),
        !buttonUseIcon && /* @__PURE__ */ (0, import_jsx_runtime421.jsx)(
          import_block_editor231.RichText,
          {
            identifier: "buttonText",
            className: buttonClasses,
            style: buttonStyles,
            "aria-label": (0, import_i18n220.__)("Button text"),
            placeholder: (0, import_i18n220.__)("Add button text\u2026"),
            withoutInteractiveFormatting: true,
            value: buttonText,
            onChange: (html) => setAttributes({ buttonText: html }),
            onClick: handleButtonClick
          }
        )
      ] });
    };
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const controls = /* @__PURE__ */ (0, import_jsx_runtime421.jsx)(import_jsx_runtime421.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime421.jsx)(import_block_editor231.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime421.jsxs)(
      import_components145.__experimentalToolsPanel,
      {
        label: (0, import_i18n220.__)("Settings"),
        resetAll: () => {
          setAttributes({
            width: void 0,
            widthUnit: void 0,
            showLabel: true,
            buttonUseIcon: false,
            buttonPosition: "button-outside",
            isSearchFieldHidden: false
          });
        },
        dropdownMenuProps,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime421.jsx)(
            import_components145.__experimentalToolsPanelItem,
            {
              hasValue: () => !showLabel,
              label: (0, import_i18n220.__)("Show label"),
              onDeselect: () => {
                setAttributes({
                  showLabel: true
                });
              },
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime421.jsx)(
                import_components145.ToggleControl,
                {
                  checked: showLabel,
                  label: (0, import_i18n220.__)("Show label"),
                  onChange: (value) => setAttributes({
                    showLabel: value
                  })
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime421.jsx)(
            import_components145.__experimentalToolsPanelItem,
            {
              hasValue: () => buttonPosition !== "button-outside",
              label: (0, import_i18n220.__)("Button position"),
              onDeselect: () => {
                setAttributes({
                  buttonPosition: "button-outside",
                  isSearchFieldHidden: false
                });
              },
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime421.jsx)(
                import_components145.SelectControl,
                {
                  value: buttonPosition,
                  __next40pxDefaultSize: true,
                  label: (0, import_i18n220.__)("Button position"),
                  onChange: (value) => {
                    setAttributes({
                      buttonPosition: value,
                      isSearchFieldHidden: value === "button-only"
                    });
                  },
                  options: buttonPositionControls
                }
              )
            }
          ),
          buttonPosition !== "no-button" && /* @__PURE__ */ (0, import_jsx_runtime421.jsx)(
            import_components145.__experimentalToolsPanelItem,
            {
              hasValue: () => !!buttonUseIcon,
              label: (0, import_i18n220.__)("Use button with icon"),
              onDeselect: () => {
                setAttributes({
                  buttonUseIcon: false
                });
              },
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime421.jsx)(
                import_components145.ToggleControl,
                {
                  checked: buttonUseIcon,
                  label: (0, import_i18n220.__)("Use button with icon"),
                  onChange: (value) => setAttributes({
                    buttonUseIcon: value
                  })
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime421.jsx)(
            import_components145.__experimentalToolsPanelItem,
            {
              hasValue: () => !!width,
              label: (0, import_i18n220.__)("Width"),
              onDeselect: () => {
                setAttributes({
                  width: void 0,
                  widthUnit: void 0
                });
              },
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime421.jsxs)(import_components145.__experimentalVStack, { children: [
                /* @__PURE__ */ (0, import_jsx_runtime421.jsx)(
                  import_components145.__experimentalUnitControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n220.__)("Width"),
                    id: unitControlInputId,
                    min: isPercentageUnit(widthUnit) ? 0 : MIN_WIDTH,
                    max: isPercentageUnit(widthUnit) ? 100 : void 0,
                    step: 1,
                    onChange: (newWidth) => {
                      const parsedNewWidth = newWidth === "" ? void 0 : parseInt(newWidth, 10);
                      setAttributes({
                        width: parsedNewWidth
                      });
                    },
                    onUnitChange: (newUnit) => {
                      setAttributes({
                        width: "%" === newUnit ? PC_WIDTH_DEFAULT : PX_WIDTH_DEFAULT,
                        widthUnit: newUnit
                      });
                    },
                    __unstableInputWidth: "80px",
                    value: `${width}${widthUnit}`,
                    units
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime421.jsx)(
                  import_components145.__experimentalToggleGroupControl,
                  {
                    label: (0, import_i18n220.__)("Percentage Width"),
                    value: PERCENTAGE_WIDTHS.includes(width) && widthUnit === "%" ? width : void 0,
                    hideLabelFromVision: true,
                    onChange: (newWidth) => {
                      setAttributes({
                        width: newWidth,
                        widthUnit: "%"
                      });
                    },
                    isBlock: true,
                    __next40pxDefaultSize: true,
                    children: PERCENTAGE_WIDTHS.map((widthValue) => {
                      return /* @__PURE__ */ (0, import_jsx_runtime421.jsx)(
                        import_components145.__experimentalToggleGroupControlOption,
                        {
                          value: widthValue,
                          label: (0, import_i18n220.sprintf)(
                            /* translators: %d: Percentage value. */
                            (0, import_i18n220.__)("%d%%"),
                            widthValue
                          )
                        },
                        widthValue
                      );
                    })
                  }
                )
              ] })
            }
          )
        ]
      }
    ) }) });
    const isNonZeroBorderRadius = (radius) => radius !== void 0 && parseInt(radius, 10) !== 0;
    const padBorderRadius = (radius) => isNonZeroBorderRadius(radius) ? `calc(${radius} + ${DEFAULT_INNER_PADDING})` : void 0;
    const getWrapperStyles = () => {
      const styles = isButtonPositionInside ? borderProps.style : {
        borderRadius: borderProps.style?.borderRadius,
        borderTopLeftRadius: borderProps.style?.borderTopLeftRadius,
        borderTopRightRadius: borderProps.style?.borderTopRightRadius,
        borderBottomLeftRadius: borderProps.style?.borderBottomLeftRadius,
        borderBottomRightRadius: borderProps.style?.borderBottomRightRadius
      };
      if (isButtonPositionInside) {
        if (typeof borderRadius === "object") {
          const {
            borderTopLeftRadius,
            borderTopRightRadius,
            borderBottomLeftRadius,
            borderBottomRightRadius
          } = borderProps.style;
          return {
            ...styles,
            borderTopLeftRadius: padBorderRadius(borderTopLeftRadius),
            borderTopRightRadius: padBorderRadius(borderTopRightRadius),
            borderBottomLeftRadius: padBorderRadius(
              borderBottomLeftRadius
            ),
            borderBottomRightRadius: padBorderRadius(
              borderBottomRightRadius
            )
          };
        }
        const radius = Number.isInteger(borderRadius) ? `${borderRadius}px` : borderRadius;
        styles.borderRadius = `calc(${radius} + ${DEFAULT_INNER_PADDING})`;
      }
      return styles;
    };
    const blockProps = (0, import_block_editor231.useBlockProps)({
      className: getBlockClassNames(),
      style: {
        ...typographyProps.style,
        // Input opts out of text decoration.
        textDecoration: void 0
      }
    });
    const labelClassnames = clsx_default(
      "wp-block-search__label",
      typographyProps.className
    );
    return /* @__PURE__ */ (0, import_jsx_runtime421.jsxs)("div", { ...blockProps, children: [
      controls,
      showLabel && /* @__PURE__ */ (0, import_jsx_runtime421.jsx)(
        import_block_editor231.RichText,
        {
          identifier: "label",
          className: labelClassnames,
          "aria-label": (0, import_i18n220.__)("Label text"),
          placeholder: (0, import_i18n220.__)("Add label\u2026"),
          withoutInteractiveFormatting: true,
          value: label,
          onChange: (html) => setAttributes({ label: html }),
          style: typographyProps.style
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime421.jsxs)(
        import_components145.ResizableBox,
        {
          size: {
            width: width === void 0 ? "auto" : `${width}${widthUnit}`,
            height: "auto"
          },
          className: clsx_default(
            "wp-block-search__inside-wrapper",
            isButtonPositionInside ? borderProps.className : void 0
          ),
          style: getWrapperStyles(),
          minWidth: MIN_WIDTH,
          enable: getResizableSides(),
          onResizeStart: (event, direction, elt) => {
            setAttributes({
              width: parseInt(elt.offsetWidth, 10),
              widthUnit: "px"
            });
            toggleSelection(false);
          },
          onResizeStop: (event, direction, elt, delta) => {
            setAttributes({
              width: parseInt(width + delta.width, 10)
            });
            toggleSelection(true);
          },
          showHandle: isSelected,
          children: [
            (isButtonPositionInside || isButtonPositionOutside || hasOnlyButton) && /* @__PURE__ */ (0, import_jsx_runtime421.jsxs)(import_jsx_runtime421.Fragment, { children: [
              renderTextField(),
              renderButton()
            ] }),
            hasNoButton && renderTextField()
          ]
        }
      )
    ] });
  }

  // packages/block-library/build-module/search/variations.mjs
  var import_i18n221 = __toESM(require_i18n(), 1);
  var variations15 = [
    {
      name: "default",
      isDefault: true,
      attributes: { buttonText: (0, import_i18n221.__)("Search"), label: (0, import_i18n221.__)("Search") }
    }
  ];
  var variations_default15 = variations15;

  // packages/block-library/build-module/search/index.mjs
  var { fieldsKey: fieldsKey17, formKey: formKey17 } = unlock(import_blocks102.privateApis);
  var { name: name96 } = block_default95;
  var settings95 = {
    icon: search_default,
    example: {
      attributes: { buttonText: (0, import_i18n222.__)("Search"), label: (0, import_i18n222.__)("Search") },
      viewportWidth: 400
    },
    variations: variations_default15,
    edit: SearchEdit
  };
  if (window.__experimentalContentOnlyInspectorFields) {
    settings95[fieldsKey17] = [
      {
        id: "label",
        label: (0, import_i18n222.__)("Label"),
        type: "text",
        Edit: "rich-text"
        // TODO: replace with custom component
      },
      {
        id: "buttonText",
        label: (0, import_i18n222.__)("Button text"),
        type: "text",
        Edit: "rich-text"
        // TODO: replace with custom component
      },
      {
        id: "placeholder",
        label: (0, import_i18n222.__)("Placeholder"),
        type: "text",
        Edit: "rich-text"
        // TODO: replace with custom component
      }
    ];
    settings95[formKey17] = {
      fields: ["label", "buttonText", "placeholder"]
    };
  }
  var init95 = () => initBlock({ name: name96, metadata: block_default95, settings: settings95 });

  // packages/block-library/build-module/separator/index.mjs
  var separator_exports = {};
  __export(separator_exports, {
    init: () => init96,
    metadata: () => block_default96,
    name: () => name97,
    settings: () => settings96
  });

  // packages/block-library/build-module/separator/edit.mjs
  var import_block_editor232 = __toESM(require_block_editor(), 1);
  var import_components146 = __toESM(require_components(), 1);
  var import_i18n223 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/separator/use-deprecated-opacity.mjs
  var import_element117 = __toESM(require_element(), 1);
  var import_compose53 = __toESM(require_compose(), 1);
  function useDeprecatedOpacity(opacity, currentColor, setAttributes) {
    const [deprecatedOpacityWithNoColor, setDeprecatedOpacityWithNoColor] = (0, import_element117.useState)(false);
    const previousColor = (0, import_compose53.usePrevious)(currentColor);
    (0, import_element117.useEffect)(() => {
      if (opacity === "css" && !currentColor && !previousColor) {
        setDeprecatedOpacityWithNoColor(true);
      }
    }, [currentColor, previousColor, opacity]);
    (0, import_element117.useEffect)(() => {
      if (opacity === "css" && (deprecatedOpacityWithNoColor && currentColor || previousColor && currentColor !== previousColor)) {
        setAttributes({ opacity: "alpha-channel" });
        setDeprecatedOpacityWithNoColor(false);
      }
    }, [deprecatedOpacityWithNoColor, currentColor, previousColor]);
  }

  // packages/block-library/build-module/separator/edit.mjs
  var import_jsx_runtime422 = __toESM(require_jsx_runtime(), 1);
  var HtmlElementControl = ({ tagName, setAttributes }) => {
    return /* @__PURE__ */ (0, import_jsx_runtime422.jsx)(
      import_components146.SelectControl,
      {
        label: (0, import_i18n223.__)("HTML element"),
        value: tagName,
        onChange: (newValue) => setAttributes({ tagName: newValue }),
        options: [
          { label: (0, import_i18n223.__)("Default (<hr>)"), value: "hr" },
          { label: "<div>", value: "div" }
        ],
        help: tagName === "hr" ? (0, import_i18n223.__)(
          "Only select <hr> if the separator conveys important information and should be announced by screen readers."
        ) : (0, import_i18n223.__)(
          "The <div> element should only be used if the block is a design element with no semantic meaning."
        ),
        __next40pxDefaultSize: true
      }
    );
  };
  function SeparatorEdit({ attributes: attributes2, setAttributes }) {
    const { backgroundColor, opacity, style: style2, tagName } = attributes2;
    const colorProps = (0, import_block_editor232.__experimentalUseColorProps)(attributes2);
    const currentColor = colorProps?.style?.backgroundColor;
    const hasCustomColor = !!style2?.color?.background;
    useDeprecatedOpacity(opacity, currentColor, setAttributes);
    const colorClass = (0, import_block_editor232.getColorClassName)("color", backgroundColor);
    const className = clsx_default(
      {
        "has-text-color": backgroundColor || currentColor,
        [colorClass]: colorClass,
        "has-css-opacity": opacity === "css",
        "has-alpha-channel-opacity": opacity === "alpha-channel"
      },
      colorProps.className
    );
    const styles = {
      color: currentColor,
      backgroundColor: currentColor
    };
    const Wrapper = tagName === "hr" ? import_components146.HorizontalRule : tagName;
    return /* @__PURE__ */ (0, import_jsx_runtime422.jsxs)(import_jsx_runtime422.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime422.jsx)(import_block_editor232.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime422.jsx)(
        HtmlElementControl,
        {
          tagName,
          setAttributes
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime422.jsx)(
        Wrapper,
        {
          ...(0, import_block_editor232.useBlockProps)({
            className,
            style: hasCustomColor ? styles : void 0
          })
        }
      )
    ] });
  }

  // packages/block-library/build-module/separator/block.json
  var block_default96 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/separator",
    title: "Separator",
    category: "design",
    description: "Create a break between ideas or sections with a horizontal separator.",
    keywords: ["horizontal-line", "hr", "divider"],
    textdomain: "default",
    attributes: {
      opacity: {
        type: "string",
        default: "alpha-channel"
      },
      tagName: {
        type: "string",
        enum: ["hr", "div"],
        default: "hr"
      }
    },
    supports: {
      anchor: true,
      align: ["center", "wide", "full"],
      color: {
        enableContrastChecker: false,
        __experimentalSkipSerialization: true,
        gradients: true,
        background: true,
        text: false,
        __experimentalDefaultControls: {
          background: true
        }
      },
      spacing: {
        margin: ["top", "bottom"]
      },
      interactivity: {
        clientNavigation: true
      }
    },
    styles: [
      { name: "default", label: "Default", isDefault: true },
      { name: "wide", label: "Wide Line" },
      { name: "dots", label: "Dots" }
    ],
    editorStyle: "wp-block-separator-editor",
    style: "wp-block-separator"
  };

  // packages/block-library/build-module/separator/save.mjs
  var import_block_editor233 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime423 = __toESM(require_jsx_runtime(), 1);
  function separatorSave({ attributes: attributes2 }) {
    const { backgroundColor, style: style2, opacity, tagName: Tag } = attributes2;
    const customColor = style2?.color?.background;
    const colorProps = (0, import_block_editor233.__experimentalGetColorClassesAndStyles)(attributes2);
    const colorClass = (0, import_block_editor233.getColorClassName)("color", backgroundColor);
    const className = clsx_default(
      {
        "has-text-color": backgroundColor || customColor,
        [colorClass]: colorClass,
        "has-css-opacity": opacity === "css",
        "has-alpha-channel-opacity": opacity === "alpha-channel"
      },
      colorProps.className
    );
    const styles = {
      backgroundColor: colorProps?.style?.backgroundColor,
      color: colorClass ? void 0 : customColor
    };
    return /* @__PURE__ */ (0, import_jsx_runtime423.jsx)(Tag, { ...import_block_editor233.useBlockProps.save({ className, style: styles }) });
  }

  // packages/block-library/build-module/separator/transforms.mjs
  var import_blocks103 = __toESM(require_blocks(), 1);
  var transforms29 = {
    from: [
      {
        type: "input",
        regExp: /^-{3,}$/,
        transform: () => [
          (0, import_blocks103.createBlock)("core/separator"),
          (0, import_blocks103.createBlock)((0, import_blocks103.getDefaultBlockName)())
        ]
      },
      {
        type: "raw",
        selector: "hr",
        schema: {
          hr: {}
        }
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/spacer"],
        // Transform to Spacer.
        transform: ({ anchor }) => {
          return (0, import_blocks103.createBlock)("core/spacer", {
            anchor: anchor || void 0
          });
        }
      }
    ]
  };
  var transforms_default30 = transforms29;

  // packages/block-library/build-module/separator/deprecated.mjs
  var import_block_editor234 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime424 = __toESM(require_jsx_runtime(), 1);
  var v140 = {
    attributes: {
      color: {
        type: "string"
      },
      customColor: {
        type: "string"
      }
    },
    save({ attributes: attributes2 }) {
      const { color, customColor } = attributes2;
      const backgroundClass = (0, import_block_editor234.getColorClassName)("background-color", color);
      const colorClass = (0, import_block_editor234.getColorClassName)("color", color);
      const className = clsx_default({
        "has-text-color has-background": color || customColor,
        [backgroundClass]: backgroundClass,
        [colorClass]: colorClass
      });
      const style2 = {
        backgroundColor: backgroundClass ? void 0 : customColor,
        color: colorClass ? void 0 : customColor
      };
      return /* @__PURE__ */ (0, import_jsx_runtime424.jsx)("hr", { ...import_block_editor234.useBlockProps.save({ className, style: style2 }) });
    },
    migrate(attributes2) {
      const { color, customColor, ...restAttributes } = attributes2;
      return {
        ...restAttributes,
        backgroundColor: color ? color : void 0,
        opacity: "css",
        style: customColor ? { color: { background: customColor } } : void 0,
        tagName: "hr"
      };
    }
  };
  var deprecated_default45 = [v140];

  // packages/block-library/build-module/separator/index.mjs
  var { name: name97 } = block_default96;
  var settings96 = {
    icon: separator_default,
    example: {
      attributes: {
        customColor: "#065174",
        className: "is-style-wide"
      }
    },
    transforms: transforms_default30,
    edit: SeparatorEdit,
    save: separatorSave,
    deprecated: deprecated_default45
  };
  var init96 = () => initBlock({ name: name97, metadata: block_default96, settings: settings96 });

  // packages/block-library/build-module/shortcode/index.mjs
  var shortcode_exports = {};
  __export(shortcode_exports, {
    init: () => init97,
    metadata: () => block_default97,
    name: () => name98,
    settings: () => settings97
  });

  // packages/block-library/build-module/shortcode/edit.mjs
  var import_i18n224 = __toESM(require_i18n(), 1);
  var import_block_editor235 = __toESM(require_block_editor(), 1);
  var import_compose54 = __toESM(require_compose(), 1);
  var import_components147 = __toESM(require_components(), 1);
  var import_jsx_runtime425 = __toESM(require_jsx_runtime(), 1);
  function ShortcodeEdit({ attributes: attributes2, setAttributes }) {
    const instanceId = (0, import_compose54.useInstanceId)(ShortcodeEdit);
    const inputId = `blocks-shortcode-input-${instanceId}`;
    return /* @__PURE__ */ (0, import_jsx_runtime425.jsx)("div", { ...(0, import_block_editor235.useBlockProps)(), children: /* @__PURE__ */ (0, import_jsx_runtime425.jsx)(import_components147.Placeholder, { icon: shortcode_default, label: (0, import_i18n224.__)("Shortcode"), children: /* @__PURE__ */ (0, import_jsx_runtime425.jsx)(
      import_block_editor235.PlainText,
      {
        className: "blocks-shortcode__textarea",
        id: inputId,
        value: attributes2.text,
        "aria-label": (0, import_i18n224.__)("Shortcode text"),
        placeholder: (0, import_i18n224.__)("Write shortcode here\u2026"),
        onChange: (text) => setAttributes({ text })
      }
    ) }) });
  }

  // packages/block-library/build-module/shortcode/save.mjs
  var import_element118 = __toESM(require_element(), 1);
  var import_jsx_runtime426 = __toESM(require_jsx_runtime(), 1);
  function save45({ attributes: attributes2 }) {
    return /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(import_element118.RawHTML, { children: attributes2.text });
  }

  // packages/block-library/build-module/shortcode/transforms.mjs
  var import_autop = __toESM(require_autop(), 1);
  var transforms30 = {
    from: [
      {
        type: "shortcode",
        // Per "Shortcode names should be all lowercase and use all
        // letters, but numbers and underscores should work fine too.
        // Be wary of using hyphens (dashes), you'll be better off not
        // using them." in https://codex.wordpress.org/Shortcode_API
        // Require that the first character be a letter. This notably
        // prevents footnote markings ([1]) from being caught as
        // shortcodes.
        tag: "[a-z][a-z0-9_-]*",
        attributes: {
          text: {
            type: "string",
            shortcode: (attrs, { content }) => {
              return (0, import_autop.removep)((0, import_autop.autop)(content));
            }
          }
        },
        priority: 20
      }
    ]
  };
  var transforms_default31 = transforms30;

  // packages/block-library/build-module/shortcode/block.json
  var block_default97 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/shortcode",
    title: "Shortcode",
    category: "widgets",
    description: "Insert additional custom elements with a WordPress shortcode.",
    textdomain: "default",
    attributes: {
      text: {
        type: "string",
        source: "raw",
        role: "content"
      }
    },
    supports: {
      className: false,
      customClassName: false,
      html: false,
      customCSS: false,
      visibility: false
    },
    editorStyle: "wp-block-shortcode-editor"
  };

  // packages/block-library/build-module/shortcode/index.mjs
  var { name: name98 } = block_default97;
  var settings97 = {
    icon: shortcode_default,
    transforms: transforms_default31,
    edit: ShortcodeEdit,
    save: save45
  };
  var init97 = () => initBlock({ name: name98, metadata: block_default97, settings: settings97 });

  // packages/block-library/build-module/site-logo/index.mjs
  var site_logo_exports = {};
  __export(site_logo_exports, {
    init: () => init98,
    metadata: () => block_default98,
    name: () => name99,
    settings: () => settings98
  });

  // packages/block-library/build-module/site-logo/block.json
  var block_default98 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/site-logo",
    title: "Site Logo",
    category: "theme",
    description: "Display an image to represent this site. Update this block and the changes apply everywhere.",
    textdomain: "default",
    attributes: {
      width: {
        type: "number"
      },
      isLink: {
        type: "boolean",
        default: true,
        role: "content"
      },
      linkTarget: {
        type: "string",
        default: "_self",
        role: "content"
      },
      shouldSyncIcon: {
        type: "boolean"
      }
    },
    example: {
      viewportWidth: 500,
      attributes: {
        width: 350,
        className: "block-editor-block-types-list__site-logo-example"
      }
    },
    supports: {
      anchor: true,
      html: false,
      align: true,
      alignWide: false,
      color: {
        text: false,
        background: false
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      interactivity: {
        clientNavigation: true
      },
      filter: {
        duotone: true
      }
    },
    styles: [
      {
        name: "default",
        label: "Default",
        isDefault: true
      },
      { name: "rounded", label: "Rounded" }
    ],
    selectors: {
      filter: {
        duotone: ".wp-block-site-logo img, .wp-block-site-logo .components-placeholder__illustration, .wp-block-site-logo .components-placeholder::before"
      }
    },
    editorStyle: "wp-block-site-logo-editor",
    style: "wp-block-site-logo"
  };

  // packages/block-library/build-module/site-logo/edit.mjs
  var import_blob18 = __toESM(require_blob(), 1);
  var import_element119 = __toESM(require_element(), 1);
  var import_i18n225 = __toESM(require_i18n(), 1);
  var import_components148 = __toESM(require_components(), 1);
  var import_compose55 = __toESM(require_compose(), 1);
  var import_block_editor236 = __toESM(require_block_editor(), 1);
  var import_data131 = __toESM(require_data(), 1);
  var import_core_data79 = __toESM(require_core_data(), 1);
  var import_notices17 = __toESM(require_notices(), 1);
  var import_jsx_runtime427 = __toESM(require_jsx_runtime(), 1);
  var ALLOWED_MEDIA_TYPES9 = ["image"];
  var SiteLogo = ({
    alt,
    attributes: { align, width, height, isLink, linkTarget, shouldSyncIcon },
    isSelected,
    setAttributes,
    setLogo,
    logoUrl,
    siteUrl,
    logoId,
    iconId,
    setIcon,
    canUserEdit
  }) => {
    const isLargeViewport = (0, import_compose55.useViewportMatch)("medium");
    const isWideAligned = ["wide", "full"].includes(align);
    const isResizable = !isWideAligned && isLargeViewport;
    const [{ naturalWidth, naturalHeight }, setNaturalSize] = (0, import_element119.useState)({});
    const [isEditingImage, setIsEditingImage] = (0, import_element119.useState)(false);
    const { toggleSelection } = (0, import_data131.useDispatch)(import_block_editor236.store);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const blockEditingMode = (0, import_block_editor236.useBlockEditingMode)();
    const isContentOnlyMode = blockEditingMode === "contentOnly";
    const { imageEditing, maxWidth, title } = (0, import_data131.useSelect)((select9) => {
      const settings122 = select9(import_block_editor236.store).getSettings();
      const siteEntities = select9(import_core_data79.store).getEntityRecord(
        "root",
        "__unstableBase"
      );
      return {
        title: siteEntities?.name,
        imageEditing: settings122.imageEditing,
        maxWidth: settings122.maxWidth
      };
    }, []);
    (0, import_element119.useEffect)(() => {
      if (shouldSyncIcon && logoId !== iconId) {
        setAttributes({ shouldSyncIcon: false });
      }
    }, []);
    (0, import_element119.useEffect)(() => {
      if (!isSelected) {
        setIsEditingImage(false);
      }
    }, [isSelected]);
    function onResizeStart() {
      toggleSelection(false);
    }
    function onResizeStop() {
      toggleSelection(true);
    }
    const img = /* @__PURE__ */ (0, import_jsx_runtime427.jsxs)(import_jsx_runtime427.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
        "img",
        {
          className: "custom-logo",
          src: logoUrl,
          alt,
          onLoad: (event) => {
            setNaturalSize({
              naturalWidth: event.target.naturalWidth,
              naturalHeight: event.target.naturalHeight
            });
          }
        }
      ),
      (0, import_blob18.isBlobURL)(logoUrl) && /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(import_components148.Spinner, {})
    ] });
    let imgWrapper = img;
    if (isLink) {
      imgWrapper = /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
        "a",
        {
          href: siteUrl,
          className: "custom-logo-link",
          rel: "home",
          title,
          onClick: (event) => event.preventDefault(),
          children: img
        }
      );
    }
    if (!isResizable || !naturalWidth || !naturalHeight) {
      return /* @__PURE__ */ (0, import_jsx_runtime427.jsx)("div", { style: { width, height }, children: imgWrapper });
    }
    const defaultWidth = 120;
    const currentWidth = width || defaultWidth;
    const ratio = naturalWidth / naturalHeight;
    const currentHeight = currentWidth / ratio;
    const minWidth = naturalWidth < naturalHeight ? MIN_SIZE2 : Math.ceil(MIN_SIZE2 * ratio);
    const minHeight = naturalHeight < naturalWidth ? MIN_SIZE2 : Math.ceil(MIN_SIZE2 / ratio);
    const maxWidthBuffer = maxWidth * 2.5;
    let showRightHandle = false;
    let showLeftHandle = false;
    if (align === "center") {
      showRightHandle = true;
      showLeftHandle = true;
    } else if ((0, import_i18n225.isRTL)()) {
      if (align === "left") {
        showRightHandle = true;
      } else {
        showLeftHandle = true;
      }
    } else {
      if (align === "right") {
        showLeftHandle = true;
      } else {
        showRightHandle = true;
      }
    }
    const canEditImage = logoId && naturalWidth && naturalHeight && imageEditing;
    const shouldShowCropAndDimensions = !isContentOnlyMode;
    let imgEdit;
    if (canEditImage && isEditingImage) {
      imgEdit = /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
        import_block_editor236.__experimentalImageEditor,
        {
          id: logoId,
          url: logoUrl,
          width: currentWidth,
          height: currentHeight,
          naturalHeight,
          naturalWidth,
          onSaveImage: (imageAttributes) => {
            setLogo(imageAttributes.id);
          },
          onFinishEditing: () => {
            setIsEditingImage(false);
          }
        }
      );
    } else {
      imgEdit = /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
        import_components148.ResizableBox,
        {
          size: {
            width: currentWidth,
            height: currentHeight
          },
          showHandle: isSelected && shouldShowCropAndDimensions,
          minWidth,
          maxWidth: maxWidthBuffer,
          minHeight,
          maxHeight: maxWidthBuffer / ratio,
          lockAspectRatio: true,
          enable: {
            top: false,
            right: showRightHandle,
            bottom: true,
            left: showLeftHandle
          },
          onResizeStart,
          onResizeStop: (event, direction, elt, delta) => {
            onResizeStop();
            setAttributes({
              width: parseInt(currentWidth + delta.width, 10),
              height: parseInt(currentHeight + delta.height, 10)
            });
          },
          children: imgWrapper
        }
      );
    }
    const shouldUseNewUrl = !window?.__experimentalUseCustomizerSiteLogoUrl;
    const siteIconSettingsUrl = shouldUseNewUrl ? siteUrl + "/wp-admin/options-general.php" : siteUrl + "/wp-admin/customize.php?autofocus[section]=title_tagline";
    const syncSiteIconHelpText = (0, import_element119.createInterpolateElement)(
      (0, import_i18n225.__)(
        "Site Icons are what you see in browser tabs, bookmark bars, and within the WordPress mobile apps. To use a custom icon that is different from your site logo, use the <a>Site Icon settings</a>."
      ),
      {
        a: (
          // eslint-disable-next-line jsx-a11y/anchor-has-content
          /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
            "a",
            {
              href: siteIconSettingsUrl,
              target: "_blank",
              rel: "noopener noreferrer"
            }
          )
        )
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime427.jsxs)(import_jsx_runtime427.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(import_block_editor236.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime427.jsxs)(
        import_components148.__experimentalToolsPanel,
        {
          label: (0, import_i18n225.__)("Settings"),
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
              import_components148.__experimentalToolsPanelItem,
              {
                isShownByDefault: true,
                hasValue: () => !!width,
                label: (0, import_i18n225.__)("Image width"),
                onDeselect: () => setAttributes({ width: void 0 }),
                children: /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
                  import_components148.RangeControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n225.__)("Image width"),
                    onChange: (newWidth) => setAttributes({ width: newWidth }),
                    min: minWidth,
                    max: maxWidthBuffer,
                    initialPosition: Math.min(
                      defaultWidth,
                      maxWidthBuffer
                    ),
                    value: width || "",
                    disabled: !isResizable
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
              import_components148.__experimentalToolsPanelItem,
              {
                isShownByDefault: true,
                hasValue: () => !isLink,
                label: (0, import_i18n225.__)("Link image to home"),
                onDeselect: () => setAttributes({ isLink: true }),
                children: /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
                  import_components148.ToggleControl,
                  {
                    label: (0, import_i18n225.__)("Link image to home"),
                    onChange: () => setAttributes({ isLink: !isLink }),
                    checked: isLink
                  }
                )
              }
            ),
            isLink && /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
              import_components148.__experimentalToolsPanelItem,
              {
                isShownByDefault: true,
                hasValue: () => linkTarget === "_blank",
                label: (0, import_i18n225.__)("Open in new tab"),
                onDeselect: () => setAttributes({ linkTarget: "_self" }),
                children: /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
                  import_components148.ToggleControl,
                  {
                    label: (0, import_i18n225.__)("Open in new tab"),
                    onChange: (value) => setAttributes({
                      linkTarget: value ? "_blank" : "_self"
                    }),
                    checked: linkTarget === "_blank"
                  }
                )
              }
            ),
            canUserEdit && /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
              import_components148.__experimentalToolsPanelItem,
              {
                isShownByDefault: true,
                hasValue: () => !!shouldSyncIcon,
                label: (0, import_i18n225.__)("Use as Site Icon"),
                onDeselect: () => {
                  setAttributes({ shouldSyncIcon: false });
                  setIcon(void 0);
                },
                children: /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
                  import_components148.ToggleControl,
                  {
                    label: (0, import_i18n225.__)("Use as Site Icon"),
                    onChange: (value) => {
                      setAttributes({ shouldSyncIcon: value });
                      setIcon(value ? logoId : void 0);
                    },
                    checked: !!shouldSyncIcon,
                    help: syncSiteIconHelpText
                  }
                )
              }
            )
          ]
        }
      ) }),
      canEditImage && !isEditingImage && shouldShowCropAndDimensions && /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(import_block_editor236.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
        import_components148.ToolbarButton,
        {
          onClick: () => setIsEditingImage(true),
          icon: crop_default,
          label: (0, import_i18n225.__)("Crop")
        }
      ) }),
      imgEdit
    ] });
  };
  function LogoEdit({
    attributes: attributes2,
    className,
    setAttributes,
    isSelected
  }) {
    const { width, shouldSyncIcon } = attributes2;
    const {
      siteLogoId,
      canUserEdit,
      url,
      siteIconId,
      mediaItemData,
      isRequestingMediaItem
    } = (0, import_data131.useSelect)((select9) => {
      const { canUser, getEntityRecord, getEditedEntityRecord } = select9(import_core_data79.store);
      const _canUserEdit = canUser("update", {
        kind: "root",
        name: "site"
      });
      const siteSettings = _canUserEdit ? getEditedEntityRecord("root", "site") : void 0;
      const siteData = getEntityRecord("root", "__unstableBase");
      const _siteLogoId = _canUserEdit ? siteSettings?.site_logo : siteData?.site_logo;
      const _siteIconId = siteSettings?.site_icon;
      const mediaItem = _siteLogoId && select9(import_core_data79.store).getEntityRecord(
        "postType",
        "attachment",
        _siteLogoId,
        {
          context: "view"
        }
      );
      const _isRequestingMediaItem = !!_siteLogoId && !select9(import_core_data79.store).hasFinishedResolution("getEntityRecord", [
        "postType",
        "attachment",
        _siteLogoId,
        { context: "view" }
      ]);
      return {
        siteLogoId: _siteLogoId,
        canUserEdit: _canUserEdit,
        url: siteData?.home,
        mediaItemData: mediaItem,
        isRequestingMediaItem: _isRequestingMediaItem,
        siteIconId: _siteIconId
      };
    }, []);
    const { getSettings: getSettings2 } = (0, import_data131.useSelect)(import_block_editor236.store);
    const [temporaryURL, setTemporaryURL] = (0, import_element119.useState)();
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const { editEntityRecord } = (0, import_data131.useDispatch)(import_core_data79.store);
    const setLogo = (newValue, shouldForceSync = false) => {
      if (shouldSyncIcon || shouldForceSync) {
        setIcon(newValue);
      }
      editEntityRecord("root", "site", void 0, {
        site_logo: newValue
      });
    };
    const setIcon = (newValue) => (
      // The new value needs to be `null` to reset the Site Icon.
      editEntityRecord("root", "site", void 0, {
        site_icon: newValue ?? null
      })
    );
    const { alt_text: alt, source_url: logoUrl } = mediaItemData ?? {};
    const onInitialSelectLogo = (media) => {
      if (shouldSyncIcon === void 0) {
        const shouldForceSync = !siteIconId;
        setAttributes({ shouldSyncIcon: shouldForceSync });
        onSelectLogo(media, shouldForceSync);
        return;
      }
      onSelectLogo(media);
    };
    const onSelectLogo = (media, shouldForceSync = false) => {
      if (!media) {
        return;
      }
      if (!media.id && media.url) {
        setTemporaryURL(media.url);
        setLogo(void 0);
        return;
      }
      setLogo(media.id, shouldForceSync);
    };
    const onRemoveLogo = () => {
      setLogo(null);
      setAttributes({ width: void 0 });
    };
    const { createErrorNotice } = (0, import_data131.useDispatch)(import_notices17.store);
    const onUploadError = (message) => {
      createErrorNotice(message, { type: "snackbar" });
      setTemporaryURL();
    };
    const onFilesDrop = (filesList) => {
      getSettings2().mediaUpload({
        allowedTypes: ALLOWED_MEDIA_TYPES9,
        filesList,
        onFileChange([image]) {
          if ((0, import_blob18.isBlobURL)(image?.url)) {
            setTemporaryURL(image.url);
            return;
          }
          onInitialSelectLogo(image);
        },
        onError: onUploadError,
        multiple: false
      });
    };
    const mediaReplaceFlowProps = {
      mediaURL: logoUrl,
      name: !logoUrl ? (0, import_i18n225.__)("Choose logo") : (0, import_i18n225.__)("Replace"),
      onSelect: onSelectLogo,
      onError: onUploadError,
      onReset: onRemoveLogo
    };
    const controls = canUserEdit && /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(import_block_editor236.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
      import_block_editor236.MediaReplaceFlow,
      {
        ...mediaReplaceFlowProps,
        allowedTypes: ALLOWED_MEDIA_TYPES9,
        variant: "toolbar"
      }
    ) });
    let logoImage;
    const isLoading = siteLogoId === void 0 || isRequestingMediaItem;
    if (isLoading) {
      logoImage = /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(import_components148.Spinner, {});
    }
    (0, import_element119.useEffect)(() => {
      if (logoUrl && temporaryURL) {
        setTemporaryURL();
      }
    }, [logoUrl, temporaryURL]);
    if (!!logoUrl || !!temporaryURL) {
      logoImage = /* @__PURE__ */ (0, import_jsx_runtime427.jsxs)(import_jsx_runtime427.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
          SiteLogo,
          {
            alt,
            attributes: attributes2,
            className,
            isSelected,
            setAttributes,
            logoUrl: temporaryURL || logoUrl,
            setLogo,
            logoId: mediaItemData?.id || siteLogoId,
            siteUrl: url,
            setIcon,
            iconId: siteIconId,
            canUserEdit
          }
        ),
        canUserEdit && /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(import_components148.DropZone, { onFilesDrop })
      ] });
    }
    const placeholder2 = (content) => {
      const placeholderClassName = clsx_default(
        "block-editor-media-placeholder",
        className
      );
      return /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
        import_components148.Placeholder,
        {
          className: placeholderClassName,
          preview: logoImage,
          withIllustration: true,
          style: {
            width
          },
          children: content
        }
      );
    };
    const classes = clsx_default(className, {
      "is-default-size": !width,
      "is-transient": temporaryURL
    });
    const blockProps = (0, import_block_editor236.useBlockProps)({ className: classes });
    const mediaInspectorPanel = (canUserEdit || logoUrl) && /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(import_block_editor236.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
      import_components148.__experimentalToolsPanel,
      {
        label: (0, import_i18n225.__)("Media"),
        dropdownMenuProps,
        children: !canUserEdit ? /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
          "div",
          {
            className: "block-library-site-logo__inspector-media-replace-container",
            style: { gridColumn: "1 / -1" },
            children: /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
              MediaControlPreview,
              {
                url: mediaItemData?.source_url,
                alt: mediaItemData?.alt_text,
                filename: mediaItemData?.media_details?.sizes?.full?.file || mediaItemData?.slug,
                itemGroupProps: {
                  isBordered: true,
                  className: "block-library-site-logo__inspector-readonly-logo-preview"
                },
                className: "block-library-site-logo__inspector-media-replace-title"
              }
            )
          }
        ) : /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
          import_components148.__experimentalToolsPanelItem,
          {
            hasValue: () => !!logoUrl,
            label: (0, import_i18n225.__)("Logo"),
            isShownByDefault: true,
            children: /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
              MediaControl,
              {
                mediaId: siteLogoId,
                mediaUrl: logoUrl,
                alt: mediaItemData?.alt_text,
                filename: mediaItemData?.media_details?.sizes?.full?.file || mediaItemData?.slug,
                allowedTypes: ALLOWED_MEDIA_TYPES9,
                onSelect: onSelectLogo,
                onError: onUploadError,
                onReset: onRemoveLogo,
                isUploading: !!temporaryURL,
                emptyLabel: (0, import_i18n225.__)("Choose logo")
              }
            )
          }
        )
      }
    ) });
    return /* @__PURE__ */ (0, import_jsx_runtime427.jsxs)("div", { ...blockProps, children: [
      controls,
      mediaInspectorPanel,
      (!!logoUrl || !!temporaryURL) && logoImage,
      (isLoading || !temporaryURL && !logoUrl && !canUserEdit) && /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(import_components148.Placeholder, { className: "site-logo_placeholder", withIllustration: true, children: isLoading && /* @__PURE__ */ (0, import_jsx_runtime427.jsx)("span", { className: "components-placeholder__preview", children: /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(import_components148.Spinner, {}) }) }),
      !isLoading && !temporaryURL && !logoUrl && canUserEdit && /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
        import_block_editor236.MediaPlaceholder,
        {
          onSelect: onInitialSelectLogo,
          allowedTypes: ALLOWED_MEDIA_TYPES9,
          onError: onUploadError,
          placeholder: placeholder2,
          mediaLibraryButton: ({ open }) => {
            return /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
              import_components148.Button,
              {
                __next40pxDefaultSize: true,
                icon: upload_default,
                variant: "primary",
                label: (0, import_i18n225.__)("Choose logo"),
                showTooltip: true,
                tooltipPosition: "middle right",
                onClick: () => {
                  open();
                }
              }
            );
          }
        }
      )
    ] });
  }

  // packages/block-library/build-module/site-logo/transforms.mjs
  var import_blocks104 = __toESM(require_blocks(), 1);
  var transforms31 = {
    to: [
      {
        type: "block",
        blocks: ["core/site-title"],
        transform: ({ isLink, linkTarget }) => {
          return (0, import_blocks104.createBlock)("core/site-title", {
            isLink,
            linkTarget
          });
        }
      }
    ]
  };
  var transforms_default32 = transforms31;

  // packages/block-library/build-module/site-logo/index.mjs
  var { name: name99 } = block_default98;
  var settings98 = {
    icon: site_logo_default,
    example: {},
    edit: LogoEdit,
    transforms: transforms_default32
  };
  var init98 = () => initBlock({ name: name99, metadata: block_default98, settings: settings98 });

  // packages/block-library/build-module/site-tagline/index.mjs
  var site_tagline_exports = {};
  __export(site_tagline_exports, {
    init: () => init99,
    metadata: () => block_default99,
    name: () => name100,
    settings: () => settings99
  });

  // packages/block-library/build-module/site-tagline/block.json
  var block_default99 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/site-tagline",
    title: "Site Tagline",
    category: "theme",
    description: "Describe in a few words what this site is about. This is important for search results, sharing on social media, and gives overall clarity to visitors.",
    keywords: ["description"],
    textdomain: "default",
    attributes: {
      textAlign: {
        type: "string"
      },
      level: {
        type: "number",
        default: 0
      },
      levelOptions: {
        type: "array",
        default: [0, 1, 2, 3, 4, 5, 6]
      }
    },
    example: {
      viewportWidth: 350,
      attributes: {
        textAlign: "center"
      }
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      contentRole: true,
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalWritingMode: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      }
    },
    editorStyle: "wp-block-site-tagline-editor",
    style: "wp-block-site-tagline"
  };

  // packages/block-library/build-module/site-tagline/edit.mjs
  var import_data132 = __toESM(require_data(), 1);
  var import_core_data80 = __toESM(require_core_data(), 1);
  var import_block_editor237 = __toESM(require_block_editor(), 1);
  var import_i18n226 = __toESM(require_i18n(), 1);
  var import_blocks105 = __toESM(require_blocks(), 1);
  var import_jsx_runtime428 = __toESM(require_jsx_runtime(), 1);
  function SiteTaglineEdit({
    attributes: attributes2,
    setAttributes,
    insertBlocksAfter
  }) {
    const { textAlign, level, levelOptions } = attributes2;
    const { canUserEdit, tagline } = (0, import_data132.useSelect)((select9) => {
      const { canUser, getEntityRecord, getEditedEntityRecord } = select9(import_core_data80.store);
      const canEdit = canUser("update", {
        kind: "root",
        name: "site"
      });
      const settings122 = canEdit ? getEditedEntityRecord("root", "site") : {};
      const readOnlySettings = getEntityRecord("root", "__unstableBase");
      return {
        canUserEdit: canEdit,
        tagline: canEdit ? settings122?.description : readOnlySettings?.description
      };
    }, []);
    const TagName2 = level === 0 ? "p" : `h${level}`;
    const { editEntityRecord } = (0, import_data132.useDispatch)(import_core_data80.store);
    function setTagline(newTagline) {
      editEntityRecord("root", "site", void 0, {
        description: newTagline
      });
    }
    const blockProps = (0, import_block_editor237.useBlockProps)({
      className: clsx_default({
        [`has-text-align-${textAlign}`]: textAlign,
        "wp-block-site-tagline__placeholder": !canUserEdit && !tagline
      })
    });
    const siteTaglineContent = canUserEdit ? /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
      import_block_editor237.RichText,
      {
        allowedFormats: [],
        onChange: setTagline,
        "aria-label": (0, import_i18n226.__)("Site tagline text"),
        placeholder: (0, import_i18n226.__)("Write site tagline\u2026"),
        tagName: TagName2,
        value: tagline,
        disableLineBreaks: true,
        __unstableOnSplitAtEnd: () => insertBlocksAfter((0, import_blocks105.createBlock)((0, import_blocks105.getDefaultBlockName)())),
        ...blockProps
      }
    ) : /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(TagName2, { ...blockProps, children: tagline || (0, import_i18n226.__)("Site Tagline placeholder") });
    return /* @__PURE__ */ (0, import_jsx_runtime428.jsxs)(import_jsx_runtime428.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime428.jsxs)(import_block_editor237.BlockControls, { group: "block", children: [
        /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
          import_block_editor237.HeadingLevelDropdown,
          {
            value: level,
            options: levelOptions,
            onChange: (newLevel) => setAttributes({ level: newLevel })
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
          import_block_editor237.AlignmentControl,
          {
            onChange: (newAlign) => setAttributes({ textAlign: newAlign }),
            value: textAlign
          }
        )
      ] }),
      siteTaglineContent
    ] });
  }

  // packages/block-library/build-module/site-tagline/icon.mjs
  var import_components149 = __toESM(require_components(), 1);
  var import_jsx_runtime429 = __toESM(require_jsx_runtime(), 1);
  var icon_default4 = /* @__PURE__ */ (0, import_jsx_runtime429.jsx)(import_components149.SVG, { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", children: /* @__PURE__ */ (0, import_jsx_runtime429.jsx)(import_components149.Path, { d: "M4 10.5h16V9H4v1.5ZM4 15h9v-1.5H4V15Z" }) });

  // packages/block-library/build-module/site-tagline/deprecated.mjs
  var v141 = {
    attributes: {
      textAlign: {
        type: "string"
      }
    },
    supports: {
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalTextTransform: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true
      }
    },
    save() {
      return null;
    },
    migrate: migrate_font_family_default,
    isEligible({ style: style2 }) {
      return style2?.typography?.fontFamily;
    }
  };
  var deprecated_default46 = [v141];

  // packages/block-library/build-module/site-tagline/index.mjs
  var { name: name100 } = block_default99;
  var settings99 = {
    icon: icon_default4,
    edit: SiteTaglineEdit,
    deprecated: deprecated_default46
  };
  var init99 = () => initBlock({ name: name100, metadata: block_default99, settings: settings99 });

  // packages/block-library/build-module/site-title/index.mjs
  var site_title_exports = {};
  __export(site_title_exports, {
    init: () => init100,
    metadata: () => block_default100,
    name: () => name101,
    settings: () => settings100
  });

  // packages/block-library/build-module/site-title/block.json
  var block_default100 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/site-title",
    title: "Site Title",
    category: "theme",
    description: "Displays the name of this site. Update the block, and the changes apply everywhere it\u2019s used. This will also appear in the browser title bar and in search results.",
    textdomain: "default",
    attributes: {
      level: {
        type: "number",
        default: 1
      },
      levelOptions: {
        type: "array",
        default: [0, 1, 2, 3, 4, 5, 6]
      },
      textAlign: {
        type: "string"
      },
      isLink: {
        type: "boolean",
        default: true,
        role: "content"
      },
      linkTarget: {
        type: "string",
        default: "_self",
        role: "content"
      }
    },
    example: {
      viewportWidth: 500
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        padding: true,
        margin: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalWritingMode: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      }
    },
    editorStyle: "wp-block-site-title-editor",
    style: "wp-block-site-title"
  };

  // packages/block-library/build-module/site-title/edit.mjs
  var import_data133 = __toESM(require_data(), 1);
  var import_core_data81 = __toESM(require_core_data(), 1);
  var import_i18n227 = __toESM(require_i18n(), 1);
  var import_block_editor238 = __toESM(require_block_editor(), 1);
  var import_components150 = __toESM(require_components(), 1);
  var import_blocks106 = __toESM(require_blocks(), 1);
  var import_html_entities13 = __toESM(require_html_entities(), 1);
  var import_jsx_runtime430 = __toESM(require_jsx_runtime(), 1);
  function SiteTitleEdit({
    attributes: attributes2,
    setAttributes,
    insertBlocksAfter
  }) {
    const { level, levelOptions, textAlign, isLink, linkTarget } = attributes2;
    const { canUserEdit, title } = (0, import_data133.useSelect)((select9) => {
      const { canUser, getEntityRecord, getEditedEntityRecord } = select9(import_core_data81.store);
      const canEdit = canUser("update", {
        kind: "root",
        name: "site"
      });
      const settings122 = canEdit ? getEditedEntityRecord("root", "site") : {};
      const readOnlySettings = getEntityRecord("root", "__unstableBase");
      return {
        canUserEdit: canEdit,
        title: canEdit ? settings122?.title : readOnlySettings?.name
      };
    }, []);
    const { editEntityRecord } = (0, import_data133.useDispatch)(import_core_data81.store);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const blockEditingMode = (0, import_block_editor238.useBlockEditingMode)();
    function setTitle(newTitle) {
      editEntityRecord("root", "site", void 0, {
        title: newTitle.trim()
      });
    }
    const TagName2 = level === 0 ? "p" : `h${level}`;
    const blockProps = (0, import_block_editor238.useBlockProps)({
      className: clsx_default({
        [`has-text-align-${textAlign}`]: textAlign,
        "wp-block-site-title__placeholder": !canUserEdit && !title
      })
    });
    const siteTitleContent = canUserEdit ? /* @__PURE__ */ (0, import_jsx_runtime430.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime430.jsx)(
      import_block_editor238.RichText,
      {
        tagName: isLink ? "a" : "span",
        href: isLink ? "#site-title-pseudo-link" : void 0,
        "aria-label": (0, import_i18n227.__)("Site title text"),
        placeholder: (0, import_i18n227.__)("Write site title\u2026"),
        value: title,
        onChange: setTitle,
        allowedFormats: [],
        disableLineBreaks: true,
        __unstableOnSplitAtEnd: () => insertBlocksAfter((0, import_blocks106.createBlock)((0, import_blocks106.getDefaultBlockName)()))
      }
    ) }) : /* @__PURE__ */ (0, import_jsx_runtime430.jsx)(TagName2, { ...blockProps, children: isLink ? /* @__PURE__ */ (0, import_jsx_runtime430.jsx)(
      "a",
      {
        href: "#site-title-pseudo-link",
        onClick: (event) => event.preventDefault(),
        children: (0, import_html_entities13.decodeEntities)(title) || (0, import_i18n227.__)("Site Title placeholder")
      }
    ) : /* @__PURE__ */ (0, import_jsx_runtime430.jsx)("span", { children: (0, import_html_entities13.decodeEntities)(title) || (0, import_i18n227.__)("Site Title placeholder") }) });
    return /* @__PURE__ */ (0, import_jsx_runtime430.jsxs)(import_jsx_runtime430.Fragment, { children: [
      blockEditingMode === "default" && /* @__PURE__ */ (0, import_jsx_runtime430.jsxs)(import_block_editor238.BlockControls, { group: "block", children: [
        /* @__PURE__ */ (0, import_jsx_runtime430.jsx)(
          import_block_editor238.HeadingLevelDropdown,
          {
            value: level,
            options: levelOptions,
            onChange: (newLevel) => setAttributes({ level: newLevel })
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime430.jsx)(
          import_block_editor238.AlignmentControl,
          {
            value: textAlign,
            onChange: (nextAlign) => {
              setAttributes({ textAlign: nextAlign });
            }
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime430.jsx)(import_block_editor238.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime430.jsxs)(
        import_components150.__experimentalToolsPanel,
        {
          label: (0, import_i18n227.__)("Settings"),
          resetAll: () => {
            setAttributes({
              isLink: true,
              linkTarget: "_self"
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime430.jsx)(
              import_components150.__experimentalToolsPanelItem,
              {
                hasValue: () => !isLink,
                label: (0, import_i18n227.__)("Make title link to home"),
                onDeselect: () => setAttributes({ isLink: true }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime430.jsx)(
                  import_components150.ToggleControl,
                  {
                    label: (0, import_i18n227.__)("Make title link to home"),
                    onChange: () => setAttributes({ isLink: !isLink }),
                    checked: isLink
                  }
                )
              }
            ),
            isLink && /* @__PURE__ */ (0, import_jsx_runtime430.jsx)(
              import_components150.__experimentalToolsPanelItem,
              {
                hasValue: () => linkTarget !== "_self",
                label: (0, import_i18n227.__)("Open in new tab"),
                onDeselect: () => setAttributes({ linkTarget: "_self" }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime430.jsx)(
                  import_components150.ToggleControl,
                  {
                    label: (0, import_i18n227.__)("Open in new tab"),
                    onChange: (value) => setAttributes({
                      linkTarget: value ? "_blank" : "_self"
                    }),
                    checked: linkTarget === "_blank"
                  }
                )
              }
            )
          ]
        }
      ) }),
      siteTitleContent
    ] });
  }

  // packages/block-library/build-module/site-title/deprecated.mjs
  var v143 = {
    attributes: {
      level: {
        type: "number",
        default: 1
      },
      textAlign: {
        type: "string"
      },
      isLink: {
        type: "boolean",
        default: true
      },
      linkTarget: {
        type: "string",
        default: "_self"
      }
    },
    supports: {
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true,
        link: true
      },
      spacing: {
        padding: true,
        margin: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalTextTransform: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true
      }
    },
    save() {
      return null;
    },
    migrate: migrate_font_family_default,
    isEligible({ style: style2 }) {
      return style2?.typography?.fontFamily;
    }
  };
  var deprecated_default47 = [v143];

  // packages/block-library/build-module/site-title/transforms.mjs
  var import_blocks107 = __toESM(require_blocks(), 1);
  var transforms32 = {
    to: [
      {
        type: "block",
        blocks: ["core/site-logo"],
        transform: ({ isLink, linkTarget }) => {
          return (0, import_blocks107.createBlock)("core/site-logo", {
            isLink,
            linkTarget
          });
        }
      }
    ]
  };
  var transforms_default33 = transforms32;

  // packages/block-library/build-module/site-title/index.mjs
  var { name: name101 } = block_default100;
  var settings100 = {
    icon: map_marker_default,
    example: {
      viewportWidth: 350,
      attributes: {
        textAlign: "center"
      }
    },
    edit: SiteTitleEdit,
    transforms: transforms_default33,
    deprecated: deprecated_default47
  };
  var init100 = () => initBlock({ name: name101, metadata: block_default100, settings: settings100 });

  // packages/block-library/build-module/social-link/index.mjs
  var social_link_exports = {};
  __export(social_link_exports, {
    init: () => init101,
    metadata: () => block_default101,
    name: () => name102,
    settings: () => settings101
  });
  var import_i18n231 = __toESM(require_i18n(), 1);
  var import_blocks109 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/social-link/edit.mjs
  var import_keycodes9 = __toESM(require_keycodes(), 1);
  var import_data134 = __toESM(require_data(), 1);
  var import_block_editor239 = __toESM(require_block_editor(), 1);
  var import_element120 = __toESM(require_element(), 1);
  var import_components151 = __toESM(require_components(), 1);
  var import_compose56 = __toESM(require_compose(), 1);
  var import_i18n229 = __toESM(require_i18n(), 1);
  var import_blocks108 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/social-link/social-list.mjs
  var import_i18n228 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/social-link/icons/amazon.mjs
  var import_primitives165 = __toESM(require_primitives(), 1);
  var import_jsx_runtime431 = __toESM(require_jsx_runtime(), 1);
  var AmazonIcon = () => /* @__PURE__ */ (0, import_jsx_runtime431.jsx)(import_primitives165.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime431.jsx)(import_primitives165.Path, { d: "M13.582,8.182C11.934,8.367,9.78,8.49,8.238,9.166c-1.781,0.769-3.03,2.337-3.03,4.644 c0,2.953,1.86,4.429,4.253,4.429c2.02,0,3.125-0.477,4.685-2.065c0.516,0.747,0.685,1.109,1.629,1.894 c0.212,0.114,0.483,0.103,0.672-0.066l0.006,0.006c0.567-0.505,1.599-1.401,2.18-1.888c0.231-0.188,0.19-0.496,0.009-0.754 c-0.52-0.718-1.072-1.303-1.072-2.634V8.305c0-1.876,0.133-3.599-1.249-4.891C15.23,2.369,13.422,2,12.04,2 C9.336,2,6.318,3.01,5.686,6.351C5.618,6.706,5.877,6.893,6.109,6.945l2.754,0.298C9.121,7.23,9.308,6.977,9.357,6.72 c0.236-1.151,1.2-1.706,2.284-1.706c0.584,0,1.249,0.215,1.595,0.738c0.398,0.584,0.346,1.384,0.346,2.061V8.182z M13.049,14.088 c-0.451,0.8-1.169,1.291-1.967,1.291c-1.09,0-1.728-0.83-1.728-2.061c0-2.42,2.171-2.86,4.227-2.86v0.615 C13.582,12.181,13.608,13.104,13.049,14.088z M20.683,19.339C18.329,21.076,14.917,22,11.979,22c-4.118,0-7.826-1.522-10.632-4.057 c-0.22-0.199-0.024-0.471,0.241-0.317c3.027,1.762,6.771,2.823,10.639,2.823c2.608,0,5.476-0.541,8.115-1.66 C20.739,18.62,21.072,19.051,20.683,19.339z M21.336,21.043c-0.194,0.163-0.379,0.076-0.293-0.139 c0.284-0.71,0.92-2.298,0.619-2.684c-0.301-0.386-1.99-0.183-2.749-0.092c-0.23,0.027-0.266-0.173-0.059-0.319 c1.348-0.946,3.555-0.673,3.811-0.356C22.925,17.773,22.599,19.986,21.336,21.043z" }) });

  // packages/block-library/build-module/social-link/icons/bandcamp.mjs
  var import_primitives166 = __toESM(require_primitives(), 1);
  var import_jsx_runtime432 = __toESM(require_jsx_runtime(), 1);
  var BandcampIcon = () => /* @__PURE__ */ (0, import_jsx_runtime432.jsx)(import_primitives166.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime432.jsx)(import_primitives166.Path, { d: "M15.27 17.289 3 17.289 8.73 6.711 21 6.711 15.27 17.289" }) });

  // packages/block-library/build-module/social-link/icons/behance.mjs
  var import_primitives167 = __toESM(require_primitives(), 1);
  var import_jsx_runtime433 = __toESM(require_jsx_runtime(), 1);
  var BehanceIcon = () => /* @__PURE__ */ (0, import_jsx_runtime433.jsx)(import_primitives167.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime433.jsx)(import_primitives167.Path, { d: "M7.799,5.698c0.589,0,1.12,0.051,1.606,0.156c0.482,0.102,0.894,0.273,1.241,0.507c0.344,0.235,0.612,0.546,0.804,0.938 c0.188,0.387,0.281,0.871,0.281,1.443c0,0.619-0.141,1.137-0.421,1.551c-0.284,0.413-0.7,0.751-1.255,1.014 c0.756,0.218,1.317,0.601,1.689,1.146c0.374,0.549,0.557,1.205,0.557,1.975c0,0.623-0.12,1.161-0.359,1.612 c-0.241,0.457-0.569,0.828-0.973,1.114c-0.408,0.288-0.876,0.5-1.399,0.637C9.052,17.931,8.514,18,7.963,18H2V5.698H7.799 M7.449,10.668c0.481,0,0.878-0.114,1.192-0.345c0.311-0.228,0.463-0.603,0.463-1.119c0-0.286-0.051-0.523-0.152-0.707 C8.848,8.315,8.711,8.171,8.536,8.07C8.362,7.966,8.166,7.894,7.94,7.854c-0.224-0.044-0.457-0.06-0.697-0.06H4.709v2.874H7.449z M7.6,15.905c0.267,0,0.521-0.024,0.759-0.077c0.243-0.053,0.457-0.137,0.637-0.261c0.182-0.12,0.332-0.283,0.441-0.491 C9.547,14.87,9.6,14.602,9.6,14.278c0-0.633-0.18-1.084-0.533-1.357c-0.356-0.27-0.83-0.404-1.413-0.404H4.709v3.388L7.6,15.905z M16.162,15.864c0.367,0.358,0.897,0.538,1.583,0.538c0.493,0,0.92-0.125,1.277-0.374c0.354-0.248,0.571-0.514,0.654-0.79h2.155 c-0.347,1.072-0.872,1.838-1.589,2.299C19.534,18,18.67,18.23,17.662,18.23c-0.701,0-1.332-0.113-1.899-0.337 c-0.567-0.227-1.041-0.544-1.439-0.958c-0.389-0.415-0.689-0.907-0.904-1.484c-0.213-0.574-0.32-1.21-0.32-1.899 c0-0.666,0.11-1.288,0.329-1.863c0.222-0.577,0.529-1.075,0.933-1.492c0.406-0.42,0.885-0.751,1.444-0.994 c0.558-0.241,1.175-0.363,1.857-0.363c0.754,0,1.414,0.145,1.98,0.44c0.563,0.291,1.026,0.686,1.389,1.181 c0.363,0.493,0.622,1.057,0.783,1.69c0.16,0.632,0.217,1.292,0.171,1.983h-6.428C15.557,14.84,15.795,15.506,16.162,15.864 M18.973,11.184c-0.291-0.321-0.783-0.496-1.384-0.496c-0.39,0-0.714,0.066-0.973,0.2c-0.254,0.132-0.461,0.297-0.621,0.491 c-0.157,0.197-0.265,0.405-0.328,0.628c-0.063,0.217-0.101,0.413-0.111,0.587h3.98C19.478,11.969,19.265,11.509,18.973,11.184z M15.057,7.738h4.985V6.524h-4.985L15.057,7.738z" }) });

  // packages/block-library/build-module/social-link/icons/bluesky.mjs
  var import_primitives168 = __toESM(require_primitives(), 1);
  var import_jsx_runtime434 = __toESM(require_jsx_runtime(), 1);
  var BlueskyIcon = () => /* @__PURE__ */ (0, import_jsx_runtime434.jsx)(import_primitives168.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime434.jsx)(import_primitives168.Path, { d: "M6.3,4.2c2.3,1.7,4.8,5.3,5.7,7.2.9-1.9,3.4-5.4,5.7-7.2,1.7-1.3,4.3-2.2,4.3.9s-.4,5.2-.6,5.9c-.7,2.6-3.3,3.2-5.6,2.8,4,.7,5.1,3,2.9,5.3-5,5.2-6.7-2.8-6.7-2.8,0,0-1.7,8-6.7,2.8-2.2-2.3-1.2-4.6,2.9-5.3-2.3.4-4.9-.3-5.6-2.8-.2-.7-.6-5.3-.6-5.9,0-3.1,2.7-2.1,4.3-.9h0Z" }) });

  // packages/block-library/build-module/social-link/icons/chain.mjs
  var import_primitives169 = __toESM(require_primitives(), 1);
  var import_jsx_runtime435 = __toESM(require_jsx_runtime(), 1);
  var ChainIcon = () => /* @__PURE__ */ (0, import_jsx_runtime435.jsx)(import_primitives169.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime435.jsx)(import_primitives169.Path, { d: "M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z" }) });

  // packages/block-library/build-module/social-link/icons/codepen.mjs
  var import_primitives170 = __toESM(require_primitives(), 1);
  var import_jsx_runtime436 = __toESM(require_jsx_runtime(), 1);
  var CodepenIcon = () => /* @__PURE__ */ (0, import_jsx_runtime436.jsx)(import_primitives170.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime436.jsx)(import_primitives170.Path, { d: "M22.016,8.84c-0.002-0.013-0.005-0.025-0.007-0.037c-0.005-0.025-0.008-0.048-0.015-0.072 c-0.003-0.015-0.01-0.028-0.013-0.042c-0.008-0.02-0.015-0.04-0.023-0.062c-0.007-0.015-0.013-0.028-0.02-0.042 c-0.008-0.02-0.018-0.037-0.03-0.057c-0.007-0.013-0.017-0.027-0.025-0.038c-0.012-0.018-0.023-0.035-0.035-0.052 c-0.01-0.013-0.02-0.025-0.03-0.037c-0.015-0.017-0.028-0.032-0.043-0.045c-0.01-0.012-0.022-0.023-0.035-0.035 c-0.015-0.015-0.032-0.028-0.048-0.04c-0.012-0.01-0.025-0.02-0.037-0.03c-0.005-0.003-0.01-0.008-0.015-0.012l-9.161-6.096 c-0.289-0.192-0.666-0.192-0.955,0L2.359,8.237C2.354,8.24,2.349,8.245,2.344,8.249L2.306,8.277 c-0.017,0.013-0.033,0.027-0.048,0.04C2.246,8.331,2.234,8.342,2.222,8.352c-0.015,0.015-0.028,0.03-0.042,0.047 c-0.012,0.013-0.022,0.023-0.03,0.037C2.139,8.453,2.125,8.471,2.115,8.488C2.107,8.501,2.099,8.514,2.09,8.526 C2.079,8.548,2.069,8.565,2.06,8.585C2.054,8.6,2.047,8.613,2.04,8.626C2.032,8.648,2.025,8.67,2.019,8.69 c-0.005,0.013-0.01,0.027-0.013,0.042C1.999,8.755,1.995,8.778,1.99,8.803C1.989,8.817,1.985,8.828,1.984,8.84 C1.978,8.879,1.975,8.915,1.975,8.954v6.093c0,0.037,0.003,0.075,0.008,0.112c0.002,0.012,0.005,0.025,0.007,0.038 c0.005,0.023,0.008,0.047,0.015,0.072c0.003,0.015,0.008,0.028,0.013,0.04c0.007,0.022,0.013,0.042,0.022,0.063 c0.007,0.015,0.013,0.028,0.02,0.04c0.008,0.02,0.018,0.038,0.03,0.058c0.007,0.013,0.015,0.027,0.025,0.038 c0.012,0.018,0.023,0.035,0.035,0.052c0.01,0.013,0.02,0.025,0.03,0.037c0.013,0.015,0.028,0.032,0.042,0.045 c0.012,0.012,0.023,0.023,0.035,0.035c0.015,0.013,0.032,0.028,0.048,0.04l0.038,0.03c0.005,0.003,0.01,0.007,0.013,0.01 l9.163,6.095C11.668,21.953,11.833,22,12,22c0.167,0,0.332-0.047,0.478-0.144l9.163-6.095l0.015-0.01 c0.013-0.01,0.027-0.02,0.037-0.03c0.018-0.013,0.035-0.028,0.048-0.04c0.013-0.012,0.025-0.023,0.035-0.035 c0.017-0.015,0.03-0.032,0.043-0.045c0.01-0.013,0.02-0.025,0.03-0.037c0.013-0.018,0.025-0.035,0.035-0.052 c0.008-0.013,0.018-0.027,0.025-0.038c0.012-0.02,0.022-0.038,0.03-0.058c0.007-0.013,0.013-0.027,0.02-0.04 c0.008-0.022,0.015-0.042,0.023-0.063c0.003-0.013,0.01-0.027,0.013-0.04c0.007-0.025,0.01-0.048,0.015-0.072 c0.002-0.013,0.005-0.027,0.007-0.037c0.003-0.042,0.007-0.079,0.007-0.117V8.954C22.025,8.915,22.022,8.879,22.016,8.84z M12.862,4.464l6.751,4.49l-3.016,2.013l-3.735-2.492V4.464z M11.138,4.464v4.009l-3.735,2.494L4.389,8.954L11.138,4.464z M3.699,10.562L5.853,12l-2.155,1.438V10.562z M11.138,19.536l-6.749-4.491l3.015-2.011l3.735,2.492V19.536z M12,14.035L8.953,12 L12,9.966L15.047,12L12,14.035z M12.862,19.536v-4.009l3.735-2.492l3.016,2.011L12.862,19.536z M20.303,13.438L18.147,12 l2.156-1.438L20.303,13.438z" }) });

  // packages/block-library/build-module/social-link/icons/deviantart.mjs
  var import_primitives171 = __toESM(require_primitives(), 1);
  var import_jsx_runtime437 = __toESM(require_jsx_runtime(), 1);
  var DeviantArtIcon = () => /* @__PURE__ */ (0, import_jsx_runtime437.jsx)(import_primitives171.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime437.jsx)(import_primitives171.Path, { d: "M 18.19 5.636 18.19 2 18.188 2 14.553 2 14.19 2.366 12.474 5.636 11.935 6 5.81 6 5.81 10.994 9.177 10.994 9.477 11.357 5.81 18.363 5.81 22 5.811 22 9.447 22 9.81 21.634 11.526 18.364 12.065 18 18.19 18 18.19 13.006 14.823 13.006 14.523 12.641 18.19 5.636z" }) });

  // packages/block-library/build-module/social-link/icons/discord.mjs
  var import_primitives172 = __toESM(require_primitives(), 1);
  var import_jsx_runtime438 = __toESM(require_jsx_runtime(), 1);
  var DiscordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime438.jsx)(import_primitives172.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime438.jsx)(import_primitives172.Path, { d: "M20.317 4.369A19.88 19.88 0 0 0 15.894 3a14.145 14.145 0 0 0-.719 1.518 19.205 19.205 0 0 0-5.351 0A14.183 14.183 0 0 0 9.104 3 19.896 19.896 0 0 0 4.682 4.369a18.921 18.921 0 0 0-3.012 12.52 19.929 19.929 0 0 0 6.081 3.097c.487-.65.922-1.339 1.3-2.061a12.445 12.445 0 0 1-1.958-.896c.165-.12.326-.246.483-.374a12.445 12.445 0 0 0 8.946 0c.157.128.318.253.483.374-.627.371-1.281.683-1.958.896.379.722.813 1.41 1.3 2.061a19.94 19.94 0 0 0 6.081-3.097 18.921 18.921 0 0 0-3.012-12.52ZM8.12 15.233c-1.202 0-2.184-1.09-2.184-2.431 0-1.34.97-2.431 2.184-2.431 1.213 0 2.202 1.09 2.184 2.431 0 1.341-.97 2.431-2.184 2.431Zm7.757 0c-1.202 0-2.184-1.09-2.184-2.431 0-1.34.97-2.431 2.184-2.431 1.213 0 2.202 1.09 2.184 2.431 0 1.341-.97 2.431-2.184 2.431Z" }) });

  // packages/block-library/build-module/social-link/icons/dribbble.mjs
  var import_primitives173 = __toESM(require_primitives(), 1);
  var import_jsx_runtime439 = __toESM(require_jsx_runtime(), 1);
  var DribbbleIcon = () => /* @__PURE__ */ (0, import_jsx_runtime439.jsx)(import_primitives173.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime439.jsx)(import_primitives173.Path, { d: "M12,22C6.486,22,2,17.514,2,12S6.486,2,12,2c5.514,0,10,4.486,10,10S17.514,22,12,22z M20.434,13.369 c-0.292-0.092-2.644-0.794-5.32-0.365c1.117,3.07,1.572,5.57,1.659,6.09C18.689,17.798,20.053,15.745,20.434,13.369z M15.336,19.876c-0.127-0.749-0.623-3.361-1.822-6.477c-0.019,0.006-0.038,0.013-0.056,0.019c-4.818,1.679-6.547,5.02-6.701,5.334 c1.448,1.129,3.268,1.803,5.243,1.803C13.183,20.555,14.311,20.313,15.336,19.876z M5.654,17.724 c0.193-0.331,2.538-4.213,6.943-5.637c0.111-0.036,0.224-0.07,0.337-0.102c-0.214-0.485-0.448-0.971-0.692-1.45 c-4.266,1.277-8.405,1.223-8.778,1.216c-0.003,0.087-0.004,0.174-0.004,0.261C3.458,14.207,4.29,16.21,5.654,17.724z M3.639,10.264 c0.382,0.005,3.901,0.02,7.897-1.041c-1.415-2.516-2.942-4.631-3.167-4.94C5.979,5.41,4.193,7.613,3.639,10.264z M9.998,3.709 c0.236,0.316,1.787,2.429,3.187,5c3.037-1.138,4.323-2.867,4.477-3.085C16.154,4.286,14.17,3.471,12,3.471 C11.311,3.471,10.641,3.554,9.998,3.709z M18.612,6.612C18.432,6.855,17,8.69,13.842,9.979c0.199,0.407,0.389,0.821,0.567,1.237 c0.063,0.148,0.124,0.295,0.184,0.441c2.842-0.357,5.666,0.215,5.948,0.275C20.522,9.916,19.801,8.065,18.612,6.612z" }) });

  // packages/block-library/build-module/social-link/icons/dropbox.mjs
  var import_primitives174 = __toESM(require_primitives(), 1);
  var import_jsx_runtime440 = __toESM(require_jsx_runtime(), 1);
  var DropboxIcon = () => /* @__PURE__ */ (0, import_jsx_runtime440.jsx)(import_primitives174.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime440.jsx)(import_primitives174.Path, { d: "M12,6.134L6.069,9.797L2,6.54l5.883-3.843L12,6.134z M2,13.054l5.883,3.843L12,13.459L6.069,9.797L2,13.054z M12,13.459 l4.116,3.439L22,13.054l-4.069-3.257L12,13.459z M22,6.54l-5.884-3.843L12,6.134l5.931,3.663L22,6.54z M12.011,14.2l-4.129,3.426 l-1.767-1.153v1.291l5.896,3.539l5.897-3.539v-1.291l-1.769,1.153L12.011,14.2z" }) });

  // packages/block-library/build-module/social-link/icons/etsy.mjs
  var import_primitives175 = __toESM(require_primitives(), 1);
  var import_jsx_runtime441 = __toESM(require_jsx_runtime(), 1);
  var EtsyIcon = () => /* @__PURE__ */ (0, import_jsx_runtime441.jsx)(import_primitives175.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime441.jsx)(import_primitives175.Path, { d: "M9.16033,4.038c0-.27174.02717-.43478.48913-.43478h6.22283c1.087,0,1.68478.92391,2.11957,2.663l.35326,1.38587h1.05978C19.59511,3.712,19.75815,2,19.75815,2s-2.663.29891-4.23913.29891h-7.962L3.29076,2.163v1.1413L4.731,3.57609c1.00543.19022,1.25.40761,1.33152,1.33152,0,0,.08152,2.71739.08152,7.20109s-.08152,7.17391-.08152,7.17391c0,.81522-.32609,1.11413-1.33152,1.30435l-1.44022.27174V22l4.2663-.13587h7.11957c1.60326,0,5.32609.13587,5.32609.13587.08152-.97826.625-5.40761.70652-5.89674H19.7038L18.644,18.52174c-.84239,1.90217-2.06522,2.038-3.42391,2.038H11.1712c-1.3587,0-2.01087-.54348-2.01087-1.712V12.65217s3.0163,0,3.99457.08152c.76087.05435,1.22283.27174,1.46739,1.33152l.32609,1.413h1.16848l-.08152-3.55978.163-3.587H15.02989l-.38043,1.57609c-.24457,1.03261-.40761,1.22283-1.46739,1.33152-1.38587.13587-4.02174.1087-4.02174.1087Z" }) });

  // packages/block-library/build-module/social-link/icons/facebook.mjs
  var import_primitives176 = __toESM(require_primitives(), 1);
  var import_jsx_runtime442 = __toESM(require_jsx_runtime(), 1);
  var FacebookIcon = () => /* @__PURE__ */ (0, import_jsx_runtime442.jsx)(import_primitives176.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime442.jsx)(import_primitives176.Path, { d: "M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z" }) });

  // packages/block-library/build-module/social-link/icons/feed.mjs
  var import_primitives177 = __toESM(require_primitives(), 1);
  var import_jsx_runtime443 = __toESM(require_jsx_runtime(), 1);
  var FeedIcon = () => /* @__PURE__ */ (0, import_jsx_runtime443.jsx)(import_primitives177.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime443.jsx)(import_primitives177.Path, { d: "M2,8.667V12c5.515,0,10,4.485,10,10h3.333C15.333,14.637,9.363,8.667,2,8.667z M2,2v3.333 c9.19,0,16.667,7.477,16.667,16.667H22C22,10.955,13.045,2,2,2z M4.5,17C3.118,17,2,18.12,2,19.5S3.118,22,4.5,22S7,20.88,7,19.5 S5.882,17,4.5,17z" }) });

  // packages/block-library/build-module/social-link/icons/fivehundredpx.mjs
  var import_primitives178 = __toESM(require_primitives(), 1);
  var import_jsx_runtime444 = __toESM(require_jsx_runtime(), 1);
  var FivehundredpxIcon = () => /* @__PURE__ */ (0, import_jsx_runtime444.jsx)(import_primitives178.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime444.jsx)(import_primitives178.Path, { d: "M6.94026,15.1412c.00437.01213.108.29862.168.44064a6.55008,6.55008,0,1,0,6.03191-9.09557,6.68654,6.68654,0,0,0-2.58357.51467A8.53914,8.53914,0,0,0,8.21268,8.61344L8.209,8.61725V3.22948l9.0504-.00008c.32934-.0036.32934-.46353.32934-.61466s0-.61091-.33035-.61467L7.47248,2a.43.43,0,0,0-.43131.42692v7.58355c0,.24466.30476.42131.58793.4819.553.11812.68074-.05864.81617-.2457l.018-.02481A10.52673,10.52673,0,0,1,9.32258,9.258a5.35268,5.35268,0,1,1,7.58985,7.54976,5.417,5.417,0,0,1-3.80867,1.56365,5.17483,5.17483,0,0,1-2.69822-.74478l.00342-4.61111a2.79372,2.79372,0,0,1,.71372-1.78792,2.61611,2.61611,0,0,1,1.98282-.89477,2.75683,2.75683,0,0,1,1.95525.79477,2.66867,2.66867,0,0,1,.79656,1.909,2.724,2.724,0,0,1-2.75849,2.748,4.94651,4.94651,0,0,1-.86254-.13719c-.31234-.093-.44519.34058-.48892.48349-.16811.54966.08453.65862.13687.67489a3.75751,3.75751,0,0,0,1.25234.18375,3.94634,3.94634,0,1,0-2.82444-6.742,3.67478,3.67478,0,0,0-1.13028,2.584l-.00041.02323c-.0035.11667-.00579,2.881-.00644,3.78811l-.00407-.00451a6.18521,6.18521,0,0,1-1.0851-1.86092c-.10544-.27856-.34358-.22925-.66857-.12917-.14192.04372-.57386.17677-.47833.489Zm4.65165-1.08338a.51346.51346,0,0,0,.19513.31818l.02276.022a.52945.52945,0,0,0,.3517.18416.24242.24242,0,0,0,.16577-.0611c.05473-.05082.67382-.67812.73287-.738l.69041.68819a.28978.28978,0,0,0,.21437.11032.53239.53239,0,0,0,.35708-.19486c.29792-.30419.14885-.46821.07676-.54751l-.69954-.69975.72952-.73469c.16-.17311.01874-.35708-.12218-.498-.20461-.20461-.402-.25742-.52855-.14083l-.7254.72665-.73354-.73375a.20128.20128,0,0,0-.14179-.05695.54135.54135,0,0,0-.34379.19648c-.22561.22555-.274.38149-.15656.5059l.73374.7315-.72942.73072A.26589.26589,0,0,0,11.59191,14.05782Zm1.59866-9.915A8.86081,8.86081,0,0,0,9.854,4.776a.26169.26169,0,0,0-.16938.22759.92978.92978,0,0,0,.08619.42094c.05682.14524.20779.531.50006.41955a8.40969,8.40969,0,0,1,2.91968-.55484,7.87875,7.87875,0,0,1,3.086.62286,8.61817,8.61817,0,0,1,2.30562,1.49315.2781.2781,0,0,0,.18318.07586c.15529,0,.30425-.15253.43167-.29551.21268-.23861.35873-.4369.1492-.63538a8.50425,8.50425,0,0,0-2.62312-1.694A9.0177,9.0177,0,0,0,13.19058,4.14283ZM19.50945,18.6236h0a.93171.93171,0,0,0-.36642-.25406.26589.26589,0,0,0-.27613.06613l-.06943.06929A7.90606,7.90606,0,0,1,7.60639,18.505a7.57284,7.57284,0,0,1-1.696-2.51537,8.58715,8.58715,0,0,1-.5147-1.77754l-.00871-.04864c-.04939-.25873-.28755-.27684-.62981-.22448-.14234.02178-.5755.088-.53426.39969l.001.00712a9.08807,9.08807,0,0,0,15.406,4.99094c.00193-.00192.04753-.04718.0725-.07436C19.79425,19.16234,19.87422,18.98728,19.50945,18.6236Z" }) });

  // packages/block-library/build-module/social-link/icons/flickr.mjs
  var import_primitives179 = __toESM(require_primitives(), 1);
  var import_jsx_runtime445 = __toESM(require_jsx_runtime(), 1);
  var FlickrIcon = () => /* @__PURE__ */ (0, import_jsx_runtime445.jsx)(import_primitives179.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime445.jsx)(import_primitives179.Path, { d: "M6.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5S9.25,7,6.5,7z M17.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5 S20.25,7,17.5,7z" }) });

  // packages/block-library/build-module/social-link/icons/foursquare.mjs
  var import_primitives180 = __toESM(require_primitives(), 1);
  var import_jsx_runtime446 = __toESM(require_jsx_runtime(), 1);
  var FoursquareIcon = () => /* @__PURE__ */ (0, import_jsx_runtime446.jsx)(import_primitives180.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime446.jsx)(import_primitives180.Path, { d: "M17.573,2c0,0-9.197,0-10.668,0S5,3.107,5,3.805s0,16.948,0,16.948c0,0.785,0.422,1.077,0.66,1.172 c0.238,0.097,0.892,0.177,1.285-0.275c0,0,5.035-5.843,5.122-5.93c0.132-0.132,0.132-0.132,0.262-0.132h3.26 c1.368,0,1.588-0.977,1.732-1.552c0.078-0.318,0.692-3.428,1.225-6.122l0.675-3.368C19.56,2.893,19.14,2,17.573,2z M16.495,7.22 c-0.053,0.252-0.372,0.518-0.665,0.518c-0.293,0-4.157,0-4.157,0c-0.467,0-0.802,0.318-0.802,0.787v0.508 c0,0.467,0.337,0.798,0.805,0.798c0,0,3.197,0,3.528,0s0.655,0.362,0.583,0.715c-0.072,0.353-0.407,2.102-0.448,2.295 c-0.04,0.193-0.262,0.523-0.655,0.523c-0.33,0-2.88,0-2.88,0c-0.523,0-0.683,0.068-1.033,0.503 c-0.35,0.437-3.505,4.223-3.505,4.223c-0.032,0.035-0.063,0.027-0.063-0.015V4.852c0-0.298,0.26-0.648,0.648-0.648 c0,0,8.228,0,8.562,0c0.315,0,0.61,0.297,0.528,0.683L16.495,7.22z" }) });

  // packages/block-library/build-module/social-link/icons/goodreads.mjs
  var import_primitives181 = __toESM(require_primitives(), 1);
  var import_jsx_runtime447 = __toESM(require_jsx_runtime(), 1);
  var GoodreadsIcon = () => /* @__PURE__ */ (0, import_jsx_runtime447.jsx)(import_primitives181.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime447.jsx)(import_primitives181.Path, { d: "M17.3,17.5c-0.2,0.8-0.5,1.4-1,1.9c-0.4,0.5-1,0.9-1.7,1.2C13.9,20.9,13.1,21,12,21c-0.6,0-1.3-0.1-1.9-0.2 c-0.6-0.1-1.1-0.4-1.6-0.7c-0.5-0.3-0.9-0.7-1.2-1.2c-0.3-0.5-0.5-1.1-0.5-1.7h1.5c0.1,0.5,0.2,0.9,0.5,1.2 c0.2,0.3,0.5,0.6,0.9,0.8c0.3,0.2,0.7,0.3,1.1,0.4c0.4,0.1,0.8,0.1,1.2,0.1c1.4,0,2.5-0.4,3.1-1.2c0.6-0.8,1-2,1-3.5v-1.7h0 c-0.4,0.8-0.9,1.4-1.6,1.9c-0.7,0.5-1.5,0.7-2.4,0.7c-1,0-1.9-0.2-2.6-0.5C8.7,15,8.1,14.5,7.7,14c-0.5-0.6-0.8-1.3-1-2.1 c-0.2-0.8-0.3-1.6-0.3-2.5c0-0.9,0.1-1.7,0.4-2.5c0.3-0.8,0.6-1.5,1.1-2c0.5-0.6,1.1-1,1.8-1.4C10.3,3.2,11.1,3,12,3 c0.5,0,0.9,0.1,1.3,0.2c0.4,0.1,0.8,0.3,1.1,0.5c0.3,0.2,0.6,0.5,0.9,0.8c0.3,0.3,0.5,0.6,0.6,1h0V3.4h1.5V15 C17.6,15.9,17.5,16.7,17.3,17.5z M13.8,14.1c0.5-0.3,0.9-0.7,1.3-1.1c0.3-0.5,0.6-1,0.8-1.6c0.2-0.6,0.3-1.2,0.3-1.9 c0-0.6-0.1-1.2-0.2-1.9c-0.1-0.6-0.4-1.2-0.7-1.7c-0.3-0.5-0.7-0.9-1.3-1.2c-0.5-0.3-1.1-0.5-1.9-0.5s-1.4,0.2-1.9,0.5 c-0.5,0.3-1,0.7-1.3,1.2C8.5,6.4,8.3,7,8.1,7.6C8,8.2,7.9,8.9,7.9,9.5c0,0.6,0.1,1.3,0.2,1.9C8.3,12,8.6,12.5,8.9,13 c0.3,0.5,0.8,0.8,1.3,1.1c0.5,0.3,1.1,0.4,1.9,0.4C12.7,14.5,13.3,14.4,13.8,14.1z" }) });

  // packages/block-library/build-module/social-link/icons/google.mjs
  var import_primitives182 = __toESM(require_primitives(), 1);
  var import_jsx_runtime448 = __toESM(require_jsx_runtime(), 1);
  var GoogleIcon = () => /* @__PURE__ */ (0, import_jsx_runtime448.jsx)(import_primitives182.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime448.jsx)(import_primitives182.Path, { d: "M12.02,10.18v3.72v0.01h5.51c-0.26,1.57-1.67,4.22-5.5,4.22c-3.31,0-6.01-2.75-6.01-6.12s2.7-6.12,6.01-6.12 c1.87,0,3.13,0.8,3.85,1.48l2.84-2.76C16.99,2.99,14.73,2,12.03,2c-5.52,0-10,4.48-10,10s4.48,10,10,10c5.77,0,9.6-4.06,9.6-9.77 c0-0.83-0.11-1.42-0.25-2.05H12.02z" }) });

  // packages/block-library/build-module/social-link/icons/github.mjs
  var import_primitives183 = __toESM(require_primitives(), 1);
  var import_jsx_runtime449 = __toESM(require_jsx_runtime(), 1);
  var GitHubIcon = () => /* @__PURE__ */ (0, import_jsx_runtime449.jsx)(import_primitives183.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime449.jsx)(import_primitives183.Path, { d: "M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z" }) });

  // packages/block-library/build-module/social-link/icons/gravatar.mjs
  var import_primitives184 = __toESM(require_primitives(), 1);
  var import_jsx_runtime450 = __toESM(require_jsx_runtime(), 1);
  var GravatarIcon = () => /* @__PURE__ */ (0, import_jsx_runtime450.jsx)(import_primitives184.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime450.jsx)(import_primitives184.Path, { d: "M10.8001 4.69937V10.6494C10.8001 11.1001 10.9791 11.5323 11.2978 11.851C11.6165 12.1697 12.0487 12.3487 12.4994 12.3487C12.9501 12.3487 13.3824 12.1697 13.7011 11.851C14.0198 11.5323 14.1988 11.1001 14.1988 10.6494V6.69089C15.2418 7.05861 16.1371 7.75537 16.7496 8.67617C17.3622 9.59698 17.6589 10.6919 17.595 11.796C17.5311 12.9001 17.1101 13.9535 16.3954 14.7975C15.6807 15.6415 14.711 16.2303 13.6325 16.4753C12.5541 16.7202 11.4252 16.608 10.4161 16.1555C9.40691 15.703 8.57217 14.9348 8.03763 13.9667C7.50308 12.9985 7.29769 11.8828 7.45242 10.7877C7.60714 9.69266 8.11359 8.67755 8.89545 7.89537C9.20904 7.57521 9.38364 7.14426 9.38132 6.69611C9.37899 6.24797 9.19994 5.81884 8.88305 5.50195C8.56616 5.18506 8.13704 5.00601 7.68889 5.00369C7.24075 5.00137 6.80979 5.17597 6.48964 5.48956C5.09907 6.8801 4.23369 8.7098 4.04094 10.6669C3.84819 12.624 4.34 14.5873 5.43257 16.2224C6.52515 17.8575 8.15088 19.0632 10.0328 19.634C11.9146 20.2049 13.9362 20.1055 15.753 19.3529C17.5699 18.6003 19.0695 17.241 19.9965 15.5066C20.9234 13.7722 21.2203 11.7701 20.8366 9.84133C20.4528 7.91259 19.4122 6.17658 17.892 4.92911C16.3717 3.68163 14.466 2.99987 12.4994 3C12.0487 3 11.6165 3.17904 11.2978 3.49773C10.9791 3.81643 10.8001 4.24867 10.8001 4.69937Z" }) });

  // packages/block-library/build-module/social-link/icons/instagram.mjs
  var import_primitives185 = __toESM(require_primitives(), 1);
  var import_jsx_runtime451 = __toESM(require_jsx_runtime(), 1);
  var InstagramIcon = () => /* @__PURE__ */ (0, import_jsx_runtime451.jsx)(import_primitives185.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime451.jsx)(import_primitives185.Path, { d: "M12,4.622c2.403,0,2.688,0.009,3.637,0.052c0.877,0.04,1.354,0.187,1.671,0.31c0.42,0.163,0.72,0.358,1.035,0.673 c0.315,0.315,0.51,0.615,0.673,1.035c0.123,0.317,0.27,0.794,0.31,1.671c0.043,0.949,0.052,1.234,0.052,3.637 s-0.009,2.688-0.052,3.637c-0.04,0.877-0.187,1.354-0.31,1.671c-0.163,0.42-0.358,0.72-0.673,1.035 c-0.315,0.315-0.615,0.51-1.035,0.673c-0.317,0.123-0.794,0.27-1.671,0.31c-0.949,0.043-1.233,0.052-3.637,0.052 s-2.688-0.009-3.637-0.052c-0.877-0.04-1.354-0.187-1.671-0.31c-0.42-0.163-0.72-0.358-1.035-0.673 c-0.315-0.315-0.51-0.615-0.673-1.035c-0.123-0.317-0.27-0.794-0.31-1.671C4.631,14.688,4.622,14.403,4.622,12 s0.009-2.688,0.052-3.637c0.04-0.877,0.187-1.354,0.31-1.671c0.163-0.42,0.358-0.72,0.673-1.035 c0.315-0.315,0.615-0.51,1.035-0.673c0.317-0.123,0.794-0.27,1.671-0.31C9.312,4.631,9.597,4.622,12,4.622 M12,3 C9.556,3,9.249,3.01,8.289,3.054C7.331,3.098,6.677,3.25,6.105,3.472C5.513,3.702,5.011,4.01,4.511,4.511 c-0.5,0.5-0.808,1.002-1.038,1.594C3.25,6.677,3.098,7.331,3.054,8.289C3.01,9.249,3,9.556,3,12c0,2.444,0.01,2.751,0.054,3.711 c0.044,0.958,0.196,1.612,0.418,2.185c0.23,0.592,0.538,1.094,1.038,1.594c0.5,0.5,1.002,0.808,1.594,1.038 c0.572,0.222,1.227,0.375,2.185,0.418C9.249,20.99,9.556,21,12,21s2.751-0.01,3.711-0.054c0.958-0.044,1.612-0.196,2.185-0.418 c0.592-0.23,1.094-0.538,1.594-1.038c0.5-0.5,0.808-1.002,1.038-1.594c0.222-0.572,0.375-1.227,0.418-2.185 C20.99,14.751,21,14.444,21,12s-0.01-2.751-0.054-3.711c-0.044-0.958-0.196-1.612-0.418-2.185c-0.23-0.592-0.538-1.094-1.038-1.594 c-0.5-0.5-1.002-0.808-1.594-1.038c-0.572-0.222-1.227-0.375-2.185-0.418C14.751,3.01,14.444,3,12,3L12,3z M12,7.378 c-2.552,0-4.622,2.069-4.622,4.622S9.448,16.622,12,16.622s4.622-2.069,4.622-4.622S14.552,7.378,12,7.378z M12,15 c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3S13.657,15,12,15z M16.804,6.116c-0.596,0-1.08,0.484-1.08,1.08 s0.484,1.08,1.08,1.08c0.596,0,1.08-0.484,1.08-1.08S17.401,6.116,16.804,6.116z" }) });

  // packages/block-library/build-module/social-link/icons/lastfm.mjs
  var import_primitives186 = __toESM(require_primitives(), 1);
  var import_jsx_runtime452 = __toESM(require_jsx_runtime(), 1);
  var LastfmIcon = () => /* @__PURE__ */ (0, import_jsx_runtime452.jsx)(import_primitives186.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime452.jsx)(import_primitives186.Path, { d: "M 12.0002 1.5 C 6.2006 1.5 1.5 6.2011 1.5 11.9998 C 1.5 17.799 6.2006 22.5 12.0002 22.5 C 17.799 22.5 22.5 17.799 22.5 11.9998 C 22.5 6.2011 17.799 1.5 12.0002 1.5 Z M 16.1974 16.2204 C 14.8164 16.2152 13.9346 15.587 13.3345 14.1859 L 13.1816 13.8451 L 11.8541 10.8101 C 11.4271 9.7688 10.3526 9.0712 9.1801 9.0712 C 7.5695 9.0712 6.2593 10.3851 6.2593 12.001 C 6.2593 13.6165 7.5695 14.9303 9.1801 14.9303 C 10.272 14.9303 11.2651 14.3275 11.772 13.3567 C 11.7893 13.3235 11.8239 13.302 11.863 13.3038 C 11.9007 13.3054 11.9353 13.3288 11.9504 13.3632 L 12.4865 14.6046 C 12.5016 14.639 12.4956 14.6778 12.4723 14.7069 C 11.6605 15.6995 10.4602 16.2683 9.1801 16.2683 C 6.8331 16.2683 4.9234 14.3536 4.9234 12.001 C 4.9234 9.6468 6.833 7.732 9.1801 7.732 C 10.9572 7.732 12.3909 8.6907 13.1138 10.3636 C 13.1206 10.3802 13.8412 12.0708 14.4744 13.5191 C 14.8486 14.374 15.1462 14.896 16.1288 14.9292 C 17.0663 14.9613 17.7538 14.4122 17.7538 13.6485 C 17.7538 12.9691 17.3321 12.8004 16.3803 12.4822 C 14.7365 11.9398 13.845 11.3861 13.845 10.0182 C 13.845 8.6809 14.7667 7.8162 16.192 7.8162 C 17.1288 7.8162 17.8155 8.2287 18.2921 9.0768 C 18.305 9.1006 18.3079 9.1281 18.3004 9.1542 C 18.2929 9.1803 18.2748 9.2021 18.2507 9.2138 L 17.3614 9.669 C 17.3178 9.692 17.2643 9.6781 17.2356 9.6385 C 16.9329 9.2135 16.5956 9.0251 16.1423 9.0251 C 15.5512 9.0251 15.122 9.429 15.122 9.9865 C 15.122 10.6738 15.6529 10.8414 16.5339 11.1192 C 16.6491 11.1558 16.7696 11.194 16.8939 11.2343 C 18.2763 11.6865 19.0768 12.2311 19.0768 13.6836 C 19.0769 15.1297 17.8389 16.2204 16.1974 16.2204 Z" }) });

  // packages/block-library/build-module/social-link/icons/linkedin.mjs
  var import_primitives187 = __toESM(require_primitives(), 1);
  var import_jsx_runtime453 = __toESM(require_jsx_runtime(), 1);
  var LinkedInIcon = () => /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(import_primitives187.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(import_primitives187.Path, { d: "M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z" }) });

  // packages/block-library/build-module/social-link/icons/mail.mjs
  var import_primitives188 = __toESM(require_primitives(), 1);
  var import_jsx_runtime454 = __toESM(require_jsx_runtime(), 1);
  var MailIcon = () => /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(import_primitives188.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(import_primitives188.Path, { 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-.5V9.8l7.5 5.6 7.5-5.6V17zm0-9.1L12 13.6 4.5 7.9V7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v.9z" }) });

  // packages/block-library/build-module/social-link/icons/mastodon.mjs
  var import_primitives189 = __toESM(require_primitives(), 1);
  var import_jsx_runtime455 = __toESM(require_jsx_runtime(), 1);
  var MastodonIcon = () => /* @__PURE__ */ (0, import_jsx_runtime455.jsx)(import_primitives189.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime455.jsx)(import_primitives189.Path, { d: "M23.193 7.879c0-5.206-3.411-6.732-3.411-6.732C18.062.357 15.108.025 12.041 0h-.076c-3.068.025-6.02.357-7.74 1.147 0 0-3.411 1.526-3.411 6.732 0 1.192-.023 2.618.015 4.129.124 5.092.934 10.109 5.641 11.355 2.17.574 4.034.695 5.535.612 2.722-.15 4.25-.972 4.25-.972l-.09-1.975s-1.945.613-4.129.539c-2.165-.074-4.449-.233-4.799-2.891a5.499 5.499 0 0 1-.048-.745s2.125.52 4.817.643c1.646.075 3.19-.097 4.758-.283 3.007-.359 5.625-2.212 5.954-3.905.517-2.665.475-6.507.475-6.507zm-4.024 6.709h-2.497V8.469c0-1.29-.543-1.944-1.628-1.944-1.2 0-1.802.776-1.802 2.312v3.349h-2.483v-3.35c0-1.536-.602-2.312-1.802-2.312-1.085 0-1.628.655-1.628 1.944v6.119H4.832V8.284c0-1.289.328-2.313.987-3.07.68-.758 1.569-1.146 2.674-1.146 1.278 0 2.246.491 2.886 1.474L12 6.585l.622-1.043c.64-.983 1.608-1.474 2.886-1.474 1.104 0 1.994.388 2.674 1.146.658.757.986 1.781.986 3.07v6.304z" }) });

  // packages/block-library/build-module/social-link/icons/meetup.mjs
  var import_primitives190 = __toESM(require_primitives(), 1);
  var import_jsx_runtime456 = __toESM(require_jsx_runtime(), 1);
  var MeetupIcon = () => /* @__PURE__ */ (0, import_jsx_runtime456.jsx)(import_primitives190.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime456.jsx)(import_primitives190.Path, { d: "M19.24775,14.722a3.57032,3.57032,0,0,1-2.94457,3.52073,3.61886,3.61886,0,0,1-.64652.05634c-.07314-.0008-.10187.02846-.12507.09547A2.38881,2.38881,0,0,1,13.49453,20.094a2.33092,2.33092,0,0,1-1.827-.50716.13635.13635,0,0,0-.19878-.00408,3.191,3.191,0,0,1-2.104.60248,3.26309,3.26309,0,0,1-3.00324-2.71993,2.19076,2.19076,0,0,1-.03512-.30865c-.00156-.08579-.03413-.1189-.11608-.13493a2.86421,2.86421,0,0,1-1.23189-.56111,2.945,2.945,0,0,1-1.166-2.05749,2.97484,2.97484,0,0,1,.87524-2.50774.112.112,0,0,0,.02091-.16107,2.7213,2.7213,0,0,1-.36648-1.48A2.81256,2.81256,0,0,1,6.57673,7.58838a.35764.35764,0,0,0,.28869-.22819,4.2208,4.2208,0,0,1,6.02892-1.90111.25161.25161,0,0,0,.22023.0243,3.65608,3.65608,0,0,1,3.76031.90678A3.57244,3.57244,0,0,1,17.95918,8.626a2.97339,2.97339,0,0,1,.01829.57356.10637.10637,0,0,0,.0853.12792,1.97669,1.97669,0,0,1,1.27939,1.33733,2.00266,2.00266,0,0,1-.57112,2.12652c-.05284.05166-.04168.08328-.01173.13489A3.51189,3.51189,0,0,1,19.24775,14.722Zm-6.35959-.27836a1.6984,1.6984,0,0,0,1.14556,1.61113,3.82039,3.82039,0,0,0,1.036.17935,1.46888,1.46888,0,0,0,.73509-.12255.44082.44082,0,0,0,.26057-.44274.45312.45312,0,0,0-.29211-.43375.97191.97191,0,0,0-.20678-.063c-.21326-.03806-.42754-.0701-.63973-.11215a.54787.54787,0,0,1-.50172-.60926,2.75864,2.75864,0,0,1,.1773-.901c.1763-.535.414-1.045.64183-1.55913A12.686,12.686,0,0,0,15.85,10.47863a1.58461,1.58461,0,0,0,.04861-.87208,1.04531,1.04531,0,0,0-.85432-.83981,1.60658,1.60658,0,0,0-1.23654.16594.27593.27593,0,0,1-.36286-.03413c-.085-.0747-.16594-.15379-.24918-.23055a.98682.98682,0,0,0-1.33577-.04933,6.1468,6.1468,0,0,1-.4989.41615.47762.47762,0,0,1-.51535.03566c-.17448-.09307-.35512-.175-.53531-.25665a1.74949,1.74949,0,0,0-.56476-.2016,1.69943,1.69943,0,0,0-1.61654.91787,8.05815,8.05815,0,0,0-.32952.80126c-.45471,1.2557-.82507,2.53825-1.20838,3.81639a1.24151,1.24151,0,0,0,.51532,1.44389,1.42659,1.42659,0,0,0,1.22008.17166,1.09728,1.09728,0,0,0,.66994-.69764c.44145-1.04111.839-2.09989,1.25981-3.14926.11581-.28876.22792-.57874.35078-.86438a.44548.44548,0,0,1,.69189-.19539.50521.50521,0,0,1,.15044.43836,1.75625,1.75625,0,0,1-.14731.50453c-.27379.69219-.55265,1.38236-.82766,2.074a2.0836,2.0836,0,0,0-.14038.42876.50719.50719,0,0,0,.27082.57722.87236.87236,0,0,0,.66145.02739.99137.99137,0,0,0,.53406-.532q.61571-1.20914,1.228-2.42031.28423-.55863.57585-1.1133a.87189.87189,0,0,1,.29055-.35253.34987.34987,0,0,1,.37634-.01265.30291.30291,0,0,1,.12434.31459.56716.56716,0,0,1-.04655.1915c-.05318.12739-.10286.25669-.16183.38156-.34118.71775-.68754,1.43273-1.02568,2.152A2.00213,2.00213,0,0,0,12.88816,14.44366Zm4.78568,5.28972a.88573.88573,0,0,0-1.77139.00465.8857.8857,0,0,0,1.77139-.00465Zm-14.83838-7.296a.84329.84329,0,1,0,.00827-1.68655.8433.8433,0,0,0-.00827,1.68655Zm10.366-9.43673a.83506.83506,0,1,0-.0091,1.67.83505.83505,0,0,0,.0091-1.67Zm6.85014,5.22a.71651.71651,0,0,0-1.433.0093.71656.71656,0,0,0,1.433-.0093ZM5.37528,6.17908A.63823.63823,0,1,0,6.015,5.54483.62292.62292,0,0,0,5.37528,6.17908Zm6.68214,14.80843a.54949.54949,0,1,0-.55052.541A.54556.54556,0,0,0,12.05742,20.98752Zm8.53235-8.49689a.54777.54777,0,0,0-.54027.54023.53327.53327,0,0,0,.532.52293.51548.51548,0,0,0,.53272-.5237A.53187.53187,0,0,0,20.58977,12.49063ZM7.82846,2.4715a.44927.44927,0,1,0,.44484.44766A.43821.43821,0,0,0,7.82846,2.4715Zm13.775,7.60492a.41186.41186,0,0,0-.40065.39623.40178.40178,0,0,0,.40168.40168A.38994.38994,0,0,0,22,10.48172.39946.39946,0,0,0,21.60349,10.07642ZM5.79193,17.96207a.40469.40469,0,0,0-.397-.39646.399.399,0,0,0-.396.405.39234.39234,0,0,0,.39939.389A.39857.39857,0,0,0,5.79193,17.96207Z" }) });

  // packages/block-library/build-module/social-link/icons/medium.mjs
  var import_primitives191 = __toESM(require_primitives(), 1);
  var import_jsx_runtime457 = __toESM(require_jsx_runtime(), 1);
  var MediumIcon = () => /* @__PURE__ */ (0, import_jsx_runtime457.jsx)(import_primitives191.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime457.jsx)(import_primitives191.Path, { d: "M13.2,12c0,3-2.4,5.4-5.3,5.4S2.6,15,2.6,12s2.4-5.4,5.3-5.4S13.2,9,13.2,12 M19.1,12c0,2.8-1.2,5-2.7,5s-2.7-2.3-2.7-5s1.2-5,2.7-5C17.9,7,19.1,9.2,19.1,12 M21.4,12c0,2.5-0.4,4.5-0.9,4.5c-0.5,0-0.9-2-0.9-4.5s0.4-4.5,0.9-4.5C21,7.5,21.4,9.5,21.4,12" }) });

  // packages/block-library/build-module/social-link/icons/patreon.mjs
  var import_primitives192 = __toESM(require_primitives(), 1);
  var import_jsx_runtime458 = __toESM(require_jsx_runtime(), 1);
  var PatreonIcon = () => /* @__PURE__ */ (0, import_jsx_runtime458.jsx)(import_primitives192.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime458.jsx)(import_primitives192.Path, { d: "M20 8.40755C19.9969 6.10922 18.2543 4.22555 16.2097 3.54588C13.6708 2.70188 10.3222 2.82421 7.89775 3.99921C4.95932 5.42355 4.03626 8.54355 4.00186 11.6552C3.97363 14.2136 4.2222 20.9517 7.92225 20.9997C10.6715 21.0356 11.0809 17.3967 12.3529 15.6442C13.258 14.3974 14.4233 14.0452 15.8578 13.6806C18.3233 13.0537 20.0036 11.0551 20 8.40755Z" }) });

  // packages/block-library/build-module/social-link/icons/pinterest.mjs
  var import_primitives193 = __toESM(require_primitives(), 1);
  var import_jsx_runtime459 = __toESM(require_jsx_runtime(), 1);
  var PinterestIcon = () => /* @__PURE__ */ (0, import_jsx_runtime459.jsx)(import_primitives193.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime459.jsx)(import_primitives193.Path, { d: "M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2" }) });

  // packages/block-library/build-module/social-link/icons/pocket.mjs
  var import_primitives194 = __toESM(require_primitives(), 1);
  var import_jsx_runtime460 = __toESM(require_jsx_runtime(), 1);
  var PocketIcon = () => /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(import_primitives194.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(import_primitives194.Path, { d: "M21.927,4.194C21.667,3.48,20.982,3,20.222,3h-0.01h-1.721H3.839C3.092,3,2.411,3.47,2.145,4.17 C2.066,4.378,2.026,4.594,2.026,4.814v6.035l0.069,1.2c0.29,2.73,1.707,5.115,3.899,6.778c0.039,0.03,0.079,0.059,0.119,0.089 l0.025,0.018c1.175,0.859,2.491,1.441,3.91,1.727c0.655,0.132,1.325,0.2,1.991,0.2c0.615,0,1.232-0.057,1.839-0.17 c0.073-0.014,0.145-0.028,0.219-0.044c0.02-0.004,0.042-0.012,0.064-0.023c1.359-0.297,2.621-0.864,3.753-1.691l0.025-0.018 c0.04-0.029,0.08-0.058,0.119-0.089c2.192-1.664,3.609-4.049,3.898-6.778l0.069-1.2V4.814C22.026,4.605,22,4.398,21.927,4.194z M17.692,10.481l-4.704,4.512c-0.266,0.254-0.608,0.382-0.949,0.382c-0.342,0-0.684-0.128-0.949-0.382l-4.705-4.512 C5.838,9.957,5.82,9.089,6.344,8.542c0.524-0.547,1.392-0.565,1.939-0.04l3.756,3.601l3.755-3.601 c0.547-0.524,1.415-0.506,1.939,0.04C18.256,9.089,18.238,9.956,17.692,10.481z" }) });

  // packages/block-library/build-module/social-link/icons/reddit.mjs
  var import_primitives195 = __toESM(require_primitives(), 1);
  var import_jsx_runtime461 = __toESM(require_jsx_runtime(), 1);
  var RedditIcon = () => /* @__PURE__ */ (0, import_jsx_runtime461.jsx)(import_primitives195.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime461.jsx)(import_primitives195.Path, { d: "M5.27 9.221A2.775 2.775 0 0 0 2.498 11.993a2.785 2.785 0 0 0 1.6 2.511 5.337 5.337 0 0 0 2.374 4.11 9.386 9.386 0 0 0 5.539 1.7 9.386 9.386 0 0 0 5.541-1.7 5.331 5.331 0 0 0 2.372-4.114 2.787 2.787 0 0 0 1.583-2.5 2.775 2.775 0 0 0-2.772-2.772 2.742 2.742 0 0 0-1.688.574 9.482 9.482 0 0 0-4.637-1.348v-.008a2.349 2.349 0 0 1 2.011-2.316 1.97 1.97 0 0 0 1.926 1.521 1.98 1.98 0 0 0 1.978-1.978 1.98 1.98 0 0 0-1.978-1.978 1.985 1.985 0 0 0-1.938 1.578 3.183 3.183 0 0 0-2.849 3.172v.011a9.463 9.463 0 0 0-4.59 1.35 2.741 2.741 0 0 0-1.688-.574Zm6.736 9.1a3.162 3.162 0 0 1-2.921-1.944.215.215 0 0 1 .014-.2.219.219 0 0 1 .168-.106 27.327 27.327 0 0 1 2.74-.133 27.357 27.357 0 0 1 2.74.133.219.219 0 0 1 .168.106.215.215 0 0 1 .014.2 3.158 3.158 0 0 1-2.921 1.944Zm3.743-3.157a1.265 1.265 0 0 1-1.4-1.371 1.954 1.954 0 0 1 .482-1.442 1.15 1.15 0 0 1 .842-.379 1.7 1.7 0 0 1 1.49 1.777 1.323 1.323 0 0 1-.325 1.015 1.476 1.476 0 0 1-1.089.4Zm-7.485 0a1.476 1.476 0 0 1-1.086-.4 1.323 1.323 0 0 1-.325-1.016 1.7 1.7 0 0 1 1.49-1.777 1.151 1.151 0 0 1 .843.379 1.951 1.951 0 0 1 .481 1.441 1.276 1.276 0 0 1-1.403 1.373Z" }) });

  // packages/block-library/build-module/social-link/icons/skype.mjs
  var import_primitives196 = __toESM(require_primitives(), 1);
  var import_jsx_runtime462 = __toESM(require_jsx_runtime(), 1);
  var SkypeIcon = () => /* @__PURE__ */ (0, import_jsx_runtime462.jsx)(import_primitives196.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime462.jsx)(import_primitives196.Path, { d: "M10.113,2.699c0.033-0.006,0.067-0.013,0.1-0.02c0.033,0.017,0.066,0.033,0.098,0.051L10.113,2.699z M2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223z M21.275,13.771 c0.007-0.035,0.011-0.071,0.018-0.106c-0.018-0.031-0.033-0.064-0.052-0.095L21.275,13.771z M13.563,21.199 c0.032,0.019,0.065,0.035,0.096,0.053c0.036-0.006,0.071-0.011,0.105-0.017L13.563,21.199z M22,16.386 c0,1.494-0.581,2.898-1.637,3.953c-1.056,1.057-2.459,1.637-3.953,1.637c-0.967,0-1.914-0.251-2.75-0.725 c0.036-0.006,0.071-0.011,0.105-0.017l-0.202-0.035c0.032,0.019,0.065,0.035,0.096,0.053c-0.543,0.096-1.099,0.147-1.654,0.147 c-1.275,0-2.512-0.25-3.676-0.743c-1.125-0.474-2.135-1.156-3.002-2.023c-0.867-0.867-1.548-1.877-2.023-3.002 c-0.493-1.164-0.743-2.401-0.743-3.676c0-0.546,0.049-1.093,0.142-1.628c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103C2.244,9.5,2,8.566,2,7.615c0-1.493,0.582-2.898,1.637-3.953 c1.056-1.056,2.46-1.638,3.953-1.638c0.915,0,1.818,0.228,2.622,0.655c-0.033,0.007-0.067,0.013-0.1,0.02l0.199,0.031 c-0.032-0.018-0.066-0.034-0.098-0.051c0.002,0,0.003-0.001,0.004-0.001c0.586-0.112,1.187-0.169,1.788-0.169 c1.275,0,2.512,0.249,3.676,0.742c1.124,0.476,2.135,1.156,3.002,2.024c0.868,0.867,1.548,1.877,2.024,3.002 c0.493,1.164,0.743,2.401,0.743,3.676c0,0.575-0.054,1.15-0.157,1.712c-0.018-0.031-0.033-0.064-0.052-0.095l0.034,0.201 c0.007-0.035,0.011-0.071,0.018-0.106C21.754,14.494,22,15.432,22,16.386z M16.817,14.138c0-1.331-0.613-2.743-3.033-3.282 l-2.209-0.49c-0.84-0.192-1.807-0.444-1.807-1.237c0-0.794,0.679-1.348,1.903-1.348c2.468,0,2.243,1.696,3.468,1.696 c0.645,0,1.209-0.379,1.209-1.031c0-1.521-2.435-2.663-4.5-2.663c-2.242,0-4.63,0.952-4.63,3.488c0,1.221,0.436,2.521,2.839,3.123 l2.984,0.745c0.903,0.223,1.129,0.731,1.129,1.189c0,0.762-0.758,1.507-2.129,1.507c-2.679,0-2.307-2.062-3.743-2.062 c-0.645,0-1.113,0.444-1.113,1.078c0,1.236,1.501,2.886,4.856,2.886C15.236,17.737,16.817,16.199,16.817,14.138z" }) });

  // packages/block-library/build-module/social-link/icons/snapchat.mjs
  var import_primitives197 = __toESM(require_primitives(), 1);
  var import_jsx_runtime463 = __toESM(require_jsx_runtime(), 1);
  var SnapchatIcon = () => /* @__PURE__ */ (0, import_jsx_runtime463.jsx)(import_primitives197.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime463.jsx)(import_primitives197.Path, { d: "M12.065,2a5.526,5.526,0,0,1,3.132.892A5.854,5.854,0,0,1,17.326,5.4a5.821,5.821,0,0,1,.351,2.33q0,.612-.117,2.487a.809.809,0,0,0,.365.091,1.93,1.93,0,0,0,.664-.176,1.93,1.93,0,0,1,.664-.176,1.3,1.3,0,0,1,.729.234.7.7,0,0,1,.351.6.839.839,0,0,1-.41.7,2.732,2.732,0,0,1-.9.41,3.192,3.192,0,0,0-.9.378.728.728,0,0,0-.41.618,1.575,1.575,0,0,0,.156.56,6.9,6.9,0,0,0,1.334,1.953,5.6,5.6,0,0,0,1.881,1.315,5.875,5.875,0,0,0,1.042.3.42.42,0,0,1,.365.456q0,.911-2.852,1.341a1.379,1.379,0,0,0-.143.507,1.8,1.8,0,0,1-.182.605.451.451,0,0,1-.429.241,5.878,5.878,0,0,1-.807-.085,5.917,5.917,0,0,0-.833-.085,4.217,4.217,0,0,0-.807.065,2.42,2.42,0,0,0-.82.293,6.682,6.682,0,0,0-.755.5q-.351.267-.755.527a3.886,3.886,0,0,1-.989.436A4.471,4.471,0,0,1,11.831,22a4.307,4.307,0,0,1-1.256-.176,3.784,3.784,0,0,1-.976-.436q-.4-.26-.749-.527a6.682,6.682,0,0,0-.755-.5,2.422,2.422,0,0,0-.807-.293,4.432,4.432,0,0,0-.82-.065,5.089,5.089,0,0,0-.853.1,5,5,0,0,1-.762.1.474.474,0,0,1-.456-.241,1.819,1.819,0,0,1-.182-.618,1.411,1.411,0,0,0-.143-.521q-2.852-.429-2.852-1.341a.42.42,0,0,1,.365-.456,5.793,5.793,0,0,0,1.042-.3,5.524,5.524,0,0,0,1.881-1.315,6.789,6.789,0,0,0,1.334-1.953A1.575,1.575,0,0,0,6,12.9a.728.728,0,0,0-.41-.618,3.323,3.323,0,0,0-.9-.384,2.912,2.912,0,0,1-.9-.41.814.814,0,0,1-.41-.684.71.71,0,0,1,.338-.593,1.208,1.208,0,0,1,.716-.241,1.976,1.976,0,0,1,.625.169,2.008,2.008,0,0,0,.69.169.919.919,0,0,0,.416-.091q-.117-1.849-.117-2.474A5.861,5.861,0,0,1,6.385,5.4,5.516,5.516,0,0,1,8.625,2.819,7.075,7.075,0,0,1,12.062,2Z" }) });

  // packages/block-library/build-module/social-link/icons/soundcloud.mjs
  var import_primitives198 = __toESM(require_primitives(), 1);
  var import_jsx_runtime464 = __toESM(require_jsx_runtime(), 1);
  var SoundCloudIcon = () => /* @__PURE__ */ (0, import_jsx_runtime464.jsx)(import_primitives198.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime464.jsx)(import_primitives198.Path, { d: "M23.994 14.552a3.36 3.36 0 01-3.401 3.171h-8.176a.685.685 0 01-.679-.681V8.238a.749.749 0 01.452-.716S12.942 7 14.526 7a5.357 5.357 0 012.748.755 5.44 5.44 0 012.56 3.546c.282-.08.574-.12.868-.119a3.273 3.273 0 013.292 3.37zM10.718 8.795a.266.266 0 10-.528 0c-.224 2.96-.397 5.735 0 8.685a.265.265 0 00.528 0c.425-2.976.246-5.7 0-8.685zM9.066 9.82a.278.278 0 00-.553 0 33.183 33.183 0 000 7.663.278.278 0 00.55 0c.33-2.544.332-5.12.003-7.664zM7.406 9.56a.269.269 0 00-.535 0c-.253 2.7-.38 5.222 0 7.917a.266.266 0 10.531 0c.394-2.73.272-5.181.004-7.917zM5.754 10.331a.275.275 0 10-.55 0 28.035 28.035 0 000 7.155.272.272 0 00.54 0c.332-2.373.335-4.78.01-7.155zM4.087 12.12a.272.272 0 00-.544 0c-.393 1.843-.208 3.52.016 5.386a.26.26 0 00.512 0c.247-1.892.435-3.53.016-5.386zM2.433 11.838a.282.282 0 00-.56 0c-.349 1.882-.234 3.54.01 5.418.025.285.508.282.54 0 .269-1.907.394-3.517.01-5.418zM.762 12.76a.282.282 0 00-.56 0c-.32 1.264-.22 2.31.023 3.578a.262.262 0 00.521 0c.282-1.293.42-2.317.016-3.578z" }) });

  // packages/block-library/build-module/social-link/icons/spotify.mjs
  var import_primitives199 = __toESM(require_primitives(), 1);
  var import_jsx_runtime465 = __toESM(require_jsx_runtime(), 1);
  var SpotifyIcon = () => /* @__PURE__ */ (0, import_jsx_runtime465.jsx)(import_primitives199.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime465.jsx)(import_primitives199.Path, { d: "M12,2C6.477,2,2,6.477,2,12c0,5.523,4.477,10,10,10c5.523,0,10-4.477,10-10C22,6.477,17.523,2,12,2 M16.586,16.424 c-0.18,0.295-0.563,0.387-0.857,0.207c-2.348-1.435-5.304-1.76-8.785-0.964c-0.335,0.077-0.67-0.133-0.746-0.469 c-0.077-0.335,0.132-0.67,0.469-0.746c3.809-0.871,7.077-0.496,9.713,1.115C16.673,15.746,16.766,16.13,16.586,16.424 M17.81,13.7 c-0.226,0.367-0.706,0.482-1.072,0.257c-2.687-1.652-6.785-2.131-9.965-1.166C6.36,12.917,5.925,12.684,5.8,12.273 C5.675,11.86,5.908,11.425,6.32,11.3c3.632-1.102,8.147-0.568,11.234,1.328C17.92,12.854,18.035,13.335,17.81,13.7 M17.915,10.865 c-3.223-1.914-8.54-2.09-11.618-1.156C5.804,9.859,5.281,9.58,5.131,9.086C4.982,8.591,5.26,8.069,5.755,7.919 c3.532-1.072,9.404-0.865,13.115,1.338c0.445,0.264,0.59,0.838,0.327,1.282C18.933,10.983,18.359,11.129,17.915,10.865" }) });

  // packages/block-library/build-module/social-link/icons/telegram.mjs
  var import_primitives200 = __toESM(require_primitives(), 1);
  var import_jsx_runtime466 = __toESM(require_jsx_runtime(), 1);
  var TelegramIcon = () => /* @__PURE__ */ (0, import_jsx_runtime466.jsx)(import_primitives200.SVG, { width: "24", height: "24", viewBox: "0 0 128 128", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime466.jsx)(import_primitives200.Path, { d: "M28.9700376,63.3244248 C47.6273373,55.1957357 60.0684594,49.8368063 66.2934036,47.2476366 C84.0668845,39.855031 87.7600616,38.5708563 90.1672227,38.528 C90.6966555,38.5191258 91.8804274,38.6503351 92.6472251,39.2725385 C93.294694,39.7979149 93.4728387,40.5076237 93.5580865,41.0057381 C93.6433345,41.5038525 93.7494885,42.63857 93.6651041,43.5252052 C92.7019529,53.6451182 88.5344133,78.2034783 86.4142057,89.5379542 C85.5170662,94.3339958 83.750571,95.9420841 82.0403991,96.0994568 C78.3237996,96.4414641 75.5015827,93.6432685 71.9018743,91.2836143 C66.2690414,87.5912212 63.0868492,85.2926952 57.6192095,81.6896017 C51.3004058,77.5256038 55.3966232,75.2369981 58.9976911,71.4967761 C59.9401076,70.5179421 76.3155302,55.6232293 76.6324771,54.2720454 C76.6721165,54.1030573 76.7089039,53.4731496 76.3346867,53.1405352 C75.9604695,52.8079208 75.4081573,52.921662 75.0095933,53.0121213 C74.444641,53.1403447 65.4461175,59.0880351 48.0140228,70.8551922 C45.4598218,72.6091037 43.1463059,73.4636682 41.0734751,73.4188859 C38.7883453,73.3695169 34.3926725,72.1268388 31.1249416,71.0646282 C27.1169366,69.7617838 23.931454,69.0729605 24.208838,66.8603276 C24.3533167,65.7078514 25.9403832,64.5292172 28.9700376,63.3244248 Z" }) });

  // packages/block-library/build-module/social-link/icons/threads.mjs
  var import_primitives201 = __toESM(require_primitives(), 1);
  var import_jsx_runtime467 = __toESM(require_jsx_runtime(), 1);
  var ThreadsIcon = () => /* @__PURE__ */ (0, import_jsx_runtime467.jsx)(import_primitives201.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime467.jsx)(import_primitives201.Path, { d: "M16.3 11.3c-.1 0-.2-.1-.2-.1-.1-2.6-1.5-4-3.9-4-1.4 0-2.6.6-3.3 1.7l1.3.9c.5-.8 1.4-1 2-1 .8 0 1.4.2 1.7.7.3.3.5.8.5 1.3-.7-.1-1.4-.2-2.2-.1-2.2.1-3.7 1.4-3.6 3.2 0 .9.5 1.7 1.3 2.2.7.4 1.5.6 2.4.6 1.2-.1 2.1-.5 2.7-1.3.5-.6.8-1.4.9-2.4.6.3 1 .8 1.2 1.3.4.9.4 2.4-.8 3.6-1.1 1.1-2.3 1.5-4.3 1.5-2.1 0-3.8-.7-4.8-2S5.7 14.3 5.7 12c0-2.3.5-4.1 1.5-5.4 1.1-1.3 2.7-2 4.8-2 2.2 0 3.8.7 4.9 2 .5.7.9 1.5 1.2 2.5l1.5-.4c-.3-1.2-.8-2.2-1.5-3.1-1.3-1.7-3.3-2.6-6-2.6-2.6 0-4.7.9-6 2.6C4.9 7.2 4.3 9.3 4.3 12s.6 4.8 1.9 6.4c1.4 1.7 3.4 2.6 6 2.6 2.3 0 4-.6 5.3-2 1.8-1.8 1.7-4 1.1-5.4-.4-.9-1.2-1.7-2.3-2.3zm-4 3.8c-1 .1-2-.4-2-1.3 0-.7.5-1.5 2.1-1.6h.5c.6 0 1.1.1 1.6.2-.2 2.3-1.3 2.7-2.2 2.7z" }) });

  // packages/block-library/build-module/social-link/icons/tiktok.mjs
  var import_primitives202 = __toESM(require_primitives(), 1);
  var import_jsx_runtime468 = __toESM(require_jsx_runtime(), 1);
  var TiktokIcon = () => /* @__PURE__ */ (0, import_jsx_runtime468.jsx)(import_primitives202.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime468.jsx)(import_primitives202.Path, { d: "M12.4044 3.01519C13.4086 3 14.4072 3.009 15.4045 3C15.465 4.14812 15.8874 5.31762 16.7472 6.12935C17.6053 6.96134 18.819 7.34217 20 7.47099V10.4912C18.8933 10.4558 17.7814 10.2308 16.7771 9.76499C16.3397 9.57148 15.9323 9.32227 15.5334 9.06745C15.5283 11.2591 15.5426 13.4479 15.5191 15.6305C15.4592 16.679 15.1053 17.7225 14.4814 18.5866C13.4777 20.025 11.7356 20.9627 9.94635 20.992C8.84885 21.0533 7.7525 20.7608 6.81729 20.2219C5.26743 19.3286 4.17683 17.6933 4.01799 15.9382C3.99957 15.563 3.99324 15.1883 4.00878 14.8221C4.14691 13.395 4.86917 12.0297 5.99027 11.101C7.26101 10.0192 9.04107 9.50397 10.7078 9.80886C10.7233 10.9199 10.6778 12.0297 10.6778 13.1407C9.91643 12.9 9.02668 12.9675 8.36139 13.4192C7.87566 13.7269 7.50675 14.1983 7.31453 14.7316C7.15569 15.1118 7.20116 15.5343 7.21036 15.9382C7.3928 17.169 8.60368 18.2035 9.89628 18.0916C10.7532 18.0826 11.5745 17.5965 12.0211 16.8849C12.1655 16.6357 12.3273 16.3809 12.3359 16.0878C12.4113 14.7462 12.3814 13.4102 12.3906 12.0685C12.3969 9.04495 12.3814 6.02979 12.4049 3.01575L12.4044 3.01519Z" }) });

  // packages/block-library/build-module/social-link/icons/tumblr.mjs
  var import_primitives203 = __toESM(require_primitives(), 1);
  var import_jsx_runtime469 = __toESM(require_jsx_runtime(), 1);
  var TumblrIcon = () => /* @__PURE__ */ (0, import_jsx_runtime469.jsx)(import_primitives203.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime469.jsx)(import_primitives203.Path, { d: "M17.04 21.28h-3.28c-2.84 0-4.94-1.37-4.94-5.02v-5.67H6.08V7.5c2.93-.73 4.11-3.3 4.3-5.48h3.01v4.93h3.47v3.65H13.4v4.93c0 1.47.73 2.01 1.92 2.01h1.73v3.75z" }) });

  // packages/block-library/build-module/social-link/icons/twitch.mjs
  var import_primitives204 = __toESM(require_primitives(), 1);
  var import_jsx_runtime470 = __toESM(require_jsx_runtime(), 1);
  var TwitchIcon = () => /* @__PURE__ */ (0, import_jsx_runtime470.jsx)(import_primitives204.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime470.jsx)(import_primitives204.Path, { d: "M16.499,8.089h-1.636v4.91h1.636V8.089z M12,8.089h-1.637v4.91H12V8.089z M4.228,3.178L3,6.451v13.092h4.499V22h2.456 l2.454-2.456h3.681L21,14.636V3.178H4.228z M19.364,13.816l-2.864,2.865H12l-2.453,2.453V16.68H5.863V4.814h13.501V13.816z" }) });

  // packages/block-library/build-module/social-link/icons/twitter.mjs
  var import_primitives205 = __toESM(require_primitives(), 1);
  var import_jsx_runtime471 = __toESM(require_jsx_runtime(), 1);
  var TwitterIcon = () => /* @__PURE__ */ (0, import_jsx_runtime471.jsx)(import_primitives205.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime471.jsx)(import_primitives205.Path, { d: "M22.23,5.924c-0.736,0.326-1.527,0.547-2.357,0.646c0.847-0.508,1.498-1.312,1.804-2.27 c-0.793,0.47-1.671,0.812-2.606,0.996C18.324,4.498,17.257,4,16.077,4c-2.266,0-4.103,1.837-4.103,4.103 c0,0.322,0.036,0.635,0.106,0.935C8.67,8.867,5.647,7.234,3.623,4.751C3.27,5.357,3.067,6.062,3.067,6.814 c0,1.424,0.724,2.679,1.825,3.415c-0.673-0.021-1.305-0.206-1.859-0.513c0,0.017,0,0.034,0,0.052c0,1.988,1.414,3.647,3.292,4.023 c-0.344,0.094-0.707,0.144-1.081,0.144c-0.264,0-0.521-0.026-0.772-0.074c0.522,1.63,2.038,2.816,3.833,2.85 c-1.404,1.1-3.174,1.756-5.096,1.756c-0.331,0-0.658-0.019-0.979-0.057c1.816,1.164,3.973,1.843,6.29,1.843 c7.547,0,11.675-6.252,11.675-11.675c0-0.178-0.004-0.355-0.012-0.531C20.985,7.47,21.68,6.747,22.23,5.924z" }) });

  // packages/block-library/build-module/social-link/icons/vimeo.mjs
  var import_primitives206 = __toESM(require_primitives(), 1);
  var import_jsx_runtime472 = __toESM(require_jsx_runtime(), 1);
  var VimeoIcon = () => /* @__PURE__ */ (0, import_jsx_runtime472.jsx)(import_primitives206.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime472.jsx)(import_primitives206.Path, { d: "M22.396,7.164c-0.093,2.026-1.507,4.799-4.245,8.32C15.322,19.161,12.928,21,10.97,21c-1.214,0-2.24-1.119-3.079-3.359 c-0.56-2.053-1.119-4.106-1.68-6.159C5.588,9.243,4.921,8.122,4.206,8.122c-0.156,0-0.701,0.328-1.634,0.98L1.594,7.841 c1.027-0.902,2.04-1.805,3.037-2.708C6.001,3.95,7.03,3.327,7.715,3.264c1.619-0.156,2.616,0.951,2.99,3.321 c0.404,2.557,0.685,4.147,0.841,4.769c0.467,2.121,0.981,3.181,1.542,3.181c0.435,0,1.09-0.688,1.963-2.065 c0.871-1.376,1.338-2.422,1.401-3.142c0.125-1.187-0.343-1.782-1.401-1.782c-0.498,0-1.012,0.115-1.541,0.341 c1.023-3.35,2.977-4.977,5.862-4.884C21.511,3.066,22.52,4.453,22.396,7.164z" }) });

  // packages/block-library/build-module/social-link/icons/vk.mjs
  var import_primitives207 = __toESM(require_primitives(), 1);
  var import_jsx_runtime473 = __toESM(require_jsx_runtime(), 1);
  var VkIcon = () => /* @__PURE__ */ (0, import_jsx_runtime473.jsx)(import_primitives207.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime473.jsx)(import_primitives207.Path, { d: "M22,7.1c0.2,0.4-0.4,1.5-1.6,3.1c-0.2,0.2-0.4,0.5-0.7,0.9c-0.5,0.7-0.9,1.1-0.9,1.4c-0.1,0.3-0.1,0.6,0.1,0.8 c0.1,0.1,0.4,0.4,0.8,0.9h0l0,0c1,0.9,1.6,1.7,2,2.3c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.3c0,0.1,0,0.2,0,0.4 c0,0.1-0.1,0.2-0.3,0.3c-0.1,0.1-0.4,0.1-0.6,0.1l-2.7,0c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.1-0.5-0.2l-0.2-0.1 c-0.2-0.1-0.5-0.4-0.7-0.7s-0.5-0.6-0.7-0.8c-0.2-0.2-0.4-0.4-0.6-0.6C14.8,15,14.6,15,14.4,15c0,0,0,0-0.1,0c0,0-0.1,0.1-0.2,0.2 c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.1-0.1,0.3-0.2,0.5c-0.1,0.2-0.1,0.5-0.1,0.8c0,0.1,0,0.2,0,0.3c0,0.1-0.1,0.2-0.1,0.2l0,0.1 c-0.1,0.1-0.3,0.2-0.6,0.2h-1.2c-0.5,0-1,0-1.5-0.2c-0.5-0.1-1-0.3-1.4-0.6s-0.7-0.5-1.1-0.7s-0.6-0.4-0.7-0.6l-0.3-0.3 c-0.1-0.1-0.2-0.2-0.3-0.3s-0.4-0.5-0.7-0.9s-0.7-1-1.1-1.6c-0.4-0.6-0.8-1.3-1.3-2.2C2.9,9.4,2.5,8.5,2.1,7.5C2,7.4,2,7.3,2,7.2 c0-0.1,0-0.1,0-0.2l0-0.1c0.1-0.1,0.3-0.2,0.6-0.2l2.9,0c0.1,0,0.2,0,0.2,0.1S5.9,6.9,5.9,7L6,7c0.1,0.1,0.2,0.2,0.3,0.3 C6.4,7.7,6.5,8,6.7,8.4C6.9,8.8,7,9,7.1,9.2l0.2,0.3c0.2,0.4,0.4,0.8,0.6,1.1c0.2,0.3,0.4,0.5,0.5,0.7s0.3,0.3,0.4,0.4 c0.1,0.1,0.3,0.1,0.4,0.1c0.1,0,0.2,0,0.3-0.1c0,0,0,0,0.1-0.1c0,0,0.1-0.1,0.1-0.2c0.1-0.1,0.1-0.3,0.1-0.5c0-0.2,0.1-0.5,0.1-0.8 c0-0.4,0-0.8,0-1.3c0-0.3,0-0.5-0.1-0.8c0-0.2-0.1-0.4-0.1-0.5L9.6,7.6C9.4,7.3,9.1,7.2,8.7,7.1C8.6,7.1,8.6,7,8.7,6.9 C8.9,6.7,9,6.6,9.1,6.5c0.4-0.2,1.2-0.3,2.5-0.3c0.6,0,1,0.1,1.4,0.1c0.1,0,0.3,0.1,0.3,0.1c0.1,0.1,0.2,0.1,0.2,0.3 c0,0.1,0.1,0.2,0.1,0.3s0,0.3,0,0.5c0,0.2,0,0.4,0,0.6c0,0.2,0,0.4,0,0.7c0,0.3,0,0.6,0,0.9c0,0.1,0,0.2,0,0.4c0,0.2,0,0.4,0,0.5 c0,0.1,0,0.3,0,0.4s0.1,0.3,0.1,0.4c0.1,0.1,0.1,0.2,0.2,0.3c0.1,0,0.1,0,0.2,0c0.1,0,0.2,0,0.3-0.1c0.1-0.1,0.2-0.2,0.4-0.4 s0.3-0.4,0.5-0.7c0.2-0.3,0.5-0.7,0.7-1.1c0.4-0.7,0.8-1.5,1.1-2.3c0-0.1,0.1-0.1,0.1-0.2c0-0.1,0.1-0.1,0.1-0.1l0,0l0.1,0 c0,0,0,0,0.1,0s0.2,0,0.2,0l3,0c0.3,0,0.5,0,0.7,0S21.9,7,21.9,7L22,7.1z" }) });

  // packages/block-library/build-module/social-link/icons/whatsapp.mjs
  var import_primitives208 = __toESM(require_primitives(), 1);
  var import_jsx_runtime474 = __toESM(require_jsx_runtime(), 1);
  var WhatsAppIcon = () => /* @__PURE__ */ (0, import_jsx_runtime474.jsx)(import_primitives208.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime474.jsx)(import_primitives208.Path, { d: "M 12.011719 2 C 6.5057187 2 2.0234844 6.478375 2.0214844 11.984375 C 2.0204844 13.744375 2.4814687 15.462563 3.3554688 16.976562 L 2 22 L 7.2324219 20.763672 C 8.6914219 21.559672 10.333859 21.977516 12.005859 21.978516 L 12.009766 21.978516 C 17.514766 21.978516 21.995047 17.499141 21.998047 11.994141 C 22.000047 9.3251406 20.962172 6.8157344 19.076172 4.9277344 C 17.190172 3.0407344 14.683719 2.001 12.011719 2 z M 12.009766 4 C 14.145766 4.001 16.153109 4.8337969 17.662109 6.3417969 C 19.171109 7.8517969 20.000047 9.8581875 19.998047 11.992188 C 19.996047 16.396187 16.413812 19.978516 12.007812 19.978516 C 10.674812 19.977516 9.3544062 19.642812 8.1914062 19.007812 L 7.5175781 18.640625 L 6.7734375 18.816406 L 4.8046875 19.28125 L 5.2851562 17.496094 L 5.5019531 16.695312 L 5.0878906 15.976562 C 4.3898906 14.768562 4.0204844 13.387375 4.0214844 11.984375 C 4.0234844 7.582375 7.6067656 4 12.009766 4 z M 8.4765625 7.375 C 8.3095625 7.375 8.0395469 7.4375 7.8105469 7.6875 C 7.5815469 7.9365 6.9355469 8.5395781 6.9355469 9.7675781 C 6.9355469 10.995578 7.8300781 12.182609 7.9550781 12.349609 C 8.0790781 12.515609 9.68175 15.115234 12.21875 16.115234 C 14.32675 16.946234 14.754891 16.782234 15.212891 16.740234 C 15.670891 16.699234 16.690438 16.137687 16.898438 15.554688 C 17.106437 14.971687 17.106922 14.470187 17.044922 14.367188 C 16.982922 14.263188 16.816406 14.201172 16.566406 14.076172 C 16.317406 13.951172 15.090328 13.348625 14.861328 13.265625 C 14.632328 13.182625 14.464828 13.140625 14.298828 13.390625 C 14.132828 13.640625 13.655766 14.201187 13.509766 14.367188 C 13.363766 14.534188 13.21875 14.556641 12.96875 14.431641 C 12.71875 14.305641 11.914938 14.041406 10.960938 13.191406 C 10.218937 12.530406 9.7182656 11.714844 9.5722656 11.464844 C 9.4272656 11.215844 9.5585938 11.079078 9.6835938 10.955078 C 9.7955938 10.843078 9.9316406 10.663578 10.056641 10.517578 C 10.180641 10.371578 10.223641 10.267562 10.306641 10.101562 C 10.389641 9.9355625 10.347156 9.7890625 10.285156 9.6640625 C 10.223156 9.5390625 9.737625 8.3065 9.515625 7.8125 C 9.328625 7.3975 9.131125 7.3878594 8.953125 7.3808594 C 8.808125 7.3748594 8.6425625 7.375 8.4765625 7.375 z" }) });

  // packages/block-library/build-module/social-link/icons/wordpress.mjs
  var import_primitives209 = __toESM(require_primitives(), 1);
  var import_jsx_runtime475 = __toESM(require_jsx_runtime(), 1);
  var WordPressIcon = () => /* @__PURE__ */ (0, import_jsx_runtime475.jsx)(
    import_primitives209.SVG,
    {
      width: "24",
      height: "24",
      viewBox: "0 0 24 24",
      version: "1.1",
      xmlns: "http://www.w3.org/2000/svg",
      children: /* @__PURE__ */ (0, import_jsx_runtime475.jsx)(import_primitives209.Path, { d: "M12.158,12.786L9.46,20.625c0.806,0.237,1.657,0.366,2.54,0.366c1.047,0,2.051-0.181,2.986-0.51 c-0.024-0.038-0.046-0.079-0.065-0.124L12.158,12.786z M3.009,12c0,3.559,2.068,6.634,5.067,8.092L3.788,8.341 C3.289,9.459,3.009,10.696,3.009,12z M18.069,11.546c0-1.112-0.399-1.881-0.741-2.48c-0.456-0.741-0.883-1.368-0.883-2.109 c0-0.826,0.627-1.596,1.51-1.596c0.04,0,0.078,0.005,0.116,0.007C16.472,3.904,14.34,3.009,12,3.009 c-3.141,0-5.904,1.612-7.512,4.052c0.211,0.007,0.41,0.011,0.579,0.011c0.94,0,2.396-0.114,2.396-0.114 C7.947,6.93,8.004,7.642,7.52,7.699c0,0-0.487,0.057-1.029,0.085l3.274,9.739l1.968-5.901l-1.401-3.838 C9.848,7.756,9.389,7.699,9.389,7.699C8.904,7.67,8.961,6.93,9.446,6.958c0,0,1.484,0.114,2.368,0.114 c0.94,0,2.397-0.114,2.397-0.114c0.485-0.028,0.542,0.684,0.057,0.741c0,0-0.488,0.057-1.029,0.085l3.249,9.665l0.897-2.996 C17.841,13.284,18.069,12.316,18.069,11.546z M19.889,7.686c0.039,0.286,0.06,0.593,0.06,0.924c0,0.912-0.171,1.938-0.684,3.22 l-2.746,7.94c2.673-1.558,4.47-4.454,4.47-7.771C20.991,10.436,20.591,8.967,19.889,7.686z M12,22C6.486,22,2,17.514,2,12 C2,6.486,6.486,2,12,2c5.514,0,10,4.486,10,10C22,17.514,17.514,22,12,22z" })
    }
  );

  // packages/block-library/build-module/social-link/icons/x.mjs
  var import_primitives210 = __toESM(require_primitives(), 1);
  var import_jsx_runtime476 = __toESM(require_jsx_runtime(), 1);
  var XIcon = () => /* @__PURE__ */ (0, import_jsx_runtime476.jsx)(import_primitives210.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime476.jsx)(import_primitives210.Path, { d: "M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" }) });

  // packages/block-library/build-module/social-link/icons/yelp.mjs
  var import_primitives211 = __toESM(require_primitives(), 1);
  var import_jsx_runtime477 = __toESM(require_jsx_runtime(), 1);
  var YelpIcon = () => /* @__PURE__ */ (0, import_jsx_runtime477.jsx)(import_primitives211.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime477.jsx)(import_primitives211.Path, { d: "M12.271,16.718v1.417q-.011,3.257-.067,3.4a.707.707,0,0,1-.569.446,4.637,4.637,0,0,1-2.024-.424A4.609,4.609,0,0,1,7.8,20.565a.844.844,0,0,1-.19-.4.692.692,0,0,1,.044-.29,3.181,3.181,0,0,1,.379-.524q.335-.412,2.019-2.409.011,0,.669-.781a.757.757,0,0,1,.44-.274.965.965,0,0,1,.552.039.945.945,0,0,1,.418.324.732.732,0,0,1,.139.468Zm-1.662-2.8a.783.783,0,0,1-.58.781l-1.339.435q-3.067.981-3.257.981a.711.711,0,0,1-.6-.4,2.636,2.636,0,0,1-.19-.836,9.134,9.134,0,0,1,.011-1.857,3.559,3.559,0,0,1,.335-1.389.659.659,0,0,1,.625-.357,22.629,22.629,0,0,1,2.253.859q.781.324,1.283.524l.937.379a.771.771,0,0,1,.4.34A.982.982,0,0,1,10.609,13.917Zm9.213,3.313a4.467,4.467,0,0,1-1.021,1.8,4.559,4.559,0,0,1-1.512,1.417.671.671,0,0,1-.7-.078q-.156-.112-2.052-3.2l-.524-.859a.761.761,0,0,1-.128-.513.957.957,0,0,1,.217-.513.774.774,0,0,1,.926-.29q.011.011,1.327.446,2.264.736,2.7.887a2.082,2.082,0,0,1,.524.229.673.673,0,0,1,.245.68Zm-7.5-7.049q.056,1.137-.6,1.361-.647.19-1.272-.792L6.237,4.08a.7.7,0,0,1,.212-.691,5.788,5.788,0,0,1,2.314-1,5.928,5.928,0,0,1,2.5-.352.681.681,0,0,1,.547.5q.034.2.245,3.407T12.327,10.181Zm7.384,1.2a.679.679,0,0,1-.29.658q-.167.112-3.67.959-.747.167-1.015.257l.011-.022a.769.769,0,0,1-.513-.044.914.914,0,0,1-.413-.357.786.786,0,0,1,0-.971q.011-.011.836-1.137,1.394-1.908,1.673-2.275a2.423,2.423,0,0,1,.379-.435A.7.7,0,0,1,17.435,8a4.482,4.482,0,0,1,1.372,1.489,4.81,4.81,0,0,1,.9,1.868v.034Z" }) });

  // packages/block-library/build-module/social-link/icons/youtube.mjs
  var import_primitives212 = __toESM(require_primitives(), 1);
  var import_jsx_runtime478 = __toESM(require_jsx_runtime(), 1);
  var YouTubeIcon = () => /* @__PURE__ */ (0, import_jsx_runtime478.jsx)(import_primitives212.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime478.jsx)(import_primitives212.Path, { d: "M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z" }) });

  // packages/block-library/build-module/social-link/social-list.mjs
  function getSocialService(variation) {
    if (!variation?.name) {
      return {
        icon: ChainIcon,
        label: (0, import_i18n228.__)("Social Icon")
      };
    }
    return {
      icon: variation?.icon ?? ChainIcon,
      label: variation?.title ?? (0, import_i18n228.__)("Social Icon")
    };
  }

  // packages/block-library/build-module/social-link/edit.mjs
  var import_jsx_runtime479 = __toESM(require_jsx_runtime(), 1);
  var SocialLinkURLPopover = ({
    url,
    setAttributes,
    setPopover,
    popoverAnchor,
    clientId
  }) => {
    const { removeBlock } = (0, import_data134.useDispatch)(import_block_editor239.store);
    return /* @__PURE__ */ (0, import_jsx_runtime479.jsx)(
      import_block_editor239.URLPopover,
      {
        anchor: popoverAnchor,
        "aria-label": (0, import_i18n229.__)("Edit social link"),
        onClose: () => {
          setPopover(false);
          popoverAnchor?.focus();
        },
        children: /* @__PURE__ */ (0, import_jsx_runtime479.jsx)(
          "form",
          {
            className: "block-editor-url-popover__link-editor",
            onSubmit: (event) => {
              event.preventDefault();
              setPopover(false);
              popoverAnchor?.focus();
            },
            children: /* @__PURE__ */ (0, import_jsx_runtime479.jsx)("div", { className: "block-editor-url-input", children: /* @__PURE__ */ (0, import_jsx_runtime479.jsx)(
              import_block_editor239.URLInput,
              {
                value: url,
                onChange: (nextURL) => setAttributes({ url: nextURL }),
                placeholder: (0, import_i18n229.__)("Enter social link"),
                label: (0, import_i18n229.__)("Enter social link"),
                hideLabelFromVision: true,
                disableSuggestions: true,
                onKeyDown: (event) => {
                  if (!!url || event.defaultPrevented || ![import_keycodes9.BACKSPACE, import_keycodes9.DELETE].includes(
                    event.keyCode
                  )) {
                    return;
                  }
                  removeBlock(clientId);
                },
                suffix: /* @__PURE__ */ (0, import_jsx_runtime479.jsx)(import_components151.__experimentalInputControlSuffixWrapper, { variant: "control", children: /* @__PURE__ */ (0, import_jsx_runtime479.jsx)(
                  import_components151.Button,
                  {
                    icon: keyboard_return_default,
                    label: (0, import_i18n229.__)("Apply"),
                    type: "submit",
                    size: "small"
                  }
                ) })
              }
            ) })
          }
        )
      }
    );
  };
  var SocialLinkEdit = ({
    attributes: attributes2,
    context,
    isSelected,
    setAttributes,
    clientId,
    name: name123
  }) => {
    const { url, service, label = "", rel } = attributes2;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const {
      showLabels,
      iconColor,
      iconColorValue,
      iconBackgroundColor,
      iconBackgroundColorValue
    } = context;
    const [showURLPopover, setPopover] = (0, import_element120.useState)(false);
    const wrapperClasses = clsx_default(
      "wp-social-link",
      // Manually adding this class for backwards compatibility of CSS when moving the
      // blockProps from the li to the button: https://github.com/WordPress/gutenberg/pull/64883
      "wp-block-social-link",
      "wp-social-link-" + service,
      {
        "wp-social-link__is-incomplete": !url,
        [`has-${iconColor}-color`]: iconColor,
        [`has-${iconBackgroundColor}-background-color`]: iconBackgroundColor
      }
    );
    const [popoverAnchor, setPopoverAnchor] = (0, import_element120.useState)(null);
    const isContentOnlyMode = (0, import_block_editor239.useBlockEditingMode)() === "contentOnly";
    const { activeVariation } = (0, import_data134.useSelect)(
      (select9) => {
        const { getActiveBlockVariation } = select9(import_blocks108.store);
        return {
          activeVariation: getActiveBlockVariation(name123, attributes2)
        };
      },
      [name123, attributes2]
    );
    const { icon: icon4, label: socialLinkName } = getSocialService(activeVariation);
    const socialLinkText = label.trim() === "" ? socialLinkName : label;
    const ref = (0, import_element120.useRef)();
    const blockProps = (0, import_block_editor239.useBlockProps)({
      className: "wp-block-social-link-anchor",
      ref: (0, import_compose56.useMergeRefs)([setPopoverAnchor, ref]),
      onClick: () => setPopover(true),
      onKeyDown: (event) => {
        if (event.keyCode === import_keycodes9.ENTER) {
          event.preventDefault();
          setPopover(true);
        }
      }
    });
    return /* @__PURE__ */ (0, import_jsx_runtime479.jsxs)(import_jsx_runtime479.Fragment, { children: [
      isContentOnlyMode && showLabels && // Add an extra control to modify the label attribute when content only mode is active.
      // With content only mode active, the inspector is hidden, so users need another way
      // to edit this attribute.
      /* @__PURE__ */ (0, import_jsx_runtime479.jsx)(import_block_editor239.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime479.jsx)(
        import_components151.Dropdown,
        {
          popoverProps: { placement: "bottom-start" },
          renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime479.jsx)(
            import_components151.ToolbarButton,
            {
              onClick: onToggle,
              "aria-haspopup": "true",
              "aria-expanded": isOpen,
              children: (0, import_i18n229.__)("Text")
            }
          ),
          renderContent: () => /* @__PURE__ */ (0, import_jsx_runtime479.jsx)(
            import_components151.TextControl,
            {
              __next40pxDefaultSize: true,
              className: "wp-block-social-link__toolbar_content_text",
              label: (0, import_i18n229.__)("Text"),
              help: (0, import_i18n229.__)(
                "Provide a text label or use the default."
              ),
              value: label,
              onChange: (value) => setAttributes({ label: value }),
              placeholder: socialLinkName
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime479.jsx)(import_block_editor239.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime479.jsx)(
        import_components151.__experimentalToolsPanel,
        {
          label: (0, import_i18n229.__)("Settings"),
          resetAll: () => {
            setAttributes({ label: void 0 });
          },
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime479.jsx)(
            import_components151.__experimentalToolsPanelItem,
            {
              isShownByDefault: true,
              label: (0, import_i18n229.__)("Text"),
              hasValue: () => !!label,
              onDeselect: () => {
                setAttributes({ label: void 0 });
              },
              children: /* @__PURE__ */ (0, import_jsx_runtime479.jsx)(
                import_components151.TextControl,
                {
                  __next40pxDefaultSize: true,
                  label: (0, import_i18n229.__)("Text"),
                  help: (0, import_i18n229.__)(
                    "The text is visible when enabled from the parent Social Icons block."
                  ),
                  value: label,
                  onChange: (value) => setAttributes({ label: value }),
                  placeholder: socialLinkName
                }
              )
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime479.jsx)(import_block_editor239.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime479.jsx)(
        import_components151.TextControl,
        {
          __next40pxDefaultSize: true,
          label: (0, import_i18n229.__)("Link relation"),
          help: (0, import_element120.createInterpolateElement)(
            (0, import_i18n229.__)(
              "The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."
            ),
            {
              a: /* @__PURE__ */ (0, import_jsx_runtime479.jsx)(import_components151.ExternalLink, { href: "https://developer.mozilla.org/docs/Web/HTML/Attributes/rel" })
            }
          ),
          value: rel || "",
          onChange: (value) => setAttributes({ rel: value })
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime479.jsxs)(
        "li",
        {
          role: "presentation",
          className: wrapperClasses,
          style: {
            color: iconColorValue,
            backgroundColor: iconBackgroundColorValue
          },
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime479.jsxs)("button", { "aria-haspopup": "dialog", ...blockProps, role: "button", children: [
              /* @__PURE__ */ (0, import_jsx_runtime479.jsx)(import_components151.Icon, { icon: icon4 }),
              /* @__PURE__ */ (0, import_jsx_runtime479.jsx)(
                "span",
                {
                  className: clsx_default("wp-block-social-link-label", {
                    "screen-reader-text": !showLabels
                  }),
                  children: socialLinkText
                }
              )
            ] }),
            isSelected && showURLPopover && /* @__PURE__ */ (0, import_jsx_runtime479.jsx)(
              SocialLinkURLPopover,
              {
                url,
                setAttributes,
                setPopover,
                popoverAnchor,
                clientId
              }
            )
          ]
        }
      )
    ] });
  };
  var edit_default32 = SocialLinkEdit;

  // packages/block-library/build-module/social-link/block.json
  var block_default101 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/social-link",
    title: "Social Icon",
    category: "widgets",
    parent: ["core/social-links"],
    description: "Display an icon linking to a social profile or site.",
    textdomain: "default",
    attributes: {
      url: {
        type: "string",
        role: "content"
      },
      service: {
        type: "string"
      },
      label: {
        type: "string",
        role: "content"
      },
      rel: {
        type: "string"
      }
    },
    usesContext: [
      "openInNewTab",
      "showLabels",
      "iconColor",
      "iconColorValue",
      "iconBackgroundColor",
      "iconBackgroundColorValue"
    ],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-social-link-editor"
  };

  // packages/block-library/build-module/social-link/variations.mjs
  var import_i18n230 = __toESM(require_i18n(), 1);
  var variations16 = [
    {
      isDefault: true,
      name: "wordpress",
      attributes: { service: "wordpress" },
      title: (0, import_i18n230._x)("WordPress", "social link block variation name"),
      icon: WordPressIcon
    },
    {
      name: "fivehundredpx",
      attributes: { service: "fivehundredpx" },
      title: (0, import_i18n230._x)("500px", "social link block variation name"),
      icon: FivehundredpxIcon
    },
    {
      name: "amazon",
      attributes: { service: "amazon" },
      title: (0, import_i18n230._x)("Amazon", "social link block variation name"),
      icon: AmazonIcon
    },
    {
      name: "bandcamp",
      attributes: { service: "bandcamp" },
      title: (0, import_i18n230._x)("Bandcamp", "social link block variation name"),
      icon: BandcampIcon
    },
    {
      name: "behance",
      attributes: { service: "behance" },
      title: (0, import_i18n230._x)("Behance", "social link block variation name"),
      icon: BehanceIcon
    },
    {
      name: "bluesky",
      attributes: { service: "bluesky" },
      title: (0, import_i18n230._x)("Bluesky", "social link block variation name"),
      icon: BlueskyIcon
    },
    {
      name: "chain",
      attributes: { service: "chain" },
      title: (0, import_i18n230._x)("Link", "social link block variation name"),
      icon: ChainIcon
    },
    {
      name: "codepen",
      attributes: { service: "codepen" },
      title: (0, import_i18n230._x)("CodePen", "social link block variation name"),
      icon: CodepenIcon
    },
    {
      name: "deviantart",
      attributes: { service: "deviantart" },
      title: (0, import_i18n230._x)("DeviantArt", "social link block variation name"),
      icon: DeviantArtIcon
    },
    {
      name: "discord",
      attributes: { service: "discord" },
      title: (0, import_i18n230._x)("Discord", "social link block variation name"),
      icon: DiscordIcon
    },
    {
      name: "dribbble",
      attributes: { service: "dribbble" },
      title: (0, import_i18n230._x)("Dribbble", "social link block variation name"),
      icon: DribbbleIcon
    },
    {
      name: "dropbox",
      attributes: { service: "dropbox" },
      title: (0, import_i18n230._x)("Dropbox", "social link block variation name"),
      icon: DropboxIcon
    },
    {
      name: "etsy",
      attributes: { service: "etsy" },
      title: (0, import_i18n230._x)("Etsy", "social link block variation name"),
      icon: EtsyIcon
    },
    {
      name: "facebook",
      attributes: { service: "facebook" },
      title: (0, import_i18n230._x)("Facebook", "social link block variation name"),
      icon: FacebookIcon
    },
    {
      name: "feed",
      attributes: { service: "feed" },
      title: (0, import_i18n230._x)("RSS Feed", "social link block variation name"),
      icon: FeedIcon
    },
    {
      name: "flickr",
      attributes: { service: "flickr" },
      title: (0, import_i18n230._x)("Flickr", "social link block variation name"),
      icon: FlickrIcon
    },
    {
      name: "foursquare",
      attributes: { service: "foursquare" },
      title: (0, import_i18n230._x)("Foursquare", "social link block variation name"),
      icon: FoursquareIcon
    },
    {
      name: "goodreads",
      attributes: { service: "goodreads" },
      title: (0, import_i18n230._x)("Goodreads", "social link block variation name"),
      icon: GoodreadsIcon
    },
    {
      name: "google",
      attributes: { service: "google" },
      title: (0, import_i18n230._x)("Google", "social link block variation name"),
      icon: GoogleIcon
    },
    {
      name: "github",
      attributes: { service: "github" },
      title: (0, import_i18n230._x)("GitHub", "social link block variation name"),
      icon: GitHubIcon
    },
    {
      name: "gravatar",
      attributes: { service: "gravatar" },
      title: (0, import_i18n230._x)("Gravatar", "social link block variation name"),
      icon: GravatarIcon
    },
    {
      name: "instagram",
      attributes: { service: "instagram" },
      title: (0, import_i18n230._x)("Instagram", "social link block variation name"),
      icon: InstagramIcon
    },
    {
      name: "lastfm",
      attributes: { service: "lastfm" },
      title: (0, import_i18n230._x)("Last.fm", "social link block variation name"),
      icon: LastfmIcon
    },
    {
      name: "linkedin",
      attributes: { service: "linkedin" },
      title: (0, import_i18n230._x)("LinkedIn", "social link block variation name"),
      icon: LinkedInIcon
    },
    {
      name: "mail",
      attributes: { service: "mail" },
      title: (0, import_i18n230._x)("Mail", "social link block variation name"),
      keywords: ["email", "e-mail"],
      icon: MailIcon
    },
    {
      name: "mastodon",
      attributes: { service: "mastodon" },
      title: (0, import_i18n230._x)("Mastodon", "social link block variation name"),
      icon: MastodonIcon
    },
    {
      name: "meetup",
      attributes: { service: "meetup" },
      title: (0, import_i18n230._x)("Meetup", "social link block variation name"),
      icon: MeetupIcon
    },
    {
      name: "medium",
      attributes: { service: "medium" },
      title: (0, import_i18n230._x)("Medium", "social link block variation name"),
      icon: MediumIcon
    },
    {
      name: "patreon",
      attributes: { service: "patreon" },
      title: (0, import_i18n230._x)("Patreon", "social link block variation name"),
      icon: PatreonIcon
    },
    {
      name: "pinterest",
      attributes: { service: "pinterest" },
      title: (0, import_i18n230._x)("Pinterest", "social link block variation name"),
      icon: PinterestIcon
    },
    {
      name: "pocket",
      attributes: { service: "pocket" },
      title: (0, import_i18n230._x)("Pocket", "social link block variation name"),
      icon: PocketIcon
    },
    {
      name: "reddit",
      attributes: { service: "reddit" },
      title: (0, import_i18n230._x)("Reddit", "social link block variation name"),
      icon: RedditIcon
    },
    {
      name: "skype",
      attributes: { service: "skype" },
      title: (0, import_i18n230._x)("Skype", "social link block variation name"),
      icon: SkypeIcon,
      // Deprecated: Skype service is no longer available.
      scope: []
    },
    {
      name: "snapchat",
      attributes: { service: "snapchat" },
      title: (0, import_i18n230._x)("Snapchat", "social link block variation name"),
      icon: SnapchatIcon
    },
    {
      name: "soundcloud",
      attributes: { service: "soundcloud" },
      title: (0, import_i18n230._x)("SoundCloud", "social link block variation name"),
      icon: SoundCloudIcon
    },
    {
      name: "spotify",
      attributes: { service: "spotify" },
      title: (0, import_i18n230._x)("Spotify", "social link block variation name"),
      icon: SpotifyIcon
    },
    {
      name: "telegram",
      attributes: { service: "telegram" },
      title: (0, import_i18n230._x)("Telegram", "social link block variation name"),
      icon: TelegramIcon
    },
    {
      name: "threads",
      attributes: { service: "threads" },
      title: (0, import_i18n230._x)("Threads", "social link block variation name"),
      icon: ThreadsIcon
    },
    {
      name: "tiktok",
      attributes: { service: "tiktok" },
      title: (0, import_i18n230._x)("TikTok", "social link block variation name"),
      icon: TiktokIcon
    },
    {
      name: "tumblr",
      attributes: { service: "tumblr" },
      title: (0, import_i18n230._x)("Tumblr", "social link block variation name"),
      icon: TumblrIcon
    },
    {
      name: "twitch",
      attributes: { service: "twitch" },
      title: (0, import_i18n230._x)("Twitch", "social link block variation name"),
      icon: TwitchIcon
    },
    {
      name: "twitter",
      attributes: { service: "twitter" },
      title: (0, import_i18n230._x)("Twitter", "social link block variation name"),
      icon: TwitterIcon
    },
    {
      name: "vimeo",
      attributes: { service: "vimeo" },
      title: (0, import_i18n230._x)("Vimeo", "social link block variation name"),
      icon: VimeoIcon
    },
    {
      name: "vk",
      attributes: { service: "vk" },
      title: (0, import_i18n230._x)("VK", "social link block variation name"),
      icon: VkIcon
    },
    {
      name: "whatsapp",
      attributes: { service: "whatsapp" },
      title: (0, import_i18n230._x)("WhatsApp", "social link block variation name"),
      icon: WhatsAppIcon
    },
    {
      name: "x",
      attributes: { service: "x" },
      keywords: ["twitter"],
      title: (0, import_i18n230._x)("X", "social link block variation name"),
      icon: XIcon
    },
    {
      name: "yelp",
      attributes: { service: "yelp" },
      title: (0, import_i18n230._x)("Yelp", "social link block variation name"),
      icon: YelpIcon
    },
    {
      name: "youtube",
      attributes: { service: "youtube" },
      title: (0, import_i18n230._x)("YouTube", "social link block variation name"),
      icon: YouTubeIcon
    }
  ];
  variations16.forEach((variation) => {
    if (variation.isActive) {
      return;
    }
    variation.isActive = (blockAttributes8, variationAttributes) => blockAttributes8.service === variationAttributes.service;
  });
  var variations_default16 = variations16;

  // packages/block-library/build-module/social-link/index.mjs
  var { fieldsKey: fieldsKey18, formKey: formKey18 } = unlock(import_blocks109.privateApis);
  var { name: name102 } = block_default101;
  var settings101 = {
    icon: share_default,
    edit: edit_default32,
    variations: variations_default16
  };
  if (window.__experimentalContentOnlyInspectorFields) {
    settings101[fieldsKey18] = [
      {
        id: "link",
        label: (0, import_i18n231.__)("Link"),
        type: "url",
        Edit: "link",
        // TODO: replace with custom component
        getValue: ({ item }) => ({
          url: item.url,
          rel: item.rel
        }),
        setValue: ({ value }) => ({
          url: value.url,
          rel: value.rel
        })
      },
      {
        id: "label",
        label: (0, import_i18n231.__)("Label"),
        type: "text"
      }
    ];
    settings101[formKey18] = {
      fields: ["link", "label"]
    };
  }
  var init101 = () => initBlock({ name: name102, metadata: block_default101, settings: settings101 });

  // packages/block-library/build-module/social-links/index.mjs
  var social_links_exports = {};
  __export(social_links_exports, {
    init: () => init102,
    metadata: () => block_default102,
    name: () => name103,
    settings: () => settings102
  });

  // packages/block-library/build-module/social-links/deprecated.mjs
  var import_block_editor240 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime480 = __toESM(require_jsx_runtime(), 1);
  var migrateWithLayout3 = (attributes2) => {
    if (!!attributes2.layout) {
      return attributes2;
    }
    const { className } = attributes2;
    const prefix = `items-justified-`;
    const justifiedItemsRegex = new RegExp(`\\b${prefix}[^ ]*[ ]?\\b`, "g");
    const newAttributes = {
      ...attributes2,
      className: className?.replace(justifiedItemsRegex, "").trim()
    };
    const justifyContent = className?.match(justifiedItemsRegex)?.[0]?.trim();
    if (justifyContent) {
      Object.assign(newAttributes, {
        layout: {
          type: "flex",
          justifyContent: justifyContent.slice(prefix.length)
        }
      });
    }
    return newAttributes;
  };
  var deprecated17 = [
    // V1. Remove CSS variable use for colors.
    {
      attributes: {
        iconColor: {
          type: "string"
        },
        customIconColor: {
          type: "string"
        },
        iconColorValue: {
          type: "string"
        },
        iconBackgroundColor: {
          type: "string"
        },
        customIconBackgroundColor: {
          type: "string"
        },
        iconBackgroundColorValue: {
          type: "string"
        },
        openInNewTab: {
          type: "boolean",
          default: false
        },
        size: {
          type: "string"
        }
      },
      providesContext: {
        openInNewTab: "openInNewTab"
      },
      supports: {
        align: ["left", "center", "right"],
        anchor: true
      },
      migrate: migrateWithLayout3,
      save: (props) => {
        const {
          attributes: {
            iconBackgroundColorValue,
            iconColorValue,
            itemsJustification,
            size
          }
        } = props;
        const className = clsx_default(size, {
          "has-icon-color": iconColorValue,
          "has-icon-background-color": iconBackgroundColorValue,
          [`items-justified-${itemsJustification}`]: itemsJustification
        });
        const style2 = {
          "--wp--social-links--icon-color": iconColorValue,
          "--wp--social-links--icon-background-color": iconBackgroundColorValue
        };
        return /* @__PURE__ */ (0, import_jsx_runtime480.jsx)("ul", { ...import_block_editor240.useBlockProps.save({ className, style: style2 }), children: /* @__PURE__ */ (0, import_jsx_runtime480.jsx)(import_block_editor240.InnerBlocks.Content, {}) });
      }
    }
  ];
  var deprecated_default48 = deprecated17;

  // packages/block-library/build-module/social-links/edit.mjs
  var import_element121 = __toESM(require_element(), 1);
  var import_block_editor241 = __toESM(require_block_editor(), 1);
  var import_components152 = __toESM(require_components(), 1);
  var import_i18n232 = __toESM(require_i18n(), 1);
  var import_data135 = __toESM(require_data(), 1);
  var import_jsx_runtime481 = __toESM(require_jsx_runtime(), 1);
  var sizeOptions = [
    { label: (0, import_i18n232.__)("Default"), value: "" },
    { label: (0, import_i18n232.__)("Small"), value: "has-small-icon-size" },
    { label: (0, import_i18n232.__)("Normal"), value: "has-normal-icon-size" },
    { label: (0, import_i18n232.__)("Large"), value: "has-large-icon-size" },
    { label: (0, import_i18n232.__)("Huge"), value: "has-huge-icon-size" }
  ];
  function SocialLinksEdit(props) {
    const {
      clientId,
      attributes: attributes2,
      iconBackgroundColor,
      iconColor,
      isSelected,
      setAttributes,
      setIconBackgroundColor,
      setIconColor
    } = props;
    const {
      iconBackgroundColorValue,
      iconColorValue,
      openInNewTab,
      showLabels,
      size
    } = attributes2;
    const { hasSocialIcons, hasSelectedChild } = (0, import_data135.useSelect)(
      (select9) => {
        const { getBlockCount, hasSelectedInnerBlock } = select9(import_block_editor241.store);
        return {
          hasSocialIcons: getBlockCount(clientId) > 0,
          hasSelectedChild: hasSelectedInnerBlock(clientId)
        };
      },
      [clientId]
    );
    const hasAnySelected = isSelected || hasSelectedChild;
    const logosOnly = attributes2.className?.includes("is-style-logos-only");
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    (0, import_element121.useEffect)(() => {
      if (logosOnly) {
        let restore;
        setAttributes((prev) => {
          restore = {
            iconBackgroundColor: prev.iconBackgroundColor,
            iconBackgroundColorValue: prev.iconBackgroundColorValue,
            customIconBackgroundColor: prev.customIconBackgroundColor
          };
          return {
            iconBackgroundColor: void 0,
            iconBackgroundColorValue: void 0,
            customIconBackgroundColor: void 0
          };
        });
        return () => setAttributes({ ...restore });
      }
    }, [logosOnly, setAttributes]);
    const className = clsx_default(size, {
      "has-visible-labels": showLabels,
      "has-icon-color": iconColor.color || iconColorValue,
      "has-icon-background-color": iconBackgroundColor.color || iconBackgroundColorValue
    });
    const blockProps = (0, import_block_editor241.useBlockProps)({ className });
    const innerBlocksProps = (0, import_block_editor241.useInnerBlocksProps)(blockProps, {
      templateLock: false,
      orientation: attributes2.layout?.orientation ?? "horizontal",
      __experimentalAppenderTagName: "li",
      renderAppender: !hasSocialIcons || hasAnySelected ? import_block_editor241.InnerBlocks.ButtonBlockAppender : void 0
    });
    const colorSettings = [
      {
        // Use custom attribute as fallback to prevent loss of named color selection when
        // switching themes to a new theme that does not have a matching named color.
        value: iconColor.color || iconColorValue,
        onChange: (colorValue) => {
          setIconColor(colorValue);
          setAttributes({ iconColorValue: colorValue });
        },
        label: (0, import_i18n232.__)("Icon color"),
        resetAllFilter: () => {
          setIconColor(void 0);
          setAttributes({ iconColorValue: void 0 });
        }
      }
    ];
    if (!logosOnly) {
      colorSettings.push({
        // Use custom attribute as fallback to prevent loss of named color selection when
        // switching themes to a new theme that does not have a matching named color.
        value: iconBackgroundColor.color || iconBackgroundColorValue,
        onChange: (colorValue) => {
          setIconBackgroundColor(colorValue);
          setAttributes({
            iconBackgroundColorValue: colorValue
          });
        },
        label: (0, import_i18n232.__)("Icon background"),
        resetAllFilter: () => {
          setIconBackgroundColor(void 0);
          setAttributes({ iconBackgroundColorValue: void 0 });
        }
      });
    }
    const colorGradientSettings = (0, import_block_editor241.__experimentalUseMultipleOriginColorsAndGradients)();
    return /* @__PURE__ */ (0, import_jsx_runtime481.jsxs)(import_jsx_runtime481.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime481.jsx)(import_block_editor241.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime481.jsxs)(
        import_components152.__experimentalToolsPanel,
        {
          label: (0, import_i18n232.__)("Settings"),
          resetAll: () => {
            setAttributes({
              openInNewTab: false,
              showLabels: false,
              size: void 0
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime481.jsx)(
              import_components152.__experimentalToolsPanelItem,
              {
                isShownByDefault: true,
                hasValue: () => !!size,
                label: (0, import_i18n232.__)("Icon size"),
                onDeselect: () => setAttributes({ size: void 0 }),
                children: /* @__PURE__ */ (0, import_jsx_runtime481.jsx)(
                  import_components152.SelectControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n232.__)("Icon size"),
                    onChange: (newSize) => {
                      setAttributes({
                        size: newSize === "" ? void 0 : newSize
                      });
                    },
                    value: size ?? "",
                    options: sizeOptions
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime481.jsx)(
              import_components152.__experimentalToolsPanelItem,
              {
                isShownByDefault: true,
                label: (0, import_i18n232.__)("Show text"),
                hasValue: () => !!showLabels,
                onDeselect: () => setAttributes({ showLabels: false }),
                children: /* @__PURE__ */ (0, import_jsx_runtime481.jsx)(
                  import_components152.ToggleControl,
                  {
                    label: (0, import_i18n232.__)("Show text"),
                    checked: showLabels,
                    onChange: () => setAttributes({ showLabels: !showLabels })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime481.jsx)(
              import_components152.__experimentalToolsPanelItem,
              {
                isShownByDefault: true,
                label: (0, import_i18n232.__)("Open links in new tab"),
                hasValue: () => !!openInNewTab,
                onDeselect: () => setAttributes({ openInNewTab: false }),
                children: /* @__PURE__ */ (0, import_jsx_runtime481.jsx)(
                  import_components152.ToggleControl,
                  {
                    label: (0, import_i18n232.__)("Open links in new tab"),
                    checked: openInNewTab,
                    onChange: () => setAttributes({
                      openInNewTab: !openInNewTab
                    })
                  }
                )
              }
            )
          ]
        }
      ) }),
      colorGradientSettings.hasColorsOrGradients && /* @__PURE__ */ (0, import_jsx_runtime481.jsxs)(import_block_editor241.InspectorControls, { group: "color", children: [
        colorSettings.map(
          ({ onChange, label, value, resetAllFilter }) => /* @__PURE__ */ (0, import_jsx_runtime481.jsx)(
            import_block_editor241.__experimentalColorGradientSettingsDropdown,
            {
              __experimentalIsRenderedInSidebar: true,
              settings: [
                {
                  colorValue: value,
                  label,
                  onColorChange: onChange,
                  isShownByDefault: true,
                  resetAllFilter,
                  enableAlpha: true,
                  clearable: true
                }
              ],
              panelId: clientId,
              ...colorGradientSettings
            },
            `social-links-color-${label}`
          )
        ),
        !logosOnly && /* @__PURE__ */ (0, import_jsx_runtime481.jsx)(
          import_block_editor241.ContrastChecker,
          {
            ...{
              textColor: iconColorValue,
              backgroundColor: iconBackgroundColorValue
            },
            isLargeText: false
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime481.jsx)("ul", { ...innerBlocksProps })
    ] });
  }
  var iconColorAttributes = {
    iconColor: "icon-color",
    iconBackgroundColor: "icon-background-color"
  };
  var edit_default33 = (0, import_block_editor241.withColors)(iconColorAttributes)(SocialLinksEdit);

  // packages/block-library/build-module/social-links/block.json
  var block_default102 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/social-links",
    title: "Social Icons",
    category: "widgets",
    allowedBlocks: ["core/social-link"],
    description: "Display icons linking to your social profiles or sites.",
    keywords: ["links"],
    textdomain: "default",
    attributes: {
      iconColor: {
        type: "string"
      },
      customIconColor: {
        type: "string"
      },
      iconColorValue: {
        type: "string"
      },
      iconBackgroundColor: {
        type: "string"
      },
      customIconBackgroundColor: {
        type: "string"
      },
      iconBackgroundColorValue: {
        type: "string"
      },
      openInNewTab: {
        type: "boolean",
        default: false
      },
      showLabels: {
        type: "boolean",
        default: false
      },
      size: {
        type: "string"
      }
    },
    providesContext: {
      openInNewTab: "openInNewTab",
      showLabels: "showLabels",
      iconColor: "iconColor",
      iconColorValue: "iconColorValue",
      iconBackgroundColor: "iconBackgroundColor",
      iconBackgroundColorValue: "iconBackgroundColorValue"
    },
    supports: {
      align: ["left", "center", "right"],
      anchor: true,
      html: false,
      __experimentalExposeControlsToChildren: true,
      layout: {
        allowSwitching: false,
        allowInheriting: false,
        allowVerticalAlignment: false,
        default: {
          type: "flex"
        }
      },
      color: {
        enableContrastChecker: false,
        background: true,
        gradients: true,
        text: false,
        __experimentalDefaultControls: {
          background: false
        }
      },
      spacing: {
        blockGap: ["horizontal", "vertical"],
        margin: true,
        padding: true,
        units: ["px", "em", "rem", "vh", "vw"],
        __experimentalDefaultControls: {
          blockGap: true,
          margin: true,
          padding: false
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      },
      contentRole: true,
      listView: true
    },
    styles: [
      { name: "default", label: "Default", isDefault: true },
      { name: "logos-only", label: "Logos Only" },
      { name: "pill-shape", label: "Pill Shape" }
    ],
    editorStyle: "wp-block-social-links-editor",
    style: "wp-block-social-links"
  };

  // packages/block-library/build-module/social-links/save.mjs
  var import_block_editor242 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime482 = __toESM(require_jsx_runtime(), 1);
  function save46(props) {
    const {
      attributes: {
        iconBackgroundColorValue,
        iconColorValue,
        showLabels,
        size
      }
    } = props;
    const className = clsx_default(size, {
      "has-visible-labels": showLabels,
      "has-icon-color": iconColorValue,
      "has-icon-background-color": iconBackgroundColorValue
    });
    const blockProps = import_block_editor242.useBlockProps.save({ className });
    const innerBlocksProps = import_block_editor242.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime482.jsx)("ul", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/social-links/index.mjs
  var { name: name103 } = block_default102;
  var settings102 = {
    example: {
      innerBlocks: [
        {
          name: "core/social-link",
          attributes: {
            service: "wordpress",
            url: "https://wordpress.org"
          }
        },
        {
          name: "core/social-link",
          attributes: {
            service: "facebook",
            url: "https://www.facebook.com/WordPress/"
          }
        },
        {
          name: "core/social-link",
          attributes: {
            service: "twitter",
            url: "https://twitter.com/WordPress"
          }
        }
      ]
    },
    icon: share_default,
    edit: edit_default33,
    save: save46,
    deprecated: deprecated_default48
  };
  var init102 = () => initBlock({ name: name103, metadata: block_default102, settings: settings102 });

  // packages/block-library/build-module/spacer/index.mjs
  var spacer_exports = {};
  __export(spacer_exports, {
    init: () => init103,
    metadata: () => block_default103,
    name: () => name104,
    settings: () => settings103
  });

  // packages/block-library/build-module/spacer/deprecated.mjs
  var import_block_editor243 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime483 = __toESM(require_jsx_runtime(), 1);
  var deprecated18 = [
    {
      attributes: {
        height: {
          type: "number",
          default: 100
        },
        width: {
          type: "number"
        }
      },
      migrate(attributes2) {
        const { height, width } = attributes2;
        return {
          ...attributes2,
          width: width !== void 0 ? `${width}px` : void 0,
          height: height !== void 0 ? `${height}px` : void 0
        };
      },
      save({ attributes: attributes2 }) {
        return /* @__PURE__ */ (0, import_jsx_runtime483.jsx)(
          "div",
          {
            ...import_block_editor243.useBlockProps.save({
              style: {
                height: attributes2.height,
                width: attributes2.width
              },
              "aria-hidden": true
            })
          }
        );
      }
    }
  ];
  var deprecated_default49 = deprecated18;

  // packages/block-library/build-module/spacer/edit.mjs
  var import_block_editor245 = __toESM(require_block_editor(), 1);
  var import_components154 = __toESM(require_components(), 1);
  var import_element122 = __toESM(require_element(), 1);
  var import_primitives214 = __toESM(require_primitives(), 1);
  var import_data136 = __toESM(require_data(), 1);

  // packages/block-library/build-module/spacer/controls.mjs
  var import_i18n233 = __toESM(require_i18n(), 1);
  var import_block_editor244 = __toESM(require_block_editor(), 1);
  var import_components153 = __toESM(require_components(), 1);
  var import_compose57 = __toESM(require_compose(), 1);
  var import_primitives213 = __toESM(require_primitives(), 1);

  // packages/block-library/build-module/spacer/constants.mjs
  var MIN_SPACER_SIZE = 0;

  // packages/block-library/build-module/spacer/controls.mjs
  var import_jsx_runtime484 = __toESM(require_jsx_runtime(), 1);
  var { useSpacingSizes } = unlock(import_block_editor244.privateApis);
  function DimensionInput({ label, onChange, isResizing, value = "" }) {
    const inputId = (0, import_compose57.useInstanceId)(import_components153.__experimentalUnitControl, "block-spacer-height-input");
    const spacingSizes = useSpacingSizes();
    const [spacingUnits] = (0, import_block_editor244.useSettings)("spacing.units");
    const availableUnits = spacingUnits ? spacingUnits.filter((unit) => unit !== "%") : ["px", "em", "rem", "vw", "vh"];
    const units = (0, import_components153.__experimentalUseCustomUnits)({
      availableUnits,
      defaultValues: { px: 100, em: 10, rem: 10, vw: 10, vh: 25 }
    });
    const [parsedQuantity, parsedUnit] = (0, import_components153.__experimentalParseQuantityAndUnitFromRawValue)(value);
    const computedValue = (0, import_block_editor244.isValueSpacingPreset)(value) ? value : [parsedQuantity, isResizing ? "px" : parsedUnit].join("");
    return /* @__PURE__ */ (0, import_jsx_runtime484.jsx)(import_jsx_runtime484.Fragment, { children: spacingSizes?.length < 2 ? /* @__PURE__ */ (0, import_jsx_runtime484.jsx)(
      import_components153.__experimentalUnitControl,
      {
        id: inputId,
        isResetValueOnUnitChange: true,
        min: MIN_SPACER_SIZE,
        onChange,
        value: computedValue,
        units,
        label,
        __next40pxDefaultSize: true
      }
    ) : /* @__PURE__ */ (0, import_jsx_runtime484.jsx)(import_primitives213.View, { className: "tools-panel-item-spacing", children: /* @__PURE__ */ (0, import_jsx_runtime484.jsx)(
      import_block_editor244.__experimentalSpacingSizesControl,
      {
        values: { all: computedValue },
        onChange: ({ all }) => {
          onChange(all);
        },
        label,
        sides: ["all"],
        units,
        allowReset: false,
        splitOnAxis: false,
        showSideInLabel: false
      }
    ) }) });
  }
  function SpacerControls({
    setAttributes,
    orientation,
    height,
    width,
    isResizing
  }) {
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime484.jsx)(import_block_editor244.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime484.jsxs)(
      import_components153.__experimentalToolsPanel,
      {
        label: (0, import_i18n233.__)("Settings"),
        resetAll: () => {
          setAttributes({
            width: void 0,
            height: "100px"
          });
        },
        dropdownMenuProps,
        children: [
          orientation === "horizontal" && /* @__PURE__ */ (0, import_jsx_runtime484.jsx)(
            import_components153.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n233.__)("Width"),
              isShownByDefault: true,
              hasValue: () => width !== void 0,
              onDeselect: () => setAttributes({ width: void 0 }),
              children: /* @__PURE__ */ (0, import_jsx_runtime484.jsx)(
                DimensionInput,
                {
                  label: (0, import_i18n233.__)("Width"),
                  value: width,
                  onChange: (nextWidth) => setAttributes({ width: nextWidth }),
                  isResizing
                }
              )
            }
          ),
          orientation !== "horizontal" && /* @__PURE__ */ (0, import_jsx_runtime484.jsx)(
            import_components153.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n233.__)("Height"),
              isShownByDefault: true,
              hasValue: () => height !== "100px",
              onDeselect: () => setAttributes({ height: "100px" }),
              children: /* @__PURE__ */ (0, import_jsx_runtime484.jsx)(
                DimensionInput,
                {
                  label: (0, import_i18n233.__)("Height"),
                  value: height,
                  onChange: (nextHeight) => setAttributes({ height: nextHeight }),
                  isResizing
                }
              )
            }
          )
        ]
      }
    ) });
  }

  // packages/block-library/build-module/spacer/edit.mjs
  var import_jsx_runtime485 = __toESM(require_jsx_runtime(), 1);
  var { useSpacingSizes: useSpacingSizes2 } = unlock(import_block_editor245.privateApis);
  var ResizableSpacer = ({
    orientation,
    onResizeStart,
    onResize,
    onResizeStop,
    isSelected,
    isResizing,
    setIsResizing,
    ...props
  }) => {
    const getCurrentSize = (elt) => {
      return orientation === "horizontal" ? elt.clientWidth : elt.clientHeight;
    };
    const getNextVal = (elt) => {
      return `${getCurrentSize(elt)}px`;
    };
    return /* @__PURE__ */ (0, import_jsx_runtime485.jsx)(
      import_components154.ResizableBox,
      {
        className: clsx_default("block-library-spacer__resize-container", {
          "resize-horizontal": orientation === "horizontal",
          "is-resizing": isResizing,
          "is-selected": isSelected
        }),
        onResizeStart: (_event, _direction, elt) => {
          const nextVal = getNextVal(elt);
          onResizeStart(nextVal);
          onResize(nextVal);
        },
        onResize: (_event, _direction, elt) => {
          onResize(getNextVal(elt));
          if (!isResizing) {
            setIsResizing(true);
          }
        },
        onResizeStop: (_event, _direction, elt) => {
          const nextVal = getCurrentSize(elt);
          onResizeStop(`${nextVal}px`);
          setIsResizing(false);
        },
        __experimentalShowTooltip: true,
        __experimentalTooltipProps: {
          axis: orientation === "horizontal" ? "x" : "y",
          position: "corner",
          isVisible: isResizing
        },
        showHandle: isSelected,
        ...props
      }
    );
  };
  var SpacerEdit = ({
    attributes: attributes2,
    isSelected,
    setAttributes,
    toggleSelection,
    context,
    __unstableParentLayout: parentLayout,
    className
  }) => {
    const disableCustomSpacingSizes = (0, import_data136.useSelect)((select9) => {
      const editorSettings = select9(import_block_editor245.store).getSettings();
      return editorSettings?.disableCustomSpacingSizes;
    });
    const { orientation } = context;
    const {
      orientation: parentOrientation,
      type,
      default: { type: defaultType } = {}
    } = parentLayout || {};
    const isFlexLayout = type === "flex" || !type && defaultType === "flex";
    const inheritedOrientation = !parentOrientation && isFlexLayout ? "horizontal" : parentOrientation || orientation;
    const { height, width, style: blockStyle = {} } = attributes2;
    const { layout = {} } = blockStyle;
    const { selfStretch, flexSize } = layout;
    const spacingSizes = useSpacingSizes2();
    const [isResizing, setIsResizing] = (0, import_element122.useState)(false);
    const [temporaryHeight, setTemporaryHeight] = (0, import_element122.useState)(null);
    const [temporaryWidth, setTemporaryWidth] = (0, import_element122.useState)(null);
    const onResizeStart = () => toggleSelection(false);
    const onResizeStop = () => toggleSelection(true);
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data136.useDispatch)(import_block_editor245.store);
    const handleOnVerticalResizeStop = (newHeight) => {
      onResizeStop();
      if (isFlexLayout) {
        setAttributes({
          style: {
            ...blockStyle,
            layout: {
              ...layout,
              flexSize: newHeight,
              selfStretch: "fixed"
            }
          }
        });
      }
      setAttributes({ height: newHeight });
      setTemporaryHeight(null);
    };
    const handleOnHorizontalResizeStop = (newWidth) => {
      onResizeStop();
      if (isFlexLayout) {
        setAttributes({
          style: {
            ...blockStyle,
            layout: {
              ...layout,
              flexSize: newWidth,
              selfStretch: "fixed"
            }
          }
        });
      }
      setAttributes({ width: newWidth });
      setTemporaryWidth(null);
    };
    const getHeightForVerticalBlocks = () => {
      if (isFlexLayout) {
        return void 0;
      }
      return temporaryHeight || (0, import_block_editor245.getSpacingPresetCssVar)(height) || void 0;
    };
    const getWidthForHorizontalBlocks = () => {
      if (isFlexLayout) {
        return void 0;
      }
      return temporaryWidth || (0, import_block_editor245.getSpacingPresetCssVar)(width) || void 0;
    };
    const sizeConditionalOnOrientation = inheritedOrientation === "horizontal" ? temporaryWidth || flexSize : temporaryHeight || flexSize;
    const style2 = {
      height: inheritedOrientation === "horizontal" ? 24 : getHeightForVerticalBlocks(),
      width: inheritedOrientation === "horizontal" ? getWidthForHorizontalBlocks() : void 0,
      // In vertical flex containers, the spacer shrinks to nothing without a minimum width.
      minWidth: inheritedOrientation === "vertical" && isFlexLayout ? 48 : void 0,
      // Add flex-basis so temporary sizes are respected.
      flexBasis: isFlexLayout ? sizeConditionalOnOrientation : void 0,
      // Remove flex-grow when resizing.
      flexGrow: isFlexLayout && isResizing ? 0 : void 0
    };
    const resizableBoxWithOrientation = (blockOrientation) => {
      if (blockOrientation === "horizontal") {
        return /* @__PURE__ */ (0, import_jsx_runtime485.jsx)(
          ResizableSpacer,
          {
            minWidth: MIN_SPACER_SIZE,
            enable: {
              top: false,
              right: true,
              bottom: false,
              left: false,
              topRight: false,
              bottomRight: false,
              bottomLeft: false,
              topLeft: false
            },
            orientation: blockOrientation,
            onResizeStart,
            onResize: setTemporaryWidth,
            onResizeStop: handleOnHorizontalResizeStop,
            isSelected,
            isResizing,
            setIsResizing
          }
        );
      }
      return /* @__PURE__ */ (0, import_jsx_runtime485.jsx)(import_jsx_runtime485.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime485.jsx)(
        ResizableSpacer,
        {
          minHeight: MIN_SPACER_SIZE,
          enable: {
            top: false,
            right: false,
            bottom: true,
            left: false,
            topRight: false,
            bottomRight: false,
            bottomLeft: false,
            topLeft: false
          },
          orientation: blockOrientation,
          onResizeStart,
          onResize: setTemporaryHeight,
          onResizeStop: handleOnVerticalResizeStop,
          isSelected,
          isResizing,
          setIsResizing
        }
      ) });
    };
    (0, import_element122.useEffect)(() => {
      const setAttributesCovertly = (nextAttributes) => {
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes(nextAttributes);
      };
      if (isFlexLayout && selfStretch !== "fill" && selfStretch !== "fit" && flexSize === void 0) {
        if (inheritedOrientation === "horizontal") {
          const newSize = (0, import_block_editor245.getCustomValueFromPreset)(width, spacingSizes) || (0, import_block_editor245.getCustomValueFromPreset)(height, spacingSizes) || "100px";
          setAttributesCovertly({
            width: "0px",
            style: {
              ...blockStyle,
              layout: {
                ...layout,
                flexSize: newSize,
                selfStretch: "fixed"
              }
            }
          });
        } else {
          const newSize = (0, import_block_editor245.getCustomValueFromPreset)(height, spacingSizes) || (0, import_block_editor245.getCustomValueFromPreset)(width, spacingSizes) || "100px";
          setAttributesCovertly({
            height: "0px",
            style: {
              ...blockStyle,
              layout: {
                ...layout,
                flexSize: newSize,
                selfStretch: "fixed"
              }
            }
          });
        }
      } else if (isFlexLayout && (selfStretch === "fill" || selfStretch === "fit")) {
        setAttributesCovertly(
          inheritedOrientation === "horizontal" ? { width: void 0 } : { height: void 0 }
        );
      } else if (!isFlexLayout && (selfStretch || flexSize)) {
        setAttributesCovertly({
          ...inheritedOrientation === "horizontal" ? { width: flexSize } : { height: flexSize },
          style: {
            ...blockStyle,
            layout: {
              ...layout,
              flexSize: void 0,
              selfStretch: void 0
            }
          }
        });
      }
    }, [
      blockStyle,
      flexSize,
      height,
      inheritedOrientation,
      isFlexLayout,
      layout,
      selfStretch,
      setAttributes,
      spacingSizes,
      width,
      __unstableMarkNextChangeAsNotPersistent
    ]);
    const blockEditingMode = (0, import_block_editor245.useBlockEditingMode)();
    return /* @__PURE__ */ (0, import_jsx_runtime485.jsxs)(import_jsx_runtime485.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime485.jsx)(
        import_primitives214.View,
        {
          ...(0, import_block_editor245.useBlockProps)({
            style: style2,
            className: clsx_default(className, {
              "custom-sizes-disabled": disableCustomSpacingSizes
            })
          }),
          children: blockEditingMode === "default" && resizableBoxWithOrientation(inheritedOrientation)
        }
      ),
      !isFlexLayout && /* @__PURE__ */ (0, import_jsx_runtime485.jsx)(
        SpacerControls,
        {
          setAttributes,
          height: temporaryHeight || height,
          width: temporaryWidth || width,
          orientation: inheritedOrientation,
          isResizing
        }
      )
    ] });
  };
  var edit_default34 = SpacerEdit;

  // packages/block-library/build-module/spacer/block.json
  var block_default103 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/spacer",
    title: "Spacer",
    category: "design",
    description: "Add white space between blocks and customize its height.",
    textdomain: "default",
    attributes: {
      height: {
        type: "string",
        default: "100px"
      },
      width: {
        type: "string"
      }
    },
    usesContext: ["orientation"],
    supports: {
      anchor: true,
      spacing: {
        margin: ["top", "bottom"],
        __experimentalDefaultControls: {
          margin: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-spacer-editor",
    style: "wp-block-spacer"
  };

  // packages/block-library/build-module/spacer/transforms.mjs
  var import_blocks110 = __toESM(require_blocks(), 1);
  var transforms33 = {
    to: [
      {
        type: "block",
        blocks: ["core/separator"],
        // Transform to Separator.
        transform: ({ anchor }) => {
          return (0, import_blocks110.createBlock)("core/separator", {
            anchor: anchor || void 0
          });
        }
      }
    ]
  };
  var transforms_default34 = transforms33;

  // packages/block-library/build-module/spacer/save.mjs
  var import_block_editor246 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime486 = __toESM(require_jsx_runtime(), 1);
  function save47({ attributes: attributes2 }) {
    const { height, width, style: style2 } = attributes2;
    const { layout: { selfStretch } = {} } = style2 || {};
    const finalHeight = selfStretch === "fill" || selfStretch === "fit" ? void 0 : height;
    return /* @__PURE__ */ (0, import_jsx_runtime486.jsx)(
      "div",
      {
        ...import_block_editor246.useBlockProps.save({
          style: {
            height: (0, import_block_editor246.getSpacingPresetCssVar)(finalHeight),
            width: (0, import_block_editor246.getSpacingPresetCssVar)(width)
          },
          "aria-hidden": true
        })
      }
    );
  }

  // packages/block-library/build-module/spacer/index.mjs
  var { name: name104 } = block_default103;
  var settings103 = {
    icon: resize_corner_ne_default,
    transforms: transforms_default34,
    edit: edit_default34,
    save: save47,
    deprecated: deprecated_default49
  };
  var init103 = () => initBlock({ name: name104, metadata: block_default103, settings: settings103 });

  // packages/block-library/build-module/tab/index.mjs
  var tab_exports = {};
  __export(tab_exports, {
    init: () => init104,
    metadata: () => block_default104,
    name: () => name105,
    settings: () => settings104
  });

  // packages/block-library/build-module/tab/edit.mjs
  var import_i18n237 = __toESM(require_i18n(), 1);
  var import_block_editor250 = __toESM(require_block_editor(), 1);
  var import_data140 = __toESM(require_data(), 1);
  var import_element123 = __toESM(require_element(), 1);

  // packages/block-library/build-module/tab/controls.mjs
  var import_block_editor249 = __toESM(require_block_editor(), 1);
  var import_components157 = __toESM(require_components(), 1);
  var import_i18n236 = __toESM(require_i18n(), 1);
  var import_data139 = __toESM(require_data(), 1);

  // packages/block-library/build-module/tab/add-tab-toolbar-control.mjs
  var import_i18n234 = __toESM(require_i18n(), 1);
  var import_blocks111 = __toESM(require_blocks(), 1);
  var import_block_editor247 = __toESM(require_block_editor(), 1);
  var import_components155 = __toESM(require_components(), 1);
  var import_data137 = __toESM(require_data(), 1);
  var import_jsx_runtime487 = __toESM(require_jsx_runtime(), 1);
  function AddTabToolbarControl({ tabsClientId }) {
    const { insertBlock } = (0, import_data137.useDispatch)(import_block_editor247.store);
    const { tabPanelClientId, nextTabIndex } = (0, import_data137.useSelect)(
      (select9) => {
        if (!tabsClientId) {
          return {
            tabPanelClientId: null,
            nextTabIndex: 0
          };
        }
        const { getBlocks } = select9(import_block_editor247.store);
        const innerBlocks = getBlocks(tabsClientId);
        const tabPanel = innerBlocks.find(
          (block) => block.name === "core/tab-panel"
        );
        return {
          tabPanelClientId: tabPanel?.clientId || null,
          nextTabIndex: (tabPanel?.innerBlocks.length || 0) + 1
        };
      },
      [tabsClientId]
    );
    const addTab = () => {
      if (!tabPanelClientId) {
        return;
      }
      const newTabBlock = (0, import_blocks111.createBlock)("core/tab", {
        anchor: "tab-" + nextTabIndex,
        /* translators: %d: tab number */
        label: (0, import_i18n234.sprintf)((0, import_i18n234.__)("Tab %d"), nextTabIndex)
      });
      insertBlock(newTabBlock, void 0, tabPanelClientId);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime487.jsx)(import_block_editor247.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime487.jsx)(import_components155.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime487.jsx)(
      import_components155.ToolbarButton,
      {
        className: "components-toolbar__control",
        onClick: addTab,
        text: (0, import_i18n234.__)("Add tab")
      }
    ) }) });
  }

  // packages/block-library/build-module/tab/remove-tab-toolbar-control.mjs
  var import_block_editor248 = __toESM(require_block_editor(), 1);
  var import_components156 = __toESM(require_components(), 1);
  var import_i18n235 = __toESM(require_i18n(), 1);
  var import_data138 = __toESM(require_data(), 1);
  var import_jsx_runtime488 = __toESM(require_jsx_runtime(), 1);
  function RemoveTabToolbarControl({ tabsClientId }) {
    const {
      removeBlock,
      updateBlockAttributes,
      selectBlock,
      __unstableMarkNextChangeAsNotPersistent
    } = (0, import_data138.useDispatch)(import_block_editor248.store);
    const { activeTabClientId, tabCount, editorActiveTabIndex } = (0, import_data138.useSelect)(
      (select9) => {
        if (!tabsClientId) {
          return {
            activeTabClientId: null,
            tabCount: 0,
            editorActiveTabIndex: 0
          };
        }
        const { getBlocks, getBlockAttributes: getBlockAttributes4 } = select9(import_block_editor248.store);
        const tabsAttributes = getBlockAttributes4(tabsClientId);
        const activeIndex = tabsAttributes?.editorActiveTabIndex ?? tabsAttributes?.activeTabIndex ?? 0;
        const innerBlocks = getBlocks(tabsClientId);
        const tabPanel = innerBlocks.find(
          (block) => block.name === "core/tab-panel"
        );
        const tabs = tabPanel?.innerBlocks || [];
        const activeTab = tabs[activeIndex];
        return {
          activeTabClientId: activeTab?.clientId || null,
          tabCount: tabs.length,
          editorActiveTabIndex: activeIndex
        };
      },
      [tabsClientId]
    );
    const removeTab = () => {
      if (!activeTabClientId || tabCount <= 1) {
        return;
      }
      const newActiveIndex = editorActiveTabIndex >= tabCount - 1 ? tabCount - 2 : editorActiveTabIndex;
      __unstableMarkNextChangeAsNotPersistent();
      updateBlockAttributes(tabsClientId, {
        editorActiveTabIndex: newActiveIndex
      });
      removeBlock(activeTabClientId, false);
      if (tabsClientId) {
        selectBlock(tabsClientId);
      }
    };
    const isDisabled = tabCount <= 1 || !activeTabClientId;
    return /* @__PURE__ */ (0, import_jsx_runtime488.jsx)(import_block_editor248.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime488.jsx)(import_components156.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime488.jsx)(
      import_components156.ToolbarButton,
      {
        className: "components-toolbar__control",
        onClick: removeTab,
        text: (0, import_i18n235.__)("Remove tab"),
        disabled: isDisabled
      }
    ) }) });
  }

  // packages/block-library/build-module/tab/controls.mjs
  var import_jsx_runtime489 = __toESM(require_jsx_runtime(), 1);
  function Controls3({ tabsClientId, blockIndex, isDefaultTab }) {
    const { updateBlockAttributes } = (0, import_data139.useDispatch)(import_block_editor249.store);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime489.jsxs)(import_jsx_runtime489.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime489.jsx)(AddTabToolbarControl, { tabsClientId }),
      /* @__PURE__ */ (0, import_jsx_runtime489.jsx)(RemoveTabToolbarControl, { tabsClientId }),
      /* @__PURE__ */ (0, import_jsx_runtime489.jsx)(import_block_editor249.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime489.jsx)(
        import_components157.__experimentalToolsPanel,
        {
          label: (0, import_i18n236.__)("Settings"),
          resetAll: () => {
            updateBlockAttributes(tabsClientId, {
              activeTabIndex: 0
            });
          },
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime489.jsx)(
            import_components157.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n236.__)("Default tab"),
              hasValue: () => isDefaultTab && blockIndex !== 0,
              onDeselect: () => {
                updateBlockAttributes(tabsClientId, {
                  activeTabIndex: 0
                });
              },
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime489.jsx)(
                import_components157.CheckboxControl,
                {
                  label: (0, import_i18n236.__)("Default tab"),
                  checked: isDefaultTab,
                  onChange: (value) => {
                    updateBlockAttributes(tabsClientId, {
                      activeTabIndex: value ? blockIndex : 0
                    });
                  }
                }
              )
            }
          )
        }
      ) })
    ] });
  }

  // packages/block-library/build-module/tab/slug-from-label.mjs
  var import_url20 = __toESM(require_url(), 1);
  function slugFromLabel(label, tabIndex) {
    const htmlDocument = new window.DOMParser().parseFromString(
      label,
      "text/html"
    );
    if (htmlDocument.body?.textContent) {
      return (0, import_url20.cleanForSlug)(htmlDocument.body.textContent);
    }
    return `tab-panel-${tabIndex}`;
  }

  // packages/block-library/build-module/tab/edit.mjs
  var import_jsx_runtime490 = __toESM(require_jsx_runtime(), 1);
  var TEMPLATE17 = [
    [
      "core/paragraph",
      {
        placeholder: (0, import_i18n237.__)("Type / to choose a block")
      }
    ]
  ];
  var { cancelAnimationFrame } = window;
  function Edit19({
    attributes: attributes2,
    clientId,
    context,
    isSelected,
    __unstableLayoutClassNames: layoutClassNames
  }) {
    const focusRef = (0, import_element123.useRef)();
    const { anchor, label } = attributes2;
    const activeTabIndex = context["core/tabs-activeTabIndex"] ?? 0;
    const editorActiveTabIndex = context["core/tabs-editorActiveTabIndex"];
    const effectiveActiveIndex = editorActiveTabIndex ?? activeTabIndex;
    (0, import_element123.useEffect)(() => {
      return () => {
        if (focusRef.current) {
          cancelAnimationFrame(focusRef.current);
        }
      };
    }, []);
    const { blockIndex, hasInnerBlocksSelected, tabsClientId } = (0, import_data140.useSelect)(
      (select9) => {
        const {
          getBlockRootClientId,
          getBlockIndex,
          hasSelectedInnerBlock
        } = select9(import_block_editor250.store);
        const tabPanelClientId = getBlockRootClientId(clientId);
        const _tabsClientId = getBlockRootClientId(tabPanelClientId);
        const _blockIndex = getBlockIndex(clientId);
        const _hasInnerBlocksSelected = hasSelectedInnerBlock(
          clientId,
          true
        );
        return {
          blockIndex: _blockIndex,
          hasInnerBlocksSelected: _hasInnerBlocksSelected,
          tabsClientId: _tabsClientId
        };
      },
      [clientId]
    );
    const { updateBlockAttributes, __unstableMarkNextChangeAsNotPersistent } = (0, import_data140.useDispatch)(import_block_editor250.store);
    (0, import_element123.useEffect)(() => {
      const isTabSelected = isSelected || hasInnerBlocksSelected;
      if (isTabSelected && tabsClientId && effectiveActiveIndex !== blockIndex) {
        __unstableMarkNextChangeAsNotPersistent();
        updateBlockAttributes(tabsClientId, {
          editorActiveTabIndex: blockIndex
        });
      }
    }, [
      isSelected,
      hasInnerBlocksSelected,
      tabsClientId,
      effectiveActiveIndex,
      blockIndex,
      updateBlockAttributes,
      __unstableMarkNextChangeAsNotPersistent
    ]);
    const isActiveTab = effectiveActiveIndex === blockIndex;
    const isDefaultTab = activeTabIndex === blockIndex;
    const isSelectedTab = (0, import_element123.useMemo)(() => {
      if (isSelected || hasInnerBlocksSelected) {
        return true;
      }
      if (isActiveTab) {
        return true;
      }
      return false;
    }, [isSelected, hasInnerBlocksSelected, isActiveTab]);
    const tabPanelId = (0, import_element123.useMemo)(
      () => anchor || slugFromLabel(label, blockIndex),
      [anchor, label, blockIndex]
    );
    const tabLabelId = (0, import_element123.useMemo)(() => `${tabPanelId}--tab`, [tabPanelId]);
    const blockProps = (0, import_block_editor250.useBlockProps)({
      hidden: !isSelectedTab,
      "aria-labelledby": tabLabelId,
      id: tabPanelId,
      role: "tabpanel",
      tabIndex: isSelectedTab ? 0 : -1,
      className: clsx_default("wp-block-tab__editor-content", layoutClassNames)
    });
    const innerBlocksProps = (0, import_block_editor250.useInnerBlocksProps)(blockProps, {
      template: TEMPLATE17
    });
    return /* @__PURE__ */ (0, import_jsx_runtime490.jsxs)("section", { ...innerBlocksProps, children: [
      /* @__PURE__ */ (0, import_jsx_runtime490.jsx)(
        Controls3,
        {
          tabsClientId,
          blockIndex,
          isDefaultTab
        }
      ),
      isSelectedTab && innerBlocksProps.children
    ] });
  }

  // packages/block-library/build-module/tab/save.mjs
  var import_block_editor251 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime491 = __toESM(require_jsx_runtime(), 1);
  function save48({ attributes: attributes2 }) {
    const { anchor } = attributes2;
    const tabPanelId = anchor;
    const blockProps = import_block_editor251.useBlockProps.save({
      role: "tabpanel"
    });
    const innerBlocksProps = import_block_editor251.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime491.jsx)("section", { ...innerBlocksProps, id: tabPanelId });
  }

  // packages/block-library/build-module/tab/block.json
  var block_default104 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    __experimental: true,
    apiVersion: 3,
    name: "core/tab",
    title: "Tab",
    description: "Content for a tab in a tabbed interface.",
    version: "1.0.0",
    category: "design",
    textdomain: "default",
    attributes: {
      label: {
        type: "string",
        default: ""
      }
    },
    parent: ["core/tab-panel"],
    usesContext: [
      "core/tabs-activeTabIndex",
      "core/tabs-editorActiveTabIndex"
    ],
    supports: {
      anchor: true,
      html: false,
      reusable: false,
      color: {
        background: true,
        text: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      layout: true,
      spacing: {
        blockGap: true,
        padding: true,
        margin: false
      },
      typography: {
        fontSize: true,
        __experimentalFontFamily: true,
        __experimentalDefaultControls: {
          fontSize: true,
          __experimentalFontFamily: true
        }
      },
      renaming: true
    },
    providesContext: {
      "core/tab-label": "label"
    },
    editorScript: "file:./index.js",
    style: "file:./style-index.css"
  };

  // packages/block-library/build-module/tab/index.mjs
  var { name: name105 } = block_default104;
  var settings104 = {
    icon: tab_default,
    edit: Edit19,
    save: save48
  };
  var init104 = () => initBlock({ name: name105, metadata: block_default104, settings: settings104 });

  // packages/block-library/build-module/tab-panel/index.mjs
  var tab_panel_exports = {};
  __export(tab_panel_exports, {
    init: () => init105,
    metadata: () => block_default105,
    name: () => name106,
    settings: () => settings105
  });

  // packages/block-library/build-module/tab-panel/edit.mjs
  var import_block_editor252 = __toESM(require_block_editor(), 1);
  var import_data141 = __toESM(require_data(), 1);
  var import_jsx_runtime492 = __toESM(require_jsx_runtime(), 1);
  var TAB_PANELS_TEMPLATE = [["core/tab", {}]];
  function Edit20({ clientId }) {
    const blockProps = (0, import_block_editor252.useBlockProps)();
    const innerBlocksProps = (0, import_block_editor252.useInnerBlocksProps)(blockProps, {
      template: TAB_PANELS_TEMPLATE,
      templateLock: false,
      renderAppender: false
      // Appender handled by individual tab blocks
    });
    const tabsClientId = (0, import_data141.useSelect)(
      (select9) => {
        const { getBlockRootClientId } = select9(import_block_editor252.store);
        return getBlockRootClientId(clientId);
      },
      [clientId]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime492.jsxs)(import_jsx_runtime492.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime492.jsx)(AddTabToolbarControl, { tabsClientId }),
      /* @__PURE__ */ (0, import_jsx_runtime492.jsx)(RemoveTabToolbarControl, { tabsClientId }),
      /* @__PURE__ */ (0, import_jsx_runtime492.jsx)("div", { ...innerBlocksProps })
    ] });
  }

  // packages/block-library/build-module/tab-panel/save.mjs
  var import_block_editor253 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime493 = __toESM(require_jsx_runtime(), 1);
  function save49() {
    const blockProps = import_block_editor253.useBlockProps.save();
    const innerBlocksProps = import_block_editor253.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime493.jsx)("div", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/tab-panel/block.json
  var block_default105 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    __experimental: true,
    apiVersion: 3,
    name: "core/tab-panel",
    title: "Tab Panel",
    description: "Container for tab panel content in a tabbed interface.",
    version: "1.0.0",
    category: "design",
    textdomain: "default",
    parent: ["core/tabs"],
    allowedBlocks: ["core/tab"],
    attributes: {},
    supports: {
      anchor: false,
      html: false,
      reusable: false,
      lock: false,
      dimensions: {
        aspectRatio: false,
        height: false,
        minHeight: false,
        width: false
      },
      color: {
        background: true,
        text: true,
        heading: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        blockGap: false,
        padding: true,
        margin: true
      },
      typography: {
        fontSize: true,
        __experimentalFontFamily: true
      },
      layout: {
        default: {
          type: "flex",
          flexWrap: "nowrap",
          justifyContent: "stretch",
          orientation: "vertical"
        },
        allowSwitching: false,
        allowVerticalAlignment: false,
        allowOrientation: false,
        allowJustification: true,
        allowSizingOnChildren: false
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      }
    },
    editorScript: "file:./index.js",
    style: "file:./style-index.css"
  };

  // packages/block-library/build-module/tab-panel/index.mjs
  var { name: name106 } = block_default105;
  var settings105 = {
    icon: contents_default,
    edit: Edit20,
    save: save49
  };
  var init105 = () => initBlock({ name: name106, metadata: block_default105, settings: settings105 });

  // packages/block-library/build-module/table/index.mjs
  var table_exports = {};
  __export(table_exports, {
    init: () => init106,
    metadata: () => block_default106,
    name: () => name107,
    settings: () => settings106
  });
  var import_i18n239 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/table/deprecated.mjs
  var import_block_editor254 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime494 = __toESM(require_jsx_runtime(), 1);
  var oldColors = {
    "subtle-light-gray": "#f3f4f5",
    "subtle-pale-green": "#e9fbe5",
    "subtle-pale-blue": "#e7f5fe",
    "subtle-pale-pink": "#fcf0ef"
  };
  var v4Query = {
    content: {
      type: "rich-text",
      source: "rich-text"
    },
    tag: {
      type: "string",
      default: "td",
      source: "tag"
    },
    scope: {
      type: "string",
      source: "attribute",
      attribute: "scope"
    },
    align: {
      type: "string",
      source: "attribute",
      attribute: "data-align"
    },
    colspan: {
      type: "string",
      source: "attribute",
      attribute: "colspan"
    },
    rowspan: {
      type: "string",
      source: "attribute",
      attribute: "rowspan"
    }
  };
  var v411 = {
    attributes: {
      hasFixedLayout: {
        type: "boolean",
        default: false
      },
      caption: {
        type: "rich-text",
        source: "rich-text",
        selector: "figcaption"
      },
      head: {
        type: "array",
        default: [],
        source: "query",
        selector: "thead tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: v4Query
          }
        }
      },
      body: {
        type: "array",
        default: [],
        source: "query",
        selector: "tbody tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: v4Query
          }
        }
      },
      foot: {
        type: "array",
        default: [],
        source: "query",
        selector: "tfoot tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: v4Query
          }
        }
      }
    },
    supports: {
      anchor: true,
      align: true,
      color: {
        __experimentalSkipSerialization: true,
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        __experimentalSkipSerialization: true,
        color: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          style: true,
          width: true
        }
      },
      __experimentalSelector: ".wp-block-table > table",
      interactivity: {
        clientNavigation: true
      }
    },
    save({ attributes: attributes2 }) {
      const { hasFixedLayout, head, body, foot, caption } = attributes2;
      const isEmpty = !head.length && !body.length && !foot.length;
      if (isEmpty) {
        return null;
      }
      const colorProps = (0, import_block_editor254.__experimentalGetColorClassesAndStyles)(attributes2);
      const borderProps = (0, import_block_editor254.__experimentalGetBorderClassesAndStyles)(attributes2);
      const classes = clsx_default(colorProps.className, borderProps.className, {
        "has-fixed-layout": hasFixedLayout
      });
      const hasCaption = !import_block_editor254.RichText.isEmpty(caption);
      const Section = ({ type, rows }) => {
        if (!rows.length) {
          return null;
        }
        const Tag = `t${type}`;
        return /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(Tag, { children: rows.map(({ cells }, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime494.jsx)("tr", { children: cells.map(
          ({
            content,
            tag,
            scope,
            align,
            colspan,
            rowspan
          }, cellIndex) => {
            const cellClasses = clsx_default({
              [`has-text-align-${align}`]: align
            });
            return /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(
              import_block_editor254.RichText.Content,
              {
                className: cellClasses ? cellClasses : void 0,
                "data-align": align,
                tagName: tag,
                value: content,
                scope: tag === "th" ? scope : void 0,
                colSpan: colspan,
                rowSpan: rowspan
              },
              cellIndex
            );
          }
        ) }, rowIndex)) });
      };
      return /* @__PURE__ */ (0, import_jsx_runtime494.jsxs)("figure", { ...import_block_editor254.useBlockProps.save(), children: [
        /* @__PURE__ */ (0, import_jsx_runtime494.jsxs)(
          "table",
          {
            className: classes === "" ? void 0 : classes,
            style: { ...colorProps.style, ...borderProps.style },
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(Section, { type: "head", rows: head }),
              /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(Section, { type: "body", rows: body }),
              /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(Section, { type: "foot", rows: foot })
            ]
          }
        ),
        hasCaption && /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(
          import_block_editor254.RichText.Content,
          {
            tagName: "figcaption",
            value: caption,
            className: (0, import_block_editor254.__experimentalGetElementClassName)(
              "caption"
            )
          }
        )
      ] });
    }
  };
  var v3Query = {
    content: {
      type: "string",
      source: "html"
    },
    tag: {
      type: "string",
      default: "td",
      source: "tag"
    },
    scope: {
      type: "string",
      source: "attribute",
      attribute: "scope"
    },
    align: {
      type: "string",
      source: "attribute",
      attribute: "data-align"
    }
  };
  var v312 = {
    attributes: {
      hasFixedLayout: {
        type: "boolean",
        default: false
      },
      caption: {
        type: "string",
        source: "html",
        selector: "figcaption",
        default: ""
      },
      head: {
        type: "array",
        default: [],
        source: "query",
        selector: "thead tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: v3Query
          }
        }
      },
      body: {
        type: "array",
        default: [],
        source: "query",
        selector: "tbody tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: v3Query
          }
        }
      },
      foot: {
        type: "array",
        default: [],
        source: "query",
        selector: "tfoot tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: v3Query
          }
        }
      }
    },
    supports: {
      anchor: true,
      align: true,
      color: {
        __experimentalSkipSerialization: true,
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        __experimentalSkipSerialization: true,
        color: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          style: true,
          width: true
        }
      },
      __experimentalSelector: ".wp-block-table > table"
    },
    save({ attributes: attributes2 }) {
      const { hasFixedLayout, head, body, foot, caption } = attributes2;
      const isEmpty = !head.length && !body.length && !foot.length;
      if (isEmpty) {
        return null;
      }
      const colorProps = (0, import_block_editor254.__experimentalGetColorClassesAndStyles)(attributes2);
      const borderProps = (0, import_block_editor254.__experimentalGetBorderClassesAndStyles)(attributes2);
      const classes = clsx_default(colorProps.className, borderProps.className, {
        "has-fixed-layout": hasFixedLayout
      });
      const hasCaption = !import_block_editor254.RichText.isEmpty(caption);
      const Section = ({ type, rows }) => {
        if (!rows.length) {
          return null;
        }
        const Tag = `t${type}`;
        return /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(Tag, { children: rows.map(({ cells }, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime494.jsx)("tr", { children: cells.map(
          ({ content, tag, scope, align }, cellIndex) => {
            const cellClasses = clsx_default({
              [`has-text-align-${align}`]: align
            });
            return /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(
              import_block_editor254.RichText.Content,
              {
                className: cellClasses ? cellClasses : void 0,
                "data-align": align,
                tagName: tag,
                value: content,
                scope: tag === "th" ? scope : void 0
              },
              cellIndex
            );
          }
        ) }, rowIndex)) });
      };
      return /* @__PURE__ */ (0, import_jsx_runtime494.jsxs)("figure", { ...import_block_editor254.useBlockProps.save(), children: [
        /* @__PURE__ */ (0, import_jsx_runtime494.jsxs)(
          "table",
          {
            className: classes === "" ? void 0 : classes,
            style: { ...colorProps.style, ...borderProps.style },
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(Section, { type: "head", rows: head }),
              /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(Section, { type: "body", rows: body }),
              /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(Section, { type: "foot", rows: foot })
            ]
          }
        ),
        hasCaption && /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(import_block_editor254.RichText.Content, { tagName: "figcaption", value: caption })
      ] });
    }
  };
  var v2Query = {
    content: {
      type: "string",
      source: "html"
    },
    tag: {
      type: "string",
      default: "td",
      source: "tag"
    },
    scope: {
      type: "string",
      source: "attribute",
      attribute: "scope"
    },
    align: {
      type: "string",
      source: "attribute",
      attribute: "data-align"
    }
  };
  var v218 = {
    attributes: {
      hasFixedLayout: {
        type: "boolean",
        default: false
      },
      backgroundColor: {
        type: "string"
      },
      caption: {
        type: "string",
        source: "html",
        selector: "figcaption",
        default: ""
      },
      head: {
        type: "array",
        default: [],
        source: "query",
        selector: "thead tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: v2Query
          }
        }
      },
      body: {
        type: "array",
        default: [],
        source: "query",
        selector: "tbody tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: v2Query
          }
        }
      },
      foot: {
        type: "array",
        default: [],
        source: "query",
        selector: "tfoot tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: v2Query
          }
        }
      }
    },
    supports: {
      anchor: true,
      align: true,
      __experimentalSelector: ".wp-block-table > table"
    },
    save: ({ attributes: attributes2 }) => {
      const { hasFixedLayout, head, body, foot, backgroundColor, caption } = attributes2;
      const isEmpty = !head.length && !body.length && !foot.length;
      if (isEmpty) {
        return null;
      }
      const backgroundClass = (0, import_block_editor254.getColorClassName)(
        "background-color",
        backgroundColor
      );
      const classes = clsx_default(backgroundClass, {
        "has-fixed-layout": hasFixedLayout,
        "has-background": !!backgroundClass
      });
      const hasCaption = !import_block_editor254.RichText.isEmpty(caption);
      const Section = ({ type, rows }) => {
        if (!rows.length) {
          return null;
        }
        const Tag = `t${type}`;
        return /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(Tag, { children: rows.map(({ cells }, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime494.jsx)("tr", { children: cells.map(
          ({ content, tag, scope, align }, cellIndex) => {
            const cellClasses = clsx_default({
              [`has-text-align-${align}`]: align
            });
            return /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(
              import_block_editor254.RichText.Content,
              {
                className: cellClasses ? cellClasses : void 0,
                "data-align": align,
                tagName: tag,
                value: content,
                scope: tag === "th" ? scope : void 0
              },
              cellIndex
            );
          }
        ) }, rowIndex)) });
      };
      return /* @__PURE__ */ (0, import_jsx_runtime494.jsxs)("figure", { ...import_block_editor254.useBlockProps.save(), children: [
        /* @__PURE__ */ (0, import_jsx_runtime494.jsxs)("table", { className: classes === "" ? void 0 : classes, children: [
          /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(Section, { type: "head", rows: head }),
          /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(Section, { type: "body", rows: body }),
          /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(Section, { type: "foot", rows: foot })
        ] }),
        hasCaption && /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(import_block_editor254.RichText.Content, { tagName: "figcaption", value: caption })
      ] });
    },
    isEligible: (attributes2) => {
      return attributes2.backgroundColor && attributes2.backgroundColor in oldColors && !attributes2.style;
    },
    // This version is the first to introduce the style attribute to the
    // table block. As a result, we'll explicitly override that.
    migrate: (attributes2) => {
      return {
        ...attributes2,
        backgroundColor: void 0,
        style: {
          color: {
            background: oldColors[attributes2.backgroundColor]
          }
        }
      };
    }
  };
  var v1Query = {
    content: {
      type: "string",
      source: "html"
    },
    tag: {
      type: "string",
      default: "td",
      source: "tag"
    },
    scope: {
      type: "string",
      source: "attribute",
      attribute: "scope"
    }
  };
  var v144 = {
    attributes: {
      hasFixedLayout: {
        type: "boolean",
        default: false
      },
      backgroundColor: {
        type: "string"
      },
      head: {
        type: "array",
        default: [],
        source: "query",
        selector: "thead tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: v1Query
          }
        }
      },
      body: {
        type: "array",
        default: [],
        source: "query",
        selector: "tbody tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: v1Query
          }
        }
      },
      foot: {
        type: "array",
        default: [],
        source: "query",
        selector: "tfoot tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: v1Query
          }
        }
      }
    },
    supports: {
      align: true
    },
    save({ attributes: attributes2 }) {
      const { hasFixedLayout, head, body, foot, backgroundColor } = attributes2;
      const isEmpty = !head.length && !body.length && !foot.length;
      if (isEmpty) {
        return null;
      }
      const backgroundClass = (0, import_block_editor254.getColorClassName)(
        "background-color",
        backgroundColor
      );
      const classes = clsx_default(backgroundClass, {
        "has-fixed-layout": hasFixedLayout,
        "has-background": !!backgroundClass
      });
      const Section = ({ type, rows }) => {
        if (!rows.length) {
          return null;
        }
        const Tag = `t${type}`;
        return /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(Tag, { children: rows.map(({ cells }, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime494.jsx)("tr", { children: cells.map(
          ({ content, tag, scope }, cellIndex) => /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(
            import_block_editor254.RichText.Content,
            {
              tagName: tag,
              value: content,
              scope: tag === "th" ? scope : void 0
            },
            cellIndex
          )
        ) }, rowIndex)) });
      };
      return /* @__PURE__ */ (0, import_jsx_runtime494.jsxs)("table", { className: classes, children: [
        /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(Section, { type: "head", rows: head }),
        /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(Section, { type: "body", rows: body }),
        /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(Section, { type: "foot", rows: foot })
      ] });
    }
  };
  var deprecated_default50 = [v411, v312, v218, v144];

  // packages/block-library/build-module/table/edit.mjs
  var import_element124 = __toESM(require_element(), 1);
  var import_block_editor255 = __toESM(require_block_editor(), 1);
  var import_i18n238 = __toESM(require_i18n(), 1);
  var import_components158 = __toESM(require_components(), 1);

  // packages/block-library/build-module/table/state.mjs
  var INHERITED_COLUMN_ATTRIBUTES = ["align"];
  function createTable({ rowCount, columnCount }) {
    return {
      body: Array.from({ length: rowCount }).map(() => ({
        cells: Array.from({ length: columnCount }).map(() => ({
          content: "",
          tag: "td"
        }))
      }))
    };
  }
  function getFirstRow(state) {
    if (!isEmptyTableSection(state.head)) {
      return state.head[0];
    }
    if (!isEmptyTableSection(state.body)) {
      return state.body[0];
    }
    if (!isEmptyTableSection(state.foot)) {
      return state.foot[0];
    }
  }
  function getCellAttribute(state, cellLocation, attributeName) {
    const { sectionName, rowIndex, columnIndex } = cellLocation;
    return state[sectionName]?.[rowIndex]?.cells?.[columnIndex]?.[attributeName];
  }
  function updateSelectedCell(state, selection, updateCell) {
    if (!selection) {
      return state;
    }
    const tableSections = Object.fromEntries(
      Object.entries(state).filter(
        ([key]) => ["head", "body", "foot"].includes(key)
      )
    );
    const { sectionName: selectionSectionName, rowIndex: selectionRowIndex } = selection;
    return Object.fromEntries(
      Object.entries(tableSections).map(([sectionName, section]) => {
        if (selectionSectionName && selectionSectionName !== sectionName) {
          return [sectionName, section];
        }
        return [
          sectionName,
          section.map((row, rowIndex) => {
            if (selectionRowIndex && selectionRowIndex !== rowIndex) {
              return row;
            }
            return {
              cells: row.cells.map(
                (cellAttributes, columnIndex) => {
                  const cellLocation = {
                    sectionName,
                    columnIndex,
                    rowIndex
                  };
                  if (!isCellSelected(cellLocation, selection)) {
                    return cellAttributes;
                  }
                  return updateCell(cellAttributes);
                }
              )
            };
          })
        ];
      })
    );
  }
  function isCellSelected(cellLocation, selection) {
    if (!cellLocation || !selection) {
      return false;
    }
    switch (selection.type) {
      case "column":
        return selection.type === "column" && cellLocation.columnIndex === selection.columnIndex;
      case "cell":
        return selection.type === "cell" && cellLocation.sectionName === selection.sectionName && cellLocation.columnIndex === selection.columnIndex && cellLocation.rowIndex === selection.rowIndex;
    }
  }
  function insertRow(state, { sectionName, rowIndex, columnCount }) {
    const firstRow = getFirstRow(state);
    const cellCount = columnCount === void 0 ? firstRow?.cells?.length : columnCount;
    if (!cellCount) {
      return state;
    }
    return {
      [sectionName]: [
        ...state[sectionName].slice(0, rowIndex),
        {
          cells: Array.from({ length: cellCount }).map(
            (_, index) => {
              const firstCellInColumn = firstRow?.cells?.[index] ?? {};
              const inheritedAttributes = Object.fromEntries(
                Object.entries(firstCellInColumn).filter(
                  ([key]) => INHERITED_COLUMN_ATTRIBUTES.includes(key)
                )
              );
              return {
                ...inheritedAttributes,
                content: "",
                tag: sectionName === "head" ? "th" : "td"
              };
            }
          )
        },
        ...state[sectionName].slice(rowIndex)
      ]
    };
  }
  function deleteRow(state, { sectionName, rowIndex }) {
    return {
      [sectionName]: state[sectionName].filter(
        (row, index) => index !== rowIndex
      )
    };
  }
  function insertColumn(state, { columnIndex }) {
    const tableSections = Object.fromEntries(
      Object.entries(state).filter(
        ([key]) => ["head", "body", "foot"].includes(key)
      )
    );
    return Object.fromEntries(
      Object.entries(tableSections).map(([sectionName, section]) => {
        if (isEmptyTableSection(section)) {
          return [sectionName, section];
        }
        return [
          sectionName,
          section.map((row) => {
            if (isEmptyRow(row) || row.cells.length < columnIndex) {
              return row;
            }
            return {
              cells: [
                ...row.cells.slice(0, columnIndex),
                {
                  content: "",
                  tag: sectionName === "head" ? "th" : "td"
                },
                ...row.cells.slice(columnIndex)
              ]
            };
          })
        ];
      })
    );
  }
  function deleteColumn(state, { columnIndex }) {
    const tableSections = Object.fromEntries(
      Object.entries(state).filter(
        ([key]) => ["head", "body", "foot"].includes(key)
      )
    );
    return Object.fromEntries(
      Object.entries(tableSections).map(([sectionName, section]) => {
        if (isEmptyTableSection(section)) {
          return [sectionName, section];
        }
        return [
          sectionName,
          section.map((row) => ({
            cells: row.cells.length >= columnIndex ? row.cells.filter(
              (cell, index) => index !== columnIndex
            ) : row.cells
          })).filter((row) => row.cells.length)
        ];
      })
    );
  }
  function toggleSection(state, sectionName) {
    if (!isEmptyTableSection(state[sectionName])) {
      return { [sectionName]: [] };
    }
    const columnCount = state.body?.[0]?.cells?.length ?? 1;
    return insertRow(state, { sectionName, rowIndex: 0, columnCount });
  }
  function isEmptyTableSection(section) {
    return !section || !section.length || section.every(isEmptyRow);
  }
  function isEmptyRow(row) {
    return !(row.cells && row.cells.length);
  }

  // packages/block-library/build-module/table/edit.mjs
  var import_jsx_runtime495 = __toESM(require_jsx_runtime(), 1);
  var ALIGNMENT_CONTROLS = [
    {
      icon: align_left_default,
      title: (0, import_i18n238.__)("Align column left"),
      align: "left"
    },
    {
      icon: align_center_default,
      title: (0, import_i18n238.__)("Align column center"),
      align: "center"
    },
    {
      icon: align_right_default,
      title: (0, import_i18n238.__)("Align column right"),
      align: "right"
    }
  ];
  var cellAriaLabel = {
    head: (0, import_i18n238.__)("Header cell text"),
    body: (0, import_i18n238.__)("Body cell text"),
    foot: (0, import_i18n238.__)("Footer cell text")
  };
  var placeholder = {
    head: (0, import_i18n238.__)("Header label"),
    foot: (0, import_i18n238.__)("Footer label")
  };
  function TSection({ name: name123, ...props }) {
    const TagName2 = `t${name123}`;
    return /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(TagName2, { ...props });
  }
  function TableEdit({
    attributes: attributes2,
    setAttributes,
    insertBlocksAfter,
    isSelected: isSingleSelected
  }) {
    const { hasFixedLayout, head, foot } = attributes2;
    const [initialRowCount, setInitialRowCount] = (0, import_element124.useState)(2);
    const [initialColumnCount, setInitialColumnCount] = (0, import_element124.useState)(2);
    const [selectedCell, setSelectedCell] = (0, import_element124.useState)();
    const colorProps = (0, import_block_editor255.__experimentalUseColorProps)(attributes2);
    const borderProps = (0, import_block_editor255.__experimentalUseBorderProps)(attributes2);
    const blockEditingMode = (0, import_block_editor255.useBlockEditingMode)();
    const tableRef = (0, import_element124.useRef)();
    const [hasTableCreated, setHasTableCreated] = (0, import_element124.useState)(false);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    function onChangeInitialColumnCount(count) {
      setInitialColumnCount(count);
    }
    function onChangeInitialRowCount(count) {
      setInitialRowCount(count);
    }
    function onCreateTable(event) {
      event.preventDefault();
      setAttributes(
        createTable({
          rowCount: parseInt(initialRowCount, 10) || 2,
          columnCount: parseInt(initialColumnCount, 10) || 2
        })
      );
      setHasTableCreated(true);
    }
    function onChangeFixedLayout() {
      setAttributes({ hasFixedLayout: !hasFixedLayout });
    }
    const onChange = (0, import_element124.useCallback)(
      function(content) {
        if (!selectedCell) {
          return;
        }
        setAttributes(
          (currentAttributes) => updateSelectedCell(
            currentAttributes,
            selectedCell,
            (cellAttributes) => ({
              ...cellAttributes,
              content
            })
          )
        );
      },
      [selectedCell, setAttributes]
    );
    function onChangeColumnAlignment(align) {
      if (!selectedCell) {
        return;
      }
      const columnSelection = {
        type: "column",
        columnIndex: selectedCell.columnIndex
      };
      const newAttributes = updateSelectedCell(
        attributes2,
        columnSelection,
        (cellAttributes) => ({
          ...cellAttributes,
          align
        })
      );
      setAttributes(newAttributes);
    }
    function getCellAlignment() {
      if (!selectedCell) {
        return;
      }
      return getCellAttribute(attributes2, selectedCell, "align");
    }
    function onToggleHeaderSection() {
      setAttributes(toggleSection(attributes2, "head"));
    }
    function onToggleFooterSection() {
      setAttributes(toggleSection(attributes2, "foot"));
    }
    function onInsertRow(delta) {
      if (!selectedCell) {
        return;
      }
      const { sectionName, rowIndex } = selectedCell;
      const newRowIndex = rowIndex + delta;
      setAttributes(
        insertRow(attributes2, {
          sectionName,
          rowIndex: newRowIndex
        })
      );
      setSelectedCell({
        sectionName,
        rowIndex: newRowIndex,
        columnIndex: 0,
        type: "cell"
      });
    }
    function onInsertRowBefore() {
      onInsertRow(0);
    }
    function onInsertRowAfter() {
      onInsertRow(1);
    }
    function onDeleteRow() {
      if (!selectedCell) {
        return;
      }
      const { sectionName, rowIndex } = selectedCell;
      setSelectedCell();
      setAttributes(deleteRow(attributes2, { sectionName, rowIndex }));
    }
    function onInsertColumn(delta = 0) {
      if (!selectedCell) {
        return;
      }
      const { columnIndex } = selectedCell;
      const newColumnIndex = columnIndex + delta;
      setAttributes(
        insertColumn(attributes2, {
          columnIndex: newColumnIndex
        })
      );
      setSelectedCell({
        rowIndex: 0,
        columnIndex: newColumnIndex,
        type: "cell"
      });
    }
    function onInsertColumnBefore() {
      onInsertColumn(0);
    }
    function onInsertColumnAfter() {
      onInsertColumn(1);
    }
    function onDeleteColumn() {
      if (!selectedCell) {
        return;
      }
      const { sectionName, columnIndex } = selectedCell;
      setSelectedCell();
      setAttributes(
        deleteColumn(attributes2, { sectionName, columnIndex })
      );
    }
    (0, import_element124.useEffect)(() => {
      if (!isSingleSelected) {
        setSelectedCell();
      }
    }, [isSingleSelected]);
    (0, import_element124.useEffect)(() => {
      if (hasTableCreated) {
        tableRef?.current?.querySelector('td div[contentEditable="true"]')?.focus();
        setHasTableCreated(false);
      }
    }, [hasTableCreated]);
    const sections = ["head", "body", "foot"].filter(
      (name123) => !isEmptyTableSection(attributes2[name123])
    );
    const tableControls = [
      {
        icon: table_row_before_default,
        title: (0, import_i18n238.__)("Insert row before"),
        isDisabled: !selectedCell,
        onClick: onInsertRowBefore
      },
      {
        icon: table_row_after_default,
        title: (0, import_i18n238.__)("Insert row after"),
        isDisabled: !selectedCell,
        onClick: onInsertRowAfter
      },
      {
        icon: table_row_delete_default,
        title: (0, import_i18n238.__)("Delete row"),
        isDisabled: !selectedCell,
        onClick: onDeleteRow
      },
      {
        icon: table_column_before_default,
        title: (0, import_i18n238.__)("Insert column before"),
        isDisabled: !selectedCell,
        onClick: onInsertColumnBefore
      },
      {
        icon: table_column_after_default,
        title: (0, import_i18n238.__)("Insert column after"),
        isDisabled: !selectedCell,
        onClick: onInsertColumnAfter
      },
      {
        icon: table_column_delete_default,
        title: (0, import_i18n238.__)("Delete column"),
        isDisabled: !selectedCell,
        onClick: onDeleteColumn
      }
    ];
    const renderedSections = sections.map((name123) => /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(TSection, { name: name123, children: attributes2[name123].map(({ cells }, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime495.jsx)("tr", { children: cells.map((cellProps, columnIndex) => {
      const isSelected = selectedCell?.sectionName === name123 && selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === columnIndex;
      return /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(
        Cell,
        {
          name: name123,
          rowIndex,
          columnIndex,
          onChange: (
            // Only pass the `onChange` handler to the selectedCell.
            // Cell components are memoized, so it's best to avoid
            // passing in a value that will cause all cells to re-render
            // whenever it changes.
            isSelected ? onChange : void 0
          ),
          setSelectedCell,
          ...cellProps
        },
        columnIndex
      );
    }) }, rowIndex)) }, name123));
    const isEmpty = !sections.length;
    return /* @__PURE__ */ (0, import_jsx_runtime495.jsxs)("figure", { ...(0, import_block_editor255.useBlockProps)({ ref: tableRef }), children: [
      !isEmpty && blockEditingMode === "default" && /* @__PURE__ */ (0, import_jsx_runtime495.jsxs)(import_jsx_runtime495.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(import_block_editor255.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(
          import_block_editor255.AlignmentControl,
          {
            label: (0, import_i18n238.__)("Change column alignment"),
            alignmentControls: ALIGNMENT_CONTROLS,
            value: getCellAlignment(),
            onChange: (nextAlign) => onChangeColumnAlignment(nextAlign)
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(import_block_editor255.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(
          import_components158.ToolbarDropdownMenu,
          {
            icon: table_default,
            label: (0, import_i18n238.__)("Edit table"),
            controls: tableControls
          }
        ) })
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(import_block_editor255.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime495.jsxs)(
        import_components158.__experimentalToolsPanel,
        {
          label: (0, import_i18n238.__)("Settings"),
          resetAll: () => {
            setAttributes({
              hasFixedLayout: true,
              head: [],
              foot: []
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(
              import_components158.__experimentalToolsPanelItem,
              {
                hasValue: () => hasFixedLayout !== true,
                label: (0, import_i18n238.__)("Fixed width table cells"),
                onDeselect: () => setAttributes({ hasFixedLayout: true }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(
                  import_components158.ToggleControl,
                  {
                    label: (0, import_i18n238.__)("Fixed width table cells"),
                    checked: !!hasFixedLayout,
                    onChange: onChangeFixedLayout
                  }
                )
              }
            ),
            !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime495.jsxs)(import_jsx_runtime495.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(
                import_components158.__experimentalToolsPanelItem,
                {
                  hasValue: () => head && head.length,
                  label: (0, import_i18n238.__)("Header section"),
                  onDeselect: () => setAttributes({ head: [] }),
                  isShownByDefault: true,
                  children: /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(
                    import_components158.ToggleControl,
                    {
                      label: (0, import_i18n238.__)("Header section"),
                      checked: !!(head && head.length),
                      onChange: onToggleHeaderSection
                    }
                  )
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(
                import_components158.__experimentalToolsPanelItem,
                {
                  hasValue: () => foot && foot.length,
                  label: (0, import_i18n238.__)("Footer section"),
                  onDeselect: () => setAttributes({ foot: [] }),
                  isShownByDefault: true,
                  children: /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(
                    import_components158.ToggleControl,
                    {
                      label: (0, import_i18n238.__)("Footer section"),
                      checked: !!(foot && foot.length),
                      onChange: onToggleFooterSection
                    }
                  )
                }
              )
            ] })
          ]
        }
      ) }),
      !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(
        "table",
        {
          className: clsx_default(
            colorProps.className,
            borderProps.className,
            {
              "has-fixed-layout": hasFixedLayout,
              // This is required in the editor only to overcome
              // the fact the editor rewrites individual border
              // widths into a shorthand format.
              "has-individual-borders": (0, import_components158.__experimentalHasSplitBorders)(
                attributes2?.style?.border
              )
            }
          ),
          style: { ...colorProps.style, ...borderProps.style },
          children: renderedSections
        }
      ),
      isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(
        import_components158.Placeholder,
        {
          label: (0, import_i18n238.__)("Table"),
          icon: /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(import_block_editor255.BlockIcon, { icon: block_table_default, showColors: true }),
          instructions: (0, import_i18n238.__)("Insert a table for sharing data."),
          children: /* @__PURE__ */ (0, import_jsx_runtime495.jsxs)(
            "form",
            {
              className: "blocks-table__placeholder-form",
              onSubmit: onCreateTable,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(
                  import_components158.TextControl,
                  {
                    __next40pxDefaultSize: true,
                    type: "number",
                    label: (0, import_i18n238.__)("Column count"),
                    value: initialColumnCount,
                    onChange: onChangeInitialColumnCount,
                    min: "1",
                    className: "blocks-table__placeholder-input"
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(
                  import_components158.TextControl,
                  {
                    __next40pxDefaultSize: true,
                    type: "number",
                    label: (0, import_i18n238.__)("Row count"),
                    value: initialRowCount,
                    onChange: onChangeInitialRowCount,
                    min: "1",
                    className: "blocks-table__placeholder-input"
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(
                  import_components158.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "primary",
                    type: "submit",
                    children: (0, import_i18n238.__)("Create Table")
                  }
                )
              ]
            }
          )
        }
      ) : /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(
        Caption,
        {
          attributes: attributes2,
          setAttributes,
          isSelected: isSingleSelected,
          insertBlocksAfter,
          label: (0, import_i18n238.__)("Table caption text"),
          showToolbarButton: isSingleSelected && blockEditingMode === "default"
        }
      )
    ] });
  }
  var Cell = (0, import_element124.memo)(function({
    tag: CellTag,
    name: name123,
    scope,
    colspan,
    rowspan,
    rowIndex,
    columnIndex,
    align,
    content,
    onChange,
    setSelectedCell
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(
      CellTag,
      {
        scope: CellTag === "th" ? scope : void 0,
        colSpan: colspan,
        rowSpan: rowspan,
        className: clsx_default(
          {
            [`has-text-align-${align}`]: align
          },
          "wp-block-table__cell-content"
        ),
        children: /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(
          import_block_editor255.RichText,
          {
            value: content,
            onChange,
            onFocus: () => {
              setSelectedCell({
                sectionName: name123,
                rowIndex,
                columnIndex,
                type: "cell"
              });
            },
            "aria-label": cellAriaLabel[name123],
            placeholder: placeholder[name123]
          }
        )
      }
    );
  });
  var edit_default35 = TableEdit;

  // packages/block-library/build-module/table/block.json
  var block_default106 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/table",
    title: "Table",
    category: "text",
    description: "Create structured content in rows and columns to display information.",
    textdomain: "default",
    attributes: {
      hasFixedLayout: {
        type: "boolean",
        default: true
      },
      caption: {
        type: "rich-text",
        source: "rich-text",
        selector: "figcaption",
        role: "content"
      },
      head: {
        type: "array",
        default: [],
        source: "query",
        selector: "thead tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: {
              content: {
                type: "rich-text",
                source: "rich-text",
                role: "content"
              },
              tag: {
                type: "string",
                default: "td",
                source: "tag"
              },
              scope: {
                type: "string",
                source: "attribute",
                attribute: "scope"
              },
              align: {
                type: "string",
                source: "attribute",
                attribute: "data-align"
              },
              colspan: {
                type: "string",
                source: "attribute",
                attribute: "colspan"
              },
              rowspan: {
                type: "string",
                source: "attribute",
                attribute: "rowspan"
              }
            }
          }
        }
      },
      body: {
        type: "array",
        default: [],
        source: "query",
        selector: "tbody tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: {
              content: {
                type: "rich-text",
                source: "rich-text",
                role: "content"
              },
              tag: {
                type: "string",
                default: "td",
                source: "tag"
              },
              scope: {
                type: "string",
                source: "attribute",
                attribute: "scope"
              },
              align: {
                type: "string",
                source: "attribute",
                attribute: "data-align"
              },
              colspan: {
                type: "string",
                source: "attribute",
                attribute: "colspan"
              },
              rowspan: {
                type: "string",
                source: "attribute",
                attribute: "rowspan"
              }
            }
          }
        }
      },
      foot: {
        type: "array",
        default: [],
        source: "query",
        selector: "tfoot tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: {
              content: {
                type: "rich-text",
                source: "rich-text",
                role: "content"
              },
              tag: {
                type: "string",
                default: "td",
                source: "tag"
              },
              scope: {
                type: "string",
                source: "attribute",
                attribute: "scope"
              },
              align: {
                type: "string",
                source: "attribute",
                attribute: "data-align"
              },
              colspan: {
                type: "string",
                source: "attribute",
                attribute: "colspan"
              },
              rowspan: {
                type: "string",
                source: "attribute",
                attribute: "rowspan"
              }
            }
          }
        }
      }
    },
    supports: {
      anchor: true,
      align: true,
      color: {
        __experimentalSkipSerialization: true,
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        __experimentalSkipSerialization: true,
        color: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          style: true,
          width: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    selectors: {
      root: ".wp-block-table > table",
      spacing: ".wp-block-table"
    },
    styles: [
      {
        name: "regular",
        label: "Default",
        isDefault: true
      },
      { name: "stripes", label: "Stripes" }
    ],
    editorStyle: "wp-block-table-editor",
    style: "wp-block-table"
  };

  // packages/block-library/build-module/table/save.mjs
  var import_block_editor256 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime496 = __toESM(require_jsx_runtime(), 1);
  function save50({ attributes: attributes2 }) {
    const { hasFixedLayout, head, body, foot, caption } = attributes2;
    const isEmpty = !head.length && !body.length && !foot.length;
    if (isEmpty) {
      return null;
    }
    const colorProps = (0, import_block_editor256.__experimentalGetColorClassesAndStyles)(attributes2);
    const borderProps = (0, import_block_editor256.__experimentalGetBorderClassesAndStyles)(attributes2);
    const classes = clsx_default(colorProps.className, borderProps.className, {
      "has-fixed-layout": hasFixedLayout
    });
    const hasCaption = !import_block_editor256.RichText.isEmpty(caption);
    const Section = ({ type, rows }) => {
      if (!rows.length) {
        return null;
      }
      const Tag = `t${type}`;
      return /* @__PURE__ */ (0, import_jsx_runtime496.jsx)(Tag, { children: rows.map(({ cells }, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime496.jsx)("tr", { children: cells.map(
        ({
          content,
          tag,
          scope,
          align,
          colspan,
          rowspan
        }, cellIndex) => {
          const cellClasses = clsx_default({
            [`has-text-align-${align}`]: align
          });
          return /* @__PURE__ */ (0, import_jsx_runtime496.jsx)(
            import_block_editor256.RichText.Content,
            {
              className: cellClasses ? cellClasses : void 0,
              "data-align": align,
              tagName: tag,
              value: content,
              scope: tag === "th" ? scope : void 0,
              colSpan: colspan,
              rowSpan: rowspan
            },
            cellIndex
          );
        }
      ) }, rowIndex)) });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime496.jsxs)("figure", { ...import_block_editor256.useBlockProps.save(), children: [
      /* @__PURE__ */ (0, import_jsx_runtime496.jsxs)(
        "table",
        {
          className: classes === "" ? void 0 : classes,
          style: { ...colorProps.style, ...borderProps.style },
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime496.jsx)(Section, { type: "head", rows: head }),
            /* @__PURE__ */ (0, import_jsx_runtime496.jsx)(Section, { type: "body", rows: body }),
            /* @__PURE__ */ (0, import_jsx_runtime496.jsx)(Section, { type: "foot", rows: foot })
          ]
        }
      ),
      hasCaption && /* @__PURE__ */ (0, import_jsx_runtime496.jsx)(
        import_block_editor256.RichText.Content,
        {
          tagName: "figcaption",
          value: caption,
          className: (0, import_block_editor256.__experimentalGetElementClassName)("caption")
        }
      )
    ] });
  }

  // packages/block-library/build-module/table/transforms.mjs
  var import_blocks112 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/table/utils.mjs
  function normalizeRowColSpan(rowColSpan) {
    const parsedValue = parseInt(rowColSpan, 10);
    if (!Number.isInteger(parsedValue)) {
      return void 0;
    }
    return parsedValue < 0 || parsedValue === 1 ? void 0 : parsedValue.toString();
  }

  // packages/block-library/build-module/table/transforms.mjs
  var tableContentPasteSchema = ({ phrasingContentSchema }) => ({
    tr: {
      allowEmpty: true,
      children: {
        th: {
          allowEmpty: true,
          children: phrasingContentSchema,
          attributes: ["scope", "colspan", "rowspan", "style"]
        },
        td: {
          allowEmpty: true,
          children: phrasingContentSchema,
          attributes: ["colspan", "rowspan", "style"]
        }
      }
    }
  });
  var tablePasteSchema = (args) => ({
    table: {
      children: {
        thead: {
          allowEmpty: true,
          children: tableContentPasteSchema(args)
        },
        tfoot: {
          allowEmpty: true,
          children: tableContentPasteSchema(args)
        },
        tbody: {
          allowEmpty: true,
          children: tableContentPasteSchema(args)
        }
      }
    }
  });
  var transforms34 = {
    from: [
      {
        type: "raw",
        selector: "table",
        schema: tablePasteSchema,
        transform: (node) => {
          const attributes2 = Array.from(node.children).reduce(
            (sectionAcc, section) => {
              if (!section.children.length) {
                return sectionAcc;
              }
              const sectionName = section.nodeName.toLowerCase().slice(1);
              const sectionAttributes = Array.from(
                section.children
              ).reduce((rowAcc, row) => {
                if (!row.children.length) {
                  return rowAcc;
                }
                const rowAttributes = Array.from(
                  row.children
                ).reduce((colAcc, col) => {
                  const rowspan = normalizeRowColSpan(
                    col.getAttribute("rowspan")
                  );
                  const colspan = normalizeRowColSpan(
                    col.getAttribute("colspan")
                  );
                  const { textAlign } = col.style || {};
                  let align;
                  if (textAlign === "left" || textAlign === "center" || textAlign === "right") {
                    align = textAlign;
                  }
                  colAcc.push({
                    tag: col.nodeName.toLowerCase(),
                    content: col.innerHTML,
                    rowspan,
                    colspan,
                    align
                  });
                  return colAcc;
                }, []);
                rowAcc.push({
                  cells: rowAttributes
                });
                return rowAcc;
              }, []);
              sectionAcc[sectionName] = sectionAttributes;
              return sectionAcc;
            },
            {}
          );
          return (0, import_blocks112.createBlock)("core/table", attributes2);
        }
      }
    ]
  };
  var transforms_default35 = transforms34;

  // packages/block-library/build-module/table/index.mjs
  var { name: name107 } = block_default106;
  var settings106 = {
    icon: block_table_default,
    example: {
      attributes: {
        head: [
          {
            cells: [
              {
                content: (0, import_i18n239.__)("Version"),
                tag: "th"
              },
              {
                content: (0, import_i18n239.__)("Jazz Musician"),
                tag: "th"
              },
              {
                content: (0, import_i18n239.__)("Release Date"),
                tag: "th"
              }
            ]
          }
        ],
        body: [
          {
            cells: [
              {
                content: "5.2",
                tag: "td"
              },
              {
                content: (0, import_i18n239.__)("Jaco Pastorius"),
                tag: "td"
              },
              {
                content: (0, import_i18n239.__)("May 7, 2019"),
                tag: "td"
              }
            ]
          },
          {
            cells: [
              {
                content: "5.1",
                tag: "td"
              },
              {
                content: (0, import_i18n239.__)("Betty Carter"),
                tag: "td"
              },
              {
                content: (0, import_i18n239.__)("February 21, 2019"),
                tag: "td"
              }
            ]
          },
          {
            cells: [
              {
                content: "5.0",
                tag: "td"
              },
              {
                content: (0, import_i18n239.__)("Bebo Vald\xE9s"),
                tag: "td"
              },
              {
                content: (0, import_i18n239.__)("December 6, 2018"),
                tag: "td"
              }
            ]
          }
        ]
      },
      viewportWidth: 450
    },
    transforms: transforms_default35,
    edit: edit_default35,
    save: save50,
    deprecated: deprecated_default50
  };
  var init106 = () => initBlock({ name: name107, metadata: block_default106, settings: settings106 });

  // packages/block-library/build-module/table-of-contents/index.mjs
  var table_of_contents_exports = {};
  __export(table_of_contents_exports, {
    init: () => init107,
    metadata: () => block_default107,
    name: () => name108,
    settings: () => settings107
  });
  var import_i18n241 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/table-of-contents/block.json
  var block_default107 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    __experimental: true,
    name: "core/table-of-contents",
    title: "Table of Contents",
    category: "design",
    description: "Summarize your post with a list of headings. Add HTML anchors to Heading blocks to link them here.",
    keywords: ["document outline", "summary"],
    textdomain: "default",
    attributes: {
      headings: {
        type: "array",
        items: {
          type: "object"
        },
        default: []
      },
      onlyIncludeCurrentPage: {
        type: "boolean",
        default: false
      },
      maxLevel: {
        type: "number"
      },
      ordered: {
        type: "boolean",
        default: true
      }
    },
    supports: {
      anchor: true,
      ariaLabel: true,
      html: false,
      color: {
        text: true,
        background: true,
        gradients: true,
        link: true
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-table-of-contents"
  };

  // packages/block-library/build-module/table-of-contents/edit.mjs
  var import_block_editor258 = __toESM(require_block_editor(), 1);
  var import_blocks113 = __toESM(require_blocks(), 1);
  var import_components159 = __toESM(require_components(), 1);
  var import_data143 = __toESM(require_data(), 1);
  var import_element126 = __toESM(require_element(), 1);
  var import_i18n240 = __toESM(require_i18n(), 1);
  var import_compose58 = __toESM(require_compose(), 1);
  var import_notices18 = __toESM(require_notices(), 1);

  // packages/block-library/build-module/table-of-contents/list.mjs
  var import_jsx_runtime497 = __toESM(require_jsx_runtime(), 1);
  var ENTRY_CLASS_NAME = "wp-block-table-of-contents__entry";
  function TableOfContentsList({
    nestedHeadingList,
    disableLinkActivation,
    onClick,
    ordered = true
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime497.jsx)(import_jsx_runtime497.Fragment, { children: nestedHeadingList.map((node, index) => {
      const { content, link } = node.heading;
      const entry = link ? /* @__PURE__ */ (0, import_jsx_runtime497.jsx)(
        "a",
        {
          className: ENTRY_CLASS_NAME,
          href: link,
          "aria-disabled": disableLinkActivation || void 0,
          onClick: disableLinkActivation && "function" === typeof onClick ? onClick : void 0,
          children: content
        }
      ) : /* @__PURE__ */ (0, import_jsx_runtime497.jsx)("span", { className: ENTRY_CLASS_NAME, children: content });
      const NestedListTag = ordered ? "ol" : "ul";
      return /* @__PURE__ */ (0, import_jsx_runtime497.jsxs)("li", { children: [
        entry,
        node.children ? /* @__PURE__ */ (0, import_jsx_runtime497.jsx)(NestedListTag, { children: /* @__PURE__ */ (0, import_jsx_runtime497.jsx)(
          TableOfContentsList,
          {
            nestedHeadingList: node.children,
            disableLinkActivation,
            onClick: disableLinkActivation && "function" === typeof onClick ? onClick : void 0,
            ordered
          }
        ) }) : null
      ] }, index);
    }) });
  }

  // packages/block-library/build-module/table-of-contents/utils.mjs
  function linearToNestedHeadingList(headingList) {
    const nestedHeadingList = [];
    headingList.forEach((heading, key) => {
      if (heading.content === "") {
        return;
      }
      if (heading.level === headingList[0].level) {
        if (headingList[key + 1]?.level > heading.level) {
          let endOfSlice = headingList.length;
          for (let i2 = key + 1; i2 < headingList.length; i2++) {
            if (headingList[i2].level === heading.level) {
              endOfSlice = i2;
              break;
            }
          }
          nestedHeadingList.push({
            heading,
            children: linearToNestedHeadingList(
              headingList.slice(key + 1, endOfSlice)
            )
          });
        } else {
          nestedHeadingList.push({
            heading,
            children: null
          });
        }
      }
    });
    return nestedHeadingList;
  }

  // packages/block-library/build-module/table-of-contents/hooks.mjs
  var import_es6 = __toESM(require_es6(), 1);
  var import_data142 = __toESM(require_data(), 1);
  var import_dom12 = __toESM(require_dom(), 1);
  var import_element125 = __toESM(require_element(), 1);
  var import_url21 = __toESM(require_url(), 1);
  var import_block_editor257 = __toESM(require_block_editor(), 1);
  function getLatestHeadings(select9, clientId) {
    const {
      getBlockAttributes: getBlockAttributes4,
      getBlockName,
      getBlocksByName,
      getClientIdsOfDescendants
    } = select9(import_block_editor257.store);
    const permalink = select9("core/editor").getPermalink() ?? null;
    const isPaginated = getBlocksByName("core/nextpage").length !== 0;
    const { onlyIncludeCurrentPage, maxLevel } = getBlockAttributes4(clientId) ?? {};
    const [postContentClientId = ""] = getBlocksByName("core/post-content");
    const allBlockClientIds = getClientIdsOfDescendants(postContentClientId);
    let tocPage = 1;
    if (isPaginated && onlyIncludeCurrentPage) {
      const tocIndex = allBlockClientIds.indexOf(clientId);
      for (const [
        blockIndex,
        blockClientId
      ] of allBlockClientIds.entries()) {
        if (blockIndex >= tocIndex) {
          break;
        }
        if (getBlockName(blockClientId) === "core/nextpage") {
          tocPage++;
        }
      }
    }
    const latestHeadings = [];
    let headingPage = 1;
    let headingPageLink = null;
    if (typeof permalink === "string") {
      headingPageLink = isPaginated ? (0, import_url21.addQueryArgs)(permalink, { page: headingPage }) : permalink;
    }
    for (const blockClientId of allBlockClientIds) {
      const blockName = getBlockName(blockClientId);
      if (blockName === "core/nextpage") {
        headingPage++;
        if (onlyIncludeCurrentPage && headingPage > tocPage) {
          break;
        }
        if (typeof permalink === "string") {
          headingPageLink = (0, import_url21.addQueryArgs)(
            (0, import_url21.removeQueryArgs)(permalink, ["page"]),
            { page: headingPage }
          );
        }
      } else if (!onlyIncludeCurrentPage || headingPage === tocPage) {
        if (blockName === "core/heading") {
          const headingAttributes = getBlockAttributes4(blockClientId);
          if (maxLevel && headingAttributes.level > maxLevel) {
            continue;
          }
          const canBeLinked = typeof headingPageLink === "string" && typeof headingAttributes.anchor === "string" && headingAttributes.anchor !== "";
          latestHeadings.push({
            // Convert line breaks to spaces, and get rid of HTML tags in the headings.
            content: (0, import_dom12.__unstableStripHTML)(
              headingAttributes.content.replace(
                /(<br *\/?>)+/g,
                " "
              )
            ),
            level: headingAttributes.level,
            link: canBeLinked ? `${headingPageLink}#${headingAttributes.anchor}` : null
          });
        }
      }
    }
    return latestHeadings;
  }
  function observeCallback(select9, dispatch, clientId) {
    const { getBlockAttributes: getBlockAttributes4 } = select9(import_block_editor257.store);
    const { updateBlockAttributes, __unstableMarkNextChangeAsNotPersistent } = dispatch(import_block_editor257.store);
    const attributes2 = getBlockAttributes4(clientId);
    if (attributes2 === null) {
      return;
    }
    const headings = getLatestHeadings(select9, clientId);
    if (!(0, import_es6.default)(headings, attributes2.headings)) {
      window.queueMicrotask(() => {
        __unstableMarkNextChangeAsNotPersistent();
        updateBlockAttributes(clientId, { headings });
      });
    }
  }
  function useObserveHeadings(clientId) {
    const registry = (0, import_data142.useRegistry)();
    (0, import_element125.useEffect)(() => {
      return registry.subscribe(
        () => observeCallback(registry.select, registry.dispatch, clientId)
      );
    }, [registry, clientId]);
  }

  // packages/block-library/build-module/table-of-contents/edit.mjs
  var import_jsx_runtime498 = __toESM(require_jsx_runtime(), 1);
  function TableOfContentsEdit({
    attributes: {
      headings = [],
      onlyIncludeCurrentPage,
      maxLevel,
      ordered = true
    },
    clientId,
    setAttributes
  }) {
    useObserveHeadings(clientId);
    const blockProps = (0, import_block_editor258.useBlockProps)();
    const instanceId = (0, import_compose58.useInstanceId)(
      TableOfContentsEdit,
      "table-of-contents"
    );
    const { createWarningNotice } = (0, import_data143.useDispatch)(import_notices18.store);
    const showRedirectionPreventedNotice = (event) => {
      event.preventDefault();
      createWarningNotice((0, import_i18n240.__)("Links are disabled in the editor."), {
        id: `block-library/core/table-of-contents/redirection-prevented/${instanceId}`,
        type: "snackbar"
      });
    };
    const canInsertList = (0, import_data143.useSelect)(
      (select9) => {
        const { getBlockRootClientId, canInsertBlockType } = select9(import_block_editor258.store);
        const rootClientId = getBlockRootClientId(clientId);
        return canInsertBlockType("core/list", rootClientId);
      },
      [clientId]
    );
    const { replaceBlocks } = (0, import_data143.useDispatch)(import_block_editor258.store);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const headingTree = linearToNestedHeadingList(headings);
    const toolbarControls = /* @__PURE__ */ (0, import_jsx_runtime498.jsxs)(import_block_editor258.BlockControls, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime498.jsxs)(import_components159.ToolbarGroup, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime498.jsx)(
          import_components159.ToolbarButton,
          {
            icon: (0, import_i18n240.isRTL)() ? format_list_bullets_rtl_default : format_list_bullets_default,
            title: (0, import_i18n240.__)("Unordered"),
            description: (0, import_i18n240.__)("Convert to unordered list"),
            onClick: () => setAttributes({ ordered: false }),
            isActive: ordered === false
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime498.jsx)(
          import_components159.ToolbarButton,
          {
            icon: (0, import_i18n240.isRTL)() ? format_list_numbered_rtl_default : format_list_numbered_default,
            title: (0, import_i18n240.__)("Ordered"),
            description: (0, import_i18n240.__)("Convert to ordered list"),
            onClick: () => setAttributes({ ordered: true }),
            isActive: ordered === true
          }
        )
      ] }),
      canInsertList && /* @__PURE__ */ (0, import_jsx_runtime498.jsx)(import_components159.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime498.jsx)(
        import_components159.ToolbarButton,
        {
          onClick: () => replaceBlocks(
            clientId,
            (0, import_blocks113.createBlock)("core/list", {
              ordered,
              values: (0, import_element126.renderToString)(
                /* @__PURE__ */ (0, import_jsx_runtime498.jsx)(
                  TableOfContentsList,
                  {
                    nestedHeadingList: headingTree,
                    ordered
                  }
                )
              )
            })
          ),
          children: (0, import_i18n240.__)("Convert to static list")
        }
      ) })
    ] });
    const inspectorControls = /* @__PURE__ */ (0, import_jsx_runtime498.jsx)(import_block_editor258.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime498.jsxs)(
      import_components159.__experimentalToolsPanel,
      {
        label: (0, import_i18n240.__)("Settings"),
        resetAll: () => {
          setAttributes({
            onlyIncludeCurrentPage: false,
            maxLevel: void 0,
            ordered: true
          });
        },
        dropdownMenuProps,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime498.jsx)(
            import_components159.__experimentalToolsPanelItem,
            {
              hasValue: () => !!onlyIncludeCurrentPage,
              label: (0, import_i18n240.__)("Only include current page"),
              onDeselect: () => setAttributes({ onlyIncludeCurrentPage: false }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime498.jsx)(
                import_components159.ToggleControl,
                {
                  label: (0, import_i18n240.__)("Only include current page"),
                  checked: onlyIncludeCurrentPage,
                  onChange: (value) => setAttributes({ onlyIncludeCurrentPage: value }),
                  help: onlyIncludeCurrentPage ? (0, import_i18n240.__)(
                    "Only including headings from the current page (if the post is paginated)."
                  ) : (0, import_i18n240.__)(
                    "Include headings from all pages (if the post is paginated)."
                  )
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime498.jsx)(
            import_components159.__experimentalToolsPanelItem,
            {
              hasValue: () => !!maxLevel,
              label: (0, import_i18n240.__)("Limit heading levels"),
              onDeselect: () => setAttributes({ maxLevel: void 0 }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime498.jsx)(
                import_components159.SelectControl,
                {
                  __next40pxDefaultSize: true,
                  label: (0, import_i18n240.__)("Include headings down to level"),
                  value: maxLevel || "",
                  options: [
                    { value: "", label: (0, import_i18n240.__)("All levels") },
                    { value: "1", label: (0, import_i18n240.__)("Heading 1") },
                    { value: "2", label: (0, import_i18n240.__)("Heading 2") },
                    { value: "3", label: (0, import_i18n240.__)("Heading 3") },
                    { value: "4", label: (0, import_i18n240.__)("Heading 4") },
                    { value: "5", label: (0, import_i18n240.__)("Heading 5") },
                    { value: "6", label: (0, import_i18n240.__)("Heading 6") }
                  ],
                  onChange: (value) => setAttributes({
                    maxLevel: value ? parseInt(value) : void 0
                  }),
                  help: !maxLevel ? (0, import_i18n240.__)(
                    "Including all heading levels in the table of contents."
                  ) : (0, import_i18n240.__)(
                    "Only include headings up to and including this level."
                  )
                }
              )
            }
          )
        ]
      }
    ) });
    if (headings.length === 0) {
      return /* @__PURE__ */ (0, import_jsx_runtime498.jsxs)(import_jsx_runtime498.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime498.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime498.jsx)(
          import_components159.Placeholder,
          {
            icon: /* @__PURE__ */ (0, import_jsx_runtime498.jsx)(import_block_editor258.BlockIcon, { icon: table_of_contents_default }),
            label: (0, import_i18n240.__)("Table of Contents"),
            instructions: (0, import_i18n240.__)(
              "Start adding Heading blocks to create a table of contents. Headings with HTML anchors will be linked here."
            )
          }
        ) }),
        inspectorControls
      ] });
    }
    const ListTag = ordered ? "ol" : "ul";
    return /* @__PURE__ */ (0, import_jsx_runtime498.jsxs)(import_jsx_runtime498.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime498.jsx)("nav", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime498.jsx)(ListTag, { children: /* @__PURE__ */ (0, import_jsx_runtime498.jsx)(
        TableOfContentsList,
        {
          nestedHeadingList: headingTree,
          disableLinkActivation: true,
          onClick: showRedirectionPreventedNotice,
          ordered
        }
      ) }) }),
      toolbarControls,
      inspectorControls
    ] });
  }

  // packages/block-library/build-module/table-of-contents/save.mjs
  var import_block_editor259 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime499 = __toESM(require_jsx_runtime(), 1);
  function save51({
    attributes: { headings = [], ordered = true }
  }) {
    if (headings.length === 0) {
      return null;
    }
    const ListTag = ordered ? "ol" : "ul";
    return /* @__PURE__ */ (0, import_jsx_runtime499.jsx)("nav", { ...import_block_editor259.useBlockProps.save(), children: /* @__PURE__ */ (0, import_jsx_runtime499.jsx)(ListTag, { children: /* @__PURE__ */ (0, import_jsx_runtime499.jsx)(
      TableOfContentsList,
      {
        nestedHeadingList: linearToNestedHeadingList(headings),
        ordered
      }
    ) }) });
  }

  // packages/block-library/build-module/table-of-contents/index.mjs
  var { name: name108 } = block_default107;
  var settings107 = {
    icon: table_of_contents_default,
    edit: TableOfContentsEdit,
    save: save51,
    example: {
      innerBlocks: [
        {
          name: "core/heading",
          attributes: {
            level: 2,
            content: (0, import_i18n241.__)("Heading")
          }
        },
        {
          name: "core/heading",
          attributes: {
            level: 3,
            content: (0, import_i18n241.__)("Subheading")
          }
        },
        {
          name: "core/heading",
          attributes: {
            level: 2,
            content: (0, import_i18n241.__)("Heading")
          }
        },
        {
          name: "core/heading",
          attributes: {
            level: 3,
            content: (0, import_i18n241.__)("Subheading")
          }
        }
      ],
      attributes: {
        headings: [
          {
            content: (0, import_i18n241.__)("Heading"),
            level: 2
          },
          {
            content: (0, import_i18n241.__)("Subheading"),
            level: 3
          },
          {
            content: (0, import_i18n241.__)("Heading"),
            level: 2
          },
          {
            content: (0, import_i18n241.__)("Subheading"),
            level: 3
          }
        ]
      }
    }
  };
  var init107 = () => initBlock({ name: name108, metadata: block_default107, settings: settings107 });

  // packages/block-library/build-module/tabs/index.mjs
  var tabs_exports = {};
  __export(tabs_exports, {
    init: () => init108,
    metadata: () => block_default108,
    name: () => name109,
    settings: () => settings108
  });
  var import_i18n242 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/tabs/edit.mjs
  var import_block_editor260 = __toESM(require_block_editor(), 1);
  var import_data144 = __toESM(require_data(), 1);
  var import_element127 = __toESM(require_element(), 1);

  // packages/block-library/build-module/tabs/controls.mjs
  var import_jsx_runtime500 = __toESM(require_jsx_runtime(), 1);
  function Controls4({ clientId }) {
    return /* @__PURE__ */ (0, import_jsx_runtime500.jsxs)(import_jsx_runtime500.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime500.jsx)(AddTabToolbarControl, { tabsClientId: clientId }),
      /* @__PURE__ */ (0, import_jsx_runtime500.jsx)(RemoveTabToolbarControl, { tabsClientId: clientId })
    ] });
  }

  // packages/block-library/build-module/tabs/edit.mjs
  var import_jsx_runtime501 = __toESM(require_jsx_runtime(), 1);
  var TABS_TEMPLATE = [
    [
      "core/tabs-menu",
      {
        lock: {
          remove: true
        }
      }
    ],
    [
      "core/tab-panel",
      {
        lock: {
          remove: true
        }
      },
      [
        [
          "core/tab",
          {
            anchor: "tab-1",
            label: "Tab 1"
          },
          [["core/paragraph"]]
        ]
      ]
    ]
  ];
  function Edit21({
    clientId,
    attributes: attributes2,
    setAttributes,
    __unstableLayoutClassNames: layoutClassNames
  }) {
    const { anchor, activeTabIndex, editorActiveTabIndex } = attributes2;
    (0, import_element127.useEffect)(() => {
      if (editorActiveTabIndex === void 0) {
        setAttributes({ editorActiveTabIndex: activeTabIndex });
      }
    }, []);
    const tabs = (0, import_data144.useSelect)(
      (select9) => {
        const { getBlocks } = select9(import_block_editor260.store);
        const innerBlocks = getBlocks(clientId);
        const tabPanel = innerBlocks.find(
          (block) => block.name === "core/tab-panel"
        );
        if (!tabPanel) {
          return [];
        }
        return tabPanel.innerBlocks.filter(
          (block) => block.name === "core/tab"
        );
      },
      [clientId]
    );
    const contextValue = (0, import_element127.useMemo)(() => {
      const tabList = tabs.map((tab, index) => ({
        id: tab.attributes.anchor || `tab-${index}`,
        label: tab.attributes.label || "",
        clientId: tab.clientId,
        index
      }));
      return {
        "core/tabs-list": tabList,
        "core/tabs-id": anchor,
        "core/tabs-activeTabIndex": activeTabIndex,
        "core/tabs-editorActiveTabIndex": editorActiveTabIndex
      };
    }, [tabs, anchor, activeTabIndex, editorActiveTabIndex]);
    const blockProps = (0, import_block_editor260.useBlockProps)({
      className: layoutClassNames
    });
    const innerBlockProps = (0, import_block_editor260.useInnerBlocksProps)(blockProps, {
      __experimentalCaptureToolbars: true,
      template: TABS_TEMPLATE,
      templateLock: false,
      renderAppender: false
    });
    return /* @__PURE__ */ (0, import_jsx_runtime501.jsx)(import_block_editor260.BlockContextProvider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime501.jsxs)("div", { ...innerBlockProps, children: [
      /* @__PURE__ */ (0, import_jsx_runtime501.jsx)(
        Controls4,
        {
          clientId,
          attributes: attributes2,
          setAttributes
        }
      ),
      innerBlockProps.children
    ] }) });
  }
  var edit_default36 = Edit21;

  // packages/block-library/build-module/tabs/save.mjs
  var import_block_editor261 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime502 = __toESM(require_jsx_runtime(), 1);
  function save52({ attributes: attributes2 }) {
    const { anchor } = attributes2;
    const tabsId = anchor;
    const blockProps = import_block_editor261.useBlockProps.save();
    const innerBlocksProps = import_block_editor261.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime502.jsx)("div", { ...innerBlocksProps, id: tabsId });
  }

  // packages/block-library/build-module/tabs/block.json
  var block_default108 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    __experimental: true,
    apiVersion: 3,
    name: "core/tabs",
    title: "Tabs",
    description: "Display content in a tabbed interface to help users navigate detailed content with ease.",
    version: "1.0.0",
    category: "design",
    textdomain: "default",
    allowedBlocks: ["core/tabs-menu", "core/tab-panel"],
    attributes: {
      activeTabIndex: {
        type: "number",
        default: 0
      },
      editorActiveTabIndex: {
        type: "number",
        role: "local"
      }
    },
    supports: {
      align: true,
      anchor: true,
      color: {
        text: true,
        background: true,
        __experimentalDefaultControls: {
          text: true,
          background: true
        }
      },
      layout: {
        default: {
          type: "flex",
          flexWrap: "nowrap",
          justifyContent: "stretch",
          verticalAlignment: "stretch",
          orientation: "vertical"
        },
        allowSwitching: false,
        allowVerticalAlignment: true,
        allowJustification: true,
        allowOrientation: true,
        allowSizingOnChildren: true
      },
      html: false,
      interactivity: true,
      spacing: {
        blockGap: true,
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        __experimentalFontFamily: true
      },
      renaming: true
    },
    providesContext: {
      "core/tabs-activeTabIndex": "activeTabIndex",
      "core/tabs-editorActiveTabIndex": "editorActiveTabIndex"
    },
    usesContext: ["core/tabs-list", "core/tabs-id"],
    editorScript: "file:./index.js",
    editorStyle: "file:./index.css",
    style: "file:./style-index.css",
    viewScriptModule: "@wordpress/block-library/tabs/view"
  };

  // packages/block-library/build-module/tabs/index.mjs
  var { name: name109 } = block_default108;
  var settings108 = {
    icon: tabs_default,
    example: {
      innerBlocks: [
        {
          name: "core/tabs-menu",
          innerBlocks: [{ name: "core/tabs-menu-item" }]
        },
        {
          name: "core/tab-panel",
          innerBlocks: [1, 2, 3].map((index) => ({
            name: "core/tab",
            attributes: {
              label: (0, import_i18n242.sprintf)(
                /** translators: %s: tab index number */
                (0, import_i18n242.__)("Tab %s"),
                index
              )
            },
            innerBlocks: [
              {
                name: "core/paragraph",
                attributes: {
                  content: (0, import_i18n242.__)(
                    "In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing."
                  )
                }
              }
            ]
          }))
        }
      ]
    },
    edit: edit_default36,
    save: save52
  };
  var init108 = () => initBlock({ name: name109, metadata: block_default108, settings: settings108 });

  // packages/block-library/build-module/tabs-menu/index.mjs
  var tabs_menu_exports = {};
  __export(tabs_menu_exports, {
    init: () => init109,
    metadata: () => block_default109,
    name: () => name110,
    settings: () => settings109
  });

  // packages/block-library/build-module/tabs-menu/edit.mjs
  var import_i18n243 = __toESM(require_i18n(), 1);
  var import_block_editor262 = __toESM(require_block_editor(), 1);
  var import_data145 = __toESM(require_data(), 1);
  var import_element128 = __toESM(require_element(), 1);
  var import_jsx_runtime503 = __toESM(require_jsx_runtime(), 1);
  var TABS_MENU_ITEM_TEMPLATE = [["core/tabs-menu-item", {}]];
  var EMPTY_ARRAY6 = [];
  function TabsMenuItemPreview({
    blocks,
    blockContextId,
    isHidden,
    setActiveBlockContextId
  }) {
    const blockPreviewProps = (0, import_block_editor262.__experimentalUseBlockPreview)({ blocks });
    const handleOnClick = () => {
      setActiveBlockContextId(blockContextId);
    };
    const style2 = {
      display: isHidden ? "none" : "flex"
    };
    return /* @__PURE__ */ (0, import_jsx_runtime503.jsx)(
      "div",
      {
        ...blockPreviewProps,
        tabIndex: 0,
        role: "button",
        onClick: handleOnClick,
        onKeyDown: handleOnClick,
        style: style2
      }
    );
  }
  var MemoizedTabsMenuItemPreview = (0, import_element128.memo)(TabsMenuItemPreview);
  function TabsMenuItemTemplateBlocks({ wrapperProps = {}, layout }) {
    const innerBlocksProps = (0, import_block_editor262.useInnerBlocksProps)(wrapperProps, {
      template: TABS_MENU_ITEM_TEMPLATE,
      templateLock: "all",
      renderAppender: false,
      layout
    });
    return innerBlocksProps.children;
  }
  function Edit22({
    context,
    clientId,
    __unstableLayoutClassNames: layoutClassNames
  }) {
    const { layout } = (0, import_block_editor262.useBlockEditContext)();
    const tabsId = context["core/tabs-id"] || null;
    const tabsList = context["core/tabs-list"] || EMPTY_ARRAY6;
    const activeTabIndex = context["core/tabs-activeTabIndex"] ?? 0;
    const editorActiveTabIndex = context["core/tabs-editorActiveTabIndex"];
    const effectiveActiveIndex = (0, import_element128.useMemo)(() => {
      return editorActiveTabIndex ?? activeTabIndex;
    }, [editorActiveTabIndex, activeTabIndex]);
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data145.useDispatch)(import_block_editor262.store);
    const { updateBlockAttributes } = (0, import_data145.useDispatch)(import_block_editor262.store);
    const [activeBlockContextId, setActiveBlockContextId] = (0, import_element128.useState)(null);
    const { blocks, tabsClientId } = (0, import_data145.useSelect)(
      (select9) => {
        const { getBlocks, getBlockRootClientId } = select9(import_block_editor262.store);
        return {
          blocks: getBlocks(clientId),
          tabsClientId: getBlockRootClientId(clientId)
        };
      },
      [clientId]
    );
    const blockContexts = (0, import_element128.useMemo)(() => {
      return tabsList.map((tab, index) => ({
        "core/tabs-menu-item-index": index,
        "core/tabs-menu-item-id": tab.id || `tab-${index}`,
        "core/tabs-menu-item-label": tab.label || "",
        "core/tabs-menu-item-clientId": tab.clientId,
        // Pass through parent context
        "core/tabs-id": tabsId,
        "core/tabs-list": tabsList,
        "core/tabs-activeTabIndex": activeTabIndex,
        "core/tabs-editorActiveTabIndex": editorActiveTabIndex
      }));
    }, [tabsList, tabsId, activeTabIndex, editorActiveTabIndex]);
    const getContextId = (0, import_element128.useCallback)((blockContext) => {
      return `tab-context-${blockContext["core/tabs-menu-item-index"]}`;
    }, []);
    (0, import_element128.useEffect)(() => {
      if (blockContexts.length > 0 && activeBlockContextId === null) {
        setActiveBlockContextId(getContextId(blockContexts[0]));
      }
    }, [blockContexts, activeBlockContextId, getContextId]);
    (0, import_element128.useEffect)(() => {
      if (blockContexts.length > 0 && effectiveActiveIndex < blockContexts.length) {
        const newContextId = getContextId(
          blockContexts[effectiveActiveIndex]
        );
        setActiveBlockContextId(
          (prevId) => prevId !== newContextId ? newContextId : prevId
        );
      }
    }, [effectiveActiveIndex, blockContexts, getContextId]);
    const handleTabContextClick = (0, import_element128.useCallback)(
      (index) => {
        if (tabsClientId && index !== effectiveActiveIndex) {
          __unstableMarkNextChangeAsNotPersistent();
          updateBlockAttributes(tabsClientId, {
            editorActiveTabIndex: index
          });
        }
      },
      [
        tabsClientId,
        effectiveActiveIndex,
        updateBlockAttributes,
        __unstableMarkNextChangeAsNotPersistent
      ]
    );
    const blockProps = (0, import_block_editor262.useBlockProps)({
      className: clsx_default(layoutClassNames),
      role: "tablist"
    });
    if (tabsList.length === 0) {
      return /* @__PURE__ */ (0, import_jsx_runtime503.jsxs)(import_jsx_runtime503.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime503.jsx)(AddTabToolbarControl, { tabsClientId }),
        /* @__PURE__ */ (0, import_jsx_runtime503.jsx)(RemoveTabToolbarControl, { tabsClientId }),
        /* @__PURE__ */ (0, import_jsx_runtime503.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime503.jsx)("span", { className: "tabs__tab-label tabs__tab-label--placeholder", children: (0, import_i18n243.__)("Add tabs to display menu") }) })
      ] });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime503.jsxs)(import_jsx_runtime503.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime503.jsx)(AddTabToolbarControl, { tabsClientId }),
      /* @__PURE__ */ (0, import_jsx_runtime503.jsx)(RemoveTabToolbarControl, { tabsClientId }),
      /* @__PURE__ */ (0, import_jsx_runtime503.jsx)("div", { ...blockProps, children: blockContexts.map((blockContext, index) => {
        const contextId = getContextId(blockContext);
        const isVisible = contextId === activeBlockContextId;
        return /* @__PURE__ */ (0, import_jsx_runtime503.jsxs)(
          import_block_editor262.BlockContextProvider,
          {
            value: blockContext,
            children: [
              isVisible ? /* @__PURE__ */ (0, import_jsx_runtime503.jsx)(
                TabsMenuItemTemplateBlocks,
                {
                  wrapperProps: {
                    onClick: () => handleTabContextClick(index)
                  },
                  layout
                }
              ) : null,
              /* @__PURE__ */ (0, import_jsx_runtime503.jsx)(
                MemoizedTabsMenuItemPreview,
                {
                  blocks,
                  blockContextId: contextId,
                  setActiveBlockContextId: (id) => {
                    setActiveBlockContextId(id);
                    handleTabContextClick(index);
                  },
                  isHidden: isVisible
                }
              )
            ]
          },
          contextId
        );
      }) })
    ] });
  }
  var edit_default37 = Edit22;

  // packages/block-library/build-module/tabs-menu/save.mjs
  var import_block_editor263 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime504 = __toESM(require_jsx_runtime(), 1);
  function save53() {
    const blockProps = import_block_editor263.useBlockProps.save({
      role: "tablist"
    });
    const innerBlocksProps = import_block_editor263.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime504.jsx)("div", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/tabs-menu/block.json
  var block_default109 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    __experimental: true,
    apiVersion: 3,
    name: "core/tabs-menu",
    title: "Tabs Menu",
    description: "Display the tab buttons for a tabbed interface.",
    version: "1.0.0",
    category: "design",
    textdomain: "default",
    parent: ["core/tabs"],
    allowedBlocks: ["core/tabs-menu-item"],
    usesContext: [
      "core/tabs-list",
      "core/tabs-id",
      "core/tabs-activeTabIndex",
      "core/tabs-editorActiveTabIndex"
    ],
    attributes: {},
    supports: {
      html: false,
      reusable: false,
      lock: false,
      dimensions: {
        aspectRatio: false,
        height: false,
        minHeight: false,
        width: false
      },
      color: {
        background: true,
        text: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        __experimentalFontFamily: true
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true
      },
      layout: {
        default: {
          type: "flex",
          flexWrap: "nowrap",
          orientation: "horizontal"
        },
        allowSwitching: false,
        allowVerticalAlignment: true,
        allowJustification: true,
        allowOrientation: true
      },
      spacing: {
        padding: true,
        margin: true,
        blockGap: true,
        __experimentalDefaultControls: {
          padding: true,
          margin: true,
          blockGap: true
        }
      }
    },
    editorScript: "file:./index.js",
    editorStyle: "file:./editor.css",
    style: "file:./style-index.css"
  };

  // packages/block-library/build-module/tabs-menu/index.mjs
  var { name: name110 } = block_default109;
  var settings109 = {
    icon: tabs_menu_default,
    edit: edit_default37,
    save: save53
  };
  var init109 = () => initBlock({ name: name110, metadata: block_default109, settings: settings109 });

  // packages/block-library/build-module/tabs-menu-item/index.mjs
  var tabs_menu_item_exports = {};
  __export(tabs_menu_item_exports, {
    init: () => init110,
    metadata: () => block_default110,
    name: () => name111,
    settings: () => settings110
  });

  // packages/block-library/build-module/tabs-menu-item/edit.mjs
  var import_i18n245 = __toESM(require_i18n(), 1);
  var import_block_editor265 = __toESM(require_block_editor(), 1);
  var import_data147 = __toESM(require_data(), 1);
  var import_element129 = __toESM(require_element(), 1);

  // packages/block-library/build-module/tabs-menu-item/controls.mjs
  var import_i18n244 = __toESM(require_i18n(), 1);
  var import_block_editor264 = __toESM(require_block_editor(), 1);
  var import_components160 = __toESM(require_components(), 1);
  var import_data146 = __toESM(require_data(), 1);
  var import_jsx_runtime505 = __toESM(require_jsx_runtime(), 1);
  function TabBlockMover({
    tabClientId,
    tabIndex,
    tabsCount,
    tabsMenuClientId,
    tabsClientId
  }) {
    const {
      moveBlocksUp,
      moveBlocksDown,
      updateBlockAttributes,
      __unstableMarkNextChangeAsNotPersistent
    } = (0, import_data146.useDispatch)(import_block_editor264.store);
    const { tabPanelClientId, orientation } = (0, import_data146.useSelect)(
      (select9) => {
        const { getBlockRootClientId, getBlockAttributes: getBlockAttributes4 } = select9(import_block_editor264.store);
        const tabsMenuAttributes = tabsMenuClientId ? getBlockAttributes4(tabsMenuClientId) : null;
        return {
          tabPanelClientId: getBlockRootClientId(tabClientId),
          orientation: tabsMenuAttributes?.layout?.orientation || "horizontal"
        };
      },
      [tabClientId, tabsMenuClientId]
    );
    const isFirst = tabIndex === 0;
    const isLast = tabIndex === tabsCount - 1;
    const isHorizontal = orientation === "horizontal";
    let upIcon, downIcon, upLabel, downLabel;
    if (isHorizontal) {
      if ((0, import_i18n244.isRTL)()) {
        upIcon = chevron_right_default;
        downIcon = chevron_left_default;
        upLabel = (0, import_i18n244.__)("Move tab right");
        downLabel = (0, import_i18n244.__)("Move tab left");
      } else {
        upIcon = chevron_left_default;
        downIcon = chevron_right_default;
        upLabel = (0, import_i18n244.__)("Move tab left");
        downLabel = (0, import_i18n244.__)("Move tab right");
      }
    } else {
      upIcon = chevron_up_default;
      downIcon = chevron_down_default;
      upLabel = (0, import_i18n244.__)("Move tab up");
      downLabel = (0, import_i18n244.__)("Move tab down");
    }
    const handleMoveUp = () => {
      moveBlocksUp([tabClientId], tabPanelClientId);
      if (tabsClientId) {
        __unstableMarkNextChangeAsNotPersistent();
        updateBlockAttributes(tabsClientId, {
          editorActiveTabIndex: tabIndex - 1
        });
      }
    };
    const handleMoveDown = () => {
      moveBlocksDown([tabClientId], tabPanelClientId);
      if (tabsClientId) {
        __unstableMarkNextChangeAsNotPersistent();
        updateBlockAttributes(tabsClientId, {
          editorActiveTabIndex: tabIndex + 1
        });
      }
    };
    if (tabsCount <= 1) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime505.jsx)(import_block_editor264.BlockControls, { group: "parent", children: /* @__PURE__ */ (0, import_jsx_runtime505.jsx)(
      import_components160.ToolbarGroup,
      {
        className: clsx_default("block-editor-block-mover", {
          "is-horizontal": isHorizontal
        }),
        children: /* @__PURE__ */ (0, import_jsx_runtime505.jsxs)("div", { className: "block-editor-block-mover__move-button-container", children: [
          /* @__PURE__ */ (0, import_jsx_runtime505.jsx)(import_components160.ToolbarItem, { children: (itemProps) => /* @__PURE__ */ (0, import_jsx_runtime505.jsx)(
            import_components160.Button,
            {
              className: clsx_default(
                "block-editor-block-mover-button",
                "is-up-button"
              ),
              icon: upIcon,
              label: upLabel,
              disabled: isFirst,
              accessibleWhenDisabled: true,
              onClick: handleMoveUp,
              __next40pxDefaultSize: true,
              ...itemProps
            }
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime505.jsx)(import_components160.ToolbarItem, { children: (itemProps) => /* @__PURE__ */ (0, import_jsx_runtime505.jsx)(
            import_components160.Button,
            {
              className: clsx_default(
                "block-editor-block-mover-button",
                "is-down-button"
              ),
              icon: downIcon,
              label: downLabel,
              disabled: isLast,
              accessibleWhenDisabled: true,
              onClick: handleMoveDown,
              __next40pxDefaultSize: true,
              ...itemProps
            }
          ) })
        ] })
      }
    ) });
  }
  function Controls5({
    attributes: attributes2,
    setAttributes,
    clientId,
    tabsClientId,
    tabClientId,
    tabIndex,
    tabsCount,
    tabsMenuClientId,
    activeBackgroundColor,
    setActiveBackgroundColor,
    activeTextColor,
    setActiveTextColor,
    hoverBackgroundColor,
    setHoverBackgroundColor,
    hoverTextColor,
    setHoverTextColor
  }) {
    const {
      customActiveBackgroundColor,
      customActiveTextColor,
      customHoverBackgroundColor,
      customHoverTextColor
    } = attributes2;
    const colorSettings = (0, import_block_editor264.__experimentalUseMultipleOriginColorsAndGradients)();
    return /* @__PURE__ */ (0, import_jsx_runtime505.jsxs)(import_jsx_runtime505.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime505.jsx)(
        TabBlockMover,
        {
          tabClientId,
          tabIndex,
          tabsCount,
          tabsMenuClientId,
          tabsClientId
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime505.jsx)(AddTabToolbarControl, { tabsClientId }),
      /* @__PURE__ */ (0, import_jsx_runtime505.jsx)(RemoveTabToolbarControl, { tabsClientId }),
      /* @__PURE__ */ (0, import_jsx_runtime505.jsx)(import_block_editor264.InspectorControls, { group: "color", children: /* @__PURE__ */ (0, import_jsx_runtime505.jsx)(
        import_block_editor264.__experimentalColorGradientSettingsDropdown,
        {
          settings: [
            {
              label: (0, import_i18n244.__)("Active background"),
              colorValue: activeBackgroundColor?.color ?? customActiveBackgroundColor,
              onColorChange: (value) => {
                setActiveBackgroundColor(value);
                setAttributes({
                  customActiveBackgroundColor: value
                });
              },
              resetAllFilter: () => {
                setActiveBackgroundColor(void 0);
                setAttributes({
                  customActiveBackgroundColor: void 0
                });
              },
              clearable: true
            },
            {
              label: (0, import_i18n244.__)("Active text"),
              colorValue: activeTextColor?.color ?? customActiveTextColor,
              onColorChange: (value) => {
                setActiveTextColor(value);
                setAttributes({
                  customActiveTextColor: value
                });
              },
              resetAllFilter: () => {
                setActiveTextColor(void 0);
                setAttributes({
                  customActiveTextColor: void 0
                });
              },
              clearable: true
            },
            {
              label: (0, import_i18n244.__)("Hover background"),
              colorValue: hoverBackgroundColor?.color ?? customHoverBackgroundColor,
              onColorChange: (value) => {
                setHoverBackgroundColor(value);
                setAttributes({
                  customHoverBackgroundColor: value
                });
              },
              resetAllFilter: () => {
                setHoverBackgroundColor(void 0);
                setAttributes({
                  customHoverBackgroundColor: void 0
                });
              },
              clearable: true
            },
            {
              label: (0, import_i18n244.__)("Hover text"),
              colorValue: hoverTextColor?.color ?? customHoverTextColor,
              onColorChange: (value) => {
                setHoverTextColor(value);
                setAttributes({
                  customHoverTextColor: value
                });
              },
              resetAllFilter: () => {
                setHoverTextColor(void 0);
                setAttributes({
                  customHoverTextColor: void 0
                });
              },
              clearable: true
            }
          ],
          panelId: clientId,
          disableCustomColors: false,
          __experimentalIsRenderedInSidebar: true,
          __next40pxDefaultSize: true,
          ...colorSettings
        }
      ) })
    ] });
  }

  // packages/block-library/build-module/tabs-menu-item/edit.mjs
  var import_jsx_runtime506 = __toESM(require_jsx_runtime(), 1);
  function Edit23({
    attributes: attributes2,
    setAttributes,
    context,
    clientId,
    activeBackgroundColor,
    setActiveBackgroundColor,
    activeTextColor,
    setActiveTextColor,
    hoverBackgroundColor,
    setHoverBackgroundColor,
    hoverTextColor,
    setHoverTextColor,
    __unstableLayoutClassNames: layoutClassNames
  }) {
    const tabIndex = context["core/tabs-menu-item-index"] ?? 0;
    const tabId = context["core/tabs-menu-item-id"] ?? "";
    const tabLabel = context["core/tabs-menu-item-label"] ?? "";
    const tabClientId = context["core/tabs-menu-item-clientId"] ?? "";
    const contextTabsList = context["core/tabs-list"];
    const tabsList = (0, import_element129.useMemo)(
      () => contextTabsList || [],
      [contextTabsList]
    );
    const activeTabIndex = context["core/tabs-activeTabIndex"] ?? 0;
    const editorActiveTabIndex = context["core/tabs-editorActiveTabIndex"];
    const effectiveActiveIndex = (0, import_element129.useMemo)(() => {
      return editorActiveTabIndex ?? activeTabIndex;
    }, [editorActiveTabIndex, activeTabIndex]);
    const isActiveTab = tabIndex === effectiveActiveIndex;
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data147.useDispatch)(import_block_editor265.store);
    const { tabsClientId, tabsMenuClientId, selectedTabClientId } = (0, import_data147.useSelect)(
      (select9) => {
        const {
          getBlockRootClientId,
          getSelectedBlockClientIds,
          hasSelectedInnerBlock
        } = select9(import_block_editor265.store);
        const _tabsMenuClientId = getBlockRootClientId(clientId);
        const _tabsClientId = _tabsMenuClientId ? getBlockRootClientId(_tabsMenuClientId) : null;
        const selectedIds = getSelectedBlockClientIds();
        let selectedTab = null;
        for (const tab of tabsList) {
          if (selectedIds.includes(tab.clientId) || hasSelectedInnerBlock(tab.clientId, true)) {
            selectedTab = tab.clientId;
            break;
          }
        }
        return {
          tabsClientId: _tabsClientId,
          tabsMenuClientId: _tabsMenuClientId,
          selectedTabClientId: selectedTab
        };
      },
      [clientId, tabsList]
    );
    const isSelectedTab = tabClientId === selectedTabClientId;
    const { updateBlockAttributes } = (0, import_data147.useDispatch)(import_block_editor265.store);
    const handleLabelChange = (0, import_element129.useCallback)(
      (newLabel) => {
        if (tabClientId) {
          updateBlockAttributes(tabClientId, {
            label: newLabel,
            anchor: slugFromLabel(newLabel, tabIndex)
          });
        }
      },
      [updateBlockAttributes, tabClientId, tabIndex]
    );
    const handleTabClick = (0, import_element129.useCallback)(
      (event) => {
        event.preventDefault();
        if (tabsClientId && tabIndex !== effectiveActiveIndex) {
          __unstableMarkNextChangeAsNotPersistent();
          updateBlockAttributes(tabsClientId, {
            editorActiveTabIndex: tabIndex
          });
        }
      },
      [
        tabsClientId,
        tabIndex,
        effectiveActiveIndex,
        updateBlockAttributes,
        __unstableMarkNextChangeAsNotPersistent
      ]
    );
    const customColorStyles = (0, import_element129.useMemo)(() => {
      const styles = {};
      const activeBg = activeBackgroundColor?.color || attributes2.customActiveBackgroundColor;
      const activeText = activeTextColor?.color || attributes2.customActiveTextColor;
      const hoverBg = hoverBackgroundColor?.color || attributes2.customHoverBackgroundColor;
      const hoverText = hoverTextColor?.color || attributes2.customHoverTextColor;
      if (activeBg) {
        styles["--custom-tab-active-color"] = activeBg;
      }
      if (activeText) {
        styles["--custom-tab-active-text-color"] = activeText;
      }
      if (hoverBg) {
        styles["--custom-tab-hover-color"] = hoverBg;
      }
      if (hoverText) {
        styles["--custom-tab-hover-text-color"] = hoverText;
      }
      return styles;
    }, [
      activeBackgroundColor?.color,
      attributes2.customActiveBackgroundColor,
      activeTextColor?.color,
      attributes2.customActiveTextColor,
      hoverBackgroundColor?.color,
      attributes2.customHoverBackgroundColor,
      hoverTextColor?.color,
      attributes2.customHoverTextColor
    ]);
    const tabPanelId = tabId || `tab-${tabIndex}`;
    const tabLabelId = `${tabPanelId}--tab`;
    const blockProps = (0, import_block_editor265.useBlockProps)({
      className: clsx_default(layoutClassNames, {
        "is-active": isActiveTab,
        "is-selected": isSelectedTab
      }),
      style: customColorStyles,
      "aria-controls": tabPanelId,
      "aria-selected": isActiveTab,
      id: tabLabelId,
      role: "tab",
      tabIndex: -1,
      onClick: handleTabClick
    });
    return /* @__PURE__ */ (0, import_jsx_runtime506.jsxs)(import_jsx_runtime506.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime506.jsx)(
        Controls5,
        {
          ...{
            attributes: attributes2,
            setAttributes,
            clientId,
            tabsClientId,
            tabClientId,
            tabIndex,
            tabsCount: tabsList.length,
            tabsMenuClientId,
            activeBackgroundColor,
            setActiveBackgroundColor,
            activeTextColor,
            setActiveTextColor,
            hoverBackgroundColor,
            setHoverBackgroundColor,
            hoverTextColor,
            setHoverTextColor
          }
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime506.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime506.jsx)(
        import_block_editor265.RichText,
        {
          tagName: "span",
          withoutInteractiveFormatting: true,
          placeholder: (0, import_i18n245.sprintf)(
            /* translators: %d is the tab index + 1 */
            (0, import_i18n245.__)("Tab title %d"),
            tabIndex + 1
          ),
          value: tabLabel || "",
          onChange: handleLabelChange
        }
      ) })
    ] });
  }
  var edit_default38 = (0, import_block_editor265.withColors)(
    "activeBackgroundColor",
    "activeTextColor",
    "hoverBackgroundColor",
    "hoverTextColor"
  )(Edit23);

  // packages/block-library/build-module/tabs-menu-item/save.mjs
  var import_block_editor266 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime507 = __toESM(require_jsx_runtime(), 1);
  function save54({ attributes: attributes2 }) {
    const customColorStyles = {};
    if (attributes2.customActiveBackgroundColor) {
      customColorStyles["--custom-tab-active-color"] = attributes2.customActiveBackgroundColor;
    }
    if (attributes2.customActiveTextColor) {
      customColorStyles["--custom-tab-active-text-color"] = attributes2.customActiveTextColor;
    }
    if (attributes2.customHoverBackgroundColor) {
      customColorStyles["--custom-tab-hover-color"] = attributes2.customHoverBackgroundColor;
    }
    if (attributes2.customHoverTextColor) {
      customColorStyles["--custom-tab-hover-text-color"] = attributes2.customHoverTextColor;
    }
    const blockProps = import_block_editor266.useBlockProps.save({
      className: "wp-block-tabs-menu-item__template",
      style: customColorStyles,
      type: "button",
      role: "tab"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime507.jsx)("button", { ...blockProps });
  }

  // packages/block-library/build-module/tabs-menu-item/block.json
  var block_default110 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    __experimental: true,
    apiVersion: 3,
    name: "core/tabs-menu-item",
    title: "Tab Menu Item",
    description: "A single tab button in the tabs menu. Used as a template for styling all tab buttons.",
    version: "1.0.0",
    category: "design",
    textdomain: "default",
    parent: ["core/tabs-menu"],
    usesContext: [
      "core/tabs-menu-item-index",
      "core/tabs-menu-item-id",
      "core/tabs-menu-item-label",
      "core/tabs-menu-item-clientId",
      "core/tabs-list",
      "core/tabs-activeTabIndex",
      "core/tabs-editorActiveTabIndex"
    ],
    attributes: {
      activeBackgroundColor: {
        type: "string"
      },
      customActiveBackgroundColor: {
        type: "string"
      },
      activeTextColor: {
        type: "string"
      },
      customActiveTextColor: {
        type: "string"
      },
      hoverBackgroundColor: {
        type: "string"
      },
      customHoverBackgroundColor: {
        type: "string"
      },
      hoverTextColor: {
        type: "string"
      },
      customHoverTextColor: {
        type: "string"
      }
    },
    supports: {
      html: false,
      reusable: false,
      lock: false,
      color: {
        background: true,
        text: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      shadow: true,
      typography: {
        fontSize: true,
        __experimentalFontFamily: true,
        textAlign: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      layout: {
        allowEditing: false
      },
      spacing: {
        padding: true,
        __experimentalDefaultControls: {
          padding: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      }
    },
    editorScript: "file:./index.js",
    editorStyle: "file:./editor.css",
    style: "file:./style-index.css"
  };

  // packages/block-library/build-module/tabs-menu-item/index.mjs
  var { name: name111 } = block_default110;
  var settings110 = {
    icon: tabs_menu_item_default,
    edit: edit_default38,
    save: save54
  };
  var init110 = () => initBlock({ name: name111, metadata: block_default110, settings: settings110 });

  // packages/block-library/build-module/tag-cloud/index.mjs
  var tag_cloud_exports = {};
  __export(tag_cloud_exports, {
    init: () => init111,
    metadata: () => block_default111,
    name: () => name112,
    settings: () => settings111
  });

  // packages/block-library/build-module/tag-cloud/transforms.mjs
  var import_blocks114 = __toESM(require_blocks(), 1);
  var transforms35 = {
    from: [
      {
        type: "block",
        blocks: ["core/categories"],
        transform: () => (0, import_blocks114.createBlock)("core/tag-cloud")
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/categories"],
        transform: () => (0, import_blocks114.createBlock)("core/categories")
      }
    ]
  };
  var transforms_default36 = transforms35;

  // packages/block-library/build-module/tag-cloud/block.json
  var block_default111 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/tag-cloud",
    title: "Tag Cloud",
    category: "widgets",
    description: "A cloud of popular keywords, each sized by how often it appears.",
    textdomain: "default",
    attributes: {
      numberOfTags: {
        type: "number",
        default: 45,
        minimum: 1,
        maximum: 100
      },
      taxonomy: {
        type: "string",
        default: "post_tag"
      },
      showTagCounts: {
        type: "boolean",
        default: false
      },
      smallestFontSize: {
        type: "string",
        default: "8pt"
      },
      largestFontSize: {
        type: "string",
        default: "22pt"
      }
    },
    styles: [
      { name: "default", label: "Default", isDefault: true },
      { name: "outline", label: "Outline" }
    ],
    supports: {
      anchor: true,
      html: false,
      align: true,
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalLetterSpacing: true
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    }
  };

  // packages/block-library/build-module/tag-cloud/edit.mjs
  var import_components161 = __toESM(require_components(), 1);
  var import_data148 = __toESM(require_data(), 1);
  var import_i18n246 = __toESM(require_i18n(), 1);
  var import_block_editor267 = __toESM(require_block_editor(), 1);
  var import_core_data82 = __toESM(require_core_data(), 1);
  var import_server_side_render6 = __toESM(require_server_side_render(), 1);
  var import_compose59 = __toESM(require_compose(), 1);
  var import_jsx_runtime508 = __toESM(require_jsx_runtime(), 1);
  var MIN_TAGS = 1;
  var MAX_TAGS = 100;
  var MIN_FONT_SIZE = 0.1;
  var MAX_FONT_SIZE = 100;
  function TagCloudEdit({ attributes: attributes2, setAttributes, name: name123 }) {
    const {
      taxonomy,
      showTagCounts,
      numberOfTags,
      smallestFontSize,
      largestFontSize
    } = attributes2;
    const [availableUnits] = (0, import_block_editor267.useSettings)("spacing.units");
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const units = (0, import_components161.__experimentalUseCustomUnits)({
      availableUnits: availableUnits ? [...availableUnits, "pt"] : ["%", "px", "em", "rem", "pt"]
    });
    const taxonomies = (0, import_data148.useSelect)(
      (select9) => select9(import_core_data82.store).getTaxonomies({ per_page: -1 }),
      []
    );
    const getTaxonomyOptions = () => {
      const selectOption = {
        label: (0, import_i18n246.__)("- Select -"),
        value: "",
        disabled: true
      };
      const taxonomyOptions = (taxonomies ?? []).filter((tax) => !!tax.show_cloud).map((item) => {
        return {
          value: item.slug,
          label: item.name
        };
      });
      return [selectOption, ...taxonomyOptions];
    };
    const onFontSizeChange = (fontSizeLabel, newValue) => {
      const [quantity, newUnit] = (0, import_components161.__experimentalParseQuantityAndUnitFromRawValue)(newValue);
      if (!Number.isFinite(quantity)) {
        return;
      }
      const updateObj = { [fontSizeLabel]: newValue };
      Object.entries({
        smallestFontSize,
        largestFontSize
      }).forEach(([attribute, currentValue]) => {
        const [currentQuantity, currentUnit] = (0, import_components161.__experimentalParseQuantityAndUnitFromRawValue)(currentValue);
        if (attribute !== fontSizeLabel && currentUnit !== newUnit) {
          updateObj[attribute] = `${currentQuantity}${newUnit}`;
        }
      });
      setAttributes(updateObj);
    };
    const inspectorControls = /* @__PURE__ */ (0, import_jsx_runtime508.jsx)(import_block_editor267.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime508.jsxs)(
      import_components161.__experimentalToolsPanel,
      {
        label: (0, import_i18n246.__)("Settings"),
        resetAll: () => {
          setAttributes({
            taxonomy: "post_tag",
            showTagCounts: false,
            numberOfTags: 45,
            smallestFontSize: "8pt",
            largestFontSize: "22pt"
          });
        },
        dropdownMenuProps,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime508.jsx)(
            import_components161.__experimentalToolsPanelItem,
            {
              hasValue: () => taxonomy !== "post_tag",
              label: (0, import_i18n246.__)("Taxonomy"),
              onDeselect: () => setAttributes({ taxonomy: "post_tag" }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime508.jsx)(
                import_components161.SelectControl,
                {
                  __next40pxDefaultSize: true,
                  label: (0, import_i18n246.__)("Taxonomy"),
                  options: getTaxonomyOptions(),
                  value: taxonomy,
                  onChange: (selectedTaxonomy) => setAttributes({ taxonomy: selectedTaxonomy })
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime508.jsx)(
            import_components161.__experimentalToolsPanelItem,
            {
              hasValue: () => smallestFontSize !== "8pt" || largestFontSize !== "22pt",
              label: (0, import_i18n246.__)("Font size"),
              onDeselect: () => setAttributes({
                smallestFontSize: "8pt",
                largestFontSize: "22pt"
              }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime508.jsxs)(import_components161.Flex, { gap: 4, children: [
                /* @__PURE__ */ (0, import_jsx_runtime508.jsx)(import_components161.FlexItem, { isBlock: true, children: /* @__PURE__ */ (0, import_jsx_runtime508.jsx)(
                  import_components161.__experimentalUnitControl,
                  {
                    label: (0, import_i18n246.__)("Smallest size"),
                    value: smallestFontSize,
                    onChange: (value) => {
                      onFontSizeChange(
                        "smallestFontSize",
                        value
                      );
                    },
                    units,
                    min: MIN_FONT_SIZE,
                    max: MAX_FONT_SIZE,
                    size: "__unstable-large"
                  }
                ) }),
                /* @__PURE__ */ (0, import_jsx_runtime508.jsx)(import_components161.FlexItem, { isBlock: true, children: /* @__PURE__ */ (0, import_jsx_runtime508.jsx)(
                  import_components161.__experimentalUnitControl,
                  {
                    label: (0, import_i18n246.__)("Largest size"),
                    value: largestFontSize,
                    onChange: (value) => {
                      onFontSizeChange(
                        "largestFontSize",
                        value
                      );
                    },
                    units,
                    min: MIN_FONT_SIZE,
                    max: MAX_FONT_SIZE,
                    size: "__unstable-large"
                  }
                ) })
              ] })
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime508.jsx)(
            import_components161.__experimentalToolsPanelItem,
            {
              hasValue: () => numberOfTags !== 45,
              label: (0, import_i18n246.__)("Number of tags"),
              onDeselect: () => setAttributes({ numberOfTags: 45 }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime508.jsx)(
                import_components161.RangeControl,
                {
                  __next40pxDefaultSize: true,
                  label: (0, import_i18n246.__)("Number of tags"),
                  value: numberOfTags,
                  onChange: (value) => setAttributes({ numberOfTags: value }),
                  min: MIN_TAGS,
                  max: MAX_TAGS,
                  required: true
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime508.jsx)(
            import_components161.__experimentalToolsPanelItem,
            {
              hasValue: () => showTagCounts !== false,
              label: (0, import_i18n246.__)("Show tag counts"),
              onDeselect: () => setAttributes({ showTagCounts: false }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime508.jsx)(
                import_components161.ToggleControl,
                {
                  label: (0, import_i18n246.__)("Show tag counts"),
                  checked: showTagCounts,
                  onChange: () => setAttributes({ showTagCounts: !showTagCounts })
                }
              )
            }
          )
        ]
      }
    ) });
    const { content, status, error } = (0, import_server_side_render6.useServerSideRender)({
      attributes: attributes2,
      skipBlockSupportAttributes: true,
      block: name123
    });
    const disabledRef = (0, import_compose59.useDisabled)();
    const blockProps = (0, import_block_editor267.useBlockProps)({ ref: disabledRef });
    return /* @__PURE__ */ (0, import_jsx_runtime508.jsxs)(import_jsx_runtime508.Fragment, { children: [
      inspectorControls,
      status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime508.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime508.jsx)(import_components161.Spinner, {}) }),
      status === "error" && /* @__PURE__ */ (0, import_jsx_runtime508.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime508.jsx)("p", { children: (0, import_i18n246.sprintf)(
        /* translators: %s: error message returned when rendering the block. */
        (0, import_i18n246.__)("Error: %s"),
        error
      ) }) }),
      status === "success" && /* @__PURE__ */ (0, import_jsx_runtime508.jsx)(html_renderer_default, { wrapperProps: blockProps, html: content })
    ] });
  }
  var edit_default39 = TagCloudEdit;

  // packages/block-library/build-module/tag-cloud/index.mjs
  var { name: name112 } = block_default111;
  var settings111 = {
    icon: tag_default,
    example: {},
    edit: edit_default39,
    transforms: transforms_default36
  };
  var init111 = () => initBlock({ name: name112, metadata: block_default111, settings: settings111 });

  // packages/block-library/build-module/template-part/index.mjs
  var template_part_exports = {};
  __export(template_part_exports, {
    init: () => init112,
    metadata: () => block_default112,
    name: () => name113,
    settings: () => settings112
  });
  var import_core_data90 = __toESM(require_core_data(), 1);
  var import_data157 = __toESM(require_data(), 1);
  var import_hooks82 = __toESM(require_hooks(), 1);
  var import_html_entities14 = __toESM(require_html_entities(), 1);

  // packages/block-library/build-module/template-part/block.json
  var block_default112 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/template-part",
    title: "Template Part",
    category: "theme",
    description: "Edit the different global regions of your site, like the header, footer, sidebar, or create your own.",
    textdomain: "default",
    attributes: {
      slug: {
        type: "string"
      },
      theme: {
        type: "string"
      },
      tagName: {
        type: "string"
      },
      area: {
        type: "string"
      }
    },
    supports: {
      align: true,
      html: false,
      reusable: false,
      renaming: false,
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-template-part-editor"
  };

  // packages/block-library/build-module/template-part/edit/index.mjs
  var import_blocks119 = __toESM(require_blocks(), 1);
  var import_data155 = __toESM(require_data(), 1);
  var import_block_editor272 = __toESM(require_block_editor(), 1);
  var import_components167 = __toESM(require_components(), 1);
  var import_i18n253 = __toESM(require_i18n(), 1);
  var import_core_data88 = __toESM(require_core_data(), 1);
  var import_element136 = __toESM(require_element(), 1);
  var import_notices21 = __toESM(require_notices(), 1);

  // packages/block-library/build-module/template-part/edit/placeholder.mjs
  var import_i18n249 = __toESM(require_i18n(), 1);
  var import_components163 = __toESM(require_components(), 1);
  var import_element132 = __toESM(require_element(), 1);
  var import_data150 = __toESM(require_data(), 1);
  var import_core_data84 = __toESM(require_core_data(), 1);

  // packages/block-library/build-module/template-part/edit/utils/hooks.mjs
  var import_data149 = __toESM(require_data(), 1);
  var import_core_data83 = __toESM(require_core_data(), 1);
  var import_block_editor268 = __toESM(require_block_editor(), 1);
  var import_element130 = __toESM(require_element(), 1);
  var import_blocks115 = __toESM(require_blocks(), 1);
  var import_i18n247 = __toESM(require_i18n(), 1);
  function useAlternativeTemplateParts(area, excludedId) {
    const { templateParts, isResolving } = (0, import_data149.useSelect)((select9) => {
      const { getEntityRecords, isResolving: _isResolving } = select9(import_core_data83.store);
      const query = { per_page: -1 };
      return {
        templateParts: getEntityRecords(
          "postType",
          "wp_template_part",
          query
        ),
        isResolving: _isResolving("getEntityRecords", [
          "postType",
          "wp_template_part",
          query
        ])
      };
    }, []);
    const filteredTemplateParts = (0, import_element130.useMemo)(() => {
      if (!templateParts) {
        return [];
      }
      return templateParts.filter(
        (templatePart) => createTemplatePartId(
          templatePart.theme,
          templatePart.slug
        ) !== excludedId && (!area || "uncategorized" === area || templatePart.area === area)
      ) || [];
    }, [templateParts, area, excludedId]);
    return {
      templateParts: filteredTemplateParts,
      isResolving
    };
  }
  function useAlternativeBlockPatterns(area, clientId) {
    return (0, import_data149.useSelect)(
      (select9) => {
        const blockNameWithArea = area ? `core/template-part/${area}` : "core/template-part";
        const { getBlockRootClientId, getPatternsByBlockTypes } = select9(import_block_editor268.store);
        const rootClientId = getBlockRootClientId(clientId);
        return getPatternsByBlockTypes(blockNameWithArea, rootClientId);
      },
      [area, clientId]
    );
  }
  function useCreateTemplatePartFromBlocks(area, setAttributes) {
    const { saveEntityRecord } = (0, import_data149.useDispatch)(import_core_data83.store);
    return async (blocks = [], title = (0, import_i18n247.__)("Untitled Template Part")) => {
      const cleanSlug = paramCase(title).replace(/[^\w-]+/g, "") || "wp-custom-part";
      const record = {
        title,
        slug: cleanSlug,
        content: (0, import_blocks115.serialize)(blocks),
        // `area` is filterable on the server and defaults to `UNCATEGORIZED`
        // if provided value is not allowed.
        area
      };
      const templatePart = await saveEntityRecord(
        "postType",
        "wp_template_part",
        record
      );
      setAttributes({
        slug: templatePart.slug,
        theme: templatePart.theme,
        area: void 0
      });
    };
  }
  function useTemplatePartArea(area) {
    return (0, import_data149.useSelect)(
      (select9) => {
        const definedAreas = select9(import_core_data83.store).getCurrentTheme()?.default_template_part_areas || [];
        const selectedArea = definedAreas.find(
          (definedArea) => definedArea.area === area
        );
        const defaultArea = definedAreas.find(
          (definedArea) => definedArea.area === "uncategorized"
        );
        return {
          icon: selectedArea?.icon || defaultArea?.icon,
          label: selectedArea?.label || (0, import_i18n247.__)("Template Part"),
          tagName: selectedArea?.area_tag ?? "div"
        };
      },
      [area]
    );
  }

  // packages/block-library/build-module/template-part/edit/title-modal.mjs
  var import_element131 = __toESM(require_element(), 1);
  var import_i18n248 = __toESM(require_i18n(), 1);
  var import_components162 = __toESM(require_components(), 1);
  var import_jsx_runtime509 = __toESM(require_jsx_runtime(), 1);
  function TitleModal({ areaLabel, onClose, onSubmit }) {
    const [title, setTitle] = (0, import_element131.useState)("");
    const submitForCreation = (event) => {
      event.preventDefault();
      onSubmit(title);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime509.jsx)(
      import_components162.Modal,
      {
        title: (0, import_i18n248.sprintf)(
          // Translators: %s as template part area title ("Header", "Footer", etc.).
          (0, import_i18n248.__)("Create new %s"),
          areaLabel.toLowerCase()
        ),
        onRequestClose: onClose,
        focusOnMount: "firstContentElement",
        size: "small",
        children: /* @__PURE__ */ (0, import_jsx_runtime509.jsx)("form", { onSubmit: submitForCreation, children: /* @__PURE__ */ (0, import_jsx_runtime509.jsxs)(import_components162.__experimentalVStack, { spacing: "5", children: [
          /* @__PURE__ */ (0, import_jsx_runtime509.jsx)(
            import_components162.TextControl,
            {
              label: (0, import_i18n248.__)("Name"),
              value: title,
              onChange: setTitle,
              placeholder: (0, import_i18n248.__)("Custom Template Part"),
              __next40pxDefaultSize: true
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime509.jsxs)(import_components162.__experimentalHStack, { justify: "right", children: [
            /* @__PURE__ */ (0, import_jsx_runtime509.jsx)(
              import_components162.Button,
              {
                __next40pxDefaultSize: true,
                variant: "tertiary",
                onClick: () => {
                  onClose();
                  setTitle("");
                },
                children: (0, import_i18n248.__)("Cancel")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime509.jsx)(
              import_components162.Button,
              {
                variant: "primary",
                type: "submit",
                accessibleWhenDisabled: true,
                disabled: !title.length,
                __next40pxDefaultSize: true,
                children: (0, import_i18n248.__)("Create")
              }
            )
          ] })
        ] }) })
      }
    );
  }

  // packages/block-library/build-module/template-part/edit/placeholder.mjs
  var import_jsx_runtime510 = __toESM(require_jsx_runtime(), 1);
  function TemplatePartPlaceholder({
    area,
    clientId,
    templatePartId,
    onOpenSelectionModal,
    setAttributes
  }) {
    const { templateParts, isResolving } = useAlternativeTemplateParts(
      area,
      templatePartId
    );
    const blockPatterns = useAlternativeBlockPatterns(area, clientId);
    const { isBlockBasedTheme, canCreateTemplatePart } = (0, import_data150.useSelect)(
      (select9) => {
        const { getCurrentTheme, canUser } = select9(import_core_data84.store);
        return {
          isBlockBasedTheme: getCurrentTheme()?.is_block_theme,
          canCreateTemplatePart: canUser("create", {
            kind: "postType",
            name: "wp_template_part"
          })
        };
      },
      []
    );
    const [showTitleModal, setShowTitleModal] = (0, import_element132.useState)(false);
    const areaObject = useTemplatePartArea(area);
    const createFromBlocks = useCreateTemplatePartFromBlocks(
      area,
      setAttributes
    );
    return /* @__PURE__ */ (0, import_jsx_runtime510.jsxs)(
      import_components163.Placeholder,
      {
        icon: getTemplatePartIcon(areaObject.icon),
        label: areaObject.label,
        instructions: isBlockBasedTheme ? (0, import_i18n249.sprintf)(
          // Translators: %s as template part area title ("Header", "Footer", etc.).
          (0, import_i18n249.__)("Choose an existing %s or create a new one."),
          areaObject.label.toLowerCase()
        ) : (0, import_i18n249.sprintf)(
          // Translators: %s as template part area title ("Header", "Footer", etc.).
          (0, import_i18n249.__)("Choose an existing %s."),
          areaObject.label.toLowerCase()
        ),
        children: [
          isResolving && /* @__PURE__ */ (0, import_jsx_runtime510.jsx)(import_components163.Spinner, {}),
          !isResolving && !!(templateParts.length || blockPatterns.length) && /* @__PURE__ */ (0, import_jsx_runtime510.jsx)(
            import_components163.Button,
            {
              __next40pxDefaultSize: true,
              variant: "primary",
              onClick: onOpenSelectionModal,
              children: (0, import_i18n249.__)("Choose")
            }
          ),
          !isResolving && isBlockBasedTheme && canCreateTemplatePart && /* @__PURE__ */ (0, import_jsx_runtime510.jsx)(
            import_components163.Button,
            {
              __next40pxDefaultSize: true,
              variant: "secondary",
              onClick: () => {
                setShowTitleModal(true);
              },
              children: (0, import_i18n249.__)("Start blank")
            }
          ),
          showTitleModal && /* @__PURE__ */ (0, import_jsx_runtime510.jsx)(
            TitleModal,
            {
              areaLabel: areaObject.label,
              onClose: () => setShowTitleModal(false),
              onSubmit: (title) => {
                createFromBlocks([], title);
              }
            }
          )
        ]
      }
    );
  }

  // packages/block-library/build-module/template-part/edit/selection-modal.mjs
  var import_element133 = __toESM(require_element(), 1);
  var import_i18n250 = __toESM(require_i18n(), 1);
  var import_notices19 = __toESM(require_notices(), 1);
  var import_data151 = __toESM(require_data(), 1);
  var import_block_editor269 = __toESM(require_block_editor(), 1);
  var import_components164 = __toESM(require_components(), 1);

  // packages/block-library/build-module/template-part/edit/utils/map-template-part-to-block-pattern.mjs
  var import_blocks116 = __toESM(require_blocks(), 1);
  function mapTemplatePartToBlockPattern(templatePart) {
    return {
      name: createTemplatePartId(templatePart.theme, templatePart.slug),
      title: templatePart.title.rendered,
      blocks: (0, import_blocks116.parse)(templatePart.content.raw),
      templatePart
    };
  }

  // packages/block-library/build-module/template-part/edit/selection-modal.mjs
  var import_jsx_runtime511 = __toESM(require_jsx_runtime(), 1);
  function TemplatePartSelectionModal({
    setAttributes,
    onClose,
    templatePartId = null,
    area,
    clientId
  }) {
    const [searchValue, setSearchValue] = (0, import_element133.useState)("");
    const { templateParts } = useAlternativeTemplateParts(
      area,
      templatePartId
    );
    const filteredTemplateParts = (0, import_element133.useMemo)(() => {
      const partsAsPatterns = templateParts.map(
        (templatePart) => mapTemplatePartToBlockPattern(templatePart)
      );
      return searchPatterns(partsAsPatterns, searchValue);
    }, [templateParts, searchValue]);
    const blockPatterns = useAlternativeBlockPatterns(area, clientId);
    const filteredBlockPatterns = (0, import_element133.useMemo)(() => {
      return searchPatterns(blockPatterns, searchValue);
    }, [blockPatterns, searchValue]);
    const { createSuccessNotice } = (0, import_data151.useDispatch)(import_notices19.store);
    const onTemplatePartSelect = (templatePart) => {
      setAttributes({
        slug: templatePart.slug,
        theme: templatePart.theme,
        area: void 0
      });
      createSuccessNotice(
        (0, import_i18n250.sprintf)(
          /* translators: %s: template part title. */
          (0, import_i18n250.__)('Template Part "%s" inserted.'),
          templatePart.title?.rendered || templatePart.slug
        ),
        {
          type: "snackbar"
        }
      );
      onClose();
    };
    const hasTemplateParts = !!filteredTemplateParts.length;
    const hasBlockPatterns = !!filteredBlockPatterns.length;
    return /* @__PURE__ */ (0, import_jsx_runtime511.jsxs)("div", { className: "block-library-template-part__selection-content", children: [
      /* @__PURE__ */ (0, import_jsx_runtime511.jsx)("div", { className: "block-library-template-part__selection-search", children: /* @__PURE__ */ (0, import_jsx_runtime511.jsx)(
        import_components164.SearchControl,
        {
          onChange: setSearchValue,
          value: searchValue,
          label: (0, import_i18n250.__)("Search"),
          placeholder: (0, import_i18n250.__)("Search")
        }
      ) }),
      hasTemplateParts && /* @__PURE__ */ (0, import_jsx_runtime511.jsxs)("div", { children: [
        /* @__PURE__ */ (0, import_jsx_runtime511.jsx)("h2", { children: (0, import_i18n250.__)("Existing template parts") }),
        /* @__PURE__ */ (0, import_jsx_runtime511.jsx)(
          import_block_editor269.__experimentalBlockPatternsList,
          {
            blockPatterns: filteredTemplateParts,
            onClickPattern: (pattern) => {
              onTemplatePartSelect(pattern.templatePart);
            }
          }
        )
      ] }),
      !hasTemplateParts && !hasBlockPatterns && /* @__PURE__ */ (0, import_jsx_runtime511.jsx)(import_components164.__experimentalHStack, { alignment: "center", children: /* @__PURE__ */ (0, import_jsx_runtime511.jsx)("p", { children: (0, import_i18n250.__)("No results found.") }) })
    ] });
  }

  // packages/block-library/build-module/template-part/edit/advanced-controls.mjs
  var import_core_data86 = __toESM(require_core_data(), 1);
  var import_components166 = __toESM(require_components(), 1);
  var import_i18n252 = __toESM(require_i18n(), 1);
  var import_data153 = __toESM(require_data(), 1);
  var import_block_editor270 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/template-part/edit/import-controls.mjs
  var import_i18n251 = __toESM(require_i18n(), 1);
  var import_element134 = __toESM(require_element(), 1);
  var import_data152 = __toESM(require_data(), 1);
  var import_components165 = __toESM(require_components(), 1);
  var import_core_data85 = __toESM(require_core_data(), 1);
  var import_notices20 = __toESM(require_notices(), 1);

  // packages/block-library/build-module/template-part/edit/utils/transformers.mjs
  var import_blocks117 = __toESM(require_blocks(), 1);
  function transformWidgetToBlock(widget) {
    if (widget.id_base !== "block") {
      let attributes2;
      if (widget._embedded.about[0].is_multi) {
        attributes2 = {
          idBase: widget.id_base,
          instance: widget.instance
        };
      } else {
        attributes2 = {
          id: widget.id
        };
      }
      return switchLegacyWidgetType(
        (0, import_blocks117.createBlock)("core/legacy-widget", attributes2)
      );
    }
    const parsedBlocks = (0, import_blocks117.parse)(widget.instance.raw.content, {
      __unstableSkipAutop: true
    });
    if (!parsedBlocks.length) {
      return void 0;
    }
    const block = parsedBlocks[0];
    if (block.name === "core/widget-group") {
      return (0, import_blocks117.createBlock)(
        (0, import_blocks117.getGroupingBlockName)(),
        void 0,
        transformInnerBlocks(block.innerBlocks)
      );
    }
    if (block.innerBlocks.length > 0) {
      return (0, import_blocks117.cloneBlock)(
        block,
        void 0,
        transformInnerBlocks(block.innerBlocks)
      );
    }
    return block;
  }
  function switchLegacyWidgetType(block) {
    const transforms39 = (0, import_blocks117.getPossibleBlockTransformations)([block]).filter(
      (item) => {
        if (!item.transforms) {
          return true;
        }
        const hasWildCardFrom = item.transforms?.from?.find(
          (from) => from.blocks && from.blocks.includes("*")
        );
        const hasWildCardTo = item.transforms?.to?.find(
          (to) => to.blocks && to.blocks.includes("*")
        );
        return !hasWildCardFrom && !hasWildCardTo;
      }
    );
    if (!transforms39.length) {
      return void 0;
    }
    return (0, import_blocks117.switchToBlockType)(block, transforms39[0].name);
  }
  function transformInnerBlocks(innerBlocks = []) {
    return innerBlocks.flatMap((block) => {
      if (block.name === "core/legacy-widget") {
        return switchLegacyWidgetType(block);
      }
      return (0, import_blocks117.createBlock)(
        block.name,
        block.attributes,
        transformInnerBlocks(block.innerBlocks)
      );
    }).filter((block) => !!block);
  }

  // packages/block-library/build-module/template-part/edit/import-controls.mjs
  var import_jsx_runtime512 = __toESM(require_jsx_runtime(), 1);
  var SIDEBARS_QUERY = {
    per_page: -1,
    _fields: "id,name,description,status,widgets"
  };
  function TemplatePartImportControls({ area, setAttributes }) {
    const [selectedSidebar, setSelectedSidebar] = (0, import_element134.useState)("");
    const [isBusy, setIsBusy] = (0, import_element134.useState)(false);
    const registry = (0, import_data152.useRegistry)();
    const { sidebars, hasResolved } = (0, import_data152.useSelect)((select9) => {
      const { getSidebars, hasFinishedResolution } = select9(import_core_data85.store);
      return {
        sidebars: getSidebars(SIDEBARS_QUERY),
        hasResolved: hasFinishedResolution("getSidebars", [
          SIDEBARS_QUERY
        ])
      };
    }, []);
    const { createErrorNotice } = (0, import_data152.useDispatch)(import_notices20.store);
    const createFromBlocks = useCreateTemplatePartFromBlocks(
      area,
      setAttributes
    );
    const options2 = (0, import_element134.useMemo)(() => {
      const sidebarOptions = (sidebars ?? []).filter(
        (widgetArea) => widgetArea.id !== "wp_inactive_widgets" && widgetArea.widgets.length > 0
      ).map((widgetArea) => {
        return {
          value: widgetArea.id,
          label: widgetArea.name
        };
      });
      if (!sidebarOptions.length) {
        return [];
      }
      return [
        { value: "", label: (0, import_i18n251.__)("Select widget area") },
        ...sidebarOptions
      ];
    }, [sidebars]);
    if (!hasResolved) {
      return /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(import_components165.__experimentalSpacer, { marginBottom: "0" });
    }
    if (hasResolved && !options2.length) {
      return null;
    }
    async function createFromWidgets(event) {
      event.preventDefault();
      if (isBusy || !selectedSidebar) {
        return;
      }
      setIsBusy(true);
      const sidebar = options2.find(
        ({ value }) => value === selectedSidebar
      );
      const { getWidgets } = registry.resolveSelect(import_core_data85.store);
      const widgets = await getWidgets({
        sidebar: sidebar.value,
        _embed: "about"
      });
      const skippedWidgets = /* @__PURE__ */ new Set();
      const blocks = widgets.flatMap((widget) => {
        const block = transformWidgetToBlock(widget);
        if (!block) {
          skippedWidgets.add(widget.id_base);
          return [];
        }
        return block;
      });
      await createFromBlocks(
        blocks,
        /* translators: %s: name of the widget area */
        (0, import_i18n251.sprintf)((0, import_i18n251.__)("Widget area: %s"), sidebar.label)
      );
      if (skippedWidgets.size) {
        createErrorNotice(
          (0, import_i18n251.sprintf)(
            /* translators: %s: the list of widgets */
            (0, import_i18n251.__)("Unable to import the following widgets: %s."),
            Array.from(skippedWidgets).join(", ")
          ),
          {
            type: "snackbar"
          }
        );
      }
      setIsBusy(false);
    }
    return /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(import_components165.__experimentalSpacer, { marginBottom: "4", children: /* @__PURE__ */ (0, import_jsx_runtime512.jsxs)(import_components165.__experimentalHStack, { as: "form", onSubmit: createFromWidgets, children: [
      /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(import_components165.FlexBlock, { children: /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(
        import_components165.SelectControl,
        {
          label: (0, import_i18n251.__)("Import widget area"),
          value: selectedSidebar,
          options: options2,
          onChange: (value) => setSelectedSidebar(value),
          disabled: !options2.length,
          __next40pxDefaultSize: true
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(
        import_components165.FlexItem,
        {
          style: {
            marginBottom: "8px",
            marginTop: "auto"
          },
          children: /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(
            import_components165.Button,
            {
              __next40pxDefaultSize: true,
              variant: "primary",
              type: "submit",
              isBusy,
              "aria-disabled": isBusy || !selectedSidebar,
              children: (0, import_i18n251._x)("Import", "button label")
            }
          )
        }
      )
    ] }) });
  }

  // packages/block-library/build-module/template-part/edit/advanced-controls.mjs
  var import_jsx_runtime513 = __toESM(require_jsx_runtime(), 1);
  var { HTMLElementControl: HTMLElementControl7 } = unlock(import_block_editor270.privateApis);
  function TemplatePartAdvancedControls({
    tagName,
    setAttributes,
    isEntityAvailable,
    templatePartId,
    defaultWrapper,
    hasInnerBlocks,
    clientId
  }) {
    const [area, setArea] = (0, import_core_data86.useEntityProp)(
      "postType",
      "wp_template_part",
      "area",
      templatePartId
    );
    const [title, setTitle] = (0, import_core_data86.useEntityProp)(
      "postType",
      "wp_template_part",
      "title",
      templatePartId
    );
    const defaultTemplatePartAreas = (0, import_data153.useSelect)(
      (select9) => select9(import_core_data86.store).getCurrentTheme()?.default_template_part_areas || [],
      []
    );
    const areaOptions = defaultTemplatePartAreas.map(
      ({ label, area: _area }) => ({
        label,
        value: _area
      })
    );
    return /* @__PURE__ */ (0, import_jsx_runtime513.jsxs)(import_jsx_runtime513.Fragment, { children: [
      isEntityAvailable && /* @__PURE__ */ (0, import_jsx_runtime513.jsxs)(import_jsx_runtime513.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime513.jsx)(
          import_components166.TextControl,
          {
            __next40pxDefaultSize: true,
            label: (0, import_i18n252.__)("Title"),
            value: title,
            onChange: (value) => {
              setTitle(value);
            },
            onFocus: (event) => event.target.select()
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime513.jsx)(
          import_components166.SelectControl,
          {
            __next40pxDefaultSize: true,
            label: (0, import_i18n252.__)("Area"),
            labelPosition: "top",
            options: areaOptions,
            value: area,
            onChange: setArea
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime513.jsx)(
        HTMLElementControl7,
        {
          tagName: tagName || "",
          onChange: (value) => setAttributes({ tagName: value }),
          clientId,
          options: [
            {
              label: (0, import_i18n252.sprintf)(
                /* translators: %s: HTML tag based on area. */
                (0, import_i18n252.__)("Default based on area (%s)"),
                `<${defaultWrapper}>`
              ),
              value: ""
            },
            { label: "<header>", value: "header" },
            { label: "<main>", value: "main" },
            { label: "<section>", value: "section" },
            { label: "<article>", value: "article" },
            { label: "<aside>", value: "aside" },
            { label: "<footer>", value: "footer" },
            { label: "<div>", value: "div" }
          ]
        }
      ),
      !hasInnerBlocks && /* @__PURE__ */ (0, import_jsx_runtime513.jsx)(
        TemplatePartImportControls,
        {
          area,
          setAttributes
        }
      )
    ] });
  }

  // packages/block-library/build-module/template-part/edit/inner-blocks.mjs
  var import_core_data87 = __toESM(require_core_data(), 1);
  var import_block_editor271 = __toESM(require_block_editor(), 1);
  var import_data154 = __toESM(require_data(), 1);
  var import_element135 = __toESM(require_element(), 1);
  var import_blocks118 = __toESM(require_blocks(), 1);
  var import_jsx_runtime514 = __toESM(require_jsx_runtime(), 1);
  function useRenderAppender(hasInnerBlocks) {
    const blockEditingMode = (0, import_block_editor271.useBlockEditingMode)();
    if (blockEditingMode === "contentOnly") {
      return false;
    }
    if (!hasInnerBlocks) {
      return import_block_editor271.InnerBlocks.ButtonBlockAppender;
    }
  }
  function useLayout(layout) {
    const themeSupportsLayout = (0, import_data154.useSelect)((select9) => {
      const { getSettings: getSettings2 } = select9(import_block_editor271.store);
      return getSettings2()?.supportsLayout;
    }, []);
    const [defaultLayout] = (0, import_block_editor271.useSettings)("layout");
    if (themeSupportsLayout) {
      return layout?.inherit ? defaultLayout || {} : layout;
    }
  }
  function NonEditableTemplatePartPreview({
    postId: id,
    layout,
    tagName: TagName2,
    blockProps
  }) {
    (0, import_block_editor271.useBlockEditingMode)("disabled");
    const { content, editedBlocks } = (0, import_data154.useSelect)(
      (select9) => {
        if (!id) {
          return {};
        }
        const { getEditedEntityRecord } = select9(import_core_data87.store);
        const editedRecord = getEditedEntityRecord(
          "postType",
          "wp_template_part",
          id,
          { context: "view" }
        );
        return {
          editedBlocks: editedRecord.blocks,
          content: editedRecord.content
        };
      },
      [id]
    );
    const blocks = (0, import_element135.useMemo)(() => {
      if (!id) {
        return void 0;
      }
      if (editedBlocks) {
        return editedBlocks;
      }
      if (!content || typeof content !== "string") {
        return [];
      }
      return (0, import_blocks118.parse)(content);
    }, [id, editedBlocks, content]);
    const innerBlocksProps = (0, import_block_editor271.useInnerBlocksProps)(blockProps, {
      value: blocks,
      onInput: () => {
      },
      onChange: () => {
      },
      renderAppender: false,
      layout: useLayout(layout)
    });
    return /* @__PURE__ */ (0, import_jsx_runtime514.jsx)(TagName2, { ...innerBlocksProps });
  }
  function EditableTemplatePartInnerBlocks({
    postId: id,
    hasInnerBlocks,
    layout,
    tagName: TagName2,
    blockProps
  }) {
    const onNavigateToEntityRecord = (0, import_data154.useSelect)(
      (select9) => select9(import_block_editor271.store).getSettings().onNavigateToEntityRecord,
      []
    );
    const [blocks, onInput, onChange] = (0, import_core_data87.useEntityBlockEditor)(
      "postType",
      "wp_template_part",
      { id }
    );
    const innerBlocksProps = (0, import_block_editor271.useInnerBlocksProps)(blockProps, {
      value: blocks,
      onInput,
      onChange,
      renderAppender: useRenderAppender(hasInnerBlocks),
      layout: useLayout(layout)
    });
    const blockEditingMode = (0, import_block_editor271.useBlockEditingMode)();
    const customProps = blockEditingMode === "contentOnly" && onNavigateToEntityRecord ? {
      onDoubleClick: () => onNavigateToEntityRecord({
        postId: id,
        postType: "wp_template_part"
      })
    } : {};
    return /* @__PURE__ */ (0, import_jsx_runtime514.jsx)(TagName2, { ...innerBlocksProps, ...customProps });
  }
  function TemplatePartInnerBlocks({
    postId: id,
    hasInnerBlocks,
    layout,
    tagName: TagName2,
    blockProps
  }) {
    const { canViewTemplatePart, canEditTemplatePart } = (0, import_data154.useSelect)(
      (select9) => {
        return {
          canViewTemplatePart: !!select9(import_core_data87.store).canUser("read", {
            kind: "postType",
            name: "wp_template_part",
            id
          }),
          canEditTemplatePart: !!select9(import_core_data87.store).canUser("update", {
            kind: "postType",
            name: "wp_template_part",
            id
          })
        };
      },
      [id]
    );
    if (!canViewTemplatePart) {
      return null;
    }
    const TemplatePartInnerBlocksComponent = canEditTemplatePart ? EditableTemplatePartInnerBlocks : NonEditableTemplatePartPreview;
    return /* @__PURE__ */ (0, import_jsx_runtime514.jsx)(
      TemplatePartInnerBlocksComponent,
      {
        postId: id,
        hasInnerBlocks,
        layout,
        tagName: TagName2,
        blockProps
      }
    );
  }

  // packages/block-library/build-module/template-part/edit/index.mjs
  var import_jsx_runtime515 = __toESM(require_jsx_runtime(), 1);
  var SUPPORTED_AREAS = ["header", "footer", "navigation-overlay"];
  function ReplaceButton({
    isEntityAvailable,
    area,
    templatePartId,
    isTemplatePartSelectionOpen,
    setIsTemplatePartSelectionOpen
  }) {
    const { templateParts } = useAlternativeTemplateParts(
      area,
      templatePartId
    );
    const hasReplacements = !!templateParts.length;
    const canReplace = isEntityAvailable && hasReplacements && SUPPORTED_AREAS.includes(area);
    if (!canReplace) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime515.jsx)(
      import_components167.MenuItem,
      {
        onClick: () => {
          setIsTemplatePartSelectionOpen(true);
        },
        "aria-expanded": isTemplatePartSelectionOpen,
        "aria-haspopup": "dialog",
        children: (0, import_i18n253.__)("Replace")
      }
    );
  }
  function TemplatesList({ area, clientId, isEntityAvailable, onSelect }) {
    const blockPatterns = useAlternativeBlockPatterns(area, clientId);
    const canReplace = isEntityAvailable && !!blockPatterns.length && SUPPORTED_AREAS.includes(area);
    if (!canReplace) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime515.jsx)(import_components167.PanelBody, { title: (0, import_i18n253.__)("Design"), children: /* @__PURE__ */ (0, import_jsx_runtime515.jsx)(
      import_block_editor272.__experimentalBlockPatternsList,
      {
        label: (0, import_i18n253.__)("Templates"),
        blockPatterns,
        onClickPattern: onSelect,
        showTitlesAsTooltip: true
      }
    ) });
  }
  function TemplatePartEdit({
    attributes: attributes2,
    setAttributes,
    clientId
  }) {
    const { createSuccessNotice } = (0, import_data155.useDispatch)(import_notices21.store);
    const { editEntityRecord } = (0, import_data155.useDispatch)(import_core_data88.store);
    const currentTheme = (0, import_data155.useSelect)(
      (select9) => select9(import_core_data88.store).getCurrentTheme()?.stylesheet,
      []
    );
    const { slug, theme = currentTheme, tagName, layout = {} } = attributes2;
    const templatePartId = createTemplatePartId(theme, slug);
    const hasAlreadyRendered = (0, import_block_editor272.useHasRecursion)(templatePartId);
    const [isTemplatePartSelectionOpen, setIsTemplatePartSelectionOpen] = (0, import_element136.useState)(false);
    const {
      isResolved,
      hasInnerBlocks,
      isMissing,
      area,
      onNavigateToEntityRecord,
      title,
      canUserEdit
    } = (0, import_data155.useSelect)(
      (select9) => {
        const { getEditedEntityRecord, hasFinishedResolution } = select9(import_core_data88.store);
        const { getBlockCount, getSettings: getSettings2 } = select9(import_block_editor272.store);
        const getEntityArgs = [
          "postType",
          "wp_template_part",
          templatePartId
        ];
        const entityRecord = templatePartId ? getEditedEntityRecord(...getEntityArgs) : null;
        const _area = entityRecord?.area || attributes2.area;
        const hasResolvedEntity = templatePartId ? hasFinishedResolution(
          "getEditedEntityRecord",
          getEntityArgs
        ) : false;
        const _canUserEdit = hasResolvedEntity ? select9(import_core_data88.store).canUser("update", {
          kind: "postType",
          name: "wp_template_part",
          id: templatePartId
        }) : false;
        return {
          hasInnerBlocks: getBlockCount(clientId) > 0,
          isResolved: hasResolvedEntity,
          isMissing: hasResolvedEntity && (!entityRecord || Object.keys(entityRecord).length === 0),
          area: _area,
          onNavigateToEntityRecord: getSettings2().onNavigateToEntityRecord,
          title: entityRecord?.title,
          canUserEdit: !!_canUserEdit
        };
      },
      [templatePartId, attributes2.area, clientId]
    );
    const areaObject = useTemplatePartArea(area);
    const blockProps = (0, import_block_editor272.useBlockProps)();
    const isPlaceholder = !slug;
    const isEntityAvailable = !isPlaceholder && !isMissing && isResolved;
    const TagName2 = tagName || areaObject.tagName;
    const onPatternSelect = async (pattern) => {
      await editEntityRecord(
        "postType",
        "wp_template_part",
        templatePartId,
        {
          blocks: pattern.blocks,
          content: (0, import_blocks119.serialize)(pattern.blocks)
        }
      );
      createSuccessNotice(
        (0, import_i18n253.sprintf)(
          /* translators: %s: template part title. */
          (0, import_i18n253.__)('Template Part "%s" updated.'),
          title || slug
        ),
        {
          type: "snackbar"
        }
      );
    };
    if (!hasInnerBlocks && (slug && !theme || slug && isMissing)) {
      return /* @__PURE__ */ (0, import_jsx_runtime515.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime515.jsx)(import_block_editor272.Warning, { children: (0, import_i18n253.sprintf)(
        /* translators: %s: Template part slug. */
        (0, import_i18n253.__)(
          "Template part has been deleted or is unavailable: %s"
        ),
        slug
      ) }) });
    }
    if (isEntityAvailable && hasAlreadyRendered) {
      return /* @__PURE__ */ (0, import_jsx_runtime515.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime515.jsx)(import_block_editor272.Warning, { children: (0, import_i18n253.__)("Block cannot be rendered inside itself.") }) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime515.jsxs)(import_jsx_runtime515.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime515.jsxs)(import_block_editor272.RecursionProvider, { uniqueId: templatePartId, children: [
        isEntityAvailable && onNavigateToEntityRecord && canUserEdit && /* @__PURE__ */ (0, import_jsx_runtime515.jsx)(import_block_editor272.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime515.jsx)(
          import_components167.ToolbarButton,
          {
            onClick: () => {
              onNavigateToEntityRecord({
                postId: templatePartId,
                postType: "wp_template_part"
              });
            },
            children: (0, import_i18n253.__)("Edit original")
          }
        ) }),
        canUserEdit && /* @__PURE__ */ (0, import_jsx_runtime515.jsx)(import_block_editor272.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime515.jsx)(
          TemplatePartAdvancedControls,
          {
            tagName,
            setAttributes,
            isEntityAvailable,
            templatePartId,
            defaultWrapper: areaObject.tagName,
            hasInnerBlocks,
            clientId
          }
        ) }),
        isPlaceholder && /* @__PURE__ */ (0, import_jsx_runtime515.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime515.jsx)(
          TemplatePartPlaceholder,
          {
            area: attributes2.area,
            templatePartId,
            clientId,
            setAttributes,
            onOpenSelectionModal: () => setIsTemplatePartSelectionOpen(true)
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime515.jsx)(import_block_editor272.BlockSettingsMenuControls, { children: ({ selectedClientIds }) => {
          if (!(selectedClientIds.length === 1 && clientId === selectedClientIds[0])) {
            return null;
          }
          return /* @__PURE__ */ (0, import_jsx_runtime515.jsx)(
            ReplaceButton,
            {
              ...{
                isEntityAvailable,
                area,
                clientId,
                templatePartId,
                isTemplatePartSelectionOpen,
                setIsTemplatePartSelectionOpen
              }
            }
          );
        } }),
        /* @__PURE__ */ (0, import_jsx_runtime515.jsx)(import_block_editor272.InspectorControls, { group: "settings", children: /* @__PURE__ */ (0, import_jsx_runtime515.jsx)(
          TemplatesList,
          {
            area,
            clientId,
            isEntityAvailable,
            onSelect: (pattern) => onPatternSelect(pattern)
          }
        ) }),
        isEntityAvailable && /* @__PURE__ */ (0, import_jsx_runtime515.jsx)(
          TemplatePartInnerBlocks,
          {
            tagName: TagName2,
            blockProps,
            postId: templatePartId,
            hasInnerBlocks,
            layout
          }
        ),
        !isPlaceholder && !isResolved && /* @__PURE__ */ (0, import_jsx_runtime515.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime515.jsx)(import_components167.Spinner, {}) })
      ] }),
      isTemplatePartSelectionOpen && /* @__PURE__ */ (0, import_jsx_runtime515.jsx)(
        import_components167.Modal,
        {
          overlayClassName: "block-editor-template-part__selection-modal",
          title: (0, import_i18n253.sprintf)(
            // Translators: %s as template part area title ("Header", "Footer", etc.).
            (0, import_i18n253.__)("Choose a %s"),
            areaObject.label.toLowerCase()
          ),
          onRequestClose: () => setIsTemplatePartSelectionOpen(false),
          isFullScreen: true,
          children: /* @__PURE__ */ (0, import_jsx_runtime515.jsx)(
            TemplatePartSelectionModal,
            {
              templatePartId,
              clientId,
              area,
              setAttributes,
              onClose: () => setIsTemplatePartSelectionOpen(false)
            }
          )
        }
      )
    ] });
  }

  // packages/block-library/build-module/template-part/variations.mjs
  var import_core_data89 = __toESM(require_core_data(), 1);
  var import_data156 = __toESM(require_data(), 1);
  function enhanceTemplatePartVariations(settings122, name123) {
    if (name123 !== "core/template-part") {
      return settings122;
    }
    if (settings122.variations) {
      const isActive = (blockAttributes8, variationAttributes) => {
        const { area, theme, slug } = blockAttributes8;
        if (area) {
          return area === variationAttributes.area;
        }
        if (!slug) {
          return false;
        }
        const { getCurrentTheme, getEntityRecord } = (0, import_data156.select)(import_core_data89.store);
        const entity = getEntityRecord(
          "postType",
          "wp_template_part",
          `${theme || getCurrentTheme()?.stylesheet}//${slug}`
        );
        if (entity?.slug) {
          return entity.slug === variationAttributes.slug;
        }
        return entity?.area === variationAttributes.area;
      };
      const variations18 = settings122.variations.map((variation) => {
        return {
          ...variation,
          ...!variation.isActive && { isActive },
          ...typeof variation.icon === "string" && {
            icon: getTemplatePartIcon(variation.icon)
          }
        };
      });
      return {
        ...settings122,
        variations: variations18
      };
    }
    return settings122;
  }

  // packages/block-library/build-module/template-part/index.mjs
  var { name: name113 } = block_default112;
  var settings112 = {
    icon: symbol_filled_default,
    __experimentalLabel: ({ slug, theme }) => {
      if (!slug) {
        return;
      }
      const { getCurrentTheme, getEditedEntityRecord } = (0, import_data157.select)(import_core_data90.store);
      const entity = getEditedEntityRecord(
        "postType",
        "wp_template_part",
        (theme || getCurrentTheme()?.stylesheet) + "//" + slug
      );
      if (!entity) {
        return;
      }
      return (0, import_html_entities14.decodeEntities)(entity.title) || capitalCase(entity.slug || "");
    },
    edit: TemplatePartEdit
  };
  var init112 = () => {
    (0, import_hooks82.addFilter)(
      "blocks.registerBlockType",
      "core/template-part",
      enhanceTemplatePartVariations
    );
    const DISALLOWED_PARENTS = ["core/post-template", "core/post-content"];
    (0, import_hooks82.addFilter)(
      "blockEditor.__unstableCanInsertBlockType",
      "core/block-library/removeTemplatePartsFromPostTemplates",
      (canInsert, blockType, rootClientId, { getBlock, getBlockParentsByBlockName }) => {
        if (blockType.name !== "core/template-part") {
          return canInsert;
        }
        for (const disallowedParentType of DISALLOWED_PARENTS) {
          const hasDisallowedParent = getBlock(rootClientId)?.name === disallowedParentType || getBlockParentsByBlockName(
            rootClientId,
            disallowedParentType
          ).length;
          if (hasDisallowedParent) {
            return false;
          }
        }
        return true;
      }
    );
    return initBlock({ name: name113, metadata: block_default112, settings: settings112 });
  };

  // packages/block-library/build-module/term-count/index.mjs
  var term_count_exports = {};
  __export(term_count_exports, {
    init: () => init113,
    metadata: () => block_default113,
    name: () => name114,
    settings: () => settings113
  });

  // packages/block-library/build-module/term-count/block.json
  var block_default113 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/term-count",
    title: "Term Count",
    category: "theme",
    description: "Displays the post count of a taxonomy term.",
    textdomain: "default",
    usesContext: ["termId", "taxonomy"],
    attributes: {
      bracketType: {
        type: "string",
        enum: ["none", "round", "square", "curly", "angle"],
        default: "round"
      }
    },
    supports: {
      anchor: true,
      html: false,
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-term-count"
  };

  // packages/block-library/build-module/term-count/edit.mjs
  var import_i18n254 = __toESM(require_i18n(), 1);
  var import_block_editor273 = __toESM(require_block_editor(), 1);
  var import_components169 = __toESM(require_components(), 1);

  // packages/block-library/build-module/term-count/icons.mjs
  var import_components168 = __toESM(require_components(), 1);
  var import_jsx_runtime516 = __toESM(require_jsx_runtime(), 1);
  var bareNumber = /* @__PURE__ */ (0, import_jsx_runtime516.jsx)(import_components168.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime516.jsx)(import_components168.Path, { d: "M 10 6 L 9.609375 9 L 7 9 L 7 10.5 L 9.4121094 10.5 L 9.0878906 13 L 7 13 L 7 14.5 L 8.890625 14.5 L 8.5 17.5 L 10 17.5 L 10.390625 14.5 L 12.890625 14.5 L 12.5 17.5 L 14 17.5 L 14.390625 14.5 L 17 14.5 L 17 13 L 14.587891 13 L 14.912109 10.5 L 17 10.5 L 17 9 L 15.109375 9 L 15.5 6 L 14 6 L 13.609375 9 L 11.109375 9 L 11.5 6 L 10 6 z M 10.912109 10.5 L 13.412109 10.5 L 13.087891 13 L 10.587891 13 L 10.912109 10.5 z" }) });
  var numberInParenthesis = /* @__PURE__ */ (0, import_jsx_runtime516.jsx)(import_components168.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime516.jsx)(import_components168.Path, { d: "M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z M 18.5,3 c 0,0 1.5,4.004036 1.5,9 0,4.995964 -1.5,9 -1.5,9 H 20 c 0,0 1.5,-4.004036 1.5,-9 C 21.5,7.004036 20,3 20,3 Z M 5.5,21 C 5.5,21 4,16.995964 4,12 4,7.0040356 5.5,3 5.5,3 H 4 c 0,0 -1.5,4.004036 -1.5,9 0,4.995964 1.5,9 1.5,9 z" }) });
  var numberInSquareBrackets = /* @__PURE__ */ (0, import_jsx_runtime516.jsx)(import_components168.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime516.jsx)(import_components168.Path, { d: "M 21.5,21 V 3 H 18 v 1.5 h 2 v 15 H 18 V 21 Z M 2.5,3 V 21 H 6 V 19.5 H 4 V 4.5 H 6 V 3 Z M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z" }) });
  var numberInCurlyBrackets = /* @__PURE__ */ (0, import_jsx_runtime516.jsx)(import_components168.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime516.jsx)(import_components168.Path, { d: "M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z M 18.5,21 c 1.104567,0 2,-0.895433 2,-2 v -4 c 0,-1.104567 0.895433,-2 2,-2 v -2 c -1.104567,0 -2,-0.895433 -2,-2 V 5 c 0,-1.104567 -0.895433,-2 -2,-2 H 17 v 1.5 h 1.5 A 0.5,0.5 0 0 1 19,5 v 5 c 0,1.104567 0.895433,2 2,2 -1.104567,0 -2,0.895433 -2,2 v 5 c 0,0.276142 -0.223858,0.5 -0.5,0.5 H 17 V 21 Z M 5.5,3 c -1.1045668,0 -2,0.8954327 -2,2 v 4 c 0,1.104567 -0.8954332,2 -2,2 v 2 c 1.1045668,0 2,0.895433 2,2 v 4 c 0,1.104567 0.8954332,2 2,2 H 7 V 19.5 H 5.5 A 0.5,0.5 0 0 1 5,19 V 14 C 5,12.895433 4.1045668,12 3,12 4.1045668,12 5,11.104567 5,10 V 5 C 5,4.7238579 5.2238579,4.5 5.5,4.5 H 7 V 3 Z" }) });
  var numberInAngleBrackets = /* @__PURE__ */ (0, import_jsx_runtime516.jsx)(import_components168.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime516.jsx)(import_components168.Path, { d: "M 18.970703,16.53125 23.5,12 18.970703,7.46875 17.910156,8.53125 21.378906,12 17.910156,15.46875 Z M 5.0292969,7.46875 0.5,12 5.0292969,16.53125 6.0898438,15.46875 2.6210938,12 6.0898438,8.53125 Z M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z" }) });

  // packages/block-library/build-module/term-count/use-term-count.mjs
  var import_core_data91 = __toESM(require_core_data(), 1);
  var import_data158 = __toESM(require_data(), 1);
  function useTermCount(termId, taxonomy) {
    const [count] = (0, import_core_data91.useEntityProp)("taxonomy", taxonomy, "count", termId);
    const templateBasedData = useTemplateBasedTermData();
    const hasContext = Boolean(termId && taxonomy);
    return {
      hasContext,
      termCount: hasContext ? count || "" : templateBasedData
    };
  }
  function useTemplateBasedTermData() {
    const templateSlug = (0, import_data158.useSelect)((select9) => {
      const { getCurrentPostId, getCurrentPostType, getCurrentTemplateId } = select9("core/editor");
      const currentPostType = getCurrentPostType();
      const templateId = getCurrentTemplateId() || (currentPostType === "wp_template" ? getCurrentPostId() : null);
      return templateId ? select9(import_core_data91.store).getEditedEntityRecord(
        "postType",
        "wp_template",
        templateId
      )?.slug : null;
    }, []);
    const taxonomyMatches = templateSlug?.match(
      /^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/
    );
    let taxonomy;
    let termSlug;
    if (taxonomyMatches) {
      if (taxonomyMatches[1]) {
        taxonomy = taxonomyMatches[2] ? taxonomyMatches[2] : taxonomyMatches[1];
      } else if (taxonomyMatches[3]) {
        taxonomy = taxonomyMatches[6] ? taxonomyMatches[6] : taxonomyMatches[4];
        termSlug = taxonomyMatches[7];
      }
      taxonomy = taxonomy === "tag" ? "post_tag" : taxonomy;
    }
    return (0, import_data158.useSelect)(
      (select9) => {
        if (!taxonomy || !termSlug) {
          return "";
        }
        const { getEntityRecords } = select9(import_core_data91.store);
        const termRecords = getEntityRecords("taxonomy", taxonomy, {
          slug: termSlug,
          per_page: 1
        });
        if (termRecords && termRecords[0]) {
          return termRecords[0].count || "";
        }
        return "";
      },
      [taxonomy, termSlug]
    );
  }

  // packages/block-library/build-module/term-count/edit.mjs
  var import_jsx_runtime517 = __toESM(require_jsx_runtime(), 1);
  var BRACKET_TYPES = {
    none: { label: (0, import_i18n254.__)("No brackets"), icon: bareNumber },
    round: {
      label: (0, import_i18n254.__)("Round brackets"),
      icon: numberInParenthesis,
      before: "(",
      after: ")"
    },
    square: {
      label: (0, import_i18n254.__)("Square brackets"),
      icon: numberInSquareBrackets,
      before: "[",
      after: "]"
    },
    curly: {
      label: (0, import_i18n254.__)("Curly brackets"),
      icon: numberInCurlyBrackets,
      before: "{",
      after: "}"
    },
    angle: {
      label: (0, import_i18n254.__)("Angle brackets"),
      icon: numberInAngleBrackets,
      before: "<",
      after: ">"
    }
  };
  function TermCountEdit({
    attributes: attributes2,
    setAttributes,
    context: { termId, taxonomy }
  }) {
    const { bracketType } = attributes2;
    const term = useTermCount(termId, taxonomy);
    const termCount = term?.termCount || 0;
    const blockProps = (0, import_block_editor273.useBlockProps)();
    const bracketTypeControls = Object.entries(BRACKET_TYPES).map(
      ([type, { label, icon: icon4 }]) => ({
        role: "menuitemradio",
        title: label,
        isActive: bracketType === type,
        icon: icon4,
        onClick: () => {
          setAttributes({ bracketType: type });
        }
      })
    );
    const formatTermCount = (count, type) => {
      const { before = "", after = "" } = BRACKET_TYPES[type] || {};
      return `${before}${count}${after}`;
    };
    return /* @__PURE__ */ (0, import_jsx_runtime517.jsxs)(import_jsx_runtime517.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime517.jsx)(import_block_editor273.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime517.jsx)(
        import_components169.ToolbarDropdownMenu,
        {
          icon: BRACKET_TYPES[bracketType]?.icon ?? bareNumber,
          label: (0, import_i18n254.__)("Change bracket type"),
          controls: bracketTypeControls
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime517.jsx)("div", { ...blockProps, children: formatTermCount(termCount, bracketType) })
    ] });
  }

  // packages/block-library/build-module/term-count/index.mjs
  var { name: name114 } = block_default113;
  var settings113 = {
    icon: term_count_default,
    example: {},
    edit: TermCountEdit
  };
  var init113 = () => initBlock({ name: name114, metadata: block_default113, settings: settings113 });

  // packages/block-library/build-module/term-description/index.mjs
  var term_description_exports = {};
  __export(term_description_exports, {
    init: () => init114,
    metadata: () => block_default114,
    name: () => name115,
    settings: () => settings114
  });

  // packages/block-library/build-module/term-description/block.json
  var block_default114 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/term-description",
    title: "Term Description",
    category: "theme",
    description: "Display the description of categories, tags and custom taxonomies when viewing an archive.",
    textdomain: "default",
    usesContext: ["termId", "taxonomy"],
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      color: {
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        padding: true,
        margin: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    }
  };

  // packages/block-library/build-module/term-description/edit.mjs
  var import_i18n255 = __toESM(require_i18n(), 1);
  var import_block_editor274 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/term-description/use-term-description.mjs
  var import_core_data92 = __toESM(require_core_data(), 1);
  var import_data159 = __toESM(require_data(), 1);
  function useTermDescription(termId, taxonomy) {
    const [description, setDescription, fullDescription] = (0, import_core_data92.useEntityProp)(
      "taxonomy",
      taxonomy,
      "description",
      termId
    );
    const templateBasedData = useTemplateBasedTermData2();
    const hasContext = Boolean(termId && taxonomy);
    return {
      hasContext,
      setDescription,
      termDescription: hasContext ? fullDescription?.rendered || description || "" : templateBasedData
    };
  }
  function useTemplateBasedTermData2() {
    const templateSlug = (0, import_data159.useSelect)((select9) => {
      const { getCurrentPostId, getCurrentPostType, getCurrentTemplateId } = select9("core/editor");
      const currentPostType = getCurrentPostType();
      const templateId = getCurrentTemplateId() || (currentPostType === "wp_template" ? getCurrentPostId() : null);
      return templateId ? select9(import_core_data92.store).getEditedEntityRecord(
        "postType",
        "wp_template",
        templateId
      )?.slug : null;
    }, []);
    const taxonomyMatches = templateSlug?.match(
      /^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/
    );
    let taxonomy;
    let termSlug;
    if (taxonomyMatches) {
      if (taxonomyMatches[1]) {
        taxonomy = taxonomyMatches[2] ? taxonomyMatches[2] : taxonomyMatches[1];
      } else if (taxonomyMatches[3]) {
        taxonomy = taxonomyMatches[6] ? taxonomyMatches[6] : taxonomyMatches[4];
        termSlug = taxonomyMatches[7];
      }
      taxonomy = taxonomy === "tag" ? "post_tag" : taxonomy;
    }
    return (0, import_data159.useSelect)(
      (select9) => {
        if (!taxonomy || !termSlug) {
          return "";
        }
        const { getEntityRecords } = select9(import_core_data92.store);
        const termRecords = getEntityRecords("taxonomy", taxonomy, {
          slug: termSlug,
          per_page: 1
        });
        if (termRecords && termRecords[0]) {
          return termRecords[0].description || "";
        }
        return "";
      },
      [taxonomy, termSlug]
    );
  }

  // packages/block-library/build-module/term-description/edit.mjs
  var import_jsx_runtime518 = __toESM(require_jsx_runtime(), 1);
  function TermDescriptionEdit({
    context: { termId, taxonomy }
  }) {
    const { termDescription } = useTermDescription(termId, taxonomy);
    const blockProps = (0, import_block_editor274.useBlockProps)();
    return /* @__PURE__ */ (0, import_jsx_runtime518.jsx)(import_jsx_runtime518.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime518.jsx)("div", { ...blockProps, children: termDescription ? /* @__PURE__ */ (0, import_jsx_runtime518.jsx)(
      "div",
      {
        dangerouslySetInnerHTML: { __html: termDescription }
      }
    ) : /* @__PURE__ */ (0, import_jsx_runtime518.jsx)("div", { className: "wp-block-term-description__placeholder", children: /* @__PURE__ */ (0, import_jsx_runtime518.jsx)("span", { children: (0, import_i18n255.__)("Term Description") }) }) }) });
  }

  // packages/block-library/build-module/term-description/deprecated.mjs
  var v145 = {
    attributes: {
      textAlign: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      color: {
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    },
    save: () => null
  };
  var deprecated_default51 = [v145];

  // packages/block-library/build-module/term-description/index.mjs
  var { name: name115 } = block_default114;
  var settings114 = {
    icon: term_description_default,
    edit: TermDescriptionEdit,
    example: {},
    deprecated: deprecated_default51
  };
  var init114 = () => initBlock({ name: name115, metadata: block_default114, settings: settings114 });

  // packages/block-library/build-module/term-name/index.mjs
  var term_name_exports = {};
  __export(term_name_exports, {
    init: () => init115,
    metadata: () => block_default115,
    name: () => name116,
    settings: () => settings115
  });

  // packages/block-library/build-module/term-name/block.json
  var block_default115 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/term-name",
    title: "Term Name",
    category: "theme",
    description: "Displays the name of a taxonomy term.",
    keywords: ["term title"],
    textdomain: "default",
    usesContext: ["termId", "taxonomy"],
    attributes: {
      textAlign: {
        type: "string"
      },
      level: {
        type: "number",
        default: 0
      },
      isLink: {
        type: "boolean",
        default: false
      },
      levelOptions: {
        type: "array"
      }
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-term-name"
  };

  // packages/block-library/build-module/term-name/edit.mjs
  var import_i18n256 = __toESM(require_i18n(), 1);
  var import_block_editor275 = __toESM(require_block_editor(), 1);
  var import_components170 = __toESM(require_components(), 1);
  var import_html_entities15 = __toESM(require_html_entities(), 1);

  // packages/block-library/build-module/term-name/use-term-name.mjs
  var import_core_data93 = __toESM(require_core_data(), 1);
  var import_data160 = __toESM(require_data(), 1);
  function useTermName(termId, taxonomy) {
    const contextBasedTerm = (0, import_data160.useSelect)(
      (select9) => {
        if (!termId || !taxonomy) {
          return null;
        }
        return select9(import_core_data93.store).getEntityRecord(
          "taxonomy",
          taxonomy,
          termId
        );
      },
      [termId, taxonomy]
    );
    const templateBasedTerm = useTemplateBasedTermData3();
    const hasContext = Boolean(termId && taxonomy);
    return {
      hasContext,
      term: hasContext ? contextBasedTerm : templateBasedTerm
    };
  }
  function useTemplateBasedTermData3() {
    const templateSlug = (0, import_data160.useSelect)((select9) => {
      const { getCurrentPostId, getCurrentPostType, getCurrentTemplateId } = select9("core/editor");
      const currentPostType = getCurrentPostType();
      const templateId = getCurrentTemplateId() || (currentPostType === "wp_template" ? getCurrentPostId() : null);
      return templateId ? select9(import_core_data93.store).getEditedEntityRecord(
        "postType",
        "wp_template",
        templateId
      )?.slug : null;
    }, []);
    const taxonomyMatches = templateSlug?.match(
      /^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/
    );
    let taxonomy;
    let termSlug;
    if (taxonomyMatches) {
      if (taxonomyMatches[3]) {
        taxonomy = taxonomyMatches[6] ? taxonomyMatches[6] : taxonomyMatches[4];
        termSlug = taxonomyMatches[7];
      }
      taxonomy = taxonomy === "tag" ? "post_tag" : taxonomy;
    }
    return (0, import_data160.useSelect)(
      (select9) => {
        if (!taxonomy || !termSlug) {
          return null;
        }
        const { getEntityRecords } = select9(import_core_data93.store);
        const termRecords = getEntityRecords("taxonomy", taxonomy, {
          slug: termSlug,
          per_page: 1
        });
        if (termRecords && termRecords[0]) {
          return termRecords[0];
        }
        return null;
      },
      [taxonomy, termSlug]
    );
  }

  // packages/block-library/build-module/term-name/edit.mjs
  var import_jsx_runtime519 = __toESM(require_jsx_runtime(), 1);
  function TermNameEdit({
    attributes: attributes2,
    setAttributes,
    context: { termId, taxonomy }
  }) {
    const { textAlign, level = 0, isLink, levelOptions } = attributes2;
    const { term } = useTermName(termId, taxonomy);
    const termName2 = term?.name ? (0, import_html_entities15.decodeEntities)(term.name) : (0, import_i18n256.__)("Term Name");
    const blockProps = (0, import_block_editor275.useBlockProps)({
      className: clsx_default({
        [`has-text-align-${textAlign}`]: textAlign
      })
    });
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const TagName2 = level === 0 ? "p" : `h${level}`;
    let termNameDisplay = termName2;
    if (isLink) {
      termNameDisplay = /* @__PURE__ */ (0, import_jsx_runtime519.jsx)(
        "a",
        {
          href: "#term-name-pseudo-link",
          onClick: (e2) => e2.preventDefault(),
          children: termName2
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime519.jsxs)(import_jsx_runtime519.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime519.jsxs)(import_block_editor275.BlockControls, { group: "block", children: [
        /* @__PURE__ */ (0, import_jsx_runtime519.jsx)(
          import_block_editor275.HeadingLevelDropdown,
          {
            value: level,
            options: levelOptions,
            onChange: (newLevel) => {
              setAttributes({ level: newLevel });
            }
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime519.jsx)(
          import_block_editor275.AlignmentControl,
          {
            value: textAlign,
            onChange: (nextAlign) => {
              setAttributes({ textAlign: nextAlign });
            }
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime519.jsx)(import_block_editor275.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime519.jsx)(
        import_components170.__experimentalToolsPanel,
        {
          label: (0, import_i18n256.__)("Settings"),
          resetAll: () => {
            setAttributes({
              isLink: false
            });
          },
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime519.jsx)(
            import_components170.__experimentalToolsPanelItem,
            {
              hasValue: () => !!isLink,
              label: (0, import_i18n256.__)("Make term name a link"),
              onDeselect: () => setAttributes({ isLink: false }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime519.jsx)(
                import_components170.ToggleControl,
                {
                  label: (0, import_i18n256.__)("Make term name a link"),
                  onChange: () => setAttributes({ isLink: !isLink }),
                  checked: isLink
                }
              )
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime519.jsx)(TagName2, { ...blockProps, children: termNameDisplay })
    ] });
  }

  // packages/block-library/build-module/term-name/index.mjs
  var { name: name116 } = block_default115;
  var settings115 = {
    icon: term_name_default,
    example: {},
    edit: TermNameEdit
  };
  var init115 = () => initBlock({ name: name116, metadata: block_default115, settings: settings115 });

  // packages/block-library/build-module/terms-query/index.mjs
  var terms_query_exports = {};
  __export(terms_query_exports, {
    init: () => init116,
    metadata: () => block_default116,
    name: () => name117,
    settings: () => settings116
  });

  // packages/block-library/build-module/terms-query/block.json
  var block_default116 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/terms-query",
    title: "Terms Query",
    category: "theme",
    description: "An advanced block that allows displaying taxonomy terms based on different query parameters and visual configurations.",
    keywords: ["terms", "taxonomy", "categories", "tags", "list"],
    textdomain: "default",
    attributes: {
      termQuery: {
        type: "object",
        default: {
          perPage: 10,
          taxonomy: "category",
          order: "asc",
          orderBy: "name",
          include: [],
          hideEmpty: true,
          showNested: false,
          inherit: false
        }
      },
      tagName: {
        type: "string",
        default: "div"
      }
    },
    usesContext: ["templateSlug"],
    providesContext: {
      termQuery: "termQuery"
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      layout: true,
      interactivity: true
    }
  };

  // packages/block-library/build-module/terms-query/edit/index.mjs
  var import_data164 = __toESM(require_data(), 1);
  var import_block_editor280 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/terms-query/edit/terms-query-content.mjs
  var import_element139 = __toESM(require_element(), 1);
  var import_block_editor278 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/terms-query/edit/inspector-controls/index.mjs
  var import_i18n261 = __toESM(require_i18n(), 1);
  var import_components178 = __toESM(require_components(), 1);
  var import_block_editor277 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/terms-query/utils.mjs
  var import_core_data94 = __toESM(require_core_data(), 1);
  var import_data161 = __toESM(require_data(), 1);
  var import_element137 = __toESM(require_element(), 1);
  function usePublicTaxonomies() {
    const taxonomies = (0, import_data161.useSelect)(
      (select9) => select9(import_core_data94.store).getTaxonomies({ per_page: -1 }),
      []
    );
    return (0, import_element137.useMemo)(() => {
      return taxonomies?.filter(
        ({ visibility }) => visibility?.publicly_queryable
      ) || [];
    }, [taxonomies]);
  }

  // packages/block-library/build-module/terms-query/edit/inspector-controls/taxonomy-control.mjs
  var import_components171 = __toESM(require_components(), 1);
  var import_jsx_runtime520 = __toESM(require_jsx_runtime(), 1);
  function TaxonomyControl({ value, onChange, ...props }) {
    const taxonomies = usePublicTaxonomies();
    const taxonomyOptions = taxonomies.map((taxonomy) => ({
      label: taxonomy.name,
      value: taxonomy.slug
    }));
    return /* @__PURE__ */ (0, import_jsx_runtime520.jsx)(
      import_components171.SelectControl,
      {
        __next40pxDefaultSize: true,
        options: taxonomyOptions,
        value,
        onChange,
        ...props
      }
    );
  }

  // packages/block-library/build-module/terms-query/edit/inspector-controls/order-control.mjs
  var import_i18n257 = __toESM(require_i18n(), 1);
  var import_components172 = __toESM(require_components(), 1);
  var import_jsx_runtime521 = __toESM(require_jsx_runtime(), 1);
  function OrderControl2({ orderBy, order, onChange, ...props }) {
    return /* @__PURE__ */ (0, import_jsx_runtime521.jsx)(
      import_components172.SelectControl,
      {
        __next40pxDefaultSize: true,
        options: [
          {
            label: (0, import_i18n257.__)("Name: A \u2192 Z"),
            value: "name/asc"
          },
          {
            label: (0, import_i18n257.__)("Name: Z \u2192 A"),
            value: "name/desc"
          },
          {
            label: (0, import_i18n257.__)("Count, high to low"),
            value: "count/desc"
          },
          {
            label: (0, import_i18n257.__)("Count, low to high"),
            value: "count/asc"
          }
        ],
        value: orderBy + "/" + order,
        onChange: (value) => {
          const [newOrderBy, newOrder] = value.split("/");
          onChange(newOrderBy, newOrder);
        },
        ...props
      }
    );
  }

  // packages/block-library/build-module/terms-query/edit/inspector-controls/empty-terms-control.mjs
  var import_components173 = __toESM(require_components(), 1);
  var import_jsx_runtime522 = __toESM(require_jsx_runtime(), 1);
  function EmptyTermsControl({ value, onChange, ...props }) {
    return /* @__PURE__ */ (0, import_jsx_runtime522.jsx)(
      import_components173.ToggleControl,
      {
        checked: !value,
        onChange: (showEmpty) => onChange(!showEmpty),
        ...props
      }
    );
  }

  // packages/block-library/build-module/terms-query/edit/inspector-controls/nested-terms-control.mjs
  var import_components174 = __toESM(require_components(), 1);
  var import_jsx_runtime523 = __toESM(require_jsx_runtime(), 1);
  function NestedTermsControl({ value, onChange, ...props }) {
    return /* @__PURE__ */ (0, import_jsx_runtime523.jsx)(import_components174.ToggleControl, { checked: value, onChange, ...props });
  }

  // packages/block-library/build-module/terms-query/edit/inspector-controls/inherit-control.mjs
  var import_components175 = __toESM(require_components(), 1);
  var import_i18n258 = __toESM(require_i18n(), 1);
  var import_jsx_runtime524 = __toESM(require_jsx_runtime(), 1);
  function InheritControl({ value, onChange, label }) {
    return /* @__PURE__ */ (0, import_jsx_runtime524.jsxs)(
      import_components175.__experimentalToggleGroupControl,
      {
        __next40pxDefaultSize: true,
        label,
        isBlock: true,
        onChange: (newValue) => {
          onChange({
            inherit: newValue === "default"
          });
        },
        help: value ? (0, import_i18n258.__)(
          "Display terms based on the current taxonomy archive. For hierarchical taxonomies, shows children of the current term. For non-hierarchical taxonomies, shows all terms."
        ) : (0, import_i18n258.__)("Display terms based on specific criteria."),
        value: value ? "default" : "custom",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime524.jsx)(
            import_components175.__experimentalToggleGroupControlOption,
            {
              value: "default",
              label: (0, import_i18n258.__)("Default")
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime524.jsx)(import_components175.__experimentalToggleGroupControlOption, { value: "custom", label: (0, import_i18n258.__)("Custom") })
        ]
      }
    );
  }

  // packages/block-library/build-module/terms-query/edit/inspector-controls/max-terms-control.mjs
  var import_i18n259 = __toESM(require_i18n(), 1);
  var import_components176 = __toESM(require_components(), 1);
  var import_jsx_runtime525 = __toESM(require_jsx_runtime(), 1);
  function MaxTermsControl({ value, onChange, ...props }) {
    return /* @__PURE__ */ (0, import_jsx_runtime525.jsx)(
      import_components176.RangeControl,
      {
        __next40pxDefaultSize: true,
        value,
        min: 0,
        max: 100,
        onChange,
        help: (0, import_i18n259.__)(
          "Limit the number of terms you want to show. To show all terms, use 0 (zero)."
        ),
        ...props
      }
    );
  }

  // packages/block-library/build-module/terms-query/edit/inspector-controls/advanced-controls.mjs
  var import_i18n260 = __toESM(require_i18n(), 1);
  var import_block_editor276 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime526 = __toESM(require_jsx_runtime(), 1);
  var { HTMLElementControl: HTMLElementControl8 } = unlock(import_block_editor276.privateApis);
  function AdvancedControls({
    TagName: TagName2,
    setAttributes,
    clientId
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(import_block_editor276.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(
      HTMLElementControl8,
      {
        tagName: TagName2,
        onChange: (value) => setAttributes({ tagName: value }),
        clientId,
        options: [
          { label: (0, import_i18n260.__)("Default (<div>)"), value: "div" },
          { label: "<main>", value: "main" },
          { label: "<section>", value: "section" },
          { label: "<aside>", value: "aside" }
        ]
      }
    ) });
  }

  // packages/block-library/build-module/terms-query/edit/inspector-controls/include-control.mjs
  var import_components177 = __toESM(require_components(), 1);
  var import_data162 = __toESM(require_data(), 1);
  var import_core_data95 = __toESM(require_core_data(), 1);
  var import_element138 = __toESM(require_element(), 1);
  var import_compose60 = __toESM(require_compose(), 1);
  var import_html_entities16 = __toESM(require_html_entities(), 1);
  var import_jsx_runtime527 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_ARRAY7 = [];
  var BASE_QUERY3 = {
    order: "asc",
    _fields: "id,name",
    context: "view"
  };
  function IncludeControl({
    value: include,
    taxonomy,
    onChange,
    ...props
  }) {
    const [search, setSearch] = (0, import_element138.useState)("");
    const [value, setValue] = (0, import_element138.useState)(EMPTY_ARRAY7);
    const [suggestions, setSuggestions] = (0, import_element138.useState)(EMPTY_ARRAY7);
    const debouncedSearch = (0, import_compose60.useDebounce)(setSearch, 250);
    const { searchResults, searchHasResolved } = (0, import_data162.useSelect)(
      (select9) => {
        if (!search) {
          return { searchResults: EMPTY_ARRAY7, searchHasResolved: true };
        }
        const { getEntityRecords, hasFinishedResolution } = select9(import_core_data95.store);
        const selectorArgs = [
          "taxonomy",
          taxonomy,
          {
            ...BASE_QUERY3,
            search,
            orderby: "name",
            exclude: include,
            per_page: 20
          }
        ];
        return {
          searchResults: getEntityRecords(...selectorArgs),
          searchHasResolved: hasFinishedResolution(
            "getEntityRecords",
            selectorArgs
          )
        };
      },
      [search, taxonomy, include]
    );
    const currentTerms = (0, import_data162.useSelect)(
      (select9) => {
        if (!include?.length) {
          return EMPTY_ARRAY7;
        }
        const { getEntityRecords } = select9(import_core_data95.store);
        return getEntityRecords("taxonomy", taxonomy, {
          ...BASE_QUERY3,
          include,
          per_page: include.length
        });
      },
      [include, taxonomy]
    );
    (0, import_element138.useEffect)(() => {
      if (!include?.length) {
        setValue(EMPTY_ARRAY7);
      }
      if (!currentTerms?.length) {
        return;
      }
      const sanitizedValue = include.reduce((accumulator, id) => {
        const entity = currentTerms.find((term) => term.id === id);
        if (entity) {
          accumulator.push({
            id,
            value: (0, import_html_entities16.decodeEntities)(entity.name)
          });
        }
        return accumulator;
      }, []);
      setValue(sanitizedValue);
    }, [include, currentTerms]);
    const entitiesInfo = (0, import_element138.useMemo)(() => {
      if (!searchResults?.length) {
        return { names: EMPTY_ARRAY7, mapByName: {} };
      }
      const names = [];
      const mapByName = {};
      searchResults.forEach((result) => {
        const decodedName = (0, import_html_entities16.decodeEntities)(result.name);
        names.push(decodedName);
        mapByName[decodedName] = result;
      });
      return { names, mapByName };
    }, [searchResults]);
    (0, import_element138.useEffect)(() => {
      if (!searchHasResolved) {
        return;
      }
      setSuggestions(entitiesInfo.names);
    }, [entitiesInfo.names, searchHasResolved]);
    const getIdByValue = (entitiesMappedByName, entity) => entity?.id || entitiesMappedByName?.[entity]?.id;
    const onTermChange = (newValue) => {
      const ids = Array.from(
        newValue.reduce((accumulator, entity) => {
          const id = getIdByValue(entitiesInfo.mapByName, entity);
          if (id) {
            accumulator.add(id);
          }
          return accumulator;
        }, /* @__PURE__ */ new Set())
      );
      setSuggestions(EMPTY_ARRAY7);
      onChange(ids);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime527.jsx)(
      import_components177.FormTokenField,
      {
        __next40pxDefaultSize: true,
        value,
        onInputChange: debouncedSearch,
        suggestions,
        onChange: onTermChange,
        __experimentalShowHowTo: false,
        ...props
      }
    );
  }

  // packages/block-library/build-module/terms-query/edit/inspector-controls/index.mjs
  var import_jsx_runtime528 = __toESM(require_jsx_runtime(), 1);
  function TermsQueryInspectorControls({
    attributes: attributes2,
    setQuery,
    setAttributes,
    clientId,
    templateSlug
  }) {
    const { termQuery, tagName: TagName2 } = attributes2;
    const {
      taxonomy,
      orderBy,
      order,
      hideEmpty,
      inherit,
      showNested,
      perPage,
      include
    } = termQuery;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const taxonomies = usePublicTaxonomies();
    const isTaxonomyHierarchical = taxonomies.find(
      (_taxonomy) => _taxonomy.slug === taxonomy
    )?.hierarchical;
    const inheritQuery = !!inherit;
    const displayInheritControl = ["taxonomy", "category", "tag", "archive"].includes(templateSlug) || templateSlug?.startsWith("taxonomy-") || templateSlug?.startsWith("category-") || templateSlug?.startsWith("tag-");
    const displayShowNestedControl = isTaxonomyHierarchical;
    const hasIncludeFilter = !!include?.length;
    const queryTypeControlLabel = (0, import_i18n261.__)("Query type");
    const taxonomyControlLabel = (0, import_i18n261.__)("Taxonomy");
    const orderByControlLabel = (0, import_i18n261.__)("Order by");
    const emptyTermsControlLabel = (0, import_i18n261.__)("Show empty terms");
    const nestedTermsControlLabel = (0, import_i18n261.__)("Show nested terms");
    const maxTermsControlLabel = (0, import_i18n261.__)("Max terms");
    const includeControlLabel = (0, import_i18n261.__)("Selected terms");
    return /* @__PURE__ */ (0, import_jsx_runtime528.jsxs)(import_jsx_runtime528.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime528.jsx)(import_block_editor277.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime528.jsxs)(
        import_components178.__experimentalToolsPanel,
        {
          label: (0, import_i18n261.__)("Settings"),
          resetAll: () => {
            setAttributes({
              termQuery: {
                taxonomy: "category",
                order: "asc",
                orderBy: "name",
                include: [],
                hideEmpty: true,
                showNested: false,
                inherit: false,
                perPage: 10
              }
            });
          },
          dropdownMenuProps,
          children: [
            displayInheritControl && /* @__PURE__ */ (0, import_jsx_runtime528.jsx)(
              import_components178.__experimentalToolsPanelItem,
              {
                hasValue: () => inherit !== false,
                label: queryTypeControlLabel,
                onDeselect: () => setQuery({ inherit: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime528.jsx)(
                  InheritControl,
                  {
                    label: queryTypeControlLabel,
                    value: inherit,
                    onChange: setQuery
                  }
                )
              }
            ),
            !inheritQuery && /* @__PURE__ */ (0, import_jsx_runtime528.jsx)(
              import_components178.__experimentalToolsPanelItem,
              {
                hasValue: () => taxonomy !== "category",
                label: taxonomyControlLabel,
                onDeselect: () => {
                  setQuery({ taxonomy: "category" });
                },
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime528.jsx)(
                  TaxonomyControl,
                  {
                    label: taxonomyControlLabel,
                    value: taxonomy,
                    onChange: (value) => (
                      // We also need to reset the include filter when changing taxonomy.
                      setQuery({ taxonomy: value, include: [] })
                    )
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime528.jsx)(
              import_components178.__experimentalToolsPanelItem,
              {
                hasValue: () => orderBy !== "name" || order !== "asc",
                label: orderByControlLabel,
                onDeselect: () => setQuery({ orderBy: "name", order: "asc" }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime528.jsx)(
                  OrderControl2,
                  {
                    label: orderByControlLabel,
                    ...{ orderBy, order },
                    onChange: (newOrderBy, newOrder) => {
                      setQuery({
                        orderBy: newOrderBy,
                        order: newOrder
                      });
                    },
                    disabled: hasIncludeFilter,
                    help: hasIncludeFilter ? (0, import_i18n261.__)(
                      "When specific terms are selected, the order is based on their selection order."
                    ) : void 0
                  }
                )
              }
            ),
            !inheritQuery && /* @__PURE__ */ (0, import_jsx_runtime528.jsx)(
              import_components178.__experimentalToolsPanelItem,
              {
                hasValue: () => !!include?.length,
                label: includeControlLabel,
                onDeselect: () => setQuery({
                  include: [],
                  orderBy: "name",
                  order: "asc"
                }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime528.jsx)(
                  IncludeControl,
                  {
                    label: includeControlLabel,
                    taxonomy,
                    value: include,
                    onChange: (value) => setQuery({ include: value })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime528.jsx)(
              import_components178.__experimentalToolsPanelItem,
              {
                hasValue: () => hideEmpty !== true,
                label: emptyTermsControlLabel,
                onDeselect: () => setQuery({ hideEmpty: true }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime528.jsx)(
                  EmptyTermsControl,
                  {
                    label: emptyTermsControlLabel,
                    value: hideEmpty,
                    onChange: (value) => setQuery({ hideEmpty: value })
                  }
                )
              }
            ),
            displayShowNestedControl && /* @__PURE__ */ (0, import_jsx_runtime528.jsx)(
              import_components178.__experimentalToolsPanelItem,
              {
                hasValue: () => showNested !== false,
                label: nestedTermsControlLabel,
                onDeselect: () => setQuery({ showNested: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime528.jsx)(
                  NestedTermsControl,
                  {
                    label: nestedTermsControlLabel,
                    value: showNested,
                    onChange: (value) => setQuery({ showNested: value }),
                    disabled: hasIncludeFilter,
                    help: hasIncludeFilter ? (0, import_i18n261.__)(
                      "When specific terms are selected, only those are displayed."
                    ) : void 0
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime528.jsx)(
              import_components178.__experimentalToolsPanelItem,
              {
                hasValue: () => perPage !== 10,
                label: maxTermsControlLabel,
                onDeselect: () => setQuery({ perPage: 10 }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime528.jsx)(
                  MaxTermsControl,
                  {
                    label: maxTermsControlLabel,
                    value: perPage,
                    onChange: (value) => setQuery({ perPage: value })
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime528.jsx)(
        AdvancedControls,
        {
          TagName: TagName2,
          setAttributes,
          clientId
        }
      )
    ] });
  }

  // packages/block-library/build-module/terms-query/edit/terms-query-content.mjs
  var import_jsx_runtime529 = __toESM(require_jsx_runtime(), 1);
  var TEMPLATE18 = [["core/term-template"]];
  function TermsQueryContent({
    attributes: attributes2,
    setAttributes,
    clientId,
    context
  }) {
    const { tagName: TagName2 } = attributes2;
    const blockProps = (0, import_block_editor278.useBlockProps)();
    const innerBlocksProps = (0, import_block_editor278.useInnerBlocksProps)(blockProps, {
      template: TEMPLATE18
    });
    const setQuery = (0, import_element139.useCallback)(
      (newQuery) => setAttributes((prevAttributes) => ({
        termQuery: { ...prevAttributes.termQuery, ...newQuery }
      })),
      [setAttributes]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime529.jsxs)(import_jsx_runtime529.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime529.jsx)(
        TermsQueryInspectorControls,
        {
          attributes: attributes2,
          setQuery,
          setAttributes,
          clientId,
          templateSlug: context?.templateSlug
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime529.jsx)(TagName2, { ...innerBlocksProps })
    ] });
  }

  // packages/block-library/build-module/terms-query/edit/terms-query-placeholder.mjs
  var import_data163 = __toESM(require_data(), 1);
  var import_blocks120 = __toESM(require_blocks(), 1);
  var import_block_editor279 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime530 = __toESM(require_jsx_runtime(), 1);
  function TermsQueryPlaceholder({
    attributes: attributes2,
    clientId,
    name: name123
  }) {
    const { blockType, activeBlockVariation, scopeVariations } = (0, import_data163.useSelect)(
      (select9) => {
        const {
          getActiveBlockVariation,
          getBlockType: getBlockType5,
          getBlockVariations: getBlockVariations3
        } = select9(import_blocks120.store);
        return {
          blockType: getBlockType5(name123),
          activeBlockVariation: getActiveBlockVariation(
            name123,
            attributes2
          ),
          scopeVariations: getBlockVariations3(name123, "block")
        };
      },
      [name123, attributes2]
    );
    const icon4 = activeBlockVariation?.icon?.src || activeBlockVariation?.icon || blockType?.icon?.src;
    const label = activeBlockVariation?.title || blockType?.title;
    const { replaceInnerBlocks } = (0, import_data163.useDispatch)(import_block_editor279.store);
    const blockProps = (0, import_block_editor279.useBlockProps)();
    return /* @__PURE__ */ (0, import_jsx_runtime530.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime530.jsx)(
      import_block_editor279.__experimentalBlockVariationPicker,
      {
        icon: icon4,
        label,
        variations: scopeVariations,
        onSelect: (variation) => {
          if (variation.innerBlocks) {
            replaceInnerBlocks(
              clientId,
              (0, import_blocks120.createBlocksFromInnerBlocksTemplate)(
                variation.innerBlocks
              ),
              false
            );
          }
        }
      }
    ) });
  }

  // packages/block-library/build-module/terms-query/edit/index.mjs
  var import_jsx_runtime531 = __toESM(require_jsx_runtime(), 1);
  var TermsQueryEdit = (props) => {
    const hasInnerBlocks = (0, import_data164.useSelect)(
      (select9) => !!select9(import_block_editor280.store).getBlocks(props.clientId).length,
      [props.clientId]
    );
    const Component = hasInnerBlocks ? TermsQueryContent : TermsQueryPlaceholder;
    return /* @__PURE__ */ (0, import_jsx_runtime531.jsx)(Component, { ...props });
  };
  var edit_default40 = TermsQueryEdit;

  // packages/block-library/build-module/terms-query/save.mjs
  var import_block_editor281 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime532 = __toESM(require_jsx_runtime(), 1);
  function save55({ attributes: { tagName: Tag = "div" } }) {
    const blockProps = import_block_editor281.useBlockProps.save();
    const innerBlocksProps = import_block_editor281.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime532.jsx)(Tag, { ...innerBlocksProps });
  }

  // packages/block-library/build-module/terms-query/variations.mjs
  var import_i18n262 = __toESM(require_i18n(), 1);
  var import_components179 = __toESM(require_components(), 1);
  var import_jsx_runtime533 = __toESM(require_jsx_runtime(), 1);
  var titleDate2 = /* @__PURE__ */ (0, import_jsx_runtime533.jsx)(import_components179.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", children: /* @__PURE__ */ (0, import_jsx_runtime533.jsx)(import_components179.Path, { d: "M 41,9 H 7 v 3 h 34 z m 0,9 H 7 v 3 h 34 z m 0,18 H 7 v 3 h 34 z m 0,-9 H 7 v 3 h 34 z" }) });
  var titleExcerpt2 = /* @__PURE__ */ (0, import_jsx_runtime533.jsx)(import_components179.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", children: /* @__PURE__ */ (0, import_jsx_runtime533.jsx)(import_components179.Path, { d: "m 36,36 h 5 v 3 h -5 z m 0,-9 h 5 v 3 h -5 z m 0,-9 h 5 v 3 h -5 z m 0,-9 h 5 v 3 H 36 Z M 31,9 H 7 v 3 h 24 z m 0,9 H 7 v 3 h 24 z m 0,18 H 7 v 3 h 24 z m 0,-9 H 7 v 3 h 24 z" }) });
  var termName = [
    "core/term-name",
    {
      isLink: true
    }
  ];
  var variations17 = [
    {
      name: "name",
      title: (0, import_i18n262.__)("Name"),
      description: (0, import_i18n262.__)("Display the terms' names."),
      attributes: {},
      icon: titleDate2,
      scope: ["block"],
      innerBlocks: [["core/term-template", {}, [termName]]]
    },
    {
      name: "name-count",
      title: (0, import_i18n262.__)("Name & Count"),
      description: (0, import_i18n262.__)(
        "Display the terms' names and number of posts assigned to each term."
      ),
      attributes: {},
      icon: titleExcerpt2,
      scope: ["block"],
      innerBlocks: [
        [
          "core/term-template",
          {},
          [
            [
              "core/group",
              { layout: { type: "flex", flexWrap: "nowrap" } },
              [termName, ["core/term-count"]]
            ]
          ]
        ]
      ]
    }
  ];
  var variations_default17 = variations17;

  // packages/block-library/build-module/terms-query/index.mjs
  var { name: name117 } = block_default116;
  var settings116 = {
    icon: loop_default,
    edit: edit_default40,
    save: save55,
    example: {},
    variations: variations_default17
  };
  var init116 = () => initBlock({ name: name117, metadata: block_default116, settings: settings116 });

  // packages/block-library/build-module/term-template/index.mjs
  var term_template_exports = {};
  __export(term_template_exports, {
    init: () => init117,
    metadata: () => block_default117,
    name: () => name118,
    settings: () => settings117
  });

  // packages/block-library/build-module/term-template/block.json
  var block_default117 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/term-template",
    title: "Term Template",
    category: "theme",
    ancestor: ["core/terms-query"],
    description: "Contains the block elements used to render a taxonomy term, like the name, description, and more.",
    textdomain: "default",
    usesContext: ["termQuery"],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      align: ["wide", "full"],
      layout: true,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        blockGap: {
          __experimentalDefault: "1.25em"
        },
        __experimentalDefaultControls: {
          blockGap: true,
          padding: false,
          margin: false
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      }
    },
    style: "wp-block-term-template",
    editorStyle: "wp-block-term-template-editor"
  };

  // packages/block-library/build-module/term-template/edit.mjs
  var import_components180 = __toESM(require_components(), 1);
  var import_element140 = __toESM(require_element(), 1);
  var import_data165 = __toESM(require_data(), 1);
  var import_i18n263 = __toESM(require_i18n(), 1);
  var import_block_editor282 = __toESM(require_block_editor(), 1);
  var import_core_data96 = __toESM(require_core_data(), 1);
  var import_jsx_runtime534 = __toESM(require_jsx_runtime(), 1);
  var TEMPLATE19 = [["core/term-name"]];
  function TermTemplateInnerBlocks({ classList }) {
    const innerBlocksProps = (0, import_block_editor282.useInnerBlocksProps)(
      { className: clsx_default("wp-block-term", classList) },
      { template: TEMPLATE19, __unstableDisableLayoutClassNames: true }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime534.jsx)("li", { ...innerBlocksProps });
  }
  function TermTemplateBlockPreview({
    blocks,
    blockContextId,
    classList,
    isHidden,
    setActiveBlockContextId
  }) {
    const blockPreviewProps = (0, import_block_editor282.__experimentalUseBlockPreview)({
      blocks,
      props: {
        className: clsx_default("wp-block-term", classList)
      }
    });
    const handleOnClick = () => {
      setActiveBlockContextId(blockContextId);
    };
    const style2 = {
      display: isHidden ? "none" : void 0
    };
    return /* @__PURE__ */ (0, import_jsx_runtime534.jsx)(
      "li",
      {
        ...blockPreviewProps,
        tabIndex: 0,
        role: "button",
        onClick: handleOnClick,
        onKeyPress: handleOnClick,
        style: style2
      }
    );
  }
  var MemoizedTermTemplateBlockPreview = (0, import_element140.memo)(TermTemplateBlockPreview);
  function TermTemplateEdit({
    clientId,
    attributes: { layout },
    setAttributes,
    context: {
      termQuery: {
        taxonomy,
        order,
        orderBy,
        hideEmpty,
        showNested = false,
        perPage,
        include
      } = {}
    },
    __unstableLayoutClassNames
  }) {
    const { type: layoutType, columnCount = 3 } = layout || {};
    const [activeBlockContextId, setActiveBlockContextId] = (0, import_element140.useState)();
    const queryArgs = {
      hide_empty: hideEmpty,
      order,
      orderby: orderBy,
      // There is a mismatch between `WP_Term_Query` and the REST API parameter default
      // values to fetch all items. In `WP_Term_Query`, the default is `''|0` and in
      // the REST API is `-1`.
      per_page: perPage || -1
    };
    if (!showNested && !include?.length) {
      queryArgs.parent = 0;
    }
    if (include?.length) {
      queryArgs.include = include;
      queryArgs.orderby = "include";
      queryArgs.order = "asc";
    }
    const { records: terms } = (0, import_core_data96.useEntityRecords)(
      "taxonomy",
      taxonomy,
      queryArgs
    );
    const blocks = (0, import_data165.useSelect)(
      (select9) => select9(import_block_editor282.store).getBlocks(clientId),
      [clientId]
    );
    const blockProps = (0, import_block_editor282.useBlockProps)({
      className: __unstableLayoutClassNames
    });
    const blockContexts = (0, import_element140.useMemo)(
      () => terms?.map((term) => ({
        taxonomy,
        termId: term.id,
        classList: `term-${term.id}`,
        termData: term
      })),
      [terms, taxonomy]
    );
    if (!terms) {
      return /* @__PURE__ */ (0, import_jsx_runtime534.jsx)("ul", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime534.jsx)("li", { className: "wp-block-term term-loading", children: /* @__PURE__ */ (0, import_jsx_runtime534.jsx)("div", { className: "term-loading-placeholder" }) }) });
    }
    if (!terms.length) {
      return /* @__PURE__ */ (0, import_jsx_runtime534.jsxs)("p", { ...blockProps, children: [
        " ",
        (0, import_i18n263.__)("No terms found.")
      ] });
    }
    const setDisplayLayout = (newDisplayLayout) => setAttributes((prevAttributes) => ({
      layout: { ...prevAttributes.layout, ...newDisplayLayout }
    }));
    return /* @__PURE__ */ (0, import_jsx_runtime534.jsxs)(import_jsx_runtime534.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime534.jsx)(import_block_editor282.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime534.jsx)(
        import_components180.ToolbarGroup,
        {
          controls: [
            {
              icon: list_default,
              title: (0, import_i18n263._x)(
                "List view",
                "Term template block display setting"
              ),
              onClick: () => setDisplayLayout({ type: "default" }),
              isActive: layoutType === "default" || layoutType === "constrained"
            },
            {
              icon: grid_default,
              title: (0, import_i18n263._x)(
                "Grid view",
                "Term template block display setting"
              ),
              onClick: () => setDisplayLayout({
                type: "grid",
                columnCount
              }),
              isActive: layoutType === "grid"
            }
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime534.jsx)("ul", { ...blockProps, children: blockContexts?.map((blockContext) => /* @__PURE__ */ (0, import_jsx_runtime534.jsxs)(
        import_block_editor282.BlockContextProvider,
        {
          value: blockContext,
          children: [
            blockContext.termId === (activeBlockContextId || blockContexts[0]?.termId) ? /* @__PURE__ */ (0, import_jsx_runtime534.jsx)(
              TermTemplateInnerBlocks,
              {
                classList: blockContext.classList
              }
            ) : null,
            /* @__PURE__ */ (0, import_jsx_runtime534.jsx)(
              MemoizedTermTemplateBlockPreview,
              {
                blocks,
                blockContextId: blockContext.termId,
                classList: blockContext.classList,
                setActiveBlockContextId,
                isHidden: blockContext.termId === (activeBlockContextId || blockContexts[0]?.termId)
              }
            )
          ]
        },
        blockContext.termId
      )) })
    ] });
  }

  // packages/block-library/build-module/term-template/save.mjs
  var import_block_editor283 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime535 = __toESM(require_jsx_runtime(), 1);
  function TermTemplateSave() {
    return /* @__PURE__ */ (0, import_jsx_runtime535.jsx)(import_block_editor283.InnerBlocks.Content, {});
  }

  // packages/block-library/build-module/term-template/index.mjs
  var { name: name118 } = block_default117;
  var settings117 = {
    icon: layout_default,
    edit: TermTemplateEdit,
    save: TermTemplateSave,
    example: {}
  };
  var init117 = () => initBlock({ name: name118, metadata: block_default117, settings: settings117 });

  // packages/block-library/build-module/text-columns/index.mjs
  var text_columns_exports = {};
  __export(text_columns_exports, {
    init: () => init118,
    metadata: () => block_default118,
    name: () => name119,
    settings: () => settings118
  });

  // packages/block-library/build-module/text-columns/edit.mjs
  var import_i18n264 = __toESM(require_i18n(), 1);
  var import_components181 = __toESM(require_components(), 1);
  var import_block_editor284 = __toESM(require_block_editor(), 1);
  var import_deprecated57 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime536 = __toESM(require_jsx_runtime(), 1);
  function TextColumnsEdit({ attributes: attributes2, setAttributes }) {
    const { width, content, columns } = attributes2;
    (0, import_deprecated57.default)("The Text Columns block", {
      since: "5.3",
      alternative: "the Columns block"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime536.jsxs)(import_jsx_runtime536.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime536.jsx)(import_block_editor284.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime536.jsx)(
        import_block_editor284.BlockAlignmentToolbar,
        {
          value: width,
          onChange: (nextWidth) => setAttributes({ width: nextWidth }),
          controls: ["center", "wide", "full"]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime536.jsx)(import_block_editor284.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime536.jsx)(import_components181.PanelBody, { children: /* @__PURE__ */ (0, import_jsx_runtime536.jsx)(
        import_components181.RangeControl,
        {
          __next40pxDefaultSize: true,
          label: (0, import_i18n264.__)("Columns"),
          value: columns,
          onChange: (value) => setAttributes({ columns: value }),
          min: 2,
          max: 4,
          required: true
        }
      ) }) }),
      /* @__PURE__ */ (0, import_jsx_runtime536.jsx)(
        "div",
        {
          ...(0, import_block_editor284.useBlockProps)({
            className: `align${width} columns-${columns}`
          }),
          children: Array.from({ length: columns }).map((_, index) => {
            return /* @__PURE__ */ (0, import_jsx_runtime536.jsx)(
              "div",
              {
                className: "wp-block-column",
                children: /* @__PURE__ */ (0, import_jsx_runtime536.jsx)(
                  import_block_editor284.RichText,
                  {
                    tagName: "p",
                    value: content?.[index]?.children,
                    onChange: (nextContent) => {
                      setAttributes({
                        content: [
                          ...content.slice(0, index),
                          { children: nextContent },
                          ...content.slice(index + 1)
                        ]
                      });
                    },
                    "aria-label": (0, import_i18n264.sprintf)(
                      // translators: %d: column index (starting with 1)
                      (0, import_i18n264.__)("Column %d text"),
                      index + 1
                    ),
                    placeholder: (0, import_i18n264.__)("New Column")
                  }
                )
              },
              `column-${index}`
            );
          })
        }
      )
    ] });
  }

  // packages/block-library/build-module/text-columns/block.json
  var block_default118 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/text-columns",
    title: "Text Columns (deprecated)",
    icon: "columns",
    category: "design",
    description: "This block is deprecated. Please use the Columns block instead.",
    textdomain: "default",
    attributes: {
      content: {
        type: "array",
        source: "query",
        selector: "p",
        query: {
          children: {
            type: "string",
            source: "html"
          }
        },
        default: [{}, {}]
      },
      columns: {
        type: "number",
        default: 2
      },
      width: {
        type: "string"
      }
    },
    supports: {
      inserter: false,
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-text-columns-editor",
    style: "wp-block-text-columns"
  };

  // packages/block-library/build-module/text-columns/save.mjs
  var import_block_editor285 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime537 = __toESM(require_jsx_runtime(), 1);
  function save56({ attributes: attributes2 }) {
    const { width, content, columns } = attributes2;
    return /* @__PURE__ */ (0, import_jsx_runtime537.jsx)(
      "div",
      {
        ...import_block_editor285.useBlockProps.save({
          className: `align${width} columns-${columns}`
        }),
        children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime537.jsx)("div", { className: "wp-block-column", children: /* @__PURE__ */ (0, import_jsx_runtime537.jsx)(
          import_block_editor285.RichText.Content,
          {
            tagName: "p",
            value: content?.[index]?.children
          }
        ) }, `column-${index}`))
      }
    );
  }

  // packages/block-library/build-module/text-columns/transforms.mjs
  var import_blocks121 = __toESM(require_blocks(), 1);
  var transforms36 = {
    to: [
      {
        type: "block",
        blocks: ["core/columns"],
        transform: ({ className, columns, content, width }) => (0, import_blocks121.createBlock)(
          "core/columns",
          {
            align: "wide" === width || "full" === width ? width : void 0,
            className,
            columns
          },
          content.map(
            ({ children }) => (0, import_blocks121.createBlock)("core/column", {}, [
              (0, import_blocks121.createBlock)("core/paragraph", {
                content: children
              })
            ])
          )
        )
      }
    ]
  };
  var transforms_default37 = transforms36;

  // packages/block-library/build-module/text-columns/index.mjs
  var { name: name119 } = block_default118;
  var settings118 = {
    transforms: transforms_default37,
    getEditWrapperProps(attributes2) {
      const { width } = attributes2;
      if ("wide" === width || "full" === width) {
        return { "data-align": width };
      }
    },
    edit: TextColumnsEdit,
    save: save56
  };
  var init118 = () => initBlock({ name: name119, metadata: block_default118, settings: settings118 });

  // packages/block-library/build-module/verse/index.mjs
  var verse_exports = {};
  __export(verse_exports, {
    init: () => init119,
    metadata: () => block_default119,
    name: () => name120,
    settings: () => settings119
  });
  var import_i18n266 = __toESM(require_i18n(), 1);
  var import_blocks124 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/verse/deprecated.mjs
  var import_block_editor286 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime538 = __toESM(require_jsx_runtime(), 1);
  var v146 = {
    attributes: {
      content: {
        type: "string",
        source: "html",
        selector: "pre",
        default: ""
      },
      textAlign: {
        type: "string"
      }
    },
    save({ attributes: attributes2 }) {
      const { textAlign, content } = attributes2;
      return /* @__PURE__ */ (0, import_jsx_runtime538.jsx)(
        import_block_editor286.RichText.Content,
        {
          tagName: "pre",
          style: { textAlign },
          value: content
        }
      );
    },
    migrate: migrate_text_align_default
  };
  var v219 = {
    attributes: {
      content: {
        type: "string",
        source: "html",
        selector: "pre",
        default: "",
        __unstablePreserveWhiteSpace: true,
        role: "content"
      },
      textAlign: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      color: {
        gradients: true,
        link: true
      },
      typography: {
        fontSize: true,
        __experimentalFontFamily: true
      },
      spacing: {
        padding: true
      }
    },
    save({ attributes: attributes2 }) {
      const { textAlign, content } = attributes2;
      const className = clsx_default({
        [`has-text-align-${textAlign}`]: textAlign
      });
      return /* @__PURE__ */ (0, import_jsx_runtime538.jsx)("pre", { ...import_block_editor286.useBlockProps.save({ className }), children: /* @__PURE__ */ (0, import_jsx_runtime538.jsx)(import_block_editor286.RichText.Content, { value: content }) });
    },
    migrate(attributes2) {
      return migrate_text_align_default(migrate_font_family_default(attributes2));
    },
    isEligible({ style: style2, textAlign }) {
      return style2?.typography?.fontFamily || !!textAlign;
    }
  };
  var v313 = {
    attributes: {
      content: {
        type: "rich-text",
        source: "rich-text",
        selector: "pre",
        __unstablePreserveWhiteSpace: true,
        role: "content"
      },
      textAlign: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      background: {
        backgroundImage: true,
        backgroundSize: true
      },
      color: {
        gradients: true,
        link: true
      },
      dimensions: {
        minHeight: true
      },
      typography: {
        fontSize: true,
        __experimentalFontFamily: true,
        lineHeight: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalWritingMode: true
      },
      spacing: {
        margin: true,
        padding: true
      },
      __experimentalBorder: {
        radius: true,
        width: true,
        color: true,
        style: true
      },
      interactivity: {
        clientNavigation: true
      }
    },
    save({ attributes: attributes2 }) {
      const { textAlign, content } = attributes2;
      const className = clsx_default({
        [`has-text-align-${textAlign}`]: textAlign
      });
      return /* @__PURE__ */ (0, import_jsx_runtime538.jsx)("pre", { ...import_block_editor286.useBlockProps.save({ className }), children: /* @__PURE__ */ (0, import_jsx_runtime538.jsx)(import_block_editor286.RichText.Content, { value: content }) });
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    }
  };
  var deprecated_default52 = [v313, v219, v146];

  // packages/block-library/build-module/verse/edit.mjs
  var import_i18n265 = __toESM(require_i18n(), 1);
  var import_block_editor287 = __toESM(require_block_editor(), 1);
  var import_blocks122 = __toESM(require_blocks(), 1);
  var import_jsx_runtime539 = __toESM(require_jsx_runtime(), 1);
  function VerseEdit(props) {
    const {
      attributes: attributes2,
      setAttributes,
      mergeBlocks,
      onRemove,
      insertBlocksAfter,
      style: style2
    } = props;
    const { content } = attributes2;
    useDeprecatedTextAlign(props);
    const blockProps = (0, import_block_editor287.useBlockProps)({ style: style2 });
    return /* @__PURE__ */ (0, import_jsx_runtime539.jsx)(
      import_block_editor287.RichText,
      {
        tagName: "pre",
        identifier: "content",
        preserveWhiteSpace: true,
        value: content,
        onChange: (nextContent) => {
          setAttributes({
            content: nextContent
          });
        },
        "aria-label": (0, import_i18n265.__)("Poetry text"),
        placeholder: (0, import_i18n265.__)("Write poetry\u2026"),
        onRemove,
        onMerge: mergeBlocks,
        ...blockProps,
        __unstablePastePlainText: true,
        __unstableOnSplitAtDoubleLineEnd: () => insertBlocksAfter((0, import_blocks122.createBlock)((0, import_blocks122.getDefaultBlockName)()))
      }
    );
  }

  // packages/block-library/build-module/verse/block.json
  var block_default119 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/verse",
    title: "Poetry",
    category: "text",
    description: "Insert poetry. Use special spacing formats. Or quote song lyrics.",
    keywords: ["poetry", "poem", "verse", "stanza", "song", "lyrics"],
    textdomain: "default",
    attributes: {
      content: {
        type: "rich-text",
        source: "rich-text",
        selector: "pre",
        __unstablePreserveWhiteSpace: true,
        role: "content"
      }
    },
    supports: {
      anchor: true,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        __experimentalDefaultControls: {
          backgroundImage: true
        }
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      dimensions: {
        minHeight: true,
        __experimentalDefaultControls: {
          minHeight: false
        }
      },
      typography: {
        fontSize: true,
        __experimentalFontFamily: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalWritingMode: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      __experimentalBorder: {
        radius: true,
        width: true,
        color: true,
        style: true
      },
      interactivity: {
        clientNavigation: true
      }
    },
    style: "wp-block-verse",
    editorStyle: "wp-block-verse-editor"
  };

  // packages/block-library/build-module/verse/save.mjs
  var import_block_editor288 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime540 = __toESM(require_jsx_runtime(), 1);
  function save57({ attributes: attributes2 }) {
    const { content } = attributes2;
    return /* @__PURE__ */ (0, import_jsx_runtime540.jsx)("pre", { ...import_block_editor288.useBlockProps.save(), children: /* @__PURE__ */ (0, import_jsx_runtime540.jsx)(import_block_editor288.RichText.Content, { value: content }) });
  }

  // packages/block-library/build-module/verse/transforms.mjs
  var import_blocks123 = __toESM(require_blocks(), 1);
  var transforms37 = {
    from: [
      {
        type: "block",
        blocks: ["core/paragraph"],
        transform: (attributes2) => (0, import_blocks123.createBlock)("core/verse", attributes2)
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/paragraph"],
        transform: (attributes2) => (0, import_blocks123.createBlock)("core/paragraph", attributes2)
      }
    ]
  };
  var transforms_default38 = transforms37;

  // packages/block-library/build-module/verse/index.mjs
  var { fieldsKey: fieldsKey19, formKey: formKey19 } = unlock(import_blocks124.privateApis);
  var { name: name120 } = block_default119;
  var settings119 = {
    icon: verse_default,
    example: {
      attributes: {
        /* eslint-disable @wordpress/i18n-no-collapsible-whitespace */
        // translators: Sample content for the Verse block. Can be replaced with a more locale-adequate work.
        content: (0, import_i18n266.__)(
          "WHAT was he doing, the great god Pan,\n	Down in the reeds by the river?\nSpreading ruin and scattering ban,\nSplashing and paddling with hoofs of a goat,\nAnd breaking the golden lilies afloat\n    With the dragon-fly on the river."
        )
        /* eslint-enable @wordpress/i18n-no-collapsible-whitespace */
      }
    },
    transforms: transforms_default38,
    deprecated: deprecated_default52,
    merge(attributes2, attributesToMerge) {
      return {
        content: attributes2.content + "\n\n" + attributesToMerge.content
      };
    },
    edit: VerseEdit,
    save: save57
  };
  if (window.__experimentalContentOnlyInspectorFields) {
    settings119[fieldsKey19] = [
      {
        id: "content",
        label: (0, import_i18n266.__)("Content"),
        type: "text",
        Edit: "rich-text"
        // TODO: replace with custom component
      }
    ];
    settings119[formKey19] = {
      fields: ["content"]
    };
  }
  var init119 = () => initBlock({ name: name120, metadata: block_default119, settings: settings119 });

  // packages/block-library/build-module/video/index.mjs
  var video_exports = {};
  __export(video_exports, {
    init: () => init120,
    metadata: () => block_default120,
    name: () => name121,
    settings: () => settings120
  });
  var import_i18n270 = __toESM(require_i18n(), 1);
  var import_blocks126 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/video/deprecated.mjs
  var import_block_editor289 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/video/block.json
  var block_default120 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/video",
    title: "Video",
    category: "media",
    description: "Embed a video from your media library or upload a new one.",
    keywords: ["movie"],
    textdomain: "default",
    attributes: {
      autoplay: {
        type: "boolean",
        source: "attribute",
        selector: "video",
        attribute: "autoplay"
      },
      caption: {
        type: "rich-text",
        source: "rich-text",
        selector: "figcaption",
        role: "content"
      },
      controls: {
        type: "boolean",
        source: "attribute",
        selector: "video",
        attribute: "controls",
        default: true
      },
      id: {
        type: "number",
        role: "content"
      },
      loop: {
        type: "boolean",
        source: "attribute",
        selector: "video",
        attribute: "loop"
      },
      muted: {
        type: "boolean",
        source: "attribute",
        selector: "video",
        attribute: "muted"
      },
      poster: {
        type: "string",
        source: "attribute",
        selector: "video",
        attribute: "poster"
      },
      preload: {
        type: "string",
        source: "attribute",
        selector: "video",
        attribute: "preload",
        default: "metadata"
      },
      blob: {
        type: "string",
        role: "local"
      },
      src: {
        type: "string",
        source: "attribute",
        selector: "video",
        attribute: "src",
        role: "content"
      },
      playsInline: {
        type: "boolean",
        source: "attribute",
        selector: "video",
        attribute: "playsinline"
      },
      tracks: {
        role: "content",
        type: "array",
        items: {
          type: "object"
        },
        default: []
      }
    },
    supports: {
      anchor: true,
      align: true,
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-video-editor",
    style: "wp-block-video"
  };

  // packages/block-library/build-module/video/tracks.mjs
  var import_jsx_runtime541 = __toESM(require_jsx_runtime(), 1);
  function Tracks({ tracks = [] }) {
    return tracks.map((track) => {
      const { id, ...trackAttrs } = track;
      return /* @__PURE__ */ (0, import_jsx_runtime541.jsx)("track", { ...trackAttrs }, id ?? trackAttrs.src);
    });
  }

  // packages/block-library/build-module/video/deprecated.mjs
  var import_jsx_runtime542 = __toESM(require_jsx_runtime(), 1);
  var { attributes: blockAttributes7 } = block_default120;
  var v147 = {
    attributes: blockAttributes7,
    save({ attributes: attributes2 }) {
      const {
        autoplay,
        caption,
        controls,
        loop,
        muted,
        poster,
        preload,
        src,
        playsInline,
        tracks
      } = attributes2;
      return /* @__PURE__ */ (0, import_jsx_runtime542.jsxs)("figure", { ...import_block_editor289.useBlockProps.save(), children: [
        src && /* @__PURE__ */ (0, import_jsx_runtime542.jsx)(
          "video",
          {
            autoPlay: autoplay,
            controls,
            loop,
            muted,
            poster,
            preload: preload !== "metadata" ? preload : void 0,
            src,
            playsInline,
            children: /* @__PURE__ */ (0, import_jsx_runtime542.jsx)(Tracks, { tracks })
          }
        ),
        !import_block_editor289.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime542.jsx)(import_block_editor289.RichText.Content, { tagName: "figcaption", value: caption })
      ] });
    }
  };
  var deprecated20 = [v147];
  var deprecated_default53 = deprecated20;

  // packages/block-library/build-module/video/edit.mjs
  var import_blob19 = __toESM(require_blob(), 1);
  var import_components184 = __toESM(require_components(), 1);
  var import_block_editor291 = __toESM(require_block_editor(), 1);
  var import_element143 = __toESM(require_element(), 1);
  var import_i18n269 = __toESM(require_i18n(), 1);
  var import_data167 = __toESM(require_data(), 1);
  var import_notices22 = __toESM(require_notices(), 1);
  var import_url23 = __toESM(require_url(), 1);

  // packages/block-library/build-module/video/edit-common-settings.mjs
  var import_i18n267 = __toESM(require_i18n(), 1);
  var import_components182 = __toESM(require_components(), 1);
  var import_element141 = __toESM(require_element(), 1);
  var import_jsx_runtime543 = __toESM(require_jsx_runtime(), 1);
  var options = [
    { value: "auto", label: (0, import_i18n267.__)("Auto") },
    { value: "metadata", label: (0, import_i18n267.__)("Metadata") },
    { value: "none", label: (0, import_i18n267._x)("None", "Preload value") }
  ];
  var VideoSettings = ({ setAttributes, attributes: attributes2 }) => {
    const { autoplay, controls, loop, muted, playsInline, preload } = attributes2;
    const autoPlayHelpText = (0, import_i18n267.__)(
      "Autoplay may cause usability issues for some users."
    );
    const getAutoplayHelp = import_element141.Platform.select({
      web: (0, import_element141.useCallback)((checked) => {
        return checked ? autoPlayHelpText : null;
      }, []),
      native: autoPlayHelpText
    });
    const toggleFactory = (0, import_element141.useMemo)(() => {
      const toggleAttribute = (attribute) => {
        return (newValue) => {
          setAttributes({
            [attribute]: newValue,
            // Set muted and playsInLine when autoplay changes
            // playsInline is set to true when autoplay is true to support iOS devices
            ...attribute === "autoplay" && {
              muted: newValue,
              playsInline: newValue
            }
          });
        };
      };
      return {
        autoplay: toggleAttribute("autoplay"),
        loop: toggleAttribute("loop"),
        muted: toggleAttribute("muted"),
        controls: toggleAttribute("controls"),
        playsInline: toggleAttribute("playsInline")
      };
    }, []);
    const onChangePreload = (0, import_element141.useCallback)((value) => {
      setAttributes({ preload: value });
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime543.jsxs)(import_jsx_runtime543.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime543.jsx)(
        import_components182.__experimentalToolsPanelItem,
        {
          label: (0, import_i18n267.__)("Autoplay"),
          isShownByDefault: true,
          hasValue: () => !!autoplay,
          onDeselect: () => {
            setAttributes({ autoplay: false, muted: false });
          },
          children: /* @__PURE__ */ (0, import_jsx_runtime543.jsx)(
            import_components182.ToggleControl,
            {
              label: (0, import_i18n267.__)("Autoplay"),
              onChange: toggleFactory.autoplay,
              checked: !!autoplay,
              help: getAutoplayHelp
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime543.jsx)(
        import_components182.__experimentalToolsPanelItem,
        {
          label: (0, import_i18n267.__)("Loop"),
          isShownByDefault: true,
          hasValue: () => !!loop,
          onDeselect: () => {
            setAttributes({ loop: false });
          },
          children: /* @__PURE__ */ (0, import_jsx_runtime543.jsx)(
            import_components182.ToggleControl,
            {
              label: (0, import_i18n267.__)("Loop"),
              onChange: toggleFactory.loop,
              checked: !!loop
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime543.jsx)(
        import_components182.__experimentalToolsPanelItem,
        {
          label: (0, import_i18n267.__)("Muted"),
          isShownByDefault: true,
          hasValue: () => !!muted,
          onDeselect: () => {
            setAttributes({ muted: false });
          },
          children: /* @__PURE__ */ (0, import_jsx_runtime543.jsx)(
            import_components182.ToggleControl,
            {
              label: (0, import_i18n267.__)("Muted"),
              onChange: toggleFactory.muted,
              checked: !!muted,
              disabled: autoplay,
              help: autoplay ? (0, import_i18n267.__)("Muted because of Autoplay.") : null
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime543.jsx)(
        import_components182.__experimentalToolsPanelItem,
        {
          label: (0, import_i18n267.__)("Playback controls"),
          isShownByDefault: true,
          hasValue: () => !controls,
          onDeselect: () => {
            setAttributes({ controls: true });
          },
          children: /* @__PURE__ */ (0, import_jsx_runtime543.jsx)(
            import_components182.ToggleControl,
            {
              label: (0, import_i18n267.__)("Playback controls"),
              onChange: toggleFactory.controls,
              checked: !!controls
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime543.jsx)(
        import_components182.__experimentalToolsPanelItem,
        {
          label: (0, import_i18n267.__)("Play inline"),
          isShownByDefault: true,
          hasValue: () => !!playsInline,
          onDeselect: () => {
            setAttributes({ playsInline: false });
          },
          children: /* @__PURE__ */ (0, import_jsx_runtime543.jsx)(
            import_components182.ToggleControl,
            {
              label: (0, import_i18n267.__)("Play inline"),
              onChange: toggleFactory.playsInline,
              checked: !!playsInline,
              disabled: autoplay,
              help: autoplay ? (0, import_i18n267.__)("Play inline enabled because of Autoplay.") : (0, import_i18n267.__)(
                "When enabled, videos will play directly within the webpage on mobile browsers, instead of opening in a fullscreen player."
              )
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime543.jsx)(
        import_components182.__experimentalToolsPanelItem,
        {
          label: (0, import_i18n267.__)("Preload"),
          isShownByDefault: true,
          hasValue: () => preload !== "metadata",
          onDeselect: () => {
            setAttributes({ preload: "metadata" });
          },
          children: /* @__PURE__ */ (0, import_jsx_runtime543.jsx)(
            import_components182.SelectControl,
            {
              __next40pxDefaultSize: true,
              label: (0, import_i18n267.__)("Preload"),
              value: preload,
              onChange: onChangePreload,
              options,
              hideCancelButton: true
            }
          )
        }
      )
    ] });
  };
  var edit_common_settings_default = VideoSettings;

  // packages/block-library/build-module/video/tracks-editor.mjs
  var import_i18n268 = __toESM(require_i18n(), 1);
  var import_components183 = __toESM(require_components(), 1);
  var import_block_editor290 = __toESM(require_block_editor(), 1);
  var import_data166 = __toESM(require_data(), 1);
  var import_element142 = __toESM(require_element(), 1);
  var import_url22 = __toESM(require_url(), 1);
  var import_jsx_runtime544 = __toESM(require_jsx_runtime(), 1);
  var { Badge: Badge2 } = unlock(import_components183.privateApis);
  var ALLOWED_TYPES = ["text/vtt"];
  var DEFAULT_KIND = "subtitles";
  var KIND_OPTIONS = [
    { label: (0, import_i18n268.__)("Subtitles"), value: "subtitles" },
    { label: (0, import_i18n268.__)("Captions"), value: "captions" },
    { label: (0, import_i18n268.__)("Descriptions"), value: "descriptions" },
    { label: (0, import_i18n268.__)("Chapters"), value: "chapters" },
    { label: (0, import_i18n268.__)("Metadata"), value: "metadata" }
  ];
  var DEFAULT_TRACK = {
    src: "",
    label: "",
    srcLang: "en",
    kind: DEFAULT_KIND,
    default: false
  };
  function TrackList({ tracks, onEditPress }) {
    const content = tracks.map((track, index) => {
      return /* @__PURE__ */ (0, import_jsx_runtime544.jsxs)(
        import_components183.__experimentalHStack,
        {
          className: "block-library-video-tracks-editor__track-list-track",
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime544.jsx)("span", { children: track.label }),
            /* @__PURE__ */ (0, import_jsx_runtime544.jsxs)(import_components183.__experimentalHStack, { justify: "flex-end", children: [
              track.default && /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(Badge2, { children: (0, import_i18n268.__)("Default") }),
              /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
                import_components183.Button,
                {
                  __next40pxDefaultSize: true,
                  variant: "tertiary",
                  onClick: () => onEditPress(index),
                  "aria-label": (0, import_i18n268.sprintf)(
                    /* translators: %s: Label of the video text track e.g: "French subtitles". */
                    (0, import_i18n268._x)("Edit %s", "text tracks"),
                    track.label
                  ),
                  children: (0, import_i18n268.__)("Edit")
                }
              )
            ] })
          ]
        },
        track.id ?? track.src
      );
    });
    return /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
      import_components183.MenuGroup,
      {
        label: (0, import_i18n268.__)("Text tracks"),
        className: "block-library-video-tracks-editor__track-list",
        children: content
      }
    );
  }
  function SingleTrackEditor({
    track,
    onChange,
    onClose,
    onRemove,
    allowSettingDefault
  }) {
    const [trackState, setTrackState] = (0, import_element142.useState)({
      ...DEFAULT_TRACK,
      ...track
    });
    const { src, label, srcLang, kind, default: isDefaultTrack } = trackState;
    const fileName = src.startsWith("blob:") ? "" : (0, import_url22.getFilename)(src) || "";
    return /* @__PURE__ */ (0, import_jsx_runtime544.jsxs)(
      import_components183.__experimentalVStack,
      {
        className: "block-library-video-tracks-editor__single-track-editor",
        spacing: "4",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime544.jsx)("span", { className: "block-library-video-tracks-editor__single-track-editor-edit-track-label", children: (0, import_i18n268.__)("Edit track") }),
          /* @__PURE__ */ (0, import_jsx_runtime544.jsxs)("span", { children: [
            (0, import_i18n268.__)("File"),
            ": ",
            /* @__PURE__ */ (0, import_jsx_runtime544.jsx)("b", { children: fileName })
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime544.jsxs)(import_components183.__experimentalGrid, { columns: 2, gap: 4, children: [
            /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
              import_components183.TextControl,
              {
                __next40pxDefaultSize: true,
                onChange: (newLabel) => setTrackState((prevTrackState) => ({
                  ...prevTrackState,
                  label: newLabel
                })),
                label: (0, import_i18n268.__)("Label"),
                value: label,
                help: (0, import_i18n268.__)("Title of track")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
              import_components183.TextControl,
              {
                __next40pxDefaultSize: true,
                onChange: (newSrcLang) => setTrackState((prevTrackState) => ({
                  ...prevTrackState,
                  srcLang: newSrcLang
                })),
                label: (0, import_i18n268.__)("Source language"),
                value: srcLang,
                help: (0, import_i18n268.__)("Language tag (en, fr, etc.)")
              }
            )
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime544.jsxs)(import_components183.__experimentalVStack, { spacing: "4", children: [
            /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
              import_components183.SelectControl,
              {
                __next40pxDefaultSize: true,
                className: "block-library-video-tracks-editor__single-track-editor-kind-select",
                options: KIND_OPTIONS,
                value: kind,
                label: (0, import_i18n268.__)("Kind"),
                onChange: (newKind) => setTrackState((prevTrackState) => ({
                  ...prevTrackState,
                  kind: newKind
                }))
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
              import_components183.ToggleControl,
              {
                __next40pxDefaultSize: true,
                label: (0, import_i18n268.__)("Set as default track"),
                checked: isDefaultTrack,
                disabled: !allowSettingDefault,
                onChange: (defaultTrack) => setTrackState((prevTrackState) => ({
                  ...prevTrackState,
                  default: defaultTrack
                }))
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime544.jsxs)(import_components183.__experimentalHStack, { className: "block-library-video-tracks-editor__single-track-editor-buttons-container", children: [
              /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
                import_components183.Button,
                {
                  __next40pxDefaultSize: true,
                  isDestructive: true,
                  variant: "link",
                  onClick: onRemove,
                  children: (0, import_i18n268.__)("Remove track")
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
                import_components183.Button,
                {
                  __next40pxDefaultSize: true,
                  variant: "primary",
                  onClick: () => {
                    onChange(trackState);
                    onClose();
                  },
                  children: (0, import_i18n268.__)("Apply")
                }
              )
            ] })
          ] })
        ]
      }
    );
  }
  function TracksEditor({ tracks = [], onChange }) {
    const mediaUpload = (0, import_data166.useSelect)((select9) => {
      return select9(import_block_editor290.store).getSettings().mediaUpload;
    }, []);
    const [trackBeingEdited, setTrackBeingEdited] = (0, import_element142.useState)(null);
    const dropdownPopoverRef = (0, import_element142.useRef)();
    const handleTrackSelect = (selectedTracks = [], appendTracks = false) => {
      const existingTracksMap = new Map(
        tracks.map((track) => [track.id, track])
      );
      const tracksToAdd = selectedTracks.map(({ id, title, url }) => {
        if (existingTracksMap.has(id)) {
          return existingTracksMap.get(id);
        }
        return {
          ...DEFAULT_TRACK,
          id,
          label: title || "",
          src: url
        };
      });
      if (tracksToAdd.length === 0) {
        return;
      }
      onChange([...appendTracks ? tracks : [], ...tracksToAdd]);
    };
    function uploadFiles(event) {
      const files = event.target.files;
      mediaUpload({
        allowedTypes: ALLOWED_TYPES,
        filesList: files,
        onFileChange: (selectedTracks) => {
          if (!Array.isArray(selectedTracks)) {
            return;
          }
          const uploadedTracks = selectedTracks.filter(
            (track) => !!track?.id
          );
          if (!uploadedTracks.length) {
            return;
          }
          handleTrackSelect(uploadedTracks, true);
        }
      });
    }
    (0, import_element142.useEffect)(() => {
      dropdownPopoverRef.current?.focus();
    }, [trackBeingEdited]);
    if (!mediaUpload) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
      import_components183.Dropdown,
      {
        contentClassName: "block-library-video-tracks-editor",
        focusOnMount: true,
        popoverProps: {
          ref: dropdownPopoverRef
        },
        renderToggle: ({ isOpen, onToggle }) => {
          const handleOnToggle = () => {
            if (!isOpen) {
              setTrackBeingEdited(null);
            }
            onToggle();
          };
          return /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(import_components183.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
            import_components183.ToolbarButton,
            {
              "aria-expanded": isOpen,
              "aria-haspopup": "true",
              onClick: handleOnToggle,
              children: (0, import_i18n268.__)("Text tracks")
            }
          ) });
        },
        renderContent: () => {
          if (trackBeingEdited !== null) {
            return /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
              SingleTrackEditor,
              {
                track: tracks[trackBeingEdited],
                onChange: (newTrack) => {
                  const newTracks = [...tracks];
                  newTracks[trackBeingEdited] = newTrack;
                  onChange(newTracks);
                },
                onClose: () => setTrackBeingEdited(null),
                onRemove: () => {
                  onChange(
                    tracks.filter(
                      (_track, index) => index !== trackBeingEdited
                    )
                  );
                  setTrackBeingEdited(null);
                },
                allowSettingDefault: !tracks.some((track) => track.default) || tracks[trackBeingEdited].default
              }
            );
          }
          return /* @__PURE__ */ (0, import_jsx_runtime544.jsxs)(import_jsx_runtime544.Fragment, { children: [
            tracks.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime544.jsxs)("div", { className: "block-library-video-tracks-editor__tracks-informative-message", children: [
              /* @__PURE__ */ (0, import_jsx_runtime544.jsx)("h2", { className: "block-library-video-tracks-editor__tracks-informative-message-title", children: (0, import_i18n268.__)("Text tracks") }),
              /* @__PURE__ */ (0, import_jsx_runtime544.jsx)("p", { className: "block-library-video-tracks-editor__tracks-informative-message-description", children: (0, import_i18n268.__)(
                "Tracks can be subtitles, captions, chapters, or descriptions. They help make your content more accessible to a wider range of users."
              ) })
            ] }),
            /* @__PURE__ */ (0, import_jsx_runtime544.jsxs)(import_components183.NavigableMenu, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
                TrackList,
                {
                  tracks,
                  onEditPress: setTrackBeingEdited
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
                import_components183.MenuGroup,
                {
                  className: "block-library-video-tracks-editor__add-tracks-container",
                  label: (0, import_i18n268.__)("Add tracks"),
                  children: /* @__PURE__ */ (0, import_jsx_runtime544.jsxs)(import_block_editor290.MediaUploadCheck, { children: [
                    /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
                      import_block_editor290.MediaUpload,
                      {
                        onSelect: handleTrackSelect,
                        allowedTypes: ALLOWED_TYPES,
                        value: tracks.map(({ id }) => id),
                        multiple: true,
                        render: ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
                          import_components183.MenuItem,
                          {
                            icon: media_default,
                            onClick: open,
                            children: (0, import_i18n268.__)("Open Media Library")
                          }
                        )
                      }
                    ),
                    /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
                      import_components183.FormFileUpload,
                      {
                        onChange: uploadFiles,
                        accept: ".vtt,text/vtt",
                        multiple: true,
                        render: ({ openFileDialog }) => {
                          return /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
                            import_components183.MenuItem,
                            {
                              icon: upload_default,
                              onClick: openFileDialog,
                              children: (0, import_i18n268._x)("Upload", "verb")
                            }
                          );
                        }
                      }
                    )
                  ] })
                }
              )
            ] })
          ] });
        }
      }
    );
  }

  // packages/block-library/build-module/video/edit.mjs
  var import_jsx_runtime545 = __toESM(require_jsx_runtime(), 1);
  var ALLOWED_MEDIA_TYPES10 = ["video"];
  function VideoEdit({
    isSelected: isSingleSelected,
    attributes: attributes2,
    className,
    setAttributes,
    insertBlocksAfter,
    onReplace
  }) {
    const videoPlayer = (0, import_element143.useRef)();
    const { id, controls, poster, src, tracks } = attributes2;
    const [temporaryURL, setTemporaryURL] = (0, import_element143.useState)(attributes2.blob);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const blockEditingMode = (0, import_block_editor291.useBlockEditingMode)();
    const hasNonContentControls = blockEditingMode === "default";
    useUploadMediaFromBlobURL({
      url: temporaryURL,
      allowedTypes: ALLOWED_MEDIA_TYPES10,
      onChange: onSelectVideo,
      onError: onUploadError
    });
    (0, import_element143.useEffect)(() => {
      if (videoPlayer.current) {
        videoPlayer.current.load();
      }
    }, [poster]);
    function onSelectVideo(media) {
      if (!media || !media.url) {
        setAttributes({
          src: void 0,
          id: void 0,
          poster: void 0,
          caption: void 0,
          blob: void 0
        });
        setTemporaryURL();
        return;
      }
      if ((0, import_blob19.isBlobURL)(media.url)) {
        setTemporaryURL(media.url);
        return;
      }
      setAttributes({
        blob: void 0,
        src: media.url,
        id: media.id,
        poster: media.image?.src !== media.icon ? media.image?.src : void 0,
        caption: media.caption
      });
      setTemporaryURL();
    }
    function onSelectURL(newSrc) {
      if (newSrc !== src) {
        const url = (0, import_url23.prependHTTPS)(newSrc);
        const embedBlock = createUpgradedEmbedBlock({
          attributes: { url }
        });
        if (void 0 !== embedBlock && onReplace) {
          onReplace(embedBlock);
          return;
        }
        setAttributes({
          blob: void 0,
          src: url,
          id: void 0,
          poster: void 0
        });
        setTemporaryURL();
      }
    }
    const { createErrorNotice } = (0, import_data167.useDispatch)(import_notices22.store);
    function onUploadError(message) {
      createErrorNotice(message, { type: "snackbar" });
    }
    const placeholder2 = (content) => {
      return /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(
        import_components184.Placeholder,
        {
          className: "block-editor-media-placeholder",
          withIllustration: !isSingleSelected,
          icon: video_default,
          label: (0, import_i18n269.__)("Video"),
          instructions: (0, import_i18n269.__)(
            "Drag and drop a video, upload, or choose from your library."
          ),
          children: content
        }
      );
    };
    const classes = clsx_default(className, {
      "is-transient": !!temporaryURL
    });
    const blockProps = (0, import_block_editor291.useBlockProps)({
      className: classes
    });
    if (!src && !temporaryURL) {
      return /* @__PURE__ */ (0, import_jsx_runtime545.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(
        import_block_editor291.MediaPlaceholder,
        {
          icon: /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(import_block_editor291.BlockIcon, { icon: video_default }),
          onSelect: onSelectVideo,
          onSelectURL,
          accept: "video/*",
          allowedTypes: ALLOWED_MEDIA_TYPES10,
          value: attributes2,
          onError: onUploadError,
          placeholder: placeholder2
        }
      ) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime545.jsxs)(import_jsx_runtime545.Fragment, { children: [
      isSingleSelected && /* @__PURE__ */ (0, import_jsx_runtime545.jsxs)(import_jsx_runtime545.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(import_block_editor291.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(
          TracksEditor,
          {
            tracks,
            onChange: (newTracks) => {
              setAttributes({ tracks: newTracks });
            }
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(import_block_editor291.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(
          import_block_editor291.MediaReplaceFlow,
          {
            mediaId: id,
            mediaURL: src,
            allowedTypes: ALLOWED_MEDIA_TYPES10,
            accept: "video/*",
            onSelect: onSelectVideo,
            onSelectURL,
            onError: onUploadError,
            onReset: () => onSelectVideo(void 0),
            variant: "toolbar"
          }
        ) })
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(import_block_editor291.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime545.jsxs)(
        import_components184.__experimentalToolsPanel,
        {
          label: (0, import_i18n269.__)("Settings"),
          resetAll: () => {
            setAttributes({
              autoplay: false,
              controls: true,
              loop: false,
              muted: false,
              playsInline: false,
              preload: "metadata",
              poster: void 0
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(
              edit_common_settings_default,
              {
                setAttributes,
                attributes: attributes2
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(
              poster_image_default,
              {
                poster,
                onChange: (posterImage) => setAttributes({
                  poster: posterImage?.url
                })
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime545.jsxs)("figure", { ...blockProps, children: [
        /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(import_components184.Disabled, { isDisabled: !isSingleSelected, children: /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(
          "video",
          {
            controls,
            poster,
            src: src || temporaryURL,
            ref: videoPlayer,
            children: /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(Tracks, { tracks })
          }
        ) }),
        !!temporaryURL && /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(import_components184.Spinner, {}),
        /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(
          Caption,
          {
            attributes: attributes2,
            setAttributes,
            isSelected: isSingleSelected,
            insertBlocksAfter,
            label: (0, import_i18n269.__)("Video caption text"),
            showToolbarButton: isSingleSelected && hasNonContentControls
          }
        )
      ] })
    ] });
  }
  var edit_default41 = VideoEdit;

  // packages/block-library/build-module/video/save.mjs
  var import_block_editor292 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime546 = __toESM(require_jsx_runtime(), 1);
  function save58({ attributes: attributes2 }) {
    const {
      autoplay,
      caption,
      controls,
      loop,
      muted,
      poster,
      preload,
      src,
      playsInline,
      tracks
    } = attributes2;
    return /* @__PURE__ */ (0, import_jsx_runtime546.jsxs)("figure", { ...import_block_editor292.useBlockProps.save(), children: [
      src && /* @__PURE__ */ (0, import_jsx_runtime546.jsx)(
        "video",
        {
          autoPlay: autoplay,
          controls,
          loop,
          muted,
          poster,
          preload: preload !== "metadata" ? preload : void 0,
          src,
          playsInline,
          children: /* @__PURE__ */ (0, import_jsx_runtime546.jsx)(Tracks, { tracks })
        }
      ),
      !import_block_editor292.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime546.jsx)(
        import_block_editor292.RichText.Content,
        {
          className: (0, import_block_editor292.__experimentalGetElementClassName)("caption"),
          tagName: "figcaption",
          value: caption
        }
      )
    ] });
  }

  // packages/block-library/build-module/video/transforms.mjs
  var import_blob20 = __toESM(require_blob(), 1);
  var import_blocks125 = __toESM(require_blocks(), 1);
  var transforms38 = {
    from: [
      {
        type: "files",
        isMatch(files) {
          return files.length === 1 && files[0].type.indexOf("video/") === 0;
        },
        transform(files) {
          const file = files[0];
          const block = (0, import_blocks125.createBlock)("core/video", {
            blob: (0, import_blob20.createBlobURL)(file)
          });
          return block;
        }
      },
      {
        type: "shortcode",
        tag: "video",
        attributes: {
          src: {
            type: "string",
            shortcode: ({
              named: { src, mp4, m4v, webm, ogv, flv }
            }) => {
              return src || mp4 || m4v || webm || ogv || flv;
            }
          },
          poster: {
            type: "string",
            shortcode: ({ named: { poster } }) => {
              return poster;
            }
          },
          loop: {
            type: "string",
            shortcode: ({ named: { loop } }) => {
              return loop;
            }
          },
          autoplay: {
            type: "string",
            shortcode: ({ named: { autoplay } }) => {
              return autoplay;
            }
          },
          preload: {
            type: "string",
            shortcode: ({ named: { preload } }) => {
              return preload;
            }
          }
        }
      },
      {
        type: "raw",
        isMatch: (node) => node.nodeName === "P" && node.children.length === 1 && node.firstChild.nodeName === "VIDEO",
        transform: (node) => {
          const videoElement = node.firstChild;
          const attributes2 = {
            autoplay: videoElement.hasAttribute("autoplay") ? true : void 0,
            controls: videoElement.hasAttribute("controls") ? void 0 : false,
            loop: videoElement.hasAttribute("loop") ? true : void 0,
            muted: videoElement.hasAttribute("muted") ? true : void 0,
            preload: videoElement.getAttribute("preload") || void 0,
            playsInline: videoElement.hasAttribute("playsinline") ? true : void 0,
            poster: videoElement.getAttribute("poster") || void 0,
            src: videoElement.getAttribute("src") || void 0
          };
          if ((0, import_blob20.isBlobURL)(attributes2.src)) {
            attributes2.blob = attributes2.src;
            delete attributes2.src;
          }
          return (0, import_blocks125.createBlock)("core/video", attributes2);
        }
      }
    ]
  };
  var transforms_default39 = transforms38;

  // packages/block-library/build-module/video/index.mjs
  var { fieldsKey: fieldsKey20, formKey: formKey20 } = unlock(import_blocks126.privateApis);
  var { name: name121 } = block_default120;
  var settings120 = {
    icon: video_default,
    example: {
      attributes: {
        src: "https://upload.wikimedia.org/wikipedia/commons/c/ca/Wood_thrush_in_Central_Park_switch_sides_%2816510%29.webm",
        // translators: Caption accompanying a video of the wood thrush singing, which serves as an example for the Video block.
        caption: (0, import_i18n270.__)("Wood thrush singing in Central Park, NYC.")
      }
    },
    transforms: transforms_default39,
    deprecated: deprecated_default53,
    edit: edit_default41,
    save: save58
  };
  if (window.__experimentalContentOnlyInspectorFields) {
    settings120[fieldsKey20] = [
      {
        id: "video",
        label: (0, import_i18n270.__)("Video"),
        type: "media",
        Edit: {
          control: "media",
          // TODO: replace with custom component
          allowedTypes: ["video"],
          multiple: false
        },
        getValue: ({ item }) => ({
          id: item.id,
          url: item.src,
          caption: item.caption,
          poster: item.poster
        }),
        setValue: ({ value }) => ({
          id: value.id,
          src: value.url,
          caption: value.caption,
          poster: value.poster
        })
      },
      {
        id: "caption",
        label: (0, import_i18n270.__)("Caption"),
        type: "text",
        Edit: "rich-text"
        // TODO: replace with custom component
      }
    ];
    settings120[formKey20] = {
      fields: ["video", "caption"]
    };
  }
  var init120 = () => initBlock({ name: name121, metadata: block_default120, settings: settings120 });

  // packages/block-library/build-module/footnotes/index.mjs
  var footnotes_exports = {};
  __export(footnotes_exports, {
    init: () => init121,
    metadata: () => block_default121,
    name: () => name122,
    settings: () => settings121
  });
  var import_rich_text7 = __toESM(require_rich_text(), 1);

  // packages/block-library/build-module/footnotes/edit.mjs
  var import_block_editor293 = __toESM(require_block_editor(), 1);
  var import_core_data97 = __toESM(require_core_data(), 1);
  var import_i18n271 = __toESM(require_i18n(), 1);
  var import_components185 = __toESM(require_components(), 1);
  var import_jsx_runtime547 = __toESM(require_jsx_runtime(), 1);
  function FootnotesEdit({ context: { postType, postId } }) {
    const [meta, updateMeta] = (0, import_core_data97.useEntityProp)(
      "postType",
      postType,
      "meta",
      postId
    );
    const footnotesSupported = "string" === typeof meta?.footnotes;
    const footnotes = meta?.footnotes ? JSON.parse(meta.footnotes) : [];
    const blockProps = (0, import_block_editor293.useBlockProps)();
    if (!footnotesSupported) {
      return /* @__PURE__ */ (0, import_jsx_runtime547.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime547.jsx)(
        import_components185.Placeholder,
        {
          icon: /* @__PURE__ */ (0, import_jsx_runtime547.jsx)(import_block_editor293.BlockIcon, { icon: format_list_numbered_default }),
          label: (0, import_i18n271.__)("Footnotes"),
          instructions: (0, import_i18n271.__)(
            "Footnotes are not supported here. Add this block to post or page content."
          )
        }
      ) });
    }
    if (!footnotes.length) {
      return /* @__PURE__ */ (0, import_jsx_runtime547.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime547.jsx)(
        import_components185.Placeholder,
        {
          icon: /* @__PURE__ */ (0, import_jsx_runtime547.jsx)(import_block_editor293.BlockIcon, { icon: format_list_numbered_default }),
          label: (0, import_i18n271.__)("Footnotes"),
          instructions: (0, import_i18n271.__)(
            "Footnotes found in blocks within this document will be displayed here."
          )
        }
      ) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime547.jsx)("ol", { ...blockProps, children: footnotes.map(({ id, content }) => (
      /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */
      /* @__PURE__ */ (0, import_jsx_runtime547.jsxs)(
        "li",
        {
          onMouseDown: (event) => {
            if (event.target === event.currentTarget) {
              event.target.firstElementChild.focus();
              event.preventDefault();
            }
          },
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime547.jsx)(
              import_block_editor293.RichText,
              {
                id,
                tagName: "span",
                value: content,
                identifier: id,
                onFocus: (event) => {
                  if (!event.target.textContent.trim()) {
                    event.target.scrollIntoView();
                  }
                },
                onChange: (nextFootnote) => {
                  updateMeta({
                    ...meta,
                    footnotes: JSON.stringify(
                      footnotes.map((footnote) => {
                        return footnote.id === id ? {
                          content: nextFootnote,
                          id
                        } : footnote;
                      })
                    )
                  });
                }
              }
            ),
            " ",
            /* @__PURE__ */ (0, import_jsx_runtime547.jsx)("a", { href: `#${id}-link`, children: "\u21A9\uFE0E" })
          ]
        },
        id
      )
    )) });
  }

  // packages/block-library/build-module/footnotes/block.json
  var block_default121 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/footnotes",
    title: "Footnotes",
    category: "text",
    description: "Display footnotes added to the page.",
    keywords: ["references"],
    textdomain: "default",
    usesContext: ["postId", "postType"],
    supports: {
      anchor: true,
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: false,
          color: false,
          width: false,
          style: false
        }
      },
      color: {
        background: true,
        link: true,
        text: true,
        __experimentalDefaultControls: {
          link: true,
          text: true
        }
      },
      html: false,
      multiple: false,
      reusable: false,
      inserter: false,
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalTextDecoration: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalWritingMode: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    style: "wp-block-footnotes"
  };

  // packages/block-library/build-module/footnotes/format.mjs
  var import_i18n272 = __toESM(require_i18n(), 1);
  var import_rich_text6 = __toESM(require_rich_text(), 1);
  var import_block_editor294 = __toESM(require_block_editor(), 1);
  var import_data168 = __toESM(require_data(), 1);
  var import_core_data98 = __toESM(require_core_data(), 1);
  var import_blocks127 = __toESM(require_blocks(), 1);
  var import_jsx_runtime548 = __toESM(require_jsx_runtime(), 1);
  var formatName = "core/footnote";
  var { usesContextKey } = unlock(import_block_editor294.privateApis);
  var POST_CONTENT_BLOCK_NAME = "core/post-content";
  var SYNCED_PATTERN_BLOCK_NAME = "core/block";
  var format2 = {
    title: (0, import_i18n272.__)("Footnote"),
    tagName: "sup",
    className: "fn",
    attributes: {
      "data-fn": "data-fn"
    },
    interactive: true,
    contentEditable: false,
    [usesContextKey]: ["postType", "postId"],
    edit: function Edit24({
      value,
      onChange,
      isObjectActive,
      context: { postType, postId }
    }) {
      const registry = (0, import_data168.useRegistry)();
      const {
        getSelectedBlockClientId,
        getBlocks,
        getBlockRootClientId,
        getBlockName,
        getBlockParentsByBlockName
      } = registry.select(import_block_editor294.store);
      const isFootnotesSupported = (0, import_data168.useSelect)(
        (select9) => {
          if (!select9(import_blocks127.store).getBlockType("core/footnotes")) {
            return false;
          }
          const allowedBlocks = select9(import_block_editor294.store).getSettings().allowedBlockTypes;
          if (allowedBlocks === false || Array.isArray(allowedBlocks) && !allowedBlocks.includes("core/footnotes")) {
            return false;
          }
          const entityRecord = select9(import_core_data98.store).getEntityRecord(
            "postType",
            postType,
            postId
          );
          if ("string" !== typeof entityRecord?.meta?.footnotes) {
            return false;
          }
          const {
            getBlockParentsByBlockName: _getBlockParentsByBlockName,
            getSelectedBlockClientId: _getSelectedBlockClientId,
            getBlockName: _getBlockName
          } = select9(import_block_editor294.store);
          const selectedClientId = _getSelectedBlockClientId();
          if (!selectedClientId) {
            return false;
          }
          if (_getBlockName(selectedClientId) === name122) {
            return false;
          }
          const parentCoreBlocks = _getBlockParentsByBlockName(
            selectedClientId,
            SYNCED_PATTERN_BLOCK_NAME
          );
          return !parentCoreBlocks || parentCoreBlocks.length === 0;
        },
        [postType, postId]
      );
      const { selectionChange, insertBlock } = (0, import_data168.useDispatch)(import_block_editor294.store);
      if (!isFootnotesSupported) {
        return null;
      }
      function onClick() {
        registry.batch(() => {
          let id;
          if (isObjectActive) {
            const object = value.replacements[value.start];
            id = object?.attributes?.["data-fn"];
          } else {
            id = v4_default();
            const newValue = (0, import_rich_text6.insertObject)(
              value,
              {
                type: formatName,
                attributes: {
                  "data-fn": id
                },
                innerHTML: `<a href="#${id}" id="${id}-link">*</a>`
              },
              value.end,
              value.end
            );
            newValue.start = newValue.end - 1;
            onChange(newValue);
          }
          const selectedClientId = getSelectedBlockClientId();
          const parentPostContent = getBlockParentsByBlockName(
            selectedClientId,
            POST_CONTENT_BLOCK_NAME
          );
          const blocks = parentPostContent.length ? getBlocks(parentPostContent[0]) : getBlocks();
          let fnBlock = null;
          {
            const queue = [...blocks];
            while (queue.length) {
              const block = queue.shift();
              if (block.name === "core/footnotes") {
                fnBlock = block;
                break;
              }
              queue.push(...block.innerBlocks);
            }
          }
          if (!fnBlock) {
            let rootClientId = getBlockRootClientId(selectedClientId);
            while (rootClientId && getBlockName(rootClientId) !== POST_CONTENT_BLOCK_NAME) {
              rootClientId = getBlockRootClientId(rootClientId);
            }
            fnBlock = (0, import_blocks127.createBlock)("core/footnotes");
            insertBlock(fnBlock, void 0, rootClientId);
          }
          selectionChange(fnBlock.clientId, id, 0, 0);
        });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime548.jsx)(
        import_block_editor294.RichTextToolbarButton,
        {
          icon: format_list_numbered_default,
          title: (0, import_i18n272.__)("Footnote"),
          onClick,
          isActive: isObjectActive
        }
      );
    }
  };

  // packages/block-library/build-module/footnotes/index.mjs
  var { name: name122 } = block_default121;
  var settings121 = {
    icon: format_list_numbered_default,
    edit: FootnotesEdit
  };
  var init121 = () => {
    (0, import_rich_text7.registerFormatType)(formatName, format2);
    initBlock({ name: name122, metadata: block_default121, settings: settings121 });
  };

  // packages/block-library/build-module/utils/is-block-metadata-experimental.mjs
  function isBlockMetadataExperimental(metadata) {
    return metadata && "__experimental" in metadata && metadata.__experimental !== false;
  }

  // packages/block-library/build-module/block-keyboard-shortcuts/index.mjs
  var import_element144 = __toESM(require_element(), 1);
  var import_data169 = __toESM(require_data(), 1);
  var import_keyboard_shortcuts = __toESM(require_keyboard_shortcuts(), 1);
  var import_i18n273 = __toESM(require_i18n(), 1);
  var import_blocks128 = __toESM(require_blocks(), 1);
  var import_block_editor295 = __toESM(require_block_editor(), 1);
  function BlockKeyboardShortcuts() {
    const { registerShortcut } = (0, import_data169.useDispatch)(import_keyboard_shortcuts.store);
    const { replaceBlocks } = (0, import_data169.useDispatch)(import_block_editor295.store);
    const { getBlockName, getSelectedBlockClientId, getBlockAttributes: getBlockAttributes4 } = (0, import_data169.useSelect)(import_block_editor295.store);
    const handleTransformHeadingAndParagraph = (event, level) => {
      event.preventDefault();
      const currentClientId = getSelectedBlockClientId();
      if (currentClientId === null) {
        return;
      }
      const blockName = getBlockName(currentClientId);
      const isParagraph = blockName === "core/paragraph";
      const isHeading = blockName === "core/heading";
      if (!isParagraph && !isHeading) {
        return;
      }
      const destinationBlockName = level === 0 ? "core/paragraph" : "core/heading";
      const attributes2 = getBlockAttributes4(currentClientId);
      if (isParagraph && level === 0 || isHeading && attributes2.level === level) {
        return;
      }
      const newAttributes = {
        content: attributes2.content
      };
      const sourceTextAlign = attributes2.textAlign || attributes2.style?.typography?.textAlign;
      if (destinationBlockName === "core/heading") {
        newAttributes.level = level;
      }
      if (sourceTextAlign) {
        newAttributes.style = {
          typography: {
            textAlign: sourceTextAlign
          }
        };
      }
      replaceBlocks(
        currentClientId,
        (0, import_blocks128.createBlock)(destinationBlockName, newAttributes)
      );
    };
    (0, import_element144.useEffect)(() => {
      registerShortcut({
        name: "core/block-editor/transform-heading-to-paragraph",
        category: "block-library",
        description: (0, import_i18n273.__)("Transform heading to paragraph."),
        keyCombination: {
          modifier: "access",
          character: "0"
        },
        aliases: [
          {
            modifier: "access",
            character: "7"
          }
        ]
      });
      [1, 2, 3, 4, 5, 6].forEach((level) => {
        registerShortcut({
          name: `core/block-editor/transform-paragraph-to-heading-${level}`,
          category: "block-library",
          description: (0, import_i18n273.__)("Transform paragraph to heading."),
          keyCombination: {
            modifier: "access",
            character: `${level}`
          }
        });
      });
    }, [registerShortcut]);
    (0, import_keyboard_shortcuts.useShortcut)(
      "core/block-editor/transform-heading-to-paragraph",
      (event) => handleTransformHeadingAndParagraph(event, 0)
    );
    (0, import_keyboard_shortcuts.useShortcut)(
      "core/block-editor/transform-paragraph-to-heading-1",
      (event) => handleTransformHeadingAndParagraph(event, 1)
    );
    (0, import_keyboard_shortcuts.useShortcut)(
      "core/block-editor/transform-paragraph-to-heading-2",
      (event) => handleTransformHeadingAndParagraph(event, 2)
    );
    (0, import_keyboard_shortcuts.useShortcut)(
      "core/block-editor/transform-paragraph-to-heading-3",
      (event) => handleTransformHeadingAndParagraph(event, 3)
    );
    (0, import_keyboard_shortcuts.useShortcut)(
      "core/block-editor/transform-paragraph-to-heading-4",
      (event) => handleTransformHeadingAndParagraph(event, 4)
    );
    (0, import_keyboard_shortcuts.useShortcut)(
      "core/block-editor/transform-paragraph-to-heading-5",
      (event) => handleTransformHeadingAndParagraph(event, 5)
    );
    (0, import_keyboard_shortcuts.useShortcut)(
      "core/block-editor/transform-paragraph-to-heading-6",
      (event) => handleTransformHeadingAndParagraph(event, 6)
    );
    return null;
  }
  var block_keyboard_shortcuts_default = BlockKeyboardShortcuts;

  // packages/block-library/build-module/private-apis.mjs
  var privateApis3 = {};
  lock(privateApis3, {
    BlockKeyboardShortcuts: block_keyboard_shortcuts_default,
    NAVIGATION_OVERLAY_TEMPLATE_PART_AREA
  });

  // packages/block-library/build-module/index.mjs
  var import_jsx_runtime549 = __toESM(require_jsx_runtime(), 1);
  var getAllBlocks = () => {
    const blocks = [
      // Common blocks are grouped at the top to prioritize their display
      // in various contexts â€” like the inserter and auto-complete components.
      paragraph_exports,
      image_exports,
      heading_exports,
      gallery_exports,
      list_exports,
      list_item_exports,
      quote_exports,
      // Register all remaining core blocks.
      accordion_exports,
      accordion_item_exports,
      accordion_heading_exports,
      accordion_panel_exports,
      archives_exports,
      audio_exports,
      button_exports,
      buttons_exports,
      calendar_exports,
      categories_exports,
      code_exports,
      column_exports,
      columns_exports,
      comment_author_avatar_exports,
      cover_exports,
      details_exports,
      embed_exports,
      file_exports,
      group_exports,
      html_exports,
      math_exports,
      latest_comments_exports,
      latest_posts_exports,
      media_text_exports,
      missing_exports,
      more_exports,
      nextpage_exports,
      page_list_exports,
      page_list_item_exports,
      pattern_exports,
      preformatted_exports,
      pullquote_exports,
      block_exports,
      rss_exports,
      search_exports,
      separator_exports,
      shortcode_exports,
      social_link_exports,
      social_links_exports,
      spacer_exports,
      table_exports,
      tag_cloud_exports,
      text_columns_exports,
      verse_exports,
      video_exports,
      footnotes_exports,
      // theme blocks
      navigation_exports,
      navigation_link_exports,
      navigation_submenu_exports,
      site_logo_exports,
      site_title_exports,
      site_tagline_exports,
      query_exports,
      template_part_exports,
      avatar_exports,
      post_title_exports,
      post_excerpt_exports,
      post_featured_image_exports,
      post_content_exports,
      post_author_exports,
      post_author_name_exports,
      post_comment_exports,
      post_comments_count_exports,
      post_comments_link_exports,
      post_date_exports,
      post_terms_exports,
      post_navigation_link_exports,
      post_template_exports,
      post_time_to_read_exports,
      query_pagination_exports,
      query_pagination_next_exports,
      query_pagination_numbers_exports,
      query_pagination_previous_exports,
      query_no_results_exports,
      query_total_exports,
      read_more_exports,
      comments_exports,
      comment_author_name_exports,
      comment_content_exports,
      comment_date_exports,
      comment_edit_link_exports,
      comment_reply_link_exports,
      comment_template_exports,
      comments_title_exports,
      comments_pagination_exports,
      comments_pagination_next_exports,
      comments_pagination_numbers_exports,
      comments_pagination_previous_exports,
      post_comments_form_exports,
      table_of_contents_exports,
      home_link_exports,
      icon_exports,
      loginout_exports,
      navigation_overlay_close_exports,
      term_count_exports,
      term_description_exports,
      term_name_exports,
      terms_query_exports,
      term_template_exports,
      query_title_exports,
      post_author_biography_exports,
      breadcrumbs_exports
    ];
    if (window?.__experimentalEnableFormBlocks) {
      blocks.push(form_exports);
      blocks.push(form_input_exports);
      blocks.push(form_submit_button_exports);
      blocks.push(form_submission_notification_exports);
    }
    if (window?.__experimentalEnableBlockExperiments) {
      blocks.push(tab_exports);
      blocks.push(tabs_exports);
      blocks.push(tabs_menu_exports);
      blocks.push(tabs_menu_item_exports);
      blocks.push(tab_panel_exports);
      blocks.push(playlist_exports);
      blocks.push(playlist_track_exports);
    }
    if (window?.wp?.oldEditor && (window?.wp?.needsClassicBlock || !window?.__experimentalDisableTinymce || !!new URLSearchParams(window?.location?.search).get(
      "requiresTinymce"
    ))) {
      blocks.push(freeform_exports);
    }
    return blocks.filter(Boolean);
  };
  var __experimentalGetCoreBlocks = () => getAllBlocks().filter(
    ({ metadata }) => !isBlockMetadataExperimental(metadata)
  );
  var registerCoreBlocks = (blocks = __experimentalGetCoreBlocks()) => {
    blocks.forEach(({ init: init122 }) => init122());
    if (window.__unstableAutoRegisterBlocks) {
      window.__unstableAutoRegisterBlocks.forEach((blockName) => {
        const bootstrappedBlockType = unlock(
          (0, import_data170.select)(import_blocks129.store)
        ).getBootstrappedBlockType(blockName);
        (0, import_blocks129.registerBlockType)(blockName, {
          // Use all metadata from PHP registration,
          // but fall back title to block name if not provided,
          // ensure minimum apiVersion 3 for block wrapper support,
          // and override with a ServerSideRender-based edit function.
          ...bootstrappedBlockType,
          title: bootstrappedBlockType?.title || blockName,
          ...(bootstrappedBlockType?.apiVersion ?? 0) < 3 && {
            apiVersion: 3
          },
          // Inspector controls are rendered by the auto-register hook in block-editor
          edit: function Edit25({ attributes: attributes2 }) {
            const disabledRef = (0, import_compose61.useDisabled)();
            const blockProps = (0, import_block_editor296.useBlockProps)({ ref: disabledRef });
            const { content, status, error } = (0, import_server_side_render7.useServerSideRender)({
              block: blockName,
              attributes: attributes2
            });
            if (status === "loading") {
              return /* @__PURE__ */ (0, import_jsx_runtime549.jsx)("div", { ...blockProps, children: (0, import_i18n274.__)("Loading\u2026") });
            }
            if (status === "error") {
              return /* @__PURE__ */ (0, import_jsx_runtime549.jsx)("div", { ...blockProps, children: (0, import_i18n274.sprintf)(
                /* translators: %s: error message describing the problem */
                (0, import_i18n274.__)("Error loading block: %s"),
                error
              ) });
            }
            return /* @__PURE__ */ (0, import_jsx_runtime549.jsx)(
              html_renderer_default,
              {
                wrapperProps: blockProps,
                html: content
              }
            );
          },
          save: () => null
        });
      });
    }
    (0, import_blocks129.setDefaultBlockName)(name63);
    if (window.wp && window.wp.oldEditor && blocks.some(({ name: name510 }) => name510 === name13)) {
      (0, import_blocks129.setFreeformContentHandlerName)(name13);
    }
    (0, import_blocks129.setUnregisteredTypeHandlerName)(name52);
    (0, import_blocks129.setGroupingBlockName)(name39);
  };
  var __experimentalRegisterExperimentalCoreBlocks = false ? ({ enableFSEBlocks } = {}) => {
    const enabledExperiments = [enableFSEBlocks ? "fse" : null];
    getAllBlocks().filter(
      ({ metadata }) => isBlockMetadataExperimental(metadata)
    ).filter(
      ({ metadata: { __experimental } }) => __experimental === true || enabledExperiments.includes(__experimental)
    ).forEach(({ init: init122 }) => init122());
  } : void 0;
  return __toCommonJS(index_exports);
})();
/*! Bundled license information:

fast-average-color/dist/index.esm.js:
  (*! Fast Average Color | Â© 2022 Denis Seleznev | MIT License | https://github.com/fast-average-color/fast-average-color *)
*/
                                                                                                                                                                                                                                                            dist/block-library.min.js                                                                           0000644                 00004271733 15212563766 0011421 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).blockLibrary=(()=>{var qpe=Object.create;var Bb=Object.defineProperty;var Zpe=Object.getOwnPropertyDescriptor;var Kpe=Object.getOwnPropertyNames;var Qpe=Object.getPrototypeOf,Ype=Object.prototype.hasOwnProperty;var Xpe=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ce=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Z=(e,t)=>{for(var r in t)Bb(e,r,{get:t[r],enumerable:!0})},ER=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Kpe(t))!Ype.call(e,n)&&n!==r&&Bb(e,n,{get:()=>t[n],enumerable:!(a=Zpe(t,n))||a.enumerable});return e};var o=(e,t,r)=>(r=e!=null?qpe(Qpe(e)):{},ER(t||!e||!e.__esModule?Bb(r,"default",{value:e,enumerable:!0}):r,e)),Jpe=e=>ER(Bb({},"__esModule",{value:!0}),e);var W=Ce((ECe,DR)=>{DR.exports=window.wp.blocks});var me=Ce((DCe,LR)=>{LR.exports=window.wp.compose});var V=Ce((LCe,MR)=>{MR.exports=window.wp.data});var T=Ce((MCe,AR)=>{AR.exports=window.wp.blockEditor});var Fu=Ce((ACe,RR)=>{RR.exports=window.wp.serverSideRender});var P=Ce((RCe,zR)=>{zR.exports=window.wp.i18n});var Z7=Ce(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.Doctype=rr.CDATA=rr.Tag=rr.Style=rr.Script=rr.Comment=rr.Directive=rr.Text=rr.Root=rr.isTag=rr.ElementType=void 0;var ri;(function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"})(ri=rr.ElementType||(rr.ElementType={}));function tde(e){return e.type===ri.Tag||e.type===ri.Script||e.type===ri.Style}rr.isTag=tde;rr.Root=ri.Root;rr.Text=ri.Text;rr.Directive=ri.Directive;rr.Comment=ri.Comment;rr.Script=ri.Script;rr.Style=ri.Style;rr.Tag=ri.Tag;rr.CDATA=ri.CDATA;rr.Doctype=ri.Doctype});var X7=Ce(Ue=>{"use strict";var Hu=Ue&&Ue.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,n){a.__proto__=n}||function(a,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(a[i]=n[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function a(){this.constructor=t}t.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}})(),d0=Ue&&Ue.__assign||function(){return d0=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++){t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},d0.apply(this,arguments)};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.cloneNode=Ue.hasChildren=Ue.isDocument=Ue.isDirective=Ue.isComment=Ue.isText=Ue.isCDATA=Ue.isTag=Ue.Element=Ue.Document=Ue.CDATA=Ue.NodeWithChildren=Ue.ProcessingInstruction=Ue.Comment=Ue.Text=Ue.DataNode=Ue.Node=void 0;var wn=Z7(),Q7=(function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(t){this.parent=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(t){this.prev=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(t){this.next=t},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(t){return t===void 0&&(t=!1),Y7(this,t)},e})();Ue.Node=Q7;var Ib=(function(e){Hu(t,e);function t(r){var a=e.call(this)||this;return a.data=r,a}return Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(r){this.data=r},enumerable:!1,configurable:!0}),t})(Q7);Ue.DataNode=Ib;var FR=(function(e){Hu(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=wn.ElementType.Text,r}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t})(Ib);Ue.Text=FR;var HR=(function(e){Hu(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=wn.ElementType.Comment,r}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t})(Ib);Ue.Comment=HR;var OR=(function(e){Hu(t,e);function t(r,a){var n=e.call(this,a)||this;return n.name=r,n.type=wn.ElementType.Directive,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t})(Ib);Ue.ProcessingInstruction=OR;var Nb=(function(e){Hu(t,e);function t(r){var a=e.call(this)||this;return a.children=r,a}return Object.defineProperty(t.prototype,"firstChild",{get:function(){var r;return(r=this.children[0])!==null&&r!==void 0?r:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(r){this.children=r},enumerable:!1,configurable:!0}),t})(Q7);Ue.NodeWithChildren=Nb;var jR=(function(e){Hu(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=wn.ElementType.CDATA,r}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t})(Nb);Ue.CDATA=jR;var UR=(function(e){Hu(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=wn.ElementType.Root,r}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t})(Nb);Ue.Document=UR;var GR=(function(e){Hu(t,e);function t(r,a,n,i){n===void 0&&(n=[]),i===void 0&&(i=r==="script"?wn.ElementType.Script:r==="style"?wn.ElementType.Style:wn.ElementType.Tag);var l=e.call(this,n)||this;return l.name=r,l.attribs=a,l.type=i,l}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(r){this.name=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var r=this;return Object.keys(this.attribs).map(function(a){var n,i;return{name:a,value:r.attribs[a],namespace:(n=r["x-attribsNamespace"])===null||n===void 0?void 0:n[a],prefix:(i=r["x-attribsPrefix"])===null||i===void 0?void 0:i[a]}})},enumerable:!1,configurable:!0}),t})(Nb);Ue.Element=GR;function WR(e){return(0,wn.isTag)(e)}Ue.isTag=WR;function $R(e){return e.type===wn.ElementType.CDATA}Ue.isCDATA=$R;function qR(e){return e.type===wn.ElementType.Text}Ue.isText=qR;function ZR(e){return e.type===wn.ElementType.Comment}Ue.isComment=ZR;function KR(e){return e.type===wn.ElementType.Directive}Ue.isDirective=KR;function QR(e){return e.type===wn.ElementType.Root}Ue.isDocument=QR;function rde(e){return Object.prototype.hasOwnProperty.call(e,"children")}Ue.hasChildren=rde;function Y7(e,t){t===void 0&&(t=!1);var r;if(qR(e))r=new FR(e.data);else if(ZR(e))r=new HR(e.data);else if(WR(e)){var a=t?K7(e.children):[],n=new GR(e.name,d0({},e.attribs),a);a.forEach(function(c){return c.parent=n}),e.namespace!=null&&(n.namespace=e.namespace),e["x-attribsNamespace"]&&(n["x-attribsNamespace"]=d0({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(n["x-attribsPrefix"]=d0({},e["x-attribsPrefix"])),r=n}else if($R(e)){var a=t?K7(e.children):[],i=new jR(a);a.forEach(function(u){return u.parent=i}),r=i}else if(QR(e)){var a=t?K7(e.children):[],l=new UR(a);a.forEach(function(u){return u.parent=l}),e["x-mode"]&&(l["x-mode"]=e["x-mode"]),r=l}else if(KR(e)){var s=new OR(e.name,e.data);e["x-name"]!=null&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),r=s}else throw new Error("Not implemented yet: ".concat(e.type));return r.startIndex=e.startIndex,r.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(r.sourceCodeLocation=e.sourceCodeLocation),r}Ue.cloneNode=Y7;function K7(e){for(var t=e.map(function(a){return Y7(a,!0)}),r=1;r<t.length;r++)t[r].prev=t[r-1],t[r-1].next=t[r];return t}});var JR=Ce(Is=>{"use strict";var ode=Is&&Is.__createBinding||(Object.create?(function(e,t,r,a){a===void 0&&(a=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,n)}):(function(e,t,r,a){a===void 0&&(a=r),e[a]=t[r]})),ade=Is&&Is.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&ode(t,e,r)};Object.defineProperty(Is,"__esModule",{value:!0});Is.DomHandler=void 0;var J7=Z7(),Ou=X7();ade(X7(),Is);var YR={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},XR=(function(){function e(t,r,a){this.dom=[],this.root=new Ou.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof r=="function"&&(a=r,r=YR),typeof t=="object"&&(r=t,t=void 0),this.callback=t??null,this.options=r??YR,this.elementCB=a??null}return e.prototype.onparserinit=function(t){this.parser=t},e.prototype.onreset=function(){this.dom=[],this.root=new Ou.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(t){this.handleCallback(t)},e.prototype.onclosetag=function(){this.lastNode=null;var t=this.tagStack.pop();this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(t)},e.prototype.onopentag=function(t,r){var a=this.options.xmlMode?J7.ElementType.Tag:void 0,n=new Ou.Element(t,r,void 0,a);this.addNode(n),this.tagStack.push(n)},e.prototype.ontext=function(t){var r=this.lastNode;if(r&&r.type===J7.ElementType.Text)r.data+=t,this.options.withEndIndices&&(r.endIndex=this.parser.endIndex);else{var a=new Ou.Text(t);this.addNode(a),this.lastNode=a}},e.prototype.oncomment=function(t){if(this.lastNode&&this.lastNode.type===J7.ElementType.Comment){this.lastNode.data+=t;return}var r=new Ou.Comment(t);this.addNode(r),this.lastNode=r},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var t=new Ou.Text(""),r=new Ou.CDATA([t]);this.addNode(r),t.parent=r,this.lastNode=t},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(t,r){var a=new Ou.ProcessingInstruction(t,r);this.addNode(a)},e.prototype.handleCallback=function(t){if(typeof this.callback=="function")this.callback(t,this.dom);else if(t)throw t},e.prototype.addNode=function(t){var r=this.tagStack[this.tagStack.length-1],a=r.children[r.children.length-1];this.options.withStartIndices&&(t.startIndex=this.parser.startIndex),this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),r.children.push(t),a&&(t.prev=a,a.next=t),t.parent=r,this.lastNode=null},e})();Is.DomHandler=XR;Is.default=XR});var ez=Ce(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});jo.CARRIAGE_RETURN_PLACEHOLDER_REGEX=jo.CARRIAGE_RETURN_PLACEHOLDER=jo.CARRIAGE_RETURN_REGEX=jo.CARRIAGE_RETURN=jo.CASE_SENSITIVE_TAG_NAMES_MAP=jo.CASE_SENSITIVE_TAG_NAMES=void 0;jo.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"];jo.CASE_SENSITIVE_TAG_NAMES_MAP=jo.CASE_SENSITIVE_TAG_NAMES.reduce(function(e,t){return e[t.toLowerCase()]=t,e},{});jo.CARRIAGE_RETURN="\r";jo.CARRIAGE_RETURN_REGEX=new RegExp(jo.CARRIAGE_RETURN,"g");jo.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(),"__");jo.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(jo.CARRIAGE_RETURN_PLACEHOLDER,"g")});var eS=Ce(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});Sf.formatAttributes=tz;Sf.escapeSpecialCharacters=lde;Sf.revertEscapedCharacters=rz;Sf.formatDOM=oz;var Eb=JR(),f0=ez();function nde(e){return f0.CASE_SENSITIVE_TAG_NAMES_MAP[e]}function tz(e){for(var t={},r=0,a=e.length;r<a;r++){var n=e[r];t[n.name]=n.value}return t}function ide(e){e=e.toLowerCase();var t=nde(e);return t||e}function lde(e){return e.replace(f0.CARRIAGE_RETURN_REGEX,f0.CARRIAGE_RETURN_PLACEHOLDER)}function rz(e){return e.replace(f0.CARRIAGE_RETURN_PLACEHOLDER_REGEX,f0.CARRIAGE_RETURN)}function oz(e,t,r){t===void 0&&(t=null);for(var a=[],n,i=0,l=e.length;i<l;i++){var s=e[i];switch(s.nodeType){case 1:{var c=ide(s.nodeName);n=new Eb.Element(c,tz(s.attributes)),n.children=oz(c==="template"?s.content.childNodes:s.childNodes,n);break}case 3:n=new Eb.Text(rz(s.nodeValue));break;case 8:n=new Eb.Comment(s.nodeValue);break;default:continue}var u=a[i-1]||null;u&&(u.next=n),n.parent=t,n.prev=u,n.next=null,a.push(n)}return r&&(n=new Eb.ProcessingInstruction(r.substring(0,r.indexOf(" ")).toLowerCase(),r),n.next=a[0]||null,n.parent=t,a.unshift(n),a[1]&&(a[1].prev=a[0])),a}});var mz=Ce(oS=>{"use strict";Object.defineProperty(oS,"__esModule",{value:!0});oS.default=ude;var sde=eS(),az="html",nz="head",Db="body",cde=/<([a-zA-Z]+[0-9]?)/,iz=/<head[^]*>/i,lz=/<body[^]*>/i,Mb=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},tS=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},sz=typeof window=="object"&&window.DOMParser;typeof sz=="function"&&(cz=new sz,uz="text/html",tS=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),cz.parseFromString(e,uz)},Mb=tS);var cz,uz;typeof document=="object"&&document.implementation&&(h0=document.implementation.createHTMLDocument(),Mb=function(e,t){if(t){var r=h0.documentElement.querySelector(t);return r&&(r.innerHTML=e),h0}return h0.documentElement.innerHTML=e,h0});var h0,Lb=typeof document=="object"&&document.createElement("template"),rS;Lb&&Lb.content&&(rS=function(e){return Lb.innerHTML=e,Lb.content.childNodes});function ude(e){var t,r;e=(0,sde.escapeSpecialCharacters)(e);var a=e.match(cde),n=a&&a[1]?a[1].toLowerCase():"";switch(n){case az:{var i=tS(e);if(!iz.test(e)){var l=i.querySelector(nz);(t=l?.parentNode)===null||t===void 0||t.removeChild(l)}if(!lz.test(e)){var l=i.querySelector(Db);(r=l?.parentNode)===null||r===void 0||r.removeChild(l)}return i.querySelectorAll(az)}case nz:case Db:{var s=Mb(e).querySelectorAll(n);return lz.test(e)&&iz.test(e)?s[0].parentNode.childNodes:s}default:{if(rS)return rS(e);var l=Mb(e,Db).querySelector(Db);return l.childNodes}}}});var pz=Ce(g0=>{"use strict";var mde=g0&&g0.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(g0,"__esModule",{value:!0});g0.default=hde;var pde=mde(mz()),dde=eS(),fde=/<(![a-zA-Z\s]+)>/;function hde(e){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(fde),r=t?t[1]:void 0;return(0,dde.formatDOM)((0,pde.default)(e),null,r)}});var dz=Ce(Ab=>{var gde=0;Ab.SAME=gde;var vde=1;Ab.CAMELCASE=vde;Ab.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}});var hz=Ce(Pl=>{"use strict";function bde(e){return Uo.hasOwnProperty(e)?Uo[e]:null}function Ua(e,t,r,a,n,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=a,this.attributeNamespace=n,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var Uo={},yde=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];yde.forEach(e=>{Uo[e]=new Ua(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([e,t])=>{Uo[e]=new Ua(e,1,!1,t,null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(e=>{Uo[e]=new Ua(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(e=>{Uo[e]=new Ua(e,2,!1,e,null,!1,!1)});["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(e=>{Uo[e]=new Ua(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(e=>{Uo[e]=new Ua(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(e=>{Uo[e]=new Ua(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(e=>{Uo[e]=new Ua(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(e=>{Uo[e]=new Ua(e,5,!1,e.toLowerCase(),null,!1,!1)});var aS=/[\-\:]([a-z])/g,nS=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(e=>{let t=e.replace(aS,nS);Uo[t]=new Ua(t,1,!1,e,null,!1,!1)});["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(e=>{let t=e.replace(aS,nS);Uo[t]=new Ua(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(e=>{let t=e.replace(aS,nS);Uo[t]=new Ua(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(e=>{Uo[e]=new Ua(e,1,!1,e.toLowerCase(),null,!1,!1)});var _de="xlinkHref";Uo[_de]=new Ua("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(e=>{Uo[e]=new Ua(e,1,!1,e.toLowerCase(),null,!0,!0)});var{CAMELCASE:xde,SAME:kde,possibleStandardNames:fz}=dz(),wde=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Cde=wde+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Sde=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+Cde+"]*$")),Tde=Object.keys(fz).reduce((e,t)=>{let r=fz[t];return r===kde?e[t]=t:r===xde?e[t.toLowerCase()]=t:e[t]=r,e},{});Pl.BOOLEAN=3;Pl.BOOLEANISH_STRING=2;Pl.NUMERIC=5;Pl.OVERLOADED_BOOLEAN=4;Pl.POSITIVE_NUMERIC=6;Pl.RESERVED=0;Pl.STRING=1;Pl.getPropertyInfo=bde;Pl.isCustomAttribute=Sde;Pl.possibleStandardNames=Tde});var iS=Ce((qCe,gz)=>{gz.exports=window.React});var kz=Ce((ZCe,xz)=>{"use strict";var vz=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Pde=/\n/g,Bde=/^\s*/,Ide=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Nde=/^:\s*/,Ede=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Dde=/^[;\s]*/,Lde=/^\s+|\s+$/g,Mde=`
`,bz="/",yz="*",pp="",Ade="comment",Rde="declaration";function zde(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,a=1;function n(h){var g=h.match(Pde);g&&(r+=g.length);var b=h.lastIndexOf(Mde);a=~b?h.length-b:a+h.length}function i(){var h={line:r,column:a};return function(g){return g.position=new l(h),u(),g}}function l(h){this.start=h,this.end={line:r,column:a},this.source=t.source}l.prototype.content=e;function s(h){var g=new Error(t.source+":"+r+":"+a+": "+h);if(g.reason=h,g.filename=t.source,g.line=r,g.column=a,g.source=e,!t.silent)throw g}function c(h){var g=h.exec(e);if(g){var b=g[0];return n(b),e=e.slice(b.length),g}}function u(){c(Bde)}function m(h){var g;for(h=h||[];g=p();)g!==!1&&h.push(g);return h}function p(){var h=i();if(!(bz!=e.charAt(0)||yz!=e.charAt(1))){for(var g=2;pp!=e.charAt(g)&&(yz!=e.charAt(g)||bz!=e.charAt(g+1));)++g;if(g+=2,pp===e.charAt(g-1))return s("End of comment missing");var b=e.slice(2,g-2);return a+=2,n(b),e=e.slice(g),a+=2,h({type:Ade,comment:b})}}function d(){var h=i(),g=c(Ide);if(g){if(p(),!c(Nde))return s("property missing ':'");var b=c(Ede),y=h({type:Rde,property:_z(g[0].replace(vz,pp)),value:b?_z(b[0].replace(vz,pp)):pp});return c(Dde),y}}function f(){var h=[];m(h);for(var g;g=d();)g!==!1&&(h.push(g),m(h));return h}return u(),f()}function _z(e){return e?e.replace(Lde,pp):pp}xz.exports=zde});var wz=Ce(v0=>{"use strict";var Vde=v0&&v0.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(v0,"__esModule",{value:!0});v0.default=Hde;var Fde=Vde(kz());function Hde(e,t){let r=null;if(!e||typeof e!="string")return r;let a=(0,Fde.default)(e),n=typeof t=="function";return a.forEach(i=>{if(i.type!=="declaration")return;let{property:l,value:s}=i;n?t(l,s,i):s&&(r=r||{},r[l]=s)}),r}});var Sz=Ce(Rb=>{"use strict";Object.defineProperty(Rb,"__esModule",{value:!0});Rb.camelCase=void 0;var Ode=/^--[a-zA-Z0-9_-]+$/,jde=/-([a-z])/g,Ude=/^[^-]+$/,Gde=/^-(webkit|moz|ms|o|khtml)-/,Wde=/^-(ms)-/,$de=function(e){return!e||Ude.test(e)||Ode.test(e)},qde=function(e,t){return t.toUpperCase()},Cz=function(e,t){return"".concat(t,"-")},Zde=function(e,t){return t===void 0&&(t={}),$de(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Wde,Cz):e=e.replace(Gde,Cz),e.replace(jde,qde))};Rb.camelCase=Zde});var Pz=Ce((sS,Tz)=>{"use strict";var Kde=sS&&sS.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Qde=Kde(wz()),Yde=Sz();function lS(e,t){var r={};return!e||typeof e!="string"||(0,Qde.default)(e,function(a,n){a&&n&&(r[(0,Yde.camelCase)(a,t)]=n)}),r}lS.default=lS;Tz.exports=lS});var cS=Ce(Ga=>{"use strict";var Xde=Ga&&Ga.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ga,"__esModule",{value:!0});Ga.returnFirstArg=Ga.canTextBeChildOfNode=Ga.ELEMENTS_WITH_NO_TEXT_CHILDREN=Ga.PRESERVE_CUSTOM_ATTRIBUTES=void 0;Ga.isCustomComponent=rfe;Ga.setStyleProp=afe;var Jde=iS(),efe=Xde(Pz()),tfe=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function rfe(e,t){return e.includes("-")?!tfe.has(e):!!(t&&typeof t.is=="string")}var ofe={reactCompat:!0};function afe(e,t){if(typeof e=="string"){if(!e.trim()){t.style={};return}try{t.style=(0,efe.default)(e,ofe)}catch{t.style={}}}}Ga.PRESERVE_CUSTOM_ATTRIBUTES=Number(Jde.version.split(".")[0])>=16;Ga.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var nfe=function(e){return!Ga.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)};Ga.canTextBeChildOfNode=nfe;var ife=function(e){return e};Ga.returnFirstArg=ife});var mS=Ce(uS=>{"use strict";Object.defineProperty(uS,"__esModule",{value:!0});uS.default=ufe;var b0=hz(),Bz=cS(),lfe=["checked","value"],sfe=["input","select","textarea"],cfe={reset:!0,submit:!0};function ufe(e,t){e===void 0&&(e={});var r={},a=!!(e.type&&cfe[e.type]);for(var n in e){var i=e[n];if((0,b0.isCustomAttribute)(n)){r[n]=i;continue}var l=n.toLowerCase(),s=Iz(l);if(s){var c=(0,b0.getPropertyInfo)(s);switch(lfe.includes(s)&&sfe.includes(t)&&!a&&(s=Iz("default"+l)),r[s]=i,c&&c.type){case b0.BOOLEAN:r[s]=!0;break;case b0.OVERLOADED_BOOLEAN:i===""&&(r[s]=!0);break}continue}Bz.PRESERVE_CUSTOM_ATTRIBUTES&&(r[n]=i)}return(0,Bz.setStyleProp)(e.style,r),r}function Iz(e){return b0.possibleStandardNames[e]}});var Ez=Ce(_0=>{"use strict";var mfe=_0&&_0.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_0,"__esModule",{value:!0});_0.default=Nz;var pS=iS(),pfe=mfe(mS()),y0=cS(),dfe={cloneElement:pS.cloneElement,createElement:pS.createElement,isValidElement:pS.isValidElement};function Nz(e,t){t===void 0&&(t={});for(var r=[],a=typeof t.replace=="function",n=t.transform||y0.returnFirstArg,i=t.library||dfe,l=i.cloneElement,s=i.createElement,c=i.isValidElement,u=e.length,m=0;m<u;m++){var p=e[m];if(a){var d=t.replace(p,m);if(c(d)){u>1&&(d=l(d,{key:d.key||m})),r.push(n(d,p,m));continue}}if(p.type==="text"){var f=!p.data.trim().length;if(f&&p.parent&&!(0,y0.canTextBeChildOfNode)(p.parent)||t.trim&&f)continue;r.push(n(p.data,p,m));continue}var h=p,g={};ffe(h)?((0,y0.setStyleProp)(h.attribs.style,h.attribs),g=h.attribs):h.attribs&&(g=(0,pfe.default)(h.attribs,h.name));var b=void 0;switch(p.type){case"script":case"style":p.children[0]&&(g.dangerouslySetInnerHTML={__html:p.children[0].data});break;case"tag":p.name==="textarea"&&p.children[0]?g.defaultValue=p.children[0].data:p.children&&p.children.length&&(b=Nz(p.children,t));break;default:continue}u>1&&(g.key=m),r.push(n(s(p.name,g,b),p,m))}return r.length===1?r[0]:r}function ffe(e){return y0.PRESERVE_CUSTOM_ATTRIBUTES&&e.type==="tag"&&(0,y0.isCustomComponent)(e.name,e.attribs)}});var dS=Ce(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.Doctype=or.CDATA=or.Tag=or.Style=or.Script=or.Comment=or.Directive=or.Text=or.Root=or.isTag=or.ElementType=void 0;var oi;(function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"})(oi=or.ElementType||(or.ElementType={}));function hfe(e){return e.type===oi.Tag||e.type===oi.Script||e.type===oi.Style}or.isTag=hfe;or.Root=oi.Root;or.Text=oi.Text;or.Directive=oi.Directive;or.Comment=oi.Comment;or.Script=oi.Script;or.Style=oi.Style;or.Tag=oi.Tag;or.CDATA=oi.CDATA;or.Doctype=oi.Doctype});var vS=Ce(Ge=>{"use strict";var ju=Ge&&Ge.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,n){a.__proto__=n}||function(a,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(a[i]=n[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function a(){this.constructor=t}t.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}})(),x0=Ge&&Ge.__assign||function(){return x0=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++){t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},x0.apply(this,arguments)};Object.defineProperty(Ge,"__esModule",{value:!0});Ge.cloneNode=Ge.hasChildren=Ge.isDocument=Ge.isDirective=Ge.isComment=Ge.isText=Ge.isCDATA=Ge.isTag=Ge.Element=Ge.Document=Ge.CDATA=Ge.NodeWithChildren=Ge.ProcessingInstruction=Ge.Comment=Ge.Text=Ge.DataNode=Ge.Node=void 0;var Cn=dS(),hS=(function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(t){this.parent=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(t){this.prev=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(t){this.next=t},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(t){return t===void 0&&(t=!1),gS(this,t)},e})();Ge.Node=hS;var zb=(function(e){ju(t,e);function t(r){var a=e.call(this)||this;return a.data=r,a}return Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(r){this.data=r},enumerable:!1,configurable:!0}),t})(hS);Ge.DataNode=zb;var Dz=(function(e){ju(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=Cn.ElementType.Text,r}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t})(zb);Ge.Text=Dz;var Lz=(function(e){ju(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=Cn.ElementType.Comment,r}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t})(zb);Ge.Comment=Lz;var Mz=(function(e){ju(t,e);function t(r,a){var n=e.call(this,a)||this;return n.name=r,n.type=Cn.ElementType.Directive,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t})(zb);Ge.ProcessingInstruction=Mz;var Vb=(function(e){ju(t,e);function t(r){var a=e.call(this)||this;return a.children=r,a}return Object.defineProperty(t.prototype,"firstChild",{get:function(){var r;return(r=this.children[0])!==null&&r!==void 0?r:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(r){this.children=r},enumerable:!1,configurable:!0}),t})(hS);Ge.NodeWithChildren=Vb;var Az=(function(e){ju(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=Cn.ElementType.CDATA,r}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t})(Vb);Ge.CDATA=Az;var Rz=(function(e){ju(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=Cn.ElementType.Root,r}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t})(Vb);Ge.Document=Rz;var zz=(function(e){ju(t,e);function t(r,a,n,i){n===void 0&&(n=[]),i===void 0&&(i=r==="script"?Cn.ElementType.Script:r==="style"?Cn.ElementType.Style:Cn.ElementType.Tag);var l=e.call(this,n)||this;return l.name=r,l.attribs=a,l.type=i,l}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(r){this.name=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var r=this;return Object.keys(this.attribs).map(function(a){var n,i;return{name:a,value:r.attribs[a],namespace:(n=r["x-attribsNamespace"])===null||n===void 0?void 0:n[a],prefix:(i=r["x-attribsPrefix"])===null||i===void 0?void 0:i[a]}})},enumerable:!1,configurable:!0}),t})(Vb);Ge.Element=zz;function Vz(e){return(0,Cn.isTag)(e)}Ge.isTag=Vz;function Fz(e){return e.type===Cn.ElementType.CDATA}Ge.isCDATA=Fz;function Hz(e){return e.type===Cn.ElementType.Text}Ge.isText=Hz;function Oz(e){return e.type===Cn.ElementType.Comment}Ge.isComment=Oz;function jz(e){return e.type===Cn.ElementType.Directive}Ge.isDirective=jz;function Uz(e){return e.type===Cn.ElementType.Root}Ge.isDocument=Uz;function gfe(e){return Object.prototype.hasOwnProperty.call(e,"children")}Ge.hasChildren=gfe;function gS(e,t){t===void 0&&(t=!1);var r;if(Hz(e))r=new Dz(e.data);else if(Oz(e))r=new Lz(e.data);else if(Vz(e)){var a=t?fS(e.children):[],n=new zz(e.name,x0({},e.attribs),a);a.forEach(function(c){return c.parent=n}),e.namespace!=null&&(n.namespace=e.namespace),e["x-attribsNamespace"]&&(n["x-attribsNamespace"]=x0({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(n["x-attribsPrefix"]=x0({},e["x-attribsPrefix"])),r=n}else if(Fz(e)){var a=t?fS(e.children):[],i=new Az(a);a.forEach(function(u){return u.parent=i}),r=i}else if(Uz(e)){var a=t?fS(e.children):[],l=new Rz(a);a.forEach(function(u){return u.parent=l}),e["x-mode"]&&(l["x-mode"]=e["x-mode"]),r=l}else if(jz(e)){var s=new Mz(e.name,e.data);e["x-name"]!=null&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),r=s}else throw new Error("Not implemented yet: ".concat(e.type));return r.startIndex=e.startIndex,r.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(r.sourceCodeLocation=e.sourceCodeLocation),r}Ge.cloneNode=gS;function fS(e){for(var t=e.map(function(a){return gS(a,!0)}),r=1;r<t.length;r++)t[r].prev=t[r-1],t[r-1].next=t[r];return t}});var $z=Ce(Ns=>{"use strict";var vfe=Ns&&Ns.__createBinding||(Object.create?(function(e,t,r,a){a===void 0&&(a=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,n)}):(function(e,t,r,a){a===void 0&&(a=r),e[a]=t[r]})),bfe=Ns&&Ns.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&vfe(t,e,r)};Object.defineProperty(Ns,"__esModule",{value:!0});Ns.DomHandler=void 0;var bS=dS(),Uu=vS();bfe(vS(),Ns);var Gz={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},Wz=(function(){function e(t,r,a){this.dom=[],this.root=new Uu.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof r=="function"&&(a=r,r=Gz),typeof t=="object"&&(r=t,t=void 0),this.callback=t??null,this.options=r??Gz,this.elementCB=a??null}return e.prototype.onparserinit=function(t){this.parser=t},e.prototype.onreset=function(){this.dom=[],this.root=new Uu.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(t){this.handleCallback(t)},e.prototype.onclosetag=function(){this.lastNode=null;var t=this.tagStack.pop();this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(t)},e.prototype.onopentag=function(t,r){var a=this.options.xmlMode?bS.ElementType.Tag:void 0,n=new Uu.Element(t,r,void 0,a);this.addNode(n),this.tagStack.push(n)},e.prototype.ontext=function(t){var r=this.lastNode;if(r&&r.type===bS.ElementType.Text)r.data+=t,this.options.withEndIndices&&(r.endIndex=this.parser.endIndex);else{var a=new Uu.Text(t);this.addNode(a),this.lastNode=a}},e.prototype.oncomment=function(t){if(this.lastNode&&this.lastNode.type===bS.ElementType.Comment){this.lastNode.data+=t;return}var r=new Uu.Comment(t);this.addNode(r),this.lastNode=r},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var t=new Uu.Text(""),r=new Uu.CDATA([t]);this.addNode(r),t.parent=r,this.lastNode=t},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(t,r){var a=new Uu.ProcessingInstruction(t,r);this.addNode(a)},e.prototype.handleCallback=function(t){if(typeof this.callback=="function")this.callback(t,this.dom);else if(t)throw t},e.prototype.addNode=function(t){var r=this.tagStack[this.tagStack.length-1],a=r.children[r.children.length-1];this.options.withStartIndices&&(t.startIndex=this.parser.startIndex),this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),r.children.push(t),a&&(t.prev=a,a.next=t),t.parent=r,this.lastNode=null},e})();Ns.DomHandler=Wz;Ns.default=Wz});var _S=Ce(co=>{"use strict";var yS=co&&co.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(co,"__esModule",{value:!0});co.htmlToDOM=co.domToReact=co.attributesToProps=co.Text=co.ProcessingInstruction=co.Element=co.Comment=void 0;co.default=xfe;var qz=yS(pz());co.htmlToDOM=qz.default;var yfe=yS(mS());co.attributesToProps=yfe.default;var Zz=yS(Ez());co.domToReact=Zz.default;var Fb=$z();Object.defineProperty(co,"Comment",{enumerable:!0,get:function(){return Fb.Comment}});Object.defineProperty(co,"Element",{enumerable:!0,get:function(){return Fb.Element}});Object.defineProperty(co,"ProcessingInstruction",{enumerable:!0,get:function(){return Fb.ProcessingInstruction}});Object.defineProperty(co,"Text",{enumerable:!0,get:function(){return Fb.Text}});var _fe={lowerCaseAttributeNames:!1};function xfe(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");return e?(0,Zz.default)((0,qz.default)(e,t?.htmlparser2||_fe),t):[]}});var ai=Ce((n6e,Qz)=>{Qz.exports=window.wp.dom});var v=Ce((i6e,Yz)=>{Yz.exports=window.ReactJSXRuntime});var U=Ce((u6e,eV)=>{eV.exports=window.wp.element});var L=Ce((p6e,tV)=>{tV.exports=window.wp.primitives});var M=Ce((oPe,rV)=>{rV.exports=window.wp.components});var Rr=Ce((aPe,oV)=>{oV.exports=window.wp.blob});var Q=Ce((nPe,aV)=>{aV.exports=window.wp.coreData});var mr=Ce((tBe,FV)=>{FV.exports=window.wp.url});var Wo=Ce((aBe,GV)=>{GV.exports=window.wp.htmlEntities});var xr=Ce((gBe,aF)=>{aF.exports=window.wp.notices});var iF=Ce((_Be,nF)=>{nF.exports=window.wp.privateApis});var As=Ce((cIe,RF)=>{RF.exports=window.wp.keycodes});var Ff=Ce((fIe,FF)=>{FF.exports=window.wp.deprecated});var em=Ce((zIe,QF)=>{QF.exports=window.wp.richText});var Lk=Ce((BDe,WO)=>{WO.exports=window.wp.date});var G1=Ce((iLe,ij)=>{ij.exports=window.wp.apiFetch});var Yc=Ce((LMe,VU)=>{VU.exports=window.wp.hooks});var rv=Ce((XRe,D5)=>{var uW={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u1EA4:"A",\u1EAE:"A",\u1EB2:"A",\u1EB4:"A",\u1EB6:"A",\u00C6:"AE",\u1EA6:"A",\u1EB0:"A",\u0202:"A",\u1EA2:"A",\u1EA0:"A",\u1EA8:"A",\u1EAA:"A",\u1EAC:"A",\u00C7:"C",\u1E08:"C",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u1EBE:"E",\u1E16:"E",\u1EC0:"E",\u1E14:"E",\u1E1C:"E",\u0206:"E",\u1EBA:"E",\u1EBC:"E",\u1EB8:"E",\u1EC2:"E",\u1EC4:"E",\u1EC6:"E",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u1E2E:"I",\u020A:"I",\u1EC8:"I",\u1ECA:"I",\u00D0:"D",\u00D1:"N",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u1ED0:"O",\u1E4C:"O",\u1E52:"O",\u020E:"O",\u1ECE:"O",\u1ECC:"O",\u1ED4:"O",\u1ED6:"O",\u1ED8:"O",\u1EDC:"O",\u1EDE:"O",\u1EE0:"O",\u1EDA:"O",\u1EE2:"O",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u1EE6:"U",\u1EE4:"U",\u1EEC:"U",\u1EEE:"U",\u1EF0:"U",\u00DD:"Y",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u1EA5:"a",\u1EAF:"a",\u1EB3:"a",\u1EB5:"a",\u1EB7:"a",\u00E6:"ae",\u1EA7:"a",\u1EB1:"a",\u0203:"a",\u1EA3:"a",\u1EA1:"a",\u1EA9:"a",\u1EAB:"a",\u1EAD:"a",\u00E7:"c",\u1E09:"c",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u1EBF:"e",\u1E17:"e",\u1EC1:"e",\u1E15:"e",\u1E1D:"e",\u0207:"e",\u1EBB:"e",\u1EBD:"e",\u1EB9:"e",\u1EC3:"e",\u1EC5:"e",\u1EC7:"e",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u1E2F:"i",\u020B:"i",\u1EC9:"i",\u1ECB:"i",\u00F0:"d",\u00F1:"n",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u1ED1:"o",\u1E4D:"o",\u1E53:"o",\u020F:"o",\u1ECF:"o",\u1ECD:"o",\u1ED5:"o",\u1ED7:"o",\u1ED9:"o",\u1EDD:"o",\u1EDF:"o",\u1EE1:"o",\u1EDB:"o",\u1EE3:"o",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u1EE7:"u",\u1EE5:"u",\u1EED:"u",\u1EEF:"u",\u1EF1:"u",\u00FD:"y",\u00FF:"y",\u0100:"A",\u0101:"a",\u0102:"A",\u0103:"a",\u0104:"A",\u0105:"a",\u0106:"C",\u0107:"c",\u0108:"C",\u0109:"c",\u010A:"C",\u010B:"c",\u010C:"C",\u010D:"c",C\u0306:"C",c\u0306:"c",\u010E:"D",\u010F:"d",\u0110:"D",\u0111:"d",\u0112:"E",\u0113:"e",\u0114:"E",\u0115:"e",\u0116:"E",\u0117:"e",\u0118:"E",\u0119:"e",\u011A:"E",\u011B:"e",\u011C:"G",\u01F4:"G",\u011D:"g",\u01F5:"g",\u011E:"G",\u011F:"g",\u0120:"G",\u0121:"g",\u0122:"G",\u0123:"g",\u0124:"H",\u0125:"h",\u0126:"H",\u0127:"h",\u1E2A:"H",\u1E2B:"h",\u0128:"I",\u0129:"i",\u012A:"I",\u012B:"i",\u012C:"I",\u012D:"i",\u012E:"I",\u012F:"i",\u0130:"I",\u0131:"i",\u0132:"IJ",\u0133:"ij",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u1E30:"K",\u1E31:"k",K\u0306:"K",k\u0306:"k",\u0139:"L",\u013A:"l",\u013B:"L",\u013C:"l",\u013D:"L",\u013E:"l",\u013F:"L",\u0140:"l",\u0141:"l",\u0142:"l",\u1E3E:"M",\u1E3F:"m",M\u0306:"M",m\u0306:"m",\u0143:"N",\u0144:"n",\u0145:"N",\u0146:"n",\u0147:"N",\u0148:"n",\u0149:"n",N\u0306:"N",n\u0306:"n",\u014C:"O",\u014D:"o",\u014E:"O",\u014F:"o",\u0150:"O",\u0151:"o",\u0152:"OE",\u0153:"oe",P\u0306:"P",p\u0306:"p",\u0154:"R",\u0155:"r",\u0156:"R",\u0157:"r",\u0158:"R",\u0159:"r",R\u0306:"R",r\u0306:"r",\u0212:"R",\u0213:"r",\u015A:"S",\u015B:"s",\u015C:"S",\u015D:"s",\u015E:"S",\u0218:"S",\u0219:"s",\u015F:"s",\u0160:"S",\u0161:"s",\u0162:"T",\u0163:"t",\u021B:"t",\u021A:"T",\u0164:"T",\u0165:"t",\u0166:"T",\u0167:"t",T\u0306:"T",t\u0306:"t",\u0168:"U",\u0169:"u",\u016A:"U",\u016B:"u",\u016C:"U",\u016D:"u",\u016E:"U",\u016F:"u",\u0170:"U",\u0171:"u",\u0172:"U",\u0173:"u",\u0216:"U",\u0217:"u",V\u0306:"V",v\u0306:"v",\u0174:"W",\u0175:"w",\u1E82:"W",\u1E83:"w",X\u0306:"X",x\u0306:"x",\u0176:"Y",\u0177:"y",\u0178:"Y",Y\u0306:"Y",y\u0306:"y",\u0179:"Z",\u017A:"z",\u017B:"Z",\u017C:"z",\u017D:"Z",\u017E:"z",\u017F:"s",\u0192:"f",\u01A0:"O",\u01A1:"o",\u01AF:"U",\u01B0:"u",\u01CD:"A",\u01CE:"a",\u01CF:"I",\u01D0:"i",\u01D1:"O",\u01D2:"o",\u01D3:"U",\u01D4:"u",\u01D5:"U",\u01D6:"u",\u01D7:"U",\u01D8:"u",\u01D9:"U",\u01DA:"u",\u01DB:"U",\u01DC:"u",\u1EE8:"U",\u1EE9:"u",\u1E78:"U",\u1E79:"u",\u01FA:"A",\u01FB:"a",\u01FC:"AE",\u01FD:"ae",\u01FE:"O",\u01FF:"o",\u00DE:"TH",\u00FE:"th",\u1E54:"P",\u1E55:"p",\u1E64:"S",\u1E65:"s",X\u0301:"X",x\u0301:"x",\u0403:"\u0413",\u0453:"\u0433",\u040C:"\u041A",\u045C:"\u043A",A\u030B:"A",a\u030B:"a",E\u030B:"E",e\u030B:"e",I\u030B:"I",i\u030B:"i",\u01F8:"N",\u01F9:"n",\u1ED2:"O",\u1ED3:"o",\u1E50:"O",\u1E51:"o",\u1EEA:"U",\u1EEB:"u",\u1E80:"W",\u1E81:"w",\u1EF2:"Y",\u1EF3:"y",\u0200:"A",\u0201:"a",\u0204:"E",\u0205:"e",\u0208:"I",\u0209:"i",\u020C:"O",\u020D:"o",\u0210:"R",\u0211:"r",\u0214:"U",\u0215:"u",B\u030C:"B",b\u030C:"b",\u010C\u0323:"C",\u010D\u0323:"c",\u00CA\u030C:"E",\u00EA\u030C:"e",F\u030C:"F",f\u030C:"f",\u01E6:"G",\u01E7:"g",\u021E:"H",\u021F:"h",J\u030C:"J",\u01F0:"j",\u01E8:"K",\u01E9:"k",M\u030C:"M",m\u030C:"m",P\u030C:"P",p\u030C:"p",Q\u030C:"Q",q\u030C:"q",\u0158\u0329:"R",\u0159\u0329:"r",\u1E66:"S",\u1E67:"s",V\u030C:"V",v\u030C:"v",W\u030C:"W",w\u030C:"w",X\u030C:"X",x\u030C:"x",Y\u030C:"Y",y\u030C:"y",A\u0327:"A",a\u0327:"a",B\u0327:"B",b\u0327:"b",\u1E10:"D",\u1E11:"d",\u0228:"E",\u0229:"e",\u0190\u0327:"E",\u025B\u0327:"e",\u1E28:"H",\u1E29:"h",I\u0327:"I",i\u0327:"i",\u0197\u0327:"I",\u0268\u0327:"i",M\u0327:"M",m\u0327:"m",O\u0327:"O",o\u0327:"o",Q\u0327:"Q",q\u0327:"q",U\u0327:"U",u\u0327:"u",X\u0327:"X",x\u0327:"x",Z\u0327:"Z",z\u0327:"z",\u0439:"\u0438",\u0419:"\u0418",\u0451:"\u0435",\u0401:"\u0415"},mW=Object.keys(uW).join("|"),X1e=new RegExp(mW,"g"),J1e=new RegExp(mW,"");function eve(e){return uW[e]}var pW=function(e){return e.replace(X1e,eve)},tve=function(e){return!!e.match(J1e)};D5.exports=pW;D5.exports.has=tve;D5.exports.remove=pW});var Eq=Ce((pHe,Nq)=>{Nq.exports=window.wp.uploadMedia});var bv=Ce((FOe,DZ)=>{DZ.exports=window.wp.a11y});var cD=Ce((bWe,RY)=>{RY.exports=window.wp.escapeHtml});var wre=Ce((VXe,kre)=>{kre.exports=window.wp.wordcount});var Ene=Ce((Drt,Nne)=>{Nne.exports=window.wp.patterns});var kie=Ce((Vot,xie)=>{xie.exports=window.wp.autop});var Kse=Ce((_lt,Zse)=>{"use strict";Zse.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var a,n,i;if(Array.isArray(t)){if(a=t.length,a!=r.length)return!1;for(n=a;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;for(n of t.entries())if(!e(n[1],r.get(n[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if(a=t.length,a!=r.length)return!1;for(n=a;n--!==0;)if(t[n]!==r[n])return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),a=i.length,a!==Object.keys(r).length)return!1;for(n=a;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=a;n--!==0;){var l=i[n];if(!e(t[l],r[l]))return!1}return!0}return t!==t&&r!==r}});var Npe=Ce((tpt,Ipe)=>{Ipe.exports=window.wp.keyboardShortcuts});var BCe={};Z(BCe,{__experimentalGetCoreBlocks:()=>Vpe,__experimentalRegisterExperimentalCoreBlocks:()=>PCe,privateApis:()=>PR,registerCoreBlocks:()=>TCe});var Cl=o(W(),1),Mpe=o(me(),1),Ape=o(V(),1),Rpe=o(T(),1),zpe=o(Fu(),1),yb=o(P(),1);function VR(e){var t,r,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=VR(e[t]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function ede(){for(var e,t,r=0,a="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=VR(e))&&(a&&(a+=" "),a+=t);return a}var w=ede;var xS=o(_S(),1),Bl=o(_S(),1),Kz=xS.default.default||xS.default;var Xz=o(ai(),1),Jz=o(v(),1),kfe=({wrapperProps:e={},html:t=""})=>{let r={replace:({name:i,type:l,attribs:s,parent:c,children:u})=>{if(l==="tag"&&i){let m=(0,Bl.attributesToProps)(s||{}),p=i;if(!c){let d={...m,...e,className:w(m.className,e.className),style:{...m.style||{},...e.style||{}}};return(0,Jz.jsx)(p,{...d,children:(0,Bl.domToReact)(u,r)})}}}},a=(0,Xz.safeHTML)(t);return Kz(a,r)},uo=kfe;var GB={};Z(GB,{init:()=>Tfe,metadata:()=>Bx,name:()=>mV,settings:()=>pV});var UB=o(P(),1);var Hb=o(U(),1),Wa=(0,Hb.forwardRef)(({icon:e,size:t=24,...r},a)=>(0,Hb.cloneElement)(e,{width:t,height:t,...r,ref:a}));var k0=o(L(),1),w0=o(v(),1),kS=(0,w0.jsxs)(k0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,w0.jsx)(k0.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 12.75L9.5 12.75L9.5 11.25L19.5 11.25L19.5 12.75Z"}),(0,w0.jsx)(k0.Path,{d:"M4.5 9.5L8.5 12L4.5 14.5L4.5 9.5Z"})]});var dp=o(L(),1),fp=o(v(),1),wS=(0,fp.jsxs)(dp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,fp.jsx)(dp.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 9.5L9.5 9.5L9.5 8L19.5 8L19.5 9.5Z"}),(0,fp.jsx)(dp.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 13L9.5 13L9.5 11.5L19.5 11.5L19.5 13Z"}),(0,fp.jsx)(dp.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 16.3999L9.5 16.3999L9.5 14.8999L19.5 14.8999L19.5 16.3999Z"}),(0,fp.jsx)(dp.Path,{d:"M4.5 6.25L8.5 8.75L4.5 11.25L4.5 6.25Z"})]});var hp=o(L(),1),gp=o(v(),1),CS=(0,gp.jsxs)(hp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,gp.jsx)(hp.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 9.25L9.5 9.25L9.5 7.75L19.5 7.75L19.5 9.25Z"}),(0,gp.jsx)(hp.Path,{d:"M4.5 6L8.5 8.5L4.5 11L4.5 6Z"}),(0,gp.jsx)(hp.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 16.25L9.5 16.25L9.5 14.75L19.5 14.75L19.5 16.25Z"}),(0,gp.jsx)(hp.Path,{d:"M4.5 13L8.5 15.5L4.5 18L4.5 13Z"})]});var Ob=o(L(),1),SS=o(v(),1),vp=(0,SS.jsx)(Ob.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,SS.jsx)(Ob.Path,{d:"M2 12c0 3.6 2.4 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.5 0-4.5-1.5-4.5-4s2-4.5 4.5-4.5h3.5V6H8c-3.6 0-6 2.4-6 6zm19.5-1h-8v1.5h8V11zm0 5h-8v1.5h8V16zm0-10h-8v1.5h8V6z"})});var jb=o(L(),1),TS=o(v(),1),PS=(0,TS.jsx)(jb.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TS.jsx)(jb.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})});var Ub=o(L(),1),BS=o(v(),1),IS=(0,BS.jsx)(Ub.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BS.jsx)(Ub.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})});var Gb=o(L(),1),NS=o(v(),1),ES=(0,NS.jsx)(Gb.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,NS.jsx)(Gb.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})});var Wb=o(L(),1),DS=o(v(),1),LS=(0,DS.jsx)(Wb.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,DS.jsx)(Wb.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})});var $b=o(L(),1),MS=o(v(),1),AS=(0,MS.jsx)($b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MS.jsx)($b.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var qb=o(L(),1),RS=o(v(),1),ni=(0,RS.jsx)(qb.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,RS.jsx)(qb.Path,{d:"M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z"})});var Zb=o(L(),1),zS=o(v(),1),VS=(0,zS.jsx)(Zb.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zS.jsx)(Zb.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})});var Kb=o(L(),1),FS=o(v(),1),C0=(0,FS.jsx)(Kb.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FS.jsx)(Kb.Path,{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"})});var Qb=o(L(),1),HS=o(v(),1),OS=(0,HS.jsx)(Qb.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,HS.jsx)(Qb.Path,{d:"M4 13.5h3v-3H4v3Zm6-3.5 2 2-2 2 1 1 3-3-3-3-1 1Zm7 .5v3h3v-3h-3Z"})});var Yb=o(L(),1),jS=o(v(),1),US=(0,jS.jsx)(Yb.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jS.jsx)(Yb.Path,{d:"M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z"})});var Xb=o(L(),1),GS=o(v(),1),WS=(0,GS.jsx)(Xb.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GS.jsx)(Xb.Path,{d:"M14.5 17.5H9.5V16H14.5V17.5Z M14.5 8H9.5V6.5H14.5V8Z M7 3.5H17C18.1046 3.5 19 4.39543 19 5.5V9C19 10.1046 18.1046 11 17 11H7C5.89543 11 5 10.1046 5 9V5.5C5 4.39543 5.89543 3.5 7 3.5ZM17 5H7C6.72386 5 6.5 5.22386 6.5 5.5V9C6.5 9.27614 6.72386 9.5 7 9.5H17C17.2761 9.5 17.5 9.27614 17.5 9V5.5C17.5 5.22386 17.2761 5 17 5Z M7 13H17C18.1046 13 19 13.8954 19 15V18.5C19 19.6046 18.1046 20.5 17 20.5H7C5.89543 20.5 5 19.6046 5 18.5V15C5 13.8954 5.89543 13 7 13ZM17 14.5H7C6.72386 14.5 6.5 14.7239 6.5 15V18.5C6.5 18.7761 6.72386 19 7 19H17C17.2761 19 17.5 18.7761 17.5 18.5V15C17.5 14.7239 17.2761 14.5 17 14.5Z"})});var Jb=o(L(),1),$S=o(v(),1),S0=(0,$S.jsx)(Jb.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$S.jsx)(Jb.Path,{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"})});var ey=o(L(),1),qS=o(v(),1),ZS=(0,qS.jsx)(ey.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,qS.jsx)(ey.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.5h12a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5ZM4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6Zm4 10h2v-1.5H8V16Zm5 0h-2v-1.5h2V16Zm1 0h2v-1.5h-2V16Z"})});var ty=o(L(),1),KS=o(v(),1),Gu=(0,KS.jsx)(ty.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,KS.jsx)(ty.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var ry=o(L(),1),QS=o(v(),1),bp=(0,QS.jsx)(ry.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QS.jsx)(ry.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var oy=o(L(),1),YS=o(v(),1),XS=(0,YS.jsx)(oy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YS.jsx)(oy.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});var ay=o(L(),1),JS=o(v(),1),ny=(0,JS.jsx)(ay.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,JS.jsx)(ay.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var iy=o(L(),1),e9=o(v(),1),t9=(0,e9.jsx)(iy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,e9.jsx)(iy.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})});var ly=o(L(),1),r9=o(v(),1),sy=(0,r9.jsx)(ly.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r9.jsx)(ly.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var cy=o(L(),1),o9=o(v(),1),T0=(0,o9.jsx)(cy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o9.jsx)(cy.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var uy=o(L(),1),a9=o(v(),1),P0=(0,a9.jsx)(uy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a9.jsx)(uy.Path,{d:"M20 6H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H4c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h16c.3 0 .5.2.5.5v9zM10 10H8v2h2v-2zm-5 2h2v-2H5v2zm8-2h-2v2h2v-2zm-5 6h8v-2H8v2zm6-4h2v-2h-2v2zm3 0h2v-2h-2v2zm0 4h2v-2h-2v2zM5 16h2v-2H5v2z"})});var my=o(L(),1),n9=o(v(),1),yp=(0,n9.jsx)(my.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n9.jsx)(my.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})});var py=o(L(),1),i9=o(v(),1),B0=(0,i9.jsx)(py.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i9.jsx)(py.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"})});var dy=o(L(),1),l9=o(v(),1),s9=(0,l9.jsx)(dy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l9.jsx)(dy.Path,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM6 17.5c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h3v10H6zm13.5-.5c0 .3-.2.5-.5.5h-3v-10h3c.3 0 .5.2.5.5v9z"})});var fy=o(L(),1),c9=o(v(),1),u9=(0,c9.jsx)(fy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c9.jsx)(fy.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 7.5h-5v10h5v-10Zm1.5 0v10H19a.5.5 0 0 0 .5-.5V8a.5.5 0 0 0-.5-.5h-2.5ZM6 7.5h2.5v10H6a.5.5 0 0 1-.5-.5V8a.5.5 0 0 1 .5-.5ZM6 6h13a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2Z"})});var hy=o(L(),1),m9=o(v(),1),I0=(0,m9.jsx)(hy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,m9.jsx)(hy.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var _p=o(L(),1),Tf=o(v(),1),p9=(0,Tf.jsxs)(_p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Tf.jsx)(_p.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"}),(0,Tf.jsx)(_p.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 15V15C15 13.8954 14.1046 13 13 13L11 13C9.89543 13 9 13.8954 9 15V15"}),(0,Tf.jsx)(_p.Circle,{cx:"12",cy:"9",r:"2",fillRule:"evenodd",clipRule:"evenodd"})]});var gy=o(L(),1),d9=o(v(),1),f9=(0,d9.jsx)(gy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d9.jsx)(gy.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.68822 16.625L5.5 17.8145L5.5 5.5L18.5 5.5L18.5 16.625L6.68822 16.625ZM7.31 18.125L19 18.125C19.5523 18.125 20 17.6773 20 17.125L20 5C20 4.44772 19.5523 4 19 4H5C4.44772 4 4 4.44772 4 5V19.5247C4 19.8173 4.16123 20.086 4.41935 20.2237C4.72711 20.3878 5.10601 20.3313 5.35252 20.0845L7.31 18.125ZM16 9.99997H8V8.49997H16V9.99997ZM8 14H13V12.5H8V14Z"})});var vy=o(L(),1),h9=o(v(),1),g9=(0,h9.jsx)(vy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,h9.jsx)(vy.Path,{d:"m6.249 11.065.44-.44h3.186l-1.5 1.5H7.31l-1.957 1.96A.792.792 0 0 1 4 13.524V5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v1.5L12.5 8V5.5h-7v6.315l.749-.75ZM20 19.75H7v-1.5h13v1.5Zm0-12.653-8.967 9.064L8 17l.867-2.935L17.833 5 20 7.097Z"})});var by=o(L(),1),v9=o(v(),1),b9=(0,v9.jsx)(by.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,v9.jsx)(by.Path,{d:"M6.68822 10.625L6.24878 11.0649L5.5 11.8145L5.5 5.5L12.5 5.5V8L14 6.5V5C14 4.44772 13.5523 4 13 4H5C4.44772 4 4 4.44771 4 5V13.5247C4 13.8173 4.16123 14.086 4.41935 14.2237C4.72711 14.3878 5.10601 14.3313 5.35252 14.0845L7.31 12.125H8.375L9.875 10.625H7.31H6.68822ZM14.5605 10.4983L11.6701 13.75H16.9975C17.9963 13.75 18.7796 14.1104 19.3553 14.7048C19.9095 15.2771 20.2299 16.0224 20.4224 16.7443C20.7645 18.0276 20.7543 19.4618 20.7487 20.2544C20.7481 20.345 20.7475 20.4272 20.7475 20.4999L19.2475 20.5001C19.2475 20.4191 19.248 20.3319 19.2484 20.2394V20.2394C19.2526 19.4274 19.259 18.2035 18.973 17.1307C18.8156 16.5401 18.586 16.0666 18.2778 15.7483C17.9909 15.4521 17.5991 15.25 16.9975 15.25H11.8106L14.5303 17.9697L13.4696 19.0303L8.96956 14.5303L13.4394 9.50171L14.5605 10.4983Z"})});var yy=o(L(),1),y9=o(v(),1),N0=(0,y9.jsx)(yy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,y9.jsx)(yy.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"})});var _y=o(L(),1),_9=o(v(),1),E0=(0,_9.jsx)(_y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_9.jsx)(_y.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M8.10417 6.00024H6.5C5.39543 6.00024 4.5 6.89567 4.5 8.00024V10.3336H6V8.00024C6 7.7241 6.22386 7.50024 6.5 7.50024H8.10417V6.00024ZM4.5 13.6669V16.0002C4.5 17.1048 5.39543 18.0002 6.5 18.0002H8.10417V16.5002H6.5C6.22386 16.5002 6 16.2764 6 16.0002V13.6669H4.5ZM10.3958 6.00024V7.50024H13.6042V6.00024H10.3958ZM15.8958 6.00024V7.50024H17.5C17.7761 7.50024 18 7.7241 18 8.00024V10.3336H19.5V8.00024C19.5 6.89567 18.6046 6.00024 17.5 6.00024H15.8958ZM19.5 13.6669H18V16.0002C18 16.2764 17.7761 16.5002 17.5 16.5002H15.8958V18.0002H17.5C18.6046 18.0002 19.5 17.1048 19.5 16.0002V13.6669ZM13.6042 18.0002V16.5002H10.3958V18.0002H13.6042Z"})});var xy=o(L(),1),x9=o(v(),1),xp=(0,x9.jsx)(xy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,x9.jsx)(xy.Path,{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-.8h6.2v8.9l2.5-3.1 2.5 3.1V4.5h2.2c.4 0 .8.4.8.8v13.4z"})});var ky=o(L(),1),k9=o(v(),1),D0=(0,k9.jsx)(ky.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,k9.jsx)(ky.Path,{d:"M18 20v-2h2v-1.5H7.75a.25.25 0 0 1-.25-.25V4H6v2H4v1.5h2v8.75c0 .966.784 1.75 1.75 1.75h8.75v2H18ZM9.273 7.5h6.977a.25.25 0 0 1 .25.25v6.977H18V7.75A1.75 1.75 0 0 0 16.25 6H9.273v1.5Z"})});var wy=o(L(),1),w9=o(v(),1),L0=(0,w9.jsx)(wy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,w9.jsx)(wy.Path,{d:"M12.5 14.5h-1V16h1c2.2 0 4-1.8 4-4s-1.8-4-4-4h-1v1.5h1c1.4 0 2.5 1.1 2.5 2.5s-1.1 2.5-2.5 2.5zm-4 1.5v-1.5h-1C6.1 14.5 5 13.4 5 12s1.1-2.5 2.5-2.5h1V8h-1c-2.2 0-4 1.8-4 4s1.8 4 4 4h1zm-1-3.2h5v-1.5h-5v1.5zM18 4H9c-1.1 0-2 .9-2 2v.5h1.5V6c0-.3.2-.5.5-.5h9c.3 0 .5.2.5.5v12c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5v-.5H7v.5c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2z"})});var Cy=o(L(),1),C9=o(v(),1),S9=(0,C9.jsx)(Cy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,C9.jsx)(Cy.Path,{d:"M4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4zm.8-4l.7.7 2-2V12h1V9.2l2 2 .7-.7-2-2H12v-1H9.2l2-2-.7-.7-2 2V4h-1v2.8l-2-2-.7.7 2 2H4v1h2.8l-2 2z"})});var M0=o(L(),1),A0=o(v(),1),T9=(0,A0.jsxs)(M0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,A0.jsx)(M0.Path,{d:"M4 16h10v1.5H4V16Zm0-4.5h16V13H4v-1.5ZM10 7h10v1.5H10V7Z",fillRule:"evenodd",clipRule:"evenodd"}),(0,A0.jsx)(M0.Path,{d:"m4 5.25 4 2.5-4 2.5v-5Z"})]});var Sy=o(L(),1),P9=o(v(),1),B9=(0,P9.jsx)(Sy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P9.jsx)(Sy.Path,{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"})});var Ty=o(L(),1),I9=o(v(),1),R0=(0,I9.jsx)(Ty.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,I9.jsx)(Ty.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var Py=o(L(),1),N9=o(v(),1),E9=(0,N9.jsx)(Py.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,N9.jsx)(Py.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})});var By=o(L(),1),D9=o(v(),1),L9=(0,D9.jsx)(By.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,D9.jsx)(By.Path,{d:"M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM20.0303 9.03033L17.0607 12L20.0303 14.9697L18.9697 16.0303L15.4697 12.5303L14.9393 12L15.4697 11.4697L18.9697 7.96967L20.0303 9.03033Z"})});var Iy=o(L(),1),M9=o(v(),1),A9=(0,M9.jsx)(Iy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,M9.jsx)(Iy.Path,{d:"M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-8-3.5l3 3-3 3 1 1 4-4-4-4-1 1z"})});var Ny=o(L(),1),R9=o(v(),1),z0=(0,R9.jsx)(Ny.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,R9.jsx)(Ny.Path,{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"})});var Ey=o(L(),1),z9=o(v(),1),V0=(0,z9.jsx)(Ey.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,z9.jsx)(Ey.Path,{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"})});var Dy=o(L(),1),V9=o(v(),1),F0=(0,V9.jsx)(Dy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,V9.jsx)(Dy.Path,{d:"M3.8 15.8h8.9v-1.5H3.8v1.5zm0-7h8.9V7.2H3.8v1.6zm14.7-2.1V10h1V5.3l-2.2.7.3 1 .9-.3zm1.2 6.1c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5H20v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3 0-.8-.3-1.1z"})});var Ly=o(L(),1),F9=o(v(),1),Ki=(0,F9.jsx)(Ly.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,F9.jsx)(Ly.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM5 6.7V10h1V5.3L3.8 6l.4 1 .8-.3zm-.4 5.7c-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-1c.3-.6.8-1.4.9-2.1.1-.3 0-.8-.2-1.1-.5-.6-1.3-.5-1.7-.4z"})});var My=o(L(),1),H9=o(v(),1),O9=(0,H9.jsx)(My.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,H9.jsx)(My.Path,{d:"M3 9c0 2.8 2.2 5 5 5v-.2V20h1.5V5.5H12V20h1.5V5.5h3V4H8C5.2 4 3 6.2 3 9Zm15.9-1-1.1 1 2.6 3-2.6 3 1.1 1 3.4-4-3.4-4Z"})});var Ay=o(L(),1),j9=o(v(),1),H0=(0,j9.jsx)(Ay.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,j9.jsx)(Ay.Path,{d:"M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM15.4697 14.9697L18.4393 12L15.4697 9.03033L16.5303 7.96967L20.0303 11.4697L20.5607 12L20.0303 12.5303L16.5303 16.0303L15.4697 14.9697Z"})});var Ry=o(L(),1),U9=o(v(),1),O0=(0,U9.jsx)(Ry.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,U9.jsx)(Ry.Path,{d:"M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-4-4.6l-4 4 4 4 1-1-3-3 3-3-1-1z"})});var zy=o(L(),1),G9=o(v(),1),kp=(0,G9.jsx)(zy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,G9.jsx)(zy.Path,{d:"M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"})});var Vy=o(L(),1),W9=o(v(),1),j0=(0,W9.jsx)(Vy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,W9.jsx)(Vy.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M16.375 4.5H4.625a.125.125 0 0 0-.125.125v8.254l2.859-1.54a.75.75 0 0 1 .68-.016l2.384 1.142 2.89-2.074a.75.75 0 0 1 .874 0l2.313 1.66V4.625a.125.125 0 0 0-.125-.125Zm.125 9.398-2.75-1.975-2.813 2.02a.75.75 0 0 1-.76.067l-2.444-1.17L4.5 14.583v1.792c0 .069.056.125.125.125h11.75a.125.125 0 0 0 .125-.125v-2.477ZM4.625 3C3.728 3 3 3.728 3 4.625v11.75C3 17.273 3.728 18 4.625 18h11.75c.898 0 1.625-.727 1.625-1.625V4.625C18 3.728 17.273 3 16.375 3H4.625ZM20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z"})});var Fy=o(L(),1),$9=o(v(),1),Il=(0,$9.jsx)(Fy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$9.jsx)(Fy.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z"})});var Hy=o(L(),1),q9=o(v(),1),wp=(0,q9.jsx)(Hy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,q9.jsx)(Hy.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"})});var Oy=o(L(),1),Z9=o(v(),1),K9=(0,Z9.jsx)(Oy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Z9.jsx)(Oy.Path,{d:"M18.5 10.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"})});var jy=o(L(),1),Q9=o(v(),1),Y9=(0,Q9.jsx)(jy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Q9.jsx)(jy.Path,{d:"M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z"})});var Uy=o(L(),1),X9=o(v(),1),J9=(0,X9.jsx)(Uy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,X9.jsx)(Uy.Path,{d:"M9 11.1H5v-4H3v10h2v-4h4v4h2v-10H9v4zm8 4c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6v1.5h8v-2H17z"})});var Gy=o(L(),1),eT=o(v(),1),tT=(0,eT.jsx)(Gy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eT.jsx)(Gy.Path,{d:"M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.3 1.7c-.4-.4-1-.7-1.6-.8v-.1c.6-.2 1.1-.5 1.5-.9.3-.4.5-.8.5-1.3 0-.4-.1-.8-.3-1.1-.2-.3-.5-.6-.8-.8-.4-.2-.8-.4-1.2-.5-.6-.1-1.1-.2-1.6-.2-.6 0-1.3.1-1.8.3s-1.1.5-1.6.9l1.2 1.4c.4-.2.7-.4 1.1-.6.3-.2.7-.3 1.1-.3.4 0 .8.1 1.1.3.3.2.4.5.4.8 0 .4-.2.7-.6.9-.7.3-1.5.5-2.2.4v1.6c.5 0 1 0 1.5.1.3.1.7.2 1 .3.2.1.4.2.5.4s.1.4.1.6c0 .3-.2.7-.5.8-.4.2-.9.3-1.4.3s-1-.1-1.4-.3c-.4-.2-.8-.4-1.2-.7L13 15.6c.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.6 0 1.1-.1 1.6-.2.4-.1.9-.2 1.3-.5.4-.2.7-.5.9-.9.2-.4.3-.8.3-1.2 0-.6-.3-1.1-.7-1.5z"})});var Wy=o(L(),1),rT=o(v(),1),oT=(0,rT.jsx)(Wy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rT.jsx)(Wy.Path,{d:"M20 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z"})});var $y=o(L(),1),aT=o(v(),1),nT=(0,aT.jsx)($y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aT.jsx)($y.Path,{d:"M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.7 1.2c-.2-.3-.5-.7-.8-.9-.3-.3-.7-.5-1.1-.6-.5-.1-.9-.2-1.4-.2-.2 0-.5.1-.7.1-.2.1-.5.1-.7.2l.1-1.9h4.3V7H14l-.3 5 1 .6.5-.2.4-.1c.1-.1.3-.1.4-.1h.5c.5 0 1 .1 1.4.4.4.2.6.7.6 1.1 0 .4-.2.8-.6 1.1-.4.3-.9.4-1.4.4-.4 0-.9-.1-1.3-.3-.4-.2-.7-.4-1.1-.7 0 0-1.1 1.4-1 1.5.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.5 0 1-.1 1.5-.3s.9-.4 1.3-.7c.4-.3.7-.7.9-1.1s.3-.9.3-1.4-.1-1-.3-1.4z"})});var qy=o(L(),1),iT=o(v(),1),lT=(0,iT.jsx)(qy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,iT.jsx)(qy.Path,{d:"M20.7 12.4c-.2-.3-.4-.6-.7-.9s-.6-.5-1-.6c-.4-.2-.8-.2-1.2-.2-.5 0-.9.1-1.3.3s-.8.5-1.2.8c0-.5 0-.9.2-1.4l.6-.9c.2-.2.5-.4.8-.5.6-.2 1.3-.2 1.9 0 .3.1.6.3.8.5 0 0 1.3-1.3 1.3-1.4-.4-.3-.9-.6-1.4-.8-.6-.2-1.3-.3-2-.3-.6 0-1.1.1-1.7.4-.5.2-1 .5-1.4.9-.4.4-.8 1-1 1.6-.3.7-.4 1.5-.4 2.3s.1 1.5.3 2.1c.2.6.6 1.1 1 1.5.4.4.9.7 1.4.9 1 .3 2 .3 3 0 .4-.1.8-.3 1.2-.6.3-.3.6-.6.8-1 .2-.5.3-.9.3-1.4s-.1-.9-.3-1.3zm-2 2.1c-.1.2-.3.4-.4.5-.1.1-.3.2-.5.2-.2.1-.4.1-.6.1-.2.1-.5 0-.7-.1-.2 0-.3-.2-.5-.3-.1-.2-.3-.4-.4-.6-.2-.3-.3-.7-.3-1 .3-.3.6-.5 1-.7.3-.1.7-.2 1-.2.4 0 .8.1 1.1.3.3.3.4.7.4 1.1 0 .2 0 .5-.1.7zM9 11H5V7H3v10h2v-4h4v4h2V7H9v4z"})});var Zy=o(L(),1),sT=o(v(),1),cT=(0,sT.jsx)(Zy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,sT.jsx)(Zy.Path,{d:"M6 5V18.5911L12 13.8473L18 18.5911V5H6Z"})});var Ky=o(L(),1),uT=o(v(),1),mT=(0,uT.jsx)(Ky.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,uT.jsx)(Ky.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})});var Qy=o(L(),1),pT=o(v(),1),dT=(0,pT.jsx)(Qy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pT.jsx)(Qy.Path,{d:"M4.8 11.4H2.1V9H1v6h1.1v-2.6h2.7V15h1.1V9H4.8v2.4zm1.9-1.3h1.7V15h1.1v-4.9h1.7V9H6.7v1.1zM16.2 9l-1.5 2.7L13.3 9h-.9l-.8 6h1.1l.5-4 1.5 2.8 1.5-2.8.5 4h1.1L17 9h-.8zm3.8 5V9h-1.1v6h3.6v-1H20z"})});var Yy=o(L(),1),fT=o(v(),1),Wu=(0,fT.jsx)(Yy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fT.jsx)(Yy.Path,{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.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})});var Xy=o(L(),1),hT=o(v(),1),gT=(0,hT.jsx)(Xy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hT.jsx)(Xy.Path,{d:"m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734Z"})});var Jy=o(L(),1),vT=o(v(),1),Cp=(0,vT.jsx)(Jy.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,vT.jsx)(Jy.Path,{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"})});var e_=o(L(),1),bT=o(v(),1),U0=(0,bT.jsx)(e_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bT.jsx)(e_.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})});var t_=o(L(),1),yT=o(v(),1),ii=(0,yT.jsx)(t_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yT.jsx)(t_.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});var r_=o(L(),1),_T=o(v(),1),xT=(0,_T.jsx)(r_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_T.jsx)(r_.Path,{d:"M12 11v1.5h8V11h-8zm-6-1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})});var o_=o(L(),1),kT=o(v(),1),Nl=(0,kT.jsx)(o_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kT.jsx)(o_.Path,{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"})});var a_=o(L(),1),wT=o(v(),1),CT=(0,wT.jsx)(a_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wT.jsx)(a_.Path,{d:"M11 14.5l1.1 1.1 3-3 .5-.5-.6-.6-3-3-1 1 1.7 1.7H5v1.5h7.7L11 14.5zM16.8 5h-7c-1.1 0-2 .9-2 2v1.5h1.5V7c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v10c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5v-1.5H7.8V17c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2z"})});var n_=o(L(),1),ST=o(v(),1),Sp=(0,ST.jsx)(n_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ST.jsx)(n_.Path,{d:"M18.1823 11.6392C18.1823 13.0804 17.0139 14.2487 15.5727 14.2487C14.3579 14.2487 13.335 13.4179 13.0453 12.2922L13.0377 12.2625L13.0278 12.2335L12.3985 10.377L12.3942 10.3785C11.8571 8.64997 10.246 7.39405 8.33961 7.39405C5.99509 7.39405 4.09448 9.29465 4.09448 11.6392C4.09448 13.9837 5.99509 15.8843 8.33961 15.8843C8.88499 15.8843 9.40822 15.781 9.88943 15.5923L9.29212 14.0697C8.99812 14.185 8.67729 14.2487 8.33961 14.2487C6.89838 14.2487 5.73003 13.0804 5.73003 11.6392C5.73003 10.1979 6.89838 9.02959 8.33961 9.02959C9.55444 9.02959 10.5773 9.86046 10.867 10.9862L10.8772 10.9836L11.4695 12.7311C11.9515 14.546 13.6048 15.8843 15.5727 15.8843C17.9172 15.8843 19.8178 13.9837 19.8178 11.6392C19.8178 9.29465 17.9172 7.39404 15.5727 7.39404C15.0287 7.39404 14.5066 7.4968 14.0264 7.6847L14.6223 9.20781C14.9158 9.093 15.2358 9.02959 15.5727 9.02959C17.0139 9.02959 18.1823 10.1979 18.1823 11.6392Z"})});var i_=o(L(),1),TT=o(v(),1),PT=(0,TT.jsx)(i_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TT.jsx)(i_.Path,{d:"M12 9c-.8 0-1.5.7-1.5 1.5S11.2 12 12 12s1.5-.7 1.5-1.5S12.8 9 12 9zm0-5c-3.6 0-6.5 2.8-6.5 6.2 0 .8.3 1.8.9 3.1.5 1.1 1.2 2.3 2 3.6.7 1 3 3.8 3.2 3.9l.4.5.4-.5c.2-.2 2.6-2.9 3.2-3.9.8-1.2 1.5-2.5 2-3.6.6-1.3.9-2.3.9-3.1C18.5 6.8 15.6 4 12 4zm4.3 8.7c-.5 1-1.1 2.2-1.9 3.4-.5.7-1.7 2.2-2.4 3-.7-.8-1.9-2.3-2.4-3-.8-1.2-1.4-2.3-1.9-3.3-.6-1.4-.7-2.2-.7-2.5 0-2.6 2.2-4.7 5-4.7s5 2.1 5 4.7c0 .2-.1 1-.7 2.4z"})});var l_=o(L(),1),BT=o(v(),1),IT=(0,BT.jsx)(l_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BT.jsx)(l_.Path,{d:"M11.2 6.8c-.7 0-1.4.5-1.6 1.1l-2.8 7.5-1.2-1.8c-.1-.2-.4-.3-.6-.3H3v1.5h1.6l1.2 1.8c.6.9 1.9.7 2.2-.3l2.9-7.9s.1-.2.2-.2h7.8V6.7h-7.8Zm5.3 3.4-1.9 1.9-1.9-1.9-1.1 1.1 1.9 1.9-1.9 1.9 1.1 1.1 1.9-1.9 1.9 1.9 1.1-1.1-1.9-1.9 1.9-1.9-1.1-1.1Z"})});var s_=o(L(),1),NT=o(v(),1),ET=(0,NT.jsx)(s_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,NT.jsx)(s_.Path,{d:"M3 6v11.5h8V6H3Zm11 3h7V7.5h-7V9Zm7 3.5h-7V11h7v1.5ZM14 16h7v-1.5h-7V16Z"})});var G0=o(L(),1),W0=o(v(),1),$0=(0,W0.jsxs)(G0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,W0.jsx)(G0.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,W0.jsx)(G0.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})]});var c_=o(L(),1),DT=o(v(),1),LT=(0,DT.jsx)(c_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,DT.jsx)(c_.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"})});var u_=o(L(),1),MT=o(v(),1),q0=(0,MT.jsx)(u_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MT.jsx)(u_.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var m_=o(L(),1),AT=o(v(),1),RT=(0,AT.jsx)(m_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AT.jsx)(m_.Path,{d:"M4 9v1.5h16V9H4zm12 5.5h4V13h-4v1.5zm-6 0h4V13h-4v1.5zm-6 0h4V13H4v1.5z"})});var p_=o(L(),1),zT=o(v(),1),VT=(0,zT.jsx)(p_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zT.jsx)(p_.Path,{d:"M18.5 10a1.5 1.5 0 0 1 1.5 1.5v7a1.5 1.5 0 0 1-1.5 1.5h-7a1.5 1.5 0 0 1-1.5-1.5v-7a1.5 1.5 0 0 1 1.5-1.5zM16 4a2 2 0 0 1 2 2v2h-1.5V6a.5.5 0 0 0-.5-.5H6a.5.5 0 0 0-.5.5v3H8v1.5H5.5V16a.5.5 0 0 0 .5.5h2V18H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z"})});var d_=o(L(),1),FT=o(v(),1),Tp=(0,FT.jsx)(d_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FT.jsx)(d_.Path,{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"})});var f_=o(L(),1),HT=o(v(),1),OT=(0,HT.jsx)(f_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,HT.jsx)(f_.Path,{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"})});var h_=o(L(),1),jT=o(v(),1),UT=(0,jT.jsx)(h_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jT.jsx)(h_.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12-9.8c.4 0 .8-.3.9-.7l1.1-3h3.6l.5 1.7h1.9L13 9h-2.2l-3.4 9.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12H20V6c0-1.1-.9-2-2-2zm-6 7l1.4 3.9h-2.7L12 11z"})});var g_=o(L(),1),GT=o(v(),1),WT=(0,GT.jsx)(g_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GT.jsx)(g_.Path,{d:"M17.5 9V6a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v3H8V6a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v3h1.5Zm0 6.5V18a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2v-2.5H8V18a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 .5-.5v-2.5h1.5ZM4 13h16v-1.5H4V13Z"})});var Z0=o(L(),1),K0=o(v(),1),Fc=(0,K0.jsxs)(Z0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,K0.jsx)(Z0.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,K0.jsx)(Z0.Path,{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"})]});var Pf=o(L(),1),Bf=o(v(),1),$T=(0,Bf.jsxs)(Pf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Bf.jsx)(Pf.Path,{d:"M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z"}),(0,Bf.jsx)(Pf.Path,{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"}),(0,Bf.jsx)(Pf.Path,{d:"M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z"})]});var v_=o(L(),1),qT=o(v(),1),ZT=(0,qT.jsx)(v_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,qT.jsx)(v_.Path,{d:"m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z"})});var b_=o(L(),1),KT=o(v(),1),Pp=(0,KT.jsx)(b_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,KT.jsx)(b_.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});var y_=o(L(),1),QT=o(v(),1),Q0=(0,QT.jsx)(y_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QT.jsx)(y_.Path,{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"})});var __=o(L(),1),YT=o(v(),1),XT=(0,YT.jsx)(__.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YT.jsx)(__.Path,{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"})});var x_=o(L(),1),JT=o(v(),1),If=(0,JT.jsx)(x_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,JT.jsx)(x_.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var k_=o(L(),1),eP=o(v(),1),tP=(0,eP.jsx)(k_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eP.jsx)(k_.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})});var w_=o(L(),1),rP=o(v(),1),oP=(0,rP.jsx)(w_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rP.jsx)(w_.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})});var C_=o(L(),1),aP=o(v(),1),nP=(0,aP.jsx)(C_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aP.jsx)(C_.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var S_=o(L(),1),iP=o(v(),1),Bp=(0,iP.jsx)(S_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,iP.jsx)(S_.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var T_=o(L(),1),lP=o(v(),1),Nf=(0,lP.jsx)(T_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,lP.jsx)(T_.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 4H4v1.5h16V4zm-2 9h-3c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3zM4 9.5h9V8H4v1.5zM9 13H6c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3z"})});var P_=o(L(),1),sP=o(v(),1),Y0=(0,sP.jsx)(P_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,sP.jsx)(P_.Path,{d:"M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1V13c0-.6-.4-1-1-1zm-2.2 6.6H7l1.6-2.2c.3-.4.5-.7.6-.9.1-.2.2-.4.2-.5 0-.2-.1-.3-.1-.4-.1-.1-.2-.1-.4-.1s-.4 0-.6.1c-.3.1-.5.3-.7.4l-.2.2-.2-1.2.1-.1c.3-.2.5-.3.8-.4.3-.1.6-.1.9-.1.3 0 .6.1.9.2.2.1.4.3.6.5.1.2.2.5.2.7 0 .3-.1.6-.2.9-.1.3-.4.7-.7 1.1l-.5.6h1.6v1.2z"})});var B_=o(L(),1),cP=o(v(),1),uP=(0,cP.jsx)(B_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cP.jsx)(B_.Path,{d:"M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1V13c0-.6-.4-1-1-1zm-.5 6.6H6.7l-1.2 1.2v-6.3h7v5.1z"})});var I_=o(L(),1),mP=o(v(),1),pP=(0,mP.jsx)(I_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mP.jsx)(I_.Path,{d:"M14 10.1V4c0-.6-.4-1-1-1H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1zm-1.5-.5H6.7l-1.2 1.2V4.5h7v5.1zM19 12h-8c-.6 0-1 .4-1 1v6.1c0 .6.4 1 1 1h5.7l1.8 1.8c.1.2.4.3.6.3.1 0 .2 0 .3-.1.4-.1.6-.5.6-.8V13c0-.6-.4-1-1-1zm-.5 7.8l-1.2-1.2h-5.8v-5.1h7v6.3z"})});var N_=o(L(),1),dP=o(v(),1),fP=(0,dP.jsx)(N_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,dP.jsx)(N_.Path,{d:"M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z"})});var X0=o(L(),1),J0=o(v(),1),e1=(0,J0.jsxs)(X0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,J0.jsx)(X0.Path,{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"}),(0,J0.jsx)(X0.Path,{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"})]});var E_=o(L(),1),hP=o(v(),1),gP=(0,hP.jsx)(E_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hP.jsx)(E_.Path,{d:"M8.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H4v-3h4.001ZM4 20h9v-1.5H4V20Zm16-4H4v-1.5h16V16ZM13.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H9v-3h4.001Z"})});var D_=o(L(),1),vP=o(v(),1),bP=(0,vP.jsx)(D_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,vP.jsx)(D_.Path,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"})});var L_=o(L(),1),yP=o(v(),1),t1=(0,yP.jsx)(L_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yP.jsx)(L_.Path,{d:"M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z"})});var M_=o(L(),1),_P=o(v(),1),xP=(0,_P.jsx)(M_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_P.jsx)(M_.Path,{d:"M8.1 12.3c.1.1.3.3.5.3.2.1.4.1.6.1.2 0 .4 0 .6-.1.2-.1.4-.2.5-.3l3-3c.3-.3.5-.7.5-1.1 0-.4-.2-.8-.5-1.1L9.7 3.5c-.1-.2-.3-.3-.5-.3H5c-.4 0-.8.4-.8.8v4.2c0 .2.1.4.2.5l3.7 3.6zM5.8 4.8h3.1l3.4 3.4v.1l-3 3 .5.5-.7-.5-3.3-3.4V4.8zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})});var A_=o(L(),1),kP=o(v(),1),wP=(0,kP.jsx)(A_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kP.jsx)(A_.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 16.5h6V15H7v1.5zm4-4h6V11h-6v1.5zM9 11H7v1.5h2V11zm6 5.5h2V15h-2v1.5z"})});var R_=o(L(),1),CP=o(v(),1),SP=(0,CP.jsx)(R_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,CP.jsx)(R_.Path,{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"})});var z_=o(L(),1),TP=o(v(),1),PP=(0,TP.jsx)(z_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TP.jsx)(z_.Path,{d:"M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"})});var V_=o(L(),1),BP=o(v(),1),IP=(0,BP.jsx)(V_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BP.jsx)(V_.Path,{d:"M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"})});var F_=o(L(),1),NP=o(v(),1),EP=(0,NP.jsx)(F_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,NP.jsx)(F_.Path,{d:"M18 8H6c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v4zM4 4v1.5h16V4H4zm0 16h16v-1.5H4V20z"})});var H_=o(L(),1),DP=o(v(),1),r1=(0,DP.jsx)(H_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,DP.jsx)(H_.Path,{d:"M5 13.5h3v-3H5v3zm5 0h3v-3h-3v3zM17 9l-1 1 2 2-2 2 1 1 3-3-3-3z"})});var O_=o(L(),1),LP=o(v(),1),o1=(0,LP.jsx)(O_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LP.jsx)(O_.Path,{d:"M4 13.5h6v-3H4v3zm8.2-2.5.8-.3V14h1V9.3l-2.2.7.4 1zm7.1-1.2c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3-.1-.8-.3-1.1z"})});var j_=o(L(),1),MP=o(v(),1),a1=(0,MP.jsx)(j_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MP.jsx)(j_.Path,{d:"M16 10.5v3h3v-3h-3zm-5 3h3v-3h-3v3zM7 9l-3 3 3 3 1-1-2-2 2-2-1-1z"})});var U_=o(L(),1),AP=o(v(),1),n1=(0,AP.jsx)(U_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AP.jsx)(U_.Path,{d:"M4 13.5h6v-3H4v3zm8 0h3v-3h-3v3zm5-3v3h3v-3h-3z"})});var G_=o(L(),1),RP=o(v(),1),zP=(0,RP.jsx)(G_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,RP.jsx)(G_.Path,{d:"M13 6v6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H13zm-9 6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H4v6z"})});var W_=o(L(),1),VP=o(v(),1),FP=(0,VP.jsx)(W_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VP.jsx)(W_.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m13.955 20.748 8-17.5-.91-.416L19.597 6H13.5v1.5h5.411l-1.6 3.5H13.5v1.5h3.126l-1.6 3.5H13.5l.028 1.5h.812l-1.295 2.832.91.416ZM17.675 16l-.686 1.5h4.539L21.5 16h-3.825Zm2.286-5-.686 1.5H21.5V11h-1.54ZM2 12c0 3.58 2.42 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.48 0-4.5-1.52-4.5-4S5.52 7.5 8 7.5h3.5V6H8c-3.58 0-6 2.42-6 6Z"})});var $_=o(L(),1),HP=o(v(),1),OP=(0,HP.jsx)($_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,HP.jsx)($_.Path,{d:"M7 18h4.5v1.5h-7v-7H6V17L17 6h-4.5V4.5h7v7H18V7L7 18Z"})});var q_=o(L(),1),jP=o(v(),1),UP=(0,jP.jsx)(q_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jP.jsx)(q_.Path,{d:"M4 6.5h5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4V16h5a.5.5 0 0 0 .5-.5v-7A.5.5 0 0 0 9 8H4V6.5Zm16 0h-5a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h5V16h-5a.5.5 0 0 1-.5-.5v-7A.5.5 0 0 1 15 8h5V6.5Z"})});var Z_=o(L(),1),GP=o(v(),1),i1=(0,GP.jsx)(Z_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GP.jsx)(Z_.Path,{d:"M5 10.2h-.8v1.5H5c1.9 0 3.8.8 5.1 2.1 1.4 1.4 2.1 3.2 2.1 5.1v.8h1.5V19c0-2.3-.9-4.5-2.6-6.2-1.6-1.6-3.8-2.6-6.1-2.6zm10.4-1.6C12.6 5.8 8.9 4.2 5 4.2h-.8v1.5H5c3.5 0 6.9 1.4 9.4 3.9s3.9 5.8 3.9 9.4v.8h1.5V19c0-3.9-1.6-7.6-4.4-10.4zM4 20h3v-3H4v3z"})});var K_=o(L(),1),WP=o(v(),1),l1=(0,WP.jsx)(K_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,WP.jsx)(K_.Path,{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"})});var Q_=o(L(),1),$P=o(v(),1),qP=(0,$P.jsx)(Q_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$P.jsx)(Q_.Path,{d:"M4.5 12.5v4H3V7h1.5v3.987h15V7H21v9.5h-1.5v-4h-15Z"})});var Y_=o(L(),1),ZP=o(v(),1),s1=(0,ZP.jsx)(Y_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZP.jsx)(Y_.Path,{d:"M9 11.8l6.1-4.5c.1.4.4.7.9.7h2c.6 0 1-.4 1-1V5c0-.6-.4-1-1-1h-2c-.6 0-1 .4-1 1v.4l-6.4 4.8c-.2-.1-.4-.2-.6-.2H6c-.6 0-1 .4-1 1v2c0 .6.4 1 1 1h2c.2 0 .4-.1.6-.2l6.4 4.8v.4c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-2c0-.6-.4-1-1-1h-2c-.5 0-.8.3-.9.7L9 12.2v-.4z"})});var X_=o(L(),1),KP=o(v(),1),c1=(0,KP.jsx)(X_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,KP.jsx)(X_.Path,{d:"M16 4.2v1.5h2.5v12.5H16v1.5h4V4.2h-4zM4.2 19.8h4v-1.5H5.8V5.8h2.5V4.2h-4l-.1 15.6zm5.1-3.1l1.4.6 4-10-1.4-.6-4 10z"})});var J_=o(L(),1),QP=o(v(),1),YP=(0,QP.jsx)(J_.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QP.jsx)(J_.Path,{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.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})});var ex=o(L(),1),XP=o(v(),1),JP=(0,XP.jsx)(ex.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,XP.jsx)(ex.Path,{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 1.5c3.4 0 6.2 2.7 6.5 6l-1.2-.6-.8-.4c-.1 0-.2 0-.3-.1H16c-.1-.2-.4-.2-.7 0l-2.9 2.1L9 11.3h-.7L5.5 13v-1.1c0-3.6 2.9-6.5 6.5-6.5Zm0 13c-2.7 0-5-1.7-6-4l2.8-1.7 3.5 1.2h.4s.2 0 .4-.2l2.9-2.1.4.2c.6.3 1.4.7 2.1 1.1-.5 3.1-3.2 5.4-6.4 5.4Z"})});var tx=o(L(),1),eB=o(v(),1),tB=(0,eB.jsx)(tx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eB.jsx)(tx.Path,{fill:"none",d:"M5.75 12.75V18.25H11.25M12.75 5.75H18.25V11.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})});var rx=o(L(),1),rB=o(v(),1),oB=(0,rB.jsx)(rx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rB.jsx)(rx.Path,{d:"M17.5 4v5a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V4H8v5a.5.5 0 0 0 .5.5h7A.5.5 0 0 0 16 9V4h1.5Zm0 16v-5a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v5H8v-5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v5h1.5Z"})});var ox=o(L(),1),aB=o(v(),1),u1=(0,aB.jsx)(ox.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aB.jsx)(ox.Path,{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"})});var ax=o(L(),1),nB=o(v(),1),iB=(0,nB.jsx)(ax.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nB.jsx)(ax.Path,{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"})});var nx=o(L(),1),lB=o(v(),1),sB=(0,lB.jsx)(nx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,lB.jsx)(nx.Path,{d:"M4 16.5h13V15H4v1.5ZM4 12v1.5h16V12H4Zm1.5-4.2c0-.1.1-.2.2-.2h3.5c.1 0 .2.1.2.2v2.5h1.5V7.8c0-1-.8-1.8-1.8-1.8H5.6c-1 0-1.8.8-1.8 1.8v2.5h1.5V7.8Z"})});var ix=o(L(),1),cB=o(v(),1),uB=(0,cB.jsx)(ix.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cB.jsx)(ix.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14.2c.1.9.9 1.7 1.8 1.8H19.2c1-.1 1.8-1 1.8-2V5c0-1.1-.9-2-2-2ZM8.5 19.5H5c-.3 0-.5-.2-.5-.5v-3.5h4v4Zm0-5.5h-4v-4h4v4Zm0-5.5h-4V5c0-.3.2-.5.5-.5h3.5v4Zm11 10.5c0 .3-.2.5-.5.5h-9v-15h9c.3 0 .5.2.5.5v14Zm-4-10.8H14v3h-3v1.5h3v3h1.5v-3h3v-1.5h-3v-3Z"})});var lx=o(L(),1),mB=o(v(),1),pB=(0,mB.jsx)(lx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mB.jsx)(lx.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1 .8 1.9 1.8 2H19.2c.9-.1 1.7-.9 1.8-1.8V5c0-1.1-.9-2-2-2Zm-5 16.5H5c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h9v15Zm5.5-.5c0 .3-.2.5-.5.5h-3.5v-4h4V19Zm0-5h-4v-4h4v4Zm0-5.5h-4v-4H19c.3 0 .5.2.5.5v3.5Zm-11 7.3H10v-3h3v-1.5h-3v-3H8.5v3h-3v1.5h3v3Z"})});var sx=o(L(),1),dB=o(v(),1),fB=(0,dB.jsx)(sx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,dB.jsx)(sx.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14.2c.1.9.9 1.7 1.8 1.8H19.2c1-.1 1.8-1 1.8-2V5c0-1.1-.9-2-2-2ZM8.5 19.5H5c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h3.5v15Zm11-.5c0 .3-.2.5-.5.5h-9v-15h9c.3 0 .5.2.5.5v14ZM16.9 8.8l-2.1 2.1-2.1-2.1-1.1 1.1 2.1 2.1-2.1 2.1 1.1 1.1 2.1-2.1 2.1 2.1 1.1-1.1-2.1-2.1L18 9.9l-1.1-1.1Z"})});var m1=o(L(),1),p1=o(v(),1),d1=(0,p1.jsxs)(m1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,p1.jsx)(m1.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 9.484h-8.889v-1.5H20v1.5Zm0 7h-4.889v-1.5H20v1.5Zm-14 .032a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 1a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"}),(0,p1.jsx)(m1.Path,{d:"M13 15.516a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM8 8.484a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"})]});var cx=o(L(),1),hB=o(v(),1),gB=(0,hB.jsx)(cx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hB.jsx)(cx.Path,{d:"M19 3H4.8c-.9.1-1.7.9-1.8 1.8V19.2c.1 1 1 1.8 2 1.8h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm-9 1.5h4v4h-4v-4ZM4.5 5c0-.3.2-.5.5-.5h3.5v4h-4V5Zm15 14c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-9h15v9Zm0-10.5h-4v-4H19c.3 0 .5.2.5.5v3.5Zm-8.3 10h1.5v-3h3V14h-3v-3h-1.5v3h-3v1.5h3v3Z"})});var ux=o(L(),1),vB=o(v(),1),bB=(0,vB.jsx)(ux.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,vB.jsx)(ux.Path,{d:"M21 5c0-1.1-.9-2-2-2H5c-1 0-1.9.8-2 1.8V19.2c.1.9.9 1.7 1.8 1.8H19c1.1 0 2-.9 2-2V5ZM4.5 14V5c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v9h-15Zm4 5.5H5c-.3 0-.5-.2-.5-.5v-3.5h4v4Zm5.5 0h-4v-4h4v4Zm5.5-.5c0 .3-.2.5-.5.5h-3.5v-4h4V19ZM11.2 10h-3V8.5h3v-3h1.5v3h3V10h-3v3h-1.5v-3Z"})});var mx=o(L(),1),yB=o(v(),1),_B=(0,yB.jsx)(mx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yB.jsx)(mx.Path,{d:"M19 3H4.8c-.9.1-1.7.9-1.8 1.8V19.2c.1 1 1 1.8 2 1.8h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-9h15v9Zm0-10.5h-15V5c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v3.5Zm-9.6 9.4 2.1-2.1 2.1 2.1 1.1-1.1-2.1-2.1 2.1-2.1-1.1-1.1-2.1 2.1-2.1-2.1-1.1 1.1 2.1 2.1-2.1 2.1 1.1 1.1Z"})});var px=o(L(),1),xB=o(v(),1),kB=(0,xB.jsx)(px.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xB.jsx)(px.Path,{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 2v6.2h-6.8V4.4h6.2c.3 0 .5.2.5.5ZM5 4.5h6.2v6.8H4.4V5.1c0-.3.2-.5.5-.5ZM4.5 19v-6.2h6.8v6.8H5.1c-.3 0-.5-.2-.5-.5Zm14.5.5h-6.2v-6.8h6.8v6.2c0 .3-.2.5-.5.5Z"})});var dx=o(L(),1),wB=o(v(),1),CB=(0,wB.jsx)(dx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wB.jsx)(dx.Path,{d:"M14 11.25a.25.25 0 0 0-.25-.25h-3.5a.25.25 0 0 0-.25.25v2.5H8.5v-2.5c0-.966.784-1.75 1.75-1.75h3.5c.966 0 1.75.784 1.75 1.75v2.5H14v-2.5Z"})});var fx=o(L(),1),SB=o(v(),1),TB=(0,SB.jsx)(fx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,SB.jsx)(fx.Path,{d:"M18.2 9.5h-3.5c-1 0-1.8.8-1.8 1.8v2.5h1.5v-2.5c0-.1.1-.2.2-.2h3.5c.1 0 .2.1.2.2v2.5h1.5v-2.5c0-1-.8-1.8-1.8-1.8Zm-9 0H5.7c-1 0-1.8.8-1.8 1.8v2.5h7v-2.5c0-1-.8-1.8-1.8-1.8Z"})});var hx=o(L(),1),PB=o(v(),1),BB=(0,PB.jsx)(hx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PB.jsx)(hx.Path,{d:"M4 16.5h13V15H4v1.5Zm0-3h16V12H4v1.5ZM18.2 6h-3.5c-1 0-1.8.8-1.8 1.8v2.5h1.5V7.8c0-.1.1-.2.2-.2h3.5c.1 0 .2.1.2.2v2.5h1.5V7.8c0-1-.8-1.8-1.8-1.8ZM11 7.8c0-1-.8-1.8-1.8-1.8H5.7c-1 0-1.8.8-1.8 1.8v2.5h7V7.8Z"})});var gx=o(L(),1),IB=o(v(),1),f1=(0,IB.jsx)(gx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,IB.jsx)(gx.Path,{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"})});var h1=o(L(),1),g1=o(v(),1),NB=(0,g1.jsxs)(h1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,g1.jsx)(h1.Path,{d:"M 12.841306,16.677917 12.001264,12.71529 Q 11.835801,11.930402 11.695793,11.417042 11.560029,10.89944 11.398809,10.568514 11.237588,10.237588 11,10 10.635133,9.6351329 10.219354,9.6351329 9.8078183,9.6308902 9.4387086,10 8.9932313,10.445477 8.8574668,11.022476 8.7259449,11.595233 8.7259449,12.155262 L 7.4955791,11.196425 Q 7.5719467,10.509117 7.8307477,9.9109045 8.0937915,9.3084495 8.6410921,8.7611489 9.1799075,8.2223335 9.7569066,8.086569 q 0.5812414,-0.1400071 1.1242994,0.046669 0.543058,0.1866762 0.975808,0.6194255 0.335168,0.3351686 0.581242,0.767918 0.24183,0.4285067 0.436992,1.0564174 0.195161,0.619426 0.381837,1.527351 l 0.364867,1.756453 1.883733,-1.883732 1.018234,1.018233 z"}),(0,g1.jsx)(h1.Path,{d:"M12.574 4a.75.75 0 0 1 .53.22l6.723 6.724a2.315 2.315 0 0 1 0 3.264l-.532-.528.531.53-5.61 5.611a2.31 2.31 0 0 1-3.276.001l-6.72-6.716a.75.75 0 0 1-.22-.53V4.75A.75.75 0 0 1 4.75 4h7.824ZM5.5 5.5v6.764l6.501 6.497a.817.817 0 0 0 .889.178.816.816 0 0 0 .264-.178l5.61-5.61a.816.816 0 0 0-.001-1.149l-6.5-6.502H5.5Z"})]});var vx=o(L(),1),EB=o(v(),1),DB=(0,EB.jsx)(vx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,EB.jsx)(vx.Path,{d:"M6.08 10.103h2.914L9.657 12h1.417L8.23 4H6.846L4 12h1.417l.663-1.897Zm1.463-4.137.994 2.857h-2l1.006-2.857ZM11 16H4v-1.5h7V16Zm1 0h8v-1.5h-8V16Zm-4 4H4v-1.5h4V20Zm7-1.5V20H9v-1.5h6Z"})});var v1=o(L(),1),b1=o(v(),1),LB=(0,b1.jsxs)(v1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,b1.jsx)(v1.Path,{d:"m14.95 13.889-1.061 1.061-5.552-5.553 1.06-1.06 5.552 5.552Z"}),(0,b1.jsx)(v1.Path,{d:"M12.574 4a.75.75 0 0 1 .53.22l6.723 6.724a2.315 2.315 0 0 1 0 3.264l-.532-.528.531.53-5.61 5.611a2.31 2.31 0 0 1-3.276.001l-6.72-6.716a.75.75 0 0 1-.22-.53V4.75A.75.75 0 0 1 4.75 4h7.824ZM5.5 5.5v6.764l6.501 6.497a.817.817 0 0 0 .889.178.816.816 0 0 0 .264-.178l5.61-5.61a.816.816 0 0 0-.001-1.149l-6.5-6.502H5.5Z"})]});var bx=o(L(),1),MB=o(v(),1),y1=(0,MB.jsx)(bx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MB.jsx)(bx.Path,{d:"M12 3c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16.5c-4.1 0-7.5-3.4-7.5-7.5S7.9 4.5 12 4.5s7.5 3.4 7.5 7.5-3.4 7.5-7.5 7.5zM12 7l-1 5c0 .3.2.6.4.8l4.2 2.8-2.7-4.1L12 7z"})});var yx=o(L(),1),AB=o(v(),1),El=(0,AB.jsx)(yx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AB.jsx)(yx.Path,{d:"m4 5.5h2v6.5h1.5v-6.5h2v-1.5h-5.5zm16 10.5h-16v-1.5h16zm-7 4h-9v-1.5h9z"})});var _x=o(L(),1),RB=o(v(),1),Hc=(0,RB.jsx)(_x.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,RB.jsx)(_x.Path,{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"})});var xx=o(L(),1),zB=o(v(),1),_1=(0,zB.jsx)(xx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zB.jsx)(xx.Path,{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"})});var kx=o(L(),1),VB=o(v(),1),Ef=(0,VB.jsx)(kx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VB.jsx)(kx.Path,{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"})});var wx=o(L(),1),FB=o(v(),1),HB=(0,FB.jsx)(wx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FB.jsx)(wx.Path,{d:"M19 5c1.1 0 2 .9 2 2v10c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2zM5 6.5c-.3 0-.5.2-.5.5v10c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V7c0-.3-.2-.5-.5-.5zM14.734 9q.714 0 1.15.253.437.247.639.84.2.591.2 1.61v1.15q0 .402.036.667.04.258.172.39.138.127.437.127h.104l-.162.828h-.08q-.5 0-.776-.097a.9.9 0 0 1-.414-.283 2 2 0 0 1-.259-.448q-.316.367-.748.598-.43.23-.977.23-.524 0-.914-.213a1.56 1.56 0 0 1-.61-.58 1.65 1.65 0 0 1-.213-.84q0-.477.207-.817.213-.345.564-.568.357-.23.794-.363.437-.139.902-.196.471-.062.902-.068 0-.805-.315-1.053-.316-.247-.915-.247-.316 0-.678.098-.356.097-.805.408l-.15-.84a2.8 2.8 0 0 1 .846-.419A3.4 3.4 0 0 1 14.734 9m-5.877 1.669H9.86l.59-1.531h.689l-.585 1.53h.898l-.249.727h-.922l-.337.866h1.019l-.354.773h-.962l-.681 1.804h-.701l.69-1.804h-.999l-.693 1.804h-.69l.685-1.804H6.3l.34-.773h.915l.333-.866h-.994l.244-.726H8.16l.594-1.531h.693zm6.832 1.264q-.823.029-1.335.16-.506.133-.74.397-.236.265-.236.685 0 .454.241.66.248.202.632.202.414 0 .8-.207.39-.207.637-.552zm-7.441.328h1l.34-.866h-1z"})});var ya=o(T(),1),li=o(P(),1),To=o(M(),1),Df=o(V(),1),Tx=o(W(),1);var Cx=o(V(),1),Ip=o(U(),1),$u=o(Rr(),1),OB=o(T(),1),nV=o(Q(),1),iV=o(me(),1);function Sx(e,t,r){return(0,Cx.useSelect)(a=>a(nV.store).canUser("update",{kind:e,name:t,id:r}),[e,t,r])}function Es(e={}){let t=(0,Ip.useRef)(e),r=(0,Ip.useRef)(!1),{getSettings:a}=(0,Cx.useSelect)(OB.store);(0,Ip.useLayoutEffect)(()=>{t.current=e}),(0,Ip.useEffect)(()=>{if(r.current||!t.current.url||!(0,$u.isBlobURL)(t.current.url))return;let n=(0,$u.getBlobByURL)(t.current.url);if(!n)return;let{url:i,allowedTypes:l,onChange:s,onError:c}=t.current,{mediaUpload:u}=a();u&&(r.current=!0,u({filesList:[n],allowedTypes:l,onFileChange:([m])=>{(0,$u.isBlobURL)(m?.url)||((0,$u.revokeBlobURL)(i),s(m),r.current=!1)},onError:m=>{(0,$u.revokeBlobURL)(i),c(m),r.current=!1}}))},[a])}function x1(){return(0,Cx.useSelect)(t=>{let{getSettings:r}=t(OB.store),{__experimentalDiscussionSettings:a}=r();return a?.avatarURL??""},[])}function q(){return(0,iV.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}var _r=o(v(),1),jB="core/accordion-item",wfe="core/accordion-heading",Cfe={name:jB};function lV({attributes:{autoclose:e,iconPosition:t,showIcon:r,headingLevel:a,levelOptions:n},clientId:i,setAttributes:l,isSelected:s}){let c=(0,Df.useRegistry)(),{getBlockOrder:u}=(0,Df.useSelect)(ya.store),m=(0,ya.useBlockProps)({role:"group"}),p=q(),{updateBlockAttributes:d,insertBlock:f}=(0,Df.useDispatch)(ya.store),g=(0,ya.useBlockEditingMode)()==="contentOnly",b=(0,ya.useInnerBlocksProps)(m,{template:[[jB]],defaultBlock:Cfe,directInsert:!0,templateInsertUpdatesSelection:!0});return(0,_r.jsxs)(_r.Fragment,{children:[s&&!g&&(0,_r.jsxs)(_r.Fragment,{children:[(0,_r.jsx)(ya.BlockControls,{children:(0,_r.jsx)(To.ToolbarGroup,{children:(0,_r.jsx)(ya.HeadingLevelDropdown,{value:a,options:n,onChange:_=>{let x=u(i),S=[];x.forEach(C=>{let N=u(C);S.push(...N)}),c.batch(()=>{l({headingLevel:_}),d(S,{level:_})})}})})}),(0,_r.jsx)(ya.BlockControls,{group:"other",children:(0,_r.jsx)(To.ToolbarButton,{onClick:()=>{let _=(0,Tx.createBlock)(jB,{},[(0,Tx.createBlock)(wfe,{level:a}),(0,Tx.createBlock)("core/accordion-panel",{})]);f(_,void 0,i)},children:(0,li.__)("Add item")})})]}),(0,_r.jsx)(ya.InspectorControls,{children:(0,_r.jsxs)(To.__experimentalToolsPanel,{label:(0,li.__)("Settings"),resetAll:()=>{l({autoclose:!1,showIcon:!0,iconPosition:"right"})},dropdownMenuProps:p,children:[(0,_r.jsx)(To.__experimentalToolsPanelItem,{label:(0,li.__)("Auto-close"),isShownByDefault:!0,hasValue:()=>!!e,onDeselect:()=>l({autoclose:!1}),children:(0,_r.jsx)(To.ToggleControl,{isBlock:!0,label:(0,li.__)("Auto-close"),onChange:_=>{l({autoclose:_})},checked:e,help:(0,li.__)("Automatically close accordions when a new one is opened.")})}),(0,_r.jsx)(To.__experimentalToolsPanelItem,{label:(0,li.__)("Show icon"),isShownByDefault:!0,hasValue:()=>!r,onDeselect:()=>l({showIcon:!0}),children:(0,_r.jsx)(To.ToggleControl,{isBlock:!0,label:(0,li.__)("Show icon"),onChange:_=>{l({showIcon:_,iconPosition:_?t:"right"})},checked:r,help:(0,li.__)("Display a plus icon next to the accordion header.")})}),r&&(0,_r.jsx)(To.__experimentalToolsPanelItem,{label:(0,li.__)("Icon Position"),isShownByDefault:!0,hasValue:()=>t!=="right",onDeselect:()=>l({iconPosition:"right"}),children:(0,_r.jsxs)(To.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,li.__)("Icon Position"),value:t,onChange:_=>{l({iconPosition:_})},children:[(0,_r.jsx)(To.__experimentalToggleGroupControlOption,{label:(0,li.__)("Left"),value:"left"}),(0,_r.jsx)(To.__experimentalToggleGroupControlOption,{label:(0,li.__)("Right"),value:"right"})]})})]})},"setting"),(0,_r.jsx)("div",{...b})]})}var Px=o(T(),1),sV=o(v(),1);function cV(){let e=Px.useBlockProps.save({role:"group"});return(0,sV.jsx)("div",{...Px.useInnerBlocksProps.save(e)})}var Bx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/accordion",title:"Accordion",category:"design",description:"Displays a foldable layout that groups content in collapsible sections.",example:{},supports:{anchor:!0,html:!1,align:["wide","full"],background:{backgroundImage:!0,backgroundSize:!0,__experimentalDefaultControls:{backgroundImage:!0}},color:{background:!0,gradients:!0},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},spacing:{padding:!0,margin:["top","bottom"],blockGap:!0},shadow:!0,layout:!0,ariaLabel:!0,interactivity:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},contentRole:!0,listView:!0},attributes:{iconPosition:{type:"string",default:"right"},showIcon:{type:"boolean",default:!0},autoclose:{type:"boolean",default:!1},headingLevel:{type:"number",default:3},levelOptions:{type:"array"}},providesContext:{"core/accordion-icon-position":"iconPosition","core/accordion-show-icon":"showIcon","core/accordion-heading-level":"headingLevel"},allowedBlocks:["core/accordion-item"],textdomain:"default",viewScriptModule:"@wordpress/block-library/accordion/view"};var uV=o(W(),1);function E(e){if(!e)return;let{metadata:t,settings:r,name:a}=e;return(0,uV.registerBlockType)({name:a,...t},r)}var{name:mV}=Bx,pV={icon:CS,example:{innerBlocks:[{name:"core/accordion-item",innerBlocks:[{name:"core/accordion-heading",attributes:{title:(0,UB.__)("Lorem ipsum dolor sit amet, consectetur.")}}]},{name:"core/accordion-item",innerBlocks:[{name:"core/accordion-heading",attributes:{title:(0,UB.__)("Suspendisse commodo lacus, interdum et.")}}]}]},edit:lV,save:cV},Tfe=()=>E({name:mV,metadata:Bx,settings:pV});var WB={};Z(WB,{init:()=>Ife,metadata:()=>Nx,name:()=>vV,settings:()=>bV});var k1=o(P(),1),qu=o(T(),1),dV=o(V(),1),Lf=o(M(),1);var Ds=o(v(),1),Pfe=[["core/accordion-heading"],["core/accordion-panel"]];function fV({attributes:e,clientId:t,setAttributes:r,isSelected:a}){let{openByDefault:n}=e,i=q(),{isSelected:l}=(0,dV.useSelect)(u=>a||n?{isSelected:!0}:{isSelected:u(qu.store).hasSelectedInnerBlock(t,!0)},[t,a,n]),s=(0,qu.useBlockProps)({className:w({"is-open":n||l})}),c=(0,qu.useInnerBlocksProps)(s,{template:Pfe,templateLock:"all",directInsert:!0,templateInsertUpdatesSelection:!0});return(0,Ds.jsxs)(Ds.Fragment,{children:[(0,Ds.jsx)(qu.InspectorControls,{children:(0,Ds.jsx)(Lf.__experimentalToolsPanel,{label:(0,k1.__)("Settings"),resetAll:()=>{r({openByDefault:!1})},dropdownMenuProps:i,children:(0,Ds.jsx)(Lf.__experimentalToolsPanelItem,{label:(0,k1.__)("Open by default"),isShownByDefault:!0,hasValue:()=>!!n,onDeselect:()=>{r({openByDefault:!1})},children:(0,Ds.jsx)(Lf.ToggleControl,{label:(0,k1.__)("Open by default"),onChange:u=>{r({openByDefault:u})},checked:n,help:(0,k1.__)("Accordion content will be displayed by default.")})})})},"setting"),(0,Ds.jsx)("div",{...c})]})}var Ix=o(T(),1);var hV=o(v(),1);function gV({attributes:e}){let{openByDefault:t}=e,r=Ix.useBlockProps.save({className:w({"is-open":t})}),a=Ix.useInnerBlocksProps.save(r);return(0,hV.jsx)("div",{...a})}var Nx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/accordion-item",title:"Accordion Item",category:"design",description:"Wraps the heading and panel in one unit.",parent:["core/accordion"],allowedBlocks:["core/accordion-heading","core/accordion-panel"],supports:{html:!1,color:{background:!0,gradients:!0},interactivity:!0,spacing:{margin:["top","bottom"],blockGap:!0},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},shadow:!0,layout:{allowEditing:!1},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},contentRole:!0},attributes:{openByDefault:{type:"boolean",default:!1}},providesContext:{"core/accordion-open-by-default":"openByDefault"},textdomain:"default",style:"wp-block-accordion-item"};var{name:vV}=Nx,bV={icon:wS,edit:fV,save:gV},Ife=()=>E({name:vV,metadata:Nx,settings:bV});var $B={};Z($B,{init:()=>Lfe,metadata:()=>Ex,name:()=>SV,settings:()=>TV});var yV=o(P(),1),_V=o(U(),1),Qi=o(T(),1),xV=o(V(),1),Np=o(v(),1);function kV({attributes:e,setAttributes:t,context:r}){let{title:a}=e,{"core/accordion-icon-position":n,"core/accordion-show-icon":i,"core/accordion-heading-level":l}=r,s="h"+l,{__unstableMarkNextChangeAsNotPersistent:c}=(0,xV.useDispatch)(Qi.store);(0,_V.useEffect)(()=>{n!==void 0&&i!==void 0&&(c(),t({iconPosition:n,showIcon:i}))},[n,i,t,c]);let[u,m]=(0,Qi.useSettings)("typography.fluid","layout"),p=(0,Qi.getTypographyClassesAndStyles)(e,{typography:{fluid:u},layout:{wideSize:m?.wideSize}}),d=(0,Qi.useBlockProps)(),f=(0,Qi.__experimentalGetSpacingClassesAndStyles)(e);return(0,Np.jsx)(s,{...d,children:(0,Np.jsxs)("button",{className:"wp-block-accordion-heading__toggle",style:f.style,tabIndex:"-1",children:[i&&n==="left"&&(0,Np.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"}),(0,Np.jsx)(Qi.RichText,{withoutInteractiveFormatting:!0,disableLineBreaks:!0,tagName:"span",value:a,onChange:h=>t({title:h}),placeholder:(0,yV.__)("Accordion title"),className:"wp-block-accordion-heading__toggle-title",style:{letterSpacing:p.style.letterSpacing,textDecoration:p.style.textDecoration}}),i&&n==="right"&&(0,Np.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"})]})})}var Zu=o(T(),1),Ep=o(v(),1);function wV({attributes:e}){let{level:t,title:r,iconPosition:a,showIcon:n}=e,i="h"+(t||3),l=(0,Zu.getTypographyClassesAndStyles)(e),s=Zu.useBlockProps.save(),c=(0,Zu.__experimentalGetSpacingClassesAndStyles)(e);return(0,Ep.jsx)(i,{...s,children:(0,Ep.jsxs)("button",{type:"button",className:"wp-block-accordion-heading__toggle",style:c.style,children:[n&&a==="left"&&(0,Ep.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"}),(0,Ep.jsx)(Zu.RichText.Content,{className:"wp-block-accordion-heading__toggle-title",tagName:"span",value:r,style:{letterSpacing:l.style.letterSpacing,textDecoration:l.style.textDecoration}}),n&&a==="right"&&(0,Ep.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"})]})})}var Ex={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/accordion-heading",title:"Accordion Heading",category:"design",description:"Displays a heading that toggles the accordion panel.",parent:["core/accordion-item"],usesContext:["core/accordion-icon-position","core/accordion-show-icon","core/accordion-heading-level"],supports:{anchor:!0,color:{background:!0,gradients:!0},align:!1,interactivity:!0,spacing:{padding:!0,__experimentalDefaultControls:{padding:!0},__experimentalSkipSerialization:!0,__experimentalSelector:".wp-block-accordion-heading__toggle"},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{__experimentalSkipSerialization:["textDecoration","letterSpacing"],fontSize:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0,fontFamily:!0}},shadow:!0,visibility:!1,lock:!1},selectors:{typography:{letterSpacing:".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title",textDecoration:".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title"}},attributes:{openByDefault:{type:"boolean",default:!1},title:{type:"rich-text",source:"rich-text",selector:".wp-block-accordion-heading__toggle-title",role:"content"},level:{type:"number"},iconPosition:{type:"string",enum:["left","right"],default:"right"},showIcon:{type:"boolean",default:!0}},textdomain:"default"};var Dl=o(T(),1),Yi=o(v(),1),Efe={attributes:{openByDefault:{type:"boolean",default:!1},title:{type:"rich-text",source:"rich-text",selector:".wp-block-accordion-heading__toggle-title",role:"content"},level:{type:"number"},iconPosition:{type:"string",enum:["left","right"],default:"right"},showIcon:{type:"boolean",default:!0}},supports:{anchor:!0,color:{background:!0,gradients:!0},align:!1,interactivity:!0,spacing:{padding:!0,__experimentalDefaultControls:{padding:!0},__experimentalSkipSerialization:!0,__experimentalSelector:".wp-block-accordion-heading__toggle"},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0,fontFamily:!0}},shadow:!0,visibility:!1},save({attributes:e}){let{level:t,title:r,iconPosition:a,showIcon:n}=e,i="h"+(t||3),l=Dl.useBlockProps.save(),s=(0,Dl.__experimentalGetSpacingClassesAndStyles)(e);return(0,Yi.jsx)(i,{...l,children:(0,Yi.jsxs)("button",{className:"wp-block-accordion-heading__toggle",style:s.style,children:[n&&a==="left"&&(0,Yi.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"}),(0,Yi.jsx)(Dl.RichText.Content,{className:"wp-block-accordion-heading__toggle-title",tagName:"span",value:r}),n&&a==="right"&&(0,Yi.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"})]})})}},Dfe={attributes:{openByDefault:{type:"boolean",default:!1},title:{type:"rich-text",source:"rich-text",selector:".wp-block-accordion-heading__toggle-title",role:"content"},level:{type:"number"},iconPosition:{type:"string",enum:["left","right"],default:"right"},showIcon:{type:"boolean",default:!0}},supports:{anchor:!0,color:{background:!0,gradients:!0},align:!1,interactivity:!0,spacing:{padding:!0,__experimentalDefaultControls:{padding:!0},__experimentalSkipSerialization:!0,__experimentalSelector:".wp-block-accordion-heading__toggle"},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{__experimentalSkipSerialization:["textDecoration","letterSpacing"],fontSize:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0,fontFamily:!0}},shadow:!0,visibility:!1,lock:!1},save({attributes:e}){let{level:t,title:r,iconPosition:a,showIcon:n}=e,i="h"+(t||3),l=(0,Dl.getTypographyClassesAndStyles)(e),s=Dl.useBlockProps.save(),c=(0,Dl.__experimentalGetSpacingClassesAndStyles)(e);return(0,Yi.jsx)(i,{...s,children:(0,Yi.jsxs)("button",{className:"wp-block-accordion-heading__toggle",style:c.style,children:[n&&a==="left"&&(0,Yi.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"}),(0,Yi.jsx)(Dl.RichText.Content,{className:"wp-block-accordion-heading__toggle-title",tagName:"span",value:r,style:{letterSpacing:l.style.letterSpacing,textDecoration:l.style.textDecoration}}),n&&a==="right"&&(0,Yi.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"})]})})}},CV=[Efe,Dfe];var{name:SV}=Ex,TV={icon:kS,edit:kV,save:wV,deprecated:CV},Lfe=()=>E({name:SV,metadata:Ex,settings:TV});var qB={};Z(qB,{init:()=>Afe,metadata:()=>Lx,name:()=>DV,settings:()=>LV});var Mf=o(T(),1),PV=o(V(),1),BV=o(v(),1);function IV({attributes:e,context:t,clientId:r,isSelected:a}){let{allowedBlocks:n,templateLock:i}=e,l=t["core/accordion-open-by-default"],{hasSelection:s}=(0,PV.useSelect)(m=>{if(a||l)return{hasSelection:!0};let{getBlockRootClientId:p,isBlockSelected:d,hasSelectedInnerBlock:f}=m(Mf.store),h=p(r);return{hasSelection:d(h)||f(h,!0)}},[r,a,l]),c=(0,Mf.useBlockProps)({"aria-hidden":!s,role:"region"}),u=(0,Mf.useInnerBlocksProps)(c,{allowedBlocks:n,template:[["core/paragraph",{}]],templateLock:i});return(0,BV.jsx)("div",{...u})}var Dx=o(T(),1),NV=o(v(),1);function EV(){let e=Dx.useBlockProps.save({role:"region"}),t=Dx.useInnerBlocksProps.save(e);return(0,NV.jsx)("div",{...t})}var Lx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/accordion-panel",title:"Accordion Panel",category:"design",description:"Contains the hidden or revealed content beneath the heading.",parent:["core/accordion-item"],usesContext:["core/accordion-open-by-default"],supports:{html:!1,color:{background:!0,gradients:!0},interactivity:!0,spacing:{padding:!0,blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},shadow:!0,layout:{allowEditing:!1},visibility:!1,contentRole:!0,allowedBlocks:!0,lock:!1},attributes:{templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1],default:!1}},textdomain:"default",style:"wp-block-accordion-panel"};var{name:DV}=Lx,LV={icon:E0,edit:IV,save:EV},Afe=()=>E({name:DV,metadata:Lx,settings:LV});var ZB={};Z(ZB,{init:()=>zfe,metadata:()=>Mx,name:()=>zV,settings:()=>VV});var Mx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/archives",title:"Archives",category:"widgets",description:"Display a date archive of your posts.",textdomain:"default",attributes:{displayAsDropdown:{type:"boolean",default:!1},showLabel:{type:"boolean",default:!0},showPostCounts:{type:"boolean",default:!1},type:{type:"string",default:"monthly"}},supports:{anchor:!0,align:!0,__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},html:!1,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},interactivity:{clientNavigation:!0}}};var $a=o(M(),1),Go=o(P(),1),Ax=o(T(),1),MV=o(Fu(),1),AV=o(me(),1);var Zr=o(v(),1);function RV({attributes:e,setAttributes:t,name:r}){let{showLabel:a,showPostCounts:n,displayAsDropdown:i,type:l}=e,s=q(),{content:c,status:u,error:m}=(0,MV.useServerSideRender)({attributes:e,skipBlockSupportAttributes:!0,block:r}),p=(0,AV.useDisabled)(),d=(0,Ax.useBlockProps)({ref:p});return(0,Zr.jsxs)(Zr.Fragment,{children:[(0,Zr.jsx)(Ax.InspectorControls,{children:(0,Zr.jsxs)($a.__experimentalToolsPanel,{label:(0,Go.__)("Settings"),resetAll:()=>{t({displayAsDropdown:!1,showLabel:!0,showPostCounts:!1,type:"monthly"})},dropdownMenuProps:s,children:[(0,Zr.jsx)($a.__experimentalToolsPanelItem,{label:(0,Go.__)("Display as dropdown"),isShownByDefault:!0,hasValue:()=>i,onDeselect:()=>t({displayAsDropdown:!1}),children:(0,Zr.jsx)($a.ToggleControl,{label:(0,Go.__)("Display as dropdown"),checked:i,onChange:()=>t({displayAsDropdown:!i})})}),i&&(0,Zr.jsx)($a.__experimentalToolsPanelItem,{label:(0,Go.__)("Show label"),isShownByDefault:!0,hasValue:()=>!a,onDeselect:()=>t({showLabel:!0}),children:(0,Zr.jsx)($a.ToggleControl,{label:(0,Go.__)("Show label"),checked:a,onChange:()=>t({showLabel:!a})})}),(0,Zr.jsx)($a.__experimentalToolsPanelItem,{label:(0,Go.__)("Show post counts"),isShownByDefault:!0,hasValue:()=>n,onDeselect:()=>t({showPostCounts:!1}),children:(0,Zr.jsx)($a.ToggleControl,{label:(0,Go.__)("Show post counts"),checked:n,onChange:()=>t({showPostCounts:!n})})}),(0,Zr.jsx)($a.__experimentalToolsPanelItem,{label:(0,Go.__)("Group by"),isShownByDefault:!0,hasValue:()=>l!=="monthly",onDeselect:()=>t({type:"monthly"}),children:(0,Zr.jsx)($a.SelectControl,{__next40pxDefaultSize:!0,label:(0,Go.__)("Group by"),options:[{label:(0,Go.__)("Year"),value:"yearly"},{label:(0,Go.__)("Month"),value:"monthly"},{label:(0,Go.__)("Week"),value:"weekly"},{label:(0,Go.__)("Day"),value:"daily"}],value:l,onChange:f=>t({type:f})})})]})}),u==="loading"&&(0,Zr.jsx)("div",{...d,children:(0,Zr.jsx)($a.Spinner,{})}),u==="error"&&(0,Zr.jsx)("div",{...d,children:(0,Zr.jsx)("p",{children:(0,Go.sprintf)((0,Go.__)("Error: %s"),m)})}),u==="success"&&(0,Zr.jsx)(uo,{wrapperProps:d,html:c})]})}var{name:zV}=Mx,VV={icon:AS,example:{},edit:RV},zfe=()=>E({name:zV,metadata:Mx,settings:VV});var QB={};Z(QB,{init:()=>Ufe,metadata:()=>Rx,name:()=>tF,settings:()=>rF});var Rx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/avatar",title:"Avatar",category:"theme",description:"Add a user\u2019s avatar.",textdomain:"default",attributes:{userId:{type:"number"},size:{type:"number",default:96},isLink:{type:"boolean",default:!1},linkTarget:{type:"string",default:"_self"}},usesContext:["postType","postId","commentId"],supports:{anchor:!0,html:!1,align:!0,alignWide:!1,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__experimentalBorder:{__experimentalSkipSerialization:!0,radius:!0,width:!0,color:!0,style:!0,__experimentalDefaultControls:{radius:!0}},color:{text:!1,background:!1},filter:{duotone:!0},interactivity:{clientNavigation:!0}},selectors:{border:".wp-block-avatar img",filter:{duotone:".wp-block-avatar img"}},editorStyle:"wp-block-avatar-editor",style:"wp-block-avatar"};var Dp=o(T(),1),Sn=o(M(),1),Xi=o(P(),1),Vx=o(mr(),1);var w1=o(Q(),1),Ku=o(P(),1),HV=o(V(),1);function OV(e){let t=e?e[0]:24,r=e?e[e.length-1]:96,a=Math.floor(r*2.5);return{minSize:t,maxSize:a}}function jV({commentId:e}){let[t]=(0,w1.useEntityProp)("root","comment","author_avatar_urls",e),[r]=(0,w1.useEntityProp)("root","comment","author_name",e),a=t?Object.values(t):null,n=t?Object.keys(t):null,{minSize:i,maxSize:l}=OV(n),s=x1();return{src:a?a[a.length-1]:s,minSize:i,maxSize:l,alt:r?(0,Ku.sprintf)((0,Ku.__)("%s Avatar"),r):(0,Ku.__)("Default Avatar")}}function UV({userId:e,postId:t,postType:r}){let{authorDetails:a}=(0,HV.useSelect)(u=>{let{getEditedEntityRecord:m,getUser:p}=u(w1.store);if(e)return{authorDetails:p(e)};let d=m("postType",r,t)?.author;return{authorDetails:d?p(d):null}},[r,t,e]),n=a?.avatar_urls?Object.values(a.avatar_urls):null,i=a?.avatar_urls?Object.keys(a.avatar_urls):null,{minSize:l,maxSize:s}=OV(i),c=x1();return{src:n?n[n.length-1]:c,minSize:l,maxSize:s,alt:a?(0,Ku.sprintf)((0,Ku.__)("%s Avatar"),a?.name):(0,Ku.__)("Default Avatar")}}var KB=o(P(),1),WV=o(M(),1),$V=o(V(),1),qV=o(Q(),1),zx=o(U(),1),ZV=o(me(),1),KV=o(Wo(),1),QV=o(v(),1),Ffe={who:"authors",per_page:100,_fields:"id,name",context:"view"};function YV({value:e,onChange:t}){let[r,a]=(0,zx.useState)(""),{authors:n,isLoading:i}=(0,$V.useSelect)(s=>{let{getUsers:c,isResolving:u}=s(qV.store),m={...Ffe};return r&&(m.search=r,m.search_columns=["name"]),{authors:c(m),isLoading:u("getUsers",[m])}},[r]),l=(0,zx.useMemo)(()=>(n??[]).map(s=>({value:s.id,label:(0,KV.decodeEntities)(s.name)})),[n]);return(0,QV.jsx)(WV.ComboboxControl,{__next40pxDefaultSize:!0,label:(0,KB.__)("User"),help:(0,KB.__)("Select the avatar user to display, if it is blank it will use the post/page author."),value:e,onChange:t,options:l,onFilterValueChange:(0,ZV.debounce)(a,300),isLoading:i})}var Mt=o(v(),1),XV=({setAttributes:e,avatar:t,attributes:r,selectUser:a})=>{let n=q();return(0,Mt.jsx)(Dp.InspectorControls,{children:(0,Mt.jsxs)(Sn.__experimentalToolsPanel,{label:(0,Xi.__)("Settings"),resetAll:()=>{e({size:96,isLink:!1,linkTarget:"_self",userId:void 0})},dropdownMenuProps:n,children:[(0,Mt.jsx)(Sn.__experimentalToolsPanelItem,{label:(0,Xi.__)("Image size"),isShownByDefault:!0,hasValue:()=>r?.size!==96,onDeselect:()=>e({size:96}),children:(0,Mt.jsx)(Sn.RangeControl,{__next40pxDefaultSize:!0,label:(0,Xi.__)("Image size"),onChange:i=>e({size:i}),min:t.minSize,max:t.maxSize,initialPosition:r?.size,value:r?.size})}),(0,Mt.jsx)(Sn.__experimentalToolsPanelItem,{label:(0,Xi.__)("Link to user profile"),isShownByDefault:!0,hasValue:()=>r?.isLink,onDeselect:()=>e({isLink:!1}),children:(0,Mt.jsx)(Sn.ToggleControl,{label:(0,Xi.__)("Link to user profile"),onChange:()=>e({isLink:!r.isLink}),checked:r.isLink})}),r.isLink&&(0,Mt.jsx)(Sn.__experimentalToolsPanelItem,{label:(0,Xi.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>r?.linkTarget!=="_self",onDeselect:()=>e({linkTarget:"_self"}),children:(0,Mt.jsx)(Sn.ToggleControl,{label:(0,Xi.__)("Open in new tab"),onChange:i=>e({linkTarget:i?"_blank":"_self"}),checked:r.linkTarget==="_blank"})}),a&&(0,Mt.jsx)(Sn.__experimentalToolsPanelItem,{label:(0,Xi.__)("User"),isShownByDefault:!0,hasValue:()=>!!r?.userId,onDeselect:()=>e({userId:void 0}),children:(0,Mt.jsx)(YV,{value:r?.userId,onChange:i=>{e({userId:i})}})})]})})},Hfe=({children:e,isLink:t})=>t?(0,Mt.jsx)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:r=>r.preventDefault(),children:e}):e,JV=({setAttributes:e,attributes:t,avatar:r,blockProps:a,isSelected:n})=>{let i=(0,Dp.__experimentalUseBorderProps)(t),l=(0,Vx.addQueryArgs)((0,Vx.removeQueryArgs)(r?.src,["s"]),{s:t?.size*2});return(0,Mt.jsx)("div",{...a,children:(0,Mt.jsx)(Hfe,{isLink:t.isLink,children:(0,Mt.jsx)(Sn.ResizableBox,{size:{width:t.size,height:t.size},showHandle:n,onResizeStop:(s,c,u,m)=>{e({size:parseInt(t.size+(m.height||m.width),10)})},lockAspectRatio:!0,enable:{top:!1,right:!(0,Xi.isRTL)(),bottom:!0,left:(0,Xi.isRTL)()},minWidth:r.minSize,maxWidth:r.maxSize,children:(0,Mt.jsx)("img",{src:l,alt:r.alt,className:w("avatar","avatar-"+t.size,"photo","wp-block-avatar__image",i.className),style:i.style})})})})},Ofe=({attributes:e,context:t,setAttributes:r,isSelected:a})=>{let{commentId:n}=t,i=(0,Dp.useBlockProps)(),l=jV({commentId:n});return(0,Mt.jsxs)(Mt.Fragment,{children:[(0,Mt.jsx)(XV,{avatar:l,setAttributes:r,attributes:e,selectUser:!1}),(0,Mt.jsx)(JV,{attributes:e,avatar:l,blockProps:i,isSelected:a,setAttributes:r})]})},jfe=({attributes:e,context:t,setAttributes:r,isSelected:a})=>{let{postId:n,postType:i}=t,l=UV({userId:e?.userId,postId:n,postType:i}),s=(0,Dp.useBlockProps)();return(0,Mt.jsxs)(Mt.Fragment,{children:[(0,Mt.jsx)(XV,{selectUser:!0,attributes:e,avatar:l,setAttributes:r}),(0,Mt.jsx)(JV,{attributes:e,avatar:l,blockProps:s,isSelected:a,setAttributes:r})]})};function eF(e){return e?.context?.commentId||e?.context?.commentId===null?(0,Mt.jsx)(Ofe,{...e}):(0,Mt.jsx)(jfe,{...e})}var{name:tF}=Rx,rF={icon:I0,edit:eF,example:{}},Ufe=()=>E({name:tF,metadata:Rx,settings:rF});var aI={};Z(aI,{init:()=>the,metadata:()=>Ox,name:()=>PF,settings:()=>jx});var oI=o(P(),1);var TF=o(W(),1);var YB=o(T(),1),C1=o(v(),1),oF=[{attributes:{src:{type:"string",source:"attribute",selector:"audio",attribute:"src"},caption:{type:"string",source:"html",selector:"figcaption"},id:{type:"number"},autoplay:{type:"boolean",source:"attribute",selector:"audio",attribute:"autoplay"},loop:{type:"boolean",source:"attribute",selector:"audio",attribute:"loop"},preload:{type:"string",source:"attribute",selector:"audio",attribute:"preload"}},supports:{align:!0},save({attributes:e}){let{autoplay:t,caption:r,loop:a,preload:n,src:i}=e;return(0,C1.jsxs)("figure",{children:[(0,C1.jsx)("audio",{controls:"controls",src:i,autoPlay:t,loop:a,preload:n}),!YB.RichText.isEmpty(r)&&(0,C1.jsx)(YB.RichText.Content,{tagName:"figcaption",value:r})]})}}];var vF=o(Rr(),1),Za=o(M(),1),Tn=o(T(),1),qa=o(P(),1),bF=o(V(),1);var yF=o(xr(),1),_F=o(U(),1);function Af(e,t){var r=0,a,n;t=t||{};function i(){var l=a,s=arguments.length,c,u;e:for(;l;){if(l.args.length!==arguments.length){l=l.next;continue}for(u=0;u<s;u++)if(l.args[u]!==arguments[u]){l=l.next;continue e}return l!==a&&(l===n&&(n=l.prev),l.prev.next=l.next,l.next&&(l.next.prev=l.prev),l.next=a,l.prev=null,a.prev=l,a=l),l.val}for(c=new Array(s),u=0;u<s;u++)c[u]=arguments[u];return l={args:c,val:e.apply(null,c)},a?(a.prev=l,l.next=a):n=l,r===t.maxSize?(n=n.prev,n.next=null):r++,a=l,l.val}return i.clear=function(){a=null,n=null,r=0},i}var cF=o(M(),1),JB=o(U(),1),Ms=o(W(),1);var Ls={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/embed",title:"Embed",category:"embed",description:"Add a block that displays content pulled from other sites, like Twitter or YouTube.",textdomain:"default",attributes:{url:{type:"string",role:"content"},caption:{type:"rich-text",source:"rich-text",selector:"figcaption",role:"content"},type:{type:"string",role:"content"},providerNameSlug:{type:"string",role:"content"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1,role:"content"},previewable:{type:"boolean",default:!0,role:"content"}},supports:{anchor:!0,align:!0,spacing:{margin:!0},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"};var S1=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.78",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],XB="wp-embed";var lF=o(iF(),1),{lock:sF,unlock:K}=(0,lF.__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/block-library");var Fx=o(v(),1),{name:Rf}=Ls,{kebabCase:Wfe}=K(cF.privateApis),uF=e=>(0,Ms.getBlockVariations)(Rf)?.find(({name:t})=>t===e),eI=(e,t=[])=>t.some(r=>e.match(r)),$fe=e=>(0,Ms.getBlockVariations)(Rf)?.find(({patterns:t})=>eI(e,t)),mF=e=>e&&e.includes('class="wp-embedded-content"'),pF=e=>{let t=e.url||e.thumbnail_url,r=(0,Fx.jsx)("p",{children:(0,Fx.jsx)("img",{src:t,alt:e.title,width:"100%"})});return(0,JB.renderToString)(r)},Yu=(e,t={})=>{let{preview:r,attributes:a={}}=e,{url:n,providerNameSlug:i,type:l,...s}=a;if(!n||!(0,Ms.getBlockType)(Rf))return;let c=$fe(n),u=i==="wordpress"||l===XB;if(!u&&c&&(c.attributes.providerNameSlug!==i||!i))return(0,Ms.createBlock)(Rf,{url:n,...s,...c.attributes});let p=(0,Ms.getBlockVariations)(Rf)?.find(({name:d})=>d==="wordpress");if(!(!p||!r||!mF(r.html)||u))return(0,Ms.createBlock)(Rf,{url:n,...p.attributes,...t})},qfe=e=>e?S1.some(({className:t})=>e.includes(t)):!1,Qu=e=>{if(!e)return e;let t=S1.reduce((a,{className:n})=>(a.push(n),a),["wp-has-aspect-ratio"]),r=e;for(let a of t)r=r.replace(a,"");return r.trim()};function Zfe(e){return/padding-(top|bottom)\s*:\s*[\d.]+%/i.test(e)}function tI(e,t,r=!0){if(!r||Zfe(e))return Qu(t);let a=document.implementation.createHTMLDocument("");a.body.innerHTML=e;let n=a.body.querySelector("iframe");if(n&&n.height&&n.width){let i=(n.width/n.height).toFixed(2);for(let l=0;l<S1.length;l++){let s=S1[l];if(i>=s.ratio)return i-s.ratio>.1?Qu(t):w(Qu(t),s.className,"wp-has-aspect-ratio")}}return t}function dF(e,t){t((0,Ms.createBlock)("core/paragraph",{content:(0,JB.renderToString)((0,Fx.jsx)("a",{href:e,children:e}))}))}var Kfe=Af((e,t,r,a,n=!0)=>{if(!e)return{};let i={},{type:l="rich"}=e,{html:s,provider_name:c}=e,u=Wfe((c||t).toLowerCase());return mF(s)&&(l=XB),(s||l==="photo")&&(i.type=l,i.providerNameSlug=u),qfe(r)||(i.className=tI(s,r,a&&n)),i}),fF=(e,t,r,a)=>{let{allowResponsive:n,className:i}=e;return{...e,...Kfe(t,r,i,a,n)}};var Lp=o(U(),1),hF=o(me(),1),T1=o(P(),1),Oc=o(T(),1),gF=o(M(),1);var Hx=o(W(),1),Xu=o(v(),1);function _a({attributeKey:e="caption",attributes:t,setAttributes:r,isSelected:a,insertBlocksAfter:n,placeholder:i=(0,T1.__)("Add caption"),label:l=(0,T1.__)("Caption text"),showToolbarButton:s=!0,excludeElementClassName:c,className:u,readOnly:m,tagName:p="figcaption",addLabel:d=(0,T1.__)("Add caption"),removeLabel:f=(0,T1.__)("Remove caption"),icon:h=ZS,...g}){let b=t[e],y=(0,hF.usePrevious)(b),k=Oc.RichText.isEmpty(b),_=Oc.RichText.isEmpty(y),[x,S]=(0,Lp.useState)(!k);(0,Lp.useEffect)(()=>{!k&&_&&S(!0)},[k,_]),(0,Lp.useEffect)(()=>{!a&&k&&S(!1)},[a,k]);let C=(0,Lp.useCallback)(N=>{N&&k&&N.focus()},[k]);return(0,Xu.jsxs)(Xu.Fragment,{children:[s&&(0,Xu.jsx)(Oc.BlockControls,{group:"block",children:(0,Xu.jsx)(gF.ToolbarButton,{onClick:()=>{S(!x),x&&b&&r({[e]:void 0})},icon:h,isPressed:x,label:x?f:d})}),x&&(!Oc.RichText.isEmpty(b)||a)&&(0,Xu.jsx)(Oc.RichText,{identifier:e,tagName:p,className:w(u,c?"":(0,Oc.__experimentalGetElementClassName)("caption")),ref:C,"aria-label":l,placeholder:i,value:b,onChange:N=>r({[e]:N}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>n((0,Hx.createBlock)((0,Hx.getDefaultBlockName)())),readOnly:m,...g})]})}var kr=o(v(),1),rI=["audio"];function Qfe({attributes:e,className:t,setAttributes:r,onReplace:a,isSelected:n,insertBlocksAfter:i}){let{id:l,autoplay:s,loop:c,preload:u,src:m}=e,[p,d]=(0,_F.useState)(e.blob),h=(0,Tn.useBlockEditingMode)()==="default";Es({url:p,allowedTypes:rI,onChange:x,onError:k});function g(B){return D=>{r({[B]:D})}}function b(B){if(B!==m){let D=Yu({attributes:{url:B}});if(D!==void 0&&a){a(D);return}r({src:B,id:void 0,blob:void 0}),d()}}let{createErrorNotice:y}=(0,bF.useDispatch)(yF.store);function k(B){y(B,{type:"snackbar"})}function _(B){return B?(0,qa.__)("Autoplay may cause usability issues for some users."):null}function x(B){if(!B||!B.url){r({src:void 0,id:void 0,caption:void 0,blob:void 0}),d();return}if((0,vF.isBlobURL)(B.url)){d(B.url);return}r({blob:void 0,src:B.url,id:B.id,caption:B.caption}),d()}let S=w(t,{"is-transient":!!p}),C=(0,Tn.useBlockProps)({className:S}),N=q();return!m&&!p?(0,kr.jsx)("div",{...C,children:(0,kr.jsx)(Tn.MediaPlaceholder,{icon:(0,kr.jsx)(Tn.BlockIcon,{icon:ni}),onSelect:x,onSelectURL:b,accept:"audio/*",allowedTypes:rI,value:e,onError:k})}):(0,kr.jsxs)(kr.Fragment,{children:[n&&(0,kr.jsx)(Tn.BlockControls,{group:"other",children:(0,kr.jsx)(Tn.MediaReplaceFlow,{mediaId:l,mediaURL:m,allowedTypes:rI,accept:"audio/*",onSelect:x,onSelectURL:b,onError:k,onReset:()=>x(void 0),variant:"toolbar"})}),(0,kr.jsx)(Tn.InspectorControls,{children:(0,kr.jsxs)(Za.__experimentalToolsPanel,{label:(0,qa.__)("Settings"),resetAll:()=>{r({autoplay:!1,loop:!1,preload:void 0})},dropdownMenuProps:N,children:[(0,kr.jsx)(Za.__experimentalToolsPanelItem,{label:(0,qa.__)("Autoplay"),isShownByDefault:!0,hasValue:()=>!!s,onDeselect:()=>r({autoplay:!1}),children:(0,kr.jsx)(Za.ToggleControl,{label:(0,qa.__)("Autoplay"),onChange:g("autoplay"),checked:!!s,help:_})}),(0,kr.jsx)(Za.__experimentalToolsPanelItem,{label:(0,qa.__)("Loop"),isShownByDefault:!0,hasValue:()=>!!c,onDeselect:()=>r({loop:!1}),children:(0,kr.jsx)(Za.ToggleControl,{label:(0,qa.__)("Loop"),onChange:g("loop"),checked:!!c})}),(0,kr.jsx)(Za.__experimentalToolsPanelItem,{label:(0,qa.__)("Preload"),isShownByDefault:!0,hasValue:()=>!!u,onDeselect:()=>r({preload:void 0}),children:(0,kr.jsx)(Za.SelectControl,{__next40pxDefaultSize:!0,label:(0,qa._x)("Preload","noun; Audio block parameter"),value:u||"",onChange:B=>r({preload:B||void 0}),options:[{value:"",label:(0,qa.__)("Browser default")},{value:"auto",label:(0,qa.__)("Auto")},{value:"metadata",label:(0,qa.__)("Metadata")},{value:"none",label:(0,qa._x)("None","Preload value")}]})})]})}),(0,kr.jsxs)("figure",{...C,children:[(0,kr.jsx)(Za.Disabled,{isDisabled:!n,children:(0,kr.jsx)("audio",{controls:"controls",src:m??p})}),!!p&&(0,kr.jsx)(Za.Spinner,{}),(0,kr.jsx)(_a,{attributes:e,setAttributes:r,isSelected:n,insertBlocksAfter:i,label:(0,qa.__)("Audio caption text"),showToolbarButton:n&&h})]})]})}var xF=Qfe;var Ox={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/audio",title:"Audio",category:"media",description:"Embed a simple audio player.",keywords:["music","sound","podcast","recording"],textdomain:"default",attributes:{blob:{type:"string",role:"local"},src:{type:"string",source:"attribute",selector:"audio",attribute:"src",role:"content"},caption:{type:"rich-text",source:"rich-text",selector:"figcaption",role:"content"},id:{type:"number",role:"content"},autoplay:{type:"boolean",source:"attribute",selector:"audio",attribute:"autoplay"},loop:{type:"boolean",source:"attribute",selector:"audio",attribute:"loop"},preload:{type:"string",source:"attribute",selector:"audio",attribute:"preload"}},supports:{anchor:!0,align:!0,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-audio-editor",style:"wp-block-audio"};var Mp=o(T(),1),P1=o(v(),1);function kF({attributes:e}){let{autoplay:t,caption:r,loop:a,preload:n,src:i}=e;return i&&(0,P1.jsxs)("figure",{...Mp.useBlockProps.save(),children:[(0,P1.jsx)("audio",{controls:"controls",src:i,autoPlay:t,loop:a,preload:n}),!Mp.RichText.isEmpty(r)&&(0,P1.jsx)(Mp.RichText.Content,{tagName:"figcaption",value:r,className:(0,Mp.__experimentalGetElementClassName)("caption")})]})}var wF=o(Rr(),1),CF=o(W(),1),Xfe={from:[{type:"files",isMatch(e){return e.length===1&&e[0].type.indexOf("audio/")===0},transform(e){let t=e[0];return(0,CF.createBlock)("core/audio",{blob:(0,wF.createBlobURL)(t)})}},{type:"shortcode",tag:"audio",attributes:{src:{type:"string",shortcode:({named:{src:e,mp3:t,m4a:r,ogg:a,wav:n,wma:i}})=>e||t||r||a||n||i},loop:{type:"string",shortcode:({named:{loop:e}})=>e},autoplay:{type:"string",shortcode:({named:{autoplay:e}})=>e},preload:{type:"string",shortcode:({named:{preload:e}})=>e}}}]},SF=Xfe;var{fieldsKey:Jfe,formKey:ehe}=K(TF.privateApis),{name:PF}=Ox,jx={icon:ni,example:{attributes:{src:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg"},viewportWidth:350},transforms:SF,deprecated:oF,edit:xF,save:kF};window.__experimentalContentOnlyInspectorFields&&(jx[Jfe]=[{id:"audio",label:(0,oI.__)("Audio"),type:"media",Edit:{control:"media",allowedTypes:["audio"],multiple:!1},getValue:({item:e})=>({id:e.id,url:e.src}),setValue:({value:e})=>({id:e.id,src:e.url})},{id:"caption",label:(0,oI.__)("Caption"),type:"text",Edit:"rich-text"}],jx[ehe]={fields:["audio","caption"]});var the=()=>E({name:PF,metadata:Ox,settings:jx});var nI={};Z(nI,{init:()=>ohe,metadata:()=>Ux,name:()=>DF,settings:()=>LF});var Ux={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/breadcrumbs",title:"Breadcrumbs",category:"theme",description:"Display a breadcrumb trail showing the path to the current page.",textdomain:"default",attributes:{prefersTaxonomy:{type:"boolean",default:!1},separator:{type:"string",default:"/"},showHomeItem:{type:"boolean",default:!0},showCurrentItem:{type:"boolean",default:!0},showOnHomePage:{type:"boolean",default:!1}},usesContext:["postId","postType","templateSlug"],supports:{anchor:!0,html:!1,align:["wide","full"],spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!1,color:!0,width:!0,style:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-breadcrumbs"};var zr=o(P(),1),B1=o(T(),1),$o=o(M(),1),BF=o(V(),1),Wx=o(Q(),1),jc=o(U(),1),IF=o(Fu(),1),NF=o(me(),1);var wt=o(v(),1),Gx="/";function EF({attributes:e,setAttributes:t,name:r,context:{postId:a,postType:n,templateSlug:i}}){let{separator:l,showHomeItem:s,showCurrentItem:c,prefersTaxonomy:u,showOnHomePage:m}=e,{post:p,isPostTypeHierarchical:d,postTypeHasTaxonomies:f,hasTermsAssigned:h,isLoading:g}=(0,BF.useSelect)(I=>{if(!n)return{};let R=I(Wx.store).getEntityRecord("postType",n,a),$=I(Wx.store).getPostType(n),j=$&&$.taxonomies.length,G;return j&&(G=I(Wx.store).getTaxonomies({type:n,per_page:-1})),{post:R,isPostTypeHierarchical:$?.hierarchical,postTypeHasTaxonomies:j,hasTermsAssigned:R&&(G||[]).filter(({visibility:O})=>O?.publicly_queryable).some(O=>!!R[O.rest_base]?.length),isLoading:a&&!R||!$||j&&!G}},[n,a]),[b,y]=(0,jc.useState)(0);(0,jc.useEffect)(()=>{y(I=>I+1)},[p]);let k=q(),{content:_,status:x,error:S}=(0,IF.useServerSideRender)({attributes:e,skipBlockSupportAttributes:!0,block:r,urlQueryArgs:{post_id:a,invalidationKey:b}}),C=(0,jc.useRef)("");(0,jc.useEffect)(()=>{x==="success"&&(C.current=_)},[_,x]);let[N,B]=(0,jc.useState)(!1);(0,jc.useEffect)(()=>{if(x!=="loading")return;let I=setTimeout(()=>{B(!0)},400);return()=>{clearTimeout(I),B(!1)}},[x]);let D=(0,NF.useDisabled)(),A=(0,B1.useBlockProps)({ref:D});if(g)return(0,wt.jsx)("div",{...A,children:(0,wt.jsx)($o.Spinner,{})});let H;!d&&!p?.parent?H=!0:f?H=u:H=!1;let F=null,z=!a||!n||i&&!n||!H&&!d||H&&!h;if(z){let I=[];s&&I.push((0,zr.__)("Home")),i&&!a?I.push((0,zr.__)("Page")):H?I.push((0,zr.__)("Category")):I.push((0,zr.__)("Ancestor"),(0,zr.__)("Parent")),F=(0,wt.jsx)("nav",{...A,style:{"--separator":`"${l.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,...A.style},children:(0,wt.jsxs)("ol",{children:[I.map((R,$)=>(0,wt.jsx)("li",{children:(0,wt.jsx)("a",{href:`#breadcrumbs-pseudo-link-${$}`,children:R})},$)),c&&(0,wt.jsx)("li",{children:(0,wt.jsx)("span",{"aria-current":"page",children:(0,zr.__)("Current")})})]})})}return(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsx)(B1.InspectorControls,{children:(0,wt.jsxs)($o.__experimentalToolsPanel,{label:(0,zr.__)("Settings"),resetAll:()=>{t({separator:Gx,showHomeItem:!0,showCurrentItem:!0})},dropdownMenuProps:k,children:[(0,wt.jsx)($o.__experimentalToolsPanelItem,{label:(0,zr.__)("Show home breadcrumb"),isShownByDefault:!0,hasValue:()=>!s,onDeselect:()=>t({showHomeItem:!0}),children:(0,wt.jsx)($o.ToggleControl,{label:(0,zr.__)("Show home breadcrumb"),onChange:I=>t({showHomeItem:I}),checked:s})}),(0,wt.jsx)($o.__experimentalToolsPanelItem,{label:(0,zr.__)("Show current breadcrumb"),isShownByDefault:!0,hasValue:()=>!c,onDeselect:()=>t({showCurrentItem:!0}),children:(0,wt.jsx)($o.ToggleControl,{label:(0,zr.__)("Show current breadcrumb"),onChange:I=>t({showCurrentItem:I}),checked:c})}),(0,wt.jsx)($o.__experimentalToolsPanelItem,{label:(0,zr.__)("Separator"),isShownByDefault:!0,hasValue:()=>l!==Gx,onDeselect:()=>t({separator:Gx}),children:(0,wt.jsx)($o.TextControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,zr.__)("Separator"),value:l,onChange:I=>t({separator:I}),onBlur:()=>{l||t({separator:Gx})}})})]})}),(0,wt.jsxs)(B1.InspectorControls,{group:"advanced",children:[(0,wt.jsx)($o.CheckboxControl,{label:(0,zr.__)("Show on homepage"),checked:m,onChange:I=>t({showOnHomePage:I}),help:(0,zr.__)("If this breadcrumbs block appears in a template or template part that\u2019s shown on the homepage, enable this option to display the breadcrumb trail. Otherwise, this setting has no effect.")}),(0,wt.jsx)($o.CheckboxControl,{label:(0,zr.__)("Prefer taxonomy terms"),checked:u,onChange:I=>t({prefersTaxonomy:I}),help:(0,zr.__)("The exact type of breadcrumbs shown will vary automatically depending on the page in which this block is displayed. In the specific case of a hierarchical post type with taxonomies, the breadcrumbs can either reflect its post hierarchy (default) or the hierarchy of its assigned taxonomy terms.")})]}),x==="loading"&&!z&&(C.current?(0,wt.jsx)(uo,{wrapperProps:{...A,style:{...A.style,opacity:N?.3:1}},html:C.current}):(0,wt.jsx)("div",{...A,children:(0,wt.jsx)($o.Spinner,{})})),x==="error"&&(0,wt.jsx)("div",{...A,children:(0,wt.jsx)("p",{children:(0,zr.sprintf)((0,zr.__)("Error: %s"),S)})}),z&&F,!z&&x==="success"&&(0,wt.jsx)(uo,{wrapperProps:A,html:_})]})}var{name:DF}=Ux,LF={icon:OS,example:{},edit:EF},ohe=()=>E({name:DF,metadata:Ux,settings:LF});var cI={};Z(cI,{init:()=>yhe,metadata:()=>Kx,name:()=>qF,settings:()=>Yx});var Qx=o(P(),1);var $F=o(W(),1);var ve=o(T(),1),I1=o(me(),1);var MF=o(T(),1);var{cleanEmptyObject:ahe}=K(MF.privateApis);function Ot(e){if(!e?.style?.typography?.fontFamily)return e;let{fontFamily:t,...r}=e.style.typography;return{...e,style:ahe({...e.style,typography:r}),fontFamily:t.split("|").pop()}}function We(e){let{textAlign:t,...r}=e;return t?{...r,style:{...e.style,typography:{...e.style?.typography,textAlign:t}}}:e}var Kt=o(v(),1),zf=e=>{let{borderRadius:t,...r}=e,a=[t,r.style?.border?.radius].find(n=>typeof n=="number"&&n!==0);return a?{...r,style:{...r.style,border:{...r.style?.border,radius:`${a}px`}}}:r};function nhe(e){if(!e.align)return e;let{align:t,...r}=e;return{...r,className:w(r.className,`align${e.align}`)}}var lI=e=>{if(!e.customTextColor&&!e.customBackgroundColor&&!e.customGradient)return e;let t={color:{}};e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),e.customGradient&&(t.color.gradient=e.customGradient);let{customTextColor:r,customBackgroundColor:a,customGradient:n,...i}=e;return{...i,style:t}},iI=e=>{let{color:t,textColor:r,...a}={...e,customTextColor:e.textColor&&e.textColor[0]==="#"?e.textColor:void 0,customBackgroundColor:e.color&&e.color[0]==="#"?e.color:void 0};return lI(a)},Uc={url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"}},ihe={attributes:{tagName:{type:"string",enum:["a","button"],default:"a"},type:{type:"string",default:"button"},textAlign:{type:"string"},url:{type:"string",source:"attribute",selector:"a",attribute:"href",role:"content"},title:{type:"string",source:"attribute",selector:"a,button",attribute:"title",role:"content"},text:{type:"rich-text",source:"rich-text",selector:"a,button",role:"content"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target",role:"content"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel",role:"content"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{__experimentalSkipSerialization:["fontSize","lineHeight","fontFamily","fontWeight","fontStyle","textTransform","textDecoration","letterSpacing"],fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},reusable:!1,shadow:{__experimentalSkipSerialization:!0},spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},interactivity:{clientNavigation:!0}},selectors:{root:".wp-block-button .wp-block-button__link",typography:{writingMode:".wp-block-button"}},save({attributes:e,className:t}){let{tagName:r,type:a,textAlign:n,fontSize:i,linkTarget:l,rel:s,style:c,text:u,title:m,url:p,width:d}=e,f=r||"a",h=f==="button",g=a||"button",b=(0,ve.__experimentalGetBorderClassesAndStyles)(e),y=(0,ve.__experimentalGetColorClassesAndStyles)(e),k=(0,ve.__experimentalGetSpacingClassesAndStyles)(e),_=(0,ve.__experimentalGetShadowClassesAndStyles)(e),x=(0,ve.getTypographyClassesAndStyles)(e),S=w("wp-block-button__link",y.className,b.className,x.className,{[`has-text-align-${n}`]:n,"no-border-radius":c?.border?.radius===0,"has-custom-font-size":i||c?.typography?.fontSize},(0,ve.__experimentalGetElementClassName)("button")),C={...b.style,...y.style,...k.style,..._.style,...x.style,writingMode:void 0},N=w(t,{[`has-custom-width wp-block-button__width-${d}`]:d});return(0,Kt.jsx)("div",{...ve.useBlockProps.save({className:N}),children:(0,Kt.jsx)(ve.RichText.Content,{tagName:f,type:h?g:null,className:S,href:h?null:p,title:m,style:C,value:u,target:h?null:l,rel:h?null:s})})},isEligible(e){return!!e.textAlign},migrate:We},lhe={attributes:{tagName:{type:"string",enum:["a","button"],default:"a"},type:{type:"string",default:"button"},textAlign:{type:"string"},url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a,button",attribute:"title",role:"content"},text:{type:"rich-text",source:"rich-text",selector:"a,button",role:"content"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target",role:"content"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel",role:"content"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},reusable:!1,shadow:{__experimentalSkipSerialization:!0},spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},__experimentalSelector:".wp-block-button__link",interactivity:{clientNavigation:!0}},save({attributes:e,className:t}){let{tagName:r,type:a,textAlign:n,fontSize:i,linkTarget:l,rel:s,style:c,text:u,title:m,url:p,width:d}=e,f=r||"a",h=f==="button",g=a||"button",b=(0,ve.__experimentalGetBorderClassesAndStyles)(e),y=(0,ve.__experimentalGetColorClassesAndStyles)(e),k=(0,ve.__experimentalGetSpacingClassesAndStyles)(e),_=(0,ve.__experimentalGetShadowClassesAndStyles)(e),x=w("wp-block-button__link",y.className,b.className,{[`has-text-align-${n}`]:n,"no-border-radius":c?.border?.radius===0},(0,ve.__experimentalGetElementClassName)("button")),S={...b.style,...y.style,...k.style,..._.style},C=w(t,{[`has-custom-width wp-block-button__width-${d}`]:d,"has-custom-font-size":i||c?.typography?.fontSize});return(0,Kt.jsx)("div",{...ve.useBlockProps.save({className:C}),children:(0,Kt.jsx)(ve.RichText.Content,{tagName:f,type:h?g:null,className:x,href:h?null:p,title:m,style:S,value:u,target:h?null:l,rel:h?null:s})})}},she={attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,__experimentalFontFamily:!0,__experimentalDefaultControls:{fontSize:!0}},reusable:!1,spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}},__experimentalSelector:".wp-block-button__link"},save({attributes:e,className:t}){let{fontSize:r,linkTarget:a,rel:n,style:i,text:l,title:s,url:c,width:u}=e;if(!l)return null;let m=(0,ve.__experimentalGetBorderClassesAndStyles)(e),p=(0,ve.__experimentalGetColorClassesAndStyles)(e),d=(0,ve.__experimentalGetSpacingClassesAndStyles)(e),f=w("wp-block-button__link",p.className,m.className,{"no-border-radius":i?.border?.radius===0}),h={...m.style,...p.style,...d.style},g=w(t,{[`has-custom-width wp-block-button__width-${u}`]:u,"has-custom-font-size":r||i?.typography?.fontSize});return(0,Kt.jsx)("div",{...ve.useBlockProps.save({className:g}),children:(0,Kt.jsx)(ve.RichText.Content,{tagName:"a",className:f,href:c,title:s,style:h,value:l,target:a,rel:n})})}},che={attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},reusable:!1,spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0},__experimentalSelector:".wp-block-button__link"},save({attributes:e,className:t}){let{fontSize:r,linkTarget:a,rel:n,style:i,text:l,title:s,url:c,width:u}=e;if(!l)return null;let m=(0,ve.__experimentalGetBorderClassesAndStyles)(e),p=(0,ve.__experimentalGetColorClassesAndStyles)(e),d=(0,ve.__experimentalGetSpacingClassesAndStyles)(e),f=w("wp-block-button__link",p.className,m.className,{"no-border-radius":i?.border?.radius===0}),h={...m.style,...p.style,...d.style},g=w(t,{[`has-custom-width wp-block-button__width-${u}`]:u,"has-custom-font-size":r||i?.typography?.fontSize});return(0,Kt.jsx)("div",{...ve.useBlockProps.save({className:g}),children:(0,Kt.jsx)(ve.RichText.Content,{tagName:"a",className:f,href:c,title:s,style:h,value:l,target:a,rel:n})})},migrate:Ot,isEligible({style:e}){return e?.typography?.fontFamily}},uhe=[ihe,lhe,she,che,{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...Uc,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},isEligible({style:e}){return typeof e?.border?.radius=="number"},save({attributes:e,className:t}){let{fontSize:r,linkTarget:a,rel:n,style:i,text:l,title:s,url:c,width:u}=e;if(!l)return null;let m=i?.border?.radius,p=(0,ve.__experimentalGetColorClassesAndStyles)(e),d=w("wp-block-button__link",p.className,{"no-border-radius":i?.border?.radius===0}),f={borderRadius:m||void 0,...p.style},h=w(t,{[`has-custom-width wp-block-button__width-${u}`]:u,"has-custom-font-size":r||i?.typography?.fontSize});return(0,Kt.jsx)("div",{...ve.useBlockProps.save({className:h}),children:(0,Kt.jsx)(ve.RichText.Content,{tagName:"a",className:d,href:c,title:s,style:f,value:l,target:a,rel:n})})},migrate:(0,I1.compose)(Ot,zf)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...Uc,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"},width:{type:"number"}},save({attributes:e,className:t}){let{borderRadius:r,linkTarget:a,rel:n,text:i,title:l,url:s,width:c}=e,u=(0,ve.__experimentalGetColorClassesAndStyles)(e),m=w("wp-block-button__link",u.className,{"no-border-radius":r===0}),p={borderRadius:r?r+"px":void 0,...u.style},d=w(t,{[`has-custom-width wp-block-button__width-${c}`]:c});return(0,Kt.jsx)("div",{...ve.useBlockProps.save({className:d}),children:(0,Kt.jsx)(ve.RichText.Content,{tagName:"a",className:m,href:s,title:l,style:p,value:i,target:a,rel:n})})},migrate:(0,I1.compose)(Ot,zf)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...Uc,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"},width:{type:"number"}},save({attributes:e,className:t}){let{borderRadius:r,linkTarget:a,rel:n,text:i,title:l,url:s,width:c}=e,u=(0,ve.__experimentalGetColorClassesAndStyles)(e),m=w("wp-block-button__link",u.className,{"no-border-radius":r===0}),p={borderRadius:r?r+"px":void 0,...u.style},d=w(t,{[`has-custom-width wp-block-button__width-${c}`]:c});return(0,Kt.jsx)("div",{...ve.useBlockProps.save({className:d}),children:(0,Kt.jsx)(ve.RichText.Content,{tagName:"a",className:m,href:s,title:l,style:p,value:i,target:a,rel:n})})},migrate:(0,I1.compose)(Ot,zf)},{supports:{align:!0,alignWide:!1,color:{gradients:!0}},attributes:{...Uc,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}},save({attributes:e}){let{borderRadius:t,linkTarget:r,rel:a,text:n,title:i,url:l}=e,s=w("wp-block-button__link",{"no-border-radius":t===0}),c={borderRadius:t?t+"px":void 0};return(0,Kt.jsx)(ve.RichText.Content,{tagName:"a",className:s,href:l,title:i,style:c,value:n,target:r,rel:a})},migrate:zf},{supports:{align:!0,alignWide:!1},attributes:{...Uc,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},customGradient:{type:"string"},gradient:{type:"string"}},isEligible:e=>!!e.customTextColor||!!e.customBackgroundColor||!!e.customGradient||!!e.align,migrate:(0,I1.compose)(zf,lI,nhe),save({attributes:e}){let{backgroundColor:t,borderRadius:r,customBackgroundColor:a,customTextColor:n,customGradient:i,linkTarget:l,gradient:s,rel:c,text:u,textColor:m,title:p,url:d}=e,f=(0,ve.getColorClassName)("color",m),h=!i&&(0,ve.getColorClassName)("background-color",t),g=(0,ve.__experimentalGetGradientClass)(s),b=w("wp-block-button__link",{"has-text-color":m||n,[f]:f,"has-background":t||a||i||s,[h]:h,"no-border-radius":r===0,[g]:g}),y={background:i||void 0,backgroundColor:h||i||s?void 0:a,color:f?void 0:n,borderRadius:r?r+"px":void 0};return(0,Kt.jsx)("div",{children:(0,Kt.jsx)(ve.RichText.Content,{tagName:"a",className:b,href:d,title:p,style:y,value:u,target:l,rel:c})})}},{attributes:{...Uc,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"}},isEligible(e){return e.className&&e.className.includes("is-style-squared")},migrate(e){let t=e.className;return t&&(t=t.replace(/is-style-squared[\s]?/,"").trim()),zf(lI({...e,className:t||void 0,borderRadius:0}))},save({attributes:e}){let{backgroundColor:t,customBackgroundColor:r,customTextColor:a,linkTarget:n,rel:i,text:l,textColor:s,title:c,url:u}=e,m=(0,ve.getColorClassName)("color",s),p=(0,ve.getColorClassName)("background-color",t),d=w("wp-block-button__link",{"has-text-color":s||a,[m]:m,"has-background":t||r,[p]:p}),f={backgroundColor:p?void 0:r,color:m?void 0:a};return(0,Kt.jsx)("div",{children:(0,Kt.jsx)(ve.RichText.Content,{tagName:"a",className:d,href:u,title:c,style:f,value:l,target:n,rel:i})})}},{attributes:{...Uc,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}},migrate:iI,save({attributes:e}){let{url:t,text:r,title:a,backgroundColor:n,textColor:i,customBackgroundColor:l,customTextColor:s}=e,c=(0,ve.getColorClassName)("color",i),u=(0,ve.getColorClassName)("background-color",n),m=w("wp-block-button__link",{"has-text-color":i||s,[c]:c,"has-background":n||l,[u]:u}),p={backgroundColor:u?void 0:l,color:c?void 0:s};return(0,Kt.jsx)("div",{children:(0,Kt.jsx)(ve.RichText.Content,{tagName:"a",className:m,href:t,title:a,style:p,value:r})})}},{attributes:{...Uc,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save({attributes:e}){let{url:t,text:r,title:a,align:n,color:i,textColor:l}=e,s={backgroundColor:i,color:l};return(0,Kt.jsx)("div",{className:`align${n}`,children:(0,Kt.jsx)(ve.RichText.Content,{tagName:"a",className:"wp-block-button__link",href:t,title:a,style:s,value:r})})},migrate:iI},{attributes:{...Uc,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save({attributes:e}){let{url:t,text:r,title:a,align:n,color:i,textColor:l}=e;return(0,Kt.jsx)("div",{className:`align${n}`,style:{backgroundColor:i},children:(0,Kt.jsx)(ve.RichText.Content,{tagName:"a",href:t,title:a,style:{color:l},value:r})})},migrate:iI}],AF=uhe;var qo=o(P(),1),Pn=o(U(),1),xa=o(M(),1),it=o(T(),1),Ju=o(As(),1);var Gc=o(W(),1),E1=o(me(),1),D1=o(V(),1);var $x="noreferrer noopener",qx="_blank",Vf="nofollow";var zF=o(mr(),1);function VF({rel:e="",url:t="",opensInNewTab:r,nofollow:a}){let n,i=e;if(r)n=qx,i=i?.includes($x)?i:i+` ${$x}`;else{let l=new RegExp(`\\b${$x}\\s*`,"g");i=i?.replace(l,"").trim()}if(a)i=i?.includes(Vf)?i:(i+` ${Vf}`).trim();else{let l=new RegExp(`\\b${Vf}\\s*`,"g");i=i?.replace(l,"").trim()}return{url:(0,zF.prependHTTPS)(t),linkTarget:n,rel:i||void 0}}function N1(e){return e.toString().replace(/<\/?a[^>]*>/g,"")}var HF=o(me(),1),Zx=o(U(),1),OF=o(Ff(),1),jF=o(V(),1),UF=o(T(),1);function Kr(e){let{name:t,attributes:r,setAttributes:a}=e,{textAlign:n}=r,{__unstableMarkNextChangeAsNotPersistent:i}=(0,jF.useDispatch)(UF.store),l=(0,HF.useEvent)(()=>{(0,OF.default)(`textAlign attribute in ${t}`,{alternative:"style.typography.textAlign",since:"7.0"}),i(),a(c=>({style:{...c.style,typography:{...c.style?.typography,textAlign:n}}}))}),s=(0,Zx.useRef)();(0,Zx.useEffect)(()=>{n!==s.current&&(s.current=n,l())},[n,l])}var Pr=o(v(),1),{HTMLElementControl:mhe}=K(it.privateApis),phe=[...it.LinkControl.DEFAULT_LINK_SETTINGS,{id:"nofollow",title:(0,qo.__)("Mark as nofollow")}];function dhe(e){let{replaceBlocks:t,selectionChange:r}=(0,D1.useDispatch)(it.store),{getBlock:a,getBlockRootClientId:n,getBlockIndex:i}=(0,D1.useSelect)(it.store),l=(0,Pn.useRef)(e);return l.current=e,(0,E1.useRefEffect)(s=>{function c(u){if(u.defaultPrevented||u.keyCode!==Ju.ENTER)return;let{content:m,clientId:p}=l.current;if(m.length)return;u.preventDefault();let d=a(n(p)),f=i(p),h=(0,Gc.cloneBlock)({...d,innerBlocks:d.innerBlocks.slice(0,f)}),g=(0,Gc.createBlock)((0,Gc.getDefaultBlockName)()),b=d.innerBlocks.slice(f+1),y=b.length?[(0,Gc.cloneBlock)({...d,innerBlocks:b})]:[];t(d.clientId,[h,g,...y],1),r(g.clientId)}return s.addEventListener("keydown",c),()=>{s.removeEventListener("keydown",c)}},[])}function fhe({selectedWidth:e,setAttributes:t}){let r=q();return(0,Pr.jsx)(xa.__experimentalToolsPanel,{label:(0,qo.__)("Settings"),resetAll:()=>t({width:void 0}),dropdownMenuProps:r,children:(0,Pr.jsx)(xa.__experimentalToolsPanelItem,{label:(0,qo.__)("Width"),isShownByDefault:!0,hasValue:()=>!!e,onDeselect:()=>t({width:void 0}),children:(0,Pr.jsx)(xa.__experimentalToggleGroupControl,{label:(0,qo.__)("Width"),value:e,onChange:a=>t({width:a}),isBlock:!0,__next40pxDefaultSize:!0,children:[25,50,75,100].map(a=>(0,Pr.jsx)(xa.__experimentalToggleGroupControlOption,{value:a,label:(0,qo.sprintf)((0,qo.__)("%d%%"),a)},a))})})})}function hhe(e){let{attributes:t,setAttributes:r,className:a,isSelected:n,onReplace:i,mergeBlocks:l,clientId:s,context:c}=e,{tagName:u,linkTarget:m,placeholder:p,rel:d,style:f,text:h,url:g,width:b,metadata:y}=t;Kr(e);let k=u||"a";function _(ke){Ju.isKeyboardEvent.primary(ke,"k")?ne(ke):Ju.isKeyboardEvent.primaryShift(ke,"k")&&(le(),H.current?.focus())}let[x,S]=(0,Pn.useState)(null),C=(0,it.__experimentalUseBorderProps)(t),N=(0,it.__experimentalUseColorProps)(t),B=(0,it.__experimentalGetSpacingClassesAndStyles)(t),D=(0,it.__experimentalGetShadowClassesAndStyles)(t),A=(0,Pn.useRef)(),H=(0,Pn.useRef)(),F=(0,it.useBlockProps)({ref:(0,E1.useMergeRefs)([S,A]),onKeyDown:_}),z=(0,it.useBlockEditingMode)(),[I,R]=(0,Pn.useState)(!1),$=!!g,j=m===qx,G=!!d?.includes(Vf),O=k==="a",{createPageEntity:J,userCanCreatePages:ee,lockUrlControls:oe=!1}=(0,D1.useSelect)(ke=>{if(!n)return{};let je=ke(it.store).getSettings(),de=(0,Gc.getBlockBindingsSource)(y?.bindings?.url?.source);return{createPageEntity:je.__experimentalCreatePageEntity,userCanCreatePages:je.__experimentalUserCanCreatePages,lockUrlControls:!!y?.bindings?.url&&!de?.canUserEditValue?.({select:ke,context:c,args:y?.bindings?.url?.args})}},[c,n,y?.bindings?.url]);async function X(ke){let je=await J({title:ke,status:"draft"});return{id:je.id,type:je.type,title:je.title.rendered,url:je.link,kind:"post-type"}}function te(ke){return(0,Pn.createInterpolateElement)((0,qo.sprintf)((0,qo.__)("Create page: <mark>%s</mark>"),ke),{mark:(0,Pr.jsx)("mark",{})})}function ne(ke){ke.preventDefault(),R(!0)}function le(){r({url:void 0,linkTarget:void 0,rel:void 0}),R(!1)}(0,Pn.useEffect)(()=>{n||R(!1)},[n]);let pe=(0,Pn.useMemo)(()=>({url:g,opensInNewTab:j,nofollow:G}),[g,j,G]),Ie=dhe({content:h,clientId:s}),Ne=(0,E1.useMergeRefs)([Ie,H]),[ae,Re]=(0,it.useSettings)("typography.fluid","layout"),Ee=(0,it.getTypographyClassesAndStyles)(t,{typography:{fluid:ae},layout:{wideSize:Re?.wideSize}}),fe=z==="default"||O&&!oe;return(0,Pr.jsxs)(Pr.Fragment,{children:[(0,Pr.jsx)("div",{...F,className:w(F.className,{[`has-custom-width wp-block-button__width-${b}`]:b}),children:(0,Pr.jsx)(it.RichText,{ref:Ne,"aria-label":(0,qo.__)("Button text"),placeholder:p||(0,qo.__)("Add text\u2026"),value:h,onChange:ke=>r({text:N1(ke)}),withoutInteractiveFormatting:!0,className:w(a,"wp-block-button__link",N.className,C.className,Ee.className,{"no-border-radius":f?.border?.radius===0,"has-custom-font-size":F.style.fontSize},(0,it.__experimentalGetElementClassName)("button")),style:{...C.style,...N.style,...B.style,...D.style,...Ee.style,writingMode:void 0},onReplace:i,onMerge:l,identifier:"text"})}),fe&&(0,Pr.jsx)(it.BlockControls,{group:"block",children:O&&!oe&&(0,Pr.jsx)(xa.ToolbarButton,{name:"link",icon:$?U0:ii,title:$?(0,qo.__)("Unlink"):(0,qo.__)("Link"),shortcut:$?Ju.displayShortcut.primaryShift("k"):Ju.displayShortcut.primary("k"),onClick:$?le:ne,isActive:$})}),O&&n&&(I||$)&&!oe&&(0,Pr.jsx)(xa.Popover,{placement:"bottom",onClose:()=>{R(!1),H.current?.focus()},anchor:x,focusOnMount:I?"firstElement":!1,__unstableSlotName:"__unstable-block-tools-after",shift:!0,children:(0,Pr.jsx)(it.LinkControl,{value:pe,onChange:({url:ke,opensInNewTab:je,nofollow:de})=>r(VF({rel:d,url:ke,opensInNewTab:je,nofollow:de})),onRemove:()=>{le(),H.current?.focus()},forceIsEditingLink:I,settings:phe,createSuggestion:J&&X,withCreateSuggestion:ee,createSuggestionButtonText:te})}),(0,Pr.jsx)(it.InspectorControls,{children:(0,Pr.jsx)(fhe,{selectedWidth:b,setAttributes:r})}),(0,Pr.jsxs)(it.InspectorControls,{group:"advanced",children:[(0,Pr.jsx)(mhe,{tagName:u,onChange:ke=>r({tagName:ke}),options:[{label:(0,qo.__)("Default (<a>)"),value:"a"},{label:"<button>",value:"button"}]}),O&&(0,Pr.jsx)(xa.TextControl,{__next40pxDefaultSize:!0,label:(0,qo.__)("Link relation"),help:(0,Pn.createInterpolateElement)((0,qo.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,Pr.jsx)(xa.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})}),value:d||"",onChange:ke=>r({rel:ke})})]})]})}var GF=hhe;var Kx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/button",title:"Button",category:"design",parent:["core/buttons"],description:"Prompt visitors to take action with a button-style link.",keywords:["link"],textdomain:"default",attributes:{tagName:{type:"string",enum:["a","button"],default:"a"},type:{type:"string",default:"button"},url:{type:"string",source:"attribute",selector:"a",attribute:"href",role:"content"},title:{type:"string",source:"attribute",selector:"a,button",attribute:"title",role:"content"},text:{type:"rich-text",source:"rich-text",selector:"a,button",role:"content"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target",role:"content"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel",role:"content"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,splitting:!0,align:!1,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{__experimentalSkipSerialization:["fontSize","lineHeight","textAlign","fontFamily","fontWeight","fontStyle","textTransform","textDecoration","letterSpacing"],fontSize:!0,lineHeight:!0,textAlign:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},reusable:!1,shadow:{__experimentalSkipSerialization:!0},spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},interactivity:{clientNavigation:!0}},styles:[{name:"fill",label:"Fill",isDefault:!0},{name:"outline",label:"Outline"}],editorStyle:"wp-block-button-editor",style:"wp-block-button",selectors:{root:".wp-block-button .wp-block-button__link",typography:{writingMode:".wp-block-button"}}};var ka=o(T(),1),sI=o(v(),1);function WF({attributes:e,className:t}){let{tagName:r,type:a,fontSize:n,linkTarget:i,rel:l,style:s,text:c,title:u,url:m,width:p}=e,d=r||"a",f=d==="button",h=a||"button",g=(0,ka.__experimentalGetBorderClassesAndStyles)(e),b=(0,ka.__experimentalGetColorClassesAndStyles)(e),y=(0,ka.__experimentalGetSpacingClassesAndStyles)(e),k=(0,ka.__experimentalGetShadowClassesAndStyles)(e),_=(0,ka.getTypographyClassesAndStyles)(e),x=w("wp-block-button__link",b.className,g.className,_.className,{"no-border-radius":s?.border?.radius===0,"has-custom-font-size":n||s?.typography?.fontSize},(0,ka.__experimentalGetElementClassName)("button")),S={...g.style,...b.style,...y.style,...k.style,..._.style,writingMode:void 0},C=w(t,{[`has-custom-width wp-block-button__width-${p}`]:p});return(0,sI.jsx)("div",{...ka.useBlockProps.save({className:C}),children:(0,sI.jsx)(ka.RichText.Content,{tagName:d,type:f?h:null,className:x,href:f?null:m,title:u,style:S,value:c,target:f?null:i,rel:f?null:l})})}var{fieldsKey:vhe,formKey:bhe}=K($F.privateApis),{name:qF}=Kx,Yx={icon:US,example:{attributes:{className:"is-style-fill",text:(0,Qx.__)("Call to action")}},edit:GF,save:WF,deprecated:AF,merge:(e,{text:t=""})=>({...e,text:(e.text||"")+t}),__experimentalLabel(e,{context:t}){let{text:r}=e,a=e?.metadata?.name,n=r?.trim().length>0;if(t==="list-view"&&(a||n))return a||r;if(t==="breadcrumb"&&a)return a}};window.__experimentalContentOnlyInspectorFields&&(Yx[vhe]=[{id:"text",label:(0,Qx.__)("Content"),type:"text",Edit:"rich-text"},{id:"link",label:(0,Qx.__)("Link"),type:"url",Edit:"link",getValue:({item:e})=>({url:e.url,rel:e.rel,linkTarget:e.linkTarget}),setValue:({value:e})=>({url:e.url,rel:e.rel,linkTarget:e.linkTarget})}],Yx[bhe]={fields:["text","link"]});var yhe=()=>E({name:qF,metadata:Kx,settings:Yx});var pI={};Z(pI,{init:()=>She,metadata:()=>Jx,name:()=>aH,settings:()=>nH});var mI=o(P(),1);var M1=o(T(),1),L1=o(v(),1),ZF=e=>{if(e.layout)return e;let{contentJustification:t,orientation:r,...a}=e;return(t||r)&&Object.assign(a,{layout:{type:"flex",...t&&{justifyContent:t},...r&&{orientation:r}}}),a},_he=[{attributes:{contentJustification:{type:"string"},orientation:{type:"string",default:"horizontal"}},supports:{anchor:!0,align:["wide","full"],__experimentalExposeControlsToChildren:!0,spacing:{blockGap:!0,margin:["top","bottom"],__experimentalDefaultControls:{blockGap:!0}}},isEligible:({contentJustification:e,orientation:t})=>!!e||!!t,migrate:ZF,save({attributes:{contentJustification:e,orientation:t}}){return(0,L1.jsx)("div",{...M1.useBlockProps.save({className:w({[`is-content-justification-${e}`]:e,"is-vertical":t==="vertical"})}),children:(0,L1.jsx)(M1.InnerBlocks.Content,{})})}},{supports:{align:["center","left","right"],anchor:!0},save(){return(0,L1.jsx)("div",{children:(0,L1.jsx)(M1.InnerBlocks.Content,{})})},isEligible({align:e}){return e&&["center","left","right"].includes(e)},migrate(e){return ZF({...e,align:void 0,contentJustification:e.align})}}],KF=_he;var R1=o(W(),1),uI=o(em(),1);var A1=o(W(),1);function Wc(e,t,r=null){if(!e)return;let a=(0,A1.getBlockType)(t);if(!a)return;let n={};if((0,A1.hasBlockSupport)(a,"anchor")&&e.anchor&&(n.anchor=e.anchor),(0,A1.hasBlockSupport)(a,"ariaLabel")&&e.ariaLabel&&(n.ariaLabel=e.ariaLabel),e.metadata){let i=[];if(r&&i.push("id","bindings"),i.length>0){let l=Object.entries(e.metadata).reduce((s,[c,u])=>(i.includes(c)&&(s[c]=c==="bindings"?r(u):u),s),{});Object.keys(l).length>0&&(n.metadata=l)}}if(Object.keys(n).length!==0)return n}var xhe={from:[{type:"block",isMultiBlock:!0,blocks:["core/button"],transform:e=>(0,R1.createBlock)("core/buttons",{},e.map(t=>(0,R1.createBlock)("core/button",t)))},{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,R1.createBlock)("core/buttons",{},e.map(t=>{let{content:r}=t,a=(0,uI.__unstableCreateElement)(document,r),n=a.innerText||"",l=a.querySelector("a")?.getAttribute("href");return(0,R1.createBlock)("core/button",{...t,...Wc(t,"core/button",({content:s})=>({text:s})),text:n,url:l})})),isMatch:e=>e.every(t=>{let r=(0,uI.__unstableCreateElement)(document,t.content),a=r.innerText||"",n=r.querySelectorAll("a");return a.length<=30&&n.length<=1})}]},YF=xhe;var Xx=o(T(),1),XF=o(V(),1),JF=o(W(),1),eH=o(v(),1),khe={name:"core/button",attributesToCopy:["backgroundColor","border","className","fontFamily","fontSize","gradient","style","textColor","width"]};function whe({attributes:e,className:t}){let{fontSize:r,layout:a,style:n}=e,i=(0,Xx.useBlockProps)({className:w(t,{"has-custom-font-size":r||n?.typography?.fontSize})}),{hasButtonVariations:l}=(0,XF.useSelect)(c=>({hasButtonVariations:c(JF.store).getBlockVariations("core/button","inserter").length>0}),[]),s=(0,Xx.useInnerBlocksProps)(i,{defaultBlock:khe,directInsert:!l,template:[["core/button"]],templateInsertUpdatesSelection:!0,orientation:a?.orientation??"horizontal"});return(0,eH.jsx)("div",{...s})}var tH=whe;var Jx={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/buttons",title:"Buttons",category:"design",allowedBlocks:["core/button"],description:"Prompt visitors to take action with a group of button-style links.",keywords:["link"],textdomain:"default",supports:{anchor:!0,align:["wide","full"],html:!1,__experimentalExposeControlsToChildren:!0,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},spacing:{blockGap:["horizontal","vertical"],padding:!0,margin:["top","bottom"],__experimentalDefaultControls:{blockGap:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},layout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}},interactivity:{clientNavigation:!0},listView:!0,contentRole:!0},editorStyle:"wp-block-buttons-editor",style:"wp-block-buttons"};var ek=o(T(),1),rH=o(v(),1);function oH({attributes:e,className:t}){let{fontSize:r,style:a}=e,n=ek.useBlockProps.save({className:w(t,{"has-custom-font-size":r||a?.typography?.fontSize})}),i=ek.useInnerBlocksProps.save(n);return(0,rH.jsx)("div",{...i})}var{name:aH}=Jx,nH={icon:WS,example:{attributes:{layout:{type:"flex",justifyContent:"center"}},innerBlocks:[{name:"core/button",attributes:{text:(0,mI.__)("Find out more")}},{name:"core/button",attributes:{text:(0,mI.__)("Contact us")}}]},deprecated:KF,transforms:YF,edit:tH,save:oH},She=()=>E({name:aH,metadata:Jx,settings:nH});var fI={};Z(fI,{init:()=>Ihe,metadata:()=>tk,name:()=>dH,settings:()=>fH});var tk={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/calendar",title:"Calendar",category:"widgets",description:"A calendar of your site\u2019s posts.",keywords:["posts","archive"],textdomain:"default",attributes:{month:{type:"integer"},year:{type:"integer"}},supports:{anchor:!0,align:!0,html:!1,color:{link:!0,__experimentalSkipSerialization:["text","background"],__experimentalDefaultControls:{background:!0,text:!0},__experimentalSelector:"table, th"},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-calendar"};var z1=o(M(),1),iH=o(V(),1),lH=o(Fu(),1),sH=o(T(),1),cH=o(Q(),1),Hf=o(P(),1),uH=o(me(),1);var si=o(v(),1),Phe=Af(e=>{if(!e)return{};let t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()+1}});function mH({attributes:e,name:t}){let{date:r,hasPosts:a,hasPostsResolved:n}=(0,iH.useSelect)(m=>{let{getEntityRecords:p,hasFinishedResolution:d}=m(cH.store),f={status:"publish",per_page:1},h=p("postType","post",f),g=d("getEntityRecords",["postType","post",f]),b,y=m("core/editor");return y&&y.getEditedPostAttribute("type")==="post"&&(b=y.getEditedPostAttribute("date")),{date:b,hasPostsResolved:g,hasPosts:g&&h?.length===1}},[]),{content:i,status:l,error:s}=(0,lH.useServerSideRender)({attributes:{...e,...Phe(r)},block:t}),c=(0,uH.useDisabled)(),u=(0,sH.useBlockProps)({ref:c});return a?(0,si.jsxs)(si.Fragment,{children:[l==="loading"&&(0,si.jsx)("div",{...u,children:(0,si.jsx)(z1.Spinner,{})}),l==="error"&&(0,si.jsx)("div",{...u,children:(0,si.jsx)("p",{children:(0,Hf.sprintf)((0,Hf.__)("Error: %s"),s)})}),l==="success"&&(0,si.jsx)(uo,{wrapperProps:u,html:i})]}):(0,si.jsx)("div",{...u,children:(0,si.jsx)(z1.Placeholder,{icon:S0,label:(0,Hf.__)("Calendar"),children:n?(0,Hf.__)("No published posts found."):(0,si.jsx)(z1.Spinner,{})})})}var dI=o(W(),1),Bhe={from:[{type:"block",blocks:["core/archives"],transform:()=>(0,dI.createBlock)("core/calendar")}],to:[{type:"block",blocks:["core/archives"],transform:()=>(0,dI.createBlock)("core/archives")}]},pH=Bhe;var{name:dH}=tk,fH={icon:S0,example:{},edit:mH,transforms:pH},Ihe=()=>E({name:dH,metadata:tk,settings:fH});var vI={};Z(vI,{init:()=>Dhe,metadata:()=>rk,name:()=>_H,settings:()=>xH});var rk={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/categories",title:"Terms List",category:"widgets",description:"Display a list of all terms of a given taxonomy.",keywords:["categories"],textdomain:"default",attributes:{taxonomy:{type:"string",default:"category"},displayAsDropdown:{type:"boolean",default:!1},showHierarchy:{type:"boolean",default:!1},showPostCounts:{type:"boolean",default:!1},showOnlyTopLevel:{type:"boolean",default:!1},showEmpty:{type:"boolean",default:!1},label:{type:"string",role:"content"},showLabel:{type:"boolean",default:!0}},usesContext:["enhancedPagination"],supports:{anchor:!0,align:!0,html:!1,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},editorStyle:"wp-block-categories-editor",style:"wp-block-categories"};var ar=o(M(),1),hH=o(me(),1),Of=o(T(),1),gH=o(Wo(),1),wr=o(P(),1);var hI=o(Q(),1),vH=o(V(),1),bH=o(xr(),1);var pt=o(v(),1);function gI({attributes:{displayAsDropdown:e,showHierarchy:t,showPostCounts:r,showOnlyTopLevel:a,showEmpty:n,label:i,showLabel:l,taxonomy:s},setAttributes:c,className:u,clientId:m}){let p=(0,hH.useInstanceId)(gI,"blocks-category-select"),{records:d,isResolvingTaxonomies:f}=(0,hI.useEntityRecords)("root","taxonomy",{per_page:-1}),h=d?.filter(j=>j.visibility.public),g=h?.find(j=>j.slug===s),b=!f&&g?.hierarchical,y={per_page:-1,hide_empty:!n,context:"view"};b&&a&&(y.parent=0);let{records:k,isResolving:_}=(0,hI.useEntityRecords)("taxonomy",s,y),{createWarningNotice:x}=(0,vH.useDispatch)(bH.store),S=j=>{j.preventDefault(),x((0,wr.__)("Links are disabled in the editor."),{id:`block-library/core/categories/redirection-prevented/${m}`,type:"snackbar"})},C=j=>k?.length?j===null?k:k.filter(({parent:G})=>G===j):[],N=j=>G=>c({[j]:G}),B=j=>j?(0,gH.decodeEntities)(j).trim():(0,wr.__)("(Untitled)"),D=()=>C(b&&t?0:null).map(O=>A(O)),A=j=>{let G=C(j.id),{id:O,link:J,count:ee,name:oe}=j;return(0,pt.jsxs)("li",{className:`cat-item cat-item-${O}`,children:[(0,pt.jsx)("a",{href:J,onClick:S,children:B(oe)}),r&&` (${ee})`,b&&t&&!!G.length&&(0,pt.jsx)("ul",{className:"children",children:G.map(X=>A(X))})]},O)},H=()=>{let G=C(b&&t?0:null);return(0,pt.jsxs)(pt.Fragment,{children:[l?(0,pt.jsx)(Of.RichText,{className:"wp-block-categories__label","aria-label":(0,wr.__)("Label text"),placeholder:g?.name,withoutInteractiveFormatting:!0,value:i,onChange:O=>c({label:O})}):(0,pt.jsx)(ar.VisuallyHidden,{as:"label",htmlFor:p,children:i||g?.name}),(0,pt.jsxs)("select",{id:p,children:[(0,pt.jsx)("option",{children:(0,wr.sprintf)((0,wr.__)("Select %s"),g?.labels?.singular_name)}),G.map(O=>F(O,0))]})]})},F=(j,G)=>{let{id:O,count:J,name:ee}=j,oe=C(O);return[(0,pt.jsxs)("option",{className:`level-${G}`,children:[Array.from({length:G*3}).map(()=>"\xA0"),B(ee),r&&` (${J})`]},O),b&&t&&!!oe.length&&oe.map(X=>F(X,G+1))]},z=k?.length&&!e&&!_?"ul":"div",I=w(u,`wp-block-categories-taxonomy-${s}`,{"wp-block-categories-list":!!k?.length&&!e&&!_,"wp-block-categories-dropdown":!!k?.length&&e&&!_}),R=(0,Of.useBlockProps)({className:I}),$=q();return(0,pt.jsxs)(z,{...R,children:[(0,pt.jsx)(Of.InspectorControls,{children:(0,pt.jsxs)(ar.__experimentalToolsPanel,{label:(0,wr.__)("Settings"),resetAll:()=>{c({taxonomy:"category",displayAsDropdown:!1,showHierarchy:!1,showPostCounts:!1,showOnlyTopLevel:!1,showEmpty:!1,showLabel:!0})},dropdownMenuProps:$,children:[Array.isArray(h)&&(0,pt.jsx)(ar.__experimentalToolsPanelItem,{hasValue:()=>s!=="category",label:(0,wr.__)("Taxonomy"),onDeselect:()=>{c({taxonomy:"category"})},isShownByDefault:!0,children:(0,pt.jsx)(ar.SelectControl,{__next40pxDefaultSize:!0,label:(0,wr.__)("Taxonomy"),options:h.map(j=>({label:j.name,value:j.slug})),value:s,onChange:j=>c({taxonomy:j})})}),(0,pt.jsx)(ar.__experimentalToolsPanelItem,{hasValue:()=>!!e,label:(0,wr.__)("Display as dropdown"),onDeselect:()=>c({displayAsDropdown:!1}),isShownByDefault:!0,children:(0,pt.jsx)(ar.ToggleControl,{label:(0,wr.__)("Display as dropdown"),checked:e,onChange:N("displayAsDropdown")})}),e&&(0,pt.jsx)(ar.__experimentalToolsPanelItem,{hasValue:()=>!l,label:(0,wr.__)("Show label"),onDeselect:()=>c({showLabel:!0}),isShownByDefault:!0,children:(0,pt.jsx)(ar.ToggleControl,{className:"wp-block-categories__indentation",label:(0,wr.__)("Show label"),checked:l,onChange:N("showLabel")})}),(0,pt.jsx)(ar.__experimentalToolsPanelItem,{hasValue:()=>!!r,label:(0,wr.__)("Show post counts"),onDeselect:()=>c({showPostCounts:!1}),isShownByDefault:!0,children:(0,pt.jsx)(ar.ToggleControl,{label:(0,wr.__)("Show post counts"),checked:r,onChange:N("showPostCounts")})}),b&&(0,pt.jsx)(ar.__experimentalToolsPanelItem,{hasValue:()=>!!a,label:(0,wr.__)("Show only top level terms"),onDeselect:()=>c({showOnlyTopLevel:!1}),isShownByDefault:!0,children:(0,pt.jsx)(ar.ToggleControl,{label:(0,wr.__)("Show only top level terms"),checked:a,onChange:N("showOnlyTopLevel")})}),(0,pt.jsx)(ar.__experimentalToolsPanelItem,{hasValue:()=>!!n,label:(0,wr.__)("Show empty terms"),onDeselect:()=>c({showEmpty:!1}),isShownByDefault:!0,children:(0,pt.jsx)(ar.ToggleControl,{label:(0,wr.__)("Show empty terms"),checked:n,onChange:N("showEmpty")})}),b&&!a&&(0,pt.jsx)(ar.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:(0,wr.__)("Show hierarchy"),onDeselect:()=>c({showHierarchy:!1}),isShownByDefault:!0,children:(0,pt.jsx)(ar.ToggleControl,{label:(0,wr.__)("Show hierarchy"),checked:t,onChange:N("showHierarchy")})})]})}),_&&(0,pt.jsx)(ar.Placeholder,{icon:Q0,label:(0,wr.__)("Terms"),children:(0,pt.jsx)(ar.Spinner,{})}),!_&&k?.length===0&&(0,pt.jsx)("p",{children:g.labels.no_terms}),!_&&k?.length>0&&(e?H():D())]})}var ok=o(P(),1);var Ehe=[{name:"terms",title:(0,ok.__)("Terms List"),icon:Gu,attributes:{taxonomy:"post_tag"},isActive:e=>e.taxonomy!=="category"},{name:"categories",title:(0,ok.__)("Categories List"),description:(0,ok.__)("Display a list of all categories."),icon:Gu,attributes:{taxonomy:"category"},isActive:["taxonomy"],isDefault:!0}],yH=Ehe;var{name:_H}=rk,xH={icon:Gu,example:{},edit:gI,variations:yH},Dhe=()=>E({name:_H,metadata:rk,settings:xH});var yI={};Z(yI,{init:()=>zhe,metadata:()=>lk,name:()=>F1,settings:()=>AH});var $c=o(T(),1),NH=o(V(),1),qc=o(M(),1),Uf=o(U(),1),V1=o(P(),1);var kH=o(P(),1),wH=o(M(),1),ak=o(V(),1),nk=o(W(),1),bI=o(T(),1),CH=o(v(),1),Lhe=({clientId:e})=>{let{replaceBlocks:t}=(0,ak.useDispatch)(bI.store),r=(0,ak.useSelect)(a=>a(bI.store).getBlock(e),[e]);return(0,CH.jsx)(wH.ToolbarButton,{onClick:()=>t(r.clientId,(0,nk.rawHandler)({HTML:(0,nk.serialize)(r)})),children:(0,kH.__)("Convert to blocks")})},SH=Lhe;var TH=o(T(),1),Ll=o(M(),1),ik=o(U(),1),jf=o(P(),1),PH=o(V(),1);var BH=o(me(),1),Ji=o(v(),1);function Mhe({onClick:e,isModalFullScreen:t}){return(0,BH.useViewportMatch)("small","<")?null:(0,Ji.jsx)(Ll.Button,{size:"compact",onClick:e,icon:kp,isPressed:t,label:t?(0,jf.__)("Exit fullscreen"):(0,jf.__)("Enter fullscreen")})}function Ahe(e){let t=(0,PH.useSelect)(r=>r(TH.store).getSettings().styles);return(0,ik.useEffect)(()=>{let{baseURL:r,suffix:a,settings:n}=window.wpEditorL10n.tinymce;return window.tinymce.EditorManager.overrideDefaults({base_url:r,suffix:a}),window.wp.oldEditor.initialize(e.id,{tinymce:{...n,setup(i){i.on("init",()=>{let l=i.getDoc();t.forEach(({css:s})=>{let c=l.createElement("style");c.innerHTML=s,l.head.appendChild(c)})})}}}),()=>{window.wp.oldEditor.remove(e.id)}},[]),(0,Ji.jsx)("textarea",{...e})}function IH({clientId:e,content:t,onClose:r,onChange:a}){let[n,i]=(0,ik.useState)(!1),l=`editor-${e}`;return(0,Ji.jsxs)(Ll.Modal,{title:(0,jf.__)("Classic Editor"),onRequestClose:r,shouldCloseOnClickOutside:!1,overlayClassName:"block-editor-freeform-modal",isFullScreen:n,className:"block-editor-freeform-modal__content",headerActions:(0,Ji.jsx)(Mhe,{onClick:()=>i(!n),isModalFullScreen:n}),children:[(0,Ji.jsx)(Ahe,{id:l,defaultValue:t}),(0,Ji.jsxs)(Ll.Flex,{className:"block-editor-freeform-modal__actions",justify:"flex-end",expanded:!1,children:[(0,Ji.jsx)(Ll.FlexItem,{children:(0,Ji.jsx)(Ll.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:r,children:(0,jf.__)("Cancel")})}),(0,Ji.jsx)(Ll.FlexItem,{children:(0,Ji.jsx)(Ll.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:()=>{a(window.wp.oldEditor.getContent(l)),r()},children:(0,jf.__)("Save")})})]})]})}var Zo=o(v(),1);function EH({attributes:e,setAttributes:t,clientId:r}){let{content:a}=e,[n,i]=(0,Uf.useState)(!1),l=(0,Uf.useRef)(null),s=(0,NH.useSelect)(c=>c($c.store).canRemoveBlock(r),[r]);return(0,Zo.jsxs)(Zo.Fragment,{children:[s&&(0,Zo.jsx)($c.BlockControls,{children:(0,Zo.jsx)(qc.ToolbarGroup,{children:(0,Zo.jsx)(SH,{clientId:r})})}),(0,Zo.jsx)($c.BlockControls,{children:(0,Zo.jsx)(qc.ToolbarGroup,{children:(0,Zo.jsx)(qc.ToolbarButton,{ref:l,onClick:()=>i(!0),children:(0,V1.__)("Edit")})})}),(0,Zo.jsxs)("div",{...(0,$c.useBlockProps)(),children:[a?(0,Zo.jsx)(Uf.RawHTML,{children:a}):(0,Zo.jsx)(qc.Placeholder,{icon:(0,Zo.jsx)($c.BlockIcon,{icon:P0}),label:(0,V1.__)("Classic"),instructions:(0,V1.__)("Use the classic editor to add content."),children:(0,Zo.jsx)(qc.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:()=>i(!0),children:(0,V1.__)("Edit contents")})}),n&&(0,Zo.jsx)(IH,{clientId:r,content:a,onClose:()=>{i(!1),l.current&&l.current.focus()},onChange:c=>t({content:c})})]})]})}var lk={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/freeform",title:"Classic",category:"text",description:"Use the classic WordPress editor.",textdomain:"default",attributes:{content:{type:"string",source:"raw"}},supports:{className:!1,customClassName:!1,lock:!1,reusable:!1,renaming:!1,visibility:!1,customCSS:!1},editorStyle:"wp-block-freeform-editor"};var DH=o(U(),1),LH=o(v(),1);function MH({attributes:e}){let{content:t}=e;return(0,LH.jsx)(DH.RawHTML,{children:t})}var{name:F1}=lk,AH={icon:P0,edit:EH,save:MH},zhe=()=>E({name:F1,metadata:lk,settings:AH});var CI={};Z(CI,{init:()=>Ghe,metadata:()=>uk,name:()=>jH,settings:()=>dk});var wI=o(P(),1);var OH=o(W(),1);var _I=o(P(),1),sk=o(T(),1),ck=o(W(),1),xI=o(v(),1);function RH({attributes:e,setAttributes:t,onRemove:r,insertBlocksAfter:a,mergeBlocks:n}){let i=(0,sk.useBlockProps)();return(0,xI.jsx)("pre",{...i,children:(0,xI.jsx)(sk.RichText,{tagName:"code",identifier:"content",value:e.content,onChange:l=>t({content:l}),onRemove:r,onMerge:n,placeholder:(0,_I.__)("Write code\u2026"),"aria-label":(0,_I.__)("Code"),preserveWhiteSpace:!0,__unstablePastePlainText:!0,__unstableOnSplitAtDoubleLineEnd:()=>a((0,ck.createBlock)((0,ck.getDefaultBlockName)()))})})}var uk={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/code",title:"Code",category:"text",description:"Display code snippets that respect your spacing and tabs.",textdomain:"default",attributes:{content:{type:"rich-text",source:"rich-text",selector:"code",__unstablePreserveWhiteSpace:!0,role:"content"}},supports:{align:["wide"],anchor:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{margin:["top","bottom"],padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{width:!0,color:!0}},color:{text:!0,background:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-code"};var mk=o(T(),1);var zH=o(me(),1);function VH(e){return(0,zH.pipe)(Fhe,Hhe)(e||"")}function Fhe(e){return e.replace(/\[/g,"&#91;")}function Hhe(e){return e.replace(/^(\s*https?:)\/\/([^\s<>"]+\s*)$/m,"$1&#47;&#47;$2")}var kI=o(v(),1);function FH({attributes:e}){return(0,kI.jsx)("pre",{...mk.useBlockProps.save(),children:(0,kI.jsx)(mk.RichText.Content,{tagName:"code",value:VH(typeof e.content=="string"?e.content:e.content.toHTMLString({preserveWhiteSpace:!0}))})})}var H1=o(W(),1),pk=o(em(),1);var Ohe={from:[{type:"input",regExp:/^```$/,transform:()=>(0,H1.createBlock)("core/code")},{type:"block",blocks:["core/paragraph"],transform:e=>{let{content:t}=e;return(0,H1.createBlock)("core/code",{...e,...Wc(e,"core/code"),content:t})}},{type:"block",blocks:["core/html"],transform:e=>{let{content:t}=e;return(0,H1.createBlock)("core/code",{...e,...Wc(e,"core/code"),content:(0,pk.toHTMLString)({value:(0,pk.create)({text:t})})})}},{type:"raw",isMatch:e=>e.nodeName==="PRE"&&e.children.length===1&&e.firstChild.nodeName==="CODE",schema:{pre:{children:{code:{children:{"#text":{}}}}}}}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>{let{content:t}=e;return(0,H1.createBlock)("core/paragraph",{...Wc(e,"core/paragraph"),content:t})}}]},HH=Ohe;var{fieldsKey:jhe,formKey:Uhe}=K(OH.privateApis),{name:jH}=uk,dk={icon:B0,example:{attributes:{content:(0,wI.__)(`// A \u201Cblock\u201D is the abstract term used
// to describe units of markup that
// when composed together, form the
// content or layout of a page.
registerBlockType( name, settings );`)}},merge(e,t){return{content:e.content+`

`+t.content}},transforms:HH,edit:RH,save:FH};window.__experimentalContentOnlyInspectorFields&&(dk[jhe]=[{id:"content",label:(0,wI.__)("Code"),type:"text",Edit:"rich-text"}],dk[Uhe]={fields:["content"]});var Ghe=()=>E({name:jH,metadata:uk,settings:dk});var TI={};Z(TI,{init:()=>Khe,metadata:()=>hk,name:()=>ZH,settings:()=>KH});var UH=o(T(),1),SI=o(v(),1),Whe=[{attributes:{verticalAlignment:{type:"string"},width:{type:"number",min:0,max:100}},isEligible({width:e}){return isFinite(e)},migrate(e){return{...e,width:`${e.width}%`}},save({attributes:e}){let{verticalAlignment:t,width:r}=e,a=w({[`is-vertically-aligned-${t}`]:t}),n={flexBasis:r+"%"};return(0,SI.jsx)("div",{className:a,style:n,children:(0,SI.jsx)(UH.InnerBlocks.Content,{})})}}],GH=Whe;var Ko=o(T(),1),tm=o(M(),1),fk=o(V(),1),Ap=o(P(),1);var ci=o(v(),1);function $he({width:e,setAttributes:t}){let[r]=(0,Ko.useSettings)("spacing.units"),a=(0,tm.__experimentalUseCustomUnits)({availableUnits:r||["%","px","em","rem","vw"]}),n=q();return(0,ci.jsx)(tm.__experimentalToolsPanel,{label:(0,Ap.__)("Settings"),resetAll:()=>{t({width:void 0})},dropdownMenuProps:n,children:(0,ci.jsx)(tm.__experimentalToolsPanelItem,{hasValue:()=>e!==void 0,label:(0,Ap.__)("Width"),onDeselect:()=>t({width:void 0}),isShownByDefault:!0,children:(0,ci.jsx)(tm.__experimentalUnitControl,{label:(0,Ap.__)("Width"),__unstableInputWidth:"calc(50% - 8px)",__next40pxDefaultSize:!0,value:e||"",onChange:i=>{i=0>parseFloat(i)?"0":i,t({width:i})},units:a})})})}function qhe({attributes:{verticalAlignment:e,width:t,templateLock:r,allowedBlocks:a},setAttributes:n,clientId:i}){let l=w("block-core-columns",{[`is-vertically-aligned-${e}`]:e}),{columnsIds:s,hasChildBlocks:c,rootClientId:u}=(0,fk.useSelect)(k=>{let{getBlockOrder:_,getBlockRootClientId:x}=k(Ko.store),S=x(i);return{hasChildBlocks:_(i).length>0,rootClientId:S,columnsIds:_(S)}},[i]),{updateBlockAttributes:m}=(0,fk.useDispatch)(Ko.store),p=k=>{n({verticalAlignment:k}),m(u,{verticalAlignment:null})},d=Number.isFinite(t)?t+"%":t,f=(0,Ko.useBlockProps)({className:l,style:d?{flexBasis:d}:void 0}),h=s.length,g=s.indexOf(i)+1,b=(0,Ap.sprintf)((0,Ap.__)("%1$s (%2$d of %3$d)"),f["aria-label"],g,h),y=(0,Ko.useInnerBlocksProps)({...f,"aria-label":b},{templateLock:r,allowedBlocks:a,renderAppender:c?void 0:Ko.InnerBlocks.ButtonBlockAppender});return(0,ci.jsxs)(ci.Fragment,{children:[(0,ci.jsx)(Ko.BlockControls,{children:(0,ci.jsx)(Ko.BlockVerticalAlignmentToolbar,{onChange:p,value:e,controls:["top","center","bottom","stretch"]})}),(0,ci.jsx)(Ko.InspectorControls,{children:(0,ci.jsx)($he,{width:t,setAttributes:n})}),(0,ci.jsx)("div",{...y})]})}var WH=qhe;var hk={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/column",title:"Column",category:"design",parent:["core/columns"],description:"A single column within a columns block.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},width:{type:"string"},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},supports:{__experimentalOnEnter:!0,anchor:!0,reusable:!1,html:!1,color:{gradients:!0,heading:!0,button:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},shadow:!0,spacing:{blockGap:!0,padding:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:!0,interactivity:{clientNavigation:!0},allowedBlocks:!0}};var gk=o(T(),1),$H=o(v(),1);function qH({attributes:e}){let{verticalAlignment:t,width:r}=e,a=w({[`is-vertically-aligned-${t}`]:t}),n;if(r&&/\d/.test(r)){let s=Number.isFinite(r)?r+"%":r;!Number.isFinite(r)&&r?.endsWith("%")&&(s=Math.round(Number.parseFloat(r)*1e12)/1e12+"%"),n={flexBasis:s}}let i=gk.useBlockProps.save({className:a,style:n}),l=gk.useInnerBlocksProps.save(i);return(0,$H.jsx)("div",{...l})}var{name:ZH}=hk,KH={icon:s9,edit:WH,save:qH,deprecated:GH},Khe=()=>E({name:ZH,metadata:hk,settings:KH});var II={};Z(II,{init:()=>sge,metadata:()=>yk,name:()=>nO,settings:()=>iO});var O1=o(P(),1);var QH=o(W(),1),zp=o(T(),1),Rp=o(v(),1);function vk(e){let{doc:t}=vk;t||(t=document.implementation.createHTMLDocument(""),vk.doc=t);let r;t.body.innerHTML=e;for(let a of t.body.firstChild.classList)if(r=a.match(/^layout-column-(\d+)$/))return Number(r[1])-1}var Qhe=e=>{if(!e.customTextColor&&!e.customBackgroundColor)return e;let t={color:{}};e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor);let{customTextColor:r,customBackgroundColor:a,...n}=e;return{...n,style:t,isStackedOnMobile:!0}},YH=[{attributes:{verticalAlignment:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},textColor:{type:"string"}},migrate:Qhe,save({attributes:e}){let{verticalAlignment:t,backgroundColor:r,customBackgroundColor:a,textColor:n,customTextColor:i}=e,l=(0,zp.getColorClassName)("background-color",r),s=(0,zp.getColorClassName)("color",n),c=w({"has-background":r||a,"has-text-color":n||i,[l]:l,[s]:s,[`are-vertically-aligned-${t}`]:t});return(0,Rp.jsx)("div",{className:c||void 0,style:{backgroundColor:l?void 0:a,color:s?void 0:i},children:(0,Rp.jsx)(zp.InnerBlocks.Content,{})})}},{attributes:{columns:{type:"number",default:2}},isEligible(e,t){return t.some(a=>/layout-column-\d+/.test(a.originalContent))?t.some(a=>vk(a.originalContent)!==void 0):!1},migrate(e,t){let a=t.reduce((l,s)=>{let{originalContent:c}=s,u=vk(c);return u===void 0&&(u=0),l[u]||(l[u]=[]),l[u].push(s),l},[]).map(l=>(0,QH.createBlock)("core/column",{},l)),{columns:n,...i}=e;return[{...i,isStackedOnMobile:!0},a]},save({attributes:e}){let{columns:t}=e;return(0,Rp.jsx)("div",{className:`has-${t}-columns`,children:(0,Rp.jsx)(zp.InnerBlocks.Content,{})})}},{attributes:{columns:{type:"number",default:2}},migrate(e,t){let{columns:r,...a}=e;return e={...a,isStackedOnMobile:!0},[e,t]},save({attributes:e}){let{verticalAlignment:t,columns:r}=e,a=w(`has-${r}-columns`,{[`are-vertically-aligned-${t}`]:t});return(0,Rp.jsx)("div",{className:a,children:(0,Rp.jsx)(zp.InnerBlocks.Content,{})})}}];var Vp=o(P(),1),tl=o(M(),1),Vr=o(T(),1),el=o(V(),1),Fp=o(W(),1);var bk=e=>{let t=parseFloat(e);return Number.isFinite(t)?parseFloat(t.toFixed(2)):void 0};function XH(e,t){let{width:r=100/t}=e.attributes;return bk(r)}function Yhe(e,t=e.length){return e.reduce((r,a)=>r+XH(a,t),0)}function Xhe(e,t=e.length){return e.reduce((r,a)=>{let n=XH(a,t);return Object.assign(r,{[a.clientId]:n})},{})}function PI(e,t,r=e.length){let a=Yhe(e,r);return Object.fromEntries(Object.entries(Xhe(e,r)).map(([n,i])=>{let l=t*i/a;return[n,bk(l)]}))}function JH(e){return e.every(t=>{let r=t.attributes.width;return Number.isFinite(r?.endsWith?.("%")?parseFloat(r):r)})}function BI(e,t){return e.map(r=>({...r,attributes:{...r.attributes,width:`${t[r.clientId]}%`}}))}var mo=o(v(),1),Jhe={name:"core/column"};function ege({clientId:e,setAttributes:t,isStackedOnMobile:r}){let{count:a,canInsertColumnBlock:n,minCount:i}=(0,el.useSelect)(m=>{let{canInsertBlockType:p,canRemoveBlock:d,getBlockOrder:f}=m(Vr.store),h=f(e),g=h.reduce((b,y,k)=>(d(y)||b.push(k),b),[]);return{count:h.length,canInsertColumnBlock:p("core/column",e),minCount:Math.max(...g)+1}},[e]),{getBlocks:l}=(0,el.useSelect)(Vr.store),{replaceInnerBlocks:s}=(0,el.useDispatch)(Vr.store);function c(m,p){let d=l(e),f=JH(d),h=p>m;if(h&&f){let g=bk(100/p),b=p-m,y=PI(d,100-g*b);d=[...BI(d,y),...Array.from({length:b}).map(()=>(0,Fp.createBlock)("core/column",{width:`${g}%`}))]}else if(h)d=[...d,...Array.from({length:p-m}).map(()=>(0,Fp.createBlock)("core/column"))];else if(p<m&&(d=d.slice(0,-(m-p)),f)){let g=PI(d,100);d=BI(d,g)}s(e,d)}let u=q();return(0,mo.jsxs)(tl.__experimentalToolsPanel,{label:(0,Vp.__)("Settings"),resetAll:()=>{t({isStackedOnMobile:!0})},dropdownMenuProps:u,children:[n&&(0,mo.jsxs)(tl.__experimentalVStack,{spacing:4,style:{gridColumn:"1 / -1"},children:[(0,mo.jsx)(tl.RangeControl,{__next40pxDefaultSize:!0,label:(0,Vp.__)("Columns"),value:a,onChange:m=>c(a,Math.max(i,m)),min:Math.max(1,i),max:Math.max(6,a)}),a>6&&(0,mo.jsx)(tl.Notice,{status:"warning",isDismissible:!1,children:(0,Vp.__)("This column count exceeds the recommended amount and may cause visual breakage.")})]}),(0,mo.jsx)(tl.__experimentalToolsPanelItem,{label:(0,Vp.__)("Stack on mobile"),isShownByDefault:!0,hasValue:()=>r!==!0,onDeselect:()=>t({isStackedOnMobile:!0}),children:(0,mo.jsx)(tl.ToggleControl,{label:(0,Vp.__)("Stack on mobile"),checked:r,onChange:()=>t({isStackedOnMobile:!r})})})]})}function tge({attributes:e,setAttributes:t,clientId:r}){let{isStackedOnMobile:a,verticalAlignment:n,templateLock:i}=e,l=(0,el.useRegistry)(),{getBlockOrder:s}=(0,el.useSelect)(Vr.store),{updateBlockAttributes:c}=(0,el.useDispatch)(Vr.store),u=w({[`are-vertically-aligned-${n}`]:n,"is-not-stacked-on-mobile":!a}),m=(0,Vr.useBlockProps)({className:u}),p=(0,Vr.useInnerBlocksProps)(m,{defaultBlock:Jhe,directInsert:!0,orientation:"horizontal",renderAppender:!1,templateLock:i});function d(f){let h=s(r);l.batch(()=>{t({verticalAlignment:f}),c(h,{verticalAlignment:f})})}return(0,mo.jsxs)(mo.Fragment,{children:[(0,mo.jsx)(Vr.BlockControls,{children:(0,mo.jsx)(Vr.BlockVerticalAlignmentToolbar,{onChange:d,value:n})}),(0,mo.jsx)(Vr.InspectorControls,{children:(0,mo.jsx)(ege,{clientId:r,setAttributes:t,isStackedOnMobile:a})}),(0,mo.jsx)("div",{...p})]})}function rge({clientId:e,name:t,setAttributes:r}){let{blockType:a,defaultVariation:n,variations:i}=(0,el.useSelect)(c=>{let{getBlockVariations:u,getBlockType:m,getDefaultBlockVariation:p}=c(Fp.store);return{blockType:m(t),defaultVariation:p(t,"block"),variations:u(t,"block")}},[t]),{replaceInnerBlocks:l}=(0,el.useDispatch)(Vr.store),s=(0,Vr.useBlockProps)();return(0,mo.jsx)("div",{...s,children:(0,mo.jsx)(Vr.__experimentalBlockVariationPicker,{icon:a?.icon?.src,label:a?.title,variations:i,instructions:(0,Vp.__)("Divide into columns. Select a layout:"),onSelect:(c=n)=>{c.attributes&&r(c.attributes),c.innerBlocks&&l(e,(0,Fp.createBlocksFromInnerBlocksTemplate)(c.innerBlocks),!0)},allowSkip:!0})})}var oge=e=>{let{clientId:t}=e,a=(0,el.useSelect)(n=>n(Vr.store).getBlocks(t).length>0,[t])?tge:rge;return(0,mo.jsx)(a,{...e})},eO=oge;var yk={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/columns",title:"Columns",category:"design",allowedBlocks:["core/column"],description:"Display content in multiple columns, with blocks added to each column.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},isStackedOnMobile:{type:"boolean",default:!0},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0,heading:!0,button:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{blockGap:{__experimentalDefault:"2em",sides:["horizontal","vertical"]},margin:["top","bottom"],padding:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},layout:{allowSwitching:!1,allowInheriting:!1,allowEditing:!1,default:{type:"flex",flexWrap:"nowrap"}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},shadow:!0},editorStyle:"wp-block-columns-editor",style:"wp-block-columns"};var _k=o(T(),1),tO=o(v(),1);function rO({attributes:e}){let{isStackedOnMobile:t,verticalAlignment:r}=e,a=w({[`are-vertically-aligned-${r}`]:r,"is-not-stacked-on-mobile":!t}),n=_k.useBlockProps.save({className:a}),i=_k.useInnerBlocksProps.save(n);return(0,tO.jsx)("div",{...i})}var Bn=o(M(),1),ui=o(P(),1),mi=o(v(),1),nge=[{name:"one-column-full",title:(0,ui.__)("100"),description:(0,ui.__)("One column"),icon:(0,mi.jsx)(Bn.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,mi.jsx)(Bn.Path,{d:"M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Z"})}),innerBlocks:[["core/column"]],scope:["block"]},{name:"two-columns-equal",title:(0,ui.__)("50 / 50"),description:(0,ui.__)("Two columns; equal split"),icon:(0,mi.jsx)(Bn.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,mi.jsx)(Bn.Path,{d:"M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10Z"})}),isDefault:!0,innerBlocks:[["core/column"],["core/column"]],scope:["block"]},{name:"two-columns-one-third-two-thirds",title:(0,ui.__)("33 / 66"),description:(0,ui.__)("Two columns; one-third, two-thirds split"),icon:(0,mi.jsx)(Bn.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,mi.jsx)(Bn.Path,{d:"M0 10a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm17 0a2 2 0 0 1 2-2h27a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H19a2 2 0 0 1-2-2V10Z"})}),innerBlocks:[["core/column",{width:"33.33%"}],["core/column",{width:"66.66%"}]],scope:["block"]},{name:"two-columns-two-thirds-one-third",title:(0,ui.__)("66 / 33"),description:(0,ui.__)("Two columns; two-thirds, one-third split"),icon:(0,mi.jsx)(Bn.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,mi.jsx)(Bn.Path,{d:"M0 10a2 2 0 0 1 2-2h27a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm33 0a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H35a2 2 0 0 1-2-2V10Z"})}),innerBlocks:[["core/column",{width:"66.66%"}],["core/column",{width:"33.33%"}]],scope:["block"]},{name:"three-columns-equal",title:(0,ui.__)("33 / 33 / 33"),description:(0,ui.__)("Three columns; equal split"),icon:(0,mi.jsx)(Bn.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,mi.jsx)(Bn.Path,{d:"M0 10a2 2 0 0 1 2-2h10.531c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H2a2 2 0 0 1-2-2V10Zm16.5 0c0-1.105.864-2 1.969-2H29.53c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H18.47c-1.105 0-1.969-.895-1.969-2V10Zm17 0c0-1.105.864-2 1.969-2H46a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H35.469c-1.105 0-1.969-.895-1.969-2V10Z"})}),innerBlocks:[["core/column"],["core/column"],["core/column"]],scope:["block"]},{name:"three-columns-wider-center",title:(0,ui.__)("25 / 50 / 25"),description:(0,ui.__)("Three columns; wide center column"),icon:(0,mi.jsx)(Bn.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,mi.jsx)(Bn.Path,{d:"M0 10a2 2 0 0 1 2-2h7.531c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H2a2 2 0 0 1-2-2V10Zm13.5 0c0-1.105.864-2 1.969-2H32.53c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H15.47c-1.105 0-1.969-.895-1.969-2V10Zm23 0c0-1.105.864-2 1.969-2H46a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2h-7.531c-1.105 0-1.969-.895-1.969-2V10Z"})}),innerBlocks:[["core/column",{width:"25%"}],["core/column",{width:"50%"}],["core/column",{width:"25%"}]],scope:["block"]}],oO=nge;var Gf=o(W(),1),ige=6,lge={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert:e=>{let t=+(100/e.length).toFixed(2),r=e.map(({name:a,attributes:n,innerBlocks:i})=>["core/column",{width:`${t}%`},[[a,{...n},i]]]);return(0,Gf.createBlock)("core/columns",{},(0,Gf.createBlocksFromInnerBlocksTemplate)(r))},isMatch:({length:e},t)=>t.length===1&&t[0].name==="core/columns"?!1:e&&e<=ige},{type:"block",blocks:["core/media-text"],priority:1,transform:(e,t)=>{let{align:r,backgroundColor:a,textColor:n,style:i,mediaAlt:l,mediaId:s,mediaPosition:c,mediaSizeSlug:u,mediaType:m,mediaUrl:p,mediaWidth:d,verticalAlignment:f}=e,h;if(m==="image"||!m){let b={id:s,alt:l,url:p,sizeSlug:u},y={href:e.href,linkClass:e.linkClass,linkDestination:e.linkDestination,linkTarget:e.linkTarget,rel:e.rel};h=["core/image",{...b,...y}]}else h=["core/video",{id:s,src:p}];let g=[["core/column",{width:`${d}%`},[h]],["core/column",{width:`${100-d}%`},t]];return c==="right"&&g.reverse(),(0,Gf.createBlock)("core/columns",{align:r,backgroundColor:a,textColor:n,style:i,verticalAlignment:f},(0,Gf.createBlocksFromInnerBlocksTemplate)(g))}}],ungroup:(e,t)=>t.flatMap(r=>r.innerBlocks)},aO=lge;var{name:nO}=yk,iO={icon:u9,variations:oO,example:{viewportWidth:782,innerBlocks:[{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,O1.__)("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"}},{name:"core/paragraph",attributes:{content:(0,O1.__)("Suspendisse commodo neque lacus, a dictum orci interdum et.")}}]},{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,O1.__)("Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.")}},{name:"core/paragraph",attributes:{content:(0,O1.__)("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},deprecated:YH,edit:eO,save:rO,transforms:aO},sge=()=>E({name:nO,metadata:yk,settings:iO});var LI={};Z(LI,{init:()=>fge,metadata:()=>xk,name:()=>CO,settings:()=>SO});var xk={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments",title:"Comments",category:"theme",description:"An advanced block that allows displaying post comments using different visual configurations.",textdomain:"default",attributes:{tagName:{type:"string",default:"div"},legacy:{type:"boolean",default:!1}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},editorStyle:"wp-block-comments-editor",usesContext:["postId","postType"]};var kk=o(T(),1),NI=o(v(),1),uge={attributes:{tagName:{type:"string",default:"div"}},apiVersion:3,supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}}},save({attributes:{tagName:e}}){let t=kk.useBlockProps.save(),{className:r}=t,n=(r?.split(" ")||[])?.filter(l=>l!=="wp-block-comments"),i={...t,className:n.join(" ")};return(0,NI.jsx)(e,{...i,children:(0,NI.jsx)(kk.InnerBlocks.Content,{})})}},lO=[uge];var Tk=o(T(),1);var sO=o(P(),1),j1=o(T(),1);var wk=o(v(),1),{HTMLElementControl:mge}=K(j1.privateApis);function cO({attributes:{tagName:e},setAttributes:t}){return(0,wk.jsx)(j1.InspectorControls,{children:(0,wk.jsx)(j1.InspectorControls,{group:"advanced",children:(0,wk.jsx)(mge,{tagName:e,onChange:r=>t({tagName:r}),options:[{label:(0,sO.__)("Default (<div>)"),value:"div"},{label:"<section>",value:"section"},{label:"<aside>",value:"aside"}]})})})}var om=o(T(),1),DI=o(P(),1),bO=o(M(),1);var dO=o(T(),1),Qr=o(P(),1),fO=o(V(),1),hO=o(Q(),1),gO=o(U(),1);var rl=o(P(),1),rm=o(T(),1),uO=o(M(),1),mO=o(me(),1),Ck=o(Q(),1),EI=o(V(),1),Ka=o(v(),1),pO=()=>{let e=(0,mO.useInstanceId)(pO);return(0,Ka.jsxs)("div",{className:"comment-respond",children:[(0,Ka.jsx)("h3",{className:"comment-reply-title",children:(0,rl.__)("Leave a Reply")}),(0,Ka.jsxs)("form",{noValidate:!0,className:"comment-form",onSubmit:t=>t.preventDefault(),children:[(0,Ka.jsxs)("p",{children:[(0,Ka.jsx)("label",{htmlFor:`comment-${e}`,children:(0,rl.__)("Comment")}),(0,Ka.jsx)("textarea",{id:`comment-${e}`,name:"comment",cols:"45",rows:"8",readOnly:!0})]}),(0,Ka.jsx)("p",{className:"form-submit wp-block-button",children:(0,Ka.jsx)("input",{name:"submit",type:"submit",className:w("wp-block-button__link",(0,rm.__experimentalGetElementClassName)("button")),label:(0,rl.__)("Post Comment"),value:(0,rl.__)("Post Comment"),"aria-disabled":"true"})})]})]})},pge=({postId:e,postType:t})=>{let[r,a]=(0,Ck.useEntityProp)("postType",t,"comment_status",e),n=t===void 0||e===void 0,i=(0,EI.useSelect)(s=>s(rm.store).getSettings().__experimentalDiscussionSettings?.defaultCommentStatus,[]),l=(0,EI.useSelect)(s=>t?!!s(Ck.store).getPostType(t)?.supports.comments:!1);if(!n&&r!=="open")if(r==="closed"){let s=[(0,Ka.jsx)(uO.Button,{__next40pxDefaultSize:!0,onClick:()=>a("open"),variant:"primary",children:(0,rl._x)("Enable comments","action that affects the current post")},"enableComments")];return(0,Ka.jsx)(rm.Warning,{actions:s,children:(0,rl.__)("Post Comments Form block: Comments are not enabled for this item.")})}else if(l){if(i!=="open")return(0,Ka.jsx)(rm.Warning,{children:(0,rl.__)("Post Comments Form block: Comments are not enabled.")})}else return(0,Ka.jsx)(rm.Warning,{children:(0,rl.sprintf)((0,rl.__)("Post Comments Form block: Comments are not enabled for this post type (%s)."),t)});return(0,Ka.jsx)(pO,{})},Sk=pge;var et=o(v(),1);function vO({postType:e,postId:t}){let[r]=(0,hO.useEntityProp)("postType",e,"title",t);r=r||(0,Qr.__)("Post Title");let a=(0,fO.useSelect)(n=>n(dO.store).getSettings().__experimentalDiscussionSettings?.avatarURL,[]);return(0,et.jsxs)("div",{className:"wp-block-comments__legacy-placeholder",inert:"true",children:[(0,et.jsx)("h3",{children:(0,Qr.sprintf)((0,Qr.__)("One response to %s"),r)}),(0,et.jsxs)("div",{className:"navigation",children:[(0,et.jsx)("div",{className:"alignleft",children:(0,et.jsxs)("a",{href:"#top",children:["\xAB ",(0,Qr.__)("Older Comments")]})}),(0,et.jsx)("div",{className:"alignright",children:(0,et.jsxs)("a",{href:"#top",children:[(0,Qr.__)("Newer Comments")," \xBB"]})})]}),(0,et.jsx)("ol",{className:"commentlist",children:(0,et.jsx)("li",{className:"comment even thread-even depth-1",children:(0,et.jsxs)("article",{className:"comment-body",children:[(0,et.jsxs)("footer",{className:"comment-meta",children:[(0,et.jsxs)("div",{className:"comment-author vcard",children:[(0,et.jsx)("img",{alt:(0,Qr.__)("Commenter Avatar"),src:a,className:"avatar avatar-32 photo",height:"32",width:"32",loading:"lazy"}),(0,et.jsx)("b",{className:"fn",children:(0,et.jsx)("a",{href:"#top",className:"url",children:(0,Qr.__)("A WordPress Commenter")})})," ",(0,et.jsxs)("span",{className:"says",children:[(0,Qr.__)("says"),":"]})]}),(0,et.jsxs)("div",{className:"comment-metadata",children:[(0,et.jsx)("a",{href:"#top",children:(0,et.jsx)("time",{dateTime:"2000-01-01T00:00:00+00:00",children:(0,Qr.__)("January 1, 2000 at 00:00 am")})})," ",(0,et.jsx)("span",{className:"edit-link",children:(0,et.jsx)("a",{className:"comment-edit-link",href:"#top",children:(0,Qr.__)("Edit")})})]})]}),(0,et.jsx)("div",{className:"comment-content",children:(0,et.jsxs)("p",{children:[(0,Qr.__)("Hi, this is a comment."),(0,et.jsx)("br",{}),(0,Qr.__)("To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard."),(0,et.jsx)("br",{}),(0,gO.createInterpolateElement)((0,Qr.__)("Commenter avatars come from <a>Gravatar</a>."),{a:(0,et.jsx)("a",{href:"https://gravatar.com/"})})]})}),(0,et.jsx)("div",{className:"reply",children:(0,et.jsx)("a",{className:"comment-reply-link",href:"#top","aria-label":(0,Qr.__)("Reply to A WordPress Commenter"),children:(0,Qr._x)("Reply","verb")})})]})})}),(0,et.jsxs)("div",{className:"navigation",children:[(0,et.jsx)("div",{className:"alignleft",children:(0,et.jsxs)("a",{href:"#top",children:["\xAB ",(0,Qr.__)("Older Comments")]})}),(0,et.jsx)("div",{className:"alignright",children:(0,et.jsxs)("a",{href:"#top",children:[(0,Qr.__)("Newer Comments")," \xBB"]})})]}),(0,et.jsx)(Sk,{postId:t,postType:e})]})}var Ml=o(v(),1);function yO({attributes:e,setAttributes:t,context:{postType:r,postId:a}}){let{textAlign:n}=e,i=[(0,Ml.jsx)(bO.Button,{__next40pxDefaultSize:!0,onClick:()=>{t({legacy:!1})},variant:"primary",children:(0,DI.__)("Switch to editable mode")},"convert")],l=(0,om.useBlockProps)({className:w({[`has-text-align-${n}`]:n})});return(0,Ml.jsxs)(Ml.Fragment,{children:[(0,Ml.jsx)(om.BlockControls,{group:"block",children:(0,Ml.jsx)(om.AlignmentControl,{value:n,onChange:s=>{t({textAlign:s})}})}),(0,Ml.jsxs)("div",{...l,children:[(0,Ml.jsx)(om.Warning,{actions:i,children:(0,DI.__)("Comments block: You\u2019re currently using the legacy version of the block. The following is just a placeholder - the final styling will likely look different. For a better representation and more customization options, switch the block to its editable mode.")}),(0,Ml.jsx)(vO,{postId:a,postType:r})]})]})}var dge=[["core/comments-title"],["core/comment-template",{},[["core/columns",{},[["core/column",{width:"40px"},[["core/avatar",{size:40,style:{border:{radius:"20px"}}}]]],["core/column",{},[["core/comment-author-name",{fontSize:"small"}],["core/group",{layout:{type:"flex"},style:{spacing:{margin:{top:"0px",bottom:"0px"}}}},[["core/comment-date",{fontSize:"small"}],["core/comment-edit-link",{fontSize:"small"}]]],["core/comment-content"],["core/comment-reply-link",{fontSize:"small"}]]]]]]],["core/comments-pagination"],["core/post-comments-form"]],_O=dge;var am=o(v(),1);function xO(e){let{attributes:t,setAttributes:r,clientId:a}=e,{tagName:n,legacy:i}=t,l=(0,Tk.useBlockProps)(),s=(0,Tk.useInnerBlocksProps)(l,{template:_O});return i?(0,am.jsx)(yO,{...e}):(0,am.jsxs)(am.Fragment,{children:[(0,am.jsx)(cO,{attributes:t,setAttributes:r,clientId:a}),(0,am.jsx)(n,{...s})]})}var Pk=o(T(),1),kO=o(v(),1);function wO({attributes:{tagName:e,legacy:t}}){let r=Pk.useBlockProps.save(),a=Pk.useInnerBlocksProps.save(r);return t?null:(0,kO.jsx)(e,{...a})}var{name:CO}=xk,SO={icon:pP,example:{},edit:xO,save:wO,deprecated:lO},fge=()=>E({name:CO,metadata:xk,settings:SO});var AI={};Z(AI,{init:()=>gge,metadata:()=>Bk,name:()=>BO,settings:()=>IO});var Bk={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:"fse",name:"core/comment-author-avatar",title:"Comment Author Avatar (deprecated)",category:"theme",ancestor:["core/comment-template"],description:"This block is deprecated. Please use the Avatar block instead.",textdomain:"default",attributes:{width:{type:"number",default:96},height:{type:"number",default:96}},usesContext:["commentId"],supports:{html:!1,inserter:!1,__experimentalBorder:{radius:!0,width:!0,color:!0,style:!0},color:{background:!0,text:!1,__experimentalDefaultControls:{background:!0}},spacing:{__experimentalSkipSerialization:!0,margin:!0,padding:!0},interactivity:{clientNavigation:!0}}};var nm=o(T(),1),Wf=o(M(),1),MI=o(Q(),1),TO=o(V(),1),Hp=o(P(),1),Al=o(v(),1);function PO({attributes:e,context:{commentId:t},setAttributes:r,isSelected:a}){let{height:n,width:i}=e,[l]=(0,MI.useEntityProp)("root","comment","author_avatar_urls",t),[s]=(0,MI.useEntityProp)("root","comment","author_name",t),c=l?Object.values(l):null,u=l?Object.keys(l):null,m=u?u[0]:24,p=u?u[u.length-1]:96,d=(0,nm.useBlockProps)(),f=(0,nm.__experimentalGetSpacingClassesAndStyles)(e),h=Math.floor(p*2.5),g=(0,TO.useSelect)(k=>{let{__experimentalDiscussionSettings:_}=k(nm.store).getSettings();return _?.avatarURL},[]),b=(0,Al.jsx)(nm.InspectorControls,{children:(0,Al.jsx)(Wf.PanelBody,{title:(0,Hp.__)("Settings"),children:(0,Al.jsx)(Wf.RangeControl,{__next40pxDefaultSize:!0,label:(0,Hp.__)("Image size"),onChange:k=>r({width:k,height:k}),min:m,max:h,initialPosition:i,value:i})})}),y=(0,Al.jsx)(Wf.ResizableBox,{size:{width:i,height:n},showHandle:a,onResizeStop:(k,_,x,S)=>{r({height:parseInt(n+S.height,10),width:parseInt(i+S.width,10)})},lockAspectRatio:!0,enable:{top:!1,right:!(0,Hp.isRTL)(),bottom:!0,left:(0,Hp.isRTL)()},minWidth:m,maxWidth:h,children:(0,Al.jsx)("img",{src:c?c[c.length-1]:g,alt:`${s} ${(0,Hp.__)("Avatar")}`,...d})});return(0,Al.jsxs)(Al.Fragment,{children:[b,(0,Al.jsx)("div",{...f,children:y})]})}var{name:BO}=Bk,IO={icon:I0,edit:PO},gge=()=>E({name:BO,metadata:Bk,settings:IO});var RI={};Z(RI,{init:()=>_ge,metadata:()=>Ik,name:()=>MO,settings:()=>AO});var Ik={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-author-name",title:"Comment Author Name",category:"theme",ancestor:["core/comment-template"],description:"Displays the name of the author of the comment.",textdomain:"default",attributes:{isLink:{type:"boolean",default:!0},linkTarget:{type:"string",default:"_self"}},usesContext:["commentId"],supports:{anchor:!0,html:!1,spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},typography:{fontSize:!0,lineHeight:!0,textAlign:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},style:"wp-block-comment-author-name"};var Zc=o(P(),1),NO=o(V(),1),Nk=o(T(),1),EO=o(Q(),1),im=o(M(),1);var pi=o(v(),1);function DO(e){let{attributes:{isLink:t,linkTarget:r},context:{commentId:a},setAttributes:n}=e;Kr(e);let i=q(),l=(0,Nk.useBlockProps)(),s=(0,NO.useSelect)(m=>{let{getEntityRecord:p}=m(EO.store),d=p("root","comment",a),f=d?.author_name;return d&&!f?p("root","user",d.author)?.name??(0,Zc.__)("Anonymous"):f??""},[a]),c=(0,pi.jsx)(Nk.InspectorControls,{children:(0,pi.jsxs)(im.__experimentalToolsPanel,{label:(0,Zc.__)("Settings"),resetAll:()=>{n({isLink:!0,linkTarget:"_self"})},dropdownMenuProps:i,children:[(0,pi.jsx)(im.__experimentalToolsPanelItem,{label:(0,Zc.__)("Link to authors URL"),isShownByDefault:!0,hasValue:()=>!t,onDeselect:()=>n({isLink:!0}),children:(0,pi.jsx)(im.ToggleControl,{label:(0,Zc.__)("Link to authors URL"),onChange:()=>n({isLink:!t}),checked:t})}),t&&(0,pi.jsx)(im.__experimentalToolsPanelItem,{label:(0,Zc.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>r!=="_self",onDeselect:()=>n({linkTarget:"_self"}),children:(0,pi.jsx)(im.ToggleControl,{label:(0,Zc.__)("Open in new tab"),onChange:m=>n({linkTarget:m?"_blank":"_self"}),checked:r==="_blank"})})]})});return(!a||!s)&&(s=(0,Zc._x)("Comment Author","block title")),(0,pi.jsxs)(pi.Fragment,{children:[c,(0,pi.jsx)("div",{...l,children:t?(0,pi.jsx)("a",{href:"#comment-author-pseudo-link",onClick:m=>m.preventDefault(),children:s}):s})]})}var bge={attributes:{isLink:{type:"boolean",default:!0},linkTarget:{type:"string",default:"_self"},textAlign:{type:"string"}},usesContext:["commentId"],supports:{html:!1,spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0}},save(){return null},migrate:We,isEligible(e){return!!e.textAlign||!!e.className?.match(/\bhas-text-align-(left|center|right)\b/)}},yge={attributes:{isLink:{type:"boolean",default:!1},linkTarget:{type:"string",default:"_self"}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save(){return null},migrate:Ot,isEligible({style:e}){return e?.typography?.fontFamily}},LO=[bge,yge];var{name:MO}=Ik,AO={icon:p9,edit:DO,deprecated:LO,example:{}},_ge=()=>E({name:MO,metadata:Ik,settings:AO});var zI={};Z(zI,{init:()=>wge,metadata:()=>Ek,name:()=>UO,settings:()=>GO});var Ek={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-content",title:"Comment Content",category:"theme",ancestor:["core/comment-template"],description:"Displays the contents of a comment.",textdomain:"default",usesContext:["commentId"],supports:{anchor:!0,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,textAlign:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}},spacing:{padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},html:!1},style:"wp-block-comment-content"};var RO=o(P(),1),zO=o(U(),1),VO=o(M(),1),FO=o(Q(),1),HO=o(T(),1);var Rl=o(v(),1);function OO(e){let{context:{commentId:t}}=e;Kr(e);let r=(0,HO.useBlockProps)(),[a]=(0,FO.useEntityProp)("root","comment","content",t);return!t||!a?(0,Rl.jsx)(Rl.Fragment,{children:(0,Rl.jsx)("div",{...r,children:(0,Rl.jsx)("p",{children:(0,RO._x)("Comment Content","block title")})})}):(0,Rl.jsx)(Rl.Fragment,{children:(0,Rl.jsx)("div",{...r,children:(0,Rl.jsx)(VO.Disabled,{children:(0,Rl.jsx)(zO.RawHTML,{children:a.rendered},"html")})})})}var kge={attributes:{textAlign:{type:"string"}},usesContext:["commentId"],supports:{anchor:!0,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},spacing:{padding:["horizontal","vertical"]},html:!1},save(){return null},migrate:We,isEligible(e){return!!e.textAlign||!!e.className?.match(/\bhas-text-align-(left|center|right)\b/)}},jO=[kge];var{name:UO}=Ek,GO={icon:f9,edit:OO,deprecated:jO,example:{}},wge=()=>E({name:UO,metadata:Ek,settings:GO});var FI={};Z(FI,{init:()=>Tge,metadata:()=>Dk,name:()=>ZO,settings:()=>KO});var Dk={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-date",title:"Comment Date",category:"theme",ancestor:["core/comment-template"],description:"Displays the date on which the comment was posted.",textdomain:"default",attributes:{format:{type:"string"},isLink:{type:"boolean",default:!0}},usesContext:["commentId"],supports:{anchor:!0,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,textAlign:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},style:"wp-block-comment-date"};var VI=o(Q(),1),jp=o(Lk(),1),$f=o(T(),1),Up=o(M(),1),Op=o(P(),1);var Qa=o(v(),1);function $O({attributes:{format:e,isLink:t},context:{commentId:r},setAttributes:a}){let n=(0,$f.useBlockProps)(),i=q(),[l]=(0,VI.useEntityProp)("root","comment","date",r),[s=(0,jp.getSettings)().formats.date]=(0,VI.useEntityProp)("root","site","date_format"),c=(0,Qa.jsx)($f.InspectorControls,{children:(0,Qa.jsxs)(Up.__experimentalToolsPanel,{label:(0,Op.__)("Settings"),resetAll:()=>{a({format:void 0,isLink:!0})},dropdownMenuProps:i,children:[(0,Qa.jsx)(Up.__experimentalToolsPanelItem,{label:(0,Op.__)("Date format"),hasValue:()=>e!==void 0,onDeselect:()=>a({format:void 0}),isShownByDefault:!0,children:(0,Qa.jsx)($f.__experimentalDateFormatPicker,{format:e,defaultFormat:s,onChange:m=>a({format:m})})}),(0,Qa.jsx)(Up.__experimentalToolsPanelItem,{label:(0,Op.__)("Link to comment"),hasValue:()=>!t,onDeselect:()=>a({isLink:!0}),isShownByDefault:!0,children:(0,Qa.jsx)(Up.ToggleControl,{label:(0,Op.__)("Link to comment"),onChange:()=>a({isLink:!t}),checked:t})})]})});(!r||!l)&&(l=(0,Op._x)("Comment Date","block title"));let u=l instanceof Date?(0,Qa.jsx)("time",{dateTime:(0,jp.dateI18n)("c",l),children:e==="human-diff"?(0,jp.humanTimeDiff)(l):(0,jp.dateI18n)(e||s,l)}):(0,Qa.jsx)("time",{children:l});return t&&(u=(0,Qa.jsx)("a",{href:"#comment-date-pseudo-link",onClick:m=>m.preventDefault(),children:u})),(0,Qa.jsxs)(Qa.Fragment,{children:[c,(0,Qa.jsx)("div",{...n,children:u})]})}var Sge={attributes:{format:{type:"string"},isLink:{type:"boolean",default:!1}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save(){return null},migrate:Ot,isEligible({style:e}){return e?.typography?.fontFamily}},qO=[Sge];var{name:ZO}=Dk,KO={icon:e1,edit:$O,deprecated:qO,example:{}},Tge=()=>E({name:ZO,metadata:Dk,settings:KO});var HI={};Z(HI,{init:()=>Ige,metadata:()=>Mk,name:()=>XO,settings:()=>JO});var Mk={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-edit-link",title:"Comment Edit Link",category:"theme",ancestor:["core/comment-template"],description:"Displays a link to edit the comment in the WordPress Dashboard. This link is only visible to users with the edit comment capability.",textdomain:"default",usesContext:["commentId"],attributes:{linkTarget:{type:"string",default:"_self"}},supports:{anchor:!0,html:!1,color:{link:!0,gradients:!0,text:!1,__experimentalDefaultControls:{background:!0,link:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,textAlign:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0}},style:"wp-block-comment-edit-link"};var Ak=o(T(),1),qf=o(M(),1),U1=o(P(),1);var zl=o(v(),1);function QO(e){let{attributes:t,setAttributes:r}=e,{linkTarget:a}=t;Kr(e);let n=(0,Ak.useBlockProps)(),i=q(),l=(0,zl.jsx)(Ak.InspectorControls,{children:(0,zl.jsx)(qf.__experimentalToolsPanel,{label:(0,U1.__)("Settings"),resetAll:()=>{r({linkTarget:"_self"})},dropdownMenuProps:i,children:(0,zl.jsx)(qf.__experimentalToolsPanelItem,{label:(0,U1.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>a==="_blank",onDeselect:()=>r({linkTarget:"_self"}),children:(0,zl.jsx)(qf.ToggleControl,{label:(0,U1.__)("Open in new tab"),onChange:s=>r({linkTarget:s?"_blank":"_self"}),checked:a==="_blank"})})})});return(0,zl.jsxs)(zl.Fragment,{children:[l,(0,zl.jsx)("div",{...n,children:(0,zl.jsx)("a",{href:"#edit-comment-pseudo-link",onClick:s=>s.preventDefault(),children:(0,U1.__)("Edit")})})]})}var Bge={attributes:{linkTarget:{type:"string",default:"_self"},textAlign:{type:"string"}},usesContext:["commentId"],supports:{anchor:!0,html:!1,color:{link:!0,gradients:!0,text:!1},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0}},save(){return null},migrate:We,isEligible(e){return!!e.textAlign||!!e.className?.match(/\bhas-text-align-(left|center|right)\b/)}},YO=[Bge];var{name:XO}=Mk,JO={icon:g9,edit:QO,deprecated:YO,example:{}},Ige=()=>E({name:XO,metadata:Mk,settings:JO});var OI={};Z(OI,{init:()=>Lge,metadata:()=>Rk,name:()=>aj,settings:()=>nj});var Rk={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-reply-link",title:"Comment Reply Link",category:"theme",ancestor:["core/comment-template"],description:"Displays a link to reply to a comment.",textdomain:"default",usesContext:["commentId"],supports:{anchor:!0,color:{gradients:!0,link:!0,text:!1,__experimentalDefaultControls:{background:!0,link:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,textAlign:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},html:!1},style:"wp-block-comment-reply-link"};var ej=o(P(),1),tj=o(T(),1);var Zf=o(v(),1);function Ege(e){Kr(e);let t=(0,tj.useBlockProps)();return(0,Zf.jsx)(Zf.Fragment,{children:(0,Zf.jsx)("div",{...t,children:(0,Zf.jsx)("a",{href:"#comment-reply-pseudo-link",onClick:r=>r.preventDefault(),children:(0,ej._x)("Reply","verb")})})})}var rj=Ege;var Dge={attributes:{textAlign:{type:"string"}},usesContext:["commentId"],supports:{anchor:!0,color:{gradients:!0,link:!0,text:!1},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},html:!1},save(){return null},migrate:We,isEligible(e){return!!e.textAlign||!!e.className?.match(/\bhas-text-align-(left|center|right)\b/)}},oj=[Dge];var{name:aj}=Rk,nj={edit:rj,icon:b9,deprecated:oj,example:{}},Lge=()=>E({name:aj,metadata:Rk,settings:nj});var UI={};Z(UI,{init:()=>Oge,metadata:()=>zk,name:()=>kj,settings:()=>wj});var zk={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comment-template",title:"Comment Template",category:"design",parent:["core/comments"],description:"Contains the block elements used to display a comment, like the title, date, author, avatar and more.",textdomain:"default",usesContext:["postId"],supports:{anchor:!0,align:!0,html:!1,reusable:!1,spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},style:"wp-block-comment-template"};var Vk=o(U(),1),jI=o(V(),1),fj=o(P(),1),Vl=o(T(),1),hj=o(M(),1),gj=o(Q(),1);var Gp=o(U(),1),sj=o(V(),1),cj=o(T(),1),uj=o(mr(),1),mj=o(G1(),1),lj=100,pj=({postId:e})=>{let t={status:"approve",order:"asc",context:"embed",parent:0,_embed:"children"},{pageComments:r,commentsPerPage:a,defaultCommentsPage:n}=(0,sj.useSelect)(s=>{let{getSettings:c}=s(cj.store),{__experimentalDiscussionSettings:u}=c();return u??{}},[]),i=r?Math.min(a,lj):lj,l=Age({defaultPage:n,postId:e,perPage:i,queryArgs:t});return(0,Gp.useMemo)(()=>l?{...t,post:e,per_page:i,page:l}:null,[e,i,l])},Age=({defaultPage:e,postId:t,perPage:r,queryArgs:a})=>{let[n,i]=(0,Gp.useState)({}),l=`${t}_${r}`,s=n[l]||0;return(0,Gp.useEffect)(()=>{s||e!=="newest"||(0,mj.default)({path:(0,uj.addQueryArgs)("/wp/v2/comments",{...a,post:t,per_page:r,_fields:"id"}),method:"HEAD",parse:!1}).then(c=>{let u=parseInt(c.headers.get("X-WP-TotalPages"));i({...n,[l]:u<=1?1:u})}).catch(()=>{i({...n,[l]:1})})},[e,t,r,i]),e==="newest"?s:1},dj=e=>(0,Gp.useMemo)(()=>e?.map(({id:r,_embedded:a})=>{let[n]=a?.children||[[]];return{commentId:r,children:n.map(i=>({commentId:i.id}))}}),[e]);var di=o(v(),1),Rge=[["core/avatar"],["core/comment-author-name"],["core/comment-date"],["core/comment-content"],["core/comment-reply-link"],["core/comment-edit-link"]],zge=({perPage:e,pageComments:t,threadComments:r,threadCommentsDepth:a})=>{let n=r?Math.min(a,3):1,i=s=>{if(s<n){let c=s+1;return[{commentId:-(s+3),children:i(c)}]}return[]},l=[{commentId:-1,children:i(1)}];return(!t||e>=2)&&n<3&&l.push({commentId:-2,children:[]}),(!t||e>=3)&&n<2&&l.push({commentId:-3,children:[]}),l};function Vge({comment:e,activeCommentId:t,setActiveCommentId:r,firstCommentId:a,blocks:n}){let{children:i,...l}=(0,Vl.useInnerBlocksProps)({},{template:Rge});return(0,di.jsxs)("li",{...l,children:[e.commentId===(t||a)?i:null,(0,di.jsx)(Hge,{blocks:n,commentId:e.commentId,setActiveCommentId:r,isHidden:e.commentId===(t||a)}),e?.children?.length>0?(0,di.jsx)(vj,{comments:e.children,activeCommentId:t,setActiveCommentId:r,blocks:n,firstCommentId:a}):null]})}var Fge=({blocks:e,commentId:t,setActiveCommentId:r,isHidden:a})=>{let n=(0,Vl.__experimentalUseBlockPreview)({blocks:e}),i=()=>{r(t)};return(0,di.jsx)("div",{...n,tabIndex:0,role:"button",style:{display:a?"none":void 0},onClick:i,onKeyPress:i})},Hge=(0,Vk.memo)(Fge),vj=({comments:e,blockProps:t,activeCommentId:r,setActiveCommentId:a,blocks:n,firstCommentId:i})=>(0,di.jsx)("ol",{...t,children:e&&e.map(({commentId:l,...s},c)=>(0,di.jsx)(Vl.BlockContextProvider,{value:{commentId:l<0?null:l},children:(0,di.jsx)(Vge,{comment:{commentId:l,...s},activeCommentId:r,setActiveCommentId:a,blocks:n,firstCommentId:i})},s.commentId||c))});function bj({clientId:e,context:{postId:t}}){let r=(0,Vl.useBlockProps)(),[a,n]=(0,Vk.useState)(),{commentOrder:i,threadCommentsDepth:l,threadComments:s,commentsPerPage:c,pageComments:u}=(0,jI.useSelect)(h=>{let{getSettings:g}=h(Vl.store);return g().__experimentalDiscussionSettings??{}},[]),m=pj({postId:t}),{topLevelComments:p,blocks:d}=(0,jI.useSelect)(h=>{let{getEntityRecords:g}=h(gj.store),{getBlocks:b}=h(Vl.store);return{topLevelComments:m?g("root","comment",m):null,blocks:b(e)}},[e,m]),f=dj(i==="desc"&&p?[...p].reverse():p);return p?(t||(f=zge({perPage:c,pageComments:u,threadComments:s,threadCommentsDepth:l})),f.length?(0,di.jsx)(vj,{comments:f,blockProps:r,blocks:d,activeCommentId:a,setActiveCommentId:n,firstCommentId:f[0]?.commentId}):(0,di.jsx)("p",{...r,children:(0,fj.__)("No results found.")})):(0,di.jsx)("p",{...r,children:(0,di.jsx)(hj.Spinner,{})})}var yj=o(T(),1),_j=o(v(),1);function xj(){return(0,_j.jsx)(yj.InnerBlocks.Content,{})}var{name:kj}=zk,wj={icon:Cp,edit:bj,save:xj},Oge=()=>E({name:kj,metadata:zk,settings:wj});var WI={};Z(WI,{init:()=>Gge,metadata:()=>Fk,name:()=>Tj,settings:()=>Pj});var Sj=o(P(),1);var Fk={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-pagination-previous",title:"Comments Previous Page",category:"theme",parent:["core/comments-pagination"],description:"Displays the previous comment's page link.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["postId","comments/paginationArrow"],supports:{anchor:!0,reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}};var GI=o(P(),1),Hk=o(T(),1),W1=o(v(),1),Uge={none:"",arrow:"\u2190",chevron:"\xAB"};function Cj({attributes:{label:e},setAttributes:t,context:{"comments/paginationArrow":r}}){let a=Uge[r];return(0,W1.jsxs)("a",{href:"#comments-pagination-previous-pseudo-link",onClick:n=>n.preventDefault(),...(0,Hk.useBlockProps)(),children:[a&&(0,W1.jsx)("span",{className:`wp-block-comments-pagination-previous-arrow is-arrow-${r}`,children:a}),(0,W1.jsx)(Hk.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,GI.__)("Older comments page link"),placeholder:(0,GI.__)("Older Comments"),value:e,onChange:n=>t({label:n})})]})}var{name:Tj}=Fk,Pj={icon:a1,edit:Cj,example:{attributes:{label:(0,Sj.__)("Older Comments")}}},Gge=()=>E({name:Tj,metadata:Fk,settings:Pj});var qI={};Z(qI,{init:()=>qge,metadata:()=>Ok,name:()=>Lj,settings:()=>Mj});var Ok={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-pagination",title:"Comments Pagination",category:"theme",parent:["core/comments"],allowedBlocks:["core/comments-pagination-previous","core/comments-pagination-numbers","core/comments-pagination-next"],description:"Displays a paginated navigation to next/previous set of comments, when applicable.",textdomain:"default",attributes:{paginationArrow:{type:"string",default:"none"}},example:{attributes:{paginationArrow:"none"}},providesContext:{"comments/paginationArrow":"paginationArrow"},supports:{anchor:!0,align:!0,reusable:!1,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},layout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-comments-pagination-editor",style:"wp-block-comments-pagination"};var jk=o(P(),1),Hl=o(T(),1),$I=o(V(),1),Uk=o(M(),1);var Wp=o(P(),1),Kf=o(M(),1),Qf=o(v(),1);function Bj({value:e,onChange:t}){return(0,Qf.jsxs)(Kf.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Wp.__)("Arrow"),value:e,onChange:t,help:(0,Wp.__)("A decorative arrow appended to the next and previous comments link."),isBlock:!0,children:[(0,Qf.jsx)(Kf.__experimentalToggleGroupControlOption,{value:"none",label:(0,Wp._x)("None","Arrow option for Comments Pagination Next/Previous blocks")}),(0,Qf.jsx)(Kf.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,Wp._x)("Arrow","Arrow option for Comments Pagination Next/Previous blocks")}),(0,Qf.jsx)(Kf.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,Wp._x)("Chevron","Arrow option for Comments Pagination Next/Previous blocks")})]})}var Fl=o(v(),1),$ge=[["core/comments-pagination-previous"],["core/comments-pagination-numbers"],["core/comments-pagination-next"]];function Ij({attributes:{paginationArrow:e},setAttributes:t,clientId:r}){let a=(0,$I.useSelect)(c=>{let{getBlocks:u}=c(Hl.store);return u(r)?.find(p=>["core/comments-pagination-previous","core/comments-pagination-next"].includes(p.name))},[]),n=(0,Hl.useBlockProps)(),i=q(),l=(0,Hl.useInnerBlocksProps)(n,{template:$ge});return(0,$I.useSelect)(c=>{let{getSettings:u}=c(Hl.store),{__experimentalDiscussionSettings:m}=u();return m?.pageComments},[])?(0,Fl.jsxs)(Fl.Fragment,{children:[a&&(0,Fl.jsx)(Hl.InspectorControls,{children:(0,Fl.jsx)(Uk.__experimentalToolsPanel,{label:(0,jk.__)("Settings"),dropdownMenuProps:i,resetAll:()=>t({paginationArrow:"none"}),children:(0,Fl.jsx)(Uk.__experimentalToolsPanelItem,{label:(0,jk.__)("Arrow"),hasValue:()=>e!=="none",onDeselect:()=>t({paginationArrow:"none"}),isShownByDefault:!0,children:(0,Fl.jsx)(Bj,{value:e,onChange:c=>{t({paginationArrow:c})}})})})}),(0,Fl.jsx)("div",{...l})]}):(0,Fl.jsx)(Hl.Warning,{children:(0,jk.__)("Comments Pagination block: paging comments is disabled in the Discussion Settings")})}var Nj=o(T(),1),Ej=o(v(),1);function Dj(){return(0,Ej.jsx)(Nj.InnerBlocks.Content,{})}var{name:Lj}=Ok,Mj={icon:n1,edit:Ij,save:Dj},qge=()=>E({name:Lj,metadata:Ok,settings:Mj});var KI={};Z(KI,{init:()=>Qge,metadata:()=>Gk,name:()=>zj,settings:()=>Vj});var Rj=o(P(),1);var Gk={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-pagination-next",title:"Comments Next Page",category:"theme",parent:["core/comments-pagination"],description:"Displays the next comment's page link.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["postId","comments/paginationArrow"],supports:{anchor:!0,reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}};var ZI=o(P(),1),Wk=o(T(),1),$1=o(v(),1),Kge={none:"",arrow:"\u2192",chevron:"\xBB"};function Aj({attributes:{label:e},setAttributes:t,context:{"comments/paginationArrow":r}}){let a=Kge[r];return(0,$1.jsxs)("a",{href:"#comments-pagination-next-pseudo-link",onClick:n=>n.preventDefault(),...(0,Wk.useBlockProps)(),children:[(0,$1.jsx)(Wk.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,ZI.__)("Newer comments page link"),placeholder:(0,ZI.__)("Newer Comments"),value:e,onChange:n=>t({label:n})}),a&&(0,$1.jsx)("span",{className:`wp-block-comments-pagination-next-arrow is-arrow-${r}`,children:a})]})}var{name:zj}=Gk,Vj={icon:r1,edit:Aj,example:{attributes:{label:(0,Rj.__)("Newer Comments")}}},Qge=()=>E({name:zj,metadata:Gk,settings:Vj});var QI={};Z(QI,{init:()=>Xge,metadata:()=>$k,name:()=>Oj,settings:()=>jj});var $k={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-pagination-numbers",title:"Comments Page Numbers",category:"theme",parent:["core/comments-pagination"],description:"Displays a list of page numbers for comments pagination.",textdomain:"default",usesContext:["postId"],supports:{anchor:!0,reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{padding:!0}}}};var Fj=o(T(),1),ol=o(v(),1),$p=({content:e,tag:t="a",extraClass:r=""})=>t==="a"?(0,ol.jsx)(t,{className:`page-numbers ${r}`,href:"#comments-pagination-numbers-pseudo-link",onClick:a=>a.preventDefault(),children:e}):(0,ol.jsx)(t,{className:`page-numbers ${r}`,children:e});function Hj(){return(0,ol.jsxs)("div",{...(0,Fj.useBlockProps)(),children:[(0,ol.jsx)($p,{content:"1"}),(0,ol.jsx)($p,{content:"2"}),(0,ol.jsx)($p,{content:"3",tag:"span",extraClass:"current"}),(0,ol.jsx)($p,{content:"4"}),(0,ol.jsx)($p,{content:"5"}),(0,ol.jsx)($p,{content:"...",tag:"span",extraClass:"dots"}),(0,ol.jsx)($p,{content:"8"})]})}var{name:Oj}=$k,jj={icon:o1,edit:Hj,example:{}},Xge=()=>E({name:Oj,metadata:$k,settings:jj});var YI={};Z(YI,{init:()=>r0e,metadata:()=>qk,name:()=>Kj,settings:()=>Qj});var qk={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/comments-title",title:"Comments Title",category:"theme",ancestor:["core/comments"],description:"Displays a title with the number of comments.",textdomain:"default",usesContext:["postId","postType"],attributes:{showPostTitle:{type:"boolean",default:!0},showCommentsCount:{type:"boolean",default:!0},level:{type:"number",default:2},levelOptions:{type:"array"}},supports:{anchor:!0,align:!0,html:!1,__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,textAlign:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0}},interactivity:{clientNavigation:!0}}};var Rs=o(T(),1),Br=o(P(),1),Uj=o(Q(),1),lm=o(M(),1),Zk=o(U(),1),Gj=o(V(),1),Wj=o(G1(),1),$j=o(mr(),1);var In=o(v(),1);function qj(e){Kr(e);let{attributes:t,setAttributes:r,context:a}=e,{showPostTitle:n,showCommentsCount:i,level:l=2,levelOptions:s}=t,{postId:c,postType:u}=a,m="h"+l,[p,d]=(0,Zk.useState)(),[f]=(0,Uj.useEntityProp)("postType",u,"title",c),h=typeof c>"u",g=(0,Rs.useBlockProps)(),{threadCommentsDepth:b,threadComments:y,commentsPerPage:k,pageComments:_}=(0,Gj.useSelect)(D=>{let{getSettings:A}=D(Rs.store);return A().__experimentalDiscussionSettings??{}},[]),x=q();(0,Zk.useEffect)(()=>{if(h){let A=y?Math.min(b,3)-1:0,H=_?k:3,F=parseInt(A)+parseInt(H);d(Math.min(F,3));return}let D=c;(0,Wj.default)({path:(0,$j.addQueryArgs)("/wp/v2/comments",{post:c,_fields:"id"}),method:"HEAD",parse:!1}).then(A=>{D===c&&d(parseInt(A.headers.get("X-WP-Total")))}).catch(()=>{d(0)})},[c]);let S=(0,In.jsx)(Rs.BlockControls,{group:"block",children:(0,In.jsx)(Rs.HeadingLevelDropdown,{value:l,options:s,onChange:D=>r({level:D})})}),C=(0,In.jsx)(Rs.InspectorControls,{children:(0,In.jsxs)(lm.__experimentalToolsPanel,{label:(0,Br.__)("Settings"),resetAll:()=>{r({showPostTitle:!0,showCommentsCount:!0})},dropdownMenuProps:x,children:[(0,In.jsx)(lm.__experimentalToolsPanelItem,{label:(0,Br.__)("Show post title"),isShownByDefault:!0,hasValue:()=>!n,onDeselect:()=>r({showPostTitle:!0}),children:(0,In.jsx)(lm.ToggleControl,{label:(0,Br.__)("Show post title"),checked:n,onChange:D=>r({showPostTitle:D})})}),(0,In.jsx)(lm.__experimentalToolsPanelItem,{label:(0,Br.__)("Show comments count"),isShownByDefault:!0,hasValue:()=>!i,onDeselect:()=>r({showCommentsCount:!0}),children:(0,In.jsx)(lm.ToggleControl,{label:(0,Br.__)("Show comments count"),checked:i,onChange:D=>r({showCommentsCount:D})})})]})}),N=h?(0,Br.__)("Post Title"):f,B;return i&&p!==void 0?n?p===1?B=(0,Br.sprintf)((0,Br.__)('One response to "%s"'),N):B=(0,Br.sprintf)((0,Br._n)('%1$s response to "%2$s"','%1$s responses to "%2$s"',p),p,N):p===1?B=(0,Br.__)("One response"):B=(0,Br.sprintf)((0,Br._n)("%s response","%s responses",p),p):n?p===1?B=(0,Br.sprintf)((0,Br.__)('Response to "%s"'),N):B=(0,Br.sprintf)((0,Br.__)('Responses to "%s"'),N):p===1?B=(0,Br.__)("Response"):B=(0,Br.__)("Responses"),(0,In.jsxs)(In.Fragment,{children:[S,C,(0,In.jsx)(m,{...g,children:B})]})}var e0e={attributes:{textAlign:{type:"string"},showPostTitle:{type:"boolean",default:!0},showCommentsCount:{type:"boolean",default:!0},level:{type:"number",default:2},levelOptions:{type:"array"}},supports:{anchor:!0,align:!0,html:!1,__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0}},interactivity:{clientNavigation:!0}},migrate:e=>{let{singleCommentLabel:t,multipleCommentsLabel:r,...a}=e;return We(a)},isEligible(e){return!!e.textAlign||!!e.className?.match(/\bhas-text-align-(left|center|right)\b/)},save:()=>null},t0e={attributes:{textAlign:{type:"string"},showPostTitle:{type:"boolean",default:!0},showCommentsCount:{type:"boolean",default:!0},level:{type:"number",default:2},levelOptions:{type:"array"},singleCommentLabel:{type:"string"},multipleCommentsLabel:{type:"string"}},supports:{anchor:!0,align:!0,html:!1,__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0}},interactivity:{clientNavigation:!0}},migrate:e=>{let{singleCommentLabel:t,multipleCommentsLabel:r,...a}=e;return We(a)},isEligible:({multipleCommentsLabel:e,singleCommentLabel:t})=>e||t,save:()=>null},Zj=[e0e,t0e];var{name:Kj}=qk,Qj={icon:El,edit:qj,deprecated:Zj,example:{}},r0e=()=>E({name:Kj,metadata:qk,settings:Qj});var hN={};Z(hN,{init:()=>h1e,metadata:()=>u5,name:()=>KU,settings:()=>p5});var fN=o(P(),1);var ZU=o(W(),1);var Yk=o(W(),1),_e=o(T(),1),Xk=o(P(),1),q1=o(me(),1);var Kk=o(Rr(),1),o0e={"top left":"is-position-top-left","top center":"is-position-top-center","top right":"is-position-top-right","center left":"is-position-center-left","center center":"is-position-center-center",center:"is-position-center-center","center right":"is-position-center-right","bottom left":"is-position-bottom-left","bottom center":"is-position-bottom-center","bottom right":"is-position-bottom-right"},Qt="image",Cr="video",Kc="embed-video",Yj=50;var a0e={x:.5,y:.5},Qk=["image","video"];function Qo({x:e,y:t}=a0e){return`${Math.round(e*100)}% ${Math.round(t*100)}%`}function al(e){return e===50||e===void 0?null:"has-background-dim-"+10*Math.round(e/10)}function Xj(e){if(!e||!e.url&&!e.src)return{url:void 0,id:void 0};(0,Kk.isBlobURL)(e.url)&&(e.type=(0,Kk.getBlobTypeByURL)(e.url));let t;if(e.media_type)e.media_type===Qt?t=Qt:t=Cr;else if(e.type&&(e.type===Qt||e.type===Cr))t=e.type;else return;return{url:e.url||e.src,id:e.id,alt:e?.alt,backgroundType:t,...t===Cr?{hasParallax:void 0}:{}}}function Ya(e){return!e||e==="center center"||e==="center"}function Nn(e){return Ya(e)?"":o0e[e]}var se=o(v(),1);function zs(e){return e?{backgroundImage:`url(${e})`}:{}}function qp(e){return e===0||e===50||!e?null:"has-background-dim-"+10*Math.round(e/10)}function Jk(e){return{...e,dimRatio:e.url?e.dimRatio:100}}function sm(e){return e.tagName||(e={...e,tagName:"div"}),{...e}}var Zp={url:{type:"string"},id:{type:"number"},hasParallax:{type:"boolean",default:!1},dimRatio:{type:"number",default:50},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"}},Z1={url:{type:"string"},id:{type:"number"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},hasParallax:{type:"boolean",default:!1},isRepeated:{type:"boolean",default:!1},dimRatio:{type:"number",default:100},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"},isDark:{type:"boolean",default:!0},allowedBlocks:{type:"array"},templateLock:{type:["string","boolean"],enum:["all","insert",!1]}},XI={...Z1,useFeaturedImage:{type:"boolean",default:!1},tagName:{type:"string",default:"div"}},n0e={...XI,isUserOverlayColor:{type:"boolean"},sizeSlug:{type:"string"},alt:{type:"string",default:""}},Yf={anchor:!0,align:!0,html:!1,spacing:{padding:!0,__experimentalDefaultControls:{padding:!0}},color:{__experimentalDuotone:"> .wp-block-cover__image-background, > .wp-block-cover__video-background",text:!1,background:!1}},JI={...Yf,spacing:{padding:!0,margin:["top","bottom"],blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},color:{__experimentalDuotone:"> .wp-block-cover__image-background, > .wp-block-cover__video-background",heading:!0,text:!0,background:!1,__experimentalSkipSerialization:["gradients"],enableContrastChecker:!1},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:{allowJustification:!1}},i0e={...JI,shadow:!0,dimensions:{aspectRatio:!0},interactivity:{clientNavigation:!0}},l0e={attributes:n0e,supports:i0e,save({attributes:e}){let{backgroundType:t,gradient:r,contentPosition:a,customGradient:n,customOverlayColor:i,dimRatio:l,focalPoint:s,useFeaturedImage:c,hasParallax:u,isDark:m,isRepeated:p,overlayColor:d,url:f,alt:h,id:g,minHeight:b,minHeightUnit:y,tagName:k,sizeSlug:_}=e,x=(0,_e.getColorClassName)("background-color",d),S=(0,_e.__experimentalGetGradientClass)(r),C=b&&y?`${b}${y}`:b,N=Qt===t,B=Cr===t,D=!(u||p),A={minHeight:C||void 0},H={backgroundColor:x?void 0:i,background:n||void 0},F=s&&D?Qo(s):void 0,z=f?`url(${f})`:void 0,I=Qo(s),R=w({"is-light":!m,"has-parallax":u,"is-repeated":p,"has-custom-content-position":!Ya(a)},Nn(a)),$=w("wp-block-cover__image-background",g?`wp-image-${g}`:null,{[`size-${_}`]:_,"has-parallax":u,"is-repeated":p}),j=r||n;return(0,se.jsxs)(k,{..._e.useBlockProps.save({className:R,style:A}),children:[(0,se.jsx)("span",{"aria-hidden":"true",className:w("wp-block-cover__background",x,al(l),{"has-background-dim":l!==void 0,"wp-block-cover__gradient-background":f&&j&&l!==0,"has-background-gradient":j,[S]:S}),style:H}),!c&&N&&f&&(D?(0,se.jsx)("img",{className:$,alt:h,src:f,style:{objectPosition:F},"data-object-fit":"cover","data-object-position":F}):(0,se.jsx)("div",{role:h?"img":void 0,"aria-label":h||void 0,className:$,style:{backgroundPosition:I,backgroundImage:z}})),B&&f&&(0,se.jsx)("video",{className:w("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:f,style:{objectPosition:F},"data-object-fit":"cover","data-object-position":F}),(0,se.jsx)("div",{..._e.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})}},s0e={attributes:XI,supports:JI,save({attributes:e}){let{backgroundType:t,gradient:r,contentPosition:a,customGradient:n,customOverlayColor:i,dimRatio:l,focalPoint:s,useFeaturedImage:c,hasParallax:u,isDark:m,isRepeated:p,overlayColor:d,url:f,alt:h,id:g,minHeight:b,minHeightUnit:y,tagName:k}=e,_=(0,_e.getColorClassName)("background-color",d),x=(0,_e.__experimentalGetGradientClass)(r),S=b&&y?`${b}${y}`:b,C=Qt===t,N=Cr===t,B=!(u||p),D={minHeight:S||void 0},A={backgroundColor:_?void 0:i,background:n||void 0},H=s&&B?Qo(s):void 0,F=f?`url(${f})`:void 0,z=Qo(s),I=w({"is-light":!m,"has-parallax":u,"is-repeated":p,"has-custom-content-position":!Ya(a)},Nn(a)),R=w("wp-block-cover__image-background",g?`wp-image-${g}`:null,{"has-parallax":u,"is-repeated":p}),$=r||n;return(0,se.jsxs)(k,{..._e.useBlockProps.save({className:I,style:D}),children:[(0,se.jsx)("span",{"aria-hidden":"true",className:w("wp-block-cover__background",_,al(l),{"has-background-dim":l!==void 0,"wp-block-cover__gradient-background":f&&$&&l!==0,"has-background-gradient":$,[x]:x}),style:A}),!c&&C&&f&&(B?(0,se.jsx)("img",{className:R,alt:h,src:f,style:{objectPosition:H},"data-object-fit":"cover","data-object-position":H}):(0,se.jsx)("div",{role:"img",className:R,style:{backgroundPosition:z,backgroundImage:F}})),N&&f&&(0,se.jsx)("video",{className:w("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:f,style:{objectPosition:H},"data-object-fit":"cover","data-object-position":H}),(0,se.jsx)("div",{..._e.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})}},c0e={attributes:XI,supports:JI,isEligible(e){return(e.customOverlayColor!==void 0||e.overlayColor!==void 0)&&e.isUserOverlayColor===void 0},migrate(e){return{...e,isUserOverlayColor:!0}},save({attributes:e}){let{backgroundType:t,gradient:r,contentPosition:a,customGradient:n,customOverlayColor:i,dimRatio:l,focalPoint:s,useFeaturedImage:c,hasParallax:u,isDark:m,isRepeated:p,overlayColor:d,url:f,alt:h,id:g,minHeight:b,minHeightUnit:y,tagName:k}=e,_=(0,_e.getColorClassName)("background-color",d),x=(0,_e.__experimentalGetGradientClass)(r),S=b&&y?`${b}${y}`:b,C=Qt===t,N=Cr===t,B=!(u||p),D={minHeight:S||void 0},A={backgroundColor:_?void 0:i,background:n||void 0},H=s&&B?Qo(s):void 0,F=f?`url(${f})`:void 0,z=Qo(s),I=w({"is-light":!m,"has-parallax":u,"is-repeated":p,"has-custom-content-position":!Ya(a)},Nn(a)),R=w("wp-block-cover__image-background",g?`wp-image-${g}`:null,{"has-parallax":u,"is-repeated":p}),$=r||n;return(0,se.jsxs)(k,{..._e.useBlockProps.save({className:I,style:D}),children:[(0,se.jsx)("span",{"aria-hidden":"true",className:w("wp-block-cover__background",_,al(l),{"has-background-dim":l!==void 0,"wp-block-cover__gradient-background":f&&$&&l!==0,"has-background-gradient":$,[x]:x}),style:A}),!c&&C&&f&&(B?(0,se.jsx)("img",{className:R,alt:h,src:f,style:{objectPosition:H},"data-object-fit":"cover","data-object-position":H}):(0,se.jsx)("div",{role:"img",className:R,style:{backgroundPosition:z,backgroundImage:F}})),N&&f&&(0,se.jsx)("video",{className:w("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:f,style:{objectPosition:H},"data-object-fit":"cover","data-object-position":H}),(0,se.jsx)("div",{..._e.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})}},u0e={attributes:Z1,supports:Yf,save({attributes:e}){let{backgroundType:t,gradient:r,contentPosition:a,customGradient:n,customOverlayColor:i,dimRatio:l,focalPoint:s,useFeaturedImage:c,hasParallax:u,isDark:m,isRepeated:p,overlayColor:d,url:f,alt:h,id:g,minHeight:b,minHeightUnit:y}=e,k=(0,_e.getColorClassName)("background-color",d),_=(0,_e.__experimentalGetGradientClass)(r),x=b&&y?`${b}${y}`:b,S=Qt===t,C=Cr===t,N=!(u||p),B={minHeight:x||void 0},D={backgroundColor:k?void 0:i,background:n||void 0},A=s&&N?Qo(s):void 0,H=f?`url(${f})`:void 0,F=Qo(s),z=w({"is-light":!m,"has-parallax":u,"is-repeated":p,"has-custom-content-position":!Ya(a)},Nn(a)),I=w("wp-block-cover__image-background",g?`wp-image-${g}`:null,{"has-parallax":u,"is-repeated":p}),R=r||n;return(0,se.jsxs)("div",{..._e.useBlockProps.save({className:z,style:B}),children:[(0,se.jsx)("span",{"aria-hidden":"true",className:w("wp-block-cover__background",k,al(l),{"has-background-dim":l!==void 0,"wp-block-cover__gradient-background":f&&R&&l!==0,"has-background-gradient":R,[_]:_}),style:D}),!c&&S&&f&&(N?(0,se.jsx)("img",{className:I,alt:h,src:f,style:{objectPosition:A},"data-object-fit":"cover","data-object-position":A}):(0,se.jsx)("div",{role:"img",className:I,style:{backgroundPosition:F,backgroundImage:H}})),C&&f&&(0,se.jsx)("video",{className:w("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:f,style:{objectPosition:A},"data-object-fit":"cover","data-object-position":A}),(0,se.jsx)("div",{..._e.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})},migrate:sm},m0e={attributes:Z1,supports:Yf,save({attributes:e}){let{backgroundType:t,gradient:r,contentPosition:a,customGradient:n,customOverlayColor:i,dimRatio:l,focalPoint:s,useFeaturedImage:c,hasParallax:u,isDark:m,isRepeated:p,overlayColor:d,url:f,alt:h,id:g,minHeight:b,minHeightUnit:y}=e,k=(0,_e.getColorClassName)("background-color",d),_=(0,_e.__experimentalGetGradientClass)(r),x=b&&y?`${b}${y}`:b,S=Qt===t,C=Cr===t,N=!(u||p),B={...S&&!N&&!c?zs(f):{},minHeight:x||void 0},D={backgroundColor:k?void 0:i,background:n||void 0},A=s&&N?`${Math.round(s.x*100)}% ${Math.round(s.y*100)}%`:void 0,H=w({"is-light":!m,"has-parallax":u,"is-repeated":p,"has-custom-content-position":!Ya(a)},Nn(a)),F=r||n;return(0,se.jsxs)("div",{..._e.useBlockProps.save({className:H,style:B}),children:[(0,se.jsx)("span",{"aria-hidden":"true",className:w("wp-block-cover__background",k,al(l),{"has-background-dim":l!==void 0,"wp-block-cover__gradient-background":f&&F&&l!==0,"has-background-gradient":F,[_]:_}),style:D}),!c&&S&&N&&f&&(0,se.jsx)("img",{className:w("wp-block-cover__image-background",g?`wp-image-${g}`:null),alt:h,src:f,style:{objectPosition:A},"data-object-fit":"cover","data-object-position":A}),C&&f&&(0,se.jsx)("video",{className:w("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:f,style:{objectPosition:A},"data-object-fit":"cover","data-object-position":A}),(0,se.jsx)("div",{..._e.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})},migrate:sm},p0e={attributes:Z1,supports:Yf,save({attributes:e}){let{backgroundType:t,gradient:r,contentPosition:a,customGradient:n,customOverlayColor:i,dimRatio:l,focalPoint:s,hasParallax:c,isDark:u,isRepeated:m,overlayColor:p,url:d,alt:f,id:h,minHeight:g,minHeightUnit:b}=e,y=(0,_e.getColorClassName)("background-color",p),k=(0,_e.__experimentalGetGradientClass)(r),_=b?`${g}${b}`:g,x=Qt===t,S=Cr===t,C=!(c||m),N={...x&&!C?zs(d):{},minHeight:_||void 0},B={backgroundColor:y?void 0:i,background:n||void 0},D=s&&C?`${Math.round(s.x*100)}% ${Math.round(s.y*100)}%`:void 0,A=w({"is-light":!u,"has-parallax":c,"is-repeated":m,"has-custom-content-position":!Ya(a)},Nn(a)),H=r||n;return(0,se.jsxs)("div",{..._e.useBlockProps.save({className:A,style:N}),children:[(0,se.jsx)("span",{"aria-hidden":"true",className:w("wp-block-cover__background",y,al(l),{"has-background-dim":l!==void 0,"wp-block-cover__gradient-background":d&&H&&l!==0,"has-background-gradient":H,[k]:k}),style:B}),x&&C&&d&&(0,se.jsx)("img",{className:w("wp-block-cover__image-background",h?`wp-image-${h}`:null),alt:f,src:d,style:{objectPosition:D},"data-object-fit":"cover","data-object-position":D}),S&&d&&(0,se.jsx)("video",{className:w("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:{objectPosition:D},"data-object-fit":"cover","data-object-position":D}),(0,se.jsx)("div",{..._e.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})},migrate:sm},d0e={attributes:Z1,supports:Yf,save({attributes:e}){let{backgroundType:t,gradient:r,contentPosition:a,customGradient:n,customOverlayColor:i,dimRatio:l,focalPoint:s,hasParallax:c,isDark:u,isRepeated:m,overlayColor:p,url:d,alt:f,id:h,minHeight:g,minHeightUnit:b}=e,y=(0,_e.getColorClassName)("background-color",p),k=(0,_e.__experimentalGetGradientClass)(r),_=b?`${g}${b}`:g,x=Qt===t,S=Cr===t,C=!(c||m),N={...x&&!C?zs(d):{},minHeight:_||void 0},B={backgroundColor:y?void 0:i,background:n||void 0},D=s&&C?`${Math.round(s.x*100)}% ${Math.round(s.y*100)}%`:void 0,A=w({"is-light":!u,"has-parallax":c,"is-repeated":m,"has-custom-content-position":!Ya(a)},Nn(a));return(0,se.jsxs)("div",{..._e.useBlockProps.save({className:A,style:N}),children:[(0,se.jsx)("span",{"aria-hidden":"true",className:w(y,al(l),"wp-block-cover__gradient-background",k,{"has-background-dim":l!==void 0,"has-background-gradient":r||n,[k]:!d&&k}),style:B}),x&&C&&d&&(0,se.jsx)("img",{className:w("wp-block-cover__image-background",h?`wp-image-${h}`:null),alt:f,src:d,style:{objectPosition:D},"data-object-fit":"cover","data-object-position":D}),S&&d&&(0,se.jsx)("video",{className:w("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:{objectPosition:D},"data-object-fit":"cover","data-object-position":D}),(0,se.jsx)("div",{..._e.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})},migrate:sm},f0e={attributes:{...Zp,isRepeated:{type:"boolean",default:!1},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""}},supports:Yf,save({attributes:e}){let{backgroundType:t,gradient:r,contentPosition:a,customGradient:n,customOverlayColor:i,dimRatio:l,focalPoint:s,hasParallax:c,isRepeated:u,overlayColor:m,url:p,alt:d,id:f,minHeight:h,minHeightUnit:g}=e,b=(0,_e.getColorClassName)("background-color",m),y=(0,_e.__experimentalGetGradientClass)(r),k=g?`${h}${g}`:h,_=Qt===t,x=Cr===t,S=!(c||u),C={..._&&!S?zs(p):{},backgroundColor:b?void 0:i,background:n&&!p?n:void 0,minHeight:k||void 0},N=s&&S?`${Math.round(s.x*100)}% ${Math.round(s.y*100)}%`:void 0,B=w(qp(l),b,{"has-background-dim":l!==0,"has-parallax":c,"is-repeated":u,"has-background-gradient":r||n,[y]:!p&&y,"has-custom-content-position":!Ya(a)},Nn(a));return(0,se.jsxs)("div",{..._e.useBlockProps.save({className:B,style:C}),children:[p&&(r||n)&&l!==0&&(0,se.jsx)("span",{"aria-hidden":"true",className:w("wp-block-cover__gradient-background",y),style:n?{background:n}:void 0}),_&&S&&p&&(0,se.jsx)("img",{className:w("wp-block-cover__image-background",f?`wp-image-${f}`:null),alt:d,src:p,style:{objectPosition:N},"data-object-fit":"cover","data-object-position":N}),x&&p&&(0,se.jsx)("video",{className:w("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:p,style:{objectPosition:N},"data-object-fit":"cover","data-object-position":N}),(0,se.jsx)("div",{className:"wp-block-cover__inner-container",children:(0,se.jsx)(_e.InnerBlocks.Content,{})})]})},migrate:(0,q1.compose)(Jk,sm)},h0e={attributes:{...Zp,isRepeated:{type:"boolean",default:!1},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"}},supports:{align:!0},save({attributes:e}){let{backgroundType:t,gradient:r,contentPosition:a,customGradient:n,customOverlayColor:i,dimRatio:l,focalPoint:s,hasParallax:c,isRepeated:u,overlayColor:m,url:p,minHeight:d,minHeightUnit:f}=e,h=(0,_e.getColorClassName)("background-color",m),g=(0,_e.__experimentalGetGradientClass)(r),b=f?`${d}${f}`:d,y=Qt===t,k=Cr===t,_=y?zs(p):{},x={};h||(_.backgroundColor=i),n&&!p&&(_.background=n),_.minHeight=b||void 0;let S;s&&(S=`${Math.round(s.x*100)}% ${Math.round(s.y*100)}%`,y&&!c&&(_.backgroundPosition=S),k&&(x.objectPosition=S));let C=w(qp(l),h,{"has-background-dim":l!==0,"has-parallax":c,"is-repeated":u,"has-background-gradient":r||n,[g]:!p&&g,"has-custom-content-position":!Ya(a)},Nn(a));return(0,se.jsxs)("div",{..._e.useBlockProps.save({className:C,style:_}),children:[p&&(r||n)&&l!==0&&(0,se.jsx)("span",{"aria-hidden":"true",className:w("wp-block-cover__gradient-background",g),style:n?{background:n}:void 0}),k&&p&&(0,se.jsx)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:p,style:x}),(0,se.jsx)("div",{className:"wp-block-cover__inner-container",children:(0,se.jsx)(_e.InnerBlocks.Content,{})})]})},migrate:(0,q1.compose)(Jk,sm)},g0e={attributes:{...Zp,minHeight:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},supports:{align:!0},save({attributes:e}){let{backgroundType:t,gradient:r,customGradient:a,customOverlayColor:n,dimRatio:i,focalPoint:l,hasParallax:s,overlayColor:c,url:u,minHeight:m}=e,p=(0,_e.getColorClassName)("background-color",c),d=(0,_e.__experimentalGetGradientClass)(r),f=t===Qt?zs(u):{};p||(f.backgroundColor=n),l&&!s&&(f.backgroundPosition=`${Math.round(l.x*100)}% ${Math.round(l.y*100)}%`),a&&!u&&(f.background=a),f.minHeight=m||void 0;let h=w(qp(i),p,{"has-background-dim":i!==0,"has-parallax":s,"has-background-gradient":a,[d]:!u&&d});return(0,se.jsxs)("div",{className:h,style:f,children:[u&&(r||a)&&i!==0&&(0,se.jsx)("span",{"aria-hidden":"true",className:w("wp-block-cover__gradient-background",d),style:a?{background:a}:void 0}),Cr===t&&u&&(0,se.jsx)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:u}),(0,se.jsx)("div",{className:"wp-block-cover__inner-container",children:(0,se.jsx)(_e.InnerBlocks.Content,{})})]})},migrate:(0,q1.compose)(Jk,sm)},v0e={attributes:{...Zp,minHeight:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},supports:{align:!0},save({attributes:e}){let{backgroundType:t,gradient:r,customGradient:a,customOverlayColor:n,dimRatio:i,focalPoint:l,hasParallax:s,overlayColor:c,url:u,minHeight:m}=e,p=(0,_e.getColorClassName)("background-color",c),d=(0,_e.__experimentalGetGradientClass)(r),f=t===Qt?zs(u):{};p||(f.backgroundColor=n),l&&!s&&(f.backgroundPosition=`${l.x*100}% ${l.y*100}%`),a&&!u&&(f.background=a),f.minHeight=m||void 0;let h=w(qp(i),p,{"has-background-dim":i!==0,"has-parallax":s,"has-background-gradient":a,[d]:!u&&d});return(0,se.jsxs)("div",{className:h,style:f,children:[u&&(r||a)&&i!==0&&(0,se.jsx)("span",{"aria-hidden":"true",className:w("wp-block-cover__gradient-background",d),style:a?{background:a}:void 0}),Cr===t&&u&&(0,se.jsx)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:u}),(0,se.jsx)("div",{className:"wp-block-cover__inner-container",children:(0,se.jsx)(_e.InnerBlocks.Content,{})})]})},migrate:(0,q1.compose)(Jk,sm)},b0e={attributes:{...Zp,title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"}},supports:{align:!0},save({attributes:e}){let{backgroundType:t,contentAlign:r,customOverlayColor:a,dimRatio:n,focalPoint:i,hasParallax:l,overlayColor:s,title:c,url:u}=e,m=(0,_e.getColorClassName)("background-color",s),p=t===Qt?zs(u):{};m||(p.backgroundColor=a),i&&!l&&(p.backgroundPosition=`${i.x*100}% ${i.y*100}%`);let d=w(qp(n),m,{"has-background-dim":n!==0,"has-parallax":l,[`has-${r}-content`]:r!=="center"});return(0,se.jsxs)("div",{className:d,style:p,children:[Cr===t&&u&&(0,se.jsx)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:u}),!_e.RichText.isEmpty(c)&&(0,se.jsx)(_e.RichText.Content,{tagName:"p",className:"wp-block-cover-text",value:c})]})},migrate(e){let t={...e,dimRatio:e.url?e.dimRatio:100,tagName:e.tagName?e.tagName:"div"},{title:r,contentAlign:a,...n}=t;return[n,[(0,Yk.createBlock)("core/paragraph",{content:e.title,style:{typography:{textAlign:e.contentAlign}},fontSize:"large",placeholder:(0,Xk.__)("Write title\u2026")})]]}},y0e={attributes:{...Zp,title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"},align:{type:"string"}},supports:{className:!1},save({attributes:e}){let{url:t,title:r,hasParallax:a,dimRatio:n,align:i,contentAlign:l,overlayColor:s,customOverlayColor:c}=e,u=(0,_e.getColorClassName)("background-color",s),m=zs(t);u||(m.backgroundColor=c);let p=w("wp-block-cover-image",qp(n),u,{"has-background-dim":n!==0,"has-parallax":a,[`has-${l}-content`]:l!=="center"},i?`align${i}`:null);return(0,se.jsx)("div",{className:p,style:m,children:!_e.RichText.isEmpty(r)&&(0,se.jsx)(_e.RichText.Content,{tagName:"p",className:"wp-block-cover-image-text",value:r})})},migrate(e){let t={...e,dimRatio:e.url?e.dimRatio:100,tagName:e.tagName?e.tagName:"div"},{title:r,contentAlign:a,align:n,...i}=t;return[i,[(0,Yk.createBlock)("core/paragraph",{content:e.title,style:{typography:{textAlign:e.contentAlign}},fontSize:"large",placeholder:(0,Xk.__)("Write title\u2026")})]]}},_0e={attributes:{...Zp,title:{type:"string",source:"html",selector:"h2"},align:{type:"string"},contentAlign:{type:"string",default:"center"}},supports:{className:!1},save({attributes:e}){let{url:t,title:r,hasParallax:a,dimRatio:n,align:i}=e,l=zs(t),s=w("wp-block-cover-image",qp(n),{"has-background-dim":n!==0,"has-parallax":a},i?`align${i}`:null);return(0,se.jsx)("section",{className:s,style:l,children:(0,se.jsx)(_e.RichText.Content,{tagName:"h2",value:r})})},migrate(e){let t={...e,dimRatio:e.url?e.dimRatio:100,tagName:e.tagName?e.tagName:"div"},{title:r,contentAlign:a,align:n,...i}=t;return[i,[(0,Yk.createBlock)("core/paragraph",{content:e.title,style:{typography:{textAlign:e.contentAlign}},fontSize:"large",placeholder:(0,Xk.__)("Write title\u2026")})]]}},Jj=[l0e,s0e,c0e,u0e,m0e,p0e,d0e,f0e,h0e,g0e,v0e,b0e,y0e,_0e];var J1=o(Q(),1),jl=o(U(),1),Yp=o(M(),1),c5=o(me(),1),Bo=o(T(),1),pN=o(P(),1),um=o(V(),1),OU=o(Rr(),1),jU=o(xr(),1);var nU=o(U(),1),jt=o(M(),1),iU=o(me(),1),Yo=o(T(),1),po=o(P(),1),eN=o(V(),1),lU=o(Q(),1);var Xf="full";var Jf=o(T(),1),tU=o(xr(),1),Xa=o(M(),1),rU=o(Rr(),1),fi=o(P(),1),e5=o(U(),1),oU=o(me(),1),t5=o(V(),1),wa=o(v(),1),eU=["image"];function aU({poster:e,onChange:t}){let r=(0,e5.useRef)(),[a,n]=(0,e5.useState)(!1),i=(0,oU.useInstanceId)(aU,"block-library-poster-image-description"),{getSettings:l}=(0,t5.useSelect)(Jf.store),{createErrorNotice:s}=(0,t5.useDispatch)(tU.store),c=m=>{l().mediaUpload({allowedTypes:eU,filesList:m,onFileChange:([p])=>{if((0,rU.isBlobURL)(p?.url)){n(!0);return}p&&t(p),n(!1)},onError:p=>{s(p,{id:"poster-image-upload-notice",type:"snackbar"}),n(!1)},multiple:!1})},u=()=>!e&&a?(0,wa.jsx)(Xa.Spinner,{}):e?(0,fi.__)("Replace"):(0,fi.__)("Set poster image");return(0,wa.jsx)(Jf.MediaUploadCheck,{children:(0,wa.jsxs)(Xa.__experimentalToolsPanelItem,{label:(0,fi.__)("Poster image"),isShownByDefault:!0,hasValue:()=>!!e,onDeselect:()=>t(void 0),children:[(0,wa.jsx)(Xa.BaseControl.VisualLabel,{children:(0,fi.__)("Poster image")}),(0,wa.jsx)(Jf.MediaUpload,{title:(0,fi.__)("Select poster image"),onSelect:t,allowedTypes:eU,render:({open:m})=>(0,wa.jsxs)("div",{className:"block-library-poster-image__container",children:[e&&(0,wa.jsxs)(Xa.Button,{__next40pxDefaultSize:!0,onClick:m,"aria-haspopup":"dialog","aria-label":(0,fi.__)("Edit or replace the poster image."),className:"block-library-poster-image__preview",disabled:a,accessibleWhenDisabled:!0,children:[(0,wa.jsx)("img",{src:e,alt:(0,fi.__)("Poster image preview"),className:"block-library-poster-image__preview-image"}),a&&(0,wa.jsx)(Xa.Spinner,{})]}),(0,wa.jsxs)(Xa.__experimentalHStack,{className:w("block-library-poster-image__actions",{"block-library-poster-image__actions-select":!e}),children:[(0,wa.jsx)(Xa.Button,{__next40pxDefaultSize:!0,onClick:m,ref:r,className:"block-library-poster-image__action","aria-describedby":i,"aria-haspopup":"dialog",variant:e?void 0:"secondary",disabled:a,accessibleWhenDisabled:!0,children:u()}),(0,wa.jsx)("p",{id:i,hidden:!0,children:e?(0,fi.sprintf)((0,fi.__)("The current poster image url is %s."),e):(0,fi.__)("There is no poster image currently selected.")}),!!e&&(0,wa.jsx)(Xa.Button,{__next40pxDefaultSize:!0,onClick:()=>{t(void 0),r.current.focus()},className:"block-library-poster-image__action",disabled:a,accessibleWhenDisabled:!0,children:(0,fi.__)("Remove")})]}),(0,wa.jsx)(Xa.DropZone,{onFilesDrop:c})]})})]})})}var r5=aU;var dt=o(v(),1),{cleanEmptyObject:x0e,ResolutionTool:k0e,HTMLElementControl:w0e}=K(Yo.privateApis);function C0e({onChange:e,onUnitChange:t,unit:r="px",value:a=""}){let i=`block-cover-height-input-${(0,iU.useInstanceId)(jt.__experimentalUnitControl)}`,l=r==="px",[s]=(0,Yo.useSettings)("spacing.units"),c=(0,jt.__experimentalUseCustomUnits)({availableUnits:s||["px","em","rem","vw","vh"],defaultValues:{px:430,"%":20,em:20,rem:20,vw:20,vh:50}}),u=d=>{let f=d!==""?parseFloat(d):void 0;isNaN(f)&&f!==void 0||e(f)},m=(0,nU.useMemo)(()=>{let[d]=(0,jt.__experimentalParseQuantityAndUnitFromRawValue)(a);return[d,r].join("")},[r,a]),p=l?Yj:0;return(0,dt.jsx)(jt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,po.__)("Minimum height"),id:i,isResetValueOnUnitChange:!0,min:p,onChange:u,onUnitChange:t,units:c,value:m})}function sU({attributes:e,setAttributes:t,clientId:r,setOverlayColor:a,coverRef:n,currentSettings:i,updateDimRatio:l,featuredImage:s}){let{useFeaturedImage:c,id:u,dimRatio:m,focalPoint:p,hasParallax:d,isRepeated:f,minHeight:h,minHeightUnit:g,alt:b,tagName:y,poster:k}=e,{isVideoBackground:_,isImageBackground:x,mediaElement:S,url:C,overlayColor:N}=i,B=e.sizeSlug||Xf,{gradientValue:D,setGradient:A}=(0,Yo.__experimentalUseGradient)(),{getSettings:H}=(0,eN.useSelect)(Yo.store),F=H()?.imageSizes,z=(0,eN.useSelect)(X=>u&&x?X(lU.store).getEntityRecord("postType","attachment",u,{context:"view"}):null,[u,x]),I=c?s:z;function R(X){let te=I?.media_details?.sizes?.[X]?.source_url;if(!te)return null;t({url:te,sizeSlug:X})}let $=F?.filter(({slug:X})=>I?.media_details?.sizes?.[X]?.source_url)?.map(({name:X,slug:te})=>({value:te,label:X})),j=()=>{t({hasParallax:!d,...d?{}:{focalPoint:void 0}})},G=()=>{t({isRepeated:!f})},O=_||x,J=X=>{let[te,ne]=S.current?[S.current.style,"objectPosition"]:[n.current.style,"backgroundPosition"];te[ne]=Qo(X)},ee=(0,Yo.__experimentalUseMultipleOriginColorsAndGradients)(),oe=q();return(0,dt.jsxs)(dt.Fragment,{children:[(0,dt.jsx)(Yo.InspectorControls,{children:(!!C||c)&&(0,dt.jsxs)(jt.__experimentalToolsPanel,{label:(0,po.__)("Settings"),resetAll:()=>{t({hasParallax:!1,focalPoint:void 0,isRepeated:!1,alt:"",poster:void 0}),R(Xf)},dropdownMenuProps:oe,children:[x&&(0,dt.jsxs)(dt.Fragment,{children:[(0,dt.jsx)(jt.__experimentalToolsPanelItem,{label:(0,po.__)("Fixed background"),isShownByDefault:!0,hasValue:()=>!!d,onDeselect:()=>t({hasParallax:!1,focalPoint:void 0}),children:(0,dt.jsx)(jt.ToggleControl,{label:(0,po.__)("Fixed background"),checked:!!d,onChange:j})}),(0,dt.jsx)(jt.__experimentalToolsPanelItem,{label:(0,po.__)("Repeated background"),isShownByDefault:!0,hasValue:()=>f,onDeselect:()=>t({isRepeated:!1}),children:(0,dt.jsx)(jt.ToggleControl,{label:(0,po.__)("Repeated background"),checked:f,onChange:G})})]}),O&&(0,dt.jsx)(jt.__experimentalToolsPanelItem,{label:(0,po.__)("Focal point"),isShownByDefault:!0,hasValue:()=>!!p,onDeselect:()=>t({focalPoint:void 0}),children:(0,dt.jsx)(jt.FocalPointPicker,{label:(0,po.__)("Focal point"),url:C,value:p,onDragStart:J,onDrag:J,onChange:X=>t({focalPoint:X})})}),_&&(0,dt.jsx)(r5,{poster:k,onChange:X=>t({poster:X?.url})}),!c&&C&&!_&&(0,dt.jsx)(jt.__experimentalToolsPanelItem,{label:(0,po.__)("Alternative text"),isShownByDefault:!0,hasValue:()=>!!b,onDeselect:()=>t({alt:""}),children:(0,dt.jsx)(jt.TextareaControl,{label:(0,po.__)("Alternative text"),value:b,onChange:X=>t({alt:X}),help:(0,dt.jsxs)(dt.Fragment,{children:[(0,dt.jsx)(jt.ExternalLink,{href:(0,po.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),children:(0,po.__)("Describe the purpose of the image.")}),(0,dt.jsx)("br",{}),(0,po.__)("Leave empty if decorative.")]})})}),!!$?.length&&(0,dt.jsx)(k0e,{value:B,onChange:R,options:$,defaultValue:Xf})]})}),ee.hasColorsOrGradients&&(0,dt.jsxs)(Yo.InspectorControls,{group:"color",children:[(0,dt.jsx)(Yo.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:N.color,gradientValue:D,label:(0,po.__)("Overlay"),onColorChange:a,onGradientChange:A,isShownByDefault:!0,resetAllFilter:()=>({overlayColor:void 0,customOverlayColor:void 0,gradient:void 0,customGradient:void 0}),clearable:!0}],panelId:r,...ee}),(0,dt.jsx)(jt.__experimentalToolsPanelItem,{hasValue:()=>m===void 0?!1:m!==(C?50:100),label:(0,po.__)("Overlay opacity"),onDeselect:()=>l(C?50:100),resetAllFilter:()=>({dimRatio:C?50:100}),isShownByDefault:!0,panelId:r,children:(0,dt.jsx)(jt.RangeControl,{label:(0,po.__)("Overlay opacity"),value:m,onChange:X=>l(X),min:0,max:100,step:10,required:!0,__next40pxDefaultSize:!0})})]}),(0,dt.jsx)(Yo.InspectorControls,{group:"dimensions",children:(0,dt.jsx)(jt.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!h,label:(0,po.__)("Minimum height"),onDeselect:()=>t({minHeight:void 0,minHeightUnit:void 0}),resetAllFilter:()=>({minHeight:void 0,minHeightUnit:void 0}),isShownByDefault:!0,panelId:r,children:(0,dt.jsx)(C0e,{value:e?.style?.dimensions?.aspectRatio?"":h,unit:g,onChange:X=>t({minHeight:X,style:x0e({...e?.style,dimensions:{...e?.style?.dimensions,aspectRatio:void 0}})}),onUnitChange:X=>t({minHeightUnit:X})})})}),(0,dt.jsx)(Yo.InspectorControls,{group:"advanced",children:(0,dt.jsx)(w0e,{tagName:y,onChange:X=>t({tagName:X}),clientId:r,options:[{label:(0,po.__)("Default (<div>)"),value:"div"},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"}]})})]})}var o5=o(U(),1),Ol=o(T(),1),K1=o(P(),1),dU=o(M(),1);var tN=o(U(),1),cm=o(M(),1),Kp=o(P(),1);var cU=o(W(),1);var S0e="core/embed",T0e=["youtube","vimeo","videopress","animoto","tiktok","wordpress-tv"];function uU(e){return e?P0e(e)!==null:!1}function P0e(e){let t=(0,cU.getBlockVariations)(S0e);if(!t)return null;let r=t.find(({patterns:a})=>eI(e,a));return!r||!T0e.includes(r.name)?null:r}function mU(e){let t=e?.match(/src=["']([^"']+)["']/);if(!t)return null;let r=t[1],a=I0e(r);return e.replace(r,a)}function B0e(e){if(!e)return null;let t=e.toLowerCase();return t.includes("youtube.com")||t.includes("youtu.be")?"youtube":t.includes("vimeo.com")?"vimeo":t.includes("videopress.com")?"videopress":t.includes("animoto.com")?"animoto":t.includes("tiktok.com")?"tiktok":t.includes("wordpress.tv")?"wordpress-tv":null}function I0e(e){if(!e)return e;try{let t=new URL(e);switch(B0e(e)){case"youtube":t.searchParams.set("autoplay","1"),t.searchParams.set("mute","1"),t.searchParams.set("loop","1"),t.searchParams.set("controls","0"),t.searchParams.set("showinfo","0"),t.searchParams.set("modestbranding","1"),t.searchParams.set("playsinline","1"),t.searchParams.set("rel","0");let a=t.pathname.split("/").pop();a&&t.searchParams.set("playlist",a);break;case"vimeo":t.searchParams.set("autoplay","1"),t.searchParams.set("muted","1"),t.searchParams.set("loop","1"),t.searchParams.set("background","1"),t.searchParams.set("controls","0");break;case"videopress":case"wordpress-tv":t.searchParams.set("autoplay","1"),t.searchParams.set("loop","1"),t.searchParams.set("muted","1");break;default:t.searchParams.set("autoplay","1"),t.searchParams.set("muted","1"),t.searchParams.set("loop","1");break}return t.toString()}catch{return e}}var eh=o(v(),1);function pU({onSubmit:e,onClose:t,initialUrl:r=""}){let[a,n]=(0,tN.useState)(r),[i,l]=(0,tN.useState)("");return(0,eh.jsx)(cm.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{if(!a){l((0,Kp.__)("Please enter a URL."));return}if(!uU(a)){l((0,Kp.__)("This URL is not supported. Please enter a valid video link from a supported provider."));return}e(a),t()},onCancel:t,confirmButtonText:(0,Kp.__)("Add video"),size:"medium",children:(0,eh.jsxs)(cm.__experimentalVStack,{spacing:4,children:[i&&(0,eh.jsx)(cm.Notice,{status:"error",isDismissible:!1,children:i}),(0,eh.jsx)(cm.TextControl,{type:"url",__next40pxDefaultSize:!0,label:(0,Kp.__)("Video URL"),value:a,onChange:c=>{n(c),l("")},placeholder:(0,Kp.__)("Enter YouTube, Vimeo, or other video URL"),help:(0,Kp.__)("Add a background video to the cover block that will autoplay in a loop.")})]})})}var nl=o(v(),1),{cleanEmptyObject:N0e}=K(Ol.privateApis);function fU({attributes:e,setAttributes:t,onSelectMedia:r,currentSettings:a,toggleUseFeaturedImage:n,onClearMedia:i,onSelectEmbedUrl:l,blockEditingMode:s}){let{contentPosition:c,id:u,useFeaturedImage:m,minHeight:p,minHeightUnit:d,backgroundType:f}=e,{hasInnerBlocks:h,url:g}=a,[b,y]=(0,o5.useState)(p),[k,_]=(0,o5.useState)(d),[x,S]=(0,o5.useState)(!1),C=d==="vh"&&p===100&&!e?.style?.dimensions?.aspectRatio,N=s==="contentOnly",B=()=>C?t(k==="vh"&&b===100?{minHeight:void 0,minHeightUnit:void 0}:{minHeight:b,minHeightUnit:k}):(y(p),_(d),t({minHeight:100,minHeightUnit:"vh",style:N0e({...e?.style,dimensions:{...e?.style?.dimensions,aspectRatio:void 0}})}));return(0,nl.jsxs)(nl.Fragment,{children:[!N&&(0,nl.jsxs)(Ol.BlockControls,{group:"block",children:[(0,nl.jsx)(Ol.__experimentalBlockAlignmentMatrixControl,{label:(0,K1.__)("Change content position"),value:c,onChange:D=>t({contentPosition:D}),isDisabled:!h}),(0,nl.jsx)(Ol.__experimentalBlockFullHeightAligmentControl,{isActive:C,onToggle:B,isDisabled:!h})]}),(0,nl.jsx)(Ol.BlockControls,{group:"other",children:(0,nl.jsx)(Ol.MediaReplaceFlow,{mediaId:u,mediaURL:g,allowedTypes:Qk,onSelect:r,onToggleFeaturedImage:n,useFeaturedImage:m,name:g?(0,K1.__)("Replace"):(0,K1.__)("Add media"),onReset:i,variant:"toolbar",children:({onClose:D})=>(0,nl.jsx)(dU.MenuItem,{icon:ii,onClick:()=>{S(!0),D()},children:(0,K1.__)("Embed video from URL")})})}),x&&(0,nl.jsx)(pU,{onSubmit:D=>{l(D)},onClose:()=>S(!1),initialUrl:f===Kc?g:""})]})}var a5=o(T(),1),hU=o(P(),1);var rN=o(v(),1);function oN({disableMediaButtons:e=!1,children:t,onSelectMedia:r,onError:a,style:n,toggleUseFeaturedImage:i}){return(0,rN.jsx)(a5.MediaPlaceholder,{icon:(0,rN.jsx)(a5.BlockIcon,{icon:xp}),labels:{title:(0,hU.__)("Cover")},onSelect:r,allowedTypes:Qk,disableMediaButtons:e,onToggleFeaturedImage:i,onError:a,style:n,children:t})}var gU=o(U(),1),vU=o(T(),1);var bU=o(v(),1),E0e={top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},{ResizableBoxPopover:D0e}=K(vU.privateApis);function aN({className:e,height:t,minHeight:r,onResize:a,onResizeStart:n,onResizeStop:i,showHandle:l,size:s,width:c,...u}){let[m,p]=(0,gU.useState)(!1),d={className:w(e,{"is-resizing":m}),enable:E0e,onResizeStart:(f,h,g)=>{n(g.clientHeight),a(g.clientHeight)},onResize:(f,h,g)=>{a(g.clientHeight),m||p(!0)},onResizeStop:(f,h,g)=>{i(g.clientHeight),p(!1)},showHandle:l,size:s,__experimentalShowTooltip:!0,__experimentalTooltipProps:{axis:"y",position:"bottom",isVisible:m}};return(0,bU.jsx)(D0e,{className:"block-library-cover__resizable-box-popover",resizableBoxProps:d,...u})}var L0e={grad:.9,turn:360,rad:360/(2*Math.PI)},Qc=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Po=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},il=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},TU=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},yU=function(e){return{r:il(e.r,0,255),g:il(e.g,0,255),b:il(e.b,0,255),a:il(e.a)}},nN=function(e){return{r:Po(e.r),g:Po(e.g),b:Po(e.b),a:Po(e.a,3)}},M0e=/^#([0-9a-f]{3,8})$/i,n5=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},PU=function(e){var t=e.r,r=e.g,a=e.b,n=e.a,i=Math.max(t,r,a),l=i-Math.min(t,r,a),s=l?i===t?(r-a)/l:i===r?2+(a-t)/l:4+(t-r)/l:0;return{h:60*(s<0?s+6:s),s:i?l/i*100:0,v:i/255*100,a:n}},BU=function(e){var t=e.h,r=e.s,a=e.v,n=e.a;t=t/360*6,r/=100,a/=100;var i=Math.floor(t),l=a*(1-r),s=a*(1-(t-i)*r),c=a*(1-(1-t+i)*r),u=i%6;return{r:255*[a,s,l,l,c,a][u],g:255*[c,a,a,s,l,l][u],b:255*[l,l,c,a,a,s][u],a:n}},_U=function(e){return{h:TU(e.h),s:il(e.s,0,100),l:il(e.l,0,100),a:il(e.a)}},xU=function(e){return{h:Po(e.h),s:Po(e.s),l:Po(e.l),a:Po(e.a,3)}},kU=function(e){return BU((r=(t=e).s,{h:t.h,s:(r*=((a=t.l)<50?a:100-a)/100)>0?2*r/(a+r)*100:0,v:a+r,a:t.a}));var t,r,a},Q1=function(e){return{h:(t=PU(e)).h,s:(n=(200-(r=t.s))*(a=t.v)/100)>0&&n<200?r*a/100/(n<=100?n:200-n)*100:0,l:n/2,a:t.a};var t,r,a,n},A0e=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,R0e=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,z0e=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,V0e=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,sN={string:[[function(e){var t=M0e.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Po(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?Po(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=z0e.exec(e)||V0e.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:yU({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:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=A0e.exec(e)||R0e.exec(e);if(!t)return null;var r,a,n=_U({h:(r=t[1],a=t[2],a===void 0&&(a="deg"),Number(r)*(L0e[a]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return kU(n)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,a=e.b,n=e.a,i=n===void 0?1:n;return Qc(t)&&Qc(r)&&Qc(a)?yU({r:Number(t),g:Number(r),b:Number(a),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,r=e.s,a=e.l,n=e.a,i=n===void 0?1:n;if(!Qc(t)||!Qc(r)||!Qc(a))return null;var l=_U({h:Number(t),s:Number(r),l:Number(a),a:Number(i)});return kU(l)},"hsl"],[function(e){var t=e.h,r=e.s,a=e.v,n=e.a,i=n===void 0?1:n;if(!Qc(t)||!Qc(r)||!Qc(a))return null;var l=(function(s){return{h:TU(s.h),s:il(s.s,0,100),v:il(s.v,0,100),a:il(s.a)}})({h:Number(t),s:Number(r),v:Number(a),a:Number(i)});return BU(l)},"hsv"]]},wU=function(e,t){for(var r=0;r<t.length;r++){var a=t[r][0](e);if(a)return[a,t[r][1]]}return[null,void 0]},F0e=function(e){return typeof e=="string"?wU(e.trim(),sN.string):typeof e=="object"&&e!==null?wU(e,sN.object):[null,void 0]};var iN=function(e,t){var r=Q1(e);return{h:r.h,s:il(r.s+100*t,0,100),l:r.l,a:r.a}},lN=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},CU=function(e,t){var r=Q1(e);return{h:r.h,s:r.s,l:il(r.l+100*t,0,100),a:r.a}},cN=(function(){function e(t){this.parsed=F0e(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return Po(lN(this.rgba),2)},e.prototype.isDark=function(){return lN(this.rgba)<.5},e.prototype.isLight=function(){return lN(this.rgba)>=.5},e.prototype.toHex=function(){return t=nN(this.rgba),r=t.r,a=t.g,n=t.b,l=(i=t.a)<1?n5(Po(255*i)):"","#"+n5(r)+n5(a)+n5(n)+l;var t,r,a,n,i,l},e.prototype.toRgb=function(){return nN(this.rgba)},e.prototype.toRgbString=function(){return t=nN(this.rgba),r=t.r,a=t.g,n=t.b,(i=t.a)<1?"rgba("+r+", "+a+", "+n+", "+i+")":"rgb("+r+", "+a+", "+n+")";var t,r,a,n,i},e.prototype.toHsl=function(){return xU(Q1(this.rgba))},e.prototype.toHslString=function(){return t=xU(Q1(this.rgba)),r=t.h,a=t.s,n=t.l,(i=t.a)<1?"hsla("+r+", "+a+"%, "+n+"%, "+i+")":"hsl("+r+", "+a+"%, "+n+"%)";var t,r,a,n,i},e.prototype.toHsv=function(){return t=PU(this.rgba),{h:Po(t.h),s:Po(t.s),v:Po(t.v),a:Po(t.a,3)};var t},e.prototype.invert=function(){return Ja({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Ja(iN(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Ja(iN(this.rgba,-t))},e.prototype.grayscale=function(){return Ja(iN(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Ja(CU(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Ja(CU(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Ja({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):Po(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=Q1(this.rgba);return typeof t=="number"?Ja({h:t,s:r.s,l:r.l,a:r.a}):Po(r.h)},e.prototype.isEqual=function(t){return this.toHex()===Ja(t).toHex()},e})(),Ja=function(e){return e instanceof cN?e:new cN(e)},SU=[],IU=function(e){e.forEach(function(t){SU.indexOf(t)<0&&(t(cN,sN),SU.push(t))})};function NU(e,t){var r={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},a={};for(var n in r)a[r[n]]=n;var i={};e.prototype.toName=function(l){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var s,c,u=a[this.toHex()];if(u)return u;if(l?.closest){var m=this.toRgb(),p=1/0,d="black";if(!i.length)for(var f in r)i[f]=new e(r[f]).toRgb();for(var h in r){var g=(s=m,c=i[h],Math.pow(s.r-c.r,2)+Math.pow(s.g-c.g,2)+Math.pow(s.b-c.b,2));g<p&&(p=g,d=h)}return d}},t.string.push([function(l){var s=l.toLowerCase(),c=s==="transparent"?"#0000":r[s];return c?new e(c).toRgb():null},"name"])}function H0e(e){var t=e.toString(16);return t.length===1?"0"+t:t}function EU(e){return"#"+e.map(H0e).join("")}function O0e(e){var t=(e[0]*299+e[1]*587+e[2]*114)/1e3;return t<128}function j0e(e){return e?U0e(e)?e:[e]:[]}function U0e(e){return Array.isArray(e[0])}function mN(e,t,r){for(var a=0;a<r.length;a++)if(G0e(e,t,r[a]))return!0;return!1}function G0e(e,t,r){switch(r.length){case 3:if(W0e(e,t,r))return!0;break;case 4:if($0e(e,t,r))return!0;break;case 5:if(q0e(e,t,r))return!0;break;default:return!1}}function W0e(e,t,r){return e[t+3]!==255||e[t]===r[0]&&e[t+1]===r[1]&&e[t+2]===r[2]}function $0e(e,t,r){return e[t+3]&&r[3]?e[t]===r[0]&&e[t+1]===r[1]&&e[t+2]===r[2]&&e[t+3]===r[3]:e[t+3]===r[3]}function i5(e,t,r){return e>=t-r&&e<=t+r}function q0e(e,t,r){var a=r[0],n=r[1],i=r[2],l=r[3],s=r[4],c=e[t+3],u=i5(c,l,s);return l?!!(!c&&u||i5(e[t],a,s)&&i5(e[t+1],n,s)&&i5(e[t+2],i,s)&&u):u}function Z0e(e,t,r){for(var a={},n=24,i=r.ignoredColor,l=r.step,s=[0,0,0,0,0],c=0;c<t;c+=l){var u=e[c],m=e[c+1],p=e[c+2],d=e[c+3];if(!(i&&mN(e,c,i))){var f=Math.round(u/n)+","+Math.round(m/n)+","+Math.round(p/n);a[f]?a[f]=[a[f][0]+u*d,a[f][1]+m*d,a[f][2]+p*d,a[f][3]+d,a[f][4]+1]:a[f]=[u*d,m*d,p*d,d,1],s[4]<a[f][4]&&(s=a[f])}}var h=s[0],g=s[1],b=s[2],y=s[3],k=s[4];return y?[Math.round(h/y),Math.round(g/y),Math.round(b/y),Math.round(y/k)]:r.defaultColor}function K0e(e,t,r){for(var a=0,n=0,i=0,l=0,s=0,c=r.ignoredColor,u=r.step,m=0;m<t;m+=u){var p=e[m+3],d=e[m]*p,f=e[m+1]*p,h=e[m+2]*p;c&&mN(e,m,c)||(a+=d,n+=f,i+=h,l+=p,s++)}return l?[Math.round(a/l),Math.round(n/l),Math.round(i/l),Math.round(l/s)]:r.defaultColor}function Q0e(e,t,r){for(var a=0,n=0,i=0,l=0,s=0,c=r.ignoredColor,u=r.step,m=0;m<t;m+=u){var p=e[m],d=e[m+1],f=e[m+2],h=e[m+3];c&&mN(e,m,c)||(a+=p*p*h,n+=d*d*h,i+=f*f*h,l+=h,s++)}return l?[Math.round(Math.sqrt(a/l)),Math.round(Math.sqrt(n/l)),Math.round(Math.sqrt(i/l)),Math.round(l/s)]:r.defaultColor}function DU(e){return X1(e,"defaultColor",[0,0,0,0])}function X1(e,t,r){return e[t]===void 0?r:e[t]}var LU=10,uN=100;function Y0e(e){return e.search(/\.svg(\?|$)/i)!==-1}function X0e(e){if(AU(e)){var t=e.naturalWidth,r=e.naturalHeight;return!e.naturalWidth&&Y0e(e.src)&&(t=r=uN),{width:t,height:r}}return e1e(e)?{width:e.videoWidth,height:e.videoHeight}:{width:e.width,height:e.height}}function MU(e){return t1e(e)?"canvas":J0e(e)?"offscreencanvas":r1e(e)?"imagebitmap":e.src}function AU(e){return typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement}function J0e(e){return typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas}function e1e(e){return typeof HTMLVideoElement<"u"&&e instanceof HTMLVideoElement}function t1e(e){return typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement}function r1e(e){return typeof ImageBitmap<"u"&&e instanceof ImageBitmap}function o1e(e,t){var r=X1(t,"left",0),a=X1(t,"top",0),n=X1(t,"width",e.width),i=X1(t,"height",e.height),l=n,s=i;if(t.mode==="precision")return{srcLeft:r,srcTop:a,srcWidth:n,srcHeight:i,destWidth:l,destHeight:s};var c;return n>i?(c=n/i,l=uN,s=Math.round(l/c)):(c=i/n,s=uN,l=Math.round(s/c)),(l>n||s>i||l<LU||s<LU)&&(l=n,s=i),{srcLeft:r,srcTop:a,srcWidth:n,srcHeight:i,destWidth:l,destHeight:s}}var a1e=typeof window>"u";function n1e(){return a1e?new OffscreenCanvas(1,1):document.createElement("canvas")}var RU="FastAverageColor: ";function l5(e,t,r){t||(console.error(RU+e),r&&console.error(r))}function Y1(e){return Error(RU+e)}var zU=(function(){function e(){this.canvas=null,this.ctx=null}return e.prototype.getColorAsync=function(t,r){if(!t)return Promise.reject(Y1("call .getColorAsync() without resource."));if(typeof t=="string"){if(typeof Image>"u")return Promise.reject(Y1("resource as string is not supported in this environment"));var a=new Image;return a.crossOrigin=r&&r.crossOrigin||"",a.src=t,this.bindImageEvents(a,r)}else{if(AU(t)&&!t.complete)return this.bindImageEvents(t,r);var n=this.getColor(t,r);return n.error?Promise.reject(n.error):Promise.resolve(n)}},e.prototype.getColor=function(t,r){r=r||{};var a=DU(r);if(!t)return l5("call .getColor(null) without resource",r.silent),this.prepareResult(a);var n=X0e(t),i=o1e(n,r);if(!i.srcWidth||!i.srcHeight||!i.destWidth||!i.destHeight)return l5('incorrect sizes for resource "'.concat(MU(t),'"'),r.silent),this.prepareResult(a);if(this.canvas||(this.canvas=n1e()),!this.ctx&&(this.ctx=this.canvas.getContext&&this.canvas.getContext("2d"),!this.ctx))return l5("Canvas Context 2D is not supported in this browser",r.silent),this.prepareResult(a);this.canvas.width=i.destWidth,this.canvas.height=i.destHeight;var l=a;try{this.ctx.clearRect(0,0,i.destWidth,i.destHeight),this.ctx.drawImage(t,i.srcLeft,i.srcTop,i.srcWidth,i.srcHeight,0,0,i.destWidth,i.destHeight);var s=this.ctx.getImageData(0,0,i.destWidth,i.destHeight).data;l=this.getColorFromArray4(s,r)}catch(c){l5("security error (CORS) for resource ".concat(MU(t),`.
Details: https://developer.mozilla.org/en/docs/Web/HTML/CORS_enabled_image`),r.silent,c)}return this.prepareResult(l)},e.prototype.getColorFromArray4=function(t,r){r=r||{};var a=4,n=t.length,i=DU(r);if(n<a)return i;var l=n-n%a,s=(r.step||1)*a,c;switch(r.algorithm||"sqrt"){case"simple":c=K0e;break;case"sqrt":c=Q0e;break;case"dominant":c=Z0e;break;default:throw Y1("".concat(r.algorithm," is unknown algorithm"))}return c(t,l,{defaultColor:i,ignoredColor:j0e(r.ignoredColor),step:s})},e.prototype.prepareResult=function(t){var r=t.slice(0,3),a=[t[0],t[1],t[2],t[3]/255],n=O0e(t);return{value:[t[0],t[1],t[2],t[3]],rgb:"rgb("+r.join(",")+")",rgba:"rgba("+a.join(",")+")",hex:EU(r),hexa:EU(t),isDark:n,isLight:!n}},e.prototype.destroy=function(){this.canvas&&(this.canvas.width=1,this.canvas.height=1,this.canvas=null),this.ctx=null},e.prototype.bindImageEvents=function(t,r){var a=this;return new Promise(function(n,i){var l=function(){u();var m=a.getColor(t,r);m.error?i(m.error):n(m)},s=function(){u(),i(Y1('Error loading image "'.concat(t.src,'".')))},c=function(){u(),i(Y1('Image "'.concat(t.src,'" loading aborted')))},u=function(){t.removeEventListener("load",l),t.removeEventListener("error",s),t.removeEventListener("abort",c)};t.addEventListener("load",l),t.addEventListener("error",s),t.addEventListener("abort",c)})},e})();var FU=o(Yc(),1);IU([NU]);var th="#FFF",HU="#000";function i1e(e,t){return{r:e.r*e.a+t.r*t.a*(1-e.a),g:e.g*e.a+t.g*t.a*(1-e.a),b:e.b*e.a+t.b*t.a*(1-e.a),a:e.a+t.a*(1-e.a)}}function s5(){return s5.fastAverageColor||(s5.fastAverageColor=new zU),s5.fastAverageColor}var rh=Af(async e=>{if(!e)return th;let{r:t,g:r,b:a,a:n}=Ja(th).toRgb();try{let i=(0,FU.applyFilters)("media.crossOrigin",void 0,e);return(await s5().getColorAsync(e,{defaultColor:[t,r,a,n*255],silent:!0,crossOrigin:i})).hex}catch{return th}});function Qp(e,t,r){if(t===r||e===100)return Ja(t).isDark();let a=Ja(t).alpha(e/100).toRgb(),n=Ja(r).toRgb(),i=i1e(a,n);return Ja(i).isDark()}var Ut=o(v(),1);function l1e(e){return[["core/paragraph",{style:{typography:{textAlign:"center"}},placeholder:(0,pN.__)("Write title\u2026"),...e}]]}var s1e=(e,t)=>!e&&(0,OU.isBlobURL)(t);function c1e({attributes:e,clientId:t,isSelected:r,overlayColor:a,setAttributes:n,setOverlayColor:i,toggleSelection:l,context:{postId:s,postType:c}}){let{contentPosition:u,id:m,url:p,backgroundType:d,useFeaturedImage:f,dimRatio:h,focalPoint:g,hasParallax:b,isDark:y,isRepeated:k,minHeight:_,minHeightUnit:x,alt:S,allowedBlocks:C,templateLock:N,tagName:B="div",isUserOverlayColor:D,sizeSlug:A,poster:H}=e,[F]=(0,J1.useEntityProp)("postType",c,"featured_media",s),{getSettings:z}=(0,um.useSelect)(Bo.store),{__unstableMarkNextChangeAsNotPersistent:I}=(0,um.useDispatch)(Bo.store),R=(0,jl.useRef)({attributes:e,overlayColor:a});(0,jl.useLayoutEffect)(()=>{R.current={attributes:e,overlayColor:a}});let{media:$}=(0,um.useSelect)(Pe=>({media:F&&f?Pe(J1.store).getEntityRecord("postType","attachment",F,{context:"view"}):void 0}),[F,f]),j=$?.media_details?.sizes?.[A]?.source_url??$?.source_url;(0,jl.useEffect)(()=>{(async()=>{if(!f)return;let Pe=await rh(j),{attributes:Ht,overlayColor:qr}=R.current,Co=qr.color;Ht.isUserOverlayColor||(Co=Pe,I(),i(Co));let So=Qp(Ht.dimRatio,Co,Pe);I(),n({isDark:So,isUserOverlayColor:Ht.isUserOverlayColor||!1})})()},[j,I,n,i,f]);let G=f?j:p?.replaceAll("&amp;","&"),O=f?Qt:d,{createErrorNotice:J}=(0,um.useDispatch)(jU.store),{gradientClass:ee,gradientValue:oe}=(0,Bo.__experimentalUseGradient)(),X=async Pe=>{let Ht=Xj(Pe),qr=[Pe?.type,Pe?.media_type].includes(Qt),Co=await rh(qr?Pe?.url:void 0),{attributes:So,overlayColor:Sl}=R.current,qi=Sl.color;So.isUserOverlayColor||(qi=Co,i(qi),I());let Zi=So.url===void 0&&So.dimRatio===100?50:So.dimRatio,vf=Qp(Zi,qi,Co);if(O===Qt&&Ht?.id){let{imageDefaultSize:zc}=z();A&&(Pe?.sizes?.[A]||Pe?.media_details?.sizes?.[A])?(Ht.sizeSlug=A,Ht.url=Pe?.sizes?.[A]?.url||Pe?.media_details?.sizes?.[A]?.source_url):Pe?.sizes?.[zc]||Pe?.media_details?.sizes?.[zc]?(Ht.sizeSlug=zc,Ht.url=Pe?.sizes?.[zc]?.url||Pe?.media_details?.sizes?.[zc]?.source_url):Ht.sizeSlug=Xf}n({...Ht,focalPoint:void 0,useFeaturedImage:void 0,dimRatio:Zi,isDark:vf,isUserOverlayColor:So.isUserOverlayColor||!1})},te=()=>{let Pe=a.color;D||(Pe=HU,i(void 0),I());let Ht=Qp(h,Pe,th);n({url:void 0,id:void 0,backgroundType:void 0,focalPoint:void 0,hasParallax:void 0,isRepeated:void 0,useFeaturedImage:void 0,isDark:Ht})},ne=async Pe=>{let Ht=await rh(G),{attributes:qr}=R.current,Co=Qp(qr.dimRatio,Pe,Ht);i(Pe),I(),n({isUserOverlayColor:!0,isDark:Co})},le=async Pe=>{let Ht=await rh(G),{overlayColor:qr}=R.current,Co=Qp(Pe,qr.color,Ht);n({dimRatio:Pe,isDark:Co})},pe=Pe=>{J(Pe,{type:"snackbar"})},Ie=Pe=>{n({url:Pe,backgroundType:Kc,dimRatio:p===void 0&&h===100?50:h,id:void 0,focalPoint:void 0,hasParallax:void 0,isRepeated:void 0,useFeaturedImage:void 0})},{embedPreview:Ne,isFetchingEmbed:ae}=(0,um.useSelect)(Pe=>{if(O!==Kc||!G)return{embedPreview:void 0,isFetchingEmbed:!1};let{getEmbedPreview:Ht,isRequestingEmbedPreview:qr}=Pe(J1.store);return{embedPreview:Ht(G),isFetchingEmbed:qr(G)}},[G,O]),Re=(0,jl.useMemo)(()=>O!==Kc||!Ne?.html?null:mU(Ne.html),[Ne,O]),Ee=s1e(m,G),ie=Qt===O,fe=Cr===O,ke=Kc===O,je=(0,Bo.useBlockEditingMode)(),de=je==="default",[ct,{height:at,width:kt}]=(0,c5.useResizeObserver)(),Wr=(0,jl.useMemo)(()=>({height:x==="px"&&_?_:"auto",width:"auto"}),[_,x]),ut=_&&x?`${_}${x}`:_,br=!(b||k),mt={minHeight:ut||void 0},wo=G?`url(${G})`:void 0,Y=Qo(g),ze={backgroundColor:a.color},Me={objectPosition:g&&br?Qo(g):void 0},Xe=!!(G||a.color||oe),Te=(0,um.useSelect)(Pe=>Pe(Bo.store).getBlock(t).innerBlocks.length>0,[t]),Bt=(0,jl.useRef)(),yr=(0,Bo.useBlockProps)({ref:Bt}),[xn]=(0,Bo.useSettings)("typography.fontSizes"),Je=xn?.length>0,$r=l1e({fontSize:Je?"large":void 0}),ip=(0,Bo.useInnerBlocksProps)({className:"wp-block-cover__inner-container"},{template:Te?void 0:$r,templateInsertUpdatesSelection:!0,allowedBlocks:C,templateLock:N,dropZoneElement:Bt.current}),Cs=(0,jl.useRef)(),Ru={isVideoBackground:fe,isImageBackground:ie,mediaElement:Cs,hasInnerBlocks:Te,url:G,isImgElement:br,overlayColor:a},kn=async()=>{let Pe=!f,Ht=Pe?await rh(j):th,{attributes:qr,overlayColor:Co}=R.current,So=qr.isUserOverlayColor?Co.color:Ht;qr.isUserOverlayColor||(i(Pe?So:void 0),I());let Sl=qr.dimRatio===100?50:qr.dimRatio,qi=Qp(Sl,So,Ht);n({id:void 0,url:void 0,useFeaturedImage:Pe,dimRatio:Sl,backgroundType:f?Qt:void 0,isDark:qi})},ja=(0,Ut.jsx)(fU,{attributes:e,setAttributes:n,onSelectMedia:X,onSelectEmbedUrl:Ie,currentSettings:Ru,toggleUseFeaturedImage:kn,onClearMedia:te,blockEditingMode:je}),gf=(0,Ut.jsx)(sU,{attributes:e,setAttributes:n,clientId:t,setOverlayColor:ne,coverRef:Bt,currentSettings:Ru,toggleUseFeaturedImage:kn,updateDimRatio:le,onClearMedia:te,featuredImage:$}),zu={className:"block-library-cover__resize-container",clientId:t,height:at,minHeight:ut,onResizeStart:()=>{n({minHeightUnit:"px"}),l(!1)},onResize:Pe=>{n({minHeight:Pe})},onResizeStop:Pe=>{l(!0),n({minHeight:Pe})},showHandle:!e.style?.dimensions?.aspectRatio,size:Wr,width:kt};if(!f&&!Te&&!Xe)return(0,Ut.jsxs)(Ut.Fragment,{children:[ja,gf,de&&r&&(0,Ut.jsx)(aN,{...zu}),(0,Ut.jsxs)(B,{...yr,className:w("is-placeholder",yr.className),style:{...yr.style,minHeight:ut||void 0},children:[ct,(0,Ut.jsx)(oN,{onSelectMedia:X,onError:pe,toggleUseFeaturedImage:kn,children:(0,Ut.jsx)("div",{className:"wp-block-cover__placeholder-background-options",children:(0,Ut.jsx)(Bo.ColorPalette,{disableCustomColors:!0,value:a.color,onChange:ne,clearable:!1,asButtons:!0,"aria-label":(0,pN.__)("Overlay color")})})})]})]});let Ss=w({"is-dark-theme":y,"is-light":!y,"is-transient":Ee,"has-parallax":b,"is-repeated":k,"has-custom-content-position":!Ya(u)},Nn(u)),Ts=G||!f||f&&!G;return(0,Ut.jsxs)(Ut.Fragment,{children:[ja,gf,(0,Ut.jsxs)(B,{...yr,className:w(Ss,yr.className),style:{...mt,...yr.style},"data-url":G,children:[ct,!G&&f&&(0,Ut.jsx)(Yp.Placeholder,{className:"wp-block-cover__image--placeholder-image",withIllustration:!0}),G&&ie&&(br?(0,Ut.jsx)("img",{ref:Cs,className:"wp-block-cover__image-background",alt:S,src:G,style:Me}):(0,Ut.jsx)("div",{ref:Cs,role:S?"img":void 0,"aria-label":S||void 0,className:w(Ss,"wp-block-cover__image-background"),style:{backgroundImage:wo,backgroundPosition:Y}})),G&&fe&&(0,Ut.jsx)("video",{ref:Cs,className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:G,poster:H,style:Me}),ke&&Re&&(0,Ut.jsx)("div",{ref:Cs,className:"wp-block-cover__video-background wp-block-cover__embed-background",style:Me,children:(0,Ut.jsx)(Yp.SandBox,{allowSameOrigin:!0,html:Re,title:"Background video",styles:["iframe{position:fixed;top:0;left:0;width:100%;height:100%;}"]})}),ke&&!Re&&ae&&(0,Ut.jsx)(Yp.Spinner,{}),Ts&&(0,Ut.jsx)("span",{"aria-hidden":"true",className:w("wp-block-cover__background",al(h),{[a.class]:a.class,"has-background-dim":h!==void 0,"wp-block-cover__gradient-background":G&&oe&&h!==0,"has-background-gradient":oe,[ee]:ee}),style:{backgroundImage:oe,...ze}}),Ee&&(0,Ut.jsx)(Yp.Spinner,{}),(0,Ut.jsx)(oN,{disableMediaButtons:!0,onSelectMedia:X,onError:pe,toggleUseFeaturedImage:kn}),(0,Ut.jsx)("div",{...ip})]}),de&&r&&(0,Ut.jsx)(aN,{...zu})]})}var UU=(0,c5.compose)([(0,Bo.withColors)({overlayColor:"background-color"})])(c1e);var u5={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/cover",title:"Cover",category:"media",description:"Add an image or video with a text overlay.",textdomain:"default",attributes:{url:{type:"string",role:"content"},useFeaturedImage:{type:"boolean",default:!1},id:{type:"number"},alt:{type:"string",default:""},hasParallax:{type:"boolean",default:!1},isRepeated:{type:"boolean",default:!1},dimRatio:{type:"number",default:100},overlayColor:{type:"string"},customOverlayColor:{type:"string"},isUserOverlayColor:{type:"boolean"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"},isDark:{type:"boolean",default:!0},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]},tagName:{type:"string",default:"div"},sizeSlug:{type:"string"},poster:{type:"string",source:"attribute",selector:"video",attribute:"poster"}},usesContext:["postId","postType"],supports:{anchor:!0,align:!0,html:!1,shadow:!0,spacing:{padding:!0,margin:["top","bottom"],blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},color:{heading:!0,text:!0,background:!1,__experimentalSkipSerialization:["gradients"],enableContrastChecker:!1},dimensions:{aspectRatio:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:{allowJustification:!1},interactivity:{clientNavigation:!0},filter:{duotone:!0},allowedBlocks:!0},selectors:{filter:{duotone:".wp-block-cover > .wp-block-cover__image-background, .wp-block-cover > .wp-block-cover__video-background"}},editorStyle:"wp-block-cover-editor",style:"wp-block-cover"};var mm=o(T(),1);var Vs=o(v(),1);function GU({attributes:e}){let{backgroundType:t,gradient:r,contentPosition:a,customGradient:n,customOverlayColor:i,dimRatio:l,focalPoint:s,useFeaturedImage:c,hasParallax:u,isDark:m,isRepeated:p,overlayColor:d,url:f,alt:h,id:g,minHeight:b,minHeightUnit:y,tagName:k,sizeSlug:_,poster:x}=e,S=(0,mm.getColorClassName)("background-color",d),C=(0,mm.__experimentalGetGradientClass)(r),N=b&&y?`${b}${y}`:b,B=Qt===t,D=Cr===t,A=Kc===t,H=!(u||p),F={minHeight:N||void 0},z={backgroundColor:S?void 0:i,background:n||void 0},I=s&&H?Qo(s):void 0,R=f?`url(${f})`:void 0,$=Qo(s),j=w({"is-light":!m,"has-parallax":u,"is-repeated":p,"has-custom-content-position":!Ya(a)},Nn(a)),G=w("wp-block-cover__image-background",g?`wp-image-${g}`:null,{[`size-${_}`]:_,"has-parallax":u,"is-repeated":p}),O=r||n;return(0,Vs.jsxs)(k,{...mm.useBlockProps.save({className:j,style:F}),children:[!c&&B&&f&&(H?(0,Vs.jsx)("img",{className:G,alt:h,src:f,style:{objectPosition:I},"data-object-fit":"cover","data-object-position":I}):(0,Vs.jsx)("div",{role:h?"img":void 0,"aria-label":h||void 0,className:G,style:{backgroundPosition:$,backgroundImage:R}})),D&&f&&(0,Vs.jsx)("video",{className:w("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:f,poster:x,style:{objectPosition:I},"data-object-fit":"cover","data-object-position":I}),A&&f&&(0,Vs.jsx)("figure",{className:w("wp-block-cover__video-background","wp-block-cover__embed-background","wp-block-embed"),children:(0,Vs.jsx)("div",{className:"wp-block-embed__wrapper",children:f})}),(0,Vs.jsx)("span",{"aria-hidden":"true",className:w("wp-block-cover__background",S,al(l),{"has-background-dim":l!==void 0,"wp-block-cover__gradient-background":f&&O&&l!==0,"has-background-gradient":O,[C]:C}),style:z}),(0,Vs.jsx)("div",{...mm.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})}var hi=o(W(),1),WU=o(T(),1);var{cleanEmptyObject:m5}=K(WU.privateApis),m1e={from:[{type:"block",blocks:["core/image"],transform:({caption:e,url:t,alt:r,align:a,id:n,anchor:i,style:l})=>(0,hi.createBlock)("core/cover",{dimRatio:50,url:t,alt:r,align:a,id:n,anchor:i,style:{color:{duotone:l?.color?.duotone}}},[(0,hi.createBlock)("core/paragraph",{content:e,fontSize:"large",style:{typography:{textAlign:"center"}}})])},{type:"block",blocks:["core/video"],transform:({caption:e,src:t,align:r,id:a,anchor:n})=>(0,hi.createBlock)("core/cover",{dimRatio:50,url:t,align:r,id:a,backgroundType:Cr,anchor:n},[(0,hi.createBlock)("core/paragraph",{content:e,fontSize:"large",style:{typography:{textAlign:"center"}}})])},{type:"block",blocks:["core/group"],transform:(e,t)=>{let{align:r,anchor:a,backgroundColor:n,gradient:i,style:l}=e;if(t?.length===1&&t[0]?.name==="core/cover")return(0,hi.createBlock)("core/cover",t[0].attributes,t[0].innerBlocks);let s=n||i||l?.color?.background||l?.color?.gradient?void 0:50,c={align:r,anchor:a,dimRatio:s,overlayColor:n,customOverlayColor:l?.color?.background,gradient:i,customGradient:l?.color?.gradient},u={...e,backgroundColor:void 0,gradient:void 0,style:m5({...e?.style,color:l?.color?{...l?.color,background:void 0,gradient:void 0}:void 0})};return(0,hi.createBlock)("core/cover",c,[(0,hi.createBlock)("core/group",u,t)])}}],to:[{type:"block",blocks:["core/image"],isMatch:({backgroundType:e,url:t,overlayColor:r,customOverlayColor:a,gradient:n,customGradient:i})=>t?e===Qt:!r&&!a&&!n&&!i,transform:({title:e,url:t,alt:r,align:a,id:n,anchor:i,style:l})=>(0,hi.createBlock)("core/image",{caption:e,url:t,alt:r,align:a,id:n,anchor:i,style:{color:{duotone:l?.color?.duotone}}})},{type:"block",blocks:["core/video"],isMatch:({backgroundType:e,url:t,overlayColor:r,customOverlayColor:a,gradient:n,customGradient:i})=>t?e===Cr:!r&&!a&&!n&&!i,transform:({title:e,url:t,align:r,id:a,anchor:n})=>(0,hi.createBlock)("core/video",{caption:e,src:t,id:a,align:r,anchor:n})},{type:"block",blocks:["core/group"],isMatch:({url:e,useFeaturedImage:t})=>!(e||t),transform:(e,t)=>{let r={backgroundColor:e?.overlayColor,gradient:e?.gradient,style:m5({...e?.style,color:e?.customOverlayColor||e?.customGradient||e?.style?.color?{background:e?.customOverlayColor,gradient:e?.customGradient,...e?.style?.color}:void 0})};if(t?.length===1&&t[0]?.name==="core/group"){let a=m5(t[0].attributes||{});return a?.backgroundColor||a?.gradient||a?.style?.color?.background||a?.style?.color?.gradient?(0,hi.createBlock)("core/group",a,t[0]?.innerBlocks):(0,hi.createBlock)("core/group",{...r,...a,style:m5({...a?.style,color:r?.style?.color||a?.style?.color?{...r?.style?.color,...a?.style?.color}:void 0})},t[0]?.innerBlocks)}return(0,hi.createBlock)("core/group",{...e,...r},t)}}]},$U=m1e;var dN=o(P(),1);var p1e=[{name:"cover",title:(0,dN.__)("Cover"),description:(0,dN.__)("Add an image or video with a text overlay."),attributes:{layout:{type:"constrained"}},isDefault:!0,icon:xp}],qU=p1e;var{fieldsKey:d1e,formKey:f1e}=K(ZU.privateApis),{name:KU}=u5,p5={icon:xp,example:{attributes:{customOverlayColor:"#065174",dimRatio:40,url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg",style:{typography:{fontSize:48},color:{text:"white"}}},innerBlocks:[{name:"core/paragraph",attributes:{content:`<strong>${(0,fN.__)("Snow Patrol")}</strong>`,style:{typography:{textAlign:"center"}}}}]},transforms:$U,save:GU,edit:UU,deprecated:Jj,variations:qU};window.__experimentalContentOnlyInspectorFields&&(p5[d1e]=[{id:"background",label:(0,fN.__)("Background"),type:"media",Edit:{control:"media",allowedTypes:["image","video"],multiple:!1,useFeaturedImage:!0},getValue:({item:e})=>({id:e.id,url:e.url,alt:e.alt,mediaType:e.backgroundType,featuredImage:e.useFeaturedImage}),setValue:({value:e})=>({id:e.id,url:e.url,alt:e.alt,mediaType:e.backgroundType,useFeaturedImage:e.featuredImage})}],p5[f1e]={fields:["background"]});var h1e=()=>E({name:KU,metadata:u5,settings:p5});var gN={};Z(gN,{init:()=>k1e,metadata:()=>d5,name:()=>rG,settings:()=>h5});var pm=o(P(),1),tG=o(W(),1);var d5={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/details",title:"Details",category:"text",description:"Hide and show additional content.",keywords:["summary","toggle","disclosure"],textdomain:"default",attributes:{showContent:{type:"boolean",default:!1},summary:{type:"rich-text",source:"rich-text",selector:"summary",role:"content"},name:{type:"string",source:"attribute",attribute:"name",selector:".wp-block-details"},placeholder:{type:"string"}},supports:{__experimentalOnEnter:!0,align:["wide","full"],anchor:!0,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},__experimentalBorder:{color:!0,width:!0,style:!0},html:!1,spacing:{margin:!0,padding:!0,blockGap:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:{allowEditing:!1},interactivity:{clientNavigation:!0},allowedBlocks:!0},editorStyle:"wp-block-details-editor",style:"wp-block-details"};var Ul=o(T(),1),Fs=o(M(),1),Xc=o(P(),1),QU=o(U(),1),YU=o(V(),1);var En=o(v(),1),{withIgnoreIMEEvents:v1e}=K(Fs.privateApis),b1e=[["core/paragraph",{placeholder:(0,Xc.__)("Type / to add a hidden block")}]];function y1e({attributes:e,setAttributes:t,clientId:r}){let{name:a,showContent:n,summary:i,allowedBlocks:l,placeholder:s}=e,c=(0,Ul.useBlockProps)(),u=(0,Ul.useInnerBlocksProps)(c,{template:b1e,__experimentalCaptureToolbars:!0,allowedBlocks:l}),[m,p]=(0,QU.useState)(n),d=q(),f=(0,YU.useSelect)(b=>b(Ul.store).hasSelectedInnerBlock(r,!0),[r]),h=b=>{b.key==="Enter"&&!b.shiftKey&&(p(y=>!y),b.preventDefault())},g=b=>{b.key===" "&&b.preventDefault()};return(0,En.jsxs)(En.Fragment,{children:[(0,En.jsx)(Ul.InspectorControls,{children:(0,En.jsx)(Fs.__experimentalToolsPanel,{label:(0,Xc.__)("Settings"),resetAll:()=>{t({showContent:!1})},dropdownMenuProps:d,children:(0,En.jsx)(Fs.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,Xc.__)("Open by default"),hasValue:()=>n,onDeselect:()=>{t({showContent:!1})},children:(0,En.jsx)(Fs.ToggleControl,{label:(0,Xc.__)("Open by default"),checked:n,onChange:()=>t({showContent:!n})})})})}),(0,En.jsx)(Ul.InspectorControls,{group:"advanced",children:(0,En.jsx)(Fs.TextControl,{__next40pxDefaultSize:!0,label:(0,Xc.__)("Name attribute"),value:a||"",onChange:b=>t({name:b}),help:(0,Xc.__)("Enables multiple Details blocks with the same name attribute to be connected, with only one open at a time.")})}),(0,En.jsxs)("details",{...u,open:m||f,onToggle:b=>p(b.target.open),name:a||"",children:[(0,En.jsx)("summary",{onKeyDown:v1e(h),onKeyUp:g,children:(0,En.jsx)(Ul.RichText,{identifier:"summary","aria-label":(0,Xc.__)("Write summary. Press Enter to expand or collapse the details."),placeholder:s||(0,Xc.__)("Write summary\u2026"),withoutInteractiveFormatting:!0,value:i,onChange:b=>t({summary:b})})}),u.children]})]})}var XU=y1e;var ah=o(T(),1),oh=o(v(),1);function JU({attributes:e}){let{name:t,showContent:r}=e,a=e.summary?e.summary:"Details",n=ah.useBlockProps.save();return(0,oh.jsxs)("details",{...n,name:t||void 0,open:r,children:[(0,oh.jsx)("summary",{children:(0,oh.jsx)(ah.RichText.Content,{value:a})}),(0,oh.jsx)(ah.InnerBlocks.Content,{})]})}var f5=o(W(),1),eG={from:[{type:"block",isMultiBlock:!0,blocks:["*"],isMatch({},e){return!(e.length===1&&e[0].name==="core/details")},__experimentalConvert(e){return(0,f5.createBlock)("core/details",{},e.map(t=>(0,f5.cloneBlock)(t)))}}]};var{fieldsKey:_1e,formKey:x1e}=K(tG.privateApis),{name:rG}=d5,h5={icon:T9,example:{attributes:{summary:(0,pm.__)("La Mancha"),showContent:!0},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,pm.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.")}}]},__experimentalLabel(e,{context:t}){let{summary:r}=e,a=e?.metadata?.name,n=r?.trim().length>0;if(t==="list-view"&&(a||n))return a||r;if(t==="breadcrumb"&&a)return a;if(t==="accessibility")return n?(0,pm.sprintf)((0,pm.__)("Details. %s"),r):(0,pm.__)("Details. Empty.")},save:JU,edit:XU,transforms:eG};window.__experimentalContentOnlyInspectorFields&&(h5[_1e]=[{id:"summary",label:(0,pm.__)("Summary"),type:"text",Edit:"rich-text"}],h5[x1e]={fields:["summary"]});var k1e=()=>E({name:rG,metadata:d5,settings:h5});var wN={};Z(wN,{init:()=>M1e,metadata:()=>Ls,name:()=>FG,settings:()=>HG});var Xp=o(P(),1),Hs=o(M(),1),g5=o(T(),1);var ll=o(v(),1);function w1e(e){return e?(0,Xp.__)("This embed will preserve its aspect ratio when the browser is resized."):(0,Xp.__)("This embed may not preserve its aspect ratio when the browser is resized.")}var C1e=({blockSupportsResponsive:e,showEditButton:t,themeSupportsResponsive:r,allowResponsive:a,toggleResponsive:n,switchBackToURLInput:i})=>{let l=q();return(0,ll.jsxs)(ll.Fragment,{children:[(0,ll.jsx)(g5.BlockControls,{children:(0,ll.jsx)(Hs.ToolbarGroup,{children:t&&(0,ll.jsx)(Hs.ToolbarButton,{className:"components-toolbar__control",label:(0,Xp.__)("Edit URL"),icon:Pp,onClick:i})})}),r&&e&&(0,ll.jsx)(g5.InspectorControls,{children:(0,ll.jsx)(Hs.__experimentalToolsPanel,{label:(0,Xp.__)("Media settings"),resetAll:()=>{n(!0)},dropdownMenuProps:l,children:(0,ll.jsx)(Hs.__experimentalToolsPanelItem,{label:(0,Xp.__)("Media settings"),isShownByDefault:!0,hasValue:()=>!a,onDeselect:()=>{n(!a)},children:(0,ll.jsx)(Hs.ToggleControl,{label:(0,Xp.__)("Resize for smaller devices"),checked:a,help:w1e,onChange:n})})})})]})},oG=C1e;var ye=o(M(),1),xe=o(v(),1),Gl=(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,xe.jsx)(ye.Path,{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-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zm-6-9.5L16 12l-2.5 2.8 1.1 1L18 12l-3.5-3.5-1 1zm-3 0l-1-1L6 12l3.5 3.8 1.1-1L8 12l2.5-2.5z"})}),v5=(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,xe.jsx)(ye.Path,{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-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM13.2 7.7c-.4.4-.7 1.1-.7 1.9v3.7c-.4-.3-.8-.4-1.3-.4-1.2 0-2.2 1-2.2 2.2 0 1.2 1 2.2 2.2 2.2.5 0 1-.2 1.4-.5.9-.6 1.4-1.6 1.4-2.6V9.6c0-.4.1-.6.2-.8.3-.3 1-.3 1.6-.3h.2V7h-.2c-.7 0-1.8 0-2.6.7z"})}),vN=(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,xe.jsx)(ye.Path,{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-2zM9.2 4.5H19c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V9.8l4.6-5.3zm9.8 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})}),nh=(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,xe.jsx)(ye.Path,{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-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM10 15l5-3-5-3v6z"})}),aG={foreground:"#000000",src:(0,xe.jsx)(ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xe.jsx)(ye.Path,{d:"M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z"})})},nG={foreground:"#ff0000",src:(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",children:(0,xe.jsx)(ye.Path,{d:"M21.8 8s-.195-1.377-.795-1.984c-.76-.797-1.613-.8-2.004-.847-2.798-.203-6.996-.203-6.996-.203h-.01s-4.197 0-6.996.202c-.39.046-1.242.05-2.003.846C2.395 6.623 2.2 8 2.2 8S2 9.62 2 11.24v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.76.797 1.76.77 2.205.855 1.6.153 6.8.2 6.8.2s4.203-.005 7-.208c.392-.047 1.244-.05 2.005-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517C22 9.62 21.8 8 21.8 8zM9.935 14.595v-5.62l5.403 2.82-5.403 2.8z"})})},iG={foreground:"#3b5998",src:(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",children:(0,xe.jsx)(ye.Path,{d:"M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z"})})},lG=(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",children:(0,xe.jsx)(ye.G,{children:(0,xe.jsx)(ye.Path,{d:"M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z"})})}),sG={foreground:"#0073AA",src:(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",children:(0,xe.jsx)(ye.G,{children:(0,xe.jsx)(ye.Path,{d:"M12.158 12.786l-2.698 7.84c.806.236 1.657.365 2.54.365 1.047 0 2.05-.18 2.986-.51-.024-.037-.046-.078-.065-.123l-2.762-7.57zM3.008 12c0 3.56 2.07 6.634 5.068 8.092L3.788 8.342c-.5 1.117-.78 2.354-.78 3.658zm15.06-.454c0-1.112-.398-1.88-.74-2.48-.456-.74-.883-1.368-.883-2.11 0-.825.627-1.595 1.51-1.595.04 0 .078.006.116.008-1.598-1.464-3.73-2.36-6.07-2.36-3.14 0-5.904 1.613-7.512 4.053.21.008.41.012.58.012.94 0 2.395-.114 2.395-.114.484-.028.54.684.057.74 0 0-.487.058-1.03.086l3.275 9.74 1.968-5.902-1.4-3.838c-.485-.028-.944-.085-.944-.085-.486-.03-.43-.77.056-.742 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.486-.028.543.684.058.74 0 0-.488.058-1.03.086l3.25 9.665.897-2.997c.456-1.17.684-2.137.684-2.907zm1.82-3.86c.04.286.06.593.06.924 0 .912-.17 1.938-.683 3.22l-2.746 7.94c2.672-1.558 4.47-4.454 4.47-7.77 0-1.564-.4-3.033-1.1-4.314zM12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10z"})})})},cG={foreground:"#1db954",src:(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",children:(0,xe.jsx)(ye.Path,{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424c-.18.295-.563.387-.857.207-2.35-1.434-5.305-1.76-8.786-.963-.335.077-.67-.133-.746-.47-.077-.334.132-.67.47-.745 3.808-.87 7.076-.496 9.712 1.115.293.18.386.563.206.857M17.81 13.7c-.226.367-.706.482-1.072.257-2.687-1.652-6.785-2.13-9.965-1.166-.413.127-.848-.106-.973-.517-.125-.413.108-.848.52-.973 3.632-1.102 8.147-.568 11.234 1.328.366.226.48.707.256 1.072m.105-2.835C14.692 8.95 9.375 8.775 6.297 9.71c-.493.15-1.016-.13-1.166-.624-.148-.495.13-1.017.625-1.167 3.532-1.073 9.404-.866 13.115 1.337.445.264.59.838.327 1.282-.264.443-.838.59-1.282.325"})})},uG=(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",children:(0,xe.jsx)(ye.Path,{d:"m6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5zm11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5z"})}),mG={foreground:"#1ab7ea",src:(0,xe.jsx)(ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xe.jsx)(ye.G,{children:(0,xe.jsx)(ye.Path,{d:"M22.396 7.164c-.093 2.026-1.507 4.8-4.245 8.32C15.323 19.16 12.93 21 10.97 21c-1.214 0-2.24-1.12-3.08-3.36-.56-2.052-1.118-4.105-1.68-6.158-.622-2.24-1.29-3.36-2.004-3.36-.156 0-.7.328-1.634.98l-.978-1.26c1.027-.903 2.04-1.806 3.037-2.71C6 3.95 7.03 3.328 7.716 3.265c1.62-.156 2.616.95 2.99 3.32.404 2.558.685 4.148.84 4.77.468 2.12.982 3.18 1.543 3.18.435 0 1.09-.687 1.963-2.064.872-1.376 1.34-2.422 1.402-3.142.125-1.187-.343-1.782-1.4-1.782-.5 0-1.013.115-1.542.34 1.023-3.35 2.977-4.976 5.862-4.883 2.14.063 3.148 1.45 3.024 4.16z"})})})},pG=(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",children:(0,xe.jsx)(ye.Path,{d:"M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z"})}),dG={foreground:"#35465c",src:(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",children:(0,xe.jsx)(ye.Path,{d:"M19 3H5a2 2 0 00-2 2v14c0 1.1.9 2 2 2h14a2 2 0 002-2V5a2 2 0 00-2-2zm-5.69 14.66c-2.72 0-3.1-1.9-3.1-3.16v-3.56H8.49V8.99c1.7-.62 2.54-1.99 2.64-2.87 0-.06.06-.41.06-.58h1.9v3.1h2.17v2.3h-2.18v3.1c0 .47.13 1.3 1.2 1.26h1.1v2.36c-1.01.02-2.07 0-2.07 0z"})})},fG=(0,xe.jsxs)(ye.SVG,{viewBox:"0 0 24 24",children:[(0,xe.jsx)(ye.Path,{d:"M18.42 14.58c-.51-.66-1.05-1.23-1.05-2.5V7.87c0-1.8.15-3.45-1.2-4.68-1.05-1.02-2.79-1.35-4.14-1.35-2.6 0-5.52.96-6.12 4.14-.06.36.18.54.4.57l2.66.3c.24-.03.42-.27.48-.5.24-1.12 1.17-1.63 2.2-1.63.56 0 1.22.21 1.55.7.4.56.33 1.31.33 1.97v.36c-1.59.18-3.66.27-5.16.93a4.63 4.63 0 0 0-2.93 4.44c0 2.82 1.8 4.23 4.1 4.23 1.95 0 3.03-.45 4.53-1.98.51.72.66 1.08 1.59 1.83.18.09.45.09.63-.1v.04l2.1-1.8c.24-.21.2-.48.03-.75zm-5.4-1.2c-.45.75-1.14 1.23-1.92 1.23-1.05 0-1.65-.81-1.65-1.98 0-2.31 2.1-2.73 4.08-2.73v.6c0 1.05.03 1.92-.5 2.88z"}),(0,xe.jsx)(ye.Path,{d:"M21.69 19.2a17.62 17.62 0 0 1-21.6-1.57c-.23-.2 0-.5.28-.33a23.88 23.88 0 0 0 20.93 1.3c.45-.19.84.3.39.6z"}),(0,xe.jsx)(ye.Path,{d:"M22.8 17.96c-.36-.45-2.22-.2-3.1-.12-.23.03-.3-.18-.05-.36 1.5-1.05 3.96-.75 4.26-.39.3.36-.1 2.82-1.5 4.02-.21.18-.42.1-.3-.15.3-.8 1.02-2.58.69-3z"})]}),hG=(0,xe.jsxs)(ye.SVG,{viewBox:"0 0 24 24",children:[(0,xe.jsx)(ye.Path,{d:"m.0206909 21 19.8160091-13.07806 3.5831 6.20826z",fill:"#4bc7ee"}),(0,xe.jsx)(ye.Path,{d:"m23.7254 19.0205-10.1074-17.18468c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418h22.5655c1.279 0 1.8019-.8905 1.1599-1.9795z",fill:"#d4cdcb"}),(0,xe.jsx)(ye.Path,{d:"m.0206909 21 15.2439091-16.38571 4.3029 7.32271z",fill:"#c3d82e"}),(0,xe.jsx)(ye.Path,{d:"m13.618 1.83582c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418 15.2646-16.38573z",fill:"#e4ecb0"}),(0,xe.jsx)(ye.Path,{d:"m.0206909 21 19.5468091-9.063 1.6621 2.8344z",fill:"#209dbd"}),(0,xe.jsx)(ye.Path,{d:"m.0206909 21 17.9209091-11.82623 1.6259 2.76323z",fill:"#7cb3c9"})]}),gG=(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",children:(0,xe.jsx)(ye.Path,{d:"M11.903 16.568c-1.82 0-3.124-1.281-3.124-2.967a2.987 2.987 0 0 1 2.989-2.989c1.663 0 2.944 1.304 2.944 3.034 0 1.663-1.281 2.922-2.81 2.922ZM17.997 3l-3.308.73v5.107c-.809-1.034-2.045-1.37-3.505-1.37-1.529 0-2.9.561-4.023 1.662-1.259 1.214-1.933 2.764-1.933 4.495 0 1.888.72 3.506 2.113 4.742 1.056.944 2.314 1.415 3.775 1.415 1.438 0 2.517-.382 3.573-1.415v1.415h3.308V3Z",fill:"#333436"})}),vG=(0,xe.jsx)(ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,xe.jsx)(ye.Path,{d:"M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2"})}),bG=(0,xe.jsx)(ye.SVG,{viewBox:"0 0 44 44",children:(0,xe.jsx)(ye.Path,{d:"M32.59521,22.001l4.31885-4.84473-6.34131-1.38379.646-6.459-5.94336,2.61035L22,6.31934l-3.27344,5.60351L12.78418,9.3125l.645,6.458L7.08643,17.15234,11.40479,21.999,7.08594,26.84375l6.34131,1.38379-.64551,6.458,5.94287-2.60938L22,37.68066l3.27344-5.60351,5.94287,2.61035-.64551-6.458,6.34277-1.38183Zm.44385,2.75244L30.772,23.97827l-1.59558-2.07391,1.97888.735Zm-8.82147,6.1579L22.75,33.424V30.88977l1.52228-2.22168ZM18.56226,13.48816,19.819,15.09534l-2.49219-.88642L15.94037,12.337Zm6.87719.00116,2.62043-1.15027-1.38654,1.86981L24.183,15.0946Zm3.59357,2.6029-1.22546,1.7381.07525-2.73486,1.44507-1.94867ZM22,29.33008l-2.16406-3.15686L22,23.23688l2.16406,2.93634Zm-4.25458-9.582-.10528-3.836,3.60986,1.284v3.73242Zm5.00458-2.552,3.60986-1.284-.10528,3.836L22.75,20.92853Zm-7.78174-1.10559-.29352-2.94263,1.44245,1.94739.07519,2.73321Zm2.30982,5.08319,3.50817,1.18164-2.16247,2.9342-3.678-1.08447Zm2.4486,7.49285L21.25,30.88977v2.53485L19.78052,30.91Zm3.48707-6.31121,3.50817-1.18164,2.33228,3.03137-3.678,1.08447Zm10.87219-4.28113-2.714,3.04529L28.16418,19.928l1.92176-2.72565ZM24.06036,12.81769l-2.06012,2.6322-2.059-2.63318L22,9.292ZM9.91455,18.07227l4.00079-.87195,1.921,2.72735-3.20794,1.19019Zm2.93024,4.565,1.9801-.73462L13.228,23.97827l-2.26838.77429Zm-1.55591,3.58819L13.701,25.4021l2.64935.78058-2.14447.67853Zm3.64868,1.977L18.19,27.17334l.08313,3.46332L14.52979,32.2793Zm10.7876,2.43549.08447-3.464,3.25165,1.03052.407,4.07684Zm4.06824-3.77478-2.14545-.68,2.65063-.781,2.41266.825Z"})}),yG={foreground:"#f43e37",src:(0,xe.jsxs)(ye.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,xe.jsx)(ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M24,12A12,12,0,1,1,12,0,12,12,0,0,1,24,12Z"}),(0,xe.jsx)(ye.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M2.67,12a9.33,9.33,0,0,1,18.66,0H19a7,7,0,1,0-7,7v2.33A9.33,9.33,0,0,1,2.67,12ZM12,17.6A5.6,5.6,0,1,1,17.6,12h-2A3.56,3.56,0,1,0,12,15.56Z",fill:"#fff"})]})},_G=(0,xe.jsx)(ye.SVG,{viewBox:"0 0 24 24",children:(0,xe.jsx)(ye.Path,{fill:"#0a7aff",d:"M6.3,4.2c2.3,1.7,4.8,5.3,5.7,7.2.9-1.9,3.4-5.4,5.7-7.2,1.7-1.3,4.3-2.2,4.3.9s-.4,5.2-.6,5.9c-.7,2.6-3.3,3.2-5.6,2.8,4,.7,5.1,3,2.9,5.3-5,5.2-6.7-2.8-6.7-2.8,0,0-1.7,8-6.7,2.8-2.2-2.3-1.2-4.6,2.9-5.3-2.3.4-4.9-.3-5.6-2.8-.2-.7-.6-5.3-.6-5.9,0-3.1,2.7-2.1,4.3-.9h0Z"})});var xG=o(M(),1),bN=o(v(),1),S1e=()=>(0,bN.jsx)("div",{className:"wp-block-embed is-loading",children:(0,bN.jsx)(xG.Spinner,{})}),kG=S1e;var Os=o(P(),1),Ln=o(M(),1),wG=o(T(),1),Dn=o(v(),1),T1e=({icon:e,label:t,value:r,onSubmit:a,onChange:n,cannotEmbed:i,fallback:l,tryAgain:s})=>(0,Dn.jsxs)(Ln.Placeholder,{icon:(0,Dn.jsx)(wG.BlockIcon,{icon:e,showColors:!0}),label:t,className:"wp-block-embed",instructions:(0,Os.__)("Paste a link to the content you want to display on your site."),children:[(0,Dn.jsxs)("form",{onSubmit:a,children:[(0,Dn.jsx)(Ln.__experimentalInputControl,{__next40pxDefaultSize:!0,type:"url",value:r||"",className:"wp-block-embed__placeholder-input",label:t,hideLabelFromVision:!0,placeholder:(0,Os.__)("Enter URL to embed here\u2026"),onChange:n}),(0,Dn.jsx)(Ln.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,Os._x)("Embed","button label")})]}),(0,Dn.jsx)("div",{className:"wp-block-embed__learn-more",children:(0,Dn.jsx)(Ln.ExternalLink,{href:(0,Os.__)("https://wordpress.org/documentation/article/embeds/"),children:(0,Os.__)("Learn more about embeds")})}),i&&(0,Dn.jsxs)(Ln.__experimentalVStack,{spacing:3,className:"components-placeholder__error",children:[(0,Dn.jsx)("div",{className:"components-placeholder__instructions",children:(0,Os.__)("Sorry, this content could not be embedded.")}),(0,Dn.jsxs)(Ln.__experimentalHStack,{expanded:!1,spacing:3,justify:"flex-start",children:[(0,Dn.jsx)(Ln.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:s,children:(0,Os._x)("Try again","button label")})," ",(0,Dn.jsx)(Ln.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:l,children:(0,Os._x)("Convert to link","button label")})]})]})]}),CG=T1e;var lh=o(P(),1),y5=o(M(),1),TG=o(T(),1),PG=o(U(),1),BG=o(mr(),1);var b5=o(me(),1),ih=o(U(),1),yN=o(v(),1),P1e={class:"className",frameborder:"frameBorder",marginheight:"marginHeight",marginwidth:"marginWidth"};function SG({html:e}){let t=(0,ih.useRef)(),r=(0,ih.useMemo)(()=>{let n=new window.DOMParser().parseFromString(e,"text/html").querySelector("iframe"),i={};return n&&Array.from(n.attributes).forEach(({name:l,value:s})=>{l!=="style"&&(i[P1e[l]||l]=s)}),i},[e]);return(0,ih.useEffect)(()=>{let{ownerDocument:a}=t.current,{defaultView:n}=a;function i({data:{secret:l,message:s,value:c}={}}){s!=="height"||l!==r["data-secret"]||(t.current.height=c)}return n.addEventListener("message",i),()=>{n.removeEventListener("message",i)}},[]),(0,yN.jsx)("div",{className:"wp-block-embed__wrapper",children:(0,yN.jsx)("iframe",{ref:(0,b5.useMergeRefs)([t,(0,b5.useFocusableIframe)()]),title:r.title,...r})})}var Mn=o(v(),1);function IG({preview:e,previewable:t,url:r,type:a,isSelected:n,className:i,icon:l,label:s}){let[c,u]=(0,PG.useState)(!1);!n&&c&&u(!1);let m=()=>{u(!0)},{scripts:p}=e,d=a==="photo"?pF(e):e.html,f=(0,BG.getAuthority)(r),h=(0,lh.sprintf)((0,lh.__)("Embedded content from %s"),f),g=w(a,i,"wp-block-embed__wrapper");return(0,Mn.jsx)(Mn.Fragment,{children:t?a==="wp-embed"?(0,Mn.jsx)(SG,{html:d}):(0,Mn.jsxs)("div",{className:"wp-block-embed__wrapper",children:[(0,Mn.jsx)(y5.SandBox,{allowSameOrigin:!0,html:d,scripts:p,title:h,type:g,onFocus:m}),!c&&(0,Mn.jsx)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:m})]}):(0,Mn.jsxs)(y5.Placeholder,{icon:(0,Mn.jsx)(TG.BlockIcon,{icon:l,showColors:!0}),label:s,children:[(0,Mn.jsx)("p",{className:"components-placeholder__error",children:(0,Mn.jsx)("a",{href:r,children:r})}),(0,Mn.jsx)("p",{className:"components-placeholder__error",children:(0,lh.sprintf)((0,lh.__)("Embedded content from %s can't be previewed in the editor."),f)})]})})}var ed=o(P(),1),Jp=o(U(),1),_5=o(V(),1),NG=o(T(),1),_N=o(Q(),1),xN=o(L(),1),EG=o(mr(),1);var gi=o(v(),1),B1e=e=>{let{attributes:{providerNameSlug:t,previewable:r,responsive:a,url:n},attributes:i,isSelected:l,onReplace:s,setAttributes:c,insertBlocksAfter:u,onFocus:m}=e,p={title:(0,ed._x)("Embed","block title"),icon:Gl},{icon:d,title:f}=uF(t)||p,[h,g]=(0,Jp.useState)(n),[b,y]=(0,Jp.useState)(!1),{invalidateResolution:k}=(0,_5.useDispatch)(_N.store),{preview:_,fetching:x,themeSupportsResponsive:S,cannotEmbed:C,hasResolved:N}=(0,_5.useSelect)(G=>{let{getEmbedPreview:O,isPreviewEmbedFallback:J,isRequestingEmbedPreview:ee,getThemeSupports:oe,hasFinishedResolution:X}=G(_N.store);if(!n)return{fetching:!1,cannotEmbed:!1};let te=O(n),ne=J(n),le=te?.html===!1&&te?.type===void 0,pe=te?.data?.status===404,Ie=!!te&&!le&&!pe;return{preview:Ie?te:void 0,fetching:ee(n),themeSupportsResponsive:oe()["responsive-embeds"],cannotEmbed:!Ie||ne,hasResolved:X("getEmbedPreview",[n])}},[n]),B=()=>fF(i,_,f,a);function D(G){let{className:O}=i,{html:J}=_;c({allowResponsive:G,className:tI(J,O,a&&G)})}(0,Jp.useEffect)(()=>{if(_?.html||!C||!N)return;let G=n.replace(/\/$/,"");g(G),y(!1),c({url:G})},[_?.html,n,C,N,c]),(0,Jp.useEffect)(()=>{if(!(!C||x||!h)&&(0,EG.getAuthority)(h)==="x.com"){let G=new URL(h);G.host="twitter.com",c({url:G.toString()})}},[h,C,x,c]),(0,Jp.useEffect)(()=>{if(_&&!b){let G=B();if(Object.keys(G).some(J=>G[J]!==i[J])&&c(G),s){let J=Yu(e,G);J&&s(J)}}},[_,b]);let A=(0,NG.useBlockProps)();if(x)return(0,gi.jsx)(xN.View,{...A,children:(0,gi.jsx)(kG,{})});let H=(0,ed.sprintf)((0,ed.__)("%s URL"),f);if(!_||C||b)return(0,gi.jsx)(xN.View,{...A,children:(0,gi.jsx)(CG,{icon:d,label:H,onFocus:m,onSubmit:G=>{G&&G.preventDefault();let O=Qu(i.className);y(!1),c({url:h,className:O})},value:h,cannotEmbed:C,onChange:G=>g(G),fallback:()=>dF(h,s),tryAgain:()=>{k("getEmbedPreview",[h])}})});let{caption:z,type:I,allowResponsive:R,className:$}=B(),j=w($,e.className);return(0,gi.jsxs)(gi.Fragment,{children:[(0,gi.jsx)(oG,{showEditButton:_&&!C,themeSupportsResponsive:S,blockSupportsResponsive:a,allowResponsive:R,toggleResponsive:D,switchBackToURLInput:()=>y(!0)}),(0,gi.jsxs)("figure",{...A,className:w(A.className,j,{[`is-type-${I}`]:I,[`is-provider-${t}`]:t,[`wp-block-embed-${t}`]:t}),children:[(0,gi.jsx)(IG,{preview:_,previewable:r,className:j,url:h,type:I,caption:z,onCaptionChange:G=>c({caption:G}),isSelected:l,icon:d,label:H,insertBlocksAfter:u,attributes:i,setAttributes:c}),(0,gi.jsx)(_a,{attributes:i,setAttributes:c,isSelected:l,insertBlocksAfter:u,label:(0,ed.__)("Embed caption text"),showToolbarButton:l})]})]})},DG=B1e;var td=o(T(),1),ev=o(v(),1);function LG({attributes:e}){let{url:t,caption:r,type:a,providerNameSlug:n}=e;if(!t)return null;let i=w("wp-block-embed",{[`is-type-${a}`]:a,[`is-provider-${n}`]:n,[`wp-block-embed-${n}`]:n});return(0,ev.jsxs)("figure",{...td.useBlockProps.save({className:i}),children:[(0,ev.jsx)("div",{className:"wp-block-embed__wrapper",children:`
${t}
`}),!td.RichText.isEmpty(r)&&(0,ev.jsx)(td.RichText.Content,{className:(0,td.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:r})]})}var kN=o(W(),1);var{name:I1e}=Ls,N1e={from:[{type:"raw",isMatch:e=>e.nodeName==="P"&&/^\s*(https?:\/\/\S+)\s*$/i.test(e.textContent)&&e.textContent?.match(/https/gi)?.length===1,transform:e=>(0,kN.createBlock)(I1e,{url:e.textContent.trim()})}],to:[{type:"block",blocks:["core/paragraph"],isMatch:({url:e})=>!!e,transform:({url:e,caption:t,className:r})=>{let a=`<a href="${e}">${e}</a>`;return t?.trim()&&(a+=`<br />${t}`),(0,kN.createBlock)("core/paragraph",{content:a,className:Qu(r)})}}]},MG=N1e;var ue=o(P(),1);function ft(e){return(0,ue.sprintf)((0,ue.__)("%s Embed"),e)}var AG=[{name:"twitter",title:ft("X"),icon:aG,keywords:["x","twitter","tweet",(0,ue.__)("social")],description:(0,ue.__)("Embed an X post."),patterns:[/^https?:\/\/(www\.)?twitter\.com\/.+/i],attributes:{providerNameSlug:"twitter",responsive:!0}},{name:"youtube",title:ft("YouTube"),icon:nG,keywords:[(0,ue.__)("music"),(0,ue.__)("video")],description:(0,ue.__)("Embed a YouTube video."),patterns:[/^https?:\/\/((m|www)\.)?youtube\.com\/.+/i,/^https?:\/\/youtu\.be\/.+/i],attributes:{providerNameSlug:"youtube",responsive:!0}},{name:"facebook",title:ft("Facebook"),icon:iG,keywords:[(0,ue.__)("social")],description:(0,ue.__)("Embed a Facebook post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"facebook",previewable:!1,responsive:!0}},{name:"instagram",title:ft("Instagram"),icon:lG,keywords:[(0,ue.__)("image"),(0,ue.__)("social")],description:(0,ue.__)("Embed an Instagram post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"instagram",responsive:!0}},{name:"wordpress",title:ft("WordPress"),icon:sG,keywords:[(0,ue.__)("post"),(0,ue.__)("blog")],description:(0,ue.__)("Embed a WordPress post."),attributes:{providerNameSlug:"wordpress"}},{name:"soundcloud",title:ft("SoundCloud"),icon:v5,keywords:[(0,ue.__)("music"),(0,ue.__)("audio")],description:(0,ue.__)("Embed SoundCloud content."),patterns:[/^https?:\/\/(www\.)?soundcloud\.com\/.+/i],attributes:{providerNameSlug:"soundcloud",responsive:!0}},{name:"spotify",title:ft("Spotify"),icon:cG,keywords:[(0,ue.__)("music"),(0,ue.__)("audio")],description:(0,ue.__)("Embed Spotify content."),patterns:[/^https?:\/\/(open|play)\.spotify\.com\/.+/i],attributes:{providerNameSlug:"spotify",responsive:!0}},{name:"flickr",title:ft("Flickr"),icon:uG,keywords:[(0,ue.__)("image")],description:(0,ue.__)("Embed Flickr content."),patterns:[/^https?:\/\/(www\.)?flickr\.com\/.+/i,/^https?:\/\/flic\.kr\/.+/i],attributes:{providerNameSlug:"flickr",responsive:!0}},{name:"vimeo",title:ft("Vimeo"),icon:mG,keywords:[(0,ue.__)("video")],description:(0,ue.__)("Embed a Vimeo video."),patterns:[/^https?:\/\/(www\.)?vimeo\.com\/.+/i],attributes:{providerNameSlug:"vimeo",responsive:!0}},{name:"animoto",title:ft("Animoto"),icon:hG,description:(0,ue.__)("Embed an Animoto video."),patterns:[/^https?:\/\/(www\.)?(animoto|video214)\.com\/.+/i],attributes:{providerNameSlug:"animoto",responsive:!0}},{name:"cloudup",title:ft("Cloudup"),icon:Gl,description:(0,ue.__)("Embed Cloudup content."),patterns:[/^https?:\/\/cloudup\.com\/.+/i],attributes:{providerNameSlug:"cloudup",responsive:!0}},{name:"collegehumor",title:ft("CollegeHumor"),icon:nh,description:(0,ue.__)("Embed CollegeHumor content."),scope:["block"],patterns:[],attributes:{providerNameSlug:"collegehumor",responsive:!0}},{name:"crowdsignal",title:ft("Crowdsignal"),icon:Gl,keywords:["polldaddy",(0,ue.__)("survey")],description:(0,ue.__)("Embed Crowdsignal (formerly Polldaddy) content."),patterns:[/^https?:\/\/((.+\.)?polldaddy\.com|poll\.fm|.+\.crowdsignal\.net|.+\.survey\.fm)\/.+/i],attributes:{providerNameSlug:"crowdsignal",responsive:!0}},{name:"dailymotion",title:ft("Dailymotion"),icon:gG,keywords:[(0,ue.__)("video")],description:(0,ue.__)("Embed a Dailymotion video."),patterns:[/^https?:\/\/(www\.)?dailymotion\.com\/.+/i],attributes:{providerNameSlug:"dailymotion",responsive:!0}},{name:"imgur",title:ft("Imgur"),icon:vN,description:(0,ue.__)("Embed Imgur content."),patterns:[/^https?:\/\/(.+\.)?imgur\.com\/.+/i],attributes:{providerNameSlug:"imgur",responsive:!0}},{name:"issuu",title:ft("Issuu"),icon:Gl,description:(0,ue.__)("Embed Issuu content."),patterns:[/^https?:\/\/(www\.)?issuu\.com\/.+/i],attributes:{providerNameSlug:"issuu",responsive:!0}},{name:"kickstarter",title:ft("Kickstarter"),icon:Gl,description:(0,ue.__)("Embed Kickstarter content."),patterns:[/^https?:\/\/(www\.)?kickstarter\.com\/.+/i,/^https?:\/\/kck\.st\/.+/i],attributes:{providerNameSlug:"kickstarter",responsive:!0}},{name:"mixcloud",title:ft("Mixcloud"),icon:v5,keywords:[(0,ue.__)("music"),(0,ue.__)("audio")],description:(0,ue.__)("Embed Mixcloud content."),patterns:[/^https?:\/\/(www\.)?mixcloud\.com\/.+/i],attributes:{providerNameSlug:"mixcloud",responsive:!0}},{name:"pocket-casts",title:ft("Pocket Casts"),icon:yG,keywords:[(0,ue.__)("podcast"),(0,ue.__)("audio")],description:(0,ue.__)("Embed a podcast player from Pocket Casts."),patterns:[/^https:\/\/pca.st\/\w+/i],attributes:{providerNameSlug:"pocket-casts",responsive:!0}},{name:"reddit",title:ft("Reddit"),icon:pG,description:(0,ue.__)("Embed a Reddit thread."),patterns:[/^https?:\/\/(www\.)?reddit\.com\/.+/i],attributes:{providerNameSlug:"reddit",responsive:!0}},{name:"reverbnation",title:ft("ReverbNation"),icon:v5,description:(0,ue.__)("Embed ReverbNation content."),patterns:[/^https?:\/\/(www\.)?reverbnation\.com\/.+/i],attributes:{providerNameSlug:"reverbnation",responsive:!0}},{name:"scribd",title:ft("Scribd"),icon:Gl,description:(0,ue.__)("Embed Scribd content."),patterns:[/^https?:\/\/(www\.)?scribd\.com\/.+/i],attributes:{providerNameSlug:"scribd",responsive:!0}},{name:"smugmug",title:ft("SmugMug"),icon:vN,description:(0,ue.__)("Embed SmugMug content."),patterns:[/^https?:\/\/(.+\.)?smugmug\.com\/.*/i],attributes:{providerNameSlug:"smugmug",previewable:!1,responsive:!0}},{name:"speaker-deck",title:ft("Speaker Deck"),icon:Gl,description:(0,ue.__)("Embed Speaker Deck content."),patterns:[/^https?:\/\/(www\.)?speakerdeck\.com\/.+/i],attributes:{providerNameSlug:"speaker-deck",responsive:!0}},{name:"tiktok",title:ft("TikTok"),icon:nh,keywords:[(0,ue.__)("video")],description:(0,ue.__)("Embed a TikTok video."),patterns:[/^https?:\/\/(www\.)?tiktok\.com\/.+/i],attributes:{providerNameSlug:"tiktok",responsive:!0}},{name:"ted",title:ft("TED"),icon:nh,description:(0,ue.__)("Embed a TED video."),patterns:[/^https?:\/\/(www\.|embed\.)?ted\.com\/.+/i],attributes:{providerNameSlug:"ted",responsive:!0}},{name:"tumblr",title:ft("Tumblr"),icon:dG,keywords:[(0,ue.__)("social")],description:(0,ue.__)("Embed a Tumblr post."),patterns:[/^https?:\/\/(.+)\.tumblr\.com\/.+/i],attributes:{providerNameSlug:"tumblr",responsive:!0}},{name:"videopress",title:ft("VideoPress"),icon:nh,keywords:[(0,ue.__)("video")],description:(0,ue.__)("Embed a VideoPress video."),patterns:[/^https?:\/\/videopress\.com\/.+/i],attributes:{providerNameSlug:"videopress",responsive:!0}},{name:"wordpress-tv",title:ft("WordPress.tv"),icon:nh,description:(0,ue.__)("Embed a WordPress.tv video."),patterns:[/^https?:\/\/wordpress\.tv\/.+/i],attributes:{providerNameSlug:"wordpress-tv",responsive:!0}},{name:"amazon-kindle",title:ft("Amazon Kindle"),icon:fG,keywords:[(0,ue.__)("ebook")],description:(0,ue.__)("Embed Amazon Kindle content."),patterns:[/^https?:\/\/([a-z0-9-]+\.)?(amazon|amzn)(\.[a-z]{2,4})+\/.+/i,/^https?:\/\/(www\.)?(a\.co|z\.cn)\/.+/i],attributes:{providerNameSlug:"amazon-kindle"}},{name:"pinterest",title:ft("Pinterest"),icon:vG,keywords:[(0,ue.__)("social"),(0,ue.__)("bookmark")],description:(0,ue.__)("Embed Pinterest pins, boards, and profiles."),patterns:[/^https?:\/\/([a-z]{2}|www)\.pinterest\.com(\.(au|mx))?\/.*/i],attributes:{providerNameSlug:"pinterest"}},{name:"wolfram-cloud",title:ft("Wolfram"),icon:bG,description:(0,ue.__)("Embed Wolfram notebook content."),patterns:[/^https?:\/\/(www\.)?wolframcloud\.com\/obj\/.+/i],attributes:{providerNameSlug:"wolfram-cloud",responsive:!0}},{name:"bluesky",title:ft("Bluesky"),icon:_G,description:(0,ue.__)("Embed a Bluesky post."),patterns:[/^https?:\/\/bsky\.app\/profile\/.+\/post\/.+/i],attributes:{providerNameSlug:"bluesky"}}];AG.forEach(e=>{e.isActive||(e.isActive=(t,r)=>t.providerNameSlug===r.providerNameSlug)});var RG=AG;var rd=o(T(),1),od=o(v(),1),{attributes:zG}=Ls,E1e={attributes:zG,save({attributes:e}){let{url:t,caption:r,type:a,providerNameSlug:n}=e;if(!t)return null;let i=w("wp-block-embed",{[`is-type-${a}`]:a,[`is-provider-${n}`]:n,[`wp-block-embed-${n}`]:n});return(0,od.jsxs)("figure",{...rd.useBlockProps.save({className:i}),children:[(0,od.jsx)("div",{className:"wp-block-embed__wrapper",children:`
${t}
`}),!rd.RichText.isEmpty(r)&&(0,od.jsx)(rd.RichText.Content,{tagName:"figcaption",value:r})]})}},D1e={attributes:zG,save({attributes:{url:e,caption:t,type:r,providerNameSlug:a}}){if(!e)return null;let n=w("wp-block-embed",{[`is-type-${r}`]:r,[`is-provider-${a}`]:a});return(0,od.jsxs)("figure",{className:n,children:[`
${e}
`,!rd.RichText.isEmpty(t)&&(0,od.jsx)(rd.RichText.Content,{tagName:"figcaption",value:t})]})}},L1e=[E1e,D1e],VG=L1e;var{name:FG}=Ls,HG={icon:Gl,edit:DG,save:LG,transforms:MG,variations:RG,deprecated:VG},M1e=()=>E({name:FG,metadata:Ls,settings:HG});var PN={};Z(PN,{init:()=>W1e,metadata:()=>w5,name:()=>eW,settings:()=>T5});var uh=o(P(),1);var JG=o(W(),1);var fo=o(T(),1),Wl=o(P(),1),Gt=o(v(),1),A1e={attributes:{id:{type:"number"},href:{type:"string"},fileId:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"id"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},save({attributes:e}){let{href:t,fileId:r,fileName:a,textLinkHref:n,textLinkTarget:i,showDownloadButton:l,downloadButtonText:s,displayPreview:c,previewHeight:u}=e,m=fo.RichText.isEmpty(a)?(0,Wl.__)("PDF embed"):(0,Wl.sprintf)((0,Wl.__)("Embed of %s."),a),p=!fo.RichText.isEmpty(a),d=p?r:void 0;return t&&(0,Gt.jsxs)("div",{...fo.useBlockProps.save(),children:[c&&(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${u}px`},"aria-label":m})}),p&&(0,Gt.jsx)("a",{id:d,href:n,target:i,rel:i?"noreferrer noopener":void 0,children:(0,Gt.jsx)(fo.RichText.Content,{value:a})}),l&&(0,Gt.jsx)("a",{href:t,className:w("wp-block-file__button",(0,fo.__experimentalGetElementClassName)("button")),download:!0,"aria-describedby":d,children:(0,Gt.jsx)(fo.RichText.Content,{value:s})})]})}},R1e={attributes:{id:{type:"number"},href:{type:"string"},fileId:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"id"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},save({attributes:e}){let{href:t,fileId:r,fileName:a,textLinkHref:n,textLinkTarget:i,showDownloadButton:l,downloadButtonText:s,displayPreview:c,previewHeight:u}=e,m=fo.RichText.isEmpty(a)?(0,Wl.__)("PDF embed"):(0,Wl.sprintf)((0,Wl.__)("Embed of %s."),a),p=!fo.RichText.isEmpty(a),d=p?r:void 0;return t&&(0,Gt.jsxs)("div",{...fo.useBlockProps.save(),children:[c&&(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${u}px`},"aria-label":m})}),p&&(0,Gt.jsx)("a",{id:d,href:n,target:i,rel:i?"noreferrer noopener":void 0,children:(0,Gt.jsx)(fo.RichText.Content,{value:a})}),l&&(0,Gt.jsx)("a",{href:t,className:"wp-block-file__button",download:!0,"aria-describedby":d,children:(0,Gt.jsx)(fo.RichText.Content,{value:s})})]})}},z1e={attributes:{id:{type:"number"},href:{type:"string"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},save({attributes:e}){let{href:t,fileName:r,textLinkHref:a,textLinkTarget:n,showDownloadButton:i,downloadButtonText:l,displayPreview:s,previewHeight:c}=e,u=fo.RichText.isEmpty(r)?(0,Wl.__)("PDF embed"):(0,Wl.sprintf)((0,Wl.__)("Embed of %s."),r);return t&&(0,Gt.jsxs)("div",{...fo.useBlockProps.save(),children:[s&&(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${c}px`},"aria-label":u})}),!fo.RichText.isEmpty(r)&&(0,Gt.jsx)("a",{href:a,target:n,rel:n?"noreferrer noopener":void 0,children:(0,Gt.jsx)(fo.RichText.Content,{value:r})}),i&&(0,Gt.jsx)("a",{href:t,className:"wp-block-file__button",download:!0,children:(0,Gt.jsx)(fo.RichText.Content,{value:l})})]})}},V1e=[A1e,R1e,z1e],OG=V1e;var SN=o(Rr(),1),ch=o(M(),1),sh=o(V(),1),No=o(T(),1),k5=o(U(),1),$G=o(me(),1),$l=o(P(),1);var qG=o(Q(),1),TN=o(xr(),1),ZG=o(mr(),1);var Xo=o(P(),1),Jo=o(M(),1),jG=o(T(),1);var Io=o(v(),1);function UG({hrefs:e,openInNewWindow:t,showDownloadButton:r,changeLinkDestinationOption:a,changeOpenInNewWindow:n,changeShowDownloadButton:i,displayPreview:l,changeDisplayPreview:s,previewHeight:c,changePreviewHeight:u}){let{href:m,textLinkHref:p,attachmentPage:d}=e,f=q(),h=[{value:m,label:(0,Xo.__)("URL")}];return d&&(h=[{value:m,label:(0,Xo.__)("Media file")},{value:d,label:(0,Xo.__)("Attachment page")}]),(0,Io.jsx)(Io.Fragment,{children:(0,Io.jsxs)(jG.InspectorControls,{children:[m.endsWith(".pdf")&&(0,Io.jsxs)(Jo.__experimentalToolsPanel,{label:(0,Xo.__)("PDF settings"),resetAll:()=>{s(!0),u(600)},dropdownMenuProps:f,children:[(0,Io.jsx)(Jo.__experimentalToolsPanelItem,{label:(0,Xo.__)("Show inline embed"),isShownByDefault:!0,hasValue:()=>!l,onDeselect:()=>s(!0),children:(0,Io.jsx)(Jo.ToggleControl,{label:(0,Xo.__)("Show inline embed"),help:l?(0,Xo.__)("Note: Most phone and tablet browsers won't display embedded PDFs."):null,checked:!!l,onChange:s})}),l&&(0,Io.jsx)(Jo.__experimentalToolsPanelItem,{label:(0,Xo.__)("Height in pixels"),isShownByDefault:!0,hasValue:()=>c!==600,onDeselect:()=>u(600),children:(0,Io.jsx)(Jo.RangeControl,{__next40pxDefaultSize:!0,label:(0,Xo.__)("Height in pixels"),min:x5,max:Math.max(CN,c),value:c,onChange:u})})]}),(0,Io.jsxs)(Jo.__experimentalToolsPanel,{label:(0,Xo.__)("Settings"),resetAll:()=>{a(m),n(!1),i(!0)},dropdownMenuProps:f,children:[(0,Io.jsx)(Jo.__experimentalToolsPanelItem,{label:(0,Xo.__)("Link to"),isShownByDefault:!0,hasValue:()=>p!==m,onDeselect:()=>a(m),children:(0,Io.jsx)(Jo.SelectControl,{__next40pxDefaultSize:!0,label:(0,Xo.__)("Link to"),value:p,options:h,onChange:a})}),(0,Io.jsx)(Jo.__experimentalToolsPanelItem,{label:(0,Xo.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>!!t,onDeselect:()=>n(!1),children:(0,Io.jsx)(Jo.ToggleControl,{label:(0,Xo.__)("Open in new tab"),checked:t,onChange:n})}),(0,Io.jsx)(Jo.__experimentalToolsPanelItem,{label:(0,Xo.__)("Show download button"),isShownByDefault:!0,hasValue:()=>!r,onDeselect:()=>i(!0),children:(0,Io.jsx)(Jo.ToggleControl,{label:(0,Xo.__)("Show download button"),checked:r,onChange:i})})]})]})})}var WG=()=>window.navigator.pdfViewerEnabled?!0:!(window.navigator.userAgent.indexOf("Mobi")>-1||window.navigator.userAgent.indexOf("Android")>-1||window.navigator.userAgent.indexOf("Macintosh")>-1&&window.navigator.maxTouchPoints&&window.navigator.maxTouchPoints>2||(window.ActiveXObject||"ActiveXObject"in window)&&!(GG("AcroPDF.PDF")||GG("PDF.PdfCtrl"))),GG=e=>{let t;try{t=new window.ActiveXObject(e)}catch{t=void 0}return t};var Fr=o(v(),1),x5=200,CN=2e3;function F1e({text:e,disabled:t}){let{createNotice:r}=(0,sh.useDispatch)(TN.store),a=(0,$G.useCopyToClipboard)(e,()=>{r("info",(0,$l.__)("Copied URL to clipboard."),{isDismissible:!0,type:"snackbar"})});return(0,Fr.jsx)(ch.ToolbarButton,{className:"components-clipboard-toolbar-button",ref:a,disabled:t,children:(0,$l.__)("Copy URL")})}function H1e({attributes:e,isSelected:t,setAttributes:r,clientId:a}){let{id:n,fileName:i,href:l,textLinkHref:s,textLinkTarget:c,showDownloadButton:u,downloadButtonText:m,displayPreview:p,previewHeight:d}=e,[f,h]=(0,k5.useState)(e.blob),{media:g}=(0,sh.useSelect)(I=>({media:n===void 0?void 0:I(qG.store).getEntityRecord("postType","attachment",n)}),[n]),{createErrorNotice:b}=(0,sh.useDispatch)(TN.store),{toggleSelection:y,__unstableMarkNextChangeAsNotPersistent:k}=(0,sh.useDispatch)(No.store);Es({url:f,onChange:_,onError:x}),(0,k5.useEffect)(()=>{No.RichText.isEmpty(m)&&(k(),r({downloadButtonText:(0,$l._x)("Download","button label")}))},[]);function _(I){if(!I||!I.url){r({href:void 0,fileName:void 0,textLinkHref:void 0,id:void 0,fileId:void 0,displayPreview:void 0,previewHeight:void 0}),h();return}if((0,SN.isBlobURL)(I.url)){h(I.url);return}let R=(I.mime||I.mime_type)==="application/pdf"||(0,ZG.getFilename)(I.url).toLowerCase().endsWith(".pdf"),$={displayPreview:R?e.displayPreview??!0:void 0,previewHeight:R?e.previewHeight??600:void 0};r({href:I.url,fileName:I.title,textLinkHref:I.url,id:I.id,fileId:`wp-block-file--media-${a}`,blob:void 0,...$}),h()}function x(I){r({href:void 0}),b(I,{type:"snackbar"})}function S(I){r({textLinkHref:I})}function C(I){r({textLinkTarget:I?"_blank":!1})}function N(I){r({showDownloadButton:I})}function B(I){r({displayPreview:I})}function D(I,R,$,j){y(!0);let G=parseInt(d+j.height,10);r({previewHeight:G})}function A(I){let R=Math.max(parseInt(I,10),x5);r({previewHeight:R})}let H=g&&g.link,F=(0,No.useBlockProps)({className:w(!!f&&(0,ch.__unstableGetAnimateClassName)({type:"loading"}),{"is-transient":!!f})}),z=WG()&&p;return!l&&!f?(0,Fr.jsx)("div",{...F,children:(0,Fr.jsx)(No.MediaPlaceholder,{icon:(0,Fr.jsx)(No.BlockIcon,{icon:R0}),labels:{title:(0,$l.__)("File"),instructions:(0,$l.__)("Drag and drop a file, upload, or choose from your library.")},onSelect:_,onError:x,accept:"*"})}):(0,Fr.jsxs)(Fr.Fragment,{children:[(0,Fr.jsx)(UG,{hrefs:{href:l||f,textLinkHref:s,attachmentPage:H},openInNewWindow:!!c,showDownloadButton:u,changeLinkDestinationOption:S,changeOpenInNewWindow:C,changeShowDownloadButton:N,displayPreview:p,changeDisplayPreview:B,previewHeight:d,changePreviewHeight:A}),(0,Fr.jsxs)(No.BlockControls,{group:"other",children:[(0,Fr.jsx)(No.MediaReplaceFlow,{mediaId:n,mediaURL:l,accept:"*",onSelect:_,onError:x,onReset:()=>_(void 0)}),(0,Fr.jsx)(F1e,{text:l,disabled:(0,SN.isBlobURL)(l)})]}),(0,Fr.jsxs)("div",{...F,children:[z&&(0,Fr.jsxs)(ch.ResizableBox,{size:{height:d,width:"100%"},minHeight:x5,maxHeight:CN,grid:[1,10],enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResizeStart:()=>y(!1),onResizeStop:D,showHandle:t,children:[(0,Fr.jsx)("object",{className:"wp-block-file__preview",data:l,type:"application/pdf","aria-label":(0,$l.__)("Embed of the selected PDF file.")}),!t&&(0,Fr.jsx)("div",{className:"wp-block-file__preview-overlay"})]}),(0,Fr.jsxs)("div",{className:"wp-block-file__content-wrapper",children:[(0,Fr.jsx)(No.RichText,{identifier:"fileName",tagName:"a",value:i,placeholder:(0,$l.__)("Write file name\u2026"),withoutInteractiveFormatting:!0,onChange:I=>r({fileName:N1(I)}),href:s}),u&&(0,Fr.jsx)("div",{className:"wp-block-file__button-richtext-wrapper",children:(0,Fr.jsx)(No.RichText,{identifier:"downloadButtonText",tagName:"div","aria-label":(0,$l.__)("Download button text"),className:w("wp-block-file__button",(0,No.__experimentalGetElementClassName)("button")),value:m,withoutInteractiveFormatting:!0,placeholder:(0,$l.__)("Add text\u2026"),onChange:I=>r({downloadButtonText:N1(I)})})})]})]})]})}var KG=H1e;var w5={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/file",title:"File",category:"media",description:"Add a link to a downloadable file.",keywords:["document","pdf","download"],textdomain:"default",attributes:{id:{type:"number"},blob:{type:"string",role:"local"},href:{type:"string",role:"content"},fileId:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"id"},fileName:{type:"rich-text",source:"rich-text",selector:"a:not([download])",role:"content"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href",role:"content"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"rich-text",source:"rich-text",selector:"a[download]",role:"content"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0,spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0,text:!1,__experimentalDefaultControls:{background:!0,link:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}},interactivity:!0},editorStyle:"wp-block-file-editor",style:"wp-block-file"};var Jc=o(T(),1),ql=o(v(),1);function QG({attributes:e}){let{href:t,fileId:r,fileName:a,textLinkHref:n,textLinkTarget:i,showDownloadButton:l,downloadButtonText:s,displayPreview:c,previewHeight:u}=e,m=Jc.RichText.isEmpty(a)?"PDF embed":a.toString(),p=!Jc.RichText.isEmpty(a),d=p?r:void 0;return t&&(0,ql.jsxs)("div",{...Jc.useBlockProps.save(),children:[c&&(0,ql.jsx)(ql.Fragment,{children:(0,ql.jsx)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${u}px`},"aria-label":m})}),p&&(0,ql.jsx)("a",{id:d,href:n,target:i,rel:i?"noreferrer noopener":void 0,children:(0,ql.jsx)(Jc.RichText.Content,{value:a})}),l&&(0,ql.jsx)("a",{href:t,className:w("wp-block-file__button",(0,Jc.__experimentalGetElementClassName)("button")),download:!0,"aria-describedby":d,children:(0,ql.jsx)(Jc.RichText.Content,{value:s})})]})}var tv=o(Rr(),1),Zl=o(W(),1),C5=o(V(),1),S5=o(Q(),1),YG=o(mr(),1),j1e={from:[{type:"files",isMatch(e){return e.length>0},priority:15,transform:e=>{let t=[];return e.forEach(r=>{let a=(0,tv.createBlobURL)(r);r.type.startsWith("video/")?t.push((0,Zl.createBlock)("core/video",{blob:(0,tv.createBlobURL)(r)})):r.type.startsWith("image/")?t.push((0,Zl.createBlock)("core/image",{blob:(0,tv.createBlobURL)(r)})):r.type.startsWith("audio/")?t.push((0,Zl.createBlock)("core/audio",{blob:(0,tv.createBlobURL)(r)})):t.push((0,Zl.createBlock)("core/file",{blob:a,fileName:r.name}))}),t}},{type:"block",blocks:["core/audio"],transform:e=>(0,Zl.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/video"],transform:e=>(0,Zl.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/image"],transform:e=>(0,Zl.createBlock)("core/file",{href:e.url,fileName:e.caption||(0,YG.getFilename)(e.url),textLinkHref:e.url,id:e.id,anchor:e.anchor})}],to:[{type:"block",blocks:["core/audio"],isMatch:({id:e})=>{if(!e)return!1;let{getEntityRecord:t}=(0,C5.select)(S5.store),r=t("postType","attachment",e);return!!r&&r.mime_type.includes("audio")},transform:e=>(0,Zl.createBlock)("core/audio",{src:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/video"],isMatch:({id:e})=>{if(!e)return!1;let{getEntityRecord:t}=(0,C5.select)(S5.store),r=t("postType","attachment",e);return!!r&&r.mime_type.includes("video")},transform:e=>(0,Zl.createBlock)("core/video",{src:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/image"],isMatch:({id:e})=>{if(!e)return!1;let{getEntityRecord:t}=(0,C5.select)(S5.store),r=t("postType","attachment",e);return!!r&&r.mime_type.includes("image")},transform:e=>(0,Zl.createBlock)("core/image",{url:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})}]},XG=j1e;var{fieldsKey:U1e,formKey:G1e}=K(JG.privateApis),{name:eW}=w5,T5={icon:R0,example:{attributes:{href:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg",fileName:(0,uh._x)("Armstrong_Small_Step","Name of the file")}},transforms:XG,deprecated:OG,edit:KG,save:QG};window.__experimentalContentOnlyInspectorFields&&(T5[U1e]=[{id:"file",label:(0,uh.__)("File"),type:"media",Edit:{control:"media",allowedTypes:[],multiple:!1},getValue:({item:e})=>({id:e.id,url:e.href}),setValue:({value:e})=>({id:e.id,href:e.url})},{id:"fileName",label:(0,uh.__)("Filename"),type:"text",Edit:"rich-text"},{id:"downloadButtonText",label:(0,uh.__)("Button Text"),type:"text",Edit:"rich-text"}],T5[G1e]={fields:["file","fileName","downloadButtonText"]});var W1e=()=>E({name:eW,metadata:w5,settings:T5});var DN={};Z(DN,{init:()=>Y1e,metadata:()=>I5,name:()=>sW,settings:()=>cW});var lW=o(Yc(),1);var Eo=o(P(),1),Kl=o(T(),1),Ql=o(M(),1),tW=o(V(),1);var BN=o(P(),1),P5=["core/form-submission-notification",{type:"success"},[["core/paragraph",{content:'<mark style="background-color:rgba(0, 0, 0, 0);color:#345C00" class="has-inline-color">'+(0,BN.__)("Your form has been submitted successfully")+"</mark>"}]]],B5=["core/form-submission-notification",{type:"error"},[["core/paragraph",{content:'<mark style="background-color:rgba(0, 0, 0, 0);color:#CF2E2E" class="has-inline-color">'+(0,BN.__)("There was an error submitting your form.")+"</mark>"}]]];var en=o(v(),1),$1e=[P5,B5,["core/form-input",{type:"text",label:(0,Eo.__)("Name"),required:!0}],["core/form-input",{type:"email",label:(0,Eo.__)("Email"),required:!0}],["core/form-input",{type:"textarea",label:(0,Eo.__)("Comment"),required:!0}],["core/form-submit-button",{}]],q1e=({attributes:e,setAttributes:t,clientId:r})=>{let a=q(),n=()=>{t({submissionMethod:"email",email:void 0,action:void 0,method:"post"})},{action:i,method:l,email:s,submissionMethod:c}=e,u=(0,Kl.useBlockProps)(),{hasInnerBlocks:m}=(0,tW.useSelect)(d=>{let{getBlock:f}=d(Kl.store),h=f(r);return{hasInnerBlocks:!!(h&&h.innerBlocks.length)}},[r]),p=(0,Kl.useInnerBlocksProps)(u,{template:$1e,renderAppender:m?void 0:Kl.InnerBlocks.ButtonBlockAppender});return(0,en.jsxs)(en.Fragment,{children:[(0,en.jsx)(Kl.InspectorControls,{children:(0,en.jsxs)(Ql.__experimentalToolsPanel,{dropdownMenuProps:a,label:(0,Eo.__)("Settings"),resetAll:n,children:[(0,en.jsx)(Ql.__experimentalToolsPanelItem,{hasValue:()=>c!=="email",label:(0,Eo.__)("Submissions method"),onDeselect:()=>t({submissionMethod:"email"}),isShownByDefault:!0,children:(0,en.jsx)(Ql.SelectControl,{__next40pxDefaultSize:!0,label:(0,Eo.__)("Submissions method"),options:[{label:(0,Eo.__)("Send email"),value:"email"},{label:(0,Eo.__)("- Custom -"),value:"custom"}],value:c,onChange:d=>t({submissionMethod:d}),help:c==="custom"?(0,Eo.__)('Select the method to use for form submissions. Additional options for the "custom" mode can be found in the "Advanced" section.'):(0,Eo.__)("Select the method to use for form submissions.")})}),c==="email"&&(0,en.jsx)(Ql.__experimentalToolsPanelItem,{hasValue:()=>!!s,label:(0,Eo.__)("Email for form submissions"),onDeselect:()=>t({email:void 0,action:void 0,method:"post"}),isShownByDefault:!0,children:(0,en.jsx)(Ql.TextControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,Eo.__)("Email for form submissions"),value:s||"",required:!0,onChange:d=>{t({email:d}),t({action:`mailto:${d}`}),t({method:"post"})},help:(0,Eo.__)("The email address where form submissions will be sent. Separate multiple email addresses with a comma."),type:"email"})})]})}),c!=="email"&&(0,en.jsxs)(Kl.InspectorControls,{group:"advanced",children:[(0,en.jsx)(Ql.SelectControl,{__next40pxDefaultSize:!0,label:(0,Eo.__)("Method"),options:[{label:"Get",value:"get"},{label:"Post",value:"post"}],value:l,onChange:d=>t({method:d}),help:(0,Eo.__)("Select the method to use for form submissions.")}),(0,en.jsx)(Ql.TextControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,Eo.__)("Form action"),value:i,onChange:d=>{t({action:d})},help:(0,Eo.__)("The URL where the form should be submitted."),type:"url"})]}),(0,en.jsx)("form",{...p,encType:c==="email"?"text/plain":null})]})},rW=q1e;var I5={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/form",title:"Form",category:"common",allowedBlocks:["core/paragraph","core/heading","core/form-input","core/form-submit-button","core/form-submission-notification","core/group","core/columns"],description:"A form.",keywords:["container","wrapper","row","section"],textdomain:"default",attributes:{submissionMethod:{type:"string",default:"email"},method:{type:"string",default:"post"},action:{type:"string"},email:{type:"string"}},supports:{anchor:!0,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}}}};var N5=o(T(),1),IN=o(v(),1);function oW({attributes:e}){let t=N5.useBlockProps.save(),{submissionMethod:r}=e;return(0,IN.jsx)("form",{...t,encType:r==="email"?"text/plain":null,children:(0,IN.jsx)(N5.InnerBlocks.Content,{})})}var sl=o(P(),1);var K1e=[{name:"comment-form",title:(0,sl.__)("Experimental Comment form"),description:(0,sl.__)("A comment form for posts and pages."),attributes:{submissionMethod:"custom",action:"{SITE_URL}/wp-comments-post.php",method:"post",anchor:"comment-form"},isDefault:!1,innerBlocks:[["core/form-input",{type:"text",name:"author",label:(0,sl.__)("Name"),required:!0,visibilityPermissions:"logged-out"}],["core/form-input",{type:"email",name:"email",label:(0,sl.__)("Email"),required:!0,visibilityPermissions:"logged-out"}],["core/form-input",{type:"textarea",name:"comment",label:(0,sl.__)("Comment"),required:!0,visibilityPermissions:"all"}],["core/form-submit-button",{}]],scope:["inserter","transform"],isActive:e=>!e?.type||e?.type==="text"},{name:"wp-privacy-form",title:(0,sl.__)("Experimental Privacy Request Form"),keywords:["GDPR"],description:(0,sl.__)("A form to request data exports and/or deletion."),attributes:{submissionMethod:"custom",action:"",method:"post",anchor:"gdpr-form"},isDefault:!1,innerBlocks:[P5,B5,["core/paragraph",{content:(0,sl.__)("To request an export or deletion of your personal data on this site, please fill-in the form below. You can define the type of request you wish to perform, and your email address. Once the form is submitted, you will receive a confirmation email with instructions on the next steps.")}],["core/form-input",{type:"email",name:"email",label:(0,sl.__)("Enter your email address."),required:!0,visibilityPermissions:"all"}],["core/form-input",{type:"checkbox",name:"export_personal_data",label:(0,sl.__)("Request data export"),required:!1,visibilityPermissions:"all"}],["core/form-input",{type:"checkbox",name:"remove_personal_data",label:(0,sl.__)("Request data deletion"),required:!1,visibilityPermissions:"all"}],["core/form-submit-button",{}],["core/form-input",{type:"hidden",name:"wp-action",value:"wp_privacy_send_request"}],["core/form-input",{type:"hidden",name:"wp-privacy-request",value:"1"}]],scope:["inserter","transform"],isActive:e=>!e?.type||e?.type==="text"}],aW=K1e;var js=o(T(),1),NN=o(v(),1),Q1e={supports:{},attributes:{submissionMethod:{type:"string",default:"email"},method:{type:"string",default:"post"},action:{type:"string"},email:{type:"string"},anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"},fontFamily:{type:"string"},fontSize:{type:"string"}},save({attributes:e}){let{submissionMethod:t}=e,r=(0,js.__experimentalGetColorClassesAndStyles)(e),a=(0,js.getTypographyClassesAndStyles)(e),n=(0,js.__experimentalGetSpacingClassesAndStyles)(e),i=js.useBlockProps.save({style:{...r.style,...a.style,...n.style},id:e.anchor});return(0,NN.jsx)("form",{...i,className:"wp-block-form",encType:t==="email"?"text/plain":null,children:(0,NN.jsx)(js.InnerBlocks.Content,{})})}},nW=[Q1e];var E5=o(L(),1),EN=o(v(),1),iW=(0,EN.jsx)(E5.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,EN.jsx)(E5.Path,{d:"M18 16H6c-1.1 0-2 .9-2 2s.9 2 2 2h12c1.1 0 2-.9 2-2s-.9-2-2-2Zm0 2.5H6c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h12c.3 0 .5.2.5.5s-.2.5-.5.5ZM13 13H4v1.5h9V13Zm-7-2h12c1.1 0 2-.9 2-2s-.9-2-2-2H6c-1.1 0-2 .9-2 2s.9 2 2 2Zm0-2.5h12c.3 0 .5.2.5.5s-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5s.2-.5.5-.5ZM13 4H4v1.5h9V4Z"})});var{name:sW}=I5,cW={icon:iW,edit:rW,save:oW,deprecated:nW,variations:aW,example:{}},Y1e=()=>{let e=["core/form"];return(0,lW.addFilter)("blockEditor.__unstableCanInsertBlockType","core/block-library/preventInsertingFormIntoAnotherForm",(t,r,a,{getBlock:n,getBlockParentsByBlockName:i})=>{if(r.name!=="core/form")return t;for(let l of e)if(n(a)?.name===l||i(a,l).length)return!1;return!0}),E({name:sW,metadata:I5,settings:cW})};var MN={};Z(MN,{init:()=>cve,metadata:()=>L5,name:()=>CW,settings:()=>SW});var dW=o(rv(),1),Yl=o(T(),1),fW=o(ai(),1),vi=o(v(),1),hW=e=>(0,dW.default)((0,fW.__unstableStripHTML)(e)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,""),rve={attributes:{type:{type:"string",default:"text"},name:{type:"string"},label:{type:"string",default:"Label",selector:".wp-block-form-input__label-content",source:"html",role:"content"},inlineLabel:{type:"boolean",default:!1},required:{type:"boolean",default:!1,selector:".wp-block-form-input__input",source:"attribute",attribute:"required"},placeholder:{type:"string",selector:".wp-block-form-input__input",source:"attribute",attribute:"placeholder",role:"content"},value:{type:"string",default:"",selector:"input",source:"attribute",attribute:"value"},visibilityPermissions:{type:"string",default:"all"}},supports:{anchor:!0,reusable:!1,spacing:{margin:["top","bottom"]},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}}},save({attributes:e}){let{type:t,name:r,label:a,inlineLabel:n,required:i,placeholder:l,value:s}=e,c=(0,Yl.__experimentalGetBorderClassesAndStyles)(e),u=(0,Yl.__experimentalGetColorClassesAndStyles)(e),m={...c.style,...u.style},p=w("wp-block-form-input__input",u.className,c.className),d=t==="textarea"?"textarea":"input",f=Yl.useBlockProps.save();return t==="hidden"?(0,vi.jsx)("input",{type:t,name:r,value:s}):(0,vi.jsx)("div",{...f,children:(0,vi.jsxs)("label",{className:w("wp-block-form-input__label",{"is-label-inline":n}),children:[(0,vi.jsx)("span",{className:"wp-block-form-input__label-content",children:(0,vi.jsx)(Yl.RichText.Content,{value:a})}),(0,vi.jsx)(d,{className:p,type:t==="textarea"?void 0:t,name:r||hW(a),required:i,"aria-required":i,placeholder:l||void 0,style:m})]})})}},ove={attributes:{type:{type:"string",default:"text"},name:{type:"string"},label:{type:"string",default:"Label",selector:".wp-block-form-input__label-content",source:"html",role:"content"},inlineLabel:{type:"boolean",default:!1},required:{type:"boolean",default:!1,selector:".wp-block-form-input__input",source:"attribute",attribute:"required"},placeholder:{type:"string",selector:".wp-block-form-input__input",source:"attribute",attribute:"placeholder",role:"content"},value:{type:"string",default:"",selector:"input",source:"attribute",attribute:"value"},visibilityPermissions:{type:"string",default:"all"}},supports:{className:!1,anchor:!0,reusable:!1,spacing:{margin:["top","bottom"]},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}}},save({attributes:e}){let{type:t,name:r,label:a,inlineLabel:n,required:i,placeholder:l,value:s}=e,c=(0,Yl.__experimentalGetBorderClassesAndStyles)(e),u=(0,Yl.__experimentalGetColorClassesAndStyles)(e),m={...c.style,...u.style},p=w("wp-block-form-input__input",u.className,c.className),d=t==="textarea"?"textarea":"input";return t==="hidden"?(0,vi.jsx)("input",{type:t,name:r,value:s}):(0,vi.jsxs)("label",{className:w("wp-block-form-input__label",{"is-label-inline":n}),children:[(0,vi.jsx)("span",{className:"wp-block-form-input__label-content",children:(0,vi.jsx)(Yl.RichText.Content,{value:a})}),(0,vi.jsx)(d,{className:p,type:t==="textarea"?void 0:t,name:r||hW(a),required:i,"aria-required":i,placeholder:l||void 0,style:m})]})}},ave=[rve,ove],gW=ave;var An=o(P(),1),Xl=o(T(),1),Us=o(M(),1),vW=o(U(),1);var Yr=o(v(),1);function nve({attributes:e,setAttributes:t,className:r}){let{type:a,name:n,label:i,inlineLabel:l,required:s,placeholder:c,value:u}=e,m=(0,Xl.useBlockProps)(),p=q(),d=(0,vW.useRef)(),f=a==="textarea"?"textarea":"input",h=(0,Xl.__experimentalUseBorderProps)(e),g=(0,Xl.__experimentalUseColorProps)(e);d.current&&d.current.focus();let b=a==="checkbox"||a==="radio",y=(0,Yr.jsxs)(Yr.Fragment,{children:[a!=="hidden"&&(0,Yr.jsx)(Xl.InspectorControls,{children:(0,Yr.jsxs)(Us.__experimentalToolsPanel,{label:(0,An.__)("Settings"),resetAll:()=>{t({inlineLabel:!1,required:!1})},dropdownMenuProps:p,children:[a!=="checkbox"&&(0,Yr.jsx)(Us.__experimentalToolsPanelItem,{label:(0,An.__)("Inline label"),hasValue:()=>!!l,onDeselect:()=>t({inlineLabel:!1}),isShownByDefault:!0,children:(0,Yr.jsx)(Us.CheckboxControl,{label:(0,An.__)("Inline label"),checked:l,onChange:_=>{t({inlineLabel:_})}})}),(0,Yr.jsx)(Us.__experimentalToolsPanelItem,{label:(0,An.__)("Required"),hasValue:()=>!!s,onDeselect:()=>t({required:!1}),isShownByDefault:!0,children:(0,Yr.jsx)(Us.CheckboxControl,{label:(0,An.__)("Required"),checked:s,onChange:_=>{t({required:_})}})})]})}),(0,Yr.jsx)(Xl.InspectorControls,{group:"advanced",children:(0,Yr.jsx)(Us.TextControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,An.__)("Name"),value:n,onChange:_=>{t({name:_})},help:(0,An.__)('Affects the "name" attribute of the input element, and is used as a name for the form submission results.')})})]}),k=(0,Yr.jsx)(Xl.RichText,{tagName:"span",className:"wp-block-form-input__label-content",value:i,onChange:_=>t({label:_}),"aria-label":i?(0,An.__)("Label"):(0,An.__)("Empty label"),"data-empty":!i,placeholder:(0,An.__)("Type the label for this input")});return a==="hidden"?(0,Yr.jsxs)(Yr.Fragment,{children:[y,(0,Yr.jsx)("input",{type:"hidden",className:w(r,"wp-block-form-input__input",g.className,h.className),"aria-label":(0,An.__)("Value"),value:u,onChange:_=>t({value:_.target.value})})]}):(0,Yr.jsxs)("div",{...m,children:[y,(0,Yr.jsxs)("span",{className:w("wp-block-form-input__label",{"is-label-inline":l||a==="checkbox"}),children:[!b&&k,(0,Yr.jsx)(f,{type:a==="textarea"?void 0:a,className:w(r,"wp-block-form-input__input",g.className,h.className),"aria-label":(0,An.__)("Optional placeholder text"),placeholder:c?void 0:(0,An.__)("Optional placeholder\u2026"),value:c,onChange:_=>t({placeholder:_.target.value}),"aria-required":s,style:{...h.style,...g.style}}),b&&k]})]})}var bW=nve;var L5={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/form-input",title:"Input Field",category:"common",ancestor:["core/form"],description:"The basic building block for forms.",keywords:["input","form"],textdomain:"default",attributes:{type:{type:"string",default:"text"},name:{type:"string"},label:{type:"rich-text",default:"Label",selector:".wp-block-form-input__label-content",source:"rich-text",role:"content"},inlineLabel:{type:"boolean",default:!1},required:{type:"boolean",default:!1,selector:".wp-block-form-input__input",source:"attribute",attribute:"required"},placeholder:{type:"string",selector:".wp-block-form-input__input",source:"attribute",attribute:"placeholder",role:"content"},value:{type:"string",default:"",selector:"input",source:"attribute",attribute:"value"},visibilityPermissions:{type:"string",default:"all"}},supports:{anchor:!0,reusable:!1,spacing:{margin:["top","bottom"]},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}}},style:["wp-block-form-input"]};var yW=o(rv(),1),eu=o(T(),1),_W=o(ai(),1),Gs=o(v(),1),lve=e=>(0,yW.default)((0,_W.__unstableStripHTML)(e)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,"");function xW({attributes:e}){let{type:t,name:r,label:a,inlineLabel:n,required:i,placeholder:l,value:s}=e,c=(0,eu.__experimentalGetBorderClassesAndStyles)(e),u=(0,eu.__experimentalGetColorClassesAndStyles)(e),m={...c.style,...u.style},p=w("wp-block-form-input__input",u.className,c.className),d=t==="textarea"?"textarea":"input",f=eu.useBlockProps.save(),h=t==="checkbox"||t==="radio";return t==="hidden"?(0,Gs.jsx)("input",{type:t,name:r,value:s}):(0,Gs.jsx)("div",{...f,children:(0,Gs.jsxs)("label",{className:w("wp-block-form-input__label",{"is-label-inline":n}),children:[!h&&(0,Gs.jsx)("span",{className:"wp-block-form-input__label-content",children:(0,Gs.jsx)(eu.RichText.Content,{value:a})}),(0,Gs.jsx)(d,{className:p,type:t==="textarea"?void 0:t,name:r||lve(a),required:i,"aria-required":i,placeholder:l||void 0,style:m}),h&&(0,Gs.jsx)("span",{className:"wp-block-form-input__label-content",children:(0,Gs.jsx)(eu.RichText.Content,{value:a})})]})})}var tn=o(P(),1),sve=[{name:"text",title:(0,tn.__)("Text Input"),description:(0,tn.__)("A generic text input."),attributes:{type:"text"},isDefault:!0,scope:["inserter","transform"],isActive:e=>!e?.type||e?.type==="text"},{name:"textarea",title:(0,tn.__)("Textarea Input"),description:(0,tn.__)("A textarea input to allow entering multiple lines of text."),attributes:{type:"textarea"},isDefault:!0,scope:["inserter","transform"],isActive:e=>e?.type==="textarea"},{name:"checkbox",title:(0,tn.__)("Checkbox Input"),description:(0,tn.__)("A simple checkbox input."),attributes:{type:"checkbox",inlineLabel:!0},isDefault:!0,scope:["inserter","transform"],isActive:e=>e?.type==="checkbox"},{name:"email",title:(0,tn.__)("Email Input"),description:(0,tn.__)("Used for email addresses."),attributes:{type:"email"},isDefault:!0,scope:["inserter","transform"],isActive:e=>e?.type==="email"},{name:"url",title:(0,tn.__)("URL Input"),description:(0,tn.__)("Used for URLs."),attributes:{type:"url"},isDefault:!0,scope:["inserter","transform"],isActive:e=>e?.type==="url"},{name:"tel",title:(0,tn.__)("Telephone Input"),description:(0,tn.__)("Used for phone numbers."),attributes:{type:"tel"},isDefault:!0,scope:["inserter","transform"],isActive:e=>e?.type==="tel"},{name:"number",title:(0,tn.__)("Number Input"),description:(0,tn.__)("A numeric input."),attributes:{type:"number"},isDefault:!0,scope:["inserter","transform"],isActive:e=>e?.type==="number"}],kW=sve;var M5=o(L(),1),LN=o(v(),1),wW=(0,LN.jsx)(M5.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LN.jsx)(M5.Path,{d:"M5.547 18.892A.99.99 0 0 0 6 19h.72v1H6a1.99 1.99 0 0 1-.908-.22l.455-.888ZM9.12 20H7.68v-1h1.44v1Zm2.4 0h-1.44v-1h1.44v1Zm2.4 0h-1.44v-1h1.44v1Zm2.4 0h-1.44v-1h1.44v1Zm2.587-.22c-.272.14-.58.22-.907.22h-.72v-1H18a.99.99 0 0 0 .453-.108l.454.888ZM5.108 17.547a.99.99 0 0 0 0 .906l-.89.454a1.99 1.99 0 0 1 0-1.815l.89.455Zm14.672-.455a1.99 1.99 0 0 1 0 1.815l-.888-.454a.99.99 0 0 0 0-.906l.888-.455ZM6.72 17H6a.99.99 0 0 0-.453.108l-.455-.89A1.99 1.99 0 0 1 6 16h.72v1ZM18 16c.327 0 .635.08.907.219l-.454.89A.99.99 0 0 0 18 17h-.72v-1H18Zm-8.88 1H7.68v-1h1.44v1Zm2.4 0h-1.44v-1h1.44v1Zm2.4 0h-1.44v-1h1.44v1Zm2.4 0h-1.44v-1h1.44v1ZM5.5 14.28H4.25v-1H5.5v1Zm2.5 0H6.5v-1H8v1Zm2.5 0H9v-1h1.5v1Zm2.25 0H11.5v-1h1.25v1ZM18 7a2 2 0 1 1 0 4H6a2 2 0 1 1 0-4h12ZM6 8.5a.5.5 0 0 0 0 1h12a.5.5 0 0 0 0-1H6Zm7-3H4V4h9v1.5Z"})});var{name:CW}=L5,SW={icon:wW,deprecated:gW,edit:bW,save:xW,variations:kW,example:{}},cve=()=>E({name:CW,metadata:L5,settings:SW});var RN={};Z(RN,{init:()=>dve,metadata:()=>R5,name:()=>NW,settings:()=>EW});var TW=o(P(),1),A5=o(T(),1),PW=o(v(),1),uve=[["core/buttons",{},[["core/button",{text:(0,TW.__)("Submit"),tagName:"button",type:"submit"}]]]],mve=()=>{let e=(0,A5.useBlockProps)(),t=(0,A5.useInnerBlocksProps)(e,{template:uve,templateLock:"all"});return(0,PW.jsx)("div",{className:"wp-block-form-submit-wrapper",...t})},BW=mve;var R5={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/form-submit-button",title:"Form Submit Button",category:"common",icon:"button",ancestor:["core/form"],allowedBlocks:["core/buttons","core/button"],description:"A submission button for forms.",keywords:["submit","button","form"],textdomain:"default",style:["wp-block-form-submit-button"]};var z5=o(T(),1),AN=o(v(),1);function IW(){let e=z5.useBlockProps.save();return(0,AN.jsx)("div",{className:"wp-block-form-submit-wrapper",...e,children:(0,AN.jsx)(z5.InnerBlocks.Content,{})})}var{name:NW}=R5,EW={edit:BW,save:IW,example:{}},dve=()=>E({name:NW,metadata:R5,settings:EW});var zN={};Z(zN,{init:()=>bve,metadata:()=>F5,name:()=>VW,settings:()=>FW});var V5=o(P(),1),dm=o(T(),1),DW=o(V(),1);var LW=o(v(),1),fve=[["core/paragraph",{content:(0,V5.__)("Enter the message you wish displayed for form submission error/success, and select the type of the message (success/error) from the block's options.")}]],hve=({attributes:e,clientId:t})=>{let{type:r}=e,a=(0,dm.useBlockProps)({className:w("wp-block-form-submission-notification",{[`form-notification-type-${r}`]:r})}),{hasInnerBlocks:n}=(0,DW.useSelect)(l=>{let{getBlock:s}=l(dm.store),c=s(t);return{hasInnerBlocks:!!(c&&c.innerBlocks.length)}},[t]),i=(0,dm.useInnerBlocksProps)(a,{template:fve,renderAppender:n?void 0:dm.InnerBlocks.ButtonBlockAppender});return(0,LW.jsx)("div",{...i,"data-message-success":(0,V5.__)("Submission success notification"),"data-message-error":(0,V5.__)("Submission error notification")})},MW=hve;var F5={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/form-submission-notification",title:"Form Submission Notification",category:"common",ancestor:["core/form"],description:"Provide a notification message after the form has been submitted.",keywords:["form","feedback","notification","message"],textdomain:"default",icon:"feedback",attributes:{type:{type:"string",default:"success"}}};var H5=o(T(),1);var AW=o(v(),1);function RW({attributes:e}){let{type:t}=e;return(0,AW.jsx)("div",{...H5.useInnerBlocksProps.save(H5.useBlockProps.save({className:w("wp-block-form-submission-notification",{[`form-notification-type-${t}`]:t})}))})}var ad=o(P(),1),vve=[{name:"form-submission-success",title:(0,ad.__)("Form Submission Success"),description:(0,ad.__)("Success message for form submissions."),attributes:{type:"success"},isDefault:!0,innerBlocks:[["core/paragraph",{content:(0,ad.__)("Your form has been submitted successfully."),backgroundColor:"#00D084",textColor:"#000000",style:{elements:{link:{color:{text:"#000000"}}}}}]],scope:["inserter","transform"],isActive:e=>!e?.type||e?.type==="success"},{name:"form-submission-error",title:(0,ad.__)("Form Submission Error"),description:(0,ad.__)("Error/failure message for form submissions."),attributes:{type:"error"},isDefault:!1,innerBlocks:[["core/paragraph",{content:(0,ad.__)("There was an error submitting your form."),backgroundColor:"#CF2E2E",textColor:"#FFFFFF",style:{elements:{link:{color:{text:"#FFFFFF"}}}}}]],scope:["inserter","transform"],isActive:e=>!e?.type||e?.type==="error"}],zW=vve;var{name:VW}=F5,FW={icon:wp,edit:MW,save:RW,variations:zW,example:{}},bve=()=>E({name:VW,metadata:F5,settings:FW});var ZN={};Z(ZN,{init:()=>Fve,metadata:()=>j5,name:()=>b$,settings:()=>y$});var Ir=o(T(),1),jW=o(W(),1);var Ws="none",$s="media",ov="lightbox",qs="attachment",HW="file",OW="post",av="large";var Fe=o(v(),1),UW="file",GW="post";function mh(e){return Math.min(3,e?.images?.length)}function yve(e,t){switch(t){case UW:return{href:e?.source_url||e?.url,linkDestination:$s};case GW:return{href:e?.link,linkDestination:qs};case $s:return{href:e?.source_url||e?.url,linkDestination:$s};case qs:return{href:e?.link,linkDestination:qs};case Ws:return{href:void 0,linkDestination:Ws}}return{}}function ph(e){let t=e.linkTo?e.linkTo:"none";t==="post"?t="attachment":t==="file"&&(t="media");let r=e.images.map(l=>_ve(l,e.sizeSlug,t)),{images:a,ids:n,...i}=e;return[{...i,linkTo:t,allowResize:!1},r]}function _ve(e,t,r){return(0,jW.createBlock)("core/image",{...e.id&&{id:parseInt(e.id)},url:e.url,alt:e.alt,caption:e.caption,sizeSlug:t,...yve(e,r)})}var xve={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},shortCodeTransforms:{type:"array",default:[],items:{type:"object"}},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},fixedHeight:{type:"boolean",default:!0},linkTarget:{type:"string"},linkTo:{type:"string"},sizeSlug:{type:"string",default:"large"},allowResize:{type:"boolean",default:!1}},save({attributes:e}){let{caption:t,columns:r,imageCrop:a}=e,n=w("has-nested-images",{[`columns-${r}`]:r!==void 0,"columns-default":r===void 0,"is-cropped":a}),i=Ir.useBlockProps.save({className:n}),l=Ir.useInnerBlocksProps.save(i);return(0,Fe.jsxs)("figure",{...l,children:[l.children,!Ir.RichText.isEmpty(t)&&(0,Fe.jsx)(Ir.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:t})]})}},kve={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},fixedHeight:{type:"boolean",default:!0},linkTo:{type:"string"},sizeSlug:{type:"string",default:"large"}},supports:{anchor:!0,align:!0},save({attributes:e}){let{images:t,columns:r=mh(e),imageCrop:a,caption:n,linkTo:i}=e,l=`columns-${r} ${a?"is-cropped":""}`;return(0,Fe.jsxs)("figure",{...Ir.useBlockProps.save({className:l}),children:[(0,Fe.jsx)("ul",{className:"blocks-gallery-grid",children:t.map(s=>{let c;switch(i){case UW:c=s.fullUrl||s.url;break;case GW:c=s.link;break}let u=(0,Fe.jsx)("img",{src:s.url,alt:s.alt,"data-id":s.id,"data-full-url":s.fullUrl,"data-link":s.link,className:s.id?`wp-image-${s.id}`:null});return(0,Fe.jsx)("li",{className:"blocks-gallery-item",children:(0,Fe.jsxs)("figure",{children:[c?(0,Fe.jsx)("a",{href:c,children:u}):u,!Ir.RichText.isEmpty(s.caption)&&(0,Fe.jsx)(Ir.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:s.caption})]})},s.id||s.url)})}),!Ir.RichText.isEmpty(n)&&(0,Fe.jsx)(Ir.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:n})]})},migrate(e){return ph(e)}},wve={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},sizeSlug:{type:"string",default:"large"}},supports:{align:!0},isEligible({linkTo:e}){return!e||e==="attachment"||e==="media"},migrate(e){return ph(e)},save({attributes:e}){let{images:t,columns:r=mh(e),imageCrop:a,caption:n,linkTo:i}=e;return(0,Fe.jsxs)("figure",{className:`columns-${r} ${a?"is-cropped":""}`,children:[(0,Fe.jsx)("ul",{className:"blocks-gallery-grid",children:t.map(l=>{let s;switch(i){case"media":s=l.fullUrl||l.url;break;case"attachment":s=l.link;break}let c=(0,Fe.jsx)("img",{src:l.url,alt:l.alt,"data-id":l.id,"data-full-url":l.fullUrl,"data-link":l.link,className:l.id?`wp-image-${l.id}`:null});return(0,Fe.jsx)("li",{className:"blocks-gallery-item",children:(0,Fe.jsxs)("figure",{children:[s?(0,Fe.jsx)("a",{href:s,children:c}):c,!Ir.RichText.isEmpty(l.caption)&&(0,Fe.jsx)(Ir.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:l.caption})]})},l.id||l.url)})}),!Ir.RichText.isEmpty(n)&&(0,Fe.jsx)(Ir.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:n})]})}},Cve={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},link:{source:"attribute",selector:"img",attribute:"data-link"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",default:[]},columns:{type:"number"},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},supports:{align:!0},isEligible({ids:e}){return e&&e.some(t=>typeof t=="string")},migrate(e){return ph(e)},save({attributes:e}){let{images:t,columns:r=mh(e),imageCrop:a,caption:n,linkTo:i}=e;return(0,Fe.jsxs)("figure",{className:`columns-${r} ${a?"is-cropped":""}`,children:[(0,Fe.jsx)("ul",{className:"blocks-gallery-grid",children:t.map(l=>{let s;switch(i){case"media":s=l.fullUrl||l.url;break;case"attachment":s=l.link;break}let c=(0,Fe.jsx)("img",{src:l.url,alt:l.alt,"data-id":l.id,"data-full-url":l.fullUrl,"data-link":l.link,className:l.id?`wp-image-${l.id}`:null});return(0,Fe.jsx)("li",{className:"blocks-gallery-item",children:(0,Fe.jsxs)("figure",{children:[s?(0,Fe.jsx)("a",{href:s,children:c}):c,!Ir.RichText.isEmpty(l.caption)&&(0,Fe.jsx)(Ir.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:l.caption})]})},l.id||l.url)})}),!Ir.RichText.isEmpty(n)&&(0,Fe.jsx)(Ir.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:n})]})}},Sve={attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"string",source:"html",selector:"figcaption"}}},ids:{type:"array",default:[]},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},supports:{align:!0},save({attributes:e}){let{images:t,columns:r=mh(e),imageCrop:a,linkTo:n}=e;return(0,Fe.jsx)("ul",{className:`columns-${r} ${a?"is-cropped":""}`,children:t.map(i=>{let l;switch(n){case"media":l=i.fullUrl||i.url;break;case"attachment":l=i.link;break}let s=(0,Fe.jsx)("img",{src:i.url,alt:i.alt,"data-id":i.id,"data-full-url":i.fullUrl,"data-link":i.link,className:i.id?`wp-image-${i.id}`:null});return(0,Fe.jsx)("li",{className:"blocks-gallery-item",children:(0,Fe.jsxs)("figure",{children:[l?(0,Fe.jsx)("a",{href:l,children:s}):s,i.caption&&i.caption.length>0&&(0,Fe.jsx)(Ir.RichText.Content,{tagName:"figcaption",value:i.caption})]})},i.id||i.url)})})},migrate(e){return ph(e)}},Tve={attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"string",source:"html",selector:"figcaption"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},isEligible({images:e,ids:t}){return e&&e.length>0&&(!t&&e||t&&e&&t.length!==e.length||e.some((r,a)=>!r&&t[a]!==null?!0:parseInt(r,10)!==t[a]))},migrate(e){return ph(e)},supports:{align:!0},save({attributes:e}){let{images:t,columns:r=mh(e),imageCrop:a,linkTo:n}=e;return(0,Fe.jsx)("ul",{className:`columns-${r} ${a?"is-cropped":""}`,children:t.map(i=>{let l;switch(n){case"media":l=i.url;break;case"attachment":l=i.link;break}let s=(0,Fe.jsx)("img",{src:i.url,alt:i.alt,"data-id":i.id,"data-link":i.link,className:i.id?`wp-image-${i.id}`:null});return(0,Fe.jsx)("li",{className:"blocks-gallery-item",children:(0,Fe.jsxs)("figure",{children:[l?(0,Fe.jsx)("a",{href:l,children:s}):s,i.caption&&i.caption.length>0&&(0,Fe.jsx)(Ir.RichText.Content,{tagName:"figcaption",value:i.caption})]})},i.id||i.url)})})}},Pve={attributes:{images:{type:"array",default:[],source:"query",selector:"div.wp-block-gallery figure.blocks-gallery-image img",query:{url:{source:"attribute",attribute:"src"},alt:{source:"attribute",attribute:"alt",default:""},id:{source:"attribute",attribute:"data-id"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},align:{type:"string",default:"none"}},supports:{align:!0},save({attributes:e}){let{images:t,columns:r=mh(e),align:a,imageCrop:n,linkTo:i}=e,l=w(`columns-${r}`,{alignnone:a==="none","is-cropped":n});return(0,Fe.jsx)("div",{className:l,children:t.map(s=>{let c;switch(i){case"media":c=s.url;break;case"attachment":c=s.link;break}let u=(0,Fe.jsx)("img",{src:s.url,alt:s.alt,"data-id":s.id});return(0,Fe.jsx)("figure",{className:"blocks-gallery-image",children:c?(0,Fe.jsx)("a",{href:c,children:u}):u},s.id||s.url)})})},migrate(e){return ph(e)}},WW=[xve,kve,wve,Cve,Sve,Tve,Pve];var Ke=o(M(),1),Do=o(T(),1),ea=o(U(),1),he=o(P(),1),sv=o(V(),1),m$=o(L(),1),p$=o(W(),1),$N=o(Rr(),1),d$=o(xr(),1);var $W=o(T(),1);var qW=o(v(),1),ZW=(0,qW.jsx)($W.BlockIcon,{icon:j0});function VN(e){return e?Math.min(3,e):3}var KW=(e,t="large")=>{let r=Object.fromEntries(Object.entries(e??{}).filter(([n])=>["alt","id","link"].includes(n)));r.url=e?.sizes?.[t]?.url||e?.media_details?.sizes?.[t]?.source_url||e?.url||e?.source_url;let a=e?.sizes?.full?.url||e?.media_details?.sizes?.full?.source_url;return a&&(r.fullUrl=a),r};var Zs=20,nd="none",dh="media",fh="attachment",FN="custom",QW=["noreferrer","noopener"],tu=["image"];var HN=["flex","grid"],nv="full";function ON(e,t,r,a,n){switch(r||t){case HW:case $s:return{href:e?.source_url||e?.url,linkDestination:dh,lightbox:n?.enabled?{...a?.lightbox,enabled:!1}:void 0};case OW:case qs:return{href:e?.link,linkDestination:fh,lightbox:n?.enabled?{...a?.lightbox,enabled:!1}:void 0};case ov:return{href:void 0,lightbox:n?.enabled?void 0:{...a?.lightbox,enabled:!0},linkDestination:nd};case Ws:return{href:void 0,linkDestination:nd,lightbox:void 0}}return{}}function YW(e){let[t,r=1]=e.split("/").map(Number),a=t/r;return a===1/0||a===0?NaN:a}function Bve(e){let t=e;return e!==void 0&&t&&(QW.forEach(r=>{let a=new RegExp("\\b"+r+"\\b","gi");t=t.replace(a,"")}),t!==e&&(t=t.trim()),t||(t=void 0)),t}function jN(e,{rel:t}){let r=e?"_blank":void 0,a;return!r&&!t?a=void 0:a=Bve(t),{linkTarget:r,rel:a}}function XW(e,t){let r=e?.media_details?.sizes?.[t]?.source_url;return r?{url:r,width:void 0,height:void 0,sizeSlug:t}:{}}function UN(e){return tu.some(t=>e.type.indexOf(t)===0)}function iv({x:e,y:t}={x:.5,y:.5}){return`${Math.round(e*100)}% ${Math.round(t*100)}%`}var GN=o(P(),1),JW=o(L(),1);var lv=o(v(),1);function e$(e){let{attributes:t,isSelected:r,setAttributes:a,mediaPlaceholder:n,insertBlocksAfter:i,blockProps:l,__unstableLayoutClassNames:s,isContentLocked:c,multiGallerySelection:u}=e,{align:m,columns:p,imageCrop:d}=t;return(0,lv.jsxs)("figure",{...l,className:w(l.className,s,"blocks-gallery-grid",{[`align${m}`]:m,[`columns-${p}`]:p!==void 0,"columns-default":p===void 0,"is-cropped":d}),children:[l.children,r&&!l.children&&(0,lv.jsx)(JW.View,{className:"blocks-gallery-media-placeholder-wrapper",children:n}),(0,lv.jsx)(_a,{attributes:t,setAttributes:a,isSelected:r,insertBlocksAfter:i,showToolbarButton:!u&&!c,className:"blocks-gallery-caption",label:(0,GN.__)("Gallery caption text"),placeholder:(0,GN.__)("Add gallery caption")})]})}var t$=o(U(),1);function r$(e,t,r){return(0,t$.useMemo)(()=>a(),[e,t]);function a(){if(!e||e.length===0)return;let{imageSizes:n}=r(),i={};t&&(i=e.reduce((s,c)=>{if(!c.id)return s;let u=n.reduce((m,p)=>{let d=c.sizes?.[p.slug]?.url,f=c.media_details?.sizes?.[p.slug]?.source_url;return{...m,[p.slug]:d||f}},{});return{...s,[parseInt(c.id,10)]:u}},{}));let l=Object.values(i);return n.filter(({slug:s})=>l.some(c=>c[s])).map(({name:s,slug:c})=>({value:c,label:s}))}}var O5=o(U(),1);function o$(e,t){let[r,a]=(0,O5.useState)([]);return(0,O5.useMemo)(()=>n(),[e,t]);function n(){let i=!1,l=r.filter(c=>e.find(u=>c.clientId===u.clientId));l.length<r.length&&(i=!0),e.forEach(c=>{c.fromSavedContent&&!l.find(u=>u.id===c.id)&&(i=!0,l.push(c))});let s=e.filter(c=>!l.find(u=>c.clientId&&u.clientId===c.clientId)&&t?.find(u=>u.id===c.id)&&!c.fromSavedContent);return(i||s?.length>0)&&a([...l,...s]),s.length>0?s:null}}var n$=o(V(),1),i$=o(Q(),1),a$=[];function l$(e){return(0,n$.useSelect)(t=>{let r=e.map(a=>a.attributes.id).filter(a=>a!==void 0);return r.length===0?a$:t(i$.store).getEntityRecords("postType","attachment",{include:r.join(","),per_page:-1,orderby:"include"})??a$},[e])}var id=o(T(),1);function s$({blockGap:e,clientId:t}){let r="var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) )",a=r,n=r,i;e&&(i=typeof e=="string"?(0,id.__experimentalGetGapCSSValue)(e):(0,id.__experimentalGetGapCSSValue)(e?.top)||r,n=typeof e=="string"?(0,id.__experimentalGetGapCSSValue)(e):(0,id.__experimentalGetGapCSSValue)(e?.left)||r,a=i===n?i:`${i} ${n}`);let l=`#block-${t} {
		--wp--style--unstable-gallery-gap: ${n==="0"?"0px":n};
		gap: ${a}
	}`;return(0,id.useStyleOverride)({css:l}),null}var He=o(v(),1),c$=8,u$=[{icon:L0,label:(0,he.__)("Link images to attachment pages"),value:qs,noticeText:(0,he.__)("Attachment Pages")},{icon:Wu,label:(0,he.__)("Link images to media files"),value:$s,noticeText:(0,he.__)("Media Files")},{icon:kp,label:(0,he.__)("Enlarge on click"),value:ov,noticeText:(0,he.__)("Lightbox effect"),infoText:(0,he.__)("Scale images with a lightbox effect")},{icon:U0,label:(0,he._x)("None","Media item link option"),value:Ws,noticeText:(0,he.__)("None")}],Ive=[{label:(0,he.__)("Icon"),value:"icon"},{label:(0,he.__)("Text"),value:"text"},{label:(0,he.__)("Both"),value:"both"}],WN=["image"],Nve=ea.Platform.isNative?(0,he.__)("Add media"):(0,he.__)("Drag and drop images, upload, or choose from your library."),Eve=ea.Platform.isNative?{type:"stepper"}:{},Dve={name:"core/image"},Lve=[];function f$(e){let{setAttributes:t,attributes:r,className:a,clientId:n,isSelected:i,insertBlocksAfter:l,isContentLocked:s,onFocus:c}=e,[u,m,p,d]=(0,Do.useSettings)("blocks.core/image.lightbox","dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),f=u?.allowEditing?u$:u$.filter(Y=>Y.value!==ov),{navigationButtonType:h,columns:g,imageCrop:b,randomOrder:y,linkTarget:k,linkTo:_,sizeSlug:x,aspectRatio:S}=r,{__unstableMarkNextChangeAsNotPersistent:C,replaceInnerBlocks:N,updateBlockAttributes:B,selectBlock:D}=(0,sv.useDispatch)(Do.store),{createSuccessNotice:A,createErrorNotice:H}=(0,sv.useDispatch)(d$.store),{getBlock:F,getSettings:z,innerBlockImages:I,blockWasJustInserted:R,multiGallerySelection:$}=(0,sv.useSelect)(Y=>{let{getBlockName:ze,getMultiSelectedBlockClientIds:Me,getSettings:Xe,getBlock:Te,wasBlockJustInserted:Bt}=Y(Do.store),yr=Me();return{getBlock:Te,getSettings:Xe,innerBlockImages:Te(n)?.innerBlocks??Lve,blockWasJustInserted:Bt(n,"inserter_menu"),multiGallerySelection:yr.length&&yr.every(xn=>ze(xn)==="core/gallery")}},[n]),j=(0,ea.useMemo)(()=>I?.map(Y=>({clientId:Y.clientId,id:Y.attributes.id,url:Y.attributes.url,attributes:Y.attributes,fromSavedContent:!!Y.originalContent})),[I]),G=l$(I),O=o$(j,G),J=u?.enabled?j.filter(Y=>Y.attributes?.lightbox?.enabled===void 0||Y.attributes?.lightbox?.enabled===!0).length>0:j.filter(Y=>Y.attributes.lightbox?.enabled).length>0,ee=p?.map(({name:Y,ratio:ze})=>({label:Y,value:ze})),oe=m?.map(({name:Y,ratio:ze})=>({label:Y,value:ze})),X=[{label:(0,he._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...d?oe||[]:[],...ee||[]];(0,ea.useEffect)(()=>{O?.forEach(Y=>{C(),B(Y.clientId,{...ne(Y.attributes),id:Y.id,align:void 0})})},[O]);let te=r$(G,i,z);function ne(Y){let ze=Y.id?G.find(({id:Te})=>Te===Y.id):null,Me;Y.className&&Y.className!==""&&(Me=Y.className);let Xe;return Y.linkTarget||Y.rel?Xe={linkTarget:Y.linkTarget,rel:Y.rel}:Xe=jN(k,r),{...KW(ze,x),...ON(ze,_,Y?.linkDestination),...Xe,className:Me,sizeSlug:x,caption:Y.caption.length>0?Y.caption:ze.caption?.raw,alt:Y.alt||ze.alt_text,aspectRatio:S==="auto"?void 0:S}}function le(Y){let ze=ea.Platform.isNative&&Y.id?G.find(({id:Xe})=>Xe===Y.id):null,Me=ze?ze?.media_type:Y.type;return WN.some(Xe=>Me?.indexOf(Xe)===0)||Y.blob}function pe(Y){let ze=Object.prototype.toString.call(Y)==="[object FileList]",Me=ze?Array.from(Y).map(Je=>Je.url?Je:{blob:(0,$N.createBlobURL)(Je)}):Y;Me.every(le)||H((0,he.__)("If uploading to a gallery all files need to be image formats"),{id:"gallery-upload-invalid-file",type:"snackbar"});let Xe=Me.filter(Je=>Je.url||le(Je)).map(Je=>Je.url?Je:{blob:Je.blob||(0,$N.createBlobURL)(Je)}),Te=Xe.reduce((Je,$r,ip)=>(Je[$r.id]=ip,Je),{}),Bt=ze?I:I.filter(Je=>Xe.find($r=>$r.id===Je.attributes.id)),xn=Xe.filter(Je=>!Bt.find($r=>Je.id===$r.attributes.id)).map(Je=>(0,p$.createBlock)("core/image",{id:Je.id,blob:Je.blob,url:Je.url,caption:Je.caption,alt:Je.alt}));N(n,Bt.concat(xn).sort((Je,$r)=>Te[Je.attributes.id]-Te[$r.attributes.id])),xn?.length>0&&D(xn[0].clientId)}function Ie(Y){H(Y,{type:"snackbar"})}function Ne(Y){t({linkTo:Y});let ze={},Me=[];F(n).innerBlocks.forEach(Te=>{Me.push(Te.clientId);let Bt=Te.attributes.id?G.find(({id:yr})=>yr===Te.attributes.id):null;ze[Te.clientId]=ON(Bt,Y,!1,Te.attributes,u)}),B(Me,ze,{uniqueByBlock:!0});let Xe=[...f].find(Te=>Te.value===Y);A((0,he.sprintf)((0,he.__)("All gallery image links updated to: %s"),Xe.noticeText),{id:"gallery-attributes-linkTo",type:"snackbar"})}function ae(Y){t({columns:Y})}function Re(){t({imageCrop:!b})}function Ee(){t({randomOrder:!y})}function ie(Y){let ze=Y?"_blank":void 0;t({linkTarget:ze});let Me={},Xe=[];F(n).innerBlocks.forEach(Bt=>{Xe.push(Bt.clientId),Me[Bt.clientId]=jN(ze,Bt.attributes)}),B(Xe,Me,{uniqueByBlock:!0});let Te=Y?(0,he.__)("All gallery images updated to open in new tab"):(0,he.__)("All gallery images updated to not open in new tab");A(Te,{id:"gallery-attributes-openInNewTab",type:"snackbar"})}function fe(Y){t({sizeSlug:Y});let ze={},Me=[];F(n).innerBlocks.forEach(Te=>{Me.push(Te.clientId);let Bt=Te.attributes.id?G.find(({id:yr})=>yr===Te.attributes.id):null;ze[Te.clientId]=XW(Bt,Y)}),B(Me,ze,{uniqueByBlock:!0});let Xe=te.find(Te=>Te.value===Y);A((0,he.sprintf)((0,he.__)("All gallery image sizes updated to: %s"),Xe?.label??Y),{id:"gallery-attributes-sizeSlug",type:"snackbar"})}function ke(Y){t({aspectRatio:Y});let ze={},Me=[];F(n).innerBlocks.forEach(Te=>{Me.push(Te.clientId),ze[Te.clientId]={aspectRatio:Y==="auto"?void 0:Y}}),B(Me,ze,!0);let Xe=X.find(Te=>Te.value===Y);A((0,he.sprintf)((0,he.__)("All gallery images updated to aspect ratio: %s"),Xe?.label||Y),{id:"gallery-attributes-aspectRatio",type:"snackbar"})}(0,ea.useEffect)(()=>{_||(C(),t({linkTo:window?.wp?.media?.view?.settings?.defaultProps?.link||Ws}))},[_]);let je=!!j.length,de=je&&j.some(Y=>!!Y.id),ct=j.some(Y=>ea.Platform.isNative?Y.url?.indexOf("file:")===0:!Y.id&&Y.url?.indexOf("blob:")===0),at=ea.Platform.select({web:{addToGallery:!1,disableMediaButtons:ct,value:{}},native:{addToGallery:de,isAppender:je,disableMediaButtons:je&&!i||ct,value:de?j:{},autoOpenMediaUpload:!je&&i&&R,onFocus:c}}),kt=(0,He.jsx)(Do.MediaPlaceholder,{handleUpload:!1,icon:ZW,labels:{title:(0,he.__)("Gallery"),instructions:Nve},onSelect:pe,allowedTypes:WN,multiple:!0,onError:Ie,...at}),Wr=(0,Do.useBlockProps)({className:w(a,"has-nested-images")}),ut=ea.Platform.isNative&&{marginHorizontal:0,marginVertical:0},br=(0,Do.useInnerBlocksProps)(Wr,{defaultBlock:Dve,directInsert:!0,orientation:"horizontal",renderAppender:!1,...ut}),mt=q();if(!je)return(0,He.jsxs)(m$.View,{...br,children:[br.children,kt]});let wo=_&&_!=="none";return(0,He.jsxs)(He.Fragment,{children:[(0,He.jsxs)(Do.InspectorControls,{children:[ea.Platform.isWeb&&(0,He.jsxs)(Ke.__experimentalToolsPanel,{label:(0,he.__)("Settings"),resetAll:()=>{t({navigationButtonType:"icon",columns:void 0,imageCrop:!0,randomOrder:!1}),ke("auto"),x!==av&&fe(av),k&&ie(!1)},dropdownMenuProps:mt,children:[j.length>1&&(0,He.jsx)(Ke.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,he.__)("Columns"),hasValue:()=>!!g&&g!==j.length,onDeselect:()=>ae(void 0),children:(0,He.jsx)(Ke.RangeControl,{label:(0,he.__)("Columns"),value:g||VN(j.length),onChange:ae,min:1,max:Math.min(c$,j.length),required:!0,__next40pxDefaultSize:!0})}),te?.length>0&&(0,He.jsx)(Ke.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,he.__)("Resolution"),hasValue:()=>x!==av,onDeselect:()=>fe(av),children:(0,He.jsx)(Ke.SelectControl,{label:(0,he.__)("Resolution"),help:(0,he.__)("Select the size of the source images."),value:x,options:te,onChange:fe,hideCancelButton:!0,size:"__unstable-large"})}),(0,He.jsx)(Ke.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,he.__)("Crop images to fit"),hasValue:()=>!b,onDeselect:()=>t({imageCrop:!0}),children:(0,He.jsx)(Ke.ToggleControl,{label:(0,he.__)("Crop images to fit"),checked:!!b,onChange:Re})}),(0,He.jsx)(Ke.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,he.__)("Randomize order"),hasValue:()=>!!y,onDeselect:()=>t({randomOrder:!1}),children:(0,He.jsx)(Ke.ToggleControl,{label:(0,he.__)("Randomize order"),checked:!!y,onChange:Ee})}),wo&&(0,He.jsx)(Ke.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,he.__)("Open images in new tab"),hasValue:()=>!!k,onDeselect:()=>ie(!1),children:(0,He.jsx)(Ke.ToggleControl,{label:(0,he.__)("Open images in new tab"),checked:k==="_blank",onChange:ie})}),X.length>1&&(0,He.jsx)(Ke.__experimentalToolsPanelItem,{hasValue:()=>!!S&&S!=="auto",label:(0,he.__)("Aspect ratio"),onDeselect:()=>ke("auto"),isShownByDefault:!0,children:(0,He.jsx)(Ke.SelectControl,{__next40pxDefaultSize:!0,label:(0,he.__)("Aspect ratio"),help:(0,he.__)("Set a consistent aspect ratio for all images in the gallery."),value:S,options:X,onChange:ke})}),(0,He.jsx)(Ke.__experimentalToolsPanelItem,{label:(0,he.__)("Navigation button type"),isShownByDefault:!0,hasValue:()=>h!=="icon",onDeselect:()=>t({navigationButtonType:"icon"}),children:J&&(0,He.jsx)(Ke.__experimentalToggleGroupControl,{label:(0,he.__)("Navigation button type"),value:h,onChange:Y=>t({navigationButtonType:Y}),isBlock:!0,__next40pxDefaultSize:!0,help:(0,he.__)("Adjust the appearance of buttons in the lightbox."),children:Ive.map(Y=>(0,He.jsx)(Ke.__experimentalToggleGroupControlOption,{value:Y.value,label:Y.label},Y.value))})})]}),ea.Platform.isNative&&(0,He.jsxs)(Ke.PanelBody,{title:(0,he.__)("Settings"),children:[j.length>1&&(0,He.jsx)(Ke.RangeControl,{label:(0,he.__)("Columns"),value:g||VN(j.length),onChange:ae,min:1,max:Math.min(c$,j.length),...Eve,required:!0,__next40pxDefaultSize:!0}),te?.length>0&&(0,He.jsx)(Ke.SelectControl,{label:(0,he.__)("Resolution"),help:(0,he.__)("Select the size of the source images."),value:x,options:te,onChange:fe,hideCancelButton:!0,size:"__unstable-large"}),(0,He.jsx)(Ke.SelectControl,{label:(0,he.__)("Link"),value:_,onChange:Ne,options:f,hideCancelButton:!0,size:"__unstable-large"}),(0,He.jsx)(Ke.ToggleControl,{label:(0,he.__)("Crop images to fit"),checked:!!b,onChange:Re}),(0,He.jsx)(Ke.ToggleControl,{label:(0,he.__)("Randomize order"),checked:!!y,onChange:Ee}),wo&&(0,He.jsx)(Ke.ToggleControl,{label:(0,he.__)("Open images in new tab"),checked:k==="_blank",onChange:ie}),X.length>1&&(0,He.jsx)(Ke.SelectControl,{label:(0,he.__)("Aspect Ratio"),help:(0,he.__)("Set a consistent aspect ratio for all images in the gallery."),value:S,options:X,onChange:ke,hideCancelButton:!0,size:"__unstable-large"})]})]}),ea.Platform.isWeb?(0,He.jsx)(Do.BlockControls,{group:"block",children:(0,He.jsx)(Ke.ToolbarDropdownMenu,{icon:ii,label:(0,he.__)("Link"),children:({onClose:Y})=>(0,He.jsx)(Ke.MenuGroup,{children:f.map(ze=>{let Me=_===ze.value;return(0,He.jsx)(Ke.MenuItem,{isSelected:Me,className:w("components-dropdown-menu__menu-item",{"is-active":Me}),iconPosition:"left",icon:ze.icon,onClick:()=>{Ne(ze.value),Y()},role:"menuitemradio",info:ze.infoText,children:ze.label},ze.value)})})})}):null,ea.Platform.isWeb&&(0,He.jsxs)(He.Fragment,{children:[!$&&(0,He.jsx)(Do.BlockControls,{group:"other",children:(0,He.jsx)(Do.MediaReplaceFlow,{allowedTypes:WN,handleUpload:!1,onSelect:pe,name:(0,he.__)("Add"),multiple:!0,mediaIds:j.filter(Y=>Y.id).map(Y=>Y.id),addToGallery:de,variant:"toolbar"})}),(0,He.jsx)(s$,{blockGap:r.style?.spacing?.blockGap,clientId:n})]}),(0,He.jsx)(e$,{...e,isContentLocked:s,images:j,mediaPlaceholder:!je||ea.Platform.isNative?kt:void 0,blockProps:br,insertBlocksAfter:l,multiGallerySelection:$})]})}var j5={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/gallery",title:"Gallery",category:"media",usesContext:["galleryId"],allowedBlocks:["core/image"],description:"Display multiple images in a rich gallery.",keywords:["images","photos"],textdomain:"default",attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"rich-text",source:"rich-text",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},navigationButtonType:{type:"string",default:"icon",enum:["icon","text","both"]},shortCodeTransforms:{type:"array",items:{type:"object"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"rich-text",source:"rich-text",selector:".blocks-gallery-caption",role:"content"},imageCrop:{type:"boolean",default:!0},randomOrder:{type:"boolean",default:!1},fixedHeight:{type:"boolean",default:!0},linkTarget:{type:"string"},linkTo:{type:"string"},sizeSlug:{type:"string",default:"large"},allowResize:{type:"boolean",default:!1},aspectRatio:{type:"string",default:"auto"}},providesContext:{allowResize:"allowResize",imageCrop:"imageCrop",fixedHeight:"fixedHeight",navigationButtonType:"navigationButtonType"},supports:{anchor:!0,align:!0,__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{color:!0,radius:!0}},html:!1,units:["px","em","rem","vh","vw"],spacing:{margin:!0,padding:!0,blockGap:["horizontal","vertical"],__experimentalSkipSerialization:["blockGap"],__experimentalDefaultControls:{blockGap:!0,margin:!1,padding:!1}},color:{text:!1,background:!0,gradients:!0},layout:{allowSwitching:!1,allowInheriting:!1,allowEditing:!1,default:{type:"flex"}},interactivity:{clientNavigation:!0},listView:!0},editorStyle:"wp-block-gallery-editor",style:"wp-block-gallery"};var ru=o(T(),1),U5=o(v(),1);function h$({attributes:e}){let{caption:t,columns:r,imageCrop:a}=e,n=w("has-nested-images",{[`columns-${r}`]:r!==void 0,"columns-default":r===void 0,"is-cropped":a}),i=ru.useBlockProps.save({className:n}),l=ru.useInnerBlocksProps.save(i);return(0,U5.jsxs)("figure",{...l,children:[l.children,!ru.RichText.isEmpty(t)&&(0,U5.jsx)(ru.RichText.Content,{tagName:"figcaption",className:w("blocks-gallery-caption",(0,ru.__experimentalGetElementClassName)("caption")),value:t})]})}var Ks=o(W(),1),g$=o(Rr(),1),qN=o(Yc(),1);var Ave=e=>e?e.split(",").map(t=>parseInt(t,10)):[];function Rve(e){if(e.name==="core/gallery"&&e.attributes?.images.length>0){let t=e.attributes.images.map(({url:r,id:a,alt:n})=>(0,Ks.createBlock)("core/image",{url:r,id:a?parseInt(a,10):null,alt:n,sizeSlug:e.attributes.sizeSlug,linkDestination:e.attributes.linkDestination}));delete e.attributes.ids,delete e.attributes.images,e.innerBlocks=t}return e}(0,qN.addFilter)("blocks.switchToBlockType.transformedBlock","core/gallery/update-third-party-transform-to",Rve);function zve(e,t){let a=(Array.isArray(t)?t:[t]).find(n=>n.name==="core/gallery"&&n.innerBlocks.length>0&&!n.attributes.images?.length>0&&!e.name.includes("core/"));if(a){let n=a.innerBlocks.map(({attributes:{url:l,id:s,alt:c}})=>({url:l,id:s?parseInt(s,10):null,alt:c})),i=n.map(({id:l})=>l);a.attributes.images=n,a.attributes.ids=i}return e}(0,qN.addFilter)("blocks.switchToBlockType.transformedBlock","core/gallery/update-third-party-transform-from",zve);var Vve={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],transform:e=>{let{align:t,sizeSlug:r}=e[0];t=e.every(i=>i.align===t)?t:void 0,r=e.every(i=>i.sizeSlug===r)?r:void 0;let n=e.filter(({url:i})=>i).map(i=>(i.width=void 0,i.height=void 0,(0,Ks.createBlock)("core/image",i)));return(0,Ks.createBlock)("core/gallery",{align:t,sizeSlug:r},n)}},{type:"shortcode",tag:"gallery",transform({named:{ids:e,columns:t=3,link:r,orderby:a,size:n}}){let i=Ave(e).map(c=>parseInt(c,10)),l=Ws;return r==="post"?l=qs:r==="file"&&(l=$s),(0,Ks.createBlock)("core/gallery",{columns:parseInt(t,10),linkTo:l,randomOrder:a==="rand",...n&&{sizeSlug:n}},i.map(c=>(0,Ks.createBlock)("core/image",{id:c,...n&&{sizeSlug:n}})))},isMatch({named:e}){return e.ids!==void 0}},{type:"files",priority:1,isMatch(e){return e.length!==1&&e.every(t=>t.type.indexOf("image/")===0)},transform(e){let t=e.map(r=>(0,Ks.createBlock)("core/image",{blob:(0,g$.createBlobURL)(r)}));return(0,Ks.createBlock)("core/gallery",{},t)}}],to:[{type:"block",blocks:["core/image"],transform:({align:e},t)=>t.length>0?t.map(({attributes:{url:r,alt:a,caption:n,title:i,href:l,rel:s,linkClass:c,id:u,sizeSlug:m,linkDestination:p,linkTarget:d,anchor:f,className:h}})=>(0,Ks.createBlock)("core/image",{align:e,url:r,alt:a,caption:n,title:i,href:l,rel:s,linkClass:c,id:u,sizeSlug:m,linkDestination:p,linkTarget:d,anchor:f,className:h})):(0,Ks.createBlock)("core/image",{align:e})}]},v$=Vve;var{name:b$}=j5,y$={icon:j0,example:{attributes:{columns:2},innerBlocks:[{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Glacial_lakes%2C_Bhutan.jpg"}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Sediment_off_the_Yucatan_Peninsula.jpg"}}]},transforms:v$,edit:f$,save:h$,deprecated:WW},Fve=()=>E({name:b$,metadata:j5,settings:y$});var JN={};Z(JN,{init:()=>Kve,metadata:()=>W5,name:()=>Z5,settings:()=>M$});var q5=o(P(),1);var Ca=o(T(),1),bi=o(v(),1),KN=e=>{if(e.tagName||(e={...e,tagName:"div"}),!e.customTextColor&&!e.customBackgroundColor)return e;let t={color:{}};e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor);let{customTextColor:r,customBackgroundColor:a,...n}=e;return{...n,style:t}},Hve=[{attributes:{tagName:{type:"string",default:"div"},templateLock:{type:["string","boolean"],enum:["all","insert",!1]}},supports:{__experimentalOnEnter:!0,__experimentalSettings:!0,align:["wide","full"],anchor:!0,ariaLabel:!0,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:["top","bottom"],padding:!0,blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},layout:!0},save({attributes:{tagName:e}}){return(0,bi.jsx)(e,{...Ca.useInnerBlocksProps.save(Ca.useBlockProps.save())})},isEligible:({layout:e})=>e?.inherit||e?.contentSize&&e?.type!=="constrained",migrate:e=>{let{layout:t=null}=e;if(t?.inherit||t?.contentSize)return{...e,layout:{...t,type:"constrained"}}}},{attributes:{tagName:{type:"string",default:"div"},templateLock:{type:["string","boolean"],enum:["all","insert",!1]}},supports:{align:["wide","full"],anchor:!0,color:{gradients:!0,link:!0},spacing:{padding:!0},__experimentalBorder:{radius:!0}},save({attributes:e}){let{tagName:t}=e;return(0,bi.jsx)(t,{...Ca.useBlockProps.save(),children:(0,bi.jsx)("div",{className:"wp-block-group__inner-container",children:(0,bi.jsx)(Ca.InnerBlocks.Content,{})})})}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},migrate:KN,save({attributes:e}){let{backgroundColor:t,customBackgroundColor:r,textColor:a,customTextColor:n}=e,i=(0,Ca.getColorClassName)("background-color",t),l=(0,Ca.getColorClassName)("color",a),s=w(i,l,{"has-text-color":a||n,"has-background":t||r});return(0,bi.jsx)("div",{className:s,style:{backgroundColor:i?void 0:r,color:l?void 0:n},children:(0,bi.jsx)("div",{className:"wp-block-group__inner-container",children:(0,bi.jsx)(Ca.InnerBlocks.Content,{})})})}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},migrate:KN,supports:{align:["wide","full"],anchor:!0,html:!1},save({attributes:e}){let{backgroundColor:t,customBackgroundColor:r,textColor:a,customTextColor:n}=e,i=(0,Ca.getColorClassName)("background-color",t),l=(0,Ca.getColorClassName)("color",a),s=w(i,{"has-text-color":a||n,"has-background":t||r});return(0,bi.jsx)("div",{className:s,style:{backgroundColor:i?void 0:r,color:l?void 0:n},children:(0,bi.jsx)("div",{className:"wp-block-group__inner-container",children:(0,bi.jsx)(Ca.InnerBlocks.Content,{})})})}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},migrate:KN,save({attributes:e}){let{backgroundColor:t,customBackgroundColor:r}=e,a=(0,Ca.getColorClassName)("background-color",t),n=w(a,{"has-background":t||r});return(0,bi.jsx)("div",{className:n,style:{backgroundColor:a?void 0:r},children:(0,bi.jsx)(Ca.InnerBlocks.Content,{})})}}],_$=Hve;var G5=o(V(),1),_i=o(T(),1),T$=o(U(),1),P$=o(P(),1),B$=o(L(),1);var x$=o(V(),1),k$=o(T(),1),QN=o(P(),1),w$=o(W(),1),zn=o(M(),1),cv=o(U(),1),Rn=o(v(),1),Ove=(e="group")=>({group:(0,Rn.jsx)(zn.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,Rn.jsx)(zn.Path,{d:"M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Z"})}),"group-row":(0,Rn.jsx)(zn.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,Rn.jsx)(zn.Path,{d:"M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10Z"})}),"group-stack":(0,Rn.jsx)(zn.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,Rn.jsx)(zn.Path,{d:"M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm0 17a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V27Z"})}),"group-grid":(0,Rn.jsx)(zn.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,Rn.jsx)(zn.Path,{d:"M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10ZM0 27a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V27Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V27Z"})})})?.[e];function C$({attributes:e={style:void 0,backgroundColor:void 0,textColor:void 0,fontSize:void 0},usedLayoutType:t="",hasInnerBlocks:r=!1}){let{style:a,backgroundColor:n,textColor:i,fontSize:l}=e,[s,c]=(0,cv.useState)(!r&&!n&&!l&&!i&&!a&&t!=="flex"&&t!=="grid");return(0,cv.useEffect)(()=>{(r||n||l||i||a||t==="flex")&&c(!1)},[n,l,i,a,t,r]),[s,c]}function jve({name:e,onSelect:t}){let r=(0,x$.useSelect)(n=>n(w$.store).getBlockVariations(e,"block"),[e]),a=(0,k$.useBlockProps)({className:"wp-block-group__placeholder"});return(0,cv.useEffect)(()=>{r&&r.length===1&&t(r[0])},[t,r]),(0,Rn.jsx)("div",{...a,children:(0,Rn.jsx)(zn.Placeholder,{instructions:(0,QN.__)("Group blocks together. Select a layout:"),children:(0,Rn.jsx)("ul",{role:"list",className:"wp-block-group-placeholder__variations","aria-label":(0,QN.__)("Block variations"),children:r.map(n=>(0,Rn.jsx)("li",{children:(0,Rn.jsx)(zn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:Ove(n.name),iconSize:48,onClick:()=>t(n),className:"wp-block-group-placeholder__variation-button",label:`${n.title}: ${n.description}`})},n.name))})})})}var S$=jve;var yi=o(v(),1),{HTMLElementControl:Uve}=K(_i.privateApis);function Gve({tagName:e,onSelectTagName:t,clientId:r}){return(0,yi.jsx)(_i.InspectorControls,{group:"advanced",children:(0,yi.jsx)(Uve,{tagName:e,onChange:t,clientId:r,options:[{label:(0,P$.__)("Default (<div>)"),value:"div"},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"}]})})}function Wve({attributes:e,name:t,setAttributes:r,clientId:a}){let{hasInnerBlocks:n,themeSupportsLayout:i}=(0,G5.useSelect)(x=>{let{getBlock:S,getSettings:C}=x(_i.store),N=S(a);return{hasInnerBlocks:!!(N&&N.innerBlocks.length),themeSupportsLayout:C()?.supportsLayout}},[a]),{tagName:l="div",templateLock:s,allowedBlocks:c,layout:u={}}=e,{type:m="default"}=u,p=i||m==="flex"||m==="grid",d=(0,T$.useRef)(),f=(0,_i.useBlockProps)({ref:d}),[h,g]=C$({attributes:e,usedLayoutType:m,hasInnerBlocks:n}),b;h?b=!1:n||(b=_i.InnerBlocks.ButtonBlockAppender);let y=(0,_i.useInnerBlocksProps)(p?f:{className:"wp-block-group__inner-container"},{dropZoneElement:d.current,templateLock:s,allowedBlocks:c,renderAppender:b}),{selectBlock:k}=(0,G5.useDispatch)(_i.store),_=x=>{r(x.attributes),k(a,-1),g(!1)};return(0,yi.jsxs)(yi.Fragment,{children:[(0,yi.jsx)(Gve,{tagName:l,onSelectTagName:x=>r({tagName:x}),clientId:a}),h&&(0,yi.jsxs)(B$.View,{children:[y.children,(0,yi.jsx)(S$,{name:t,onSelect:_})]}),p&&!h&&(0,yi.jsx)(l,{...y}),!p&&!h&&(0,yi.jsx)(l,{...f,children:(0,yi.jsx)("div",{...y})})]})}var I$=Wve;var W5={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/group",title:"Group",category:"design",description:"Gather blocks in a layout container.",keywords:["container","wrapper","row","section"],textdomain:"default",attributes:{tagName:{type:"string",default:"div"},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},supports:{__experimentalOnEnter:!0,__experimentalOnMerge:!0,__experimentalSettings:!0,align:["wide","full"],anchor:!0,ariaLabel:!0,html:!1,background:{backgroundImage:!0,backgroundSize:!0,__experimentalDefaultControls:{backgroundImage:!0}},color:{gradients:!0,heading:!0,button:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},shadow:!0,spacing:{margin:["top","bottom"],padding:!0,blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},dimensions:{minHeight:!0},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},position:{sticky:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:{allowSizingOnChildren:!0},interactivity:{clientNavigation:!0},allowedBlocks:!0},editorStyle:"wp-block-group-editor",style:"wp-block-group"};var $5=o(T(),1),N$=o(v(),1);function E$({attributes:{tagName:e}}){return(0,N$.jsx)(e,{...$5.useInnerBlocksProps.save($5.useBlockProps.save())})}var YN=o(W(),1),qve={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert(e){let t=["wide","full"],r=e.reduce((n,i)=>{let{align:l}=i.attributes;return t.indexOf(l)>t.indexOf(n)?l:n},void 0),a=e.map(n=>(0,YN.createBlock)(n.name,n.attributes,n.innerBlocks));return(0,YN.createBlock)("core/group",{align:r,layout:{type:"constrained"}},a)}}]},D$=qve;var Sa=o(P(),1);var XN={innerBlocks:[{name:"core/paragraph",attributes:{content:(0,Sa.__)("One.")}},{name:"core/paragraph",attributes:{content:(0,Sa.__)("Two.")}},{name:"core/paragraph",attributes:{content:(0,Sa.__)("Three.")}},{name:"core/paragraph",attributes:{content:(0,Sa.__)("Four.")}},{name:"core/paragraph",attributes:{content:(0,Sa.__)("Five.")}},{name:"core/paragraph",attributes:{content:(0,Sa.__)("Six.")}}]},Zve=[{name:"group",title:(0,Sa.__)("Group"),description:(0,Sa.__)("Gather blocks in a container."),attributes:{layout:{type:"constrained"}},isDefault:!0,scope:["block","inserter","transform"],icon:wp},{name:"group-row",title:(0,Sa._x)("Row","single horizontal line"),description:(0,Sa.__)("Arrange blocks horizontally."),attributes:{layout:{type:"flex",flexWrap:"nowrap"}},scope:["block","inserter","transform"],isActive:["layout.type"],icon:UP,example:XN},{name:"group-stack",title:(0,Sa.__)("Stack"),description:(0,Sa.__)("Arrange blocks vertically."),attributes:{layout:{type:"flex",orientation:"vertical"}},scope:["block","inserter","transform"],isActive:["layout.type","layout.orientation"],icon:oB,example:XN},{name:"group-grid",title:(0,Sa.__)("Grid"),description:(0,Sa.__)("Arrange blocks in a grid."),attributes:{layout:{type:"grid"}},scope:["block","inserter","transform"],isActive:["layout.type"],icon:Il,example:XN}],L$=Zve;var{name:Z5}=W5,M$={icon:wp,example:{attributes:{layout:{type:"constrained",justifyContent:"center"},style:{spacing:{padding:{top:"4em",right:"3em",bottom:"4em",left:"3em"}}}},innerBlocks:[{name:"core/heading",attributes:{content:(0,q5.__)("La Mancha"),style:{typography:{textAlign:"center"}}}},{name:"core/paragraph",attributes:{style:{typography:{textAlign:"center"}},content:(0,q5.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.")}},{name:"core/spacer",attributes:{height:"10px"}},{name:"core/button",attributes:{text:(0,q5.__)("Read more")}}],viewportWidth:600},transforms:D$,edit:I$,save:E$,deprecated:_$,variations:L$},Kve=()=>E({name:Z5,metadata:W5,settings:M$});var aE={};Z(aE,{init:()=>p2e,metadata:()=>J5,name:()=>t4,settings:()=>r4});var hm=o(P(),1),vh=o(W(),1);var rn=o(T(),1);var Qs=o(v(),1),eE={className:!1,anchor:!0},K5={align:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:""},level:{type:"number",default:2},placeholder:{type:"string"}},hh=e=>{if(!e.customTextColor)return e;let t={color:{text:e.customTextColor}},{customTextColor:r,...a}=e;return{...a,style:t}},A$=["left","right","center"],gh=e=>{let{align:t,...r}=e;return A$.includes(t)?{...r,textAlign:t}:e},Qve={supports:eE,attributes:{...K5,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>We(hh(gh(e))),save({attributes:e}){let{align:t,level:r,content:a,textColor:n,customTextColor:i}=e,l="h"+r,s=(0,rn.getColorClassName)("color",n),c=w({[s]:s});return(0,Qs.jsx)(rn.RichText.Content,{className:c||void 0,tagName:l,style:{textAlign:t,color:s?void 0:i},value:a})}},Yve={attributes:{...K5,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>We(hh(gh(e))),save({attributes:e}){let{align:t,content:r,customTextColor:a,level:n,textColor:i}=e,l="h"+n,s=(0,rn.getColorClassName)("color",i),c=w({[s]:s,[`has-text-align-${t}`]:t});return(0,Qs.jsx)(rn.RichText.Content,{className:c||void 0,tagName:l,style:{color:s?void 0:a},value:r})},supports:eE},Xve={supports:eE,attributes:{...K5,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>We(hh(gh(e))),save({attributes:e}){let{align:t,content:r,customTextColor:a,level:n,textColor:i}=e,l="h"+n,s=(0,rn.getColorClassName)("color",i),c=w({[s]:s,"has-text-color":i||a,[`has-text-align-${t}`]:t});return(0,Qs.jsx)(rn.RichText.Content,{className:c||void 0,tagName:l,style:{color:s?void 0:a},value:r})}},Jve={supports:{align:["wide","full"],anchor:!0,className:!1,color:{link:!0},fontSize:!0,lineHeight:!0,__experimentalSelector:{"core/heading/h1":"h1","core/heading/h2":"h2","core/heading/h3":"h3","core/heading/h4":"h4","core/heading/h5":"h5","core/heading/h6":"h6"},__unstablePasteTextInline:!0},attributes:K5,isEligible:({align:e})=>A$.includes(e),migrate:e=>We(hh(gh(e))),save({attributes:e}){let{align:t,content:r,level:a}=e,n="h"+a,i=w({[`has-text-align-${t}`]:t});return(0,Qs.jsx)(n,{...rn.useBlockProps.save({className:i}),children:(0,Qs.jsx)(rn.RichText.Content,{value:r})})}},e2e={supports:{align:["wide","full"],anchor:!0,className:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0,textTransform:!0}},__experimentalSelector:"h1,h2,h3,h4,h5,h6",__unstablePasteTextInline:!0,__experimentalSlashInserter:!0},attributes:{textAlign:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:"",role:"content"},level:{type:"number",default:2},placeholder:{type:"string"}},save({attributes:e}){let{textAlign:t,content:r,level:a}=e,n="h"+a,i=w({[`has-text-align-${t}`]:t});return(0,Qs.jsx)(n,{...rn.useBlockProps.save({className:i}),children:(0,Qs.jsx)(rn.RichText.Content,{value:r})})},migrate:e=>We(hh(gh(e)))},t2e={supports:{align:["wide","full"],anchor:!0,className:!0,splitting:!0,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalWritingMode:!0,fitText:!0,__experimentalDefaultControls:{fontSize:!0}},__unstablePasteTextInline:!0,__experimentalSlashInserter:!0,interactivity:{clientNavigation:!0}},attributes:{textAlign:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:"",role:"content"},level:{type:"number",default:2},levelOptions:{type:"array"},placeholder:{type:"string"}},save({attributes:e}){let{textAlign:t,content:r,level:a}=e,n="h"+a,i=w({[`has-text-align-${t}`]:t});return(0,Qs.jsx)(n,{...rn.useBlockProps.save({className:i}),children:(0,Qs.jsx)(rn.RichText.Content,{value:r})})},migrate:e=>We(hh(gh(e))),isEligible(e){return!!e.textAlign||!!e.className?.match(/\bhas-text-align-(left|center|right)\b/)}},r2e=[t2e,e2e,Jve,Xve,Yve,Qve],R$=r2e;var V$=o(P(),1),Y5=o(U(),1),X5=o(V(),1),ld=o(T(),1);var z$=o(rv(),1),tE={},o2e=e=>{let t=document.createElement("div");return t.innerHTML=e,t.innerText},a2e=e=>(0,z$.default)(o2e(e)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,""),Q5=(e,t)=>{let r=a2e(t);if(r==="")return null;delete tE[e];let a=r,n=0;for(;Object.values(tE).includes(a);)n+=1,a=r+"-"+n;return a},rE=(e,t)=>{tE[e]=t};var uv=o(v(),1);function n2e(e){let{attributes:t,setAttributes:r,mergeBlocks:a,onReplace:n,style:i,clientId:l}=e;Kr(e);let{content:s,level:c,placeholder:u,anchor:m}=t,p="h"+c,d=(0,ld.useBlockProps)({style:i}),{canGenerateAnchors:f}=(0,X5.useSelect)(b=>{let{getGlobalBlockCount:y,getSettings:k}=b(ld.store);return{canGenerateAnchors:!!k().generateAnchors||y("core/table-of-contents")>0}},[]),{__unstableMarkNextChangeAsNotPersistent:h}=(0,X5.useDispatch)(ld.store);return(0,Y5.useEffect)(()=>{if(f)return!m&&s&&(h(),r({anchor:Q5(l,s)})),rE(l,m),()=>rE(l,null)},[m,s,l,f]),(0,uv.jsx)(uv.Fragment,{children:(0,uv.jsx)(ld.RichText,{identifier:"content",tagName:p,value:s,onChange:b=>{let y={content:b};f&&(!m||!b||Q5(l,s)===m)&&(y.anchor=Q5(l,b)),r(y)},onMerge:a,onReplace:n,onRemove:()=>n([]),placeholder:u||(0,V$.__)("Heading"),...Y5.Platform.isNative&&{deleteEnter:!0},...d})})}var F$=n2e;var J5={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/heading",title:"Heading",category:"text",description:"Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.",keywords:["title","subtitle"],textdomain:"default",attributes:{content:{type:"rich-text",source:"rich-text",selector:"h1,h2,h3,h4,h5,h6",role:"content"},level:{type:"number",default:2},levelOptions:{type:"array"},placeholder:{type:"string"}},supports:{align:["wide","full"],anchor:!0,className:!0,splitting:!0,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,textAlign:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalWritingMode:!0,fitText:!0,__experimentalDefaultControls:{fontSize:!0}},__unstablePasteTextInline:!0,__experimentalSlashInserter:!0,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-heading-editor",style:"wp-block-heading"};var e4=o(T(),1),oE=o(v(),1);function H$({attributes:e}){let{content:t,level:r}=e,a="h"+r;return(0,oE.jsx)(a,{...e4.useBlockProps.save(),children:(0,oE.jsx)(e4.RichText.Content,{value:t})})}var fm=o(W(),1);function O$(e){return Number(e.substr(1))}var l2e={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>e.map(t=>{let{content:r,anchor:a,style:n}=t,i=n?.typography?.textAlign;return(0,fm.createBlock)("core/heading",{...Wc(t,"core/heading",({content:l})=>({content:l})),content:r,anchor:a,...i&&{style:{typography:{textAlign:i}}}})})},{type:"raw",selector:"h1,h2,h3,h4,h5,h6",schema:({phrasingContentSchema:e,isPaste:t})=>{let r={children:e,attributes:t?[]:["style","id"]};return{h1:r,h2:r,h3:r,h4:r,h5:r,h6:r}},transform(e){let t=(0,fm.getBlockAttributes)("core/heading",e.outerHTML),{textAlign:r}=e.style||{};return t.level=O$(e.nodeName),(r==="left"||r==="center"||r==="right")&&(t.style={...t.style,typography:{...t.style?.typography,textAlign:r}}),(0,fm.createBlock)("core/heading",t)}},...[1,2,3,4,5,6].map(e=>({type:"prefix",prefix:Array(e+1).join("#"),transform(t){return(0,fm.createBlock)("core/heading",{level:e,content:t})}})),...[1,2,3,4,5,6].map(e=>({type:"enter",regExp:new RegExp(`^/(h|H)${e}$`),transform:()=>(0,fm.createBlock)("core/heading",{level:e})}))],to:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>e.map(t=>{let{content:r,style:a}=t,n=a?.typography?.textAlign;return(0,fm.createBlock)("core/paragraph",{...Wc(t,"core/paragraph",({content:i})=>({content:i})),content:r,...n&&{style:{typography:{textAlign:n}}}})})}]},j$=l2e;var mv=o(P(),1);var s2e=[Y9,J9,tT,oT,nT,lT],c2e=[...[1,2,3,4,5,6].map(e=>({name:`h${e}`,title:(0,mv.sprintf)((0,mv.__)("Heading %d"),e),description:(0,mv.__)("Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content."),icon:s2e[e-1],attributes:{level:e},scope:["block","transform"],keywords:[`h${e}`],isActive:t=>t.level===e}))],U$=c2e;var{fieldsKey:u2e,formKey:m2e}=K(vh.privateApis),{name:t4}=J5,r4={icon:cT,example:{attributes:{content:(0,hm.__)("Code is Poetry"),level:2,style:{typography:{textAlign:"center"}}}},__experimentalLabel(e,{context:t}){let{content:r,level:a}=e,n=e?.metadata?.name,i=r?.trim().length>0;if(t==="list-view"&&(n||i))return n||r;if(t==="breadcrumb"&&n)return n;if(t==="accessibility")return i?(0,hm.sprintf)((0,hm.__)("Level %1$s. %2$s"),a,r):(0,hm.sprintf)((0,hm.__)("Level %s. Empty."),a)},transforms:j$,deprecated:R$,merge(e,t){return{content:(e.content||"")+(t.content||"")}},edit:F$,save:H$,variations:U$};window.__experimentalContentOnlyInspectorFields&&(r4[u2e]=[{id:"content",label:(0,hm.__)("Content"),type:"text",Edit:"rich-text"}],r4[m2e]={fields:["content"]});var p2e=()=>{let e=E({name:t4,metadata:J5,settings:r4}),t=(0,vh.getBlockType)(t4)?.attributes?.levelOptions?.default;return t&&[1,2,3,4,5,6].forEach(r=>{t.includes(r)||(0,vh.unregisterBlockVariation)(t4,`h${r}`)}),e};var nE={};Z(nE,{init:()=>h2e,metadata:()=>o4,name:()=>Y$,settings:()=>X$});var Q$=o(P(),1);var o4={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/home-link",category:"design",parent:["core/navigation"],title:"Home Link",description:"Create a link that always points to the homepage of the site. Usually not necessary if there is already a site title link present in the header.",textdomain:"default",attributes:{label:{type:"string",role:"content"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","fontSize","customFontSize","style"],supports:{anchor:!0,reusable:!1,html:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-home-link-editor",style:"wp-block-home-link"};var i4=o(T(),1),a4=o(P(),1),G$=o(V(),1),W$=o(Q(),1),n4=o(v(),1),f2e=e=>e.preventDefault();function $$({attributes:e,setAttributes:t,context:r}){let a=(0,G$.useSelect)(c=>c(W$.store).getEntityRecord("root","__unstableBase")?.home,[]),{textColor:n,backgroundColor:i,style:l}=r,s=(0,i4.useBlockProps)({className:w("wp-block-navigation-item",{"has-text-color":!!n||!!l?.color?.text,[`has-${n}-color`]:!!n,"has-background":!!i||!!l?.color?.background,[`has-${i}-background-color`]:!!i}),style:{color:l?.color?.text,backgroundColor:l?.color?.background}});return(0,n4.jsx)("div",{...s,children:(0,n4.jsx)("a",{className:"wp-block-home-link__content wp-block-navigation-item__content",href:a,onClick:f2e,children:(0,n4.jsx)(i4.RichText,{identifier:"label",className:"wp-block-home-link__label",value:e.label??(0,a4.__)("Home"),onChange:c=>{t({label:c})},"aria-label":(0,a4.__)("Home link text"),placeholder:(0,a4.__)("Add home link"),withoutInteractiveFormatting:!0})})})}var q$=o(T(),1),Z$=o(v(),1);function K$(){return(0,Z$.jsx)(q$.InnerBlocks.Content,{})}var{name:Y$}=o4,X$={icon:mT,edit:$$,save:K$,example:{attributes:{label:(0,Q$._x)("Home Link","block example")}}},h2e=()=>E({name:Y$,metadata:o4,settings:X$});var sE={};Z(sE,{init:()=>y2e,metadata:()=>c4,name:()=>hq,settings:()=>gq});var fq=o(P(),1);var yh=o(P(),1),iq=o(U(),1),vm=o(T(),1),Jl=o(M(),1);var J$=o(U(),1),l4=o(T(),1),eq=o(M(),1),tq=o(V(),1),rq=o(P(),1),sd=o(v(),1),g2e=`
	html,body,:root {
		margin: 0 !important;
		padding: 0 !important;
		overflow: visible !important;
		min-height: auto !important;
	}
`;function s4({content:e,isSelected:t}){let r=(0,tq.useSelect)(n=>n(l4.store).getSettings().styles,[]),a=(0,J$.useMemo)(()=>[g2e,...(0,l4.transformStyles)((r??[]).filter(n=>n.css))],[r]);return(0,sd.jsxs)(sd.Fragment,{children:[(0,sd.jsx)(eq.SandBox,{html:e,styles:a,title:(0,rq.__)("Custom HTML Preview"),tabIndex:-1}),!t&&(0,sd.jsx)("div",{className:"block-library-html__preview-overlay"})]})}var xi=o(P(),1),pv=o(U(),1),aq=o(V(),1),ta=o(M(),1),bh=o(T(),1);var nq=o(me(),1);function oq(e=""){if(!e||!e.trim())return{html:"",css:"",js:""};let t=document.implementation.createHTMLDocument("");t.body.innerHTML=e;let r=t.body.querySelector('style[data-wp-block-html="css"]'),a=r?r.textContent.trim():"";r&&r.remove();let n=t.body.querySelector('script[data-wp-block-html="js"]'),i=n?n.textContent.trim():"";return n&&n.remove(),{html:t.body.innerHTML.trim(),css:a,js:i}}function iE({html:e="",css:t="",js:r=""}){let a=[];return t.trim()&&a.push(`<style data-wp-block-html="css">
${t}
</style>`),r.trim()&&a.push(`<script data-wp-block-html="js">
${r}
<\/script>`),e.trim()&&a.push(e),a.join(`

`)}var Ct=o(v(),1),{Tabs:gm}=K(ta.privateApis);function lE({isOpen:e,onRequestClose:t,content:r,setAttributes:a}){let{html:n,css:i,js:l}=oq(r),[s,c]=(0,pv.useState)(n),[u,m]=(0,pv.useState)(i),[p,d]=(0,pv.useState)(l),[f,h]=(0,pv.useState)(!1),g=(0,nq.useViewportMatch)("small","<"),{canUserUseUnfilteredHTML:b}=(0,aq.useSelect)(S=>({canUserUseUnfilteredHTML:S(bh.store).getSettings().__experimentalCanUserUseUnfilteredHTML}),[]),y=!b&&(i.trim()||l.trim());if(!e)return null;let k=()=>{a({content:iE({html:s,css:b?u:"",js:b?p:""})})},_=()=>{k(),t()},x=()=>{h(S=>!S)};return(0,Ct.jsx)(Ct.Fragment,{children:(0,Ct.jsx)(ta.Modal,{title:(0,xi.__)("Edit HTML"),onRequestClose:t,className:"block-library-html__modal",size:"large",isDismissible:!1,shouldCloseOnClickOutside:!1,isFullScreen:f,__experimentalHideHeader:!0,children:(0,Ct.jsx)(gm,{orientation:"horizontal",defaultTabId:"html",children:(0,Ct.jsxs)(ta.__experimentalVStack,{expanded:!0,children:[(0,Ct.jsxs)(ta.__experimentalHStack,{justify:"space-between",className:"block-library-html__modal-header",children:[(0,Ct.jsx)("div",{children:(0,Ct.jsxs)(gm.TabList,{children:[(0,Ct.jsx)(gm.Tab,{tabId:"html",children:"HTML"}),b&&(0,Ct.jsx)(gm.Tab,{tabId:"css",children:"CSS"}),b&&(0,Ct.jsx)(gm.Tab,{tabId:"js",children:(0,xi.__)("JavaScript")})]})}),!g&&(0,Ct.jsx)("div",{children:(0,Ct.jsx)(ta.Button,{__next40pxDefaultSize:!0,icon:f?tB:kp,label:(0,xi.__)("Enable/disable fullscreen"),onClick:x,variant:"tertiary"})})]}),y&&(0,Ct.jsx)(ta.Notice,{status:"warning",isDismissible:!1,className:"block-library-html__modal-notice",children:(0,xi.__)("This block contains CSS or JavaScript that will be removed when you save because you do not have permission to use unfiltered HTML.")}),(0,Ct.jsxs)(ta.Flex,{direction:g?"column":"row",className:"block-library-html__modal-tabs",align:"stretch",gap:8,children:[(0,Ct.jsxs)("div",{className:"block-library-html__modal-content",children:[(0,Ct.jsx)(gm.TabPanel,{tabId:"html",focusable:!1,className:"block-library-html__modal-tab",children:(0,Ct.jsx)(bh.PlainText,{value:s,onChange:c,placeholder:(0,xi.__)("Write HTML\u2026"),"aria-label":(0,xi.__)("HTML"),className:"block-library-html__modal-editor"})}),b&&(0,Ct.jsx)(gm.TabPanel,{tabId:"css",focusable:!1,className:"block-library-html__modal-tab",children:(0,Ct.jsx)(bh.PlainText,{value:u,onChange:m,placeholder:(0,xi.__)("Write CSS\u2026"),"aria-label":(0,xi.__)("CSS"),className:"block-library-html__modal-editor"})}),b&&(0,Ct.jsx)(gm.TabPanel,{tabId:"js",focusable:!1,className:"block-library-html__modal-tab",children:(0,Ct.jsx)(bh.PlainText,{value:p,onChange:d,placeholder:(0,xi.__)("Write JavaScript\u2026"),"aria-label":(0,xi.__)("JavaScript"),className:"block-library-html__modal-editor"})})]}),(0,Ct.jsx)("div",{className:"block-library-html__preview",children:(0,Ct.jsx)(s4,{content:iE({html:s,css:u,js:p})})})]}),(0,Ct.jsxs)(ta.__experimentalHStack,{alignment:"center",justify:"flex-end",spacing:4,className:"block-library-html__modal-footer",children:[(0,Ct.jsx)(ta.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,xi.__)("Cancel")}),(0,Ct.jsx)(ta.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:_,children:(0,xi.__)("Update")})]})]})})})})}var Ta=o(v(),1);function lq({attributes:e,setAttributes:t,isSelected:r}){let[a,n]=(0,iq.useState)(!1),i=(0,vm.useBlockProps)({className:"block-library-html__edit"});return e.content?.trim()?(0,Ta.jsxs)("div",{...i,children:[(0,Ta.jsx)(vm.BlockControls,{children:(0,Ta.jsx)(Jl.ToolbarGroup,{children:(0,Ta.jsx)(Jl.ToolbarButton,{onClick:()=>n(!0),children:(0,yh.__)("Edit code")})})}),(0,Ta.jsx)(vm.InspectorControls,{children:(0,Ta.jsx)(Jl.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,Ta.jsx)(Jl.Button,{className:"block-editor-block-inspector-edit-contents__button",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>n(!0),children:(0,yh.__)("Edit code")})})}),(0,Ta.jsx)(s4,{content:e.content,isSelected:r}),(0,Ta.jsx)(lE,{isOpen:a,onRequestClose:()=>n(!1),content:e.content,setAttributes:t})]}):(0,Ta.jsxs)("div",{...i,children:[(0,Ta.jsx)(Jl.Placeholder,{icon:(0,Ta.jsx)(vm.BlockIcon,{icon:B0}),label:(0,yh.__)("Custom HTML"),instructions:(0,yh.__)("Add custom HTML code and preview how it looks."),children:(0,Ta.jsx)(Jl.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:()=>n(!0),children:(0,yh.__)("Edit HTML")})}),(0,Ta.jsx)(lE,{isOpen:a,onRequestClose:()=>n(!1),content:e.content,setAttributes:t})]})}var c4={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/html",title:"Custom HTML",category:"widgets",description:"Add custom HTML code and preview it as you edit.",keywords:["embed"],textdomain:"default",attributes:{content:{type:"string",source:"raw",role:"content"}},supports:{customClassName:!1,className:!1,html:!1,interactivity:{clientNavigation:!0},customCSS:!1,visibility:!1},editorStyle:"wp-block-html-editor"};var sq=o(U(),1),cq=o(v(),1);function uq({attributes:e}){return(0,cq.jsx)(sq.RawHTML,{children:e.content})}var mq=o(W(),1),pq=o(em(),1),b2e={from:[{type:"block",blocks:["core/code"],transform:({content:e})=>(0,mq.createBlock)("core/html",{content:(0,pq.create)({html:e}).text})}]},dq=b2e;var{name:hq}=c4,gq={icon:dT,example:{attributes:{content:"<marquee>"+(0,fq.__)("Welcome to the wonderful world of blocks\u2026")+"</marquee>"}},edit:lq,save:uq,transforms:dq},y2e=()=>E({name:hq,metadata:c4,settings:gq});var pE={};Z(pE,{init:()=>S2e,metadata:()=>m4,name:()=>Pq,settings:()=>Bq});var Xs=o(P(),1),ki=o(M(),1),ra=o(T(),1),kq=o(U(),1),kh=o(L(),1),wq=o(V(),1),Cq=o(Q(),1);var _q=o(P(),1),u4=o(M(),1),xh=o(U(),1),xq=o(me(),1);var cE=o(P(),1),vq=o(M(),1);var Ys=o(v(),1);function bq({icons:e,onChange:t,attributes:r}){return(0,Ys.jsx)("div",{className:"wp-block-icon__inserter-grid",children:e?.length?(0,Ys.jsx)("div",{className:"wp-block-icon__inserter-grid-icons-list","aria-label":(0,cE.__)("Icon library"),children:e.map(a=>(0,Ys.jsxs)(vq.Button,{className:"wp-block-icon__inserter-grid-icons-list-item",onClick:()=>t(a.name),variant:a.name===r?.icon?"primary":void 0,__next40pxDefaultSize:!0,children:[(0,Ys.jsx)("span",{className:"wp-block-icon__inserter-grid-icons-list-item-icon",children:(0,Ys.jsx)(uo,{html:a.content,wrapperProps:{style:{width:"24px"}}})}),(0,Ys.jsx)("span",{className:"wp-block-icon__inserter-grid-icons-list-item-title",children:a.label})]},a.name))}):(0,Ys.jsx)("div",{className:"wp-block-icon__inserter-grid-no-results",children:(0,Ys.jsx)("p",{children:(0,cE.__)("No results found.")})})})}var yq=o(rv(),1);function _h(e=""){return e=(0,yq.default)(e),e=e.trim().toLowerCase(),e}function _2e(e,t){let r=_h(t),a=_h(e.title),n=0;return r===a?n+=30:a.startsWith(r)?n+=20:r.split(" ").every(s=>a.includes(s))&&(n+=10),n}function dv(e=[],t=""){if(!t)return e;let r=e.map(a=>[a,_2e(a,t)]).filter(([,a])=>a>0);return r.sort(([,a],[,n])=>n-a),r.map(([a])=>a)}var cd=o(v(),1);function uE({icons:e=[],setInserterOpen:t,attributes:r,setAttributes:a}){let[n,i]=(0,xh.useState)(""),l=(0,xq.useDebounce)(i,300),s=(0,xh.useCallback)(u=>{a({icon:u}),t(!1)},[a,t]),c=(0,xh.useMemo)(()=>{if(n){let u=_h(n);return e.filter(m=>{let p=_h(m.name),d=_h(m.label);return p.includes(u)||d.includes(u)})}return e},[n,e]);return(0,cd.jsx)(u4.Modal,{className:"wp-block-icon__inserter-modal",title:(0,_q.__)("Icon library"),onRequestClose:()=>t(!1),isFullScreen:!0,children:(0,cd.jsxs)("div",{className:"wp-block-icon__inserter",children:[(0,cd.jsx)("div",{className:"wp-block-icon__inserter-header",children:(0,cd.jsx)(u4.SearchControl,{value:n,onChange:l})}),(0,cd.jsx)(bq,{icons:c,onChange:s,attributes:r})]})})}var Yt=o(v(),1),x2e=({className:e,style:t})=>(0,Yt.jsxs)(kh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 60 60",preserveAspectRatio:"none",fill:"none","aria-hidden":"true",className:w("wp-block-icon__placeholder",e),style:t,children:[(0,Yt.jsx)(kh.Rect,{width:"60",height:"60",fill:"currentColor",fillOpacity:.1}),(0,Yt.jsx)(kh.Path,{vectorEffect:"non-scaling-stroke",stroke:"currentColor",strokeOpacity:.25,d:"M60 60 0 0"})]});function k2e({attributes:e,setAttributes:t}){let{icon:r,ariaLabel:a}=e,[n,i]=(0,kq.useState)(!1),l=(0,ra.useBlockEditingMode)()==="contentOnly",s=(0,ra.__experimentalUseColorProps)(e),c=(0,ra.__experimentalGetSpacingClassesAndStyles)(e),u=(0,ra.__experimentalUseBorderProps)(e),m=(0,ra.getDimensionsClassesAndStyles)(e),{selectedIcon:p,allIcons:d=[]}=(0,wq.useSelect)(y=>{let{getEntityRecord:k,getEntityRecords:_}=y(Cq.store);return{selectedIcon:r?k("root","icon",r):null,allIcons:n?_("root","icon",{per_page:-1}):void 0}},[n,r]),f=p?.content||"",h=(0,Yt.jsxs)(Yt.Fragment,{children:[(0,Yt.jsx)(ra.BlockControls,{group:l?"inline":"other",children:(0,Yt.jsx)(ki.ToolbarButton,{onClick:()=>{i(!0)},children:r?(0,Xs.__)("Replace"):(0,Xs.__)("Choose icon")})}),l&&r&&(0,Yt.jsx)(ra.BlockControls,{group:"other",children:(0,Yt.jsx)(ki.ToolbarGroup,{className:"components-toolbar-group",children:(0,Yt.jsx)(ki.DropdownMenu,{icon:"",popoverProps:{className:"is-alternate"},text:(0,Xs.__)("Label"),children:()=>(0,Yt.jsx)(ki.TextControl,{className:"wp-block-icon__toolbar-content",label:(0,Xs.__)("Label"),value:a||"",onChange:y=>t({ariaLabel:y}),help:(0,Xs.__)("Briefly describe the icon to help screen reader users. Leave blank for decorative icons."),__next40pxDefaultSize:!0})})})})]}),g=q(),b=r&&(0,Yt.jsx)(Yt.Fragment,{children:(0,Yt.jsx)(ra.InspectorControls,{group:"settings",children:(0,Yt.jsx)(ki.__experimentalToolsPanel,{label:(0,Xs.__)("Settings"),resetAll:()=>t({ariaLabel:void 0}),dropdownMenuProps:g,children:(0,Yt.jsx)(ki.__experimentalToolsPanelItem,{label:(0,Xs.__)("Label"),isShownByDefault:!0,hasValue:()=>!!a,onDeselect:()=>t({ariaLabel:void 0}),children:(0,Yt.jsx)(ki.TextControl,{label:(0,Xs.__)("Label"),help:(0,Xs.__)("Briefly describe the icon to help screen reader users. Leave blank for decorative icons."),value:a||"",onChange:y=>t({ariaLabel:y}),__next40pxDefaultSize:!0})})})})});return(0,Yt.jsxs)(Yt.Fragment,{children:[h,b,(0,Yt.jsx)("div",{...(0,ra.useBlockProps)(),children:r?(0,Yt.jsx)(uo,{html:f,wrapperProps:{className:w(s.className,u.className,c.className,m.className),style:{...s.style,...u.style,...c.style,...m.style}}}):(0,Yt.jsx)(x2e,{className:w(u.className,c.className,m.className),style:{...u.style,...c.style,...m.style,height:"auto"}})}),n&&(0,Yt.jsx)(uE,{icons:d,setInserterOpen:i,attributes:e,setAttributes:t})]})}var Sq=k2e;var m4={apiVersion:3,$schema:"https://schemas.wp.org/trunk/block.json",name:"core/icon",title:"Icon",category:"media",description:"Insert an SVG icon.",keywords:["icon","svg"],textdomain:"default",attributes:{icon:{type:"string",role:"content"}},supports:{anchor:!0,ariaLabel:{__experimentalSkipSerialization:!0},align:["left","center","right"],html:!1,color:{background:!0,text:!0,__experimentalSkipSerialization:!0},interactivity:{clientNavigation:!0},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!1,radius:!1,style:!1,width:!1}},spacing:{padding:!0,margin:!0,__experimentalSkipSerialization:["padding"],__experimentalDefaultControls:{margin:!1,padding:!1}},dimensions:{width:!0,__experimentalSkipSerialization:["width"],__experimentalDefaultControls:{width:!0}}},selectors:{root:".wp-block-icon svg",css:".wp-block-icon",spacing:{margin:".wp-block-icon"}},style:"wp-block-icon",editorStyle:"wp-block-icon-editor"};var p4=o(M(),1),mE=o(v(),1),C2e=(0,mE.jsx)(p4.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:(0,mE.jsx)(p4.Path,{d:"M6 9.5h3.5V6H6v3.5Zm5 .5a1 1 0 0 1-.898.995L10 11H5.5l-.103-.005a1 1 0 0 1-.892-.893L4.5 10V5.5a1 1 0 0 1 1-1H10a1 1 0 0 1 1 1V10ZM18.25 7.75a2 2 0 1 0-4 0 2 2 0 0 0 4 0Zm1.5 0a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0ZM6.88 13.535a1 1 0 0 1 1.74 0l2.534 4.472a1 1 0 0 1-.87 1.493H5.216a1 1 0 0 1-.87-1.493l2.534-4.472ZM6.074 18h3.352L7.75 15.041l-1.676 2.96ZM14.952 13h2.596a1 1 0 0 1 .866.5l1.298 2.25a1 1 0 0 1 0 1L18.414 19l-.074.11a1 1 0 0 1-.792.39h-2.596a1 1 0 0 1-.792-.39l-.074-.11-1.298-2.25a1.001 1.001 0 0 1 0-1l1.298-2.25a1 1 0 0 1 .866-.5Zm-.72 3.25 1.01 1.75h2.017l1.009-1.75-1.01-1.75h-2.017l-1.01 1.75Z"})}),Tq=C2e;var{name:Pq}=m4,Bq={icon:Tq,example:{attributes:{icon:"core/audio",style:{dimensions:{width:"48px"}}}},edit:Sq},S2e=()=>E({name:Pq,metadata:m4,settings:Bq});var gE={};Z(gE,{init:()=>$2e,metadata:()=>b4,name:()=>Jq,settings:()=>_4});var md=o(P(),1);var Xq=o(W(),1);var vt=o(T(),1),De=o(v(),1),T2e={attributes:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"array",source:"children",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"a",attribute:"href"},id:{type:"number"},align:{type:"string"},width:{type:"number"},height:{type:"number"}},save({attributes:e}){let{url:t,alt:r,caption:a,align:n,href:i,width:l,height:s}=e,u=(0,De.jsx)("img",{src:t,alt:r,...l||s?{width:l,height:s}:{}}),m={};return l?m={width:l}:(n==="left"||n==="right")&&(m={maxWidth:"50%"}),(0,De.jsxs)("figure",{className:n?`align${n}`:null,style:m,children:[i?(0,De.jsx)("a",{href:i,children:u}):u,!vt.RichText.isEmpty(a)&&(0,De.jsx)(vt.RichText.Content,{tagName:"figcaption",value:a})]})}},P2e={attributes:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"array",source:"children",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"a",attribute:"href"},id:{type:"number"},align:{type:"string"},width:{type:"number"},height:{type:"number"}},save({attributes:e}){let{url:t,alt:r,caption:a,align:n,href:i,width:l,height:s,id:c}=e,u=(0,De.jsx)("img",{src:t,alt:r,className:c?`wp-image-${c}`:null,width:l,height:s});return(0,De.jsxs)("figure",{className:n?`align${n}`:null,children:[i?(0,De.jsx)("a",{href:i,children:u}):u,!vt.RichText.isEmpty(a)&&(0,De.jsx)(vt.RichText.Content,{tagName:"figcaption",value:a})]})}},B2e={attributes:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"array",source:"children",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},id:{type:"number"},align:{type:"string"},width:{type:"number"},height:{type:"number"},linkDestination:{type:"string",default:"none"}},save({attributes:e}){let{url:t,alt:r,caption:a,align:n,href:i,width:l,height:s,id:c}=e,u=w({[`align${n}`]:n,"is-resized":l||s}),m=(0,De.jsx)("img",{src:t,alt:r,className:c?`wp-image-${c}`:null,width:l,height:s});return(0,De.jsxs)("figure",{className:u,children:[i?(0,De.jsx)("a",{href:i,children:m}):m,!vt.RichText.isEmpty(a)&&(0,De.jsx)(vt.RichText.Content,{tagName:"figcaption",value:a})]})}},I2e={attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},title:{type:"string",source:"attribute",selector:"img",attribute:"title"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0},save({attributes:e}){let{url:t,alt:r,caption:a,align:n,href:i,rel:l,linkClass:s,width:c,height:u,id:m,linkTarget:p,sizeSlug:d,title:f}=e,h=l||void 0,g=w({[`align${n}`]:n,[`size-${d}`]:d,"is-resized":c||u}),b=(0,De.jsx)("img",{src:t,alt:r,className:m?`wp-image-${m}`:null,width:c,height:u,title:f}),y=(0,De.jsxs)(De.Fragment,{children:[i?(0,De.jsx)("a",{className:s,href:i,target:p,rel:h,children:b}):b,!vt.RichText.isEmpty(a)&&(0,De.jsx)(vt.RichText.Content,{tagName:"figcaption",value:a})]});return n==="left"||n==="right"||n==="center"?(0,De.jsx)("div",{...vt.useBlockProps.save(),children:(0,De.jsx)("figure",{className:g,children:y})}):(0,De.jsx)("figure",{...vt.useBlockProps.save({className:g}),children:y})}},N2e={attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},title:{type:"string",source:"attribute",selector:"img",attribute:"title"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{__experimentalDuotone:"img",text:!1,background:!1},__experimentalBorder:{radius:!0,__experimentalDefaultControls:{radius:!0}},__experimentalStyle:{spacing:{margin:"0 0 1em 0"}}},save({attributes:e}){let{url:t,alt:r,caption:a,align:n,href:i,rel:l,linkClass:s,width:c,height:u,id:m,linkTarget:p,sizeSlug:d,title:f}=e,h=l||void 0,g=w({[`align${n}`]:n,[`size-${d}`]:d,"is-resized":c||u}),b=(0,De.jsx)("img",{src:t,alt:r,className:m?`wp-image-${m}`:null,width:c,height:u,title:f}),y=(0,De.jsxs)(De.Fragment,{children:[i?(0,De.jsx)("a",{className:s,href:i,target:p,rel:h,children:b}):b,!vt.RichText.isEmpty(a)&&(0,De.jsx)(vt.RichText.Content,{tagName:"figcaption",value:a})]});return(0,De.jsx)("figure",{...vt.useBlockProps.save({className:g}),children:y})}},E2e={attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src",role:"content"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:"",role:"content"},caption:{type:"string",source:"html",selector:"figcaption",role:"content"},title:{type:"string",source:"attribute",selector:"img",attribute:"title",role:"content"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href",role:"content"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number",role:"content"},width:{type:"number"},height:{type:"number"},aspectRatio:{type:"string"},scale:{type:"string"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{text:!1,background:!1},filter:{duotone:!0},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}}},migrate(e){let{height:t,width:r}=e;return{...e,width:typeof r=="number"?`${r}px`:r,height:typeof t=="number"?`${t}px`:t}},save({attributes:e}){let{url:t,alt:r,caption:a,align:n,href:i,rel:l,linkClass:s,width:c,height:u,aspectRatio:m,scale:p,id:d,linkTarget:f,sizeSlug:h,title:g}=e,b=l||void 0,y=(0,vt.__experimentalGetBorderClassesAndStyles)(e),k=w({[`align${n}`]:n,[`size-${h}`]:h,"is-resized":c||u,"has-custom-border":!!y.className||y.style&&Object.keys(y.style).length>0}),_=w(y.className,{[`wp-image-${d}`]:!!d}),x=(0,De.jsx)("img",{src:t,alt:r,className:_||void 0,style:{...y.style,aspectRatio:m,objectFit:p},width:c,height:u,title:g}),S=(0,De.jsxs)(De.Fragment,{children:[i?(0,De.jsx)("a",{className:s,href:i,target:f,rel:b,children:x}):x,!vt.RichText.isEmpty(a)&&(0,De.jsx)(vt.RichText.Content,{className:(0,vt.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:a})]});return(0,De.jsx)("figure",{...vt.useBlockProps.save({className:k}),children:S})}},D2e={attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src",role:"content"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:"",role:"content"},caption:{type:"string",source:"html",selector:"figcaption",role:"content"},title:{type:"string",source:"attribute",selector:"img",attribute:"title",role:"content"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href",role:"content"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number",role:"content"},width:{type:"number"},height:{type:"number"},aspectRatio:{type:"string"},scale:{type:"string"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{text:!1,background:!1},filter:{duotone:!0},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}}},migrate({width:e,height:t,...r}){return{...r,width:`${e}px`,height:`${t}px`}},save({attributes:e}){let{url:t,alt:r,caption:a,align:n,href:i,rel:l,linkClass:s,width:c,height:u,aspectRatio:m,scale:p,id:d,linkTarget:f,sizeSlug:h,title:g}=e,b=l||void 0,y=(0,vt.__experimentalGetBorderClassesAndStyles)(e),k=w({[`align${n}`]:n,[`size-${h}`]:h,"is-resized":c||u,"has-custom-border":!!y.className||y.style&&Object.keys(y.style).length>0}),_=w(y.className,{[`wp-image-${d}`]:!!d}),x=(0,De.jsx)("img",{src:t,alt:r,className:_||void 0,style:{...y.style,aspectRatio:m,objectFit:p,width:c,height:u},width:c,height:u,title:g}),S=(0,De.jsxs)(De.Fragment,{children:[i?(0,De.jsx)("a",{className:s,href:i,target:f,rel:b,children:x}):x,!vt.RichText.isEmpty(a)&&(0,De.jsx)(vt.RichText.Content,{className:(0,vt.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:a})]});return(0,De.jsx)("figure",{...vt.useBlockProps.save({className:k}),children:S})}},L2e={attributes:{align:{type:"string"},behaviors:{type:"object"},url:{type:"string",source:"attribute",selector:"img",attribute:"src",role:"content"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:"",role:"content"},caption:{type:"string",source:"html",selector:"figcaption",role:"content"},title:{type:"string",source:"attribute",selector:"img",attribute:"title",role:"content"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href",role:"content"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number",role:"content"},width:{type:"string"},height:{type:"string"},aspectRatio:{type:"string"},scale:{type:"string"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{text:!1,background:!1},filter:{duotone:!0},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}}},migrate({width:e,height:t,...r}){if(!r.behaviors?.lightbox)return r;let{behaviors:{lightbox:{enabled:a}}}=r,n={...r,lightbox:{enabled:a}};return delete n.behaviors,n},isEligible(e){return!!e.behaviors},save({attributes:e}){let{url:t,alt:r,caption:a,align:n,href:i,rel:l,linkClass:s,width:c,height:u,aspectRatio:m,scale:p,id:d,linkTarget:f,sizeSlug:h,title:g}=e,b=l||void 0,y=(0,vt.__experimentalGetBorderClassesAndStyles)(e),k=w({[`align${n}`]:n,[`size-${h}`]:h,"is-resized":c||u,"has-custom-border":!!y.className||y.style&&Object.keys(y.style).length>0}),_=w(y.className,{[`wp-image-${d}`]:!!d}),x=(0,De.jsx)("img",{src:t,alt:r,className:_||void 0,style:{...y.style,aspectRatio:m,objectFit:p,width:c,height:u},title:g}),S=(0,De.jsxs)(De.Fragment,{children:[i?(0,De.jsx)("a",{className:s,href:i,target:f,rel:b,children:x}):x,!vt.RichText.isEmpty(a)&&(0,De.jsx)(vt.RichText.Content,{className:(0,vt.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:a})]});return(0,De.jsx)("figure",{...vt.useBlockProps.save({className:k}),children:S})}},Iq=[L2e,D2e,E2e,N2e,I2e,B2e,P2e,T2e];var hv=o(Rr(),1),fv=o(W(),1),Gq=o(M(),1),ud=o(V(),1),on=o(T(),1),bm=o(U(),1),Js=o(P(),1);var Wq=o(xr(),1),$q=o(me(),1),v4=o(mr(),1),qq=o(Eq(),1);var Rq=o(Rr(),1),Le=o(M(),1),Ch=o(me(),1),ou=o(V(),1),yt=o(T(),1),Nr=o(U(),1),Se=o(P(),1),fE=o(mr(),1),wh=o(W(),1);var zq=o(xr(),1),h4=o(Q(),1);var Vn=o(M(),1),d4=o(T(),1),Dq=o(P(),1),Lq=o(V(),1),wi=o(v(),1);function dE({url:e,alt:t,filename:r,itemGroupProps:a,className:n}){return(0,wi.jsx)(Vn.__experimentalItemGroup,{...a,as:"span",children:(0,wi.jsxs)(Vn.__experimentalHStack,{justify:"flex-start",as:"span",children:[(0,wi.jsx)("img",{src:e,alt:t}),(0,wi.jsx)(Vn.FlexItem,{as:"span",children:(0,wi.jsx)(Vn.__experimentalTruncate,{numberOfLines:1,className:n,children:r})})]})})}function f4({mediaId:e,mediaUrl:t,alt:r="",filename:a,allowedTypes:n,onSelect:i,onSelectURL:l,onError:s,onReset:c,isUploading:u=!1,emptyLabel:m=(0,Dq.__)("Add media")}){let{getSettings:p}=(0,Lq.useSelect)(d4.store);return(0,wi.jsxs)("div",{className:"block-library-utils__media-control",children:[(0,wi.jsx)(d4.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:n,onSelect:i,onSelectURL:l,onError:s,name:t?(0,wi.jsx)(dE,{url:t,alt:r,filename:a}):m,renderToggle:f=>(0,wi.jsx)(Vn.Button,{...f,__next40pxDefaultSize:!0,children:u?(0,wi.jsx)(Vn.Spinner,{}):f.children}),onReset:c}),(0,wi.jsx)(Vn.DropZone,{onFilesDrop:f=>{let{mediaUpload:h}=p();h&&h({allowedTypes:n,filesList:f,onFileChange([g]){i(g)},onError:s,multiple:!1})}})]})}var re=o(v(),1),{DimensionsTool:Mq,ResolutionTool:M2e}=K(yt.privateApis),A2e=[{value:"cover",label:(0,Se._x)("Cover","Scale option for dimensions control"),help:(0,Se.__)("Image covers the space evenly.")},{value:"contain",label:(0,Se._x)("Contain","Scale option for dimensions control"),help:(0,Se.__)("Image is contained without distortion.")}],R2e={placement:"bottom-start"},Aq=({href:e,children:t})=>e?(0,re.jsx)("a",{href:e,onClick:r=>r.preventDefault(),"aria-disabled":!0,style:{pointerEvents:"none",cursor:"default",display:"inline"},children:t}):t;function z2e({attributes:e,setAttributes:t,lockAltControls:r,lockAltControlsMessage:a,lockTitleControls:n,lockTitleControlsMessage:i}){let[l,s]=(0,Nr.useState)(null),[c,u]=(0,Nr.useState)(!1),[m,p]=(0,Nr.useState)(!1);return(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(Le.ToolbarItem,{ref:s,children:d=>(0,re.jsx)(Le.DropdownMenu,{icon:bp,label:(0,Se.__)("More"),toggleProps:{...d,description:(0,Se.__)("Displays more controls.")},popoverProps:R2e,children:({onClose:f})=>(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(Le.MenuItem,{onClick:()=>{u(!0),f()},"aria-haspopup":"dialog",children:(0,Se._x)("Alternative text","Alternative text for an image. Block toolbar label, a low character count is preferred.")}),(0,re.jsx)(Le.MenuItem,{onClick:()=>{p(!0),f()},"aria-haspopup":"dialog",children:(0,Se.__)("Title text")})]})})}),c&&(0,re.jsx)(Le.Popover,{placement:"bottom-start",anchor:l,onClose:()=>u(!1),offset:13,variant:"toolbar",children:(0,re.jsx)("div",{className:"wp-block-image__toolbar_content_textarea__container",children:(0,re.jsx)(Le.TextareaControl,{className:"wp-block-image__toolbar_content_textarea",label:(0,Se.__)("Alternative text"),value:e.alt||"",onChange:d=>t({alt:d}),disabled:r,help:r?(0,re.jsx)(re.Fragment,{children:a}):(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(Le.ExternalLink,{href:(0,Se.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),children:(0,Se.__)("Describe the purpose of the image.")}),(0,re.jsx)("br",{}),(0,Se.__)("Leave empty if decorative.")]})})})}),m&&(0,re.jsx)(Le.Popover,{placement:"bottom-start",anchor:l,onClose:()=>p(!1),offset:13,variant:"toolbar",children:(0,re.jsx)("div",{className:"wp-block-image__toolbar_content_textarea__container",children:(0,re.jsx)(Le.TextControl,{__next40pxDefaultSize:!0,className:"wp-block-image__toolbar_content_textarea",label:(0,Se.__)("Title attribute"),value:e.title||"",onChange:d=>t({title:d}),disabled:n,help:n?(0,re.jsx)(re.Fragment,{children:i}):(0,Nr.createInterpolateElement)((0,Se.__)("Describe the role of this image on the page. <a>(Note: many devices and browsers do not display this text.)</a>"),{a:(0,re.jsx)(Le.ExternalLink,{href:"https://www.w3.org/TR/html52/dom.html#the-title-attribute"})})})})})]})}function Vq({temporaryURL:e,isSideloading:t,attributes:r,setAttributes:a,isSingleSelected:n,insertBlocksAfter:i,onReplace:l,onSelectImage:s,onSelectURL:c,onUploadError:u,context:m,clientId:p,blockEditingMode:d,parentLayoutType:f,maxContentWidth:h}){let{url:g="",alt:b,align:y,id:k,href:_,rel:x,linkClass:S,linkDestination:C,title:N,width:B,height:D,aspectRatio:A,scale:H,focalPoint:F,linkTarget:z,sizeSlug:I,lightbox:R,metadata:$}=r,[j,G]=(0,Nr.useState)(),[O,J]=(0,Nr.useState)(null),[ee,oe]=(0,Nr.useState)({}),[X,te]=(0,Nr.useState)(0),ne=(0,Ch.useResizeObserver)(([ge])=>{if(!O){let[Lt]=ge.borderBoxSize;oe({width:Lt.inlineSize,height:Lt.blockSize})}te(ge.target.offsetTop)}),le=(0,Nr.useCallback)(()=>{te(j?.offsetTop??0)},[j]),pe=(0,Ch.useMergeRefs)([G,ne]),{allowResize:Ie=!0}=m,{image:Ne,canUserEdit:ae}=(0,ou.useSelect)(ge=>{let Lt=k&&n?ge(h4.store).getEntityRecord("postType","attachment",k,{context:"view"}):null,ti=!1;if(k&&n&&window?.__experimentalMediaEditor){let{getEntityRecordPermissions:ba}=K(ge(h4.store));ti=ba("postType","attachment",k)?.update||!1}return{image:Lt,canUserEdit:ti}},[k,n]),{canInsertCover:Re,imageEditing:Ee,imageSizes:ie,maxWidth:fe}=(0,ou.useSelect)(ge=>{let{getBlockRootClientId:Lt,canInsertBlockType:ti,getSettings:ba}=ge(yt.store),wf=Lt(p),mp=ba();return{imageEditing:mp.imageEditing,imageSizes:mp.imageSizes,maxWidth:mp.maxWidth,canInsertCover:ti("core/cover",wf)}},[p]),{getBlock:ke,getSettings:je}=(0,ou.useSelect)(yt.store),de=je().onNavigateToEntityRecord,{replaceBlocks:ct,toggleSelection:at}=(0,ou.useDispatch)(yt.store),{createErrorNotice:kt,createSuccessNotice:Wr}=(0,ou.useDispatch)(zq.store),{editEntityRecord:ut}=(0,ou.useDispatch)(h4.store),br=(0,Ch.useViewportMatch)("medium"),mt=["wide","full"].includes(y),[{loadedNaturalWidth:wo,loadedNaturalHeight:Y},ze]=(0,Nr.useState)({}),[Me,Xe]=(0,Nr.useState)(!1),[Te,Bt]=(0,Nr.useState)(),[yr,xn]=(0,Nr.useState)(!1),Je=d==="default",$r=d==="contentOnly",ip=Ie&&Je,Cs=Ie&&Je&&!mt&&br,Ru=ie.filter(({slug:ge})=>Ne?.media_details?.sizes?.[ge]?.source_url).map(({name:ge,slug:Lt})=>({value:Lt,label:ge}));(0,Nr.useEffect)(()=>{if(!g4(k,g)||!n||!je().mediaUpload){Bt();return}Te||window.fetch(g.includes("?")?g:g+"?").then(ge=>ge.blob()).then(ge=>Bt(ge)).catch(()=>{})},[k,g,n,Te,je]);let{naturalWidth:kn,naturalHeight:ja}=(0,Nr.useMemo)(()=>({naturalWidth:j?.naturalWidth||wo||void 0,naturalHeight:j?.naturalHeight||Y||void 0}),[wo,Y,j?.complete]);function gf(){xn(!0);let ge=Yu({attributes:{url:g}});ge!==void 0&&l(ge)}function zu(ge){xn(!1),ze({loadedNaturalWidth:ge.target?.naturalWidth,loadedNaturalHeight:ge.target?.naturalHeight})}function Ss(ge){a(ge)}function Ts(ge){ge&&!Ps?.enabled?a({lightbox:{enabled:!0}}):!ge&&Ps?.enabled?a({lightbox:{enabled:!1}}):a({lightbox:void 0})}function Pe(){Ps?.enabled&&Ps?.allowEditing?a({lightbox:{enabled:!1}}):a({lightbox:void 0})}function Ht(ge){a({title:ge})}function qr(ge){a({alt:ge})}let Co=ge=>{j&&j.style.setProperty("object-position",iv(ge))};function So(ge){let Lt=Ne?.media_details?.sizes?.[ge]?.source_url;if(!Lt)return null;a({url:Lt,sizeSlug:ge})}function Sl(){let{mediaUpload:ge}=je();ge&&ge({filesList:[Te],onFileChange([Lt]){s(Lt),!(0,Rq.isBlobURL)(Lt.url)&&(Bt(),Wr((0,Se.__)("Image uploaded."),{type:"snackbar"}))},allowedTypes:tu,onError(Lt){kt(Lt,{type:"snackbar"})}})}(0,Nr.useEffect)(()=>{n||Xe(!1)},[n]);let qi=k&&kn&&ja&&Ee,Zi=n&&qi&&!Me&&!$r;function vf(){ct(p,(0,wh.switchToBlockType)(ke(p),"core/cover"))}let zc=(0,Le.__experimentalUseCustomUnits)({availableUnits:["px"]}),[Ps]=(0,yt.useSettings)("lightbox"),bf=!!R&&R?.enabled!==Ps?.enabled||Ps?.allowEditing,lp=!!R?.enabled||!R&&!!Ps?.enabled,sp=q(),yf=ip&&(HN.includes(f)?(0,re.jsx)(Mq,{panelId:p,value:{aspectRatio:A},onChange:({aspectRatio:ge})=>{a({aspectRatio:ge,scale:"cover"})},defaultAspectRatio:"auto",tools:["aspectRatio"]}):(0,re.jsx)(Mq,{panelId:p,value:{width:B,height:D,scale:H,aspectRatio:A},onChange:({width:ge,height:Lt,scale:ti,aspectRatio:ba})=>{a({width:!ge&&Lt?"auto":ge,height:Lt,scale:ti,aspectRatio:ba})},defaultScale:"cover",defaultAspectRatio:"auto",scaleOptions:A2e,unitsOptions:zc,tools:mt?["aspectRatio","scale"]:["aspectRatio","widthHeight","scale"]})),j7=()=>{a({lightbox:void 0}),So(nv)},_b=$?.bindings?.__default?.source==="core/pattern-overrides",{lockUrlControls:Vc=!1,lockHrefControls:xb=!1,lockAltControls:p0=!1,lockAltControlsMessage:kb,lockTitleControls:_f=!1,lockTitleControlsMessage:cp,hideCaptionControls:xf=!1}=(0,ou.useSelect)(ge=>{if(!n)return{};let{url:Lt,alt:ti,title:ba,caption:wf}=$?.bindings||{},mp=!!m["pattern/overrides"],$7=(0,wh.getBlockBindingsSource)(Lt?.source),Cf=(0,wh.getBlockBindingsSource)(ti?.source),Vu=(0,wh.getBlockBindingsSource)(ba?.source);return{lockUrlControls:!!Lt&&!$7?.canUserEditValue?.({select:ge,context:m,args:Lt?.args}),lockHrefControls:mp||_b,hideCaptionControls:!!wf,lockAltControls:!!ti&&!Cf?.canUserEditValue?.({select:ge,context:m,args:ti?.args}),lockAltControlsMessage:Cf?.label?(0,Se.sprintf)((0,Se.__)("Connected to %s"),Cf.label):(0,Se.__)("Connected to dynamic data"),lockTitleControls:!!ba&&!Vu?.canUserEditValue?.({select:ge,context:m,args:ba?.args}),lockTitleControlsMessage:Vu?.label?(0,Se.sprintf)((0,Se.__)("Connected to %s"),Vu.label):(0,Se.__)("Connected to dynamic data")}},[_b,m,n,$?.bindings]),up=n&&!Me&&!xb&&!Vc,wb=n&&Re&&!$r,tr=up||Zi||wb,Tl=n&&!Me&&!Vc&&(0,re.jsx)(yt.BlockControls,{group:$r?"inline":"other",children:(0,re.jsx)(yt.MediaReplaceFlow,{mediaId:k,mediaURL:g,allowedTypes:tu,onSelect:s,onSelectURL:c,onError:u,name:g?(0,Se.__)("Replace"):(0,Se.__)("Add image"),onReset:()=>s(void 0),variant:"toolbar"})}),Bs=window?.__experimentalContentOnlyInspectorFields,U7=window?.__experimentalMediaEditor&&k&&n&&ae&&!g4(k,g)&&!Me&&de&&(0,re.jsx)(yt.BlockControls,{group:"other",children:(0,re.jsx)(Le.ToolbarButton,{onClick:()=>{de({postId:k,postType:"attachment"})},children:(0,Se.__)("Edit media")})}),G7=(0,re.jsxs)(re.Fragment,{children:[tr&&(0,re.jsxs)(yt.BlockControls,{group:"block",children:[up&&(0,re.jsx)(yt.__experimentalImageURLInputUI,{url:_||"",onChangeUrl:Ss,linkDestination:C,mediaUrl:Ne&&Ne.source_url||g,mediaLink:Ne&&Ne.link,linkTarget:z,linkClass:S,rel:x,showLightboxSetting:bf,lightboxEnabled:lp,onSetLightbox:Ts,resetLightbox:Pe}),Zi&&(0,re.jsx)(Le.ToolbarButton,{onClick:()=>Xe(!0),icon:D0,label:(0,Se.__)("Crop")}),wb&&(0,re.jsx)(Le.ToolbarButton,{icon:UT,label:(0,Se.__)("Add text over image"),onClick:vf})]}),n&&Te&&(0,re.jsx)(yt.BlockControls,{children:(0,re.jsx)(Le.ToolbarGroup,{children:(0,re.jsx)(Le.ToolbarButton,{onClick:Sl,icon:Hc,label:(0,Se.__)("Upload to Media Library")})})}),$r&&(0,re.jsx)(yt.BlockControls,{group:"block",children:(0,re.jsx)(z2e,{attributes:r,setAttributes:a,lockAltControls:p0,lockAltControlsMessage:kb,lockTitleControls:_f,lockTitleControlsMessage:cp})}),!Bs&&n&&(0,re.jsx)(yt.InspectorControls,{group:"content",children:(0,re.jsxs)(Le.__experimentalToolsPanel,{label:(0,Se.__)("Media"),resetAll:()=>s(void 0),dropdownMenuProps:sp,children:[!Vc&&(0,re.jsx)(Le.__experimentalToolsPanelItem,{label:(0,Se.__)("Image"),hasValue:()=>!!g,onDeselect:()=>s(void 0),isShownByDefault:!0,children:(0,re.jsx)(f4,{mediaId:k,mediaUrl:g,alt:b,filename:Ne?.media_details?.sizes?.full?.file||Ne?.slug||(0,fE.getFilename)(g),allowedTypes:tu,onSelect:s,onSelectURL:c,onError:u,onReset:()=>s(void 0),isUploading:!!e||t,emptyLabel:(0,Se.__)("Add image")})}),(0,re.jsx)(Le.__experimentalToolsPanelItem,{label:(0,Se.__)("Alternative text"),isShownByDefault:!0,hasValue:()=>!!b,onDeselect:()=>a({alt:void 0}),children:(0,re.jsx)(Le.TextareaControl,{label:(0,Se.__)("Alternative text"),value:b||"",onChange:qr,readOnly:p0,help:p0?(0,re.jsx)(re.Fragment,{children:kb}):(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(Le.ExternalLink,{href:(0,Se.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),children:(0,Se.__)("Describe the purpose of the image.")}),(0,re.jsx)("br",{}),(0,Se.__)("Leave empty if decorative.")]})})})]})}),(0,re.jsxs)(yt.InspectorControls,{group:"dimensions",resetAllFilter:ge=>({...ge,aspectRatio:void 0,width:void 0,height:void 0,scale:void 0,focalPoint:void 0}),children:[yf,g&&H&&(0,re.jsx)(Le.__experimentalToolsPanelItem,{label:(0,Se.__)("Focal point"),isShownByDefault:!0,hasValue:()=>!!F,onDeselect:()=>a({focalPoint:void 0}),panelId:p,children:(0,re.jsx)(Le.FocalPointPicker,{label:(0,Se.__)("Focal point"),url:g,value:F,onDragStart:Co,onDrag:Co,onChange:ge=>a({focalPoint:ge})})})]}),!!Ru.length&&(0,re.jsx)(yt.InspectorControls,{children:(0,re.jsx)(Le.__experimentalToolsPanel,{label:(0,Se.__)("Settings"),resetAll:j7,dropdownMenuProps:sp,children:(0,re.jsx)(M2e,{value:I,defaultValue:nv,onChange:So,options:Ru})})}),(0,re.jsx)(yt.InspectorControls,{group:"advanced",children:(0,re.jsx)(Le.TextControl,{__next40pxDefaultSize:!0,label:(0,Se.__)("Title attribute"),value:N||"",onChange:Ht,readOnly:_f,help:_f?(0,re.jsx)(re.Fragment,{children:cp}):(0,Nr.createInterpolateElement)((0,Se.__)("Describe the role of this image on the page. <a>(Note: many devices and browsers do not display this text.)</a>"),{a:(0,re.jsx)(Le.ExternalLink,{href:"https://www.w3.org/TR/html52/dom.html#the-title-attribute"})})})})]}),kf=(0,fE.getFilename)(g),Cb;b?Cb=b:kf?Cb=(0,Se.sprintf)((0,Se.__)("This image has an empty alt attribute; its file name is %s"),kf):Cb=(0,Se.__)("This image has an empty alt attribute");let W7=(0,yt.__experimentalUseBorderProps)(r),Fpe=(0,yt.__experimentalGetShadowClassesAndStyles)(r),Hpe=r.className?.includes("is-style-rounded"),{postType:Ope,postId:BR,queryId:jpe}=m,Upe=Number.isFinite(jpe),Sb=e&&yr?(0,re.jsx)(Le.Placeholder,{className:"wp-block-image__placeholder",withIllustration:!0,children:(0,re.jsx)(Le.Spinner,{})}):(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)("img",{src:e||g,alt:Cb,onError:gf,onLoad:zu,ref:pe,className:W7.className,width:kn,height:ja,style:{aspectRatio:A,...O?{width:ee.width+O.width,height:ee.height+O.height}:{width:B,height:D},objectFit:H,objectPosition:F&&H?iv(F):void 0,...W7.style,...Fpe.style}}),(e||t)&&(0,re.jsx)(Le.Spinner,{})]});qi&&Me?Sb=(0,re.jsx)(Aq,{href:_,children:(0,re.jsx)(yt.__experimentalImageEditor,{id:k,url:g,...ee,naturalHeight:ja,naturalWidth:kn,onSaveImage:ge=>a(ge),onFinishEditing:()=>{Xe(!1)},borderProps:Hpe?void 0:W7})}):Sb=(0,re.jsx)(Aq,{href:_,children:Sb});let IR;if(Cs&&n&&!Me&&!HN.includes(f)){let ge=A&&YW(A),Lt=ee.width/ee.height,ti=kn/ja,ba=ge||Lt||ti||1,wf=kn<ja?Zs:Zs*ba,mp=ja<kn?Zs:Zs/ba,$7=fe*2.5,Cf=h||$7,Vu=!1,Tb=!1;y==="center"?(Vu=!0,Tb=!0):(0,Se.isRTL)()?y==="left"?Vu=!0:Tb=!0:y==="right"?Tb=!0:Vu=!0,IR=(0,re.jsx)(Le.ResizableBox,{ref:le,style:{position:"absolute",inset:`${X}px 0 0 0`},size:ee,minWidth:wf,maxWidth:Cf,minHeight:mp,maxHeight:Cf/ba,lockAspectRatio:ba,enable:{top:!1,right:Vu,bottom:!0,left:Tb},onResizeStart:()=>{at(!1)},onResize:(Wpe,$pe,q7,Pb)=>{J(Pb)},onResizeStop:(Wpe,$pe,q7,Pb)=>{if(at(!0),J(null),oe(NR=>({width:NR.width+Pb.width,height:NR.height+Pb.height})),h&&kn>=h&&Math.abs(q7.offsetWidth-h)<10){a({width:void 0,height:void 0});return}a({width:`${q7.offsetWidth}px`,height:"auto",aspectRatio:ba===ti?void 0:String(ba)})},resizeRatio:y==="center"?2:1})}if(!g&&!e)return(0,re.jsxs)(re.Fragment,{children:[Tl,G7]});let Gpe=()=>{ut("postType",Ope,BR,{featured_media:k}),Wr((0,Se.__)("Post featured image updated."),{type:"snackbar"})};return(0,re.jsxs)(re.Fragment,{children:[U7,Tl,G7,!Upe&&BR&&k?(0,re.jsx)(yt.BlockSettingsMenuControls,{children:({canEdit:ge,selectedClientIds:Lt})=>ge&&Lt.length===1&&p===Lt[0]&&(0,re.jsx)(Le.MenuItem,{onClick:Gpe,children:(0,Se.__)("Set as featured image")})}):null,Sb,IR,(0,re.jsx)(_a,{attributes:r,setAttributes:a,isSelected:n,insertBlocksAfter:i,label:(0,Se.__)("Image caption text"),showToolbarButton:n&&(Je||$r)&&!xf})]})}var Fq=o(U(),1),Hq=o(me(),1),Oq=o(v(),1);function jq(){let[e,{width:t}]=(0,Hq.useResizeObserver)(),r=(0,Fq.useRef)();return[(0,Oq.jsx)("div",{className:"wp-block","aria-hidden":"true",style:{position:"absolute",inset:0,width:"100%",height:0,margin:0},ref:r,children:e}),t]}var es=o(v(),1),V2e=(e,t)=>{let r=Object.fromEntries(Object.entries(e??{}).filter(([a])=>["alt","id","link","caption"].includes(a)));return r.url=e?.sizes?.[t]?.url||e?.media_details?.sizes?.[t]?.source_url||e.url,r},g4=(e,t)=>t&&!e&&!(0,hv.isBlobURL)(t);function Uq(e,t){return"url"in(e?.sizes?.[t]??{})||"source_url"in(e?.media_details?.sizes?.[t]??{})}function F2e({attributes:e,setAttributes:t,isSelected:r,className:a,insertBlocksAfter:n,onReplace:i,context:l,clientId:s,__unstableParentLayout:c}){let{url:u="",caption:m,id:p,width:d,height:f,sizeSlug:h,aspectRatio:g,scale:b,align:y,metadata:k}=e,[_,x]=(0,bm.useState)(e.blob),S=(0,bm.useRef)(),C=c?.type||c?.default?.type,N=!C||C!=="flex"&&C!=="grid",[B,D]=jq(),[A,{width:H}]=(0,$q.useResizeObserver)(),F=H&&H<160,z=(0,bm.useRef)();(0,bm.useEffect)(()=>{z.current=m},[m]);let{__unstableMarkNextChangeAsNotPersistent:I,replaceBlock:R}=(0,ud.useDispatch)(on.store);(0,bm.useEffect)(()=>{["wide","full"].includes(y)&&(I(),t({width:void 0,height:void 0,aspectRatio:void 0,scale:void 0}))},[I,y,t]);let{getSettings:$,getBlockRootClientId:j,getBlockName:G,canInsertBlockType:O}=(0,ud.useSelect)(on.store),J=(0,on.useBlockEditingMode)(),{createErrorNotice:ee}=(0,ud.useDispatch)(Wq.store);function oe(de){ee(de,{type:"snackbar"}),t({src:void 0,id:void 0,url:void 0,blob:void 0})}function X(de){let ct=S.current?.ownerDocument.defaultView;if(de.every(at=>at instanceof ct.File)){let at=de,kt=j(s);at.some(ut=>!UN(ut))&&ee((0,Js.__)("If uploading to a gallery all files need to be image formats"),{id:"gallery-upload-invalid-file",type:"snackbar"});let Wr=at.filter(ut=>UN(ut)).map(ut=>(0,fv.createBlock)("core/image",{blob:(0,hv.createBlobURL)(ut)}));if(G(kt)==="core/gallery")R(s,Wr);else if(O("core/gallery",kt)){let ut=(0,fv.createBlock)("core/gallery",{},Wr);R(s,ut)}}}function te(de){if(Array.isArray(de)){X(de);return}if(!de||!de.url){t({url:void 0,alt:void 0,id:void 0,title:void 0,caption:void 0,blob:void 0}),x();return}if((0,hv.isBlobURL)(de.url)){x(de.url);return}let{imageDefaultSize:ct}=$(),at=nv;h&&Uq(de,h)?at=h:Uq(de,ct)&&(at=ct);let kt=V2e(de,at);if(typeof kt.caption=="string"&&kt.caption.includes(`
`)&&(kt.caption=kt.caption.replace(/\n/g,"<br>")),z.current&&!kt.caption){let{caption:mt,...wo}=kt;kt=wo}let Wr;(!de.id||de.id!==p)&&(Wr={sizeSlug:at});let ut=e.linkDestination;if(!ut)switch(window?.wp?.media?.view?.settings?.defaultProps?.link||nd){case"file":case dh:ut=dh;break;case"post":case fh:ut=fh;break;case FN:ut=FN;break;case nd:ut=nd;break}let br;switch(ut){case dh:br=de.url;break;case fh:br=de.link;break}kt.href=br,t({blob:void 0,...kt,...Wr,linkDestination:ut}),x()}function ne(de){let ct=(0,v4.getProtocol)(de)?de:(0,v4.prependHTTPS)(de);ct!==u&&(t({blob:void 0,url:ct,id:void 0,sizeSlug:$().imageDefaultSize}),x())}Es({url:_,allowedTypes:tu,onChange:te,onError:oe});let pe=g4(p,u)?u:void 0,Ie=(0,ud.useSelect)(de=>!window.__clientSideMediaProcessing||!p?!1:de(qq.store).isUploadingById(p),[p]),Ne=!!u&&(0,es.jsx)("img",{alt:(0,Js.__)("Edit image"),title:(0,Js.__)("Edit image"),className:"edit-image-preview",src:u}),ae=(0,on.__experimentalUseBorderProps)(e),Re=(0,on.__experimentalGetShadowClassesAndStyles)(e),Ee=w(a,{"is-transient":!!_||Ie,"is-resized":!!d||!!f,[`size-${h}`]:h,"has-custom-border":!!ae.className||ae.style&&Object.keys(ae.style).length>0}),ie=(0,on.useBlockProps)({ref:S,className:Ee}),{lockUrlControls:fe=!1,lockUrlControlsMessage:ke}=(0,ud.useSelect)(de=>{if(!r)return{};let ct=(0,fv.getBlockBindingsSource)(k?.bindings?.url?.source);return{lockUrlControls:!!k?.bindings?.url&&!ct?.canUserEditValue?.({select:de,context:l,args:k?.bindings?.url?.args}),lockUrlControlsMessage:ct?.label?(0,Js.sprintf)((0,Js.__)("Connected to %s"),ct.label):(0,Js.__)("Connected to dynamic data")}},[l,r,k?.bindings?.url]);return(0,es.jsxs)(es.Fragment,{children:[(0,es.jsxs)("figure",{...ie,children:[(0,es.jsx)(Vq,{temporaryURL:_,isSideloading:Ie,attributes:e,setAttributes:t,isSingleSelected:r,insertBlocksAfter:n,onReplace:i,onSelectImage:te,onSelectURL:ne,onUploadError:oe,context:l,clientId:s,blockEditingMode:J,parentLayoutType:C,maxContentWidth:D}),(0,es.jsx)(on.MediaPlaceholder,{icon:(0,es.jsx)(on.BlockIcon,{icon:Wu}),onSelect:te,onSelectURL:ne,onError:oe,placeholder:de=>(0,es.jsxs)(Gq.Placeholder,{className:w("block-editor-media-placeholder",{[ae.className]:!!ae.className&&!r}),icon:!F&&(fe?XT:Wu),withIllustration:!r||F,label:!F&&(0,Js.__)("Image"),instructions:!fe&&!F&&(0,Js.__)("Drag and drop an image, upload, or choose from your library."),style:{aspectRatio:!(d&&f)&&g?g:void 0,width:f&&g?"100%":d,height:d&&g?"100%":f,objectFit:b,...ae.style,...Re.style},children:[fe&&!F&&ke,!fe&&!F&&de,A]}),allowedTypes:tu,handleUpload:de=>de.length===1,value:{id:p,src:pe},mediaPreview:Ne,disableMediaButtons:_||u})]}),r&&N&&B]})}var Zq=F2e;var b4={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/image",title:"Image",category:"media",usesContext:["allowResize","imageCrop","fixedHeight","navigationButtonType","postId","postType","queryId","galleryId"],description:"Insert an image to make a visual statement.",keywords:["img","photo","picture"],textdomain:"default",attributes:{blob:{type:"string",role:"local"},url:{type:"string",source:"attribute",selector:"img",attribute:"src",role:"content"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:"",role:"content"},caption:{type:"rich-text",source:"rich-text",selector:"figcaption",role:"content"},lightbox:{type:"object",enabled:{type:"boolean"}},title:{type:"string",source:"attribute",selector:"img",attribute:"title",role:"content"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href",role:"content"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number",role:"content"},width:{type:"string"},height:{type:"string"},aspectRatio:{type:"string"},scale:{type:"string"},focalPoint:{type:"object"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{interactivity:!0,align:["left","center","right","wide","full"],anchor:!0,color:{text:!1,background:!1},filter:{duotone:!0},spacing:{margin:!0},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}},shadow:{__experimentalSkipSerialization:!0}},selectors:{border:".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder",shadow:".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder",filter:{duotone:".wp-block-image img, .wp-block-image .components-placeholder"}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"rounded",label:"Rounded"}],editorStyle:"wp-block-image-editor",style:"wp-block-image"};var ts=o(T(),1);var au=o(v(),1);function Kq({attributes:e}){let{url:t,alt:r,caption:a,align:n,href:i,rel:l,linkClass:s,width:c,height:u,aspectRatio:m,scale:p,focalPoint:d,id:f,linkTarget:h,sizeSlug:g,title:b,metadata:{bindings:y={}}={}}=e,k=l||void 0,_=(0,ts.__experimentalGetBorderClassesAndStyles)(e),x=(0,ts.__experimentalGetShadowClassesAndStyles)(e),S=w({alignnone:n==="none",[`size-${g}`]:g,"is-resized":c||u,"has-custom-border":!!_.className||_.style&&Object.keys(_.style).length>0}),C=w(_.className,{[`wp-image-${f}`]:!!f}),N=(0,au.jsx)("img",{src:t,alt:r,className:C||void 0,style:{..._.style,...x.style,aspectRatio:m,objectFit:p,objectPosition:d&&p?iv(d):void 0,width:c,height:u},title:b}),B=!ts.RichText.isEmpty(a)||y.caption||y?.__default?.source==="core/pattern-overrides",D=(0,au.jsxs)(au.Fragment,{children:[i?(0,au.jsx)("a",{className:s,href:i,target:h,rel:k,children:N}):N,B&&(0,au.jsx)(ts.RichText.Content,{className:(0,ts.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:a})]});return(0,au.jsx)("figure",{...ts.useBlockProps.save({className:S}),children:D})}var y4=o(Rr(),1),gv=o(W(),1);function O2e(e,{shortcode:t}){let{body:r}=document.implementation.createHTMLDocument("");r.innerHTML=t.content;let a=r.querySelector("img");for(;a&&a.parentNode&&a.parentNode!==r;)a=a.parentNode;return a&&a.parentNode.removeChild(a),r.innerHTML.trim()}function hE(e,t){let{body:r}=document.implementation.createHTMLDocument("");r.innerHTML=e;let{firstElementChild:a}=r;if(a&&a.nodeName==="A")return a.getAttribute(t)||void 0}var Qq={img:{attributes:["src","alt","title"],classes:["alignleft","aligncenter","alignright","alignnone",/^wp-image-\d+$/]}},j2e=({phrasingContentSchema:e})=>({figure:{require:["img"],children:{...Qq,a:{attributes:["href","rel","target"],classes:["*"],children:Qq},figcaption:{children:e}}}}),U2e={from:[{type:"raw",isMatch:e=>e.nodeName==="FIGURE"&&!!e.querySelector("img"),schema:j2e,transform:e=>{let t=e.className+" "+e.querySelector("img").className,r=/(?:^|\s)align(left|center|right)(?:$|\s)/.exec(t),a=e.id===""?void 0:e.id,n=r?r[1]:void 0,i=/(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(t),l=i?Number(i[1]):void 0,s=e.querySelector("a"),c=s&&s.href?"custom":void 0,u=s&&s.href?s.href:void 0,m=s&&s.rel?s.rel:void 0,p=s&&s.className?s.className:void 0,d=(0,gv.getBlockAttributes)("core/image",e.outerHTML,{align:n,id:l,linkDestination:c,href:u,rel:m,linkClass:p,anchor:a});return(0,y4.isBlobURL)(d.url)&&(d.blob=d.url,delete d.url),(0,gv.createBlock)("core/image",d)}},{type:"files",isMatch(e){return e.every(t=>t.type.indexOf("image/")===0)},transform(e){return e.map(r=>(0,gv.createBlock)("core/image",{blob:(0,y4.createBlobURL)(r)}))}},{type:"shortcode",tag:"caption",attributes:{url:{type:"string",source:"attribute",attribute:"src",selector:"img"},alt:{type:"string",source:"attribute",attribute:"alt",selector:"img"},caption:{shortcode:O2e},href:{shortcode:(e,{shortcode:t})=>hE(t.content,"href")},rel:{shortcode:(e,{shortcode:t})=>hE(t.content,"rel")},linkClass:{shortcode:(e,{shortcode:t})=>hE(t.content,"class")},id:{type:"number",shortcode:({named:{id:e}})=>{if(e)return parseInt(e.replace("attachment_",""),10)}},align:{type:"string",shortcode:({named:{align:e="alignnone"}})=>e.replace("align","")}}}]},Yq=U2e;var{fieldsKey:G2e,formKey:W2e}=K(Xq.privateApis),{name:Jq}=b4,_4={icon:Wu,example:{attributes:{sizeSlug:"large",url:"https://s.w.org/images/core/5.3/MtBlanc1.jpg",caption:(0,md.__)("Mont Blanc appears\u2014still, snowy, and serene.")}},__experimentalLabel(e,{context:t}){let r=e?.metadata?.name;if((t==="list-view"||t==="breadcrumb")&&r)return r;if(t==="accessibility"){let{caption:a,alt:n,url:i}=e;return i?n?n+(a?". "+a:""):a||"":(0,md.__)("Empty")}},getEditWrapperProps(e){return{"data-align":e.align}},transforms:Yq,edit:Zq,save:Kq,deprecated:Iq};window.__experimentalContentOnlyInspectorFields&&(_4[G2e]=[{id:"image",label:(0,md.__)("Image"),type:"media",Edit:{control:"media",allowedTypes:["image"],multiple:!1},getValue:({item:e})=>({id:e.id,url:e.url,alt:e.alt,caption:e.caption}),setValue:({value:e})=>({id:e.id,url:e.url,alt:e.alt,caption:e.caption})},{id:"link",label:(0,md.__)("Link"),type:"url",Edit:"link",getValue:({item:e})=>({url:e.href,rel:e.rel,linkTarget:e.linkTarget}),setValue:({value:e})=>({href:e.url,rel:e.rel,linkTarget:e.linkTarget})},{id:"caption",label:(0,md.__)("Caption"),type:"text",Edit:"rich-text"},{id:"alt",label:(0,md.__)("Alt text"),type:"text"}],_4[W2e]={fields:["image","link","caption","alt"]});var $2e=()=>E({name:Jq,metadata:b4,settings:_4});var vE={};Z(vE,{init:()=>Y2e,metadata:()=>x4,name:()=>aZ,settings:()=>nZ});var x4={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/latest-comments",title:"Latest Comments",category:"widgets",description:"Display a list of your most recent comments.",keywords:["recent comments"],textdomain:"default",attributes:{commentsToShow:{type:"number",default:5,minimum:1,maximum:100},displayAvatar:{type:"boolean",default:!0},displayDate:{type:"boolean",default:!0},displayContent:{type:"string",default:"excerpt",enum:["none","excerpt","full"]}},supports:{anchor:!0,align:!0,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},html:!1,spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-latest-comments"};var k4=o(T(),1),Ba=o(M(),1),Pa=o(P(),1),eZ=o(Fu(),1),tZ=o(me(),1);var Xr=o(v(),1),Z2e=1,K2e=100;function rZ({attributes:e,setAttributes:t,name:r}){let{commentsToShow:a,displayAvatar:n,displayDate:i,displayContent:l}=e,s=q(),{content:c,status:u,error:m}=(0,eZ.useServerSideRender)({attributes:e,skipBlockSupportAttributes:!0,block:r,urlQueryArgs:{_locale:"site"}}),p=(0,tZ.useDisabled)(),d=(0,k4.useBlockProps)({ref:p});return(0,Xr.jsxs)(Xr.Fragment,{children:[(0,Xr.jsx)(k4.InspectorControls,{children:(0,Xr.jsxs)(Ba.__experimentalToolsPanel,{label:(0,Pa.__)("Settings"),resetAll:()=>{t({commentsToShow:5,displayAvatar:!0,displayDate:!0,displayContent:"excerpt"})},dropdownMenuProps:s,children:[(0,Xr.jsx)(Ba.__experimentalToolsPanelItem,{hasValue:()=>!n,label:(0,Pa.__)("Display avatar"),onDeselect:()=>t({displayAvatar:!0}),isShownByDefault:!0,children:(0,Xr.jsx)(Ba.ToggleControl,{label:(0,Pa.__)("Display avatar"),checked:n,onChange:()=>t({displayAvatar:!n})})}),(0,Xr.jsx)(Ba.__experimentalToolsPanelItem,{hasValue:()=>!i,label:(0,Pa.__)("Display date"),onDeselect:()=>t({displayDate:!0}),isShownByDefault:!0,children:(0,Xr.jsx)(Ba.ToggleControl,{label:(0,Pa.__)("Display date"),checked:i,onChange:()=>t({displayDate:!i})})}),(0,Xr.jsx)(Ba.__experimentalToolsPanelItem,{hasValue:()=>l!=="excerpt",label:(0,Pa.__)("Display content"),onDeselect:()=>t({displayContent:"excerpt"}),isShownByDefault:!0,children:(0,Xr.jsx)(Ba.SelectControl,{__next40pxDefaultSize:!0,label:(0,Pa.__)("Display content"),value:l,options:[{label:(0,Pa.__)("No content"),value:"none"},{label:(0,Pa.__)("Excerpt"),value:"excerpt"},{label:(0,Pa.__)("Full content"),value:"full"}],onChange:f=>t({displayContent:f})})}),(0,Xr.jsx)(Ba.__experimentalToolsPanelItem,{hasValue:()=>a!==5,label:(0,Pa.__)("Number of comments"),onDeselect:()=>t({commentsToShow:5}),isShownByDefault:!0,children:(0,Xr.jsx)(Ba.RangeControl,{__next40pxDefaultSize:!0,label:(0,Pa.__)("Number of comments"),value:a,onChange:f=>t({commentsToShow:f}),min:Z2e,max:K2e,required:!0})})]})}),u==="loading"&&(0,Xr.jsx)("div",{...d,children:(0,Xr.jsx)(Ba.Spinner,{})}),u==="error"&&(0,Xr.jsx)("div",{...d,children:(0,Xr.jsx)("p",{children:(0,Pa.sprintf)((0,Pa.__)("Error: %s"),m)})}),u==="success"&&(0,Xr.jsx)(uo,{wrapperProps:d,html:c})]})}var Q2e={attributes:{commentsToShow:{type:"number",default:5,minimum:1,maximum:100},displayAvatar:{type:"boolean",default:!0},displayDate:{type:"boolean",default:!0},displayExcerpt:{type:"boolean",default:!0}},supports:{align:!0,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},html:!1,spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},isEligible(e){return e?.displayExcerpt===!1},migrate(e){return{...e,displayContent:e.displayExcerpt?"excerpt":"none"}}},oZ=[Q2e];var{name:aZ}=x4,nZ={icon:N0,example:{},edit:rZ,deprecated:oZ},Y2e=()=>E({name:aZ,metadata:x4,settings:nZ});var xE={};Z(xE,{init:()=>ibe,metadata:()=>Sh,name:()=>pZ,settings:()=>dZ});var Sh={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/latest-posts",title:"Latest Posts",category:"widgets",description:"Display a list of your most recent posts.",keywords:["recent posts"],textdomain:"default",attributes:{categories:{type:"array",items:{type:"object"}},selectedAuthor:{type:"number"},postsToShow:{type:"number",default:5},displayPostContent:{type:"boolean",default:!1},displayPostContentRadio:{type:"string",default:"excerpt"},excerptLength:{type:"number",default:55},displayAuthor:{type:"boolean",default:!1},displayPostDate:{type:"boolean",default:!1},postLayout:{type:"string",default:"list"},columns:{type:"number",default:3},order:{type:"string",default:"desc"},orderBy:{type:"string",default:"date"},displayFeaturedImage:{type:"boolean",default:!1},featuredImageAlign:{type:"string",enum:["left","center","right"]},featuredImageSizeSlug:{type:"string",default:"thumbnail"},featuredImageSizeWidth:{type:"number",default:null},featuredImageSizeHeight:{type:"number",default:null},addLinkToFeaturedImage:{type:"boolean",default:!1}},supports:{anchor:!0,align:!0,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-latest-posts-editor",style:"wp-block-latest-posts"};var{attributes:J2e}=Sh,iZ=[{attributes:{...J2e,categories:{type:"string"}},supports:{align:!0,html:!1},migrate:e=>({...e,categories:[{id:Number(e.categories)}]}),isEligible:({categories:e})=>e&&typeof e=="string",save:()=>null}];var $e=o(M(),1),Ve=o(P(),1),Th=o(Lk(),1),ec=o(T(),1),vv=o(V(),1);var yE=o(Q(),1),cZ=o(xr(),1),uZ=o(me(),1),mZ=o(U(),1);var lZ=10,sZ=100,bE=6,w4=55;var be=o(v(),1),ebe={per_page:-1,_fields:"id,name",context:"view"},tbe={per_page:-1,has_published_posts:["post"],context:"view"},rbe=[{value:"none",icon:ES,label:(0,Ve.__)("None")},{value:"left",icon:oP,label:(0,Ve.__)("Left")},{value:"center",icon:tP,label:(0,Ve.__)("Center")},{value:"right",icon:nP,label:(0,Ve.__)("Right")}];function obe(e,t){let r=e._embedded?.["wp:featuredmedia"]?.["0"];return{url:r?.media_details?.sizes?.[t]?.source_url??r?.source_url,alt:r?.alt_text}}function abe(e){return e._embedded?.author?.[0]}function nbe({attributes:e,setAttributes:t,postCount:r}){let{postsToShow:a,order:n,orderBy:i,categories:l,selectedAuthor:s,displayFeaturedImage:c,displayPostContentRadio:u,displayPostContent:m,displayPostDate:p,displayAuthor:d,postLayout:f,columns:h,excerptLength:g,featuredImageAlign:b,featuredImageSizeSlug:y,featuredImageSizeWidth:k,featuredImageSizeHeight:_,addLinkToFeaturedImage:x}=e,{imageSizes:S,defaultImageWidth:C,defaultImageHeight:N,categoriesList:B,authorList:D}=(0,vv.useSelect)(I=>{let{getEntityRecords:R,getUsers:$}=I(yE.store),j=I(ec.store).getSettings();return{defaultImageWidth:j.imageDimensions?.[y]?.width??0,defaultImageHeight:j.imageDimensions?.[y]?.height??0,imageSizes:j.imageSizes,categoriesList:R("taxonomy","category",ebe),authorList:$(tbe)}},[y]),A=q(),H=S.filter(({slug:I})=>I!=="full").map(({name:I,slug:R})=>({value:R,label:I})),F=B?.reduce((I,R)=>({...I,[R.name]:R}),{})??{},z=I=>{if(I.some(j=>typeof j=="string"&&!F[j]))return;let $=I.map(j=>typeof j=="string"?F[j]:j);if($.includes(null))return!1;t({categories:$})};return(0,be.jsxs)(be.Fragment,{children:[(0,be.jsxs)($e.__experimentalToolsPanel,{label:(0,Ve.__)("Post content"),resetAll:()=>t({displayPostContent:!1,displayPostContentRadio:"excerpt",excerptLength:w4}),dropdownMenuProps:A,children:[(0,be.jsx)($e.__experimentalToolsPanelItem,{hasValue:()=>!!m,label:(0,Ve.__)("Display post content"),onDeselect:()=>t({displayPostContent:!1}),isShownByDefault:!0,children:(0,be.jsx)($e.ToggleControl,{label:(0,Ve.__)("Display post content"),checked:m,onChange:I=>t({displayPostContent:I})})}),m&&(0,be.jsx)($e.__experimentalToolsPanelItem,{hasValue:()=>u!=="excerpt",label:(0,Ve.__)("Content length"),onDeselect:()=>t({displayPostContentRadio:"excerpt"}),isShownByDefault:!0,children:(0,be.jsx)($e.RadioControl,{label:(0,Ve.__)("Content length"),selected:u,options:[{label:(0,Ve.__)("Excerpt"),value:"excerpt"},{label:(0,Ve.__)("Full post"),value:"full_post"}],onChange:I=>t({displayPostContentRadio:I})})}),m&&u==="excerpt"&&(0,be.jsx)($e.__experimentalToolsPanelItem,{hasValue:()=>g!==w4,label:(0,Ve.__)("Max number of words"),onDeselect:()=>t({excerptLength:w4}),isShownByDefault:!0,children:(0,be.jsx)($e.RangeControl,{__next40pxDefaultSize:!0,label:(0,Ve.__)("Max number of words"),value:g,onChange:I=>t({excerptLength:I}),min:lZ,max:sZ})})]}),(0,be.jsxs)($e.__experimentalToolsPanel,{label:(0,Ve.__)("Post meta"),resetAll:()=>t({displayAuthor:!1,displayPostDate:!1}),dropdownMenuProps:A,children:[(0,be.jsx)($e.__experimentalToolsPanelItem,{hasValue:()=>!!d,label:(0,Ve.__)("Display author name"),onDeselect:()=>t({displayAuthor:!1}),isShownByDefault:!0,children:(0,be.jsx)($e.ToggleControl,{label:(0,Ve.__)("Display author name"),checked:d,onChange:I=>t({displayAuthor:I})})}),(0,be.jsx)($e.__experimentalToolsPanelItem,{hasValue:()=>!!p,label:(0,Ve.__)("Display post date"),onDeselect:()=>t({displayPostDate:!1}),isShownByDefault:!0,children:(0,be.jsx)($e.ToggleControl,{label:(0,Ve.__)("Display post date"),checked:p,onChange:I=>t({displayPostDate:I})})})]}),(0,be.jsxs)($e.__experimentalToolsPanel,{label:(0,Ve.__)("Featured image"),resetAll:()=>t({displayFeaturedImage:!1,featuredImageAlign:void 0,featuredImageSizeSlug:"thumbnail",featuredImageSizeWidth:null,featuredImageSizeHeight:null,addLinkToFeaturedImage:!1}),dropdownMenuProps:A,children:[(0,be.jsx)($e.__experimentalToolsPanelItem,{hasValue:()=>!!c,label:(0,Ve.__)("Display featured image"),onDeselect:()=>t({displayFeaturedImage:!1}),isShownByDefault:!0,children:(0,be.jsx)($e.ToggleControl,{label:(0,Ve.__)("Display featured image"),checked:c,onChange:I=>t({displayFeaturedImage:I})})}),c&&(0,be.jsxs)(be.Fragment,{children:[(0,be.jsx)($e.__experimentalToolsPanelItem,{hasValue:()=>y!=="thumbnail"||k!==null||_!==null,label:(0,Ve.__)("Image size"),onDeselect:()=>t({featuredImageSizeSlug:"thumbnail",featuredImageSizeWidth:null,featuredImageSizeHeight:null}),isShownByDefault:!0,children:(0,be.jsx)(ec.__experimentalImageSizeControl,{onChange:I=>{let R={};I.hasOwnProperty("width")&&(R.featuredImageSizeWidth=I.width),I.hasOwnProperty("height")&&(R.featuredImageSizeHeight=I.height),t(R)},slug:y,width:k,height:_,imageWidth:C,imageHeight:N,imageSizeOptions:H,imageSizeHelp:(0,Ve.__)("Select the size of the source image."),onChangeImage:I=>t({featuredImageSizeSlug:I,featuredImageSizeWidth:void 0,featuredImageSizeHeight:void 0})})}),(0,be.jsx)($e.__experimentalToolsPanelItem,{hasValue:()=>!!b,label:(0,Ve.__)("Image alignment"),onDeselect:()=>t({featuredImageAlign:void 0}),isShownByDefault:!0,children:(0,be.jsx)($e.__experimentalToggleGroupControl,{className:"editor-latest-posts-image-alignment-control",__next40pxDefaultSize:!0,label:(0,Ve.__)("Image alignment"),value:b||"none",onChange:I=>t({featuredImageAlign:I!=="none"?I:void 0}),children:rbe.map(({value:I,icon:R,label:$})=>(0,be.jsx)($e.__experimentalToggleGroupControlOptionIcon,{value:I,icon:R,label:$},I))})}),(0,be.jsx)($e.__experimentalToolsPanelItem,{hasValue:()=>!!x,label:(0,Ve.__)("Add link to featured image"),onDeselect:()=>t({addLinkToFeaturedImage:!1}),isShownByDefault:!0,children:(0,be.jsx)($e.ToggleControl,{label:(0,Ve.__)("Add link to featured image"),checked:x,onChange:I=>t({addLinkToFeaturedImage:I})})})]})]}),(0,be.jsxs)($e.__experimentalToolsPanel,{label:(0,Ve.__)("Sorting and filtering"),resetAll:()=>t({order:"desc",orderBy:"date",postsToShow:5,categories:void 0,selectedAuthor:void 0,columns:3}),dropdownMenuProps:A,children:[(0,be.jsx)($e.__experimentalToolsPanelItem,{hasValue:()=>n!=="desc"||i!=="date"||a!==5||l?.length>0||!!s,label:(0,Ve.__)("Sort and filter"),onDeselect:()=>t({order:"desc",orderBy:"date",postsToShow:5,categories:void 0,selectedAuthor:void 0}),isShownByDefault:!0,children:(0,be.jsx)($e.QueryControls,{order:n,orderBy:i,numberOfItems:a,onOrderChange:I=>t({order:I}),onOrderByChange:I=>t({orderBy:I}),onNumberOfItemsChange:I=>t({postsToShow:I}),categorySuggestions:F,onCategoryChange:z,selectedCategories:l,onAuthorChange:I=>t({selectedAuthor:I!==""?Number(I):void 0}),authorList:D??[],selectedAuthorId:s})}),f==="grid"&&(0,be.jsx)($e.__experimentalToolsPanelItem,{hasValue:()=>h!==3,label:(0,Ve.__)("Columns"),onDeselect:()=>t({columns:3}),isShownByDefault:!0,children:(0,be.jsx)($e.RangeControl,{__next40pxDefaultSize:!0,label:(0,Ve.__)("Columns"),value:h,onChange:I=>t({columns:I}),min:2,max:r?Math.min(bE,r):bE,required:!0})})]})]})}function _E({attributes:e,setAttributes:t}){let r=(0,uZ.useInstanceId)(_E),{postsToShow:a,order:n,orderBy:i,categories:l,selectedAuthor:s,displayFeaturedImage:c,displayPostContentRadio:u,displayPostContent:m,displayPostDate:p,displayAuthor:d,postLayout:f,columns:h,excerptLength:g,featuredImageAlign:b,featuredImageSizeSlug:y,featuredImageSizeWidth:k,featuredImageSizeHeight:_,addLinkToFeaturedImage:x}=e,{latestPosts:S}=(0,vv.useSelect)(I=>{let{getEntityRecords:R}=I(yE.store),$=l&&l.length>0?l.map(G=>G.id):[],j=Object.fromEntries(Object.entries({categories:$,author:s,order:n,orderby:i,per_page:a,_embed:"author,wp:featuredmedia",ignore_sticky:!0}).filter(([,G])=>typeof G<"u"));return{latestPosts:R("postType","post",j)}},[a,n,i,l,s]),{createWarningNotice:C}=(0,vv.useDispatch)(cZ.store),N=I=>{I.preventDefault(),C((0,Ve.__)("Links are disabled in the editor."),{id:`block-library/core/latest-posts/redirection-prevented/${r}`,type:"snackbar"})},B=!!S?.length,D=(0,be.jsx)(ec.InspectorControls,{children:(0,be.jsx)(nbe,{attributes:e,setAttributes:t,postCount:S?.length??0})}),A=(0,ec.useBlockProps)({className:w({"wp-block-latest-posts__list":!0,"is-grid":f==="grid","has-dates":p,"has-author":d,[`columns-${h}`]:f==="grid"})});if(!B)return(0,be.jsxs)("div",{...A,children:[D,(0,be.jsx)($e.Placeholder,{icon:Q0,label:(0,Ve.__)("Latest Posts"),children:Array.isArray(S)?(0,Ve.__)("No posts found."):(0,be.jsx)($e.Spinner,{})})]});let H=S.length>a?S.slice(0,a):S,F=[{icon:Nl,title:(0,Ve._x)("List view","Latest posts block display setting"),onClick:()=>t({postLayout:"list"}),isActive:f==="list"},{icon:Il,title:(0,Ve._x)("Grid view","Latest posts block display setting"),onClick:()=>t({postLayout:"grid"}),isActive:f==="grid"}],z=(0,Th.getSettings)().formats.date;return(0,be.jsxs)(be.Fragment,{children:[D,(0,be.jsx)(ec.BlockControls,{children:(0,be.jsx)($e.ToolbarGroup,{controls:F})}),(0,be.jsx)("ul",{...A,children:H.map(I=>{let R=I.title.rendered.trim(),$=I.excerpt.rendered,j=abe(I),G=document.createElement("div");G.innerHTML=$,$=G.textContent||G.innerText||"";let{url:O,alt:J}=obe(I,y),ee=w({"wp-block-latest-posts__featured-image":!0,[`align${b}`]:!!b}),oe=c&&O,X=oe&&(0,be.jsx)("img",{src:O,alt:J,style:{maxWidth:k,maxHeight:_}}),ne=g<$.trim().split(" ").length&&I.excerpt.raw===""?(0,be.jsxs)(be.Fragment,{children:[$.trim().split(" ",g).join(" "),(0,mZ.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("\u2026 <a>Read more<span>: %1$s</span></a>"),R||(0,Ve.__)("(no title)")),{a:(0,be.jsx)("a",{className:"wp-block-latest-posts__read-more",href:I.link,rel:"noopener noreferrer",onClick:N}),span:(0,be.jsx)("span",{className:"screen-reader-text"})})]}):$;return(0,be.jsxs)("li",{children:[oe&&(0,be.jsx)("div",{className:ee,children:x?(0,be.jsx)("a",{href:I.link,onClick:N,children:X}):X}),(0,be.jsx)("a",{className:"wp-block-latest-posts__post-title",href:I.link,dangerouslySetInnerHTML:R?{__html:R}:void 0,onClick:N,children:R?null:(0,Ve.__)("(no title)")}),d&&j&&(0,be.jsx)("div",{className:"wp-block-latest-posts__post-author",children:(0,Ve.sprintf)((0,Ve.__)("by %s"),j.name)}),p&&I.date_gmt&&(0,be.jsx)("time",{dateTime:(0,Th.format)("c",I.date_gmt),className:"wp-block-latest-posts__post-date",children:(0,Th.dateI18n)(z,I.date_gmt)}),m&&u==="excerpt"&&(0,be.jsx)("div",{className:"wp-block-latest-posts__post-excerpt",children:ne}),m&&u==="full_post"&&(0,be.jsx)("div",{className:"wp-block-latest-posts__post-full-content",dangerouslySetInnerHTML:{__html:I.content.raw.trim()}})]},I.id)})})]})}var{name:pZ}=Sh,dZ={icon:t1,example:{},edit:_E,deprecated:iZ},ibe=()=>E({name:pZ,metadata:Sh,settings:dZ});var SE={};Z(SE,{init:()=>_be,metadata:()=>P4,name:()=>NZ,settings:()=>EZ});var Ih=o(P(),1);var rs=o(T(),1);var Ph=o(W(),1),C4={A:"upper-alpha",a:"lower-alpha",I:"upper-roman",i:"lower-roman"};function kE(e){let t=e.getAttribute("type"),r={ordered:e.tagName==="OL",anchor:e.id?e.id:void 0,start:e.getAttribute("start")?parseInt(e.getAttribute("start"),10):void 0,reversed:e.hasAttribute("reversed")?!0:void 0,type:t&&C4[t]?C4[t]:void 0},a=Array.from(e.children).map(n=>{let i=Array.from(n.childNodes).filter(d=>d.nodeType!==d.TEXT_NODE||d.textContent.trim().length!==0);i.reverse();let[l,...s]=i;if(!(l?.tagName==="UL"||l?.tagName==="OL"))return(0,Ph.createBlock)("core/list-item",{content:n.innerHTML});let u=s.map(d=>d.nodeType===d.TEXT_NODE?d.textContent:d.outerHTML);u.reverse();let m={content:u.join("").trim()},p=[kE(l)];return(0,Ph.createBlock)("core/list-item",m,p)});return(0,Ph.createBlock)("core/list",r,a)}function S4(e){let{values:t,start:r,reversed:a,ordered:n,type:i,...l}=e,s=document.createElement(n?"ol":"ul");s.innerHTML=t,r&&s.setAttribute("start",r),a&&s.setAttribute("reversed",!0),i&&s.setAttribute("type",i);let[c]=(0,Ph.rawHandler)({HTML:s.outerHTML});return[{...l,...c.attributes},c.innerBlocks]}function fZ(e){let{type:t}=e;return t&&C4[t]?{...e,type:C4[t]}:e}var nu=o(v(),1),lbe={attributes:{ordered:{type:"boolean",default:!1,role:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",role:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,__experimentalFontFamily:!0},color:{gradients:!0,link:!0},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},save({attributes:e}){let{ordered:t,values:r,type:a,reversed:n,start:i}=e;return(0,nu.jsx)(t?"ol":"ul",{...rs.useBlockProps.save({type:a,reversed:n,start:i}),children:(0,nu.jsx)(rs.RichText.Content,{value:r,multiline:"li"})})},migrate:Ot,isEligible({style:e}){return e?.typography?.fontFamily}},sbe={attributes:{ordered:{type:"boolean",default:!1,role:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",role:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,__experimentalFontFamily:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},save({attributes:e}){let{ordered:t,values:r,type:a,reversed:n,start:i}=e;return(0,nu.jsx)(t?"ol":"ul",{...rs.useBlockProps.save({type:a,reversed:n,start:i}),children:(0,nu.jsx)(rs.RichText.Content,{value:r,multiline:"li"})})},migrate:S4},cbe={attributes:{ordered:{type:"boolean",default:!1,role:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",role:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},isEligible({type:e}){return!!e},save({attributes:e}){let{ordered:t,type:r,reversed:a,start:n}=e;return(0,nu.jsx)(t?"ol":"ul",{...rs.useBlockProps.save({type:r,reversed:a,start:n}),children:(0,nu.jsx)(rs.InnerBlocks.Content,{})})},migrate:fZ},ube={attributes:{ordered:{type:"boolean",default:!1,role:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",role:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalOnMerge:"true",__experimentalSlashInserter:!0},save({attributes:e}){let{ordered:t,type:r,reversed:a,start:n}=e;return(0,nu.jsx)(t?"ol":"ul",{...rs.useBlockProps.save({reversed:a,start:n,style:{listStyleType:t&&r!=="decimal"?r:void 0}}),children:(0,nu.jsx)(rs.InnerBlocks.Content,{})})}},hZ=[ube,cbe,sbe,lbe];var as=o(T(),1),T4=o(M(),1),ym=o(V(),1),os=o(P(),1);var CZ=o(W(),1),pd=o(U(),1),SZ=o(Ff(),1);var oa=o(P(),1),vZ=o(T(),1),aa=o(M(),1),bZ=o(U(),1);var Fn=o(v(),1),gZ=[{label:(0,oa.__)("Numbers"),value:"decimal"},{label:(0,oa.__)("Uppercase letters"),value:"upper-alpha"},{label:(0,oa.__)("Lowercase letters"),value:"lower-alpha"},{label:(0,oa.__)("Uppercase Roman numerals"),value:"upper-roman"},{label:(0,oa.__)("Lowercase Roman numerals"),value:"lower-roman"}],mbe=({setAttributes:e,reversed:t,start:r,type:a})=>{let n=q();return(0,Fn.jsx)(vZ.InspectorControls,{children:bZ.Platform.isNative?(0,Fn.jsxs)(aa.PanelBody,{title:(0,oa.__)("Settings"),children:[(0,Fn.jsx)(aa.SelectControl,{__next40pxDefaultSize:!0,label:(0,oa.__)("List style"),options:gZ,value:a,onChange:i=>e({type:i})}),(0,Fn.jsx)(aa.TextControl,{__next40pxDefaultSize:!0,label:(0,oa.__)("Start value"),type:"number",onChange:i=>{let l=parseInt(i,10);e({start:isNaN(l)?void 0:l})},value:Number.isInteger(r)?r.toString(10):"",step:"1"}),(0,Fn.jsx)(aa.ToggleControl,{label:(0,oa.__)("Reverse order"),checked:t||!1,onChange:i=>{e({reversed:i||void 0})}})]}):(0,Fn.jsxs)(aa.__experimentalToolsPanel,{label:(0,oa.__)("Settings"),resetAll:()=>{e({type:void 0,start:void 0,reversed:void 0})},dropdownMenuProps:n,children:[(0,Fn.jsx)(aa.__experimentalToolsPanelItem,{label:(0,oa.__)("List style"),isShownByDefault:!0,hasValue:()=>!!a,onDeselect:()=>e({type:void 0}),children:(0,Fn.jsx)(aa.SelectControl,{__next40pxDefaultSize:!0,label:(0,oa.__)("List style"),options:gZ,value:a||"decimal",onChange:i=>e({type:i})})}),(0,Fn.jsx)(aa.__experimentalToolsPanelItem,{label:(0,oa.__)("Start value"),isShownByDefault:!0,hasValue:()=>!!r,onDeselect:()=>e({start:void 0}),children:(0,Fn.jsx)(aa.TextControl,{__next40pxDefaultSize:!0,label:(0,oa.__)("Start value"),type:"number",onChange:i=>{let l=parseInt(i,10);e({start:isNaN(l)?void 0:l})},value:Number.isInteger(r)?r.toString(10):"",step:"1"})}),(0,Fn.jsx)(aa.__experimentalToolsPanelItem,{label:(0,oa.__)("Reverse order"),isShownByDefault:!0,hasValue:()=>!!t,onDeselect:()=>e({reversed:void 0}),children:(0,Fn.jsx)(aa.ToggleControl,{label:(0,oa.__)("Reverse order"),checked:t||!1,onChange:i=>{e({reversed:i||void 0})}})})]})})},yZ=mbe;var _Z=o(U(),1),xZ=o(v(),1);function pbe(e,t){let{ordered:r,...a}=e;return(0,xZ.jsx)(r?"ol":"ul",{ref:t,...a})}var kZ=(0,_Z.forwardRef)(pbe);var Hn=o(v(),1),dbe={name:"core/list-item"},fbe=[["core/list-item"]],wZ=8;function hbe(e,t){let r=(0,ym.useRegistry)(),{updateBlockAttributes:a,replaceInnerBlocks:n}=(0,ym.useDispatch)(as.store);(0,pd.useEffect)(()=>{if(!e.values)return;let[i,l]=S4(e);(0,SZ.default)("Value attribute on the list block",{since:"6.0",version:"6.5",alternative:"inner blocks"}),r.batch(()=>{a(t,i),n(t,l)})},[e.values])}function gbe(e){let{replaceBlocks:t,selectionChange:r}=(0,ym.useDispatch)(as.store),{getBlockRootClientId:a,getBlockAttributes:n,getBlock:i}=(0,ym.useSelect)(as.store);return(0,pd.useCallback)(()=>{let l=a(e),s=n(l),c=(0,CZ.createBlock)("core/list-item",s),{innerBlocks:u}=i(e);t([l],[c,...u]),r(u[u.length-1].clientId)},[e])}function vbe({clientId:e}){let t=gbe(e),r=(0,ym.useSelect)(a=>{let{getBlockRootClientId:n,getBlockName:i}=a(as.store);return i(n(e))==="core/list-item"},[e]);return(0,Hn.jsx)(Hn.Fragment,{children:(0,Hn.jsx)(T4.ToolbarButton,{icon:(0,os.isRTL)()?H0:O0,title:(0,os.__)("Outdent"),description:(0,os.__)("Outdent list item"),disabled:!r,onClick:t})})}function TZ({attributes:e,setAttributes:t,clientId:r,style:a}){let{ordered:n,type:i,reversed:l,start:s}=e,c=(0,as.useBlockProps)({style:{...pd.Platform.isNative&&a,listStyleType:n&&i!=="decimal"?i:void 0}}),u=(0,as.useInnerBlocksProps)(c,{defaultBlock:dbe,directInsert:!0,template:fbe,templateLock:!1,templateInsertUpdatesSelection:!0,...pd.Platform.isNative&&{marginVertical:wZ,marginHorizontal:wZ,renderAppender:!1},__experimentalCaptureToolbars:!0});hbe(e,r);let m=(0,Hn.jsxs)(as.BlockControls,{group:"block",children:[(0,Hn.jsx)(T4.ToolbarButton,{icon:(0,os.isRTL)()?z0:V0,title:(0,os.__)("Unordered"),description:(0,os.__)("Convert to unordered list"),isActive:n===!1,onClick:()=>{t({ordered:!1})}}),(0,Hn.jsx)(T4.ToolbarButton,{icon:(0,os.isRTL)()?F0:Ki,title:(0,os.__)("Ordered"),description:(0,os.__)("Convert to ordered list"),isActive:n===!0,onClick:()=>{t({ordered:!0})}}),(0,Hn.jsx)(vbe,{clientId:r})]});return(0,Hn.jsxs)(Hn.Fragment,{children:[(0,Hn.jsx)(kZ,{ordered:n,reversed:l,start:s,...u}),m,n&&(0,Hn.jsx)(yZ,{setAttributes:t,reversed:l,start:s,type:i})]})}var P4={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/list",title:"List",category:"text",allowedBlocks:["core/list-item"],description:"An organized collection of items displayed in a specific order.",keywords:["bullet list","ordered list","numbered list"],textdomain:"default",attributes:{ordered:{type:"boolean",default:!1,role:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",default:"",role:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,html:!1,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__unstablePasteTextInline:!0,__experimentalOnMerge:!0,__experimentalSlashInserter:!0,interactivity:{clientNavigation:!0},listView:!0},selectors:{border:".wp-block-list:not(.wp-block-list .wp-block-list)"},editorStyle:"wp-block-list-editor",style:"wp-block-list"};var B4=o(T(),1),wE=o(v(),1);function PZ({attributes:e}){let{ordered:t,type:r,reversed:a,start:n}=e;return(0,wE.jsx)(t?"ol":"ul",{...B4.useBlockProps.save({reversed:a,start:n,style:{listStyleType:t&&r!=="decimal"?r:void 0}}),children:(0,wE.jsx)(B4.InnerBlocks.Content,{})})}var iu=o(W(),1),Bh=o(em(),1);function BZ({phrasingContentSchema:e}){let t={...e,ul:{},ol:{attributes:["type","start","reversed"]}};return["ul","ol"].forEach(r=>{t[r].children={li:{children:t}}}),t}function CE(e){return e.flatMap(({name:t,attributes:r,innerBlocks:a=[]})=>t==="core/list-item"?[r.content,...CE(a)]:CE(a))}var ybe={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph","core/heading"],transform:e=>{let t=[];if(e.length>1)t=e.map(({content:r})=>(0,iu.createBlock)("core/list-item",{content:r}));else if(e.length===1){let r=(0,Bh.create)({html:e[0].content});t=(0,Bh.split)(r,`
`).map(a=>(0,iu.createBlock)("core/list-item",{content:(0,Bh.toHTMLString)({value:a})}))}return(0,iu.createBlock)("core/list",{anchor:e.anchor},t)}},{type:"raw",selector:"ol,ul",schema:e=>({ol:BZ(e).ol,ul:BZ(e).ul}),transform:kE},...["*","-"].map(e=>({type:"prefix",prefix:e,transform(t){return(0,iu.createBlock)("core/list",{},[(0,iu.createBlock)("core/list-item",{content:t})])}})),...["1.","1)"].map(e=>({type:"prefix",prefix:e,transform(t){return(0,iu.createBlock)("core/list",{ordered:!0},[(0,iu.createBlock)("core/list-item",{content:t})])}}))],to:[...["core/paragraph","core/heading"].map(e=>({type:"block",blocks:[e],transform:(t,r)=>CE(r).map(a=>(0,iu.createBlock)(e,{content:a}))}))]},IZ=ybe;var{name:NZ}=P4,EZ={icon:Nl,example:{innerBlocks:[{name:"core/list-item",attributes:{content:(0,Ih.__)("Alice.")}},{name:"core/list-item",attributes:{content:(0,Ih.__)("The White Rabbit.")}},{name:"core/list-item",attributes:{content:(0,Ih.__)("The Cheshire Cat.")}},{name:"core/list-item",attributes:{content:(0,Ih.__)("The Mad Hatter.")}},{name:"core/list-item",attributes:{content:(0,Ih.__)("The Queen of Hearts.")}}]},transforms:IZ,edit:TZ,save:PZ,deprecated:hZ},_be=()=>E({name:NZ,metadata:P4,settings:EZ});var PE={};Z(PE,{init:()=>Cbe,metadata:()=>N4,name:()=>OZ,settings:()=>jZ});var _m=o(P(),1),I4=o(T(),1),km=o(M(),1),xm=o(U(),1),LZ=o(V(),1),MZ=o(bv(),1);var Ci=o(v(),1),{Badge:xbe}=K(km.privateApis);function AZ({attributes:e,setAttributes:t,isSelected:r}){let{latex:a,mathML:n}=e,[i,l]=(0,xm.useState)(),[s,c]=(0,xm.useState)(null),[u,m]=(0,xm.useState)(),p=(0,xm.useRef)(a),{__unstableMarkNextChangeAsNotPersistent:d}=(0,LZ.useDispatch)(I4.store);(0,xm.useEffect)(()=>{import("@wordpress/latex-to-mathml").then(h=>{m(()=>h.default),p.current&&(d(),t({mathML:h.default(p.current,{displayMode:!0})}))})},[p,t,d]);let f=(0,I4.useBlockProps)({ref:l,position:"relative"});return(0,Ci.jsxs)("div",{...f,children:[n?(0,Ci.jsx)("math",{display:"block",dangerouslySetInnerHTML:{__html:n}}):"\u200B",r&&(0,Ci.jsx)(km.Popover,{placement:"bottom-start",offset:8,anchor:i,focusOnMount:!1,__unstableSlotName:"__unstable-block-tools-after",children:(0,Ci.jsx)("div",{style:{padding:"4px",minWidth:"300px"},children:(0,Ci.jsxs)(km.__experimentalVStack,{spacing:1,children:[(0,Ci.jsx)(km.TextareaControl,{__next40pxDefaultSize:!0,label:(0,_m.__)("LaTeX math syntax"),hideLabelFromVision:!0,value:a,className:"wp-block-math__textarea-control",onChange:h=>{if(!u){t({latex:h});return}let g="";try{g=u(h,{displayMode:!0}),c(null)}catch(b){c(b.message),(0,MZ.speak)((0,_m.sprintf)((0,_m.__)("Error parsing mathematical expression: %s"),b.message))}t({mathML:g,latex:h})},placeholder:(0,_m.__)("e.g., x^2, \\frac{a}{b}")}),s&&(0,Ci.jsxs)(Ci.Fragment,{children:[(0,Ci.jsx)(xbe,{intent:"error",className:"wp-block-math__error",children:(0,_m.sprintf)((0,_m.__)("Error: %s"),s)}),(0,Ci.jsx)("style",{children:".wp-block-math__error .components-badge__content{white-space:normal}"})]})]})})})]})}var N4={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/math",title:"Math",category:"text",description:"Display mathematical notation using LaTeX.",keywords:["equation","formula","latex","mathematics"],textdomain:"default",supports:{anchor:!0,html:!1,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0},color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,__experimentalDefaultControls:{fontSize:!0}}},attributes:{latex:{type:"string",role:"content"},mathML:{type:"string",source:"html",selector:"math"}}};var RZ=o(T(),1),TE=o(v(),1);function zZ({attributes:e}){let{latex:t,mathML:r}=e;return t?(0,TE.jsx)("div",{...RZ.useBlockProps.save(),children:(0,TE.jsx)("math",{display:"block",dangerouslySetInnerHTML:{__html:r}})}):null}var VZ=o(T(),1),FZ=o(v(),1),wbe={attributes:{latex:{type:"string",role:"content"},mathML:{type:"string",source:"html",selector:"math"}},save({attributes:e}){let{latex:t,mathML:r}=e;return t?(0,FZ.jsx)("math",{...VZ.useBlockProps.save(),display:"block",dangerouslySetInnerHTML:{__html:r}}):null}},HZ=[wbe];var{name:OZ}=N4,jZ={icon:IT,example:{attributes:{latex:"x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}",mathML:'<semantics><mrow><mi>x</mi><mo>=</mo><mfrac><mrow><mo lspace="0em" rspace="0em">\u2212</mo><mi>b</mi><mo>\xB1</mo><msqrt><mrow><msup><mi>b</mi><mn>2</mn></msup><mo>\u2212</mo><mn>4</mn><mi>a</mi><mi>c</mi></mrow></msqrt></mrow><mrow><mn>2</mn><mi>a</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}</annotation></semantics>'},viewportWidth:300},edit:AZ,save:zZ,deprecated:HZ},Cbe=()=>E({name:OZ,metadata:N4,settings:jZ});var RE={};Z(RE,{init:()=>Nbe,metadata:()=>E4,name:()=>sK,settings:()=>A4});var nK=o(P(),1);var iK=o(T(),1),lK=o(W(),1);var E4={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/list-item",title:"List Item",category:"text",parent:["core/list"],allowedBlocks:["core/list"],description:"An individual item within a list.",textdomain:"default",attributes:{placeholder:{type:"string"},content:{type:"rich-text",source:"rich-text",selector:"li",role:"content"}},supports:{anchor:!0,className:!1,splitting:!0,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0},color:{gradients:!0,link:!0,background:!0,__experimentalDefaultControls:{text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},selectors:{root:".wp-block-list > li",border:".wp-block-list:not(.wp-block-list .wp-block-list) > li"}};var rc=o(T(),1),tc=o(P(),1),AE=o(M(),1);var JZ=o(me(),1),eK=o(V(),1),tK=o(As(),1);var UZ=o(U(),1),Nh=o(V(),1),BE=o(T(),1),GZ=o(W(),1);function lu(){let e=(0,Nh.useRegistry)(),{moveBlocksToPosition:t,removeBlock:r,insertBlock:a,updateBlockListSettings:n}=(0,Nh.useDispatch)(BE.store),{getBlockRootClientId:i,getBlockName:l,getBlockOrder:s,getBlockIndex:c,getSelectedBlockClientIds:u,getBlock:m,getBlockListSettings:p}=(0,Nh.useSelect)(BE.store);function d(f){let h=i(f),g=i(h);if(g&&l(g)==="core/list-item")return g}return(0,UZ.useCallback)((f=u())=>{if(Array.isArray(f)||(f=[f]),!f.length)return;let h=f[0];if(l(h)!=="core/list-item")return;let g=d(h);if(!g)return;let b=i(h),y=f[f.length-1],_=s(b).slice(c(y)+1);return e.batch(()=>{if(_.length){let x=s(h)[0];if(!x){let S=(0,GZ.cloneBlock)(m(b),{},[]);x=S.clientId,a(S,0,h,!1),n(x,p(b))}t(_,b,x)}t(f,b,i(g),c(g)+1),s(b).length||r(b,!1)}),!0},[])}var WZ=o(U(),1),D4=o(V(),1),IE=o(T(),1),yv=o(W(),1);function _v(e){let{replaceBlocks:t,selectionChange:r,multiSelect:a}=(0,D4.useDispatch)(IE.store),{getBlock:n,getPreviousBlockClientId:i,getSelectionStart:l,getSelectionEnd:s,hasMultiSelection:c,getMultiSelectedBlockClientIds:u}=(0,D4.useSelect)(IE.store);return(0,WZ.useCallback)(()=>{let m=c(),p=m?u():[e],d=p.map(y=>(0,yv.cloneBlock)(n(y))),f=i(e),h=(0,yv.cloneBlock)(n(f));h.innerBlocks?.length||(h.innerBlocks=[(0,yv.createBlock)("core/list")]),h.innerBlocks[h.innerBlocks.length-1].innerBlocks.push(...d);let g=l(),b=s();return t([f,...p],[h]),m?a(d[0].clientId,d[d.length-1].clientId):r(d[0].clientId,b.attributeKey,b.clientId===g.clientId?g.offset:b.offset,b.offset),!0},[e])}var dd=o(W(),1),$Z=o(U(),1),qZ=o(me(),1),ZZ=o(As(),1),L4=o(V(),1),NE=o(T(),1);function EE(e){let{replaceBlocks:t,selectionChange:r}=(0,L4.useDispatch)(NE.store),{getBlock:a,getBlockRootClientId:n,getBlockIndex:i,getBlockName:l}=(0,L4.useSelect)(NE.store),s=(0,$Z.useRef)(e);s.current=e;let c=lu();return(0,qZ.useRefEffect)(u=>{function m(p){if(p.defaultPrevented||p.keyCode!==ZZ.ENTER)return;let{content:d,clientId:f}=s.current;if(d.length)return;if(p.preventDefault(),l(n(n(s.current.clientId)))==="core/list-item"){c();return}let g=a(n(f)),b=i(f),y=(0,dd.cloneBlock)({...g,innerBlocks:g.innerBlocks.slice(0,b)}),k=(0,dd.createBlock)((0,dd.getDefaultBlockName)()),_=[...g.innerBlocks[b].innerBlocks[0]?.innerBlocks||[],...g.innerBlocks.slice(b+1)],x=_.length?[(0,dd.cloneBlock)({...g,innerBlocks:_})]:[];t(g.clientId,[y,k,...x],1),r(k.clientId)}return u.addEventListener("keydown",m),()=>{u.removeEventListener("keydown",m)}},[])}var KZ=o(me(),1),xv=o(As(),1),QZ=o(T(),1),YZ=o(V(),1);function DE(e){let{getSelectionStart:t,getSelectionEnd:r,getBlockIndex:a}=(0,YZ.useSelect)(QZ.store),n=_v(e),i=lu();return(0,KZ.useRefEffect)(l=>{function s(c){let{keyCode:u,shiftKey:m,altKey:p,metaKey:d,ctrlKey:f}=c;if(c.defaultPrevented||u!==xv.SPACE&&u!==xv.TAB||p||d||f)return;let h=t(),g=r();h.offset===0&&g.offset===0&&(m?u===xv.TAB&&i()&&c.preventDefault():a(e)!==0&&n()&&c.preventDefault())}return l.addEventListener("keydown",s),()=>{l.removeEventListener("keydown",s)}},[e,n])}var Eh=o(V(),1),LE=o(T(),1),XZ=o(W(),1);function ME(e,t){let r=(0,Eh.useRegistry)(),{getPreviousBlockClientId:a,getNextBlockClientId:n,getBlockOrder:i,getBlockRootClientId:l,getBlockName:s,getBlock:c}=(0,Eh.useSelect)(LE.store),{mergeBlocks:u,moveBlocksToPosition:m,removeBlock:p}=(0,Eh.useDispatch)(LE.store),d=lu();function f(y){let k=i(y);return k.length?f(k[k.length-1]):y}function h(y){let k=l(y),_=l(k);if(_&&s(_)==="core/list-item")return _}function g(y){let k=n(y);if(k)return k;let _=h(y);if(_)return g(_)}function b(y){let k=i(y);return k.length?i(k[0])[0]:g(y)}return y=>{function k(_,x){r.batch(()=>{let[S]=i(x);S&&(a(x)===_&&!i(_).length?m([S],x,_):m(i(S),S,l(_))),u(_,x)})}if(y){let _=b(e);if(!_){t(y);return}h(_)?d(_):k(e,_)}else{if(h(e)){d(e);return}let _=a(e);if(_){let S=f(_);k(S,e);return}let x=i(e);(0,XZ.isUnmodifiedBlock)(c(e),"content")&&x.length>0?r.batch(()=>{d(i(x[0])),p(e,!0)}):t(y)}}}var Si=o(v(),1);function Tbe({clientId:e}){let t=_v(e),r=lu(),{canIndent:a,canOutdent:n}=(0,eK.useSelect)(i=>{let{getBlockIndex:l,getBlockRootClientId:s,getBlockName:c}=i(rc.store);return{canIndent:l(e)>0,canOutdent:c(s(s(e)))==="core/list-item"}},[e]);return(0,Si.jsxs)(Si.Fragment,{children:[(0,Si.jsx)(AE.ToolbarButton,{icon:(0,tc.isRTL)()?H0:O0,title:(0,tc.__)("Outdent"),shortcut:tK.displayShortcut.shift("Tab"),description:(0,tc.__)("Outdent list item"),disabled:!n,onClick:()=>r()}),(0,Si.jsx)(AE.ToolbarButton,{icon:(0,tc.isRTL)()?L9:A9,title:(0,tc.__)("Indent"),shortcut:"Tab",description:(0,tc.__)("Indent list item"),disabled:!a,onClick:()=>t()})]})}function rK({attributes:e,setAttributes:t,clientId:r,mergeBlocks:a}){let{placeholder:n,content:i}=e,l=(0,rc.useBlockProps)(),s=(0,rc.useInnerBlocksProps)(l,{renderAppender:!1,__unstableDisableDropZone:!0}),c=EE({content:i,clientId:r}),u=DE(r),m=ME(r,a);return(0,Si.jsxs)(Si.Fragment,{children:[(0,Si.jsxs)("li",{...s,children:[(0,Si.jsx)(rc.RichText,{ref:(0,JZ.useMergeRefs)([c,u]),identifier:"content",tagName:"div",onChange:p=>t({content:p}),value:i,"aria-label":(0,tc.__)("List text"),placeholder:n||(0,tc.__)("List"),onMerge:m}),s.children]}),(0,Si.jsx)(rc.BlockControls,{group:"block",children:(0,Si.jsx)(Tbe,{clientId:r})})]})}var Dh=o(T(),1),kv=o(v(),1);function oK({attributes:e}){return(0,kv.jsxs)("li",{...Dh.useBlockProps.save(),children:[(0,kv.jsx)(Dh.RichText.Content,{value:e.content}),(0,kv.jsx)(Dh.InnerBlocks.Content,{})]})}var M4=o(W(),1),Pbe={to:[{type:"block",blocks:["core/paragraph"],transform:(e,t=[])=>[(0,M4.createBlock)("core/paragraph",e),...t.map(r=>(0,M4.cloneBlock)(r))]}]},aK=Pbe;var{fieldsKey:Bbe,formKey:Ibe}=K(lK.privateApis),{name:sK}=E4,A4={icon:xT,edit:rK,save:oK,merge(e,t){return{...e,content:e.content+t.content}},transforms:aK,[K(iK.privateApis).requiresWrapperOnCopy]:!0,__experimentalLabel(e,{context:t}){let{content:r}=e,a=e?.metadata?.name,n=r?.trim().length>0;if(t==="list-view"&&(a||n))return a||r;if(t==="breadcrumb"&&a)return a}};window.__experimentalContentOnlyInspectorFields&&(A4[Bbe]=[{id:"content",label:(0,nK.__)("Content"),type:"text",Edit:"rich-text"}],A4[Ibe]={fields:["content"]});var Nbe=()=>E({name:sK,metadata:E4,settings:A4});var zE={};Z(zE,{init:()=>Dbe,metadata:()=>z4,name:()=>uK,settings:()=>mK});var R4=o(T(),1),wm=o(M(),1),fd=o(P(),1);var Ti=o(v(),1);function cK({attributes:e,setAttributes:t}){let{displayLoginAsForm:r,redirectToCurrent:a}=e,n=q();return(0,Ti.jsxs)(Ti.Fragment,{children:[(0,Ti.jsx)(R4.InspectorControls,{children:(0,Ti.jsxs)(wm.__experimentalToolsPanel,{label:(0,fd.__)("Settings"),resetAll:()=>{t({displayLoginAsForm:!1,redirectToCurrent:!0})},dropdownMenuProps:n,children:[(0,Ti.jsx)(wm.__experimentalToolsPanelItem,{label:(0,fd.__)("Display login as form"),isShownByDefault:!0,hasValue:()=>r,onDeselect:()=>t({displayLoginAsForm:!1}),children:(0,Ti.jsx)(wm.ToggleControl,{label:(0,fd.__)("Display login as form"),checked:r,onChange:()=>t({displayLoginAsForm:!r})})}),(0,Ti.jsx)(wm.__experimentalToolsPanelItem,{label:(0,fd.__)("Redirect to current URL"),isShownByDefault:!0,hasValue:()=>!a,onDeselect:()=>t({redirectToCurrent:!0}),children:(0,Ti.jsx)(wm.ToggleControl,{label:(0,fd.__)("Redirect to current URL"),checked:a,onChange:()=>t({redirectToCurrent:!a})})})]})}),(0,Ti.jsx)("div",{...(0,R4.useBlockProps)({className:"logged-in"}),children:(0,Ti.jsx)("a",{href:"#login-pseudo-link",children:(0,fd.__)("Log out")})})]})}var z4={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/loginout",title:"Login/out",category:"theme",description:"Show login & logout links.",keywords:["login","logout","form"],textdomain:"default",attributes:{displayLoginAsForm:{type:"boolean",default:!1},redirectToCurrent:{type:"boolean",default:!0}},example:{viewportWidth:350},supports:{anchor:!0,className:!0,color:{background:!0,text:!1,gradients:!0,link:!0},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},interactivity:{clientNavigation:!0}},style:"wp-block-loginout"};var{name:uK}=z4,mK={icon:CT,edit:cK},Dbe=()=>E({name:uK,metadata:z4,settings:mK});var UE={};Z(UE,{init:()=>tye,metadata:()=>q4,name:()=>LK,settings:()=>Z4});var Sv=o(P(),1);var DK=o(W(),1);var pr=o(T(),1),VE=o(me(),1);var pK=o(P(),1),oc="full",wv=15,V4="none",F4="media",H4="attachment",dK=[["core/paragraph",{placeholder:(0,pK._x)("Content\u2026","content placeholder")}]];var we=o(v(),1),O4=(e,t)=>e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${t.x*100}% ${t.y*100}%`:"50% 50%"}:{},fK=(e,t)=>e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${Math.round(t.x*100)}% ${Math.round(t.y*100)}%`:"50% 50%"}:{},hd=50,ac=()=>{},hK=e=>{if(!e.customBackgroundColor)return e;let t={color:{background:e.customBackgroundColor}},{customBackgroundColor:r,...a}=e;return{...a,style:t}},Lh=e=>e.align?e:{...e,align:"wide"},j4={align:{type:"string",default:"wide"},mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:""},mediaPosition:{type:"string",default:"left"},mediaId:{type:"number"},mediaType:{type:"string"},mediaWidth:{type:"number",default:50},isStackedOnMobile:{type:"boolean",default:!1}},FE={...j4,isStackedOnMobile:{type:"boolean",default:!0},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},mediaSizeSlug:{type:"string"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},gK={...FE,mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:"",role:"content"},mediaId:{type:"number",role:"content"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src",role:"content"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href",role:"content"},mediaType:{type:"string",role:"content"}},Lbe={...gK,align:{type:"string",default:"none"},useFeaturedImage:{type:"boolean",default:!1}},HE={anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0}},vK={...HE,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},Mbe={...vK,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},interactivity:{clientNavigation:!0}},Abe={attributes:Lbe,supports:Mbe,usesContext:["postId","postType"],save({attributes:e}){let{isStackedOnMobile:t,mediaAlt:r,mediaPosition:a,mediaType:n,mediaUrl:i,mediaWidth:l,mediaId:s,verticalAlignment:c,imageFill:u,focalPoint:m,linkClass:p,href:d,linkTarget:f,rel:h}=e,g=e.mediaSizeSlug||oc,b=h||void 0,y=w({[`wp-image-${s}`]:s&&n==="image",[`size-${g}`]:s&&n==="image"}),k=i?(0,we.jsx)("img",{src:i,alt:r,className:y||null}):null;d&&(k=(0,we.jsx)("a",{className:p,href:d,target:f,rel:b,children:k}));let _={image:()=>k,video:()=>(0,we.jsx)("video",{controls:!0,src:i})},x=w({"has-media-on-the-right":a==="right","is-stacked-on-mobile":t,[`is-vertically-aligned-${c}`]:c,"is-image-fill":u}),S=u?fK(i,m):{},C;l!==hd&&(C=a==="right"?`auto ${l}%`:`${l}% auto`);let N={gridTemplateColumns:C};return a==="right"?(0,we.jsxs)("div",{...pr.useBlockProps.save({className:x,style:N}),children:[(0,we.jsx)("div",{...pr.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,we.jsx)("figure",{className:"wp-block-media-text__media",style:S,children:(_[n]||ac)()})]}):(0,we.jsxs)("div",{...pr.useBlockProps.save({className:x,style:N}),children:[(0,we.jsx)("figure",{className:"wp-block-media-text__media",style:S,children:(_[n]||ac)()}),(0,we.jsx)("div",{...pr.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})}},Rbe={attributes:gK,supports:vK,save({attributes:e}){let{isStackedOnMobile:t,mediaAlt:r,mediaPosition:a,mediaType:n,mediaUrl:i,mediaWidth:l,mediaId:s,verticalAlignment:c,imageFill:u,focalPoint:m,linkClass:p,href:d,linkTarget:f,rel:h}=e,g=e.mediaSizeSlug||oc,b=h||void 0,y=w({[`wp-image-${s}`]:s&&n==="image",[`size-${g}`]:s&&n==="image"}),k=(0,we.jsx)("img",{src:i,alt:r,className:y||null});d&&(k=(0,we.jsx)("a",{className:p,href:d,target:f,rel:b,children:k}));let _={image:()=>k,video:()=>(0,we.jsx)("video",{controls:!0,src:i})},x=w({"has-media-on-the-right":a==="right","is-stacked-on-mobile":t,[`is-vertically-aligned-${c}`]:c,"is-image-fill":u}),S=u?fK(i,m):{},C;l!==hd&&(C=a==="right"?`auto ${l}%`:`${l}% auto`);let N={gridTemplateColumns:C};return a==="right"?(0,we.jsxs)("div",{...pr.useBlockProps.save({className:x,style:N}),children:[(0,we.jsx)("div",{...pr.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,we.jsx)("figure",{className:"wp-block-media-text__media",style:S,children:(_[n]||ac)()})]}):(0,we.jsxs)("div",{...pr.useBlockProps.save({className:x,style:N}),children:[(0,we.jsx)("figure",{className:"wp-block-media-text__media",style:S,children:(_[n]||ac)()}),(0,we.jsx)("div",{...pr.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})},migrate:Lh,isEligible(e,t,{block:r}){let{attributes:a}=r;return e.align===void 0&&!!a.className?.includes("alignwide")}},zbe={attributes:FE,supports:HE,save({attributes:e}){let{isStackedOnMobile:t,mediaAlt:r,mediaPosition:a,mediaType:n,mediaUrl:i,mediaWidth:l,mediaId:s,verticalAlignment:c,imageFill:u,focalPoint:m,linkClass:p,href:d,linkTarget:f,rel:h}=e,g=e.mediaSizeSlug||oc,b=h||void 0,y=w({[`wp-image-${s}`]:s&&n==="image",[`size-${g}`]:s&&n==="image"}),k=(0,we.jsx)("img",{src:i,alt:r,className:y||null});d&&(k=(0,we.jsx)("a",{className:p,href:d,target:f,rel:b,children:k}));let _={image:()=>k,video:()=>(0,we.jsx)("video",{controls:!0,src:i})},x=w({"has-media-on-the-right":a==="right","is-stacked-on-mobile":t,[`is-vertically-aligned-${c}`]:c,"is-image-fill":u}),S=u?O4(i,m):{},C;l!==hd&&(C=a==="right"?`auto ${l}%`:`${l}% auto`);let N={gridTemplateColumns:C};return a==="right"?(0,we.jsxs)("div",{...pr.useBlockProps.save({className:x,style:N}),children:[(0,we.jsx)("div",{...pr.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,we.jsx)("figure",{className:"wp-block-media-text__media",style:S,children:(_[n]||ac)()})]}):(0,we.jsxs)("div",{...pr.useBlockProps.save({className:x,style:N}),children:[(0,we.jsx)("figure",{className:"wp-block-media-text__media",style:S,children:(_[n]||ac)()}),(0,we.jsx)("div",{...pr.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})},migrate:Lh},Vbe={attributes:FE,supports:HE,save({attributes:e}){let{isStackedOnMobile:t,mediaAlt:r,mediaPosition:a,mediaType:n,mediaUrl:i,mediaWidth:l,mediaId:s,verticalAlignment:c,imageFill:u,focalPoint:m,linkClass:p,href:d,linkTarget:f,rel:h}=e,g=e.mediaSizeSlug||oc,b=h||void 0,y=w({[`wp-image-${s}`]:s&&n==="image",[`size-${g}`]:s&&n==="image"}),k=(0,we.jsx)("img",{src:i,alt:r,className:y||null});d&&(k=(0,we.jsx)("a",{className:p,href:d,target:f,rel:b,children:k}));let _={image:()=>k,video:()=>(0,we.jsx)("video",{controls:!0,src:i})},x=w({"has-media-on-the-right":a==="right","is-stacked-on-mobile":t,[`is-vertically-aligned-${c}`]:c,"is-image-fill":u}),S=u?O4(i,m):{},C;l!==hd&&(C=a==="right"?`auto ${l}%`:`${l}% auto`);let N={gridTemplateColumns:C};return(0,we.jsxs)("div",{...pr.useBlockProps.save({className:x,style:N}),children:[(0,we.jsx)("figure",{className:"wp-block-media-text__media",style:S,children:(_[n]||ac)()}),(0,we.jsx)("div",{...pr.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})},migrate:Lh},Fbe={attributes:{...j4,isStackedOnMobile:{type:"boolean",default:!0},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},migrate:(0,VE.compose)(hK,Lh),save({attributes:e}){let{backgroundColor:t,customBackgroundColor:r,isStackedOnMobile:a,mediaAlt:n,mediaPosition:i,mediaType:l,mediaUrl:s,mediaWidth:c,mediaId:u,verticalAlignment:m,imageFill:p,focalPoint:d,linkClass:f,href:h,linkTarget:g,rel:b}=e,y=b||void 0,k=(0,we.jsx)("img",{src:s,alt:n,className:u&&l==="image"?`wp-image-${u}`:null});h&&(k=(0,we.jsx)("a",{className:f,href:h,target:g,rel:y,children:k}));let _={image:()=>k,video:()=>(0,we.jsx)("video",{controls:!0,src:s})},x=(0,pr.getColorClassName)("background-color",t),S=w({"has-media-on-the-right":i==="right","has-background":x||r,[x]:x,"is-stacked-on-mobile":a,[`is-vertically-aligned-${m}`]:m,"is-image-fill":p}),C=p?O4(s,d):{},N;return c!==hd&&(N=i==="right"?`auto ${c}%`:`${c}% auto`),(0,we.jsxs)("div",{className:S,style:{backgroundColor:x?void 0:r,gridTemplateColumns:N},children:[(0,we.jsx)("figure",{className:"wp-block-media-text__media",style:C,children:(_[l]||ac)()}),(0,we.jsx)("div",{className:"wp-block-media-text__content",children:(0,we.jsx)(pr.InnerBlocks.Content,{})})]})}},Hbe={attributes:{...j4,backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},migrate:(0,VE.compose)(hK,Lh),save({attributes:e}){let{backgroundColor:t,customBackgroundColor:r,isStackedOnMobile:a,mediaAlt:n,mediaPosition:i,mediaType:l,mediaUrl:s,mediaWidth:c,mediaId:u,verticalAlignment:m,imageFill:p,focalPoint:d}=e,f={image:()=>(0,we.jsx)("img",{src:s,alt:n,className:u&&l==="image"?`wp-image-${u}`:null}),video:()=>(0,we.jsx)("video",{controls:!0,src:s})},h=(0,pr.getColorClassName)("background-color",t),g=w({"has-media-on-the-right":i==="right",[h]:h,"is-stacked-on-mobile":a,[`is-vertically-aligned-${m}`]:m,"is-image-fill":p}),b=p?O4(s,d):{},y;return c!==hd&&(y=i==="right"?`auto ${c}%`:`${c}% auto`),(0,we.jsxs)("div",{className:g,style:{backgroundColor:h?void 0:r,gridTemplateColumns:y},children:[(0,we.jsx)("figure",{className:"wp-block-media-text__media",style:b,children:(f[l]||ac)()}),(0,we.jsx)("div",{className:"wp-block-media-text__content",children:(0,we.jsx)(pr.InnerBlocks.Content,{})})]})}},Obe={attributes:{...j4,backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"}},migrate:Lh,save({attributes:e}){let{backgroundColor:t,customBackgroundColor:r,isStackedOnMobile:a,mediaAlt:n,mediaPosition:i,mediaType:l,mediaUrl:s,mediaWidth:c}=e,u={image:()=>(0,we.jsx)("img",{src:s,alt:n}),video:()=>(0,we.jsx)("video",{controls:!0,src:s})},m=(0,pr.getColorClassName)("background-color",t),p=w({"has-media-on-the-right":i==="right",[m]:m,"is-stacked-on-mobile":a}),d;return c!==hd&&(d=i==="right"?`auto ${c}%`:`${c}% auto`),(0,we.jsxs)("div",{className:p,style:{backgroundColor:m?void 0:r,gridTemplateColumns:d},children:[(0,we.jsx)("figure",{className:"wp-block-media-text__media",children:(u[l]||ac)()}),(0,we.jsx)("div",{className:"wp-block-media-text__content",children:(0,we.jsx)(pr.InnerBlocks.Content,{})})]})}},bK=[Abe,Rbe,zbe,Vbe,Fbe,Hbe,Obe];var na=o(P(),1),G4=o(V(),1),W4=o(U(),1),Lo=o(T(),1),Er=o(M(),1),$4=o(Rr(),1);var Cv=o(Q(),1);var Mh=o(M(),1),nc=o(T(),1),_K=o(P(),1),xK=o(me(),1),OE=o(V(),1),jE=o(U(),1),kK=o(Rr(),1),wK=o(xr(),1);function U4(e,t){return e?{objectPosition:t?`${Math.round(t.x*100)}% ${Math.round(t.y*100)}%`:"50% 50%"}:{}}var Ia=o(v(),1),CK=["image","video"],jbe=()=>{},Ube=(0,jE.forwardRef)(({isSelected:e,isStackedOnMobile:t,...r},a)=>{let n=(0,xK.useViewportMatch)("small","<");return(0,Ia.jsx)(Mh.ResizableBox,{ref:a,showHandle:e&&(!n||!t),...r})});function Gbe({mediaId:e,mediaUrl:t,onSelectMedia:r,toggleUseFeaturedImage:a,useFeaturedImage:n}){return(0,Ia.jsx)(nc.BlockControls,{group:"other",children:(0,Ia.jsx)(nc.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:CK,onSelect:r,onToggleFeaturedImage:a,useFeaturedImage:n,onReset:()=>r(void 0)})})}function yK({className:e,mediaUrl:t,onSelectMedia:r,toggleUseFeaturedImage:a}){let{createErrorNotice:n}=(0,OE.useDispatch)(wK.store),i=l=>{n(l,{type:"snackbar"})};return(0,Ia.jsx)(nc.MediaPlaceholder,{icon:(0,Ia.jsx)(nc.BlockIcon,{icon:$0}),labels:{title:(0,_K.__)("Media area")},className:e,onSelect:r,onToggleFeaturedImage:a,allowedTypes:CK,onError:i,disableMediaButtons:t})}function Wbe(e,t){let{className:r,commitWidthChange:a,focalPoint:n,imageFill:i,isSelected:l,isStackedOnMobile:s,mediaAlt:c,mediaId:u,mediaPosition:m,mediaType:p,mediaUrl:d,mediaWidth:f,onSelectMedia:h,onWidthChange:g,enableResize:b,toggleUseFeaturedImage:y,useFeaturedImage:k,featuredImageURL:_,featuredImageAlt:x,refMedia:S}=e,C=!u&&(0,kK.isBlobURL)(d),{toggleSelection:N}=(0,OE.useDispatch)(nc.store);if(d||_||k){let B=()=>{N(!1)},D=(I,R,$)=>{g(parseInt($.style.width))},A=(I,R,$)=>{N(!0),a(parseInt($.style.width))},H={right:b&&m==="left",left:b&&m==="right"},F=p==="image"&&i?U4(d||_,n):{},z={image:()=>k&&_?(0,Ia.jsx)("img",{ref:S,src:_,alt:x,style:F}):d&&(0,Ia.jsx)("img",{ref:S,src:d,alt:c,style:F}),video:()=>(0,Ia.jsx)("video",{controls:!0,ref:S,src:d})};return(0,Ia.jsxs)(Ube,{as:"figure",className:w(r,"editor-media-container__resizer",{"is-transient":C}),size:{width:f+"%"},minWidth:"10%",maxWidth:"100%",enable:H,onResizeStart:B,onResize:D,onResizeStop:A,axis:"x",isSelected:l,isStackedOnMobile:s,ref:t,children:[(0,Ia.jsx)(Gbe,{onSelectMedia:h,mediaUrl:k&&_?_:d,mediaId:u,toggleUseFeaturedImage:y,useFeaturedImage:k}),(z[p]||jbe)(),C&&(0,Ia.jsx)(Mh.Spinner,{}),!k&&(0,Ia.jsx)(yK,{...e}),!_&&k&&(0,Ia.jsx)(Mh.Placeholder,{className:"wp-block-media-text--placeholder-image",style:F,withIllustration:!0})]})}return(0,Ia.jsx)(yK,{...e})}var SK=(0,jE.forwardRef)(Wbe);var lt=o(v(),1),{ResolutionTool:$be}=K(Lo.privateApis),TK=e=>Math.max(wv,Math.min(e,100-wv));function PK(e,t){return e?.media_details?.sizes?.[t]?.source_url}function qbe({attributes:{linkDestination:e,href:t},setAttributes:r}){return a=>{if(!a||!a.url){r({mediaAlt:void 0,mediaId:void 0,mediaType:void 0,mediaUrl:void 0,mediaLink:void 0,href:void 0,focalPoint:void 0,useFeaturedImage:!1});return}(0,$4.isBlobURL)(a.url)&&(a.type=(0,$4.getBlobTypeByURL)(a.url));let n,i;a.media_type?a.media_type==="image"?n="image":n="video":n=a.type,n==="image"&&(i=a.sizes?.large?.url||a.media_details?.sizes?.large?.source_url);let l=e,s=t;if(n==="image"){if(!l)switch(window?.wp?.media?.view?.settings?.defaultProps?.link||V4){case"file":case F4:l=F4;break;case"post":case H4:l=H4;break;case V4:default:l=V4;break}switch(l){case F4:s=a.url;break;case H4:s=a.link;break}}r({mediaAlt:a.alt,mediaId:a.id,mediaType:n,mediaUrl:i||a.url,mediaLink:a.link||void 0,href:s,linkDestination:l,focalPoint:void 0,useFeaturedImage:!1})}}function Zbe({image:e,value:t,onChange:r}){let{imageSizes:a}=(0,G4.useSelect)(i=>{let{getSettings:l}=i(Lo.store);return{imageSizes:l().imageSizes}},[]);if(!a?.length)return null;let n=a.filter(({slug:i})=>PK(e,i)).map(({name:i,slug:l})=>({value:l,label:i}));return(0,lt.jsx)($be,{value:t,defaultValue:oc,options:n,onChange:r})}function Kbe({attributes:e,isSelected:t,setAttributes:r,context:{postId:a,postType:n}}){let{focalPoint:i,href:l,imageFill:s,isStackedOnMobile:c,linkClass:u,linkDestination:m,linkTarget:p,mediaAlt:d,mediaId:f,mediaPosition:h,mediaType:g,mediaUrl:b,mediaWidth:y,mediaSizeSlug:k,rel:_,verticalAlignment:x,allowedBlocks:S,useFeaturedImage:C}=e,[N]=(0,Cv.useEntityProp)("postType",n,"featured_media",a),{featuredImageMedia:B}=(0,G4.useSelect)(ie=>({featuredImageMedia:N&&C?ie(Cv.store).getEntityRecord("postType","attachment",N,{context:"view"}):void 0}),[N,C]),{image:D}=(0,G4.useSelect)(ie=>({image:f&&t?ie(Cv.store).getEntityRecord("postType","attachment",f,{context:"view"}):null}),[t,f]),A=C?B?.source_url:"",H=C?B?.alt_text:"",F=()=>{r({imageFill:!1,mediaType:"image",mediaId:void 0,mediaUrl:void 0,mediaAlt:void 0,mediaLink:void 0,linkDestination:void 0,linkTarget:void 0,linkClass:void 0,rel:void 0,href:void 0,useFeaturedImage:!C})},z=(0,W4.useRef)(),I=ie=>{let{style:fe}=z.current,{x:ke,y:je}=ie;fe.objectPosition=`${ke*100}% ${je*100}%`},[R,$]=(0,W4.useState)(null),j=qbe({attributes:e,setAttributes:r}),G=ie=>{r(ie)},O=ie=>{$(TK(ie))},J=ie=>{r({mediaWidth:TK(ie)}),$(null)},ee=w({"has-media-on-the-right":h==="right","is-selected":t,"is-stacked-on-mobile":c,[`is-vertically-aligned-${x}`]:x,"is-image-fill-element":s}),oe=`${R||y}%`,X=h==="right"?`1fr ${oe}`:`${oe} 1fr`,te={gridTemplateColumns:X,msGridColumns:X},ne=ie=>{r({mediaAlt:ie})},le=ie=>{r({verticalAlignment:ie})},pe=ie=>{let fe=PK(D,ie);if(!fe)return null;r({mediaUrl:fe,mediaSizeSlug:ie})},Ie=q(),Ne=(0,lt.jsxs)(Er.__experimentalToolsPanel,{label:(0,na.__)("Settings"),resetAll:()=>{r({isStackedOnMobile:!0,imageFill:!1,mediaAlt:"",focalPoint:void 0,mediaWidth:50}),pe(oc)},dropdownMenuProps:Ie,children:[(0,lt.jsx)(Er.__experimentalToolsPanelItem,{label:(0,na.__)("Media width"),isShownByDefault:!0,hasValue:()=>y!==50,onDeselect:()=>r({mediaWidth:50}),children:(0,lt.jsx)(Er.RangeControl,{__next40pxDefaultSize:!0,label:(0,na.__)("Media width"),value:R||y,onChange:J,min:wv,max:100-wv})}),(0,lt.jsx)(Er.__experimentalToolsPanelItem,{label:(0,na.__)("Stack on mobile"),isShownByDefault:!0,hasValue:()=>!c,onDeselect:()=>r({isStackedOnMobile:!0}),children:(0,lt.jsx)(Er.ToggleControl,{label:(0,na.__)("Stack on mobile"),checked:c,onChange:()=>r({isStackedOnMobile:!c})})}),g==="image"&&(0,lt.jsx)(Er.__experimentalToolsPanelItem,{label:(0,na.__)("Crop image to fill"),isShownByDefault:!0,hasValue:()=>!!s,onDeselect:()=>r({imageFill:!1}),children:(0,lt.jsx)(Er.ToggleControl,{label:(0,na.__)("Crop image to fill"),checked:!!s,onChange:()=>r({imageFill:!s})})}),s&&(b||A)&&g==="image"&&(0,lt.jsx)(Er.__experimentalToolsPanelItem,{label:(0,na.__)("Focal point"),isShownByDefault:!0,hasValue:()=>!!i,onDeselect:()=>r({focalPoint:void 0}),children:(0,lt.jsx)(Er.FocalPointPicker,{label:(0,na.__)("Focal point"),url:C&&A?A:b,value:i,onChange:ie=>r({focalPoint:ie}),onDragStart:I,onDrag:I})}),g==="image"&&b&&!C&&(0,lt.jsx)(Er.__experimentalToolsPanelItem,{label:(0,na.__)("Alternative text"),isShownByDefault:!0,hasValue:()=>!!d,onDeselect:()=>r({mediaAlt:""}),children:(0,lt.jsx)(Er.TextareaControl,{label:(0,na.__)("Alternative text"),value:d,onChange:ne,help:(0,lt.jsxs)(lt.Fragment,{children:[(0,lt.jsx)(Er.ExternalLink,{href:(0,na.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),children:(0,na.__)("Describe the purpose of the image.")}),(0,lt.jsx)("br",{}),(0,na.__)("Leave empty if decorative.")]})})}),g==="image"&&!C&&(0,lt.jsx)(Zbe,{image:D,value:k,onChange:pe})]}),ae=(0,Lo.useBlockProps)({className:ee,style:te}),Re=(0,Lo.useInnerBlocksProps)({className:"wp-block-media-text__content"},{template:dK,allowedBlocks:S}),Ee=(0,Lo.useBlockEditingMode)();return(0,lt.jsxs)(lt.Fragment,{children:[(0,lt.jsx)(Lo.InspectorControls,{children:Ne}),(0,lt.jsxs)(Lo.BlockControls,{group:"block",children:[Ee==="default"&&(0,lt.jsxs)(lt.Fragment,{children:[(0,lt.jsx)(Lo.BlockVerticalAlignmentControl,{onChange:le,value:x}),(0,lt.jsx)(Er.ToolbarButton,{icon:PP,title:(0,na.__)("Show media on left"),isActive:h==="left",onClick:()=>r({mediaPosition:"left"})}),(0,lt.jsx)(Er.ToolbarButton,{icon:IP,title:(0,na.__)("Show media on right"),isActive:h==="right",onClick:()=>r({mediaPosition:"right"})})]}),g==="image"&&!C&&(0,lt.jsx)(Lo.__experimentalImageURLInputUI,{url:l||"",onChangeUrl:G,linkDestination:m,mediaType:g,mediaUrl:D&&D.source_url,mediaLink:D&&D.link,linkTarget:p,linkClass:u,rel:_})]}),(0,lt.jsxs)("div",{...ae,children:[h==="right"&&(0,lt.jsx)("div",{...Re}),(0,lt.jsx)(SK,{className:"wp-block-media-text__media",onSelectMedia:j,onWidthChange:O,commitWidthChange:J,refMedia:z,enableResize:Ee==="default",toggleUseFeaturedImage:F,focalPoint:i,imageFill:s,isSelected:t,isStackedOnMobile:c,mediaAlt:d,mediaId:f,mediaPosition:h,mediaType:g,mediaUrl:b,mediaWidth:y,useFeaturedImage:C,featuredImageURL:A,featuredImageAlt:H}),h!=="right"&&(0,lt.jsx)("div",{...Re})]})]})}var BK=Kbe;var q4={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/media-text",title:"Media & Text",category:"media",description:"Set media and words side-by-side for a richer layout.",keywords:["image","video"],textdomain:"default",attributes:{align:{type:"string",default:"none"},mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:"",role:"content"},mediaPosition:{type:"string",default:"left"},mediaId:{type:"number",role:"content"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src",role:"content"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href",role:"content"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},mediaType:{type:"string",role:"content"},mediaWidth:{type:"number",default:50},mediaSizeSlug:{type:"string"},isStackedOnMobile:{type:"boolean",default:!0},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"},useFeaturedImage:{type:"boolean",default:!1}},usesContext:["postId","postType"],supports:{anchor:!0,align:["wide","full"],html:!1,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},allowedBlocks:!0},editorStyle:"wp-block-media-text-editor",style:"wp-block-media-text"};var Ah=o(T(),1);var ns=o(v(),1),Ybe=50,IK=()=>{};function NK({attributes:e}){let{isStackedOnMobile:t,mediaAlt:r,mediaPosition:a,mediaType:n,mediaUrl:i,mediaWidth:l,mediaId:s,verticalAlignment:c,imageFill:u,focalPoint:m,linkClass:p,href:d,linkTarget:f,rel:h}=e,g=e.mediaSizeSlug||oc,b=h||void 0,y=w({[`wp-image-${s}`]:s&&n==="image",[`size-${g}`]:s&&n==="image"}),k=u?U4(i,m):{},_=i?(0,ns.jsx)("img",{src:i,alt:r,className:y||null,style:k}):null;d&&(_=(0,ns.jsx)("a",{className:p,href:d,target:f,rel:b,children:_}));let x={image:()=>_,video:()=>(0,ns.jsx)("video",{controls:!0,src:i})},S=w({"has-media-on-the-right":a==="right","is-stacked-on-mobile":t,[`is-vertically-aligned-${c}`]:c,"is-image-fill-element":u}),C;l!==Ybe&&(C=a==="right"?`auto ${l}%`:`${l}% auto`);let N={gridTemplateColumns:C};return a==="right"?(0,ns.jsxs)("div",{...Ah.useBlockProps.save({className:S,style:N}),children:[(0,ns.jsx)("div",{...Ah.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,ns.jsx)("figure",{className:"wp-block-media-text__media",children:(x[n]||IK)()})]}):(0,ns.jsxs)("div",{...Ah.useBlockProps.save({className:S,style:N}),children:[(0,ns.jsx)("figure",{className:"wp-block-media-text__media",children:(x[n]||IK)()}),(0,ns.jsx)("div",{...Ah.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})}var gd=o(W(),1),Xbe={from:[{type:"block",blocks:["core/image"],transform:({alt:e,url:t,id:r,anchor:a})=>(0,gd.createBlock)("core/media-text",{mediaAlt:e,mediaId:r,mediaUrl:t,mediaType:"image",anchor:a})},{type:"block",blocks:["core/video"],transform:({src:e,id:t,anchor:r})=>(0,gd.createBlock)("core/media-text",{mediaId:t,mediaUrl:e,mediaType:"video",anchor:r})},{type:"block",blocks:["core/cover"],transform:({align:e,alt:t,anchor:r,backgroundType:a,customGradient:n,customOverlayColor:i,gradient:l,id:s,overlayColor:c,style:u,textColor:m,url:p,useFeaturedImage:d},f)=>{let h={};return n?h={style:{color:{gradient:n}}}:i&&(h={style:{color:{background:i}}}),u?.color?.text&&(h.style={color:{...h.style?.color,text:u.color.text}}),(0,gd.createBlock)("core/media-text",{align:e,anchor:r,backgroundColor:c,gradient:l,mediaAlt:t,mediaId:s,mediaType:a,mediaUrl:p,textColor:m,useFeaturedImage:d,...h},f)}}],to:[{type:"block",blocks:["core/image"],isMatch:({mediaType:e,mediaUrl:t})=>!t||e==="image",transform:({mediaAlt:e,mediaId:t,mediaUrl:r,anchor:a})=>(0,gd.createBlock)("core/image",{alt:e,id:t,url:r,anchor:a})},{type:"block",blocks:["core/video"],isMatch:({mediaType:e,mediaUrl:t})=>!t||e==="video",transform:({mediaId:e,mediaUrl:t,anchor:r})=>(0,gd.createBlock)("core/video",{id:e,src:t,anchor:r})},{type:"block",blocks:["core/cover"],transform:({align:e,anchor:t,backgroundColor:r,focalPoint:a,gradient:n,mediaAlt:i,mediaId:l,mediaType:s,mediaUrl:c,style:u,textColor:m,useFeaturedImage:p},d)=>{let f={};u?.color?.gradient?f.customGradient=u.color.gradient:u?.color?.background&&(f.customOverlayColor=u.color.background),u?.color?.text&&(f.style={color:{text:u.color.text}});let h={align:e,alt:i,anchor:t,backgroundType:s,dimRatio:c||p?50:100,focalPoint:a,gradient:n,id:l,overlayColor:r,textColor:m,url:c,useFeaturedImage:p,...f};return(0,gd.createBlock)("core/cover",h,d)}}]},EK=Xbe;var{fieldsKey:Jbe,formKey:eye}=K(DK.privateApis),{name:LK}=q4,Z4={icon:ET,example:{viewportWidth:601,attributes:{mediaType:"image",mediaUrl:"https://s.w.org/images/core/5.3/Biologia_Centrali-Americana_-_Cantorchilus_semibadius_1902.jpg"},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,Sv.__)("The wren<br>Earns his living<br>Noiselessly.")}},{name:"core/paragraph",attributes:{content:(0,Sv.__)("\u2014 Kobayashi Issa (\u4E00\u8336)")}}]},transforms:EK,edit:BK,save:NK,deprecated:bK};window.__experimentalContentOnlyInspectorFields&&(Z4[Jbe]=[{id:"media",label:(0,Sv.__)("Media"),type:"media",Edit:{control:"media",allowedTypes:["image","video"],multiple:!1},getValue:({item:e})=>({id:e.mediaId,url:e.mediaUrl,mediaType:e.mediaType,link:e.mediaLink}),setValue:({value:e})=>({mediaId:e.id,mediaUrl:e.url,mediaType:e.mediaType,mediaLink:e.link})},{id:"link",label:(0,Sv.__)("Link"),type:"url",Edit:"link",getValue:({item:e})=>({url:e.href,rel:e.rel,linkTarget:e.linkTarget}),setValue:({value:e})=>({href:e.url,rel:e.rel,linkTarget:e.linkTarget})}],Z4[eye]={fields:["media","link"]});var tye=()=>E({name:LK,metadata:q4,settings:Z4});var GE={};Z(GE,{init:()=>oye,metadata:()=>Q4,name:()=>Tv,settings:()=>UK});var jK=o(W(),1);var su=o(P(),1),MK=o(U(),1),AK=o(M(),1),RK=o(W(),1),K4=o(V(),1),vd=o(T(),1),zK=o(ai(),1),Rh=o(v(),1);function VK({attributes:e,clientId:t}){let{originalName:r,originalUndelimitedContent:a}=e,n=!!a,{hasFreeformBlock:i,hasHTMLBlock:l}=(0,K4.useSelect)(d=>{let{canInsertBlockType:f,getBlockRootClientId:h}=d(vd.store);return{hasFreeformBlock:f("core/freeform",h(t)),hasHTMLBlock:f("core/html",h(t))}},[t]),{replaceBlock:s}=(0,K4.useDispatch)(vd.store);function c(){s(t,(0,RK.createBlock)("core/html",{content:a}))}let u=[],m,p=(0,Rh.jsx)(AK.Button,{__next40pxDefaultSize:!0,onClick:c,variant:"primary",children:(0,su.__)("Keep as HTML")},"convert");return n&&!i&&(!r||r==="core/freeform")?l?(m=(0,su.__)("It appears you are trying to use the deprecated Classic block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely. Alternatively, if you have unsaved changes, you can save them and refresh to use the Classic block."),u.push(p)):m=(0,su.__)("It appears you are trying to use the deprecated Classic block. You can leave this block intact, or remove it entirely. Alternatively, if you have unsaved changes, you can save them and refresh to use the Classic block."):n&&l?(m=(0,su.sprintf)((0,su.__)('Your site doesn\u2019t include support for the "%s" block. You can leave it as-is, convert it to custom HTML, or remove it.'),r),u.push(p)):m=(0,su.sprintf)((0,su.__)('Your site doesn\u2019t include support for the "%s" block. You can leave it as-is or remove it.'),r),(0,Rh.jsxs)("div",{...(0,vd.useBlockProps)({className:"has-warning"}),children:[(0,Rh.jsx)(vd.Warning,{actions:u,children:m}),(0,Rh.jsx)(MK.RawHTML,{children:(0,zK.safeHTML)(a)})]})}var Q4={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/missing",title:"Unsupported",category:"text",description:"Your site doesn\u2019t include support for this block.",textdomain:"default",attributes:{originalName:{type:"string"},originalUndelimitedContent:{type:"string"},originalContent:{type:"string",source:"raw"}},supports:{className:!1,customClassName:!1,inserter:!1,html:!1,lock:!1,reusable:!1,renaming:!1,visibility:!1,interactivity:{clientNavigation:!0},customCSS:!1}};var FK=o(U(),1),HK=o(v(),1);function OK({attributes:e}){return(0,HK.jsx)(FK.RawHTML,{children:e.originalContent})}var{name:Tv}=Q4,UK={name:Tv,__experimentalLabel(e,{context:t}){if(t==="accessibility"){let{originalName:r}=e,a=r?(0,jK.getBlockType)(r):void 0;return a?a.settings.title||r:""}},edit:VK,save:OK},oye=()=>E({name:Tv,metadata:Q4,settings:UK});var WE={};Z(WE,{init:()=>cye,metadata:()=>X4,name:()=>XK,settings:()=>J4});var QK=o(P(),1),YK=o(W(),1);var Cm=o(P(),1),zh=o(M(),1),Vh=o(T(),1),Y4=o(W(),1);var is=o(v(),1),aye=(0,Cm.__)("Read more");function GK({attributes:{customText:e,noTeaser:t},insertBlocksAfter:r,setAttributes:a}){let n=q();return(0,is.jsxs)(is.Fragment,{children:[(0,is.jsx)(Vh.InspectorControls,{children:(0,is.jsx)(zh.__experimentalToolsPanel,{label:(0,Cm.__)("Settings"),resetAll:()=>{a({noTeaser:!1})},dropdownMenuProps:n,children:(0,is.jsx)(zh.__experimentalToolsPanelItem,{label:(0,Cm.__)("Hide excerpt"),isShownByDefault:!0,hasValue:()=>t,onDeselect:()=>a({noTeaser:!1}),children:(0,is.jsx)(zh.ToggleControl,{label:(0,Cm.__)("Hide the excerpt on the full content page"),checked:!!t,onChange:()=>a({noTeaser:!t}),help:i=>i?(0,Cm.__)("The excerpt is hidden."):(0,Cm.__)("The excerpt is visible.")})})})}),(0,is.jsx)("div",{...(0,Vh.useBlockProps)(),children:(0,is.jsx)(Vh.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,Cm.__)('"Read more" text'),value:e,placeholder:aye,onChange:i=>a({customText:i}),disableLineBreaks:!0,__unstableOnSplitAtEnd:()=>r((0,Y4.createBlock)((0,Y4.getDefaultBlockName)()))})})]})}var X4={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/more",title:"More",category:"design",description:"Content before this block will be shown in the excerpt on your archives page.",keywords:["read more"],textdomain:"default",attributes:{customText:{type:"string",default:"",role:"content"},noTeaser:{type:"boolean",default:!1}},supports:{customClassName:!1,className:!1,html:!1,multiple:!1,visibility:!1,interactivity:{clientNavigation:!0},customCSS:!1},editorStyle:"wp-block-more-editor"};var WK=o(U(),1),$K=o(v(),1);function qK({attributes:{customText:e,noTeaser:t}}){let r=e?`<!--more ${e}-->`:"<!--more-->";return(0,$K.jsx)(WK.RawHTML,{children:[r,t?"<!--noteaser-->":""].filter(Boolean).join(`
`)})}var ZK=o(W(),1),iye={from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:e=>e.dataset&&e.dataset.block==="core/more",transform(e){let{customText:t,noTeaser:r}=e.dataset,a={};return t&&(a.customText=t),r===""&&(a.noTeaser=!0),(0,ZK.createBlock)("core/more",a)}}]},KK=iye;var{fieldsKey:lye,formKey:sye}=K(YK.privateApis),{name:XK}=X4,J4={icon:RT,example:{},__experimentalLabel(e,{context:t}){let r=e?.metadata?.name;if((t==="list-view"||t==="breadcrumb")&&r)return r;if(t==="accessibility")return e.customText},transforms:KK,edit:GK,save:qK};window.__experimentalContentOnlyInspectorFields&&(J4[lye]=[{id:"customText",label:(0,QK.__)("Content"),type:"text",Edit:"rich-text"}],J4[sye]={fields:["customText"]});var cye=()=>E({name:XK,metadata:X4,settings:J4});var TD={};Z(TD,{init:()=>p_e,metadata:()=>e3,name:()=>kX,settings:()=>wX});var $3=o(P(),1);var yX=o(V(),1),_X=o(Q(),1),xX=o(Wo(),1);var e3={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/navigation",title:"Navigation",category:"theme",allowedBlocks:["core/navigation-link","core/search","core/social-links","core/page-list","core/spacer","core/home-link","core/icon","core/site-title","core/site-logo","core/navigation-submenu","core/loginout","core/buttons"],description:"A collection of blocks that allow visitors to get around your site.",keywords:["menu","navigation","links"],textdomain:"default",attributes:{ref:{type:"number"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},submenuVisibility:{type:"string",enum:["hover","click","always"],default:"hover"},overlayMenu:{type:"string",default:"mobile"},overlay:{type:"string"},icon:{type:"string",default:"handle"},hasIcon:{type:"boolean",default:!0},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"},maxNestingLevel:{type:"number",default:5},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},providesContext:{textColor:"textColor",customTextColor:"customTextColor",backgroundColor:"backgroundColor",customBackgroundColor:"customBackgroundColor",overlayTextColor:"overlayTextColor",customOverlayTextColor:"customOverlayTextColor",overlayBackgroundColor:"overlayBackgroundColor",customOverlayBackgroundColor:"customOverlayBackgroundColor",fontSize:"fontSize",customFontSize:"customFontSize",showSubmenuIcon:"showSubmenuIcon",submenuVisibility:"submenuVisibility",openSubmenusOnClick:"openSubmenusOnClick",style:"style",maxNestingLevel:"maxNestingLevel"},supports:{anchor:!0,align:["wide","full"],ariaLabel:!0,contentRole:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalLetterSpacing:!0,__experimentalTextDecoration:!0,__experimentalSkipSerialization:["textDecoration"],__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}},layout:{allowSwitching:!1,allowInheriting:!1,allowVerticalAlignment:!1,allowSizingOnChildren:!0,default:{type:"flex"}},interactivity:!0,renaming:!1},editorStyle:"wp-block-navigation-editor",style:"wp-block-navigation"};var $t=o(U(),1),tt=o(T(),1),Td=o(Q(),1),ss=o(V(),1),Hr=o(M(),1),It=o(P(),1),U3=o(bv(),1);var pX=o(W(),1),dX=o(me(),1);var Fh=o(Q(),1),tQ=o(V(),1);var Pi={name:"core/navigation-link",attributes:{kind:"post-type",type:"page"}},JK=["core/navigation-link/page","core/navigation-link"],$E={per_page:100,status:["publish","draft"],order:"desc",orderby:"date"},eQ=["postType","wp_navigation",$E],ic="navigation-overlay";function Hh(e){let t=(0,Fh.useResourcePermissions)({kind:"postType",name:"wp_navigation",id:e}),{navigationMenu:r,isNavigationMenuResolved:a,isNavigationMenuMissing:n}=(0,tQ.useSelect)(h=>mye(h,e),[e]),{canCreate:i,canUpdate:l,canDelete:s,isResolving:c,hasResolved:u}=t,{records:m,isResolving:p,hasResolved:d}=(0,Fh.useEntityRecords)("postType","wp_navigation",$E),f=e?m?.length>1:m?.length>0;return{navigationMenu:r,isNavigationMenuResolved:a,isNavigationMenuMissing:n,navigationMenus:m,isResolvingNavigationMenus:p,hasResolvedNavigationMenus:d,canSwitchNavigationMenu:f,canUserCreateNavigationMenus:i,isResolvingCanUserCreateNavigationMenus:c,hasResolvedCanUserCreateNavigationMenus:u,canUserUpdateNavigationMenu:l,hasResolvedCanUserUpdateNavigationMenu:e?u:void 0,canUserDeleteNavigationMenu:s,hasResolvedCanUserDeleteNavigationMenu:e?u:void 0}}function mye(e,t){if(!t)return{isNavigationMenuResolved:!1,isNavigationMenuMissing:!0};let{getEntityRecord:r,getEditedEntityRecord:a,hasFinishedResolution:n}=e(Fh.store),i=["postType","wp_navigation",t],l=r(...i),s=a(...i),c=n("getEditedEntityRecord",i),u=s.status==="publish"||s.status==="draft";return{isNavigationMenuResolved:c,isNavigationMenuMissing:c&&(!l||!u),navigationMenu:u?s:null}}var t3=o(Q(),1);function Oh(e){let{records:t,isResolving:r,hasResolved:a}=(0,t3.useEntityRecords)("root","menu",{per_page:-1,context:"view"}),{records:n,isResolving:i,hasResolved:l}=(0,t3.useEntityRecords)("postType","page",{parent:0,order:"asc",orderby:"id",per_page:-1,context:"view"}),{records:s,hasResolved:c}=(0,t3.useEntityRecords)("root","menuItem",{menus:e,per_page:-1,context:"view"},{enabled:!!e});return{pages:n,isResolvingPages:i,hasResolvedPages:l,hasPages:!!(l&&n?.length),menus:t,isResolvingMenus:r,hasResolvedMenus:a,hasMenus:!!(a&&t?.length),menuItems:s,hasResolvedMenuItems:c}}var Uh=o(M(),1),Iv=o(P(),1);var qE=o(bv(),1),aQ=o(U(),1);var rQ=o(P(),1),Pv=o(v(),1),pye=({isVisible:e=!0})=>(0,Pv.jsx)("div",{"aria-hidden":e?void 0:!0,className:"wp-block-navigation-placeholder__preview",children:(0,Pv.jsxs)("div",{className:"wp-block-navigation-placeholder__actions__indicator",children:[(0,Pv.jsx)(Wa,{icon:Tp}),(0,rQ.__)("Navigation")]})}),r3=pye;var ls=o(M(),1);var an=o(P(),1),o3=o(Wo(),1),jh=o(U(),1),oQ=o(Q(),1);var cl=o(v(),1);function dye(e,t,r){return e?r==="publish"?(0,o3.decodeEntities)(e):(0,an.sprintf)((0,an.__)("%1$s (%2$s)"),(0,o3.decodeEntities)(e),r):(0,an.sprintf)((0,an.__)("(no title %s)"),t)}function fye({currentMenuId:e,onSelectNavigationMenu:t,onSelectClassicMenu:r,onCreateNew:a,actionLabel:n,createNavigationMenuIsSuccess:i,createNavigationMenuIsError:l}){let s=(0,an.__)("Create from '%s'"),[c,u]=(0,jh.useState)(!1);n=n||s;let{menus:m}=Oh(),{navigationMenus:p,isResolvingNavigationMenus:d,hasResolvedNavigationMenus:f,canUserCreateNavigationMenus:h,canSwitchNavigationMenu:g,isNavigationMenuMissing:b}=Hh(e),[y]=(0,oQ.useEntityProp)("postType","wp_navigation","title",e),k=(0,jh.useMemo)(()=>p?.map(({id:z,title:I,status:R},$)=>{let j=dye(I?.rendered,$+1,R);return{value:z,label:j,ariaLabel:(0,an.sprintf)(n,j),disabled:c||d||!f}})||[],[p,n,d,f,c]),_=!!p?.length,x=!!m?.length,S=!!g,C=!!h,N=_&&!e,B=!_&&f,D=f&&e===null,A=e&&b,H="";return d?H=(0,an.__)("Loading\u2026"):N||B||D||A?H=(0,an.__)("Choose or create a Navigation Menu"):H=y,(0,jh.useEffect)(()=>{c&&(i||l)&&u(!1)},[f,i,h,l,c,D,B,N]),(0,cl.jsx)(ls.DropdownMenu,{label:H,icon:q0,toggleProps:{size:"small"},children:({onClose:z})=>(0,cl.jsxs)(cl.Fragment,{children:[S&&_&&(0,cl.jsx)(ls.MenuGroup,{label:(0,an.__)("Menus"),children:(0,cl.jsx)(ls.MenuItemsChoice,{value:e,onSelect:I=>{t(I),z()},choices:k})}),C&&x&&(0,cl.jsx)(ls.MenuGroup,{label:(0,an.__)("Import Classic Menus"),children:m?.map(I=>{let R=(0,o3.decodeEntities)(I.name);return(0,cl.jsx)(ls.MenuItem,{onClick:async()=>{u(!0),await r(I),u(!1),z()},"aria-label":(0,an.sprintf)(s,R),disabled:c||d||!f,children:R},I.id)})}),h&&(0,cl.jsx)(ls.MenuGroup,{label:(0,an.__)("Tools"),children:(0,cl.jsx)(ls.MenuItem,{onClick:async()=>{u(!0),await a(),u(!1),z()},disabled:c||d||!f,children:(0,an.__)("Create new Menu")})})]})})}var Bv=fye;var Na=o(v(),1);function nQ({isSelected:e,currentMenuId:t,clientId:r,canUserCreateNavigationMenus:a=!1,isResolvingCanUserCreateNavigationMenus:n,onSelectNavigationMenu:i,onSelectClassicMenu:l,onCreateEmpty:s}){let{isResolvingMenus:c,hasResolvedMenus:u}=Oh();(0,aQ.useEffect)(()=>{e&&(c&&(0,qE.speak)((0,Iv.__)("Loading navigation block setup options\u2026")),u&&(0,qE.speak)((0,Iv.__)("Navigation block setup options ready.")))},[u,c,e]);let m=c&&n;return(0,Na.jsx)(Na.Fragment,{children:(0,Na.jsxs)(Uh.Placeholder,{className:"wp-block-navigation-placeholder",children:[(0,Na.jsx)(r3,{isVisible:!e}),(0,Na.jsx)("div",{"aria-hidden":e?void 0:!0,className:"wp-block-navigation-placeholder__controls",children:(0,Na.jsxs)("div",{className:"wp-block-navigation-placeholder__actions",children:[(0,Na.jsxs)("div",{className:"wp-block-navigation-placeholder__actions__indicator",children:[(0,Na.jsx)(Wa,{icon:Tp})," ",(0,Iv.__)("Navigation")]}),(0,Na.jsx)("hr",{}),m&&(0,Na.jsx)(Uh.Spinner,{}),(0,Na.jsx)(Bv,{currentMenuId:t,clientId:r,onSelectNavigationMenu:i,onSelectClassicMenu:l}),(0,Na.jsx)("hr",{}),a&&(0,Na.jsx)(Uh.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:s,children:(0,Iv.__)("Start empty")})]})})]})})}var ZE=o(M(),1),Wh=o(P(),1),KE=o(T(),1),iQ=o(V(),1),lQ=o(Q(),1);var Nv=o(L(),1);var Gh=o(v(),1);function lc({icon:e}){return e==="menu"?(0,Gh.jsx)(Wa,{icon:LT}):(0,Gh.jsxs)(Nv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:[(0,Gh.jsx)(Nv.Rect,{x:"4",y:"7.5",width:"16",height:"1.5"}),(0,Gh.jsx)(Nv.Rect,{x:"4",y:"15",width:"16",height:"1.5"})]})}function nn(e,t){return e&&t?e+"//"+t:null}var Bi=o(v(),1);function QE({children:e,id:t,isOpen:r,isResponsive:a,onToggle:n,isHiddenByDefault:i,overlayBackgroundColor:l,overlayTextColor:s,hasIcon:c,icon:u,overlay:m,onNavigateToEntityRecord:p}){let d=(0,iQ.useSelect)(x=>x(lQ.store).getCurrentTheme()?.stylesheet,[]);if(!a)return e;let f=!!m,h=w("wp-block-navigation__responsive-container",!f&&{"has-text-color":!!s.color||!!s?.class,[(0,KE.getColorClassName)("color",s?.slug)]:!!s?.slug,"has-background":!!l.color||l?.class,[(0,KE.getColorClassName)("background-color",l?.slug)]:!!l?.slug},{"is-menu-open":r,"hidden-by-default":i}),g=f?{}:{color:!s?.slug&&s?.color,backgroundColor:!l?.slug&&l?.color&&l.color},b=w("wp-block-navigation__responsive-container-open",{"always-shown":i}),y=`${t}-modal`,k={className:"wp-block-navigation__responsive-dialog",...r&&{role:"dialog","aria-modal":!0,"aria-label":(0,Wh.__)("Menu")}},_=()=>{if(m&&p){let x=nn(d,m);p({postId:x,postType:"wp_template_part"});return}n(!0)};return(0,Bi.jsxs)(Bi.Fragment,{children:[!r&&(0,Bi.jsxs)(ZE.Button,{__next40pxDefaultSize:!0,"aria-haspopup":"true","aria-label":c&&(0,Wh.__)("Open menu"),className:b,onClick:_,children:[c&&(0,Bi.jsx)(lc,{icon:u}),!c&&(0,Wh.__)("Menu")]}),(0,Bi.jsx)("div",{className:h,style:g,id:y,children:(0,Bi.jsx)("div",{className:"wp-block-navigation__responsive-close",tabIndex:"-1",children:(0,Bi.jsxs)("div",{...k,children:[(0,Bi.jsxs)(ZE.Button,{__next40pxDefaultSize:!0,className:"wp-block-navigation__responsive-container-close","aria-label":c&&(0,Wh.__)("Close menu"),onClick:()=>n(!1),children:[c&&(0,Bi.jsx)(Wa,{icon:yp}),!c&&(0,Wh.__)("Close")]}),(0,Bi.jsx)("div",{className:"wp-block-navigation__responsive-container-content",id:`${y}-content`,children:e})]})})})]})}var sQ=o(Q(),1),$h=o(T(),1),cQ=o(V(),1),uQ=o(U(),1);var YE=o(v(),1);function mQ({clientId:e,hasCustomPlaceholder:t,orientation:r,templateLock:a}){let{isImmediateParentOfSelectedBlock:n,selectedBlockHasChildren:i,isSelected:l,hasSelectedDescendant:s}=(0,cQ.useSelect)(b=>{let{getBlockCount:y,hasSelectedInnerBlock:k,getSelectedBlockClientId:_}=b($h.store),x=_();return{isImmediateParentOfSelectedBlock:k(e,!1),selectedBlockHasChildren:!!y(x),hasSelectedDescendant:k(e,!0),isSelected:x===e}},[e]),[c,u,m]=(0,sQ.useEntityBlockEditor)("postType","wp_navigation"),p=l||n&&!i,d=(0,uQ.useMemo)(()=>(0,YE.jsx)(r3,{}),[]),f=!!c?.length,h=!t&&!f&&!l,g=(0,$h.useInnerBlocksProps)({className:"wp-block-navigation__container"},{value:c,onInput:u,onChange:m,prioritizedInserterBlocks:JK,defaultBlock:Pi,directInsert:!0,orientation:r,templateLock:a,renderAppender:l||n&&!i||s||p?$h.InnerBlocks.ButtonBlockAppender:!1,placeholder:h?d:void 0,__experimentalCaptureToolbars:!0,__unstableDisableLayoutClassNames:!0});return(0,YE.jsx)("div",{...g})}var pQ=o(M(),1),dQ=o(Q(),1),fQ=o(P(),1),hQ=o(v(),1);function gQ(){let[e,t]=(0,dQ.useEntityProp)("postType","wp_navigation","title");return(0,hQ.jsx)(pQ.TextControl,{__next40pxDefaultSize:!0,label:(0,fQ.__)("Menu name"),value:e,onChange:t})}var yQ=o(T(),1),XE=o(M(),1),_Q=o(Q(),1),xQ=o(V(),1),bd=o(U(),1);function vQ(e,t){return!bQ(e,t,(r,a)=>{if(a?.name==="core/page-list"&&r==="innerBlocks")return!0})}var bQ=(e,t,r)=>{if(e===t)return!0;if(typeof e=="object"&&e!==null&&e!==void 0&&typeof t=="object"&&t!==null&&t!==void 0){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let a in e)if(t.hasOwnProperty(a)){if(r&&r(a,e))return!0;if(!bQ(e[a],t[a],r))return!1}else return!1;return!0}return!1};var kQ=o(v(),1),hye={};function wQ({blocks:e,createNavigationMenu:t,hasSelection:r}){let a=(0,bd.useRef)();(0,bd.useEffect)(()=>{a?.current||(a.current=e)},[e]);let n=vQ(a?.current,e),i=(0,bd.useContext)(XE.Disabled.Context),l=(0,yQ.useInnerBlocksProps)({className:"wp-block-navigation__container"},{renderAppender:r?void 0:!1,defaultBlock:Pi,directInsert:!0}),{isSaving:s,hasResolvedAllNavigationMenus:c}=(0,xQ.useSelect)(m=>{if(i)return hye;let{hasFinishedResolution:p,isSavingEntityRecord:d}=m(_Q.store);return{isSaving:d("postType","wp_navigation"),hasResolvedAllNavigationMenus:p("getEntityRecords",eQ)}},[i]);return(0,bd.useEffect)(()=>{i||s||!c||!r||!n||t(null,e)},[e,t,i,s,c,n,r]),(0,kQ.jsx)(s?XE.Disabled:"div",{...l})}var n3=o(M(),1),i3=o(Q(),1),CQ=o(V(),1),SQ=o(U(),1),a3=o(P(),1),yd=o(v(),1);function TQ({onDelete:e}){let[t,r]=(0,SQ.useState)(!1),a=(0,i3.useEntityId)("postType","wp_navigation"),{deleteEntityRecord:n}=(0,CQ.useDispatch)(i3.store);return(0,yd.jsxs)(yd.Fragment,{children:[(0,yd.jsx)(n3.Button,{__next40pxDefaultSize:!0,className:"wp-block-navigation-delete-menu-button",variant:"secondary",isDestructive:!0,onClick:()=>{r(!0)},children:(0,a3.__)("Delete menu")}),t&&(0,yd.jsx)(n3.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{n("postType","wp_navigation",a,{force:!0}),e()},onCancel:()=>{r(!1)},confirmButtonText:(0,a3.__)("Delete"),size:"medium",children:(0,a3.__)("Are you sure you want to delete this Navigation Menu?")})]})}var Ev=o(U(),1),PQ=o(V(),1),BQ=o(xr(),1);function gye({name:e,message:t=""}={}){let r=(0,Ev.useRef)(),{createWarningNotice:a,removeNotice:n}=(0,PQ.useDispatch)(BQ.store),i=(0,Ev.useCallback)(s=>{r.current||(r.current=e,a(s||t,{id:r.current,type:"snackbar"}))},[r,a,t,e]),l=(0,Ev.useCallback)(()=>{r.current&&(n(r.current),r.current=null)},[r,n]);return[i,l]}var l3=gye;var sc=o(M(),1),Sm=o(P(),1);var Ii=o(v(),1);function IQ({setAttributes:e,hasIcon:t,icon:r}){return(0,Ii.jsxs)(Ii.Fragment,{children:[(0,Ii.jsx)(sc.__experimentalToolsPanelItem,{label:(0,Sm.__)("Show icon button"),isShownByDefault:!0,hasValue:()=>!t,onDeselect:()=>e({hasIcon:!0}),children:(0,Ii.jsx)(sc.ToggleControl,{label:(0,Sm.__)("Show icon button"),help:(0,Sm.__)("Configure the visual appearance of the button that toggles the overlay menu."),onChange:a=>e({hasIcon:a}),checked:t})}),(0,Ii.jsx)(sc.__experimentalToolsPanelItem,{label:(0,Sm.__)("Icon"),isShownByDefault:!0,hasValue:()=>r!=="handle",onDeselect:()=>e({icon:"handle"}),children:(0,Ii.jsxs)(sc.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,className:"wp-block-navigation__overlay-menu-icon-toggle-group",label:(0,Sm.__)("Icon"),value:r,onChange:a=>e({icon:a}),isBlock:!0,children:[(0,Ii.jsx)(sc.__experimentalToggleGroupControlOption,{value:"handle","aria-label":(0,Sm.__)("handle"),label:(0,Ii.jsx)(lc,{icon:"handle"})}),(0,Ii.jsx)(sc.__experimentalToggleGroupControlOption,{value:"menu","aria-label":(0,Sm.__)("menu"),label:(0,Ii.jsx)(lc,{icon:"menu"})})]})})]})}var v3=o(M(),1),rY=o(P(),1),oY=o(U(),1);var ul=o(U(),1),WQ=o(me(),1),d3=o(Q(),1),f3=o(V(),1),ln=o(M(),1),ia=o(P(),1),tD=o(Wo(),1),$Q=o(xr(),1);var zQ=o(U(),1),m3=o(V(),1),VQ=o(Q(),1),FQ=o(T(),1),HQ=o(P(),1),xd=o(W(),1);var Tm=function(){return Tm=Object.assign||function(t){for(var r,a=1,n=arguments.length;a<n;a++){r=arguments[a];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Tm.apply(this,arguments)};function NQ(e){return e.toLowerCase()}var vye=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],bye=/[^A-Z0-9]+/gi;function s3(e,t){t===void 0&&(t={});for(var r=t.splitRegexp,a=r===void 0?vye:r,n=t.stripRegexp,i=n===void 0?bye:n,l=t.transform,s=l===void 0?NQ:l,c=t.delimiter,u=c===void 0?" ":c,m=EQ(EQ(e,a,"$1\0$2"),i,"\0"),p=0,d=m.length;m.charAt(p)==="\0";)p++;for(;m.charAt(d-1)==="\0";)d--;return m.slice(p,d).split("\0").map(s).join(u)}function EQ(e,t,r){return t instanceof RegExp?e.replace(t,r):t.reduce(function(a,n){return a.replace(n,r)},e)}function DQ(e){return e.charAt(0).toUpperCase()+e.substr(1)}function yye(e){return DQ(e.toLowerCase())}function LQ(e,t){return t===void 0&&(t={}),s3(e,Tm({delimiter:" ",transform:yye},t))}function MQ(e,t){return t===void 0&&(t={}),s3(e,Tm({delimiter:"."},t))}function c3(e,t){return t===void 0&&(t={}),MQ(e,Tm({delimiter:"-"},t))}function JE(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function eD(e,t,r){if(!e)return;t(JE(e).color);let a=e,n=JE(a).backgroundColor;for(;n==="rgba(0, 0, 0, 0)"&&a.parentNode&&a.parentNode.nodeType===a.parentNode.ELEMENT_NODE;)a=a.parentNode,n=JE(a).backgroundColor;r(n)}function _d(e,t){let{textColor:r,customTextColor:a,backgroundColor:n,customBackgroundColor:i,overlayTextColor:l,customOverlayTextColor:s,overlayBackgroundColor:c,customOverlayBackgroundColor:u,style:m}=e,p={};return t&&s?p.customTextColor=s:t&&l?p.textColor=l:a?p.customTextColor=a:r?p.textColor=r:m?.color?.text&&(p.customTextColor=m.color.text),t&&u?p.customBackgroundColor=u:t&&c?p.backgroundColor=c:i?p.customBackgroundColor=i:n?p.backgroundColor=n:m?.color?.background&&(p.customTextColor=m.color.background),p}function u3(e){return{className:w("wp-block-navigation__submenu-container",{"has-text-color":!!(e.textColor||e.customTextColor),[`has-${e.textColor}-color`]:!!e.textColor,"has-background":!!(e.backgroundColor||e.customBackgroundColor),[`has-${e.backgroundColor}-background-color`]:!!e.backgroundColor}),style:{color:e.customTextColor,backgroundColor:e.customBackgroundColor}}}var AQ=(e,t)=>{let r=e.toLowerCase(),a=t.map(i=>i.title.rendered.toLowerCase());if(!a.includes(r))return e;let n=2;for(;a.includes(`${r} ${n}`);)n++;return`${e} ${n}`},RQ=e=>c3(e).replace(/[^\w-]+/g,"")||"wp-custom-part";function OQ(e){let{saveEntityRecord:t}=(0,m3.useDispatch)(VQ.store),r=(0,m3.useSelect)(n=>K(n(FQ.store)).getPatternBySlug("core/navigation-overlay"),[]);return(0,zQ.useCallback)(async()=>{let n=e.filter(u=>u.title?.rendered),i=AQ((0,HQ.__)("Navigation Overlay"),n),l=RQ(i),s="";if(r?.content){let u=(0,xd.parse)(r.content,{__unstableSkipMigrationLogs:!0});s=(0,xd.serialize)(u)}else s=(0,xd.serialize)([(0,xd.createBlock)("core/paragraph")]);return await t("postType","wp_template_part",{slug:l,title:i,content:s,area:ic},{throwOnError:!0})},[e,t,r])}var Dv=o(M(),1),jQ=o(P(),1),UQ=o(U(),1),p3=o(v(),1);function _ye({onClear:e,onCreate:t,isCreating:r=!1}){let a=(0,UQ.createInterpolateElement)((0,jQ.__)("The selected overlay template part is missing or has been deleted. <clearButton>Reset to default overlay</clearButton> or <createButton>create a new overlay</createButton>."),{clearButton:(0,p3.jsx)(Dv.Button,{__next40pxDefaultSize:!0,onClick:e,variant:"link",disabled:r,accessibleWhenDisabled:!0}),createButton:(0,p3.jsx)(Dv.Button,{__next40pxDefaultSize:!0,onClick:t,variant:"link",disabled:r,accessibleWhenDisabled:!0,isBusy:r})});return(0,p3.jsx)(Dv.Notice,{status:"warning",isDismissible:!1,className:"wp-block-navigation__deleted-overlay-warning",children:a})}var GQ=_ye;var ho=o(v(),1);function rD({overlay:e,overlayMenu:t,setAttributes:r,onNavigateToEntityRecord:a,isCreatingOverlay:n,setIsCreatingOverlay:i}){let l=(0,WQ.useInstanceId)(rD,"wp-block-navigation__overlay-selector-heading"),{records:s,isResolving:c,hasResolved:u}=(0,d3.useEntityRecords)("postType","wp_template_part",{per_page:-1}),{createErrorNotice:m}=(0,f3.useDispatch)($Q.store),p=(0,f3.useSelect)(F=>F(d3.store).getCurrentTheme()?.stylesheet,[]),[d,f]=(0,ul.useState)(!1),h=n!==void 0?n:d,g=i!==void 0?i:f,b=(0,ul.useMemo)(()=>s?s.filter(F=>F.area===ic):[],[s]),y=OQ(b),k=(0,ul.useMemo)(()=>!e||!b?null:b.find(F=>F.slug===e),[e,b]),_=(0,ul.useMemo)(()=>{let F=[{label:(0,ia.__)("Default"),value:""}];if(!u||c)return F;let z=b.map(I=>({label:I.title?.rendered?(0,tD.decodeEntities)(I.title.rendered):I.slug,value:I.slug}));return e&&!k&&z.unshift({label:(0,ia.sprintf)((0,ia.__)("%s (missing)"),e),value:e}),[...F,...z]},[b,u,c,e,k]),x=F=>{r({overlay:F||void 0})},S=()=>{if(!e||!k||!a)return;let F=k.theme||p,I={postId:nn(F,e),postType:"wp_template_part"};t==="mobile"&&(I.viewport="mobile"),a(I)},C=(0,ul.useCallback)(async()=>{try{g(!0);let F=await y();if(r({overlay:F.slug}),a){let z=F.theme||p,R={postId:nn(z,F.slug),postType:"wp_template_part"};t==="mobile"&&(R.viewport="mobile"),a(R)}else g(!1)}catch(F){let z=F instanceof Error&&"code"in F&&F.message&&F.code!=="unknown_error"?F.message:(0,ia.__)("An error occurred while creating the overlay.");m(z,{type:"snackbar"}),g(!1)}},[y,r,a,m,p,g,t]),N=(0,ul.useCallback)(()=>{r({overlay:void 0})},[r]),B=c||h,D=(0,ul.useMemo)(()=>e&&u&&!c&&!k,[e,u,c,k]),A=(0,ul.useMemo)(()=>b.length===0&&u?(0,ia.__)("No overlays found."):(0,ia.__)("Select an overlay for navigation."),[b.length,u]),H=(0,ul.useMemo)(()=>k?(0,ia.sprintf)((0,ia.__)("Edit overlay: %s"),k.title?.rendered?(0,tD.decodeEntities)(k.title.rendered):k.slug):(0,ia.__)("Edit overlay"),[k]);return(0,ho.jsxs)("div",{className:"wp-block-navigation__overlay-selector",children:[(0,ho.jsx)("h3",{id:l,className:"wp-block-navigation__overlay-selector-header",children:(0,ia.__)("Overlay template")}),u&&(b.length===0||h&&b.length===1)?(0,ho.jsx)(ho.Fragment,{children:(0,ho.jsx)(ln.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:C,disabled:B,accessibleWhenDisabled:!0,isBusy:h,className:"wp-block-navigation__overlay-create-button-prominent",children:(0,ia.__)("Create overlay")})}):(0,ho.jsxs)(ho.Fragment,{children:[(0,ho.jsx)(ln.Button,{size:"small",icon:If,onClick:C,disabled:B,accessibleWhenDisabled:!0,isBusy:h,label:(0,ia.__)("Create new overlay template"),showTooltip:!0,className:"wp-block-navigation__overlay-create-button"}),(0,ho.jsxs)(ln.__experimentalHStack,{alignment:"flex-start",className:"wp-block-navigation__overlay-selector-controls",children:[(0,ho.jsx)(ln.FlexBlock,{children:(0,ho.jsx)(ln.SelectControl,{__next40pxDefaultSize:!0,label:(0,ia.__)("Overlay template"),hideLabelFromVision:!0,"aria-labelledby":l,value:e||"",options:_,onChange:x,disabled:c,accessibleWhenDisabled:!0,help:A})}),e&&u&&k&&(0,ho.jsx)(ln.FlexItem,{children:(0,ho.jsx)(ln.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:S,disabled:!a,accessibleWhenDisabled:!0,label:H,showTooltip:!0,className:"wp-block-navigation__overlay-edit-button",children:(0,ia.__)("Edit")})})]}),D&&(0,ho.jsx)(GQ,{onClear:N,onCreate:C,isCreating:h})]}),(0,ho.jsx)(ln.__experimentalHStack,{alignment:"flex-start",className:"wp-block-navigation__overlay-help-text-wrapper",children:(0,ho.jsx)(ln.__experimentalText,{variant:"muted",isBlock:!0,className:"wp-block-navigation__overlay-help-text",children:(0,ia.__)("An overlay template allows you to customize the appearance of the dialog that opens when the menu button is pressed.")})})]})}var qh=o(M(),1),kd=o(P(),1),Zh=o(v(),1);function qQ({overlayMenu:e,setAttributes:t}){return(0,Zh.jsxs)(qh.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,kd.__)("Overlay Visibility"),"aria-label":(0,kd.__)("Configure overlay visibility"),value:e,help:(0,kd.__)("Collapses the navigation options in a menu icon opening an overlay."),onChange:r=>t({overlayMenu:r}),isBlock:!0,children:[(0,Zh.jsx)(qh.__experimentalToggleGroupControlOption,{value:"never",label:(0,kd.__)("Off")}),(0,Zh.jsx)(qh.__experimentalToggleGroupControlOption,{value:"mobile",label:(0,kd.__)("Mobile")}),(0,Zh.jsx)(qh.__experimentalToggleGroupControlOption,{value:"always",label:(0,kd.__)("Always")})]})}var g3=o(M(),1),h3=o(P(),1);var uu=o(M(),1),Kh=o(P(),1);var cu=o(v(),1);function ZQ({hasIcon:e,icon:t,setAttributes:r}){return(0,cu.jsxs)(uu.__experimentalVStack,{spacing:4,children:[(0,cu.jsx)(uu.ToggleControl,{label:(0,Kh.__)("Show icon button"),help:(0,Kh.__)("Configure the visual appearance of the button that toggles the overlay menu."),onChange:a=>r({hasIcon:a}),checked:e}),(0,cu.jsxs)(uu.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,className:"wp-block-navigation__overlay-menu-icon-toggle-group",label:(0,Kh.__)("Icon"),value:t,onChange:a=>r({icon:a}),isBlock:!0,children:[(0,cu.jsx)(uu.__experimentalToggleGroupControlOption,{value:"handle","aria-label":(0,Kh.__)("handle"),label:(0,cu.jsx)(lc,{icon:"handle"})}),(0,cu.jsx)(uu.__experimentalToggleGroupControlOption,{value:"menu","aria-label":(0,Kh.__)("menu"),label:(0,cu.jsx)(lc,{icon:"menu"})})]})]})}var Ea=o(v(),1);function KQ({isResponsive:e,overlayMenuPreview:t,setOverlayMenuPreview:r,hasIcon:a,icon:n,setAttributes:i,overlayMenuPreviewClasses:l,overlayMenuPreviewId:s,containerStyle:c}){return e?(0,Ea.jsxs)(Ea.Fragment,{children:[(0,Ea.jsxs)(g3.Button,{__next40pxDefaultSize:!0,className:l,onClick:()=>r(!t),"aria-label":(0,h3.__)("Overlay menu controls"),"aria-controls":s,"aria-expanded":t,children:[a&&(0,Ea.jsxs)(Ea.Fragment,{children:[(0,Ea.jsx)(lc,{icon:n}),(0,Ea.jsx)(Wa,{icon:yp})]}),!a&&(0,Ea.jsxs)(Ea.Fragment,{children:[(0,Ea.jsx)("span",{children:(0,h3.__)("Menu")}),(0,Ea.jsx)("span",{children:(0,h3.__)("Close")})]})]}),t&&(0,Ea.jsx)(g3.__experimentalVStack,{id:s,spacing:4,style:c,children:(0,Ea.jsx)(ZQ,{hasIcon:a,icon:n,setAttributes:i})})]}):null}var QQ=o(V(),1),YQ=o(Q(),1),oD=o(U(),1),XQ=o(W(),1),JQ=o(M(),1),eY=o(P(),1),aD=o(T(),1);var wd=o(v(),1);function tY({overlay:e,currentTheme:t}){let r=(0,oD.useMemo)(()=>!e||!t?null:nn(t,e),[t,e]),{content:a,editedBlocks:n,hasResolved:i}=(0,QQ.useSelect)(s=>{if(!r)return{content:null,editedBlocks:null,hasResolved:!0};let{getEditedEntityRecord:c,hasFinishedResolution:u}=s(YQ.store),m=c("postType","wp_template_part",r,{context:"view"});return{content:m?.content,editedBlocks:m?.blocks,hasResolved:u("getEditedEntityRecord",["postType","wp_template_part",r,{context:"view"}])}},[r]),l=(0,oD.useMemo)(()=>r?n&&n.length>0?n:a&&typeof a=="string"?(0,XQ.parse)(a):[]:null,[r,n,a]);return e?i?(0,wd.jsx)("div",{className:"wp-block-navigation__overlay-preview","aria-label":(0,eY.__)("Navigation Overlay template part preview"),role:"region",children:(0,wd.jsx)(aD.BlockPreview.Async,{placeholder:(0,wd.jsx)("div",{className:"wp-block-navigation__overlay-preview-placeholder"}),children:(0,wd.jsx)(aD.BlockPreview,{blocks:l,viewportWidth:400,minHeight:200})})}):(0,wd.jsx)("div",{className:"wp-block-navigation__overlay-preview-loading",children:(0,wd.jsx)(JQ.Spinner,{})}):null}var Pm=o(v(),1);function aY({overlayMenu:e,overlay:t,setAttributes:r,onNavigateToEntityRecord:a,overlayMenuPreview:n,setOverlayMenuPreview:i,hasIcon:l,icon:s,overlayMenuPreviewClasses:c,overlayMenuPreviewId:u,isResponsive:m,currentTheme:p,hasOverlays:d}){let[f,h]=(0,oY.useState)(!1);return(0,Pm.jsx)(v3.PanelBody,{title:(0,rY.__)("Overlay"),initialOpen:!0,children:(0,Pm.jsxs)(v3.__experimentalVStack,{spacing:4,children:[(0,Pm.jsx)(qQ,{overlayMenu:e,setAttributes:r}),e!=="never"&&(0,Pm.jsx)(KQ,{isResponsive:m,overlayMenuPreview:n,setOverlayMenuPreview:i,hasIcon:l,icon:s,setAttributes:r,overlayMenuPreviewClasses:c,overlayMenuPreviewId:u}),e!=="never"&&(0,Pm.jsx)(rD,{overlay:t,overlayMenu:e,setAttributes:r,onNavigateToEntityRecord:a,isCreatingOverlay:f,setIsCreatingOverlay:h}),e!=="never"&&t&&d&&!f&&(0,Pm.jsx)(tY,{overlay:t,currentTheme:p})]})})}var x3=o(V(),1),iD=o(Q(),1),Yh=o(U(),1),cc=o(P(),1);var Lv=o(W(),1),lY=o(Yc(),1);var nD=o(U(),1),b3=o(T(),1),nY=o(V(),1),iY=o(Q(),1);function Qh(e){if(e===void 0)throw new Error('buildNavigationLinkEntityBinding requires a kind parameter. Only "post-type" and "taxonomy" are supported.');if(e!=="post-type"&&e!=="taxonomy")throw new Error(`Invalid kind "${e}" provided to buildNavigationLinkEntityBinding. Only 'post-type' and 'taxonomy' are supported.`);return{url:{source:e==="taxonomy"?"core/term-data":"core/post-data",args:{field:"link"}}}}function Ni({clientId:e,attributes:t}){let{updateBlockBindings:r}=(0,b3.useBlockBindingsUtils)(e),{metadata:a,id:n,kind:i,type:l}=t,s=(0,b3.useBlockEditingMode)(),c=!!a?.bindings?.url&&!!n,u=i==="post-type"?"core/post-data":"core/term-data",m=c&&a?.bindings?.url?.source===u,{isBoundEntityAvailable:p,entityRecord:d}=(0,nY.useSelect)(g=>{if(!m||!n)return{isBoundEntityAvailable:!1,entityRecord:null};let b=i==="post-type",y=i==="taxonomy";if(!b&&!y)return{isBoundEntityAvailable:!1,entityRecord:null};if(s==="disabled")return{isBoundEntityAvailable:!0,entityRecord:null};let{getEntityRecord:k,hasFinishedResolution:_}=g(iY.store),x=y?"taxonomy":"postType",S=l==="tag"?"post_tag":l,C=k(x,S,n);return{isBoundEntityAvailable:_("getEntityRecord",[x,S,n])?C!==void 0:!0,entityRecord:C||null}},[i,l,n,m,s]),f=(0,nD.useCallback)(()=>{c&&r({url:void 0})},[r,c]),h=(0,nD.useCallback)(g=>{let b=g?.kind??i;if(b)try{let y=Qh(b);r(y)}catch(y){console.warn("Failed to create entity binding:",y.message)}},[r,i]);return{hasUrlBinding:m,isBoundEntityAvailable:p,entityRecord:d,clearBinding:f,createBinding:h}}function sY(e){if(!e)return null;let t=kye(e),r=cY(t);return(0,lY.applyFilters)("blocks.navigation.__unstableMenuItemsToBlocks",r,e)}function cY(e,t=0){let r={};return{innerBlocks:[...e].sort((i,l)=>i.menu_order-l.menu_order).map(i=>{if(i.type==="block"){let[p]=(0,Lv.parse)(i.content.raw);return p||(0,Lv.createBlock)("core/freeform",{content:i.content})}let l=i.children?.length?"core/navigation-submenu":"core/navigation-link",s=xye(i,l,t),{innerBlocks:c=[],mapping:u={}}=i.children?.length?cY(i.children,t+1):{};r={...r,...u};let m=(0,Lv.createBlock)(l,s,c);return r[i.id]=m.clientId,m}),mapping:r}}function xye({title:e,xfn:t,classes:r,attr_title:a,object:n,object_id:i,description:l,url:s,type:c,target:u},m,p){n&&n==="post_tag"&&(n="tag");let d=c?.replace("_","-")||"custom";return{label:e?.rendered||"",...n?.length&&{type:n},kind:d,url:s||"",...t?.length&&t.join(" ").trim()&&{rel:t.join(" ").trim()},...r?.length&&r.join(" ").trim()&&{className:r.join(" ").trim()},...a?.length&&{title:a},...i&&(d==="post-type"||d==="taxonomy")&&{id:i,metadata:{bindings:Qh(d)}},...l?.length&&{description:l},...u==="_blank"&&{opensInNewTab:!0},...m==="core/navigation-submenu"&&{isTopLevelItem:p===0},...m==="core/navigation-link"&&{isTopLevelLink:p===0}}}function kye(e,t="id",r="parent"){let a=Object.create(null),n=[];for(let i of e)a[i[t]]={...i,children:[]},i[r]?(a[i[r]]=a[i[r]]||{},a[i[r]].children=a[i[r]].children||[],a[i[r]].children.push(a[i[t]])):n.push(a[i[t]]);return n}var lD="success",_3="error",k3="pending",wye="idle",y3=null;function Cye(e,{throwOnError:t=!1}={}){let r=(0,x3.useRegistry)(),{editEntityRecord:a}=(0,x3.useDispatch)(iD.store),[n,i]=(0,Yh.useState)(wye),[l,s]=(0,Yh.useState)(null),c=(0,Yh.useCallback)(async(m,p,d="publish")=>{let f,h;try{h=await r.resolveSelect(iD.store).getMenuItems({menus:m,per_page:-1,context:"view"})}catch(b){throw new Error((0,cc.sprintf)((0,cc.__)('Unable to fetch classic menu "%s" from API.'),p),{cause:b})}if(h===null)throw new Error((0,cc.sprintf)((0,cc.__)('Unable to fetch classic menu "%s" from API.'),p));let{innerBlocks:g}=sY(h);try{f=await e(p,g,d),await a("postType","wp_navigation",f.id,{status:"publish"},{throwOnError:!0})}catch(b){throw new Error((0,cc.sprintf)((0,cc.__)('Unable to create Navigation Menu "%s".'),p),{cause:b})}return f},[e,a,r]);return{convert:(0,Yh.useCallback)(async(m,p,d)=>{if(y3!==m){if(y3=m,!m||!p){s("Unable to convert menu. Missing menu details."),i(_3);return}return i(k3),s(null),await c(m,p,d).then(f=>(i(lD),y3=null,f)).catch(f=>{if(s(f?.message),i(_3),y3=null,t)throw new Error((0,cc.sprintf)((0,cc.__)('Unable to create Navigation Menu "%s".'),p),{cause:f})})}},[c,t]),status:n,error:l}}var uY=Cye;var kY=o(W(),1),wY=o(Q(),1),CY=o(V(),1),Jh=o(U(),1);var hY=o(M(),1),gY=o(Q(),1),vY=o(V(),1),w3=o(U(),1),Mv=o(P(),1);var mY=o(T(),1),pY=o(Q(),1),dY=o(V(),1);var Xh=e=>e==="header"?K9:e==="footer"?E9:e==="sidebar"?YP:e==="navigation-overlay"?VT:u1;function fY(e){return(0,dY.useSelect)(t=>{if(!e)return;let{getBlock:r,getBlockParentsByBlockName:a}=t(mY.store),i=a(e,"core/template-part",!0);if(!i?.length)return;let{getCurrentTheme:l,getEditedEntityRecord:s}=t(pY.store),c=l(),m=(c?.default_template_part_areas||[]).map(p=>({...p,icon:Xh(p.icon)}));for(let p of i){let d=r(p),{theme:f=c?.stylesheet,slug:h}=d.attributes,g=nn(f,h),b=s("postType","wp_template_part",g);if(b?.area)return m.find(y=>y.area!=="uncategorized"&&y.area===b.area)?.label}},[e])}var Sye=["postType","wp_navigation",{status:"draft",per_page:-1}],Tye=["postType","wp_navigation",{per_page:-1,status:"publish"}];function bY(e){let t=(0,w3.useContext)(hY.Disabled.Context),r=fY(t?void 0:e),a=(0,vY.useRegistry)();return(0,w3.useCallback)(async()=>{if(t)return"";let{getEntityRecords:n}=a.resolveSelect(gY.store),[i,l]=await Promise.all([n(...Sye),n(...Tye)]),s=r?(0,Mv.sprintf)((0,Mv.__)("%s menu"),r):(0,Mv.__)("Menu"),c=[...i,...l].reduce((m,p)=>p?.title?.raw?.startsWith(s)?m+1:m,0);return(c>0?`${s} ${c+1}`:s)||""},[t,r,a])}var yY="success",C3="error",_Y="pending",xY="idle";function SY(e){let[t,r]=(0,Jh.useState)(xY),[a,n]=(0,Jh.useState)(null),[i,l]=(0,Jh.useState)(null),{saveEntityRecord:s,editEntityRecord:c}=(0,CY.useDispatch)(wY.store),u=bY(e);return{create:(0,Jh.useCallback)(async(p=null,d=[],f)=>{if(p&&typeof p!="string")throw l("Invalid title supplied when creating Navigation Menu."),r(C3),new Error("Value of supplied title argument was not a string.");r(_Y),n(null),l(null),p||(p=await u().catch(g=>{throw l(g?.message),r(C3),new Error("Failed to create title when saving new Navigation Menu.",{cause:g})}));let h={title:p,content:(0,kY.serialize)(d),status:f};return s("postType","wp_navigation",h).then(g=>(n(g),r(yY),f!=="publish"&&c("postType","wp_navigation",g.id,{status:"publish"}),g)).catch(g=>{throw l(g?.message),r(C3),new Error("Unable to save new Navigation Menu",{cause:g})})},[s,c,u]),status:t,value:a,error:i,isIdle:t===xY,isPending:t===_Y,isSuccess:t===yY,isError:t===C3}}var TY=o(V(),1),PY=o(T(),1),Pye=[];function BY(e){return(0,TY.useSelect)(t=>{let{getBlock:r,getBlocks:a,hasSelectedInnerBlock:n}=t(PY.store),i=r(e).innerBlocks,l=!!i?.length,s=l?Pye:a(e);return{innerBlocks:l?i:s,hasUncontrolledInnerBlocks:l,uncontrolledInnerBlocks:i,controlledInnerBlocks:s,isInnerBlockSelected:n(e,!0)}},[e])}var IY=o(mr(),1),S3=o(M(),1),NY=o(P(),1),EY=o(v(),1),Bye=({className:e="",disabled:t,isMenuItem:r=!1})=>{let a=S3.Button;return r&&(a=S3.MenuItem),(0,EY.jsx)(a,{variant:"link",disabled:t,className:e,href:(0,IY.addQueryArgs)("edit.php",{post_type:"wp_navigation"}),children:(0,NY.__)("Manage menus")})},DY=Bye;var fu=o(T(),1),hu=o(M(),1),Zv=o(V(),1),du=o(P(),1),iX=o(U(),1);var LY=o(T(),1),P3=o(M(),1),MY=o(P(),1),B3=o(U(),1),T3=o(v(),1);function Iye({onCreateNew:e,isNotice:t=!1}){let[r,a]=(0,B3.useState)(!1),n=()=>{a(!0),e()},i=(0,B3.createInterpolateElement)((0,MY.__)("Navigation Menu has been deleted or is unavailable. <button>Create a new Menu?</button>"),{button:(0,T3.jsx)(P3.Button,{__next40pxDefaultSize:!0,onClick:n,variant:"link",disabled:r,accessibleWhenDisabled:!0})});return t?(0,T3.jsx)(P3.Notice,{status:"warning",isDismissible:!1,children:i}):(0,T3.jsx)(LY.Warning,{children:i})}var I3=Iye;var sD=o(W(),1);var uc=o(M(),1),Av=o(V(),1),Bm=o(P(),1),eg=o(T(),1);var Ei=o(v(),1),Nye={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"},Eye=["core/navigation-link","core/navigation-submenu"];function Dye({block:e,onClose:t,expandedState:r,expand:a,setInsertedBlock:n}){let{insertBlock:i,replaceBlock:l,replaceInnerBlocks:s}=(0,Av.useDispatch)(eg.store),c=e.clientId,u=!Eye.includes(e.name);return(0,Ei.jsx)(uc.MenuItem,{icon:vp,disabled:u,onClick:()=>{let p=(0,sD.createBlock)(Pi.name,Pi.attributes);if(e.name==="core/navigation-submenu")i(p,e.innerBlocks.length,c,!1);else{let d=(0,sD.createBlock)("core/navigation-submenu",e.attributes,e.innerBlocks);l(c,d),s(d.clientId,[p],!1)}n(p),r[e.clientId]||a(e.clientId),t()},children:(0,Bm.__)("Add submenu link")})}function AY(e){let{block:t}=e,{clientId:r}=t,{moveBlocksDown:a,moveBlocksUp:n,removeBlocks:i}=(0,Av.useDispatch)(eg.store),l=(0,Bm.sprintf)((0,Bm.__)("Remove %s"),(0,eg.BlockTitle)({clientId:r,maximumLength:25})),s=(0,Av.useSelect)(c=>{let{getBlockRootClientId:u}=c(eg.store);return u(r)},[r]);return(0,Ei.jsx)(uc.DropdownMenu,{icon:q0,label:(0,Bm.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:Nye,noIcons:!0,...e,children:({onClose:c})=>(0,Ei.jsxs)(Ei.Fragment,{children:[(0,Ei.jsxs)(uc.MenuGroup,{children:[(0,Ei.jsx)(uc.MenuItem,{icon:T0,onClick:()=>{n([r],s),c()},children:(0,Bm.__)("Move up")}),(0,Ei.jsx)(uc.MenuItem,{icon:bp,onClick:()=>{a([r],s),c()},children:(0,Bm.__)("Move down")}),(0,Ei.jsx)(Dye,{block:t,onClose:c,expandedState:e.expandedState,expand:e.expand,setInsertedBlock:e.setInsertedBlock})]}),(0,Ei.jsx)(uc.MenuGroup,{children:(0,Ei.jsx)(uc.MenuItem,{onClick:()=>{i([r],!1),c()},children:l})})]})})}var Ao=o(M(),1),Wt=o(P(),1),JY=o(ai(),1),jv=o(T(),1),z3=o(V(),1),eX=o(Q(),1);var zY=o(U(),1),VY=o(V(),1),FY=o(T(),1),HY=o(ai(),1),OY=o(cD(),1);var uD=o(cD(),1),Rv=o(mr(),1),Lye=(e,t)=>{if(!e||!t)return!1;let r=h=>h?h.replace(/\/+$/,""):"",a=(h,g=null)=>{try{let b=g||(typeof window<"u"?window.location.origin:"https://wordpress.org");return new URL(h,b)}catch{return null}},n=a(e);if(!n)return!0;let i=a(t,e);if(!i)return!0;let l=n.hostname,s=i.hostname,c=r((0,Rv.getPath)(n.toString())),u=r((0,Rv.getPath)(i.toString()));if(l!==s||c!==u)return!0;let m=n.searchParams.get("p"),p=i.searchParams.get("p");if(m&&p&&m!==p)return!0;let d=n.searchParams.get("page_id"),f=i.searchParams.get("page_id");return!!(d&&f&&d!==f||m&&f||d&&p)},zv=(e={},t,r={})=>{let{label:a="",kind:n="",type:i=""}=r,{title:l="",label:s="",url:c,opensInNewTab:u,id:m,kind:p=n,type:d=i}=e,f=l||s,h=f.replace(/http(s?):\/\//gi,""),g=c?.replace(/http(s?):\/\//gi,"")??"",y=f&&f!==a&&h!==g?(0,uD.escapeHTML)(f):a||(0,uD.escapeHTML)(g),k=d==="post_tag"?"tag":d.replace("-","_"),_=["post","page","tag","category"].indexOf(k)>-1,S=!p&&!_||p==="custom"?"custom":p,C={...c!==void 0?{url:c&&encodeURI((0,Rv.safeDecodeURI)(c))}:{},...y&&{label:y},...u!==void 0&&{opensInNewTab:u},...S&&{kind:S},...k&&k!=="URL"&&{type:k}};c&&!m&&r.id?Lye(r.url,c)&&(C.id=void 0,C.kind="custom",C.type="custom"):m&&Number.isInteger(m)?C.id=m:r.id&&(C.kind=S,C.type=k),t(C);let N="id"in C?C.id:r.id,B="kind"in C?C.kind:r.kind;return{isEntityLink:!!N&&B!=="custom",attributes:C}};function Cd({clientId:e,attributes:t,setAttributes:r,allowTextUpdate:a=!1}){let{updateBlockAttributes:n}=(0,VY.useDispatch)(FY.store),{hasUrlBinding:i,createBinding:l,clearBinding:s}=Ni({clientId:e,attributes:t});return(0,zY.useCallback)(c=>{if(!c)return;let u={url:c.url,kind:c.kind,type:c.type,id:c.id},m=t.label?(0,HY.__unstableStripHTML)(t.label):"",p=c.title??"",d=a&&c.title!==void 0&&p!==m,f=d?{label:(0,OY.escapeHTML)(p)}:{};if((!t.label||t.label===""||d)&&(u.title=c.title),!c.id&&i)s(),n(e,{url:c.url,kind:"custom",type:"custom",id:void 0,...f});else{let{isEntityLink:g,attributes:b}=zv(u,r,t);g?l(b):s(),Object.keys(f).length&&n(e,f)}},[t,a,e,i,l,s,r,n])}var A3=o(ai(),1),mu=o(M(),1),Hv=o(P(),1),R3=o(T(),1),Da=o(U(),1),$Y=o(Q(),1);var gD=o(me(),1),qY=o(mr(),1);var On=o(M(),1),Di=o(P(),1),Fv=o(V(),1),L3=o(Q(),1),jY=o(xr(),1),pD=o(Wo(),1),dD=o(U(),1);var N3=o(M(),1),E3=o(P(),1);var Vv=o(me(),1),Im=o(v(),1);function Mye({className:e,onBack:t}){return(0,Im.jsx)(N3.Button,{className:e,icon:(0,E3.isRTL)()?t9:XS,onClick:r=>{r.preventDefault(),t()},size:"small",children:(0,E3.__)("Back")})}function mD({className:e,title:t,description:r,onBack:a,children:n}){let i=(0,Vv.useInstanceId)(mD,"link-ui-dialog-title"),l=(0,Vv.useInstanceId)(mD,"link-ui-dialog-description"),s=(0,Vv.useFocusOnMount)("firstElement"),c=`${e}__back`;return(0,Im.jsxs)("div",{className:e,role:"dialog","aria-labelledby":i,"aria-describedby":l,ref:s,children:[(0,Im.jsxs)(N3.VisuallyHidden,{children:[(0,Im.jsx)("h2",{id:i,children:t}),(0,Im.jsx)("p",{id:l,children:r})]}),(0,Im.jsx)(Mye,{className:c,onBack:a}),n]})}var D3=mD;var ml=o(v(),1);function UY({postType:e,onBack:t,onPageCreated:r,initialTitle:a=""}){let[n,i]=(0,dD.useState)(a),[l,s]=(0,dD.useState)(!0),c=n.trim().length>0,{lastError:u,isSaving:m}=(0,Fv.useSelect)(b=>({lastError:b(L3.store).getLastEntitySaveError("postType",e),isSaving:b(L3.store).isSavingEntityRecord("postType",e)}),[e]),{saveEntityRecord:p}=(0,Fv.useDispatch)(L3.store),{createSuccessNotice:d,createErrorNotice:f}=(0,Fv.useDispatch)(jY.store);async function h(b){if(b.preventDefault(),!(m||!c))try{let y=await p("postType",e,{title:n,status:l?"publish":"draft"},{throwOnError:!0});if(y){let k={id:y.id,type:e,title:(0,pD.decodeEntities)(y.title.rendered),url:y.link,kind:"post-type"};d((0,Di.sprintf)((0,Di.__)("%s page created successfully."),(0,pD.decodeEntities)(y.title.rendered)),{type:"snackbar",id:"page-created-success"}),r(k)}}catch{f((0,Di.__)("Failed to create page. Please try again."),{type:"snackbar",id:"page-created-error"})}}let g=m||!c;return(0,ml.jsx)(D3,{className:"link-ui-page-creator",title:(0,Di.__)("Create page"),description:(0,Di.__)("Create a new page to add to your Navigation."),onBack:t,children:(0,ml.jsx)(On.__experimentalVStack,{className:"link-ui-page-creator__inner",spacing:4,children:(0,ml.jsx)("form",{onSubmit:h,children:(0,ml.jsxs)(On.__experimentalVStack,{spacing:4,children:[(0,ml.jsx)(On.TextControl,{__next40pxDefaultSize:!0,label:(0,Di.__)("Title"),onChange:i,placeholder:(0,Di.__)("No title"),value:n}),(0,ml.jsx)(On.CheckboxControl,{label:(0,Di.__)("Publish"),help:(0,Di.__)("Turn off to save as a draft. Drafts won't appear on your site until published."),checked:l,onChange:s}),u&&(0,ml.jsx)(On.Notice,{status:"error",isDismissible:!1,children:u.message}),(0,ml.jsxs)(On.__experimentalHStack,{spacing:2,justify:"flex-end",children:[(0,ml.jsx)(On.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:m,accessibleWhenDisabled:!0,children:(0,Di.__)("Cancel")}),(0,ml.jsx)(On.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:m,"aria-disabled":g,children:(0,Di.__)("Create page")})]})]})})})})}var fD=o(P(),1),GY=o(V(),1),M3=o(T(),1);var hD=o(v(),1),{PrivateQuickInserter:Aye}=K(M3.privateApis);function Rye({clientId:e,onBack:t,onBlockInsert:r}){let{rootBlockClientId:a}=(0,GY.useSelect)(n=>{let{getBlockRootClientId:i}=n(M3.store);return{rootBlockClientId:i(e)}},[e]);return e?(0,hD.jsx)(D3,{className:"link-ui-block-inserter",title:(0,fD.__)("Add block"),description:(0,fD.__)("Choose a block to add to your Navigation."),onBack:t,children:(0,hD.jsx)(Aye,{rootClientId:a,clientId:e,isAppender:!1,prioritizePatterns:!1,selectBlockOnInsert:!r,onSelect:r||void 0,hasSearch:!1})}):null}var WY=Rye;var jn=o(v(),1);function vD(e,t){switch(e){case"post":case"page":return{type:"post",subtype:e,perPage:20};case"category":return{type:"term",subtype:"category",perPage:20};case"tag":return{type:"term",subtype:"post_tag",perPage:20};case"post_format":return{type:"post-format",perPage:20};default:return t==="taxonomy"?{type:"term",subtype:e,perPage:20}:t==="post-type"?{type:"post",subtype:e,perPage:20}:{initialSuggestionsSearchOptions:{type:"post",subtype:"page",perPage:20}}}}function zye(e,t){let{label:r,url:a,opensInNewTab:n,type:i,kind:l,id:s}=e.link,{entityRecord:c,hasBinding:u,isEntityAvailable:m}=e.entity||{},{image:p,badges:d}=Ov({url:a,entityRecord:c,type:i,hasBinding:u,isEntityAvailable:m}),{clientId:f}=e,h=i||"page",[g,b]=(0,Da.useState)(!1),[y,k]=(0,Da.useState)(!1),[_,x]=(0,Da.useState)(null),[S,C]=(0,Da.useState)(""),N=(0,Da.useRef)(""),B=O=>{N.current=O,C(O)},D=(0,Da.useRef)(),A=(0,Da.useRef)(),H=(0,Da.useRef)(),F=(0,$Y.useResourcePermissions)({kind:"postType",name:h}),{isBoundEntityAvailable:z}=Ni({clientId:f,attributes:e.link}),I=(0,Da.useMemo)(()=>({url:a,opensInNewTab:n,title:r&&(0,A3.__unstableStripHTML)(r),kind:l,type:i,id:s,image:p,badges:d}),[r,n,a,l,i,s,p,d]),R=O=>{e.onChange(O),k(!1),x(!0),B("")},$=(0,gD.useInstanceId)(pu,"link-ui-link-control__title"),j=(0,gD.useInstanceId)(pu,"link-ui-link-control__description");(0,Da.useEffect)(()=>{_&&D.current&&(_?.current?_.current.focus():(A3.focus.tabbable.find(D.current)[0]||D.current).focus(),x(!1))},[_]);let G=(0,R3.useBlockEditingMode)();return(0,jn.jsxs)(mu.Popover,{ref:t,placement:"bottom",onClose:e.onClose,anchor:e.anchor,shift:!0,children:[!g&&!y&&(0,jn.jsxs)("div",{ref:D,role:"dialog","aria-labelledby":$,"aria-describedby":j,children:[(0,jn.jsxs)(mu.VisuallyHidden,{children:[(0,jn.jsx)("h2",{id:$,children:(0,Hv.__)("Add link")}),(0,jn.jsx)("p",{id:j,children:(0,Hv.__)("Search for and add a link to your Navigation.")})]}),(0,jn.jsx)(R3.LinkControl,{hasTextControl:!0,hasRichPreviews:!0,value:I,showInitialSuggestions:!0,withCreateSuggestion:!1,noDirectEntry:!!i,noURLSuggestion:!!i,suggestionsQuery:vD(i,l),onChange:e.onChange,onInputChange:O=>{N.current=O},inputValue:S,onRemove:e.onRemove,onCancel:e.onCancel,handleEntities:z,forceIsEditingLink:I?.url?!1:void 0,renderControlBottom:()=>I?.url?.length?null:(0,jn.jsx)(Vye,{addPageButtonRef:A,addBlockButtonRef:H,setAddingBlock:()=>{b(!0)},setAddingPage:()=>{k(!0)},canAddPage:F?.canCreate&&i==="page",canAddBlock:G==="default"})})]}),g&&(0,jn.jsx)(WY,{clientId:e.clientId,onBack:()=>{b(!1),x(H),B(N.current)},onBlockInsert:e?.onBlockInsert}),y&&(0,jn.jsx)(UY,{postType:h,onBack:()=>{k(!1),x(A),B(N.current)},onPageCreated:R,initialTitle:N.current&&!(0,qY.isURL)(N.current)?N.current:""})]})}var pu=(0,Da.forwardRef)(zye),Vye=({addPageButtonRef:e,addBlockButtonRef:t,setAddingBlock:r,setAddingPage:a,canAddPage:n,canAddBlock:i})=>{let l="listbox";return!n&&!i?null:(0,jn.jsxs)(mu.__experimentalVStack,{spacing:0,className:"link-ui-tools",children:[n&&(0,jn.jsx)(mu.Button,{__next40pxDefaultSize:!0,ref:e,icon:If,onClick:s=>{s.preventDefault(),a(!0)},"aria-haspopup":l,children:(0,Hv.__)("Create page")}),i&&(0,jn.jsx)(mu.Button,{__next40pxDefaultSize:!0,ref:t,icon:If,onClick:s=>{s.preventDefault(),r(!0)},"aria-haspopup":l,children:(0,Hv.__)("Add block")})]})};var sn=o(P(),1),_D=o(mr(),1),ZY=o(T(),1),bD=o(V(),1),yD=o(Q(),1);var{useRemoteUrlData:Fye,isHashLink:KY,isRelativePath:Hye}=K(ZY.privateApis);function Oye(e){return e.charAt(0).toUpperCase()+e.slice(1)}function jye({linkUrl:e,homeUrl:t}={}){if(!e)return{displayUrl:"",isExternal:!1};let r=(0,_D.safeDecodeURI)(e),a=!1;if(Hye(e)||KY(e))return{displayUrl:r,isExternal:!1};try{let n=new URL(e),i=new URL(t).host;if(n.host===i){let l=n.pathname+n.search+n.hash;l.endsWith("/")&&l.length>1&&(l=l.slice(0,-1)),r=l}else a=!0}catch{a=!0}return{displayUrl:r,isExternal:a}}function Uye({url:e,type:t,isExternal:r,entityStatus:a,hasBinding:n,isEntityAvailable:i}){let l=[];if(e&&(r?l.push({label:(0,sn.__)("External link"),intent:"default"}):KY(e)?l.push({label:(0,sn.__)("Internal link"),intent:"default"}):t&&t!=="custom"?l.push({label:Oye(t),intent:"default"}):l.push({label:(0,sn.__)("Page"),intent:"default"})),n&&!i)l.push({label:(0,sn.sprintf)((0,sn.__)("Missing %s"),t),intent:"error"});else if(!e)l.push({label:(0,sn.__)("No link selected"),intent:"error"});else if(a){let c={publish:{label:(0,sn.__)("Published"),intent:"success"},future:{label:(0,sn.__)("Scheduled"),intent:"warning"},draft:{label:(0,sn.__)("Draft"),intent:"warning"},pending:{label:(0,sn.__)("Pending"),intent:"warning"},private:{label:(0,sn.__)("Private"),intent:"default"},trash:{label:(0,sn.__)("Trash"),intent:"error"}}[a];c&&l.push(c)}return l}function Ov({url:e,entityRecord:t,type:r,hasBinding:a,isEntityAvailable:n}){let i=(0,bD.useSelect)(f=>f(yD.store).getEntityRecord("root","__unstableBase")?.home,[]),l=t?.title?.rendered||t?.title||t?.name,{richData:s}=Fye(l?null:e),{displayUrl:c,isExternal:u}=jye({linkUrl:e,homeUrl:i}),m=(0,bD.useSelect)(f=>{if(!t?.featured_media)return null;let{getEntityRecord:h}=f(yD.store),g=h("postType","attachment",t.featured_media);return g?.media_details?.sizes?.thumbnail?.source_url||g?.media_details?.sizes?.medium?.source_url||g?.source_url||null},[t?.featured_media]),p=Uye({url:e,type:r,isExternal:u,entityStatus:t?.status,hasBinding:a,isEntityAvailable:n});return{title:e?l||s?.title||(0,_D.safeDecodeURI)(e):(0,sn.__)("Add link"),url:c,image:m,badges:p}}var QY=o(V(),1),YY=o(Q(),1),XY=o(T(),1),Sd=(e,t,r,a)=>{let n=e==="post-type"||t==="post"||t==="page",i=Number.isInteger(r),l=(0,XY.useBlockEditingMode)(),{postStatus:s,isDeleted:c}=(0,QY.useSelect)(p=>{if(!n)return{postStatus:null,isDeleted:!1};if(l==="disabled"||!a)return{postStatus:null,isDeleted:!1};let{getEntityRecord:d,hasFinishedResolution:f}=p(YY.store),h=d("postType",t,r),b=f("getEntityRecord",["postType",t,r])&&h===void 0;return{postStatus:h?.status,isDeleted:b}},[n,l,a,t,r]);return[n&&i&&(c||s&&s==="trash"),s==="draft"]};var Mo=o(v(),1),{LinkPicker:Gye,isHashLink:Wye,isRelativePath:$ye}=K(jv.privateApis);function qye(e,t){if(t==="post-type")switch(e){case"post":return(0,Wt.__)("post");case"page":return(0,Wt.__)("page");default:return e||(0,Wt.__)("post")}if(t==="taxonomy")switch(e){case"category":return(0,Wt.__)("category");case"tag":return(0,Wt.__)("tag");default:return e||(0,Wt.__)("term")}return e||(0,Wt.__)("item")}function Uv({attributes:e,setAttributes:t,clientId:r,isLinkEditable:a=!0}){let{label:n,url:i,description:l,rel:s,opensInNewTab:c}=e,u=q(),{hasUrlBinding:m,isBoundEntityAvailable:p,entityRecord:d}=Ni({clientId:r,attributes:e}),[f,h]=Sd(e.kind,e.type,d?.id,m),g="";f||m&&!p?g=V3():h&&(g=Zye({type:e.type,kind:e.kind}));let b=Cd({clientId:r,attributes:e,setAttributes:t}),y=(0,z3.useSelect)(B=>B(jv.store).getSettings().onNavigateToEntityRecord,[]),k=(0,z3.useSelect)(B=>B(eX.store).getEntityRecord("root","__unstableBase")?.home,[]),x=(0,z3.useSelect)(B=>B(jv.store).getBlockEditingMode(r),[r])==="contentOnly",S=Ov({url:i,entityRecord:d,type:e.type,hasBinding:m,isEntityAvailable:p}),C=!!i&&(!Wye(i)||$ye(i)&&!i.startsWith("/")),N=C&&i.startsWith("/")&&k?k+i:i;return(0,Mo.jsxs)(Ao.__experimentalToolsPanel,{label:(0,Wt.__)("Settings"),resetAll:()=>{t({label:"",url:"",description:"",rel:"",opensInNewTab:!1})},dropdownMenuProps:u,children:[(0,Mo.jsx)(Ao.__experimentalToolsPanelItem,{hasValue:()=>!!n,label:(0,Wt.__)("Text"),onDeselect:()=>t({label:""}),isShownByDefault:!0,children:(0,Mo.jsx)(Ao.TextControl,{__next40pxDefaultSize:!0,label:(0,Wt.__)("Text"),value:n?(0,JY.__unstableStripHTML)(n):"",onChange:B=>{t({label:B})},autoComplete:"off"})}),a&&(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsx)(Ao.__experimentalToolsPanelItem,{hasValue:()=>!!i,label:(0,Wt.__)("Link to"),onDeselect:()=>t({url:void 0,id:void 0,kind:void 0,type:void 0}),isShownByDefault:!0,children:(0,Mo.jsx)(Gye,{preview:S,onSelect:b,suggestionsQuery:vD(e.type,e.kind),label:(0,Wt.__)("Link to"),help:g||void 0})}),(0,Mo.jsx)(Ao.__experimentalToolsPanelItem,{hasValue:()=>!!c,label:(0,Wt.__)("Open in new tab"),onDeselect:()=>t({opensInNewTab:!1}),isShownByDefault:!0,children:(0,Mo.jsx)(Ao.CheckboxControl,{label:(0,Wt.__)("Open in new tab"),checked:c,onChange:B=>t({opensInNewTab:B})})}),!!i&&m&&p&&d?.id&&e.kind==="post-type"&&y&&(0,Mo.jsx)(Ao.Button,{variant:"secondary",onClick:()=>{y({postId:d.id,postType:e.type})},__next40pxDefaultSize:!0,className:"navigation-link-to__action-button",children:(0,Wt.__)("Edit")}),C&&(0,Mo.jsx)(Ao.Button,{variant:"secondary",href:N,target:"_blank",icon:B9,iconPosition:"right",__next40pxDefaultSize:!0,className:"navigation-link-to__action-button",children:(0,Wt.__)("View")})]}),(0,Mo.jsx)(Ao.__experimentalToolsPanelItem,{hasValue:()=>!!l,label:(0,Wt.__)("Description"),onDeselect:()=>t({description:""}),isShownByDefault:!x,children:(0,Mo.jsx)(Ao.TextareaControl,{label:(0,Wt.__)("Description"),value:l||"",onChange:B=>{t({description:B})},help:(0,Wt.__)("The description will be displayed in the menu if the current theme supports it.")})}),(0,Mo.jsx)(Ao.__experimentalToolsPanelItem,{hasValue:()=>!!s,label:(0,Wt.__)("Rel attribute"),onDeselect:()=>t({rel:""}),isShownByDefault:!x,children:(0,Mo.jsx)(Ao.TextControl,{__next40pxDefaultSize:!0,label:(0,Wt.__)("Rel attribute"),value:s||"",onChange:B=>{t({rel:B})},autoComplete:"off",help:(0,Wt.__)("The relationship of the linked URL as space-separated link types.")})})]})}function V3(){return(0,Wt.__)("This link is invalid and will not appear on your site. Please update the link.")}function Zye({type:e,kind:t}){let r=qye(e,t);return(0,Wt.sprintf)((0,Wt.__)("This link is to a draft %1$s and will not appear on your site until the %1$s is published."),r)}var xD=o(P(),1),tX=o(Wo(),1),kD=o(v(),1);function Gv({label:e,isInvalid:t,isDraft:r,className:a="wp-block-navigation-link__label"}){if(!t&&!r)return null;let n=t?(0,xD.__)("Invalid"):(0,xD.__)("Draft");return(0,kD.jsx)("div",{className:w("wp-block-navigation-link__placeholder-text",a,{"is-invalid":t,"is-draft":r}),children:(0,kD.jsx)("span",{children:`${(0,tX.decodeEntities)(e)} (${n})`.trim()})})}var rX=o(V(),1),oX=o(T(),1);function Wv(e){return(0,rX.useSelect)(t=>{let{getSelectedBlockClientId:r,hasSelectedInnerBlock:a,getBlockParentsByBlockName:n}=t(oX.store),i=r(),l=n(e,"core/navigation")[0];return i===l||a(l,!0)},[e])}var F3=o(U(),1),$v=e=>{let[t,r]=(0,F3.useState)(!1);return(0,F3.useEffect)(()=>{let{ownerDocument:a}=e.current;function n(s){l(s)}function i(){r(!1)}function l(s){e.current.contains(s.target)?r(!0):r(!1)}return a.addEventListener("dragstart",n),a.addEventListener("dragend",i),a.addEventListener("dragenter",l),()=>{a.removeEventListener("dragstart",n),a.removeEventListener("dragend",i),a.removeEventListener("dragenter",l)}},[e]),t};function qv(e){e.current.focus();let{ownerDocument:t}=e.current,{defaultView:r}=t,a=r.getSelection(),n=t.createRange();n.selectNodeContents(e.current),a.removeAllRanges(),a.addRange(n)}var Ro=o(v(),1),aX=(0,du.__)("Switch to '%s'"),Kye=["core/navigation-link","core/navigation-submenu"],{PrivateListView:Qye,useBlockDisplayTitle:Yye,PrivateBlockContext:Xye,useListViewPanelState:Jye}=K(fu.privateApis);function e_e({block:e,insertedBlock:t,setInsertedBlock:r}){let{updateBlockAttributes:a,removeBlock:n}=(0,Zv.useDispatch)(fu.store),i=Kye?.includes(t?.name),l=t?.clientId===e.clientId,s=i&&l,{createBinding:c,clearBinding:u}=Ni({clientId:t?.clientId,attributes:t?.attributes||{}});if(!s)return null;let m=()=>{!t?.attributes?.url&&t?.clientId&&n(t.clientId,!1),r(null)},p=f=>h=>{f&&a(f,h)},d=f=>{t?.clientId&&f&&n(t.clientId,!1),r(f)};return(0,Ro.jsx)(pu,{clientId:t?.clientId,link:t?.attributes,onBlockInsert:d,onClose:()=>{m()},onChange:f=>{let{isEntityLink:h,attributes:g}=zv(f,p(t?.clientId),t?.attributes);h?c(g):u(),r(null)}})}var nX=({clientId:e,currentMenuId:t,isLoading:r,isNavigationMenuMissing:a,onCreateNew:n,expandRevision:i})=>{let l=(0,Zv.useSelect)(m=>!!m(fu.store).getBlockCount(e),[e]),{openListViewContentPanel:s}=K((0,Zv.useDispatch)(fu.store)),{navigationMenu:c}=Hh(t);if(t&&a)return(0,Ro.jsx)(I3,{onCreateNew:n,isNotice:!0});if(r)return(0,Ro.jsx)(hu.Spinner,{});let u=c?(0,du.sprintf)((0,du.__)("Structure for Navigation Menu: %s"),c?.title||(0,du.__)("Untitled menu")):(0,du.__)("You have not yet created any menus. Displaying a list of your Pages");return(0,Ro.jsxs)("div",{className:"wp-block-navigation__menu-inspector-controls",children:[!l&&(0,Ro.jsx)("p",{className:"wp-block-navigation__menu-inspector-controls__empty-message",children:(0,du.__)("This Navigation Menu is empty.")}),(0,Ro.jsx)(Qye,{rootClientId:e,isExpanded:!0,description:u,showAppender:!0,blockSettingsMenu:AY,additionalBlockContent:e_e,onSelect:s},`${e}-${i}`)]})},t_e=e=>{let{clientId:t,createNavigationMenuIsSuccess:r,createNavigationMenuIsError:a,currentMenuId:n=null,onCreateNew:i,onSelectClassicMenu:l,onSelectNavigationMenu:s,isManageMenusButtonDisabled:c,blockEditingMode:u}=e,{isSelectionWithinCurrentSection:m}=(0,iX.useContext)(Xye),p=Yye({clientId:t,context:"list-view"}),d=m,{isOpened:f,expandRevision:h,handleToggle:g}=Jye(t);return d?(0,Ro.jsx)(fu.InspectorControls,{group:"list",children:(0,Ro.jsxs)(hu.PanelBody,{title:(0,du.__)("Navigation"),opened:f,onToggle:g,children:[u==="default"&&(0,Ro.jsx)(Bv,{currentMenuId:n,onSelectClassicMenu:l,onSelectNavigationMenu:s,onCreateNew:i,createNavigationMenuIsSuccess:r,createNavigationMenuIsError:a,actionLabel:aX,isManageMenusButtonDisabled:c}),(0,Ro.jsx)(nX,{...e,expandRevision:h})]})}):(0,Ro.jsx)(fu.InspectorControls,{group:"list",children:(0,Ro.jsxs)(hu.PanelBody,{title:null,children:[(0,Ro.jsxs)(hu.__experimentalHStack,{className:"wp-block-navigation-off-canvas-editor__header",children:[(0,Ro.jsx)(hu.__experimentalHeading,{className:"wp-block-navigation-off-canvas-editor__title",level:2,children:p}),u==="default"&&(0,Ro.jsx)(Bv,{currentMenuId:n,onSelectClassicMenu:l,onSelectNavigationMenu:s,onCreateNew:i,createNavigationMenuIsSuccess:r,createNavigationMenuIsError:a,actionLabel:aX,isManageMenusButtonDisabled:c})]}),(0,Ro.jsx)(nX,{...e,expandRevision:h})]})})},H3=t_e;var lX=o(M(),1),wD=o(v(),1);function O3({id:e,children:t}){return(0,wD.jsx)(lX.VisuallyHidden,{children:(0,wD.jsx)("div",{id:e,className:"wp-block-navigation__description",children:t})})}var sX=o(Q(),1),j3=o(P(),1);var cX=o(v(),1);function uX({id:e}){let[t]=(0,sX.useEntityProp)("postType","wp_navigation","title"),r=(0,j3.sprintf)((0,j3.__)('Navigation Menu: "%s"'),t);return(0,cX.jsx)(O3,{id:e,children:r})}var CD=o(V(),1),mX=o(Q(),1);function Kv(){let e=(0,CD.select)("core/editor");if(!e)return!1;let{getCurrentPostType:t,getCurrentPostId:r}=e,{getEditedEntityRecord:a}=(0,CD.select)(mX.store),n=t?.(),i=r?.();return n==="wp_template_part"&&i?a("postType","wp_template_part",i)?.area===ic:!1}var ce=o(v(),1);function r_e({clientId:e}){let{insertBlock:t}=(0,ss.useDispatch)(tt.store),{getBlockCount:r}=(0,ss.useSelect)(tt.store),a=(0,$t.useCallback)(()=>{let n=r(e),i=(0,pX.createBlock)(Pi.name,{kind:Pi.attributes.kind,type:Pi.attributes.type});t(i,n,e)},[e,t,r]);return(0,ce.jsx)(tt.BlockControls,{children:(0,ce.jsx)(Hr.ToolbarGroup,{children:(0,ce.jsx)(Hr.ToolbarButton,{name:"add-page",icon:Fc,onClick:a,children:(0,It.__)("Add page")})})})}function o_e({textColor:e,setTextColor:t,backgroundColor:r,setBackgroundColor:a,overlayTextColor:n,setOverlayTextColor:i,overlayBackgroundColor:l,setOverlayBackgroundColor:s,clientId:c,navRef:u,hasCustomOverlay:m}){let[p,d]=(0,$t.useState)(),[f,h]=(0,$t.useState)(),[g,b]=(0,$t.useState)(),[y,k]=(0,$t.useState)(),_=(0,ss.useSelect)(()=>Kv(),[]),x=$t.Platform.OS==="web";(0,$t.useEffect)(()=>{if(!x)return;eD(u.current,h,d);let N=u.current?.querySelector('[data-type="core/navigation-submenu"] [data-type="core/navigation-link"]');N&&(n.color||l.color)&&eD(N,k,b)},[x,n.color,l.color,u]);let S=(0,tt.__experimentalUseMultipleOriginColorsAndGradients)();if(!S.hasColorsOrGradients)return null;let C=[{colorValue:e.color,label:(0,It.__)("Text"),onColorChange:t,resetAllFilter:()=>t(),clearable:!0,enableAlpha:!0},{colorValue:r.color,label:(0,It.__)("Background"),onColorChange:a,resetAllFilter:()=>a(),clearable:!0,enableAlpha:!0}];return C.push({colorValue:n.color,label:m||_?(0,It.__)("Submenu text"):(0,It.__)("Submenu & overlay text"),onColorChange:i,resetAllFilter:()=>i(),clearable:!0,enableAlpha:!0},{colorValue:l.color,label:m||_?(0,It.__)("Submenu background"):(0,It.__)("Submenu & overlay background"),onColorChange:s,resetAllFilter:()=>s(),clearable:!0,enableAlpha:!0}),(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)(tt.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:C,panelId:c,...S,gradients:[],disableCustomGradients:!0}),x&&(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)(tt.ContrastChecker,{backgroundColor:p,textColor:f}),(0,ce.jsx)(tt.ContrastChecker,{backgroundColor:g,textColor:y})]})]})}function a_e({attributes:e,setAttributes:t,clientId:r,isSelected:a,className:n,backgroundColor:i,setBackgroundColor:l,textColor:s,setTextColor:c,overlayBackgroundColor:u,setOverlayBackgroundColor:m,overlayTextColor:p,setOverlayTextColor:d,customPlaceholder:f=null,__unstableLayoutClassNames:h}){let{submenuVisibility:g,overlayMenu:b,overlay:y,showSubmenuIcon:k,templateLock:_,layout:{justifyContent:x,orientation:S="horizontal",flexWrap:C="wrap"}={},hasIcon:N,icon:B="handle"}=e,D=e.ref,A=(0,$t.useCallback)(tr=>{t({ref:tr})},[t]);(0,$t.useEffect)(()=>{S==="horizontal"&&g==="always"&&t({submenuVisibility:"hover",showSubmenuIcon:!0})},[S,g,t]);let H=`navigationMenu/${D}`,F=(0,tt.useHasRecursion)(H),{isPreviewMode:z,onNavigateToEntityRecord:I,currentTheme:R}=(0,ss.useSelect)(tr=>{let{getSettings:Tl}=tr(tt.store),Bs=Tl();return{isPreviewMode:Bs.isPreviewMode,onNavigateToEntityRecord:Bs?.onNavigateToEntityRecord,currentTheme:tr(Td.store).getCurrentTheme()?.stylesheet}},[]),$=z?!1:F,j=(0,tt.useBlockEditingMode)(),{menus:G}=Oh(),[O,J]=l3({name:"block-library/core/navigation/status"}),[ee,oe]=l3({name:"block-library/core/navigation/classic-menu-conversion"}),[X,te]=l3({name:"block-library/core/navigation/permissions/update"}),{create:ne,status:le,error:pe,value:Ie,isPending:Ne,isSuccess:ae,isError:Re}=SY(r),Ee=async()=>{await ne("")},{hasUncontrolledInnerBlocks:ie,uncontrolledInnerBlocks:fe,isInnerBlockSelected:ke,innerBlocks:je}=BY(r),de=(0,$t.useRef)(!1),ct=(0,ss.useSelect)(tr=>{if(je.some(kf=>kf.name==="core/navigation-submenu"))return!0;let Bs=je.find(kf=>kf.name==="core/page-list");if(!Bs)return de.current=!1,!1;if(de.current)return!0;let{getBlocks:U7}=tr(tt.store);return U7(Bs.clientId).length>0?(de.current=!0,!0):!1},[je]),{records:at}=(0,Td.useEntityRecords)("postType","wp_template_part",{per_page:-1}),kt=at?.some(tr=>tr.area===ic)??!1,{replaceInnerBlocks:Wr,selectBlock:ut,__unstableMarkNextChangeAsNotPersistent:br}=(0,ss.useDispatch)(tt.store),[mt,wo]=(0,$t.useState)(!1),[Y,ze]=(0,$t.useState)(!1),{hasResolvedNavigationMenus:Me,isNavigationMenuResolved:Xe,isNavigationMenuMissing:Te,canUserUpdateNavigationMenu:Bt,hasResolvedCanUserUpdateNavigationMenu:yr,canUserDeleteNavigationMenu:xn,hasResolvedCanUserDeleteNavigationMenu:Je,canUserCreateNavigationMenus:$r,isResolvingCanUserCreateNavigationMenus:ip,hasResolvedCanUserCreateNavigationMenus:Cs}=Hh(D),Ru=Me&&Te,{convert:kn,status:ja,error:gf}=uY(ne),zu=ja===k3,Ss=(0,$t.useCallback)((tr,Tl={focusNavigationBlock:!1})=>{let{focusNavigationBlock:Bs}=Tl;A(tr),Bs&&ut(r)},[ut,r,A]),Ts=!Te&&Xe,Pe=ie&&!Ts,{getNavigationFallbackId:Ht}=K((0,ss.useSelect)(Td.store)),qr=D||Pe?null:Ht();(0,$t.useEffect)(()=>{D||Pe||!qr||(br(),A(qr))},[D,A,Pe,qr,br]);let Co=(0,$t.useRef)(),So=(0,ss.useSelect)(()=>Kv(),[]),Sl=So?"div":"nav",qi=!D&&!Ne&&!zu&&Me&&G?.length===0&&!ie,Zi=!Me||Ne||zu||!!(D&&!Ts&&!zu),vf=e.style?.typography?.textDecoration,zc=(0,ss.useSelect)(tr=>tr(tt.store).__unstableHasActiveBlockOverlayActive(r),[r]),Ps=(0,$t.useRef)(!1);(0,$t.useEffect)(()=>{So&&(b!=="never"&&t({overlayMenu:"never"}),!Ps.current&&!D&&(Ps.current=!0,t({submenuVisibility:"always",layout:{...e.layout,orientation:"vertical"},showSubmenuIcon:!1})))},[e.layout,So,b,D,t]);let bf=b!=="never",lp=(0,tt.useBlockProps)({ref:Co,className:w(n,{"items-justified-right":x==="right","items-justified-space-between":x==="space-between","items-justified-left":x==="left","items-justified-center":x==="center","is-vertical":S==="vertical","no-wrap":C==="nowrap","is-responsive":bf,"has-text-color":!!s.color||!!s?.class,[(0,tt.getColorClassName)("color",s?.slug)]:!!s?.slug,"has-background":!!i.color||i.class,[(0,tt.getColorClassName)("background-color",i?.slug)]:!!i?.slug,[`has-text-decoration-${vf}`]:vf,"block-editor-block-content-overlay":zc},h),style:{color:!s?.slug&&s?.color,backgroundColor:!i?.slug&&i?.color}}),sp=async tr=>kn(tr.id,tr.name,"draft"),yf=tr=>{Ss(tr)};(0,$t.useEffect)(()=>{J(),Ne&&(0,U3.speak)((0,It.__)("Creating Navigation Menu.")),ae&&(Ss(Ie?.id,{focusNavigationBlock:!0}),O((0,It.__)("Navigation Menu successfully created."))),Re&&O((0,It.__)("Failed to create Navigation Menu."))},[le,pe,Ie?.id,Re,ae,Ne,Ss,J,O]),(0,$t.useEffect)(()=>{oe(),ja===k3&&(0,U3.speak)((0,It.__)("Classic menu importing.")),ja===lD&&(ee((0,It.__)("Classic menu imported successfully.")),Ss(Ie?.id,{focusNavigationBlock:!0})),ja===_3&&ee((0,It.__)("Classic menu import failed."))},[ja,gf,oe,ee,Ie?.id,Ss]),(0,$t.useEffect)(()=>{!a&&!ke&&te(),(a||ke)&&(D&&!Ru&&yr&&!Bt&&X((0,It.__)("You do not have permission to edit this Menu. Any changes made will not be saved.")),!D&&Cs&&!$r&&X((0,It.__)("You do not have permission to create Navigation Menus.")))},[a,ke,Bt,yr,$r,Cs,D,te,X,Ru]);let j7=$r||Bt,_b=w("wp-block-navigation__overlay-menu-preview",{open:Y}),Vc=!k&&g!=="click"&&g!=="always"?(0,It.__)('The current menu options offer reduced accessibility for users and are not recommended. Enabling either "Open on Click" or "Show arrow" offers enhanced accessibility by allowing keyboard users to browse submenus selectively.'):"",xb=(0,$t.useRef)(!0);(0,$t.useEffect)(()=>{!xb.current&&Vc&&(0,U3.speak)(Vc),xb.current=!1},[Vc]);let p0=(0,dX.useInstanceId)(IQ,"overlay-menu-preview"),kb=q(),_f=(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)(tt.InspectorControls,{children:ct&&(0,ce.jsx)(Hr.__experimentalToolsPanel,{label:(0,It.__)("Display"),resetAll:()=>{t({showSubmenuIcon:!0,submenuVisibility:"hover",overlayMenu:"mobile",hasIcon:!0,icon:"handle"})},dropdownMenuProps:kb,children:ct&&(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)("h3",{className:"wp-block-navigation__submenu-header",children:(0,It.__)("Submenus")}),(0,ce.jsx)(Hr.__experimentalToolsPanelItem,{hasValue:()=>g!=="hover",label:(0,It.__)("Submenu Visibility"),onDeselect:()=>t({submenuVisibility:"hover"}),isShownByDefault:!0,children:(0,ce.jsxs)(Hr.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,It.__)("Submenu Visibility"),value:g,onChange:tr=>{let Tl={submenuVisibility:tr};tr==="always"?Tl.showSubmenuIcon=!1:(tr==="click"||g==="always")&&(Tl.showSubmenuIcon=!0),t(Tl)},isBlock:!0,children:[(0,ce.jsx)(Hr.__experimentalToggleGroupControlOption,{value:"hover",label:(0,It.__)("Hover")}),(0,ce.jsx)(Hr.__experimentalToggleGroupControlOption,{value:"click",label:(0,It.__)("Click")}),S==="vertical"&&(0,ce.jsx)(Hr.__experimentalToggleGroupControlOption,{value:"always",label:(0,It.__)("Always")})]})}),(0,ce.jsx)(Hr.__experimentalToolsPanelItem,{hasValue:()=>!k,label:(0,It.__)("Show arrow"),onDeselect:()=>t({showSubmenuIcon:!0}),isDisabled:g==="click"||g==="always",isShownByDefault:!0,children:(0,ce.jsx)(Hr.ToggleControl,{checked:k,onChange:tr=>{t({showSubmenuIcon:tr})},disabled:g==="click"||g==="always",label:(0,It.__)("Show arrow")})}),Vc&&(0,ce.jsx)(Hr.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,className:"wp-block-navigation__submenu-accessibility-notice",children:Vc})]})})}),!So&&(0,ce.jsx)(tt.InspectorControls,{children:(0,ce.jsx)(aY,{overlayMenu:b,overlay:y,setAttributes:t,onNavigateToEntityRecord:I,overlayMenuPreview:Y,setOverlayMenuPreview:ze,hasIcon:N,icon:B,overlayMenuPreviewClasses:_b,overlayMenuPreviewId:p0,isResponsive:bf,currentTheme:R,hasOverlays:kt})}),(0,ce.jsx)(tt.InspectorControls,{group:"color",children:(0,ce.jsx)(o_e,{textColor:s,setTextColor:c,backgroundColor:i,setBackgroundColor:l,overlayTextColor:p,setOverlayTextColor:d,overlayBackgroundColor:u,setOverlayBackgroundColor:m,clientId:r,navRef:Co,hasCustomOverlay:!!y})})]}),cp=`${r}-desc`,xf=b==="always",up=!j7||!Me;if(Pe&&!Ne)return(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)(H3,{clientId:r,createNavigationMenuIsSuccess:ae,createNavigationMenuIsError:Re,currentMenuId:D,isNavigationMenuMissing:Te,isManageMenusButtonDisabled:up,onCreateNew:Ee,onSelectClassicMenu:sp,onSelectNavigationMenu:yf,isLoading:Zi,blockEditingMode:j}),j==="default"&&_f,(0,ce.jsxs)(Sl,{...lp,"aria-describedby":qi?void 0:cp,children:[(0,ce.jsx)(O3,{id:cp,children:(0,It.__)("Unsaved Navigation Menu.")}),(0,ce.jsx)(QE,{id:r,onToggle:wo,isOpen:mt,hasIcon:N,icon:B,isResponsive:bf,isHiddenByDefault:xf,overlayBackgroundColor:u,overlayTextColor:p,overlay:y,onNavigateToEntityRecord:I,children:(0,ce.jsx)(wQ,{createNavigationMenu:ne,blocks:fe,hasSelection:a||ke})})]})]});if(D&&Te)return(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)(H3,{clientId:r,createNavigationMenuIsSuccess:ae,createNavigationMenuIsError:Re,currentMenuId:D,isNavigationMenuMissing:Te,isManageMenusButtonDisabled:up,onCreateNew:Ee,onSelectClassicMenu:sp,onSelectNavigationMenu:yf,isLoading:Zi,blockEditingMode:j}),(0,ce.jsx)(Sl,{...lp,children:(0,ce.jsx)(I3,{onCreateNew:Ee})})]});if(Ts&&$)return(0,ce.jsx)("div",{...lp,children:(0,ce.jsx)(tt.Warning,{children:(0,It.__)("Block cannot be rendered inside itself.")})});let wb=f||nQ;return qi&&f?(0,ce.jsx)(Sl,{...lp,children:(0,ce.jsx)(wb,{isSelected:a,currentMenuId:D,clientId:r,canUserCreateNavigationMenus:$r,isResolvingCanUserCreateNavigationMenus:ip,onSelectNavigationMenu:yf,onSelectClassicMenu:sp,onCreateEmpty:Ee})}):(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)(H3,{clientId:r,createNavigationMenuIsSuccess:ae,createNavigationMenuIsError:Re,currentMenuId:D,isNavigationMenuMissing:Te,isManageMenusButtonDisabled:up,onCreateNew:Ee,onSelectClassicMenu:sp,onSelectNavigationMenu:yf,isLoading:Zi,blockEditingMode:j}),j==="default"&&_f,(0,ce.jsx)(Td.EntityProvider,{kind:"postType",type:"wp_navigation",id:D,children:(0,ce.jsxs)(tt.RecursionProvider,{uniqueId:H,children:[j==="contentOnly"&&Ts&&(0,ce.jsx)(r_e,{clientId:r}),j==="default"&&Ts&&(0,ce.jsxs)(tt.InspectorControls,{group:"advanced",children:[yr&&Bt&&(0,ce.jsx)(gQ,{}),Je&&xn&&(0,ce.jsx)(TQ,{onDelete:()=>{Wr(r,[]),O((0,It.__)("Navigation Menu successfully deleted."))}}),(0,ce.jsx)(DY,{disabled:up,className:"wp-block-navigation-manage-menus-button"})]}),(0,ce.jsxs)(Sl,{...lp,"aria-describedby":!qi&&!Zi?cp:void 0,children:[Zi&&!xf&&(0,ce.jsx)("div",{className:"wp-block-navigation__loading-indicator-container",children:(0,ce.jsx)(Hr.Spinner,{className:"wp-block-navigation__loading-indicator"})}),(!Zi||xf)&&(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)(uX,{id:cp}),(0,ce.jsx)(QE,{id:r,onToggle:wo,hasIcon:N,icon:B,isOpen:mt,isResponsive:bf,isHiddenByDefault:xf,overlayBackgroundColor:u,overlayTextColor:p,overlay:y,onNavigateToEntityRecord:I,children:Ts&&(0,ce.jsx)(mQ,{clientId:r,hasCustomPlaceholder:!!f,templateLock:_,orientation:S})})]})]})]})})]})}var fX=(0,tt.withColors)({textColor:"color"},{backgroundColor:"color"},{overlayBackgroundColor:"color"},{overlayTextColor:"color"})(a_e);var hX=o(T(),1),gX=o(v(),1);function vX({attributes:e}){if(!e.ref)return(0,gX.jsx)(hX.InnerBlocks.Content,{})}var Nm=o(T(),1),tg=o(me(),1);var Em=o(v(),1),SD={fontStyle:"var:preset|font-style|",fontWeight:"var:preset|font-weight|",textDecoration:"var:preset|text-decoration|",textTransform:"var:preset|text-transform|"},rg=({navigationMenuId:e,...t})=>({...t,ref:e}),G3=e=>{if(e.layout)return e;let{itemsJustification:t,orientation:r,...a}=e;return(t||r)&&Object.assign(a,{layout:{type:"flex",...t&&{justifyContent:t},...r&&{orientation:r}}}),a},W3=e=>{let{openSubmenusOnClick:t,...r}=e;return t==null?e:{...r,submenuVisibility:r.submenuVisibility??(t?"click":"hover")}},n_e={attributes:{ref:{type:"number"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"mobile"},icon:{type:"string",default:"handle"},hasIcon:{type:"boolean",default:!0},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"},maxNestingLevel:{type:"number",default:5},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalLetterSpacing:!0,__experimentalTextDecoration:!0,__experimentalSkipSerialization:["textDecoration"],__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}},layout:{allowSwitching:!1,allowInheriting:!1,allowVerticalAlignment:!1,allowSizingOnChildren:!0,default:{type:"flex"}},interactivity:!0,renaming:!1},save(){return(0,Em.jsx)(Nm.InnerBlocks.Content,{})},isEligible:({openSubmenusOnClick:e})=>e!=null,migrate:W3},i_e={attributes:{navigationMenuId:{type:"number"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},overlayMenu:{type:"string",default:"mobile"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}},layout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}}},save(){return(0,Em.jsx)(Nm.InnerBlocks.Content,{})},isEligible:({navigationMenuId:e})=>!!e,migrate:rg},l_e={attributes:{navigationMenuId:{type:"number"},orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"never"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}}},save(){return(0,Em.jsx)(Nm.InnerBlocks.Content,{})},isEligible:({itemsJustification:e,orientation:t})=>!!e||!!t,migrate:(0,tg.compose)(rg,G3,W3)},s_e={attributes:{orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"never"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}}},save(){return(0,Em.jsx)(Nm.InnerBlocks.Content,{})},migrate:(0,tg.compose)(rg,G3,Ot,W3),isEligible({style:e}){return e?.typography?.fontFamily}},c_e=function(e){return delete e.isResponsive,{...e,overlayMenu:"mobile"}},u_e=function(e){return{...e,style:{...e.style,typography:Object.fromEntries(Object.entries(e.style.typography??{}).map(([t,r])=>{let a=SD[t];if(a&&r.startsWith(a)){let n=r.slice(a.length);return t==="textDecoration"&&n==="strikethrough"?[t,"line-through"]:[t,n]}return[t,r]}))}}},m_e=[n_e,i_e,l_e,s_e,{attributes:{orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},isResponsive:{type:"boolean",default:"false"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0}},isEligible(e){return e.isResponsive},migrate:(0,tg.compose)(rg,G3,Ot,c_e,W3),save(){return(0,Em.jsx)(Nm.InnerBlocks.Content,{})}},{attributes:{orientation:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,fontSize:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,color:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0},save(){return(0,Em.jsx)(Nm.InnerBlocks.Content,{})},isEligible(e){if(!e.style||!e.style.typography)return!1;for(let t in SD){let r=e.style.typography[t];if(r&&r.startsWith(SD[t]))return!0}return!1},migrate:(0,tg.compose)(rg,G3,Ot,u_e)},{attributes:{className:{type:"string"},textColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean"}},isEligible(e){return e.rgbTextColor||e.rgbBackgroundColor},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0},migrate:(0,tg.compose)(rg,e=>{let{rgbTextColor:t,rgbBackgroundColor:r,...a}=e;return{...a,customTextColor:e.textColor?void 0:e.rgbTextColor,customBackgroundColor:e.backgroundColor?void 0:e.rgbBackgroundColor}}),save(){return(0,Em.jsx)(Nm.InnerBlocks.Content,{})}}],bX=m_e;var{name:kX}=e3,wX={icon:Tp,example:{attributes:{overlayMenu:"never"},innerBlocks:[{name:"core/navigation-link",attributes:{label:(0,$3.__)("Home"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{label:(0,$3.__)("About"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{label:(0,$3.__)("Contact"),url:"https://make.wordpress.org/"}}]},edit:fX,save:vX,__experimentalLabel:({ref:e})=>{if(!e)return;let t=(0,yX.select)(_X.store).getEditedEntityRecord("postType","wp_navigation",e);if(t?.title)return(0,xX.decodeEntities)(t.title)},deprecated:bX},p_e=()=>E({name:kX,metadata:e3,settings:wX});var BD={};Z(BD,{init:()=>x_e,metadata:()=>q3,name:()=>LX,settings:()=>X3});var Dm=o(P(),1);var IX=o(T(),1),NX=o(Yc(),1),EX=o(W(),1);var q3={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/navigation-link",title:"Custom Link",category:"design",parent:["core/navigation"],allowedBlocks:["core/navigation-link","core/navigation-submenu","core/page-list"],description:"Add a page, link, or another item to your navigation.",textdomain:"default",attributes:{label:{type:"string",role:"content"},type:{type:"string"},description:{type:"string"},rel:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string",role:"content"},title:{type:"string"},kind:{type:"string"},isTopLevelLink:{type:"boolean"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","style"],supports:{anchor:!0,reusable:!1,html:!1,__experimentalSlashInserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},renaming:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-navigation-link-editor",style:"wp-block-navigation-link"};var Z3=o(W(),1),Qv=o(V(),1),Pd=o(M(),1),K3=o(As(),1),pl=o(P(),1),la=o(T(),1),Q3=o(mr(),1),cn=o(U(),1);var Y3=o(me(),1);var nr=o(v(),1),f_e={name:"core/navigation-link"},h_e=["core/navigation-link","core/navigation-submenu"];function g_e(e){let t="";switch(e){case"post":t=(0,pl.__)("Select post");break;case"page":t=(0,pl.__)("Select page");break;case"category":t=(0,pl.__)("Select category");break;case"tag":t=(0,pl.__)("Select tag");break;default:t=(0,pl.__)("Add link")}return t}function PD({attributes:e,isSelected:t,setAttributes:r,insertBlocksAfter:a,mergeBlocks:n,onReplace:i,context:l,clientId:s}){let{id:c,label:u,type:m,url:p,description:d,kind:f,metadata:h}=e,{maxNestingLevel:g}=l,{replaceBlock:b,__unstableMarkNextChangeAsNotPersistent:y,selectBlock:k}=(0,Qv.useDispatch)(la.store),[_,x]=(0,cn.useState)(t&&!p),[S,C]=(0,cn.useState)(null),N=(0,cn.useRef)(null),B=$v(N),D=(0,pl.__)("Add label\u2026"),A=(0,cn.useRef)(),H=(0,cn.useRef)(),F=(0,cn.useRef)(u===void 0),z=(0,cn.useRef)(!1),{isAtMaxNesting:I,isTopLevelLink:R,isParentOfSelectedBlock:$,hasChildren:j,parentBlockClientId:G,isSubmenu:O}=(0,Qv.useSelect)(mt=>{let{getBlockCount:wo,getBlockName:Y,getBlockRootClientId:ze,hasSelectedInnerBlock:Me,getBlockParentsByBlockName:Xe}=mt(la.store),Te=ze(s),Bt=Y(Te),yr=Bt==="core/navigation",xn=yr?Te:Xe(s,"core/navigation")[0],Je=Bt==="core/navigation-submenu"?Te:xn;return{isAtMaxNesting:Xe(s,h_e).length>=g,isTopLevelLink:yr,isParentOfSelectedBlock:Me(s,!0),hasChildren:!!wo(s),parentBlockClientId:Je,isSubmenu:Bt==="core/navigation-submenu"}},[s,g]),J=Wv(s),{getBlocks:ee}=(0,Qv.useSelect)(la.store),{hasUrlBinding:oe,isBoundEntityAvailable:X,entityRecord:te}=Ni({clientId:s,attributes:e}),ne=Cd({clientId:s,attributes:e,setAttributes:r,allowTextUpdate:!0}),[le,pe]=Sd(f,m,c,J),Ie=(0,cn.useCallback)(()=>{let mt=ee(s);mt.length===0&&(mt=[(0,Z3.createBlock)("core/navigation-link")],k(mt[0].clientId));let wo=(0,Z3.createBlock)("core/navigation-submenu",e,mt);b(s,wo)},[ee,s,k,b,e]);(0,cn.useEffect)(()=>{F.current&&t&&k(G)},[]),(0,cn.useEffect)(()=>{j&&(y(),Ie())},[j,y,Ie]),(0,cn.useEffect)(()=>{if(!(!F.current||!p||!_)){if(F.current=!1,(0,Q3.isURL)((0,Q3.prependHTTP)(u))&&/^.+\.[a-z]+/.test(u))qv(A);else if(k(s,null),O){let mt=ee(G);mt.length===1&&mt[0].clientId===s&&(z.current=!0)}}},[p,_,F,u]);function Ne(){r({url:void 0,label:void 0,id:void 0,kind:void 0,type:void 0,opensInNewTab:!1}),x(!1)}let{textColor:ae,customTextColor:Re,backgroundColor:Ee,customBackgroundColor:ie}=_d(l,!R);function fe(mt){K3.isKeyboardEvent.primary(mt,"k")&&(mt.preventDefault(),mt.stopPropagation(),x(!0))}let ke=(0,Y3.useInstanceId)(PD),je=oe&&!X,de=je?(0,pl.sprintf)("navigation-link-edit-%d-desc",ke):void 0,ct=(0,la.useBlockProps)({ref:(0,Y3.useMergeRefs)([C,N]),className:w("wp-block-navigation-item",{"is-editing":t||$,"is-dragging-within":B,"has-link":!!p,"has-child":j,"has-text-color":!!ae||!!Re,[(0,la.getColorClassName)("color",ae)]:!!ae,"has-background":!!Ee||ie,[(0,la.getColorClassName)("background-color",Ee)]:!!Ee}),"aria-describedby":de,"aria-invalid":je,style:{color:!ae&&Re,backgroundColor:!Ee&&ie},onKeyDown:fe}),at=(0,la.useInnerBlocksProps)({...ct,className:"remove-outline"},{defaultBlock:f_e,directInsert:!0,renderAppender:!1}),kt=!p&&!(oe&&X)||le||pe||oe&&!X;kt&&(ct.onClick=()=>{x(!0)});let Wr=w("wp-block-navigation-item__content",{"wp-block-navigation-link__placeholder":kt}),ut=g_e(m),br=V3();return(0,nr.jsxs)(nr.Fragment,{children:[(0,nr.jsx)(la.BlockControls,{children:(0,nr.jsxs)(Pd.ToolbarGroup,{children:[(0,nr.jsx)(Pd.ToolbarButton,{name:"link",icon:ii,title:(0,pl.__)("Link"),shortcut:K3.displayShortcut.primary("k"),onClick:()=>{x(!0)}}),!I&&(0,nr.jsx)(Pd.ToolbarButton,{name:"submenu",icon:vp,title:(0,pl.__)("Add submenu"),onClick:Ie})]})}),(0,nr.jsx)(la.InspectorControls,{group:"content",children:(0,nr.jsx)(Uv,{attributes:e,setAttributes:r,clientId:s})}),(0,nr.jsxs)("div",{...ct,children:[je&&(0,nr.jsx)(Pd.VisuallyHidden,{id:de,children:br}),(0,nr.jsxs)("a",{className:Wr,children:[!p&&!h?.bindings?.url?(0,nr.jsx)("div",{className:"wp-block-navigation-link__placeholder-text",children:(0,nr.jsx)("span",{children:ut})}):(0,nr.jsxs)(nr.Fragment,{children:[!le&&!pe&&(0,nr.jsxs)(nr.Fragment,{children:[(0,nr.jsx)(la.RichText,{ref:A,identifier:"label",className:"wp-block-navigation-item__label",value:u,onChange:mt=>r({label:mt}),onMerge:n,onReplace:i,__unstableOnSplitAtEnd:()=>a((0,Z3.createBlock)("core/navigation-link")),"aria-label":(0,pl.__)("Navigation link text"),placeholder:D,withoutInteractiveFormatting:!0}),d&&(0,nr.jsx)("span",{className:"wp-block-navigation-item__description",children:d})]}),(le||pe)&&(0,nr.jsx)(Gv,{label:u,isInvalid:le,isDraft:pe,className:"wp-block-navigation-link__label"})]}),_&&(0,nr.jsx)(pu,{ref:H,clientId:s,link:e,entity:{entityRecord:te,hasBinding:oe,isEntityAvailable:X},onClose:()=>{if(x(!1),!p&&!oe){i([]);return}if(z.current&&(z.current=!1,N.current?.nextElementSibling)){let mt=N.current.nextElementSibling.querySelector(".block-editor-button-block-appender");mt&&mt.focus()}},anchor:S,onRemove:Ne,onChange:ne})]}),(0,nr.jsx)("div",{...at})]})]})}var CX=o(T(),1),SX=o(v(),1);function TX(){return(0,SX.jsx)(CX.InnerBlocks.Content,{})}function v_e(e){switch(e){case"post":return t1;case"page":return Fc;case"tag":return f1;case"category":return Gu;default:return S9}}function PX(e,t){if(t!=="core/navigation-link")return e;if(e.variations){let r=(n,i)=>n.type===i.type,a=e.variations.map(n=>({...n,...!n.icon&&{icon:v_e(n.name)},...!n.isActive&&{isActive:r}}));return{...e,variations:a}}return e}var sa=o(W(),1),b_e={from:[{type:"block",blocks:["core/site-logo"],transform:()=>(0,sa.createBlock)("core/navigation-link")},{type:"block",blocks:["core/spacer"],transform:()=>(0,sa.createBlock)("core/navigation-link")},{type:"block",blocks:["core/home-link"],transform:()=>(0,sa.createBlock)("core/navigation-link")},{type:"block",blocks:["core/social-links"],transform:()=>(0,sa.createBlock)("core/navigation-link")},{type:"block",blocks:["core/search"],transform:()=>(0,sa.createBlock)("core/navigation-link")},{type:"block",blocks:["core/page-list"],transform:()=>(0,sa.createBlock)("core/navigation-link")},{type:"block",blocks:["core/buttons"],transform:()=>(0,sa.createBlock)("core/navigation-link")}],to:[{type:"block",blocks:["core/navigation-submenu"],transform:(e,t)=>(0,sa.createBlock)("core/navigation-submenu",e,t)},{type:"block",blocks:["core/spacer"],transform:()=>(0,sa.createBlock)("core/spacer")},{type:"block",blocks:["core/site-logo"],transform:()=>(0,sa.createBlock)("core/site-logo")},{type:"block",blocks:["core/home-link"],transform:()=>(0,sa.createBlock)("core/home-link")},{type:"block",blocks:["core/social-links"],transform:()=>(0,sa.createBlock)("core/social-links")},{type:"block",blocks:["core/search"],transform:()=>(0,sa.createBlock)("core/search",{showLabel:!1,buttonUseIcon:!0,buttonPosition:"button-inside"})},{type:"block",blocks:["core/page-list"],transform:()=>(0,sa.createBlock)("core/page-list")},{type:"block",blocks:["core/buttons"],transform:({label:e,url:t,rel:r,title:a,opensInNewTab:n})=>(0,sa.createBlock)("core/buttons",{},[(0,sa.createBlock)("core/button",{text:e,url:t,rel:r,title:a,linkTarget:n?"_blank":void 0})])}]},BX=b_e;var DX=o(v(),1),{fieldsKey:y_e,formKey:__e}=K(EX.privateApis),{name:LX}=q3,X3={icon:L0,__experimentalLabel(e,{context:t}){if(t==="list-view")return e?.label;if(t==="appender"){let r=e?.type||"link";return(0,Dm.sprintf)((0,Dm._x)("Add %s","add default block type"),r)}return e?.label},merge(e,{label:t=""}){return{...e,label:e.label+t}},edit:PD,save:TX,example:{attributes:{label:(0,Dm._x)("Example Link","navigation link preview example"),url:"https://example.com"}},deprecated:[{isEligible(e){return e.nofollow},attributes:{label:{type:"string"},type:{type:"string"},nofollow:{type:"boolean"},description:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"}},migrate({nofollow:e,...t}){return{rel:e?"nofollow":"",...t}},save(){return(0,DX.jsx)(IX.InnerBlocks.Content,{})}}],transforms:BX};window.__experimentalContentOnlyInspectorFields&&(X3[y_e]=[{id:"label",label:(0,Dm.__)("Label"),type:"text",Edit:"rich-text"},{id:"link",label:(0,Dm.__)("Link"),type:"url",Edit:"link",getValue:({item:e})=>({url:e.url,rel:e.rel}),setValue:({value:e})=>({url:e.url,rel:e.rel})}],X3[__e]={fields:["label","link"]});var x_e=()=>((0,NX.addFilter)("blocks.registerBlockType","core/navigation-link",PX),E({name:LX,metadata:q3,settings:X3}));var ND={};Z(ND,{init:()=>T_e,metadata:()=>J3,name:()=>GX,settings:()=>nw});var Xv=o(P(),1),UX=o(W(),1);var J3={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/navigation-submenu",title:"Submenu",category:"design",parent:["core/navigation"],description:"Add a submenu to your navigation.",textdomain:"default",attributes:{label:{type:"string",role:"content"},type:{type:"string"},description:{type:"string"},rel:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string",role:"content"},title:{type:"string"},kind:{type:"string"},isTopLevelItem:{type:"boolean"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","openSubmenusOnClick","submenuVisibility","style"],supports:{anchor:!0,reusable:!1,html:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-navigation-submenu-editor",style:"wp-block-navigation-submenu"};var tw=o(V(),1),Yv=o(M(),1),rw=o(As(),1),og=o(P(),1),Jr=o(T(),1),ow=o(mr(),1),cs=o(U(),1);var RX=o(bv(),1),zX=o(W(),1),aw=o(me(),1);var ew=o(M(),1),ID=o(v(),1),MX=()=>(0,ID.jsx)(ew.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,ID.jsx)(ew.Path,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"})});var Dr=o(v(),1),AX=["core/navigation-link","core/navigation-submenu","core/page-list"];function VX({attributes:e,isSelected:t,setAttributes:r,mergeBlocks:a,onReplace:n,context:i,clientId:l}){let{label:s,url:c,description:u,kind:m,type:p,id:d}=e,{showSubmenuIcon:f,maxNestingLevel:h,submenuVisibility:g}=i,y=(0,Jr.useBlockEditingMode)()!=="default"?!0:g==="click",{hasUrlBinding:k,isBoundEntityAvailable:_,entityRecord:x}=Ni({clientId:l,attributes:e}),S=Cd({clientId:l,attributes:e,setAttributes:r,allowTextUpdate:!0}),{__unstableMarkNextChangeAsNotPersistent:C,replaceBlock:N}=(0,tw.useDispatch)(Jr.store),[B,D]=(0,cs.useState)(!1),[A,H]=(0,cs.useState)(null),F=(0,cs.useRef)(null),z=$v(F),I=(0,og.__)("Add text\u2026"),R=(0,cs.useRef)(),{parentCount:$,isParentOfSelectedBlock:j,isImmediateParentOfSelectedBlock:G,hasChildren:O,selectedBlockHasChildren:J,onlyDescendantIsEmptyLink:ee}=(0,tw.useSelect)(at=>{let{hasSelectedInnerBlock:kt,getSelectedBlockClientId:Wr,getBlockParentsByBlockName:ut,getBlock:br,getBlockCount:mt,getBlockOrder:wo}=at(Jr.store),Y,ze=Wr(),Me=wo(ze);if(Me?.length===1){let Xe=br(Me[0]);Y=Xe?.name==="core/navigation-link"&&!Xe?.attributes?.label}return{parentCount:ut(l,"core/navigation-submenu").length,isParentOfSelectedBlock:kt(l,!0),isImmediateParentOfSelectedBlock:kt(l,!1),hasChildren:!!mt(l),selectedBlockHasChildren:!!Me?.length,onlyDescendantIsEmptyLink:Y}},[l]),oe=Wv(l),X=(0,aw.usePrevious)(O),[te,ne]=Sd(m,p,d,oe);(0,cs.useEffect)(()=>{!y&&!c&&D(!0)},[]),(0,cs.useEffect)(()=>{t||D(!1)},[t]),(0,cs.useEffect)(()=>{B&&c&&(0,ow.isURL)((0,ow.prependHTTP)(s))&&/^.+\.[a-z]+/.test(s)&&qv(R)},[c]);let{textColor:le,customTextColor:pe,backgroundColor:Ie,customBackgroundColor:Ne}=_d(i,$>0);function ae(at){rw.isKeyboardEvent.primary(at,"k")&&(at.preventDefault(),at.stopPropagation(),D(!0))}let Re=(0,Jr.useBlockProps)({ref:(0,aw.useMergeRefs)([H,F]),className:w("wp-block-navigation-item",{"is-editing":t||j,"is-dragging-within":z,"has-link":!!c,"has-child":O,"has-text-color":!!le||!!pe,[(0,Jr.getColorClassName)("color",le)]:!!le,"has-background":!!Ie||Ne,[(0,Jr.getColorClassName)("background-color",Ie)]:!!Ie,"open-on-click":y,"open-always":g==="always"}),style:{color:!le&&pe,backgroundColor:!Ie&&Ne},onKeyDown:ae}),Ee=_d(i,!0),ie=$>=h?AX.filter(at=>at!=="core/navigation-submenu"):AX,fe=u3(Ee),ke=(0,Jr.useInnerBlocksProps)(fe,{allowedBlocks:ie,defaultBlock:Pi,directInsert:!0,__experimentalCaptureToolbars:!0,renderAppender:t||G&&!J||O?Jr.InnerBlocks.ButtonBlockAppender:!1}),je=y?"button":"a";function de(){let at=(0,zX.createBlock)("core/navigation-link",e);N(l,at)}(0,cs.useEffect)(()=>{!O&&X&&(C(),de())},[O,X]);let ct=!J||ee;return(0,Dr.jsxs)(Dr.Fragment,{children:[(0,Dr.jsx)(Jr.BlockControls,{children:(0,Dr.jsxs)(Yv.ToolbarGroup,{children:[!y&&(0,Dr.jsx)(Yv.ToolbarButton,{name:"link",icon:ii,title:(0,og.__)("Link"),shortcut:rw.displayShortcut.primary("k"),onClick:()=>{D(!0)}}),(0,Dr.jsx)(Yv.ToolbarButton,{name:"revert",icon:FP,title:(0,og.__)("Convert to Link"),onClick:de,className:"wp-block-navigation__submenu__revert",disabled:!ct})]})}),(0,Dr.jsx)(Jr.InspectorControls,{group:"content",children:(0,Dr.jsx)(Uv,{attributes:e,setAttributes:r,clientId:l,isLinkEditable:!y})}),(0,Dr.jsxs)("div",{...Re,children:[(0,Dr.jsxs)(je,{className:"wp-block-navigation-item__content",children:[!te&&!ne&&(0,Dr.jsxs)(Dr.Fragment,{children:[(0,Dr.jsx)(Jr.RichText,{ref:R,identifier:"label",className:"wp-block-navigation-item__label",value:s,onChange:at=>r({label:at}),onMerge:a,onReplace:n,"aria-label":(0,og.__)("Navigation link text"),placeholder:I,withoutInteractiveFormatting:!0,onClick:()=>{!y&&!c&&D(!0)}}),u&&(0,Dr.jsx)("span",{className:"wp-block-navigation-item__description",children:u})]}),(te||ne)&&(0,Dr.jsx)(Gv,{label:s,isInvalid:te,isDraft:ne,className:"wp-block-navigation-item__label"}),!y&&B&&(0,Dr.jsx)(pu,{clientId:l,link:e,entity:{entityRecord:x,hasBinding:k,isEntityAvailable:_},onClose:()=>{D(!1)},anchor:A,onRemove:()=>{r({url:""}),(0,RX.speak)((0,og.__)("Link removed."),"assertive")},onChange:S})]}),(f||y)&&(0,Dr.jsx)("span",{className:"wp-block-navigation__submenu-icon",children:(0,Dr.jsx)(MX,{})}),(0,Dr.jsx)("div",{...ke})]})]})}var FX=o(T(),1),HX=o(v(),1);function OX(){return(0,HX.jsx)(FX.InnerBlocks.Content,{})}var Bd=o(W(),1),w_e={to:[{type:"block",blocks:["core/navigation-link"],isMatch:(e,t)=>t?.innerBlocks?.length===0,transform:e=>(0,Bd.createBlock)("core/navigation-link",e)},{type:"block",blocks:["core/spacer"],isMatch:(e,t)=>t?.innerBlocks?.length===0,transform:()=>(0,Bd.createBlock)("core/spacer")},{type:"block",blocks:["core/site-logo"],isMatch:(e,t)=>t?.innerBlocks?.length===0,transform:()=>(0,Bd.createBlock)("core/site-logo")},{type:"block",blocks:["core/home-link"],isMatch:(e,t)=>t?.innerBlocks?.length===0,transform:()=>(0,Bd.createBlock)("core/home-link")},{type:"block",blocks:["core/social-links"],isMatch:(e,t)=>t?.innerBlocks?.length===0,transform:()=>(0,Bd.createBlock)("core/social-links")},{type:"block",blocks:["core/search"],isMatch:(e,t)=>t?.innerBlocks?.length===0,transform:()=>(0,Bd.createBlock)("core/search")}]},jX=w_e;var{fieldsKey:C_e,formKey:S_e}=K(UX.privateApis),{name:GX}=J3,nw={icon:({context:e})=>e==="list-view"?Fc:vp,__experimentalLabel(e,{context:t}){let{label:r}=e,a=e?.metadata?.name;return(t==="list-view"||t==="breadcrumb")&&a?a:r},edit:VX,example:{attributes:{label:(0,Xv._x)("About","Example link text for Navigation Submenu"),type:"page"}},save:OX,transforms:jX};window.__experimentalContentOnlyInspectorFields&&(nw[C_e]=[{id:"label",label:(0,Xv.__)("Label"),type:"text",Edit:"rich-text"},{id:"link",label:(0,Xv.__)("Link"),type:"url",Edit:"link",getValue:({item:e})=>({url:e.url,rel:e.rel}),setValue:({value:e})=>({url:e.url,rel:e.rel})}],nw[S_e]={fields:["label","link"]});var T_e=()=>E({name:GX,metadata:J3,settings:nw});var DD={};Z(DD,{init:()=>I_e,metadata:()=>iw,name:()=>JX,settings:()=>eJ});var WX=o(P(),1),$X=o(T(),1),ED=o(v(),1);function qX(){return(0,ED.jsx)("div",{...(0,$X.useBlockProps)(),children:(0,ED.jsx)("span",{children:(0,WX.__)("Page break")})})}var iw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/nextpage",title:"Page Break",category:"design",description:"Separate your content into a multi-page experience.",keywords:["next page","pagination"],parent:["core/post-content"],textdomain:"default",supports:{customClassName:!1,className:!1,html:!1,visibility:!1,interactivity:{clientNavigation:!0},customCSS:!1},editorStyle:"wp-block-nextpage-editor"};var ZX=o(U(),1),KX=o(v(),1);function QX(){return(0,KX.jsx)(ZX.RawHTML,{children:"<!--nextpage-->"})}var YX=o(W(),1),B_e={from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:e=>e.dataset&&e.dataset.block==="core/nextpage",transform(){return(0,YX.createBlock)("core/nextpage",{})}}]},XX=B_e;var{name:JX}=iw,eJ={icon:WT,example:{},transforms:XX,edit:qX,save:QX},I_e=()=>E({name:JX,metadata:iw,settings:eJ});var MD={};Z(MD,{init:()=>E_e,metadata:()=>lw,name:()=>aJ,settings:()=>nJ});var oJ=o(Yc(),1);var ag=o(T(),1),mc=o(M(),1),gu=o(P(),1);var un=o(v(),1);function tJ({attributes:e,setAttributes:t}){let{displayMode:r,text:a}=e,n=r==="icon"||r==="both",i=r==="text"||r==="both",l=a||(0,gu.__)("Close"),s=(0,ag.useBlockProps)({className:"wp-block-navigation-overlay-close"}),c=q();return(0,un.jsxs)(un.Fragment,{children:[(0,un.jsx)(ag.InspectorControls,{children:(0,un.jsx)(mc.__experimentalToolsPanel,{label:(0,gu.__)("Settings"),resetAll:()=>t({displayMode:"icon"}),dropdownMenuProps:c,children:(0,un.jsx)(mc.__experimentalToolsPanelItem,{label:(0,gu.__)("Display Mode"),isShownByDefault:!0,hasValue:()=>r!=="icon",onDeselect:()=>t({displayMode:"icon"}),children:(0,un.jsxs)(mc.__experimentalToggleGroupControl,{label:(0,gu.__)("Display Mode"),value:r,onChange:u=>t({displayMode:u}),isBlock:!0,__next40pxDefaultSize:!0,children:[(0,un.jsx)(mc.__experimentalToggleGroupControlOption,{value:"icon",label:(0,gu.__)("Icon")}),(0,un.jsx)(mc.__experimentalToggleGroupControlOption,{value:"text",label:(0,gu.__)("Text")}),(0,un.jsx)(mc.__experimentalToggleGroupControlOption,{value:"both",label:(0,gu.__)("Both")})]})})})}),(0,un.jsxs)("button",{...s,type:"button","aria-label":i?void 0:(0,gu.__)("Close"),children:[n&&(0,un.jsx)(Wa,{icon:yp}),i&&(0,un.jsx)(ag.RichText,{identifier:"text",value:l,onChange:u=>t({text:u}),tagName:"span",className:"wp-block-navigation-overlay-close__text",allowedFormats:["core/bold","core/italic"]})]})]})}var lw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/navigation-overlay-close",title:"Navigation Overlay Close",category:"design",description:"A customizable button to close overlays.",keywords:["close","overlay","navigation","menu"],textdomain:"default",attributes:{displayMode:{type:"string",enum:["icon","text","both"],default:"icon"},text:{type:"string"}},supports:{color:{gradients:!1,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{padding:!0,__experimentalDefaultControls:{padding:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},style:"wp-block-navigation-overlay-close"};var sw=o(L(),1),LD=o(v(),1),rJ=(0,LD.jsx)(sw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LD.jsx)(sw.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2Zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12ZM15 8l-3 3-3-3-1.1 1.1 3 3-3 3L9 16.2l3-3 3 3 1.1-1.1-3-3 3-3L15 8Z"})});var{name:aJ}=lw,nJ={icon:rJ,edit:tJ},E_e=()=>((0,oJ.addFilter)("blockEditor.__unstableCanInsertBlockType","core/navigation-overlay-close/restrict-to-overlay-template-parts",(e,t)=>t.name!=="core/navigation-overlay-close"||!e?e:Kv()),E({name:aJ,metadata:lw,settings:nJ}));var RD={};Z(RD,{init:()=>R_e,metadata:()=>cw,name:()=>pJ,settings:()=>dJ});var cw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/pattern",title:"Pattern Placeholder",category:"theme",description:"Show a block pattern.",supports:{html:!1,inserter:!1,renaming:!1,visibility:!1,interactivity:{clientNavigation:!0}},textdomain:"default",attributes:{slug:{type:"string"}}};var cJ=o(W(),1),Lm=o(V(),1),mw=o(U(),1),Mm=o(T(),1),uJ=o(Q(),1),pw=o(P(),1);var iJ=o(V(),1),AD=new WeakMap;function lJ(){let e=(0,iJ.useRegistry)();if(!AD.has(e)){let t=new Map;AD.set(e,L_e.bind(null,t))}return AD.get(e)}function L_e(e,{name:t,blocks:r}){let a=[...r];for(;a.length;){let n=a.shift();for(let i of n.innerBlocks??[])a.unshift(i);n.name==="core/pattern"&&M_e(e,t,n.attributes.slug)}}function M_e(e,t,r){if(e.has(t)||e.set(t,new Set),e.get(t).add(r),sJ(e,t))throw new TypeError(`Pattern ${t} has a circular dependency and cannot be rendered.`)}function sJ(e,t,r=new Set,a=new Set){r.add(t),a.add(t);let n=e.get(t)??new Set;for(let i of n)if(r.has(i)){if(a.has(i))return!0}else if(sJ(e,i,r,a))return!0;return a.delete(t),!1}var uw=o(v(),1),A_e=({attributes:e,clientId:t})=>{let r=(0,Lm.useRegistry)(),a=(0,Lm.useSelect)(g=>g(Mm.store).__experimentalGetParsedPattern(e.slug),[e.slug]),n=(0,Lm.useSelect)(g=>g(uJ.store).getCurrentTheme()?.stylesheet,[]),{replaceBlocks:i,setBlockEditingMode:l,__unstableMarkNextChangeAsNotPersistent:s}=(0,Lm.useDispatch)(Mm.store),{getBlockRootClientId:c,getBlockEditingMode:u}=(0,Lm.useSelect)(Mm.store),[m,p]=(0,mw.useState)(!1),d=lJ();function f(g){return g.innerBlocks.find(b=>b.name==="core/template-part")&&(g.innerBlocks=g.innerBlocks.map(b=>(b.name==="core/template-part"&&b.attributes.theme===void 0&&(b.attributes.theme=n),b))),g.name==="core/template-part"&&g.attributes.theme===void 0&&(g.attributes.theme=n),g}(0,mw.useEffect)(()=>{if(!m&&a?.blocks){try{d(a)}catch{p(!0);return}window.queueMicrotask(()=>{let g=c(t),b=a.blocks.map(k=>(0,cJ.cloneBlock)(f(k)));b.length===1&&a.categories?.length>0&&(b[0].attributes={...b[0].attributes,metadata:{...b[0].attributes.metadata,categories:a.categories,patternName:a.name,name:b[0].attributes.metadata.name||a.title}});let y=u(g);r.batch(()=>{s(),l(g,"default"),s(),i(t,b),s(),l(g,y)})})}},[t,m,a,s,i,u,l,c]);let h=(0,Mm.useBlockProps)();return m?(0,uw.jsx)("div",{...h,children:(0,uw.jsx)(Mm.Warning,{children:(0,pw.sprintf)((0,pw.__)('Pattern "%s" cannot be rendered inside itself.'),a?.name)})}):(0,uw.jsx)("div",{...h})},mJ=A_e;var{name:pJ}=cw,dJ={edit:mJ},R_e=()=>E({name:pJ,metadata:cw,settings:dJ});var HD={};Z(HD,{init:()=>O_e,metadata:()=>dw,name:()=>wJ,settings:()=>CJ});var dw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/page-list",title:"Page List",category:"widgets",allowedBlocks:["core/page-list-item"],description:"Display a list of all pages.",keywords:["menu","navigation"],textdomain:"default",attributes:{parentPageID:{type:"integer",default:0},isNested:{type:"boolean",default:!1}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick","submenuVisibility"],supports:{anchor:!0,reusable:!1,html:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},color:{text:!0,background:!0,link:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},spacing:{padding:!0,margin:!0,__experimentalDefaultControls:{padding:!1,margin:!1}},contentRole:!0},editorStyle:"wp-block-page-list-editor",style:"wp-block-page-list"};var _J=o(W(),1),Aa=o(T(),1),Ma=o(M(),1),La=o(P(),1),us=o(U(),1),xJ=o(Q(),1),hw=o(V(),1);var zD=o(W(),1),fJ=o(V(),1),hJ=o(T(),1);function V_e(e=[]){let t="post-type",r={},a=[];return e.forEach(({id:n,title:i,link:l,type:s,parent:c})=>{let u=r[n]?.innerBlocks??[];r[n]=(0,zD.createBlock)("core/navigation-link",{id:n,label:i.rendered,url:l,type:s,kind:t,metadata:{bindings:Qh(t)}},u),c?(r[c]||(r[c]={innerBlocks:[]}),r[c].innerBlocks.push(r[n])):a.push(r[n])}),a}function gJ(e,t){for(let r of e){if(r.attributes.id===t)return r;if(r.innerBlocks&&r.innerBlocks.length){let a=gJ(r.innerBlocks,t);if(a)return a}}return null}function F_e(e=[],t=null){let r=V_e(e);if(t){let n=gJ(r,t);n&&n.innerBlocks&&(r=n.innerBlocks)}let a=n=>{n.forEach((i,l,s)=>{let{attributes:c,innerBlocks:u}=i;if(u.length!==0){a(u);let m=(0,zD.createBlock)("core/navigation-submenu",c,u);s[l]=m}})};return a(r),r}function vJ({clientId:e,pages:t,parentClientId:r,parentPageID:a}){let{replaceBlock:n,selectBlock:i}=(0,fJ.useDispatch)(hJ.store);return()=>{let l=F_e(t,a);n(e,l),i(r)}}var e2=o(M(),1),VD=o(me(),1),Jv=o(P(),1),Id=o(v(),1),FD=(0,Jv.__)("This Navigation Menu displays your website's pages. Editing it will enable you to add, delete, or reorder pages. However, new pages will no longer be added automatically.");function fw({onClick:e,onClose:t,disabled:r}){return(0,Id.jsxs)(e2.Modal,{onRequestClose:t,title:(0,Jv.__)("Edit Page List"),className:"wp-block-page-list-modal",aria:{describedby:(0,VD.useInstanceId)(fw,"wp-block-page-list-modal__description")},children:[(0,Id.jsx)("p",{id:(0,VD.useInstanceId)(fw,"wp-block-page-list-modal__description"),children:FD}),(0,Id.jsxs)("div",{className:"wp-block-page-list-modal-buttons",children:[(0,Id.jsx)(e2.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,Jv.__)("Cancel")}),(0,Id.jsx)(e2.Button,{__next40pxDefaultSize:!0,variant:"primary",accessibleWhenDisabled:!0,disabled:r,onClick:e,children:(0,Jv.__)("Edit")})]})]})}var St=o(v(),1),bJ=100,yJ=()=>{};function H_e({blockProps:e,innerBlocksProps:t,hasResolvedPages:r,blockList:a,pages:n,parentPageID:i}){if(!r)return(0,St.jsx)("div",{...e,children:(0,St.jsx)("div",{className:"wp-block-page-list__loading-indicator-container",children:(0,St.jsx)(Ma.Spinner,{className:"wp-block-page-list__loading-indicator"})})});if(n===null)return(0,St.jsx)("div",{...e,children:(0,St.jsx)(Ma.Notice,{status:"warning",isDismissible:!1,children:(0,La.__)("Page List: Cannot retrieve Pages.")})});if(n.length===0)return(0,St.jsx)("div",{...e,children:(0,St.jsx)(Ma.Notice,{status:"info",isDismissible:!1,children:(0,La.__)("Page List: Cannot retrieve Pages.")})});if(a.length===0){let l=n.find(s=>s.id===i);return l?.title?.rendered?(0,St.jsx)("div",{...e,children:(0,St.jsx)(Aa.Warning,{children:(0,La.sprintf)((0,La.__)('Page List: "%s" page has no children.'),l.title.rendered)})}):(0,St.jsx)("div",{...e,children:(0,St.jsx)(Ma.Notice,{status:"warning",isDismissible:!1,children:(0,La.__)("Page List: Cannot retrieve Pages.")})})}if(n.length>0)return(0,St.jsx)("ul",{...t})}function kJ({context:e,clientId:t,attributes:r,setAttributes:a}){let{parentPageID:n}=r,[i,l]=(0,us.useState)(!1),s=(0,us.useCallback)(()=>l(!0),[]),c=()=>l(!1),u=q(),{records:m,hasResolved:p}=(0,xJ.useEntityRecords)("postType","page",{per_page:bJ,_fields:["id","link","menu_order","parent","title","type"],orderby:"menu_order",order:"asc"}),d="showSubmenuIcon"in e&&m?.length>0&&m?.length<=bJ,f=(0,us.useMemo)(()=>m===null?new Map:m.sort((A,H)=>A.menu_order===H.menu_order?A.title.rendered.localeCompare(H.title.rendered):A.menu_order-H.menu_order).reduce((A,H)=>{let{parent:F}=H;return A.has(F)?A.get(F).push(H):A.set(F,[H]),A},new Map),[m]),h=(0,Aa.useBlockProps)({className:w("wp-block-page-list",{"has-text-color":!!e.textColor,[(0,Aa.getColorClassName)("color",e.textColor)]:!!e.textColor,"has-background":!!e.backgroundColor,[(0,Aa.getColorClassName)("background-color",e.backgroundColor)]:!!e.backgroundColor,"open-on-click":e.submenuVisibility==="click","open-always":e.submenuVisibility==="always"}),style:{...e.style?.color}}),g=(0,us.useMemo)(function D(A=0,H=0){let F=f.get(A);return F?.length?F.reduce((z,I)=>{let R=f.has(I.id),$={value:I.id,label:"\u2014 ".repeat(H)+I.title.rendered,rawName:I.title.rendered};return z.push($),R&&z.push(...D(I.id,H+1)),z},[]):[]},[f]),b=(0,us.useMemo)(function D(A=n){let H=f.get(A);return H?.length?H.reduce((F,z)=>{let I=f.has(z.id),R={id:z.id,label:z.title?.rendered?.trim()!==""?z.title?.rendered:(0,La.__)("(no title)"),title:z.title?.rendered?.trim()!==""?z.title?.rendered:(0,La.__)("(no title)"),link:z.url,hasChildren:I},$=null,j=D(z.id);return $=(0,_J.createBlock)("core/page-list-item",R,j),F.push($),F},[]):[]},[f,n]),{isNested:y,hasSelectedChild:k,parentClientId:_,hasDraggedChild:x,isChildOfNavigation:S}=(0,hw.useSelect)(D=>{let{getBlockParentsByBlockName:A,hasSelectedInnerBlock:H,hasDraggedInnerBlock:F}=D(Aa.store),z=A(t,"core/navigation-submenu",!0),I=A(t,"core/navigation",!0);return{isNested:z.length>0,isChildOfNavigation:I.length>0,hasSelectedChild:H(t,!0),hasDraggedChild:F(t,!0),parentClientId:I[0]}},[t]),C=vJ({clientId:t,pages:m,parentClientId:_,parentPageID:n}),N=(0,Aa.useInnerBlocksProps)(h,{renderAppender:!1,__unstableDisableDropZone:!0,templateLock:S?!1:"all",onInput:yJ,onChange:yJ,value:b}),{selectBlock:B}=(0,hw.useDispatch)(Aa.store);return(0,us.useEffect)(()=>{(k||x)&&(s(),B(_))},[k,x,_,B,s]),(0,us.useEffect)(()=>{a({isNested:y})},[y,a]),(0,St.jsxs)(St.Fragment,{children:[(g.length>0||d)&&(0,St.jsx)(Aa.InspectorControls,{children:(0,St.jsxs)(Ma.__experimentalToolsPanel,{label:(0,La.__)("Settings"),resetAll:()=>{a({parentPageID:0})},dropdownMenuProps:u,children:[g.length>0&&(0,St.jsx)(Ma.__experimentalToolsPanelItem,{label:(0,La.__)("Parent Page"),hasValue:()=>n!==0,onDeselect:()=>a({parentPageID:0}),isShownByDefault:!0,children:(0,St.jsx)(Ma.ComboboxControl,{__next40pxDefaultSize:!0,className:"editor-page-attributes__parent",label:(0,La.__)("Parent"),value:n,options:g,onChange:D=>a({parentPageID:D??0}),help:(0,La.__)("Choose a page to show only its subpages.")})}),d&&(0,St.jsxs)("div",{style:{gridColumn:"1 / -1"},children:[(0,St.jsx)("p",{children:FD}),(0,St.jsx)(Ma.Button,{__next40pxDefaultSize:!0,variant:"primary",accessibleWhenDisabled:!0,disabled:!p,onClick:C,children:(0,La.__)("Edit")})]})]})}),d&&(0,St.jsxs)(St.Fragment,{children:[(0,St.jsx)(Aa.BlockControls,{group:"other",children:(0,St.jsx)(Ma.ToolbarButton,{title:(0,La.__)("Edit"),onClick:s,children:(0,La.__)("Edit")})}),i&&(0,St.jsx)(fw,{onClick:C,onClose:c,disabled:!p})]}),(0,St.jsx)(H_e,{blockProps:h,innerBlocksProps:N,hasResolvedPages:p,blockList:b,pages:m,parentPageID:n})]})}var{name:wJ}=dw,CJ={icon:$T,example:{},edit:kJ},O_e=()=>E({name:wJ,metadata:dw,settings:CJ});var WD={};Z(WD,{init:()=>G_e,metadata:()=>gw,name:()=>PJ,settings:()=>BJ});var gw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/page-list-item",title:"Page List Item",category:"widgets",parent:["core/page-list"],description:"Displays a page inside a list of all pages.",keywords:["page","menu","navigation"],textdomain:"default",attributes:{id:{type:"number"},label:{type:"string"},title:{type:"string"},link:{type:"string"},hasChildren:{type:"boolean"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick","submenuVisibility"],supports:{anchor:!0,reusable:!1,html:!1,lock:!1,inserter:!1,__experimentalToolbar:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-page-list-editor",style:"wp-block-page-list"};var bw=o(T(),1),SJ=o(V(),1),UD=o(Q(),1),GD=o(ai(),1);var vw=o(M(),1),OD=o(v(),1),jD=()=>(0,OD.jsx)(vw.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,OD.jsx)(vw.Path,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"})});var mn=o(v(),1);function U_e(){return(0,SJ.useSelect)(e=>{if(!e(UD.store).canUser("read",{kind:"root",name:"site"}))return;let r=e(UD.store).getEntityRecord("root","site");return r?.show_on_front==="page"&&r?.page_on_front},[])}function TJ({context:e,attributes:t}){let{id:r,label:a,link:n,hasChildren:i,title:l}=t,s="showSubmenuIcon"in e,c=U_e(),u=e.submenuVisibility,m=u==="click",p=_d(e,!0),d=u3(p),f=(0,bw.useBlockProps)(d,{className:"wp-block-pages-list__item"}),h=(0,bw.useInnerBlocksProps)(f);return(0,mn.jsxs)("li",{className:w("wp-block-pages-list__item",{"has-child":i,"wp-block-navigation-item":s,"open-on-click":m,"open-always":u==="always","open-on-hover-click":u==="hover"&&e.showSubmenuIcon,"menu-item-home":r===c}),children:[i&&m?(0,mn.jsxs)(mn.Fragment,{children:[(0,mn.jsx)("button",{type:"button",className:"wp-block-navigation-item__content wp-block-navigation-submenu__toggle","aria-expanded":"false",dangerouslySetInnerHTML:{__html:(0,GD.safeHTML)(a)}}),(0,mn.jsx)("span",{className:"wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon",children:(0,mn.jsx)(jD,{})})]}):(0,mn.jsx)("a",{className:w("wp-block-pages-list__item__link",{"wp-block-navigation-item__content":s}),href:n,dangerouslySetInnerHTML:{__html:(0,GD.safeHTML)(l)}}),i&&(0,mn.jsxs)(mn.Fragment,{children:[!m&&e.showSubmenuIcon&&(0,mn.jsx)("button",{className:"wp-block-navigation-item__content wp-block-navigation-submenu__toggle wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon","aria-expanded":"false",type:"button",children:(0,mn.jsx)(jD,{})}),(0,mn.jsx)("ul",{...h})]})]},r)}var{name:PJ}=gw,BJ={__experimentalLabel:({label:e})=>e,icon:Fc,example:{},edit:TJ},G_e=()=>E({name:PJ,metadata:gw,settings:BJ});var YD={};Z(YD,{init:()=>J_e,metadata:()=>ug,name:()=>Sw,settings:()=>Cw});var ww=o(P(),1);var $J=o(W(),1);var IJ=o(U(),1),go=o(T(),1),$D=o(P(),1),pc=o(v(),1),ng={className:!1},qD={align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:""},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},textColor:{type:"string"},backgroundColor:{type:"string"},fontSize:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]},style:{type:"object"}},yw=e=>{if(!e.customTextColor&&!e.customBackgroundColor&&!e.customFontSize)return e;let t={};(e.customTextColor||e.customBackgroundColor)&&(t.color={}),e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),e.customFontSize&&(t.typography={fontSize:e.customFontSize});let{customTextColor:r,customBackgroundColor:a,customFontSize:n,...i}=e;return{...i,style:t}},ig=e=>{let{align:t,...r}=e;return t?{...r,style:{...e.style,typography:{...e.style?.typography,textAlign:t}}}:e},{style:zZe,...t2}=qD,W_e=[{supports:{className:!1,typography:{fontSize:!0}},attributes:qD,isEligible(e){return!!e.align||!!e.className?.match(/\bhas-text-align-(left|center|right)\b/)},save({attributes:e}){let{align:t,content:r,dropCap:a,direction:n}=e,i=w({"has-drop-cap":t===((0,$D.isRTL)()?"left":"right")||t==="center"?!1:a,[`has-text-align-${t}`]:t});return(0,pc.jsx)("p",{...go.useBlockProps.save({className:i,dir:n}),children:(0,pc.jsx)(go.RichText.Content,{value:r})})},migrate:ig},{supports:ng,attributes:{...t2,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:ig,save({attributes:e}){let{align:t,content:r,dropCap:a,direction:n}=e,i=w({"has-drop-cap":t===((0,$D.isRTL)()?"left":"right")||t==="center"?!1:a,[`has-text-align-${t}`]:t});return(0,pc.jsx)("p",{...go.useBlockProps.save({className:i,dir:n}),children:(0,pc.jsx)(go.RichText.Content,{value:r})})}},{supports:ng,attributes:{...t2,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate(e){return yw(ig(e))},save({attributes:e}){let{align:t,content:r,dropCap:a,backgroundColor:n,textColor:i,customBackgroundColor:l,customTextColor:s,fontSize:c,customFontSize:u,direction:m}=e,p=(0,go.getColorClassName)("color",i),d=(0,go.getColorClassName)("background-color",n),f=(0,go.getFontSizeClass)(c),h=w({"has-text-color":i||s,"has-background":n||l,"has-drop-cap":a,[`has-text-align-${t}`]:t,[f]:f,[p]:p,[d]:d}),g={backgroundColor:d?void 0:l,color:p?void 0:s,fontSize:f?void 0:u};return(0,pc.jsx)(go.RichText.Content,{tagName:"p",style:g,className:h||void 0,value:r,dir:m})}},{supports:ng,attributes:{...t2,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate(e){return yw(ig(e))},save({attributes:e}){let{align:t,content:r,dropCap:a,backgroundColor:n,textColor:i,customBackgroundColor:l,customTextColor:s,fontSize:c,customFontSize:u,direction:m}=e,p=(0,go.getColorClassName)("color",i),d=(0,go.getColorClassName)("background-color",n),f=(0,go.getFontSizeClass)(c),h=w({"has-text-color":i||s,"has-background":n||l,"has-drop-cap":a,[f]:f,[p]:p,[d]:d}),g={backgroundColor:d?void 0:l,color:p?void 0:s,fontSize:f?void 0:u,textAlign:t};return(0,pc.jsx)(go.RichText.Content,{tagName:"p",style:g,className:h||void 0,value:r,dir:m})}},{supports:ng,attributes:{...t2,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"},width:{type:"string"}},migrate(e){return yw(ig(e))},save({attributes:e}){let{width:t,align:r,content:a,dropCap:n,backgroundColor:i,textColor:l,customBackgroundColor:s,customTextColor:c,fontSize:u,customFontSize:m}=e,p=(0,go.getColorClassName)("color",l),d=(0,go.getColorClassName)("background-color",i),f=u&&`is-${u}-text`,h=w({[`align${t}`]:t,"has-background":i||s,"has-drop-cap":n,[f]:f,[p]:p,[d]:d}),g={backgroundColor:d?void 0:s,color:p?void 0:c,fontSize:f?void 0:m,textAlign:r};return(0,pc.jsx)(go.RichText.Content,{tagName:"p",style:g,className:h||void 0,value:a})}},{supports:ng,attributes:{...t2,fontSize:{type:"number"}},save({attributes:e}){let{width:t,align:r,content:a,dropCap:n,backgroundColor:i,textColor:l,fontSize:s}=e,c=w({[`align${t}`]:t,"has-background":i,"has-drop-cap":n});return(0,pc.jsx)("p",{style:{backgroundColor:i,color:l,fontSize:s,textAlign:r},className:c||void 0,children:a})},migrate(e){return yw(ig({...e,customFontSize:Number.isFinite(e.fontSize)?e.fontSize:void 0,customTextColor:e.textColor&&e.textColor[0]==="#"?e.textColor:void 0,customBackgroundColor:e.backgroundColor&&e.backgroundColor[0]==="#"?e.backgroundColor:void 0}))}},{supports:ng,attributes:{...qD,content:{type:"string",source:"html",default:""}},save({attributes:e}){return(0,pc.jsx)(IJ.RawHTML,{children:e.content})},migrate:e=>e}],NJ=W_e;var Un=o(P(),1),cg=o(M(),1),Gn=o(T(),1),HJ=o(W(),1);var EJ=o(U(),1),DJ=o(me(),1),LJ=o(As(),1),lg=o(V(),1),ZD=o(T(),1),sg=o(W(),1);function MJ(e){let{batch:t}=(0,lg.useRegistry)(),{moveBlocksToPosition:r,replaceInnerBlocks:a,duplicateBlocks:n,insertBlock:i}=(0,lg.useDispatch)(ZD.store),{getBlockRootClientId:l,getBlockIndex:s,getBlockOrder:c,getBlockName:u,getBlock:m,getNextBlockClientId:p,canInsertBlockType:d}=(0,lg.useSelect)(ZD.store),f=(0,EJ.useRef)(e);return f.current=e,(0,DJ.useRefEffect)(h=>{function g(b){if(b.defaultPrevented||b.keyCode!==LJ.ENTER)return;let{content:y,clientId:k}=f.current;if(y.length)return;let _=l(k);if(!(0,sg.hasBlockSupport)(u(_),"__experimentalOnEnter",!1))return;let x=c(_),S=x.indexOf(k);if(S===x.length-1){let B=_;for(;!d(u(k),l(B));)B=l(B);typeof B=="string"&&(b.preventDefault(),r([k],_,l(B),s(B)+1));return}let C=(0,sg.getDefaultBlockName)();if(!d(C,l(_)))return;b.preventDefault();let N=m(_);t(()=>{n([_]);let B=s(_);a(_,N.innerBlocks.slice(0,S)),a(p(_),N.innerBlocks.slice(S+1)),i((0,sg.createBlock)(C),B+1,l(_),!0)})}return h.addEventListener("keydown",g),()=>{h.removeEventListener("keydown",g)}},[])}var AJ=o(me(),1),_w=o(U(),1),RJ=o(Ff(),1),zJ=o(V(),1),VJ=o(T(),1);function FJ(e,t,r){let{__unstableMarkNextChangeAsNotPersistent:a}=(0,zJ.useDispatch)(VJ.store),n=(0,AJ.useEvent)(()=>{(0,RJ.default)("align attribute in paragraph block",{alternative:"style.typography.textAlign",since:"7.0"}),a(),r({style:{...t,typography:{...t?.typography,textAlign:e}}})}),i=(0,_w.useRef)();(0,_w.useEffect)(()=>{e==="full"||e==="wide"||e===i.current||(i.current=e,n())},[e,n])}var Li=o(v(),1);function $_e({direction:e,setDirection:t}){return(0,Un.isRTL)()&&(0,Li.jsx)(cg.ToolbarButton,{icon:O9,title:(0,Un._x)("Left to right","editor button"),isActive:e==="ltr",onClick:()=>{t(e==="ltr"?void 0:"ltr")}})}function KD(e){return e===((0,Un.isRTL)()?"left":"right")||e==="center"}function q_e({clientId:e,attributes:t,setAttributes:r,name:a}){let[n]=(0,Gn.useSettings)("typography.dropCap");if(!n)return null;let{style:i,dropCap:l}=t,s=i?.typography?.textAlign,c;KD(s)?c=(0,Un.__)("Not available for aligned text."):l?c=(0,Un.__)("Showing large initial letter."):c=(0,Un.__)("Show a large initial letter.");let u=(0,HJ.getBlockSupport)(a,"typography.defaultControls.dropCap",!1);return(0,Li.jsx)(Gn.InspectorControls,{group:"typography",children:(0,Li.jsx)(cg.__experimentalToolsPanelItem,{hasValue:()=>!!l,label:(0,Un.__)("Drop cap"),isShownByDefault:u,onDeselect:()=>r({dropCap:!1}),resetAllFilter:()=>({dropCap:!1}),panelId:e,children:(0,Li.jsx)(cg.ToggleControl,{label:(0,Un.__)("Drop cap"),checked:!!l,onChange:()=>r({dropCap:!l}),help:c,disabled:KD(s)})})})}function Z_e({attributes:e,mergeBlocks:t,onReplace:r,onRemove:a,setAttributes:n,clientId:i,isSelected:l,name:s}){let{content:c,direction:u,dropCap:m,placeholder:p,style:d}=e,f=d?.typography?.textAlign;FJ(e.align,d,n);let h=(0,Gn.useBlockProps)({ref:MJ({clientId:i,content:c}),className:w({"has-drop-cap":KD(f)?!1:m}),style:{direction:u}}),g=(0,Gn.useBlockEditingMode)();return(0,Li.jsxs)(Li.Fragment,{children:[g==="default"&&(0,Li.jsx)(Gn.BlockControls,{group:"block",children:(0,Li.jsx)($_e,{direction:u,setDirection:b=>n({direction:b})})}),l&&(0,Li.jsx)(q_e,{name:s,clientId:i,attributes:e,setAttributes:n}),(0,Li.jsx)(Gn.RichText,{identifier:"content",tagName:"p",...h,value:c,onChange:b=>n({content:b}),onMerge:t,onReplace:r,onRemove:a,"aria-label":Gn.RichText.isEmpty(c)?(0,Un.__)("Empty block; start writing or type forward slash to choose a block"):(0,Un.__)("Block: Paragraph"),"data-empty":Gn.RichText.isEmpty(c),placeholder:p||(0,Un.__)("Type / to choose a block"),"data-custom-placeholder":p?!0:void 0,__unstableEmbedURLOnPaste:!0,__unstableAllowPrefixTransformations:!0})]})}var OJ=Z_e;var ug={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/paragraph",title:"Paragraph",category:"text",description:"Start with the basic building block of all narrative.",keywords:["text"],textdomain:"default",attributes:{content:{type:"rich-text",source:"rich-text",selector:"p",role:"content"},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]}},supports:{align:["wide","full"],splitting:!0,anchor:!0,className:!1,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,textAlign:!0,textColumns:!0,textIndent:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalWritingMode:!0,fitText:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalSelector:"p",__unstablePasteTextInline:!0,interactivity:{clientNavigation:!0}},selectors:{root:"p",typography:{textIndent:".wp-block-paragraph + .wp-block-paragraph"}},editorStyle:"wp-block-paragraph-editor",style:"wp-block-paragraph"};var xw=o(T(),1),jJ=o(P(),1),QD=o(v(),1);function UJ({attributes:e}){let{content:t,dropCap:r,direction:a,style:n}=e,i=n?.typography?.textAlign,l=w({"has-drop-cap":i===((0,jJ.isRTL)()?"left":"right")||i==="center"?!1:r});return(0,QD.jsx)("p",{...xw.useBlockProps.save({className:l,dir:a}),children:(0,QD.jsx)(xw.RichText.Content,{value:t})})}var kw=o(W(),1);var{name:GJ}=ug,Q_e={from:[{type:"raw",priority:20,selector:"p",schema:({phrasingContentSchema:e,isPaste:t})=>({p:{children:e,attributes:t?[]:["style","id"]}}),transform(e){let t=(0,kw.getBlockAttributes)(GJ,e.outerHTML),{textAlign:r}=e.style||{};return(r==="left"||r==="center"||r==="right")&&(t.style={...t.style,typography:{...t.style?.typography,textAlign:r}}),(0,kw.createBlock)(GJ,t)}}]},WJ=Q_e;var{fieldsKey:Y_e,formKey:X_e}=K($J.privateApis),{name:Sw}=ug,Cw={icon:ZT,example:{attributes:{content:(0,ww.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.")}},__experimentalLabel(e,{context:t}){let r=e?.metadata?.name;if((t==="list-view"||t==="breadcrumb")&&r)return r;if(t==="accessibility"){if(r)return r;let{content:a}=e;return!a||a.length===0?(0,ww.__)("Empty"):a}},transforms:WJ,deprecated:NJ,merge(e,t){return{content:(e.content||"")+(t.content||"")}},edit:OJ,save:UJ};window.__experimentalContentOnlyInspectorFields&&(Cw[Y_e]=[{id:"content",label:(0,ww.__)("Content"),type:"text",Edit:"rich-text"}],Cw[X_e]={fields:["content"]});var J_e=()=>E({name:Sw,metadata:ug,settings:Cw});var eL={};Z(eL,{init:()=>ixe,metadata:()=>Tw,name:()=>JJ,settings:()=>eee});var Tw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/playlist",title:"Playlist",category:"media",description:"Embed a simple playlist.",keywords:["music","sound"],textdomain:"default",allowedBlocks:["core/playlist-track"],attributes:{currentTrack:{type:"string"},type:{type:"string",default:"audio"},order:{type:"string",default:"asc"},showTracklist:{type:"boolean",default:!0},showImages:{type:"boolean",default:!0},showArtists:{type:"boolean",default:!0},showNumbers:{type:"boolean",default:!0},caption:{type:"string"}},providesContext:{showArtists:"showArtists",currentTrack:"currentTrack"},supports:{anchor:!0,align:!0,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},interactivity:!0,spacing:{margin:!0,padding:!0}},editorStyle:"wp-block-playlist-editor",style:"wp-block-playlist"};var Pw,txe=new Uint8Array(16);function XD(){if(!Pw&&(Pw=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Pw))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Pw(txe)}var ca=[];for(let e=0;e<256;++e)ca.push((e+256).toString(16).slice(1));function qJ(e,t=0){return ca[e[t+0]]+ca[e[t+1]]+ca[e[t+2]]+ca[e[t+3]]+"-"+ca[e[t+4]]+ca[e[t+5]]+"-"+ca[e[t+6]]+ca[e[t+7]]+"-"+ca[e[t+8]]+ca[e[t+9]]+"-"+ca[e[t+10]]+ca[e[t+11]]+ca[e[t+12]]+ca[e[t+13]]+ca[e[t+14]]+ca[e[t+15]]}var rxe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),JD={randomUUID:rxe};function oxe(e,t,r){if(JD.randomUUID&&!t&&!e)return JD.randomUUID();e=e||{};let a=e.random||(e.rng||XD)();if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,t){r=r||0;for(let n=0;n<16;++n)t[r+n]=a[n];return t}return qJ(a)}var Am=oxe;var vu=o(U(),1),Or=o(T(),1),vo=o(M(),1),Nd=o(V(),1),KJ=o(xr(),1),At=o(P(),1);var Rm=o(ai(),1),QJ=o(W(),1);var Oe=o(v(),1),ZJ=["audio"],axe=({track:e,showImages:t,onTrackEnd:r})=>{let a={dangerouslySetInnerHTML:{__html:(0,Rm.safeHTML)(e?.title?e.title:(0,At.__)("Untitled"))}},n={dangerouslySetInnerHTML:{__html:(0,Rm.safeHTML)(e?.artist?e.artist:(0,At.__)("Unknown artist"))}},i={dangerouslySetInnerHTML:{__html:(0,Rm.safeHTML)(e?.album?e.album:(0,At.__)("Unknown album"))}},l;return e?.title&&e?.artist&&e?.album?l=(0,Rm.__unstableStripHTML)((0,At.sprintf)((0,At._x)("%1$s by %2$s from the album %3$s","track title, artist name, album name"),e?.title,e?.artist,e?.album)):e?.title?l=(0,Rm.__unstableStripHTML)(e.title):l=(0,Rm.__unstableStripHTML)((0,At.__)("Untitled")),(0,Oe.jsxs)(Oe.Fragment,{children:[(0,Oe.jsxs)("div",{className:"wp-block-playlist__current-item",children:[t&&e?.image&&(0,Oe.jsx)("img",{className:"wp-block-playlist__item-image",src:e.image,alt:"",width:"70px",height:"70px"}),(0,Oe.jsxs)("div",{children:[e?.title?(0,Oe.jsx)("span",{className:"wp-block-playlist__item-title",...a}):(0,Oe.jsx)("span",{className:"wp-block-playlist__item-title",children:(0,Oe.jsx)(vo.Spinner,{})}),(0,Oe.jsxs)("div",{className:"wp-block-playlist__current-item-artist-album",children:[(0,Oe.jsx)("span",{className:"wp-block-playlist__item-artist",...n}),(0,Oe.jsx)("span",{className:"wp-block-playlist__item-album",...i})]})]})]}),(0,Oe.jsx)("audio",{controls:"controls",src:e?.url?e.url:"",onEnded:r,"aria-label":l,tabIndex:0})]})},nxe=({attributes:e,setAttributes:t,isSelected:r,insertBlocksAfter:a,clientId:n})=>{let{order:i,showTracklist:l,showNumbers:s,showImages:c,showArtists:u,currentTrack:m}=e,[p,d]=(0,vu.useState)(0),f=(0,Or.useBlockProps)(),{replaceInnerBlocks:h,__unstableMarkNextChangeAsNotPersistent:g}=(0,Nd.useDispatch)(Or.store),{createErrorNotice:b}=(0,Nd.useDispatch)(KJ.store),y=q();function k(R){b(R,{type:"snackbar"})}let{updateBlockAttributes:_}=(0,Nd.useDispatch)(Or.store),{innerBlockTracks:x}=(0,Nd.useSelect)(R=>{let{getBlock:$}=R(Or.store);return{innerBlockTracks:$(n)?.innerBlocks??[]}},[n]);(0,vu.useEffect)(()=>{let R=new Set,$=!1,j=x.map(G=>R.has(G.attributes.uniqueId)?($=!0,{...G,attributes:{...G.attributes,uniqueId:Am()}}):(R.add(G.attributes.uniqueId),G));$&&h(n,j)},[x,n,h]);let S=x.filter(R=>!!R.attributes.uniqueId),C=S.map(R=>R.attributes),N=S[0]?.attributes?.uniqueId;(0,vu.useEffect)(()=>{C.length===0?m!==null&&_(n,{currentTrack:null}):N&&N!==m&&_(n,{currentTrack:N})},[C,m,N,n,_]);let B=(0,vu.useCallback)(R=>{if(!R)return;Array.isArray(R)||(R=[R]);let $=O=>({id:O.id||O.url,uniqueId:Am(),src:O.url,title:O.title,artist:O.artist||O?.meta?.artist||O?.media_details?.artist||(0,At.__)("Unknown artist"),album:O.album||O?.meta?.album||O?.media_details?.album||(0,At.__)("Unknown album"),length:O?.fileLength||O?.media_details?.length_formatted,image:O?.image?.src&&O?.image?.src.endsWith("/images/media/audio.svg")?"":O?.image?.src}),j=R.map($);g(),t({currentTrack:j.length>0?j[0].uniqueId:null});let G=j.map(O=>(0,QJ.createBlock)("core/playlist-track",O));h(n,G)},[g,t,h,n]),D=(0,vu.useCallback)(()=>{if(p<C.length-1)C[p+1]?.uniqueId&&(d(p+1),t({currentTrack:C[p+1].uniqueId}));else if(d(0),C[0].uniqueId)t({currentTrack:C[0].uniqueId});else if(C.length>0){let R=C.find($=>$.uniqueId!==void 0);R&&t({currentTrack:R.uniqueId})}},[t,p,C]),A=(0,vu.useCallback)(R=>{let $=[...x].sort((G,O)=>{let J=G.attributes.title||"",ee=O.attributes.title||"";return R==="asc"?J.localeCompare(ee):ee.localeCompare(J)}),j=$.map(G=>G.attributes);h(n,$),t({order:R,currentTrack:j.length>0&&j[0].uniqueId!==m?j[0].uniqueId:m})},[n,m,x,h,t]);function H(R){return $=>{t({[R]:$})}}let F=(0,Nd.useSelect)(R=>R(Or.store).hasSelectedInnerBlock(n),[n]),I=(0,Or.useInnerBlocksProps)(f,{__experimentalAppenderTagName:"li",renderAppender:(r||F)&&Or.InnerBlocks.ButtonBlockAppender});return!C||Array.isArray(C)&&C.length===0?(0,Oe.jsx)("div",{...f,className:w("is-placeholder",f.className),children:(0,Oe.jsx)(Or.MediaPlaceholder,{icon:(0,Oe.jsx)(Or.BlockIcon,{icon:ni}),labels:{title:(0,At.__)("Playlist"),instructions:(0,At.__)("Upload an audio file or pick one from your media library.")},onSelect:B,accept:"audio/*",multiple:!0,allowedTypes:ZJ,onError:k})}):(0,Oe.jsxs)(Oe.Fragment,{children:[(0,Oe.jsx)(Or.BlockControls,{group:"other",children:(0,Oe.jsx)(Or.MediaReplaceFlow,{name:(0,At.__)("Edit"),onSelect:B,accept:"audio/*",multiple:!0,mediaIds:C.filter(R=>R.id).map(R=>R.id),allowedTypes:ZJ,onError:k})}),(0,Oe.jsx)(Or.InspectorControls,{children:(0,Oe.jsxs)(vo.__experimentalToolsPanel,{label:(0,At.__)("Settings"),resetAll:()=>{t({showTracklist:!0,showArtists:!0,showNumbers:!0,showImages:!0,order:"asc"})},dropdownMenuProps:y,children:[(0,Oe.jsx)(vo.__experimentalToolsPanelItem,{label:(0,At.__)("Show Tracklist"),isShownByDefault:!0,hasValue:()=>l!==!0,onDeselect:()=>t({showTracklist:!0}),children:(0,Oe.jsx)(vo.ToggleControl,{label:(0,At.__)("Show Tracklist"),onChange:H("showTracklist"),checked:l})}),l&&(0,Oe.jsxs)(Oe.Fragment,{children:[(0,Oe.jsx)(vo.__experimentalToolsPanelItem,{label:(0,At.__)("Show artist name in Tracklist"),isShownByDefault:!0,hasValue:()=>u!==!0,onDeselect:()=>t({showArtists:!0}),children:(0,Oe.jsx)(vo.ToggleControl,{label:(0,At.__)("Show artist name in Tracklist"),onChange:H("showArtists"),checked:u})}),(0,Oe.jsx)(vo.__experimentalToolsPanelItem,{label:(0,At.__)("Show number in Tracklist"),isShownByDefault:!0,hasValue:()=>s!==!0,onDeselect:()=>t({showNumbers:!0}),children:(0,Oe.jsx)(vo.ToggleControl,{label:(0,At.__)("Show number in Tracklist"),onChange:H("showNumbers"),checked:s})})]}),(0,Oe.jsx)(vo.__experimentalToolsPanelItem,{label:(0,At.__)("Show images"),isShownByDefault:!0,hasValue:()=>c!==!0,onDeselect:()=>t({showImages:!0}),children:(0,Oe.jsx)(vo.ToggleControl,{label:(0,At.__)("Show images"),onChange:H("showImages"),checked:c})}),(0,Oe.jsx)(vo.__experimentalToolsPanelItem,{label:(0,At.__)("Order"),isShownByDefault:!0,hasValue:()=>i!=="asc",onDeselect:()=>t({order:"asc"}),children:(0,Oe.jsx)(vo.SelectControl,{__next40pxDefaultSize:!0,label:(0,At.__)("Order"),value:i,options:[{label:(0,At.__)("Descending"),value:"desc"},{label:(0,At.__)("Ascending"),value:"asc"}],onChange:R=>A(R)})})]})}),(0,Oe.jsxs)("figure",{...f,children:[(0,Oe.jsx)(vo.Disabled,{isDisabled:!r,children:(0,Oe.jsx)(axe,{track:C[p],showImages:c,onTrackEnd:D})}),l&&(0,Oe.jsx)("ol",{className:w("wp-block-playlist__tracklist",{"wp-block-playlist__tracklist-show-numbers":s}),children:I.children}),(0,Oe.jsx)(_a,{attributes:e,setAttributes:t,isSelected:r,insertBlocksAfter:a,label:(0,At.__)("Playlist caption text"),showToolbarButton:r,style:{marginTop:16}})]})]})},YJ=nxe;var bu=o(T(),1),r2=o(v(),1);function XJ({attributes:e}){let{caption:t,showNumbers:r,showTracklist:a,showArtists:n}=e,i=bu.useBlockProps.save(),l=bu.useInnerBlocksProps.save(i);return(0,r2.jsxs)("figure",{...l,children:[(0,r2.jsx)("ol",{className:w("wp-block-playlist__tracklist",{"wp-block-playlist__tracklist-is-hidden":!a,"wp-block-playlist__tracklist-artist-is-hidden":!n,"wp-block-playlist__tracklist-show-numbers":r}),children:l.children}),!bu.RichText.isEmpty(t)&&(0,r2.jsx)(bu.RichText.Content,{tagName:"figcaption",className:(0,bu.__experimentalGetElementClassName)("caption"),value:t})]})}var{name:JJ}=Tw,eee={icon:ni,edit:YJ,save:XJ},ixe=()=>E({name:JJ,metadata:Tw,settings:eee});var rL={};Z(rL,{init:()=>uxe,metadata:()=>Bw,name:()=>nee,settings:()=>iee});var Bw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/playlist-track",title:"Playlist track",category:"media",parent:["core/playlist"],description:"Playlist track.",keywords:["music","sound"],textdomain:"default",usesContext:["showArtists","currentTrack"],attributes:{blob:{type:"string",role:"local"},id:{type:"number"},uniqueId:{type:"string"},src:{type:"string"},type:{type:"string",default:"audio"},album:{type:"string"},artist:{type:"string"},image:{type:"string"},length:{type:"string"},title:{type:"string"}},supports:{html:!1,interactivity:{clientNavigation:!0},reusable:!1},style:"wp-block-playlist-track"};var tee=o(Rr(),1),Iw=o(U(),1),bo=o(T(),1),Mi=o(M(),1),ree=o(V(),1),oee=o(xr(),1),eo=o(P(),1);var o2=o(ai(),1);var _t=o(v(),1),tL=["audio"],sxe=["image"],cxe=({attributes:e,setAttributes:t,context:r})=>{let{id:a,uniqueId:n,src:i,album:l,artist:s,image:c,length:u,title:m}=e,[p,d]=(0,Iw.useState)(e.blob),f=r?.showArtists,h=r?.currentTrack,g=(0,Iw.useRef)(),b=(0,bo.useBlockProps)(),{createErrorNotice:y}=(0,ree.useDispatch)(oee.store);function k(C){y(C,{type:"snackbar"})}Es({src:p,allowedTypes:tL,onChange:_,onError:k});function _(C){if(!C||!C.url){t({blob:void 0,id:void 0,uniqueId:void 0,artist:void 0,album:void 0,image:void 0,length:void 0,title:void 0,url:void 0}),d();return}if((0,tee.isBlobURL)(C.url)){d(C.url);return}t({blob:void 0,id:C.id,uniqueId:Am(),src:C.url,artist:C.artist||C?.meta?.artist||C?.media_details?.artist||(0,eo.__)("Unknown artist"),album:C.album||C?.meta?.album||C?.media_details?.album||(0,eo.__)("Unknown album"),image:C?.image?.src&&C?.image?.src.endsWith("/images/media/audio.svg")?"":C?.image?.src,length:C?.fileLength||C?.media_details?.length_formatted,title:C.title}),d()}function x(C){t({image:C.url})}function S(){t({image:void 0}),g.current.focus()}return!i&&!p?(0,_t.jsx)("div",{...b,children:(0,_t.jsx)(bo.MediaPlaceholder,{icon:(0,_t.jsx)(bo.BlockIcon,{icon:ni}),labels:{title:(0,eo.__)("Track"),instructions:(0,eo.__)("Upload an audio file or pick one from your media library.")},onSelect:_,accept:"audio/*",allowedTypes:tL,value:e,onError:k})}):(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(bo.BlockControls,{group:"other",children:(0,_t.jsx)(bo.MediaReplaceFlow,{name:(0,eo.__)("Replace"),onSelect:_,accept:"audio/*",mediaId:a,mediaURL:i,allowedTypes:tL,onError:k})}),(0,_t.jsx)(bo.InspectorControls,{children:(0,_t.jsxs)(Mi.PanelBody,{title:(0,eo.__)("Settings"),children:[(0,_t.jsx)(Mi.TextControl,{__next40pxDefaultSize:!0,label:(0,eo.__)("Artist"),value:s?(0,o2.__unstableStripHTML)(s):"",onChange:C=>{t({artist:C})}}),(0,_t.jsx)(Mi.TextControl,{__next40pxDefaultSize:!0,label:(0,eo.__)("Album"),value:l?(0,o2.__unstableStripHTML)(l):"",onChange:C=>{t({album:C})}}),(0,_t.jsx)(Mi.TextControl,{__next40pxDefaultSize:!0,label:(0,eo.__)("Title"),value:m?(0,o2.__unstableStripHTML)(m):"",placeholder:m?(0,o2.__unstableStripHTML)(m):"",onChange:C=>{t({title:C})}}),(0,_t.jsx)(bo.MediaUploadCheck,{children:(0,_t.jsxs)("div",{className:"editor-video-poster-control",children:[(0,_t.jsx)(Mi.BaseControl.VisualLabel,{children:(0,eo.__)("Album cover image")}),!!c&&(0,_t.jsx)("img",{src:c,alt:(0,eo.__)("Preview of the album cover image")}),(0,_t.jsx)(bo.MediaUpload,{title:(0,eo.__)("Select image"),onSelect:x,allowedTypes:sxe,render:({open:C})=>(0,_t.jsx)(Mi.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:C,ref:g,children:c?(0,eo.__)("Replace"):(0,eo.__)("Select")})}),!!c&&(0,_t.jsx)(Mi.Button,{__next40pxDefaultSize:!0,onClick:S,variant:"tertiary",children:(0,eo.__)("Remove")})]})})]})}),(0,_t.jsxs)("li",{...b,children:[!!p&&(0,_t.jsx)(Mi.Spinner,{}),(0,_t.jsxs)("button",{className:"wp-block-playlist-track__button","data-wp-context":JSON.stringify({uniqueId:n}),"aria-current":h===n?"true":"false",children:[(0,_t.jsxs)("span",{className:"wp-block-playlist-track__content",children:[(0,_t.jsx)(bo.RichText,{tagName:"span",className:"wp-block-playlist-track__title",value:m,placeholder:(0,eo.__)("Add title"),onChange:C=>{t({title:C})},allowedFormats:[],withoutInteractiveFormatting:!0}),f&&(0,_t.jsx)(bo.RichText,{tagName:"span",className:"wp-block-playlist-track__artist",value:s,placeholder:(0,eo.__)("Add artist"),onChange:C=>t({artist:C}),allowedFormats:[],withoutInteractiveFormatting:!0})]}),(0,_t.jsxs)("span",{className:"wp-block-playlist-track__length",children:[u&&(0,_t.jsx)("span",{className:"screen-reader-text",children:(0,eo.__)("Length:")}),u]}),(0,_t.jsx)("span",{className:"screen-reader-text",children:(0,eo.__)("Select to play this track")})]})]})]})},aee=cxe;var{name:nee}=Bw,iee={icon:ni,edit:aee},uxe=()=>E({name:nee,metadata:Bw,settings:iee});var aL={};Z(aL,{init:()=>gxe,metadata:()=>Nw,name:()=>hee,settings:()=>gee});var fee=o(P(),1);var Nw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-author",title:"Author (deprecated)",category:"theme",description:"This block is deprecated. Please use the Avatar block, the Author Name block, and the Author Biography block instead.",textdomain:"default",attributes:{textAlign:{type:"string"},avatarSize:{type:"number",default:48},showAvatar:{type:"boolean",default:!0},showBio:{type:"boolean"},byline:{type:"string"},isLink:{type:"boolean",default:!1,role:"content"},linkTarget:{type:"string",default:"_self",role:"content"}},usesContext:["postType","postId","queryId"],supports:{inserter:!1,anchor:!0,html:!1,spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}},filter:{duotone:!0}},selectors:{filter:{duotone:".wp-block-post-author .wp-block-post-author__avatar img"}},editorStyle:"wp-block-post-author-editor",style:"wp-block-post-author"};var pn=o(T(),1),Tr=o(M(),1),mee=o(me(),1),Ew=o(Q(),1),Dd=o(V(),1),Dw=o(U(),1),oL=o(Wo(),1),Sr=o(P(),1),pee=o(W(),1);var Ed=o(W(),1),see=o(P(),1),cee=o(T(),1);var{cleanEmptyObject:lee}=K(cee.privateApis);function uee(e,t){let{avatarSize:r,byline:a,showAvatar:n,showBio:i,isLink:l,linkTarget:s,textAlign:c,style:u,...m}=e,p=n&&t.some(g=>g.name==="core/avatar"),d=a&&t.some(g=>g.name==="core/paragraph"),f=t.some(g=>g.name==="core/post-author-name"),h=i&&t.some(g=>g.name==="core/post-author-biography");return(0,Ed.createBlock)("core/group",{...m,style:lee({...u,spacing:{...u?.spacing,blockGap:"1em"},color:{...u?.color,duotone:void 0}}),layout:{type:"flex",flexWrap:"nowrap",verticalAlignment:"top"}},[p&&(0,Ed.createBlock)("core/avatar",{size:r,style:lee({border:{radius:"0px"},color:{duotone:u?.color?.duotone}})}),(0,Ed.createBlock)("core/group",{style:{layout:{selfStretch:"fill",flexSize:null},spacing:{blockGap:"0"}},layout:{type:"flex",orientation:"vertical",justifyContent:"stretch"}},[d&&(0,Ed.createBlock)("core/paragraph",{content:a,placeholder:(0,see.__)("Write byline\u2026"),style:{typography:{fontSize:"0.5em",textAlign:c}}}),f&&(0,Ed.createBlock)("core/post-author-name",{isLink:l,linkTarget:s,style:{typography:{fontSize:"1em",textAlign:c}}}),h&&(0,Ed.createBlock)("core/post-author-biography",{style:{typography:{fontSize:"0.7em",textAlign:c}}})].filter(Boolean))].filter(Boolean))}var nt=o(v(),1),{InspectorControlsLastItem:pxe}=K(pn.privateApis),dxe={who:"authors",per_page:100,_fields:"id,name",context:"view"};function fxe({value:e,onChange:t}){let[r,a]=(0,Dw.useState)(""),{authors:n,isLoading:i}=(0,Dd.useSelect)(s=>{let{getUsers:c,isResolving:u}=s(Ew.store),m={...dxe};return r&&(m.search=r,m.search_columns=["name"]),{authors:c(m),isLoading:u("getUsers",[m])}},[r]),l=(0,Dw.useMemo)(()=>{let s=(n??[]).map(m=>({value:m.id,label:(0,oL.decodeEntities)(m.name)})),c=s.findIndex(m=>e?.id===m.value),u=[];return c<0&&e?u=[{value:e.id,label:(0,oL.decodeEntities)(e.name)}]:c<0&&!e&&(u=[{value:0,label:(0,Sr.__)("(No author)")}]),[...u,...s]},[n,e]);return(0,nt.jsx)(Tr.ComboboxControl,{__next40pxDefaultSize:!0,label:(0,Sr.__)("Author"),options:l,value:e?.id,onFilterValueChange:(0,mee.debounce)(a,300),onChange:t,allowReset:!1,isLoading:i})}function hxe({isSelected:e,context:{postType:t,postId:r,queryId:a},attributes:n,setAttributes:i,clientId:l}){let s=Number.isFinite(a),c=q(),u=x1(),{authorDetails:m,canAssignAuthor:p,supportsAuthor:d}=(0,Dd.useSelect)(z=>{let{getEditedEntityRecord:I,getUser:R,getPostType:$}=z(Ew.store),j=I("postType",t,r),G=j?.author;return{authorDetails:G?R(G,{context:"view"}):null,supportsAuthor:$(t)?.supports?.author??!1,canAssignAuthor:!!j?._links?.["wp:action-assign-author"]}},[t,r]),f=(0,Dd.useSelect)(z=>z(pee.store).getBlockTypes(),[]),{editEntityRecord:h}=(0,Dd.useDispatch)(Ew.store),{replaceBlock:g}=(0,Dd.useDispatch)(pn.store),{textAlign:b,showAvatar:y,showBio:k,byline:_,isLink:x,linkTarget:S,avatarSize:C}=n,N=[],B=m?.name||(0,Sr.__)("Post Author");m?.avatar_urls&&Object.keys(m.avatar_urls).forEach(z=>{N.push({value:z,label:`${z} x ${z}`})});let D=(0,pn.useBlockProps)({className:w({[`has-text-align-${b}`]:b})}),A=z=>{h("postType",t,r,{author:z})},H=!!r&&!s&&p;if(!d&&t!==void 0)return(0,nt.jsx)("div",{...D,children:(0,Sr.sprintf)((0,Sr.__)("This post type (%s) does not support the author."),t)});function F(){g(l,uee(n,f))}return(0,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsx)(pn.InspectorControls,{children:(0,nt.jsxs)(Tr.__experimentalToolsPanel,{label:(0,Sr.__)("Settings"),resetAll:()=>{i({avatarSize:48,showAvatar:!0,isLink:!1,linkTarget:"_self"})},dropdownMenuProps:c,children:[H&&(0,nt.jsx)("div",{style:{gridColumn:"1 / -1"},children:(0,nt.jsx)(fxe,{value:m,onChange:A})}),(0,nt.jsx)(Tr.__experimentalToolsPanelItem,{label:(0,Sr.__)("Show avatar"),isShownByDefault:!0,hasValue:()=>!y,onDeselect:()=>i({showAvatar:!0}),children:(0,nt.jsx)(Tr.ToggleControl,{label:(0,Sr.__)("Show avatar"),checked:y,onChange:()=>i({showAvatar:!y})})}),y&&(0,nt.jsx)(Tr.__experimentalToolsPanelItem,{label:(0,Sr.__)("Avatar size"),isShownByDefault:!0,hasValue:()=>C!==48,onDeselect:()=>i({avatarSize:48}),children:(0,nt.jsx)(Tr.SelectControl,{__next40pxDefaultSize:!0,label:(0,Sr.__)("Avatar size"),value:C,options:N,onChange:z=>{i({avatarSize:Number(z)})}})}),(0,nt.jsx)(Tr.__experimentalToolsPanelItem,{label:(0,Sr.__)("Show bio"),isShownByDefault:!0,hasValue:()=>!!k,onDeselect:()=>i({showBio:void 0}),children:(0,nt.jsx)(Tr.ToggleControl,{label:(0,Sr.__)("Show bio"),checked:!!k,onChange:()=>i({showBio:!k})})}),(0,nt.jsx)(Tr.__experimentalToolsPanelItem,{label:(0,Sr.__)("Link author name to author page"),isShownByDefault:!0,hasValue:()=>!!x,onDeselect:()=>i({isLink:!1}),children:(0,nt.jsx)(Tr.ToggleControl,{label:(0,Sr.__)("Link author name to author page"),checked:x,onChange:()=>i({isLink:!x})})}),x&&(0,nt.jsx)(Tr.__experimentalToolsPanelItem,{label:(0,Sr.__)("Link target"),isShownByDefault:!0,hasValue:()=>S!=="_self",onDeselect:()=>i({linkTarget:"_self"}),children:(0,nt.jsx)(Tr.ToggleControl,{label:(0,Sr.__)("Open in new tab"),onChange:z=>i({linkTarget:z?"_blank":"_self"}),checked:S==="_blank"})})]})}),f.some(z=>z.name==="core/group")&&(0,nt.jsx)(pxe,{children:(0,nt.jsxs)(Tr.__experimentalVStack,{className:"wp-block-post-author__transform",alignment:"left",spacing:4,children:[(0,nt.jsx)(Tr.__experimentalText,{as:"p",children:(0,Sr.__)("This block is no longer supported. Recreate its design with the Avatar, Author Name and Author Biography blocks.")}),(0,nt.jsx)(Tr.Button,{variant:"primary",onClick:F,__next40pxDefaultSize:!0,children:(0,Sr.__)("Recreate")})]})}),(0,nt.jsx)(pn.BlockControls,{group:"block",children:(0,nt.jsx)(pn.AlignmentControl,{value:b,onChange:z=>{i({textAlign:z})}})}),(0,nt.jsxs)("div",{...D,children:[y&&(0,nt.jsx)("div",{className:"wp-block-post-author__avatar",children:(0,nt.jsx)("img",{width:C,src:m?.avatar_urls?.[C]||u,alt:m?.name||(0,Sr.__)("Default Avatar")})}),(0,nt.jsxs)("div",{className:"wp-block-post-author__content",children:[(!pn.RichText.isEmpty(_)||e)&&(0,nt.jsx)(pn.RichText,{identifier:"byline",className:"wp-block-post-author__byline","aria-label":(0,Sr.__)("Post author byline text"),placeholder:(0,Sr.__)("Write byline\u2026"),value:_,onChange:z=>i({byline:z})}),(0,nt.jsx)("p",{className:"wp-block-post-author__name",children:x?(0,nt.jsx)("a",{href:"#post-author-pseudo-link",onClick:z=>z.preventDefault(),children:B}):B}),k&&(0,nt.jsx)("p",{className:"wp-block-post-author__bio",dangerouslySetInnerHTML:{__html:m?.description}})]})]})]})}var dee=hxe;var{name:hee}=Nw,gee={icon:Bp,example:{viewportWidth:350,attributes:{showBio:!0,byline:(0,fee.__)("Posted by")}},edit:dee},gxe=()=>E({name:hee,metadata:Nw,settings:gee});var nL={};Z(nL,{init:()=>xxe,metadata:()=>Lw,name:()=>wee,settings:()=>Cee});var Lw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-author-name",title:"Author Name",category:"theme",description:"The author name.",textdomain:"default",attributes:{isLink:{type:"boolean",default:!1,role:"content"},linkTarget:{type:"string",default:"_self",role:"content"}},usesContext:["postType","postId"],example:{viewportWidth:350},supports:{anchor:!0,html:!1,spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},typography:{fontSize:!0,lineHeight:!0,textAlign:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},style:"wp-block-post-author-name"};var Mw=o(T(),1),vee=o(V(),1),dc=o(P(),1),bee=o(Q(),1),zm=o(M(),1);var Ai=o(v(),1);function bxe(e){Kr(e);let{attributes:{isLink:t,linkTarget:r},setAttributes:a,context:{postType:n,postId:i}}=e,{authorName:l,supportsAuthor:s}=(0,vee.useSelect)(d=>{let{getEditedEntityRecord:f,getUser:h,getPostType:g}=d(bee.store),b=f("postType",n,i)?.author;return{authorName:b?h(b):null,supportsAuthor:g(n)?.supports?.author??!1}},[n,i]),c=(0,Mw.useBlockProps)(),u=l?.name||(0,dc.__)("Author Name"),m=t?(0,Ai.jsx)("a",{href:"#author-pseudo-link",onClick:d=>d.preventDefault(),className:"wp-block-post-author-name__link",children:u}):u,p=q();return(0,Ai.jsxs)(Ai.Fragment,{children:[(0,Ai.jsx)(Mw.InspectorControls,{children:(0,Ai.jsxs)(zm.__experimentalToolsPanel,{label:(0,dc.__)("Settings"),resetAll:()=>{a({isLink:!1,linkTarget:"_self"})},dropdownMenuProps:p,children:[(0,Ai.jsx)(zm.__experimentalToolsPanelItem,{label:(0,dc.__)("Link to author archive"),isShownByDefault:!0,hasValue:()=>t,onDeselect:()=>a({isLink:!1}),children:(0,Ai.jsx)(zm.ToggleControl,{label:(0,dc.__)("Link to author archive"),onChange:()=>a({isLink:!t}),checked:t})}),t&&(0,Ai.jsx)(zm.__experimentalToolsPanelItem,{label:(0,dc.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>r!=="_self",onDeselect:()=>a({linkTarget:"_self"}),children:(0,Ai.jsx)(zm.ToggleControl,{label:(0,dc.__)("Open in new tab"),onChange:d=>a({linkTarget:d?"_blank":"_self"}),checked:r==="_blank"})})]})}),(0,Ai.jsx)("div",{...c,children:!s&&n!==void 0?(0,dc.sprintf)((0,dc.__)("This post type (%s) does not support the author."),n):m})]})}var yee=bxe;var yxe={attributes:{isLink:{type:"boolean",default:!1,role:"content"},linkTarget:{type:"string",default:"_self",role:"content"},textAlign:{type:"string"}},supports:{anchor:!0,html:!1,spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},migrate:We,isEligible(e){return!!e.textAlign||!!e.className?.match(/\bhas-text-align-(left|center|right)\b/)},save:()=>null},_ee=[yxe];var xee=o(W(),1),_xe={from:[{type:"block",blocks:["core/post-author"],transform:({textAlign:e})=>(0,xee.createBlock)("core/post-author-name",{style:{typography:{textAlign:e}}})}]},kee=_xe;var{name:wee}=Lw,Cee={icon:Bp,transforms:kee,edit:yee,deprecated:_ee},xxe=()=>E({name:wee,metadata:Lw,settings:Cee});var iL={};Z(iL,{init:()=>Sxe,metadata:()=>Aw,name:()=>Eee,settings:()=>Dee});var Aw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-author-biography",title:"Author Biography",category:"theme",description:"The author biography.",textdomain:"default",usesContext:["postType","postId"],example:{viewportWidth:350},supports:{anchor:!0,spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,textAlign:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},style:"wp-block-post-author-biography"};var See=o(T(),1),Tee=o(V(),1),Pee=o(P(),1),Bee=o(Q(),1);var a2=o(v(),1);function wxe(e){Kr(e);let{context:{postType:t,postId:r}}=e,{authorDetails:a}=(0,Tee.useSelect)(l=>{let{getEditedEntityRecord:s,getUser:c}=l(Bee.store),u=s("postType",t,r)?.author;return{authorDetails:u?c(u):null}},[t,r]),n=(0,See.useBlockProps)(),i=a?.description||(0,Pee.__)("Author Biography");return(0,a2.jsx)(a2.Fragment,{children:(0,a2.jsx)("div",{...n,dangerouslySetInnerHTML:{__html:i}})})}var Iee=wxe;var Cxe={attributes:{textAlign:{type:"string"}},supports:{anchor:!0,spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},migrate:We,isEligible(e){return!!e.textAlign||!!e.className?.match(/\bhas-text-align-(left|center|right)\b/)},save:()=>null},Nee=[Cxe];var{name:Eee}=Aw,Dee={icon:Bp,edit:Iee,deprecated:Nee},Sxe=()=>E({name:Eee,metadata:Aw,settings:Dee});var lL={};Z(lL,{init:()=>Bxe,metadata:()=>Rw,name:()=>zee,settings:()=>Vee});var Rw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:"fse",name:"core/post-comment",title:"Comment (deprecated)",category:"theme",allowedBlocks:["core/avatar","core/comment-author-name","core/comment-content","core/comment-date","core/comment-edit-link","core/comment-reply-link"],description:"This block is deprecated. Please use the Comments block instead.",textdomain:"default",attributes:{commentId:{type:"number"}},providesContext:{commentId:"commentId"},supports:{html:!1,inserter:!1,interactivity:{clientNavigation:!0}}};var n2=o(P(),1),mg=o(M(),1),Lee=o(U(),1);var zw=o(T(),1),Ld=o(v(),1),Pxe=[["core/avatar"],["core/comment-author-name"],["core/comment-date"],["core/comment-content"],["core/comment-reply-link"],["core/comment-edit-link"]];function Mee({attributes:{commentId:e},setAttributes:t}){let[r,a]=(0,Lee.useState)(e),n=(0,zw.useBlockProps)(),i=(0,zw.useInnerBlocksProps)(n,{template:Pxe});return e?(0,Ld.jsx)("div",{...i}):(0,Ld.jsx)("div",{...n,children:(0,Ld.jsxs)(mg.Placeholder,{icon:VS,label:(0,n2._x)("Post Comment","block title"),instructions:(0,n2.__)("To show a comment, input the comment ID."),children:[(0,Ld.jsx)(mg.TextControl,{__next40pxDefaultSize:!0,value:e,onChange:l=>a(parseInt(l))}),(0,Ld.jsx)(mg.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:()=>{t({commentId:r})},children:(0,n2.__)("Save")})]})})}var Vw=o(T(),1),Aee=o(v(),1);function Ree(){let e=Vw.useBlockProps.save(),t=Vw.useInnerBlocksProps.save(e);return(0,Aee.jsx)("div",{...t})}var{name:zee}=Rw,Vee={icon:N0,edit:Mee,save:Ree},Bxe=()=>E({name:zee,metadata:Rw,settings:Vee});var sL={};Z(sL,{init:()=>Dxe,metadata:()=>Fw,name:()=>qee,settings:()=>Zee});var Fw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-comments-count",title:"Comments Count",category:"theme",description:"Display a post's comments count.",textdomain:"default",usesContext:["postId"],example:{viewportWidth:350},supports:{anchor:!0,html:!1,color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,textAlign:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},interactivity:{clientNavigation:!0}},style:"wp-block-post-comments-count"};var Fee=o(T(),1),Hw=o(U(),1),Hee=o(G1(),1),Oee=o(mr(),1),jee=o(v(),1);function Uee({context:e}){let{postId:t}=e,[r,a]=(0,Hw.useState)(),n=(0,Fee.useBlockProps)();(0,Hw.useEffect)(()=>{if(!t)return;let s=t;(0,Hee.default)({path:(0,Oee.addQueryArgs)("/wp/v2/comments",{post:t}),parse:!1}).then(c=>{s===t&&a(c.headers.get("X-WP-Total"))})},[t]);let i=t&&r!==void 0,l={...n.style,textDecoration:i?n.style?.textDecoration:void 0};return(0,jee.jsx)("div",{...n,style:l,children:i?r:"0"})}var Gee=o(W(),1),Nxe={to:[{type:"block",blocks:["core/post-comments-link"],transform:({style:e})=>{let t=e?.typography?.textAlign;return(0,Gee.createBlock)("core/post-comments-link",{...t&&{style:{typography:{textAlign:t}}}})}}]},Wee=Nxe;var Exe={attributes:{textAlign:{type:"string"}},supports:{anchor:!0,html:!1,spacing:{margin:!0,padding:!0},color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0}},migrate:We,isEligible(e){return!!e.textAlign||!!e.className?.match(/\bhas-text-align-(left|center|right)\b/)},save:()=>null},$ee=[Exe];var{name:qee}=Fw,Zee={icon:Y0,edit:Uee,transforms:Wee,deprecated:$ee},Dxe=()=>E({name:qee,metadata:Fw,settings:Zee});var uL={};Z(uL,{init:()=>Axe,metadata:()=>Ow,name:()=>Jee,settings:()=>ete});var Ow={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-comments-form",title:"Comments Form",category:"theme",description:"Display a post's comments form.",textdomain:"default",usesContext:["postId","postType"],supports:{anchor:!0,html:!1,color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,textAlign:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},editorStyle:"wp-block-post-comments-form-editor",style:["wp-block-post-comments-form","wp-block-buttons","wp-block-button"],example:{attributes:{style:{typography:{textAlign:"center"}}}}};var Kee=o(T(),1),Qee=o(M(),1),Yee=o(me(),1),jw=o(P(),1);var i2=o(v(),1);function cL({context:e}){let{postId:t,postType:r}=e,a=(0,Yee.useInstanceId)(cL),n=(0,jw.sprintf)("comments-form-edit-%d-desc",a),i=(0,Kee.useBlockProps)({"aria-describedby":n});return(0,i2.jsxs)("div",{...i,children:[(0,i2.jsx)(Sk,{postId:t,postType:r}),(0,i2.jsx)(Qee.VisuallyHidden,{id:n,children:(0,jw.__)("Comments form disabled in editor.")})]})}var Mxe={attributes:{textAlign:{type:"string"}},supports:{anchor:!0,html:!1,spacing:{margin:!0,padding:!0},color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},migrate:We,isEligible(e){return!!e.textAlign||!!e.className?.match(/\bhas-text-align-(left|center|right)\b/)},save:()=>null},Xee=[Mxe];var{name:Jee}=Ow,ete={icon:uP,edit:cL,deprecated:Xee},Axe=()=>E({name:Jee,metadata:Ow,settings:ete});var mL={};Z(mL,{init:()=>Hxe,metadata:()=>Uw,name:()=>ute,settings:()=>mte});var Uw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-comments-link",title:"Comments Link",category:"theme",description:"Displays the link to the current post comments.",textdomain:"default",usesContext:["postType","postId"],example:{viewportWidth:350},supports:{anchor:!0,html:!1,color:{link:!0,text:!1,__experimentalDefaultControls:{background:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,textAlign:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},style:"wp-block-post-comments-link"};var tte=o(T(),1),Ww=o(U(),1),rte=o(V(),1),ote=o(G1(),1),ate=o(mr(),1),Md=o(P(),1),nte=o(Q(),1),Gw=o(v(),1);function zxe({context:e}){let{postType:t,postId:r}=e,[a,n]=(0,Ww.useState)(),i=(0,tte.useBlockProps)();(0,Ww.useEffect)(()=>{if(!r)return;let c=r;(0,ote.default)({path:(0,ate.addQueryArgs)("/wp/v2/comments",{post:r}),parse:!1}).then(u=>{c===r&&n(u.headers.get("X-WP-Total"))})},[r]);let l=(0,rte.useSelect)(c=>c(nte.store).getEditedEntityRecord("postType",t,r),[t,r]),s;if(a!==void 0){let c=parseInt(a);c===0?s=(0,Md.__)("No comments"):s=(0,Md.sprintf)((0,Md._n)("%s comment","%s comments",c),c.toLocaleString())}return(0,Gw.jsx)("div",{...i,children:l?.link&&s!==void 0?(0,Gw.jsx)("a",{href:l?.link+"#comments",onClick:c=>c.preventDefault(),children:s}):(0,Gw.jsx)("a",{href:"#post-comments-link-pseudo-link",onClick:c=>c.preventDefault(),children:(0,Md.__)("No comments")})})}var ite=zxe;var lte=o(W(),1),Vxe={to:[{type:"block",blocks:["core/post-comments-count"],transform:({style:e})=>{let t=e?.typography?.textAlign;return(0,lte.createBlock)("core/post-comments-count",{...t&&{style:{typography:{textAlign:t}}}})}}]},ste=Vxe;var Fxe={attributes:{textAlign:{type:"string"}},supports:{anchor:!0,html:!1,spacing:{margin:!0,padding:!0},color:{link:!0,text:!1,__experimentalDefaultControls:{background:!0,link:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},migrate:We,isEligible(e){return!!e.textAlign||!!e.className?.match(/\bhas-text-align-(left|center|right)\b/)},save:()=>null},cte=[Fxe];var{name:ute}=Uw,mte={edit:ite,icon:Y0,transforms:ste,deprecated:cte},Hxe=()=>E({name:ute,metadata:Uw,settings:mte});var pL={};Z(pL,{init:()=>Kxe,metadata:()=>$w,name:()=>gte,settings:()=>vte});var $w={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-content",title:"Content",category:"theme",description:"Displays the contents of a post or page.",textdomain:"default",usesContext:["postId","postType","queryId"],attributes:{tagName:{type:"string",default:"div"}},example:{viewportWidth:350},supports:{anchor:!0,align:["wide","full"],html:!1,layout:!0,background:{backgroundImage:!0,backgroundSize:!0,__experimentalDefaultControls:{backgroundImage:!0}},dimensions:{minHeight:!0},spacing:{blockGap:!0,padding:!0,margin:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!1,text:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},style:"wp-block-post-content",editorStyle:"wp-block-post-content-editor"};var Ad=o(P(),1),to=o(T(),1),pte=o(W(),1),pg=o(Q(),1),dte=o(V(),1),fte=o(U(),1);var ir=o(v(),1),{HTMLElementControl:jxe}=K(to.privateApis);function Uxe({parentLayout:e,layoutClassNames:t,userCanEdit:r,postType:a,postId:n,tagName:i="div"}){let[,,l]=(0,pg.useEntityProp)("postType",a,"content",n),s=(0,to.useBlockProps)({className:t}),c=(0,fte.useMemo)(()=>l?.raw?(0,pte.parse)(l.raw):[],[l?.raw]),u=(0,to.__experimentalUseBlockPreview)({blocks:c,props:s,layout:e});return r?(0,ir.jsx)("div",{...u}):l?.protected?(0,ir.jsx)(i,{...s,children:(0,ir.jsx)(to.Warning,{children:(0,Ad.__)("This content is password protected.")})}):(0,ir.jsx)(i,{...s,dangerouslySetInnerHTML:{__html:l?.rendered}})}function Gxe({context:e={},tagName:t="div"}){let{postType:r,postId:a}=e,[n,i,l]=(0,pg.useEntityBlockEditor)("postType",r,{id:a}),c=!!(0,dte.useSelect)(p=>p(pg.store).getEntityRecord("postType",r,a),[r,a])?.content?.raw||n?.length,u=[["core/paragraph"]],m=(0,to.useInnerBlocksProps)((0,to.useBlockProps)({className:"entry-content"}),{value:n,onInput:i,onChange:l,template:c?void 0:u});return(0,ir.jsx)(t,{...m})}function Wxe(e){let{context:{queryId:t,postType:r,postId:a}={},layoutClassNames:n,tagName:i}=e,l=Sx("postType",r,a);if(l===void 0)return null;let s=Number.isFinite(t);return l&&!s?(0,ir.jsx)(Gxe,{...e}):(0,ir.jsx)(Uxe,{parentLayout:e.parentLayout,layoutClassNames:n,userCanEdit:l,postType:r,postId:a,tagName:i})}function $xe({layoutClassNames:e}){let t=(0,to.useBlockProps)({className:e});return(0,ir.jsxs)("div",{...t,children:[(0,ir.jsx)("p",{children:(0,Ad.__)("This is the Content block, it will display all the blocks in any single post or page.")}),(0,ir.jsx)("p",{children:(0,Ad.__)("That might be a simple arrangement like consecutive paragraphs in a blog post, or a more elaborate composition that includes image galleries, videos, tables, columns, and any other block types.")}),(0,ir.jsx)("p",{children:(0,Ad.__)("If there are any Custom Post Types registered at your site, the Content block can display the contents of those entries as well.")})]})}function qxe(){let e=(0,to.useBlockProps)();return(0,ir.jsx)("div",{...e,children:(0,ir.jsx)(to.Warning,{children:(0,Ad.__)("Block cannot be rendered inside itself.")})})}function Zxe({tagName:e,onSelectTagName:t,clientId:r}){return(0,ir.jsx)(to.InspectorControls,{group:"advanced",children:(0,ir.jsx)(jxe,{tagName:e,onChange:t,clientId:r,options:[{label:(0,Ad.__)("Default (<div>)"),value:"div"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"}]})})}function hte({context:e,attributes:{tagName:t="div"},setAttributes:r,clientId:a,__unstableLayoutClassNames:n,__unstableParentLayout:i}){let{postId:l,postType:s}=e,c=(0,to.useHasRecursion)(l);return l&&s&&c?(0,ir.jsx)(qxe,{}):(0,ir.jsxs)(ir.Fragment,{children:[(0,ir.jsx)(Zxe,{tagName:t,onSelectTagName:m=>{r({tagName:m})},clientId:a}),(0,ir.jsx)(to.RecursionProvider,{uniqueId:l,children:l&&s?(0,ir.jsx)(Wxe,{context:e,parentLayout:i,layoutClassNames:n}):(0,ir.jsx)($xe,{layoutClassNames:n})})]})}var{name:gte}=$w,vte={icon:fP,edit:hte},Kxe=()=>E({name:gte,metadata:$w,settings:vte});var dL={};Z(dL,{init:()=>rke,metadata:()=>qw,name:()=>Cte,settings:()=>Ste});var qw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-date",title:"Date",category:"theme",description:"Display a custom date.",textdomain:"default",attributes:{datetime:{type:"string",role:"content"},textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1,role:"content"}},usesContext:["postId","postType","queryId"],example:{viewportWidth:350},supports:{anchor:!0,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}}};var bte=o(Q(),1),dg=o(U(),1),Rd=o(Lk(),1),Ra=o(T(),1),Ri=o(M(),1),dn=o(P(),1);var yte=o(As(),1),l2=o(V(),1),_te=o(W(),1);var ro=o(v(),1);function xte({attributes:e,context:{postType:t,queryId:r},setAttributes:a,name:n}){let{datetime:i,textAlign:l,format:s,isLink:c}=e,u=(0,Ra.useBlockProps)({className:w({[`has-text-align-${l}`]:l})}),m=q(),[p,d]=(0,dg.useState)(null),f=(0,dg.useMemo)(()=>({anchor:p}),[p]),{__unstableMarkNextChangeAsNotPersistent:h}=(0,l2.useDispatch)(Ra.store);(0,dg.useEffect)(()=>{i===void 0&&(h(),a({datetime:new Date}))},[i]);let g=Number.isFinite(r),b=(0,Rd.getSettings)(),{postType:y,siteFormat:k=b.formats.date,siteTimeFormat:_=b.formats.time}=(0,l2.useSelect)(N=>{let{getPostType:B,getEntityRecord:D}=N(bte.store),A=D("root","site");return{siteFormat:A?.date_format,siteTimeFormat:A?.time_format,postType:t?B(t):null}},[t]),x=(0,l2.useSelect)(N=>N(_te.store).getActiveBlockVariation(n,e)?.name,[n,e]),S=(0,Ra.useBlockEditingMode)(),C=(0,ro.jsx)("time",{dateTime:(0,Rd.dateI18n)("c",i),ref:d,children:s==="human-diff"?(0,Rd.humanTimeDiff)(i):(0,Rd.dateI18n)(s||k,i)});return c&&i&&(C=(0,ro.jsx)("a",{href:"#post-date-pseudo-link",onClick:N=>N.preventDefault(),children:C})),(0,ro.jsxs)(ro.Fragment,{children:[(S==="default"||!g)&&(0,ro.jsxs)(Ra.BlockControls,{group:"block",children:[(0,ro.jsx)(Ra.AlignmentControl,{value:l,onChange:N=>{a({textAlign:N})}}),x!=="post-date-modified"&&(!g||!x)&&(0,ro.jsx)(Ri.ToolbarGroup,{children:(0,ro.jsx)(Ri.Dropdown,{popoverProps:f,renderContent:({onClose:N})=>(0,ro.jsx)(Ra.__experimentalPublishDateTimePicker,{title:x==="post-date"?(0,dn.__)("Publish Date"):(0,dn.__)("Date"),currentDate:i,onChange:B=>a({datetime:B}),is12Hour:Yxe(_),onClose:N,dateOrder:(0,dn._x)("dmy","date order")}),renderToggle:({isOpen:N,onToggle:B})=>{let D=A=>{!N&&A.keyCode===yte.DOWN&&(A.preventDefault(),B())};return(0,ro.jsx)(Ri.ToolbarButton,{"aria-expanded":N,icon:Pp,title:(0,dn.__)("Change Date"),onClick:B,onKeyDown:D})}})})]}),(0,ro.jsx)(Ra.InspectorControls,{children:(0,ro.jsxs)(Ri.__experimentalToolsPanel,{label:(0,dn.__)("Settings"),resetAll:()=>{a({datetime:void 0,format:void 0,isLink:!1})},dropdownMenuProps:m,children:[(0,ro.jsx)(Ri.__experimentalToolsPanelItem,{hasValue:()=>!!s,label:(0,dn.__)("Date Format"),onDeselect:()=>a({format:void 0}),isShownByDefault:!0,children:(0,ro.jsx)(Ra.__experimentalDateFormatPicker,{format:s,defaultFormat:k,onChange:N=>a({format:N})})}),(0,ro.jsx)(Ri.__experimentalToolsPanelItem,{hasValue:()=>c!==!1,label:y?.labels.singular_name?(0,dn.sprintf)((0,dn.__)("Link to %s"),y.labels.singular_name.toLowerCase()):(0,dn.__)("Link to post"),onDeselect:()=>a({isLink:!1}),isShownByDefault:!0,children:(0,ro.jsx)(Ri.ToggleControl,{label:y?.labels.singular_name?(0,dn.sprintf)((0,dn.__)("Link to %s"),y.labels.singular_name.toLowerCase()):(0,dn.__)("Link to post"),onChange:()=>a({isLink:!c}),checked:c})})]})}),(0,ro.jsx)("div",{...u,children:C})]})}function Yxe(e){return/(?:^|[^\\])[aAgh]/.test(e)}var Xxe={attributes:{datetime:{type:"string",role:"content"},textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1,role:"content"}},supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},save(){return null},migrate({metadata:{bindings:{datetime:{source:e,args:{key:t,...r}},...a},...n},...i}){return{metadata:{bindings:{datetime:{source:e,args:{field:t,...r}},...a},...n},...i}},isEligible(e){return e?.metadata?.bindings?.datetime?.source==="core/post-data"&&!!e?.metadata?.bindings?.datetime?.args?.key}},Jxe={attributes:{textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1,role:"content"},displayType:{type:"string",default:"date"}},supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},save(){return null},migrate({className:e,displayType:t,metadata:r,...a}){if(t==="date"||t==="modified")return t==="modified"&&(e=w(e,"wp-block-post-date__modified-date")),{...a,className:e,metadata:{...r,bindings:{datetime:{source:"core/post-data",args:{field:t}}}}}},isEligible(e){return!e.datetime&&!e?.metadata?.bindings?.datetime}},eke={attributes:{textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save(){return null},migrate:Ot,isEligible({style:e}){return e?.typography?.fontFamily}},kte=[Xxe,Jxe,eke];var s2=o(P(),1),tke=[{name:"post-date",title:(0,s2.__)("Post Date"),description:(0,s2.__)("Display a post's publish date."),attributes:{metadata:{bindings:{datetime:{source:"core/post-data",args:{field:"date"}}}}},scope:["inserter","transform"],isActive:e=>e?.metadata?.bindings?.datetime?.source==="core/post-data"&&e?.metadata?.bindings?.datetime?.args?.field==="date"},{name:"post-date-modified",title:(0,s2.__)("Modified Date"),description:(0,s2.__)("Display a post's last updated date."),attributes:{metadata:{bindings:{datetime:{source:"core/post-data",args:{field:"modified"}}}},className:"wp-block-post-date__modified-date"},scope:["inserter","transform"],isActive:e=>e?.metadata?.bindings?.datetime?.source==="core/post-data"&&e?.metadata?.bindings?.datetime?.args?.field==="modified"}],wte=tke;var{name:Cte}=qw,Ste={icon:e1,edit:xte,deprecated:kte,variations:wte},rke=()=>E({name:Cte,metadata:qw,settings:Ste});var hL={};Z(hL,{init:()=>nke,metadata:()=>Zw,name:()=>Ete,settings:()=>Dte});var Zw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-excerpt",title:"Excerpt",category:"theme",description:"Display the excerpt.",textdomain:"default",attributes:{textAlign:{type:"string"},moreText:{type:"string",role:"content"},showMoreOnNewLine:{type:"boolean",default:!0},excerptLength:{type:"number",default:55}},usesContext:["postId","postType","queryId"],example:{viewportWidth:350},supports:{anchor:!0,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,textColumns:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},editorStyle:"wp-block-post-excerpt-editor",style:"wp-block-post-excerpt"};var Kw=o(Q(),1),Pte=o(U(),1),ua=o(T(),1),yu=o(M(),1),fn=o(P(),1),Bte=o(V(),1);var Xt=o(v(),1),Tte="\u2026";function Ite({attributes:{textAlign:e,moreText:t,showMoreOnNewLine:r,excerptLength:a},setAttributes:n,isSelected:i,context:{postId:l,postType:s,queryId:c}}){let m=(0,ua.useBlockEditingMode)()==="default",p=Number.isFinite(c),d=Sx("postType",s,l),[f,h,{rendered:g,protected:b}={}]=(0,Kw.useEntityProp)("postType",s,"excerpt",l),y=q(),k=(0,Bte.useSelect)(z=>s==="page"?!0:!!z(Kw.store).getPostType(s)?.supports?.excerpt,[s]),_=d&&!p&&k,x=(0,ua.useBlockProps)({className:w({[`has-text-align-${e}`]:e})}),S=(0,fn._x)("words","Word count type. Do not translate!"),C=(0,Pte.useMemo)(()=>{if(!g)return"";let z=new window.DOMParser().parseFromString(g,"text/html");return z.body.textContent||z.body.innerText||""},[g]);if(!s||!l)return(0,Xt.jsxs)(Xt.Fragment,{children:[(0,Xt.jsx)(ua.BlockControls,{children:(0,Xt.jsx)(ua.AlignmentToolbar,{value:e,onChange:z=>n({textAlign:z})})}),(0,Xt.jsx)("div",{...x,children:(0,Xt.jsx)("p",{children:(0,fn.__)("This block will display the excerpt.")})})]});if(b&&!d)return(0,Xt.jsx)("div",{...x,children:(0,Xt.jsx)(ua.Warning,{children:(0,fn.__)("The content is currently protected and does not have the available excerpt.")})});let N=(0,Xt.jsx)(ua.RichText,{identifier:"moreText",className:"wp-block-post-excerpt__more-link",tagName:"a","aria-label":(0,fn.__)("\u201CRead more\u201D link text"),placeholder:(0,fn.__)('Add "read more" link text'),value:t,onChange:z=>n({moreText:z}),withoutInteractiveFormatting:!0}),B=w("wp-block-post-excerpt__excerpt",{"is-inline":!r}),D=(f||C).trim(),A="";if(S==="words")A=D.split(/\s+/,a).join(" ");else if(S==="characters_excluding_spaces"){let z=D.split("",a).join(""),I=z.length-z.replaceAll(" ","").length;A=D.split("",a+I).join("")}else S==="characters_including_spaces"&&(A=D.split("",a).join(""));let H=A!==D,F=_?(0,Xt.jsx)(ua.RichText,{className:B,"aria-label":(0,fn.__)("Excerpt text"),value:i?D:(H?A+Tte:D)||(0,fn.__)("No excerpt found"),onChange:h,tagName:"p",allowedFormats:[],preserveWhiteSpace:!0}):(0,Xt.jsx)("p",{className:B,children:H?A+Tte:D||(0,fn.__)("No excerpt found")});return(0,Xt.jsxs)(Xt.Fragment,{children:[m&&(0,Xt.jsx)(ua.BlockControls,{children:(0,Xt.jsx)(ua.AlignmentToolbar,{value:e,onChange:z=>n({textAlign:z})})}),(0,Xt.jsx)(ua.InspectorControls,{children:(0,Xt.jsxs)(yu.__experimentalToolsPanel,{label:(0,fn.__)("Settings"),resetAll:()=>{n({showMoreOnNewLine:!0,excerptLength:55})},dropdownMenuProps:y,children:[(0,Xt.jsx)(yu.__experimentalToolsPanelItem,{hasValue:()=>r!==!0,label:(0,fn.__)("Show link on new line"),onDeselect:()=>n({showMoreOnNewLine:!0}),isShownByDefault:!0,children:(0,Xt.jsx)(yu.ToggleControl,{label:(0,fn.__)("Show link on new line"),checked:r,onChange:z=>n({showMoreOnNewLine:z})})}),(0,Xt.jsx)(yu.__experimentalToolsPanelItem,{hasValue:()=>a!==55,label:(0,fn.__)("Max number of words"),onDeselect:()=>n({excerptLength:55}),isShownByDefault:!0,children:(0,Xt.jsx)(yu.RangeControl,{__next40pxDefaultSize:!0,label:(0,fn.__)("Max number of words"),value:a,onChange:z=>{n({excerptLength:z})},min:"10",max:"100"})})]})}),(0,Xt.jsxs)("div",{...x,children:[F,!r&&" ",r?(0,Xt.jsx)("p",{className:"wp-block-post-excerpt__more-text",children:N}):N]})]})}var fL=o(W(),1),ake={from:[{type:"block",blocks:["core/post-content"],transform:()=>(0,fL.createBlock)("core/post-excerpt")}],to:[{type:"block",blocks:["core/post-content"],transform:()=>(0,fL.createBlock)("core/post-content")}]},Nte=ake;var{name:Ete}=Zw,Dte={icon:gP,transforms:Nte,edit:Ite},nke=()=>E({name:Ete,metadata:Zw,settings:Dte});var bL={};Z(bL,{init:()=>fke,metadata:()=>Qw,name:()=>Wte,settings:()=>$te});var Qw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-featured-image",title:"Featured Image",category:"theme",description:"Display a post's featured image.",textdomain:"default",attributes:{isLink:{type:"boolean",default:!1,role:"content"},aspectRatio:{type:"string"},width:{type:"string"},height:{type:"string"},scale:{type:"string",default:"cover"},sizeSlug:{type:"string"},rel:{type:"string",attribute:"rel",default:"",role:"content"},linkTarget:{type:"string",default:"_self",role:"content"},overlayColor:{type:"string"},customOverlayColor:{type:"string"},dimRatio:{type:"number",default:0},gradient:{type:"string"},customGradient:{type:"string"},useFirstImageFromPost:{type:"boolean",default:!1}},usesContext:["postId","postType","queryId"],example:{viewportWidth:350},supports:{anchor:!0,align:["left","right","center","wide","full"],color:{text:!1,background:!1},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}},filter:{duotone:!0},shadow:{__experimentalSkipSerialization:!0},html:!1,spacing:{margin:!0,padding:!0},interactivity:{clientNavigation:!0}},selectors:{border:".wp-block-post-featured-image img, .wp-block-post-featured-image .block-editor-media-placeholder, .wp-block-post-featured-image .wp-block-post-featured-image__overlay",shadow:".wp-block-post-featured-image img, .wp-block-post-featured-image .components-placeholder",filter:{duotone:".wp-block-post-featured-image img, .wp-block-post-featured-image .wp-block-post-featured-image__placeholder, .wp-block-post-featured-image .components-placeholder__illustration, .wp-block-post-featured-image .components-placeholder::before"}},editorStyle:"wp-block-post-featured-image-editor",style:"wp-block-post-featured-image"};var Ote=o(Rr(),1),c2=o(Q(),1),u2=o(V(),1),yo=o(M(),1),Lr=o(T(),1),Om=o(U(),1),Fo=o(P(),1);var jte=o(xr(),1);var za=o(P(),1),Vo=o(M(),1),Lte=o(T(),1),zo=o(v(),1),lke=(0,zo.jsxs)(zo.Fragment,{children:[(0,zo.jsx)(Vo.__experimentalToggleGroupControlOption,{value:"cover",label:(0,za._x)("Cover","Scale option for Image dimension control")}),(0,zo.jsx)(Vo.__experimentalToggleGroupControlOption,{value:"contain",label:(0,za._x)("Contain","Scale option for Image dimension control")}),(0,zo.jsx)(Vo.__experimentalToggleGroupControlOption,{value:"fill",label:(0,za._x)("Fill","Scale option for Image dimension control")})]}),gL="cover",ske={cover:(0,za.__)("Image is scaled and cropped to fill the entire space without being distorted."),contain:(0,za.__)("Image is scaled to fill the space without clipping nor distorting."),fill:(0,za.__)("Image will be stretched and distorted to completely fill the space.")},cke=({clientId:e,attributes:{aspectRatio:t,width:r,height:a,scale:n},setAttributes:i})=>{let[l,s,c,u]=(0,Lte.useSettings)("spacing.units","dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),m=(0,Vo.__experimentalUseCustomUnits)({availableUnits:l||["px","%","vw","em","rem"]}),p=(y,k)=>{let _=parseFloat(k);isNaN(_)&&k||i({[y]:_<0?"0":k})},d=(0,za._x)("Scale","Image scaling options"),f=a||t&&t!=="auto",h=c?.map(({name:y,ratio:k})=>({label:y,value:k})),g=s?.map(({name:y,ratio:k})=>({label:y,value:k})),b=[{label:(0,za._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...u?g:[],...h||[]];return(0,zo.jsxs)(zo.Fragment,{children:[(0,zo.jsx)(Vo.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:(0,za.__)("Aspect ratio"),onDeselect:()=>i({aspectRatio:void 0}),resetAllFilter:()=>({aspectRatio:void 0}),isShownByDefault:!0,panelId:e,children:(0,zo.jsx)(Vo.SelectControl,{__next40pxDefaultSize:!0,label:(0,za.__)("Aspect ratio"),value:t||"auto",options:b,onChange:y=>i({aspectRatio:y})})}),(0,zo.jsx)(Vo.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!a,label:(0,za.__)("Height"),onDeselect:()=>i({height:void 0}),resetAllFilter:()=>({height:void 0}),isShownByDefault:!0,panelId:e,children:(0,zo.jsx)(Vo.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,za.__)("Height"),labelPosition:"top",value:a||"",min:0,onChange:y=>p("height",y),units:m})}),(0,zo.jsx)(Vo.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!r,label:(0,za.__)("Width"),onDeselect:()=>i({width:void 0}),resetAllFilter:()=>({width:void 0}),isShownByDefault:!0,panelId:e,children:(0,zo.jsx)(Vo.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,za.__)("Width"),labelPosition:"top",value:r||"",min:0,onChange:y=>p("width",y),units:m})}),f&&(0,zo.jsx)(Vo.__experimentalToolsPanelItem,{hasValue:()=>!!n&&n!==gL,label:d,onDeselect:()=>i({scale:gL}),resetAllFilter:()=>({scale:gL}),isShownByDefault:!0,panelId:e,children:(0,zo.jsx)(Vo.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:d,value:n,help:ske[n],onChange:y=>i({scale:y}),isBlock:!0,children:lke})})]})},Mte=cke;var Xw=o(M(),1),Fm=o(T(),1),Ate=o(me(),1),Yw=o(P(),1),Vm=o(v(),1),uke=({clientId:e,attributes:t,setAttributes:r,overlayColor:a,setOverlayColor:n})=>{let{dimRatio:i}=t,{gradientValue:l,setGradient:s}=(0,Fm.__experimentalUseGradient)(),c=(0,Fm.__experimentalUseMultipleOriginColorsAndGradients)();return c.hasColorsOrGradients?(0,Vm.jsxs)(Vm.Fragment,{children:[(0,Vm.jsx)(Fm.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:a.color,gradientValue:l,label:(0,Yw.__)("Overlay"),onColorChange:n,onGradientChange:s,isShownByDefault:!0,resetAllFilter:()=>({overlayColor:void 0,customOverlayColor:void 0,gradient:void 0,customGradient:void 0}),clearable:!0}],panelId:e,...c}),(0,Vm.jsx)(Xw.__experimentalToolsPanelItem,{hasValue:()=>i!==void 0,label:(0,Yw.__)("Overlay opacity"),onDeselect:()=>r({dimRatio:0}),resetAllFilter:()=>({dimRatio:0}),isShownByDefault:!0,panelId:e,children:(0,Vm.jsx)(Xw.RangeControl,{label:(0,Yw.__)("Overlay opacity"),value:i,onChange:u=>r({dimRatio:u}),min:0,max:100,step:10,required:!0,__next40pxDefaultSize:!0})})]}):null},Rte=(0,Ate.compose)([(0,Fm.withColors)({overlayColor:"background-color"})])(uke);var Hm=o(T(),1),Vte=o(me(),1);function zte(e){return e===void 0?null:"has-background-dim-"+10*Math.round(e/10)}var Fte=o(v(),1),mke=({attributes:e,overlayColor:t})=>{let{dimRatio:r}=e,{gradientClass:a,gradientValue:n}=(0,Hm.__experimentalUseGradient)(),i=(0,Hm.__experimentalUseMultipleOriginColorsAndGradients)(),l=(0,Hm.__experimentalUseBorderProps)(e),s={backgroundColor:t.color,backgroundImage:n,...l.style};return!i.hasColorsOrGradients||!r?null:(0,Fte.jsx)("span",{"aria-hidden":"true",className:w("wp-block-post-featured-image__overlay",zte(r),{[t.class]:t.class,"has-background-dim":r!==void 0,"has-background-gradient":n,[a]:a},l.className),style:s})},vL=(0,Vte.compose)([(0,Hm.withColors)({overlayColor:"background-color"})])(mke);var qe=o(v(),1),Hte=["image"],{ResolutionTool:pke}=K(Lr.privateApis),Ute="full";function dke({image:e,value:t,onChange:r}){let{imageSizes:a}=(0,u2.useSelect)(i=>{let{getSettings:l}=i(Lr.store);return{imageSizes:l().imageSizes}},[]);if(!a?.length)return null;let n=a.filter(({slug:i})=>e?.media_details?.sizes?.[i]?.source_url).map(({name:i,slug:l})=>({value:l,label:i}));return(0,qe.jsx)(pke,{value:t,defaultValue:Ute,options:n,onChange:r})}function Gte({clientId:e,attributes:t,setAttributes:r,context:{postId:a,postType:n,queryId:i}}){let l=Number.isFinite(i),{isLink:s,aspectRatio:c,height:u,width:m,scale:p,sizeSlug:d,rel:f,linkTarget:h,useFirstImageFromPost:g}=t,[b,y]=(0,Om.useState)(),[k,_]=(0,c2.useEntityProp)("postType",n,"featured_media",a),[x]=(0,c2.useEntityProp)("postType",n,"content",a),S=(0,Om.useMemo)(()=>{if(k)return k;if(!g)return;let te=/<!--\s+wp:(?:core\/)?image\s+(?<attrs>{(?:(?:[^}]+|}+(?=})|(?!}\s+\/?-->).)*)?}\s+)?-->/.exec(x);return te?.groups?.attrs&&JSON.parse(te.groups.attrs)?.id},[k,g,x]),{media:C,postType:N,postPermalink:B}=(0,u2.useSelect)(te=>{let{getEntityRecord:ne,getPostType:le,getEditedEntityRecord:pe}=te(c2.store);return{media:S&&ne("postType","attachment",S,{context:"view"}),postType:n&&le(n),postPermalink:pe("postType",n,a)?.link}},[S,n,a]),D=C?.media_details?.sizes?.[d]?.source_url||C?.source_url,A=(0,Lr.useBlockProps)({style:{width:m,height:u,aspectRatio:c},className:w({"is-transient":b})}),H=(0,Lr.__experimentalUseBorderProps)(t),F=(0,Lr.__experimentalGetShadowClassesAndStyles)(t),z=(0,Lr.useBlockEditingMode)(),I=te=>(0,qe.jsx)(yo.Placeholder,{className:w("block-editor-media-placeholder",H.className),withIllustration:!0,style:{height:!!c&&"100%",width:!!c&&"100%",...H.style,...F.style},children:te}),R=te=>{te?.id&&_(te.id),te?.url&&(0,Ote.isBlobURL)(te.url)&&y(te.url)},$=()=>{r({isLink:!1,linkTarget:"_self",rel:"",sizeSlug:void 0}),_(0)};(0,Om.useEffect)(()=>{D&&b&&y()},[D,b]);let{createErrorNotice:j}=(0,u2.useDispatch)(jte.store),G=te=>{j(te,{type:"snackbar"}),y()},O=q(),J=z==="default"&&(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsx)(Lr.InspectorControls,{group:"color",children:(0,qe.jsx)(Rte,{attributes:t,setAttributes:r,clientId:e})}),(0,qe.jsx)(Lr.InspectorControls,{group:"dimensions",children:(0,qe.jsx)(Mte,{clientId:e,attributes:t,setAttributes:r,media:C})}),(S||l||!a)&&(0,qe.jsx)(Lr.InspectorControls,{children:(0,qe.jsxs)(yo.__experimentalToolsPanel,{label:(0,Fo.__)("Settings"),resetAll:()=>{r({isLink:!1,linkTarget:"_self",rel:"",sizeSlug:Ute})},dropdownMenuProps:O,children:[(0,qe.jsx)(yo.__experimentalToolsPanelItem,{label:N?.labels.singular_name?(0,Fo.sprintf)((0,Fo.__)("Link to %s"),N.labels.singular_name):(0,Fo.__)("Link to post"),isShownByDefault:!0,hasValue:()=>!!s,onDeselect:()=>r({isLink:!1}),children:(0,qe.jsx)(yo.ToggleControl,{label:N?.labels.singular_name?(0,Fo.sprintf)((0,Fo.__)("Link to %s"),N.labels.singular_name):(0,Fo.__)("Link to post"),onChange:()=>r({isLink:!s}),checked:s})}),s&&(0,qe.jsx)(yo.__experimentalToolsPanelItem,{label:(0,Fo.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>h!=="_self",onDeselect:()=>r({linkTarget:"_self"}),children:(0,qe.jsx)(yo.ToggleControl,{label:(0,Fo.__)("Open in new tab"),onChange:te=>r({linkTarget:te?"_blank":"_self"}),checked:h==="_blank"})}),s&&(0,qe.jsx)(yo.__experimentalToolsPanelItem,{label:(0,Fo.__)("Link relation"),isShownByDefault:!0,hasValue:()=>!!f,onDeselect:()=>r({rel:""}),children:(0,qe.jsx)(yo.TextControl,{__next40pxDefaultSize:!0,label:(0,Fo.__)("Link relation"),help:(0,Om.createInterpolateElement)((0,Fo.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,qe.jsx)(yo.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})}),value:f,onChange:te=>r({rel:te})})}),!!C&&(0,qe.jsx)(dke,{image:C,value:d,onChange:te=>r({sizeSlug:te})})]})})]}),ee;if(!S&&(l||!a))return(0,qe.jsxs)(qe.Fragment,{children:[J,(0,qe.jsxs)("div",{...A,children:[s?(0,qe.jsx)("a",{href:B,target:h,children:I()}):I(),(0,qe.jsx)(vL,{attributes:t,setAttributes:r,clientId:e})]})]});let oe=(0,Fo.__)("Add a featured image"),X={...H.style,...F.style,height:c?"100%":u,width:!!c&&"100%",objectFit:!!(u||c)&&p};return!S&&!b?ee=(0,qe.jsx)(Lr.MediaPlaceholder,{onSelect:R,accept:"image/*",allowedTypes:Hte,onError:G,placeholder:I,mediaLibraryButton:({open:te})=>(0,qe.jsx)(yo.Button,{__next40pxDefaultSize:!0,icon:Hc,variant:"primary",label:oe,showTooltip:!0,tooltipPosition:"top center",onClick:()=>{te()}})}):ee=!C&&!b?I():(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsx)("img",{className:H.className,src:b||D,alt:C&&C?.alt_text?(0,Fo.sprintf)((0,Fo.__)("Featured image: %s"),C.alt_text):(0,Fo.__)("Featured image"),style:X}),b&&(0,qe.jsx)(yo.Spinner,{})]}),(0,qe.jsxs)(qe.Fragment,{children:[!b&&J,!!C&&!l&&(0,qe.jsx)(Lr.BlockControls,{group:"other",children:(0,qe.jsx)(Lr.MediaReplaceFlow,{mediaId:S,mediaURL:D,allowedTypes:Hte,accept:"image/*",onSelect:R,onError:G,onReset:$})}),(0,qe.jsxs)("figure",{...A,children:[s?(0,qe.jsx)("a",{href:B,target:h,children:ee}):ee,(0,qe.jsx)(vL,{attributes:t,setAttributes:r,clientId:e})]})]})}var{name:Wte}=Qw,$te={icon:bP,edit:Gte},fke=()=>E({name:Wte,metadata:Qw,settings:$te});var yL={};Z(yL,{init:()=>gke,metadata:()=>Jw,name:()=>Jte,settings:()=>ere});var Xte=o(P(),1);var Jw={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-navigation-link",title:"Post Navigation Link",category:"theme",description:"Displays the next or previous post link that is adjacent to the current post.",textdomain:"default",attributes:{textAlign:{type:"string"},type:{type:"string",default:"next"},label:{type:"string",role:"content"},showTitle:{type:"boolean",default:!1},linkLabel:{type:"boolean",default:!1},arrow:{type:"string",default:"none"},taxonomy:{type:"string",default:""}},usesContext:["postType"],supports:{anchor:!0,reusable:!1,html:!1,color:{link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-post-navigation-link"};var ma=o(M(),1),zi=o(T(),1),dr=o(P(),1),qte=o(V(),1),Zte=o(Q(),1);var lr=o(v(),1);function Kte({context:{postType:e},attributes:{type:t,label:r,showTitle:a,textAlign:n,linkLabel:i,arrow:l,taxonomy:s},setAttributes:c}){let m=(0,zi.useBlockEditingMode)()==="default",p=t==="next",d=p?(0,dr.__)("Next"):(0,dr.__)("Previous"),h={none:"",arrow:p?"\u2192":"\u2190",chevron:p?"\xBB":"\xAB"}[l];a&&(d=p?(0,dr.__)("Next: "):(0,dr.__)("Previous: "));let g=p?(0,dr.__)("Next post"):(0,dr.__)("Previous post"),b=(0,zi.useBlockProps)({className:w({[`has-text-align-${n}`]:n})}),y=(0,qte.useSelect)(x=>{let{getTaxonomies:S}=x(Zte.store);return S({type:e,per_page:-1})},[e]),k=()=>{let x={label:(0,dr.__)("Unfiltered"),value:""},S=(y??[]).filter(({visibility:C})=>!!C?.publicly_queryable).map(C=>({value:C.slug,label:C.name}));return[x,...S]},_=q();return(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(zi.InspectorControls,{children:(0,lr.jsxs)(ma.__experimentalToolsPanel,{label:(0,dr.__)("Settings"),resetAll:()=>{c({showTitle:!1,linkLabel:!1,arrow:"none"})},dropdownMenuProps:_,children:[(0,lr.jsx)(ma.__experimentalToolsPanelItem,{label:(0,dr.__)("Display the title as a link"),isShownByDefault:!0,hasValue:()=>a,onDeselect:()=>c({showTitle:!1}),children:(0,lr.jsx)(ma.ToggleControl,{label:(0,dr.__)("Display the title as a link"),help:(0,dr.__)("If you have entered a custom label, it will be prepended before the title."),checked:!!a,onChange:()=>c({showTitle:!a})})}),a&&(0,lr.jsx)(ma.__experimentalToolsPanelItem,{label:(0,dr.__)("Include the label as part of the link"),isShownByDefault:!0,hasValue:()=>!!i,onDeselect:()=>c({linkLabel:!1}),children:(0,lr.jsx)(ma.ToggleControl,{label:(0,dr.__)("Include the label as part of the link"),checked:!!i,onChange:()=>c({linkLabel:!i})})}),(0,lr.jsx)(ma.__experimentalToolsPanelItem,{label:(0,dr.__)("Arrow"),isShownByDefault:!0,hasValue:()=>l!=="none",onDeselect:()=>c({arrow:"none"}),children:(0,lr.jsxs)(ma.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,dr.__)("Arrow"),value:l,onChange:x=>{c({arrow:x})},help:(0,dr.__)("A decorative arrow for the next and previous link."),isBlock:!0,children:[(0,lr.jsx)(ma.__experimentalToggleGroupControlOption,{value:"none",label:(0,dr._x)("None","Arrow option for Next/Previous link")}),(0,lr.jsx)(ma.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,dr._x)("Arrow","Arrow option for Next/Previous link")}),(0,lr.jsx)(ma.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,dr._x)("Chevron","Arrow option for Next/Previous link")})]})})]})}),(0,lr.jsx)(zi.InspectorControls,{group:"advanced",children:(0,lr.jsx)(ma.SelectControl,{__next40pxDefaultSize:!0,label:(0,dr.__)("Filter by taxonomy"),value:s,options:k(),onChange:x=>c({taxonomy:x}),help:(0,dr.__)("Only link to posts that have the same taxonomy terms as the current post. For example the same tags or categories.")})}),m&&(0,lr.jsx)(zi.BlockControls,{children:(0,lr.jsx)(zi.AlignmentToolbar,{value:n,onChange:x=>{c({textAlign:x})}})}),(0,lr.jsxs)("div",{...b,children:[!p&&h&&(0,lr.jsx)("span",{className:`wp-block-post-navigation-link__arrow-previous is-arrow-${l}`,children:h}),(0,lr.jsx)(zi.RichText,{tagName:"a",identifier:"label","aria-label":g,placeholder:d,value:r,withoutInteractiveFormatting:!0,onChange:x=>c({label:x})}),a&&(0,lr.jsx)("a",{href:"#post-navigation-pseudo-link",onClick:x=>x.preventDefault(),children:(0,dr.__)("An example title")}),p&&h&&(0,lr.jsx)("span",{className:`wp-block-post-navigation-link__arrow-next is-arrow-${l}`,"aria-hidden":!0,children:h})]})]})}var zd=o(P(),1);var Qte=[{name:"post-previous",title:(0,zd.__)("Previous Post"),description:(0,zd.__)("Displays the post link that precedes the current post."),icon:SP,attributes:{type:"previous"},scope:["inserter","transform"],example:{attributes:{label:(0,zd.__)("Previous post"),arrow:"arrow"}}},{isDefault:!0,name:"post-next",title:(0,zd.__)("Next Post"),description:(0,zd.__)("Displays the post link that follows the current post."),icon:OT,attributes:{type:"next"},scope:["inserter","transform"],example:{attributes:{label:(0,zd.__)("Next post"),arrow:"arrow"}}}];Qte.forEach(e=>{e.isActive||(e.isActive=(t,r)=>t.type===r.type)});var Yte=Qte;var{name:Jte}=Jw,ere={edit:Kte,variations:Yte,example:{attributes:{label:(0,Xte.__)("Next post"),arrow:"arrow"}}},gke=()=>E({name:Jte,metadata:Jw,settings:ere});var _L={};Z(_L,{init:()=>kke,metadata:()=>eC,name:()=>lre,settings:()=>sre});var eC={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-template",title:"Post Template",category:"theme",ancestor:["core/query"],description:"Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.",textdomain:"default",usesContext:["queryId","query","displayLayout","templateSlug","previewPostType","enhancedPagination","postType"],supports:{anchor:!0,reusable:!1,html:!1,align:["wide","full"],layout:!0,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{margin:!0,padding:!0,blockGap:{__experimentalDefault:"1.25em"},__experimentalDefaultControls:{blockGap:!0,padding:!1,margin:!1}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0}},style:"wp-block-post-template",editorStyle:"wp-block-post-template-editor"};var fg=o(U(),1),tre=o(V(),1),m2=o(P(),1),dl=o(T(),1),tC=o(M(),1),rre=o(Q(),1);var Va=o(v(),1),bke=[["core/post-title"],["core/post-date",{metadata:{bindings:{datetime:{source:"core/post-data",args:{field:"date"}}}}}],["core/post-excerpt"]];function yke({classList:e}){let t=(0,dl.useInnerBlocksProps)({className:w("wp-block-post",e)},{template:bke,__unstableDisableLayoutClassNames:!0});return(0,Va.jsx)("li",{...t})}function _ke({blocks:e,blockContextId:t,classList:r,isHidden:a,setActiveBlockContextId:n}){let i=(0,dl.__experimentalUseBlockPreview)({blocks:e,props:{className:w("wp-block-post",r)}}),l=()=>{n(t)};return(0,Va.jsx)("li",{...i,tabIndex:0,role:"button",onClick:l,onKeyPress:l,style:{display:a?"none":void 0}})}var xke=(0,fg.memo)(_ke);function ore({setAttributes:e,clientId:t,context:{query:{perPage:r,offset:a=0,postType:n,order:i,orderBy:l,author:s,search:c,exclude:u,sticky:m,inherit:p,taxQuery:d,parents:f,pages:h,format:g,...b}={},templateSlug:y,previewPostType:k},attributes:{layout:_},__unstableLayoutClassNames:x}){let{type:S,columnCount:C=3}=_||{},[N,B]=(0,fg.useState)(),{posts:D,blocks:A}=(0,tre.useSelect)(R=>{let{getEntityRecords:$,getTaxonomies:j}=R(rre.store),{getBlocks:G}=R(dl.store),O=p&&y?.startsWith("category-")&&$("taxonomy","category",{context:"view",per_page:1,_fields:["id"],slug:y.replace("category-","")}),J=p&&y?.startsWith("tag-")&&$("taxonomy","post_tag",{context:"view",per_page:1,_fields:["id"],slug:y.replace("tag-","")}),ee={offset:a||0,order:i,orderby:l};if(d&&!p){let te=j({type:n,per_page:-1,context:"view"}),ne=(pe,Ie="")=>Object.entries(pe||{}).reduce((Ne,[ae,Re])=>{let Ee=te?.find(({slug:ie})=>ie===ae);return Ee?.rest_base&&Re?.length&&(Ne[Ee.rest_base+Ie]=Re),Ne},{}),le=ne(d.include);d.exclude&&Object.assign(le,ne(d.exclude,"_exclude")),Object.keys(le).length&&Object.assign(ee,le)}r&&(ee.per_page=r),s&&(ee.author=s),c&&(ee.search=c),u?.length&&(ee.exclude=u),f?.length&&(ee.parent=f),g?.length&&(ee.format=g),["exclude","only"].includes(m)&&(ee.sticky=m==="only"),["","ignore"].includes(m)&&(delete ee.sticky,ee.ignore_sticky=m==="ignore");let oe=n;return p&&(y?.startsWith("archive-")?(ee.postType=y.replace("archive-",""),oe=ee.postType):O?ee.categories=O[0]?.id:J?ee.tags=J[0]?.id:y?.startsWith("taxonomy-post_format")&&(ee.format=y.replace("taxonomy-post_format-post-format-",""))),{posts:$("postType",k||oe,{...ee,...b}),blocks:G(t)}},[r,a,i,l,t,s,c,n,u,m,p,y,d,f,g,b,k]),H=(0,fg.useMemo)(()=>D?.map(R=>({postType:R.type,postId:R.id,classList:R.class_list??""})),[D]),F=(0,dl.useBlockProps)({className:w(x,{[`columns-${C}`]:S==="grid"&&C})});if(!D)return(0,Va.jsx)("p",{...F,children:(0,Va.jsx)(tC.Spinner,{})});if(!D.length)return(0,Va.jsxs)("p",{...F,children:[" ",(0,m2.__)("No results found.")]});let z=R=>e({layout:{..._,...R}}),I=[{icon:Nl,title:(0,m2._x)("List view","Post template block display setting"),onClick:()=>z({type:"default"}),isActive:S==="default"||S==="constrained"},{icon:Il,title:(0,m2._x)("Grid view","Post template block display setting"),onClick:()=>z({type:"grid",columnCount:C}),isActive:S==="grid"}];return(0,Va.jsxs)(Va.Fragment,{children:[(0,Va.jsx)(dl.BlockControls,{children:(0,Va.jsx)(tC.ToolbarGroup,{controls:I})}),(0,Va.jsx)("ul",{...F,children:H&&H.map(R=>(0,Va.jsxs)(dl.BlockContextProvider,{value:R,children:[R.postId===(N||H[0]?.postId)?(0,Va.jsx)(yke,{classList:R.classList}):null,(0,Va.jsx)(xke,{blocks:A,blockContextId:R.postId,classList:R.classList,setActiveBlockContextId:B,isHidden:R.postId===(N||H[0]?.postId)})]},R.postId))})]})}var are=o(T(),1),nre=o(v(),1);function ire(){return(0,nre.jsx)(are.InnerBlocks.Content,{})}var{name:lre}=eC,sre={icon:Cp,edit:ore,save:ire},kke=()=>E({name:lre,metadata:eC,settings:sre});var xL={};Z(xL,{init:()=>Pke,metadata:()=>rC,name:()=>_re,settings:()=>xre});var yre=o(Yc(),1);var rC={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-terms",title:"Post Terms",category:"theme",description:"Post terms.",textdomain:"default",attributes:{term:{type:"string"},separator:{type:"string",default:", "},prefix:{type:"string",default:"",role:"content"},suffix:{type:"string",default:"",role:"content"}},usesContext:["postId","postType"],example:{viewportWidth:350},supports:{anchor:!0,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,textAlign:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},style:"wp-block-post-terms"};var _u=o(T(),1),oC=o(W(),1),aC=o(M(),1),dre=o(V(),1),fre=o(Wo(),1),jm=o(P(),1),hre=o(Q(),1);var cre=o(Q(),1),ure=o(V(),1),Cke=[];function mre({postId:e,term:t}){let{slug:r}=t;return(0,ure.useSelect)(a=>{if(!t?.visibility?.publicly_queryable||!e)return{postTerms:Cke,isLoading:!1,hasPostTerms:!1};let{getEntityRecords:i,isResolving:l}=a(cre.store),s=["taxonomy",r,{post:e,per_page:-1,context:"view"}],c=i(...s);return{postTerms:c,isLoading:l("getEntityRecords",s),hasPostTerms:!!c?.length}},[e,t?.visibility?.publicly_queryable,r])}var Fa=o(v(),1),pre=["core/bold","core/image","core/italic","core/link","core/strikethrough","core/text-color"];function gre({attributes:e,clientId:t,context:r,isSelected:a,setAttributes:n,insertBlocksAfter:i}){let{term:l,separator:s,prefix:c,suffix:u}=e,{postId:m,postType:p}=r,d=(0,dre.useSelect)(_=>{if(!l)return{};let{getTaxonomy:x}=_(hre.store),S=x(l);return S?.visibility?.publicly_queryable?S:{}},[l]),{postTerms:f,hasPostTerms:h,isLoading:g}=mre({postId:m,term:d}),b=m&&p,y=(0,_u.useBlockDisplayInformation)(t),k=(0,_u.useBlockProps)({className:l&&`taxonomy-${l}`});return(0,Fa.jsxs)(Fa.Fragment,{children:[(0,Fa.jsx)(_u.InspectorControls,{group:"advanced",children:(0,Fa.jsx)(aC.TextControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,jm.__)("Separator"),value:s||"",onChange:_=>{n({separator:_})},help:(0,jm.__)("Enter character(s) used to separate terms.")})}),(0,Fa.jsxs)("div",{...k,children:[g&&b&&(0,Fa.jsx)(aC.Spinner,{}),!g&&(a||c)&&(0,Fa.jsx)(_u.RichText,{identifier:"prefix",allowedFormats:pre,className:"wp-block-post-terms__prefix","aria-label":(0,jm.__)("Prefix"),placeholder:(0,jm.__)("Prefix")+" ",value:c,onChange:_=>n({prefix:_}),tagName:"span"}),(!b||!l)&&(0,Fa.jsx)("span",{children:y.title}),b&&!g&&h&&f.map(_=>(0,Fa.jsx)("a",{href:_.link,onClick:x=>x.preventDefault(),rel:"tag",children:(0,fre.decodeEntities)(_.name)},_.id)).reduce((_,x)=>(0,Fa.jsxs)(Fa.Fragment,{children:[_,(0,Fa.jsx)("span",{className:"wp-block-post-terms__separator",children:s||" "}),x]})),b&&!g&&!h&&(d?.labels?.no_terms||(0,jm.__)("Term items not found.")),!g&&(a||u)&&(0,Fa.jsx)(_u.RichText,{identifier:"suffix",allowedFormats:pre,className:"wp-block-post-terms__suffix","aria-label":(0,jm.__)("Suffix"),placeholder:" "+(0,jm.__)("Suffix"),value:u,onChange:_=>n({suffix:_}),tagName:"span",__unstableOnSplitAtEnd:()=>i((0,oC.createBlock)((0,oC.getDefaultBlockName)()))})]})]})}var Ske={category:Nf,post_tag:xP};function vre(e,t){if(t!=="core/post-terms")return e;let r=e.variations.map(a=>({...a,icon:Ske[a.name]??Nf}));return{...e,variations:r}}var Tke={attributes:{textAlign:{type:"string"},term:{type:"string"},separator:{type:"string",default:", "},prefix:{type:"string",default:"",role:"content"},suffix:{type:"string",default:"",role:"content"}},supports:{anchor:!0,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},migrate:We,isEligible(e){return!!e.textAlign||!!e.className?.match(/\bhas-text-align-(left|center|right)\b/)},save:()=>null},bre=[Tke];var{name:_re}=rC,xre={icon:Nf,edit:gre,deprecated:bre},Pke=()=>((0,yre.addFilter)("blocks.registerBlockType","core/template-part",vre),E({name:_re,metadata:rC,settings:xre}));var kL={};Z(kL,{init:()=>Dke,metadata:()=>nC,name:()=>Nre,settings:()=>Ere});var nC={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-time-to-read",title:"Time to Read",category:"theme",description:"Show minutes required to finish reading the post. Can also show a word count.",textdomain:"default",usesContext:["postId","postType"],attributes:{displayAsRange:{type:"boolean",default:!0},displayMode:{type:"string",default:"time"},averageReadingSpeed:{type:"number",default:189}},supports:{anchor:!0,color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},html:!1,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,textAlign:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0}}};var Ha=o(P(),1),Cre=o(U(),1),iC=o(T(),1),hg=o(M(),1),Sre=o(W(),1),lC=o(Q(),1),Tre=o(wre(),1);var fc=o(v(),1);function Ike({attributes:e,setAttributes:t,context:r}){let{displayAsRange:a,displayMode:n,averageReadingSpeed:i}=e,{postId:l,postType:s}=r,c=q(),[u]=(0,lC.useEntityProp)("postType",s,"content",l),[m]=(0,lC.useEntityBlockEditor)("postType",s,{id:l}),p=(0,Cre.useMemo)(()=>{let f;u instanceof Function?f=u({blocks:m}):m?f=(0,Sre.__unstableSerializeAndClean)(m):f=u;let h=(0,Ha._x)("words","Word count type. Do not translate!"),g=(0,Tre.count)(f||"",h);if(n==="time"){if(a){let y=Math.max(1,Math.round(g/i*1.2)),k=Math.max(1,Math.round(g/i*.8));k===y&&(y=y+1);let _=(0,Ha._x)("%1$s\u2013%2$s minutes","Range of minutes to read");return(0,Ha.sprintf)(_,k,y)}let b=Math.max(1,Math.round(g/i));return(0,Ha.sprintf)((0,Ha._n)("%s minute","%s minutes",b),b)}if(n==="words")return h==="words"?(0,Ha.sprintf)((0,Ha._n)("%s word","%s words",g),g.toLocaleString()):(0,Ha.sprintf)((0,Ha._n)("%s character","%s characters",g),g.toLocaleString())},[u,m,a,n,i]),d=(0,iC.useBlockProps)();return(0,fc.jsxs)(fc.Fragment,{children:[n==="time"&&(0,fc.jsx)(iC.InspectorControls,{children:(0,fc.jsx)(hg.__experimentalToolsPanel,{label:(0,Ha.__)("Settings"),resetAll:()=>{t({displayAsRange:!0})},dropdownMenuProps:c,children:(0,fc.jsx)(hg.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,Ha._x)("Display as range","Turns reading time range display on or off"),hasValue:()=>!a,onDeselect:()=>{t({displayAsRange:!0})},children:(0,fc.jsx)(hg.ToggleControl,{label:(0,Ha.__)("Display as range"),checked:!!a,onChange:()=>t({displayAsRange:!a})})})})}),(0,fc.jsx)("div",{...d,children:p})]})}var Pre=Ike;var p2=o(P(),1);var Nke=[{name:"time-to-read",title:(0,p2.__)("Time to Read"),description:(0,p2.__)("Show minutes required to finish reading the post."),attributes:{displayMode:"time"},scope:["inserter","transform"],isActive:e=>e?.displayMode==="time",icon:y1,isDefault:!0},{name:"word-count",title:(0,p2.__)("Word Count"),description:(0,p2.__)("Show the number of words in the post."),attributes:{displayMode:"words"},scope:["inserter","transform"],isActive:e=>e?.displayMode==="words",icon:HB}],Bre=Nke;var Eke={attributes:{textAlign:{type:"string"},displayAsRange:{type:"boolean",default:!0},displayMode:{type:"string",default:"time"},averageReadingSpeed:{type:"number",default:189}},supports:{anchor:!0,color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},html:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0}},migrate:We,isEligible(e){return!!e.textAlign||!!e.className?.match(/\bhas-text-align-(left|center|right)\b/)},save:()=>null},Ire=[Eke];var{name:Nre}=nC,Ere={icon:y1,edit:Pre,variations:Bre,example:{},deprecated:Ire},Dke=()=>E({name:Nre,metadata:nC,settings:Ere});var wL={};Z(wL,{init:()=>Ake,metadata:()=>sC,name:()=>Rre,settings:()=>zre});var sC={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-title",title:"Title",category:"theme",description:"Displays the title of a post, page, or any other content-type.",textdomain:"default",usesContext:["postId","postType","queryId"],attributes:{textAlign:{type:"string"},level:{type:"number",default:2},levelOptions:{type:"array"},isLink:{type:"boolean",default:!1,role:"content"},rel:{type:"string",attribute:"rel",default:"",role:"content"},linkTarget:{type:"string",default:"_self",role:"content"}},example:{viewportWidth:350},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},style:"wp-block-post-title"};var hn=o(T(),1),Vi=o(M(),1),Wn=o(P(),1),cC=o(W(),1),d2=o(Q(),1),Dre=o(V(),1),Lre=o(U(),1);var Rt=o(v(),1);function Mre({attributes:{level:e,levelOptions:t,textAlign:r,isLink:a,rel:n,linkTarget:i},setAttributes:l,context:{postType:s,postId:c,queryId:u},insertBlocksAfter:m}){let p=e===0?"p":`h${e}`,d=Number.isFinite(u),f=(0,Dre.useSelect)(N=>d?!1:N(d2.store).canUser("update",{kind:"postType",name:s,id:c}),[d,s,c]),[h="",g,b]=(0,d2.useEntityProp)("postType",s,"title",c),[y]=(0,d2.useEntityProp)("postType",s,"link",c),k=()=>{m((0,cC.createBlock)((0,cC.getDefaultBlockName)()))},_=(0,hn.useBlockProps)({className:w({[`has-text-align-${r}`]:r})}),x=(0,hn.useBlockEditingMode)(),S=q(),C=(0,Rt.jsx)(p,{..._,children:(0,Wn.__)("Title")});return s&&c&&(C=f?(0,Rt.jsx)(hn.PlainText,{tagName:p,placeholder:(0,Wn.__)("(no title)"),value:h,onChange:g,__experimentalVersion:2,__unstableOnSplitAtEnd:k,..._}):(0,Rt.jsx)(p,{..._,dangerouslySetInnerHTML:{__html:b?.rendered||(0,Wn.__)("(no title)")}})),a&&s&&c&&(C=f?(0,Rt.jsx)(p,{..._,children:(0,Rt.jsx)(hn.PlainText,{tagName:"a",href:y,target:i,rel:n,placeholder:h.length?null:(0,Wn.__)("(no title)"),value:h,onChange:g,__experimentalVersion:2,__unstableOnSplitAtEnd:k})}):(0,Rt.jsx)(p,{..._,children:(0,Rt.jsx)("a",{href:y,target:i,rel:n,onClick:N=>N.preventDefault(),dangerouslySetInnerHTML:{__html:b?.rendered||(0,Wn.__)("(no title)")}})})),(0,Rt.jsxs)(Rt.Fragment,{children:[x==="default"&&(0,Rt.jsxs)(Rt.Fragment,{children:[(0,Rt.jsxs)(hn.BlockControls,{group:"block",children:[(0,Rt.jsx)(hn.HeadingLevelDropdown,{value:e,options:t,onChange:N=>l({level:N})}),(0,Rt.jsx)(hn.AlignmentControl,{value:r,onChange:N=>{l({textAlign:N})}})]}),(0,Rt.jsx)(hn.InspectorControls,{children:(0,Rt.jsxs)(Vi.__experimentalToolsPanel,{label:(0,Wn.__)("Settings"),resetAll:()=>{l({rel:"",linkTarget:"_self",isLink:!1})},dropdownMenuProps:S,children:[(0,Rt.jsx)(Vi.__experimentalToolsPanelItem,{label:(0,Wn.__)("Make title a link"),isShownByDefault:!0,hasValue:()=>a,onDeselect:()=>l({isLink:!1}),children:(0,Rt.jsx)(Vi.ToggleControl,{label:(0,Wn.__)("Make title a link"),onChange:()=>l({isLink:!a}),checked:a})}),a&&(0,Rt.jsxs)(Rt.Fragment,{children:[(0,Rt.jsx)(Vi.__experimentalToolsPanelItem,{label:(0,Wn.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>i==="_blank",onDeselect:()=>l({linkTarget:"_self"}),children:(0,Rt.jsx)(Vi.ToggleControl,{label:(0,Wn.__)("Open in new tab"),onChange:N=>l({linkTarget:N?"_blank":"_self"}),checked:i==="_blank"})}),(0,Rt.jsx)(Vi.__experimentalToolsPanelItem,{label:(0,Wn.__)("Link relation"),isShownByDefault:!0,hasValue:()=>!!n,onDeselect:()=>l({rel:""}),children:(0,Rt.jsx)(Vi.TextControl,{__next40pxDefaultSize:!0,label:(0,Wn.__)("Link relation"),help:(0,Lre.createInterpolateElement)((0,Wn.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,Rt.jsx)(Vi.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})}),value:n,onChange:N=>l({rel:N})})})]})]})})]}),C]})}var Mke={attributes:{textAlign:{type:"string"},level:{type:"number",default:2},isLink:{type:"boolean",default:!1},rel:{type:"string",attribute:"rel",default:""},linkTarget:{type:"string",default:"_self"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0},spacing:{margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0}},save(){return null},migrate:Ot,isEligible({style:e}){return e?.typography?.fontFamily}},Are=[Mke];var{name:Rre}=sC,zre={icon:El,edit:Mre,deprecated:Are},Ake=()=>E({name:Rre,metadata:sC,settings:zre});var PL={};Z(PL,{init:()=>Hke,metadata:()=>pC,name:()=>Ure,settings:()=>fC});var TL=o(P(),1);var jre=o(W(),1);var CL=o(P(),1),uC=o(T(),1),mC=o(W(),1),Vre=o(v(),1);function Fre({attributes:e,mergeBlocks:t,setAttributes:r,onRemove:a,insertBlocksAfter:n,style:i}){let{content:l}=e,s=(0,uC.useBlockProps)({style:i});return(0,Vre.jsx)(uC.RichText,{tagName:"pre",identifier:"content",preserveWhiteSpace:!0,value:l,onChange:c=>{r({content:c})},onRemove:a,"aria-label":(0,CL.__)("Preformatted text"),placeholder:(0,CL.__)("Write preformatted text\u2026"),onMerge:t,...s,__unstablePastePlainText:!0,__unstableOnSplitAtDoubleLineEnd:()=>n((0,mC.createBlock)((0,mC.getDefaultBlockName)()))})}var pC={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/preformatted",title:"Preformatted",category:"text",description:"Add text that respects your spacing and tabs, and also allows styling.",textdomain:"default",attributes:{content:{type:"rich-text",source:"rich-text",selector:"pre",__unstablePreserveWhiteSpace:!0,role:"content"}},supports:{anchor:!0,color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{padding:!0,margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},style:"wp-block-preformatted"};var dC=o(T(),1),SL=o(v(),1);function Hre({attributes:e}){let{content:t}=e;return(0,SL.jsx)("pre",{...dC.useBlockProps.save(),children:(0,SL.jsx)(dC.RichText.Content,{value:t})})}var f2=o(W(),1),zke={from:[{type:"block",blocks:["core/code","core/paragraph","core/verse"],transform:({content:e,anchor:t})=>(0,f2.createBlock)("core/preformatted",{content:e,anchor:t})},{type:"raw",isMatch:e=>e.nodeName==="PRE"&&!(e.children.length===1&&e.firstChild.nodeName==="CODE"),schema:({phrasingContentSchema:e})=>({pre:{children:e}})}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>(0,f2.createBlock)("core/paragraph",e)},{type:"block",blocks:["core/code"],transform:e=>(0,f2.createBlock)("core/code",e)},{type:"block",blocks:["core/verse"],transform:e=>(0,f2.createBlock)("core/verse",e)}]},Ore=zke;var{fieldsKey:Vke,formKey:Fke}=K(jre.privateApis),{name:Ure}=pC,fC={icon:wP,example:{attributes:{content:(0,TL.__)(`EXT. XANADU - FAINT DAWN - 1940 (MINIATURE)
Window, very small in the distance, illuminated.
All around this is an almost totally black screen. Now, as the camera moves slowly towards the window which is almost a postage stamp in the frame, other forms appear;`)}},transforms:Ore,edit:Fre,save:Hre,merge(e,t){return{content:e.content+`

`+t.content}}};window.__experimentalContentOnlyInspectorFields&&(fC[Vke]=[{id:"content",label:(0,TL.__)("Content"),type:"text",Edit:"rich-text"}],fC[Fke]={fields:["content"]});var Hke=()=>E({name:Ure,metadata:pC,settings:fC});var BL={};Z(BL,{init:()=>Jke,metadata:()=>gC,name:()=>eoe,settings:()=>vC});var v2=o(P(),1);var Jre=o(W(),1);var ht=o(T(),1),Wre=o(V(),1);var Vd="is-style-solid-color";var fr=o(v(),1),h2={value:{type:"string",source:"html",selector:"blockquote",multiline:"p"},citation:{type:"string",source:"html",selector:"cite",default:""},mainColor:{type:"string"},customMainColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}};function Gre(e){if(!e)return;let t=e.match(/border-color:([^;]+)[;]?/);if(t&&t[1])return t[1]}function Fd(e){e=e||"<p></p>";let r=`</p>${e}<p>`.split("</p><p>");return r.shift(),r.pop(),r.join("<br>")}var Oke={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",role:"content"},citation:{type:"string",source:"html",selector:"cite",default:"",role:"content"},textAlign:{type:"string"}},supports:{anchor:!0,align:["left","right","wide","full"],color:{gradients:!0,background:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},__experimentalStyle:{typography:{fontSize:"1.5em",lineHeight:"1.6"}}},save({attributes:e}){let{textAlign:t,citation:r,value:a}=e,n=!ht.RichText.isEmpty(r);return(0,fr.jsx)("figure",{...ht.useBlockProps.save({className:w({[`has-text-align-${t}`]:t})}),children:(0,fr.jsxs)("blockquote",{children:[(0,fr.jsx)(ht.RichText.Content,{value:a,multiline:!0}),n&&(0,fr.jsx)(ht.RichText.Content,{tagName:"cite",value:r})]})})},migrate({value:e,...t}){return{value:Fd(e),...t}}},jke={attributes:{...h2},supports:{anchor:!0,align:["left","right","wide","full"],color:{gradients:!0,background:!0,link:!0},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0}},save({attributes:e}){let{mainColor:t,customMainColor:r,customTextColor:a,textColor:n,value:i,citation:l,className:s}=e,c=s?.includes(Vd),u,m;if(c){let h=(0,ht.getColorClassName)("background-color",t);u=w({"has-background":h||r,[h]:h}),m={backgroundColor:h?void 0:r}}else r&&(m={borderColor:r});let p=(0,ht.getColorClassName)("color",n),d=w({"has-text-color":n||a,[p]:p}),f=p?void 0:{color:a};return(0,fr.jsx)("figure",{...ht.useBlockProps.save({className:u,style:m}),children:(0,fr.jsxs)("blockquote",{className:d,style:f,children:[(0,fr.jsx)(ht.RichText.Content,{value:i,multiline:!0}),!ht.RichText.isEmpty(l)&&(0,fr.jsx)(ht.RichText.Content,{tagName:"cite",value:l})]})})},migrate({value:e,className:t,mainColor:r,customMainColor:a,customTextColor:n,...i}){let l=t?.includes(Vd),s;return a&&(l?s={color:{background:a}}:s={border:{color:a}}),n&&s&&(s.color={...s.color,text:n}),{value:Fd(e),className:t,backgroundColor:l?r:void 0,borderColor:l?void 0:r,textAlign:l?"left":void 0,...i,style:s}}},Uke={attributes:{...h2,figureStyle:{source:"attribute",selector:"figure",attribute:"style"}},save({attributes:e}){let{mainColor:t,customMainColor:r,textColor:a,customTextColor:n,value:i,citation:l,className:s,figureStyle:c}=e,u=s?.includes(Vd),m,p;if(u){let g=(0,ht.getColorClassName)("background-color",t);m=w({"has-background":g||r,[g]:g}),p={backgroundColor:g?void 0:r}}else r?p={borderColor:r}:t&&(p={borderColor:Gre(c)});let d=(0,ht.getColorClassName)("color",a),f=(a||n)&&w("has-text-color",{[d]:d});return(0,fr.jsx)("figure",{className:m,style:p,children:(0,fr.jsxs)("blockquote",{className:f,style:d?void 0:{color:n},children:[(0,fr.jsx)(ht.RichText.Content,{value:i,multiline:!0}),!ht.RichText.isEmpty(l)&&(0,fr.jsx)(ht.RichText.Content,{tagName:"cite",value:l})]})})},migrate({value:e,className:t,figureStyle:r,mainColor:a,customMainColor:n,customTextColor:i,...l}){let s=t?.includes(Vd),c;if(n&&(s?c={color:{background:n}}:c={border:{color:n}}),i&&c&&(c.color={...c.color,text:i}),!s&&a&&r){let u=Gre(r);if(u)return{value:Fd(e),...l,className:t,style:{border:{color:u}}}}return{value:Fd(e),className:t,backgroundColor:s?a:void 0,borderColor:s?void 0:a,textAlign:s?"left":void 0,...l,style:c}}},Gke={attributes:h2,save({attributes:e}){let{mainColor:t,customMainColor:r,textColor:a,customTextColor:n,value:i,citation:l,className:s}=e,c=s?.includes(Vd),u,m;if(c)u=(0,ht.getColorClassName)("background-color",t),u||(m={backgroundColor:r});else if(r)m={borderColor:r};else if(t){let h=(0,Wre.select)(ht.store).getSettings().colors??[];m={borderColor:(0,ht.getColorObjectByAttributeValues)(h,t).color}}let p=(0,ht.getColorClassName)("color",a),d=a||n?w("has-text-color",{[p]:p}):void 0;return(0,fr.jsx)("figure",{className:u,style:m,children:(0,fr.jsxs)("blockquote",{className:d,style:p?void 0:{color:n},children:[(0,fr.jsx)(ht.RichText.Content,{value:i,multiline:!0}),!ht.RichText.isEmpty(l)&&(0,fr.jsx)(ht.RichText.Content,{tagName:"cite",value:l})]})})},migrate({value:e,className:t,mainColor:r,customMainColor:a,customTextColor:n,...i}){let l=t?.includes(Vd),s={};return a&&(l?s={color:{background:a}}:s={border:{color:a}}),n&&s&&(s.color={...s.color,text:n}),{value:Fd(e),className:t,backgroundColor:l?r:void 0,borderColor:l?void 0:r,textAlign:l?"left":void 0,...i,style:s}}},Wke={attributes:{...h2},save({attributes:e}){let{value:t,citation:r}=e;return(0,fr.jsxs)("blockquote",{children:[(0,fr.jsx)(ht.RichText.Content,{value:t,multiline:!0}),!ht.RichText.isEmpty(r)&&(0,fr.jsx)(ht.RichText.Content,{tagName:"cite",value:r})]})},migrate({value:e,...t}){return{value:Fd(e),...t}}},$ke={attributes:{...h2,citation:{type:"string",source:"html",selector:"footer"},align:{type:"string",default:"none"}},save({attributes:e}){let{value:t,citation:r,align:a}=e;return(0,fr.jsxs)("blockquote",{className:`align${a}`,children:[(0,fr.jsx)(ht.RichText.Content,{value:t,multiline:!0}),!ht.RichText.isEmpty(r)&&(0,fr.jsx)(ht.RichText.Content,{tagName:"footer",value:r})]})},migrate({value:e,...t}){return{value:Fd(e),...t}}},$re=[Oke,jke,Uke,Gke,Wke,$ke];var g2=o(P(),1),hc=o(T(),1),hC=o(W(),1),Kre=o(U(),1);var qre="figure";var Zre="blockquote";var ms=o(v(),1),qke=Kre.Platform.OS==="web";function Zke({attributes:e,setAttributes:t,isSelected:r,insertBlocksAfter:a}){let{textAlign:n,citation:i,value:l}=e,s=(0,hc.useBlockProps)({className:w({[`has-text-align-${n}`]:n})}),c=!hc.RichText.isEmpty(i)||r;return(0,ms.jsxs)(ms.Fragment,{children:[(0,ms.jsx)(hc.BlockControls,{group:"block",children:(0,ms.jsx)(hc.AlignmentControl,{value:n,onChange:u=>{t({textAlign:u})}})}),(0,ms.jsx)(qre,{...s,children:(0,ms.jsxs)(Zre,{children:[(0,ms.jsx)(hc.RichText,{identifier:"value",tagName:"p",value:l,onChange:u=>t({value:u}),"aria-label":(0,g2.__)("Pullquote text"),placeholder:(0,g2.__)("Add quote"),textAlign:"center"}),c&&(0,ms.jsx)(hc.RichText,{identifier:"citation",tagName:qke?"cite":void 0,style:{display:"block"},value:i,"aria-label":(0,g2.__)("Pullquote citation text"),placeholder:(0,g2.__)("Add citation"),onChange:u=>t({citation:u}),className:"wp-block-pullquote__citation",__unstableMobileNoFocusOnMount:!0,textAlign:"center",__unstableOnSplitAtEnd:()=>a((0,hC.createBlock)((0,hC.getDefaultBlockName)()))})]})})]})}var Qre=Zke;var gC={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/pullquote",title:"Pullquote",category:"text",description:"Give special visual emphasis to a quote from your text.",textdomain:"default",attributes:{value:{type:"rich-text",source:"rich-text",selector:"p",role:"content"},citation:{type:"rich-text",source:"rich-text",selector:"cite",role:"content"},textAlign:{type:"string"}},supports:{anchor:!0,align:["left","right","wide","full"],background:{backgroundImage:!0,backgroundSize:!0,__experimentalDefaultControls:{backgroundImage:!0}},color:{gradients:!0,background:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},dimensions:{minHeight:!0,__experimentalDefaultControls:{minHeight:!1}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},__experimentalStyle:{typography:{fontSize:"1.5em",lineHeight:"1.6"}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-pullquote-editor",style:"wp-block-pullquote"};var gg=o(T(),1),vg=o(v(),1);function Yre({attributes:e}){let{textAlign:t,citation:r,value:a}=e,n=!gg.RichText.isEmpty(r);return(0,vg.jsx)("figure",{...gg.useBlockProps.save({className:w({[`has-text-align-${t}`]:t})}),children:(0,vg.jsxs)("blockquote",{children:[(0,vg.jsx)(gg.RichText.Content,{tagName:"p",value:a}),n&&(0,vg.jsx)(gg.RichText.Content,{tagName:"cite",value:r})]})})}var xu=o(W(),1),bg=o(em(),1),Qke={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,xu.createBlock)("core/pullquote",{value:(0,bg.toHTMLString)({value:(0,bg.join)(e.map(({content:t})=>(0,bg.create)({html:t})),`
`)}),anchor:e.anchor})},{type:"block",blocks:["core/heading"],transform:({content:e,anchor:t})=>(0,xu.createBlock)("core/pullquote",{value:e,anchor:t})}],to:[{type:"block",blocks:["core/paragraph"],transform:({value:e,citation:t})=>{let r=[];return e&&r.push((0,xu.createBlock)("core/paragraph",{content:e})),t&&r.push((0,xu.createBlock)("core/paragraph",{content:t})),r.length===0?(0,xu.createBlock)("core/paragraph",{content:""}):r}},{type:"block",blocks:["core/heading"],transform:({value:e,citation:t})=>{if(!e)return(0,xu.createBlock)("core/heading",{content:t});let r=(0,xu.createBlock)("core/heading",{content:e});return t?[r,(0,xu.createBlock)("core/heading",{content:t})]:r}}]},Xre=Qke;var{fieldsKey:Yke,formKey:Xke}=K(Jre.privateApis),{name:eoe}=gC,vC={icon:EP,example:{attributes:{value:(0,v2.__)("One of the hardest things to do in technology is disrupt yourself."),citation:(0,v2.__)("Matt Mullenweg")}},transforms:Xre,edit:Qre,save:Yre,deprecated:$re};window.__experimentalContentOnlyInspectorFields&&(vC[Yke]=[{id:"value",label:(0,v2.__)("Content"),type:"text",Edit:"rich-text"},{id:"citation",label:(0,v2.__)("Citation"),type:"text",Edit:"rich-text"}],vC[Xke]={fields:["value","citation"]});var Jke=()=>E({name:eoe,metadata:gC,settings:vC});var UL={};Z(UL,{init:()=>N5e,metadata:()=>bC,name:()=>Nae,settings:()=>Eae});var bC={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/query",title:"Query Loop",category:"theme",description:"An advanced block that allows displaying post types based on different query parameters and visual configurations.",keywords:["posts","list","blog","blogs","custom post types"],textdomain:"default",attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0,taxQuery:null,parents:[],format:[]}},tagName:{type:"string",default:"div"},namespace:{type:"string"},enhancedPagination:{type:"boolean",default:!1}},usesContext:["templateSlug"],providesContext:{queryId:"queryId",query:"query",displayLayout:"displayLayout",enhancedPagination:"enhancedPagination"},supports:{anchor:!0,align:["wide","full"],html:!1,layout:!0,interactivity:!0},editorStyle:"wp-block-query-editor"};var hae=o(V(),1),gae=o(U(),1),vae=o(T(),1);var EC=o(V(),1),uae=o(me(),1),w2=o(U(),1),hl=o(T(),1),mae=o(P(),1),pae=o(Q(),1);var moe=o(M(),1),kC=o(P(),1);var gc=o(V(),1),Od=o(U(),1),b2=o(Q(),1),yC=o(T(),1),toe=o(Wo(),1),Hd=o(P(),1),ku=o(W(),1),y2=e=>{let t=e?.reduce((r,a)=>{let{mapById:n,mapByName:i,names:l}=r;return n[a.id]=a,i[a.name]=a,l.push(a.name),r},{mapById:{},mapByName:{},names:[]});return{entities:e,...t}},t5e=(e,t)=>{let r=t.split("."),a=e;return r.forEach(n=>{a=a?.[n]}),a},IL=(e,t)=>(e||[]).map(r=>({...r,name:(0,toe.decodeEntities)(t5e(r,t))})),roe=()=>{let e=(0,gc.useSelect)(n=>{let{getPostTypes:i}=n(b2.store),l=["attachment"];return i({per_page:-1})?.filter(({viewable:c,slug:u})=>c&&!l.includes(u))},[]),t=(0,Od.useMemo)(()=>{if(e?.length)return e.reduce((n,i)=>(n[i.slug]=i.taxonomies,n),{})},[e]),r=(0,Od.useMemo)(()=>(e||[]).map(({labels:n,slug:i})=>({label:n.singular_name,value:i})),[e]),a=(0,Od.useMemo)(()=>e?.length?e.reduce((n,i)=>(n[i.slug]=i.supports?.["post-formats"]||!1,n),{}):{},[e]);return{postTypesTaxonomiesMap:t,postTypesSelectOptions:r,postTypeFormatSupportMap:a}},_C=e=>{let t=(0,gc.useSelect)(r=>{let{getTaxonomies:a,getPostType:n}=r(b2.store);return n(e)?.taxonomies?.length>0?a({type:e,per_page:-1}):[]},[e]);return(0,Od.useMemo)(()=>t?.filter(({visibility:r})=>!!r?.publicly_queryable),[t])};function ooe(e){return(0,gc.useSelect)(t=>{let r=t(b2.store).getPostType(e);return r?.viewable&&r?.hierarchical},[e])}function aoe(e){let t=(0,gc.useSelect)(r=>!!r(b2.store).getPostType(e)?.supports?.["page-attributes"],[e]);return(0,Od.useMemo)(()=>{let r=[{label:(0,Hd.__)("Newest to oldest"),value:"date/desc"},{label:(0,Hd.__)("Oldest to newest"),value:"date/asc"},{label:(0,Hd.__)("A \u2192 Z"),value:"title/asc"},{label:(0,Hd.__)("Z \u2192 A"),value:"title/desc"}];return t&&r.push({label:(0,Hd.__)("Ascending by order"),value:"menu_order/asc"},{label:(0,Hd.__)("Descending by order"),value:"menu_order/desc"}),r},[t])}function noe(e){return(0,gc.useSelect)(t=>t(ku.store).getActiveBlockVariation("core/query",e)?.allowedControls,[e])}function Fi(e,t){return e?e.includes(t):!0}var ioe=(e,t)=>{let{query:{postType:r,inherit:a},namespace:n}=t,i=e.map(c=>(0,ku.cloneBlock)(c)),l=[],s=[...i];for(;s.length>0;){let c=s.shift();c.name==="core/query"&&(c.attributes.query={...c.attributes.query,postType:r,inherit:a},n&&(c.attributes.namespace=n),l.push(c.clientId)),c.innerBlocks?.forEach(u=>{s.push(u)})}return{newBlocks:i,queryClientIds:l}};function loe(e,t){return(0,gc.useSelect)(r=>{let a=r(ku.store).getActiveBlockVariation("core/query",t)?.name;if(!a)return"core/query";let{getBlockRootClientId:n,getPatternsByBlockTypes:i}=r(yC.store),l=n(e);return i(`core/query/${a}`,l).length>0?`core/query/${a}`:"core/query"},[e,t])}function soe(e){let{activeVariationName:t,blockVariations:r}=(0,gc.useSelect)(n=>{let{getActiveBlockVariation:i,getBlockVariations:l}=n(ku.store);return{activeVariationName:i("core/query",e)?.name,blockVariations:l("core/query","block")}},[e]);return(0,Od.useMemo)(()=>{let n=l=>!l.attributes?.namespace;if(!t)return r.filter(n);let i=r.filter(l=>l.attributes?.namespace?.includes(t));return i.length?i:r.filter(n)},[t,r])}var coe=(e,t)=>(0,gc.useSelect)(r=>{let{getBlockRootClientId:a,getPatternsByBlockTypes:n}=r(yC.store),i=a(e);return n(t,i)},[t,e]),xC=e=>(0,gc.useSelect)(t=>{let{getClientIdsOfDescendants:r,getBlockName:a}=t(yC.store);return r(e).some(n=>{let i=a(n),l=Object.is((0,ku.getBlockSupport)(i,"interactivity"),!0),s=(0,ku.getBlockSupport)(i,"interactivity.clientNavigation");return!l&&!s})},[e]);function uoe(e){if(!e)return{isSingular:!0};let t=!1,r=e==="wp"?"custom":e,a=["404","blank","single","page","custom"],n=e.includes("-")?e.split("-",1)[0]:e;return e.includes("-")&&e.split("-").slice(1).join("-")&&(r=n),t=a.includes(r),{isSingular:t,templateType:r}}var _2=o(v(),1);function poe({enhancedPagination:e,setAttributes:t,clientId:r}){let a=xC(r),n=(0,kC.__)("Reload the full page\u2014instead of just the posts list\u2014when visitors navigate between pages.");return a&&(n=(0,kC.__)("Enhancement disabled because there are non-compatible blocks inside the Query block.")),(0,_2.jsx)(_2.Fragment,{children:(0,_2.jsx)(moe.ToggleControl,{label:(0,kC.__)("Reload full page"),help:n,checked:!e,disabled:a,onChange:i=>{t({enhancedPagination:!i})}})})}var bt=o(M(),1),tae=o(V(),1),rae=o(Q(),1),hr=o(P(),1),oae=o(me(),1),SC=o(U(),1);var doe=o(M(),1),yg=o(P(),1),foe=o(v(),1),r5e=[{label:(0,yg.__)("Newest to oldest"),value:"date/desc"},{label:(0,yg.__)("Oldest to newest"),value:"date/asc"},{label:(0,yg.__)("A \u2192 Z"),value:"title/asc"},{label:(0,yg.__)("Z \u2192 A"),value:"title/desc"}];function o5e({order:e,orderBy:t,orderByOptions:r=r5e,onChange:a}){return(0,foe.jsx)(doe.SelectControl,{__next40pxDefaultSize:!0,label:(0,yg.__)("Order by"),value:`${t}/${e}`,options:r,onChange:n=>{let[i,l]=n.split("/");a({order:l,orderBy:i})}})}var hoe=o5e;var goe=o(P(),1),voe=o(M(),1),boe=o(V(),1),yoe=o(Q(),1);var _oe=o(v(),1),a5e={who:"authors",per_page:-1,_fields:"id,name",context:"view"};function n5e({value:e,onChange:t}){let r=(0,boe.useSelect)(c=>{let{getUsers:u}=c(yoe.store);return u(a5e)},[]);if(!r)return null;let a=y2(r),i=(e?e.toString().split(","):[]).reduce((c,u)=>{let m=a.mapById[u];return m&&c.push({id:u,value:m.name}),c},[]),l=(c,u)=>{let m=u?.id||c[u]?.id;if(m)return m},s=c=>{let u=Array.from(c.reduce((m,p)=>{let d=l(a.mapByName,p);return d&&m.add(d),m},new Set));t({author:u.join(",")})};return(0,_oe.jsx)(voe.FormTokenField,{label:(0,goe.__)("Authors"),value:i,suggestions:a.names,onChange:s,__experimentalShowHowTo:!1,__next40pxDefaultSize:!0})}var xoe=n5e;var woe=o(P(),1),Coe=o(M(),1),NL=o(V(),1),EL=o(Q(),1),wu=o(U(),1),Soe=o(me(),1);var Toe=o(v(),1),jd=[],koe={order:"asc",_fields:"id,title",context:"view"};function i5e({parents:e,postType:t,onChange:r}){let[a,n]=(0,wu.useState)(""),[i,l]=(0,wu.useState)(jd),[s,c]=(0,wu.useState)(jd),u=(0,Soe.useDebounce)(n,250),{searchResults:m,searchHasResolved:p}=(0,NL.useSelect)(b=>{if(!a)return{searchResults:jd,searchHasResolved:!0};let{getEntityRecords:y,hasFinishedResolution:k}=b(EL.store),_=["postType",t,{...koe,search:a,orderby:"relevance",exclude:e,per_page:20}];return{searchResults:y(..._),searchHasResolved:k("getEntityRecords",_)}},[a,t,e]),d=(0,NL.useSelect)(b=>{if(!e?.length)return jd;let{getEntityRecords:y}=b(EL.store);return y("postType",t,{...koe,include:e,per_page:e.length})},[e,t]);(0,wu.useEffect)(()=>{if(e?.length||l(jd),!d?.length)return;let b=y2(IL(d,"title.rendered")),y=e.reduce((k,_)=>{let x=b.mapById[_];return x&&k.push({id:_,value:x.name}),k},[]);l(y)},[e,d]);let f=(0,wu.useMemo)(()=>m?.length?y2(IL(m,"title.rendered")):jd,[m]);(0,wu.useEffect)(()=>{p&&c(f.names)},[f.names,p]);let h=(b,y)=>{let k=y?.id||b?.[y]?.id;if(k)return k},g=b=>{let y=Array.from(b.reduce((k,_)=>{let x=h(f.mapByName,_);return x&&k.add(x),k},new Set));c(jd),r({parents:y})};return(0,Toe.jsx)(Coe.FormTokenField,{__next40pxDefaultSize:!0,label:(0,woe.__)("Parents"),value:i,onInputChange:u,suggestions:s,onChange:g,__experimentalShowHowTo:!1})}var Poe=i5e;var wC=o(M(),1),DL=o(V(),1),LL=o(Q(),1),Cu=o(U(),1),Noe=o(me(),1),Eoe=o(Wo(),1),CC=o(P(),1);var Um=o(v(),1),_g=[],Boe={order:"asc",_fields:"id,name",context:"view"},l5e=(e,t)=>{let r=t?.id||e?.find(n=>n.name===t)?.id;if(r)return r;let a=t.toLocaleLowerCase();return e?.find(n=>n.name.toLocaleLowerCase()===a)?.id};function Doe({onChange:e,query:t}){let{postType:r,taxQuery:a}=t,n=_C(r);return n?.length?(0,Um.jsx)(wC.__experimentalVStack,{spacing:4,children:n.map(i=>{let l=a?.include?.[i.slug]||[],s=a?.exclude?.[i.slug]||[],c=(u,m)=>{let p={...a?.[m],[i.slug]:u};u.length||delete p[i.slug];let d={...a,[m]:Object.keys(p).length?p:void 0};e({taxQuery:Object.values(d).every(f=>!f)?void 0:d})};return(0,Um.jsxs)(Cu.Fragment,{children:[(0,Um.jsx)(Ioe,{taxonomy:i,termIds:l,oppositeTermIds:s,onChange:u=>c(u,"include"),label:i.name}),(0,Um.jsx)(Ioe,{taxonomy:i,termIds:s,oppositeTermIds:l,onChange:u=>c(u,"exclude"),label:(0,CC.sprintf)((0,CC.__)("Exclude: %s"),i.name)})]},i.slug)})}):null}function Ioe({taxonomy:e,termIds:t,oppositeTermIds:r,onChange:a,label:n}){let[i,l]=(0,Cu.useState)(""),[s,c]=(0,Cu.useState)(_g),[u,m]=(0,Cu.useState)(_g),p=(0,Noe.useDebounce)(l,250),{searchResults:d,searchHasResolved:f}=(0,DL.useSelect)(b=>{if(!i)return{searchResults:_g,searchHasResolved:!0};let{getEntityRecords:y,hasFinishedResolution:k}=b(LL.store),_=[...t,...r],x=["taxonomy",e.slug,{...Boe,search:i,orderby:"name",exclude:_,per_page:20}];return{searchResults:y(...x),searchHasResolved:k("getEntityRecords",x)}},[i,e.slug,t,r]),h=(0,DL.useSelect)(b=>{if(!t?.length)return _g;let{getEntityRecords:y}=b(LL.store);return y("taxonomy",e.slug,{...Boe,include:t,per_page:t.length})},[e.slug,t]);return(0,Cu.useEffect)(()=>{if(t?.length||c(_g),!h?.length)return;let b=t.reduce((y,k)=>{let _=h.find(x=>x.id===k);return _&&y.push({id:k,value:_.name}),y},[]);c(b)},[t,h]),(0,Cu.useEffect)(()=>{f&&m(d.map(b=>b.name))},[d,f]),(0,Um.jsx)("div",{className:"block-library-query-inspector__taxonomy-control",children:(0,Um.jsx)(wC.FormTokenField,{label:n,value:s,onInputChange:p,suggestions:u,displayTransform:Eoe.decodeEntities,onChange:b=>{let y=new Set;for(let k of b){let _=l5e(d,k);_&&y.add(_)}m(_g),a(Array.from(y))},__experimentalShowHowTo:!1,__next40pxDefaultSize:!0})})}var Loe=o(M(),1),Moe=o(V(),1),Aoe=o(Q(),1),fl=o(P(),1),Roe=o(v(),1),s5e=[{value:"aside",label:(0,fl.__)("Aside")},{value:"audio",label:(0,fl.__)("Audio")},{value:"chat",label:(0,fl.__)("Chat")},{value:"gallery",label:(0,fl.__)("Gallery")},{value:"image",label:(0,fl.__)("Image")},{value:"link",label:(0,fl.__)("Link")},{value:"quote",label:(0,fl.__)("Quote")},{value:"standard",label:(0,fl.__)("Standard")},{value:"status",label:(0,fl.__)("Status")},{value:"video",label:(0,fl.__)("Video")}].sort((e,t)=>{let r=e.label.toUpperCase(),a=t.label.toUpperCase();return r<a?-1:r>a?1:0});function c5e(e,t){return e.map(r=>t.find(a=>a.label.toLocaleLowerCase()===r.toLocaleLowerCase())?.value).filter(Boolean)}function zoe({onChange:e,query:{format:t}}){let r=Array.isArray(t)?t:[t],{supportedFormats:a}=(0,Moe.useSelect)(s=>({supportedFormats:s(Aoe.store).getThemeSupports().formats}),[]),n=s5e.filter(s=>a.includes(s.value)),i=r.map(s=>n.find(c=>c.value===s)?.label).filter(Boolean),l=n.filter(s=>!r.includes(s.value)).map(s=>s.label);return(0,Roe.jsx)(Loe.FormTokenField,{label:(0,fl.__)("Formats"),value:i,suggestions:l,onChange:s=>{e({format:c5e(s,n)})},__experimentalShowHowTo:!1,__experimentalExpandOnFocus:!0,__next40pxDefaultSize:!0})}var Voe=o(M(),1),Ud=o(P(),1),Foe=o(v(),1),u5e=[{label:(0,Ud.__)("Include"),value:""},{label:(0,Ud.__)("Ignore"),value:"ignore"},{label:(0,Ud.__)("Exclude"),value:"exclude"},{label:(0,Ud.__)("Only"),value:"only"}];function Hoe({value:e,onChange:t}){return(0,Foe.jsx)(Voe.SelectControl,{__next40pxDefaultSize:!0,label:(0,Ud.__)("Sticky posts"),options:u5e,value:e,onChange:t,help:(0,Ud.__)("Sticky posts always appear first, regardless of their publish date.")})}var Uoe=o(M(),1),Goe=o(P(),1),Woe=o(v(),1),Ooe=1,joe=100,m5e=({perPage:e,offset:t=0,onChange:r})=>(0,Woe.jsx)(Uoe.RangeControl,{__next40pxDefaultSize:!0,label:(0,Goe.__)("Items per page"),min:Ooe,max:joe,onChange:a=>{isNaN(a)||a<Ooe||a>joe||r({perPage:a,offset:t})},value:parseInt(e,10)}),$oe=m5e;var Zoe=o(M(),1),Koe=o(P(),1),Qoe=o(v(),1),qoe=0,p5e=100,d5e=({offset:e=0,onChange:t})=>(0,Qoe.jsx)(Zoe.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,Koe.__)("Offset"),value:e,min:qoe,onChange:r=>{isNaN(r)||r<qoe||r>p5e||t({offset:r})}}),Yoe=d5e;var Xoe=o(M(),1),ML=o(P(),1),Joe=o(v(),1),f5e=({pages:e,onChange:t})=>(0,Joe.jsx)(Xoe.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,ML.__)("Max pages to show"),value:e,min:0,onChange:r=>{isNaN(r)||r<0||t({pages:r})},help:(0,ML.__)("Limit the pages you want to show, even if the query has more results. To show all pages use 0 (zero).")}),eae=f5e;var Qe=o(v(),1);function aae(e){let{attributes:t,setQuery:r,isSingular:a}=e,{query:n}=t,{order:i,orderBy:l,author:s,pages:c,postType:u,perPage:m,offset:p,sticky:d,inherit:f,taxQuery:h,parents:g,format:b}=n,y=noe(t),k=u==="post",{postTypesTaxonomiesMap:_,postTypesSelectOptions:x,postTypeFormatSupportMap:S}=roe(),C=_C(u),N=ooe(u),B=ie=>{let fe={postType:ie},ke=_[ie];if(ke?.length&&h){let de=Wr=>Object.entries(Wr||{}).reduce((ut,[br,mt])=>(ke.includes(br)&&(ut[br]=mt),ut),{}),ct={},at=de(h.include);Object.keys(at).length&&(ct.include=at);let kt=de(h.exclude);Object.keys(kt).length&&(ct.exclude=kt),fe.taxQuery=Object.keys(ct).length?ct:void 0}ie!=="post"&&(fe.sticky=""),fe.parents=[],S[ie]||(fe.format=[]),r(fe)},[D,A]=(0,SC.useState)(n.search),H=(0,SC.useMemo)(()=>(0,oae.debounce)(ie=>{r({search:ie})},250),[r]),F=aoe(u),z=Fi(y,"inherit"),I=!f&&Fi(y,"postType"),R=(0,hr.__)("Post type"),$=(0,hr.__)("Select the type of content to display: posts, pages, or custom post types."),j=!f&&Fi(y,"order"),G=!f&&k&&Fi(y,"sticky"),O=z||I||j||G,J=!!C?.length&&Fi(y,"taxQuery"),ee=Fi(y,"author"),oe=Fi(y,"search"),X=Fi(y,"parents")&&N,te=S[u],ne=(0,tae.useSelect)(ie=>{if(!te||!Fi(y,"format"))return!1;let fe=ie(rae.store).getThemeSupports();return fe.formats&&fe.formats.length>0&&fe.formats.some(ke=>ke!=="standard")},[y,te]),le=J||ee||oe||X||ne,pe=q(),Ie=Fi(y,"postCount"),Ne=Fi(y,"offset"),ae=Fi(y,"pages"),Re=Ie||Ne||ae,Ee=a&&f;return(0,Qe.jsxs)(Qe.Fragment,{children:[O&&(0,Qe.jsxs)(bt.__experimentalToolsPanel,{label:(0,hr.__)("Settings"),resetAll:()=>{r({postType:"post",order:"desc",orderBy:"date",sticky:"",inherit:!0})},dropdownMenuProps:pe,children:[z&&(0,Qe.jsx)(bt.__experimentalToolsPanelItem,{hasValue:()=>!f,label:(0,hr.__)("Query type"),onDeselect:()=>r({inherit:!0}),isShownByDefault:!0,children:(0,Qe.jsxs)(bt.__experimentalVStack,{spacing:4,children:[(0,Qe.jsxs)(bt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,hr.__)("Query type"),isBlock:!0,onChange:ie=>{r({inherit:ie==="default"})},help:f?(0,hr.__)("Display a list of posts or custom post types based on the current template."):(0,hr.__)("Display a list of posts or custom post types based on specific criteria."),value:f?"default":"custom",children:[(0,Qe.jsx)(bt.__experimentalToggleGroupControlOption,{value:"default",label:(0,hr.__)("Default")}),(0,Qe.jsx)(bt.__experimentalToggleGroupControlOption,{value:"custom",label:(0,hr.__)("Custom")})]}),Ee&&(0,Qe.jsx)(bt.Notice,{status:"warning",isDismissible:!1,children:(0,hr.__)("Cannot inherit the current template query when placed inside the singular content (e.g., post, page, 404, blank).")})]})}),I&&(0,Qe.jsx)(bt.__experimentalToolsPanelItem,{hasValue:()=>u!=="post",label:R,onDeselect:()=>B("post"),isShownByDefault:!0,children:x.length>2?(0,Qe.jsx)(bt.SelectControl,{__next40pxDefaultSize:!0,options:x,value:u,label:R,onChange:B,help:$}):(0,Qe.jsx)(bt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,value:u,label:R,onChange:B,help:$,children:x.map(ie=>(0,Qe.jsx)(bt.__experimentalToggleGroupControlOption,{value:ie.value,label:ie.label},ie.value))})}),j&&(0,Qe.jsx)(bt.__experimentalToolsPanelItem,{hasValue:()=>i!=="desc"||l!=="date",label:(0,hr.__)("Order by"),onDeselect:()=>r({order:"desc",orderBy:"date"}),isShownByDefault:!0,children:(0,Qe.jsx)(hoe,{order:i,orderBy:l,orderByOptions:F,onChange:r})}),G&&(0,Qe.jsx)(bt.__experimentalToolsPanelItem,{hasValue:()=>!!d,label:(0,hr.__)("Sticky posts"),onDeselect:()=>r({sticky:""}),isShownByDefault:!0,children:(0,Qe.jsx)(Hoe,{value:d,onChange:ie=>r({sticky:ie})})})]}),!f&&Re&&(0,Qe.jsxs)(bt.__experimentalToolsPanel,{className:"block-library-query-toolspanel__display",label:(0,hr.__)("Display"),resetAll:()=>{r({offset:0,pages:0})},dropdownMenuProps:pe,children:[(0,Qe.jsx)(bt.__experimentalToolsPanelItem,{label:(0,hr.__)("Items per page"),hasValue:()=>m>0,children:(0,Qe.jsx)($oe,{perPage:m,offset:p,onChange:r})}),(0,Qe.jsx)(bt.__experimentalToolsPanelItem,{label:(0,hr.__)("Offset"),hasValue:()=>p>0,onDeselect:()=>r({offset:0}),children:(0,Qe.jsx)(Yoe,{offset:p,onChange:r})}),(0,Qe.jsx)(bt.__experimentalToolsPanelItem,{label:(0,hr.__)("Max pages to show"),hasValue:()=>c>0,onDeselect:()=>r({pages:0}),children:(0,Qe.jsx)(eae,{pages:c,onChange:r})})]}),!f&&le&&(0,Qe.jsxs)(bt.__experimentalToolsPanel,{className:"block-library-query-toolspanel__filters",label:(0,hr.__)("Filters"),resetAll:()=>{r({author:"",parents:[],search:"",taxQuery:null,format:[]}),A("")},dropdownMenuProps:pe,children:[J&&(0,Qe.jsx)(bt.__experimentalToolsPanelItem,{label:(0,hr.__)("Taxonomies"),hasValue:()=>Object.values(h||{}).some(ie=>Object.values(ie||{}).some(fe=>!!fe?.length)),onDeselect:()=>r({taxQuery:null}),children:(0,Qe.jsx)(Doe,{onChange:r,query:n})}),ee&&(0,Qe.jsx)(bt.__experimentalToolsPanelItem,{hasValue:()=>!!s,label:(0,hr.__)("Authors"),onDeselect:()=>r({author:""}),children:(0,Qe.jsx)(xoe,{value:s,onChange:r})}),oe&&(0,Qe.jsx)(bt.__experimentalToolsPanelItem,{hasValue:()=>!!D,label:(0,hr.__)("Keyword"),onDeselect:()=>{r({search:""}),A("")},children:(0,Qe.jsx)(bt.TextControl,{__next40pxDefaultSize:!0,label:(0,hr.__)("Keyword"),value:D,onChange:ie=>{H(ie),A(ie)}})}),X&&(0,Qe.jsx)(bt.__experimentalToolsPanelItem,{hasValue:()=>!!g?.length,label:(0,hr.__)("Parents"),onDeselect:()=>r({parents:[]}),children:(0,Qe.jsx)(Poe,{parents:g,postType:u,onChange:r})}),ne&&(0,Qe.jsx)(bt.__experimentalToolsPanelItem,{hasValue:()=>!!b?.length,label:(0,hr.__)("Formats"),onDeselect:()=>r({format:[]}),children:(0,Qe.jsx)(zoe,{onChange:r,query:n})})]})]})}var kg=o(M(),1),x2=o(P(),1),TC=o(U(),1);var xg=o(v(),1),nae="wp-block-query-enhanced-pagination-modal__description";function iae({clientId:e,attributes:{enhancedPagination:t},setAttributes:r}){let[a,n]=(0,TC.useState)(!1),i=xC(e);(0,TC.useEffect)(()=>{t&&i&&(r({enhancedPagination:!1}),n(!0))},[t,i,r]);let l=()=>{n(!1)},s=(0,x2.__)("Currently, avoiding full page reloads is not possible when non-interactive or non-client Navigation compatible blocks from plugins are present inside the Query block.")+" "+(0,x2.__)('If you still want to prevent full page reloads, remove that block, then disable "Reload full page" again in the Query Block settings.');return a&&(0,xg.jsx)(kg.Modal,{title:(0,x2.__)("Query block: Reload full page enabled"),className:"wp-block-query__enhanced-pagination-modal",aria:{describedby:nae},role:"alertdialog",focusOnMount:"firstElement",isDismissible:!1,onRequestClose:l,children:(0,xg.jsxs)(kg.__experimentalVStack,{alignment:"right",spacing:5,children:[(0,xg.jsx)("span",{id:nae,children:s}),(0,xg.jsx)(kg.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:l,children:(0,x2.__)("OK")})]})})}var Sg=o(M(),1),RL=o(P(),1),cae=o(V(),1),IC=o(T(),1);var wg=o(U(),1),lae=o(V(),1),BC=o(M(),1),Cg=o(T(),1),PC=o(P(),1);var Su=o(v(),1);function sae({clientId:e,attributes:t,setIsPatternSelectionModalOpen:r}){return(0,Su.jsx)(BC.Modal,{overlayClassName:"block-library-query-pattern__selection-modal",title:(0,PC.__)("Choose a pattern"),onRequestClose:()=>r(!1),isFullScreen:!0,children:(0,Su.jsx)(AL,{clientId:e,attributes:t})})}function k2(e,t){let r=loe(e,t),a=coe(e,r);return(0,wg.useMemo)(()=>a.filter(i=>i.blocks?.[0]?.name==="core/query"),[a])}function AL({clientId:e,attributes:t,showTitlesAsTooltip:r=!1,showSearch:a=!0}){let[n,i]=(0,wg.useState)(""),{replaceBlock:l,selectBlock:s}=(0,lae.useDispatch)(Cg.store),c=k2(e,t),u=(0,wg.useMemo)(()=>({previewPostType:t.query.postType}),[t.query.postType]),m=(0,wg.useMemo)(()=>dv(c,n),[c,n]),p=(d,f)=>{let{newBlocks:h,queryClientIds:g}=ioe(f,t);l(e,h),g[0]&&s(g[0])};return(0,Su.jsxs)("div",{className:"block-library-query-pattern__selection-content",children:[a&&(0,Su.jsx)("div",{className:"block-library-query-pattern__selection-search",children:(0,Su.jsx)(BC.SearchControl,{onChange:i,value:n,label:(0,PC.__)("Search"),placeholder:(0,PC.__)("Search")})}),(0,Su.jsx)(Cg.BlockContextProvider,{value:u,children:(0,Su.jsx)(Cg.__experimentalBlockPatternsList,{blockPatterns:m,onClickPattern:p,showTitlesAsTooltip:r})})]})}var Gd=o(v(),1);function h5e({clientId:e,attributes:t,hasInnerBlocks:r}){if(!k2(e,t).length)return null;let n=r?(0,RL.__)("Change design"):(0,RL.__)("Choose pattern");return(0,Gd.jsx)(IC.BlockControls,{group:"other",children:(0,Gd.jsx)(Sg.__experimentalDropdownContentWrapper,{children:(0,Gd.jsx)(Sg.Dropdown,{contentClassName:"block-editor-block-settings-menu__popover",focusOnMount:"firstElement",expandOnMobile:!0,renderToggle:({isOpen:i,onToggle:l})=>(0,Gd.jsx)(Sg.ToolbarButton,{"aria-haspopup":"true","aria-expanded":i,onClick:l,children:n}),renderContent:()=>(0,Gd.jsx)(AL,{clientId:e,attributes:t,showSearch:!1,showTitlesAsTooltip:!0})})})})}function NC(e){return(0,cae.useSelect)(r=>{let{isLockedBlock:a}=K(r(IC.store));return a(e.clientId)},[e.clientId])?null:(0,Gd.jsx)(h5e,{...e})}var Hi=o(v(),1),{HTMLElementControl:g5e}=K(hl.privateApis),v5e=3,b5e=[["core/post-template"]];function zL({attributes:e,setAttributes:t,clientId:r,context:a,name:n,isSelected:i}){let{queryId:l,query:s,enhancedPagination:c,tagName:u="div",query:{inherit:m}={}}=e,{templateSlug:p}=a,{isSingular:d}=uoe(p),{__unstableMarkNextChangeAsNotPersistent:f}=(0,EC.useDispatch)(hl.store),h=(0,uae.useInstanceId)(zL),g=(0,hl.useBlockProps)(),b=(0,hl.useInnerBlocksProps)(g,{template:b5e}),{postsPerPage:y}=(0,EC.useSelect)(_=>{let{getSettings:x}=_(hl.store),{getEntityRecord:S,getEntityRecordEdits:C,canUser:N}=_(pae.store),B=N("read",{kind:"root",name:"site"})?+S("root","site")?.posts_per_page:+x().postsPerPage;return{postsPerPage:+C("root","site")?.posts_per_page||B||v5e}},[]),k=(0,w2.useCallback)(_=>t(x=>({query:{...x.query,..._}})),[t]);return(0,w2.useEffect)(()=>{let _={};(m&&s.perPage!==y||!s.perPage&&y)&&(_.perPage=y),Object.keys(_).length&&(f(),k(_))},[s.perPage,m,y,f,k]),(0,w2.useEffect)(()=>{Number.isFinite(l)||(f(),t({queryId:h}))},[l,h,f,t]),(0,Hi.jsxs)(Hi.Fragment,{children:[i&&(0,Hi.jsx)(NC,{clientId:r,attributes:e,hasInnerBlocks:!0}),(0,Hi.jsx)(iae,{attributes:e,setAttributes:t,clientId:r}),(0,Hi.jsx)(hl.InspectorControls,{children:(0,Hi.jsx)(aae,{name:n,attributes:e,setQuery:k,setAttributes:t,clientId:r,isSingular:d})}),(0,Hi.jsxs)(hl.InspectorControls,{group:"advanced",children:[(0,Hi.jsx)(g5e,{tagName:u,onChange:_=>t({tagName:_}),clientId:r,options:[{label:(0,mae.__)("Default (<div>)"),value:"div"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<aside>",value:"aside"}]}),(0,Hi.jsx)(poe,{enhancedPagination:c,setAttributes:t,clientId:r})]}),(0,Hi.jsx)(u,{...b})]})}var LC=o(V(),1),MC=o(W(),1),VL=o(U(),1),Wd=o(T(),1),C2=o(M(),1),DC=o(P(),1),dae=o(me(),1);var vc=o(v(),1);function fae({attributes:e,clientId:t,name:r,openPatternSelectionModal:a,isSelected:n}){let[i,l]=(0,VL.useState)(!1),[s,c]=(0,VL.useState)(0),u=(0,dae.useResizeObserver)(([k])=>{c(k.contentRect.width)}),p=s>0&&s<160,{blockType:d,activeBlockVariation:f}=(0,LC.useSelect)(k=>{let{getActiveBlockVariation:_,getBlockType:x}=k(MC.store);return{blockType:x(r),activeBlockVariation:_(r,e)}},[r,e]),h=!!k2(t,e).length,g=f?.icon?.src||f?.icon||d?.icon?.src,b=f?.title||d?.title,y=(0,Wd.useBlockProps)({ref:u});return i?(0,vc.jsx)(y5e,{clientId:t,attributes:e,icon:g,label:b}):(0,vc.jsxs)("div",{...y,children:[n&&(0,vc.jsx)(NC,{clientId:t,attributes:e,hasInnerBlocks:!1}),(0,vc.jsxs)(C2.Placeholder,{className:"block-editor-media-placeholder",icon:!p&&g,label:!p&&b,instructions:!p&&(0,DC.__)("Choose a pattern for the query loop or start blank."),withIllustration:p,children:[!!h&&!p&&(0,vc.jsx)(C2.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:a,children:(0,DC.__)("Choose")}),!p&&(0,vc.jsx)(C2.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{l(!0)},children:(0,DC.__)("Start blank")})]})]})}function y5e({clientId:e,attributes:t,icon:r,label:a}){let n=soe(t),{replaceInnerBlocks:i}=(0,LC.useDispatch)(Wd.store),l=(0,Wd.useBlockProps)();return(0,vc.jsx)("div",{...l,children:(0,vc.jsx)(Wd.__experimentalBlockVariationPicker,{icon:r,label:a,variations:n,onSelect:s=>{s.innerBlocks&&i(e,(0,MC.createBlocksFromInnerBlocksTemplate)(s.innerBlocks),!1)}})})}var $d=o(v(),1),_5e=e=>{let{clientId:t,attributes:r}=e,[a,n]=(0,gae.useState)(!1),l=(0,hae.useSelect)(s=>!!s(vae.store).getBlocks(t).length,[t])?zL:fae;return(0,$d.jsxs)($d.Fragment,{children:[(0,$d.jsx)(l,{...e,openPatternSelectionModal:()=>n(!0)}),a&&(0,$d.jsx)(sae,{clientId:t,attributes:r,setIsPatternSelectionModalOpen:n})]})},bae=_5e;var AC=o(T(),1),yae=o(v(),1);function _ae({attributes:{tagName:e="div"}}){let t=AC.useBlockProps.save(),r=AC.useInnerBlocksProps.save(t);return(0,yae.jsx)(e,{...r})}var S2=o(P(),1);var bc=o(M(),1),Tu=o(v(),1),xae=(0,Tu.jsx)(bc.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",children:(0,Tu.jsx)(bc.Path,{d:"M41 9H7v3h34V9zm-22 5H7v1h12v-1zM7 26h12v1H7v-1zm34-5H7v3h34v-3zM7 38h12v1H7v-1zm34-5H7v3h34v-3z"})}),kae=(0,Tu.jsx)(bc.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",children:(0,Tu.jsx)(bc.Path,{d:"M41 9H7v3h34V9zm-4 5H7v1h30v-1zm4 3H7v1h34v-1zM7 20h30v1H7v-1zm0 12h30v1H7v-1zm34 3H7v1h34v-1zM7 38h30v1H7v-1zm34-11H7v3h34v-3z"})}),wae=(0,Tu.jsx)(bc.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",children:(0,Tu.jsx)(bc.Path,{d:"M41 9H7v3h34V9zm-22 5H7v1h12v-1zm22 3H7v1h34v-1zM7 20h34v1H7v-1zm0 12h12v1H7v-1zm34 3H7v1h34v-1zM7 38h34v1H7v-1zm34-11H7v3h34v-3z"})}),Cae=(0,Tu.jsx)(bc.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",children:(0,Tu.jsx)(bc.Path,{d:"M7 9h34v6H7V9zm12 8H7v1h12v-1zm18 3H7v1h30v-1zm0 18H7v1h30v-1zM7 35h12v1H7v-1zm34-8H7v6h34v-6z"})});var FL=["core/post-date",{metadata:{bindings:{datetime:{source:"core/post-data",args:{field:"date"}}}}}],x5e=[{name:"title-date",title:(0,S2.__)("Title & Date"),icon:xae,attributes:{},innerBlocks:[["core/post-template",{},[["core/post-title"],FL]],["core/query-pagination"],["core/query-no-results"]],scope:["block"]},{name:"title-excerpt",title:(0,S2.__)("Title & Excerpt"),icon:kae,attributes:{},innerBlocks:[["core/post-template",{},[["core/post-title"],["core/post-excerpt"]]],["core/query-pagination"],["core/query-no-results"]],scope:["block"]},{name:"title-date-excerpt",title:(0,S2.__)("Title, Date, & Excerpt"),icon:wae,attributes:{},innerBlocks:[["core/post-template",{},[["core/post-title"],FL,["core/post-excerpt"]]],["core/query-pagination"],["core/query-no-results"]],scope:["block"]},{name:"image-date-title",title:(0,S2.__)("Image, Date, & Title"),icon:Cae,attributes:{},innerBlocks:[["core/post-template",{},[["core/post-featured-image"],FL,["core/post-title"]]],["core/query-pagination"],["core/query-no-results"]],scope:["block"]}],Sae=x5e;var RC=o(W(),1),Oa=o(T(),1);var qd=o(v(),1),{cleanEmptyObject:HL}=K(Oa.privateApis),OL=e=>{let{query:t}=e,{categoryIds:r,tagIds:a,taxQuery:n,...i}=t;return(r?.length||a?.length)&&(i.taxQuery={include:{category:r?.length?r:void 0,post_tag:a?.length?a:void 0}}),Object.keys(n||{}).length&&(i.taxQuery={include:n}),{...e,query:i}},Tae=(e,t)=>{let{style:r,backgroundColor:a,gradient:n,textColor:i,...l}=e;if(!(a||n||i||r?.color||r?.elements?.link))return[e,t];if(r&&(l.style=HL({...r,color:void 0,elements:{...r.elements,link:void 0}})),k5e(t)){let u=t[0],p=r?.color||r?.elements?.link||u.attributes.style?HL({...u.attributes.style,color:r?.color,elements:r?.elements?.link?{link:r?.elements?.link}:void 0}):void 0,d=(0,RC.createBlock)("core/group",{...u.attributes,backgroundColor:a,gradient:n,textColor:i,style:p},u.innerBlocks);return[l,[d]]}let c=(0,RC.createBlock)("core/group",{backgroundColor:a,gradient:n,textColor:i,style:HL({color:r?.color,elements:r?.elements?.link?{link:r?.elements?.link}:void 0})},t);return[l,[c]]},k5e=(e=[])=>e.length===1&&e[0].name==="core/group",jL=e=>{let{layout:t=null}=e;if(!t)return e;let{inherit:r=null,contentSize:a=null,...n}=t;return r||a?{...e,layout:{...n,contentSize:a,type:"constrained"}}:e},Pae=(e=[])=>{let t=null;for(let r of e)if(r.name==="core/post-template"){t=r;break}else r.innerBlocks.length&&(t=Pae(r.innerBlocks));return t},Bae=(e=[],t)=>(e.forEach((r,a)=>{r.name==="core/post-template"?e.splice(a,1,t):r.innerBlocks.length&&(r.innerBlocks=Bae(r.innerBlocks,t))}),e),Tg=(e,t)=>{let{displayLayout:r=null,...a}=e;if(!r)return[e,t];let n=Pae(t);if(!n)return[e,t];let{type:i,columns:l}=r,s=i==="flex"?"grid":"default",c=(0,RC.createBlock)("core/post-template",{...n.attributes,layout:{type:s,...l&&{columnCount:l}}},n.innerBlocks);return[a,Bae(t,c)]},w5e={attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",categoryIds:[],tagIds:[],order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0}},layout:{type:"object",default:{type:"list"}}},supports:{html:!1},migrate(e,t){let r=OL(e),{layout:a,...n}=r,i={...n,displayLayout:r.layout};return Tg(i,t)},save(){return(0,qd.jsx)(Oa.InnerBlocks.Content,{})}},C5e={attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",categoryIds:[],tagIds:[],order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0}},tagName:{type:"string",default:"div"},displayLayout:{type:"object",default:{type:"list"}}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0},layout:!0},isEligible:({query:{categoryIds:e,tagIds:t}={}})=>e||t,migrate(e,t){let r=OL(e),[a,n]=Tae(r,t),i=jL(a);return Tg(i,n)},save({attributes:{tagName:e="div"}}){let t=Oa.useBlockProps.save(),r=Oa.useInnerBlocksProps.save(t);return(0,qd.jsx)(e,{...r})}},S5e={attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0,taxQuery:null,parents:[]}},tagName:{type:"string",default:"div"},displayLayout:{type:"object",default:{type:"list"}},namespace:{type:"string"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},layout:!0},isEligible(e){let{style:t,backgroundColor:r,gradient:a,textColor:n}=e;return r||a||n||t?.color||t?.elements?.link},migrate(e,t){let[r,a]=Tae(e,t),n=jL(r);return Tg(n,a)},save({attributes:{tagName:e="div"}}){let t=Oa.useBlockProps.save(),r=Oa.useInnerBlocksProps.save(t);return(0,qd.jsx)(e,{...r})}},T5e={attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0,taxQuery:null,parents:[]}},tagName:{type:"string",default:"div"},displayLayout:{type:"object",default:{type:"list"}},namespace:{type:"string"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},layout:!0},save({attributes:{tagName:e="div"}}){let t=Oa.useBlockProps.save(),r=Oa.useInnerBlocksProps.save(t);return(0,qd.jsx)(e,{...r})},isEligible:({layout:e})=>e?.inherit||e?.contentSize&&e?.type!=="constrained",migrate(e,t){let r=jL(e);return Tg(r,t)}},P5e={attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0,taxQuery:null,parents:[]}},tagName:{type:"string",default:"div"},displayLayout:{type:"object",default:{type:"list"}},namespace:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,layout:!0},save({attributes:{tagName:e="div"}}){let t=Oa.useBlockProps.save(),r=Oa.useInnerBlocksProps.save(t);return(0,qd.jsx)(e,{...r})},isEligible:({displayLayout:e})=>!!e,migrate:Tg},B5e={attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0,taxQuery:null,parents:[],format:[]}},tagName:{type:"string",default:"div"},namespace:{type:"string"},enhancedPagination:{type:"boolean",default:!1}},supports:{align:["wide","full"],html:!1,layout:!0,interactivity:!0,contentRole:!0},save({attributes:{tagName:e="div"}}){let t=Oa.useBlockProps.save(),r=Oa.useInnerBlocksProps.save(t);return(0,qd.jsx)(e,{...r})},isEligible:({query:{taxQuery:e}={}})=>!!e&&Object.keys(e).some(t=>!["include","exclude"].includes(t)),migrate(e,t){let r=OL(e);return Tg(r,t)}},I5e=[B5e,P5e,T5e,S5e,C5e,w5e],Iae=I5e;var{name:Nae}=bC,Eae={icon:Sp,edit:bae,example:{viewportWidth:650,attributes:{namespace:"core/posts-list",query:{perPage:4,pages:1,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",sticky:"exclude",inherit:!1}},innerBlocks:[{name:"core/post-template",attributes:{layout:{type:"grid",columnCount:2}},innerBlocks:[{name:"core/post-title"},{name:"core/post-date",attributes:{metadata:{bindings:{datetime:{source:"core/post-data",args:{field:"date"}}}}}},{name:"core/post-excerpt"}]}]},save:_ae,variations:Sae,deprecated:Iae},N5e=()=>E({name:Nae,metadata:bC,settings:Eae});var GL={};Z(GL,{init:()=>L5e,metadata:()=>zC,name:()=>Fae,settings:()=>Hae});var Vae=o(P(),1);var zC={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/query-no-results",title:"No Results",category:"theme",description:"Contains the block elements used to render content when no query results are found.",ancestor:["core/query"],textdomain:"default",usesContext:["queryId","query"],supports:{anchor:!0,align:!0,reusable:!1,html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}};var VC=o(T(),1),Dae=o(P(),1),Lae=o(v(),1),D5e=[["core/paragraph",{placeholder:(0,Dae.__)("Add text or blocks that will display when a query returns no results.")}]];function Mae(){let e=(0,VC.useBlockProps)(),t=(0,VC.useInnerBlocksProps)(e,{template:D5e});return(0,Lae.jsx)("div",{...t})}var Aae=o(T(),1),Rae=o(v(),1);function zae(){return(0,Rae.jsx)(Aae.InnerBlocks.Content,{})}var{name:Fae}=zC,Hae={icon:Sp,edit:Mae,save:zae,example:{innerBlocks:[{name:"core/paragraph",attributes:{content:(0,Vae.__)("No posts were found.")}}]}},L5e=()=>E({name:Fae,metadata:zC,settings:Hae});var qL={};Z(qL,{init:()=>z5e,metadata:()=>FC,name:()=>Yae,settings:()=>Xae});var FC={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/query-pagination",title:"Pagination",category:"theme",ancestor:["core/query"],allowedBlocks:["core/query-pagination-previous","core/query-pagination-numbers","core/query-pagination-next"],description:"Displays a paginated navigation to next/previous set of posts, when applicable.",textdomain:"default",attributes:{paginationArrow:{type:"string",default:"none"},showLabel:{type:"boolean",default:!0}},usesContext:["queryId","query"],providesContext:{paginationArrow:"paginationArrow",showLabel:"showLabel"},supports:{anchor:!0,align:!0,reusable:!1,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},layout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-query-pagination-editor",style:"wp-block-query-pagination"};var HC=o(P(),1),Pu=o(T(),1),OC=o(V(),1),T2=o(M(),1),Wae=o(U(),1);var Zd=o(P(),1),Pg=o(M(),1),Bg=o(v(),1);function Oae({value:e,onChange:t}){return(0,Bg.jsxs)(Pg.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Zd.__)("Arrow"),value:e,onChange:t,help:(0,Zd.__)("A decorative arrow appended to the next and previous page link."),isBlock:!0,children:[(0,Bg.jsx)(Pg.__experimentalToggleGroupControlOption,{value:"none",label:(0,Zd._x)("None","Arrow option for Query Pagination Next/Previous blocks")}),(0,Bg.jsx)(Pg.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,Zd._x)("Arrow","Arrow option for Query Pagination Next/Previous blocks")}),(0,Bg.jsx)(Pg.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,Zd._x)("Chevron","Arrow option for Query Pagination Next/Previous blocks")})]})}var WL=o(P(),1),jae=o(M(),1),Uae=o(v(),1);function Gae({value:e,onChange:t}){return(0,Uae.jsx)(jae.ToggleControl,{label:(0,WL.__)("Show label text"),help:(0,WL.__)('Make label text visible, e.g. "Next Page".'),onChange:t,checked:e===!0})}var gl=o(v(),1),A5e=[["core/query-pagination-previous"],["core/query-pagination-numbers"],["core/query-pagination-next"]];function $ae({attributes:{paginationArrow:e,showLabel:t},setAttributes:r,clientId:a}){let n=(0,OC.useSelect)(u=>{let{getBlocks:m}=u(Pu.store);return m(a)?.find(d=>["core/query-pagination-next","core/query-pagination-previous"].includes(d.name))},[a]),{__unstableMarkNextChangeAsNotPersistent:i}=(0,OC.useDispatch)(Pu.store),l=q(),s=(0,Pu.useBlockProps)(),c=(0,Pu.useInnerBlocksProps)(s,{template:A5e});return(0,Wae.useEffect)(()=>{e==="none"&&!t&&(i(),r({showLabel:!0}))},[e,r,t,i]),(0,gl.jsxs)(gl.Fragment,{children:[n&&(0,gl.jsx)(Pu.InspectorControls,{children:(0,gl.jsxs)(T2.__experimentalToolsPanel,{label:(0,HC.__)("Settings"),resetAll:()=>{r({paginationArrow:"none",showLabel:!0})},dropdownMenuProps:l,children:[(0,gl.jsx)(T2.__experimentalToolsPanelItem,{hasValue:()=>e!=="none",label:(0,HC.__)("Pagination arrow"),onDeselect:()=>r({paginationArrow:"none"}),isShownByDefault:!0,children:(0,gl.jsx)(Oae,{value:e,onChange:u=>{r({paginationArrow:u})}})}),e!=="none"&&(0,gl.jsx)(T2.__experimentalToolsPanelItem,{hasValue:()=>!t,label:(0,HC.__)("Show text"),onDeselect:()=>r({showLabel:!0}),isShownByDefault:!0,children:(0,gl.jsx)(Gae,{value:t,onChange:u=>{r({showLabel:u})}})})]})}),(0,gl.jsx)("nav",{...c})]})}var qae=o(T(),1),Zae=o(v(),1);function Kae(){return(0,Zae.jsx)(qae.InnerBlocks.Content,{})}var jC=o(T(),1),$L=o(v(),1),R5e=[{save(){return(0,$L.jsx)("div",{...jC.useBlockProps.save(),children:(0,$L.jsx)(jC.InnerBlocks.Content,{})})}}],Qae=R5e;var{name:Yae}=FC,Xae={icon:n1,edit:$ae,save:Kae,deprecated:Qae},z5e=()=>E({name:Yae,metadata:FC,settings:Xae});var KL={};Z(KL,{init:()=>H5e,metadata:()=>UC,name:()=>ene,settings:()=>tne});var UC={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/query-pagination-next",title:"Next Page",category:"theme",parent:["core/query-pagination"],description:"Displays the next posts page link.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["queryId","query","paginationArrow","showLabel","enhancedPagination"],supports:{anchor:!0,reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}};var ZL=o(P(),1),GC=o(T(),1),P2=o(v(),1),F5e={none:"",arrow:"\u2192",chevron:"\xBB"};function Jae({attributes:{label:e},setAttributes:t,context:{paginationArrow:r,showLabel:a}}){let n=F5e[r];return(0,P2.jsxs)("a",{href:"#pagination-next-pseudo-link",onClick:i=>i.preventDefault(),...(0,GC.useBlockProps)(),children:[a&&(0,P2.jsx)(GC.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,ZL.__)("Next page link"),placeholder:(0,ZL.__)("Next Page"),value:e,onChange:i=>t({label:i})}),n&&(0,P2.jsx)("span",{className:`wp-block-query-pagination-next-arrow is-arrow-${r}`,"aria-hidden":!0,children:n})]})}var{name:ene}=UC,tne={icon:r1,edit:Jae},H5e=()=>E({name:ene,metadata:UC,settings:tne});var QL={};Z(QL,{init:()=>U5e,metadata:()=>WC,name:()=>one,settings:()=>ane});var WC={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/query-pagination-numbers",title:"Page Numbers",category:"theme",parent:["core/query-pagination"],description:"Displays a list of page numbers for pagination.",textdomain:"default",attributes:{midSize:{type:"number",default:2}},usesContext:["queryId","query","enhancedPagination"],supports:{anchor:!0,reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-query-pagination-numbers-editor"};var I2=o(P(),1),$C=o(T(),1),Ig=o(M(),1);var Oi=o(v(),1),B2=(e,t="a",r="")=>(0,Oi.jsx)(t,{className:`page-numbers ${r}`,children:e},e),j5e=e=>{let t=[];for(let r=1;r<=e;r++)t.push(B2(r));t.push(B2(e+1,"span","current"));for(let r=1;r<=e;r++)t.push(B2(e+1+r));return t.push(B2("...","span","dots")),t.push(B2(e*2+3)),(0,Oi.jsx)(Oi.Fragment,{children:t})};function rne({attributes:e,setAttributes:t}){let{midSize:r}=e,a=j5e(parseInt(r,10)),n=q();return(0,Oi.jsxs)(Oi.Fragment,{children:[(0,Oi.jsx)($C.InspectorControls,{children:(0,Oi.jsx)(Ig.__experimentalToolsPanel,{label:(0,I2.__)("Settings"),resetAll:()=>t({midSize:2}),dropdownMenuProps:n,children:(0,Oi.jsx)(Ig.__experimentalToolsPanelItem,{label:(0,I2.__)("Number of links"),hasValue:()=>r!==2,onDeselect:()=>t({midSize:2}),isShownByDefault:!0,children:(0,Oi.jsx)(Ig.RangeControl,{__next40pxDefaultSize:!0,label:(0,I2.__)("Number of links"),help:(0,I2.__)("Specify how many links can appear before and after the current page number. Links to the first, current and last page are always visible."),value:r,onChange:i=>{t({midSize:parseInt(i,10)})},min:0,max:5,withInputField:!1})})})}),(0,Oi.jsx)("div",{...(0,$C.useBlockProps)(),children:a})]})}var{name:one}=WC,ane={icon:o1,edit:rne,example:{}},U5e=()=>E({name:one,metadata:WC,settings:ane});var XL={};Z(XL,{init:()=>$5e,metadata:()=>qC,name:()=>ine,settings:()=>lne});var qC={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/query-pagination-previous",title:"Previous Page",category:"theme",parent:["core/query-pagination"],description:"Displays the previous posts page link.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["queryId","query","paginationArrow","showLabel","enhancedPagination"],supports:{anchor:!0,reusable:!1,html:!1,color:{gradients:!0,text:!1,__experimentalDefaultControls:{background:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}}};var YL=o(P(),1),ZC=o(T(),1),N2=o(v(),1),W5e={none:"",arrow:"\u2190",chevron:"\xAB"};function nne({attributes:{label:e},setAttributes:t,context:{paginationArrow:r,showLabel:a}}){let n=W5e[r];return(0,N2.jsxs)("a",{href:"#pagination-previous-pseudo-link",onClick:i=>i.preventDefault(),...(0,ZC.useBlockProps)(),children:[n&&(0,N2.jsx)("span",{className:`wp-block-query-pagination-previous-arrow is-arrow-${r}`,"aria-hidden":!0,children:n}),a&&(0,N2.jsx)(ZC.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,YL.__)("Previous page link"),placeholder:(0,YL.__)("Previous Page"),value:e,onChange:i=>t({label:i})})]})}var{name:ine}=qC,lne={icon:a1,edit:nne},$5e=()=>E({name:ine,metadata:qC,settings:lne});var rM={};Z(rM,{init:()=>Q5e,metadata:()=>KC,name:()=>hne,settings:()=>gne});var KC={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/query-title",title:"Query Title",category:"theme",description:"Display the query title.",textdomain:"default",attributes:{type:{type:"string"},textAlign:{type:"string"},level:{type:"number",default:1},levelOptions:{type:"array"},showPrefix:{type:"boolean",default:!0},showSearchTerm:{type:"boolean",default:!0}},example:{attributes:{type:"search"}},usesContext:["query"],supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},style:"wp-block-query-title"};var $n=o(T(),1),vl=o(M(),1),qt=o(P(),1);var JL=o(Q(),1),eM=o(V(),1);function sne(){let e=(0,eM.useSelect)(l=>{let{getCurrentPostId:s,getCurrentPostType:c,getCurrentTemplateId:u}=l("core/editor"),m=c(),p=u()||(m==="wp_template"?s():null);return p?l(JL.store).getEditedEntityRecord("postType","wp_template",p)?.slug:null},[]),t=e?.match(/^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/),r,a,n=!1,i;if(t)t[1]?r=t[2]?t[2]:t[1]:t[3]&&(r=t[6]?t[6]:t[4],a=t[7]),r=r==="tag"?"post_tag":r;else{let l=e?.match(/^(author)$|^author-(.+)$/);l&&(n=!0,l[2]&&(i=l[2]))}return(0,eM.useSelect)(l=>{let{getEntityRecords:s,getTaxonomy:c,getAuthors:u}=l(JL.store),m,p;if(r&&(m=c(r)?.labels?.singular_name),a){let d=s("taxonomy",r,{slug:a,per_page:1});d&&d[0]&&(p=d[0].name)}if(n&&(m="Author",i)){let d=u({slug:i});d&&d[0]&&(p=d[0].name)}return{archiveTypeLabel:m,archiveNameLabel:p}},[i,n,r,a])}var cne=o(Q(),1),tM=o(V(),1);function une(e){let t=(0,tM.useSelect)(r=>{let{getCurrentPostType:a}=r("core/editor");return a()},[]);return(0,tM.useSelect)(r=>{let{getPostType:a}=r(cne.store),i=a(e||t);return{postTypeLabel:i?i.labels.singular_name:""}},[e,t])}var xt=o(v(),1),Z5e=["archive","search","post-type"];function mne({attributes:{type:e,level:t,levelOptions:r,textAlign:a,showPrefix:n,showSearchTerm:i},setAttributes:l,context:{query:s}}){let{archiveTypeLabel:c,archiveNameLabel:u}=sne(),{postTypeLabel:m}=une(s?.postType),p=q(),d=t===0?"p":`h${t}`,f=(0,$n.useBlockProps)({className:w("wp-block-query-title__placeholder",{[`has-text-align-${a}`]:a})});if(!Z5e.includes(e))return(0,xt.jsx)("div",{...f,children:(0,xt.jsx)($n.Warning,{children:(0,qt.__)("Provided type is not supported.")})});let h;if(e==="archive"){let g;c?n?u?g=(0,qt.sprintf)((0,qt._x)("%1$s: %2$s","archive label"),c,u):g=(0,qt.sprintf)((0,qt.__)("%s: Name"),c):u?g=u:g=(0,qt.sprintf)((0,qt.__)("%s name"),c):g=n?(0,qt.__)("Archive type: Name"):(0,qt.__)("Archive title"),h=(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsx)($n.InspectorControls,{children:(0,xt.jsx)(vl.__experimentalToolsPanel,{label:(0,qt.__)("Settings"),resetAll:()=>l({showPrefix:!0}),dropdownMenuProps:p,children:(0,xt.jsx)(vl.__experimentalToolsPanelItem,{hasValue:()=>!n,label:(0,qt.__)("Show archive type in title"),onDeselect:()=>l({showPrefix:!0}),isShownByDefault:!0,children:(0,xt.jsx)(vl.ToggleControl,{label:(0,qt.__)("Show archive type in title"),onChange:()=>l({showPrefix:!n}),checked:n})})})}),(0,xt.jsx)(d,{...f,children:g})]})}if(e==="search"&&(h=(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsx)($n.InspectorControls,{children:(0,xt.jsx)(vl.__experimentalToolsPanel,{label:(0,qt.__)("Settings"),resetAll:()=>l({showSearchTerm:!0}),dropdownMenuProps:p,children:(0,xt.jsx)(vl.__experimentalToolsPanelItem,{hasValue:()=>!i,label:(0,qt.__)("Show search term in title"),onDeselect:()=>l({showSearchTerm:!0}),isShownByDefault:!0,children:(0,xt.jsx)(vl.ToggleControl,{label:(0,qt.__)("Show search term in title"),onChange:()=>l({showSearchTerm:!i}),checked:i})})})}),(0,xt.jsx)(d,{...f,children:i?(0,qt.__)("Search results for: \u201Csearch term\u201D"):(0,qt.__)("Search results")})]})),e==="post-type"){let g;m?n?g=(0,qt.sprintf)((0,qt.__)('Post Type: "%s"'),m):g=m:g=n?(0,qt.__)("Post Type: Name"):(0,qt.__)("Name"),h=(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsx)($n.InspectorControls,{children:(0,xt.jsx)(vl.__experimentalToolsPanel,{label:(0,qt.__)("Settings"),resetAll:()=>l({showPrefix:!0}),dropdownMenuProps:p,children:(0,xt.jsx)(vl.__experimentalToolsPanelItem,{hasValue:()=>!n,label:(0,qt.__)("Show post type label"),onDeselect:()=>l({showPrefix:!0}),isShownByDefault:!0,children:(0,xt.jsx)(vl.ToggleControl,{label:(0,qt.__)("Show post type label"),onChange:()=>l({showPrefix:!n}),checked:n})})})}),(0,xt.jsx)(d,{...f,children:g})]})}return(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsxs)($n.BlockControls,{group:"block",children:[(0,xt.jsx)($n.HeadingLevelDropdown,{value:t,options:r,onChange:g=>l({level:g})}),(0,xt.jsx)($n.AlignmentControl,{value:a,onChange:g=>{l({textAlign:g})}})]}),h]})}var Kd=o(P(),1);var pne=[{isDefault:!0,name:"archive-title",title:(0,Kd.__)("Archive Title"),description:(0,Kd.__)("Display the archive title based on the queried object."),icon:El,attributes:{type:"archive"},scope:["inserter"]},{isDefault:!1,name:"search-title",title:(0,Kd.__)("Search Results Title"),description:(0,Kd.__)("Display the search results title based on the queried object."),icon:El,attributes:{type:"search"},scope:["inserter"]},{isDefault:!1,name:"post-type-label",title:(0,Kd.__)("Post Type Label"),description:(0,Kd.__)("Display the post type label based on the queried object."),icon:El,attributes:{type:"post-type"},scope:["inserter"]}];pne.forEach(e=>{e.isActive||(e.isActive=(t,r)=>t.type===r.type)});var dne=pne;var K5e={attributes:{type:{type:"string"},textAlign:{type:"string"},level:{type:"number",default:1}},supports:{align:["wide","full"],html:!1,color:{gradients:!0},spacing:{margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0}},save(){return null},migrate:Ot,isEligible({style:e}){return e?.typography?.fontFamily}},fne=[K5e];var{name:hne}=KC,gne={icon:El,edit:mne,variations:dne,deprecated:fne},Q5e=()=>E({name:hne,metadata:KC,settings:gne});var nM={};Z(nM,{init:()=>X5e,metadata:()=>QC,name:()=>yne,settings:()=>_ne});var QC={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/query-total",title:"Query Total",category:"theme",ancestor:["core/query"],description:"Display the total number of results in a query.",textdomain:"default",attributes:{displayType:{type:"string",default:"total-results"}},usesContext:["queryId","query"],supports:{anchor:!0,align:["wide","full"],html:!1,spacing:{margin:!0,padding:!0},color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-query-total"};var YC=o(T(),1),XC=o(M(),1),Ng=o(P(),1);var Gm=o(M(),1),Qd=o(v(),1),oM=(0,Qd.jsx)(Gm.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:(0,Qd.jsx)(Gm.Path,{d:"M4 11h4v2H4v-2zm6 0h6v2h-6v-2zm8 0h2v2h-2v-2z"})}),aM=(0,Qd.jsx)(Gm.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:(0,Qd.jsx)(Gm.Path,{d:"M4 13h2v-2H4v2zm4 0h10v-2H8v2zm12 0h2v-2h-2v2z"})}),vne=(0,Qd.jsx)(Gm.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:(0,Qd.jsx)(Gm.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2Zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12Zm-7-6-4.1 5h8.8v-3h-1.5v1.5h-4.2l2.9-3.5-2.9-3.5h4.2V10h1.5V7H7.4l4.1 5Z"})});var ps=o(v(),1);function bne({attributes:e,setAttributes:t}){let{displayType:r}=e,a=(0,YC.useBlockProps)(),n=()=>{switch(r){case"total-results":return oM;case"range-display":return aM}},i=[{role:"menuitemradio",title:(0,Ng.__)("Total results"),isActive:r==="total-results",icon:oM,onClick:()=>{t({displayType:"total-results"})}},{role:"menuitemradio",title:(0,Ng.__)("Range display"),isActive:r==="range-display",icon:aM,onClick:()=>{t({displayType:"range-display"})}}],l=(0,ps.jsx)(YC.BlockControls,{children:(0,ps.jsx)(XC.ToolbarGroup,{children:(0,ps.jsx)(XC.ToolbarDropdownMenu,{icon:n(),label:(0,Ng.__)("Change display type"),controls:i})})});return(0,ps.jsxs)("div",{...a,children:[l,r==="total-results"?(0,ps.jsx)(ps.Fragment,{children:(0,Ng.__)("12 results found")}):r==="range-display"?(0,ps.jsx)(ps.Fragment,{children:(0,Ng.__)("Displaying 1 \u2013 10 of 12")}):null]})}var{name:yne}=QC,_ne={icon:vne,edit:bne},X5e=()=>E({name:yne,metadata:QC,settings:_ne});var lM={};Z(lM,{init:()=>c4e,metadata:()=>r6,name:()=>Bne,settings:()=>Ine});var iM=o(P(),1);var E2=o(W(),1),oo=o(T(),1),pa=o(v(),1),Wm=e=>{let{value:t,...r}=e;return[{...r},t?(0,E2.parseWithAttributeSchema)(t,{type:"array",source:"query",selector:"p",query:{content:{type:"string",source:"html"}}}).map(({content:a})=>(0,E2.createBlock)("core/paragraph",{content:a})):(0,E2.createBlock)("core/paragraph")]},xne=["left","right","center"],Yd=(e,t)=>{let{align:r,...a}=e;return[xne.includes(r)?{...a,textAlign:r}:e,t]},J5e=(e,t)=>[{...e,className:e.className?e.className+" is-style-large":"is-style-large"},t],e4e={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:"",role:"content"},citation:{type:"string",source:"html",selector:"cite",default:"",role:"content"},align:{type:"string"}},supports:{anchor:!0,html:!1,__experimentalOnEnter:!0,__experimentalOnMerge:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0}},color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}}},isEligible:({align:e})=>xne.includes(e),save({attributes:e}){let{align:t,citation:r}=e,a=w({[`has-text-align-${t}`]:t});return(0,pa.jsxs)("blockquote",{...oo.useBlockProps.save({className:a}),children:[(0,pa.jsx)(oo.InnerBlocks.Content,{}),!oo.RichText.isEmpty(r)&&(0,pa.jsx)(oo.RichText.Content,{tagName:"cite",value:r})]})},migrate:Yd},t4e={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:"",role:"content"},citation:{type:"string",source:"html",selector:"cite",default:"",role:"content"},align:{type:"string"}},supports:{anchor:!0,__experimentalSlashInserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0}}},save({attributes:e}){let{align:t,value:r,citation:a}=e,n=w({[`has-text-align-${t}`]:t});return(0,pa.jsxs)("blockquote",{...oo.useBlockProps.save({className:n}),children:[(0,pa.jsx)(oo.RichText.Content,{multiline:!0,value:r}),!oo.RichText.isEmpty(a)&&(0,pa.jsx)(oo.RichText.Content,{tagName:"cite",value:a})]})},migrate(e){return Yd(...Wm(e))}},r4e={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"cite",default:""},align:{type:"string"}},migrate(e){return Yd(...Wm(e))},save({attributes:e}){let{align:t,value:r,citation:a}=e;return(0,pa.jsxs)("blockquote",{style:{textAlign:t||null},children:[(0,pa.jsx)(oo.RichText.Content,{multiline:!0,value:r}),!oo.RichText.isEmpty(a)&&(0,pa.jsx)(oo.RichText.Content,{tagName:"cite",value:a})]})}},o4e={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"cite",default:""},align:{type:"string"},style:{type:"number",default:1}},migrate(e){if(e.style===2){let{style:t,...r}=e;return Yd(...J5e(...Wm(r)))}return Yd(...Wm(e))},save({attributes:e}){let{align:t,value:r,citation:a,style:n}=e;return(0,pa.jsxs)("blockquote",{className:n===2?"is-large":"",style:{textAlign:t||null},children:[(0,pa.jsx)(oo.RichText.Content,{multiline:!0,value:r}),!oo.RichText.isEmpty(a)&&(0,pa.jsx)(oo.RichText.Content,{tagName:"cite",value:a})]})}},a4e={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"footer",default:""},align:{type:"string"},style:{type:"number",default:1}},migrate(e){if(!isNaN(parseInt(e.style))){let{style:t,...r}=e;return Yd(...Wm(r))}return Yd(...Wm(e))},save({attributes:e}){let{align:t,value:r,citation:a,style:n}=e;return(0,pa.jsxs)("blockquote",{className:`blocks-quote-style-${n}`,style:{textAlign:t||null},children:[(0,pa.jsx)(oo.RichText.Content,{multiline:!0,value:r}),!oo.RichText.isEmpty(a)&&(0,pa.jsx)(oo.RichText.Content,{tagName:"footer",value:a})]})}},kne=[e4e,t4e,r4e,o4e,a4e];var D2=o(P(),1),yc=o(T(),1),wne=o(M(),1),e6=o(V(),1),t6=o(U(),1),Cne=o(Ff(),1);var Bu=o(v(),1),JC=t6.Platform.OS==="web",n4e=[["core/paragraph",{}]],i4e=(e,t)=>{let r=(0,e6.useRegistry)(),{updateBlockAttributes:a,replaceInnerBlocks:n}=(0,e6.useDispatch)(yc.store);(0,t6.useEffect)(()=>{if(!e.value)return;let[i,l]=Wm(e);(0,Cne.default)("Value attribute on the quote block",{since:"6.0",version:"6.5",alternative:"inner blocks"}),r.batch(()=>{a(t,i),n(t,l)})},[e.value])};function Sne({attributes:e,setAttributes:t,insertBlocksAfter:r,clientId:a,className:n,style:i,isSelected:l}){let{textAlign:s,allowedBlocks:c}=e;i4e(e,a);let u=(0,yc.useBlockProps)({className:w(n,{[`has-text-align-${s}`]:s}),...!JC&&{style:i}}),m=(0,yc.useInnerBlocksProps)(u,{template:n4e,templateInsertUpdatesSelection:!0,__experimentalCaptureToolbars:!0,renderAppender:!1,allowedBlocks:c});return(0,Bu.jsxs)(Bu.Fragment,{children:[(0,Bu.jsx)(yc.BlockControls,{group:"block",children:(0,Bu.jsx)(yc.AlignmentControl,{value:s,onChange:p=>{t({textAlign:p})}})}),(0,Bu.jsxs)(wne.BlockQuotation,{...m,children:[m.children,(0,Bu.jsx)(_a,{attributeKey:"citation",tagName:JC?"cite":"p",style:JC&&{display:"block"},isSelected:l,attributes:e,setAttributes:t,__unstableMobileNoFocusOnMount:!0,icon:_1,label:(0,D2.__)("Quote citation"),placeholder:(0,D2.__)("Add citation"),addLabel:(0,D2.__)("Add citation"),removeLabel:(0,D2.__)("Remove citation"),excludeElementClassName:!0,className:"wp-block-quote__citation",insertBlocksAfter:r,...JC?{}:{textAlign:s}})]})]})}var r6={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/quote",title:"Quote",category:"text",description:'Give quoted text visual emphasis. "In quoting others, we cite ourselves." \u2014 Julio Cort\xE1zar',keywords:["blockquote","cite"],textdomain:"default",attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:"",role:"content"},citation:{type:"rich-text",source:"rich-text",selector:"cite",role:"content"},textAlign:{type:"string"}},supports:{anchor:!0,align:["left","right","wide","full"],html:!1,background:{backgroundImage:!0,backgroundSize:!0,__experimentalDefaultControls:{backgroundImage:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},dimensions:{minHeight:!0,__experimentalDefaultControls:{minHeight:!1}},__experimentalOnEnter:!0,__experimentalOnMerge:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},layout:{allowEditing:!1},spacing:{blockGap:!0,padding:!0,margin:!0},interactivity:{clientNavigation:!0},allowedBlocks:!0},styles:[{name:"default",label:"Default",isDefault:!0},{name:"plain",label:"Plain"}],editorStyle:"wp-block-quote-editor",style:"wp-block-quote"};var Xd=o(T(),1),L2=o(v(),1);function Tne({attributes:e}){let{textAlign:t,citation:r}=e,a=w({[`has-text-align-${t}`]:t});return(0,L2.jsxs)("blockquote",{...Xd.useBlockProps.save({className:a}),children:[(0,L2.jsx)(Xd.InnerBlocks.Content,{}),!Xd.RichText.isEmpty(r)&&(0,L2.jsx)(Xd.RichText.Content,{tagName:"cite",value:r})]})}var M2=o(T(),1),jr=o(W(),1),s4e={from:[{type:"block",blocks:["core/verse"],transform:({content:e})=>(0,jr.createBlock)("core/quote",{},[(0,jr.createBlock)("core/paragraph",{content:e})])},{type:"block",blocks:["core/pullquote"],transform:({value:e,align:t,citation:r,anchor:a,fontSize:n,style:i})=>(0,jr.createBlock)("core/quote",{align:t,citation:r,anchor:a,fontSize:n,style:i},[(0,jr.createBlock)("core/paragraph",{content:e})])},{type:"prefix",prefix:">",transform:e=>(0,jr.createBlock)("core/quote",{},[(0,jr.createBlock)("core/paragraph",{content:e})])},{type:"raw",schema:()=>({blockquote:{children:"*"}}),selector:"blockquote",transform:(e,t)=>(0,jr.createBlock)("core/quote",{},t({HTML:e.innerHTML,mode:"BLOCKS"}))},{type:"block",isMultiBlock:!0,blocks:["*"],isMatch:({},e)=>e.length===1?["core/paragraph","core/heading","core/list","core/pullquote"].includes(e[0].name):!e.some(({name:t})=>t==="core/quote"),__experimentalConvert:e=>(0,jr.createBlock)("core/quote",{},e.map(t=>(0,jr.createBlock)(t.name,t.attributes,t.innerBlocks)))}],to:[{type:"block",blocks:["core/pullquote"],isMatch:({},e)=>e.innerBlocks.every(({name:t})=>t==="core/paragraph"),transform:({align:e,citation:t,anchor:r,fontSize:a,style:n},i)=>{let l=i.map(({attributes:s})=>`${s.content}`).join("<br>");return(0,jr.createBlock)("core/pullquote",{value:l,align:e,citation:t,anchor:r,fontSize:a,style:n})}},{type:"block",blocks:["core/verse"],isMatch:({},e)=>e.innerBlocks.every(t=>t.name==="core/paragraph"?!0:(0,jr.switchToBlockType)(t,"core/paragraph")!==null),transform:({},e)=>{let r=e.flatMap(a=>a.name==="core/paragraph"?a:(0,jr.switchToBlockType)(a,"core/paragraph")||[]).map(({attributes:a})=>a.content||"").filter(Boolean).join("<br>");return(0,jr.createBlock)("core/verse",{content:r})}},{type:"block",blocks:["core/paragraph"],isMatch:({citation:e},t)=>{let r=t.innerBlocks;return r.length?r.every(a=>a.name==="core/paragraph"?!0:(0,jr.switchToBlockType)(a,"core/paragraph")!==null):!M2.RichText.isEmpty(e)},transform:({citation:e},t)=>{let r=t.flatMap(a=>a.name==="core/paragraph"?a:(0,jr.switchToBlockType)(a,"core/paragraph")||[]);return M2.RichText.isEmpty(e)?r:[...r,(0,jr.createBlock)("core/paragraph",{content:e})]}},{type:"block",blocks:["core/group"],transform:({citation:e,anchor:t},r)=>(0,jr.createBlock)("core/group",{anchor:t},M2.RichText.isEmpty(e)?r:[...r,(0,jr.createBlock)("core/paragraph",{content:e})])}],ungroup:({citation:e},t)=>M2.RichText.isEmpty(e)?t:[...t,(0,jr.createBlock)("core/paragraph",{content:e})]},Pne=s4e;var{name:Bne}=r6,Ine={icon:zP,example:{attributes:{citation:(0,iM.__)("Julio Cort\xE1zar")},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,iM.__)("In quoting others, we cite ourselves.")}}]},transforms:Pne,edit:Sne,save:Tne,deprecated:kne},c4e=()=>E({name:Bne,metadata:r6,settings:Ine});var sM={};Z(sM,{init:()=>k4e,metadata:()=>o6,name:()=>Hne,settings:()=>One});var zne=o(Q(),1),Vne=o(V(),1),Fne=o(Wo(),1);var o6={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/block",title:"Pattern",category:"reusable",description:"Reuse this design across your site.",keywords:["reusable"],textdomain:"default",attributes:{ref:{type:"number"},content:{type:"object",default:{}}},providesContext:{"pattern/overrides":"content"},supports:{customClassName:!1,html:!1,inserter:!1,renaming:!1,interactivity:{clientNavigation:!0},customCSS:!1}};var R2=o(V(),1),z2=o(U(),1),Eg=o(Q(),1),_c=o(M(),1),A2=o(P(),1),Mr=o(T(),1),Lne=o(Ene(),1),Mne=o(W(),1);var gr=o(v(),1),{useLayoutClasses:m4e}=K(Mr.privateApis),{isOverridableBlock:p4e}=K(Lne.privateApis),d4e=["full","wide","left","right"],f4e=(e,t)=>{let r=(0,z2.useRef)();return(0,z2.useMemo)(()=>{if(!e?.length)return{};let a=r.current;if(a===void 0){let i=t?.type==="constrained",l=e.some(s=>d4e.includes(s.attributes.align));a=i&&l?"full":null,r.current=a}return{alignment:a,layout:a?t:void 0}},[e,t])};function h4e(){let e=(0,Mr.useBlockProps)();return(0,gr.jsx)("div",{...e,children:(0,gr.jsx)(Mr.Warning,{children:(0,A2.__)("Block cannot be rendered inside itself.")})})}var Dne=()=>{};function Ane(e){let{ref:t}=e.attributes;return(0,Mr.useHasRecursion)(t)?(0,gr.jsx)(h4e,{}):(0,gr.jsx)(Mr.RecursionProvider,{uniqueId:t,children:(0,gr.jsx)(b4e,{...e})})}function g4e({recordId:e,canOverrideBlocks:t,hasContent:r,handleEditOriginal:a,resetContent:n}){let i=(0,R2.useSelect)(l=>!!l(Eg.store).canUser("update",{kind:"postType",name:"wp_block",id:e}),[e]);return(0,gr.jsxs)(gr.Fragment,{children:[i&&!!a&&(0,gr.jsx)(Mr.BlockControls,{group:"other",children:(0,gr.jsx)(_c.ToolbarGroup,{children:(0,gr.jsx)(_c.ToolbarButton,{onClick:a,children:(0,A2.__)("Edit original")})})}),t&&(0,gr.jsx)(Mr.BlockControls,{group:"other",children:(0,gr.jsx)(_c.ToolbarGroup,{children:(0,gr.jsx)(_c.ToolbarButton,{onClick:n,disabled:!r,children:(0,A2.__)("Reset")})})})]})}var v4e={};function b4e({name:e,attributes:{ref:t,content:r},__unstableParentLayout:a,setAttributes:n}){let{record:i,hasResolved:l}=(0,Eg.useEntityRecord)("postType","wp_block",t),[s]=(0,Eg.useEntityBlockEditor)("postType","wp_block",{id:t}),c=l&&!i,{__unstableMarkLastChangeAsPersistent:u}=(0,R2.useDispatch)(Mr.store),{onNavigateToEntityRecord:m,hasPatternOverridesSource:p,supportedBlockTypesRaw:d}=(0,R2.useSelect)(C=>{let{getSettings:N}=C(Mr.store);return{onNavigateToEntityRecord:N().onNavigateToEntityRecord,hasPatternOverridesSource:!!(0,Mne.getBlockBindingsSource)("core/pattern-overrides"),supportedBlockTypesRaw:N().__experimentalBlockBindingsSupportedAttributes||v4e}},[]),f=(0,z2.useMemo)(()=>{let C=Object.keys(d),N=B=>B.some(D=>C.includes(D.name)&&p4e(D)?!0:N(D.innerBlocks));return p&&N(s)},[p,s,d]),{alignment:h,layout:g}=f4e(s,a),b=m4e({layout:g},e),y=(0,Mr.useBlockProps)({className:w("block-library-block__reusable-block-container",g&&b,{[`align${h}`]:h})}),k=(0,Mr.useInnerBlocksProps)(y,{layout:g,value:s,onInput:Dne,onChange:Dne,renderAppender:s?.length?void 0:Mr.InnerBlocks.ButtonBlockAppender}),_=()=>{m({postId:t,postType:"wp_block"})},x=()=>{r&&(u(),n({content:void 0}))},S=null;return c&&(S=(0,gr.jsx)(Mr.Warning,{children:(0,A2.__)("Block has been deleted or is unavailable.")})),l||(S=(0,gr.jsx)(_c.Placeholder,{children:(0,gr.jsx)(_c.Spinner,{})})),(0,gr.jsxs)(gr.Fragment,{children:[l&&!c&&(0,gr.jsx)(g4e,{recordId:t,canOverrideBlocks:f,hasContent:!!r,handleEditOriginal:m?_:void 0,resetContent:x}),S===null?(0,gr.jsx)("div",{...k}):(0,gr.jsx)("div",{...y,children:S})]})}var y4e=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,_4e={attributes:{ref:{type:"number"},content:{type:"object"}},supports:{customClassName:!1,html:!1,inserter:!1,renaming:!1},isEligible({content:e}){return!!e&&Object.keys(e).every(t=>e[t].values&&y4e(e[t].values))},migrate(e){let{content:t,...r}=e;if(t&&Object.keys(t).length){let a={...t};for(let n in t)a[n]=t[n].values;return{...r,content:a}}return e}},x4e={attributes:{ref:{type:"number"},overrides:{type:"object"}},supports:{customClassName:!1,html:!1,inserter:!1,renaming:!1},isEligible({overrides:e}){return!!e},migrate(e){let{overrides:t,...r}=e,a={};return Object.keys(t).forEach(n=>{a[n]=t[n]}),{...r,content:a}}},Rne=[_4e,x4e];var{name:Hne}=o6,One={deprecated:Rne,edit:Ane,icon:iB,__experimentalLabel:({ref:e})=>{if(!e)return;let t=(0,Vne.select)(zne.store).getEditedEntityRecord("postType","wp_block",e);if(t?.title)return(0,Fne.decodeEntities)(t.title)}},k4e=()=>E({name:Hne,metadata:o6,settings:One});var cM={};Z(cM,{init:()=>C4e,metadata:()=>a6,name:()=>Gne,settings:()=>Wne});var Une=o(P(),1);var a6={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/read-more",title:"Read More",category:"theme",description:"Displays the link of a post, page, or any other content-type.",textdomain:"default",attributes:{content:{type:"string",role:"content"},linkTarget:{type:"string",default:"_self"}},usesContext:["postId"],supports:{anchor:!0,html:!1,color:{gradients:!0,text:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0,textDecoration:!0}},spacing:{margin:["top","bottom"],padding:!0,__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalDefaultControls:{width:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-read-more"};var Lg=o(T(),1),Mg=o(M(),1),n6=o(W(),1),Dg=o(P(),1);var xc=o(v(),1);function jne({attributes:{content:e,linkTarget:t},setAttributes:r,insertBlocksAfter:a}){let n=(0,Lg.useBlockProps)(),i=q();return(0,xc.jsxs)(xc.Fragment,{children:[(0,xc.jsx)(Lg.InspectorControls,{children:(0,xc.jsx)(Mg.__experimentalToolsPanel,{label:(0,Dg.__)("Settings"),resetAll:()=>r({linkTarget:"_self"}),dropdownMenuProps:i,children:(0,xc.jsx)(Mg.__experimentalToolsPanelItem,{label:(0,Dg.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>t!=="_self",onDeselect:()=>r({linkTarget:"_self"}),children:(0,xc.jsx)(Mg.ToggleControl,{label:(0,Dg.__)("Open in new tab"),onChange:l=>r({linkTarget:l?"_blank":"_self"}),checked:t==="_blank"})})})}),(0,xc.jsx)(Lg.RichText,{identifier:"content",tagName:"a","aria-label":(0,Dg.__)("\u201CRead more\u201D link text"),placeholder:(0,Dg.__)("Read more"),value:e,onChange:l=>r({content:l}),__unstableOnSplitAtEnd:()=>a((0,n6.createBlock)((0,n6.getDefaultBlockName)())),withoutInteractiveFormatting:!0,...n})]})}var{name:Gne}=a6,Wne={icon:ii,edit:jne,example:{attributes:{content:(0,Une.__)("Read more")}}},C4e=()=>E({name:Gne,metadata:a6,settings:Wne});var uM={};Z(uM,{init:()=>B4e,metadata:()=>i6,name:()=>Qne,settings:()=>Yne});var i6={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/rss",title:"RSS",category:"widgets",description:"Display entries from any RSS or Atom feed.",keywords:["atom","feed"],textdomain:"default",attributes:{columns:{type:"number",default:2},blockLayout:{type:"string",default:"list"},feedURL:{type:"string",default:"",role:"content"},itemsToShow:{type:"number",default:5},displayExcerpt:{type:"boolean",default:!1},displayAuthor:{type:"boolean",default:!1},displayDate:{type:"boolean",default:!1},excerptLength:{type:"number",default:55},openInNewTab:{type:"boolean",default:!1},rel:{type:"string"}},supports:{anchor:!0,align:!0,html:!1,interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{padding:!1,margin:!1}},color:{background:!0,text:!0,gradients:!0,link:!0}},editorStyle:"wp-block-rss-editor",style:"wp-block-rss"};var Jd=o(T(),1),gt=o(M(),1),l6=o(U(),1);var Nt=o(P(),1),$ne=o(mr(),1),qne=o(Fu(),1),Zne=o(me(),1);var rt=o(v(),1),T4e=1,P4e=20;function Kne({attributes:e,setAttributes:t,name:r}){let[a,n]=(0,l6.useState)(!e.feedURL),{blockLayout:i,columns:l,displayAuthor:s,displayDate:c,displayExcerpt:u,excerptLength:m,feedURL:p,itemsToShow:d,openInNewTab:f,rel:h}=e,g=q();function b(D){return()=>{let A=e[D];t({[D]:!A})}}function y(D){D.preventDefault(),p&&(t({feedURL:(0,$ne.prependHTTPS)(p)}),n(!1))}let{content:k,status:_,error:x}=(0,qne.useServerSideRender)({attributes:e,skipBlockSupportAttributes:!0,block:r}),S=(0,Zne.useDisabled)(),C=(0,Jd.useBlockProps)({ref:a?null:S}),N=(0,Nt.__)("RSS URL");if(a)return(0,rt.jsx)("div",{...C,children:(0,rt.jsx)(gt.Placeholder,{icon:i1,label:N,instructions:(0,Nt.__)("Display entries from any RSS or Atom feed."),children:(0,rt.jsxs)("form",{onSubmit:y,className:"wp-block-rss__placeholder-form",children:[(0,rt.jsx)(gt.__experimentalInputControl,{__next40pxDefaultSize:!0,label:N,type:"url",hideLabelFromVision:!0,placeholder:(0,Nt.__)("Enter URL here\u2026"),value:p,onChange:D=>t({feedURL:D}),className:"wp-block-rss__placeholder-input"}),(0,rt.jsx)(gt.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,Nt.__)("Apply")})]})})});let B=[{icon:Pp,title:(0,Nt.__)("Edit RSS URL"),onClick:()=>n(!0)},{icon:Nl,title:(0,Nt._x)("List view","RSS block display setting"),onClick:()=>t({blockLayout:"list"}),isActive:i==="list"},{icon:Il,title:(0,Nt._x)("Grid view","RSS block display setting"),onClick:()=>t({blockLayout:"grid"}),isActive:i==="grid"}];return(0,rt.jsxs)(rt.Fragment,{children:[(0,rt.jsx)(Jd.BlockControls,{children:(0,rt.jsx)(gt.ToolbarGroup,{controls:B})}),(0,rt.jsx)(Jd.InspectorControls,{children:(0,rt.jsxs)(gt.__experimentalToolsPanel,{label:(0,Nt.__)("Settings"),resetAll:()=>{t({itemsToShow:5,displayAuthor:!1,displayDate:!1,displayExcerpt:!1,excerptLength:55,columns:2,openInNewTab:!1})},dropdownMenuProps:g,children:[(0,rt.jsx)(gt.__experimentalToolsPanelItem,{label:(0,Nt.__)("Number of items"),hasValue:()=>d!==5,onDeselect:()=>t({itemsToShow:5}),isShownByDefault:!0,children:(0,rt.jsx)(gt.RangeControl,{__next40pxDefaultSize:!0,label:(0,Nt.__)("Number of items"),value:d,onChange:D=>t({itemsToShow:D}),min:T4e,max:P4e,required:!0})}),(0,rt.jsx)(gt.__experimentalToolsPanelItem,{label:(0,Nt.__)("Display author"),hasValue:()=>!!s,onDeselect:()=>t({displayAuthor:!1}),isShownByDefault:!0,children:(0,rt.jsx)(gt.ToggleControl,{label:(0,Nt.__)("Display author"),checked:s,onChange:b("displayAuthor")})}),(0,rt.jsx)(gt.__experimentalToolsPanelItem,{label:(0,Nt.__)("Display date"),hasValue:()=>!!c,onDeselect:()=>t({displayDate:!1}),isShownByDefault:!0,children:(0,rt.jsx)(gt.ToggleControl,{label:(0,Nt.__)("Display date"),checked:c,onChange:b("displayDate")})}),(0,rt.jsx)(gt.__experimentalToolsPanelItem,{label:(0,Nt.__)("Display excerpt"),hasValue:()=>!!u,onDeselect:()=>t({displayExcerpt:!1}),isShownByDefault:!0,children:(0,rt.jsx)(gt.ToggleControl,{label:(0,Nt.__)("Display excerpt"),checked:u,onChange:b("displayExcerpt")})}),u&&(0,rt.jsx)(gt.__experimentalToolsPanelItem,{label:(0,Nt.__)("Max number of words in excerpt"),hasValue:()=>m!==55,onDeselect:()=>t({excerptLength:55}),isShownByDefault:!0,children:(0,rt.jsx)(gt.RangeControl,{__next40pxDefaultSize:!0,label:(0,Nt.__)("Max number of words in excerpt"),value:m,onChange:D=>t({excerptLength:D}),min:10,max:100,required:!0})}),i==="grid"&&(0,rt.jsx)(gt.__experimentalToolsPanelItem,{label:(0,Nt.__)("Columns"),hasValue:()=>l!==2,onDeselect:()=>t({columns:2}),isShownByDefault:!0,children:(0,rt.jsx)(gt.RangeControl,{__next40pxDefaultSize:!0,label:(0,Nt.__)("Columns"),value:l,onChange:D=>t({columns:D}),min:2,max:6,required:!0})}),(0,rt.jsx)(gt.__experimentalToolsPanelItem,{label:(0,Nt.__)("Open links in new tab"),hasValue:()=>!!f,onDeselect:()=>t({openInNewTab:!1}),isShownByDefault:!0,children:(0,rt.jsx)(gt.ToggleControl,{label:(0,Nt.__)("Open links in new tab"),checked:f,onChange:D=>t({openInNewTab:D})})})]})}),(0,rt.jsx)(Jd.InspectorControls,{group:"advanced",children:(0,rt.jsx)(gt.TextControl,{__next40pxDefaultSize:!0,label:(0,Nt.__)("Link relation"),help:(0,l6.createInterpolateElement)((0,Nt.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,rt.jsx)(gt.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})}),value:h||"",onChange:D=>t({rel:D})})}),_==="loading"&&(0,rt.jsx)("div",{...C,children:(0,rt.jsx)(gt.Spinner,{})}),_==="error"&&(0,rt.jsx)("div",{...C,children:(0,rt.jsx)("p",{children:(0,Nt.sprintf)((0,Nt.__)("Error: %s"),x)})}),_==="success"&&(0,rt.jsx)(uo,{wrapperProps:C,html:k})]})}var{name:Qne}=i6,Yne={icon:i1,example:{attributes:{feedURL:"https://wordpress.org"}},edit:Kne},B4e=()=>E({name:Qne,metadata:i6,settings:Yne});var gM={};Z(gM,{init:()=>L4e,metadata:()=>s6,name:()=>nie,settings:()=>u6});var Ag=o(P(),1);var aie=o(W(),1);var s6={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/search",title:"Search",category:"widgets",description:"Help visitors find your content.",keywords:["find"],textdomain:"default",attributes:{label:{type:"string",role:"content"},showLabel:{type:"boolean",default:!0},placeholder:{type:"string",default:"",role:"content"},width:{type:"number"},widthUnit:{type:"string"},buttonText:{type:"string",role:"content"},buttonPosition:{type:"string",default:"button-outside"},buttonUseIcon:{type:"boolean",default:!1},query:{type:"object",default:{}},isSearchFieldHidden:{type:"boolean",default:!1}},supports:{anchor:!0,align:["left","center","right"],color:{gradients:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{background:!0,text:!0}},interactivity:!0,typography:{__experimentalSkipSerialization:!0,__experimentalSelector:".wp-block-search__label, .wp-block-search__input, .wp-block-search__button",fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}},spacing:{margin:!0},html:!1},editorStyle:"wp-block-search-editor",style:"wp-block-search"};var ao=o(T(),1),c6=o(V(),1),ef=o(U(),1),cr=o(M(),1),eie=o(me(),1);var sr=o(P(),1),tie=o(ai(),1);var mM=50,pM=350,dM=220;function fM(e){return e==="%"}var Et=o(v(),1),Xne="4px",Jne=[25,50,75,100];function rie({className:e,attributes:t,setAttributes:r,toggleSelection:a,isSelected:n,clientId:i}){let{label:l,showLabel:s,placeholder:c,width:u,widthUnit:m,align:p,buttonText:d,buttonPosition:f,buttonUseIcon:h,isSearchFieldHidden:g,style:b}=t,y=(0,c6.useSelect)(ae=>{let{getBlockParentsByBlockName:Re,wasBlockJustInserted:Ee}=ae(ao.store);return!!Re(i,"core/navigation")?.length&&Ee(i)},[i]),{__unstableMarkNextChangeAsNotPersistent:k}=(0,c6.useDispatch)(ao.store);(0,ef.useEffect)(()=>{y&&(k(),r({showLabel:!1,buttonUseIcon:!0,buttonPosition:"button-inside"}))},[k,y,r]);let _=b?.border?.radius,x=(0,ao.__experimentalUseBorderProps)(t);typeof _=="number"&&(x={...x,style:{...x.style,borderRadius:`${_}px`}});let S=(0,ao.__experimentalUseColorProps)(t),[C,N]=(0,ao.useSettings)("typography.fluid","layout"),B=(0,ao.getTypographyClassesAndStyles)(t,{typography:{fluid:C},layout:{wideSize:N?.wideSize}}),A=`wp-block-search__width-${(0,eie.useInstanceId)(cr.__experimentalUnitControl)}`,H=f==="button-inside",F=f==="button-outside",z=f==="no-button",I=f==="button-only",R=(0,ef.useRef)(),$=(0,ef.useRef)(),j=(0,cr.__experimentalUseCustomUnits)({availableUnits:["%","px"],defaultValues:{"%":mM,px:pM}});(0,ef.useEffect)(()=>{I&&!n&&r({isSearchFieldHidden:!0})},[I,n,r]),(0,ef.useEffect)(()=>{!I||!n||r({isSearchFieldHidden:!1})},[I,n,r,u]);let G=()=>w(e,H?"wp-block-search__button-inside":void 0,F?"wp-block-search__button-outside":void 0,z?"wp-block-search__no-button":void 0,I?"wp-block-search__button-only":void 0,!h&&!z?"wp-block-search__text-button":void 0,h&&!z?"wp-block-search__icon-button":void 0,I&&g?"wp-block-search__searchfield-hidden":void 0),O=[{label:(0,sr.__)("Button outside"),value:"button-outside"},{label:(0,sr.__)("Button inside"),value:"button-inside"},{label:(0,sr.__)("No button"),value:"no-button"},{label:(0,sr.__)("Button only"),value:"button-only"}],J=()=>I?{}:{right:p!=="right",left:p==="right"},ee=()=>{let ae=w("wp-block-search__input",H?void 0:x.className,B.className),Re={...H?{borderRadius:x.style?.borderRadius,borderTopLeftRadius:x.style?.borderTopLeftRadius,borderTopRightRadius:x.style?.borderTopRightRadius,borderBottomLeftRadius:x.style?.borderBottomLeftRadius,borderBottomRightRadius:x.style?.borderBottomRightRadius}:x.style,...B.style,textDecoration:void 0};return(0,Et.jsx)("input",{type:"search",className:ae,style:Re,"aria-label":(0,sr.__)("Optional placeholder text"),placeholder:c?void 0:(0,sr.__)("Optional placeholder\u2026"),value:c,onChange:Ee=>r({placeholder:Ee.target.value}),ref:R})},oe=()=>{let ae=w("wp-block-search__button",S.className,B.className,H?void 0:x.className,h?"has-icon":void 0,(0,ao.__experimentalGetElementClassName)("button")),Re={...S.style,...B.style,...H?{borderRadius:x.style?.borderRadius,borderTopLeftRadius:x.style?.borderTopLeftRadius,borderTopRightRadius:x.style?.borderTopRightRadius,borderBottomLeftRadius:x.style?.borderBottomLeftRadius,borderBottomRightRadius:x.style?.borderBottomRightRadius}:x.style},Ee=()=>{I&&r({isSearchFieldHidden:!g})};return(0,Et.jsxs)(Et.Fragment,{children:[h&&(0,Et.jsx)("button",{type:"button",className:ae,style:Re,"aria-label":d?(0,tie.__unstableStripHTML)(d):(0,sr.__)("Search"),onClick:Ee,ref:$,children:(0,Et.jsx)(Wa,{icon:l1})}),!h&&(0,Et.jsx)(ao.RichText,{identifier:"buttonText",className:ae,style:Re,"aria-label":(0,sr.__)("Button text"),placeholder:(0,sr.__)("Add button text\u2026"),withoutInteractiveFormatting:!0,value:d,onChange:ie=>r({buttonText:ie}),onClick:Ee})]})},X=q(),te=(0,Et.jsx)(Et.Fragment,{children:(0,Et.jsx)(ao.InspectorControls,{children:(0,Et.jsxs)(cr.__experimentalToolsPanel,{label:(0,sr.__)("Settings"),resetAll:()=>{r({width:void 0,widthUnit:void 0,showLabel:!0,buttonUseIcon:!1,buttonPosition:"button-outside",isSearchFieldHidden:!1})},dropdownMenuProps:X,children:[(0,Et.jsx)(cr.__experimentalToolsPanelItem,{hasValue:()=>!s,label:(0,sr.__)("Show label"),onDeselect:()=>{r({showLabel:!0})},isShownByDefault:!0,children:(0,Et.jsx)(cr.ToggleControl,{checked:s,label:(0,sr.__)("Show label"),onChange:ae=>r({showLabel:ae})})}),(0,Et.jsx)(cr.__experimentalToolsPanelItem,{hasValue:()=>f!=="button-outside",label:(0,sr.__)("Button position"),onDeselect:()=>{r({buttonPosition:"button-outside",isSearchFieldHidden:!1})},isShownByDefault:!0,children:(0,Et.jsx)(cr.SelectControl,{value:f,__next40pxDefaultSize:!0,label:(0,sr.__)("Button position"),onChange:ae=>{r({buttonPosition:ae,isSearchFieldHidden:ae==="button-only"})},options:O})}),f!=="no-button"&&(0,Et.jsx)(cr.__experimentalToolsPanelItem,{hasValue:()=>!!h,label:(0,sr.__)("Use button with icon"),onDeselect:()=>{r({buttonUseIcon:!1})},isShownByDefault:!0,children:(0,Et.jsx)(cr.ToggleControl,{checked:h,label:(0,sr.__)("Use button with icon"),onChange:ae=>r({buttonUseIcon:ae})})}),(0,Et.jsx)(cr.__experimentalToolsPanelItem,{hasValue:()=>!!u,label:(0,sr.__)("Width"),onDeselect:()=>{r({width:void 0,widthUnit:void 0})},isShownByDefault:!0,children:(0,Et.jsxs)(cr.__experimentalVStack,{children:[(0,Et.jsx)(cr.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,sr.__)("Width"),id:A,min:fM(m)?0:dM,max:fM(m)?100:void 0,step:1,onChange:ae=>{let Re=ae===""?void 0:parseInt(ae,10);r({width:Re})},onUnitChange:ae=>{r({width:ae==="%"?mM:pM,widthUnit:ae})},__unstableInputWidth:"80px",value:`${u}${m}`,units:j}),(0,Et.jsx)(cr.__experimentalToggleGroupControl,{label:(0,sr.__)("Percentage Width"),value:Jne.includes(u)&&m==="%"?u:void 0,hideLabelFromVision:!0,onChange:ae=>{r({width:ae,widthUnit:"%"})},isBlock:!0,__next40pxDefaultSize:!0,children:Jne.map(ae=>(0,Et.jsx)(cr.__experimentalToggleGroupControlOption,{value:ae,label:(0,sr.sprintf)((0,sr.__)("%d%%"),ae)},ae))})]})})]})})}),ne=ae=>ae!==void 0&&parseInt(ae,10)!==0,le=ae=>ne(ae)?`calc(${ae} + ${Xne})`:void 0,pe=()=>{let ae=H?x.style:{borderRadius:x.style?.borderRadius,borderTopLeftRadius:x.style?.borderTopLeftRadius,borderTopRightRadius:x.style?.borderTopRightRadius,borderBottomLeftRadius:x.style?.borderBottomLeftRadius,borderBottomRightRadius:x.style?.borderBottomRightRadius};if(H){if(typeof _=="object"){let{borderTopLeftRadius:Ee,borderTopRightRadius:ie,borderBottomLeftRadius:fe,borderBottomRightRadius:ke}=x.style;return{...ae,borderTopLeftRadius:le(Ee),borderTopRightRadius:le(ie),borderBottomLeftRadius:le(fe),borderBottomRightRadius:le(ke)}}let Re=Number.isInteger(_)?`${_}px`:_;ae.borderRadius=`calc(${Re} + ${Xne})`}return ae},Ie=(0,ao.useBlockProps)({className:G(),style:{...B.style,textDecoration:void 0}}),Ne=w("wp-block-search__label",B.className);return(0,Et.jsxs)("div",{...Ie,children:[te,s&&(0,Et.jsx)(ao.RichText,{identifier:"label",className:Ne,"aria-label":(0,sr.__)("Label text"),placeholder:(0,sr.__)("Add label\u2026"),withoutInteractiveFormatting:!0,value:l,onChange:ae=>r({label:ae}),style:B.style}),(0,Et.jsxs)(cr.ResizableBox,{size:{width:u===void 0?"auto":`${u}${m}`,height:"auto"},className:w("wp-block-search__inside-wrapper",H?x.className:void 0),style:pe(),minWidth:dM,enable:J(),onResizeStart:(ae,Re,Ee)=>{r({width:parseInt(Ee.offsetWidth,10),widthUnit:"px"}),a(!1)},onResizeStop:(ae,Re,Ee,ie)=>{r({width:parseInt(u+ie.width,10)}),a(!0)},showHandle:n,children:[(H||F||I)&&(0,Et.jsxs)(Et.Fragment,{children:[ee(),oe()]}),z&&ee()]})]})}var hM=o(P(),1),N4e=[{name:"default",isDefault:!0,attributes:{buttonText:(0,hM.__)("Search"),label:(0,hM.__)("Search")}}],oie=N4e;var{fieldsKey:E4e,formKey:D4e}=K(aie.privateApis),{name:nie}=s6,u6={icon:l1,example:{attributes:{buttonText:(0,Ag.__)("Search"),label:(0,Ag.__)("Search")},viewportWidth:400},variations:oie,edit:rie};window.__experimentalContentOnlyInspectorFields&&(u6[E4e]=[{id:"label",label:(0,Ag.__)("Label"),type:"text",Edit:"rich-text"},{id:"buttonText",label:(0,Ag.__)("Button text"),type:"text",Edit:"rich-text"},{id:"placeholder",label:(0,Ag.__)("Placeholder"),type:"text",Edit:"rich-text"}],u6[D4e]={fields:["label","buttonText","placeholder"]});var L4e=()=>E({name:nie,metadata:s6,settings:u6});var vM={};Z(vM,{init:()=>V4e,metadata:()=>p6,name:()=>fie,settings:()=>hie});var $m=o(T(),1),m6=o(M(),1),F2=o(P(),1);var V2=o(U(),1),iie=o(me(),1);function lie(e,t,r){let[a,n]=(0,V2.useState)(!1),i=(0,iie.usePrevious)(t);(0,V2.useEffect)(()=>{e==="css"&&!t&&!i&&n(!0)},[t,i,e]),(0,V2.useEffect)(()=>{e==="css"&&(a&&t||i&&t!==i)&&(r({opacity:"alpha-channel"}),n(!1))},[a,t,i])}var Iu=o(v(),1),M4e=({tagName:e,setAttributes:t})=>(0,Iu.jsx)(m6.SelectControl,{label:(0,F2.__)("HTML element"),value:e,onChange:r=>t({tagName:r}),options:[{label:(0,F2.__)("Default (<hr>)"),value:"hr"},{label:"<div>",value:"div"}],help:e==="hr"?(0,F2.__)("Only select <hr> if the separator conveys important information and should be announced by screen readers."):(0,F2.__)("The <div> element should only be used if the block is a design element with no semantic meaning."),__next40pxDefaultSize:!0});function sie({attributes:e,setAttributes:t}){let{backgroundColor:r,opacity:a,style:n,tagName:i}=e,l=(0,$m.__experimentalUseColorProps)(e),s=l?.style?.backgroundColor,c=!!n?.color?.background;lie(a,s,t);let u=(0,$m.getColorClassName)("color",r),m=w({"has-text-color":r||s,[u]:u,"has-css-opacity":a==="css","has-alpha-channel-opacity":a==="alpha-channel"},l.className);return(0,Iu.jsxs)(Iu.Fragment,{children:[(0,Iu.jsx)($m.InspectorControls,{group:"advanced",children:(0,Iu.jsx)(M4e,{tagName:i,setAttributes:t})}),(0,Iu.jsx)(i==="hr"?m6.HorizontalRule:i,{...(0,$m.useBlockProps)({className:m,style:c?{color:s,backgroundColor:s}:void 0})})]})}var p6={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/separator",title:"Separator",category:"design",description:"Create a break between ideas or sections with a horizontal separator.",keywords:["horizontal-line","hr","divider"],textdomain:"default",attributes:{opacity:{type:"string",default:"alpha-channel"},tagName:{type:"string",enum:["hr","div"],default:"hr"}},supports:{anchor:!0,align:["center","wide","full"],color:{enableContrastChecker:!1,__experimentalSkipSerialization:!0,gradients:!0,background:!0,text:!1,__experimentalDefaultControls:{background:!0}},spacing:{margin:["top","bottom"]},interactivity:{clientNavigation:!0}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"wide",label:"Wide Line"},{name:"dots",label:"Dots"}],editorStyle:"wp-block-separator-editor",style:"wp-block-separator"};var Rg=o(T(),1),cie=o(v(),1);function uie({attributes:e}){let{backgroundColor:t,style:r,opacity:a,tagName:n}=e,i=r?.color?.background,l=(0,Rg.__experimentalGetColorClassesAndStyles)(e),s=(0,Rg.getColorClassName)("color",t),c=w({"has-text-color":t||i,[s]:s,"has-css-opacity":a==="css","has-alpha-channel-opacity":a==="alpha-channel"},l.className),u={backgroundColor:l?.style?.backgroundColor,color:s?void 0:i};return(0,cie.jsx)(n,{...Rg.useBlockProps.save({className:c,style:u})})}var zg=o(W(),1),R4e={from:[{type:"input",regExp:/^-{3,}$/,transform:()=>[(0,zg.createBlock)("core/separator"),(0,zg.createBlock)((0,zg.getDefaultBlockName)())]},{type:"raw",selector:"hr",schema:{hr:{}}}],to:[{type:"block",blocks:["core/spacer"],transform:({anchor:e})=>(0,zg.createBlock)("core/spacer",{anchor:e||void 0})}]},mie=R4e;var H2=o(T(),1),pie=o(v(),1),z4e={attributes:{color:{type:"string"},customColor:{type:"string"}},save({attributes:e}){let{color:t,customColor:r}=e,a=(0,H2.getColorClassName)("background-color",t),n=(0,H2.getColorClassName)("color",t),i=w({"has-text-color has-background":t||r,[a]:a,[n]:n}),l={backgroundColor:a?void 0:r,color:n?void 0:r};return(0,pie.jsx)("hr",{...H2.useBlockProps.save({className:i,style:l})})},migrate(e){let{color:t,customColor:r,...a}=e;return{...a,backgroundColor:t||void 0,opacity:"css",style:r?{color:{background:r}}:void 0,tagName:"hr"}}},die=[z4e];var{name:fie}=p6,hie={icon:qP,example:{attributes:{customColor:"#065174",className:"is-style-wide"}},transforms:mie,edit:sie,save:uie,deprecated:die},V4e=()=>E({name:fie,metadata:p6,settings:hie});var yM={};Z(yM,{init:()=>O4e,metadata:()=>v6,name:()=>Cie,settings:()=>Sie});var d6=o(P(),1),h6=o(T(),1),gie=o(me(),1),vie=o(M(),1);var f6=o(v(),1);function bM({attributes:e,setAttributes:t}){let a=`blocks-shortcode-input-${(0,gie.useInstanceId)(bM)}`;return(0,f6.jsx)("div",{...(0,h6.useBlockProps)(),children:(0,f6.jsx)(vie.Placeholder,{icon:c1,label:(0,d6.__)("Shortcode"),children:(0,f6.jsx)(h6.PlainText,{className:"blocks-shortcode__textarea",id:a,value:e.text,"aria-label":(0,d6.__)("Shortcode text"),placeholder:(0,d6.__)("Write shortcode here\u2026"),onChange:n=>t({text:n})})})})}var bie=o(U(),1),yie=o(v(),1);function _ie({attributes:e}){return(0,yie.jsx)(bie.RawHTML,{children:e.text})}var g6=o(kie(),1),F4e={from:[{type:"shortcode",tag:"[a-z][a-z0-9_-]*",attributes:{text:{type:"string",shortcode:(e,{content:t})=>(0,g6.removep)((0,g6.autop)(t))}},priority:20}]},wie=F4e;var v6={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/shortcode",title:"Shortcode",category:"widgets",description:"Insert additional custom elements with a WordPress shortcode.",textdomain:"default",attributes:{text:{type:"string",source:"raw",role:"content"}},supports:{className:!1,customClassName:!1,html:!1,customCSS:!1,visibility:!1},editorStyle:"wp-block-shortcode-editor"};var{name:Cie}=v6,Sie={icon:c1,transforms:wie,edit:bM,save:_ie},O4e=()=>E({name:Cie,metadata:v6,settings:Sie});var xM={};Z(xM,{init:()=>W4e,metadata:()=>b6,name:()=>Eie,settings:()=>Die});var b6={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/site-logo",title:"Site Logo",category:"theme",description:"Display an image to represent this site. Update this block and the changes apply everywhere.",textdomain:"default",attributes:{width:{type:"number"},isLink:{type:"boolean",default:!0,role:"content"},linkTarget:{type:"string",default:"_self",role:"content"},shouldSyncIcon:{type:"boolean"}},example:{viewportWidth:500,attributes:{width:350,className:"block-editor-block-types-list__site-logo-example"}},supports:{anchor:!0,html:!1,align:!0,alignWide:!1,color:{text:!1,background:!1},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},interactivity:{clientNavigation:!0},filter:{duotone:!0}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"rounded",label:"Rounded"}],selectors:{filter:{duotone:".wp-block-site-logo img, .wp-block-site-logo .components-placeholder__illustration, .wp-block-site-logo .components-placeholder::before"}},editorStyle:"wp-block-site-logo-editor",style:"wp-block-site-logo"};var _M=o(Rr(),1),kc=o(U(),1),no=o(P(),1),Tt=o(M(),1),Tie=o(me(),1),io=o(T(),1),qm=o(V(),1),Vg=o(Q(),1);var Pie=o(xr(),1);var Ae=o(v(),1),y6=["image"],U4e=({alt:e,attributes:{align:t,width:r,height:a,isLink:n,linkTarget:i,shouldSyncIcon:l},isSelected:s,setAttributes:c,setLogo:u,logoUrl:m,siteUrl:p,logoId:d,iconId:f,setIcon:h,canUserEdit:g})=>{let b=(0,Tie.useViewportMatch)("medium"),k=!["wide","full"].includes(t)&&b,[{naturalWidth:_,naturalHeight:x},S]=(0,kc.useState)({}),[C,N]=(0,kc.useState)(!1),{toggleSelection:B}=(0,qm.useDispatch)(io.store),D=q(),H=(0,io.useBlockEditingMode)()==="contentOnly",{imageEditing:F,maxWidth:z,title:I}=(0,qm.useSelect)(fe=>{let ke=fe(io.store).getSettings();return{title:fe(Vg.store).getEntityRecord("root","__unstableBase")?.name,imageEditing:ke.imageEditing,maxWidth:ke.maxWidth}},[]);(0,kc.useEffect)(()=>{l&&d!==f&&c({shouldSyncIcon:!1})},[]),(0,kc.useEffect)(()=>{s||N(!1)},[s]);function R(){B(!1)}function $(){B(!0)}let j=(0,Ae.jsxs)(Ae.Fragment,{children:[(0,Ae.jsx)("img",{className:"custom-logo",src:m,alt:e,onLoad:fe=>{S({naturalWidth:fe.target.naturalWidth,naturalHeight:fe.target.naturalHeight})}}),(0,_M.isBlobURL)(m)&&(0,Ae.jsx)(Tt.Spinner,{})]}),G=j;if(n&&(G=(0,Ae.jsx)("a",{href:p,className:"custom-logo-link",rel:"home",title:I,onClick:fe=>fe.preventDefault(),children:j})),!k||!_||!x)return(0,Ae.jsx)("div",{style:{width:r,height:a},children:G});let O=120,J=r||O,ee=_/x,oe=J/ee,X=_<x?Zs:Math.ceil(Zs*ee),te=x<_?Zs:Math.ceil(Zs/ee),ne=z*2.5,le=!1,pe=!1;t==="center"?(le=!0,pe=!0):(0,no.isRTL)()?t==="left"?le=!0:pe=!0:t==="right"?pe=!0:le=!0;let Ie=d&&_&&x&&F,Ne=!H,ae;Ie&&C?ae=(0,Ae.jsx)(io.__experimentalImageEditor,{id:d,url:m,width:J,height:oe,naturalHeight:x,naturalWidth:_,onSaveImage:fe=>{u(fe.id)},onFinishEditing:()=>{N(!1)}}):ae=(0,Ae.jsx)(Tt.ResizableBox,{size:{width:J,height:oe},showHandle:s&&Ne,minWidth:X,maxWidth:ne,minHeight:te,maxHeight:ne/ee,lockAspectRatio:!0,enable:{top:!1,right:le,bottom:!0,left:pe},onResizeStart:R,onResizeStop:(fe,ke,je,de)=>{$(),c({width:parseInt(J+de.width,10),height:parseInt(oe+de.height,10)})},children:G});let Ee=!window?.__experimentalUseCustomizerSiteLogoUrl?p+"/wp-admin/options-general.php":p+"/wp-admin/customize.php?autofocus[section]=title_tagline",ie=(0,kc.createInterpolateElement)((0,no.__)("Site Icons are what you see in browser tabs, bookmark bars, and within the WordPress mobile apps. To use a custom icon that is different from your site logo, use the <a>Site Icon settings</a>."),{a:(0,Ae.jsx)("a",{href:Ee,target:"_blank",rel:"noopener noreferrer"})});return(0,Ae.jsxs)(Ae.Fragment,{children:[(0,Ae.jsx)(io.InspectorControls,{children:(0,Ae.jsxs)(Tt.__experimentalToolsPanel,{label:(0,no.__)("Settings"),dropdownMenuProps:D,children:[(0,Ae.jsx)(Tt.__experimentalToolsPanelItem,{isShownByDefault:!0,hasValue:()=>!!r,label:(0,no.__)("Image width"),onDeselect:()=>c({width:void 0}),children:(0,Ae.jsx)(Tt.RangeControl,{__next40pxDefaultSize:!0,label:(0,no.__)("Image width"),onChange:fe=>c({width:fe}),min:X,max:ne,initialPosition:Math.min(O,ne),value:r||"",disabled:!k})}),(0,Ae.jsx)(Tt.__experimentalToolsPanelItem,{isShownByDefault:!0,hasValue:()=>!n,label:(0,no.__)("Link image to home"),onDeselect:()=>c({isLink:!0}),children:(0,Ae.jsx)(Tt.ToggleControl,{label:(0,no.__)("Link image to home"),onChange:()=>c({isLink:!n}),checked:n})}),n&&(0,Ae.jsx)(Tt.__experimentalToolsPanelItem,{isShownByDefault:!0,hasValue:()=>i==="_blank",label:(0,no.__)("Open in new tab"),onDeselect:()=>c({linkTarget:"_self"}),children:(0,Ae.jsx)(Tt.ToggleControl,{label:(0,no.__)("Open in new tab"),onChange:fe=>c({linkTarget:fe?"_blank":"_self"}),checked:i==="_blank"})}),g&&(0,Ae.jsx)(Tt.__experimentalToolsPanelItem,{isShownByDefault:!0,hasValue:()=>!!l,label:(0,no.__)("Use as Site Icon"),onDeselect:()=>{c({shouldSyncIcon:!1}),h(void 0)},children:(0,Ae.jsx)(Tt.ToggleControl,{label:(0,no.__)("Use as Site Icon"),onChange:fe=>{c({shouldSyncIcon:fe}),h(fe?d:void 0)},checked:!!l,help:ie})})]})}),Ie&&!C&&Ne&&(0,Ae.jsx)(io.BlockControls,{group:"block",children:(0,Ae.jsx)(Tt.ToolbarButton,{onClick:()=>N(!0),icon:D0,label:(0,no.__)("Crop")})}),ae]})};function Bie({attributes:e,className:t,setAttributes:r,isSelected:a}){let{width:n,shouldSyncIcon:i}=e,{siteLogoId:l,canUserEdit:s,url:c,siteIconId:u,mediaItemData:m,isRequestingMediaItem:p}=(0,qm.useSelect)(O=>{let{canUser:J,getEntityRecord:ee,getEditedEntityRecord:oe}=O(Vg.store),X=J("update",{kind:"root",name:"site"}),te=X?oe("root","site"):void 0,ne=ee("root","__unstableBase"),le=X?te?.site_logo:ne?.site_logo,pe=te?.site_icon,Ie=le&&O(Vg.store).getEntityRecord("postType","attachment",le,{context:"view"}),Ne=!!le&&!O(Vg.store).hasFinishedResolution("getEntityRecord",["postType","attachment",le,{context:"view"}]);return{siteLogoId:le,canUserEdit:X,url:ne?.home,mediaItemData:Ie,isRequestingMediaItem:Ne,siteIconId:pe}},[]),{getSettings:d}=(0,qm.useSelect)(io.store),[f,h]=(0,kc.useState)(),g=q(),{editEntityRecord:b}=(0,qm.useDispatch)(Vg.store),y=(O,J=!1)=>{(i||J)&&k(O),b("root","site",void 0,{site_logo:O})},k=O=>b("root","site",void 0,{site_icon:O??null}),{alt_text:_,source_url:x}=m??{},S=O=>{if(i===void 0){let J=!u;r({shouldSyncIcon:J}),C(O,J);return}C(O)},C=(O,J=!1)=>{if(O){if(!O.id&&O.url){h(O.url),y(void 0);return}y(O.id,J)}},N=()=>{y(null),r({width:void 0})},{createErrorNotice:B}=(0,qm.useDispatch)(Pie.store),D=O=>{B(O,{type:"snackbar"}),h()},A=O=>{d().mediaUpload({allowedTypes:y6,filesList:O,onFileChange([J]){if((0,_M.isBlobURL)(J?.url)){h(J.url);return}S(J)},onError:D,multiple:!1})},H={mediaURL:x,name:x?(0,no.__)("Replace"):(0,no.__)("Choose logo"),onSelect:C,onError:D,onReset:N},F=s&&(0,Ae.jsx)(io.BlockControls,{group:"other",children:(0,Ae.jsx)(io.MediaReplaceFlow,{...H,allowedTypes:y6,variant:"toolbar"})}),z,I=l===void 0||p;I&&(z=(0,Ae.jsx)(Tt.Spinner,{})),(0,kc.useEffect)(()=>{x&&f&&h()},[x,f]),(x||f)&&(z=(0,Ae.jsxs)(Ae.Fragment,{children:[(0,Ae.jsx)(U4e,{alt:_,attributes:e,className:t,isSelected:a,setAttributes:r,logoUrl:f||x,setLogo:y,logoId:m?.id||l,siteUrl:c,setIcon:k,iconId:u,canUserEdit:s}),s&&(0,Ae.jsx)(Tt.DropZone,{onFilesDrop:A})]}));let R=O=>{let J=w("block-editor-media-placeholder",t);return(0,Ae.jsx)(Tt.Placeholder,{className:J,preview:z,withIllustration:!0,style:{width:n},children:O})},$=w(t,{"is-default-size":!n,"is-transient":f}),j=(0,io.useBlockProps)({className:$}),G=(s||x)&&(0,Ae.jsx)(io.InspectorControls,{children:(0,Ae.jsx)(Tt.__experimentalToolsPanel,{label:(0,no.__)("Media"),dropdownMenuProps:g,children:s?(0,Ae.jsx)(Tt.__experimentalToolsPanelItem,{hasValue:()=>!!x,label:(0,no.__)("Logo"),isShownByDefault:!0,children:(0,Ae.jsx)(f4,{mediaId:l,mediaUrl:x,alt:m?.alt_text,filename:m?.media_details?.sizes?.full?.file||m?.slug,allowedTypes:y6,onSelect:C,onError:D,onReset:N,isUploading:!!f,emptyLabel:(0,no.__)("Choose logo")})}):(0,Ae.jsx)("div",{className:"block-library-site-logo__inspector-media-replace-container",style:{gridColumn:"1 / -1"},children:(0,Ae.jsx)(dE,{url:m?.source_url,alt:m?.alt_text,filename:m?.media_details?.sizes?.full?.file||m?.slug,itemGroupProps:{isBordered:!0,className:"block-library-site-logo__inspector-readonly-logo-preview"},className:"block-library-site-logo__inspector-media-replace-title"})})})});return(0,Ae.jsxs)("div",{...j,children:[F,G,(!!x||!!f)&&z,(I||!f&&!x&&!s)&&(0,Ae.jsx)(Tt.Placeholder,{className:"site-logo_placeholder",withIllustration:!0,children:I&&(0,Ae.jsx)("span",{className:"components-placeholder__preview",children:(0,Ae.jsx)(Tt.Spinner,{})})}),!I&&!f&&!x&&s&&(0,Ae.jsx)(io.MediaPlaceholder,{onSelect:S,allowedTypes:y6,onError:D,placeholder:R,mediaLibraryButton:({open:O})=>(0,Ae.jsx)(Tt.Button,{__next40pxDefaultSize:!0,icon:Hc,variant:"primary",label:(0,no.__)("Choose logo"),showTooltip:!0,tooltipPosition:"middle right",onClick:()=>{O()}})})]})}var Iie=o(W(),1),G4e={to:[{type:"block",blocks:["core/site-title"],transform:({isLink:e,linkTarget:t})=>(0,Iie.createBlock)("core/site-title",{isLink:e,linkTarget:t})}]},Nie=G4e;var{name:Eie}=b6,Die={icon:JP,example:{},edit:Bie,transforms:Nie},W4e=()=>E({name:Eie,metadata:b6,settings:Die});var CM={};Z(CM,{init:()=>Z4e,metadata:()=>_6,name:()=>Rie,settings:()=>zie});var _6={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/site-tagline",title:"Site Tagline",category:"theme",description:"Describe in a few words what this site is about. This is important for search results, sharing on social media, and gives overall clarity to visitors.",keywords:["description"],textdomain:"default",attributes:{textAlign:{type:"string"},level:{type:"number",default:0},levelOptions:{type:"array",default:[0,1,2,3,4,5,6]}},example:{viewportWidth:350,attributes:{textAlign:"center"}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},contentRole:!0,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0}},editorStyle:"wp-block-site-tagline-editor",style:"wp-block-site-tagline"};var k6=o(V(),1),kM=o(Q(),1),Cc=o(T(),1),x6=o(P(),1),w6=o(W(),1),wc=o(v(),1);function Lie({attributes:e,setAttributes:t,insertBlocksAfter:r}){let{textAlign:a,level:n,levelOptions:i}=e,{canUserEdit:l,tagline:s}=(0,k6.useSelect)(f=>{let{canUser:h,getEntityRecord:g,getEditedEntityRecord:b}=f(kM.store),y=h("update",{kind:"root",name:"site"}),k=y?b("root","site"):{},_=g("root","__unstableBase");return{canUserEdit:y,tagline:y?k?.description:_?.description}},[]),c=n===0?"p":`h${n}`,{editEntityRecord:u}=(0,k6.useDispatch)(kM.store);function m(f){u("root","site",void 0,{description:f})}let p=(0,Cc.useBlockProps)({className:w({[`has-text-align-${a}`]:a,"wp-block-site-tagline__placeholder":!l&&!s})}),d=l?(0,wc.jsx)(Cc.RichText,{allowedFormats:[],onChange:m,"aria-label":(0,x6.__)("Site tagline text"),placeholder:(0,x6.__)("Write site tagline\u2026"),tagName:c,value:s,disableLineBreaks:!0,__unstableOnSplitAtEnd:()=>r((0,w6.createBlock)((0,w6.getDefaultBlockName)())),...p}):(0,wc.jsx)(c,{...p,children:s||(0,x6.__)("Site Tagline placeholder")});return(0,wc.jsxs)(wc.Fragment,{children:[(0,wc.jsxs)(Cc.BlockControls,{group:"block",children:[(0,wc.jsx)(Cc.HeadingLevelDropdown,{value:n,options:i,onChange:f=>t({level:f})}),(0,wc.jsx)(Cc.AlignmentControl,{onChange:f=>t({textAlign:f}),value:a})]}),d]})}var C6=o(M(),1),wM=o(v(),1),Mie=(0,wM.jsx)(C6.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",children:(0,wM.jsx)(C6.Path,{d:"M4 10.5h16V9H4v1.5ZM4 15h9v-1.5H4V15Z"})});var q4e={attributes:{textAlign:{type:"string"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0}},save(){return null},migrate:Ot,isEligible({style:e}){return e?.typography?.fontFamily}},Aie=[q4e];var{name:Rie}=_6,zie={icon:Mie,edit:Lie,deprecated:Aie},Z4e=()=>E({name:Rie,metadata:_6,settings:zie});var PM={};Z(PM,{init:()=>X4e,metadata:()=>S6,name:()=>jie,settings:()=>Uie});var S6={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/site-title",title:"Site Title",category:"theme",description:"Displays the name of this site. Update the block, and the changes apply everywhere it\u2019s used. This will also appear in the browser title bar and in search results.",textdomain:"default",attributes:{level:{type:"number",default:1},levelOptions:{type:"array",default:[0,1,2,3,4,5,6]},textAlign:{type:"string"},isLink:{type:"boolean",default:!0,role:"content"},linkTarget:{type:"string",default:"_self",role:"content"}},example:{viewportWidth:500},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{padding:!0,margin:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0}},editorStyle:"wp-block-site-title-editor",style:"wp-block-site-title"};var T6=o(V(),1),SM=o(Q(),1),Sc=o(P(),1),qn=o(T(),1),Zm=o(M(),1),P6=o(W(),1),TM=o(Wo(),1);var _o=o(v(),1);function Vie({attributes:e,setAttributes:t,insertBlocksAfter:r}){let{level:a,levelOptions:n,textAlign:i,isLink:l,linkTarget:s}=e,{canUserEdit:c,title:u}=(0,T6.useSelect)(y=>{let{canUser:k,getEntityRecord:_,getEditedEntityRecord:x}=y(SM.store),S=k("update",{kind:"root",name:"site"}),C=S?x("root","site"):{},N=_("root","__unstableBase");return{canUserEdit:S,title:S?C?.title:N?.name}},[]),{editEntityRecord:m}=(0,T6.useDispatch)(SM.store),p=q(),d=(0,qn.useBlockEditingMode)();function f(y){m("root","site",void 0,{title:y.trim()})}let h=a===0?"p":`h${a}`,g=(0,qn.useBlockProps)({className:w({[`has-text-align-${i}`]:i,"wp-block-site-title__placeholder":!c&&!u})}),b=c?(0,_o.jsx)(h,{...g,children:(0,_o.jsx)(qn.RichText,{tagName:l?"a":"span",href:l?"#site-title-pseudo-link":void 0,"aria-label":(0,Sc.__)("Site title text"),placeholder:(0,Sc.__)("Write site title\u2026"),value:u,onChange:f,allowedFormats:[],disableLineBreaks:!0,__unstableOnSplitAtEnd:()=>r((0,P6.createBlock)((0,P6.getDefaultBlockName)()))})}):(0,_o.jsx)(h,{...g,children:l?(0,_o.jsx)("a",{href:"#site-title-pseudo-link",onClick:y=>y.preventDefault(),children:(0,TM.decodeEntities)(u)||(0,Sc.__)("Site Title placeholder")}):(0,_o.jsx)("span",{children:(0,TM.decodeEntities)(u)||(0,Sc.__)("Site Title placeholder")})});return(0,_o.jsxs)(_o.Fragment,{children:[d==="default"&&(0,_o.jsxs)(qn.BlockControls,{group:"block",children:[(0,_o.jsx)(qn.HeadingLevelDropdown,{value:a,options:n,onChange:y=>t({level:y})}),(0,_o.jsx)(qn.AlignmentControl,{value:i,onChange:y=>{t({textAlign:y})}})]}),(0,_o.jsx)(qn.InspectorControls,{children:(0,_o.jsxs)(Zm.__experimentalToolsPanel,{label:(0,Sc.__)("Settings"),resetAll:()=>{t({isLink:!0,linkTarget:"_self"})},dropdownMenuProps:p,children:[(0,_o.jsx)(Zm.__experimentalToolsPanelItem,{hasValue:()=>!l,label:(0,Sc.__)("Make title link to home"),onDeselect:()=>t({isLink:!0}),isShownByDefault:!0,children:(0,_o.jsx)(Zm.ToggleControl,{label:(0,Sc.__)("Make title link to home"),onChange:()=>t({isLink:!l}),checked:l})}),l&&(0,_o.jsx)(Zm.__experimentalToolsPanelItem,{hasValue:()=>s!=="_self",label:(0,Sc.__)("Open in new tab"),onDeselect:()=>t({linkTarget:"_self"}),isShownByDefault:!0,children:(0,_o.jsx)(Zm.ToggleControl,{label:(0,Sc.__)("Open in new tab"),onChange:y=>t({linkTarget:y?"_blank":"_self"}),checked:s==="_blank"})})]})}),b]})}var Q4e={attributes:{level:{type:"number",default:1},textAlign:{type:"string"},isLink:{type:"boolean",default:!0},linkTarget:{type:"string",default:"_self"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0},spacing:{padding:!0,margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0}},save(){return null},migrate:Ot,isEligible({style:e}){return e?.typography?.fontFamily}},Fie=[Q4e];var Hie=o(W(),1),Y4e={to:[{type:"block",blocks:["core/site-logo"],transform:({isLink:e,linkTarget:t})=>(0,Hie.createBlock)("core/site-logo",{isLink:e,linkTarget:t})}]},Oie=Y4e;var{name:jie}=S6,Uie={icon:PT,example:{viewportWidth:350,attributes:{textAlign:"center"}},edit:Vie,transforms:Oie,deprecated:Fie},X4e=()=>E({name:jie,metadata:S6,settings:Uie});var CA={};Z(CA,{init:()=>a3e,metadata:()=>w8,name:()=>Gle,settings:()=>C8});var wA=o(P(),1);var Ule=o(W(),1);var Fg=o(As(),1),k8=o(V(),1),gn=o(T(),1),tf=o(U(),1),lo=o(M(),1),Vle=o(me(),1),Zn=o(P(),1);var Fle=o(W(),1);var kA=o(P(),1);var B6=o(L(),1),BM=o(v(),1),Gie=()=>(0,BM.jsx)(B6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,BM.jsx)(B6.Path,{d:"M13.582,8.182C11.934,8.367,9.78,8.49,8.238,9.166c-1.781,0.769-3.03,2.337-3.03,4.644 c0,2.953,1.86,4.429,4.253,4.429c2.02,0,3.125-0.477,4.685-2.065c0.516,0.747,0.685,1.109,1.629,1.894 c0.212,0.114,0.483,0.103,0.672-0.066l0.006,0.006c0.567-0.505,1.599-1.401,2.18-1.888c0.231-0.188,0.19-0.496,0.009-0.754 c-0.52-0.718-1.072-1.303-1.072-2.634V8.305c0-1.876,0.133-3.599-1.249-4.891C15.23,2.369,13.422,2,12.04,2 C9.336,2,6.318,3.01,5.686,6.351C5.618,6.706,5.877,6.893,6.109,6.945l2.754,0.298C9.121,7.23,9.308,6.977,9.357,6.72 c0.236-1.151,1.2-1.706,2.284-1.706c0.584,0,1.249,0.215,1.595,0.738c0.398,0.584,0.346,1.384,0.346,2.061V8.182z M13.049,14.088 c-0.451,0.8-1.169,1.291-1.967,1.291c-1.09,0-1.728-0.83-1.728-2.061c0-2.42,2.171-2.86,4.227-2.86v0.615 C13.582,12.181,13.608,13.104,13.049,14.088z M20.683,19.339C18.329,21.076,14.917,22,11.979,22c-4.118,0-7.826-1.522-10.632-4.057 c-0.22-0.199-0.024-0.471,0.241-0.317c3.027,1.762,6.771,2.823,10.639,2.823c2.608,0,5.476-0.541,8.115-1.66 C20.739,18.62,21.072,19.051,20.683,19.339z M21.336,21.043c-0.194,0.163-0.379,0.076-0.293-0.139 c0.284-0.71,0.92-2.298,0.619-2.684c-0.301-0.386-1.99-0.183-2.749-0.092c-0.23,0.027-0.266-0.173-0.059-0.319 c1.348-0.946,3.555-0.673,3.811-0.356C22.925,17.773,22.599,19.986,21.336,21.043z"})});var I6=o(L(),1),IM=o(v(),1),Wie=()=>(0,IM.jsx)(I6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,IM.jsx)(I6.Path,{d:"M15.27 17.289 3 17.289 8.73 6.711 21 6.711 15.27 17.289"})});var N6=o(L(),1),NM=o(v(),1),$ie=()=>(0,NM.jsx)(N6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,NM.jsx)(N6.Path,{d:"M7.799,5.698c0.589,0,1.12,0.051,1.606,0.156c0.482,0.102,0.894,0.273,1.241,0.507c0.344,0.235,0.612,0.546,0.804,0.938 c0.188,0.387,0.281,0.871,0.281,1.443c0,0.619-0.141,1.137-0.421,1.551c-0.284,0.413-0.7,0.751-1.255,1.014 c0.756,0.218,1.317,0.601,1.689,1.146c0.374,0.549,0.557,1.205,0.557,1.975c0,0.623-0.12,1.161-0.359,1.612 c-0.241,0.457-0.569,0.828-0.973,1.114c-0.408,0.288-0.876,0.5-1.399,0.637C9.052,17.931,8.514,18,7.963,18H2V5.698H7.799 M7.449,10.668c0.481,0,0.878-0.114,1.192-0.345c0.311-0.228,0.463-0.603,0.463-1.119c0-0.286-0.051-0.523-0.152-0.707 C8.848,8.315,8.711,8.171,8.536,8.07C8.362,7.966,8.166,7.894,7.94,7.854c-0.224-0.044-0.457-0.06-0.697-0.06H4.709v2.874H7.449z M7.6,15.905c0.267,0,0.521-0.024,0.759-0.077c0.243-0.053,0.457-0.137,0.637-0.261c0.182-0.12,0.332-0.283,0.441-0.491 C9.547,14.87,9.6,14.602,9.6,14.278c0-0.633-0.18-1.084-0.533-1.357c-0.356-0.27-0.83-0.404-1.413-0.404H4.709v3.388L7.6,15.905z M16.162,15.864c0.367,0.358,0.897,0.538,1.583,0.538c0.493,0,0.92-0.125,1.277-0.374c0.354-0.248,0.571-0.514,0.654-0.79h2.155 c-0.347,1.072-0.872,1.838-1.589,2.299C19.534,18,18.67,18.23,17.662,18.23c-0.701,0-1.332-0.113-1.899-0.337 c-0.567-0.227-1.041-0.544-1.439-0.958c-0.389-0.415-0.689-0.907-0.904-1.484c-0.213-0.574-0.32-1.21-0.32-1.899 c0-0.666,0.11-1.288,0.329-1.863c0.222-0.577,0.529-1.075,0.933-1.492c0.406-0.42,0.885-0.751,1.444-0.994 c0.558-0.241,1.175-0.363,1.857-0.363c0.754,0,1.414,0.145,1.98,0.44c0.563,0.291,1.026,0.686,1.389,1.181 c0.363,0.493,0.622,1.057,0.783,1.69c0.16,0.632,0.217,1.292,0.171,1.983h-6.428C15.557,14.84,15.795,15.506,16.162,15.864 M18.973,11.184c-0.291-0.321-0.783-0.496-1.384-0.496c-0.39,0-0.714,0.066-0.973,0.2c-0.254,0.132-0.461,0.297-0.621,0.491 c-0.157,0.197-0.265,0.405-0.328,0.628c-0.063,0.217-0.101,0.413-0.111,0.587h3.98C19.478,11.969,19.265,11.509,18.973,11.184z M15.057,7.738h4.985V6.524h-4.985L15.057,7.738z"})});var E6=o(L(),1),EM=o(v(),1),qie=()=>(0,EM.jsx)(E6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,EM.jsx)(E6.Path,{d:"M6.3,4.2c2.3,1.7,4.8,5.3,5.7,7.2.9-1.9,3.4-5.4,5.7-7.2,1.7-1.3,4.3-2.2,4.3.9s-.4,5.2-.6,5.9c-.7,2.6-3.3,3.2-5.6,2.8,4,.7,5.1,3,2.9,5.3-5,5.2-6.7-2.8-6.7-2.8,0,0-1.7,8-6.7,2.8-2.2-2.3-1.2-4.6,2.9-5.3-2.3.4-4.9-.3-5.6-2.8-.2-.7-.6-5.3-.6-5.9,0-3.1,2.7-2.1,4.3-.9h0Z"})});var D6=o(L(),1),DM=o(v(),1),O2=()=>(0,DM.jsx)(D6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,DM.jsx)(D6.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"})});var L6=o(L(),1),LM=o(v(),1),Zie=()=>(0,LM.jsx)(L6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,LM.jsx)(L6.Path,{d:"M22.016,8.84c-0.002-0.013-0.005-0.025-0.007-0.037c-0.005-0.025-0.008-0.048-0.015-0.072 c-0.003-0.015-0.01-0.028-0.013-0.042c-0.008-0.02-0.015-0.04-0.023-0.062c-0.007-0.015-0.013-0.028-0.02-0.042 c-0.008-0.02-0.018-0.037-0.03-0.057c-0.007-0.013-0.017-0.027-0.025-0.038c-0.012-0.018-0.023-0.035-0.035-0.052 c-0.01-0.013-0.02-0.025-0.03-0.037c-0.015-0.017-0.028-0.032-0.043-0.045c-0.01-0.012-0.022-0.023-0.035-0.035 c-0.015-0.015-0.032-0.028-0.048-0.04c-0.012-0.01-0.025-0.02-0.037-0.03c-0.005-0.003-0.01-0.008-0.015-0.012l-9.161-6.096 c-0.289-0.192-0.666-0.192-0.955,0L2.359,8.237C2.354,8.24,2.349,8.245,2.344,8.249L2.306,8.277 c-0.017,0.013-0.033,0.027-0.048,0.04C2.246,8.331,2.234,8.342,2.222,8.352c-0.015,0.015-0.028,0.03-0.042,0.047 c-0.012,0.013-0.022,0.023-0.03,0.037C2.139,8.453,2.125,8.471,2.115,8.488C2.107,8.501,2.099,8.514,2.09,8.526 C2.079,8.548,2.069,8.565,2.06,8.585C2.054,8.6,2.047,8.613,2.04,8.626C2.032,8.648,2.025,8.67,2.019,8.69 c-0.005,0.013-0.01,0.027-0.013,0.042C1.999,8.755,1.995,8.778,1.99,8.803C1.989,8.817,1.985,8.828,1.984,8.84 C1.978,8.879,1.975,8.915,1.975,8.954v6.093c0,0.037,0.003,0.075,0.008,0.112c0.002,0.012,0.005,0.025,0.007,0.038 c0.005,0.023,0.008,0.047,0.015,0.072c0.003,0.015,0.008,0.028,0.013,0.04c0.007,0.022,0.013,0.042,0.022,0.063 c0.007,0.015,0.013,0.028,0.02,0.04c0.008,0.02,0.018,0.038,0.03,0.058c0.007,0.013,0.015,0.027,0.025,0.038 c0.012,0.018,0.023,0.035,0.035,0.052c0.01,0.013,0.02,0.025,0.03,0.037c0.013,0.015,0.028,0.032,0.042,0.045 c0.012,0.012,0.023,0.023,0.035,0.035c0.015,0.013,0.032,0.028,0.048,0.04l0.038,0.03c0.005,0.003,0.01,0.007,0.013,0.01 l9.163,6.095C11.668,21.953,11.833,22,12,22c0.167,0,0.332-0.047,0.478-0.144l9.163-6.095l0.015-0.01 c0.013-0.01,0.027-0.02,0.037-0.03c0.018-0.013,0.035-0.028,0.048-0.04c0.013-0.012,0.025-0.023,0.035-0.035 c0.017-0.015,0.03-0.032,0.043-0.045c0.01-0.013,0.02-0.025,0.03-0.037c0.013-0.018,0.025-0.035,0.035-0.052 c0.008-0.013,0.018-0.027,0.025-0.038c0.012-0.02,0.022-0.038,0.03-0.058c0.007-0.013,0.013-0.027,0.02-0.04 c0.008-0.022,0.015-0.042,0.023-0.063c0.003-0.013,0.01-0.027,0.013-0.04c0.007-0.025,0.01-0.048,0.015-0.072 c0.002-0.013,0.005-0.027,0.007-0.037c0.003-0.042,0.007-0.079,0.007-0.117V8.954C22.025,8.915,22.022,8.879,22.016,8.84z M12.862,4.464l6.751,4.49l-3.016,2.013l-3.735-2.492V4.464z M11.138,4.464v4.009l-3.735,2.494L4.389,8.954L11.138,4.464z M3.699,10.562L5.853,12l-2.155,1.438V10.562z M11.138,19.536l-6.749-4.491l3.015-2.011l3.735,2.492V19.536z M12,14.035L8.953,12 L12,9.966L15.047,12L12,14.035z M12.862,19.536v-4.009l3.735-2.492l3.016,2.011L12.862,19.536z M20.303,13.438L18.147,12 l2.156-1.438L20.303,13.438z"})});var M6=o(L(),1),MM=o(v(),1),Kie=()=>(0,MM.jsx)(M6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,MM.jsx)(M6.Path,{d:"M 18.19 5.636 18.19 2 18.188 2 14.553 2 14.19 2.366 12.474 5.636 11.935 6 5.81 6 5.81 10.994 9.177 10.994 9.477 11.357 5.81 18.363 5.81 22 5.811 22 9.447 22 9.81 21.634 11.526 18.364 12.065 18 18.19 18 18.19 13.006 14.823 13.006 14.523 12.641 18.19 5.636z"})});var A6=o(L(),1),AM=o(v(),1),Qie=()=>(0,AM.jsx)(A6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,AM.jsx)(A6.Path,{d:"M20.317 4.369A19.88 19.88 0 0 0 15.894 3a14.145 14.145 0 0 0-.719 1.518 19.205 19.205 0 0 0-5.351 0A14.183 14.183 0 0 0 9.104 3 19.896 19.896 0 0 0 4.682 4.369a18.921 18.921 0 0 0-3.012 12.52 19.929 19.929 0 0 0 6.081 3.097c.487-.65.922-1.339 1.3-2.061a12.445 12.445 0 0 1-1.958-.896c.165-.12.326-.246.483-.374a12.445 12.445 0 0 0 8.946 0c.157.128.318.253.483.374-.627.371-1.281.683-1.958.896.379.722.813 1.41 1.3 2.061a19.94 19.94 0 0 0 6.081-3.097 18.921 18.921 0 0 0-3.012-12.52ZM8.12 15.233c-1.202 0-2.184-1.09-2.184-2.431 0-1.34.97-2.431 2.184-2.431 1.213 0 2.202 1.09 2.184 2.431 0 1.341-.97 2.431-2.184 2.431Zm7.757 0c-1.202 0-2.184-1.09-2.184-2.431 0-1.34.97-2.431 2.184-2.431 1.213 0 2.202 1.09 2.184 2.431 0 1.341-.97 2.431-2.184 2.431Z"})});var R6=o(L(),1),RM=o(v(),1),Yie=()=>(0,RM.jsx)(R6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,RM.jsx)(R6.Path,{d:"M12,22C6.486,22,2,17.514,2,12S6.486,2,12,2c5.514,0,10,4.486,10,10S17.514,22,12,22z M20.434,13.369 c-0.292-0.092-2.644-0.794-5.32-0.365c1.117,3.07,1.572,5.57,1.659,6.09C18.689,17.798,20.053,15.745,20.434,13.369z M15.336,19.876c-0.127-0.749-0.623-3.361-1.822-6.477c-0.019,0.006-0.038,0.013-0.056,0.019c-4.818,1.679-6.547,5.02-6.701,5.334 c1.448,1.129,3.268,1.803,5.243,1.803C13.183,20.555,14.311,20.313,15.336,19.876z M5.654,17.724 c0.193-0.331,2.538-4.213,6.943-5.637c0.111-0.036,0.224-0.07,0.337-0.102c-0.214-0.485-0.448-0.971-0.692-1.45 c-4.266,1.277-8.405,1.223-8.778,1.216c-0.003,0.087-0.004,0.174-0.004,0.261C3.458,14.207,4.29,16.21,5.654,17.724z M3.639,10.264 c0.382,0.005,3.901,0.02,7.897-1.041c-1.415-2.516-2.942-4.631-3.167-4.94C5.979,5.41,4.193,7.613,3.639,10.264z M9.998,3.709 c0.236,0.316,1.787,2.429,3.187,5c3.037-1.138,4.323-2.867,4.477-3.085C16.154,4.286,14.17,3.471,12,3.471 C11.311,3.471,10.641,3.554,9.998,3.709z M18.612,6.612C18.432,6.855,17,8.69,13.842,9.979c0.199,0.407,0.389,0.821,0.567,1.237 c0.063,0.148,0.124,0.295,0.184,0.441c2.842-0.357,5.666,0.215,5.948,0.275C20.522,9.916,19.801,8.065,18.612,6.612z"})});var z6=o(L(),1),zM=o(v(),1),Xie=()=>(0,zM.jsx)(z6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,zM.jsx)(z6.Path,{d:"M12,6.134L6.069,9.797L2,6.54l5.883-3.843L12,6.134z M2,13.054l5.883,3.843L12,13.459L6.069,9.797L2,13.054z M12,13.459 l4.116,3.439L22,13.054l-4.069-3.257L12,13.459z M22,6.54l-5.884-3.843L12,6.134l5.931,3.663L22,6.54z M12.011,14.2l-4.129,3.426 l-1.767-1.153v1.291l5.896,3.539l5.897-3.539v-1.291l-1.769,1.153L12.011,14.2z"})});var V6=o(L(),1),VM=o(v(),1),Jie=()=>(0,VM.jsx)(V6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,VM.jsx)(V6.Path,{d:"M9.16033,4.038c0-.27174.02717-.43478.48913-.43478h6.22283c1.087,0,1.68478.92391,2.11957,2.663l.35326,1.38587h1.05978C19.59511,3.712,19.75815,2,19.75815,2s-2.663.29891-4.23913.29891h-7.962L3.29076,2.163v1.1413L4.731,3.57609c1.00543.19022,1.25.40761,1.33152,1.33152,0,0,.08152,2.71739.08152,7.20109s-.08152,7.17391-.08152,7.17391c0,.81522-.32609,1.11413-1.33152,1.30435l-1.44022.27174V22l4.2663-.13587h7.11957c1.60326,0,5.32609.13587,5.32609.13587.08152-.97826.625-5.40761.70652-5.89674H19.7038L18.644,18.52174c-.84239,1.90217-2.06522,2.038-3.42391,2.038H11.1712c-1.3587,0-2.01087-.54348-2.01087-1.712V12.65217s3.0163,0,3.99457.08152c.76087.05435,1.22283.27174,1.46739,1.33152l.32609,1.413h1.16848l-.08152-3.55978.163-3.587H15.02989l-.38043,1.57609c-.24457,1.03261-.40761,1.22283-1.46739,1.33152-1.38587.13587-4.02174.1087-4.02174.1087Z"})});var F6=o(L(),1),FM=o(v(),1),ele=()=>(0,FM.jsx)(F6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,FM.jsx)(F6.Path,{d:"M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"})});var H6=o(L(),1),HM=o(v(),1),tle=()=>(0,HM.jsx)(H6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,HM.jsx)(H6.Path,{d:"M2,8.667V12c5.515,0,10,4.485,10,10h3.333C15.333,14.637,9.363,8.667,2,8.667z M2,2v3.333 c9.19,0,16.667,7.477,16.667,16.667H22C22,10.955,13.045,2,2,2z M4.5,17C3.118,17,2,18.12,2,19.5S3.118,22,4.5,22S7,20.88,7,19.5 S5.882,17,4.5,17z"})});var O6=o(L(),1),OM=o(v(),1),rle=()=>(0,OM.jsx)(O6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,OM.jsx)(O6.Path,{d:"M6.94026,15.1412c.00437.01213.108.29862.168.44064a6.55008,6.55008,0,1,0,6.03191-9.09557,6.68654,6.68654,0,0,0-2.58357.51467A8.53914,8.53914,0,0,0,8.21268,8.61344L8.209,8.61725V3.22948l9.0504-.00008c.32934-.0036.32934-.46353.32934-.61466s0-.61091-.33035-.61467L7.47248,2a.43.43,0,0,0-.43131.42692v7.58355c0,.24466.30476.42131.58793.4819.553.11812.68074-.05864.81617-.2457l.018-.02481A10.52673,10.52673,0,0,1,9.32258,9.258a5.35268,5.35268,0,1,1,7.58985,7.54976,5.417,5.417,0,0,1-3.80867,1.56365,5.17483,5.17483,0,0,1-2.69822-.74478l.00342-4.61111a2.79372,2.79372,0,0,1,.71372-1.78792,2.61611,2.61611,0,0,1,1.98282-.89477,2.75683,2.75683,0,0,1,1.95525.79477,2.66867,2.66867,0,0,1,.79656,1.909,2.724,2.724,0,0,1-2.75849,2.748,4.94651,4.94651,0,0,1-.86254-.13719c-.31234-.093-.44519.34058-.48892.48349-.16811.54966.08453.65862.13687.67489a3.75751,3.75751,0,0,0,1.25234.18375,3.94634,3.94634,0,1,0-2.82444-6.742,3.67478,3.67478,0,0,0-1.13028,2.584l-.00041.02323c-.0035.11667-.00579,2.881-.00644,3.78811l-.00407-.00451a6.18521,6.18521,0,0,1-1.0851-1.86092c-.10544-.27856-.34358-.22925-.66857-.12917-.14192.04372-.57386.17677-.47833.489Zm4.65165-1.08338a.51346.51346,0,0,0,.19513.31818l.02276.022a.52945.52945,0,0,0,.3517.18416.24242.24242,0,0,0,.16577-.0611c.05473-.05082.67382-.67812.73287-.738l.69041.68819a.28978.28978,0,0,0,.21437.11032.53239.53239,0,0,0,.35708-.19486c.29792-.30419.14885-.46821.07676-.54751l-.69954-.69975.72952-.73469c.16-.17311.01874-.35708-.12218-.498-.20461-.20461-.402-.25742-.52855-.14083l-.7254.72665-.73354-.73375a.20128.20128,0,0,0-.14179-.05695.54135.54135,0,0,0-.34379.19648c-.22561.22555-.274.38149-.15656.5059l.73374.7315-.72942.73072A.26589.26589,0,0,0,11.59191,14.05782Zm1.59866-9.915A8.86081,8.86081,0,0,0,9.854,4.776a.26169.26169,0,0,0-.16938.22759.92978.92978,0,0,0,.08619.42094c.05682.14524.20779.531.50006.41955a8.40969,8.40969,0,0,1,2.91968-.55484,7.87875,7.87875,0,0,1,3.086.62286,8.61817,8.61817,0,0,1,2.30562,1.49315.2781.2781,0,0,0,.18318.07586c.15529,0,.30425-.15253.43167-.29551.21268-.23861.35873-.4369.1492-.63538a8.50425,8.50425,0,0,0-2.62312-1.694A9.0177,9.0177,0,0,0,13.19058,4.14283ZM19.50945,18.6236h0a.93171.93171,0,0,0-.36642-.25406.26589.26589,0,0,0-.27613.06613l-.06943.06929A7.90606,7.90606,0,0,1,7.60639,18.505a7.57284,7.57284,0,0,1-1.696-2.51537,8.58715,8.58715,0,0,1-.5147-1.77754l-.00871-.04864c-.04939-.25873-.28755-.27684-.62981-.22448-.14234.02178-.5755.088-.53426.39969l.001.00712a9.08807,9.08807,0,0,0,15.406,4.99094c.00193-.00192.04753-.04718.0725-.07436C19.79425,19.16234,19.87422,18.98728,19.50945,18.6236Z"})});var j6=o(L(),1),jM=o(v(),1),ole=()=>(0,jM.jsx)(j6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,jM.jsx)(j6.Path,{d:"M6.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5S9.25,7,6.5,7z M17.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5 S20.25,7,17.5,7z"})});var U6=o(L(),1),UM=o(v(),1),ale=()=>(0,UM.jsx)(U6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,UM.jsx)(U6.Path,{d:"M17.573,2c0,0-9.197,0-10.668,0S5,3.107,5,3.805s0,16.948,0,16.948c0,0.785,0.422,1.077,0.66,1.172 c0.238,0.097,0.892,0.177,1.285-0.275c0,0,5.035-5.843,5.122-5.93c0.132-0.132,0.132-0.132,0.262-0.132h3.26 c1.368,0,1.588-0.977,1.732-1.552c0.078-0.318,0.692-3.428,1.225-6.122l0.675-3.368C19.56,2.893,19.14,2,17.573,2z M16.495,7.22 c-0.053,0.252-0.372,0.518-0.665,0.518c-0.293,0-4.157,0-4.157,0c-0.467,0-0.802,0.318-0.802,0.787v0.508 c0,0.467,0.337,0.798,0.805,0.798c0,0,3.197,0,3.528,0s0.655,0.362,0.583,0.715c-0.072,0.353-0.407,2.102-0.448,2.295 c-0.04,0.193-0.262,0.523-0.655,0.523c-0.33,0-2.88,0-2.88,0c-0.523,0-0.683,0.068-1.033,0.503 c-0.35,0.437-3.505,4.223-3.505,4.223c-0.032,0.035-0.063,0.027-0.063-0.015V4.852c0-0.298,0.26-0.648,0.648-0.648 c0,0,8.228,0,8.562,0c0.315,0,0.61,0.297,0.528,0.683L16.495,7.22z"})});var G6=o(L(),1),GM=o(v(),1),nle=()=>(0,GM.jsx)(G6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,GM.jsx)(G6.Path,{d:"M17.3,17.5c-0.2,0.8-0.5,1.4-1,1.9c-0.4,0.5-1,0.9-1.7,1.2C13.9,20.9,13.1,21,12,21c-0.6,0-1.3-0.1-1.9-0.2 c-0.6-0.1-1.1-0.4-1.6-0.7c-0.5-0.3-0.9-0.7-1.2-1.2c-0.3-0.5-0.5-1.1-0.5-1.7h1.5c0.1,0.5,0.2,0.9,0.5,1.2 c0.2,0.3,0.5,0.6,0.9,0.8c0.3,0.2,0.7,0.3,1.1,0.4c0.4,0.1,0.8,0.1,1.2,0.1c1.4,0,2.5-0.4,3.1-1.2c0.6-0.8,1-2,1-3.5v-1.7h0 c-0.4,0.8-0.9,1.4-1.6,1.9c-0.7,0.5-1.5,0.7-2.4,0.7c-1,0-1.9-0.2-2.6-0.5C8.7,15,8.1,14.5,7.7,14c-0.5-0.6-0.8-1.3-1-2.1 c-0.2-0.8-0.3-1.6-0.3-2.5c0-0.9,0.1-1.7,0.4-2.5c0.3-0.8,0.6-1.5,1.1-2c0.5-0.6,1.1-1,1.8-1.4C10.3,3.2,11.1,3,12,3 c0.5,0,0.9,0.1,1.3,0.2c0.4,0.1,0.8,0.3,1.1,0.5c0.3,0.2,0.6,0.5,0.9,0.8c0.3,0.3,0.5,0.6,0.6,1h0V3.4h1.5V15 C17.6,15.9,17.5,16.7,17.3,17.5z M13.8,14.1c0.5-0.3,0.9-0.7,1.3-1.1c0.3-0.5,0.6-1,0.8-1.6c0.2-0.6,0.3-1.2,0.3-1.9 c0-0.6-0.1-1.2-0.2-1.9c-0.1-0.6-0.4-1.2-0.7-1.7c-0.3-0.5-0.7-0.9-1.3-1.2c-0.5-0.3-1.1-0.5-1.9-0.5s-1.4,0.2-1.9,0.5 c-0.5,0.3-1,0.7-1.3,1.2C8.5,6.4,8.3,7,8.1,7.6C8,8.2,7.9,8.9,7.9,9.5c0,0.6,0.1,1.3,0.2,1.9C8.3,12,8.6,12.5,8.9,13 c0.3,0.5,0.8,0.8,1.3,1.1c0.5,0.3,1.1,0.4,1.9,0.4C12.7,14.5,13.3,14.4,13.8,14.1z"})});var W6=o(L(),1),WM=o(v(),1),ile=()=>(0,WM.jsx)(W6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,WM.jsx)(W6.Path,{d:"M12.02,10.18v3.72v0.01h5.51c-0.26,1.57-1.67,4.22-5.5,4.22c-3.31,0-6.01-2.75-6.01-6.12s2.7-6.12,6.01-6.12 c1.87,0,3.13,0.8,3.85,1.48l2.84-2.76C16.99,2.99,14.73,2,12.03,2c-5.52,0-10,4.48-10,10s4.48,10,10,10c5.77,0,9.6-4.06,9.6-9.77 c0-0.83-0.11-1.42-0.25-2.05H12.02z"})});var $6=o(L(),1),$M=o(v(),1),lle=()=>(0,$M.jsx)($6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,$M.jsx)($6.Path,{d:"M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"})});var q6=o(L(),1),qM=o(v(),1),sle=()=>(0,qM.jsx)(q6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,qM.jsx)(q6.Path,{d:"M10.8001 4.69937V10.6494C10.8001 11.1001 10.9791 11.5323 11.2978 11.851C11.6165 12.1697 12.0487 12.3487 12.4994 12.3487C12.9501 12.3487 13.3824 12.1697 13.7011 11.851C14.0198 11.5323 14.1988 11.1001 14.1988 10.6494V6.69089C15.2418 7.05861 16.1371 7.75537 16.7496 8.67617C17.3622 9.59698 17.6589 10.6919 17.595 11.796C17.5311 12.9001 17.1101 13.9535 16.3954 14.7975C15.6807 15.6415 14.711 16.2303 13.6325 16.4753C12.5541 16.7202 11.4252 16.608 10.4161 16.1555C9.40691 15.703 8.57217 14.9348 8.03763 13.9667C7.50308 12.9985 7.29769 11.8828 7.45242 10.7877C7.60714 9.69266 8.11359 8.67755 8.89545 7.89537C9.20904 7.57521 9.38364 7.14426 9.38132 6.69611C9.37899 6.24797 9.19994 5.81884 8.88305 5.50195C8.56616 5.18506 8.13704 5.00601 7.68889 5.00369C7.24075 5.00137 6.80979 5.17597 6.48964 5.48956C5.09907 6.8801 4.23369 8.7098 4.04094 10.6669C3.84819 12.624 4.34 14.5873 5.43257 16.2224C6.52515 17.8575 8.15088 19.0632 10.0328 19.634C11.9146 20.2049 13.9362 20.1055 15.753 19.3529C17.5699 18.6003 19.0695 17.241 19.9965 15.5066C20.9234 13.7722 21.2203 11.7701 20.8366 9.84133C20.4528 7.91259 19.4122 6.17658 17.892 4.92911C16.3717 3.68163 14.466 2.99987 12.4994 3C12.0487 3 11.6165 3.17904 11.2978 3.49773C10.9791 3.81643 10.8001 4.24867 10.8001 4.69937Z"})});var Z6=o(L(),1),ZM=o(v(),1),cle=()=>(0,ZM.jsx)(Z6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,ZM.jsx)(Z6.Path,{d:"M12,4.622c2.403,0,2.688,0.009,3.637,0.052c0.877,0.04,1.354,0.187,1.671,0.31c0.42,0.163,0.72,0.358,1.035,0.673 c0.315,0.315,0.51,0.615,0.673,1.035c0.123,0.317,0.27,0.794,0.31,1.671c0.043,0.949,0.052,1.234,0.052,3.637 s-0.009,2.688-0.052,3.637c-0.04,0.877-0.187,1.354-0.31,1.671c-0.163,0.42-0.358,0.72-0.673,1.035 c-0.315,0.315-0.615,0.51-1.035,0.673c-0.317,0.123-0.794,0.27-1.671,0.31c-0.949,0.043-1.233,0.052-3.637,0.052 s-2.688-0.009-3.637-0.052c-0.877-0.04-1.354-0.187-1.671-0.31c-0.42-0.163-0.72-0.358-1.035-0.673 c-0.315-0.315-0.51-0.615-0.673-1.035c-0.123-0.317-0.27-0.794-0.31-1.671C4.631,14.688,4.622,14.403,4.622,12 s0.009-2.688,0.052-3.637c0.04-0.877,0.187-1.354,0.31-1.671c0.163-0.42,0.358-0.72,0.673-1.035 c0.315-0.315,0.615-0.51,1.035-0.673c0.317-0.123,0.794-0.27,1.671-0.31C9.312,4.631,9.597,4.622,12,4.622 M12,3 C9.556,3,9.249,3.01,8.289,3.054C7.331,3.098,6.677,3.25,6.105,3.472C5.513,3.702,5.011,4.01,4.511,4.511 c-0.5,0.5-0.808,1.002-1.038,1.594C3.25,6.677,3.098,7.331,3.054,8.289C3.01,9.249,3,9.556,3,12c0,2.444,0.01,2.751,0.054,3.711 c0.044,0.958,0.196,1.612,0.418,2.185c0.23,0.592,0.538,1.094,1.038,1.594c0.5,0.5,1.002,0.808,1.594,1.038 c0.572,0.222,1.227,0.375,2.185,0.418C9.249,20.99,9.556,21,12,21s2.751-0.01,3.711-0.054c0.958-0.044,1.612-0.196,2.185-0.418 c0.592-0.23,1.094-0.538,1.594-1.038c0.5-0.5,0.808-1.002,1.038-1.594c0.222-0.572,0.375-1.227,0.418-2.185 C20.99,14.751,21,14.444,21,12s-0.01-2.751-0.054-3.711c-0.044-0.958-0.196-1.612-0.418-2.185c-0.23-0.592-0.538-1.094-1.038-1.594 c-0.5-0.5-1.002-0.808-1.594-1.038c-0.572-0.222-1.227-0.375-2.185-0.418C14.751,3.01,14.444,3,12,3L12,3z M12,7.378 c-2.552,0-4.622,2.069-4.622,4.622S9.448,16.622,12,16.622s4.622-2.069,4.622-4.622S14.552,7.378,12,7.378z M12,15 c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3S13.657,15,12,15z M16.804,6.116c-0.596,0-1.08,0.484-1.08,1.08 s0.484,1.08,1.08,1.08c0.596,0,1.08-0.484,1.08-1.08S17.401,6.116,16.804,6.116z"})});var K6=o(L(),1),KM=o(v(),1),ule=()=>(0,KM.jsx)(K6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,KM.jsx)(K6.Path,{d:"M 12.0002 1.5 C 6.2006 1.5 1.5 6.2011 1.5 11.9998 C 1.5 17.799 6.2006 22.5 12.0002 22.5 C 17.799 22.5 22.5 17.799 22.5 11.9998 C 22.5 6.2011 17.799 1.5 12.0002 1.5 Z M 16.1974 16.2204 C 14.8164 16.2152 13.9346 15.587 13.3345 14.1859 L 13.1816 13.8451 L 11.8541 10.8101 C 11.4271 9.7688 10.3526 9.0712 9.1801 9.0712 C 7.5695 9.0712 6.2593 10.3851 6.2593 12.001 C 6.2593 13.6165 7.5695 14.9303 9.1801 14.9303 C 10.272 14.9303 11.2651 14.3275 11.772 13.3567 C 11.7893 13.3235 11.8239 13.302 11.863 13.3038 C 11.9007 13.3054 11.9353 13.3288 11.9504 13.3632 L 12.4865 14.6046 C 12.5016 14.639 12.4956 14.6778 12.4723 14.7069 C 11.6605 15.6995 10.4602 16.2683 9.1801 16.2683 C 6.8331 16.2683 4.9234 14.3536 4.9234 12.001 C 4.9234 9.6468 6.833 7.732 9.1801 7.732 C 10.9572 7.732 12.3909 8.6907 13.1138 10.3636 C 13.1206 10.3802 13.8412 12.0708 14.4744 13.5191 C 14.8486 14.374 15.1462 14.896 16.1288 14.9292 C 17.0663 14.9613 17.7538 14.4122 17.7538 13.6485 C 17.7538 12.9691 17.3321 12.8004 16.3803 12.4822 C 14.7365 11.9398 13.845 11.3861 13.845 10.0182 C 13.845 8.6809 14.7667 7.8162 16.192 7.8162 C 17.1288 7.8162 17.8155 8.2287 18.2921 9.0768 C 18.305 9.1006 18.3079 9.1281 18.3004 9.1542 C 18.2929 9.1803 18.2748 9.2021 18.2507 9.2138 L 17.3614 9.669 C 17.3178 9.692 17.2643 9.6781 17.2356 9.6385 C 16.9329 9.2135 16.5956 9.0251 16.1423 9.0251 C 15.5512 9.0251 15.122 9.429 15.122 9.9865 C 15.122 10.6738 15.6529 10.8414 16.5339 11.1192 C 16.6491 11.1558 16.7696 11.194 16.8939 11.2343 C 18.2763 11.6865 19.0768 12.2311 19.0768 13.6836 C 19.0769 15.1297 17.8389 16.2204 16.1974 16.2204 Z"})});var Q6=o(L(),1),QM=o(v(),1),mle=()=>(0,QM.jsx)(Q6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,QM.jsx)(Q6.Path,{d:"M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"})});var Y6=o(L(),1),YM=o(v(),1),ple=()=>(0,YM.jsx)(Y6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,YM.jsx)(Y6.Path,{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-.5V9.8l7.5 5.6 7.5-5.6V17zm0-9.1L12 13.6 4.5 7.9V7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v.9z"})});var X6=o(L(),1),XM=o(v(),1),dle=()=>(0,XM.jsx)(X6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,XM.jsx)(X6.Path,{d:"M23.193 7.879c0-5.206-3.411-6.732-3.411-6.732C18.062.357 15.108.025 12.041 0h-.076c-3.068.025-6.02.357-7.74 1.147 0 0-3.411 1.526-3.411 6.732 0 1.192-.023 2.618.015 4.129.124 5.092.934 10.109 5.641 11.355 2.17.574 4.034.695 5.535.612 2.722-.15 4.25-.972 4.25-.972l-.09-1.975s-1.945.613-4.129.539c-2.165-.074-4.449-.233-4.799-2.891a5.499 5.499 0 0 1-.048-.745s2.125.52 4.817.643c1.646.075 3.19-.097 4.758-.283 3.007-.359 5.625-2.212 5.954-3.905.517-2.665.475-6.507.475-6.507zm-4.024 6.709h-2.497V8.469c0-1.29-.543-1.944-1.628-1.944-1.2 0-1.802.776-1.802 2.312v3.349h-2.483v-3.35c0-1.536-.602-2.312-1.802-2.312-1.085 0-1.628.655-1.628 1.944v6.119H4.832V8.284c0-1.289.328-2.313.987-3.07.68-.758 1.569-1.146 2.674-1.146 1.278 0 2.246.491 2.886 1.474L12 6.585l.622-1.043c.64-.983 1.608-1.474 2.886-1.474 1.104 0 1.994.388 2.674 1.146.658.757.986 1.781.986 3.07v6.304z"})});var J6=o(L(),1),JM=o(v(),1),fle=()=>(0,JM.jsx)(J6.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,JM.jsx)(J6.Path,{d:"M19.24775,14.722a3.57032,3.57032,0,0,1-2.94457,3.52073,3.61886,3.61886,0,0,1-.64652.05634c-.07314-.0008-.10187.02846-.12507.09547A2.38881,2.38881,0,0,1,13.49453,20.094a2.33092,2.33092,0,0,1-1.827-.50716.13635.13635,0,0,0-.19878-.00408,3.191,3.191,0,0,1-2.104.60248,3.26309,3.26309,0,0,1-3.00324-2.71993,2.19076,2.19076,0,0,1-.03512-.30865c-.00156-.08579-.03413-.1189-.11608-.13493a2.86421,2.86421,0,0,1-1.23189-.56111,2.945,2.945,0,0,1-1.166-2.05749,2.97484,2.97484,0,0,1,.87524-2.50774.112.112,0,0,0,.02091-.16107,2.7213,2.7213,0,0,1-.36648-1.48A2.81256,2.81256,0,0,1,6.57673,7.58838a.35764.35764,0,0,0,.28869-.22819,4.2208,4.2208,0,0,1,6.02892-1.90111.25161.25161,0,0,0,.22023.0243,3.65608,3.65608,0,0,1,3.76031.90678A3.57244,3.57244,0,0,1,17.95918,8.626a2.97339,2.97339,0,0,1,.01829.57356.10637.10637,0,0,0,.0853.12792,1.97669,1.97669,0,0,1,1.27939,1.33733,2.00266,2.00266,0,0,1-.57112,2.12652c-.05284.05166-.04168.08328-.01173.13489A3.51189,3.51189,0,0,1,19.24775,14.722Zm-6.35959-.27836a1.6984,1.6984,0,0,0,1.14556,1.61113,3.82039,3.82039,0,0,0,1.036.17935,1.46888,1.46888,0,0,0,.73509-.12255.44082.44082,0,0,0,.26057-.44274.45312.45312,0,0,0-.29211-.43375.97191.97191,0,0,0-.20678-.063c-.21326-.03806-.42754-.0701-.63973-.11215a.54787.54787,0,0,1-.50172-.60926,2.75864,2.75864,0,0,1,.1773-.901c.1763-.535.414-1.045.64183-1.55913A12.686,12.686,0,0,0,15.85,10.47863a1.58461,1.58461,0,0,0,.04861-.87208,1.04531,1.04531,0,0,0-.85432-.83981,1.60658,1.60658,0,0,0-1.23654.16594.27593.27593,0,0,1-.36286-.03413c-.085-.0747-.16594-.15379-.24918-.23055a.98682.98682,0,0,0-1.33577-.04933,6.1468,6.1468,0,0,1-.4989.41615.47762.47762,0,0,1-.51535.03566c-.17448-.09307-.35512-.175-.53531-.25665a1.74949,1.74949,0,0,0-.56476-.2016,1.69943,1.69943,0,0,0-1.61654.91787,8.05815,8.05815,0,0,0-.32952.80126c-.45471,1.2557-.82507,2.53825-1.20838,3.81639a1.24151,1.24151,0,0,0,.51532,1.44389,1.42659,1.42659,0,0,0,1.22008.17166,1.09728,1.09728,0,0,0,.66994-.69764c.44145-1.04111.839-2.09989,1.25981-3.14926.11581-.28876.22792-.57874.35078-.86438a.44548.44548,0,0,1,.69189-.19539.50521.50521,0,0,1,.15044.43836,1.75625,1.75625,0,0,1-.14731.50453c-.27379.69219-.55265,1.38236-.82766,2.074a2.0836,2.0836,0,0,0-.14038.42876.50719.50719,0,0,0,.27082.57722.87236.87236,0,0,0,.66145.02739.99137.99137,0,0,0,.53406-.532q.61571-1.20914,1.228-2.42031.28423-.55863.57585-1.1133a.87189.87189,0,0,1,.29055-.35253.34987.34987,0,0,1,.37634-.01265.30291.30291,0,0,1,.12434.31459.56716.56716,0,0,1-.04655.1915c-.05318.12739-.10286.25669-.16183.38156-.34118.71775-.68754,1.43273-1.02568,2.152A2.00213,2.00213,0,0,0,12.88816,14.44366Zm4.78568,5.28972a.88573.88573,0,0,0-1.77139.00465.8857.8857,0,0,0,1.77139-.00465Zm-14.83838-7.296a.84329.84329,0,1,0,.00827-1.68655.8433.8433,0,0,0-.00827,1.68655Zm10.366-9.43673a.83506.83506,0,1,0-.0091,1.67.83505.83505,0,0,0,.0091-1.67Zm6.85014,5.22a.71651.71651,0,0,0-1.433.0093.71656.71656,0,0,0,1.433-.0093ZM5.37528,6.17908A.63823.63823,0,1,0,6.015,5.54483.62292.62292,0,0,0,5.37528,6.17908Zm6.68214,14.80843a.54949.54949,0,1,0-.55052.541A.54556.54556,0,0,0,12.05742,20.98752Zm8.53235-8.49689a.54777.54777,0,0,0-.54027.54023.53327.53327,0,0,0,.532.52293.51548.51548,0,0,0,.53272-.5237A.53187.53187,0,0,0,20.58977,12.49063ZM7.82846,2.4715a.44927.44927,0,1,0,.44484.44766A.43821.43821,0,0,0,7.82846,2.4715Zm13.775,7.60492a.41186.41186,0,0,0-.40065.39623.40178.40178,0,0,0,.40168.40168A.38994.38994,0,0,0,22,10.48172.39946.39946,0,0,0,21.60349,10.07642ZM5.79193,17.96207a.40469.40469,0,0,0-.397-.39646.399.399,0,0,0-.396.405.39234.39234,0,0,0,.39939.389A.39857.39857,0,0,0,5.79193,17.96207Z"})});var e8=o(L(),1),eA=o(v(),1),hle=()=>(0,eA.jsx)(e8.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,eA.jsx)(e8.Path,{d:"M13.2,12c0,3-2.4,5.4-5.3,5.4S2.6,15,2.6,12s2.4-5.4,5.3-5.4S13.2,9,13.2,12 M19.1,12c0,2.8-1.2,5-2.7,5s-2.7-2.3-2.7-5s1.2-5,2.7-5C17.9,7,19.1,9.2,19.1,12 M21.4,12c0,2.5-0.4,4.5-0.9,4.5c-0.5,0-0.9-2-0.9-4.5s0.4-4.5,0.9-4.5C21,7.5,21.4,9.5,21.4,12"})});var t8=o(L(),1),tA=o(v(),1),gle=()=>(0,tA.jsx)(t8.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,tA.jsx)(t8.Path,{d:"M20 8.40755C19.9969 6.10922 18.2543 4.22555 16.2097 3.54588C13.6708 2.70188 10.3222 2.82421 7.89775 3.99921C4.95932 5.42355 4.03626 8.54355 4.00186 11.6552C3.97363 14.2136 4.2222 20.9517 7.92225 20.9997C10.6715 21.0356 11.0809 17.3967 12.3529 15.6442C13.258 14.3974 14.4233 14.0452 15.8578 13.6806C18.3233 13.0537 20.0036 11.0551 20 8.40755Z"})});var r8=o(L(),1),rA=o(v(),1),vle=()=>(0,rA.jsx)(r8.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,rA.jsx)(r8.Path,{d:"M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2"})});var o8=o(L(),1),oA=o(v(),1),ble=()=>(0,oA.jsx)(o8.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,oA.jsx)(o8.Path,{d:"M21.927,4.194C21.667,3.48,20.982,3,20.222,3h-0.01h-1.721H3.839C3.092,3,2.411,3.47,2.145,4.17 C2.066,4.378,2.026,4.594,2.026,4.814v6.035l0.069,1.2c0.29,2.73,1.707,5.115,3.899,6.778c0.039,0.03,0.079,0.059,0.119,0.089 l0.025,0.018c1.175,0.859,2.491,1.441,3.91,1.727c0.655,0.132,1.325,0.2,1.991,0.2c0.615,0,1.232-0.057,1.839-0.17 c0.073-0.014,0.145-0.028,0.219-0.044c0.02-0.004,0.042-0.012,0.064-0.023c1.359-0.297,2.621-0.864,3.753-1.691l0.025-0.018 c0.04-0.029,0.08-0.058,0.119-0.089c2.192-1.664,3.609-4.049,3.898-6.778l0.069-1.2V4.814C22.026,4.605,22,4.398,21.927,4.194z M17.692,10.481l-4.704,4.512c-0.266,0.254-0.608,0.382-0.949,0.382c-0.342,0-0.684-0.128-0.949-0.382l-4.705-4.512 C5.838,9.957,5.82,9.089,6.344,8.542c0.524-0.547,1.392-0.565,1.939-0.04l3.756,3.601l3.755-3.601 c0.547-0.524,1.415-0.506,1.939,0.04C18.256,9.089,18.238,9.956,17.692,10.481z"})});var a8=o(L(),1),aA=o(v(),1),yle=()=>(0,aA.jsx)(a8.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,aA.jsx)(a8.Path,{d:"M5.27 9.221A2.775 2.775 0 0 0 2.498 11.993a2.785 2.785 0 0 0 1.6 2.511 5.337 5.337 0 0 0 2.374 4.11 9.386 9.386 0 0 0 5.539 1.7 9.386 9.386 0 0 0 5.541-1.7 5.331 5.331 0 0 0 2.372-4.114 2.787 2.787 0 0 0 1.583-2.5 2.775 2.775 0 0 0-2.772-2.772 2.742 2.742 0 0 0-1.688.574 9.482 9.482 0 0 0-4.637-1.348v-.008a2.349 2.349 0 0 1 2.011-2.316 1.97 1.97 0 0 0 1.926 1.521 1.98 1.98 0 0 0 1.978-1.978 1.98 1.98 0 0 0-1.978-1.978 1.985 1.985 0 0 0-1.938 1.578 3.183 3.183 0 0 0-2.849 3.172v.011a9.463 9.463 0 0 0-4.59 1.35 2.741 2.741 0 0 0-1.688-.574Zm6.736 9.1a3.162 3.162 0 0 1-2.921-1.944.215.215 0 0 1 .014-.2.219.219 0 0 1 .168-.106 27.327 27.327 0 0 1 2.74-.133 27.357 27.357 0 0 1 2.74.133.219.219 0 0 1 .168.106.215.215 0 0 1 .014.2 3.158 3.158 0 0 1-2.921 1.944Zm3.743-3.157a1.265 1.265 0 0 1-1.4-1.371 1.954 1.954 0 0 1 .482-1.442 1.15 1.15 0 0 1 .842-.379 1.7 1.7 0 0 1 1.49 1.777 1.323 1.323 0 0 1-.325 1.015 1.476 1.476 0 0 1-1.089.4Zm-7.485 0a1.476 1.476 0 0 1-1.086-.4 1.323 1.323 0 0 1-.325-1.016 1.7 1.7 0 0 1 1.49-1.777 1.151 1.151 0 0 1 .843.379 1.951 1.951 0 0 1 .481 1.441 1.276 1.276 0 0 1-1.403 1.373Z"})});var n8=o(L(),1),nA=o(v(),1),_le=()=>(0,nA.jsx)(n8.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,nA.jsx)(n8.Path,{d:"M10.113,2.699c0.033-0.006,0.067-0.013,0.1-0.02c0.033,0.017,0.066,0.033,0.098,0.051L10.113,2.699z M2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223z M21.275,13.771 c0.007-0.035,0.011-0.071,0.018-0.106c-0.018-0.031-0.033-0.064-0.052-0.095L21.275,13.771z M13.563,21.199 c0.032,0.019,0.065,0.035,0.096,0.053c0.036-0.006,0.071-0.011,0.105-0.017L13.563,21.199z M22,16.386 c0,1.494-0.581,2.898-1.637,3.953c-1.056,1.057-2.459,1.637-3.953,1.637c-0.967,0-1.914-0.251-2.75-0.725 c0.036-0.006,0.071-0.011,0.105-0.017l-0.202-0.035c0.032,0.019,0.065,0.035,0.096,0.053c-0.543,0.096-1.099,0.147-1.654,0.147 c-1.275,0-2.512-0.25-3.676-0.743c-1.125-0.474-2.135-1.156-3.002-2.023c-0.867-0.867-1.548-1.877-2.023-3.002 c-0.493-1.164-0.743-2.401-0.743-3.676c0-0.546,0.049-1.093,0.142-1.628c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103C2.244,9.5,2,8.566,2,7.615c0-1.493,0.582-2.898,1.637-3.953 c1.056-1.056,2.46-1.638,3.953-1.638c0.915,0,1.818,0.228,2.622,0.655c-0.033,0.007-0.067,0.013-0.1,0.02l0.199,0.031 c-0.032-0.018-0.066-0.034-0.098-0.051c0.002,0,0.003-0.001,0.004-0.001c0.586-0.112,1.187-0.169,1.788-0.169 c1.275,0,2.512,0.249,3.676,0.742c1.124,0.476,2.135,1.156,3.002,2.024c0.868,0.867,1.548,1.877,2.024,3.002 c0.493,1.164,0.743,2.401,0.743,3.676c0,0.575-0.054,1.15-0.157,1.712c-0.018-0.031-0.033-0.064-0.052-0.095l0.034,0.201 c0.007-0.035,0.011-0.071,0.018-0.106C21.754,14.494,22,15.432,22,16.386z M16.817,14.138c0-1.331-0.613-2.743-3.033-3.282 l-2.209-0.49c-0.84-0.192-1.807-0.444-1.807-1.237c0-0.794,0.679-1.348,1.903-1.348c2.468,0,2.243,1.696,3.468,1.696 c0.645,0,1.209-0.379,1.209-1.031c0-1.521-2.435-2.663-4.5-2.663c-2.242,0-4.63,0.952-4.63,3.488c0,1.221,0.436,2.521,2.839,3.123 l2.984,0.745c0.903,0.223,1.129,0.731,1.129,1.189c0,0.762-0.758,1.507-2.129,1.507c-2.679,0-2.307-2.062-3.743-2.062 c-0.645,0-1.113,0.444-1.113,1.078c0,1.236,1.501,2.886,4.856,2.886C15.236,17.737,16.817,16.199,16.817,14.138z"})});var i8=o(L(),1),iA=o(v(),1),xle=()=>(0,iA.jsx)(i8.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,iA.jsx)(i8.Path,{d:"M12.065,2a5.526,5.526,0,0,1,3.132.892A5.854,5.854,0,0,1,17.326,5.4a5.821,5.821,0,0,1,.351,2.33q0,.612-.117,2.487a.809.809,0,0,0,.365.091,1.93,1.93,0,0,0,.664-.176,1.93,1.93,0,0,1,.664-.176,1.3,1.3,0,0,1,.729.234.7.7,0,0,1,.351.6.839.839,0,0,1-.41.7,2.732,2.732,0,0,1-.9.41,3.192,3.192,0,0,0-.9.378.728.728,0,0,0-.41.618,1.575,1.575,0,0,0,.156.56,6.9,6.9,0,0,0,1.334,1.953,5.6,5.6,0,0,0,1.881,1.315,5.875,5.875,0,0,0,1.042.3.42.42,0,0,1,.365.456q0,.911-2.852,1.341a1.379,1.379,0,0,0-.143.507,1.8,1.8,0,0,1-.182.605.451.451,0,0,1-.429.241,5.878,5.878,0,0,1-.807-.085,5.917,5.917,0,0,0-.833-.085,4.217,4.217,0,0,0-.807.065,2.42,2.42,0,0,0-.82.293,6.682,6.682,0,0,0-.755.5q-.351.267-.755.527a3.886,3.886,0,0,1-.989.436A4.471,4.471,0,0,1,11.831,22a4.307,4.307,0,0,1-1.256-.176,3.784,3.784,0,0,1-.976-.436q-.4-.26-.749-.527a6.682,6.682,0,0,0-.755-.5,2.422,2.422,0,0,0-.807-.293,4.432,4.432,0,0,0-.82-.065,5.089,5.089,0,0,0-.853.1,5,5,0,0,1-.762.1.474.474,0,0,1-.456-.241,1.819,1.819,0,0,1-.182-.618,1.411,1.411,0,0,0-.143-.521q-2.852-.429-2.852-1.341a.42.42,0,0,1,.365-.456,5.793,5.793,0,0,0,1.042-.3,5.524,5.524,0,0,0,1.881-1.315,6.789,6.789,0,0,0,1.334-1.953A1.575,1.575,0,0,0,6,12.9a.728.728,0,0,0-.41-.618,3.323,3.323,0,0,0-.9-.384,2.912,2.912,0,0,1-.9-.41.814.814,0,0,1-.41-.684.71.71,0,0,1,.338-.593,1.208,1.208,0,0,1,.716-.241,1.976,1.976,0,0,1,.625.169,2.008,2.008,0,0,0,.69.169.919.919,0,0,0,.416-.091q-.117-1.849-.117-2.474A5.861,5.861,0,0,1,6.385,5.4,5.516,5.516,0,0,1,8.625,2.819,7.075,7.075,0,0,1,12.062,2Z"})});var l8=o(L(),1),lA=o(v(),1),kle=()=>(0,lA.jsx)(l8.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,lA.jsx)(l8.Path,{d:"M23.994 14.552a3.36 3.36 0 01-3.401 3.171h-8.176a.685.685 0 01-.679-.681V8.238a.749.749 0 01.452-.716S12.942 7 14.526 7a5.357 5.357 0 012.748.755 5.44 5.44 0 012.56 3.546c.282-.08.574-.12.868-.119a3.273 3.273 0 013.292 3.37zM10.718 8.795a.266.266 0 10-.528 0c-.224 2.96-.397 5.735 0 8.685a.265.265 0 00.528 0c.425-2.976.246-5.7 0-8.685zM9.066 9.82a.278.278 0 00-.553 0 33.183 33.183 0 000 7.663.278.278 0 00.55 0c.33-2.544.332-5.12.003-7.664zM7.406 9.56a.269.269 0 00-.535 0c-.253 2.7-.38 5.222 0 7.917a.266.266 0 10.531 0c.394-2.73.272-5.181.004-7.917zM5.754 10.331a.275.275 0 10-.55 0 28.035 28.035 0 000 7.155.272.272 0 00.54 0c.332-2.373.335-4.78.01-7.155zM4.087 12.12a.272.272 0 00-.544 0c-.393 1.843-.208 3.52.016 5.386a.26.26 0 00.512 0c.247-1.892.435-3.53.016-5.386zM2.433 11.838a.282.282 0 00-.56 0c-.349 1.882-.234 3.54.01 5.418.025.285.508.282.54 0 .269-1.907.394-3.517.01-5.418zM.762 12.76a.282.282 0 00-.56 0c-.32 1.264-.22 2.31.023 3.578a.262.262 0 00.521 0c.282-1.293.42-2.317.016-3.578z"})});var s8=o(L(),1),sA=o(v(),1),wle=()=>(0,sA.jsx)(s8.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,sA.jsx)(s8.Path,{d:"M12,2C6.477,2,2,6.477,2,12c0,5.523,4.477,10,10,10c5.523,0,10-4.477,10-10C22,6.477,17.523,2,12,2 M16.586,16.424 c-0.18,0.295-0.563,0.387-0.857,0.207c-2.348-1.435-5.304-1.76-8.785-0.964c-0.335,0.077-0.67-0.133-0.746-0.469 c-0.077-0.335,0.132-0.67,0.469-0.746c3.809-0.871,7.077-0.496,9.713,1.115C16.673,15.746,16.766,16.13,16.586,16.424 M17.81,13.7 c-0.226,0.367-0.706,0.482-1.072,0.257c-2.687-1.652-6.785-2.131-9.965-1.166C6.36,12.917,5.925,12.684,5.8,12.273 C5.675,11.86,5.908,11.425,6.32,11.3c3.632-1.102,8.147-0.568,11.234,1.328C17.92,12.854,18.035,13.335,17.81,13.7 M17.915,10.865 c-3.223-1.914-8.54-2.09-11.618-1.156C5.804,9.859,5.281,9.58,5.131,9.086C4.982,8.591,5.26,8.069,5.755,7.919 c3.532-1.072,9.404-0.865,13.115,1.338c0.445,0.264,0.59,0.838,0.327,1.282C18.933,10.983,18.359,11.129,17.915,10.865"})});var c8=o(L(),1),cA=o(v(),1),Cle=()=>(0,cA.jsx)(c8.SVG,{width:"24",height:"24",viewBox:"0 0 128 128",version:"1.1",children:(0,cA.jsx)(c8.Path,{d:"M28.9700376,63.3244248 C47.6273373,55.1957357 60.0684594,49.8368063 66.2934036,47.2476366 C84.0668845,39.855031 87.7600616,38.5708563 90.1672227,38.528 C90.6966555,38.5191258 91.8804274,38.6503351 92.6472251,39.2725385 C93.294694,39.7979149 93.4728387,40.5076237 93.5580865,41.0057381 C93.6433345,41.5038525 93.7494885,42.63857 93.6651041,43.5252052 C92.7019529,53.6451182 88.5344133,78.2034783 86.4142057,89.5379542 C85.5170662,94.3339958 83.750571,95.9420841 82.0403991,96.0994568 C78.3237996,96.4414641 75.5015827,93.6432685 71.9018743,91.2836143 C66.2690414,87.5912212 63.0868492,85.2926952 57.6192095,81.6896017 C51.3004058,77.5256038 55.3966232,75.2369981 58.9976911,71.4967761 C59.9401076,70.5179421 76.3155302,55.6232293 76.6324771,54.2720454 C76.6721165,54.1030573 76.7089039,53.4731496 76.3346867,53.1405352 C75.9604695,52.8079208 75.4081573,52.921662 75.0095933,53.0121213 C74.444641,53.1403447 65.4461175,59.0880351 48.0140228,70.8551922 C45.4598218,72.6091037 43.1463059,73.4636682 41.0734751,73.4188859 C38.7883453,73.3695169 34.3926725,72.1268388 31.1249416,71.0646282 C27.1169366,69.7617838 23.931454,69.0729605 24.208838,66.8603276 C24.3533167,65.7078514 25.9403832,64.5292172 28.9700376,63.3244248 Z"})});var u8=o(L(),1),uA=o(v(),1),Sle=()=>(0,uA.jsx)(u8.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,uA.jsx)(u8.Path,{d:"M16.3 11.3c-.1 0-.2-.1-.2-.1-.1-2.6-1.5-4-3.9-4-1.4 0-2.6.6-3.3 1.7l1.3.9c.5-.8 1.4-1 2-1 .8 0 1.4.2 1.7.7.3.3.5.8.5 1.3-.7-.1-1.4-.2-2.2-.1-2.2.1-3.7 1.4-3.6 3.2 0 .9.5 1.7 1.3 2.2.7.4 1.5.6 2.4.6 1.2-.1 2.1-.5 2.7-1.3.5-.6.8-1.4.9-2.4.6.3 1 .8 1.2 1.3.4.9.4 2.4-.8 3.6-1.1 1.1-2.3 1.5-4.3 1.5-2.1 0-3.8-.7-4.8-2S5.7 14.3 5.7 12c0-2.3.5-4.1 1.5-5.4 1.1-1.3 2.7-2 4.8-2 2.2 0 3.8.7 4.9 2 .5.7.9 1.5 1.2 2.5l1.5-.4c-.3-1.2-.8-2.2-1.5-3.1-1.3-1.7-3.3-2.6-6-2.6-2.6 0-4.7.9-6 2.6C4.9 7.2 4.3 9.3 4.3 12s.6 4.8 1.9 6.4c1.4 1.7 3.4 2.6 6 2.6 2.3 0 4-.6 5.3-2 1.8-1.8 1.7-4 1.1-5.4-.4-.9-1.2-1.7-2.3-2.3zm-4 3.8c-1 .1-2-.4-2-1.3 0-.7.5-1.5 2.1-1.6h.5c.6 0 1.1.1 1.6.2-.2 2.3-1.3 2.7-2.2 2.7z"})});var m8=o(L(),1),mA=o(v(),1),Tle=()=>(0,mA.jsx)(m8.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,mA.jsx)(m8.Path,{d:"M12.4044 3.01519C13.4086 3 14.4072 3.009 15.4045 3C15.465 4.14812 15.8874 5.31762 16.7472 6.12935C17.6053 6.96134 18.819 7.34217 20 7.47099V10.4912C18.8933 10.4558 17.7814 10.2308 16.7771 9.76499C16.3397 9.57148 15.9323 9.32227 15.5334 9.06745C15.5283 11.2591 15.5426 13.4479 15.5191 15.6305C15.4592 16.679 15.1053 17.7225 14.4814 18.5866C13.4777 20.025 11.7356 20.9627 9.94635 20.992C8.84885 21.0533 7.7525 20.7608 6.81729 20.2219C5.26743 19.3286 4.17683 17.6933 4.01799 15.9382C3.99957 15.563 3.99324 15.1883 4.00878 14.8221C4.14691 13.395 4.86917 12.0297 5.99027 11.101C7.26101 10.0192 9.04107 9.50397 10.7078 9.80886C10.7233 10.9199 10.6778 12.0297 10.6778 13.1407C9.91643 12.9 9.02668 12.9675 8.36139 13.4192C7.87566 13.7269 7.50675 14.1983 7.31453 14.7316C7.15569 15.1118 7.20116 15.5343 7.21036 15.9382C7.3928 17.169 8.60368 18.2035 9.89628 18.0916C10.7532 18.0826 11.5745 17.5965 12.0211 16.8849C12.1655 16.6357 12.3273 16.3809 12.3359 16.0878C12.4113 14.7462 12.3814 13.4102 12.3906 12.0685C12.3969 9.04495 12.3814 6.02979 12.4049 3.01575L12.4044 3.01519Z"})});var p8=o(L(),1),pA=o(v(),1),Ple=()=>(0,pA.jsx)(p8.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,pA.jsx)(p8.Path,{d:"M17.04 21.28h-3.28c-2.84 0-4.94-1.37-4.94-5.02v-5.67H6.08V7.5c2.93-.73 4.11-3.3 4.3-5.48h3.01v4.93h3.47v3.65H13.4v4.93c0 1.47.73 2.01 1.92 2.01h1.73v3.75z"})});var d8=o(L(),1),dA=o(v(),1),Ble=()=>(0,dA.jsx)(d8.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,dA.jsx)(d8.Path,{d:"M16.499,8.089h-1.636v4.91h1.636V8.089z M12,8.089h-1.637v4.91H12V8.089z M4.228,3.178L3,6.451v13.092h4.499V22h2.456 l2.454-2.456h3.681L21,14.636V3.178H4.228z M19.364,13.816l-2.864,2.865H12l-2.453,2.453V16.68H5.863V4.814h13.501V13.816z"})});var f8=o(L(),1),fA=o(v(),1),Ile=()=>(0,fA.jsx)(f8.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,fA.jsx)(f8.Path,{d:"M22.23,5.924c-0.736,0.326-1.527,0.547-2.357,0.646c0.847-0.508,1.498-1.312,1.804-2.27 c-0.793,0.47-1.671,0.812-2.606,0.996C18.324,4.498,17.257,4,16.077,4c-2.266,0-4.103,1.837-4.103,4.103 c0,0.322,0.036,0.635,0.106,0.935C8.67,8.867,5.647,7.234,3.623,4.751C3.27,5.357,3.067,6.062,3.067,6.814 c0,1.424,0.724,2.679,1.825,3.415c-0.673-0.021-1.305-0.206-1.859-0.513c0,0.017,0,0.034,0,0.052c0,1.988,1.414,3.647,3.292,4.023 c-0.344,0.094-0.707,0.144-1.081,0.144c-0.264,0-0.521-0.026-0.772-0.074c0.522,1.63,2.038,2.816,3.833,2.85 c-1.404,1.1-3.174,1.756-5.096,1.756c-0.331,0-0.658-0.019-0.979-0.057c1.816,1.164,3.973,1.843,6.29,1.843 c7.547,0,11.675-6.252,11.675-11.675c0-0.178-0.004-0.355-0.012-0.531C20.985,7.47,21.68,6.747,22.23,5.924z"})});var h8=o(L(),1),hA=o(v(),1),Nle=()=>(0,hA.jsx)(h8.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,hA.jsx)(h8.Path,{d:"M22.396,7.164c-0.093,2.026-1.507,4.799-4.245,8.32C15.322,19.161,12.928,21,10.97,21c-1.214,0-2.24-1.119-3.079-3.359 c-0.56-2.053-1.119-4.106-1.68-6.159C5.588,9.243,4.921,8.122,4.206,8.122c-0.156,0-0.701,0.328-1.634,0.98L1.594,7.841 c1.027-0.902,2.04-1.805,3.037-2.708C6.001,3.95,7.03,3.327,7.715,3.264c1.619-0.156,2.616,0.951,2.99,3.321 c0.404,2.557,0.685,4.147,0.841,4.769c0.467,2.121,0.981,3.181,1.542,3.181c0.435,0,1.09-0.688,1.963-2.065 c0.871-1.376,1.338-2.422,1.401-3.142c0.125-1.187-0.343-1.782-1.401-1.782c-0.498,0-1.012,0.115-1.541,0.341 c1.023-3.35,2.977-4.977,5.862-4.884C21.511,3.066,22.52,4.453,22.396,7.164z"})});var g8=o(L(),1),gA=o(v(),1),Ele=()=>(0,gA.jsx)(g8.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,gA.jsx)(g8.Path,{d:"M22,7.1c0.2,0.4-0.4,1.5-1.6,3.1c-0.2,0.2-0.4,0.5-0.7,0.9c-0.5,0.7-0.9,1.1-0.9,1.4c-0.1,0.3-0.1,0.6,0.1,0.8 c0.1,0.1,0.4,0.4,0.8,0.9h0l0,0c1,0.9,1.6,1.7,2,2.3c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.3c0,0.1,0,0.2,0,0.4 c0,0.1-0.1,0.2-0.3,0.3c-0.1,0.1-0.4,0.1-0.6,0.1l-2.7,0c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.1-0.5-0.2l-0.2-0.1 c-0.2-0.1-0.5-0.4-0.7-0.7s-0.5-0.6-0.7-0.8c-0.2-0.2-0.4-0.4-0.6-0.6C14.8,15,14.6,15,14.4,15c0,0,0,0-0.1,0c0,0-0.1,0.1-0.2,0.2 c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.1-0.1,0.3-0.2,0.5c-0.1,0.2-0.1,0.5-0.1,0.8c0,0.1,0,0.2,0,0.3c0,0.1-0.1,0.2-0.1,0.2l0,0.1 c-0.1,0.1-0.3,0.2-0.6,0.2h-1.2c-0.5,0-1,0-1.5-0.2c-0.5-0.1-1-0.3-1.4-0.6s-0.7-0.5-1.1-0.7s-0.6-0.4-0.7-0.6l-0.3-0.3 c-0.1-0.1-0.2-0.2-0.3-0.3s-0.4-0.5-0.7-0.9s-0.7-1-1.1-1.6c-0.4-0.6-0.8-1.3-1.3-2.2C2.9,9.4,2.5,8.5,2.1,7.5C2,7.4,2,7.3,2,7.2 c0-0.1,0-0.1,0-0.2l0-0.1c0.1-0.1,0.3-0.2,0.6-0.2l2.9,0c0.1,0,0.2,0,0.2,0.1S5.9,6.9,5.9,7L6,7c0.1,0.1,0.2,0.2,0.3,0.3 C6.4,7.7,6.5,8,6.7,8.4C6.9,8.8,7,9,7.1,9.2l0.2,0.3c0.2,0.4,0.4,0.8,0.6,1.1c0.2,0.3,0.4,0.5,0.5,0.7s0.3,0.3,0.4,0.4 c0.1,0.1,0.3,0.1,0.4,0.1c0.1,0,0.2,0,0.3-0.1c0,0,0,0,0.1-0.1c0,0,0.1-0.1,0.1-0.2c0.1-0.1,0.1-0.3,0.1-0.5c0-0.2,0.1-0.5,0.1-0.8 c0-0.4,0-0.8,0-1.3c0-0.3,0-0.5-0.1-0.8c0-0.2-0.1-0.4-0.1-0.5L9.6,7.6C9.4,7.3,9.1,7.2,8.7,7.1C8.6,7.1,8.6,7,8.7,6.9 C8.9,6.7,9,6.6,9.1,6.5c0.4-0.2,1.2-0.3,2.5-0.3c0.6,0,1,0.1,1.4,0.1c0.1,0,0.3,0.1,0.3,0.1c0.1,0.1,0.2,0.1,0.2,0.3 c0,0.1,0.1,0.2,0.1,0.3s0,0.3,0,0.5c0,0.2,0,0.4,0,0.6c0,0.2,0,0.4,0,0.7c0,0.3,0,0.6,0,0.9c0,0.1,0,0.2,0,0.4c0,0.2,0,0.4,0,0.5 c0,0.1,0,0.3,0,0.4s0.1,0.3,0.1,0.4c0.1,0.1,0.1,0.2,0.2,0.3c0.1,0,0.1,0,0.2,0c0.1,0,0.2,0,0.3-0.1c0.1-0.1,0.2-0.2,0.4-0.4 s0.3-0.4,0.5-0.7c0.2-0.3,0.5-0.7,0.7-1.1c0.4-0.7,0.8-1.5,1.1-2.3c0-0.1,0.1-0.1,0.1-0.2c0-0.1,0.1-0.1,0.1-0.1l0,0l0.1,0 c0,0,0,0,0.1,0s0.2,0,0.2,0l3,0c0.3,0,0.5,0,0.7,0S21.9,7,21.9,7L22,7.1z"})});var v8=o(L(),1),vA=o(v(),1),Dle=()=>(0,vA.jsx)(v8.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,vA.jsx)(v8.Path,{d:"M 12.011719 2 C 6.5057187 2 2.0234844 6.478375 2.0214844 11.984375 C 2.0204844 13.744375 2.4814687 15.462563 3.3554688 16.976562 L 2 22 L 7.2324219 20.763672 C 8.6914219 21.559672 10.333859 21.977516 12.005859 21.978516 L 12.009766 21.978516 C 17.514766 21.978516 21.995047 17.499141 21.998047 11.994141 C 22.000047 9.3251406 20.962172 6.8157344 19.076172 4.9277344 C 17.190172 3.0407344 14.683719 2.001 12.011719 2 z M 12.009766 4 C 14.145766 4.001 16.153109 4.8337969 17.662109 6.3417969 C 19.171109 7.8517969 20.000047 9.8581875 19.998047 11.992188 C 19.996047 16.396187 16.413812 19.978516 12.007812 19.978516 C 10.674812 19.977516 9.3544062 19.642812 8.1914062 19.007812 L 7.5175781 18.640625 L 6.7734375 18.816406 L 4.8046875 19.28125 L 5.2851562 17.496094 L 5.5019531 16.695312 L 5.0878906 15.976562 C 4.3898906 14.768562 4.0204844 13.387375 4.0214844 11.984375 C 4.0234844 7.582375 7.6067656 4 12.009766 4 z M 8.4765625 7.375 C 8.3095625 7.375 8.0395469 7.4375 7.8105469 7.6875 C 7.5815469 7.9365 6.9355469 8.5395781 6.9355469 9.7675781 C 6.9355469 10.995578 7.8300781 12.182609 7.9550781 12.349609 C 8.0790781 12.515609 9.68175 15.115234 12.21875 16.115234 C 14.32675 16.946234 14.754891 16.782234 15.212891 16.740234 C 15.670891 16.699234 16.690438 16.137687 16.898438 15.554688 C 17.106437 14.971687 17.106922 14.470187 17.044922 14.367188 C 16.982922 14.263188 16.816406 14.201172 16.566406 14.076172 C 16.317406 13.951172 15.090328 13.348625 14.861328 13.265625 C 14.632328 13.182625 14.464828 13.140625 14.298828 13.390625 C 14.132828 13.640625 13.655766 14.201187 13.509766 14.367188 C 13.363766 14.534188 13.21875 14.556641 12.96875 14.431641 C 12.71875 14.305641 11.914938 14.041406 10.960938 13.191406 C 10.218937 12.530406 9.7182656 11.714844 9.5722656 11.464844 C 9.4272656 11.215844 9.5585938 11.079078 9.6835938 10.955078 C 9.7955938 10.843078 9.9316406 10.663578 10.056641 10.517578 C 10.180641 10.371578 10.223641 10.267562 10.306641 10.101562 C 10.389641 9.9355625 10.347156 9.7890625 10.285156 9.6640625 C 10.223156 9.5390625 9.737625 8.3065 9.515625 7.8125 C 9.328625 7.3975 9.131125 7.3878594 8.953125 7.3808594 C 8.808125 7.3748594 8.6425625 7.375 8.4765625 7.375 z"})});var b8=o(L(),1),bA=o(v(),1),Lle=()=>(0,bA.jsx)(b8.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:(0,bA.jsx)(b8.Path,{d:"M12.158,12.786L9.46,20.625c0.806,0.237,1.657,0.366,2.54,0.366c1.047,0,2.051-0.181,2.986-0.51 c-0.024-0.038-0.046-0.079-0.065-0.124L12.158,12.786z M3.009,12c0,3.559,2.068,6.634,5.067,8.092L3.788,8.341 C3.289,9.459,3.009,10.696,3.009,12z M18.069,11.546c0-1.112-0.399-1.881-0.741-2.48c-0.456-0.741-0.883-1.368-0.883-2.109 c0-0.826,0.627-1.596,1.51-1.596c0.04,0,0.078,0.005,0.116,0.007C16.472,3.904,14.34,3.009,12,3.009 c-3.141,0-5.904,1.612-7.512,4.052c0.211,0.007,0.41,0.011,0.579,0.011c0.94,0,2.396-0.114,2.396-0.114 C7.947,6.93,8.004,7.642,7.52,7.699c0,0-0.487,0.057-1.029,0.085l3.274,9.739l1.968-5.901l-1.401-3.838 C9.848,7.756,9.389,7.699,9.389,7.699C8.904,7.67,8.961,6.93,9.446,6.958c0,0,1.484,0.114,2.368,0.114 c0.94,0,2.397-0.114,2.397-0.114c0.485-0.028,0.542,0.684,0.057,0.741c0,0-0.488,0.057-1.029,0.085l3.249,9.665l0.897-2.996 C17.841,13.284,18.069,12.316,18.069,11.546z M19.889,7.686c0.039,0.286,0.06,0.593,0.06,0.924c0,0.912-0.171,1.938-0.684,3.22 l-2.746,7.94c2.673-1.558,4.47-4.454,4.47-7.771C20.991,10.436,20.591,8.967,19.889,7.686z M12,22C6.486,22,2,17.514,2,12 C2,6.486,6.486,2,12,2c5.514,0,10,4.486,10,10C22,17.514,17.514,22,12,22z"})});var y8=o(L(),1),yA=o(v(),1),Mle=()=>(0,yA.jsx)(y8.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,yA.jsx)(y8.Path,{d:"M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z"})});var _8=o(L(),1),_A=o(v(),1),Ale=()=>(0,_A.jsx)(_8.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,_A.jsx)(_8.Path,{d:"M12.271,16.718v1.417q-.011,3.257-.067,3.4a.707.707,0,0,1-.569.446,4.637,4.637,0,0,1-2.024-.424A4.609,4.609,0,0,1,7.8,20.565a.844.844,0,0,1-.19-.4.692.692,0,0,1,.044-.29,3.181,3.181,0,0,1,.379-.524q.335-.412,2.019-2.409.011,0,.669-.781a.757.757,0,0,1,.44-.274.965.965,0,0,1,.552.039.945.945,0,0,1,.418.324.732.732,0,0,1,.139.468Zm-1.662-2.8a.783.783,0,0,1-.58.781l-1.339.435q-3.067.981-3.257.981a.711.711,0,0,1-.6-.4,2.636,2.636,0,0,1-.19-.836,9.134,9.134,0,0,1,.011-1.857,3.559,3.559,0,0,1,.335-1.389.659.659,0,0,1,.625-.357,22.629,22.629,0,0,1,2.253.859q.781.324,1.283.524l.937.379a.771.771,0,0,1,.4.34A.982.982,0,0,1,10.609,13.917Zm9.213,3.313a4.467,4.467,0,0,1-1.021,1.8,4.559,4.559,0,0,1-1.512,1.417.671.671,0,0,1-.7-.078q-.156-.112-2.052-3.2l-.524-.859a.761.761,0,0,1-.128-.513.957.957,0,0,1,.217-.513.774.774,0,0,1,.926-.29q.011.011,1.327.446,2.264.736,2.7.887a2.082,2.082,0,0,1,.524.229.673.673,0,0,1,.245.68Zm-7.5-7.049q.056,1.137-.6,1.361-.647.19-1.272-.792L6.237,4.08a.7.7,0,0,1,.212-.691,5.788,5.788,0,0,1,2.314-1,5.928,5.928,0,0,1,2.5-.352.681.681,0,0,1,.547.5q.034.2.245,3.407T12.327,10.181Zm7.384,1.2a.679.679,0,0,1-.29.658q-.167.112-3.67.959-.747.167-1.015.257l.011-.022a.769.769,0,0,1-.513-.044.914.914,0,0,1-.413-.357.786.786,0,0,1,0-.971q.011-.011.836-1.137,1.394-1.908,1.673-2.275a2.423,2.423,0,0,1,.379-.435A.7.7,0,0,1,17.435,8a4.482,4.482,0,0,1,1.372,1.489,4.81,4.81,0,0,1,.9,1.868v.034Z"})});var x8=o(L(),1),xA=o(v(),1),Rle=()=>(0,xA.jsx)(x8.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,xA.jsx)(x8.Path,{d:"M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"})});function zle(e){return e?.name?{icon:e?.icon??O2,label:e?.title??(0,kA.__)("Social Icon")}:{icon:O2,label:(0,kA.__)("Social Icon")}}var Zt=o(v(),1),J4e=({url:e,setAttributes:t,setPopover:r,popoverAnchor:a,clientId:n})=>{let{removeBlock:i}=(0,k8.useDispatch)(gn.store);return(0,Zt.jsx)(gn.URLPopover,{anchor:a,"aria-label":(0,Zn.__)("Edit social link"),onClose:()=>{r(!1),a?.focus()},children:(0,Zt.jsx)("form",{className:"block-editor-url-popover__link-editor",onSubmit:l=>{l.preventDefault(),r(!1),a?.focus()},children:(0,Zt.jsx)("div",{className:"block-editor-url-input",children:(0,Zt.jsx)(gn.URLInput,{value:e,onChange:l=>t({url:l}),placeholder:(0,Zn.__)("Enter social link"),label:(0,Zn.__)("Enter social link"),hideLabelFromVision:!0,disableSuggestions:!0,onKeyDown:l=>{e||l.defaultPrevented||![Fg.BACKSPACE,Fg.DELETE].includes(l.keyCode)||i(n)},suffix:(0,Zt.jsx)(lo.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Zt.jsx)(lo.Button,{icon:gT,label:(0,Zn.__)("Apply"),type:"submit",size:"small"})})})})})})},e3e=({attributes:e,context:t,isSelected:r,setAttributes:a,clientId:n,name:i})=>{let{url:l,service:s,label:c="",rel:u}=e,m=q(),{showLabels:p,iconColor:d,iconColorValue:f,iconBackgroundColor:h,iconBackgroundColorValue:g}=t,[b,y]=(0,tf.useState)(!1),k=w("wp-social-link","wp-block-social-link","wp-social-link-"+s,{"wp-social-link__is-incomplete":!l,[`has-${d}-color`]:d,[`has-${h}-background-color`]:h}),[_,x]=(0,tf.useState)(null),S=(0,gn.useBlockEditingMode)()==="contentOnly",{activeVariation:C}=(0,k8.useSelect)(F=>{let{getActiveBlockVariation:z}=F(Fle.store);return{activeVariation:z(i,e)}},[i,e]),{icon:N,label:B}=zle(C),D=c.trim()===""?B:c,A=(0,tf.useRef)(),H=(0,gn.useBlockProps)({className:"wp-block-social-link-anchor",ref:(0,Vle.useMergeRefs)([x,A]),onClick:()=>y(!0),onKeyDown:F=>{F.keyCode===Fg.ENTER&&(F.preventDefault(),y(!0))}});return(0,Zt.jsxs)(Zt.Fragment,{children:[S&&p&&(0,Zt.jsx)(gn.BlockControls,{group:"other",children:(0,Zt.jsx)(lo.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({isOpen:F,onToggle:z})=>(0,Zt.jsx)(lo.ToolbarButton,{onClick:z,"aria-haspopup":"true","aria-expanded":F,children:(0,Zn.__)("Text")}),renderContent:()=>(0,Zt.jsx)(lo.TextControl,{__next40pxDefaultSize:!0,className:"wp-block-social-link__toolbar_content_text",label:(0,Zn.__)("Text"),help:(0,Zn.__)("Provide a text label or use the default."),value:c,onChange:F=>a({label:F}),placeholder:B})})}),(0,Zt.jsx)(gn.InspectorControls,{children:(0,Zt.jsx)(lo.__experimentalToolsPanel,{label:(0,Zn.__)("Settings"),resetAll:()=>{a({label:void 0})},dropdownMenuProps:m,children:(0,Zt.jsx)(lo.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,Zn.__)("Text"),hasValue:()=>!!c,onDeselect:()=>{a({label:void 0})},children:(0,Zt.jsx)(lo.TextControl,{__next40pxDefaultSize:!0,label:(0,Zn.__)("Text"),help:(0,Zn.__)("The text is visible when enabled from the parent Social Icons block."),value:c,onChange:F=>a({label:F}),placeholder:B})})})}),(0,Zt.jsx)(gn.InspectorControls,{group:"advanced",children:(0,Zt.jsx)(lo.TextControl,{__next40pxDefaultSize:!0,label:(0,Zn.__)("Link relation"),help:(0,tf.createInterpolateElement)((0,Zn.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,Zt.jsx)(lo.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})}),value:u||"",onChange:F=>a({rel:F})})}),(0,Zt.jsxs)("li",{role:"presentation",className:k,style:{color:f,backgroundColor:g},children:[(0,Zt.jsxs)("button",{"aria-haspopup":"dialog",...H,role:"button",children:[(0,Zt.jsx)(lo.Icon,{icon:N}),(0,Zt.jsx)("span",{className:w("wp-block-social-link-label",{"screen-reader-text":!p}),children:D})]}),r&&b&&(0,Zt.jsx)(J4e,{url:l,setAttributes:a,setPopover:y,popoverAnchor:_,clientId:n})]})]})},Hle=e3e;var w8={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/social-link",title:"Social Icon",category:"widgets",parent:["core/social-links"],description:"Display an icon linking to a social profile or site.",textdomain:"default",attributes:{url:{type:"string",role:"content"},service:{type:"string"},label:{type:"string",role:"content"},rel:{type:"string"}},usesContext:["openInNewTab","showLabels","iconColor","iconColorValue","iconBackgroundColor","iconBackgroundColorValue"],supports:{anchor:!0,reusable:!1,html:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-social-link-editor"};var Be=o(P(),1);var Ole=[{isDefault:!0,name:"wordpress",attributes:{service:"wordpress"},title:(0,Be._x)("WordPress","social link block variation name"),icon:Lle},{name:"fivehundredpx",attributes:{service:"fivehundredpx"},title:(0,Be._x)("500px","social link block variation name"),icon:rle},{name:"amazon",attributes:{service:"amazon"},title:(0,Be._x)("Amazon","social link block variation name"),icon:Gie},{name:"bandcamp",attributes:{service:"bandcamp"},title:(0,Be._x)("Bandcamp","social link block variation name"),icon:Wie},{name:"behance",attributes:{service:"behance"},title:(0,Be._x)("Behance","social link block variation name"),icon:$ie},{name:"bluesky",attributes:{service:"bluesky"},title:(0,Be._x)("Bluesky","social link block variation name"),icon:qie},{name:"chain",attributes:{service:"chain"},title:(0,Be._x)("Link","social link block variation name"),icon:O2},{name:"codepen",attributes:{service:"codepen"},title:(0,Be._x)("CodePen","social link block variation name"),icon:Zie},{name:"deviantart",attributes:{service:"deviantart"},title:(0,Be._x)("DeviantArt","social link block variation name"),icon:Kie},{name:"discord",attributes:{service:"discord"},title:(0,Be._x)("Discord","social link block variation name"),icon:Qie},{name:"dribbble",attributes:{service:"dribbble"},title:(0,Be._x)("Dribbble","social link block variation name"),icon:Yie},{name:"dropbox",attributes:{service:"dropbox"},title:(0,Be._x)("Dropbox","social link block variation name"),icon:Xie},{name:"etsy",attributes:{service:"etsy"},title:(0,Be._x)("Etsy","social link block variation name"),icon:Jie},{name:"facebook",attributes:{service:"facebook"},title:(0,Be._x)("Facebook","social link block variation name"),icon:ele},{name:"feed",attributes:{service:"feed"},title:(0,Be._x)("RSS Feed","social link block variation name"),icon:tle},{name:"flickr",attributes:{service:"flickr"},title:(0,Be._x)("Flickr","social link block variation name"),icon:ole},{name:"foursquare",attributes:{service:"foursquare"},title:(0,Be._x)("Foursquare","social link block variation name"),icon:ale},{name:"goodreads",attributes:{service:"goodreads"},title:(0,Be._x)("Goodreads","social link block variation name"),icon:nle},{name:"google",attributes:{service:"google"},title:(0,Be._x)("Google","social link block variation name"),icon:ile},{name:"github",attributes:{service:"github"},title:(0,Be._x)("GitHub","social link block variation name"),icon:lle},{name:"gravatar",attributes:{service:"gravatar"},title:(0,Be._x)("Gravatar","social link block variation name"),icon:sle},{name:"instagram",attributes:{service:"instagram"},title:(0,Be._x)("Instagram","social link block variation name"),icon:cle},{name:"lastfm",attributes:{service:"lastfm"},title:(0,Be._x)("Last.fm","social link block variation name"),icon:ule},{name:"linkedin",attributes:{service:"linkedin"},title:(0,Be._x)("LinkedIn","social link block variation name"),icon:mle},{name:"mail",attributes:{service:"mail"},title:(0,Be._x)("Mail","social link block variation name"),keywords:["email","e-mail"],icon:ple},{name:"mastodon",attributes:{service:"mastodon"},title:(0,Be._x)("Mastodon","social link block variation name"),icon:dle},{name:"meetup",attributes:{service:"meetup"},title:(0,Be._x)("Meetup","social link block variation name"),icon:fle},{name:"medium",attributes:{service:"medium"},title:(0,Be._x)("Medium","social link block variation name"),icon:hle},{name:"patreon",attributes:{service:"patreon"},title:(0,Be._x)("Patreon","social link block variation name"),icon:gle},{name:"pinterest",attributes:{service:"pinterest"},title:(0,Be._x)("Pinterest","social link block variation name"),icon:vle},{name:"pocket",attributes:{service:"pocket"},title:(0,Be._x)("Pocket","social link block variation name"),icon:ble},{name:"reddit",attributes:{service:"reddit"},title:(0,Be._x)("Reddit","social link block variation name"),icon:yle},{name:"skype",attributes:{service:"skype"},title:(0,Be._x)("Skype","social link block variation name"),icon:_le,scope:[]},{name:"snapchat",attributes:{service:"snapchat"},title:(0,Be._x)("Snapchat","social link block variation name"),icon:xle},{name:"soundcloud",attributes:{service:"soundcloud"},title:(0,Be._x)("SoundCloud","social link block variation name"),icon:kle},{name:"spotify",attributes:{service:"spotify"},title:(0,Be._x)("Spotify","social link block variation name"),icon:wle},{name:"telegram",attributes:{service:"telegram"},title:(0,Be._x)("Telegram","social link block variation name"),icon:Cle},{name:"threads",attributes:{service:"threads"},title:(0,Be._x)("Threads","social link block variation name"),icon:Sle},{name:"tiktok",attributes:{service:"tiktok"},title:(0,Be._x)("TikTok","social link block variation name"),icon:Tle},{name:"tumblr",attributes:{service:"tumblr"},title:(0,Be._x)("Tumblr","social link block variation name"),icon:Ple},{name:"twitch",attributes:{service:"twitch"},title:(0,Be._x)("Twitch","social link block variation name"),icon:Ble},{name:"twitter",attributes:{service:"twitter"},title:(0,Be._x)("Twitter","social link block variation name"),icon:Ile},{name:"vimeo",attributes:{service:"vimeo"},title:(0,Be._x)("Vimeo","social link block variation name"),icon:Nle},{name:"vk",attributes:{service:"vk"},title:(0,Be._x)("VK","social link block variation name"),icon:Ele},{name:"whatsapp",attributes:{service:"whatsapp"},title:(0,Be._x)("WhatsApp","social link block variation name"),icon:Dle},{name:"x",attributes:{service:"x"},keywords:["twitter"],title:(0,Be._x)("X","social link block variation name"),icon:Mle},{name:"yelp",attributes:{service:"yelp"},title:(0,Be._x)("Yelp","social link block variation name"),icon:Ale},{name:"youtube",attributes:{service:"youtube"},title:(0,Be._x)("YouTube","social link block variation name"),icon:Rle}];Ole.forEach(e=>{e.isActive||(e.isActive=(t,r)=>t.service===r.service)});var jle=Ole;var{fieldsKey:r3e,formKey:o3e}=K(Ule.privateApis),{name:Gle}=w8,C8={icon:s1,edit:Hle,variations:jle};window.__experimentalContentOnlyInspectorFields&&(C8[r3e]=[{id:"link",label:(0,wA.__)("Link"),type:"url",Edit:"link",getValue:({item:e})=>({url:e.url,rel:e.rel}),setValue:({value:e})=>({url:e.url,rel:e.rel})},{id:"label",label:(0,wA.__)("Label"),type:"text"}],C8[o3e]={fields:["link","label"]});var a3e=()=>E({name:Gle,metadata:w8,settings:C8});var TA={};Z(TA,{init:()=>m3e,metadata:()=>T8,name:()=>Yle,settings:()=>Xle});var S8=o(T(),1),SA=o(v(),1),n3e=e=>{if(e.layout)return e;let{className:t}=e,r="items-justified-",a=new RegExp(`\\b${r}[^ ]*[ ]?\\b`,"g"),n={...e,className:t?.replace(a,"").trim()},i=t?.match(a)?.[0]?.trim();return i&&Object.assign(n,{layout:{type:"flex",justifyContent:i.slice(r.length)}}),n},i3e=[{attributes:{iconColor:{type:"string"},customIconColor:{type:"string"},iconColorValue:{type:"string"},iconBackgroundColor:{type:"string"},customIconBackgroundColor:{type:"string"},iconBackgroundColorValue:{type:"string"},openInNewTab:{type:"boolean",default:!1},size:{type:"string"}},providesContext:{openInNewTab:"openInNewTab"},supports:{align:["left","center","right"],anchor:!0},migrate:n3e,save:e=>{let{attributes:{iconBackgroundColorValue:t,iconColorValue:r,itemsJustification:a,size:n}}=e,i=w(n,{"has-icon-color":r,"has-icon-background-color":t,[`items-justified-${a}`]:a}),l={"--wp--social-links--icon-color":r,"--wp--social-links--icon-background-color":t};return(0,SA.jsx)("ul",{...S8.useBlockProps.save({className:i,style:l}),children:(0,SA.jsx)(S8.InnerBlocks.Content,{})})}}],Wle=i3e;var $le=o(U(),1),xo=o(T(),1),ds=o(M(),1),vn=o(P(),1),qle=o(V(),1);var da=o(v(),1),l3e=[{label:(0,vn.__)("Default"),value:""},{label:(0,vn.__)("Small"),value:"has-small-icon-size"},{label:(0,vn.__)("Normal"),value:"has-normal-icon-size"},{label:(0,vn.__)("Large"),value:"has-large-icon-size"},{label:(0,vn.__)("Huge"),value:"has-huge-icon-size"}];function s3e(e){let{clientId:t,attributes:r,iconBackgroundColor:a,iconColor:n,isSelected:i,setAttributes:l,setIconBackgroundColor:s,setIconColor:c}=e,{iconBackgroundColorValue:u,iconColorValue:m,openInNewTab:p,showLabels:d,size:f}=r,{hasSocialIcons:h,hasSelectedChild:g}=(0,qle.useSelect)(B=>{let{getBlockCount:D,hasSelectedInnerBlock:A}=B(xo.store);return{hasSocialIcons:D(t)>0,hasSelectedChild:A(t)}},[t]),b=i||g,y=r.className?.includes("is-style-logos-only"),k=q();(0,$le.useEffect)(()=>{if(y){let B;return l(D=>(B={iconBackgroundColor:D.iconBackgroundColor,iconBackgroundColorValue:D.iconBackgroundColorValue,customIconBackgroundColor:D.customIconBackgroundColor},{iconBackgroundColor:void 0,iconBackgroundColorValue:void 0,customIconBackgroundColor:void 0})),()=>l({...B})}},[y,l]);let _=w(f,{"has-visible-labels":d,"has-icon-color":n.color||m,"has-icon-background-color":a.color||u}),x=(0,xo.useBlockProps)({className:_}),S=(0,xo.useInnerBlocksProps)(x,{templateLock:!1,orientation:r.layout?.orientation??"horizontal",__experimentalAppenderTagName:"li",renderAppender:!h||b?xo.InnerBlocks.ButtonBlockAppender:void 0}),C=[{value:n.color||m,onChange:B=>{c(B),l({iconColorValue:B})},label:(0,vn.__)("Icon color"),resetAllFilter:()=>{c(void 0),l({iconColorValue:void 0})}}];y||C.push({value:a.color||u,onChange:B=>{s(B),l({iconBackgroundColorValue:B})},label:(0,vn.__)("Icon background"),resetAllFilter:()=>{s(void 0),l({iconBackgroundColorValue:void 0})}});let N=(0,xo.__experimentalUseMultipleOriginColorsAndGradients)();return(0,da.jsxs)(da.Fragment,{children:[(0,da.jsx)(xo.InspectorControls,{children:(0,da.jsxs)(ds.__experimentalToolsPanel,{label:(0,vn.__)("Settings"),resetAll:()=>{l({openInNewTab:!1,showLabels:!1,size:void 0})},dropdownMenuProps:k,children:[(0,da.jsx)(ds.__experimentalToolsPanelItem,{isShownByDefault:!0,hasValue:()=>!!f,label:(0,vn.__)("Icon size"),onDeselect:()=>l({size:void 0}),children:(0,da.jsx)(ds.SelectControl,{__next40pxDefaultSize:!0,label:(0,vn.__)("Icon size"),onChange:B=>{l({size:B===""?void 0:B})},value:f??"",options:l3e})}),(0,da.jsx)(ds.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,vn.__)("Show text"),hasValue:()=>!!d,onDeselect:()=>l({showLabels:!1}),children:(0,da.jsx)(ds.ToggleControl,{label:(0,vn.__)("Show text"),checked:d,onChange:()=>l({showLabels:!d})})}),(0,da.jsx)(ds.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,vn.__)("Open links in new tab"),hasValue:()=>!!p,onDeselect:()=>l({openInNewTab:!1}),children:(0,da.jsx)(ds.ToggleControl,{label:(0,vn.__)("Open links in new tab"),checked:p,onChange:()=>l({openInNewTab:!p})})})]})}),N.hasColorsOrGradients&&(0,da.jsxs)(xo.InspectorControls,{group:"color",children:[C.map(({onChange:B,label:D,value:A,resetAllFilter:H})=>(0,da.jsx)(xo.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:A,label:D,onColorChange:B,isShownByDefault:!0,resetAllFilter:H,enableAlpha:!0,clearable:!0}],panelId:t,...N},`social-links-color-${D}`)),!y&&(0,da.jsx)(xo.ContrastChecker,{textColor:m,backgroundColor:u,isLargeText:!1})]}),(0,da.jsx)("ul",{...S})]})}var c3e={iconColor:"icon-color",iconBackgroundColor:"icon-background-color"},Zle=(0,xo.withColors)(c3e)(s3e);var T8={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/social-links",title:"Social Icons",category:"widgets",allowedBlocks:["core/social-link"],description:"Display icons linking to your social profiles or sites.",keywords:["links"],textdomain:"default",attributes:{iconColor:{type:"string"},customIconColor:{type:"string"},iconColorValue:{type:"string"},iconBackgroundColor:{type:"string"},customIconBackgroundColor:{type:"string"},iconBackgroundColorValue:{type:"string"},openInNewTab:{type:"boolean",default:!1},showLabels:{type:"boolean",default:!1},size:{type:"string"}},providesContext:{openInNewTab:"openInNewTab",showLabels:"showLabels",iconColor:"iconColor",iconColorValue:"iconColorValue",iconBackgroundColor:"iconBackgroundColor",iconBackgroundColorValue:"iconBackgroundColorValue"},supports:{align:["left","center","right"],anchor:!0,html:!1,__experimentalExposeControlsToChildren:!0,layout:{allowSwitching:!1,allowInheriting:!1,allowVerticalAlignment:!1,default:{type:"flex"}},color:{enableContrastChecker:!1,background:!0,gradients:!0,text:!1,__experimentalDefaultControls:{background:!1}},spacing:{blockGap:["horizontal","vertical"],margin:!0,padding:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0,margin:!0,padding:!1}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}},contentRole:!0,listView:!0},styles:[{name:"default",label:"Default",isDefault:!0},{name:"logos-only",label:"Logos Only"},{name:"pill-shape",label:"Pill Shape"}],editorStyle:"wp-block-social-links-editor",style:"wp-block-social-links"};var P8=o(T(),1),Kle=o(v(),1);function Qle(e){let{attributes:{iconBackgroundColorValue:t,iconColorValue:r,showLabels:a,size:n}}=e,i=w(n,{"has-visible-labels":a,"has-icon-color":r,"has-icon-background-color":t}),l=P8.useBlockProps.save({className:i}),s=P8.useInnerBlocksProps.save(l);return(0,Kle.jsx)("ul",{...s})}var{name:Yle}=T8,Xle={example:{innerBlocks:[{name:"core/social-link",attributes:{service:"wordpress",url:"https://wordpress.org"}},{name:"core/social-link",attributes:{service:"facebook",url:"https://www.facebook.com/WordPress/"}},{name:"core/social-link",attributes:{service:"twitter",url:"https://twitter.com/WordPress"}}]},icon:s1,edit:Zle,save:Qle,deprecated:Wle},m3e=()=>E({name:Yle,metadata:T8,settings:Xle});var PA={};Z(PA,{init:()=>b3e,metadata:()=>I8,name:()=>fse,settings:()=>hse});var Jle=o(T(),1),ese=o(v(),1),p3e=[{attributes:{height:{type:"number",default:100},width:{type:"number"}},migrate(e){let{height:t,width:r}=e;return{...e,width:r!==void 0?`${r}px`:void 0,height:t!==void 0?`${t}px`:void 0}},save({attributes:e}){return(0,ese.jsx)("div",{...Jle.useBlockProps.save({style:{height:e.height,width:e.width},"aria-hidden":!0})})}}],tse=p3e;var fa=o(T(),1),lse=o(M(),1),Og=o(U(),1),sse=o(L(),1),B8=o(V(),1);var Hg=o(P(),1),Tc=o(T(),1),bl=o(M(),1),ose=o(me(),1),ase=o(L(),1);var j2=0;var Kn=o(v(),1),{useSpacingSizes:d3e}=K(Tc.privateApis);function rse({label:e,onChange:t,isResizing:r,value:a=""}){let n=(0,ose.useInstanceId)(bl.__experimentalUnitControl,"block-spacer-height-input"),i=d3e(),[l]=(0,Tc.useSettings)("spacing.units"),s=l?l.filter(d=>d!=="%"):["px","em","rem","vw","vh"],c=(0,bl.__experimentalUseCustomUnits)({availableUnits:s,defaultValues:{px:100,em:10,rem:10,vw:10,vh:25}}),[u,m]=(0,bl.__experimentalParseQuantityAndUnitFromRawValue)(a),p=(0,Tc.isValueSpacingPreset)(a)?a:[u,r?"px":m].join("");return(0,Kn.jsx)(Kn.Fragment,{children:i?.length<2?(0,Kn.jsx)(bl.__experimentalUnitControl,{id:n,isResetValueOnUnitChange:!0,min:j2,onChange:t,value:p,units:c,label:e,__next40pxDefaultSize:!0}):(0,Kn.jsx)(ase.View,{className:"tools-panel-item-spacing",children:(0,Kn.jsx)(Tc.__experimentalSpacingSizesControl,{values:{all:p},onChange:({all:d})=>{t(d)},label:e,sides:["all"],units:c,allowReset:!1,splitOnAxis:!1,showSideInLabel:!1})})})}function nse({setAttributes:e,orientation:t,height:r,width:a,isResizing:n}){let i=q();return(0,Kn.jsx)(Tc.InspectorControls,{children:(0,Kn.jsxs)(bl.__experimentalToolsPanel,{label:(0,Hg.__)("Settings"),resetAll:()=>{e({width:void 0,height:"100px"})},dropdownMenuProps:i,children:[t==="horizontal"&&(0,Kn.jsx)(bl.__experimentalToolsPanelItem,{label:(0,Hg.__)("Width"),isShownByDefault:!0,hasValue:()=>a!==void 0,onDeselect:()=>e({width:void 0}),children:(0,Kn.jsx)(rse,{label:(0,Hg.__)("Width"),value:a,onChange:l=>e({width:l}),isResizing:n})}),t!=="horizontal"&&(0,Kn.jsx)(bl.__experimentalToolsPanelItem,{label:(0,Hg.__)("Height"),isShownByDefault:!0,hasValue:()=>r!=="100px",onDeselect:()=>e({height:"100px"}),children:(0,Kn.jsx)(rse,{label:(0,Hg.__)("Height"),value:r,onChange:l=>e({height:l}),isResizing:n})})]})})}var yl=o(v(),1),{useSpacingSizes:f3e}=K(fa.privateApis),ise=({orientation:e,onResizeStart:t,onResize:r,onResizeStop:a,isSelected:n,isResizing:i,setIsResizing:l,...s})=>{let c=m=>e==="horizontal"?m.clientWidth:m.clientHeight,u=m=>`${c(m)}px`;return(0,yl.jsx)(lse.ResizableBox,{className:w("block-library-spacer__resize-container",{"resize-horizontal":e==="horizontal","is-resizing":i,"is-selected":n}),onResizeStart:(m,p,d)=>{let f=u(d);t(f),r(f)},onResize:(m,p,d)=>{r(u(d)),i||l(!0)},onResizeStop:(m,p,d)=>{let f=c(d);a(`${f}px`),l(!1)},__experimentalShowTooltip:!0,__experimentalTooltipProps:{axis:e==="horizontal"?"x":"y",position:"corner",isVisible:i},showHandle:n,...s})},h3e=({attributes:e,isSelected:t,setAttributes:r,toggleSelection:a,context:n,__unstableParentLayout:i,className:l})=>{let s=(0,B8.useSelect)(oe=>oe(fa.store).getSettings()?.disableCustomSpacingSizes),{orientation:c}=n,{orientation:u,type:m,default:{type:p}={}}=i||{},d=m==="flex"||!m&&p==="flex",f=!u&&d?"horizontal":u||c,{height:h,width:g,style:b={}}=e,{layout:y={}}=b,{selfStretch:k,flexSize:_}=y,x=f3e(),[S,C]=(0,Og.useState)(!1),[N,B]=(0,Og.useState)(null),[D,A]=(0,Og.useState)(null),H=()=>a(!1),F=()=>a(!0),{__unstableMarkNextChangeAsNotPersistent:z}=(0,B8.useDispatch)(fa.store),I=oe=>{F(),d&&r({style:{...b,layout:{...y,flexSize:oe,selfStretch:"fixed"}}}),r({height:oe}),B(null)},R=oe=>{F(),d&&r({style:{...b,layout:{...y,flexSize:oe,selfStretch:"fixed"}}}),r({width:oe}),A(null)},$=()=>{if(!d)return N||(0,fa.getSpacingPresetCssVar)(h)||void 0},j=()=>{if(!d)return D||(0,fa.getSpacingPresetCssVar)(g)||void 0},G=f==="horizontal"?D||_:N||_,O={height:f==="horizontal"?24:$(),width:f==="horizontal"?j():void 0,minWidth:f==="vertical"&&d?48:void 0,flexBasis:d?G:void 0,flexGrow:d&&S?0:void 0},J=oe=>oe==="horizontal"?(0,yl.jsx)(ise,{minWidth:j2,enable:{top:!1,right:!0,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},orientation:oe,onResizeStart:H,onResize:A,onResizeStop:R,isSelected:t,isResizing:S,setIsResizing:C}):(0,yl.jsx)(yl.Fragment,{children:(0,yl.jsx)(ise,{minHeight:j2,enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},orientation:oe,onResizeStart:H,onResize:B,onResizeStop:I,isSelected:t,isResizing:S,setIsResizing:C})});(0,Og.useEffect)(()=>{let oe=X=>{z(),r(X)};if(d&&k!=="fill"&&k!=="fit"&&_===void 0)if(f==="horizontal"){let X=(0,fa.getCustomValueFromPreset)(g,x)||(0,fa.getCustomValueFromPreset)(h,x)||"100px";oe({width:"0px",style:{...b,layout:{...y,flexSize:X,selfStretch:"fixed"}}})}else{let X=(0,fa.getCustomValueFromPreset)(h,x)||(0,fa.getCustomValueFromPreset)(g,x)||"100px";oe({height:"0px",style:{...b,layout:{...y,flexSize:X,selfStretch:"fixed"}}})}else d&&(k==="fill"||k==="fit")?oe(f==="horizontal"?{width:void 0}:{height:void 0}):!d&&(k||_)&&oe({...f==="horizontal"?{width:_}:{height:_},style:{...b,layout:{...y,flexSize:void 0,selfStretch:void 0}}})},[b,_,h,f,d,y,k,r,x,g,z]);let ee=(0,fa.useBlockEditingMode)();return(0,yl.jsxs)(yl.Fragment,{children:[(0,yl.jsx)(sse.View,{...(0,fa.useBlockProps)({style:O,className:w(l,{"custom-sizes-disabled":s})}),children:ee==="default"&&J(f)}),!d&&(0,yl.jsx)(nse,{setAttributes:r,height:N||h,width:D||g,orientation:f,isResizing:S})]})},cse=h3e;var I8={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/spacer",title:"Spacer",category:"design",description:"Add white space between blocks and customize its height.",textdomain:"default",attributes:{height:{type:"string",default:"100px"},width:{type:"string"}},usesContext:["orientation"],supports:{anchor:!0,spacing:{margin:["top","bottom"],__experimentalDefaultControls:{margin:!0}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-spacer-editor",style:"wp-block-spacer"};var use=o(W(),1),v3e={to:[{type:"block",blocks:["core/separator"],transform:({anchor:e})=>(0,use.createBlock)("core/separator",{anchor:e||void 0})}]},mse=v3e;var U2=o(T(),1),pse=o(v(),1);function dse({attributes:e}){let{height:t,width:r,style:a}=e,{layout:{selfStretch:n}={}}=a||{},i=n==="fill"||n==="fit"?void 0:t;return(0,pse.jsx)("div",{...U2.useBlockProps.save({style:{height:(0,U2.getSpacingPresetCssVar)(i),width:(0,U2.getSpacingPresetCssVar)(r)},"aria-hidden":!0})})}var{name:fse}=I8,hse={icon:OP,transforms:mse,edit:cse,save:dse,deprecated:tse},b3e=()=>E({name:fse,metadata:I8,settings:hse});var BA={};Z(BA,{init:()=>k3e,metadata:()=>j8,name:()=>Sse,settings:()=>Tse});var xse=o(P(),1),rf=o(T(),1),F8=o(V(),1),Nu=o(U(),1);var z8=o(T(),1),jg=o(M(),1),R8=o(P(),1),bse=o(V(),1);var G2=o(P(),1),gse=o(W(),1),W2=o(T(),1),E8=o(M(),1),D8=o(V(),1),N8=o(v(),1);function fs({tabsClientId:e}){let{insertBlock:t}=(0,D8.useDispatch)(W2.store),{tabPanelClientId:r,nextTabIndex:a}=(0,D8.useSelect)(i=>{if(!e)return{tabPanelClientId:null,nextTabIndex:0};let{getBlocks:l}=i(W2.store),c=l(e).find(u=>u.name==="core/tab-panel");return{tabPanelClientId:c?.clientId||null,nextTabIndex:(c?.innerBlocks.length||0)+1}},[e]);return(0,N8.jsx)(W2.BlockControls,{group:"other",children:(0,N8.jsx)(E8.ToolbarGroup,{children:(0,N8.jsx)(E8.ToolbarButton,{className:"components-toolbar__control",onClick:()=>{if(!r)return;let i=(0,gse.createBlock)("core/tab",{anchor:"tab-"+a,label:(0,G2.sprintf)((0,G2.__)("Tab %d"),a)});t(i,void 0,r)},text:(0,G2.__)("Add tab")})})})}var $2=o(T(),1),M8=o(M(),1),vse=o(P(),1),A8=o(V(),1),L8=o(v(),1);function hs({tabsClientId:e}){let{removeBlock:t,updateBlockAttributes:r,selectBlock:a,__unstableMarkNextChangeAsNotPersistent:n}=(0,A8.useDispatch)($2.store),{activeTabClientId:i,tabCount:l,editorActiveTabIndex:s}=(0,A8.useSelect)(m=>{if(!e)return{activeTabClientId:null,tabCount:0,editorActiveTabIndex:0};let{getBlocks:p,getBlockAttributes:d}=m($2.store),f=d(e),h=f?.editorActiveTabIndex??f?.activeTabIndex??0,y=p(e).find(_=>_.name==="core/tab-panel")?.innerBlocks||[];return{activeTabClientId:y[h]?.clientId||null,tabCount:y.length,editorActiveTabIndex:h}},[e]),c=()=>{if(!i||l<=1)return;let m=s>=l-1?l-2:s;n(),r(e,{editorActiveTabIndex:m}),t(i,!1),e&&a(e)},u=l<=1||!i;return(0,L8.jsx)($2.BlockControls,{group:"other",children:(0,L8.jsx)(M8.ToolbarGroup,{children:(0,L8.jsx)(M8.ToolbarButton,{className:"components-toolbar__control",onClick:c,text:(0,vse.__)("Remove tab"),disabled:u})})})}var gs=o(v(),1);function yse({tabsClientId:e,blockIndex:t,isDefaultTab:r}){let{updateBlockAttributes:a}=(0,bse.useDispatch)(z8.store),n=q();return(0,gs.jsxs)(gs.Fragment,{children:[(0,gs.jsx)(fs,{tabsClientId:e}),(0,gs.jsx)(hs,{tabsClientId:e}),(0,gs.jsx)(z8.InspectorControls,{children:(0,gs.jsx)(jg.__experimentalToolsPanel,{label:(0,R8.__)("Settings"),resetAll:()=>{a(e,{activeTabIndex:0})},dropdownMenuProps:n,children:(0,gs.jsx)(jg.__experimentalToolsPanelItem,{label:(0,R8.__)("Default tab"),hasValue:()=>r&&t!==0,onDeselect:()=>{a(e,{activeTabIndex:0})},isShownByDefault:!0,children:(0,gs.jsx)(jg.CheckboxControl,{label:(0,R8.__)("Default tab"),checked:r,onChange:i=>{a(e,{activeTabIndex:i?t:0})}})})})})]})}var _se=o(mr(),1);function V8(e,t){let r=new window.DOMParser().parseFromString(e,"text/html");return r.body?.textContent?(0,_se.cleanForSlug)(r.body.textContent):`tab-panel-${t}`}var H8=o(v(),1),y3e=[["core/paragraph",{placeholder:(0,xse.__)("Type / to choose a block")}]],{cancelAnimationFrame:_3e}=window;function kse({attributes:e,clientId:t,context:r,isSelected:a,__unstableLayoutClassNames:n}){let i=(0,Nu.useRef)(),{anchor:l,label:s}=e,c=r["core/tabs-activeTabIndex"]??0,m=r["core/tabs-editorActiveTabIndex"]??c;(0,Nu.useEffect)(()=>()=>{i.current&&_3e(i.current)},[]);let{blockIndex:p,hasInnerBlocksSelected:d,tabsClientId:f}=(0,F8.useSelect)(N=>{let{getBlockRootClientId:B,getBlockIndex:D,hasSelectedInnerBlock:A}=N(rf.store),H=B(t),F=B(H),z=D(t),I=A(t,!0);return{blockIndex:z,hasInnerBlocksSelected:I,tabsClientId:F}},[t]),{updateBlockAttributes:h,__unstableMarkNextChangeAsNotPersistent:g}=(0,F8.useDispatch)(rf.store);(0,Nu.useEffect)(()=>{(a||d)&&f&&m!==p&&(g(),h(f,{editorActiveTabIndex:p}))},[a,d,f,m,p,h,g]);let b=m===p,y=c===p,k=(0,Nu.useMemo)(()=>!!(a||d||b),[a,d,b]),_=(0,Nu.useMemo)(()=>l||V8(s,p),[l,s,p]),x=(0,Nu.useMemo)(()=>`${_}--tab`,[_]),S=(0,rf.useBlockProps)({hidden:!k,"aria-labelledby":x,id:_,role:"tabpanel",tabIndex:k?0:-1,className:w("wp-block-tab__editor-content",n)}),C=(0,rf.useInnerBlocksProps)(S,{template:y3e});return(0,H8.jsxs)("section",{...C,children:[(0,H8.jsx)(yse,{tabsClientId:f,blockIndex:p,isDefaultTab:y}),k&&C.children]})}var O8=o(T(),1),wse=o(v(),1);function Cse({attributes:e}){let{anchor:t}=e,r=t,a=O8.useBlockProps.save({role:"tabpanel"}),n=O8.useInnerBlocksProps.save(a);return(0,wse.jsx)("section",{...n,id:r})}var j8={$schema:"https://schemas.wp.org/trunk/block.json",__experimental:!0,apiVersion:3,name:"core/tab",title:"Tab",description:"Content for a tab in a tabbed interface.",version:"1.0.0",category:"design",textdomain:"default",attributes:{label:{type:"string",default:""}},parent:["core/tab-panel"],usesContext:["core/tabs-activeTabIndex","core/tabs-editorActiveTabIndex"],supports:{anchor:!0,html:!1,reusable:!1,color:{background:!0,text:!0,__experimentalDefaultControls:{background:!0,text:!0}},layout:!0,spacing:{blockGap:!0,padding:!0,margin:!1},typography:{fontSize:!0,__experimentalFontFamily:!0,__experimentalDefaultControls:{fontSize:!0,__experimentalFontFamily:!0}},renaming:!0},providesContext:{"core/tab-label":"label"},editorScript:"file:./index.js",style:"file:./style-index.css"};var{name:Sse}=j8,Tse={icon:sB,edit:kse,save:Cse},k3e=()=>E({name:Sse,metadata:j8,settings:Tse});var IA={};Z(IA,{init:()=>S3e,metadata:()=>G8,name:()=>Ese,settings:()=>Dse});var Ug=o(T(),1),Pse=o(V(),1);var Km=o(v(),1),w3e=[["core/tab",{}]];function Bse({clientId:e}){let t=(0,Ug.useBlockProps)(),r=(0,Ug.useInnerBlocksProps)(t,{template:w3e,templateLock:!1,renderAppender:!1}),a=(0,Pse.useSelect)(n=>{let{getBlockRootClientId:i}=n(Ug.store);return i(e)},[e]);return(0,Km.jsxs)(Km.Fragment,{children:[(0,Km.jsx)(fs,{tabsClientId:a}),(0,Km.jsx)(hs,{tabsClientId:a}),(0,Km.jsx)("div",{...r})]})}var U8=o(T(),1),Ise=o(v(),1);function Nse(){let e=U8.useBlockProps.save(),t=U8.useInnerBlocksProps.save(e);return(0,Ise.jsx)("div",{...t})}var G8={$schema:"https://schemas.wp.org/trunk/block.json",__experimental:!0,apiVersion:3,name:"core/tab-panel",title:"Tab Panel",description:"Container for tab panel content in a tabbed interface.",version:"1.0.0",category:"design",textdomain:"default",parent:["core/tabs"],allowedBlocks:["core/tab"],attributes:{},supports:{anchor:!1,html:!1,reusable:!1,lock:!1,dimensions:{aspectRatio:!1,height:!1,minHeight:!1,width:!1},color:{background:!0,text:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{blockGap:!1,padding:!0,margin:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},layout:{default:{type:"flex",flexWrap:"nowrap",justifyContent:"stretch",orientation:"vertical"},allowSwitching:!1,allowVerticalAlignment:!1,allowOrientation:!1,allowJustification:!0,allowSizingOnChildren:!1},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0}},editorScript:"file:./index.js",style:"file:./style-index.css"};var{name:Ese}=G8,Dse={icon:E0,edit:Bse,save:Nse},S3e=()=>E({name:Ese,metadata:G8,settings:Dse});var FA={};Z(FA,{init:()=>j3e,metadata:()=>W8,name:()=>Wse,settings:()=>$se});var Pc=o(P(),1);var Jt=o(T(),1),ot=o(v(),1),Lse={"subtle-light-gray":"#f3f4f5","subtle-pale-green":"#e9fbe5","subtle-pale-blue":"#e7f5fe","subtle-pale-pink":"#fcf0ef"},NA={content:{type:"rich-text",source:"rich-text"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"},colspan:{type:"string",source:"attribute",attribute:"colspan"},rowspan:{type:"string",source:"attribute",attribute:"rowspan"}},T3e={attributes:{hasFixedLayout:{type:"boolean",default:!1},caption:{type:"rich-text",source:"rich-text",selector:"figcaption"},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:NA}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:NA}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:NA}}}},supports:{anchor:!0,align:!0,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{__experimentalSkipSerialization:!0,color:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,style:!0,width:!0}},__experimentalSelector:".wp-block-table > table",interactivity:{clientNavigation:!0}},save({attributes:e}){let{hasFixedLayout:t,head:r,body:a,foot:n,caption:i}=e;if(!r.length&&!a.length&&!n.length)return null;let s=(0,Jt.__experimentalGetColorClassesAndStyles)(e),c=(0,Jt.__experimentalGetBorderClassesAndStyles)(e),u=w(s.className,c.className,{"has-fixed-layout":t}),m=!Jt.RichText.isEmpty(i),p=({type:d,rows:f})=>{if(!f.length)return null;let h=`t${d}`;return(0,ot.jsx)(h,{children:f.map(({cells:g},b)=>(0,ot.jsx)("tr",{children:g.map(({content:y,tag:k,scope:_,align:x,colspan:S,rowspan:C},N)=>{let B=w({[`has-text-align-${x}`]:x});return(0,ot.jsx)(Jt.RichText.Content,{className:B||void 0,"data-align":x,tagName:k,value:y,scope:k==="th"?_:void 0,colSpan:S,rowSpan:C},N)})},b))})};return(0,ot.jsxs)("figure",{...Jt.useBlockProps.save(),children:[(0,ot.jsxs)("table",{className:u===""?void 0:u,style:{...s.style,...c.style},children:[(0,ot.jsx)(p,{type:"head",rows:r}),(0,ot.jsx)(p,{type:"body",rows:a}),(0,ot.jsx)(p,{type:"foot",rows:n})]}),m&&(0,ot.jsx)(Jt.RichText.Content,{tagName:"figcaption",value:i,className:(0,Jt.__experimentalGetElementClassName)("caption")})]})}},EA={content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}},P3e={attributes:{hasFixedLayout:{type:"boolean",default:!1},caption:{type:"string",source:"html",selector:"figcaption",default:""},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:EA}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:EA}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:EA}}}},supports:{anchor:!0,align:!0,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{__experimentalSkipSerialization:!0,color:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,style:!0,width:!0}},__experimentalSelector:".wp-block-table > table"},save({attributes:e}){let{hasFixedLayout:t,head:r,body:a,foot:n,caption:i}=e;if(!r.length&&!a.length&&!n.length)return null;let s=(0,Jt.__experimentalGetColorClassesAndStyles)(e),c=(0,Jt.__experimentalGetBorderClassesAndStyles)(e),u=w(s.className,c.className,{"has-fixed-layout":t}),m=!Jt.RichText.isEmpty(i),p=({type:d,rows:f})=>{if(!f.length)return null;let h=`t${d}`;return(0,ot.jsx)(h,{children:f.map(({cells:g},b)=>(0,ot.jsx)("tr",{children:g.map(({content:y,tag:k,scope:_,align:x},S)=>{let C=w({[`has-text-align-${x}`]:x});return(0,ot.jsx)(Jt.RichText.Content,{className:C||void 0,"data-align":x,tagName:k,value:y,scope:k==="th"?_:void 0},S)})},b))})};return(0,ot.jsxs)("figure",{...Jt.useBlockProps.save(),children:[(0,ot.jsxs)("table",{className:u===""?void 0:u,style:{...s.style,...c.style},children:[(0,ot.jsx)(p,{type:"head",rows:r}),(0,ot.jsx)(p,{type:"body",rows:a}),(0,ot.jsx)(p,{type:"foot",rows:n})]}),m&&(0,ot.jsx)(Jt.RichText.Content,{tagName:"figcaption",value:i})]})}},DA={content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}},B3e={attributes:{hasFixedLayout:{type:"boolean",default:!1},backgroundColor:{type:"string"},caption:{type:"string",source:"html",selector:"figcaption",default:""},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:DA}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:DA}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:DA}}}},supports:{anchor:!0,align:!0,__experimentalSelector:".wp-block-table > table"},save:({attributes:e})=>{let{hasFixedLayout:t,head:r,body:a,foot:n,backgroundColor:i,caption:l}=e;if(!r.length&&!a.length&&!n.length)return null;let c=(0,Jt.getColorClassName)("background-color",i),u=w(c,{"has-fixed-layout":t,"has-background":!!c}),m=!Jt.RichText.isEmpty(l),p=({type:d,rows:f})=>{if(!f.length)return null;let h=`t${d}`;return(0,ot.jsx)(h,{children:f.map(({cells:g},b)=>(0,ot.jsx)("tr",{children:g.map(({content:y,tag:k,scope:_,align:x},S)=>{let C=w({[`has-text-align-${x}`]:x});return(0,ot.jsx)(Jt.RichText.Content,{className:C||void 0,"data-align":x,tagName:k,value:y,scope:k==="th"?_:void 0},S)})},b))})};return(0,ot.jsxs)("figure",{...Jt.useBlockProps.save(),children:[(0,ot.jsxs)("table",{className:u===""?void 0:u,children:[(0,ot.jsx)(p,{type:"head",rows:r}),(0,ot.jsx)(p,{type:"body",rows:a}),(0,ot.jsx)(p,{type:"foot",rows:n})]}),m&&(0,ot.jsx)(Jt.RichText.Content,{tagName:"figcaption",value:l})]})},isEligible:e=>e.backgroundColor&&e.backgroundColor in Lse&&!e.style,migrate:e=>({...e,backgroundColor:void 0,style:{color:{background:Lse[e.backgroundColor]}}})},LA={content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"}},I3e={attributes:{hasFixedLayout:{type:"boolean",default:!1},backgroundColor:{type:"string"},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:LA}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:LA}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:LA}}}},supports:{align:!0},save({attributes:e}){let{hasFixedLayout:t,head:r,body:a,foot:n,backgroundColor:i}=e;if(!r.length&&!a.length&&!n.length)return null;let s=(0,Jt.getColorClassName)("background-color",i),c=w(s,{"has-fixed-layout":t,"has-background":!!s}),u=({type:m,rows:p})=>{if(!p.length)return null;let d=`t${m}`;return(0,ot.jsx)(d,{children:p.map(({cells:f},h)=>(0,ot.jsx)("tr",{children:f.map(({content:g,tag:b,scope:y},k)=>(0,ot.jsx)(Jt.RichText.Content,{tagName:b,value:g,scope:b==="th"?y:void 0},k))},h))})};return(0,ot.jsxs)("table",{className:c,children:[(0,ot.jsx)(u,{type:"head",rows:r}),(0,ot.jsx)(u,{type:"body",rows:a}),(0,ot.jsx)(u,{type:"foot",rows:n})]})}},Mse=[T3e,P3e,B3e,I3e];var Qn=o(U(),1),ko=o(T(),1),Pt=o(P(),1),Ur=o(M(),1);var N3e=["align"];function Ase({rowCount:e,columnCount:t}){return{body:Array.from({length:e}).map(()=>({cells:Array.from({length:t}).map(()=>({content:"",tag:"td"}))}))}}function E3e(e){if(!Qm(e.head))return e.head[0];if(!Qm(e.body))return e.body[0];if(!Qm(e.foot))return e.foot[0]}function Rse(e,t,r){let{sectionName:a,rowIndex:n,columnIndex:i}=t;return e[a]?.[n]?.cells?.[i]?.[r]}function MA(e,t,r){if(!t)return e;let a=Object.fromEntries(Object.entries(e).filter(([l])=>["head","body","foot"].includes(l))),{sectionName:n,rowIndex:i}=t;return Object.fromEntries(Object.entries(a).map(([l,s])=>n&&n!==l?[l,s]:[l,s.map((c,u)=>i&&i!==u?c:{cells:c.cells.map((m,p)=>D3e({sectionName:l,columnIndex:p,rowIndex:u},t)?r(m):m)})]))}function D3e(e,t){if(!e||!t)return!1;switch(t.type){case"column":return t.type==="column"&&e.columnIndex===t.columnIndex;case"cell":return t.type==="cell"&&e.sectionName===t.sectionName&&e.columnIndex===t.columnIndex&&e.rowIndex===t.rowIndex}}function AA(e,{sectionName:t,rowIndex:r,columnCount:a}){let n=E3e(e),i=a===void 0?n?.cells?.length:a;return i?{[t]:[...e[t].slice(0,r),{cells:Array.from({length:i}).map((l,s)=>{let c=n?.cells?.[s]??{};return{...Object.fromEntries(Object.entries(c).filter(([m])=>N3e.includes(m))),content:"",tag:t==="head"?"th":"td"}})},...e[t].slice(r)]}:e}function zse(e,{sectionName:t,rowIndex:r}){return{[t]:e[t].filter((a,n)=>n!==r)}}function Vse(e,{columnIndex:t}){let r=Object.fromEntries(Object.entries(e).filter(([a])=>["head","body","foot"].includes(a)));return Object.fromEntries(Object.entries(r).map(([a,n])=>Qm(n)?[a,n]:[a,n.map(i=>Hse(i)||i.cells.length<t?i:{cells:[...i.cells.slice(0,t),{content:"",tag:a==="head"?"th":"td"},...i.cells.slice(t)]})]))}function Fse(e,{columnIndex:t}){let r=Object.fromEntries(Object.entries(e).filter(([a])=>["head","body","foot"].includes(a)));return Object.fromEntries(Object.entries(r).map(([a,n])=>Qm(n)?[a,n]:[a,n.map(i=>({cells:i.cells.length>=t?i.cells.filter((l,s)=>s!==t):i.cells})).filter(i=>i.cells.length)]))}function RA(e,t){if(!Qm(e[t]))return{[t]:[]};let r=e.body?.[0]?.cells?.length??1;return AA(e,{sectionName:t,rowIndex:0,columnCount:r})}function Qm(e){return!e||!e.length||e.every(Hse)}function Hse(e){return!(e.cells&&e.cells.length)}var st=o(v(),1),L3e=[{icon:IS,title:(0,Pt.__)("Align column left"),align:"left"},{icon:PS,title:(0,Pt.__)("Align column center"),align:"center"},{icon:LS,title:(0,Pt.__)("Align column right"),align:"right"}],M3e={head:(0,Pt.__)("Header cell text"),body:(0,Pt.__)("Body cell text"),foot:(0,Pt.__)("Footer cell text")},A3e={head:(0,Pt.__)("Header label"),foot:(0,Pt.__)("Footer label")};function R3e({name:e,...t}){let r=`t${e}`;return(0,st.jsx)(r,{...t})}function z3e({attributes:e,setAttributes:t,insertBlocksAfter:r,isSelected:a}){let{hasFixedLayout:n,head:i,foot:l}=e,[s,c]=(0,Qn.useState)(2),[u,m]=(0,Qn.useState)(2),[p,d]=(0,Qn.useState)(),f=(0,ko.__experimentalUseColorProps)(e),h=(0,ko.__experimentalUseBorderProps)(e),g=(0,ko.useBlockEditingMode)(),b=(0,Qn.useRef)(),[y,k]=(0,Qn.useState)(!1),_=q();function x(ne){m(ne)}function S(ne){c(ne)}function C(ne){ne.preventDefault(),t(Ase({rowCount:parseInt(s,10)||2,columnCount:parseInt(u,10)||2})),k(!0)}function N(){t({hasFixedLayout:!n})}let B=(0,Qn.useCallback)(function(ne){p&&t(le=>MA(le,p,pe=>({...pe,content:ne})))},[p,t]);function D(ne){if(!p)return;let le={type:"column",columnIndex:p.columnIndex},pe=MA(e,le,Ie=>({...Ie,align:ne}));t(pe)}function A(){if(p)return Rse(e,p,"align")}function H(){t(RA(e,"head"))}function F(){t(RA(e,"foot"))}function z(ne){if(!p)return;let{sectionName:le,rowIndex:pe}=p,Ie=pe+ne;t(AA(e,{sectionName:le,rowIndex:Ie})),d({sectionName:le,rowIndex:Ie,columnIndex:0,type:"cell"})}function I(){z(0)}function R(){z(1)}function $(){if(!p)return;let{sectionName:ne,rowIndex:le}=p;d(),t(zse(e,{sectionName:ne,rowIndex:le}))}function j(ne=0){if(!p)return;let{columnIndex:le}=p,pe=le+ne;t(Vse(e,{columnIndex:pe})),d({rowIndex:0,columnIndex:pe,type:"cell"})}function G(){j(0)}function O(){j(1)}function J(){if(!p)return;let{sectionName:ne,columnIndex:le}=p;d(),t(Fse(e,{sectionName:ne,columnIndex:le}))}(0,Qn.useEffect)(()=>{a||d()},[a]),(0,Qn.useEffect)(()=>{y&&(b?.current?.querySelector('td div[contentEditable="true"]')?.focus(),k(!1))},[y]);let ee=["head","body","foot"].filter(ne=>!Qm(e[ne])),oe=[{icon:bB,title:(0,Pt.__)("Insert row before"),isDisabled:!p,onClick:I},{icon:gB,title:(0,Pt.__)("Insert row after"),isDisabled:!p,onClick:R},{icon:_B,title:(0,Pt.__)("Delete row"),isDisabled:!p,onClick:$},{icon:pB,title:(0,Pt.__)("Insert column before"),isDisabled:!p,onClick:G},{icon:uB,title:(0,Pt.__)("Insert column after"),isDisabled:!p,onClick:O},{icon:fB,title:(0,Pt.__)("Delete column"),isDisabled:!p,onClick:J}],X=ee.map(ne=>(0,st.jsx)(R3e,{name:ne,children:e[ne].map(({cells:le},pe)=>(0,st.jsx)("tr",{children:le.map((Ie,Ne)=>{let ae=p?.sectionName===ne&&p?.rowIndex===pe&&p?.columnIndex===Ne;return(0,st.jsx)(V3e,{name:ne,rowIndex:pe,columnIndex:Ne,onChange:ae?B:void 0,setSelectedCell:d,...Ie},Ne)})},pe))},ne)),te=!ee.length;return(0,st.jsxs)("figure",{...(0,ko.useBlockProps)({ref:b}),children:[!te&&g==="default"&&(0,st.jsxs)(st.Fragment,{children:[(0,st.jsx)(ko.BlockControls,{group:"block",children:(0,st.jsx)(ko.AlignmentControl,{label:(0,Pt.__)("Change column alignment"),alignmentControls:L3e,value:A(),onChange:ne=>D(ne)})}),(0,st.jsx)(ko.BlockControls,{group:"other",children:(0,st.jsx)(Ur.ToolbarDropdownMenu,{icon:kB,label:(0,Pt.__)("Edit table"),controls:oe})})]}),(0,st.jsx)(ko.InspectorControls,{children:(0,st.jsxs)(Ur.__experimentalToolsPanel,{label:(0,Pt.__)("Settings"),resetAll:()=>{t({hasFixedLayout:!0,head:[],foot:[]})},dropdownMenuProps:_,children:[(0,st.jsx)(Ur.__experimentalToolsPanelItem,{hasValue:()=>n!==!0,label:(0,Pt.__)("Fixed width table cells"),onDeselect:()=>t({hasFixedLayout:!0}),isShownByDefault:!0,children:(0,st.jsx)(Ur.ToggleControl,{label:(0,Pt.__)("Fixed width table cells"),checked:!!n,onChange:N})}),!te&&(0,st.jsxs)(st.Fragment,{children:[(0,st.jsx)(Ur.__experimentalToolsPanelItem,{hasValue:()=>i&&i.length,label:(0,Pt.__)("Header section"),onDeselect:()=>t({head:[]}),isShownByDefault:!0,children:(0,st.jsx)(Ur.ToggleControl,{label:(0,Pt.__)("Header section"),checked:!!(i&&i.length),onChange:H})}),(0,st.jsx)(Ur.__experimentalToolsPanelItem,{hasValue:()=>l&&l.length,label:(0,Pt.__)("Footer section"),onDeselect:()=>t({foot:[]}),isShownByDefault:!0,children:(0,st.jsx)(Ur.ToggleControl,{label:(0,Pt.__)("Footer section"),checked:!!(l&&l.length),onChange:F})})]})]})}),!te&&(0,st.jsx)("table",{className:w(f.className,h.className,{"has-fixed-layout":n,"has-individual-borders":(0,Ur.__experimentalHasSplitBorders)(e?.style?.border)}),style:{...f.style,...h.style},children:X}),te?(0,st.jsx)(Ur.Placeholder,{label:(0,Pt.__)("Table"),icon:(0,st.jsx)(ko.BlockIcon,{icon:C0,showColors:!0}),instructions:(0,Pt.__)("Insert a table for sharing data."),children:(0,st.jsxs)("form",{className:"blocks-table__placeholder-form",onSubmit:C,children:[(0,st.jsx)(Ur.TextControl,{__next40pxDefaultSize:!0,type:"number",label:(0,Pt.__)("Column count"),value:u,onChange:x,min:"1",className:"blocks-table__placeholder-input"}),(0,st.jsx)(Ur.TextControl,{__next40pxDefaultSize:!0,type:"number",label:(0,Pt.__)("Row count"),value:s,onChange:S,min:"1",className:"blocks-table__placeholder-input"}),(0,st.jsx)(Ur.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,Pt.__)("Create Table")})]})}):(0,st.jsx)(_a,{attributes:e,setAttributes:t,isSelected:a,insertBlocksAfter:r,label:(0,Pt.__)("Table caption text"),showToolbarButton:a&&g==="default"})]})}var V3e=(0,Qn.memo)(function({tag:e,name:t,scope:r,colspan:a,rowspan:n,rowIndex:i,columnIndex:l,align:s,content:c,onChange:u,setSelectedCell:m}){return(0,st.jsx)(e,{scope:e==="th"?r:void 0,colSpan:a,rowSpan:n,className:w({[`has-text-align-${s}`]:s},"wp-block-table__cell-content"),children:(0,st.jsx)(ko.RichText,{value:c,onChange:u,onFocus:()=>{m({sectionName:t,rowIndex:i,columnIndex:l,type:"cell"})},"aria-label":M3e[t],placeholder:A3e[t]})})}),Ose=z3e;var W8={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/table",title:"Table",category:"text",description:"Create structured content in rows and columns to display information.",textdomain:"default",attributes:{hasFixedLayout:{type:"boolean",default:!0},caption:{type:"rich-text",source:"rich-text",selector:"figcaption",role:"content"},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"rich-text",source:"rich-text",role:"content"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"},colspan:{type:"string",source:"attribute",attribute:"colspan"},rowspan:{type:"string",source:"attribute",attribute:"rowspan"}}}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"rich-text",source:"rich-text",role:"content"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"},colspan:{type:"string",source:"attribute",attribute:"colspan"},rowspan:{type:"string",source:"attribute",attribute:"rowspan"}}}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"rich-text",source:"rich-text",role:"content"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"},colspan:{type:"string",source:"attribute",attribute:"colspan"},rowspan:{type:"string",source:"attribute",attribute:"rowspan"}}}}}},supports:{anchor:!0,align:!0,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{__experimentalSkipSerialization:!0,color:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,style:!0,width:!0}},interactivity:{clientNavigation:!0}},selectors:{root:".wp-block-table > table",spacing:".wp-block-table"},styles:[{name:"regular",label:"Default",isDefault:!0},{name:"stripes",label:"Stripes"}],editorStyle:"wp-block-table-editor",style:"wp-block-table"};var _l=o(T(),1),vs=o(v(),1);function jse({attributes:e}){let{hasFixedLayout:t,head:r,body:a,foot:n,caption:i}=e;if(!r.length&&!a.length&&!n.length)return null;let s=(0,_l.__experimentalGetColorClassesAndStyles)(e),c=(0,_l.__experimentalGetBorderClassesAndStyles)(e),u=w(s.className,c.className,{"has-fixed-layout":t}),m=!_l.RichText.isEmpty(i),p=({type:d,rows:f})=>{if(!f.length)return null;let h=`t${d}`;return(0,vs.jsx)(h,{children:f.map(({cells:g},b)=>(0,vs.jsx)("tr",{children:g.map(({content:y,tag:k,scope:_,align:x,colspan:S,rowspan:C},N)=>{let B=w({[`has-text-align-${x}`]:x});return(0,vs.jsx)(_l.RichText.Content,{className:B||void 0,"data-align":x,tagName:k,value:y,scope:k==="th"?_:void 0,colSpan:S,rowSpan:C},N)})},b))})};return(0,vs.jsxs)("figure",{..._l.useBlockProps.save(),children:[(0,vs.jsxs)("table",{className:u===""?void 0:u,style:{...s.style,...c.style},children:[(0,vs.jsx)(p,{type:"head",rows:r}),(0,vs.jsx)(p,{type:"body",rows:a}),(0,vs.jsx)(p,{type:"foot",rows:n})]}),m&&(0,vs.jsx)(_l.RichText.Content,{tagName:"figcaption",value:i,className:(0,_l.__experimentalGetElementClassName)("caption")})]})}var Use=o(W(),1);function zA(e){let t=parseInt(e,10);if(Number.isInteger(t))return t<0||t===1?void 0:t.toString()}var VA=({phrasingContentSchema:e})=>({tr:{allowEmpty:!0,children:{th:{allowEmpty:!0,children:e,attributes:["scope","colspan","rowspan","style"]},td:{allowEmpty:!0,children:e,attributes:["colspan","rowspan","style"]}}}}),H3e=e=>({table:{children:{thead:{allowEmpty:!0,children:VA(e)},tfoot:{allowEmpty:!0,children:VA(e)},tbody:{allowEmpty:!0,children:VA(e)}}}}),O3e={from:[{type:"raw",selector:"table",schema:H3e,transform:e=>{let t=Array.from(e.children).reduce((r,a)=>{if(!a.children.length)return r;let n=a.nodeName.toLowerCase().slice(1),i=Array.from(a.children).reduce((l,s)=>{if(!s.children.length)return l;let c=Array.from(s.children).reduce((u,m)=>{let p=zA(m.getAttribute("rowspan")),d=zA(m.getAttribute("colspan")),{textAlign:f}=m.style||{},h;return(f==="left"||f==="center"||f==="right")&&(h=f),u.push({tag:m.nodeName.toLowerCase(),content:m.innerHTML,rowspan:p,colspan:d,align:h}),u},[]);return l.push({cells:c}),l},[]);return r[n]=i,r},{});return(0,Use.createBlock)("core/table",t)}}]},Gse=O3e;var{name:Wse}=W8,$se={icon:C0,example:{attributes:{head:[{cells:[{content:(0,Pc.__)("Version"),tag:"th"},{content:(0,Pc.__)("Jazz Musician"),tag:"th"},{content:(0,Pc.__)("Release Date"),tag:"th"}]}],body:[{cells:[{content:"5.2",tag:"td"},{content:(0,Pc.__)("Jaco Pastorius"),tag:"td"},{content:(0,Pc.__)("May 7, 2019"),tag:"td"}]},{cells:[{content:"5.1",tag:"td"},{content:(0,Pc.__)("Betty Carter"),tag:"td"},{content:(0,Pc.__)("February 21, 2019"),tag:"td"}]},{cells:[{content:"5.0",tag:"td"},{content:(0,Pc.__)("Bebo Vald\xE9s"),tag:"td"},{content:(0,Pc.__)("December 6, 2018"),tag:"td"}]}]},viewportWidth:450},transforms:Gse,edit:Ose,save:jse,deprecated:Mse},j3e=()=>E({name:Wse,metadata:W8,settings:$se});var OA={};Z(OA,{init:()=>$3e,metadata:()=>$8,name:()=>lce,settings:()=>sce});var Eu=o(P(),1);var $8={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/table-of-contents",title:"Table of Contents",category:"design",description:"Summarize your post with a list of headings. Add HTML anchors to Heading blocks to link them here.",keywords:["document outline","summary"],textdomain:"default",attributes:{headings:{type:"array",items:{type:"object"},default:[]},onlyIncludeCurrentPage:{type:"boolean",default:!1},maxLevel:{type:"number"},ordered:{type:"boolean",default:!0}},supports:{anchor:!0,ariaLabel:!0,html:!1,color:{text:!0,background:!0,gradients:!0,link:!0},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},style:"wp-block-table-of-contents"};var bs=o(T(),1),tce=o(W(),1),Ho=o(M(),1),K2=o(V(),1),rce=o(U(),1),zt=o(P(),1),oce=o(me(),1),ace=o(xr(),1);var Bc=o(v(),1),qse="wp-block-table-of-contents__entry";function Gg({nestedHeadingList:e,disableLinkActivation:t,onClick:r,ordered:a=!0}){return(0,Bc.jsx)(Bc.Fragment,{children:e.map((n,i)=>{let{content:l,link:s}=n.heading,c=s?(0,Bc.jsx)("a",{className:qse,href:s,"aria-disabled":t||void 0,onClick:t&&typeof r=="function"?r:void 0,children:l}):(0,Bc.jsx)("span",{className:qse,children:l}),u=a?"ol":"ul";return(0,Bc.jsxs)("li",{children:[c,n.children?(0,Bc.jsx)(u,{children:(0,Bc.jsx)(Gg,{nestedHeadingList:n.children,disableLinkActivation:t,onClick:t&&typeof r=="function"?r:void 0,ordered:a})}):null]},i)})})}function q2(e){let t=[];return e.forEach((r,a)=>{if(r.content!==""&&r.level===e[0].level)if(e[a+1]?.level>r.level){let n=e.length;for(let i=a+1;i<e.length;i++)if(e[i].level===r.level){n=i;break}t.push({heading:r,children:q2(e.slice(a+1,n))})}else t.push({heading:r,children:null})}),t}var Qse=o(Kse(),1),Yse=o(V(),1),Xse=o(ai(),1),Jse=o(U(),1),Z2=o(mr(),1),q8=o(T(),1);function G3e(e,t){let{getBlockAttributes:r,getBlockName:a,getBlocksByName:n,getClientIdsOfDescendants:i}=e(q8.store),l=e("core/editor").getPermalink()??null,s=n("core/nextpage").length!==0,{onlyIncludeCurrentPage:c,maxLevel:u}=r(t)??{},[m=""]=n("core/post-content"),p=i(m),d=1;if(s&&c){let b=p.indexOf(t);for(let[y,k]of p.entries()){if(y>=b)break;a(k)==="core/nextpage"&&d++}}let f=[],h=1,g=null;typeof l=="string"&&(g=s?(0,Z2.addQueryArgs)(l,{page:h}):l);for(let b of p){let y=a(b);if(y==="core/nextpage"){if(h++,c&&h>d)break;typeof l=="string"&&(g=(0,Z2.addQueryArgs)((0,Z2.removeQueryArgs)(l,["page"]),{page:h}))}else if((!c||h===d)&&y==="core/heading"){let k=r(b);if(u&&k.level>u)continue;let _=typeof g=="string"&&typeof k.anchor=="string"&&k.anchor!=="";f.push({content:(0,Xse.__unstableStripHTML)(k.content.replace(/(<br *\/?>)+/g," ")),level:k.level,link:_?`${g}#${k.anchor}`:null})}}return f}function W3e(e,t,r){let{getBlockAttributes:a}=e(q8.store),{updateBlockAttributes:n,__unstableMarkNextChangeAsNotPersistent:i}=t(q8.store),l=a(r);if(l===null)return;let s=G3e(e,r);(0,Qse.default)(s,l.headings)||window.queueMicrotask(()=>{i(),n(r,{headings:s})})}function ece(e){let t=(0,Yse.useRegistry)();(0,Jse.useEffect)(()=>t.subscribe(()=>W3e(t.select,t.dispatch,e)),[t,e])}var er=o(v(),1);function HA({attributes:{headings:e=[],onlyIncludeCurrentPage:t,maxLevel:r,ordered:a=!0},clientId:n,setAttributes:i}){ece(n);let l=(0,bs.useBlockProps)(),s=(0,oce.useInstanceId)(HA,"table-of-contents"),{createWarningNotice:c}=(0,K2.useDispatch)(ace.store),u=y=>{y.preventDefault(),c((0,zt.__)("Links are disabled in the editor."),{id:`block-library/core/table-of-contents/redirection-prevented/${s}`,type:"snackbar"})},m=(0,K2.useSelect)(y=>{let{getBlockRootClientId:k,canInsertBlockType:_}=y(bs.store),x=k(n);return _("core/list",x)},[n]),{replaceBlocks:p}=(0,K2.useDispatch)(bs.store),d=q(),f=q2(e),h=(0,er.jsxs)(bs.BlockControls,{children:[(0,er.jsxs)(Ho.ToolbarGroup,{children:[(0,er.jsx)(Ho.ToolbarButton,{icon:(0,zt.isRTL)()?z0:V0,title:(0,zt.__)("Unordered"),description:(0,zt.__)("Convert to unordered list"),onClick:()=>i({ordered:!1}),isActive:a===!1}),(0,er.jsx)(Ho.ToolbarButton,{icon:(0,zt.isRTL)()?F0:Ki,title:(0,zt.__)("Ordered"),description:(0,zt.__)("Convert to ordered list"),onClick:()=>i({ordered:!0}),isActive:a===!0})]}),m&&(0,er.jsx)(Ho.ToolbarGroup,{children:(0,er.jsx)(Ho.ToolbarButton,{onClick:()=>p(n,(0,tce.createBlock)("core/list",{ordered:a,values:(0,rce.renderToString)((0,er.jsx)(Gg,{nestedHeadingList:f,ordered:a}))})),children:(0,zt.__)("Convert to static list")})})]}),g=(0,er.jsx)(bs.InspectorControls,{children:(0,er.jsxs)(Ho.__experimentalToolsPanel,{label:(0,zt.__)("Settings"),resetAll:()=>{i({onlyIncludeCurrentPage:!1,maxLevel:void 0,ordered:!0})},dropdownMenuProps:d,children:[(0,er.jsx)(Ho.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:(0,zt.__)("Only include current page"),onDeselect:()=>i({onlyIncludeCurrentPage:!1}),isShownByDefault:!0,children:(0,er.jsx)(Ho.ToggleControl,{label:(0,zt.__)("Only include current page"),checked:t,onChange:y=>i({onlyIncludeCurrentPage:y}),help:t?(0,zt.__)("Only including headings from the current page (if the post is paginated)."):(0,zt.__)("Include headings from all pages (if the post is paginated).")})}),(0,er.jsx)(Ho.__experimentalToolsPanelItem,{hasValue:()=>!!r,label:(0,zt.__)("Limit heading levels"),onDeselect:()=>i({maxLevel:void 0}),isShownByDefault:!0,children:(0,er.jsx)(Ho.SelectControl,{__next40pxDefaultSize:!0,label:(0,zt.__)("Include headings down to level"),value:r||"",options:[{value:"",label:(0,zt.__)("All levels")},{value:"1",label:(0,zt.__)("Heading 1")},{value:"2",label:(0,zt.__)("Heading 2")},{value:"3",label:(0,zt.__)("Heading 3")},{value:"4",label:(0,zt.__)("Heading 4")},{value:"5",label:(0,zt.__)("Heading 5")},{value:"6",label:(0,zt.__)("Heading 6")}],onChange:y=>i({maxLevel:y?parseInt(y):void 0}),help:r?(0,zt.__)("Only include headings up to and including this level."):(0,zt.__)("Including all heading levels in the table of contents.")})})]})});return e.length===0?(0,er.jsxs)(er.Fragment,{children:[(0,er.jsx)("div",{...l,children:(0,er.jsx)(Ho.Placeholder,{icon:(0,er.jsx)(bs.BlockIcon,{icon:d1}),label:(0,zt.__)("Table of Contents"),instructions:(0,zt.__)("Start adding Heading blocks to create a table of contents. Headings with HTML anchors will be linked here.")})}),g]}):(0,er.jsxs)(er.Fragment,{children:[(0,er.jsx)("nav",{...l,children:(0,er.jsx)(a?"ol":"ul",{children:(0,er.jsx)(Gg,{nestedHeadingList:f,disableLinkActivation:!0,onClick:u,ordered:a})})}),h,g]})}var nce=o(T(),1);var Z8=o(v(),1);function ice({attributes:{headings:e=[],ordered:t=!0}}){if(e.length===0)return null;let r=t?"ol":"ul";return(0,Z8.jsx)("nav",{...nce.useBlockProps.save(),children:(0,Z8.jsx)(r,{children:(0,Z8.jsx)(Gg,{nestedHeadingList:q2(e),ordered:t})})})}var{name:lce}=$8,sce={icon:d1,edit:HA,save:ice,example:{innerBlocks:[{name:"core/heading",attributes:{level:2,content:(0,Eu.__)("Heading")}},{name:"core/heading",attributes:{level:3,content:(0,Eu.__)("Subheading")}},{name:"core/heading",attributes:{level:2,content:(0,Eu.__)("Heading")}},{name:"core/heading",attributes:{level:3,content:(0,Eu.__)("Subheading")}}],attributes:{headings:[{content:(0,Eu.__)("Heading"),level:2},{content:(0,Eu.__)("Subheading"),level:3},{content:(0,Eu.__)("Heading"),level:2},{content:(0,Eu.__)("Subheading"),level:3}]}}},$3e=()=>E({name:lce,metadata:$8,settings:sce});var jA={};Z(jA,{init:()=>Q3e,metadata:()=>Y8,name:()=>fce,settings:()=>hce});var Y2=o(P(),1);var Ym=o(T(),1),uce=o(V(),1),K8=o(U(),1);var of=o(v(),1);function cce({clientId:e}){return(0,of.jsxs)(of.Fragment,{children:[(0,of.jsx)(fs,{tabsClientId:e}),(0,of.jsx)(hs,{tabsClientId:e})]})}var Q2=o(v(),1),q3e=[["core/tabs-menu",{lock:{remove:!0}}],["core/tab-panel",{lock:{remove:!0}},[["core/tab",{anchor:"tab-1",label:"Tab 1"},[["core/paragraph"]]]]]];function Z3e({clientId:e,attributes:t,setAttributes:r,__unstableLayoutClassNames:a}){let{anchor:n,activeTabIndex:i,editorActiveTabIndex:l}=t;(0,K8.useEffect)(()=>{l===void 0&&r({editorActiveTabIndex:i})},[]);let s=(0,uce.useSelect)(p=>{let{getBlocks:d}=p(Ym.store),h=d(e).find(g=>g.name==="core/tab-panel");return h?h.innerBlocks.filter(g=>g.name==="core/tab"):[]},[e]),c=(0,K8.useMemo)(()=>({"core/tabs-list":s.map((d,f)=>({id:d.attributes.anchor||`tab-${f}`,label:d.attributes.label||"",clientId:d.clientId,index:f})),"core/tabs-id":n,"core/tabs-activeTabIndex":i,"core/tabs-editorActiveTabIndex":l}),[s,n,i,l]),u=(0,Ym.useBlockProps)({className:a}),m=(0,Ym.useInnerBlocksProps)(u,{__experimentalCaptureToolbars:!0,template:q3e,templateLock:!1,renderAppender:!1});return(0,Q2.jsx)(Ym.BlockContextProvider,{value:c,children:(0,Q2.jsxs)("div",{...m,children:[(0,Q2.jsx)(cce,{clientId:e,attributes:t,setAttributes:r}),m.children]})})}var mce=Z3e;var Q8=o(T(),1),pce=o(v(),1);function dce({attributes:e}){let{anchor:t}=e,r=t,a=Q8.useBlockProps.save(),n=Q8.useInnerBlocksProps.save(a);return(0,pce.jsx)("div",{...n,id:r})}var Y8={$schema:"https://schemas.wp.org/trunk/block.json",__experimental:!0,apiVersion:3,name:"core/tabs",title:"Tabs",description:"Display content in a tabbed interface to help users navigate detailed content with ease.",version:"1.0.0",category:"design",textdomain:"default",allowedBlocks:["core/tabs-menu","core/tab-panel"],attributes:{activeTabIndex:{type:"number",default:0},editorActiveTabIndex:{type:"number",role:"local"}},supports:{align:!0,anchor:!0,color:{text:!0,background:!0,__experimentalDefaultControls:{text:!0,background:!0}},layout:{default:{type:"flex",flexWrap:"nowrap",justifyContent:"stretch",verticalAlignment:"stretch",orientation:"vertical"},allowSwitching:!1,allowVerticalAlignment:!0,allowJustification:!0,allowOrientation:!0,allowSizingOnChildren:!0},html:!1,interactivity:!0,spacing:{blockGap:!0,margin:!0,padding:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},renaming:!0},providesContext:{"core/tabs-activeTabIndex":"activeTabIndex","core/tabs-editorActiveTabIndex":"editorActiveTabIndex"},usesContext:["core/tabs-list","core/tabs-id"],editorScript:"file:./index.js",editorStyle:"file:./index.css",style:"file:./style-index.css",viewScriptModule:"@wordpress/block-library/tabs/view"};var{name:fce}=Y8,hce={icon:BB,example:{innerBlocks:[{name:"core/tabs-menu",innerBlocks:[{name:"core/tabs-menu-item"}]},{name:"core/tab-panel",innerBlocks:[1,2,3].map(e=>({name:"core/tab",attributes:{label:(0,Y2.sprintf)((0,Y2.__)("Tab %s"),e)},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,Y2.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.")}}]}))}]},edit:mce,save:dce},Q3e=()=>E({name:fce,metadata:Y8,settings:hce});var UA={};Z(UA,{init:()=>awe,metadata:()=>J8,name:()=>_ce,settings:()=>xce});var gce=o(P(),1),Yn=o(T(),1),X2=o(V(),1),ji=o(U(),1);var Oo=o(v(),1),Y3e=[["core/tabs-menu-item",{}]],X3e=[];function J3e({blocks:e,blockContextId:t,isHidden:r,setActiveBlockContextId:a}){let n=(0,Yn.__experimentalUseBlockPreview)({blocks:e}),i=()=>{a(t)};return(0,Oo.jsx)("div",{...n,tabIndex:0,role:"button",onClick:i,onKeyDown:i,style:{display:r?"none":"flex"}})}var ewe=(0,ji.memo)(J3e);function twe({wrapperProps:e={},layout:t}){return(0,Yn.useInnerBlocksProps)(e,{template:Y3e,templateLock:"all",renderAppender:!1,layout:t}).children}function rwe({context:e,clientId:t,__unstableLayoutClassNames:r}){let{layout:a}=(0,Yn.useBlockEditContext)(),n=e["core/tabs-id"]||null,i=e["core/tabs-list"]||X3e,l=e["core/tabs-activeTabIndex"]??0,s=e["core/tabs-editorActiveTabIndex"],c=(0,ji.useMemo)(()=>s??l,[s,l]),{__unstableMarkNextChangeAsNotPersistent:u}=(0,X2.useDispatch)(Yn.store),{updateBlockAttributes:m}=(0,X2.useDispatch)(Yn.store),[p,d]=(0,ji.useState)(null),{blocks:f,tabsClientId:h}=(0,X2.useSelect)(_=>{let{getBlocks:x,getBlockRootClientId:S}=_(Yn.store);return{blocks:x(t),tabsClientId:S(t)}},[t]),g=(0,ji.useMemo)(()=>i.map((_,x)=>({"core/tabs-menu-item-index":x,"core/tabs-menu-item-id":_.id||`tab-${x}`,"core/tabs-menu-item-label":_.label||"","core/tabs-menu-item-clientId":_.clientId,"core/tabs-id":n,"core/tabs-list":i,"core/tabs-activeTabIndex":l,"core/tabs-editorActiveTabIndex":s})),[i,n,l,s]),b=(0,ji.useCallback)(_=>`tab-context-${_["core/tabs-menu-item-index"]}`,[]);(0,ji.useEffect)(()=>{g.length>0&&p===null&&d(b(g[0]))},[g,p,b]),(0,ji.useEffect)(()=>{if(g.length>0&&c<g.length){let _=b(g[c]);d(x=>x!==_?_:x)}},[c,g,b]);let y=(0,ji.useCallback)(_=>{h&&_!==c&&(u(),m(h,{editorActiveTabIndex:_}))},[h,c,m,u]),k=(0,Yn.useBlockProps)({className:w(r),role:"tablist"});return i.length===0?(0,Oo.jsxs)(Oo.Fragment,{children:[(0,Oo.jsx)(fs,{tabsClientId:h}),(0,Oo.jsx)(hs,{tabsClientId:h}),(0,Oo.jsx)("div",{...k,children:(0,Oo.jsx)("span",{className:"tabs__tab-label tabs__tab-label--placeholder",children:(0,gce.__)("Add tabs to display menu")})})]}):(0,Oo.jsxs)(Oo.Fragment,{children:[(0,Oo.jsx)(fs,{tabsClientId:h}),(0,Oo.jsx)(hs,{tabsClientId:h}),(0,Oo.jsx)("div",{...k,children:g.map((_,x)=>{let S=b(_),C=S===p;return(0,Oo.jsxs)(Yn.BlockContextProvider,{value:_,children:[C?(0,Oo.jsx)(twe,{wrapperProps:{onClick:()=>y(x)},layout:a}):null,(0,Oo.jsx)(ewe,{blocks:f,blockContextId:S,setActiveBlockContextId:N=>{d(N),y(x)},isHidden:C})]},S)})})]})}var vce=rwe;var X8=o(T(),1),bce=o(v(),1);function yce(){let e=X8.useBlockProps.save({role:"tablist"}),t=X8.useInnerBlocksProps.save(e);return(0,bce.jsx)("div",{...t})}var J8={$schema:"https://schemas.wp.org/trunk/block.json",__experimental:!0,apiVersion:3,name:"core/tabs-menu",title:"Tabs Menu",description:"Display the tab buttons for a tabbed interface.",version:"1.0.0",category:"design",textdomain:"default",parent:["core/tabs"],allowedBlocks:["core/tabs-menu-item"],usesContext:["core/tabs-list","core/tabs-id","core/tabs-activeTabIndex","core/tabs-editorActiveTabIndex"],attributes:{},supports:{html:!1,reusable:!1,lock:!1,dimensions:{aspectRatio:!1,height:!1,minHeight:!1,width:!1},color:{background:!0,text:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,__experimentalFontFamily:!0},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0},layout:{default:{type:"flex",flexWrap:"nowrap",orientation:"horizontal"},allowSwitching:!1,allowVerticalAlignment:!0,allowJustification:!0,allowOrientation:!0},spacing:{padding:!0,margin:!0,blockGap:!0,__experimentalDefaultControls:{padding:!0,margin:!0,blockGap:!0}}},editorScript:"file:./index.js",editorStyle:"file:./editor.css",style:"file:./style-index.css"};var{name:_ce}=J8,xce={icon:TB,edit:vce,save:yce},awe=()=>E({name:_ce,metadata:J8,settings:xce});var GA={};Z(GA,{init:()=>swe,metadata:()=>r7,name:()=>Pce,settings:()=>Bce});var t7=o(P(),1),Ic=o(T(),1),J2=o(V(),1),af=o(U(),1);var Ui=o(P(),1),ys=o(T(),1),Xm=o(M(),1);var e7=o(V(),1);var ha=o(v(),1);function nwe({tabClientId:e,tabIndex:t,tabsCount:r,tabsMenuClientId:a,tabsClientId:n}){let{moveBlocksUp:i,moveBlocksDown:l,updateBlockAttributes:s,__unstableMarkNextChangeAsNotPersistent:c}=(0,e7.useDispatch)(ys.store),{tabPanelClientId:u,orientation:m}=(0,e7.useSelect)(x=>{let{getBlockRootClientId:S,getBlockAttributes:C}=x(ys.store),N=a?C(a):null;return{tabPanelClientId:S(e),orientation:N?.layout?.orientation||"horizontal"}},[e,a]),p=t===0,d=t===r-1,f=m==="horizontal",h,g,b,y;f?(0,Ui.isRTL)()?(h=sy,g=ny,b=(0,Ui.__)("Move tab right"),y=(0,Ui.__)("Move tab left")):(h=ny,g=sy,b=(0,Ui.__)("Move tab left"),y=(0,Ui.__)("Move tab right")):(h=T0,g=bp,b=(0,Ui.__)("Move tab up"),y=(0,Ui.__)("Move tab down"));let k=()=>{i([e],u),n&&(c(),s(n,{editorActiveTabIndex:t-1}))},_=()=>{l([e],u),n&&(c(),s(n,{editorActiveTabIndex:t+1}))};return r<=1?null:(0,ha.jsx)(ys.BlockControls,{group:"parent",children:(0,ha.jsx)(Xm.ToolbarGroup,{className:w("block-editor-block-mover",{"is-horizontal":f}),children:(0,ha.jsxs)("div",{className:"block-editor-block-mover__move-button-container",children:[(0,ha.jsx)(Xm.ToolbarItem,{children:x=>(0,ha.jsx)(Xm.Button,{className:w("block-editor-block-mover-button","is-up-button"),icon:h,label:b,disabled:p,accessibleWhenDisabled:!0,onClick:k,__next40pxDefaultSize:!0,...x})}),(0,ha.jsx)(Xm.ToolbarItem,{children:x=>(0,ha.jsx)(Xm.Button,{className:w("block-editor-block-mover-button","is-down-button"),icon:g,label:y,disabled:d,accessibleWhenDisabled:!0,onClick:_,__next40pxDefaultSize:!0,...x})})]})})})}function kce({attributes:e,setAttributes:t,clientId:r,tabsClientId:a,tabClientId:n,tabIndex:i,tabsCount:l,tabsMenuClientId:s,activeBackgroundColor:c,setActiveBackgroundColor:u,activeTextColor:m,setActiveTextColor:p,hoverBackgroundColor:d,setHoverBackgroundColor:f,hoverTextColor:h,setHoverTextColor:g}){let{customActiveBackgroundColor:b,customActiveTextColor:y,customHoverBackgroundColor:k,customHoverTextColor:_}=e,x=(0,ys.__experimentalUseMultipleOriginColorsAndGradients)();return(0,ha.jsxs)(ha.Fragment,{children:[(0,ha.jsx)(nwe,{tabClientId:n,tabIndex:i,tabsCount:l,tabsMenuClientId:s,tabsClientId:a}),(0,ha.jsx)(fs,{tabsClientId:a}),(0,ha.jsx)(hs,{tabsClientId:a}),(0,ha.jsx)(ys.InspectorControls,{group:"color",children:(0,ha.jsx)(ys.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,Ui.__)("Active background"),colorValue:c?.color??b,onColorChange:S=>{u(S),t({customActiveBackgroundColor:S})},resetAllFilter:()=>{u(void 0),t({customActiveBackgroundColor:void 0})},clearable:!0},{label:(0,Ui.__)("Active text"),colorValue:m?.color??y,onColorChange:S=>{p(S),t({customActiveTextColor:S})},resetAllFilter:()=>{p(void 0),t({customActiveTextColor:void 0})},clearable:!0},{label:(0,Ui.__)("Hover background"),colorValue:d?.color??k,onColorChange:S=>{f(S),t({customHoverBackgroundColor:S})},resetAllFilter:()=>{f(void 0),t({customHoverBackgroundColor:void 0})},clearable:!0},{label:(0,Ui.__)("Hover text"),colorValue:h?.color??_,onColorChange:S=>{g(S),t({customHoverTextColor:S})},resetAllFilter:()=>{g(void 0),t({customHoverTextColor:void 0})},clearable:!0}],panelId:r,disableCustomColors:!1,__experimentalIsRenderedInSidebar:!0,__next40pxDefaultSize:!0,...x})})]})}var Jm=o(v(),1);function iwe({attributes:e,setAttributes:t,context:r,clientId:a,activeBackgroundColor:n,setActiveBackgroundColor:i,activeTextColor:l,setActiveTextColor:s,hoverBackgroundColor:c,setHoverBackgroundColor:u,hoverTextColor:m,setHoverTextColor:p,__unstableLayoutClassNames:d}){let f=r["core/tabs-menu-item-index"]??0,h=r["core/tabs-menu-item-id"]??"",g=r["core/tabs-menu-item-label"]??"",b=r["core/tabs-menu-item-clientId"]??"",y=r["core/tabs-list"],k=(0,af.useMemo)(()=>y||[],[y]),_=r["core/tabs-activeTabIndex"]??0,x=r["core/tabs-editorActiveTabIndex"],S=(0,af.useMemo)(()=>x??_,[x,_]),C=f===S,{__unstableMarkNextChangeAsNotPersistent:N}=(0,J2.useDispatch)(Ic.store),{tabsClientId:B,tabsMenuClientId:D,selectedTabClientId:A}=(0,J2.useSelect)(O=>{let{getBlockRootClientId:J,getSelectedBlockClientIds:ee,hasSelectedInnerBlock:oe}=O(Ic.store),X=J(a),te=X?J(X):null,ne=ee(),le=null;for(let pe of k)if(ne.includes(pe.clientId)||oe(pe.clientId,!0)){le=pe.clientId;break}return{tabsClientId:te,tabsMenuClientId:X,selectedTabClientId:le}},[a,k]),H=b===A,{updateBlockAttributes:F}=(0,J2.useDispatch)(Ic.store),z=(0,af.useCallback)(O=>{b&&F(b,{label:O,anchor:V8(O,f)})},[F,b,f]),I=(0,af.useCallback)(O=>{O.preventDefault(),B&&f!==S&&(N(),F(B,{editorActiveTabIndex:f}))},[B,f,S,F,N]),R=(0,af.useMemo)(()=>{let O={},J=n?.color||e.customActiveBackgroundColor,ee=l?.color||e.customActiveTextColor,oe=c?.color||e.customHoverBackgroundColor,X=m?.color||e.customHoverTextColor;return J&&(O["--custom-tab-active-color"]=J),ee&&(O["--custom-tab-active-text-color"]=ee),oe&&(O["--custom-tab-hover-color"]=oe),X&&(O["--custom-tab-hover-text-color"]=X),O},[n?.color,e.customActiveBackgroundColor,l?.color,e.customActiveTextColor,c?.color,e.customHoverBackgroundColor,m?.color,e.customHoverTextColor]),$=h||`tab-${f}`,j=`${$}--tab`,G=(0,Ic.useBlockProps)({className:w(d,{"is-active":C,"is-selected":H}),style:R,"aria-controls":$,"aria-selected":C,id:j,role:"tab",tabIndex:-1,onClick:I});return(0,Jm.jsxs)(Jm.Fragment,{children:[(0,Jm.jsx)(kce,{attributes:e,setAttributes:t,clientId:a,tabsClientId:B,tabClientId:b,tabIndex:f,tabsCount:k.length,tabsMenuClientId:D,activeBackgroundColor:n,setActiveBackgroundColor:i,activeTextColor:l,setActiveTextColor:s,hoverBackgroundColor:c,setHoverBackgroundColor:u,hoverTextColor:m,setHoverTextColor:p}),(0,Jm.jsx)("div",{...G,children:(0,Jm.jsx)(Ic.RichText,{tagName:"span",withoutInteractiveFormatting:!0,placeholder:(0,t7.sprintf)((0,t7.__)("Tab title %d"),f+1),value:g||"",onChange:z})})]})}var wce=(0,Ic.withColors)("activeBackgroundColor","activeTextColor","hoverBackgroundColor","hoverTextColor")(iwe);var Cce=o(T(),1),Sce=o(v(),1);function Tce({attributes:e}){let t={};e.customActiveBackgroundColor&&(t["--custom-tab-active-color"]=e.customActiveBackgroundColor),e.customActiveTextColor&&(t["--custom-tab-active-text-color"]=e.customActiveTextColor),e.customHoverBackgroundColor&&(t["--custom-tab-hover-color"]=e.customHoverBackgroundColor),e.customHoverTextColor&&(t["--custom-tab-hover-text-color"]=e.customHoverTextColor);let r=Cce.useBlockProps.save({className:"wp-block-tabs-menu-item__template",style:t,type:"button",role:"tab"});return(0,Sce.jsx)("button",{...r})}var r7={$schema:"https://schemas.wp.org/trunk/block.json",__experimental:!0,apiVersion:3,name:"core/tabs-menu-item",title:"Tab Menu Item",description:"A single tab button in the tabs menu. Used as a template for styling all tab buttons.",version:"1.0.0",category:"design",textdomain:"default",parent:["core/tabs-menu"],usesContext:["core/tabs-menu-item-index","core/tabs-menu-item-id","core/tabs-menu-item-label","core/tabs-menu-item-clientId","core/tabs-list","core/tabs-activeTabIndex","core/tabs-editorActiveTabIndex"],attributes:{activeBackgroundColor:{type:"string"},customActiveBackgroundColor:{type:"string"},activeTextColor:{type:"string"},customActiveTextColor:{type:"string"},hoverBackgroundColor:{type:"string"},customHoverBackgroundColor:{type:"string"},hoverTextColor:{type:"string"},customHoverTextColor:{type:"string"}},supports:{html:!1,reusable:!1,lock:!1,color:{background:!0,text:!0,__experimentalDefaultControls:{background:!0,text:!0}},shadow:!0,typography:{fontSize:!0,__experimentalFontFamily:!0,textAlign:!0,__experimentalDefaultControls:{fontSize:!0}},layout:{allowEditing:!1},spacing:{padding:!0,__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0}},editorScript:"file:./index.js",editorStyle:"file:./editor.css",style:"file:./style-index.css"};var{name:Pce}=r7,Bce={icon:CB,edit:wce,save:Tce},swe=()=>E({name:Pce,metadata:r7,settings:Bce});var $A={};Z($A,{init:()=>fwe,metadata:()=>o7,name:()=>zce,settings:()=>Vce});var WA=o(W(),1),cwe={from:[{type:"block",blocks:["core/categories"],transform:()=>(0,WA.createBlock)("core/tag-cloud")}],to:[{type:"block",blocks:["core/categories"],transform:()=>(0,WA.createBlock)("core/categories")}]},Ice=cwe;var o7={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/tag-cloud",title:"Tag Cloud",category:"widgets",description:"A cloud of popular keywords, each sized by how often it appears.",textdomain:"default",attributes:{numberOfTags:{type:"number",default:45,minimum:1,maximum:100},taxonomy:{type:"string",default:"post_tag"},showTagCounts:{type:"boolean",default:!1},smallestFontSize:{type:"string",default:"8pt"},largestFontSize:{type:"string",default:"22pt"}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"outline",label:"Outline"}],supports:{anchor:!0,html:!1,align:!0,spacing:{margin:!0,padding:!0},typography:{lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}}};var Vt=o(M(),1),Dce=o(V(),1),bn=o(P(),1),Wg=o(T(),1),Lce=o(Q(),1),Mce=o(Fu(),1),Ace=o(me(),1);var vr=o(v(),1),mwe=1,pwe=100,Nce=.1,Ece=100;function dwe({attributes:e,setAttributes:t,name:r}){let{taxonomy:a,showTagCounts:n,numberOfTags:i,smallestFontSize:l,largestFontSize:s}=e,[c]=(0,Wg.useSettings)("spacing.units"),u=q(),m=(0,Vt.__experimentalUseCustomUnits)({availableUnits:c?[...c,"pt"]:["%","px","em","rem","pt"]}),p=(0,Dce.useSelect)(x=>x(Lce.store).getTaxonomies({per_page:-1}),[]),d=()=>{let x={label:(0,bn.__)("- Select -"),value:"",disabled:!0},S=(p??[]).filter(C=>!!C.show_cloud).map(C=>({value:C.slug,label:C.name}));return[x,...S]},f=(x,S)=>{let[C,N]=(0,Vt.__experimentalParseQuantityAndUnitFromRawValue)(S);if(!Number.isFinite(C))return;let B={[x]:S};Object.entries({smallestFontSize:l,largestFontSize:s}).forEach(([D,A])=>{let[H,F]=(0,Vt.__experimentalParseQuantityAndUnitFromRawValue)(A);D!==x&&F!==N&&(B[D]=`${H}${N}`)}),t(B)},h=(0,vr.jsx)(Wg.InspectorControls,{children:(0,vr.jsxs)(Vt.__experimentalToolsPanel,{label:(0,bn.__)("Settings"),resetAll:()=>{t({taxonomy:"post_tag",showTagCounts:!1,numberOfTags:45,smallestFontSize:"8pt",largestFontSize:"22pt"})},dropdownMenuProps:u,children:[(0,vr.jsx)(Vt.__experimentalToolsPanelItem,{hasValue:()=>a!=="post_tag",label:(0,bn.__)("Taxonomy"),onDeselect:()=>t({taxonomy:"post_tag"}),isShownByDefault:!0,children:(0,vr.jsx)(Vt.SelectControl,{__next40pxDefaultSize:!0,label:(0,bn.__)("Taxonomy"),options:d(),value:a,onChange:x=>t({taxonomy:x})})}),(0,vr.jsx)(Vt.__experimentalToolsPanelItem,{hasValue:()=>l!=="8pt"||s!=="22pt",label:(0,bn.__)("Font size"),onDeselect:()=>t({smallestFontSize:"8pt",largestFontSize:"22pt"}),isShownByDefault:!0,children:(0,vr.jsxs)(Vt.Flex,{gap:4,children:[(0,vr.jsx)(Vt.FlexItem,{isBlock:!0,children:(0,vr.jsx)(Vt.__experimentalUnitControl,{label:(0,bn.__)("Smallest size"),value:l,onChange:x=>{f("smallestFontSize",x)},units:m,min:Nce,max:Ece,size:"__unstable-large"})}),(0,vr.jsx)(Vt.FlexItem,{isBlock:!0,children:(0,vr.jsx)(Vt.__experimentalUnitControl,{label:(0,bn.__)("Largest size"),value:s,onChange:x=>{f("largestFontSize",x)},units:m,min:Nce,max:Ece,size:"__unstable-large"})})]})}),(0,vr.jsx)(Vt.__experimentalToolsPanelItem,{hasValue:()=>i!==45,label:(0,bn.__)("Number of tags"),onDeselect:()=>t({numberOfTags:45}),isShownByDefault:!0,children:(0,vr.jsx)(Vt.RangeControl,{__next40pxDefaultSize:!0,label:(0,bn.__)("Number of tags"),value:i,onChange:x=>t({numberOfTags:x}),min:mwe,max:pwe,required:!0})}),(0,vr.jsx)(Vt.__experimentalToolsPanelItem,{hasValue:()=>n!==!1,label:(0,bn.__)("Show tag counts"),onDeselect:()=>t({showTagCounts:!1}),isShownByDefault:!0,children:(0,vr.jsx)(Vt.ToggleControl,{label:(0,bn.__)("Show tag counts"),checked:n,onChange:()=>t({showTagCounts:!n})})})]})}),{content:g,status:b,error:y}=(0,Mce.useServerSideRender)({attributes:e,skipBlockSupportAttributes:!0,block:r}),k=(0,Ace.useDisabled)(),_=(0,Wg.useBlockProps)({ref:k});return(0,vr.jsxs)(vr.Fragment,{children:[h,b==="loading"&&(0,vr.jsx)("div",{..._,children:(0,vr.jsx)(Vt.Spinner,{})}),b==="error"&&(0,vr.jsx)("div",{..._,children:(0,vr.jsx)("p",{children:(0,bn.sprintf)((0,bn.__)("Error: %s"),y)})}),b==="success"&&(0,vr.jsx)(uo,{wrapperProps:_,html:g})]})}var Rce=dwe;var{name:zce}=o7,Vce={icon:f1,example:{},edit:Rce,transforms:Ice},fwe=()=>E({name:zce,metadata:o7,settings:Vce});var YA={};Z(YA,{init:()=>kwe,metadata:()=>a7,name:()=>wue,settings:()=>Cue});var _ue=o(Q(),1),xue=o(V(),1);var QA=o(Yc(),1),kue=o(Wo(),1);var a7={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/template-part",title:"Template Part",category:"theme",description:"Edit the different global regions of your site, like the header, footer, sidebar, or create your own.",textdomain:"default",attributes:{slug:{type:"string"},theme:{type:"string"},tagName:{type:"string"},area:{type:"string"}},supports:{align:!0,html:!1,reusable:!1,renaming:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-template-part-editor"};var pue=o(W(),1),Xg=o(V(),1),so=o(T(),1),Dc=o(M(),1),Wi=o(P(),1),ab=o(Q(),1),due=o(U(),1),fue=o(xr(),1);var tp=o(P(),1),lf=o(M(),1),Gce=o(U(),1),Wce=o(V(),1),$ce=o(Q(),1);var $g=o(V(),1),n7=o(Q(),1),Fce=o(T(),1),Hce=o(U(),1),Oce=o(W(),1),qA=o(P(),1);function qg(e,t){let{templateParts:r,isResolving:a}=(0,$g.useSelect)(i=>{let{getEntityRecords:l,isResolving:s}=i(n7.store),c={per_page:-1};return{templateParts:l("postType","wp_template_part",c),isResolving:s("getEntityRecords",["postType","wp_template_part",c])}},[]);return{templateParts:(0,Hce.useMemo)(()=>r?r.filter(i=>nn(i.theme,i.slug)!==t&&(!e||e==="uncategorized"||i.area===e))||[]:[],[r,e,t]),isResolving:a}}function Zg(e,t){return(0,$g.useSelect)(r=>{let a=e?`core/template-part/${e}`:"core/template-part",{getBlockRootClientId:n,getPatternsByBlockTypes:i}=r(Fce.store),l=n(t);return i(a,l)},[e,t])}function i7(e,t){let{saveEntityRecord:r}=(0,$g.useDispatch)(n7.store);return async(a=[],n=(0,qA.__)("Untitled Template Part"))=>{let i=c3(n).replace(/[^\w-]+/g,"")||"wp-custom-part",l={title:n,slug:i,content:(0,Oce.serialize)(a),area:e},s=await r("postType","wp_template_part",l);t({slug:s.slug,theme:s.theme,area:void 0})}}function l7(e){return(0,$g.useSelect)(t=>{let r=t(n7.store).getCurrentTheme()?.default_template_part_areas||[],a=r.find(i=>i.area===e),n=r.find(i=>i.area==="uncategorized");return{icon:a?.icon||n?.icon,label:a?.label||(0,qA.__)("Template Part"),tagName:a?.area_tag??"div"}},[e])}var jce=o(U(),1),ep=o(P(),1),_s=o(M(),1),Du=o(v(),1);function Uce({areaLabel:e,onClose:t,onSubmit:r}){let[a,n]=(0,jce.useState)(""),i=l=>{l.preventDefault(),r(a)};return(0,Du.jsx)(_s.Modal,{title:(0,ep.sprintf)((0,ep.__)("Create new %s"),e.toLowerCase()),onRequestClose:t,focusOnMount:"firstContentElement",size:"small",children:(0,Du.jsx)("form",{onSubmit:i,children:(0,Du.jsxs)(_s.__experimentalVStack,{spacing:"5",children:[(0,Du.jsx)(_s.TextControl,{label:(0,ep.__)("Name"),value:a,onChange:n,placeholder:(0,ep.__)("Custom Template Part"),__next40pxDefaultSize:!0}),(0,Du.jsxs)(_s.__experimentalHStack,{justify:"right",children:[(0,Du.jsx)(_s.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t(),n("")},children:(0,ep.__)("Cancel")}),(0,Du.jsx)(_s.Button,{variant:"primary",type:"submit",accessibleWhenDisabled:!0,disabled:!a.length,__next40pxDefaultSize:!0,children:(0,ep.__)("Create")})]})]})})})}var nf=o(v(),1);function qce({area:e,clientId:t,templatePartId:r,onOpenSelectionModal:a,setAttributes:n}){let{templateParts:i,isResolving:l}=qg(e,r),s=Zg(e,t),{isBlockBasedTheme:c,canCreateTemplatePart:u}=(0,Wce.useSelect)(h=>{let{getCurrentTheme:g,canUser:b}=h($ce.store);return{isBlockBasedTheme:g()?.is_block_theme,canCreateTemplatePart:b("create",{kind:"postType",name:"wp_template_part"})}},[]),[m,p]=(0,Gce.useState)(!1),d=l7(e),f=i7(e,n);return(0,nf.jsxs)(lf.Placeholder,{icon:Xh(d.icon),label:d.label,instructions:c?(0,tp.sprintf)((0,tp.__)("Choose an existing %s or create a new one."),d.label.toLowerCase()):(0,tp.sprintf)((0,tp.__)("Choose an existing %s."),d.label.toLowerCase()),children:[l&&(0,nf.jsx)(lf.Spinner,{}),!l&&!!(i.length||s.length)&&(0,nf.jsx)(lf.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:a,children:(0,tp.__)("Choose")}),!l&&c&&u&&(0,nf.jsx)(lf.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{p(!0)},children:(0,tp.__)("Start blank")}),m&&(0,nf.jsx)(Uce,{areaLabel:d.label,onClose:()=>p(!1),onSubmit:h=>{f([],h)}})]})}var eb=o(U(),1),rp=o(P(),1),Qce=o(xr(),1),Yce=o(V(),1),Xce=o(T(),1),s7=o(M(),1);var Zce=o(W(),1);function Kce(e){return{name:nn(e.theme,e.slug),title:e.title.rendered,blocks:(0,Zce.parse)(e.content.raw),templatePart:e}}var Nc=o(v(),1);function Jce({setAttributes:e,onClose:t,templatePartId:r=null,area:a,clientId:n}){let[i,l]=(0,eb.useState)(""),{templateParts:s}=qg(a,r),c=(0,eb.useMemo)(()=>{let g=s.map(b=>Kce(b));return dv(g,i)},[s,i]),u=Zg(a,n),m=(0,eb.useMemo)(()=>dv(u,i),[u,i]),{createSuccessNotice:p}=(0,Yce.useDispatch)(Qce.store),d=g=>{e({slug:g.slug,theme:g.theme,area:void 0}),p((0,rp.sprintf)((0,rp.__)('Template Part "%s" inserted.'),g.title?.rendered||g.slug),{type:"snackbar"}),t()},f=!!c.length,h=!!m.length;return(0,Nc.jsxs)("div",{className:"block-library-template-part__selection-content",children:[(0,Nc.jsx)("div",{className:"block-library-template-part__selection-search",children:(0,Nc.jsx)(s7.SearchControl,{onChange:l,value:i,label:(0,rp.__)("Search"),placeholder:(0,rp.__)("Search")})}),f&&(0,Nc.jsxs)("div",{children:[(0,Nc.jsx)("h2",{children:(0,rp.__)("Existing template parts")}),(0,Nc.jsx)(Xce.__experimentalBlockPatternsList,{blockPatterns:c,onClickPattern:g=>{d(g.templatePart)}})]}),!f&&!h&&(0,Nc.jsx)(s7.__experimentalHStack,{alignment:"center",children:(0,Nc.jsx)("p",{children:(0,rp.__)("No results found.")})})]})}var rb=o(Q(),1),c7=o(M(),1),Qg=o(P(),1),nue=o(V(),1),iue=o(T(),1);var Ec=o(P(),1),tb=o(U(),1),Kg=o(V(),1),Gi=o(M(),1),KA=o(Q(),1),oue=o(xr(),1);var Xn=o(W(),1);function eue(e){if(e.id_base!=="block"){let a;return e._embedded.about[0].is_multi?a={idBase:e.id_base,instance:e.instance}:a={id:e.id},tue((0,Xn.createBlock)("core/legacy-widget",a))}let t=(0,Xn.parse)(e.instance.raw.content,{__unstableSkipAutop:!0});if(!t.length)return;let r=t[0];return r.name==="core/widget-group"?(0,Xn.createBlock)((0,Xn.getGroupingBlockName)(),void 0,ZA(r.innerBlocks)):r.innerBlocks.length>0?(0,Xn.cloneBlock)(r,void 0,ZA(r.innerBlocks)):r}function tue(e){let t=(0,Xn.getPossibleBlockTransformations)([e]).filter(r=>{if(!r.transforms)return!0;let a=r.transforms?.from?.find(i=>i.blocks&&i.blocks.includes("*")),n=r.transforms?.to?.find(i=>i.blocks&&i.blocks.includes("*"));return!a&&!n});if(t.length)return(0,Xn.switchToBlockType)(e,t[0].name)}function ZA(e=[]){return e.flatMap(t=>t.name==="core/legacy-widget"?tue(t):(0,Xn.createBlock)(t.name,t.attributes,ZA(t.innerBlocks))).filter(t=>!!t)}var Lu=o(v(),1),rue={per_page:-1,_fields:"id,name,description,status,widgets"};function aue({area:e,setAttributes:t}){let[r,a]=(0,tb.useState)(""),[n,i]=(0,tb.useState)(!1),l=(0,Kg.useRegistry)(),{sidebars:s,hasResolved:c}=(0,Kg.useSelect)(f=>{let{getSidebars:h,hasFinishedResolution:g}=f(KA.store);return{sidebars:h(rue),hasResolved:g("getSidebars",[rue])}},[]),{createErrorNotice:u}=(0,Kg.useDispatch)(oue.store),m=i7(e,t),p=(0,tb.useMemo)(()=>{let f=(s??[]).filter(h=>h.id!=="wp_inactive_widgets"&&h.widgets.length>0).map(h=>({value:h.id,label:h.name}));return f.length?[{value:"",label:(0,Ec.__)("Select widget area")},...f]:[]},[s]);if(!c)return(0,Lu.jsx)(Gi.__experimentalSpacer,{marginBottom:"0"});if(c&&!p.length)return null;async function d(f){if(f.preventDefault(),n||!r)return;i(!0);let h=p.find(({value:_})=>_===r),{getWidgets:g}=l.resolveSelect(KA.store),b=await g({sidebar:h.value,_embed:"about"}),y=new Set,k=b.flatMap(_=>{let x=eue(_);return x||(y.add(_.id_base),[])});await m(k,(0,Ec.sprintf)((0,Ec.__)("Widget area: %s"),h.label)),y.size&&u((0,Ec.sprintf)((0,Ec.__)("Unable to import the following widgets: %s."),Array.from(y).join(", ")),{type:"snackbar"}),i(!1)}return(0,Lu.jsx)(Gi.__experimentalSpacer,{marginBottom:"4",children:(0,Lu.jsxs)(Gi.__experimentalHStack,{as:"form",onSubmit:d,children:[(0,Lu.jsx)(Gi.FlexBlock,{children:(0,Lu.jsx)(Gi.SelectControl,{label:(0,Ec.__)("Import widget area"),value:r,options:p,onChange:f=>a(f),disabled:!p.length,__next40pxDefaultSize:!0})}),(0,Lu.jsx)(Gi.FlexItem,{style:{marginBottom:"8px",marginTop:"auto"},children:(0,Lu.jsx)(Gi.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:n,"aria-disabled":n||!r,children:(0,Ec._x)("Import","button label")})})]})})}var xs=o(v(),1),{HTMLElementControl:gwe}=K(iue.privateApis);function lue({tagName:e,setAttributes:t,isEntityAvailable:r,templatePartId:a,defaultWrapper:n,hasInnerBlocks:i,clientId:l}){let[s,c]=(0,rb.useEntityProp)("postType","wp_template_part","area",a),[u,m]=(0,rb.useEntityProp)("postType","wp_template_part","title",a),d=(0,nue.useSelect)(f=>f(rb.store).getCurrentTheme()?.default_template_part_areas||[],[]).map(({label:f,area:h})=>({label:f,value:h}));return(0,xs.jsxs)(xs.Fragment,{children:[r&&(0,xs.jsxs)(xs.Fragment,{children:[(0,xs.jsx)(c7.TextControl,{__next40pxDefaultSize:!0,label:(0,Qg.__)("Title"),value:u,onChange:f=>{m(f)},onFocus:f=>f.target.select()}),(0,xs.jsx)(c7.SelectControl,{__next40pxDefaultSize:!0,label:(0,Qg.__)("Area"),labelPosition:"top",options:d,value:s,onChange:c})]}),(0,xs.jsx)(gwe,{tagName:e||"",onChange:f=>t({tagName:f}),clientId:l,options:[{label:(0,Qg.sprintf)((0,Qg.__)("Default based on area (%s)"),`<${n}>`),value:""},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"},{label:"<div>",value:"div"}]}),!i&&(0,xs.jsx)(aue,{area:s,setAttributes:t})]})}var Yg=o(Q(),1),Jn=o(T(),1),ob=o(V(),1),sue=o(U(),1),cue=o(W(),1),u7=o(v(),1);function vwe(e){if((0,Jn.useBlockEditingMode)()==="contentOnly")return!1;if(!e)return Jn.InnerBlocks.ButtonBlockAppender}function uue(e){let t=(0,ob.useSelect)(a=>{let{getSettings:n}=a(Jn.store);return n()?.supportsLayout},[]),[r]=(0,Jn.useSettings)("layout");if(t)return e?.inherit?r||{}:e}function bwe({postId:e,layout:t,tagName:r,blockProps:a}){(0,Jn.useBlockEditingMode)("disabled");let{content:n,editedBlocks:i}=(0,ob.useSelect)(c=>{if(!e)return{};let{getEditedEntityRecord:u}=c(Yg.store),m=u("postType","wp_template_part",e,{context:"view"});return{editedBlocks:m.blocks,content:m.content}},[e]),l=(0,sue.useMemo)(()=>{if(e)return i||(!n||typeof n!="string"?[]:(0,cue.parse)(n))},[e,i,n]),s=(0,Jn.useInnerBlocksProps)(a,{value:l,onInput:()=>{},onChange:()=>{},renderAppender:!1,layout:uue(t)});return(0,u7.jsx)(r,{...s})}function ywe({postId:e,hasInnerBlocks:t,layout:r,tagName:a,blockProps:n}){let i=(0,ob.useSelect)(d=>d(Jn.store).getSettings().onNavigateToEntityRecord,[]),[l,s,c]=(0,Yg.useEntityBlockEditor)("postType","wp_template_part",{id:e}),u=(0,Jn.useInnerBlocksProps)(n,{value:l,onInput:s,onChange:c,renderAppender:vwe(t),layout:uue(r)}),p=(0,Jn.useBlockEditingMode)()==="contentOnly"&&i?{onDoubleClick:()=>i({postId:e,postType:"wp_template_part"})}:{};return(0,u7.jsx)(a,{...u,...p})}function mue({postId:e,hasInnerBlocks:t,layout:r,tagName:a,blockProps:n}){let{canViewTemplatePart:i,canEditTemplatePart:l}=(0,ob.useSelect)(c=>({canViewTemplatePart:!!c(Yg.store).canUser("read",{kind:"postType",name:"wp_template_part",id:e}),canEditTemplatePart:!!c(Yg.store).canUser("update",{kind:"postType",name:"wp_template_part",id:e})}),[e]);return i?(0,u7.jsx)(l?ywe:bwe,{postId:e,hasInnerBlocks:t,layout:r,tagName:a,blockProps:n}):null}var Ft=o(v(),1),hue=["header","footer","navigation-overlay"];function _we({isEntityAvailable:e,area:t,templatePartId:r,isTemplatePartSelectionOpen:a,setIsTemplatePartSelectionOpen:n}){let{templateParts:i}=qg(t,r),l=!!i.length;return e&&l&&hue.includes(t)?(0,Ft.jsx)(Dc.MenuItem,{onClick:()=>{n(!0)},"aria-expanded":a,"aria-haspopup":"dialog",children:(0,Wi.__)("Replace")}):null}function xwe({area:e,clientId:t,isEntityAvailable:r,onSelect:a}){let n=Zg(e,t);return r&&!!n.length&&hue.includes(e)?(0,Ft.jsx)(Dc.PanelBody,{title:(0,Wi.__)("Design"),children:(0,Ft.jsx)(so.__experimentalBlockPatternsList,{label:(0,Wi.__)("Templates"),blockPatterns:n,onClickPattern:a,showTitlesAsTooltip:!0})}):null}function gue({attributes:e,setAttributes:t,clientId:r}){let{createSuccessNotice:a}=(0,Xg.useDispatch)(fue.store),{editEntityRecord:n}=(0,Xg.useDispatch)(ab.store),i=(0,Xg.useSelect)(H=>H(ab.store).getCurrentTheme()?.stylesheet,[]),{slug:l,theme:s=i,tagName:c,layout:u={}}=e,m=nn(s,l),p=(0,so.useHasRecursion)(m),[d,f]=(0,due.useState)(!1),{isResolved:h,hasInnerBlocks:g,isMissing:b,area:y,onNavigateToEntityRecord:k,title:_,canUserEdit:x}=(0,Xg.useSelect)(H=>{let{getEditedEntityRecord:F,hasFinishedResolution:z}=H(ab.store),{getBlockCount:I,getSettings:R}=H(so.store),$=["postType","wp_template_part",m],j=m?F(...$):null,G=j?.area||e.area,O=m?z("getEditedEntityRecord",$):!1,J=O?H(ab.store).canUser("update",{kind:"postType",name:"wp_template_part",id:m}):!1;return{hasInnerBlocks:I(r)>0,isResolved:O,isMissing:O&&(!j||Object.keys(j).length===0),area:G,onNavigateToEntityRecord:R().onNavigateToEntityRecord,title:j?.title,canUserEdit:!!J}},[m,e.area,r]),S=l7(y),C=(0,so.useBlockProps)(),N=!l,B=!N&&!b&&h,D=c||S.tagName,A=async H=>{await n("postType","wp_template_part",m,{blocks:H.blocks,content:(0,pue.serialize)(H.blocks)}),a((0,Wi.sprintf)((0,Wi.__)('Template Part "%s" updated.'),_||l),{type:"snackbar"})};return!g&&(l&&!s||l&&b)?(0,Ft.jsx)(D,{...C,children:(0,Ft.jsx)(so.Warning,{children:(0,Wi.sprintf)((0,Wi.__)("Template part has been deleted or is unavailable: %s"),l)})}):B&&p?(0,Ft.jsx)(D,{...C,children:(0,Ft.jsx)(so.Warning,{children:(0,Wi.__)("Block cannot be rendered inside itself.")})}):(0,Ft.jsxs)(Ft.Fragment,{children:[(0,Ft.jsxs)(so.RecursionProvider,{uniqueId:m,children:[B&&k&&x&&(0,Ft.jsx)(so.BlockControls,{group:"other",children:(0,Ft.jsx)(Dc.ToolbarButton,{onClick:()=>{k({postId:m,postType:"wp_template_part"})},children:(0,Wi.__)("Edit original")})}),x&&(0,Ft.jsx)(so.InspectorControls,{group:"advanced",children:(0,Ft.jsx)(lue,{tagName:c,setAttributes:t,isEntityAvailable:B,templatePartId:m,defaultWrapper:S.tagName,hasInnerBlocks:g,clientId:r})}),N&&(0,Ft.jsx)(D,{...C,children:(0,Ft.jsx)(qce,{area:e.area,templatePartId:m,clientId:r,setAttributes:t,onOpenSelectionModal:()=>f(!0)})}),(0,Ft.jsx)(so.BlockSettingsMenuControls,{children:({selectedClientIds:H})=>H.length===1&&r===H[0]?(0,Ft.jsx)(_we,{isEntityAvailable:B,area:y,clientId:r,templatePartId:m,isTemplatePartSelectionOpen:d,setIsTemplatePartSelectionOpen:f}):null}),(0,Ft.jsx)(so.InspectorControls,{group:"settings",children:(0,Ft.jsx)(xwe,{area:y,clientId:r,isEntityAvailable:B,onSelect:H=>A(H)})}),B&&(0,Ft.jsx)(mue,{tagName:D,blockProps:C,postId:m,hasInnerBlocks:g,layout:u}),!N&&!h&&(0,Ft.jsx)(D,{...C,children:(0,Ft.jsx)(Dc.Spinner,{})})]}),d&&(0,Ft.jsx)(Dc.Modal,{overlayClassName:"block-editor-template-part__selection-modal",title:(0,Wi.sprintf)((0,Wi.__)("Choose a %s"),S.label.toLowerCase()),onRequestClose:()=>f(!1),isFullScreen:!0,children:(0,Ft.jsx)(Jce,{templatePartId:m,clientId:r,area:y,setAttributes:t,onClose:()=>f(!1)})})]})}var vue=o(Q(),1),bue=o(V(),1);function yue(e,t){if(t!=="core/template-part")return e;if(e.variations){let r=(n,i)=>{let{area:l,theme:s,slug:c}=n;if(l)return l===i.area;if(!c)return!1;let{getCurrentTheme:u,getEntityRecord:m}=(0,bue.select)(vue.store),p=m("postType","wp_template_part",`${s||u()?.stylesheet}//${c}`);return p?.slug?p.slug===i.slug:p?.area===i.area},a=e.variations.map(n=>({...n,...!n.isActive&&{isActive:r},...typeof n.icon=="string"&&{icon:Xh(n.icon)}}));return{...e,variations:a}}return e}var{name:wue}=a7,Cue={icon:u1,__experimentalLabel:({slug:e,theme:t})=>{if(!e)return;let{getCurrentTheme:r,getEditedEntityRecord:a}=(0,xue.select)(_ue.store),n=a("postType","wp_template_part",(t||r()?.stylesheet)+"//"+e);if(n)return(0,kue.decodeEntities)(n.title)||LQ(n.slug||"")},edit:gue},kwe=()=>{(0,QA.addFilter)("blocks.registerBlockType","core/template-part",yue);let e=["core/post-template","core/post-content"];return(0,QA.addFilter)("blockEditor.__unstableCanInsertBlockType","core/block-library/removeTemplatePartsFromPostTemplates",(t,r,a,{getBlock:n,getBlockParentsByBlockName:i})=>{if(r.name!=="core/template-part")return t;for(let l of e)if(n(a)?.name===l||i(a,l).length)return!1;return!0}),E({name:wue,metadata:a7,settings:Cue})};var tR={};Z(tR,{init:()=>Swe,metadata:()=>m7,name:()=>Due,settings:()=>Lue});var m7={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/term-count",title:"Term Count",category:"theme",description:"Displays the post count of a taxonomy term.",textdomain:"default",usesContext:["termId","taxonomy"],attributes:{bracketType:{type:"string",enum:["none","round","square","curly","angle"],default:"round"}},supports:{anchor:!0,html:!1,color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{color:!0,width:!0,style:!0}}},style:"wp-block-term-count"};var sf=o(P(),1),p7=o(T(),1),Nue=o(M(),1);var xl=o(M(),1),ks=o(v(),1),XA=(0,ks.jsx)(xl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ks.jsx)(xl.Path,{d:"M 10 6 L 9.609375 9 L 7 9 L 7 10.5 L 9.4121094 10.5 L 9.0878906 13 L 7 13 L 7 14.5 L 8.890625 14.5 L 8.5 17.5 L 10 17.5 L 10.390625 14.5 L 12.890625 14.5 L 12.5 17.5 L 14 17.5 L 14.390625 14.5 L 17 14.5 L 17 13 L 14.587891 13 L 14.912109 10.5 L 17 10.5 L 17 9 L 15.109375 9 L 15.5 6 L 14 6 L 13.609375 9 L 11.109375 9 L 11.5 6 L 10 6 z M 10.912109 10.5 L 13.412109 10.5 L 13.087891 13 L 10.587891 13 L 10.912109 10.5 z"})}),Sue=(0,ks.jsx)(xl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ks.jsx)(xl.Path,{d:"M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z M 18.5,3 c 0,0 1.5,4.004036 1.5,9 0,4.995964 -1.5,9 -1.5,9 H 20 c 0,0 1.5,-4.004036 1.5,-9 C 21.5,7.004036 20,3 20,3 Z M 5.5,21 C 5.5,21 4,16.995964 4,12 4,7.0040356 5.5,3 5.5,3 H 4 c 0,0 -1.5,4.004036 -1.5,9 0,4.995964 1.5,9 1.5,9 z"})}),Tue=(0,ks.jsx)(xl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ks.jsx)(xl.Path,{d:"M 21.5,21 V 3 H 18 v 1.5 h 2 v 15 H 18 V 21 Z M 2.5,3 V 21 H 6 V 19.5 H 4 V 4.5 H 6 V 3 Z M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z"})}),Pue=(0,ks.jsx)(xl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ks.jsx)(xl.Path,{d:"M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z M 18.5,21 c 1.104567,0 2,-0.895433 2,-2 v -4 c 0,-1.104567 0.895433,-2 2,-2 v -2 c -1.104567,0 -2,-0.895433 -2,-2 V 5 c 0,-1.104567 -0.895433,-2 -2,-2 H 17 v 1.5 h 1.5 A 0.5,0.5 0 0 1 19,5 v 5 c 0,1.104567 0.895433,2 2,2 -1.104567,0 -2,0.895433 -2,2 v 5 c 0,0.276142 -0.223858,0.5 -0.5,0.5 H 17 V 21 Z M 5.5,3 c -1.1045668,0 -2,0.8954327 -2,2 v 4 c 0,1.104567 -0.8954332,2 -2,2 v 2 c 1.1045668,0 2,0.895433 2,2 v 4 c 0,1.104567 0.8954332,2 2,2 H 7 V 19.5 H 5.5 A 0.5,0.5 0 0 1 5,19 V 14 C 5,12.895433 4.1045668,12 3,12 4.1045668,12 5,11.104567 5,10 V 5 C 5,4.7238579 5.2238579,4.5 5.5,4.5 H 7 V 3 Z"})}),Bue=(0,ks.jsx)(xl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ks.jsx)(xl.Path,{d:"M 18.970703,16.53125 23.5,12 18.970703,7.46875 17.910156,8.53125 21.378906,12 17.910156,15.46875 Z M 5.0292969,7.46875 0.5,12 5.0292969,16.53125 6.0898438,15.46875 2.6210938,12 6.0898438,8.53125 Z M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z"})});var nb=o(Q(),1),JA=o(V(),1);function Iue(e,t){let[r]=(0,nb.useEntityProp)("taxonomy",t,"count",e),a=Cwe(),n=!!(e&&t);return{hasContext:n,termCount:n?r||"":a}}function Cwe(){let t=(0,JA.useSelect)(n=>{let{getCurrentPostId:i,getCurrentPostType:l,getCurrentTemplateId:s}=n("core/editor"),c=l(),u=s()||(c==="wp_template"?i():null);return u?n(nb.store).getEditedEntityRecord("postType","wp_template",u)?.slug:null},[])?.match(/^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/),r,a;return t&&(t[1]?r=t[2]?t[2]:t[1]:t[3]&&(r=t[6]?t[6]:t[4],a=t[7]),r=r==="tag"?"post_tag":r),(0,JA.useSelect)(n=>{if(!r||!a)return"";let{getEntityRecords:i}=n(nb.store),l=i("taxonomy",r,{slug:a,per_page:1});return l&&l[0]&&l[0].count||""},[r,a])}var op=o(v(),1),eR={none:{label:(0,sf.__)("No brackets"),icon:XA},round:{label:(0,sf.__)("Round brackets"),icon:Sue,before:"(",after:")"},square:{label:(0,sf.__)("Square brackets"),icon:Tue,before:"[",after:"]"},curly:{label:(0,sf.__)("Curly brackets"),icon:Pue,before:"{",after:"}"},angle:{label:(0,sf.__)("Angle brackets"),icon:Bue,before:"<",after:">"}};function Eue({attributes:e,setAttributes:t,context:{termId:r,taxonomy:a}}){let{bracketType:n}=e,l=Iue(r,a)?.termCount||0,s=(0,p7.useBlockProps)(),c=Object.entries(eR).map(([m,{label:p,icon:d}])=>({role:"menuitemradio",title:p,isActive:n===m,icon:d,onClick:()=>{t({bracketType:m})}})),u=(m,p)=>{let{before:d="",after:f=""}=eR[p]||{};return`${d}${m}${f}`};return(0,op.jsxs)(op.Fragment,{children:[(0,op.jsx)(p7.BlockControls,{group:"block",children:(0,op.jsx)(Nue.ToolbarDropdownMenu,{icon:eR[n]?.icon??XA,label:(0,sf.__)("Change bracket type"),controls:c})}),(0,op.jsx)("div",{...s,children:u(l,n)})]})}var{name:Due}=m7,Lue={icon:NB,example:{},edit:Eue},Swe=()=>E({name:Due,metadata:m7,settings:Lue});var oR={};Z(oR,{init:()=>Iwe,metadata:()=>d7,name:()=>Fue,settings:()=>Hue});var d7={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/term-description",title:"Term Description",category:"theme",description:"Display the description of categories, tags and custom taxonomies when viewing an archive.",textdomain:"default",usesContext:["termId","taxonomy"],supports:{anchor:!0,align:["wide","full"],html:!1,color:{link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{padding:!0,margin:!0},typography:{fontSize:!0,lineHeight:!0,textAlign:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}}};var Aue=o(P(),1),Rue=o(T(),1);var ib=o(Q(),1),rR=o(V(),1);function Mue(e,t){let[r,a,n]=(0,ib.useEntityProp)("taxonomy",t,"description",e),i=Pwe(),l=!!(e&&t);return{hasContext:l,setDescription:a,termDescription:l?n?.rendered||r||"":i}}function Pwe(){let t=(0,rR.useSelect)(n=>{let{getCurrentPostId:i,getCurrentPostType:l,getCurrentTemplateId:s}=n("core/editor"),c=l(),u=s()||(c==="wp_template"?i():null);return u?n(ib.store).getEditedEntityRecord("postType","wp_template",u)?.slug:null},[])?.match(/^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/),r,a;return t&&(t[1]?r=t[2]?t[2]:t[1]:t[3]&&(r=t[6]?t[6]:t[4],a=t[7]),r=r==="tag"?"post_tag":r),(0,rR.useSelect)(n=>{if(!r||!a)return"";let{getEntityRecords:i}=n(ib.store),l=i("taxonomy",r,{slug:a,per_page:1});return l&&l[0]&&l[0].description||""},[r,a])}var ap=o(v(),1);function zue({context:{termId:e,taxonomy:t}}){let{termDescription:r}=Mue(e,t),a=(0,Rue.useBlockProps)();return(0,ap.jsx)(ap.Fragment,{children:(0,ap.jsx)("div",{...a,children:r?(0,ap.jsx)("div",{dangerouslySetInnerHTML:{__html:r}}):(0,ap.jsx)("div",{className:"wp-block-term-description__placeholder",children:(0,ap.jsx)("span",{children:(0,Aue.__)("Term Description")})})})})}var Bwe={attributes:{textAlign:{type:"string"}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},migrate:We,isEligible(e){return!!e.textAlign||!!e.className?.match(/\bhas-text-align-(left|center|right)\b/)},save:()=>null},Vue=[Bwe];var{name:Fue}=d7,Hue={icon:DB,edit:zue,example:{},deprecated:Vue},Iwe=()=>E({name:Fue,metadata:d7,settings:Hue});var aR={};Z(aR,{init:()=>Dwe,metadata:()=>f7,name:()=>Gue,settings:()=>Wue});var f7={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/term-name",title:"Term Name",category:"theme",description:"Displays the name of a taxonomy term.",keywords:["term title"],textdomain:"default",usesContext:["termId","taxonomy"],attributes:{textAlign:{type:"string"},level:{type:"number",default:0},isLink:{type:"boolean",default:!1},levelOptions:{type:"array"}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{color:!0,width:!0,style:!0}}},style:"wp-block-term-name"};var lb=o(P(),1),Lc=o(T(),1),Jg=o(M(),1),jue=o(Wo(),1);var h7=o(Q(),1),g7=o(V(),1);function Oue(e,t){let r=(0,g7.useSelect)(i=>!e||!t?null:i(h7.store).getEntityRecord("taxonomy",t,e),[e,t]),a=Ewe(),n=!!(e&&t);return{hasContext:n,term:n?r:a}}function Ewe(){let t=(0,g7.useSelect)(n=>{let{getCurrentPostId:i,getCurrentPostType:l,getCurrentTemplateId:s}=n("core/editor"),c=l(),u=s()||(c==="wp_template"?i():null);return u?n(h7.store).getEditedEntityRecord("postType","wp_template",u)?.slug:null},[])?.match(/^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/),r,a;return t&&(t[3]&&(r=t[6]?t[6]:t[4],a=t[7]),r=r==="tag"?"post_tag":r),(0,g7.useSelect)(n=>{if(!r||!a)return null;let{getEntityRecords:i}=n(h7.store),l=i("taxonomy",r,{slug:a,per_page:1});return l&&l[0]?l[0]:null},[r,a])}var ei=o(v(),1);function Uue({attributes:e,setAttributes:t,context:{termId:r,taxonomy:a}}){let{textAlign:n,level:i=0,isLink:l,levelOptions:s}=e,{term:c}=Oue(r,a),u=c?.name?(0,jue.decodeEntities)(c.name):(0,lb.__)("Term Name"),m=(0,Lc.useBlockProps)({className:w({[`has-text-align-${n}`]:n})}),p=q(),d=i===0?"p":`h${i}`,f=u;return l&&(f=(0,ei.jsx)("a",{href:"#term-name-pseudo-link",onClick:h=>h.preventDefault(),children:u})),(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsxs)(Lc.BlockControls,{group:"block",children:[(0,ei.jsx)(Lc.HeadingLevelDropdown,{value:i,options:s,onChange:h=>{t({level:h})}}),(0,ei.jsx)(Lc.AlignmentControl,{value:n,onChange:h=>{t({textAlign:h})}})]}),(0,ei.jsx)(Lc.InspectorControls,{children:(0,ei.jsx)(Jg.__experimentalToolsPanel,{label:(0,lb.__)("Settings"),resetAll:()=>{t({isLink:!1})},dropdownMenuProps:p,children:(0,ei.jsx)(Jg.__experimentalToolsPanelItem,{hasValue:()=>!!l,label:(0,lb.__)("Make term name a link"),onDeselect:()=>t({isLink:!1}),isShownByDefault:!0,children:(0,ei.jsx)(Jg.ToggleControl,{label:(0,lb.__)("Make term name a link"),onChange:()=>t({isLink:!l}),checked:l})})})}),(0,ei.jsx)(d,{...m,children:f})]})}var{name:Gue}=f7,Wue={icon:LB,example:{},edit:Uue},Dwe=()=>E({name:Gue,metadata:f7,settings:Wue});var uR={};Z(uR,{init:()=>Hwe,metadata:()=>v7,name:()=>Dme,settings:()=>Lme});var v7={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/terms-query",title:"Terms Query",category:"theme",description:"An advanced block that allows displaying taxonomy terms based on different query parameters and visual configurations.",keywords:["terms","taxonomy","categories","tags","list"],textdomain:"default",attributes:{termQuery:{type:"object",default:{perPage:10,taxonomy:"category",order:"asc",orderBy:"name",include:[],hideEmpty:!0,showNested:!1,inherit:!1}},tagName:{type:"string",default:"div"}},usesContext:["templateSlug"],providesContext:{termQuery:"termQuery"},supports:{anchor:!0,align:["wide","full"],html:!1,layout:!0,interactivity:!0}};var Cme=o(V(),1),Sme=o(T(),1);var xme=o(U(),1),_7=o(T(),1);var ws=o(P(),1),Mc=o(M(),1),yme=o(T(),1);var $ue=o(Q(),1),que=o(V(),1),Zue=o(U(),1);function b7(){let e=(0,que.useSelect)(t=>t($ue.store).getTaxonomies({per_page:-1}),[]);return(0,Zue.useMemo)(()=>e?.filter(({visibility:t})=>t?.publicly_queryable)||[],[e])}var Kue=o(M(),1);var Que=o(v(),1);function Yue({value:e,onChange:t,...r}){let n=b7().map(i=>({label:i.name,value:i.slug}));return(0,Que.jsx)(Kue.SelectControl,{__next40pxDefaultSize:!0,options:n,value:e,onChange:t,...r})}var sb=o(P(),1),Xue=o(M(),1),Jue=o(v(),1);function eme({orderBy:e,order:t,onChange:r,...a}){return(0,Jue.jsx)(Xue.SelectControl,{__next40pxDefaultSize:!0,options:[{label:(0,sb.__)("Name: A \u2192 Z"),value:"name/asc"},{label:(0,sb.__)("Name: Z \u2192 A"),value:"name/desc"},{label:(0,sb.__)("Count, high to low"),value:"count/desc"},{label:(0,sb.__)("Count, low to high"),value:"count/asc"}],value:e+"/"+t,onChange:n=>{let[i,l]=n.split("/");r(i,l)},...a})}var tme=o(M(),1),rme=o(v(),1);function ome({value:e,onChange:t,...r}){return(0,rme.jsx)(tme.ToggleControl,{checked:!e,onChange:a=>t(!a),...r})}var ame=o(M(),1),nme=o(v(),1);function ime({value:e,onChange:t,...r}){return(0,nme.jsx)(ame.ToggleControl,{checked:e,onChange:t,...r})}var ub=o(M(),1),cb=o(P(),1),mb=o(v(),1);function lme({value:e,onChange:t,label:r}){return(0,mb.jsxs)(ub.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:r,isBlock:!0,onChange:a=>{t({inherit:a==="default"})},help:e?(0,cb.__)("Display terms based on the current taxonomy archive. For hierarchical taxonomies, shows children of the current term. For non-hierarchical taxonomies, shows all terms."):(0,cb.__)("Display terms based on specific criteria."),value:e?"default":"custom",children:[(0,mb.jsx)(ub.__experimentalToggleGroupControlOption,{value:"default",label:(0,cb.__)("Default")}),(0,mb.jsx)(ub.__experimentalToggleGroupControlOption,{value:"custom",label:(0,cb.__)("Custom")})]})}var sme=o(P(),1),cme=o(M(),1),ume=o(v(),1);function mme({value:e,onChange:t,...r}){return(0,ume.jsx)(cme.RangeControl,{__next40pxDefaultSize:!0,value:e,min:0,max:100,onChange:t,help:(0,sme.__)("Limit the number of terms you want to show. To show all terms, use 0 (zero)."),...r})}var pme=o(P(),1),y7=o(T(),1);var nR=o(v(),1),{HTMLElementControl:Mwe}=K(y7.privateApis);function dme({TagName:e,setAttributes:t,clientId:r}){return(0,nR.jsx)(y7.InspectorControls,{group:"advanced",children:(0,nR.jsx)(Mwe,{tagName:e,onChange:a=>t({tagName:a}),clientId:r,options:[{label:(0,pme.__)("Default (<div>)"),value:"div"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<aside>",value:"aside"}]})})}var hme=o(M(),1),iR=o(V(),1),lR=o(Q(),1),Mu=o(U(),1),gme=o(me(),1),sR=o(Wo(),1),vme=o(v(),1),cf=[],fme={order:"asc",_fields:"id,name",context:"view"};function bme({value:e,taxonomy:t,onChange:r,...a}){let[n,i]=(0,Mu.useState)(""),[l,s]=(0,Mu.useState)(cf),[c,u]=(0,Mu.useState)(cf),m=(0,gme.useDebounce)(i,250),{searchResults:p,searchHasResolved:d}=(0,iR.useSelect)(y=>{if(!n)return{searchResults:cf,searchHasResolved:!0};let{getEntityRecords:k,hasFinishedResolution:_}=y(lR.store),x=["taxonomy",t,{...fme,search:n,orderby:"name",exclude:e,per_page:20}];return{searchResults:k(...x),searchHasResolved:_("getEntityRecords",x)}},[n,t,e]),f=(0,iR.useSelect)(y=>{if(!e?.length)return cf;let{getEntityRecords:k}=y(lR.store);return k("taxonomy",t,{...fme,include:e,per_page:e.length})},[e,t]);(0,Mu.useEffect)(()=>{if(e?.length||s(cf),!f?.length)return;let y=e.reduce((k,_)=>{let x=f.find(S=>S.id===_);return x&&k.push({id:_,value:(0,sR.decodeEntities)(x.name)}),k},[]);s(y)},[e,f]);let h=(0,Mu.useMemo)(()=>{if(!p?.length)return{names:cf,mapByName:{}};let y=[],k={};return p.forEach(_=>{let x=(0,sR.decodeEntities)(_.name);y.push(x),k[x]=_}),{names:y,mapByName:k}},[p]);(0,Mu.useEffect)(()=>{d&&u(h.names)},[h.names,d]);let g=(y,k)=>k?.id||y?.[k]?.id;return(0,vme.jsx)(hme.FormTokenField,{__next40pxDefaultSize:!0,value:l,onInputChange:m,suggestions:c,onChange:y=>{let k=Array.from(y.reduce((_,x)=>{let S=g(h.mapByName,x);return S&&_.add(S),_},new Set));u(cf),r(k)},__experimentalShowHowTo:!1,...a})}var Ar=o(v(),1);function _me({attributes:e,setQuery:t,setAttributes:r,clientId:a,templateSlug:n}){let{termQuery:i,tagName:l}=e,{taxonomy:s,orderBy:c,order:u,hideEmpty:m,inherit:p,showNested:d,perPage:f,include:h}=i,g=q(),y=b7().find(z=>z.slug===s)?.hierarchical,k=!!p,_=["taxonomy","category","tag","archive"].includes(n)||n?.startsWith("taxonomy-")||n?.startsWith("category-")||n?.startsWith("tag-"),x=y,S=!!h?.length,C=(0,ws.__)("Query type"),N=(0,ws.__)("Taxonomy"),B=(0,ws.__)("Order by"),D=(0,ws.__)("Show empty terms"),A=(0,ws.__)("Show nested terms"),H=(0,ws.__)("Max terms"),F=(0,ws.__)("Selected terms");return(0,Ar.jsxs)(Ar.Fragment,{children:[(0,Ar.jsx)(yme.InspectorControls,{children:(0,Ar.jsxs)(Mc.__experimentalToolsPanel,{label:(0,ws.__)("Settings"),resetAll:()=>{r({termQuery:{taxonomy:"category",order:"asc",orderBy:"name",include:[],hideEmpty:!0,showNested:!1,inherit:!1,perPage:10}})},dropdownMenuProps:g,children:[_&&(0,Ar.jsx)(Mc.__experimentalToolsPanelItem,{hasValue:()=>p!==!1,label:C,onDeselect:()=>t({inherit:!1}),isShownByDefault:!0,children:(0,Ar.jsx)(lme,{label:C,value:p,onChange:t})}),!k&&(0,Ar.jsx)(Mc.__experimentalToolsPanelItem,{hasValue:()=>s!=="category",label:N,onDeselect:()=>{t({taxonomy:"category"})},isShownByDefault:!0,children:(0,Ar.jsx)(Yue,{label:N,value:s,onChange:z=>t({taxonomy:z,include:[]})})}),(0,Ar.jsx)(Mc.__experimentalToolsPanelItem,{hasValue:()=>c!=="name"||u!=="asc",label:B,onDeselect:()=>t({orderBy:"name",order:"asc"}),isShownByDefault:!0,children:(0,Ar.jsx)(eme,{label:B,orderBy:c,order:u,onChange:(z,I)=>{t({orderBy:z,order:I})},disabled:S,help:S?(0,ws.__)("When specific terms are selected, the order is based on their selection order."):void 0})}),!k&&(0,Ar.jsx)(Mc.__experimentalToolsPanelItem,{hasValue:()=>!!h?.length,label:F,onDeselect:()=>t({include:[],orderBy:"name",order:"asc"}),isShownByDefault:!0,children:(0,Ar.jsx)(bme,{label:F,taxonomy:s,value:h,onChange:z=>t({include:z})})}),(0,Ar.jsx)(Mc.__experimentalToolsPanelItem,{hasValue:()=>m!==!0,label:D,onDeselect:()=>t({hideEmpty:!0}),isShownByDefault:!0,children:(0,Ar.jsx)(ome,{label:D,value:m,onChange:z=>t({hideEmpty:z})})}),x&&(0,Ar.jsx)(Mc.__experimentalToolsPanelItem,{hasValue:()=>d!==!1,label:A,onDeselect:()=>t({showNested:!1}),isShownByDefault:!0,children:(0,Ar.jsx)(ime,{label:A,value:d,onChange:z=>t({showNested:z}),disabled:S,help:S?(0,ws.__)("When specific terms are selected, only those are displayed."):void 0})}),(0,Ar.jsx)(Mc.__experimentalToolsPanelItem,{hasValue:()=>f!==10,label:H,onDeselect:()=>t({perPage:10}),isShownByDefault:!0,children:(0,Ar.jsx)(mme,{label:H,value:f,onChange:z=>t({perPage:z})})})]})}),(0,Ar.jsx)(dme,{TagName:l,setAttributes:r,clientId:a})]})}var uf=o(v(),1),Awe=[["core/term-template"]];function kme({attributes:e,setAttributes:t,clientId:r,context:a}){let{tagName:n}=e,i=(0,_7.useBlockProps)(),l=(0,_7.useInnerBlocksProps)(i,{template:Awe}),s=(0,xme.useCallback)(c=>t(u=>({termQuery:{...u.termQuery,...c}})),[t]);return(0,uf.jsxs)(uf.Fragment,{children:[(0,uf.jsx)(_me,{attributes:e,setQuery:s,setAttributes:t,clientId:r,templateSlug:a?.templateSlug}),(0,uf.jsx)(n,{...l})]})}var x7=o(V(),1),k7=o(W(),1),e0=o(T(),1),cR=o(v(),1);function wme({attributes:e,clientId:t,name:r}){let{blockType:a,activeBlockVariation:n,scopeVariations:i}=(0,x7.useSelect)(m=>{let{getActiveBlockVariation:p,getBlockType:d,getBlockVariations:f}=m(k7.store);return{blockType:d(r),activeBlockVariation:p(r,e),scopeVariations:f(r,"block")}},[r,e]),l=n?.icon?.src||n?.icon||a?.icon?.src,s=n?.title||a?.title,{replaceInnerBlocks:c}=(0,x7.useDispatch)(e0.store),u=(0,e0.useBlockProps)();return(0,cR.jsx)("div",{...u,children:(0,cR.jsx)(e0.__experimentalBlockVariationPicker,{icon:l,label:s,variations:i,onSelect:m=>{m.innerBlocks&&c(t,(0,k7.createBlocksFromInnerBlocksTemplate)(m.innerBlocks),!1)}})})}var Tme=o(v(),1),Rwe=e=>{let r=(0,Cme.useSelect)(a=>!!a(Sme.store).getBlocks(e.clientId).length,[e.clientId])?kme:wme;return(0,Tme.jsx)(r,{...e})},Pme=Rwe;var w7=o(T(),1),Bme=o(v(),1);function Ime({attributes:{tagName:e="div"}}){let t=w7.useBlockProps.save(),r=w7.useInnerBlocksProps.save(t);return(0,Bme.jsx)(e,{...r})}var pb=o(P(),1),t0=o(M(),1),db=o(v(),1),zwe=(0,db.jsx)(t0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",children:(0,db.jsx)(t0.Path,{d:"M 41,9 H 7 v 3 h 34 z m 0,9 H 7 v 3 h 34 z m 0,18 H 7 v 3 h 34 z m 0,-9 H 7 v 3 h 34 z"})}),Vwe=(0,db.jsx)(t0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",children:(0,db.jsx)(t0.Path,{d:"m 36,36 h 5 v 3 h -5 z m 0,-9 h 5 v 3 h -5 z m 0,-9 h 5 v 3 h -5 z m 0,-9 h 5 v 3 H 36 Z M 31,9 H 7 v 3 h 24 z m 0,9 H 7 v 3 h 24 z m 0,18 H 7 v 3 h 24 z m 0,-9 H 7 v 3 h 24 z"})}),Nme=["core/term-name",{isLink:!0}],Fwe=[{name:"name",title:(0,pb.__)("Name"),description:(0,pb.__)("Display the terms' names."),attributes:{},icon:zwe,scope:["block"],innerBlocks:[["core/term-template",{},[Nme]]]},{name:"name-count",title:(0,pb.__)("Name & Count"),description:(0,pb.__)("Display the terms' names and number of posts assigned to each term."),attributes:{},icon:Vwe,scope:["block"],innerBlocks:[["core/term-template",{},[["core/group",{layout:{type:"flex",flexWrap:"nowrap"}},[Nme,["core/term-count"]]]]]]}],Eme=Fwe;var{name:Dme}=v7,Lme={icon:Sp,edit:Pme,save:Ime,example:{},variations:Eme},Hwe=()=>E({name:Dme,metadata:v7,settings:Lme});var mR={};Z(mR,{init:()=>$we,metadata:()=>C7,name:()=>Ome,settings:()=>jme});var C7={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/term-template",title:"Term Template",category:"theme",ancestor:["core/terms-query"],description:"Contains the block elements used to render a taxonomy term, like the name, description, and more.",textdomain:"default",usesContext:["termQuery"],supports:{anchor:!0,reusable:!1,html:!1,align:["wide","full"],layout:!0,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{margin:!0,padding:!0,blockGap:{__experimentalDefault:"1.25em"},__experimentalDefaultControls:{blockGap:!0,padding:!1,margin:!1}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0}},style:"wp-block-term-template",editorStyle:"wp-block-term-template-editor"};var Mme=o(M(),1);var r0=o(U(),1),Ame=o(V(),1),fb=o(P(),1),kl=o(T(),1),Rme=o(Q(),1),ga=o(v(),1),jwe=[["core/term-name"]];function Uwe({classList:e}){let t=(0,kl.useInnerBlocksProps)({className:w("wp-block-term",e)},{template:jwe,__unstableDisableLayoutClassNames:!0});return(0,ga.jsx)("li",{...t})}function Gwe({blocks:e,blockContextId:t,classList:r,isHidden:a,setActiveBlockContextId:n}){let i=(0,kl.__experimentalUseBlockPreview)({blocks:e,props:{className:w("wp-block-term",r)}}),l=()=>{n(t)};return(0,ga.jsx)("li",{...i,tabIndex:0,role:"button",onClick:l,onKeyPress:l,style:{display:a?"none":void 0}})}var Wwe=(0,r0.memo)(Gwe);function zme({clientId:e,attributes:{layout:t},setAttributes:r,context:{termQuery:{taxonomy:a,order:n,orderBy:i,hideEmpty:l,showNested:s=!1,perPage:c,include:u}={}},__unstableLayoutClassNames:m}){let{type:p,columnCount:d=3}=t||{},[f,h]=(0,r0.useState)(),g={hide_empty:l,order:n,orderby:i,per_page:c||-1};!s&&!u?.length&&(g.parent=0),u?.length&&(g.include=u,g.orderby="include",g.order="asc");let{records:b}=(0,Rme.useEntityRecords)("taxonomy",a,g),y=(0,Ame.useSelect)(S=>S(kl.store).getBlocks(e),[e]),k=(0,kl.useBlockProps)({className:m}),_=(0,r0.useMemo)(()=>b?.map(S=>({taxonomy:a,termId:S.id,classList:`term-${S.id}`,termData:S})),[b,a]);if(!b)return(0,ga.jsx)("ul",{...k,children:(0,ga.jsx)("li",{className:"wp-block-term term-loading",children:(0,ga.jsx)("div",{className:"term-loading-placeholder"})})});if(!b.length)return(0,ga.jsxs)("p",{...k,children:[" ",(0,fb.__)("No terms found.")]});let x=S=>r(C=>({layout:{...C.layout,...S}}));return(0,ga.jsxs)(ga.Fragment,{children:[(0,ga.jsx)(kl.BlockControls,{children:(0,ga.jsx)(Mme.ToolbarGroup,{controls:[{icon:Nl,title:(0,fb._x)("List view","Term template block display setting"),onClick:()=>x({type:"default"}),isActive:p==="default"||p==="constrained"},{icon:Il,title:(0,fb._x)("Grid view","Term template block display setting"),onClick:()=>x({type:"grid",columnCount:d}),isActive:p==="grid"}]})}),(0,ga.jsx)("ul",{...k,children:_?.map(S=>(0,ga.jsxs)(kl.BlockContextProvider,{value:S,children:[S.termId===(f||_[0]?.termId)?(0,ga.jsx)(Uwe,{classList:S.classList}):null,(0,ga.jsx)(Wwe,{blocks:y,blockContextId:S.termId,classList:S.classList,setActiveBlockContextId:h,isHidden:S.termId===(f||_[0]?.termId)})]},S.termId))})]})}var Vme=o(T(),1),Fme=o(v(),1);function Hme(){return(0,Fme.jsx)(Vme.InnerBlocks.Content,{})}var{name:Ome}=C7,jme={icon:Cp,edit:zme,save:Hme,example:{}},$we=()=>E({name:Ome,metadata:C7,settings:jme});var pR={};Z(pR,{init:()=>Kwe,metadata:()=>T7,name:()=>qme,settings:()=>Zme});var o0=o(P(),1),S7=o(M(),1),Ac=o(T(),1),Ume=o(Ff(),1),$i=o(v(),1);function Gme({attributes:e,setAttributes:t}){let{width:r,content:a,columns:n}=e;return(0,Ume.default)("The Text Columns block",{since:"5.3",alternative:"the Columns block"}),(0,$i.jsxs)($i.Fragment,{children:[(0,$i.jsx)(Ac.BlockControls,{children:(0,$i.jsx)(Ac.BlockAlignmentToolbar,{value:r,onChange:i=>t({width:i}),controls:["center","wide","full"]})}),(0,$i.jsx)(Ac.InspectorControls,{children:(0,$i.jsx)(S7.PanelBody,{children:(0,$i.jsx)(S7.RangeControl,{__next40pxDefaultSize:!0,label:(0,o0.__)("Columns"),value:n,onChange:i=>t({columns:i}),min:2,max:4,required:!0})})}),(0,$i.jsx)("div",{...(0,Ac.useBlockProps)({className:`align${r} columns-${n}`}),children:Array.from({length:n}).map((i,l)=>(0,$i.jsx)("div",{className:"wp-block-column",children:(0,$i.jsx)(Ac.RichText,{tagName:"p",value:a?.[l]?.children,onChange:s=>{t({content:[...a.slice(0,l),{children:s},...a.slice(l+1)]})},"aria-label":(0,o0.sprintf)((0,o0.__)("Column %d text"),l+1),placeholder:(0,o0.__)("New Column")})},`column-${l}`))})]})}var T7={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/text-columns",title:"Text Columns (deprecated)",icon:"columns",category:"design",description:"This block is deprecated. Please use the Columns block instead.",textdomain:"default",attributes:{content:{type:"array",source:"query",selector:"p",query:{children:{type:"string",source:"html"}},default:[{},{}]},columns:{type:"number",default:2},width:{type:"string"}},supports:{inserter:!1,interactivity:{clientNavigation:!0}},editorStyle:"wp-block-text-columns-editor",style:"wp-block-text-columns"};var B7=o(T(),1),P7=o(v(),1);function Wme({attributes:e}){let{width:t,content:r,columns:a}=e;return(0,P7.jsx)("div",{...B7.useBlockProps.save({className:`align${t} columns-${a}`}),children:Array.from({length:a}).map((n,i)=>(0,P7.jsx)("div",{className:"wp-block-column",children:(0,P7.jsx)(B7.RichText.Content,{tagName:"p",value:r?.[i]?.children})},`column-${i}`))})}var I7=o(W(),1),Zwe={to:[{type:"block",blocks:["core/columns"],transform:({className:e,columns:t,content:r,width:a})=>(0,I7.createBlock)("core/columns",{align:a==="wide"||a==="full"?a:void 0,className:e,columns:t},r.map(({children:n})=>(0,I7.createBlock)("core/column",{},[(0,I7.createBlock)("core/paragraph",{content:n})])))}]},$me=Zwe;var{name:qme}=T7,Zme={transforms:$me,getEditWrapperProps(e){let{width:t}=e;if(t==="wide"||t==="full")return{"data-align":t}},edit:Gme,save:Wme},Kwe=()=>E({name:qme,metadata:T7,settings:Zme});var vR={};Z(vR,{init:()=>oCe,metadata:()=>D7,name:()=>tpe,settings:()=>M7});var gR=o(P(),1);var epe=o(W(),1);var mf=o(T(),1);var a0=o(v(),1),Qwe={attributes:{content:{type:"string",source:"html",selector:"pre",default:""},textAlign:{type:"string"}},save({attributes:e}){let{textAlign:t,content:r}=e;return(0,a0.jsx)(mf.RichText.Content,{tagName:"pre",style:{textAlign:t},value:r})},migrate:We},Ywe={attributes:{content:{type:"string",source:"html",selector:"pre",default:"",__unstablePreserveWhiteSpace:!0,role:"content"},textAlign:{type:"string"}},supports:{anchor:!0,color:{gradients:!0,link:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},spacing:{padding:!0}},save({attributes:e}){let{textAlign:t,content:r}=e,a=w({[`has-text-align-${t}`]:t});return(0,a0.jsx)("pre",{...mf.useBlockProps.save({className:a}),children:(0,a0.jsx)(mf.RichText.Content,{value:r})})},migrate(e){return We(Ot(e))},isEligible({style:e,textAlign:t}){return e?.typography?.fontFamily||!!t}},Xwe={attributes:{content:{type:"rich-text",source:"rich-text",selector:"pre",__unstablePreserveWhiteSpace:!0,role:"content"},textAlign:{type:"string"}},supports:{anchor:!0,background:{backgroundImage:!0,backgroundSize:!0},color:{gradients:!0,link:!0},dimensions:{minHeight:!0},typography:{fontSize:!0,__experimentalFontFamily:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalWritingMode:!0},spacing:{margin:!0,padding:!0},__experimentalBorder:{radius:!0,width:!0,color:!0,style:!0},interactivity:{clientNavigation:!0}},save({attributes:e}){let{textAlign:t,content:r}=e,a=w({[`has-text-align-${t}`]:t});return(0,a0.jsx)("pre",{...mf.useBlockProps.save({className:a}),children:(0,a0.jsx)(mf.RichText.Content,{value:r})})},migrate:We,isEligible(e){return!!e.textAlign||!!e.className?.match(/\bhas-text-align-(left|center|right)\b/)}},Kme=[Xwe,Ywe,Qwe];var dR=o(P(),1),N7=o(T(),1),E7=o(W(),1);var Qme=o(v(),1);function Yme(e){let{attributes:t,setAttributes:r,mergeBlocks:a,onRemove:n,insertBlocksAfter:i,style:l}=e,{content:s}=t;Kr(e);let c=(0,N7.useBlockProps)({style:l});return(0,Qme.jsx)(N7.RichText,{tagName:"pre",identifier:"content",preserveWhiteSpace:!0,value:s,onChange:u=>{r({content:u})},"aria-label":(0,dR.__)("Poetry text"),placeholder:(0,dR.__)("Write poetry\u2026"),onRemove:n,onMerge:a,...c,__unstablePastePlainText:!0,__unstableOnSplitAtDoubleLineEnd:()=>i((0,E7.createBlock)((0,E7.getDefaultBlockName)()))})}var D7={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/verse",title:"Poetry",category:"text",description:"Insert poetry. Use special spacing formats. Or quote song lyrics.",keywords:["poetry","poem","verse","stanza","song","lyrics"],textdomain:"default",attributes:{content:{type:"rich-text",source:"rich-text",selector:"pre",__unstablePreserveWhiteSpace:!0,role:"content"}},supports:{anchor:!0,background:{backgroundImage:!0,backgroundSize:!0,__experimentalDefaultControls:{backgroundImage:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},dimensions:{minHeight:!0,__experimentalDefaultControls:{minHeight:!1}},typography:{fontSize:!0,__experimentalFontFamily:!0,lineHeight:!0,textAlign:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__experimentalBorder:{radius:!0,width:!0,color:!0,style:!0},interactivity:{clientNavigation:!0}},style:"wp-block-verse",editorStyle:"wp-block-verse-editor"};var L7=o(T(),1),fR=o(v(),1);function Xme({attributes:e}){let{content:t}=e;return(0,fR.jsx)("pre",{...L7.useBlockProps.save(),children:(0,fR.jsx)(L7.RichText.Content,{value:t})})}var hR=o(W(),1),eCe={from:[{type:"block",blocks:["core/paragraph"],transform:e=>(0,hR.createBlock)("core/verse",e)}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>(0,hR.createBlock)("core/paragraph",e)}]},Jme=eCe;var{fieldsKey:tCe,formKey:rCe}=K(epe.privateApis),{name:tpe}=D7,M7={icon:_1,example:{attributes:{content:(0,gR.__)(`WHAT was he doing, the great god Pan,
	Down in the reeds by the river?
Spreading ruin and scattering ban,
Splashing and paddling with hoofs of a goat,
And breaking the golden lilies afloat
    With the dragon-fly on the river.`)}},transforms:Jme,deprecated:Kme,merge(e,t){return{content:e.content+`

`+t.content}},edit:Yme,save:Xme};window.__experimentalContentOnlyInspectorFields&&(M7[tCe]=[{id:"content",label:(0,gR.__)("Content"),type:"text",Edit:"rich-text"}],M7[rCe]={fields:["content"]});var oCe=()=>E({name:tpe,metadata:D7,settings:M7});var _R={};Z(_R,{init:()=>yCe,metadata:()=>n0,name:()=>bpe,settings:()=>z7});var R7=o(P(),1);var vpe=o(W(),1);var hb=o(T(),1);var n0={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/video",title:"Video",category:"media",description:"Embed a video from your media library or upload a new one.",keywords:["movie"],textdomain:"default",attributes:{autoplay:{type:"boolean",source:"attribute",selector:"video",attribute:"autoplay"},caption:{type:"rich-text",source:"rich-text",selector:"figcaption",role:"content"},controls:{type:"boolean",source:"attribute",selector:"video",attribute:"controls",default:!0},id:{type:"number",role:"content"},loop:{type:"boolean",source:"attribute",selector:"video",attribute:"loop"},muted:{type:"boolean",source:"attribute",selector:"video",attribute:"muted"},poster:{type:"string",source:"attribute",selector:"video",attribute:"poster"},preload:{type:"string",source:"attribute",selector:"video",attribute:"preload",default:"metadata"},blob:{type:"string",role:"local"},src:{type:"string",source:"attribute",selector:"video",attribute:"src",role:"content"},playsInline:{type:"boolean",source:"attribute",selector:"video",attribute:"playsinline"},tracks:{role:"content",type:"array",items:{type:"object"},default:[]}},supports:{anchor:!0,align:!0,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},interactivity:{clientNavigation:!0}},editorStyle:"wp-block-video-editor",style:"wp-block-video"};var rpe=o(v(),1);function i0({tracks:e=[]}){return e.map(t=>{let{id:r,...a}=t;return(0,rpe.jsx)("track",{...a},r??a.src)})}var l0=o(v(),1),{attributes:nCe}=n0,iCe={attributes:nCe,save({attributes:e}){let{autoplay:t,caption:r,controls:a,loop:n,muted:i,poster:l,preload:s,src:c,playsInline:u,tracks:m}=e;return(0,l0.jsxs)("figure",{...hb.useBlockProps.save(),children:[c&&(0,l0.jsx)("video",{autoPlay:t,controls:a,loop:n,muted:i,poster:l,preload:s!=="metadata"?s:void 0,src:c,playsInline:u,children:(0,l0.jsx)(i0,{tracks:m})}),!hb.RichText.isEmpty(r)&&(0,l0.jsx)(hb.RichText.Content,{tagName:"figcaption",value:r})]})}},lCe=[iCe],ope=lCe;var upe=o(Rr(),1),np=o(M(),1),_n=o(T(),1),c0=o(U(),1),gb=o(P(),1),mpe=o(V(),1);var ppe=o(xr(),1),dpe=o(mr(),1);var Gr=o(P(),1),yn=o(M(),1),pf=o(U(),1),va=o(v(),1),sCe=[{value:"auto",label:(0,Gr.__)("Auto")},{value:"metadata",label:(0,Gr.__)("Metadata")},{value:"none",label:(0,Gr._x)("None","Preload value")}],cCe=({setAttributes:e,attributes:t})=>{let{autoplay:r,controls:a,loop:n,muted:i,playsInline:l,preload:s}=t,c=(0,Gr.__)("Autoplay may cause usability issues for some users."),u=pf.Platform.select({web:(0,pf.useCallback)(d=>d?c:null,[]),native:c}),m=(0,pf.useMemo)(()=>{let d=f=>h=>{e({[f]:h,...f==="autoplay"&&{muted:h,playsInline:h}})};return{autoplay:d("autoplay"),loop:d("loop"),muted:d("muted"),controls:d("controls"),playsInline:d("playsInline")}},[]),p=(0,pf.useCallback)(d=>{e({preload:d})},[]);return(0,va.jsxs)(va.Fragment,{children:[(0,va.jsx)(yn.__experimentalToolsPanelItem,{label:(0,Gr.__)("Autoplay"),isShownByDefault:!0,hasValue:()=>!!r,onDeselect:()=>{e({autoplay:!1,muted:!1})},children:(0,va.jsx)(yn.ToggleControl,{label:(0,Gr.__)("Autoplay"),onChange:m.autoplay,checked:!!r,help:u})}),(0,va.jsx)(yn.__experimentalToolsPanelItem,{label:(0,Gr.__)("Loop"),isShownByDefault:!0,hasValue:()=>!!n,onDeselect:()=>{e({loop:!1})},children:(0,va.jsx)(yn.ToggleControl,{label:(0,Gr.__)("Loop"),onChange:m.loop,checked:!!n})}),(0,va.jsx)(yn.__experimentalToolsPanelItem,{label:(0,Gr.__)("Muted"),isShownByDefault:!0,hasValue:()=>!!i,onDeselect:()=>{e({muted:!1})},children:(0,va.jsx)(yn.ToggleControl,{label:(0,Gr.__)("Muted"),onChange:m.muted,checked:!!i,disabled:r,help:r?(0,Gr.__)("Muted because of Autoplay."):null})}),(0,va.jsx)(yn.__experimentalToolsPanelItem,{label:(0,Gr.__)("Playback controls"),isShownByDefault:!0,hasValue:()=>!a,onDeselect:()=>{e({controls:!0})},children:(0,va.jsx)(yn.ToggleControl,{label:(0,Gr.__)("Playback controls"),onChange:m.controls,checked:!!a})}),(0,va.jsx)(yn.__experimentalToolsPanelItem,{label:(0,Gr.__)("Play inline"),isShownByDefault:!0,hasValue:()=>!!l,onDeselect:()=>{e({playsInline:!1})},children:(0,va.jsx)(yn.ToggleControl,{label:(0,Gr.__)("Play inline"),onChange:m.playsInline,checked:!!l,disabled:r,help:r?(0,Gr.__)("Play inline enabled because of Autoplay."):(0,Gr.__)("When enabled, videos will play directly within the webpage on mobile browsers, instead of opening in a fullscreen player.")})}),(0,va.jsx)(yn.__experimentalToolsPanelItem,{label:(0,Gr.__)("Preload"),isShownByDefault:!0,hasValue:()=>s!=="metadata",onDeselect:()=>{e({preload:"metadata"})},children:(0,va.jsx)(yn.SelectControl,{__next40pxDefaultSize:!0,label:(0,Gr.__)("Preload"),value:s,onChange:p,options:sCe,hideCancelButton:!0})})]})},ape=cCe;var Dt=o(P(),1),Ye=o(M(),1),s0=o(T(),1);var ipe=o(V(),1),df=o(U(),1),lpe=o(mr(),1);var Ze=o(v(),1),{Badge:uCe}=K(Ye.privateApis),npe=["text/vtt"],mCe="subtitles",pCe=[{label:(0,Dt.__)("Subtitles"),value:"subtitles"},{label:(0,Dt.__)("Captions"),value:"captions"},{label:(0,Dt.__)("Descriptions"),value:"descriptions"},{label:(0,Dt.__)("Chapters"),value:"chapters"},{label:(0,Dt.__)("Metadata"),value:"metadata"}],spe={src:"",label:"",srcLang:"en",kind:mCe,default:!1};function dCe({tracks:e,onEditPress:t}){let r=e.map((a,n)=>(0,Ze.jsxs)(Ye.__experimentalHStack,{className:"block-library-video-tracks-editor__track-list-track",children:[(0,Ze.jsx)("span",{children:a.label}),(0,Ze.jsxs)(Ye.__experimentalHStack,{justify:"flex-end",children:[a.default&&(0,Ze.jsx)(uCe,{children:(0,Dt.__)("Default")}),(0,Ze.jsx)(Ye.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t(n),"aria-label":(0,Dt.sprintf)((0,Dt._x)("Edit %s","text tracks"),a.label),children:(0,Dt.__)("Edit")})]})]},a.id??a.src));return(0,Ze.jsx)(Ye.MenuGroup,{label:(0,Dt.__)("Text tracks"),className:"block-library-video-tracks-editor__track-list",children:r})}function fCe({track:e,onChange:t,onClose:r,onRemove:a,allowSettingDefault:n}){let[i,l]=(0,df.useState)({...spe,...e}),{src:s,label:c,srcLang:u,kind:m,default:p}=i,d=s.startsWith("blob:")?"":(0,lpe.getFilename)(s)||"";return(0,Ze.jsxs)(Ye.__experimentalVStack,{className:"block-library-video-tracks-editor__single-track-editor",spacing:"4",children:[(0,Ze.jsx)("span",{className:"block-library-video-tracks-editor__single-track-editor-edit-track-label",children:(0,Dt.__)("Edit track")}),(0,Ze.jsxs)("span",{children:[(0,Dt.__)("File"),": ",(0,Ze.jsx)("b",{children:d})]}),(0,Ze.jsxs)(Ye.__experimentalGrid,{columns:2,gap:4,children:[(0,Ze.jsx)(Ye.TextControl,{__next40pxDefaultSize:!0,onChange:f=>l(h=>({...h,label:f})),label:(0,Dt.__)("Label"),value:c,help:(0,Dt.__)("Title of track")}),(0,Ze.jsx)(Ye.TextControl,{__next40pxDefaultSize:!0,onChange:f=>l(h=>({...h,srcLang:f})),label:(0,Dt.__)("Source language"),value:u,help:(0,Dt.__)("Language tag (en, fr, etc.)")})]}),(0,Ze.jsxs)(Ye.__experimentalVStack,{spacing:"4",children:[(0,Ze.jsx)(Ye.SelectControl,{__next40pxDefaultSize:!0,className:"block-library-video-tracks-editor__single-track-editor-kind-select",options:pCe,value:m,label:(0,Dt.__)("Kind"),onChange:f=>l(h=>({...h,kind:f}))}),(0,Ze.jsx)(Ye.ToggleControl,{__next40pxDefaultSize:!0,label:(0,Dt.__)("Set as default track"),checked:p,disabled:!n,onChange:f=>l(h=>({...h,default:f}))}),(0,Ze.jsxs)(Ye.__experimentalHStack,{className:"block-library-video-tracks-editor__single-track-editor-buttons-container",children:[(0,Ze.jsx)(Ye.Button,{__next40pxDefaultSize:!0,isDestructive:!0,variant:"link",onClick:a,children:(0,Dt.__)("Remove track")}),(0,Ze.jsx)(Ye.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:()=>{t(i),r()},children:(0,Dt.__)("Apply")})]})]})]})}function cpe({tracks:e=[],onChange:t}){let r=(0,ipe.useSelect)(c=>c(s0.store).getSettings().mediaUpload,[]),[a,n]=(0,df.useState)(null),i=(0,df.useRef)(),l=(c=[],u=!1)=>{let m=new Map(e.map(d=>[d.id,d])),p=c.map(({id:d,title:f,url:h})=>m.has(d)?m.get(d):{...spe,id:d,label:f||"",src:h});p.length!==0&&t([...u?e:[],...p])};function s(c){let u=c.target.files;r({allowedTypes:npe,filesList:u,onFileChange:m=>{if(!Array.isArray(m))return;let p=m.filter(d=>!!d?.id);p.length&&l(p,!0)}})}return(0,df.useEffect)(()=>{i.current?.focus()},[a]),r?(0,Ze.jsx)(Ye.Dropdown,{contentClassName:"block-library-video-tracks-editor",focusOnMount:!0,popoverProps:{ref:i},renderToggle:({isOpen:c,onToggle:u})=>(0,Ze.jsx)(Ye.ToolbarGroup,{children:(0,Ze.jsx)(Ye.ToolbarButton,{"aria-expanded":c,"aria-haspopup":"true",onClick:()=>{c||n(null),u()},children:(0,Dt.__)("Text tracks")})}),renderContent:()=>a!==null?(0,Ze.jsx)(fCe,{track:e[a],onChange:c=>{let u=[...e];u[a]=c,t(u)},onClose:()=>n(null),onRemove:()=>{t(e.filter((c,u)=>u!==a)),n(null)},allowSettingDefault:!e.some(c=>c.default)||e[a].default}):(0,Ze.jsxs)(Ze.Fragment,{children:[e.length===0&&(0,Ze.jsxs)("div",{className:"block-library-video-tracks-editor__tracks-informative-message",children:[(0,Ze.jsx)("h2",{className:"block-library-video-tracks-editor__tracks-informative-message-title",children:(0,Dt.__)("Text tracks")}),(0,Ze.jsx)("p",{className:"block-library-video-tracks-editor__tracks-informative-message-description",children:(0,Dt.__)("Tracks can be subtitles, captions, chapters, or descriptions. They help make your content more accessible to a wider range of users.")})]}),(0,Ze.jsxs)(Ye.NavigableMenu,{children:[(0,Ze.jsx)(dCe,{tracks:e,onEditPress:n}),(0,Ze.jsx)(Ye.MenuGroup,{className:"block-library-video-tracks-editor__add-tracks-container",label:(0,Dt.__)("Add tracks"),children:(0,Ze.jsxs)(s0.MediaUploadCheck,{children:[(0,Ze.jsx)(s0.MediaUpload,{onSelect:l,allowedTypes:npe,value:e.map(({id:c})=>c),multiple:!0,render:({open:c})=>(0,Ze.jsx)(Ye.MenuItem,{icon:$0,onClick:c,children:(0,Dt.__)("Open Media Library")})}),(0,Ze.jsx)(Ye.FormFileUpload,{onChange:s,accept:".vtt,text/vtt",multiple:!0,render:({openFileDialog:c})=>(0,Ze.jsx)(Ye.MenuItem,{icon:Hc,onClick:c,children:(0,Dt._x)("Upload","verb")})})]})})]})]})}):null}var ur=o(v(),1),bR=["video"];function hCe({isSelected:e,attributes:t,className:r,setAttributes:a,insertBlocksAfter:n,onReplace:i}){let l=(0,c0.useRef)(),{id:s,controls:c,poster:u,src:m,tracks:p}=t,[d,f]=(0,c0.useState)(t.blob),h=q(),b=(0,_n.useBlockEditingMode)()==="default";Es({url:d,allowedTypes:bR,onChange:y,onError:x}),(0,c0.useEffect)(()=>{l.current&&l.current.load()},[u]);function y(B){if(!B||!B.url){a({src:void 0,id:void 0,poster:void 0,caption:void 0,blob:void 0}),f();return}if((0,upe.isBlobURL)(B.url)){f(B.url);return}a({blob:void 0,src:B.url,id:B.id,poster:B.image?.src!==B.icon?B.image?.src:void 0,caption:B.caption}),f()}function k(B){if(B!==m){let D=(0,dpe.prependHTTPS)(B),A=Yu({attributes:{url:D}});if(A!==void 0&&i){i(A);return}a({blob:void 0,src:D,id:void 0,poster:void 0}),f()}}let{createErrorNotice:_}=(0,mpe.useDispatch)(ppe.store);function x(B){_(B,{type:"snackbar"})}let S=B=>(0,ur.jsx)(np.Placeholder,{className:"block-editor-media-placeholder",withIllustration:!e,icon:Ef,label:(0,gb.__)("Video"),instructions:(0,gb.__)("Drag and drop a video, upload, or choose from your library."),children:B}),C=w(r,{"is-transient":!!d}),N=(0,_n.useBlockProps)({className:C});return!m&&!d?(0,ur.jsx)("div",{...N,children:(0,ur.jsx)(_n.MediaPlaceholder,{icon:(0,ur.jsx)(_n.BlockIcon,{icon:Ef}),onSelect:y,onSelectURL:k,accept:"video/*",allowedTypes:bR,value:t,onError:x,placeholder:S})}):(0,ur.jsxs)(ur.Fragment,{children:[e&&(0,ur.jsxs)(ur.Fragment,{children:[(0,ur.jsx)(_n.BlockControls,{children:(0,ur.jsx)(cpe,{tracks:p,onChange:B=>{a({tracks:B})}})}),(0,ur.jsx)(_n.BlockControls,{group:"other",children:(0,ur.jsx)(_n.MediaReplaceFlow,{mediaId:s,mediaURL:m,allowedTypes:bR,accept:"video/*",onSelect:y,onSelectURL:k,onError:x,onReset:()=>y(void 0),variant:"toolbar"})})]}),(0,ur.jsx)(_n.InspectorControls,{children:(0,ur.jsxs)(np.__experimentalToolsPanel,{label:(0,gb.__)("Settings"),resetAll:()=>{a({autoplay:!1,controls:!0,loop:!1,muted:!1,playsInline:!1,preload:"metadata",poster:void 0})},dropdownMenuProps:h,children:[(0,ur.jsx)(ape,{setAttributes:a,attributes:t}),(0,ur.jsx)(r5,{poster:u,onChange:B=>a({poster:B?.url})})]})}),(0,ur.jsxs)("figure",{...N,children:[(0,ur.jsx)(np.Disabled,{isDisabled:!e,children:(0,ur.jsx)("video",{controls:c,poster:u,src:m||d,ref:l,children:(0,ur.jsx)(i0,{tracks:p})})}),!!d&&(0,ur.jsx)(np.Spinner,{}),(0,ur.jsx)(_a,{attributes:t,setAttributes:a,isSelected:e,insertBlocksAfter:n,label:(0,gb.__)("Video caption text"),showToolbarButton:e&&b})]})]})}var fpe=hCe;var ff=o(T(),1);var u0=o(v(),1);function hpe({attributes:e}){let{autoplay:t,caption:r,controls:a,loop:n,muted:i,poster:l,preload:s,src:c,playsInline:u,tracks:m}=e;return(0,u0.jsxs)("figure",{...ff.useBlockProps.save(),children:[c&&(0,u0.jsx)("video",{autoPlay:t,controls:a,loop:n,muted:i,poster:l,preload:s!=="metadata"?s:void 0,src:c,playsInline:u,children:(0,u0.jsx)(i0,{tracks:m})}),!ff.RichText.isEmpty(r)&&(0,u0.jsx)(ff.RichText.Content,{className:(0,ff.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:r})]})}var A7=o(Rr(),1),yR=o(W(),1),gCe={from:[{type:"files",isMatch(e){return e.length===1&&e[0].type.indexOf("video/")===0},transform(e){let t=e[0];return(0,yR.createBlock)("core/video",{blob:(0,A7.createBlobURL)(t)})}},{type:"shortcode",tag:"video",attributes:{src:{type:"string",shortcode:({named:{src:e,mp4:t,m4v:r,webm:a,ogv:n,flv:i}})=>e||t||r||a||n||i},poster:{type:"string",shortcode:({named:{poster:e}})=>e},loop:{type:"string",shortcode:({named:{loop:e}})=>e},autoplay:{type:"string",shortcode:({named:{autoplay:e}})=>e},preload:{type:"string",shortcode:({named:{preload:e}})=>e}}},{type:"raw",isMatch:e=>e.nodeName==="P"&&e.children.length===1&&e.firstChild.nodeName==="VIDEO",transform:e=>{let t=e.firstChild,r={autoplay:t.hasAttribute("autoplay")?!0:void 0,controls:t.hasAttribute("controls")?void 0:!1,loop:t.hasAttribute("loop")?!0:void 0,muted:t.hasAttribute("muted")?!0:void 0,preload:t.getAttribute("preload")||void 0,playsInline:t.hasAttribute("playsinline")?!0:void 0,poster:t.getAttribute("poster")||void 0,src:t.getAttribute("src")||void 0};return(0,A7.isBlobURL)(r.src)&&(r.blob=r.src,delete r.src),(0,yR.createBlock)("core/video",r)}}]},gpe=gCe;var{fieldsKey:vCe,formKey:bCe}=K(vpe.privateApis),{name:bpe}=n0,z7={icon:Ef,example:{attributes:{src:"https://upload.wikimedia.org/wikipedia/commons/c/ca/Wood_thrush_in_Central_Park_switch_sides_%2816510%29.webm",caption:(0,R7.__)("Wood thrush singing in Central Park, NYC.")}},transforms:gpe,deprecated:ope,edit:fpe,save:hpe};window.__experimentalContentOnlyInspectorFields&&(z7[vCe]=[{id:"video",label:(0,R7.__)("Video"),type:"media",Edit:{control:"media",allowedTypes:["video"],multiple:!1},getValue:({item:e})=>({id:e.id,url:e.src,caption:e.caption,poster:e.poster}),setValue:({value:e})=>({id:e.id,src:e.url,caption:e.caption,poster:e.poster})},{id:"caption",label:(0,R7.__)("Caption"),type:"text",Edit:"rich-text"}],z7[bCe]={fields:["video","caption"]});var yCe=()=>E({name:bpe,metadata:n0,settings:z7});var CR={};Z(CR,{init:()=>wCe,metadata:()=>V7,name:()=>H7,settings:()=>Ppe});var Tpe=o(em(),1);var hf=o(T(),1),ype=o(Q(),1),vb=o(P(),1),xR=o(M(),1);var wl=o(v(),1);function _pe({context:{postType:e,postId:t}}){let[r,a]=(0,ype.useEntityProp)("postType",e,"meta",t),n=typeof r?.footnotes=="string",i=r?.footnotes?JSON.parse(r.footnotes):[],l=(0,hf.useBlockProps)();return n?i.length?(0,wl.jsx)("ol",{...l,children:i.map(({id:s,content:c})=>(0,wl.jsxs)("li",{onMouseDown:u=>{u.target===u.currentTarget&&(u.target.firstElementChild.focus(),u.preventDefault())},children:[(0,wl.jsx)(hf.RichText,{id:s,tagName:"span",value:c,identifier:s,onFocus:u=>{u.target.textContent.trim()||u.target.scrollIntoView()},onChange:u=>{a({...r,footnotes:JSON.stringify(i.map(m=>m.id===s?{content:u,id:s}:m))})}})," ",(0,wl.jsx)("a",{href:`#${s}-link`,children:"\u21A9\uFE0E"})]},s))}):(0,wl.jsx)("div",{...l,children:(0,wl.jsx)(xR.Placeholder,{icon:(0,wl.jsx)(hf.BlockIcon,{icon:Ki}),label:(0,vb.__)("Footnotes"),instructions:(0,vb.__)("Footnotes found in blocks within this document will be displayed here.")})}):(0,wl.jsx)("div",{...l,children:(0,wl.jsx)(xR.Placeholder,{icon:(0,wl.jsx)(hf.BlockIcon,{icon:Ki}),label:(0,vb.__)("Footnotes"),instructions:(0,vb.__)("Footnotes are not supported here. Add this block to post or page content.")})})}var V7={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/footnotes",title:"Footnotes",category:"text",description:"Display footnotes added to the page.",keywords:["references"],textdomain:"default",usesContext:["postId","postType"],supports:{anchor:!0,__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!1,color:!1,width:!1,style:!1}},color:{background:!0,link:!0,text:!0,__experimentalDefaultControls:{link:!0,text:!0}},html:!1,multiple:!1,reusable:!1,inserter:!1,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0}},style:"wp-block-footnotes"};var kR=o(P(),1);var kpe=o(em(),1),Au=o(T(),1),m0=o(V(),1),wpe=o(Q(),1),F7=o(W(),1);var Cpe=o(v(),1),wR="core/footnote",{usesContextKey:xCe}=K(Au.privateApis),xpe="core/post-content",kCe="core/block",Spe={title:(0,kR.__)("Footnote"),tagName:"sup",className:"fn",attributes:{"data-fn":"data-fn"},interactive:!0,contentEditable:!1,[xCe]:["postType","postId"],edit:function({value:t,onChange:r,isObjectActive:a,context:{postType:n,postId:i}}){let l=(0,m0.useRegistry)(),{getSelectedBlockClientId:s,getBlocks:c,getBlockRootClientId:u,getBlockName:m,getBlockParentsByBlockName:p}=l.select(Au.store),d=(0,m0.useSelect)(b=>{if(!b(F7.store).getBlockType("core/footnotes"))return!1;let y=b(Au.store).getSettings().allowedBlockTypes;if(y===!1||Array.isArray(y)&&!y.includes("core/footnotes")||typeof b(wpe.store).getEntityRecord("postType",n,i)?.meta?.footnotes!="string")return!1;let{getBlockParentsByBlockName:_,getSelectedBlockClientId:x,getBlockName:S}=b(Au.store),C=x();if(!C||S(C)===H7)return!1;let N=_(C,kCe);return!N||N.length===0},[n,i]),{selectionChange:f,insertBlock:h}=(0,m0.useDispatch)(Au.store);if(!d)return null;function g(){l.batch(()=>{let b;if(a)b=t.replacements[t.start]?.attributes?.["data-fn"];else{b=Am();let S=(0,kpe.insertObject)(t,{type:wR,attributes:{"data-fn":b},innerHTML:`<a href="#${b}" id="${b}-link">*</a>`},t.end,t.end);S.start=S.end-1,r(S)}let y=s(),k=p(y,xpe),_=k.length?c(k[0]):c(),x=null;{let S=[..._];for(;S.length;){let C=S.shift();if(C.name==="core/footnotes"){x=C;break}S.push(...C.innerBlocks)}}if(!x){let S=u(y);for(;S&&m(S)!==xpe;)S=u(S);x=(0,F7.createBlock)("core/footnotes"),h(x,void 0,S)}f(x.clientId,b,0,0)})}return(0,Cpe.jsx)(Au.RichTextToolbarButton,{icon:Ki,title:(0,kR.__)("Footnote"),onClick:g,isActive:a})}};var{name:H7}=V7,Ppe={icon:Ki,edit:_pe},wCe=()=>{(0,Tpe.registerFormatType)(wR,Spe),E({name:H7,metadata:V7,settings:Ppe})};function Bpe(e){return e&&"__experimental"in e&&e.__experimental!==!1}var Epe=o(U(),1),bb=o(V(),1),Rc=o(Npe(),1),SR=o(P(),1),Dpe=o(W(),1),TR=o(T(),1);function CCe(){let{registerShortcut:e}=(0,bb.useDispatch)(Rc.store),{replaceBlocks:t}=(0,bb.useDispatch)(TR.store),{getBlockName:r,getSelectedBlockClientId:a,getBlockAttributes:n}=(0,bb.useSelect)(TR.store),i=(l,s)=>{l.preventDefault();let c=a();if(c===null)return;let u=r(c),m=u==="core/paragraph",p=u==="core/heading";if(!m&&!p)return;let d=s===0?"core/paragraph":"core/heading",f=n(c);if(m&&s===0||p&&f.level===s)return;let h={content:f.content},g=f.textAlign||f.style?.typography?.textAlign;d==="core/heading"&&(h.level=s),g&&(h.style={typography:{textAlign:g}}),t(c,(0,Dpe.createBlock)(d,h))};return(0,Epe.useEffect)(()=>{e({name:"core/block-editor/transform-heading-to-paragraph",category:"block-library",description:(0,SR.__)("Transform heading to paragraph."),keyCombination:{modifier:"access",character:"0"},aliases:[{modifier:"access",character:"7"}]}),[1,2,3,4,5,6].forEach(l=>{e({name:`core/block-editor/transform-paragraph-to-heading-${l}`,category:"block-library",description:(0,SR.__)("Transform paragraph to heading."),keyCombination:{modifier:"access",character:`${l}`}})})},[e]),(0,Rc.useShortcut)("core/block-editor/transform-heading-to-paragraph",l=>i(l,0)),(0,Rc.useShortcut)("core/block-editor/transform-paragraph-to-heading-1",l=>i(l,1)),(0,Rc.useShortcut)("core/block-editor/transform-paragraph-to-heading-2",l=>i(l,2)),(0,Rc.useShortcut)("core/block-editor/transform-paragraph-to-heading-3",l=>i(l,3)),(0,Rc.useShortcut)("core/block-editor/transform-paragraph-to-heading-4",l=>i(l,4)),(0,Rc.useShortcut)("core/block-editor/transform-paragraph-to-heading-5",l=>i(l,5)),(0,Rc.useShortcut)("core/block-editor/transform-paragraph-to-heading-6",l=>i(l,6)),null}var Lpe=CCe;var PR={};sF(PR,{BlockKeyboardShortcuts:Lpe,NAVIGATION_OVERLAY_TEMPLATE_PART_AREA:ic});var O7=o(v(),1),SCe=()=>{let e=[YD,gE,aE,ZN,SE,RE,lM,GB,WB,$B,qB,ZB,aI,cI,pI,fI,vI,CI,TI,II,AI,hN,gN,wN,PN,JN,sE,PE,vE,xE,UE,GE,WE,DD,HD,WD,RD,PL,BL,sM,uM,gM,vM,yM,CA,TA,PA,FA,$A,pR,vR,_R,CR,TD,BD,ND,xM,PM,CM,UL,YA,QB,wL,hL,bL,pL,aL,nL,lL,sL,mL,dL,xL,yL,_L,kL,qL,KL,QL,XL,GL,nM,cM,LI,RI,zI,FI,HI,OI,UI,YI,qI,KI,QI,WI,uL,OA,nE,pE,zE,MD,tR,oR,aR,uR,mR,rM,iL,nI];return window?.__experimentalEnableFormBlocks&&(e.push(DN),e.push(MN),e.push(RN),e.push(zN)),window?.__experimentalEnableBlockExperiments&&(e.push(BA),e.push(jA),e.push(UA),e.push(GA),e.push(IA),e.push(eL),e.push(rL)),window?.wp?.oldEditor&&(window?.wp?.needsClassicBlock||!window?.__experimentalDisableTinymce||new URLSearchParams(window?.location?.search).get("requiresTinymce"))&&e.push(yI),e.filter(Boolean)},Vpe=()=>SCe().filter(({metadata:e})=>!Bpe(e)),TCe=(e=Vpe())=>{e.forEach(({init:t})=>t()),window.__unstableAutoRegisterBlocks&&window.__unstableAutoRegisterBlocks.forEach(t=>{let r=K((0,Ape.select)(Cl.store)).getBootstrappedBlockType(t);(0,Cl.registerBlockType)(t,{...r,title:r?.title||t,...(r?.apiVersion??0)<3&&{apiVersion:3},edit:function({attributes:n}){let i=(0,Mpe.useDisabled)(),l=(0,Rpe.useBlockProps)({ref:i}),{content:s,status:c,error:u}=(0,zpe.useServerSideRender)({block:t,attributes:n});return c==="loading"?(0,O7.jsx)("div",{...l,children:(0,yb.__)("Loading\u2026")}):c==="error"?(0,O7.jsx)("div",{...l,children:(0,yb.sprintf)((0,yb.__)("Error loading block: %s"),u)}):(0,O7.jsx)(uo,{wrapperProps:l,html:s})},save:()=>null})}),(0,Cl.setDefaultBlockName)(Sw),window.wp&&window.wp.oldEditor&&e.some(({name:t})=>t===F1)&&(0,Cl.setFreeformContentHandlerName)(F1),(0,Cl.setUnregisteredTypeHandlerName)(Tv),(0,Cl.setGroupingBlockName)(Z5)},PCe=void 0;return Jpe(BCe);})();
/*! Bundled license information:

fast-average-color/dist/index.esm.js:
  (*! Fast Average Color | Â© 2022 Denis Seleznev | MIT License | https://github.com/fast-average-color/fast-average-color *)
*/
                                     dist/block-serialization-default-parser.js                                                          0000644                 00000015047 15212563767 0014753 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).blockSerializationDefaultParser = (() => {
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // packages/block-serialization-default-parser/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    parse: () => parse
  });
  var document;
  var offset;
  var output;
  var stack;
  var tokenizer = /<!--\s+(\/)?wp:([a-z][a-z0-9_-]*\/)?([a-z][a-z0-9_-]*)\s+({(?:(?=([^}]+|}+(?=})|(?!}\s+\/?-->)[^])*)\5|[^]*?)}\s+)?(\/)?-->/g;
  function Block(blockName, attrs, innerBlocks, innerHTML, innerContent) {
    return {
      blockName,
      attrs,
      innerBlocks,
      innerHTML,
      innerContent
    };
  }
  function Freeform(innerHTML) {
    return Block(null, {}, [], innerHTML, [innerHTML]);
  }
  function Frame(block, tokenStart, tokenLength, prevOffset, leadingHtmlStart) {
    return {
      block,
      tokenStart,
      tokenLength,
      prevOffset: prevOffset || tokenStart + tokenLength,
      leadingHtmlStart
    };
  }
  var parse = (doc) => {
    document = doc;
    offset = 0;
    output = [];
    stack = [];
    tokenizer.lastIndex = 0;
    do {
    } while (proceed());
    return output;
  };
  function proceed() {
    const stackDepth = stack.length;
    const next = nextToken();
    const [tokenType, blockName, attrs, startOffset, tokenLength] = next;
    const leadingHtmlStart = startOffset > offset ? offset : null;
    switch (tokenType) {
      case "no-more-tokens":
        if (0 === stackDepth) {
          addFreeform();
          return false;
        }
        if (1 === stackDepth) {
          addBlockFromStack();
          return false;
        }
        while (0 < stack.length) {
          addBlockFromStack();
        }
        return false;
      case "void-block":
        if (0 === stackDepth) {
          if (null !== leadingHtmlStart) {
            output.push(
              Freeform(
                document.substr(
                  leadingHtmlStart,
                  startOffset - leadingHtmlStart
                )
              )
            );
          }
          output.push(Block(blockName, attrs, [], "", []));
          offset = startOffset + tokenLength;
          return true;
        }
        addInnerBlock(
          Block(blockName, attrs, [], "", []),
          startOffset,
          tokenLength
        );
        offset = startOffset + tokenLength;
        return true;
      case "block-opener":
        stack.push(
          Frame(
            Block(blockName, attrs, [], "", []),
            startOffset,
            tokenLength,
            startOffset + tokenLength,
            leadingHtmlStart
          )
        );
        offset = startOffset + tokenLength;
        return true;
      case "block-closer":
        if (0 === stackDepth) {
          addFreeform();
          return false;
        }
        if (1 === stackDepth) {
          addBlockFromStack(startOffset);
          offset = startOffset + tokenLength;
          return true;
        }
        const stackTop = stack.pop();
        const html = document.substr(
          stackTop.prevOffset,
          startOffset - stackTop.prevOffset
        );
        stackTop.block.innerHTML += html;
        stackTop.block.innerContent.push(html);
        stackTop.prevOffset = startOffset + tokenLength;
        addInnerBlock(
          stackTop.block,
          stackTop.tokenStart,
          stackTop.tokenLength,
          startOffset + tokenLength
        );
        offset = startOffset + tokenLength;
        return true;
      default:
        addFreeform();
        return false;
    }
  }
  function parseJSON(input) {
    try {
      return JSON.parse(input);
    } catch (e) {
      return null;
    }
  }
  function nextToken() {
    const matches = tokenizer.exec(document);
    if (null === matches) {
      return ["no-more-tokens", "", null, 0, 0];
    }
    const startedAt = matches.index;
    const [
      match,
      closerMatch,
      namespaceMatch,
      nameMatch,
      attrsMatch,
      ,
      voidMatch
    ] = matches;
    const length = match.length;
    const isCloser = !!closerMatch;
    const isVoid = !!voidMatch;
    const namespace = namespaceMatch || "core/";
    const name = namespace + nameMatch;
    const hasAttrs = !!attrsMatch;
    const attrs = hasAttrs ? parseJSON(attrsMatch) : {};
    if (isCloser && (isVoid || hasAttrs)) {
    }
    if (isVoid) {
      return ["void-block", name, attrs, startedAt, length];
    }
    if (isCloser) {
      return ["block-closer", name, null, startedAt, length];
    }
    return ["block-opener", name, attrs, startedAt, length];
  }
  function addFreeform(rawLength) {
    const length = rawLength ? rawLength : document.length - offset;
    if (0 === length) {
      return;
    }
    output.push(Freeform(document.substr(offset, length)));
  }
  function addInnerBlock(block, tokenStart, tokenLength, lastOffset) {
    const parent = stack[stack.length - 1];
    parent.block.innerBlocks.push(block);
    const html = document.substr(
      parent.prevOffset,
      tokenStart - parent.prevOffset
    );
    if (html) {
      parent.block.innerHTML += html;
      parent.block.innerContent.push(html);
    }
    parent.block.innerContent.push(null);
    parent.prevOffset = lastOffset ? lastOffset : tokenStart + tokenLength;
  }
  function addBlockFromStack(endOffset) {
    const { block, leadingHtmlStart, prevOffset, tokenStart } = stack.pop();
    const html = endOffset ? document.substr(prevOffset, endOffset - prevOffset) : document.substr(prevOffset);
    if (html) {
      block.innerHTML += html;
      block.innerContent.push(html);
    }
    if (null !== leadingHtmlStart) {
      output.push(
        Freeform(
          document.substr(
            leadingHtmlStart,
            tokenStart - leadingHtmlStart
          )
        )
      );
    }
    output.push(block);
  }
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         dist/block-serialization-default-parser.min.js                                                      0000644                 00000004560 15212563767 0015533 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).blockSerializationDefaultParser=(()=>{var m=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var B=Object.prototype.hasOwnProperty;var F=(t,e)=>{for(var s in e)m(t,s,{get:e[s],enumerable:!0})},H=(t,e,s,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of T(e))!B.call(t,n)&&n!==s&&m(t,n,{get:()=>e[n],enumerable:!(o=S(e,n))||o.enumerable});return t};var w=t=>H(m({},"__esModule",{value:!0}),t);var L={};F(L,{parse:()=>y});var a,l,i,f,C=/<!--\s+(\/)?wp:([a-z][a-z0-9_-]*\/)?([a-z][a-z0-9_-]*)\s+({(?:(?=([^}]+|}+(?=})|(?!}\s+\/?-->)[^])*)\5|[^]*?)}\s+)?(\/)?-->/g;function k(t,e,s,o,n){return{blockName:t,attrs:e,innerBlocks:s,innerHTML:o,innerContent:n}}function g(t){return k(null,{},[],t,[t])}function N(t,e,s,o,n){return{block:t,tokenStart:e,tokenLength:s,prevOffset:o||e+s,leadingHtmlStart:n}}var y=t=>{a=t,l=0,i=[],f=[],C.lastIndex=0;do;while(A());return i};function A(){let t=f.length,e=J(),[s,o,n,r,c]=e,p=r>l?l:null;switch(s){case"no-more-tokens":if(t===0)return d(),!1;if(t===1)return v(),!1;for(;0<f.length;)v();return!1;case"void-block":return t===0?(p!==null&&i.push(g(a.substr(p,r-p))),i.push(k(o,n,[],"",[])),l=r+c,!0):(z(k(o,n,[],"",[]),r,c),l=r+c,!0);case"block-opener":return f.push(N(k(o,n,[],"",[]),r,c,r+c,p)),l=r+c,!0;case"block-closer":if(t===0)return d(),!1;if(t===1)return v(r),l=r+c,!0;let u=f.pop(),h=a.substr(u.prevOffset,r-u.prevOffset);return u.block.innerHTML+=h,u.block.innerContent.push(h),u.prevOffset=r+c,z(u.block,u.tokenStart,u.tokenLength,r+c),l=r+c,!0;default:return d(),!1}}function I(t){try{return JSON.parse(t)}catch{return null}}function J(){let t=C.exec(a);if(t===null)return["no-more-tokens","",null,0,0];let e=t.index,[s,o,n,r,c,,p]=t,u=s.length,h=!!o,O=!!p,b=(n||"core/")+r,M=!!c,x=M?I(c):{};return O?["void-block",b,x,e,u]:h?["block-closer",b,null,e,u]:["block-opener",b,x,e,u]}function d(t){let e=t||a.length-l;e!==0&&i.push(g(a.substr(l,e)))}function z(t,e,s,o){let n=f[f.length-1];n.block.innerBlocks.push(t);let r=a.substr(n.prevOffset,e-n.prevOffset);r&&(n.block.innerHTML+=r,n.block.innerContent.push(r)),n.block.innerContent.push(null),n.prevOffset=o||e+s}function v(t){let{block:e,leadingHtmlStart:s,prevOffset:o,tokenStart:n}=f.pop(),r=t?a.substr(o,t-o):a.substr(o);r&&(e.innerHTML+=r,e.innerContent.push(r)),s!==null&&i.push(g(a.substr(s,n-s))),i.push(e)}return w(L);})();
                                                                                                                                                dist/blocks.js                                                                                      0000644                 00001372076 15212563767 0007360 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;
(wp ||= {}).blocks = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/dom
  var require_dom = __commonJS({
    "package-external:@wordpress/dom"(exports, module) {
      module.exports = window.wp.dom;
    }
  });

  // package-external:@wordpress/rich-text
  var require_rich_text = __commonJS({
    "package-external:@wordpress/rich-text"(exports, module) {
      module.exports = window.wp.richText;
    }
  });

  // package-external:@wordpress/deprecated
  var require_deprecated = __commonJS({
    "package-external:@wordpress/deprecated"(exports, module) {
      module.exports = window.wp.deprecated;
    }
  });

  // package-external:@wordpress/warning
  var require_warning = __commonJS({
    "package-external:@wordpress/warning"(exports, module) {
      module.exports = window.wp.warning;
    }
  });

  // package-external:@wordpress/private-apis
  var require_private_apis = __commonJS({
    "package-external:@wordpress/private-apis"(exports, module) {
      module.exports = window.wp.privateApis;
    }
  });

  // node_modules/remove-accents/index.js
  var require_remove_accents = __commonJS({
    "node_modules/remove-accents/index.js"(exports, module) {
      var characterMap = {
        "\xC0": "A",
        "\xC1": "A",
        "\xC2": "A",
        "\xC3": "A",
        "\xC4": "A",
        "\xC5": "A",
        "\u1EA4": "A",
        "\u1EAE": "A",
        "\u1EB2": "A",
        "\u1EB4": "A",
        "\u1EB6": "A",
        "\xC6": "AE",
        "\u1EA6": "A",
        "\u1EB0": "A",
        "\u0202": "A",
        "\u1EA2": "A",
        "\u1EA0": "A",
        "\u1EA8": "A",
        "\u1EAA": "A",
        "\u1EAC": "A",
        "\xC7": "C",
        "\u1E08": "C",
        "\xC8": "E",
        "\xC9": "E",
        "\xCA": "E",
        "\xCB": "E",
        "\u1EBE": "E",
        "\u1E16": "E",
        "\u1EC0": "E",
        "\u1E14": "E",
        "\u1E1C": "E",
        "\u0206": "E",
        "\u1EBA": "E",
        "\u1EBC": "E",
        "\u1EB8": "E",
        "\u1EC2": "E",
        "\u1EC4": "E",
        "\u1EC6": "E",
        "\xCC": "I",
        "\xCD": "I",
        "\xCE": "I",
        "\xCF": "I",
        "\u1E2E": "I",
        "\u020A": "I",
        "\u1EC8": "I",
        "\u1ECA": "I",
        "\xD0": "D",
        "\xD1": "N",
        "\xD2": "O",
        "\xD3": "O",
        "\xD4": "O",
        "\xD5": "O",
        "\xD6": "O",
        "\xD8": "O",
        "\u1ED0": "O",
        "\u1E4C": "O",
        "\u1E52": "O",
        "\u020E": "O",
        "\u1ECE": "O",
        "\u1ECC": "O",
        "\u1ED4": "O",
        "\u1ED6": "O",
        "\u1ED8": "O",
        "\u1EDC": "O",
        "\u1EDE": "O",
        "\u1EE0": "O",
        "\u1EDA": "O",
        "\u1EE2": "O",
        "\xD9": "U",
        "\xDA": "U",
        "\xDB": "U",
        "\xDC": "U",
        "\u1EE6": "U",
        "\u1EE4": "U",
        "\u1EEC": "U",
        "\u1EEE": "U",
        "\u1EF0": "U",
        "\xDD": "Y",
        "\xE0": "a",
        "\xE1": "a",
        "\xE2": "a",
        "\xE3": "a",
        "\xE4": "a",
        "\xE5": "a",
        "\u1EA5": "a",
        "\u1EAF": "a",
        "\u1EB3": "a",
        "\u1EB5": "a",
        "\u1EB7": "a",
        "\xE6": "ae",
        "\u1EA7": "a",
        "\u1EB1": "a",
        "\u0203": "a",
        "\u1EA3": "a",
        "\u1EA1": "a",
        "\u1EA9": "a",
        "\u1EAB": "a",
        "\u1EAD": "a",
        "\xE7": "c",
        "\u1E09": "c",
        "\xE8": "e",
        "\xE9": "e",
        "\xEA": "e",
        "\xEB": "e",
        "\u1EBF": "e",
        "\u1E17": "e",
        "\u1EC1": "e",
        "\u1E15": "e",
        "\u1E1D": "e",
        "\u0207": "e",
        "\u1EBB": "e",
        "\u1EBD": "e",
        "\u1EB9": "e",
        "\u1EC3": "e",
        "\u1EC5": "e",
        "\u1EC7": "e",
        "\xEC": "i",
        "\xED": "i",
        "\xEE": "i",
        "\xEF": "i",
        "\u1E2F": "i",
        "\u020B": "i",
        "\u1EC9": "i",
        "\u1ECB": "i",
        "\xF0": "d",
        "\xF1": "n",
        "\xF2": "o",
        "\xF3": "o",
        "\xF4": "o",
        "\xF5": "o",
        "\xF6": "o",
        "\xF8": "o",
        "\u1ED1": "o",
        "\u1E4D": "o",
        "\u1E53": "o",
        "\u020F": "o",
        "\u1ECF": "o",
        "\u1ECD": "o",
        "\u1ED5": "o",
        "\u1ED7": "o",
        "\u1ED9": "o",
        "\u1EDD": "o",
        "\u1EDF": "o",
        "\u1EE1": "o",
        "\u1EDB": "o",
        "\u1EE3": "o",
        "\xF9": "u",
        "\xFA": "u",
        "\xFB": "u",
        "\xFC": "u",
        "\u1EE7": "u",
        "\u1EE5": "u",
        "\u1EED": "u",
        "\u1EEF": "u",
        "\u1EF1": "u",
        "\xFD": "y",
        "\xFF": "y",
        "\u0100": "A",
        "\u0101": "a",
        "\u0102": "A",
        "\u0103": "a",
        "\u0104": "A",
        "\u0105": "a",
        "\u0106": "C",
        "\u0107": "c",
        "\u0108": "C",
        "\u0109": "c",
        "\u010A": "C",
        "\u010B": "c",
        "\u010C": "C",
        "\u010D": "c",
        "C\u0306": "C",
        "c\u0306": "c",
        "\u010E": "D",
        "\u010F": "d",
        "\u0110": "D",
        "\u0111": "d",
        "\u0112": "E",
        "\u0113": "e",
        "\u0114": "E",
        "\u0115": "e",
        "\u0116": "E",
        "\u0117": "e",
        "\u0118": "E",
        "\u0119": "e",
        "\u011A": "E",
        "\u011B": "e",
        "\u011C": "G",
        "\u01F4": "G",
        "\u011D": "g",
        "\u01F5": "g",
        "\u011E": "G",
        "\u011F": "g",
        "\u0120": "G",
        "\u0121": "g",
        "\u0122": "G",
        "\u0123": "g",
        "\u0124": "H",
        "\u0125": "h",
        "\u0126": "H",
        "\u0127": "h",
        "\u1E2A": "H",
        "\u1E2B": "h",
        "\u0128": "I",
        "\u0129": "i",
        "\u012A": "I",
        "\u012B": "i",
        "\u012C": "I",
        "\u012D": "i",
        "\u012E": "I",
        "\u012F": "i",
        "\u0130": "I",
        "\u0131": "i",
        "\u0132": "IJ",
        "\u0133": "ij",
        "\u0134": "J",
        "\u0135": "j",
        "\u0136": "K",
        "\u0137": "k",
        "\u1E30": "K",
        "\u1E31": "k",
        "K\u0306": "K",
        "k\u0306": "k",
        "\u0139": "L",
        "\u013A": "l",
        "\u013B": "L",
        "\u013C": "l",
        "\u013D": "L",
        "\u013E": "l",
        "\u013F": "L",
        "\u0140": "l",
        "\u0141": "l",
        "\u0142": "l",
        "\u1E3E": "M",
        "\u1E3F": "m",
        "M\u0306": "M",
        "m\u0306": "m",
        "\u0143": "N",
        "\u0144": "n",
        "\u0145": "N",
        "\u0146": "n",
        "\u0147": "N",
        "\u0148": "n",
        "\u0149": "n",
        "N\u0306": "N",
        "n\u0306": "n",
        "\u014C": "O",
        "\u014D": "o",
        "\u014E": "O",
        "\u014F": "o",
        "\u0150": "O",
        "\u0151": "o",
        "\u0152": "OE",
        "\u0153": "oe",
        "P\u0306": "P",
        "p\u0306": "p",
        "\u0154": "R",
        "\u0155": "r",
        "\u0156": "R",
        "\u0157": "r",
        "\u0158": "R",
        "\u0159": "r",
        "R\u0306": "R",
        "r\u0306": "r",
        "\u0212": "R",
        "\u0213": "r",
        "\u015A": "S",
        "\u015B": "s",
        "\u015C": "S",
        "\u015D": "s",
        "\u015E": "S",
        "\u0218": "S",
        "\u0219": "s",
        "\u015F": "s",
        "\u0160": "S",
        "\u0161": "s",
        "\u0162": "T",
        "\u0163": "t",
        "\u021B": "t",
        "\u021A": "T",
        "\u0164": "T",
        "\u0165": "t",
        "\u0166": "T",
        "\u0167": "t",
        "T\u0306": "T",
        "t\u0306": "t",
        "\u0168": "U",
        "\u0169": "u",
        "\u016A": "U",
        "\u016B": "u",
        "\u016C": "U",
        "\u016D": "u",
        "\u016E": "U",
        "\u016F": "u",
        "\u0170": "U",
        "\u0171": "u",
        "\u0172": "U",
        "\u0173": "u",
        "\u0216": "U",
        "\u0217": "u",
        "V\u0306": "V",
        "v\u0306": "v",
        "\u0174": "W",
        "\u0175": "w",
        "\u1E82": "W",
        "\u1E83": "w",
        "X\u0306": "X",
        "x\u0306": "x",
        "\u0176": "Y",
        "\u0177": "y",
        "\u0178": "Y",
        "Y\u0306": "Y",
        "y\u0306": "y",
        "\u0179": "Z",
        "\u017A": "z",
        "\u017B": "Z",
        "\u017C": "z",
        "\u017D": "Z",
        "\u017E": "z",
        "\u017F": "s",
        "\u0192": "f",
        "\u01A0": "O",
        "\u01A1": "o",
        "\u01AF": "U",
        "\u01B0": "u",
        "\u01CD": "A",
        "\u01CE": "a",
        "\u01CF": "I",
        "\u01D0": "i",
        "\u01D1": "O",
        "\u01D2": "o",
        "\u01D3": "U",
        "\u01D4": "u",
        "\u01D5": "U",
        "\u01D6": "u",
        "\u01D7": "U",
        "\u01D8": "u",
        "\u01D9": "U",
        "\u01DA": "u",
        "\u01DB": "U",
        "\u01DC": "u",
        "\u1EE8": "U",
        "\u1EE9": "u",
        "\u1E78": "U",
        "\u1E79": "u",
        "\u01FA": "A",
        "\u01FB": "a",
        "\u01FC": "AE",
        "\u01FD": "ae",
        "\u01FE": "O",
        "\u01FF": "o",
        "\xDE": "TH",
        "\xFE": "th",
        "\u1E54": "P",
        "\u1E55": "p",
        "\u1E64": "S",
        "\u1E65": "s",
        "X\u0301": "X",
        "x\u0301": "x",
        "\u0403": "\u0413",
        "\u0453": "\u0433",
        "\u040C": "\u041A",
        "\u045C": "\u043A",
        "A\u030B": "A",
        "a\u030B": "a",
        "E\u030B": "E",
        "e\u030B": "e",
        "I\u030B": "I",
        "i\u030B": "i",
        "\u01F8": "N",
        "\u01F9": "n",
        "\u1ED2": "O",
        "\u1ED3": "o",
        "\u1E50": "O",
        "\u1E51": "o",
        "\u1EEA": "U",
        "\u1EEB": "u",
        "\u1E80": "W",
        "\u1E81": "w",
        "\u1EF2": "Y",
        "\u1EF3": "y",
        "\u0200": "A",
        "\u0201": "a",
        "\u0204": "E",
        "\u0205": "e",
        "\u0208": "I",
        "\u0209": "i",
        "\u020C": "O",
        "\u020D": "o",
        "\u0210": "R",
        "\u0211": "r",
        "\u0214": "U",
        "\u0215": "u",
        "B\u030C": "B",
        "b\u030C": "b",
        "\u010C\u0323": "C",
        "\u010D\u0323": "c",
        "\xCA\u030C": "E",
        "\xEA\u030C": "e",
        "F\u030C": "F",
        "f\u030C": "f",
        "\u01E6": "G",
        "\u01E7": "g",
        "\u021E": "H",
        "\u021F": "h",
        "J\u030C": "J",
        "\u01F0": "j",
        "\u01E8": "K",
        "\u01E9": "k",
        "M\u030C": "M",
        "m\u030C": "m",
        "P\u030C": "P",
        "p\u030C": "p",
        "Q\u030C": "Q",
        "q\u030C": "q",
        "\u0158\u0329": "R",
        "\u0159\u0329": "r",
        "\u1E66": "S",
        "\u1E67": "s",
        "V\u030C": "V",
        "v\u030C": "v",
        "W\u030C": "W",
        "w\u030C": "w",
        "X\u030C": "X",
        "x\u030C": "x",
        "Y\u030C": "Y",
        "y\u030C": "y",
        "A\u0327": "A",
        "a\u0327": "a",
        "B\u0327": "B",
        "b\u0327": "b",
        "\u1E10": "D",
        "\u1E11": "d",
        "\u0228": "E",
        "\u0229": "e",
        "\u0190\u0327": "E",
        "\u025B\u0327": "e",
        "\u1E28": "H",
        "\u1E29": "h",
        "I\u0327": "I",
        "i\u0327": "i",
        "\u0197\u0327": "I",
        "\u0268\u0327": "i",
        "M\u0327": "M",
        "m\u0327": "m",
        "O\u0327": "O",
        "o\u0327": "o",
        "Q\u0327": "Q",
        "q\u0327": "q",
        "U\u0327": "U",
        "u\u0327": "u",
        "X\u0327": "X",
        "x\u0327": "x",
        "Z\u0327": "Z",
        "z\u0327": "z",
        "\u0439": "\u0438",
        "\u0419": "\u0418",
        "\u0451": "\u0435",
        "\u0401": "\u0415"
      };
      var chars = Object.keys(characterMap).join("|");
      var allAccents = new RegExp(chars, "g");
      var firstAccent = new RegExp(chars, "");
      function matcher3(match) {
        return characterMap[match];
      }
      var removeAccents2 = function(string) {
        return string.replace(allAccents, matcher3);
      };
      var hasAccents = function(string) {
        return !!string.match(firstAccent);
      };
      module.exports = removeAccents2;
      module.exports.has = hasAccents;
      module.exports.remove = removeAccents2;
    }
  });

  // packages/blocks/node_modules/react-is/cjs/react-is.development.js
  var require_react_is_development = __commonJS({
    "packages/blocks/node_modules/react-is/cjs/react-is.development.js"(exports) {
      "use strict";
      if (true) {
        (function() {
          "use strict";
          var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element");
          var REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
          var REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
          var REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode");
          var REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler");
          var REACT_PROVIDER_TYPE = /* @__PURE__ */ Symbol.for("react.provider");
          var REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context");
          var REACT_SERVER_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.server_context");
          var REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref");
          var REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense");
          var REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list");
          var REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo");
          var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
          var REACT_OFFSCREEN_TYPE = /* @__PURE__ */ Symbol.for("react.offscreen");
          var enableScopeAPI = false;
          var enableCacheElement = false;
          var enableTransitionTracing = false;
          var enableLegacyHidden = false;
          var enableDebugTracing = false;
          var REACT_MODULE_REFERENCE;
          {
            REACT_MODULE_REFERENCE = /* @__PURE__ */ Symbol.for("react.module.reference");
          }
          function isValidElementType2(type) {
            if (typeof type === "string" || typeof type === "function") {
              return true;
            }
            if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
              return true;
            }
            if (typeof type === "object" && type !== null) {
              if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
              // types supported by any Flight configuration anywhere since
              // we don't know which Flight build this will end up being used
              // with.
              type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
                return true;
              }
            }
            return false;
          }
          function typeOf(object) {
            if (typeof object === "object" && object !== null) {
              var $$typeof = object.$$typeof;
              switch ($$typeof) {
                case REACT_ELEMENT_TYPE:
                  var type = object.type;
                  switch (type) {
                    case REACT_FRAGMENT_TYPE:
                    case REACT_PROFILER_TYPE:
                    case REACT_STRICT_MODE_TYPE:
                    case REACT_SUSPENSE_TYPE:
                    case REACT_SUSPENSE_LIST_TYPE:
                      return type;
                    default:
                      var $$typeofType = type && type.$$typeof;
                      switch ($$typeofType) {
                        case REACT_SERVER_CONTEXT_TYPE:
                        case REACT_CONTEXT_TYPE:
                        case REACT_FORWARD_REF_TYPE:
                        case REACT_LAZY_TYPE:
                        case REACT_MEMO_TYPE:
                        case REACT_PROVIDER_TYPE:
                          return $$typeofType;
                        default:
                          return $$typeof;
                      }
                  }
                case REACT_PORTAL_TYPE:
                  return $$typeof;
              }
            }
            return void 0;
          }
          var ContextConsumer = REACT_CONTEXT_TYPE;
          var ContextProvider = REACT_PROVIDER_TYPE;
          var Element = REACT_ELEMENT_TYPE;
          var ForwardRef = REACT_FORWARD_REF_TYPE;
          var Fragment = REACT_FRAGMENT_TYPE;
          var Lazy = REACT_LAZY_TYPE;
          var Memo = REACT_MEMO_TYPE;
          var Portal = REACT_PORTAL_TYPE;
          var Profiler = REACT_PROFILER_TYPE;
          var StrictMode = REACT_STRICT_MODE_TYPE;
          var Suspense = REACT_SUSPENSE_TYPE;
          var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
          var hasWarnedAboutDeprecatedIsAsyncMode = false;
          var hasWarnedAboutDeprecatedIsConcurrentMode = false;
          function isAsyncMode(object) {
            {
              if (!hasWarnedAboutDeprecatedIsAsyncMode) {
                hasWarnedAboutDeprecatedIsAsyncMode = true;
                console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.");
              }
            }
            return false;
          }
          function isConcurrentMode(object) {
            {
              if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
                hasWarnedAboutDeprecatedIsConcurrentMode = true;
                console["warn"]("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.");
              }
            }
            return false;
          }
          function isContextConsumer(object) {
            return typeOf(object) === REACT_CONTEXT_TYPE;
          }
          function isContextProvider(object) {
            return typeOf(object) === REACT_PROVIDER_TYPE;
          }
          function isElement(object) {
            return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
          }
          function isForwardRef(object) {
            return typeOf(object) === REACT_FORWARD_REF_TYPE;
          }
          function isFragment(object) {
            return typeOf(object) === REACT_FRAGMENT_TYPE;
          }
          function isLazy(object) {
            return typeOf(object) === REACT_LAZY_TYPE;
          }
          function isMemo(object) {
            return typeOf(object) === REACT_MEMO_TYPE;
          }
          function isPortal(object) {
            return typeOf(object) === REACT_PORTAL_TYPE;
          }
          function isProfiler(object) {
            return typeOf(object) === REACT_PROFILER_TYPE;
          }
          function isStrictMode(object) {
            return typeOf(object) === REACT_STRICT_MODE_TYPE;
          }
          function isSuspense(object) {
            return typeOf(object) === REACT_SUSPENSE_TYPE;
          }
          function isSuspenseList(object) {
            return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
          }
          exports.ContextConsumer = ContextConsumer;
          exports.ContextProvider = ContextProvider;
          exports.Element = Element;
          exports.ForwardRef = ForwardRef;
          exports.Fragment = Fragment;
          exports.Lazy = Lazy;
          exports.Memo = Memo;
          exports.Portal = Portal;
          exports.Profiler = Profiler;
          exports.StrictMode = StrictMode;
          exports.Suspense = Suspense;
          exports.SuspenseList = SuspenseList;
          exports.isAsyncMode = isAsyncMode;
          exports.isConcurrentMode = isConcurrentMode;
          exports.isContextConsumer = isContextConsumer;
          exports.isContextProvider = isContextProvider;
          exports.isElement = isElement;
          exports.isForwardRef = isForwardRef;
          exports.isFragment = isFragment;
          exports.isLazy = isLazy;
          exports.isMemo = isMemo;
          exports.isPortal = isPortal;
          exports.isProfiler = isProfiler;
          exports.isStrictMode = isStrictMode;
          exports.isSuspense = isSuspense;
          exports.isSuspenseList = isSuspenseList;
          exports.isValidElementType = isValidElementType2;
          exports.typeOf = typeOf;
        })();
      }
    }
  });

  // packages/blocks/node_modules/react-is/index.js
  var require_react_is = __commonJS({
    "packages/blocks/node_modules/react-is/index.js"(exports, module) {
      "use strict";
      if (false) {
        module.exports = null;
      } else {
        module.exports = require_react_is_development();
      }
    }
  });

  // package-external:@wordpress/hooks
  var require_hooks = __commonJS({
    "package-external:@wordpress/hooks"(exports, module) {
      module.exports = window.wp.hooks;
    }
  });

  // package-external:@wordpress/block-serialization-default-parser
  var require_block_serialization_default_parser = __commonJS({
    "package-external:@wordpress/block-serialization-default-parser"(exports, module) {
      module.exports = window.wp.blockSerializationDefaultParser;
    }
  });

  // package-external:@wordpress/autop
  var require_autop = __commonJS({
    "package-external:@wordpress/autop"(exports, module) {
      module.exports = window.wp.autop;
    }
  });

  // package-external:@wordpress/is-shallow-equal
  var require_is_shallow_equal = __commonJS({
    "package-external:@wordpress/is-shallow-equal"(exports, module) {
      module.exports = window.wp.isShallowEqual;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // node_modules/fast-deep-equal/es6/index.js
  var require_es6 = __commonJS({
    "node_modules/fast-deep-equal/es6/index.js"(exports, module) {
      "use strict";
      module.exports = function equal(a2, b2) {
        if (a2 === b2) return true;
        if (a2 && b2 && typeof a2 == "object" && typeof b2 == "object") {
          if (a2.constructor !== b2.constructor) return false;
          var length, i2, keys;
          if (Array.isArray(a2)) {
            length = a2.length;
            if (length != b2.length) return false;
            for (i2 = length; i2-- !== 0; )
              if (!equal(a2[i2], b2[i2])) return false;
            return true;
          }
          if (a2 instanceof Map && b2 instanceof Map) {
            if (a2.size !== b2.size) return false;
            for (i2 of a2.entries())
              if (!b2.has(i2[0])) return false;
            for (i2 of a2.entries())
              if (!equal(i2[1], b2.get(i2[0]))) return false;
            return true;
          }
          if (a2 instanceof Set && b2 instanceof Set) {
            if (a2.size !== b2.size) return false;
            for (i2 of a2.entries())
              if (!b2.has(i2[0])) return false;
            return true;
          }
          if (ArrayBuffer.isView(a2) && ArrayBuffer.isView(b2)) {
            length = a2.length;
            if (length != b2.length) return false;
            for (i2 = length; i2-- !== 0; )
              if (a2[i2] !== b2[i2]) return false;
            return true;
          }
          if (a2.constructor === RegExp) return a2.source === b2.source && a2.flags === b2.flags;
          if (a2.valueOf !== Object.prototype.valueOf) return a2.valueOf() === b2.valueOf();
          if (a2.toString !== Object.prototype.toString) return a2.toString() === b2.toString();
          keys = Object.keys(a2);
          length = keys.length;
          if (length !== Object.keys(b2).length) return false;
          for (i2 = length; i2-- !== 0; )
            if (!Object.prototype.hasOwnProperty.call(b2, keys[i2])) return false;
          for (i2 = length; i2-- !== 0; ) {
            var key = keys[i2];
            if (!equal(a2[key], b2[key])) return false;
          }
          return true;
        }
        return a2 !== a2 && b2 !== b2;
      };
    }
  });

  // package-external:@wordpress/html-entities
  var require_html_entities = __commonJS({
    "package-external:@wordpress/html-entities"(exports, module) {
      module.exports = window.wp.htmlEntities;
    }
  });

  // package-external:@wordpress/shortcode
  var require_shortcode = __commonJS({
    "package-external:@wordpress/shortcode"(exports, module) {
      module.exports = window.wp.shortcode;
    }
  });

  // package-external:@wordpress/blob
  var require_blob = __commonJS({
    "package-external:@wordpress/blob"(exports, module) {
      module.exports = window.wp.blob;
    }
  });

  // node_modules/showdown/dist/showdown.js
  var require_showdown = __commonJS({
    "node_modules/showdown/dist/showdown.js"(exports, module) {
      (function() {
        function getDefaultOpts(simple) {
          "use strict";
          var defaultOptions = {
            omitExtraWLInCodeBlocks: {
              defaultValue: false,
              describe: "Omit the default extra whiteline added to code blocks",
              type: "boolean"
            },
            noHeaderId: {
              defaultValue: false,
              describe: "Turn on/off generated header id",
              type: "boolean"
            },
            prefixHeaderId: {
              defaultValue: false,
              describe: "Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",
              type: "string"
            },
            rawPrefixHeaderId: {
              defaultValue: false,
              describe: 'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',
              type: "boolean"
            },
            ghCompatibleHeaderId: {
              defaultValue: false,
              describe: "Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",
              type: "boolean"
            },
            rawHeaderId: {
              defaultValue: false,
              describe: `Remove only spaces, ' and " from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids`,
              type: "boolean"
            },
            headerLevelStart: {
              defaultValue: false,
              describe: "The header blocks level start",
              type: "integer"
            },
            parseImgDimensions: {
              defaultValue: false,
              describe: "Turn on/off image dimension parsing",
              type: "boolean"
            },
            simplifiedAutoLink: {
              defaultValue: false,
              describe: "Turn on/off GFM autolink style",
              type: "boolean"
            },
            excludeTrailingPunctuationFromURLs: {
              defaultValue: false,
              describe: "Excludes trailing punctuation from links generated with autoLinking",
              type: "boolean"
            },
            literalMidWordUnderscores: {
              defaultValue: false,
              describe: "Parse midword underscores as literal underscores",
              type: "boolean"
            },
            literalMidWordAsterisks: {
              defaultValue: false,
              describe: "Parse midword asterisks as literal asterisks",
              type: "boolean"
            },
            strikethrough: {
              defaultValue: false,
              describe: "Turn on/off strikethrough support",
              type: "boolean"
            },
            tables: {
              defaultValue: false,
              describe: "Turn on/off tables support",
              type: "boolean"
            },
            tablesHeaderId: {
              defaultValue: false,
              describe: "Add an id to table headers",
              type: "boolean"
            },
            ghCodeBlocks: {
              defaultValue: true,
              describe: "Turn on/off GFM fenced code blocks support",
              type: "boolean"
            },
            tasklists: {
              defaultValue: false,
              describe: "Turn on/off GFM tasklist support",
              type: "boolean"
            },
            smoothLivePreview: {
              defaultValue: false,
              describe: "Prevents weird effects in live previews due to incomplete input",
              type: "boolean"
            },
            smartIndentationFix: {
              defaultValue: false,
              description: "Tries to smartly fix indentation in es6 strings",
              type: "boolean"
            },
            disableForced4SpacesIndentedSublists: {
              defaultValue: false,
              description: "Disables the requirement of indenting nested sublists by 4 spaces",
              type: "boolean"
            },
            simpleLineBreaks: {
              defaultValue: false,
              description: "Parses simple line breaks as <br> (GFM Style)",
              type: "boolean"
            },
            requireSpaceBeforeHeadingText: {
              defaultValue: false,
              description: "Makes adding a space between `#` and the header text mandatory (GFM Style)",
              type: "boolean"
            },
            ghMentions: {
              defaultValue: false,
              description: "Enables github @mentions",
              type: "boolean"
            },
            ghMentionsLink: {
              defaultValue: "https://github.com/{u}",
              description: "Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",
              type: "string"
            },
            encodeEmails: {
              defaultValue: true,
              description: "Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",
              type: "boolean"
            },
            openLinksInNewWindow: {
              defaultValue: false,
              description: "Open all links in new windows",
              type: "boolean"
            },
            backslashEscapesHTMLTags: {
              defaultValue: false,
              description: "Support for HTML Tag escaping. ex: <div>foo</div>",
              type: "boolean"
            },
            emoji: {
              defaultValue: false,
              description: "Enable emoji support. Ex: `this is a :smile: emoji`",
              type: "boolean"
            },
            underline: {
              defaultValue: false,
              description: "Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`",
              type: "boolean"
            },
            completeHTMLDocument: {
              defaultValue: false,
              description: "Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags",
              type: "boolean"
            },
            metadata: {
              defaultValue: false,
              description: "Enable support for document metadata (defined at the top of the document between `\xAB\xAB\xAB` and `\xBB\xBB\xBB` or between `---` and `---`).",
              type: "boolean"
            },
            splitAdjacentBlockquotes: {
              defaultValue: false,
              description: "Split adjacent blockquote blocks",
              type: "boolean"
            }
          };
          if (simple === false) {
            return JSON.parse(JSON.stringify(defaultOptions));
          }
          var ret = {};
          for (var opt in defaultOptions) {
            if (defaultOptions.hasOwnProperty(opt)) {
              ret[opt] = defaultOptions[opt].defaultValue;
            }
          }
          return ret;
        }
        function allOptionsOn() {
          "use strict";
          var options = getDefaultOpts(true), ret = {};
          for (var opt in options) {
            if (options.hasOwnProperty(opt)) {
              ret[opt] = true;
            }
          }
          return ret;
        }
        var showdown2 = {}, parsers = {}, extensions = {}, globalOptions = getDefaultOpts(true), setFlavor = "vanilla", flavor = {
          github: {
            omitExtraWLInCodeBlocks: true,
            simplifiedAutoLink: true,
            excludeTrailingPunctuationFromURLs: true,
            literalMidWordUnderscores: true,
            strikethrough: true,
            tables: true,
            tablesHeaderId: true,
            ghCodeBlocks: true,
            tasklists: true,
            disableForced4SpacesIndentedSublists: true,
            simpleLineBreaks: true,
            requireSpaceBeforeHeadingText: true,
            ghCompatibleHeaderId: true,
            ghMentions: true,
            backslashEscapesHTMLTags: true,
            emoji: true,
            splitAdjacentBlockquotes: true
          },
          original: {
            noHeaderId: true,
            ghCodeBlocks: false
          },
          ghost: {
            omitExtraWLInCodeBlocks: true,
            parseImgDimensions: true,
            simplifiedAutoLink: true,
            excludeTrailingPunctuationFromURLs: true,
            literalMidWordUnderscores: true,
            strikethrough: true,
            tables: true,
            tablesHeaderId: true,
            ghCodeBlocks: true,
            tasklists: true,
            smoothLivePreview: true,
            simpleLineBreaks: true,
            requireSpaceBeforeHeadingText: true,
            ghMentions: false,
            encodeEmails: true
          },
          vanilla: getDefaultOpts(true),
          allOn: allOptionsOn()
        };
        showdown2.helper = {};
        showdown2.extensions = {};
        showdown2.setOption = function(key, value) {
          "use strict";
          globalOptions[key] = value;
          return this;
        };
        showdown2.getOption = function(key) {
          "use strict";
          return globalOptions[key];
        };
        showdown2.getOptions = function() {
          "use strict";
          return globalOptions;
        };
        showdown2.resetOptions = function() {
          "use strict";
          globalOptions = getDefaultOpts(true);
        };
        showdown2.setFlavor = function(name) {
          "use strict";
          if (!flavor.hasOwnProperty(name)) {
            throw Error(name + " flavor was not found");
          }
          showdown2.resetOptions();
          var preset = flavor[name];
          setFlavor = name;
          for (var option in preset) {
            if (preset.hasOwnProperty(option)) {
              globalOptions[option] = preset[option];
            }
          }
        };
        showdown2.getFlavor = function() {
          "use strict";
          return setFlavor;
        };
        showdown2.getFlavorOptions = function(name) {
          "use strict";
          if (flavor.hasOwnProperty(name)) {
            return flavor[name];
          }
        };
        showdown2.getDefaultOptions = function(simple) {
          "use strict";
          return getDefaultOpts(simple);
        };
        showdown2.subParser = function(name, func) {
          "use strict";
          if (showdown2.helper.isString(name)) {
            if (typeof func !== "undefined") {
              parsers[name] = func;
            } else {
              if (parsers.hasOwnProperty(name)) {
                return parsers[name];
              } else {
                throw Error("SubParser named " + name + " not registered!");
              }
            }
          }
        };
        showdown2.extension = function(name, ext) {
          "use strict";
          if (!showdown2.helper.isString(name)) {
            throw Error("Extension 'name' must be a string");
          }
          name = showdown2.helper.stdExtName(name);
          if (showdown2.helper.isUndefined(ext)) {
            if (!extensions.hasOwnProperty(name)) {
              throw Error("Extension named " + name + " is not registered!");
            }
            return extensions[name];
          } else {
            if (typeof ext === "function") {
              ext = ext();
            }
            if (!showdown2.helper.isArray(ext)) {
              ext = [ext];
            }
            var validExtension = validate(ext, name);
            if (validExtension.valid) {
              extensions[name] = ext;
            } else {
              throw Error(validExtension.error);
            }
          }
        };
        showdown2.getAllExtensions = function() {
          "use strict";
          return extensions;
        };
        showdown2.removeExtension = function(name) {
          "use strict";
          delete extensions[name];
        };
        showdown2.resetExtensions = function() {
          "use strict";
          extensions = {};
        };
        function validate(extension, name) {
          "use strict";
          var errMsg = name ? "Error in " + name + " extension->" : "Error in unnamed extension", ret = {
            valid: true,
            error: ""
          };
          if (!showdown2.helper.isArray(extension)) {
            extension = [extension];
          }
          for (var i2 = 0; i2 < extension.length; ++i2) {
            var baseMsg = errMsg + " sub-extension " + i2 + ": ", ext = extension[i2];
            if (typeof ext !== "object") {
              ret.valid = false;
              ret.error = baseMsg + "must be an object, but " + typeof ext + " given";
              return ret;
            }
            if (!showdown2.helper.isString(ext.type)) {
              ret.valid = false;
              ret.error = baseMsg + 'property "type" must be a string, but ' + typeof ext.type + " given";
              return ret;
            }
            var type = ext.type = ext.type.toLowerCase();
            if (type === "language") {
              type = ext.type = "lang";
            }
            if (type === "html") {
              type = ext.type = "output";
            }
            if (type !== "lang" && type !== "output" && type !== "listener") {
              ret.valid = false;
              ret.error = baseMsg + "type " + type + ' is not recognized. Valid values: "lang/language", "output/html" or "listener"';
              return ret;
            }
            if (type === "listener") {
              if (showdown2.helper.isUndefined(ext.listeners)) {
                ret.valid = false;
                ret.error = baseMsg + '. Extensions of type "listener" must have a property called "listeners"';
                return ret;
              }
            } else {
              if (showdown2.helper.isUndefined(ext.filter) && showdown2.helper.isUndefined(ext.regex)) {
                ret.valid = false;
                ret.error = baseMsg + type + ' extensions must define either a "regex" property or a "filter" method';
                return ret;
              }
            }
            if (ext.listeners) {
              if (typeof ext.listeners !== "object") {
                ret.valid = false;
                ret.error = baseMsg + '"listeners" property must be an object but ' + typeof ext.listeners + " given";
                return ret;
              }
              for (var ln in ext.listeners) {
                if (ext.listeners.hasOwnProperty(ln)) {
                  if (typeof ext.listeners[ln] !== "function") {
                    ret.valid = false;
                    ret.error = baseMsg + '"listeners" property must be an hash of [event name]: [callback]. listeners.' + ln + " must be a function but " + typeof ext.listeners[ln] + " given";
                    return ret;
                  }
                }
              }
            }
            if (ext.filter) {
              if (typeof ext.filter !== "function") {
                ret.valid = false;
                ret.error = baseMsg + '"filter" must be a function, but ' + typeof ext.filter + " given";
                return ret;
              }
            } else if (ext.regex) {
              if (showdown2.helper.isString(ext.regex)) {
                ext.regex = new RegExp(ext.regex, "g");
              }
              if (!(ext.regex instanceof RegExp)) {
                ret.valid = false;
                ret.error = baseMsg + '"regex" property must either be a string or a RegExp object, but ' + typeof ext.regex + " given";
                return ret;
              }
              if (showdown2.helper.isUndefined(ext.replace)) {
                ret.valid = false;
                ret.error = baseMsg + '"regex" extensions must implement a replace string or function';
                return ret;
              }
            }
          }
          return ret;
        }
        showdown2.validateExtension = function(ext) {
          "use strict";
          var validateExtension = validate(ext, null);
          if (!validateExtension.valid) {
            console.warn(validateExtension.error);
            return false;
          }
          return true;
        };
        if (!showdown2.hasOwnProperty("helper")) {
          showdown2.helper = {};
        }
        showdown2.helper.isString = function(a2) {
          "use strict";
          return typeof a2 === "string" || a2 instanceof String;
        };
        showdown2.helper.isFunction = function(a2) {
          "use strict";
          var getType = {};
          return a2 && getType.toString.call(a2) === "[object Function]";
        };
        showdown2.helper.isArray = function(a2) {
          "use strict";
          return Array.isArray(a2);
        };
        showdown2.helper.isUndefined = function(value) {
          "use strict";
          return typeof value === "undefined";
        };
        showdown2.helper.forEach = function(obj, callback) {
          "use strict";
          if (showdown2.helper.isUndefined(obj)) {
            throw new Error("obj param is required");
          }
          if (showdown2.helper.isUndefined(callback)) {
            throw new Error("callback param is required");
          }
          if (!showdown2.helper.isFunction(callback)) {
            throw new Error("callback param must be a function/closure");
          }
          if (typeof obj.forEach === "function") {
            obj.forEach(callback);
          } else if (showdown2.helper.isArray(obj)) {
            for (var i2 = 0; i2 < obj.length; i2++) {
              callback(obj[i2], i2, obj);
            }
          } else if (typeof obj === "object") {
            for (var prop2 in obj) {
              if (obj.hasOwnProperty(prop2)) {
                callback(obj[prop2], prop2, obj);
              }
            }
          } else {
            throw new Error("obj does not seem to be an array or an iterable object");
          }
        };
        showdown2.helper.stdExtName = function(s2) {
          "use strict";
          return s2.replace(/[_?*+\/\\.^-]/g, "").replace(/\s/g, "").toLowerCase();
        };
        function escapeCharactersCallback(wholeMatch, m1) {
          "use strict";
          var charCodeToEscape = m1.charCodeAt(0);
          return "\xA8E" + charCodeToEscape + "E";
        }
        showdown2.helper.escapeCharactersCallback = escapeCharactersCallback;
        showdown2.helper.escapeCharacters = function(text2, charsToEscape, afterBackslash) {
          "use strict";
          var regexString = "([" + charsToEscape.replace(/([\[\]\\])/g, "\\$1") + "])";
          if (afterBackslash) {
            regexString = "\\\\" + regexString;
          }
          var regex = new RegExp(regexString, "g");
          text2 = text2.replace(regex, escapeCharactersCallback);
          return text2;
        };
        showdown2.helper.unescapeHTMLEntities = function(txt) {
          "use strict";
          return txt.replace(/&quot;/g, '"').replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
        };
        var rgxFindMatchPos = function(str, left, right, flags) {
          "use strict";
          var f2 = flags || "", g2 = f2.indexOf("g") > -1, x2 = new RegExp(left + "|" + right, "g" + f2.replace(/g/g, "")), l2 = new RegExp(left, f2.replace(/g/g, "")), pos = [], t3, s2, m2, start, end;
          do {
            t3 = 0;
            while (m2 = x2.exec(str)) {
              if (l2.test(m2[0])) {
                if (!t3++) {
                  s2 = x2.lastIndex;
                  start = s2 - m2[0].length;
                }
              } else if (t3) {
                if (!--t3) {
                  end = m2.index + m2[0].length;
                  var obj = {
                    left: { start, end: s2 },
                    match: { start: s2, end: m2.index },
                    right: { start: m2.index, end },
                    wholeMatch: { start, end }
                  };
                  pos.push(obj);
                  if (!g2) {
                    return pos;
                  }
                }
              }
            }
          } while (t3 && (x2.lastIndex = s2));
          return pos;
        };
        showdown2.helper.matchRecursiveRegExp = function(str, left, right, flags) {
          "use strict";
          var matchPos = rgxFindMatchPos(str, left, right, flags), results = [];
          for (var i2 = 0; i2 < matchPos.length; ++i2) {
            results.push([
              str.slice(matchPos[i2].wholeMatch.start, matchPos[i2].wholeMatch.end),
              str.slice(matchPos[i2].match.start, matchPos[i2].match.end),
              str.slice(matchPos[i2].left.start, matchPos[i2].left.end),
              str.slice(matchPos[i2].right.start, matchPos[i2].right.end)
            ]);
          }
          return results;
        };
        showdown2.helper.replaceRecursiveRegExp = function(str, replacement, left, right, flags) {
          "use strict";
          if (!showdown2.helper.isFunction(replacement)) {
            var repStr = replacement;
            replacement = function() {
              return repStr;
            };
          }
          var matchPos = rgxFindMatchPos(str, left, right, flags), finalStr = str, lng = matchPos.length;
          if (lng > 0) {
            var bits = [];
            if (matchPos[0].wholeMatch.start !== 0) {
              bits.push(str.slice(0, matchPos[0].wholeMatch.start));
            }
            for (var i2 = 0; i2 < lng; ++i2) {
              bits.push(
                replacement(
                  str.slice(matchPos[i2].wholeMatch.start, matchPos[i2].wholeMatch.end),
                  str.slice(matchPos[i2].match.start, matchPos[i2].match.end),
                  str.slice(matchPos[i2].left.start, matchPos[i2].left.end),
                  str.slice(matchPos[i2].right.start, matchPos[i2].right.end)
                )
              );
              if (i2 < lng - 1) {
                bits.push(str.slice(matchPos[i2].wholeMatch.end, matchPos[i2 + 1].wholeMatch.start));
              }
            }
            if (matchPos[lng - 1].wholeMatch.end < str.length) {
              bits.push(str.slice(matchPos[lng - 1].wholeMatch.end));
            }
            finalStr = bits.join("");
          }
          return finalStr;
        };
        showdown2.helper.regexIndexOf = function(str, regex, fromIndex) {
          "use strict";
          if (!showdown2.helper.isString(str)) {
            throw "InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";
          }
          if (regex instanceof RegExp === false) {
            throw "InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp";
          }
          var indexOf = str.substring(fromIndex || 0).search(regex);
          return indexOf >= 0 ? indexOf + (fromIndex || 0) : indexOf;
        };
        showdown2.helper.splitAtIndex = function(str, index) {
          "use strict";
          if (!showdown2.helper.isString(str)) {
            throw "InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";
          }
          return [str.substring(0, index), str.substring(index)];
        };
        showdown2.helper.encodeEmailAddress = function(mail) {
          "use strict";
          var encode = [
            function(ch) {
              return "&#" + ch.charCodeAt(0) + ";";
            },
            function(ch) {
              return "&#x" + ch.charCodeAt(0).toString(16) + ";";
            },
            function(ch) {
              return ch;
            }
          ];
          mail = mail.replace(/./g, function(ch) {
            if (ch === "@") {
              ch = encode[Math.floor(Math.random() * 2)](ch);
            } else {
              var r2 = Math.random();
              ch = r2 > 0.9 ? encode[2](ch) : r2 > 0.45 ? encode[1](ch) : encode[0](ch);
            }
            return ch;
          });
          return mail;
        };
        showdown2.helper.padEnd = function padEnd(str, targetLength, padString) {
          "use strict";
          targetLength = targetLength >> 0;
          padString = String(padString || " ");
          if (str.length > targetLength) {
            return String(str);
          } else {
            targetLength = targetLength - str.length;
            if (targetLength > padString.length) {
              padString += padString.repeat(targetLength / padString.length);
            }
            return String(str) + padString.slice(0, targetLength);
          }
        };
        if (typeof console === "undefined") {
          console = {
            warn: function(msg) {
              "use strict";
              alert(msg);
            },
            log: function(msg) {
              "use strict";
              alert(msg);
            },
            error: function(msg) {
              "use strict";
              throw msg;
            }
          };
        }
        showdown2.helper.regexes = {
          asteriskDashAndColon: /([*_:~])/g
        };
        showdown2.helper.emojis = {
          "+1": "\u{1F44D}",
          "-1": "\u{1F44E}",
          "100": "\u{1F4AF}",
          "1234": "\u{1F522}",
          "1st_place_medal": "\u{1F947}",
          "2nd_place_medal": "\u{1F948}",
          "3rd_place_medal": "\u{1F949}",
          "8ball": "\u{1F3B1}",
          "a": "\u{1F170}\uFE0F",
          "ab": "\u{1F18E}",
          "abc": "\u{1F524}",
          "abcd": "\u{1F521}",
          "accept": "\u{1F251}",
          "aerial_tramway": "\u{1F6A1}",
          "airplane": "\u2708\uFE0F",
          "alarm_clock": "\u23F0",
          "alembic": "\u2697\uFE0F",
          "alien": "\u{1F47D}",
          "ambulance": "\u{1F691}",
          "amphora": "\u{1F3FA}",
          "anchor": "\u2693\uFE0F",
          "angel": "\u{1F47C}",
          "anger": "\u{1F4A2}",
          "angry": "\u{1F620}",
          "anguished": "\u{1F627}",
          "ant": "\u{1F41C}",
          "apple": "\u{1F34E}",
          "aquarius": "\u2652\uFE0F",
          "aries": "\u2648\uFE0F",
          "arrow_backward": "\u25C0\uFE0F",
          "arrow_double_down": "\u23EC",
          "arrow_double_up": "\u23EB",
          "arrow_down": "\u2B07\uFE0F",
          "arrow_down_small": "\u{1F53D}",
          "arrow_forward": "\u25B6\uFE0F",
          "arrow_heading_down": "\u2935\uFE0F",
          "arrow_heading_up": "\u2934\uFE0F",
          "arrow_left": "\u2B05\uFE0F",
          "arrow_lower_left": "\u2199\uFE0F",
          "arrow_lower_right": "\u2198\uFE0F",
          "arrow_right": "\u27A1\uFE0F",
          "arrow_right_hook": "\u21AA\uFE0F",
          "arrow_up": "\u2B06\uFE0F",
          "arrow_up_down": "\u2195\uFE0F",
          "arrow_up_small": "\u{1F53C}",
          "arrow_upper_left": "\u2196\uFE0F",
          "arrow_upper_right": "\u2197\uFE0F",
          "arrows_clockwise": "\u{1F503}",
          "arrows_counterclockwise": "\u{1F504}",
          "art": "\u{1F3A8}",
          "articulated_lorry": "\u{1F69B}",
          "artificial_satellite": "\u{1F6F0}",
          "astonished": "\u{1F632}",
          "athletic_shoe": "\u{1F45F}",
          "atm": "\u{1F3E7}",
          "atom_symbol": "\u269B\uFE0F",
          "avocado": "\u{1F951}",
          "b": "\u{1F171}\uFE0F",
          "baby": "\u{1F476}",
          "baby_bottle": "\u{1F37C}",
          "baby_chick": "\u{1F424}",
          "baby_symbol": "\u{1F6BC}",
          "back": "\u{1F519}",
          "bacon": "\u{1F953}",
          "badminton": "\u{1F3F8}",
          "baggage_claim": "\u{1F6C4}",
          "baguette_bread": "\u{1F956}",
          "balance_scale": "\u2696\uFE0F",
          "balloon": "\u{1F388}",
          "ballot_box": "\u{1F5F3}",
          "ballot_box_with_check": "\u2611\uFE0F",
          "bamboo": "\u{1F38D}",
          "banana": "\u{1F34C}",
          "bangbang": "\u203C\uFE0F",
          "bank": "\u{1F3E6}",
          "bar_chart": "\u{1F4CA}",
          "barber": "\u{1F488}",
          "baseball": "\u26BE\uFE0F",
          "basketball": "\u{1F3C0}",
          "basketball_man": "\u26F9\uFE0F",
          "basketball_woman": "\u26F9\uFE0F&zwj;\u2640\uFE0F",
          "bat": "\u{1F987}",
          "bath": "\u{1F6C0}",
          "bathtub": "\u{1F6C1}",
          "battery": "\u{1F50B}",
          "beach_umbrella": "\u{1F3D6}",
          "bear": "\u{1F43B}",
          "bed": "\u{1F6CF}",
          "bee": "\u{1F41D}",
          "beer": "\u{1F37A}",
          "beers": "\u{1F37B}",
          "beetle": "\u{1F41E}",
          "beginner": "\u{1F530}",
          "bell": "\u{1F514}",
          "bellhop_bell": "\u{1F6CE}",
          "bento": "\u{1F371}",
          "biking_man": "\u{1F6B4}",
          "bike": "\u{1F6B2}",
          "biking_woman": "\u{1F6B4}&zwj;\u2640\uFE0F",
          "bikini": "\u{1F459}",
          "biohazard": "\u2623\uFE0F",
          "bird": "\u{1F426}",
          "birthday": "\u{1F382}",
          "black_circle": "\u26AB\uFE0F",
          "black_flag": "\u{1F3F4}",
          "black_heart": "\u{1F5A4}",
          "black_joker": "\u{1F0CF}",
          "black_large_square": "\u2B1B\uFE0F",
          "black_medium_small_square": "\u25FE\uFE0F",
          "black_medium_square": "\u25FC\uFE0F",
          "black_nib": "\u2712\uFE0F",
          "black_small_square": "\u25AA\uFE0F",
          "black_square_button": "\u{1F532}",
          "blonde_man": "\u{1F471}",
          "blonde_woman": "\u{1F471}&zwj;\u2640\uFE0F",
          "blossom": "\u{1F33C}",
          "blowfish": "\u{1F421}",
          "blue_book": "\u{1F4D8}",
          "blue_car": "\u{1F699}",
          "blue_heart": "\u{1F499}",
          "blush": "\u{1F60A}",
          "boar": "\u{1F417}",
          "boat": "\u26F5\uFE0F",
          "bomb": "\u{1F4A3}",
          "book": "\u{1F4D6}",
          "bookmark": "\u{1F516}",
          "bookmark_tabs": "\u{1F4D1}",
          "books": "\u{1F4DA}",
          "boom": "\u{1F4A5}",
          "boot": "\u{1F462}",
          "bouquet": "\u{1F490}",
          "bowing_man": "\u{1F647}",
          "bow_and_arrow": "\u{1F3F9}",
          "bowing_woman": "\u{1F647}&zwj;\u2640\uFE0F",
          "bowling": "\u{1F3B3}",
          "boxing_glove": "\u{1F94A}",
          "boy": "\u{1F466}",
          "bread": "\u{1F35E}",
          "bride_with_veil": "\u{1F470}",
          "bridge_at_night": "\u{1F309}",
          "briefcase": "\u{1F4BC}",
          "broken_heart": "\u{1F494}",
          "bug": "\u{1F41B}",
          "building_construction": "\u{1F3D7}",
          "bulb": "\u{1F4A1}",
          "bullettrain_front": "\u{1F685}",
          "bullettrain_side": "\u{1F684}",
          "burrito": "\u{1F32F}",
          "bus": "\u{1F68C}",
          "business_suit_levitating": "\u{1F574}",
          "busstop": "\u{1F68F}",
          "bust_in_silhouette": "\u{1F464}",
          "busts_in_silhouette": "\u{1F465}",
          "butterfly": "\u{1F98B}",
          "cactus": "\u{1F335}",
          "cake": "\u{1F370}",
          "calendar": "\u{1F4C6}",
          "call_me_hand": "\u{1F919}",
          "calling": "\u{1F4F2}",
          "camel": "\u{1F42B}",
          "camera": "\u{1F4F7}",
          "camera_flash": "\u{1F4F8}",
          "camping": "\u{1F3D5}",
          "cancer": "\u264B\uFE0F",
          "candle": "\u{1F56F}",
          "candy": "\u{1F36C}",
          "canoe": "\u{1F6F6}",
          "capital_abcd": "\u{1F520}",
          "capricorn": "\u2651\uFE0F",
          "car": "\u{1F697}",
          "card_file_box": "\u{1F5C3}",
          "card_index": "\u{1F4C7}",
          "card_index_dividers": "\u{1F5C2}",
          "carousel_horse": "\u{1F3A0}",
          "carrot": "\u{1F955}",
          "cat": "\u{1F431}",
          "cat2": "\u{1F408}",
          "cd": "\u{1F4BF}",
          "chains": "\u26D3",
          "champagne": "\u{1F37E}",
          "chart": "\u{1F4B9}",
          "chart_with_downwards_trend": "\u{1F4C9}",
          "chart_with_upwards_trend": "\u{1F4C8}",
          "checkered_flag": "\u{1F3C1}",
          "cheese": "\u{1F9C0}",
          "cherries": "\u{1F352}",
          "cherry_blossom": "\u{1F338}",
          "chestnut": "\u{1F330}",
          "chicken": "\u{1F414}",
          "children_crossing": "\u{1F6B8}",
          "chipmunk": "\u{1F43F}",
          "chocolate_bar": "\u{1F36B}",
          "christmas_tree": "\u{1F384}",
          "church": "\u26EA\uFE0F",
          "cinema": "\u{1F3A6}",
          "circus_tent": "\u{1F3AA}",
          "city_sunrise": "\u{1F307}",
          "city_sunset": "\u{1F306}",
          "cityscape": "\u{1F3D9}",
          "cl": "\u{1F191}",
          "clamp": "\u{1F5DC}",
          "clap": "\u{1F44F}",
          "clapper": "\u{1F3AC}",
          "classical_building": "\u{1F3DB}",
          "clinking_glasses": "\u{1F942}",
          "clipboard": "\u{1F4CB}",
          "clock1": "\u{1F550}",
          "clock10": "\u{1F559}",
          "clock1030": "\u{1F565}",
          "clock11": "\u{1F55A}",
          "clock1130": "\u{1F566}",
          "clock12": "\u{1F55B}",
          "clock1230": "\u{1F567}",
          "clock130": "\u{1F55C}",
          "clock2": "\u{1F551}",
          "clock230": "\u{1F55D}",
          "clock3": "\u{1F552}",
          "clock330": "\u{1F55E}",
          "clock4": "\u{1F553}",
          "clock430": "\u{1F55F}",
          "clock5": "\u{1F554}",
          "clock530": "\u{1F560}",
          "clock6": "\u{1F555}",
          "clock630": "\u{1F561}",
          "clock7": "\u{1F556}",
          "clock730": "\u{1F562}",
          "clock8": "\u{1F557}",
          "clock830": "\u{1F563}",
          "clock9": "\u{1F558}",
          "clock930": "\u{1F564}",
          "closed_book": "\u{1F4D5}",
          "closed_lock_with_key": "\u{1F510}",
          "closed_umbrella": "\u{1F302}",
          "cloud": "\u2601\uFE0F",
          "cloud_with_lightning": "\u{1F329}",
          "cloud_with_lightning_and_rain": "\u26C8",
          "cloud_with_rain": "\u{1F327}",
          "cloud_with_snow": "\u{1F328}",
          "clown_face": "\u{1F921}",
          "clubs": "\u2663\uFE0F",
          "cocktail": "\u{1F378}",
          "coffee": "\u2615\uFE0F",
          "coffin": "\u26B0\uFE0F",
          "cold_sweat": "\u{1F630}",
          "comet": "\u2604\uFE0F",
          "computer": "\u{1F4BB}",
          "computer_mouse": "\u{1F5B1}",
          "confetti_ball": "\u{1F38A}",
          "confounded": "\u{1F616}",
          "confused": "\u{1F615}",
          "congratulations": "\u3297\uFE0F",
          "construction": "\u{1F6A7}",
          "construction_worker_man": "\u{1F477}",
          "construction_worker_woman": "\u{1F477}&zwj;\u2640\uFE0F",
          "control_knobs": "\u{1F39B}",
          "convenience_store": "\u{1F3EA}",
          "cookie": "\u{1F36A}",
          "cool": "\u{1F192}",
          "policeman": "\u{1F46E}",
          "copyright": "\xA9\uFE0F",
          "corn": "\u{1F33D}",
          "couch_and_lamp": "\u{1F6CB}",
          "couple": "\u{1F46B}",
          "couple_with_heart_woman_man": "\u{1F491}",
          "couple_with_heart_man_man": "\u{1F468}&zwj;\u2764\uFE0F&zwj;\u{1F468}",
          "couple_with_heart_woman_woman": "\u{1F469}&zwj;\u2764\uFE0F&zwj;\u{1F469}",
          "couplekiss_man_man": "\u{1F468}&zwj;\u2764\uFE0F&zwj;\u{1F48B}&zwj;\u{1F468}",
          "couplekiss_man_woman": "\u{1F48F}",
          "couplekiss_woman_woman": "\u{1F469}&zwj;\u2764\uFE0F&zwj;\u{1F48B}&zwj;\u{1F469}",
          "cow": "\u{1F42E}",
          "cow2": "\u{1F404}",
          "cowboy_hat_face": "\u{1F920}",
          "crab": "\u{1F980}",
          "crayon": "\u{1F58D}",
          "credit_card": "\u{1F4B3}",
          "crescent_moon": "\u{1F319}",
          "cricket": "\u{1F3CF}",
          "crocodile": "\u{1F40A}",
          "croissant": "\u{1F950}",
          "crossed_fingers": "\u{1F91E}",
          "crossed_flags": "\u{1F38C}",
          "crossed_swords": "\u2694\uFE0F",
          "crown": "\u{1F451}",
          "cry": "\u{1F622}",
          "crying_cat_face": "\u{1F63F}",
          "crystal_ball": "\u{1F52E}",
          "cucumber": "\u{1F952}",
          "cupid": "\u{1F498}",
          "curly_loop": "\u27B0",
          "currency_exchange": "\u{1F4B1}",
          "curry": "\u{1F35B}",
          "custard": "\u{1F36E}",
          "customs": "\u{1F6C3}",
          "cyclone": "\u{1F300}",
          "dagger": "\u{1F5E1}",
          "dancer": "\u{1F483}",
          "dancing_women": "\u{1F46F}",
          "dancing_men": "\u{1F46F}&zwj;\u2642\uFE0F",
          "dango": "\u{1F361}",
          "dark_sunglasses": "\u{1F576}",
          "dart": "\u{1F3AF}",
          "dash": "\u{1F4A8}",
          "date": "\u{1F4C5}",
          "deciduous_tree": "\u{1F333}",
          "deer": "\u{1F98C}",
          "department_store": "\u{1F3EC}",
          "derelict_house": "\u{1F3DA}",
          "desert": "\u{1F3DC}",
          "desert_island": "\u{1F3DD}",
          "desktop_computer": "\u{1F5A5}",
          "male_detective": "\u{1F575}\uFE0F",
          "diamond_shape_with_a_dot_inside": "\u{1F4A0}",
          "diamonds": "\u2666\uFE0F",
          "disappointed": "\u{1F61E}",
          "disappointed_relieved": "\u{1F625}",
          "dizzy": "\u{1F4AB}",
          "dizzy_face": "\u{1F635}",
          "do_not_litter": "\u{1F6AF}",
          "dog": "\u{1F436}",
          "dog2": "\u{1F415}",
          "dollar": "\u{1F4B5}",
          "dolls": "\u{1F38E}",
          "dolphin": "\u{1F42C}",
          "door": "\u{1F6AA}",
          "doughnut": "\u{1F369}",
          "dove": "\u{1F54A}",
          "dragon": "\u{1F409}",
          "dragon_face": "\u{1F432}",
          "dress": "\u{1F457}",
          "dromedary_camel": "\u{1F42A}",
          "drooling_face": "\u{1F924}",
          "droplet": "\u{1F4A7}",
          "drum": "\u{1F941}",
          "duck": "\u{1F986}",
          "dvd": "\u{1F4C0}",
          "e-mail": "\u{1F4E7}",
          "eagle": "\u{1F985}",
          "ear": "\u{1F442}",
          "ear_of_rice": "\u{1F33E}",
          "earth_africa": "\u{1F30D}",
          "earth_americas": "\u{1F30E}",
          "earth_asia": "\u{1F30F}",
          "egg": "\u{1F95A}",
          "eggplant": "\u{1F346}",
          "eight_pointed_black_star": "\u2734\uFE0F",
          "eight_spoked_asterisk": "\u2733\uFE0F",
          "electric_plug": "\u{1F50C}",
          "elephant": "\u{1F418}",
          "email": "\u2709\uFE0F",
          "end": "\u{1F51A}",
          "envelope_with_arrow": "\u{1F4E9}",
          "euro": "\u{1F4B6}",
          "european_castle": "\u{1F3F0}",
          "european_post_office": "\u{1F3E4}",
          "evergreen_tree": "\u{1F332}",
          "exclamation": "\u2757\uFE0F",
          "expressionless": "\u{1F611}",
          "eye": "\u{1F441}",
          "eye_speech_bubble": "\u{1F441}&zwj;\u{1F5E8}",
          "eyeglasses": "\u{1F453}",
          "eyes": "\u{1F440}",
          "face_with_head_bandage": "\u{1F915}",
          "face_with_thermometer": "\u{1F912}",
          "fist_oncoming": "\u{1F44A}",
          "factory": "\u{1F3ED}",
          "fallen_leaf": "\u{1F342}",
          "family_man_woman_boy": "\u{1F46A}",
          "family_man_boy": "\u{1F468}&zwj;\u{1F466}",
          "family_man_boy_boy": "\u{1F468}&zwj;\u{1F466}&zwj;\u{1F466}",
          "family_man_girl": "\u{1F468}&zwj;\u{1F467}",
          "family_man_girl_boy": "\u{1F468}&zwj;\u{1F467}&zwj;\u{1F466}",
          "family_man_girl_girl": "\u{1F468}&zwj;\u{1F467}&zwj;\u{1F467}",
          "family_man_man_boy": "\u{1F468}&zwj;\u{1F468}&zwj;\u{1F466}",
          "family_man_man_boy_boy": "\u{1F468}&zwj;\u{1F468}&zwj;\u{1F466}&zwj;\u{1F466}",
          "family_man_man_girl": "\u{1F468}&zwj;\u{1F468}&zwj;\u{1F467}",
          "family_man_man_girl_boy": "\u{1F468}&zwj;\u{1F468}&zwj;\u{1F467}&zwj;\u{1F466}",
          "family_man_man_girl_girl": "\u{1F468}&zwj;\u{1F468}&zwj;\u{1F467}&zwj;\u{1F467}",
          "family_man_woman_boy_boy": "\u{1F468}&zwj;\u{1F469}&zwj;\u{1F466}&zwj;\u{1F466}",
          "family_man_woman_girl": "\u{1F468}&zwj;\u{1F469}&zwj;\u{1F467}",
          "family_man_woman_girl_boy": "\u{1F468}&zwj;\u{1F469}&zwj;\u{1F467}&zwj;\u{1F466}",
          "family_man_woman_girl_girl": "\u{1F468}&zwj;\u{1F469}&zwj;\u{1F467}&zwj;\u{1F467}",
          "family_woman_boy": "\u{1F469}&zwj;\u{1F466}",
          "family_woman_boy_boy": "\u{1F469}&zwj;\u{1F466}&zwj;\u{1F466}",
          "family_woman_girl": "\u{1F469}&zwj;\u{1F467}",
          "family_woman_girl_boy": "\u{1F469}&zwj;\u{1F467}&zwj;\u{1F466}",
          "family_woman_girl_girl": "\u{1F469}&zwj;\u{1F467}&zwj;\u{1F467}",
          "family_woman_woman_boy": "\u{1F469}&zwj;\u{1F469}&zwj;\u{1F466}",
          "family_woman_woman_boy_boy": "\u{1F469}&zwj;\u{1F469}&zwj;\u{1F466}&zwj;\u{1F466}",
          "family_woman_woman_girl": "\u{1F469}&zwj;\u{1F469}&zwj;\u{1F467}",
          "family_woman_woman_girl_boy": "\u{1F469}&zwj;\u{1F469}&zwj;\u{1F467}&zwj;\u{1F466}",
          "family_woman_woman_girl_girl": "\u{1F469}&zwj;\u{1F469}&zwj;\u{1F467}&zwj;\u{1F467}",
          "fast_forward": "\u23E9",
          "fax": "\u{1F4E0}",
          "fearful": "\u{1F628}",
          "feet": "\u{1F43E}",
          "female_detective": "\u{1F575}\uFE0F&zwj;\u2640\uFE0F",
          "ferris_wheel": "\u{1F3A1}",
          "ferry": "\u26F4",
          "field_hockey": "\u{1F3D1}",
          "file_cabinet": "\u{1F5C4}",
          "file_folder": "\u{1F4C1}",
          "film_projector": "\u{1F4FD}",
          "film_strip": "\u{1F39E}",
          "fire": "\u{1F525}",
          "fire_engine": "\u{1F692}",
          "fireworks": "\u{1F386}",
          "first_quarter_moon": "\u{1F313}",
          "first_quarter_moon_with_face": "\u{1F31B}",
          "fish": "\u{1F41F}",
          "fish_cake": "\u{1F365}",
          "fishing_pole_and_fish": "\u{1F3A3}",
          "fist_raised": "\u270A",
          "fist_left": "\u{1F91B}",
          "fist_right": "\u{1F91C}",
          "flags": "\u{1F38F}",
          "flashlight": "\u{1F526}",
          "fleur_de_lis": "\u269C\uFE0F",
          "flight_arrival": "\u{1F6EC}",
          "flight_departure": "\u{1F6EB}",
          "floppy_disk": "\u{1F4BE}",
          "flower_playing_cards": "\u{1F3B4}",
          "flushed": "\u{1F633}",
          "fog": "\u{1F32B}",
          "foggy": "\u{1F301}",
          "football": "\u{1F3C8}",
          "footprints": "\u{1F463}",
          "fork_and_knife": "\u{1F374}",
          "fountain": "\u26F2\uFE0F",
          "fountain_pen": "\u{1F58B}",
          "four_leaf_clover": "\u{1F340}",
          "fox_face": "\u{1F98A}",
          "framed_picture": "\u{1F5BC}",
          "free": "\u{1F193}",
          "fried_egg": "\u{1F373}",
          "fried_shrimp": "\u{1F364}",
          "fries": "\u{1F35F}",
          "frog": "\u{1F438}",
          "frowning": "\u{1F626}",
          "frowning_face": "\u2639\uFE0F",
          "frowning_man": "\u{1F64D}&zwj;\u2642\uFE0F",
          "frowning_woman": "\u{1F64D}",
          "middle_finger": "\u{1F595}",
          "fuelpump": "\u26FD\uFE0F",
          "full_moon": "\u{1F315}",
          "full_moon_with_face": "\u{1F31D}",
          "funeral_urn": "\u26B1\uFE0F",
          "game_die": "\u{1F3B2}",
          "gear": "\u2699\uFE0F",
          "gem": "\u{1F48E}",
          "gemini": "\u264A\uFE0F",
          "ghost": "\u{1F47B}",
          "gift": "\u{1F381}",
          "gift_heart": "\u{1F49D}",
          "girl": "\u{1F467}",
          "globe_with_meridians": "\u{1F310}",
          "goal_net": "\u{1F945}",
          "goat": "\u{1F410}",
          "golf": "\u26F3\uFE0F",
          "golfing_man": "\u{1F3CC}\uFE0F",
          "golfing_woman": "\u{1F3CC}\uFE0F&zwj;\u2640\uFE0F",
          "gorilla": "\u{1F98D}",
          "grapes": "\u{1F347}",
          "green_apple": "\u{1F34F}",
          "green_book": "\u{1F4D7}",
          "green_heart": "\u{1F49A}",
          "green_salad": "\u{1F957}",
          "grey_exclamation": "\u2755",
          "grey_question": "\u2754",
          "grimacing": "\u{1F62C}",
          "grin": "\u{1F601}",
          "grinning": "\u{1F600}",
          "guardsman": "\u{1F482}",
          "guardswoman": "\u{1F482}&zwj;\u2640\uFE0F",
          "guitar": "\u{1F3B8}",
          "gun": "\u{1F52B}",
          "haircut_woman": "\u{1F487}",
          "haircut_man": "\u{1F487}&zwj;\u2642\uFE0F",
          "hamburger": "\u{1F354}",
          "hammer": "\u{1F528}",
          "hammer_and_pick": "\u2692",
          "hammer_and_wrench": "\u{1F6E0}",
          "hamster": "\u{1F439}",
          "hand": "\u270B",
          "handbag": "\u{1F45C}",
          "handshake": "\u{1F91D}",
          "hankey": "\u{1F4A9}",
          "hatched_chick": "\u{1F425}",
          "hatching_chick": "\u{1F423}",
          "headphones": "\u{1F3A7}",
          "hear_no_evil": "\u{1F649}",
          "heart": "\u2764\uFE0F",
          "heart_decoration": "\u{1F49F}",
          "heart_eyes": "\u{1F60D}",
          "heart_eyes_cat": "\u{1F63B}",
          "heartbeat": "\u{1F493}",
          "heartpulse": "\u{1F497}",
          "hearts": "\u2665\uFE0F",
          "heavy_check_mark": "\u2714\uFE0F",
          "heavy_division_sign": "\u2797",
          "heavy_dollar_sign": "\u{1F4B2}",
          "heavy_heart_exclamation": "\u2763\uFE0F",
          "heavy_minus_sign": "\u2796",
          "heavy_multiplication_x": "\u2716\uFE0F",
          "heavy_plus_sign": "\u2795",
          "helicopter": "\u{1F681}",
          "herb": "\u{1F33F}",
          "hibiscus": "\u{1F33A}",
          "high_brightness": "\u{1F506}",
          "high_heel": "\u{1F460}",
          "hocho": "\u{1F52A}",
          "hole": "\u{1F573}",
          "honey_pot": "\u{1F36F}",
          "horse": "\u{1F434}",
          "horse_racing": "\u{1F3C7}",
          "hospital": "\u{1F3E5}",
          "hot_pepper": "\u{1F336}",
          "hotdog": "\u{1F32D}",
          "hotel": "\u{1F3E8}",
          "hotsprings": "\u2668\uFE0F",
          "hourglass": "\u231B\uFE0F",
          "hourglass_flowing_sand": "\u23F3",
          "house": "\u{1F3E0}",
          "house_with_garden": "\u{1F3E1}",
          "houses": "\u{1F3D8}",
          "hugs": "\u{1F917}",
          "hushed": "\u{1F62F}",
          "ice_cream": "\u{1F368}",
          "ice_hockey": "\u{1F3D2}",
          "ice_skate": "\u26F8",
          "icecream": "\u{1F366}",
          "id": "\u{1F194}",
          "ideograph_advantage": "\u{1F250}",
          "imp": "\u{1F47F}",
          "inbox_tray": "\u{1F4E5}",
          "incoming_envelope": "\u{1F4E8}",
          "tipping_hand_woman": "\u{1F481}",
          "information_source": "\u2139\uFE0F",
          "innocent": "\u{1F607}",
          "interrobang": "\u2049\uFE0F",
          "iphone": "\u{1F4F1}",
          "izakaya_lantern": "\u{1F3EE}",
          "jack_o_lantern": "\u{1F383}",
          "japan": "\u{1F5FE}",
          "japanese_castle": "\u{1F3EF}",
          "japanese_goblin": "\u{1F47A}",
          "japanese_ogre": "\u{1F479}",
          "jeans": "\u{1F456}",
          "joy": "\u{1F602}",
          "joy_cat": "\u{1F639}",
          "joystick": "\u{1F579}",
          "kaaba": "\u{1F54B}",
          "key": "\u{1F511}",
          "keyboard": "\u2328\uFE0F",
          "keycap_ten": "\u{1F51F}",
          "kick_scooter": "\u{1F6F4}",
          "kimono": "\u{1F458}",
          "kiss": "\u{1F48B}",
          "kissing": "\u{1F617}",
          "kissing_cat": "\u{1F63D}",
          "kissing_closed_eyes": "\u{1F61A}",
          "kissing_heart": "\u{1F618}",
          "kissing_smiling_eyes": "\u{1F619}",
          "kiwi_fruit": "\u{1F95D}",
          "koala": "\u{1F428}",
          "koko": "\u{1F201}",
          "label": "\u{1F3F7}",
          "large_blue_circle": "\u{1F535}",
          "large_blue_diamond": "\u{1F537}",
          "large_orange_diamond": "\u{1F536}",
          "last_quarter_moon": "\u{1F317}",
          "last_quarter_moon_with_face": "\u{1F31C}",
          "latin_cross": "\u271D\uFE0F",
          "laughing": "\u{1F606}",
          "leaves": "\u{1F343}",
          "ledger": "\u{1F4D2}",
          "left_luggage": "\u{1F6C5}",
          "left_right_arrow": "\u2194\uFE0F",
          "leftwards_arrow_with_hook": "\u21A9\uFE0F",
          "lemon": "\u{1F34B}",
          "leo": "\u264C\uFE0F",
          "leopard": "\u{1F406}",
          "level_slider": "\u{1F39A}",
          "libra": "\u264E\uFE0F",
          "light_rail": "\u{1F688}",
          "link": "\u{1F517}",
          "lion": "\u{1F981}",
          "lips": "\u{1F444}",
          "lipstick": "\u{1F484}",
          "lizard": "\u{1F98E}",
          "lock": "\u{1F512}",
          "lock_with_ink_pen": "\u{1F50F}",
          "lollipop": "\u{1F36D}",
          "loop": "\u27BF",
          "loud_sound": "\u{1F50A}",
          "loudspeaker": "\u{1F4E2}",
          "love_hotel": "\u{1F3E9}",
          "love_letter": "\u{1F48C}",
          "low_brightness": "\u{1F505}",
          "lying_face": "\u{1F925}",
          "m": "\u24C2\uFE0F",
          "mag": "\u{1F50D}",
          "mag_right": "\u{1F50E}",
          "mahjong": "\u{1F004}\uFE0F",
          "mailbox": "\u{1F4EB}",
          "mailbox_closed": "\u{1F4EA}",
          "mailbox_with_mail": "\u{1F4EC}",
          "mailbox_with_no_mail": "\u{1F4ED}",
          "man": "\u{1F468}",
          "man_artist": "\u{1F468}&zwj;\u{1F3A8}",
          "man_astronaut": "\u{1F468}&zwj;\u{1F680}",
          "man_cartwheeling": "\u{1F938}&zwj;\u2642\uFE0F",
          "man_cook": "\u{1F468}&zwj;\u{1F373}",
          "man_dancing": "\u{1F57A}",
          "man_facepalming": "\u{1F926}&zwj;\u2642\uFE0F",
          "man_factory_worker": "\u{1F468}&zwj;\u{1F3ED}",
          "man_farmer": "\u{1F468}&zwj;\u{1F33E}",
          "man_firefighter": "\u{1F468}&zwj;\u{1F692}",
          "man_health_worker": "\u{1F468}&zwj;\u2695\uFE0F",
          "man_in_tuxedo": "\u{1F935}",
          "man_judge": "\u{1F468}&zwj;\u2696\uFE0F",
          "man_juggling": "\u{1F939}&zwj;\u2642\uFE0F",
          "man_mechanic": "\u{1F468}&zwj;\u{1F527}",
          "man_office_worker": "\u{1F468}&zwj;\u{1F4BC}",
          "man_pilot": "\u{1F468}&zwj;\u2708\uFE0F",
          "man_playing_handball": "\u{1F93E}&zwj;\u2642\uFE0F",
          "man_playing_water_polo": "\u{1F93D}&zwj;\u2642\uFE0F",
          "man_scientist": "\u{1F468}&zwj;\u{1F52C}",
          "man_shrugging": "\u{1F937}&zwj;\u2642\uFE0F",
          "man_singer": "\u{1F468}&zwj;\u{1F3A4}",
          "man_student": "\u{1F468}&zwj;\u{1F393}",
          "man_teacher": "\u{1F468}&zwj;\u{1F3EB}",
          "man_technologist": "\u{1F468}&zwj;\u{1F4BB}",
          "man_with_gua_pi_mao": "\u{1F472}",
          "man_with_turban": "\u{1F473}",
          "tangerine": "\u{1F34A}",
          "mans_shoe": "\u{1F45E}",
          "mantelpiece_clock": "\u{1F570}",
          "maple_leaf": "\u{1F341}",
          "martial_arts_uniform": "\u{1F94B}",
          "mask": "\u{1F637}",
          "massage_woman": "\u{1F486}",
          "massage_man": "\u{1F486}&zwj;\u2642\uFE0F",
          "meat_on_bone": "\u{1F356}",
          "medal_military": "\u{1F396}",
          "medal_sports": "\u{1F3C5}",
          "mega": "\u{1F4E3}",
          "melon": "\u{1F348}",
          "memo": "\u{1F4DD}",
          "men_wrestling": "\u{1F93C}&zwj;\u2642\uFE0F",
          "menorah": "\u{1F54E}",
          "mens": "\u{1F6B9}",
          "metal": "\u{1F918}",
          "metro": "\u{1F687}",
          "microphone": "\u{1F3A4}",
          "microscope": "\u{1F52C}",
          "milk_glass": "\u{1F95B}",
          "milky_way": "\u{1F30C}",
          "minibus": "\u{1F690}",
          "minidisc": "\u{1F4BD}",
          "mobile_phone_off": "\u{1F4F4}",
          "money_mouth_face": "\u{1F911}",
          "money_with_wings": "\u{1F4B8}",
          "moneybag": "\u{1F4B0}",
          "monkey": "\u{1F412}",
          "monkey_face": "\u{1F435}",
          "monorail": "\u{1F69D}",
          "moon": "\u{1F314}",
          "mortar_board": "\u{1F393}",
          "mosque": "\u{1F54C}",
          "motor_boat": "\u{1F6E5}",
          "motor_scooter": "\u{1F6F5}",
          "motorcycle": "\u{1F3CD}",
          "motorway": "\u{1F6E3}",
          "mount_fuji": "\u{1F5FB}",
          "mountain": "\u26F0",
          "mountain_biking_man": "\u{1F6B5}",
          "mountain_biking_woman": "\u{1F6B5}&zwj;\u2640\uFE0F",
          "mountain_cableway": "\u{1F6A0}",
          "mountain_railway": "\u{1F69E}",
          "mountain_snow": "\u{1F3D4}",
          "mouse": "\u{1F42D}",
          "mouse2": "\u{1F401}",
          "movie_camera": "\u{1F3A5}",
          "moyai": "\u{1F5FF}",
          "mrs_claus": "\u{1F936}",
          "muscle": "\u{1F4AA}",
          "mushroom": "\u{1F344}",
          "musical_keyboard": "\u{1F3B9}",
          "musical_note": "\u{1F3B5}",
          "musical_score": "\u{1F3BC}",
          "mute": "\u{1F507}",
          "nail_care": "\u{1F485}",
          "name_badge": "\u{1F4DB}",
          "national_park": "\u{1F3DE}",
          "nauseated_face": "\u{1F922}",
          "necktie": "\u{1F454}",
          "negative_squared_cross_mark": "\u274E",
          "nerd_face": "\u{1F913}",
          "neutral_face": "\u{1F610}",
          "new": "\u{1F195}",
          "new_moon": "\u{1F311}",
          "new_moon_with_face": "\u{1F31A}",
          "newspaper": "\u{1F4F0}",
          "newspaper_roll": "\u{1F5DE}",
          "next_track_button": "\u23ED",
          "ng": "\u{1F196}",
          "no_good_man": "\u{1F645}&zwj;\u2642\uFE0F",
          "no_good_woman": "\u{1F645}",
          "night_with_stars": "\u{1F303}",
          "no_bell": "\u{1F515}",
          "no_bicycles": "\u{1F6B3}",
          "no_entry": "\u26D4\uFE0F",
          "no_entry_sign": "\u{1F6AB}",
          "no_mobile_phones": "\u{1F4F5}",
          "no_mouth": "\u{1F636}",
          "no_pedestrians": "\u{1F6B7}",
          "no_smoking": "\u{1F6AD}",
          "non-potable_water": "\u{1F6B1}",
          "nose": "\u{1F443}",
          "notebook": "\u{1F4D3}",
          "notebook_with_decorative_cover": "\u{1F4D4}",
          "notes": "\u{1F3B6}",
          "nut_and_bolt": "\u{1F529}",
          "o": "\u2B55\uFE0F",
          "o2": "\u{1F17E}\uFE0F",
          "ocean": "\u{1F30A}",
          "octopus": "\u{1F419}",
          "oden": "\u{1F362}",
          "office": "\u{1F3E2}",
          "oil_drum": "\u{1F6E2}",
          "ok": "\u{1F197}",
          "ok_hand": "\u{1F44C}",
          "ok_man": "\u{1F646}&zwj;\u2642\uFE0F",
          "ok_woman": "\u{1F646}",
          "old_key": "\u{1F5DD}",
          "older_man": "\u{1F474}",
          "older_woman": "\u{1F475}",
          "om": "\u{1F549}",
          "on": "\u{1F51B}",
          "oncoming_automobile": "\u{1F698}",
          "oncoming_bus": "\u{1F68D}",
          "oncoming_police_car": "\u{1F694}",
          "oncoming_taxi": "\u{1F696}",
          "open_file_folder": "\u{1F4C2}",
          "open_hands": "\u{1F450}",
          "open_mouth": "\u{1F62E}",
          "open_umbrella": "\u2602\uFE0F",
          "ophiuchus": "\u26CE",
          "orange_book": "\u{1F4D9}",
          "orthodox_cross": "\u2626\uFE0F",
          "outbox_tray": "\u{1F4E4}",
          "owl": "\u{1F989}",
          "ox": "\u{1F402}",
          "package": "\u{1F4E6}",
          "page_facing_up": "\u{1F4C4}",
          "page_with_curl": "\u{1F4C3}",
          "pager": "\u{1F4DF}",
          "paintbrush": "\u{1F58C}",
          "palm_tree": "\u{1F334}",
          "pancakes": "\u{1F95E}",
          "panda_face": "\u{1F43C}",
          "paperclip": "\u{1F4CE}",
          "paperclips": "\u{1F587}",
          "parasol_on_ground": "\u26F1",
          "parking": "\u{1F17F}\uFE0F",
          "part_alternation_mark": "\u303D\uFE0F",
          "partly_sunny": "\u26C5\uFE0F",
          "passenger_ship": "\u{1F6F3}",
          "passport_control": "\u{1F6C2}",
          "pause_button": "\u23F8",
          "peace_symbol": "\u262E\uFE0F",
          "peach": "\u{1F351}",
          "peanuts": "\u{1F95C}",
          "pear": "\u{1F350}",
          "pen": "\u{1F58A}",
          "pencil2": "\u270F\uFE0F",
          "penguin": "\u{1F427}",
          "pensive": "\u{1F614}",
          "performing_arts": "\u{1F3AD}",
          "persevere": "\u{1F623}",
          "person_fencing": "\u{1F93A}",
          "pouting_woman": "\u{1F64E}",
          "phone": "\u260E\uFE0F",
          "pick": "\u26CF",
          "pig": "\u{1F437}",
          "pig2": "\u{1F416}",
          "pig_nose": "\u{1F43D}",
          "pill": "\u{1F48A}",
          "pineapple": "\u{1F34D}",
          "ping_pong": "\u{1F3D3}",
          "pisces": "\u2653\uFE0F",
          "pizza": "\u{1F355}",
          "place_of_worship": "\u{1F6D0}",
          "plate_with_cutlery": "\u{1F37D}",
          "play_or_pause_button": "\u23EF",
          "point_down": "\u{1F447}",
          "point_left": "\u{1F448}",
          "point_right": "\u{1F449}",
          "point_up": "\u261D\uFE0F",
          "point_up_2": "\u{1F446}",
          "police_car": "\u{1F693}",
          "policewoman": "\u{1F46E}&zwj;\u2640\uFE0F",
          "poodle": "\u{1F429}",
          "popcorn": "\u{1F37F}",
          "post_office": "\u{1F3E3}",
          "postal_horn": "\u{1F4EF}",
          "postbox": "\u{1F4EE}",
          "potable_water": "\u{1F6B0}",
          "potato": "\u{1F954}",
          "pouch": "\u{1F45D}",
          "poultry_leg": "\u{1F357}",
          "pound": "\u{1F4B7}",
          "rage": "\u{1F621}",
          "pouting_cat": "\u{1F63E}",
          "pouting_man": "\u{1F64E}&zwj;\u2642\uFE0F",
          "pray": "\u{1F64F}",
          "prayer_beads": "\u{1F4FF}",
          "pregnant_woman": "\u{1F930}",
          "previous_track_button": "\u23EE",
          "prince": "\u{1F934}",
          "princess": "\u{1F478}",
          "printer": "\u{1F5A8}",
          "purple_heart": "\u{1F49C}",
          "purse": "\u{1F45B}",
          "pushpin": "\u{1F4CC}",
          "put_litter_in_its_place": "\u{1F6AE}",
          "question": "\u2753",
          "rabbit": "\u{1F430}",
          "rabbit2": "\u{1F407}",
          "racehorse": "\u{1F40E}",
          "racing_car": "\u{1F3CE}",
          "radio": "\u{1F4FB}",
          "radio_button": "\u{1F518}",
          "radioactive": "\u2622\uFE0F",
          "railway_car": "\u{1F683}",
          "railway_track": "\u{1F6E4}",
          "rainbow": "\u{1F308}",
          "rainbow_flag": "\u{1F3F3}\uFE0F&zwj;\u{1F308}",
          "raised_back_of_hand": "\u{1F91A}",
          "raised_hand_with_fingers_splayed": "\u{1F590}",
          "raised_hands": "\u{1F64C}",
          "raising_hand_woman": "\u{1F64B}",
          "raising_hand_man": "\u{1F64B}&zwj;\u2642\uFE0F",
          "ram": "\u{1F40F}",
          "ramen": "\u{1F35C}",
          "rat": "\u{1F400}",
          "record_button": "\u23FA",
          "recycle": "\u267B\uFE0F",
          "red_circle": "\u{1F534}",
          "registered": "\xAE\uFE0F",
          "relaxed": "\u263A\uFE0F",
          "relieved": "\u{1F60C}",
          "reminder_ribbon": "\u{1F397}",
          "repeat": "\u{1F501}",
          "repeat_one": "\u{1F502}",
          "rescue_worker_helmet": "\u26D1",
          "restroom": "\u{1F6BB}",
          "revolving_hearts": "\u{1F49E}",
          "rewind": "\u23EA",
          "rhinoceros": "\u{1F98F}",
          "ribbon": "\u{1F380}",
          "rice": "\u{1F35A}",
          "rice_ball": "\u{1F359}",
          "rice_cracker": "\u{1F358}",
          "rice_scene": "\u{1F391}",
          "right_anger_bubble": "\u{1F5EF}",
          "ring": "\u{1F48D}",
          "robot": "\u{1F916}",
          "rocket": "\u{1F680}",
          "rofl": "\u{1F923}",
          "roll_eyes": "\u{1F644}",
          "roller_coaster": "\u{1F3A2}",
          "rooster": "\u{1F413}",
          "rose": "\u{1F339}",
          "rosette": "\u{1F3F5}",
          "rotating_light": "\u{1F6A8}",
          "round_pushpin": "\u{1F4CD}",
          "rowing_man": "\u{1F6A3}",
          "rowing_woman": "\u{1F6A3}&zwj;\u2640\uFE0F",
          "rugby_football": "\u{1F3C9}",
          "running_man": "\u{1F3C3}",
          "running_shirt_with_sash": "\u{1F3BD}",
          "running_woman": "\u{1F3C3}&zwj;\u2640\uFE0F",
          "sa": "\u{1F202}\uFE0F",
          "sagittarius": "\u2650\uFE0F",
          "sake": "\u{1F376}",
          "sandal": "\u{1F461}",
          "santa": "\u{1F385}",
          "satellite": "\u{1F4E1}",
          "saxophone": "\u{1F3B7}",
          "school": "\u{1F3EB}",
          "school_satchel": "\u{1F392}",
          "scissors": "\u2702\uFE0F",
          "scorpion": "\u{1F982}",
          "scorpius": "\u264F\uFE0F",
          "scream": "\u{1F631}",
          "scream_cat": "\u{1F640}",
          "scroll": "\u{1F4DC}",
          "seat": "\u{1F4BA}",
          "secret": "\u3299\uFE0F",
          "see_no_evil": "\u{1F648}",
          "seedling": "\u{1F331}",
          "selfie": "\u{1F933}",
          "shallow_pan_of_food": "\u{1F958}",
          "shamrock": "\u2618\uFE0F",
          "shark": "\u{1F988}",
          "shaved_ice": "\u{1F367}",
          "sheep": "\u{1F411}",
          "shell": "\u{1F41A}",
          "shield": "\u{1F6E1}",
          "shinto_shrine": "\u26E9",
          "ship": "\u{1F6A2}",
          "shirt": "\u{1F455}",
          "shopping": "\u{1F6CD}",
          "shopping_cart": "\u{1F6D2}",
          "shower": "\u{1F6BF}",
          "shrimp": "\u{1F990}",
          "signal_strength": "\u{1F4F6}",
          "six_pointed_star": "\u{1F52F}",
          "ski": "\u{1F3BF}",
          "skier": "\u26F7",
          "skull": "\u{1F480}",
          "skull_and_crossbones": "\u2620\uFE0F",
          "sleeping": "\u{1F634}",
          "sleeping_bed": "\u{1F6CC}",
          "sleepy": "\u{1F62A}",
          "slightly_frowning_face": "\u{1F641}",
          "slightly_smiling_face": "\u{1F642}",
          "slot_machine": "\u{1F3B0}",
          "small_airplane": "\u{1F6E9}",
          "small_blue_diamond": "\u{1F539}",
          "small_orange_diamond": "\u{1F538}",
          "small_red_triangle": "\u{1F53A}",
          "small_red_triangle_down": "\u{1F53B}",
          "smile": "\u{1F604}",
          "smile_cat": "\u{1F638}",
          "smiley": "\u{1F603}",
          "smiley_cat": "\u{1F63A}",
          "smiling_imp": "\u{1F608}",
          "smirk": "\u{1F60F}",
          "smirk_cat": "\u{1F63C}",
          "smoking": "\u{1F6AC}",
          "snail": "\u{1F40C}",
          "snake": "\u{1F40D}",
          "sneezing_face": "\u{1F927}",
          "snowboarder": "\u{1F3C2}",
          "snowflake": "\u2744\uFE0F",
          "snowman": "\u26C4\uFE0F",
          "snowman_with_snow": "\u2603\uFE0F",
          "sob": "\u{1F62D}",
          "soccer": "\u26BD\uFE0F",
          "soon": "\u{1F51C}",
          "sos": "\u{1F198}",
          "sound": "\u{1F509}",
          "space_invader": "\u{1F47E}",
          "spades": "\u2660\uFE0F",
          "spaghetti": "\u{1F35D}",
          "sparkle": "\u2747\uFE0F",
          "sparkler": "\u{1F387}",
          "sparkles": "\u2728",
          "sparkling_heart": "\u{1F496}",
          "speak_no_evil": "\u{1F64A}",
          "speaker": "\u{1F508}",
          "speaking_head": "\u{1F5E3}",
          "speech_balloon": "\u{1F4AC}",
          "speedboat": "\u{1F6A4}",
          "spider": "\u{1F577}",
          "spider_web": "\u{1F578}",
          "spiral_calendar": "\u{1F5D3}",
          "spiral_notepad": "\u{1F5D2}",
          "spoon": "\u{1F944}",
          "squid": "\u{1F991}",
          "stadium": "\u{1F3DF}",
          "star": "\u2B50\uFE0F",
          "star2": "\u{1F31F}",
          "star_and_crescent": "\u262A\uFE0F",
          "star_of_david": "\u2721\uFE0F",
          "stars": "\u{1F320}",
          "station": "\u{1F689}",
          "statue_of_liberty": "\u{1F5FD}",
          "steam_locomotive": "\u{1F682}",
          "stew": "\u{1F372}",
          "stop_button": "\u23F9",
          "stop_sign": "\u{1F6D1}",
          "stopwatch": "\u23F1",
          "straight_ruler": "\u{1F4CF}",
          "strawberry": "\u{1F353}",
          "stuck_out_tongue": "\u{1F61B}",
          "stuck_out_tongue_closed_eyes": "\u{1F61D}",
          "stuck_out_tongue_winking_eye": "\u{1F61C}",
          "studio_microphone": "\u{1F399}",
          "stuffed_flatbread": "\u{1F959}",
          "sun_behind_large_cloud": "\u{1F325}",
          "sun_behind_rain_cloud": "\u{1F326}",
          "sun_behind_small_cloud": "\u{1F324}",
          "sun_with_face": "\u{1F31E}",
          "sunflower": "\u{1F33B}",
          "sunglasses": "\u{1F60E}",
          "sunny": "\u2600\uFE0F",
          "sunrise": "\u{1F305}",
          "sunrise_over_mountains": "\u{1F304}",
          "surfing_man": "\u{1F3C4}",
          "surfing_woman": "\u{1F3C4}&zwj;\u2640\uFE0F",
          "sushi": "\u{1F363}",
          "suspension_railway": "\u{1F69F}",
          "sweat": "\u{1F613}",
          "sweat_drops": "\u{1F4A6}",
          "sweat_smile": "\u{1F605}",
          "sweet_potato": "\u{1F360}",
          "swimming_man": "\u{1F3CA}",
          "swimming_woman": "\u{1F3CA}&zwj;\u2640\uFE0F",
          "symbols": "\u{1F523}",
          "synagogue": "\u{1F54D}",
          "syringe": "\u{1F489}",
          "taco": "\u{1F32E}",
          "tada": "\u{1F389}",
          "tanabata_tree": "\u{1F38B}",
          "taurus": "\u2649\uFE0F",
          "taxi": "\u{1F695}",
          "tea": "\u{1F375}",
          "telephone_receiver": "\u{1F4DE}",
          "telescope": "\u{1F52D}",
          "tennis": "\u{1F3BE}",
          "tent": "\u26FA\uFE0F",
          "thermometer": "\u{1F321}",
          "thinking": "\u{1F914}",
          "thought_balloon": "\u{1F4AD}",
          "ticket": "\u{1F3AB}",
          "tickets": "\u{1F39F}",
          "tiger": "\u{1F42F}",
          "tiger2": "\u{1F405}",
          "timer_clock": "\u23F2",
          "tipping_hand_man": "\u{1F481}&zwj;\u2642\uFE0F",
          "tired_face": "\u{1F62B}",
          "tm": "\u2122\uFE0F",
          "toilet": "\u{1F6BD}",
          "tokyo_tower": "\u{1F5FC}",
          "tomato": "\u{1F345}",
          "tongue": "\u{1F445}",
          "top": "\u{1F51D}",
          "tophat": "\u{1F3A9}",
          "tornado": "\u{1F32A}",
          "trackball": "\u{1F5B2}",
          "tractor": "\u{1F69C}",
          "traffic_light": "\u{1F6A5}",
          "train": "\u{1F68B}",
          "train2": "\u{1F686}",
          "tram": "\u{1F68A}",
          "triangular_flag_on_post": "\u{1F6A9}",
          "triangular_ruler": "\u{1F4D0}",
          "trident": "\u{1F531}",
          "triumph": "\u{1F624}",
          "trolleybus": "\u{1F68E}",
          "trophy": "\u{1F3C6}",
          "tropical_drink": "\u{1F379}",
          "tropical_fish": "\u{1F420}",
          "truck": "\u{1F69A}",
          "trumpet": "\u{1F3BA}",
          "tulip": "\u{1F337}",
          "tumbler_glass": "\u{1F943}",
          "turkey": "\u{1F983}",
          "turtle": "\u{1F422}",
          "tv": "\u{1F4FA}",
          "twisted_rightwards_arrows": "\u{1F500}",
          "two_hearts": "\u{1F495}",
          "two_men_holding_hands": "\u{1F46C}",
          "two_women_holding_hands": "\u{1F46D}",
          "u5272": "\u{1F239}",
          "u5408": "\u{1F234}",
          "u55b6": "\u{1F23A}",
          "u6307": "\u{1F22F}\uFE0F",
          "u6708": "\u{1F237}\uFE0F",
          "u6709": "\u{1F236}",
          "u6e80": "\u{1F235}",
          "u7121": "\u{1F21A}\uFE0F",
          "u7533": "\u{1F238}",
          "u7981": "\u{1F232}",
          "u7a7a": "\u{1F233}",
          "umbrella": "\u2614\uFE0F",
          "unamused": "\u{1F612}",
          "underage": "\u{1F51E}",
          "unicorn": "\u{1F984}",
          "unlock": "\u{1F513}",
          "up": "\u{1F199}",
          "upside_down_face": "\u{1F643}",
          "v": "\u270C\uFE0F",
          "vertical_traffic_light": "\u{1F6A6}",
          "vhs": "\u{1F4FC}",
          "vibration_mode": "\u{1F4F3}",
          "video_camera": "\u{1F4F9}",
          "video_game": "\u{1F3AE}",
          "violin": "\u{1F3BB}",
          "virgo": "\u264D\uFE0F",
          "volcano": "\u{1F30B}",
          "volleyball": "\u{1F3D0}",
          "vs": "\u{1F19A}",
          "vulcan_salute": "\u{1F596}",
          "walking_man": "\u{1F6B6}",
          "walking_woman": "\u{1F6B6}&zwj;\u2640\uFE0F",
          "waning_crescent_moon": "\u{1F318}",
          "waning_gibbous_moon": "\u{1F316}",
          "warning": "\u26A0\uFE0F",
          "wastebasket": "\u{1F5D1}",
          "watch": "\u231A\uFE0F",
          "water_buffalo": "\u{1F403}",
          "watermelon": "\u{1F349}",
          "wave": "\u{1F44B}",
          "wavy_dash": "\u3030\uFE0F",
          "waxing_crescent_moon": "\u{1F312}",
          "wc": "\u{1F6BE}",
          "weary": "\u{1F629}",
          "wedding": "\u{1F492}",
          "weight_lifting_man": "\u{1F3CB}\uFE0F",
          "weight_lifting_woman": "\u{1F3CB}\uFE0F&zwj;\u2640\uFE0F",
          "whale": "\u{1F433}",
          "whale2": "\u{1F40B}",
          "wheel_of_dharma": "\u2638\uFE0F",
          "wheelchair": "\u267F\uFE0F",
          "white_check_mark": "\u2705",
          "white_circle": "\u26AA\uFE0F",
          "white_flag": "\u{1F3F3}\uFE0F",
          "white_flower": "\u{1F4AE}",
          "white_large_square": "\u2B1C\uFE0F",
          "white_medium_small_square": "\u25FD\uFE0F",
          "white_medium_square": "\u25FB\uFE0F",
          "white_small_square": "\u25AB\uFE0F",
          "white_square_button": "\u{1F533}",
          "wilted_flower": "\u{1F940}",
          "wind_chime": "\u{1F390}",
          "wind_face": "\u{1F32C}",
          "wine_glass": "\u{1F377}",
          "wink": "\u{1F609}",
          "wolf": "\u{1F43A}",
          "woman": "\u{1F469}",
          "woman_artist": "\u{1F469}&zwj;\u{1F3A8}",
          "woman_astronaut": "\u{1F469}&zwj;\u{1F680}",
          "woman_cartwheeling": "\u{1F938}&zwj;\u2640\uFE0F",
          "woman_cook": "\u{1F469}&zwj;\u{1F373}",
          "woman_facepalming": "\u{1F926}&zwj;\u2640\uFE0F",
          "woman_factory_worker": "\u{1F469}&zwj;\u{1F3ED}",
          "woman_farmer": "\u{1F469}&zwj;\u{1F33E}",
          "woman_firefighter": "\u{1F469}&zwj;\u{1F692}",
          "woman_health_worker": "\u{1F469}&zwj;\u2695\uFE0F",
          "woman_judge": "\u{1F469}&zwj;\u2696\uFE0F",
          "woman_juggling": "\u{1F939}&zwj;\u2640\uFE0F",
          "woman_mechanic": "\u{1F469}&zwj;\u{1F527}",
          "woman_office_worker": "\u{1F469}&zwj;\u{1F4BC}",
          "woman_pilot": "\u{1F469}&zwj;\u2708\uFE0F",
          "woman_playing_handball": "\u{1F93E}&zwj;\u2640\uFE0F",
          "woman_playing_water_polo": "\u{1F93D}&zwj;\u2640\uFE0F",
          "woman_scientist": "\u{1F469}&zwj;\u{1F52C}",
          "woman_shrugging": "\u{1F937}&zwj;\u2640\uFE0F",
          "woman_singer": "\u{1F469}&zwj;\u{1F3A4}",
          "woman_student": "\u{1F469}&zwj;\u{1F393}",
          "woman_teacher": "\u{1F469}&zwj;\u{1F3EB}",
          "woman_technologist": "\u{1F469}&zwj;\u{1F4BB}",
          "woman_with_turban": "\u{1F473}&zwj;\u2640\uFE0F",
          "womans_clothes": "\u{1F45A}",
          "womans_hat": "\u{1F452}",
          "women_wrestling": "\u{1F93C}&zwj;\u2640\uFE0F",
          "womens": "\u{1F6BA}",
          "world_map": "\u{1F5FA}",
          "worried": "\u{1F61F}",
          "wrench": "\u{1F527}",
          "writing_hand": "\u270D\uFE0F",
          "x": "\u274C",
          "yellow_heart": "\u{1F49B}",
          "yen": "\u{1F4B4}",
          "yin_yang": "\u262F\uFE0F",
          "yum": "\u{1F60B}",
          "zap": "\u26A1\uFE0F",
          "zipper_mouth_face": "\u{1F910}",
          "zzz": "\u{1F4A4}",
          /* special emojis :P */
          "octocat": '<img alt=":octocat:" height="20" width="20" align="absmiddle" src="https://assets-cdn.github.com/images/icons/emoji/octocat.png">',
          "showdown": `<span style="font-family: 'Anonymous Pro', monospace; text-decoration: underline; text-decoration-style: dashed; text-decoration-color: #3e8b8a;text-underline-position: under;">S</span>`
        };
        showdown2.Converter = function(converterOptions) {
          "use strict";
          var options = {}, langExtensions = [], outputModifiers = [], listeners = {}, setConvFlavor = setFlavor, metadata = {
            parsed: {},
            raw: "",
            format: ""
          };
          _constructor();
          function _constructor() {
            converterOptions = converterOptions || {};
            for (var gOpt in globalOptions) {
              if (globalOptions.hasOwnProperty(gOpt)) {
                options[gOpt] = globalOptions[gOpt];
              }
            }
            if (typeof converterOptions === "object") {
              for (var opt in converterOptions) {
                if (converterOptions.hasOwnProperty(opt)) {
                  options[opt] = converterOptions[opt];
                }
              }
            } else {
              throw Error("Converter expects the passed parameter to be an object, but " + typeof converterOptions + " was passed instead.");
            }
            if (options.extensions) {
              showdown2.helper.forEach(options.extensions, _parseExtension);
            }
          }
          function _parseExtension(ext, name) {
            name = name || null;
            if (showdown2.helper.isString(ext)) {
              ext = showdown2.helper.stdExtName(ext);
              name = ext;
              if (showdown2.extensions[ext]) {
                console.warn("DEPRECATION WARNING: " + ext + " is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!");
                legacyExtensionLoading(showdown2.extensions[ext], ext);
                return;
              } else if (!showdown2.helper.isUndefined(extensions[ext])) {
                ext = extensions[ext];
              } else {
                throw Error('Extension "' + ext + '" could not be loaded. It was either not found or is not a valid extension.');
              }
            }
            if (typeof ext === "function") {
              ext = ext();
            }
            if (!showdown2.helper.isArray(ext)) {
              ext = [ext];
            }
            var validExt = validate(ext, name);
            if (!validExt.valid) {
              throw Error(validExt.error);
            }
            for (var i2 = 0; i2 < ext.length; ++i2) {
              switch (ext[i2].type) {
                case "lang":
                  langExtensions.push(ext[i2]);
                  break;
                case "output":
                  outputModifiers.push(ext[i2]);
                  break;
              }
              if (ext[i2].hasOwnProperty("listeners")) {
                for (var ln in ext[i2].listeners) {
                  if (ext[i2].listeners.hasOwnProperty(ln)) {
                    listen(ln, ext[i2].listeners[ln]);
                  }
                }
              }
            }
          }
          function legacyExtensionLoading(ext, name) {
            if (typeof ext === "function") {
              ext = ext(new showdown2.Converter());
            }
            if (!showdown2.helper.isArray(ext)) {
              ext = [ext];
            }
            var valid = validate(ext, name);
            if (!valid.valid) {
              throw Error(valid.error);
            }
            for (var i2 = 0; i2 < ext.length; ++i2) {
              switch (ext[i2].type) {
                case "lang":
                  langExtensions.push(ext[i2]);
                  break;
                case "output":
                  outputModifiers.push(ext[i2]);
                  break;
                default:
                  throw Error("Extension loader error: Type unrecognized!!!");
              }
            }
          }
          function listen(name, callback) {
            if (!showdown2.helper.isString(name)) {
              throw Error("Invalid argument in converter.listen() method: name must be a string, but " + typeof name + " given");
            }
            if (typeof callback !== "function") {
              throw Error("Invalid argument in converter.listen() method: callback must be a function, but " + typeof callback + " given");
            }
            if (!listeners.hasOwnProperty(name)) {
              listeners[name] = [];
            }
            listeners[name].push(callback);
          }
          function rTrimInputText(text2) {
            var rsp = text2.match(/^\s*/)[0].length, rgx = new RegExp("^\\s{0," + rsp + "}", "gm");
            return text2.replace(rgx, "");
          }
          this._dispatch = function dispatch3(evtName, text2, options2, globals) {
            if (listeners.hasOwnProperty(evtName)) {
              for (var ei = 0; ei < listeners[evtName].length; ++ei) {
                var nText = listeners[evtName][ei](evtName, text2, this, options2, globals);
                if (nText && typeof nText !== "undefined") {
                  text2 = nText;
                }
              }
            }
            return text2;
          };
          this.listen = function(name, callback) {
            listen(name, callback);
            return this;
          };
          this.makeHtml = function(text2) {
            if (!text2) {
              return text2;
            }
            var globals = {
              gHtmlBlocks: [],
              gHtmlMdBlocks: [],
              gHtmlSpans: [],
              gUrls: {},
              gTitles: {},
              gDimensions: {},
              gListLevel: 0,
              hashLinkCounts: {},
              langExtensions,
              outputModifiers,
              converter: this,
              ghCodeBlocks: [],
              metadata: {
                parsed: {},
                raw: "",
                format: ""
              }
            };
            text2 = text2.replace(/Â¨/g, "\xA8T");
            text2 = text2.replace(/\$/g, "\xA8D");
            text2 = text2.replace(/\r\n/g, "\n");
            text2 = text2.replace(/\r/g, "\n");
            text2 = text2.replace(/\u00A0/g, "&nbsp;");
            if (options.smartIndentationFix) {
              text2 = rTrimInputText(text2);
            }
            text2 = "\n\n" + text2 + "\n\n";
            text2 = showdown2.subParser("detab")(text2, options, globals);
            text2 = text2.replace(/^[ \t]+$/mg, "");
            showdown2.helper.forEach(langExtensions, function(ext) {
              text2 = showdown2.subParser("runExtension")(ext, text2, options, globals);
            });
            text2 = showdown2.subParser("metadata")(text2, options, globals);
            text2 = showdown2.subParser("hashPreCodeTags")(text2, options, globals);
            text2 = showdown2.subParser("githubCodeBlocks")(text2, options, globals);
            text2 = showdown2.subParser("hashHTMLBlocks")(text2, options, globals);
            text2 = showdown2.subParser("hashCodeTags")(text2, options, globals);
            text2 = showdown2.subParser("stripLinkDefinitions")(text2, options, globals);
            text2 = showdown2.subParser("blockGamut")(text2, options, globals);
            text2 = showdown2.subParser("unhashHTMLSpans")(text2, options, globals);
            text2 = showdown2.subParser("unescapeSpecialChars")(text2, options, globals);
            text2 = text2.replace(/Â¨D/g, "$$");
            text2 = text2.replace(/Â¨T/g, "\xA8");
            text2 = showdown2.subParser("completeHTMLDocument")(text2, options, globals);
            showdown2.helper.forEach(outputModifiers, function(ext) {
              text2 = showdown2.subParser("runExtension")(ext, text2, options, globals);
            });
            metadata = globals.metadata;
            return text2;
          };
          this.makeMarkdown = this.makeMd = function(src, HTMLParser) {
            src = src.replace(/\r\n/g, "\n");
            src = src.replace(/\r/g, "\n");
            src = src.replace(/>[ \t]+</, ">\xA8NBSP;<");
            if (!HTMLParser) {
              if (window && window.document) {
                HTMLParser = window.document;
              } else {
                throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");
              }
            }
            var doc = HTMLParser.createElement("div");
            doc.innerHTML = src;
            var globals = {
              preList: substitutePreCodeTags(doc)
            };
            clean(doc);
            var nodes = doc.childNodes, mdDoc = "";
            for (var i2 = 0; i2 < nodes.length; i2++) {
              mdDoc += showdown2.subParser("makeMarkdown.node")(nodes[i2], globals);
            }
            function clean(node) {
              for (var n2 = 0; n2 < node.childNodes.length; ++n2) {
                var child = node.childNodes[n2];
                if (child.nodeType === 3) {
                  if (!/\S/.test(child.nodeValue)) {
                    node.removeChild(child);
                    --n2;
                  } else {
                    child.nodeValue = child.nodeValue.split("\n").join(" ");
                    child.nodeValue = child.nodeValue.replace(/(\s)+/g, "$1");
                  }
                } else if (child.nodeType === 1) {
                  clean(child);
                }
              }
            }
            function substitutePreCodeTags(doc2) {
              var pres = doc2.querySelectorAll("pre"), presPH = [];
              for (var i3 = 0; i3 < pres.length; ++i3) {
                if (pres[i3].childElementCount === 1 && pres[i3].firstChild.tagName.toLowerCase() === "code") {
                  var content = pres[i3].firstChild.innerHTML.trim(), language = pres[i3].firstChild.getAttribute("data-language") || "";
                  if (language === "") {
                    var classes = pres[i3].firstChild.className.split(" ");
                    for (var c2 = 0; c2 < classes.length; ++c2) {
                      var matches = classes[c2].match(/^language-(.+)$/);
                      if (matches !== null) {
                        language = matches[1];
                        break;
                      }
                    }
                  }
                  content = showdown2.helper.unescapeHTMLEntities(content);
                  presPH.push(content);
                  pres[i3].outerHTML = '<precode language="' + language + '" precodenum="' + i3.toString() + '"></precode>';
                } else {
                  presPH.push(pres[i3].innerHTML);
                  pres[i3].innerHTML = "";
                  pres[i3].setAttribute("prenum", i3.toString());
                }
              }
              return presPH;
            }
            return mdDoc;
          };
          this.setOption = function(key, value) {
            options[key] = value;
          };
          this.getOption = function(key) {
            return options[key];
          };
          this.getOptions = function() {
            return options;
          };
          this.addExtension = function(extension, name) {
            name = name || null;
            _parseExtension(extension, name);
          };
          this.useExtension = function(extensionName) {
            _parseExtension(extensionName);
          };
          this.setFlavor = function(name) {
            if (!flavor.hasOwnProperty(name)) {
              throw Error(name + " flavor was not found");
            }
            var preset = flavor[name];
            setConvFlavor = name;
            for (var option in preset) {
              if (preset.hasOwnProperty(option)) {
                options[option] = preset[option];
              }
            }
          };
          this.getFlavor = function() {
            return setConvFlavor;
          };
          this.removeExtension = function(extension) {
            if (!showdown2.helper.isArray(extension)) {
              extension = [extension];
            }
            for (var a2 = 0; a2 < extension.length; ++a2) {
              var ext = extension[a2];
              for (var i2 = 0; i2 < langExtensions.length; ++i2) {
                if (langExtensions[i2] === ext) {
                  langExtensions[i2].splice(i2, 1);
                }
              }
              for (var ii = 0; ii < outputModifiers.length; ++i2) {
                if (outputModifiers[ii] === ext) {
                  outputModifiers[ii].splice(i2, 1);
                }
              }
            }
          };
          this.getAllExtensions = function() {
            return {
              language: langExtensions,
              output: outputModifiers
            };
          };
          this.getMetadata = function(raw) {
            if (raw) {
              return metadata.raw;
            } else {
              return metadata.parsed;
            }
          };
          this.getMetadataFormat = function() {
            return metadata.format;
          };
          this._setMetadataPair = function(key, value) {
            metadata.parsed[key] = value;
          };
          this._setMetadataFormat = function(format) {
            metadata.format = format;
          };
          this._setMetadataRaw = function(raw) {
            metadata.raw = raw;
          };
        };
        showdown2.subParser("anchors", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("anchors.before", text2, options, globals);
          var writeAnchorTag = function(wholeMatch, linkText, linkId, url, m5, m6, title) {
            if (showdown2.helper.isUndefined(title)) {
              title = "";
            }
            linkId = linkId.toLowerCase();
            if (wholeMatch.search(/\(<?\s*>? ?(['"].*['"])?\)$/m) > -1) {
              url = "";
            } else if (!url) {
              if (!linkId) {
                linkId = linkText.toLowerCase().replace(/ ?\n/g, " ");
              }
              url = "#" + linkId;
              if (!showdown2.helper.isUndefined(globals.gUrls[linkId])) {
                url = globals.gUrls[linkId];
                if (!showdown2.helper.isUndefined(globals.gTitles[linkId])) {
                  title = globals.gTitles[linkId];
                }
              } else {
                return wholeMatch;
              }
            }
            url = url.replace(showdown2.helper.regexes.asteriskDashAndColon, showdown2.helper.escapeCharactersCallback);
            var result = '<a href="' + url + '"';
            if (title !== "" && title !== null) {
              title = title.replace(/"/g, "&quot;");
              title = title.replace(showdown2.helper.regexes.asteriskDashAndColon, showdown2.helper.escapeCharactersCallback);
              result += ' title="' + title + '"';
            }
            if (options.openLinksInNewWindow && !/^#/.test(url)) {
              result += ' rel="noopener noreferrer" target="\xA8E95Eblank"';
            }
            result += ">" + linkText + "</a>";
            return result;
          };
          text2 = text2.replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g, writeAnchorTag);
          text2 = text2.replace(
            /\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,
            writeAnchorTag
          );
          text2 = text2.replace(
            /\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,
            writeAnchorTag
          );
          text2 = text2.replace(/\[([^\[\]]+)]()()()()()/g, writeAnchorTag);
          if (options.ghMentions) {
            text2 = text2.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gmi, function(wm, st, escape, mentions, username) {
              if (escape === "\\") {
                return st + mentions;
              }
              if (!showdown2.helper.isString(options.ghMentionsLink)) {
                throw new Error("ghMentionsLink option must be a string");
              }
              var lnk = options.ghMentionsLink.replace(/\{u}/g, username), target = "";
              if (options.openLinksInNewWindow) {
                target = ' rel="noopener noreferrer" target="\xA8E95Eblank"';
              }
              return st + '<a href="' + lnk + '"' + target + ">" + mentions + "</a>";
            });
          }
          text2 = globals.converter._dispatch("anchors.after", text2, options, globals);
          return text2;
        });
        var simpleURLRegex = /([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi, simpleURLRegex2 = /([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi, delimUrlRegex = /()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi, simpleMailRegex = /(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi, delimMailRegex = /<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi, replaceLink = function(options) {
          "use strict";
          return function(wm, leadingMagicChars, link, m2, m3, trailingPunctuation, trailingMagicChars) {
            link = link.replace(showdown2.helper.regexes.asteriskDashAndColon, showdown2.helper.escapeCharactersCallback);
            var lnkTxt = link, append = "", target = "", lmc = leadingMagicChars || "", tmc = trailingMagicChars || "";
            if (/^www\./i.test(link)) {
              link = link.replace(/^www\./i, "http://www.");
            }
            if (options.excludeTrailingPunctuationFromURLs && trailingPunctuation) {
              append = trailingPunctuation;
            }
            if (options.openLinksInNewWindow) {
              target = ' rel="noopener noreferrer" target="\xA8E95Eblank"';
            }
            return lmc + '<a href="' + link + '"' + target + ">" + lnkTxt + "</a>" + append + tmc;
          };
        }, replaceMail = function(options, globals) {
          "use strict";
          return function(wholeMatch, b2, mail) {
            var href = "mailto:";
            b2 = b2 || "";
            mail = showdown2.subParser("unescapeSpecialChars")(mail, options, globals);
            if (options.encodeEmails) {
              href = showdown2.helper.encodeEmailAddress(href + mail);
              mail = showdown2.helper.encodeEmailAddress(mail);
            } else {
              href = href + mail;
            }
            return b2 + '<a href="' + href + '">' + mail + "</a>";
          };
        };
        showdown2.subParser("autoLinks", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("autoLinks.before", text2, options, globals);
          text2 = text2.replace(delimUrlRegex, replaceLink(options));
          text2 = text2.replace(delimMailRegex, replaceMail(options, globals));
          text2 = globals.converter._dispatch("autoLinks.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("simplifiedAutoLinks", function(text2, options, globals) {
          "use strict";
          if (!options.simplifiedAutoLink) {
            return text2;
          }
          text2 = globals.converter._dispatch("simplifiedAutoLinks.before", text2, options, globals);
          if (options.excludeTrailingPunctuationFromURLs) {
            text2 = text2.replace(simpleURLRegex2, replaceLink(options));
          } else {
            text2 = text2.replace(simpleURLRegex, replaceLink(options));
          }
          text2 = text2.replace(simpleMailRegex, replaceMail(options, globals));
          text2 = globals.converter._dispatch("simplifiedAutoLinks.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("blockGamut", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("blockGamut.before", text2, options, globals);
          text2 = showdown2.subParser("blockQuotes")(text2, options, globals);
          text2 = showdown2.subParser("headers")(text2, options, globals);
          text2 = showdown2.subParser("horizontalRule")(text2, options, globals);
          text2 = showdown2.subParser("lists")(text2, options, globals);
          text2 = showdown2.subParser("codeBlocks")(text2, options, globals);
          text2 = showdown2.subParser("tables")(text2, options, globals);
          text2 = showdown2.subParser("hashHTMLBlocks")(text2, options, globals);
          text2 = showdown2.subParser("paragraphs")(text2, options, globals);
          text2 = globals.converter._dispatch("blockGamut.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("blockQuotes", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("blockQuotes.before", text2, options, globals);
          text2 = text2 + "\n\n";
          var rgx = /(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;
          if (options.splitAdjacentBlockquotes) {
            rgx = /^ {0,3}>[\s\S]*?(?:\n\n)/gm;
          }
          text2 = text2.replace(rgx, function(bq) {
            bq = bq.replace(/^[ \t]*>[ \t]?/gm, "");
            bq = bq.replace(/Â¨0/g, "");
            bq = bq.replace(/^[ \t]+$/gm, "");
            bq = showdown2.subParser("githubCodeBlocks")(bq, options, globals);
            bq = showdown2.subParser("blockGamut")(bq, options, globals);
            bq = bq.replace(/(^|\n)/g, "$1  ");
            bq = bq.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm, function(wholeMatch, m1) {
              var pre = m1;
              pre = pre.replace(/^  /mg, "\xA80");
              pre = pre.replace(/Â¨0/g, "");
              return pre;
            });
            return showdown2.subParser("hashBlock")("<blockquote>\n" + bq + "\n</blockquote>", options, globals);
          });
          text2 = globals.converter._dispatch("blockQuotes.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("codeBlocks", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("codeBlocks.before", text2, options, globals);
          text2 += "\xA80";
          var pattern = /(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=Â¨0))/g;
          text2 = text2.replace(pattern, function(wholeMatch, m1, m2) {
            var codeblock = m1, nextChar = m2, end = "\n";
            codeblock = showdown2.subParser("outdent")(codeblock, options, globals);
            codeblock = showdown2.subParser("encodeCode")(codeblock, options, globals);
            codeblock = showdown2.subParser("detab")(codeblock, options, globals);
            codeblock = codeblock.replace(/^\n+/g, "");
            codeblock = codeblock.replace(/\n+$/g, "");
            if (options.omitExtraWLInCodeBlocks) {
              end = "";
            }
            codeblock = "<pre><code>" + codeblock + end + "</code></pre>";
            return showdown2.subParser("hashBlock")(codeblock, options, globals) + nextChar;
          });
          text2 = text2.replace(/Â¨0/, "");
          text2 = globals.converter._dispatch("codeBlocks.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("codeSpans", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("codeSpans.before", text2, options, globals);
          if (typeof text2 === "undefined") {
            text2 = "";
          }
          text2 = text2.replace(
            /(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,
            function(wholeMatch, m1, m2, m3) {
              var c2 = m3;
              c2 = c2.replace(/^([ \t]*)/g, "");
              c2 = c2.replace(/[ \t]*$/g, "");
              c2 = showdown2.subParser("encodeCode")(c2, options, globals);
              c2 = m1 + "<code>" + c2 + "</code>";
              c2 = showdown2.subParser("hashHTMLSpans")(c2, options, globals);
              return c2;
            }
          );
          text2 = globals.converter._dispatch("codeSpans.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("completeHTMLDocument", function(text2, options, globals) {
          "use strict";
          if (!options.completeHTMLDocument) {
            return text2;
          }
          text2 = globals.converter._dispatch("completeHTMLDocument.before", text2, options, globals);
          var doctype = "html", doctypeParsed = "<!DOCTYPE HTML>\n", title = "", charset = '<meta charset="utf-8">\n', lang = "", metadata = "";
          if (typeof globals.metadata.parsed.doctype !== "undefined") {
            doctypeParsed = "<!DOCTYPE " + globals.metadata.parsed.doctype + ">\n";
            doctype = globals.metadata.parsed.doctype.toString().toLowerCase();
            if (doctype === "html" || doctype === "html5") {
              charset = '<meta charset="utf-8">';
            }
          }
          for (var meta in globals.metadata.parsed) {
            if (globals.metadata.parsed.hasOwnProperty(meta)) {
              switch (meta.toLowerCase()) {
                case "doctype":
                  break;
                case "title":
                  title = "<title>" + globals.metadata.parsed.title + "</title>\n";
                  break;
                case "charset":
                  if (doctype === "html" || doctype === "html5") {
                    charset = '<meta charset="' + globals.metadata.parsed.charset + '">\n';
                  } else {
                    charset = '<meta name="charset" content="' + globals.metadata.parsed.charset + '">\n';
                  }
                  break;
                case "language":
                case "lang":
                  lang = ' lang="' + globals.metadata.parsed[meta] + '"';
                  metadata += '<meta name="' + meta + '" content="' + globals.metadata.parsed[meta] + '">\n';
                  break;
                default:
                  metadata += '<meta name="' + meta + '" content="' + globals.metadata.parsed[meta] + '">\n';
              }
            }
          }
          text2 = doctypeParsed + "<html" + lang + ">\n<head>\n" + title + charset + metadata + "</head>\n<body>\n" + text2.trim() + "\n</body>\n</html>";
          text2 = globals.converter._dispatch("completeHTMLDocument.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("detab", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("detab.before", text2, options, globals);
          text2 = text2.replace(/\t(?=\t)/g, "    ");
          text2 = text2.replace(/\t/g, "\xA8A\xA8B");
          text2 = text2.replace(/Â¨B(.+?)Â¨A/g, function(wholeMatch, m1) {
            var leadingText = m1, numSpaces = 4 - leadingText.length % 4;
            for (var i2 = 0; i2 < numSpaces; i2++) {
              leadingText += " ";
            }
            return leadingText;
          });
          text2 = text2.replace(/Â¨A/g, "    ");
          text2 = text2.replace(/Â¨B/g, "");
          text2 = globals.converter._dispatch("detab.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("ellipsis", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("ellipsis.before", text2, options, globals);
          text2 = text2.replace(/\.\.\./g, "\u2026");
          text2 = globals.converter._dispatch("ellipsis.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("emoji", function(text2, options, globals) {
          "use strict";
          if (!options.emoji) {
            return text2;
          }
          text2 = globals.converter._dispatch("emoji.before", text2, options, globals);
          var emojiRgx = /:([\S]+?):/g;
          text2 = text2.replace(emojiRgx, function(wm, emojiCode) {
            if (showdown2.helper.emojis.hasOwnProperty(emojiCode)) {
              return showdown2.helper.emojis[emojiCode];
            }
            return wm;
          });
          text2 = globals.converter._dispatch("emoji.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("encodeAmpsAndAngles", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("encodeAmpsAndAngles.before", text2, options, globals);
          text2 = text2.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g, "&amp;");
          text2 = text2.replace(/<(?![a-z\/?$!])/gi, "&lt;");
          text2 = text2.replace(/</g, "&lt;");
          text2 = text2.replace(/>/g, "&gt;");
          text2 = globals.converter._dispatch("encodeAmpsAndAngles.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("encodeBackslashEscapes", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("encodeBackslashEscapes.before", text2, options, globals);
          text2 = text2.replace(/\\(\\)/g, showdown2.helper.escapeCharactersCallback);
          text2 = text2.replace(/\\([`*_{}\[\]()>#+.!~=|-])/g, showdown2.helper.escapeCharactersCallback);
          text2 = globals.converter._dispatch("encodeBackslashEscapes.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("encodeCode", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("encodeCode.before", text2, options, globals);
          text2 = text2.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/([*_{}\[\]\\=~-])/g, showdown2.helper.escapeCharactersCallback);
          text2 = globals.converter._dispatch("encodeCode.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("escapeSpecialCharsWithinTagAttributes", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before", text2, options, globals);
          var tags = /<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi, comments = /<!(--(?:(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;
          text2 = text2.replace(tags, function(wholeMatch) {
            return wholeMatch.replace(/(.)<\/?code>(?=.)/g, "$1`").replace(/([\\`*_~=|])/g, showdown2.helper.escapeCharactersCallback);
          });
          text2 = text2.replace(comments, function(wholeMatch) {
            return wholeMatch.replace(/([\\`*_~=|])/g, showdown2.helper.escapeCharactersCallback);
          });
          text2 = globals.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("githubCodeBlocks", function(text2, options, globals) {
          "use strict";
          if (!options.ghCodeBlocks) {
            return text2;
          }
          text2 = globals.converter._dispatch("githubCodeBlocks.before", text2, options, globals);
          text2 += "\xA80";
          text2 = text2.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g, function(wholeMatch, delim, language, codeblock) {
            var end = options.omitExtraWLInCodeBlocks ? "" : "\n";
            codeblock = showdown2.subParser("encodeCode")(codeblock, options, globals);
            codeblock = showdown2.subParser("detab")(codeblock, options, globals);
            codeblock = codeblock.replace(/^\n+/g, "");
            codeblock = codeblock.replace(/\n+$/g, "");
            codeblock = "<pre><code" + (language ? ' class="' + language + " language-" + language + '"' : "") + ">" + codeblock + end + "</code></pre>";
            codeblock = showdown2.subParser("hashBlock")(codeblock, options, globals);
            return "\n\n\xA8G" + (globals.ghCodeBlocks.push({ text: wholeMatch, codeblock }) - 1) + "G\n\n";
          });
          text2 = text2.replace(/Â¨0/, "");
          return globals.converter._dispatch("githubCodeBlocks.after", text2, options, globals);
        });
        showdown2.subParser("hashBlock", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("hashBlock.before", text2, options, globals);
          text2 = text2.replace(/(^\n+|\n+$)/g, "");
          text2 = "\n\n\xA8K" + (globals.gHtmlBlocks.push(text2) - 1) + "K\n\n";
          text2 = globals.converter._dispatch("hashBlock.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("hashCodeTags", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("hashCodeTags.before", text2, options, globals);
          var repFunc = function(wholeMatch, match, left, right) {
            var codeblock = left + showdown2.subParser("encodeCode")(match, options, globals) + right;
            return "\xA8C" + (globals.gHtmlSpans.push(codeblock) - 1) + "C";
          };
          text2 = showdown2.helper.replaceRecursiveRegExp(text2, repFunc, "<code\\b[^>]*>", "</code>", "gim");
          text2 = globals.converter._dispatch("hashCodeTags.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("hashElement", function(text2, options, globals) {
          "use strict";
          return function(wholeMatch, m1) {
            var blockText = m1;
            blockText = blockText.replace(/\n\n/g, "\n");
            blockText = blockText.replace(/^\n/, "");
            blockText = blockText.replace(/\n+$/g, "");
            blockText = "\n\n\xA8K" + (globals.gHtmlBlocks.push(blockText) - 1) + "K\n\n";
            return blockText;
          };
        });
        showdown2.subParser("hashHTMLBlocks", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("hashHTMLBlocks.before", text2, options, globals);
          var blockTags = [
            "pre",
            "div",
            "h1",
            "h2",
            "h3",
            "h4",
            "h5",
            "h6",
            "blockquote",
            "table",
            "dl",
            "ol",
            "ul",
            "script",
            "noscript",
            "form",
            "fieldset",
            "iframe",
            "math",
            "style",
            "section",
            "header",
            "footer",
            "nav",
            "article",
            "aside",
            "address",
            "audio",
            "canvas",
            "figure",
            "hgroup",
            "output",
            "video",
            "p"
          ], repFunc = function(wholeMatch, match, left, right) {
            var txt = wholeMatch;
            if (left.search(/\bmarkdown\b/) !== -1) {
              txt = left + globals.converter.makeHtml(match) + right;
            }
            return "\n\n\xA8K" + (globals.gHtmlBlocks.push(txt) - 1) + "K\n\n";
          };
          if (options.backslashEscapesHTMLTags) {
            text2 = text2.replace(/\\<(\/?[^>]+?)>/g, function(wm, inside) {
              return "&lt;" + inside + "&gt;";
            });
          }
          for (var i2 = 0; i2 < blockTags.length; ++i2) {
            var opTagPos, rgx1 = new RegExp("^ {0,3}(<" + blockTags[i2] + "\\b[^>]*>)", "im"), patLeft = "<" + blockTags[i2] + "\\b[^>]*>", patRight = "</" + blockTags[i2] + ">";
            while ((opTagPos = showdown2.helper.regexIndexOf(text2, rgx1)) !== -1) {
              var subTexts = showdown2.helper.splitAtIndex(text2, opTagPos), newSubText1 = showdown2.helper.replaceRecursiveRegExp(subTexts[1], repFunc, patLeft, patRight, "im");
              if (newSubText1 === subTexts[1]) {
                break;
              }
              text2 = subTexts[0].concat(newSubText1);
            }
          }
          text2 = text2.replace(
            /(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,
            showdown2.subParser("hashElement")(text2, options, globals)
          );
          text2 = showdown2.helper.replaceRecursiveRegExp(text2, function(txt) {
            return "\n\n\xA8K" + (globals.gHtmlBlocks.push(txt) - 1) + "K\n\n";
          }, "^ {0,3}<!--", "-->", "gm");
          text2 = text2.replace(
            /(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,
            showdown2.subParser("hashElement")(text2, options, globals)
          );
          text2 = globals.converter._dispatch("hashHTMLBlocks.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("hashHTMLSpans", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("hashHTMLSpans.before", text2, options, globals);
          function hashHTMLSpan(html2) {
            return "\xA8C" + (globals.gHtmlSpans.push(html2) - 1) + "C";
          }
          text2 = text2.replace(/<[^>]+?\/>/gi, function(wm) {
            return hashHTMLSpan(wm);
          });
          text2 = text2.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g, function(wm) {
            return hashHTMLSpan(wm);
          });
          text2 = text2.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g, function(wm) {
            return hashHTMLSpan(wm);
          });
          text2 = text2.replace(/<[^>]+?>/gi, function(wm) {
            return hashHTMLSpan(wm);
          });
          text2 = globals.converter._dispatch("hashHTMLSpans.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("unhashHTMLSpans", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("unhashHTMLSpans.before", text2, options, globals);
          for (var i2 = 0; i2 < globals.gHtmlSpans.length; ++i2) {
            var repText = globals.gHtmlSpans[i2], limit = 0;
            while (/Â¨C(\d+)C/.test(repText)) {
              var num = RegExp.$1;
              repText = repText.replace("\xA8C" + num + "C", globals.gHtmlSpans[num]);
              if (limit === 10) {
                console.error("maximum nesting of 10 spans reached!!!");
                break;
              }
              ++limit;
            }
            text2 = text2.replace("\xA8C" + i2 + "C", repText);
          }
          text2 = globals.converter._dispatch("unhashHTMLSpans.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("hashPreCodeTags", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("hashPreCodeTags.before", text2, options, globals);
          var repFunc = function(wholeMatch, match, left, right) {
            var codeblock = left + showdown2.subParser("encodeCode")(match, options, globals) + right;
            return "\n\n\xA8G" + (globals.ghCodeBlocks.push({ text: wholeMatch, codeblock }) - 1) + "G\n\n";
          };
          text2 = showdown2.helper.replaceRecursiveRegExp(text2, repFunc, "^ {0,3}<pre\\b[^>]*>\\s*<code\\b[^>]*>", "^ {0,3}</code>\\s*</pre>", "gim");
          text2 = globals.converter._dispatch("hashPreCodeTags.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("headers", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("headers.before", text2, options, globals);
          var headerLevelStart = isNaN(parseInt(options.headerLevelStart)) ? 1 : parseInt(options.headerLevelStart), setextRegexH1 = options.smoothLivePreview ? /^(.+)[ \t]*\n={2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n=+[ \t]*\n+/gm, setextRegexH2 = options.smoothLivePreview ? /^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n-+[ \t]*\n+/gm;
          text2 = text2.replace(setextRegexH1, function(wholeMatch, m1) {
            var spanGamut = showdown2.subParser("spanGamut")(m1, options, globals), hID = options.noHeaderId ? "" : ' id="' + headerId(m1) + '"', hLevel = headerLevelStart, hashBlock = "<h" + hLevel + hID + ">" + spanGamut + "</h" + hLevel + ">";
            return showdown2.subParser("hashBlock")(hashBlock, options, globals);
          });
          text2 = text2.replace(setextRegexH2, function(matchFound, m1) {
            var spanGamut = showdown2.subParser("spanGamut")(m1, options, globals), hID = options.noHeaderId ? "" : ' id="' + headerId(m1) + '"', hLevel = headerLevelStart + 1, hashBlock = "<h" + hLevel + hID + ">" + spanGamut + "</h" + hLevel + ">";
            return showdown2.subParser("hashBlock")(hashBlock, options, globals);
          });
          var atxStyle = options.requireSpaceBeforeHeadingText ? /^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm : /^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;
          text2 = text2.replace(atxStyle, function(wholeMatch, m1, m2) {
            var hText = m2;
            if (options.customizedHeaderId) {
              hText = m2.replace(/\s?\{([^{]+?)}\s*$/, "");
            }
            var span = showdown2.subParser("spanGamut")(hText, options, globals), hID = options.noHeaderId ? "" : ' id="' + headerId(m2) + '"', hLevel = headerLevelStart - 1 + m1.length, header = "<h" + hLevel + hID + ">" + span + "</h" + hLevel + ">";
            return showdown2.subParser("hashBlock")(header, options, globals);
          });
          function headerId(m2) {
            var title, prefix;
            if (options.customizedHeaderId) {
              var match = m2.match(/\{([^{]+?)}\s*$/);
              if (match && match[1]) {
                m2 = match[1];
              }
            }
            title = m2;
            if (showdown2.helper.isString(options.prefixHeaderId)) {
              prefix = options.prefixHeaderId;
            } else if (options.prefixHeaderId === true) {
              prefix = "section-";
            } else {
              prefix = "";
            }
            if (!options.rawPrefixHeaderId) {
              title = prefix + title;
            }
            if (options.ghCompatibleHeaderId) {
              title = title.replace(/ /g, "-").replace(/&amp;/g, "").replace(/Â¨T/g, "").replace(/Â¨D/g, "").replace(/[&+$,\/:;=?@"#{}|^Â¨~\[\]`\\*)(%.!'<>]/g, "").toLowerCase();
            } else if (options.rawHeaderId) {
              title = title.replace(/ /g, "-").replace(/&amp;/g, "&").replace(/Â¨T/g, "\xA8").replace(/Â¨D/g, "$").replace(/["']/g, "-").toLowerCase();
            } else {
              title = title.replace(/[^\w]/g, "").toLowerCase();
            }
            if (options.rawPrefixHeaderId) {
              title = prefix + title;
            }
            if (globals.hashLinkCounts[title]) {
              title = title + "-" + globals.hashLinkCounts[title]++;
            } else {
              globals.hashLinkCounts[title] = 1;
            }
            return title;
          }
          text2 = globals.converter._dispatch("headers.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("horizontalRule", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("horizontalRule.before", text2, options, globals);
          var key = showdown2.subParser("hashBlock")("<hr />", options, globals);
          text2 = text2.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm, key);
          text2 = text2.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm, key);
          text2 = text2.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm, key);
          text2 = globals.converter._dispatch("horizontalRule.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("images", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("images.before", text2, options, globals);
          var inlineRegExp = /!\[([^\]]*?)][ \t]*()\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g, crazyRegExp = /!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g, base64RegExp = /!\[([^\]]*?)][ \t]*()\([ \t]?<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g, referenceRegExp = /!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g, refShortcutRegExp = /!\[([^\[\]]+)]()()()()()/g;
          function writeImageTagBase64(wholeMatch, altText, linkId, url, width, height, m5, title) {
            url = url.replace(/\s/g, "");
            return writeImageTag(wholeMatch, altText, linkId, url, width, height, m5, title);
          }
          function writeImageTag(wholeMatch, altText, linkId, url, width, height, m5, title) {
            var gUrls = globals.gUrls, gTitles = globals.gTitles, gDims = globals.gDimensions;
            linkId = linkId.toLowerCase();
            if (!title) {
              title = "";
            }
            if (wholeMatch.search(/\(<?\s*>? ?(['"].*['"])?\)$/m) > -1) {
              url = "";
            } else if (url === "" || url === null) {
              if (linkId === "" || linkId === null) {
                linkId = altText.toLowerCase().replace(/ ?\n/g, " ");
              }
              url = "#" + linkId;
              if (!showdown2.helper.isUndefined(gUrls[linkId])) {
                url = gUrls[linkId];
                if (!showdown2.helper.isUndefined(gTitles[linkId])) {
                  title = gTitles[linkId];
                }
                if (!showdown2.helper.isUndefined(gDims[linkId])) {
                  width = gDims[linkId].width;
                  height = gDims[linkId].height;
                }
              } else {
                return wholeMatch;
              }
            }
            altText = altText.replace(/"/g, "&quot;").replace(showdown2.helper.regexes.asteriskDashAndColon, showdown2.helper.escapeCharactersCallback);
            url = url.replace(showdown2.helper.regexes.asteriskDashAndColon, showdown2.helper.escapeCharactersCallback);
            var result = '<img src="' + url + '" alt="' + altText + '"';
            if (title && showdown2.helper.isString(title)) {
              title = title.replace(/"/g, "&quot;").replace(showdown2.helper.regexes.asteriskDashAndColon, showdown2.helper.escapeCharactersCallback);
              result += ' title="' + title + '"';
            }
            if (width && height) {
              width = width === "*" ? "auto" : width;
              height = height === "*" ? "auto" : height;
              result += ' width="' + width + '"';
              result += ' height="' + height + '"';
            }
            result += " />";
            return result;
          }
          text2 = text2.replace(referenceRegExp, writeImageTag);
          text2 = text2.replace(base64RegExp, writeImageTagBase64);
          text2 = text2.replace(crazyRegExp, writeImageTag);
          text2 = text2.replace(inlineRegExp, writeImageTag);
          text2 = text2.replace(refShortcutRegExp, writeImageTag);
          text2 = globals.converter._dispatch("images.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("italicsAndBold", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("italicsAndBold.before", text2, options, globals);
          function parseInside(txt, left, right) {
            return left + txt + right;
          }
          if (options.literalMidWordUnderscores) {
            text2 = text2.replace(/\b___(\S[\s\S]*?)___\b/g, function(wm, txt) {
              return parseInside(txt, "<strong><em>", "</em></strong>");
            });
            text2 = text2.replace(/\b__(\S[\s\S]*?)__\b/g, function(wm, txt) {
              return parseInside(txt, "<strong>", "</strong>");
            });
            text2 = text2.replace(/\b_(\S[\s\S]*?)_\b/g, function(wm, txt) {
              return parseInside(txt, "<em>", "</em>");
            });
          } else {
            text2 = text2.replace(/___(\S[\s\S]*?)___/g, function(wm, m2) {
              return /\S$/.test(m2) ? parseInside(m2, "<strong><em>", "</em></strong>") : wm;
            });
            text2 = text2.replace(/__(\S[\s\S]*?)__/g, function(wm, m2) {
              return /\S$/.test(m2) ? parseInside(m2, "<strong>", "</strong>") : wm;
            });
            text2 = text2.replace(/_([^\s_][\s\S]*?)_/g, function(wm, m2) {
              return /\S$/.test(m2) ? parseInside(m2, "<em>", "</em>") : wm;
            });
          }
          if (options.literalMidWordAsterisks) {
            text2 = text2.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g, function(wm, lead, txt) {
              return parseInside(txt, lead + "<strong><em>", "</em></strong>");
            });
            text2 = text2.replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g, function(wm, lead, txt) {
              return parseInside(txt, lead + "<strong>", "</strong>");
            });
            text2 = text2.replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g, function(wm, lead, txt) {
              return parseInside(txt, lead + "<em>", "</em>");
            });
          } else {
            text2 = text2.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g, function(wm, m2) {
              return /\S$/.test(m2) ? parseInside(m2, "<strong><em>", "</em></strong>") : wm;
            });
            text2 = text2.replace(/\*\*(\S[\s\S]*?)\*\*/g, function(wm, m2) {
              return /\S$/.test(m2) ? parseInside(m2, "<strong>", "</strong>") : wm;
            });
            text2 = text2.replace(/\*([^\s*][\s\S]*?)\*/g, function(wm, m2) {
              return /\S$/.test(m2) ? parseInside(m2, "<em>", "</em>") : wm;
            });
          }
          text2 = globals.converter._dispatch("italicsAndBold.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("lists", function(text2, options, globals) {
          "use strict";
          function processListItems(listStr, trimTrailing) {
            globals.gListLevel++;
            listStr = listStr.replace(/\n{2,}$/, "\n");
            listStr += "\xA80";
            var rgx = /(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(Â¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm, isParagraphed = /\n[ \t]*\n(?!Â¨0)/.test(listStr);
            if (options.disableForced4SpacesIndentedSublists) {
              rgx = /(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(Â¨0|\2([*+-]|\d+[.])[ \t]+))/gm;
            }
            listStr = listStr.replace(rgx, function(wholeMatch, m1, m2, m3, m4, taskbtn, checked) {
              checked = checked && checked.trim() !== "";
              var item = showdown2.subParser("outdent")(m4, options, globals), bulletStyle = "";
              if (taskbtn && options.tasklists) {
                bulletStyle = ' class="task-list-item" style="list-style-type: none;"';
                item = item.replace(/^[ \t]*\[(x|X| )?]/m, function() {
                  var otp = '<input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"';
                  if (checked) {
                    otp += " checked";
                  }
                  otp += ">";
                  return otp;
                });
              }
              item = item.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g, function(wm2) {
                return "\xA8A" + wm2;
              });
              if (m1 || item.search(/\n{2,}/) > -1) {
                item = showdown2.subParser("githubCodeBlocks")(item, options, globals);
                item = showdown2.subParser("blockGamut")(item, options, globals);
              } else {
                item = showdown2.subParser("lists")(item, options, globals);
                item = item.replace(/\n$/, "");
                item = showdown2.subParser("hashHTMLBlocks")(item, options, globals);
                item = item.replace(/\n\n+/g, "\n\n");
                if (isParagraphed) {
                  item = showdown2.subParser("paragraphs")(item, options, globals);
                } else {
                  item = showdown2.subParser("spanGamut")(item, options, globals);
                }
              }
              item = item.replace("\xA8A", "");
              item = "<li" + bulletStyle + ">" + item + "</li>\n";
              return item;
            });
            listStr = listStr.replace(/Â¨0/g, "");
            globals.gListLevel--;
            if (trimTrailing) {
              listStr = listStr.replace(/\s+$/, "");
            }
            return listStr;
          }
          function styleStartNumber(list, listType) {
            if (listType === "ol") {
              var res = list.match(/^ *(\d+)\./);
              if (res && res[1] !== "1") {
                return ' start="' + res[1] + '"';
              }
            }
            return "";
          }
          function parseConsecutiveLists(list, listType, trimTrailing) {
            var olRgx = options.disableForced4SpacesIndentedSublists ? /^ ?\d+\.[ \t]/gm : /^ {0,3}\d+\.[ \t]/gm, ulRgx = options.disableForced4SpacesIndentedSublists ? /^ ?[*+-][ \t]/gm : /^ {0,3}[*+-][ \t]/gm, counterRxg = listType === "ul" ? olRgx : ulRgx, result = "";
            if (list.search(counterRxg) !== -1) {
              (function parseCL(txt) {
                var pos = txt.search(counterRxg), style2 = styleStartNumber(list, listType);
                if (pos !== -1) {
                  result += "\n\n<" + listType + style2 + ">\n" + processListItems(txt.slice(0, pos), !!trimTrailing) + "</" + listType + ">\n";
                  listType = listType === "ul" ? "ol" : "ul";
                  counterRxg = listType === "ul" ? olRgx : ulRgx;
                  parseCL(txt.slice(pos));
                } else {
                  result += "\n\n<" + listType + style2 + ">\n" + processListItems(txt, !!trimTrailing) + "</" + listType + ">\n";
                }
              })(list);
            } else {
              var style = styleStartNumber(list, listType);
              result = "\n\n<" + listType + style + ">\n" + processListItems(list, !!trimTrailing) + "</" + listType + ">\n";
            }
            return result;
          }
          text2 = globals.converter._dispatch("lists.before", text2, options, globals);
          text2 += "\xA80";
          if (globals.gListLevel) {
            text2 = text2.replace(
              /^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(Â¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,
              function(wholeMatch, list, m2) {
                var listType = m2.search(/[*+-]/g) > -1 ? "ul" : "ol";
                return parseConsecutiveLists(list, listType, true);
              }
            );
          } else {
            text2 = text2.replace(
              /(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(Â¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,
              function(wholeMatch, m1, list, m3) {
                var listType = m3.search(/[*+-]/g) > -1 ? "ul" : "ol";
                return parseConsecutiveLists(list, listType, false);
              }
            );
          }
          text2 = text2.replace(/Â¨0/, "");
          text2 = globals.converter._dispatch("lists.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("metadata", function(text2, options, globals) {
          "use strict";
          if (!options.metadata) {
            return text2;
          }
          text2 = globals.converter._dispatch("metadata.before", text2, options, globals);
          function parseMetadataContents(content) {
            globals.metadata.raw = content;
            content = content.replace(/&/g, "&amp;").replace(/"/g, "&quot;");
            content = content.replace(/\n {4}/g, " ");
            content.replace(/^([\S ]+): +([\s\S]+?)$/gm, function(wm, key, value) {
              globals.metadata.parsed[key] = value;
              return "";
            });
          }
          text2 = text2.replace(/^\s*Â«Â«Â«+(\S*?)\n([\s\S]+?)\nÂ»Â»Â»+\n/, function(wholematch, format, content) {
            parseMetadataContents(content);
            return "\xA8M";
          });
          text2 = text2.replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/, function(wholematch, format, content) {
            if (format) {
              globals.metadata.format = format;
            }
            parseMetadataContents(content);
            return "\xA8M";
          });
          text2 = text2.replace(/Â¨M/g, "");
          text2 = globals.converter._dispatch("metadata.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("outdent", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("outdent.before", text2, options, globals);
          text2 = text2.replace(/^(\t|[ ]{1,4})/gm, "\xA80");
          text2 = text2.replace(/Â¨0/g, "");
          text2 = globals.converter._dispatch("outdent.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("paragraphs", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("paragraphs.before", text2, options, globals);
          text2 = text2.replace(/^\n+/g, "");
          text2 = text2.replace(/\n+$/g, "");
          var grafs = text2.split(/\n{2,}/g), grafsOut = [], end = grafs.length;
          for (var i2 = 0; i2 < end; i2++) {
            var str = grafs[i2];
            if (str.search(/Â¨(K|G)(\d+)\1/g) >= 0) {
              grafsOut.push(str);
            } else if (str.search(/\S/) >= 0) {
              str = showdown2.subParser("spanGamut")(str, options, globals);
              str = str.replace(/^([ \t]*)/g, "<p>");
              str += "</p>";
              grafsOut.push(str);
            }
          }
          end = grafsOut.length;
          for (i2 = 0; i2 < end; i2++) {
            var blockText = "", grafsOutIt = grafsOut[i2], codeFlag = false;
            while (/Â¨(K|G)(\d+)\1/.test(grafsOutIt)) {
              var delim = RegExp.$1, num = RegExp.$2;
              if (delim === "K") {
                blockText = globals.gHtmlBlocks[num];
              } else {
                if (codeFlag) {
                  blockText = showdown2.subParser("encodeCode")(globals.ghCodeBlocks[num].text, options, globals);
                } else {
                  blockText = globals.ghCodeBlocks[num].codeblock;
                }
              }
              blockText = blockText.replace(/\$/g, "$$$$");
              grafsOutIt = grafsOutIt.replace(/(\n\n)?Â¨(K|G)\d+\2(\n\n)?/, blockText);
              if (/^<pre\b[^>]*>\s*<code\b[^>]*>/.test(grafsOutIt)) {
                codeFlag = true;
              }
            }
            grafsOut[i2] = grafsOutIt;
          }
          text2 = grafsOut.join("\n");
          text2 = text2.replace(/^\n+/g, "");
          text2 = text2.replace(/\n+$/g, "");
          return globals.converter._dispatch("paragraphs.after", text2, options, globals);
        });
        showdown2.subParser("runExtension", function(ext, text2, options, globals) {
          "use strict";
          if (ext.filter) {
            text2 = ext.filter(text2, globals.converter, options);
          } else if (ext.regex) {
            var re = ext.regex;
            if (!(re instanceof RegExp)) {
              re = new RegExp(re, "g");
            }
            text2 = text2.replace(re, ext.replace);
          }
          return text2;
        });
        showdown2.subParser("spanGamut", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("spanGamut.before", text2, options, globals);
          text2 = showdown2.subParser("codeSpans")(text2, options, globals);
          text2 = showdown2.subParser("escapeSpecialCharsWithinTagAttributes")(text2, options, globals);
          text2 = showdown2.subParser("encodeBackslashEscapes")(text2, options, globals);
          text2 = showdown2.subParser("images")(text2, options, globals);
          text2 = showdown2.subParser("anchors")(text2, options, globals);
          text2 = showdown2.subParser("autoLinks")(text2, options, globals);
          text2 = showdown2.subParser("simplifiedAutoLinks")(text2, options, globals);
          text2 = showdown2.subParser("emoji")(text2, options, globals);
          text2 = showdown2.subParser("underline")(text2, options, globals);
          text2 = showdown2.subParser("italicsAndBold")(text2, options, globals);
          text2 = showdown2.subParser("strikethrough")(text2, options, globals);
          text2 = showdown2.subParser("ellipsis")(text2, options, globals);
          text2 = showdown2.subParser("hashHTMLSpans")(text2, options, globals);
          text2 = showdown2.subParser("encodeAmpsAndAngles")(text2, options, globals);
          if (options.simpleLineBreaks) {
            if (!/\n\nÂ¨K/.test(text2)) {
              text2 = text2.replace(/\n+/g, "<br />\n");
            }
          } else {
            text2 = text2.replace(/  +\n/g, "<br />\n");
          }
          text2 = globals.converter._dispatch("spanGamut.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("strikethrough", function(text2, options, globals) {
          "use strict";
          function parseInside(txt) {
            if (options.simplifiedAutoLink) {
              txt = showdown2.subParser("simplifiedAutoLinks")(txt, options, globals);
            }
            return "<del>" + txt + "</del>";
          }
          if (options.strikethrough) {
            text2 = globals.converter._dispatch("strikethrough.before", text2, options, globals);
            text2 = text2.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g, function(wm, txt) {
              return parseInside(txt);
            });
            text2 = globals.converter._dispatch("strikethrough.after", text2, options, globals);
          }
          return text2;
        });
        showdown2.subParser("stripLinkDefinitions", function(text2, options, globals) {
          "use strict";
          var regex = /^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=Â¨0))/gm, base64Regex = /^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=Â¨0)|(?=\n\[))/gm;
          text2 += "\xA80";
          var replaceFunc = function(wholeMatch, linkId, url, width, height, blankLines, title) {
            linkId = linkId.toLowerCase();
            if (url.match(/^data:.+?\/.+?;base64,/)) {
              globals.gUrls[linkId] = url.replace(/\s/g, "");
            } else {
              globals.gUrls[linkId] = showdown2.subParser("encodeAmpsAndAngles")(url, options, globals);
            }
            if (blankLines) {
              return blankLines + title;
            } else {
              if (title) {
                globals.gTitles[linkId] = title.replace(/"|'/g, "&quot;");
              }
              if (options.parseImgDimensions && width && height) {
                globals.gDimensions[linkId] = {
                  width,
                  height
                };
              }
            }
            return "";
          };
          text2 = text2.replace(base64Regex, replaceFunc);
          text2 = text2.replace(regex, replaceFunc);
          text2 = text2.replace(/Â¨0/, "");
          return text2;
        });
        showdown2.subParser("tables", function(text2, options, globals) {
          "use strict";
          if (!options.tables) {
            return text2;
          }
          var tableRgx = /^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|Â¨0)/gm, singeColTblRgx = /^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|Â¨0)/gm;
          function parseStyles(sLine) {
            if (/^:[ \t]*--*$/.test(sLine)) {
              return ' style="text-align:left;"';
            } else if (/^--*[ \t]*:[ \t]*$/.test(sLine)) {
              return ' style="text-align:right;"';
            } else if (/^:[ \t]*--*[ \t]*:$/.test(sLine)) {
              return ' style="text-align:center;"';
            } else {
              return "";
            }
          }
          function parseHeaders(header, style) {
            var id = "";
            header = header.trim();
            if (options.tablesHeaderId || options.tableHeaderId) {
              id = ' id="' + header.replace(/ /g, "_").toLowerCase() + '"';
            }
            header = showdown2.subParser("spanGamut")(header, options, globals);
            return "<th" + id + style + ">" + header + "</th>\n";
          }
          function parseCells(cell, style) {
            var subText = showdown2.subParser("spanGamut")(cell, options, globals);
            return "<td" + style + ">" + subText + "</td>\n";
          }
          function buildTable(headers, cells) {
            var tb = "<table>\n<thead>\n<tr>\n", tblLgn = headers.length;
            for (var i2 = 0; i2 < tblLgn; ++i2) {
              tb += headers[i2];
            }
            tb += "</tr>\n</thead>\n<tbody>\n";
            for (i2 = 0; i2 < cells.length; ++i2) {
              tb += "<tr>\n";
              for (var ii = 0; ii < tblLgn; ++ii) {
                tb += cells[i2][ii];
              }
              tb += "</tr>\n";
            }
            tb += "</tbody>\n</table>\n";
            return tb;
          }
          function parseTable(rawTable) {
            var i2, tableLines = rawTable.split("\n");
            for (i2 = 0; i2 < tableLines.length; ++i2) {
              if (/^ {0,3}\|/.test(tableLines[i2])) {
                tableLines[i2] = tableLines[i2].replace(/^ {0,3}\|/, "");
              }
              if (/\|[ \t]*$/.test(tableLines[i2])) {
                tableLines[i2] = tableLines[i2].replace(/\|[ \t]*$/, "");
              }
              tableLines[i2] = showdown2.subParser("codeSpans")(tableLines[i2], options, globals);
            }
            var rawHeaders = tableLines[0].split("|").map(function(s2) {
              return s2.trim();
            }), rawStyles = tableLines[1].split("|").map(function(s2) {
              return s2.trim();
            }), rawCells = [], headers = [], styles = [], cells = [];
            tableLines.shift();
            tableLines.shift();
            for (i2 = 0; i2 < tableLines.length; ++i2) {
              if (tableLines[i2].trim() === "") {
                continue;
              }
              rawCells.push(
                tableLines[i2].split("|").map(function(s2) {
                  return s2.trim();
                })
              );
            }
            if (rawHeaders.length < rawStyles.length) {
              return rawTable;
            }
            for (i2 = 0; i2 < rawStyles.length; ++i2) {
              styles.push(parseStyles(rawStyles[i2]));
            }
            for (i2 = 0; i2 < rawHeaders.length; ++i2) {
              if (showdown2.helper.isUndefined(styles[i2])) {
                styles[i2] = "";
              }
              headers.push(parseHeaders(rawHeaders[i2], styles[i2]));
            }
            for (i2 = 0; i2 < rawCells.length; ++i2) {
              var row = [];
              for (var ii = 0; ii < headers.length; ++ii) {
                if (showdown2.helper.isUndefined(rawCells[i2][ii])) {
                }
                row.push(parseCells(rawCells[i2][ii], styles[ii]));
              }
              cells.push(row);
            }
            return buildTable(headers, cells);
          }
          text2 = globals.converter._dispatch("tables.before", text2, options, globals);
          text2 = text2.replace(/\\(\|)/g, showdown2.helper.escapeCharactersCallback);
          text2 = text2.replace(tableRgx, parseTable);
          text2 = text2.replace(singeColTblRgx, parseTable);
          text2 = globals.converter._dispatch("tables.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("underline", function(text2, options, globals) {
          "use strict";
          if (!options.underline) {
            return text2;
          }
          text2 = globals.converter._dispatch("underline.before", text2, options, globals);
          if (options.literalMidWordUnderscores) {
            text2 = text2.replace(/\b___(\S[\s\S]*?)___\b/g, function(wm, txt) {
              return "<u>" + txt + "</u>";
            });
            text2 = text2.replace(/\b__(\S[\s\S]*?)__\b/g, function(wm, txt) {
              return "<u>" + txt + "</u>";
            });
          } else {
            text2 = text2.replace(/___(\S[\s\S]*?)___/g, function(wm, m2) {
              return /\S$/.test(m2) ? "<u>" + m2 + "</u>" : wm;
            });
            text2 = text2.replace(/__(\S[\s\S]*?)__/g, function(wm, m2) {
              return /\S$/.test(m2) ? "<u>" + m2 + "</u>" : wm;
            });
          }
          text2 = text2.replace(/(_)/g, showdown2.helper.escapeCharactersCallback);
          text2 = globals.converter._dispatch("underline.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("unescapeSpecialChars", function(text2, options, globals) {
          "use strict";
          text2 = globals.converter._dispatch("unescapeSpecialChars.before", text2, options, globals);
          text2 = text2.replace(/Â¨E(\d+)E/g, function(wholeMatch, m1) {
            var charCodeToReplace = parseInt(m1);
            return String.fromCharCode(charCodeToReplace);
          });
          text2 = globals.converter._dispatch("unescapeSpecialChars.after", text2, options, globals);
          return text2;
        });
        showdown2.subParser("makeMarkdown.blockquote", function(node, globals) {
          "use strict";
          var txt = "";
          if (node.hasChildNodes()) {
            var children = node.childNodes, childrenLength = children.length;
            for (var i2 = 0; i2 < childrenLength; ++i2) {
              var innerTxt = showdown2.subParser("makeMarkdown.node")(children[i2], globals);
              if (innerTxt === "") {
                continue;
              }
              txt += innerTxt;
            }
          }
          txt = txt.trim();
          txt = "> " + txt.split("\n").join("\n> ");
          return txt;
        });
        showdown2.subParser("makeMarkdown.codeBlock", function(node, globals) {
          "use strict";
          var lang = node.getAttribute("language"), num = node.getAttribute("precodenum");
          return "```" + lang + "\n" + globals.preList[num] + "\n```";
        });
        showdown2.subParser("makeMarkdown.codeSpan", function(node) {
          "use strict";
          return "`" + node.innerHTML + "`";
        });
        showdown2.subParser("makeMarkdown.emphasis", function(node, globals) {
          "use strict";
          var txt = "";
          if (node.hasChildNodes()) {
            txt += "*";
            var children = node.childNodes, childrenLength = children.length;
            for (var i2 = 0; i2 < childrenLength; ++i2) {
              txt += showdown2.subParser("makeMarkdown.node")(children[i2], globals);
            }
            txt += "*";
          }
          return txt;
        });
        showdown2.subParser("makeMarkdown.header", function(node, globals, headerLevel) {
          "use strict";
          var headerMark = new Array(headerLevel + 1).join("#"), txt = "";
          if (node.hasChildNodes()) {
            txt = headerMark + " ";
            var children = node.childNodes, childrenLength = children.length;
            for (var i2 = 0; i2 < childrenLength; ++i2) {
              txt += showdown2.subParser("makeMarkdown.node")(children[i2], globals);
            }
          }
          return txt;
        });
        showdown2.subParser("makeMarkdown.hr", function() {
          "use strict";
          return "---";
        });
        showdown2.subParser("makeMarkdown.image", function(node) {
          "use strict";
          var txt = "";
          if (node.hasAttribute("src")) {
            txt += "![" + node.getAttribute("alt") + "](";
            txt += "<" + node.getAttribute("src") + ">";
            if (node.hasAttribute("width") && node.hasAttribute("height")) {
              txt += " =" + node.getAttribute("width") + "x" + node.getAttribute("height");
            }
            if (node.hasAttribute("title")) {
              txt += ' "' + node.getAttribute("title") + '"';
            }
            txt += ")";
          }
          return txt;
        });
        showdown2.subParser("makeMarkdown.links", function(node, globals) {
          "use strict";
          var txt = "";
          if (node.hasChildNodes() && node.hasAttribute("href")) {
            var children = node.childNodes, childrenLength = children.length;
            txt = "[";
            for (var i2 = 0; i2 < childrenLength; ++i2) {
              txt += showdown2.subParser("makeMarkdown.node")(children[i2], globals);
            }
            txt += "](";
            txt += "<" + node.getAttribute("href") + ">";
            if (node.hasAttribute("title")) {
              txt += ' "' + node.getAttribute("title") + '"';
            }
            txt += ")";
          }
          return txt;
        });
        showdown2.subParser("makeMarkdown.list", function(node, globals, type) {
          "use strict";
          var txt = "";
          if (!node.hasChildNodes()) {
            return "";
          }
          var listItems = node.childNodes, listItemsLenght = listItems.length, listNum = node.getAttribute("start") || 1;
          for (var i2 = 0; i2 < listItemsLenght; ++i2) {
            if (typeof listItems[i2].tagName === "undefined" || listItems[i2].tagName.toLowerCase() !== "li") {
              continue;
            }
            var bullet = "";
            if (type === "ol") {
              bullet = listNum.toString() + ". ";
            } else {
              bullet = "- ";
            }
            txt += bullet + showdown2.subParser("makeMarkdown.listItem")(listItems[i2], globals);
            ++listNum;
          }
          txt += "\n<!-- -->\n";
          return txt.trim();
        });
        showdown2.subParser("makeMarkdown.listItem", function(node, globals) {
          "use strict";
          var listItemTxt = "";
          var children = node.childNodes, childrenLenght = children.length;
          for (var i2 = 0; i2 < childrenLenght; ++i2) {
            listItemTxt += showdown2.subParser("makeMarkdown.node")(children[i2], globals);
          }
          if (!/\n$/.test(listItemTxt)) {
            listItemTxt += "\n";
          } else {
            listItemTxt = listItemTxt.split("\n").join("\n    ").replace(/^ {4}$/gm, "").replace(/\n\n+/g, "\n\n");
          }
          return listItemTxt;
        });
        showdown2.subParser("makeMarkdown.node", function(node, globals, spansOnly) {
          "use strict";
          spansOnly = spansOnly || false;
          var txt = "";
          if (node.nodeType === 3) {
            return showdown2.subParser("makeMarkdown.txt")(node, globals);
          }
          if (node.nodeType === 8) {
            return "<!--" + node.data + "-->\n\n";
          }
          if (node.nodeType !== 1) {
            return "";
          }
          var tagName = node.tagName.toLowerCase();
          switch (tagName) {
            //
            // BLOCKS
            //
            case "h1":
              if (!spansOnly) {
                txt = showdown2.subParser("makeMarkdown.header")(node, globals, 1) + "\n\n";
              }
              break;
            case "h2":
              if (!spansOnly) {
                txt = showdown2.subParser("makeMarkdown.header")(node, globals, 2) + "\n\n";
              }
              break;
            case "h3":
              if (!spansOnly) {
                txt = showdown2.subParser("makeMarkdown.header")(node, globals, 3) + "\n\n";
              }
              break;
            case "h4":
              if (!spansOnly) {
                txt = showdown2.subParser("makeMarkdown.header")(node, globals, 4) + "\n\n";
              }
              break;
            case "h5":
              if (!spansOnly) {
                txt = showdown2.subParser("makeMarkdown.header")(node, globals, 5) + "\n\n";
              }
              break;
            case "h6":
              if (!spansOnly) {
                txt = showdown2.subParser("makeMarkdown.header")(node, globals, 6) + "\n\n";
              }
              break;
            case "p":
              if (!spansOnly) {
                txt = showdown2.subParser("makeMarkdown.paragraph")(node, globals) + "\n\n";
              }
              break;
            case "blockquote":
              if (!spansOnly) {
                txt = showdown2.subParser("makeMarkdown.blockquote")(node, globals) + "\n\n";
              }
              break;
            case "hr":
              if (!spansOnly) {
                txt = showdown2.subParser("makeMarkdown.hr")(node, globals) + "\n\n";
              }
              break;
            case "ol":
              if (!spansOnly) {
                txt = showdown2.subParser("makeMarkdown.list")(node, globals, "ol") + "\n\n";
              }
              break;
            case "ul":
              if (!spansOnly) {
                txt = showdown2.subParser("makeMarkdown.list")(node, globals, "ul") + "\n\n";
              }
              break;
            case "precode":
              if (!spansOnly) {
                txt = showdown2.subParser("makeMarkdown.codeBlock")(node, globals) + "\n\n";
              }
              break;
            case "pre":
              if (!spansOnly) {
                txt = showdown2.subParser("makeMarkdown.pre")(node, globals) + "\n\n";
              }
              break;
            case "table":
              if (!spansOnly) {
                txt = showdown2.subParser("makeMarkdown.table")(node, globals) + "\n\n";
              }
              break;
            //
            // SPANS
            //
            case "code":
              txt = showdown2.subParser("makeMarkdown.codeSpan")(node, globals);
              break;
            case "em":
            case "i":
              txt = showdown2.subParser("makeMarkdown.emphasis")(node, globals);
              break;
            case "strong":
            case "b":
              txt = showdown2.subParser("makeMarkdown.strong")(node, globals);
              break;
            case "del":
              txt = showdown2.subParser("makeMarkdown.strikethrough")(node, globals);
              break;
            case "a":
              txt = showdown2.subParser("makeMarkdown.links")(node, globals);
              break;
            case "img":
              txt = showdown2.subParser("makeMarkdown.image")(node, globals);
              break;
            default:
              txt = node.outerHTML + "\n\n";
          }
          return txt;
        });
        showdown2.subParser("makeMarkdown.paragraph", function(node, globals) {
          "use strict";
          var txt = "";
          if (node.hasChildNodes()) {
            var children = node.childNodes, childrenLength = children.length;
            for (var i2 = 0; i2 < childrenLength; ++i2) {
              txt += showdown2.subParser("makeMarkdown.node")(children[i2], globals);
            }
          }
          txt = txt.trim();
          return txt;
        });
        showdown2.subParser("makeMarkdown.pre", function(node, globals) {
          "use strict";
          var num = node.getAttribute("prenum");
          return "<pre>" + globals.preList[num] + "</pre>";
        });
        showdown2.subParser("makeMarkdown.strikethrough", function(node, globals) {
          "use strict";
          var txt = "";
          if (node.hasChildNodes()) {
            txt += "~~";
            var children = node.childNodes, childrenLength = children.length;
            for (var i2 = 0; i2 < childrenLength; ++i2) {
              txt += showdown2.subParser("makeMarkdown.node")(children[i2], globals);
            }
            txt += "~~";
          }
          return txt;
        });
        showdown2.subParser("makeMarkdown.strong", function(node, globals) {
          "use strict";
          var txt = "";
          if (node.hasChildNodes()) {
            txt += "**";
            var children = node.childNodes, childrenLength = children.length;
            for (var i2 = 0; i2 < childrenLength; ++i2) {
              txt += showdown2.subParser("makeMarkdown.node")(children[i2], globals);
            }
            txt += "**";
          }
          return txt;
        });
        showdown2.subParser("makeMarkdown.table", function(node, globals) {
          "use strict";
          var txt = "", tableArray = [[], []], headings = node.querySelectorAll("thead>tr>th"), rows = node.querySelectorAll("tbody>tr"), i2, ii;
          for (i2 = 0; i2 < headings.length; ++i2) {
            var headContent = showdown2.subParser("makeMarkdown.tableCell")(headings[i2], globals), allign = "---";
            if (headings[i2].hasAttribute("style")) {
              var style = headings[i2].getAttribute("style").toLowerCase().replace(/\s/g, "");
              switch (style) {
                case "text-align:left;":
                  allign = ":---";
                  break;
                case "text-align:right;":
                  allign = "---:";
                  break;
                case "text-align:center;":
                  allign = ":---:";
                  break;
              }
            }
            tableArray[0][i2] = headContent.trim();
            tableArray[1][i2] = allign;
          }
          for (i2 = 0; i2 < rows.length; ++i2) {
            var r2 = tableArray.push([]) - 1, cols = rows[i2].getElementsByTagName("td");
            for (ii = 0; ii < headings.length; ++ii) {
              var cellContent = " ";
              if (typeof cols[ii] !== "undefined") {
                cellContent = showdown2.subParser("makeMarkdown.tableCell")(cols[ii], globals);
              }
              tableArray[r2].push(cellContent);
            }
          }
          var cellSpacesCount = 3;
          for (i2 = 0; i2 < tableArray.length; ++i2) {
            for (ii = 0; ii < tableArray[i2].length; ++ii) {
              var strLen = tableArray[i2][ii].length;
              if (strLen > cellSpacesCount) {
                cellSpacesCount = strLen;
              }
            }
          }
          for (i2 = 0; i2 < tableArray.length; ++i2) {
            for (ii = 0; ii < tableArray[i2].length; ++ii) {
              if (i2 === 1) {
                if (tableArray[i2][ii].slice(-1) === ":") {
                  tableArray[i2][ii] = showdown2.helper.padEnd(tableArray[i2][ii].slice(-1), cellSpacesCount - 1, "-") + ":";
                } else {
                  tableArray[i2][ii] = showdown2.helper.padEnd(tableArray[i2][ii], cellSpacesCount, "-");
                }
              } else {
                tableArray[i2][ii] = showdown2.helper.padEnd(tableArray[i2][ii], cellSpacesCount);
              }
            }
            txt += "| " + tableArray[i2].join(" | ") + " |\n";
          }
          return txt.trim();
        });
        showdown2.subParser("makeMarkdown.tableCell", function(node, globals) {
          "use strict";
          var txt = "";
          if (!node.hasChildNodes()) {
            return "";
          }
          var children = node.childNodes, childrenLength = children.length;
          for (var i2 = 0; i2 < childrenLength; ++i2) {
            txt += showdown2.subParser("makeMarkdown.node")(children[i2], globals, true);
          }
          return txt.trim();
        });
        showdown2.subParser("makeMarkdown.txt", function(node) {
          "use strict";
          var txt = node.nodeValue;
          txt = txt.replace(/ +/g, " ");
          txt = txt.replace(/Â¨NBSP;/g, " ");
          txt = showdown2.helper.unescapeHTMLEntities(txt);
          txt = txt.replace(/([*_~|`])/g, "\\$1");
          txt = txt.replace(/^(\s*)>/g, "\\$1>");
          txt = txt.replace(/^#/gm, "\\#");
          txt = txt.replace(/^(\s*)([-=]{3,})(\s*)$/, "$1\\$2$3");
          txt = txt.replace(/^( {0,3}\d+)\./gm, "$1\\.");
          txt = txt.replace(/^( {0,3})([+-])/gm, "$1\\$2");
          txt = txt.replace(/]([\s]*)\(/g, "\\]$1\\(");
          txt = txt.replace(/^ {0,3}\[([\S \t]*?)]:/gm, "\\[$1]:");
          return txt;
        });
        var root = this;
        if (typeof define === "function" && define.amd) {
          define(function() {
            "use strict";
            return showdown2;
          });
        } else if (typeof module !== "undefined" && module.exports) {
          module.exports = showdown2;
        } else {
          root.showdown = showdown2;
        }
      }).call(exports);
    }
  });

  // packages/blocks/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    __EXPERIMENTAL_ELEMENTS: () => __EXPERIMENTAL_ELEMENTS,
    __EXPERIMENTAL_PATHS_WITH_OVERRIDE: () => __EXPERIMENTAL_PATHS_WITH_OVERRIDE,
    __EXPERIMENTAL_STYLE_PROPERTY: () => __EXPERIMENTAL_STYLE_PROPERTY,
    __experimentalCloneSanitizedBlock: () => __experimentalCloneSanitizedBlock,
    __experimentalGetAccessibleBlockLabel: () => getAccessibleBlockLabel,
    __experimentalGetBlockAttributesNamesByRole: () => __experimentalGetBlockAttributesNamesByRole,
    __experimentalGetBlockLabel: () => getBlockLabel,
    __experimentalSanitizeBlockAttributes: () => __experimentalSanitizeBlockAttributes,
    __unstableGetBlockProps: () => getBlockProps,
    __unstableGetInnerBlocksProps: () => getInnerBlocksProps,
    __unstableSerializeAndClean: () => __unstableSerializeAndClean,
    children: () => children_default,
    cloneBlock: () => cloneBlock,
    createBlock: () => createBlock,
    createBlocksFromInnerBlocksTemplate: () => createBlocksFromInnerBlocksTemplate,
    doBlocksMatchTemplate: () => doBlocksMatchTemplate,
    findTransform: () => findTransform,
    getBlockAttributes: () => getBlockAttributes,
    getBlockAttributesNamesByRole: () => getBlockAttributesNamesByRole,
    getBlockBindingsSource: () => getBlockBindingsSource,
    getBlockBindingsSources: () => getBlockBindingsSources,
    getBlockContent: () => getBlockInnerHTML,
    getBlockDefaultClassName: () => getBlockDefaultClassName,
    getBlockFromExample: () => getBlockFromExample,
    getBlockMenuDefaultClassName: () => getBlockMenuDefaultClassName,
    getBlockSupport: () => getBlockSupport,
    getBlockTransforms: () => getBlockTransforms,
    getBlockType: () => getBlockType,
    getBlockTypes: () => getBlockTypes,
    getBlockVariations: () => getBlockVariations,
    getCategories: () => getCategories2,
    getChildBlockNames: () => getChildBlockNames,
    getDefaultBlockName: () => getDefaultBlockName,
    getFreeformContentHandlerName: () => getFreeformContentHandlerName,
    getGroupingBlockName: () => getGroupingBlockName,
    getPhrasingContentSchema: () => deprecatedGetPhrasingContentSchema,
    getPossibleBlockTransformations: () => getPossibleBlockTransformations,
    getSaveContent: () => getSaveContent,
    getSaveElement: () => getSaveElement,
    getUnregisteredTypeHandlerName: () => getUnregisteredTypeHandlerName,
    hasBlockSupport: () => hasBlockSupport,
    hasChildBlocks: () => hasChildBlocks,
    hasChildBlocksWithInserterSupport: () => hasChildBlocksWithInserterSupport,
    isReusableBlock: () => isReusableBlock,
    isTemplatePart: () => isTemplatePart,
    isUnmodifiedBlock: () => isUnmodifiedBlock,
    isUnmodifiedDefaultBlock: () => isUnmodifiedDefaultBlock,
    isValidBlockContent: () => isValidBlockContent,
    isValidIcon: () => isValidIcon,
    node: () => node_default,
    normalizeIconObject: () => normalizeIconObject,
    parse: () => parse2,
    parseWithAttributeSchema: () => parseWithAttributeSchema,
    pasteHandler: () => pasteHandler,
    privateApis: () => privateApis,
    rawHandler: () => rawHandler,
    registerBlockBindingsSource: () => registerBlockBindingsSource,
    registerBlockCollection: () => registerBlockCollection,
    registerBlockStyle: () => registerBlockStyle,
    registerBlockType: () => registerBlockType,
    registerBlockVariation: () => registerBlockVariation,
    serialize: () => serialize,
    serializeRawBlock: () => serializeRawBlock,
    setCategories: () => setCategories2,
    setDefaultBlockName: () => setDefaultBlockName,
    setFreeformContentHandlerName: () => setFreeformContentHandlerName,
    setGroupingBlockName: () => setGroupingBlockName,
    setUnregisteredTypeHandlerName: () => setUnregisteredTypeHandlerName,
    store: () => store,
    switchToBlockType: () => switchToBlockType,
    synchronizeBlocksWithTemplate: () => synchronizeBlocksWithTemplate,
    unregisterBlockBindingsSource: () => unregisterBlockBindingsSource,
    unregisterBlockStyle: () => unregisterBlockStyle,
    unregisterBlockType: () => unregisterBlockType,
    unregisterBlockVariation: () => unregisterBlockVariation,
    unstable__bootstrapServerSideBlockDefinitions: () => unstable__bootstrapServerSideBlockDefinitions,
    updateCategory: () => updateCategory2,
    validateBlock: () => validateBlock,
    withBlockContentContext: () => withBlockContentContext
  });

  // packages/blocks/build-module/store/index.mjs
  var import_data5 = __toESM(require_data(), 1);

  // node_modules/tslib/tslib.es6.mjs
  var __assign = function() {
    __assign = Object.assign || function __assign2(t3) {
      for (var s2, i2 = 1, n2 = arguments.length; i2 < n2; i2++) {
        s2 = arguments[i2];
        for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2)) t3[p2] = s2[p2];
      }
      return t3;
    };
    return __assign.apply(this, arguments);
  };

  // node_modules/lower-case/dist.es2015/index.js
  function lowerCase(str) {
    return str.toLowerCase();
  }

  // node_modules/no-case/dist.es2015/index.js
  var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
  var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
  function noCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    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;
    var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
    var start = 0;
    var end = result.length;
    while (result.charAt(start) === "\0")
      start++;
    while (result.charAt(end - 1) === "\0")
      end--;
    return result.slice(start, end).split("\0").map(transform).join(delimiter);
  }
  function replace(input, re, value) {
    if (re instanceof RegExp)
      return input.replace(re, value);
    return re.reduce(function(input2, re2) {
      return input2.replace(re2, value);
    }, input);
  }

  // node_modules/pascal-case/dist.es2015/index.js
  function pascalCaseTransform(input, index) {
    var firstChar = input.charAt(0);
    var lowerChars = input.substr(1).toLowerCase();
    if (index > 0 && firstChar >= "0" && firstChar <= "9") {
      return "_" + firstChar + lowerChars;
    }
    return "" + firstChar.toUpperCase() + lowerChars;
  }
  function pascalCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    return noCase(input, __assign({ delimiter: "", transform: pascalCaseTransform }, options));
  }

  // node_modules/camel-case/dist.es2015/index.js
  function camelCaseTransform(input, index) {
    if (index === 0)
      return input.toLowerCase();
    return pascalCaseTransform(input, index);
  }
  function camelCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    return pascalCase(input, __assign({ transform: camelCaseTransform }, options));
  }

  // packages/blocks/build-module/store/reducer.mjs
  var import_data2 = __toESM(require_data(), 1);
  var import_i18n3 = __toESM(require_i18n(), 1);

  // node_modules/colord/index.mjs
  var r = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) };
  var t = function(r2) {
    return "string" == typeof r2 ? r2.length > 0 : "number" == typeof r2;
  };
  var n = function(r2, t3, n2) {
    return void 0 === t3 && (t3 = 0), void 0 === n2 && (n2 = Math.pow(10, t3)), Math.round(n2 * r2) / n2 + 0;
  };
  var e = function(r2, t3, n2) {
    return void 0 === t3 && (t3 = 0), void 0 === n2 && (n2 = 1), r2 > n2 ? n2 : r2 > t3 ? r2 : t3;
  };
  var u = function(r2) {
    return (r2 = isFinite(r2) ? r2 % 360 : 0) > 0 ? r2 : r2 + 360;
  };
  var a = function(r2) {
    return { r: e(r2.r, 0, 255), g: e(r2.g, 0, 255), b: e(r2.b, 0, 255), a: e(r2.a) };
  };
  var o = function(r2) {
    return { r: n(r2.r), g: n(r2.g), b: n(r2.b), a: n(r2.a, 3) };
  };
  var i = /^#([0-9a-f]{3,8})$/i;
  var s = function(r2) {
    var t3 = r2.toString(16);
    return t3.length < 2 ? "0" + t3 : t3;
  };
  var h = function(r2) {
    var t3 = r2.r, n2 = r2.g, e2 = r2.b, u2 = r2.a, a2 = Math.max(t3, n2, e2), o3 = a2 - Math.min(t3, n2, e2), i2 = o3 ? a2 === t3 ? (n2 - e2) / o3 : a2 === n2 ? 2 + (e2 - t3) / o3 : 4 + (t3 - n2) / o3 : 0;
    return { h: 60 * (i2 < 0 ? i2 + 6 : i2), s: a2 ? o3 / a2 * 100 : 0, v: a2 / 255 * 100, a: u2 };
  };
  var b = function(r2) {
    var t3 = r2.h, n2 = r2.s, e2 = r2.v, u2 = r2.a;
    t3 = t3 / 360 * 6, n2 /= 100, e2 /= 100;
    var a2 = Math.floor(t3), o3 = e2 * (1 - n2), i2 = e2 * (1 - (t3 - a2) * n2), s2 = e2 * (1 - (1 - t3 + a2) * n2), h2 = a2 % 6;
    return { r: 255 * [e2, i2, o3, o3, s2, e2][h2], g: 255 * [s2, e2, e2, i2, o3, o3][h2], b: 255 * [o3, o3, s2, e2, e2, i2][h2], a: u2 };
  };
  var g = function(r2) {
    return { h: u(r2.h), s: e(r2.s, 0, 100), l: e(r2.l, 0, 100), a: e(r2.a) };
  };
  var d = function(r2) {
    return { h: n(r2.h), s: n(r2.s), l: n(r2.l), a: n(r2.a, 3) };
  };
  var f = function(r2) {
    return b((n2 = (t3 = r2).s, { h: t3.h, s: (n2 *= ((e2 = t3.l) < 50 ? e2 : 100 - e2) / 100) > 0 ? 2 * n2 / (e2 + n2) * 100 : 0, v: e2 + n2, a: t3.a }));
    var t3, n2, e2;
  };
  var c = function(r2) {
    return { h: (t3 = h(r2)).h, s: (u2 = (200 - (n2 = t3.s)) * (e2 = t3.v) / 100) > 0 && u2 < 200 ? n2 * e2 / 100 / (u2 <= 100 ? u2 : 200 - u2) * 100 : 0, l: u2 / 2, a: t3.a };
    var t3, n2, e2, u2;
  };
  var l = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var p = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var v = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var m = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var y = { string: [[function(r2) {
    var t3 = i.exec(r2);
    return t3 ? (r2 = t3[1]).length <= 4 ? { r: parseInt(r2[0] + r2[0], 16), g: parseInt(r2[1] + r2[1], 16), b: parseInt(r2[2] + r2[2], 16), a: 4 === r2.length ? n(parseInt(r2[3] + r2[3], 16) / 255, 2) : 1 } : 6 === r2.length || 8 === r2.length ? { r: parseInt(r2.substr(0, 2), 16), g: parseInt(r2.substr(2, 2), 16), b: parseInt(r2.substr(4, 2), 16), a: 8 === r2.length ? n(parseInt(r2.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
  }, "hex"], [function(r2) {
    var t3 = v.exec(r2) || m.exec(r2);
    return t3 ? t3[2] !== t3[4] || t3[4] !== t3[6] ? null : a({ r: Number(t3[1]) / (t3[2] ? 100 / 255 : 1), g: Number(t3[3]) / (t3[4] ? 100 / 255 : 1), b: Number(t3[5]) / (t3[6] ? 100 / 255 : 1), a: void 0 === t3[7] ? 1 : Number(t3[7]) / (t3[8] ? 100 : 1) }) : null;
  }, "rgb"], [function(t3) {
    var n2 = l.exec(t3) || p.exec(t3);
    if (!n2) return null;
    var e2, u2, a2 = g({ h: (e2 = n2[1], u2 = n2[2], void 0 === u2 && (u2 = "deg"), Number(e2) * (r[u2] || 1)), s: Number(n2[3]), l: Number(n2[4]), a: void 0 === n2[5] ? 1 : Number(n2[5]) / (n2[6] ? 100 : 1) });
    return f(a2);
  }, "hsl"]], object: [[function(r2) {
    var n2 = r2.r, e2 = r2.g, u2 = r2.b, o3 = r2.a, i2 = void 0 === o3 ? 1 : o3;
    return t(n2) && t(e2) && t(u2) ? a({ r: Number(n2), g: Number(e2), b: Number(u2), a: Number(i2) }) : null;
  }, "rgb"], [function(r2) {
    var n2 = r2.h, e2 = r2.s, u2 = r2.l, a2 = r2.a, o3 = void 0 === a2 ? 1 : a2;
    if (!t(n2) || !t(e2) || !t(u2)) return null;
    var i2 = g({ h: Number(n2), s: Number(e2), l: Number(u2), a: Number(o3) });
    return f(i2);
  }, "hsl"], [function(r2) {
    var n2 = r2.h, a2 = r2.s, o3 = r2.v, i2 = r2.a, s2 = void 0 === i2 ? 1 : i2;
    if (!t(n2) || !t(a2) || !t(o3)) return null;
    var h2 = (function(r3) {
      return { h: u(r3.h), s: e(r3.s, 0, 100), v: e(r3.v, 0, 100), a: e(r3.a) };
    })({ h: Number(n2), s: Number(a2), v: Number(o3), a: Number(s2) });
    return b(h2);
  }, "hsv"]] };
  var N = function(r2, t3) {
    for (var n2 = 0; n2 < t3.length; n2++) {
      var e2 = t3[n2][0](r2);
      if (e2) return [e2, t3[n2][1]];
    }
    return [null, void 0];
  };
  var x = function(r2) {
    return "string" == typeof r2 ? N(r2.trim(), y.string) : "object" == typeof r2 && null !== r2 ? N(r2, y.object) : [null, void 0];
  };
  var M = function(r2, t3) {
    var n2 = c(r2);
    return { h: n2.h, s: e(n2.s + 100 * t3, 0, 100), l: n2.l, a: n2.a };
  };
  var H = function(r2) {
    return (299 * r2.r + 587 * r2.g + 114 * r2.b) / 1e3 / 255;
  };
  var $ = function(r2, t3) {
    var n2 = c(r2);
    return { h: n2.h, s: n2.s, l: e(n2.l + 100 * t3, 0, 100), a: n2.a };
  };
  var j = (function() {
    function r2(r3) {
      this.parsed = x(r3)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
    }
    return r2.prototype.isValid = function() {
      return null !== this.parsed;
    }, r2.prototype.brightness = function() {
      return n(H(this.rgba), 2);
    }, r2.prototype.isDark = function() {
      return H(this.rgba) < 0.5;
    }, r2.prototype.isLight = function() {
      return H(this.rgba) >= 0.5;
    }, r2.prototype.toHex = function() {
      return r3 = o(this.rgba), t3 = r3.r, e2 = r3.g, u2 = r3.b, i2 = (a2 = r3.a) < 1 ? s(n(255 * a2)) : "", "#" + s(t3) + s(e2) + s(u2) + i2;
      var r3, t3, e2, u2, a2, i2;
    }, r2.prototype.toRgb = function() {
      return o(this.rgba);
    }, r2.prototype.toRgbString = function() {
      return r3 = o(this.rgba), t3 = r3.r, n2 = r3.g, e2 = r3.b, (u2 = r3.a) < 1 ? "rgba(" + t3 + ", " + n2 + ", " + e2 + ", " + u2 + ")" : "rgb(" + t3 + ", " + n2 + ", " + e2 + ")";
      var r3, t3, n2, e2, u2;
    }, r2.prototype.toHsl = function() {
      return d(c(this.rgba));
    }, r2.prototype.toHslString = function() {
      return r3 = d(c(this.rgba)), t3 = r3.h, n2 = r3.s, e2 = r3.l, (u2 = r3.a) < 1 ? "hsla(" + t3 + ", " + n2 + "%, " + e2 + "%, " + u2 + ")" : "hsl(" + t3 + ", " + n2 + "%, " + e2 + "%)";
      var r3, t3, n2, e2, u2;
    }, r2.prototype.toHsv = function() {
      return r3 = h(this.rgba), { h: n(r3.h), s: n(r3.s), v: n(r3.v), a: n(r3.a, 3) };
      var r3;
    }, r2.prototype.invert = function() {
      return w({ r: 255 - (r3 = this.rgba).r, g: 255 - r3.g, b: 255 - r3.b, a: r3.a });
      var r3;
    }, r2.prototype.saturate = function(r3) {
      return void 0 === r3 && (r3 = 0.1), w(M(this.rgba, r3));
    }, r2.prototype.desaturate = function(r3) {
      return void 0 === r3 && (r3 = 0.1), w(M(this.rgba, -r3));
    }, r2.prototype.grayscale = function() {
      return w(M(this.rgba, -1));
    }, r2.prototype.lighten = function(r3) {
      return void 0 === r3 && (r3 = 0.1), w($(this.rgba, r3));
    }, r2.prototype.darken = function(r3) {
      return void 0 === r3 && (r3 = 0.1), w($(this.rgba, -r3));
    }, r2.prototype.rotate = function(r3) {
      return void 0 === r3 && (r3 = 15), this.hue(this.hue() + r3);
    }, r2.prototype.alpha = function(r3) {
      return "number" == typeof r3 ? w({ r: (t3 = this.rgba).r, g: t3.g, b: t3.b, a: r3 }) : n(this.rgba.a, 3);
      var t3;
    }, r2.prototype.hue = function(r3) {
      var t3 = c(this.rgba);
      return "number" == typeof r3 ? w({ h: r3, s: t3.s, l: t3.l, a: t3.a }) : n(t3.h);
    }, r2.prototype.isEqual = function(r3) {
      return this.toHex() === w(r3).toHex();
    }, r2;
  })();
  var w = function(r2) {
    return r2 instanceof j ? r2 : new j(r2);
  };
  var S = [];
  var k = function(r2) {
    r2.forEach(function(r3) {
      S.indexOf(r3) < 0 && (r3(j, y), S.push(r3));
    });
  };

  // node_modules/colord/plugins/names.mjs
  function names_default(e2, f2) {
    var a2 = { white: "#ffffff", bisque: "#ffe4c4", blue: "#0000ff", cadetblue: "#5f9ea0", chartreuse: "#7fff00", chocolate: "#d2691e", coral: "#ff7f50", antiquewhite: "#faebd7", aqua: "#00ffff", azure: "#f0ffff", whitesmoke: "#f5f5f5", papayawhip: "#ffefd5", plum: "#dda0dd", blanchedalmond: "#ffebcd", black: "#000000", gold: "#ffd700", goldenrod: "#daa520", gainsboro: "#dcdcdc", cornsilk: "#fff8dc", cornflowerblue: "#6495ed", burlywood: "#deb887", aquamarine: "#7fffd4", beige: "#f5f5dc", crimson: "#dc143c", cyan: "#00ffff", darkblue: "#00008b", darkcyan: "#008b8b", darkgoldenrod: "#b8860b", darkkhaki: "#bdb76b", darkgray: "#a9a9a9", darkgreen: "#006400", darkgrey: "#a9a9a9", peachpuff: "#ffdab9", darkmagenta: "#8b008b", darkred: "#8b0000", darkorchid: "#9932cc", darkorange: "#ff8c00", darkslateblue: "#483d8b", gray: "#808080", darkslategray: "#2f4f4f", darkslategrey: "#2f4f4f", deeppink: "#ff1493", deepskyblue: "#00bfff", wheat: "#f5deb3", firebrick: "#b22222", floralwhite: "#fffaf0", ghostwhite: "#f8f8ff", darkviolet: "#9400d3", magenta: "#ff00ff", green: "#008000", dodgerblue: "#1e90ff", grey: "#808080", honeydew: "#f0fff0", hotpink: "#ff69b4", blueviolet: "#8a2be2", forestgreen: "#228b22", lawngreen: "#7cfc00", indianred: "#cd5c5c", indigo: "#4b0082", fuchsia: "#ff00ff", brown: "#a52a2a", maroon: "#800000", mediumblue: "#0000cd", lightcoral: "#f08080", darkturquoise: "#00ced1", lightcyan: "#e0ffff", ivory: "#fffff0", lightyellow: "#ffffe0", lightsalmon: "#ffa07a", lightseagreen: "#20b2aa", linen: "#faf0e6", mediumaquamarine: "#66cdaa", lemonchiffon: "#fffacd", lime: "#00ff00", khaki: "#f0e68c", mediumseagreen: "#3cb371", limegreen: "#32cd32", mediumspringgreen: "#00fa9a", lightskyblue: "#87cefa", lightblue: "#add8e6", midnightblue: "#191970", lightpink: "#ffb6c1", mistyrose: "#ffe4e1", moccasin: "#ffe4b5", mintcream: "#f5fffa", lightslategray: "#778899", lightslategrey: "#778899", navajowhite: "#ffdead", navy: "#000080", mediumvioletred: "#c71585", powderblue: "#b0e0e6", palegoldenrod: "#eee8aa", oldlace: "#fdf5e6", paleturquoise: "#afeeee", mediumturquoise: "#48d1cc", mediumorchid: "#ba55d3", rebeccapurple: "#663399", lightsteelblue: "#b0c4de", mediumslateblue: "#7b68ee", thistle: "#d8bfd8", tan: "#d2b48c", orchid: "#da70d6", mediumpurple: "#9370db", purple: "#800080", pink: "#ffc0cb", skyblue: "#87ceeb", springgreen: "#00ff7f", palegreen: "#98fb98", red: "#ff0000", yellow: "#ffff00", slateblue: "#6a5acd", lavenderblush: "#fff0f5", peru: "#cd853f", palevioletred: "#db7093", violet: "#ee82ee", teal: "#008080", slategray: "#708090", slategrey: "#708090", aliceblue: "#f0f8ff", darkseagreen: "#8fbc8f", darkolivegreen: "#556b2f", greenyellow: "#adff2f", seagreen: "#2e8b57", seashell: "#fff5ee", tomato: "#ff6347", silver: "#c0c0c0", sienna: "#a0522d", lavender: "#e6e6fa", lightgreen: "#90ee90", orange: "#ffa500", orangered: "#ff4500", steelblue: "#4682b4", royalblue: "#4169e1", turquoise: "#40e0d0", yellowgreen: "#9acd32", salmon: "#fa8072", saddlebrown: "#8b4513", sandybrown: "#f4a460", rosybrown: "#bc8f8f", darksalmon: "#e9967a", lightgoldenrodyellow: "#fafad2", snow: "#fffafa", lightgrey: "#d3d3d3", lightgray: "#d3d3d3", dimgray: "#696969", dimgrey: "#696969", olivedrab: "#6b8e23", olive: "#808000" }, r2 = {};
    for (var d2 in a2) r2[a2[d2]] = d2;
    var l2 = {};
    e2.prototype.toName = function(f3) {
      if (!(this.rgba.a || this.rgba.r || this.rgba.g || this.rgba.b)) return "transparent";
      var d3, i2, n2 = r2[this.toHex()];
      if (n2) return n2;
      if (null == f3 ? void 0 : f3.closest) {
        var o3 = this.toRgb(), t3 = 1 / 0, b2 = "black";
        if (!l2.length) for (var c2 in a2) l2[c2] = new e2(a2[c2]).toRgb();
        for (var g2 in a2) {
          var u2 = (d3 = o3, i2 = l2[g2], Math.pow(d3.r - i2.r, 2) + Math.pow(d3.g - i2.g, 2) + Math.pow(d3.b - i2.b, 2));
          u2 < t3 && (t3 = u2, b2 = g2);
        }
        return b2;
      }
    };
    f2.string.push([function(f3) {
      var r3 = f3.toLowerCase(), d3 = "transparent" === r3 ? "#0000" : a2[r3];
      return d3 ? new e2(d3).toRgb() : null;
    }, "name"]);
  }

  // node_modules/colord/plugins/a11y.mjs
  var o2 = function(o3) {
    var t3 = o3 / 255;
    return t3 < 0.04045 ? t3 / 12.92 : Math.pow((t3 + 0.055) / 1.055, 2.4);
  };
  var t2 = function(t3) {
    return 0.2126 * o2(t3.r) + 0.7152 * o2(t3.g) + 0.0722 * o2(t3.b);
  };
  function a11y_default(o3) {
    o3.prototype.luminance = function() {
      return o4 = t2(this.rgba), void 0 === (r2 = 2) && (r2 = 0), void 0 === n2 && (n2 = Math.pow(10, r2)), Math.round(n2 * o4) / n2 + 0;
      var o4, r2, n2;
    }, o3.prototype.contrast = function(r2) {
      void 0 === r2 && (r2 = "#FFF");
      var n2, a2, i2, e2, v2, u2, d2, c2 = r2 instanceof o3 ? r2 : new o3(r2);
      return e2 = this.rgba, v2 = c2.toRgb(), u2 = t2(e2), d2 = t2(v2), n2 = u2 > d2 ? (u2 + 0.05) / (d2 + 0.05) : (d2 + 0.05) / (u2 + 0.05), void 0 === (a2 = 2) && (a2 = 0), void 0 === i2 && (i2 = Math.pow(10, a2)), Math.floor(i2 * n2) / i2 + 0;
    }, o3.prototype.isReadable = function(o4, t3) {
      return void 0 === o4 && (o4 = "#FFF"), void 0 === t3 && (t3 = {}), this.contrast(o4) >= (e2 = void 0 === (i2 = (r2 = t3).size) ? "normal" : i2, "AAA" === (a2 = void 0 === (n2 = r2.level) ? "AA" : n2) && "normal" === e2 ? 7 : "AA" === a2 && "large" === e2 ? 3 : 4.5);
      var r2, n2, a2, i2, e2;
    };
  }

  // packages/blocks/build-module/api/utils.mjs
  var import_element = __toESM(require_element(), 1);
  var import_i18n2 = __toESM(require_i18n(), 1);
  var import_dom = __toESM(require_dom(), 1);
  var import_rich_text = __toESM(require_rich_text(), 1);
  var import_deprecated = __toESM(require_deprecated(), 1);

  // packages/blocks/build-module/api/constants.mjs
  var BLOCK_ICON_DEFAULT = "block-default";
  var DEPRECATED_ENTRY_KEYS = [
    "attributes",
    "supports",
    "save",
    "migrate",
    "isEligible",
    "apiVersion"
  ];
  var __EXPERIMENTAL_STYLE_PROPERTY = {
    // Kept for back-compatibility purposes.
    "--wp--style--color--link": {
      value: ["color", "link"],
      support: ["color", "link"]
    },
    aspectRatio: {
      value: ["dimensions", "aspectRatio"],
      support: ["dimensions", "aspectRatio"],
      useEngine: true
    },
    background: {
      value: ["color", "gradient"],
      support: ["color", "gradients"],
      useEngine: true
    },
    backgroundColor: {
      value: ["color", "background"],
      support: ["color", "background"],
      requiresOptOut: true,
      useEngine: true
    },
    backgroundImage: {
      value: ["background", "backgroundImage"],
      support: ["background", "backgroundImage"],
      useEngine: true
    },
    backgroundRepeat: {
      value: ["background", "backgroundRepeat"],
      support: ["background", "backgroundRepeat"],
      useEngine: true
    },
    backgroundSize: {
      value: ["background", "backgroundSize"],
      support: ["background", "backgroundSize"],
      useEngine: true
    },
    backgroundPosition: {
      value: ["background", "backgroundPosition"],
      support: ["background", "backgroundPosition"],
      useEngine: true
    },
    borderColor: {
      value: ["border", "color"],
      support: ["__experimentalBorder", "color"],
      useEngine: true
    },
    borderRadius: {
      value: ["border", "radius"],
      support: ["__experimentalBorder", "radius"],
      properties: {
        borderTopLeftRadius: "topLeft",
        borderTopRightRadius: "topRight",
        borderBottomLeftRadius: "bottomLeft",
        borderBottomRightRadius: "bottomRight"
      },
      useEngine: true
    },
    borderStyle: {
      value: ["border", "style"],
      support: ["__experimentalBorder", "style"],
      useEngine: true
    },
    borderWidth: {
      value: ["border", "width"],
      support: ["__experimentalBorder", "width"],
      useEngine: true
    },
    borderTopColor: {
      value: ["border", "top", "color"],
      support: ["__experimentalBorder", "color"],
      useEngine: true
    },
    borderTopStyle: {
      value: ["border", "top", "style"],
      support: ["__experimentalBorder", "style"],
      useEngine: true
    },
    borderTopWidth: {
      value: ["border", "top", "width"],
      support: ["__experimentalBorder", "width"],
      useEngine: true
    },
    borderRightColor: {
      value: ["border", "right", "color"],
      support: ["__experimentalBorder", "color"],
      useEngine: true
    },
    borderRightStyle: {
      value: ["border", "right", "style"],
      support: ["__experimentalBorder", "style"],
      useEngine: true
    },
    borderRightWidth: {
      value: ["border", "right", "width"],
      support: ["__experimentalBorder", "width"],
      useEngine: true
    },
    borderBottomColor: {
      value: ["border", "bottom", "color"],
      support: ["__experimentalBorder", "color"],
      useEngine: true
    },
    borderBottomStyle: {
      value: ["border", "bottom", "style"],
      support: ["__experimentalBorder", "style"],
      useEngine: true
    },
    borderBottomWidth: {
      value: ["border", "bottom", "width"],
      support: ["__experimentalBorder", "width"],
      useEngine: true
    },
    borderLeftColor: {
      value: ["border", "left", "color"],
      support: ["__experimentalBorder", "color"],
      useEngine: true
    },
    borderLeftStyle: {
      value: ["border", "left", "style"],
      support: ["__experimentalBorder", "style"],
      useEngine: true
    },
    borderLeftWidth: {
      value: ["border", "left", "width"],
      support: ["__experimentalBorder", "width"],
      useEngine: true
    },
    color: {
      value: ["color", "text"],
      support: ["color", "text"],
      requiresOptOut: true,
      useEngine: true
    },
    columnCount: {
      value: ["typography", "textColumns"],
      support: ["typography", "textColumns"],
      useEngine: true
    },
    filter: {
      value: ["filter", "duotone"],
      support: ["filter", "duotone"]
    },
    linkColor: {
      value: ["elements", "link", "color", "text"],
      support: ["color", "link"]
    },
    captionColor: {
      value: ["elements", "caption", "color", "text"],
      support: ["color", "caption"]
    },
    buttonColor: {
      value: ["elements", "button", "color", "text"],
      support: ["color", "button"]
    },
    buttonBackgroundColor: {
      value: ["elements", "button", "color", "background"],
      support: ["color", "button"]
    },
    headingColor: {
      value: ["elements", "heading", "color", "text"],
      support: ["color", "heading"]
    },
    headingBackgroundColor: {
      value: ["elements", "heading", "color", "background"],
      support: ["color", "heading"]
    },
    fontFamily: {
      value: ["typography", "fontFamily"],
      support: ["typography", "__experimentalFontFamily"],
      useEngine: true
    },
    fontSize: {
      value: ["typography", "fontSize"],
      support: ["typography", "fontSize"],
      useEngine: true
    },
    fontStyle: {
      value: ["typography", "fontStyle"],
      support: ["typography", "__experimentalFontStyle"],
      useEngine: true
    },
    fontWeight: {
      value: ["typography", "fontWeight"],
      support: ["typography", "__experimentalFontWeight"],
      useEngine: true
    },
    lineHeight: {
      value: ["typography", "lineHeight"],
      support: ["typography", "lineHeight"],
      useEngine: true
    },
    margin: {
      value: ["spacing", "margin"],
      support: ["spacing", "margin"],
      properties: {
        marginTop: "top",
        marginRight: "right",
        marginBottom: "bottom",
        marginLeft: "left"
      },
      useEngine: true
    },
    minHeight: {
      value: ["dimensions", "minHeight"],
      support: ["dimensions", "minHeight"],
      useEngine: true
    },
    height: {
      value: ["dimensions", "height"],
      support: ["dimensions", "height"],
      useEngine: true
    },
    width: {
      value: ["dimensions", "width"],
      support: ["dimensions", "width"],
      useEngine: true
    },
    padding: {
      value: ["spacing", "padding"],
      support: ["spacing", "padding"],
      properties: {
        paddingTop: "top",
        paddingRight: "right",
        paddingBottom: "bottom",
        paddingLeft: "left"
      },
      useEngine: true
    },
    textAlign: {
      value: ["typography", "textAlign"],
      support: ["typography", "textAlign"],
      useEngine: false
    },
    textDecoration: {
      value: ["typography", "textDecoration"],
      support: ["typography", "__experimentalTextDecoration"],
      useEngine: true
    },
    textTransform: {
      value: ["typography", "textTransform"],
      support: ["typography", "__experimentalTextTransform"],
      useEngine: true
    },
    letterSpacing: {
      value: ["typography", "letterSpacing"],
      support: ["typography", "__experimentalLetterSpacing"],
      useEngine: true
    },
    textIndent: {
      value: ["typography", "textIndent"],
      support: ["typography", "textIndent"],
      useEngine: true
    },
    writingMode: {
      value: ["typography", "writingMode"],
      support: ["typography", "__experimentalWritingMode"],
      useEngine: true
    },
    "--wp--style--root--padding": {
      value: ["spacing", "padding"],
      support: ["spacing", "padding"],
      properties: {
        "--wp--style--root--padding-top": "top",
        "--wp--style--root--padding-right": "right",
        "--wp--style--root--padding-bottom": "bottom",
        "--wp--style--root--padding-left": "left"
      },
      rootOnly: true
    }
  };
  var __EXPERIMENTAL_ELEMENTS = {
    link: "a:where(:not(.wp-element-button))",
    heading: "h1, h2, h3, h4, h5, h6",
    h1: "h1",
    h2: "h2",
    h3: "h3",
    h4: "h4",
    h5: "h5",
    h6: "h6",
    button: ".wp-element-button, .wp-block-button__link",
    caption: ".wp-element-caption, .wp-block-audio figcaption, .wp-block-embed figcaption, .wp-block-gallery figcaption, .wp-block-image figcaption, .wp-block-table figcaption, .wp-block-video figcaption",
    cite: "cite",
    select: "select",
    textInput: "textarea, input:where([type=email],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=url])"
  };
  var __EXPERIMENTAL_PATHS_WITH_OVERRIDE = {
    "color.duotone": true,
    "color.gradients": true,
    "color.palette": true,
    "dimensions.aspectRatios": true,
    "typography.fontSizes": true,
    "spacing.spacingSizes": true
  };

  // packages/blocks/build-module/api/registration.mjs
  var import_data = __toESM(require_data(), 1);
  var import_i18n = __toESM(require_i18n(), 1);
  var import_warning = __toESM(require_warning(), 1);

  // packages/blocks/build-module/api/i18n-block.json
  var i18n_block_default = {
    title: "block title",
    description: "block description",
    keywords: ["block keyword"],
    styles: [
      {
        label: "block style label"
      }
    ],
    variations: [
      {
        title: "block variation title",
        description: "block variation description",
        keywords: ["block variation keyword"]
      }
    ]
  };

  // packages/blocks/build-module/lock-unlock.mjs
  var import_private_apis = __toESM(require_private_apis(), 1);
  var { lock, unlock } = (0, import_private_apis.__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/blocks"
  );

  // packages/blocks/build-module/api/registration.mjs
  function isObject(object) {
    return object !== null && typeof object === "object";
  }
  function unstable__bootstrapServerSideBlockDefinitions(definitions) {
    const { addBootstrappedBlockType: addBootstrappedBlockType2 } = unlock((0, import_data.dispatch)(store));
    for (const [name, blockType] of Object.entries(definitions)) {
      addBootstrappedBlockType2(name, blockType);
    }
  }
  function getBlockSettingsFromMetadata({ textdomain, ...metadata }) {
    const allowedFields = [
      "apiVersion",
      "title",
      "category",
      "parent",
      "ancestor",
      "icon",
      "description",
      "keywords",
      "attributes",
      "providesContext",
      "usesContext",
      "selectors",
      "supports",
      "styles",
      "example",
      "variations",
      "blockHooks",
      "allowedBlocks"
    ];
    const settings = Object.fromEntries(
      Object.entries(metadata).filter(
        ([key]) => allowedFields.includes(key)
      )
    );
    if (textdomain) {
      Object.keys(i18n_block_default).forEach((key) => {
        if (!settings[key]) {
          return;
        }
        settings[key] = translateBlockSettingUsingI18nSchema(
          i18n_block_default[key],
          settings[key],
          textdomain
        );
      });
    }
    return settings;
  }
  function registerBlockType(blockNameOrMetadata, settings) {
    const name = isObject(blockNameOrMetadata) ? blockNameOrMetadata.name : blockNameOrMetadata;
    if (typeof name !== "string") {
      (0, import_warning.default)("Block names must be strings.");
      return;
    }
    if (!/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(name)) {
      (0, import_warning.default)(
        "Block names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-block"
      );
      return;
    }
    if ((0, import_data.select)(store).getBlockType(name)) {
      (0, import_warning.default)('Block "' + name + '" is already registered.');
      return;
    }
    const { addBootstrappedBlockType: addBootstrappedBlockType2, addUnprocessedBlockType: addUnprocessedBlockType2 } = unlock(
      (0, import_data.dispatch)(store)
    );
    if (isObject(blockNameOrMetadata)) {
      const metadata = getBlockSettingsFromMetadata(blockNameOrMetadata);
      addBootstrappedBlockType2(name, metadata);
    }
    addUnprocessedBlockType2(name, settings);
    return (0, import_data.select)(store).getBlockType(name);
  }
  function translateBlockSettingUsingI18nSchema(i18nSchema, settingValue, textdomain) {
    if (typeof i18nSchema === "string" && typeof settingValue === "string") {
      return (0, import_i18n._x)(settingValue, i18nSchema, textdomain);
    }
    if (Array.isArray(i18nSchema) && i18nSchema.length && Array.isArray(settingValue)) {
      return settingValue.map(
        (value) => translateBlockSettingUsingI18nSchema(
          i18nSchema[0],
          value,
          textdomain
        )
      );
    }
    if (isObject(i18nSchema) && Object.entries(i18nSchema).length && isObject(settingValue)) {
      return Object.keys(settingValue).reduce((accumulator, key) => {
        if (!i18nSchema[key]) {
          accumulator[key] = settingValue[key];
          return accumulator;
        }
        accumulator[key] = translateBlockSettingUsingI18nSchema(
          i18nSchema[key],
          settingValue[key],
          textdomain
        );
        return accumulator;
      }, {});
    }
    return settingValue;
  }
  function registerBlockCollection(namespace, { title, icon }) {
    (0, import_data.dispatch)(store).addBlockCollection(namespace, title, icon);
  }
  function unregisterBlockType(name) {
    const oldBlock = (0, import_data.select)(store).getBlockType(name);
    if (!oldBlock) {
      (0, import_warning.default)('Block "' + name + '" is not registered.');
      return;
    }
    (0, import_data.dispatch)(store).removeBlockTypes(name);
    return oldBlock;
  }
  function setFreeformContentHandlerName(blockName) {
    (0, import_data.dispatch)(store).setFreeformFallbackBlockName(blockName);
  }
  function getFreeformContentHandlerName() {
    return (0, import_data.select)(store).getFreeformFallbackBlockName();
  }
  function getGroupingBlockName() {
    return (0, import_data.select)(store).getGroupingBlockName();
  }
  function setUnregisteredTypeHandlerName(blockName) {
    (0, import_data.dispatch)(store).setUnregisteredFallbackBlockName(blockName);
  }
  function getUnregisteredTypeHandlerName() {
    return (0, import_data.select)(store).getUnregisteredFallbackBlockName();
  }
  function setDefaultBlockName(name) {
    (0, import_data.dispatch)(store).setDefaultBlockName(name);
  }
  function setGroupingBlockName(name) {
    (0, import_data.dispatch)(store).setGroupingBlockName(name);
  }
  function getDefaultBlockName() {
    return (0, import_data.select)(store).getDefaultBlockName();
  }
  function getBlockType(name) {
    return (0, import_data.select)(store)?.getBlockType(name);
  }
  function getBlockTypes() {
    return (0, import_data.select)(store).getBlockTypes();
  }
  function getBlockSupport(nameOrType, feature, defaultSupports) {
    return (0, import_data.select)(store).getBlockSupport(
      nameOrType,
      feature,
      defaultSupports
    );
  }
  function hasBlockSupport(nameOrType, feature, defaultSupports) {
    return (0, import_data.select)(store).hasBlockSupport(
      nameOrType,
      feature,
      defaultSupports
    );
  }
  function isReusableBlock(blockOrType) {
    return blockOrType?.name === "core/block";
  }
  function isTemplatePart(blockOrType) {
    return blockOrType?.name === "core/template-part";
  }
  var getChildBlockNames = (blockName) => {
    return (0, import_data.select)(store).getChildBlockNames(blockName);
  };
  var hasChildBlocks = (blockName) => {
    return (0, import_data.select)(store).hasChildBlocks(blockName);
  };
  var hasChildBlocksWithInserterSupport = (blockName) => {
    return (0, import_data.select)(store).hasChildBlocksWithInserterSupport(blockName);
  };
  var registerBlockStyle = (blockNames, styleVariation) => {
    (0, import_data.dispatch)(store).addBlockStyles(blockNames, styleVariation);
  };
  var unregisterBlockStyle = (blockName, styleVariationName) => {
    (0, import_data.dispatch)(store).removeBlockStyles(blockName, styleVariationName);
  };
  var getBlockVariations = (blockName, scope) => {
    return (0, import_data.select)(store).getBlockVariations(blockName, scope);
  };
  var registerBlockVariation = (blockName, variation) => {
    if (typeof variation.name !== "string") {
      (0, import_warning.default)("Variation names must be unique strings.");
    }
    (0, import_data.dispatch)(store).addBlockVariations(blockName, variation);
  };
  var unregisterBlockVariation = (blockName, variationName) => {
    (0, import_data.dispatch)(store).removeBlockVariations(blockName, variationName);
  };
  var registerBlockBindingsSource = (source) => {
    const {
      name,
      label,
      usesContext,
      getValues,
      setValues,
      canUserEditValue,
      getFieldsList
    } = source;
    const existingSource = unlock(
      (0, import_data.select)(store)
    ).getBlockBindingsSource(name);
    const serverProps = ["label", "usesContext"];
    for (const prop2 in existingSource) {
      if (!serverProps.includes(prop2) && existingSource[prop2]) {
        (0, import_warning.default)(
          'Block bindings source "' + name + '" is already registered.'
        );
        return;
      }
    }
    if (!name) {
      (0, import_warning.default)("Block bindings source must contain a name.");
      return;
    }
    if (typeof name !== "string") {
      (0, import_warning.default)("Block bindings source name must be a string.");
      return;
    }
    if (/[A-Z]+/.test(name)) {
      (0, import_warning.default)(
        "Block bindings source name must not contain uppercase characters."
      );
      return;
    }
    if (!/^[a-z0-9/-]+$/.test(name)) {
      (0, import_warning.default)(
        "Block bindings source name must contain only valid characters: lowercase characters, hyphens, or digits. Example: my-plugin/my-custom-source."
      );
      return;
    }
    if (!/^[a-z0-9-]+\/[a-z0-9-]+$/.test(name)) {
      (0, import_warning.default)(
        "Block bindings source name must contain a namespace and valid characters. Example: my-plugin/my-custom-source."
      );
      return;
    }
    if (!label && !existingSource?.label) {
      (0, import_warning.default)("Block bindings source must contain a label.");
      return;
    }
    if (label && typeof label !== "string") {
      (0, import_warning.default)("Block bindings source label must be a string.");
      return;
    }
    if (label && existingSource?.label && label !== existingSource?.label) {
      (0, import_warning.default)('Block bindings "' + name + '" source label was overridden.');
    }
    if (usesContext && !Array.isArray(usesContext)) {
      (0, import_warning.default)("Block bindings source usesContext must be an array.");
      return;
    }
    if (getValues && typeof getValues !== "function") {
      (0, import_warning.default)("Block bindings source getValues must be a function.");
      return;
    }
    if (setValues && typeof setValues !== "function") {
      (0, import_warning.default)("Block bindings source setValues must be a function.");
      return;
    }
    if (canUserEditValue && typeof canUserEditValue !== "function") {
      (0, import_warning.default)("Block bindings source canUserEditValue must be a function.");
      return;
    }
    if (getFieldsList && typeof getFieldsList !== "function") {
      (0, import_warning.default)("Block bindings source getFieldsList must be a function.");
      return;
    }
    return unlock((0, import_data.dispatch)(store)).addBlockBindingsSource(source);
  };
  function unregisterBlockBindingsSource(name) {
    const oldSource = getBlockBindingsSource(name);
    if (!oldSource) {
      (0, import_warning.default)('Block bindings source "' + name + '" is not registered.');
      return;
    }
    unlock((0, import_data.dispatch)(store)).removeBlockBindingsSource(name);
  }
  function getBlockBindingsSource(name) {
    return unlock((0, import_data.select)(store)).getBlockBindingsSource(name);
  }
  function getBlockBindingsSources() {
    return unlock((0, import_data.select)(store)).getAllBlockBindingsSources();
  }

  // packages/blocks/build-module/api/utils.mjs
  k([names_default, a11y_default]);
  var ICON_COLORS = ["#191e23", "#f8f9f9"];
  function isUnmodifiedBlock(block, role) {
    const blockAttributes = getBlockType(block.name)?.attributes ?? {};
    const attributesByRole = role ? Object.entries(blockAttributes).filter(([key, definition]) => {
      if (role === "content" && key === "metadata") {
        return Object.keys(block.attributes[key]?.bindings ?? {}).length > 0;
      }
      return definition.role === role || definition.__experimentalRole === role;
    }) : [];
    const attributesToCheck = !!attributesByRole.length ? attributesByRole : Object.entries(blockAttributes);
    return attributesToCheck.every(([key, definition]) => {
      const value = block.attributes[key];
      if (definition.hasOwnProperty("default")) {
        return value === definition.default;
      }
      if (definition.type === "rich-text") {
        return !value?.length;
      }
      return value === void 0;
    });
  }
  function isUnmodifiedDefaultBlock(block, role) {
    return block.name === getDefaultBlockName() && isUnmodifiedBlock(block, role);
  }
  function isValidIcon(icon) {
    return !!icon && (typeof icon === "string" || (0, import_element.isValidElement)(icon) || typeof icon === "function" || icon instanceof import_element.Component);
  }
  function normalizeIconObject(icon) {
    icon = icon || BLOCK_ICON_DEFAULT;
    if (isValidIcon(icon)) {
      return { src: icon };
    }
    if ("background" in icon) {
      const colordBgColor = w(icon.background);
      const getColorContrast = (iconColor) => colordBgColor.contrast(iconColor);
      const maxContrast = Math.max(...ICON_COLORS.map(getColorContrast));
      return {
        ...icon,
        foreground: icon.foreground ? icon.foreground : ICON_COLORS.find(
          (iconColor) => getColorContrast(iconColor) === maxContrast
        ),
        shadowColor: colordBgColor.alpha(0.3).toRgbString()
      };
    }
    return icon;
  }
  function normalizeBlockType(blockTypeOrName) {
    if (typeof blockTypeOrName === "string") {
      return getBlockType(blockTypeOrName);
    }
    return blockTypeOrName;
  }
  function getBlockLabel(blockType, attributes, context = "visual") {
    const { __experimentalLabel: getLabel, title } = blockType;
    const label = getLabel && getLabel(attributes, { context });
    if (!label) {
      return title;
    }
    if (label.toPlainText) {
      return label.toPlainText();
    }
    return (0, import_dom.__unstableStripHTML)(label);
  }
  function getAccessibleBlockLabel(blockType, attributes, position, direction = "vertical") {
    const title = blockType?.title;
    const label = blockType ? getBlockLabel(blockType, attributes, "accessibility") : "";
    const hasPosition = position !== void 0;
    const hasLabel = label && label !== title;
    if (hasPosition && direction === "vertical") {
      if (hasLabel) {
        return (0, import_i18n2.sprintf)(
          /* translators: accessibility text. 1: The block title. 2: The block row number. 3: The block label.. */
          (0, import_i18n2.__)("%1$s Block. Row %2$d. %3$s"),
          title,
          position,
          label
        );
      }
      return (0, import_i18n2.sprintf)(
        /* translators: accessibility text. 1: The block title. 2: The block row number. */
        (0, import_i18n2.__)("%1$s Block. Row %2$d"),
        title,
        position
      );
    } else if (hasPosition && direction === "horizontal") {
      if (hasLabel) {
        return (0, import_i18n2.sprintf)(
          /* translators: accessibility text. 1: The block title. 2: The block column number. 3: The block label.. */
          (0, import_i18n2.__)("%1$s Block. Column %2$d. %3$s"),
          title,
          position,
          label
        );
      }
      return (0, import_i18n2.sprintf)(
        /* translators: accessibility text. 1: The block title. 2: The block column number. */
        (0, import_i18n2.__)("%1$s Block. Column %2$d"),
        title,
        position
      );
    }
    if (hasLabel) {
      return (0, import_i18n2.sprintf)(
        /* translators: accessibility text. 1: The block title. 2: The block label. */
        (0, import_i18n2.__)("%1$s Block. %2$s"),
        title,
        label
      );
    }
    return (0, import_i18n2.sprintf)(
      /* translators: accessibility text. %s: The block title. */
      (0, import_i18n2.__)("%s Block"),
      title
    );
  }
  function getDefault(attributeSchema) {
    if (attributeSchema.default !== void 0) {
      return attributeSchema.default;
    }
    if (attributeSchema.type === "rich-text") {
      return new import_rich_text.RichTextData();
    }
  }
  function isBlockRegistered(name) {
    return getBlockType(name) !== void 0;
  }
  function __experimentalSanitizeBlockAttributes(name, attributes) {
    const blockType = getBlockType(name);
    if (void 0 === blockType) {
      throw new Error(`Block type '${name}' is not registered.`);
    }
    return Object.entries(blockType.attributes).reduce(
      (accumulator, [key, schema]) => {
        const value = attributes[key];
        if (void 0 !== value) {
          if (schema.type === "rich-text") {
            if (value instanceof import_rich_text.RichTextData) {
              accumulator[key] = value;
            } else if (typeof value === "string") {
              accumulator[key] = import_rich_text.RichTextData.fromHTMLString(value);
            }
          } else if (schema.type === "string" && value instanceof import_rich_text.RichTextData) {
            accumulator[key] = value.toHTMLString();
          } else {
            accumulator[key] = value;
          }
        } else {
          const _default = getDefault(schema);
          if (void 0 !== _default) {
            accumulator[key] = _default;
          }
        }
        if (["node", "children"].indexOf(schema.source) !== -1) {
          if (typeof accumulator[key] === "string") {
            accumulator[key] = [accumulator[key]];
          } else if (!Array.isArray(accumulator[key])) {
            accumulator[key] = [];
          }
        }
        return accumulator;
      },
      {}
    );
  }
  function getBlockAttributesNamesByRole(name, role) {
    const attributes = getBlockType(name)?.attributes;
    if (!attributes) {
      return [];
    }
    const attributesNames = Object.keys(attributes);
    if (!role) {
      return attributesNames;
    }
    return attributesNames.filter((attributeName) => {
      const attribute = attributes[attributeName];
      if (attribute?.role === role) {
        return true;
      }
      if (attribute?.__experimentalRole === role) {
        (0, import_deprecated.default)("__experimentalRole attribute", {
          since: "6.7",
          version: "6.8",
          alternative: "role attribute",
          hint: `Check the block.json of the ${name} block.`
        });
        return true;
      }
      return false;
    });
  }
  var __experimentalGetBlockAttributesNamesByRole = (...args) => {
    (0, import_deprecated.default)("__experimentalGetBlockAttributesNamesByRole", {
      since: "6.7",
      version: "6.8",
      alternative: "getBlockAttributesNamesByRole"
    });
    return getBlockAttributesNamesByRole(...args);
  };
  function isContentBlock(name) {
    const blockType = getBlockType(name);
    const attributes = blockType?.attributes;
    const supportsContentRole = blockType?.supports?.contentRole;
    if (supportsContentRole) {
      return true;
    }
    if (!attributes) {
      return false;
    }
    return !!Object.keys(attributes)?.some((attributeKey) => {
      const attribute = attributes[attributeKey];
      return attribute?.role === "content" || attribute?.__experimentalRole === "content";
    });
  }
  function omit(object, keys) {
    return Object.fromEntries(
      Object.entries(object).filter(([key]) => !keys.includes(key))
    );
  }

  // packages/blocks/build-module/store/reducer.mjs
  var DEFAULT_CATEGORIES = [
    { slug: "text", title: (0, import_i18n3.__)("Text") },
    { slug: "media", title: (0, import_i18n3.__)("Media") },
    { slug: "design", title: (0, import_i18n3.__)("Design") },
    { slug: "widgets", title: (0, import_i18n3.__)("Widgets") },
    { slug: "theme", title: (0, import_i18n3.__)("Theme") },
    { slug: "embed", title: (0, import_i18n3.__)("Embeds") },
    { slug: "reusable", title: (0, import_i18n3.__)("Reusable blocks") }
  ];
  function keyBlockTypesByName(types) {
    return types.reduce(
      (newBlockTypes, block) => ({
        ...newBlockTypes,
        [block.name]: block
      }),
      {}
    );
  }
  function getUniqueItemsByName(items) {
    return items.reduce((acc, currentItem) => {
      if (!acc.some((item) => item.name === currentItem.name)) {
        acc.push(currentItem);
      }
      return acc;
    }, []);
  }
  function bootstrappedBlockTypes(state = {}, action) {
    switch (action.type) {
      case "ADD_BOOTSTRAPPED_BLOCK_TYPE":
        const { name, blockType } = action;
        const serverDefinition = state[name];
        if (serverDefinition) {
          return state;
        }
        const newDefinition = Object.fromEntries(
          Object.entries(blockType).filter(
            ([, value]) => value !== null && value !== void 0
          ).map(([key, value]) => [camelCase(key), value])
        );
        newDefinition.name = name;
        return {
          ...state,
          [name]: newDefinition
        };
      case "REMOVE_BLOCK_TYPES":
        return omit(state, action.names);
    }
    return state;
  }
  function unprocessedBlockTypes(state = {}, action) {
    switch (action.type) {
      case "ADD_UNPROCESSED_BLOCK_TYPE":
        return {
          ...state,
          [action.name]: action.blockType
        };
      case "REMOVE_BLOCK_TYPES":
        return omit(state, action.names);
    }
    return state;
  }
  function blockTypes(state = {}, action) {
    switch (action.type) {
      case "ADD_BLOCK_TYPES":
        return {
          ...state,
          ...keyBlockTypesByName(action.blockTypes)
        };
      case "REMOVE_BLOCK_TYPES":
        return omit(state, action.names);
    }
    return state;
  }
  function blockStyles(state = {}, action) {
    switch (action.type) {
      case "ADD_BLOCK_TYPES":
        return {
          ...state,
          ...Object.fromEntries(
            Object.entries(
              keyBlockTypesByName(action.blockTypes)
            ).map(([name, blockType]) => [
              name,
              getUniqueItemsByName([
                ...(blockType.styles ?? []).map((style) => ({
                  ...style,
                  source: "block"
                })),
                ...(state[blockType.name] ?? []).filter(
                  ({ source }) => "block" !== source
                )
              ])
            ])
          )
        };
      case "ADD_BLOCK_STYLES":
        const updatedStyles = {};
        action.blockNames.forEach((blockName) => {
          updatedStyles[blockName] = getUniqueItemsByName([
            ...state[blockName] ?? [],
            ...action.styles
          ]);
        });
        return { ...state, ...updatedStyles };
      case "REMOVE_BLOCK_STYLES":
        return {
          ...state,
          [action.blockName]: (state[action.blockName] ?? []).filter(
            (style) => action.styleNames.indexOf(style.name) === -1
          )
        };
    }
    return state;
  }
  function blockVariations(state = {}, action) {
    switch (action.type) {
      case "ADD_BLOCK_TYPES":
        return {
          ...state,
          ...Object.fromEntries(
            Object.entries(
              keyBlockTypesByName(action.blockTypes)
            ).map(([name, blockType]) => {
              return [
                name,
                getUniqueItemsByName([
                  ...(blockType.variations ?? []).map(
                    (variation) => ({
                      ...variation,
                      source: "block"
                    })
                  ),
                  ...(state[blockType.name] ?? []).filter(
                    ({ source }) => "block" !== source
                  )
                ])
              ];
            })
          )
        };
      case "ADD_BLOCK_VARIATIONS":
        return {
          ...state,
          [action.blockName]: getUniqueItemsByName([
            ...state[action.blockName] ?? [],
            ...action.variations
          ])
        };
      case "REMOVE_BLOCK_VARIATIONS":
        return {
          ...state,
          [action.blockName]: (state[action.blockName] ?? []).filter(
            (variation) => action.variationNames.indexOf(variation.name) === -1
          )
        };
    }
    return state;
  }
  function createBlockNameSetterReducer(setActionType) {
    return (state = null, action) => {
      switch (action.type) {
        case "REMOVE_BLOCK_TYPES":
          if (action.names.indexOf(state) !== -1) {
            return null;
          }
          return state;
        case setActionType:
          return action.name || null;
      }
      return state;
    };
  }
  var defaultBlockName = createBlockNameSetterReducer(
    "SET_DEFAULT_BLOCK_NAME"
  );
  var freeformFallbackBlockName = createBlockNameSetterReducer(
    "SET_FREEFORM_FALLBACK_BLOCK_NAME"
  );
  var unregisteredFallbackBlockName = createBlockNameSetterReducer(
    "SET_UNREGISTERED_FALLBACK_BLOCK_NAME"
  );
  var groupingBlockName = createBlockNameSetterReducer(
    "SET_GROUPING_BLOCK_NAME"
  );
  function categories(state = DEFAULT_CATEGORIES, action) {
    switch (action.type) {
      case "SET_CATEGORIES":
        const uniqueCategories = /* @__PURE__ */ new Map();
        (action.categories || []).forEach((category) => {
          uniqueCategories.set(category.slug, category);
        });
        return [...uniqueCategories.values()];
      case "UPDATE_CATEGORY": {
        if (!action.category || !Object.keys(action.category).length) {
          return state;
        }
        const categoryToChange = state.find(
          ({ slug }) => slug === action.slug
        );
        if (categoryToChange) {
          return state.map((category) => {
            if (category.slug === action.slug) {
              return {
                ...category,
                ...action.category
              };
            }
            return category;
          });
        }
      }
    }
    return state;
  }
  function collections(state = {}, action) {
    switch (action.type) {
      case "ADD_BLOCK_COLLECTION":
        return {
          ...state,
          [action.namespace]: {
            title: action.title,
            icon: action.icon
          }
        };
      case "REMOVE_BLOCK_COLLECTION":
        return omit(state, action.namespace);
    }
    return state;
  }
  function getMergedUsesContext(existingUsesContext = [], newUsesContext = []) {
    const mergedArrays = Array.from(
      new Set(existingUsesContext.concat(newUsesContext))
    );
    return mergedArrays.length > 0 ? mergedArrays : void 0;
  }
  function blockBindingsSources(state = {}, action) {
    switch (action.type) {
      case "ADD_BLOCK_BINDINGS_SOURCE":
        return {
          ...state,
          [action.name]: {
            label: action.label || state[action.name]?.label,
            usesContext: getMergedUsesContext(
              state[action.name]?.usesContext,
              action.usesContext
            ),
            getValues: action.getValues,
            setValues: action.setValues,
            // Only set `canUserEditValue` if `setValues` is also defined.
            canUserEditValue: action.setValues && action.canUserEditValue,
            getFieldsList: action.getFieldsList
          }
        };
      case "REMOVE_BLOCK_BINDINGS_SOURCE":
        return omit(state, action.name);
    }
    return state;
  }
  var reducer_default = (0, import_data2.combineReducers)({
    bootstrappedBlockTypes,
    unprocessedBlockTypes,
    blockTypes,
    blockStyles,
    blockVariations,
    defaultBlockName,
    freeformFallbackBlockName,
    unregisteredFallbackBlockName,
    groupingBlockName,
    categories,
    collections,
    blockBindingsSources
  });

  // packages/blocks/build-module/store/selectors.mjs
  var selectors_exports = {};
  __export(selectors_exports, {
    __experimentalHasContentRoleAttribute: () => __experimentalHasContentRoleAttribute,
    getActiveBlockVariation: () => getActiveBlockVariation,
    getBlockStyles: () => getBlockStyles,
    getBlockSupport: () => getBlockSupport2,
    getBlockType: () => getBlockType2,
    getBlockTypes: () => getBlockTypes2,
    getBlockVariations: () => getBlockVariations2,
    getCategories: () => getCategories,
    getChildBlockNames: () => getChildBlockNames2,
    getCollections: () => getCollections,
    getDefaultBlockName: () => getDefaultBlockName2,
    getDefaultBlockVariation: () => getDefaultBlockVariation,
    getFreeformFallbackBlockName: () => getFreeformFallbackBlockName,
    getGroupingBlockName: () => getGroupingBlockName2,
    getUnregisteredFallbackBlockName: () => getUnregisteredFallbackBlockName,
    hasBlockSupport: () => hasBlockSupport2,
    hasChildBlocks: () => hasChildBlocks2,
    hasChildBlocksWithInserterSupport: () => hasChildBlocksWithInserterSupport2,
    isMatchingSearchTerm: () => isMatchingSearchTerm
  });
  var import_remove_accents = __toESM(require_remove_accents(), 1);
  var import_data4 = __toESM(require_data(), 1);
  var import_rich_text2 = __toESM(require_rich_text(), 1);
  var import_deprecated3 = __toESM(require_deprecated(), 1);

  // packages/blocks/build-module/store/utils.mjs
  var getValueFromObjectPath = (object, path, defaultValue) => {
    const normalizedPath = Array.isArray(path) ? path : path.split(".");
    let value = object;
    normalizedPath.forEach((fieldName) => {
      value = value?.[fieldName];
    });
    return value ?? defaultValue;
  };
  function isObject2(candidate) {
    return typeof candidate === "object" && candidate.constructor === Object && candidate !== null;
  }
  function matchesAttributes(blockAttributes, variationAttributes) {
    if (isObject2(blockAttributes) && isObject2(variationAttributes)) {
      return Object.entries(variationAttributes).every(
        ([key, value]) => matchesAttributes(blockAttributes?.[key], value)
      );
    }
    return blockAttributes === variationAttributes;
  }

  // packages/blocks/build-module/store/private-selectors.mjs
  var private_selectors_exports = {};
  __export(private_selectors_exports, {
    getAllBlockBindingsSources: () => getAllBlockBindingsSources,
    getBlockBindingsSource: () => getBlockBindingsSource2,
    getBlockBindingsSourceFieldsList: () => getBlockBindingsSourceFieldsList,
    getBootstrappedBlockType: () => getBootstrappedBlockType,
    getSupportedStyles: () => getSupportedStyles,
    getUnprocessedBlockTypes: () => getUnprocessedBlockTypes,
    hasContentRoleAttribute: () => hasContentRoleAttribute
  });
  var import_data3 = __toESM(require_data(), 1);
  var import_deprecated2 = __toESM(require_deprecated(), 1);
  var ROOT_BLOCK_SUPPORTS = [
    "background",
    "backgroundColor",
    "color",
    "linkColor",
    "captionColor",
    "buttonColor",
    "headingColor",
    "fontFamily",
    "fontSize",
    "fontStyle",
    "fontWeight",
    "lineHeight",
    "padding",
    "contentSize",
    "wideSize",
    "blockGap",
    "textAlign",
    "textDecoration",
    "textIndent",
    "textTransform",
    "letterSpacing"
  ];
  function filterElementBlockSupports(blockSupports, name, element) {
    return blockSupports.filter((support) => {
      if (support === "fontSize" && element === "heading") {
        return false;
      }
      if (support === "textDecoration" && !name && element !== "link") {
        return false;
      }
      if (support === "textTransform" && !name && !(["heading", "h1", "h2", "h3", "h4", "h5", "h6"].includes(
        element
      ) || element === "button" || element === "caption" || element === "text")) {
        return false;
      }
      if (support === "letterSpacing" && !name && !(["heading", "h1", "h2", "h3", "h4", "h5", "h6"].includes(
        element
      ) || element === "button" || element === "caption" || element === "text")) {
        return false;
      }
      if (support === "textIndent" && !name) {
        return false;
      }
      if (support === "textColumns" && !name) {
        return false;
      }
      return true;
    });
  }
  var getSupportedStyles = (0, import_data3.createSelector)(
    (state, name, element) => {
      if (!name) {
        return filterElementBlockSupports(
          ROOT_BLOCK_SUPPORTS,
          name,
          element
        );
      }
      const blockType = getBlockType2(state, name);
      if (!blockType) {
        return [];
      }
      const supportKeys = [];
      if (blockType?.supports?.spacing?.blockGap) {
        supportKeys.push("blockGap");
      }
      if (blockType?.supports?.shadow) {
        supportKeys.push("shadow");
      }
      Object.keys(__EXPERIMENTAL_STYLE_PROPERTY).forEach((styleName) => {
        if (!__EXPERIMENTAL_STYLE_PROPERTY[styleName].support) {
          return;
        }
        if (__EXPERIMENTAL_STYLE_PROPERTY[styleName].requiresOptOut) {
          if (__EXPERIMENTAL_STYLE_PROPERTY[styleName].support[0] in blockType.supports && getValueFromObjectPath(
            blockType.supports,
            __EXPERIMENTAL_STYLE_PROPERTY[styleName].support
          ) !== false) {
            supportKeys.push(styleName);
            return;
          }
        }
        if (getValueFromObjectPath(
          blockType.supports,
          __EXPERIMENTAL_STYLE_PROPERTY[styleName].support,
          false
        )) {
          supportKeys.push(styleName);
        }
      });
      return filterElementBlockSupports(supportKeys, name, element);
    },
    (state, name) => [state.blockTypes[name]]
  );
  function getBootstrappedBlockType(state, name) {
    return state.bootstrappedBlockTypes[name];
  }
  function getUnprocessedBlockTypes(state) {
    return state.unprocessedBlockTypes;
  }
  function getAllBlockBindingsSources(state) {
    return state.blockBindingsSources;
  }
  function getBlockBindingsSource2(state, sourceName) {
    return state.blockBindingsSources[sourceName];
  }
  var getBlockBindingsSourceFieldsList = (0, import_data3.createRegistrySelector)(
    (select3) => (0, import_data3.createSelector)(
      (state, source, blockContext) => {
        if (!source.getFieldsList) {
          return [];
        }
        const context = {};
        if (source?.usesContext?.length) {
          for (const key of source.usesContext) {
            context[key] = blockContext[key];
          }
        }
        return source.getFieldsList({ select: select3, context });
      },
      (state, source, blockContext) => [
        source.getFieldsList,
        source.usesContext,
        blockContext
      ]
    )
  );
  var hasContentRoleAttribute = (state, blockTypeName) => {
    const blockType = getBlockType2(state, blockTypeName);
    if (!blockType) {
      return false;
    }
    return Object.values(blockType.attributes).some(
      ({ role, __experimentalRole }) => {
        if (role === "content") {
          return true;
        }
        if (__experimentalRole === "content") {
          (0, import_deprecated2.default)("__experimentalRole attribute", {
            since: "6.7",
            version: "6.8",
            alternative: "role attribute",
            hint: `Check the block.json of the ${blockTypeName} block.`
          });
          return true;
        }
        return false;
      }
    );
  };

  // packages/blocks/build-module/store/selectors.mjs
  var getNormalizedBlockType = (state, nameOrType) => "string" === typeof nameOrType ? getBlockType2(state, nameOrType) : nameOrType;
  var getBlockTypes2 = (0, import_data4.createSelector)(
    (state) => Object.values(state.blockTypes),
    (state) => [state.blockTypes]
  );
  function getBlockType2(state, name) {
    return state.blockTypes[name];
  }
  function getBlockStyles(state, name) {
    return state.blockStyles[name];
  }
  var getBlockVariations2 = (0, import_data4.createSelector)(
    (state, blockName, scope) => {
      const variations = state.blockVariations[blockName];
      if (!variations || !scope) {
        return variations;
      }
      return variations.filter((variation) => {
        return (variation.scope || ["block", "inserter"]).includes(
          scope
        );
      });
    },
    (state, blockName) => [state.blockVariations[blockName]]
  );
  function getActiveBlockVariation(state, blockName, attributes, scope) {
    const variations = getBlockVariations2(state, blockName, scope);
    if (!variations) {
      return variations;
    }
    const blockType = getBlockType2(state, blockName);
    const attributeKeys = Object.keys(blockType?.attributes || {});
    let match;
    let maxMatchedAttributes = 0;
    for (const variation of variations) {
      if (Array.isArray(variation.isActive)) {
        const definedAttributes = variation.isActive.filter(
          (attribute) => {
            const topLevelAttribute = attribute.split(".")[0];
            return attributeKeys.includes(topLevelAttribute);
          }
        );
        const definedAttributesLength = definedAttributes.length;
        if (definedAttributesLength === 0) {
          continue;
        }
        const isMatch = definedAttributes.every((attribute) => {
          const variationAttributeValue = getValueFromObjectPath(
            variation.attributes,
            attribute
          );
          if (variationAttributeValue === void 0) {
            return false;
          }
          let blockAttributeValue = getValueFromObjectPath(
            attributes,
            attribute
          );
          if (blockAttributeValue instanceof import_rich_text2.RichTextData) {
            blockAttributeValue = blockAttributeValue.toHTMLString();
          }
          return matchesAttributes(
            blockAttributeValue,
            variationAttributeValue
          );
        });
        if (isMatch && definedAttributesLength > maxMatchedAttributes) {
          match = variation;
          maxMatchedAttributes = definedAttributesLength;
        }
      } else if (variation.isActive?.(attributes, variation.attributes)) {
        return match || variation;
      }
    }
    if (!match && ["block", "transform"].includes(scope)) {
      match = variations.find(
        (variation) => variation?.isDefault && !Object.hasOwn(variation, "isActive")
      );
    }
    return match;
  }
  function getDefaultBlockVariation(state, blockName, scope) {
    const variations = getBlockVariations2(state, blockName, scope);
    const defaultVariation = [...variations].reverse().find(({ isDefault }) => !!isDefault);
    return defaultVariation || variations[0];
  }
  function getCategories(state) {
    return state.categories;
  }
  function getCollections(state) {
    return state.collections;
  }
  function getDefaultBlockName2(state) {
    return state.defaultBlockName;
  }
  function getFreeformFallbackBlockName(state) {
    return state.freeformFallbackBlockName;
  }
  function getUnregisteredFallbackBlockName(state) {
    return state.unregisteredFallbackBlockName;
  }
  function getGroupingBlockName2(state) {
    return state.groupingBlockName;
  }
  var getChildBlockNames2 = (0, import_data4.createSelector)(
    (state, blockName) => {
      return getBlockTypes2(state).filter((blockType) => {
        return blockType.parent?.includes(blockName);
      }).map(({ name }) => name);
    },
    (state) => [state.blockTypes]
  );
  var getBlockSupport2 = (state, nameOrType, feature, defaultSupports) => {
    const blockType = getNormalizedBlockType(state, nameOrType);
    if (!blockType?.supports) {
      return defaultSupports;
    }
    return getValueFromObjectPath(
      blockType.supports,
      feature,
      defaultSupports
    );
  };
  function hasBlockSupport2(state, nameOrType, feature, defaultSupports) {
    return !!getBlockSupport2(state, nameOrType, feature, defaultSupports);
  }
  function getNormalizedSearchTerm(term) {
    return (0, import_remove_accents.default)(term ?? "").toLowerCase().trim();
  }
  function isMatchingSearchTerm(state, nameOrType, searchTerm = "") {
    const blockType = getNormalizedBlockType(state, nameOrType);
    const normalizedSearchTerm = getNormalizedSearchTerm(searchTerm);
    const isSearchMatch = (candidate) => getNormalizedSearchTerm(candidate).includes(normalizedSearchTerm);
    return isSearchMatch(blockType.title) || blockType.keywords?.some(isSearchMatch) || isSearchMatch(blockType.category) || typeof blockType.description === "string" && isSearchMatch(blockType.description);
  }
  var hasChildBlocks2 = (state, blockName) => {
    return getChildBlockNames2(state, blockName).length > 0;
  };
  var hasChildBlocksWithInserterSupport2 = (state, blockName) => {
    return getChildBlockNames2(state, blockName).some((childBlockName) => {
      return hasBlockSupport2(state, childBlockName, "inserter", true);
    });
  };
  var __experimentalHasContentRoleAttribute = (...args) => {
    (0, import_deprecated3.default)("__experimentalHasContentRoleAttribute", {
      since: "6.7",
      version: "6.8",
      hint: "This is a private selector."
    });
    return hasContentRoleAttribute(...args);
  };

  // packages/blocks/build-module/store/actions.mjs
  var actions_exports = {};
  __export(actions_exports, {
    __experimentalReapplyBlockFilters: () => __experimentalReapplyBlockFilters,
    addBlockCollection: () => addBlockCollection,
    addBlockStyles: () => addBlockStyles,
    addBlockTypes: () => addBlockTypes,
    addBlockVariations: () => addBlockVariations,
    reapplyBlockTypeFilters: () => reapplyBlockTypeFilters,
    removeBlockCollection: () => removeBlockCollection,
    removeBlockStyles: () => removeBlockStyles,
    removeBlockTypes: () => removeBlockTypes,
    removeBlockVariations: () => removeBlockVariations,
    setCategories: () => setCategories,
    setDefaultBlockName: () => setDefaultBlockName2,
    setFreeformFallbackBlockName: () => setFreeformFallbackBlockName,
    setGroupingBlockName: () => setGroupingBlockName2,
    setUnregisteredFallbackBlockName: () => setUnregisteredFallbackBlockName,
    updateCategory: () => updateCategory
  });
  var import_deprecated5 = __toESM(require_deprecated(), 1);

  // node_modules/is-plain-object/dist/is-plain-object.mjs
  function isObject3(o3) {
    return Object.prototype.toString.call(o3) === "[object Object]";
  }
  function isPlainObject(o3) {
    var ctor, prot;
    if (isObject3(o3) === false) return false;
    ctor = o3.constructor;
    if (ctor === void 0) return true;
    prot = ctor.prototype;
    if (isObject3(prot) === false) return false;
    if (prot.hasOwnProperty("isPrototypeOf") === false) {
      return false;
    }
    return true;
  }

  // packages/blocks/build-module/store/process-block-type.mjs
  var import_react_is = __toESM(require_react_is(), 1);
  var import_deprecated4 = __toESM(require_deprecated(), 1);
  var import_hooks = __toESM(require_hooks(), 1);
  var import_warning2 = __toESM(require_warning(), 1);
  var LEGACY_CATEGORY_MAPPING = {
    common: "text",
    formatting: "text",
    layout: "design"
  };
  function mergeBlockVariations(bootstrappedVariations = [], clientVariations = []) {
    const result = [...bootstrappedVariations];
    clientVariations.forEach((clientVariation) => {
      const index = result.findIndex(
        (bootstrappedVariation) => bootstrappedVariation.name === clientVariation.name
      );
      if (index !== -1) {
        result[index] = { ...result[index], ...clientVariation };
      } else {
        result.push(clientVariation);
      }
    });
    return result;
  }
  var processBlockType = (name, blockSettings) => ({ select: select3 }) => {
    const bootstrappedBlockType = select3.getBootstrappedBlockType(name);
    const blockType = {
      apiVersion: 1,
      name,
      icon: BLOCK_ICON_DEFAULT,
      keywords: [],
      attributes: {},
      providesContext: {},
      usesContext: [],
      selectors: {},
      supports: {},
      styles: [],
      blockHooks: {},
      save: () => null,
      ...bootstrappedBlockType,
      ...blockSettings,
      // blockType.variations can be defined as a filePath.
      variations: mergeBlockVariations(
        Array.isArray(bootstrappedBlockType?.variations) ? bootstrappedBlockType.variations : [],
        Array.isArray(blockSettings?.variations) ? blockSettings.variations : []
      )
    };
    if (!blockType.attributes || typeof blockType.attributes !== "object") {
      (0, import_warning2.default)(
        'The block "' + name + '" is registering attributes as `null` or `undefined`. Use an empty object (`attributes: {}`) or exclude the `attributes` key.'
      );
      blockType.attributes = {};
    }
    const settings = (0, import_hooks.applyFilters)(
      "blocks.registerBlockType",
      blockType,
      name,
      null
    );
    if (settings.apiVersion <= 2) {
      (0, import_deprecated4.default)("Block with API version 2 or lower", {
        since: "6.9",
        hint: `The block "${name}" is registered with API version ${settings.apiVersion}. This means that the post editor may work as a non-iframe editor. Since all editors are planned to work as iframes in the future, set the \`apiVersion\` field to 3 and test the block inside the iframe editor.`,
        link: "https://developer.wordpress.org/block-editor/reference-guides/block-api/block-api-versions/block-migration-for-iframe-editor-compatibility/"
      });
    }
    if (settings.description && typeof settings.description !== "string") {
      (0, import_deprecated4.default)("Declaring non-string block descriptions", {
        since: "6.2"
      });
    }
    if (settings.deprecated) {
      settings.deprecated = settings.deprecated.map(
        (deprecation) => Object.fromEntries(
          Object.entries(
            // Only keep valid deprecation keys.
            (0, import_hooks.applyFilters)(
              "blocks.registerBlockType",
              // Merge deprecation keys with pre-filter settings
              // so that filters that depend on specific keys being
              // present don't fail.
              {
                // Omit deprecation keys here so that deprecations
                // can opt out of specific keys like "supports".
                ...omit(blockType, DEPRECATED_ENTRY_KEYS),
                ...deprecation
              },
              blockType.name,
              deprecation
            )
          ).filter(
            ([key]) => DEPRECATED_ENTRY_KEYS.includes(key)
          )
        )
      );
    }
    if (!isPlainObject(settings)) {
      (0, import_warning2.default)("Block settings must be a valid object.");
      return;
    }
    if (typeof settings.save !== "function") {
      (0, import_warning2.default)('The "save" property must be a valid function.');
      return;
    }
    if ("edit" in settings && !(0, import_react_is.isValidElementType)(settings.edit)) {
      (0, import_warning2.default)('The "edit" property must be a valid component.');
      return;
    }
    if (LEGACY_CATEGORY_MAPPING.hasOwnProperty(settings.category)) {
      settings.category = LEGACY_CATEGORY_MAPPING[settings.category];
    }
    if ("category" in settings && !select3.getCategories().some(({ slug }) => slug === settings.category)) {
      (0, import_warning2.default)(
        'The block "' + name + '" is registered with an invalid category "' + settings.category + '".'
      );
      delete settings.category;
    }
    if (!("title" in settings) || settings.title === "") {
      (0, import_warning2.default)('The block "' + name + '" must have a title.');
      return;
    }
    if (typeof settings.title !== "string") {
      (0, import_warning2.default)("Block titles must be strings.");
      return;
    }
    settings.icon = normalizeIconObject(settings.icon);
    if (!isValidIcon(settings.icon.src)) {
      (0, import_warning2.default)(
        "The icon passed is invalid. The icon should be a string, an element, a function, or an object following the specifications documented in https://developer.wordpress.org/block-editor/developers/block-api/block-registration/#icon-optional"
      );
      return;
    }
    if (typeof settings?.parent === "string" || settings?.parent instanceof String) {
      settings.parent = [settings.parent];
      (0, import_warning2.default)(
        "Parent must be undefined or an array of strings (block types), but it is a string."
      );
    }
    if (!Array.isArray(settings?.parent) && settings?.parent !== void 0) {
      (0, import_warning2.default)(
        "Parent must be undefined or an array of block types, but it is ",
        settings.parent
      );
      return;
    }
    if (1 === settings?.parent?.length && name === settings.parent[0]) {
      (0, import_warning2.default)(
        'Block "' + name + '" cannot be a parent of itself. Please remove the block name from the parent list.'
      );
      return;
    }
    return settings;
  };

  // packages/blocks/build-module/store/actions.mjs
  function addBlockTypes(blockTypes2) {
    return {
      type: "ADD_BLOCK_TYPES",
      blockTypes: Array.isArray(blockTypes2) ? blockTypes2 : [blockTypes2]
    };
  }
  function reapplyBlockTypeFilters() {
    return ({ dispatch: dispatch3, select: select3 }) => {
      const processedBlockTypes = [];
      for (const [name, settings] of Object.entries(
        select3.getUnprocessedBlockTypes()
      )) {
        const result = dispatch3(processBlockType(name, settings));
        if (result) {
          processedBlockTypes.push(result);
        }
      }
      if (!processedBlockTypes.length) {
        return;
      }
      dispatch3.addBlockTypes(processedBlockTypes);
    };
  }
  function __experimentalReapplyBlockFilters() {
    (0, import_deprecated5.default)(
      'wp.data.dispatch( "core/blocks" ).__experimentalReapplyBlockFilters',
      {
        since: "6.4",
        alternative: "reapplyBlockFilters"
      }
    );
    return reapplyBlockTypeFilters();
  }
  function removeBlockTypes(names) {
    return {
      type: "REMOVE_BLOCK_TYPES",
      names: Array.isArray(names) ? names : [names]
    };
  }
  function addBlockStyles(blockNames, styles) {
    return {
      type: "ADD_BLOCK_STYLES",
      styles: Array.isArray(styles) ? styles : [styles],
      blockNames: Array.isArray(blockNames) ? blockNames : [blockNames]
    };
  }
  function removeBlockStyles(blockName, styleNames) {
    return {
      type: "REMOVE_BLOCK_STYLES",
      styleNames: Array.isArray(styleNames) ? styleNames : [styleNames],
      blockName
    };
  }
  function addBlockVariations(blockName, variations) {
    return {
      type: "ADD_BLOCK_VARIATIONS",
      variations: Array.isArray(variations) ? variations : [variations],
      blockName
    };
  }
  function removeBlockVariations(blockName, variationNames) {
    return {
      type: "REMOVE_BLOCK_VARIATIONS",
      variationNames: Array.isArray(variationNames) ? variationNames : [variationNames],
      blockName
    };
  }
  function setDefaultBlockName2(name) {
    return {
      type: "SET_DEFAULT_BLOCK_NAME",
      name
    };
  }
  function setFreeformFallbackBlockName(name) {
    return {
      type: "SET_FREEFORM_FALLBACK_BLOCK_NAME",
      name
    };
  }
  function setUnregisteredFallbackBlockName(name) {
    return {
      type: "SET_UNREGISTERED_FALLBACK_BLOCK_NAME",
      name
    };
  }
  function setGroupingBlockName2(name) {
    return {
      type: "SET_GROUPING_BLOCK_NAME",
      name
    };
  }
  function setCategories(categories2) {
    return {
      type: "SET_CATEGORIES",
      categories: categories2
    };
  }
  function updateCategory(slug, category) {
    return {
      type: "UPDATE_CATEGORY",
      slug,
      category
    };
  }
  function addBlockCollection(namespace, title, icon) {
    return {
      type: "ADD_BLOCK_COLLECTION",
      namespace,
      title,
      icon
    };
  }
  function removeBlockCollection(namespace) {
    return {
      type: "REMOVE_BLOCK_COLLECTION",
      namespace
    };
  }

  // packages/blocks/build-module/store/private-actions.mjs
  var private_actions_exports = {};
  __export(private_actions_exports, {
    addBlockBindingsSource: () => addBlockBindingsSource,
    addBootstrappedBlockType: () => addBootstrappedBlockType,
    addUnprocessedBlockType: () => addUnprocessedBlockType,
    removeBlockBindingsSource: () => removeBlockBindingsSource
  });
  function addBootstrappedBlockType(name, blockType) {
    return {
      type: "ADD_BOOTSTRAPPED_BLOCK_TYPE",
      name,
      blockType
    };
  }
  function addUnprocessedBlockType(name, blockType) {
    return ({ dispatch: dispatch3 }) => {
      dispatch3({ type: "ADD_UNPROCESSED_BLOCK_TYPE", name, blockType });
      const processedBlockType = dispatch3(
        processBlockType(name, blockType)
      );
      if (!processedBlockType) {
        return;
      }
      dispatch3.addBlockTypes(processedBlockType);
    };
  }
  function addBlockBindingsSource(source) {
    return {
      type: "ADD_BLOCK_BINDINGS_SOURCE",
      name: source.name,
      label: source.label,
      usesContext: source.usesContext,
      getValues: source.getValues,
      setValues: source.setValues,
      canUserEditValue: source.canUserEditValue,
      getFieldsList: source.getFieldsList
    };
  }
  function removeBlockBindingsSource(name) {
    return {
      type: "REMOVE_BLOCK_BINDINGS_SOURCE",
      name
    };
  }

  // packages/blocks/build-module/store/constants.mjs
  var STORE_NAME = "core/blocks";

  // packages/blocks/build-module/store/index.mjs
  var store = (0, import_data5.createReduxStore)(STORE_NAME, {
    reducer: reducer_default,
    selectors: selectors_exports,
    actions: actions_exports
  });
  (0, import_data5.register)(store);
  unlock(store).registerPrivateSelectors(private_selectors_exports);
  unlock(store).registerPrivateActions(private_actions_exports);

  // node_modules/uuid/dist/esm-browser/rng.js
  var getRandomValues;
  var rnds8 = new Uint8Array(16);
  function rng() {
    if (!getRandomValues) {
      getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
      if (!getRandomValues) {
        throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
      }
    }
    return getRandomValues(rnds8);
  }

  // node_modules/uuid/dist/esm-browser/stringify.js
  var byteToHex = [];
  for (let i2 = 0; i2 < 256; ++i2) {
    byteToHex.push((i2 + 256).toString(16).slice(1));
  }
  function unsafeStringify(arr, offset = 0) {
    return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
  }

  // node_modules/uuid/dist/esm-browser/native.js
  var randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
  var native_default = {
    randomUUID
  };

  // node_modules/uuid/dist/esm-browser/v4.js
  function v4(options, buf, offset) {
    if (native_default.randomUUID && !buf && !options) {
      return native_default.randomUUID();
    }
    options = options || {};
    const rnds = options.random || (options.rng || rng)();
    rnds[6] = rnds[6] & 15 | 64;
    rnds[8] = rnds[8] & 63 | 128;
    if (buf) {
      offset = offset || 0;
      for (let i2 = 0; i2 < 16; ++i2) {
        buf[offset + i2] = rnds[i2];
      }
      return buf;
    }
    return unsafeStringify(rnds);
  }
  var v4_default = v4;

  // packages/blocks/build-module/api/factory.mjs
  var import_hooks2 = __toESM(require_hooks(), 1);
  function createBlock(name, attributes = {}, innerBlocks = []) {
    if (!isBlockRegistered(name)) {
      return createBlock("core/missing", {
        originalName: name,
        originalContent: "",
        originalUndelimitedContent: ""
      });
    }
    const sanitizedAttributes = __experimentalSanitizeBlockAttributes(
      name,
      attributes
    );
    const clientId = v4_default();
    return {
      clientId,
      name,
      isValid: true,
      attributes: sanitizedAttributes,
      innerBlocks
    };
  }
  function createBlocksFromInnerBlocksTemplate(innerBlocksOrTemplate = []) {
    return innerBlocksOrTemplate.map((innerBlock) => {
      const innerBlockTemplate = Array.isArray(innerBlock) ? innerBlock : [
        innerBlock.name,
        innerBlock.attributes,
        innerBlock.innerBlocks
      ];
      const [name, attributes, innerBlocks = []] = innerBlockTemplate;
      return createBlock(
        name,
        attributes,
        createBlocksFromInnerBlocksTemplate(innerBlocks)
      );
    });
  }
  function __experimentalCloneSanitizedBlock(block, mergeAttributes = {}, newInnerBlocks) {
    const { name } = block;
    if (!isBlockRegistered(name)) {
      return createBlock("core/missing", {
        originalName: name,
        originalContent: "",
        originalUndelimitedContent: ""
      });
    }
    const clientId = v4_default();
    const sanitizedAttributes = __experimentalSanitizeBlockAttributes(name, {
      ...block.attributes,
      ...mergeAttributes
    });
    return {
      ...block,
      clientId,
      attributes: sanitizedAttributes,
      innerBlocks: newInnerBlocks || block.innerBlocks.map(
        (innerBlock) => __experimentalCloneSanitizedBlock(innerBlock)
      )
    };
  }
  function cloneBlock(block, mergeAttributes = {}, newInnerBlocks) {
    const clientId = v4_default();
    return {
      ...block,
      clientId,
      attributes: {
        ...block.attributes,
        ...mergeAttributes
      },
      innerBlocks: newInnerBlocks || block.innerBlocks.map((innerBlock) => cloneBlock(innerBlock))
    };
  }
  var isPossibleTransformForSource = (transform, direction, blocks) => {
    if (!blocks.length) {
      return false;
    }
    const isMultiBlock = blocks.length > 1;
    const firstBlockName = blocks[0].name;
    const isValidForMultiBlocks = isWildcardBlockTransform(transform) || !isMultiBlock || transform.isMultiBlock;
    if (!isValidForMultiBlocks) {
      return false;
    }
    if (!isWildcardBlockTransform(transform) && !blocks.every((block) => block.name === firstBlockName)) {
      return false;
    }
    const isBlockType = transform.type === "block";
    if (!isBlockType) {
      return false;
    }
    const sourceBlock = blocks[0];
    const hasMatchingName = direction !== "from" || transform.blocks.indexOf(sourceBlock.name) !== -1 || isWildcardBlockTransform(transform);
    if (!hasMatchingName) {
      return false;
    }
    if (!isMultiBlock && direction === "from" && isContainerGroupBlock(sourceBlock.name) && isContainerGroupBlock(transform.blockName)) {
      return false;
    }
    if (!maybeCheckTransformIsMatch(transform, blocks)) {
      return false;
    }
    return true;
  };
  var getBlockTypesForPossibleFromTransforms = (blocks) => {
    if (!blocks.length) {
      return [];
    }
    const allBlockTypes = getBlockTypes();
    const blockTypesWithPossibleFromTransforms = allBlockTypes.filter(
      (blockType) => {
        const fromTransforms = getBlockTransforms("from", blockType.name);
        return !!findTransform(fromTransforms, (transform) => {
          return isPossibleTransformForSource(
            transform,
            "from",
            blocks
          );
        });
      }
    );
    return blockTypesWithPossibleFromTransforms;
  };
  var getBlockTypesForPossibleToTransforms = (blocks) => {
    if (!blocks.length) {
      return [];
    }
    const sourceBlock = blocks[0];
    const blockType = getBlockType(sourceBlock.name);
    const transformsTo = blockType ? getBlockTransforms("to", blockType.name) : [];
    const possibleTransforms = transformsTo.filter((transform) => {
      return transform && isPossibleTransformForSource(transform, "to", blocks);
    });
    const blockNames = possibleTransforms.map((transformation) => transformation.blocks).flat();
    return blockNames.map(getBlockType);
  };
  var isWildcardBlockTransform = (t3) => t3 && t3.type === "block" && Array.isArray(t3.blocks) && t3.blocks.includes("*");
  var isContainerGroupBlock = (name) => name === getGroupingBlockName();
  function getPossibleBlockTransformations(blocks) {
    if (!blocks.length) {
      return [];
    }
    const blockTypesForFromTransforms = getBlockTypesForPossibleFromTransforms(blocks);
    const blockTypesForToTransforms = getBlockTypesForPossibleToTransforms(blocks);
    return [
      .../* @__PURE__ */ new Set([
        ...blockTypesForFromTransforms,
        ...blockTypesForToTransforms
      ])
    ];
  }
  function findTransform(transforms, predicate) {
    const hooks = (0, import_hooks2.createHooks)();
    for (let i2 = 0; i2 < transforms.length; i2++) {
      const candidate = transforms[i2];
      if (predicate(candidate)) {
        hooks.addFilter(
          "transform",
          "transform/" + i2.toString(),
          (result) => result ? result : candidate,
          candidate.priority
        );
      }
    }
    return hooks.applyFilters("transform", null);
  }
  function getBlockTransforms(direction, blockTypeOrName) {
    if (blockTypeOrName === void 0) {
      return getBlockTypes().map(({ name }) => getBlockTransforms(direction, name)).flat();
    }
    const blockType = normalizeBlockType(blockTypeOrName);
    const { name: blockName, transforms } = blockType || {};
    if (!transforms || !Array.isArray(transforms[direction])) {
      return [];
    }
    const usingMobileTransformations = transforms.supportedMobileTransforms && Array.isArray(transforms.supportedMobileTransforms);
    const filteredTransforms = usingMobileTransformations ? transforms[direction].filter((t3) => {
      if (t3.type === "raw") {
        return true;
      }
      if (t3.type === "prefix") {
        return true;
      }
      if (!t3.blocks || !t3.blocks.length) {
        return false;
      }
      if (isWildcardBlockTransform(t3)) {
        return true;
      }
      return t3.blocks.every(
        (transformBlockName) => transforms.supportedMobileTransforms.includes(
          transformBlockName
        )
      );
    }) : transforms[direction];
    return filteredTransforms.map((transform) => ({
      ...transform,
      blockName,
      usingMobileTransformations
    }));
  }
  function maybeCheckTransformIsMatch(transform, blocks) {
    if (typeof transform.isMatch !== "function") {
      return true;
    }
    const sourceBlock = blocks[0];
    const attributes = transform.isMultiBlock ? blocks.map((block2) => block2.attributes) : sourceBlock.attributes;
    const block = transform.isMultiBlock ? blocks : sourceBlock;
    return transform.isMatch(attributes, block);
  }
  function switchToBlockType(blocks, name) {
    const blocksArray = Array.isArray(blocks) ? blocks : [blocks];
    const isMultiBlock = blocksArray.length > 1;
    const firstBlock = blocksArray[0];
    const sourceName = firstBlock.name;
    const transformationsFrom = getBlockTransforms("from", name);
    const transformationsTo = getBlockTransforms("to", sourceName);
    const transformation = findTransform(
      transformationsTo,
      (t3) => t3.type === "block" && (isWildcardBlockTransform(t3) || t3.blocks.indexOf(name) !== -1) && (!isMultiBlock || t3.isMultiBlock) && maybeCheckTransformIsMatch(t3, blocksArray)
    ) || findTransform(
      transformationsFrom,
      (t3) => t3.type === "block" && (isWildcardBlockTransform(t3) || t3.blocks.indexOf(sourceName) !== -1) && (!isMultiBlock || t3.isMultiBlock) && maybeCheckTransformIsMatch(t3, blocksArray)
    );
    if (!transformation) {
      return null;
    }
    let transformationResults;
    if (transformation.isMultiBlock) {
      if ("__experimentalConvert" in transformation) {
        transformationResults = transformation.__experimentalConvert(blocksArray);
      } else {
        transformationResults = transformation.transform(
          blocksArray.map((currentBlock) => currentBlock.attributes),
          blocksArray.map((currentBlock) => currentBlock.innerBlocks)
        );
      }
    } else if ("__experimentalConvert" in transformation) {
      transformationResults = transformation.__experimentalConvert(firstBlock);
    } else {
      transformationResults = transformation.transform(
        firstBlock.attributes,
        firstBlock.innerBlocks
      );
    }
    if (transformationResults === null || typeof transformationResults !== "object") {
      return null;
    }
    transformationResults = Array.isArray(transformationResults) ? transformationResults : [transformationResults];
    if (transformationResults.some(
      (result) => !getBlockType(result.name)
    )) {
      return null;
    }
    const hasSwitchedBlock = transformationResults.some(
      (result) => result.name === name
    );
    if (!hasSwitchedBlock) {
      return null;
    }
    const ret = transformationResults.map((result, index, results) => {
      return (0, import_hooks2.applyFilters)(
        "blocks.switchToBlockType.transformedBlock",
        result,
        blocks,
        index,
        results
      );
    });
    return ret;
  }
  var getBlockFromExample = (name, example) => createBlock(
    name,
    example.attributes,
    (example.innerBlocks ?? []).map(
      (innerBlock) => getBlockFromExample(innerBlock.name, innerBlock)
    )
  );

  // packages/blocks/build-module/api/parser/index.mjs
  var import_block_serialization_default_parser = __toESM(require_block_serialization_default_parser(), 1);
  var import_autop2 = __toESM(require_autop(), 1);

  // packages/blocks/build-module/api/serializer.mjs
  var import_element2 = __toESM(require_element(), 1);
  var import_hooks3 = __toESM(require_hooks(), 1);
  var import_is_shallow_equal = __toESM(require_is_shallow_equal(), 1);
  var import_autop = __toESM(require_autop(), 1);
  var import_deprecated6 = __toESM(require_deprecated(), 1);

  // packages/blocks/build-module/api/parser/serialize-raw-block.mjs
  function serializeRawBlock(rawBlock, options = {}) {
    const { isCommentDelimited = true } = options;
    const {
      blockName,
      attrs = {},
      innerBlocks = [],
      innerContent = []
    } = rawBlock;
    let childIndex = 0;
    const content = innerContent.map(
      (item) => (
        // `null` denotes a nested block, otherwise we have an HTML fragment.
        item !== null ? item : serializeRawBlock(innerBlocks[childIndex++], options)
      )
    ).join("\n").replace(/\n+/g, "\n").trim();
    return isCommentDelimited ? getCommentDelimitedContent(blockName, attrs, content) : content;
  }

  // packages/blocks/build-module/api/serializer.mjs
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  function getBlockDefaultClassName(blockName) {
    const className = "wp-block-" + blockName.replace(/\//, "-").replace(/^core-/, "");
    return (0, import_hooks3.applyFilters)(
      "blocks.getBlockDefaultClassName",
      className,
      blockName
    );
  }
  function getBlockMenuDefaultClassName(blockName) {
    const className = "editor-block-list-item-" + blockName.replace(/\//, "-").replace(/^core-/, "");
    return (0, import_hooks3.applyFilters)(
      "blocks.getBlockMenuDefaultClassName",
      className,
      blockName
    );
  }
  var blockPropsProvider = {};
  var innerBlocksPropsProvider = {};
  function getBlockProps(props = {}) {
    const { blockType, attributes } = blockPropsProvider;
    return getBlockProps.skipFilters ? props : (0, import_hooks3.applyFilters)(
      "blocks.getSaveContent.extraProps",
      { ...props },
      blockType,
      attributes
    );
  }
  function getInnerBlocksProps(props = {}) {
    const { innerBlocks } = innerBlocksPropsProvider;
    if (!Array.isArray(innerBlocks)) {
      return { ...props, children: innerBlocks };
    }
    const html2 = serialize(innerBlocks, { isInnerBlocks: true });
    const children = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_element2.RawHTML, { children: html2 });
    return { ...props, children };
  }
  function getSaveElement(blockTypeOrName, attributes, innerBlocks = []) {
    const blockType = normalizeBlockType(blockTypeOrName);
    if (!blockType?.save) {
      return null;
    }
    let { save } = blockType;
    if (save.prototype instanceof import_element2.Component) {
      const instance = new save({ attributes });
      save = instance.render.bind(instance);
    }
    blockPropsProvider.blockType = blockType;
    blockPropsProvider.attributes = attributes;
    innerBlocksPropsProvider.innerBlocks = innerBlocks;
    let element = save({ attributes, innerBlocks });
    if (element !== null && typeof element === "object" && (0, import_hooks3.hasFilter)("blocks.getSaveContent.extraProps") && !(blockType.apiVersion > 1)) {
      const props = (0, import_hooks3.applyFilters)(
        "blocks.getSaveContent.extraProps",
        { ...element.props },
        blockType,
        attributes
      );
      if (!(0, import_is_shallow_equal.isShallowEqual)(props, element.props)) {
        element = (0, import_element2.cloneElement)(element, props);
      }
    }
    return (0, import_hooks3.applyFilters)(
      "blocks.getSaveElement",
      element,
      blockType,
      attributes
    );
  }
  function getSaveContent(blockTypeOrName, attributes, innerBlocks) {
    const blockType = normalizeBlockType(blockTypeOrName);
    return (0, import_element2.renderToString)(
      getSaveElement(blockType, attributes, innerBlocks)
    );
  }
  function getCommentAttributes(blockType, attributes) {
    return Object.entries(blockType.attributes ?? {}).reduce(
      (accumulator, [key, attributeSchema]) => {
        const value = attributes[key];
        if (void 0 === value) {
          return accumulator;
        }
        if (attributeSchema.source !== void 0) {
          return accumulator;
        }
        if (attributeSchema.role === "local") {
          return accumulator;
        }
        if (attributeSchema.__experimentalRole === "local") {
          (0, import_deprecated6.default)("__experimentalRole attribute", {
            since: "6.7",
            version: "6.8",
            alternative: "role attribute",
            hint: `Check the block.json of the ${blockType?.name} block.`
          });
          return accumulator;
        }
        if ("default" in attributeSchema && JSON.stringify(attributeSchema.default) === JSON.stringify(value)) {
          return accumulator;
        }
        accumulator[key] = value;
        return accumulator;
      },
      {}
    );
  }
  function serializeAttributes(attributes) {
    return JSON.stringify(attributes).replaceAll("\\\\", "\\u005c").replaceAll("--", "\\u002d\\u002d").replaceAll("<", "\\u003c").replaceAll(">", "\\u003e").replaceAll("&", "\\u0026").replaceAll('\\"', "\\u0022");
  }
  function getBlockInnerHTML(block) {
    let saveContent = block.originalContent;
    if (block.isValid || block.innerBlocks.length) {
      try {
        saveContent = getSaveContent(
          block.name,
          block.attributes,
          block.innerBlocks
        );
      } catch (error) {
      }
    }
    return saveContent;
  }
  function getCommentDelimitedContent(rawBlockName, attributes, content) {
    const serializedAttributes = attributes && Object.entries(attributes).length ? serializeAttributes(attributes) + " " : "";
    const blockName = rawBlockName?.startsWith("core/") ? rawBlockName.slice(5) : rawBlockName;
    if (!content) {
      return `<!-- wp:${blockName} ${serializedAttributes}/-->`;
    }
    return `<!-- wp:${blockName} ${serializedAttributes}-->
` + content + `
<!-- /wp:${blockName} -->`;
  }
  function serializeBlock(block, { isInnerBlocks = false } = {}) {
    if (!block.isValid && block.__unstableBlockSource) {
      return serializeRawBlock(block.__unstableBlockSource);
    }
    const blockName = block.name;
    const saveContent = getBlockInnerHTML(block);
    if (blockName === getUnregisteredTypeHandlerName() || !isInnerBlocks && blockName === getFreeformContentHandlerName()) {
      return saveContent;
    }
    const blockType = getBlockType(blockName);
    if (!blockType) {
      return saveContent;
    }
    const saveAttributes = getCommentAttributes(blockType, block.attributes);
    return getCommentDelimitedContent(blockName, saveAttributes, saveContent);
  }
  var __unstableSerializeAndClean = /* @__PURE__ */ (() => {
    const cache = /* @__PURE__ */ new WeakMap();
    return (blocks) => {
      const cached = cache.get(blocks);
      if (cached !== void 0) {
        return cached;
      }
      let effectiveBlocks = blocks;
      if (effectiveBlocks.length === 1 && isUnmodifiedDefaultBlock(effectiveBlocks[0])) {
        effectiveBlocks = [];
      }
      let content = serialize(effectiveBlocks);
      if (effectiveBlocks.length === 1 && effectiveBlocks[0].name === getFreeformContentHandlerName() && effectiveBlocks[0].name === "core/freeform") {
        content = (0, import_autop.removep)(content);
      }
      cache.set(blocks, content);
      return content;
    };
  })();
  function serialize(blocks, options) {
    const blocksArray = Array.isArray(blocks) ? blocks : [blocks];
    return blocksArray.map((block) => serializeBlock(block, options)).join("\n\n");
  }

  // node_modules/simple-html-tokenizer/dist/es6/index.js
  var HEXCHARCODE = /^#[xX]([A-Fa-f0-9]+)$/;
  var CHARCODE = /^#([0-9]+)$/;
  var NAMED = /^([A-Za-z0-9]+)$/;
  var EntityParser = (
    /** @class */
    (function() {
      function EntityParser2(named) {
        this.named = named;
      }
      EntityParser2.prototype.parse = function(entity) {
        if (!entity) {
          return;
        }
        var matches = entity.match(HEXCHARCODE);
        if (matches) {
          return String.fromCharCode(parseInt(matches[1], 16));
        }
        matches = entity.match(CHARCODE);
        if (matches) {
          return String.fromCharCode(parseInt(matches[1], 10));
        }
        matches = entity.match(NAMED);
        if (matches) {
          return this.named[matches[1]];
        }
      };
      return EntityParser2;
    })()
  );
  var WSP = /[\t\n\f ]/;
  var ALPHA = /[A-Za-z]/;
  var CRLF = /\r\n?/g;
  function isSpace(char) {
    return WSP.test(char);
  }
  function isAlpha(char) {
    return ALPHA.test(char);
  }
  function preprocessInput(input) {
    return input.replace(CRLF, "\n");
  }
  var EventedTokenizer = (
    /** @class */
    (function() {
      function EventedTokenizer2(delegate, entityParser) {
        this.delegate = delegate;
        this.entityParser = entityParser;
        this.state = "beforeData";
        this.line = -1;
        this.column = -1;
        this.input = "";
        this.index = -1;
        this.tagNameBuffer = "";
        this.states = {
          beforeData: function() {
            var char = this.peek();
            if (char === "<") {
              this.transitionTo(
                "tagOpen"
                /* tagOpen */
              );
              this.markTagStart();
              this.consume();
            } else {
              if (char === "\n") {
                var tag = this.tagNameBuffer.toLowerCase();
                if (tag === "pre" || tag === "textarea") {
                  this.consume();
                }
              }
              this.transitionTo(
                "data"
                /* data */
              );
              this.delegate.beginData();
            }
          },
          data: function() {
            var char = this.peek();
            if (char === "<") {
              this.delegate.finishData();
              this.transitionTo(
                "tagOpen"
                /* tagOpen */
              );
              this.markTagStart();
              this.consume();
            } else if (char === "&") {
              this.consume();
              this.delegate.appendToData(this.consumeCharRef() || "&");
            } else {
              this.consume();
              this.delegate.appendToData(char);
            }
          },
          tagOpen: function() {
            var char = this.consume();
            if (char === "!") {
              this.transitionTo(
                "markupDeclarationOpen"
                /* markupDeclarationOpen */
              );
            } else if (char === "/") {
              this.transitionTo(
                "endTagOpen"
                /* endTagOpen */
              );
            } else if (char === "@" || char === ":" || isAlpha(char)) {
              this.transitionTo(
                "tagName"
                /* tagName */
              );
              this.tagNameBuffer = "";
              this.delegate.beginStartTag();
              this.appendToTagName(char);
            }
          },
          markupDeclarationOpen: function() {
            var char = this.consume();
            if (char === "-" && this.input.charAt(this.index) === "-") {
              this.consume();
              this.transitionTo(
                "commentStart"
                /* commentStart */
              );
              this.delegate.beginComment();
            }
          },
          commentStart: function() {
            var char = this.consume();
            if (char === "-") {
              this.transitionTo(
                "commentStartDash"
                /* commentStartDash */
              );
            } else if (char === ">") {
              this.delegate.finishComment();
              this.transitionTo(
                "beforeData"
                /* beforeData */
              );
            } else {
              this.delegate.appendToCommentData(char);
              this.transitionTo(
                "comment"
                /* comment */
              );
            }
          },
          commentStartDash: function() {
            var char = this.consume();
            if (char === "-") {
              this.transitionTo(
                "commentEnd"
                /* commentEnd */
              );
            } else if (char === ">") {
              this.delegate.finishComment();
              this.transitionTo(
                "beforeData"
                /* beforeData */
              );
            } else {
              this.delegate.appendToCommentData("-");
              this.transitionTo(
                "comment"
                /* comment */
              );
            }
          },
          comment: function() {
            var char = this.consume();
            if (char === "-") {
              this.transitionTo(
                "commentEndDash"
                /* commentEndDash */
              );
            } else {
              this.delegate.appendToCommentData(char);
            }
          },
          commentEndDash: function() {
            var char = this.consume();
            if (char === "-") {
              this.transitionTo(
                "commentEnd"
                /* commentEnd */
              );
            } else {
              this.delegate.appendToCommentData("-" + char);
              this.transitionTo(
                "comment"
                /* comment */
              );
            }
          },
          commentEnd: function() {
            var char = this.consume();
            if (char === ">") {
              this.delegate.finishComment();
              this.transitionTo(
                "beforeData"
                /* beforeData */
              );
            } else {
              this.delegate.appendToCommentData("--" + char);
              this.transitionTo(
                "comment"
                /* comment */
              );
            }
          },
          tagName: function() {
            var char = this.consume();
            if (isSpace(char)) {
              this.transitionTo(
                "beforeAttributeName"
                /* beforeAttributeName */
              );
            } else if (char === "/") {
              this.transitionTo(
                "selfClosingStartTag"
                /* selfClosingStartTag */
              );
            } else if (char === ">") {
              this.delegate.finishTag();
              this.transitionTo(
                "beforeData"
                /* beforeData */
              );
            } else {
              this.appendToTagName(char);
            }
          },
          beforeAttributeName: function() {
            var char = this.peek();
            if (isSpace(char)) {
              this.consume();
              return;
            } else if (char === "/") {
              this.transitionTo(
                "selfClosingStartTag"
                /* selfClosingStartTag */
              );
              this.consume();
            } else if (char === ">") {
              this.consume();
              this.delegate.finishTag();
              this.transitionTo(
                "beforeData"
                /* beforeData */
              );
            } else if (char === "=") {
              this.delegate.reportSyntaxError("attribute name cannot start with equals sign");
              this.transitionTo(
                "attributeName"
                /* attributeName */
              );
              this.delegate.beginAttribute();
              this.consume();
              this.delegate.appendToAttributeName(char);
            } else {
              this.transitionTo(
                "attributeName"
                /* attributeName */
              );
              this.delegate.beginAttribute();
            }
          },
          attributeName: function() {
            var char = this.peek();
            if (isSpace(char)) {
              this.transitionTo(
                "afterAttributeName"
                /* afterAttributeName */
              );
              this.consume();
            } else if (char === "/") {
              this.delegate.beginAttributeValue(false);
              this.delegate.finishAttributeValue();
              this.consume();
              this.transitionTo(
                "selfClosingStartTag"
                /* selfClosingStartTag */
              );
            } else if (char === "=") {
              this.transitionTo(
                "beforeAttributeValue"
                /* beforeAttributeValue */
              );
              this.consume();
            } else if (char === ">") {
              this.delegate.beginAttributeValue(false);
              this.delegate.finishAttributeValue();
              this.consume();
              this.delegate.finishTag();
              this.transitionTo(
                "beforeData"
                /* beforeData */
              );
            } else if (char === '"' || char === "'" || char === "<") {
              this.delegate.reportSyntaxError(char + " is not a valid character within attribute names");
              this.consume();
              this.delegate.appendToAttributeName(char);
            } else {
              this.consume();
              this.delegate.appendToAttributeName(char);
            }
          },
          afterAttributeName: function() {
            var char = this.peek();
            if (isSpace(char)) {
              this.consume();
              return;
            } else if (char === "/") {
              this.delegate.beginAttributeValue(false);
              this.delegate.finishAttributeValue();
              this.consume();
              this.transitionTo(
                "selfClosingStartTag"
                /* selfClosingStartTag */
              );
            } else if (char === "=") {
              this.consume();
              this.transitionTo(
                "beforeAttributeValue"
                /* beforeAttributeValue */
              );
            } else if (char === ">") {
              this.delegate.beginAttributeValue(false);
              this.delegate.finishAttributeValue();
              this.consume();
              this.delegate.finishTag();
              this.transitionTo(
                "beforeData"
                /* beforeData */
              );
            } else {
              this.delegate.beginAttributeValue(false);
              this.delegate.finishAttributeValue();
              this.transitionTo(
                "attributeName"
                /* attributeName */
              );
              this.delegate.beginAttribute();
              this.consume();
              this.delegate.appendToAttributeName(char);
            }
          },
          beforeAttributeValue: function() {
            var char = this.peek();
            if (isSpace(char)) {
              this.consume();
            } else if (char === '"') {
              this.transitionTo(
                "attributeValueDoubleQuoted"
                /* attributeValueDoubleQuoted */
              );
              this.delegate.beginAttributeValue(true);
              this.consume();
            } else if (char === "'") {
              this.transitionTo(
                "attributeValueSingleQuoted"
                /* attributeValueSingleQuoted */
              );
              this.delegate.beginAttributeValue(true);
              this.consume();
            } else if (char === ">") {
              this.delegate.beginAttributeValue(false);
              this.delegate.finishAttributeValue();
              this.consume();
              this.delegate.finishTag();
              this.transitionTo(
                "beforeData"
                /* beforeData */
              );
            } else {
              this.transitionTo(
                "attributeValueUnquoted"
                /* attributeValueUnquoted */
              );
              this.delegate.beginAttributeValue(false);
              this.consume();
              this.delegate.appendToAttributeValue(char);
            }
          },
          attributeValueDoubleQuoted: function() {
            var char = this.consume();
            if (char === '"') {
              this.delegate.finishAttributeValue();
              this.transitionTo(
                "afterAttributeValueQuoted"
                /* afterAttributeValueQuoted */
              );
            } else if (char === "&") {
              this.delegate.appendToAttributeValue(this.consumeCharRef() || "&");
            } else {
              this.delegate.appendToAttributeValue(char);
            }
          },
          attributeValueSingleQuoted: function() {
            var char = this.consume();
            if (char === "'") {
              this.delegate.finishAttributeValue();
              this.transitionTo(
                "afterAttributeValueQuoted"
                /* afterAttributeValueQuoted */
              );
            } else if (char === "&") {
              this.delegate.appendToAttributeValue(this.consumeCharRef() || "&");
            } else {
              this.delegate.appendToAttributeValue(char);
            }
          },
          attributeValueUnquoted: function() {
            var char = this.peek();
            if (isSpace(char)) {
              this.delegate.finishAttributeValue();
              this.consume();
              this.transitionTo(
                "beforeAttributeName"
                /* beforeAttributeName */
              );
            } else if (char === "/") {
              this.delegate.finishAttributeValue();
              this.consume();
              this.transitionTo(
                "selfClosingStartTag"
                /* selfClosingStartTag */
              );
            } else if (char === "&") {
              this.consume();
              this.delegate.appendToAttributeValue(this.consumeCharRef() || "&");
            } else if (char === ">") {
              this.delegate.finishAttributeValue();
              this.consume();
              this.delegate.finishTag();
              this.transitionTo(
                "beforeData"
                /* beforeData */
              );
            } else {
              this.consume();
              this.delegate.appendToAttributeValue(char);
            }
          },
          afterAttributeValueQuoted: function() {
            var char = this.peek();
            if (isSpace(char)) {
              this.consume();
              this.transitionTo(
                "beforeAttributeName"
                /* beforeAttributeName */
              );
            } else if (char === "/") {
              this.consume();
              this.transitionTo(
                "selfClosingStartTag"
                /* selfClosingStartTag */
              );
            } else if (char === ">") {
              this.consume();
              this.delegate.finishTag();
              this.transitionTo(
                "beforeData"
                /* beforeData */
              );
            } else {
              this.transitionTo(
                "beforeAttributeName"
                /* beforeAttributeName */
              );
            }
          },
          selfClosingStartTag: function() {
            var char = this.peek();
            if (char === ">") {
              this.consume();
              this.delegate.markTagAsSelfClosing();
              this.delegate.finishTag();
              this.transitionTo(
                "beforeData"
                /* beforeData */
              );
            } else {
              this.transitionTo(
                "beforeAttributeName"
                /* beforeAttributeName */
              );
            }
          },
          endTagOpen: function() {
            var char = this.consume();
            if (char === "@" || char === ":" || isAlpha(char)) {
              this.transitionTo(
                "tagName"
                /* tagName */
              );
              this.tagNameBuffer = "";
              this.delegate.beginEndTag();
              this.appendToTagName(char);
            }
          }
        };
        this.reset();
      }
      EventedTokenizer2.prototype.reset = function() {
        this.transitionTo(
          "beforeData"
          /* beforeData */
        );
        this.input = "";
        this.index = 0;
        this.line = 1;
        this.column = 0;
        this.delegate.reset();
      };
      EventedTokenizer2.prototype.transitionTo = function(state) {
        this.state = state;
      };
      EventedTokenizer2.prototype.tokenize = function(input) {
        this.reset();
        this.tokenizePart(input);
        this.tokenizeEOF();
      };
      EventedTokenizer2.prototype.tokenizePart = function(input) {
        this.input += preprocessInput(input);
        while (this.index < this.input.length) {
          var handler = this.states[this.state];
          if (handler !== void 0) {
            handler.call(this);
          } else {
            throw new Error("unhandled state " + this.state);
          }
        }
      };
      EventedTokenizer2.prototype.tokenizeEOF = function() {
        this.flushData();
      };
      EventedTokenizer2.prototype.flushData = function() {
        if (this.state === "data") {
          this.delegate.finishData();
          this.transitionTo(
            "beforeData"
            /* beforeData */
          );
        }
      };
      EventedTokenizer2.prototype.peek = function() {
        return this.input.charAt(this.index);
      };
      EventedTokenizer2.prototype.consume = function() {
        var char = this.peek();
        this.index++;
        if (char === "\n") {
          this.line++;
          this.column = 0;
        } else {
          this.column++;
        }
        return char;
      };
      EventedTokenizer2.prototype.consumeCharRef = function() {
        var endIndex = this.input.indexOf(";", this.index);
        if (endIndex === -1) {
          return;
        }
        var entity = this.input.slice(this.index, endIndex);
        var chars = this.entityParser.parse(entity);
        if (chars) {
          var count = entity.length;
          while (count) {
            this.consume();
            count--;
          }
          this.consume();
          return chars;
        }
      };
      EventedTokenizer2.prototype.markTagStart = function() {
        this.delegate.tagOpen();
      };
      EventedTokenizer2.prototype.appendToTagName = function(char) {
        this.tagNameBuffer += char;
        this.delegate.appendToTagName(char);
      };
      return EventedTokenizer2;
    })()
  );
  var Tokenizer = (
    /** @class */
    (function() {
      function Tokenizer2(entityParser, options) {
        if (options === void 0) {
          options = {};
        }
        this.options = options;
        this.token = null;
        this.startLine = 1;
        this.startColumn = 0;
        this.tokens = [];
        this.tokenizer = new EventedTokenizer(this, entityParser);
        this._currentAttribute = void 0;
      }
      Tokenizer2.prototype.tokenize = function(input) {
        this.tokens = [];
        this.tokenizer.tokenize(input);
        return this.tokens;
      };
      Tokenizer2.prototype.tokenizePart = function(input) {
        this.tokens = [];
        this.tokenizer.tokenizePart(input);
        return this.tokens;
      };
      Tokenizer2.prototype.tokenizeEOF = function() {
        this.tokens = [];
        this.tokenizer.tokenizeEOF();
        return this.tokens[0];
      };
      Tokenizer2.prototype.reset = function() {
        this.token = null;
        this.startLine = 1;
        this.startColumn = 0;
      };
      Tokenizer2.prototype.current = function() {
        var token = this.token;
        if (token === null) {
          throw new Error("token was unexpectedly null");
        }
        if (arguments.length === 0) {
          return token;
        }
        for (var i2 = 0; i2 < arguments.length; i2++) {
          if (token.type === arguments[i2]) {
            return token;
          }
        }
        throw new Error("token type was unexpectedly " + token.type);
      };
      Tokenizer2.prototype.push = function(token) {
        this.token = token;
        this.tokens.push(token);
      };
      Tokenizer2.prototype.currentAttribute = function() {
        return this._currentAttribute;
      };
      Tokenizer2.prototype.addLocInfo = function() {
        if (this.options.loc) {
          this.current().loc = {
            start: {
              line: this.startLine,
              column: this.startColumn
            },
            end: {
              line: this.tokenizer.line,
              column: this.tokenizer.column
            }
          };
        }
        this.startLine = this.tokenizer.line;
        this.startColumn = this.tokenizer.column;
      };
      Tokenizer2.prototype.beginData = function() {
        this.push({
          type: "Chars",
          chars: ""
        });
      };
      Tokenizer2.prototype.appendToData = function(char) {
        this.current(
          "Chars"
          /* Chars */
        ).chars += char;
      };
      Tokenizer2.prototype.finishData = function() {
        this.addLocInfo();
      };
      Tokenizer2.prototype.beginComment = function() {
        this.push({
          type: "Comment",
          chars: ""
        });
      };
      Tokenizer2.prototype.appendToCommentData = function(char) {
        this.current(
          "Comment"
          /* Comment */
        ).chars += char;
      };
      Tokenizer2.prototype.finishComment = function() {
        this.addLocInfo();
      };
      Tokenizer2.prototype.tagOpen = function() {
      };
      Tokenizer2.prototype.beginStartTag = function() {
        this.push({
          type: "StartTag",
          tagName: "",
          attributes: [],
          selfClosing: false
        });
      };
      Tokenizer2.prototype.beginEndTag = function() {
        this.push({
          type: "EndTag",
          tagName: ""
        });
      };
      Tokenizer2.prototype.finishTag = function() {
        this.addLocInfo();
      };
      Tokenizer2.prototype.markTagAsSelfClosing = function() {
        this.current(
          "StartTag"
          /* StartTag */
        ).selfClosing = true;
      };
      Tokenizer2.prototype.appendToTagName = function(char) {
        this.current(
          "StartTag",
          "EndTag"
          /* EndTag */
        ).tagName += char;
      };
      Tokenizer2.prototype.beginAttribute = function() {
        this._currentAttribute = ["", "", false];
      };
      Tokenizer2.prototype.appendToAttributeName = function(char) {
        this.currentAttribute()[0] += char;
      };
      Tokenizer2.prototype.beginAttributeValue = function(isQuoted) {
        this.currentAttribute()[2] = isQuoted;
      };
      Tokenizer2.prototype.appendToAttributeValue = function(char) {
        this.currentAttribute()[1] += char;
      };
      Tokenizer2.prototype.finishAttributeValue = function() {
        this.current(
          "StartTag"
          /* StartTag */
        ).attributes.push(this._currentAttribute);
      };
      Tokenizer2.prototype.reportSyntaxError = function(message) {
        this.current().syntaxError = message;
      };
      return Tokenizer2;
    })()
  );

  // packages/blocks/build-module/api/validation/index.mjs
  var import_es6 = __toESM(require_es6(), 1);
  var import_deprecated7 = __toESM(require_deprecated(), 1);
  var import_html_entities = __toESM(require_html_entities(), 1);

  // packages/blocks/build-module/api/validation/logger.mjs
  function createLogger() {
    function createLogHandler(logger) {
      return (message, ...args) => logger("Block validation: " + message, ...args);
    }
    return {
      // eslint-disable-next-line no-console
      error: createLogHandler(console.error),
      // eslint-disable-next-line no-console
      warning: createLogHandler(console.warn),
      getItems() {
        return [];
      }
    };
  }
  function createQueuedLogger() {
    const queue = [];
    const logger = createLogger();
    return {
      error(...args) {
        queue.push({ log: logger.error, args });
      },
      warning(...args) {
        queue.push({ log: logger.warning, args });
      },
      getItems() {
        return queue;
      }
    };
  }

  // packages/blocks/build-module/api/validation/index.mjs
  var identity = (x2) => x2;
  var REGEXP_WHITESPACE = /[\t\n\r\v\f ]+/g;
  var REGEXP_ONLY_WHITESPACE = /^[\t\n\r\v\f ]*$/;
  var REGEXP_STYLE_URL_TYPE = /^url\s*\(['"\s]*(.*?)['"\s]*\)$/;
  var BOOLEAN_ATTRIBUTES = [
    "allowfullscreen",
    "allowpaymentrequest",
    "allowusermedia",
    "async",
    "autofocus",
    "autoplay",
    "checked",
    "controls",
    "default",
    "defer",
    "disabled",
    "download",
    "formnovalidate",
    "hidden",
    "ismap",
    "itemscope",
    "loop",
    "multiple",
    "muted",
    "nomodule",
    "novalidate",
    "open",
    "playsinline",
    "readonly",
    "required",
    "reversed",
    "selected",
    "typemustmatch"
  ];
  var ENUMERATED_ATTRIBUTES = [
    "autocapitalize",
    "autocomplete",
    "charset",
    "contenteditable",
    "crossorigin",
    "decoding",
    "dir",
    "draggable",
    "enctype",
    "formenctype",
    "formmethod",
    "http-equiv",
    "inputmode",
    "kind",
    "method",
    "preload",
    "scope",
    "shape",
    "spellcheck",
    "translate",
    "type",
    "wrap"
  ];
  var MEANINGFUL_ATTRIBUTES = [
    ...BOOLEAN_ATTRIBUTES,
    ...ENUMERATED_ATTRIBUTES
  ];
  var TEXT_NORMALIZATIONS = [identity, getTextWithCollapsedWhitespace];
  var REGEXP_NAMED_CHARACTER_REFERENCE = /^[\da-z]+$/i;
  var REGEXP_DECIMAL_CHARACTER_REFERENCE = /^#\d+$/;
  var REGEXP_HEXADECIMAL_CHARACTER_REFERENCE = /^#x[\da-f]+$/i;
  function isValidCharacterReference(text2) {
    return REGEXP_NAMED_CHARACTER_REFERENCE.test(text2) || REGEXP_DECIMAL_CHARACTER_REFERENCE.test(text2) || REGEXP_HEXADECIMAL_CHARACTER_REFERENCE.test(text2);
  }
  var DecodeEntityParser = class {
    /**
     * Returns a substitute string for an entity string sequence between `&`
     * and `;`, or undefined if no substitution should occur.
     *
     * @param {string} entity Entity fragment discovered in HTML.
     *
     * @return {string | undefined} Entity substitute value.
     */
    parse(entity) {
      if (isValidCharacterReference(entity)) {
        return (0, import_html_entities.decodeEntities)("&" + entity + ";");
      }
    }
  };
  function getTextPiecesSplitOnWhitespace(text2) {
    return text2.trim().split(REGEXP_WHITESPACE);
  }
  function getTextWithCollapsedWhitespace(text2) {
    return getTextPiecesSplitOnWhitespace(text2).join(" ");
  }
  function getMeaningfulAttributePairs(token) {
    return token.attributes.filter((pair) => {
      const [key, value] = pair;
      return value || key.indexOf("data-") === 0 || MEANINGFUL_ATTRIBUTES.includes(key);
    });
  }
  function isEquivalentTextTokens(actual, expected, logger = createLogger()) {
    let actualChars = actual.chars;
    let expectedChars = expected.chars;
    for (let i2 = 0; i2 < TEXT_NORMALIZATIONS.length; i2++) {
      const normalize = TEXT_NORMALIZATIONS[i2];
      actualChars = normalize(actualChars);
      expectedChars = normalize(expectedChars);
      if (actualChars === expectedChars) {
        return true;
      }
    }
    logger.warning(
      "Expected text `%s`, saw `%s`.",
      expected.chars,
      actual.chars
    );
    return false;
  }
  function getNormalizedLength(value) {
    if (0 === parseFloat(value)) {
      return "0";
    }
    if (value.indexOf(".") === 0) {
      return "0" + value;
    }
    return value;
  }
  function getNormalizedStyleValue(value) {
    const textPieces = getTextPiecesSplitOnWhitespace(value);
    const normalizedPieces = textPieces.map(getNormalizedLength);
    const result = normalizedPieces.join(" ");
    return result.replace(REGEXP_STYLE_URL_TYPE, "url($1)");
  }
  function getStyleProperties(text2) {
    const pairs = text2.replace(/;?\s*$/, "").split(";").map((style) => {
      const [key, ...valueParts] = style.split(":");
      const value = valueParts.join(":");
      return [key.trim(), getNormalizedStyleValue(value.trim())];
    });
    return Object.fromEntries(pairs);
  }
  var isEqualAttributesOfName = {
    class: (actual, expected) => {
      const [actualPieces, expectedPieces] = [actual, expected].map(
        getTextPiecesSplitOnWhitespace
      );
      const actualDiff = actualPieces.filter(
        (c2) => !expectedPieces.includes(c2)
      );
      const expectedDiff = expectedPieces.filter(
        (c2) => !actualPieces.includes(c2)
      );
      return actualDiff.length === 0 && expectedDiff.length === 0;
    },
    style: (actual, expected) => {
      return (0, import_es6.default)(
        ...[actual, expected].map(getStyleProperties)
      );
    },
    // For each boolean attribute, mere presence of attribute in both is enough
    // to assume equivalence.
    ...Object.fromEntries(
      BOOLEAN_ATTRIBUTES.map((attribute) => [attribute, () => true])
    )
  };
  function isEqualTagAttributePairs(actual, expected, logger = createLogger()) {
    if (actual.length !== expected.length) {
      logger.warning(
        "Expected attributes %o, instead saw %o.",
        expected,
        actual
      );
      return false;
    }
    const expectedAttributes = {};
    for (let i2 = 0; i2 < expected.length; i2++) {
      expectedAttributes[expected[i2][0].toLowerCase()] = expected[i2][1];
    }
    for (let i2 = 0; i2 < actual.length; i2++) {
      const [name, actualValue] = actual[i2];
      const nameLower = name.toLowerCase();
      if (!expectedAttributes.hasOwnProperty(nameLower)) {
        logger.warning("Encountered unexpected attribute `%s`.", name);
        return false;
      }
      const expectedValue = expectedAttributes[nameLower];
      const isEqualAttributes = isEqualAttributesOfName[nameLower];
      if (isEqualAttributes) {
        if (!isEqualAttributes(actualValue, expectedValue)) {
          logger.warning(
            "Expected attribute `%s` of value `%s`, saw `%s`.",
            name,
            expectedValue,
            actualValue
          );
          return false;
        }
      } else if (actualValue !== expectedValue) {
        logger.warning(
          "Expected attribute `%s` of value `%s`, saw `%s`.",
          name,
          expectedValue,
          actualValue
        );
        return false;
      }
    }
    return true;
  }
  var isEqualTokensOfType = {
    StartTag: (actual, expected, logger = createLogger()) => {
      if (actual.tagName !== expected.tagName && // Optimization: Use short-circuit evaluation to defer case-
      // insensitive check on the assumption that the majority case will
      // have exactly equal tag names.
      actual.tagName.toLowerCase() !== expected.tagName.toLowerCase()) {
        logger.warning(
          "Expected tag name `%s`, instead saw `%s`.",
          expected.tagName,
          actual.tagName
        );
        return false;
      }
      return isEqualTagAttributePairs(
        ...[actual, expected].map(getMeaningfulAttributePairs),
        logger
      );
    },
    Chars: isEquivalentTextTokens,
    Comment: isEquivalentTextTokens
  };
  function getNextNonWhitespaceToken(tokens) {
    let token;
    while (token = tokens.shift()) {
      if (token.type !== "Chars") {
        return token;
      }
      if (!REGEXP_ONLY_WHITESPACE.test(token.chars)) {
        return token;
      }
    }
  }
  function getHTMLTokens(html2, logger = createLogger()) {
    try {
      return new Tokenizer(new DecodeEntityParser()).tokenize(html2);
    } catch (e2) {
      logger.warning("Malformed HTML detected: %s", html2);
    }
    return null;
  }
  function isClosedByToken(currentToken, nextToken) {
    if (!currentToken.selfClosing) {
      return false;
    }
    if (nextToken && nextToken.tagName === currentToken.tagName && nextToken.type === "EndTag") {
      return true;
    }
    return false;
  }
  function isEquivalentHTML(actual, expected, logger = createLogger()) {
    if (actual === expected) {
      return true;
    }
    const [actualTokens, expectedTokens] = [actual, expected].map(
      (html2) => getHTMLTokens(html2, logger)
    );
    if (!actualTokens || !expectedTokens) {
      return false;
    }
    let actualToken, expectedToken;
    while (actualToken = getNextNonWhitespaceToken(actualTokens)) {
      expectedToken = getNextNonWhitespaceToken(expectedTokens);
      if (!expectedToken) {
        logger.warning(
          "Expected end of content, instead saw %o.",
          actualToken
        );
        return false;
      }
      if (actualToken.type !== expectedToken.type) {
        logger.warning(
          "Expected token of type `%s` (%o), instead saw `%s` (%o).",
          expectedToken.type,
          expectedToken,
          actualToken.type,
          actualToken
        );
        return false;
      }
      const isEqualTokens = isEqualTokensOfType[actualToken.type];
      if (isEqualTokens && !isEqualTokens(actualToken, expectedToken, logger)) {
        return false;
      }
      if (isClosedByToken(actualToken, expectedTokens[0])) {
        getNextNonWhitespaceToken(expectedTokens);
      } else if (isClosedByToken(expectedToken, actualTokens[0])) {
        getNextNonWhitespaceToken(actualTokens);
      }
    }
    if (expectedToken = getNextNonWhitespaceToken(expectedTokens)) {
      logger.warning(
        "Expected %o, instead saw end of content.",
        expectedToken
      );
      return false;
    }
    return true;
  }
  function validateBlock(block, blockTypeOrName = block.name) {
    const isFallbackBlock = block.name === getFreeformContentHandlerName() || block.name === getUnregisteredTypeHandlerName();
    if (isFallbackBlock) {
      return [true, []];
    }
    const logger = createQueuedLogger();
    const blockType = normalizeBlockType(blockTypeOrName);
    let generatedBlockContent;
    try {
      generatedBlockContent = getSaveContent(blockType, block.attributes);
    } catch (error) {
      logger.error(
        "Block validation failed because an error occurred while generating block content:\n\n%s",
        error.toString()
      );
      return [false, logger.getItems()];
    }
    const isValid = isEquivalentHTML(
      block.originalContent,
      generatedBlockContent,
      logger
    );
    if (!isValid) {
      logger.error(
        "Block validation failed for `%s` (%o).\n\nContent generated by `save` function:\n\n%s\n\nContent retrieved from post body:\n\n%s",
        blockType.name,
        blockType,
        generatedBlockContent,
        block.originalContent
      );
    }
    return [isValid, logger.getItems()];
  }
  function isValidBlockContent(blockTypeOrName, attributes, originalBlockContent) {
    (0, import_deprecated7.default)("isValidBlockContent introduces opportunity for data loss", {
      since: "12.6",
      plugin: "Gutenberg",
      alternative: "validateBlock"
    });
    const blockType = normalizeBlockType(blockTypeOrName);
    const block = {
      name: blockType.name,
      attributes,
      innerBlocks: [],
      originalContent: originalBlockContent
    };
    const [isValid] = validateBlock(block, blockType);
    return isValid;
  }

  // packages/blocks/build-module/api/parser/convert-legacy-block.mjs
  function convertLegacyBlockNameAndAttributes(name, attributes) {
    const newAttributes = { ...attributes };
    if ("core/cover-image" === name) {
      name = "core/cover";
    }
    if ("core/text" === name || "core/cover-text" === name) {
      name = "core/paragraph";
    }
    if (name && name.indexOf("core/social-link-") === 0) {
      newAttributes.service = name.substring(17);
      name = "core/social-link";
    }
    if (name && name.indexOf("core-embed/") === 0) {
      const providerSlug = name.substring(11);
      const deprecated12 = {
        speaker: "speaker-deck",
        polldaddy: "crowdsignal"
      };
      newAttributes.providerNameSlug = providerSlug in deprecated12 ? deprecated12[providerSlug] : providerSlug;
      if (!["amazon-kindle", "wordpress"].includes(providerSlug)) {
        newAttributes.responsive = true;
      }
      name = "core/embed";
    }
    if (name === "core/post-comment-author") {
      name = "core/comment-author-name";
    }
    if (name === "core/post-comment-content") {
      name = "core/comment-content";
    }
    if (name === "core/post-comment-date") {
      name = "core/comment-date";
    }
    if (name === "core/comments-query-loop") {
      name = "core/comments";
      const { className = "" } = newAttributes;
      if (!className.includes("wp-block-comments-query-loop")) {
        newAttributes.className = [
          "wp-block-comments-query-loop",
          className
        ].join(" ");
      }
    }
    if (name === "core/post-comments") {
      name = "core/comments";
      newAttributes.legacy = true;
    }
    if (attributes.layout?.type === "grid" && typeof attributes.layout?.columnCount === "string") {
      newAttributes.layout = {
        ...newAttributes.layout,
        columnCount: parseInt(attributes.layout.columnCount, 10)
      };
    }
    if (typeof attributes.style?.layout?.columnSpan === "string") {
      const columnSpanNumber = parseInt(
        attributes.style.layout.columnSpan,
        10
      );
      newAttributes.style = {
        ...newAttributes.style,
        layout: {
          ...newAttributes.style.layout,
          columnSpan: isNaN(columnSpanNumber) ? void 0 : columnSpanNumber
        }
      };
    }
    if (typeof attributes.style?.layout?.rowSpan === "string") {
      const rowSpanNumber = parseInt(attributes.style.layout.rowSpan, 10);
      newAttributes.style = {
        ...newAttributes.style,
        layout: {
          ...newAttributes.style.layout,
          rowSpan: isNaN(rowSpanNumber) ? void 0 : rowSpanNumber
        }
      };
    }
    return [name, newAttributes];
  }

  // node_modules/hpq/es/get-path.js
  function getPath(object, path) {
    var segments = path.split(".");
    var segment;
    while (segment = segments.shift()) {
      if (!(segment in object)) {
        return;
      }
      object = object[segment];
    }
    return object;
  }

  // node_modules/hpq/es/index.js
  var getDocument = /* @__PURE__ */ (function() {
    var doc;
    return function() {
      if (!doc) {
        doc = document.implementation.createHTMLDocument("");
      }
      return doc;
    };
  })();
  function parse(source, matchers) {
    if (!matchers) {
      return;
    }
    if ("string" === typeof source) {
      var doc = getDocument();
      doc.body.innerHTML = source;
      source = doc.body;
    }
    if ("function" === typeof matchers) {
      return matchers(source);
    }
    if (Object !== matchers.constructor) {
      return;
    }
    return Object.keys(matchers).reduce(function(memo, key) {
      memo[key] = parse(source, matchers[key]);
      return memo;
    }, {});
  }
  function prop(selector, name) {
    if (1 === arguments.length) {
      name = selector;
      selector = void 0;
    }
    return function(node) {
      var match = node;
      if (selector) {
        match = node.querySelector(selector);
      }
      if (match) {
        return getPath(match, name);
      }
    };
  }
  function attr(selector, name) {
    if (1 === arguments.length) {
      name = selector;
      selector = void 0;
    }
    return function(node) {
      var attributes = prop(selector, "attributes")(node);
      if (attributes && attributes.hasOwnProperty(name)) {
        return attributes[name].value;
      }
    };
  }
  function text(selector) {
    return prop(selector, "textContent");
  }
  function query(selector, matchers) {
    return function(node) {
      var matches = node.querySelectorAll(selector);
      return [].map.call(matches, function(match) {
        return parse(match, matchers);
      });
    };
  }

  // node_modules/memize/dist/index.js
  function memize(fn, options) {
    var size = 0;
    var head;
    var tail;
    options = options || {};
    function memoized() {
      var node = head, len = arguments.length, args, i2;
      searchCache: while (node) {
        if (node.args.length !== arguments.length) {
          node = node.next;
          continue;
        }
        for (i2 = 0; i2 < len; i2++) {
          if (node.args[i2] !== arguments[i2]) {
            node = node.next;
            continue searchCache;
          }
        }
        if (node !== head) {
          if (node === tail) {
            tail = node.prev;
          }
          node.prev.next = node.next;
          if (node.next) {
            node.next.prev = node.prev;
          }
          node.next = head;
          node.prev = null;
          head.prev = node;
          head = node;
        }
        return node.val;
      }
      args = new Array(len);
      for (i2 = 0; i2 < len; i2++) {
        args[i2] = arguments[i2];
      }
      node = {
        args,
        // Generate the result from original function
        val: fn.apply(null, args)
      };
      if (head) {
        head.prev = node;
        node.next = head;
      } else {
        tail = node;
      }
      if (size === /** @type {MemizeOptions} */
      options.maxSize) {
        tail = /** @type {MemizeCacheNode} */
        tail.prev;
        tail.next = null;
      } else {
        size++;
      }
      head = node;
      return node.val;
    }
    memoized.clear = function() {
      head = null;
      tail = null;
      size = 0;
    };
    return memoized;
  }

  // packages/blocks/build-module/api/parser/get-block-attributes.mjs
  var import_hooks4 = __toESM(require_hooks(), 1);
  var import_rich_text4 = __toESM(require_rich_text(), 1);

  // packages/blocks/build-module/api/matchers.mjs
  var import_rich_text3 = __toESM(require_rich_text(), 1);

  // packages/blocks/build-module/api/node.mjs
  var import_deprecated9 = __toESM(require_deprecated(), 1);

  // packages/blocks/build-module/api/children.mjs
  var import_element3 = __toESM(require_element(), 1);
  var import_deprecated8 = __toESM(require_deprecated(), 1);
  function getSerializeCapableElement(children) {
    return children;
  }
  function getChildrenArray(children) {
    (0, import_deprecated8.default)("wp.blocks.children.getChildrenArray", {
      since: "6.1",
      version: "6.3",
      link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
    });
    return children;
  }
  function concat(...blockNodes) {
    (0, import_deprecated8.default)("wp.blocks.children.concat", {
      since: "6.1",
      version: "6.3",
      alternative: "wp.richText.concat",
      link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
    });
    const result = [];
    for (let i2 = 0; i2 < blockNodes.length; i2++) {
      const blockNode = Array.isArray(blockNodes[i2]) ? blockNodes[i2] : [blockNodes[i2]];
      for (let j2 = 0; j2 < blockNode.length; j2++) {
        const child = blockNode[j2];
        const canConcatToPreviousString = typeof child === "string" && typeof result[result.length - 1] === "string";
        if (canConcatToPreviousString) {
          result[result.length - 1] += child;
        } else {
          result.push(child);
        }
      }
    }
    return result;
  }
  function fromDOM22(domNodes) {
    (0, import_deprecated8.default)("wp.blocks.children.fromDOM", {
      since: "6.1",
      version: "6.3",
      alternative: "wp.richText.create",
      link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
    });
    const result = [];
    for (let i2 = 0; i2 < domNodes.length; i2++) {
      try {
        result.push(fromDOM2(domNodes[i2]));
      } catch (error) {
      }
    }
    return result;
  }
  function toHTML(children) {
    (0, import_deprecated8.default)("wp.blocks.children.toHTML", {
      since: "6.1",
      version: "6.3",
      alternative: "wp.richText.toHTMLString",
      link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
    });
    const element = getSerializeCapableElement(children);
    return (0, import_element3.renderToString)(element);
  }
  function matcher(selector) {
    (0, import_deprecated8.default)("wp.blocks.children.matcher", {
      since: "6.1",
      version: "6.3",
      alternative: "html source",
      link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
    });
    return (domNode) => {
      let match = domNode;
      if (selector) {
        match = domNode.querySelector(selector);
      }
      if (match) {
        return fromDOM22(match.childNodes);
      }
      return [];
    };
  }
  var children_default = {
    concat,
    getChildrenArray,
    fromDOM: fromDOM22,
    toHTML,
    matcher
  };

  // packages/blocks/build-module/api/node.mjs
  function isNodeOfType(node, type) {
    (0, import_deprecated9.default)("wp.blocks.node.isNodeOfType", {
      since: "6.1",
      version: "6.3",
      link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
    });
    return node && node.type === type;
  }
  function getNamedNodeMapAsObject(nodeMap) {
    const result = {};
    for (let i2 = 0; i2 < nodeMap.length; i2++) {
      const { name, value } = nodeMap[i2];
      result[name] = value;
    }
    return result;
  }
  function fromDOM2(domNode) {
    (0, import_deprecated9.default)("wp.blocks.node.fromDOM", {
      since: "6.1",
      version: "6.3",
      alternative: "wp.richText.create",
      link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
    });
    if (domNode.nodeType === domNode.TEXT_NODE) {
      return domNode.nodeValue;
    }
    if (domNode.nodeType !== domNode.ELEMENT_NODE) {
      throw new TypeError(
        "A block node can only be created from a node of type text or element."
      );
    }
    return {
      type: domNode.nodeName.toLowerCase(),
      props: {
        ...getNamedNodeMapAsObject(domNode.attributes),
        children: fromDOM22(domNode.childNodes)
      }
    };
  }
  function toHTML2(node) {
    (0, import_deprecated9.default)("wp.blocks.node.toHTML", {
      since: "6.1",
      version: "6.3",
      alternative: "wp.richText.toHTMLString",
      link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
    });
    return toHTML([node]);
  }
  function matcher2(selector) {
    (0, import_deprecated9.default)("wp.blocks.node.matcher", {
      since: "6.1",
      version: "6.3",
      alternative: "html source",
      link: "https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"
    });
    return (domNode) => {
      let match = domNode;
      if (selector) {
        match = domNode.querySelector(selector);
      }
      try {
        return fromDOM2(match);
      } catch (error) {
        return null;
      }
    };
  }
  var node_default = {
    isNodeOfType,
    fromDOM: fromDOM2,
    toHTML: toHTML2,
    matcher: matcher2
  };

  // packages/blocks/build-module/api/matchers.mjs
  function html(selector, multilineTag) {
    return (domNode) => {
      let match = domNode;
      if (selector) {
        match = domNode.querySelector(selector);
      }
      if (!match) {
        return "";
      }
      if (multilineTag) {
        let value = "";
        const length = match.children.length;
        for (let index = 0; index < length; index++) {
          const child = match.children[index];
          if (child.nodeName.toLowerCase() !== multilineTag) {
            continue;
          }
          value += child.outerHTML;
        }
        return value;
      }
      return match.innerHTML;
    };
  }
  var richText = (selector, preserveWhiteSpace) => (el) => {
    const target = selector ? el.querySelector(selector) : el;
    return target ? import_rich_text3.RichTextData.fromHTMLElement(target, { preserveWhiteSpace }) : import_rich_text3.RichTextData.empty();
  };

  // packages/blocks/build-module/api/parser/get-block-attributes.mjs
  var toBooleanAttributeMatcher = (matcher3) => (value) => matcher3(value) !== void 0;
  function isOfType(value, type) {
    switch (type) {
      case "rich-text":
        return value instanceof import_rich_text4.RichTextData;
      case "string":
        return typeof value === "string";
      case "boolean":
        return typeof value === "boolean";
      case "object":
        return !!value && value.constructor === Object;
      case "null":
        return value === null;
      case "array":
        return Array.isArray(value);
      case "integer":
      case "number":
        return typeof value === "number";
    }
    return true;
  }
  function isOfTypes(value, types) {
    return types.some((type) => isOfType(value, type));
  }
  function getBlockAttribute(attributeKey, attributeSchema, innerDOM, commentAttributes, innerHTML) {
    let value;
    switch (attributeSchema.source) {
      // An undefined source means that it's an attribute serialized to the
      // block's "comment".
      case void 0:
        value = commentAttributes ? commentAttributes[attributeKey] : void 0;
        break;
      // raw source means that it's the original raw block content.
      case "raw":
        value = innerHTML;
        break;
      case "attribute":
      case "property":
      case "html":
      case "text":
      case "rich-text":
      case "children":
      case "node":
      case "query":
      case "tag":
        value = parseWithAttributeSchema(innerDOM, attributeSchema);
        break;
    }
    if (!isValidByType(value, attributeSchema.type) || !isValidByEnum(value, attributeSchema.enum)) {
      value = void 0;
    }
    if (value === void 0) {
      value = getDefault(attributeSchema);
    }
    return value;
  }
  function isValidByType(value, type) {
    return type === void 0 || isOfTypes(value, Array.isArray(type) ? type : [type]);
  }
  function isValidByEnum(value, enumSet) {
    return !Array.isArray(enumSet) || enumSet.includes(value);
  }
  var matcherFromSource = memize((sourceConfig) => {
    switch (sourceConfig.source) {
      case "attribute": {
        let matcher3 = attr(sourceConfig.selector, sourceConfig.attribute);
        if (sourceConfig.type === "boolean") {
          matcher3 = toBooleanAttributeMatcher(matcher3);
        }
        return matcher3;
      }
      case "html":
        return html(sourceConfig.selector, sourceConfig.multiline);
      case "text":
        return text(sourceConfig.selector);
      case "rich-text":
        return richText(
          sourceConfig.selector,
          sourceConfig.__unstablePreserveWhiteSpace
        );
      case "children":
        return matcher(sourceConfig.selector);
      case "node":
        return matcher2(sourceConfig.selector);
      case "query":
        const subMatchers = Object.fromEntries(
          Object.entries(sourceConfig.query).map(
            ([key, subSourceConfig]) => [
              key,
              matcherFromSource(subSourceConfig)
            ]
          )
        );
        return query(sourceConfig.selector, subMatchers);
      case "tag": {
        const matcher3 = prop(sourceConfig.selector, "nodeName");
        return (domNode) => matcher3(domNode)?.toLowerCase();
      }
      default:
        console.error(`Unknown source type "${sourceConfig.source}"`);
    }
  });
  function parseHtml(innerHTML) {
    return parse(innerHTML, (h2) => h2);
  }
  function parseWithAttributeSchema(innerHTML, attributeSchema) {
    return matcherFromSource(attributeSchema)(parseHtml(innerHTML));
  }
  function getBlockAttributes(blockTypeOrName, innerHTML, attributes = {}) {
    const doc = parseHtml(innerHTML);
    const blockType = normalizeBlockType(blockTypeOrName);
    const blockAttributes = Object.fromEntries(
      Object.entries(blockType.attributes ?? {}).map(
        ([key, schema]) => [
          key,
          getBlockAttribute(key, schema, doc, attributes, innerHTML)
        ]
      )
    );
    return (0, import_hooks4.applyFilters)(
      "blocks.getBlockAttributes",
      blockAttributes,
      blockType,
      innerHTML,
      attributes
    );
  }

  // packages/blocks/build-module/api/parser/fix-custom-classname.mjs
  var CLASS_ATTR_SCHEMA = {
    type: "string",
    source: "attribute",
    selector: "[data-custom-class-name] > *",
    attribute: "class"
  };
  function getHTMLRootElementClasses(innerHTML) {
    const parsed = parseWithAttributeSchema(
      `<div data-custom-class-name>${innerHTML}</div>`,
      CLASS_ATTR_SCHEMA
    );
    return parsed ? parsed.trim().split(/\s+/) : [];
  }
  function fixCustomClassname(blockAttributes, blockType, innerHTML) {
    if (!hasBlockSupport(blockType, "customClassName", true)) {
      return blockAttributes;
    }
    const modifiedBlockAttributes = { ...blockAttributes };
    const { className: omittedClassName, ...attributesSansClassName } = modifiedBlockAttributes;
    const serialized = getSaveContent(blockType, attributesSansClassName);
    const defaultClasses = getHTMLRootElementClasses(serialized);
    const actualClasses = getHTMLRootElementClasses(innerHTML);
    const customClasses = actualClasses.filter(
      (className) => !defaultClasses.includes(className)
    );
    if (customClasses.length) {
      modifiedBlockAttributes.className = customClasses.join(" ");
    } else if (serialized) {
      delete modifiedBlockAttributes.className;
    }
    return modifiedBlockAttributes;
  }

  // packages/blocks/build-module/api/parser/fix-global-attribute.mjs
  function getHTMLRootElement(innerHTML, dataAttribute, attributeSchema) {
    const parsed = parseWithAttributeSchema(
      `<div ${dataAttribute}>${innerHTML}</div>`,
      attributeSchema
    );
    return parsed;
  }
  function fixGlobalAttribute(blockAttributes, blockType, innerHTML, supportKey, dataAttribute, attributeSchema) {
    if (!hasBlockSupport(blockType, supportKey, false)) {
      return blockAttributes;
    }
    const modifiedBlockAttributes = { ...blockAttributes };
    const attributeValue = getHTMLRootElement(
      innerHTML,
      dataAttribute,
      attributeSchema
    );
    if (attributeValue) {
      modifiedBlockAttributes[supportKey] = attributeValue;
    }
    return modifiedBlockAttributes;
  }

  // packages/blocks/build-module/api/parser/apply-built-in-validation-fixes.mjs
  var ARIA_LABEL_ATTR_SCHEMA = {
    type: "string",
    source: "attribute",
    selector: "[data-aria-label] > *",
    attribute: "aria-label"
  };
  var ANCHOR_ATTR_SCHEMA = {
    type: "string",
    source: "attribute",
    selector: "[data-anchor] > *",
    attribute: "id"
  };
  function applyBuiltInValidationFixes(block, blockType) {
    const { attributes, originalContent } = block;
    let updatedBlockAttributes = attributes;
    updatedBlockAttributes = fixCustomClassname(
      attributes,
      blockType,
      originalContent
    );
    updatedBlockAttributes = fixGlobalAttribute(
      updatedBlockAttributes,
      blockType,
      originalContent,
      "ariaLabel",
      "data-aria-label",
      ARIA_LABEL_ATTR_SCHEMA
    );
    updatedBlockAttributes = fixGlobalAttribute(
      updatedBlockAttributes,
      blockType,
      originalContent,
      "anchor",
      "data-anchor",
      ANCHOR_ATTR_SCHEMA
    );
    return {
      ...block,
      attributes: updatedBlockAttributes
    };
  }

  // packages/blocks/build-module/api/parser/apply-block-deprecated-versions.mjs
  function stubFalse() {
    return false;
  }
  function applyBlockDeprecatedVersions(block, rawBlock, blockType) {
    const parsedAttributes = rawBlock.attrs;
    const { deprecated: deprecatedDefinitions } = blockType;
    if (!deprecatedDefinitions || !deprecatedDefinitions.length) {
      return block;
    }
    for (let i2 = 0; i2 < deprecatedDefinitions.length; i2++) {
      const { isEligible = stubFalse } = deprecatedDefinitions[i2];
      if (block.isValid && !isEligible(parsedAttributes, block.innerBlocks, {
        blockNode: rawBlock,
        block
      })) {
        continue;
      }
      const deprecatedBlockType = Object.assign(
        omit(blockType, DEPRECATED_ENTRY_KEYS),
        deprecatedDefinitions[i2]
      );
      let migratedBlock = {
        ...block,
        attributes: getBlockAttributes(
          deprecatedBlockType,
          block.originalContent,
          parsedAttributes
        )
      };
      let [isValid] = validateBlock(migratedBlock, deprecatedBlockType);
      if (!isValid) {
        migratedBlock = applyBuiltInValidationFixes(
          migratedBlock,
          deprecatedBlockType
        );
        [isValid] = validateBlock(migratedBlock, deprecatedBlockType);
      }
      if (!isValid) {
        continue;
      }
      let migratedInnerBlocks = migratedBlock.innerBlocks;
      let migratedAttributes = migratedBlock.attributes;
      const { migrate } = deprecatedBlockType;
      if (migrate) {
        let migrated = migrate(migratedAttributes, block.innerBlocks);
        if (!Array.isArray(migrated)) {
          migrated = [migrated];
        }
        [
          migratedAttributes = parsedAttributes,
          migratedInnerBlocks = block.innerBlocks
        ] = migrated;
      }
      block = {
        ...block,
        attributes: migratedAttributes,
        innerBlocks: migratedInnerBlocks,
        isValid: true,
        validationIssues: []
      };
    }
    return block;
  }

  // packages/blocks/build-module/api/parser/index.mjs
  function convertLegacyBlocks(rawBlock) {
    const [correctName, correctedAttributes] = convertLegacyBlockNameAndAttributes(
      rawBlock.blockName,
      rawBlock.attrs
    );
    return {
      ...rawBlock,
      blockName: correctName,
      attrs: correctedAttributes
    };
  }
  function normalizeRawBlock(rawBlock, options) {
    const fallbackBlockName = getFreeformContentHandlerName();
    const rawBlockName = rawBlock.blockName || getFreeformContentHandlerName();
    const rawAttributes = rawBlock.attrs || {};
    const rawInnerBlocks = rawBlock.innerBlocks || [];
    let rawInnerHTML = rawBlock.innerHTML.trim();
    if (rawBlockName === fallbackBlockName && rawBlockName === "core/freeform" && !options?.__unstableSkipAutop) {
      rawInnerHTML = (0, import_autop2.autop)(rawInnerHTML).trim();
    }
    return {
      ...rawBlock,
      blockName: rawBlockName,
      attrs: rawAttributes,
      innerHTML: rawInnerHTML,
      innerBlocks: rawInnerBlocks
    };
  }
  function createMissingBlockType(rawBlock) {
    const unregisteredFallbackBlock = getUnregisteredTypeHandlerName() || getFreeformContentHandlerName();
    const originalUndelimitedContent = serializeRawBlock(rawBlock, {
      isCommentDelimited: false
    });
    const originalContent = serializeRawBlock(rawBlock, {
      isCommentDelimited: true
    });
    return {
      blockName: unregisteredFallbackBlock,
      attrs: {
        originalName: rawBlock.blockName,
        originalContent,
        originalUndelimitedContent
      },
      innerHTML: rawBlock.blockName ? originalContent : rawBlock.innerHTML,
      innerBlocks: rawBlock.innerBlocks,
      innerContent: rawBlock.innerContent
    };
  }
  function applyBlockValidation(unvalidatedBlock, blockType) {
    const [isValid] = validateBlock(unvalidatedBlock, blockType);
    if (isValid) {
      return { ...unvalidatedBlock, isValid, validationIssues: [] };
    }
    const fixedBlock = applyBuiltInValidationFixes(
      unvalidatedBlock,
      blockType
    );
    const [isFixedValid, validationIssues] = validateBlock(
      fixedBlock,
      blockType
    );
    return { ...fixedBlock, isValid: isFixedValid, validationIssues };
  }
  function parseRawBlock(rawBlock, options) {
    let normalizedBlock = normalizeRawBlock(rawBlock, options);
    normalizedBlock = convertLegacyBlocks(normalizedBlock);
    let blockType = getBlockType(normalizedBlock.blockName);
    if (!blockType) {
      normalizedBlock = createMissingBlockType(normalizedBlock);
      blockType = getBlockType(normalizedBlock.blockName);
    }
    const isFallbackBlock = normalizedBlock.blockName === getFreeformContentHandlerName() || normalizedBlock.blockName === getUnregisteredTypeHandlerName();
    if (!blockType || !normalizedBlock.innerHTML && isFallbackBlock) {
      return;
    }
    const parsedInnerBlocks = normalizedBlock.innerBlocks.map((innerBlock) => parseRawBlock(innerBlock, options)).filter((innerBlock) => !!innerBlock);
    const parsedBlock = createBlock(
      normalizedBlock.blockName,
      getBlockAttributes(
        blockType,
        normalizedBlock.innerHTML,
        normalizedBlock.attrs
      ),
      parsedInnerBlocks
    );
    parsedBlock.originalContent = normalizedBlock.innerHTML;
    const validatedBlock = applyBlockValidation(parsedBlock, blockType);
    const { validationIssues } = validatedBlock;
    const updatedBlock = applyBlockDeprecatedVersions(
      validatedBlock,
      normalizedBlock,
      blockType
    );
    if (!updatedBlock.isValid) {
      updatedBlock.__unstableBlockSource = rawBlock;
    }
    if (!validatedBlock.isValid && updatedBlock.isValid && !options?.__unstableSkipMigrationLogs) {
      console.groupCollapsed("Updated Block: %s", blockType.name);
      console.info(
        "Block successfully updated for `%s` (%o).\n\nNew content generated by `save` function:\n\n%s\n\nContent retrieved from post body:\n\n%s",
        blockType.name,
        blockType,
        getSaveContent(blockType, updatedBlock.attributes),
        updatedBlock.originalContent
      );
      console.groupEnd();
    } else if (!validatedBlock.isValid && !updatedBlock.isValid) {
      validationIssues.forEach(({ log: log2, args }) => log2(...args));
    }
    return updatedBlock;
  }
  function parse2(content, options) {
    return (0, import_block_serialization_default_parser.parse)(content).reduce((accumulator, rawBlock) => {
      const block = parseRawBlock(rawBlock, options);
      if (block) {
        accumulator.push(block);
      }
      return accumulator;
    }, []);
  }

  // packages/blocks/build-module/api/raw-handling/index.mjs
  var import_deprecated10 = __toESM(require_deprecated(), 1);
  var import_dom12 = __toESM(require_dom(), 1);

  // packages/blocks/build-module/api/raw-handling/html-to-blocks.mjs
  var import_element4 = __toESM(require_element(), 1);

  // packages/blocks/build-module/api/raw-handling/get-raw-transforms.mjs
  function getRawTransforms() {
    return getBlockTransforms("from").filter(({ type }) => type === "raw").map((transform) => {
      return transform.isMatch ? transform : {
        ...transform,
        isMatch: (node) => transform.selector && node.matches(transform.selector)
      };
    });
  }

  // packages/blocks/build-module/api/raw-handling/html-to-blocks.mjs
  function htmlToBlocks(html2, handler) {
    const doc = document.implementation.createHTMLDocument("");
    doc.body.innerHTML = html2;
    return Array.from(doc.body.children).flatMap((node) => {
      const rawTransform = findTransform(
        getRawTransforms(),
        ({ isMatch }) => isMatch(node)
      );
      if (!rawTransform) {
        if (import_element4.Platform.isNative) {
          return parse2(
            `<!-- wp:html -->${node.outerHTML}<!-- /wp:html -->`
          );
        }
        return createBlock(
          // Should not be hardcoded.
          "core/html",
          getBlockAttributes("core/html", node.outerHTML)
        );
      }
      const { transform, blockName } = rawTransform;
      if (transform) {
        const block = transform(node, handler);
        if (node.hasAttribute("class")) {
          block.attributes.className = node.getAttribute("class");
        }
        return block;
      }
      return createBlock(
        blockName,
        getBlockAttributes(blockName, node.outerHTML)
      );
    });
  }

  // packages/blocks/build-module/api/raw-handling/normalise-blocks.mjs
  var import_dom2 = __toESM(require_dom(), 1);
  function normaliseBlocks(HTML, options = {}) {
    const decuDoc = document.implementation.createHTMLDocument("");
    const accuDoc = document.implementation.createHTMLDocument("");
    const decu = decuDoc.body;
    const accu = accuDoc.body;
    decu.innerHTML = HTML;
    while (decu.firstChild) {
      const node = decu.firstChild;
      if (node.nodeType === node.TEXT_NODE) {
        if ((0, import_dom2.isEmpty)(node)) {
          decu.removeChild(node);
        } else {
          if (!accu.lastChild || accu.lastChild.nodeName !== "P") {
            accu.appendChild(accuDoc.createElement("P"));
          }
          accu.lastChild.appendChild(node);
        }
      } else if (node.nodeType === node.ELEMENT_NODE) {
        if (node.nodeName === "BR") {
          if (node.nextSibling && node.nextSibling.nodeName === "BR") {
            accu.appendChild(accuDoc.createElement("P"));
            decu.removeChild(node.nextSibling);
          }
          if (accu.lastChild && accu.lastChild.nodeName === "P" && accu.lastChild.hasChildNodes()) {
            accu.lastChild.appendChild(node);
          } else {
            decu.removeChild(node);
          }
        } else if (node.nodeName === "P") {
          if ((0, import_dom2.isEmpty)(node) && !options.raw) {
            decu.removeChild(node);
          } else {
            accu.appendChild(node);
          }
        } else if ((0, import_dom2.isPhrasingContent)(node)) {
          if (!accu.lastChild || accu.lastChild.nodeName !== "P") {
            accu.appendChild(accuDoc.createElement("P"));
          }
          accu.lastChild.appendChild(node);
        } else {
          accu.appendChild(node);
        }
      } else {
        decu.removeChild(node);
      }
    }
    return accu.innerHTML;
  }

  // packages/blocks/build-module/api/raw-handling/special-comment-converter.mjs
  var import_dom3 = __toESM(require_dom(), 1);
  function specialCommentConverter(node, doc) {
    if (node.nodeType !== node.COMMENT_NODE) {
      return;
    }
    if (node.nodeValue !== "nextpage" && node.nodeValue.indexOf("more") !== 0) {
      return;
    }
    const block = createBlock2(node, doc);
    if (!node.parentNode || node.parentNode.nodeName !== "P") {
      (0, import_dom3.replace)(node, block);
    } else {
      const childNodes = Array.from(node.parentNode.childNodes);
      const nodeIndex = childNodes.indexOf(node);
      const wrapperNode = node.parentNode.parentNode || doc.body;
      const paragraphBuilder = (acc, child) => {
        if (!acc) {
          acc = doc.createElement("p");
        }
        acc.appendChild(child);
        return acc;
      };
      [
        childNodes.slice(0, nodeIndex).reduce(paragraphBuilder, null),
        block,
        childNodes.slice(nodeIndex + 1).reduce(paragraphBuilder, null)
      ].forEach(
        (element) => element && wrapperNode.insertBefore(element, node.parentNode)
      );
      (0, import_dom3.remove)(node.parentNode);
    }
  }
  function createBlock2(commentNode, doc) {
    if (commentNode.nodeValue === "nextpage") {
      return createNextpage(doc);
    }
    const customText = commentNode.nodeValue.slice(4).trim();
    let sibling = commentNode;
    let noTeaser = false;
    while (sibling = sibling.nextSibling) {
      if (sibling.nodeType === sibling.COMMENT_NODE && sibling.nodeValue === "noteaser") {
        noTeaser = true;
        (0, import_dom3.remove)(sibling);
        break;
      }
    }
    return createMore(customText, noTeaser, doc);
  }
  function createMore(customText, noTeaser, doc) {
    const node = doc.createElement("wp-block");
    node.dataset.block = "core/more";
    if (customText) {
      node.dataset.customText = customText;
    }
    if (noTeaser) {
      node.dataset.noTeaser = "";
    }
    return node;
  }
  function createNextpage(doc) {
    const node = doc.createElement("wp-block");
    node.dataset.block = "core/nextpage";
    return node;
  }

  // packages/blocks/build-module/api/raw-handling/list-reducer.mjs
  var import_dom4 = __toESM(require_dom(), 1);
  function isList(node) {
    return node.nodeName === "OL" || node.nodeName === "UL";
  }
  function shallowTextContent(element) {
    return Array.from(element.childNodes).map(({ nodeValue = "" }) => nodeValue).join("");
  }
  function listReducer(node) {
    if (!isList(node)) {
      return;
    }
    const list = node;
    const prevElement = node.previousElementSibling;
    if (prevElement && prevElement.nodeName === node.nodeName && list.children.length === 1) {
      while (list.firstChild) {
        prevElement.appendChild(list.firstChild);
      }
      list.parentNode.removeChild(list);
    }
    const parentElement = node.parentNode;
    if (parentElement && parentElement.nodeName === "LI" && parentElement.children.length === 1 && !/\S/.test(shallowTextContent(parentElement))) {
      const parentListItem = parentElement;
      const prevListItem = parentListItem.previousElementSibling;
      const parentList = parentListItem.parentNode;
      if (prevListItem) {
        prevListItem.appendChild(list);
        parentList.removeChild(parentListItem);
      }
    }
    if (parentElement && isList(parentElement)) {
      const prevListItem = node.previousElementSibling;
      if (prevListItem) {
        prevListItem.appendChild(node);
      } else {
        (0, import_dom4.unwrap)(node);
      }
    }
  }

  // packages/blocks/build-module/api/raw-handling/blockquote-normaliser.mjs
  function blockquoteNormaliser(options) {
    return (node) => {
      if (node.nodeName !== "BLOCKQUOTE") {
        return;
      }
      node.innerHTML = normaliseBlocks(node.innerHTML, options);
    };
  }

  // packages/blocks/build-module/api/raw-handling/figure-content-reducer.mjs
  var import_dom5 = __toESM(require_dom(), 1);
  function isFigureContent(node, schema) {
    const tag = node.nodeName.toLowerCase();
    if (tag === "figcaption" || (0, import_dom5.isTextContent)(node)) {
      return false;
    }
    return tag in (schema?.figure?.children ?? {});
  }
  function canHaveAnchor(node, schema) {
    const tag = node.nodeName.toLowerCase();
    return tag in (schema?.figure?.children?.a?.children ?? {});
  }
  function wrapFigureContent(element, beforeElement = element) {
    const figure = element.ownerDocument.createElement("figure");
    beforeElement.parentNode.insertBefore(figure, beforeElement);
    figure.appendChild(element);
  }
  function figureContentReducer(node, doc, schema) {
    if (!isFigureContent(node, schema)) {
      return;
    }
    let nodeToInsert = node;
    const parentNode = node.parentNode;
    if (canHaveAnchor(node, schema) && parentNode.nodeName === "A" && parentNode.childNodes.length === 1) {
      nodeToInsert = node.parentNode;
    }
    const wrapper = nodeToInsert.closest("p,div");
    if (wrapper) {
      if (!node.classList) {
        wrapFigureContent(nodeToInsert, wrapper);
      } else if (node.classList.contains("alignright") || node.classList.contains("alignleft") || node.classList.contains("aligncenter") || !wrapper.textContent.trim()) {
        wrapFigureContent(nodeToInsert, wrapper);
      }
    } else {
      wrapFigureContent(nodeToInsert);
    }
  }

  // packages/blocks/build-module/api/raw-handling/shortcode-converter.mjs
  var import_shortcode = __toESM(require_shortcode(), 1);
  var castArray = (maybeArray) => Array.isArray(maybeArray) ? maybeArray : [maybeArray];
  var beforeLineRegexp = /(\n|<p>)\s*$/;
  var afterLineRegexp = /^\s*(\n|<\/p>)/;
  function segmentHTMLToShortcodeBlock(HTML, lastIndex = 0, excludedBlockNames = []) {
    const transformsFrom = getBlockTransforms("from");
    const transformation = findTransform(
      transformsFrom,
      (transform) => excludedBlockNames.indexOf(transform.blockName) === -1 && transform.type === "shortcode" && castArray(transform.tag).some(
        (tag) => (0, import_shortcode.regexp)(tag).test(HTML)
      )
    );
    if (!transformation) {
      return [HTML];
    }
    const transformTags = castArray(transformation.tag);
    const transformTag = transformTags.find(
      (tag) => (0, import_shortcode.regexp)(tag).test(HTML)
    );
    let match;
    const previousIndex = lastIndex;
    if (match = (0, import_shortcode.next)(transformTag, HTML, lastIndex)) {
      lastIndex = match.index + match.content.length;
      const beforeHTML = HTML.substr(0, match.index);
      const afterHTML = HTML.substr(lastIndex);
      if (!match.shortcode.content?.includes("<") && !(beforeLineRegexp.test(beforeHTML) && afterLineRegexp.test(afterHTML))) {
        return segmentHTMLToShortcodeBlock(HTML, lastIndex);
      }
      if (transformation.isMatch && !transformation.isMatch(match.shortcode.attrs)) {
        return segmentHTMLToShortcodeBlock(HTML, previousIndex, [
          ...excludedBlockNames,
          transformation.blockName
        ]);
      }
      let blocks = [];
      if (typeof transformation.transform === "function") {
        blocks = [].concat(
          transformation.transform(match.shortcode.attrs, match)
        );
        blocks = blocks.map((block) => {
          block.originalContent = match.shortcode.content;
          return applyBuiltInValidationFixes(
            block,
            getBlockType(block.name)
          );
        });
      } else {
        const attributes = Object.fromEntries(
          Object.entries(transformation.attributes).filter(([, schema]) => schema.shortcode).map(([key, schema]) => [
            key,
            schema.shortcode(match.shortcode.attrs, match)
          ])
        );
        const blockType = getBlockType(transformation.blockName);
        if (!blockType) {
          return [HTML];
        }
        const transformationBlockType = {
          ...blockType,
          attributes: transformation.attributes
        };
        let block = createBlock(
          transformation.blockName,
          getBlockAttributes(
            transformationBlockType,
            match.shortcode.content,
            attributes
          )
        );
        block.originalContent = match.shortcode.content;
        block = applyBuiltInValidationFixes(
          block,
          transformationBlockType
        );
        blocks = [block];
      }
      return [
        ...segmentHTMLToShortcodeBlock(
          beforeHTML.replace(beforeLineRegexp, "")
        ),
        ...blocks,
        ...segmentHTMLToShortcodeBlock(
          afterHTML.replace(afterLineRegexp, "")
        )
      ];
    }
    return [HTML];
  }
  var shortcode_converter_default = segmentHTMLToShortcodeBlock;

  // packages/blocks/build-module/api/raw-handling/utils.mjs
  var import_dom6 = __toESM(require_dom(), 1);
  function getBlockContentSchemaFromTransforms(transforms, context) {
    const phrasingContentSchema = (0, import_dom6.getPhrasingContentSchema)(context);
    const schemaArgs = { phrasingContentSchema, isPaste: context === "paste" };
    const schemas = transforms.map(({ isMatch, blockName, schema }) => {
      const hasAnchorSupport = hasBlockSupport(blockName, "anchor");
      schema = typeof schema === "function" ? schema(schemaArgs) : schema;
      if (!hasAnchorSupport && !isMatch) {
        return schema;
      }
      if (!schema) {
        return {};
      }
      return Object.fromEntries(
        Object.entries(schema).map(([key, value]) => {
          let attributes = value.attributes || [];
          if (hasAnchorSupport) {
            attributes = [...attributes, "id"];
          }
          return [
            key,
            {
              ...value,
              attributes,
              isMatch: isMatch ? isMatch : void 0
            }
          ];
        })
      );
    });
    function mergeTagNameSchemaProperties(objValue, srcValue, key) {
      switch (key) {
        case "children": {
          if (objValue === "*" || srcValue === "*") {
            return "*";
          }
          return { ...objValue, ...srcValue };
        }
        case "attributes":
        case "require": {
          return [...objValue || [], ...srcValue || []];
        }
        case "isMatch": {
          if (!objValue || !srcValue) {
            return void 0;
          }
          return (...args) => {
            return objValue(...args) || srcValue(...args);
          };
        }
      }
    }
    function mergeTagNameSchemas(a2, b2) {
      for (const key in b2) {
        a2[key] = a2[key] ? mergeTagNameSchemaProperties(a2[key], b2[key], key) : { ...b2[key] };
      }
      return a2;
    }
    function mergeSchemas(a2, b2) {
      for (const key in b2) {
        a2[key] = a2[key] ? mergeTagNameSchemas(a2[key], b2[key]) : { ...b2[key] };
      }
      return a2;
    }
    return schemas.reduce(mergeSchemas, {});
  }
  function getBlockContentSchema(context) {
    return getBlockContentSchemaFromTransforms(getRawTransforms(), context);
  }
  function isPlain(HTML) {
    if (!/<(?!br[ />])/i.test(HTML)) {
      return true;
    }
    const doc = document.implementation.createHTMLDocument("");
    doc.body.innerHTML = HTML;
    if (doc.body.children.length !== 1) {
      return false;
    }
    const wrapper = doc.body.children.item(0);
    const descendants = wrapper.getElementsByTagName("*");
    for (let i2 = 0; i2 < descendants.length; i2++) {
      if (descendants.item(i2).tagName !== "BR") {
        return false;
      }
    }
    if (wrapper.tagName !== "SPAN") {
      return false;
    }
    return true;
  }
  function deepFilterNodeList(nodeList, filters, doc, schema) {
    Array.from(nodeList).forEach((node) => {
      deepFilterNodeList(node.childNodes, filters, doc, schema);
      filters.forEach((item) => {
        if (!doc.contains(node)) {
          return;
        }
        item(node, doc, schema);
      });
    });
  }
  function deepFilterHTML(HTML, filters = [], schema) {
    const doc = document.implementation.createHTMLDocument("");
    doc.body.innerHTML = HTML;
    deepFilterNodeList(doc.body.childNodes, filters, doc, schema);
    return doc.body.innerHTML;
  }
  function getSibling(node, which) {
    const sibling = node[`${which}Sibling`];
    if (sibling && (0, import_dom6.isPhrasingContent)(sibling)) {
      return sibling;
    }
    const { parentNode } = node;
    if (!parentNode || !(0, import_dom6.isPhrasingContent)(parentNode)) {
      return;
    }
    return getSibling(parentNode, which);
  }

  // packages/blocks/build-module/api/raw-handling/paste-handler.mjs
  var import_dom11 = __toESM(require_dom(), 1);

  // packages/blocks/build-module/api/raw-handling/comment-remover.mjs
  var import_dom7 = __toESM(require_dom(), 1);
  function commentRemover(node) {
    if (node.nodeType === node.COMMENT_NODE) {
      (0, import_dom7.remove)(node);
    }
  }

  // packages/blocks/build-module/api/raw-handling/is-inline-content.mjs
  var import_dom8 = __toESM(require_dom(), 1);
  function isInline(node, contextTag) {
    if ((0, import_dom8.isTextContent)(node)) {
      return true;
    }
    if (!contextTag) {
      return false;
    }
    const tag = node.nodeName.toLowerCase();
    const inlineAllowedTagGroups = [
      ["ul", "li", "ol"],
      ["h1", "h2", "h3", "h4", "h5", "h6"]
    ];
    return inlineAllowedTagGroups.some(
      (tagGroup) => [tag, contextTag].filter((t3) => !tagGroup.includes(t3)).length === 0
    );
  }
  function deepCheck(nodes, contextTag) {
    return nodes.every(
      (node) => isInline(node, contextTag) && deepCheck(Array.from(node.children), contextTag)
    );
  }
  function isDoubleBR(node) {
    return node.nodeName === "BR" && node.previousSibling && node.previousSibling.nodeName === "BR";
  }
  function isInlineContent(HTML, contextTag) {
    const doc = document.implementation.createHTMLDocument("");
    doc.body.innerHTML = HTML;
    const nodes = Array.from(doc.body.children);
    return !nodes.some(isDoubleBR) && deepCheck(nodes, contextTag);
  }

  // packages/blocks/build-module/api/raw-handling/phrasing-content-reducer.mjs
  var import_dom9 = __toESM(require_dom(), 1);
  function phrasingContentReducer(node, doc) {
    if (node.nodeName === "SPAN" && node.style) {
      const {
        fontWeight,
        fontStyle,
        textDecorationLine,
        textDecoration,
        verticalAlign
      } = node.style;
      if (fontWeight === "bold" || fontWeight === "700") {
        (0, import_dom9.wrap)(doc.createElement("strong"), node);
      }
      if (fontStyle === "italic") {
        (0, import_dom9.wrap)(doc.createElement("em"), node);
      }
      if (textDecorationLine === "line-through" || textDecoration.includes("line-through")) {
        (0, import_dom9.wrap)(doc.createElement("s"), node);
      }
      if (verticalAlign === "super") {
        (0, import_dom9.wrap)(doc.createElement("sup"), node);
      } else if (verticalAlign === "sub") {
        (0, import_dom9.wrap)(doc.createElement("sub"), node);
      }
    } else if (node.nodeName === "B") {
      node = (0, import_dom9.replaceTag)(node, "strong");
    } else if (node.nodeName === "I") {
      node = (0, import_dom9.replaceTag)(node, "em");
    } else if (node.nodeName === "A") {
      if (node.target && node.target.toLowerCase() === "_blank") {
        node.rel = "noreferrer noopener";
      } else {
        node.removeAttribute("target");
        node.removeAttribute("rel");
      }
      if (node.name && !node.id) {
        node.id = node.name;
      }
      if (node.id && !node.ownerDocument.querySelector(`[href="#${node.id}"]`)) {
        node.removeAttribute("id");
      }
    }
  }

  // packages/blocks/build-module/api/raw-handling/head-remover.mjs
  function headRemover(node) {
    if (node.nodeName !== "SCRIPT" && node.nodeName !== "NOSCRIPT" && node.nodeName !== "TEMPLATE" && node.nodeName !== "STYLE") {
      return;
    }
    node.parentNode.removeChild(node);
  }

  // packages/blocks/build-module/api/raw-handling/ms-list-ignore.mjs
  function msListIgnore(node) {
    if (node.nodeType !== node.ELEMENT_NODE) {
      return;
    }
    const style = node.getAttribute("style");
    if (!style || !style.includes("mso-list")) {
      return;
    }
    const rules = style.split(";").reduce((acc, rule) => {
      const [key, value] = rule.split(":");
      if (key && value) {
        acc[key.trim().toLowerCase()] = value.trim().toLowerCase();
      }
      return acc;
    }, {});
    if (rules["mso-list"] === "ignore") {
      node.remove();
    }
  }

  // packages/blocks/build-module/api/raw-handling/ms-list-converter.mjs
  function isList2(node) {
    return node.nodeName === "OL" || node.nodeName === "UL";
  }
  function msListConverter(node, doc) {
    if (node.nodeName !== "P") {
      return;
    }
    const style = node.getAttribute("style");
    if (!style || !style.includes("mso-list")) {
      return;
    }
    const prevNode = node.previousElementSibling;
    if (!prevNode || !isList2(prevNode)) {
      const type = node.textContent.trim().slice(0, 1);
      const isNumeric = /[1iIaA]/.test(type);
      const newListNode = doc.createElement(isNumeric ? "ol" : "ul");
      if (isNumeric) {
        newListNode.setAttribute("type", type);
      }
      node.parentNode.insertBefore(newListNode, node);
    }
    const listNode = node.previousElementSibling;
    const listType = listNode.nodeName;
    const listItem = doc.createElement("li");
    let receivingNode = listNode;
    listItem.innerHTML = deepFilterHTML(node.innerHTML, [msListIgnore]);
    const matches = /mso-list\s*:[^;]+level([0-9]+)/i.exec(style);
    let level = matches ? parseInt(matches[1], 10) - 1 || 0 : 0;
    while (level--) {
      receivingNode = receivingNode.lastChild || receivingNode;
      if (isList2(receivingNode)) {
        receivingNode = receivingNode.lastChild || receivingNode;
      }
    }
    if (!isList2(receivingNode)) {
      receivingNode = receivingNode.appendChild(
        doc.createElement(listType)
      );
    }
    receivingNode.appendChild(listItem);
    node.parentNode.removeChild(node);
  }

  // packages/blocks/build-module/api/raw-handling/image-corrector.mjs
  var import_blob = __toESM(require_blob(), 1);
  function imageCorrector(node) {
    if (node.nodeName !== "IMG") {
      return;
    }
    if (node.src.indexOf("file:") === 0) {
      node.src = "";
    }
    if (node.src.indexOf("data:") === 0) {
      const [properties, data] = node.src.split(",");
      const [type] = properties.slice(5).split(";");
      if (!data || !type) {
        node.src = "";
        return;
      }
      let decoded;
      try {
        decoded = atob(data);
      } catch (e2) {
        node.src = "";
        return;
      }
      const uint8Array = new Uint8Array(decoded.length);
      for (let i2 = 0; i2 < uint8Array.length; i2++) {
        uint8Array[i2] = decoded.charCodeAt(i2);
      }
      const name = type.replace("/", ".");
      const file = new window.File([uint8Array], name, { type });
      node.src = (0, import_blob.createBlobURL)(file);
    }
    if (node.height === 1 || node.width === 1) {
      node.parentNode.removeChild(node);
    }
  }

  // packages/blocks/build-module/api/raw-handling/div-normaliser.mjs
  function divNormaliser(node) {
    if (node.nodeName !== "DIV") {
      return;
    }
    node.innerHTML = normaliseBlocks(node.innerHTML);
  }

  // packages/blocks/build-module/api/raw-handling/markdown-converter.mjs
  var import_showdown = __toESM(require_showdown(), 1);
  var converter = new import_showdown.default.Converter({
    noHeaderId: true,
    tables: true,
    literalMidWordUnderscores: true,
    omitExtraWLInCodeBlocks: true,
    simpleLineBreaks: true,
    strikethrough: true
  });
  function slackMarkdownVariantCorrector(text2) {
    return text2.replace(
      /((?:^|\n)```)([^\n`]+)(```(?:$|\n))/,
      (match, p1, p2, p3) => `${p1}
${p2}
${p3}`
    );
  }
  function bulletsToAsterisks(text2) {
    return text2.replace(/(^|\n)â€¢( +)/g, "$1*$2");
  }
  function markdownConverter(text2) {
    return converter.makeHtml(
      slackMarkdownVariantCorrector(bulletsToAsterisks(text2))
    );
  }

  // packages/blocks/build-module/api/raw-handling/iframe-remover.mjs
  function iframeRemover(node) {
    if (node.nodeName === "IFRAME") {
      const text2 = node.ownerDocument.createTextNode(node.src);
      node.parentNode.replaceChild(text2, node);
    }
  }

  // packages/blocks/build-module/api/raw-handling/google-docs-uid-remover.mjs
  var import_dom10 = __toESM(require_dom(), 1);
  function googleDocsUIdRemover(node) {
    if (!node.id || node.id.indexOf("docs-internal-guid-") !== 0) {
      return;
    }
    if (node.tagName === "B") {
      (0, import_dom10.unwrap)(node);
    } else {
      node.removeAttribute("id");
    }
  }

  // packages/blocks/build-module/api/raw-handling/html-formatting-remover.mjs
  function isFormattingSpace(character) {
    return character === " " || character === "\r" || character === "\n" || character === "	";
  }
  function htmlFormattingRemover(node) {
    if (node.nodeType !== node.TEXT_NODE) {
      return;
    }
    let parent = node;
    while (parent = parent.parentNode) {
      if (parent.nodeType === parent.ELEMENT_NODE && parent.nodeName === "PRE") {
        return;
      }
    }
    let newData = node.data.replace(/[ \r\n\t]+/g, " ");
    if (newData[0] === " ") {
      const previousSibling = getSibling(node, "previous");
      if (!previousSibling || previousSibling.nodeName === "BR" || previousSibling.textContent.slice(-1) === " ") {
        newData = newData.slice(1);
      }
    }
    if (newData[newData.length - 1] === " ") {
      const nextSibling = getSibling(node, "next");
      if (!nextSibling || nextSibling.nodeName === "BR" || nextSibling.nodeType === nextSibling.TEXT_NODE && isFormattingSpace(nextSibling.textContent[0])) {
        newData = newData.slice(0, -1);
      }
    }
    if (!newData) {
      node.parentNode.removeChild(node);
    } else {
      node.data = newData;
    }
  }

  // packages/blocks/build-module/api/raw-handling/br-remover.mjs
  function brRemover(node) {
    if (node.nodeName !== "BR") {
      return;
    }
    if (getSibling(node, "next")) {
      return;
    }
    node.parentNode.removeChild(node);
  }

  // packages/blocks/build-module/api/raw-handling/empty-paragraph-remover.mjs
  function emptyParagraphRemover(node) {
    if (node.nodeName !== "P") {
      return;
    }
    if (node.hasChildNodes()) {
      return;
    }
    node.parentNode.removeChild(node);
  }

  // packages/blocks/build-module/api/raw-handling/slack-paragraph-corrector.mjs
  function slackParagraphCorrector(node) {
    if (node.nodeName !== "SPAN") {
      return;
    }
    if (node.getAttribute("data-stringify-type") !== "paragraph-break") {
      return;
    }
    const { parentNode } = node;
    parentNode.insertBefore(node.ownerDocument.createElement("br"), node);
    parentNode.insertBefore(node.ownerDocument.createElement("br"), node);
    parentNode.removeChild(node);
  }

  // packages/blocks/build-module/api/raw-handling/latex-to-math.mjs
  function isLatexMathMode(text2) {
    const lettersRegex = /[\p{L}\s]+/gu;
    let match;
    while (match = lettersRegex.exec(text2)) {
      if (text2[match.index - 1] === "{") {
        continue;
      }
      let sequence = match[0];
      if (text2[match.index - 1] === "\\") {
        sequence = sequence.replace(/^[a-zA-Z]+/, "");
      }
      if (sequence.length < 6) {
        continue;
      }
      return false;
    }
    if (/\\[a-zA-Z]+\s*\{/g.test(text2)) {
      return true;
    }
    const softClues = [
      (t3) => t3.includes("^") && !t3.startsWith("^"),
      (t3) => ["=", "+", "-", "/", "*"].some(
        (operator) => t3.includes(operator)
      ),
      (t3) => /\\[a-zA-Z]+/g.test(t3)
    ];
    if (softClues.filter((clue) => clue(text2)).length >= 2) {
      return true;
    }
    return false;
  }

  // packages/blocks/build-module/api/raw-handling/heading-transformer.mjs
  function headingTransformer(node) {
    if (node.nodeType !== node.ELEMENT_NODE) {
      return;
    }
    if (node.tagName === "P" && node.getAttribute("role") === "heading" && node.hasAttribute("aria-level")) {
      const level = parseInt(node.getAttribute("aria-level"), 10);
      if (level >= 1 && level <= 6) {
        const headingTag = `H${level}`;
        const newHeading = node.ownerDocument.createElement(headingTag);
        Array.from(node.attributes).forEach((attr2) => {
          if (attr2.name !== "role" && attr2.name !== "aria-level") {
            newHeading.setAttribute(attr2.name, attr2.value);
          }
        });
        while (node.firstChild) {
          newHeading.appendChild(node.firstChild);
        }
        node.parentNode.replaceChild(newHeading, node);
      }
    }
  }

  // packages/blocks/build-module/api/raw-handling/paste-handler.mjs
  var log = (...args) => window?.console?.log?.(...args);
  function filterInlineHTML(HTML) {
    HTML = deepFilterHTML(HTML, [
      headRemover,
      googleDocsUIdRemover,
      msListIgnore,
      phrasingContentReducer,
      commentRemover
    ]);
    HTML = (0, import_dom11.removeInvalidHTML)(HTML, (0, import_dom11.getPhrasingContentSchema)("paste"), {
      inline: true
    });
    HTML = deepFilterHTML(HTML, [htmlFormattingRemover, brRemover]);
    log("Processed inline HTML:\n\n", HTML);
    return HTML;
  }
  function pasteHandler({
    HTML = "",
    plainText = "",
    mode = "AUTO",
    tagName
  }) {
    log("Received HTML (pasteHandler):\n\n", HTML);
    log("Received plain text (pasteHandler):\n\n", plainText);
    HTML = HTML.replace(/<meta[^>]+>/g, "");
    HTML = HTML.replace(
      /^\s*<html[^>]*>\s*<body[^>]*>(?:\s*<!--\s*StartFragment\s*-->)?/i,
      ""
    );
    HTML = HTML.replace(
      /(?:<!--\s*EndFragment\s*-->\s*)?<\/body>\s*<\/html>\s*$/i,
      ""
    );
    if (mode !== "INLINE") {
      const content = HTML ? HTML : plainText;
      if (content.indexOf("<!-- wp:") !== -1) {
        const parseResult = parse2(content);
        const isSingleFreeFormBlock = parseResult.length === 1 && parseResult[0].name === "core/freeform";
        if (!isSingleFreeFormBlock) {
          return parseResult;
        }
      }
    }
    if (String.prototype.normalize) {
      HTML = HTML.normalize();
    }
    HTML = deepFilterHTML(HTML, [slackParagraphCorrector]);
    const isPlainText = plainText && (!HTML || isPlain(HTML));
    if (isPlainText && isLatexMathMode(plainText)) {
      return [createBlock("core/math", { latex: plainText })];
    }
    if (isPlainText) {
      HTML = plainText;
      if (!/^\s+$/.test(plainText)) {
        HTML = markdownConverter(HTML);
      }
    }
    const pieces = shortcode_converter_default(HTML);
    const hasShortcodes = pieces.length > 1;
    if (isPlainText && !hasShortcodes) {
      if (mode === "AUTO" && plainText.indexOf("\n") === -1 && plainText.indexOf("<p>") !== 0 && HTML.indexOf("<p>") === 0) {
        mode = "INLINE";
      }
    }
    if (mode === "INLINE") {
      return filterInlineHTML(HTML);
    }
    if (mode === "AUTO" && !hasShortcodes && isInlineContent(HTML, tagName)) {
      return filterInlineHTML(HTML);
    }
    const phrasingContentSchema = (0, import_dom11.getPhrasingContentSchema)("paste");
    const blockContentSchema = getBlockContentSchema("paste");
    const blocks = pieces.map((piece) => {
      if (typeof piece !== "string") {
        return piece;
      }
      const filters = [
        googleDocsUIdRemover,
        msListConverter,
        headRemover,
        listReducer,
        imageCorrector,
        phrasingContentReducer,
        specialCommentConverter,
        commentRemover,
        iframeRemover,
        figureContentReducer,
        blockquoteNormaliser(),
        divNormaliser,
        headingTransformer
      ];
      const schema = {
        ...blockContentSchema,
        // Keep top-level phrasing content, normalised by `normaliseBlocks`.
        ...phrasingContentSchema
      };
      piece = deepFilterHTML(piece, filters, blockContentSchema);
      piece = (0, import_dom11.removeInvalidHTML)(piece, schema);
      piece = normaliseBlocks(piece);
      piece = deepFilterHTML(
        piece,
        [htmlFormattingRemover, brRemover, emptyParagraphRemover],
        blockContentSchema
      );
      log("Processed HTML piece:\n\n", piece);
      return htmlToBlocks(piece, pasteHandler);
    }).flat().filter(Boolean);
    if (mode === "AUTO" && blocks.length === 1 && hasBlockSupport(blocks[0].name, "__unstablePasteTextInline", false)) {
      const trimRegex = /^[\n]+|[\n]+$/g;
      const trimmedPlainText = plainText.replace(trimRegex, "");
      if (trimmedPlainText !== "" && trimmedPlainText.indexOf("\n") === -1) {
        return (0, import_dom11.removeInvalidHTML)(
          getBlockInnerHTML(blocks[0]),
          phrasingContentSchema
        ).replace(trimRegex, "");
      }
    }
    return blocks;
  }

  // packages/blocks/build-module/api/raw-handling/index.mjs
  function deprecatedGetPhrasingContentSchema(context) {
    (0, import_deprecated10.default)("wp.blocks.getPhrasingContentSchema", {
      since: "5.6",
      alternative: "wp.dom.getPhrasingContentSchema"
    });
    return (0, import_dom12.getPhrasingContentSchema)(context);
  }
  function rawHandler({ HTML = "" }) {
    if (HTML.indexOf("<!-- wp:") !== -1) {
      const parseResult = parse2(HTML);
      const isSingleFreeFormBlock = parseResult.length === 1 && parseResult[0].name === "core/freeform";
      if (!isSingleFreeFormBlock) {
        return parseResult;
      }
    }
    const pieces = shortcode_converter_default(HTML);
    const blockContentSchema = getBlockContentSchema();
    return pieces.map((piece) => {
      if (typeof piece !== "string") {
        return piece;
      }
      const filters = [
        // Needed to adjust invalid lists.
        listReducer,
        // Needed to create more and nextpage blocks.
        specialCommentConverter,
        // Needed to create media blocks.
        figureContentReducer,
        // Needed to create the quote block, which cannot handle text
        // without wrapper paragraphs.
        blockquoteNormaliser({ raw: true })
      ];
      piece = deepFilterHTML(piece, filters, blockContentSchema);
      piece = normaliseBlocks(piece, { raw: true });
      return htmlToBlocks(piece, rawHandler);
    }).flat().filter(Boolean);
  }

  // packages/blocks/build-module/api/categories.mjs
  var import_data6 = __toESM(require_data(), 1);
  function getCategories2() {
    return (0, import_data6.select)(store).getCategories();
  }
  function setCategories2(categories2) {
    (0, import_data6.dispatch)(store).setCategories(categories2);
  }
  function updateCategory2(slug, category) {
    (0, import_data6.dispatch)(store).updateCategory(slug, category);
  }

  // packages/blocks/build-module/api/templates.mjs
  var import_element5 = __toESM(require_element(), 1);
  function doBlocksMatchTemplate(blocks = [], template = []) {
    return blocks.length === template.length && template.every(([name, , innerBlocksTemplate], index) => {
      const block = blocks[index];
      return name === block.name && doBlocksMatchTemplate(block.innerBlocks, innerBlocksTemplate);
    });
  }
  var isHTMLAttribute = (attributeDefinition) => attributeDefinition?.source === "html";
  var isQueryAttribute = (attributeDefinition) => attributeDefinition?.source === "query";
  function normalizeAttributes(schema, values) {
    if (!values) {
      return {};
    }
    return Object.fromEntries(
      Object.entries(values).map(([key, value]) => [
        key,
        normalizeAttribute(schema[key], value)
      ])
    );
  }
  function normalizeAttribute(definition, value) {
    if (isHTMLAttribute(definition) && Array.isArray(value)) {
      return (0, import_element5.renderToString)(value);
    }
    if (isQueryAttribute(definition) && value) {
      return value.map((subValues) => {
        return normalizeAttributes(definition.query, subValues);
      });
    }
    return value;
  }
  function synchronizeBlocksWithTemplate(blocks = [], template) {
    if (!template) {
      return blocks;
    }
    return template.map(
      ([name, attributes, innerBlocksTemplate], index) => {
        const block = blocks[index];
        if (block && block.name === name) {
          const innerBlocks = synchronizeBlocksWithTemplate(
            block.innerBlocks,
            innerBlocksTemplate
          );
          return { ...block, innerBlocks };
        }
        const blockType = getBlockType(name);
        const normalizedAttributes = normalizeAttributes(
          blockType?.attributes ?? {},
          attributes
        );
        const [blockName, blockAttributes] = convertLegacyBlockNameAndAttributes(
          name,
          normalizedAttributes
        );
        return createBlock(
          blockName,
          blockAttributes,
          synchronizeBlocksWithTemplate([], innerBlocksTemplate)
        );
      }
    );
  }

  // packages/blocks/build-module/api/index.mjs
  var fieldsKey = /* @__PURE__ */ Symbol("fields");
  var formKey = /* @__PURE__ */ Symbol("form");
  var privateApis = {};
  lock(privateApis, {
    isContentBlock,
    fieldsKey,
    formKey,
    parseRawBlock
  });

  // packages/blocks/build-module/deprecated.mjs
  var import_deprecated11 = __toESM(require_deprecated(), 1);
  function withBlockContentContext(OriginalComponent) {
    (0, import_deprecated11.default)("wp.blocks.withBlockContentContext", {
      since: "6.1"
    });
    return OriginalComponent;
  }
  return __toCommonJS(index_exports);
})();
/*! Bundled license information:

react-is/cjs/react-is.development.js:
  (**
   * @license React
   * react-is.development.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

showdown/dist/showdown.js:
  (*! showdown v 1.9.1 - 02-11-2019 *)

is-plain-object/dist/is-plain-object.mjs:
  (*!
   * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
   *
   * Copyright (c) 2014-2017, Jon Schlinkert.
   * Released under the MIT License.
   *)
*/
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  dist/blocks.min.js                                                                                  0000644                 00000551125 15212563767 0010133 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;(wp||={}).blocks=(()=>{var zu=Object.create;var ir=Object.defineProperty;var qu=Object.getOwnPropertyDescriptor;var Iu=Object.getOwnPropertyNames;var Vu=Object.getPrototypeOf,xu=Object.prototype.hasOwnProperty;var z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ie=(e,t)=>{for(var r in t)ir(e,r,{get:t[r],enumerable:!0})},hn=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Iu(t))!xu.call(e,o)&&o!==r&&ir(e,o,{get:()=>t[o],enumerable:!(a=qu(t,o))||a.enumerable});return e};var B=(e,t,r)=>(r=e!=null?zu(Vu(e)):{},hn(t||!e||!e.__esModule?ir(r,"default",{value:e,enumerable:!0}):r,e)),Hu=e=>hn(ir({},"__esModule",{value:!0}),e);var Be=z((Dd,gn)=>{gn.exports=window.wp.data});var sr=z((Gd,vn)=>{vn.exports=window.wp.i18n});var De=z((Xd,jn)=>{jn.exports=window.wp.element});var Z=z((Zd,zn)=>{zn.exports=window.wp.dom});var xe=z((Qd,qn)=>{qn.exports=window.wp.richText});var J=z((Jd,In)=>{In.exports=window.wp.deprecated});var pt=z((rc,Hn)=>{Hn.exports=window.wp.warning});var Fn=z((nc,Un)=>{Un.exports=window.wp.privateApis});var Ba=z((_c,yr)=>{var Ea={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u1EA4:"A",\u1EAE:"A",\u1EB2:"A",\u1EB4:"A",\u1EB6:"A",\u00C6:"AE",\u1EA6:"A",\u1EB0:"A",\u0202:"A",\u1EA2:"A",\u1EA0:"A",\u1EA8:"A",\u1EAA:"A",\u1EAC:"A",\u00C7:"C",\u1E08:"C",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u1EBE:"E",\u1E16:"E",\u1EC0:"E",\u1E14:"E",\u1E1C:"E",\u0206:"E",\u1EBA:"E",\u1EBC:"E",\u1EB8:"E",\u1EC2:"E",\u1EC4:"E",\u1EC6:"E",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u1E2E:"I",\u020A:"I",\u1EC8:"I",\u1ECA:"I",\u00D0:"D",\u00D1:"N",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u1ED0:"O",\u1E4C:"O",\u1E52:"O",\u020E:"O",\u1ECE:"O",\u1ECC:"O",\u1ED4:"O",\u1ED6:"O",\u1ED8:"O",\u1EDC:"O",\u1EDE:"O",\u1EE0:"O",\u1EDA:"O",\u1EE2:"O",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u1EE6:"U",\u1EE4:"U",\u1EEC:"U",\u1EEE:"U",\u1EF0:"U",\u00DD:"Y",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u1EA5:"a",\u1EAF:"a",\u1EB3:"a",\u1EB5:"a",\u1EB7:"a",\u00E6:"ae",\u1EA7:"a",\u1EB1:"a",\u0203:"a",\u1EA3:"a",\u1EA1:"a",\u1EA9:"a",\u1EAB:"a",\u1EAD:"a",\u00E7:"c",\u1E09:"c",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u1EBF:"e",\u1E17:"e",\u1EC1:"e",\u1E15:"e",\u1E1D:"e",\u0207:"e",\u1EBB:"e",\u1EBD:"e",\u1EB9:"e",\u1EC3:"e",\u1EC5:"e",\u1EC7:"e",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u1E2F:"i",\u020B:"i",\u1EC9:"i",\u1ECB:"i",\u00F0:"d",\u00F1:"n",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u1ED1:"o",\u1E4D:"o",\u1E53:"o",\u020F:"o",\u1ECF:"o",\u1ECD:"o",\u1ED5:"o",\u1ED7:"o",\u1ED9:"o",\u1EDD:"o",\u1EDF:"o",\u1EE1:"o",\u1EDB:"o",\u1EE3:"o",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u1EE7:"u",\u1EE5:"u",\u1EED:"u",\u1EEF:"u",\u1EF1:"u",\u00FD:"y",\u00FF:"y",\u0100:"A",\u0101:"a",\u0102:"A",\u0103:"a",\u0104:"A",\u0105:"a",\u0106:"C",\u0107:"c",\u0108:"C",\u0109:"c",\u010A:"C",\u010B:"c",\u010C:"C",\u010D:"c",C\u0306:"C",c\u0306:"c",\u010E:"D",\u010F:"d",\u0110:"D",\u0111:"d",\u0112:"E",\u0113:"e",\u0114:"E",\u0115:"e",\u0116:"E",\u0117:"e",\u0118:"E",\u0119:"e",\u011A:"E",\u011B:"e",\u011C:"G",\u01F4:"G",\u011D:"g",\u01F5:"g",\u011E:"G",\u011F:"g",\u0120:"G",\u0121:"g",\u0122:"G",\u0123:"g",\u0124:"H",\u0125:"h",\u0126:"H",\u0127:"h",\u1E2A:"H",\u1E2B:"h",\u0128:"I",\u0129:"i",\u012A:"I",\u012B:"i",\u012C:"I",\u012D:"i",\u012E:"I",\u012F:"i",\u0130:"I",\u0131:"i",\u0132:"IJ",\u0133:"ij",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u1E30:"K",\u1E31:"k",K\u0306:"K",k\u0306:"k",\u0139:"L",\u013A:"l",\u013B:"L",\u013C:"l",\u013D:"L",\u013E:"l",\u013F:"L",\u0140:"l",\u0141:"l",\u0142:"l",\u1E3E:"M",\u1E3F:"m",M\u0306:"M",m\u0306:"m",\u0143:"N",\u0144:"n",\u0145:"N",\u0146:"n",\u0147:"N",\u0148:"n",\u0149:"n",N\u0306:"N",n\u0306:"n",\u014C:"O",\u014D:"o",\u014E:"O",\u014F:"o",\u0150:"O",\u0151:"o",\u0152:"OE",\u0153:"oe",P\u0306:"P",p\u0306:"p",\u0154:"R",\u0155:"r",\u0156:"R",\u0157:"r",\u0158:"R",\u0159:"r",R\u0306:"R",r\u0306:"r",\u0212:"R",\u0213:"r",\u015A:"S",\u015B:"s",\u015C:"S",\u015D:"s",\u015E:"S",\u0218:"S",\u0219:"s",\u015F:"s",\u0160:"S",\u0161:"s",\u0162:"T",\u0163:"t",\u021B:"t",\u021A:"T",\u0164:"T",\u0165:"t",\u0166:"T",\u0167:"t",T\u0306:"T",t\u0306:"t",\u0168:"U",\u0169:"u",\u016A:"U",\u016B:"u",\u016C:"U",\u016D:"u",\u016E:"U",\u016F:"u",\u0170:"U",\u0171:"u",\u0172:"U",\u0173:"u",\u0216:"U",\u0217:"u",V\u0306:"V",v\u0306:"v",\u0174:"W",\u0175:"w",\u1E82:"W",\u1E83:"w",X\u0306:"X",x\u0306:"x",\u0176:"Y",\u0177:"y",\u0178:"Y",Y\u0306:"Y",y\u0306:"y",\u0179:"Z",\u017A:"z",\u017B:"Z",\u017C:"z",\u017D:"Z",\u017E:"z",\u017F:"s",\u0192:"f",\u01A0:"O",\u01A1:"o",\u01AF:"U",\u01B0:"u",\u01CD:"A",\u01CE:"a",\u01CF:"I",\u01D0:"i",\u01D1:"O",\u01D2:"o",\u01D3:"U",\u01D4:"u",\u01D5:"U",\u01D6:"u",\u01D7:"U",\u01D8:"u",\u01D9:"U",\u01DA:"u",\u01DB:"U",\u01DC:"u",\u1EE8:"U",\u1EE9:"u",\u1E78:"U",\u1E79:"u",\u01FA:"A",\u01FB:"a",\u01FC:"AE",\u01FD:"ae",\u01FE:"O",\u01FF:"o",\u00DE:"TH",\u00FE:"th",\u1E54:"P",\u1E55:"p",\u1E64:"S",\u1E65:"s",X\u0301:"X",x\u0301:"x",\u0403:"\u0413",\u0453:"\u0433",\u040C:"\u041A",\u045C:"\u043A",A\u030B:"A",a\u030B:"a",E\u030B:"E",e\u030B:"e",I\u030B:"I",i\u030B:"i",\u01F8:"N",\u01F9:"n",\u1ED2:"O",\u1ED3:"o",\u1E50:"O",\u1E51:"o",\u1EEA:"U",\u1EEB:"u",\u1E80:"W",\u1E81:"w",\u1EF2:"Y",\u1EF3:"y",\u0200:"A",\u0201:"a",\u0204:"E",\u0205:"e",\u0208:"I",\u0209:"i",\u020C:"O",\u020D:"o",\u0210:"R",\u0211:"r",\u0214:"U",\u0215:"u",B\u030C:"B",b\u030C:"b",\u010C\u0323:"C",\u010D\u0323:"c",\u00CA\u030C:"E",\u00EA\u030C:"e",F\u030C:"F",f\u030C:"f",\u01E6:"G",\u01E7:"g",\u021E:"H",\u021F:"h",J\u030C:"J",\u01F0:"j",\u01E8:"K",\u01E9:"k",M\u030C:"M",m\u030C:"m",P\u030C:"P",p\u030C:"p",Q\u030C:"Q",q\u030C:"q",\u0158\u0329:"R",\u0159\u0329:"r",\u1E66:"S",\u1E67:"s",V\u030C:"V",v\u030C:"v",W\u030C:"W",w\u030C:"w",X\u030C:"X",x\u030C:"x",Y\u030C:"Y",y\u030C:"y",A\u0327:"A",a\u0327:"a",B\u0327:"B",b\u0327:"b",\u1E10:"D",\u1E11:"d",\u0228:"E",\u0229:"e",\u0190\u0327:"E",\u025B\u0327:"e",\u1E28:"H",\u1E29:"h",I\u0327:"I",i\u0327:"i",\u0197\u0327:"I",\u0268\u0327:"i",M\u0327:"M",m\u0327:"m",O\u0327:"O",o\u0327:"o",Q\u0327:"Q",q\u0327:"q",U\u0327:"U",u\u0327:"u",X\u0327:"X",x\u0327:"x",Z\u0327:"Z",z\u0327:"z",\u0439:"\u0438",\u0419:"\u0418",\u0451:"\u0435",\u0401:"\u0415"},Ta=Object.keys(Ea).join("|"),hi=new RegExp(Ta,"g"),gi=new RegExp(Ta,"");function bi(e){return Ea[e]}var Ca=function(e){return e.replace(hi,bi)},_i=function(e){return!!e.match(gi)};yr.exports=Ca;yr.exports.has=_i;yr.exports.remove=Ca});var xa=z(D=>{"use strict";var Lt=Symbol.for("react.element"),Pt=Symbol.for("react.portal"),kr=Symbol.for("react.fragment"),vr=Symbol.for("react.strict_mode"),Er=Symbol.for("react.profiler"),Tr=Symbol.for("react.provider"),Cr=Symbol.for("react.context"),Ii=Symbol.for("react.server_context"),Br=Symbol.for("react.forward_ref"),Ar=Symbol.for("react.suspense"),Sr=Symbol.for("react.suspense_list"),Nr=Symbol.for("react.memo"),Lr=Symbol.for("react.lazy"),Vi=Symbol.for("react.offscreen"),Va;Va=Symbol.for("react.module.reference");function re(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Lt:switch(e=e.type,e){case kr:case Er:case vr:case Ar:case Sr:return e;default:switch(e=e&&e.$$typeof,e){case Ii:case Cr:case Br:case Lr:case Nr:case Tr:return e;default:return t}}case Pt:return t}}}D.ContextConsumer=Cr;D.ContextProvider=Tr;D.Element=Lt;D.ForwardRef=Br;D.Fragment=kr;D.Lazy=Lr;D.Memo=Nr;D.Portal=Pt;D.Profiler=Er;D.StrictMode=vr;D.Suspense=Ar;D.SuspenseList=Sr;D.isAsyncMode=function(){return!1};D.isConcurrentMode=function(){return!1};D.isContextConsumer=function(e){return re(e)===Cr};D.isContextProvider=function(e){return re(e)===Tr};D.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Lt};D.isForwardRef=function(e){return re(e)===Br};D.isFragment=function(e){return re(e)===kr};D.isLazy=function(e){return re(e)===Lr};D.isMemo=function(e){return re(e)===Nr};D.isPortal=function(e){return re(e)===Pt};D.isProfiler=function(e){return re(e)===Er};D.isStrictMode=function(e){return re(e)===vr};D.isSuspense=function(e){return re(e)===Ar};D.isSuspenseList=function(e){return re(e)===Sr};D.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===kr||e===Er||e===vr||e===Ar||e===Sr||e===Vi||typeof e=="object"&&e!==null&&(e.$$typeof===Lr||e.$$typeof===Nr||e.$$typeof===Tr||e.$$typeof===Cr||e.$$typeof===Br||e.$$typeof===Va||e.getModuleId!==void 0)};D.typeOf=re});var Ua=z((Ac,Ha)=>{"use strict";Ha.exports=xa()});var We=z((Sc,Fa)=>{Fa.exports=window.wp.hooks});var to=z((Jc,ro)=>{ro.exports=window.wp.blockSerializationDefaultParser});var Ut=z((el,no)=>{no.exports=window.wp.autop});var oo=z((rl,ao)=>{ao.exports=window.wp.isShallowEqual});var io=z((al,uo)=>{uo.exports=window.ReactJSXRuntime});var ko=z((ll,wo)=>{"use strict";wo.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var a,o,s;if(Array.isArray(t)){if(a=t.length,a!=r.length)return!1;for(o=a;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(o of t.entries())if(!r.has(o[0]))return!1;for(o of t.entries())if(!e(o[1],r.get(o[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(o of t.entries())if(!r.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if(a=t.length,a!=r.length)return!1;for(o=a;o--!==0;)if(t[o]!==r[o])return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),a=s.length,a!==Object.keys(r).length)return!1;for(o=a;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=a;o--!==0;){var c=s[o];if(!e(t[c],r[c]))return!1}return!0}return t!==t&&r!==r}});var Eo=z((fl,vo)=>{vo.exports=window.wp.htmlEntities});var Jo=z((kf,Qo)=>{Qo.exports=window.wp.shortcode});var lu=z((qf,cu)=>{cu.exports=window.wp.blob});var gu=z((hu,Qr)=>{(function(){function e(n){"use strict";var i={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:`Remove only spaces, ' and " from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids`,type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,description:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,description:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,description:"Parses simple line breaks as <br> (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex: <div>foo</div>",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `\xAB\xAB\xAB` and `\xBB\xBB\xBB` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(n===!1)return JSON.parse(JSON.stringify(i));var u={};for(var d in i)i.hasOwnProperty(d)&&(u[d]=i[d].defaultValue);return u}function t(){"use strict";var n=e(!0),i={};for(var u in n)n.hasOwnProperty(u)&&(i[u]=!0);return i}var r={},a={},o={},s=e(!0),c="vanilla",h={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:e(!0),allOn:t()};r.helper={},r.extensions={},r.setOption=function(n,i){"use strict";return s[n]=i,this},r.getOption=function(n){"use strict";return s[n]},r.getOptions=function(){"use strict";return s},r.resetOptions=function(){"use strict";s=e(!0)},r.setFlavor=function(n){"use strict";if(!h.hasOwnProperty(n))throw Error(n+" flavor was not found");r.resetOptions();var i=h[n];c=n;for(var u in i)i.hasOwnProperty(u)&&(s[u]=i[u])},r.getFlavor=function(){"use strict";return c},r.getFlavorOptions=function(n){"use strict";if(h.hasOwnProperty(n))return h[n]},r.getDefaultOptions=function(n){"use strict";return e(n)},r.subParser=function(n,i){"use strict";if(r.helper.isString(n))if(typeof i<"u")a[n]=i;else{if(a.hasOwnProperty(n))return a[n];throw Error("SubParser named "+n+" not registered!")}},r.extension=function(n,i){"use strict";if(!r.helper.isString(n))throw Error("Extension 'name' must be a string");if(n=r.helper.stdExtName(n),r.helper.isUndefined(i)){if(!o.hasOwnProperty(n))throw Error("Extension named "+n+" is not registered!");return o[n]}else{typeof i=="function"&&(i=i()),r.helper.isArray(i)||(i=[i]);var u=_(i,n);if(u.valid)o[n]=i;else throw Error(u.error)}},r.getAllExtensions=function(){"use strict";return o},r.removeExtension=function(n){"use strict";delete o[n]},r.resetExtensions=function(){"use strict";o={}};function _(n,i){"use strict";var u=i?"Error in "+i+" extension->":"Error in unnamed extension",d={valid:!0,error:""};r.helper.isArray(n)||(n=[n]);for(var p=0;p<n.length;++p){var m=u+" sub-extension "+p+": ",f=n[p];if(typeof f!="object")return d.valid=!1,d.error=m+"must be an object, but "+typeof f+" given",d;if(!r.helper.isString(f.type))return d.valid=!1,d.error=m+'property "type" must be a string, but '+typeof f.type+" given",d;var g=f.type=f.type.toLowerCase();if(g==="language"&&(g=f.type="lang"),g==="html"&&(g=f.type="output"),g!=="lang"&&g!=="output"&&g!=="listener")return d.valid=!1,d.error=m+"type "+g+' is not recognized. Valid values: "lang/language", "output/html" or "listener"',d;if(g==="listener"){if(r.helper.isUndefined(f.listeners))return d.valid=!1,d.error=m+'. Extensions of type "listener" must have a property called "listeners"',d}else if(r.helper.isUndefined(f.filter)&&r.helper.isUndefined(f.regex))return d.valid=!1,d.error=m+g+' extensions must define either a "regex" property or a "filter" method',d;if(f.listeners){if(typeof f.listeners!="object")return d.valid=!1,d.error=m+'"listeners" property must be an object but '+typeof f.listeners+" given",d;for(var T in f.listeners)if(f.listeners.hasOwnProperty(T)&&typeof f.listeners[T]!="function")return d.valid=!1,d.error=m+'"listeners" property must be an hash of [event name]: [callback]. listeners.'+T+" must be a function but "+typeof f.listeners[T]+" given",d}if(f.filter){if(typeof f.filter!="function")return d.valid=!1,d.error=m+'"filter" must be a function, but '+typeof f.filter+" given",d}else if(f.regex){if(r.helper.isString(f.regex)&&(f.regex=new RegExp(f.regex,"g")),!(f.regex instanceof RegExp))return d.valid=!1,d.error=m+'"regex" property must either be a string or a RegExp object, but '+typeof f.regex+" given",d;if(r.helper.isUndefined(f.replace))return d.valid=!1,d.error=m+'"regex" extensions must implement a replace string or function',d}}return d}r.validateExtension=function(n){"use strict";var i=_(n,null);return i.valid?!0:(console.warn(i.error),!1)},r.hasOwnProperty("helper")||(r.helper={}),r.helper.isString=function(n){"use strict";return typeof n=="string"||n instanceof String},r.helper.isFunction=function(n){"use strict";var i={};return n&&i.toString.call(n)==="[object Function]"},r.helper.isArray=function(n){"use strict";return Array.isArray(n)},r.helper.isUndefined=function(n){"use strict";return typeof n>"u"},r.helper.forEach=function(n,i){"use strict";if(r.helper.isUndefined(n))throw new Error("obj param is required");if(r.helper.isUndefined(i))throw new Error("callback param is required");if(!r.helper.isFunction(i))throw new Error("callback param must be a function/closure");if(typeof n.forEach=="function")n.forEach(i);else if(r.helper.isArray(n))for(var u=0;u<n.length;u++)i(n[u],u,n);else if(typeof n=="object")for(var d in n)n.hasOwnProperty(d)&&i(n[d],d,n);else throw new Error("obj does not seem to be an array or an iterable object")},r.helper.stdExtName=function(n){"use strict";return n.replace(/[_?*+\/\\.^-]/g,"").replace(/\s/g,"").toLowerCase()};function b(n,i){"use strict";var u=i.charCodeAt(0);return"\xA8E"+u+"E"}r.helper.escapeCharactersCallback=b,r.helper.escapeCharacters=function(n,i,u){"use strict";var d="(["+i.replace(/([\[\]\\])/g,"\\$1")+"])";u&&(d="\\\\"+d);var p=new RegExp(d,"g");return n=n.replace(p,b),n},r.helper.unescapeHTMLEntities=function(n){"use strict";return n.replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")};var E=function(n,i,u,d){"use strict";var p=d||"",m=p.indexOf("g")>-1,f=new RegExp(i+"|"+u,"g"+p.replace(/g/g,"")),g=new RegExp(i,p.replace(/g/g,"")),T=[],k,w,v,l,y;do for(k=0;v=f.exec(n);)if(g.test(v[0]))k++||(w=f.lastIndex,l=w-v[0].length);else if(k&&!--k){y=v.index+v[0].length;var C={left:{start:l,end:w},match:{start:w,end:v.index},right:{start:v.index,end:y},wholeMatch:{start:l,end:y}};if(T.push(C),!m)return T}while(k&&(f.lastIndex=w));return T};r.helper.matchRecursiveRegExp=function(n,i,u,d){"use strict";for(var p=E(n,i,u,d),m=[],f=0;f<p.length;++f)m.push([n.slice(p[f].wholeMatch.start,p[f].wholeMatch.end),n.slice(p[f].match.start,p[f].match.end),n.slice(p[f].left.start,p[f].left.end),n.slice(p[f].right.start,p[f].right.end)]);return m},r.helper.replaceRecursiveRegExp=function(n,i,u,d,p){"use strict";if(!r.helper.isFunction(i)){var m=i;i=function(){return m}}var f=E(n,u,d,p),g=n,T=f.length;if(T>0){var k=[];f[0].wholeMatch.start!==0&&k.push(n.slice(0,f[0].wholeMatch.start));for(var w=0;w<T;++w)k.push(i(n.slice(f[w].wholeMatch.start,f[w].wholeMatch.end),n.slice(f[w].match.start,f[w].match.end),n.slice(f[w].left.start,f[w].left.end),n.slice(f[w].right.start,f[w].right.end))),w<T-1&&k.push(n.slice(f[w].wholeMatch.end,f[w+1].wholeMatch.start));f[T-1].wholeMatch.end<n.length&&k.push(n.slice(f[T-1].wholeMatch.end)),g=k.join("")}return g},r.helper.regexIndexOf=function(n,i,u){"use strict";if(!r.helper.isString(n))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";if(!(i instanceof RegExp))throw"InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp";var d=n.substring(u||0).search(i);return d>=0?d+(u||0):d},r.helper.splitAtIndex=function(n,i){"use strict";if(!r.helper.isString(n))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[n.substring(0,i),n.substring(i)]},r.helper.encodeEmailAddress=function(n){"use strict";var i=[function(u){return"&#"+u.charCodeAt(0)+";"},function(u){return"&#x"+u.charCodeAt(0).toString(16)+";"},function(u){return u}];return n=n.replace(/./g,function(u){if(u==="@")u=i[Math.floor(Math.random()*2)](u);else{var d=Math.random();u=d>.9?i[2](u):d>.45?i[1](u):i[0](u)}return u}),n},r.helper.padEnd=function(i,u,d){"use strict";return u=u>>0,d=String(d||" "),i.length>u?String(i):(u=u-i.length,u>d.length&&(d+=d.repeat(u/d.length)),String(i)+d.slice(0,u))},typeof console>"u"&&(console={warn:function(n){"use strict";alert(n)},log:function(n){"use strict";alert(n)},error:function(n){"use strict";throw n}}),r.helper.regexes={asteriskDashAndColon:/([*_:~])/g},r.helper.emojis={"+1":"\u{1F44D}","-1":"\u{1F44E}",100:"\u{1F4AF}",1234:"\u{1F522}","1st_place_medal":"\u{1F947}","2nd_place_medal":"\u{1F948}","3rd_place_medal":"\u{1F949}","8ball":"\u{1F3B1}",a:"\u{1F170}\uFE0F",ab:"\u{1F18E}",abc:"\u{1F524}",abcd:"\u{1F521}",accept:"\u{1F251}",aerial_tramway:"\u{1F6A1}",airplane:"\u2708\uFE0F",alarm_clock:"\u23F0",alembic:"\u2697\uFE0F",alien:"\u{1F47D}",ambulance:"\u{1F691}",amphora:"\u{1F3FA}",anchor:"\u2693\uFE0F",angel:"\u{1F47C}",anger:"\u{1F4A2}",angry:"\u{1F620}",anguished:"\u{1F627}",ant:"\u{1F41C}",apple:"\u{1F34E}",aquarius:"\u2652\uFE0F",aries:"\u2648\uFE0F",arrow_backward:"\u25C0\uFE0F",arrow_double_down:"\u23EC",arrow_double_up:"\u23EB",arrow_down:"\u2B07\uFE0F",arrow_down_small:"\u{1F53D}",arrow_forward:"\u25B6\uFE0F",arrow_heading_down:"\u2935\uFE0F",arrow_heading_up:"\u2934\uFE0F",arrow_left:"\u2B05\uFE0F",arrow_lower_left:"\u2199\uFE0F",arrow_lower_right:"\u2198\uFE0F",arrow_right:"\u27A1\uFE0F",arrow_right_hook:"\u21AA\uFE0F",arrow_up:"\u2B06\uFE0F",arrow_up_down:"\u2195\uFE0F",arrow_up_small:"\u{1F53C}",arrow_upper_left:"\u2196\uFE0F",arrow_upper_right:"\u2197\uFE0F",arrows_clockwise:"\u{1F503}",arrows_counterclockwise:"\u{1F504}",art:"\u{1F3A8}",articulated_lorry:"\u{1F69B}",artificial_satellite:"\u{1F6F0}",astonished:"\u{1F632}",athletic_shoe:"\u{1F45F}",atm:"\u{1F3E7}",atom_symbol:"\u269B\uFE0F",avocado:"\u{1F951}",b:"\u{1F171}\uFE0F",baby:"\u{1F476}",baby_bottle:"\u{1F37C}",baby_chick:"\u{1F424}",baby_symbol:"\u{1F6BC}",back:"\u{1F519}",bacon:"\u{1F953}",badminton:"\u{1F3F8}",baggage_claim:"\u{1F6C4}",baguette_bread:"\u{1F956}",balance_scale:"\u2696\uFE0F",balloon:"\u{1F388}",ballot_box:"\u{1F5F3}",ballot_box_with_check:"\u2611\uFE0F",bamboo:"\u{1F38D}",banana:"\u{1F34C}",bangbang:"\u203C\uFE0F",bank:"\u{1F3E6}",bar_chart:"\u{1F4CA}",barber:"\u{1F488}",baseball:"\u26BE\uFE0F",basketball:"\u{1F3C0}",basketball_man:"\u26F9\uFE0F",basketball_woman:"\u26F9\uFE0F&zwj;\u2640\uFE0F",bat:"\u{1F987}",bath:"\u{1F6C0}",bathtub:"\u{1F6C1}",battery:"\u{1F50B}",beach_umbrella:"\u{1F3D6}",bear:"\u{1F43B}",bed:"\u{1F6CF}",bee:"\u{1F41D}",beer:"\u{1F37A}",beers:"\u{1F37B}",beetle:"\u{1F41E}",beginner:"\u{1F530}",bell:"\u{1F514}",bellhop_bell:"\u{1F6CE}",bento:"\u{1F371}",biking_man:"\u{1F6B4}",bike:"\u{1F6B2}",biking_woman:"\u{1F6B4}&zwj;\u2640\uFE0F",bikini:"\u{1F459}",biohazard:"\u2623\uFE0F",bird:"\u{1F426}",birthday:"\u{1F382}",black_circle:"\u26AB\uFE0F",black_flag:"\u{1F3F4}",black_heart:"\u{1F5A4}",black_joker:"\u{1F0CF}",black_large_square:"\u2B1B\uFE0F",black_medium_small_square:"\u25FE\uFE0F",black_medium_square:"\u25FC\uFE0F",black_nib:"\u2712\uFE0F",black_small_square:"\u25AA\uFE0F",black_square_button:"\u{1F532}",blonde_man:"\u{1F471}",blonde_woman:"\u{1F471}&zwj;\u2640\uFE0F",blossom:"\u{1F33C}",blowfish:"\u{1F421}",blue_book:"\u{1F4D8}",blue_car:"\u{1F699}",blue_heart:"\u{1F499}",blush:"\u{1F60A}",boar:"\u{1F417}",boat:"\u26F5\uFE0F",bomb:"\u{1F4A3}",book:"\u{1F4D6}",bookmark:"\u{1F516}",bookmark_tabs:"\u{1F4D1}",books:"\u{1F4DA}",boom:"\u{1F4A5}",boot:"\u{1F462}",bouquet:"\u{1F490}",bowing_man:"\u{1F647}",bow_and_arrow:"\u{1F3F9}",bowing_woman:"\u{1F647}&zwj;\u2640\uFE0F",bowling:"\u{1F3B3}",boxing_glove:"\u{1F94A}",boy:"\u{1F466}",bread:"\u{1F35E}",bride_with_veil:"\u{1F470}",bridge_at_night:"\u{1F309}",briefcase:"\u{1F4BC}",broken_heart:"\u{1F494}",bug:"\u{1F41B}",building_construction:"\u{1F3D7}",bulb:"\u{1F4A1}",bullettrain_front:"\u{1F685}",bullettrain_side:"\u{1F684}",burrito:"\u{1F32F}",bus:"\u{1F68C}",business_suit_levitating:"\u{1F574}",busstop:"\u{1F68F}",bust_in_silhouette:"\u{1F464}",busts_in_silhouette:"\u{1F465}",butterfly:"\u{1F98B}",cactus:"\u{1F335}",cake:"\u{1F370}",calendar:"\u{1F4C6}",call_me_hand:"\u{1F919}",calling:"\u{1F4F2}",camel:"\u{1F42B}",camera:"\u{1F4F7}",camera_flash:"\u{1F4F8}",camping:"\u{1F3D5}",cancer:"\u264B\uFE0F",candle:"\u{1F56F}",candy:"\u{1F36C}",canoe:"\u{1F6F6}",capital_abcd:"\u{1F520}",capricorn:"\u2651\uFE0F",car:"\u{1F697}",card_file_box:"\u{1F5C3}",card_index:"\u{1F4C7}",card_index_dividers:"\u{1F5C2}",carousel_horse:"\u{1F3A0}",carrot:"\u{1F955}",cat:"\u{1F431}",cat2:"\u{1F408}",cd:"\u{1F4BF}",chains:"\u26D3",champagne:"\u{1F37E}",chart:"\u{1F4B9}",chart_with_downwards_trend:"\u{1F4C9}",chart_with_upwards_trend:"\u{1F4C8}",checkered_flag:"\u{1F3C1}",cheese:"\u{1F9C0}",cherries:"\u{1F352}",cherry_blossom:"\u{1F338}",chestnut:"\u{1F330}",chicken:"\u{1F414}",children_crossing:"\u{1F6B8}",chipmunk:"\u{1F43F}",chocolate_bar:"\u{1F36B}",christmas_tree:"\u{1F384}",church:"\u26EA\uFE0F",cinema:"\u{1F3A6}",circus_tent:"\u{1F3AA}",city_sunrise:"\u{1F307}",city_sunset:"\u{1F306}",cityscape:"\u{1F3D9}",cl:"\u{1F191}",clamp:"\u{1F5DC}",clap:"\u{1F44F}",clapper:"\u{1F3AC}",classical_building:"\u{1F3DB}",clinking_glasses:"\u{1F942}",clipboard:"\u{1F4CB}",clock1:"\u{1F550}",clock10:"\u{1F559}",clock1030:"\u{1F565}",clock11:"\u{1F55A}",clock1130:"\u{1F566}",clock12:"\u{1F55B}",clock1230:"\u{1F567}",clock130:"\u{1F55C}",clock2:"\u{1F551}",clock230:"\u{1F55D}",clock3:"\u{1F552}",clock330:"\u{1F55E}",clock4:"\u{1F553}",clock430:"\u{1F55F}",clock5:"\u{1F554}",clock530:"\u{1F560}",clock6:"\u{1F555}",clock630:"\u{1F561}",clock7:"\u{1F556}",clock730:"\u{1F562}",clock8:"\u{1F557}",clock830:"\u{1F563}",clock9:"\u{1F558}",clock930:"\u{1F564}",closed_book:"\u{1F4D5}",closed_lock_with_key:"\u{1F510}",closed_umbrella:"\u{1F302}",cloud:"\u2601\uFE0F",cloud_with_lightning:"\u{1F329}",cloud_with_lightning_and_rain:"\u26C8",cloud_with_rain:"\u{1F327}",cloud_with_snow:"\u{1F328}",clown_face:"\u{1F921}",clubs:"\u2663\uFE0F",cocktail:"\u{1F378}",coffee:"\u2615\uFE0F",coffin:"\u26B0\uFE0F",cold_sweat:"\u{1F630}",comet:"\u2604\uFE0F",computer:"\u{1F4BB}",computer_mouse:"\u{1F5B1}",confetti_ball:"\u{1F38A}",confounded:"\u{1F616}",confused:"\u{1F615}",congratulations:"\u3297\uFE0F",construction:"\u{1F6A7}",construction_worker_man:"\u{1F477}",construction_worker_woman:"\u{1F477}&zwj;\u2640\uFE0F",control_knobs:"\u{1F39B}",convenience_store:"\u{1F3EA}",cookie:"\u{1F36A}",cool:"\u{1F192}",policeman:"\u{1F46E}",copyright:"\xA9\uFE0F",corn:"\u{1F33D}",couch_and_lamp:"\u{1F6CB}",couple:"\u{1F46B}",couple_with_heart_woman_man:"\u{1F491}",couple_with_heart_man_man:"\u{1F468}&zwj;\u2764\uFE0F&zwj;\u{1F468}",couple_with_heart_woman_woman:"\u{1F469}&zwj;\u2764\uFE0F&zwj;\u{1F469}",couplekiss_man_man:"\u{1F468}&zwj;\u2764\uFE0F&zwj;\u{1F48B}&zwj;\u{1F468}",couplekiss_man_woman:"\u{1F48F}",couplekiss_woman_woman:"\u{1F469}&zwj;\u2764\uFE0F&zwj;\u{1F48B}&zwj;\u{1F469}",cow:"\u{1F42E}",cow2:"\u{1F404}",cowboy_hat_face:"\u{1F920}",crab:"\u{1F980}",crayon:"\u{1F58D}",credit_card:"\u{1F4B3}",crescent_moon:"\u{1F319}",cricket:"\u{1F3CF}",crocodile:"\u{1F40A}",croissant:"\u{1F950}",crossed_fingers:"\u{1F91E}",crossed_flags:"\u{1F38C}",crossed_swords:"\u2694\uFE0F",crown:"\u{1F451}",cry:"\u{1F622}",crying_cat_face:"\u{1F63F}",crystal_ball:"\u{1F52E}",cucumber:"\u{1F952}",cupid:"\u{1F498}",curly_loop:"\u27B0",currency_exchange:"\u{1F4B1}",curry:"\u{1F35B}",custard:"\u{1F36E}",customs:"\u{1F6C3}",cyclone:"\u{1F300}",dagger:"\u{1F5E1}",dancer:"\u{1F483}",dancing_women:"\u{1F46F}",dancing_men:"\u{1F46F}&zwj;\u2642\uFE0F",dango:"\u{1F361}",dark_sunglasses:"\u{1F576}",dart:"\u{1F3AF}",dash:"\u{1F4A8}",date:"\u{1F4C5}",deciduous_tree:"\u{1F333}",deer:"\u{1F98C}",department_store:"\u{1F3EC}",derelict_house:"\u{1F3DA}",desert:"\u{1F3DC}",desert_island:"\u{1F3DD}",desktop_computer:"\u{1F5A5}",male_detective:"\u{1F575}\uFE0F",diamond_shape_with_a_dot_inside:"\u{1F4A0}",diamonds:"\u2666\uFE0F",disappointed:"\u{1F61E}",disappointed_relieved:"\u{1F625}",dizzy:"\u{1F4AB}",dizzy_face:"\u{1F635}",do_not_litter:"\u{1F6AF}",dog:"\u{1F436}",dog2:"\u{1F415}",dollar:"\u{1F4B5}",dolls:"\u{1F38E}",dolphin:"\u{1F42C}",door:"\u{1F6AA}",doughnut:"\u{1F369}",dove:"\u{1F54A}",dragon:"\u{1F409}",dragon_face:"\u{1F432}",dress:"\u{1F457}",dromedary_camel:"\u{1F42A}",drooling_face:"\u{1F924}",droplet:"\u{1F4A7}",drum:"\u{1F941}",duck:"\u{1F986}",dvd:"\u{1F4C0}","e-mail":"\u{1F4E7}",eagle:"\u{1F985}",ear:"\u{1F442}",ear_of_rice:"\u{1F33E}",earth_africa:"\u{1F30D}",earth_americas:"\u{1F30E}",earth_asia:"\u{1F30F}",egg:"\u{1F95A}",eggplant:"\u{1F346}",eight_pointed_black_star:"\u2734\uFE0F",eight_spoked_asterisk:"\u2733\uFE0F",electric_plug:"\u{1F50C}",elephant:"\u{1F418}",email:"\u2709\uFE0F",end:"\u{1F51A}",envelope_with_arrow:"\u{1F4E9}",euro:"\u{1F4B6}",european_castle:"\u{1F3F0}",european_post_office:"\u{1F3E4}",evergreen_tree:"\u{1F332}",exclamation:"\u2757\uFE0F",expressionless:"\u{1F611}",eye:"\u{1F441}",eye_speech_bubble:"\u{1F441}&zwj;\u{1F5E8}",eyeglasses:"\u{1F453}",eyes:"\u{1F440}",face_with_head_bandage:"\u{1F915}",face_with_thermometer:"\u{1F912}",fist_oncoming:"\u{1F44A}",factory:"\u{1F3ED}",fallen_leaf:"\u{1F342}",family_man_woman_boy:"\u{1F46A}",family_man_boy:"\u{1F468}&zwj;\u{1F466}",family_man_boy_boy:"\u{1F468}&zwj;\u{1F466}&zwj;\u{1F466}",family_man_girl:"\u{1F468}&zwj;\u{1F467}",family_man_girl_boy:"\u{1F468}&zwj;\u{1F467}&zwj;\u{1F466}",family_man_girl_girl:"\u{1F468}&zwj;\u{1F467}&zwj;\u{1F467}",family_man_man_boy:"\u{1F468}&zwj;\u{1F468}&zwj;\u{1F466}",family_man_man_boy_boy:"\u{1F468}&zwj;\u{1F468}&zwj;\u{1F466}&zwj;\u{1F466}",family_man_man_girl:"\u{1F468}&zwj;\u{1F468}&zwj;\u{1F467}",family_man_man_girl_boy:"\u{1F468}&zwj;\u{1F468}&zwj;\u{1F467}&zwj;\u{1F466}",family_man_man_girl_girl:"\u{1F468}&zwj;\u{1F468}&zwj;\u{1F467}&zwj;\u{1F467}",family_man_woman_boy_boy:"\u{1F468}&zwj;\u{1F469}&zwj;\u{1F466}&zwj;\u{1F466}",family_man_woman_girl:"\u{1F468}&zwj;\u{1F469}&zwj;\u{1F467}",family_man_woman_girl_boy:"\u{1F468}&zwj;\u{1F469}&zwj;\u{1F467}&zwj;\u{1F466}",family_man_woman_girl_girl:"\u{1F468}&zwj;\u{1F469}&zwj;\u{1F467}&zwj;\u{1F467}",family_woman_boy:"\u{1F469}&zwj;\u{1F466}",family_woman_boy_boy:"\u{1F469}&zwj;\u{1F466}&zwj;\u{1F466}",family_woman_girl:"\u{1F469}&zwj;\u{1F467}",family_woman_girl_boy:"\u{1F469}&zwj;\u{1F467}&zwj;\u{1F466}",family_woman_girl_girl:"\u{1F469}&zwj;\u{1F467}&zwj;\u{1F467}",family_woman_woman_boy:"\u{1F469}&zwj;\u{1F469}&zwj;\u{1F466}",family_woman_woman_boy_boy:"\u{1F469}&zwj;\u{1F469}&zwj;\u{1F466}&zwj;\u{1F466}",family_woman_woman_girl:"\u{1F469}&zwj;\u{1F469}&zwj;\u{1F467}",family_woman_woman_girl_boy:"\u{1F469}&zwj;\u{1F469}&zwj;\u{1F467}&zwj;\u{1F466}",family_woman_woman_girl_girl:"\u{1F469}&zwj;\u{1F469}&zwj;\u{1F467}&zwj;\u{1F467}",fast_forward:"\u23E9",fax:"\u{1F4E0}",fearful:"\u{1F628}",feet:"\u{1F43E}",female_detective:"\u{1F575}\uFE0F&zwj;\u2640\uFE0F",ferris_wheel:"\u{1F3A1}",ferry:"\u26F4",field_hockey:"\u{1F3D1}",file_cabinet:"\u{1F5C4}",file_folder:"\u{1F4C1}",film_projector:"\u{1F4FD}",film_strip:"\u{1F39E}",fire:"\u{1F525}",fire_engine:"\u{1F692}",fireworks:"\u{1F386}",first_quarter_moon:"\u{1F313}",first_quarter_moon_with_face:"\u{1F31B}",fish:"\u{1F41F}",fish_cake:"\u{1F365}",fishing_pole_and_fish:"\u{1F3A3}",fist_raised:"\u270A",fist_left:"\u{1F91B}",fist_right:"\u{1F91C}",flags:"\u{1F38F}",flashlight:"\u{1F526}",fleur_de_lis:"\u269C\uFE0F",flight_arrival:"\u{1F6EC}",flight_departure:"\u{1F6EB}",floppy_disk:"\u{1F4BE}",flower_playing_cards:"\u{1F3B4}",flushed:"\u{1F633}",fog:"\u{1F32B}",foggy:"\u{1F301}",football:"\u{1F3C8}",footprints:"\u{1F463}",fork_and_knife:"\u{1F374}",fountain:"\u26F2\uFE0F",fountain_pen:"\u{1F58B}",four_leaf_clover:"\u{1F340}",fox_face:"\u{1F98A}",framed_picture:"\u{1F5BC}",free:"\u{1F193}",fried_egg:"\u{1F373}",fried_shrimp:"\u{1F364}",fries:"\u{1F35F}",frog:"\u{1F438}",frowning:"\u{1F626}",frowning_face:"\u2639\uFE0F",frowning_man:"\u{1F64D}&zwj;\u2642\uFE0F",frowning_woman:"\u{1F64D}",middle_finger:"\u{1F595}",fuelpump:"\u26FD\uFE0F",full_moon:"\u{1F315}",full_moon_with_face:"\u{1F31D}",funeral_urn:"\u26B1\uFE0F",game_die:"\u{1F3B2}",gear:"\u2699\uFE0F",gem:"\u{1F48E}",gemini:"\u264A\uFE0F",ghost:"\u{1F47B}",gift:"\u{1F381}",gift_heart:"\u{1F49D}",girl:"\u{1F467}",globe_with_meridians:"\u{1F310}",goal_net:"\u{1F945}",goat:"\u{1F410}",golf:"\u26F3\uFE0F",golfing_man:"\u{1F3CC}\uFE0F",golfing_woman:"\u{1F3CC}\uFE0F&zwj;\u2640\uFE0F",gorilla:"\u{1F98D}",grapes:"\u{1F347}",green_apple:"\u{1F34F}",green_book:"\u{1F4D7}",green_heart:"\u{1F49A}",green_salad:"\u{1F957}",grey_exclamation:"\u2755",grey_question:"\u2754",grimacing:"\u{1F62C}",grin:"\u{1F601}",grinning:"\u{1F600}",guardsman:"\u{1F482}",guardswoman:"\u{1F482}&zwj;\u2640\uFE0F",guitar:"\u{1F3B8}",gun:"\u{1F52B}",haircut_woman:"\u{1F487}",haircut_man:"\u{1F487}&zwj;\u2642\uFE0F",hamburger:"\u{1F354}",hammer:"\u{1F528}",hammer_and_pick:"\u2692",hammer_and_wrench:"\u{1F6E0}",hamster:"\u{1F439}",hand:"\u270B",handbag:"\u{1F45C}",handshake:"\u{1F91D}",hankey:"\u{1F4A9}",hatched_chick:"\u{1F425}",hatching_chick:"\u{1F423}",headphones:"\u{1F3A7}",hear_no_evil:"\u{1F649}",heart:"\u2764\uFE0F",heart_decoration:"\u{1F49F}",heart_eyes:"\u{1F60D}",heart_eyes_cat:"\u{1F63B}",heartbeat:"\u{1F493}",heartpulse:"\u{1F497}",hearts:"\u2665\uFE0F",heavy_check_mark:"\u2714\uFE0F",heavy_division_sign:"\u2797",heavy_dollar_sign:"\u{1F4B2}",heavy_heart_exclamation:"\u2763\uFE0F",heavy_minus_sign:"\u2796",heavy_multiplication_x:"\u2716\uFE0F",heavy_plus_sign:"\u2795",helicopter:"\u{1F681}",herb:"\u{1F33F}",hibiscus:"\u{1F33A}",high_brightness:"\u{1F506}",high_heel:"\u{1F460}",hocho:"\u{1F52A}",hole:"\u{1F573}",honey_pot:"\u{1F36F}",horse:"\u{1F434}",horse_racing:"\u{1F3C7}",hospital:"\u{1F3E5}",hot_pepper:"\u{1F336}",hotdog:"\u{1F32D}",hotel:"\u{1F3E8}",hotsprings:"\u2668\uFE0F",hourglass:"\u231B\uFE0F",hourglass_flowing_sand:"\u23F3",house:"\u{1F3E0}",house_with_garden:"\u{1F3E1}",houses:"\u{1F3D8}",hugs:"\u{1F917}",hushed:"\u{1F62F}",ice_cream:"\u{1F368}",ice_hockey:"\u{1F3D2}",ice_skate:"\u26F8",icecream:"\u{1F366}",id:"\u{1F194}",ideograph_advantage:"\u{1F250}",imp:"\u{1F47F}",inbox_tray:"\u{1F4E5}",incoming_envelope:"\u{1F4E8}",tipping_hand_woman:"\u{1F481}",information_source:"\u2139\uFE0F",innocent:"\u{1F607}",interrobang:"\u2049\uFE0F",iphone:"\u{1F4F1}",izakaya_lantern:"\u{1F3EE}",jack_o_lantern:"\u{1F383}",japan:"\u{1F5FE}",japanese_castle:"\u{1F3EF}",japanese_goblin:"\u{1F47A}",japanese_ogre:"\u{1F479}",jeans:"\u{1F456}",joy:"\u{1F602}",joy_cat:"\u{1F639}",joystick:"\u{1F579}",kaaba:"\u{1F54B}",key:"\u{1F511}",keyboard:"\u2328\uFE0F",keycap_ten:"\u{1F51F}",kick_scooter:"\u{1F6F4}",kimono:"\u{1F458}",kiss:"\u{1F48B}",kissing:"\u{1F617}",kissing_cat:"\u{1F63D}",kissing_closed_eyes:"\u{1F61A}",kissing_heart:"\u{1F618}",kissing_smiling_eyes:"\u{1F619}",kiwi_fruit:"\u{1F95D}",koala:"\u{1F428}",koko:"\u{1F201}",label:"\u{1F3F7}",large_blue_circle:"\u{1F535}",large_blue_diamond:"\u{1F537}",large_orange_diamond:"\u{1F536}",last_quarter_moon:"\u{1F317}",last_quarter_moon_with_face:"\u{1F31C}",latin_cross:"\u271D\uFE0F",laughing:"\u{1F606}",leaves:"\u{1F343}",ledger:"\u{1F4D2}",left_luggage:"\u{1F6C5}",left_right_arrow:"\u2194\uFE0F",leftwards_arrow_with_hook:"\u21A9\uFE0F",lemon:"\u{1F34B}",leo:"\u264C\uFE0F",leopard:"\u{1F406}",level_slider:"\u{1F39A}",libra:"\u264E\uFE0F",light_rail:"\u{1F688}",link:"\u{1F517}",lion:"\u{1F981}",lips:"\u{1F444}",lipstick:"\u{1F484}",lizard:"\u{1F98E}",lock:"\u{1F512}",lock_with_ink_pen:"\u{1F50F}",lollipop:"\u{1F36D}",loop:"\u27BF",loud_sound:"\u{1F50A}",loudspeaker:"\u{1F4E2}",love_hotel:"\u{1F3E9}",love_letter:"\u{1F48C}",low_brightness:"\u{1F505}",lying_face:"\u{1F925}",m:"\u24C2\uFE0F",mag:"\u{1F50D}",mag_right:"\u{1F50E}",mahjong:"\u{1F004}\uFE0F",mailbox:"\u{1F4EB}",mailbox_closed:"\u{1F4EA}",mailbox_with_mail:"\u{1F4EC}",mailbox_with_no_mail:"\u{1F4ED}",man:"\u{1F468}",man_artist:"\u{1F468}&zwj;\u{1F3A8}",man_astronaut:"\u{1F468}&zwj;\u{1F680}",man_cartwheeling:"\u{1F938}&zwj;\u2642\uFE0F",man_cook:"\u{1F468}&zwj;\u{1F373}",man_dancing:"\u{1F57A}",man_facepalming:"\u{1F926}&zwj;\u2642\uFE0F",man_factory_worker:"\u{1F468}&zwj;\u{1F3ED}",man_farmer:"\u{1F468}&zwj;\u{1F33E}",man_firefighter:"\u{1F468}&zwj;\u{1F692}",man_health_worker:"\u{1F468}&zwj;\u2695\uFE0F",man_in_tuxedo:"\u{1F935}",man_judge:"\u{1F468}&zwj;\u2696\uFE0F",man_juggling:"\u{1F939}&zwj;\u2642\uFE0F",man_mechanic:"\u{1F468}&zwj;\u{1F527}",man_office_worker:"\u{1F468}&zwj;\u{1F4BC}",man_pilot:"\u{1F468}&zwj;\u2708\uFE0F",man_playing_handball:"\u{1F93E}&zwj;\u2642\uFE0F",man_playing_water_polo:"\u{1F93D}&zwj;\u2642\uFE0F",man_scientist:"\u{1F468}&zwj;\u{1F52C}",man_shrugging:"\u{1F937}&zwj;\u2642\uFE0F",man_singer:"\u{1F468}&zwj;\u{1F3A4}",man_student:"\u{1F468}&zwj;\u{1F393}",man_teacher:"\u{1F468}&zwj;\u{1F3EB}",man_technologist:"\u{1F468}&zwj;\u{1F4BB}",man_with_gua_pi_mao:"\u{1F472}",man_with_turban:"\u{1F473}",tangerine:"\u{1F34A}",mans_shoe:"\u{1F45E}",mantelpiece_clock:"\u{1F570}",maple_leaf:"\u{1F341}",martial_arts_uniform:"\u{1F94B}",mask:"\u{1F637}",massage_woman:"\u{1F486}",massage_man:"\u{1F486}&zwj;\u2642\uFE0F",meat_on_bone:"\u{1F356}",medal_military:"\u{1F396}",medal_sports:"\u{1F3C5}",mega:"\u{1F4E3}",melon:"\u{1F348}",memo:"\u{1F4DD}",men_wrestling:"\u{1F93C}&zwj;\u2642\uFE0F",menorah:"\u{1F54E}",mens:"\u{1F6B9}",metal:"\u{1F918}",metro:"\u{1F687}",microphone:"\u{1F3A4}",microscope:"\u{1F52C}",milk_glass:"\u{1F95B}",milky_way:"\u{1F30C}",minibus:"\u{1F690}",minidisc:"\u{1F4BD}",mobile_phone_off:"\u{1F4F4}",money_mouth_face:"\u{1F911}",money_with_wings:"\u{1F4B8}",moneybag:"\u{1F4B0}",monkey:"\u{1F412}",monkey_face:"\u{1F435}",monorail:"\u{1F69D}",moon:"\u{1F314}",mortar_board:"\u{1F393}",mosque:"\u{1F54C}",motor_boat:"\u{1F6E5}",motor_scooter:"\u{1F6F5}",motorcycle:"\u{1F3CD}",motorway:"\u{1F6E3}",mount_fuji:"\u{1F5FB}",mountain:"\u26F0",mountain_biking_man:"\u{1F6B5}",mountain_biking_woman:"\u{1F6B5}&zwj;\u2640\uFE0F",mountain_cableway:"\u{1F6A0}",mountain_railway:"\u{1F69E}",mountain_snow:"\u{1F3D4}",mouse:"\u{1F42D}",mouse2:"\u{1F401}",movie_camera:"\u{1F3A5}",moyai:"\u{1F5FF}",mrs_claus:"\u{1F936}",muscle:"\u{1F4AA}",mushroom:"\u{1F344}",musical_keyboard:"\u{1F3B9}",musical_note:"\u{1F3B5}",musical_score:"\u{1F3BC}",mute:"\u{1F507}",nail_care:"\u{1F485}",name_badge:"\u{1F4DB}",national_park:"\u{1F3DE}",nauseated_face:"\u{1F922}",necktie:"\u{1F454}",negative_squared_cross_mark:"\u274E",nerd_face:"\u{1F913}",neutral_face:"\u{1F610}",new:"\u{1F195}",new_moon:"\u{1F311}",new_moon_with_face:"\u{1F31A}",newspaper:"\u{1F4F0}",newspaper_roll:"\u{1F5DE}",next_track_button:"\u23ED",ng:"\u{1F196}",no_good_man:"\u{1F645}&zwj;\u2642\uFE0F",no_good_woman:"\u{1F645}",night_with_stars:"\u{1F303}",no_bell:"\u{1F515}",no_bicycles:"\u{1F6B3}",no_entry:"\u26D4\uFE0F",no_entry_sign:"\u{1F6AB}",no_mobile_phones:"\u{1F4F5}",no_mouth:"\u{1F636}",no_pedestrians:"\u{1F6B7}",no_smoking:"\u{1F6AD}","non-potable_water":"\u{1F6B1}",nose:"\u{1F443}",notebook:"\u{1F4D3}",notebook_with_decorative_cover:"\u{1F4D4}",notes:"\u{1F3B6}",nut_and_bolt:"\u{1F529}",o:"\u2B55\uFE0F",o2:"\u{1F17E}\uFE0F",ocean:"\u{1F30A}",octopus:"\u{1F419}",oden:"\u{1F362}",office:"\u{1F3E2}",oil_drum:"\u{1F6E2}",ok:"\u{1F197}",ok_hand:"\u{1F44C}",ok_man:"\u{1F646}&zwj;\u2642\uFE0F",ok_woman:"\u{1F646}",old_key:"\u{1F5DD}",older_man:"\u{1F474}",older_woman:"\u{1F475}",om:"\u{1F549}",on:"\u{1F51B}",oncoming_automobile:"\u{1F698}",oncoming_bus:"\u{1F68D}",oncoming_police_car:"\u{1F694}",oncoming_taxi:"\u{1F696}",open_file_folder:"\u{1F4C2}",open_hands:"\u{1F450}",open_mouth:"\u{1F62E}",open_umbrella:"\u2602\uFE0F",ophiuchus:"\u26CE",orange_book:"\u{1F4D9}",orthodox_cross:"\u2626\uFE0F",outbox_tray:"\u{1F4E4}",owl:"\u{1F989}",ox:"\u{1F402}",package:"\u{1F4E6}",page_facing_up:"\u{1F4C4}",page_with_curl:"\u{1F4C3}",pager:"\u{1F4DF}",paintbrush:"\u{1F58C}",palm_tree:"\u{1F334}",pancakes:"\u{1F95E}",panda_face:"\u{1F43C}",paperclip:"\u{1F4CE}",paperclips:"\u{1F587}",parasol_on_ground:"\u26F1",parking:"\u{1F17F}\uFE0F",part_alternation_mark:"\u303D\uFE0F",partly_sunny:"\u26C5\uFE0F",passenger_ship:"\u{1F6F3}",passport_control:"\u{1F6C2}",pause_button:"\u23F8",peace_symbol:"\u262E\uFE0F",peach:"\u{1F351}",peanuts:"\u{1F95C}",pear:"\u{1F350}",pen:"\u{1F58A}",pencil2:"\u270F\uFE0F",penguin:"\u{1F427}",pensive:"\u{1F614}",performing_arts:"\u{1F3AD}",persevere:"\u{1F623}",person_fencing:"\u{1F93A}",pouting_woman:"\u{1F64E}",phone:"\u260E\uFE0F",pick:"\u26CF",pig:"\u{1F437}",pig2:"\u{1F416}",pig_nose:"\u{1F43D}",pill:"\u{1F48A}",pineapple:"\u{1F34D}",ping_pong:"\u{1F3D3}",pisces:"\u2653\uFE0F",pizza:"\u{1F355}",place_of_worship:"\u{1F6D0}",plate_with_cutlery:"\u{1F37D}",play_or_pause_button:"\u23EF",point_down:"\u{1F447}",point_left:"\u{1F448}",point_right:"\u{1F449}",point_up:"\u261D\uFE0F",point_up_2:"\u{1F446}",police_car:"\u{1F693}",policewoman:"\u{1F46E}&zwj;\u2640\uFE0F",poodle:"\u{1F429}",popcorn:"\u{1F37F}",post_office:"\u{1F3E3}",postal_horn:"\u{1F4EF}",postbox:"\u{1F4EE}",potable_water:"\u{1F6B0}",potato:"\u{1F954}",pouch:"\u{1F45D}",poultry_leg:"\u{1F357}",pound:"\u{1F4B7}",rage:"\u{1F621}",pouting_cat:"\u{1F63E}",pouting_man:"\u{1F64E}&zwj;\u2642\uFE0F",pray:"\u{1F64F}",prayer_beads:"\u{1F4FF}",pregnant_woman:"\u{1F930}",previous_track_button:"\u23EE",prince:"\u{1F934}",princess:"\u{1F478}",printer:"\u{1F5A8}",purple_heart:"\u{1F49C}",purse:"\u{1F45B}",pushpin:"\u{1F4CC}",put_litter_in_its_place:"\u{1F6AE}",question:"\u2753",rabbit:"\u{1F430}",rabbit2:"\u{1F407}",racehorse:"\u{1F40E}",racing_car:"\u{1F3CE}",radio:"\u{1F4FB}",radio_button:"\u{1F518}",radioactive:"\u2622\uFE0F",railway_car:"\u{1F683}",railway_track:"\u{1F6E4}",rainbow:"\u{1F308}",rainbow_flag:"\u{1F3F3}\uFE0F&zwj;\u{1F308}",raised_back_of_hand:"\u{1F91A}",raised_hand_with_fingers_splayed:"\u{1F590}",raised_hands:"\u{1F64C}",raising_hand_woman:"\u{1F64B}",raising_hand_man:"\u{1F64B}&zwj;\u2642\uFE0F",ram:"\u{1F40F}",ramen:"\u{1F35C}",rat:"\u{1F400}",record_button:"\u23FA",recycle:"\u267B\uFE0F",red_circle:"\u{1F534}",registered:"\xAE\uFE0F",relaxed:"\u263A\uFE0F",relieved:"\u{1F60C}",reminder_ribbon:"\u{1F397}",repeat:"\u{1F501}",repeat_one:"\u{1F502}",rescue_worker_helmet:"\u26D1",restroom:"\u{1F6BB}",revolving_hearts:"\u{1F49E}",rewind:"\u23EA",rhinoceros:"\u{1F98F}",ribbon:"\u{1F380}",rice:"\u{1F35A}",rice_ball:"\u{1F359}",rice_cracker:"\u{1F358}",rice_scene:"\u{1F391}",right_anger_bubble:"\u{1F5EF}",ring:"\u{1F48D}",robot:"\u{1F916}",rocket:"\u{1F680}",rofl:"\u{1F923}",roll_eyes:"\u{1F644}",roller_coaster:"\u{1F3A2}",rooster:"\u{1F413}",rose:"\u{1F339}",rosette:"\u{1F3F5}",rotating_light:"\u{1F6A8}",round_pushpin:"\u{1F4CD}",rowing_man:"\u{1F6A3}",rowing_woman:"\u{1F6A3}&zwj;\u2640\uFE0F",rugby_football:"\u{1F3C9}",running_man:"\u{1F3C3}",running_shirt_with_sash:"\u{1F3BD}",running_woman:"\u{1F3C3}&zwj;\u2640\uFE0F",sa:"\u{1F202}\uFE0F",sagittarius:"\u2650\uFE0F",sake:"\u{1F376}",sandal:"\u{1F461}",santa:"\u{1F385}",satellite:"\u{1F4E1}",saxophone:"\u{1F3B7}",school:"\u{1F3EB}",school_satchel:"\u{1F392}",scissors:"\u2702\uFE0F",scorpion:"\u{1F982}",scorpius:"\u264F\uFE0F",scream:"\u{1F631}",scream_cat:"\u{1F640}",scroll:"\u{1F4DC}",seat:"\u{1F4BA}",secret:"\u3299\uFE0F",see_no_evil:"\u{1F648}",seedling:"\u{1F331}",selfie:"\u{1F933}",shallow_pan_of_food:"\u{1F958}",shamrock:"\u2618\uFE0F",shark:"\u{1F988}",shaved_ice:"\u{1F367}",sheep:"\u{1F411}",shell:"\u{1F41A}",shield:"\u{1F6E1}",shinto_shrine:"\u26E9",ship:"\u{1F6A2}",shirt:"\u{1F455}",shopping:"\u{1F6CD}",shopping_cart:"\u{1F6D2}",shower:"\u{1F6BF}",shrimp:"\u{1F990}",signal_strength:"\u{1F4F6}",six_pointed_star:"\u{1F52F}",ski:"\u{1F3BF}",skier:"\u26F7",skull:"\u{1F480}",skull_and_crossbones:"\u2620\uFE0F",sleeping:"\u{1F634}",sleeping_bed:"\u{1F6CC}",sleepy:"\u{1F62A}",slightly_frowning_face:"\u{1F641}",slightly_smiling_face:"\u{1F642}",slot_machine:"\u{1F3B0}",small_airplane:"\u{1F6E9}",small_blue_diamond:"\u{1F539}",small_orange_diamond:"\u{1F538}",small_red_triangle:"\u{1F53A}",small_red_triangle_down:"\u{1F53B}",smile:"\u{1F604}",smile_cat:"\u{1F638}",smiley:"\u{1F603}",smiley_cat:"\u{1F63A}",smiling_imp:"\u{1F608}",smirk:"\u{1F60F}",smirk_cat:"\u{1F63C}",smoking:"\u{1F6AC}",snail:"\u{1F40C}",snake:"\u{1F40D}",sneezing_face:"\u{1F927}",snowboarder:"\u{1F3C2}",snowflake:"\u2744\uFE0F",snowman:"\u26C4\uFE0F",snowman_with_snow:"\u2603\uFE0F",sob:"\u{1F62D}",soccer:"\u26BD\uFE0F",soon:"\u{1F51C}",sos:"\u{1F198}",sound:"\u{1F509}",space_invader:"\u{1F47E}",spades:"\u2660\uFE0F",spaghetti:"\u{1F35D}",sparkle:"\u2747\uFE0F",sparkler:"\u{1F387}",sparkles:"\u2728",sparkling_heart:"\u{1F496}",speak_no_evil:"\u{1F64A}",speaker:"\u{1F508}",speaking_head:"\u{1F5E3}",speech_balloon:"\u{1F4AC}",speedboat:"\u{1F6A4}",spider:"\u{1F577}",spider_web:"\u{1F578}",spiral_calendar:"\u{1F5D3}",spiral_notepad:"\u{1F5D2}",spoon:"\u{1F944}",squid:"\u{1F991}",stadium:"\u{1F3DF}",star:"\u2B50\uFE0F",star2:"\u{1F31F}",star_and_crescent:"\u262A\uFE0F",star_of_david:"\u2721\uFE0F",stars:"\u{1F320}",station:"\u{1F689}",statue_of_liberty:"\u{1F5FD}",steam_locomotive:"\u{1F682}",stew:"\u{1F372}",stop_button:"\u23F9",stop_sign:"\u{1F6D1}",stopwatch:"\u23F1",straight_ruler:"\u{1F4CF}",strawberry:"\u{1F353}",stuck_out_tongue:"\u{1F61B}",stuck_out_tongue_closed_eyes:"\u{1F61D}",stuck_out_tongue_winking_eye:"\u{1F61C}",studio_microphone:"\u{1F399}",stuffed_flatbread:"\u{1F959}",sun_behind_large_cloud:"\u{1F325}",sun_behind_rain_cloud:"\u{1F326}",sun_behind_small_cloud:"\u{1F324}",sun_with_face:"\u{1F31E}",sunflower:"\u{1F33B}",sunglasses:"\u{1F60E}",sunny:"\u2600\uFE0F",sunrise:"\u{1F305}",sunrise_over_mountains:"\u{1F304}",surfing_man:"\u{1F3C4}",surfing_woman:"\u{1F3C4}&zwj;\u2640\uFE0F",sushi:"\u{1F363}",suspension_railway:"\u{1F69F}",sweat:"\u{1F613}",sweat_drops:"\u{1F4A6}",sweat_smile:"\u{1F605}",sweet_potato:"\u{1F360}",swimming_man:"\u{1F3CA}",swimming_woman:"\u{1F3CA}&zwj;\u2640\uFE0F",symbols:"\u{1F523}",synagogue:"\u{1F54D}",syringe:"\u{1F489}",taco:"\u{1F32E}",tada:"\u{1F389}",tanabata_tree:"\u{1F38B}",taurus:"\u2649\uFE0F",taxi:"\u{1F695}",tea:"\u{1F375}",telephone_receiver:"\u{1F4DE}",telescope:"\u{1F52D}",tennis:"\u{1F3BE}",tent:"\u26FA\uFE0F",thermometer:"\u{1F321}",thinking:"\u{1F914}",thought_balloon:"\u{1F4AD}",ticket:"\u{1F3AB}",tickets:"\u{1F39F}",tiger:"\u{1F42F}",tiger2:"\u{1F405}",timer_clock:"\u23F2",tipping_hand_man:"\u{1F481}&zwj;\u2642\uFE0F",tired_face:"\u{1F62B}",tm:"\u2122\uFE0F",toilet:"\u{1F6BD}",tokyo_tower:"\u{1F5FC}",tomato:"\u{1F345}",tongue:"\u{1F445}",top:"\u{1F51D}",tophat:"\u{1F3A9}",tornado:"\u{1F32A}",trackball:"\u{1F5B2}",tractor:"\u{1F69C}",traffic_light:"\u{1F6A5}",train:"\u{1F68B}",train2:"\u{1F686}",tram:"\u{1F68A}",triangular_flag_on_post:"\u{1F6A9}",triangular_ruler:"\u{1F4D0}",trident:"\u{1F531}",triumph:"\u{1F624}",trolleybus:"\u{1F68E}",trophy:"\u{1F3C6}",tropical_drink:"\u{1F379}",tropical_fish:"\u{1F420}",truck:"\u{1F69A}",trumpet:"\u{1F3BA}",tulip:"\u{1F337}",tumbler_glass:"\u{1F943}",turkey:"\u{1F983}",turtle:"\u{1F422}",tv:"\u{1F4FA}",twisted_rightwards_arrows:"\u{1F500}",two_hearts:"\u{1F495}",two_men_holding_hands:"\u{1F46C}",two_women_holding_hands:"\u{1F46D}",u5272:"\u{1F239}",u5408:"\u{1F234}",u55b6:"\u{1F23A}",u6307:"\u{1F22F}\uFE0F",u6708:"\u{1F237}\uFE0F",u6709:"\u{1F236}",u6e80:"\u{1F235}",u7121:"\u{1F21A}\uFE0F",u7533:"\u{1F238}",u7981:"\u{1F232}",u7a7a:"\u{1F233}",umbrella:"\u2614\uFE0F",unamused:"\u{1F612}",underage:"\u{1F51E}",unicorn:"\u{1F984}",unlock:"\u{1F513}",up:"\u{1F199}",upside_down_face:"\u{1F643}",v:"\u270C\uFE0F",vertical_traffic_light:"\u{1F6A6}",vhs:"\u{1F4FC}",vibration_mode:"\u{1F4F3}",video_camera:"\u{1F4F9}",video_game:"\u{1F3AE}",violin:"\u{1F3BB}",virgo:"\u264D\uFE0F",volcano:"\u{1F30B}",volleyball:"\u{1F3D0}",vs:"\u{1F19A}",vulcan_salute:"\u{1F596}",walking_man:"\u{1F6B6}",walking_woman:"\u{1F6B6}&zwj;\u2640\uFE0F",waning_crescent_moon:"\u{1F318}",waning_gibbous_moon:"\u{1F316}",warning:"\u26A0\uFE0F",wastebasket:"\u{1F5D1}",watch:"\u231A\uFE0F",water_buffalo:"\u{1F403}",watermelon:"\u{1F349}",wave:"\u{1F44B}",wavy_dash:"\u3030\uFE0F",waxing_crescent_moon:"\u{1F312}",wc:"\u{1F6BE}",weary:"\u{1F629}",wedding:"\u{1F492}",weight_lifting_man:"\u{1F3CB}\uFE0F",weight_lifting_woman:"\u{1F3CB}\uFE0F&zwj;\u2640\uFE0F",whale:"\u{1F433}",whale2:"\u{1F40B}",wheel_of_dharma:"\u2638\uFE0F",wheelchair:"\u267F\uFE0F",white_check_mark:"\u2705",white_circle:"\u26AA\uFE0F",white_flag:"\u{1F3F3}\uFE0F",white_flower:"\u{1F4AE}",white_large_square:"\u2B1C\uFE0F",white_medium_small_square:"\u25FD\uFE0F",white_medium_square:"\u25FB\uFE0F",white_small_square:"\u25AB\uFE0F",white_square_button:"\u{1F533}",wilted_flower:"\u{1F940}",wind_chime:"\u{1F390}",wind_face:"\u{1F32C}",wine_glass:"\u{1F377}",wink:"\u{1F609}",wolf:"\u{1F43A}",woman:"\u{1F469}",woman_artist:"\u{1F469}&zwj;\u{1F3A8}",woman_astronaut:"\u{1F469}&zwj;\u{1F680}",woman_cartwheeling:"\u{1F938}&zwj;\u2640\uFE0F",woman_cook:"\u{1F469}&zwj;\u{1F373}",woman_facepalming:"\u{1F926}&zwj;\u2640\uFE0F",woman_factory_worker:"\u{1F469}&zwj;\u{1F3ED}",woman_farmer:"\u{1F469}&zwj;\u{1F33E}",woman_firefighter:"\u{1F469}&zwj;\u{1F692}",woman_health_worker:"\u{1F469}&zwj;\u2695\uFE0F",woman_judge:"\u{1F469}&zwj;\u2696\uFE0F",woman_juggling:"\u{1F939}&zwj;\u2640\uFE0F",woman_mechanic:"\u{1F469}&zwj;\u{1F527}",woman_office_worker:"\u{1F469}&zwj;\u{1F4BC}",woman_pilot:"\u{1F469}&zwj;\u2708\uFE0F",woman_playing_handball:"\u{1F93E}&zwj;\u2640\uFE0F",woman_playing_water_polo:"\u{1F93D}&zwj;\u2640\uFE0F",woman_scientist:"\u{1F469}&zwj;\u{1F52C}",woman_shrugging:"\u{1F937}&zwj;\u2640\uFE0F",woman_singer:"\u{1F469}&zwj;\u{1F3A4}",woman_student:"\u{1F469}&zwj;\u{1F393}",woman_teacher:"\u{1F469}&zwj;\u{1F3EB}",woman_technologist:"\u{1F469}&zwj;\u{1F4BB}",woman_with_turban:"\u{1F473}&zwj;\u2640\uFE0F",womans_clothes:"\u{1F45A}",womans_hat:"\u{1F452}",women_wrestling:"\u{1F93C}&zwj;\u2640\uFE0F",womens:"\u{1F6BA}",world_map:"\u{1F5FA}",worried:"\u{1F61F}",wrench:"\u{1F527}",writing_hand:"\u270D\uFE0F",x:"\u274C",yellow_heart:"\u{1F49B}",yen:"\u{1F4B4}",yin_yang:"\u262F\uFE0F",yum:"\u{1F60B}",zap:"\u26A1\uFE0F",zipper_mouth_face:"\u{1F910}",zzz:"\u{1F4A4}",octocat:'<img alt=":octocat:" height="20" width="20" align="absmiddle" src="https://assets-cdn.github.com/images/icons/emoji/octocat.png">',showdown:`<span style="font-family: 'Anonymous Pro', monospace; text-decoration: underline; text-decoration-style: dashed; text-decoration-color: #3e8b8a;text-underline-position: under;">S</span>`},r.Converter=function(n){"use strict";var i={},u=[],d=[],p={},m=c,f={parsed:{},raw:"",format:""};g();function g(){n=n||{};for(var l in s)s.hasOwnProperty(l)&&(i[l]=s[l]);if(typeof n=="object")for(var y in n)n.hasOwnProperty(y)&&(i[y]=n[y]);else throw Error("Converter expects the passed parameter to be an object, but "+typeof n+" was passed instead.");i.extensions&&r.helper.forEach(i.extensions,T)}function T(l,y){if(y=y||null,r.helper.isString(l))if(l=r.helper.stdExtName(l),y=l,r.extensions[l]){console.warn("DEPRECATION WARNING: "+l+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),k(r.extensions[l],l);return}else if(!r.helper.isUndefined(o[l]))l=o[l];else throw Error('Extension "'+l+'" could not be loaded. It was either not found or is not a valid extension.');typeof l=="function"&&(l=l()),r.helper.isArray(l)||(l=[l]);var C=_(l,y);if(!C.valid)throw Error(C.error);for(var A=0;A<l.length;++A){switch(l[A].type){case"lang":u.push(l[A]);break;case"output":d.push(l[A]);break}if(l[A].hasOwnProperty("listeners"))for(var O in l[A].listeners)l[A].listeners.hasOwnProperty(O)&&w(O,l[A].listeners[O])}}function k(l,y){typeof l=="function"&&(l=l(new r.Converter)),r.helper.isArray(l)||(l=[l]);var C=_(l,y);if(!C.valid)throw Error(C.error);for(var A=0;A<l.length;++A)switch(l[A].type){case"lang":u.push(l[A]);break;case"output":d.push(l[A]);break;default:throw Error("Extension loader error: Type unrecognized!!!")}}function w(l,y){if(!r.helper.isString(l))throw Error("Invalid argument in converter.listen() method: name must be a string, but "+typeof l+" given");if(typeof y!="function")throw Error("Invalid argument in converter.listen() method: callback must be a function, but "+typeof y+" given");p.hasOwnProperty(l)||(p[l]=[]),p[l].push(y)}function v(l){var y=l.match(/^\s*/)[0].length,C=new RegExp("^\\s{0,"+y+"}","gm");return l.replace(C,"")}this._dispatch=function(y,C,A,O){if(p.hasOwnProperty(y))for(var S=0;S<p[y].length;++S){var F=p[y][S](y,C,this,A,O);F&&typeof F<"u"&&(C=F)}return C},this.listen=function(l,y){return w(l,y),this},this.makeHtml=function(l){if(!l)return l;var y={gHtmlBlocks:[],gHtmlMdBlocks:[],gHtmlSpans:[],gUrls:{},gTitles:{},gDimensions:{},gListLevel:0,hashLinkCounts:{},langExtensions:u,outputModifiers:d,converter:this,ghCodeBlocks:[],metadata:{parsed:{},raw:"",format:""}};return l=l.replace(/Â¨/g,"\xA8T"),l=l.replace(/\$/g,"\xA8D"),l=l.replace(/\r\n/g,`
`),l=l.replace(/\r/g,`
`),l=l.replace(/\u00A0/g,"&nbsp;"),i.smartIndentationFix&&(l=v(l)),l=`

`+l+`

`,l=r.subParser("detab")(l,i,y),l=l.replace(/^[ \t]+$/mg,""),r.helper.forEach(u,function(C){l=r.subParser("runExtension")(C,l,i,y)}),l=r.subParser("metadata")(l,i,y),l=r.subParser("hashPreCodeTags")(l,i,y),l=r.subParser("githubCodeBlocks")(l,i,y),l=r.subParser("hashHTMLBlocks")(l,i,y),l=r.subParser("hashCodeTags")(l,i,y),l=r.subParser("stripLinkDefinitions")(l,i,y),l=r.subParser("blockGamut")(l,i,y),l=r.subParser("unhashHTMLSpans")(l,i,y),l=r.subParser("unescapeSpecialChars")(l,i,y),l=l.replace(/Â¨D/g,"$$"),l=l.replace(/Â¨T/g,"\xA8"),l=r.subParser("completeHTMLDocument")(l,i,y),r.helper.forEach(d,function(C){l=r.subParser("runExtension")(C,l,i,y)}),f=y.metadata,l},this.makeMarkdown=this.makeMd=function(l,y){if(l=l.replace(/\r\n/g,`
`),l=l.replace(/\r/g,`
`),l=l.replace(/>[ \t]+</,">\xA8NBSP;<"),!y)if(window&&window.document)y=window.document;else throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");var C=y.createElement("div");C.innerHTML=l;var A={preList:ne(C)};K(C);for(var O=C.childNodes,S="",F=0;F<O.length;F++)S+=r.subParser("makeMarkdown.node")(O[F],A);function K(x){for(var $=0;$<x.childNodes.length;++$){var Y=x.childNodes[$];Y.nodeType===3?/\S/.test(Y.nodeValue)?(Y.nodeValue=Y.nodeValue.split(`
`).join(" "),Y.nodeValue=Y.nodeValue.replace(/(\s)+/g,"$1")):(x.removeChild(Y),--$):Y.nodeType===1&&K(Y)}}function ne(x){for(var $=x.querySelectorAll("pre"),Y=[],X=0;X<$.length;++X)if($[X].childElementCount===1&&$[X].firstChild.tagName.toLowerCase()==="code"){var tt=$[X].firstChild.innerHTML.trim(),nt=$[X].firstChild.getAttribute("data-language")||"";if(nt==="")for(var pn=$[X].firstChild.className.split(" "),at=0;at<pn.length;++at){var mn=pn[at].match(/^language-(.+)$/);if(mn!==null){nt=mn[1];break}}tt=r.helper.unescapeHTMLEntities(tt),Y.push(tt),$[X].outerHTML='<precode language="'+nt+'" precodenum="'+X.toString()+'"></precode>'}else Y.push($[X].innerHTML),$[X].innerHTML="",$[X].setAttribute("prenum",X.toString());return Y}return S},this.setOption=function(l,y){i[l]=y},this.getOption=function(l){return i[l]},this.getOptions=function(){return i},this.addExtension=function(l,y){y=y||null,T(l,y)},this.useExtension=function(l){T(l)},this.setFlavor=function(l){if(!h.hasOwnProperty(l))throw Error(l+" flavor was not found");var y=h[l];m=l;for(var C in y)y.hasOwnProperty(C)&&(i[C]=y[C])},this.getFlavor=function(){return m},this.removeExtension=function(l){r.helper.isArray(l)||(l=[l]);for(var y=0;y<l.length;++y){for(var C=l[y],A=0;A<u.length;++A)u[A]===C&&u[A].splice(A,1);for(var O=0;O<d.length;++A)d[O]===C&&d[O].splice(A,1)}},this.getAllExtensions=function(){return{language:u,output:d}},this.getMetadata=function(l){return l?f.raw:f.parsed},this.getMetadataFormat=function(){return f.format},this._setMetadataPair=function(l,y){f.parsed[l]=y},this._setMetadataFormat=function(l){f.format=l},this._setMetadataRaw=function(l){f.raw=l}},r.subParser("anchors",function(n,i,u){"use strict";n=u.converter._dispatch("anchors.before",n,i,u);var d=function(p,m,f,g,T,k,w){if(r.helper.isUndefined(w)&&(w=""),f=f.toLowerCase(),p.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)g="";else if(!g)if(f||(f=m.toLowerCase().replace(/ ?\n/g," ")),g="#"+f,!r.helper.isUndefined(u.gUrls[f]))g=u.gUrls[f],r.helper.isUndefined(u.gTitles[f])||(w=u.gTitles[f]);else return p;g=g.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var v='<a href="'+g+'"';return w!==""&&w!==null&&(w=w.replace(/"/g,"&quot;"),w=w.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),v+=' title="'+w+'"'),i.openLinksInNewWindow&&!/^#/.test(g)&&(v+=' rel="noopener noreferrer" target="\xA8E95Eblank"'),v+=">"+m+"</a>",v};return n=n.replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,d),n=n.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,d),n=n.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,d),n=n.replace(/\[([^\[\]]+)]()()()()()/g,d),i.ghMentions&&(n=n.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gmi,function(p,m,f,g,T){if(f==="\\")return m+g;if(!r.helper.isString(i.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var k=i.ghMentionsLink.replace(/\{u}/g,T),w="";return i.openLinksInNewWindow&&(w=' rel="noopener noreferrer" target="\xA8E95Eblank"'),m+'<a href="'+k+'"'+w+">"+g+"</a>"})),n=u.converter._dispatch("anchors.after",n,i,u),n});var L=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,N=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,j=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,I=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi,G=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,Ce=function(n){"use strict";return function(i,u,d,p,m,f,g){d=d.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var T=d,k="",w="",v=u||"",l=g||"";return/^www\./i.test(d)&&(d=d.replace(/^www\./i,"http://www.")),n.excludeTrailingPunctuationFromURLs&&f&&(k=f),n.openLinksInNewWindow&&(w=' rel="noopener noreferrer" target="\xA8E95Eblank"'),v+'<a href="'+d+'"'+w+">"+T+"</a>"+k+l}},ur=function(n,i){"use strict";return function(u,d,p){var m="mailto:";return d=d||"",p=r.subParser("unescapeSpecialChars")(p,n,i),n.encodeEmails?(m=r.helper.encodeEmailAddress(m+p),p=r.helper.encodeEmailAddress(p)):m=m+p,d+'<a href="'+m+'">'+p+"</a>"}};r.subParser("autoLinks",function(n,i,u){"use strict";return n=u.converter._dispatch("autoLinks.before",n,i,u),n=n.replace(j,Ce(i)),n=n.replace(G,ur(i,u)),n=u.converter._dispatch("autoLinks.after",n,i,u),n}),r.subParser("simplifiedAutoLinks",function(n,i,u){"use strict";return i.simplifiedAutoLink&&(n=u.converter._dispatch("simplifiedAutoLinks.before",n,i,u),i.excludeTrailingPunctuationFromURLs?n=n.replace(N,Ce(i)):n=n.replace(L,Ce(i)),n=n.replace(I,ur(i,u)),n=u.converter._dispatch("simplifiedAutoLinks.after",n,i,u)),n}),r.subParser("blockGamut",function(n,i,u){"use strict";return n=u.converter._dispatch("blockGamut.before",n,i,u),n=r.subParser("blockQuotes")(n,i,u),n=r.subParser("headers")(n,i,u),n=r.subParser("horizontalRule")(n,i,u),n=r.subParser("lists")(n,i,u),n=r.subParser("codeBlocks")(n,i,u),n=r.subParser("tables")(n,i,u),n=r.subParser("hashHTMLBlocks")(n,i,u),n=r.subParser("paragraphs")(n,i,u),n=u.converter._dispatch("blockGamut.after",n,i,u),n}),r.subParser("blockQuotes",function(n,i,u){"use strict";n=u.converter._dispatch("blockQuotes.before",n,i,u),n=n+`

`;var d=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return i.splitAdjacentBlockquotes&&(d=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),n=n.replace(d,function(p){return p=p.replace(/^[ \t]*>[ \t]?/gm,""),p=p.replace(/Â¨0/g,""),p=p.replace(/^[ \t]+$/gm,""),p=r.subParser("githubCodeBlocks")(p,i,u),p=r.subParser("blockGamut")(p,i,u),p=p.replace(/(^|\n)/g,"$1  "),p=p.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,function(m,f){var g=f;return g=g.replace(/^  /mg,"\xA80"),g=g.replace(/Â¨0/g,""),g}),r.subParser("hashBlock")(`<blockquote>
`+p+`
</blockquote>`,i,u)}),n=u.converter._dispatch("blockQuotes.after",n,i,u),n}),r.subParser("codeBlocks",function(n,i,u){"use strict";n=u.converter._dispatch("codeBlocks.before",n,i,u),n+="\xA80";var d=/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=Â¨0))/g;return n=n.replace(d,function(p,m,f){var g=m,T=f,k=`
`;return g=r.subParser("outdent")(g,i,u),g=r.subParser("encodeCode")(g,i,u),g=r.subParser("detab")(g,i,u),g=g.replace(/^\n+/g,""),g=g.replace(/\n+$/g,""),i.omitExtraWLInCodeBlocks&&(k=""),g="<pre><code>"+g+k+"</code></pre>",r.subParser("hashBlock")(g,i,u)+T}),n=n.replace(/Â¨0/,""),n=u.converter._dispatch("codeBlocks.after",n,i,u),n}),r.subParser("codeSpans",function(n,i,u){"use strict";return n=u.converter._dispatch("codeSpans.before",n,i,u),typeof n>"u"&&(n=""),n=n.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(d,p,m,f){var g=f;return g=g.replace(/^([ \t]*)/g,""),g=g.replace(/[ \t]*$/g,""),g=r.subParser("encodeCode")(g,i,u),g=p+"<code>"+g+"</code>",g=r.subParser("hashHTMLSpans")(g,i,u),g}),n=u.converter._dispatch("codeSpans.after",n,i,u),n}),r.subParser("completeHTMLDocument",function(n,i,u){"use strict";if(!i.completeHTMLDocument)return n;n=u.converter._dispatch("completeHTMLDocument.before",n,i,u);var d="html",p=`<!DOCTYPE HTML>
`,m="",f=`<meta charset="utf-8">
`,g="",T="";typeof u.metadata.parsed.doctype<"u"&&(p="<!DOCTYPE "+u.metadata.parsed.doctype+`>
`,d=u.metadata.parsed.doctype.toString().toLowerCase(),(d==="html"||d==="html5")&&(f='<meta charset="utf-8">'));for(var k in u.metadata.parsed)if(u.metadata.parsed.hasOwnProperty(k))switch(k.toLowerCase()){case"doctype":break;case"title":m="<title>"+u.metadata.parsed.title+`</title>
`;break;case"charset":d==="html"||d==="html5"?f='<meta charset="'+u.metadata.parsed.charset+`">
`:f='<meta name="charset" content="'+u.metadata.parsed.charset+`">
`;break;case"language":case"lang":g=' lang="'+u.metadata.parsed[k]+'"',T+='<meta name="'+k+'" content="'+u.metadata.parsed[k]+`">
`;break;default:T+='<meta name="'+k+'" content="'+u.metadata.parsed[k]+`">
`}return n=p+"<html"+g+`>
<head>
`+m+f+T+`</head>
<body>
`+n.trim()+`
</body>
</html>`,n=u.converter._dispatch("completeHTMLDocument.after",n,i,u),n}),r.subParser("detab",function(n,i,u){"use strict";return n=u.converter._dispatch("detab.before",n,i,u),n=n.replace(/\t(?=\t)/g,"    "),n=n.replace(/\t/g,"\xA8A\xA8B"),n=n.replace(/Â¨B(.+?)Â¨A/g,function(d,p){for(var m=p,f=4-m.length%4,g=0;g<f;g++)m+=" ";return m}),n=n.replace(/Â¨A/g,"    "),n=n.replace(/Â¨B/g,""),n=u.converter._dispatch("detab.after",n,i,u),n}),r.subParser("ellipsis",function(n,i,u){"use strict";return n=u.converter._dispatch("ellipsis.before",n,i,u),n=n.replace(/\.\.\./g,"\u2026"),n=u.converter._dispatch("ellipsis.after",n,i,u),n}),r.subParser("emoji",function(n,i,u){"use strict";if(!i.emoji)return n;n=u.converter._dispatch("emoji.before",n,i,u);var d=/:([\S]+?):/g;return n=n.replace(d,function(p,m){return r.helper.emojis.hasOwnProperty(m)?r.helper.emojis[m]:p}),n=u.converter._dispatch("emoji.after",n,i,u),n}),r.subParser("encodeAmpsAndAngles",function(n,i,u){"use strict";return n=u.converter._dispatch("encodeAmpsAndAngles.before",n,i,u),n=n.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&amp;"),n=n.replace(/<(?![a-z\/?$!])/gi,"&lt;"),n=n.replace(/</g,"&lt;"),n=n.replace(/>/g,"&gt;"),n=u.converter._dispatch("encodeAmpsAndAngles.after",n,i,u),n}),r.subParser("encodeBackslashEscapes",function(n,i,u){"use strict";return n=u.converter._dispatch("encodeBackslashEscapes.before",n,i,u),n=n.replace(/\\(\\)/g,r.helper.escapeCharactersCallback),n=n.replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,r.helper.escapeCharactersCallback),n=u.converter._dispatch("encodeBackslashEscapes.after",n,i,u),n}),r.subParser("encodeCode",function(n,i,u){"use strict";return n=u.converter._dispatch("encodeCode.before",n,i,u),n=n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/([*_{}\[\]\\=~-])/g,r.helper.escapeCharactersCallback),n=u.converter._dispatch("encodeCode.after",n,i,u),n}),r.subParser("escapeSpecialCharsWithinTagAttributes",function(n,i,u){"use strict";n=u.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",n,i,u);var d=/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,p=/<!(--(?:(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;return n=n.replace(d,function(m){return m.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,r.helper.escapeCharactersCallback)}),n=n.replace(p,function(m){return m.replace(/([\\`*_~=|])/g,r.helper.escapeCharactersCallback)}),n=u.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",n,i,u),n}),r.subParser("githubCodeBlocks",function(n,i,u){"use strict";return i.ghCodeBlocks?(n=u.converter._dispatch("githubCodeBlocks.before",n,i,u),n+="\xA80",n=n.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(d,p,m,f){var g=i.omitExtraWLInCodeBlocks?"":`
`;return f=r.subParser("encodeCode")(f,i,u),f=r.subParser("detab")(f,i,u),f=f.replace(/^\n+/g,""),f=f.replace(/\n+$/g,""),f="<pre><code"+(m?' class="'+m+" language-"+m+'"':"")+">"+f+g+"</code></pre>",f=r.subParser("hashBlock")(f,i,u),`

\xA8G`+(u.ghCodeBlocks.push({text:d,codeblock:f})-1)+`G

`}),n=n.replace(/Â¨0/,""),u.converter._dispatch("githubCodeBlocks.after",n,i,u)):n}),r.subParser("hashBlock",function(n,i,u){"use strict";return n=u.converter._dispatch("hashBlock.before",n,i,u),n=n.replace(/(^\n+|\n+$)/g,""),n=`

\xA8K`+(u.gHtmlBlocks.push(n)-1)+`K

`,n=u.converter._dispatch("hashBlock.after",n,i,u),n}),r.subParser("hashCodeTags",function(n,i,u){"use strict";n=u.converter._dispatch("hashCodeTags.before",n,i,u);var d=function(p,m,f,g){var T=f+r.subParser("encodeCode")(m,i,u)+g;return"\xA8C"+(u.gHtmlSpans.push(T)-1)+"C"};return n=r.helper.replaceRecursiveRegExp(n,d,"<code\\b[^>]*>","</code>","gim"),n=u.converter._dispatch("hashCodeTags.after",n,i,u),n}),r.subParser("hashElement",function(n,i,u){"use strict";return function(d,p){var m=p;return m=m.replace(/\n\n/g,`
`),m=m.replace(/^\n/,""),m=m.replace(/\n+$/g,""),m=`

\xA8K`+(u.gHtmlBlocks.push(m)-1)+`K

`,m}}),r.subParser("hashHTMLBlocks",function(n,i,u){"use strict";n=u.converter._dispatch("hashHTMLBlocks.before",n,i,u);var d=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],p=function(l,y,C,A){var O=l;return C.search(/\bmarkdown\b/)!==-1&&(O=C+u.converter.makeHtml(y)+A),`

\xA8K`+(u.gHtmlBlocks.push(O)-1)+`K

`};i.backslashEscapesHTMLTags&&(n=n.replace(/\\<(\/?[^>]+?)>/g,function(l,y){return"&lt;"+y+"&gt;"}));for(var m=0;m<d.length;++m)for(var f,g=new RegExp("^ {0,3}(<"+d[m]+"\\b[^>]*>)","im"),T="<"+d[m]+"\\b[^>]*>",k="</"+d[m]+">";(f=r.helper.regexIndexOf(n,g))!==-1;){var w=r.helper.splitAtIndex(n,f),v=r.helper.replaceRecursiveRegExp(w[1],p,T,k,"im");if(v===w[1])break;n=w[0].concat(v)}return n=n.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,r.subParser("hashElement")(n,i,u)),n=r.helper.replaceRecursiveRegExp(n,function(l){return`

\xA8K`+(u.gHtmlBlocks.push(l)-1)+`K

`},"^ {0,3}<!--","-->","gm"),n=n.replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,r.subParser("hashElement")(n,i,u)),n=u.converter._dispatch("hashHTMLBlocks.after",n,i,u),n}),r.subParser("hashHTMLSpans",function(n,i,u){"use strict";n=u.converter._dispatch("hashHTMLSpans.before",n,i,u);function d(p){return"\xA8C"+(u.gHtmlSpans.push(p)-1)+"C"}return n=n.replace(/<[^>]+?\/>/gi,function(p){return d(p)}),n=n.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(p){return d(p)}),n=n.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(p){return d(p)}),n=n.replace(/<[^>]+?>/gi,function(p){return d(p)}),n=u.converter._dispatch("hashHTMLSpans.after",n,i,u),n}),r.subParser("unhashHTMLSpans",function(n,i,u){"use strict";n=u.converter._dispatch("unhashHTMLSpans.before",n,i,u);for(var d=0;d<u.gHtmlSpans.length;++d){for(var p=u.gHtmlSpans[d],m=0;/Â¨C(\d+)C/.test(p);){var f=RegExp.$1;if(p=p.replace("\xA8C"+f+"C",u.gHtmlSpans[f]),m===10){console.error("maximum nesting of 10 spans reached!!!");break}++m}n=n.replace("\xA8C"+d+"C",p)}return n=u.converter._dispatch("unhashHTMLSpans.after",n,i,u),n}),r.subParser("hashPreCodeTags",function(n,i,u){"use strict";n=u.converter._dispatch("hashPreCodeTags.before",n,i,u);var d=function(p,m,f,g){var T=f+r.subParser("encodeCode")(m,i,u)+g;return`

\xA8G`+(u.ghCodeBlocks.push({text:p,codeblock:T})-1)+`G

`};return n=r.helper.replaceRecursiveRegExp(n,d,"^ {0,3}<pre\\b[^>]*>\\s*<code\\b[^>]*>","^ {0,3}</code>\\s*</pre>","gim"),n=u.converter._dispatch("hashPreCodeTags.after",n,i,u),n}),r.subParser("headers",function(n,i,u){"use strict";n=u.converter._dispatch("headers.before",n,i,u);var d=isNaN(parseInt(i.headerLevelStart))?1:parseInt(i.headerLevelStart),p=i.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,m=i.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;n=n.replace(p,function(T,k){var w=r.subParser("spanGamut")(k,i,u),v=i.noHeaderId?"":' id="'+g(k)+'"',l=d,y="<h"+l+v+">"+w+"</h"+l+">";return r.subParser("hashBlock")(y,i,u)}),n=n.replace(m,function(T,k){var w=r.subParser("spanGamut")(k,i,u),v=i.noHeaderId?"":' id="'+g(k)+'"',l=d+1,y="<h"+l+v+">"+w+"</h"+l+">";return r.subParser("hashBlock")(y,i,u)});var f=i.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;n=n.replace(f,function(T,k,w){var v=w;i.customizedHeaderId&&(v=w.replace(/\s?\{([^{]+?)}\s*$/,""));var l=r.subParser("spanGamut")(v,i,u),y=i.noHeaderId?"":' id="'+g(w)+'"',C=d-1+k.length,A="<h"+C+y+">"+l+"</h"+C+">";return r.subParser("hashBlock")(A,i,u)});function g(T){var k,w;if(i.customizedHeaderId){var v=T.match(/\{([^{]+?)}\s*$/);v&&v[1]&&(T=v[1])}return k=T,r.helper.isString(i.prefixHeaderId)?w=i.prefixHeaderId:i.prefixHeaderId===!0?w="section-":w="",i.rawPrefixHeaderId||(k=w+k),i.ghCompatibleHeaderId?k=k.replace(/ /g,"-").replace(/&amp;/g,"").replace(/Â¨T/g,"").replace(/Â¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^Â¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():i.rawHeaderId?k=k.replace(/ /g,"-").replace(/&amp;/g,"&").replace(/Â¨T/g,"\xA8").replace(/Â¨D/g,"$").replace(/["']/g,"-").toLowerCase():k=k.replace(/[^\w]/g,"").toLowerCase(),i.rawPrefixHeaderId&&(k=w+k),u.hashLinkCounts[k]?k=k+"-"+u.hashLinkCounts[k]++:u.hashLinkCounts[k]=1,k}return n=u.converter._dispatch("headers.after",n,i,u),n}),r.subParser("horizontalRule",function(n,i,u){"use strict";n=u.converter._dispatch("horizontalRule.before",n,i,u);var d=r.subParser("hashBlock")("<hr />",i,u);return n=n.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,d),n=n.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,d),n=n.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,d),n=u.converter._dispatch("horizontalRule.after",n,i,u),n}),r.subParser("images",function(n,i,u){"use strict";n=u.converter._dispatch("images.before",n,i,u);var d=/!\[([^\]]*?)][ \t]*()\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,p=/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,m=/!\[([^\]]*?)][ \t]*()\([ \t]?<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,f=/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,g=/!\[([^\[\]]+)]()()()()()/g;function T(w,v,l,y,C,A,O,S){return y=y.replace(/\s/g,""),k(w,v,l,y,C,A,O,S)}function k(w,v,l,y,C,A,O,S){var F=u.gUrls,K=u.gTitles,ne=u.gDimensions;if(l=l.toLowerCase(),S||(S=""),w.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)y="";else if(y===""||y===null)if((l===""||l===null)&&(l=v.toLowerCase().replace(/ ?\n/g," ")),y="#"+l,!r.helper.isUndefined(F[l]))y=F[l],r.helper.isUndefined(K[l])||(S=K[l]),r.helper.isUndefined(ne[l])||(C=ne[l].width,A=ne[l].height);else return w;v=v.replace(/"/g,"&quot;").replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),y=y.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var x='<img src="'+y+'" alt="'+v+'"';return S&&r.helper.isString(S)&&(S=S.replace(/"/g,"&quot;").replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),x+=' title="'+S+'"'),C&&A&&(C=C==="*"?"auto":C,A=A==="*"?"auto":A,x+=' width="'+C+'"',x+=' height="'+A+'"'),x+=" />",x}return n=n.replace(f,k),n=n.replace(m,T),n=n.replace(p,k),n=n.replace(d,k),n=n.replace(g,k),n=u.converter._dispatch("images.after",n,i,u),n}),r.subParser("italicsAndBold",function(n,i,u){"use strict";n=u.converter._dispatch("italicsAndBold.before",n,i,u);function d(p,m,f){return m+p+f}return i.literalMidWordUnderscores?(n=n.replace(/\b___(\S[\s\S]*?)___\b/g,function(p,m){return d(m,"<strong><em>","</em></strong>")}),n=n.replace(/\b__(\S[\s\S]*?)__\b/g,function(p,m){return d(m,"<strong>","</strong>")}),n=n.replace(/\b_(\S[\s\S]*?)_\b/g,function(p,m){return d(m,"<em>","</em>")})):(n=n.replace(/___(\S[\s\S]*?)___/g,function(p,m){return/\S$/.test(m)?d(m,"<strong><em>","</em></strong>"):p}),n=n.replace(/__(\S[\s\S]*?)__/g,function(p,m){return/\S$/.test(m)?d(m,"<strong>","</strong>"):p}),n=n.replace(/_([^\s_][\s\S]*?)_/g,function(p,m){return/\S$/.test(m)?d(m,"<em>","</em>"):p})),i.literalMidWordAsterisks?(n=n.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,function(p,m,f){return d(f,m+"<strong><em>","</em></strong>")}),n=n.replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,function(p,m,f){return d(f,m+"<strong>","</strong>")}),n=n.replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,function(p,m,f){return d(f,m+"<em>","</em>")})):(n=n.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function(p,m){return/\S$/.test(m)?d(m,"<strong><em>","</em></strong>"):p}),n=n.replace(/\*\*(\S[\s\S]*?)\*\*/g,function(p,m){return/\S$/.test(m)?d(m,"<strong>","</strong>"):p}),n=n.replace(/\*([^\s*][\s\S]*?)\*/g,function(p,m){return/\S$/.test(m)?d(m,"<em>","</em>"):p})),n=u.converter._dispatch("italicsAndBold.after",n,i,u),n}),r.subParser("lists",function(n,i,u){"use strict";function d(f,g){u.gListLevel++,f=f.replace(/\n{2,}$/,`
`),f+="\xA80";var T=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(Â¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,k=/\n[ \t]*\n(?!Â¨0)/.test(f);return i.disableForced4SpacesIndentedSublists&&(T=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(Â¨0|\2([*+-]|\d+[.])[ \t]+))/gm),f=f.replace(T,function(w,v,l,y,C,A,O){O=O&&O.trim()!=="";var S=r.subParser("outdent")(C,i,u),F="";return A&&i.tasklists&&(F=' class="task-list-item" style="list-style-type: none;"',S=S.replace(/^[ \t]*\[(x|X| )?]/m,function(){var K='<input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"';return O&&(K+=" checked"),K+=">",K})),S=S.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g,function(K){return"\xA8A"+K}),v||S.search(/\n{2,}/)>-1?(S=r.subParser("githubCodeBlocks")(S,i,u),S=r.subParser("blockGamut")(S,i,u)):(S=r.subParser("lists")(S,i,u),S=S.replace(/\n$/,""),S=r.subParser("hashHTMLBlocks")(S,i,u),S=S.replace(/\n\n+/g,`

`),k?S=r.subParser("paragraphs")(S,i,u):S=r.subParser("spanGamut")(S,i,u)),S=S.replace("\xA8A",""),S="<li"+F+">"+S+`</li>
`,S}),f=f.replace(/Â¨0/g,""),u.gListLevel--,g&&(f=f.replace(/\s+$/,"")),f}function p(f,g){if(g==="ol"){var T=f.match(/^ *(\d+)\./);if(T&&T[1]!=="1")return' start="'+T[1]+'"'}return""}function m(f,g,T){var k=i.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,w=i.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,v=g==="ul"?k:w,l="";if(f.search(v)!==-1)(function C(A){var O=A.search(v),S=p(f,g);O!==-1?(l+=`

<`+g+S+`>
`+d(A.slice(0,O),!!T)+"</"+g+`>
`,g=g==="ul"?"ol":"ul",v=g==="ul"?k:w,C(A.slice(O))):l+=`

<`+g+S+`>
`+d(A,!!T)+"</"+g+`>
`})(f);else{var y=p(f,g);l=`

<`+g+y+`>
`+d(f,!!T)+"</"+g+`>
`}return l}return n=u.converter._dispatch("lists.before",n,i,u),n+="\xA80",u.gListLevel?n=n.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(Â¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(f,g,T){var k=T.search(/[*+-]/g)>-1?"ul":"ol";return m(g,k,!0)}):n=n.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(Â¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(f,g,T,k){var w=k.search(/[*+-]/g)>-1?"ul":"ol";return m(T,w,!1)}),n=n.replace(/Â¨0/,""),n=u.converter._dispatch("lists.after",n,i,u),n}),r.subParser("metadata",function(n,i,u){"use strict";if(!i.metadata)return n;n=u.converter._dispatch("metadata.before",n,i,u);function d(p){u.metadata.raw=p,p=p.replace(/&/g,"&amp;").replace(/"/g,"&quot;"),p=p.replace(/\n {4}/g," "),p.replace(/^([\S ]+): +([\s\S]+?)$/gm,function(m,f,g){return u.metadata.parsed[f]=g,""})}return n=n.replace(/^\s*Â«Â«Â«+(\S*?)\n([\s\S]+?)\nÂ»Â»Â»+\n/,function(p,m,f){return d(f),"\xA8M"}),n=n.replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,function(p,m,f){return m&&(u.metadata.format=m),d(f),"\xA8M"}),n=n.replace(/Â¨M/g,""),n=u.converter._dispatch("metadata.after",n,i,u),n}),r.subParser("outdent",function(n,i,u){"use strict";return n=u.converter._dispatch("outdent.before",n,i,u),n=n.replace(/^(\t|[ ]{1,4})/gm,"\xA80"),n=n.replace(/Â¨0/g,""),n=u.converter._dispatch("outdent.after",n,i,u),n}),r.subParser("paragraphs",function(n,i,u){"use strict";n=u.converter._dispatch("paragraphs.before",n,i,u),n=n.replace(/^\n+/g,""),n=n.replace(/\n+$/g,"");for(var d=n.split(/\n{2,}/g),p=[],m=d.length,f=0;f<m;f++){var g=d[f];g.search(/Â¨(K|G)(\d+)\1/g)>=0?p.push(g):g.search(/\S/)>=0&&(g=r.subParser("spanGamut")(g,i,u),g=g.replace(/^([ \t]*)/g,"<p>"),g+="</p>",p.push(g))}for(m=p.length,f=0;f<m;f++){for(var T="",k=p[f],w=!1;/Â¨(K|G)(\d+)\1/.test(k);){var v=RegExp.$1,l=RegExp.$2;v==="K"?T=u.gHtmlBlocks[l]:w?T=r.subParser("encodeCode")(u.ghCodeBlocks[l].text,i,u):T=u.ghCodeBlocks[l].codeblock,T=T.replace(/\$/g,"$$$$"),k=k.replace(/(\n\n)?Â¨(K|G)\d+\2(\n\n)?/,T),/^<pre\b[^>]*>\s*<code\b[^>]*>/.test(k)&&(w=!0)}p[f]=k}return n=p.join(`
`),n=n.replace(/^\n+/g,""),n=n.replace(/\n+$/g,""),u.converter._dispatch("paragraphs.after",n,i,u)}),r.subParser("runExtension",function(n,i,u,d){"use strict";if(n.filter)i=n.filter(i,d.converter,u);else if(n.regex){var p=n.regex;p instanceof RegExp||(p=new RegExp(p,"g")),i=i.replace(p,n.replace)}return i}),r.subParser("spanGamut",function(n,i,u){"use strict";return n=u.converter._dispatch("spanGamut.before",n,i,u),n=r.subParser("codeSpans")(n,i,u),n=r.subParser("escapeSpecialCharsWithinTagAttributes")(n,i,u),n=r.subParser("encodeBackslashEscapes")(n,i,u),n=r.subParser("images")(n,i,u),n=r.subParser("anchors")(n,i,u),n=r.subParser("autoLinks")(n,i,u),n=r.subParser("simplifiedAutoLinks")(n,i,u),n=r.subParser("emoji")(n,i,u),n=r.subParser("underline")(n,i,u),n=r.subParser("italicsAndBold")(n,i,u),n=r.subParser("strikethrough")(n,i,u),n=r.subParser("ellipsis")(n,i,u),n=r.subParser("hashHTMLSpans")(n,i,u),n=r.subParser("encodeAmpsAndAngles")(n,i,u),i.simpleLineBreaks?/\n\nÂ¨K/.test(n)||(n=n.replace(/\n+/g,`<br />
`)):n=n.replace(/  +\n/g,`<br />
`),n=u.converter._dispatch("spanGamut.after",n,i,u),n}),r.subParser("strikethrough",function(n,i,u){"use strict";function d(p){return i.simplifiedAutoLink&&(p=r.subParser("simplifiedAutoLinks")(p,i,u)),"<del>"+p+"</del>"}return i.strikethrough&&(n=u.converter._dispatch("strikethrough.before",n,i,u),n=n.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(p,m){return d(m)}),n=u.converter._dispatch("strikethrough.after",n,i,u)),n}),r.subParser("stripLinkDefinitions",function(n,i,u){"use strict";var d=/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=Â¨0))/gm,p=/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=Â¨0)|(?=\n\[))/gm;n+="\xA80";var m=function(f,g,T,k,w,v,l){return g=g.toLowerCase(),T.match(/^data:.+?\/.+?;base64,/)?u.gUrls[g]=T.replace(/\s/g,""):u.gUrls[g]=r.subParser("encodeAmpsAndAngles")(T,i,u),v?v+l:(l&&(u.gTitles[g]=l.replace(/"|'/g,"&quot;")),i.parseImgDimensions&&k&&w&&(u.gDimensions[g]={width:k,height:w}),"")};return n=n.replace(p,m),n=n.replace(d,m),n=n.replace(/Â¨0/,""),n}),r.subParser("tables",function(n,i,u){"use strict";if(!i.tables)return n;var d=/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|Â¨0)/gm,p=/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|Â¨0)/gm;function m(w){return/^:[ \t]*--*$/.test(w)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(w)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(w)?' style="text-align:center;"':""}function f(w,v){var l="";return w=w.trim(),(i.tablesHeaderId||i.tableHeaderId)&&(l=' id="'+w.replace(/ /g,"_").toLowerCase()+'"'),w=r.subParser("spanGamut")(w,i,u),"<th"+l+v+">"+w+`</th>
`}function g(w,v){var l=r.subParser("spanGamut")(w,i,u);return"<td"+v+">"+l+`</td>
`}function T(w,v){for(var l=`<table>
<thead>
<tr>
`,y=w.length,C=0;C<y;++C)l+=w[C];for(l+=`</tr>
</thead>
<tbody>
`,C=0;C<v.length;++C){l+=`<tr>
`;for(var A=0;A<y;++A)l+=v[C][A];l+=`</tr>
`}return l+=`</tbody>
</table>
`,l}function k(w){var v,l=w.split(`
`);for(v=0;v<l.length;++v)/^ {0,3}\|/.test(l[v])&&(l[v]=l[v].replace(/^ {0,3}\|/,"")),/\|[ \t]*$/.test(l[v])&&(l[v]=l[v].replace(/\|[ \t]*$/,"")),l[v]=r.subParser("codeSpans")(l[v],i,u);var y=l[0].split("|").map(function(x){return x.trim()}),C=l[1].split("|").map(function(x){return x.trim()}),A=[],O=[],S=[],F=[];for(l.shift(),l.shift(),v=0;v<l.length;++v)l[v].trim()!==""&&A.push(l[v].split("|").map(function(x){return x.trim()}));if(y.length<C.length)return w;for(v=0;v<C.length;++v)S.push(m(C[v]));for(v=0;v<y.length;++v)r.helper.isUndefined(S[v])&&(S[v]=""),O.push(f(y[v],S[v]));for(v=0;v<A.length;++v){for(var K=[],ne=0;ne<O.length;++ne)r.helper.isUndefined(A[v][ne]),K.push(g(A[v][ne],S[ne]));F.push(K)}return T(O,F)}return n=u.converter._dispatch("tables.before",n,i,u),n=n.replace(/\\(\|)/g,r.helper.escapeCharactersCallback),n=n.replace(d,k),n=n.replace(p,k),n=u.converter._dispatch("tables.after",n,i,u),n}),r.subParser("underline",function(n,i,u){"use strict";return i.underline&&(n=u.converter._dispatch("underline.before",n,i,u),i.literalMidWordUnderscores?(n=n.replace(/\b___(\S[\s\S]*?)___\b/g,function(d,p){return"<u>"+p+"</u>"}),n=n.replace(/\b__(\S[\s\S]*?)__\b/g,function(d,p){return"<u>"+p+"</u>"})):(n=n.replace(/___(\S[\s\S]*?)___/g,function(d,p){return/\S$/.test(p)?"<u>"+p+"</u>":d}),n=n.replace(/__(\S[\s\S]*?)__/g,function(d,p){return/\S$/.test(p)?"<u>"+p+"</u>":d})),n=n.replace(/(_)/g,r.helper.escapeCharactersCallback),n=u.converter._dispatch("underline.after",n,i,u)),n}),r.subParser("unescapeSpecialChars",function(n,i,u){"use strict";return n=u.converter._dispatch("unescapeSpecialChars.before",n,i,u),n=n.replace(/Â¨E(\d+)E/g,function(d,p){var m=parseInt(p);return String.fromCharCode(m)}),n=u.converter._dispatch("unescapeSpecialChars.after",n,i,u),n}),r.subParser("makeMarkdown.blockquote",function(n,i){"use strict";var u="";if(n.hasChildNodes())for(var d=n.childNodes,p=d.length,m=0;m<p;++m){var f=r.subParser("makeMarkdown.node")(d[m],i);f!==""&&(u+=f)}return u=u.trim(),u="> "+u.split(`
`).join(`
> `),u}),r.subParser("makeMarkdown.codeBlock",function(n,i){"use strict";var u=n.getAttribute("language"),d=n.getAttribute("precodenum");return"```"+u+`
`+i.preList[d]+"\n```"}),r.subParser("makeMarkdown.codeSpan",function(n){"use strict";return"`"+n.innerHTML+"`"}),r.subParser("makeMarkdown.emphasis",function(n,i){"use strict";var u="";if(n.hasChildNodes()){u+="*";for(var d=n.childNodes,p=d.length,m=0;m<p;++m)u+=r.subParser("makeMarkdown.node")(d[m],i);u+="*"}return u}),r.subParser("makeMarkdown.header",function(n,i,u){"use strict";var d=new Array(u+1).join("#"),p="";if(n.hasChildNodes()){p=d+" ";for(var m=n.childNodes,f=m.length,g=0;g<f;++g)p+=r.subParser("makeMarkdown.node")(m[g],i)}return p}),r.subParser("makeMarkdown.hr",function(){"use strict";return"---"}),r.subParser("makeMarkdown.image",function(n){"use strict";var i="";return n.hasAttribute("src")&&(i+="!["+n.getAttribute("alt")+"](",i+="<"+n.getAttribute("src")+">",n.hasAttribute("width")&&n.hasAttribute("height")&&(i+=" ="+n.getAttribute("width")+"x"+n.getAttribute("height")),n.hasAttribute("title")&&(i+=' "'+n.getAttribute("title")+'"'),i+=")"),i}),r.subParser("makeMarkdown.links",function(n,i){"use strict";var u="";if(n.hasChildNodes()&&n.hasAttribute("href")){var d=n.childNodes,p=d.length;u="[";for(var m=0;m<p;++m)u+=r.subParser("makeMarkdown.node")(d[m],i);u+="](",u+="<"+n.getAttribute("href")+">",n.hasAttribute("title")&&(u+=' "'+n.getAttribute("title")+'"'),u+=")"}return u}),r.subParser("makeMarkdown.list",function(n,i,u){"use strict";var d="";if(!n.hasChildNodes())return"";for(var p=n.childNodes,m=p.length,f=n.getAttribute("start")||1,g=0;g<m;++g)if(!(typeof p[g].tagName>"u"||p[g].tagName.toLowerCase()!=="li")){var T="";u==="ol"?T=f.toString()+". ":T="- ",d+=T+r.subParser("makeMarkdown.listItem")(p[g],i),++f}return d+=`
<!-- -->
`,d.trim()}),r.subParser("makeMarkdown.listItem",function(n,i){"use strict";for(var u="",d=n.childNodes,p=d.length,m=0;m<p;++m)u+=r.subParser("makeMarkdown.node")(d[m],i);return/\n$/.test(u)?u=u.split(`
`).join(`
    `).replace(/^ {4}$/gm,"").replace(/\n\n+/g,`

`):u+=`
`,u}),r.subParser("makeMarkdown.node",function(n,i,u){"use strict";u=u||!1;var d="";if(n.nodeType===3)return r.subParser("makeMarkdown.txt")(n,i);if(n.nodeType===8)return"<!--"+n.data+`-->

`;if(n.nodeType!==1)return"";var p=n.tagName.toLowerCase();switch(p){case"h1":u||(d=r.subParser("makeMarkdown.header")(n,i,1)+`

`);break;case"h2":u||(d=r.subParser("makeMarkdown.header")(n,i,2)+`

`);break;case"h3":u||(d=r.subParser("makeMarkdown.header")(n,i,3)+`

`);break;case"h4":u||(d=r.subParser("makeMarkdown.header")(n,i,4)+`

`);break;case"h5":u||(d=r.subParser("makeMarkdown.header")(n,i,5)+`

`);break;case"h6":u||(d=r.subParser("makeMarkdown.header")(n,i,6)+`

`);break;case"p":u||(d=r.subParser("makeMarkdown.paragraph")(n,i)+`

`);break;case"blockquote":u||(d=r.subParser("makeMarkdown.blockquote")(n,i)+`

`);break;case"hr":u||(d=r.subParser("makeMarkdown.hr")(n,i)+`

`);break;case"ol":u||(d=r.subParser("makeMarkdown.list")(n,i,"ol")+`

`);break;case"ul":u||(d=r.subParser("makeMarkdown.list")(n,i,"ul")+`

`);break;case"precode":u||(d=r.subParser("makeMarkdown.codeBlock")(n,i)+`

`);break;case"pre":u||(d=r.subParser("makeMarkdown.pre")(n,i)+`

`);break;case"table":u||(d=r.subParser("makeMarkdown.table")(n,i)+`

`);break;case"code":d=r.subParser("makeMarkdown.codeSpan")(n,i);break;case"em":case"i":d=r.subParser("makeMarkdown.emphasis")(n,i);break;case"strong":case"b":d=r.subParser("makeMarkdown.strong")(n,i);break;case"del":d=r.subParser("makeMarkdown.strikethrough")(n,i);break;case"a":d=r.subParser("makeMarkdown.links")(n,i);break;case"img":d=r.subParser("makeMarkdown.image")(n,i);break;default:d=n.outerHTML+`

`}return d}),r.subParser("makeMarkdown.paragraph",function(n,i){"use strict";var u="";if(n.hasChildNodes())for(var d=n.childNodes,p=d.length,m=0;m<p;++m)u+=r.subParser("makeMarkdown.node")(d[m],i);return u=u.trim(),u}),r.subParser("makeMarkdown.pre",function(n,i){"use strict";var u=n.getAttribute("prenum");return"<pre>"+i.preList[u]+"</pre>"}),r.subParser("makeMarkdown.strikethrough",function(n,i){"use strict";var u="";if(n.hasChildNodes()){u+="~~";for(var d=n.childNodes,p=d.length,m=0;m<p;++m)u+=r.subParser("makeMarkdown.node")(d[m],i);u+="~~"}return u}),r.subParser("makeMarkdown.strong",function(n,i){"use strict";var u="";if(n.hasChildNodes()){u+="**";for(var d=n.childNodes,p=d.length,m=0;m<p;++m)u+=r.subParser("makeMarkdown.node")(d[m],i);u+="**"}return u}),r.subParser("makeMarkdown.table",function(n,i){"use strict";var u="",d=[[],[]],p=n.querySelectorAll("thead>tr>th"),m=n.querySelectorAll("tbody>tr"),f,g;for(f=0;f<p.length;++f){var T=r.subParser("makeMarkdown.tableCell")(p[f],i),k="---";if(p[f].hasAttribute("style")){var w=p[f].getAttribute("style").toLowerCase().replace(/\s/g,"");switch(w){case"text-align:left;":k=":---";break;case"text-align:right;":k="---:";break;case"text-align:center;":k=":---:";break}}d[0][f]=T.trim(),d[1][f]=k}for(f=0;f<m.length;++f){var v=d.push([])-1,l=m[f].getElementsByTagName("td");for(g=0;g<p.length;++g){var y=" ";typeof l[g]<"u"&&(y=r.subParser("makeMarkdown.tableCell")(l[g],i)),d[v].push(y)}}var C=3;for(f=0;f<d.length;++f)for(g=0;g<d[f].length;++g){var A=d[f][g].length;A>C&&(C=A)}for(f=0;f<d.length;++f){for(g=0;g<d[f].length;++g)f===1?d[f][g].slice(-1)===":"?d[f][g]=r.helper.padEnd(d[f][g].slice(-1),C-1,"-")+":":d[f][g]=r.helper.padEnd(d[f][g],C,"-"):d[f][g]=r.helper.padEnd(d[f][g],C);u+="| "+d[f].join(" | ")+` |
`}return u.trim()}),r.subParser("makeMarkdown.tableCell",function(n,i){"use strict";var u="";if(!n.hasChildNodes())return"";for(var d=n.childNodes,p=d.length,m=0;m<p;++m)u+=r.subParser("makeMarkdown.node")(d[m],i,!0);return u.trim()}),r.subParser("makeMarkdown.txt",function(n){"use strict";var i=n.nodeValue;return i=i.replace(/ +/g," "),i=i.replace(/Â¨NBSP;/g," "),i=r.helper.unescapeHTMLEntities(i),i=i.replace(/([*_~|`])/g,"\\$1"),i=i.replace(/^(\s*)>/g,"\\$1>"),i=i.replace(/^#/gm,"\\#"),i=i.replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3"),i=i.replace(/^( {0,3}\d+)\./gm,"$1\\."),i=i.replace(/^( {0,3})([+-])/gm,"$1\\$2"),i=i.replace(/]([\s]*)\(/g,"\\]$1\\("),i=i.replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:"),i});var ju=this;typeof define=="function"&&define.amd?define(function(){"use strict";return r}):typeof Qr<"u"&&Qr.exports?Qr.exports=r:ju.showdown=r}).call(hu)});var Rd={};Ie(Rd,{__EXPERIMENTAL_ELEMENTS:()=>Vn,__EXPERIMENTAL_PATHS_WITH_OVERRIDE:()=>xn,__EXPERIMENTAL_STYLE_PROPERTY:()=>pe,__experimentalCloneSanitizedBlock:()=>Vt,__experimentalGetAccessibleBlockLabel:()=>_a,__experimentalGetBlockAttributesNamesByRole:()=>ya,__experimentalGetBlockLabel:()=>yt,__experimentalSanitizeBlockAttributes:()=>Ge,__unstableGetBlockProps:()=>Gt,__unstableGetInnerBlocksProps:()=>go,__unstableSerializeAndClean:()=>bo,children:()=>Mo,cloneBlock:()=>xt,createBlock:()=>U,createBlocksFromInnerBlocksTemplate:()=>It,doBlocksMatchTemplate:()=>fn,findTransform:()=>he,getBlockAttributes:()=>ie,getBlockAttributesNamesByRole:()=>vt,getBlockBindingsSource:()=>gt,getBlockBindingsSources:()=>ha,getBlockContent:()=>Xe,getBlockDefaultClassName:()=>po,getBlockFromExample:()=>Ht,getBlockMenuDefaultClassName:()=>mo,getBlockSupport:()=>ta,getBlockTransforms:()=>ue,getBlockType:()=>M,getBlockTypes:()=>Ue,getBlockVariations:()=>ca,getCategories:()=>Nu,getChildBlockNames:()=>oa,getDefaultBlockName:()=>pr,getFreeformContentHandlerName:()=>ee,getGroupingBlockName:()=>fr,getPhrasingContentSchema:()=>Su,getPossibleBlockTransformations:()=>Ja,getSaveContent:()=>ge,getSaveElement:()=>Kt,getUnregisteredTypeHandlerName:()=>me,hasBlockSupport:()=>se,hasChildBlocks:()=>ua,hasChildBlocksWithInserterSupport:()=>ia,isReusableBlock:()=>na,isTemplatePart:()=>aa,isUnmodifiedBlock:()=>_t,isUnmodifiedDefaultBlock:()=>hr,isValidBlockContent:()=>Ro,isValidIcon:()=>$e,node:()=>jo,normalizeIconObject:()=>gr,parse:()=>Ee,parseWithAttributeSchema:()=>Le,pasteHandler:()=>et,privateApis:()=>Du,rawHandler:()=>ln,registerBlockBindingsSource:()=>pa,registerBlockCollection:()=>Xn,registerBlockStyle:()=>sa,registerBlockType:()=>Yn,registerBlockVariation:()=>la,serialize:()=>Mr,serializeRawBlock:()=>we,setCategories:()=>Lu,setDefaultBlockName:()=>ea,setFreeformContentHandlerName:()=>Qn,setGroupingBlockName:()=>ra,setUnregisteredTypeHandlerName:()=>Jn,store:()=>P,switchToBlockType:()=>eo,synchronizeBlocksWithTemplate:()=>rt,unregisterBlockBindingsSource:()=>ma,unregisterBlockStyle:()=>da,unregisterBlockType:()=>Zn,unregisterBlockVariation:()=>fa,unstable__bootstrapServerSideBlockDefinitions:()=>Wn,updateCategory:()=>Pu,validateBlock:()=>be,withBlockContentContext:()=>Pd});var Rr=B(Be(),1);var Oe=function(){return Oe=Object.assign||function(t){for(var r,a=1,o=arguments.length;a<o;a++){r=arguments[a];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},Oe.apply(this,arguments)};function bn(e){return e.toLowerCase()}var Uu=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Fu=/[^A-Z0-9]+/gi;function yn(e,t){t===void 0&&(t={});for(var r=t.splitRegexp,a=r===void 0?Uu:r,o=t.stripRegexp,s=o===void 0?Fu:o,c=t.transform,h=c===void 0?bn:c,_=t.delimiter,b=_===void 0?" ":_,E=_n(_n(e,a,"$1\0$2"),s,"\0"),L=0,N=E.length;E.charAt(L)==="\0";)L++;for(;E.charAt(N-1)==="\0";)N--;return E.slice(L,N).split("\0").map(h).join(b)}function _n(e,t,r){return t instanceof RegExp?e.replace(t,r):t.reduce(function(a,o){return a.replace(o,r)},e)}function ot(e,t){var r=e.charAt(0),a=e.substr(1).toLowerCase();return t>0&&r>="0"&&r<="9"?"_"+r+a:""+r.toUpperCase()+a}function wn(e,t){return t===void 0&&(t={}),yn(e,Oe({delimiter:"",transform:ot},t))}function $u(e,t){return t===0?e.toLowerCase():ot(e,t)}function kn(e,t){return t===void 0&&(t={}),wn(e,Oe({transform:$u},t))}var ka=B(Be(),1),ye=B(sr(),1);var Gu={grad:.9,turn:360,rad:360/(2*Math.PI)},fe=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},V=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},Q=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Ln=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},En=function(e){return{r:Q(e.r,0,255),g:Q(e.g,0,255),b:Q(e.b,0,255),a:Q(e.a)}},ut=function(e){return{r:V(e.r),g:V(e.g),b:V(e.b),a:V(e.a,3)}},Ku=/^#([0-9a-f]{3,8})$/i,dr=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Pn=function(e){var t=e.r,r=e.g,a=e.b,o=e.a,s=Math.max(t,r,a),c=s-Math.min(t,r,a),h=c?s===t?(r-a)/c:s===r?2+(a-t)/c:4+(t-r)/c:0;return{h:60*(h<0?h+6:h),s:s?c/s*100:0,v:s/255*100,a:o}},Rn=function(e){var t=e.h,r=e.s,a=e.v,o=e.a;t=t/360*6,r/=100,a/=100;var s=Math.floor(t),c=a*(1-r),h=a*(1-(t-s)*r),_=a*(1-(1-t+s)*r),b=s%6;return{r:255*[a,h,c,c,_,a][b],g:255*[_,a,a,h,c,c][b],b:255*[c,c,_,a,a,h][b],a:o}},Tn=function(e){return{h:Ln(e.h),s:Q(e.s,0,100),l:Q(e.l,0,100),a:Q(e.a)}},Cn=function(e){return{h:V(e.h),s:V(e.s),l:V(e.l),a:V(e.a,3)}},Bn=function(e){return Rn((r=(t=e).s,{h:t.h,s:(r*=((a=t.l)<50?a:100-a)/100)>0?2*r/(a+r)*100:0,v:a+r,a:t.a}));var t,r,a},Ve=function(e){return{h:(t=Pn(e)).h,s:(o=(200-(r=t.s))*(a=t.v)/100)>0&&o<200?r*a/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,r,a,o},Wu=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yu=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Xu=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Zu=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,dt={string:[[function(e){var t=Ku.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?V(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?V(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Xu.exec(e)||Zu.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:En({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:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Wu.exec(e)||Yu.exec(e);if(!t)return null;var r,a,o=Tn({h:(r=t[1],a=t[2],a===void 0&&(a="deg"),Number(r)*(Gu[a]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Bn(o)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,a=e.b,o=e.a,s=o===void 0?1:o;return fe(t)&&fe(r)&&fe(a)?En({r:Number(t),g:Number(r),b:Number(a),a:Number(s)}):null},"rgb"],[function(e){var t=e.h,r=e.s,a=e.l,o=e.a,s=o===void 0?1:o;if(!fe(t)||!fe(r)||!fe(a))return null;var c=Tn({h:Number(t),s:Number(r),l:Number(a),a:Number(s)});return Bn(c)},"hsl"],[function(e){var t=e.h,r=e.s,a=e.v,o=e.a,s=o===void 0?1:o;if(!fe(t)||!fe(r)||!fe(a))return null;var c=(function(h){return{h:Ln(h.h),s:Q(h.s,0,100),v:Q(h.v,0,100),a:Q(h.a)}})({h:Number(t),s:Number(r),v:Number(a),a:Number(s)});return Rn(c)},"hsv"]]},An=function(e,t){for(var r=0;r<t.length;r++){var a=t[r][0](e);if(a)return[a,t[r][1]]}return[null,void 0]},Qu=function(e){return typeof e=="string"?An(e.trim(),dt.string):typeof e=="object"&&e!==null?An(e,dt.object):[null,void 0]};var it=function(e,t){var r=Ve(e);return{h:r.h,s:Q(r.s+100*t,0,100),l:r.l,a:r.a}},st=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Sn=function(e,t){var r=Ve(e);return{h:r.h,s:r.s,l:Q(r.l+100*t,0,100),a:r.a}},ct=(function(){function e(t){this.parsed=Qu(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return V(st(this.rgba),2)},e.prototype.isDark=function(){return st(this.rgba)<.5},e.prototype.isLight=function(){return st(this.rgba)>=.5},e.prototype.toHex=function(){return t=ut(this.rgba),r=t.r,a=t.g,o=t.b,c=(s=t.a)<1?dr(V(255*s)):"","#"+dr(r)+dr(a)+dr(o)+c;var t,r,a,o,s,c},e.prototype.toRgb=function(){return ut(this.rgba)},e.prototype.toRgbString=function(){return t=ut(this.rgba),r=t.r,a=t.g,o=t.b,(s=t.a)<1?"rgba("+r+", "+a+", "+o+", "+s+")":"rgb("+r+", "+a+", "+o+")";var t,r,a,o,s},e.prototype.toHsl=function(){return Cn(Ve(this.rgba))},e.prototype.toHslString=function(){return t=Cn(Ve(this.rgba)),r=t.h,a=t.s,o=t.l,(s=t.a)<1?"hsla("+r+", "+a+"%, "+o+"%, "+s+")":"hsl("+r+", "+a+"%, "+o+"%)";var t,r,a,o,s},e.prototype.toHsv=function(){return t=Pn(this.rgba),{h:V(t.h),s:V(t.s),v:V(t.v),a:V(t.a,3)};var t},e.prototype.invert=function(){return ae({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),ae(it(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),ae(it(this.rgba,-t))},e.prototype.grayscale=function(){return ae(it(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),ae(Sn(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),ae(Sn(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?ae({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):V(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=Ve(this.rgba);return typeof t=="number"?ae({h:t,s:r.s,l:r.l,a:r.a}):V(r.h)},e.prototype.isEqual=function(t){return this.toHex()===ae(t).toHex()},e})(),ae=function(e){return e instanceof ct?e:new ct(e)},Nn=[],On=function(e){e.forEach(function(t){Nn.indexOf(t)<0&&(t(ct,dt),Nn.push(t))})};function Dn(e,t){var r={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},a={};for(var o in r)a[r[o]]=o;var s={};e.prototype.toName=function(c){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var h,_,b=a[this.toHex()];if(b)return b;if(c?.closest){var E=this.toRgb(),L=1/0,N="black";if(!s.length)for(var j in r)s[j]=new e(r[j]).toRgb();for(var I in r){var G=(h=E,_=s[I],Math.pow(h.r-_.r,2)+Math.pow(h.g-_.g,2)+Math.pow(h.b-_.b,2));G<L&&(L=G,N=I)}return N}},t.string.push([function(c){var h=c.toLowerCase(),_=h==="transparent"?"#0000":r[h];return _?new e(_).toRgb():null},"name"])}var lt=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},ft=function(e){return .2126*lt(e.r)+.7152*lt(e.g)+.0722*lt(e.b)};function Mn(e){e.prototype.luminance=function(){return t=ft(this.rgba),(r=2)===void 0&&(r=0),a===void 0&&(a=Math.pow(10,r)),Math.round(a*t)/a+0;var t,r,a},e.prototype.contrast=function(t){t===void 0&&(t="#FFF");var r,a,o,s,c,h,_,b=t instanceof e?t:new e(t);return s=this.rgba,c=b.toRgb(),h=ft(s),_=ft(c),r=h>_?(h+.05)/(_+.05):(_+.05)/(h+.05),(a=2)===void 0&&(a=0),o===void 0&&(o=Math.pow(10,a)),Math.floor(o*r)/o+0},e.prototype.isReadable=function(t,r){return t===void 0&&(t="#FFF"),r===void 0&&(r={}),this.contrast(t)>=(h=(c=(a=r).size)===void 0?"normal":c,(s=(o=a.level)===void 0?"AA":o)==="AAA"&&h==="normal"?7:s==="AA"&&h==="large"?3:4.5);var a,o,s,c,h}}var mr=B(De(),1),W=B(sr(),1),ba=B(Z(),1),Fe=B(xe(),1),bt=B(J(),1);var cr="block-default",He=["attributes","supports","save","migrate","isEligible","apiVersion"],pe={"--wp--style--color--link":{value:["color","link"],support:["color","link"]},aspectRatio:{value:["dimensions","aspectRatio"],support:["dimensions","aspectRatio"],useEngine:!0},background:{value:["color","gradient"],support:["color","gradients"],useEngine:!0},backgroundColor:{value:["color","background"],support:["color","background"],requiresOptOut:!0,useEngine:!0},backgroundImage:{value:["background","backgroundImage"],support:["background","backgroundImage"],useEngine:!0},backgroundRepeat:{value:["background","backgroundRepeat"],support:["background","backgroundRepeat"],useEngine:!0},backgroundSize:{value:["background","backgroundSize"],support:["background","backgroundSize"],useEngine:!0},backgroundPosition:{value:["background","backgroundPosition"],support:["background","backgroundPosition"],useEngine:!0},borderColor:{value:["border","color"],support:["__experimentalBorder","color"],useEngine:!0},borderRadius:{value:["border","radius"],support:["__experimentalBorder","radius"],properties:{borderTopLeftRadius:"topLeft",borderTopRightRadius:"topRight",borderBottomLeftRadius:"bottomLeft",borderBottomRightRadius:"bottomRight"},useEngine:!0},borderStyle:{value:["border","style"],support:["__experimentalBorder","style"],useEngine:!0},borderWidth:{value:["border","width"],support:["__experimentalBorder","width"],useEngine:!0},borderTopColor:{value:["border","top","color"],support:["__experimentalBorder","color"],useEngine:!0},borderTopStyle:{value:["border","top","style"],support:["__experimentalBorder","style"],useEngine:!0},borderTopWidth:{value:["border","top","width"],support:["__experimentalBorder","width"],useEngine:!0},borderRightColor:{value:["border","right","color"],support:["__experimentalBorder","color"],useEngine:!0},borderRightStyle:{value:["border","right","style"],support:["__experimentalBorder","style"],useEngine:!0},borderRightWidth:{value:["border","right","width"],support:["__experimentalBorder","width"],useEngine:!0},borderBottomColor:{value:["border","bottom","color"],support:["__experimentalBorder","color"],useEngine:!0},borderBottomStyle:{value:["border","bottom","style"],support:["__experimentalBorder","style"],useEngine:!0},borderBottomWidth:{value:["border","bottom","width"],support:["__experimentalBorder","width"],useEngine:!0},borderLeftColor:{value:["border","left","color"],support:["__experimentalBorder","color"],useEngine:!0},borderLeftStyle:{value:["border","left","style"],support:["__experimentalBorder","style"],useEngine:!0},borderLeftWidth:{value:["border","left","width"],support:["__experimentalBorder","width"],useEngine:!0},color:{value:["color","text"],support:["color","text"],requiresOptOut:!0,useEngine:!0},columnCount:{value:["typography","textColumns"],support:["typography","textColumns"],useEngine:!0},filter:{value:["filter","duotone"],support:["filter","duotone"]},linkColor:{value:["elements","link","color","text"],support:["color","link"]},captionColor:{value:["elements","caption","color","text"],support:["color","caption"]},buttonColor:{value:["elements","button","color","text"],support:["color","button"]},buttonBackgroundColor:{value:["elements","button","color","background"],support:["color","button"]},headingColor:{value:["elements","heading","color","text"],support:["color","heading"]},headingBackgroundColor:{value:["elements","heading","color","background"],support:["color","heading"]},fontFamily:{value:["typography","fontFamily"],support:["typography","__experimentalFontFamily"],useEngine:!0},fontSize:{value:["typography","fontSize"],support:["typography","fontSize"],useEngine:!0},fontStyle:{value:["typography","fontStyle"],support:["typography","__experimentalFontStyle"],useEngine:!0},fontWeight:{value:["typography","fontWeight"],support:["typography","__experimentalFontWeight"],useEngine:!0},lineHeight:{value:["typography","lineHeight"],support:["typography","lineHeight"],useEngine:!0},margin:{value:["spacing","margin"],support:["spacing","margin"],properties:{marginTop:"top",marginRight:"right",marginBottom:"bottom",marginLeft:"left"},useEngine:!0},minHeight:{value:["dimensions","minHeight"],support:["dimensions","minHeight"],useEngine:!0},height:{value:["dimensions","height"],support:["dimensions","height"],useEngine:!0},width:{value:["dimensions","width"],support:["dimensions","width"],useEngine:!0},padding:{value:["spacing","padding"],support:["spacing","padding"],properties:{paddingTop:"top",paddingRight:"right",paddingBottom:"bottom",paddingLeft:"left"},useEngine:!0},textAlign:{value:["typography","textAlign"],support:["typography","textAlign"],useEngine:!1},textDecoration:{value:["typography","textDecoration"],support:["typography","__experimentalTextDecoration"],useEngine:!0},textTransform:{value:["typography","textTransform"],support:["typography","__experimentalTextTransform"],useEngine:!0},letterSpacing:{value:["typography","letterSpacing"],support:["typography","__experimentalLetterSpacing"],useEngine:!0},textIndent:{value:["typography","textIndent"],support:["typography","textIndent"],useEngine:!0},writingMode:{value:["typography","writingMode"],support:["typography","__experimentalWritingMode"],useEngine:!0},"--wp--style--root--padding":{value:["spacing","padding"],support:["spacing","padding"],properties:{"--wp--style--root--padding-top":"top","--wp--style--root--padding-right":"right","--wp--style--root--padding-bottom":"bottom","--wp--style--root--padding-left":"left"},rootOnly:!0}},Vn={link:"a:where(:not(.wp-element-button))",heading:"h1, h2, h3, h4, h5, h6",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",button:".wp-element-button, .wp-block-button__link",caption:".wp-element-caption, .wp-block-audio figcaption, .wp-block-embed figcaption, .wp-block-gallery figcaption, .wp-block-image figcaption, .wp-block-table figcaption, .wp-block-video figcaption",cite:"cite",select:"select",textInput:"textarea, input:where([type=email],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=url])"},xn={"color.duotone":!0,"color.gradients":!0,"color.palette":!0,"dimensions.aspectRatios":!0,"typography.fontSizes":!0,"spacing.spacingSizes":!0};var R=B(Be(),1),Kn=B(sr(),1),q=B(pt(),1);var mt={title:"block title",description:"block description",keywords:["block keyword"],styles:[{label:"block style label"}],variations:[{title:"block variation title",description:"block variation description",keywords:["block variation keyword"]}]};var $n=B(Fn(),1),{lock:Gn,unlock:oe}=(0,$n.__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/blocks");function lr(e){return e!==null&&typeof e=="object"}function Wn(e){let{addBootstrappedBlockType:t}=oe((0,R.dispatch)(P));for(let[r,a]of Object.entries(e))t(r,a)}function ei({textdomain:e,...t}){let r=["apiVersion","title","category","parent","ancestor","icon","description","keywords","attributes","providesContext","usesContext","selectors","supports","styles","example","variations","blockHooks","allowedBlocks"],a=Object.fromEntries(Object.entries(t).filter(([o])=>r.includes(o)));return e&&Object.keys(mt).forEach(o=>{a[o]&&(a[o]=ht(mt[o],a[o],e))}),a}function Yn(e,t){let r=lr(e)?e.name:e;if(typeof r!="string"){(0,q.default)("Block names must be strings.");return}if(!/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(r)){(0,q.default)("Block names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-block");return}if((0,R.select)(P).getBlockType(r)){(0,q.default)('Block "'+r+'" is already registered.');return}let{addBootstrappedBlockType:a,addUnprocessedBlockType:o}=oe((0,R.dispatch)(P));if(lr(e)){let s=ei(e);a(r,s)}return o(r,t),(0,R.select)(P).getBlockType(r)}function ht(e,t,r){return typeof e=="string"&&typeof t=="string"?(0,Kn._x)(t,e,r):Array.isArray(e)&&e.length&&Array.isArray(t)?t.map(a=>ht(e[0],a,r)):lr(e)&&Object.entries(e).length&&lr(t)?Object.keys(t).reduce((a,o)=>e[o]?(a[o]=ht(e[o],t[o],r),a):(a[o]=t[o],a),{}):t}function Xn(e,{title:t,icon:r}){(0,R.dispatch)(P).addBlockCollection(e,t,r)}function Zn(e){let t=(0,R.select)(P).getBlockType(e);if(!t){(0,q.default)('Block "'+e+'" is not registered.');return}return(0,R.dispatch)(P).removeBlockTypes(e),t}function Qn(e){(0,R.dispatch)(P).setFreeformFallbackBlockName(e)}function ee(){return(0,R.select)(P).getFreeformFallbackBlockName()}function fr(){return(0,R.select)(P).getGroupingBlockName()}function Jn(e){(0,R.dispatch)(P).setUnregisteredFallbackBlockName(e)}function me(){return(0,R.select)(P).getUnregisteredFallbackBlockName()}function ea(e){(0,R.dispatch)(P).setDefaultBlockName(e)}function ra(e){(0,R.dispatch)(P).setGroupingBlockName(e)}function pr(){return(0,R.select)(P).getDefaultBlockName()}function M(e){return(0,R.select)(P)?.getBlockType(e)}function Ue(){return(0,R.select)(P).getBlockTypes()}function ta(e,t,r){return(0,R.select)(P).getBlockSupport(e,t,r)}function se(e,t,r){return(0,R.select)(P).hasBlockSupport(e,t,r)}function na(e){return e?.name==="core/block"}function aa(e){return e?.name==="core/template-part"}var oa=e=>(0,R.select)(P).getChildBlockNames(e),ua=e=>(0,R.select)(P).hasChildBlocks(e),ia=e=>(0,R.select)(P).hasChildBlocksWithInserterSupport(e),sa=(e,t)=>{(0,R.dispatch)(P).addBlockStyles(e,t)},da=(e,t)=>{(0,R.dispatch)(P).removeBlockStyles(e,t)},ca=(e,t)=>(0,R.select)(P).getBlockVariations(e,t),la=(e,t)=>{typeof t.name!="string"&&(0,q.default)("Variation names must be unique strings."),(0,R.dispatch)(P).addBlockVariations(e,t)},fa=(e,t)=>{(0,R.dispatch)(P).removeBlockVariations(e,t)},pa=e=>{let{name:t,label:r,usesContext:a,getValues:o,setValues:s,canUserEditValue:c,getFieldsList:h}=e,_=oe((0,R.select)(P)).getBlockBindingsSource(t),b=["label","usesContext"];for(let E in _)if(!b.includes(E)&&_[E]){(0,q.default)('Block bindings source "'+t+'" is already registered.');return}if(!t){(0,q.default)("Block bindings source must contain a name.");return}if(typeof t!="string"){(0,q.default)("Block bindings source name must be a string.");return}if(/[A-Z]+/.test(t)){(0,q.default)("Block bindings source name must not contain uppercase characters.");return}if(!/^[a-z0-9/-]+$/.test(t)){(0,q.default)("Block bindings source name must contain only valid characters: lowercase characters, hyphens, or digits. Example: my-plugin/my-custom-source.");return}if(!/^[a-z0-9-]+\/[a-z0-9-]+$/.test(t)){(0,q.default)("Block bindings source name must contain a namespace and valid characters. Example: my-plugin/my-custom-source.");return}if(!r&&!_?.label){(0,q.default)("Block bindings source must contain a label.");return}if(r&&typeof r!="string"){(0,q.default)("Block bindings source label must be a string.");return}if(r&&_?.label&&r!==_?.label&&(0,q.default)('Block bindings "'+t+'" source label was overridden.'),a&&!Array.isArray(a)){(0,q.default)("Block bindings source usesContext must be an array.");return}if(o&&typeof o!="function"){(0,q.default)("Block bindings source getValues must be a function.");return}if(s&&typeof s!="function"){(0,q.default)("Block bindings source setValues must be a function.");return}if(c&&typeof c!="function"){(0,q.default)("Block bindings source canUserEditValue must be a function.");return}if(h&&typeof h!="function"){(0,q.default)("Block bindings source getFieldsList must be a function.");return}return oe((0,R.dispatch)(P)).addBlockBindingsSource(e)};function ma(e){if(!gt(e)){(0,q.default)('Block bindings source "'+e+'" is not registered.');return}oe((0,R.dispatch)(P)).removeBlockBindingsSource(e)}function gt(e){return oe((0,R.select)(P)).getBlockBindingsSource(e)}function ha(){return oe((0,R.select)(P)).getAllBlockBindingsSources()}On([Dn,Mn]);var ga=["#191e23","#f8f9f9"];function _t(e,t){let r=M(e.name)?.attributes??{},a=t?Object.entries(r).filter(([s,c])=>t==="content"&&s==="metadata"?Object.keys(e.attributes[s]?.bindings??{}).length>0:c.role===t||c.__experimentalRole===t):[];return(a.length?a:Object.entries(r)).every(([s,c])=>{let h=e.attributes[s];return c.hasOwnProperty("default")?h===c.default:c.type==="rich-text"?!h?.length:h===void 0})}function hr(e,t){return e.name===pr()&&_t(e,t)}function $e(e){return!!e&&(typeof e=="string"||(0,mr.isValidElement)(e)||typeof e=="function"||e instanceof mr.Component)}function gr(e){if(e=e||cr,$e(e))return{src:e};if("background"in e){let t=ae(e.background),r=o=>t.contrast(o),a=Math.max(...ga.map(r));return{...e,foreground:e.foreground?e.foreground:ga.find(o=>r(o)===a),shadowColor:t.alpha(.3).toRgbString()}}return e}function de(e){return typeof e=="string"?M(e):e}function yt(e,t,r="visual"){let{__experimentalLabel:a,title:o}=e,s=a&&a(t,{context:r});return s?s.toPlainText?s.toPlainText():(0,ba.__unstableStripHTML)(s):o}function _a(e,t,r,a="vertical"){let o=e?.title,s=e?yt(e,t,"accessibility"):"",c=r!==void 0,h=s&&s!==o;return c&&a==="vertical"?h?(0,W.sprintf)((0,W.__)("%1$s Block. Row %2$d. %3$s"),o,r,s):(0,W.sprintf)((0,W.__)("%1$s Block. Row %2$d"),o,r):c&&a==="horizontal"?h?(0,W.sprintf)((0,W.__)("%1$s Block. Column %2$d. %3$s"),o,r,s):(0,W.sprintf)((0,W.__)("%1$s Block. Column %2$d"),o,r):h?(0,W.sprintf)((0,W.__)("%1$s Block. %2$s"),o,s):(0,W.sprintf)((0,W.__)("%s Block"),o)}function wt(e){if(e.default!==void 0)return e.default;if(e.type==="rich-text")return new Fe.RichTextData}function kt(e){return M(e)!==void 0}function Ge(e,t){let r=M(e);if(r===void 0)throw new Error(`Block type '${e}' is not registered.`);return Object.entries(r.attributes).reduce((a,[o,s])=>{let c=t[o];if(c!==void 0)s.type==="rich-text"?c instanceof Fe.RichTextData?a[o]=c:typeof c=="string"&&(a[o]=Fe.RichTextData.fromHTMLString(c)):s.type==="string"&&c instanceof Fe.RichTextData?a[o]=c.toHTMLString():a[o]=c;else{let h=wt(s);h!==void 0&&(a[o]=h)}return["node","children"].indexOf(s.source)!==-1&&(typeof a[o]=="string"?a[o]=[a[o]]:Array.isArray(a[o])||(a[o]=[])),a},{})}function vt(e,t){let r=M(e)?.attributes;if(!r)return[];let a=Object.keys(r);return t?a.filter(o=>{let s=r[o];return s?.role===t?!0:s?.__experimentalRole===t?((0,bt.default)("__experimentalRole attribute",{since:"6.7",version:"6.8",alternative:"role attribute",hint:`Check the block.json of the ${e} block.`}),!0):!1}):a}var ya=(...e)=>((0,bt.default)("__experimentalGetBlockAttributesNamesByRole",{since:"6.7",version:"6.8",alternative:"getBlockAttributesNamesByRole"}),vt(...e));function wa(e){let t=M(e),r=t?.attributes;return t?.supports?.contentRole?!0:r?!!Object.keys(r)?.some(o=>{let s=r[o];return s?.role==="content"||s?.__experimentalRole==="content"}):!1}function ce(e,t){return Object.fromEntries(Object.entries(e).filter(([r])=>!t.includes(r)))}var ri=[{slug:"text",title:(0,ye.__)("Text")},{slug:"media",title:(0,ye.__)("Media")},{slug:"design",title:(0,ye.__)("Design")},{slug:"widgets",title:(0,ye.__)("Widgets")},{slug:"theme",title:(0,ye.__)("Theme")},{slug:"embed",title:(0,ye.__)("Embeds")},{slug:"reusable",title:(0,ye.__)("Reusable blocks")}];function Et(e){return e.reduce((t,r)=>({...t,[r.name]:r}),{})}function br(e){return e.reduce((t,r)=>(t.some(a=>a.name===r.name)||t.push(r),t),[])}function ti(e={},t){switch(t.type){case"ADD_BOOTSTRAPPED_BLOCK_TYPE":let{name:r,blockType:a}=t;if(e[r])return e;let s=Object.fromEntries(Object.entries(a).filter(([,c])=>c!=null).map(([c,h])=>[kn(c),h]));return s.name=r,{...e,[r]:s};case"REMOVE_BLOCK_TYPES":return ce(e,t.names)}return e}function ni(e={},t){switch(t.type){case"ADD_UNPROCESSED_BLOCK_TYPE":return{...e,[t.name]:t.blockType};case"REMOVE_BLOCK_TYPES":return ce(e,t.names)}return e}function ai(e={},t){switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...Et(t.blockTypes)};case"REMOVE_BLOCK_TYPES":return ce(e,t.names)}return e}function oi(e={},t){switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...Object.fromEntries(Object.entries(Et(t.blockTypes)).map(([a,o])=>[a,br([...(o.styles??[]).map(s=>({...s,source:"block"})),...(e[o.name]??[]).filter(({source:s})=>s!=="block")])]))};case"ADD_BLOCK_STYLES":let r={};return t.blockNames.forEach(a=>{r[a]=br([...e[a]??[],...t.styles])}),{...e,...r};case"REMOVE_BLOCK_STYLES":return{...e,[t.blockName]:(e[t.blockName]??[]).filter(a=>t.styleNames.indexOf(a.name)===-1)}}return e}function ui(e={},t){switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...Object.fromEntries(Object.entries(Et(t.blockTypes)).map(([r,a])=>[r,br([...(a.variations??[]).map(o=>({...o,source:"block"})),...(e[a.name]??[]).filter(({source:o})=>o!=="block")])]))};case"ADD_BLOCK_VARIATIONS":return{...e,[t.blockName]:br([...e[t.blockName]??[],...t.variations])};case"REMOVE_BLOCK_VARIATIONS":return{...e,[t.blockName]:(e[t.blockName]??[]).filter(r=>t.variationNames.indexOf(r.name)===-1)}}return e}function _r(e){return(t=null,r)=>{switch(r.type){case"REMOVE_BLOCK_TYPES":return r.names.indexOf(t)!==-1?null:t;case e:return r.name||null}return t}}var ii=_r("SET_DEFAULT_BLOCK_NAME"),si=_r("SET_FREEFORM_FALLBACK_BLOCK_NAME"),di=_r("SET_UNREGISTERED_FALLBACK_BLOCK_NAME"),ci=_r("SET_GROUPING_BLOCK_NAME");function li(e=ri,t){switch(t.type){case"SET_CATEGORIES":let r=new Map;return(t.categories||[]).forEach(a=>{r.set(a.slug,a)}),[...r.values()];case"UPDATE_CATEGORY":{if(!t.category||!Object.keys(t.category).length)return e;if(e.find(({slug:o})=>o===t.slug))return e.map(o=>o.slug===t.slug?{...o,...t.category}:o)}}return e}function fi(e={},t){switch(t.type){case"ADD_BLOCK_COLLECTION":return{...e,[t.namespace]:{title:t.title,icon:t.icon}};case"REMOVE_BLOCK_COLLECTION":return ce(e,t.namespace)}return e}function pi(e=[],t=[]){let r=Array.from(new Set(e.concat(t)));return r.length>0?r:void 0}function mi(e={},t){switch(t.type){case"ADD_BLOCK_BINDINGS_SOURCE":return{...e,[t.name]:{label:t.label||e[t.name]?.label,usesContext:pi(e[t.name]?.usesContext,t.usesContext),getValues:t.getValues,setValues:t.setValues,canUserEditValue:t.setValues&&t.canUserEditValue,getFieldsList:t.getFieldsList}};case"REMOVE_BLOCK_BINDINGS_SOURCE":return ce(e,t.name)}return e}var va=(0,ka.combineReducers)({bootstrappedBlockTypes:ti,unprocessedBlockTypes:ni,blockTypes:ai,blockStyles:oi,blockVariations:ui,defaultBlockName:ii,freeformFallbackBlockName:si,unregisteredFallbackBlockName:di,groupingBlockName:ci,categories:li,collections:fi,blockBindingsSources:mi});var Nt={};Ie(Nt,{__experimentalHasContentRoleAttribute:()=>qi,getActiveBlockVariation:()=>Ai,getBlockStyles:()=>Bi,getBlockSupport:()=>ja,getBlockType:()=>Me,getBlockTypes:()=>Ma,getBlockVariations:()=>At,getCategories:()=>Ni,getChildBlockNames:()=>St,getCollections:()=>Li,getDefaultBlockName:()=>Pi,getDefaultBlockVariation:()=>Si,getFreeformFallbackBlockName:()=>Ri,getGroupingBlockName:()=>Di,getUnregisteredFallbackBlockName:()=>Oi,hasBlockSupport:()=>za,hasChildBlocks:()=>ji,hasChildBlocksWithInserterSupport:()=>zi,isMatchingSearchTerm:()=>Mi});var Pa=B(Ba(),1),wr=B(Be(),1),Ra=B(xe(),1),Oa=B(J(),1);var Ae=(e,t,r)=>{let a=Array.isArray(t)?t:t.split("."),o=e;return a.forEach(s=>{o=o?.[s]}),o??r};function Aa(e){return typeof e=="object"&&e.constructor===Object&&e!==null}function Tt(e,t){return Aa(e)&&Aa(t)?Object.entries(t).every(([r,a])=>Tt(e?.[r],a)):e===t}var Bt={};Ie(Bt,{getAllBlockBindingsSources:()=>Ei,getBlockBindingsSource:()=>Ti,getBlockBindingsSourceFieldsList:()=>Ci,getBootstrappedBlockType:()=>ki,getSupportedStyles:()=>wi,getUnprocessedBlockTypes:()=>vi,hasContentRoleAttribute:()=>Ct});var Ke=B(Be(),1),Na=B(J(),1);var yi=["background","backgroundColor","color","linkColor","captionColor","buttonColor","headingColor","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","padding","contentSize","wideSize","blockGap","textAlign","textDecoration","textIndent","textTransform","letterSpacing"];function Sa(e,t,r){return e.filter(a=>!(a==="fontSize"&&r==="heading"||a==="textDecoration"&&!t&&r!=="link"||a==="textTransform"&&!t&&!(["heading","h1","h2","h3","h4","h5","h6"].includes(r)||r==="button"||r==="caption"||r==="text")||a==="letterSpacing"&&!t&&!(["heading","h1","h2","h3","h4","h5","h6"].includes(r)||r==="button"||r==="caption"||r==="text")||a==="textIndent"&&!t||a==="textColumns"&&!t))}var wi=(0,Ke.createSelector)((e,t,r)=>{if(!t)return Sa(yi,t,r);let a=Me(e,t);if(!a)return[];let o=[];return a?.supports?.spacing?.blockGap&&o.push("blockGap"),a?.supports?.shadow&&o.push("shadow"),Object.keys(pe).forEach(s=>{if(pe[s].support){if(pe[s].requiresOptOut&&pe[s].support[0]in a.supports&&Ae(a.supports,pe[s].support)!==!1){o.push(s);return}Ae(a.supports,pe[s].support,!1)&&o.push(s)}}),Sa(o,t,r)},(e,t)=>[e.blockTypes[t]]);function ki(e,t){return e.bootstrappedBlockTypes[t]}function vi(e){return e.unprocessedBlockTypes}function Ei(e){return e.blockBindingsSources}function Ti(e,t){return e.blockBindingsSources[t]}var Ci=(0,Ke.createRegistrySelector)(e=>(0,Ke.createSelector)((t,r,a)=>{if(!r.getFieldsList)return[];let o={};if(r?.usesContext?.length)for(let s of r.usesContext)o[s]=a[s];return r.getFieldsList({select:e,context:o})},(t,r,a)=>[r.getFieldsList,r.usesContext,a])),Ct=(e,t)=>{let r=Me(e,t);return r?Object.values(r.attributes).some(({role:a,__experimentalRole:o})=>a==="content"?!0:o==="content"?((0,Na.default)("__experimentalRole attribute",{since:"6.7",version:"6.8",alternative:"role attribute",hint:`Check the block.json of the ${t} block.`}),!0):!1):!1};var Da=(e,t)=>typeof t=="string"?Me(e,t):t,Ma=(0,wr.createSelector)(e=>Object.values(e.blockTypes),e=>[e.blockTypes]);function Me(e,t){return e.blockTypes[t]}function Bi(e,t){return e.blockStyles[t]}var At=(0,wr.createSelector)((e,t,r)=>{let a=e.blockVariations[t];return!a||!r?a:a.filter(o=>(o.scope||["block","inserter"]).includes(r))},(e,t)=>[e.blockVariations[t]]);function Ai(e,t,r,a){let o=At(e,t,a);if(!o)return o;let s=Me(e,t),c=Object.keys(s?.attributes||{}),h,_=0;for(let b of o)if(Array.isArray(b.isActive)){let E=b.isActive.filter(j=>{let I=j.split(".")[0];return c.includes(I)}),L=E.length;if(L===0)continue;E.every(j=>{let I=Ae(b.attributes,j);if(I===void 0)return!1;let G=Ae(r,j);return G instanceof Ra.RichTextData&&(G=G.toHTMLString()),Tt(G,I)})&&L>_&&(h=b,_=L)}else if(b.isActive?.(r,b.attributes))return h||b;return!h&&["block","transform"].includes(a)&&(h=o.find(b=>b?.isDefault&&!Object.hasOwn(b,"isActive"))),h}function Si(e,t,r){let a=At(e,t,r);return[...a].reverse().find(({isDefault:s})=>!!s)||a[0]}function Ni(e){return e.categories}function Li(e){return e.collections}function Pi(e){return e.defaultBlockName}function Ri(e){return e.freeformFallbackBlockName}function Oi(e){return e.unregisteredFallbackBlockName}function Di(e){return e.groupingBlockName}var St=(0,wr.createSelector)((e,t)=>Ma(e).filter(r=>r.parent?.includes(t)).map(({name:r})=>r),e=>[e.blockTypes]),ja=(e,t,r,a)=>{let o=Da(e,t);return o?.supports?Ae(o.supports,r,a):a};function za(e,t,r,a){return!!ja(e,t,r,a)}function La(e){return(0,Pa.default)(e??"").toLowerCase().trim()}function Mi(e,t,r=""){let a=Da(e,t),o=La(r),s=c=>La(c).includes(o);return s(a.title)||a.keywords?.some(s)||s(a.category)||typeof a.description=="string"&&s(a.description)}var ji=(e,t)=>St(e,t).length>0,zi=(e,t)=>St(e,t).some(r=>za(e,r,"inserter",!0)),qi=(...e)=>((0,Oa.default)("__experimentalHasContentRoleAttribute",{since:"6.7",version:"6.8",hint:"This is a private selector."}),Ct(...e));var Dt={};Ie(Dt,{__experimentalReapplyBlockFilters:()=>Ui,addBlockCollection:()=>rs,addBlockStyles:()=>$i,addBlockTypes:()=>Hi,addBlockVariations:()=>Ki,reapplyBlockTypeFilters:()=>Wa,removeBlockCollection:()=>ts,removeBlockStyles:()=>Gi,removeBlockTypes:()=>Fi,removeBlockVariations:()=>Wi,setCategories:()=>Ji,setDefaultBlockName:()=>Yi,setFreeformFallbackBlockName:()=>Xi,setGroupingBlockName:()=>Qi,setUnregisteredFallbackBlockName:()=>Zi,updateCategory:()=>es});var Ka=B(J(),1);function qa(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ia(e){var t,r;return qa(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(qa(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}var Ga=B(Ua(),1),Rt=B(J(),1),Ot=B(We(),1),te=B(pt(),1);var $a={common:"text",formatting:"text",layout:"design"};function xi(e=[],t=[]){let r=[...e];return t.forEach(a=>{let o=r.findIndex(s=>s.name===a.name);o!==-1?r[o]={...r[o],...a}:r.push(a)}),r}var Pr=(e,t)=>({select:r})=>{let a=r.getBootstrappedBlockType(e),o={apiVersion:1,name:e,icon:cr,keywords:[],attributes:{},providesContext:{},usesContext:[],selectors:{},supports:{},styles:[],blockHooks:{},save:()=>null,...a,...t,variations:xi(Array.isArray(a?.variations)?a.variations:[],Array.isArray(t?.variations)?t.variations:[])};(!o.attributes||typeof o.attributes!="object")&&((0,te.default)('The block "'+e+'" is registering attributes as `null` or `undefined`. Use an empty object (`attributes: {}`) or exclude the `attributes` key.'),o.attributes={});let s=(0,Ot.applyFilters)("blocks.registerBlockType",o,e,null);if(s.apiVersion<=2&&(0,Rt.default)("Block with API version 2 or lower",{since:"6.9",hint:`The block "${e}" is registered with API version ${s.apiVersion}. This means that the post editor may work as a non-iframe editor. Since all editors are planned to work as iframes in the future, set the \`apiVersion\` field to 3 and test the block inside the iframe editor.`,link:"https://developer.wordpress.org/block-editor/reference-guides/block-api/block-api-versions/block-migration-for-iframe-editor-compatibility/"}),s.description&&typeof s.description!="string"&&(0,Rt.default)("Declaring non-string block descriptions",{since:"6.2"}),s.deprecated&&(s.deprecated=s.deprecated.map(c=>Object.fromEntries(Object.entries((0,Ot.applyFilters)("blocks.registerBlockType",{...ce(o,He),...c},o.name,c)).filter(([h])=>He.includes(h))))),!Ia(s)){(0,te.default)("Block settings must be a valid object.");return}if(typeof s.save!="function"){(0,te.default)('The "save" property must be a valid function.');return}if("edit"in s&&!(0,Ga.isValidElementType)(s.edit)){(0,te.default)('The "edit" property must be a valid component.');return}if($a.hasOwnProperty(s.category)&&(s.category=$a[s.category]),"category"in s&&!r.getCategories().some(({slug:c})=>c===s.category)&&((0,te.default)('The block "'+e+'" is registered with an invalid category "'+s.category+'".'),delete s.category),!("title"in s)||s.title===""){(0,te.default)('The block "'+e+'" must have a title.');return}if(typeof s.title!="string"){(0,te.default)("Block titles must be strings.");return}if(s.icon=gr(s.icon),!$e(s.icon.src)){(0,te.default)("The icon passed is invalid. The icon should be a string, an element, a function, or an object following the specifications documented in https://developer.wordpress.org/block-editor/developers/block-api/block-registration/#icon-optional");return}if((typeof s?.parent=="string"||s?.parent instanceof String)&&(s.parent=[s.parent],(0,te.default)("Parent must be undefined or an array of strings (block types), but it is a string.")),!Array.isArray(s?.parent)&&s?.parent!==void 0){(0,te.default)("Parent must be undefined or an array of block types, but it is ",s.parent);return}if(s?.parent?.length===1&&e===s.parent[0]){(0,te.default)('Block "'+e+'" cannot be a parent of itself. Please remove the block name from the parent list.');return}return s};function Hi(e){return{type:"ADD_BLOCK_TYPES",blockTypes:Array.isArray(e)?e:[e]}}function Wa(){return({dispatch:e,select:t})=>{let r=[];for(let[a,o]of Object.entries(t.getUnprocessedBlockTypes())){let s=e(Pr(a,o));s&&r.push(s)}r.length&&e.addBlockTypes(r)}}function Ui(){return(0,Ka.default)('wp.data.dispatch( "core/blocks" ).__experimentalReapplyBlockFilters',{since:"6.4",alternative:"reapplyBlockFilters"}),Wa()}function Fi(e){return{type:"REMOVE_BLOCK_TYPES",names:Array.isArray(e)?e:[e]}}function $i(e,t){return{type:"ADD_BLOCK_STYLES",styles:Array.isArray(t)?t:[t],blockNames:Array.isArray(e)?e:[e]}}function Gi(e,t){return{type:"REMOVE_BLOCK_STYLES",styleNames:Array.isArray(t)?t:[t],blockName:e}}function Ki(e,t){return{type:"ADD_BLOCK_VARIATIONS",variations:Array.isArray(t)?t:[t],blockName:e}}function Wi(e,t){return{type:"REMOVE_BLOCK_VARIATIONS",variationNames:Array.isArray(t)?t:[t],blockName:e}}function Yi(e){return{type:"SET_DEFAULT_BLOCK_NAME",name:e}}function Xi(e){return{type:"SET_FREEFORM_FALLBACK_BLOCK_NAME",name:e}}function Zi(e){return{type:"SET_UNREGISTERED_FALLBACK_BLOCK_NAME",name:e}}function Qi(e){return{type:"SET_GROUPING_BLOCK_NAME",name:e}}function Ji(e){return{type:"SET_CATEGORIES",categories:e}}function es(e,t){return{type:"UPDATE_CATEGORY",slug:e,category:t}}function rs(e,t,r){return{type:"ADD_BLOCK_COLLECTION",namespace:e,title:t,icon:r}}function ts(e){return{type:"REMOVE_BLOCK_COLLECTION",namespace:e}}var Mt={};Ie(Mt,{addBlockBindingsSource:()=>os,addBootstrappedBlockType:()=>ns,addUnprocessedBlockType:()=>as,removeBlockBindingsSource:()=>us});function ns(e,t){return{type:"ADD_BOOTSTRAPPED_BLOCK_TYPE",name:e,blockType:t}}function as(e,t){return({dispatch:r})=>{r({type:"ADD_UNPROCESSED_BLOCK_TYPE",name:e,blockType:t});let a=r(Pr(e,t));a&&r.addBlockTypes(a)}}function os(e){return{type:"ADD_BLOCK_BINDINGS_SOURCE",name:e.name,label:e.label,usesContext:e.usesContext,getValues:e.getValues,setValues:e.setValues,canUserEditValue:e.canUserEditValue,getFieldsList:e.getFieldsList}}function us(e){return{type:"REMOVE_BLOCK_BINDINGS_SOURCE",name:e}}var Ya="core/blocks";var P=(0,Rr.createReduxStore)(Ya,{reducer:va,selectors:Nt,actions:Dt});(0,Rr.register)(P);oe(P).registerPrivateSelectors(Bt);oe(P).registerPrivateActions(Mt);var Or,is=new Uint8Array(16);function jt(){if(!Or&&(Or=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Or))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Or(is)}var H=[];for(let e=0;e<256;++e)H.push((e+256).toString(16).slice(1));function Xa(e,t=0){return H[e[t+0]]+H[e[t+1]]+H[e[t+2]]+H[e[t+3]]+"-"+H[e[t+4]]+H[e[t+5]]+"-"+H[e[t+6]]+H[e[t+7]]+"-"+H[e[t+8]]+H[e[t+9]]+"-"+H[e[t+10]]+H[e[t+11]]+H[e[t+12]]+H[e[t+13]]+H[e[t+14]]+H[e[t+15]]}var ss=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),zt={randomUUID:ss};function ds(e,t,r){if(zt.randomUUID&&!t&&!e)return zt.randomUUID();e=e||{};let a=e.random||(e.rng||jt)();if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=a[o];return t}return Xa(a)}var Ye=ds;var Dr=B(We(),1);function U(e,t={},r=[]){if(!kt(e))return U("core/missing",{originalName:e,originalContent:"",originalUndelimitedContent:""});let a=Ge(e,t);return{clientId:Ye(),name:e,isValid:!0,attributes:a,innerBlocks:r}}function It(e=[]){return e.map(t=>{let r=Array.isArray(t)?t:[t.name,t.attributes,t.innerBlocks],[a,o,s=[]]=r;return U(a,o,It(s))})}function Vt(e,t={},r){let{name:a}=e;if(!kt(a))return U("core/missing",{originalName:a,originalContent:"",originalUndelimitedContent:""});let o=Ye(),s=Ge(a,{...e.attributes,...t});return{...e,clientId:o,attributes:s,innerBlocks:r||e.innerBlocks.map(c=>Vt(c))}}function xt(e,t={},r){let a=Ye();return{...e,clientId:a,attributes:{...e.attributes,...t},innerBlocks:r||e.innerBlocks.map(o=>xt(o))}}var Qa=(e,t,r)=>{if(!r.length)return!1;let a=r.length>1,o=r[0].name;if(!(je(e)||!a||e.isMultiBlock)||!je(e)&&!r.every(b=>b.name===o)||!(e.type==="block"))return!1;let h=r[0];return!(!(t!=="from"||e.blocks.indexOf(h.name)!==-1||je(e))||!a&&t==="from"&&Za(h.name)&&Za(e.blockName)||!qt(e,r))},cs=e=>e.length?Ue().filter(a=>{let o=ue("from",a.name);return!!he(o,s=>Qa(s,"from",e))}):[],ls=e=>{if(!e.length)return[];let t=e[0],r=M(t.name);return(r?ue("to",r.name):[]).filter(c=>c&&Qa(c,"to",e)).map(c=>c.blocks).flat().map(M)},je=e=>e&&e.type==="block"&&Array.isArray(e.blocks)&&e.blocks.includes("*"),Za=e=>e===fr();function Ja(e){if(!e.length)return[];let t=cs(e),r=ls(e);return[...new Set([...t,...r])]}function he(e,t){let r=(0,Dr.createHooks)();for(let a=0;a<e.length;a++){let o=e[a];t(o)&&r.addFilter("transform","transform/"+a.toString(),s=>s||o,o.priority)}return r.applyFilters("transform",null)}function ue(e,t){if(t===void 0)return Ue().map(({name:h})=>ue(e,h)).flat();let r=de(t),{name:a,transforms:o}=r||{};if(!o||!Array.isArray(o[e]))return[];let s=o.supportedMobileTransforms&&Array.isArray(o.supportedMobileTransforms);return(s?o[e].filter(h=>h.type==="raw"||h.type==="prefix"?!0:!h.blocks||!h.blocks.length?!1:je(h)?!0:h.blocks.every(_=>o.supportedMobileTransforms.includes(_))):o[e]).map(h=>({...h,blockName:a,usingMobileTransformations:s}))}function qt(e,t){if(typeof e.isMatch!="function")return!0;let r=t[0],a=e.isMultiBlock?t.map(s=>s.attributes):r.attributes,o=e.isMultiBlock?t:r;return e.isMatch(a,o)}function eo(e,t){let r=Array.isArray(e)?e:[e],a=r.length>1,o=r[0],s=o.name,c=ue("from",t),h=ue("to",s),_=he(h,N=>N.type==="block"&&(je(N)||N.blocks.indexOf(t)!==-1)&&(!a||N.isMultiBlock)&&qt(N,r))||he(c,N=>N.type==="block"&&(je(N)||N.blocks.indexOf(s)!==-1)&&(!a||N.isMultiBlock)&&qt(N,r));if(!_)return null;let b;return _.isMultiBlock?"__experimentalConvert"in _?b=_.__experimentalConvert(r):b=_.transform(r.map(N=>N.attributes),r.map(N=>N.innerBlocks)):"__experimentalConvert"in _?b=_.__experimentalConvert(o):b=_.transform(o.attributes,o.innerBlocks),b===null||typeof b!="object"||(b=Array.isArray(b)?b:[b],b.some(N=>!M(N.name)))||!b.some(N=>N.name===t)?null:b.map((N,j,I)=>(0,Dr.applyFilters)("blocks.switchToBlockType.transformedBlock",N,e,j,I))}var Ht=(e,t)=>U(e,t.attributes,(t.innerBlocks??[]).map(r=>Ht(r.name,r)));var Go=B(to(),1),Ko=B(Ut(),1);var ve=B(De(),1),ke=B(We(),1),so=B(oo(),1),co=B(Ut(),1),lo=B(J(),1);function we(e,t={}){let{isCommentDelimited:r=!0}=t,{blockName:a,attrs:o={},innerBlocks:s=[],innerContent:c=[]}=e,h=0,_=c.map(b=>b!==null?b:we(s[h++],t)).join(`
`).replace(/\n+/g,`
`).trim();return r?Ft(a,o,_):_}var fo=B(io(),1);function po(e){let t="wp-block-"+e.replace(/\//,"-").replace(/^core-/,"");return(0,ke.applyFilters)("blocks.getBlockDefaultClassName",t,e)}function mo(e){let t="editor-block-list-item-"+e.replace(/\//,"-").replace(/^core-/,"");return(0,ke.applyFilters)("blocks.getBlockMenuDefaultClassName",t,e)}var $t={},ho={};function Gt(e={}){let{blockType:t,attributes:r}=$t;return Gt.skipFilters?e:(0,ke.applyFilters)("blocks.getSaveContent.extraProps",{...e},t,r)}function go(e={}){let{innerBlocks:t}=ho;if(!Array.isArray(t))return{...e,children:t};let r=Mr(t,{isInnerBlocks:!0});return{...e,children:(0,fo.jsx)(ve.RawHTML,{children:r})}}function Kt(e,t,r=[]){let a=de(e);if(!a?.save)return null;let{save:o}=a;if(o.prototype instanceof ve.Component){let c=new o({attributes:t});o=c.render.bind(c)}$t.blockType=a,$t.attributes=t,ho.innerBlocks=r;let s=o({attributes:t,innerBlocks:r});if(s!==null&&typeof s=="object"&&(0,ke.hasFilter)("blocks.getSaveContent.extraProps")&&!(a.apiVersion>1)){let c=(0,ke.applyFilters)("blocks.getSaveContent.extraProps",{...s.props},a,t);(0,so.isShallowEqual)(c,s.props)||(s=(0,ve.cloneElement)(s,c))}return(0,ke.applyFilters)("blocks.getSaveElement",s,a,t)}function ge(e,t,r){let a=de(e);return(0,ve.renderToString)(Kt(a,t,r))}function fs(e,t){return Object.entries(e.attributes??{}).reduce((r,[a,o])=>{let s=t[a];return s===void 0||o.source!==void 0||o.role==="local"?r:o.__experimentalRole==="local"?((0,lo.default)("__experimentalRole attribute",{since:"6.7",version:"6.8",alternative:"role attribute",hint:`Check the block.json of the ${e?.name} block.`}),r):("default"in o&&JSON.stringify(o.default)===JSON.stringify(s)||(r[a]=s),r)},{})}function ps(e){return JSON.stringify(e).replaceAll("\\\\","\\u005c").replaceAll("--","\\u002d\\u002d").replaceAll("<","\\u003c").replaceAll(">","\\u003e").replaceAll("&","\\u0026").replaceAll('\\"',"\\u0022")}function Xe(e){let t=e.originalContent;if(e.isValid||e.innerBlocks.length)try{t=ge(e.name,e.attributes,e.innerBlocks)}catch{}return t}function Ft(e,t,r){let a=t&&Object.entries(t).length?ps(t)+" ":"",o=e?.startsWith("core/")?e.slice(5):e;return r?`<!-- wp:${o} ${a}-->
`+r+`
<!-- /wp:${o} -->`:`<!-- wp:${o} ${a}/-->`}function ms(e,{isInnerBlocks:t=!1}={}){if(!e.isValid&&e.__unstableBlockSource)return we(e.__unstableBlockSource);let r=e.name,a=Xe(e);if(r===me()||!t&&r===ee())return a;let o=M(r);if(!o)return a;let s=fs(o,e.attributes);return Ft(r,s,a)}var bo=(()=>{let e=new WeakMap;return t=>{let r=e.get(t);if(r!==void 0)return r;let a=t;a.length===1&&hr(a[0])&&(a=[]);let o=Mr(a);return a.length===1&&a[0].name===ee()&&a[0].name==="core/freeform"&&(o=(0,co.removep)(o)),e.set(t,o),o}})();function Mr(e,t){return(Array.isArray(e)?e:[e]).map(a=>ms(a,t)).join(`

`)}var hs=/^#[xX]([A-Fa-f0-9]+)$/,gs=/^#([0-9]+)$/,bs=/^([A-Za-z0-9]+)$/,dl=(function(){function e(t){this.named=t}return e.prototype.parse=function(t){if(t){var r=t.match(hs);if(r)return String.fromCharCode(parseInt(r[1],16));if(r=t.match(gs),r)return String.fromCharCode(parseInt(r[1],10));if(r=t.match(bs),r)return this.named[r[1]]}},e})(),_s=/[\t\n\f ]/,ys=/[A-Za-z]/,ws=/\r\n?/g;function Se(e){return _s.test(e)}function _o(e){return ys.test(e)}function ks(e){return e.replace(ws,`
`)}var vs=(function(){function e(t,r){this.delegate=t,this.entityParser=r,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var a=this.peek();if(a==="<")this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(a===`
`){var o=this.tagNameBuffer.toLowerCase();(o==="pre"||o==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var a=this.peek();a==="<"?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):a==="&"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(a))},tagOpen:function(){var a=this.consume();a==="!"?this.transitionTo("markupDeclarationOpen"):a==="/"?this.transitionTo("endTagOpen"):(a==="@"||a===":"||_o(a))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(a))},markupDeclarationOpen:function(){var a=this.consume();a==="-"&&this.input.charAt(this.index)==="-"&&(this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment())},commentStart:function(){var a=this.consume();a==="-"?this.transitionTo("commentStartDash"):a===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(a),this.transitionTo("comment"))},commentStartDash:function(){var a=this.consume();a==="-"?this.transitionTo("commentEnd"):a===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var a=this.consume();a==="-"?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(a)},commentEndDash:function(){var a=this.consume();a==="-"?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+a),this.transitionTo("comment"))},commentEnd:function(){var a=this.consume();a===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+a),this.transitionTo("comment"))},tagName:function(){var a=this.consume();Se(a)?this.transitionTo("beforeAttributeName"):a==="/"?this.transitionTo("selfClosingStartTag"):a===">"?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(a)},beforeAttributeName:function(){var a=this.peek();if(Se(a)){this.consume();return}else a==="/"?(this.transitionTo("selfClosingStartTag"),this.consume()):a===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):a==="="?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(a)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var a=this.peek();Se(a)?(this.transitionTo("afterAttributeName"),this.consume()):a==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):a==="="?(this.transitionTo("beforeAttributeValue"),this.consume()):a===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):a==='"'||a==="'"||a==="<"?(this.delegate.reportSyntaxError(a+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(a)):(this.consume(),this.delegate.appendToAttributeName(a))},afterAttributeName:function(){var a=this.peek();if(Se(a)){this.consume();return}else a==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):a==="="?(this.consume(),this.transitionTo("beforeAttributeValue")):a===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(a))},beforeAttributeValue:function(){var a=this.peek();Se(a)?this.consume():a==='"'?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):a==="'"?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):a===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(a))},attributeValueDoubleQuoted:function(){var a=this.consume();a==='"'?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):a==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(a)},attributeValueSingleQuoted:function(){var a=this.consume();a==="'"?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):a==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(a)},attributeValueUnquoted:function(){var a=this.peek();Se(a)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):a==="/"?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):a==="&"?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):a===">"?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(a))},afterAttributeValueQuoted:function(){var a=this.peek();Se(a)?(this.consume(),this.transitionTo("beforeAttributeName")):a==="/"?(this.consume(),this.transitionTo("selfClosingStartTag")):a===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){var a=this.peek();a===">"?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var a=this.consume();(a==="@"||a===":"||_o(a))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(a))}},this.reset()}return e.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},e.prototype.transitionTo=function(t){this.state=t},e.prototype.tokenize=function(t){this.reset(),this.tokenizePart(t),this.tokenizeEOF()},e.prototype.tokenizePart=function(t){for(this.input+=ks(t);this.index<this.input.length;){var r=this.states[this.state];if(r!==void 0)r.call(this);else throw new Error("unhandled state "+this.state)}},e.prototype.tokenizeEOF=function(){this.flushData()},e.prototype.flushData=function(){this.state==="data"&&(this.delegate.finishData(),this.transitionTo("beforeData"))},e.prototype.peek=function(){return this.input.charAt(this.index)},e.prototype.consume=function(){var t=this.peek();return this.index++,t===`
`?(this.line++,this.column=0):this.column++,t},e.prototype.consumeCharRef=function(){var t=this.input.indexOf(";",this.index);if(t!==-1){var r=this.input.slice(this.index,t),a=this.entityParser.parse(r);if(a){for(var o=r.length;o;)this.consume(),o--;return this.consume(),a}}},e.prototype.markTagStart=function(){this.delegate.tagOpen()},e.prototype.appendToTagName=function(t){this.tagNameBuffer+=t,this.delegate.appendToTagName(t)},e})(),yo=(function(){function e(t,r){r===void 0&&(r={}),this.options=r,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new vs(this,t),this._currentAttribute=void 0}return e.prototype.tokenize=function(t){return this.tokens=[],this.tokenizer.tokenize(t),this.tokens},e.prototype.tokenizePart=function(t){return this.tokens=[],this.tokenizer.tokenizePart(t),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var t=this.token;if(t===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return t;for(var r=0;r<arguments.length;r++)if(t.type===arguments[r])return t;throw new Error("token type was unexpectedly "+t.type)},e.prototype.push=function(t){this.token=t,this.tokens.push(t)},e.prototype.currentAttribute=function(){return this._currentAttribute},e.prototype.addLocInfo=function(){this.options.loc&&(this.current().loc={start:{line:this.startLine,column:this.startColumn},end:{line:this.tokenizer.line,column:this.tokenizer.column}}),this.startLine=this.tokenizer.line,this.startColumn=this.tokenizer.column},e.prototype.beginData=function(){this.push({type:"Chars",chars:""})},e.prototype.appendToData=function(t){this.current("Chars").chars+=t},e.prototype.finishData=function(){this.addLocInfo()},e.prototype.beginComment=function(){this.push({type:"Comment",chars:""})},e.prototype.appendToCommentData=function(t){this.current("Comment").chars+=t},e.prototype.finishComment=function(){this.addLocInfo()},e.prototype.tagOpen=function(){},e.prototype.beginStartTag=function(){this.push({type:"StartTag",tagName:"",attributes:[],selfClosing:!1})},e.prototype.beginEndTag=function(){this.push({type:"EndTag",tagName:""})},e.prototype.finishTag=function(){this.addLocInfo()},e.prototype.markTagAsSelfClosing=function(){this.current("StartTag").selfClosing=!0},e.prototype.appendToTagName=function(t){this.current("StartTag","EndTag").tagName+=t},e.prototype.beginAttribute=function(){this._currentAttribute=["","",!1]},e.prototype.appendToAttributeName=function(t){this.currentAttribute()[0]+=t},e.prototype.beginAttributeValue=function(t){this.currentAttribute()[2]=t},e.prototype.appendToAttributeValue=function(t){this.currentAttribute()[1]+=t},e.prototype.finishAttributeValue=function(){this.current("StartTag").attributes.push(this._currentAttribute)},e.prototype.reportSyntaxError=function(t){this.current().syntaxError=t},e})();var So=B(ko(),1),No=B(J(),1),Lo=B(Eo(),1);function Ne(){function e(t){return(r,...a)=>t("Block validation: "+r,...a)}return{error:e(console.error),warning:e(console.warn),getItems(){return[]}}}function To(){let e=[],t=Ne();return{error(...r){e.push({log:t.error,args:r})},warning(...r){e.push({log:t.warning,args:r})},getItems(){return e}}}var Es=e=>e,Ts=/[\t\n\r\v\f ]+/g,Cs=/^[\t\n\r\v\f ]*$/,Bs=/^url\s*\(['"\s]*(.*?)['"\s]*\)$/,Po=["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"],As=["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"],Ss=[...Po,...As],Co=[Es,Ds],Ns=/^[\da-z]+$/i,Ls=/^#\d+$/,Ps=/^#x[\da-f]+$/i;function Rs(e){return Ns.test(e)||Ls.test(e)||Ps.test(e)}var Os=class{parse(e){if(Rs(e))return(0,Lo.decodeEntities)("&"+e+";")}};function Wt(e){return e.trim().split(Ts)}function Ds(e){return Wt(e).join(" ")}function Ms(e){return e.attributes.filter(t=>{let[r,a]=t;return a||r.indexOf("data-")===0||Ss.includes(r)})}function Bo(e,t,r=Ne()){let a=e.chars,o=t.chars;for(let s=0;s<Co.length;s++){let c=Co[s];if(a=c(a),o=c(o),a===o)return!0}return r.warning("Expected text `%s`, saw `%s`.",t.chars,e.chars),!1}function js(e){return parseFloat(e)===0?"0":e.indexOf(".")===0?"0"+e:e}function zs(e){return Wt(e).map(js).join(" ").replace(Bs,"url($1)")}function qs(e){let t=e.replace(/;?\s*$/,"").split(";").map(r=>{let[a,...o]=r.split(":"),s=o.join(":");return[a.trim(),zs(s.trim())]});return Object.fromEntries(t)}var Is={class:(e,t)=>{let[r,a]=[e,t].map(Wt),o=r.filter(c=>!a.includes(c)),s=a.filter(c=>!r.includes(c));return o.length===0&&s.length===0},style:(e,t)=>(0,So.default)(...[e,t].map(qs)),...Object.fromEntries(Po.map(e=>[e,()=>!0]))};function Vs(e,t,r=Ne()){if(e.length!==t.length)return r.warning("Expected attributes %o, instead saw %o.",t,e),!1;let a={};for(let o=0;o<t.length;o++)a[t[o][0].toLowerCase()]=t[o][1];for(let o=0;o<e.length;o++){let[s,c]=e[o],h=s.toLowerCase();if(!a.hasOwnProperty(h))return r.warning("Encountered unexpected attribute `%s`.",s),!1;let _=a[h],b=Is[h];if(b){if(!b(c,_))return r.warning("Expected attribute `%s` of value `%s`, saw `%s`.",s,_,c),!1}else if(c!==_)return r.warning("Expected attribute `%s` of value `%s`, saw `%s`.",s,_,c),!1}return!0}var xs={StartTag:(e,t,r=Ne())=>e.tagName!==t.tagName&&e.tagName.toLowerCase()!==t.tagName.toLowerCase()?(r.warning("Expected tag name `%s`, instead saw `%s`.",t.tagName,e.tagName),!1):Vs(...[e,t].map(Ms),r),Chars:Bo,Comment:Bo};function Ze(e){let t;for(;t=e.shift();)if(t.type!=="Chars"||!Cs.test(t.chars))return t}function Hs(e,t=Ne()){try{return new yo(new Os).tokenize(e)}catch{t.warning("Malformed HTML detected: %s",e)}return null}function Ao(e,t){return e.selfClosing?!!(t&&t.tagName===e.tagName&&t.type==="EndTag"):!1}function Us(e,t,r=Ne()){if(e===t)return!0;let[a,o]=[e,t].map(h=>Hs(h,r));if(!a||!o)return!1;let s,c;for(;s=Ze(a);){if(c=Ze(o),!c)return r.warning("Expected end of content, instead saw %o.",s),!1;if(s.type!==c.type)return r.warning("Expected token of type `%s` (%o), instead saw `%s` (%o).",c.type,c,s.type,s),!1;let h=xs[s.type];if(h&&!h(s,c,r))return!1;Ao(s,o[0])?Ze(o):Ao(c,a[0])&&Ze(a)}return(c=Ze(o))?(r.warning("Expected %o, instead saw end of content.",c),!1):!0}function be(e,t=e.name){if(e.name===ee()||e.name===me())return[!0,[]];let a=To(),o=de(t),s;try{s=ge(o,e.attributes)}catch(h){return a.error(`Block validation failed because an error occurred while generating block content:

%s`,h.toString()),[!1,a.getItems()]}let c=Us(e.originalContent,s,a);return c||a.error(`Block validation failed for \`%s\` (%o).

Content generated by \`save\` function:

%s

Content retrieved from post body:

%s`,o.name,o,s,e.originalContent),[c,a.getItems()]}function Ro(e,t,r){(0,No.default)("isValidBlockContent introduces opportunity for data loss",{since:"12.6",plugin:"Gutenberg",alternative:"validateBlock"});let a=de(e),o={name:a.name,attributes:t,innerBlocks:[],originalContent:r},[s]=be(o,a);return s}function jr(e,t){let r={...t};if(e==="core/cover-image"&&(e="core/cover"),(e==="core/text"||e==="core/cover-text")&&(e="core/paragraph"),e&&e.indexOf("core/social-link-")===0&&(r.service=e.substring(17),e="core/social-link"),e&&e.indexOf("core-embed/")===0){let a=e.substring(11),o={speaker:"speaker-deck",polldaddy:"crowdsignal"};r.providerNameSlug=a in o?o[a]:a,["amazon-kindle","wordpress"].includes(a)||(r.responsive=!0),e="core/embed"}if(e==="core/post-comment-author"&&(e="core/comment-author-name"),e==="core/post-comment-content"&&(e="core/comment-content"),e==="core/post-comment-date"&&(e="core/comment-date"),e==="core/comments-query-loop"){e="core/comments";let{className:a=""}=r;a.includes("wp-block-comments-query-loop")||(r.className=["wp-block-comments-query-loop",a].join(" "))}if(e==="core/post-comments"&&(e="core/comments",r.legacy=!0),t.layout?.type==="grid"&&typeof t.layout?.columnCount=="string"&&(r.layout={...r.layout,columnCount:parseInt(t.layout.columnCount,10)}),typeof t.style?.layout?.columnSpan=="string"){let a=parseInt(t.style.layout.columnSpan,10);r.style={...r.style,layout:{...r.style.layout,columnSpan:isNaN(a)?void 0:a}}}if(typeof t.style?.layout?.rowSpan=="string"){let a=parseInt(t.style.layout.rowSpan,10);r.style={...r.style,layout:{...r.style.layout,rowSpan:isNaN(a)?void 0:a}}}return[e,r]}function Yt(e,t){for(var r=t.split("."),a;a=r.shift();){if(!(a in e))return;e=e[a]}return e}var Fs=(function(){var e;return function(){return e||(e=document.implementation.createHTMLDocument("")),e}})();function zr(e,t){if(t){if(typeof e=="string"){var r=Fs();r.body.innerHTML=e,e=r.body}if(typeof t=="function")return t(e);if(Object===t.constructor)return Object.keys(t).reduce(function(a,o){return a[o]=zr(e,t[o]),a},{})}}function Qe(e,t){return arguments.length===1&&(t=e,e=void 0),function(r){var a=r;if(e&&(a=r.querySelector(e)),a)return Yt(a,t)}}function Xt(e,t){return arguments.length===1&&(t=e,e=void 0),function(r){var a=Qe(e,"attributes")(r);if(a&&a.hasOwnProperty(t))return a[t].value}}function Zt(e){return Qe(e,"textContent")}function Qt(e,t){return function(r){var a=r.querySelectorAll(e);return[].map.call(a,function(o){return zr(o,t)})}}function Oo(e,t){var r=0,a,o;t=t||{};function s(){var c=a,h=arguments.length,_,b;e:for(;c;){if(c.args.length!==arguments.length){c=c.next;continue}for(b=0;b<h;b++)if(c.args[b]!==arguments[b]){c=c.next;continue e}return c!==a&&(c===o&&(o=c.prev),c.prev.next=c.next,c.next&&(c.next.prev=c.prev),c.next=a,c.prev=null,a.prev=c,a=c),c.val}for(_=new Array(h),b=0;b<h;b++)_[b]=arguments[b];return c={args:_,val:e.apply(null,_)},a?(a.prev=c,c.next=a):o=c,r===t.maxSize?(o=o.prev,o.next=null):r++,a=c,c.val}return s.clear=function(){a=null,o=null,r=0},s}var Io=B(We(),1),Vo=B(xe(),1);var en=B(xe(),1);var Je=B(J(),1);var Do=B(De(),1),ze=B(J(),1);function $s(e){return(0,ze.default)("wp.blocks.children.getChildrenArray",{since:"6.1",version:"6.3",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),e}function Gs(...e){(0,ze.default)("wp.blocks.children.concat",{since:"6.1",version:"6.3",alternative:"wp.richText.concat",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"});let t=[];for(let r=0;r<e.length;r++){let a=Array.isArray(e[r])?e[r]:[e[r]];for(let o=0;o<a.length;o++){let s=a[o];typeof s=="string"&&typeof t[t.length-1]=="string"?t[t.length-1]+=s:t.push(s)}}return t}function qr(e){(0,ze.default)("wp.blocks.children.fromDOM",{since:"6.1",version:"6.3",alternative:"wp.richText.create",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"});let t=[];for(let r=0;r<e.length;r++)try{t.push(Vr(e[r]))}catch{}return t}function Jt(e){(0,ze.default)("wp.blocks.children.toHTML",{since:"6.1",version:"6.3",alternative:"wp.richText.toHTMLString",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"});let t=e;return(0,Do.renderToString)(t)}function Ir(e){return(0,ze.default)("wp.blocks.children.matcher",{since:"6.1",version:"6.3",alternative:"html source",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),t=>{let r=t;return e&&(r=t.querySelector(e)),r?qr(r.childNodes):[]}}var Mo={concat:Gs,getChildrenArray:$s,fromDOM:qr,toHTML:Jt,matcher:Ir};function Ys(e,t){return(0,Je.default)("wp.blocks.node.isNodeOfType",{since:"6.1",version:"6.3",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),e&&e.type===t}function Xs(e){let t={};for(let r=0;r<e.length;r++){let{name:a,value:o}=e[r];t[a]=o}return t}function Vr(e){if((0,Je.default)("wp.blocks.node.fromDOM",{since:"6.1",version:"6.3",alternative:"wp.richText.create",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),e.nodeType===e.TEXT_NODE)return e.nodeValue;if(e.nodeType!==e.ELEMENT_NODE)throw new TypeError("A block node can only be created from a node of type text or element.");return{type:e.nodeName.toLowerCase(),props:{...Xs(e.attributes),children:qr(e.childNodes)}}}function Zs(e){return(0,Je.default)("wp.blocks.node.toHTML",{since:"6.1",version:"6.3",alternative:"wp.richText.toHTMLString",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),Jt([e])}function xr(e){return(0,Je.default)("wp.blocks.node.matcher",{since:"6.1",version:"6.3",alternative:"html source",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),t=>{let r=t;e&&(r=t.querySelector(e));try{return Vr(r)}catch{return null}}}var jo={isNodeOfType:Ys,fromDOM:Vr,toHTML:Zs,matcher:xr};function zo(e,t){return r=>{let a=r;if(e&&(a=r.querySelector(e)),!a)return"";if(t){let o="",s=a.children.length;for(let c=0;c<s;c++){let h=a.children[c];h.nodeName.toLowerCase()===t&&(o+=h.outerHTML)}return o}return a.innerHTML}}var qo=(e,t)=>r=>{let a=e?r.querySelector(e):r;return a?en.RichTextData.fromHTMLElement(a,{preserveWhiteSpace:t}):en.RichTextData.empty()};var Qs=e=>t=>e(t)!==void 0;function Js(e,t){switch(t){case"rich-text":return e instanceof Vo.RichTextData;case"string":return typeof e=="string";case"boolean":return typeof e=="boolean";case"object":return!!e&&e.constructor===Object;case"null":return e===null;case"array":return Array.isArray(e);case"integer":case"number":return typeof e=="number"}return!0}function ed(e,t){return t.some(r=>Js(e,r))}function rd(e,t,r,a,o){let s;switch(t.source){case void 0:s=a?a[e]:void 0;break;case"raw":s=o;break;case"attribute":case"property":case"html":case"text":case"rich-text":case"children":case"node":case"query":case"tag":s=Le(r,t);break}return(!td(s,t.type)||!nd(s,t.enum))&&(s=void 0),s===void 0&&(s=wt(t)),s}function td(e,t){return t===void 0||ed(e,Array.isArray(t)?t:[t])}function nd(e,t){return!Array.isArray(t)||t.includes(e)}var xo=Oo(e=>{switch(e.source){case"attribute":{let r=Xt(e.selector,e.attribute);return e.type==="boolean"&&(r=Qs(r)),r}case"html":return zo(e.selector,e.multiline);case"text":return Zt(e.selector);case"rich-text":return qo(e.selector,e.__unstablePreserveWhiteSpace);case"children":return Ir(e.selector);case"node":return xr(e.selector);case"query":let t=Object.fromEntries(Object.entries(e.query).map(([r,a])=>[r,xo(a)]));return Qt(e.selector,t);case"tag":{let r=Qe(e.selector,"nodeName");return a=>r(a)?.toLowerCase()}default:console.error(`Unknown source type "${e.source}"`)}});function Ho(e){return zr(e,t=>t)}function Le(e,t){return xo(t)(Ho(e))}function ie(e,t,r={}){let a=Ho(t),o=de(e),s=Object.fromEntries(Object.entries(o.attributes??{}).map(([c,h])=>[c,rd(c,h,a,r,t)]));return(0,Io.applyFilters)("blocks.getBlockAttributes",s,o,t,r)}var ad={type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"};function Uo(e){let t=Le(`<div data-custom-class-name>${e}</div>`,ad);return t?t.trim().split(/\s+/):[]}function Fo(e,t,r){if(!se(t,"customClassName",!0))return e;let a={...e},{className:o,...s}=a,c=ge(t,s),h=Uo(c),b=Uo(r).filter(E=>!h.includes(E));return b.length?a.className=b.join(" "):c&&delete a.className,a}function od(e,t,r){return Le(`<div ${t}>${e}</div>`,r)}function rn(e,t,r,a,o,s){if(!se(t,a,!1))return e;let c={...e},h=od(r,o,s);return h&&(c[a]=h),c}var ud={type:"string",source:"attribute",selector:"[data-aria-label] > *",attribute:"aria-label"},id={type:"string",source:"attribute",selector:"[data-anchor] > *",attribute:"id"};function Pe(e,t){let{attributes:r,originalContent:a}=e,o=r;return o=Fo(r,t,a),o=rn(o,t,a,"ariaLabel","data-aria-label",ud),o=rn(o,t,a,"anchor","data-anchor",id),{...e,attributes:o}}function sd(){return!1}function $o(e,t,r){let a=t.attrs,{deprecated:o}=r;if(!o||!o.length)return e;for(let s=0;s<o.length;s++){let{isEligible:c=sd}=o[s];if(e.isValid&&!c(a,e.innerBlocks,{blockNode:t,block:e}))continue;let h=Object.assign(ce(r,He),o[s]),_={...e,attributes:ie(h,e.originalContent,a)},[b]=be(_,h);if(b||(_=Pe(_,h),[b]=be(_,h)),!b)continue;let E=_.innerBlocks,L=_.attributes,{migrate:N}=h;if(N){let j=N(L,e.innerBlocks);Array.isArray(j)||(j=[j]),[L=a,E=e.innerBlocks]=j}e={...e,attributes:L,innerBlocks:E,isValid:!0,validationIssues:[]}}return e}function dd(e){let[t,r]=jr(e.blockName,e.attrs);return{...e,blockName:t,attrs:r}}function cd(e,t){let r=ee(),a=e.blockName||ee(),o=e.attrs||{},s=e.innerBlocks||[],c=e.innerHTML.trim();return a===r&&a==="core/freeform"&&!t?.__unstableSkipAutop&&(c=(0,Ko.autop)(c).trim()),{...e,blockName:a,attrs:o,innerHTML:c,innerBlocks:s}}function ld(e){let t=me()||ee(),r=we(e,{isCommentDelimited:!1}),a=we(e,{isCommentDelimited:!0});return{blockName:t,attrs:{originalName:e.blockName,originalContent:a,originalUndelimitedContent:r},innerHTML:e.blockName?a:e.innerHTML,innerBlocks:e.innerBlocks,innerContent:e.innerContent}}function fd(e,t){let[r]=be(e,t);if(r)return{...e,isValid:r,validationIssues:[]};let a=Pe(e,t),[o,s]=be(a,t);return{...a,isValid:o,validationIssues:s}}function Hr(e,t){let r=cd(e,t);r=dd(r);let a=M(r.blockName);a||(r=ld(r),a=M(r.blockName));let o=r.blockName===ee()||r.blockName===me();if(!a||!r.innerHTML&&o)return;let s=r.innerBlocks.map(E=>Hr(E,t)).filter(E=>!!E),c=U(r.blockName,ie(a,r.innerHTML,r.attrs),s);c.originalContent=r.innerHTML;let h=fd(c,a),{validationIssues:_}=h,b=$o(h,r,a);return b.isValid||(b.__unstableBlockSource=e),!h.isValid&&b.isValid&&!t?.__unstableSkipMigrationLogs?(console.groupCollapsed("Updated Block: %s",a.name),console.info(`Block successfully updated for \`%s\` (%o).

New content generated by \`save\` function:

%s

Content retrieved from post body:

%s`,a.name,a,ge(a,b.attributes),b.originalContent),console.groupEnd()):!h.isValid&&!b.isValid&&_.forEach(({log:E,args:L})=>E(...L)),b}function Ee(e,t){return(0,Go.parse)(e).reduce((r,a)=>{let o=Hr(a,t);return o&&r.push(o),r},[])}var Bu=B(J(),1),Au=B(Z(),1);var Wo=B(De(),1);function Ur(){return ue("from").filter(({type:e})=>e==="raw").map(e=>e.isMatch?e:{...e,isMatch:t=>e.selector&&t.matches(e.selector)})}function Fr(e,t){let r=document.implementation.createHTMLDocument("");return r.body.innerHTML=e,Array.from(r.body.children).flatMap(a=>{let o=he(Ur(),({isMatch:h})=>h(a));if(!o)return Wo.Platform.isNative?Ee(`<!-- wp:html -->${a.outerHTML}<!-- /wp:html -->`):U("core/html",ie("core/html",a.outerHTML));let{transform:s,blockName:c}=o;if(s){let h=s(a,t);return a.hasAttribute("class")&&(h.attributes.className=a.getAttribute("class")),h}return U(c,ie(c,a.outerHTML))})}var er=B(Z(),1);function Te(e,t={}){let r=document.implementation.createHTMLDocument(""),a=document.implementation.createHTMLDocument(""),o=r.body,s=a.body;for(o.innerHTML=e;o.firstChild;){let c=o.firstChild;c.nodeType===c.TEXT_NODE?(0,er.isEmpty)(c)?o.removeChild(c):((!s.lastChild||s.lastChild.nodeName!=="P")&&s.appendChild(a.createElement("P")),s.lastChild.appendChild(c)):c.nodeType===c.ELEMENT_NODE?c.nodeName==="BR"?(c.nextSibling&&c.nextSibling.nodeName==="BR"&&(s.appendChild(a.createElement("P")),o.removeChild(c.nextSibling)),s.lastChild&&s.lastChild.nodeName==="P"&&s.lastChild.hasChildNodes()?s.lastChild.appendChild(c):o.removeChild(c)):c.nodeName==="P"?(0,er.isEmpty)(c)&&!t.raw?o.removeChild(c):s.appendChild(c):(0,er.isPhrasingContent)(c)?((!s.lastChild||s.lastChild.nodeName!=="P")&&s.appendChild(a.createElement("P")),s.lastChild.appendChild(c)):s.appendChild(c):o.removeChild(c)}return s.innerHTML}var rr=B(Z(),1);function $r(e,t){if(e.nodeType!==e.COMMENT_NODE||e.nodeValue!=="nextpage"&&e.nodeValue.indexOf("more")!==0)return;let r=pd(e,t);if(!e.parentNode||e.parentNode.nodeName!=="P")(0,rr.replace)(e,r);else{let a=Array.from(e.parentNode.childNodes),o=a.indexOf(e),s=e.parentNode.parentNode||t.body,c=(h,_)=>(h||(h=t.createElement("p")),h.appendChild(_),h);[a.slice(0,o).reduce(c,null),r,a.slice(o+1).reduce(c,null)].forEach(h=>h&&s.insertBefore(h,e.parentNode)),(0,rr.remove)(e.parentNode)}}function pd(e,t){if(e.nodeValue==="nextpage")return hd(t);let r=e.nodeValue.slice(4).trim(),a=e,o=!1;for(;a=a.nextSibling;)if(a.nodeType===a.COMMENT_NODE&&a.nodeValue==="noteaser"){o=!0,(0,rr.remove)(a);break}return md(r,o,t)}function md(e,t,r){let a=r.createElement("wp-block");return a.dataset.block="core/more",e&&(a.dataset.customText=e),t&&(a.dataset.noTeaser=""),a}function hd(e){let t=e.createElement("wp-block");return t.dataset.block="core/nextpage",t}var Xo=B(Z(),1);function Yo(e){return e.nodeName==="OL"||e.nodeName==="UL"}function gd(e){return Array.from(e.childNodes).map(({nodeValue:t=""})=>t).join("")}function Gr(e){if(!Yo(e))return;let t=e,r=e.previousElementSibling;if(r&&r.nodeName===e.nodeName&&t.children.length===1){for(;t.firstChild;)r.appendChild(t.firstChild);t.parentNode.removeChild(t)}let a=e.parentNode;if(a&&a.nodeName==="LI"&&a.children.length===1&&!/\S/.test(gd(a))){let o=a,s=o.previousElementSibling,c=o.parentNode;s&&(s.appendChild(t),c.removeChild(o))}if(a&&Yo(a)){let o=e.previousElementSibling;o?o.appendChild(e):(0,Xo.unwrap)(e)}}function Kr(e){return t=>{t.nodeName==="BLOCKQUOTE"&&(t.innerHTML=Te(t.innerHTML,e))}}var Zo=B(Z(),1);function bd(e,t){let r=e.nodeName.toLowerCase();return r==="figcaption"||(0,Zo.isTextContent)(e)?!1:r in(t?.figure?.children??{})}function _d(e,t){return e.nodeName.toLowerCase()in(t?.figure?.children?.a?.children??{})}function tn(e,t=e){let r=e.ownerDocument.createElement("figure");t.parentNode.insertBefore(r,t),r.appendChild(e)}function Wr(e,t,r){if(!bd(e,r))return;let a=e,o=e.parentNode;_d(e,r)&&o.nodeName==="A"&&o.childNodes.length===1&&(a=e.parentNode);let s=a.closest("p,div");s?e.classList?(e.classList.contains("alignright")||e.classList.contains("alignleft")||e.classList.contains("aligncenter")||!s.textContent.trim())&&tn(a,s):tn(a,s):tn(a)}var nr=B(Jo(),1);var eu=e=>Array.isArray(e)?e:[e],ru=/(\n|<p>)\s*$/,tu=/^\s*(\n|<\/p>)/;function tr(e,t=0,r=[]){let a=ue("from"),o=he(a,b=>r.indexOf(b.blockName)===-1&&b.type==="shortcode"&&eu(b.tag).some(E=>(0,nr.regexp)(E).test(e)));if(!o)return[e];let c=eu(o.tag).find(b=>(0,nr.regexp)(b).test(e)),h,_=t;if(h=(0,nr.next)(c,e,t)){t=h.index+h.content.length;let b=e.substr(0,h.index),E=e.substr(t);if(!h.shortcode.content?.includes("<")&&!(ru.test(b)&&tu.test(E)))return tr(e,t);if(o.isMatch&&!o.isMatch(h.shortcode.attrs))return tr(e,_,[...r,o.blockName]);let L=[];if(typeof o.transform=="function")L=[].concat(o.transform(h.shortcode.attrs,h)),L=L.map(N=>(N.originalContent=h.shortcode.content,Pe(N,M(N.name))));else{let N=Object.fromEntries(Object.entries(o.attributes).filter(([,Ce])=>Ce.shortcode).map(([Ce,ur])=>[Ce,ur.shortcode(h.shortcode.attrs,h)])),j=M(o.blockName);if(!j)return[e];let I={...j,attributes:o.attributes},G=U(o.blockName,ie(I,h.shortcode.content,N));G.originalContent=h.shortcode.content,G=Pe(G,I),L=[G]}return[...tr(b.replace(ru,"")),...L,...tr(E.replace(tu,""))]}return[e]}var Yr=tr;var ar=B(Z(),1);function yd(e,t){let a={phrasingContentSchema:(0,ar.getPhrasingContentSchema)(t),isPaste:t==="paste"},o=e.map(({isMatch:_,blockName:b,schema:E})=>{let L=se(b,"anchor");return E=typeof E=="function"?E(a):E,!L&&!_?E:E?Object.fromEntries(Object.entries(E).map(([N,j])=>{let I=j.attributes||[];return L&&(I=[...I,"id"]),[N,{...j,attributes:I,isMatch:_||void 0}]})):{}});function s(_,b,E){switch(E){case"children":return _==="*"||b==="*"?"*":{..._,...b};case"attributes":case"require":return[..._||[],...b||[]];case"isMatch":return!_||!b?void 0:(...L)=>_(...L)||b(...L)}}function c(_,b){for(let E in b)_[E]=_[E]?s(_[E],b[E],E):{...b[E]};return _}function h(_,b){for(let E in b)_[E]=_[E]?c(_[E],b[E]):{...b[E]};return _}return o.reduce(h,{})}function Xr(e){return yd(Ur(),e)}function nu(e){if(!/<(?!br[ />])/i.test(e))return!0;let t=document.implementation.createHTMLDocument("");if(t.body.innerHTML=e,t.body.children.length!==1)return!1;let r=t.body.children.item(0),a=r.getElementsByTagName("*");for(let o=0;o<a.length;o++)if(a.item(o).tagName!=="BR")return!1;return r.tagName==="SPAN"}function au(e,t,r,a){Array.from(e).forEach(o=>{au(o.childNodes,t,r,a),t.forEach(s=>{r.contains(o)&&s(o,r,a)})})}function le(e,t=[],r){let a=document.implementation.createHTMLDocument("");return a.body.innerHTML=e,au(a.body.childNodes,t,a,r),a.body.innerHTML}function qe(e,t){let r=e[`${t}Sibling`];if(r&&(0,ar.isPhrasingContent)(r))return r;let{parentNode:a}=e;if(!(!a||!(0,ar.isPhrasingContent)(a)))return qe(a,t)}var Re=B(Z(),1);var ou=B(Z(),1);function nn(e){e.nodeType===e.COMMENT_NODE&&(0,ou.remove)(e)}var uu=B(Z(),1);function wd(e,t){if((0,uu.isTextContent)(e))return!0;if(!t)return!1;let r=e.nodeName.toLowerCase();return[["ul","li","ol"],["h1","h2","h3","h4","h5","h6"]].some(o=>[r,t].filter(s=>!o.includes(s)).length===0)}function iu(e,t){return e.every(r=>wd(r,t)&&iu(Array.from(r.children),t))}function kd(e){return e.nodeName==="BR"&&e.previousSibling&&e.previousSibling.nodeName==="BR"}function su(e,t){let r=document.implementation.createHTMLDocument("");r.body.innerHTML=e;let a=Array.from(r.body.children);return!a.some(kd)&&iu(a,t)}var _e=B(Z(),1);function an(e,t){if(e.nodeName==="SPAN"&&e.style){let{fontWeight:r,fontStyle:a,textDecorationLine:o,textDecoration:s,verticalAlign:c}=e.style;(r==="bold"||r==="700")&&(0,_e.wrap)(t.createElement("strong"),e),a==="italic"&&(0,_e.wrap)(t.createElement("em"),e),(o==="line-through"||s.includes("line-through"))&&(0,_e.wrap)(t.createElement("s"),e),c==="super"?(0,_e.wrap)(t.createElement("sup"),e):c==="sub"&&(0,_e.wrap)(t.createElement("sub"),e)}else e.nodeName==="B"?e=(0,_e.replaceTag)(e,"strong"):e.nodeName==="I"?e=(0,_e.replaceTag)(e,"em"):e.nodeName==="A"&&(e.target&&e.target.toLowerCase()==="_blank"?e.rel="noreferrer noopener":(e.removeAttribute("target"),e.removeAttribute("rel")),e.name&&!e.id&&(e.id=e.name),e.id&&!e.ownerDocument.querySelector(`[href="#${e.id}"]`)&&e.removeAttribute("id"))}function on(e){e.nodeName!=="SCRIPT"&&e.nodeName!=="NOSCRIPT"&&e.nodeName!=="TEMPLATE"&&e.nodeName!=="STYLE"||e.parentNode.removeChild(e)}function Zr(e){if(e.nodeType!==e.ELEMENT_NODE)return;let t=e.getAttribute("style");if(!t||!t.includes("mso-list"))return;t.split(";").reduce((a,o)=>{let[s,c]=o.split(":");return s&&c&&(a[s.trim().toLowerCase()]=c.trim().toLowerCase()),a},{})["mso-list"]==="ignore"&&e.remove()}function un(e){return e.nodeName==="OL"||e.nodeName==="UL"}function du(e,t){if(e.nodeName!=="P")return;let r=e.getAttribute("style");if(!r||!r.includes("mso-list"))return;let a=e.previousElementSibling;if(!a||!un(a)){let E=e.textContent.trim().slice(0,1),L=/[1iIaA]/.test(E),N=t.createElement(L?"ol":"ul");L&&N.setAttribute("type",E),e.parentNode.insertBefore(N,e)}let o=e.previousElementSibling,s=o.nodeName,c=t.createElement("li"),h=o;c.innerHTML=le(e.innerHTML,[Zr]);let _=/mso-list\s*:[^;]+level([0-9]+)/i.exec(r),b=_&&parseInt(_[1],10)-1||0;for(;b--;)h=h.lastChild||h,un(h)&&(h=h.lastChild||h);un(h)||(h=h.appendChild(t.createElement(s))),h.appendChild(c),e.parentNode.removeChild(e)}var fu=B(lu(),1);function pu(e){if(e.nodeName==="IMG"){if(e.src.indexOf("file:")===0&&(e.src=""),e.src.indexOf("data:")===0){let[t,r]=e.src.split(","),[a]=t.slice(5).split(";");if(!r||!a){e.src="";return}let o;try{o=atob(r)}catch{e.src="";return}let s=new Uint8Array(o.length);for(let _=0;_<s.length;_++)s[_]=o.charCodeAt(_);let c=a.replace("/","."),h=new window.File([s],c,{type:a});e.src=(0,fu.createBlobURL)(h)}(e.height===1||e.width===1)&&e.parentNode.removeChild(e)}}function mu(e){e.nodeName==="DIV"&&(e.innerHTML=Te(e.innerHTML))}var bu=B(gu(),1),vd=new bu.default.Converter({noHeaderId:!0,tables:!0,literalMidWordUnderscores:!0,omitExtraWLInCodeBlocks:!0,simpleLineBreaks:!0,strikethrough:!0});function Ed(e){return e.replace(/((?:^|\n)```)([^\n`]+)(```(?:$|\n))/,(t,r,a,o)=>`${r}
${a}
${o}`)}function Td(e){return e.replace(/(^|\n)â€¢( +)/g,"$1*$2")}function _u(e){return vd.makeHtml(Ed(Td(e)))}function yu(e){if(e.nodeName==="IFRAME"){let t=e.ownerDocument.createTextNode(e.src);e.parentNode.replaceChild(t,e)}}var wu=B(Z(),1);function sn(e){!e.id||e.id.indexOf("docs-internal-guid-")!==0||(e.tagName==="B"?(0,wu.unwrap)(e):e.removeAttribute("id"))}function Cd(e){return e===" "||e==="\r"||e===`
`||e==="	"}function dn(e){if(e.nodeType!==e.TEXT_NODE)return;let t=e;for(;t=t.parentNode;)if(t.nodeType===t.ELEMENT_NODE&&t.nodeName==="PRE")return;let r=e.data.replace(/[ \r\n\t]+/g," ");if(r[0]===" "){let a=qe(e,"previous");(!a||a.nodeName==="BR"||a.textContent.slice(-1)===" ")&&(r=r.slice(1))}if(r[r.length-1]===" "){let a=qe(e,"next");(!a||a.nodeName==="BR"||a.nodeType===a.TEXT_NODE&&Cd(a.textContent[0]))&&(r=r.slice(0,-1))}r?e.data=r:e.parentNode.removeChild(e)}function cn(e){e.nodeName==="BR"&&(qe(e,"next")||e.parentNode.removeChild(e))}function ku(e){e.nodeName==="P"&&(e.hasChildNodes()||e.parentNode.removeChild(e))}function vu(e){if(e.nodeName!=="SPAN"||e.getAttribute("data-stringify-type")!=="paragraph-break")return;let{parentNode:t}=e;t.insertBefore(e.ownerDocument.createElement("br"),e),t.insertBefore(e.ownerDocument.createElement("br"),e),t.removeChild(e)}function Eu(e){let t=/[\p{L}\s]+/gu,r;for(;r=t.exec(e);){if(e[r.index-1]==="{")continue;let o=r[0];if(e[r.index-1]==="\\"&&(o=o.replace(/^[a-zA-Z]+/,"")),!(o.length<6))return!1}return!!(/\\[a-zA-Z]+\s*\{/g.test(e)||[o=>o.includes("^")&&!o.startsWith("^"),o=>["=","+","-","/","*"].some(s=>o.includes(s)),o=>/\\[a-zA-Z]+/g.test(o)].filter(o=>o(e)).length>=2)}function Tu(e){if(e.nodeType===e.ELEMENT_NODE&&e.tagName==="P"&&e.getAttribute("role")==="heading"&&e.hasAttribute("aria-level")){let t=parseInt(e.getAttribute("aria-level"),10);if(t>=1&&t<=6){let r=`H${t}`,a=e.ownerDocument.createElement(r);for(Array.from(e.attributes).forEach(o=>{o.name!=="role"&&o.name!=="aria-level"&&a.setAttribute(o.name,o.value)});e.firstChild;)a.appendChild(e.firstChild);e.parentNode.replaceChild(a,e)}}}var Jr=(...e)=>window?.console?.log?.(...e);function Cu(e){return e=le(e,[on,sn,Zr,an,nn]),e=(0,Re.removeInvalidHTML)(e,(0,Re.getPhrasingContentSchema)("paste"),{inline:!0}),e=le(e,[dn,cn]),Jr(`Processed inline HTML:

`,e),e}function et({HTML:e="",plainText:t="",mode:r="AUTO",tagName:a}){if(Jr(`Received HTML (pasteHandler):

`,e),Jr(`Received plain text (pasteHandler):

`,t),e=e.replace(/<meta[^>]+>/g,""),e=e.replace(/^\s*<html[^>]*>\s*<body[^>]*>(?:\s*<!--\s*StartFragment\s*-->)?/i,""),e=e.replace(/(?:<!--\s*EndFragment\s*-->\s*)?<\/body>\s*<\/html>\s*$/i,""),r!=="INLINE"){let E=e||t;if(E.indexOf("<!-- wp:")!==-1){let L=Ee(E);if(!(L.length===1&&L[0].name==="core/freeform"))return L}}String.prototype.normalize&&(e=e.normalize()),e=le(e,[vu]);let o=t&&(!e||nu(e));if(o&&Eu(t))return[U("core/math",{latex:t})];o&&(e=t,/^\s+$/.test(t)||(e=_u(e)));let s=Yr(e),c=s.length>1;if(o&&!c&&r==="AUTO"&&t.indexOf(`
`)===-1&&t.indexOf("<p>")!==0&&e.indexOf("<p>")===0&&(r="INLINE"),r==="INLINE"||r==="AUTO"&&!c&&su(e,a))return Cu(e);let h=(0,Re.getPhrasingContentSchema)("paste"),_=Xr("paste"),b=s.map(E=>{if(typeof E!="string")return E;let L=[sn,du,on,Gr,pu,an,$r,nn,yu,Wr,Kr(),mu,Tu],N={..._,...h};return E=le(E,L,_),E=(0,Re.removeInvalidHTML)(E,N),E=Te(E),E=le(E,[dn,cn,ku],_),Jr(`Processed HTML piece:

`,E),Fr(E,et)}).flat().filter(Boolean);if(r==="AUTO"&&b.length===1&&se(b[0].name,"__unstablePasteTextInline",!1)){let E=/^[\n]+|[\n]+$/g,L=t.replace(E,"");if(L!==""&&L.indexOf(`
`)===-1)return(0,Re.removeInvalidHTML)(Xe(b[0]),h).replace(E,"")}return b}function Su(e){return(0,Bu.default)("wp.blocks.getPhrasingContentSchema",{since:"5.6",alternative:"wp.dom.getPhrasingContentSchema"}),(0,Au.getPhrasingContentSchema)(e)}function ln({HTML:e=""}){if(e.indexOf("<!-- wp:")!==-1){let a=Ee(e);if(!(a.length===1&&a[0].name==="core/freeform"))return a}let t=Yr(e),r=Xr();return t.map(a=>{if(typeof a!="string")return a;let o=[Gr,$r,Wr,Kr({raw:!0})];return a=le(a,o,r),a=Te(a,{raw:!0}),Fr(a,ln)}).flat().filter(Boolean)}var or=B(Be(),1);function Nu(){return(0,or.select)(P).getCategories()}function Lu(e){(0,or.dispatch)(P).setCategories(e)}function Pu(e,t){(0,or.dispatch)(P).updateCategory(e,t)}var Ru=B(De(),1);function fn(e=[],t=[]){return e.length===t.length&&t.every(([r,,a],o)=>{let s=e[o];return r===s.name&&fn(s.innerBlocks,a)})}var Bd=e=>e?.source==="html",Ad=e=>e?.source==="query";function Ou(e,t){return t?Object.fromEntries(Object.entries(t).map(([r,a])=>[r,Sd(e[r],a)])):{}}function Sd(e,t){return Bd(e)&&Array.isArray(t)?(0,Ru.renderToString)(t):Ad(e)&&t?t.map(r=>Ou(e.query,r)):t}function rt(e=[],t){return t?t.map(([r,a,o],s)=>{let c=e[s];if(c&&c.name===r){let L=rt(c.innerBlocks,o);return{...c,innerBlocks:L}}let h=M(r),_=Ou(h?.attributes??{},a),[b,E]=jr(r,_);return U(b,E,rt([],o))}):e}var Nd=Symbol("fields"),Ld=Symbol("form"),Du={};Gn(Du,{isContentBlock:wa,fieldsKey:Nd,formKey:Ld,parseRawBlock:Hr});var Mu=B(J(),1);function Pd(e){return(0,Mu.default)("wp.blocks.withBlockContentContext",{since:"6.1"}),e}return Hu(Rd);})();
/*! Bundled license information:

react-is/cjs/react-is.production.min.js:
  (**
   * @license React
   * react-is.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

showdown/dist/showdown.js:
  (*! showdown v 1.9.1 - 02-11-2019 *)

is-plain-object/dist/is-plain-object.mjs:
  (*!
   * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
   *
   * Copyright (c) 2014-2017, Jon Schlinkert.
   * Released under the MIT License.
   *)
*/
                                                                                                                                                                                                                                                                                                                                                                                                                                           dist/commands.js                                                                                    0000644                 00000457322 15212563770 0007673 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;
(wp ||= {}).commands = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // vendor-external:react
  var require_react = __commonJS({
    "vendor-external:react"(exports, module) {
      module.exports = window.React;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // vendor-external:react-dom
  var require_react_dom = __commonJS({
    "vendor-external:react-dom"(exports, module) {
      module.exports = window.ReactDOM;
    }
  });

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // package-external:@wordpress/components
  var require_components = __commonJS({
    "package-external:@wordpress/components"(exports, module) {
      module.exports = window.wp.components;
    }
  });

  // package-external:@wordpress/keyboard-shortcuts
  var require_keyboard_shortcuts = __commonJS({
    "package-external:@wordpress/keyboard-shortcuts"(exports, module) {
      module.exports = window.wp.keyboardShortcuts;
    }
  });

  // package-external:@wordpress/primitives
  var require_primitives = __commonJS({
    "package-external:@wordpress/primitives"(exports, module) {
      module.exports = window.wp.primitives;
    }
  });

  // package-external:@wordpress/private-apis
  var require_private_apis = __commonJS({
    "package-external:@wordpress/private-apis"(exports, module) {
      module.exports = window.wp.privateApis;
    }
  });

  // packages/commands/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    CommandMenu: () => CommandMenu,
    privateApis: () => privateApis,
    store: () => store,
    useCommand: () => useCommand,
    useCommandLoader: () => useCommandLoader,
    useCommands: () => useCommands
  });

  // node_modules/cmdk/dist/chunk-NZJY6EH4.mjs
  var U = 1;
  var Y = 0.9;
  var H = 0.8;
  var J = 0.17;
  var p = 0.1;
  var u = 0.999;
  var $ = 0.9999;
  var k = 0.99;
  var m = /[\\\/_+.#"@\[\(\{&]/;
  var B = /[\\\/_+.#"@\[\(\{&]/g;
  var K = /[\s-]/;
  var X = /[\s-]/g;
  function G(_, C, h, P2, A, f, O) {
    if (f === C.length) return A === _.length ? U : k;
    var T2 = `${A},${f}`;
    if (O[T2] !== void 0) return O[T2];
    for (var L2 = P2.charAt(f), c = h.indexOf(L2, A), S = 0, E, N2, R, M; c >= 0; ) E = G(_, C, h, P2, c + 1, f + 1, O), E > S && (c === A ? E *= U : m.test(_.charAt(c - 1)) ? (E *= H, R = _.slice(A, c - 1).match(B), R && A > 0 && (E *= Math.pow(u, R.length))) : K.test(_.charAt(c - 1)) ? (E *= Y, M = _.slice(A, c - 1).match(X), M && A > 0 && (E *= Math.pow(u, M.length))) : (E *= J, A > 0 && (E *= Math.pow(u, c - A))), _.charAt(c) !== C.charAt(f) && (E *= $)), (E < p && h.charAt(c - 1) === P2.charAt(f + 1) || P2.charAt(f + 1) === P2.charAt(f) && h.charAt(c - 1) !== P2.charAt(f)) && (N2 = G(_, C, h, P2, c + 1, f + 2, O), N2 * p > E && (E = N2 * p)), E > S && (S = E), c = h.indexOf(L2, c + 1);
    return O[T2] = S, S;
  }
  function D(_) {
    return _.toLowerCase().replace(X, " ");
  }
  function W(_, C, h) {
    return _ = h && h.length > 0 ? `${_ + " " + h.join(" ")}` : _, G(_, C, D(_), D(C), 0, 0, {});
  }

  // node_modules/@radix-ui/react-dialog/dist/index.mjs
  var React37 = __toESM(require_react(), 1);

  // node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.mjs
  var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
  function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
    return function handleEvent(event) {
      originalEventHandler?.(event);
      if (checkForDefaultPrevented === false || !event.defaultPrevented) {
        return ourEventHandler?.(event);
      }
    };
  }

  // node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
  var React = __toESM(require_react(), 1);
  function setRef(ref, value) {
    if (typeof ref === "function") {
      return ref(value);
    } else if (ref !== null && ref !== void 0) {
      ref.current = value;
    }
  }
  function composeRefs(...refs) {
    return (node) => {
      let hasCleanup = false;
      const cleanups = refs.map((ref) => {
        const cleanup = setRef(ref, node);
        if (!hasCleanup && typeof cleanup == "function") {
          hasCleanup = true;
        }
        return cleanup;
      });
      if (hasCleanup) {
        return () => {
          for (let i = 0; i < cleanups.length; i++) {
            const cleanup = cleanups[i];
            if (typeof cleanup == "function") {
              cleanup();
            } else {
              setRef(refs[i], null);
            }
          }
        };
      }
    };
  }
  function useComposedRefs(...refs) {
    return React.useCallback(composeRefs(...refs), refs);
  }

  // node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.mjs
  var React2 = __toESM(require_react(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  function createContext2(rootComponentName, defaultContext) {
    const Context = React2.createContext(defaultContext);
    const Provider = (props) => {
      const { children, ...context2 } = props;
      const value = React2.useMemo(() => context2, Object.values(context2));
      return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
    };
    Provider.displayName = rootComponentName + "Provider";
    function useContext22(consumerName) {
      const context2 = React2.useContext(Context);
      if (context2) return context2;
      if (defaultContext !== void 0) return defaultContext;
      throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
    }
    return [Provider, useContext22];
  }
  function createContextScope(scopeName, createContextScopeDeps = []) {
    let defaultContexts = [];
    function createContext32(rootComponentName, defaultContext) {
      const BaseContext = React2.createContext(defaultContext);
      const index = defaultContexts.length;
      defaultContexts = [...defaultContexts, defaultContext];
      const Provider = (props) => {
        const { scope, children, ...context2 } = props;
        const Context = scope?.[scopeName]?.[index] || BaseContext;
        const value = React2.useMemo(() => context2, Object.values(context2));
        return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
      };
      Provider.displayName = rootComponentName + "Provider";
      function useContext22(consumerName, scope) {
        const Context = scope?.[scopeName]?.[index] || BaseContext;
        const context2 = React2.useContext(Context);
        if (context2) return context2;
        if (defaultContext !== void 0) return defaultContext;
        throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
      }
      return [Provider, useContext22];
    }
    const createScope = () => {
      const scopeContexts = defaultContexts.map((defaultContext) => {
        return React2.createContext(defaultContext);
      });
      return function useScope(scope) {
        const contexts = scope?.[scopeName] || scopeContexts;
        return React2.useMemo(
          () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
          [scope, contexts]
        );
      };
    };
    createScope.scopeName = scopeName;
    return [createContext32, composeContextScopes(createScope, ...createContextScopeDeps)];
  }
  function composeContextScopes(...scopes) {
    const baseScope = scopes[0];
    if (scopes.length === 1) return baseScope;
    const createScope = () => {
      const scopeHooks = scopes.map((createScope2) => ({
        useScope: createScope2(),
        scopeName: createScope2.scopeName
      }));
      return function useComposedScopes(overrideScopes) {
        const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
          const scopeProps = useScope(overrideScopes);
          const currentScope = scopeProps[`__scope${scopeName}`];
          return { ...nextScopes2, ...currentScope };
        }, {});
        return React2.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
      };
    };
    createScope.scopeName = baseScope.scopeName;
    return createScope;
  }

  // node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/dist/index.mjs
  var React4 = __toESM(require_react(), 1);

  // node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
  var React3 = __toESM(require_react(), 1);
  var useLayoutEffect2 = globalThis?.document ? React3.useLayoutEffect : () => {
  };

  // node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/dist/index.mjs
  var useReactId = React4[" useId ".trim().toString()] || (() => void 0);
  var count = 0;
  function useId(deterministicId) {
    const [id, setId] = React4.useState(useReactId());
    useLayoutEffect2(() => {
      if (!deterministicId) setId((reactId) => reactId ?? String(count++));
    }, [deterministicId]);
    return deterministicId || (id ? `radix-${id}` : "");
  }

  // node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
  var React5 = __toESM(require_react(), 1);
  var React22 = __toESM(require_react(), 1);
  var useInsertionEffect = React5[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
  function useControllableState({
    prop,
    defaultProp,
    onChange = () => {
    },
    caller
  }) {
    const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
      defaultProp,
      onChange
    });
    const isControlled = prop !== void 0;
    const value = isControlled ? prop : uncontrolledProp;
    if (true) {
      const isControlledRef = React5.useRef(prop !== void 0);
      React5.useEffect(() => {
        const wasControlled = isControlledRef.current;
        if (wasControlled !== isControlled) {
          const from = wasControlled ? "controlled" : "uncontrolled";
          const to = isControlled ? "controlled" : "uncontrolled";
          console.warn(
            `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
          );
        }
        isControlledRef.current = isControlled;
      }, [isControlled, caller]);
    }
    const setValue = React5.useCallback(
      (nextValue) => {
        if (isControlled) {
          const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
          if (value2 !== prop) {
            onChangeRef.current?.(value2);
          }
        } else {
          setUncontrolledProp(nextValue);
        }
      },
      [isControlled, prop, setUncontrolledProp, onChangeRef]
    );
    return [value, setValue];
  }
  function useUncontrolledState({
    defaultProp,
    onChange
  }) {
    const [value, setValue] = React5.useState(defaultProp);
    const prevValueRef = React5.useRef(value);
    const onChangeRef = React5.useRef(onChange);
    useInsertionEffect(() => {
      onChangeRef.current = onChange;
    }, [onChange]);
    React5.useEffect(() => {
      if (prevValueRef.current !== value) {
        onChangeRef.current?.(value);
        prevValueRef.current = value;
      }
    }, [value, prevValueRef]);
    return [value, setValue, onChangeRef];
  }
  function isFunction(value) {
    return typeof value === "function";
  }

  // node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
  var React11 = __toESM(require_react(), 1);

  // node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/primitive/dist/index.mjs
  var canUseDOM2 = !!(typeof window !== "undefined" && window.document && window.document.createElement);
  function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
    return function handleEvent(event) {
      originalEventHandler?.(event);
      if (checkForDefaultPrevented === false || !event.defaultPrevented) {
        return ourEventHandler?.(event);
      }
    };
  }

  // node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-primitive/dist/index.mjs
  var React8 = __toESM(require_react(), 1);
  var ReactDOM = __toESM(require_react_dom(), 1);

  // node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-slot/dist/index.mjs
  var React7 = __toESM(require_react(), 1);

  // node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
  var React6 = __toESM(require_react(), 1);
  function setRef2(ref, value) {
    if (typeof ref === "function") {
      return ref(value);
    } else if (ref !== null && ref !== void 0) {
      ref.current = value;
    }
  }
  function composeRefs2(...refs) {
    return (node) => {
      let hasCleanup = false;
      const cleanups = refs.map((ref) => {
        const cleanup = setRef2(ref, node);
        if (!hasCleanup && typeof cleanup == "function") {
          hasCleanup = true;
        }
        return cleanup;
      });
      if (hasCleanup) {
        return () => {
          for (let i = 0; i < cleanups.length; i++) {
            const cleanup = cleanups[i];
            if (typeof cleanup == "function") {
              cleanup();
            } else {
              setRef2(refs[i], null);
            }
          }
        };
      }
    };
  }
  function useComposedRefs2(...refs) {
    return React6.useCallback(composeRefs2(...refs), refs);
  }

  // node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-slot/dist/index.mjs
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  // @__NO_SIDE_EFFECTS__
  function createSlot(ownerName) {
    const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
    const Slot2 = React7.forwardRef((props, forwardedRef) => {
      const { children, ...slotProps } = props;
      const childrenArray = React7.Children.toArray(children);
      const slottable = childrenArray.find(isSlottable);
      if (slottable) {
        const newElement = slottable.props.children;
        const newChildren = childrenArray.map((child) => {
          if (child === slottable) {
            if (React7.Children.count(newElement) > 1) return React7.Children.only(null);
            return React7.isValidElement(newElement) ? newElement.props.children : null;
          } else {
            return child;
          }
        });
        return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React7.isValidElement(newElement) ? React7.cloneElement(newElement, void 0, newChildren) : null });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
    });
    Slot2.displayName = `${ownerName}.Slot`;
    return Slot2;
  }
  // @__NO_SIDE_EFFECTS__
  function createSlotClone(ownerName) {
    const SlotClone = React7.forwardRef((props, forwardedRef) => {
      const { children, ...slotProps } = props;
      if (React7.isValidElement(children)) {
        const childrenRef = getElementRef(children);
        const props2 = mergeProps(slotProps, children.props);
        if (children.type !== React7.Fragment) {
          props2.ref = forwardedRef ? composeRefs2(forwardedRef, childrenRef) : childrenRef;
        }
        return React7.cloneElement(children, props2);
      }
      return React7.Children.count(children) > 1 ? React7.Children.only(null) : null;
    });
    SlotClone.displayName = `${ownerName}.SlotClone`;
    return SlotClone;
  }
  var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
  function isSlottable(child) {
    return React7.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
  }
  function mergeProps(slotProps, childProps) {
    const overrideProps = { ...childProps };
    for (const propName in childProps) {
      const slotPropValue = slotProps[propName];
      const childPropValue = childProps[propName];
      const isHandler = /^on[A-Z]/.test(propName);
      if (isHandler) {
        if (slotPropValue && childPropValue) {
          overrideProps[propName] = (...args) => {
            const result = childPropValue(...args);
            slotPropValue(...args);
            return result;
          };
        } else if (slotPropValue) {
          overrideProps[propName] = slotPropValue;
        }
      } else if (propName === "style") {
        overrideProps[propName] = { ...slotPropValue, ...childPropValue };
      } else if (propName === "className") {
        overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
      }
    }
    return { ...slotProps, ...overrideProps };
  }
  function getElementRef(element) {
    let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
    let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
    if (mayWarn) {
      return element.ref;
    }
    getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
    mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
    if (mayWarn) {
      return element.props.ref;
    }
    return element.props.ref || element.ref;
  }

  // node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-primitive/dist/index.mjs
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
  var NODES = [
    "a",
    "button",
    "div",
    "form",
    "h2",
    "h3",
    "img",
    "input",
    "label",
    "li",
    "nav",
    "ol",
    "p",
    "select",
    "span",
    "svg",
    "ul"
  ];
  var Primitive = NODES.reduce((primitive, node) => {
    const Slot2 = createSlot(`Primitive.${node}`);
    const Node2 = React8.forwardRef((props, forwardedRef) => {
      const { asChild, ...primitiveProps } = props;
      const Comp = asChild ? Slot2 : node;
      if (typeof window !== "undefined") {
        window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
    });
    Node2.displayName = `Primitive.${node}`;
    return { ...primitive, [node]: Node2 };
  }, {});
  function dispatchDiscreteCustomEvent(target, event) {
    if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
  }

  // node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
  var React9 = __toESM(require_react(), 1);
  function useCallbackRef(callback) {
    const callbackRef = React9.useRef(callback);
    React9.useEffect(() => {
      callbackRef.current = callback;
    });
    return React9.useMemo(() => (...args) => callbackRef.current?.(...args), []);
  }

  // node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
  var React10 = __toESM(require_react(), 1);
  function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
    const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
    React10.useEffect(() => {
      const handleKeyDown = (event) => {
        if (event.key === "Escape") {
          onEscapeKeyDown(event);
        }
      };
      ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
      return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
    }, [onEscapeKeyDown, ownerDocument]);
  }

  // node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
  var DISMISSABLE_LAYER_NAME = "DismissableLayer";
  var CONTEXT_UPDATE = "dismissableLayer.update";
  var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
  var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
  var originalBodyPointerEvents;
  var DismissableLayerContext = React11.createContext({
    layers: /* @__PURE__ */ new Set(),
    layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
    branches: /* @__PURE__ */ new Set()
  });
  var DismissableLayer = React11.forwardRef(
    (props, forwardedRef) => {
      const {
        disableOutsidePointerEvents = false,
        onEscapeKeyDown,
        onPointerDownOutside,
        onFocusOutside,
        onInteractOutside,
        onDismiss,
        ...layerProps
      } = props;
      const context2 = React11.useContext(DismissableLayerContext);
      const [node, setNode] = React11.useState(null);
      const ownerDocument = node?.ownerDocument ?? globalThis?.document;
      const [, force] = React11.useState({});
      const composedRefs = useComposedRefs2(forwardedRef, (node2) => setNode(node2));
      const layers = Array.from(context2.layers);
      const [highestLayerWithOutsidePointerEventsDisabled] = [...context2.layersWithOutsidePointerEventsDisabled].slice(-1);
      const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
      const index = node ? layers.indexOf(node) : -1;
      const isBodyPointerEventsDisabled = context2.layersWithOutsidePointerEventsDisabled.size > 0;
      const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
      const pointerDownOutside = usePointerDownOutside((event) => {
        const target = event.target;
        const isPointerDownOnBranch = [...context2.branches].some((branch) => branch.contains(target));
        if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
        onPointerDownOutside?.(event);
        onInteractOutside?.(event);
        if (!event.defaultPrevented) onDismiss?.();
      }, ownerDocument);
      const focusOutside = useFocusOutside((event) => {
        const target = event.target;
        const isFocusInBranch = [...context2.branches].some((branch) => branch.contains(target));
        if (isFocusInBranch) return;
        onFocusOutside?.(event);
        onInteractOutside?.(event);
        if (!event.defaultPrevented) onDismiss?.();
      }, ownerDocument);
      useEscapeKeydown((event) => {
        const isHighestLayer = index === context2.layers.size - 1;
        if (!isHighestLayer) return;
        onEscapeKeyDown?.(event);
        if (!event.defaultPrevented && onDismiss) {
          event.preventDefault();
          onDismiss();
        }
      }, ownerDocument);
      React11.useEffect(() => {
        if (!node) return;
        if (disableOutsidePointerEvents) {
          if (context2.layersWithOutsidePointerEventsDisabled.size === 0) {
            originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
            ownerDocument.body.style.pointerEvents = "none";
          }
          context2.layersWithOutsidePointerEventsDisabled.add(node);
        }
        context2.layers.add(node);
        dispatchUpdate();
        return () => {
          if (disableOutsidePointerEvents && context2.layersWithOutsidePointerEventsDisabled.size === 1) {
            ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
          }
        };
      }, [node, ownerDocument, disableOutsidePointerEvents, context2]);
      React11.useEffect(() => {
        return () => {
          if (!node) return;
          context2.layers.delete(node);
          context2.layersWithOutsidePointerEventsDisabled.delete(node);
          dispatchUpdate();
        };
      }, [node, context2]);
      React11.useEffect(() => {
        const handleUpdate = () => force({});
        document.addEventListener(CONTEXT_UPDATE, handleUpdate);
        return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
      }, []);
      return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
        Primitive.div,
        {
          ...layerProps,
          ref: composedRefs,
          style: {
            pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
            ...props.style
          },
          onFocusCapture: composeEventHandlers2(props.onFocusCapture, focusOutside.onFocusCapture),
          onBlurCapture: composeEventHandlers2(props.onBlurCapture, focusOutside.onBlurCapture),
          onPointerDownCapture: composeEventHandlers2(
            props.onPointerDownCapture,
            pointerDownOutside.onPointerDownCapture
          )
        }
      );
    }
  );
  DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
  var BRANCH_NAME = "DismissableLayerBranch";
  var DismissableLayerBranch = React11.forwardRef((props, forwardedRef) => {
    const context2 = React11.useContext(DismissableLayerContext);
    const ref = React11.useRef(null);
    const composedRefs = useComposedRefs2(forwardedRef, ref);
    React11.useEffect(() => {
      const node = ref.current;
      if (node) {
        context2.branches.add(node);
        return () => {
          context2.branches.delete(node);
        };
      }
    }, [context2.branches]);
    return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Primitive.div, { ...props, ref: composedRefs });
  });
  DismissableLayerBranch.displayName = BRANCH_NAME;
  function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
    const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
    const isPointerInsideReactTreeRef = React11.useRef(false);
    const handleClickRef = React11.useRef(() => {
    });
    React11.useEffect(() => {
      const handlePointerDown = (event) => {
        if (event.target && !isPointerInsideReactTreeRef.current) {
          let handleAndDispatchPointerDownOutsideEvent2 = function() {
            handleAndDispatchCustomEvent(
              POINTER_DOWN_OUTSIDE,
              handlePointerDownOutside,
              eventDetail,
              { discrete: true }
            );
          };
          var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;
          const eventDetail = { originalEvent: event };
          if (event.pointerType === "touch") {
            ownerDocument.removeEventListener("click", handleClickRef.current);
            handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
            ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
          } else {
            handleAndDispatchPointerDownOutsideEvent2();
          }
        } else {
          ownerDocument.removeEventListener("click", handleClickRef.current);
        }
        isPointerInsideReactTreeRef.current = false;
      };
      const timerId = window.setTimeout(() => {
        ownerDocument.addEventListener("pointerdown", handlePointerDown);
      }, 0);
      return () => {
        window.clearTimeout(timerId);
        ownerDocument.removeEventListener("pointerdown", handlePointerDown);
        ownerDocument.removeEventListener("click", handleClickRef.current);
      };
    }, [ownerDocument, handlePointerDownOutside]);
    return {
      // ensures we check React component tree (not just DOM tree)
      onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
    };
  }
  function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
    const handleFocusOutside = useCallbackRef(onFocusOutside);
    const isFocusInsideReactTreeRef = React11.useRef(false);
    React11.useEffect(() => {
      const handleFocus = (event) => {
        if (event.target && !isFocusInsideReactTreeRef.current) {
          const eventDetail = { originalEvent: event };
          handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
            discrete: false
          });
        }
      };
      ownerDocument.addEventListener("focusin", handleFocus);
      return () => ownerDocument.removeEventListener("focusin", handleFocus);
    }, [ownerDocument, handleFocusOutside]);
    return {
      onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
      onBlurCapture: () => isFocusInsideReactTreeRef.current = false
    };
  }
  function dispatchUpdate() {
    const event = new CustomEvent(CONTEXT_UPDATE);
    document.dispatchEvent(event);
  }
  function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
    const target = detail.originalEvent.target;
    const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
    if (handler) target.addEventListener(name, handler, { once: true });
    if (discrete) {
      dispatchDiscreteCustomEvent(target, event);
    } else {
      target.dispatchEvent(event);
    }
  }

  // node_modules/@radix-ui/react-focus-scope/dist/index.mjs
  var React16 = __toESM(require_react(), 1);

  // node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
  var React12 = __toESM(require_react(), 1);
  function setRef3(ref, value) {
    if (typeof ref === "function") {
      return ref(value);
    } else if (ref !== null && ref !== void 0) {
      ref.current = value;
    }
  }
  function composeRefs3(...refs) {
    return (node) => {
      let hasCleanup = false;
      const cleanups = refs.map((ref) => {
        const cleanup = setRef3(ref, node);
        if (!hasCleanup && typeof cleanup == "function") {
          hasCleanup = true;
        }
        return cleanup;
      });
      if (hasCleanup) {
        return () => {
          for (let i = 0; i < cleanups.length; i++) {
            const cleanup = cleanups[i];
            if (typeof cleanup == "function") {
              cleanup();
            } else {
              setRef3(refs[i], null);
            }
          }
        };
      }
    };
  }
  function useComposedRefs3(...refs) {
    return React12.useCallback(composeRefs3(...refs), refs);
  }

  // node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-primitive/dist/index.mjs
  var React14 = __toESM(require_react(), 1);
  var ReactDOM2 = __toESM(require_react_dom(), 1);

  // node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-slot/dist/index.mjs
  var React13 = __toESM(require_react(), 1);
  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
  // @__NO_SIDE_EFFECTS__
  function createSlot2(ownerName) {
    const SlotClone = /* @__PURE__ */ createSlotClone2(ownerName);
    const Slot2 = React13.forwardRef((props, forwardedRef) => {
      const { children, ...slotProps } = props;
      const childrenArray = React13.Children.toArray(children);
      const slottable = childrenArray.find(isSlottable2);
      if (slottable) {
        const newElement = slottable.props.children;
        const newChildren = childrenArray.map((child) => {
          if (child === slottable) {
            if (React13.Children.count(newElement) > 1) return React13.Children.only(null);
            return React13.isValidElement(newElement) ? newElement.props.children : null;
          } else {
            return child;
          }
        });
        return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React13.isValidElement(newElement) ? React13.cloneElement(newElement, void 0, newChildren) : null });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
    });
    Slot2.displayName = `${ownerName}.Slot`;
    return Slot2;
  }
  // @__NO_SIDE_EFFECTS__
  function createSlotClone2(ownerName) {
    const SlotClone = React13.forwardRef((props, forwardedRef) => {
      const { children, ...slotProps } = props;
      if (React13.isValidElement(children)) {
        const childrenRef = getElementRef2(children);
        const props2 = mergeProps2(slotProps, children.props);
        if (children.type !== React13.Fragment) {
          props2.ref = forwardedRef ? composeRefs3(forwardedRef, childrenRef) : childrenRef;
        }
        return React13.cloneElement(children, props2);
      }
      return React13.Children.count(children) > 1 ? React13.Children.only(null) : null;
    });
    SlotClone.displayName = `${ownerName}.SlotClone`;
    return SlotClone;
  }
  var SLOTTABLE_IDENTIFIER2 = /* @__PURE__ */ Symbol("radix.slottable");
  function isSlottable2(child) {
    return React13.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
  }
  function mergeProps2(slotProps, childProps) {
    const overrideProps = { ...childProps };
    for (const propName in childProps) {
      const slotPropValue = slotProps[propName];
      const childPropValue = childProps[propName];
      const isHandler = /^on[A-Z]/.test(propName);
      if (isHandler) {
        if (slotPropValue && childPropValue) {
          overrideProps[propName] = (...args) => {
            const result = childPropValue(...args);
            slotPropValue(...args);
            return result;
          };
        } else if (slotPropValue) {
          overrideProps[propName] = slotPropValue;
        }
      } else if (propName === "style") {
        overrideProps[propName] = { ...slotPropValue, ...childPropValue };
      } else if (propName === "className") {
        overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
      }
    }
    return { ...slotProps, ...overrideProps };
  }
  function getElementRef2(element) {
    let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
    let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
    if (mayWarn) {
      return element.ref;
    }
    getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
    mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
    if (mayWarn) {
      return element.props.ref;
    }
    return element.props.ref || element.ref;
  }

  // node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-primitive/dist/index.mjs
  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
  var NODES2 = [
    "a",
    "button",
    "div",
    "form",
    "h2",
    "h3",
    "img",
    "input",
    "label",
    "li",
    "nav",
    "ol",
    "p",
    "select",
    "span",
    "svg",
    "ul"
  ];
  var Primitive2 = NODES2.reduce((primitive, node) => {
    const Slot2 = createSlot2(`Primitive.${node}`);
    const Node2 = React14.forwardRef((props, forwardedRef) => {
      const { asChild, ...primitiveProps } = props;
      const Comp = asChild ? Slot2 : node;
      if (typeof window !== "undefined") {
        window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
    });
    Node2.displayName = `Primitive.${node}`;
    return { ...primitive, [node]: Node2 };
  }, {});

  // node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
  var React15 = __toESM(require_react(), 1);
  function useCallbackRef2(callback) {
    const callbackRef = React15.useRef(callback);
    React15.useEffect(() => {
      callbackRef.current = callback;
    });
    return React15.useMemo(() => (...args) => callbackRef.current?.(...args), []);
  }

  // node_modules/@radix-ui/react-focus-scope/dist/index.mjs
  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
  var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
  var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
  var EVENT_OPTIONS = { bubbles: false, cancelable: true };
  var FOCUS_SCOPE_NAME = "FocusScope";
  var FocusScope = React16.forwardRef((props, forwardedRef) => {
    const {
      loop = false,
      trapped = false,
      onMountAutoFocus: onMountAutoFocusProp,
      onUnmountAutoFocus: onUnmountAutoFocusProp,
      ...scopeProps
    } = props;
    const [container, setContainer] = React16.useState(null);
    const onMountAutoFocus = useCallbackRef2(onMountAutoFocusProp);
    const onUnmountAutoFocus = useCallbackRef2(onUnmountAutoFocusProp);
    const lastFocusedElementRef = React16.useRef(null);
    const composedRefs = useComposedRefs3(forwardedRef, (node) => setContainer(node));
    const focusScope = React16.useRef({
      paused: false,
      pause() {
        this.paused = true;
      },
      resume() {
        this.paused = false;
      }
    }).current;
    React16.useEffect(() => {
      if (trapped) {
        let handleFocusIn2 = function(event) {
          if (focusScope.paused || !container) return;
          const target = event.target;
          if (container.contains(target)) {
            lastFocusedElementRef.current = target;
          } else {
            focus(lastFocusedElementRef.current, { select: true });
          }
        }, handleFocusOut2 = function(event) {
          if (focusScope.paused || !container) return;
          const relatedTarget = event.relatedTarget;
          if (relatedTarget === null) return;
          if (!container.contains(relatedTarget)) {
            focus(lastFocusedElementRef.current, { select: true });
          }
        }, handleMutations2 = function(mutations) {
          const focusedElement = document.activeElement;
          if (focusedElement !== document.body) return;
          for (const mutation of mutations) {
            if (mutation.removedNodes.length > 0) focus(container);
          }
        };
        var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;
        document.addEventListener("focusin", handleFocusIn2);
        document.addEventListener("focusout", handleFocusOut2);
        const mutationObserver = new MutationObserver(handleMutations2);
        if (container) mutationObserver.observe(container, { childList: true, subtree: true });
        return () => {
          document.removeEventListener("focusin", handleFocusIn2);
          document.removeEventListener("focusout", handleFocusOut2);
          mutationObserver.disconnect();
        };
      }
    }, [trapped, container, focusScope.paused]);
    React16.useEffect(() => {
      if (container) {
        focusScopesStack.add(focusScope);
        const previouslyFocusedElement = document.activeElement;
        const hasFocusedCandidate = container.contains(previouslyFocusedElement);
        if (!hasFocusedCandidate) {
          const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
          container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
          container.dispatchEvent(mountEvent);
          if (!mountEvent.defaultPrevented) {
            focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
            if (document.activeElement === previouslyFocusedElement) {
              focus(container);
            }
          }
        }
        return () => {
          container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
          setTimeout(() => {
            const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
            container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
            container.dispatchEvent(unmountEvent);
            if (!unmountEvent.defaultPrevented) {
              focus(previouslyFocusedElement ?? document.body, { select: true });
            }
            container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
            focusScopesStack.remove(focusScope);
          }, 0);
        };
      }
    }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
    const handleKeyDown = React16.useCallback(
      (event) => {
        if (!loop && !trapped) return;
        if (focusScope.paused) return;
        const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
        const focusedElement = document.activeElement;
        if (isTabKey && focusedElement) {
          const container2 = event.currentTarget;
          const [first, last] = getTabbableEdges(container2);
          const hasTabbableElementsInside = first && last;
          if (!hasTabbableElementsInside) {
            if (focusedElement === container2) event.preventDefault();
          } else {
            if (!event.shiftKey && focusedElement === last) {
              event.preventDefault();
              if (loop) focus(first, { select: true });
            } else if (event.shiftKey && focusedElement === first) {
              event.preventDefault();
              if (loop) focus(last, { select: true });
            }
          }
        }
      },
      [loop, trapped, focusScope.paused]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Primitive2.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
  });
  FocusScope.displayName = FOCUS_SCOPE_NAME;
  function focusFirst(candidates, { select = false } = {}) {
    const previouslyFocusedElement = document.activeElement;
    for (const candidate of candidates) {
      focus(candidate, { select });
      if (document.activeElement !== previouslyFocusedElement) return;
    }
  }
  function getTabbableEdges(container) {
    const candidates = getTabbableCandidates(container);
    const first = findVisible(candidates, container);
    const last = findVisible(candidates.reverse(), container);
    return [first, last];
  }
  function getTabbableCandidates(container) {
    const nodes = [];
    const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
      acceptNode: (node) => {
        const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
        if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
        return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
      }
    });
    while (walker.nextNode()) nodes.push(walker.currentNode);
    return nodes;
  }
  function findVisible(elements, container) {
    for (const element of elements) {
      if (!isHidden(element, { upTo: container })) return element;
    }
  }
  function isHidden(node, { upTo }) {
    if (getComputedStyle(node).visibility === "hidden") return true;
    while (node) {
      if (upTo !== void 0 && node === upTo) return false;
      if (getComputedStyle(node).display === "none") return true;
      node = node.parentElement;
    }
    return false;
  }
  function isSelectableInput(element) {
    return element instanceof HTMLInputElement && "select" in element;
  }
  function focus(element, { select = false } = {}) {
    if (element && element.focus) {
      const previouslyFocusedElement = document.activeElement;
      element.focus({ preventScroll: true });
      if (element !== previouslyFocusedElement && isSelectableInput(element) && select)
        element.select();
    }
  }
  var focusScopesStack = createFocusScopesStack();
  function createFocusScopesStack() {
    let stack = [];
    return {
      add(focusScope) {
        const activeFocusScope = stack[0];
        if (focusScope !== activeFocusScope) {
          activeFocusScope?.pause();
        }
        stack = arrayRemove(stack, focusScope);
        stack.unshift(focusScope);
      },
      remove(focusScope) {
        stack = arrayRemove(stack, focusScope);
        stack[0]?.resume();
      }
    };
  }
  function arrayRemove(array, item) {
    const updatedArray = [...array];
    const index = updatedArray.indexOf(item);
    if (index !== -1) {
      updatedArray.splice(index, 1);
    }
    return updatedArray;
  }
  function removeLinks(items) {
    return items.filter((item) => item.tagName !== "A");
  }

  // node_modules/@radix-ui/react-portal/dist/index.mjs
  var React21 = __toESM(require_react(), 1);
  var import_react_dom = __toESM(require_react_dom(), 1);

  // node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-primitive/dist/index.mjs
  var React19 = __toESM(require_react(), 1);
  var ReactDOM3 = __toESM(require_react_dom(), 1);

  // node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-slot/dist/index.mjs
  var React18 = __toESM(require_react(), 1);

  // node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
  var React17 = __toESM(require_react(), 1);
  function setRef4(ref, value) {
    if (typeof ref === "function") {
      return ref(value);
    } else if (ref !== null && ref !== void 0) {
      ref.current = value;
    }
  }
  function composeRefs4(...refs) {
    return (node) => {
      let hasCleanup = false;
      const cleanups = refs.map((ref) => {
        const cleanup = setRef4(ref, node);
        if (!hasCleanup && typeof cleanup == "function") {
          hasCleanup = true;
        }
        return cleanup;
      });
      if (hasCleanup) {
        return () => {
          for (let i = 0; i < cleanups.length; i++) {
            const cleanup = cleanups[i];
            if (typeof cleanup == "function") {
              cleanup();
            } else {
              setRef4(refs[i], null);
            }
          }
        };
      }
    };
  }

  // node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-slot/dist/index.mjs
  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
  // @__NO_SIDE_EFFECTS__
  function createSlot3(ownerName) {
    const SlotClone = /* @__PURE__ */ createSlotClone3(ownerName);
    const Slot2 = React18.forwardRef((props, forwardedRef) => {
      const { children, ...slotProps } = props;
      const childrenArray = React18.Children.toArray(children);
      const slottable = childrenArray.find(isSlottable3);
      if (slottable) {
        const newElement = slottable.props.children;
        const newChildren = childrenArray.map((child) => {
          if (child === slottable) {
            if (React18.Children.count(newElement) > 1) return React18.Children.only(null);
            return React18.isValidElement(newElement) ? newElement.props.children : null;
          } else {
            return child;
          }
        });
        return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React18.isValidElement(newElement) ? React18.cloneElement(newElement, void 0, newChildren) : null });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
    });
    Slot2.displayName = `${ownerName}.Slot`;
    return Slot2;
  }
  // @__NO_SIDE_EFFECTS__
  function createSlotClone3(ownerName) {
    const SlotClone = React18.forwardRef((props, forwardedRef) => {
      const { children, ...slotProps } = props;
      if (React18.isValidElement(children)) {
        const childrenRef = getElementRef3(children);
        const props2 = mergeProps3(slotProps, children.props);
        if (children.type !== React18.Fragment) {
          props2.ref = forwardedRef ? composeRefs4(forwardedRef, childrenRef) : childrenRef;
        }
        return React18.cloneElement(children, props2);
      }
      return React18.Children.count(children) > 1 ? React18.Children.only(null) : null;
    });
    SlotClone.displayName = `${ownerName}.SlotClone`;
    return SlotClone;
  }
  var SLOTTABLE_IDENTIFIER3 = /* @__PURE__ */ Symbol("radix.slottable");
  function isSlottable3(child) {
    return React18.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER3;
  }
  function mergeProps3(slotProps, childProps) {
    const overrideProps = { ...childProps };
    for (const propName in childProps) {
      const slotPropValue = slotProps[propName];
      const childPropValue = childProps[propName];
      const isHandler = /^on[A-Z]/.test(propName);
      if (isHandler) {
        if (slotPropValue && childPropValue) {
          overrideProps[propName] = (...args) => {
            const result = childPropValue(...args);
            slotPropValue(...args);
            return result;
          };
        } else if (slotPropValue) {
          overrideProps[propName] = slotPropValue;
        }
      } else if (propName === "style") {
        overrideProps[propName] = { ...slotPropValue, ...childPropValue };
      } else if (propName === "className") {
        overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
      }
    }
    return { ...slotProps, ...overrideProps };
  }
  function getElementRef3(element) {
    let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
    let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
    if (mayWarn) {
      return element.ref;
    }
    getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
    mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
    if (mayWarn) {
      return element.props.ref;
    }
    return element.props.ref || element.ref;
  }

  // node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-primitive/dist/index.mjs
  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
  var NODES3 = [
    "a",
    "button",
    "div",
    "form",
    "h2",
    "h3",
    "img",
    "input",
    "label",
    "li",
    "nav",
    "ol",
    "p",
    "select",
    "span",
    "svg",
    "ul"
  ];
  var Primitive3 = NODES3.reduce((primitive, node) => {
    const Slot2 = createSlot3(`Primitive.${node}`);
    const Node2 = React19.forwardRef((props, forwardedRef) => {
      const { asChild, ...primitiveProps } = props;
      const Comp = asChild ? Slot2 : node;
      if (typeof window !== "undefined") {
        window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
    });
    Node2.displayName = `Primitive.${node}`;
    return { ...primitive, [node]: Node2 };
  }, {});

  // node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
  var React20 = __toESM(require_react(), 1);
  var useLayoutEffect22 = globalThis?.document ? React20.useLayoutEffect : () => {
  };

  // node_modules/@radix-ui/react-portal/dist/index.mjs
  var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
  var PORTAL_NAME = "Portal";
  var Portal = React21.forwardRef((props, forwardedRef) => {
    const { container: containerProp, ...portalProps } = props;
    const [mounted, setMounted] = React21.useState(false);
    useLayoutEffect22(() => setMounted(true), []);
    const container = containerProp || mounted && globalThis?.document?.body;
    return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Primitive3.div, { ...portalProps, ref: forwardedRef }), container) : null;
  });
  Portal.displayName = PORTAL_NAME;

  // node_modules/@radix-ui/react-presence/dist/index.mjs
  var React25 = __toESM(require_react(), 1);

  // node_modules/@radix-ui/react-presence/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
  var React23 = __toESM(require_react(), 1);
  function setRef5(ref, value) {
    if (typeof ref === "function") {
      return ref(value);
    } else if (ref !== null && ref !== void 0) {
      ref.current = value;
    }
  }
  function composeRefs5(...refs) {
    return (node) => {
      let hasCleanup = false;
      const cleanups = refs.map((ref) => {
        const cleanup = setRef5(ref, node);
        if (!hasCleanup && typeof cleanup == "function") {
          hasCleanup = true;
        }
        return cleanup;
      });
      if (hasCleanup) {
        return () => {
          for (let i = 0; i < cleanups.length; i++) {
            const cleanup = cleanups[i];
            if (typeof cleanup == "function") {
              cleanup();
            } else {
              setRef5(refs[i], null);
            }
          }
        };
      }
    };
  }
  function useComposedRefs4(...refs) {
    return React23.useCallback(composeRefs5(...refs), refs);
  }

  // node_modules/@radix-ui/react-presence/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
  var React24 = __toESM(require_react(), 1);
  var useLayoutEffect23 = globalThis?.document ? React24.useLayoutEffect : () => {
  };

  // node_modules/@radix-ui/react-presence/dist/index.mjs
  var React26 = __toESM(require_react(), 1);
  function useStateMachine(initialState, machine) {
    return React26.useReducer((state, event) => {
      const nextState = machine[state][event];
      return nextState ?? state;
    }, initialState);
  }
  var Presence = (props) => {
    const { present, children } = props;
    const presence = usePresence(present);
    const child = typeof children === "function" ? children({ present: presence.isPresent }) : React25.Children.only(children);
    const ref = useComposedRefs4(presence.ref, getElementRef4(child));
    const forceMount = typeof children === "function";
    return forceMount || presence.isPresent ? React25.cloneElement(child, { ref }) : null;
  };
  Presence.displayName = "Presence";
  function usePresence(present) {
    const [node, setNode] = React25.useState();
    const stylesRef = React25.useRef(null);
    const prevPresentRef = React25.useRef(present);
    const prevAnimationNameRef = React25.useRef("none");
    const initialState = present ? "mounted" : "unmounted";
    const [state, send] = useStateMachine(initialState, {
      mounted: {
        UNMOUNT: "unmounted",
        ANIMATION_OUT: "unmountSuspended"
      },
      unmountSuspended: {
        MOUNT: "mounted",
        ANIMATION_END: "unmounted"
      },
      unmounted: {
        MOUNT: "mounted"
      }
    });
    React25.useEffect(() => {
      const currentAnimationName = getAnimationName(stylesRef.current);
      prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
    }, [state]);
    useLayoutEffect23(() => {
      const styles = stylesRef.current;
      const wasPresent = prevPresentRef.current;
      const hasPresentChanged = wasPresent !== present;
      if (hasPresentChanged) {
        const prevAnimationName = prevAnimationNameRef.current;
        const currentAnimationName = getAnimationName(styles);
        if (present) {
          send("MOUNT");
        } else if (currentAnimationName === "none" || styles?.display === "none") {
          send("UNMOUNT");
        } else {
          const isAnimating = prevAnimationName !== currentAnimationName;
          if (wasPresent && isAnimating) {
            send("ANIMATION_OUT");
          } else {
            send("UNMOUNT");
          }
        }
        prevPresentRef.current = present;
      }
    }, [present, send]);
    useLayoutEffect23(() => {
      if (node) {
        let timeoutId;
        const ownerWindow = node.ownerDocument.defaultView ?? window;
        const handleAnimationEnd = (event) => {
          const currentAnimationName = getAnimationName(stylesRef.current);
          const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
          if (event.target === node && isCurrentAnimation) {
            send("ANIMATION_END");
            if (!prevPresentRef.current) {
              const currentFillMode = node.style.animationFillMode;
              node.style.animationFillMode = "forwards";
              timeoutId = ownerWindow.setTimeout(() => {
                if (node.style.animationFillMode === "forwards") {
                  node.style.animationFillMode = currentFillMode;
                }
              });
            }
          }
        };
        const handleAnimationStart = (event) => {
          if (event.target === node) {
            prevAnimationNameRef.current = getAnimationName(stylesRef.current);
          }
        };
        node.addEventListener("animationstart", handleAnimationStart);
        node.addEventListener("animationcancel", handleAnimationEnd);
        node.addEventListener("animationend", handleAnimationEnd);
        return () => {
          ownerWindow.clearTimeout(timeoutId);
          node.removeEventListener("animationstart", handleAnimationStart);
          node.removeEventListener("animationcancel", handleAnimationEnd);
          node.removeEventListener("animationend", handleAnimationEnd);
        };
      } else {
        send("ANIMATION_END");
      }
    }, [node, send]);
    return {
      isPresent: ["mounted", "unmountSuspended"].includes(state),
      ref: React25.useCallback((node2) => {
        stylesRef.current = node2 ? getComputedStyle(node2) : null;
        setNode(node2);
      }, [])
    };
  }
  function getAnimationName(styles) {
    return styles?.animationName || "none";
  }
  function getElementRef4(element) {
    let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
    let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
    if (mayWarn) {
      return element.ref;
    }
    getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
    mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
    if (mayWarn) {
      return element.props.ref;
    }
    return element.props.ref || element.ref;
  }

  // node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.mjs
  var React28 = __toESM(require_react(), 1);
  var ReactDOM5 = __toESM(require_react_dom(), 1);

  // node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.mjs
  var React27 = __toESM(require_react(), 1);
  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
  // @__NO_SIDE_EFFECTS__
  function createSlot4(ownerName) {
    const SlotClone = /* @__PURE__ */ createSlotClone4(ownerName);
    const Slot2 = React27.forwardRef((props, forwardedRef) => {
      const { children, ...slotProps } = props;
      const childrenArray = React27.Children.toArray(children);
      const slottable = childrenArray.find(isSlottable4);
      if (slottable) {
        const newElement = slottable.props.children;
        const newChildren = childrenArray.map((child) => {
          if (child === slottable) {
            if (React27.Children.count(newElement) > 1) return React27.Children.only(null);
            return React27.isValidElement(newElement) ? newElement.props.children : null;
          } else {
            return child;
          }
        });
        return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React27.isValidElement(newElement) ? React27.cloneElement(newElement, void 0, newChildren) : null });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
    });
    Slot2.displayName = `${ownerName}.Slot`;
    return Slot2;
  }
  // @__NO_SIDE_EFFECTS__
  function createSlotClone4(ownerName) {
    const SlotClone = React27.forwardRef((props, forwardedRef) => {
      const { children, ...slotProps } = props;
      if (React27.isValidElement(children)) {
        const childrenRef = getElementRef5(children);
        const props2 = mergeProps4(slotProps, children.props);
        if (children.type !== React27.Fragment) {
          props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
        }
        return React27.cloneElement(children, props2);
      }
      return React27.Children.count(children) > 1 ? React27.Children.only(null) : null;
    });
    SlotClone.displayName = `${ownerName}.SlotClone`;
    return SlotClone;
  }
  var SLOTTABLE_IDENTIFIER4 = /* @__PURE__ */ Symbol("radix.slottable");
  function isSlottable4(child) {
    return React27.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER4;
  }
  function mergeProps4(slotProps, childProps) {
    const overrideProps = { ...childProps };
    for (const propName in childProps) {
      const slotPropValue = slotProps[propName];
      const childPropValue = childProps[propName];
      const isHandler = /^on[A-Z]/.test(propName);
      if (isHandler) {
        if (slotPropValue && childPropValue) {
          overrideProps[propName] = (...args) => {
            const result = childPropValue(...args);
            slotPropValue(...args);
            return result;
          };
        } else if (slotPropValue) {
          overrideProps[propName] = slotPropValue;
        }
      } else if (propName === "style") {
        overrideProps[propName] = { ...slotPropValue, ...childPropValue };
      } else if (propName === "className") {
        overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
      }
    }
    return { ...slotProps, ...overrideProps };
  }
  function getElementRef5(element) {
    let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
    let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
    if (mayWarn) {
      return element.ref;
    }
    getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
    mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
    if (mayWarn) {
      return element.props.ref;
    }
    return element.props.ref || element.ref;
  }

  // node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.mjs
  var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
  var NODES4 = [
    "a",
    "button",
    "div",
    "form",
    "h2",
    "h3",
    "img",
    "input",
    "label",
    "li",
    "nav",
    "ol",
    "p",
    "select",
    "span",
    "svg",
    "ul"
  ];
  var Primitive4 = NODES4.reduce((primitive, node) => {
    const Slot2 = createSlot4(`Primitive.${node}`);
    const Node2 = React28.forwardRef((props, forwardedRef) => {
      const { asChild, ...primitiveProps } = props;
      const Comp = asChild ? Slot2 : node;
      if (typeof window !== "undefined") {
        window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
    });
    Node2.displayName = `Primitive.${node}`;
    return { ...primitive, [node]: Node2 };
  }, {});

  // node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
  var React29 = __toESM(require_react(), 1);
  var count2 = 0;
  function useFocusGuards() {
    React29.useEffect(() => {
      const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
      document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
      document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
      count2++;
      return () => {
        if (count2 === 1) {
          document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
        }
        count2--;
      };
    }, []);
  }
  function createFocusGuard() {
    const element = document.createElement("span");
    element.setAttribute("data-radix-focus-guard", "");
    element.tabIndex = 0;
    element.style.outline = "none";
    element.style.opacity = "0";
    element.style.position = "fixed";
    element.style.pointerEvents = "none";
    return element;
  }

  // node_modules/tslib/tslib.es6.mjs
  var __assign = function() {
    __assign = Object.assign || function __assign2(t2) {
      for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2)) t2[p2] = s[p2];
      }
      return t2;
    };
    return __assign.apply(this, arguments);
  };
  function __rest(s, e) {
    var t2 = {};
    for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2) && e.indexOf(p2) < 0)
      t2[p2] = s[p2];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
      for (var i = 0, p2 = Object.getOwnPropertySymbols(s); i < p2.length; i++) {
        if (e.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p2[i]))
          t2[p2[i]] = s[p2[i]];
      }
    return t2;
  }
  function __spreadArray(to, from, pack) {
    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
      if (ar || !(i in from)) {
        if (!ar) ar = Array.prototype.slice.call(from, 0, i);
        ar[i] = from[i];
      }
    }
    return to.concat(ar || Array.prototype.slice.call(from));
  }

  // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/Combination.js
  var React36 = __toESM(require_react());

  // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/UI.js
  var React32 = __toESM(require_react());

  // node_modules/react-remove-scroll-bar/dist/es2015/constants.js
  var zeroRightClassName = "right-scroll-bar-position";
  var fullWidthClassName = "width-before-scroll-bar";
  var noScrollbarsClassName = "with-scroll-bars-hidden";
  var removedBarSizeVariable = "--removed-body-scroll-bar-size";

  // node_modules/use-callback-ref/dist/es2015/assignRef.js
  function assignRef(ref, value) {
    if (typeof ref === "function") {
      ref(value);
    } else if (ref) {
      ref.current = value;
    }
    return ref;
  }

  // node_modules/use-callback-ref/dist/es2015/useRef.js
  var import_react = __toESM(require_react());
  function useCallbackRef3(initialValue, callback) {
    var ref = (0, import_react.useState)(function() {
      return {
        // value
        value: initialValue,
        // last callback
        callback,
        // "memoized" public interface
        facade: {
          get current() {
            return ref.value;
          },
          set current(value) {
            var last = ref.value;
            if (last !== value) {
              ref.value = value;
              ref.callback(value, last);
            }
          }
        }
      };
    })[0];
    ref.callback = callback;
    return ref.facade;
  }

  // node_modules/use-callback-ref/dist/es2015/useMergeRef.js
  var React30 = __toESM(require_react());
  var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React30.useLayoutEffect : React30.useEffect;
  var currentValues = /* @__PURE__ */ new WeakMap();
  function useMergeRefs(refs, defaultValue) {
    var callbackRef = useCallbackRef3(defaultValue || null, function(newValue) {
      return refs.forEach(function(ref) {
        return assignRef(ref, newValue);
      });
    });
    useIsomorphicLayoutEffect(function() {
      var oldValue = currentValues.get(callbackRef);
      if (oldValue) {
        var prevRefs_1 = new Set(oldValue);
        var nextRefs_1 = new Set(refs);
        var current_1 = callbackRef.current;
        prevRefs_1.forEach(function(ref) {
          if (!nextRefs_1.has(ref)) {
            assignRef(ref, null);
          }
        });
        nextRefs_1.forEach(function(ref) {
          if (!prevRefs_1.has(ref)) {
            assignRef(ref, current_1);
          }
        });
      }
      currentValues.set(callbackRef, refs);
    }, [refs]);
    return callbackRef;
  }

  // node_modules/use-sidecar/dist/es2015/medium.js
  function ItoI(a) {
    return a;
  }
  function innerCreateMedium(defaults, middleware) {
    if (middleware === void 0) {
      middleware = ItoI;
    }
    var buffer = [];
    var assigned = false;
    var medium = {
      read: function() {
        if (assigned) {
          throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
        }
        if (buffer.length) {
          return buffer[buffer.length - 1];
        }
        return defaults;
      },
      useMedium: function(data) {
        var item = middleware(data, assigned);
        buffer.push(item);
        return function() {
          buffer = buffer.filter(function(x) {
            return x !== item;
          });
        };
      },
      assignSyncMedium: function(cb) {
        assigned = true;
        while (buffer.length) {
          var cbs = buffer;
          buffer = [];
          cbs.forEach(cb);
        }
        buffer = {
          push: function(x) {
            return cb(x);
          },
          filter: function() {
            return buffer;
          }
        };
      },
      assignMedium: function(cb) {
        assigned = true;
        var pendingQueue = [];
        if (buffer.length) {
          var cbs = buffer;
          buffer = [];
          cbs.forEach(cb);
          pendingQueue = buffer;
        }
        var executeQueue = function() {
          var cbs2 = pendingQueue;
          pendingQueue = [];
          cbs2.forEach(cb);
        };
        var cycle = function() {
          return Promise.resolve().then(executeQueue);
        };
        cycle();
        buffer = {
          push: function(x) {
            pendingQueue.push(x);
            cycle();
          },
          filter: function(filter) {
            pendingQueue = pendingQueue.filter(filter);
            return buffer;
          }
        };
      }
    };
    return medium;
  }
  function createSidecarMedium(options) {
    if (options === void 0) {
      options = {};
    }
    var medium = innerCreateMedium(null);
    medium.options = __assign({ async: true, ssr: false }, options);
    return medium;
  }

  // node_modules/use-sidecar/dist/es2015/exports.js
  var React31 = __toESM(require_react());
  var SideCar = function(_a) {
    var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
    if (!sideCar) {
      throw new Error("Sidecar: please provide `sideCar` property to import the right car");
    }
    var Target = sideCar.read();
    if (!Target) {
      throw new Error("Sidecar medium not found");
    }
    return React31.createElement(Target, __assign({}, rest));
  };
  SideCar.isSideCarExport = true;
  function exportSidecar(medium, exported) {
    medium.useMedium(exported);
    return SideCar;
  }

  // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/medium.js
  var effectCar = createSidecarMedium();

  // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/UI.js
  var nothing = function() {
    return;
  };
  var RemoveScroll = React32.forwardRef(function(props, parentRef) {
    var ref = React32.useRef(null);
    var _a = React32.useState({
      onScrollCapture: nothing,
      onWheelCapture: nothing,
      onTouchMoveCapture: nothing
    }), callbacks = _a[0], setCallbacks = _a[1];
    var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
    var SideCar2 = sideCar;
    var containerRef = useMergeRefs([ref, parentRef]);
    var containerProps = __assign(__assign({}, rest), callbacks);
    return React32.createElement(
      React32.Fragment,
      null,
      enabled && React32.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
      forwardProps ? React32.cloneElement(React32.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React32.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
    );
  });
  RemoveScroll.defaultProps = {
    enabled: true,
    removeScrollBar: true,
    inert: false
  };
  RemoveScroll.classNames = {
    fullWidth: fullWidthClassName,
    zeroRight: zeroRightClassName
  };

  // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
  var React35 = __toESM(require_react());

  // node_modules/react-remove-scroll-bar/dist/es2015/component.js
  var React34 = __toESM(require_react());

  // node_modules/react-style-singleton/dist/es2015/hook.js
  var React33 = __toESM(require_react());

  // node_modules/get-nonce/dist/es2015/index.js
  var currentNonce;
  var getNonce = function() {
    if (currentNonce) {
      return currentNonce;
    }
    if (typeof __webpack_nonce__ !== "undefined") {
      return __webpack_nonce__;
    }
    return void 0;
  };

  // node_modules/react-style-singleton/dist/es2015/singleton.js
  function makeStyleTag() {
    if (!document)
      return null;
    var tag = document.createElement("style");
    tag.type = "text/css";
    var nonce = getNonce();
    if (nonce) {
      tag.setAttribute("nonce", nonce);
    }
    return tag;
  }
  function injectStyles(tag, css) {
    if (tag.styleSheet) {
      tag.styleSheet.cssText = css;
    } else {
      tag.appendChild(document.createTextNode(css));
    }
  }
  function insertStyleTag(tag) {
    var head = document.head || document.getElementsByTagName("head")[0];
    head.appendChild(tag);
  }
  var stylesheetSingleton = function() {
    var counter = 0;
    var stylesheet = null;
    return {
      add: function(style) {
        if (counter == 0) {
          if (stylesheet = makeStyleTag()) {
            injectStyles(stylesheet, style);
            insertStyleTag(stylesheet);
          }
        }
        counter++;
      },
      remove: function() {
        counter--;
        if (!counter && stylesheet) {
          stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
          stylesheet = null;
        }
      }
    };
  };

  // node_modules/react-style-singleton/dist/es2015/hook.js
  var styleHookSingleton = function() {
    var sheet = stylesheetSingleton();
    return function(styles, isDynamic) {
      React33.useEffect(function() {
        sheet.add(styles);
        return function() {
          sheet.remove();
        };
      }, [styles && isDynamic]);
    };
  };

  // node_modules/react-style-singleton/dist/es2015/component.js
  var styleSingleton = function() {
    var useStyle = styleHookSingleton();
    var Sheet = function(_a) {
      var styles = _a.styles, dynamic = _a.dynamic;
      useStyle(styles, dynamic);
      return null;
    };
    return Sheet;
  };

  // node_modules/react-remove-scroll-bar/dist/es2015/utils.js
  var zeroGap = {
    left: 0,
    top: 0,
    right: 0,
    gap: 0
  };
  var parse = function(x) {
    return parseInt(x || "", 10) || 0;
  };
  var getOffset = function(gapMode) {
    var cs = window.getComputedStyle(document.body);
    var left = cs[gapMode === "padding" ? "paddingLeft" : "marginLeft"];
    var top = cs[gapMode === "padding" ? "paddingTop" : "marginTop"];
    var right = cs[gapMode === "padding" ? "paddingRight" : "marginRight"];
    return [parse(left), parse(top), parse(right)];
  };
  var getGapWidth = function(gapMode) {
    if (gapMode === void 0) {
      gapMode = "margin";
    }
    if (typeof window === "undefined") {
      return zeroGap;
    }
    var offsets = getOffset(gapMode);
    var documentWidth = document.documentElement.clientWidth;
    var windowWidth = window.innerWidth;
    return {
      left: offsets[0],
      top: offsets[1],
      right: offsets[2],
      gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0])
    };
  };

  // node_modules/react-remove-scroll-bar/dist/es2015/component.js
  var Style = styleSingleton();
  var lockAttribute = "data-scroll-locked";
  var getStyles = function(_a, allowRelative, gapMode, important) {
    var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;
    if (gapMode === void 0) {
      gapMode = "margin";
    }
    return "\n  .".concat(noScrollbarsClassName, " {\n   overflow: hidden ").concat(important, ";\n   padding-right: ").concat(gap, "px ").concat(important, ";\n  }\n  body[").concat(lockAttribute, "] {\n    overflow: hidden ").concat(important, ";\n    overscroll-behavior: contain;\n    ").concat([
      allowRelative && "position: relative ".concat(important, ";"),
      gapMode === "margin" && "\n    padding-left: ".concat(left, "px;\n    padding-top: ").concat(top, "px;\n    padding-right: ").concat(right, "px;\n    margin-left:0;\n    margin-top:0;\n    margin-right: ").concat(gap, "px ").concat(important, ";\n    "),
      gapMode === "padding" && "padding-right: ".concat(gap, "px ").concat(important, ";")
    ].filter(Boolean).join(""), "\n  }\n  \n  .").concat(zeroRightClassName, " {\n    right: ").concat(gap, "px ").concat(important, ";\n  }\n  \n  .").concat(fullWidthClassName, " {\n    margin-right: ").concat(gap, "px ").concat(important, ";\n  }\n  \n  .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n    right: 0 ").concat(important, ";\n  }\n  \n  .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n    margin-right: 0 ").concat(important, ";\n  }\n  \n  body[").concat(lockAttribute, "] {\n    ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n  }\n");
  };
  var getCurrentUseCounter = function() {
    var counter = parseInt(document.body.getAttribute(lockAttribute) || "0", 10);
    return isFinite(counter) ? counter : 0;
  };
  var useLockAttribute = function() {
    React34.useEffect(function() {
      document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
      return function() {
        var newCounter = getCurrentUseCounter() - 1;
        if (newCounter <= 0) {
          document.body.removeAttribute(lockAttribute);
        } else {
          document.body.setAttribute(lockAttribute, newCounter.toString());
        }
      };
    }, []);
  };
  var RemoveScrollBar = function(_a) {
    var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
    useLockAttribute();
    var gap = React34.useMemo(function() {
      return getGapWidth(gapMode);
    }, [gapMode]);
    return React34.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
  };

  // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
  var passiveSupported = false;
  if (typeof window !== "undefined") {
    try {
      options = Object.defineProperty({}, "passive", {
        get: function() {
          passiveSupported = true;
          return true;
        }
      });
      window.addEventListener("test", options, options);
      window.removeEventListener("test", options, options);
    } catch (err) {
      passiveSupported = false;
    }
  }
  var options;
  var nonPassive = passiveSupported ? { passive: false } : false;

  // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/handleScroll.js
  var alwaysContainsScroll = function(node) {
    return node.tagName === "TEXTAREA";
  };
  var elementCanBeScrolled = function(node, overflow) {
    if (!(node instanceof Element)) {
      return false;
    }
    var styles = window.getComputedStyle(node);
    return (
      // not-not-scrollable
      styles[overflow] !== "hidden" && // contains scroll inside self
      !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === "visible")
    );
  };
  var elementCouldBeVScrolled = function(node) {
    return elementCanBeScrolled(node, "overflowY");
  };
  var elementCouldBeHScrolled = function(node) {
    return elementCanBeScrolled(node, "overflowX");
  };
  var locationCouldBeScrolled = function(axis, node) {
    var ownerDocument = node.ownerDocument;
    var current = node;
    do {
      if (typeof ShadowRoot !== "undefined" && current instanceof ShadowRoot) {
        current = current.host;
      }
      var isScrollable = elementCouldBeScrolled(axis, current);
      if (isScrollable) {
        var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];
        if (scrollHeight > clientHeight) {
          return true;
        }
      }
      current = current.parentNode;
    } while (current && current !== ownerDocument.body);
    return false;
  };
  var getVScrollVariables = function(_a) {
    var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
    return [
      scrollTop,
      scrollHeight,
      clientHeight
    ];
  };
  var getHScrollVariables = function(_a) {
    var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
    return [
      scrollLeft,
      scrollWidth,
      clientWidth
    ];
  };
  var elementCouldBeScrolled = function(axis, node) {
    return axis === "v" ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
  };
  var getScrollVariables = function(axis, node) {
    return axis === "v" ? getVScrollVariables(node) : getHScrollVariables(node);
  };
  var getDirectionFactor = function(axis, direction) {
    return axis === "h" && direction === "rtl" ? -1 : 1;
  };
  var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
    var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
    var delta = directionFactor * sourceDelta;
    var target = event.target;
    var targetInLock = endTarget.contains(target);
    var shouldCancelScroll = false;
    var isDeltaPositive = delta > 0;
    var availableScroll = 0;
    var availableScrollTop = 0;
    do {
      if (!target) {
        break;
      }
      var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
      var elementScroll = scroll_1 - capacity - directionFactor * position;
      if (position || elementScroll) {
        if (elementCouldBeScrolled(axis, target)) {
          availableScroll += elementScroll;
          availableScrollTop += position;
        }
      }
      var parent_1 = target.parentNode;
      target = parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1;
    } while (
      // portaled content
      !targetInLock && target !== document.body || // self content
      targetInLock && (endTarget.contains(target) || endTarget === target)
    );
    if (isDeltaPositive && (noOverscroll && Math.abs(availableScroll) < 1 || !noOverscroll && delta > availableScroll)) {
      shouldCancelScroll = true;
    } else if (!isDeltaPositive && (noOverscroll && Math.abs(availableScrollTop) < 1 || !noOverscroll && -delta > availableScrollTop)) {
      shouldCancelScroll = true;
    }
    return shouldCancelScroll;
  };

  // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
  var getTouchXY = function(event) {
    return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
  };
  var getDeltaXY = function(event) {
    return [event.deltaX, event.deltaY];
  };
  var extractRef = function(ref) {
    return ref && "current" in ref ? ref.current : ref;
  };
  var deltaCompare = function(x, y) {
    return x[0] === y[0] && x[1] === y[1];
  };
  var generateStyle = function(id) {
    return "\n  .block-interactivity-".concat(id, " {pointer-events: none;}\n  .allow-interactivity-").concat(id, " {pointer-events: all;}\n");
  };
  var idCounter = 0;
  var lockStack = [];
  function RemoveScrollSideCar(props) {
    var shouldPreventQueue = React35.useRef([]);
    var touchStartRef = React35.useRef([0, 0]);
    var activeAxis = React35.useRef();
    var id = React35.useState(idCounter++)[0];
    var Style2 = React35.useState(styleSingleton)[0];
    var lastProps = React35.useRef(props);
    React35.useEffect(function() {
      lastProps.current = props;
    }, [props]);
    React35.useEffect(function() {
      if (props.inert) {
        document.body.classList.add("block-interactivity-".concat(id));
        var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
        allow_1.forEach(function(el) {
          return el.classList.add("allow-interactivity-".concat(id));
        });
        return function() {
          document.body.classList.remove("block-interactivity-".concat(id));
          allow_1.forEach(function(el) {
            return el.classList.remove("allow-interactivity-".concat(id));
          });
        };
      }
      return;
    }, [props.inert, props.lockRef.current, props.shards]);
    var shouldCancelEvent = React35.useCallback(function(event, parent) {
      if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) {
        return !lastProps.current.allowPinchZoom;
      }
      var touch = getTouchXY(event);
      var touchStart = touchStartRef.current;
      var deltaX = "deltaX" in event ? event.deltaX : touchStart[0] - touch[0];
      var deltaY = "deltaY" in event ? event.deltaY : touchStart[1] - touch[1];
      var currentAxis;
      var target = event.target;
      var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? "h" : "v";
      if ("touches" in event && moveDirection === "h" && target.type === "range") {
        return false;
      }
      var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
      if (!canBeScrolledInMainDirection) {
        return true;
      }
      if (canBeScrolledInMainDirection) {
        currentAxis = moveDirection;
      } else {
        currentAxis = moveDirection === "v" ? "h" : "v";
        canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
      }
      if (!canBeScrolledInMainDirection) {
        return false;
      }
      if (!activeAxis.current && "changedTouches" in event && (deltaX || deltaY)) {
        activeAxis.current = currentAxis;
      }
      if (!currentAxis) {
        return true;
      }
      var cancelingAxis = activeAxis.current || currentAxis;
      return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
    }, []);
    var shouldPrevent = React35.useCallback(function(_event) {
      var event = _event;
      if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
        return;
      }
      var delta = "deltaY" in event ? getDeltaXY(event) : getTouchXY(event);
      var sourceEvent = shouldPreventQueue.current.filter(function(e) {
        return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta);
      })[0];
      if (sourceEvent && sourceEvent.should) {
        if (event.cancelable) {
          event.preventDefault();
        }
        return;
      }
      if (!sourceEvent) {
        var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function(node) {
          return node.contains(event.target);
        });
        var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
        if (shouldStop) {
          if (event.cancelable) {
            event.preventDefault();
          }
        }
      }
    }, []);
    var shouldCancel = React35.useCallback(function(name, delta, target, should) {
      var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
      shouldPreventQueue.current.push(event);
      setTimeout(function() {
        shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) {
          return e !== event;
        });
      }, 1);
    }, []);
    var scrollTouchStart = React35.useCallback(function(event) {
      touchStartRef.current = getTouchXY(event);
      activeAxis.current = void 0;
    }, []);
    var scrollWheel = React35.useCallback(function(event) {
      shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
    }, []);
    var scrollTouchMove = React35.useCallback(function(event) {
      shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
    }, []);
    React35.useEffect(function() {
      lockStack.push(Style2);
      props.setCallbacks({
        onScrollCapture: scrollWheel,
        onWheelCapture: scrollWheel,
        onTouchMoveCapture: scrollTouchMove
      });
      document.addEventListener("wheel", shouldPrevent, nonPassive);
      document.addEventListener("touchmove", shouldPrevent, nonPassive);
      document.addEventListener("touchstart", scrollTouchStart, nonPassive);
      return function() {
        lockStack = lockStack.filter(function(inst) {
          return inst !== Style2;
        });
        document.removeEventListener("wheel", shouldPrevent, nonPassive);
        document.removeEventListener("touchmove", shouldPrevent, nonPassive);
        document.removeEventListener("touchstart", scrollTouchStart, nonPassive);
      };
    }, []);
    var removeScrollBar = props.removeScrollBar, inert = props.inert;
    return React35.createElement(
      React35.Fragment,
      null,
      inert ? React35.createElement(Style2, { styles: generateStyle(id) }) : null,
      removeScrollBar ? React35.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
    );
  }
  function getOutermostShadowParent(node) {
    var shadowParent = null;
    while (node !== null) {
      if (node instanceof ShadowRoot) {
        shadowParent = node.host;
        node = node.host;
      }
      node = node.parentNode;
    }
    return shadowParent;
  }

  // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/sidecar.js
  var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);

  // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/Combination.js
  var ReactRemoveScroll = React36.forwardRef(function(props, ref) {
    return React36.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
  });
  ReactRemoveScroll.classNames = RemoveScroll.classNames;
  var Combination_default = ReactRemoveScroll;

  // node_modules/aria-hidden/dist/es2015/index.js
  var getDefaultParent = function(originalTarget) {
    if (typeof document === "undefined") {
      return null;
    }
    var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
    return sampleTarget.ownerDocument.body;
  };
  var counterMap = /* @__PURE__ */ new WeakMap();
  var uncontrolledNodes = /* @__PURE__ */ new WeakMap();
  var markerMap = {};
  var lockCount = 0;
  var unwrapHost = function(node) {
    return node && (node.host || unwrapHost(node.parentNode));
  };
  var correctTargets = function(parent, targets) {
    return targets.map(function(target) {
      if (parent.contains(target)) {
        return target;
      }
      var correctedTarget = unwrapHost(target);
      if (correctedTarget && parent.contains(correctedTarget)) {
        return correctedTarget;
      }
      console.error("aria-hidden", target, "in not contained inside", parent, ". Doing nothing");
      return null;
    }).filter(function(x) {
      return Boolean(x);
    });
  };
  var applyAttributeToOthers = function(originalTarget, parentNode, markerName, controlAttribute) {
    var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
    if (!markerMap[markerName]) {
      markerMap[markerName] = /* @__PURE__ */ new WeakMap();
    }
    var markerCounter = markerMap[markerName];
    var hiddenNodes = [];
    var elementsToKeep = /* @__PURE__ */ new Set();
    var elementsToStop = new Set(targets);
    var keep = function(el) {
      if (!el || elementsToKeep.has(el)) {
        return;
      }
      elementsToKeep.add(el);
      keep(el.parentNode);
    };
    targets.forEach(keep);
    var deep = function(parent) {
      if (!parent || elementsToStop.has(parent)) {
        return;
      }
      Array.prototype.forEach.call(parent.children, function(node) {
        if (elementsToKeep.has(node)) {
          deep(node);
        } else {
          try {
            var attr = node.getAttribute(controlAttribute);
            var alreadyHidden = attr !== null && attr !== "false";
            var counterValue = (counterMap.get(node) || 0) + 1;
            var markerValue = (markerCounter.get(node) || 0) + 1;
            counterMap.set(node, counterValue);
            markerCounter.set(node, markerValue);
            hiddenNodes.push(node);
            if (counterValue === 1 && alreadyHidden) {
              uncontrolledNodes.set(node, true);
            }
            if (markerValue === 1) {
              node.setAttribute(markerName, "true");
            }
            if (!alreadyHidden) {
              node.setAttribute(controlAttribute, "true");
            }
          } catch (e) {
            console.error("aria-hidden: cannot operate on ", node, e);
          }
        }
      });
    };
    deep(parentNode);
    elementsToKeep.clear();
    lockCount++;
    return function() {
      hiddenNodes.forEach(function(node) {
        var counterValue = counterMap.get(node) - 1;
        var markerValue = markerCounter.get(node) - 1;
        counterMap.set(node, counterValue);
        markerCounter.set(node, markerValue);
        if (!counterValue) {
          if (!uncontrolledNodes.has(node)) {
            node.removeAttribute(controlAttribute);
          }
          uncontrolledNodes.delete(node);
        }
        if (!markerValue) {
          node.removeAttribute(markerName);
        }
      });
      lockCount--;
      if (!lockCount) {
        counterMap = /* @__PURE__ */ new WeakMap();
        counterMap = /* @__PURE__ */ new WeakMap();
        uncontrolledNodes = /* @__PURE__ */ new WeakMap();
        markerMap = {};
      }
    };
  };
  var hideOthers = function(originalTarget, parentNode, markerName) {
    if (markerName === void 0) {
      markerName = "data-aria-hidden";
    }
    var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
    var activeParentNode = parentNode || getDefaultParent(originalTarget);
    if (!activeParentNode) {
      return function() {
        return null;
      };
    }
    targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live], script")));
    return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
  };

  // node_modules/@radix-ui/react-dialog/dist/index.mjs
  var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
  var DIALOG_NAME = "Dialog";
  var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
  var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
  var Dialog = (props) => {
    const {
      __scopeDialog,
      children,
      open: openProp,
      defaultOpen,
      onOpenChange,
      modal = true
    } = props;
    const triggerRef = React37.useRef(null);
    const contentRef = React37.useRef(null);
    const [open2, setOpen] = useControllableState({
      prop: openProp,
      defaultProp: defaultOpen ?? false,
      onChange: onOpenChange,
      caller: DIALOG_NAME
    });
    return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
      DialogProvider,
      {
        scope: __scopeDialog,
        triggerRef,
        contentRef,
        contentId: useId(),
        titleId: useId(),
        descriptionId: useId(),
        open: open2,
        onOpenChange: setOpen,
        onOpenToggle: React37.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
        modal,
        children
      }
    );
  };
  Dialog.displayName = DIALOG_NAME;
  var TRIGGER_NAME = "DialogTrigger";
  var DialogTrigger = React37.forwardRef(
    (props, forwardedRef) => {
      const { __scopeDialog, ...triggerProps } = props;
      const context2 = useDialogContext(TRIGGER_NAME, __scopeDialog);
      const composedTriggerRef = useComposedRefs(forwardedRef, context2.triggerRef);
      return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
        Primitive4.button,
        {
          type: "button",
          "aria-haspopup": "dialog",
          "aria-expanded": context2.open,
          "aria-controls": context2.contentId,
          "data-state": getState(context2.open),
          ...triggerProps,
          ref: composedTriggerRef,
          onClick: composeEventHandlers(props.onClick, context2.onOpenToggle)
        }
      );
    }
  );
  DialogTrigger.displayName = TRIGGER_NAME;
  var PORTAL_NAME2 = "DialogPortal";
  var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME2, {
    forceMount: void 0
  });
  var DialogPortal = (props) => {
    const { __scopeDialog, forceMount, children, container } = props;
    const context2 = useDialogContext(PORTAL_NAME2, __scopeDialog);
    return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React37.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Presence, { present: forceMount || context2.open, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Portal, { asChild: true, container, children: child }) })) });
  };
  DialogPortal.displayName = PORTAL_NAME2;
  var OVERLAY_NAME = "DialogOverlay";
  var DialogOverlay = React37.forwardRef(
    (props, forwardedRef) => {
      const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
      const { forceMount = portalContext.forceMount, ...overlayProps } = props;
      const context2 = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
      return context2.modal ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Presence, { present: forceMount || context2.open, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
    }
  );
  DialogOverlay.displayName = OVERLAY_NAME;
  var Slot = createSlot4("DialogOverlay.RemoveScroll");
  var DialogOverlayImpl = React37.forwardRef(
    (props, forwardedRef) => {
      const { __scopeDialog, ...overlayProps } = props;
      const context2 = useDialogContext(OVERLAY_NAME, __scopeDialog);
      return (
        // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
        // ie. when `Overlay` and `Content` are siblings
        /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Combination_default, { as: Slot, allowPinchZoom: true, shards: [context2.contentRef], children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
          Primitive4.div,
          {
            "data-state": getState(context2.open),
            ...overlayProps,
            ref: forwardedRef,
            style: { pointerEvents: "auto", ...overlayProps.style }
          }
        ) })
      );
    }
  );
  var CONTENT_NAME = "DialogContent";
  var DialogContent = React37.forwardRef(
    (props, forwardedRef) => {
      const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
      const { forceMount = portalContext.forceMount, ...contentProps } = props;
      const context2 = useDialogContext(CONTENT_NAME, props.__scopeDialog);
      return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Presence, { present: forceMount || context2.open, children: context2.modal ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
    }
  );
  DialogContent.displayName = CONTENT_NAME;
  var DialogContentModal = React37.forwardRef(
    (props, forwardedRef) => {
      const context2 = useDialogContext(CONTENT_NAME, props.__scopeDialog);
      const contentRef = React37.useRef(null);
      const composedRefs = useComposedRefs(forwardedRef, context2.contentRef, contentRef);
      React37.useEffect(() => {
        const content = contentRef.current;
        if (content) return hideOthers(content);
      }, []);
      return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
        DialogContentImpl,
        {
          ...props,
          ref: composedRefs,
          trapFocus: context2.open,
          disableOutsidePointerEvents: true,
          onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
            event.preventDefault();
            context2.triggerRef.current?.focus();
          }),
          onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
            const originalEvent = event.detail.originalEvent;
            const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
            const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
            if (isRightClick) event.preventDefault();
          }),
          onFocusOutside: composeEventHandlers(
            props.onFocusOutside,
            (event) => event.preventDefault()
          )
        }
      );
    }
  );
  var DialogContentNonModal = React37.forwardRef(
    (props, forwardedRef) => {
      const context2 = useDialogContext(CONTENT_NAME, props.__scopeDialog);
      const hasInteractedOutsideRef = React37.useRef(false);
      const hasPointerDownOutsideRef = React37.useRef(false);
      return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
        DialogContentImpl,
        {
          ...props,
          ref: forwardedRef,
          trapFocus: false,
          disableOutsidePointerEvents: false,
          onCloseAutoFocus: (event) => {
            props.onCloseAutoFocus?.(event);
            if (!event.defaultPrevented) {
              if (!hasInteractedOutsideRef.current) context2.triggerRef.current?.focus();
              event.preventDefault();
            }
            hasInteractedOutsideRef.current = false;
            hasPointerDownOutsideRef.current = false;
          },
          onInteractOutside: (event) => {
            props.onInteractOutside?.(event);
            if (!event.defaultPrevented) {
              hasInteractedOutsideRef.current = true;
              if (event.detail.originalEvent.type === "pointerdown") {
                hasPointerDownOutsideRef.current = true;
              }
            }
            const target = event.target;
            const targetIsTrigger = context2.triggerRef.current?.contains(target);
            if (targetIsTrigger) event.preventDefault();
            if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
              event.preventDefault();
            }
          }
        }
      );
    }
  );
  var DialogContentImpl = React37.forwardRef(
    (props, forwardedRef) => {
      const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
      const context2 = useDialogContext(CONTENT_NAME, __scopeDialog);
      const contentRef = React37.useRef(null);
      const composedRefs = useComposedRefs(forwardedRef, contentRef);
      useFocusGuards();
      return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
          FocusScope,
          {
            asChild: true,
            loop: true,
            trapped: trapFocus,
            onMountAutoFocus: onOpenAutoFocus,
            onUnmountAutoFocus: onCloseAutoFocus,
            children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
              DismissableLayer,
              {
                role: "dialog",
                id: context2.contentId,
                "aria-describedby": context2.descriptionId,
                "aria-labelledby": context2.titleId,
                "data-state": getState(context2.open),
                ...contentProps,
                ref: composedRefs,
                onDismiss: () => context2.onOpenChange(false)
              }
            )
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(TitleWarning, { titleId: context2.titleId }),
          /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DescriptionWarning, { contentRef, descriptionId: context2.descriptionId })
        ] })
      ] });
    }
  );
  var TITLE_NAME = "DialogTitle";
  var DialogTitle = React37.forwardRef(
    (props, forwardedRef) => {
      const { __scopeDialog, ...titleProps } = props;
      const context2 = useDialogContext(TITLE_NAME, __scopeDialog);
      return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Primitive4.h2, { id: context2.titleId, ...titleProps, ref: forwardedRef });
    }
  );
  DialogTitle.displayName = TITLE_NAME;
  var DESCRIPTION_NAME = "DialogDescription";
  var DialogDescription = React37.forwardRef(
    (props, forwardedRef) => {
      const { __scopeDialog, ...descriptionProps } = props;
      const context2 = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
      return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Primitive4.p, { id: context2.descriptionId, ...descriptionProps, ref: forwardedRef });
    }
  );
  DialogDescription.displayName = DESCRIPTION_NAME;
  var CLOSE_NAME = "DialogClose";
  var DialogClose = React37.forwardRef(
    (props, forwardedRef) => {
      const { __scopeDialog, ...closeProps } = props;
      const context2 = useDialogContext(CLOSE_NAME, __scopeDialog);
      return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
        Primitive4.button,
        {
          type: "button",
          ...closeProps,
          ref: forwardedRef,
          onClick: composeEventHandlers(props.onClick, () => context2.onOpenChange(false))
        }
      );
    }
  );
  DialogClose.displayName = CLOSE_NAME;
  function getState(open2) {
    return open2 ? "open" : "closed";
  }
  var TITLE_WARNING_NAME = "DialogTitleWarning";
  var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
    contentName: CONTENT_NAME,
    titleName: TITLE_NAME,
    docsSlug: "dialog"
  });
  var TitleWarning = ({ titleId }) => {
    const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
    const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
    React37.useEffect(() => {
      if (titleId) {
        const hasTitle = document.getElementById(titleId);
        if (!hasTitle) console.error(MESSAGE);
      }
    }, [MESSAGE, titleId]);
    return null;
  };
  var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
  var DescriptionWarning = ({ contentRef, descriptionId }) => {
    const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
    const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
    React37.useEffect(() => {
      const describedById = contentRef.current?.getAttribute("aria-describedby");
      if (descriptionId && describedById) {
        const hasDescription = document.getElementById(descriptionId);
        if (!hasDescription) console.warn(MESSAGE);
      }
    }, [MESSAGE, contentRef, descriptionId]);
    return null;
  };
  var Root = Dialog;
  var Portal2 = DialogPortal;
  var Overlay = DialogOverlay;
  var Content = DialogContent;

  // node_modules/cmdk/dist/index.mjs
  var t = __toESM(require_react(), 1);

  // node_modules/cmdk/node_modules/@radix-ui/react-primitive/dist/index.mjs
  var React40 = __toESM(require_react(), 1);
  var ReactDOM6 = __toESM(require_react_dom(), 1);

  // node_modules/cmdk/node_modules/@radix-ui/react-slot/dist/index.mjs
  var React39 = __toESM(require_react(), 1);

  // node_modules/cmdk/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
  var React38 = __toESM(require_react(), 1);
  function setRef6(ref, value) {
    if (typeof ref === "function") {
      return ref(value);
    } else if (ref !== null && ref !== void 0) {
      ref.current = value;
    }
  }
  function composeRefs6(...refs) {
    return (node) => {
      let hasCleanup = false;
      const cleanups = refs.map((ref) => {
        const cleanup = setRef6(ref, node);
        if (!hasCleanup && typeof cleanup == "function") {
          hasCleanup = true;
        }
        return cleanup;
      });
      if (hasCleanup) {
        return () => {
          for (let i = 0; i < cleanups.length; i++) {
            const cleanup = cleanups[i];
            if (typeof cleanup == "function") {
              cleanup();
            } else {
              setRef6(refs[i], null);
            }
          }
        };
      }
    };
  }

  // node_modules/cmdk/node_modules/@radix-ui/react-slot/dist/index.mjs
  var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
  var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
  var use = React39[" use ".trim().toString()];
  function isPromiseLike(value) {
    return typeof value === "object" && value !== null && "then" in value;
  }
  function isLazyComponent(element) {
    return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
  }
  // @__NO_SIDE_EFFECTS__
  function createSlot5(ownerName) {
    const SlotClone = /* @__PURE__ */ createSlotClone5(ownerName);
    const Slot2 = React39.forwardRef((props, forwardedRef) => {
      let { children, ...slotProps } = props;
      if (isLazyComponent(children) && typeof use === "function") {
        children = use(children._payload);
      }
      const childrenArray = React39.Children.toArray(children);
      const slottable = childrenArray.find(isSlottable5);
      if (slottable) {
        const newElement = slottable.props.children;
        const newChildren = childrenArray.map((child) => {
          if (child === slottable) {
            if (React39.Children.count(newElement) > 1) return React39.Children.only(null);
            return React39.isValidElement(newElement) ? newElement.props.children : null;
          } else {
            return child;
          }
        });
        return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React39.isValidElement(newElement) ? React39.cloneElement(newElement, void 0, newChildren) : null });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
    });
    Slot2.displayName = `${ownerName}.Slot`;
    return Slot2;
  }
  // @__NO_SIDE_EFFECTS__
  function createSlotClone5(ownerName) {
    const SlotClone = React39.forwardRef((props, forwardedRef) => {
      let { children, ...slotProps } = props;
      if (isLazyComponent(children) && typeof use === "function") {
        children = use(children._payload);
      }
      if (React39.isValidElement(children)) {
        const childrenRef = getElementRef6(children);
        const props2 = mergeProps5(slotProps, children.props);
        if (children.type !== React39.Fragment) {
          props2.ref = forwardedRef ? composeRefs6(forwardedRef, childrenRef) : childrenRef;
        }
        return React39.cloneElement(children, props2);
      }
      return React39.Children.count(children) > 1 ? React39.Children.only(null) : null;
    });
    SlotClone.displayName = `${ownerName}.SlotClone`;
    return SlotClone;
  }
  var SLOTTABLE_IDENTIFIER5 = /* @__PURE__ */ Symbol("radix.slottable");
  function isSlottable5(child) {
    return React39.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER5;
  }
  function mergeProps5(slotProps, childProps) {
    const overrideProps = { ...childProps };
    for (const propName in childProps) {
      const slotPropValue = slotProps[propName];
      const childPropValue = childProps[propName];
      const isHandler = /^on[A-Z]/.test(propName);
      if (isHandler) {
        if (slotPropValue && childPropValue) {
          overrideProps[propName] = (...args) => {
            const result = childPropValue(...args);
            slotPropValue(...args);
            return result;
          };
        } else if (slotPropValue) {
          overrideProps[propName] = slotPropValue;
        }
      } else if (propName === "style") {
        overrideProps[propName] = { ...slotPropValue, ...childPropValue };
      } else if (propName === "className") {
        overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
      }
    }
    return { ...slotProps, ...overrideProps };
  }
  function getElementRef6(element) {
    let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
    let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
    if (mayWarn) {
      return element.ref;
    }
    getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
    mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
    if (mayWarn) {
      return element.props.ref;
    }
    return element.props.ref || element.ref;
  }

  // node_modules/cmdk/node_modules/@radix-ui/react-primitive/dist/index.mjs
  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
  var NODES5 = [
    "a",
    "button",
    "div",
    "form",
    "h2",
    "h3",
    "img",
    "input",
    "label",
    "li",
    "nav",
    "ol",
    "p",
    "select",
    "span",
    "svg",
    "ul"
  ];
  var Primitive5 = NODES5.reduce((primitive, node) => {
    const Slot2 = createSlot5(`Primitive.${node}`);
    const Node2 = React40.forwardRef((props, forwardedRef) => {
      const { asChild, ...primitiveProps } = props;
      const Comp = asChild ? Slot2 : node;
      if (typeof window !== "undefined") {
        window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
    });
    Node2.displayName = `Primitive.${node}`;
    return { ...primitive, [node]: Node2 };
  }, {});

  // node_modules/cmdk/node_modules/@radix-ui/react-id/dist/index.mjs
  var React42 = __toESM(require_react(), 1);

  // node_modules/cmdk/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
  var React41 = __toESM(require_react(), 1);
  var useLayoutEffect24 = globalThis?.document ? React41.useLayoutEffect : () => {
  };

  // node_modules/cmdk/node_modules/@radix-ui/react-id/dist/index.mjs
  var useReactId2 = React42[" useId ".trim().toString()] || (() => void 0);
  var count3 = 0;
  function useId2(deterministicId) {
    const [id, setId] = React42.useState(useReactId2());
    useLayoutEffect24(() => {
      if (!deterministicId) setId((reactId) => reactId ?? String(count3++));
    }, [deterministicId]);
    return deterministicId || (id ? `radix-${id}` : "");
  }

  // node_modules/cmdk/dist/index.mjs
  var N = '[cmdk-group=""]';
  var Y2 = '[cmdk-group-items=""]';
  var be = '[cmdk-group-heading=""]';
  var le = '[cmdk-item=""]';
  var ce = `${le}:not([aria-disabled="true"])`;
  var Z = "cmdk-item-select";
  var T = "data-value";
  var Re = (r2, o, n) => W(r2, o, n);
  var ue = t.createContext(void 0);
  var K2 = () => t.useContext(ue);
  var de = t.createContext(void 0);
  var ee = () => t.useContext(de);
  var fe = t.createContext(void 0);
  var me = t.forwardRef((r2, o) => {
    let n = L(() => {
      var e, a;
      return { search: "", value: (a = (e = r2.value) != null ? e : r2.defaultValue) != null ? a : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
    }), u2 = L(() => /* @__PURE__ */ new Set()), c = L(() => /* @__PURE__ */ new Map()), d = L(() => /* @__PURE__ */ new Map()), f = L(() => /* @__PURE__ */ new Set()), p2 = pe(r2), { label: b, children: m2, value: R, onValueChange: x, filter: C, shouldFilter: S, loop: A, disablePointerSelection: ge = false, vimBindings: j = true, ...O } = r2, $2 = useId2(), q = useId2(), _ = useId2(), I = t.useRef(null), v = ke();
    k2(() => {
      if (R !== void 0) {
        let e = R.trim();
        n.current.value = e, E.emit();
      }
    }, [R]), k2(() => {
      v(6, ne);
    }, []);
    let E = t.useMemo(() => ({ subscribe: (e) => (f.current.add(e), () => f.current.delete(e)), snapshot: () => n.current, setState: (e, a, s) => {
      var i, l, g, y;
      if (!Object.is(n.current[e], a)) {
        if (n.current[e] = a, e === "search") J2(), z(), v(1, W2);
        else if (e === "value") {
          if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
            let h = document.getElementById(_);
            h ? h.focus() : (i = document.getElementById($2)) == null || i.focus();
          }
          if (v(7, () => {
            var h;
            n.current.selectedItemId = (h = M()) == null ? void 0 : h.id, E.emit();
          }), s || v(5, ne), ((l = p2.current) == null ? void 0 : l.value) !== void 0) {
            let h = a != null ? a : "";
            (y = (g = p2.current).onValueChange) == null || y.call(g, h);
            return;
          }
        }
        E.emit();
      }
    }, emit: () => {
      f.current.forEach((e) => e());
    } }), []), U2 = t.useMemo(() => ({ value: (e, a, s) => {
      var i;
      a !== ((i = d.current.get(e)) == null ? void 0 : i.value) && (d.current.set(e, { value: a, keywords: s }), n.current.filtered.items.set(e, te(a, s)), v(2, () => {
        z(), E.emit();
      }));
    }, item: (e, a) => (u2.current.add(e), a && (c.current.has(a) ? c.current.get(a).add(e) : c.current.set(a, /* @__PURE__ */ new Set([e]))), v(3, () => {
      J2(), z(), n.current.value || W2(), E.emit();
    }), () => {
      d.current.delete(e), u2.current.delete(e), n.current.filtered.items.delete(e);
      let s = M();
      v(4, () => {
        J2(), (s == null ? void 0 : s.getAttribute("id")) === e && W2(), E.emit();
      });
    }), group: (e) => (c.current.has(e) || c.current.set(e, /* @__PURE__ */ new Set()), () => {
      d.current.delete(e), c.current.delete(e);
    }), filter: () => p2.current.shouldFilter, label: b || r2["aria-label"], getDisablePointerSelection: () => p2.current.disablePointerSelection, listId: $2, inputId: _, labelId: q, listInnerRef: I }), []);
    function te(e, a) {
      var i, l;
      let s = (l = (i = p2.current) == null ? void 0 : i.filter) != null ? l : Re;
      return e ? s(e, n.current.search, a) : 0;
    }
    function z() {
      if (!n.current.search || p2.current.shouldFilter === false) return;
      let e = n.current.filtered.items, a = [];
      n.current.filtered.groups.forEach((i) => {
        let l = c.current.get(i), g = 0;
        l.forEach((y) => {
          let h = e.get(y);
          g = Math.max(h, g);
        }), a.push([i, g]);
      });
      let s = I.current;
      V().sort((i, l) => {
        var h, F;
        let g = i.getAttribute("id"), y = l.getAttribute("id");
        return ((h = e.get(y)) != null ? h : 0) - ((F = e.get(g)) != null ? F : 0);
      }).forEach((i) => {
        let l = i.closest(Y2);
        l ? l.appendChild(i.parentElement === l ? i : i.closest(`${Y2} > *`)) : s.appendChild(i.parentElement === s ? i : i.closest(`${Y2} > *`));
      }), a.sort((i, l) => l[1] - i[1]).forEach((i) => {
        var g;
        let l = (g = I.current) == null ? void 0 : g.querySelector(`${N}[${T}="${encodeURIComponent(i[0])}"]`);
        l == null || l.parentElement.appendChild(l);
      });
    }
    function W2() {
      let e = V().find((s) => s.getAttribute("aria-disabled") !== "true"), a = e == null ? void 0 : e.getAttribute(T);
      E.setState("value", a || void 0);
    }
    function J2() {
      var a, s, i, l;
      if (!n.current.search || p2.current.shouldFilter === false) {
        n.current.filtered.count = u2.current.size;
        return;
      }
      n.current.filtered.groups = /* @__PURE__ */ new Set();
      let e = 0;
      for (let g of u2.current) {
        let y = (s = (a = d.current.get(g)) == null ? void 0 : a.value) != null ? s : "", h = (l = (i = d.current.get(g)) == null ? void 0 : i.keywords) != null ? l : [], F = te(y, h);
        n.current.filtered.items.set(g, F), F > 0 && e++;
      }
      for (let [g, y] of c.current) for (let h of y) if (n.current.filtered.items.get(h) > 0) {
        n.current.filtered.groups.add(g);
        break;
      }
      n.current.filtered.count = e;
    }
    function ne() {
      var a, s, i;
      let e = M();
      e && (((a = e.parentElement) == null ? void 0 : a.firstChild) === e && ((i = (s = e.closest(N)) == null ? void 0 : s.querySelector(be)) == null || i.scrollIntoView({ block: "nearest" })), e.scrollIntoView({ block: "nearest" }));
    }
    function M() {
      var e;
      return (e = I.current) == null ? void 0 : e.querySelector(`${le}[aria-selected="true"]`);
    }
    function V() {
      var e;
      return Array.from(((e = I.current) == null ? void 0 : e.querySelectorAll(ce)) || []);
    }
    function X2(e) {
      let s = V()[e];
      s && E.setState("value", s.getAttribute(T));
    }
    function Q(e) {
      var g;
      let a = M(), s = V(), i = s.findIndex((y) => y === a), l = s[i + e];
      (g = p2.current) != null && g.loop && (l = i + e < 0 ? s[s.length - 1] : i + e === s.length ? s[0] : s[i + e]), l && E.setState("value", l.getAttribute(T));
    }
    function re(e) {
      let a = M(), s = a == null ? void 0 : a.closest(N), i;
      for (; s && !i; ) s = e > 0 ? we(s, N) : De(s, N), i = s == null ? void 0 : s.querySelector(ce);
      i ? E.setState("value", i.getAttribute(T)) : Q(e);
    }
    let oe = () => X2(V().length - 1), ie = (e) => {
      e.preventDefault(), e.metaKey ? oe() : e.altKey ? re(1) : Q(1);
    }, se = (e) => {
      e.preventDefault(), e.metaKey ? X2(0) : e.altKey ? re(-1) : Q(-1);
    };
    return t.createElement(Primitive5.div, { ref: o, tabIndex: -1, ...O, "cmdk-root": "", onKeyDown: (e) => {
      var s;
      (s = O.onKeyDown) == null || s.call(O, e);
      let a = e.nativeEvent.isComposing || e.keyCode === 229;
      if (!(e.defaultPrevented || a)) switch (e.key) {
        case "n":
        case "j": {
          j && e.ctrlKey && ie(e);
          break;
        }
        case "ArrowDown": {
          ie(e);
          break;
        }
        case "p":
        case "k": {
          j && e.ctrlKey && se(e);
          break;
        }
        case "ArrowUp": {
          se(e);
          break;
        }
        case "Home": {
          e.preventDefault(), X2(0);
          break;
        }
        case "End": {
          e.preventDefault(), oe();
          break;
        }
        case "Enter": {
          e.preventDefault();
          let i = M();
          if (i) {
            let l = new Event(Z);
            i.dispatchEvent(l);
          }
        }
      }
    } }, t.createElement("label", { "cmdk-label": "", htmlFor: U2.inputId, id: U2.labelId, style: Te }, b), B2(r2, (e) => t.createElement(de.Provider, { value: E }, t.createElement(ue.Provider, { value: U2 }, e))));
  });
  var he = t.forwardRef((r2, o) => {
    var _, I;
    let n = useId2(), u2 = t.useRef(null), c = t.useContext(fe), d = K2(), f = pe(r2), p2 = (I = (_ = f.current) == null ? void 0 : _.forceMount) != null ? I : c == null ? void 0 : c.forceMount;
    k2(() => {
      if (!p2) return d.item(n, c == null ? void 0 : c.id);
    }, [p2]);
    let b = ve(n, u2, [r2.value, r2.children, u2], r2.keywords), m2 = ee(), R = P((v) => v.value && v.value === b.current), x = P((v) => p2 || d.filter() === false ? true : v.search ? v.filtered.items.get(n) > 0 : true);
    t.useEffect(() => {
      let v = u2.current;
      if (!(!v || r2.disabled)) return v.addEventListener(Z, C), () => v.removeEventListener(Z, C);
    }, [x, r2.onSelect, r2.disabled]);
    function C() {
      var v, E;
      S(), (E = (v = f.current).onSelect) == null || E.call(v, b.current);
    }
    function S() {
      m2.setState("value", b.current, true);
    }
    if (!x) return null;
    let { disabled: A, value: ge, onSelect: j, forceMount: O, keywords: $2, ...q } = r2;
    return t.createElement(Primitive5.div, { ref: composeRefs6(u2, o), ...q, id: n, "cmdk-item": "", role: "option", "aria-disabled": !!A, "aria-selected": !!R, "data-disabled": !!A, "data-selected": !!R, onPointerMove: A || d.getDisablePointerSelection() ? void 0 : S, onClick: A ? void 0 : C }, r2.children);
  });
  var Ee = t.forwardRef((r2, o) => {
    let { heading: n, children: u2, forceMount: c, ...d } = r2, f = useId2(), p2 = t.useRef(null), b = t.useRef(null), m2 = useId2(), R = K2(), x = P((S) => c || R.filter() === false ? true : S.search ? S.filtered.groups.has(f) : true);
    k2(() => R.group(f), []), ve(f, p2, [r2.value, r2.heading, b]);
    let C = t.useMemo(() => ({ id: f, forceMount: c }), [c]);
    return t.createElement(Primitive5.div, { ref: composeRefs6(p2, o), ...d, "cmdk-group": "", role: "presentation", hidden: x ? void 0 : true }, n && t.createElement("div", { ref: b, "cmdk-group-heading": "", "aria-hidden": true, id: m2 }, n), B2(r2, (S) => t.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? m2 : void 0 }, t.createElement(fe.Provider, { value: C }, S))));
  });
  var ye = t.forwardRef((r2, o) => {
    let { alwaysRender: n, ...u2 } = r2, c = t.useRef(null), d = P((f) => !f.search);
    return !n && !d ? null : t.createElement(Primitive5.div, { ref: composeRefs6(c, o), ...u2, "cmdk-separator": "", role: "separator" });
  });
  var Se = t.forwardRef((r2, o) => {
    let { onValueChange: n, ...u2 } = r2, c = r2.value != null, d = ee(), f = P((m2) => m2.search), p2 = P((m2) => m2.selectedItemId), b = K2();
    return t.useEffect(() => {
      r2.value != null && d.setState("search", r2.value);
    }, [r2.value]), t.createElement(Primitive5.input, { ref: o, ...u2, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: false, "aria-autocomplete": "list", role: "combobox", "aria-expanded": true, "aria-controls": b.listId, "aria-labelledby": b.labelId, "aria-activedescendant": p2, id: b.inputId, type: "text", value: c ? r2.value : f, onChange: (m2) => {
      c || d.setState("search", m2.target.value), n == null || n(m2.target.value);
    } });
  });
  var Ce = t.forwardRef((r2, o) => {
    let { children: n, label: u2 = "Suggestions", ...c } = r2, d = t.useRef(null), f = t.useRef(null), p2 = P((m2) => m2.selectedItemId), b = K2();
    return t.useEffect(() => {
      if (f.current && d.current) {
        let m2 = f.current, R = d.current, x, C = new ResizeObserver(() => {
          x = requestAnimationFrame(() => {
            let S = m2.offsetHeight;
            R.style.setProperty("--cmdk-list-height", S.toFixed(1) + "px");
          });
        });
        return C.observe(m2), () => {
          cancelAnimationFrame(x), C.unobserve(m2);
        };
      }
    }, []), t.createElement(Primitive5.div, { ref: composeRefs6(d, o), ...c, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b.listId }, B2(r2, (m2) => t.createElement("div", { ref: composeRefs6(f, b.listInnerRef), "cmdk-list-sizer": "" }, m2)));
  });
  var xe = t.forwardRef((r2, o) => {
    let { open: n, onOpenChange: u2, overlayClassName: c, contentClassName: d, container: f, ...p2 } = r2;
    return t.createElement(Root, { open: n, onOpenChange: u2 }, t.createElement(Portal2, { container: f }, t.createElement(Overlay, { "cmdk-overlay": "", className: c }), t.createElement(Content, { "aria-label": r2.label, "cmdk-dialog": "", className: d }, t.createElement(me, { ref: o, ...p2 }))));
  });
  var Ie = t.forwardRef((r2, o) => P((u2) => u2.filtered.count === 0) ? t.createElement(Primitive5.div, { ref: o, ...r2, "cmdk-empty": "", role: "presentation" }) : null);
  var Pe = t.forwardRef((r2, o) => {
    let { progress: n, children: u2, label: c = "Loading...", ...d } = r2;
    return t.createElement(Primitive5.div, { ref: o, ...d, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": c }, B2(r2, (f) => t.createElement("div", { "aria-hidden": true }, f)));
  });
  var _e = Object.assign(me, { List: Ce, Item: he, Input: Se, Group: Ee, Separator: ye, Dialog: xe, Empty: Ie, Loading: Pe });
  function we(r2, o) {
    let n = r2.nextElementSibling;
    for (; n; ) {
      if (n.matches(o)) return n;
      n = n.nextElementSibling;
    }
  }
  function De(r2, o) {
    let n = r2.previousElementSibling;
    for (; n; ) {
      if (n.matches(o)) return n;
      n = n.previousElementSibling;
    }
  }
  function pe(r2) {
    let o = t.useRef(r2);
    return k2(() => {
      o.current = r2;
    }), o;
  }
  var k2 = typeof window == "undefined" ? t.useEffect : t.useLayoutEffect;
  function L(r2) {
    let o = t.useRef();
    return o.current === void 0 && (o.current = r2()), o;
  }
  function P(r2) {
    let o = ee(), n = () => r2(o.snapshot());
    return t.useSyncExternalStore(o.subscribe, n, n);
  }
  function ve(r2, o, n, u2 = []) {
    let c = t.useRef(), d = K2();
    return k2(() => {
      var b;
      let f = (() => {
        var m2;
        for (let R of n) {
          if (typeof R == "string") return R.trim();
          if (typeof R == "object" && "current" in R) return R.current ? (m2 = R.current.textContent) == null ? void 0 : m2.trim() : c.current;
        }
      })(), p2 = u2.map((m2) => m2.trim());
      d.value(r2, f, p2), (b = o.current) == null || b.setAttribute(T, f), c.current = f;
    }), c;
  }
  var ke = () => {
    let [r2, o] = t.useState(), n = L(() => /* @__PURE__ */ new Map());
    return k2(() => {
      n.current.forEach((u2) => u2()), n.current = /* @__PURE__ */ new Map();
    }, [r2]), (u2, c) => {
      n.current.set(u2, c), o({});
    };
  };
  function Me(r2) {
    let o = r2.type;
    return typeof o == "function" ? o(r2.props) : "render" in o ? o.render(r2.props) : r2;
  }
  function B2({ asChild: r2, children: o }, n) {
    return r2 && t.isValidElement(o) ? t.cloneElement(Me(o), { ref: o.ref }, n(o.props.children)) : n(o);
  }
  var Te = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };

  // node_modules/clsx/dist/clsx.mjs
  function r(e) {
    var t2, 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 (t2 = 0; t2 < o; t2++) e[t2] && (f = r(e[t2])) && (n && (n += " "), n += f);
    } else for (f in e) e[f] && (n && (n += " "), n += f);
    return n;
  }
  function clsx() {
    for (var e, t2, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t2 = r(e)) && (n && (n += " "), n += t2);
    return n;
  }
  var clsx_default = clsx;

  // packages/commands/build-module/components/command-menu.mjs
  var import_data4 = __toESM(require_data(), 1);
  var import_element2 = __toESM(require_element(), 1);
  var import_i18n = __toESM(require_i18n(), 1);
  var import_components = __toESM(require_components(), 1);
  var import_keyboard_shortcuts = __toESM(require_keyboard_shortcuts(), 1);

  // packages/icons/build-module/icon/index.mjs
  var import_element = __toESM(require_element(), 1);
  var icon_default = (0, import_element.forwardRef)(
    ({ icon, size = 24, ...props }, ref) => {
      return (0, import_element.cloneElement)(icon, {
        width: size,
        height: size,
        ...props,
        ref
      });
    }
  );

  // packages/icons/build-module/library/arrow-right.mjs
  var import_primitives = __toESM(require_primitives(), 1);
  var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
  var arrow_right_default = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives.Path, { d: "m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z" }) });

  // packages/icons/build-module/library/search.mjs
  var import_primitives2 = __toESM(require_primitives(), 1);
  var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
  var search_default = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives2.Path, { 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" }) });

  // packages/commands/build-module/store/index.mjs
  var import_data3 = __toESM(require_data(), 1);

  // packages/commands/build-module/store/reducer.mjs
  var import_data = __toESM(require_data(), 1);
  function commands(state = {}, action) {
    switch (action.type) {
      case "REGISTER_COMMAND":
        return {
          ...state,
          [action.name]: {
            name: action.name,
            label: action.label,
            searchLabel: action.searchLabel,
            context: action.context,
            category: action.category,
            callback: action.callback,
            icon: action.icon,
            keywords: action.keywords
          }
        };
      case "UNREGISTER_COMMAND": {
        const { [action.name]: _, ...remainingState } = state;
        return remainingState;
      }
    }
    return state;
  }
  function commandLoaders(state = {}, action) {
    switch (action.type) {
      case "REGISTER_COMMAND_LOADER":
        return {
          ...state,
          [action.name]: {
            name: action.name,
            context: action.context,
            category: action.category,
            hook: action.hook
          }
        };
      case "UNREGISTER_COMMAND_LOADER": {
        const { [action.name]: _, ...remainingState } = state;
        return remainingState;
      }
    }
    return state;
  }
  function isOpen(state = false, action) {
    switch (action.type) {
      case "OPEN":
        return true;
      case "CLOSE":
        return false;
    }
    return state;
  }
  function context(state = "root", action) {
    switch (action.type) {
      case "SET_CONTEXT":
        return action.context;
    }
    return state;
  }
  var reducer = (0, import_data.combineReducers)({
    commands,
    commandLoaders,
    isOpen,
    context
  });
  var reducer_default = reducer;

  // packages/commands/build-module/store/actions.mjs
  var actions_exports = {};
  __export(actions_exports, {
    close: () => close,
    open: () => open,
    registerCommand: () => registerCommand,
    registerCommandLoader: () => registerCommandLoader,
    unregisterCommand: () => unregisterCommand,
    unregisterCommandLoader: () => unregisterCommandLoader
  });
  var REGISTERABLE_CATEGORIES = /* @__PURE__ */ new Set([
    "command",
    "view",
    "edit",
    "action"
  ]);
  function registerCommand(config) {
    let { category } = config;
    if (!category || !REGISTERABLE_CATEGORIES.has(category)) {
      category = "action";
    }
    return {
      type: "REGISTER_COMMAND",
      ...config,
      category
    };
  }
  function unregisterCommand(name) {
    return {
      type: "UNREGISTER_COMMAND",
      name
    };
  }
  function registerCommandLoader(config) {
    let { category } = config;
    if (!category || !REGISTERABLE_CATEGORIES.has(category)) {
      category = "action";
    }
    return {
      type: "REGISTER_COMMAND_LOADER",
      ...config,
      category
    };
  }
  function unregisterCommandLoader(name) {
    return {
      type: "UNREGISTER_COMMAND_LOADER",
      name
    };
  }
  function open() {
    return {
      type: "OPEN"
    };
  }
  function close() {
    return {
      type: "CLOSE"
    };
  }

  // packages/commands/build-module/store/selectors.mjs
  var selectors_exports = {};
  __export(selectors_exports, {
    getCommandLoaders: () => getCommandLoaders,
    getCommands: () => getCommands,
    getContext: () => getContext,
    isOpen: () => isOpen2
  });
  var import_data2 = __toESM(require_data(), 1);
  var getCommands = (0, import_data2.createSelector)(
    (state, contextual = false) => Object.values(state.commands).filter((command) => {
      const isContextual = command.context && command.context === state.context;
      return contextual ? isContextual : !isContextual;
    }),
    (state) => [state.commands, state.context]
  );
  var getCommandLoaders = (0, import_data2.createSelector)(
    (state, contextual = false) => Object.values(state.commandLoaders).filter((loader) => {
      const isContextual = loader.context && loader.context === state.context;
      return contextual ? isContextual : !isContextual;
    }),
    (state) => [state.commandLoaders, state.context]
  );
  function isOpen2(state) {
    return state.isOpen;
  }
  function getContext(state) {
    return state.context;
  }

  // packages/commands/build-module/store/private-actions.mjs
  var private_actions_exports = {};
  __export(private_actions_exports, {
    setContext: () => setContext
  });
  function setContext(context2) {
    return {
      type: "SET_CONTEXT",
      context: context2
    };
  }

  // packages/commands/build-module/lock-unlock.mjs
  var import_private_apis = __toESM(require_private_apis(), 1);
  var { lock, unlock } = (0, import_private_apis.__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/commands"
  );

  // packages/commands/build-module/store/index.mjs
  var STORE_NAME = "core/commands";
  var store = (0, import_data3.createReduxStore)(STORE_NAME, {
    reducer: reducer_default,
    actions: actions_exports,
    selectors: selectors_exports
  });
  (0, import_data3.register)(store);
  unlock(store).registerPrivateActions(private_actions_exports);

  // packages/commands/build-module/components/command-menu.mjs
  var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
  var { withIgnoreIMEEvents } = unlock(import_components.privateApis);
  var inputLabel = (0, import_i18n.__)("Search commands and settings");
  var CATEGORY_ICONS = {
    view: arrow_right_default
  };
  var CATEGORY_LABELS = {
    command: (0, import_i18n.__)("Command"),
    view: (0, import_i18n.__)("View"),
    edit: (0, import_i18n.__)("Edit"),
    action: (0, import_i18n.__)("Action"),
    workflow: (0, import_i18n.__)("Workflow")
  };
  function isValidIcon(icon) {
    return !!icon && (typeof icon === "string" || (0, import_element2.isValidElement)(icon) || typeof icon === "function" || icon instanceof import_element2.Component);
  }
  function CommandMenuLoader({
    name,
    search,
    hook,
    setLoader,
    close: close2,
    category
  }) {
    const { isLoading, commands: commands2 = [] } = hook({ search }) ?? {};
    (0, import_element2.useEffect)(() => {
      setLoader(name, isLoading);
    }, [setLoader, name, isLoading]);
    if (!commands2.length) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children: commands2.map((command) => {
      const commandCategory = command.category ?? category;
      return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
        _e.Item,
        {
          value: command.searchLabel ?? command.label,
          keywords: command.keywords,
          onSelect: () => command.callback({ close: close2 }),
          id: command.name,
          children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
            import_components.__experimentalHStack,
            {
              alignment: "left",
              className: clsx_default("commands-command-menu__item", {
                "has-icon": CATEGORY_ICONS[commandCategory] || command.icon
              }),
              children: [
                CATEGORY_ICONS[commandCategory] && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
                  icon_default,
                  {
                    icon: CATEGORY_ICONS[commandCategory]
                  }
                ),
                !CATEGORY_ICONS[commandCategory] && isValidIcon(command.icon) && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(icon_default, { icon: command.icon }),
                /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "commands-command-menu__item-label", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
                  import_components.TextHighlight,
                  {
                    text: command.label,
                    highlight: search
                  }
                ) }),
                CATEGORY_LABELS[commandCategory] && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "commands-command-menu__item-category", children: CATEGORY_LABELS[commandCategory] })
              ]
            }
          )
        },
        command.name
      );
    }) });
  }
  function CommandMenuLoaderWrapper({
    hook,
    search,
    setLoader,
    close: close2,
    category
  }) {
    const currentLoaderRef = (0, import_element2.useRef)(hook);
    const [key, setKey] = (0, import_element2.useState)(0);
    (0, import_element2.useEffect)(() => {
      if (currentLoaderRef.current !== hook) {
        currentLoaderRef.current = hook;
        setKey((prevKey) => prevKey + 1);
      }
    }, [hook]);
    return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
      CommandMenuLoader,
      {
        hook: currentLoaderRef.current,
        search,
        setLoader,
        close: close2,
        category
      },
      key
    );
  }
  function CommandMenuGroup({ isContextual, search, setLoader, close: close2 }) {
    const { commands: commands2, loaders } = (0, import_data4.useSelect)(
      (select) => {
        const { getCommands: getCommands2, getCommandLoaders: getCommandLoaders2 } = select(store);
        return {
          commands: getCommands2(isContextual),
          loaders: getCommandLoaders2(isContextual)
        };
      },
      [isContextual]
    );
    if (!commands2.length && !loaders.length) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(_e.Group, { children: [
      commands2.map((command) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
        _e.Item,
        {
          value: command.searchLabel ?? command.label,
          keywords: command.keywords,
          onSelect: () => command.callback({ close: close2 }),
          id: command.name,
          children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
            import_components.__experimentalHStack,
            {
              alignment: "left",
              className: clsx_default("commands-command-menu__item", {
                "has-icon": CATEGORY_ICONS[command.category] || command.icon
              }),
              children: [
                CATEGORY_ICONS[command.category] ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(icon_default, { icon: CATEGORY_ICONS[command.category] }) : command.icon && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(icon_default, { icon: command.icon }),
                /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
                  import_components.TextHighlight,
                  {
                    text: command.label,
                    highlight: search
                  }
                ) }),
                CATEGORY_LABELS[command.category] && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "commands-command-menu__item-category", children: CATEGORY_LABELS[command.category] })
              ]
            }
          )
        },
        command.name
      )),
      loaders.map((loader) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
        CommandMenuLoaderWrapper,
        {
          hook: loader.hook,
          search,
          setLoader,
          close: close2,
          category: loader.category
        },
        loader.name
      ))
    ] });
  }
  function CommandInput({ isOpen: isOpen3, search, setSearch }) {
    const commandMenuInput = (0, import_element2.useRef)();
    const _value = P((state) => state.value);
    const selectedItemId = (0, import_element2.useMemo)(() => {
      const item = document.querySelector(
        `[cmdk-item=""][data-value="${_value}"]`
      );
      return item?.getAttribute("id");
    }, [_value]);
    (0, import_element2.useEffect)(() => {
      if (isOpen3) {
        commandMenuInput.current.focus();
      }
    }, [isOpen3]);
    return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
      _e.Input,
      {
        ref: commandMenuInput,
        value: search,
        onValueChange: setSearch,
        placeholder: inputLabel,
        "aria-activedescendant": selectedItemId
      }
    );
  }
  function CommandMenu() {
    const { registerShortcut } = (0, import_data4.useDispatch)(import_keyboard_shortcuts.store);
    const [search, setSearch] = (0, import_element2.useState)("");
    const isOpen3 = (0, import_data4.useSelect)(
      (select) => select(store).isOpen(),
      []
    );
    const { open: open2, close: close2 } = (0, import_data4.useDispatch)(store);
    const [loaders, setLoaders] = (0, import_element2.useState)({});
    (0, import_element2.useEffect)(() => {
      registerShortcut({
        name: "core/commands",
        category: "global",
        description: (0, import_i18n.__)("Open the command palette."),
        keyCombination: {
          modifier: "primary",
          character: "k"
        }
      });
    }, [registerShortcut]);
    (0, import_keyboard_shortcuts.useShortcut)(
      "core/commands",
      /** @type {React.KeyboardEventHandler} */
      withIgnoreIMEEvents((event) => {
        if (event.defaultPrevented) {
          return;
        }
        event.preventDefault();
        if (isOpen3) {
          close2();
        } else {
          open2();
        }
      }),
      {
        bindGlobal: true
      }
    );
    const setLoader = (0, import_element2.useCallback)(
      (name, value) => setLoaders((current) => ({
        ...current,
        [name]: value
      })),
      []
    );
    const closeAndReset = () => {
      setSearch("");
      close2();
    };
    if (!isOpen3) {
      return false;
    }
    const isLoading = Object.values(loaders).some(Boolean);
    return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
      import_components.Modal,
      {
        className: "commands-command-menu",
        overlayClassName: "commands-command-menu__overlay",
        onRequestClose: closeAndReset,
        __experimentalHideHeader: true,
        contentLabel: (0, import_i18n.__)("Command palette"),
        children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "commands-command-menu__container", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(_e, { label: inputLabel, children: [
          /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "commands-command-menu__header", children: [
            /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
              icon_default,
              {
                className: "commands-command-menu__header-search-icon",
                icon: search_default
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
              CommandInput,
              {
                search,
                setSearch,
                isOpen: isOpen3
              }
            )
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(_e.List, { label: (0, import_i18n.__)("Command suggestions"), children: [
            search && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(_e.Empty, { children: (0, import_i18n.__)("No results found.") }),
            /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
              CommandMenuGroup,
              {
                search,
                setLoader,
                close: closeAndReset,
                isContextual: true
              }
            ),
            search && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
              CommandMenuGroup,
              {
                search,
                setLoader,
                close: closeAndReset
              }
            )
          ] })
        ] }) })
      }
    );
  }

  // packages/commands/build-module/hooks/use-command-context.mjs
  var import_element3 = __toESM(require_element(), 1);
  var import_data5 = __toESM(require_data(), 1);
  function useCommandContext(context2) {
    const { getContext: getContext2 } = (0, import_data5.useSelect)(store);
    const initialContext = (0, import_element3.useRef)(getContext2());
    const { setContext: setContext2 } = unlock((0, import_data5.useDispatch)(store));
    (0, import_element3.useEffect)(() => {
      setContext2(context2);
    }, [context2, setContext2]);
    (0, import_element3.useEffect)(() => {
      const initialContextRef = initialContext.current;
      return () => setContext2(initialContextRef);
    }, [setContext2]);
  }

  // packages/commands/build-module/private-apis.mjs
  var privateApis = {};
  lock(privateApis, {
    useCommandContext
  });

  // packages/commands/build-module/hooks/use-command.mjs
  var import_element4 = __toESM(require_element(), 1);
  var import_data6 = __toESM(require_data(), 1);
  function useCommand(command) {
    const { registerCommand: registerCommand2, unregisterCommand: unregisterCommand2 } = (0, import_data6.useDispatch)(store);
    const currentCallbackRef = (0, import_element4.useRef)(command.callback);
    (0, import_element4.useEffect)(() => {
      currentCallbackRef.current = command.callback;
    }, [command.callback]);
    (0, import_element4.useEffect)(() => {
      if (command.disabled) {
        return;
      }
      registerCommand2({
        name: command.name,
        context: command.context,
        category: command.category,
        label: command.label,
        searchLabel: command.searchLabel,
        icon: command.icon,
        keywords: command.keywords,
        callback: (...args) => currentCallbackRef.current(...args)
      });
      return () => {
        unregisterCommand2(command.name);
      };
    }, [
      command.name,
      command.label,
      command.searchLabel,
      command.icon,
      command.context,
      command.category,
      command.keywords,
      command.disabled,
      registerCommand2,
      unregisterCommand2
    ]);
  }
  function useCommands(commands2) {
    const { registerCommand: registerCommand2, unregisterCommand: unregisterCommand2 } = (0, import_data6.useDispatch)(store);
    const currentCallbacksRef = (0, import_element4.useRef)({});
    (0, import_element4.useEffect)(() => {
      if (!commands2) {
        return;
      }
      commands2.forEach((command) => {
        if (command.callback) {
          currentCallbacksRef.current[command.name] = command.callback;
        }
      });
    }, [commands2]);
    (0, import_element4.useEffect)(() => {
      if (!commands2) {
        return;
      }
      commands2.forEach((command) => {
        if (command.disabled) {
          return;
        }
        registerCommand2({
          name: command.name,
          context: command.context,
          category: command.category,
          label: command.label,
          searchLabel: command.searchLabel,
          icon: command.icon,
          keywords: command.keywords,
          callback: (...args) => {
            const callback = currentCallbacksRef.current[command.name];
            if (callback) {
              callback(...args);
            }
          }
        });
      });
      return () => {
        commands2.forEach((command) => {
          unregisterCommand2(command.name);
        });
      };
    }, [commands2, registerCommand2, unregisterCommand2]);
  }

  // packages/commands/build-module/hooks/use-command-loader.mjs
  var import_element5 = __toESM(require_element(), 1);
  var import_data7 = __toESM(require_data(), 1);
  function useCommandLoader(loader) {
    const { registerCommandLoader: registerCommandLoader2, unregisterCommandLoader: unregisterCommandLoader2 } = (0, import_data7.useDispatch)(store);
    (0, import_element5.useEffect)(() => {
      if (loader.disabled) {
        return;
      }
      registerCommandLoader2({
        name: loader.name,
        hook: loader.hook,
        context: loader.context,
        category: loader.category
      });
      return () => {
        unregisterCommandLoader2(loader.name);
      };
    }, [
      loader.name,
      loader.hook,
      loader.context,
      loader.category,
      loader.disabled,
      registerCommandLoader2,
      unregisterCommandLoader2
    ]);
  }
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                              dist/commands.min.js                                                                                0000644                 00000176152 15212563770 0010454 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;(wp||={}).commands=(()=>{var pn=Object.create;var ze=Object.defineProperty;var vn=Object.getOwnPropertyDescriptor;var hn=Object.getOwnPropertyNames;var gn=Object.getPrototypeOf,yn=Object.prototype.hasOwnProperty;var oe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qe=(e,t)=>{for(var r in t)ze(e,r,{get:t[r],enumerable:!0})},Mr=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of hn(t))!yn.call(e,a)&&a!==r&&ze(e,a,{get:()=>t[a],enumerable:!(o=vn(t,a))||o.enumerable});return e};var m=(e,t,r)=>(r=e!=null?pn(gn(e)):{},Mr(t||!e||!e.__esModule?ze(r,"default",{value:e,enumerable:!0}):r,e)),Rn=e=>Mr(ze({},"__esModule",{value:!0}),e);var w=oe((fl,Vr)=>{Vr.exports=window.React});var B=oe((pl,Hr)=>{Hr.exports=window.ReactJSXRuntime});var pe=oe((Cl,Yr)=>{Yr.exports=window.ReactDOM});var ce=oe((Qf,$a)=>{$a.exports=window.wp.data});var Te=oe((ec,Ua)=>{Ua.exports=window.wp.element});var Ga=oe((tc,Ha)=>{Ha.exports=window.wp.i18n});var za=oe((rc,Ka)=>{Ka.exports=window.wp.components});var Ya=oe((oc,qa)=>{qa.exports=window.wp.keyboardShortcuts});var br=oe((nc,Xa)=>{Xa.exports=window.wp.primitives});var tn=oe((vc,en)=>{en.exports=window.wp.privateApis});var sl={};qe(sl,{CommandMenu:()=>sn,privateApis:()=>Dr,store:()=>K,useCommand:()=>un,useCommandLoader:()=>mn,useCommands:()=>fn});var Fr=1,bn=.9,wn=.8,En=.17,At=.1,It=.999,Cn=.9999,Sn=.99,xn=/[\\\/_+.#"@\[\(\{&]/,On=/[\\\/_+.#"@\[\(\{&]/g,_n=/[\s-]/,Wr=/[\s-]/g;function Lt(e,t,r,o,a,n,s){if(n===t.length)return a===e.length?Fr:Sn;var i=`${a},${n}`;if(s[i]!==void 0)return s[i];for(var u=o.charAt(n),l=r.indexOf(u,a),c=0,f,h,g,_;l>=0;)f=Lt(e,t,r,o,l+1,n+1,s),f>c&&(l===a?f*=Fr:xn.test(e.charAt(l-1))?(f*=wn,g=e.slice(a,l-1).match(On),g&&a>0&&(f*=Math.pow(It,g.length))):_n.test(e.charAt(l-1))?(f*=bn,_=e.slice(a,l-1).match(Wr),_&&a>0&&(f*=Math.pow(It,_.length))):(f*=En,a>0&&(f*=Math.pow(It,l-a))),e.charAt(l)!==t.charAt(n)&&(f*=Cn)),(f<At&&r.charAt(l-1)===o.charAt(n+1)||o.charAt(n+1)===o.charAt(n)&&r.charAt(l-1)!==o.charAt(n))&&(h=Lt(e,t,r,o,l+1,n+2,s),h*At>f&&(f=h*At)),f>c&&(c=f),l=r.indexOf(u,l+1);return s[i]=c,c}function jr(e){return e.toLowerCase().replace(Wr," ")}function Br(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,Lt(e,t,jr(e),jr(t),0,0,{})}var I=m(w(),1);var cl=!!(typeof window<"u"&&window.document&&window.document.createElement);function Se(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e?.(a),r===!1||!a.defaultPrevented)return t?.(a)}}var Ur=m(w(),1);function $r(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Tt(...e){return t=>{let r=!1,o=e.map(a=>{let n=$r(a,t);return!r&&typeof n=="function"&&(r=!0),n});if(r)return()=>{for(let a=0;a<o.length;a++){let n=o[a];typeof n=="function"?n():$r(e[a],null)}}}}function Ye(...e){return Ur.useCallback(Tt(...e),e)}var J=m(w(),1),kt=m(B(),1);function Gr(e,t){let r=J.createContext(t),o=n=>{let{children:s,...i}=n,u=J.useMemo(()=>i,Object.values(i));return(0,kt.jsx)(r.Provider,{value:u,children:s})};o.displayName=e+"Provider";function a(n){let s=J.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${n}\` must be used within \`${e}\``)}return[o,a]}function Kr(e,t=[]){let r=[];function o(n,s){let i=J.createContext(s),u=r.length;r=[...r,s];let l=f=>{let{scope:h,children:g,..._}=f,p=h?.[e]?.[u]||i,b=J.useMemo(()=>_,Object.values(_));return(0,kt.jsx)(p.Provider,{value:b,children:g})};l.displayName=n+"Provider";function c(f,h){let g=h?.[e]?.[u]||i,_=J.useContext(g);if(_)return _;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${n}\``)}return[l,c]}let a=()=>{let n=r.map(s=>J.createContext(s));return function(i){let u=i?.[e]||n;return J.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return a.scopeName=e,[o,Pn(a,...t)]}function Pn(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(n){let s=o.reduce((i,{useScope:u,scopeName:l})=>{let f=u(n)[`__scope${l}`];return{...i,...f}},{});return J.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}var Mt=m(w(),1);var zr=m(w(),1),Xe=globalThis?.document?zr.useLayoutEffect:()=>{};var Dn=Mt[" useId ".trim().toString()]||(()=>{}),Nn=0;function Ze(e){let[t,r]=Mt.useState(Dn());return Xe(()=>{e||r(o=>o??String(Nn++))},[e]),e||(t?`radix-${t}`:"")}var Q=m(w(),1);var Je=m(w(),1);var An=Q[" useInsertionEffect ".trim().toString()]||Xe;function qr({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){let[a,n,s]=In({defaultProp:t,onChange:r}),i=e!==void 0,u=i?e:a;{let c=Q.useRef(e!==void 0);Q.useEffect(()=>{let f=c.current;f!==i&&console.warn(`${o} is changing from ${f?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=i},[i,o])}let l=Q.useCallback(c=>{if(i){let f=Ln(c)?c(e):c;f!==e&&s.current?.(f)}else n(c)},[i,e,n,s]);return[u,l]}function In({defaultProp:e,onChange:t}){let[r,o]=Q.useState(e),a=Q.useRef(r),n=Q.useRef(t);return An(()=>{n.current=t},[t]),Q.useEffect(()=>{a.current!==r&&(n.current?.(r),a.current=r)},[r,a]),[r,o,n]}function Ln(e){return typeof e=="function"}var F=m(w(),1);var wl=!!(typeof window<"u"&&window.document&&window.document.createElement);function Qe(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e?.(a),r===!1||!a.defaultPrevented)return t?.(a)}}var Qr=m(w(),1),eo=m(pe(),1);var V=m(w(),1);var Zr=m(w(),1);function Xr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ft(...e){return t=>{let r=!1,o=e.map(a=>{let n=Xr(a,t);return!r&&typeof n=="function"&&(r=!0),n});if(r)return()=>{for(let a=0;a<o.length;a++){let n=o[a];typeof n=="function"?n():Xr(e[a],null)}}}}function jt(...e){return Zr.useCallback(Ft(...e),e)}var et=m(B(),1);function Jr(e){let t=Tn(e),r=V.forwardRef((o,a)=>{let{children:n,...s}=o,i=V.Children.toArray(n),u=i.find(Mn);if(u){let l=u.props.children,c=i.map(f=>f===u?V.Children.count(l)>1?V.Children.only(null):V.isValidElement(l)?l.props.children:null:f);return(0,et.jsx)(t,{...s,ref:a,children:V.isValidElement(l)?V.cloneElement(l,void 0,c):null})}return(0,et.jsx)(t,{...s,ref:a,children:n})});return r.displayName=`${e}.Slot`,r}function Tn(e){let t=V.forwardRef((r,o)=>{let{children:a,...n}=r;if(V.isValidElement(a)){let s=jn(a),i=Fn(n,a.props);return a.type!==V.Fragment&&(i.ref=o?Ft(o,s):s),V.cloneElement(a,i)}return V.Children.count(a)>1?V.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var kn=Symbol("radix.slottable");function Mn(e){return V.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===kn}function Fn(e,t){let r={...t};for(let o in t){let a=e[o],n=t[o];/^on[A-Z]/.test(o)?a&&n?r[o]=(...i)=>{let u=n(...i);return a(...i),u}:a&&(r[o]=a):o==="style"?r[o]={...a,...n}:o==="className"&&(r[o]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}function jn(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var to=m(B(),1),Wn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Wt=Wn.reduce((e,t)=>{let r=Jr(`Primitive.${t}`),o=Qr.forwardRef((a,n)=>{let{asChild:s,...i}=a,u=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,to.jsx)(u,{...i,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function ro(e,t){e&&eo.flushSync(()=>e.dispatchEvent(t))}var xe=m(w(),1);function je(e){let t=xe.useRef(e);return xe.useEffect(()=>{t.current=e}),xe.useMemo(()=>(...r)=>t.current?.(...r),[])}var oo=m(w(),1);function ao(e,t=globalThis?.document){let r=je(e);oo.useEffect(()=>{let o=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[r,t])}var Vt=m(B(),1),Bn="DismissableLayer",Bt="dismissableLayer.update",Vn="dismissableLayer.pointerDownOutside",$n="dismissableLayer.focusOutside",no,so=F.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$t=F.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:n,onInteractOutside:s,onDismiss:i,...u}=e,l=F.useContext(so),[c,f]=F.useState(null),h=c?.ownerDocument??globalThis?.document,[,g]=F.useState({}),_=jt(t,R=>f(R)),p=Array.from(l.layers),[b]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),S=p.indexOf(b),P=c?p.indexOf(c):-1,T=l.layersWithOutsidePointerEventsDisabled.size>0,k=P>=S,D=Gn(R=>{let z=R.target,se=[...l.branches].some(me=>me.contains(z));!k||se||(a?.(R),s?.(R),R.defaultPrevented||i?.())},h),C=Kn(R=>{let z=R.target;[...l.branches].some(me=>me.contains(z))||(n?.(R),s?.(R),R.defaultPrevented||i?.())},h);return ao(R=>{P===l.layers.size-1&&(o?.(R),!R.defaultPrevented&&i&&(R.preventDefault(),i()))},h),F.useEffect(()=>{if(c)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(no=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),io(),()=>{r&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=no)}},[c,h,r,l]),F.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),io())},[c,l]),F.useEffect(()=>{let R=()=>g({});return document.addEventListener(Bt,R),()=>document.removeEventListener(Bt,R)},[]),(0,Vt.jsx)(Wt.div,{...u,ref:_,style:{pointerEvents:T?k?"auto":"none":void 0,...e.style},onFocusCapture:Qe(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Qe(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Qe(e.onPointerDownCapture,D.onPointerDownCapture)})});$t.displayName=Bn;var Un="DismissableLayerBranch",Hn=F.forwardRef((e,t)=>{let r=F.useContext(so),o=F.useRef(null),a=jt(t,o);return F.useEffect(()=>{let n=o.current;if(n)return r.branches.add(n),()=>{r.branches.delete(n)}},[r.branches]),(0,Vt.jsx)(Wt.div,{...e,ref:a})});Hn.displayName=Un;function Gn(e,t=globalThis?.document){let r=je(e),o=F.useRef(!1),a=F.useRef(()=>{});return F.useEffect(()=>{let n=i=>{if(i.target&&!o.current){let l=function(){lo(Vn,r,c,{discrete:!0})};var u=l;let c={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=l,t.addEventListener("click",a.current,{once:!0})):l()}else t.removeEventListener("click",a.current);o.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",n)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",n),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}function Kn(e,t=globalThis?.document){let r=je(e),o=F.useRef(!1);return F.useEffect(()=>{let a=n=>{n.target&&!o.current&&lo($n,r,{originalEvent:n},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function io(){let e=new CustomEvent(Bt);document.dispatchEvent(e)}function lo(e,t,r,{discrete:o}){let a=r.originalEvent.target,n=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),o?ro(a,n):a.dispatchEvent(n)}var ee=m(w(),1);var fo=m(w(),1);function uo(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ut(...e){return t=>{let r=!1,o=e.map(a=>{let n=uo(a,t);return!r&&typeof n=="function"&&(r=!0),n});if(r)return()=>{for(let a=0;a<o.length;a++){let n=o[a];typeof n=="function"?n():uo(e[a],null)}}}}function co(...e){return fo.useCallback(Ut(...e),e)}var po=m(w(),1),Jn=m(pe(),1);var $=m(w(),1);var tt=m(B(),1);function mo(e){let t=zn(e),r=$.forwardRef((o,a)=>{let{children:n,...s}=o,i=$.Children.toArray(n),u=i.find(Yn);if(u){let l=u.props.children,c=i.map(f=>f===u?$.Children.count(l)>1?$.Children.only(null):$.isValidElement(l)?l.props.children:null:f);return(0,tt.jsx)(t,{...s,ref:a,children:$.isValidElement(l)?$.cloneElement(l,void 0,c):null})}return(0,tt.jsx)(t,{...s,ref:a,children:n})});return r.displayName=`${e}.Slot`,r}function zn(e){let t=$.forwardRef((r,o)=>{let{children:a,...n}=r;if($.isValidElement(a)){let s=Zn(a),i=Xn(n,a.props);return a.type!==$.Fragment&&(i.ref=o?Ut(o,s):s),$.cloneElement(a,i)}return $.Children.count(a)>1?$.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var qn=Symbol("radix.slottable");function Yn(e){return $.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===qn}function Xn(e,t){let r={...t};for(let o in t){let a=e[o],n=t[o];/^on[A-Z]/.test(o)?a&&n?r[o]=(...i)=>{let u=n(...i);return a(...i),u}:a&&(r[o]=a):o==="style"?r[o]={...a,...n}:o==="className"&&(r[o]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}function Zn(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var vo=m(B(),1),Qn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ho=Qn.reduce((e,t)=>{let r=mo(`Primitive.${t}`),o=po.forwardRef((a,n)=>{let{asChild:s,...i}=a,u=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,vo.jsx)(u,{...i,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});var Oe=m(w(),1);function Ht(e){let t=Oe.useRef(e);return Oe.useEffect(()=>{t.current=e}),Oe.useMemo(()=>(...r)=>t.current?.(...r),[])}var wo=m(B(),1),Gt="focusScope.autoFocusOnMount",Kt="focusScope.autoFocusOnUnmount",go={bubbles:!1,cancelable:!0},ei="FocusScope",zt=ee.forwardRef((e,t)=>{let{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:n,...s}=e,[i,u]=ee.useState(null),l=Ht(a),c=Ht(n),f=ee.useRef(null),h=co(t,p=>u(p)),g=ee.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;ee.useEffect(()=>{if(o){let P=function(C){if(g.paused||!i)return;let R=C.target;i.contains(R)?f.current=R:le(f.current,{select:!0})},T=function(C){if(g.paused||!i)return;let R=C.relatedTarget;R!==null&&(i.contains(R)||le(f.current,{select:!0}))},k=function(C){if(document.activeElement===document.body)for(let z of C)z.removedNodes.length>0&&le(i)};var p=P,b=T,S=k;document.addEventListener("focusin",P),document.addEventListener("focusout",T);let D=new MutationObserver(k);return i&&D.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",P),document.removeEventListener("focusout",T),D.disconnect()}}},[o,i,g.paused]),ee.useEffect(()=>{if(i){Ro.add(g);let p=document.activeElement;if(!i.contains(p)){let S=new CustomEvent(Gt,go);i.addEventListener(Gt,l),i.dispatchEvent(S),S.defaultPrevented||(ti(ii(Eo(i)),{select:!0}),document.activeElement===p&&le(i))}return()=>{i.removeEventListener(Gt,l),setTimeout(()=>{let S=new CustomEvent(Kt,go);i.addEventListener(Kt,c),i.dispatchEvent(S),S.defaultPrevented||le(p??document.body,{select:!0}),i.removeEventListener(Kt,c),Ro.remove(g)},0)}}},[i,l,c,g]);let _=ee.useCallback(p=>{if(!r&&!o||g.paused)return;let b=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,S=document.activeElement;if(b&&S){let P=p.currentTarget,[T,k]=ri(P);T&&k?!p.shiftKey&&S===k?(p.preventDefault(),r&&le(T,{select:!0})):p.shiftKey&&S===T&&(p.preventDefault(),r&&le(k,{select:!0})):S===P&&p.preventDefault()}},[r,o,g.paused]);return(0,wo.jsx)(ho.div,{tabIndex:-1,...s,ref:h,onKeyDown:_})});zt.displayName=ei;function ti(e,{select:t=!1}={}){let r=document.activeElement;for(let o of e)if(le(o,{select:t}),document.activeElement!==r)return}function ri(e){let t=Eo(e),r=yo(t,e),o=yo(t.reverse(),e);return[r,o]}function Eo(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{let a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function yo(e,t){for(let r of e)if(!oi(r,{upTo:t}))return r}function oi(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ai(e){return e instanceof HTMLInputElement&&"select"in e}function le(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&ai(e)&&t&&e.select()}}var Ro=ni();function ni(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),e=bo(e,t),e.unshift(t)},remove(t){e=bo(e,t),e[0]?.resume()}}}function bo(e,t){let r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function ii(e){return e.filter(t=>t.tagName!=="A")}var ot=m(w(),1),Ao=m(pe(),1);var Oo=m(w(),1),mi=m(pe(),1);var U=m(w(),1);var si=m(w(),1);function Co(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function So(...e){return t=>{let r=!1,o=e.map(a=>{let n=Co(a,t);return!r&&typeof n=="function"&&(r=!0),n});if(r)return()=>{for(let a=0;a<o.length;a++){let n=o[a];typeof n=="function"?n():Co(e[a],null)}}}}var rt=m(B(),1);function xo(e){let t=li(e),r=U.forwardRef((o,a)=>{let{children:n,...s}=o,i=U.Children.toArray(n),u=i.find(fi);if(u){let l=u.props.children,c=i.map(f=>f===u?U.Children.count(l)>1?U.Children.only(null):U.isValidElement(l)?l.props.children:null:f);return(0,rt.jsx)(t,{...s,ref:a,children:U.isValidElement(l)?U.cloneElement(l,void 0,c):null})}return(0,rt.jsx)(t,{...s,ref:a,children:n})});return r.displayName=`${e}.Slot`,r}function li(e){let t=U.forwardRef((r,o)=>{let{children:a,...n}=r;if(U.isValidElement(a)){let s=di(a),i=ci(n,a.props);return a.type!==U.Fragment&&(i.ref=o?So(o,s):s),U.cloneElement(a,i)}return U.Children.count(a)>1?U.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ui=Symbol("radix.slottable");function fi(e){return U.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ui}function ci(e,t){let r={...t};for(let o in t){let a=e[o],n=t[o];/^on[A-Z]/.test(o)?a&&n?r[o]=(...i)=>{let u=n(...i);return a(...i),u}:a&&(r[o]=a):o==="style"?r[o]={...a,...n}:o==="className"&&(r[o]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}function di(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var _o=m(B(),1),pi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Po=pi.reduce((e,t)=>{let r=xo(`Primitive.${t}`),o=Oo.forwardRef((a,n)=>{let{asChild:s,...i}=a,u=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,_o.jsx)(u,{...i,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});var Do=m(w(),1),No=globalThis?.document?Do.useLayoutEffect:()=>{};var Io=m(B(),1),vi="Portal",qt=ot.forwardRef((e,t)=>{let{container:r,...o}=e,[a,n]=ot.useState(!1);No(()=>n(!0),[]);let s=r||a&&globalThis?.document?.body;return s?Ao.default.createPortal((0,Io.jsx)(Po.div,{...o,ref:t}),s):null});qt.displayName=vi;var Y=m(w(),1);var To=m(w(),1);function Lo(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function hi(...e){return t=>{let r=!1,o=e.map(a=>{let n=Lo(a,t);return!r&&typeof n=="function"&&(r=!0),n});if(r)return()=>{for(let a=0;a<o.length;a++){let n=o[a];typeof n=="function"?n():Lo(e[a],null)}}}}function ko(...e){return To.useCallback(hi(...e),e)}var Mo=m(w(),1),Yt=globalThis?.document?Mo.useLayoutEffect:()=>{};var Fo=m(w(),1);function gi(e,t){return Fo.useReducer((r,o)=>t[r][o]??r,e)}var We=e=>{let{present:t,children:r}=e,o=yi(t),a=typeof r=="function"?r({present:o.isPresent}):Y.Children.only(r),n=ko(o.ref,Ri(a));return typeof r=="function"||o.isPresent?Y.cloneElement(a,{ref:n}):null};We.displayName="Presence";function yi(e){let[t,r]=Y.useState(),o=Y.useRef(null),a=Y.useRef(e),n=Y.useRef("none"),s=e?"mounted":"unmounted",[i,u]=gi(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Y.useEffect(()=>{let l=at(o.current);n.current=i==="mounted"?l:"none"},[i]),Yt(()=>{let l=o.current,c=a.current;if(c!==e){let h=n.current,g=at(l);e?u("MOUNT"):g==="none"||l?.display==="none"?u("UNMOUNT"):u(c&&h!==g?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,u]),Yt(()=>{if(t){let l,c=t.ownerDocument.defaultView??window,f=g=>{let p=at(o.current).includes(CSS.escape(g.animationName));if(g.target===t&&p&&(u("ANIMATION_END"),!a.current)){let b=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=g=>{g.target===t&&(n.current=at(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:Y.useCallback(l=>{o.current=l?getComputedStyle(l):null,r(l)},[])}}function at(e){return e?.animationName||"none"}function Ri(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var jo=m(w(),1),xi=m(pe(),1);var H=m(w(),1);var nt=m(B(),1);function it(e){let t=bi(e),r=H.forwardRef((o,a)=>{let{children:n,...s}=o,i=H.Children.toArray(n),u=i.find(Ei);if(u){let l=u.props.children,c=i.map(f=>f===u?H.Children.count(l)>1?H.Children.only(null):H.isValidElement(l)?l.props.children:null:f);return(0,nt.jsx)(t,{...s,ref:a,children:H.isValidElement(l)?H.cloneElement(l,void 0,c):null})}return(0,nt.jsx)(t,{...s,ref:a,children:n})});return r.displayName=`${e}.Slot`,r}function bi(e){let t=H.forwardRef((r,o)=>{let{children:a,...n}=r;if(H.isValidElement(a)){let s=Si(a),i=Ci(n,a.props);return a.type!==H.Fragment&&(i.ref=o?Tt(o,s):s),H.cloneElement(a,i)}return H.Children.count(a)>1?H.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var wi=Symbol("radix.slottable");function Ei(e){return H.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===wi}function Ci(e,t){let r={...t};for(let o in t){let a=e[o],n=t[o];/^on[A-Z]/.test(o)?a&&n?r[o]=(...i)=>{let u=n(...i);return a(...i),u}:a&&(r[o]=a):o==="style"?r[o]={...a,...n}:o==="className"&&(r[o]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}function Si(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Wo=m(B(),1),Oi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_e=Oi.reduce((e,t)=>{let r=it(`Primitive.${t}`),o=jo.forwardRef((a,n)=>{let{asChild:s,...i}=a,u=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,Wo.jsx)(u,{...i,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});var Vo=m(w(),1),Xt=0;function $o(){Vo.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Bo()),document.body.insertAdjacentElement("beforeend",e[1]??Bo()),Xt++,()=>{Xt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Xt--}},[])}function Bo(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var X=function(){return X=Object.assign||function(t){for(var r,o=1,a=arguments.length;o<a;o++){r=arguments[o];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},X.apply(this,arguments)};function st(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(r[o[a]]=e[o[a]]);return r}function Uo(e,t,r){if(r||arguments.length===2)for(var o=0,a=t.length,n;o<a;o++)(n||!(o in t))&&(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var dt=m(w());var G=m(w());var ve="right-scroll-bar-position",he="width-before-scroll-bar",Zt="with-scroll-bars-hidden",Jt="--removed-body-scroll-bar-size";function lt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var Ho=m(w());function Go(e,t){var r=(0,Ho.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(o){var a=r.value;a!==o&&(r.value=o,r.callback(o,a))}}}})[0];return r.callback=t,r.facade}var ut=m(w());var _i=typeof window<"u"?ut.useLayoutEffect:ut.useEffect,Ko=new WeakMap;function Qt(e,t){var r=Go(t||null,function(o){return e.forEach(function(a){return lt(a,o)})});return _i(function(){var o=Ko.get(r);if(o){var a=new Set(o),n=new Set(e),s=r.current;a.forEach(function(i){n.has(i)||lt(i,null)}),n.forEach(function(i){a.has(i)||lt(i,s)})}Ko.set(r,e)},[e]),r}function Pi(e){return e}function Di(e,t){t===void 0&&(t=Pi);var r=[],o=!1,a={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(n){var s=t(n,o);return r.push(s),function(){r=r.filter(function(i){return i!==s})}},assignSyncMedium:function(n){for(o=!0;r.length;){var s=r;r=[],s.forEach(n)}r={push:function(i){return n(i)},filter:function(){return r}}},assignMedium:function(n){o=!0;var s=[];if(r.length){var i=r;r=[],i.forEach(n),s=r}var u=function(){var c=s;s=[],c.forEach(n)},l=function(){return Promise.resolve().then(u)};l(),r={push:function(c){s.push(c),l()},filter:function(c){return s=s.filter(c),r}}}};return a}function er(e){e===void 0&&(e={});var t=Di(null);return t.options=X({async:!0,ssr:!1},e),t}var zo=m(w()),qo=function(e){var t=e.sideCar,r=st(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return zo.createElement(o,X({},r))};qo.isSideCarExport=!0;function tr(e,t){return e.useMedium(t),qo}var ft=er();var rr=function(){},Be=G.forwardRef(function(e,t){var r=G.useRef(null),o=G.useState({onScrollCapture:rr,onWheelCapture:rr,onTouchMoveCapture:rr}),a=o[0],n=o[1],s=e.forwardProps,i=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,f=e.shards,h=e.sideCar,g=e.noRelative,_=e.noIsolation,p=e.inert,b=e.allowPinchZoom,S=e.as,P=S===void 0?"div":S,T=e.gapMode,k=st(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=h,C=Qt([r,t]),R=X(X({},k),a);return G.createElement(G.Fragment,null,c&&G.createElement(D,{sideCar:ft,removeScrollBar:l,shards:f,noRelative:g,noIsolation:_,inert:p,setCallbacks:n,allowPinchZoom:!!b,lockRef:r,gapMode:T}),s?G.cloneElement(G.Children.only(i),X(X({},R),{ref:C})):G.createElement(P,X({},R,{className:u,ref:C}),i))});Be.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Be.classNames={fullWidth:he,zeroRight:ve};var L=m(w());var De=m(w());var Zo=m(w());var Yo;var Xo=function(){if(Yo)return Yo;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ni(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Xo();return t&&e.setAttribute("nonce",t),e}function Ai(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ii(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var or=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Ni())&&(Ai(t,r),Ii(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var ar=function(){var e=or();return function(t,r){Zo.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}};var Ve=function(){var e=ar(),t=function(r){var o=r.styles,a=r.dynamic;return e(o,a),null};return t};var Li={left:0,top:0,right:0,gap:0},nr=function(e){return parseInt(e||"",10)||0},Ti=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[nr(r),nr(o),nr(a)]},ir=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Li;var t=Ti(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-r+t[2]-t[0])}};var ki=Ve(),Pe="data-scroll-locked",Mi=function(e,t,r,o){var a=e.left,n=e.top,s=e.right,i=e.gap;return r===void 0&&(r="margin"),`
  .`.concat(Zt,` {
   overflow: hidden `).concat(o,`;
   padding-right: `).concat(i,"px ").concat(o,`;
  }
  body[`).concat(Pe,`] {
    overflow: hidden `).concat(o,`;
    overscroll-behavior: contain;
    `).concat([t&&"position: relative ".concat(o,";"),r==="margin"&&`
    padding-left: `.concat(a,`px;
    padding-top: `).concat(n,`px;
    padding-right: `).concat(s,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(i,"px ").concat(o,`;
    `),r==="padding"&&"padding-right: ".concat(i,"px ").concat(o,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(ve,` {
    right: `).concat(i,"px ").concat(o,`;
  }
  
  .`).concat(he,` {
    margin-right: `).concat(i,"px ").concat(o,`;
  }
  
  .`).concat(ve," .").concat(ve,` {
    right: 0 `).concat(o,`;
  }
  
  .`).concat(he," .").concat(he,` {
    margin-right: 0 `).concat(o,`;
  }
  
  body[`).concat(Pe,`] {
    `).concat(Jt,": ").concat(i,`px;
  }
`)},Jo=function(){var e=parseInt(document.body.getAttribute(Pe)||"0",10);return isFinite(e)?e:0},Fi=function(){De.useEffect(function(){return document.body.setAttribute(Pe,(Jo()+1).toString()),function(){var e=Jo()-1;e<=0?document.body.removeAttribute(Pe):document.body.setAttribute(Pe,e.toString())}},[])},sr=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,a=o===void 0?"margin":o;Fi();var n=De.useMemo(function(){return ir(a)},[a]);return De.createElement(ki,{styles:Mi(n,!t,a,r?"":"!important")})};var lr=!1;if(typeof window<"u")try{$e=Object.defineProperty({},"passive",{get:function(){return lr=!0,!0}}),window.addEventListener("test",$e,$e),window.removeEventListener("test",$e,$e)}catch{lr=!1}var $e,ge=lr?{passive:!1}:!1;var ji=function(e){return e.tagName==="TEXTAREA"},Qo=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!ji(e)&&r[t]==="visible")},Wi=function(e){return Qo(e,"overflowY")},Bi=function(e){return Qo(e,"overflowX")},ur=function(e,t){var r=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var a=ea(e,o);if(a){var n=ta(e,o),s=n[1],i=n[2];if(s>i)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},Vi=function(e){var t=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[t,r,o]},$i=function(e){var t=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[t,r,o]},ea=function(e,t){return e==="v"?Wi(t):Bi(t)},ta=function(e,t){return e==="v"?Vi(t):$i(t)},Ui=function(e,t){return e==="h"&&t==="rtl"?-1:1},ra=function(e,t,r,o,a){var n=Ui(e,window.getComputedStyle(t).direction),s=n*o,i=r.target,u=t.contains(i),l=!1,c=s>0,f=0,h=0;do{if(!i)break;var g=ta(e,i),_=g[0],p=g[1],b=g[2],S=p-b-n*_;(_||S)&&ea(e,i)&&(f+=S,h+=_);var P=i.parentNode;i=P&&P.nodeType===Node.DOCUMENT_FRAGMENT_NODE?P.host:P}while(!u&&i!==document.body||u&&(t.contains(i)||t===i));return(c&&(a&&Math.abs(f)<1||!a&&s>f)||!c&&(a&&Math.abs(h)<1||!a&&-s>h))&&(l=!0),l};var ct=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oa=function(e){return[e.deltaX,e.deltaY]},aa=function(e){return e&&"current"in e?e.current:e},Hi=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Gi=function(e){return`
  .block-interactivity-`.concat(e,` {pointer-events: none;}
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},Ki=0,Ne=[];function na(e){var t=L.useRef([]),r=L.useRef([0,0]),o=L.useRef(),a=L.useState(Ki++)[0],n=L.useState(Ve)[0],s=L.useRef(e);L.useEffect(function(){s.current=e},[e]),L.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var p=Uo([e.lockRef.current],(e.shards||[]).map(aa),!0).filter(Boolean);return p.forEach(function(b){return b.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),p.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var i=L.useCallback(function(p,b){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!s.current.allowPinchZoom;var S=ct(p),P=r.current,T="deltaX"in p?p.deltaX:P[0]-S[0],k="deltaY"in p?p.deltaY:P[1]-S[1],D,C=p.target,R=Math.abs(T)>Math.abs(k)?"h":"v";if("touches"in p&&R==="h"&&C.type==="range")return!1;var z=ur(R,C);if(!z)return!0;if(z?D=R:(D=R==="v"?"h":"v",z=ur(R,C)),!z)return!1;if(!o.current&&"changedTouches"in p&&(T||k)&&(o.current=D),!D)return!0;var se=o.current||D;return ra(se,b,p,se==="h"?T:k,!0)},[]),u=L.useCallback(function(p){var b=p;if(!(!Ne.length||Ne[Ne.length-1]!==n)){var S="deltaY"in b?oa(b):ct(b),P=t.current.filter(function(D){return D.name===b.type&&(D.target===b.target||b.target===D.shadowParent)&&Hi(D.delta,S)})[0];if(P&&P.should){b.cancelable&&b.preventDefault();return}if(!P){var T=(s.current.shards||[]).map(aa).filter(Boolean).filter(function(D){return D.contains(b.target)}),k=T.length>0?i(b,T[0]):!s.current.noIsolation;k&&b.cancelable&&b.preventDefault()}}},[]),l=L.useCallback(function(p,b,S,P){var T={name:p,delta:b,target:S,should:P,shadowParent:zi(S)};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(k){return k!==T})},1)},[]),c=L.useCallback(function(p){r.current=ct(p),o.current=void 0},[]),f=L.useCallback(function(p){l(p.type,oa(p),p.target,i(p,e.lockRef.current))},[]),h=L.useCallback(function(p){l(p.type,ct(p),p.target,i(p,e.lockRef.current))},[]);L.useEffect(function(){return Ne.push(n),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",u,ge),document.addEventListener("touchmove",u,ge),document.addEventListener("touchstart",c,ge),function(){Ne=Ne.filter(function(p){return p!==n}),document.removeEventListener("wheel",u,ge),document.removeEventListener("touchmove",u,ge),document.removeEventListener("touchstart",c,ge)}},[]);var g=e.removeScrollBar,_=e.inert;return L.createElement(L.Fragment,null,_?L.createElement(n,{styles:Gi(a)}):null,g?L.createElement(sr,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function zi(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var ia=tr(ft,na);var sa=dt.forwardRef(function(e,t){return dt.createElement(Be,X({},e,{ref:t,sideCar:ia}))});sa.classNames=Be.classNames;var fr=sa;var qi=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ae=new WeakMap,mt=new WeakMap,pt={},cr=0,la=function(e){return e&&(e.host||la(e.parentNode))},Yi=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=la(r);return o&&e.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Xi=function(e,t,r,o){var a=Yi(t,Array.isArray(e)?e:[e]);pt[r]||(pt[r]=new WeakMap);var n=pt[r],s=[],i=new Set,u=new Set(a),l=function(f){!f||i.has(f)||(i.add(f),l(f.parentNode))};a.forEach(l);var c=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(h){if(i.has(h))c(h);else try{var g=h.getAttribute(o),_=g!==null&&g!=="false",p=(Ae.get(h)||0)+1,b=(n.get(h)||0)+1;Ae.set(h,p),n.set(h,b),s.push(h),p===1&&_&&mt.set(h,!0),b===1&&h.setAttribute(r,"true"),_||h.setAttribute(o,"true")}catch(S){console.error("aria-hidden: cannot operate on ",h,S)}})};return c(t),i.clear(),cr++,function(){s.forEach(function(f){var h=Ae.get(f)-1,g=n.get(f)-1;Ae.set(f,h),n.set(f,g),h||(mt.has(f)||f.removeAttribute(o),mt.delete(f)),g||f.removeAttribute(r)}),cr--,cr||(Ae=new WeakMap,Ae=new WeakMap,mt=new WeakMap,pt={})}},ua=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),a=t||qi(e);return a?(o.push.apply(o,Array.from(a.querySelectorAll("[aria-live], script"))),Xi(o,a,r,"aria-hidden")):function(){return null}};var N=m(B(),1),ht="Dialog",[fa,Ff]=Kr(ht),[Zi,te]=fa(ht),ca=e=>{let{__scopeDialog:t,children:r,open:o,defaultOpen:a,onOpenChange:n,modal:s=!0}=e,i=I.useRef(null),u=I.useRef(null),[l,c]=qr({prop:o,defaultProp:a??!1,onChange:n,caller:ht});return(0,N.jsx)(Zi,{scope:t,triggerRef:i,contentRef:u,contentId:Ze(),titleId:Ze(),descriptionId:Ze(),open:l,onOpenChange:c,onOpenToggle:I.useCallback(()=>c(f=>!f),[c]),modal:s,children:r})};ca.displayName=ht;var da="DialogTrigger",Ji=I.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,a=te(da,r),n=Ye(t,a.triggerRef);return(0,N.jsx)(_e.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":pr(a.open),...o,ref:n,onClick:Se(e.onClick,a.onOpenToggle)})});Ji.displayName=da;var dr="DialogPortal",[Qi,ma]=fa(dr,{forceMount:void 0}),pa=e=>{let{__scopeDialog:t,forceMount:r,children:o,container:a}=e,n=te(dr,t);return(0,N.jsx)(Qi,{scope:t,forceMount:r,children:I.Children.map(o,s=>(0,N.jsx)(We,{present:r||n.open,children:(0,N.jsx)(qt,{asChild:!0,container:a,children:s})}))})};pa.displayName=dr;var vt="DialogOverlay",va=I.forwardRef((e,t)=>{let r=ma(vt,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,n=te(vt,e.__scopeDialog);return n.modal?(0,N.jsx)(We,{present:o||n.open,children:(0,N.jsx)(ts,{...a,ref:t})}):null});va.displayName=vt;var es=it("DialogOverlay.RemoveScroll"),ts=I.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,a=te(vt,r);return(0,N.jsx)(fr,{as:es,allowPinchZoom:!0,shards:[a.contentRef],children:(0,N.jsx)(_e.div,{"data-state":pr(a.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),ye="DialogContent",ha=I.forwardRef((e,t)=>{let r=ma(ye,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,n=te(ye,e.__scopeDialog);return(0,N.jsx)(We,{present:o||n.open,children:n.modal?(0,N.jsx)(rs,{...a,ref:t}):(0,N.jsx)(os,{...a,ref:t})})});ha.displayName=ye;var rs=I.forwardRef((e,t)=>{let r=te(ye,e.__scopeDialog),o=I.useRef(null),a=Ye(t,r.contentRef,o);return I.useEffect(()=>{let n=o.current;if(n)return ua(n)},[]),(0,N.jsx)(ga,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Se(e.onCloseAutoFocus,n=>{n.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Se(e.onPointerDownOutside,n=>{let s=n.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&n.preventDefault()}),onFocusOutside:Se(e.onFocusOutside,n=>n.preventDefault())})}),os=I.forwardRef((e,t)=>{let r=te(ye,e.__scopeDialog),o=I.useRef(!1),a=I.useRef(!1);return(0,N.jsx)(ga,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{e.onCloseAutoFocus?.(n),n.defaultPrevented||(o.current||r.triggerRef.current?.focus(),n.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:n=>{e.onInteractOutside?.(n),n.defaultPrevented||(o.current=!0,n.detail.originalEvent.type==="pointerdown"&&(a.current=!0));let s=n.target;r.triggerRef.current?.contains(s)&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&a.current&&n.preventDefault()}})}),ga=I.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:n,...s}=e,i=te(ye,r),u=I.useRef(null),l=Ye(t,u);return $o(),(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(zt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:n,children:(0,N.jsx)($t,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":pr(i.open),...s,ref:l,onDismiss:()=>i.onOpenChange(!1)})}),(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(ss,{titleId:i.titleId}),(0,N.jsx)(us,{contentRef:u,descriptionId:i.descriptionId})]})]})}),mr="DialogTitle",as=I.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,a=te(mr,r);return(0,N.jsx)(_e.h2,{id:a.titleId,...o,ref:t})});as.displayName=mr;var ya="DialogDescription",ns=I.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,a=te(ya,r);return(0,N.jsx)(_e.p,{id:a.descriptionId,...o,ref:t})});ns.displayName=ya;var Ra="DialogClose",is=I.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,a=te(Ra,r);return(0,N.jsx)(_e.button,{type:"button",...o,ref:t,onClick:Se(e.onClick,()=>a.onOpenChange(!1))})});is.displayName=Ra;function pr(e){return e?"open":"closed"}var ba="DialogTitleWarning",[jf,wa]=Gr(ba,{contentName:ye,titleName:mr,docsSlug:"dialog"}),ss=({titleId:e})=>{let t=wa(ba),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return I.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},ls="DialogDescriptionWarning",us=({contentRef:e,descriptionId:t})=>{let o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${wa(ls).contentName}}.`;return I.useEffect(()=>{let a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Ea=ca;var Ca=pa,Sa=va,xa=ha;var v=m(w(),1);var Da=m(w(),1),Rs=m(pe(),1);var j=m(w(),1);var cs=m(w(),1);function Oa(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ue(...e){return t=>{let r=!1,o=e.map(a=>{let n=Oa(a,t);return!r&&typeof n=="function"&&(r=!0),n});if(r)return()=>{for(let a=0;a<o.length;a++){let n=o[a];typeof n=="function"?n():Oa(e[a],null)}}}}var gt=m(B(),1),ds=Symbol.for("react.lazy"),yt=j[" use ".trim().toString()];function ms(e){return typeof e=="object"&&e!==null&&"then"in e}function _a(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===ds&&"_payload"in e&&ms(e._payload)}function Pa(e){let t=ps(e),r=j.forwardRef((o,a)=>{let{children:n,...s}=o;_a(n)&&typeof yt=="function"&&(n=yt(n._payload));let i=j.Children.toArray(n),u=i.find(hs);if(u){let l=u.props.children,c=i.map(f=>f===u?j.Children.count(l)>1?j.Children.only(null):j.isValidElement(l)?l.props.children:null:f);return(0,gt.jsx)(t,{...s,ref:a,children:j.isValidElement(l)?j.cloneElement(l,void 0,c):null})}return(0,gt.jsx)(t,{...s,ref:a,children:n})});return r.displayName=`${e}.Slot`,r}function ps(e){let t=j.forwardRef((r,o)=>{let{children:a,...n}=r;if(_a(a)&&typeof yt=="function"&&(a=yt(a._payload)),j.isValidElement(a)){let s=ys(a),i=gs(n,a.props);return a.type!==j.Fragment&&(i.ref=o?ue(o,s):s),j.cloneElement(a,i)}return j.Children.count(a)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var vs=Symbol("radix.slottable");function hs(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===vs}function gs(e,t){let r={...t};for(let o in t){let a=e[o],n=t[o];/^on[A-Z]/.test(o)?a&&n?r[o]=(...i)=>{let u=n(...i);return a(...i),u}:a&&(r[o]=a):o==="style"?r[o]={...a,...n}:o==="className"&&(r[o]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}function ys(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Na=m(B(),1),bs=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ie=bs.reduce((e,t)=>{let r=Pa(`Primitive.${t}`),o=Da.forwardRef((a,n)=>{let{asChild:s,...i}=a,u=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,Na.jsx)(u,{...i,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});var vr=m(w(),1);var Aa=m(w(),1),Ia=globalThis?.document?Aa.useLayoutEffect:()=>{};var ws=vr[" useId ".trim().toString()]||(()=>{}),Es=0;function Re(e){let[t,r]=vr.useState(ws());return Ia(()=>{e||r(o=>o??String(Es++))},[e]),e||(t?`radix-${t}`:"")}var Ue='[cmdk-group=""]',hr='[cmdk-group-items=""]',Cs='[cmdk-group-heading=""]',Ta='[cmdk-item=""]',La=`${Ta}:not([aria-disabled="true"])`,gr="cmdk-item-select",Ie="data-value",Ss=(e,t,r)=>Br(e,t,r),ka=v.createContext(void 0),He=()=>v.useContext(ka),Ma=v.createContext(void 0),yr=()=>v.useContext(Ma),Fa=v.createContext(void 0),ja=v.forwardRef((e,t)=>{let r=Le(()=>{var d,E;return{search:"",value:(E=(d=e.value)!=null?d:e.defaultValue)!=null?E:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=Le(()=>new Set),a=Le(()=>new Map),n=Le(()=>new Map),s=Le(()=>new Set),i=Wa(e),{label:u,children:l,value:c,onValueChange:f,filter:h,shouldFilter:g,loop:_,disablePointerSelection:p=!1,vimBindings:b=!0,...S}=e,P=Re(),T=Re(),k=Re(),D=v.useRef(null),C=ks();be(()=>{if(c!==void 0){let d=c.trim();r.current.value=d,R.emit()}},[c]),be(()=>{C(6,Ar)},[]);let R=v.useMemo(()=>({subscribe:d=>(s.current.add(d),()=>s.current.delete(d)),snapshot:()=>r.current,setState:(d,E,O)=>{var y,A,M,Z;if(!Object.is(r.current[d],E)){if(r.current[d]=E,d==="search")Pt(),me(),C(1,_t);else if(d==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let q=document.getElementById(k);q?q.focus():(y=document.getElementById(P))==null||y.focus()}if(C(7,()=>{var q;r.current.selectedItemId=(q=Ce())==null?void 0:q.id,R.emit()}),O||C(5,Ar),((A=i.current)==null?void 0:A.value)!==void 0){let q=E??"";(Z=(M=i.current).onValueChange)==null||Z.call(M,q);return}}R.emit()}},emit:()=>{s.current.forEach(d=>d())}}),[]),z=v.useMemo(()=>({value:(d,E,O)=>{var y;E!==((y=n.current.get(d))==null?void 0:y.value)&&(n.current.set(d,{value:E,keywords:O}),r.current.filtered.items.set(d,se(E,O)),C(2,()=>{me(),R.emit()}))},item:(d,E)=>(o.current.add(d),E&&(a.current.has(E)?a.current.get(E).add(d):a.current.set(E,new Set([d]))),C(3,()=>{Pt(),me(),r.current.value||_t(),R.emit()}),()=>{n.current.delete(d),o.current.delete(d),r.current.filtered.items.delete(d);let O=Ce();C(4,()=>{Pt(),O?.getAttribute("id")===d&&_t(),R.emit()})}),group:d=>(a.current.has(d)||a.current.set(d,new Set),()=>{n.current.delete(d),a.current.delete(d)}),filter:()=>i.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:P,inputId:k,labelId:T,listInnerRef:D}),[]);function se(d,E){var O,y;let A=(y=(O=i.current)==null?void 0:O.filter)!=null?y:Ss;return d?A(d,r.current.search,E):0}function me(){if(!r.current.search||i.current.shouldFilter===!1)return;let d=r.current.filtered.items,E=[];r.current.filtered.groups.forEach(y=>{let A=a.current.get(y),M=0;A.forEach(Z=>{let q=d.get(Z);M=Math.max(q,M)}),E.push([y,M])});let O=D.current;Fe().sort((y,A)=>{var M,Z;let q=y.getAttribute("id"),Ke=A.getAttribute("id");return((M=d.get(Ke))!=null?M:0)-((Z=d.get(q))!=null?Z:0)}).forEach(y=>{let A=y.closest(hr);A?A.appendChild(y.parentElement===A?y:y.closest(`${hr} > *`)):O.appendChild(y.parentElement===O?y:y.closest(`${hr} > *`))}),E.sort((y,A)=>A[1]-y[1]).forEach(y=>{var A;let M=(A=D.current)==null?void 0:A.querySelector(`${Ue}[${Ie}="${encodeURIComponent(y[0])}"]`);M?.parentElement.appendChild(M)})}function _t(){let d=Fe().find(O=>O.getAttribute("aria-disabled")!=="true"),E=d?.getAttribute(Ie);R.setState("value",E||void 0)}function Pt(){var d,E,O,y;if(!r.current.search||i.current.shouldFilter===!1){r.current.filtered.count=o.current.size;return}r.current.filtered.groups=new Set;let A=0;for(let M of o.current){let Z=(E=(d=n.current.get(M))==null?void 0:d.value)!=null?E:"",q=(y=(O=n.current.get(M))==null?void 0:O.keywords)!=null?y:[],Ke=se(Z,q);r.current.filtered.items.set(M,Ke),Ke>0&&A++}for(let[M,Z]of a.current)for(let q of Z)if(r.current.filtered.items.get(q)>0){r.current.filtered.groups.add(M);break}r.current.filtered.count=A}function Ar(){var d,E,O;let y=Ce();y&&(((d=y.parentElement)==null?void 0:d.firstChild)===y&&((O=(E=y.closest(Ue))==null?void 0:E.querySelector(Cs))==null||O.scrollIntoView({block:"nearest"})),y.scrollIntoView({block:"nearest"}))}function Ce(){var d;return(d=D.current)==null?void 0:d.querySelector(`${Ta}[aria-selected="true"]`)}function Fe(){var d;return Array.from(((d=D.current)==null?void 0:d.querySelectorAll(La))||[])}function Dt(d){let E=Fe()[d];E&&R.setState("value",E.getAttribute(Ie))}function Nt(d){var E;let O=Ce(),y=Fe(),A=y.findIndex(Z=>Z===O),M=y[A+d];(E=i.current)!=null&&E.loop&&(M=A+d<0?y[y.length-1]:A+d===y.length?y[0]:y[A+d]),M&&R.setState("value",M.getAttribute(Ie))}function Ir(d){let E=Ce(),O=E?.closest(Ue),y;for(;O&&!y;)O=d>0?Ls(O,Ue):Ts(O,Ue),y=O?.querySelector(La);y?R.setState("value",y.getAttribute(Ie)):Nt(d)}let Lr=()=>Dt(Fe().length-1),Tr=d=>{d.preventDefault(),d.metaKey?Lr():d.altKey?Ir(1):Nt(1)},kr=d=>{d.preventDefault(),d.metaKey?Dt(0):d.altKey?Ir(-1):Nt(-1)};return v.createElement(ie.div,{ref:t,tabIndex:-1,...S,"cmdk-root":"",onKeyDown:d=>{var E;(E=S.onKeyDown)==null||E.call(S,d);let O=d.nativeEvent.isComposing||d.keyCode===229;if(!(d.defaultPrevented||O))switch(d.key){case"n":case"j":{b&&d.ctrlKey&&Tr(d);break}case"ArrowDown":{Tr(d);break}case"p":case"k":{b&&d.ctrlKey&&kr(d);break}case"ArrowUp":{kr(d);break}case"Home":{d.preventDefault(),Dt(0);break}case"End":{d.preventDefault(),Lr();break}case"Enter":{d.preventDefault();let y=Ce();if(y){let A=new Event(gr);y.dispatchEvent(A)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:z.inputId,id:z.labelId,style:Fs},u),Rt(e,d=>v.createElement(Ma.Provider,{value:R},v.createElement(ka.Provider,{value:z},d))))}),xs=v.forwardRef((e,t)=>{var r,o;let a=Re(),n=v.useRef(null),s=v.useContext(Fa),i=He(),u=Wa(e),l=(o=(r=u.current)==null?void 0:r.forceMount)!=null?o:s?.forceMount;be(()=>{if(!l)return i.item(a,s?.id)},[l]);let c=Ba(a,n,[e.value,e.children,n],e.keywords),f=yr(),h=ae(C=>C.value&&C.value===c.current),g=ae(C=>l||i.filter()===!1?!0:C.search?C.filtered.items.get(a)>0:!0);v.useEffect(()=>{let C=n.current;if(!(!C||e.disabled))return C.addEventListener(gr,_),()=>C.removeEventListener(gr,_)},[g,e.onSelect,e.disabled]);function _(){var C,R;p(),(R=(C=u.current).onSelect)==null||R.call(C,c.current)}function p(){f.setState("value",c.current,!0)}if(!g)return null;let{disabled:b,value:S,onSelect:P,forceMount:T,keywords:k,...D}=e;return v.createElement(ie.div,{ref:ue(n,t),...D,id:a,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!h,"data-disabled":!!b,"data-selected":!!h,onPointerMove:b||i.getDisablePointerSelection()?void 0:p,onClick:b?void 0:_},e.children)}),Os=v.forwardRef((e,t)=>{let{heading:r,children:o,forceMount:a,...n}=e,s=Re(),i=v.useRef(null),u=v.useRef(null),l=Re(),c=He(),f=ae(g=>a||c.filter()===!1?!0:g.search?g.filtered.groups.has(s):!0);be(()=>c.group(s),[]),Ba(s,i,[e.value,e.heading,u]);let h=v.useMemo(()=>({id:s,forceMount:a}),[a]);return v.createElement(ie.div,{ref:ue(i,t),...n,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},r&&v.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:l},r),Rt(e,g=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?l:void 0},v.createElement(Fa.Provider,{value:h},g))))}),_s=v.forwardRef((e,t)=>{let{alwaysRender:r,...o}=e,a=v.useRef(null),n=ae(s=>!s.search);return!r&&!n?null:v.createElement(ie.div,{ref:ue(a,t),...o,"cmdk-separator":"",role:"separator"})}),Ps=v.forwardRef((e,t)=>{let{onValueChange:r,...o}=e,a=e.value!=null,n=yr(),s=ae(l=>l.search),i=ae(l=>l.selectedItemId),u=He();return v.useEffect(()=>{e.value!=null&&n.setState("search",e.value)},[e.value]),v.createElement(ie.input,{ref:t,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":i,id:u.inputId,type:"text",value:a?e.value:s,onChange:l=>{a||n.setState("search",l.target.value),r?.(l.target.value)}})}),Ds=v.forwardRef((e,t)=>{let{children:r,label:o="Suggestions",...a}=e,n=v.useRef(null),s=v.useRef(null),i=ae(l=>l.selectedItemId),u=He();return v.useEffect(()=>{if(s.current&&n.current){let l=s.current,c=n.current,f,h=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let g=l.offsetHeight;c.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return h.observe(l),()=>{cancelAnimationFrame(f),h.unobserve(l)}}},[]),v.createElement(ie.div,{ref:ue(n,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":o,id:u.listId},Rt(e,l=>v.createElement("div",{ref:ue(s,u.listInnerRef),"cmdk-list-sizer":""},l)))}),Ns=v.forwardRef((e,t)=>{let{open:r,onOpenChange:o,overlayClassName:a,contentClassName:n,container:s,...i}=e;return v.createElement(Ea,{open:r,onOpenChange:o},v.createElement(Ca,{container:s},v.createElement(Sa,{"cmdk-overlay":"",className:a}),v.createElement(xa,{"aria-label":e.label,"cmdk-dialog":"",className:n},v.createElement(ja,{ref:t,...i}))))}),As=v.forwardRef((e,t)=>ae(r=>r.filtered.count===0)?v.createElement(ie.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Is=v.forwardRef((e,t)=>{let{progress:r,children:o,label:a="Loading...",...n}=e;return v.createElement(ie.div,{ref:t,...n,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},Rt(e,s=>v.createElement("div",{"aria-hidden":!0},s)))}),fe=Object.assign(ja,{List:Ds,Item:xs,Input:Ps,Group:Os,Separator:_s,Dialog:Ns,Empty:As,Loading:Is});function Ls(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function Ts(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function Wa(e){let t=v.useRef(e);return be(()=>{t.current=e}),t}var be=typeof window>"u"?v.useEffect:v.useLayoutEffect;function Le(e){let t=v.useRef();return t.current===void 0&&(t.current=e()),t}function ae(e){let t=yr(),r=()=>e(t.snapshot());return v.useSyncExternalStore(t.subscribe,r,r)}function Ba(e,t,r,o=[]){let a=v.useRef(),n=He();return be(()=>{var s;let i=(()=>{var l;for(let c of r){if(typeof c=="string")return c.trim();if(typeof c=="object"&&"current"in c)return c.current?(l=c.current.textContent)==null?void 0:l.trim():a.current}})(),u=o.map(l=>l.trim());n.value(e,i,u),(s=t.current)==null||s.setAttribute(Ie,i),a.current=i}),a}var ks=()=>{let[e,t]=v.useState(),r=Le(()=>new Map);return be(()=>{r.current.forEach(o=>o()),r.current=new Map},[e]),(o,a)=>{r.current.set(o,a),t({})}};function Ms(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Rt({asChild:e,children:t},r){return e&&v.isValidElement(t)?v.cloneElement(Ms(t),{ref:t.ref},r(t.props.children)):r(t)}var Fs={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Va(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Va(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function js(){for(var e,t,r=0,o="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Va(e))&&(o&&(o+=" "),o+=t);return o}var Rr=js;var Me=m(ce(),1),W=m(Te(),1),re=m(Ga(),1),ne=m(za(),1),xt=m(Ya(),1);var bt=m(Te(),1),we=(0,bt.forwardRef)(({icon:e,size:t=24,...r},o)=>(0,bt.cloneElement)(e,{width:t,height:t,...r,ref:o}));var wt=m(br(),1),wr=m(B(),1),Er=(0,wr.jsx)(wt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wr.jsx)(wt.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})});var Et=m(br(),1),Cr=m(B(),1),Sr=(0,Cr.jsx)(Et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Cr.jsx)(Et.Path,{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"})});var Ct=m(ce(),1);var Za=m(ce(),1);function Ws(e={},t){switch(t.type){case"REGISTER_COMMAND":return{...e,[t.name]:{name:t.name,label:t.label,searchLabel:t.searchLabel,context:t.context,category:t.category,callback:t.callback,icon:t.icon,keywords:t.keywords}};case"UNREGISTER_COMMAND":{let{[t.name]:r,...o}=e;return o}}return e}function Bs(e={},t){switch(t.type){case"REGISTER_COMMAND_LOADER":return{...e,[t.name]:{name:t.name,context:t.context,category:t.category,hook:t.hook}};case"UNREGISTER_COMMAND_LOADER":{let{[t.name]:r,...o}=e;return o}}return e}function Vs(e=!1,t){switch(t.type){case"OPEN":return!0;case"CLOSE":return!1}return e}function $s(e="root",t){return t.type==="SET_CONTEXT"?t.context:e}var Us=(0,Za.combineReducers)({commands:Ws,commandLoaders:Bs,isOpen:Vs,context:$s}),Ja=Us;var xr={};qe(xr,{close:()=>Ys,open:()=>qs,registerCommand:()=>Hs,registerCommandLoader:()=>Ks,unregisterCommand:()=>Gs,unregisterCommandLoader:()=>zs});var Qa=new Set(["command","view","edit","action"]);function Hs(e){let{category:t}=e;return(!t||!Qa.has(t))&&(t="action"),{type:"REGISTER_COMMAND",...e,category:t}}function Gs(e){return{type:"UNREGISTER_COMMAND",name:e}}function Ks(e){let{category:t}=e;return(!t||!Qa.has(t))&&(t="action"),{type:"REGISTER_COMMAND_LOADER",...e,category:t}}function zs(e){return{type:"UNREGISTER_COMMAND_LOADER",name:e}}function qs(){return{type:"OPEN"}}function Ys(){return{type:"CLOSE"}}var _r={};qe(_r,{getCommandLoaders:()=>Zs,getCommands:()=>Xs,getContext:()=>Qs,isOpen:()=>Js});var Or=m(ce(),1),Xs=(0,Or.createSelector)((e,t=!1)=>Object.values(e.commands).filter(r=>{let o=r.context&&r.context===e.context;return t?o:!o}),e=>[e.commands,e.context]),Zs=(0,Or.createSelector)((e,t=!1)=>Object.values(e.commandLoaders).filter(r=>{let o=r.context&&r.context===e.context;return t?o:!o}),e=>[e.commandLoaders,e.context]);function Js(e){return e.isOpen}function Qs(e){return e.context}var Pr={};qe(Pr,{setContext:()=>el});function el(e){return{type:"SET_CONTEXT",context:e}}var rn=m(tn(),1),{lock:on,unlock:ke}=(0,rn.__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/commands");var tl="core/commands",K=(0,Ct.createReduxStore)(tl,{reducer:Ja,actions:xr,selectors:_r});(0,Ct.register)(K);ke(K).registerPrivateActions(Pr);var x=m(B(),1),{withIgnoreIMEEvents:rl}=ke(ne.privateApis),nn=(0,re.__)("Search commands and settings"),Ee={view:Er},St={command:(0,re.__)("Command"),view:(0,re.__)("View"),edit:(0,re.__)("Edit"),action:(0,re.__)("Action"),workflow:(0,re.__)("Workflow")};function ol(e){return!!e&&(typeof e=="string"||(0,W.isValidElement)(e)||typeof e=="function"||e instanceof W.Component)}function al({name:e,search:t,hook:r,setLoader:o,close:a,category:n}){let{isLoading:s,commands:i=[]}=r({search:t})??{};return(0,W.useEffect)(()=>{o(e,s)},[o,e,s]),i.length?(0,x.jsx)(x.Fragment,{children:i.map(u=>{let l=u.category??n;return(0,x.jsx)(fe.Item,{value:u.searchLabel??u.label,keywords:u.keywords,onSelect:()=>u.callback({close:a}),id:u.name,children:(0,x.jsxs)(ne.__experimentalHStack,{alignment:"left",className:Rr("commands-command-menu__item",{"has-icon":Ee[l]||u.icon}),children:[Ee[l]&&(0,x.jsx)(we,{icon:Ee[l]}),!Ee[l]&&ol(u.icon)&&(0,x.jsx)(we,{icon:u.icon}),(0,x.jsx)("span",{className:"commands-command-menu__item-label",children:(0,x.jsx)(ne.TextHighlight,{text:u.label,highlight:t})}),St[l]&&(0,x.jsx)("span",{className:"commands-command-menu__item-category",children:St[l]})]})},u.name)})}):null}function nl({hook:e,search:t,setLoader:r,close:o,category:a}){let n=(0,W.useRef)(e),[s,i]=(0,W.useState)(0);return(0,W.useEffect)(()=>{n.current!==e&&(n.current=e,i(u=>u+1))},[e]),(0,x.jsx)(al,{hook:n.current,search:t,setLoader:r,close:o,category:a},s)}function an({isContextual:e,search:t,setLoader:r,close:o}){let{commands:a,loaders:n}=(0,Me.useSelect)(s=>{let{getCommands:i,getCommandLoaders:u}=s(K);return{commands:i(e),loaders:u(e)}},[e]);return!a.length&&!n.length?null:(0,x.jsxs)(fe.Group,{children:[a.map(s=>(0,x.jsx)(fe.Item,{value:s.searchLabel??s.label,keywords:s.keywords,onSelect:()=>s.callback({close:o}),id:s.name,children:(0,x.jsxs)(ne.__experimentalHStack,{alignment:"left",className:Rr("commands-command-menu__item",{"has-icon":Ee[s.category]||s.icon}),children:[Ee[s.category]?(0,x.jsx)(we,{icon:Ee[s.category]}):s.icon&&(0,x.jsx)(we,{icon:s.icon}),(0,x.jsx)("span",{children:(0,x.jsx)(ne.TextHighlight,{text:s.label,highlight:t})}),St[s.category]&&(0,x.jsx)("span",{className:"commands-command-menu__item-category",children:St[s.category]})]})},s.name)),n.map(s=>(0,x.jsx)(nl,{hook:s.hook,search:t,setLoader:r,close:o,category:s.category},s.name))]})}function il({isOpen:e,search:t,setSearch:r}){let o=(0,W.useRef)(),a=ae(s=>s.value),n=(0,W.useMemo)(()=>document.querySelector(`[cmdk-item=""][data-value="${a}"]`)?.getAttribute("id"),[a]);return(0,W.useEffect)(()=>{e&&o.current.focus()},[e]),(0,x.jsx)(fe.Input,{ref:o,value:t,onValueChange:r,placeholder:nn,"aria-activedescendant":n})}function sn(){let{registerShortcut:e}=(0,Me.useDispatch)(xt.store),[t,r]=(0,W.useState)(""),o=(0,Me.useSelect)(f=>f(K).isOpen(),[]),{open:a,close:n}=(0,Me.useDispatch)(K),[s,i]=(0,W.useState)({});(0,W.useEffect)(()=>{e({name:"core/commands",category:"global",description:(0,re.__)("Open the command palette."),keyCombination:{modifier:"primary",character:"k"}})},[e]),(0,xt.useShortcut)("core/commands",rl(f=>{f.defaultPrevented||(f.preventDefault(),o?n():a())}),{bindGlobal:!0});let u=(0,W.useCallback)((f,h)=>i(g=>({...g,[f]:h})),[]),l=()=>{r(""),n()};if(!o)return!1;let c=Object.values(s).some(Boolean);return(0,x.jsx)(ne.Modal,{className:"commands-command-menu",overlayClassName:"commands-command-menu__overlay",onRequestClose:l,__experimentalHideHeader:!0,contentLabel:(0,re.__)("Command palette"),children:(0,x.jsx)("div",{className:"commands-command-menu__container",children:(0,x.jsxs)(fe,{label:nn,children:[(0,x.jsxs)("div",{className:"commands-command-menu__header",children:[(0,x.jsx)(we,{className:"commands-command-menu__header-search-icon",icon:Sr}),(0,x.jsx)(il,{search:t,setSearch:r,isOpen:o})]}),(0,x.jsxs)(fe.List,{label:(0,re.__)("Command suggestions"),children:[t&&!c&&(0,x.jsx)(fe.Empty,{children:(0,re.__)("No results found.")}),(0,x.jsx)(an,{search:t,setLoader:u,close:l,isContextual:!0}),t&&(0,x.jsx)(an,{search:t,setLoader:u,close:l})]})]})})})}var Ge=m(Te(),1),Ot=m(ce(),1);function ln(e){let{getContext:t}=(0,Ot.useSelect)(K),r=(0,Ge.useRef)(t()),{setContext:o}=ke((0,Ot.useDispatch)(K));(0,Ge.useEffect)(()=>{o(e)},[e,o]),(0,Ge.useEffect)(()=>{let a=r.current;return()=>o(a)},[o])}var Dr={};on(Dr,{useCommandContext:ln});var de=m(Te(),1),Nr=m(ce(),1);function un(e){let{registerCommand:t,unregisterCommand:r}=(0,Nr.useDispatch)(K),o=(0,de.useRef)(e.callback);(0,de.useEffect)(()=>{o.current=e.callback},[e.callback]),(0,de.useEffect)(()=>{if(!e.disabled)return t({name:e.name,context:e.context,category:e.category,label:e.label,searchLabel:e.searchLabel,icon:e.icon,keywords:e.keywords,callback:(...a)=>o.current(...a)}),()=>{r(e.name)}},[e.name,e.label,e.searchLabel,e.icon,e.context,e.category,e.keywords,e.disabled,t,r])}function fn(e){let{registerCommand:t,unregisterCommand:r}=(0,Nr.useDispatch)(K),o=(0,de.useRef)({});(0,de.useEffect)(()=>{e&&e.forEach(a=>{a.callback&&(o.current[a.name]=a.callback)})},[e]),(0,de.useEffect)(()=>{if(e)return e.forEach(a=>{a.disabled||t({name:a.name,context:a.context,category:a.category,label:a.label,searchLabel:a.searchLabel,icon:a.icon,keywords:a.keywords,callback:(...n)=>{let s=o.current[a.name];s&&s(...n)}})}),()=>{e.forEach(a=>{r(a.name)})}},[e,t,r])}var cn=m(Te(),1),dn=m(ce(),1);function mn(e){let{registerCommandLoader:t,unregisterCommandLoader:r}=(0,dn.useDispatch)(K);(0,cn.useEffect)(()=>{if(!e.disabled)return t({name:e.name,hook:e.hook,context:e.context,category:e.category}),()=>{r(e.name)}},[e.name,e.hook,e.context,e.category,e.disabled,t,r])}return Rn(sl);})();
                                                                                                                                                                                                                                                                                                                                                                                                                      dist/components.js                                                                                  0000644                 00017246470 15212563770 0010267 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).components = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __esm = (fn, res) => function __init() {
    return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
  };
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from2, except, desc) => {
    if (from2 && typeof from2 === "object" || typeof from2 === "function") {
      for (let key of __getOwnPropNames(from2))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/primitives
  var require_primitives = __commonJS({
    "package-external:@wordpress/primitives"(exports, module) {
      module.exports = window.wp.primitives;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // vendor-external:react
  var require_react = __commonJS({
    "vendor-external:react"(exports, module) {
      module.exports = window.React;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
  var require_use_sync_external_store_shim_development = __commonJS({
    "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports) {
      "use strict";
      (function() {
        function is(x2, y3) {
          return x2 === y3 && (0 !== x2 || 1 / x2 === 1 / y3) || x2 !== x2 && y3 !== y3;
        }
        function useSyncExternalStore$2(subscribe2, getSnapshot) {
          didWarnOld18Alpha || void 0 === React41.startTransition || (didWarnOld18Alpha = true, console.error(
            "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
          ));
          var value = getSnapshot();
          if (!didWarnUncachedGetSnapshot) {
            var cachedValue = getSnapshot();
            objectIs(value, cachedValue) || (console.error(
              "The result of getSnapshot should be cached to avoid an infinite loop"
            ), didWarnUncachedGetSnapshot = true);
          }
          cachedValue = useState85({
            inst: { value, getSnapshot }
          });
          var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
          useLayoutEffect24(
            function() {
              inst.value = value;
              inst.getSnapshot = getSnapshot;
              checkIfSnapshotChanged(inst) && forceUpdate({ inst });
            },
            [subscribe2, value, getSnapshot]
          );
          useEffect79(
            function() {
              checkIfSnapshotChanged(inst) && forceUpdate({ inst });
              return subscribe2(function() {
                checkIfSnapshotChanged(inst) && forceUpdate({ inst });
              });
            },
            [subscribe2]
          );
          useDebugValue(value);
          return value;
        }
        function checkIfSnapshotChanged(inst) {
          var latestGetSnapshot = inst.getSnapshot;
          inst = inst.value;
          try {
            var nextValue = latestGetSnapshot();
            return !objectIs(inst, nextValue);
          } catch (error) {
            return true;
          }
        }
        function useSyncExternalStore$1(subscribe2, getSnapshot) {
          return getSnapshot();
        }
        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
        var React41 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState85 = React41.useState, useEffect79 = React41.useEffect, useLayoutEffect24 = React41.useLayoutEffect, useDebugValue = React41.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
        exports.useSyncExternalStore = void 0 !== React41.useSyncExternalStore ? React41.useSyncExternalStore : shim;
        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
      })();
    }
  });

  // node_modules/use-sync-external-store/shim/index.js
  var require_shim = __commonJS({
    "node_modules/use-sync-external-store/shim/index.js"(exports, module) {
      "use strict";
      if (false) {
        module.exports = null;
      } else {
        module.exports = require_use_sync_external_store_shim_development();
      }
    }
  });

  // vendor-external:react-dom
  var require_react_dom = __commonJS({
    "vendor-external:react-dom"(exports, module) {
      module.exports = window.ReactDOM;
    }
  });

  // package-external:@wordpress/deprecated
  var require_deprecated = __commonJS({
    "package-external:@wordpress/deprecated"(exports, module) {
      module.exports = window.wp.deprecated;
    }
  });

  // node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
  function memoize(fn) {
    var cache2 = /* @__PURE__ */ Object.create(null);
    return function(arg) {
      if (cache2[arg] === void 0) cache2[arg] = fn(arg);
      return cache2[arg];
    };
  }
  var init_emotion_memoize_esm = __esm({
    "node_modules/@emotion/memoize/dist/emotion-memoize.esm.js"() {
    }
  });

  // node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js
  var emotion_is_prop_valid_esm_exports = {};
  __export(emotion_is_prop_valid_esm_exports, {
    default: () => isPropValid
  });
  var reactPropsRegex, isPropValid;
  var init_emotion_is_prop_valid_esm = __esm({
    "node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js"() {
      init_emotion_memoize_esm();
      reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;
      isPropValid = /* @__PURE__ */ memoize(
        function(prop) {
          return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
        }
        /* Z+1 */
      );
    }
  });

  // node_modules/react-is/cjs/react-is.development.js
  var require_react_is_development = __commonJS({
    "node_modules/react-is/cjs/react-is.development.js"(exports) {
      "use strict";
      if (true) {
        (function() {
          "use strict";
          var hasSymbol = typeof Symbol === "function" && Symbol.for;
          var REACT_ELEMENT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
          var REACT_PORTAL_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.portal") : 60106;
          var REACT_FRAGMENT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107;
          var REACT_STRICT_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108;
          var REACT_PROFILER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114;
          var REACT_PROVIDER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.provider") : 60109;
          var REACT_CONTEXT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.context") : 60110;
          var REACT_ASYNC_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111;
          var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111;
          var REACT_FORWARD_REF_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112;
          var REACT_SUSPENSE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113;
          var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120;
          var REACT_MEMO_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.memo") : 60115;
          var REACT_LAZY_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116;
          var REACT_BLOCK_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.block") : 60121;
          var REACT_FUNDAMENTAL_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117;
          var REACT_RESPONDER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.responder") : 60118;
          var REACT_SCOPE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
          function isValidElementType(type) {
            return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
            type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
          }
          function typeOf(object) {
            if (typeof object === "object" && object !== null) {
              var $$typeof = object.$$typeof;
              switch ($$typeof) {
                case REACT_ELEMENT_TYPE:
                  var type = object.type;
                  switch (type) {
                    case REACT_ASYNC_MODE_TYPE:
                    case REACT_CONCURRENT_MODE_TYPE:
                    case REACT_FRAGMENT_TYPE:
                    case REACT_PROFILER_TYPE:
                    case REACT_STRICT_MODE_TYPE:
                    case REACT_SUSPENSE_TYPE:
                      return type;
                    default:
                      var $$typeofType = type && type.$$typeof;
                      switch ($$typeofType) {
                        case REACT_CONTEXT_TYPE:
                        case REACT_FORWARD_REF_TYPE:
                        case REACT_LAZY_TYPE:
                        case REACT_MEMO_TYPE:
                        case REACT_PROVIDER_TYPE:
                          return $$typeofType;
                        default:
                          return $$typeof;
                      }
                  }
                case REACT_PORTAL_TYPE:
                  return $$typeof;
              }
            }
            return void 0;
          }
          var AsyncMode = REACT_ASYNC_MODE_TYPE;
          var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
          var ContextConsumer = REACT_CONTEXT_TYPE;
          var ContextProvider = REACT_PROVIDER_TYPE;
          var Element2 = REACT_ELEMENT_TYPE;
          var ForwardRef = REACT_FORWARD_REF_TYPE;
          var Fragment11 = REACT_FRAGMENT_TYPE;
          var Lazy = REACT_LAZY_TYPE;
          var Memo = REACT_MEMO_TYPE;
          var Portal3 = REACT_PORTAL_TYPE;
          var Profiler = REACT_PROFILER_TYPE;
          var StrictMode = REACT_STRICT_MODE_TYPE;
          var Suspense = REACT_SUSPENSE_TYPE;
          var hasWarnedAboutDeprecatedIsAsyncMode = false;
          function isAsyncMode(object) {
            {
              if (!hasWarnedAboutDeprecatedIsAsyncMode) {
                hasWarnedAboutDeprecatedIsAsyncMode = true;
                console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
              }
            }
            return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
          }
          function isConcurrentMode(object) {
            return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
          }
          function isContextConsumer(object) {
            return typeOf(object) === REACT_CONTEXT_TYPE;
          }
          function isContextProvider(object) {
            return typeOf(object) === REACT_PROVIDER_TYPE;
          }
          function isElement2(object) {
            return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
          }
          function isForwardRef(object) {
            return typeOf(object) === REACT_FORWARD_REF_TYPE;
          }
          function isFragment(object) {
            return typeOf(object) === REACT_FRAGMENT_TYPE;
          }
          function isLazy(object) {
            return typeOf(object) === REACT_LAZY_TYPE;
          }
          function isMemo(object) {
            return typeOf(object) === REACT_MEMO_TYPE;
          }
          function isPortal(object) {
            return typeOf(object) === REACT_PORTAL_TYPE;
          }
          function isProfiler(object) {
            return typeOf(object) === REACT_PROFILER_TYPE;
          }
          function isStrictMode(object) {
            return typeOf(object) === REACT_STRICT_MODE_TYPE;
          }
          function isSuspense(object) {
            return typeOf(object) === REACT_SUSPENSE_TYPE;
          }
          exports.AsyncMode = AsyncMode;
          exports.ConcurrentMode = ConcurrentMode;
          exports.ContextConsumer = ContextConsumer;
          exports.ContextProvider = ContextProvider;
          exports.Element = Element2;
          exports.ForwardRef = ForwardRef;
          exports.Fragment = Fragment11;
          exports.Lazy = Lazy;
          exports.Memo = Memo;
          exports.Portal = Portal3;
          exports.Profiler = Profiler;
          exports.StrictMode = StrictMode;
          exports.Suspense = Suspense;
          exports.isAsyncMode = isAsyncMode;
          exports.isConcurrentMode = isConcurrentMode;
          exports.isContextConsumer = isContextConsumer;
          exports.isContextProvider = isContextProvider;
          exports.isElement = isElement2;
          exports.isForwardRef = isForwardRef;
          exports.isFragment = isFragment;
          exports.isLazy = isLazy;
          exports.isMemo = isMemo;
          exports.isPortal = isPortal;
          exports.isProfiler = isProfiler;
          exports.isStrictMode = isStrictMode;
          exports.isSuspense = isSuspense;
          exports.isValidElementType = isValidElementType;
          exports.typeOf = typeOf;
        })();
      }
    }
  });

  // node_modules/react-is/index.js
  var require_react_is = __commonJS({
    "node_modules/react-is/index.js"(exports, module) {
      "use strict";
      if (false) {
        module.exports = null;
      } else {
        module.exports = require_react_is_development();
      }
    }
  });

  // node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
  var require_hoist_non_react_statics_cjs = __commonJS({
    "node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"(exports, module) {
      "use strict";
      var reactIs = require_react_is();
      var REACT_STATICS = {
        childContextTypes: true,
        contextType: true,
        contextTypes: true,
        defaultProps: true,
        displayName: true,
        getDefaultProps: true,
        getDerivedStateFromError: true,
        getDerivedStateFromProps: true,
        mixins: true,
        propTypes: true,
        type: true
      };
      var KNOWN_STATICS = {
        name: true,
        length: true,
        prototype: true,
        caller: true,
        callee: true,
        arguments: true,
        arity: true
      };
      var FORWARD_REF_STATICS = {
        "$$typeof": true,
        render: true,
        defaultProps: true,
        displayName: true,
        propTypes: true
      };
      var MEMO_STATICS = {
        "$$typeof": true,
        compare: true,
        defaultProps: true,
        displayName: true,
        propTypes: true,
        type: true
      };
      var TYPE_STATICS = {};
      TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
      TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
      function getStatics(component) {
        if (reactIs.isMemo(component)) {
          return MEMO_STATICS;
        }
        return TYPE_STATICS[component["$$typeof"]] || REACT_STATICS;
      }
      var defineProperty = Object.defineProperty;
      var getOwnPropertyNames = Object.getOwnPropertyNames;
      var getOwnPropertySymbols = Object.getOwnPropertySymbols;
      var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
      var getPrototypeOf = Object.getPrototypeOf;
      var objectPrototype = Object.prototype;
      function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
        if (typeof sourceComponent !== "string") {
          if (objectPrototype) {
            var inheritedComponent = getPrototypeOf(sourceComponent);
            if (inheritedComponent && inheritedComponent !== objectPrototype) {
              hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
            }
          }
          var keys = getOwnPropertyNames(sourceComponent);
          if (getOwnPropertySymbols) {
            keys = keys.concat(getOwnPropertySymbols(sourceComponent));
          }
          var targetStatics = getStatics(targetComponent);
          var sourceStatics = getStatics(sourceComponent);
          for (var i3 = 0; i3 < keys.length; ++i3) {
            var key = keys[i3];
            if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
              var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
              try {
                defineProperty(targetComponent, key, descriptor);
              } catch (e3) {
              }
            }
          }
        }
        return targetComponent;
      }
      module.exports = hoistNonReactStatics;
    }
  });

  // node_modules/deepmerge/dist/cjs.js
  var require_cjs = __commonJS({
    "node_modules/deepmerge/dist/cjs.js"(exports, module) {
      "use strict";
      var isMergeableObject = function isMergeableObject2(value) {
        return isNonNullObject(value) && !isSpecial(value);
      };
      function isNonNullObject(value) {
        return !!value && typeof value === "object";
      }
      function isSpecial(value) {
        var stringValue = Object.prototype.toString.call(value);
        return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
      }
      var canUseSymbol = typeof Symbol === "function" && Symbol.for;
      var REACT_ELEMENT_TYPE = canUseSymbol ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
      function isReactElement(value) {
        return value.$$typeof === REACT_ELEMENT_TYPE;
      }
      function emptyTarget(val) {
        return Array.isArray(val) ? [] : {};
      }
      function cloneUnlessOtherwiseSpecified(value, options2) {
        return options2.clone !== false && options2.isMergeableObject(value) ? deepmerge2(emptyTarget(value), value, options2) : value;
      }
      function defaultArrayMerge(target, source, options2) {
        return target.concat(source).map(function(element) {
          return cloneUnlessOtherwiseSpecified(element, options2);
        });
      }
      function getMergeFunction(key, options2) {
        if (!options2.customMerge) {
          return deepmerge2;
        }
        var customMerge = options2.customMerge(key);
        return typeof customMerge === "function" ? customMerge : deepmerge2;
      }
      function getEnumerableOwnPropertySymbols(target) {
        return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol4) {
          return Object.propertyIsEnumerable.call(target, symbol4);
        }) : [];
      }
      function getKeys2(target) {
        return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
      }
      function propertyIsOnObject(object, property) {
        try {
          return property in object;
        } catch (_2) {
          return false;
        }
      }
      function propertyIsUnsafe(target, key) {
        return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
      }
      function mergeObject(target, source, options2) {
        var destination = {};
        if (options2.isMergeableObject(target)) {
          getKeys2(target).forEach(function(key) {
            destination[key] = cloneUnlessOtherwiseSpecified(target[key], options2);
          });
        }
        getKeys2(source).forEach(function(key) {
          if (propertyIsUnsafe(target, key)) {
            return;
          }
          if (propertyIsOnObject(target, key) && options2.isMergeableObject(source[key])) {
            destination[key] = getMergeFunction(key, options2)(target[key], source[key], options2);
          } else {
            destination[key] = cloneUnlessOtherwiseSpecified(source[key], options2);
          }
        });
        return destination;
      }
      function deepmerge2(target, source, options2) {
        options2 = options2 || {};
        options2.arrayMerge = options2.arrayMerge || defaultArrayMerge;
        options2.isMergeableObject = options2.isMergeableObject || isMergeableObject;
        options2.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
        var sourceIsArray = Array.isArray(source);
        var targetIsArray = Array.isArray(target);
        var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
        if (!sourceAndTargetTypesMatch) {
          return cloneUnlessOtherwiseSpecified(source, options2);
        } else if (sourceIsArray) {
          return options2.arrayMerge(target, source, options2);
        } else {
          return mergeObject(target, source, options2);
        }
      }
      deepmerge2.all = function deepmergeAll(array, options2) {
        if (!Array.isArray(array)) {
          throw new Error("first argument should be an array");
        }
        return array.reduce(function(prev2, next2) {
          return deepmerge2(prev2, next2, options2);
        }, {});
      };
      var deepmerge_1 = deepmerge2;
      module.exports = deepmerge_1;
    }
  });

  // node_modules/fast-deep-equal/es6/index.js
  var require_es6 = __commonJS({
    "node_modules/fast-deep-equal/es6/index.js"(exports, module) {
      "use strict";
      module.exports = function equal(a3, b3) {
        if (a3 === b3) return true;
        if (a3 && b3 && typeof a3 == "object" && typeof b3 == "object") {
          if (a3.constructor !== b3.constructor) return false;
          var length2, i3, keys;
          if (Array.isArray(a3)) {
            length2 = a3.length;
            if (length2 != b3.length) return false;
            for (i3 = length2; i3-- !== 0; )
              if (!equal(a3[i3], b3[i3])) return false;
            return true;
          }
          if (a3 instanceof Map && b3 instanceof Map) {
            if (a3.size !== b3.size) return false;
            for (i3 of a3.entries())
              if (!b3.has(i3[0])) return false;
            for (i3 of a3.entries())
              if (!equal(i3[1], b3.get(i3[0]))) return false;
            return true;
          }
          if (a3 instanceof Set && b3 instanceof Set) {
            if (a3.size !== b3.size) return false;
            for (i3 of a3.entries())
              if (!b3.has(i3[0])) return false;
            return true;
          }
          if (ArrayBuffer.isView(a3) && ArrayBuffer.isView(b3)) {
            length2 = a3.length;
            if (length2 != b3.length) return false;
            for (i3 = length2; i3-- !== 0; )
              if (a3[i3] !== b3[i3]) return false;
            return true;
          }
          if (a3.constructor === RegExp) return a3.source === b3.source && a3.flags === b3.flags;
          if (a3.valueOf !== Object.prototype.valueOf) return a3.valueOf() === b3.valueOf();
          if (a3.toString !== Object.prototype.toString) return a3.toString() === b3.toString();
          keys = Object.keys(a3);
          length2 = keys.length;
          if (length2 !== Object.keys(b3).length) return false;
          for (i3 = length2; i3-- !== 0; )
            if (!Object.prototype.hasOwnProperty.call(b3, keys[i3])) return false;
          for (i3 = length2; i3-- !== 0; ) {
            var key = keys[i3];
            if (!equal(a3[key], b3[key])) return false;
          }
          return true;
        }
        return a3 !== a3 && b3 !== b3;
      };
    }
  });

  // package-external:@wordpress/warning
  var require_warning = __commonJS({
    "package-external:@wordpress/warning"(exports, module) {
      module.exports = window.wp.warning;
    }
  });

  // node_modules/highlight-words-core/dist/index.js
  var require_dist = __commonJS({
    "node_modules/highlight-words-core/dist/index.js"(exports, module) {
      module.exports = /******/
      (function(modules) {
        var installedModules = {};
        function __webpack_require__(moduleId) {
          if (installedModules[moduleId])
            return installedModules[moduleId].exports;
          var module2 = installedModules[moduleId] = {
            /******/
            exports: {},
            /******/
            id: moduleId,
            /******/
            loaded: false
            /******/
          };
          modules[moduleId].call(module2.exports, module2, module2.exports, __webpack_require__);
          module2.loaded = true;
          return module2.exports;
        }
        __webpack_require__.m = modules;
        __webpack_require__.c = installedModules;
        __webpack_require__.p = "";
        return __webpack_require__(0);
      })([
        /* 0 */
        /***/
        (function(module2, exports2, __webpack_require__) {
          module2.exports = __webpack_require__(1);
        }),
        /* 1 */
        /***/
        (function(module2, exports2, __webpack_require__) {
          "use strict";
          Object.defineProperty(exports2, "__esModule", {
            value: true
          });
          var _utils = __webpack_require__(2);
          Object.defineProperty(exports2, "combineChunks", {
            enumerable: true,
            get: function get() {
              return _utils.combineChunks;
            }
          });
          Object.defineProperty(exports2, "fillInChunks", {
            enumerable: true,
            get: function get() {
              return _utils.fillInChunks;
            }
          });
          Object.defineProperty(exports2, "findAll", {
            enumerable: true,
            get: function get() {
              return _utils.findAll;
            }
          });
          Object.defineProperty(exports2, "findChunks", {
            enumerable: true,
            get: function get() {
              return _utils.findChunks;
            }
          });
        }),
        /* 2 */
        /***/
        (function(module2, exports2) {
          "use strict";
          Object.defineProperty(exports2, "__esModule", {
            value: true
          });
          var findAll2 = exports2.findAll = function findAll3(_ref11) {
            var autoEscape = _ref11.autoEscape, _ref$caseSensitive = _ref11.caseSensitive, caseSensitive = _ref$caseSensitive === void 0 ? false : _ref$caseSensitive, _ref$findChunks = _ref11.findChunks, findChunks = _ref$findChunks === void 0 ? defaultFindChunks : _ref$findChunks, sanitize2 = _ref11.sanitize, searchWords = _ref11.searchWords, textToHighlight = _ref11.textToHighlight;
            return fillInChunks({
              chunksToHighlight: combineChunks({
                chunks: findChunks({
                  autoEscape,
                  caseSensitive,
                  sanitize: sanitize2,
                  searchWords,
                  textToHighlight
                })
              }),
              totalLength: textToHighlight ? textToHighlight.length : 0
            });
          };
          var combineChunks = exports2.combineChunks = function combineChunks2(_ref25) {
            var chunks = _ref25.chunks;
            chunks = chunks.sort(function(first, second) {
              return first.start - second.start;
            }).reduce(function(processedChunks, nextChunk) {
              if (processedChunks.length === 0) {
                return [nextChunk];
              } else {
                var prevChunk = processedChunks.pop();
                if (nextChunk.start <= prevChunk.end) {
                  var endIndex = Math.max(prevChunk.end, nextChunk.end);
                  processedChunks.push({ highlight: false, start: prevChunk.start, end: endIndex });
                } else {
                  processedChunks.push(prevChunk, nextChunk);
                }
                return processedChunks;
              }
            }, []);
            return chunks;
          };
          var defaultFindChunks = function defaultFindChunks2(_ref32) {
            var autoEscape = _ref32.autoEscape, caseSensitive = _ref32.caseSensitive, _ref3$sanitize = _ref32.sanitize, sanitize2 = _ref3$sanitize === void 0 ? defaultSanitize : _ref3$sanitize, searchWords = _ref32.searchWords, textToHighlight = _ref32.textToHighlight;
            textToHighlight = sanitize2(textToHighlight);
            return searchWords.filter(function(searchWord) {
              return searchWord;
            }).reduce(function(chunks, searchWord) {
              searchWord = sanitize2(searchWord);
              if (autoEscape) {
                searchWord = escapeRegExpFn(searchWord);
              }
              var regex = new RegExp(searchWord, caseSensitive ? "g" : "gi");
              var match4 = void 0;
              while (match4 = regex.exec(textToHighlight)) {
                var _start = match4.index;
                var _end = regex.lastIndex;
                if (_end > _start) {
                  chunks.push({ highlight: false, start: _start, end: _end });
                }
                if (match4.index === regex.lastIndex) {
                  regex.lastIndex++;
                }
              }
              return chunks;
            }, []);
          };
          exports2.findChunks = defaultFindChunks;
          var fillInChunks = exports2.fillInChunks = function fillInChunks2(_ref42) {
            var chunksToHighlight = _ref42.chunksToHighlight, totalLength = _ref42.totalLength;
            var allChunks = [];
            var append2 = function append3(start, end, highlight) {
              if (end - start > 0) {
                allChunks.push({
                  start,
                  end,
                  highlight
                });
              }
            };
            if (chunksToHighlight.length === 0) {
              append2(0, totalLength, false);
            } else {
              var lastIndex = 0;
              chunksToHighlight.forEach(function(chunk) {
                append2(lastIndex, chunk.start, false);
                append2(chunk.start, chunk.end, true);
                lastIndex = chunk.end;
              });
              append2(lastIndex, totalLength, false);
            }
            return allChunks;
          };
          function defaultSanitize(string) {
            return string;
          }
          function escapeRegExpFn(string) {
            return string.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
          }
        })
        /******/
      ]);
    }
  });

  // node_modules/remove-accents/index.js
  var require_remove_accents = __commonJS({
    "node_modules/remove-accents/index.js"(exports, module) {
      var characterMap = {
        "\xC0": "A",
        "\xC1": "A",
        "\xC2": "A",
        "\xC3": "A",
        "\xC4": "A",
        "\xC5": "A",
        "\u1EA4": "A",
        "\u1EAE": "A",
        "\u1EB2": "A",
        "\u1EB4": "A",
        "\u1EB6": "A",
        "\xC6": "AE",
        "\u1EA6": "A",
        "\u1EB0": "A",
        "\u0202": "A",
        "\u1EA2": "A",
        "\u1EA0": "A",
        "\u1EA8": "A",
        "\u1EAA": "A",
        "\u1EAC": "A",
        "\xC7": "C",
        "\u1E08": "C",
        "\xC8": "E",
        "\xC9": "E",
        "\xCA": "E",
        "\xCB": "E",
        "\u1EBE": "E",
        "\u1E16": "E",
        "\u1EC0": "E",
        "\u1E14": "E",
        "\u1E1C": "E",
        "\u0206": "E",
        "\u1EBA": "E",
        "\u1EBC": "E",
        "\u1EB8": "E",
        "\u1EC2": "E",
        "\u1EC4": "E",
        "\u1EC6": "E",
        "\xCC": "I",
        "\xCD": "I",
        "\xCE": "I",
        "\xCF": "I",
        "\u1E2E": "I",
        "\u020A": "I",
        "\u1EC8": "I",
        "\u1ECA": "I",
        "\xD0": "D",
        "\xD1": "N",
        "\xD2": "O",
        "\xD3": "O",
        "\xD4": "O",
        "\xD5": "O",
        "\xD6": "O",
        "\xD8": "O",
        "\u1ED0": "O",
        "\u1E4C": "O",
        "\u1E52": "O",
        "\u020E": "O",
        "\u1ECE": "O",
        "\u1ECC": "O",
        "\u1ED4": "O",
        "\u1ED6": "O",
        "\u1ED8": "O",
        "\u1EDC": "O",
        "\u1EDE": "O",
        "\u1EE0": "O",
        "\u1EDA": "O",
        "\u1EE2": "O",
        "\xD9": "U",
        "\xDA": "U",
        "\xDB": "U",
        "\xDC": "U",
        "\u1EE6": "U",
        "\u1EE4": "U",
        "\u1EEC": "U",
        "\u1EEE": "U",
        "\u1EF0": "U",
        "\xDD": "Y",
        "\xE0": "a",
        "\xE1": "a",
        "\xE2": "a",
        "\xE3": "a",
        "\xE4": "a",
        "\xE5": "a",
        "\u1EA5": "a",
        "\u1EAF": "a",
        "\u1EB3": "a",
        "\u1EB5": "a",
        "\u1EB7": "a",
        "\xE6": "ae",
        "\u1EA7": "a",
        "\u1EB1": "a",
        "\u0203": "a",
        "\u1EA3": "a",
        "\u1EA1": "a",
        "\u1EA9": "a",
        "\u1EAB": "a",
        "\u1EAD": "a",
        "\xE7": "c",
        "\u1E09": "c",
        "\xE8": "e",
        "\xE9": "e",
        "\xEA": "e",
        "\xEB": "e",
        "\u1EBF": "e",
        "\u1E17": "e",
        "\u1EC1": "e",
        "\u1E15": "e",
        "\u1E1D": "e",
        "\u0207": "e",
        "\u1EBB": "e",
        "\u1EBD": "e",
        "\u1EB9": "e",
        "\u1EC3": "e",
        "\u1EC5": "e",
        "\u1EC7": "e",
        "\xEC": "i",
        "\xED": "i",
        "\xEE": "i",
        "\xEF": "i",
        "\u1E2F": "i",
        "\u020B": "i",
        "\u1EC9": "i",
        "\u1ECB": "i",
        "\xF0": "d",
        "\xF1": "n",
        "\xF2": "o",
        "\xF3": "o",
        "\xF4": "o",
        "\xF5": "o",
        "\xF6": "o",
        "\xF8": "o",
        "\u1ED1": "o",
        "\u1E4D": "o",
        "\u1E53": "o",
        "\u020F": "o",
        "\u1ECF": "o",
        "\u1ECD": "o",
        "\u1ED5": "o",
        "\u1ED7": "o",
        "\u1ED9": "o",
        "\u1EDD": "o",
        "\u1EDF": "o",
        "\u1EE1": "o",
        "\u1EDB": "o",
        "\u1EE3": "o",
        "\xF9": "u",
        "\xFA": "u",
        "\xFB": "u",
        "\xFC": "u",
        "\u1EE7": "u",
        "\u1EE5": "u",
        "\u1EED": "u",
        "\u1EEF": "u",
        "\u1EF1": "u",
        "\xFD": "y",
        "\xFF": "y",
        "\u0100": "A",
        "\u0101": "a",
        "\u0102": "A",
        "\u0103": "a",
        "\u0104": "A",
        "\u0105": "a",
        "\u0106": "C",
        "\u0107": "c",
        "\u0108": "C",
        "\u0109": "c",
        "\u010A": "C",
        "\u010B": "c",
        "\u010C": "C",
        "\u010D": "c",
        "C\u0306": "C",
        "c\u0306": "c",
        "\u010E": "D",
        "\u010F": "d",
        "\u0110": "D",
        "\u0111": "d",
        "\u0112": "E",
        "\u0113": "e",
        "\u0114": "E",
        "\u0115": "e",
        "\u0116": "E",
        "\u0117": "e",
        "\u0118": "E",
        "\u0119": "e",
        "\u011A": "E",
        "\u011B": "e",
        "\u011C": "G",
        "\u01F4": "G",
        "\u011D": "g",
        "\u01F5": "g",
        "\u011E": "G",
        "\u011F": "g",
        "\u0120": "G",
        "\u0121": "g",
        "\u0122": "G",
        "\u0123": "g",
        "\u0124": "H",
        "\u0125": "h",
        "\u0126": "H",
        "\u0127": "h",
        "\u1E2A": "H",
        "\u1E2B": "h",
        "\u0128": "I",
        "\u0129": "i",
        "\u012A": "I",
        "\u012B": "i",
        "\u012C": "I",
        "\u012D": "i",
        "\u012E": "I",
        "\u012F": "i",
        "\u0130": "I",
        "\u0131": "i",
        "\u0132": "IJ",
        "\u0133": "ij",
        "\u0134": "J",
        "\u0135": "j",
        "\u0136": "K",
        "\u0137": "k",
        "\u1E30": "K",
        "\u1E31": "k",
        "K\u0306": "K",
        "k\u0306": "k",
        "\u0139": "L",
        "\u013A": "l",
        "\u013B": "L",
        "\u013C": "l",
        "\u013D": "L",
        "\u013E": "l",
        "\u013F": "L",
        "\u0140": "l",
        "\u0141": "l",
        "\u0142": "l",
        "\u1E3E": "M",
        "\u1E3F": "m",
        "M\u0306": "M",
        "m\u0306": "m",
        "\u0143": "N",
        "\u0144": "n",
        "\u0145": "N",
        "\u0146": "n",
        "\u0147": "N",
        "\u0148": "n",
        "\u0149": "n",
        "N\u0306": "N",
        "n\u0306": "n",
        "\u014C": "O",
        "\u014D": "o",
        "\u014E": "O",
        "\u014F": "o",
        "\u0150": "O",
        "\u0151": "o",
        "\u0152": "OE",
        "\u0153": "oe",
        "P\u0306": "P",
        "p\u0306": "p",
        "\u0154": "R",
        "\u0155": "r",
        "\u0156": "R",
        "\u0157": "r",
        "\u0158": "R",
        "\u0159": "r",
        "R\u0306": "R",
        "r\u0306": "r",
        "\u0212": "R",
        "\u0213": "r",
        "\u015A": "S",
        "\u015B": "s",
        "\u015C": "S",
        "\u015D": "s",
        "\u015E": "S",
        "\u0218": "S",
        "\u0219": "s",
        "\u015F": "s",
        "\u0160": "S",
        "\u0161": "s",
        "\u0162": "T",
        "\u0163": "t",
        "\u021B": "t",
        "\u021A": "T",
        "\u0164": "T",
        "\u0165": "t",
        "\u0166": "T",
        "\u0167": "t",
        "T\u0306": "T",
        "t\u0306": "t",
        "\u0168": "U",
        "\u0169": "u",
        "\u016A": "U",
        "\u016B": "u",
        "\u016C": "U",
        "\u016D": "u",
        "\u016E": "U",
        "\u016F": "u",
        "\u0170": "U",
        "\u0171": "u",
        "\u0172": "U",
        "\u0173": "u",
        "\u0216": "U",
        "\u0217": "u",
        "V\u0306": "V",
        "v\u0306": "v",
        "\u0174": "W",
        "\u0175": "w",
        "\u1E82": "W",
        "\u1E83": "w",
        "X\u0306": "X",
        "x\u0306": "x",
        "\u0176": "Y",
        "\u0177": "y",
        "\u0178": "Y",
        "Y\u0306": "Y",
        "y\u0306": "y",
        "\u0179": "Z",
        "\u017A": "z",
        "\u017B": "Z",
        "\u017C": "z",
        "\u017D": "Z",
        "\u017E": "z",
        "\u017F": "s",
        "\u0192": "f",
        "\u01A0": "O",
        "\u01A1": "o",
        "\u01AF": "U",
        "\u01B0": "u",
        "\u01CD": "A",
        "\u01CE": "a",
        "\u01CF": "I",
        "\u01D0": "i",
        "\u01D1": "O",
        "\u01D2": "o",
        "\u01D3": "U",
        "\u01D4": "u",
        "\u01D5": "U",
        "\u01D6": "u",
        "\u01D7": "U",
        "\u01D8": "u",
        "\u01D9": "U",
        "\u01DA": "u",
        "\u01DB": "U",
        "\u01DC": "u",
        "\u1EE8": "U",
        "\u1EE9": "u",
        "\u1E78": "U",
        "\u1E79": "u",
        "\u01FA": "A",
        "\u01FB": "a",
        "\u01FC": "AE",
        "\u01FD": "ae",
        "\u01FE": "O",
        "\u01FF": "o",
        "\xDE": "TH",
        "\xFE": "th",
        "\u1E54": "P",
        "\u1E55": "p",
        "\u1E64": "S",
        "\u1E65": "s",
        "X\u0301": "X",
        "x\u0301": "x",
        "\u0403": "\u0413",
        "\u0453": "\u0433",
        "\u040C": "\u041A",
        "\u045C": "\u043A",
        "A\u030B": "A",
        "a\u030B": "a",
        "E\u030B": "E",
        "e\u030B": "e",
        "I\u030B": "I",
        "i\u030B": "i",
        "\u01F8": "N",
        "\u01F9": "n",
        "\u1ED2": "O",
        "\u1ED3": "o",
        "\u1E50": "O",
        "\u1E51": "o",
        "\u1EEA": "U",
        "\u1EEB": "u",
        "\u1E80": "W",
        "\u1E81": "w",
        "\u1EF2": "Y",
        "\u1EF3": "y",
        "\u0200": "A",
        "\u0201": "a",
        "\u0204": "E",
        "\u0205": "e",
        "\u0208": "I",
        "\u0209": "i",
        "\u020C": "O",
        "\u020D": "o",
        "\u0210": "R",
        "\u0211": "r",
        "\u0214": "U",
        "\u0215": "u",
        "B\u030C": "B",
        "b\u030C": "b",
        "\u010C\u0323": "C",
        "\u010D\u0323": "c",
        "\xCA\u030C": "E",
        "\xEA\u030C": "e",
        "F\u030C": "F",
        "f\u030C": "f",
        "\u01E6": "G",
        "\u01E7": "g",
        "\u021E": "H",
        "\u021F": "h",
        "J\u030C": "J",
        "\u01F0": "j",
        "\u01E8": "K",
        "\u01E9": "k",
        "M\u030C": "M",
        "m\u030C": "m",
        "P\u030C": "P",
        "p\u030C": "p",
        "Q\u030C": "Q",
        "q\u030C": "q",
        "\u0158\u0329": "R",
        "\u0159\u0329": "r",
        "\u1E66": "S",
        "\u1E67": "s",
        "V\u030C": "V",
        "v\u030C": "v",
        "W\u030C": "W",
        "w\u030C": "w",
        "X\u030C": "X",
        "x\u030C": "x",
        "Y\u030C": "Y",
        "y\u030C": "y",
        "A\u0327": "A",
        "a\u0327": "a",
        "B\u0327": "B",
        "b\u0327": "b",
        "\u1E10": "D",
        "\u1E11": "d",
        "\u0228": "E",
        "\u0229": "e",
        "\u0190\u0327": "E",
        "\u025B\u0327": "e",
        "\u1E28": "H",
        "\u1E29": "h",
        "I\u0327": "I",
        "i\u0327": "i",
        "\u0197\u0327": "I",
        "\u0268\u0327": "i",
        "M\u0327": "M",
        "m\u0327": "m",
        "O\u0327": "O",
        "o\u0327": "o",
        "Q\u0327": "Q",
        "q\u0327": "q",
        "U\u0327": "U",
        "u\u0327": "u",
        "X\u0327": "X",
        "x\u0327": "x",
        "Z\u0327": "Z",
        "z\u0327": "z",
        "\u0439": "\u0438",
        "\u0419": "\u0418",
        "\u0451": "\u0435",
        "\u0401": "\u0415"
      };
      var chars2 = Object.keys(characterMap).join("|");
      var allAccents = new RegExp(chars2, "g");
      var firstAccent = new RegExp(chars2, "");
      function matcher(match4) {
        return characterMap[match4];
      }
      var removeAccents5 = function(string) {
        return string.replace(allAccents, matcher);
      };
      var hasAccents = function(string) {
        return !!string.match(firstAccent);
      };
      module.exports = removeAccents5;
      module.exports.has = hasAccents;
      module.exports.remove = removeAccents5;
    }
  });

  // package-external:@wordpress/rich-text
  var require_rich_text = __commonJS({
    "package-external:@wordpress/rich-text"(exports, module) {
      module.exports = window.wp.richText;
    }
  });

  // package-external:@wordpress/a11y
  var require_a11y = __commonJS({
    "package-external:@wordpress/a11y"(exports, module) {
      module.exports = window.wp.a11y;
    }
  });

  // package-external:@wordpress/keycodes
  var require_keycodes = __commonJS({
    "package-external:@wordpress/keycodes"(exports, module) {
      module.exports = window.wp.keycodes;
    }
  });

  // package-external:@wordpress/is-shallow-equal
  var require_is_shallow_equal = __commonJS({
    "package-external:@wordpress/is-shallow-equal"(exports, module) {
      module.exports = window.wp.isShallowEqual;
    }
  });

  // node_modules/gradient-parser/build/node.js
  var require_node = __commonJS({
    "node_modules/gradient-parser/build/node.js"(exports) {
      var GradientParser = GradientParser || {};
      GradientParser.stringify = /* @__PURE__ */ (function() {
        var visitor = {
          "visit_linear-gradient": function(node2) {
            return visitor.visit_gradient(node2);
          },
          "visit_repeating-linear-gradient": function(node2) {
            return visitor.visit_gradient(node2);
          },
          "visit_radial-gradient": function(node2) {
            return visitor.visit_gradient(node2);
          },
          "visit_repeating-radial-gradient": function(node2) {
            return visitor.visit_gradient(node2);
          },
          "visit_gradient": function(node2) {
            var orientation = visitor.visit(node2.orientation);
            if (orientation) {
              orientation += ", ";
            }
            return node2.type + "(" + orientation + visitor.visit(node2.colorStops) + ")";
          },
          "visit_shape": function(node2) {
            var result = node2.value, at = visitor.visit(node2.at), style2 = visitor.visit(node2.style);
            if (style2) {
              result += " " + style2;
            }
            if (at) {
              result += " at " + at;
            }
            return result;
          },
          "visit_default-radial": function(node2) {
            var result = "", at = visitor.visit(node2.at);
            if (at) {
              result += at;
            }
            return result;
          },
          "visit_extent-keyword": function(node2) {
            var result = node2.value, at = visitor.visit(node2.at);
            if (at) {
              result += " at " + at;
            }
            return result;
          },
          "visit_position-keyword": function(node2) {
            return node2.value;
          },
          "visit_position": function(node2) {
            return visitor.visit(node2.value.x) + " " + visitor.visit(node2.value.y);
          },
          "visit_%": function(node2) {
            return node2.value + "%";
          },
          "visit_em": function(node2) {
            return node2.value + "em";
          },
          "visit_px": function(node2) {
            return node2.value + "px";
          },
          "visit_calc": function(node2) {
            return "calc(" + node2.value + ")";
          },
          "visit_literal": function(node2) {
            return visitor.visit_color(node2.value, node2);
          },
          "visit_hex": function(node2) {
            return visitor.visit_color("#" + node2.value, node2);
          },
          "visit_rgb": function(node2) {
            return visitor.visit_color("rgb(" + node2.value.join(", ") + ")", node2);
          },
          "visit_rgba": function(node2) {
            return visitor.visit_color("rgba(" + node2.value.join(", ") + ")", node2);
          },
          "visit_hsl": function(node2) {
            return visitor.visit_color("hsl(" + node2.value[0] + ", " + node2.value[1] + "%, " + node2.value[2] + "%)", node2);
          },
          "visit_hsla": function(node2) {
            return visitor.visit_color("hsla(" + node2.value[0] + ", " + node2.value[1] + "%, " + node2.value[2] + "%, " + node2.value[3] + ")", node2);
          },
          "visit_var": function(node2) {
            return visitor.visit_color("var(" + node2.value + ")", node2);
          },
          "visit_color": function(resultColor, node2) {
            var result = resultColor, length2 = visitor.visit(node2.length);
            if (length2) {
              result += " " + length2;
            }
            return result;
          },
          "visit_angular": function(node2) {
            return node2.value + "deg";
          },
          "visit_directional": function(node2) {
            return "to " + node2.value;
          },
          "visit_array": function(elements2) {
            var result = "", size3 = elements2.length;
            elements2.forEach(function(element, i3) {
              result += visitor.visit(element);
              if (i3 < size3 - 1) {
                result += ", ";
              }
            });
            return result;
          },
          "visit_object": function(obj) {
            if (obj.width && obj.height) {
              return visitor.visit(obj.width) + " " + visitor.visit(obj.height);
            }
            return "";
          },
          "visit": function(element) {
            if (!element) {
              return "";
            }
            var result = "";
            if (element instanceof Array) {
              return visitor.visit_array(element);
            } else if (typeof element === "object" && !element.type) {
              return visitor.visit_object(element);
            } else if (element.type) {
              var nodeVisitor = visitor["visit_" + element.type];
              if (nodeVisitor) {
                return nodeVisitor(element);
              } else {
                throw Error("Missing visitor visit_" + element.type);
              }
            } else {
              throw Error("Invalid node.");
            }
          }
        };
        return function(root) {
          return visitor.visit(root);
        };
      })();
      var GradientParser = GradientParser || {};
      GradientParser.parse = /* @__PURE__ */ (function() {
        var tokens = {
          linearGradient: /^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,
          repeatingLinearGradient: /^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,
          radialGradient: /^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,
          repeatingRadialGradient: /^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,
          sideOrCorner: /^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,
          extentKeywords: /^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,
          positionKeywords: /^(left|center|right|top|bottom)/i,
          pixelValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,
          percentageValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,
          emValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,
          angleValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,
          radianValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))rad/,
          startCall: /^\(/,
          endCall: /^\)/,
          comma: /^,/,
          hexColor: /^\#([0-9a-fA-F]+)/,
          literalColor: /^([a-zA-Z]+)/,
          rgbColor: /^rgb/i,
          rgbaColor: /^rgba/i,
          varColor: /^var/i,
          calcValue: /^calc/i,
          variableName: /^(--[a-zA-Z0-9-,\s\#]+)/,
          number: /^(([0-9]*\.[0-9]+)|([0-9]+\.?))/,
          hslColor: /^hsl/i,
          hslaColor: /^hsla/i
        };
        var input = "";
        function error(msg) {
          var err = new Error(input + ": " + msg);
          err.source = input;
          throw err;
        }
        function getAST() {
          var ast = matchListDefinitions();
          if (input.length > 0) {
            error("Invalid input not EOF");
          }
          return ast;
        }
        function matchListDefinitions() {
          return matchListing(matchDefinition);
        }
        function matchDefinition() {
          return matchGradient(
            "linear-gradient",
            tokens.linearGradient,
            matchLinearOrientation
          ) || matchGradient(
            "repeating-linear-gradient",
            tokens.repeatingLinearGradient,
            matchLinearOrientation
          ) || matchGradient(
            "radial-gradient",
            tokens.radialGradient,
            matchListRadialOrientations
          ) || matchGradient(
            "repeating-radial-gradient",
            tokens.repeatingRadialGradient,
            matchListRadialOrientations
          );
        }
        function matchGradient(gradientType, pattern, orientationMatcher) {
          return matchCall(pattern, function(captures) {
            var orientation = orientationMatcher();
            if (orientation) {
              if (!scan(tokens.comma)) {
                error("Missing comma before color stops");
              }
            }
            return {
              type: gradientType,
              orientation,
              colorStops: matchListing(matchColorStop)
            };
          });
        }
        function matchCall(pattern, callback) {
          var captures = scan(pattern);
          if (captures) {
            if (!scan(tokens.startCall)) {
              error("Missing (");
            }
            var result = callback(captures);
            if (!scan(tokens.endCall)) {
              error("Missing )");
            }
            return result;
          }
        }
        function matchLinearOrientation() {
          var sideOrCorner = matchSideOrCorner();
          if (sideOrCorner) {
            return sideOrCorner;
          }
          var legacyDirection = match4("position-keyword", tokens.positionKeywords, 1);
          if (legacyDirection) {
            return {
              type: "directional",
              value: legacyDirection.value
            };
          }
          return matchAngle();
        }
        function matchSideOrCorner() {
          return match4("directional", tokens.sideOrCorner, 1);
        }
        function matchAngle() {
          return match4("angular", tokens.angleValue, 1) || match4("angular", tokens.radianValue, 1);
        }
        function matchListRadialOrientations() {
          var radialOrientations, radialOrientation = matchRadialOrientation(), lookaheadCache;
          if (radialOrientation) {
            radialOrientations = [];
            radialOrientations.push(radialOrientation);
            lookaheadCache = input;
            if (scan(tokens.comma)) {
              radialOrientation = matchRadialOrientation();
              if (radialOrientation) {
                radialOrientations.push(radialOrientation);
              } else {
                input = lookaheadCache;
              }
            }
          }
          return radialOrientations;
        }
        function matchRadialOrientation() {
          var radialType = matchCircle() || matchEllipse();
          if (radialType) {
            radialType.at = matchAtPosition();
          } else {
            var extent = matchExtentKeyword();
            if (extent) {
              radialType = extent;
              var positionAt = matchAtPosition();
              if (positionAt) {
                radialType.at = positionAt;
              }
            } else {
              var atPosition = matchAtPosition();
              if (atPosition) {
                radialType = {
                  type: "default-radial",
                  at: atPosition
                };
              } else {
                var defaultPosition = matchPositioning();
                if (defaultPosition) {
                  radialType = {
                    type: "default-radial",
                    at: defaultPosition
                  };
                }
              }
            }
          }
          return radialType;
        }
        function matchCircle() {
          var circle = match4("shape", /^(circle)/i, 0);
          if (circle) {
            circle.style = matchLength() || matchExtentKeyword();
          }
          return circle;
        }
        function matchEllipse() {
          var ellipse = match4("shape", /^(ellipse)/i, 0);
          if (ellipse) {
            ellipse.style = matchPositioning() || matchDistance() || matchExtentKeyword();
          }
          return ellipse;
        }
        function matchExtentKeyword() {
          return match4("extent-keyword", tokens.extentKeywords, 1);
        }
        function matchAtPosition() {
          if (match4("position", /^at/, 0)) {
            var positioning = matchPositioning();
            if (!positioning) {
              error("Missing positioning value");
            }
            return positioning;
          }
        }
        function matchPositioning() {
          var location = matchCoordinates();
          if (location.x || location.y) {
            return {
              type: "position",
              value: location
            };
          }
        }
        function matchCoordinates() {
          return {
            x: matchDistance(),
            y: matchDistance()
          };
        }
        function matchListing(matcher) {
          var captures = matcher(), result = [];
          if (captures) {
            result.push(captures);
            while (scan(tokens.comma)) {
              captures = matcher();
              if (captures) {
                result.push(captures);
              } else {
                error("One extra comma");
              }
            }
          }
          return result;
        }
        function matchColorStop() {
          var color2 = matchColor();
          if (!color2) {
            error("Expected color definition");
          }
          color2.length = matchDistance();
          return color2;
        }
        function matchColor() {
          return matchHexColor() || matchHSLAColor() || matchHSLColor() || matchRGBAColor() || matchRGBColor() || matchVarColor() || matchLiteralColor();
        }
        function matchLiteralColor() {
          return match4("literal", tokens.literalColor, 0);
        }
        function matchHexColor() {
          return match4("hex", tokens.hexColor, 1);
        }
        function matchRGBColor() {
          return matchCall(tokens.rgbColor, function() {
            return {
              type: "rgb",
              value: matchListing(matchNumber)
            };
          });
        }
        function matchRGBAColor() {
          return matchCall(tokens.rgbaColor, function() {
            return {
              type: "rgba",
              value: matchListing(matchNumber)
            };
          });
        }
        function matchVarColor() {
          return matchCall(tokens.varColor, function() {
            return {
              type: "var",
              value: matchVariableName()
            };
          });
        }
        function matchHSLColor() {
          return matchCall(tokens.hslColor, function() {
            var lookahead = scan(tokens.percentageValue);
            if (lookahead) {
              error("HSL hue value must be a number in degrees (0-360) or normalized (-360 to 360), not a percentage");
            }
            var hue = matchNumber();
            scan(tokens.comma);
            var captures = scan(tokens.percentageValue);
            var sat = captures ? captures[1] : null;
            scan(tokens.comma);
            captures = scan(tokens.percentageValue);
            var light = captures ? captures[1] : null;
            if (!sat || !light) {
              error("Expected percentage value for saturation and lightness in HSL");
            }
            return {
              type: "hsl",
              value: [hue, sat, light]
            };
          });
        }
        function matchHSLAColor() {
          return matchCall(tokens.hslaColor, function() {
            var hue = matchNumber();
            scan(tokens.comma);
            var captures = scan(tokens.percentageValue);
            var sat = captures ? captures[1] : null;
            scan(tokens.comma);
            captures = scan(tokens.percentageValue);
            var light = captures ? captures[1] : null;
            scan(tokens.comma);
            var alpha2 = matchNumber();
            if (!sat || !light) {
              error("Expected percentage value for saturation and lightness in HSLA");
            }
            return {
              type: "hsla",
              value: [hue, sat, light, alpha2]
            };
          });
        }
        function matchPercentage() {
          var captures = scan(tokens.percentageValue);
          return captures ? captures[1] : null;
        }
        function matchVariableName() {
          return scan(tokens.variableName)[1];
        }
        function matchNumber() {
          return scan(tokens.number)[1];
        }
        function matchDistance() {
          return match4("%", tokens.percentageValue, 1) || matchPositionKeyword() || matchCalc() || matchLength();
        }
        function matchPositionKeyword() {
          return match4("position-keyword", tokens.positionKeywords, 1);
        }
        function matchCalc() {
          return matchCall(tokens.calcValue, function() {
            var openParenCount = 1;
            var i3 = 0;
            while (openParenCount > 0 && i3 < input.length) {
              var char2 = input.charAt(i3);
              if (char2 === "(") {
                openParenCount++;
              } else if (char2 === ")") {
                openParenCount--;
              }
              i3++;
            }
            if (openParenCount > 0) {
              error("Missing closing parenthesis in calc() expression");
            }
            var calcContent = input.substring(0, i3 - 1);
            consume(i3 - 1);
            return {
              type: "calc",
              value: calcContent
            };
          });
        }
        function matchLength() {
          return match4("px", tokens.pixelValue, 1) || match4("em", tokens.emValue, 1);
        }
        function match4(type, pattern, captureIndex) {
          var captures = scan(pattern);
          if (captures) {
            return {
              type,
              value: captures[captureIndex]
            };
          }
        }
        function scan(regexp) {
          var captures, blankCaptures;
          blankCaptures = /^[\n\r\t\s]+/.exec(input);
          if (blankCaptures) {
            consume(blankCaptures[0].length);
          }
          captures = regexp.exec(input);
          if (captures) {
            consume(captures[0].length);
          }
          return captures;
        }
        function consume(size3) {
          input = input.substr(size3);
        }
        return function(code) {
          input = code.toString().trim();
          if (input.endsWith(";")) {
            input = input.slice(0, -1);
          }
          return getAST();
        };
      })();
      exports.parse = GradientParser.parse;
      exports.stringify = GradientParser.stringify;
    }
  });

  // package-external:@wordpress/dom
  var require_dom = __commonJS({
    "package-external:@wordpress/dom"(exports, module) {
      module.exports = window.wp.dom;
    }
  });

  // package-external:@wordpress/date
  var require_date = __commonJS({
    "package-external:@wordpress/date"(exports, module) {
      module.exports = window.wp.date;
    }
  });

  // package-external:@wordpress/escape-html
  var require_escape_html = __commonJS({
    "package-external:@wordpress/escape-html"(exports, module) {
      module.exports = window.wp.escapeHtml;
    }
  });

  // package-external:@wordpress/html-entities
  var require_html_entities = __commonJS({
    "package-external:@wordpress/html-entities"(exports, module) {
      module.exports = window.wp.htmlEntities;
    }
  });

  // node_modules/fast-memoize/src/index.js
  var require_src = __commonJS({
    "node_modules/fast-memoize/src/index.js"(exports, module) {
      function memoize3(fn, options2) {
        var cache2 = options2 && options2.cache ? options2.cache : cacheDefault;
        var serializer = options2 && options2.serializer ? options2.serializer : serializerDefault;
        var strategy = options2 && options2.strategy ? options2.strategy : strategyDefault;
        return strategy(fn, {
          cache: cache2,
          serializer
        });
      }
      function isPrimitive(value) {
        return value == null || typeof value === "number" || typeof value === "boolean";
      }
      function monadic(fn, cache2, serializer, arg) {
        var cacheKey = isPrimitive(arg) ? arg : serializer(arg);
        var computedValue = cache2.get(cacheKey);
        if (typeof computedValue === "undefined") {
          computedValue = fn.call(this, arg);
          cache2.set(cacheKey, computedValue);
        }
        return computedValue;
      }
      function variadic(fn, cache2, serializer) {
        var args = Array.prototype.slice.call(arguments, 3);
        var cacheKey = serializer(args);
        var computedValue = cache2.get(cacheKey);
        if (typeof computedValue === "undefined") {
          computedValue = fn.apply(this, args);
          cache2.set(cacheKey, computedValue);
        }
        return computedValue;
      }
      function assemble(fn, context, strategy, cache2, serialize2) {
        return strategy.bind(
          context,
          fn,
          cache2,
          serialize2
        );
      }
      function strategyDefault(fn, options2) {
        var strategy = fn.length === 1 ? monadic : variadic;
        return assemble(
          fn,
          this,
          strategy,
          options2.cache.create(),
          options2.serializer
        );
      }
      function strategyVariadic(fn, options2) {
        var strategy = variadic;
        return assemble(
          fn,
          this,
          strategy,
          options2.cache.create(),
          options2.serializer
        );
      }
      function strategyMonadic(fn, options2) {
        var strategy = monadic;
        return assemble(
          fn,
          this,
          strategy,
          options2.cache.create(),
          options2.serializer
        );
      }
      function serializerDefault() {
        return JSON.stringify(arguments);
      }
      function ObjectWithoutPrototypeCache() {
        this.cache = /* @__PURE__ */ Object.create(null);
      }
      ObjectWithoutPrototypeCache.prototype.has = function(key) {
        return key in this.cache;
      };
      ObjectWithoutPrototypeCache.prototype.get = function(key) {
        return this.cache[key];
      };
      ObjectWithoutPrototypeCache.prototype.set = function(key, value) {
        this.cache[key] = value;
      };
      var cacheDefault = {
        create: function create2() {
          return new ObjectWithoutPrototypeCache();
        }
      };
      module.exports = memoize3;
      module.exports.strategies = {
        variadic: strategyVariadic,
        monadic: strategyMonadic
      };
    }
  });

  // package-external:@wordpress/hooks
  var require_hooks = __commonJS({
    "package-external:@wordpress/hooks"(exports, module) {
      module.exports = window.wp.hooks;
    }
  });

  // package-external:@wordpress/private-apis
  var require_private_apis = __commonJS({
    "package-external:@wordpress/private-apis"(exports, module) {
      module.exports = window.wp.privateApis;
    }
  });

  // packages/components/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    AlignmentMatrixControl: () => alignment_matrix_control_default,
    AnglePickerControl: () => angle_picker_control_default,
    Animate: () => animate_default,
    Autocomplete: () => Autocomplete,
    BaseControl: () => base_control_default,
    BlockQuotation: () => import_primitives36.BlockQuotation,
    BorderBoxControl: () => component_default24,
    BorderControl: () => component_default21,
    BoxControl: () => box_control_default,
    Button: () => button_default,
    ButtonGroup: () => button_group_default,
    Card: () => component_default27,
    CardBody: () => component_default29,
    CardDivider: () => component_default31,
    CardFooter: () => component_default32,
    CardHeader: () => component_default33,
    CardMedia: () => component_default34,
    CheckboxControl: () => checkbox_control_default,
    Circle: () => import_primitives36.Circle,
    ClipboardButton: () => ClipboardButton,
    ColorIndicator: () => color_indicator_default,
    ColorPalette: () => color_palette_default,
    ColorPicker: () => LegacyAdapter,
    ComboboxControl: () => combobox_control_default,
    Composite: () => Composite22,
    CustomGradientPicker: () => custom_gradient_picker_default,
    CustomSelectControl: () => custom_select_control_default,
    Dashicon: () => dashicon_default,
    DatePicker: () => date_default,
    DateTimePicker: () => date_time_default2,
    Disabled: () => disabled_default,
    Draggable: () => draggable_default,
    DropZone: () => drop_zone_default,
    DropZoneProvider: () => DropZoneProvider,
    Dropdown: () => dropdown_default,
    DropdownMenu: () => dropdown_menu_default,
    DuotonePicker: () => duotone_picker_default,
    DuotoneSwatch: () => duotone_swatch_default,
    ExternalLink: () => external_link_default,
    Fill: () => Fill,
    Flex: () => component_default3,
    FlexBlock: () => component_default5,
    FlexItem: () => component_default4,
    FocalPointPicker: () => focal_point_picker_default,
    FocusReturnProvider: () => Provider3,
    FocusableIframe: () => FocusableIframe,
    FontSizePicker: () => font_size_picker_default,
    FormFileUpload: () => form_file_upload_default,
    FormToggle: () => form_toggle_default,
    FormTokenField: () => form_token_field_default,
    G: () => import_primitives36.G,
    GradientPicker: () => gradient_picker_default,
    Guide: () => guide_default,
    GuidePage: () => GuidePage,
    HorizontalRule: () => import_primitives36.HorizontalRule,
    Icon: () => icon_default3,
    IconButton: () => deprecated_default,
    IsolatedEventContainer: () => isolated_event_container_default,
    KeyboardShortcuts: () => keyboard_shortcuts_default,
    Line: () => import_primitives36.Line,
    MenuGroup: () => menu_group_default,
    MenuItem: () => menu_item_default,
    MenuItemsChoice: () => menu_items_choice_default,
    Modal: () => modal_default,
    NavigableMenu: () => menu_default2,
    Navigator: () => Navigator3,
    Notice: () => notice_default,
    NoticeList: () => list_default,
    Panel: () => panel_default,
    PanelBody: () => body_default,
    PanelHeader: () => header_default,
    PanelRow: () => row_default,
    Path: () => import_primitives36.Path,
    Placeholder: () => placeholder_default,
    Polygon: () => import_primitives36.Polygon,
    Popover: () => popover_default,
    ProgressBar: () => progress_bar_default,
    QueryControls: () => query_controls_default,
    RadioControl: () => radio_control_default,
    RangeControl: () => range_control_default,
    Rect: () => import_primitives36.Rect,
    ResizableBox: () => resizable_box_default,
    ResponsiveWrapper: () => responsive_wrapper_default,
    SVG: () => import_primitives36.SVG,
    SandBox: () => sandbox_default,
    ScrollLock: () => scroll_lock_default,
    SearchControl: () => search_control_default,
    SelectControl: () => select_control_default,
    Slot: () => Slot3,
    SlotFillProvider: () => Provider,
    Snackbar: () => snackbar_default,
    SnackbarList: () => list_default2,
    Spinner: () => spinner_default,
    TabPanel: () => tab_panel_default,
    TabbableContainer: () => tabbable_default,
    TextControl: () => text_control_default,
    TextHighlight: () => text_highlight_default,
    TextareaControl: () => textarea_control_default,
    TimePicker: () => time_default,
    Tip: () => tip_default2,
    ToggleControl: () => toggle_control_default,
    Toolbar: () => toolbar_default,
    ToolbarButton: () => toolbar_button_default,
    ToolbarDropdownMenu: () => toolbar_dropdown_menu_default,
    ToolbarGroup: () => toolbar_group_default,
    ToolbarItem: () => toolbar_item_default,
    Tooltip: () => tooltip_default,
    TreeSelect: () => tree_select_default,
    VisuallyHidden: () => component_default2,
    __experimentalAlignmentMatrixControl: () => alignment_matrix_control_default,
    __experimentalApplyValueToSides: () => applyValueToSides,
    __experimentalBorderBoxControl: () => component_default24,
    __experimentalBorderControl: () => component_default21,
    __experimentalBoxControl: () => box_control_default,
    __experimentalConfirmDialog: () => component_default37,
    __experimentalDivider: () => component_default30,
    __experimentalDropdownContentWrapper: () => dropdown_content_wrapper_default,
    __experimentalElevation: () => component_default25,
    __experimentalGrid: () => component_default22,
    __experimentalHStack: () => component_default9,
    __experimentalHasSplitBorders: () => hasSplitBorders,
    __experimentalHeading: () => component_default19,
    __experimentalInputControl: () => input_control_default,
    __experimentalInputControlPrefixWrapper: () => input_prefix_wrapper_default,
    __experimentalInputControlSuffixWrapper: () => input_suffix_wrapper_default,
    __experimentalIsDefinedBorder: () => isDefinedBorder,
    __experimentalIsEmptyBorder: () => isEmptyBorder,
    __experimentalItem: () => component_default35,
    __experimentalItemGroup: () => component_default36,
    __experimentalNavigation: () => navigation_default,
    __experimentalNavigationBackButton: () => back_button_default,
    __experimentalNavigationGroup: () => group_default,
    __experimentalNavigationItem: () => item_default2,
    __experimentalNavigationMenu: () => menu_default3,
    __experimentalNavigatorBackButton: () => NavigatorBackButton2,
    __experimentalNavigatorButton: () => NavigatorButton2,
    __experimentalNavigatorProvider: () => NavigatorProvider,
    __experimentalNavigatorScreen: () => NavigatorScreen2,
    __experimentalNavigatorToParentButton: () => NavigatorToParentButton2,
    __experimentalNumberControl: () => number_control_default,
    __experimentalPaletteEdit: () => palette_edit_default,
    __experimentalParseQuantityAndUnitFromRawValue: () => parseQuantityAndUnitFromRawValue,
    __experimentalRadio: () => radio_default,
    __experimentalRadioGroup: () => radio_group_default,
    __experimentalScrollable: () => component_default28,
    __experimentalSpacer: () => component_default6,
    __experimentalStyleProvider: () => style_provider_default,
    __experimentalSurface: () => component_default26,
    __experimentalText: () => component_default8,
    __experimentalToggleGroupControl: () => component_default12,
    __experimentalToggleGroupControlOption: () => component_default14,
    __experimentalToggleGroupControlOptionIcon: () => component_default15,
    __experimentalToolbarContext: () => toolbar_context_default,
    __experimentalToolsPanel: () => component_default39,
    __experimentalToolsPanelContext: () => ToolsPanelContext,
    __experimentalToolsPanelItem: () => component_default40,
    __experimentalTreeGrid: () => tree_grid_default,
    __experimentalTreeGridCell: () => cell_default,
    __experimentalTreeGridItem: () => item_default3,
    __experimentalTreeGridRow: () => row_default2,
    __experimentalTruncate: () => component_default7,
    __experimentalUnitControl: () => unit_control_default,
    __experimentalUseCustomUnits: () => useCustomUnits,
    __experimentalUseNavigator: () => useNavigator,
    __experimentalUseSlot: () => useSlot,
    __experimentalUseSlotFills: () => useSlotFills,
    __experimentalVStack: () => component_default18,
    __experimentalView: () => component_default,
    __experimentalZStack: () => component_default41,
    __unstableAnimatePresence: () => AnimatePresence,
    __unstableComposite: () => Composite4,
    __unstableCompositeGroup: () => CompositeGroup4,
    __unstableCompositeItem: () => CompositeItem4,
    __unstableDisclosureContent: () => DisclosureContent22,
    __unstableGetAnimateClassName: () => getAnimateClassName,
    __unstableMotion: () => motion,
    __unstableUseAutocompleteProps: () => useAutocompleteProps,
    __unstableUseCompositeState: () => useCompositeState,
    __unstableUseNavigateRegions: () => useNavigateRegions,
    createSlotFill: () => createSlotFill,
    navigateRegions: () => navigate_regions_default,
    privateApis: () => privateApis,
    useBaseControlProps: () => useBaseControlProps,
    useNavigator: () => useNavigator,
    withConstrainedTabbing: () => with_constrained_tabbing_default,
    withFallbackStyles: () => with_fallback_styles_default,
    withFilters: () => withFilters,
    withFocusOutside: () => with_focus_outside_default,
    withFocusReturn: () => with_focus_return_default,
    withNotices: () => with_notices_default,
    withSpokenMessages: () => with_spoken_messages_default
  });
  var import_primitives36 = __toESM(require_primitives(), 1);

  // node_modules/clsx/dist/clsx.mjs
  function r(e3) {
    var t4, f3, n3 = "";
    if ("string" == typeof e3 || "number" == typeof e3) n3 += e3;
    else if ("object" == typeof e3) if (Array.isArray(e3)) {
      var o4 = e3.length;
      for (t4 = 0; t4 < o4; t4++) e3[t4] && (f3 = r(e3[t4])) && (n3 && (n3 += " "), n3 += f3);
    } else for (f3 in e3) e3[f3] && (n3 && (n3 += " "), n3 += f3);
    return n3;
  }
  function clsx() {
    for (var e3, t4, f3 = 0, n3 = "", o4 = arguments.length; f3 < o4; f3++) (e3 = arguments[f3]) && (t4 = r(e3)) && (n3 && (n3 += " "), n3 += t4);
    return n3;
  }
  var clsx_default = clsx;

  // packages/components/build-module/alignment-matrix-control/index.mjs
  var import_i18n4 = __toESM(require_i18n(), 1);
  var import_compose2 = __toESM(require_compose(), 1);
  var import_element18 = __toESM(require_element(), 1);

  // node_modules/@ariakit/core/esm/__chunks/XMCVU3LR.js
  function noop(..._2) {
  }
  function shallowEqual(a3, b3) {
    if (a3 === b3) return true;
    if (!a3) return false;
    if (!b3) return false;
    if (typeof a3 !== "object") return false;
    if (typeof b3 !== "object") return false;
    const aKeys = Object.keys(a3);
    const bKeys = Object.keys(b3);
    const { length: length2 } = aKeys;
    if (bKeys.length !== length2) return false;
    for (const key of aKeys) {
      if (a3[key] !== b3[key]) {
        return false;
      }
    }
    return true;
  }
  function applyState(argument, currentValue) {
    if (isUpdater(argument)) {
      const value = isLazyValue(currentValue) ? currentValue() : currentValue;
      return argument(value);
    }
    return argument;
  }
  function isUpdater(argument) {
    return typeof argument === "function";
  }
  function isLazyValue(value) {
    return typeof value === "function";
  }
  function hasOwnProperty(object, prop) {
    if (typeof Object.hasOwn === "function") {
      return Object.hasOwn(object, prop);
    }
    return Object.prototype.hasOwnProperty.call(object, prop);
  }
  function chain(...fns) {
    return (...args) => {
      for (const fn of fns) {
        if (typeof fn === "function") {
          fn(...args);
        }
      }
    };
  }
  function normalizeString(str) {
    return str.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
  }
  function omit(object, keys) {
    const result = { ...object };
    for (const key of keys) {
      if (hasOwnProperty(result, key)) {
        delete result[key];
      }
    }
    return result;
  }
  function pick(object, paths) {
    const result = {};
    for (const key of paths) {
      if (hasOwnProperty(object, key)) {
        result[key] = object[key];
      }
    }
    return result;
  }
  function identity(value) {
    return value;
  }
  function invariant(condition, message2) {
    if (condition) return;
    if (typeof message2 !== "string") throw new Error("Invariant failed");
    throw new Error(message2);
  }
  function getKeys(obj) {
    return Object.keys(obj);
  }
  function isFalsyBooleanCallback(booleanOrCallback, ...args) {
    const result = typeof booleanOrCallback === "function" ? booleanOrCallback(...args) : booleanOrCallback;
    if (result == null) return false;
    return !result;
  }
  function disabledFromProps(props) {
    return props.disabled || props["aria-disabled"] === true || props["aria-disabled"] === "true";
  }
  function removeUndefinedValues(obj) {
    const result = {};
    for (const key in obj) {
      if (obj[key] !== void 0) {
        result[key] = obj[key];
      }
    }
    return result;
  }
  function defaultValue(...values) {
    for (const value of values) {
      if (value !== void 0) return value;
    }
    return void 0;
  }

  // node_modules/@ariakit/react-core/esm/__chunks/YXGXYGQX.js
  var import_react = __toESM(require_react(), 1);
  function setRef(ref, value) {
    if (typeof ref === "function") {
      ref(value);
    } else if (ref) {
      ref.current = value;
    }
  }
  function isValidElementWithRef(element) {
    if (!element) return false;
    if (!(0, import_react.isValidElement)(element)) return false;
    if ("ref" in element.props) return true;
    if ("ref" in element) return true;
    return false;
  }
  function getRefProperty(element) {
    if (!isValidElementWithRef(element)) return null;
    const props = { ...element.props };
    return props.ref || element.ref;
  }
  function mergeProps(base, overrides) {
    const props = { ...base };
    for (const key in overrides) {
      if (!hasOwnProperty(overrides, key)) continue;
      if (key === "className") {
        const prop = "className";
        props[prop] = base[prop] ? `${base[prop]} ${overrides[prop]}` : overrides[prop];
        continue;
      }
      if (key === "style") {
        const prop = "style";
        props[prop] = base[prop] ? { ...base[prop], ...overrides[prop] } : overrides[prop];
        continue;
      }
      const overrideValue = overrides[key];
      if (typeof overrideValue === "function" && key.startsWith("on")) {
        const baseValue = base[key];
        if (typeof baseValue === "function") {
          props[key] = (...args) => {
            overrideValue(...args);
            baseValue(...args);
          };
          continue;
        }
      }
      props[key] = overrideValue;
    }
    return props;
  }

  // node_modules/@ariakit/core/esm/__chunks/3DNM6L6E.js
  var canUseDOM = checkIsBrowser();
  function checkIsBrowser() {
    var _a;
    return typeof window !== "undefined" && !!((_a = window.document) == null ? void 0 : _a.createElement);
  }
  function getDocument(node2) {
    if (!node2) return document;
    if ("self" in node2) return node2.document;
    return node2.ownerDocument || document;
  }
  function getWindow(node2) {
    if (!node2) return self;
    if ("self" in node2) return node2.self;
    return getDocument(node2).defaultView || window;
  }
  function getActiveElement(node2, activeDescendant = false) {
    var _a;
    const { activeElement } = getDocument(node2);
    if (!(activeElement == null ? void 0 : activeElement.nodeName)) {
      return null;
    }
    if (isFrame(activeElement) && ((_a = activeElement.contentDocument) == null ? void 0 : _a.body)) {
      return getActiveElement(
        activeElement.contentDocument.body,
        activeDescendant
      );
    }
    if (activeDescendant) {
      const id3 = activeElement.getAttribute("aria-activedescendant");
      if (id3) {
        const element = getDocument(activeElement).getElementById(id3);
        if (element) {
          return element;
        }
      }
    }
    return activeElement;
  }
  function contains(parent, child) {
    return parent === child || parent.contains(child);
  }
  function isFrame(element) {
    return element.tagName === "IFRAME";
  }
  function isButton(element) {
    const tagName = element.tagName.toLowerCase();
    if (tagName === "button") return true;
    if (tagName === "input" && element.type) {
      return buttonInputTypes.indexOf(element.type) !== -1;
    }
    return false;
  }
  var buttonInputTypes = [
    "button",
    "color",
    "file",
    "image",
    "reset",
    "submit"
  ];
  function isVisible(element) {
    if (typeof element.checkVisibility === "function") {
      return element.checkVisibility();
    }
    const htmlElement = element;
    return htmlElement.offsetWidth > 0 || htmlElement.offsetHeight > 0 || element.getClientRects().length > 0;
  }
  function isTextField(element) {
    try {
      const isTextInput = element instanceof HTMLInputElement && element.selectionStart !== null;
      const isTextArea = element.tagName === "TEXTAREA";
      return isTextInput || isTextArea || false;
    } catch (_error) {
      return false;
    }
  }
  function isTextbox(element) {
    return element.isContentEditable || isTextField(element);
  }
  function getTextboxValue(element) {
    if (isTextField(element)) {
      return element.value;
    }
    if (element.isContentEditable) {
      const range = getDocument(element).createRange();
      range.selectNodeContents(element);
      return range.toString();
    }
    return "";
  }
  function getTextboxSelection(element) {
    let start = 0;
    let end = 0;
    if (isTextField(element)) {
      start = element.selectionStart || 0;
      end = element.selectionEnd || 0;
    } else if (element.isContentEditable) {
      const selection = getDocument(element).getSelection();
      if ((selection == null ? void 0 : selection.rangeCount) && selection.anchorNode && contains(element, selection.anchorNode) && selection.focusNode && contains(element, selection.focusNode)) {
        const range = selection.getRangeAt(0);
        const nextRange = range.cloneRange();
        nextRange.selectNodeContents(element);
        nextRange.setEnd(range.startContainer, range.startOffset);
        start = nextRange.toString().length;
        nextRange.setEnd(range.endContainer, range.endOffset);
        end = nextRange.toString().length;
      }
    }
    return { start, end };
  }
  function getPopupRole(element, fallback) {
    const allowedPopupRoles = ["dialog", "menu", "listbox", "tree", "grid"];
    const role = element == null ? void 0 : element.getAttribute("role");
    if (role && allowedPopupRoles.indexOf(role) !== -1) {
      return role;
    }
    return fallback;
  }
  function getPopupItemRole(element, fallback) {
    var _a;
    const itemRoleByPopupRole = {
      menu: "menuitem",
      listbox: "option",
      tree: "treeitem"
    };
    const popupRole = getPopupRole(element);
    if (!popupRole) return fallback;
    const key = popupRole;
    return (_a = itemRoleByPopupRole[key]) != null ? _a : fallback;
  }
  function getScrollingElement(element) {
    if (!element) return null;
    const isScrollableOverflow = (overflow) => {
      if (overflow === "auto") return true;
      if (overflow === "scroll") return true;
      return false;
    };
    if (element.clientHeight && element.scrollHeight > element.clientHeight) {
      const { overflowY } = getComputedStyle(element);
      if (isScrollableOverflow(overflowY)) return element;
    } else if (element.clientWidth && element.scrollWidth > element.clientWidth) {
      const { overflowX } = getComputedStyle(element);
      if (isScrollableOverflow(overflowX)) return element;
    }
    return getScrollingElement(element.parentElement) || document.scrollingElement || document.body;
  }
  function sortBasedOnDOMPosition(items, getElement) {
    const pairs = items.map((item2, index2) => [index2, item2]);
    let isOrderDifferent = false;
    pairs.sort(([indexA, a3], [indexB, b3]) => {
      const elementA = getElement(a3);
      const elementB = getElement(b3);
      if (elementA === elementB) return 0;
      if (!elementA || !elementB) return 0;
      if (isElementPreceding(elementA, elementB)) {
        if (indexA > indexB) {
          isOrderDifferent = true;
        }
        return -1;
      }
      if (indexA < indexB) {
        isOrderDifferent = true;
      }
      return 1;
    });
    if (isOrderDifferent) {
      return pairs.map(([_2, item2]) => item2);
    }
    return items;
  }
  function isElementPreceding(a3, b3) {
    return Boolean(
      b3.compareDocumentPosition(a3) & Node.DOCUMENT_POSITION_PRECEDING
    );
  }

  // node_modules/@ariakit/core/esm/__chunks/SNHYQNEZ.js
  function isTouchDevice() {
    return canUseDOM && !!navigator.maxTouchPoints;
  }
  function isApple() {
    if (!canUseDOM) return false;
    return /mac|iphone|ipad|ipod/i.test(navigator.platform);
  }
  function isSafari() {
    return canUseDOM && isApple() && /apple/i.test(navigator.vendor);
  }
  function isFirefox() {
    return canUseDOM && /firefox\//i.test(navigator.userAgent);
  }
  function isMac() {
    return canUseDOM && navigator.platform.startsWith("Mac") && !isTouchDevice();
  }

  // node_modules/@ariakit/core/esm/utils/events.js
  function isPortalEvent(event) {
    return Boolean(
      event.currentTarget && !contains(event.currentTarget, event.target)
    );
  }
  function isSelfTarget(event) {
    return event.target === event.currentTarget;
  }
  function isOpeningInNewTab(event) {
    const element = event.currentTarget;
    if (!element) return false;
    const isAppleDevice = isApple();
    if (isAppleDevice && !event.metaKey) return false;
    if (!isAppleDevice && !event.ctrlKey) return false;
    const tagName = element.tagName.toLowerCase();
    if (tagName === "a") return true;
    if (tagName === "button" && element.type === "submit") return true;
    if (tagName === "input" && element.type === "submit") return true;
    return false;
  }
  function isDownloading(event) {
    const element = event.currentTarget;
    if (!element) return false;
    const tagName = element.tagName.toLowerCase();
    if (!event.altKey) return false;
    if (tagName === "a") return true;
    if (tagName === "button" && element.type === "submit") return true;
    if (tagName === "input" && element.type === "submit") return true;
    return false;
  }
  function fireEvent(element, type, eventInit) {
    const event = new Event(type, eventInit);
    return element.dispatchEvent(event);
  }
  function fireBlurEvent(element, eventInit) {
    const event = new FocusEvent("blur", eventInit);
    const defaultAllowed = element.dispatchEvent(event);
    const bubbleInit = { ...eventInit, bubbles: true };
    element.dispatchEvent(new FocusEvent("focusout", bubbleInit));
    return defaultAllowed;
  }
  function fireKeyboardEvent(element, type, eventInit) {
    const event = new KeyboardEvent(type, eventInit);
    return element.dispatchEvent(event);
  }
  function fireClickEvent(element, eventInit) {
    const event = new MouseEvent("click", eventInit);
    return element.dispatchEvent(event);
  }
  function isFocusEventOutside(event, container) {
    const containerElement = container || event.currentTarget;
    const relatedTarget = event.relatedTarget;
    return !relatedTarget || !contains(containerElement, relatedTarget);
  }
  function queueBeforeEvent(element, type, callback, timeout) {
    const createTimer = (callback2) => {
      if (timeout) {
        const timerId2 = setTimeout(callback2, timeout);
        return () => clearTimeout(timerId2);
      }
      const timerId = requestAnimationFrame(callback2);
      return () => cancelAnimationFrame(timerId);
    };
    const cancelTimer = createTimer(() => {
      element.removeEventListener(type, callSync, true);
      callback();
    });
    const callSync = () => {
      cancelTimer();
      callback();
    };
    element.addEventListener(type, callSync, { once: true, capture: true });
    return cancelTimer;
  }
  function addGlobalEventListener(type, listener, options2, scope = window) {
    const children = [];
    try {
      scope.document.addEventListener(type, listener, options2);
      for (const frame2 of Array.from(scope.frames)) {
        children.push(addGlobalEventListener(type, listener, options2, frame2));
      }
    } catch (e3) {
    }
    const removeEventListener = () => {
      try {
        scope.document.removeEventListener(type, listener, options2);
      } catch (e3) {
      }
      for (const remove of children) {
        remove();
      }
    };
    return removeEventListener;
  }

  // node_modules/@ariakit/react-core/esm/__chunks/KPHZR4MB.js
  var React = __toESM(require_react(), 1);
  var import_react2 = __toESM(require_react(), 1);
  var _React = { ...React };
  var useReactId = _React.useId;
  var useReactDeferredValue = _React.useDeferredValue;
  var useReactInsertionEffect = _React.useInsertionEffect;
  var useSafeLayoutEffect = canUseDOM ? import_react2.useLayoutEffect : import_react2.useEffect;
  function useInitialValue(value) {
    const [initialValue2] = (0, import_react2.useState)(value);
    return initialValue2;
  }
  function useLiveRef(value) {
    const ref = (0, import_react2.useRef)(value);
    useSafeLayoutEffect(() => {
      ref.current = value;
    });
    return ref;
  }
  function useEvent(callback) {
    const ref = (0, import_react2.useRef)(() => {
      throw new Error("Cannot call an event handler while rendering.");
    });
    if (useReactInsertionEffect) {
      useReactInsertionEffect(() => {
        ref.current = callback;
      });
    } else {
      ref.current = callback;
    }
    return (0, import_react2.useCallback)((...args) => {
      var _a;
      return (_a = ref.current) == null ? void 0 : _a.call(ref, ...args);
    }, []);
  }
  function useTransactionState(callback) {
    const [state, setState] = (0, import_react2.useState)(null);
    useSafeLayoutEffect(() => {
      if (state == null) return;
      if (!callback) return;
      let prevState = null;
      callback((prev2) => {
        prevState = prev2;
        return state;
      });
      return () => {
        callback(prevState);
      };
    }, [state, callback]);
    return [state, setState];
  }
  function useMergeRefs(...refs) {
    return (0, import_react2.useMemo)(() => {
      if (!refs.some(Boolean)) return;
      return (value) => {
        for (const ref of refs) {
          setRef(ref, value);
        }
      };
    }, refs);
  }
  function useId(defaultId) {
    if (useReactId) {
      const reactId = useReactId();
      if (defaultId) return defaultId;
      return reactId;
    }
    const [id3, setId] = (0, import_react2.useState)(defaultId);
    useSafeLayoutEffect(() => {
      if (defaultId || id3) return;
      const random = Math.random().toString(36).slice(2, 8);
      setId(`id-${random}`);
    }, [defaultId, id3]);
    return defaultId || id3;
  }
  function useTagName(refOrElement, type) {
    const stringOrUndefined = (type2) => {
      if (typeof type2 !== "string") return;
      return type2;
    };
    const [tagName, setTagName] = (0, import_react2.useState)(() => stringOrUndefined(type));
    useSafeLayoutEffect(() => {
      const element = refOrElement && "current" in refOrElement ? refOrElement.current : refOrElement;
      setTagName((element == null ? void 0 : element.tagName.toLowerCase()) || stringOrUndefined(type));
    }, [refOrElement, type]);
    return tagName;
  }
  function useAttribute(refOrElement, attributeName, defaultValue2) {
    const initialValue2 = useInitialValue(defaultValue2);
    const [attribute, setAttribute2] = (0, import_react2.useState)(initialValue2);
    (0, import_react2.useEffect)(() => {
      const element = refOrElement && "current" in refOrElement ? refOrElement.current : refOrElement;
      if (!element) return;
      const callback = () => {
        const value = element.getAttribute(attributeName);
        setAttribute2(value == null ? initialValue2 : value);
      };
      const observer = new MutationObserver(callback);
      observer.observe(element, { attributeFilter: [attributeName] });
      callback();
      return () => observer.disconnect();
    }, [refOrElement, attributeName, initialValue2]);
    return attribute;
  }
  function useUpdateEffect(effect, deps) {
    const mounted = (0, import_react2.useRef)(false);
    (0, import_react2.useEffect)(() => {
      if (mounted.current) {
        return effect();
      }
      mounted.current = true;
    }, deps);
    (0, import_react2.useEffect)(
      () => () => {
        mounted.current = false;
      },
      []
    );
  }
  function useForceUpdate() {
    return (0, import_react2.useReducer)(() => [], []);
  }
  function useBooleanEvent(booleanOrCallback) {
    return useEvent(
      typeof booleanOrCallback === "function" ? booleanOrCallback : () => booleanOrCallback
    );
  }
  function useWrapElement(props, callback, deps = []) {
    const wrapElement = (0, import_react2.useCallback)(
      (element) => {
        if (props.wrapElement) {
          element = props.wrapElement(element);
        }
        return callback(element);
      },
      [...deps, props.wrapElement]
    );
    return { ...props, wrapElement };
  }
  function usePortalRef(portalProp = false, portalRefProp) {
    const [portalNode, setPortalNode] = (0, import_react2.useState)(null);
    const portalRef = useMergeRefs(setPortalNode, portalRefProp);
    const domReady = !portalProp || portalNode;
    return { portalRef, portalNode, domReady };
  }
  function useMetadataProps(props, key, value) {
    const parent = props.onLoadedMetadataCapture;
    const onLoadedMetadataCapture = (0, import_react2.useMemo)(() => {
      return Object.assign(() => {
      }, { ...parent, [key]: value });
    }, [parent, key, value]);
    return [parent == null ? void 0 : parent[key], { onLoadedMetadataCapture }];
  }
  var hasInstalledGlobalEventListeners = false;
  function useIsMouseMoving() {
    (0, import_react2.useEffect)(() => {
      if (hasInstalledGlobalEventListeners) return;
      addGlobalEventListener("mousemove", setMouseMoving, true);
      addGlobalEventListener("mousedown", resetMouseMoving, true);
      addGlobalEventListener("mouseup", resetMouseMoving, true);
      addGlobalEventListener("keydown", resetMouseMoving, true);
      addGlobalEventListener("scroll", resetMouseMoving, true);
      hasInstalledGlobalEventListeners = true;
    }, []);
    const isMouseMoving = useEvent(() => mouseMoving);
    return isMouseMoving;
  }
  var mouseMoving = false;
  var previousScreenX = 0;
  var previousScreenY = 0;
  function hasMouseMovement(event) {
    const movementX = event.movementX || event.screenX - previousScreenX;
    const movementY = event.movementY || event.screenY - previousScreenY;
    previousScreenX = event.screenX;
    previousScreenY = event.screenY;
    return movementX || movementY || false;
  }
  function setMouseMoving(event) {
    if (!hasMouseMovement(event)) return;
    mouseMoving = true;
  }
  function resetMouseMoving() {
    mouseMoving = false;
  }

  // node_modules/@ariakit/react-core/esm/__chunks/GWSL6KNJ.js
  var React2 = __toESM(require_react(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  function forwardRef2(render) {
    const Role3 = React2.forwardRef(
      // @ts-ignore Incompatible with React 19 types. Ignore for now.
      (props, ref) => render({ ...props, ref })
    );
    Role3.displayName = render.displayName || render.name;
    return Role3;
  }
  function memo2(Component9, propsAreEqual) {
    return React2.memo(Component9, propsAreEqual);
  }
  function createElement(Type, props) {
    const { wrapElement, render, ...rest } = props;
    const mergedRef = useMergeRefs(props.ref, getRefProperty(render));
    let element;
    if (React2.isValidElement(render)) {
      const renderProps = {
        // @ts-ignore Incompatible with React 19 types. Ignore for now.
        ...render.props,
        ref: mergedRef
      };
      element = React2.cloneElement(render, mergeProps(rest, renderProps));
    } else if (render) {
      element = render(rest);
    } else {
      element = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Type, { ...rest });
    }
    if (wrapElement) {
      return wrapElement(element);
    }
    return element;
  }
  function createHook(useProps) {
    const useRole3 = (props = {}) => {
      return useProps(props);
    };
    useRole3.displayName = useProps.name;
    return useRole3;
  }
  function createStoreContext(providers = [], scopedProviders = []) {
    const context = React2.createContext(void 0);
    const scopedContext = React2.createContext(void 0);
    const useContext210 = () => React2.useContext(context);
    const useScopedContext = (onlyScoped = false) => {
      const scoped = React2.useContext(scopedContext);
      const store = useContext210();
      if (onlyScoped) return scoped;
      return scoped || store;
    };
    const useProviderContext = () => {
      const scoped = React2.useContext(scopedContext);
      const store = useContext210();
      if (scoped && scoped === store) return;
      return store;
    };
    const ContextProvider = (props) => {
      return providers.reduceRight(
        (children, Provider4) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Provider4, { ...props, children }),
        /* @__PURE__ */ (0, import_jsx_runtime.jsx)(context.Provider, { ...props })
      );
    };
    const ScopedContextProvider = (props) => {
      return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ContextProvider, { ...props, children: scopedProviders.reduceRight(
        (children, Provider4) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Provider4, { ...props, children }),
        /* @__PURE__ */ (0, import_jsx_runtime.jsx)(scopedContext.Provider, { ...props })
      ) });
    };
    return {
      context,
      scopedContext,
      useContext: useContext210,
      useScopedContext,
      useProviderContext,
      ContextProvider,
      ScopedContextProvider
    };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/SMPCIMZM.js
  var ctx = createStoreContext();
  var useCollectionContext = ctx.useContext;
  var useCollectionScopedContext = ctx.useScopedContext;
  var useCollectionProviderContext = ctx.useProviderContext;
  var CollectionContextProvider = ctx.ContextProvider;
  var CollectionScopedContextProvider = ctx.ScopedContextProvider;

  // node_modules/@ariakit/react-core/esm/__chunks/AVVXDJMZ.js
  var import_react3 = __toESM(require_react(), 1);
  var ctx2 = createStoreContext(
    [CollectionContextProvider],
    [CollectionScopedContextProvider]
  );
  var useCompositeContext = ctx2.useContext;
  var useCompositeScopedContext = ctx2.useScopedContext;
  var useCompositeProviderContext = ctx2.useProviderContext;
  var CompositeContextProvider = ctx2.ContextProvider;
  var CompositeScopedContextProvider = ctx2.ScopedContextProvider;
  var CompositeItemContext = (0, import_react3.createContext)(
    void 0
  );
  var CompositeRowContext = (0, import_react3.createContext)(
    void 0
  );

  // node_modules/@ariakit/react-core/esm/__chunks/NF43FNG5.js
  var ctx3 = createStoreContext(
    [CompositeContextProvider],
    [CompositeScopedContextProvider]
  );
  var useTabContext = ctx3.useContext;
  var useTabScopedContext = ctx3.useScopedContext;
  var useTabProviderContext = ctx3.useProviderContext;
  var TabContextProvider = ctx3.ContextProvider;
  var TabScopedContextProvider = ctx3.ScopedContextProvider;

  // node_modules/@ariakit/react-core/esm/__chunks/5VQZOHHZ.js
  var NULL_ITEM = { id: null };
  function flipItems(items, activeId, shouldInsertNullItem = false) {
    const index2 = items.findIndex((item2) => item2.id === activeId);
    return [
      ...items.slice(index2 + 1),
      ...shouldInsertNullItem ? [NULL_ITEM] : [],
      ...items.slice(0, index2)
    ];
  }
  function findFirstEnabledItem(items, excludeId) {
    return items.find((item2) => {
      if (excludeId) {
        return !item2.disabled && item2.id !== excludeId;
      }
      return !item2.disabled;
    });
  }
  function getEnabledItem(store, id3) {
    if (!id3) return null;
    return store.item(id3) || null;
  }
  function groupItemsByRows(items) {
    const rows = [];
    for (const item2 of items) {
      const row = rows.find((currentRow) => {
        var _a;
        return ((_a = currentRow[0]) == null ? void 0 : _a.rowId) === item2.rowId;
      });
      if (row) {
        row.push(item2);
      } else {
        rows.push([item2]);
      }
    }
    return rows;
  }
  function selectTextField(element, collapseToEnd = false) {
    if (isTextField(element)) {
      element.setSelectionRange(
        collapseToEnd ? element.value.length : 0,
        element.value.length
      );
    } else if (element.isContentEditable) {
      const selection = getDocument(element).getSelection();
      selection == null ? void 0 : selection.selectAllChildren(element);
      if (collapseToEnd) {
        selection == null ? void 0 : selection.collapseToEnd();
      }
    }
  }
  var FOCUS_SILENTLY = /* @__PURE__ */ Symbol("FOCUS_SILENTLY");
  function focusSilently(element) {
    element[FOCUS_SILENTLY] = true;
    element.focus({ preventScroll: true });
  }
  function silentlyFocused(element) {
    const isSilentlyFocused = element[FOCUS_SILENTLY];
    delete element[FOCUS_SILENTLY];
    return isSilentlyFocused;
  }
  function isItem(store, element, exclude) {
    if (!element) return false;
    if (element === exclude) return false;
    const item2 = store.item(element.id);
    if (!item2) return false;
    if (exclude && item2.element === exclude) return false;
    return true;
  }

  // node_modules/@ariakit/react-core/esm/__chunks/Z2O3VLAQ.js
  var import_react4 = __toESM(require_react(), 1);
  var TagName = "div";
  var useCollectionItem = createHook(
    function useCollectionItem2({
      store,
      shouldRegisterItem = true,
      getItem = identity,
      // @ts-expect-error This prop may come from a collection renderer.
      element,
      ...props
    }) {
      const context = useCollectionContext();
      store = store || context;
      const id3 = useId(props.id);
      const ref = (0, import_react4.useRef)(element);
      (0, import_react4.useEffect)(() => {
        const element2 = ref.current;
        if (!id3) return;
        if (!element2) return;
        if (!shouldRegisterItem) return;
        const item2 = getItem({ id: id3, element: element2 });
        return store == null ? void 0 : store.renderItem(item2);
      }, [id3, shouldRegisterItem, getItem, store]);
      props = {
        ...props,
        ref: useMergeRefs(ref, props.ref)
      };
      return removeUndefinedValues(props);
    }
  );
  var CollectionItem = forwardRef2(function CollectionItem2(props) {
    const htmlProps = useCollectionItem(props);
    return createElement(TagName, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/SWN3JYXT.js
  var import_react5 = __toESM(require_react(), 1);
  var FocusableContext = (0, import_react5.createContext)(true);

  // node_modules/@ariakit/core/esm/utils/focus.js
  var selector = "input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";
  function hasNegativeTabIndex(element) {
    const tabIndex = Number.parseInt(element.getAttribute("tabindex") || "0", 10);
    return tabIndex < 0;
  }
  function isFocusable(element) {
    if (!element.matches(selector)) return false;
    if (!isVisible(element)) return false;
    if (element.closest("[inert]")) return false;
    return true;
  }
  function isTabbable(element) {
    if (!isFocusable(element)) return false;
    if (hasNegativeTabIndex(element)) return false;
    if (!("form" in element)) return true;
    if (!element.form) return true;
    if (element.checked) return true;
    if (element.type !== "radio") return true;
    const radioGroup = element.form.elements.namedItem(element.name);
    if (!radioGroup) return true;
    if (!("length" in radioGroup)) return true;
    const activeElement = getActiveElement(element);
    if (!activeElement) return true;
    if (activeElement === element) return true;
    if (!("form" in activeElement)) return true;
    if (activeElement.form !== element.form) return true;
    if (activeElement.name !== element.name) return true;
    return false;
  }
  function getAllFocusableIn(container, includeContainer) {
    const elements2 = Array.from(
      container.querySelectorAll(selector)
    );
    if (includeContainer) {
      elements2.unshift(container);
    }
    const focusableElements2 = elements2.filter(isFocusable);
    focusableElements2.forEach((element, i3) => {
      var _a;
      if (!isFrame(element)) return;
      const frameBody = (_a = element.contentDocument) == null ? void 0 : _a.body;
      if (!frameBody) return;
      focusableElements2.splice(i3, 1, ...getAllFocusableIn(frameBody));
    });
    return focusableElements2;
  }
  function getAllTabbableIn(container, includeContainer, fallbackToFocusable) {
    const elements2 = Array.from(
      container.querySelectorAll(selector)
    );
    const tabbableElements = elements2.filter(isTabbable);
    if (includeContainer && isTabbable(container)) {
      tabbableElements.unshift(container);
    }
    tabbableElements.forEach((element, i3) => {
      var _a;
      if (!isFrame(element)) return;
      const frameBody = (_a = element.contentDocument) == null ? void 0 : _a.body;
      if (!frameBody) return;
      const allFrameTabbable = getAllTabbableIn(
        frameBody,
        false,
        fallbackToFocusable
      );
      tabbableElements.splice(i3, 1, ...allFrameTabbable);
    });
    if (!tabbableElements.length && fallbackToFocusable) {
      return elements2;
    }
    return tabbableElements;
  }
  function getFirstTabbableIn(container, includeContainer, fallbackToFocusable) {
    const [first] = getAllTabbableIn(
      container,
      includeContainer,
      fallbackToFocusable
    );
    return first || null;
  }
  function getNextTabbableIn(container, includeContainer, fallbackToFirst, fallbackToFocusable) {
    const activeElement = getActiveElement(container);
    const allFocusable = getAllFocusableIn(container, includeContainer);
    const activeIndex = allFocusable.indexOf(activeElement);
    const nextFocusableElements = allFocusable.slice(activeIndex + 1);
    return nextFocusableElements.find(isTabbable) || (fallbackToFirst ? allFocusable.find(isTabbable) : null) || (fallbackToFocusable ? nextFocusableElements[0] : null) || null;
  }
  function getNextTabbable(fallbackToFirst, fallbackToFocusable) {
    return getNextTabbableIn(
      document.body,
      false,
      fallbackToFirst,
      fallbackToFocusable
    );
  }
  function getPreviousTabbableIn(container, includeContainer, fallbackToLast, fallbackToFocusable) {
    const activeElement = getActiveElement(container);
    const allFocusable = getAllFocusableIn(container, includeContainer).reverse();
    const activeIndex = allFocusable.indexOf(activeElement);
    const previousFocusableElements = allFocusable.slice(activeIndex + 1);
    return previousFocusableElements.find(isTabbable) || (fallbackToLast ? allFocusable.find(isTabbable) : null) || (fallbackToFocusable ? previousFocusableElements[0] : null) || null;
  }
  function getPreviousTabbable(fallbackToFirst, fallbackToFocusable) {
    return getPreviousTabbableIn(
      document.body,
      false,
      fallbackToFirst,
      fallbackToFocusable
    );
  }
  function getClosestFocusable(element) {
    while (element && !isFocusable(element)) {
      element = element.closest(selector);
    }
    return element || null;
  }
  function hasFocus(element) {
    const activeElement = getActiveElement(element);
    if (!activeElement) return false;
    if (activeElement === element) return true;
    const activeDescendant = activeElement.getAttribute("aria-activedescendant");
    if (!activeDescendant) return false;
    return activeDescendant === element.id;
  }
  function hasFocusWithin(element) {
    const activeElement = getActiveElement(element);
    if (!activeElement) return false;
    if (contains(element, activeElement)) return true;
    const activeDescendant = activeElement.getAttribute("aria-activedescendant");
    if (!activeDescendant) return false;
    if (!("id" in element)) return false;
    if (activeDescendant === element.id) return true;
    return !!element.querySelector(`#${CSS.escape(activeDescendant)}`);
  }
  function focusIfNeeded(element) {
    if (!hasFocusWithin(element) && isFocusable(element)) {
      element.focus();
    }
  }
  function disableFocus(element) {
    var _a;
    const currentTabindex = (_a = element.getAttribute("tabindex")) != null ? _a : "";
    element.setAttribute("data-tabindex", currentTabindex);
    element.setAttribute("tabindex", "-1");
  }
  function disableFocusIn(container, includeContainer) {
    const tabbableElements = getAllTabbableIn(container, includeContainer);
    for (const element of tabbableElements) {
      disableFocus(element);
    }
  }
  function restoreFocusIn(container) {
    const elements2 = container.querySelectorAll("[data-tabindex]");
    const restoreTabIndex = (element) => {
      const tabindex = element.getAttribute("data-tabindex");
      element.removeAttribute("data-tabindex");
      if (tabindex) {
        element.setAttribute("tabindex", tabindex);
      } else {
        element.removeAttribute("tabindex");
      }
    };
    if (container.hasAttribute("data-tabindex")) {
      restoreTabIndex(container);
    }
    for (const element of elements2) {
      restoreTabIndex(element);
    }
  }
  function focusIntoView(element, options2) {
    if (!("scrollIntoView" in element)) {
      element.focus();
    } else {
      element.focus({ preventScroll: true });
      element.scrollIntoView({ block: "nearest", inline: "nearest", ...options2 });
    }
  }

  // node_modules/@ariakit/react-core/esm/__chunks/U6HHPQDW.js
  var import_react6 = __toESM(require_react(), 1);
  var TagName2 = "div";
  var isSafariBrowser = isSafari();
  var alwaysFocusVisibleInputTypes = [
    "text",
    "search",
    "url",
    "tel",
    "email",
    "password",
    "number",
    "date",
    "month",
    "week",
    "time",
    "datetime",
    "datetime-local"
  ];
  var safariFocusAncestorSymbol = /* @__PURE__ */ Symbol("safariFocusAncestor");
  function isSafariFocusAncestor(element) {
    if (!element) return false;
    return !!element[safariFocusAncestorSymbol];
  }
  function markSafariFocusAncestor(element, value) {
    if (!element) return;
    element[safariFocusAncestorSymbol] = value;
  }
  function isAlwaysFocusVisible(element) {
    const { tagName, readOnly, type } = element;
    if (tagName === "TEXTAREA" && !readOnly) return true;
    if (tagName === "SELECT" && !readOnly) return true;
    if (tagName === "INPUT" && !readOnly) {
      return alwaysFocusVisibleInputTypes.includes(type);
    }
    if (element.isContentEditable) return true;
    const role = element.getAttribute("role");
    if (role === "combobox" && element.dataset.name) {
      return true;
    }
    return false;
  }
  function getLabels(element) {
    if ("labels" in element) {
      return element.labels;
    }
    return null;
  }
  function isNativeCheckboxOrRadio(element) {
    const tagName = element.tagName.toLowerCase();
    if (tagName === "input" && element.type) {
      return element.type === "radio" || element.type === "checkbox";
    }
    return false;
  }
  function isNativeTabbable(tagName) {
    if (!tagName) return true;
    return tagName === "button" || tagName === "summary" || tagName === "input" || tagName === "select" || tagName === "textarea" || tagName === "a";
  }
  function supportsDisabledAttribute(tagName) {
    if (!tagName) return true;
    return tagName === "button" || tagName === "input" || tagName === "select" || tagName === "textarea";
  }
  function getTabIndex(focusable, trulyDisabled, nativeTabbable, supportsDisabled, tabIndexProp) {
    if (!focusable) {
      return tabIndexProp;
    }
    if (trulyDisabled) {
      if (nativeTabbable && !supportsDisabled) {
        return -1;
      }
      return;
    }
    if (nativeTabbable) {
      return tabIndexProp;
    }
    return tabIndexProp || 0;
  }
  function useDisableEvent(onEvent, disabled) {
    return useEvent((event) => {
      onEvent == null ? void 0 : onEvent(event);
      if (event.defaultPrevented) return;
      if (disabled) {
        event.stopPropagation();
        event.preventDefault();
      }
    });
  }
  var hasInstalledGlobalEventListeners2 = false;
  var isKeyboardModality = true;
  function onGlobalMouseDown(event) {
    const target = event.target;
    if (target && "hasAttribute" in target) {
      if (!target.hasAttribute("data-focus-visible")) {
        isKeyboardModality = false;
      }
    }
  }
  function onGlobalKeyDown(event) {
    if (event.metaKey) return;
    if (event.ctrlKey) return;
    if (event.altKey) return;
    isKeyboardModality = true;
  }
  var useFocusable = createHook(
    function useFocusable2({
      focusable = true,
      accessibleWhenDisabled,
      autoFocus,
      onFocusVisible,
      ...props
    }) {
      const ref = (0, import_react6.useRef)(null);
      (0, import_react6.useEffect)(() => {
        if (!focusable) return;
        if (hasInstalledGlobalEventListeners2) return;
        addGlobalEventListener("mousedown", onGlobalMouseDown, true);
        addGlobalEventListener("keydown", onGlobalKeyDown, true);
        hasInstalledGlobalEventListeners2 = true;
      }, [focusable]);
      if (isSafariBrowser) {
        (0, import_react6.useEffect)(() => {
          if (!focusable) return;
          const element = ref.current;
          if (!element) return;
          if (!isNativeCheckboxOrRadio(element)) return;
          const labels = getLabels(element);
          if (!labels) return;
          const onMouseUp = () => queueMicrotask(() => element.focus());
          for (const label of labels) {
            label.addEventListener("mouseup", onMouseUp);
          }
          return () => {
            for (const label of labels) {
              label.removeEventListener("mouseup", onMouseUp);
            }
          };
        }, [focusable]);
      }
      const disabled = focusable && disabledFromProps(props);
      const trulyDisabled = !!disabled && !accessibleWhenDisabled;
      const [focusVisible, setFocusVisible] = (0, import_react6.useState)(false);
      (0, import_react6.useEffect)(() => {
        if (!focusable) return;
        if (trulyDisabled && focusVisible) {
          setFocusVisible(false);
        }
      }, [focusable, trulyDisabled, focusVisible]);
      (0, import_react6.useEffect)(() => {
        if (!focusable) return;
        if (!focusVisible) return;
        const element = ref.current;
        if (!element) return;
        if (typeof IntersectionObserver === "undefined") return;
        const observer = new IntersectionObserver(() => {
          if (!isFocusable(element)) {
            setFocusVisible(false);
          }
        });
        observer.observe(element);
        return () => observer.disconnect();
      }, [focusable, focusVisible]);
      const onKeyPressCapture = useDisableEvent(
        props.onKeyPressCapture,
        disabled
      );
      const onMouseDownCapture = useDisableEvent(
        props.onMouseDownCapture,
        disabled
      );
      const onClickCapture = useDisableEvent(props.onClickCapture, disabled);
      const onMouseDownProp = props.onMouseDown;
      const onMouseDown = useEvent((event) => {
        onMouseDownProp == null ? void 0 : onMouseDownProp(event);
        if (event.defaultPrevented) return;
        if (!focusable) return;
        const element = event.currentTarget;
        if (!isSafariBrowser) return;
        if (isPortalEvent(event)) return;
        if (!isButton(element) && !isNativeCheckboxOrRadio(element)) return;
        let receivedFocus = false;
        const onFocus = () => {
          receivedFocus = true;
        };
        const options2 = { capture: true, once: true };
        element.addEventListener("focusin", onFocus, options2);
        const focusableContainer = getClosestFocusable(element.parentElement);
        markSafariFocusAncestor(focusableContainer, true);
        queueBeforeEvent(element, "mouseup", () => {
          element.removeEventListener("focusin", onFocus, true);
          markSafariFocusAncestor(focusableContainer, false);
          if (receivedFocus) return;
          focusIfNeeded(element);
        });
      });
      const handleFocusVisible = (event, currentTarget) => {
        if (currentTarget) {
          event.currentTarget = currentTarget;
        }
        if (!focusable) return;
        const element = event.currentTarget;
        if (!element) return;
        if (!hasFocus(element)) return;
        onFocusVisible == null ? void 0 : onFocusVisible(event);
        if (event.defaultPrevented) return;
        element.dataset.focusVisible = "true";
        setFocusVisible(true);
      };
      const onKeyDownCaptureProp = props.onKeyDownCapture;
      const onKeyDownCapture = useEvent((event) => {
        onKeyDownCaptureProp == null ? void 0 : onKeyDownCaptureProp(event);
        if (event.defaultPrevented) return;
        if (!focusable) return;
        if (focusVisible) return;
        if (event.metaKey) return;
        if (event.altKey) return;
        if (event.ctrlKey) return;
        if (!isSelfTarget(event)) return;
        const element = event.currentTarget;
        const applyFocusVisible = () => handleFocusVisible(event, element);
        queueBeforeEvent(element, "focusout", applyFocusVisible);
      });
      const onFocusCaptureProp = props.onFocusCapture;
      const onFocusCapture = useEvent((event) => {
        onFocusCaptureProp == null ? void 0 : onFocusCaptureProp(event);
        if (event.defaultPrevented) return;
        if (!focusable) return;
        if (!isSelfTarget(event)) {
          setFocusVisible(false);
          return;
        }
        const element = event.currentTarget;
        const applyFocusVisible = () => handleFocusVisible(event, element);
        if (isKeyboardModality || isAlwaysFocusVisible(event.target)) {
          queueBeforeEvent(event.target, "focusout", applyFocusVisible);
        } else {
          setFocusVisible(false);
        }
      });
      const onBlurProp = props.onBlur;
      const onBlur = useEvent((event) => {
        onBlurProp == null ? void 0 : onBlurProp(event);
        if (!focusable) return;
        if (!isFocusEventOutside(event)) return;
        event.currentTarget.removeAttribute("data-focus-visible");
        setFocusVisible(false);
      });
      const autoFocusOnShow = (0, import_react6.useContext)(FocusableContext);
      const autoFocusRef = useEvent((element) => {
        if (!focusable) return;
        if (!autoFocus) return;
        if (!element) return;
        if (!autoFocusOnShow) return;
        queueMicrotask(() => {
          if (hasFocus(element)) return;
          if (!isFocusable(element)) return;
          element.focus();
        });
      });
      const tagName = useTagName(ref);
      const nativeTabbable = focusable && isNativeTabbable(tagName);
      const supportsDisabled = focusable && supportsDisabledAttribute(tagName);
      const styleProp = props.style;
      const style2 = (0, import_react6.useMemo)(() => {
        if (trulyDisabled) {
          return { pointerEvents: "none", ...styleProp };
        }
        return styleProp;
      }, [trulyDisabled, styleProp]);
      props = {
        "data-focus-visible": focusable && focusVisible || void 0,
        "data-autofocus": autoFocus || void 0,
        "aria-disabled": disabled || void 0,
        ...props,
        ref: useMergeRefs(ref, autoFocusRef, props.ref),
        style: style2,
        tabIndex: getTabIndex(
          focusable,
          trulyDisabled,
          nativeTabbable,
          supportsDisabled,
          props.tabIndex
        ),
        disabled: supportsDisabled && trulyDisabled ? true : void 0,
        // TODO: Test Focusable contentEditable.
        contentEditable: disabled ? void 0 : props.contentEditable,
        onKeyPressCapture,
        onClickCapture,
        onMouseDownCapture,
        onMouseDown,
        onKeyDownCapture,
        onFocusCapture,
        onBlur
      };
      return removeUndefinedValues(props);
    }
  );
  var Focusable = forwardRef2(function Focusable2(props) {
    const htmlProps = useFocusable(props);
    return createElement(TagName2, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/PZ3OL7I2.js
  var import_react7 = __toESM(require_react(), 1);
  var TagName3 = "button";
  function isNativeClick(event) {
    if (!event.isTrusted) return false;
    const element = event.currentTarget;
    if (event.key === "Enter") {
      return isButton(element) || element.tagName === "SUMMARY" || element.tagName === "A";
    }
    if (event.key === " ") {
      return isButton(element) || element.tagName === "SUMMARY" || element.tagName === "INPUT" || element.tagName === "SELECT";
    }
    return false;
  }
  var symbol = /* @__PURE__ */ Symbol("command");
  var useCommand = createHook(
    function useCommand2({ clickOnEnter = true, clickOnSpace = true, ...props }) {
      const ref = (0, import_react7.useRef)(null);
      const [isNativeButton, setIsNativeButton] = (0, import_react7.useState)(false);
      (0, import_react7.useEffect)(() => {
        if (!ref.current) return;
        setIsNativeButton(isButton(ref.current));
      }, []);
      const [active, setActive] = (0, import_react7.useState)(false);
      const activeRef = (0, import_react7.useRef)(false);
      const disabled = disabledFromProps(props);
      const [isDuplicate, metadataProps] = useMetadataProps(props, symbol, true);
      const onKeyDownProp = props.onKeyDown;
      const onKeyDown = useEvent((event) => {
        onKeyDownProp == null ? void 0 : onKeyDownProp(event);
        const element = event.currentTarget;
        if (event.defaultPrevented) return;
        if (isDuplicate) return;
        if (disabled) return;
        if (!isSelfTarget(event)) return;
        if (isTextField(element)) return;
        if (element.isContentEditable) return;
        const isEnter = clickOnEnter && event.key === "Enter";
        const isSpace = clickOnSpace && event.key === " ";
        const shouldPreventEnter = event.key === "Enter" && !clickOnEnter;
        const shouldPreventSpace = event.key === " " && !clickOnSpace;
        if (shouldPreventEnter || shouldPreventSpace) {
          event.preventDefault();
          return;
        }
        if (isEnter || isSpace) {
          const nativeClick = isNativeClick(event);
          if (isEnter) {
            if (!nativeClick) {
              event.preventDefault();
              const { view, ...eventInit } = event;
              const click = () => fireClickEvent(element, eventInit);
              if (isFirefox()) {
                queueBeforeEvent(element, "keyup", click);
              } else {
                queueMicrotask(click);
              }
            }
          } else if (isSpace) {
            activeRef.current = true;
            if (!nativeClick) {
              event.preventDefault();
              setActive(true);
            }
          }
        }
      });
      const onKeyUpProp = props.onKeyUp;
      const onKeyUp = useEvent((event) => {
        onKeyUpProp == null ? void 0 : onKeyUpProp(event);
        if (event.defaultPrevented) return;
        if (isDuplicate) return;
        if (disabled) return;
        if (event.metaKey) return;
        const isSpace = clickOnSpace && event.key === " ";
        if (activeRef.current && isSpace) {
          activeRef.current = false;
          if (!isNativeClick(event)) {
            event.preventDefault();
            setActive(false);
            const element = event.currentTarget;
            const { view, ...eventInit } = event;
            queueMicrotask(() => fireClickEvent(element, eventInit));
          }
        }
      });
      props = {
        "data-active": active || void 0,
        type: isNativeButton ? "button" : void 0,
        ...metadataProps,
        ...props,
        ref: useMergeRefs(ref, props.ref),
        onKeyDown,
        onKeyUp
      };
      props = useFocusable(props);
      return props;
    }
  );
  var Command = forwardRef2(function Command2(props) {
    const htmlProps = useCommand(props);
    return createElement(TagName3, htmlProps);
  });

  // node_modules/@ariakit/core/esm/__chunks/SXKM4CGU.js
  function getInternal(store, key) {
    const internals = store.__unstableInternals;
    invariant(internals, "Invalid store");
    return internals[key];
  }
  function createStore(initialState, ...stores) {
    let state = initialState;
    let prevStateBatch = state;
    let lastUpdate = /* @__PURE__ */ Symbol();
    let destroy = noop;
    const instances = /* @__PURE__ */ new Set();
    const updatedKeys = /* @__PURE__ */ new Set();
    const setups = /* @__PURE__ */ new Set();
    const listeners = /* @__PURE__ */ new Set();
    const batchListeners = /* @__PURE__ */ new Set();
    const disposables = /* @__PURE__ */ new WeakMap();
    const listenerKeys = /* @__PURE__ */ new WeakMap();
    const storeSetup = (callback) => {
      setups.add(callback);
      return () => setups.delete(callback);
    };
    const storeInit = () => {
      const initialized = instances.size;
      const instance = /* @__PURE__ */ Symbol();
      instances.add(instance);
      const maybeDestroy = () => {
        instances.delete(instance);
        if (instances.size) return;
        destroy();
      };
      if (initialized) return maybeDestroy;
      const desyncs = getKeys(state).map(
        (key) => chain(
          ...stores.map((store) => {
            var _a;
            const storeState = (_a = store == null ? void 0 : store.getState) == null ? void 0 : _a.call(store);
            if (!storeState) return;
            if (!hasOwnProperty(storeState, key)) return;
            return sync(store, [key], (state2) => {
              setState(
                key,
                state2[key],
                // @ts-expect-error - Not public API. This is just to prevent
                // infinite loops.
                true
              );
            });
          })
        )
      );
      const teardowns = [];
      for (const setup2 of setups) {
        teardowns.push(setup2());
      }
      const cleanups2 = stores.map(init);
      destroy = chain(...desyncs, ...teardowns, ...cleanups2);
      return maybeDestroy;
    };
    const sub = (keys, listener, set2 = listeners) => {
      set2.add(listener);
      listenerKeys.set(listener, keys);
      return () => {
        var _a;
        (_a = disposables.get(listener)) == null ? void 0 : _a();
        disposables.delete(listener);
        listenerKeys.delete(listener);
        set2.delete(listener);
      };
    };
    const storeSubscribe = (keys, listener) => sub(keys, listener);
    const storeSync = (keys, listener) => {
      disposables.set(listener, listener(state, state));
      return sub(keys, listener);
    };
    const storeBatch = (keys, listener) => {
      disposables.set(listener, listener(state, prevStateBatch));
      return sub(keys, listener, batchListeners);
    };
    const storePick = (keys) => createStore(pick(state, keys), finalStore);
    const storeOmit = (keys) => createStore(omit(state, keys), finalStore);
    const getState = () => state;
    const setState = (key, value, fromStores = false) => {
      var _a;
      if (!hasOwnProperty(state, key)) return;
      const nextValue = applyState(value, state[key]);
      if (nextValue === state[key]) return;
      if (!fromStores) {
        for (const store of stores) {
          (_a = store == null ? void 0 : store.setState) == null ? void 0 : _a.call(store, key, nextValue);
        }
      }
      const prevState = state;
      state = { ...state, [key]: nextValue };
      const thisUpdate = /* @__PURE__ */ Symbol();
      lastUpdate = thisUpdate;
      updatedKeys.add(key);
      const run = (listener, prev2, uKeys) => {
        var _a2;
        const keys = listenerKeys.get(listener);
        const updated = (k3) => uKeys ? uKeys.has(k3) : k3 === key;
        if (!keys || keys.some(updated)) {
          (_a2 = disposables.get(listener)) == null ? void 0 : _a2();
          disposables.set(listener, listener(state, prev2));
        }
      };
      for (const listener of listeners) {
        run(listener, prevState);
      }
      queueMicrotask(() => {
        if (lastUpdate !== thisUpdate) return;
        const snapshot = state;
        for (const listener of batchListeners) {
          run(listener, prevStateBatch, updatedKeys);
        }
        prevStateBatch = snapshot;
        updatedKeys.clear();
      });
    };
    const finalStore = {
      getState,
      setState,
      __unstableInternals: {
        setup: storeSetup,
        init: storeInit,
        subscribe: storeSubscribe,
        sync: storeSync,
        batch: storeBatch,
        pick: storePick,
        omit: storeOmit
      }
    };
    return finalStore;
  }
  function setup(store, ...args) {
    if (!store) return;
    return getInternal(store, "setup")(...args);
  }
  function init(store, ...args) {
    if (!store) return;
    return getInternal(store, "init")(...args);
  }
  function subscribe(store, ...args) {
    if (!store) return;
    return getInternal(store, "subscribe")(...args);
  }
  function sync(store, ...args) {
    if (!store) return;
    return getInternal(store, "sync")(...args);
  }
  function batch(store, ...args) {
    if (!store) return;
    return getInternal(store, "batch")(...args);
  }
  function omit2(store, ...args) {
    if (!store) return;
    return getInternal(store, "omit")(...args);
  }
  function pick2(store, ...args) {
    if (!store) return;
    return getInternal(store, "pick")(...args);
  }
  function mergeStore(...stores) {
    var _a;
    const initialState = {};
    for (const store2 of stores) {
      const nextState = (_a = store2 == null ? void 0 : store2.getState) == null ? void 0 : _a.call(store2);
      if (nextState) {
        Object.assign(initialState, nextState);
      }
    }
    const store = createStore(initialState, ...stores);
    return Object.assign({}, ...stores, store);
  }
  function throwOnConflictingProps(props, store) {
    if (false) return;
    if (!store) return;
    const defaultKeys = Object.entries(props).filter(([key, value]) => key.startsWith("default") && value !== void 0).map(([key]) => {
      var _a;
      const stateKey = key.replace("default", "");
      return `${((_a = stateKey[0]) == null ? void 0 : _a.toLowerCase()) || ""}${stateKey.slice(1)}`;
    });
    if (!defaultKeys.length) return;
    const storeState = store.getState();
    const conflictingProps = defaultKeys.filter(
      (key) => hasOwnProperty(storeState, key)
    );
    if (!conflictingProps.length) return;
    throw new Error(
      `Passing a store prop in conjunction with a default state is not supported.

const store = useSelectStore();
<SelectProvider store={store} defaultValue="Apple" />
                ^             ^

Instead, pass the default state to the topmost store:

const store = useSelectStore({ defaultValue: "Apple" });
<SelectProvider store={store} />

See https://github.com/ariakit/ariakit/pull/2745 for more details.

If there's a particular need for this, please submit a feature request at https://github.com/ariakit/ariakit
`
    );
  }

  // node_modules/@ariakit/react-core/esm/__chunks/Q5W46E73.js
  var React3 = __toESM(require_react(), 1);
  var import_shim = __toESM(require_shim(), 1);
  var { useSyncExternalStore } = import_shim.default;
  var noopSubscribe = () => () => {
  };
  function useStoreState(store, keyOrSelector = identity) {
    const storeSubscribe = React3.useCallback(
      (callback) => {
        if (!store) return noopSubscribe();
        return subscribe(store, null, callback);
      },
      [store]
    );
    const getSnapshot = () => {
      const key = typeof keyOrSelector === "string" ? keyOrSelector : null;
      const selector2 = typeof keyOrSelector === "function" ? keyOrSelector : null;
      const state = store == null ? void 0 : store.getState();
      if (selector2) return selector2(state);
      if (!state) return;
      if (!key) return;
      if (!hasOwnProperty(state, key)) return;
      return state[key];
    };
    return useSyncExternalStore(storeSubscribe, getSnapshot, getSnapshot);
  }
  function useStoreStateObject(store, object) {
    const objRef = React3.useRef(
      {}
    );
    const storeSubscribe = React3.useCallback(
      (callback) => {
        if (!store) return noopSubscribe();
        return subscribe(store, null, callback);
      },
      [store]
    );
    const getSnapshot = () => {
      const state = store == null ? void 0 : store.getState();
      let updated = false;
      const obj = objRef.current;
      for (const prop in object) {
        const keyOrSelector = object[prop];
        if (typeof keyOrSelector === "function") {
          const value = keyOrSelector(state);
          if (value !== obj[prop]) {
            obj[prop] = value;
            updated = true;
          }
        }
        if (typeof keyOrSelector === "string") {
          if (!state) continue;
          if (!hasOwnProperty(state, keyOrSelector)) continue;
          const value = state[keyOrSelector];
          if (value !== obj[prop]) {
            obj[prop] = value;
            updated = true;
          }
        }
      }
      if (updated) {
        objRef.current = { ...obj };
      }
      return objRef.current;
    };
    return useSyncExternalStore(storeSubscribe, getSnapshot, getSnapshot);
  }
  function useStoreProps(store, props, key, setKey) {
    const value = hasOwnProperty(props, key) ? props[key] : void 0;
    const setValue = setKey ? props[setKey] : void 0;
    const propsRef = useLiveRef({ value, setValue });
    useSafeLayoutEffect(() => {
      return sync(store, [key], (state, prev2) => {
        const { value: value2, setValue: setValue2 } = propsRef.current;
        if (!setValue2) return;
        if (state[key] === prev2[key]) return;
        if (state[key] === value2) return;
        setValue2(state[key]);
      });
    }, [store, key]);
    useSafeLayoutEffect(() => {
      if (value === void 0) return;
      store.setState(key, value);
      return batch(store, [key], () => {
        if (value === void 0) return;
        store.setState(key, value);
      });
    });
  }
  function useStore(createStore2, props) {
    const [store, setStore] = React3.useState(() => createStore2(props));
    useSafeLayoutEffect(() => init(store), [store]);
    const useState210 = React3.useCallback(
      (keyOrSelector) => useStoreState(store, keyOrSelector),
      [store]
    );
    const memoizedStore = React3.useMemo(
      () => ({ ...store, useState: useState210 }),
      [store, useState210]
    );
    const updateStore = useEvent(() => {
      setStore((store2) => createStore2({ ...props, ...store2.getState() }));
    });
    return [memoizedStore, updateStore];
  }

  // node_modules/@ariakit/react-core/esm/__chunks/WZWDIE3S.js
  var import_react8 = __toESM(require_react(), 1);
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  var TagName4 = "button";
  function isEditableElement(element) {
    if (isTextbox(element)) return true;
    return element.tagName === "INPUT" && !isButton(element);
  }
  function getNextPageOffset(scrollingElement, pageUp = false) {
    const height = scrollingElement.clientHeight;
    const { top } = scrollingElement.getBoundingClientRect();
    const pageSize = Math.max(height * 0.875, height - 40) * 1.5;
    const pageOffset = pageUp ? height - pageSize + top : pageSize + top;
    if (scrollingElement.tagName === "HTML") {
      return pageOffset + scrollingElement.scrollTop;
    }
    return pageOffset;
  }
  function getItemOffset(itemElement, pageUp = false) {
    const { top } = itemElement.getBoundingClientRect();
    if (pageUp) {
      return top + itemElement.clientHeight;
    }
    return top;
  }
  function findNextPageItemId(element, store, next2, pageUp = false) {
    var _a;
    if (!store) return;
    if (!next2) return;
    const { renderedItems } = store.getState();
    const scrollingElement = getScrollingElement(element);
    if (!scrollingElement) return;
    const nextPageOffset = getNextPageOffset(scrollingElement, pageUp);
    let id3;
    let prevDifference;
    for (let i3 = 0; i3 < renderedItems.length; i3 += 1) {
      const previousId = id3;
      id3 = next2(i3);
      if (!id3) break;
      if (id3 === previousId) continue;
      const itemElement = (_a = getEnabledItem(store, id3)) == null ? void 0 : _a.element;
      if (!itemElement) continue;
      const itemOffset = getItemOffset(itemElement, pageUp);
      const difference = itemOffset - nextPageOffset;
      const absDifference = Math.abs(difference);
      if (pageUp && difference <= 0 || !pageUp && difference >= 0) {
        if (prevDifference !== void 0 && prevDifference < absDifference) {
          id3 = previousId;
        }
        break;
      }
      prevDifference = absDifference;
    }
    return id3;
  }
  function targetIsAnotherItem(event, store) {
    if (isSelfTarget(event)) return false;
    return isItem(store, event.target);
  }
  var useCompositeItem = createHook(
    function useCompositeItem2({
      store,
      rowId: rowIdProp,
      preventScrollOnKeyDown = false,
      moveOnKeyPress = true,
      tabbable = false,
      getItem: getItemProp,
      "aria-setsize": ariaSetSizeProp,
      "aria-posinset": ariaPosInSetProp,
      ...props
    }) {
      const context = useCompositeContext();
      store = store || context;
      const id3 = useId(props.id);
      const ref = (0, import_react8.useRef)(null);
      const row = (0, import_react8.useContext)(CompositeRowContext);
      const disabled = disabledFromProps(props);
      const trulyDisabled = disabled && !props.accessibleWhenDisabled;
      const {
        rowId,
        baseElement,
        isActiveItem,
        ariaSetSize,
        ariaPosInSet,
        isTabbable: isTabbable2
      } = useStoreStateObject(store, {
        rowId(state) {
          if (rowIdProp) return rowIdProp;
          if (!state) return;
          if (!(row == null ? void 0 : row.baseElement)) return;
          if (row.baseElement !== state.baseElement) return;
          return row.id;
        },
        baseElement(state) {
          return (state == null ? void 0 : state.baseElement) || void 0;
        },
        isActiveItem(state) {
          return !!state && state.activeId === id3;
        },
        ariaSetSize(state) {
          if (ariaSetSizeProp != null) return ariaSetSizeProp;
          if (!state) return;
          if (!(row == null ? void 0 : row.ariaSetSize)) return;
          if (row.baseElement !== state.baseElement) return;
          return row.ariaSetSize;
        },
        ariaPosInSet(state) {
          if (ariaPosInSetProp != null) return ariaPosInSetProp;
          if (!state) return;
          if (!(row == null ? void 0 : row.ariaPosInSet)) return;
          if (row.baseElement !== state.baseElement) return;
          const itemsInRow = state.renderedItems.filter(
            (item2) => item2.rowId === rowId
          );
          return row.ariaPosInSet + itemsInRow.findIndex((item2) => item2.id === id3);
        },
        isTabbable(state) {
          if (!(state == null ? void 0 : state.renderedItems.length)) return true;
          if (state.virtualFocus) return false;
          if (tabbable) return true;
          if (state.activeId === null) return false;
          const item2 = store == null ? void 0 : store.item(state.activeId);
          if (item2 == null ? void 0 : item2.disabled) return true;
          if (!(item2 == null ? void 0 : item2.element)) return true;
          return state.activeId === id3;
        }
      });
      const getItem = (0, import_react8.useCallback)(
        (item2) => {
          var _a;
          const nextItem = {
            ...item2,
            id: id3 || item2.id,
            rowId,
            disabled: !!trulyDisabled,
            children: (_a = item2.element) == null ? void 0 : _a.textContent
          };
          if (getItemProp) {
            return getItemProp(nextItem);
          }
          return nextItem;
        },
        [id3, rowId, trulyDisabled, getItemProp]
      );
      const onFocusProp = props.onFocus;
      const hasFocusedComposite = (0, import_react8.useRef)(false);
      const onFocus = useEvent((event) => {
        onFocusProp == null ? void 0 : onFocusProp(event);
        if (event.defaultPrevented) return;
        if (isPortalEvent(event)) return;
        if (!id3) return;
        if (!store) return;
        if (targetIsAnotherItem(event, store)) return;
        const { virtualFocus, baseElement: baseElement2 } = store.getState();
        store.setActiveId(id3);
        if (isTextbox(event.currentTarget)) {
          selectTextField(event.currentTarget);
        }
        if (!virtualFocus) return;
        if (!isSelfTarget(event)) return;
        if (isEditableElement(event.currentTarget)) return;
        if (!(baseElement2 == null ? void 0 : baseElement2.isConnected)) return;
        if (isSafari() && event.currentTarget.hasAttribute("data-autofocus")) {
          event.currentTarget.scrollIntoView({
            block: "nearest",
            inline: "nearest"
          });
        }
        hasFocusedComposite.current = true;
        const fromComposite = event.relatedTarget === baseElement2 || isItem(store, event.relatedTarget);
        if (fromComposite) {
          focusSilently(baseElement2);
        } else {
          baseElement2.focus();
        }
      });
      const onBlurCaptureProp = props.onBlurCapture;
      const onBlurCapture = useEvent((event) => {
        onBlurCaptureProp == null ? void 0 : onBlurCaptureProp(event);
        if (event.defaultPrevented) return;
        const state = store == null ? void 0 : store.getState();
        if ((state == null ? void 0 : state.virtualFocus) && hasFocusedComposite.current) {
          hasFocusedComposite.current = false;
          event.preventDefault();
          event.stopPropagation();
        }
      });
      const onKeyDownProp = props.onKeyDown;
      const preventScrollOnKeyDownProp = useBooleanEvent(preventScrollOnKeyDown);
      const moveOnKeyPressProp = useBooleanEvent(moveOnKeyPress);
      const onKeyDown = useEvent((event) => {
        onKeyDownProp == null ? void 0 : onKeyDownProp(event);
        if (event.defaultPrevented) return;
        if (!isSelfTarget(event)) return;
        if (!store) return;
        const { currentTarget } = event;
        const state = store.getState();
        const item2 = store.item(id3);
        const isGrid2 = !!(item2 == null ? void 0 : item2.rowId);
        const isVertical = state.orientation !== "horizontal";
        const isHorizontal = state.orientation !== "vertical";
        const canHomeEnd = () => {
          if (isGrid2) return true;
          if (isHorizontal) return true;
          if (!state.baseElement) return true;
          if (!isTextField(state.baseElement)) return true;
          return false;
        };
        const keyMap = {
          ArrowUp: (isGrid2 || isVertical) && store.up,
          ArrowRight: (isGrid2 || isHorizontal) && store.next,
          ArrowDown: (isGrid2 || isVertical) && store.down,
          ArrowLeft: (isGrid2 || isHorizontal) && store.previous,
          Home: () => {
            if (!canHomeEnd()) return;
            if (!isGrid2 || event.ctrlKey) {
              return store == null ? void 0 : store.first();
            }
            return store == null ? void 0 : store.previous(-1);
          },
          End: () => {
            if (!canHomeEnd()) return;
            if (!isGrid2 || event.ctrlKey) {
              return store == null ? void 0 : store.last();
            }
            return store == null ? void 0 : store.next(-1);
          },
          PageUp: () => {
            return findNextPageItemId(currentTarget, store, store == null ? void 0 : store.up, true);
          },
          PageDown: () => {
            return findNextPageItemId(currentTarget, store, store == null ? void 0 : store.down);
          }
        };
        const action = keyMap[event.key];
        if (action) {
          if (isTextbox(currentTarget)) {
            const selection = getTextboxSelection(currentTarget);
            const isLeft = isHorizontal && event.key === "ArrowLeft";
            const isRight = isHorizontal && event.key === "ArrowRight";
            const isUp = isVertical && event.key === "ArrowUp";
            const isDown = isVertical && event.key === "ArrowDown";
            if (isRight || isDown) {
              const { length: valueLength } = getTextboxValue(currentTarget);
              if (selection.end !== valueLength) return;
            } else if ((isLeft || isUp) && selection.start !== 0) return;
          }
          const nextId = action();
          if (preventScrollOnKeyDownProp(event) || nextId !== void 0) {
            if (!moveOnKeyPressProp(event)) return;
            event.preventDefault();
            store.move(nextId);
          }
        }
      });
      const providerValue = (0, import_react8.useMemo)(
        () => ({ id: id3, baseElement }),
        [id3, baseElement]
      );
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CompositeItemContext.Provider, { value: providerValue, children: element }),
        [providerValue]
      );
      props = {
        id: id3,
        "data-active-item": isActiveItem || void 0,
        ...props,
        ref: useMergeRefs(ref, props.ref),
        tabIndex: isTabbable2 ? props.tabIndex : -1,
        onFocus,
        onBlurCapture,
        onKeyDown
      };
      props = useCommand(props);
      props = useCollectionItem({
        store,
        ...props,
        getItem,
        shouldRegisterItem: id3 ? props.shouldRegisterItem : false
      });
      return removeUndefinedValues({
        ...props,
        "aria-setsize": ariaSetSize,
        "aria-posinset": ariaPosInSet
      });
    }
  );
  var CompositeItem = memo2(
    forwardRef2(function CompositeItem2(props) {
      const htmlProps = useCompositeItem(props);
      return createElement(TagName4, htmlProps);
    })
  );

  // node_modules/@ariakit/react-core/esm/tab/tab.js
  var import_react9 = __toESM(require_react(), 1);
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
  var TagName5 = "button";
  var useTab = createHook(function useTab2({
    store,
    getItem: getItemProp,
    ...props
  }) {
    var _a;
    const context = useTabScopedContext();
    store = store || context;
    invariant(
      store,
      "Tab must be wrapped in a TabList component."
    );
    const defaultId = useId();
    const id3 = props.id || defaultId;
    const dimmed = disabledFromProps(props);
    const getItem = (0, import_react9.useCallback)(
      (item2) => {
        const nextItem = { ...item2, dimmed };
        if (getItemProp) {
          return getItemProp(nextItem);
        }
        return nextItem;
      },
      [dimmed, getItemProp]
    );
    const onClickProp = props.onClick;
    const onClick = useEvent((event) => {
      onClickProp == null ? void 0 : onClickProp(event);
      if (event.defaultPrevented) return;
      store == null ? void 0 : store.setSelectedId(id3);
    });
    const panelId = store.panels.useState(
      (state) => {
        var _a2;
        return (_a2 = state.items.find((item2) => item2.tabId === id3)) == null ? void 0 : _a2.id;
      }
    );
    const shouldRegisterItem = defaultId ? props.shouldRegisterItem : false;
    const isActive = store.useState((state) => !!id3 && state.activeId === id3);
    const selected = store.useState((state) => !!id3 && state.selectedId === id3);
    const hasActiveItem2 = store.useState((state) => !!store.item(state.activeId));
    const canRegisterComposedItem = isActive || selected && !hasActiveItem2;
    const accessibleWhenDisabled = selected || ((_a = props.accessibleWhenDisabled) != null ? _a : true);
    const isWithinVirtualFocusComposite = useStoreState(
      store.combobox || store.composite,
      "virtualFocus"
    );
    if (isWithinVirtualFocusComposite) {
      props = {
        ...props,
        tabIndex: -1
      };
    }
    props = {
      id: id3,
      role: "tab",
      "aria-selected": selected,
      "aria-controls": panelId || void 0,
      ...props,
      onClick
    };
    if (store.composite) {
      const defaultProps = {
        id: id3,
        accessibleWhenDisabled,
        store: store.composite,
        shouldRegisterItem: canRegisterComposedItem && shouldRegisterItem,
        rowId: props.rowId,
        render: props.render
      };
      props = {
        ...props,
        render: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
          CompositeItem,
          {
            ...defaultProps,
            render: store.combobox && store.composite !== store.combobox ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CompositeItem, { ...defaultProps, store: store.combobox }) : defaultProps.render
          }
        )
      };
    }
    props = useCompositeItem({
      store,
      ...props,
      accessibleWhenDisabled,
      getItem,
      shouldRegisterItem
    });
    return props;
  });
  var Tab = memo2(
    forwardRef2(function Tab2(props) {
      const htmlProps = useTab(props);
      return createElement(TagName5, htmlProps);
    })
  );

  // node_modules/@ariakit/core/esm/__chunks/7PRQYBBV.js
  function toArray(arg) {
    if (Array.isArray(arg)) {
      return arg;
    }
    return typeof arg !== "undefined" ? [arg] : [];
  }
  function flatten2DArray(array) {
    const flattened = [];
    for (const row of array) {
      flattened.push(...row);
    }
    return flattened;
  }
  function reverseArray(array) {
    return array.slice().reverse();
  }

  // node_modules/@ariakit/react-core/esm/__chunks/ZMWF7ASR.js
  var import_react10 = __toESM(require_react(), 1);
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
  var TagName6 = "div";
  function isGrid(items) {
    return items.some((item2) => !!item2.rowId);
  }
  function isPrintableKey(event) {
    const target = event.target;
    if (target && !isTextField(target)) return false;
    return event.key.length === 1 && !event.ctrlKey && !event.metaKey;
  }
  function isModifierKey(event) {
    return event.key === "Shift" || event.key === "Control" || event.key === "Alt" || event.key === "Meta";
  }
  function useKeyboardEventProxy(store, onKeyboardEvent, previousElementRef) {
    return useEvent((event) => {
      var _a;
      onKeyboardEvent == null ? void 0 : onKeyboardEvent(event);
      if (event.defaultPrevented) return;
      if (event.isPropagationStopped()) return;
      if (!isSelfTarget(event)) return;
      if (isModifierKey(event)) return;
      if (isPrintableKey(event)) return;
      const state = store.getState();
      const activeElement = (_a = getEnabledItem(store, state.activeId)) == null ? void 0 : _a.element;
      if (!activeElement) return;
      const { view, ...eventInit } = event;
      const previousElement = previousElementRef == null ? void 0 : previousElementRef.current;
      if (activeElement !== previousElement) {
        activeElement.focus();
      }
      if (!fireKeyboardEvent(activeElement, event.type, eventInit)) {
        event.preventDefault();
      }
      if (event.currentTarget.contains(activeElement)) {
        event.stopPropagation();
      }
    });
  }
  function findFirstEnabledItemInTheLastRow(items) {
    return findFirstEnabledItem(
      flatten2DArray(reverseArray(groupItemsByRows(items)))
    );
  }
  function useScheduleFocus(store) {
    const [scheduled, setScheduled] = (0, import_react10.useState)(false);
    const schedule = (0, import_react10.useCallback)(() => setScheduled(true), []);
    const activeItem = store.useState(
      (state) => getEnabledItem(store, state.activeId)
    );
    (0, import_react10.useEffect)(() => {
      const activeElement = activeItem == null ? void 0 : activeItem.element;
      if (!scheduled) return;
      if (!activeElement) return;
      setScheduled(false);
      activeElement.focus({ preventScroll: true });
    }, [activeItem, scheduled]);
    return schedule;
  }
  var useComposite = createHook(
    function useComposite2({
      store,
      composite = true,
      focusOnMove = composite,
      moveOnKeyPress = true,
      ...props
    }) {
      const context = useCompositeProviderContext();
      store = store || context;
      invariant(
        store,
        "Composite must receive a `store` prop or be wrapped in a CompositeProvider component."
      );
      const ref = (0, import_react10.useRef)(null);
      const previousElementRef = (0, import_react10.useRef)(null);
      const scheduleFocus = useScheduleFocus(store);
      const moves = store.useState("moves");
      const [, setBaseElement] = useTransactionState(
        composite ? store.setBaseElement : null
      );
      (0, import_react10.useEffect)(() => {
        var _a;
        if (!store) return;
        if (!moves) return;
        if (!composite) return;
        if (!focusOnMove) return;
        const { activeId: activeId2 } = store.getState();
        const itemElement = (_a = getEnabledItem(store, activeId2)) == null ? void 0 : _a.element;
        if (!itemElement) return;
        focusIntoView(itemElement);
      }, [store, moves, composite, focusOnMove]);
      useSafeLayoutEffect(() => {
        if (!store) return;
        if (!moves) return;
        if (!composite) return;
        const { baseElement, activeId: activeId2 } = store.getState();
        const isSelfAcive = activeId2 === null;
        if (!isSelfAcive) return;
        if (!baseElement) return;
        const previousElement = previousElementRef.current;
        previousElementRef.current = null;
        if (previousElement) {
          fireBlurEvent(previousElement, { relatedTarget: baseElement });
        }
        if (!hasFocus(baseElement)) {
          baseElement.focus();
        }
      }, [store, moves, composite]);
      const activeId = store.useState("activeId");
      const virtualFocus = store.useState("virtualFocus");
      useSafeLayoutEffect(() => {
        var _a;
        if (!store) return;
        if (!composite) return;
        if (!virtualFocus) return;
        const previousElement = previousElementRef.current;
        previousElementRef.current = null;
        if (!previousElement) return;
        const activeElement = (_a = getEnabledItem(store, activeId)) == null ? void 0 : _a.element;
        const relatedTarget = activeElement || getActiveElement(previousElement);
        if (relatedTarget === previousElement) return;
        fireBlurEvent(previousElement, { relatedTarget });
      }, [store, activeId, virtualFocus, composite]);
      const onKeyDownCapture = useKeyboardEventProxy(
        store,
        props.onKeyDownCapture,
        previousElementRef
      );
      const onKeyUpCapture = useKeyboardEventProxy(
        store,
        props.onKeyUpCapture,
        previousElementRef
      );
      const onFocusCaptureProp = props.onFocusCapture;
      const onFocusCapture = useEvent((event) => {
        onFocusCaptureProp == null ? void 0 : onFocusCaptureProp(event);
        if (event.defaultPrevented) return;
        if (!store) return;
        const { virtualFocus: virtualFocus2 } = store.getState();
        if (!virtualFocus2) return;
        const previousActiveElement = event.relatedTarget;
        const isSilentlyFocused = silentlyFocused(event.currentTarget);
        if (isSelfTarget(event) && isSilentlyFocused) {
          event.stopPropagation();
          previousElementRef.current = previousActiveElement;
        }
      });
      const onFocusProp = props.onFocus;
      const onFocus = useEvent((event) => {
        onFocusProp == null ? void 0 : onFocusProp(event);
        if (event.defaultPrevented) return;
        if (!composite) return;
        if (!store) return;
        const { relatedTarget } = event;
        const { virtualFocus: virtualFocus2 } = store.getState();
        if (virtualFocus2) {
          if (isSelfTarget(event) && !isItem(store, relatedTarget)) {
            queueMicrotask(scheduleFocus);
          }
        } else if (isSelfTarget(event)) {
          store.setActiveId(null);
        }
      });
      const onBlurCaptureProp = props.onBlurCapture;
      const onBlurCapture = useEvent((event) => {
        var _a;
        onBlurCaptureProp == null ? void 0 : onBlurCaptureProp(event);
        if (event.defaultPrevented) return;
        if (!store) return;
        const { virtualFocus: virtualFocus2, activeId: activeId2 } = store.getState();
        if (!virtualFocus2) return;
        const activeElement = (_a = getEnabledItem(store, activeId2)) == null ? void 0 : _a.element;
        const nextActiveElement = event.relatedTarget;
        const nextActiveElementIsItem = isItem(store, nextActiveElement);
        const previousElement = previousElementRef.current;
        previousElementRef.current = null;
        if (isSelfTarget(event) && nextActiveElementIsItem) {
          if (nextActiveElement === activeElement) {
            if (previousElement && previousElement !== nextActiveElement) {
              fireBlurEvent(previousElement, event);
            }
          } else if (activeElement) {
            fireBlurEvent(activeElement, event);
          } else if (previousElement) {
            fireBlurEvent(previousElement, event);
          }
          event.stopPropagation();
        } else {
          const targetIsItem = isItem(store, event.target);
          if (!targetIsItem && activeElement) {
            fireBlurEvent(activeElement, event);
          }
        }
      });
      const onKeyDownProp = props.onKeyDown;
      const moveOnKeyPressProp = useBooleanEvent(moveOnKeyPress);
      const onKeyDown = useEvent((event) => {
        var _a;
        onKeyDownProp == null ? void 0 : onKeyDownProp(event);
        if (event.nativeEvent.isComposing) return;
        if (event.defaultPrevented) return;
        if (!store) return;
        if (!isSelfTarget(event)) return;
        const { orientation, renderedItems, activeId: activeId2 } = store.getState();
        const activeItem = getEnabledItem(store, activeId2);
        if ((_a = activeItem == null ? void 0 : activeItem.element) == null ? void 0 : _a.isConnected) return;
        const isVertical = orientation !== "horizontal";
        const isHorizontal = orientation !== "vertical";
        const grid = isGrid(renderedItems);
        const isHorizontalKey = event.key === "ArrowLeft" || event.key === "ArrowRight" || event.key === "Home" || event.key === "End";
        if (isHorizontalKey && isTextField(event.currentTarget)) return;
        const up = () => {
          if (grid) {
            const item2 = findFirstEnabledItemInTheLastRow(renderedItems);
            return item2 == null ? void 0 : item2.id;
          }
          return store == null ? void 0 : store.last();
        };
        const keyMap = {
          ArrowUp: (grid || isVertical) && up,
          ArrowRight: (grid || isHorizontal) && store.first,
          ArrowDown: (grid || isVertical) && store.first,
          ArrowLeft: (grid || isHorizontal) && store.last,
          Home: store.first,
          End: store.last,
          PageUp: store.first,
          PageDown: store.last
        };
        const action = keyMap[event.key];
        if (action) {
          const id3 = action();
          if (id3 !== void 0) {
            if (!moveOnKeyPressProp(event)) return;
            event.preventDefault();
            store.move(id3);
          }
        }
      });
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(CompositeContextProvider, { value: store, children: element }),
        [store]
      );
      const activeDescendant = store.useState((state) => {
        var _a;
        if (!store) return;
        if (!composite) return;
        if (!state.virtualFocus) return;
        return (_a = getEnabledItem(store, state.activeId)) == null ? void 0 : _a.id;
      });
      props = {
        "aria-activedescendant": activeDescendant,
        ...props,
        ref: useMergeRefs(ref, setBaseElement, props.ref),
        onKeyDownCapture,
        onKeyUpCapture,
        onFocusCapture,
        onFocus,
        onBlurCapture,
        onKeyDown
      };
      const focusable = store.useState(
        (state) => composite && (state.virtualFocus || state.activeId === null)
      );
      props = useFocusable({ focusable, ...props });
      return props;
    }
  );
  var Composite = forwardRef2(function Composite2(props) {
    const htmlProps = useComposite(props);
    return createElement(TagName6, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/tab/tab-list.js
  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
  var TagName7 = "div";
  var useTabList = createHook(
    function useTabList2({ store, ...props }) {
      const context = useTabProviderContext();
      store = store || context;
      invariant(
        store,
        "TabList must receive a `store` prop or be wrapped in a TabProvider component."
      );
      const orientation = store.useState(
        (state) => state.orientation === "both" ? void 0 : state.orientation
      );
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TabScopedContextProvider, { value: store, children: element }),
        [store]
      );
      if (store.composite) {
        props = {
          focusable: false,
          ...props
        };
      }
      props = {
        role: "tablist",
        "aria-orientation": orientation,
        ...props
      };
      props = useComposite({ store, ...props });
      return props;
    }
  );
  var TabList = forwardRef2(function TabList2(props) {
    const htmlProps = useTabList(props);
    return createElement(TagName7, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/LVDQFHCH.js
  var ctx4 = createStoreContext();
  var useDisclosureContext = ctx4.useContext;
  var useDisclosureScopedContext = ctx4.useScopedContext;
  var useDisclosureProviderContext = ctx4.useProviderContext;
  var DisclosureContextProvider = ctx4.ContextProvider;
  var DisclosureScopedContextProvider = ctx4.ScopedContextProvider;

  // node_modules/@ariakit/react-core/esm/__chunks/A62MDFCW.js
  var import_react11 = __toESM(require_react(), 1);
  var ctx5 = createStoreContext(
    [DisclosureContextProvider],
    [DisclosureScopedContextProvider]
  );
  var useDialogContext = ctx5.useContext;
  var useDialogScopedContext = ctx5.useScopedContext;
  var useDialogProviderContext = ctx5.useProviderContext;
  var DialogContextProvider = ctx5.ContextProvider;
  var DialogScopedContextProvider = ctx5.ScopedContextProvider;
  var DialogHeadingContext = (0, import_react11.createContext)(void 0);
  var DialogDescriptionContext = (0, import_react11.createContext)(void 0);

  // node_modules/@ariakit/react-core/esm/__chunks/6B3RXHKP.js
  var import_react12 = __toESM(require_react(), 1);
  var import_react_dom = __toESM(require_react_dom(), 1);
  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
  var TagName8 = "div";
  function afterTimeout(timeoutMs, cb) {
    const timeoutId = setTimeout(cb, timeoutMs);
    return () => clearTimeout(timeoutId);
  }
  function afterPaint2(cb) {
    let raf = requestAnimationFrame(() => {
      raf = requestAnimationFrame(cb);
    });
    return () => cancelAnimationFrame(raf);
  }
  function parseCSSTime(...times) {
    return times.join(", ").split(", ").reduce((longestTime, currentTimeString) => {
      const multiplier = currentTimeString.endsWith("ms") ? 1 : 1e3;
      const currentTime = Number.parseFloat(currentTimeString || "0s") * multiplier;
      if (currentTime > longestTime) return currentTime;
      return longestTime;
    }, 0);
  }
  function isHidden(mounted, hidden, alwaysVisible) {
    return !alwaysVisible && hidden !== false && (!mounted || !!hidden);
  }
  var useDisclosureContent = createHook(function useDisclosureContent2({ store, alwaysVisible, ...props }) {
    const context = useDisclosureProviderContext();
    store = store || context;
    invariant(
      store,
      "DisclosureContent must receive a `store` prop or be wrapped in a DisclosureProvider component."
    );
    const ref = (0, import_react12.useRef)(null);
    const id3 = useId(props.id);
    const [transition, setTransition] = (0, import_react12.useState)(null);
    const open = store.useState("open");
    const mounted = store.useState("mounted");
    const animated = store.useState("animated");
    const contentElement = store.useState("contentElement");
    const otherElement = useStoreState(store.disclosure, "contentElement");
    useSafeLayoutEffect(() => {
      if (!ref.current) return;
      store == null ? void 0 : store.setContentElement(ref.current);
    }, [store]);
    useSafeLayoutEffect(() => {
      let previousAnimated;
      store == null ? void 0 : store.setState("animated", (animated2) => {
        previousAnimated = animated2;
        return true;
      });
      return () => {
        if (previousAnimated === void 0) return;
        store == null ? void 0 : store.setState("animated", previousAnimated);
      };
    }, [store]);
    useSafeLayoutEffect(() => {
      if (!animated) return;
      if (!(contentElement == null ? void 0 : contentElement.isConnected)) {
        setTransition(null);
        return;
      }
      return afterPaint2(() => {
        setTransition(open ? "enter" : mounted ? "leave" : null);
      });
    }, [animated, contentElement, open, mounted]);
    useSafeLayoutEffect(() => {
      if (!store) return;
      if (!animated) return;
      if (!transition) return;
      if (!contentElement) return;
      const stopAnimation = () => store == null ? void 0 : store.setState("animating", false);
      const stopAnimationSync = () => (0, import_react_dom.flushSync)(stopAnimation);
      if (transition === "leave" && open) return;
      if (transition === "enter" && !open) return;
      if (typeof animated === "number") {
        const timeout2 = animated;
        return afterTimeout(timeout2, stopAnimationSync);
      }
      const {
        transitionDuration,
        animationDuration,
        transitionDelay,
        animationDelay
      } = getComputedStyle(contentElement);
      const {
        transitionDuration: transitionDuration2 = "0",
        animationDuration: animationDuration2 = "0",
        transitionDelay: transitionDelay2 = "0",
        animationDelay: animationDelay2 = "0"
      } = otherElement ? getComputedStyle(otherElement) : {};
      const delay2 = parseCSSTime(
        transitionDelay,
        animationDelay,
        transitionDelay2,
        animationDelay2
      );
      const duration = parseCSSTime(
        transitionDuration,
        animationDuration,
        transitionDuration2,
        animationDuration2
      );
      const timeout = delay2 + duration;
      if (!timeout) {
        if (transition === "enter") {
          store.setState("animated", false);
        }
        stopAnimation();
        return;
      }
      const frameRate = 1e3 / 60;
      const maxTimeout = Math.max(timeout - frameRate, 0);
      return afterTimeout(maxTimeout, stopAnimationSync);
    }, [store, animated, contentElement, otherElement, open, transition]);
    props = useWrapElement(
      props,
      (element) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogScopedContextProvider, { value: store, children: element }),
      [store]
    );
    const hidden = isHidden(mounted, props.hidden, alwaysVisible);
    const styleProp = props.style;
    const style2 = (0, import_react12.useMemo)(() => {
      if (hidden) {
        return { ...styleProp, display: "none" };
      }
      return styleProp;
    }, [hidden, styleProp]);
    props = {
      id: id3,
      "data-open": open || void 0,
      "data-enter": transition === "enter" || void 0,
      "data-leave": transition === "leave" || void 0,
      hidden,
      ...props,
      ref: useMergeRefs(id3 ? store.setContentElement : null, ref, props.ref),
      style: style2
    };
    return removeUndefinedValues(props);
  });
  var DisclosureContentImpl = forwardRef2(function DisclosureContentImpl2(props) {
    const htmlProps = useDisclosureContent(props);
    return createElement(TagName8, htmlProps);
  });
  var DisclosureContent = forwardRef2(function DisclosureContent2({
    unmountOnHide,
    ...props
  }) {
    const context = useDisclosureProviderContext();
    const store = props.store || context;
    const mounted = useStoreState(
      store,
      (state) => !unmountOnHide || (state == null ? void 0 : state.mounted)
    );
    if (mounted === false) return null;
    return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DisclosureContentImpl, { ...props });
  });

  // node_modules/@ariakit/core/esm/__chunks/75BJEVSH.js
  function createDisclosureStore(props = {}) {
    const store = mergeStore(
      props.store,
      omit2(props.disclosure, ["contentElement", "disclosureElement"])
    );
    throwOnConflictingProps(props, store);
    const syncState = store == null ? void 0 : store.getState();
    const open = defaultValue(
      props.open,
      syncState == null ? void 0 : syncState.open,
      props.defaultOpen,
      false
    );
    const animated = defaultValue(props.animated, syncState == null ? void 0 : syncState.animated, false);
    const initialState = {
      open,
      animated,
      animating: !!animated && open,
      mounted: open,
      contentElement: defaultValue(syncState == null ? void 0 : syncState.contentElement, null),
      disclosureElement: defaultValue(syncState == null ? void 0 : syncState.disclosureElement, null)
    };
    const disclosure = createStore(initialState, store);
    setup(
      disclosure,
      () => sync(disclosure, ["animated", "animating"], (state) => {
        if (state.animated) return;
        disclosure.setState("animating", false);
      })
    );
    setup(
      disclosure,
      () => subscribe(disclosure, ["open"], () => {
        if (!disclosure.getState().animated) return;
        disclosure.setState("animating", true);
      })
    );
    setup(
      disclosure,
      () => sync(disclosure, ["open", "animating"], (state) => {
        disclosure.setState("mounted", state.open || state.animating);
      })
    );
    return {
      ...disclosure,
      disclosure: props.disclosure,
      setOpen: (value) => disclosure.setState("open", value),
      show: () => disclosure.setState("open", true),
      hide: () => disclosure.setState("open", false),
      toggle: () => disclosure.setState("open", (open2) => !open2),
      stopAnimation: () => disclosure.setState("animating", false),
      setContentElement: (value) => disclosure.setState("contentElement", value),
      setDisclosureElement: (value) => disclosure.setState("disclosureElement", value)
    };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/WLZ6H5FH.js
  function useDisclosureStoreProps(store, update, props) {
    useUpdateEffect(update, [props.store, props.disclosure]);
    useStoreProps(store, props, "open", "setOpen");
    useStoreProps(store, props, "mounted", "setMounted");
    useStoreProps(store, props, "animated");
    return Object.assign(store, { disclosure: props.disclosure });
  }
  function useDisclosureStore(props = {}) {
    const [store, update] = useStore(createDisclosureStore, props);
    return useDisclosureStoreProps(store, update, props);
  }

  // node_modules/@ariakit/react-core/esm/tab/tab-panel.js
  var import_react13 = __toESM(require_react(), 1);
  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
  var TagName9 = "div";
  var useTabPanel = createHook(
    function useTabPanel2({
      store,
      unmountOnHide,
      tabId: tabIdProp,
      getItem: getItemProp,
      scrollRestoration,
      scrollElement,
      ...props
    }) {
      const context = useTabProviderContext();
      store = store || context;
      invariant(
        store,
        "TabPanel must receive a `store` prop or be wrapped in a TabProvider component."
      );
      const ref = (0, import_react13.useRef)(null);
      const id3 = useId(props.id);
      const tabId = useStoreState(
        store.panels,
        () => {
          var _a;
          return tabIdProp || ((_a = store == null ? void 0 : store.panels.item(id3)) == null ? void 0 : _a.tabId);
        }
      );
      const open = useStoreState(
        store,
        (state) => !!tabId && state.selectedId === tabId
      );
      const disclosure = useDisclosureStore({ open });
      const mounted = useStoreState(disclosure, "mounted");
      const scrollPositionRef = (0, import_react13.useRef)(
        /* @__PURE__ */ new Map()
      );
      const getScrollElement = useEvent(() => {
        const panelElement = ref.current;
        if (!panelElement) return null;
        if (!scrollElement) return panelElement;
        if (typeof scrollElement === "function") {
          return scrollElement(panelElement);
        }
        if ("current" in scrollElement) {
          return scrollElement.current;
        }
        return scrollElement;
      });
      (0, import_react13.useEffect)(() => {
        var _a, _b;
        if (!scrollRestoration) return;
        if (!mounted) return;
        const element = getScrollElement();
        if (!element) return;
        if (scrollRestoration === "reset") {
          element.scroll(0, 0);
          return;
        }
        if (!tabId) return;
        const position2 = scrollPositionRef.current.get(tabId);
        element.scroll((_a = position2 == null ? void 0 : position2.x) != null ? _a : 0, (_b = position2 == null ? void 0 : position2.y) != null ? _b : 0);
        const onScroll = () => {
          scrollPositionRef.current.set(tabId, {
            x: element.scrollLeft,
            y: element.scrollTop
          });
        };
        element.addEventListener("scroll", onScroll);
        return () => {
          element.removeEventListener("scroll", onScroll);
        };
      }, [scrollRestoration, mounted, tabId, getScrollElement, store]);
      const [hasTabbableChildren, setHasTabbableChildren] = (0, import_react13.useState)(false);
      (0, import_react13.useEffect)(() => {
        const element = ref.current;
        if (!element) return;
        const tabbable = getAllTabbableIn(element);
        setHasTabbableChildren(!!tabbable.length);
      }, []);
      const getItem = (0, import_react13.useCallback)(
        (item2) => {
          const nextItem = { ...item2, id: id3 || item2.id, tabId: tabIdProp };
          if (getItemProp) {
            return getItemProp(nextItem);
          }
          return nextItem;
        },
        [id3, tabIdProp, getItemProp]
      );
      const onKeyDownProp = props.onKeyDown;
      const onKeyDown = useEvent((event) => {
        onKeyDownProp == null ? void 0 : onKeyDownProp(event);
        if (event.defaultPrevented) return;
        if (!(store == null ? void 0 : store.composite)) return;
        const keyMap = {
          ArrowLeft: store.previous,
          ArrowRight: store.next,
          Home: store.first,
          End: store.last
        };
        const action = keyMap[event.key];
        if (!action) return;
        const { selectedId } = store.getState();
        const nextId = action({ activeId: selectedId });
        if (!nextId) return;
        event.preventDefault();
        store.move(nextId);
      });
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TabScopedContextProvider, { value: store, children: element }),
        [store]
      );
      props = {
        id: id3,
        role: "tabpanel",
        "aria-labelledby": tabId || void 0,
        ...props,
        children: unmountOnHide && !mounted ? null : props.children,
        ref: useMergeRefs(ref, props.ref),
        onKeyDown
      };
      props = useFocusable({
        // If the tab panel is rendered as part of another composite widget such
        // as combobox, it should not be focusable.
        focusable: !store.composite && !hasTabbableChildren,
        ...props
      });
      props = useDisclosureContent({ store: disclosure, ...props });
      props = useCollectionItem({ store: store.panels, ...props, getItem });
      return props;
    }
  );
  var TabPanel = forwardRef2(function TabPanel2(props) {
    const htmlProps = useTabPanel(props);
    return createElement(TagName9, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/JMU4N4M5.js
  var ctx6 = createStoreContext(
    [DialogContextProvider],
    [DialogScopedContextProvider]
  );
  var usePopoverContext = ctx6.useContext;
  var usePopoverScopedContext = ctx6.useScopedContext;
  var usePopoverProviderContext = ctx6.useProviderContext;
  var PopoverContextProvider = ctx6.ContextProvider;
  var PopoverScopedContextProvider = ctx6.ScopedContextProvider;

  // node_modules/@ariakit/react-core/esm/__chunks/AEGCXJZV.js
  var import_react14 = __toESM(require_react(), 1);
  var ctx7 = createStoreContext(
    [PopoverContextProvider, CompositeContextProvider],
    [PopoverScopedContextProvider, CompositeScopedContextProvider]
  );
  var useSelectContext = ctx7.useContext;
  var useSelectScopedContext = ctx7.useScopedContext;
  var useSelectProviderContext = ctx7.useProviderContext;
  var SelectContextProvider = ctx7.ContextProvider;
  var SelectScopedContextProvider = ctx7.ScopedContextProvider;
  var SelectItemCheckedContext = (0, import_react14.createContext)(false);
  var SelectHeadingContext = (0, import_react14.createContext)(null);

  // node_modules/@ariakit/core/esm/__chunks/N5XGANPW.js
  function getCommonParent(items) {
    var _a;
    const firstItem = items.find((item2) => !!item2.element);
    const lastItem = [...items].reverse().find((item2) => !!item2.element);
    let parentElement = (_a = firstItem == null ? void 0 : firstItem.element) == null ? void 0 : _a.parentElement;
    while (parentElement && (lastItem == null ? void 0 : lastItem.element)) {
      const parent = parentElement;
      if (lastItem && parent.contains(lastItem.element)) {
        return parentElement;
      }
      parentElement = parentElement.parentElement;
    }
    return getDocument(parentElement).body;
  }
  function getPrivateStore(store) {
    return store == null ? void 0 : store.__unstablePrivateStore;
  }
  function createCollectionStore(props = {}) {
    var _a;
    throwOnConflictingProps(props, props.store);
    const syncState = (_a = props.store) == null ? void 0 : _a.getState();
    const items = defaultValue(
      props.items,
      syncState == null ? void 0 : syncState.items,
      props.defaultItems,
      []
    );
    const itemsMap = new Map(items.map((item2) => [item2.id, item2]));
    const initialState = {
      items,
      renderedItems: defaultValue(syncState == null ? void 0 : syncState.renderedItems, [])
    };
    const syncPrivateStore = getPrivateStore(props.store);
    const privateStore = createStore(
      { items, renderedItems: initialState.renderedItems },
      syncPrivateStore
    );
    const collection = createStore(initialState, props.store);
    const sortItems = (renderedItems) => {
      const sortedItems = sortBasedOnDOMPosition(renderedItems, (i3) => i3.element);
      privateStore.setState("renderedItems", sortedItems);
      collection.setState("renderedItems", sortedItems);
    };
    setup(collection, () => init(privateStore));
    setup(privateStore, () => {
      return batch(privateStore, ["items"], (state) => {
        collection.setState("items", state.items);
      });
    });
    setup(privateStore, () => {
      return batch(privateStore, ["renderedItems"], (state) => {
        let firstRun = true;
        let raf = requestAnimationFrame(() => {
          const { renderedItems } = collection.getState();
          if (state.renderedItems === renderedItems) return;
          sortItems(state.renderedItems);
        });
        if (typeof IntersectionObserver !== "function") {
          return () => cancelAnimationFrame(raf);
        }
        const ioCallback = () => {
          if (firstRun) {
            firstRun = false;
            return;
          }
          cancelAnimationFrame(raf);
          raf = requestAnimationFrame(() => sortItems(state.renderedItems));
        };
        const root = getCommonParent(state.renderedItems);
        const observer = new IntersectionObserver(ioCallback, { root });
        for (const item2 of state.renderedItems) {
          if (!item2.element) continue;
          observer.observe(item2.element);
        }
        return () => {
          cancelAnimationFrame(raf);
          observer.disconnect();
        };
      });
    });
    const mergeItem = (item2, setItems, canDeleteFromMap = false) => {
      let prevItem;
      setItems((items2) => {
        const index2 = items2.findIndex(({ id: id3 }) => id3 === item2.id);
        const nextItems = items2.slice();
        if (index2 !== -1) {
          prevItem = items2[index2];
          const nextItem = { ...prevItem, ...item2 };
          nextItems[index2] = nextItem;
          itemsMap.set(item2.id, nextItem);
        } else {
          nextItems.push(item2);
          itemsMap.set(item2.id, item2);
        }
        return nextItems;
      });
      const unmergeItem = () => {
        setItems((items2) => {
          if (!prevItem) {
            if (canDeleteFromMap) {
              itemsMap.delete(item2.id);
            }
            return items2.filter(({ id: id3 }) => id3 !== item2.id);
          }
          const index2 = items2.findIndex(({ id: id3 }) => id3 === item2.id);
          if (index2 === -1) return items2;
          const nextItems = items2.slice();
          nextItems[index2] = prevItem;
          itemsMap.set(item2.id, prevItem);
          return nextItems;
        });
      };
      return unmergeItem;
    };
    const registerItem = (item2) => mergeItem(
      item2,
      (getItems) => privateStore.setState("items", getItems),
      true
    );
    return {
      ...collection,
      registerItem,
      renderItem: (item2) => chain(
        registerItem(item2),
        mergeItem(
          item2,
          (getItems) => privateStore.setState("renderedItems", getItems)
        )
      ),
      item: (id3) => {
        if (!id3) return null;
        let item2 = itemsMap.get(id3);
        if (!item2) {
          const { items: items2 } = privateStore.getState();
          item2 = items2.find((item22) => item22.id === id3);
          if (item2) {
            itemsMap.set(id3, item2);
          }
        }
        return item2 || null;
      },
      // @ts-expect-error Internal
      __unstablePrivateStore: privateStore
    };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/GVAFFF2B.js
  function useCollectionStoreProps(store, update, props) {
    useUpdateEffect(update, [props.store]);
    useStoreProps(store, props, "items", "setItems");
    return store;
  }

  // node_modules/@ariakit/core/esm/__chunks/RVTIKFRL.js
  var NULL_ITEM2 = { id: null };
  function findFirstEnabledItem2(items, excludeId) {
    return items.find((item2) => {
      if (excludeId) {
        return !item2.disabled && item2.id !== excludeId;
      }
      return !item2.disabled;
    });
  }
  function getEnabledItems(items, excludeId) {
    return items.filter((item2) => {
      if (excludeId) {
        return !item2.disabled && item2.id !== excludeId;
      }
      return !item2.disabled;
    });
  }
  function getItemsInRow(items, rowId) {
    return items.filter((item2) => item2.rowId === rowId);
  }
  function flipItems2(items, activeId, shouldInsertNullItem = false) {
    const index2 = items.findIndex((item2) => item2.id === activeId);
    return [
      ...items.slice(index2 + 1),
      ...shouldInsertNullItem ? [NULL_ITEM2] : [],
      ...items.slice(0, index2)
    ];
  }
  function groupItemsByRows2(items) {
    const rows = [];
    for (const item2 of items) {
      const row = rows.find((currentRow) => {
        var _a;
        return ((_a = currentRow[0]) == null ? void 0 : _a.rowId) === item2.rowId;
      });
      if (row) {
        row.push(item2);
      } else {
        rows.push([item2]);
      }
    }
    return rows;
  }
  function getMaxRowLength(array) {
    let maxLength = 0;
    for (const { length: length2 } of array) {
      if (length2 > maxLength) {
        maxLength = length2;
      }
    }
    return maxLength;
  }
  function createEmptyItem(rowId) {
    return {
      id: "__EMPTY_ITEM__",
      disabled: true,
      rowId
    };
  }
  function normalizeRows(rows, activeId, focusShift) {
    const maxLength = getMaxRowLength(rows);
    for (const row of rows) {
      for (let i3 = 0; i3 < maxLength; i3 += 1) {
        const item2 = row[i3];
        if (!item2 || focusShift && item2.disabled) {
          const isFirst = i3 === 0;
          const previousItem = isFirst && focusShift ? findFirstEnabledItem2(row) : row[i3 - 1];
          row[i3] = previousItem && activeId !== previousItem.id && focusShift ? previousItem : createEmptyItem(previousItem == null ? void 0 : previousItem.rowId);
        }
      }
    }
    return rows;
  }
  function verticalizeItems(items) {
    const rows = groupItemsByRows2(items);
    const maxLength = getMaxRowLength(rows);
    const verticalized = [];
    for (let i3 = 0; i3 < maxLength; i3 += 1) {
      for (const row of rows) {
        const item2 = row[i3];
        if (item2) {
          verticalized.push({
            ...item2,
            // If there's no rowId, it means that it's not a grid composite, but
            // a single row instead. So, instead of verticalizing it, that is,
            // assigning a different rowId based on the column index, we keep it
            // undefined so they will be part of the same row. This is useful
            // when using up/down on one-dimensional composites.
            rowId: item2.rowId ? `${i3}` : void 0
          });
        }
      }
    }
    return verticalized;
  }
  function createCompositeStore(props = {}) {
    var _a;
    const syncState = (_a = props.store) == null ? void 0 : _a.getState();
    const collection = createCollectionStore(props);
    const activeId = defaultValue(
      props.activeId,
      syncState == null ? void 0 : syncState.activeId,
      props.defaultActiveId
    );
    const initialState = {
      ...collection.getState(),
      id: defaultValue(
        props.id,
        syncState == null ? void 0 : syncState.id,
        `id-${Math.random().toString(36).slice(2, 8)}`
      ),
      activeId,
      baseElement: defaultValue(syncState == null ? void 0 : syncState.baseElement, null),
      includesBaseElement: defaultValue(
        props.includesBaseElement,
        syncState == null ? void 0 : syncState.includesBaseElement,
        activeId === null
      ),
      moves: defaultValue(syncState == null ? void 0 : syncState.moves, 0),
      orientation: defaultValue(
        props.orientation,
        syncState == null ? void 0 : syncState.orientation,
        "both"
      ),
      rtl: defaultValue(props.rtl, syncState == null ? void 0 : syncState.rtl, false),
      virtualFocus: defaultValue(
        props.virtualFocus,
        syncState == null ? void 0 : syncState.virtualFocus,
        false
      ),
      focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, false),
      focusWrap: defaultValue(props.focusWrap, syncState == null ? void 0 : syncState.focusWrap, false),
      focusShift: defaultValue(props.focusShift, syncState == null ? void 0 : syncState.focusShift, false)
    };
    const composite = createStore(initialState, collection, props.store);
    setup(
      composite,
      () => sync(composite, ["renderedItems", "activeId"], (state) => {
        composite.setState("activeId", (activeId2) => {
          var _a2;
          if (activeId2 !== void 0) return activeId2;
          return (_a2 = findFirstEnabledItem2(state.renderedItems)) == null ? void 0 : _a2.id;
        });
      })
    );
    const getNextId = (direction = "next", options2 = {}) => {
      var _a2, _b;
      const defaultState = composite.getState();
      const {
        skip = 0,
        activeId: activeId2 = defaultState.activeId,
        focusShift = defaultState.focusShift,
        focusLoop = defaultState.focusLoop,
        focusWrap = defaultState.focusWrap,
        includesBaseElement = defaultState.includesBaseElement,
        renderedItems = defaultState.renderedItems,
        rtl: rtl2 = defaultState.rtl
      } = options2;
      const isVerticalDirection = direction === "up" || direction === "down";
      const isNextDirection = direction === "next" || direction === "down";
      const canReverse = isNextDirection ? rtl2 && !isVerticalDirection : !rtl2 || isVerticalDirection;
      const canShift = focusShift && !skip;
      let items = !isVerticalDirection ? renderedItems : flatten2DArray(
        normalizeRows(groupItemsByRows2(renderedItems), activeId2, canShift)
      );
      items = canReverse ? reverseArray(items) : items;
      items = isVerticalDirection ? verticalizeItems(items) : items;
      if (activeId2 == null) {
        return (_a2 = findFirstEnabledItem2(items)) == null ? void 0 : _a2.id;
      }
      const activeItem = items.find((item2) => item2.id === activeId2);
      if (!activeItem) {
        return (_b = findFirstEnabledItem2(items)) == null ? void 0 : _b.id;
      }
      const isGrid2 = items.some((item2) => item2.rowId);
      const activeIndex = items.indexOf(activeItem);
      const nextItems = items.slice(activeIndex + 1);
      const nextItemsInRow = getItemsInRow(nextItems, activeItem.rowId);
      if (skip) {
        const nextEnabledItemsInRow = getEnabledItems(nextItemsInRow, activeId2);
        const nextItem2 = nextEnabledItemsInRow.slice(skip)[0] || // If we can't find an item, just return the last one.
        nextEnabledItemsInRow[nextEnabledItemsInRow.length - 1];
        return nextItem2 == null ? void 0 : nextItem2.id;
      }
      const canLoop = focusLoop && (isVerticalDirection ? focusLoop !== "horizontal" : focusLoop !== "vertical");
      const canWrap = isGrid2 && focusWrap && (isVerticalDirection ? focusWrap !== "horizontal" : focusWrap !== "vertical");
      const hasNullItem = isNextDirection ? (!isGrid2 || isVerticalDirection) && canLoop && includesBaseElement : isVerticalDirection ? includesBaseElement : false;
      if (canLoop) {
        const loopItems = canWrap && !hasNullItem ? items : getItemsInRow(items, activeItem.rowId);
        const sortedItems = flipItems2(loopItems, activeId2, hasNullItem);
        const nextItem2 = findFirstEnabledItem2(sortedItems, activeId2);
        return nextItem2 == null ? void 0 : nextItem2.id;
      }
      if (canWrap) {
        const nextItem2 = findFirstEnabledItem2(
          // We can use nextItems, which contains all the next items, including
          // items from other rows, to wrap between rows. However, if there is a
          // null item (the composite container), we'll only use the next items in
          // the row. So moving next from the last item will focus on the
          // composite container. On grid composites, horizontal navigation never
          // focuses on the composite container, only vertical.
          hasNullItem ? nextItemsInRow : nextItems,
          activeId2
        );
        const nextId = hasNullItem ? (nextItem2 == null ? void 0 : nextItem2.id) || null : nextItem2 == null ? void 0 : nextItem2.id;
        return nextId;
      }
      const nextItem = findFirstEnabledItem2(nextItemsInRow, activeId2);
      if (!nextItem && hasNullItem) {
        return null;
      }
      return nextItem == null ? void 0 : nextItem.id;
    };
    return {
      ...collection,
      ...composite,
      setBaseElement: (element) => composite.setState("baseElement", element),
      setActiveId: (id3) => composite.setState("activeId", id3),
      move: (id3) => {
        if (id3 === void 0) return;
        composite.setState("activeId", id3);
        composite.setState("moves", (moves) => moves + 1);
      },
      first: () => {
        var _a2;
        return (_a2 = findFirstEnabledItem2(composite.getState().renderedItems)) == null ? void 0 : _a2.id;
      },
      last: () => {
        var _a2;
        return (_a2 = findFirstEnabledItem2(reverseArray(composite.getState().renderedItems))) == null ? void 0 : _a2.id;
      },
      next: (options2) => {
        if (options2 !== void 0 && typeof options2 === "number") {
          options2 = { skip: options2 };
        }
        return getNextId("next", options2);
      },
      previous: (options2) => {
        if (options2 !== void 0 && typeof options2 === "number") {
          options2 = { skip: options2 };
        }
        return getNextId("previous", options2);
      },
      down: (options2) => {
        if (options2 !== void 0 && typeof options2 === "number") {
          options2 = { skip: options2 };
        }
        return getNextId("down", options2);
      },
      up: (options2) => {
        if (options2 !== void 0 && typeof options2 === "number") {
          options2 = { skip: options2 };
        }
        return getNextId("up", options2);
      }
    };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/IQYAUKXT.js
  function useCompositeStoreOptions(props) {
    const id3 = useId(props.id);
    return { id: id3, ...props };
  }
  function useCompositeStoreProps(store, update, props) {
    store = useCollectionStoreProps(store, update, props);
    useStoreProps(store, props, "activeId", "setActiveId");
    useStoreProps(store, props, "includesBaseElement");
    useStoreProps(store, props, "virtualFocus");
    useStoreProps(store, props, "orientation");
    useStoreProps(store, props, "rtl");
    useStoreProps(store, props, "focusLoop");
    useStoreProps(store, props, "focusWrap");
    useStoreProps(store, props, "focusShift");
    return store;
  }
  function useCompositeStore(props = {}) {
    props = useCompositeStoreOptions(props);
    const [store, update] = useStore(createCompositeStore, props);
    return useCompositeStoreProps(store, update, props);
  }

  // node_modules/@ariakit/react-core/esm/__chunks/CVCFNOHX.js
  var import_react15 = __toESM(require_react(), 1);
  var ComboboxListRoleContext = (0, import_react15.createContext)(
    void 0
  );
  var ctx8 = createStoreContext(
    [PopoverContextProvider, CompositeContextProvider],
    [PopoverScopedContextProvider, CompositeScopedContextProvider]
  );
  var useComboboxContext = ctx8.useContext;
  var useComboboxScopedContext = ctx8.useScopedContext;
  var useComboboxProviderContext = ctx8.useProviderContext;
  var ComboboxContextProvider = ctx8.ContextProvider;
  var ComboboxScopedContextProvider = ctx8.ScopedContextProvider;
  var ComboboxItemValueContext = (0, import_react15.createContext)(
    void 0
  );
  var ComboboxItemCheckedContext = (0, import_react15.createContext)(false);

  // node_modules/@ariakit/core/esm/tab/tab-store.js
  function createTabStore({
    composite: parentComposite,
    combobox,
    ...props
  } = {}) {
    const independentKeys = [
      "items",
      "renderedItems",
      "moves",
      "orientation",
      "virtualFocus",
      "includesBaseElement",
      "baseElement",
      "focusLoop",
      "focusShift",
      "focusWrap"
    ];
    const store = mergeStore(
      props.store,
      omit2(parentComposite, independentKeys),
      omit2(combobox, independentKeys)
    );
    const syncState = store == null ? void 0 : store.getState();
    const composite = createCompositeStore({
      ...props,
      store,
      // We need to explicitly set the default value of `includesBaseElement` to
      // `false` since we don't want the composite store to default it to `true`
      // when the activeId state is null, which could be the case when rendering
      // combobox with tab.
      includesBaseElement: defaultValue(
        props.includesBaseElement,
        syncState == null ? void 0 : syncState.includesBaseElement,
        false
      ),
      orientation: defaultValue(
        props.orientation,
        syncState == null ? void 0 : syncState.orientation,
        "horizontal"
      ),
      focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
    });
    const panels = createCollectionStore();
    const initialState = {
      ...composite.getState(),
      selectedId: defaultValue(
        props.selectedId,
        syncState == null ? void 0 : syncState.selectedId,
        props.defaultSelectedId
      ),
      selectOnMove: defaultValue(
        props.selectOnMove,
        syncState == null ? void 0 : syncState.selectOnMove,
        true
      )
    };
    const tab = createStore(initialState, composite, store);
    setup(
      tab,
      () => sync(tab, ["moves"], () => {
        const { activeId, selectOnMove } = tab.getState();
        if (!selectOnMove) return;
        if (!activeId) return;
        const tabItem = composite.item(activeId);
        if (!tabItem) return;
        if (tabItem.dimmed) return;
        if (tabItem.disabled) return;
        tab.setState("selectedId", tabItem.id);
      })
    );
    let syncActiveId = true;
    setup(
      tab,
      () => batch(tab, ["selectedId"], (state, prev2) => {
        if (!syncActiveId) {
          syncActiveId = true;
          return;
        }
        if (parentComposite && state.selectedId === prev2.selectedId) return;
        tab.setState("activeId", state.selectedId);
      })
    );
    setup(
      tab,
      () => sync(tab, ["selectedId", "renderedItems"], (state) => {
        if (state.selectedId !== void 0) return;
        const { activeId, renderedItems } = tab.getState();
        const tabItem = composite.item(activeId);
        if (tabItem && !tabItem.disabled && !tabItem.dimmed) {
          tab.setState("selectedId", tabItem.id);
        } else {
          const tabItem2 = renderedItems.find(
            (item2) => !item2.disabled && !item2.dimmed
          );
          tab.setState("selectedId", tabItem2 == null ? void 0 : tabItem2.id);
        }
      })
    );
    setup(
      tab,
      () => sync(tab, ["renderedItems"], (state) => {
        const tabs = state.renderedItems;
        if (!tabs.length) return;
        return sync(panels, ["renderedItems"], (state2) => {
          const items = state2.renderedItems;
          const hasOrphanPanels = items.some((panel) => !panel.tabId);
          if (!hasOrphanPanels) return;
          items.forEach((panel, i3) => {
            if (panel.tabId) return;
            const tabItem = tabs[i3];
            if (!tabItem) return;
            panels.renderItem({ ...panel, tabId: tabItem.id });
          });
        });
      })
    );
    let selectedIdFromSelectedValue = null;
    setup(tab, () => {
      const backupSelectedId = () => {
        selectedIdFromSelectedValue = tab.getState().selectedId;
      };
      const restoreSelectedId = () => {
        syncActiveId = false;
        tab.setState("selectedId", selectedIdFromSelectedValue);
      };
      if (parentComposite && "setSelectElement" in parentComposite) {
        return chain(
          sync(parentComposite, ["value"], backupSelectedId),
          sync(parentComposite, ["mounted"], restoreSelectedId)
        );
      }
      if (!combobox) return;
      return chain(
        sync(combobox, ["selectedValue"], backupSelectedId),
        sync(combobox, ["mounted"], restoreSelectedId)
      );
    });
    return {
      ...composite,
      ...tab,
      panels,
      setSelectedId: (id3) => tab.setState("selectedId", id3),
      select: (id3) => {
        tab.setState("selectedId", id3);
        composite.move(id3);
      }
    };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/OJYI6SUJ.js
  var import_react16 = __toESM(require_react(), 1);
  function useTabStoreProps(store, update, props) {
    useUpdateEffect(update, [props.composite, props.combobox]);
    store = useCompositeStoreProps(store, update, props);
    useStoreProps(store, props, "selectedId", "setSelectedId");
    useStoreProps(store, props, "selectOnMove");
    const [panels, updatePanels] = useStore(() => store.panels, {});
    useUpdateEffect(updatePanels, [store, updatePanels]);
    return Object.assign(
      (0, import_react16.useMemo)(() => ({ ...store, panels }), [store, panels]),
      { composite: props.composite, combobox: props.combobox }
    );
  }
  function useTabStore(props = {}) {
    const combobox = useComboboxContext();
    const composite = useSelectContext() || combobox;
    props = {
      ...props,
      composite: props.composite !== void 0 ? props.composite : composite,
      combobox: props.combobox !== void 0 ? props.combobox : combobox
    };
    const [store, update] = useStore(createTabStore, props);
    return useTabStoreProps(store, update, props);
  }

  // node_modules/@ariakit/core/esm/toolbar/toolbar-store.js
  function createToolbarStore(props = {}) {
    var _a;
    const syncState = (_a = props.store) == null ? void 0 : _a.getState();
    return createCompositeStore({
      ...props,
      orientation: defaultValue(
        props.orientation,
        syncState == null ? void 0 : syncState.orientation,
        "horizontal"
      ),
      focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
    });
  }

  // node_modules/@ariakit/react-core/esm/__chunks/5WUV565P.js
  function useToolbarStoreProps(store, update, props) {
    return useCompositeStoreProps(store, update, props);
  }
  function useToolbarStore(props = {}) {
    const [store, update] = useStore(createToolbarStore, props);
    return useToolbarStoreProps(store, update, props);
  }

  // node_modules/@ariakit/react-core/esm/__chunks/WZDDDI4V.js
  var ctx9 = createStoreContext(
    [CompositeContextProvider],
    [CompositeScopedContextProvider]
  );
  var useToolbarContext = ctx9.useContext;
  var useToolbarScopedContext = ctx9.useScopedContext;
  var useToolbarProviderContext = ctx9.useProviderContext;
  var ToolbarContextProvider = ctx9.ContextProvider;
  var ToolbarScopedContextProvider = ctx9.ScopedContextProvider;

  // node_modules/@ariakit/react-core/esm/toolbar/toolbar.js
  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
  var TagName10 = "div";
  var useToolbar = createHook(
    function useToolbar2({
      store: storeProp,
      orientation: orientationProp,
      virtualFocus,
      focusLoop,
      rtl: rtl2,
      ...props
    }) {
      const context = useToolbarProviderContext();
      storeProp = storeProp || context;
      const store = useToolbarStore({
        store: storeProp,
        orientation: orientationProp,
        virtualFocus,
        focusLoop,
        rtl: rtl2
      });
      const orientation = store.useState(
        (state) => state.orientation === "both" ? void 0 : state.orientation
      );
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ToolbarScopedContextProvider, { value: store, children: element }),
        [store]
      );
      props = {
        role: "toolbar",
        "aria-orientation": orientation,
        ...props
      };
      props = useComposite({ store, ...props });
      return props;
    }
  );
  var Toolbar = forwardRef2(function Toolbar2(props) {
    const htmlProps = useToolbar(props);
    return createElement(TagName10, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/HSU7H6PW.js
  var TagName11 = "button";
  var useToolbarItem = createHook(
    function useToolbarItem2({ store, ...props }) {
      const context = useToolbarContext();
      store = store || context;
      props = useCompositeItem({ store, ...props });
      return props;
    }
  );
  var ToolbarItem = memo2(
    forwardRef2(function ToolbarItem2(props) {
      const htmlProps = useToolbarItem(props);
      return createElement(TagName11, htmlProps);
    })
  );

  // node_modules/@ariakit/react-core/esm/__chunks/P7VC6T3R.js
  var TagName12 = "hr";
  var useSeparator = createHook(
    function useSeparator2({ orientation = "horizontal", ...props }) {
      props = {
        role: "separator",
        "aria-orientation": orientation,
        ...props
      };
      return props;
    }
  );
  var Separator = forwardRef2(function Separator2(props) {
    const htmlProps = useSeparator(props);
    return createElement(TagName12, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/YBRT277Q.js
  var TagName13 = "hr";
  var useCompositeSeparator = createHook(function useCompositeSeparator2({ store, ...props }) {
    const context = useCompositeContext();
    store = store || context;
    invariant(
      store,
      "CompositeSeparator must be wrapped in a Composite component."
    );
    const orientation = store.useState(
      (state) => state.orientation === "horizontal" ? "vertical" : "horizontal"
    );
    props = useSeparator({ ...props, orientation });
    return props;
  });
  var CompositeSeparator = forwardRef2(function CompositeSeparator2(props) {
    const htmlProps = useCompositeSeparator(props);
    return createElement(TagName13, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/PTRWAQFT.js
  var ctx10 = createStoreContext(
    [PopoverContextProvider],
    [PopoverScopedContextProvider]
  );
  var useHovercardContext = ctx10.useContext;
  var useHovercardScopedContext = ctx10.useScopedContext;
  var useHovercardProviderContext = ctx10.useProviderContext;
  var HovercardContextProvider = ctx10.ContextProvider;
  var HovercardScopedContextProvider = ctx10.ScopedContextProvider;

  // node_modules/@ariakit/react-core/esm/__chunks/UZXQ5DX3.js
  var ctx11 = createStoreContext(
    [HovercardContextProvider],
    [HovercardScopedContextProvider]
  );
  var useTooltipContext = ctx11.useContext;
  var useTooltipScopedContext = ctx11.useScopedContext;
  var useTooltipProviderContext = ctx11.useProviderContext;
  var TooltipContextProvider = ctx11.ContextProvider;
  var TooltipScopedContextProvider = ctx11.ScopedContextProvider;

  // node_modules/@ariakit/react-core/esm/__chunks/X7QOZUD3.js
  function getEventPoint(event) {
    return [event.clientX, event.clientY];
  }
  function isPointInPolygon(point, polygon) {
    const [x2, y3] = point;
    let inside = false;
    const length2 = polygon.length;
    for (let l3 = length2, i3 = 0, j2 = l3 - 1; i3 < l3; j2 = i3++) {
      const [xi, yi] = polygon[i3];
      const [xj, yj] = polygon[j2];
      const [, vy] = polygon[j2 === 0 ? l3 - 1 : j2 - 1] || [0, 0];
      const where = (yi - yj) * (x2 - xi) - (xi - xj) * (y3 - yi);
      if (yj < yi) {
        if (y3 >= yj && y3 < yi) {
          if (where === 0) return true;
          if (where > 0) {
            if (y3 === yj) {
              if (y3 > vy) {
                inside = !inside;
              }
            } else {
              inside = !inside;
            }
          }
        }
      } else if (yi < yj) {
        if (y3 > yi && y3 <= yj) {
          if (where === 0) return true;
          if (where < 0) {
            if (y3 === yj) {
              if (y3 < vy) {
                inside = !inside;
              }
            } else {
              inside = !inside;
            }
          }
        }
      } else if (y3 === yi && (x2 >= xj && x2 <= xi || x2 >= xi && x2 <= xj)) {
        return true;
      }
    }
    return inside;
  }
  function getEnterPointPlacement(enterPoint, rect) {
    const { top, right, bottom, left } = rect;
    const [x2, y3] = enterPoint;
    const placementX = x2 < left ? "left" : x2 > right ? "right" : null;
    const placementY = y3 < top ? "top" : y3 > bottom ? "bottom" : null;
    return [placementX, placementY];
  }
  function getElementPolygon(element, enterPoint) {
    const rect = element.getBoundingClientRect();
    const { top, right, bottom, left } = rect;
    const [x2, y3] = getEnterPointPlacement(enterPoint, rect);
    const polygon = [enterPoint];
    if (x2) {
      if (y3 !== "top") {
        polygon.push([x2 === "left" ? left : right, top]);
      }
      polygon.push([x2 === "left" ? right : left, top]);
      polygon.push([x2 === "left" ? right : left, bottom]);
      if (y3 !== "bottom") {
        polygon.push([x2 === "left" ? left : right, bottom]);
      }
    } else if (y3 === "top") {
      polygon.push([left, top]);
      polygon.push([left, bottom]);
      polygon.push([right, bottom]);
      polygon.push([right, top]);
    } else {
      polygon.push([left, bottom]);
      polygon.push([left, top]);
      polygon.push([right, top]);
      polygon.push([right, bottom]);
    }
    return polygon;
  }

  // node_modules/@ariakit/react-core/esm/__chunks/AOQQTIBO.js
  var import_react17 = __toESM(require_react(), 1);
  var PortalContext = (0, import_react17.createContext)(null);

  // node_modules/@ariakit/react-core/esm/__chunks/2F57YTN4.js
  var TagName14 = "span";
  var useVisuallyHidden = createHook(
    function useVisuallyHidden2(props) {
      props = {
        ...props,
        style: {
          border: 0,
          clip: "rect(0 0 0 0)",
          height: "1px",
          margin: "-1px",
          overflow: "hidden",
          padding: 0,
          position: "absolute",
          whiteSpace: "nowrap",
          width: "1px",
          ...props.style
        }
      };
      return props;
    }
  );
  var VisuallyHidden = forwardRef2(function VisuallyHidden2(props) {
    const htmlProps = useVisuallyHidden(props);
    return createElement(TagName14, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/BFOIJXK2.js
  var TagName15 = "span";
  var useFocusTrap = createHook(
    function useFocusTrap2(props) {
      props = {
        "data-focus-trap": "",
        tabIndex: 0,
        "aria-hidden": true,
        ...props,
        style: {
          // Prevents unintended scroll jumps.
          position: "fixed",
          top: 0,
          left: 0,
          ...props.style
        }
      };
      props = useVisuallyHidden(props);
      return props;
    }
  );
  var FocusTrap = forwardRef2(function FocusTrap2(props) {
    const htmlProps = useFocusTrap(props);
    return createElement(TagName15, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/VJH3F6TN.js
  var import_react18 = __toESM(require_react(), 1);
  var import_react_dom2 = __toESM(require_react_dom(), 1);
  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
  var TagName16 = "div";
  function getRootElement(element) {
    return getDocument(element).body;
  }
  function getPortalElement(element, portalElement) {
    if (!portalElement) {
      return getDocument(element).createElement("div");
    }
    if (typeof portalElement === "function") {
      return portalElement(element);
    }
    return portalElement;
  }
  function getRandomId(prefix2 = "id") {
    return `${prefix2 ? `${prefix2}-` : ""}${Math.random().toString(36).slice(2, 8)}`;
  }
  function queueFocus(element) {
    queueMicrotask(() => {
      element == null ? void 0 : element.focus();
    });
  }
  var usePortal = createHook(function usePortal2({
    preserveTabOrder,
    preserveTabOrderAnchor,
    portalElement,
    portalRef,
    portal = true,
    ...props
  }) {
    const ref = (0, import_react18.useRef)(null);
    const refProp = useMergeRefs(ref, props.ref);
    const context = (0, import_react18.useContext)(PortalContext);
    const [portalNode, setPortalNode] = (0, import_react18.useState)(null);
    const [anchorPortalNode, setAnchorPortalNode] = (0, import_react18.useState)(
      null
    );
    const outerBeforeRef = (0, import_react18.useRef)(null);
    const innerBeforeRef = (0, import_react18.useRef)(null);
    const innerAfterRef = (0, import_react18.useRef)(null);
    const outerAfterRef = (0, import_react18.useRef)(null);
    useSafeLayoutEffect(() => {
      const element = ref.current;
      if (!element || !portal) {
        setPortalNode(null);
        return;
      }
      const portalEl = getPortalElement(element, portalElement);
      if (!portalEl) {
        setPortalNode(null);
        return;
      }
      const isPortalInDocument = portalEl.isConnected;
      if (!isPortalInDocument) {
        const rootElement = context || getRootElement(element);
        rootElement.appendChild(portalEl);
      }
      if (!portalEl.id) {
        portalEl.id = element.id ? `portal/${element.id}` : getRandomId();
      }
      setPortalNode(portalEl);
      setRef(portalRef, portalEl);
      if (isPortalInDocument) return;
      return () => {
        portalEl.remove();
        setRef(portalRef, null);
      };
    }, [portal, portalElement, context, portalRef]);
    useSafeLayoutEffect(() => {
      if (!portal) return;
      if (!preserveTabOrder) return;
      if (!preserveTabOrderAnchor) return;
      const doc = getDocument(preserveTabOrderAnchor);
      const element = doc.createElement("span");
      element.style.position = "fixed";
      preserveTabOrderAnchor.insertAdjacentElement("afterend", element);
      setAnchorPortalNode(element);
      return () => {
        element.remove();
        setAnchorPortalNode(null);
      };
    }, [portal, preserveTabOrder, preserveTabOrderAnchor]);
    (0, import_react18.useEffect)(() => {
      if (!portalNode) return;
      if (!preserveTabOrder) return;
      let raf = 0;
      const onFocus = (event) => {
        if (!isFocusEventOutside(event)) return;
        const focusing = event.type === "focusin";
        cancelAnimationFrame(raf);
        if (focusing) {
          return restoreFocusIn(portalNode);
        }
        raf = requestAnimationFrame(() => {
          disableFocusIn(portalNode, true);
        });
      };
      portalNode.addEventListener("focusin", onFocus, true);
      portalNode.addEventListener("focusout", onFocus, true);
      return () => {
        cancelAnimationFrame(raf);
        portalNode.removeEventListener("focusin", onFocus, true);
        portalNode.removeEventListener("focusout", onFocus, true);
      };
    }, [portalNode, preserveTabOrder]);
    props = useWrapElement(
      props,
      (element) => {
        element = // While the portal node is not in the DOM, we need to pass the
        // current context to the portal context, otherwise it's going to
        // reset to the body element on nested portals.
        /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(PortalContext.Provider, { value: portalNode || context, children: element });
        if (!portal) return element;
        if (!portalNode) {
          return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
            "span",
            {
              ref: refProp,
              id: props.id,
              style: { position: "fixed" },
              hidden: true
            }
          );
        }
        element = /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
          preserveTabOrder && portalNode && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
            FocusTrap,
            {
              ref: innerBeforeRef,
              "data-focus-trap": props.id,
              className: "__focus-trap-inner-before",
              onFocus: (event) => {
                if (isFocusEventOutside(event, portalNode)) {
                  queueFocus(getNextTabbable());
                } else {
                  queueFocus(outerBeforeRef.current);
                }
              }
            }
          ),
          element,
          preserveTabOrder && portalNode && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
            FocusTrap,
            {
              ref: innerAfterRef,
              "data-focus-trap": props.id,
              className: "__focus-trap-inner-after",
              onFocus: (event) => {
                if (isFocusEventOutside(event, portalNode)) {
                  queueFocus(getPreviousTabbable());
                } else {
                  queueFocus(outerAfterRef.current);
                }
              }
            }
          )
        ] });
        if (portalNode) {
          element = (0, import_react_dom2.createPortal)(element, portalNode);
        }
        let preserveTabOrderElement = /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
          preserveTabOrder && portalNode && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
            FocusTrap,
            {
              ref: outerBeforeRef,
              "data-focus-trap": props.id,
              className: "__focus-trap-outer-before",
              onFocus: (event) => {
                const fromOuter = event.relatedTarget === outerAfterRef.current;
                if (!fromOuter && isFocusEventOutside(event, portalNode)) {
                  queueFocus(innerBeforeRef.current);
                } else {
                  queueFocus(getPreviousTabbable());
                }
              }
            }
          ),
          preserveTabOrder && // We're using position: fixed here so that the browser doesn't
          // add margin to the element when setting gap on a parent element.
          /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { "aria-owns": portalNode == null ? void 0 : portalNode.id, style: { position: "fixed" } }),
          preserveTabOrder && portalNode && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
            FocusTrap,
            {
              ref: outerAfterRef,
              "data-focus-trap": props.id,
              className: "__focus-trap-outer-after",
              onFocus: (event) => {
                if (isFocusEventOutside(event, portalNode)) {
                  queueFocus(innerAfterRef.current);
                } else {
                  const nextTabbable = getNextTabbable();
                  if (nextTabbable === innerBeforeRef.current) {
                    requestAnimationFrame(() => {
                      var _a;
                      return (_a = getNextTabbable()) == null ? void 0 : _a.focus();
                    });
                    return;
                  }
                  queueFocus(nextTabbable);
                }
              }
            }
          )
        ] });
        if (anchorPortalNode && preserveTabOrder) {
          preserveTabOrderElement = (0, import_react_dom2.createPortal)(
            preserveTabOrderElement,
            anchorPortalNode
          );
        }
        return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
          preserveTabOrderElement,
          element
        ] });
      },
      [portalNode, context, portal, props.id, preserveTabOrder, anchorPortalNode]
    );
    props = {
      ...props,
      ref: refProp
    };
    return props;
  });
  var Portal = forwardRef2(function Portal2(props) {
    const htmlProps = usePortal(props);
    return createElement(TagName16, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/CZ4GFWYL.js
  var import_react19 = __toESM(require_react(), 1);
  var HeadingContext = (0, import_react19.createContext)(0);

  // node_modules/@ariakit/react-core/esm/__chunks/5M6RIVE2.js
  var import_react20 = __toESM(require_react(), 1);
  var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
  function HeadingLevel({ level, children }) {
    const contextLevel = (0, import_react20.useContext)(HeadingContext);
    const nextLevel = Math.max(
      Math.min(level || contextLevel + 1, 6),
      1
    );
    return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(HeadingContext.Provider, { value: nextLevel, children });
  }

  // node_modules/@ariakit/react-core/esm/__chunks/3HM4TGWW.js
  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
  var TagName17 = "div";
  var useFocusableContainer = createHook(function useFocusableContainer2({ autoFocusOnShow = true, ...props }) {
    props = useWrapElement(
      props,
      (element) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(FocusableContext.Provider, { value: autoFocusOnShow, children: element }),
      [autoFocusOnShow]
    );
    return props;
  });
  var FocusableContainer = forwardRef2(function FocusableContainer2(props) {
    const htmlProps = useFocusableContainer(props);
    return createElement(TagName17, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/6GXEOXGT.js
  function prependHiddenDismiss(container, onClick) {
    const document2 = getDocument(container);
    const button = document2.createElement("button");
    button.type = "button";
    button.tabIndex = -1;
    button.textContent = "Dismiss popup";
    Object.assign(button.style, {
      border: "0px",
      clip: "rect(0 0 0 0)",
      height: "1px",
      margin: "-1px",
      overflow: "hidden",
      padding: "0px",
      position: "absolute",
      whiteSpace: "nowrap",
      width: "1px"
    });
    button.addEventListener("click", onClick);
    container.prepend(button);
    const removeHiddenDismiss = () => {
      button.removeEventListener("click", onClick);
      button.remove();
    };
    return removeHiddenDismiss;
  }

  // node_modules/@ariakit/react-core/esm/__chunks/U3R3WHDK.js
  var import_react21 = __toESM(require_react(), 1);
  function usePreviousMouseDownRef(enabled) {
    const previousMouseDownRef = (0, import_react21.useRef)(null);
    (0, import_react21.useEffect)(() => {
      if (!enabled) {
        previousMouseDownRef.current = null;
        return;
      }
      const onMouseDown = (event) => {
        previousMouseDownRef.current = event.target;
      };
      return addGlobalEventListener("mousedown", onMouseDown, true);
    }, [enabled]);
    return previousMouseDownRef;
  }

  // node_modules/@ariakit/react-core/esm/__chunks/K2ZF5NU7.js
  var cleanups = /* @__PURE__ */ new WeakMap();
  function orchestrate(element, key, setup2) {
    if (!cleanups.has(element)) {
      cleanups.set(element, /* @__PURE__ */ new Map());
    }
    const elementCleanups = cleanups.get(element);
    const prevCleanup = elementCleanups.get(key);
    if (!prevCleanup) {
      elementCleanups.set(key, setup2());
      return () => {
        var _a;
        (_a = elementCleanups.get(key)) == null ? void 0 : _a();
        elementCleanups.delete(key);
      };
    }
    const cleanup = setup2();
    const nextCleanup = () => {
      cleanup();
      prevCleanup();
      elementCleanups.delete(key);
    };
    elementCleanups.set(key, nextCleanup);
    return () => {
      const isCurrent = elementCleanups.get(key) === nextCleanup;
      if (!isCurrent) return;
      cleanup();
      elementCleanups.set(key, prevCleanup);
    };
  }
  function setAttribute(element, attr, value) {
    const setup2 = () => {
      const previousValue = element.getAttribute(attr);
      element.setAttribute(attr, value);
      return () => {
        if (previousValue == null) {
          element.removeAttribute(attr);
        } else {
          element.setAttribute(attr, previousValue);
        }
      };
    };
    return orchestrate(element, attr, setup2);
  }
  function setProperty(element, property, value) {
    const setup2 = () => {
      const exists = property in element;
      const previousValue = element[property];
      element[property] = value;
      return () => {
        if (!exists) {
          delete element[property];
        } else {
          element[property] = previousValue;
        }
      };
    };
    return orchestrate(element, property, setup2);
  }
  function assignStyle(element, style2) {
    if (!element) return () => {
    };
    const setup2 = () => {
      const prevStyle = element.style.cssText;
      Object.assign(element.style, style2);
      return () => {
        element.style.cssText = prevStyle;
      };
    };
    return orchestrate(element, "style", setup2);
  }
  function setCSSProperty(element, property, value) {
    if (!element) return () => {
    };
    const setup2 = () => {
      const previousValue = element.style.getPropertyValue(property);
      element.style.setProperty(property, value);
      return () => {
        if (previousValue) {
          element.style.setProperty(property, previousValue);
        } else {
          element.style.removeProperty(property);
        }
      };
    };
    return orchestrate(element, property, setup2);
  }

  // node_modules/@ariakit/react-core/esm/__chunks/AOUGVQZ3.js
  var ignoreTags = ["SCRIPT", "STYLE"];
  function getSnapshotPropertyName(id3) {
    return `__ariakit-dialog-snapshot-${id3}`;
  }
  function inSnapshot(id3, element) {
    const doc = getDocument(element);
    const propertyName = getSnapshotPropertyName(id3);
    if (!doc.body[propertyName]) return true;
    do {
      if (element === doc.body) return false;
      if (element[propertyName]) return true;
      if (!element.parentElement) return false;
      element = element.parentElement;
    } while (true);
  }
  function isValidElement3(id3, element, ignoredElements) {
    if (ignoreTags.includes(element.tagName)) return false;
    if (!inSnapshot(id3, element)) return false;
    return !ignoredElements.some(
      (enabledElement) => enabledElement && contains(element, enabledElement)
    );
  }
  function walkTreeOutside(id3, elements2, callback, ancestorCallback) {
    for (let element of elements2) {
      if (!(element == null ? void 0 : element.isConnected)) continue;
      const hasAncestorAlready = elements2.some((maybeAncestor) => {
        if (!maybeAncestor) return false;
        if (maybeAncestor === element) return false;
        return maybeAncestor.contains(element);
      });
      const doc = getDocument(element);
      const originalElement = element;
      while (element.parentElement && element !== doc.body) {
        ancestorCallback == null ? void 0 : ancestorCallback(element.parentElement, originalElement);
        if (!hasAncestorAlready) {
          for (const child of element.parentElement.children) {
            if (isValidElement3(id3, child, elements2)) {
              callback(child, originalElement);
            }
          }
        }
        element = element.parentElement;
      }
    }
  }
  function createWalkTreeSnapshot(id3, elements2) {
    const { body } = getDocument(elements2[0]);
    const cleanups2 = [];
    const markElement2 = (element) => {
      cleanups2.push(setProperty(element, getSnapshotPropertyName(id3), true));
    };
    walkTreeOutside(id3, elements2, markElement2);
    return chain(setProperty(body, getSnapshotPropertyName(id3), true), () => {
      for (const cleanup of cleanups2) {
        cleanup();
      }
    });
  }

  // node_modules/@ariakit/react-core/esm/__chunks/63XF7ACK.js
  function isBackdrop(element, ...ids) {
    if (!element) return false;
    const backdrop = element.getAttribute("data-backdrop");
    if (backdrop == null) return false;
    if (backdrop === "") return true;
    if (backdrop === "true") return true;
    if (!ids.length) return true;
    return ids.some((id3) => backdrop === id3);
  }

  // node_modules/@ariakit/react-core/esm/__chunks/3NDVDEB4.js
  function getPropertyName(id3 = "", ancestor = false) {
    return `__ariakit-dialog-${ancestor ? "ancestor" : "outside"}${id3 ? `-${id3}` : ""}`;
  }
  function markElement(element, id3 = "") {
    return chain(
      setProperty(element, getPropertyName(), true),
      setProperty(element, getPropertyName(id3), true)
    );
  }
  function markAncestor(element, id3 = "") {
    return chain(
      setProperty(element, getPropertyName("", true), true),
      setProperty(element, getPropertyName(id3, true), true)
    );
  }
  function isElementMarked(element, id3) {
    const ancestorProperty = getPropertyName(id3, true);
    if (element[ancestorProperty]) return true;
    const elementProperty = getPropertyName(id3);
    do {
      if (element[elementProperty]) return true;
      if (!element.parentElement) return false;
      element = element.parentElement;
    } while (true);
  }
  function markTreeOutside(id3, elements2) {
    const cleanups2 = [];
    const ids = elements2.map((el) => el == null ? void 0 : el.id);
    walkTreeOutside(
      id3,
      elements2,
      (element) => {
        if (isBackdrop(element, ...ids)) return;
        cleanups2.unshift(markElement(element, id3));
      },
      (ancestor, element) => {
        const isAnotherDialogAncestor = element.hasAttribute("data-dialog") && element.id !== id3;
        if (isAnotherDialogAncestor) return;
        cleanups2.unshift(markAncestor(ancestor, id3));
      }
    );
    const restoreAccessibilityTree = () => {
      for (const cleanup of cleanups2) {
        cleanup();
      }
    };
    return restoreAccessibilityTree;
  }

  // node_modules/@ariakit/react-core/esm/__chunks/KKITJVHA.js
  var import_react22 = __toESM(require_react(), 1);
  function isInDocument(target) {
    if (target.tagName === "HTML") return true;
    return contains(getDocument(target).body, target);
  }
  function isDisclosure(disclosure, target) {
    if (!disclosure) return false;
    if (contains(disclosure, target)) return true;
    const activeId = target.getAttribute("aria-activedescendant");
    if (activeId) {
      const activeElement = getDocument(disclosure).getElementById(activeId);
      if (activeElement) {
        return contains(disclosure, activeElement);
      }
    }
    return false;
  }
  function isMouseEventOnDialog(event, dialog) {
    if (!("clientY" in event)) return false;
    const rect = dialog.getBoundingClientRect();
    if (rect.width === 0 || rect.height === 0) return false;
    return rect.top <= event.clientY && event.clientY <= rect.top + rect.height && rect.left <= event.clientX && event.clientX <= rect.left + rect.width;
  }
  function useEventOutside({
    store,
    type,
    listener,
    capture,
    domReady
  }) {
    const callListener = useEvent(listener);
    const open = useStoreState(store, "open");
    const focusedRef = (0, import_react22.useRef)(false);
    useSafeLayoutEffect(() => {
      if (!open) return;
      if (!domReady) return;
      const { contentElement } = store.getState();
      if (!contentElement) return;
      const onFocus = () => {
        focusedRef.current = true;
      };
      contentElement.addEventListener("focusin", onFocus, true);
      return () => contentElement.removeEventListener("focusin", onFocus, true);
    }, [store, open, domReady]);
    (0, import_react22.useEffect)(() => {
      if (!open) return;
      const onEvent = (event) => {
        const { contentElement, disclosureElement } = store.getState();
        const target = event.target;
        if (!contentElement) return;
        if (!target) return;
        if (!isInDocument(target)) return;
        if (contains(contentElement, target)) return;
        if (isDisclosure(disclosureElement, target)) return;
        if (target.hasAttribute("data-focus-trap")) return;
        if (isMouseEventOnDialog(event, contentElement)) return;
        const focused = focusedRef.current;
        if (focused && !isElementMarked(target, contentElement.id)) return;
        if (isSafariFocusAncestor(target)) return;
        callListener(event);
      };
      return addGlobalEventListener(type, onEvent, capture);
    }, [open, capture]);
  }
  function shouldHideOnInteractOutside(hideOnInteractOutside, event) {
    if (typeof hideOnInteractOutside === "function") {
      return hideOnInteractOutside(event);
    }
    return !!hideOnInteractOutside;
  }
  function useHideOnInteractOutside(store, hideOnInteractOutside, domReady) {
    const open = useStoreState(store, "open");
    const previousMouseDownRef = usePreviousMouseDownRef(open);
    const props = { store, domReady, capture: true };
    useEventOutside({
      ...props,
      type: "click",
      listener: (event) => {
        const { contentElement } = store.getState();
        const previousMouseDown = previousMouseDownRef.current;
        if (!previousMouseDown) return;
        if (!isVisible(previousMouseDown)) return;
        if (!isElementMarked(previousMouseDown, contentElement == null ? void 0 : contentElement.id)) return;
        if (!shouldHideOnInteractOutside(hideOnInteractOutside, event)) return;
        store.hide();
      }
    });
    useEventOutside({
      ...props,
      type: "focusin",
      listener: (event) => {
        const { contentElement } = store.getState();
        if (!contentElement) return;
        if (event.target === getDocument(contentElement)) return;
        if (!shouldHideOnInteractOutside(hideOnInteractOutside, event)) return;
        store.hide();
      }
    });
    useEventOutside({
      ...props,
      type: "contextmenu",
      listener: (event) => {
        if (!shouldHideOnInteractOutside(hideOnInteractOutside, event)) return;
        store.hide();
      }
    });
  }

  // node_modules/@ariakit/react-core/esm/__chunks/JSI7U3EA.js
  var import_react23 = __toESM(require_react(), 1);
  var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
  var NestedDialogsContext = (0, import_react23.createContext)({});
  function useNestedDialogs(store) {
    const context = (0, import_react23.useContext)(NestedDialogsContext);
    const [dialogs, setDialogs] = (0, import_react23.useState)([]);
    const add2 = (0, import_react23.useCallback)(
      (dialog) => {
        var _a;
        setDialogs((dialogs2) => [...dialogs2, dialog]);
        return chain((_a = context.add) == null ? void 0 : _a.call(context, dialog), () => {
          setDialogs((dialogs2) => dialogs2.filter((d3) => d3 !== dialog));
        });
      },
      [context]
    );
    useSafeLayoutEffect(() => {
      return sync(store, ["open", "contentElement"], (state) => {
        var _a;
        if (!state.open) return;
        if (!state.contentElement) return;
        return (_a = context.add) == null ? void 0 : _a.call(context, store);
      });
    }, [store, context]);
    const providerValue = (0, import_react23.useMemo)(() => ({ store, add: add2 }), [store, add2]);
    const wrapElement = (0, import_react23.useCallback)(
      (element) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(NestedDialogsContext.Provider, { value: providerValue, children: element }),
      [providerValue]
    );
    return { wrapElement, nestedDialogs: dialogs };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/OT5RJDXG.js
  var import_react24 = __toESM(require_react(), 1);
  var import_react_dom3 = __toESM(require_react_dom(), 1);
  function useRootDialog({
    attribute,
    contentId,
    contentElement,
    enabled
  }) {
    const [updated, retry] = useForceUpdate();
    const isRootDialog = (0, import_react24.useCallback)(() => {
      if (!enabled) return false;
      if (!contentElement) return false;
      const { body } = getDocument(contentElement);
      const id3 = body.getAttribute(attribute);
      return !id3 || id3 === contentId;
    }, [updated, enabled, contentElement, attribute, contentId]);
    (0, import_react24.useEffect)(() => {
      if (!enabled) return;
      if (!contentId) return;
      if (!contentElement) return;
      const { body } = getDocument(contentElement);
      if (isRootDialog()) {
        body.setAttribute(attribute, contentId);
        return () => body.removeAttribute(attribute);
      }
      const observer = new MutationObserver(() => (0, import_react_dom3.flushSync)(retry));
      observer.observe(body, { attributeFilter: [attribute] });
      return () => observer.disconnect();
    }, [updated, enabled, contentId, contentElement, isRootDialog, attribute]);
    return isRootDialog;
  }

  // node_modules/@ariakit/react-core/esm/__chunks/B6W4QFKS.js
  var import_react25 = __toESM(require_react(), 1);
  function getPaddingProperty(documentElement) {
    const documentLeft = documentElement.getBoundingClientRect().left;
    const scrollbarX = Math.round(documentLeft) + documentElement.scrollLeft;
    return scrollbarX ? "paddingLeft" : "paddingRight";
  }
  function usePreventBodyScroll(contentElement, contentId, enabled) {
    const isRootDialog = useRootDialog({
      attribute: "data-dialog-prevent-body-scroll",
      contentElement,
      contentId,
      enabled
    });
    (0, import_react25.useEffect)(() => {
      if (!isRootDialog()) return;
      if (!contentElement) return;
      const doc = getDocument(contentElement);
      const win = getWindow(contentElement);
      const { documentElement, body } = doc;
      const cssScrollbarWidth = documentElement.style.getPropertyValue("--scrollbar-width");
      const scrollbarWidth = cssScrollbarWidth ? Number.parseInt(cssScrollbarWidth, 10) : win.innerWidth - documentElement.clientWidth;
      const setScrollbarWidthProperty = () => setCSSProperty(
        documentElement,
        "--scrollbar-width",
        `${scrollbarWidth}px`
      );
      const paddingProperty = getPaddingProperty(documentElement);
      const setStyle = () => assignStyle(body, {
        overflow: "hidden",
        [paddingProperty]: `${scrollbarWidth}px`
      });
      const setIOSStyle = () => {
        var _a, _b;
        const { scrollX: scrollX2, scrollY: scrollY2, visualViewport } = win;
        const offsetLeft = (_a = visualViewport == null ? void 0 : visualViewport.offsetLeft) != null ? _a : 0;
        const offsetTop = (_b = visualViewport == null ? void 0 : visualViewport.offsetTop) != null ? _b : 0;
        const restoreStyle = assignStyle(body, {
          position: "fixed",
          overflow: "hidden",
          top: `${-(scrollY2 - Math.floor(offsetTop))}px`,
          left: `${-(scrollX2 - Math.floor(offsetLeft))}px`,
          right: "0",
          [paddingProperty]: `${scrollbarWidth}px`
        });
        return () => {
          restoreStyle();
          if (true) {
            win.scrollTo({ left: scrollX2, top: scrollY2, behavior: "instant" });
          }
        };
      };
      const isIOS = isApple() && !isMac();
      return chain(
        setScrollbarWidthProperty(),
        isIOS ? setIOSStyle() : setStyle()
      );
    }, [isRootDialog, contentElement]);
  }

  // node_modules/@ariakit/react-core/esm/__chunks/IGR4SXG2.js
  function isFocusTrap(element, ...ids) {
    if (!element) return false;
    const attr = element.getAttribute("data-focus-trap");
    if (attr == null) return false;
    if (!ids.length) return true;
    if (attr === "") return false;
    return ids.some((id3) => attr === id3);
  }

  // node_modules/@ariakit/react-core/esm/__chunks/677M2CI3.js
  function supportsInert() {
    return "inert" in HTMLElement.prototype;
  }

  // node_modules/@ariakit/react-core/esm/__chunks/S7U6BLGA.js
  function hideElementFromAccessibilityTree(element) {
    return setAttribute(element, "aria-hidden", "true");
  }

  // node_modules/@ariakit/react-core/esm/__chunks/Z5GCVBAY.js
  function disableTree(element, ignoredElements) {
    if (!("style" in element)) return noop;
    if (supportsInert()) {
      return setProperty(element, "inert", true);
    }
    const tabbableElements = getAllTabbableIn(element, true);
    const enableElements = tabbableElements.map((element2) => {
      if (ignoredElements == null ? void 0 : ignoredElements.some((el) => el && contains(el, element2))) return noop;
      const restoreFocusMethod = orchestrate(element2, "focus", () => {
        element2.focus = noop;
        return () => {
          delete element2.focus;
        };
      });
      return chain(setAttribute(element2, "tabindex", "-1"), restoreFocusMethod);
    });
    return chain(
      ...enableElements,
      hideElementFromAccessibilityTree(element),
      assignStyle(element, {
        pointerEvents: "none",
        userSelect: "none",
        cursor: "default"
      })
    );
  }
  function disableTreeOutside(id3, elements2) {
    const cleanups2 = [];
    const ids = elements2.map((el) => el == null ? void 0 : el.id);
    walkTreeOutside(
      id3,
      elements2,
      (element) => {
        if (isBackdrop(element, ...ids)) return;
        if (isFocusTrap(element, ...ids)) return;
        cleanups2.unshift(disableTree(element, elements2));
      },
      (element) => {
        if (!element.hasAttribute("role")) return;
        if (elements2.some((el) => el && contains(el, element))) return;
        cleanups2.unshift(setAttribute(element, "role", "none"));
      }
    );
    const restoreTreeOutside = () => {
      for (const cleanup of cleanups2) {
        cleanup();
      }
    };
    return restoreTreeOutside;
  }

  // node_modules/@ariakit/react-core/esm/__chunks/JG4VNI52.js
  var TagName18 = "div";
  var elements = [
    "a",
    "button",
    "details",
    "dialog",
    "div",
    "form",
    "h1",
    "h2",
    "h3",
    "h4",
    "h5",
    "h6",
    "header",
    "img",
    "input",
    "label",
    "li",
    "nav",
    "ol",
    "p",
    "section",
    "select",
    "span",
    "summary",
    "textarea",
    "ul",
    "svg"
  ];
  var useRole = createHook(
    function useRole2(props) {
      return props;
    }
  );
  var Role = forwardRef2(
    // @ts-expect-error
    function Role2(props) {
      return createElement(TagName18, props);
    }
  );
  Object.assign(
    Role,
    elements.reduce((acc, element) => {
      acc[element] = forwardRef2(function Role3(props) {
        return createElement(element, props);
      });
      return acc;
    }, {})
  );

  // node_modules/@ariakit/react-core/esm/__chunks/P45QRJLH.js
  var import_react26 = __toESM(require_react(), 1);
  var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
  function DialogBackdrop({
    store,
    backdrop,
    alwaysVisible,
    hidden
  }) {
    const ref = (0, import_react26.useRef)(null);
    const disclosure = useDisclosureStore({ disclosure: store });
    const contentElement = useStoreState(store, "contentElement");
    (0, import_react26.useEffect)(() => {
      const backdrop2 = ref.current;
      const dialog = contentElement;
      if (!backdrop2) return;
      if (!dialog) return;
      backdrop2.style.zIndex = getComputedStyle(dialog).zIndex;
    }, [contentElement]);
    useSafeLayoutEffect(() => {
      const id3 = contentElement == null ? void 0 : contentElement.id;
      if (!id3) return;
      const backdrop2 = ref.current;
      if (!backdrop2) return;
      return markAncestor(backdrop2, id3);
    }, [contentElement]);
    const props = useDisclosureContent({
      ref,
      store: disclosure,
      role: "presentation",
      "data-backdrop": (contentElement == null ? void 0 : contentElement.id) || "",
      alwaysVisible,
      hidden: hidden != null ? hidden : void 0,
      style: {
        position: "fixed",
        top: 0,
        right: 0,
        bottom: 0,
        left: 0
      }
    });
    if (!backdrop) return null;
    if ((0, import_react26.isValidElement)(backdrop)) {
      return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Role, { ...props, render: backdrop });
    }
    const Component9 = typeof backdrop !== "boolean" ? backdrop : "div";
    return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Role, { ...props, render: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Component9, {}) });
  }

  // node_modules/@ariakit/core/esm/__chunks/KMAUV3TY.js
  function createDialogStore(props = {}) {
    return createDisclosureStore(props);
  }

  // node_modules/@ariakit/react-core/esm/__chunks/4NYSH4UO.js
  function useDialogStoreProps(store, update, props) {
    return useDisclosureStoreProps(store, update, props);
  }
  function useDialogStore(props = {}) {
    const [store, update] = useStore(createDialogStore, props);
    return useDialogStoreProps(store, update, props);
  }

  // node_modules/@ariakit/react-core/esm/__chunks/Z32PU2LQ.js
  var import_react27 = __toESM(require_react(), 1);
  var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
  var TagName19 = "div";
  var isSafariBrowser2 = isSafari();
  function isAlreadyFocusingAnotherElement(dialog) {
    const activeElement = getActiveElement();
    if (!activeElement) return false;
    if (dialog && contains(dialog, activeElement)) return false;
    if (isFocusable(activeElement)) return true;
    return false;
  }
  function getElementFromProp(prop, focusable = false) {
    if (!prop) return null;
    const element = "current" in prop ? prop.current : prop;
    if (!element) return null;
    if (focusable) return isFocusable(element) ? element : null;
    return element;
  }
  var useDialog = createHook(function useDialog2({
    store: storeProp,
    open: openProp,
    onClose,
    focusable = true,
    modal = true,
    portal = !!modal,
    backdrop = !!modal,
    hideOnEscape = true,
    hideOnInteractOutside = true,
    getPersistentElements,
    preventBodyScroll = !!modal,
    autoFocusOnShow = true,
    autoFocusOnHide = true,
    initialFocus,
    finalFocus,
    unmountOnHide,
    unstable_treeSnapshotKey,
    ...props
  }) {
    const context = useDialogProviderContext();
    const ref = (0, import_react27.useRef)(null);
    const store = useDialogStore({
      store: storeProp || context,
      open: openProp,
      setOpen(open2) {
        if (open2) return;
        const dialog = ref.current;
        if (!dialog) return;
        const event = new Event("close", { bubbles: false, cancelable: true });
        if (onClose) {
          dialog.addEventListener("close", onClose, { once: true });
        }
        dialog.dispatchEvent(event);
        if (!event.defaultPrevented) return;
        store.setOpen(true);
      }
    });
    const { portalRef, domReady } = usePortalRef(portal, props.portalRef);
    const preserveTabOrderProp = props.preserveTabOrder;
    const preserveTabOrder = useStoreState(
      store,
      (state) => preserveTabOrderProp && !modal && state.mounted
    );
    const id3 = useId(props.id);
    const open = useStoreState(store, "open");
    const mounted = useStoreState(store, "mounted");
    const contentElement = useStoreState(store, "contentElement");
    const hidden = isHidden(mounted, props.hidden, props.alwaysVisible);
    usePreventBodyScroll(contentElement, id3, preventBodyScroll && !hidden);
    useHideOnInteractOutside(store, hideOnInteractOutside, domReady);
    const { wrapElement, nestedDialogs } = useNestedDialogs(store);
    props = useWrapElement(props, wrapElement, [wrapElement]);
    useSafeLayoutEffect(() => {
      if (!open) return;
      const dialog = ref.current;
      const activeElement = getActiveElement(dialog, true);
      if (!activeElement) return;
      if (activeElement.tagName === "BODY") return;
      if (dialog && contains(dialog, activeElement)) return;
      store.setDisclosureElement(activeElement);
    }, [store, open]);
    if (isSafariBrowser2) {
      (0, import_react27.useEffect)(() => {
        if (!mounted) return;
        const { disclosureElement } = store.getState();
        if (!disclosureElement) return;
        if (!isButton(disclosureElement)) return;
        const onMouseDown = () => {
          let receivedFocus = false;
          const onFocus = () => {
            receivedFocus = true;
          };
          const options2 = { capture: true, once: true };
          disclosureElement.addEventListener("focusin", onFocus, options2);
          queueBeforeEvent(disclosureElement, "mouseup", () => {
            disclosureElement.removeEventListener("focusin", onFocus, true);
            if (receivedFocus) return;
            focusIfNeeded(disclosureElement);
          });
        };
        disclosureElement.addEventListener("mousedown", onMouseDown);
        return () => {
          disclosureElement.removeEventListener("mousedown", onMouseDown);
        };
      }, [store, mounted]);
    }
    (0, import_react27.useEffect)(() => {
      if (!mounted) return;
      if (!domReady) return;
      const dialog = ref.current;
      if (!dialog) return;
      const win = getWindow(dialog);
      const viewport = win.visualViewport || win;
      const setViewportHeight = () => {
        var _a, _b;
        const height = (_b = (_a = win.visualViewport) == null ? void 0 : _a.height) != null ? _b : win.innerHeight;
        dialog.style.setProperty("--dialog-viewport-height", `${height}px`);
      };
      setViewportHeight();
      viewport.addEventListener("resize", setViewportHeight);
      return () => {
        viewport.removeEventListener("resize", setViewportHeight);
      };
    }, [mounted, domReady]);
    (0, import_react27.useEffect)(() => {
      if (!modal) return;
      if (!mounted) return;
      if (!domReady) return;
      const dialog = ref.current;
      if (!dialog) return;
      const existingDismiss = dialog.querySelector("[data-dialog-dismiss]");
      if (existingDismiss) return;
      return prependHiddenDismiss(dialog, store.hide);
    }, [store, modal, mounted, domReady]);
    useSafeLayoutEffect(() => {
      if (!supportsInert()) return;
      if (open) return;
      if (!mounted) return;
      if (!domReady) return;
      const dialog = ref.current;
      if (!dialog) return;
      return disableTree(dialog);
    }, [open, mounted, domReady]);
    const canTakeTreeSnapshot = open && domReady;
    useSafeLayoutEffect(() => {
      if (!id3) return;
      if (!canTakeTreeSnapshot) return;
      const dialog = ref.current;
      return createWalkTreeSnapshot(id3, [dialog]);
    }, [id3, canTakeTreeSnapshot, unstable_treeSnapshotKey]);
    const getPersistentElementsProp = useEvent(getPersistentElements);
    useSafeLayoutEffect(() => {
      if (!id3) return;
      if (!canTakeTreeSnapshot) return;
      const { disclosureElement } = store.getState();
      const dialog = ref.current;
      const persistentElements = getPersistentElementsProp() || [];
      const allElements = [
        dialog,
        ...persistentElements,
        ...nestedDialogs.map((dialog2) => dialog2.getState().contentElement)
      ];
      if (modal) {
        return chain(
          markTreeOutside(id3, allElements),
          disableTreeOutside(id3, allElements)
        );
      }
      return markTreeOutside(id3, [disclosureElement, ...allElements]);
    }, [
      id3,
      store,
      canTakeTreeSnapshot,
      getPersistentElementsProp,
      nestedDialogs,
      modal,
      unstable_treeSnapshotKey
    ]);
    const mayAutoFocusOnShow = !!autoFocusOnShow;
    const autoFocusOnShowProp = useBooleanEvent(autoFocusOnShow);
    const [autoFocusEnabled, setAutoFocusEnabled] = (0, import_react27.useState)(false);
    (0, import_react27.useEffect)(() => {
      if (!open) return;
      if (!mayAutoFocusOnShow) return;
      if (!domReady) return;
      if (!(contentElement == null ? void 0 : contentElement.isConnected)) return;
      const element = getElementFromProp(initialFocus, true) || // If no initial focus is specified, we try to focus the first element
      // with the autofocus attribute. If it's an Ariakit component, the
      // Focusable component will consume the autoFocus prop and add the
      // data-autofocus attribute to the element instead.
      contentElement.querySelector(
        "[data-autofocus=true],[autofocus]"
      ) || // We have to fallback to the first focusable element otherwise portaled
      // dialogs with preserveTabOrder set to true will not receive focus
      // properly because the elements aren't tabbable until the dialog receives
      // focus.
      getFirstTabbableIn(contentElement, true, portal && preserveTabOrder) || // Finally, we fallback to the dialog element itself.
      contentElement;
      const isElementFocusable = isFocusable(element);
      if (!autoFocusOnShowProp(isElementFocusable ? element : null)) return;
      setAutoFocusEnabled(true);
      queueMicrotask(() => {
        element.focus();
        if (!isSafariBrowser2) return;
        if (!isElementFocusable) return;
        element.scrollIntoView({ block: "nearest", inline: "nearest" });
      });
    }, [
      open,
      mayAutoFocusOnShow,
      domReady,
      contentElement,
      initialFocus,
      portal,
      preserveTabOrder,
      autoFocusOnShowProp
    ]);
    const mayAutoFocusOnHide = !!autoFocusOnHide;
    const autoFocusOnHideProp = useBooleanEvent(autoFocusOnHide);
    const [hasOpened, setHasOpened] = (0, import_react27.useState)(false);
    (0, import_react27.useEffect)(() => {
      if (!open) return;
      setHasOpened(true);
      return () => setHasOpened(false);
    }, [open]);
    const focusOnHide = (0, import_react27.useCallback)(
      (dialog, retry = true) => {
        const { disclosureElement } = store.getState();
        if (isAlreadyFocusingAnotherElement(dialog)) return;
        let element = getElementFromProp(finalFocus) || disclosureElement;
        if (element == null ? void 0 : element.id) {
          const doc = getDocument(element);
          const selector2 = `[aria-activedescendant="${element.id}"]`;
          const composite = doc.querySelector(selector2);
          if (composite) {
            element = composite;
          }
        }
        if (element && !isFocusable(element)) {
          const maybeParentDialog = element.closest("[data-dialog]");
          if (maybeParentDialog == null ? void 0 : maybeParentDialog.id) {
            const doc = getDocument(maybeParentDialog);
            const selector2 = `[aria-controls~="${maybeParentDialog.id}"]`;
            const control = doc.querySelector(selector2);
            if (control) {
              element = control;
            }
          }
        }
        const isElementFocusable = element && isFocusable(element);
        if (!isElementFocusable && retry) {
          requestAnimationFrame(() => focusOnHide(dialog, false));
          return;
        }
        if (!autoFocusOnHideProp(isElementFocusable ? element : null)) return;
        if (!isElementFocusable) return;
        element == null ? void 0 : element.focus({ preventScroll: true });
      },
      [store, finalFocus, autoFocusOnHideProp]
    );
    const focusedOnHideRef = (0, import_react27.useRef)(false);
    useSafeLayoutEffect(() => {
      if (open) return;
      if (!hasOpened) return;
      if (!mayAutoFocusOnHide) return;
      const dialog = ref.current;
      focusedOnHideRef.current = true;
      focusOnHide(dialog);
    }, [open, hasOpened, domReady, mayAutoFocusOnHide, focusOnHide]);
    (0, import_react27.useEffect)(() => {
      if (!hasOpened) return;
      if (!mayAutoFocusOnHide) return;
      const dialog = ref.current;
      return () => {
        if (focusedOnHideRef.current) {
          focusedOnHideRef.current = false;
          return;
        }
        focusOnHide(dialog);
      };
    }, [hasOpened, mayAutoFocusOnHide, focusOnHide]);
    const hideOnEscapeProp = useBooleanEvent(hideOnEscape);
    (0, import_react27.useEffect)(() => {
      if (!domReady) return;
      if (!mounted) return;
      const onKeyDown = (event) => {
        if (event.key !== "Escape") return;
        if (event.defaultPrevented) return;
        const dialog = ref.current;
        if (!dialog) return;
        if (isElementMarked(dialog)) return;
        const target = event.target;
        if (!target) return;
        const { disclosureElement } = store.getState();
        const isValidTarget = () => {
          if (target.tagName === "BODY") return true;
          if (contains(dialog, target)) return true;
          if (!disclosureElement) return true;
          if (contains(disclosureElement, target)) return true;
          return false;
        };
        if (!isValidTarget()) return;
        if (!hideOnEscapeProp(event)) return;
        store.hide();
      };
      return addGlobalEventListener("keydown", onKeyDown, true);
    }, [store, domReady, mounted, hideOnEscapeProp]);
    props = useWrapElement(
      props,
      (element) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(HeadingLevel, { level: modal ? 1 : void 0, children: element }),
      [modal]
    );
    const hiddenProp = props.hidden;
    const alwaysVisible = props.alwaysVisible;
    props = useWrapElement(
      props,
      (element) => {
        if (!backdrop) return element;
        return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
            DialogBackdrop,
            {
              store,
              backdrop,
              hidden: hiddenProp,
              alwaysVisible
            }
          ),
          element
        ] });
      },
      [store, backdrop, hiddenProp, alwaysVisible]
    );
    const [headingId, setHeadingId] = (0, import_react27.useState)();
    const [descriptionId, setDescriptionId] = (0, import_react27.useState)();
    props = useWrapElement(
      props,
      (element) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DialogScopedContextProvider, { value: store, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DialogHeadingContext.Provider, { value: setHeadingId, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DialogDescriptionContext.Provider, { value: setDescriptionId, children: element }) }) }),
      [store]
    );
    props = {
      id: id3,
      "data-dialog": "",
      role: "dialog",
      tabIndex: focusable ? -1 : void 0,
      "aria-labelledby": headingId,
      "aria-describedby": descriptionId,
      ...props,
      ref: useMergeRefs(ref, props.ref)
    };
    props = useFocusableContainer({
      ...props,
      autoFocusOnShow: autoFocusEnabled
    });
    props = useDisclosureContent({ store, ...props });
    props = useFocusable({ ...props, focusable });
    props = usePortal({ portal, ...props, portalRef, preserveTabOrder });
    return props;
  });
  function createDialogComponent(Component9, useProviderContext = useDialogProviderContext) {
    return forwardRef2(function DialogComponent(props) {
      const context = useProviderContext();
      const store = props.store || context;
      const mounted = useStoreState(
        store,
        (state) => !props.unmountOnHide || (state == null ? void 0 : state.mounted) || !!props.open
      );
      if (!mounted) return null;
      return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Component9, { ...props });
    });
  }
  var Dialog = createDialogComponent(
    forwardRef2(function Dialog2(props) {
      const htmlProps = useDialog(props);
      return createElement(TagName19, htmlProps);
    }),
    useDialogProviderContext
  );

  // node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
  var min = Math.min;
  var max = Math.max;
  var round = Math.round;
  var floor = Math.floor;
  var createCoords = (v3) => ({
    x: v3,
    y: v3
  });
  var oppositeSideMap = {
    left: "right",
    right: "left",
    bottom: "top",
    top: "bottom"
  };
  var oppositeAlignmentMap = {
    start: "end",
    end: "start"
  };
  function clamp(start, value, end) {
    return max(start, min(value, end));
  }
  function evaluate(value, param) {
    return typeof value === "function" ? value(param) : value;
  }
  function getSide(placement) {
    return placement.split("-")[0];
  }
  function getAlignment(placement) {
    return placement.split("-")[1];
  }
  function getOppositeAxis(axis) {
    return axis === "x" ? "y" : "x";
  }
  function getAxisLength(axis) {
    return axis === "y" ? "height" : "width";
  }
  var yAxisSides = /* @__PURE__ */ new Set(["top", "bottom"]);
  function getSideAxis(placement) {
    return yAxisSides.has(getSide(placement)) ? "y" : "x";
  }
  function getAlignmentAxis(placement) {
    return getOppositeAxis(getSideAxis(placement));
  }
  function getAlignmentSides(placement, rects, rtl2) {
    if (rtl2 === void 0) {
      rtl2 = false;
    }
    const alignment = getAlignment(placement);
    const alignmentAxis = getAlignmentAxis(placement);
    const length2 = getAxisLength(alignmentAxis);
    let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl2 ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
    if (rects.reference[length2] > rects.floating[length2]) {
      mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
    }
    return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
  }
  function getExpandedPlacements(placement) {
    const oppositePlacement = getOppositePlacement(placement);
    return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
  }
  function getOppositeAlignmentPlacement(placement) {
    return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]);
  }
  var lrPlacement = ["left", "right"];
  var rlPlacement = ["right", "left"];
  var tbPlacement = ["top", "bottom"];
  var btPlacement = ["bottom", "top"];
  function getSideList(side, isStart, rtl2) {
    switch (side) {
      case "top":
      case "bottom":
        if (rtl2) return isStart ? rlPlacement : lrPlacement;
        return isStart ? lrPlacement : rlPlacement;
      case "left":
      case "right":
        return isStart ? tbPlacement : btPlacement;
      default:
        return [];
    }
  }
  function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl2) {
    const alignment = getAlignment(placement);
    let list = getSideList(getSide(placement), direction === "start", rtl2);
    if (alignment) {
      list = list.map((side) => side + "-" + alignment);
      if (flipAlignment) {
        list = list.concat(list.map(getOppositeAlignmentPlacement));
      }
    }
    return list;
  }
  function getOppositePlacement(placement) {
    return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]);
  }
  function expandPaddingObject(padding2) {
    return {
      top: 0,
      right: 0,
      bottom: 0,
      left: 0,
      ...padding2
    };
  }
  function getPaddingObject(padding2) {
    return typeof padding2 !== "number" ? expandPaddingObject(padding2) : {
      top: padding2,
      right: padding2,
      bottom: padding2,
      left: padding2
    };
  }
  function rectToClientRect(rect) {
    const {
      x: x2,
      y: y3,
      width,
      height
    } = rect;
    return {
      width,
      height,
      top: y3,
      left: x2,
      right: x2 + width,
      bottom: y3 + height,
      x: x2,
      y: y3
    };
  }

  // node_modules/@floating-ui/core/dist/floating-ui.core.mjs
  function computeCoordsFromPlacement(_ref11, placement, rtl2) {
    let {
      reference,
      floating
    } = _ref11;
    const sideAxis = getSideAxis(placement);
    const alignmentAxis = getAlignmentAxis(placement);
    const alignLength = getAxisLength(alignmentAxis);
    const side = getSide(placement);
    const isVertical = sideAxis === "y";
    const commonX = reference.x + reference.width / 2 - floating.width / 2;
    const commonY = reference.y + reference.height / 2 - floating.height / 2;
    const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
    let coords;
    switch (side) {
      case "top":
        coords = {
          x: commonX,
          y: reference.y - floating.height
        };
        break;
      case "bottom":
        coords = {
          x: commonX,
          y: reference.y + reference.height
        };
        break;
      case "right":
        coords = {
          x: reference.x + reference.width,
          y: commonY
        };
        break;
      case "left":
        coords = {
          x: reference.x - floating.width,
          y: commonY
        };
        break;
      default:
        coords = {
          x: reference.x,
          y: reference.y
        };
    }
    switch (getAlignment(placement)) {
      case "start":
        coords[alignmentAxis] -= commonAlign * (rtl2 && isVertical ? -1 : 1);
        break;
      case "end":
        coords[alignmentAxis] += commonAlign * (rtl2 && isVertical ? -1 : 1);
        break;
    }
    return coords;
  }
  var computePosition = async (reference, floating, config) => {
    const {
      placement = "bottom",
      strategy = "absolute",
      middleware: middleware2 = [],
      platform: platform2
    } = config;
    const validMiddleware = middleware2.filter(Boolean);
    const rtl2 = await (platform2.isRTL == null ? void 0 : platform2.isRTL(floating));
    let rects = await platform2.getElementRects({
      reference,
      floating,
      strategy
    });
    let {
      x: x2,
      y: y3
    } = computeCoordsFromPlacement(rects, placement, rtl2);
    let statefulPlacement = placement;
    let middlewareData = {};
    let resetCount = 0;
    for (let i3 = 0; i3 < validMiddleware.length; i3++) {
      const {
        name,
        fn
      } = validMiddleware[i3];
      const {
        x: nextX,
        y: nextY,
        data,
        reset
      } = await fn({
        x: x2,
        y: y3,
        initialPlacement: placement,
        placement: statefulPlacement,
        strategy,
        middlewareData,
        rects,
        platform: platform2,
        elements: {
          reference,
          floating
        }
      });
      x2 = nextX != null ? nextX : x2;
      y3 = nextY != null ? nextY : y3;
      middlewareData = {
        ...middlewareData,
        [name]: {
          ...middlewareData[name],
          ...data
        }
      };
      if (reset && resetCount <= 50) {
        resetCount++;
        if (typeof reset === "object") {
          if (reset.placement) {
            statefulPlacement = reset.placement;
          }
          if (reset.rects) {
            rects = reset.rects === true ? await platform2.getElementRects({
              reference,
              floating,
              strategy
            }) : reset.rects;
          }
          ({
            x: x2,
            y: y3
          } = computeCoordsFromPlacement(rects, statefulPlacement, rtl2));
        }
        i3 = -1;
      }
    }
    return {
      x: x2,
      y: y3,
      placement: statefulPlacement,
      strategy,
      middlewareData
    };
  };
  async function detectOverflow(state, options2) {
    var _await$platform$isEle;
    if (options2 === void 0) {
      options2 = {};
    }
    const {
      x: x2,
      y: y3,
      platform: platform2,
      rects,
      elements: elements2,
      strategy
    } = state;
    const {
      boundary = "clippingAncestors",
      rootBoundary = "viewport",
      elementContext = "floating",
      altBoundary = false,
      padding: padding2 = 0
    } = evaluate(options2, state);
    const paddingObject = getPaddingObject(padding2);
    const altContext = elementContext === "floating" ? "reference" : "floating";
    const element = elements2[altBoundary ? altContext : elementContext];
    const clippingClientRect = rectToClientRect(await platform2.getClippingRect({
      element: ((_await$platform$isEle = await (platform2.isElement == null ? void 0 : platform2.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements2.floating)),
      boundary,
      rootBoundary,
      strategy
    }));
    const rect = elementContext === "floating" ? {
      x: x2,
      y: y3,
      width: rects.floating.width,
      height: rects.floating.height
    } : rects.reference;
    const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements2.floating));
    const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || {
      x: 1,
      y: 1
    } : {
      x: 1,
      y: 1
    };
    const elementClientRect = rectToClientRect(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({
      elements: elements2,
      rect,
      offsetParent,
      strategy
    }) : rect);
    return {
      top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
      bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
      left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
      right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
    };
  }
  var arrow = (options2) => ({
    name: "arrow",
    options: options2,
    async fn(state) {
      const {
        x: x2,
        y: y3,
        placement,
        rects,
        platform: platform2,
        elements: elements2,
        middlewareData
      } = state;
      const {
        element,
        padding: padding2 = 0
      } = evaluate(options2, state) || {};
      if (element == null) {
        return {};
      }
      const paddingObject = getPaddingObject(padding2);
      const coords = {
        x: x2,
        y: y3
      };
      const axis = getAlignmentAxis(placement);
      const length2 = getAxisLength(axis);
      const arrowDimensions = await platform2.getDimensions(element);
      const isYAxis = axis === "y";
      const minProp = isYAxis ? "top" : "left";
      const maxProp = isYAxis ? "bottom" : "right";
      const clientProp = isYAxis ? "clientHeight" : "clientWidth";
      const endDiff = rects.reference[length2] + rects.reference[axis] - coords[axis] - rects.floating[length2];
      const startDiff = coords[axis] - rects.reference[axis];
      const arrowOffsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(element));
      let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
      if (!clientSize || !await (platform2.isElement == null ? void 0 : platform2.isElement(arrowOffsetParent))) {
        clientSize = elements2.floating[clientProp] || rects.floating[length2];
      }
      const centerToReference = endDiff / 2 - startDiff / 2;
      const largestPossiblePadding = clientSize / 2 - arrowDimensions[length2] / 2 - 1;
      const minPadding = min(paddingObject[minProp], largestPossiblePadding);
      const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
      const min$1 = minPadding;
      const max3 = clientSize - arrowDimensions[length2] - maxPadding;
      const center = clientSize / 2 - arrowDimensions[length2] / 2 + centerToReference;
      const offset3 = clamp(min$1, center, max3);
      const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset3 && rects.reference[length2] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length2] / 2 < 0;
      const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max3 : 0;
      return {
        [axis]: coords[axis] + alignmentOffset,
        data: {
          [axis]: offset3,
          centerOffset: center - offset3 - alignmentOffset,
          ...shouldAddOffset && {
            alignmentOffset
          }
        },
        reset: shouldAddOffset
      };
    }
  });
  var flip = function(options2) {
    if (options2 === void 0) {
      options2 = {};
    }
    return {
      name: "flip",
      options: options2,
      async fn(state) {
        var _middlewareData$arrow, _middlewareData$flip;
        const {
          placement,
          middlewareData,
          rects,
          initialPlacement,
          platform: platform2,
          elements: elements2
        } = state;
        const {
          mainAxis: checkMainAxis = true,
          crossAxis: checkCrossAxis = true,
          fallbackPlacements: specifiedFallbackPlacements,
          fallbackStrategy = "bestFit",
          fallbackAxisSideDirection = "none",
          flipAlignment = true,
          ...detectOverflowOptions
        } = evaluate(options2, state);
        if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
          return {};
        }
        const side = getSide(placement);
        const initialSideAxis = getSideAxis(initialPlacement);
        const isBasePlacement = getSide(initialPlacement) === initialPlacement;
        const rtl2 = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements2.floating));
        const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
        const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
        if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
          fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl2));
        }
        const placements2 = [initialPlacement, ...fallbackPlacements];
        const overflow = await detectOverflow(state, detectOverflowOptions);
        const overflows = [];
        let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
        if (checkMainAxis) {
          overflows.push(overflow[side]);
        }
        if (checkCrossAxis) {
          const sides3 = getAlignmentSides(placement, rects, rtl2);
          overflows.push(overflow[sides3[0]], overflow[sides3[1]]);
        }
        overflowsData = [...overflowsData, {
          placement,
          overflows
        }];
        if (!overflows.every((side2) => side2 <= 0)) {
          var _middlewareData$flip2, _overflowsData$filter;
          const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
          const nextPlacement = placements2[nextIndex];
          if (nextPlacement) {
            const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
            if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis
            // overflows the main axis.
            overflowsData.every((d3) => getSideAxis(d3.placement) === initialSideAxis ? d3.overflows[0] > 0 : true)) {
              return {
                data: {
                  index: nextIndex,
                  overflows: overflowsData
                },
                reset: {
                  placement: nextPlacement
                }
              };
            }
          }
          let resetPlacement = (_overflowsData$filter = overflowsData.filter((d3) => d3.overflows[0] <= 0).sort((a3, b3) => a3.overflows[1] - b3.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
          if (!resetPlacement) {
            switch (fallbackStrategy) {
              case "bestFit": {
                var _overflowsData$filter2;
                const placement2 = (_overflowsData$filter2 = overflowsData.filter((d3) => {
                  if (hasFallbackAxisSideDirection) {
                    const currentSideAxis = getSideAxis(d3.placement);
                    return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
                    // reading directions favoring greater width.
                    currentSideAxis === "y";
                  }
                  return true;
                }).map((d3) => [d3.placement, d3.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a3, b3) => a3[1] - b3[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
                if (placement2) {
                  resetPlacement = placement2;
                }
                break;
              }
              case "initialPlacement":
                resetPlacement = initialPlacement;
                break;
            }
          }
          if (placement !== resetPlacement) {
            return {
              reset: {
                placement: resetPlacement
              }
            };
          }
        }
        return {};
      }
    };
  };
  var originSides = /* @__PURE__ */ new Set(["left", "top"]);
  async function convertValueToCoords(state, options2) {
    const {
      placement,
      platform: platform2,
      elements: elements2
    } = state;
    const rtl2 = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements2.floating));
    const side = getSide(placement);
    const alignment = getAlignment(placement);
    const isVertical = getSideAxis(placement) === "y";
    const mainAxisMulti = originSides.has(side) ? -1 : 1;
    const crossAxisMulti = rtl2 && isVertical ? -1 : 1;
    const rawValue = evaluate(options2, state);
    let {
      mainAxis,
      crossAxis,
      alignmentAxis
    } = typeof rawValue === "number" ? {
      mainAxis: rawValue,
      crossAxis: 0,
      alignmentAxis: null
    } : {
      mainAxis: rawValue.mainAxis || 0,
      crossAxis: rawValue.crossAxis || 0,
      alignmentAxis: rawValue.alignmentAxis
    };
    if (alignment && typeof alignmentAxis === "number") {
      crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
    }
    return isVertical ? {
      x: crossAxis * crossAxisMulti,
      y: mainAxis * mainAxisMulti
    } : {
      x: mainAxis * mainAxisMulti,
      y: crossAxis * crossAxisMulti
    };
  }
  var offset = function(options2) {
    if (options2 === void 0) {
      options2 = 0;
    }
    return {
      name: "offset",
      options: options2,
      async fn(state) {
        var _middlewareData$offse, _middlewareData$arrow;
        const {
          x: x2,
          y: y3,
          placement,
          middlewareData
        } = state;
        const diffCoords = await convertValueToCoords(state, options2);
        if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
          return {};
        }
        return {
          x: x2 + diffCoords.x,
          y: y3 + diffCoords.y,
          data: {
            ...diffCoords,
            placement
          }
        };
      }
    };
  };
  var shift = function(options2) {
    if (options2 === void 0) {
      options2 = {};
    }
    return {
      name: "shift",
      options: options2,
      async fn(state) {
        const {
          x: x2,
          y: y3,
          placement
        } = state;
        const {
          mainAxis: checkMainAxis = true,
          crossAxis: checkCrossAxis = false,
          limiter = {
            fn: (_ref11) => {
              let {
                x: x3,
                y: y4
              } = _ref11;
              return {
                x: x3,
                y: y4
              };
            }
          },
          ...detectOverflowOptions
        } = evaluate(options2, state);
        const coords = {
          x: x2,
          y: y3
        };
        const overflow = await detectOverflow(state, detectOverflowOptions);
        const crossAxis = getSideAxis(getSide(placement));
        const mainAxis = getOppositeAxis(crossAxis);
        let mainAxisCoord = coords[mainAxis];
        let crossAxisCoord = coords[crossAxis];
        if (checkMainAxis) {
          const minSide = mainAxis === "y" ? "top" : "left";
          const maxSide = mainAxis === "y" ? "bottom" : "right";
          const min3 = mainAxisCoord + overflow[minSide];
          const max3 = mainAxisCoord - overflow[maxSide];
          mainAxisCoord = clamp(min3, mainAxisCoord, max3);
        }
        if (checkCrossAxis) {
          const minSide = crossAxis === "y" ? "top" : "left";
          const maxSide = crossAxis === "y" ? "bottom" : "right";
          const min3 = crossAxisCoord + overflow[minSide];
          const max3 = crossAxisCoord - overflow[maxSide];
          crossAxisCoord = clamp(min3, crossAxisCoord, max3);
        }
        const limitedCoords = limiter.fn({
          ...state,
          [mainAxis]: mainAxisCoord,
          [crossAxis]: crossAxisCoord
        });
        return {
          ...limitedCoords,
          data: {
            x: limitedCoords.x - x2,
            y: limitedCoords.y - y3,
            enabled: {
              [mainAxis]: checkMainAxis,
              [crossAxis]: checkCrossAxis
            }
          }
        };
      }
    };
  };
  var limitShift = function(options2) {
    if (options2 === void 0) {
      options2 = {};
    }
    return {
      options: options2,
      fn(state) {
        const {
          x: x2,
          y: y3,
          placement,
          rects,
          middlewareData
        } = state;
        const {
          offset: offset3 = 0,
          mainAxis: checkMainAxis = true,
          crossAxis: checkCrossAxis = true
        } = evaluate(options2, state);
        const coords = {
          x: x2,
          y: y3
        };
        const crossAxis = getSideAxis(placement);
        const mainAxis = getOppositeAxis(crossAxis);
        let mainAxisCoord = coords[mainAxis];
        let crossAxisCoord = coords[crossAxis];
        const rawOffset = evaluate(offset3, state);
        const computedOffset = typeof rawOffset === "number" ? {
          mainAxis: rawOffset,
          crossAxis: 0
        } : {
          mainAxis: 0,
          crossAxis: 0,
          ...rawOffset
        };
        if (checkMainAxis) {
          const len = mainAxis === "y" ? "height" : "width";
          const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
          const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
          if (mainAxisCoord < limitMin) {
            mainAxisCoord = limitMin;
          } else if (mainAxisCoord > limitMax) {
            mainAxisCoord = limitMax;
          }
        }
        if (checkCrossAxis) {
          var _middlewareData$offse, _middlewareData$offse2;
          const len = mainAxis === "y" ? "width" : "height";
          const isOriginSide = originSides.has(getSide(placement));
          const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
          const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
          if (crossAxisCoord < limitMin) {
            crossAxisCoord = limitMin;
          } else if (crossAxisCoord > limitMax) {
            crossAxisCoord = limitMax;
          }
        }
        return {
          [mainAxis]: mainAxisCoord,
          [crossAxis]: crossAxisCoord
        };
      }
    };
  };
  var size = function(options2) {
    if (options2 === void 0) {
      options2 = {};
    }
    return {
      name: "size",
      options: options2,
      async fn(state) {
        var _state$middlewareData, _state$middlewareData2;
        const {
          placement,
          rects,
          platform: platform2,
          elements: elements2
        } = state;
        const {
          apply = () => {
          },
          ...detectOverflowOptions
        } = evaluate(options2, state);
        const overflow = await detectOverflow(state, detectOverflowOptions);
        const side = getSide(placement);
        const alignment = getAlignment(placement);
        const isYAxis = getSideAxis(placement) === "y";
        const {
          width,
          height
        } = rects.floating;
        let heightSide;
        let widthSide;
        if (side === "top" || side === "bottom") {
          heightSide = side;
          widthSide = alignment === (await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements2.floating)) ? "start" : "end") ? "left" : "right";
        } else {
          widthSide = side;
          heightSide = alignment === "end" ? "top" : "bottom";
        }
        const maximumClippingHeight = height - overflow.top - overflow.bottom;
        const maximumClippingWidth = width - overflow.left - overflow.right;
        const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
        const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
        const noShift = !state.middlewareData.shift;
        let availableHeight = overflowAvailableHeight;
        let availableWidth = overflowAvailableWidth;
        if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
          availableWidth = maximumClippingWidth;
        }
        if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
          availableHeight = maximumClippingHeight;
        }
        if (noShift && !alignment) {
          const xMin = max(overflow.left, 0);
          const xMax = max(overflow.right, 0);
          const yMin = max(overflow.top, 0);
          const yMax = max(overflow.bottom, 0);
          if (isYAxis) {
            availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
          } else {
            availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
          }
        }
        await apply({
          ...state,
          availableWidth,
          availableHeight
        });
        const nextDimensions = await platform2.getDimensions(elements2.floating);
        if (width !== nextDimensions.width || height !== nextDimensions.height) {
          return {
            reset: {
              rects: true
            }
          };
        }
        return {};
      }
    };
  };

  // node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
  function hasWindow() {
    return typeof window !== "undefined";
  }
  function getNodeName(node2) {
    if (isNode(node2)) {
      return (node2.nodeName || "").toLowerCase();
    }
    return "#document";
  }
  function getWindow2(node2) {
    var _node$ownerDocument;
    return (node2 == null || (_node$ownerDocument = node2.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
  }
  function getDocumentElement(node2) {
    var _ref11;
    return (_ref11 = (isNode(node2) ? node2.ownerDocument : node2.document) || window.document) == null ? void 0 : _ref11.documentElement;
  }
  function isNode(value) {
    if (!hasWindow()) {
      return false;
    }
    return value instanceof Node || value instanceof getWindow2(value).Node;
  }
  function isElement(value) {
    if (!hasWindow()) {
      return false;
    }
    return value instanceof Element || value instanceof getWindow2(value).Element;
  }
  function isHTMLElement(value) {
    if (!hasWindow()) {
      return false;
    }
    return value instanceof HTMLElement || value instanceof getWindow2(value).HTMLElement;
  }
  function isShadowRoot(value) {
    if (!hasWindow() || typeof ShadowRoot === "undefined") {
      return false;
    }
    return value instanceof ShadowRoot || value instanceof getWindow2(value).ShadowRoot;
  }
  var invalidOverflowDisplayValues = /* @__PURE__ */ new Set(["inline", "contents"]);
  function isOverflowElement(element) {
    const {
      overflow,
      overflowX,
      overflowY,
      display
    } = getComputedStyle2(element);
    return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
  }
  var tableElements = /* @__PURE__ */ new Set(["table", "td", "th"]);
  function isTableElement(element) {
    return tableElements.has(getNodeName(element));
  }
  var topLayerSelectors = [":popover-open", ":modal"];
  function isTopLayer(element) {
    return topLayerSelectors.some((selector2) => {
      try {
        return element.matches(selector2);
      } catch (_e) {
        return false;
      }
    });
  }
  var transformProperties = ["transform", "translate", "scale", "rotate", "perspective"];
  var willChangeValues = ["transform", "translate", "scale", "rotate", "perspective", "filter"];
  var containValues = ["paint", "layout", "strict", "content"];
  function isContainingBlock(elementOrCss) {
    const webkit = isWebKit();
    const css3 = isElement(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss;
    return transformProperties.some((value) => css3[value] ? css3[value] !== "none" : false) || (css3.containerType ? css3.containerType !== "normal" : false) || !webkit && (css3.backdropFilter ? css3.backdropFilter !== "none" : false) || !webkit && (css3.filter ? css3.filter !== "none" : false) || willChangeValues.some((value) => (css3.willChange || "").includes(value)) || containValues.some((value) => (css3.contain || "").includes(value));
  }
  function getContainingBlock(element) {
    let currentNode = getParentNode(element);
    while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
      if (isContainingBlock(currentNode)) {
        return currentNode;
      } else if (isTopLayer(currentNode)) {
        return null;
      }
      currentNode = getParentNode(currentNode);
    }
    return null;
  }
  function isWebKit() {
    if (typeof CSS === "undefined" || !CSS.supports) return false;
    return CSS.supports("-webkit-backdrop-filter", "none");
  }
  var lastTraversableNodeNames = /* @__PURE__ */ new Set(["html", "body", "#document"]);
  function isLastTraversableNode(node2) {
    return lastTraversableNodeNames.has(getNodeName(node2));
  }
  function getComputedStyle2(element) {
    return getWindow2(element).getComputedStyle(element);
  }
  function getNodeScroll(element) {
    if (isElement(element)) {
      return {
        scrollLeft: element.scrollLeft,
        scrollTop: element.scrollTop
      };
    }
    return {
      scrollLeft: element.scrollX,
      scrollTop: element.scrollY
    };
  }
  function getParentNode(node2) {
    if (getNodeName(node2) === "html") {
      return node2;
    }
    const result = (
      // Step into the shadow DOM of the parent of a slotted node.
      node2.assignedSlot || // DOM Element detected.
      node2.parentNode || // ShadowRoot detected.
      isShadowRoot(node2) && node2.host || // Fallback.
      getDocumentElement(node2)
    );
    return isShadowRoot(result) ? result.host : result;
  }
  function getNearestOverflowAncestor(node2) {
    const parentNode = getParentNode(node2);
    if (isLastTraversableNode(parentNode)) {
      return node2.ownerDocument ? node2.ownerDocument.body : node2.body;
    }
    if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
      return parentNode;
    }
    return getNearestOverflowAncestor(parentNode);
  }
  function getOverflowAncestors(node2, list, traverseIframes) {
    var _node$ownerDocument2;
    if (list === void 0) {
      list = [];
    }
    if (traverseIframes === void 0) {
      traverseIframes = true;
    }
    const scrollableAncestor = getNearestOverflowAncestor(node2);
    const isBody = scrollableAncestor === ((_node$ownerDocument2 = node2.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
    const win = getWindow2(scrollableAncestor);
    if (isBody) {
      const frameElement = getFrameElement(win);
      return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
    }
    return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
  }
  function getFrameElement(win) {
    return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
  }

  // node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
  function getCssDimensions(element) {
    const css3 = getComputedStyle2(element);
    let width = parseFloat(css3.width) || 0;
    let height = parseFloat(css3.height) || 0;
    const hasOffset = isHTMLElement(element);
    const offsetWidth = hasOffset ? element.offsetWidth : width;
    const offsetHeight = hasOffset ? element.offsetHeight : height;
    const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
    if (shouldFallback) {
      width = offsetWidth;
      height = offsetHeight;
    }
    return {
      width,
      height,
      $: shouldFallback
    };
  }
  function unwrapElement(element) {
    return !isElement(element) ? element.contextElement : element;
  }
  function getScale(element) {
    const domElement = unwrapElement(element);
    if (!isHTMLElement(domElement)) {
      return createCoords(1);
    }
    const rect = domElement.getBoundingClientRect();
    const {
      width,
      height,
      $: $3
    } = getCssDimensions(domElement);
    let x2 = ($3 ? round(rect.width) : rect.width) / width;
    let y3 = ($3 ? round(rect.height) : rect.height) / height;
    if (!x2 || !Number.isFinite(x2)) {
      x2 = 1;
    }
    if (!y3 || !Number.isFinite(y3)) {
      y3 = 1;
    }
    return {
      x: x2,
      y: y3
    };
  }
  var noOffsets = /* @__PURE__ */ createCoords(0);
  function getVisualOffsets(element) {
    const win = getWindow2(element);
    if (!isWebKit() || !win.visualViewport) {
      return noOffsets;
    }
    return {
      x: win.visualViewport.offsetLeft,
      y: win.visualViewport.offsetTop
    };
  }
  function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
    if (isFixed === void 0) {
      isFixed = false;
    }
    if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow2(element)) {
      return false;
    }
    return isFixed;
  }
  function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
    if (includeScale === void 0) {
      includeScale = false;
    }
    if (isFixedStrategy === void 0) {
      isFixedStrategy = false;
    }
    const clientRect = element.getBoundingClientRect();
    const domElement = unwrapElement(element);
    let scale2 = createCoords(1);
    if (includeScale) {
      if (offsetParent) {
        if (isElement(offsetParent)) {
          scale2 = getScale(offsetParent);
        }
      } else {
        scale2 = getScale(element);
      }
    }
    const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
    let x2 = (clientRect.left + visualOffsets.x) / scale2.x;
    let y3 = (clientRect.top + visualOffsets.y) / scale2.y;
    let width = clientRect.width / scale2.x;
    let height = clientRect.height / scale2.y;
    if (domElement) {
      const win = getWindow2(domElement);
      const offsetWin = offsetParent && isElement(offsetParent) ? getWindow2(offsetParent) : offsetParent;
      let currentWin = win;
      let currentIFrame = getFrameElement(currentWin);
      while (currentIFrame && offsetParent && offsetWin !== currentWin) {
        const iframeScale = getScale(currentIFrame);
        const iframeRect = currentIFrame.getBoundingClientRect();
        const css3 = getComputedStyle2(currentIFrame);
        const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css3.paddingLeft)) * iframeScale.x;
        const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css3.paddingTop)) * iframeScale.y;
        x2 *= iframeScale.x;
        y3 *= iframeScale.y;
        width *= iframeScale.x;
        height *= iframeScale.y;
        x2 += left;
        y3 += top;
        currentWin = getWindow2(currentIFrame);
        currentIFrame = getFrameElement(currentWin);
      }
    }
    return rectToClientRect({
      width,
      height,
      x: x2,
      y: y3
    });
  }
  function getWindowScrollBarX(element, rect) {
    const leftScroll = getNodeScroll(element).scrollLeft;
    if (!rect) {
      return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
    }
    return rect.left + leftScroll;
  }
  function getHTMLOffset(documentElement, scroll) {
    const htmlRect = documentElement.getBoundingClientRect();
    const x2 = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
    const y3 = htmlRect.top + scroll.scrollTop;
    return {
      x: x2,
      y: y3
    };
  }
  function convertOffsetParentRelativeRectToViewportRelativeRect(_ref11) {
    let {
      elements: elements2,
      rect,
      offsetParent,
      strategy
    } = _ref11;
    const isFixed = strategy === "fixed";
    const documentElement = getDocumentElement(offsetParent);
    const topLayer = elements2 ? isTopLayer(elements2.floating) : false;
    if (offsetParent === documentElement || topLayer && isFixed) {
      return rect;
    }
    let scroll = {
      scrollLeft: 0,
      scrollTop: 0
    };
    let scale2 = createCoords(1);
    const offsets = createCoords(0);
    const isOffsetParentAnElement = isHTMLElement(offsetParent);
    if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
      if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
        scroll = getNodeScroll(offsetParent);
      }
      if (isHTMLElement(offsetParent)) {
        const offsetRect = getBoundingClientRect(offsetParent);
        scale2 = getScale(offsetParent);
        offsets.x = offsetRect.x + offsetParent.clientLeft;
        offsets.y = offsetRect.y + offsetParent.clientTop;
      }
    }
    const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
    return {
      width: rect.width * scale2.x,
      height: rect.height * scale2.y,
      x: rect.x * scale2.x - scroll.scrollLeft * scale2.x + offsets.x + htmlOffset.x,
      y: rect.y * scale2.y - scroll.scrollTop * scale2.y + offsets.y + htmlOffset.y
    };
  }
  function getClientRects(element) {
    return Array.from(element.getClientRects());
  }
  function getDocumentRect(element) {
    const html = getDocumentElement(element);
    const scroll = getNodeScroll(element);
    const body = element.ownerDocument.body;
    const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
    const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
    let x2 = -scroll.scrollLeft + getWindowScrollBarX(element);
    const y3 = -scroll.scrollTop;
    if (getComputedStyle2(body).direction === "rtl") {
      x2 += max(html.clientWidth, body.clientWidth) - width;
    }
    return {
      width,
      height,
      x: x2,
      y: y3
    };
  }
  var SCROLLBAR_MAX = 25;
  function getViewportRect(element, strategy) {
    const win = getWindow2(element);
    const html = getDocumentElement(element);
    const visualViewport = win.visualViewport;
    let width = html.clientWidth;
    let height = html.clientHeight;
    let x2 = 0;
    let y3 = 0;
    if (visualViewport) {
      width = visualViewport.width;
      height = visualViewport.height;
      const visualViewportBased = isWebKit();
      if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
        x2 = visualViewport.offsetLeft;
        y3 = visualViewport.offsetTop;
      }
    }
    const windowScrollbarX = getWindowScrollBarX(html);
    if (windowScrollbarX <= 0) {
      const doc = html.ownerDocument;
      const body = doc.body;
      const bodyStyles = getComputedStyle(body);
      const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
      const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
      if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
        width -= clippingStableScrollbarWidth;
      }
    } else if (windowScrollbarX <= SCROLLBAR_MAX) {
      width += windowScrollbarX;
    }
    return {
      width,
      height,
      x: x2,
      y: y3
    };
  }
  var absoluteOrFixed = /* @__PURE__ */ new Set(["absolute", "fixed"]);
  function getInnerBoundingClientRect(element, strategy) {
    const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
    const top = clientRect.top + element.clientTop;
    const left = clientRect.left + element.clientLeft;
    const scale2 = isHTMLElement(element) ? getScale(element) : createCoords(1);
    const width = element.clientWidth * scale2.x;
    const height = element.clientHeight * scale2.y;
    const x2 = left * scale2.x;
    const y3 = top * scale2.y;
    return {
      width,
      height,
      x: x2,
      y: y3
    };
  }
  function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
    let rect;
    if (clippingAncestor === "viewport") {
      rect = getViewportRect(element, strategy);
    } else if (clippingAncestor === "document") {
      rect = getDocumentRect(getDocumentElement(element));
    } else if (isElement(clippingAncestor)) {
      rect = getInnerBoundingClientRect(clippingAncestor, strategy);
    } else {
      const visualOffsets = getVisualOffsets(element);
      rect = {
        x: clippingAncestor.x - visualOffsets.x,
        y: clippingAncestor.y - visualOffsets.y,
        width: clippingAncestor.width,
        height: clippingAncestor.height
      };
    }
    return rectToClientRect(rect);
  }
  function hasFixedPositionAncestor(element, stopNode) {
    const parentNode = getParentNode(element);
    if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
      return false;
    }
    return getComputedStyle2(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
  }
  function getClippingElementAncestors(element, cache2) {
    const cachedResult = cache2.get(element);
    if (cachedResult) {
      return cachedResult;
    }
    let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
    let currentContainingBlockComputedStyle = null;
    const elementIsFixed = getComputedStyle2(element).position === "fixed";
    let currentNode = elementIsFixed ? getParentNode(element) : element;
    while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
      const computedStyle = getComputedStyle2(currentNode);
      const currentNodeIsContaining = isContainingBlock(currentNode);
      if (!currentNodeIsContaining && computedStyle.position === "fixed") {
        currentContainingBlockComputedStyle = null;
      }
      const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
      if (shouldDropCurrentNode) {
        result = result.filter((ancestor) => ancestor !== currentNode);
      } else {
        currentContainingBlockComputedStyle = computedStyle;
      }
      currentNode = getParentNode(currentNode);
    }
    cache2.set(element, result);
    return result;
  }
  function getClippingRect(_ref11) {
    let {
      element,
      boundary,
      rootBoundary,
      strategy
    } = _ref11;
    const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
    const clippingAncestors = [...elementClippingAncestors, rootBoundary];
    const firstClippingAncestor = clippingAncestors[0];
    const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
      const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
      accRect.top = max(rect.top, accRect.top);
      accRect.right = min(rect.right, accRect.right);
      accRect.bottom = min(rect.bottom, accRect.bottom);
      accRect.left = max(rect.left, accRect.left);
      return accRect;
    }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
    return {
      width: clippingRect.right - clippingRect.left,
      height: clippingRect.bottom - clippingRect.top,
      x: clippingRect.left,
      y: clippingRect.top
    };
  }
  function getDimensions(element) {
    const {
      width,
      height
    } = getCssDimensions(element);
    return {
      width,
      height
    };
  }
  function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
    const isOffsetParentAnElement = isHTMLElement(offsetParent);
    const documentElement = getDocumentElement(offsetParent);
    const isFixed = strategy === "fixed";
    const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
    let scroll = {
      scrollLeft: 0,
      scrollTop: 0
    };
    const offsets = createCoords(0);
    function setLeftRTLScrollbarOffset() {
      offsets.x = getWindowScrollBarX(documentElement);
    }
    if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
      if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
        scroll = getNodeScroll(offsetParent);
      }
      if (isOffsetParentAnElement) {
        const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
        offsets.x = offsetRect.x + offsetParent.clientLeft;
        offsets.y = offsetRect.y + offsetParent.clientTop;
      } else if (documentElement) {
        setLeftRTLScrollbarOffset();
      }
    }
    if (isFixed && !isOffsetParentAnElement && documentElement) {
      setLeftRTLScrollbarOffset();
    }
    const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
    const x2 = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
    const y3 = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
    return {
      x: x2,
      y: y3,
      width: rect.width,
      height: rect.height
    };
  }
  function isStaticPositioned(element) {
    return getComputedStyle2(element).position === "static";
  }
  function getTrueOffsetParent(element, polyfill) {
    if (!isHTMLElement(element) || getComputedStyle2(element).position === "fixed") {
      return null;
    }
    if (polyfill) {
      return polyfill(element);
    }
    let rawOffsetParent = element.offsetParent;
    if (getDocumentElement(element) === rawOffsetParent) {
      rawOffsetParent = rawOffsetParent.ownerDocument.body;
    }
    return rawOffsetParent;
  }
  function getOffsetParent(element, polyfill) {
    const win = getWindow2(element);
    if (isTopLayer(element)) {
      return win;
    }
    if (!isHTMLElement(element)) {
      let svgOffsetParent = getParentNode(element);
      while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
        if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
          return svgOffsetParent;
        }
        svgOffsetParent = getParentNode(svgOffsetParent);
      }
      return win;
    }
    let offsetParent = getTrueOffsetParent(element, polyfill);
    while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
      offsetParent = getTrueOffsetParent(offsetParent, polyfill);
    }
    if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
      return win;
    }
    return offsetParent || getContainingBlock(element) || win;
  }
  var getElementRects = async function(data) {
    const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
    const getDimensionsFn = this.getDimensions;
    const floatingDimensions = await getDimensionsFn(data.floating);
    return {
      reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
      floating: {
        x: 0,
        y: 0,
        width: floatingDimensions.width,
        height: floatingDimensions.height
      }
    };
  };
  function isRTL(element) {
    return getComputedStyle2(element).direction === "rtl";
  }
  var platform = {
    convertOffsetParentRelativeRectToViewportRelativeRect,
    getDocumentElement,
    getClippingRect,
    getOffsetParent,
    getElementRects,
    getClientRects,
    getDimensions,
    getScale,
    isElement,
    isRTL
  };
  function rectsAreEqual(a3, b3) {
    return a3.x === b3.x && a3.y === b3.y && a3.width === b3.width && a3.height === b3.height;
  }
  function observeMove(element, onMove) {
    let io = null;
    let timeoutId;
    const root = getDocumentElement(element);
    function cleanup() {
      var _io;
      clearTimeout(timeoutId);
      (_io = io) == null || _io.disconnect();
      io = null;
    }
    function refresh(skip, threshold) {
      if (skip === void 0) {
        skip = false;
      }
      if (threshold === void 0) {
        threshold = 1;
      }
      cleanup();
      const elementRectForRootMargin = element.getBoundingClientRect();
      const {
        left,
        top,
        width,
        height
      } = elementRectForRootMargin;
      if (!skip) {
        onMove();
      }
      if (!width || !height) {
        return;
      }
      const insetTop = floor(top);
      const insetRight = floor(root.clientWidth - (left + width));
      const insetBottom = floor(root.clientHeight - (top + height));
      const insetLeft = floor(left);
      const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
      const options2 = {
        rootMargin,
        threshold: max(0, min(1, threshold)) || 1
      };
      let isFirstUpdate = true;
      function handleObserve(entries) {
        const ratio = entries[0].intersectionRatio;
        if (ratio !== threshold) {
          if (!isFirstUpdate) {
            return refresh();
          }
          if (!ratio) {
            timeoutId = setTimeout(() => {
              refresh(false, 1e-7);
            }, 1e3);
          } else {
            refresh(false, ratio);
          }
        }
        if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
          refresh();
        }
        isFirstUpdate = false;
      }
      try {
        io = new IntersectionObserver(handleObserve, {
          ...options2,
          // Handle <iframe>s
          root: root.ownerDocument
        });
      } catch (_e) {
        io = new IntersectionObserver(handleObserve, options2);
      }
      io.observe(element);
    }
    refresh(true);
    return cleanup;
  }
  function autoUpdate(reference, floating, update, options2) {
    if (options2 === void 0) {
      options2 = {};
    }
    const {
      ancestorScroll = true,
      ancestorResize = true,
      elementResize = typeof ResizeObserver === "function",
      layoutShift = typeof IntersectionObserver === "function",
      animationFrame = false
    } = options2;
    const referenceEl = unwrapElement(reference);
    const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...getOverflowAncestors(floating)] : [];
    ancestors.forEach((ancestor) => {
      ancestorScroll && ancestor.addEventListener("scroll", update, {
        passive: true
      });
      ancestorResize && ancestor.addEventListener("resize", update);
    });
    const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
    let reobserveFrame = -1;
    let resizeObserver = null;
    if (elementResize) {
      resizeObserver = new ResizeObserver((_ref11) => {
        let [firstEntry] = _ref11;
        if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
          resizeObserver.unobserve(floating);
          cancelAnimationFrame(reobserveFrame);
          reobserveFrame = requestAnimationFrame(() => {
            var _resizeObserver;
            (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
          });
        }
        update();
      });
      if (referenceEl && !animationFrame) {
        resizeObserver.observe(referenceEl);
      }
      resizeObserver.observe(floating);
    }
    let frameId;
    let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
    if (animationFrame) {
      frameLoop();
    }
    function frameLoop() {
      const nextRefRect = getBoundingClientRect(reference);
      if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
        update();
      }
      prevRefRect = nextRefRect;
      frameId = requestAnimationFrame(frameLoop);
    }
    update();
    return () => {
      var _resizeObserver2;
      ancestors.forEach((ancestor) => {
        ancestorScroll && ancestor.removeEventListener("scroll", update);
        ancestorResize && ancestor.removeEventListener("resize", update);
      });
      cleanupIo == null || cleanupIo();
      (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
      resizeObserver = null;
      if (animationFrame) {
        cancelAnimationFrame(frameId);
      }
    };
  }
  var offset2 = offset;
  var shift2 = shift;
  var flip2 = flip;
  var size2 = size;
  var arrow2 = arrow;
  var limitShift2 = limitShift;
  var computePosition2 = (reference, floating, options2) => {
    const cache2 = /* @__PURE__ */ new Map();
    const mergedOptions = {
      platform,
      ...options2
    };
    const platformWithCache = {
      ...mergedOptions.platform,
      _c: cache2
    };
    return computePosition(reference, floating, {
      ...mergedOptions,
      platform: platformWithCache
    });
  };

  // node_modules/@ariakit/react-core/esm/__chunks/KW7Z5AIL.js
  var import_react28 = __toESM(require_react(), 1);
  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
  var TagName20 = "div";
  function createDOMRect(x2 = 0, y3 = 0, width = 0, height = 0) {
    if (typeof DOMRect === "function") {
      return new DOMRect(x2, y3, width, height);
    }
    const rect = {
      x: x2,
      y: y3,
      width,
      height,
      top: y3,
      right: x2 + width,
      bottom: y3 + height,
      left: x2
    };
    return { ...rect, toJSON: () => rect };
  }
  function getDOMRect(anchorRect) {
    if (!anchorRect) return createDOMRect();
    const { x: x2, y: y3, width, height } = anchorRect;
    return createDOMRect(x2, y3, width, height);
  }
  function getAnchorElement(anchorElement, getAnchorRect) {
    const contextElement = anchorElement || void 0;
    return {
      contextElement,
      getBoundingClientRect: () => {
        const anchor = anchorElement;
        const anchorRect = getAnchorRect == null ? void 0 : getAnchorRect(anchor);
        if (anchorRect || !anchor) {
          return getDOMRect(anchorRect);
        }
        return anchor.getBoundingClientRect();
      }
    };
  }
  function isValidPlacement(flip22) {
    return /^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(flip22);
  }
  function roundByDPR(value) {
    const dpr = window.devicePixelRatio || 1;
    return Math.round(value * dpr) / dpr;
  }
  function getOffsetMiddleware(arrowElement, props) {
    return offset2(({ placement }) => {
      var _a;
      const arrowOffset = ((arrowElement == null ? void 0 : arrowElement.clientHeight) || 0) / 2;
      const finalGutter = typeof props.gutter === "number" ? props.gutter + arrowOffset : (_a = props.gutter) != null ? _a : arrowOffset;
      const hasAlignment = !!placement.split("-")[1];
      return {
        crossAxis: !hasAlignment ? props.shift : void 0,
        mainAxis: finalGutter,
        alignmentAxis: props.shift
      };
    });
  }
  function getFlipMiddleware(props) {
    if (props.flip === false) return;
    const fallbackPlacements = typeof props.flip === "string" ? props.flip.split(" ") : void 0;
    invariant(
      !fallbackPlacements || fallbackPlacements.every(isValidPlacement),
      "`flip` expects a spaced-delimited list of placements"
    );
    return flip2({
      padding: props.overflowPadding,
      fallbackPlacements
    });
  }
  function getShiftMiddleware(props) {
    if (!props.slide && !props.overlap) return;
    return shift2({
      mainAxis: props.slide,
      crossAxis: props.overlap,
      padding: props.overflowPadding,
      limiter: limitShift2()
    });
  }
  function getSizeMiddleware(props) {
    return size2({
      padding: props.overflowPadding,
      apply({ elements: elements2, availableWidth, availableHeight, rects }) {
        const wrapper3 = elements2.floating;
        const referenceWidth = Math.round(rects.reference.width);
        availableWidth = Math.floor(availableWidth);
        availableHeight = Math.floor(availableHeight);
        wrapper3.style.setProperty(
          "--popover-anchor-width",
          `${referenceWidth}px`
        );
        wrapper3.style.setProperty(
          "--popover-available-width",
          `${availableWidth}px`
        );
        wrapper3.style.setProperty(
          "--popover-available-height",
          `${availableHeight}px`
        );
        if (props.sameWidth) {
          wrapper3.style.width = `${referenceWidth}px`;
        }
        if (props.fitViewport) {
          wrapper3.style.maxWidth = `${availableWidth}px`;
          wrapper3.style.maxHeight = `${availableHeight}px`;
        }
      }
    });
  }
  function getArrowMiddleware(arrowElement, props) {
    if (!arrowElement) return;
    return arrow2({
      element: arrowElement,
      padding: props.arrowPadding
    });
  }
  var usePopover = createHook(
    function usePopover2({
      store,
      modal = false,
      portal = !!modal,
      preserveTabOrder = true,
      autoFocusOnShow = true,
      wrapperProps,
      fixed = false,
      flip: flip22 = true,
      shift: shift22 = 0,
      slide = true,
      overlap = false,
      sameWidth = false,
      fitViewport = false,
      gutter,
      arrowPadding = 4,
      overflowPadding = 8,
      getAnchorRect,
      updatePosition,
      ...props
    }) {
      const context = usePopoverProviderContext();
      store = store || context;
      invariant(
        store,
        "Popover must receive a `store` prop or be wrapped in a PopoverProvider component."
      );
      const arrowElement = store.useState("arrowElement");
      const anchorElement = store.useState("anchorElement");
      const disclosureElement = store.useState("disclosureElement");
      const popoverElement = store.useState("popoverElement");
      const contentElement = store.useState("contentElement");
      const placement = store.useState("placement");
      const mounted = store.useState("mounted");
      const rendered = store.useState("rendered");
      const defaultArrowElementRef = (0, import_react28.useRef)(null);
      const [positioned, setPositioned] = (0, import_react28.useState)(false);
      const { portalRef, domReady } = usePortalRef(portal, props.portalRef);
      const getAnchorRectProp = useEvent(getAnchorRect);
      const updatePositionProp = useEvent(updatePosition);
      const hasCustomUpdatePosition = !!updatePosition;
      useSafeLayoutEffect(() => {
        if (!(popoverElement == null ? void 0 : popoverElement.isConnected)) return;
        popoverElement.style.setProperty(
          "--popover-overflow-padding",
          `${overflowPadding}px`
        );
        const anchor = getAnchorElement(anchorElement, getAnchorRectProp);
        const updatePosition2 = async () => {
          if (!mounted) return;
          if (!arrowElement) {
            defaultArrowElementRef.current = defaultArrowElementRef.current || document.createElement("div");
          }
          const arrow22 = arrowElement || defaultArrowElementRef.current;
          const middleware2 = [
            getOffsetMiddleware(arrow22, { gutter, shift: shift22 }),
            getFlipMiddleware({ flip: flip22, overflowPadding }),
            getShiftMiddleware({ slide, shift: shift22, overlap, overflowPadding }),
            getArrowMiddleware(arrow22, { arrowPadding }),
            getSizeMiddleware({
              sameWidth,
              fitViewport,
              overflowPadding
            })
          ];
          const pos = await computePosition2(anchor, popoverElement, {
            placement,
            strategy: fixed ? "fixed" : "absolute",
            middleware: middleware2
          });
          store == null ? void 0 : store.setState("currentPlacement", pos.placement);
          setPositioned(true);
          const x2 = roundByDPR(pos.x);
          const y3 = roundByDPR(pos.y);
          Object.assign(popoverElement.style, {
            top: "0",
            left: "0",
            transform: `translate3d(${x2}px,${y3}px,0)`
          });
          if (arrow22 && pos.middlewareData.arrow) {
            const { x: arrowX, y: arrowY } = pos.middlewareData.arrow;
            const side = pos.placement.split("-")[0];
            const centerX = arrow22.clientWidth / 2;
            const centerY = arrow22.clientHeight / 2;
            const originX = arrowX != null ? arrowX + centerX : -centerX;
            const originY = arrowY != null ? arrowY + centerY : -centerY;
            popoverElement.style.setProperty(
              "--popover-transform-origin",
              {
                top: `${originX}px calc(100% + ${centerY}px)`,
                bottom: `${originX}px ${-centerY}px`,
                left: `calc(100% + ${centerX}px) ${originY}px`,
                right: `${-centerX}px ${originY}px`
              }[side]
            );
            Object.assign(arrow22.style, {
              left: arrowX != null ? `${arrowX}px` : "",
              top: arrowY != null ? `${arrowY}px` : "",
              [side]: "100%"
            });
          }
        };
        const update = async () => {
          if (hasCustomUpdatePosition) {
            await updatePositionProp({ updatePosition: updatePosition2 });
            setPositioned(true);
          } else {
            await updatePosition2();
          }
        };
        const cancelAutoUpdate = autoUpdate(anchor, popoverElement, update, {
          // JSDOM doesn't support ResizeObserver
          elementResize: typeof ResizeObserver === "function"
        });
        return () => {
          setPositioned(false);
          cancelAutoUpdate();
        };
      }, [
        store,
        rendered,
        popoverElement,
        arrowElement,
        anchorElement,
        popoverElement,
        placement,
        mounted,
        domReady,
        fixed,
        flip22,
        shift22,
        slide,
        overlap,
        sameWidth,
        fitViewport,
        gutter,
        arrowPadding,
        overflowPadding,
        getAnchorRectProp,
        hasCustomUpdatePosition,
        updatePositionProp
      ]);
      useSafeLayoutEffect(() => {
        if (!mounted) return;
        if (!domReady) return;
        if (!(popoverElement == null ? void 0 : popoverElement.isConnected)) return;
        if (!(contentElement == null ? void 0 : contentElement.isConnected)) return;
        const applyZIndex = () => {
          popoverElement.style.zIndex = getComputedStyle(contentElement).zIndex;
        };
        applyZIndex();
        let raf = requestAnimationFrame(() => {
          raf = requestAnimationFrame(applyZIndex);
        });
        return () => cancelAnimationFrame(raf);
      }, [mounted, domReady, popoverElement, contentElement]);
      const position2 = fixed ? "fixed" : "absolute";
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
          "div",
          {
            ...wrapperProps,
            style: {
              // https://floating-ui.com/docs/computeposition#initial-layout
              position: position2,
              top: 0,
              left: 0,
              width: "max-content",
              ...wrapperProps == null ? void 0 : wrapperProps.style
            },
            ref: store == null ? void 0 : store.setPopoverElement,
            children: element
          }
        ),
        [store, position2, wrapperProps]
      );
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PopoverScopedContextProvider, { value: store, children: element }),
        [store]
      );
      props = {
        // data-placing is not part of the public API. We're setting this here so
        // we can wait for the popover to be positioned before other components
        // move focus into it. For example, this attribute is observed by the
        // Combobox component with the autoSelect behavior.
        "data-placing": !positioned || void 0,
        ...props,
        style: {
          position: "relative",
          ...props.style
        }
      };
      props = useDialog({
        store,
        modal,
        portal,
        preserveTabOrder,
        preserveTabOrderAnchor: disclosureElement || anchorElement,
        autoFocusOnShow: positioned && autoFocusOnShow,
        ...props,
        portalRef
      });
      return props;
    }
  );
  var Popover = createDialogComponent(
    forwardRef2(function Popover2(props) {
      const htmlProps = usePopover(props);
      return createElement(TagName20, htmlProps);
    }),
    usePopoverProviderContext
  );

  // node_modules/@ariakit/react-core/esm/__chunks/4HTVKX2Y.js
  var import_react29 = __toESM(require_react(), 1);
  var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
  var TagName21 = "div";
  function isMovingOnHovercard(target, card, anchor, nested) {
    if (hasFocusWithin(card)) return true;
    if (!target) return false;
    if (contains(card, target)) return true;
    if (anchor && contains(anchor, target)) return true;
    if (nested == null ? void 0 : nested.some((card2) => isMovingOnHovercard(target, card2, anchor))) {
      return true;
    }
    return false;
  }
  function useAutoFocusOnHide({
    store,
    ...props
  }) {
    const [autoFocusOnHide, setAutoFocusOnHide] = (0, import_react29.useState)(false);
    const mounted = store.useState("mounted");
    (0, import_react29.useEffect)(() => {
      if (!mounted) {
        setAutoFocusOnHide(false);
      }
    }, [mounted]);
    const onFocusProp = props.onFocus;
    const onFocus = useEvent((event) => {
      onFocusProp == null ? void 0 : onFocusProp(event);
      if (event.defaultPrevented) return;
      setAutoFocusOnHide(true);
    });
    const finalFocusRef = (0, import_react29.useRef)(null);
    (0, import_react29.useEffect)(() => {
      return sync(store, ["anchorElement"], (state) => {
        finalFocusRef.current = state.anchorElement;
      });
    }, []);
    props = {
      autoFocusOnHide,
      finalFocus: finalFocusRef,
      ...props,
      onFocus
    };
    return props;
  }
  var NestedHovercardContext = (0, import_react29.createContext)(null);
  var useHovercard = createHook(
    function useHovercard2({
      store,
      modal = false,
      portal = !!modal,
      hideOnEscape = true,
      hideOnHoverOutside = true,
      disablePointerEventsOnApproach = !!hideOnHoverOutside,
      ...props
    }) {
      const context = useHovercardProviderContext();
      store = store || context;
      invariant(
        store,
        "Hovercard must receive a `store` prop or be wrapped in a HovercardProvider component."
      );
      const ref = (0, import_react29.useRef)(null);
      const [nestedHovercards, setNestedHovercards] = (0, import_react29.useState)([]);
      const hideTimeoutRef = (0, import_react29.useRef)(0);
      const enterPointRef = (0, import_react29.useRef)(null);
      const { portalRef, domReady } = usePortalRef(portal, props.portalRef);
      const isMouseMoving = useIsMouseMoving();
      const mayHideOnHoverOutside = !!hideOnHoverOutside;
      const hideOnHoverOutsideProp = useBooleanEvent(hideOnHoverOutside);
      const mayDisablePointerEvents = !!disablePointerEventsOnApproach;
      const disablePointerEventsProp = useBooleanEvent(
        disablePointerEventsOnApproach
      );
      const open = store.useState("open");
      const mounted = store.useState("mounted");
      (0, import_react29.useEffect)(() => {
        if (!domReady) return;
        if (!mounted) return;
        if (!mayHideOnHoverOutside && !mayDisablePointerEvents) return;
        const element = ref.current;
        if (!element) return;
        const onMouseMove = (event) => {
          if (!store) return;
          if (!isMouseMoving()) return;
          const { anchorElement, hideTimeout, timeout } = store.getState();
          const enterPoint = enterPointRef.current;
          const [target] = event.composedPath();
          const anchor = anchorElement;
          if (isMovingOnHovercard(target, element, anchor, nestedHovercards)) {
            enterPointRef.current = target && anchor && contains(anchor, target) ? getEventPoint(event) : null;
            window.clearTimeout(hideTimeoutRef.current);
            hideTimeoutRef.current = 0;
            return;
          }
          if (hideTimeoutRef.current) return;
          if (enterPoint) {
            const currentPoint = getEventPoint(event);
            const polygon = getElementPolygon(element, enterPoint);
            if (isPointInPolygon(currentPoint, polygon)) {
              enterPointRef.current = currentPoint;
              if (!disablePointerEventsProp(event)) return;
              event.preventDefault();
              event.stopPropagation();
              return;
            }
          }
          if (!hideOnHoverOutsideProp(event)) return;
          hideTimeoutRef.current = window.setTimeout(() => {
            hideTimeoutRef.current = 0;
            store == null ? void 0 : store.hide();
          }, hideTimeout != null ? hideTimeout : timeout);
        };
        return chain(
          addGlobalEventListener("mousemove", onMouseMove, true),
          () => clearTimeout(hideTimeoutRef.current)
        );
      }, [
        store,
        isMouseMoving,
        domReady,
        mounted,
        mayHideOnHoverOutside,
        mayDisablePointerEvents,
        nestedHovercards,
        disablePointerEventsProp,
        hideOnHoverOutsideProp
      ]);
      (0, import_react29.useEffect)(() => {
        if (!domReady) return;
        if (!mounted) return;
        if (!mayDisablePointerEvents) return;
        const disableEvent = (event) => {
          const element = ref.current;
          if (!element) return;
          const enterPoint = enterPointRef.current;
          if (!enterPoint) return;
          const polygon = getElementPolygon(element, enterPoint);
          if (isPointInPolygon(getEventPoint(event), polygon)) {
            if (!disablePointerEventsProp(event)) return;
            event.preventDefault();
            event.stopPropagation();
          }
        };
        return chain(
          // Note: we may need to add pointer events here in the future.
          addGlobalEventListener("mouseenter", disableEvent, true),
          addGlobalEventListener("mouseover", disableEvent, true),
          addGlobalEventListener("mouseout", disableEvent, true),
          addGlobalEventListener("mouseleave", disableEvent, true)
        );
      }, [domReady, mounted, mayDisablePointerEvents, disablePointerEventsProp]);
      (0, import_react29.useEffect)(() => {
        if (!domReady) return;
        if (open) return;
        store == null ? void 0 : store.setAutoFocusOnShow(false);
      }, [store, domReady, open]);
      const openRef = useLiveRef(open);
      (0, import_react29.useEffect)(() => {
        if (!domReady) return;
        return () => {
          if (!openRef.current) {
            store == null ? void 0 : store.setAutoFocusOnShow(false);
          }
        };
      }, [store, domReady]);
      const registerOnParent = (0, import_react29.useContext)(NestedHovercardContext);
      useSafeLayoutEffect(() => {
        if (modal) return;
        if (!portal) return;
        if (!mounted) return;
        if (!domReady) return;
        const element = ref.current;
        if (!element) return;
        return registerOnParent == null ? void 0 : registerOnParent(element);
      }, [modal, portal, mounted, domReady]);
      const registerNestedHovercard = (0, import_react29.useCallback)(
        (element) => {
          setNestedHovercards((prevElements) => [...prevElements, element]);
          const parentUnregister = registerOnParent == null ? void 0 : registerOnParent(element);
          return () => {
            setNestedHovercards(
              (prevElements) => prevElements.filter((item2) => item2 !== element)
            );
            parentUnregister == null ? void 0 : parentUnregister();
          };
        },
        [registerOnParent]
      );
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(HovercardScopedContextProvider, { value: store, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(NestedHovercardContext.Provider, { value: registerNestedHovercard, children: element }) }),
        [store, registerNestedHovercard]
      );
      props = {
        ...props,
        ref: useMergeRefs(ref, props.ref)
      };
      props = useAutoFocusOnHide({ store, ...props });
      const autoFocusOnShow = store.useState(
        (state) => modal || state.autoFocusOnShow
      );
      props = usePopover({
        store,
        modal,
        portal,
        autoFocusOnShow,
        ...props,
        portalRef,
        hideOnEscape(event) {
          if (isFalsyBooleanCallback(hideOnEscape, event)) return false;
          requestAnimationFrame(() => {
            requestAnimationFrame(() => {
              store == null ? void 0 : store.hide();
            });
          });
          return true;
        }
      });
      return props;
    }
  );
  var Hovercard = createDialogComponent(
    forwardRef2(function Hovercard2(props) {
      const htmlProps = useHovercard(props);
      return createElement(TagName21, htmlProps);
    }),
    useHovercardProviderContext
  );

  // node_modules/@ariakit/react-core/esm/tooltip/tooltip.js
  var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
  var TagName22 = "div";
  var useTooltip = createHook(
    function useTooltip2({
      store,
      portal = true,
      gutter = 8,
      preserveTabOrder = false,
      hideOnHoverOutside = true,
      hideOnInteractOutside = true,
      ...props
    }) {
      const context = useTooltipProviderContext();
      store = store || context;
      invariant(
        store,
        "Tooltip must receive a `store` prop or be wrapped in a TooltipProvider component."
      );
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TooltipScopedContextProvider, { value: store, children: element }),
        [store]
      );
      const role = store.useState(
        (state) => state.type === "description" ? "tooltip" : "none"
      );
      props = { role, ...props };
      props = useHovercard({
        ...props,
        store,
        portal,
        gutter,
        preserveTabOrder,
        hideOnHoverOutside(event) {
          if (isFalsyBooleanCallback(hideOnHoverOutside, event)) return false;
          const anchorElement = store == null ? void 0 : store.getState().anchorElement;
          if (!anchorElement) return true;
          if ("focusVisible" in anchorElement.dataset) return false;
          return true;
        },
        hideOnInteractOutside: (event) => {
          if (isFalsyBooleanCallback(hideOnInteractOutside, event)) return false;
          const anchorElement = store == null ? void 0 : store.getState().anchorElement;
          if (!anchorElement) return true;
          if (contains(anchorElement, event.target)) return false;
          return true;
        }
      });
      return props;
    }
  );
  var Tooltip = createDialogComponent(
    forwardRef2(function Tooltip2(props) {
      const htmlProps = useTooltip(props);
      return createElement(TagName22, htmlProps);
    }),
    useTooltipProviderContext
  );

  // node_modules/@ariakit/react-core/esm/__chunks/2XVFVSLB.js
  var import_react30 = __toESM(require_react(), 1);
  var TagName23 = "a";
  var useHovercardAnchor = createHook(
    function useHovercardAnchor2({ store, showOnHover = true, ...props }) {
      const context = useHovercardProviderContext();
      store = store || context;
      invariant(
        store,
        "HovercardAnchor must receive a `store` prop or be wrapped in a HovercardProvider component."
      );
      const disabled = disabledFromProps(props);
      const showTimeoutRef = (0, import_react30.useRef)(0);
      (0, import_react30.useEffect)(() => () => window.clearTimeout(showTimeoutRef.current), []);
      (0, import_react30.useEffect)(() => {
        const onMouseLeave = (event) => {
          if (!store) return;
          const { anchorElement } = store.getState();
          if (!anchorElement) return;
          if (event.target !== anchorElement) return;
          window.clearTimeout(showTimeoutRef.current);
          showTimeoutRef.current = 0;
        };
        return addGlobalEventListener("mouseleave", onMouseLeave, true);
      }, [store]);
      const onMouseMoveProp = props.onMouseMove;
      const showOnHoverProp = useBooleanEvent(showOnHover);
      const isMouseMoving = useIsMouseMoving();
      const onMouseMove = useEvent((event) => {
        onMouseMoveProp == null ? void 0 : onMouseMoveProp(event);
        if (disabled) return;
        if (!store) return;
        if (event.defaultPrevented) return;
        if (showTimeoutRef.current) return;
        if (!isMouseMoving()) return;
        if (!showOnHoverProp(event)) return;
        const element = event.currentTarget;
        store.setAnchorElement(element);
        store.setDisclosureElement(element);
        const { showTimeout, timeout } = store.getState();
        const showHovercard = () => {
          showTimeoutRef.current = 0;
          if (!isMouseMoving()) return;
          store == null ? void 0 : store.setAnchorElement(element);
          store == null ? void 0 : store.show();
          queueMicrotask(() => {
            store == null ? void 0 : store.setDisclosureElement(element);
          });
        };
        const timeoutMs = showTimeout != null ? showTimeout : timeout;
        if (timeoutMs === 0) {
          showHovercard();
        } else {
          showTimeoutRef.current = window.setTimeout(showHovercard, timeoutMs);
        }
      });
      const onClickProp = props.onClick;
      const onClick = useEvent((event) => {
        onClickProp == null ? void 0 : onClickProp(event);
        if (!store) return;
        window.clearTimeout(showTimeoutRef.current);
        showTimeoutRef.current = 0;
      });
      const ref = (0, import_react30.useCallback)(
        (element) => {
          if (!store) return;
          const { anchorElement } = store.getState();
          if (anchorElement == null ? void 0 : anchorElement.isConnected) return;
          store.setAnchorElement(element);
        },
        [store]
      );
      props = {
        ...props,
        ref: useMergeRefs(ref, props.ref),
        onMouseMove,
        onClick
      };
      props = useFocusable(props);
      return props;
    }
  );
  var HovercardAnchor = forwardRef2(function HovercardAnchor2(props) {
    const htmlProps = useHovercardAnchor(props);
    return createElement(TagName23, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/tooltip/tooltip-anchor.js
  var import_react31 = __toESM(require_react(), 1);
  var TagName24 = "div";
  var globalStore = createStore({
    activeStore: null
  });
  function createRemoveStoreCallback(store) {
    return () => {
      const { activeStore } = globalStore.getState();
      if (activeStore !== store) return;
      globalStore.setState("activeStore", null);
    };
  }
  var useTooltipAnchor = createHook(
    function useTooltipAnchor2({ store, showOnHover = true, ...props }) {
      const context = useTooltipProviderContext();
      store = store || context;
      invariant(
        store,
        "TooltipAnchor must receive a `store` prop or be wrapped in a TooltipProvider component."
      );
      const canShowOnHoverRef = (0, import_react31.useRef)(false);
      (0, import_react31.useEffect)(() => {
        return sync(store, ["mounted"], (state) => {
          if (state.mounted) return;
          canShowOnHoverRef.current = false;
        });
      }, [store]);
      (0, import_react31.useEffect)(() => {
        if (!store) return;
        return chain(
          // Immediately remove the current store from the global store when
          // the component unmounts. This is useful, for example, to avoid
          // showing tooltips immediately on serial tests.
          createRemoveStoreCallback(store),
          sync(store, ["mounted", "skipTimeout"], (state) => {
            if (!store) return;
            if (state.mounted) {
              const { activeStore } = globalStore.getState();
              if (activeStore !== store) {
                activeStore == null ? void 0 : activeStore.hide();
              }
              return globalStore.setState("activeStore", store);
            }
            const id3 = setTimeout(
              createRemoveStoreCallback(store),
              state.skipTimeout
            );
            return () => clearTimeout(id3);
          })
        );
      }, [store]);
      const onMouseEnterProp = props.onMouseEnter;
      const onMouseEnter = useEvent((event) => {
        onMouseEnterProp == null ? void 0 : onMouseEnterProp(event);
        canShowOnHoverRef.current = true;
      });
      const onFocusVisibleProp = props.onFocusVisible;
      const onFocusVisible = useEvent((event) => {
        onFocusVisibleProp == null ? void 0 : onFocusVisibleProp(event);
        if (event.defaultPrevented) return;
        store == null ? void 0 : store.setAnchorElement(event.currentTarget);
        store == null ? void 0 : store.show();
      });
      const onBlurProp = props.onBlur;
      const onBlur = useEvent((event) => {
        onBlurProp == null ? void 0 : onBlurProp(event);
        if (event.defaultPrevented) return;
        const { activeStore } = globalStore.getState();
        canShowOnHoverRef.current = false;
        if (activeStore === store) {
          globalStore.setState("activeStore", null);
        }
      });
      const type = store.useState("type");
      const contentId = store.useState((state) => {
        var _a;
        return (_a = state.contentElement) == null ? void 0 : _a.id;
      });
      props = {
        "aria-labelledby": type === "label" ? contentId : void 0,
        ...props,
        onMouseEnter,
        onFocusVisible,
        onBlur
      };
      props = useHovercardAnchor({
        store,
        showOnHover(event) {
          if (!canShowOnHoverRef.current) return false;
          if (isFalsyBooleanCallback(showOnHover, event)) return false;
          const { activeStore } = globalStore.getState();
          if (!activeStore) return true;
          store == null ? void 0 : store.show();
          return false;
        },
        ...props
      });
      return props;
    }
  );
  var TooltipAnchor = forwardRef2(function TooltipAnchor2(props) {
    const htmlProps = useTooltipAnchor(props);
    return createElement(TagName24, htmlProps);
  });

  // node_modules/@ariakit/core/esm/__chunks/BFGNM53A.js
  function createPopoverStore({
    popover: otherPopover,
    ...props
  } = {}) {
    const store = mergeStore(
      props.store,
      omit2(otherPopover, [
        "arrowElement",
        "anchorElement",
        "contentElement",
        "popoverElement",
        "disclosureElement"
      ])
    );
    throwOnConflictingProps(props, store);
    const syncState = store == null ? void 0 : store.getState();
    const dialog = createDialogStore({ ...props, store });
    const placement = defaultValue(
      props.placement,
      syncState == null ? void 0 : syncState.placement,
      "bottom"
    );
    const initialState = {
      ...dialog.getState(),
      placement,
      currentPlacement: placement,
      anchorElement: defaultValue(syncState == null ? void 0 : syncState.anchorElement, null),
      popoverElement: defaultValue(syncState == null ? void 0 : syncState.popoverElement, null),
      arrowElement: defaultValue(syncState == null ? void 0 : syncState.arrowElement, null),
      rendered: /* @__PURE__ */ Symbol("rendered")
    };
    const popover = createStore(initialState, dialog, store);
    return {
      ...dialog,
      ...popover,
      setAnchorElement: (element) => popover.setState("anchorElement", element),
      setPopoverElement: (element) => popover.setState("popoverElement", element),
      setArrowElement: (element) => popover.setState("arrowElement", element),
      render: () => popover.setState("rendered", /* @__PURE__ */ Symbol("rendered"))
    };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/B6FLPFJM.js
  function usePopoverStoreProps(store, update, props) {
    useUpdateEffect(update, [props.popover]);
    useStoreProps(store, props, "placement");
    return useDialogStoreProps(store, update, props);
  }

  // node_modules/@ariakit/core/esm/__chunks/TIQDSBWP.js
  function createHovercardStore(props = {}) {
    var _a;
    const syncState = (_a = props.store) == null ? void 0 : _a.getState();
    const popover = createPopoverStore({
      ...props,
      placement: defaultValue(
        props.placement,
        syncState == null ? void 0 : syncState.placement,
        "bottom"
      )
    });
    const timeout = defaultValue(props.timeout, syncState == null ? void 0 : syncState.timeout, 500);
    const initialState = {
      ...popover.getState(),
      timeout,
      showTimeout: defaultValue(props.showTimeout, syncState == null ? void 0 : syncState.showTimeout),
      hideTimeout: defaultValue(props.hideTimeout, syncState == null ? void 0 : syncState.hideTimeout),
      autoFocusOnShow: defaultValue(syncState == null ? void 0 : syncState.autoFocusOnShow, false)
    };
    const hovercard = createStore(initialState, popover, props.store);
    return {
      ...popover,
      ...hovercard,
      setAutoFocusOnShow: (value) => hovercard.setState("autoFocusOnShow", value)
    };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/ECBEZ4YM.js
  function useHovercardStoreProps(store, update, props) {
    useStoreProps(store, props, "timeout");
    useStoreProps(store, props, "showTimeout");
    useStoreProps(store, props, "hideTimeout");
    return usePopoverStoreProps(store, update, props);
  }

  // node_modules/@ariakit/core/esm/tooltip/tooltip-store.js
  function createTooltipStore(props = {}) {
    var _a;
    if (true) {
      if (props.type === "label") {
        console.warn(
          "The `type` option on the tooltip store is deprecated.",
          "Render a visually hidden label or use the `aria-label` or `aria-labelledby` attributes on the anchor element instead.",
          "See https://ariakit.org/components/tooltip#tooltip-anchors-must-have-accessible-names"
        );
      }
    }
    const syncState = (_a = props.store) == null ? void 0 : _a.getState();
    const hovercard = createHovercardStore({
      ...props,
      placement: defaultValue(
        props.placement,
        syncState == null ? void 0 : syncState.placement,
        "top"
      ),
      hideTimeout: defaultValue(props.hideTimeout, syncState == null ? void 0 : syncState.hideTimeout, 0)
    });
    const initialState = {
      ...hovercard.getState(),
      type: defaultValue(props.type, syncState == null ? void 0 : syncState.type, "description"),
      skipTimeout: defaultValue(props.skipTimeout, syncState == null ? void 0 : syncState.skipTimeout, 300)
    };
    const tooltip = createStore(initialState, hovercard, props.store);
    return {
      ...hovercard,
      ...tooltip
    };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/FFWYDZCP.js
  function useTooltipStoreProps(store, update, props) {
    useStoreProps(store, props, "type");
    useStoreProps(store, props, "skipTimeout");
    return useHovercardStoreProps(store, update, props);
  }
  function useTooltipStore(props = {}) {
    const [store, update] = useStore(createTooltipStore, props);
    return useTooltipStoreProps(store, update, props);
  }

  // node_modules/@ariakit/react-core/esm/__chunks/2DUOQURA.js
  var import_react32 = __toESM(require_react(), 1);
  var menubar = createStoreContext(
    [CompositeContextProvider],
    [CompositeScopedContextProvider]
  );
  var useMenubarContext = menubar.useContext;
  var useMenubarScopedContext = menubar.useScopedContext;
  var useMenubarProviderContext = menubar.useProviderContext;
  var MenubarContextProvider = menubar.ContextProvider;
  var MenubarScopedContextProvider = menubar.ScopedContextProvider;
  var MenuItemCheckedContext = (0, import_react32.createContext)(
    void 0
  );

  // node_modules/@ariakit/react-core/esm/__chunks/4POTBZ2J.js
  var TagName25 = "div";
  var usePopoverAnchor = createHook(
    function usePopoverAnchor2({ store, ...props }) {
      const context = usePopoverProviderContext();
      store = store || context;
      props = {
        ...props,
        ref: useMergeRefs(store == null ? void 0 : store.setAnchorElement, props.ref)
      };
      return props;
    }
  );
  var PopoverAnchor = forwardRef2(function PopoverAnchor2(props) {
    const htmlProps = usePopoverAnchor(props);
    return createElement(TagName25, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/HMKTUWOU.js
  var import_react33 = __toESM(require_react(), 1);
  var TagName26 = "button";
  var useButton = createHook(
    function useButton2(props) {
      const ref = (0, import_react33.useRef)(null);
      const tagName = useTagName(ref, TagName26);
      const [isNativeButton, setIsNativeButton] = (0, import_react33.useState)(
        () => !!tagName && isButton({ tagName, type: props.type })
      );
      (0, import_react33.useEffect)(() => {
        if (!ref.current) return;
        setIsNativeButton(isButton(ref.current));
      }, []);
      props = {
        role: !isNativeButton && tagName !== "a" ? "button" : void 0,
        ...props,
        ref: useMergeRefs(ref, props.ref)
      };
      props = useCommand(props);
      return props;
    }
  );
  var Button = forwardRef2(function Button2(props) {
    const htmlProps = useButton(props);
    return createElement(TagName26, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/NDVACHQI.js
  var import_react34 = __toESM(require_react(), 1);
  var TagName27 = "button";
  var symbol2 = /* @__PURE__ */ Symbol("disclosure");
  var useDisclosure = createHook(
    function useDisclosure2({ store, toggleOnClick = true, ...props }) {
      const context = useDisclosureProviderContext();
      store = store || context;
      invariant(
        store,
        "Disclosure must receive a `store` prop or be wrapped in a DisclosureProvider component."
      );
      const ref = (0, import_react34.useRef)(null);
      const [expanded, setExpanded] = (0, import_react34.useState)(false);
      const disclosureElement = store.useState("disclosureElement");
      const open = store.useState("open");
      (0, import_react34.useEffect)(() => {
        let isCurrentDisclosure = disclosureElement === ref.current;
        if (!(disclosureElement == null ? void 0 : disclosureElement.isConnected)) {
          store == null ? void 0 : store.setDisclosureElement(ref.current);
          isCurrentDisclosure = true;
        }
        setExpanded(open && isCurrentDisclosure);
      }, [disclosureElement, store, open]);
      const onClickProp = props.onClick;
      const toggleOnClickProp = useBooleanEvent(toggleOnClick);
      const [isDuplicate, metadataProps] = useMetadataProps(props, symbol2, true);
      const onClick = useEvent((event) => {
        onClickProp == null ? void 0 : onClickProp(event);
        if (event.defaultPrevented) return;
        if (isDuplicate) return;
        if (!toggleOnClickProp(event)) return;
        store == null ? void 0 : store.setDisclosureElement(event.currentTarget);
        store == null ? void 0 : store.toggle();
      });
      const contentElement = store.useState("contentElement");
      props = {
        "aria-expanded": expanded,
        "aria-controls": contentElement == null ? void 0 : contentElement.id,
        ...metadataProps,
        ...props,
        ref: useMergeRefs(ref, props.ref),
        onClick
      };
      props = useButton(props);
      return props;
    }
  );
  var Disclosure = forwardRef2(function Disclosure2(props) {
    const htmlProps = useDisclosure(props);
    return createElement(TagName27, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/APVORPDK.js
  var TagName28 = "button";
  var useDialogDisclosure = createHook(
    function useDialogDisclosure2({ store, ...props }) {
      const context = useDialogProviderContext();
      store = store || context;
      invariant(
        store,
        "DialogDisclosure must receive a `store` prop or be wrapped in a DialogProvider component."
      );
      const contentElement = store.useState("contentElement");
      props = {
        "aria-haspopup": getPopupRole(contentElement, "dialog"),
        ...props
      };
      props = useDisclosure({ store, ...props });
      return props;
    }
  );
  var DialogDisclosure = forwardRef2(function DialogDisclosure2(props) {
    const htmlProps = useDialogDisclosure(props);
    return createElement(TagName28, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/RFRKSHIZ.js
  var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
  var TagName29 = "button";
  var usePopoverDisclosure = createHook(function usePopoverDisclosure2({ store, ...props }) {
    const context = usePopoverProviderContext();
    store = store || context;
    invariant(
      store,
      "PopoverDisclosure must receive a `store` prop or be wrapped in a PopoverProvider component."
    );
    const onClickProp = props.onClick;
    const onClick = useEvent((event) => {
      store == null ? void 0 : store.setAnchorElement(event.currentTarget);
      onClickProp == null ? void 0 : onClickProp(event);
    });
    props = useWrapElement(
      props,
      (element) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PopoverScopedContextProvider, { value: store, children: element }),
      [store]
    );
    props = {
      ...props,
      onClick
    };
    props = usePopoverAnchor({ store, ...props });
    props = useDialogDisclosure({ store, ...props });
    return props;
  });
  var PopoverDisclosure = forwardRef2(function PopoverDisclosure2(props) {
    const htmlProps = usePopoverDisclosure(props);
    return createElement(TagName29, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/37HM5VRA.js
  var import_react35 = __toESM(require_react(), 1);
  var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
  var TagName30 = "span";
  var pointsMap = {
    top: "4,10 8,6 12,10",
    right: "6,4 10,8 6,12",
    bottom: "4,6 8,10 12,6",
    left: "10,4 6,8 10,12"
  };
  var usePopoverDisclosureArrow = createHook(function usePopoverDisclosureArrow2({ store, placement, ...props }) {
    const context = usePopoverContext();
    store = store || context;
    invariant(
      store,
      "PopoverDisclosureArrow must be wrapped in a PopoverDisclosure component."
    );
    const position2 = store.useState((state) => placement || state.placement);
    const dir = position2.split("-")[0];
    const points = pointsMap[dir];
    const children = (0, import_react35.useMemo)(
      () => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
        "svg",
        {
          display: "block",
          fill: "none",
          stroke: "currentColor",
          strokeLinecap: "round",
          strokeLinejoin: "round",
          strokeWidth: 1.5,
          viewBox: "0 0 16 16",
          height: "1em",
          width: "1em",
          children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("polyline", { points })
        }
      ),
      [points]
    );
    props = {
      children,
      "aria-hidden": true,
      ...props,
      style: {
        width: "1em",
        height: "1em",
        pointerEvents: "none",
        ...props.style
      }
    };
    return removeUndefinedValues(props);
  });
  var PopoverDisclosureArrow = forwardRef2(
    function PopoverDisclosureArrow2(props) {
      const htmlProps = usePopoverDisclosureArrow(props);
      return createElement(TagName30, htmlProps);
    }
  );

  // node_modules/@ariakit/react-core/esm/__chunks/QOZ6WMRY.js
  var ctx12 = createStoreContext(
    [CompositeContextProvider],
    [CompositeScopedContextProvider]
  );
  var useRadioContext = ctx12.useContext;
  var useRadioScopedContext = ctx12.useScopedContext;
  var useRadioProviderContext = ctx12.useProviderContext;
  var RadioContextProvider = ctx12.ContextProvider;
  var RadioScopedContextProvider = ctx12.ScopedContextProvider;

  // node_modules/@ariakit/react-core/esm/__chunks/5TKKKQCL.js
  var import_react36 = __toESM(require_react(), 1);
  var TagName31 = "input";
  function getIsChecked(value, storeValue) {
    if (storeValue === void 0) return;
    if (value != null && storeValue != null) {
      return storeValue === value;
    }
    return !!storeValue;
  }
  function isNativeRadio(tagName, type) {
    return tagName === "input" && (!type || type === "radio");
  }
  var useRadio = createHook(function useRadio2({
    store,
    name,
    value,
    checked,
    ...props
  }) {
    const context = useRadioContext();
    store = store || context;
    const id3 = useId(props.id);
    const ref = (0, import_react36.useRef)(null);
    const isChecked = useStoreState(
      store,
      (state) => checked != null ? checked : getIsChecked(value, state == null ? void 0 : state.value)
    );
    (0, import_react36.useEffect)(() => {
      if (!id3) return;
      if (!isChecked) return;
      const isActiveItem = (store == null ? void 0 : store.getState().activeId) === id3;
      if (isActiveItem) return;
      store == null ? void 0 : store.setActiveId(id3);
    }, [store, isChecked, id3]);
    const onChangeProp = props.onChange;
    const tagName = useTagName(ref, TagName31);
    const nativeRadio = isNativeRadio(tagName, props.type);
    const disabled = disabledFromProps(props);
    const [propertyUpdated, schedulePropertyUpdate] = useForceUpdate();
    (0, import_react36.useEffect)(() => {
      const element = ref.current;
      if (!element) return;
      if (nativeRadio) return;
      if (isChecked !== void 0) {
        element.checked = isChecked;
      }
      if (name !== void 0) {
        element.name = name;
      }
      if (value !== void 0) {
        element.value = `${value}`;
      }
    }, [propertyUpdated, nativeRadio, isChecked, name, value]);
    const onChange = useEvent((event) => {
      if (disabled) {
        event.preventDefault();
        event.stopPropagation();
        return;
      }
      if ((store == null ? void 0 : store.getState().value) === value) return;
      if (!nativeRadio) {
        event.currentTarget.checked = true;
        schedulePropertyUpdate();
      }
      onChangeProp == null ? void 0 : onChangeProp(event);
      if (event.defaultPrevented) return;
      store == null ? void 0 : store.setValue(value);
    });
    const onClickProp = props.onClick;
    const onClick = useEvent((event) => {
      onClickProp == null ? void 0 : onClickProp(event);
      if (event.defaultPrevented) return;
      if (nativeRadio) return;
      onChange(event);
    });
    const onFocusProp = props.onFocus;
    const onFocus = useEvent((event) => {
      onFocusProp == null ? void 0 : onFocusProp(event);
      if (event.defaultPrevented) return;
      if (!nativeRadio) return;
      if (!store) return;
      const { moves, activeId } = store.getState();
      if (!moves) return;
      if (id3 && activeId !== id3) return;
      onChange(event);
    });
    props = {
      id: id3,
      role: !nativeRadio ? "radio" : void 0,
      type: nativeRadio ? "radio" : void 0,
      "aria-checked": isChecked,
      ...props,
      ref: useMergeRefs(ref, props.ref),
      onChange,
      onClick,
      onFocus
    };
    props = useCompositeItem({
      store,
      clickOnEnter: !nativeRadio,
      ...props
    });
    return removeUndefinedValues({
      name: nativeRadio ? name : void 0,
      value: nativeRadio ? value : void 0,
      checked: isChecked,
      ...props
    });
  });
  var Radio = memo2(
    forwardRef2(function Radio2(props) {
      const htmlProps = useRadio(props);
      return createElement(TagName31, htmlProps);
    })
  );

  // node_modules/@ariakit/react-core/esm/radio/radio-group.js
  var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
  var TagName32 = "div";
  var useRadioGroup = createHook(
    function useRadioGroup2({ store, ...props }) {
      const context = useRadioProviderContext();
      store = store || context;
      invariant(
        store,
        "RadioGroup must receive a `store` prop or be wrapped in a RadioProvider component."
      );
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(RadioScopedContextProvider, { value: store, children: element }),
        [store]
      );
      props = {
        role: "radiogroup",
        ...props
      };
      props = useComposite({ store, ...props });
      return props;
    }
  );
  var RadioGroup = forwardRef2(function RadioGroup2(props) {
    const htmlProps = useRadioGroup(props);
    return createElement(TagName32, htmlProps);
  });

  // node_modules/@ariakit/core/esm/radio/radio-store.js
  function createRadioStore({
    ...props
  } = {}) {
    var _a;
    const syncState = (_a = props.store) == null ? void 0 : _a.getState();
    const composite = createCompositeStore({
      ...props,
      focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
    });
    const initialState = {
      ...composite.getState(),
      value: defaultValue(
        props.value,
        syncState == null ? void 0 : syncState.value,
        props.defaultValue,
        null
      )
    };
    const radio = createStore(initialState, composite, props.store);
    return {
      ...composite,
      ...radio,
      setValue: (value) => radio.setState("value", value)
    };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/EBNR6XRJ.js
  function useRadioStoreProps(store, update, props) {
    store = useCompositeStoreProps(store, update, props);
    useStoreProps(store, props, "value", "setValue");
    return store;
  }
  function useRadioStore(props = {}) {
    const [store, update] = useStore(createRadioStore, props);
    return useRadioStoreProps(store, update, props);
  }

  // node_modules/@ariakit/react-core/esm/__chunks/N5BMKDVD.js
  var TagName33 = "span";
  var useSelectArrow = createHook(
    function useSelectArrow2({ store, ...props }) {
      const context = useSelectContext();
      store = store || context;
      props = usePopoverDisclosureArrow({ store, ...props });
      return props;
    }
  );
  var SelectArrow = forwardRef2(function SelectArrow2(props) {
    const htmlProps = useSelectArrow(props);
    return createElement(TagName33, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/FORDJ4GP.js
  var import_react37 = __toESM(require_react(), 1);
  var TagName34 = "div";
  var chars = "";
  function clearChars() {
    chars = "";
  }
  function isValidTypeaheadEvent(event) {
    const target = event.target;
    if (target && isTextField(target)) return false;
    if (event.key === " " && chars.length) return true;
    return event.key.length === 1 && !event.ctrlKey && !event.altKey && !event.metaKey && /^[\p{Letter}\p{Number}]$/u.test(event.key);
  }
  function isSelfTargetOrItem(event, items) {
    if (isSelfTarget(event)) return true;
    const target = event.target;
    if (!target) return false;
    const isItem2 = items.some((item2) => item2.element === target);
    return isItem2;
  }
  function getEnabledItems2(items) {
    return items.filter((item2) => !item2.disabled);
  }
  function itemTextStartsWith(item2, text) {
    var _a;
    const itemText = ((_a = item2.element) == null ? void 0 : _a.textContent) || item2.children || // The composite item object itself doesn't include a value property, but
    // other components like Select do. Since CompositeTypeahead is a generic
    // component that can be used with those as well, we also consider the value
    // property as a fallback for the typeahead text content.
    "value" in item2 && item2.value;
    if (!itemText) return false;
    return normalizeString(itemText).trim().toLowerCase().startsWith(text.toLowerCase());
  }
  function getSameInitialItems(items, char2, activeId) {
    if (!activeId) return items;
    const activeItem = items.find((item2) => item2.id === activeId);
    if (!activeItem) return items;
    if (!itemTextStartsWith(activeItem, char2)) return items;
    if (chars !== char2 && itemTextStartsWith(activeItem, chars)) return items;
    chars = char2;
    return flipItems(
      items.filter((item2) => itemTextStartsWith(item2, chars)),
      activeId
    ).filter((item2) => item2.id !== activeId);
  }
  var useCompositeTypeahead = createHook(function useCompositeTypeahead2({ store, typeahead = true, ...props }) {
    const context = useCompositeContext();
    store = store || context;
    invariant(
      store,
      "CompositeTypeahead must be a Composite component"
    );
    const onKeyDownCaptureProp = props.onKeyDownCapture;
    const cleanupTimeoutRef = (0, import_react37.useRef)(0);
    const onKeyDownCapture = useEvent((event) => {
      onKeyDownCaptureProp == null ? void 0 : onKeyDownCaptureProp(event);
      if (event.defaultPrevented) return;
      if (!typeahead) return;
      if (!store) return;
      if (!isValidTypeaheadEvent(event)) {
        return clearChars();
      }
      const { renderedItems, items, activeId, id: id3 } = store.getState();
      let enabledItems = getEnabledItems2(
        items.length > renderedItems.length ? items : renderedItems
      );
      const document2 = getDocument(event.currentTarget);
      const selector2 = `[data-offscreen-id="${id3}"]`;
      const offscreenItems = document2.querySelectorAll(selector2);
      for (const element of offscreenItems) {
        const disabled = element.ariaDisabled === "true" || "disabled" in element && !!element.disabled;
        enabledItems.push({ id: element.id, element, disabled });
      }
      if (offscreenItems.length) {
        enabledItems = sortBasedOnDOMPosition(enabledItems, (i3) => i3.element);
      }
      if (!isSelfTargetOrItem(event, enabledItems)) return clearChars();
      event.preventDefault();
      window.clearTimeout(cleanupTimeoutRef.current);
      cleanupTimeoutRef.current = window.setTimeout(() => {
        chars = "";
      }, 500);
      const char2 = event.key.toLowerCase();
      chars += char2;
      enabledItems = getSameInitialItems(enabledItems, char2, activeId);
      const item2 = enabledItems.find((item22) => itemTextStartsWith(item22, chars));
      if (item2) {
        store.move(item2.id);
      } else {
        clearChars();
      }
    });
    props = {
      ...props,
      onKeyDownCapture
    };
    return removeUndefinedValues(props);
  });
  var CompositeTypeahead = forwardRef2(function CompositeTypeahead2(props) {
    const htmlProps = useCompositeTypeahead(props);
    return createElement(TagName34, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/select/select.js
  var import_react38 = __toESM(require_react(), 1);
  var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
  var TagName35 = "button";
  function getSelectedValues(select) {
    return Array.from(select.selectedOptions).map((option) => option.value);
  }
  function nextWithValue(store, next2) {
    return () => {
      const nextId = next2();
      if (!nextId) return;
      let i3 = 0;
      let nextItem = store.item(nextId);
      const firstItem = nextItem;
      while (nextItem && nextItem.value == null) {
        const nextId2 = next2(++i3);
        if (!nextId2) return;
        nextItem = store.item(nextId2);
        if (nextItem === firstItem) break;
      }
      return nextItem == null ? void 0 : nextItem.id;
    };
  }
  var useSelect = createHook(function useSelect2({
    store,
    name,
    form,
    required,
    showOnKeyDown = true,
    moveOnKeyDown = true,
    toggleOnPress = true,
    toggleOnClick = toggleOnPress,
    ...props
  }) {
    const context = useSelectProviderContext();
    store = store || context;
    invariant(
      store,
      "Select must receive a `store` prop or be wrapped in a SelectProvider component."
    );
    const onKeyDownProp = props.onKeyDown;
    const showOnKeyDownProp = useBooleanEvent(showOnKeyDown);
    const moveOnKeyDownProp = useBooleanEvent(moveOnKeyDown);
    const placement = store.useState("placement");
    const dir = placement.split("-")[0];
    const value = store.useState("value");
    const multiSelectable = Array.isArray(value);
    const onKeyDown = useEvent((event) => {
      var _a;
      onKeyDownProp == null ? void 0 : onKeyDownProp(event);
      if (event.defaultPrevented) return;
      if (!store) return;
      const { orientation, items: items2, activeId } = store.getState();
      const isVertical = orientation !== "horizontal";
      const isHorizontal = orientation !== "vertical";
      const isGrid2 = !!((_a = items2.find((item2) => !item2.disabled && item2.value != null)) == null ? void 0 : _a.rowId);
      const moveKeyMap = {
        ArrowUp: (isGrid2 || isVertical) && nextWithValue(store, store.up),
        ArrowRight: (isGrid2 || isHorizontal) && nextWithValue(store, store.next),
        ArrowDown: (isGrid2 || isVertical) && nextWithValue(store, store.down),
        ArrowLeft: (isGrid2 || isHorizontal) && nextWithValue(store, store.previous)
      };
      const getId = moveKeyMap[event.key];
      if (getId && moveOnKeyDownProp(event)) {
        event.preventDefault();
        store.move(getId());
      }
      const isTopOrBottom = dir === "top" || dir === "bottom";
      const isLeft = dir === "left";
      const isRight = dir === "right";
      const canShowKeyMap = {
        ArrowDown: isTopOrBottom,
        ArrowUp: isTopOrBottom,
        ArrowLeft: isLeft,
        ArrowRight: isRight
      };
      const canShow = canShowKeyMap[event.key];
      if (canShow && showOnKeyDownProp(event)) {
        event.preventDefault();
        store.move(activeId);
        queueBeforeEvent(event.currentTarget, "keyup", store.show);
      }
    });
    props = useWrapElement(
      props,
      (element) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SelectScopedContextProvider, { value: store, children: element }),
      [store]
    );
    const [autofill, setAutofill] = (0, import_react38.useState)(false);
    const nativeSelectChangedRef = (0, import_react38.useRef)(false);
    (0, import_react38.useEffect)(() => {
      const nativeSelectChanged = nativeSelectChangedRef.current;
      nativeSelectChangedRef.current = false;
      if (nativeSelectChanged) return;
      setAutofill(false);
    }, [value]);
    const labelId = store.useState((state) => {
      var _a;
      return (_a = state.labelElement) == null ? void 0 : _a.id;
    });
    const label = props["aria-label"];
    const labelledBy = props["aria-labelledby"] || labelId;
    const items = store.useState((state) => {
      if (!name) return;
      return state.items;
    });
    const values = (0, import_react38.useMemo)(() => {
      return [...new Set(items == null ? void 0 : items.map((i3) => i3.value).filter((v3) => v3 != null))];
    }, [items]);
    props = useWrapElement(
      props,
      (element) => {
        if (!name) return element;
        return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
            "select",
            {
              style: {
                border: 0,
                clip: "rect(0 0 0 0)",
                height: "1px",
                margin: "-1px",
                overflow: "hidden",
                padding: 0,
                position: "absolute",
                whiteSpace: "nowrap",
                width: "1px"
              },
              tabIndex: -1,
              "aria-hidden": true,
              "aria-label": label,
              "aria-labelledby": labelledBy,
              name,
              form,
              required,
              disabled: props.disabled,
              value,
              multiple: multiSelectable,
              onFocus: () => {
                var _a;
                return (_a = store == null ? void 0 : store.getState().selectElement) == null ? void 0 : _a.focus();
              },
              onChange: (event) => {
                nativeSelectChangedRef.current = true;
                setAutofill(true);
                store == null ? void 0 : store.setValue(
                  multiSelectable ? getSelectedValues(event.target) : event.target.value
                );
              },
              children: [
                toArray(value).map((value2) => {
                  if (value2 == null) return null;
                  if (values.includes(value2)) return null;
                  return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("option", { value: value2, children: value2 }, value2);
                }),
                values.map((value2) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("option", { value: value2, children: value2 }, value2))
              ]
            }
          ),
          element
        ] });
      },
      [
        store,
        label,
        labelledBy,
        name,
        form,
        required,
        value,
        multiSelectable,
        values,
        props.disabled
      ]
    );
    const children = /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
      value,
      /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SelectArrow, {})
    ] });
    const contentElement = store.useState("contentElement");
    props = {
      role: "combobox",
      "aria-autocomplete": "none",
      "aria-labelledby": labelId,
      "aria-haspopup": getPopupRole(contentElement, "listbox"),
      "data-autofill": autofill || void 0,
      "data-name": name,
      children,
      ...props,
      ref: useMergeRefs(store.setSelectElement, props.ref),
      onKeyDown
    };
    props = usePopoverDisclosure({ store, toggleOnClick, ...props });
    props = useCompositeTypeahead({ store, ...props });
    return props;
  });
  var Select = forwardRef2(function Select2(props) {
    const htmlProps = useSelect(props);
    return createElement(TagName35, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/7HVFURXT.js
  var import_react39 = __toESM(require_react(), 1);
  var GroupLabelContext = (0, import_react39.createContext)(void 0);

  // node_modules/@ariakit/react-core/esm/__chunks/Y6I7WX7H.js
  var import_react40 = __toESM(require_react(), 1);
  var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
  var TagName36 = "div";
  var useGroup = createHook(
    function useGroup2(props) {
      const [labelId, setLabelId] = (0, import_react40.useState)();
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(GroupLabelContext.Provider, { value: setLabelId, children: element }),
        []
      );
      props = {
        role: "group",
        "aria-labelledby": labelId,
        ...props
      };
      return removeUndefinedValues(props);
    }
  );
  var Group = forwardRef2(function Group2(props) {
    const htmlProps = useGroup(props);
    return createElement(TagName36, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/XXOHUFXO.js
  var TagName37 = "div";
  var useCompositeGroup = createHook(
    function useCompositeGroup2({ store, ...props }) {
      props = useGroup(props);
      return props;
    }
  );
  var CompositeGroup = forwardRef2(function CompositeGroup2(props) {
    const htmlProps = useCompositeGroup(props);
    return createElement(TagName37, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/NH3GYEZ7.js
  var import_react41 = __toESM(require_react(), 1);
  var TagName38 = "div";
  var useGroupLabel = createHook(
    function useGroupLabel2(props) {
      const setLabelId = (0, import_react41.useContext)(GroupLabelContext);
      const id3 = useId(props.id);
      useSafeLayoutEffect(() => {
        setLabelId == null ? void 0 : setLabelId(id3);
        return () => setLabelId == null ? void 0 : setLabelId(void 0);
      }, [setLabelId, id3]);
      props = {
        id: id3,
        "aria-hidden": true,
        ...props
      };
      return removeUndefinedValues(props);
    }
  );
  var GroupLabel = forwardRef2(function GroupLabel2(props) {
    const htmlProps = useGroupLabel(props);
    return createElement(TagName38, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/JUZDESDO.js
  var TagName39 = "div";
  var useCompositeGroupLabel = createHook(function useCompositeGroupLabel2({ store, ...props }) {
    props = useGroupLabel(props);
    return props;
  });
  var CompositeGroupLabel = forwardRef2(function CompositeGroupLabel2(props) {
    const htmlProps = useCompositeGroupLabel(props);
    return createElement(TagName39, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/X6LNAU2F.js
  var import_react42 = __toESM(require_react(), 1);
  var TagName40 = "div";
  function getMouseDestination(event) {
    const relatedTarget = event.relatedTarget;
    if ((relatedTarget == null ? void 0 : relatedTarget.nodeType) === Node.ELEMENT_NODE) {
      return relatedTarget;
    }
    return null;
  }
  function hoveringInside(event) {
    const nextElement = getMouseDestination(event);
    if (!nextElement) return false;
    return contains(event.currentTarget, nextElement);
  }
  var symbol3 = /* @__PURE__ */ Symbol("composite-hover");
  function movingToAnotherItem(event) {
    let dest = getMouseDestination(event);
    if (!dest) return false;
    do {
      if (hasOwnProperty(dest, symbol3) && dest[symbol3]) return true;
      dest = dest.parentElement;
    } while (dest);
    return false;
  }
  var useCompositeHover = createHook(
    function useCompositeHover2({
      store,
      focusOnHover = true,
      blurOnHoverEnd = !!focusOnHover,
      ...props
    }) {
      const context = useCompositeContext();
      store = store || context;
      invariant(
        store,
        "CompositeHover must be wrapped in a Composite component."
      );
      const isMouseMoving = useIsMouseMoving();
      const onMouseMoveProp = props.onMouseMove;
      const focusOnHoverProp = useBooleanEvent(focusOnHover);
      const onMouseMove = useEvent((event) => {
        onMouseMoveProp == null ? void 0 : onMouseMoveProp(event);
        if (event.defaultPrevented) return;
        if (!isMouseMoving()) return;
        if (!focusOnHoverProp(event)) return;
        if (!hasFocusWithin(event.currentTarget)) {
          const baseElement = store == null ? void 0 : store.getState().baseElement;
          if (baseElement && !hasFocus(baseElement)) {
            baseElement.focus();
          }
        }
        store == null ? void 0 : store.setActiveId(event.currentTarget.id);
      });
      const onMouseLeaveProp = props.onMouseLeave;
      const blurOnHoverEndProp = useBooleanEvent(blurOnHoverEnd);
      const onMouseLeave = useEvent((event) => {
        var _a;
        onMouseLeaveProp == null ? void 0 : onMouseLeaveProp(event);
        if (event.defaultPrevented) return;
        if (!isMouseMoving()) return;
        if (hoveringInside(event)) return;
        if (movingToAnotherItem(event)) return;
        if (!focusOnHoverProp(event)) return;
        if (!blurOnHoverEndProp(event)) return;
        store == null ? void 0 : store.setActiveId(null);
        (_a = store == null ? void 0 : store.getState().baseElement) == null ? void 0 : _a.focus();
      });
      const ref = (0, import_react42.useCallback)((element) => {
        if (!element) return;
        element[symbol3] = true;
      }, []);
      props = {
        ...props,
        ref: useMergeRefs(ref, props.ref),
        onMouseMove,
        onMouseLeave
      };
      return removeUndefinedValues(props);
    }
  );
  var CompositeHover = memo2(
    forwardRef2(function CompositeHover2(props) {
      const htmlProps = useCompositeHover(props);
      return createElement(TagName40, htmlProps);
    })
  );

  // node_modules/@ariakit/react-core/esm/__chunks/4M2S6L5P.js
  var import_react43 = __toESM(require_react(), 1);
  var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
  var TagName41 = "div";
  function isSelected(storeValue, itemValue) {
    if (itemValue == null) return;
    if (storeValue == null) return false;
    if (Array.isArray(storeValue)) {
      return storeValue.includes(itemValue);
    }
    return storeValue === itemValue;
  }
  var useSelectItem = createHook(
    function useSelectItem2({
      store,
      value,
      getItem: getItemProp,
      hideOnClick,
      setValueOnClick = value != null,
      preventScrollOnKeyDown = true,
      focusOnHover = true,
      ...props
    }) {
      var _a;
      const context = useSelectScopedContext();
      store = store || context;
      invariant(
        store,
        "SelectItem must be wrapped in a SelectList or SelectPopover component."
      );
      const id3 = useId(props.id);
      const disabled = disabledFromProps(props);
      const { listElement, multiSelectable, selected, autoFocus } = useStoreStateObject(store, {
        listElement: "listElement",
        multiSelectable(state) {
          return Array.isArray(state.value);
        },
        selected(state) {
          return isSelected(state.value, value);
        },
        autoFocus(state) {
          if (value == null) return false;
          if (state.value == null) return false;
          if (state.activeId !== id3 && (store == null ? void 0 : store.item(state.activeId))) {
            return false;
          }
          if (Array.isArray(state.value)) {
            return state.value[state.value.length - 1] === value;
          }
          return state.value === value;
        }
      });
      const getItem = (0, import_react43.useCallback)(
        (item2) => {
          const nextItem = {
            ...item2,
            value: disabled ? void 0 : value,
            children: value
          };
          if (getItemProp) {
            return getItemProp(nextItem);
          }
          return nextItem;
        },
        [disabled, value, getItemProp]
      );
      hideOnClick = hideOnClick != null ? hideOnClick : value != null && !multiSelectable;
      const onClickProp = props.onClick;
      const setValueOnClickProp = useBooleanEvent(setValueOnClick);
      const hideOnClickProp = useBooleanEvent(hideOnClick);
      const onClick = useEvent((event) => {
        onClickProp == null ? void 0 : onClickProp(event);
        if (event.defaultPrevented) return;
        if (isDownloading(event)) return;
        if (isOpeningInNewTab(event)) return;
        if (setValueOnClickProp(event) && value != null) {
          store == null ? void 0 : store.setValue((prevValue) => {
            if (!Array.isArray(prevValue)) return value;
            if (prevValue.includes(value)) {
              return prevValue.filter((v3) => v3 !== value);
            }
            return [...prevValue, value];
          });
        }
        if (hideOnClickProp(event)) {
          store == null ? void 0 : store.hide();
        }
      });
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SelectItemCheckedContext.Provider, { value: selected != null ? selected : false, children: element }),
        [selected]
      );
      props = {
        id: id3,
        role: getPopupItemRole(listElement),
        "aria-selected": selected,
        children: value,
        ...props,
        autoFocus: (_a = props.autoFocus) != null ? _a : autoFocus,
        onClick
      };
      props = useCompositeItem({
        store,
        getItem,
        preventScrollOnKeyDown,
        ...props
      });
      const focusOnHoverProp = useBooleanEvent(focusOnHover);
      props = useCompositeHover({
        store,
        ...props,
        // We have to disable focusOnHover when the popup is closed, otherwise
        // the active item will change to null (the container) when the popup is
        // closed by clicking on an item.
        focusOnHover(event) {
          if (!focusOnHoverProp(event)) return false;
          const state = store == null ? void 0 : store.getState();
          return !!(state == null ? void 0 : state.open);
        }
      });
      return props;
    }
  );
  var SelectItem = memo2(
    forwardRef2(function SelectItem2(props) {
      const htmlProps = useSelectItem(props);
      return createElement(TagName41, htmlProps);
    })
  );

  // node_modules/@ariakit/react-core/esm/__chunks/EYKMH5G5.js
  var import_react44 = __toESM(require_react(), 1);
  var CheckboxCheckedContext = (0, import_react44.createContext)(false);

  // node_modules/@ariakit/react-core/esm/__chunks/HOITXJDS.js
  var import_react45 = __toESM(require_react(), 1);
  var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
  var TagName42 = "span";
  var checkmark = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
    "svg",
    {
      display: "block",
      fill: "none",
      stroke: "currentColor",
      strokeLinecap: "round",
      strokeLinejoin: "round",
      strokeWidth: 1.5,
      viewBox: "0 0 16 16",
      height: "1em",
      width: "1em",
      children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("polyline", { points: "4,8 7,12 12,4" })
    }
  );
  function getChildren(props) {
    if (props.checked) {
      return props.children || checkmark;
    }
    if (typeof props.children === "function") {
      return props.children;
    }
    return null;
  }
  var useCheckboxCheck = createHook(
    function useCheckboxCheck2({ store, checked, ...props }) {
      const context = (0, import_react45.useContext)(CheckboxCheckedContext);
      checked = checked != null ? checked : context;
      const children = getChildren({ checked, children: props.children });
      props = {
        "aria-hidden": true,
        ...props,
        children,
        style: {
          width: "1em",
          height: "1em",
          pointerEvents: "none",
          ...props.style
        }
      };
      return removeUndefinedValues(props);
    }
  );
  var CheckboxCheck = forwardRef2(function CheckboxCheck2(props) {
    const htmlProps = useCheckboxCheck(props);
    return createElement(TagName42, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/select/select-item-check.js
  var import_react46 = __toESM(require_react(), 1);
  var TagName43 = "span";
  var useSelectItemCheck = createHook(
    function useSelectItemCheck2({ store, checked, ...props }) {
      const context = (0, import_react46.useContext)(SelectItemCheckedContext);
      checked = checked != null ? checked : context;
      props = useCheckboxCheck({ ...props, checked });
      return props;
    }
  );
  var SelectItemCheck = forwardRef2(function SelectItemCheck2(props) {
    const htmlProps = useSelectItemCheck(props);
    return createElement(TagName43, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/select/select-label.js
  var TagName44 = "div";
  var useSelectLabel = createHook(
    function useSelectLabel2({ store, ...props }) {
      const context = useSelectProviderContext();
      store = store || context;
      invariant(
        store,
        "SelectLabel must receive a `store` prop or be wrapped in a SelectProvider component."
      );
      const id3 = useId(props.id);
      const onClickProp = props.onClick;
      const onClick = useEvent((event) => {
        onClickProp == null ? void 0 : onClickProp(event);
        if (event.defaultPrevented) return;
        queueMicrotask(() => {
          const select = store == null ? void 0 : store.getState().selectElement;
          select == null ? void 0 : select.focus();
        });
      });
      props = {
        id: id3,
        ...props,
        ref: useMergeRefs(store.setLabelElement, props.ref),
        onClick,
        style: {
          cursor: "default",
          ...props.style
        }
      };
      return removeUndefinedValues(props);
    }
  );
  var SelectLabel = memo2(
    forwardRef2(function SelectLabel2(props) {
      const htmlProps = useSelectLabel(props);
      return createElement(TagName44, htmlProps);
    })
  );

  // node_modules/@ariakit/react-core/esm/__chunks/PFBP2CY4.js
  var import_react47 = __toESM(require_react(), 1);
  var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
  var TagName45 = "div";
  var SelectListContext = (0, import_react47.createContext)(null);
  var useSelectList = createHook(
    function useSelectList2({
      store,
      resetOnEscape = true,
      hideOnEnter = true,
      focusOnMove = true,
      composite,
      alwaysVisible,
      ...props
    }) {
      const context = useSelectContext();
      store = store || context;
      invariant(
        store,
        "SelectList must receive a `store` prop or be wrapped in a SelectProvider component."
      );
      const id3 = useId(props.id);
      const value = store.useState("value");
      const multiSelectable = Array.isArray(value);
      const [defaultValue2, setDefaultValue] = (0, import_react47.useState)(value);
      const mounted = store.useState("mounted");
      (0, import_react47.useEffect)(() => {
        if (mounted) return;
        setDefaultValue(value);
      }, [mounted, value]);
      resetOnEscape = resetOnEscape && !multiSelectable;
      const onKeyDownProp = props.onKeyDown;
      const resetOnEscapeProp = useBooleanEvent(resetOnEscape);
      const hideOnEnterProp = useBooleanEvent(hideOnEnter);
      const onKeyDown = useEvent((event) => {
        onKeyDownProp == null ? void 0 : onKeyDownProp(event);
        if (event.defaultPrevented) return;
        if (event.key === "Escape" && resetOnEscapeProp(event)) {
          store == null ? void 0 : store.setValue(defaultValue2);
        }
        if (event.key === " " || event.key === "Enter") {
          if (isSelfTarget(event) && hideOnEnterProp(event)) {
            event.preventDefault();
            store == null ? void 0 : store.hide();
          }
        }
      });
      const headingContext = (0, import_react47.useContext)(SelectHeadingContext);
      const headingState = (0, import_react47.useState)();
      const [headingId, setHeadingId] = headingContext || headingState;
      const headingContextValue = (0, import_react47.useMemo)(
        () => [headingId, setHeadingId],
        [headingId]
      );
      const [childStore, setChildStore] = (0, import_react47.useState)(null);
      const setStore = (0, import_react47.useContext)(SelectListContext);
      (0, import_react47.useEffect)(() => {
        if (!setStore) return;
        setStore(store);
        return () => setStore(null);
      }, [setStore, store]);
      props = useWrapElement(
        props,
        (element2) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SelectScopedContextProvider, { value: store, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SelectListContext.Provider, { value: setChildStore, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SelectHeadingContext.Provider, { value: headingContextValue, children: element2 }) }) }),
        [store, headingContextValue]
      );
      const hasCombobox = !!store.combobox;
      composite = composite != null ? composite : !hasCombobox && childStore !== store;
      const [element, setElement] = useTransactionState(
        composite ? store.setListElement : null
      );
      const role = useAttribute(element, "role", props.role);
      const isCompositeRole = role === "listbox" || role === "menu" || role === "tree" || role === "grid";
      const ariaMultiSelectable = composite || isCompositeRole ? multiSelectable || void 0 : void 0;
      const hidden = isHidden(mounted, props.hidden, alwaysVisible);
      const style2 = hidden ? { ...props.style, display: "none" } : props.style;
      if (composite) {
        props = {
          role: "listbox",
          "aria-multiselectable": ariaMultiSelectable,
          ...props
        };
      }
      const labelId = store.useState(
        (state) => {
          var _a;
          return headingId || ((_a = state.labelElement) == null ? void 0 : _a.id);
        }
      );
      props = {
        id: id3,
        "aria-labelledby": labelId,
        hidden,
        ...props,
        ref: useMergeRefs(setElement, props.ref),
        style: style2,
        onKeyDown
      };
      props = useComposite({ store, ...props, composite });
      props = useCompositeTypeahead({ store, typeahead: !hasCombobox, ...props });
      return props;
    }
  );
  var SelectList = forwardRef2(function SelectList2(props) {
    const htmlProps = useSelectList(props);
    return createElement(TagName45, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/select/select-popover.js
  var TagName46 = "div";
  var useSelectPopover = createHook(
    function useSelectPopover2({ store, alwaysVisible, ...props }) {
      const context = useSelectProviderContext();
      store = store || context;
      props = useSelectList({ store, alwaysVisible, ...props });
      props = usePopover({ store, alwaysVisible, ...props });
      return props;
    }
  );
  var SelectPopover = createDialogComponent(
    forwardRef2(function SelectPopover2(props) {
      const htmlProps = useSelectPopover(props);
      return createElement(TagName46, htmlProps);
    }),
    useSelectProviderContext
  );

  // node_modules/@ariakit/core/esm/select/select-store.js
  function createSelectStore({
    combobox,
    ...props
  } = {}) {
    const store = mergeStore(
      props.store,
      omit2(combobox, [
        "value",
        "items",
        "renderedItems",
        "baseElement",
        "arrowElement",
        "anchorElement",
        "contentElement",
        "popoverElement",
        "disclosureElement"
      ])
    );
    throwOnConflictingProps(props, store);
    const syncState = store.getState();
    const composite = createCompositeStore({
      ...props,
      store,
      virtualFocus: defaultValue(
        props.virtualFocus,
        syncState.virtualFocus,
        true
      ),
      includesBaseElement: defaultValue(
        props.includesBaseElement,
        syncState.includesBaseElement,
        false
      ),
      activeId: defaultValue(
        props.activeId,
        syncState.activeId,
        props.defaultActiveId,
        null
      ),
      orientation: defaultValue(
        props.orientation,
        syncState.orientation,
        "vertical"
      )
    });
    const popover = createPopoverStore({
      ...props,
      store,
      placement: defaultValue(
        props.placement,
        syncState.placement,
        "bottom-start"
      )
    });
    const initialValue2 = new String("");
    const initialState = {
      ...composite.getState(),
      ...popover.getState(),
      value: defaultValue(
        props.value,
        syncState.value,
        props.defaultValue,
        initialValue2
      ),
      setValueOnMove: defaultValue(
        props.setValueOnMove,
        syncState.setValueOnMove,
        false
      ),
      labelElement: defaultValue(syncState.labelElement, null),
      selectElement: defaultValue(syncState.selectElement, null),
      listElement: defaultValue(syncState.listElement, null)
    };
    const select = createStore(initialState, composite, popover, store);
    setup(
      select,
      () => sync(select, ["value", "items"], (state) => {
        if (state.value !== initialValue2) return;
        if (!state.items.length) return;
        const item2 = state.items.find(
          (item22) => !item22.disabled && item22.value != null
        );
        if ((item2 == null ? void 0 : item2.value) == null) return;
        select.setState("value", item2.value);
      })
    );
    setup(
      select,
      () => sync(select, ["mounted"], (state) => {
        if (state.mounted) return;
        select.setState("activeId", initialState.activeId);
      })
    );
    setup(
      select,
      () => sync(select, ["mounted", "items", "value"], (state) => {
        if (combobox) return;
        if (state.mounted) return;
        const values = toArray(state.value);
        const lastValue = values[values.length - 1];
        if (lastValue == null) return;
        const item2 = state.items.find(
          (item22) => !item22.disabled && item22.value === lastValue
        );
        if (!item2) return;
        select.setState("activeId", item2.id);
      })
    );
    setup(
      select,
      () => batch(select, ["setValueOnMove", "moves"], (state) => {
        const { mounted, value, activeId } = select.getState();
        if (!state.setValueOnMove && mounted) return;
        if (Array.isArray(value)) return;
        if (!state.moves) return;
        if (!activeId) return;
        const item2 = composite.item(activeId);
        if (!item2 || item2.disabled || item2.value == null) return;
        select.setState("value", item2.value);
      })
    );
    return {
      ...composite,
      ...popover,
      ...select,
      combobox,
      setValue: (value) => select.setState("value", value),
      setLabelElement: (element) => select.setState("labelElement", element),
      setSelectElement: (element) => select.setState("selectElement", element),
      setListElement: (element) => select.setState("listElement", element)
    };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/HVWMDOZM.js
  function useSelectStoreOptions(props) {
    const combobox = useComboboxProviderContext();
    props = {
      ...props,
      combobox: props.combobox !== void 0 ? props.combobox : combobox
    };
    return useCompositeStoreOptions(props);
  }
  function useSelectStoreProps(store, update, props) {
    useUpdateEffect(update, [props.combobox]);
    useStoreProps(store, props, "value", "setValue");
    useStoreProps(store, props, "setValueOnMove");
    return Object.assign(
      usePopoverStoreProps(
        useCompositeStoreProps(store, update, props),
        update,
        props
      ),
      { combobox: props.combobox }
    );
  }
  function useSelectStore(props = {}) {
    props = useSelectStoreOptions(props);
    const [store, update] = useStore(createSelectStore, props);
    return useSelectStoreProps(store, update, props);
  }

  // node_modules/@ariakit/react-core/esm/__chunks/HLPY2PXK.js
  var import_react48 = __toESM(require_react(), 1);
  var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
  var TagName47 = "div";
  var useCompositeRow = createHook(
    function useCompositeRow2({
      store,
      "aria-setsize": ariaSetSize,
      "aria-posinset": ariaPosInSet,
      ...props
    }) {
      const context = useCompositeContext();
      store = store || context;
      invariant(
        store,
        "CompositeRow must be wrapped in a Composite component."
      );
      const id3 = useId(props.id);
      const baseElement = store.useState(
        (state) => state.baseElement || void 0
      );
      const providerValue = (0, import_react48.useMemo)(
        () => ({ id: id3, baseElement, ariaSetSize, ariaPosInSet }),
        [id3, baseElement, ariaSetSize, ariaPosInSet]
      );
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CompositeRowContext.Provider, { value: providerValue, children: element }),
        [providerValue]
      );
      props = { id: id3, ...props };
      return removeUndefinedValues(props);
    }
  );
  var CompositeRow = forwardRef2(function CompositeRow2(props) {
    const htmlProps = useCompositeRow(props);
    return createElement(TagName47, htmlProps);
  });

  // node_modules/@ariakit/core/esm/checkbox/checkbox-store.js
  function createCheckboxStore(props = {}) {
    var _a;
    throwOnConflictingProps(props, props.store);
    const syncState = (_a = props.store) == null ? void 0 : _a.getState();
    const initialState = {
      value: defaultValue(
        props.value,
        syncState == null ? void 0 : syncState.value,
        props.defaultValue,
        false
      )
    };
    const checkbox = createStore(initialState, props.store);
    return {
      ...checkbox,
      setValue: (value) => checkbox.setState("value", value)
    };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/ALZMXNL4.js
  function useCheckboxStoreProps(store, update, props) {
    useUpdateEffect(update, [props.store]);
    useStoreProps(store, props, "value", "setValue");
    return store;
  }
  function useCheckboxStore(props = {}) {
    const [store, update] = useStore(createCheckboxStore, props);
    return useCheckboxStoreProps(store, update, props);
  }

  // node_modules/@ariakit/react-core/esm/__chunks/ZVXT4QFT.js
  var ctx13 = createStoreContext();
  var useCheckboxContext = ctx13.useContext;
  var useCheckboxScopedContext = ctx13.useScopedContext;
  var useCheckboxProviderContext = ctx13.useProviderContext;
  var CheckboxContextProvider = ctx13.ContextProvider;
  var CheckboxScopedContextProvider = ctx13.ScopedContextProvider;

  // node_modules/@ariakit/react-core/esm/__chunks/I7KWAPMF.js
  var import_react49 = __toESM(require_react(), 1);
  var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
  var TagName48 = "input";
  function setMixed(element, mixed) {
    if (mixed) {
      element.indeterminate = true;
    } else if (element.indeterminate) {
      element.indeterminate = false;
    }
  }
  function isNativeCheckbox(tagName, type) {
    return tagName === "input" && (!type || type === "checkbox");
  }
  function getPrimitiveValue(value) {
    if (Array.isArray(value)) {
      return value.toString();
    }
    return value;
  }
  var useCheckbox = createHook(
    function useCheckbox2({
      store,
      name,
      value: valueProp,
      checked: checkedProp,
      defaultChecked,
      ...props
    }) {
      const context = useCheckboxContext();
      store = store || context;
      const [_checked, setChecked] = (0, import_react49.useState)(defaultChecked != null ? defaultChecked : false);
      const checked = useStoreState(store, (state) => {
        if (checkedProp !== void 0) return checkedProp;
        if ((state == null ? void 0 : state.value) === void 0) return _checked;
        if (valueProp != null) {
          if (Array.isArray(state.value)) {
            const primitiveValue = getPrimitiveValue(valueProp);
            return state.value.includes(primitiveValue);
          }
          return state.value === valueProp;
        }
        if (Array.isArray(state.value)) return false;
        if (typeof state.value === "boolean") return state.value;
        return false;
      });
      const ref = (0, import_react49.useRef)(null);
      const tagName = useTagName(ref, TagName48);
      const nativeCheckbox = isNativeCheckbox(tagName, props.type);
      const mixed = checked ? checked === "mixed" : void 0;
      const isChecked = checked === "mixed" ? false : checked;
      const disabled = disabledFromProps(props);
      const [propertyUpdated, schedulePropertyUpdate] = useForceUpdate();
      (0, import_react49.useEffect)(() => {
        const element = ref.current;
        if (!element) return;
        setMixed(element, mixed);
        if (nativeCheckbox) return;
        element.checked = isChecked;
        if (name !== void 0) {
          element.name = name;
        }
        if (valueProp !== void 0) {
          element.value = `${valueProp}`;
        }
      }, [propertyUpdated, mixed, nativeCheckbox, isChecked, name, valueProp]);
      const onChangeProp = props.onChange;
      const onChange = useEvent((event) => {
        if (disabled) {
          event.stopPropagation();
          event.preventDefault();
          return;
        }
        setMixed(event.currentTarget, mixed);
        if (!nativeCheckbox) {
          event.currentTarget.checked = !event.currentTarget.checked;
          schedulePropertyUpdate();
        }
        onChangeProp == null ? void 0 : onChangeProp(event);
        if (event.defaultPrevented) return;
        const elementChecked = event.currentTarget.checked;
        setChecked(elementChecked);
        store == null ? void 0 : store.setValue((prevValue) => {
          if (valueProp == null) return elementChecked;
          const primitiveValue = getPrimitiveValue(valueProp);
          if (!Array.isArray(prevValue)) {
            return prevValue === primitiveValue ? false : primitiveValue;
          }
          if (elementChecked) {
            if (prevValue.includes(primitiveValue)) {
              return prevValue;
            }
            return [...prevValue, primitiveValue];
          }
          return prevValue.filter((v3) => v3 !== primitiveValue);
        });
      });
      const onClickProp = props.onClick;
      const onClick = useEvent((event) => {
        onClickProp == null ? void 0 : onClickProp(event);
        if (event.defaultPrevented) return;
        if (nativeCheckbox) return;
        onChange(event);
      });
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CheckboxCheckedContext.Provider, { value: isChecked, children: element }),
        [isChecked]
      );
      props = {
        role: !nativeCheckbox ? "checkbox" : void 0,
        type: nativeCheckbox ? "checkbox" : void 0,
        "aria-checked": checked,
        ...props,
        ref: useMergeRefs(ref, props.ref),
        onChange,
        onClick
      };
      props = useCommand({ clickOnEnter: !nativeCheckbox, ...props });
      return removeUndefinedValues({
        name: nativeCheckbox ? name : void 0,
        value: nativeCheckbox ? valueProp : void 0,
        checked: isChecked,
        ...props
      });
    }
  );
  var Checkbox = forwardRef2(function Checkbox2(props) {
    const htmlProps = useCheckbox(props);
    return createElement(TagName48, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/Z4X7TRJU.js
  var import_react50 = __toESM(require_react(), 1);
  var menu = createStoreContext(
    [CompositeContextProvider, HovercardContextProvider],
    [CompositeScopedContextProvider, HovercardScopedContextProvider]
  );
  var useMenuContext = menu.useContext;
  var useMenuScopedContext = menu.useScopedContext;
  var useMenuProviderContext = menu.useProviderContext;
  var MenuContextProvider = menu.ContextProvider;
  var MenuScopedContextProvider = menu.ScopedContextProvider;
  var MenuItemCheckedContext2 = (0, import_react50.createContext)(
    void 0
  );

  // node_modules/@ariakit/react-core/esm/__chunks/SVHPDYU7.js
  var import_react51 = __toESM(require_react(), 1);
  var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
  var TagName49 = "div";
  function useAriaLabelledBy({ store, ...props }) {
    const [id3, setId] = (0, import_react51.useState)(void 0);
    const label = props["aria-label"];
    const disclosureElement = useStoreState(store, "disclosureElement");
    const contentElement = useStoreState(store, "contentElement");
    (0, import_react51.useEffect)(() => {
      const disclosure = disclosureElement;
      if (!disclosure) return;
      const menu2 = contentElement;
      if (!menu2) return;
      const menuLabel = label || menu2.hasAttribute("aria-label");
      if (menuLabel) {
        setId(void 0);
      } else if (disclosure.id) {
        setId(disclosure.id);
      }
    }, [label, disclosureElement, contentElement]);
    return id3;
  }
  var useMenuList = createHook(
    function useMenuList2({ store, alwaysVisible, composite, ...props }) {
      const context = useMenuProviderContext();
      store = store || context;
      invariant(
        store,
        "MenuList must receive a `store` prop or be wrapped in a MenuProvider component."
      );
      const parentMenu = store.parent;
      const parentMenubar = store.menubar;
      const hasParentMenu = !!parentMenu;
      const id3 = useId(props.id);
      const onKeyDownProp = props.onKeyDown;
      const dir = store.useState(
        (state) => state.placement.split("-")[0]
      );
      const orientation = store.useState(
        (state) => state.orientation === "both" ? void 0 : state.orientation
      );
      const isHorizontal = orientation !== "vertical";
      const isMenubarHorizontal = useStoreState(
        parentMenubar,
        (state) => !!state && state.orientation !== "vertical"
      );
      const onKeyDown = useEvent((event) => {
        onKeyDownProp == null ? void 0 : onKeyDownProp(event);
        if (event.defaultPrevented) return;
        if (hasParentMenu || parentMenubar && !isHorizontal) {
          const hideMap = {
            ArrowRight: () => dir === "left" && !isHorizontal,
            ArrowLeft: () => dir === "right" && !isHorizontal,
            ArrowUp: () => dir === "bottom" && isHorizontal,
            ArrowDown: () => dir === "top" && isHorizontal
          };
          const action = hideMap[event.key];
          if (action == null ? void 0 : action()) {
            event.stopPropagation();
            event.preventDefault();
            return store == null ? void 0 : store.hide();
          }
        }
        if (parentMenubar) {
          const keyMap = {
            ArrowRight: () => {
              if (!isMenubarHorizontal) return;
              return parentMenubar.next();
            },
            ArrowLeft: () => {
              if (!isMenubarHorizontal) return;
              return parentMenubar.previous();
            },
            ArrowDown: () => {
              if (isMenubarHorizontal) return;
              return parentMenubar.next();
            },
            ArrowUp: () => {
              if (isMenubarHorizontal) return;
              return parentMenubar.previous();
            }
          };
          const action = keyMap[event.key];
          const id22 = action == null ? void 0 : action();
          if (id22 !== void 0) {
            event.stopPropagation();
            event.preventDefault();
            parentMenubar.move(id22);
          }
        }
      });
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(MenuScopedContextProvider, { value: store, children: element }),
        [store]
      );
      const ariaLabelledBy = useAriaLabelledBy({ store, ...props });
      const mounted = store.useState("mounted");
      const hidden = isHidden(mounted, props.hidden, alwaysVisible);
      const style2 = hidden ? { ...props.style, display: "none" } : props.style;
      props = {
        id: id3,
        "aria-labelledby": ariaLabelledBy,
        hidden,
        ...props,
        ref: useMergeRefs(id3 ? store.setContentElement : null, props.ref),
        style: style2,
        onKeyDown
      };
      const hasCombobox = !!store.combobox;
      composite = composite != null ? composite : !hasCombobox;
      if (composite) {
        props = {
          role: "menu",
          "aria-orientation": orientation,
          ...props
        };
      }
      props = useComposite({ store, composite, ...props });
      props = useCompositeTypeahead({ store, typeahead: !hasCombobox, ...props });
      return props;
    }
  );
  var MenuList = forwardRef2(function MenuList2(props) {
    const htmlProps = useMenuList(props);
    return createElement(TagName49, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/menu/menu.js
  var import_react52 = __toESM(require_react(), 1);
  var TagName50 = "div";
  var useMenu = createHook(function useMenu2({
    store,
    modal: modalProp = false,
    portal = !!modalProp,
    hideOnEscape = true,
    autoFocusOnShow = true,
    hideOnHoverOutside,
    alwaysVisible,
    ...props
  }) {
    const context = useMenuProviderContext();
    store = store || context;
    invariant(
      store,
      "Menu must receive a `store` prop or be wrapped in a MenuProvider component."
    );
    const ref = (0, import_react52.useRef)(null);
    const parentMenu = store.parent;
    const parentMenubar = store.menubar;
    const hasParentMenu = !!parentMenu;
    const parentIsMenubar = !!parentMenubar && !hasParentMenu;
    props = {
      ...props,
      ref: useMergeRefs(ref, props.ref)
    };
    const { "aria-labelledby": ariaLabelledBy, ...menuListProps } = useMenuList({
      store,
      alwaysVisible,
      ...props
    });
    props = menuListProps;
    const [initialFocusRef, setInitialFocusRef] = (0, import_react52.useState)();
    const autoFocusOnShowState = store.useState("autoFocusOnShow");
    const initialFocus = store.useState("initialFocus");
    const baseElement = store.useState("baseElement");
    const items = store.useState("renderedItems");
    (0, import_react52.useEffect)(() => {
      let cleaning = false;
      setInitialFocusRef((prevInitialFocusRef) => {
        var _a, _b, _c;
        if (cleaning) return;
        if (!autoFocusOnShowState) return;
        if ((_a = prevInitialFocusRef == null ? void 0 : prevInitialFocusRef.current) == null ? void 0 : _a.isConnected) return prevInitialFocusRef;
        const ref2 = (0, import_react52.createRef)();
        switch (initialFocus) {
          // TODO: Refactor
          case "first":
            ref2.current = ((_b = items.find((item2) => !item2.disabled && item2.element)) == null ? void 0 : _b.element) || null;
            break;
          case "last":
            ref2.current = ((_c = [...items].reverse().find((item2) => !item2.disabled && item2.element)) == null ? void 0 : _c.element) || null;
            break;
          default:
            ref2.current = baseElement;
        }
        return ref2;
      });
      return () => {
        cleaning = true;
      };
    }, [store, autoFocusOnShowState, initialFocus, items, baseElement]);
    const modal = hasParentMenu ? false : modalProp;
    const mayAutoFocusOnShow = !!autoFocusOnShow;
    const canAutoFocusOnShow = !!initialFocusRef || !!props.initialFocus || !!modal;
    const contentElement = useStoreState(
      store.combobox || store,
      "contentElement"
    );
    const parentContentElement = useStoreState(
      (parentMenu == null ? void 0 : parentMenu.combobox) || parentMenu,
      "contentElement"
    );
    const preserveTabOrderAnchor = (0, import_react52.useMemo)(() => {
      if (!parentContentElement) return;
      if (!contentElement) return;
      const role = contentElement.getAttribute("role");
      const parentRole = parentContentElement.getAttribute("role");
      const parentIsMenuOrMenubar = parentRole === "menu" || parentRole === "menubar";
      if (parentIsMenuOrMenubar && role === "menu") return;
      return parentContentElement;
    }, [contentElement, parentContentElement]);
    if (preserveTabOrderAnchor !== void 0) {
      props = {
        preserveTabOrderAnchor,
        ...props
      };
    }
    props = useHovercard({
      store,
      alwaysVisible,
      initialFocus: initialFocusRef,
      autoFocusOnShow: mayAutoFocusOnShow ? canAutoFocusOnShow && autoFocusOnShow : autoFocusOnShowState || !!modal,
      ...props,
      hideOnEscape(event) {
        if (isFalsyBooleanCallback(hideOnEscape, event)) return false;
        store == null ? void 0 : store.hideAll();
        return true;
      },
      hideOnHoverOutside(event) {
        const disclosureElement = store == null ? void 0 : store.getState().disclosureElement;
        const getHideOnHoverOutside = () => {
          if (typeof hideOnHoverOutside === "function") {
            return hideOnHoverOutside(event);
          }
          if (hideOnHoverOutside != null) return hideOnHoverOutside;
          if (hasParentMenu) return true;
          if (!parentIsMenubar) return false;
          if (!disclosureElement) return true;
          if (hasFocusWithin(disclosureElement)) return false;
          return true;
        };
        if (!getHideOnHoverOutside()) return false;
        if (event.defaultPrevented) return true;
        if (!hasParentMenu) return true;
        if (!disclosureElement) return true;
        fireEvent(disclosureElement, "mouseout", event);
        if (!hasFocusWithin(disclosureElement)) return true;
        requestAnimationFrame(() => {
          if (hasFocusWithin(disclosureElement)) return;
          store == null ? void 0 : store.hide();
        });
        return false;
      },
      modal,
      portal,
      backdrop: hasParentMenu ? false : props.backdrop
    });
    props = {
      "aria-labelledby": ariaLabelledBy,
      ...props
    };
    return props;
  });
  var Menu = createDialogComponent(
    forwardRef2(function Menu2(props) {
      const htmlProps = useMenu(props);
      return createElement(TagName50, htmlProps);
    }),
    useMenuProviderContext
  );

  // node_modules/@ariakit/react-core/esm/menu/menu-button.js
  var import_react53 = __toESM(require_react(), 1);
  var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
  var TagName51 = "button";
  function getInitialFocus(event, dir) {
    const keyMap = {
      ArrowDown: dir === "bottom" || dir === "top" ? "first" : false,
      ArrowUp: dir === "bottom" || dir === "top" ? "last" : false,
      ArrowRight: dir === "right" ? "first" : false,
      ArrowLeft: dir === "left" ? "first" : false
    };
    return keyMap[event.key];
  }
  function hasActiveItem(items, excludeElement) {
    return !!(items == null ? void 0 : items.some((item2) => {
      if (!item2.element) return false;
      if (item2.element === excludeElement) return false;
      return item2.element.getAttribute("aria-expanded") === "true";
    }));
  }
  var useMenuButton = createHook(
    function useMenuButton2({
      store,
      focusable,
      accessibleWhenDisabled,
      showOnHover,
      ...props
    }) {
      const context = useMenuProviderContext();
      store = store || context;
      invariant(
        store,
        "MenuButton must receive a `store` prop or be wrapped in a MenuProvider component."
      );
      const ref = (0, import_react53.useRef)(null);
      const parentMenu = store.parent;
      const parentMenubar = store.menubar;
      const hasParentMenu = !!parentMenu;
      const parentIsMenubar = !!parentMenubar && !hasParentMenu;
      const disabled = disabledFromProps(props);
      const showMenu = () => {
        const trigger = ref.current;
        if (!trigger) return;
        store == null ? void 0 : store.setDisclosureElement(trigger);
        store == null ? void 0 : store.setAnchorElement(trigger);
        store == null ? void 0 : store.show();
      };
      const onFocusProp = props.onFocus;
      const onFocus = useEvent((event) => {
        onFocusProp == null ? void 0 : onFocusProp(event);
        if (disabled) return;
        if (event.defaultPrevented) return;
        store == null ? void 0 : store.setAutoFocusOnShow(false);
        store == null ? void 0 : store.setActiveId(null);
        if (!parentMenubar) return;
        if (!parentIsMenubar) return;
        const { items } = parentMenubar.getState();
        if (hasActiveItem(items, event.currentTarget)) {
          showMenu();
        }
      });
      const dir = useStoreState(
        store,
        (state) => state.placement.split("-")[0]
      );
      const onKeyDownProp = props.onKeyDown;
      const onKeyDown = useEvent((event) => {
        onKeyDownProp == null ? void 0 : onKeyDownProp(event);
        if (disabled) return;
        if (event.defaultPrevented) return;
        const initialFocus = getInitialFocus(event, dir);
        if (initialFocus) {
          event.preventDefault();
          showMenu();
          store == null ? void 0 : store.setAutoFocusOnShow(true);
          store == null ? void 0 : store.setInitialFocus(initialFocus);
        }
      });
      const onClickProp = props.onClick;
      const onClick = useEvent((event) => {
        onClickProp == null ? void 0 : onClickProp(event);
        if (event.defaultPrevented) return;
        if (!store) return;
        const isKeyboardClick = !event.detail;
        const { open } = store.getState();
        if (!open || isKeyboardClick) {
          if (!hasParentMenu || isKeyboardClick) {
            store.setAutoFocusOnShow(true);
          }
          store.setInitialFocus(isKeyboardClick ? "first" : "container");
        }
        if (hasParentMenu) {
          showMenu();
        }
      });
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(MenuContextProvider, { value: store, children: element }),
        [store]
      );
      if (hasParentMenu) {
        props = {
          ...props,
          render: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Role.div, { render: props.render })
        };
      }
      const id3 = useId(props.id);
      const parentContentElement = useStoreState(
        (parentMenu == null ? void 0 : parentMenu.combobox) || parentMenu,
        "contentElement"
      );
      const role = hasParentMenu || parentIsMenubar ? getPopupItemRole(parentContentElement, "menuitem") : void 0;
      const contentElement = store.useState("contentElement");
      props = {
        id: id3,
        role,
        "aria-haspopup": getPopupRole(contentElement, "menu"),
        ...props,
        ref: useMergeRefs(ref, props.ref),
        onFocus,
        onKeyDown,
        onClick
      };
      props = useHovercardAnchor({
        store,
        focusable,
        accessibleWhenDisabled,
        ...props,
        showOnHover: (event) => {
          const getShowOnHover = () => {
            if (typeof showOnHover === "function") return showOnHover(event);
            if (showOnHover != null) return showOnHover;
            if (hasParentMenu) return true;
            if (!parentMenubar) return false;
            const { items } = parentMenubar.getState();
            return parentIsMenubar && hasActiveItem(items);
          };
          const canShowOnHover = getShowOnHover();
          if (!canShowOnHover) return false;
          const parent = parentIsMenubar ? parentMenubar : parentMenu;
          if (!parent) return true;
          parent.setActiveId(event.currentTarget.id);
          return true;
        }
      });
      props = usePopoverDisclosure({
        store,
        toggleOnClick: !hasParentMenu,
        focusable,
        accessibleWhenDisabled,
        ...props
      });
      props = useCompositeTypeahead({
        store,
        typeahead: parentIsMenubar,
        ...props
      });
      return props;
    }
  );
  var MenuButton = forwardRef2(function MenuButton2(props) {
    const htmlProps = useMenuButton(props);
    return createElement(TagName51, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/menu/menu-group.js
  var TagName52 = "div";
  var useMenuGroup = createHook(
    function useMenuGroup2(props) {
      props = useCompositeGroup(props);
      return props;
    }
  );
  var MenuGroup = forwardRef2(function MenuGroup2(props) {
    const htmlProps = useMenuGroup(props);
    return createElement(TagName52, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/menu/menu-group-label.js
  var TagName53 = "div";
  var useMenuGroupLabel = createHook(
    function useMenuGroupLabel2(props) {
      props = useCompositeGroupLabel(props);
      return props;
    }
  );
  var MenuGroupLabel = forwardRef2(function MenuGroupLabel2(props) {
    const htmlProps = useMenuGroupLabel(props);
    return createElement(TagName53, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/MOWGOTGG.js
  var TagName54 = "div";
  function menuHasFocus(baseElement, items, currentTarget) {
    var _a;
    if (!baseElement) return false;
    if (hasFocusWithin(baseElement)) return true;
    const expandedItem = items == null ? void 0 : items.find((item2) => {
      var _a2;
      if (item2.element === currentTarget) return false;
      return ((_a2 = item2.element) == null ? void 0 : _a2.getAttribute("aria-expanded")) === "true";
    });
    const expandedMenuId = (_a = expandedItem == null ? void 0 : expandedItem.element) == null ? void 0 : _a.getAttribute("aria-controls");
    if (!expandedMenuId) return false;
    const doc = getDocument(baseElement);
    const expandedMenu = doc.getElementById(expandedMenuId);
    if (!expandedMenu) return false;
    if (hasFocusWithin(expandedMenu)) return true;
    return !!expandedMenu.querySelector("[role=menuitem][aria-expanded=true]");
  }
  var useMenuItem = createHook(
    function useMenuItem2({
      store,
      hideOnClick = true,
      preventScrollOnKeyDown = true,
      focusOnHover,
      blurOnHoverEnd,
      ...props
    }) {
      const menuContext = useMenuScopedContext(true);
      const menubarContext = useMenubarScopedContext();
      store = store || menuContext || menubarContext;
      invariant(
        store,
        "MenuItem must be wrapped in a MenuList, Menu or Menubar component"
      );
      const onClickProp = props.onClick;
      const hideOnClickProp = useBooleanEvent(hideOnClick);
      const hideMenu = "hideAll" in store ? store.hideAll : void 0;
      const isWithinMenu = !!hideMenu;
      const onClick = useEvent((event) => {
        onClickProp == null ? void 0 : onClickProp(event);
        if (event.defaultPrevented) return;
        if (isDownloading(event)) return;
        if (isOpeningInNewTab(event)) return;
        if (!hideMenu) return;
        const popupType = event.currentTarget.getAttribute("aria-haspopup");
        if (popupType === "menu") return;
        if (!hideOnClickProp(event)) return;
        hideMenu();
      });
      const contentElement = useStoreState(
        store,
        (state) => "contentElement" in state ? state.contentElement : null
      );
      const role = getPopupItemRole(contentElement, "menuitem");
      props = {
        role,
        ...props,
        onClick
      };
      props = useCompositeItem({
        store,
        preventScrollOnKeyDown,
        ...props
      });
      props = useCompositeHover({
        store,
        ...props,
        focusOnHover(event) {
          const getFocusOnHover = () => {
            if (typeof focusOnHover === "function") return focusOnHover(event);
            if (focusOnHover != null) return focusOnHover;
            return true;
          };
          if (!store) return false;
          if (!getFocusOnHover()) return false;
          const { baseElement, items } = store.getState();
          if (isWithinMenu) {
            if (event.currentTarget.hasAttribute("aria-expanded")) {
              event.currentTarget.focus();
            }
            return true;
          }
          if (menuHasFocus(baseElement, items, event.currentTarget)) {
            event.currentTarget.focus();
            return true;
          }
          return false;
        },
        blurOnHoverEnd(event) {
          if (typeof blurOnHoverEnd === "function") return blurOnHoverEnd(event);
          if (blurOnHoverEnd != null) return blurOnHoverEnd;
          return isWithinMenu;
        }
      });
      return props;
    }
  );
  var MenuItem = memo2(
    forwardRef2(function MenuItem2(props) {
      const htmlProps = useMenuItem(props);
      return createElement(TagName54, htmlProps);
    })
  );

  // node_modules/@ariakit/react-core/esm/menu/menu-item-check.js
  var import_react54 = __toESM(require_react(), 1);
  var TagName55 = "span";
  var useMenuItemCheck = createHook(
    function useMenuItemCheck2({ store, checked, ...props }) {
      const context = (0, import_react54.useContext)(MenuItemCheckedContext2);
      checked = checked != null ? checked : context;
      props = useCheckboxCheck({ ...props, checked });
      return props;
    }
  );
  var MenuItemCheck = forwardRef2(function MenuItemCheck2(props) {
    const htmlProps = useMenuItemCheck(props);
    return createElement(TagName55, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/menu/menu-item-checkbox.js
  var import_react55 = __toESM(require_react(), 1);
  var TagName56 = "div";
  function getPrimitiveValue2(value) {
    if (Array.isArray(value)) {
      return value.toString();
    }
    return value;
  }
  function getValue(storeValue, value, checked) {
    if (value === void 0) {
      if (Array.isArray(storeValue)) return storeValue;
      return !!checked;
    }
    const primitiveValue = getPrimitiveValue2(value);
    if (!Array.isArray(storeValue)) {
      if (checked) {
        return primitiveValue;
      }
      return storeValue === primitiveValue ? false : storeValue;
    }
    if (checked) {
      if (storeValue.includes(primitiveValue)) {
        return storeValue;
      }
      return [...storeValue, primitiveValue];
    }
    return storeValue.filter((v3) => v3 !== primitiveValue);
  }
  var useMenuItemCheckbox = createHook(
    function useMenuItemCheckbox2({
      store,
      name,
      value,
      checked,
      defaultChecked: defaultCheckedProp,
      hideOnClick = false,
      ...props
    }) {
      const context = useMenuScopedContext();
      store = store || context;
      invariant(
        store,
        "MenuItemCheckbox must be wrapped in a MenuList or Menu component"
      );
      const defaultChecked = useInitialValue(defaultCheckedProp);
      (0, import_react55.useEffect)(() => {
        store == null ? void 0 : store.setValue(name, (prevValue = []) => {
          if (!defaultChecked) return prevValue;
          return getValue(prevValue, value, true);
        });
      }, [store, name, value, defaultChecked]);
      (0, import_react55.useEffect)(() => {
        if (checked === void 0) return;
        store == null ? void 0 : store.setValue(name, (prevValue) => {
          return getValue(prevValue, value, checked);
        });
      }, [store, name, value, checked]);
      const checkboxStore = useCheckboxStore({
        value: store.useState((state) => state.values[name]),
        setValue(internalValue) {
          store == null ? void 0 : store.setValue(name, () => {
            if (checked === void 0) return internalValue;
            const nextValue = getValue(internalValue, value, checked);
            if (!Array.isArray(nextValue)) return nextValue;
            if (!Array.isArray(internalValue)) return nextValue;
            if (shallowEqual(internalValue, nextValue)) return internalValue;
            return nextValue;
          });
        }
      });
      props = {
        role: "menuitemcheckbox",
        ...props
      };
      props = useCheckbox({
        store: checkboxStore,
        name,
        value,
        checked,
        ...props
      });
      props = useMenuItem({ store, hideOnClick, ...props });
      return props;
    }
  );
  var MenuItemCheckbox = memo2(
    forwardRef2(function MenuItemCheckbox2(props) {
      const htmlProps = useMenuItemCheckbox(props);
      return createElement(TagName56, htmlProps);
    })
  );

  // node_modules/@ariakit/react-core/esm/menu/menu-item-radio.js
  var import_react56 = __toESM(require_react(), 1);
  var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
  var TagName57 = "div";
  function getValue2(prevValue, value, checked) {
    if (checked === void 0) return prevValue;
    if (checked) return value;
    return prevValue;
  }
  var useMenuItemRadio = createHook(
    function useMenuItemRadio2({
      store,
      name,
      value,
      checked,
      onChange: onChangeProp,
      hideOnClick = false,
      ...props
    }) {
      const context = useMenuScopedContext();
      store = store || context;
      invariant(
        store,
        "MenuItemRadio must be wrapped in a MenuList or Menu component"
      );
      const defaultChecked = useInitialValue(props.defaultChecked);
      (0, import_react56.useEffect)(() => {
        store == null ? void 0 : store.setValue(name, (prevValue = false) => {
          return getValue2(prevValue, value, defaultChecked);
        });
      }, [store, name, value, defaultChecked]);
      (0, import_react56.useEffect)(() => {
        if (checked === void 0) return;
        store == null ? void 0 : store.setValue(name, (prevValue) => {
          return getValue2(prevValue, value, checked);
        });
      }, [store, name, value, checked]);
      const isChecked = store.useState((state) => state.values[name] === value);
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(MenuItemCheckedContext2.Provider, { value: !!isChecked, children: element }),
        [isChecked]
      );
      props = {
        role: "menuitemradio",
        ...props
      };
      props = useRadio({
        name,
        value,
        checked: isChecked,
        onChange(event) {
          onChangeProp == null ? void 0 : onChangeProp(event);
          if (event.defaultPrevented) return;
          const element = event.currentTarget;
          store == null ? void 0 : store.setValue(name, (prevValue) => {
            return getValue2(prevValue, value, checked != null ? checked : element.checked);
          });
        },
        ...props
      });
      props = useMenuItem({ store, hideOnClick, ...props });
      return props;
    }
  );
  var MenuItemRadio = memo2(
    forwardRef2(function MenuItemRadio2(props) {
      const htmlProps = useMenuItemRadio(props);
      return createElement(TagName57, htmlProps);
    })
  );

  // node_modules/@ariakit/core/esm/menu/menu-store.js
  function createMenuStore({
    combobox,
    parent,
    menubar: menubar2,
    ...props
  } = {}) {
    const parentIsMenubar = !!menubar2 && !parent;
    const store = mergeStore(
      props.store,
      pick2(parent, ["values"]),
      omit2(combobox, [
        "arrowElement",
        "anchorElement",
        "contentElement",
        "popoverElement",
        "disclosureElement"
      ])
    );
    throwOnConflictingProps(props, store);
    const syncState = store.getState();
    const composite = createCompositeStore({
      ...props,
      store,
      orientation: defaultValue(
        props.orientation,
        syncState.orientation,
        "vertical"
      )
    });
    const hovercard = createHovercardStore({
      ...props,
      store,
      placement: defaultValue(
        props.placement,
        syncState.placement,
        "bottom-start"
      ),
      timeout: defaultValue(
        props.timeout,
        syncState.timeout,
        parentIsMenubar ? 0 : 150
      ),
      hideTimeout: defaultValue(props.hideTimeout, syncState.hideTimeout, 0)
    });
    const initialState = {
      ...composite.getState(),
      ...hovercard.getState(),
      initialFocus: defaultValue(syncState.initialFocus, "container"),
      values: defaultValue(
        props.values,
        syncState.values,
        props.defaultValues,
        {}
      )
    };
    const menu2 = createStore(initialState, composite, hovercard, store);
    setup(
      menu2,
      () => sync(menu2, ["mounted"], (state) => {
        if (state.mounted) return;
        menu2.setState("activeId", null);
      })
    );
    setup(
      menu2,
      () => sync(parent, ["orientation"], (state) => {
        menu2.setState(
          "placement",
          state.orientation === "vertical" ? "right-start" : "bottom-start"
        );
      })
    );
    return {
      ...composite,
      ...hovercard,
      ...menu2,
      combobox,
      parent,
      menubar: menubar2,
      hideAll: () => {
        hovercard.hide();
        parent == null ? void 0 : parent.hideAll();
      },
      setInitialFocus: (value) => menu2.setState("initialFocus", value),
      setValues: (values) => menu2.setState("values", values),
      setValue: (name, value) => {
        if (name === "__proto__") return;
        if (name === "constructor") return;
        if (Array.isArray(name)) return;
        menu2.setState("values", (values) => {
          const prevValue = values[name];
          const nextValue = applyState(value, prevValue);
          if (nextValue === prevValue) return values;
          return {
            ...values,
            [name]: nextValue !== void 0 && nextValue
          };
        });
      }
    };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/62CEUOYM.js
  function useMenuStoreProps(store, update, props) {
    useUpdateEffect(update, [props.combobox, props.parent, props.menubar]);
    useStoreProps(store, props, "values", "setValues");
    return Object.assign(
      useHovercardStoreProps(
        useCompositeStoreProps(store, update, props),
        update,
        props
      ),
      {
        combobox: props.combobox,
        parent: props.parent,
        menubar: props.menubar
      }
    );
  }
  function useMenuStore(props = {}) {
    const parent = useMenuContext();
    const menubar2 = useMenubarContext();
    const combobox = useComboboxProviderContext();
    props = {
      ...props,
      parent: props.parent !== void 0 ? props.parent : parent,
      menubar: props.menubar !== void 0 ? props.menubar : menubar2,
      combobox: props.combobox !== void 0 ? props.combobox : combobox
    };
    const [store, update] = useStore(createMenuStore, props);
    return useMenuStoreProps(store, update, props);
  }

  // node_modules/@ariakit/react-core/esm/menu/menu-separator.js
  var TagName58 = "hr";
  var useMenuSeparator = createHook(
    function useMenuSeparator2({ store, ...props }) {
      const context = useMenuContext();
      store = store || context;
      props = useCompositeSeparator({ store, ...props });
      return props;
    }
  );
  var MenuSeparator = forwardRef2(function MenuSeparator2(props) {
    const htmlProps = useMenuSeparator(props);
    return createElement(TagName58, htmlProps);
  });

  // packages/components/build-module/composite/index.mjs
  var import_i18n = __toESM(require_i18n(), 1);
  var import_element8 = __toESM(require_element(), 1);

  // packages/components/build-module/composite/context.mjs
  var import_element = __toESM(require_element(), 1);
  var CompositeContext = (0, import_element.createContext)({});
  CompositeContext.displayName = "CompositeContext";
  var useCompositeContext2 = () => (0, import_element.useContext)(CompositeContext);

  // packages/components/build-module/composite/group.mjs
  var import_element2 = __toESM(require_element(), 1);
  var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
  var CompositeGroup22 = (0, import_element2.forwardRef)(function CompositeGroup3(props, ref) {
    const context = useCompositeContext2();
    const store = props.store ?? context.store;
    return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CompositeGroup, {
      store,
      ...props,
      ref
    });
  });

  // packages/components/build-module/composite/group-label.mjs
  var import_element3 = __toESM(require_element(), 1);
  var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
  var CompositeGroupLabel22 = (0, import_element3.forwardRef)(function CompositeGroupLabel3(props, ref) {
    const context = useCompositeContext2();
    const store = props.store ?? context.store;
    return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(CompositeGroupLabel, {
      store,
      ...props,
      ref
    });
  });

  // packages/components/build-module/composite/hover.mjs
  var import_element4 = __toESM(require_element(), 1);
  var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
  var CompositeHover22 = (0, import_element4.forwardRef)(function CompositeHover3(props, ref) {
    const context = useCompositeContext2();
    const store = props.store ?? context.store;
    return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CompositeHover, {
      store,
      ...props,
      ref
    });
  });

  // packages/components/build-module/composite/item.mjs
  var import_element5 = __toESM(require_element(), 1);
  var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
  var CompositeItem22 = (0, import_element5.forwardRef)(function CompositeItem3(props, ref) {
    const context = useCompositeContext2();
    const store = props.store ?? context.store;
    return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CompositeItem, {
      store,
      ...props,
      ref
    });
  });

  // packages/components/build-module/composite/row.mjs
  var import_element6 = __toESM(require_element(), 1);
  var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
  var CompositeRow22 = (0, import_element6.forwardRef)(function CompositeRow3(props, ref) {
    const context = useCompositeContext2();
    const store = props.store ?? context.store;
    return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CompositeRow, {
      store,
      ...props,
      ref
    });
  });

  // packages/components/build-module/composite/typeahead.mjs
  var import_element7 = __toESM(require_element(), 1);
  var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
  var CompositeTypeahead22 = (0, import_element7.forwardRef)(function CompositeTypeahead3(props, ref) {
    const context = useCompositeContext2();
    const store = props.store ?? context.store;
    return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CompositeTypeahead, {
      store,
      ...props,
      ref
    });
  });

  // packages/components/build-module/composite/index.mjs
  var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
  var Composite22 = Object.assign((0, import_element8.forwardRef)(function Composite3({
    // Composite store props
    activeId,
    defaultActiveId,
    setActiveId,
    focusLoop = false,
    focusWrap = false,
    focusShift = false,
    virtualFocus = false,
    orientation = "both",
    rtl: rtl2 = (0, import_i18n.isRTL)(),
    // Composite component props
    children,
    disabled = false,
    // Rest props
    ...props
  }, ref) {
    const storeProp = props.store;
    const internalStore = useCompositeStore({
      activeId,
      defaultActiveId,
      setActiveId,
      focusLoop,
      focusWrap,
      focusShift,
      virtualFocus,
      orientation,
      rtl: rtl2
    });
    const store = storeProp ?? internalStore;
    const contextValue = (0, import_element8.useMemo)(() => ({
      store
    }), [store]);
    return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Composite, {
      disabled,
      store,
      ...props,
      ref,
      children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CompositeContext.Provider, {
        value: contextValue,
        children
      })
    });
  }), {
    /**
     * Renders a group element for composite items.
     *
     * @example
     * ```jsx
     * import { Composite } from '@wordpress/components';
     *
     * <Composite>
     *   <Composite.Group>
     *     <Composite.GroupLabel>Label</Composite.GroupLabel>
     *     <Composite.Item>Item 1</Composite.Item>
     *     <Composite.Item>Item 2</Composite.Item>
     *   </CompositeGroup>
     * </Composite>
     * ```
     */
    Group: Object.assign(CompositeGroup22, {
      displayName: "Composite.Group"
    }),
    /**
     * Renders a label in a composite group. This component must be wrapped with
     * `Composite.Group` so the `aria-labelledby` prop is properly set on the
     * composite group element.
     *
     * @example
     * ```jsx
     * import { Composite } from '@wordpress/components';
     *
     * <Composite>
     *   <Composite.Group>
     *     <Composite.GroupLabel>Label</Composite.GroupLabel>
     *     <Composite.Item>Item 1</Composite.Item>
     *     <Composite.Item>Item 2</Composite.Item>
     *   </CompositeGroup>
     * </Composite>
     * ```
     */
    GroupLabel: Object.assign(CompositeGroupLabel22, {
      displayName: "Composite.GroupLabel"
    }),
    /**
     * Renders a composite item.
     *
     * @example
     * ```jsx
     * import { Composite } from '@wordpress/components';
     *
     * <Composite>
     *   <Composite.Item>Item 1</Composite.Item>
     *   <Composite.Item>Item 2</Composite.Item>
     *   <Composite.Item>Item 3</Composite.Item>
     * </Composite>
     * ```
     */
    Item: Object.assign(CompositeItem22, {
      displayName: "Composite.Item"
    }),
    /**
     * Renders a composite row. Wrapping `Composite.Item` elements within
     * `Composite.Row` will create a two-dimensional composite widget, such as a
     * grid.
     *
     * @example
     * ```jsx
     * import { Composite } from '@wordpress/components';
     *
     * <Composite>
     *   <Composite.Row>
     *     <Composite.Item>Item 1.1</Composite.Item>
     *     <Composite.Item>Item 1.2</Composite.Item>
     *     <Composite.Item>Item 1.3</Composite.Item>
     *   </Composite.Row>
     *   <Composite.Row>
     *     <Composite.Item>Item 2.1</Composite.Item>
     *     <Composite.Item>Item 2.2</Composite.Item>
     *     <Composite.Item>Item 2.3</Composite.Item>
     *   </Composite.Row>
     * </Composite>
     * ```
     */
    Row: Object.assign(CompositeRow22, {
      displayName: "Composite.Row"
    }),
    /**
     * Renders an element in a composite widget that receives focus on mouse move
     * and loses focus to the composite base element on mouse leave. This should
     * be combined with the `Composite.Item` component.
     *
     * @example
     * ```jsx
     * import { Composite } from '@wordpress/components';
     *
     * <Composite>
     *   <Composite.Hover render={ <Composite.Item /> }>
     *     Item 1
     *   </Composite.Hover>
     *   <Composite.Hover render={ <Composite.Item /> }>
     *     Item 2
     *   </Composite.Hover>
     * </Composite>
     * ```
     */
    Hover: Object.assign(CompositeHover22, {
      displayName: "Composite.Hover"
    }),
    /**
     * Renders a component that adds typeahead functionality to composite
     * components. Hitting printable character keys will move focus to the next
     * composite item that begins with the input characters.
     *
     * @example
     * ```jsx
     * import { Composite } from '@wordpress/components';
     *
     * <Composite render={ <CompositeTypeahead /> }>
     *   <Composite.Item>Item 1</Composite.Item>
     *   <Composite.Item>Item 2</Composite.Item>
     * </Composite>
     * ```
     */
    Typeahead: Object.assign(CompositeTypeahead22, {
      displayName: "Composite.Typeahead"
    }),
    /**
     * The React context used by the composite components. It can be used by
     * to access the composite store, and to forward the context when composite
     * sub-components are rendered across portals (ie. `SlotFill` components)
     * that would not otherwise forward the context to the `Fill` children.
     *
     * @example
     * ```jsx
     * import { Composite } from '@wordpress/components';
     * import { useContext } from '@wordpress/element';
     *
     * const compositeContext = useContext( Composite.Context );
     * ```
     */
    Context: Object.assign(CompositeContext, {
      displayName: "Composite.Context"
    })
  });

  // packages/components/build-module/tooltip/index.mjs
  var import_compose = __toESM(require_compose(), 1);
  var import_element14 = __toESM(require_element(), 1);
  var import_deprecated = __toESM(require_deprecated(), 1);

  // packages/components/build-module/shortcut/index.mjs
  var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
  function Shortcut(props) {
    const {
      shortcut,
      className: className2
    } = props;
    if (!shortcut) {
      return null;
    }
    let displayText;
    let ariaLabel;
    if (typeof shortcut === "string") {
      displayText = shortcut;
    }
    if (shortcut !== null && typeof shortcut === "object") {
      displayText = shortcut.display;
      ariaLabel = shortcut.ariaLabel;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", {
      className: className2,
      "aria-label": ariaLabel,
      children: displayText
    });
  }
  var shortcut_default = Shortcut;

  // packages/components/node_modules/framer-motion/dist/es/utils/warn-once.mjs
  var warned = /* @__PURE__ */ new Set();
  function warnOnce(condition, message2, element) {
    if (condition || warned.has(message2))
      return;
    console.warn(message2);
    if (element)
      console.warn(element);
    warned.add(message2);
  }

  // packages/components/node_modules/framer-motion/dist/es/render/components/create-proxy.mjs
  function createDOMMotionComponentProxy(componentFactory) {
    if (typeof Proxy === "undefined") {
      return componentFactory;
    }
    const componentCache = /* @__PURE__ */ new Map();
    const deprecatedFactoryFunction = (...args) => {
      if (true) {
        warnOnce(false, "motion() is deprecated. Use motion.create() instead.");
      }
      return componentFactory(...args);
    };
    return new Proxy(deprecatedFactoryFunction, {
      /**
       * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
       * The prop name is passed through as `key` and we can use that to generate a `motion`
       * DOM component with that name.
       */
      get: (_target, key) => {
        if (key === "create")
          return componentFactory;
        if (!componentCache.has(key)) {
          componentCache.set(key, componentFactory(key));
        }
        return componentCache.get(key);
      }
    });
  }

  // packages/components/node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.mjs
  function isAnimationControls(v3) {
    return v3 !== null && typeof v3 === "object" && typeof v3.start === "function";
  }

  // packages/components/node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs
  var isKeyframesTarget = (v3) => {
    return Array.isArray(v3);
  };

  // packages/components/node_modules/framer-motion/dist/es/utils/shallow-compare.mjs
  function shallowCompare(next2, prev2) {
    if (!Array.isArray(prev2))
      return false;
    const prevLength = prev2.length;
    if (prevLength !== next2.length)
      return false;
    for (let i3 = 0; i3 < prevLength; i3++) {
      if (prev2[i3] !== next2[i3])
        return false;
    }
    return true;
  }

  // packages/components/node_modules/framer-motion/dist/es/render/utils/is-variant-label.mjs
  function isVariantLabel(v3) {
    return typeof v3 === "string" || Array.isArray(v3);
  }

  // packages/components/node_modules/framer-motion/dist/es/render/utils/resolve-variants.mjs
  function getValueState(visualElement) {
    const state = [{}, {}];
    visualElement === null || visualElement === void 0 ? void 0 : visualElement.values.forEach((value, key) => {
      state[0][key] = value.get();
      state[1][key] = value.getVelocity();
    });
    return state;
  }
  function resolveVariantFromProps(props, definition, custom, visualElement) {
    if (typeof definition === "function") {
      const [current, velocity] = getValueState(visualElement);
      definition = definition(custom !== void 0 ? custom : props.custom, current, velocity);
    }
    if (typeof definition === "string") {
      definition = props.variants && props.variants[definition];
    }
    if (typeof definition === "function") {
      const [current, velocity] = getValueState(visualElement);
      definition = definition(custom !== void 0 ? custom : props.custom, current, velocity);
    }
    return definition;
  }

  // packages/components/node_modules/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs
  function resolveVariant(visualElement, definition, custom) {
    const props = visualElement.getProps();
    return resolveVariantFromProps(props, definition, custom !== void 0 ? custom : props.custom, visualElement);
  }

  // packages/components/node_modules/framer-motion/dist/es/render/utils/variant-props.mjs
  var variantPriorityOrder = [
    "animate",
    "whileInView",
    "whileFocus",
    "whileHover",
    "whileTap",
    "whileDrag",
    "exit"
  ];
  var variantProps = ["initial", ...variantPriorityOrder];

  // packages/components/node_modules/framer-motion/dist/es/render/html/utils/transform.mjs
  var transformPropOrder = [
    "transformPerspective",
    "x",
    "y",
    "z",
    "translateX",
    "translateY",
    "translateZ",
    "scale",
    "scaleX",
    "scaleY",
    "rotate",
    "rotateX",
    "rotateY",
    "rotateZ",
    "skew",
    "skewX",
    "skewY"
  ];
  var transformProps = new Set(transformPropOrder);

  // packages/components/node_modules/framer-motion/dist/es/utils/time-conversion.mjs
  var secondsToMilliseconds = (seconds) => seconds * 1e3;
  var millisecondsToSeconds = (milliseconds) => milliseconds / 1e3;

  // packages/components/node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs
  var underDampedSpring = {
    type: "spring",
    stiffness: 500,
    damping: 25,
    restSpeed: 10
  };
  var criticallyDampedSpring = (target) => ({
    type: "spring",
    stiffness: 550,
    damping: target === 0 ? 2 * Math.sqrt(550) : 30,
    restSpeed: 10
  });
  var keyframesTransition = {
    type: "keyframes",
    duration: 0.8
  };
  var ease = {
    type: "keyframes",
    ease: [0.25, 0.1, 0.35, 1],
    duration: 0.3
  };
  var getDefaultTransition = (valueKey, { keyframes: keyframes4 }) => {
    if (keyframes4.length > 2) {
      return keyframesTransition;
    } else if (transformProps.has(valueKey)) {
      return valueKey.startsWith("scale") ? criticallyDampedSpring(keyframes4[1]) : underDampedSpring;
    }
    return ease;
  };

  // packages/components/node_modules/framer-motion/dist/es/animation/utils/get-value-transition.mjs
  function getValueTransition(transition, key) {
    return transition ? transition[key] || transition["default"] || transition : void 0;
  }

  // packages/components/node_modules/framer-motion/dist/es/utils/GlobalConfig.mjs
  var MotionGlobalConfig = {
    skipAnimations: false,
    useManualTiming: false
  };

  // packages/components/node_modules/framer-motion/dist/es/utils/use-instant-transition-state.mjs
  var instantAnimationState = {
    current: false
  };

  // packages/components/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs
  var isNotNull = (value) => value !== null;
  function getFinalKeyframe(keyframes4, { repeat, repeatType = "loop" }, finalKeyframe) {
    const resolvedKeyframes = keyframes4.filter(isNotNull);
    const index2 = repeat && repeatType !== "loop" && repeat % 2 === 1 ? 0 : resolvedKeyframes.length - 1;
    return !index2 || finalKeyframe === void 0 ? resolvedKeyframes[index2] : finalKeyframe;
  }

  // node_modules/motion-utils/dist/es/noop.mjs
  var noop2 = (any) => any;

  // node_modules/motion-utils/dist/es/errors.mjs
  var warning = noop2;
  var invariant2 = noop2;
  if (true) {
    warning = (check, message2) => {
      if (!check && typeof console !== "undefined") {
        console.warn(message2);
      }
    };
    invariant2 = (check, message2) => {
      if (!check) {
        throw new Error(message2);
      }
    };
  }

  // packages/components/node_modules/framer-motion/dist/es/frameloop/render-step.mjs
  function createRenderStep(runNextFrame) {
    let thisFrame = /* @__PURE__ */ new Set();
    let nextFrame = /* @__PURE__ */ new Set();
    let isProcessing = false;
    let flushNextFrame = false;
    const toKeepAlive = /* @__PURE__ */ new WeakSet();
    let latestFrameData = {
      delta: 0,
      timestamp: 0,
      isProcessing: false
    };
    function triggerCallback(callback) {
      if (toKeepAlive.has(callback)) {
        step.schedule(callback);
        runNextFrame();
      }
      callback(latestFrameData);
    }
    const step = {
      /**
       * Schedule a process to run on the next frame.
       */
      schedule: (callback, keepAlive = false, immediate = false) => {
        const addToCurrentFrame = immediate && isProcessing;
        const queue = addToCurrentFrame ? thisFrame : nextFrame;
        if (keepAlive)
          toKeepAlive.add(callback);
        if (!queue.has(callback))
          queue.add(callback);
        return callback;
      },
      /**
       * Cancel the provided callback from running on the next frame.
       */
      cancel: (callback) => {
        nextFrame.delete(callback);
        toKeepAlive.delete(callback);
      },
      /**
       * Execute all schedule callbacks.
       */
      process: (frameData2) => {
        latestFrameData = frameData2;
        if (isProcessing) {
          flushNextFrame = true;
          return;
        }
        isProcessing = true;
        [thisFrame, nextFrame] = [nextFrame, thisFrame];
        thisFrame.forEach(triggerCallback);
        thisFrame.clear();
        isProcessing = false;
        if (flushNextFrame) {
          flushNextFrame = false;
          step.process(frameData2);
        }
      }
    };
    return step;
  }

  // packages/components/node_modules/framer-motion/dist/es/frameloop/batcher.mjs
  var stepsOrder = [
    "read",
    // Read
    "resolveKeyframes",
    // Write/Read/Write/Read
    "update",
    // Compute
    "preRender",
    // Compute
    "render",
    // Write
    "postRender"
    // Compute
  ];
  var maxElapsed = 40;
  function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
    let runNextFrame = false;
    let useDefaultElapsed = true;
    const state = {
      delta: 0,
      timestamp: 0,
      isProcessing: false
    };
    const flagRunNextFrame = () => runNextFrame = true;
    const steps = stepsOrder.reduce((acc, key) => {
      acc[key] = createRenderStep(flagRunNextFrame);
      return acc;
    }, {});
    const { read, resolveKeyframes, update, preRender, render, postRender } = steps;
    const processBatch = () => {
      const timestamp = MotionGlobalConfig.useManualTiming ? state.timestamp : performance.now();
      runNextFrame = false;
      state.delta = useDefaultElapsed ? 1e3 / 60 : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);
      state.timestamp = timestamp;
      state.isProcessing = true;
      read.process(state);
      resolveKeyframes.process(state);
      update.process(state);
      preRender.process(state);
      render.process(state);
      postRender.process(state);
      state.isProcessing = false;
      if (runNextFrame && allowKeepAlive) {
        useDefaultElapsed = false;
        scheduleNextBatch(processBatch);
      }
    };
    const wake = () => {
      runNextFrame = true;
      useDefaultElapsed = true;
      if (!state.isProcessing) {
        scheduleNextBatch(processBatch);
      }
    };
    const schedule = stepsOrder.reduce((acc, key) => {
      const step = steps[key];
      acc[key] = (process2, keepAlive = false, immediate = false) => {
        if (!runNextFrame)
          wake();
        return step.schedule(process2, keepAlive, immediate);
      };
      return acc;
    }, {});
    const cancel = (process2) => {
      for (let i3 = 0; i3 < stepsOrder.length; i3++) {
        steps[stepsOrder[i3]].cancel(process2);
      }
    };
    return { schedule, cancel, state, steps };
  }

  // packages/components/node_modules/framer-motion/dist/es/frameloop/frame.mjs
  var { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps } = createRenderBatcher(typeof requestAnimationFrame !== "undefined" ? requestAnimationFrame : noop2, true);

  // packages/components/node_modules/framer-motion/dist/es/easing/cubic-bezier.mjs
  var calcBezier = (t4, a1, a22) => (((1 - 3 * a22 + 3 * a1) * t4 + (3 * a22 - 6 * a1)) * t4 + 3 * a1) * t4;
  var subdivisionPrecision = 1e-7;
  var subdivisionMaxIterations = 12;
  function binarySubdivide(x2, lowerBound, upperBound, mX1, mX2) {
    let currentX;
    let currentT;
    let i3 = 0;
    do {
      currentT = lowerBound + (upperBound - lowerBound) / 2;
      currentX = calcBezier(currentT, mX1, mX2) - x2;
      if (currentX > 0) {
        upperBound = currentT;
      } else {
        lowerBound = currentT;
      }
    } while (Math.abs(currentX) > subdivisionPrecision && ++i3 < subdivisionMaxIterations);
    return currentT;
  }
  function cubicBezier(mX1, mY1, mX2, mY2) {
    if (mX1 === mY1 && mX2 === mY2)
      return noop2;
    const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);
    return (t4) => t4 === 0 || t4 === 1 ? t4 : calcBezier(getTForX(t4), mY1, mY2);
  }

  // packages/components/node_modules/framer-motion/dist/es/easing/modifiers/mirror.mjs
  var mirrorEasing = (easing) => (p3) => p3 <= 0.5 ? easing(2 * p3) / 2 : (2 - easing(2 * (1 - p3))) / 2;

  // packages/components/node_modules/framer-motion/dist/es/easing/modifiers/reverse.mjs
  var reverseEasing = (easing) => (p3) => 1 - easing(1 - p3);

  // packages/components/node_modules/framer-motion/dist/es/easing/back.mjs
  var backOut = /* @__PURE__ */ cubicBezier(0.33, 1.53, 0.69, 0.99);
  var backIn = /* @__PURE__ */ reverseEasing(backOut);
  var backInOut = /* @__PURE__ */ mirrorEasing(backIn);

  // packages/components/node_modules/framer-motion/dist/es/easing/anticipate.mjs
  var anticipate = (p3) => (p3 *= 2) < 1 ? 0.5 * backIn(p3) : 0.5 * (2 - Math.pow(2, -10 * (p3 - 1)));

  // packages/components/node_modules/framer-motion/dist/es/easing/circ.mjs
  var circIn = (p3) => 1 - Math.sin(Math.acos(p3));
  var circOut = reverseEasing(circIn);
  var circInOut = mirrorEasing(circIn);

  // packages/components/node_modules/framer-motion/dist/es/utils/is-zero-value-string.mjs
  var isZeroValueString = (v3) => /^0[^.\s]+$/u.test(v3);

  // packages/components/node_modules/framer-motion/dist/es/animation/utils/is-none.mjs
  function isNone(value) {
    if (typeof value === "number") {
      return value === 0;
    } else if (value !== null) {
      return value === "none" || value === "0" || isZeroValueString(value);
    } else {
      return true;
    }
  }

  // packages/components/node_modules/framer-motion/dist/es/utils/is-numerical-string.mjs
  var isNumericalString = (v3) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(v3);

  // packages/components/node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs
  var checkStringStartsWith = (token2) => (key) => typeof key === "string" && key.startsWith(token2);
  var isCSSVariableName = /* @__PURE__ */ checkStringStartsWith("--");
  var startsAsVariableToken = /* @__PURE__ */ checkStringStartsWith("var(--");
  var isCSSVariableToken = (value) => {
    const startsWithToken = startsAsVariableToken(value);
    if (!startsWithToken)
      return false;
    return singleCssVariableRegex.test(value.split("/*")[0].trim());
  };
  var singleCssVariableRegex = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;

  // packages/components/node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs
  var splitCSSVariableRegex = (
    // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
    /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
  );
  function parseCSSVariable(current) {
    const match4 = splitCSSVariableRegex.exec(current);
    if (!match4)
      return [,];
    const [, token1, token2, fallback] = match4;
    return [`--${token1 !== null && token1 !== void 0 ? token1 : token2}`, fallback];
  }
  var maxDepth = 4;
  function getVariableValue(current, element, depth = 1) {
    invariant2(depth <= maxDepth, `Max CSS variable fallback depth detected in property "${current}". This may indicate a circular fallback dependency.`);
    const [token2, fallback] = parseCSSVariable(current);
    if (!token2)
      return;
    const resolved = window.getComputedStyle(element).getPropertyValue(token2);
    if (resolved) {
      const trimmed = resolved.trim();
      return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed;
    }
    return isCSSVariableToken(fallback) ? getVariableValue(fallback, element, depth + 1) : fallback;
  }

  // packages/components/node_modules/framer-motion/dist/es/utils/clamp.mjs
  var clamp2 = (min3, max3, v3) => {
    if (v3 > max3)
      return max3;
    if (v3 < min3)
      return min3;
    return v3;
  };

  // packages/components/node_modules/framer-motion/dist/es/value/types/numbers/index.mjs
  var number = {
    test: (v3) => typeof v3 === "number",
    parse: parseFloat,
    transform: (v3) => v3
  };
  var alpha = {
    ...number,
    transform: (v3) => clamp2(0, 1, v3)
  };
  var scale = {
    ...number,
    default: 1
  };

  // packages/components/node_modules/framer-motion/dist/es/value/types/numbers/units.mjs
  var createUnitType = (unit) => ({
    test: (v3) => typeof v3 === "string" && v3.endsWith(unit) && v3.split(" ").length === 1,
    parse: parseFloat,
    transform: (v3) => `${v3}${unit}`
  });
  var degrees = /* @__PURE__ */ createUnitType("deg");
  var percent = /* @__PURE__ */ createUnitType("%");
  var px = /* @__PURE__ */ createUnitType("px");
  var vh = /* @__PURE__ */ createUnitType("vh");
  var vw = /* @__PURE__ */ createUnitType("vw");
  var progressPercentage = {
    ...percent,
    parse: (v3) => percent.parse(v3) / 100,
    transform: (v3) => percent.transform(v3 * 100)
  };

  // packages/components/node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs
  var positionalKeys = /* @__PURE__ */ new Set([
    "width",
    "height",
    "top",
    "left",
    "right",
    "bottom",
    "x",
    "y",
    "translateX",
    "translateY"
  ]);
  var isNumOrPxType = (v3) => v3 === number || v3 === px;
  var getPosFromMatrix = (matrix, pos) => parseFloat(matrix.split(", ")[pos]);
  var getTranslateFromMatrix = (pos2, pos3) => (_bbox, { transform }) => {
    if (transform === "none" || !transform)
      return 0;
    const matrix3d = transform.match(/^matrix3d\((.+)\)$/u);
    if (matrix3d) {
      return getPosFromMatrix(matrix3d[1], pos3);
    } else {
      const matrix = transform.match(/^matrix\((.+)\)$/u);
      if (matrix) {
        return getPosFromMatrix(matrix[1], pos2);
      } else {
        return 0;
      }
    }
  };
  var transformKeys = /* @__PURE__ */ new Set(["x", "y", "z"]);
  var nonTranslationalTransformKeys = transformPropOrder.filter((key) => !transformKeys.has(key));
  function removeNonTranslationalTransform(visualElement) {
    const removedTransforms = [];
    nonTranslationalTransformKeys.forEach((key) => {
      const value = visualElement.getValue(key);
      if (value !== void 0) {
        removedTransforms.push([key, value.get()]);
        value.set(key.startsWith("scale") ? 1 : 0);
      }
    });
    return removedTransforms;
  }
  var positionalValues = {
    // Dimensions
    width: ({ x: x2 }, { paddingLeft = "0", paddingRight = "0" }) => x2.max - x2.min - parseFloat(paddingLeft) - parseFloat(paddingRight),
    height: ({ y: y3 }, { paddingTop = "0", paddingBottom = "0" }) => y3.max - y3.min - parseFloat(paddingTop) - parseFloat(paddingBottom),
    top: (_bbox, { top }) => parseFloat(top),
    left: (_bbox, { left }) => parseFloat(left),
    bottom: ({ y: y3 }, { top }) => parseFloat(top) + (y3.max - y3.min),
    right: ({ x: x2 }, { left }) => parseFloat(left) + (x2.max - x2.min),
    // Transform
    x: getTranslateFromMatrix(4, 13),
    y: getTranslateFromMatrix(5, 14)
  };
  positionalValues.translateX = positionalValues.x;
  positionalValues.translateY = positionalValues.y;

  // packages/components/node_modules/framer-motion/dist/es/render/dom/value-types/test.mjs
  var testValueType = (v3) => (type) => type.test(v3);

  // packages/components/node_modules/framer-motion/dist/es/render/dom/value-types/type-auto.mjs
  var auto = {
    test: (v3) => v3 === "auto",
    parse: (v3) => v3
  };

  // packages/components/node_modules/framer-motion/dist/es/render/dom/value-types/dimensions.mjs
  var dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto];
  var findDimensionValueType = (v3) => dimensionValueTypes.find(testValueType(v3));

  // packages/components/node_modules/framer-motion/dist/es/render/utils/KeyframesResolver.mjs
  var toResolve = /* @__PURE__ */ new Set();
  var isScheduled = false;
  var anyNeedsMeasurement = false;
  function measureAllKeyframes() {
    if (anyNeedsMeasurement) {
      const resolversToMeasure = Array.from(toResolve).filter((resolver) => resolver.needsMeasurement);
      const elementsToMeasure = new Set(resolversToMeasure.map((resolver) => resolver.element));
      const transformsToRestore = /* @__PURE__ */ new Map();
      elementsToMeasure.forEach((element) => {
        const removedTransforms = removeNonTranslationalTransform(element);
        if (!removedTransforms.length)
          return;
        transformsToRestore.set(element, removedTransforms);
        element.render();
      });
      resolversToMeasure.forEach((resolver) => resolver.measureInitialState());
      elementsToMeasure.forEach((element) => {
        element.render();
        const restore = transformsToRestore.get(element);
        if (restore) {
          restore.forEach(([key, value]) => {
            var _a;
            (_a = element.getValue(key)) === null || _a === void 0 ? void 0 : _a.set(value);
          });
        }
      });
      resolversToMeasure.forEach((resolver) => resolver.measureEndState());
      resolversToMeasure.forEach((resolver) => {
        if (resolver.suspendedScrollY !== void 0) {
          window.scrollTo(0, resolver.suspendedScrollY);
        }
      });
    }
    anyNeedsMeasurement = false;
    isScheduled = false;
    toResolve.forEach((resolver) => resolver.complete());
    toResolve.clear();
  }
  function readAllKeyframes() {
    toResolve.forEach((resolver) => {
      resolver.readKeyframes();
      if (resolver.needsMeasurement) {
        anyNeedsMeasurement = true;
      }
    });
  }
  function flushKeyframeResolvers() {
    readAllKeyframes();
    measureAllKeyframes();
  }
  var KeyframeResolver = class {
    constructor(unresolvedKeyframes, onComplete, name, motionValue2, element, isAsync = false) {
      this.isComplete = false;
      this.isAsync = false;
      this.needsMeasurement = false;
      this.isScheduled = false;
      this.unresolvedKeyframes = [...unresolvedKeyframes];
      this.onComplete = onComplete;
      this.name = name;
      this.motionValue = motionValue2;
      this.element = element;
      this.isAsync = isAsync;
    }
    scheduleResolve() {
      this.isScheduled = true;
      if (this.isAsync) {
        toResolve.add(this);
        if (!isScheduled) {
          isScheduled = true;
          frame.read(readAllKeyframes);
          frame.resolveKeyframes(measureAllKeyframes);
        }
      } else {
        this.readKeyframes();
        this.complete();
      }
    }
    readKeyframes() {
      const { unresolvedKeyframes, name, element, motionValue: motionValue2 } = this;
      for (let i3 = 0; i3 < unresolvedKeyframes.length; i3++) {
        if (unresolvedKeyframes[i3] === null) {
          if (i3 === 0) {
            const currentValue = motionValue2 === null || motionValue2 === void 0 ? void 0 : motionValue2.get();
            const finalKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];
            if (currentValue !== void 0) {
              unresolvedKeyframes[0] = currentValue;
            } else if (element && name) {
              const valueAsRead = element.readValue(name, finalKeyframe);
              if (valueAsRead !== void 0 && valueAsRead !== null) {
                unresolvedKeyframes[0] = valueAsRead;
              }
            }
            if (unresolvedKeyframes[0] === void 0) {
              unresolvedKeyframes[0] = finalKeyframe;
            }
            if (motionValue2 && currentValue === void 0) {
              motionValue2.set(unresolvedKeyframes[0]);
            }
          } else {
            unresolvedKeyframes[i3] = unresolvedKeyframes[i3 - 1];
          }
        }
      }
    }
    setFinalKeyframe() {
    }
    measureInitialState() {
    }
    renderEndStyles() {
    }
    measureEndState() {
    }
    complete() {
      this.isComplete = true;
      this.onComplete(this.unresolvedKeyframes, this.finalKeyframe);
      toResolve.delete(this);
    }
    cancel() {
      if (!this.isComplete) {
        this.isScheduled = false;
        toResolve.delete(this);
      }
    }
    resume() {
      if (!this.isComplete)
        this.scheduleResolve();
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/value/types/utils/sanitize.mjs
  var sanitize = (v3) => Math.round(v3 * 1e5) / 1e5;

  // packages/components/node_modules/framer-motion/dist/es/value/types/utils/float-regex.mjs
  var floatRegex = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;

  // packages/components/node_modules/framer-motion/dist/es/value/types/utils/is-nullish.mjs
  function isNullish(v3) {
    return v3 == null;
  }

  // packages/components/node_modules/framer-motion/dist/es/value/types/utils/single-color-regex.mjs
  var singleColorRegex = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;

  // packages/components/node_modules/framer-motion/dist/es/value/types/color/utils.mjs
  var isColorString = (type, testProp) => (v3) => {
    return Boolean(typeof v3 === "string" && singleColorRegex.test(v3) && v3.startsWith(type) || testProp && !isNullish(v3) && Object.prototype.hasOwnProperty.call(v3, testProp));
  };
  var splitColor = (aName, bName, cName) => (v3) => {
    if (typeof v3 !== "string")
      return v3;
    const [a3, b3, c3, alpha2] = v3.match(floatRegex);
    return {
      [aName]: parseFloat(a3),
      [bName]: parseFloat(b3),
      [cName]: parseFloat(c3),
      alpha: alpha2 !== void 0 ? parseFloat(alpha2) : 1
    };
  };

  // packages/components/node_modules/framer-motion/dist/es/value/types/color/rgba.mjs
  var clampRgbUnit = (v3) => clamp2(0, 255, v3);
  var rgbUnit = {
    ...number,
    transform: (v3) => Math.round(clampRgbUnit(v3))
  };
  var rgba = {
    test: /* @__PURE__ */ isColorString("rgb", "red"),
    parse: /* @__PURE__ */ splitColor("red", "green", "blue"),
    transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => "rgba(" + rgbUnit.transform(red) + ", " + rgbUnit.transform(green) + ", " + rgbUnit.transform(blue) + ", " + sanitize(alpha.transform(alpha$1)) + ")"
  };

  // packages/components/node_modules/framer-motion/dist/es/value/types/color/hex.mjs
  function parseHex(v3) {
    let r4 = "";
    let g3 = "";
    let b3 = "";
    let a3 = "";
    if (v3.length > 5) {
      r4 = v3.substring(1, 3);
      g3 = v3.substring(3, 5);
      b3 = v3.substring(5, 7);
      a3 = v3.substring(7, 9);
    } else {
      r4 = v3.substring(1, 2);
      g3 = v3.substring(2, 3);
      b3 = v3.substring(3, 4);
      a3 = v3.substring(4, 5);
      r4 += r4;
      g3 += g3;
      b3 += b3;
      a3 += a3;
    }
    return {
      red: parseInt(r4, 16),
      green: parseInt(g3, 16),
      blue: parseInt(b3, 16),
      alpha: a3 ? parseInt(a3, 16) / 255 : 1
    };
  }
  var hex = {
    test: /* @__PURE__ */ isColorString("#"),
    parse: parseHex,
    transform: rgba.transform
  };

  // packages/components/node_modules/framer-motion/dist/es/value/types/color/hsla.mjs
  var hsla = {
    test: /* @__PURE__ */ isColorString("hsl", "hue"),
    parse: /* @__PURE__ */ splitColor("hue", "saturation", "lightness"),
    transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {
      return "hsla(" + Math.round(hue) + ", " + percent.transform(sanitize(saturation)) + ", " + percent.transform(sanitize(lightness)) + ", " + sanitize(alpha.transform(alpha$1)) + ")";
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/value/types/color/index.mjs
  var color = {
    test: (v3) => rgba.test(v3) || hex.test(v3) || hsla.test(v3),
    parse: (v3) => {
      if (rgba.test(v3)) {
        return rgba.parse(v3);
      } else if (hsla.test(v3)) {
        return hsla.parse(v3);
      } else {
        return hex.parse(v3);
      }
    },
    transform: (v3) => {
      return typeof v3 === "string" ? v3 : v3.hasOwnProperty("red") ? rgba.transform(v3) : hsla.transform(v3);
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/value/types/utils/color-regex.mjs
  var colorRegex = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;

  // packages/components/node_modules/framer-motion/dist/es/value/types/complex/index.mjs
  function test(v3) {
    var _a, _b;
    return isNaN(v3) && typeof v3 === "string" && (((_a = v3.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) || 0) + (((_b = v3.match(colorRegex)) === null || _b === void 0 ? void 0 : _b.length) || 0) > 0;
  }
  var NUMBER_TOKEN = "number";
  var COLOR_TOKEN = "color";
  var VAR_TOKEN = "var";
  var VAR_FUNCTION_TOKEN = "var(";
  var SPLIT_TOKEN = "${}";
  var complexRegex = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
  function analyseComplexValue(value) {
    const originalValue = value.toString();
    const values = [];
    const indexes = {
      color: [],
      number: [],
      var: []
    };
    const types = [];
    let i3 = 0;
    const tokenised = originalValue.replace(complexRegex, (parsedValue) => {
      if (color.test(parsedValue)) {
        indexes.color.push(i3);
        types.push(COLOR_TOKEN);
        values.push(color.parse(parsedValue));
      } else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) {
        indexes.var.push(i3);
        types.push(VAR_TOKEN);
        values.push(parsedValue);
      } else {
        indexes.number.push(i3);
        types.push(NUMBER_TOKEN);
        values.push(parseFloat(parsedValue));
      }
      ++i3;
      return SPLIT_TOKEN;
    });
    const split = tokenised.split(SPLIT_TOKEN);
    return { values, split, indexes, types };
  }
  function parseComplexValue(v3) {
    return analyseComplexValue(v3).values;
  }
  function createTransformer(source) {
    const { split, types } = analyseComplexValue(source);
    const numSections = split.length;
    return (v3) => {
      let output = "";
      for (let i3 = 0; i3 < numSections; i3++) {
        output += split[i3];
        if (v3[i3] !== void 0) {
          const type = types[i3];
          if (type === NUMBER_TOKEN) {
            output += sanitize(v3[i3]);
          } else if (type === COLOR_TOKEN) {
            output += color.transform(v3[i3]);
          } else {
            output += v3[i3];
          }
        }
      }
      return output;
    };
  }
  var convertNumbersToZero = (v3) => typeof v3 === "number" ? 0 : v3;
  function getAnimatableNone(v3) {
    const parsed = parseComplexValue(v3);
    const transformer = createTransformer(v3);
    return transformer(parsed.map(convertNumbersToZero));
  }
  var complex = {
    test,
    parse: parseComplexValue,
    createTransformer,
    getAnimatableNone
  };

  // packages/components/node_modules/framer-motion/dist/es/value/types/complex/filter.mjs
  var maxDefaults = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
  function applyDefaultFilter(v3) {
    const [name, value] = v3.slice(0, -1).split("(");
    if (name === "drop-shadow")
      return v3;
    const [number2] = value.match(floatRegex) || [];
    if (!number2)
      return v3;
    const unit = value.replace(number2, "");
    let defaultValue2 = maxDefaults.has(name) ? 1 : 0;
    if (number2 !== value)
      defaultValue2 *= 100;
    return name + "(" + defaultValue2 + unit + ")";
  }
  var functionRegex = /\b([a-z-]*)\(.*?\)/gu;
  var filter = {
    ...complex,
    getAnimatableNone: (v3) => {
      const functions = v3.match(functionRegex);
      return functions ? functions.map(applyDefaultFilter).join(" ") : v3;
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/render/dom/value-types/number-browser.mjs
  var browserNumberValueTypes = {
    // Border props
    borderWidth: px,
    borderTopWidth: px,
    borderRightWidth: px,
    borderBottomWidth: px,
    borderLeftWidth: px,
    borderRadius: px,
    radius: px,
    borderTopLeftRadius: px,
    borderTopRightRadius: px,
    borderBottomRightRadius: px,
    borderBottomLeftRadius: px,
    // Positioning props
    width: px,
    maxWidth: px,
    height: px,
    maxHeight: px,
    top: px,
    right: px,
    bottom: px,
    left: px,
    // Spacing props
    padding: px,
    paddingTop: px,
    paddingRight: px,
    paddingBottom: px,
    paddingLeft: px,
    margin: px,
    marginTop: px,
    marginRight: px,
    marginBottom: px,
    marginLeft: px,
    // Misc
    backgroundPositionX: px,
    backgroundPositionY: px
  };

  // packages/components/node_modules/framer-motion/dist/es/render/dom/value-types/transform.mjs
  var transformValueTypes = {
    rotate: degrees,
    rotateX: degrees,
    rotateY: degrees,
    rotateZ: degrees,
    scale,
    scaleX: scale,
    scaleY: scale,
    scaleZ: scale,
    skew: degrees,
    skewX: degrees,
    skewY: degrees,
    distance: px,
    translateX: px,
    translateY: px,
    translateZ: px,
    x: px,
    y: px,
    z: px,
    perspective: px,
    transformPerspective: px,
    opacity: alpha,
    originX: progressPercentage,
    originY: progressPercentage,
    originZ: px
  };

  // packages/components/node_modules/framer-motion/dist/es/render/dom/value-types/type-int.mjs
  var int = {
    ...number,
    transform: Math.round
  };

  // packages/components/node_modules/framer-motion/dist/es/render/dom/value-types/number.mjs
  var numberValueTypes = {
    ...browserNumberValueTypes,
    ...transformValueTypes,
    zIndex: int,
    size: px,
    // SVG
    fillOpacity: alpha,
    strokeOpacity: alpha,
    numOctaves: int
  };

  // packages/components/node_modules/framer-motion/dist/es/render/dom/value-types/defaults.mjs
  var defaultValueTypes = {
    ...numberValueTypes,
    // Color props
    color,
    backgroundColor: color,
    outlineColor: color,
    fill: color,
    stroke: color,
    // Border props
    borderColor: color,
    borderTopColor: color,
    borderRightColor: color,
    borderBottomColor: color,
    borderLeftColor: color,
    filter,
    WebkitFilter: filter
  };
  var getDefaultValueType = (key) => defaultValueTypes[key];

  // packages/components/node_modules/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs
  function getAnimatableNone2(key, value) {
    let defaultValueType = getDefaultValueType(key);
    if (defaultValueType !== filter)
      defaultValueType = complex;
    return defaultValueType.getAnimatableNone ? defaultValueType.getAnimatableNone(value) : void 0;
  }

  // packages/components/node_modules/framer-motion/dist/es/render/html/utils/make-none-animatable.mjs
  var invalidTemplates = /* @__PURE__ */ new Set(["auto", "none", "0"]);
  function makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name) {
    let i3 = 0;
    let animatableTemplate = void 0;
    while (i3 < unresolvedKeyframes.length && !animatableTemplate) {
      const keyframe = unresolvedKeyframes[i3];
      if (typeof keyframe === "string" && !invalidTemplates.has(keyframe) && analyseComplexValue(keyframe).values.length) {
        animatableTemplate = unresolvedKeyframes[i3];
      }
      i3++;
    }
    if (animatableTemplate && name) {
      for (const noneIndex of noneKeyframeIndexes) {
        unresolvedKeyframes[noneIndex] = getAnimatableNone2(name, animatableTemplate);
      }
    }
  }

  // packages/components/node_modules/framer-motion/dist/es/render/dom/DOMKeyframesResolver.mjs
  var DOMKeyframesResolver = class extends KeyframeResolver {
    constructor(unresolvedKeyframes, onComplete, name, motionValue2, element) {
      super(unresolvedKeyframes, onComplete, name, motionValue2, element, true);
    }
    readKeyframes() {
      const { unresolvedKeyframes, element, name } = this;
      if (!element || !element.current)
        return;
      super.readKeyframes();
      for (let i3 = 0; i3 < unresolvedKeyframes.length; i3++) {
        let keyframe = unresolvedKeyframes[i3];
        if (typeof keyframe === "string") {
          keyframe = keyframe.trim();
          if (isCSSVariableToken(keyframe)) {
            const resolved = getVariableValue(keyframe, element.current);
            if (resolved !== void 0) {
              unresolvedKeyframes[i3] = resolved;
            }
            if (i3 === unresolvedKeyframes.length - 1) {
              this.finalKeyframe = keyframe;
            }
          }
        }
      }
      this.resolveNoneKeyframes();
      if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) {
        return;
      }
      const [origin, target] = unresolvedKeyframes;
      const originType = findDimensionValueType(origin);
      const targetType = findDimensionValueType(target);
      if (originType === targetType)
        return;
      if (isNumOrPxType(originType) && isNumOrPxType(targetType)) {
        for (let i3 = 0; i3 < unresolvedKeyframes.length; i3++) {
          const value = unresolvedKeyframes[i3];
          if (typeof value === "string") {
            unresolvedKeyframes[i3] = parseFloat(value);
          }
        }
      } else {
        this.needsMeasurement = true;
      }
    }
    resolveNoneKeyframes() {
      const { unresolvedKeyframes, name } = this;
      const noneKeyframeIndexes = [];
      for (let i3 = 0; i3 < unresolvedKeyframes.length; i3++) {
        if (isNone(unresolvedKeyframes[i3])) {
          noneKeyframeIndexes.push(i3);
        }
      }
      if (noneKeyframeIndexes.length) {
        makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name);
      }
    }
    measureInitialState() {
      const { element, unresolvedKeyframes, name } = this;
      if (!element || !element.current)
        return;
      if (name === "height") {
        this.suspendedScrollY = window.pageYOffset;
      }
      this.measuredOrigin = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));
      unresolvedKeyframes[0] = this.measuredOrigin;
      const measureKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];
      if (measureKeyframe !== void 0) {
        element.getValue(name, measureKeyframe).jump(measureKeyframe, false);
      }
    }
    measureEndState() {
      var _a;
      const { element, name, unresolvedKeyframes } = this;
      if (!element || !element.current)
        return;
      const value = element.getValue(name);
      value && value.jump(this.measuredOrigin, false);
      const finalKeyframeIndex = unresolvedKeyframes.length - 1;
      const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex];
      unresolvedKeyframes[finalKeyframeIndex] = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));
      if (finalKeyframe !== null && this.finalKeyframe === void 0) {
        this.finalKeyframe = finalKeyframe;
      }
      if ((_a = this.removedTransforms) === null || _a === void 0 ? void 0 : _a.length) {
        this.removedTransforms.forEach(([unsetTransformName, unsetTransformValue]) => {
          element.getValue(unsetTransformName).set(unsetTransformValue);
        });
      }
      this.resolveNoneKeyframes();
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/animation/generators/utils/is-generator.mjs
  function isGenerator(type) {
    return typeof type === "function";
  }

  // packages/components/node_modules/framer-motion/dist/es/frameloop/sync-time.mjs
  var now;
  function clearTime() {
    now = void 0;
  }
  var time = {
    now: () => {
      if (now === void 0) {
        time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming ? frameData.timestamp : performance.now());
      }
      return now;
    },
    set: (newTime) => {
      now = newTime;
      queueMicrotask(clearTime);
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/animation/utils/is-animatable.mjs
  var isAnimatable = (value, name) => {
    if (name === "zIndex")
      return false;
    if (typeof value === "number" || Array.isArray(value))
      return true;
    if (typeof value === "string" && // It's animatable if we have a string
    (complex.test(value) || value === "0") && // And it contains numbers and/or colors
    !value.startsWith("url(")) {
      return true;
    }
    return false;
  };

  // packages/components/node_modules/framer-motion/dist/es/animation/animators/utils/can-animate.mjs
  function hasKeyframesChanged(keyframes4) {
    const current = keyframes4[0];
    if (keyframes4.length === 1)
      return true;
    for (let i3 = 0; i3 < keyframes4.length; i3++) {
      if (keyframes4[i3] !== current)
        return true;
    }
  }
  function canAnimate(keyframes4, name, type, velocity) {
    const originKeyframe = keyframes4[0];
    if (originKeyframe === null)
      return false;
    if (name === "display" || name === "visibility")
      return true;
    const targetKeyframe = keyframes4[keyframes4.length - 1];
    const isOriginAnimatable = isAnimatable(originKeyframe, name);
    const isTargetAnimatable = isAnimatable(targetKeyframe, name);
    warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${name} from "${originKeyframe}" to "${targetKeyframe}". ${originKeyframe} is not an animatable value - to enable this animation set ${originKeyframe} to a value animatable to ${targetKeyframe} via the \`style\` property.`);
    if (!isOriginAnimatable || !isTargetAnimatable) {
      return false;
    }
    return hasKeyframesChanged(keyframes4) || (type === "spring" || isGenerator(type)) && velocity;
  }

  // packages/components/node_modules/framer-motion/dist/es/animation/animators/BaseAnimation.mjs
  var MAX_RESOLVE_DELAY = 40;
  var BaseAnimation = class {
    constructor({ autoplay = true, delay: delay2 = 0, type = "keyframes", repeat = 0, repeatDelay = 0, repeatType = "loop", ...options2 }) {
      this.isStopped = false;
      this.hasAttemptedResolve = false;
      this.createdAt = time.now();
      this.options = {
        autoplay,
        delay: delay2,
        type,
        repeat,
        repeatDelay,
        repeatType,
        ...options2
      };
      this.updateFinishedPromise();
    }
    /**
     * This method uses the createdAt and resolvedAt to calculate the
     * animation startTime. *Ideally*, we would use the createdAt time as t=0
     * as the following frame would then be the first frame of the animation in
     * progress, which would feel snappier.
     *
     * However, if there's a delay (main thread work) between the creation of
     * the animation and the first commited frame, we prefer to use resolvedAt
     * to avoid a sudden jump into the animation.
     */
    calcStartTime() {
      if (!this.resolvedAt)
        return this.createdAt;
      return this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY ? this.resolvedAt : this.createdAt;
    }
    /**
     * A getter for resolved data. If keyframes are not yet resolved, accessing
     * this.resolved will synchronously flush all pending keyframe resolvers.
     * This is a deoptimisation, but at its worst still batches read/writes.
     */
    get resolved() {
      if (!this._resolved && !this.hasAttemptedResolve) {
        flushKeyframeResolvers();
      }
      return this._resolved;
    }
    /**
     * A method to be called when the keyframes resolver completes. This method
     * will check if its possible to run the animation and, if not, skip it.
     * Otherwise, it will call initPlayback on the implementing class.
     */
    onKeyframesResolved(keyframes4, finalKeyframe) {
      this.resolvedAt = time.now();
      this.hasAttemptedResolve = true;
      const { name, type, velocity, delay: delay2, onComplete, onUpdate, isGenerator: isGenerator2 } = this.options;
      if (!isGenerator2 && !canAnimate(keyframes4, name, type, velocity)) {
        if (instantAnimationState.current || !delay2) {
          onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(getFinalKeyframe(keyframes4, this.options, finalKeyframe));
          onComplete === null || onComplete === void 0 ? void 0 : onComplete();
          this.resolveFinishedPromise();
          return;
        } else {
          this.options.duration = 0;
        }
      }
      const resolvedAnimation = this.initPlayback(keyframes4, finalKeyframe);
      if (resolvedAnimation === false)
        return;
      this._resolved = {
        keyframes: keyframes4,
        finalKeyframe,
        ...resolvedAnimation
      };
      this.onPostResolved();
    }
    onPostResolved() {
    }
    /**
     * Allows the returned animation to be awaited or promise-chained. Currently
     * resolves when the animation finishes at all but in a future update could/should
     * reject if its cancels.
     */
    then(resolve, reject) {
      return this.currentFinishedPromise.then(resolve, reject);
    }
    flatten() {
      this.options.type = "keyframes";
      this.options.ease = "linear";
    }
    updateFinishedPromise() {
      this.currentFinishedPromise = new Promise((resolve) => {
        this.resolveFinishedPromise = resolve;
      });
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/utils/progress.mjs
  var progress = (from2, to, value) => {
    const toFromDifference = to - from2;
    return toFromDifference === 0 ? 1 : (value - from2) / toFromDifference;
  };

  // packages/components/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/linear.mjs
  var generateLinearEasing = (easing, duration, resolution = 10) => {
    let points = "";
    const numPoints = Math.max(Math.round(duration / resolution), 2);
    for (let i3 = 0; i3 < numPoints; i3++) {
      points += easing(progress(0, numPoints - 1, i3)) + ", ";
    }
    return `linear(${points.substring(0, points.length - 2)})`;
  };

  // packages/components/node_modules/framer-motion/dist/es/utils/velocity-per-second.mjs
  function velocityPerSecond(velocity, frameDuration) {
    return frameDuration ? velocity * (1e3 / frameDuration) : 0;
  }

  // packages/components/node_modules/framer-motion/dist/es/animation/generators/utils/velocity.mjs
  var velocitySampleDuration = 5;
  function calcGeneratorVelocity(resolveValue, t4, current) {
    const prevT = Math.max(t4 - velocitySampleDuration, 0);
    return velocityPerSecond(current - resolveValue(prevT), t4 - prevT);
  }

  // packages/components/node_modules/framer-motion/dist/es/animation/generators/spring/defaults.mjs
  var springDefaults = {
    // Default spring physics
    stiffness: 100,
    damping: 10,
    mass: 1,
    velocity: 0,
    // Default duration/bounce-based options
    duration: 800,
    // in ms
    bounce: 0.3,
    visualDuration: 0.3,
    // in seconds
    // Rest thresholds
    restSpeed: {
      granular: 0.01,
      default: 2
    },
    restDelta: {
      granular: 5e-3,
      default: 0.5
    },
    // Limits
    minDuration: 0.01,
    // in seconds
    maxDuration: 10,
    // in seconds
    minDamping: 0.05,
    maxDamping: 1
  };

  // packages/components/node_modules/framer-motion/dist/es/animation/generators/spring/find.mjs
  var safeMin = 1e-3;
  function findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass }) {
    let envelope;
    let derivative;
    warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), "Spring duration must be 10 seconds or less");
    let dampingRatio = 1 - bounce;
    dampingRatio = clamp2(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);
    duration = clamp2(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration));
    if (dampingRatio < 1) {
      envelope = (undampedFreq2) => {
        const exponentialDecay = undampedFreq2 * dampingRatio;
        const delta = exponentialDecay * duration;
        const a3 = exponentialDecay - velocity;
        const b3 = calcAngularFreq(undampedFreq2, dampingRatio);
        const c3 = Math.exp(-delta);
        return safeMin - a3 / b3 * c3;
      };
      derivative = (undampedFreq2) => {
        const exponentialDecay = undampedFreq2 * dampingRatio;
        const delta = exponentialDecay * duration;
        const d3 = delta * velocity + velocity;
        const e3 = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq2, 2) * duration;
        const f3 = Math.exp(-delta);
        const g3 = calcAngularFreq(Math.pow(undampedFreq2, 2), dampingRatio);
        const factor = -envelope(undampedFreq2) + safeMin > 0 ? -1 : 1;
        return factor * ((d3 - e3) * f3) / g3;
      };
    } else {
      envelope = (undampedFreq2) => {
        const a3 = Math.exp(-undampedFreq2 * duration);
        const b3 = (undampedFreq2 - velocity) * duration + 1;
        return -safeMin + a3 * b3;
      };
      derivative = (undampedFreq2) => {
        const a3 = Math.exp(-undampedFreq2 * duration);
        const b3 = (velocity - undampedFreq2) * (duration * duration);
        return a3 * b3;
      };
    }
    const initialGuess = 5 / duration;
    const undampedFreq = approximateRoot(envelope, derivative, initialGuess);
    duration = secondsToMilliseconds(duration);
    if (isNaN(undampedFreq)) {
      return {
        stiffness: springDefaults.stiffness,
        damping: springDefaults.damping,
        duration
      };
    } else {
      const stiffness = Math.pow(undampedFreq, 2) * mass;
      return {
        stiffness,
        damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),
        duration
      };
    }
  }
  var rootIterations = 12;
  function approximateRoot(envelope, derivative, initialGuess) {
    let result = initialGuess;
    for (let i3 = 1; i3 < rootIterations; i3++) {
      result = result - envelope(result) / derivative(result);
    }
    return result;
  }
  function calcAngularFreq(undampedFreq, dampingRatio) {
    return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);
  }

  // packages/components/node_modules/framer-motion/dist/es/animation/generators/utils/calc-duration.mjs
  var maxGeneratorDuration = 2e4;
  function calcGeneratorDuration(generator) {
    let duration = 0;
    const timeStep = 50;
    let state = generator.next(duration);
    while (!state.done && duration < maxGeneratorDuration) {
      duration += timeStep;
      state = generator.next(duration);
    }
    return duration >= maxGeneratorDuration ? Infinity : duration;
  }

  // packages/components/node_modules/framer-motion/dist/es/animation/generators/spring/index.mjs
  var durationKeys = ["duration", "bounce"];
  var physicsKeys = ["stiffness", "damping", "mass"];
  function isSpringType(options2, keys) {
    return keys.some((key) => options2[key] !== void 0);
  }
  function getSpringOptions(options2) {
    let springOptions = {
      velocity: springDefaults.velocity,
      stiffness: springDefaults.stiffness,
      damping: springDefaults.damping,
      mass: springDefaults.mass,
      isResolvedFromDuration: false,
      ...options2
    };
    if (!isSpringType(options2, physicsKeys) && isSpringType(options2, durationKeys)) {
      if (options2.visualDuration) {
        const visualDuration = options2.visualDuration;
        const root = 2 * Math.PI / (visualDuration * 1.2);
        const stiffness = root * root;
        const damping = 2 * clamp2(0.05, 1, 1 - options2.bounce) * Math.sqrt(stiffness);
        springOptions = {
          ...springOptions,
          mass: springDefaults.mass,
          stiffness,
          damping
        };
      } else {
        const derived = findSpring(options2);
        springOptions = {
          ...springOptions,
          ...derived,
          mass: springDefaults.mass
        };
        springOptions.isResolvedFromDuration = true;
      }
    }
    return springOptions;
  }
  function spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce = springDefaults.bounce) {
    const options2 = typeof optionsOrVisualDuration !== "object" ? {
      visualDuration: optionsOrVisualDuration,
      keyframes: [0, 1],
      bounce
    } : optionsOrVisualDuration;
    let { restSpeed, restDelta } = options2;
    const origin = options2.keyframes[0];
    const target = options2.keyframes[options2.keyframes.length - 1];
    const state = { done: false, value: origin };
    const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration } = getSpringOptions({
      ...options2,
      velocity: -millisecondsToSeconds(options2.velocity || 0)
    });
    const initialVelocity = velocity || 0;
    const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));
    const initialDelta = target - origin;
    const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));
    const isGranularScale = Math.abs(initialDelta) < 5;
    restSpeed || (restSpeed = isGranularScale ? springDefaults.restSpeed.granular : springDefaults.restSpeed.default);
    restDelta || (restDelta = isGranularScale ? springDefaults.restDelta.granular : springDefaults.restDelta.default);
    let resolveSpring;
    if (dampingRatio < 1) {
      const angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);
      resolveSpring = (t4) => {
        const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t4);
        return target - envelope * ((initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) / angularFreq * Math.sin(angularFreq * t4) + initialDelta * Math.cos(angularFreq * t4));
      };
    } else if (dampingRatio === 1) {
      resolveSpring = (t4) => target - Math.exp(-undampedAngularFreq * t4) * (initialDelta + (initialVelocity + undampedAngularFreq * initialDelta) * t4);
    } else {
      const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);
      resolveSpring = (t4) => {
        const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t4);
        const freqForT = Math.min(dampedAngularFreq * t4, 300);
        return target - envelope * ((initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) * Math.sinh(freqForT) + dampedAngularFreq * initialDelta * Math.cosh(freqForT)) / dampedAngularFreq;
      };
    }
    const generator = {
      calculatedDuration: isResolvedFromDuration ? duration || null : null,
      next: (t4) => {
        const current = resolveSpring(t4);
        if (!isResolvedFromDuration) {
          let currentVelocity = 0;
          if (dampingRatio < 1) {
            currentVelocity = t4 === 0 ? secondsToMilliseconds(initialVelocity) : calcGeneratorVelocity(resolveSpring, t4, current);
          }
          const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;
          const isBelowDisplacementThreshold = Math.abs(target - current) <= restDelta;
          state.done = isBelowVelocityThreshold && isBelowDisplacementThreshold;
        } else {
          state.done = t4 >= duration;
        }
        state.value = state.done ? target : current;
        return state;
      },
      toString: () => {
        const calculatedDuration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);
        const easing = generateLinearEasing((progress2) => generator.next(calculatedDuration * progress2).value, calculatedDuration, 30);
        return calculatedDuration + "ms " + easing;
      }
    };
    return generator;
  }

  // packages/components/node_modules/framer-motion/dist/es/animation/generators/inertia.mjs
  function inertia({ keyframes: keyframes4, velocity = 0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min: min3, max: max3, restDelta = 0.5, restSpeed }) {
    const origin = keyframes4[0];
    const state = {
      done: false,
      value: origin
    };
    const isOutOfBounds = (v3) => min3 !== void 0 && v3 < min3 || max3 !== void 0 && v3 > max3;
    const nearestBoundary = (v3) => {
      if (min3 === void 0)
        return max3;
      if (max3 === void 0)
        return min3;
      return Math.abs(min3 - v3) < Math.abs(max3 - v3) ? min3 : max3;
    };
    let amplitude = power * velocity;
    const ideal = origin + amplitude;
    const target = modifyTarget === void 0 ? ideal : modifyTarget(ideal);
    if (target !== ideal)
      amplitude = target - origin;
    const calcDelta = (t4) => -amplitude * Math.exp(-t4 / timeConstant);
    const calcLatest = (t4) => target + calcDelta(t4);
    const applyFriction = (t4) => {
      const delta = calcDelta(t4);
      const latest = calcLatest(t4);
      state.done = Math.abs(delta) <= restDelta;
      state.value = state.done ? target : latest;
    };
    let timeReachedBoundary;
    let spring$1;
    const checkCatchBoundary = (t4) => {
      if (!isOutOfBounds(state.value))
        return;
      timeReachedBoundary = t4;
      spring$1 = spring({
        keyframes: [state.value, nearestBoundary(state.value)],
        velocity: calcGeneratorVelocity(calcLatest, t4, state.value),
        // TODO: This should be passing * 1000
        damping: bounceDamping,
        stiffness: bounceStiffness,
        restDelta,
        restSpeed
      });
    };
    checkCatchBoundary(0);
    return {
      calculatedDuration: null,
      next: (t4) => {
        let hasUpdatedFrame = false;
        if (!spring$1 && timeReachedBoundary === void 0) {
          hasUpdatedFrame = true;
          applyFriction(t4);
          checkCatchBoundary(t4);
        }
        if (timeReachedBoundary !== void 0 && t4 >= timeReachedBoundary) {
          return spring$1.next(t4 - timeReachedBoundary);
        } else {
          !hasUpdatedFrame && applyFriction(t4);
          return state;
        }
      }
    };
  }

  // packages/components/node_modules/framer-motion/dist/es/easing/ease.mjs
  var easeIn = /* @__PURE__ */ cubicBezier(0.42, 0, 1, 1);
  var easeOut = /* @__PURE__ */ cubicBezier(0, 0, 0.58, 1);
  var easeInOut = /* @__PURE__ */ cubicBezier(0.42, 0, 0.58, 1);

  // packages/components/node_modules/framer-motion/dist/es/easing/utils/is-easing-array.mjs
  var isEasingArray = (ease2) => {
    return Array.isArray(ease2) && typeof ease2[0] !== "number";
  };

  // packages/components/node_modules/framer-motion/dist/es/easing/utils/is-bezier-definition.mjs
  var isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === "number";

  // packages/components/node_modules/framer-motion/dist/es/easing/utils/map.mjs
  var easingLookup = {
    linear: noop2,
    easeIn,
    easeInOut,
    easeOut,
    circIn,
    circInOut,
    circOut,
    backIn,
    backInOut,
    backOut,
    anticipate
  };
  var easingDefinitionToFunction = (definition) => {
    if (isBezierDefinition(definition)) {
      invariant2(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`);
      const [x1, y1, x2, y22] = definition;
      return cubicBezier(x1, y1, x2, y22);
    } else if (typeof definition === "string") {
      invariant2(easingLookup[definition] !== void 0, `Invalid easing type '${definition}'`);
      return easingLookup[definition];
    }
    return definition;
  };

  // packages/components/node_modules/framer-motion/dist/es/utils/pipe.mjs
  var combineFunctions = (a3, b3) => (v3) => b3(a3(v3));
  var pipe = (...transformers) => transformers.reduce(combineFunctions);

  // packages/components/node_modules/framer-motion/dist/es/utils/mix/number.mjs
  var mixNumber = (from2, to, progress2) => {
    return from2 + (to - from2) * progress2;
  };

  // packages/components/node_modules/framer-motion/dist/es/utils/hsla-to-rgba.mjs
  function hueToRgb(p3, q2, t4) {
    if (t4 < 0)
      t4 += 1;
    if (t4 > 1)
      t4 -= 1;
    if (t4 < 1 / 6)
      return p3 + (q2 - p3) * 6 * t4;
    if (t4 < 1 / 2)
      return q2;
    if (t4 < 2 / 3)
      return p3 + (q2 - p3) * (2 / 3 - t4) * 6;
    return p3;
  }
  function hslaToRgba({ hue, saturation, lightness, alpha: alpha2 }) {
    hue /= 360;
    saturation /= 100;
    lightness /= 100;
    let red = 0;
    let green = 0;
    let blue = 0;
    if (!saturation) {
      red = green = blue = lightness;
    } else {
      const q2 = lightness < 0.5 ? lightness * (1 + saturation) : lightness + saturation - lightness * saturation;
      const p3 = 2 * lightness - q2;
      red = hueToRgb(p3, q2, hue + 1 / 3);
      green = hueToRgb(p3, q2, hue);
      blue = hueToRgb(p3, q2, hue - 1 / 3);
    }
    return {
      red: Math.round(red * 255),
      green: Math.round(green * 255),
      blue: Math.round(blue * 255),
      alpha: alpha2
    };
  }

  // packages/components/node_modules/framer-motion/dist/es/utils/mix/immediate.mjs
  function mixImmediate(a3, b3) {
    return (p3) => p3 > 0 ? b3 : a3;
  }

  // packages/components/node_modules/framer-motion/dist/es/utils/mix/color.mjs
  var mixLinearColor = (from2, to, v3) => {
    const fromExpo = from2 * from2;
    const expo = v3 * (to * to - fromExpo) + fromExpo;
    return expo < 0 ? 0 : Math.sqrt(expo);
  };
  var colorTypes = [hex, rgba, hsla];
  var getColorType = (v3) => colorTypes.find((type) => type.test(v3));
  function asRGBA(color2) {
    const type = getColorType(color2);
    warning(Boolean(type), `'${color2}' is not an animatable color. Use the equivalent color code instead.`);
    if (!Boolean(type))
      return false;
    let model = type.parse(color2);
    if (type === hsla) {
      model = hslaToRgba(model);
    }
    return model;
  }
  var mixColor = (from2, to) => {
    const fromRGBA = asRGBA(from2);
    const toRGBA = asRGBA(to);
    if (!fromRGBA || !toRGBA) {
      return mixImmediate(from2, to);
    }
    const blended = { ...fromRGBA };
    return (v3) => {
      blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v3);
      blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v3);
      blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v3);
      blended.alpha = mixNumber(fromRGBA.alpha, toRGBA.alpha, v3);
      return rgba.transform(blended);
    };
  };

  // packages/components/node_modules/framer-motion/dist/es/utils/mix/visibility.mjs
  var invisibleValues = /* @__PURE__ */ new Set(["none", "hidden"]);
  function mixVisibility(origin, target) {
    if (invisibleValues.has(origin)) {
      return (p3) => p3 <= 0 ? origin : target;
    } else {
      return (p3) => p3 >= 1 ? target : origin;
    }
  }

  // packages/components/node_modules/framer-motion/dist/es/utils/mix/complex.mjs
  function mixNumber2(a3, b3) {
    return (p3) => mixNumber(a3, b3, p3);
  }
  function getMixer(a3) {
    if (typeof a3 === "number") {
      return mixNumber2;
    } else if (typeof a3 === "string") {
      return isCSSVariableToken(a3) ? mixImmediate : color.test(a3) ? mixColor : mixComplex;
    } else if (Array.isArray(a3)) {
      return mixArray;
    } else if (typeof a3 === "object") {
      return color.test(a3) ? mixColor : mixObject;
    }
    return mixImmediate;
  }
  function mixArray(a3, b3) {
    const output = [...a3];
    const numValues = output.length;
    const blendValue = a3.map((v3, i3) => getMixer(v3)(v3, b3[i3]));
    return (p3) => {
      for (let i3 = 0; i3 < numValues; i3++) {
        output[i3] = blendValue[i3](p3);
      }
      return output;
    };
  }
  function mixObject(a3, b3) {
    const output = { ...a3, ...b3 };
    const blendValue = {};
    for (const key in output) {
      if (a3[key] !== void 0 && b3[key] !== void 0) {
        blendValue[key] = getMixer(a3[key])(a3[key], b3[key]);
      }
    }
    return (v3) => {
      for (const key in blendValue) {
        output[key] = blendValue[key](v3);
      }
      return output;
    };
  }
  function matchOrder(origin, target) {
    var _a;
    const orderedOrigin = [];
    const pointers = { color: 0, var: 0, number: 0 };
    for (let i3 = 0; i3 < target.values.length; i3++) {
      const type = target.types[i3];
      const originIndex = origin.indexes[type][pointers[type]];
      const originValue = (_a = origin.values[originIndex]) !== null && _a !== void 0 ? _a : 0;
      orderedOrigin[i3] = originValue;
      pointers[type]++;
    }
    return orderedOrigin;
  }
  var mixComplex = (origin, target) => {
    const template = complex.createTransformer(target);
    const originStats = analyseComplexValue(origin);
    const targetStats = analyseComplexValue(target);
    const canInterpolate = originStats.indexes.var.length === targetStats.indexes.var.length && originStats.indexes.color.length === targetStats.indexes.color.length && originStats.indexes.number.length >= targetStats.indexes.number.length;
    if (canInterpolate) {
      if (invisibleValues.has(origin) && !targetStats.values.length || invisibleValues.has(target) && !originStats.values.length) {
        return mixVisibility(origin, target);
      }
      return pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template);
    } else {
      warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`);
      return mixImmediate(origin, target);
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/utils/mix/index.mjs
  function mix(from2, to, p3) {
    if (typeof from2 === "number" && typeof to === "number" && typeof p3 === "number") {
      return mixNumber(from2, to, p3);
    }
    const mixer = getMixer(from2);
    return mixer(from2, to);
  }

  // packages/components/node_modules/framer-motion/dist/es/utils/interpolate.mjs
  function createMixers(output, ease2, customMixer) {
    const mixers = [];
    const mixerFactory = customMixer || mix;
    const numMixers = output.length - 1;
    for (let i3 = 0; i3 < numMixers; i3++) {
      let mixer = mixerFactory(output[i3], output[i3 + 1]);
      if (ease2) {
        const easingFunction = Array.isArray(ease2) ? ease2[i3] || noop2 : ease2;
        mixer = pipe(easingFunction, mixer);
      }
      mixers.push(mixer);
    }
    return mixers;
  }
  function interpolate(input, output, { clamp: isClamp = true, ease: ease2, mixer } = {}) {
    const inputLength = input.length;
    invariant2(inputLength === output.length, "Both input and output ranges must be the same length");
    if (inputLength === 1)
      return () => output[0];
    if (inputLength === 2 && input[0] === input[1])
      return () => output[1];
    if (input[0] > input[inputLength - 1]) {
      input = [...input].reverse();
      output = [...output].reverse();
    }
    const mixers = createMixers(output, ease2, mixer);
    const numMixers = mixers.length;
    const interpolator = (v3) => {
      let i3 = 0;
      if (numMixers > 1) {
        for (; i3 < input.length - 2; i3++) {
          if (v3 < input[i3 + 1])
            break;
        }
      }
      const progressInRange = progress(input[i3], input[i3 + 1], v3);
      return mixers[i3](progressInRange);
    };
    return isClamp ? (v3) => interpolator(clamp2(input[0], input[inputLength - 1], v3)) : interpolator;
  }

  // packages/components/node_modules/framer-motion/dist/es/utils/offsets/fill.mjs
  function fillOffset(offset3, remaining) {
    const min3 = offset3[offset3.length - 1];
    for (let i3 = 1; i3 <= remaining; i3++) {
      const offsetProgress = progress(0, remaining, i3);
      offset3.push(mixNumber(min3, 1, offsetProgress));
    }
  }

  // packages/components/node_modules/framer-motion/dist/es/utils/offsets/default.mjs
  function defaultOffset(arr) {
    const offset3 = [0];
    fillOffset(offset3, arr.length - 1);
    return offset3;
  }

  // packages/components/node_modules/framer-motion/dist/es/utils/offsets/time.mjs
  function convertOffsetToTimes(offset3, duration) {
    return offset3.map((o4) => o4 * duration);
  }

  // packages/components/node_modules/framer-motion/dist/es/animation/generators/keyframes.mjs
  function defaultEasing(values, easing) {
    return values.map(() => easing || easeInOut).splice(0, values.length - 1);
  }
  function keyframes({ duration = 300, keyframes: keyframeValues, times, ease: ease2 = "easeInOut" }) {
    const easingFunctions = isEasingArray(ease2) ? ease2.map(easingDefinitionToFunction) : easingDefinitionToFunction(ease2);
    const state = {
      done: false,
      value: keyframeValues[0]
    };
    const absoluteTimes = convertOffsetToTimes(
      // Only use the provided offsets if they're the correct length
      // TODO Maybe we should warn here if there's a length mismatch
      times && times.length === keyframeValues.length ? times : defaultOffset(keyframeValues),
      duration
    );
    const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, {
      ease: Array.isArray(easingFunctions) ? easingFunctions : defaultEasing(keyframeValues, easingFunctions)
    });
    return {
      calculatedDuration: duration,
      next: (t4) => {
        state.value = mapTimeToKeyframe(t4);
        state.done = t4 >= duration;
        return state;
      }
    };
  }

  // packages/components/node_modules/framer-motion/dist/es/animation/animators/drivers/driver-frameloop.mjs
  var frameloopDriver = (update) => {
    const passTimestamp = ({ timestamp }) => update(timestamp);
    return {
      start: () => frame.update(passTimestamp, true),
      stop: () => cancelFrame(passTimestamp),
      /**
       * If we're processing this frame we can use the
       * framelocked timestamp to keep things in sync.
       */
      now: () => frameData.isProcessing ? frameData.timestamp : time.now()
    };
  };

  // packages/components/node_modules/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs
  var generators = {
    decay: inertia,
    inertia,
    tween: keyframes,
    keyframes,
    spring
  };
  var percentToProgress = (percent2) => percent2 / 100;
  var MainThreadAnimation = class extends BaseAnimation {
    constructor(options2) {
      super(options2);
      this.holdTime = null;
      this.cancelTime = null;
      this.currentTime = 0;
      this.playbackSpeed = 1;
      this.pendingPlayState = "running";
      this.startTime = null;
      this.state = "idle";
      this.stop = () => {
        this.resolver.cancel();
        this.isStopped = true;
        if (this.state === "idle")
          return;
        this.teardown();
        const { onStop } = this.options;
        onStop && onStop();
      };
      const { name, motionValue: motionValue2, element, keyframes: keyframes4 } = this.options;
      const KeyframeResolver$1 = (element === null || element === void 0 ? void 0 : element.KeyframeResolver) || KeyframeResolver;
      const onResolved = (resolvedKeyframes, finalKeyframe) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe);
      this.resolver = new KeyframeResolver$1(keyframes4, onResolved, name, motionValue2, element);
      this.resolver.scheduleResolve();
    }
    flatten() {
      super.flatten();
      if (this._resolved) {
        Object.assign(this._resolved, this.initPlayback(this._resolved.keyframes));
      }
    }
    initPlayback(keyframes$1) {
      const { type = "keyframes", repeat = 0, repeatDelay = 0, repeatType, velocity = 0 } = this.options;
      const generatorFactory = isGenerator(type) ? type : generators[type] || keyframes;
      let mapPercentToKeyframes;
      let mirroredGenerator;
      if (generatorFactory !== keyframes && typeof keyframes$1[0] !== "number") {
        if (true) {
          invariant2(keyframes$1.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`);
        }
        mapPercentToKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));
        keyframes$1 = [0, 100];
      }
      const generator = generatorFactory({ ...this.options, keyframes: keyframes$1 });
      if (repeatType === "mirror") {
        mirroredGenerator = generatorFactory({
          ...this.options,
          keyframes: [...keyframes$1].reverse(),
          velocity: -velocity
        });
      }
      if (generator.calculatedDuration === null) {
        generator.calculatedDuration = calcGeneratorDuration(generator);
      }
      const { calculatedDuration } = generator;
      const resolvedDuration = calculatedDuration + repeatDelay;
      const totalDuration = resolvedDuration * (repeat + 1) - repeatDelay;
      return {
        generator,
        mirroredGenerator,
        mapPercentToKeyframes,
        calculatedDuration,
        resolvedDuration,
        totalDuration
      };
    }
    onPostResolved() {
      const { autoplay = true } = this.options;
      this.play();
      if (this.pendingPlayState === "paused" || !autoplay) {
        this.pause();
      } else {
        this.state = this.pendingPlayState;
      }
    }
    tick(timestamp, sample = false) {
      const { resolved } = this;
      if (!resolved) {
        const { keyframes: keyframes5 } = this.options;
        return { done: true, value: keyframes5[keyframes5.length - 1] };
      }
      const { finalKeyframe, generator, mirroredGenerator, mapPercentToKeyframes, keyframes: keyframes4, calculatedDuration, totalDuration, resolvedDuration } = resolved;
      if (this.startTime === null)
        return generator.next(0);
      const { delay: delay2, repeat, repeatType, repeatDelay, onUpdate } = this.options;
      if (this.speed > 0) {
        this.startTime = Math.min(this.startTime, timestamp);
      } else if (this.speed < 0) {
        this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);
      }
      if (sample) {
        this.currentTime = timestamp;
      } else if (this.holdTime !== null) {
        this.currentTime = this.holdTime;
      } else {
        this.currentTime = Math.round(timestamp - this.startTime) * this.speed;
      }
      const timeWithoutDelay = this.currentTime - delay2 * (this.speed >= 0 ? 1 : -1);
      const isInDelayPhase = this.speed >= 0 ? timeWithoutDelay < 0 : timeWithoutDelay > totalDuration;
      this.currentTime = Math.max(timeWithoutDelay, 0);
      if (this.state === "finished" && this.holdTime === null) {
        this.currentTime = totalDuration;
      }
      let elapsed = this.currentTime;
      let frameGenerator = generator;
      if (repeat) {
        const progress2 = Math.min(this.currentTime, totalDuration) / resolvedDuration;
        let currentIteration = Math.floor(progress2);
        let iterationProgress = progress2 % 1;
        if (!iterationProgress && progress2 >= 1) {
          iterationProgress = 1;
        }
        iterationProgress === 1 && currentIteration--;
        currentIteration = Math.min(currentIteration, repeat + 1);
        const isOddIteration = Boolean(currentIteration % 2);
        if (isOddIteration) {
          if (repeatType === "reverse") {
            iterationProgress = 1 - iterationProgress;
            if (repeatDelay) {
              iterationProgress -= repeatDelay / resolvedDuration;
            }
          } else if (repeatType === "mirror") {
            frameGenerator = mirroredGenerator;
          }
        }
        elapsed = clamp2(0, 1, iterationProgress) * resolvedDuration;
      }
      const state = isInDelayPhase ? { done: false, value: keyframes4[0] } : frameGenerator.next(elapsed);
      if (mapPercentToKeyframes) {
        state.value = mapPercentToKeyframes(state.value);
      }
      let { done } = state;
      if (!isInDelayPhase && calculatedDuration !== null) {
        done = this.speed >= 0 ? this.currentTime >= totalDuration : this.currentTime <= 0;
      }
      const isAnimationFinished = this.holdTime === null && (this.state === "finished" || this.state === "running" && done);
      if (isAnimationFinished && finalKeyframe !== void 0) {
        state.value = getFinalKeyframe(keyframes4, this.options, finalKeyframe);
      }
      if (onUpdate) {
        onUpdate(state.value);
      }
      if (isAnimationFinished) {
        this.finish();
      }
      return state;
    }
    get duration() {
      const { resolved } = this;
      return resolved ? millisecondsToSeconds(resolved.calculatedDuration) : 0;
    }
    get time() {
      return millisecondsToSeconds(this.currentTime);
    }
    set time(newTime) {
      newTime = secondsToMilliseconds(newTime);
      this.currentTime = newTime;
      if (this.holdTime !== null || this.speed === 0) {
        this.holdTime = newTime;
      } else if (this.driver) {
        this.startTime = this.driver.now() - newTime / this.speed;
      }
    }
    get speed() {
      return this.playbackSpeed;
    }
    set speed(newSpeed) {
      const hasChanged = this.playbackSpeed !== newSpeed;
      this.playbackSpeed = newSpeed;
      if (hasChanged) {
        this.time = millisecondsToSeconds(this.currentTime);
      }
    }
    play() {
      if (!this.resolver.isScheduled) {
        this.resolver.resume();
      }
      if (!this._resolved) {
        this.pendingPlayState = "running";
        return;
      }
      if (this.isStopped)
        return;
      const { driver = frameloopDriver, onPlay, startTime } = this.options;
      if (!this.driver) {
        this.driver = driver((timestamp) => this.tick(timestamp));
      }
      onPlay && onPlay();
      const now2 = this.driver.now();
      if (this.holdTime !== null) {
        this.startTime = now2 - this.holdTime;
      } else if (!this.startTime) {
        this.startTime = startTime !== null && startTime !== void 0 ? startTime : this.calcStartTime();
      } else if (this.state === "finished") {
        this.startTime = now2;
      }
      if (this.state === "finished") {
        this.updateFinishedPromise();
      }
      this.cancelTime = this.startTime;
      this.holdTime = null;
      this.state = "running";
      this.driver.start();
    }
    pause() {
      var _a;
      if (!this._resolved) {
        this.pendingPlayState = "paused";
        return;
      }
      this.state = "paused";
      this.holdTime = (_a = this.currentTime) !== null && _a !== void 0 ? _a : 0;
    }
    complete() {
      if (this.state !== "running") {
        this.play();
      }
      this.pendingPlayState = this.state = "finished";
      this.holdTime = null;
    }
    finish() {
      this.teardown();
      this.state = "finished";
      const { onComplete } = this.options;
      onComplete && onComplete();
    }
    cancel() {
      if (this.cancelTime !== null) {
        this.tick(this.cancelTime);
      }
      this.teardown();
      this.updateFinishedPromise();
    }
    teardown() {
      this.state = "idle";
      this.stopDriver();
      this.resolveFinishedPromise();
      this.updateFinishedPromise();
      this.startTime = this.cancelTime = null;
      this.resolver.cancel();
    }
    stopDriver() {
      if (!this.driver)
        return;
      this.driver.stop();
      this.driver = void 0;
    }
    sample(time2) {
      this.startTime = 0;
      return this.tick(time2, true);
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/animation/animators/utils/accelerated-values.mjs
  var acceleratedValues = /* @__PURE__ */ new Set([
    "opacity",
    "clipPath",
    "filter",
    "transform"
    // TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved
    // or until we implement support for linear() easing.
    // "background-color"
  ]);

  // packages/components/node_modules/framer-motion/dist/es/utils/memo.mjs
  function memo3(callback) {
    let result;
    return () => {
      if (result === void 0)
        result = callback();
      return result;
    };
  }

  // packages/components/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/supports-flags.mjs
  var supportsFlags = {
    linearEasing: void 0
  };

  // packages/components/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/memo-supports.mjs
  function memoSupports(callback, supportsFlag) {
    const memoized = memo3(callback);
    return () => {
      var _a;
      return (_a = supportsFlags[supportsFlag]) !== null && _a !== void 0 ? _a : memoized();
    };
  }

  // packages/components/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/supports-linear-easing.mjs
  var supportsLinearEasing = /* @__PURE__ */ memoSupports(() => {
    try {
      document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
    } catch (e3) {
      return false;
    }
    return true;
  }, "linearEasing");

  // packages/components/node_modules/framer-motion/dist/es/animation/animators/waapi/easing.mjs
  function isWaapiSupportedEasing(easing) {
    return Boolean(typeof easing === "function" && supportsLinearEasing() || !easing || typeof easing === "string" && (easing in supportedWaapiEasing || supportsLinearEasing()) || isBezierDefinition(easing) || Array.isArray(easing) && easing.every(isWaapiSupportedEasing));
  }
  var cubicBezierAsString = ([a3, b3, c3, d3]) => `cubic-bezier(${a3}, ${b3}, ${c3}, ${d3})`;
  var supportedWaapiEasing = {
    linear: "linear",
    ease: "ease",
    easeIn: "ease-in",
    easeOut: "ease-out",
    easeInOut: "ease-in-out",
    circIn: /* @__PURE__ */ cubicBezierAsString([0, 0.65, 0.55, 1]),
    circOut: /* @__PURE__ */ cubicBezierAsString([0.55, 0, 1, 0.45]),
    backIn: /* @__PURE__ */ cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),
    backOut: /* @__PURE__ */ cubicBezierAsString([0.33, 1.53, 0.69, 0.99])
  };
  function mapEasingToNativeEasing(easing, duration) {
    if (!easing) {
      return void 0;
    } else if (typeof easing === "function" && supportsLinearEasing()) {
      return generateLinearEasing(easing, duration);
    } else if (isBezierDefinition(easing)) {
      return cubicBezierAsString(easing);
    } else if (Array.isArray(easing)) {
      return easing.map((segmentEasing) => mapEasingToNativeEasing(segmentEasing, duration) || supportedWaapiEasing.easeOut);
    } else {
      return supportedWaapiEasing[easing];
    }
  }

  // packages/components/node_modules/framer-motion/dist/es/animation/animators/waapi/index.mjs
  function startWaapiAnimation(element, valueName, keyframes4, { delay: delay2 = 0, duration = 300, repeat = 0, repeatType = "loop", ease: ease2 = "easeInOut", times } = {}) {
    const keyframeOptions = { [valueName]: keyframes4 };
    if (times)
      keyframeOptions.offset = times;
    const easing = mapEasingToNativeEasing(ease2, duration);
    if (Array.isArray(easing))
      keyframeOptions.easing = easing;
    return element.animate(keyframeOptions, {
      delay: delay2,
      duration,
      easing: !Array.isArray(easing) ? easing : "linear",
      fill: "both",
      iterations: repeat + 1,
      direction: repeatType === "reverse" ? "alternate" : "normal"
    });
  }

  // packages/components/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/attach-timeline.mjs
  function attachTimeline(animation, timeline) {
    animation.timeline = timeline;
    animation.onfinish = null;
  }

  // packages/components/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs
  var supportsWaapi = /* @__PURE__ */ memo3(() => Object.hasOwnProperty.call(Element.prototype, "animate"));

  // packages/components/node_modules/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs
  var sampleDelta = 10;
  var maxDuration = 2e4;
  function requiresPregeneratedKeyframes(options2) {
    return isGenerator(options2.type) || options2.type === "spring" || !isWaapiSupportedEasing(options2.ease);
  }
  function pregenerateKeyframes(keyframes4, options2) {
    const sampleAnimation = new MainThreadAnimation({
      ...options2,
      keyframes: keyframes4,
      repeat: 0,
      delay: 0,
      isGenerator: true
    });
    let state = { done: false, value: keyframes4[0] };
    const pregeneratedKeyframes = [];
    let t4 = 0;
    while (!state.done && t4 < maxDuration) {
      state = sampleAnimation.sample(t4);
      pregeneratedKeyframes.push(state.value);
      t4 += sampleDelta;
    }
    return {
      times: void 0,
      keyframes: pregeneratedKeyframes,
      duration: t4 - sampleDelta,
      ease: "linear"
    };
  }
  var unsupportedEasingFunctions = {
    anticipate,
    backInOut,
    circInOut
  };
  function isUnsupportedEase(key) {
    return key in unsupportedEasingFunctions;
  }
  var AcceleratedAnimation = class extends BaseAnimation {
    constructor(options2) {
      super(options2);
      const { name, motionValue: motionValue2, element, keyframes: keyframes4 } = this.options;
      this.resolver = new DOMKeyframesResolver(keyframes4, (resolvedKeyframes, finalKeyframe) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe), name, motionValue2, element);
      this.resolver.scheduleResolve();
    }
    initPlayback(keyframes4, finalKeyframe) {
      var _a;
      let { duration = 300, times, ease: ease2, type, motionValue: motionValue2, name, startTime } = this.options;
      if (!((_a = motionValue2.owner) === null || _a === void 0 ? void 0 : _a.current)) {
        return false;
      }
      if (typeof ease2 === "string" && supportsLinearEasing() && isUnsupportedEase(ease2)) {
        ease2 = unsupportedEasingFunctions[ease2];
      }
      if (requiresPregeneratedKeyframes(this.options)) {
        const { onComplete, onUpdate, motionValue: motionValue3, element, ...options2 } = this.options;
        const pregeneratedAnimation = pregenerateKeyframes(keyframes4, options2);
        keyframes4 = pregeneratedAnimation.keyframes;
        if (keyframes4.length === 1) {
          keyframes4[1] = keyframes4[0];
        }
        duration = pregeneratedAnimation.duration;
        times = pregeneratedAnimation.times;
        ease2 = pregeneratedAnimation.ease;
        type = "keyframes";
      }
      const animation = startWaapiAnimation(motionValue2.owner.current, name, keyframes4, { ...this.options, duration, times, ease: ease2 });
      animation.startTime = startTime !== null && startTime !== void 0 ? startTime : this.calcStartTime();
      if (this.pendingTimeline) {
        attachTimeline(animation, this.pendingTimeline);
        this.pendingTimeline = void 0;
      } else {
        animation.onfinish = () => {
          const { onComplete } = this.options;
          motionValue2.set(getFinalKeyframe(keyframes4, this.options, finalKeyframe));
          onComplete && onComplete();
          this.cancel();
          this.resolveFinishedPromise();
        };
      }
      return {
        animation,
        duration,
        times,
        type,
        ease: ease2,
        keyframes: keyframes4
      };
    }
    get duration() {
      const { resolved } = this;
      if (!resolved)
        return 0;
      const { duration } = resolved;
      return millisecondsToSeconds(duration);
    }
    get time() {
      const { resolved } = this;
      if (!resolved)
        return 0;
      const { animation } = resolved;
      return millisecondsToSeconds(animation.currentTime || 0);
    }
    set time(newTime) {
      const { resolved } = this;
      if (!resolved)
        return;
      const { animation } = resolved;
      animation.currentTime = secondsToMilliseconds(newTime);
    }
    get speed() {
      const { resolved } = this;
      if (!resolved)
        return 1;
      const { animation } = resolved;
      return animation.playbackRate;
    }
    set speed(newSpeed) {
      const { resolved } = this;
      if (!resolved)
        return;
      const { animation } = resolved;
      animation.playbackRate = newSpeed;
    }
    get state() {
      const { resolved } = this;
      if (!resolved)
        return "idle";
      const { animation } = resolved;
      return animation.playState;
    }
    get startTime() {
      const { resolved } = this;
      if (!resolved)
        return null;
      const { animation } = resolved;
      return animation.startTime;
    }
    /**
     * Replace the default DocumentTimeline with another AnimationTimeline.
     * Currently used for scroll animations.
     */
    attachTimeline(timeline) {
      if (!this._resolved) {
        this.pendingTimeline = timeline;
      } else {
        const { resolved } = this;
        if (!resolved)
          return noop2;
        const { animation } = resolved;
        attachTimeline(animation, timeline);
      }
      return noop2;
    }
    play() {
      if (this.isStopped)
        return;
      const { resolved } = this;
      if (!resolved)
        return;
      const { animation } = resolved;
      if (animation.playState === "finished") {
        this.updateFinishedPromise();
      }
      animation.play();
    }
    pause() {
      const { resolved } = this;
      if (!resolved)
        return;
      const { animation } = resolved;
      animation.pause();
    }
    stop() {
      this.resolver.cancel();
      this.isStopped = true;
      if (this.state === "idle")
        return;
      this.resolveFinishedPromise();
      this.updateFinishedPromise();
      const { resolved } = this;
      if (!resolved)
        return;
      const { animation, keyframes: keyframes4, duration, type, ease: ease2, times } = resolved;
      if (animation.playState === "idle" || animation.playState === "finished") {
        return;
      }
      if (this.time) {
        const { motionValue: motionValue2, onUpdate, onComplete, element, ...options2 } = this.options;
        const sampleAnimation = new MainThreadAnimation({
          ...options2,
          keyframes: keyframes4,
          duration,
          type,
          ease: ease2,
          times,
          isGenerator: true
        });
        const sampleTime = secondsToMilliseconds(this.time);
        motionValue2.setWithVelocity(sampleAnimation.sample(sampleTime - sampleDelta).value, sampleAnimation.sample(sampleTime).value, sampleDelta);
      }
      const { onStop } = this.options;
      onStop && onStop();
      this.cancel();
    }
    complete() {
      const { resolved } = this;
      if (!resolved)
        return;
      resolved.animation.finish();
    }
    cancel() {
      const { resolved } = this;
      if (!resolved)
        return;
      resolved.animation.cancel();
    }
    static supports(options2) {
      const { motionValue: motionValue2, name, repeatDelay, repeatType, damping, type } = options2;
      return supportsWaapi() && name && acceleratedValues.has(name) && motionValue2 && motionValue2.owner && motionValue2.owner.current instanceof HTMLElement && /**
       * If we're outputting values to onUpdate then we can't use WAAPI as there's
       * no way to read the value from WAAPI every frame.
       */
      !motionValue2.owner.getProps().onUpdate && !repeatDelay && repeatType !== "mirror" && damping !== 0 && type !== "inertia";
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/render/dom/scroll/supports.mjs
  var supportsScrollTimeline = memo3(() => window.ScrollTimeline !== void 0);

  // packages/components/node_modules/framer-motion/dist/es/animation/GroupPlaybackControls.mjs
  var GroupPlaybackControls = class {
    constructor(animations2) {
      this.stop = () => this.runAll("stop");
      this.animations = animations2.filter(Boolean);
    }
    then(onResolve, onReject) {
      return Promise.all(this.animations).then(onResolve).catch(onReject);
    }
    /**
     * TODO: Filter out cancelled or stopped animations before returning
     */
    getAll(propName) {
      return this.animations[0][propName];
    }
    setAll(propName, newValue) {
      for (let i3 = 0; i3 < this.animations.length; i3++) {
        this.animations[i3][propName] = newValue;
      }
    }
    attachTimeline(timeline, fallback) {
      const subscriptions = this.animations.map((animation) => {
        if (supportsScrollTimeline() && animation.attachTimeline) {
          return animation.attachTimeline(timeline);
        } else {
          return fallback(animation);
        }
      });
      return () => {
        subscriptions.forEach((cancel, i3) => {
          cancel && cancel();
          this.animations[i3].stop();
        });
      };
    }
    get time() {
      return this.getAll("time");
    }
    set time(time2) {
      this.setAll("time", time2);
    }
    get speed() {
      return this.getAll("speed");
    }
    set speed(speed) {
      this.setAll("speed", speed);
    }
    get startTime() {
      return this.getAll("startTime");
    }
    get duration() {
      let max3 = 0;
      for (let i3 = 0; i3 < this.animations.length; i3++) {
        max3 = Math.max(max3, this.animations[i3].duration);
      }
      return max3;
    }
    runAll(methodName) {
      this.animations.forEach((controls) => controls[methodName]());
    }
    flatten() {
      this.runAll("flatten");
    }
    play() {
      this.runAll("play");
    }
    pause() {
      this.runAll("pause");
    }
    cancel() {
      this.runAll("cancel");
    }
    complete() {
      this.runAll("complete");
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/animation/utils/is-transition-defined.mjs
  function isTransitionDefined({ when, delay: _delay, delayChildren, staggerChildren, staggerDirection, repeat, repeatType, repeatDelay, from: from2, elapsed, ...transition }) {
    return !!Object.keys(transition).length;
  }

  // packages/components/node_modules/framer-motion/dist/es/animation/interfaces/motion-value.mjs
  var animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {
    const valueTransition = getValueTransition(transition, name) || {};
    const delay2 = valueTransition.delay || transition.delay || 0;
    let { elapsed = 0 } = transition;
    elapsed = elapsed - secondsToMilliseconds(delay2);
    let options2 = {
      keyframes: Array.isArray(target) ? target : [null, target],
      ease: "easeOut",
      velocity: value.getVelocity(),
      ...valueTransition,
      delay: -elapsed,
      onUpdate: (v3) => {
        value.set(v3);
        valueTransition.onUpdate && valueTransition.onUpdate(v3);
      },
      onComplete: () => {
        onComplete();
        valueTransition.onComplete && valueTransition.onComplete();
      },
      name,
      motionValue: value,
      element: isHandoff ? void 0 : element
    };
    if (!isTransitionDefined(valueTransition)) {
      options2 = {
        ...options2,
        ...getDefaultTransition(name, options2)
      };
    }
    if (options2.duration) {
      options2.duration = secondsToMilliseconds(options2.duration);
    }
    if (options2.repeatDelay) {
      options2.repeatDelay = secondsToMilliseconds(options2.repeatDelay);
    }
    if (options2.from !== void 0) {
      options2.keyframes[0] = options2.from;
    }
    let shouldSkip = false;
    if (options2.type === false || options2.duration === 0 && !options2.repeatDelay) {
      options2.duration = 0;
      if (options2.delay === 0) {
        shouldSkip = true;
      }
    }
    if (instantAnimationState.current || MotionGlobalConfig.skipAnimations) {
      shouldSkip = true;
      options2.duration = 0;
      options2.delay = 0;
    }
    if (shouldSkip && !isHandoff && value.get() !== void 0) {
      const finalKeyframe = getFinalKeyframe(options2.keyframes, valueTransition);
      if (finalKeyframe !== void 0) {
        frame.update(() => {
          options2.onUpdate(finalKeyframe);
          options2.onComplete();
        });
        return new GroupPlaybackControls([]);
      }
    }
    if (!isHandoff && AcceleratedAnimation.supports(options2)) {
      return new AcceleratedAnimation(options2);
    } else {
      return new MainThreadAnimation(options2);
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/utils/resolve-value.mjs
  var isCustomValue = (v3) => {
    return Boolean(v3 && typeof v3 === "object" && v3.mix && v3.toValue);
  };
  var resolveFinalValueInKeyframes = (v3) => {
    return isKeyframesTarget(v3) ? v3[v3.length - 1] || 0 : v3;
  };

  // packages/components/node_modules/framer-motion/dist/es/utils/array.mjs
  function addUniqueItem(arr, item2) {
    if (arr.indexOf(item2) === -1)
      arr.push(item2);
  }
  function removeItem(arr, item2) {
    const index2 = arr.indexOf(item2);
    if (index2 > -1)
      arr.splice(index2, 1);
  }

  // packages/components/node_modules/framer-motion/dist/es/utils/subscription-manager.mjs
  var SubscriptionManager = class {
    constructor() {
      this.subscriptions = [];
    }
    add(handler) {
      addUniqueItem(this.subscriptions, handler);
      return () => removeItem(this.subscriptions, handler);
    }
    notify(a3, b3, c3) {
      const numSubscriptions = this.subscriptions.length;
      if (!numSubscriptions)
        return;
      if (numSubscriptions === 1) {
        this.subscriptions[0](a3, b3, c3);
      } else {
        for (let i3 = 0; i3 < numSubscriptions; i3++) {
          const handler = this.subscriptions[i3];
          handler && handler(a3, b3, c3);
        }
      }
    }
    getSize() {
      return this.subscriptions.length;
    }
    clear() {
      this.subscriptions.length = 0;
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/value/index.mjs
  var MAX_VELOCITY_DELTA = 30;
  var isFloat = (value) => {
    return !isNaN(parseFloat(value));
  };
  var collectMotionValues = {
    current: void 0
  };
  var MotionValue = class {
    /**
     * @param init - The initiating value
     * @param config - Optional configuration options
     *
     * -  `transformer`: A function to transform incoming values with.
     *
     * @internal
     */
    constructor(init2, options2 = {}) {
      this.version = "11.15.0";
      this.canTrackVelocity = null;
      this.events = {};
      this.updateAndNotify = (v3, render = true) => {
        const currentTime = time.now();
        if (this.updatedAt !== currentTime) {
          this.setPrevFrameValue();
        }
        this.prev = this.current;
        this.setCurrent(v3);
        if (this.current !== this.prev && this.events.change) {
          this.events.change.notify(this.current);
        }
        if (render && this.events.renderRequest) {
          this.events.renderRequest.notify(this.current);
        }
      };
      this.hasAnimated = false;
      this.setCurrent(init2);
      this.owner = options2.owner;
    }
    setCurrent(current) {
      this.current = current;
      this.updatedAt = time.now();
      if (this.canTrackVelocity === null && current !== void 0) {
        this.canTrackVelocity = isFloat(this.current);
      }
    }
    setPrevFrameValue(prevFrameValue = this.current) {
      this.prevFrameValue = prevFrameValue;
      this.prevUpdatedAt = this.updatedAt;
    }
    /**
     * Adds a function that will be notified when the `MotionValue` is updated.
     *
     * It returns a function that, when called, will cancel the subscription.
     *
     * When calling `onChange` inside a React component, it should be wrapped with the
     * `useEffect` hook. As it returns an unsubscribe function, this should be returned
     * from the `useEffect` function to ensure you don't add duplicate subscribers..
     *
     * ```jsx
     * export const MyComponent = () => {
     *   const x = useMotionValue(0)
     *   const y = useMotionValue(0)
     *   const opacity = useMotionValue(1)
     *
     *   useEffect(() => {
     *     function updateOpacity() {
     *       const maxXY = Math.max(x.get(), y.get())
     *       const newOpacity = transform(maxXY, [0, 100], [1, 0])
     *       opacity.set(newOpacity)
     *     }
     *
     *     const unsubscribeX = x.on("change", updateOpacity)
     *     const unsubscribeY = y.on("change", updateOpacity)
     *
     *     return () => {
     *       unsubscribeX()
     *       unsubscribeY()
     *     }
     *   }, [])
     *
     *   return <motion.div style={{ x }} />
     * }
     * ```
     *
     * @param subscriber - A function that receives the latest value.
     * @returns A function that, when called, will cancel this subscription.
     *
     * @deprecated
     */
    onChange(subscription) {
      if (true) {
        warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on("change", callback).`);
      }
      return this.on("change", subscription);
    }
    on(eventName, callback) {
      if (!this.events[eventName]) {
        this.events[eventName] = new SubscriptionManager();
      }
      const unsubscribe = this.events[eventName].add(callback);
      if (eventName === "change") {
        return () => {
          unsubscribe();
          frame.read(() => {
            if (!this.events.change.getSize()) {
              this.stop();
            }
          });
        };
      }
      return unsubscribe;
    }
    clearListeners() {
      for (const eventManagers in this.events) {
        this.events[eventManagers].clear();
      }
    }
    /**
     * Attaches a passive effect to the `MotionValue`.
     *
     * @internal
     */
    attach(passiveEffect, stopPassiveEffect) {
      this.passiveEffect = passiveEffect;
      this.stopPassiveEffect = stopPassiveEffect;
    }
    /**
     * Sets the state of the `MotionValue`.
     *
     * @remarks
     *
     * ```jsx
     * const x = useMotionValue(0)
     * x.set(10)
     * ```
     *
     * @param latest - Latest value to set.
     * @param render - Whether to notify render subscribers. Defaults to `true`
     *
     * @public
     */
    set(v3, render = true) {
      if (!render || !this.passiveEffect) {
        this.updateAndNotify(v3, render);
      } else {
        this.passiveEffect(v3, this.updateAndNotify);
      }
    }
    setWithVelocity(prev2, current, delta) {
      this.set(current);
      this.prev = void 0;
      this.prevFrameValue = prev2;
      this.prevUpdatedAt = this.updatedAt - delta;
    }
    /**
     * Set the state of the `MotionValue`, stopping any active animations,
     * effects, and resets velocity to `0`.
     */
    jump(v3, endAnimation = true) {
      this.updateAndNotify(v3);
      this.prev = v3;
      this.prevUpdatedAt = this.prevFrameValue = void 0;
      endAnimation && this.stop();
      if (this.stopPassiveEffect)
        this.stopPassiveEffect();
    }
    /**
     * Returns the latest state of `MotionValue`
     *
     * @returns - The latest state of `MotionValue`
     *
     * @public
     */
    get() {
      if (collectMotionValues.current) {
        collectMotionValues.current.push(this);
      }
      return this.current;
    }
    /**
     * @public
     */
    getPrevious() {
      return this.prev;
    }
    /**
     * Returns the latest velocity of `MotionValue`
     *
     * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
     *
     * @public
     */
    getVelocity() {
      const currentTime = time.now();
      if (!this.canTrackVelocity || this.prevFrameValue === void 0 || currentTime - this.updatedAt > MAX_VELOCITY_DELTA) {
        return 0;
      }
      const delta = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA);
      return velocityPerSecond(parseFloat(this.current) - parseFloat(this.prevFrameValue), delta);
    }
    /**
     * Registers a new animation to control this `MotionValue`. Only one
     * animation can drive a `MotionValue` at one time.
     *
     * ```jsx
     * value.start()
     * ```
     *
     * @param animation - A function that starts the provided animation
     *
     * @internal
     */
    start(startAnimation) {
      this.stop();
      return new Promise((resolve) => {
        this.hasAnimated = true;
        this.animation = startAnimation(resolve);
        if (this.events.animationStart) {
          this.events.animationStart.notify();
        }
      }).then(() => {
        if (this.events.animationComplete) {
          this.events.animationComplete.notify();
        }
        this.clearAnimation();
      });
    }
    /**
     * Stop the currently active animation.
     *
     * @public
     */
    stop() {
      if (this.animation) {
        this.animation.stop();
        if (this.events.animationCancel) {
          this.events.animationCancel.notify();
        }
      }
      this.clearAnimation();
    }
    /**
     * Returns `true` if this value is currently animating.
     *
     * @public
     */
    isAnimating() {
      return !!this.animation;
    }
    clearAnimation() {
      delete this.animation;
    }
    /**
     * Destroy and clean up subscribers to this `MotionValue`.
     *
     * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically
     * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually
     * created a `MotionValue` via the `motionValue` function.
     *
     * @public
     */
    destroy() {
      this.clearListeners();
      this.stop();
      if (this.stopPassiveEffect) {
        this.stopPassiveEffect();
      }
    }
  };
  function motionValue(init2, options2) {
    return new MotionValue(init2, options2);
  }

  // packages/components/node_modules/framer-motion/dist/es/render/utils/setters.mjs
  function setMotionValue(visualElement, key, value) {
    if (visualElement.hasValue(key)) {
      visualElement.getValue(key).set(value);
    } else {
      visualElement.addValue(key, motionValue(value));
    }
  }
  function setTarget(visualElement, definition) {
    const resolved = resolveVariant(visualElement, definition);
    let { transitionEnd = {}, transition = {}, ...target } = resolved || {};
    target = { ...target, ...transitionEnd };
    for (const key in target) {
      const value = resolveFinalValueInKeyframes(target[key]);
      setMotionValue(visualElement, key, value);
    }
  }

  // packages/components/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs
  var camelToDash = (str) => str.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase();

  // packages/components/node_modules/framer-motion/dist/es/animation/optimized-appear/data-id.mjs
  var optimizedAppearDataId = "framerAppearId";
  var optimizedAppearDataAttribute = "data-" + camelToDash(optimizedAppearDataId);

  // packages/components/node_modules/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs
  function getOptimisedAppearId(visualElement) {
    return visualElement.props[optimizedAppearDataAttribute];
  }

  // packages/components/node_modules/framer-motion/dist/es/value/utils/is-motion-value.mjs
  var isMotionValue = (value) => Boolean(value && value.getVelocity);

  // packages/components/node_modules/framer-motion/dist/es/value/use-will-change/is.mjs
  function isWillChangeMotionValue(value) {
    return Boolean(isMotionValue(value) && value.add);
  }

  // packages/components/node_modules/framer-motion/dist/es/value/use-will-change/add-will-change.mjs
  function addValueToWillChange(visualElement, key) {
    const willChange = visualElement.getValue("willChange");
    if (isWillChangeMotionValue(willChange)) {
      return willChange.add(key);
    }
  }

  // packages/components/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs
  function shouldBlockAnimation({ protectedKeys, needsAnimating }, key) {
    const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;
    needsAnimating[key] = false;
    return shouldBlock;
  }
  function animateTarget(visualElement, targetAndTransition, { delay: delay2 = 0, transitionOverride, type } = {}) {
    var _a;
    let { transition = visualElement.getDefaultTransition(), transitionEnd, ...target } = targetAndTransition;
    if (transitionOverride)
      transition = transitionOverride;
    const animations2 = [];
    const animationTypeState = type && visualElement.animationState && visualElement.animationState.getState()[type];
    for (const key in target) {
      const value = visualElement.getValue(key, (_a = visualElement.latestValues[key]) !== null && _a !== void 0 ? _a : null);
      const valueTarget = target[key];
      if (valueTarget === void 0 || animationTypeState && shouldBlockAnimation(animationTypeState, key)) {
        continue;
      }
      const valueTransition = {
        delay: delay2,
        ...getValueTransition(transition || {}, key)
      };
      let isHandoff = false;
      if (window.MotionHandoffAnimation) {
        const appearId = getOptimisedAppearId(visualElement);
        if (appearId) {
          const startTime = window.MotionHandoffAnimation(appearId, key, frame);
          if (startTime !== null) {
            valueTransition.startTime = startTime;
            isHandoff = true;
          }
        }
      }
      addValueToWillChange(visualElement, key);
      value.start(animateMotionValue(key, value, valueTarget, visualElement.shouldReduceMotion && transformProps.has(key) ? { type: false } : valueTransition, visualElement, isHandoff));
      const animation = value.animation;
      if (animation) {
        animations2.push(animation);
      }
    }
    if (transitionEnd) {
      Promise.all(animations2).then(() => {
        frame.update(() => {
          transitionEnd && setTarget(visualElement, transitionEnd);
        });
      });
    }
    return animations2;
  }

  // packages/components/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.mjs
  function animateVariant(visualElement, variant, options2 = {}) {
    var _a;
    const resolved = resolveVariant(visualElement, variant, options2.type === "exit" ? (_a = visualElement.presenceContext) === null || _a === void 0 ? void 0 : _a.custom : void 0);
    let { transition = visualElement.getDefaultTransition() || {} } = resolved || {};
    if (options2.transitionOverride) {
      transition = options2.transitionOverride;
    }
    const getAnimation = resolved ? () => Promise.all(animateTarget(visualElement, resolved, options2)) : () => Promise.resolve();
    const getChildAnimations = visualElement.variantChildren && visualElement.variantChildren.size ? (forwardDelay = 0) => {
      const { delayChildren = 0, staggerChildren, staggerDirection } = transition;
      return animateChildren(visualElement, variant, delayChildren + forwardDelay, staggerChildren, staggerDirection, options2);
    } : () => Promise.resolve();
    const { when } = transition;
    if (when) {
      const [first, last] = when === "beforeChildren" ? [getAnimation, getChildAnimations] : [getChildAnimations, getAnimation];
      return first().then(() => last());
    } else {
      return Promise.all([getAnimation(), getChildAnimations(options2.delay)]);
    }
  }
  function animateChildren(visualElement, variant, delayChildren = 0, staggerChildren = 0, staggerDirection = 1, options2) {
    const animations2 = [];
    const maxStaggerDuration = (visualElement.variantChildren.size - 1) * staggerChildren;
    const generateStaggerDuration = staggerDirection === 1 ? (i3 = 0) => i3 * staggerChildren : (i3 = 0) => maxStaggerDuration - i3 * staggerChildren;
    Array.from(visualElement.variantChildren).sort(sortByTreeOrder).forEach((child, i3) => {
      child.notify("AnimationStart", variant);
      animations2.push(animateVariant(child, variant, {
        ...options2,
        delay: delayChildren + generateStaggerDuration(i3)
      }).then(() => child.notify("AnimationComplete", variant)));
    });
    return Promise.all(animations2);
  }
  function sortByTreeOrder(a3, b3) {
    return a3.sortNodePosition(b3);
  }

  // packages/components/node_modules/framer-motion/dist/es/animation/interfaces/visual-element.mjs
  function animateVisualElement(visualElement, definition, options2 = {}) {
    visualElement.notify("AnimationStart", definition);
    let animation;
    if (Array.isArray(definition)) {
      const animations2 = definition.map((variant) => animateVariant(visualElement, variant, options2));
      animation = Promise.all(animations2);
    } else if (typeof definition === "string") {
      animation = animateVariant(visualElement, definition, options2);
    } else {
      const resolvedDefinition = typeof definition === "function" ? resolveVariant(visualElement, definition, options2.custom) : definition;
      animation = Promise.all(animateTarget(visualElement, resolvedDefinition, options2));
    }
    return animation.then(() => {
      visualElement.notify("AnimationComplete", definition);
    });
  }

  // packages/components/node_modules/framer-motion/dist/es/render/utils/get-variant-context.mjs
  var numVariantProps = variantProps.length;
  function getVariantContext(visualElement) {
    if (!visualElement)
      return void 0;
    if (!visualElement.isControllingVariants) {
      const context2 = visualElement.parent ? getVariantContext(visualElement.parent) || {} : {};
      if (visualElement.props.initial !== void 0) {
        context2.initial = visualElement.props.initial;
      }
      return context2;
    }
    const context = {};
    for (let i3 = 0; i3 < numVariantProps; i3++) {
      const name = variantProps[i3];
      const prop = visualElement.props[name];
      if (isVariantLabel(prop) || prop === false) {
        context[name] = prop;
      }
    }
    return context;
  }

  // packages/components/node_modules/framer-motion/dist/es/render/utils/animation-state.mjs
  var reversePriorityOrder = [...variantPriorityOrder].reverse();
  var numAnimationTypes = variantPriorityOrder.length;
  function animateList(visualElement) {
    return (animations2) => Promise.all(animations2.map(({ animation, options: options2 }) => animateVisualElement(visualElement, animation, options2)));
  }
  function createAnimationState(visualElement) {
    let animate = animateList(visualElement);
    let state = createState();
    let isInitialRender = true;
    const buildResolvedTypeValues = (type) => (acc, definition) => {
      var _a;
      const resolved = resolveVariant(visualElement, definition, type === "exit" ? (_a = visualElement.presenceContext) === null || _a === void 0 ? void 0 : _a.custom : void 0);
      if (resolved) {
        const { transition, transitionEnd, ...target } = resolved;
        acc = { ...acc, ...target, ...transitionEnd };
      }
      return acc;
    };
    function setAnimateFunction(makeAnimator) {
      animate = makeAnimator(visualElement);
    }
    function animateChanges(changedActiveType) {
      const { props } = visualElement;
      const context = getVariantContext(visualElement.parent) || {};
      const animations2 = [];
      const removedKeys = /* @__PURE__ */ new Set();
      let encounteredKeys = {};
      let removedVariantIndex = Infinity;
      for (let i3 = 0; i3 < numAnimationTypes; i3++) {
        const type = reversePriorityOrder[i3];
        const typeState = state[type];
        const prop = props[type] !== void 0 ? props[type] : context[type];
        const propIsVariant = isVariantLabel(prop);
        const activeDelta = type === changedActiveType ? typeState.isActive : null;
        if (activeDelta === false)
          removedVariantIndex = i3;
        let isInherited = prop === context[type] && prop !== props[type] && propIsVariant;
        if (isInherited && isInitialRender && visualElement.manuallyAnimateOnMount) {
          isInherited = false;
        }
        typeState.protectedKeys = { ...encounteredKeys };
        if (
          // If it isn't active and hasn't *just* been set as inactive
          !typeState.isActive && activeDelta === null || // If we didn't and don't have any defined prop for this animation type
          !prop && !typeState.prevProp || // Or if the prop doesn't define an animation
          isAnimationControls(prop) || typeof prop === "boolean"
        ) {
          continue;
        }
        const variantDidChange = checkVariantsDidChange(typeState.prevProp, prop);
        let shouldAnimateType = variantDidChange || // If we're making this variant active, we want to always make it active
        type === changedActiveType && typeState.isActive && !isInherited && propIsVariant || // If we removed a higher-priority variant (i is in reverse order)
        i3 > removedVariantIndex && propIsVariant;
        let handledRemovedValues = false;
        const definitionList = Array.isArray(prop) ? prop : [prop];
        let resolvedValues = definitionList.reduce(buildResolvedTypeValues(type), {});
        if (activeDelta === false)
          resolvedValues = {};
        const { prevResolvedValues = {} } = typeState;
        const allKeys = {
          ...prevResolvedValues,
          ...resolvedValues
        };
        const markToAnimate = (key) => {
          shouldAnimateType = true;
          if (removedKeys.has(key)) {
            handledRemovedValues = true;
            removedKeys.delete(key);
          }
          typeState.needsAnimating[key] = true;
          const motionValue2 = visualElement.getValue(key);
          if (motionValue2)
            motionValue2.liveStyle = false;
        };
        for (const key in allKeys) {
          const next2 = resolvedValues[key];
          const prev2 = prevResolvedValues[key];
          if (encounteredKeys.hasOwnProperty(key))
            continue;
          let valueHasChanged = false;
          if (isKeyframesTarget(next2) && isKeyframesTarget(prev2)) {
            valueHasChanged = !shallowCompare(next2, prev2);
          } else {
            valueHasChanged = next2 !== prev2;
          }
          if (valueHasChanged) {
            if (next2 !== void 0 && next2 !== null) {
              markToAnimate(key);
            } else {
              removedKeys.add(key);
            }
          } else if (next2 !== void 0 && removedKeys.has(key)) {
            markToAnimate(key);
          } else {
            typeState.protectedKeys[key] = true;
          }
        }
        typeState.prevProp = prop;
        typeState.prevResolvedValues = resolvedValues;
        if (typeState.isActive) {
          encounteredKeys = { ...encounteredKeys, ...resolvedValues };
        }
        if (isInitialRender && visualElement.blockInitialAnimation) {
          shouldAnimateType = false;
        }
        const willAnimateViaParent = isInherited && variantDidChange;
        const needsAnimating = !willAnimateViaParent || handledRemovedValues;
        if (shouldAnimateType && needsAnimating) {
          animations2.push(...definitionList.map((animation) => ({
            animation,
            options: { type }
          })));
        }
      }
      if (removedKeys.size) {
        const fallbackAnimation = {};
        removedKeys.forEach((key) => {
          const fallbackTarget = visualElement.getBaseTarget(key);
          const motionValue2 = visualElement.getValue(key);
          if (motionValue2)
            motionValue2.liveStyle = true;
          fallbackAnimation[key] = fallbackTarget !== null && fallbackTarget !== void 0 ? fallbackTarget : null;
        });
        animations2.push({ animation: fallbackAnimation });
      }
      let shouldAnimate = Boolean(animations2.length);
      if (isInitialRender && (props.initial === false || props.initial === props.animate) && !visualElement.manuallyAnimateOnMount) {
        shouldAnimate = false;
      }
      isInitialRender = false;
      return shouldAnimate ? animate(animations2) : Promise.resolve();
    }
    function setActive(type, isActive) {
      var _a;
      if (state[type].isActive === isActive)
        return Promise.resolve();
      (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach((child) => {
        var _a2;
        return (_a2 = child.animationState) === null || _a2 === void 0 ? void 0 : _a2.setActive(type, isActive);
      });
      state[type].isActive = isActive;
      const animations2 = animateChanges(type);
      for (const key in state) {
        state[key].protectedKeys = {};
      }
      return animations2;
    }
    return {
      animateChanges,
      setActive,
      setAnimateFunction,
      getState: () => state,
      reset: () => {
        state = createState();
        isInitialRender = true;
      }
    };
  }
  function checkVariantsDidChange(prev2, next2) {
    if (typeof next2 === "string") {
      return next2 !== prev2;
    } else if (Array.isArray(next2)) {
      return !shallowCompare(next2, prev2);
    }
    return false;
  }
  function createTypeState(isActive = false) {
    return {
      isActive,
      protectedKeys: {},
      needsAnimating: {},
      prevResolvedValues: {}
    };
  }
  function createState() {
    return {
      animate: createTypeState(true),
      whileInView: createTypeState(),
      whileHover: createTypeState(),
      whileTap: createTypeState(),
      whileDrag: createTypeState(),
      whileFocus: createTypeState(),
      exit: createTypeState()
    };
  }

  // packages/components/node_modules/framer-motion/dist/es/motion/features/Feature.mjs
  var Feature = class {
    constructor(node2) {
      this.isMounted = false;
      this.node = node2;
    }
    update() {
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs
  var AnimationFeature = class extends Feature {
    /**
     * We dynamically generate the AnimationState manager as it contains a reference
     * to the underlying animation library. We only want to load that if we load this,
     * so people can optionally code split it out using the `m` component.
     */
    constructor(node2) {
      super(node2);
      node2.animationState || (node2.animationState = createAnimationState(node2));
    }
    updateAnimationControlsSubscription() {
      const { animate } = this.node.getProps();
      if (isAnimationControls(animate)) {
        this.unmountControls = animate.subscribe(this.node);
      }
    }
    /**
     * Subscribe any provided AnimationControls to the component's VisualElement
     */
    mount() {
      this.updateAnimationControlsSubscription();
    }
    update() {
      const { animate } = this.node.getProps();
      const { animate: prevAnimate } = this.node.prevProps || {};
      if (animate !== prevAnimate) {
        this.updateAnimationControlsSubscription();
      }
    }
    unmount() {
      var _a;
      this.node.animationState.reset();
      (_a = this.unmountControls) === null || _a === void 0 ? void 0 : _a.call(this);
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs
  var id = 0;
  var ExitAnimationFeature = class extends Feature {
    constructor() {
      super(...arguments);
      this.id = id++;
    }
    update() {
      if (!this.node.presenceContext)
        return;
      const { isPresent, onExitComplete } = this.node.presenceContext;
      const { isPresent: prevIsPresent } = this.node.prevPresenceContext || {};
      if (!this.node.animationState || isPresent === prevIsPresent) {
        return;
      }
      const exitAnimation = this.node.animationState.setActive("exit", !isPresent);
      if (onExitComplete && !isPresent) {
        exitAnimation.then(() => onExitComplete(this.id));
      }
    }
    mount() {
      const { register } = this.node.presenceContext || {};
      if (register) {
        this.unmount = register(this.id);
      }
    }
    unmount() {
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/motion/features/animations.mjs
  var animations = {
    animation: {
      Feature: AnimationFeature
    },
    exit: {
      Feature: ExitAnimationFeature
    }
  };

  // node_modules/motion-dom/dist/es/gestures/drag/state/is-active.mjs
  var isDragging = {
    x: false,
    y: false
  };
  function isDragActive() {
    return isDragging.x || isDragging.y;
  }

  // node_modules/motion-dom/dist/es/utils/resolve-elements.mjs
  function resolveElements(elementOrSelector, scope, selectorCache) {
    var _a;
    if (elementOrSelector instanceof Element) {
      return [elementOrSelector];
    } else if (typeof elementOrSelector === "string") {
      let root = document;
      if (scope) {
        root = scope.current;
      }
      const elements2 = (_a = selectorCache === null || selectorCache === void 0 ? void 0 : selectorCache[elementOrSelector]) !== null && _a !== void 0 ? _a : root.querySelectorAll(elementOrSelector);
      return elements2 ? Array.from(elements2) : [];
    }
    return Array.from(elementOrSelector);
  }

  // node_modules/motion-dom/dist/es/gestures/utils/setup.mjs
  function setupGesture(elementOrSelector, options2) {
    const elements2 = resolveElements(elementOrSelector);
    const gestureAbortController = new AbortController();
    const eventOptions = {
      passive: true,
      ...options2,
      signal: gestureAbortController.signal
    };
    const cancel = () => gestureAbortController.abort();
    return [elements2, eventOptions, cancel];
  }

  // node_modules/motion-dom/dist/es/gestures/hover.mjs
  function filterEvents(callback) {
    return (event) => {
      if (event.pointerType === "touch" || isDragActive())
        return;
      callback(event);
    };
  }
  function hover(elementOrSelector, onHoverStart, options2 = {}) {
    const [elements2, eventOptions, cancel] = setupGesture(elementOrSelector, options2);
    const onPointerEnter = filterEvents((enterEvent) => {
      const { target } = enterEvent;
      const onHoverEnd = onHoverStart(enterEvent);
      if (!onHoverEnd || !target)
        return;
      const onPointerLeave = filterEvents((leaveEvent) => {
        onHoverEnd(leaveEvent);
        target.removeEventListener("pointerleave", onPointerLeave);
      });
      target.addEventListener("pointerleave", onPointerLeave, eventOptions);
    });
    elements2.forEach((element) => {
      element.addEventListener("pointerenter", onPointerEnter, eventOptions);
    });
    return cancel;
  }

  // node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs
  var isPrimaryPointer = (event) => {
    if (event.pointerType === "mouse") {
      return typeof event.button !== "number" || event.button <= 0;
    } else {
      return event.isPrimary !== false;
    }
  };

  // node_modules/motion-dom/dist/es/gestures/press/utils/state.mjs
  var isPressing = /* @__PURE__ */ new WeakSet();

  // node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs
  function filterEvents2(callback) {
    return (event) => {
      if (event.key !== "Enter")
        return;
      callback(event);
    };
  }
  function firePointerEvent(target, type) {
    target.dispatchEvent(new PointerEvent("pointer" + type, { isPrimary: true, bubbles: true }));
  }
  var enableKeyboardPress = (focusEvent, eventOptions) => {
    const element = focusEvent.currentTarget;
    if (!element)
      return;
    const handleKeydown = filterEvents2(() => {
      if (isPressing.has(element))
        return;
      firePointerEvent(element, "down");
      const handleKeyup = filterEvents2(() => {
        firePointerEvent(element, "up");
      });
      const handleBlur = () => firePointerEvent(element, "cancel");
      element.addEventListener("keyup", handleKeyup, eventOptions);
      element.addEventListener("blur", handleBlur, eventOptions);
    });
    element.addEventListener("keydown", handleKeydown, eventOptions);
    element.addEventListener("blur", () => element.removeEventListener("keydown", handleKeydown), eventOptions);
  };

  // node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs
  var focusableElements = /* @__PURE__ */ new Set([
    "BUTTON",
    "INPUT",
    "SELECT",
    "TEXTAREA",
    "A"
  ]);
  function isElementKeyboardAccessible(element) {
    return focusableElements.has(element.tagName) || element.tabIndex !== -1;
  }

  // node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs
  var isNodeOrChild = (parent, child) => {
    if (!child) {
      return false;
    } else if (parent === child) {
      return true;
    } else {
      return isNodeOrChild(parent, child.parentElement);
    }
  };

  // node_modules/motion-dom/dist/es/gestures/press/index.mjs
  function isValidPressEvent(event) {
    return isPrimaryPointer(event) && !isDragActive();
  }
  function press(elementOrSelector, onPressStart, options2 = {}) {
    const [elements2, eventOptions, cancelEvents] = setupGesture(elementOrSelector, options2);
    const startPress = (startEvent) => {
      const element = startEvent.currentTarget;
      if (!isValidPressEvent(startEvent) || isPressing.has(element))
        return;
      isPressing.add(element);
      const onPressEnd = onPressStart(startEvent);
      const onPointerEnd = (endEvent, success) => {
        window.removeEventListener("pointerup", onPointerUp);
        window.removeEventListener("pointercancel", onPointerCancel);
        if (!isValidPressEvent(endEvent) || !isPressing.has(element)) {
          return;
        }
        isPressing.delete(element);
        if (onPressEnd) {
          onPressEnd(endEvent, { success });
        }
      };
      const onPointerUp = (upEvent) => {
        onPointerEnd(upEvent, options2.useGlobalTarget || isNodeOrChild(element, upEvent.target));
      };
      const onPointerCancel = (cancelEvent) => {
        onPointerEnd(cancelEvent, false);
      };
      window.addEventListener("pointerup", onPointerUp, eventOptions);
      window.addEventListener("pointercancel", onPointerCancel, eventOptions);
    };
    elements2.forEach((element) => {
      if (!isElementKeyboardAccessible(element)) {
        element.tabIndex = 0;
      }
      const target = options2.useGlobalTarget ? window : element;
      target.addEventListener("pointerdown", startPress, eventOptions);
      element.addEventListener("focus", (event) => enableKeyboardPress(event, eventOptions), eventOptions);
    });
    return cancelEvents;
  }

  // node_modules/motion-dom/dist/es/gestures/drag/state/set-active.mjs
  function setDragLock(axis) {
    if (axis === "x" || axis === "y") {
      if (isDragging[axis]) {
        return null;
      } else {
        isDragging[axis] = true;
        return () => {
          isDragging[axis] = false;
        };
      }
    } else {
      if (isDragging.x || isDragging.y) {
        return null;
      } else {
        isDragging.x = isDragging.y = true;
        return () => {
          isDragging.x = isDragging.y = false;
        };
      }
    }
  }

  // packages/components/node_modules/framer-motion/dist/es/events/event-info.mjs
  function extractEventInfo(event) {
    return {
      point: {
        x: event.pageX,
        y: event.pageY
      }
    };
  }
  var addPointerInfo = (handler) => {
    return (event) => isPrimaryPointer(event) && handler(event, extractEventInfo(event));
  };

  // packages/components/node_modules/framer-motion/dist/es/events/add-dom-event.mjs
  function addDomEvent(target, eventName, handler, options2 = { passive: true }) {
    target.addEventListener(eventName, handler, options2);
    return () => target.removeEventListener(eventName, handler);
  }

  // packages/components/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs
  function addPointerEvent(target, eventName, handler, options2) {
    return addDomEvent(target, eventName, addPointerInfo(handler), options2);
  }

  // packages/components/node_modules/framer-motion/dist/es/utils/distance.mjs
  var distance = (a3, b3) => Math.abs(a3 - b3);
  function distance2D(a3, b3) {
    const xDelta = distance(a3.x, b3.x);
    const yDelta = distance(a3.y, b3.y);
    return Math.sqrt(xDelta ** 2 + yDelta ** 2);
  }

  // packages/components/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs
  var PanSession = class {
    constructor(event, handlers, { transformPagePoint, contextWindow, dragSnapToOrigin = false } = {}) {
      this.startEvent = null;
      this.lastMoveEvent = null;
      this.lastMoveEventInfo = null;
      this.handlers = {};
      this.contextWindow = window;
      this.updatePoint = () => {
        if (!(this.lastMoveEvent && this.lastMoveEventInfo))
          return;
        const info2 = getPanInfo(this.lastMoveEventInfo, this.history);
        const isPanStarted = this.startEvent !== null;
        const isDistancePastThreshold = distance2D(info2.offset, { x: 0, y: 0 }) >= 3;
        if (!isPanStarted && !isDistancePastThreshold)
          return;
        const { point: point2 } = info2;
        const { timestamp: timestamp2 } = frameData;
        this.history.push({ ...point2, timestamp: timestamp2 });
        const { onStart, onMove } = this.handlers;
        if (!isPanStarted) {
          onStart && onStart(this.lastMoveEvent, info2);
          this.startEvent = this.lastMoveEvent;
        }
        onMove && onMove(this.lastMoveEvent, info2);
      };
      this.handlePointerMove = (event2, info2) => {
        this.lastMoveEvent = event2;
        this.lastMoveEventInfo = transformPoint(info2, this.transformPagePoint);
        frame.update(this.updatePoint, true);
      };
      this.handlePointerUp = (event2, info2) => {
        this.end();
        const { onEnd, onSessionEnd, resumeAnimation } = this.handlers;
        if (this.dragSnapToOrigin)
          resumeAnimation && resumeAnimation();
        if (!(this.lastMoveEvent && this.lastMoveEventInfo))
          return;
        const panInfo = getPanInfo(event2.type === "pointercancel" ? this.lastMoveEventInfo : transformPoint(info2, this.transformPagePoint), this.history);
        if (this.startEvent && onEnd) {
          onEnd(event2, panInfo);
        }
        onSessionEnd && onSessionEnd(event2, panInfo);
      };
      if (!isPrimaryPointer(event))
        return;
      this.dragSnapToOrigin = dragSnapToOrigin;
      this.handlers = handlers;
      this.transformPagePoint = transformPagePoint;
      this.contextWindow = contextWindow || window;
      const info = extractEventInfo(event);
      const initialInfo = transformPoint(info, this.transformPagePoint);
      const { point } = initialInfo;
      const { timestamp } = frameData;
      this.history = [{ ...point, timestamp }];
      const { onSessionStart } = handlers;
      onSessionStart && onSessionStart(event, getPanInfo(initialInfo, this.history));
      this.removeListeners = pipe(addPointerEvent(this.contextWindow, "pointermove", this.handlePointerMove), addPointerEvent(this.contextWindow, "pointerup", this.handlePointerUp), addPointerEvent(this.contextWindow, "pointercancel", this.handlePointerUp));
    }
    updateHandlers(handlers) {
      this.handlers = handlers;
    }
    end() {
      this.removeListeners && this.removeListeners();
      cancelFrame(this.updatePoint);
    }
  };
  function transformPoint(info, transformPagePoint) {
    return transformPagePoint ? { point: transformPagePoint(info.point) } : info;
  }
  function subtractPoint(a3, b3) {
    return { x: a3.x - b3.x, y: a3.y - b3.y };
  }
  function getPanInfo({ point }, history) {
    return {
      point,
      delta: subtractPoint(point, lastDevicePoint(history)),
      offset: subtractPoint(point, startDevicePoint(history)),
      velocity: getVelocity(history, 0.1)
    };
  }
  function startDevicePoint(history) {
    return history[0];
  }
  function lastDevicePoint(history) {
    return history[history.length - 1];
  }
  function getVelocity(history, timeDelta) {
    if (history.length < 2) {
      return { x: 0, y: 0 };
    }
    let i3 = history.length - 1;
    let timestampedPoint = null;
    const lastPoint = lastDevicePoint(history);
    while (i3 >= 0) {
      timestampedPoint = history[i3];
      if (lastPoint.timestamp - timestampedPoint.timestamp > secondsToMilliseconds(timeDelta)) {
        break;
      }
      i3--;
    }
    if (!timestampedPoint) {
      return { x: 0, y: 0 };
    }
    const time2 = millisecondsToSeconds(lastPoint.timestamp - timestampedPoint.timestamp);
    if (time2 === 0) {
      return { x: 0, y: 0 };
    }
    const currentVelocity = {
      x: (lastPoint.x - timestampedPoint.x) / time2,
      y: (lastPoint.y - timestampedPoint.y) / time2
    };
    if (currentVelocity.x === Infinity) {
      currentVelocity.x = 0;
    }
    if (currentVelocity.y === Infinity) {
      currentVelocity.y = 0;
    }
    return currentVelocity;
  }

  // packages/components/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs
  function isRefObject(ref) {
    return ref && typeof ref === "object" && Object.prototype.hasOwnProperty.call(ref, "current");
  }

  // packages/components/node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs
  var SCALE_PRECISION = 1e-4;
  var SCALE_MIN = 1 - SCALE_PRECISION;
  var SCALE_MAX = 1 + SCALE_PRECISION;
  var TRANSLATE_PRECISION = 0.01;
  var TRANSLATE_MIN = 0 - TRANSLATE_PRECISION;
  var TRANSLATE_MAX = 0 + TRANSLATE_PRECISION;
  function calcLength(axis) {
    return axis.max - axis.min;
  }
  function isNear(value, target, maxDistance) {
    return Math.abs(value - target) <= maxDistance;
  }
  function calcAxisDelta(delta, source, target, origin = 0.5) {
    delta.origin = origin;
    delta.originPoint = mixNumber(source.min, source.max, delta.origin);
    delta.scale = calcLength(target) / calcLength(source);
    delta.translate = mixNumber(target.min, target.max, delta.origin) - delta.originPoint;
    if (delta.scale >= SCALE_MIN && delta.scale <= SCALE_MAX || isNaN(delta.scale)) {
      delta.scale = 1;
    }
    if (delta.translate >= TRANSLATE_MIN && delta.translate <= TRANSLATE_MAX || isNaN(delta.translate)) {
      delta.translate = 0;
    }
  }
  function calcBoxDelta(delta, source, target, origin) {
    calcAxisDelta(delta.x, source.x, target.x, origin ? origin.originX : void 0);
    calcAxisDelta(delta.y, source.y, target.y, origin ? origin.originY : void 0);
  }
  function calcRelativeAxis(target, relative, parent) {
    target.min = parent.min + relative.min;
    target.max = target.min + calcLength(relative);
  }
  function calcRelativeBox(target, relative, parent) {
    calcRelativeAxis(target.x, relative.x, parent.x);
    calcRelativeAxis(target.y, relative.y, parent.y);
  }
  function calcRelativeAxisPosition(target, layout2, parent) {
    target.min = layout2.min - parent.min;
    target.max = target.min + calcLength(layout2);
  }
  function calcRelativePosition(target, layout2, parent) {
    calcRelativeAxisPosition(target.x, layout2.x, parent.x);
    calcRelativeAxisPosition(target.y, layout2.y, parent.y);
  }

  // packages/components/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs
  function applyConstraints(point, { min: min3, max: max3 }, elastic) {
    if (min3 !== void 0 && point < min3) {
      point = elastic ? mixNumber(min3, point, elastic.min) : Math.max(point, min3);
    } else if (max3 !== void 0 && point > max3) {
      point = elastic ? mixNumber(max3, point, elastic.max) : Math.min(point, max3);
    }
    return point;
  }
  function calcRelativeAxisConstraints(axis, min3, max3) {
    return {
      min: min3 !== void 0 ? axis.min + min3 : void 0,
      max: max3 !== void 0 ? axis.max + max3 - (axis.max - axis.min) : void 0
    };
  }
  function calcRelativeConstraints(layoutBox, { top, left, bottom, right }) {
    return {
      x: calcRelativeAxisConstraints(layoutBox.x, left, right),
      y: calcRelativeAxisConstraints(layoutBox.y, top, bottom)
    };
  }
  function calcViewportAxisConstraints(layoutAxis, constraintsAxis) {
    let min3 = constraintsAxis.min - layoutAxis.min;
    let max3 = constraintsAxis.max - layoutAxis.max;
    if (constraintsAxis.max - constraintsAxis.min < layoutAxis.max - layoutAxis.min) {
      [min3, max3] = [max3, min3];
    }
    return { min: min3, max: max3 };
  }
  function calcViewportConstraints(layoutBox, constraintsBox) {
    return {
      x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x),
      y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y)
    };
  }
  function calcOrigin(source, target) {
    let origin = 0.5;
    const sourceLength = calcLength(source);
    const targetLength = calcLength(target);
    if (targetLength > sourceLength) {
      origin = progress(target.min, target.max - sourceLength, source.min);
    } else if (sourceLength > targetLength) {
      origin = progress(source.min, source.max - targetLength, target.min);
    }
    return clamp2(0, 1, origin);
  }
  function rebaseAxisConstraints(layout2, constraints) {
    const relativeConstraints = {};
    if (constraints.min !== void 0) {
      relativeConstraints.min = constraints.min - layout2.min;
    }
    if (constraints.max !== void 0) {
      relativeConstraints.max = constraints.max - layout2.min;
    }
    return relativeConstraints;
  }
  var defaultElastic = 0.35;
  function resolveDragElastic(dragElastic = defaultElastic) {
    if (dragElastic === false) {
      dragElastic = 0;
    } else if (dragElastic === true) {
      dragElastic = defaultElastic;
    }
    return {
      x: resolveAxisElastic(dragElastic, "left", "right"),
      y: resolveAxisElastic(dragElastic, "top", "bottom")
    };
  }
  function resolveAxisElastic(dragElastic, minLabel, maxLabel) {
    return {
      min: resolvePointElastic(dragElastic, minLabel),
      max: resolvePointElastic(dragElastic, maxLabel)
    };
  }
  function resolvePointElastic(dragElastic, label) {
    return typeof dragElastic === "number" ? dragElastic : dragElastic[label] || 0;
  }

  // packages/components/node_modules/framer-motion/dist/es/projection/geometry/models.mjs
  var createAxisDelta = () => ({
    translate: 0,
    scale: 1,
    origin: 0,
    originPoint: 0
  });
  var createDelta = () => ({
    x: createAxisDelta(),
    y: createAxisDelta()
  });
  var createAxis = () => ({ min: 0, max: 0 });
  var createBox = () => ({
    x: createAxis(),
    y: createAxis()
  });

  // packages/components/node_modules/framer-motion/dist/es/projection/utils/each-axis.mjs
  function eachAxis(callback) {
    return [callback("x"), callback("y")];
  }

  // packages/components/node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs
  function convertBoundingBoxToBox({ top, left, right, bottom }) {
    return {
      x: { min: left, max: right },
      y: { min: top, max: bottom }
    };
  }
  function convertBoxToBoundingBox({ x: x2, y: y3 }) {
    return { top: y3.min, right: x2.max, bottom: y3.max, left: x2.min };
  }
  function transformBoxPoints(point, transformPoint2) {
    if (!transformPoint2)
      return point;
    const topLeft = transformPoint2({ x: point.left, y: point.top });
    const bottomRight = transformPoint2({ x: point.right, y: point.bottom });
    return {
      top: topLeft.y,
      left: topLeft.x,
      bottom: bottomRight.y,
      right: bottomRight.x
    };
  }

  // packages/components/node_modules/framer-motion/dist/es/projection/utils/has-transform.mjs
  function isIdentityScale(scale2) {
    return scale2 === void 0 || scale2 === 1;
  }
  function hasScale({ scale: scale2, scaleX, scaleY }) {
    return !isIdentityScale(scale2) || !isIdentityScale(scaleX) || !isIdentityScale(scaleY);
  }
  function hasTransform(values) {
    return hasScale(values) || has2DTranslate(values) || values.z || values.rotate || values.rotateX || values.rotateY || values.skewX || values.skewY;
  }
  function has2DTranslate(values) {
    return is2DTranslate(values.x) || is2DTranslate(values.y);
  }
  function is2DTranslate(value) {
    return value && value !== "0%";
  }

  // packages/components/node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs
  function scalePoint(point, scale2, originPoint) {
    const distanceFromOrigin = point - originPoint;
    const scaled = scale2 * distanceFromOrigin;
    return originPoint + scaled;
  }
  function applyPointDelta(point, translate, scale2, originPoint, boxScale) {
    if (boxScale !== void 0) {
      point = scalePoint(point, boxScale, originPoint);
    }
    return scalePoint(point, scale2, originPoint) + translate;
  }
  function applyAxisDelta(axis, translate = 0, scale2 = 1, originPoint, boxScale) {
    axis.min = applyPointDelta(axis.min, translate, scale2, originPoint, boxScale);
    axis.max = applyPointDelta(axis.max, translate, scale2, originPoint, boxScale);
  }
  function applyBoxDelta(box, { x: x2, y: y3 }) {
    applyAxisDelta(box.x, x2.translate, x2.scale, x2.originPoint);
    applyAxisDelta(box.y, y3.translate, y3.scale, y3.originPoint);
  }
  var TREE_SCALE_SNAP_MIN = 0.999999999999;
  var TREE_SCALE_SNAP_MAX = 1.0000000000001;
  function applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) {
    const treeLength = treePath.length;
    if (!treeLength)
      return;
    treeScale.x = treeScale.y = 1;
    let node2;
    let delta;
    for (let i3 = 0; i3 < treeLength; i3++) {
      node2 = treePath[i3];
      delta = node2.projectionDelta;
      const { visualElement } = node2.options;
      if (visualElement && visualElement.props.style && visualElement.props.style.display === "contents") {
        continue;
      }
      if (isSharedTransition && node2.options.layoutScroll && node2.scroll && node2 !== node2.root) {
        transformBox(box, {
          x: -node2.scroll.offset.x,
          y: -node2.scroll.offset.y
        });
      }
      if (delta) {
        treeScale.x *= delta.x.scale;
        treeScale.y *= delta.y.scale;
        applyBoxDelta(box, delta);
      }
      if (isSharedTransition && hasTransform(node2.latestValues)) {
        transformBox(box, node2.latestValues);
      }
    }
    if (treeScale.x < TREE_SCALE_SNAP_MAX && treeScale.x > TREE_SCALE_SNAP_MIN) {
      treeScale.x = 1;
    }
    if (treeScale.y < TREE_SCALE_SNAP_MAX && treeScale.y > TREE_SCALE_SNAP_MIN) {
      treeScale.y = 1;
    }
  }
  function translateAxis(axis, distance2) {
    axis.min = axis.min + distance2;
    axis.max = axis.max + distance2;
  }
  function transformAxis(axis, axisTranslate, axisScale, boxScale, axisOrigin = 0.5) {
    const originPoint = mixNumber(axis.min, axis.max, axisOrigin);
    applyAxisDelta(axis, axisTranslate, axisScale, originPoint, boxScale);
  }
  function transformBox(box, transform) {
    transformAxis(box.x, transform.x, transform.scaleX, transform.scale, transform.originX);
    transformAxis(box.y, transform.y, transform.scaleY, transform.scale, transform.originY);
  }

  // packages/components/node_modules/framer-motion/dist/es/projection/utils/measure.mjs
  function measureViewportBox(instance, transformPoint2) {
    return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint2));
  }
  function measurePageBox(element, rootProjectionNode2, transformPagePoint) {
    const viewportBox = measureViewportBox(element, transformPagePoint);
    const { scroll } = rootProjectionNode2;
    if (scroll) {
      translateAxis(viewportBox.x, scroll.offset.x);
      translateAxis(viewportBox.y, scroll.offset.y);
    }
    return viewportBox;
  }

  // packages/components/node_modules/framer-motion/dist/es/utils/get-context-window.mjs
  var getContextWindow = ({ current }) => {
    return current ? current.ownerDocument.defaultView : null;
  };

  // packages/components/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs
  var elementDragControls = /* @__PURE__ */ new WeakMap();
  var VisualElementDragControls = class {
    constructor(visualElement) {
      this.openDragLock = null;
      this.isDragging = false;
      this.currentDirection = null;
      this.originPoint = { x: 0, y: 0 };
      this.constraints = false;
      this.hasMutatedConstraints = false;
      this.elastic = createBox();
      this.visualElement = visualElement;
    }
    start(originEvent, { snapToCursor = false } = {}) {
      const { presenceContext } = this.visualElement;
      if (presenceContext && presenceContext.isPresent === false)
        return;
      const onSessionStart = (event) => {
        const { dragSnapToOrigin: dragSnapToOrigin2 } = this.getProps();
        dragSnapToOrigin2 ? this.pauseAnimation() : this.stopAnimation();
        if (snapToCursor) {
          this.snapToCursor(extractEventInfo(event).point);
        }
      };
      const onStart = (event, info) => {
        const { drag: drag2, dragPropagation, onDragStart } = this.getProps();
        if (drag2 && !dragPropagation) {
          if (this.openDragLock)
            this.openDragLock();
          this.openDragLock = setDragLock(drag2);
          if (!this.openDragLock)
            return;
        }
        this.isDragging = true;
        this.currentDirection = null;
        this.resolveConstraints();
        if (this.visualElement.projection) {
          this.visualElement.projection.isAnimationBlocked = true;
          this.visualElement.projection.target = void 0;
        }
        eachAxis((axis) => {
          let current = this.getAxisMotionValue(axis).get() || 0;
          if (percent.test(current)) {
            const { projection } = this.visualElement;
            if (projection && projection.layout) {
              const measuredAxis = projection.layout.layoutBox[axis];
              if (measuredAxis) {
                const length2 = calcLength(measuredAxis);
                current = length2 * (parseFloat(current) / 100);
              }
            }
          }
          this.originPoint[axis] = current;
        });
        if (onDragStart) {
          frame.postRender(() => onDragStart(event, info));
        }
        addValueToWillChange(this.visualElement, "transform");
        const { animationState } = this.visualElement;
        animationState && animationState.setActive("whileDrag", true);
      };
      const onMove = (event, info) => {
        const { dragPropagation, dragDirectionLock, onDirectionLock, onDrag } = this.getProps();
        if (!dragPropagation && !this.openDragLock)
          return;
        const { offset: offset3 } = info;
        if (dragDirectionLock && this.currentDirection === null) {
          this.currentDirection = getCurrentDirection(offset3);
          if (this.currentDirection !== null) {
            onDirectionLock && onDirectionLock(this.currentDirection);
          }
          return;
        }
        this.updateAxis("x", info.point, offset3);
        this.updateAxis("y", info.point, offset3);
        this.visualElement.render();
        onDrag && onDrag(event, info);
      };
      const onSessionEnd = (event, info) => this.stop(event, info);
      const resumeAnimation = () => eachAxis((axis) => {
        var _a;
        return this.getAnimationState(axis) === "paused" && ((_a = this.getAxisMotionValue(axis).animation) === null || _a === void 0 ? void 0 : _a.play());
      });
      const { dragSnapToOrigin } = this.getProps();
      this.panSession = new PanSession(originEvent, {
        onSessionStart,
        onStart,
        onMove,
        onSessionEnd,
        resumeAnimation
      }, {
        transformPagePoint: this.visualElement.getTransformPagePoint(),
        dragSnapToOrigin,
        contextWindow: getContextWindow(this.visualElement)
      });
    }
    stop(event, info) {
      const isDragging2 = this.isDragging;
      this.cancel();
      if (!isDragging2)
        return;
      const { velocity } = info;
      this.startAnimation(velocity);
      const { onDragEnd } = this.getProps();
      if (onDragEnd) {
        frame.postRender(() => onDragEnd(event, info));
      }
    }
    cancel() {
      this.isDragging = false;
      const { projection, animationState } = this.visualElement;
      if (projection) {
        projection.isAnimationBlocked = false;
      }
      this.panSession && this.panSession.end();
      this.panSession = void 0;
      const { dragPropagation } = this.getProps();
      if (!dragPropagation && this.openDragLock) {
        this.openDragLock();
        this.openDragLock = null;
      }
      animationState && animationState.setActive("whileDrag", false);
    }
    updateAxis(axis, _point, offset3) {
      const { drag: drag2 } = this.getProps();
      if (!offset3 || !shouldDrag(axis, drag2, this.currentDirection))
        return;
      const axisValue = this.getAxisMotionValue(axis);
      let next2 = this.originPoint[axis] + offset3[axis];
      if (this.constraints && this.constraints[axis]) {
        next2 = applyConstraints(next2, this.constraints[axis], this.elastic[axis]);
      }
      axisValue.set(next2);
    }
    resolveConstraints() {
      var _a;
      const { dragConstraints, dragElastic } = this.getProps();
      const layout2 = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(false) : (_a = this.visualElement.projection) === null || _a === void 0 ? void 0 : _a.layout;
      const prevConstraints = this.constraints;
      if (dragConstraints && isRefObject(dragConstraints)) {
        if (!this.constraints) {
          this.constraints = this.resolveRefConstraints();
        }
      } else {
        if (dragConstraints && layout2) {
          this.constraints = calcRelativeConstraints(layout2.layoutBox, dragConstraints);
        } else {
          this.constraints = false;
        }
      }
      this.elastic = resolveDragElastic(dragElastic);
      if (prevConstraints !== this.constraints && layout2 && this.constraints && !this.hasMutatedConstraints) {
        eachAxis((axis) => {
          if (this.constraints !== false && this.getAxisMotionValue(axis)) {
            this.constraints[axis] = rebaseAxisConstraints(layout2.layoutBox[axis], this.constraints[axis]);
          }
        });
      }
    }
    resolveRefConstraints() {
      const { dragConstraints: constraints, onMeasureDragConstraints } = this.getProps();
      if (!constraints || !isRefObject(constraints))
        return false;
      const constraintsElement = constraints.current;
      invariant2(constraintsElement !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");
      const { projection } = this.visualElement;
      if (!projection || !projection.layout)
        return false;
      const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());
      let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox);
      if (onMeasureDragConstraints) {
        const userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));
        this.hasMutatedConstraints = !!userConstraints;
        if (userConstraints) {
          measuredConstraints = convertBoundingBoxToBox(userConstraints);
        }
      }
      return measuredConstraints;
    }
    startAnimation(velocity) {
      const { drag: drag2, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd } = this.getProps();
      const constraints = this.constraints || {};
      const momentumAnimations = eachAxis((axis) => {
        if (!shouldDrag(axis, drag2, this.currentDirection)) {
          return;
        }
        let transition = constraints && constraints[axis] || {};
        if (dragSnapToOrigin)
          transition = { min: 0, max: 0 };
        const bounceStiffness = dragElastic ? 200 : 1e6;
        const bounceDamping = dragElastic ? 40 : 1e7;
        const inertia2 = {
          type: "inertia",
          velocity: dragMomentum ? velocity[axis] : 0,
          bounceStiffness,
          bounceDamping,
          timeConstant: 750,
          restDelta: 1,
          restSpeed: 10,
          ...dragTransition,
          ...transition
        };
        return this.startAxisValueAnimation(axis, inertia2);
      });
      return Promise.all(momentumAnimations).then(onDragTransitionEnd);
    }
    startAxisValueAnimation(axis, transition) {
      const axisValue = this.getAxisMotionValue(axis);
      addValueToWillChange(this.visualElement, axis);
      return axisValue.start(animateMotionValue(axis, axisValue, 0, transition, this.visualElement, false));
    }
    stopAnimation() {
      eachAxis((axis) => this.getAxisMotionValue(axis).stop());
    }
    pauseAnimation() {
      eachAxis((axis) => {
        var _a;
        return (_a = this.getAxisMotionValue(axis).animation) === null || _a === void 0 ? void 0 : _a.pause();
      });
    }
    getAnimationState(axis) {
      var _a;
      return (_a = this.getAxisMotionValue(axis).animation) === null || _a === void 0 ? void 0 : _a.state;
    }
    /**
     * Drag works differently depending on which props are provided.
     *
     * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.
     * - Otherwise, we apply the delta to the x/y motion values.
     */
    getAxisMotionValue(axis) {
      const dragKey = `_drag${axis.toUpperCase()}`;
      const props = this.visualElement.getProps();
      const externalMotionValue = props[dragKey];
      return externalMotionValue ? externalMotionValue : this.visualElement.getValue(axis, (props.initial ? props.initial[axis] : void 0) || 0);
    }
    snapToCursor(point) {
      eachAxis((axis) => {
        const { drag: drag2 } = this.getProps();
        if (!shouldDrag(axis, drag2, this.currentDirection))
          return;
        const { projection } = this.visualElement;
        const axisValue = this.getAxisMotionValue(axis);
        if (projection && projection.layout) {
          const { min: min3, max: max3 } = projection.layout.layoutBox[axis];
          axisValue.set(point[axis] - mixNumber(min3, max3, 0.5));
        }
      });
    }
    /**
     * When the viewport resizes we want to check if the measured constraints
     * have changed and, if so, reposition the element within those new constraints
     * relative to where it was before the resize.
     */
    scalePositionWithinConstraints() {
      if (!this.visualElement.current)
        return;
      const { drag: drag2, dragConstraints } = this.getProps();
      const { projection } = this.visualElement;
      if (!isRefObject(dragConstraints) || !projection || !this.constraints)
        return;
      this.stopAnimation();
      const boxProgress = { x: 0, y: 0 };
      eachAxis((axis) => {
        const axisValue = this.getAxisMotionValue(axis);
        if (axisValue && this.constraints !== false) {
          const latest = axisValue.get();
          boxProgress[axis] = calcOrigin({ min: latest, max: latest }, this.constraints[axis]);
        }
      });
      const { transformTemplate } = this.visualElement.getProps();
      this.visualElement.current.style.transform = transformTemplate ? transformTemplate({}, "") : "none";
      projection.root && projection.root.updateScroll();
      projection.updateLayout();
      this.resolveConstraints();
      eachAxis((axis) => {
        if (!shouldDrag(axis, drag2, null))
          return;
        const axisValue = this.getAxisMotionValue(axis);
        const { min: min3, max: max3 } = this.constraints[axis];
        axisValue.set(mixNumber(min3, max3, boxProgress[axis]));
      });
    }
    addListeners() {
      if (!this.visualElement.current)
        return;
      elementDragControls.set(this.visualElement, this);
      const element = this.visualElement.current;
      const stopPointerListener = addPointerEvent(element, "pointerdown", (event) => {
        const { drag: drag2, dragListener = true } = this.getProps();
        drag2 && dragListener && this.start(event);
      });
      const measureDragConstraints = () => {
        const { dragConstraints } = this.getProps();
        if (isRefObject(dragConstraints) && dragConstraints.current) {
          this.constraints = this.resolveRefConstraints();
        }
      };
      const { projection } = this.visualElement;
      const stopMeasureLayoutListener = projection.addEventListener("measure", measureDragConstraints);
      if (projection && !projection.layout) {
        projection.root && projection.root.updateScroll();
        projection.updateLayout();
      }
      frame.read(measureDragConstraints);
      const stopResizeListener = addDomEvent(window, "resize", () => this.scalePositionWithinConstraints());
      const stopLayoutUpdateListener = projection.addEventListener("didUpdate", (({ delta, hasLayoutChanged }) => {
        if (this.isDragging && hasLayoutChanged) {
          eachAxis((axis) => {
            const motionValue2 = this.getAxisMotionValue(axis);
            if (!motionValue2)
              return;
            this.originPoint[axis] += delta[axis].translate;
            motionValue2.set(motionValue2.get() + delta[axis].translate);
          });
          this.visualElement.render();
        }
      }));
      return () => {
        stopResizeListener();
        stopPointerListener();
        stopMeasureLayoutListener();
        stopLayoutUpdateListener && stopLayoutUpdateListener();
      };
    }
    getProps() {
      const props = this.visualElement.getProps();
      const { drag: drag2 = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true } = props;
      return {
        ...props,
        drag: drag2,
        dragDirectionLock,
        dragPropagation,
        dragConstraints,
        dragElastic,
        dragMomentum
      };
    }
  };
  function shouldDrag(direction, drag2, currentDirection) {
    return (drag2 === true || drag2 === direction) && (currentDirection === null || currentDirection === direction);
  }
  function getCurrentDirection(offset3, lockThreshold = 10) {
    let direction = null;
    if (Math.abs(offset3.y) > lockThreshold) {
      direction = "y";
    } else if (Math.abs(offset3.x) > lockThreshold) {
      direction = "x";
    }
    return direction;
  }

  // packages/components/node_modules/framer-motion/dist/es/gestures/drag/index.mjs
  var DragGesture = class extends Feature {
    constructor(node2) {
      super(node2);
      this.removeGroupControls = noop2;
      this.removeListeners = noop2;
      this.controls = new VisualElementDragControls(node2);
    }
    mount() {
      const { dragControls } = this.node.getProps();
      if (dragControls) {
        this.removeGroupControls = dragControls.subscribe(this.controls);
      }
      this.removeListeners = this.controls.addListeners() || noop2;
    }
    unmount() {
      this.removeGroupControls();
      this.removeListeners();
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/gestures/pan/index.mjs
  var asyncHandler = (handler) => (event, info) => {
    if (handler) {
      frame.postRender(() => handler(event, info));
    }
  };
  var PanGesture = class extends Feature {
    constructor() {
      super(...arguments);
      this.removePointerDownListener = noop2;
    }
    onPointerDown(pointerDownEvent) {
      this.session = new PanSession(pointerDownEvent, this.createPanHandlers(), {
        transformPagePoint: this.node.getTransformPagePoint(),
        contextWindow: getContextWindow(this.node)
      });
    }
    createPanHandlers() {
      const { onPanSessionStart, onPanStart, onPan, onPanEnd } = this.node.getProps();
      return {
        onSessionStart: asyncHandler(onPanSessionStart),
        onStart: asyncHandler(onPanStart),
        onMove: onPan,
        onEnd: (event, info) => {
          delete this.session;
          if (onPanEnd) {
            frame.postRender(() => onPanEnd(event, info));
          }
        }
      };
    }
    mount() {
      this.removePointerDownListener = addPointerEvent(this.node.current, "pointerdown", (event) => this.onPointerDown(event));
    }
    update() {
      this.session && this.session.updateHandlers(this.createPanHandlers());
    }
    unmount() {
      this.removePointerDownListener();
      this.session && this.session.end();
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs
  var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
  var import_react61 = __toESM(require_react(), 1);

  // packages/components/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs
  var import_react58 = __toESM(require_react(), 1);

  // packages/components/node_modules/framer-motion/dist/es/context/PresenceContext.mjs
  var import_react57 = __toESM(require_react(), 1);
  var PresenceContext = (0, import_react57.createContext)(null);

  // packages/components/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs
  function usePresence() {
    const context = (0, import_react58.useContext)(PresenceContext);
    if (context === null)
      return [true, null];
    const { isPresent, onExitComplete, register } = context;
    const id3 = (0, import_react58.useId)();
    (0, import_react58.useEffect)(() => register(id3), []);
    const safeToRemove = (0, import_react58.useCallback)(() => onExitComplete && onExitComplete(id3), [id3, onExitComplete]);
    return !isPresent && onExitComplete ? [false, safeToRemove] : [true];
  }

  // packages/components/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs
  var import_react59 = __toESM(require_react(), 1);
  var LayoutGroupContext = (0, import_react59.createContext)({});

  // packages/components/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs
  var import_react60 = __toESM(require_react(), 1);
  var SwitchLayoutGroupContext = (0, import_react60.createContext)({});

  // packages/components/node_modules/framer-motion/dist/es/projection/node/state.mjs
  var globalProjectionState = {
    /**
     * Global flag as to whether the tree has animated since the last time
     * we resized the window
     */
    hasAnimatedSinceResize: true,
    /**
     * We set this to true once, on the first update. Any nodes added to the tree beyond that
     * update will be given a `data-projection-id` attribute.
     */
    hasEverUpdated: false
  };

  // packages/components/node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs
  function pixelsToPercent(pixels, axis) {
    if (axis.max === axis.min)
      return 0;
    return pixels / (axis.max - axis.min) * 100;
  }
  var correctBorderRadius = {
    correct: (latest, node2) => {
      if (!node2.target)
        return latest;
      if (typeof latest === "string") {
        if (px.test(latest)) {
          latest = parseFloat(latest);
        } else {
          return latest;
        }
      }
      const x2 = pixelsToPercent(latest, node2.target.x);
      const y3 = pixelsToPercent(latest, node2.target.y);
      return `${x2}% ${y3}%`;
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs
  var correctBoxShadow = {
    correct: (latest, { treeScale, projectionDelta }) => {
      const original = latest;
      const shadow = complex.parse(latest);
      if (shadow.length > 5)
        return original;
      const template = complex.createTransformer(latest);
      const offset3 = typeof shadow[0] !== "number" ? 1 : 0;
      const xScale = projectionDelta.x.scale * treeScale.x;
      const yScale = projectionDelta.y.scale * treeScale.y;
      shadow[0 + offset3] /= xScale;
      shadow[1 + offset3] /= yScale;
      const averageScale = mixNumber(xScale, yScale, 0.5);
      if (typeof shadow[2 + offset3] === "number")
        shadow[2 + offset3] /= averageScale;
      if (typeof shadow[3 + offset3] === "number")
        shadow[3 + offset3] /= averageScale;
      return template(shadow);
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs
  var scaleCorrectors = {};
  function addScaleCorrector(correctors) {
    Object.assign(scaleCorrectors, correctors);
  }

  // packages/components/node_modules/framer-motion/dist/es/frameloop/microtask.mjs
  var { schedule: microtask, cancel: cancelMicrotask } = createRenderBatcher(queueMicrotask, false);

  // packages/components/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs
  var MeasureLayoutWithContext = class extends import_react61.Component {
    /**
     * This only mounts projection nodes for components that
     * need measuring, we might want to do it for all components
     * in order to incorporate transforms
     */
    componentDidMount() {
      const { visualElement, layoutGroup, switchLayoutGroup, layoutId } = this.props;
      const { projection } = visualElement;
      addScaleCorrector(defaultScaleCorrectors);
      if (projection) {
        if (layoutGroup.group)
          layoutGroup.group.add(projection);
        if (switchLayoutGroup && switchLayoutGroup.register && layoutId) {
          switchLayoutGroup.register(projection);
        }
        projection.root.didUpdate();
        projection.addEventListener("animationComplete", () => {
          this.safeToRemove();
        });
        projection.setOptions({
          ...projection.options,
          onExitComplete: () => this.safeToRemove()
        });
      }
      globalProjectionState.hasEverUpdated = true;
    }
    getSnapshotBeforeUpdate(prevProps) {
      const { layoutDependency, visualElement, drag: drag2, isPresent } = this.props;
      const projection = visualElement.projection;
      if (!projection)
        return null;
      projection.isPresent = isPresent;
      if (drag2 || prevProps.layoutDependency !== layoutDependency || layoutDependency === void 0) {
        projection.willUpdate();
      } else {
        this.safeToRemove();
      }
      if (prevProps.isPresent !== isPresent) {
        if (isPresent) {
          projection.promote();
        } else if (!projection.relegate()) {
          frame.postRender(() => {
            const stack = projection.getStack();
            if (!stack || !stack.members.length) {
              this.safeToRemove();
            }
          });
        }
      }
      return null;
    }
    componentDidUpdate() {
      const { projection } = this.props.visualElement;
      if (projection) {
        projection.root.didUpdate();
        microtask.postRender(() => {
          if (!projection.currentAnimation && projection.isLead()) {
            this.safeToRemove();
          }
        });
      }
    }
    componentWillUnmount() {
      const { visualElement, layoutGroup, switchLayoutGroup: promoteContext } = this.props;
      const { projection } = visualElement;
      if (projection) {
        projection.scheduleCheckAfterUnmount();
        if (layoutGroup && layoutGroup.group)
          layoutGroup.group.remove(projection);
        if (promoteContext && promoteContext.deregister)
          promoteContext.deregister(projection);
      }
    }
    safeToRemove() {
      const { safeToRemove } = this.props;
      safeToRemove && safeToRemove();
    }
    render() {
      return null;
    }
  };
  function MeasureLayout(props) {
    const [isPresent, safeToRemove] = usePresence();
    const layoutGroup = (0, import_react61.useContext)(LayoutGroupContext);
    return (0, import_jsx_runtime39.jsx)(MeasureLayoutWithContext, { ...props, layoutGroup, switchLayoutGroup: (0, import_react61.useContext)(SwitchLayoutGroupContext), isPresent, safeToRemove });
  }
  var defaultScaleCorrectors = {
    borderRadius: {
      ...correctBorderRadius,
      applyTo: [
        "borderTopLeftRadius",
        "borderTopRightRadius",
        "borderBottomLeftRadius",
        "borderBottomRightRadius"
      ]
    },
    borderTopLeftRadius: correctBorderRadius,
    borderTopRightRadius: correctBorderRadius,
    borderBottomLeftRadius: correctBorderRadius,
    borderBottomRightRadius: correctBorderRadius,
    boxShadow: correctBoxShadow
  };

  // packages/components/node_modules/framer-motion/dist/es/projection/animation/mix-values.mjs
  var borders = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"];
  var numBorders = borders.length;
  var asNumber = (value) => typeof value === "string" ? parseFloat(value) : value;
  var isPx = (value) => typeof value === "number" || px.test(value);
  function mixValues(target, follow, lead, progress2, shouldCrossfadeOpacity, isOnlyMember) {
    if (shouldCrossfadeOpacity) {
      target.opacity = mixNumber(
        0,
        // TODO Reinstate this if only child
        lead.opacity !== void 0 ? lead.opacity : 1,
        easeCrossfadeIn(progress2)
      );
      target.opacityExit = mixNumber(follow.opacity !== void 0 ? follow.opacity : 1, 0, easeCrossfadeOut(progress2));
    } else if (isOnlyMember) {
      target.opacity = mixNumber(follow.opacity !== void 0 ? follow.opacity : 1, lead.opacity !== void 0 ? lead.opacity : 1, progress2);
    }
    for (let i3 = 0; i3 < numBorders; i3++) {
      const borderLabel = `border${borders[i3]}Radius`;
      let followRadius = getRadius(follow, borderLabel);
      let leadRadius = getRadius(lead, borderLabel);
      if (followRadius === void 0 && leadRadius === void 0)
        continue;
      followRadius || (followRadius = 0);
      leadRadius || (leadRadius = 0);
      const canMix = followRadius === 0 || leadRadius === 0 || isPx(followRadius) === isPx(leadRadius);
      if (canMix) {
        target[borderLabel] = Math.max(mixNumber(asNumber(followRadius), asNumber(leadRadius), progress2), 0);
        if (percent.test(leadRadius) || percent.test(followRadius)) {
          target[borderLabel] += "%";
        }
      } else {
        target[borderLabel] = leadRadius;
      }
    }
    if (follow.rotate || lead.rotate) {
      target.rotate = mixNumber(follow.rotate || 0, lead.rotate || 0, progress2);
    }
  }
  function getRadius(values, radiusName) {
    return values[radiusName] !== void 0 ? values[radiusName] : values.borderRadius;
  }
  var easeCrossfadeIn = /* @__PURE__ */ compress(0, 0.5, circOut);
  var easeCrossfadeOut = /* @__PURE__ */ compress(0.5, 0.95, noop2);
  function compress(min3, max3, easing) {
    return (p3) => {
      if (p3 < min3)
        return 0;
      if (p3 > max3)
        return 1;
      return easing(progress(min3, max3, p3));
    };
  }

  // packages/components/node_modules/framer-motion/dist/es/projection/geometry/copy.mjs
  function copyAxisInto(axis, originAxis) {
    axis.min = originAxis.min;
    axis.max = originAxis.max;
  }
  function copyBoxInto(box, originBox) {
    copyAxisInto(box.x, originBox.x);
    copyAxisInto(box.y, originBox.y);
  }
  function copyAxisDeltaInto(delta, originDelta) {
    delta.translate = originDelta.translate;
    delta.scale = originDelta.scale;
    delta.originPoint = originDelta.originPoint;
    delta.origin = originDelta.origin;
  }

  // packages/components/node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs
  function removePointDelta(point, translate, scale2, originPoint, boxScale) {
    point -= translate;
    point = scalePoint(point, 1 / scale2, originPoint);
    if (boxScale !== void 0) {
      point = scalePoint(point, 1 / boxScale, originPoint);
    }
    return point;
  }
  function removeAxisDelta(axis, translate = 0, scale2 = 1, origin = 0.5, boxScale, originAxis = axis, sourceAxis = axis) {
    if (percent.test(translate)) {
      translate = parseFloat(translate);
      const relativeProgress = mixNumber(sourceAxis.min, sourceAxis.max, translate / 100);
      translate = relativeProgress - sourceAxis.min;
    }
    if (typeof translate !== "number")
      return;
    let originPoint = mixNumber(originAxis.min, originAxis.max, origin);
    if (axis === originAxis)
      originPoint -= translate;
    axis.min = removePointDelta(axis.min, translate, scale2, originPoint, boxScale);
    axis.max = removePointDelta(axis.max, translate, scale2, originPoint, boxScale);
  }
  function removeAxisTransforms(axis, transforms, [key, scaleKey, originKey], origin, sourceAxis) {
    removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis);
  }
  var xKeys = ["x", "scaleX", "originX"];
  var yKeys = ["y", "scaleY", "originY"];
  function removeBoxTransforms(box, transforms, originBox, sourceBox) {
    removeAxisTransforms(box.x, transforms, xKeys, originBox ? originBox.x : void 0, sourceBox ? sourceBox.x : void 0);
    removeAxisTransforms(box.y, transforms, yKeys, originBox ? originBox.y : void 0, sourceBox ? sourceBox.y : void 0);
  }

  // packages/components/node_modules/framer-motion/dist/es/projection/geometry/utils.mjs
  function isAxisDeltaZero(delta) {
    return delta.translate === 0 && delta.scale === 1;
  }
  function isDeltaZero(delta) {
    return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y);
  }
  function axisEquals(a3, b3) {
    return a3.min === b3.min && a3.max === b3.max;
  }
  function boxEquals(a3, b3) {
    return axisEquals(a3.x, b3.x) && axisEquals(a3.y, b3.y);
  }
  function axisEqualsRounded(a3, b3) {
    return Math.round(a3.min) === Math.round(b3.min) && Math.round(a3.max) === Math.round(b3.max);
  }
  function boxEqualsRounded(a3, b3) {
    return axisEqualsRounded(a3.x, b3.x) && axisEqualsRounded(a3.y, b3.y);
  }
  function aspectRatio(box) {
    return calcLength(box.x) / calcLength(box.y);
  }
  function axisDeltaEquals(a3, b3) {
    return a3.translate === b3.translate && a3.scale === b3.scale && a3.originPoint === b3.originPoint;
  }

  // packages/components/node_modules/framer-motion/dist/es/projection/shared/stack.mjs
  var NodeStack = class {
    constructor() {
      this.members = [];
    }
    add(node2) {
      addUniqueItem(this.members, node2);
      node2.scheduleRender();
    }
    remove(node2) {
      removeItem(this.members, node2);
      if (node2 === this.prevLead) {
        this.prevLead = void 0;
      }
      if (node2 === this.lead) {
        const prevLead = this.members[this.members.length - 1];
        if (prevLead) {
          this.promote(prevLead);
        }
      }
    }
    relegate(node2) {
      const indexOfNode = this.members.findIndex((member) => node2 === member);
      if (indexOfNode === 0)
        return false;
      let prevLead;
      for (let i3 = indexOfNode; i3 >= 0; i3--) {
        const member = this.members[i3];
        if (member.isPresent !== false) {
          prevLead = member;
          break;
        }
      }
      if (prevLead) {
        this.promote(prevLead);
        return true;
      } else {
        return false;
      }
    }
    promote(node2, preserveFollowOpacity) {
      const prevLead = this.lead;
      if (node2 === prevLead)
        return;
      this.prevLead = prevLead;
      this.lead = node2;
      node2.show();
      if (prevLead) {
        prevLead.instance && prevLead.scheduleRender();
        node2.scheduleRender();
        node2.resumeFrom = prevLead;
        if (preserveFollowOpacity) {
          node2.resumeFrom.preserveOpacity = true;
        }
        if (prevLead.snapshot) {
          node2.snapshot = prevLead.snapshot;
          node2.snapshot.latestValues = prevLead.animationValues || prevLead.latestValues;
        }
        if (node2.root && node2.root.isUpdating) {
          node2.isLayoutDirty = true;
        }
        const { crossfade } = node2.options;
        if (crossfade === false) {
          prevLead.hide();
        }
      }
    }
    exitAnimationComplete() {
      this.members.forEach((node2) => {
        const { options: options2, resumingFrom } = node2;
        options2.onExitComplete && options2.onExitComplete();
        if (resumingFrom) {
          resumingFrom.options.onExitComplete && resumingFrom.options.onExitComplete();
        }
      });
    }
    scheduleRender() {
      this.members.forEach((node2) => {
        node2.instance && node2.scheduleRender(false);
      });
    }
    /**
     * Clear any leads that have been removed this render to prevent them from being
     * used in future animations and to prevent memory leaks
     */
    removeLeadSnapshot() {
      if (this.lead && this.lead.snapshot) {
        this.lead.snapshot = void 0;
      }
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/projection/styles/transform.mjs
  function buildProjectionTransform(delta, treeScale, latestTransform) {
    let transform = "";
    const xTranslate = delta.x.translate / treeScale.x;
    const yTranslate = delta.y.translate / treeScale.y;
    const zTranslate = (latestTransform === null || latestTransform === void 0 ? void 0 : latestTransform.z) || 0;
    if (xTranslate || yTranslate || zTranslate) {
      transform = `translate3d(${xTranslate}px, ${yTranslate}px, ${zTranslate}px) `;
    }
    if (treeScale.x !== 1 || treeScale.y !== 1) {
      transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `;
    }
    if (latestTransform) {
      const { transformPerspective, rotate, rotateX, rotateY, skewX, skewY } = latestTransform;
      if (transformPerspective)
        transform = `perspective(${transformPerspective}px) ${transform}`;
      if (rotate)
        transform += `rotate(${rotate}deg) `;
      if (rotateX)
        transform += `rotateX(${rotateX}deg) `;
      if (rotateY)
        transform += `rotateY(${rotateY}deg) `;
      if (skewX)
        transform += `skewX(${skewX}deg) `;
      if (skewY)
        transform += `skewY(${skewY}deg) `;
    }
    const elementScaleX = delta.x.scale * treeScale.x;
    const elementScaleY = delta.y.scale * treeScale.y;
    if (elementScaleX !== 1 || elementScaleY !== 1) {
      transform += `scale(${elementScaleX}, ${elementScaleY})`;
    }
    return transform || "none";
  }

  // packages/components/node_modules/framer-motion/dist/es/render/utils/compare-by-depth.mjs
  var compareByDepth = (a3, b3) => a3.depth - b3.depth;

  // packages/components/node_modules/framer-motion/dist/es/render/utils/flat-tree.mjs
  var FlatTree = class {
    constructor() {
      this.children = [];
      this.isDirty = false;
    }
    add(child) {
      addUniqueItem(this.children, child);
      this.isDirty = true;
    }
    remove(child) {
      removeItem(this.children, child);
      this.isDirty = true;
    }
    forEach(callback) {
      this.isDirty && this.children.sort(compareByDepth);
      this.isDirty = false;
      this.children.forEach(callback);
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.mjs
  function resolveMotionValue(value) {
    const unwrappedValue = isMotionValue(value) ? value.get() : value;
    return isCustomValue(unwrappedValue) ? unwrappedValue.toValue() : unwrappedValue;
  }

  // packages/components/node_modules/framer-motion/dist/es/utils/delay.mjs
  function delay(callback, timeout) {
    const start = time.now();
    const checkElapsed = ({ timestamp }) => {
      const elapsed = timestamp - start;
      if (elapsed >= timeout) {
        cancelFrame(checkElapsed);
        callback(elapsed - timeout);
      }
    };
    frame.read(checkElapsed, true);
    return () => cancelFrame(checkElapsed);
  }

  // packages/components/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs
  function isSVGElement(element) {
    return element instanceof SVGElement && element.tagName !== "svg";
  }

  // packages/components/node_modules/framer-motion/dist/es/animation/animate/single-value.mjs
  function animateSingleValue(value, keyframes4, options2) {
    const motionValue$1 = isMotionValue(value) ? value : motionValue(value);
    motionValue$1.start(animateMotionValue("", motionValue$1, keyframes4, options2));
    return motionValue$1.animation;
  }

  // packages/components/node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs
  var metrics = {
    type: "projectionFrame",
    totalNodes: 0,
    resolvedTargetDeltas: 0,
    recalculatedProjection: 0
  };
  var isDebug = typeof window !== "undefined" && window.MotionDebug !== void 0;
  var transformAxes = ["", "X", "Y", "Z"];
  var hiddenVisibility = { visibility: "hidden" };
  var animationTarget = 1e3;
  var id2 = 0;
  function resetDistortingTransform(key, visualElement, values, sharedAnimationValues) {
    const { latestValues } = visualElement;
    if (latestValues[key]) {
      values[key] = latestValues[key];
      visualElement.setStaticValue(key, 0);
      if (sharedAnimationValues) {
        sharedAnimationValues[key] = 0;
      }
    }
  }
  function cancelTreeOptimisedTransformAnimations(projectionNode) {
    projectionNode.hasCheckedOptimisedAppear = true;
    if (projectionNode.root === projectionNode)
      return;
    const { visualElement } = projectionNode.options;
    if (!visualElement)
      return;
    const appearId = getOptimisedAppearId(visualElement);
    if (window.MotionHasOptimisedAnimation(appearId, "transform")) {
      const { layout: layout2, layoutId } = projectionNode.options;
      window.MotionCancelOptimisedAnimation(appearId, "transform", frame, !(layout2 || layoutId));
    }
    const { parent } = projectionNode;
    if (parent && !parent.hasCheckedOptimisedAppear) {
      cancelTreeOptimisedTransformAnimations(parent);
    }
  }
  function createProjectionNode({ attachResizeListener, defaultParent, measureScroll, checkIsScrollRoot, resetTransform }) {
    return class ProjectionNode {
      constructor(latestValues = {}, parent = defaultParent === null || defaultParent === void 0 ? void 0 : defaultParent()) {
        this.id = id2++;
        this.animationId = 0;
        this.children = /* @__PURE__ */ new Set();
        this.options = {};
        this.isTreeAnimating = false;
        this.isAnimationBlocked = false;
        this.isLayoutDirty = false;
        this.isProjectionDirty = false;
        this.isSharedProjectionDirty = false;
        this.isTransformDirty = false;
        this.updateManuallyBlocked = false;
        this.updateBlockedByResize = false;
        this.isUpdating = false;
        this.isSVG = false;
        this.needsReset = false;
        this.shouldResetTransform = false;
        this.hasCheckedOptimisedAppear = false;
        this.treeScale = { x: 1, y: 1 };
        this.eventHandlers = /* @__PURE__ */ new Map();
        this.hasTreeAnimated = false;
        this.updateScheduled = false;
        this.scheduleUpdate = () => this.update();
        this.projectionUpdateScheduled = false;
        this.checkUpdateFailed = () => {
          if (this.isUpdating) {
            this.isUpdating = false;
            this.clearAllSnapshots();
          }
        };
        this.updateProjection = () => {
          this.projectionUpdateScheduled = false;
          if (isDebug) {
            metrics.totalNodes = metrics.resolvedTargetDeltas = metrics.recalculatedProjection = 0;
          }
          this.nodes.forEach(propagateDirtyNodes);
          this.nodes.forEach(resolveTargetDelta);
          this.nodes.forEach(calcProjection);
          this.nodes.forEach(cleanDirtyNodes);
          if (isDebug) {
            window.MotionDebug.record(metrics);
          }
        };
        this.resolvedRelativeTargetAt = 0;
        this.hasProjected = false;
        this.isVisible = true;
        this.animationProgress = 0;
        this.sharedNodes = /* @__PURE__ */ new Map();
        this.latestValues = latestValues;
        this.root = parent ? parent.root || parent : this;
        this.path = parent ? [...parent.path, parent] : [];
        this.parent = parent;
        this.depth = parent ? parent.depth + 1 : 0;
        for (let i3 = 0; i3 < this.path.length; i3++) {
          this.path[i3].shouldResetTransform = true;
        }
        if (this.root === this)
          this.nodes = new FlatTree();
      }
      addEventListener(name, handler) {
        if (!this.eventHandlers.has(name)) {
          this.eventHandlers.set(name, new SubscriptionManager());
        }
        return this.eventHandlers.get(name).add(handler);
      }
      notifyListeners(name, ...args) {
        const subscriptionManager = this.eventHandlers.get(name);
        subscriptionManager && subscriptionManager.notify(...args);
      }
      hasListeners(name) {
        return this.eventHandlers.has(name);
      }
      /**
       * Lifecycles
       */
      mount(instance, isLayoutDirty = this.root.hasTreeAnimated) {
        if (this.instance)
          return;
        this.isSVG = isSVGElement(instance);
        this.instance = instance;
        const { layoutId, layout: layout2, visualElement } = this.options;
        if (visualElement && !visualElement.current) {
          visualElement.mount(instance);
        }
        this.root.nodes.add(this);
        this.parent && this.parent.children.add(this);
        if (isLayoutDirty && (layout2 || layoutId)) {
          this.isLayoutDirty = true;
        }
        if (attachResizeListener) {
          let cancelDelay;
          const resizeUnblockUpdate = () => this.root.updateBlockedByResize = false;
          attachResizeListener(instance, () => {
            this.root.updateBlockedByResize = true;
            cancelDelay && cancelDelay();
            cancelDelay = delay(resizeUnblockUpdate, 250);
            if (globalProjectionState.hasAnimatedSinceResize) {
              globalProjectionState.hasAnimatedSinceResize = false;
              this.nodes.forEach(finishAnimation);
            }
          });
        }
        if (layoutId) {
          this.root.registerSharedNode(layoutId, this);
        }
        if (this.options.animate !== false && visualElement && (layoutId || layout2)) {
          this.addEventListener("didUpdate", ({ delta, hasLayoutChanged, hasRelativeTargetChanged, layout: newLayout }) => {
            if (this.isTreeAnimationBlocked()) {
              this.target = void 0;
              this.relativeTarget = void 0;
              return;
            }
            const layoutTransition = this.options.transition || visualElement.getDefaultTransition() || defaultLayoutTransition;
            const { onLayoutAnimationStart, onLayoutAnimationComplete } = visualElement.getProps();
            const targetChanged = !this.targetLayout || !boxEqualsRounded(this.targetLayout, newLayout) || hasRelativeTargetChanged;
            const hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeTargetChanged;
            if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance || hasOnlyRelativeTargetChanged || hasLayoutChanged && (targetChanged || !this.currentAnimation)) {
              if (this.resumeFrom) {
                this.resumingFrom = this.resumeFrom;
                this.resumingFrom.resumingFrom = void 0;
              }
              this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
              const animationOptions = {
                ...getValueTransition(layoutTransition, "layout"),
                onPlay: onLayoutAnimationStart,
                onComplete: onLayoutAnimationComplete
              };
              if (visualElement.shouldReduceMotion || this.options.layoutRoot) {
                animationOptions.delay = 0;
                animationOptions.type = false;
              }
              this.startAnimation(animationOptions);
            } else {
              if (!hasLayoutChanged) {
                finishAnimation(this);
              }
              if (this.isLead() && this.options.onExitComplete) {
                this.options.onExitComplete();
              }
            }
            this.targetLayout = newLayout;
          });
        }
      }
      unmount() {
        this.options.layoutId && this.willUpdate();
        this.root.nodes.remove(this);
        const stack = this.getStack();
        stack && stack.remove(this);
        this.parent && this.parent.children.delete(this);
        this.instance = void 0;
        cancelFrame(this.updateProjection);
      }
      // only on the root
      blockUpdate() {
        this.updateManuallyBlocked = true;
      }
      unblockUpdate() {
        this.updateManuallyBlocked = false;
      }
      isUpdateBlocked() {
        return this.updateManuallyBlocked || this.updateBlockedByResize;
      }
      isTreeAnimationBlocked() {
        return this.isAnimationBlocked || this.parent && this.parent.isTreeAnimationBlocked() || false;
      }
      // Note: currently only running on root node
      startUpdate() {
        if (this.isUpdateBlocked())
          return;
        this.isUpdating = true;
        this.nodes && this.nodes.forEach(resetSkewAndRotation);
        this.animationId++;
      }
      getTransformTemplate() {
        const { visualElement } = this.options;
        return visualElement && visualElement.getProps().transformTemplate;
      }
      willUpdate(shouldNotifyListeners = true) {
        this.root.hasTreeAnimated = true;
        if (this.root.isUpdateBlocked()) {
          this.options.onExitComplete && this.options.onExitComplete();
          return;
        }
        if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear) {
          cancelTreeOptimisedTransformAnimations(this);
        }
        !this.root.isUpdating && this.root.startUpdate();
        if (this.isLayoutDirty)
          return;
        this.isLayoutDirty = true;
        for (let i3 = 0; i3 < this.path.length; i3++) {
          const node2 = this.path[i3];
          node2.shouldResetTransform = true;
          node2.updateScroll("snapshot");
          if (node2.options.layoutRoot) {
            node2.willUpdate(false);
          }
        }
        const { layoutId, layout: layout2 } = this.options;
        if (layoutId === void 0 && !layout2)
          return;
        const transformTemplate = this.getTransformTemplate();
        this.prevTransformTemplateValue = transformTemplate ? transformTemplate(this.latestValues, "") : void 0;
        this.updateSnapshot();
        shouldNotifyListeners && this.notifyListeners("willUpdate");
      }
      update() {
        this.updateScheduled = false;
        const updateWasBlocked = this.isUpdateBlocked();
        if (updateWasBlocked) {
          this.unblockUpdate();
          this.clearAllSnapshots();
          this.nodes.forEach(clearMeasurements);
          return;
        }
        if (!this.isUpdating) {
          this.nodes.forEach(clearIsLayoutDirty);
        }
        this.isUpdating = false;
        this.nodes.forEach(resetTransformStyle);
        this.nodes.forEach(updateLayout);
        this.nodes.forEach(notifyLayoutUpdate);
        this.clearAllSnapshots();
        const now2 = time.now();
        frameData.delta = clamp2(0, 1e3 / 60, now2 - frameData.timestamp);
        frameData.timestamp = now2;
        frameData.isProcessing = true;
        frameSteps.update.process(frameData);
        frameSteps.preRender.process(frameData);
        frameSteps.render.process(frameData);
        frameData.isProcessing = false;
      }
      didUpdate() {
        if (!this.updateScheduled) {
          this.updateScheduled = true;
          microtask.read(this.scheduleUpdate);
        }
      }
      clearAllSnapshots() {
        this.nodes.forEach(clearSnapshot);
        this.sharedNodes.forEach(removeLeadSnapshots);
      }
      scheduleUpdateProjection() {
        if (!this.projectionUpdateScheduled) {
          this.projectionUpdateScheduled = true;
          frame.preRender(this.updateProjection, false, true);
        }
      }
      scheduleCheckAfterUnmount() {
        frame.postRender(() => {
          if (this.isLayoutDirty) {
            this.root.didUpdate();
          } else {
            this.root.checkUpdateFailed();
          }
        });
      }
      /**
       * Update measurements
       */
      updateSnapshot() {
        if (this.snapshot || !this.instance)
          return;
        this.snapshot = this.measure();
      }
      updateLayout() {
        if (!this.instance)
          return;
        this.updateScroll();
        if (!(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty) {
          return;
        }
        if (this.resumeFrom && !this.resumeFrom.instance) {
          for (let i3 = 0; i3 < this.path.length; i3++) {
            const node2 = this.path[i3];
            node2.updateScroll();
          }
        }
        const prevLayout = this.layout;
        this.layout = this.measure(false);
        this.layoutCorrected = createBox();
        this.isLayoutDirty = false;
        this.projectionDelta = void 0;
        this.notifyListeners("measure", this.layout.layoutBox);
        const { visualElement } = this.options;
        visualElement && visualElement.notify("LayoutMeasure", this.layout.layoutBox, prevLayout ? prevLayout.layoutBox : void 0);
      }
      updateScroll(phase = "measure") {
        let needsMeasurement = Boolean(this.options.layoutScroll && this.instance);
        if (this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase === phase) {
          needsMeasurement = false;
        }
        if (needsMeasurement) {
          const isRoot = checkIsScrollRoot(this.instance);
          this.scroll = {
            animationId: this.root.animationId,
            phase,
            isRoot,
            offset: measureScroll(this.instance),
            wasRoot: this.scroll ? this.scroll.isRoot : isRoot
          };
        }
      }
      resetTransform() {
        if (!resetTransform)
          return;
        const isResetRequested = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout;
        const hasProjection = this.projectionDelta && !isDeltaZero(this.projectionDelta);
        const transformTemplate = this.getTransformTemplate();
        const transformTemplateValue = transformTemplate ? transformTemplate(this.latestValues, "") : void 0;
        const transformTemplateHasChanged = transformTemplateValue !== this.prevTransformTemplateValue;
        if (isResetRequested && (hasProjection || hasTransform(this.latestValues) || transformTemplateHasChanged)) {
          resetTransform(this.instance, transformTemplateValue);
          this.shouldResetTransform = false;
          this.scheduleRender();
        }
      }
      measure(removeTransform = true) {
        const pageBox = this.measurePageBox();
        let layoutBox = this.removeElementScroll(pageBox);
        if (removeTransform) {
          layoutBox = this.removeTransform(layoutBox);
        }
        roundBox(layoutBox);
        return {
          animationId: this.root.animationId,
          measuredBox: pageBox,
          layoutBox,
          latestValues: {},
          source: this.id
        };
      }
      measurePageBox() {
        var _a;
        const { visualElement } = this.options;
        if (!visualElement)
          return createBox();
        const box = visualElement.measureViewportBox();
        const wasInScrollRoot = ((_a = this.scroll) === null || _a === void 0 ? void 0 : _a.wasRoot) || this.path.some(checkNodeWasScrollRoot);
        if (!wasInScrollRoot) {
          const { scroll } = this.root;
          if (scroll) {
            translateAxis(box.x, scroll.offset.x);
            translateAxis(box.y, scroll.offset.y);
          }
        }
        return box;
      }
      removeElementScroll(box) {
        var _a;
        const boxWithoutScroll = createBox();
        copyBoxInto(boxWithoutScroll, box);
        if ((_a = this.scroll) === null || _a === void 0 ? void 0 : _a.wasRoot) {
          return boxWithoutScroll;
        }
        for (let i3 = 0; i3 < this.path.length; i3++) {
          const node2 = this.path[i3];
          const { scroll, options: options2 } = node2;
          if (node2 !== this.root && scroll && options2.layoutScroll) {
            if (scroll.wasRoot) {
              copyBoxInto(boxWithoutScroll, box);
            }
            translateAxis(boxWithoutScroll.x, scroll.offset.x);
            translateAxis(boxWithoutScroll.y, scroll.offset.y);
          }
        }
        return boxWithoutScroll;
      }
      applyTransform(box, transformOnly = false) {
        const withTransforms = createBox();
        copyBoxInto(withTransforms, box);
        for (let i3 = 0; i3 < this.path.length; i3++) {
          const node2 = this.path[i3];
          if (!transformOnly && node2.options.layoutScroll && node2.scroll && node2 !== node2.root) {
            transformBox(withTransforms, {
              x: -node2.scroll.offset.x,
              y: -node2.scroll.offset.y
            });
          }
          if (!hasTransform(node2.latestValues))
            continue;
          transformBox(withTransforms, node2.latestValues);
        }
        if (hasTransform(this.latestValues)) {
          transformBox(withTransforms, this.latestValues);
        }
        return withTransforms;
      }
      removeTransform(box) {
        const boxWithoutTransform = createBox();
        copyBoxInto(boxWithoutTransform, box);
        for (let i3 = 0; i3 < this.path.length; i3++) {
          const node2 = this.path[i3];
          if (!node2.instance)
            continue;
          if (!hasTransform(node2.latestValues))
            continue;
          hasScale(node2.latestValues) && node2.updateSnapshot();
          const sourceBox = createBox();
          const nodeBox = node2.measurePageBox();
          copyBoxInto(sourceBox, nodeBox);
          removeBoxTransforms(boxWithoutTransform, node2.latestValues, node2.snapshot ? node2.snapshot.layoutBox : void 0, sourceBox);
        }
        if (hasTransform(this.latestValues)) {
          removeBoxTransforms(boxWithoutTransform, this.latestValues);
        }
        return boxWithoutTransform;
      }
      setTargetDelta(delta) {
        this.targetDelta = delta;
        this.root.scheduleUpdateProjection();
        this.isProjectionDirty = true;
      }
      setOptions(options2) {
        this.options = {
          ...this.options,
          ...options2,
          crossfade: options2.crossfade !== void 0 ? options2.crossfade : true
        };
      }
      clearMeasurements() {
        this.scroll = void 0;
        this.layout = void 0;
        this.snapshot = void 0;
        this.prevTransformTemplateValue = void 0;
        this.targetDelta = void 0;
        this.target = void 0;
        this.isLayoutDirty = false;
      }
      forceRelativeParentToResolveTarget() {
        if (!this.relativeParent)
          return;
        if (this.relativeParent.resolvedRelativeTargetAt !== frameData.timestamp) {
          this.relativeParent.resolveTargetDelta(true);
        }
      }
      resolveTargetDelta(forceRecalculation = false) {
        var _a;
        const lead = this.getLead();
        this.isProjectionDirty || (this.isProjectionDirty = lead.isProjectionDirty);
        this.isTransformDirty || (this.isTransformDirty = lead.isTransformDirty);
        this.isSharedProjectionDirty || (this.isSharedProjectionDirty = lead.isSharedProjectionDirty);
        const isShared = Boolean(this.resumingFrom) || this !== lead;
        const canSkip = !(forceRecalculation || isShared && this.isSharedProjectionDirty || this.isProjectionDirty || ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isProjectionDirty) || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize);
        if (canSkip)
          return;
        const { layout: layout2, layoutId } = this.options;
        if (!this.layout || !(layout2 || layoutId))
          return;
        this.resolvedRelativeTargetAt = frameData.timestamp;
        if (!this.targetDelta && !this.relativeTarget) {
          const relativeParent = this.getClosestProjectingParent();
          if (relativeParent && relativeParent.layout && this.animationProgress !== 1) {
            this.relativeParent = relativeParent;
            this.forceRelativeParentToResolveTarget();
            this.relativeTarget = createBox();
            this.relativeTargetOrigin = createBox();
            calcRelativePosition(this.relativeTargetOrigin, this.layout.layoutBox, relativeParent.layout.layoutBox);
            copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);
          } else {
            this.relativeParent = this.relativeTarget = void 0;
          }
        }
        if (!this.relativeTarget && !this.targetDelta)
          return;
        if (!this.target) {
          this.target = createBox();
          this.targetWithTransforms = createBox();
        }
        if (this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target) {
          this.forceRelativeParentToResolveTarget();
          calcRelativeBox(this.target, this.relativeTarget, this.relativeParent.target);
        } else if (this.targetDelta) {
          if (Boolean(this.resumingFrom)) {
            this.target = this.applyTransform(this.layout.layoutBox);
          } else {
            copyBoxInto(this.target, this.layout.layoutBox);
          }
          applyBoxDelta(this.target, this.targetDelta);
        } else {
          copyBoxInto(this.target, this.layout.layoutBox);
        }
        if (this.attemptToResolveRelativeTarget) {
          this.attemptToResolveRelativeTarget = false;
          const relativeParent = this.getClosestProjectingParent();
          if (relativeParent && Boolean(relativeParent.resumingFrom) === Boolean(this.resumingFrom) && !relativeParent.options.layoutScroll && relativeParent.target && this.animationProgress !== 1) {
            this.relativeParent = relativeParent;
            this.forceRelativeParentToResolveTarget();
            this.relativeTarget = createBox();
            this.relativeTargetOrigin = createBox();
            calcRelativePosition(this.relativeTargetOrigin, this.target, relativeParent.target);
            copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);
          } else {
            this.relativeParent = this.relativeTarget = void 0;
          }
        }
        if (isDebug) {
          metrics.resolvedTargetDeltas++;
        }
      }
      getClosestProjectingParent() {
        if (!this.parent || hasScale(this.parent.latestValues) || has2DTranslate(this.parent.latestValues)) {
          return void 0;
        }
        if (this.parent.isProjecting()) {
          return this.parent;
        } else {
          return this.parent.getClosestProjectingParent();
        }
      }
      isProjecting() {
        return Boolean((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
      }
      calcProjection() {
        var _a;
        const lead = this.getLead();
        const isShared = Boolean(this.resumingFrom) || this !== lead;
        let canSkip = true;
        if (this.isProjectionDirty || ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isProjectionDirty)) {
          canSkip = false;
        }
        if (isShared && (this.isSharedProjectionDirty || this.isTransformDirty)) {
          canSkip = false;
        }
        if (this.resolvedRelativeTargetAt === frameData.timestamp) {
          canSkip = false;
        }
        if (canSkip)
          return;
        const { layout: layout2, layoutId } = this.options;
        this.isTreeAnimating = Boolean(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation);
        if (!this.isTreeAnimating) {
          this.targetDelta = this.relativeTarget = void 0;
        }
        if (!this.layout || !(layout2 || layoutId))
          return;
        copyBoxInto(this.layoutCorrected, this.layout.layoutBox);
        const prevTreeScaleX = this.treeScale.x;
        const prevTreeScaleY = this.treeScale.y;
        applyTreeDeltas(this.layoutCorrected, this.treeScale, this.path, isShared);
        if (lead.layout && !lead.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1)) {
          lead.target = lead.layout.layoutBox;
          lead.targetWithTransforms = createBox();
        }
        const { target } = lead;
        if (!target) {
          if (this.prevProjectionDelta) {
            this.createProjectionDeltas();
            this.scheduleRender();
          }
          return;
        }
        if (!this.projectionDelta || !this.prevProjectionDelta) {
          this.createProjectionDeltas();
        } else {
          copyAxisDeltaInto(this.prevProjectionDelta.x, this.projectionDelta.x);
          copyAxisDeltaInto(this.prevProjectionDelta.y, this.projectionDelta.y);
        }
        calcBoxDelta(this.projectionDelta, this.layoutCorrected, target, this.latestValues);
        if (this.treeScale.x !== prevTreeScaleX || this.treeScale.y !== prevTreeScaleY || !axisDeltaEquals(this.projectionDelta.x, this.prevProjectionDelta.x) || !axisDeltaEquals(this.projectionDelta.y, this.prevProjectionDelta.y)) {
          this.hasProjected = true;
          this.scheduleRender();
          this.notifyListeners("projectionUpdate", target);
        }
        if (isDebug) {
          metrics.recalculatedProjection++;
        }
      }
      hide() {
        this.isVisible = false;
      }
      show() {
        this.isVisible = true;
      }
      scheduleRender(notifyAll = true) {
        var _a;
        (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.scheduleRender();
        if (notifyAll) {
          const stack = this.getStack();
          stack && stack.scheduleRender();
        }
        if (this.resumingFrom && !this.resumingFrom.instance) {
          this.resumingFrom = void 0;
        }
      }
      createProjectionDeltas() {
        this.prevProjectionDelta = createDelta();
        this.projectionDelta = createDelta();
        this.projectionDeltaWithTransform = createDelta();
      }
      setAnimationOrigin(delta, hasOnlyRelativeTargetChanged = false) {
        const snapshot = this.snapshot;
        const snapshotLatestValues = snapshot ? snapshot.latestValues : {};
        const mixedValues = { ...this.latestValues };
        const targetDelta = createDelta();
        if (!this.relativeParent || !this.relativeParent.options.layoutRoot) {
          this.relativeTarget = this.relativeTargetOrigin = void 0;
        }
        this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged;
        const relativeLayout = createBox();
        const snapshotSource = snapshot ? snapshot.source : void 0;
        const layoutSource = this.layout ? this.layout.source : void 0;
        const isSharedLayoutAnimation = snapshotSource !== layoutSource;
        const stack = this.getStack();
        const isOnlyMember = !stack || stack.members.length <= 1;
        const shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation && !isOnlyMember && this.options.crossfade === true && !this.path.some(hasOpacityCrossfade));
        this.animationProgress = 0;
        let prevRelativeTarget;
        this.mixTargetDelta = (latest) => {
          const progress2 = latest / 1e3;
          mixAxisDelta(targetDelta.x, delta.x, progress2);
          mixAxisDelta(targetDelta.y, delta.y, progress2);
          this.setTargetDelta(targetDelta);
          if (this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout) {
            calcRelativePosition(relativeLayout, this.layout.layoutBox, this.relativeParent.layout.layoutBox);
            mixBox(this.relativeTarget, this.relativeTargetOrigin, relativeLayout, progress2);
            if (prevRelativeTarget && boxEquals(this.relativeTarget, prevRelativeTarget)) {
              this.isProjectionDirty = false;
            }
            if (!prevRelativeTarget)
              prevRelativeTarget = createBox();
            copyBoxInto(prevRelativeTarget, this.relativeTarget);
          }
          if (isSharedLayoutAnimation) {
            this.animationValues = mixedValues;
            mixValues(mixedValues, snapshotLatestValues, this.latestValues, progress2, shouldCrossfadeOpacity, isOnlyMember);
          }
          this.root.scheduleUpdateProjection();
          this.scheduleRender();
          this.animationProgress = progress2;
        };
        this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
      }
      startAnimation(options2) {
        this.notifyListeners("animationStart");
        this.currentAnimation && this.currentAnimation.stop();
        if (this.resumingFrom && this.resumingFrom.currentAnimation) {
          this.resumingFrom.currentAnimation.stop();
        }
        if (this.pendingAnimation) {
          cancelFrame(this.pendingAnimation);
          this.pendingAnimation = void 0;
        }
        this.pendingAnimation = frame.update(() => {
          globalProjectionState.hasAnimatedSinceResize = true;
          this.currentAnimation = animateSingleValue(0, animationTarget, {
            ...options2,
            onUpdate: (latest) => {
              this.mixTargetDelta(latest);
              options2.onUpdate && options2.onUpdate(latest);
            },
            onComplete: () => {
              options2.onComplete && options2.onComplete();
              this.completeAnimation();
            }
          });
          if (this.resumingFrom) {
            this.resumingFrom.currentAnimation = this.currentAnimation;
          }
          this.pendingAnimation = void 0;
        });
      }
      completeAnimation() {
        if (this.resumingFrom) {
          this.resumingFrom.currentAnimation = void 0;
          this.resumingFrom.preserveOpacity = void 0;
        }
        const stack = this.getStack();
        stack && stack.exitAnimationComplete();
        this.resumingFrom = this.currentAnimation = this.animationValues = void 0;
        this.notifyListeners("animationComplete");
      }
      finishAnimation() {
        if (this.currentAnimation) {
          this.mixTargetDelta && this.mixTargetDelta(animationTarget);
          this.currentAnimation.stop();
        }
        this.completeAnimation();
      }
      applyTransformsToTarget() {
        const lead = this.getLead();
        let { targetWithTransforms, target, layout: layout2, latestValues } = lead;
        if (!targetWithTransforms || !target || !layout2)
          return;
        if (this !== lead && this.layout && layout2 && shouldAnimatePositionOnly(this.options.animationType, this.layout.layoutBox, layout2.layoutBox)) {
          target = this.target || createBox();
          const xLength = calcLength(this.layout.layoutBox.x);
          target.x.min = lead.target.x.min;
          target.x.max = target.x.min + xLength;
          const yLength = calcLength(this.layout.layoutBox.y);
          target.y.min = lead.target.y.min;
          target.y.max = target.y.min + yLength;
        }
        copyBoxInto(targetWithTransforms, target);
        transformBox(targetWithTransforms, latestValues);
        calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues);
      }
      registerSharedNode(layoutId, node2) {
        if (!this.sharedNodes.has(layoutId)) {
          this.sharedNodes.set(layoutId, new NodeStack());
        }
        const stack = this.sharedNodes.get(layoutId);
        stack.add(node2);
        const config = node2.options.initialPromotionConfig;
        node2.promote({
          transition: config ? config.transition : void 0,
          preserveFollowOpacity: config && config.shouldPreserveFollowOpacity ? config.shouldPreserveFollowOpacity(node2) : void 0
        });
      }
      isLead() {
        const stack = this.getStack();
        return stack ? stack.lead === this : true;
      }
      getLead() {
        var _a;
        const { layoutId } = this.options;
        return layoutId ? ((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.lead) || this : this;
      }
      getPrevLead() {
        var _a;
        const { layoutId } = this.options;
        return layoutId ? (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.prevLead : void 0;
      }
      getStack() {
        const { layoutId } = this.options;
        if (layoutId)
          return this.root.sharedNodes.get(layoutId);
      }
      promote({ needsReset, transition, preserveFollowOpacity } = {}) {
        const stack = this.getStack();
        if (stack)
          stack.promote(this, preserveFollowOpacity);
        if (needsReset) {
          this.projectionDelta = void 0;
          this.needsReset = true;
        }
        if (transition)
          this.setOptions({ transition });
      }
      relegate() {
        const stack = this.getStack();
        if (stack) {
          return stack.relegate(this);
        } else {
          return false;
        }
      }
      resetSkewAndRotation() {
        const { visualElement } = this.options;
        if (!visualElement)
          return;
        let hasDistortingTransform = false;
        const { latestValues } = visualElement;
        if (latestValues.z || latestValues.rotate || latestValues.rotateX || latestValues.rotateY || latestValues.rotateZ || latestValues.skewX || latestValues.skewY) {
          hasDistortingTransform = true;
        }
        if (!hasDistortingTransform)
          return;
        const resetValues = {};
        if (latestValues.z) {
          resetDistortingTransform("z", visualElement, resetValues, this.animationValues);
        }
        for (let i3 = 0; i3 < transformAxes.length; i3++) {
          resetDistortingTransform(`rotate${transformAxes[i3]}`, visualElement, resetValues, this.animationValues);
          resetDistortingTransform(`skew${transformAxes[i3]}`, visualElement, resetValues, this.animationValues);
        }
        visualElement.render();
        for (const key in resetValues) {
          visualElement.setStaticValue(key, resetValues[key]);
          if (this.animationValues) {
            this.animationValues[key] = resetValues[key];
          }
        }
        visualElement.scheduleRender();
      }
      getProjectionStyles(styleProp) {
        var _a, _b;
        if (!this.instance || this.isSVG)
          return void 0;
        if (!this.isVisible) {
          return hiddenVisibility;
        }
        const styles3 = {
          visibility: ""
        };
        const transformTemplate = this.getTransformTemplate();
        if (this.needsReset) {
          this.needsReset = false;
          styles3.opacity = "";
          styles3.pointerEvents = resolveMotionValue(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || "";
          styles3.transform = transformTemplate ? transformTemplate(this.latestValues, "") : "none";
          return styles3;
        }
        const lead = this.getLead();
        if (!this.projectionDelta || !this.layout || !lead.target) {
          const emptyStyles = {};
          if (this.options.layoutId) {
            emptyStyles.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1;
            emptyStyles.pointerEvents = resolveMotionValue(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || "";
          }
          if (this.hasProjected && !hasTransform(this.latestValues)) {
            emptyStyles.transform = transformTemplate ? transformTemplate({}, "") : "none";
            this.hasProjected = false;
          }
          return emptyStyles;
        }
        const valuesToRender = lead.animationValues || lead.latestValues;
        this.applyTransformsToTarget();
        styles3.transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender);
        if (transformTemplate) {
          styles3.transform = transformTemplate(valuesToRender, styles3.transform);
        }
        const { x: x2, y: y3 } = this.projectionDelta;
        styles3.transformOrigin = `${x2.origin * 100}% ${y3.origin * 100}% 0`;
        if (lead.animationValues) {
          styles3.opacity = lead === this ? (_b = (_a = valuesToRender.opacity) !== null && _a !== void 0 ? _a : this.latestValues.opacity) !== null && _b !== void 0 ? _b : 1 : this.preserveOpacity ? this.latestValues.opacity : valuesToRender.opacityExit;
        } else {
          styles3.opacity = lead === this ? valuesToRender.opacity !== void 0 ? valuesToRender.opacity : "" : valuesToRender.opacityExit !== void 0 ? valuesToRender.opacityExit : 0;
        }
        for (const key in scaleCorrectors) {
          if (valuesToRender[key] === void 0)
            continue;
          const { correct, applyTo } = scaleCorrectors[key];
          const corrected = styles3.transform === "none" ? valuesToRender[key] : correct(valuesToRender[key], lead);
          if (applyTo) {
            const num = applyTo.length;
            for (let i3 = 0; i3 < num; i3++) {
              styles3[applyTo[i3]] = corrected;
            }
          } else {
            styles3[key] = corrected;
          }
        }
        if (this.options.layoutId) {
          styles3.pointerEvents = lead === this ? resolveMotionValue(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || "" : "none";
        }
        return styles3;
      }
      clearSnapshot() {
        this.resumeFrom = this.snapshot = void 0;
      }
      // Only run on root
      resetTree() {
        this.root.nodes.forEach((node2) => {
          var _a;
          return (_a = node2.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop();
        });
        this.root.nodes.forEach(clearMeasurements);
        this.root.sharedNodes.clear();
      }
    };
  }
  function updateLayout(node2) {
    node2.updateLayout();
  }
  function notifyLayoutUpdate(node2) {
    var _a;
    const snapshot = ((_a = node2.resumeFrom) === null || _a === void 0 ? void 0 : _a.snapshot) || node2.snapshot;
    if (node2.isLead() && node2.layout && snapshot && node2.hasListeners("didUpdate")) {
      const { layoutBox: layout2, measuredBox: measuredLayout } = node2.layout;
      const { animationType } = node2.options;
      const isShared = snapshot.source !== node2.layout.source;
      if (animationType === "size") {
        eachAxis((axis) => {
          const axisSnapshot = isShared ? snapshot.measuredBox[axis] : snapshot.layoutBox[axis];
          const length2 = calcLength(axisSnapshot);
          axisSnapshot.min = layout2[axis].min;
          axisSnapshot.max = axisSnapshot.min + length2;
        });
      } else if (shouldAnimatePositionOnly(animationType, snapshot.layoutBox, layout2)) {
        eachAxis((axis) => {
          const axisSnapshot = isShared ? snapshot.measuredBox[axis] : snapshot.layoutBox[axis];
          const length2 = calcLength(layout2[axis]);
          axisSnapshot.max = axisSnapshot.min + length2;
          if (node2.relativeTarget && !node2.currentAnimation) {
            node2.isProjectionDirty = true;
            node2.relativeTarget[axis].max = node2.relativeTarget[axis].min + length2;
          }
        });
      }
      const layoutDelta = createDelta();
      calcBoxDelta(layoutDelta, layout2, snapshot.layoutBox);
      const visualDelta = createDelta();
      if (isShared) {
        calcBoxDelta(visualDelta, node2.applyTransform(measuredLayout, true), snapshot.measuredBox);
      } else {
        calcBoxDelta(visualDelta, layout2, snapshot.layoutBox);
      }
      const hasLayoutChanged = !isDeltaZero(layoutDelta);
      let hasRelativeTargetChanged = false;
      if (!node2.resumeFrom) {
        const relativeParent = node2.getClosestProjectingParent();
        if (relativeParent && !relativeParent.resumeFrom) {
          const { snapshot: parentSnapshot, layout: parentLayout } = relativeParent;
          if (parentSnapshot && parentLayout) {
            const relativeSnapshot = createBox();
            calcRelativePosition(relativeSnapshot, snapshot.layoutBox, parentSnapshot.layoutBox);
            const relativeLayout = createBox();
            calcRelativePosition(relativeLayout, layout2, parentLayout.layoutBox);
            if (!boxEqualsRounded(relativeSnapshot, relativeLayout)) {
              hasRelativeTargetChanged = true;
            }
            if (relativeParent.options.layoutRoot) {
              node2.relativeTarget = relativeLayout;
              node2.relativeTargetOrigin = relativeSnapshot;
              node2.relativeParent = relativeParent;
            }
          }
        }
      }
      node2.notifyListeners("didUpdate", {
        layout: layout2,
        snapshot,
        delta: visualDelta,
        layoutDelta,
        hasLayoutChanged,
        hasRelativeTargetChanged
      });
    } else if (node2.isLead()) {
      const { onExitComplete } = node2.options;
      onExitComplete && onExitComplete();
    }
    node2.options.transition = void 0;
  }
  function propagateDirtyNodes(node2) {
    if (isDebug) {
      metrics.totalNodes++;
    }
    if (!node2.parent)
      return;
    if (!node2.isProjecting()) {
      node2.isProjectionDirty = node2.parent.isProjectionDirty;
    }
    node2.isSharedProjectionDirty || (node2.isSharedProjectionDirty = Boolean(node2.isProjectionDirty || node2.parent.isProjectionDirty || node2.parent.isSharedProjectionDirty));
    node2.isTransformDirty || (node2.isTransformDirty = node2.parent.isTransformDirty);
  }
  function cleanDirtyNodes(node2) {
    node2.isProjectionDirty = node2.isSharedProjectionDirty = node2.isTransformDirty = false;
  }
  function clearSnapshot(node2) {
    node2.clearSnapshot();
  }
  function clearMeasurements(node2) {
    node2.clearMeasurements();
  }
  function clearIsLayoutDirty(node2) {
    node2.isLayoutDirty = false;
  }
  function resetTransformStyle(node2) {
    const { visualElement } = node2.options;
    if (visualElement && visualElement.getProps().onBeforeLayoutMeasure) {
      visualElement.notify("BeforeLayoutMeasure");
    }
    node2.resetTransform();
  }
  function finishAnimation(node2) {
    node2.finishAnimation();
    node2.targetDelta = node2.relativeTarget = node2.target = void 0;
    node2.isProjectionDirty = true;
  }
  function resolveTargetDelta(node2) {
    node2.resolveTargetDelta();
  }
  function calcProjection(node2) {
    node2.calcProjection();
  }
  function resetSkewAndRotation(node2) {
    node2.resetSkewAndRotation();
  }
  function removeLeadSnapshots(stack) {
    stack.removeLeadSnapshot();
  }
  function mixAxisDelta(output, delta, p3) {
    output.translate = mixNumber(delta.translate, 0, p3);
    output.scale = mixNumber(delta.scale, 1, p3);
    output.origin = delta.origin;
    output.originPoint = delta.originPoint;
  }
  function mixAxis(output, from2, to, p3) {
    output.min = mixNumber(from2.min, to.min, p3);
    output.max = mixNumber(from2.max, to.max, p3);
  }
  function mixBox(output, from2, to, p3) {
    mixAxis(output.x, from2.x, to.x, p3);
    mixAxis(output.y, from2.y, to.y, p3);
  }
  function hasOpacityCrossfade(node2) {
    return node2.animationValues && node2.animationValues.opacityExit !== void 0;
  }
  var defaultLayoutTransition = {
    duration: 0.45,
    ease: [0.4, 0, 0.1, 1]
  };
  var userAgentContains = (string) => typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(string);
  var roundPoint = userAgentContains("applewebkit/") && !userAgentContains("chrome/") ? Math.round : noop2;
  function roundAxis(axis) {
    axis.min = roundPoint(axis.min);
    axis.max = roundPoint(axis.max);
  }
  function roundBox(box) {
    roundAxis(box.x);
    roundAxis(box.y);
  }
  function shouldAnimatePositionOnly(animationType, snapshot, layout2) {
    return animationType === "position" || animationType === "preserve-aspect" && !isNear(aspectRatio(snapshot), aspectRatio(layout2), 0.2);
  }
  function checkNodeWasScrollRoot(node2) {
    var _a;
    return node2 !== node2.root && ((_a = node2.scroll) === null || _a === void 0 ? void 0 : _a.wasRoot);
  }

  // packages/components/node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs
  var DocumentProjectionNode = createProjectionNode({
    attachResizeListener: (ref, notify) => addDomEvent(ref, "resize", notify),
    measureScroll: () => ({
      x: document.documentElement.scrollLeft || document.body.scrollLeft,
      y: document.documentElement.scrollTop || document.body.scrollTop
    }),
    checkIsScrollRoot: () => true
  });

  // packages/components/node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs
  var rootProjectionNode = {
    current: void 0
  };
  var HTMLProjectionNode = createProjectionNode({
    measureScroll: (instance) => ({
      x: instance.scrollLeft,
      y: instance.scrollTop
    }),
    defaultParent: () => {
      if (!rootProjectionNode.current) {
        const documentNode = new DocumentProjectionNode({});
        documentNode.mount(window);
        documentNode.setOptions({ layoutScroll: true });
        rootProjectionNode.current = documentNode;
      }
      return rootProjectionNode.current;
    },
    resetTransform: (instance, value) => {
      instance.style.transform = value !== void 0 ? value : "none";
    },
    checkIsScrollRoot: (instance) => Boolean(window.getComputedStyle(instance).position === "fixed")
  });

  // packages/components/node_modules/framer-motion/dist/es/motion/features/drag.mjs
  var drag = {
    pan: {
      Feature: PanGesture
    },
    drag: {
      Feature: DragGesture,
      ProjectionNode: HTMLProjectionNode,
      MeasureLayout
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/gestures/hover.mjs
  function handleHoverEvent(node2, event, lifecycle) {
    const { props } = node2;
    if (node2.animationState && props.whileHover) {
      node2.animationState.setActive("whileHover", lifecycle === "Start");
    }
    const eventName = "onHover" + lifecycle;
    const callback = props[eventName];
    if (callback) {
      frame.postRender(() => callback(event, extractEventInfo(event)));
    }
  }
  var HoverGesture = class extends Feature {
    mount() {
      const { current } = this.node;
      if (!current)
        return;
      this.unmount = hover(current, (startEvent) => {
        handleHoverEvent(this.node, startEvent, "Start");
        return (endEvent) => handleHoverEvent(this.node, endEvent, "End");
      });
    }
    unmount() {
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/gestures/focus.mjs
  var FocusGesture = class extends Feature {
    constructor() {
      super(...arguments);
      this.isActive = false;
    }
    onFocus() {
      let isFocusVisible = false;
      try {
        isFocusVisible = this.node.current.matches(":focus-visible");
      } catch (e3) {
        isFocusVisible = true;
      }
      if (!isFocusVisible || !this.node.animationState)
        return;
      this.node.animationState.setActive("whileFocus", true);
      this.isActive = true;
    }
    onBlur() {
      if (!this.isActive || !this.node.animationState)
        return;
      this.node.animationState.setActive("whileFocus", false);
      this.isActive = false;
    }
    mount() {
      this.unmount = pipe(addDomEvent(this.node.current, "focus", () => this.onFocus()), addDomEvent(this.node.current, "blur", () => this.onBlur()));
    }
    unmount() {
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/gestures/press.mjs
  function handlePressEvent(node2, event, lifecycle) {
    const { props } = node2;
    if (node2.animationState && props.whileTap) {
      node2.animationState.setActive("whileTap", lifecycle === "Start");
    }
    const eventName = "onTap" + (lifecycle === "End" ? "" : lifecycle);
    const callback = props[eventName];
    if (callback) {
      frame.postRender(() => callback(event, extractEventInfo(event)));
    }
  }
  var PressGesture = class extends Feature {
    mount() {
      const { current } = this.node;
      if (!current)
        return;
      this.unmount = press(current, (startEvent) => {
        handlePressEvent(this.node, startEvent, "Start");
        return (endEvent, { success }) => handlePressEvent(this.node, endEvent, success ? "End" : "Cancel");
      }, { useGlobalTarget: this.node.props.globalTapTarget });
    }
    unmount() {
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs
  var observerCallbacks = /* @__PURE__ */ new WeakMap();
  var observers = /* @__PURE__ */ new WeakMap();
  var fireObserverCallback = (entry) => {
    const callback = observerCallbacks.get(entry.target);
    callback && callback(entry);
  };
  var fireAllObserverCallbacks = (entries) => {
    entries.forEach(fireObserverCallback);
  };
  function initIntersectionObserver({ root, ...options2 }) {
    const lookupRoot = root || document;
    if (!observers.has(lookupRoot)) {
      observers.set(lookupRoot, {});
    }
    const rootObservers = observers.get(lookupRoot);
    const key = JSON.stringify(options2);
    if (!rootObservers[key]) {
      rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, { root, ...options2 });
    }
    return rootObservers[key];
  }
  function observeIntersection(element, options2, callback) {
    const rootInteresectionObserver = initIntersectionObserver(options2);
    observerCallbacks.set(element, callback);
    rootInteresectionObserver.observe(element);
    return () => {
      observerCallbacks.delete(element);
      rootInteresectionObserver.unobserve(element);
    };
  }

  // packages/components/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs
  var thresholdNames = {
    some: 0,
    all: 1
  };
  var InViewFeature = class extends Feature {
    constructor() {
      super(...arguments);
      this.hasEnteredView = false;
      this.isInView = false;
    }
    startObserver() {
      this.unmount();
      const { viewport = {} } = this.node.getProps();
      const { root, margin: rootMargin, amount = "some", once } = viewport;
      const options2 = {
        root: root ? root.current : void 0,
        rootMargin,
        threshold: typeof amount === "number" ? amount : thresholdNames[amount]
      };
      const onIntersectionUpdate = (entry) => {
        const { isIntersecting } = entry;
        if (this.isInView === isIntersecting)
          return;
        this.isInView = isIntersecting;
        if (once && !isIntersecting && this.hasEnteredView) {
          return;
        } else if (isIntersecting) {
          this.hasEnteredView = true;
        }
        if (this.node.animationState) {
          this.node.animationState.setActive("whileInView", isIntersecting);
        }
        const { onViewportEnter, onViewportLeave } = this.node.getProps();
        const callback = isIntersecting ? onViewportEnter : onViewportLeave;
        callback && callback(entry);
      };
      return observeIntersection(this.node.current, options2, onIntersectionUpdate);
    }
    mount() {
      this.startObserver();
    }
    update() {
      if (typeof IntersectionObserver === "undefined")
        return;
      const { props, prevProps } = this.node;
      const hasOptionsChanged = ["amount", "margin", "root"].some(hasViewportOptionChanged(props, prevProps));
      if (hasOptionsChanged) {
        this.startObserver();
      }
    }
    unmount() {
    }
  };
  function hasViewportOptionChanged({ viewport = {} }, { viewport: prevViewport = {} } = {}) {
    return (name) => viewport[name] !== prevViewport[name];
  }

  // packages/components/node_modules/framer-motion/dist/es/motion/features/gestures.mjs
  var gestureAnimations = {
    inView: {
      Feature: InViewFeature
    },
    tap: {
      Feature: PressGesture
    },
    focus: {
      Feature: FocusGesture
    },
    hover: {
      Feature: HoverGesture
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/motion/features/layout.mjs
  var layout = {
    layout: {
      ProjectionNode: HTMLProjectionNode,
      MeasureLayout
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/motion/index.mjs
  var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
  var import_react69 = __toESM(require_react(), 1);

  // packages/components/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs
  var import_react62 = __toESM(require_react(), 1);
  var MotionConfigContext = (0, import_react62.createContext)({
    transformPagePoint: (p3) => p3,
    isStatic: false,
    reducedMotion: "never"
  });

  // packages/components/node_modules/framer-motion/dist/es/context/MotionContext/index.mjs
  var import_react63 = __toESM(require_react(), 1);
  var MotionContext = (0, import_react63.createContext)({});

  // packages/components/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs
  var import_react66 = __toESM(require_react(), 1);

  // packages/components/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs
  var import_react64 = __toESM(require_react(), 1);

  // packages/components/node_modules/framer-motion/dist/es/utils/is-browser.mjs
  var isBrowser = typeof window !== "undefined";

  // packages/components/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs
  var useIsomorphicLayoutEffect = isBrowser ? import_react64.useLayoutEffect : import_react64.useEffect;

  // packages/components/node_modules/framer-motion/dist/es/context/LazyContext.mjs
  var import_react65 = __toESM(require_react(), 1);
  var LazyContext = (0, import_react65.createContext)({ strict: false });

  // packages/components/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs
  function useVisualElement(Component9, visualState, props, createVisualElement, ProjectionNodeConstructor) {
    var _a, _b;
    const { visualElement: parent } = (0, import_react66.useContext)(MotionContext);
    const lazyContext = (0, import_react66.useContext)(LazyContext);
    const presenceContext = (0, import_react66.useContext)(PresenceContext);
    const reducedMotionConfig = (0, import_react66.useContext)(MotionConfigContext).reducedMotion;
    const visualElementRef = (0, import_react66.useRef)(null);
    createVisualElement = createVisualElement || lazyContext.renderer;
    if (!visualElementRef.current && createVisualElement) {
      visualElementRef.current = createVisualElement(Component9, {
        visualState,
        parent,
        props,
        presenceContext,
        blockInitialAnimation: presenceContext ? presenceContext.initial === false : false,
        reducedMotionConfig
      });
    }
    const visualElement = visualElementRef.current;
    const initialLayoutGroupConfig = (0, import_react66.useContext)(SwitchLayoutGroupContext);
    if (visualElement && !visualElement.projection && ProjectionNodeConstructor && (visualElement.type === "html" || visualElement.type === "svg")) {
      createProjectionNode2(visualElementRef.current, props, ProjectionNodeConstructor, initialLayoutGroupConfig);
    }
    const isMounted = (0, import_react66.useRef)(false);
    (0, import_react66.useInsertionEffect)(() => {
      if (visualElement && isMounted.current) {
        visualElement.update(props, presenceContext);
      }
    });
    const optimisedAppearId = props[optimizedAppearDataAttribute];
    const wantsHandoff = (0, import_react66.useRef)(Boolean(optimisedAppearId) && !((_a = window.MotionHandoffIsComplete) === null || _a === void 0 ? void 0 : _a.call(window, optimisedAppearId)) && ((_b = window.MotionHasOptimisedAnimation) === null || _b === void 0 ? void 0 : _b.call(window, optimisedAppearId)));
    useIsomorphicLayoutEffect(() => {
      if (!visualElement)
        return;
      isMounted.current = true;
      window.MotionIsMounted = true;
      visualElement.updateFeatures();
      microtask.render(visualElement.render);
      if (wantsHandoff.current && visualElement.animationState) {
        visualElement.animationState.animateChanges();
      }
    });
    (0, import_react66.useEffect)(() => {
      if (!visualElement)
        return;
      if (!wantsHandoff.current && visualElement.animationState) {
        visualElement.animationState.animateChanges();
      }
      if (wantsHandoff.current) {
        queueMicrotask(() => {
          var _a2;
          (_a2 = window.MotionHandoffMarkAsComplete) === null || _a2 === void 0 ? void 0 : _a2.call(window, optimisedAppearId);
        });
        wantsHandoff.current = false;
      }
    });
    return visualElement;
  }
  function createProjectionNode2(visualElement, props, ProjectionNodeConstructor, initialPromotionConfig) {
    const { layoutId, layout: layout2, drag: drag2, dragConstraints, layoutScroll, layoutRoot } = props;
    visualElement.projection = new ProjectionNodeConstructor(visualElement.latestValues, props["data-framer-portal-id"] ? void 0 : getClosestProjectingNode(visualElement.parent));
    visualElement.projection.setOptions({
      layoutId,
      layout: layout2,
      alwaysMeasureLayout: Boolean(drag2) || dragConstraints && isRefObject(dragConstraints),
      visualElement,
      /**
       * TODO: Update options in an effect. This could be tricky as it'll be too late
       * to update by the time layout animations run.
       * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,
       * ensuring it gets called if there's no potential layout animations.
       *
       */
      animationType: typeof layout2 === "string" ? layout2 : "both",
      initialPromotionConfig,
      layoutScroll,
      layoutRoot
    });
  }
  function getClosestProjectingNode(visualElement) {
    if (!visualElement)
      return void 0;
    return visualElement.options.allowProjection !== false ? visualElement.projection : getClosestProjectingNode(visualElement.parent);
  }

  // packages/components/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs
  var import_react67 = __toESM(require_react(), 1);
  function useMotionRef(visualState, visualElement, externalRef) {
    return (0, import_react67.useCallback)(
      (instance) => {
        instance && visualState.mount && visualState.mount(instance);
        if (visualElement) {
          if (instance) {
            visualElement.mount(instance);
          } else {
            visualElement.unmount();
          }
        }
        if (externalRef) {
          if (typeof externalRef === "function") {
            externalRef(instance);
          } else if (isRefObject(externalRef)) {
            externalRef.current = instance;
          }
        }
      },
      /**
       * Only pass a new ref callback to React if we've received a visual element
       * factory. Otherwise we'll be mounting/remounting every time externalRef
       * or other dependencies change.
       */
      [visualElement]
    );
  }

  // packages/components/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs
  var import_react68 = __toESM(require_react(), 1);

  // packages/components/node_modules/framer-motion/dist/es/render/utils/is-controlling-variants.mjs
  function isControllingVariants(props) {
    return isAnimationControls(props.animate) || variantProps.some((name) => isVariantLabel(props[name]));
  }
  function isVariantNode(props) {
    return Boolean(isControllingVariants(props) || props.variants);
  }

  // packages/components/node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs
  function getCurrentTreeVariants(props, context) {
    if (isControllingVariants(props)) {
      const { initial, animate } = props;
      return {
        initial: initial === false || isVariantLabel(initial) ? initial : void 0,
        animate: isVariantLabel(animate) ? animate : void 0
      };
    }
    return props.inherit !== false ? context : {};
  }

  // packages/components/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs
  function useCreateMotionContext(props) {
    const { initial, animate } = getCurrentTreeVariants(props, (0, import_react68.useContext)(MotionContext));
    return (0, import_react68.useMemo)(() => ({ initial, animate }), [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]);
  }
  function variantLabelsAsDependency(prop) {
    return Array.isArray(prop) ? prop.join(" ") : prop;
  }

  // packages/components/node_modules/framer-motion/dist/es/motion/features/definitions.mjs
  var featureProps = {
    animation: [
      "animate",
      "variants",
      "whileHover",
      "whileTap",
      "exit",
      "whileInView",
      "whileFocus",
      "whileDrag"
    ],
    exit: ["exit"],
    drag: ["drag", "dragControls"],
    focus: ["whileFocus"],
    hover: ["whileHover", "onHoverStart", "onHoverEnd"],
    tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"],
    pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
    inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
    layout: ["layout", "layoutId"]
  };
  var featureDefinitions = {};
  for (const key in featureProps) {
    featureDefinitions[key] = {
      isEnabled: (props) => featureProps[key].some((name) => !!props[name])
    };
  }

  // packages/components/node_modules/framer-motion/dist/es/motion/features/load-features.mjs
  function loadFeatures(features) {
    for (const key in features) {
      featureDefinitions[key] = {
        ...featureDefinitions[key],
        ...features[key]
      };
    }
  }

  // packages/components/node_modules/framer-motion/dist/es/motion/utils/symbol.mjs
  var motionComponentSymbol = /* @__PURE__ */ Symbol.for("motionComponentSymbol");

  // packages/components/node_modules/framer-motion/dist/es/motion/index.mjs
  function createRendererMotionComponent({ preloadedFeatures, createVisualElement, useRender, useVisualState, Component: Component9 }) {
    preloadedFeatures && loadFeatures(preloadedFeatures);
    function MotionComponent(props, externalRef) {
      let MeasureLayout2;
      const configAndProps = {
        ...(0, import_react69.useContext)(MotionConfigContext),
        ...props,
        layoutId: useLayoutId(props)
      };
      const { isStatic } = configAndProps;
      const context = useCreateMotionContext(props);
      const visualState = useVisualState(props, isStatic);
      if (!isStatic && isBrowser) {
        useStrictMode(configAndProps, preloadedFeatures);
        const layoutProjection = getProjectionFunctionality(configAndProps);
        MeasureLayout2 = layoutProjection.MeasureLayout;
        context.visualElement = useVisualElement(Component9, visualState, configAndProps, createVisualElement, layoutProjection.ProjectionNode);
      }
      return (0, import_jsx_runtime40.jsxs)(MotionContext.Provider, { value: context, children: [MeasureLayout2 && context.visualElement ? (0, import_jsx_runtime40.jsx)(MeasureLayout2, { visualElement: context.visualElement, ...configAndProps }) : null, useRender(Component9, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, context.visualElement)] });
    }
    const ForwardRefMotionComponent = (0, import_react69.forwardRef)(MotionComponent);
    ForwardRefMotionComponent[motionComponentSymbol] = Component9;
    return ForwardRefMotionComponent;
  }
  function useLayoutId({ layoutId }) {
    const layoutGroupId = (0, import_react69.useContext)(LayoutGroupContext).id;
    return layoutGroupId && layoutId !== void 0 ? layoutGroupId + "-" + layoutId : layoutId;
  }
  function useStrictMode(configAndProps, preloadedFeatures) {
    const isStrict = (0, import_react69.useContext)(LazyContext).strict;
    if (preloadedFeatures && isStrict) {
      const strictMessage = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
      configAndProps.ignoreStrict ? warning(false, strictMessage) : invariant2(false, strictMessage);
    }
  }
  function getProjectionFunctionality(props) {
    const { drag: drag2, layout: layout2 } = featureDefinitions;
    if (!drag2 && !layout2)
      return {};
    const combined = { ...drag2, ...layout2 };
    return {
      MeasureLayout: (drag2 === null || drag2 === void 0 ? void 0 : drag2.isEnabled(props)) || (layout2 === null || layout2 === void 0 ? void 0 : layout2.isEnabled(props)) ? combined.MeasureLayout : void 0,
      ProjectionNode: combined.ProjectionNode
    };
  }

  // packages/components/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs
  var lowercaseSVGElements = [
    "animate",
    "circle",
    "defs",
    "desc",
    "ellipse",
    "g",
    "image",
    "line",
    "filter",
    "marker",
    "mask",
    "metadata",
    "path",
    "pattern",
    "polygon",
    "polyline",
    "rect",
    "stop",
    "switch",
    "symbol",
    "svg",
    "text",
    "tspan",
    "use",
    "view"
  ];

  // packages/components/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs
  function isSVGComponent(Component9) {
    if (
      /**
       * If it's not a string, it's a custom React component. Currently we only support
       * HTML custom React components.
       */
      typeof Component9 !== "string" || /**
       * If it contains a dash, the element is a custom HTML webcomponent.
       */
      Component9.includes("-")
    ) {
      return false;
    } else if (
      /**
       * If it's in our list of lowercase SVG tags, it's an SVG component
       */
      lowercaseSVGElements.indexOf(Component9) > -1 || /**
       * If it contains a capital letter, it's an SVG component
       */
      /[A-Z]/u.test(Component9)
    ) {
      return true;
    }
    return false;
  }

  // packages/components/node_modules/framer-motion/dist/es/render/html/utils/render.mjs
  function renderHTML(element, { style: style2, vars }, styleProp, projection) {
    Object.assign(element.style, style2, projection && projection.getProjectionStyles(styleProp));
    for (const key in vars) {
      element.style.setProperty(key, vars[key]);
    }
  }

  // packages/components/node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs
  var camelCaseAttributes = /* @__PURE__ */ new Set([
    "baseFrequency",
    "diffuseConstant",
    "kernelMatrix",
    "kernelUnitLength",
    "keySplines",
    "keyTimes",
    "limitingConeAngle",
    "markerHeight",
    "markerWidth",
    "numOctaves",
    "targetX",
    "targetY",
    "surfaceScale",
    "specularConstant",
    "specularExponent",
    "stdDeviation",
    "tableValues",
    "viewBox",
    "gradientTransform",
    "pathLength",
    "startOffset",
    "textLength",
    "lengthAdjust"
  ]);

  // packages/components/node_modules/framer-motion/dist/es/render/svg/utils/render.mjs
  function renderSVG(element, renderState, _styleProp, projection) {
    renderHTML(element, renderState, void 0, projection);
    for (const key in renderState.attrs) {
      element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);
    }
  }

  // packages/components/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs
  function isForcedMotionValue(key, { layout: layout2, layoutId }) {
    return transformProps.has(key) || key.startsWith("origin") || (layout2 || layoutId !== void 0) && (!!scaleCorrectors[key] || key === "opacity");
  }

  // packages/components/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs
  function scrapeMotionValuesFromProps(props, prevProps, visualElement) {
    var _a;
    const { style: style2 } = props;
    const newValues = {};
    for (const key in style2) {
      if (isMotionValue(style2[key]) || prevProps.style && isMotionValue(prevProps.style[key]) || isForcedMotionValue(key, props) || ((_a = visualElement === null || visualElement === void 0 ? void 0 : visualElement.getValue(key)) === null || _a === void 0 ? void 0 : _a.liveStyle) !== void 0) {
        newValues[key] = style2[key];
      }
    }
    return newValues;
  }

  // packages/components/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs
  function scrapeMotionValuesFromProps2(props, prevProps, visualElement) {
    const newValues = scrapeMotionValuesFromProps(props, prevProps, visualElement);
    for (const key in props) {
      if (isMotionValue(props[key]) || isMotionValue(prevProps[key])) {
        const targetKey = transformPropOrder.indexOf(key) !== -1 ? "attr" + key.charAt(0).toUpperCase() + key.substring(1) : key;
        newValues[targetKey] = props[key];
      }
    }
    return newValues;
  }

  // packages/components/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs
  var import_react71 = __toESM(require_react(), 1);

  // packages/components/node_modules/framer-motion/dist/es/utils/use-constant.mjs
  var import_react70 = __toESM(require_react(), 1);
  function useConstant(init2) {
    const ref = (0, import_react70.useRef)(null);
    if (ref.current === null) {
      ref.current = init2();
    }
    return ref.current;
  }

  // packages/components/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs
  function makeState({ scrapeMotionValuesFromProps: scrapeMotionValuesFromProps3, createRenderState, onMount }, props, context, presenceContext) {
    const state = {
      latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps3),
      renderState: createRenderState()
    };
    if (onMount) {
      state.mount = (instance) => onMount(props, instance, state);
    }
    return state;
  }
  var makeUseVisualState = (config) => (props, isStatic) => {
    const context = (0, import_react71.useContext)(MotionContext);
    const presenceContext = (0, import_react71.useContext)(PresenceContext);
    const make = () => makeState(config, props, context, presenceContext);
    return isStatic ? make() : useConstant(make);
  };
  function makeLatestValues(props, context, presenceContext, scrapeMotionValues) {
    const values = {};
    const motionValues = scrapeMotionValues(props, {});
    for (const key in motionValues) {
      values[key] = resolveMotionValue(motionValues[key]);
    }
    let { initial, animate } = props;
    const isControllingVariants$1 = isControllingVariants(props);
    const isVariantNode$1 = isVariantNode(props);
    if (context && isVariantNode$1 && !isControllingVariants$1 && props.inherit !== false) {
      if (initial === void 0)
        initial = context.initial;
      if (animate === void 0)
        animate = context.animate;
    }
    let isInitialAnimationBlocked = presenceContext ? presenceContext.initial === false : false;
    isInitialAnimationBlocked = isInitialAnimationBlocked || initial === false;
    const variantToSet = isInitialAnimationBlocked ? animate : initial;
    if (variantToSet && typeof variantToSet !== "boolean" && !isAnimationControls(variantToSet)) {
      const list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];
      for (let i3 = 0; i3 < list.length; i3++) {
        const resolved = resolveVariantFromProps(props, list[i3]);
        if (resolved) {
          const { transitionEnd, transition, ...target } = resolved;
          for (const key in target) {
            let valueTarget = target[key];
            if (Array.isArray(valueTarget)) {
              const index2 = isInitialAnimationBlocked ? valueTarget.length - 1 : 0;
              valueTarget = valueTarget[index2];
            }
            if (valueTarget !== null) {
              values[key] = valueTarget;
            }
          }
          for (const key in transitionEnd) {
            values[key] = transitionEnd[key];
          }
        }
      }
    }
    return values;
  }

  // packages/components/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs
  var createHtmlRenderState = () => ({
    style: {},
    transform: {},
    transformOrigin: {},
    vars: {}
  });

  // packages/components/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs
  var createSvgRenderState = () => ({
    ...createHtmlRenderState(),
    attrs: {}
  });

  // packages/components/node_modules/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs
  var getValueAsType = (value, type) => {
    return type && typeof value === "number" ? type.transform(value) : value;
  };

  // packages/components/node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs
  var translateAlias = {
    x: "translateX",
    y: "translateY",
    z: "translateZ",
    transformPerspective: "perspective"
  };
  var numTransforms = transformPropOrder.length;
  function buildTransform(latestValues, transform, transformTemplate) {
    let transformString = "";
    let transformIsDefault = true;
    for (let i3 = 0; i3 < numTransforms; i3++) {
      const key = transformPropOrder[i3];
      const value = latestValues[key];
      if (value === void 0)
        continue;
      let valueIsDefault = true;
      if (typeof value === "number") {
        valueIsDefault = value === (key.startsWith("scale") ? 1 : 0);
      } else {
        valueIsDefault = parseFloat(value) === 0;
      }
      if (!valueIsDefault || transformTemplate) {
        const valueAsType = getValueAsType(value, numberValueTypes[key]);
        if (!valueIsDefault) {
          transformIsDefault = false;
          const transformName = translateAlias[key] || key;
          transformString += `${transformName}(${valueAsType}) `;
        }
        if (transformTemplate) {
          transform[key] = valueAsType;
        }
      }
    }
    transformString = transformString.trim();
    if (transformTemplate) {
      transformString = transformTemplate(transform, transformIsDefault ? "" : transformString);
    } else if (transformIsDefault) {
      transformString = "none";
    }
    return transformString;
  }

  // packages/components/node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs
  function buildHTMLStyles(state, latestValues, transformTemplate) {
    const { style: style2, vars, transformOrigin } = state;
    let hasTransform2 = false;
    let hasTransformOrigin = false;
    for (const key in latestValues) {
      const value = latestValues[key];
      if (transformProps.has(key)) {
        hasTransform2 = true;
        continue;
      } else if (isCSSVariableName(key)) {
        vars[key] = value;
        continue;
      } else {
        const valueAsType = getValueAsType(value, numberValueTypes[key]);
        if (key.startsWith("origin")) {
          hasTransformOrigin = true;
          transformOrigin[key] = valueAsType;
        } else {
          style2[key] = valueAsType;
        }
      }
    }
    if (!latestValues.transform) {
      if (hasTransform2 || transformTemplate) {
        style2.transform = buildTransform(latestValues, state.transform, transformTemplate);
      } else if (style2.transform) {
        style2.transform = "none";
      }
    }
    if (hasTransformOrigin) {
      const { originX = "50%", originY = "50%", originZ = 0 } = transformOrigin;
      style2.transformOrigin = `${originX} ${originY} ${originZ}`;
    }
  }

  // packages/components/node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.mjs
  function calcOrigin2(origin, offset3, size3) {
    return typeof origin === "string" ? origin : px.transform(offset3 + size3 * origin);
  }
  function calcSVGTransformOrigin(dimensions, originX, originY) {
    const pxOriginX = calcOrigin2(originX, dimensions.x, dimensions.width);
    const pxOriginY = calcOrigin2(originY, dimensions.y, dimensions.height);
    return `${pxOriginX} ${pxOriginY}`;
  }

  // packages/components/node_modules/framer-motion/dist/es/render/svg/utils/path.mjs
  var dashKeys = {
    offset: "stroke-dashoffset",
    array: "stroke-dasharray"
  };
  var camelKeys = {
    offset: "strokeDashoffset",
    array: "strokeDasharray"
  };
  function buildSVGPath(attrs, length2, spacing = 1, offset3 = 0, useDashCase = true) {
    attrs.pathLength = 1;
    const keys = useDashCase ? dashKeys : camelKeys;
    attrs[keys.offset] = px.transform(-offset3);
    const pathLength = px.transform(length2);
    const pathSpacing = px.transform(spacing);
    attrs[keys.array] = `${pathLength} ${pathSpacing}`;
  }

  // packages/components/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs
  function buildSVGAttrs(state, {
    attrX,
    attrY,
    attrScale,
    originX,
    originY,
    pathLength,
    pathSpacing = 1,
    pathOffset = 0,
    // This is object creation, which we try to avoid per-frame.
    ...latest
  }, isSVGTag2, transformTemplate) {
    buildHTMLStyles(state, latest, transformTemplate);
    if (isSVGTag2) {
      if (state.style.viewBox) {
        state.attrs.viewBox = state.style.viewBox;
      }
      return;
    }
    state.attrs = state.style;
    state.style = {};
    const { attrs, style: style2, dimensions } = state;
    if (attrs.transform) {
      if (dimensions)
        style2.transform = attrs.transform;
      delete attrs.transform;
    }
    if (dimensions && (originX !== void 0 || originY !== void 0 || style2.transform)) {
      style2.transformOrigin = calcSVGTransformOrigin(dimensions, originX !== void 0 ? originX : 0.5, originY !== void 0 ? originY : 0.5);
    }
    if (attrX !== void 0)
      attrs.x = attrX;
    if (attrY !== void 0)
      attrs.y = attrY;
    if (attrScale !== void 0)
      attrs.scale = attrScale;
    if (pathLength !== void 0) {
      buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false);
    }
  }

  // packages/components/node_modules/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs
  var isSVGTag = (tag) => typeof tag === "string" && tag.toLowerCase() === "svg";

  // packages/components/node_modules/framer-motion/dist/es/render/svg/config-motion.mjs
  var svgMotionConfig = {
    useVisualState: makeUseVisualState({
      scrapeMotionValuesFromProps: scrapeMotionValuesFromProps2,
      createRenderState: createSvgRenderState,
      onMount: (props, instance, { renderState, latestValues }) => {
        frame.read(() => {
          try {
            renderState.dimensions = typeof instance.getBBox === "function" ? instance.getBBox() : instance.getBoundingClientRect();
          } catch (e3) {
            renderState.dimensions = {
              x: 0,
              y: 0,
              width: 0,
              height: 0
            };
          }
        });
        frame.render(() => {
          buildSVGAttrs(renderState, latestValues, isSVGTag(instance.tagName), props.transformTemplate);
          renderSVG(instance, renderState);
        });
      }
    })
  };

  // packages/components/node_modules/framer-motion/dist/es/render/html/config-motion.mjs
  var htmlMotionConfig = {
    useVisualState: makeUseVisualState({
      scrapeMotionValuesFromProps,
      createRenderState: createHtmlRenderState
    })
  };

  // packages/components/node_modules/framer-motion/dist/es/render/dom/use-render.mjs
  var import_react74 = __toESM(require_react(), 1);

  // packages/components/node_modules/framer-motion/dist/es/render/html/use-props.mjs
  var import_react72 = __toESM(require_react(), 1);
  function copyRawValuesOnly(target, source, props) {
    for (const key in source) {
      if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {
        target[key] = source[key];
      }
    }
  }
  function useInitialMotionValues({ transformTemplate }, visualState) {
    return (0, import_react72.useMemo)(() => {
      const state = createHtmlRenderState();
      buildHTMLStyles(state, visualState, transformTemplate);
      return Object.assign({}, state.vars, state.style);
    }, [visualState]);
  }
  function useStyle(props, visualState) {
    const styleProp = props.style || {};
    const style2 = {};
    copyRawValuesOnly(style2, styleProp, props);
    Object.assign(style2, useInitialMotionValues(props, visualState));
    return style2;
  }
  function useHTMLProps(props, visualState) {
    const htmlProps = {};
    const style2 = useStyle(props, visualState);
    if (props.drag && props.dragListener !== false) {
      htmlProps.draggable = false;
      style2.userSelect = style2.WebkitUserSelect = style2.WebkitTouchCallout = "none";
      style2.touchAction = props.drag === true ? "none" : `pan-${props.drag === "x" ? "y" : "x"}`;
    }
    if (props.tabIndex === void 0 && (props.onTap || props.onTapStart || props.whileTap)) {
      htmlProps.tabIndex = 0;
    }
    htmlProps.style = style2;
    return htmlProps;
  }

  // packages/components/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs
  var validMotionProps = /* @__PURE__ */ new Set([
    "animate",
    "exit",
    "variants",
    "initial",
    "style",
    "values",
    "variants",
    "transition",
    "transformTemplate",
    "custom",
    "inherit",
    "onBeforeLayoutMeasure",
    "onAnimationStart",
    "onAnimationComplete",
    "onUpdate",
    "onDragStart",
    "onDrag",
    "onDragEnd",
    "onMeasureDragConstraints",
    "onDirectionLock",
    "onDragTransitionEnd",
    "_dragX",
    "_dragY",
    "onHoverStart",
    "onHoverEnd",
    "onViewportEnter",
    "onViewportLeave",
    "globalTapTarget",
    "ignoreStrict",
    "viewport"
  ]);
  function isValidMotionProp(key) {
    return key.startsWith("while") || key.startsWith("drag") && key !== "draggable" || key.startsWith("layout") || key.startsWith("onTap") || key.startsWith("onPan") || key.startsWith("onLayout") || validMotionProps.has(key);
  }

  // packages/components/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs
  var shouldForward = (key) => !isValidMotionProp(key);
  function loadExternalIsValidProp(isValidProp) {
    if (!isValidProp)
      return;
    shouldForward = (key) => key.startsWith("on") ? !isValidMotionProp(key) : isValidProp(key);
  }
  try {
    loadExternalIsValidProp((init_emotion_is_prop_valid_esm(), __toCommonJS(emotion_is_prop_valid_esm_exports)).default);
  } catch (_a) {
  }
  function filterProps(props, isDom, forwardMotionProps) {
    const filteredProps = {};
    for (const key in props) {
      if (key === "values" && typeof props.values === "object")
        continue;
      if (shouldForward(key) || forwardMotionProps === true && isValidMotionProp(key) || !isDom && !isValidMotionProp(key) || // If trying to use native HTML drag events, forward drag listeners
      props["draggable"] && key.startsWith("onDrag")) {
        filteredProps[key] = props[key];
      }
    }
    return filteredProps;
  }

  // packages/components/node_modules/framer-motion/dist/es/render/svg/use-props.mjs
  var import_react73 = __toESM(require_react(), 1);
  function useSVGProps(props, visualState, _isStatic, Component9) {
    const visualProps = (0, import_react73.useMemo)(() => {
      const state = createSvgRenderState();
      buildSVGAttrs(state, visualState, isSVGTag(Component9), props.transformTemplate);
      return {
        ...state.attrs,
        style: { ...state.style }
      };
    }, [visualState]);
    if (props.style) {
      const rawStyles = {};
      copyRawValuesOnly(rawStyles, props.style, props);
      visualProps.style = { ...rawStyles, ...visualProps.style };
    }
    return visualProps;
  }

  // packages/components/node_modules/framer-motion/dist/es/render/dom/use-render.mjs
  function createUseRender(forwardMotionProps = false) {
    const useRender = (Component9, props, ref, { latestValues }, isStatic) => {
      const useVisualProps = isSVGComponent(Component9) ? useSVGProps : useHTMLProps;
      const visualProps = useVisualProps(props, latestValues, isStatic, Component9);
      const filteredProps = filterProps(props, typeof Component9 === "string", forwardMotionProps);
      const elementProps = Component9 !== import_react74.Fragment ? { ...filteredProps, ...visualProps, ref } : {};
      const { children } = props;
      const renderedChildren = (0, import_react74.useMemo)(() => isMotionValue(children) ? children.get() : children, [children]);
      return (0, import_react74.createElement)(Component9, {
        ...elementProps,
        children: renderedChildren
      });
    };
    return useRender;
  }

  // packages/components/node_modules/framer-motion/dist/es/render/components/create-factory.mjs
  function createMotionComponentFactory(preloadedFeatures, createVisualElement) {
    return function createMotionComponent2(Component9, { forwardMotionProps } = { forwardMotionProps: false }) {
      const baseConfig = isSVGComponent(Component9) ? svgMotionConfig : htmlMotionConfig;
      const config = {
        ...baseConfig,
        preloadedFeatures,
        useRender: createUseRender(forwardMotionProps),
        createVisualElement,
        Component: Component9
      };
      return createRendererMotionComponent(config);
    };
  }

  // packages/components/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs
  var import_react75 = __toESM(require_react(), 1);

  // packages/components/node_modules/framer-motion/dist/es/utils/reduced-motion/state.mjs
  var prefersReducedMotion = { current: null };
  var hasReducedMotionListener = { current: false };

  // packages/components/node_modules/framer-motion/dist/es/utils/reduced-motion/index.mjs
  function initPrefersReducedMotion() {
    hasReducedMotionListener.current = true;
    if (!isBrowser)
      return;
    if (window.matchMedia) {
      const motionMediaQuery = window.matchMedia("(prefers-reduced-motion)");
      const setReducedMotionPreferences = () => prefersReducedMotion.current = motionMediaQuery.matches;
      motionMediaQuery.addListener(setReducedMotionPreferences);
      setReducedMotionPreferences();
    } else {
      prefersReducedMotion.current = false;
    }
  }

  // packages/components/node_modules/framer-motion/dist/es/render/utils/motion-values.mjs
  function updateMotionValuesFromProps(element, next2, prev2) {
    for (const key in next2) {
      const nextValue = next2[key];
      const prevValue = prev2[key];
      if (isMotionValue(nextValue)) {
        element.addValue(key, nextValue);
        if (true) {
          warnOnce(nextValue.version === "11.15.0", `Attempting to mix Motion versions ${nextValue.version} with 11.15.0 may not work as expected.`);
        }
      } else if (isMotionValue(prevValue)) {
        element.addValue(key, motionValue(nextValue, { owner: element }));
      } else if (prevValue !== nextValue) {
        if (element.hasValue(key)) {
          const existingValue = element.getValue(key);
          if (existingValue.liveStyle === true) {
            existingValue.jump(nextValue);
          } else if (!existingValue.hasAnimated) {
            existingValue.set(nextValue);
          }
        } else {
          const latestValue = element.getStaticValue(key);
          element.addValue(key, motionValue(latestValue !== void 0 ? latestValue : nextValue, { owner: element }));
        }
      }
    }
    for (const key in prev2) {
      if (next2[key] === void 0)
        element.removeValue(key);
    }
    return next2;
  }

  // packages/components/node_modules/framer-motion/dist/es/render/store.mjs
  var visualElementStore = /* @__PURE__ */ new WeakMap();

  // packages/components/node_modules/framer-motion/dist/es/render/dom/value-types/find.mjs
  var valueTypes = [...dimensionValueTypes, color, complex];
  var findValueType = (v3) => valueTypes.find(testValueType(v3));

  // packages/components/node_modules/framer-motion/dist/es/render/VisualElement.mjs
  var propEventHandlers = [
    "AnimationStart",
    "AnimationComplete",
    "Update",
    "BeforeLayoutMeasure",
    "LayoutMeasure",
    "LayoutAnimationStart",
    "LayoutAnimationComplete"
  ];
  var VisualElement = class {
    /**
     * This method takes React props and returns found MotionValues. For example, HTML
     * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
     *
     * This isn't an abstract method as it needs calling in the constructor, but it is
     * intended to be one.
     */
    scrapeMotionValuesFromProps(_props, _prevProps, _visualElement) {
      return {};
    }
    constructor({ parent, props, presenceContext, reducedMotionConfig, blockInitialAnimation, visualState }, options2 = {}) {
      this.current = null;
      this.children = /* @__PURE__ */ new Set();
      this.isVariantNode = false;
      this.isControllingVariants = false;
      this.shouldReduceMotion = null;
      this.values = /* @__PURE__ */ new Map();
      this.KeyframeResolver = KeyframeResolver;
      this.features = {};
      this.valueSubscriptions = /* @__PURE__ */ new Map();
      this.prevMotionValues = {};
      this.events = {};
      this.propEventSubscriptions = {};
      this.notifyUpdate = () => this.notify("Update", this.latestValues);
      this.render = () => {
        if (!this.current)
          return;
        this.triggerBuild();
        this.renderInstance(this.current, this.renderState, this.props.style, this.projection);
      };
      this.renderScheduledAt = 0;
      this.scheduleRender = () => {
        const now2 = time.now();
        if (this.renderScheduledAt < now2) {
          this.renderScheduledAt = now2;
          frame.render(this.render, false, true);
        }
      };
      const { latestValues, renderState } = visualState;
      this.latestValues = latestValues;
      this.baseTarget = { ...latestValues };
      this.initialValues = props.initial ? { ...latestValues } : {};
      this.renderState = renderState;
      this.parent = parent;
      this.props = props;
      this.presenceContext = presenceContext;
      this.depth = parent ? parent.depth + 1 : 0;
      this.reducedMotionConfig = reducedMotionConfig;
      this.options = options2;
      this.blockInitialAnimation = Boolean(blockInitialAnimation);
      this.isControllingVariants = isControllingVariants(props);
      this.isVariantNode = isVariantNode(props);
      if (this.isVariantNode) {
        this.variantChildren = /* @__PURE__ */ new Set();
      }
      this.manuallyAnimateOnMount = Boolean(parent && parent.current);
      const { willChange, ...initialMotionValues } = this.scrapeMotionValuesFromProps(props, {}, this);
      for (const key in initialMotionValues) {
        const value = initialMotionValues[key];
        if (latestValues[key] !== void 0 && isMotionValue(value)) {
          value.set(latestValues[key], false);
        }
      }
    }
    mount(instance) {
      this.current = instance;
      visualElementStore.set(instance, this);
      if (this.projection && !this.projection.instance) {
        this.projection.mount(instance);
      }
      if (this.parent && this.isVariantNode && !this.isControllingVariants) {
        this.removeFromVariantTree = this.parent.addVariantChild(this);
      }
      this.values.forEach((value, key) => this.bindToMotionValue(key, value));
      if (!hasReducedMotionListener.current) {
        initPrefersReducedMotion();
      }
      this.shouldReduceMotion = this.reducedMotionConfig === "never" ? false : this.reducedMotionConfig === "always" ? true : prefersReducedMotion.current;
      if (true) {
        warnOnce(this.shouldReduceMotion !== true, "You have Reduced Motion enabled on your device. Animations may not appear as expected.");
      }
      if (this.parent)
        this.parent.children.add(this);
      this.update(this.props, this.presenceContext);
    }
    unmount() {
      visualElementStore.delete(this.current);
      this.projection && this.projection.unmount();
      cancelFrame(this.notifyUpdate);
      cancelFrame(this.render);
      this.valueSubscriptions.forEach((remove) => remove());
      this.valueSubscriptions.clear();
      this.removeFromVariantTree && this.removeFromVariantTree();
      this.parent && this.parent.children.delete(this);
      for (const key in this.events) {
        this.events[key].clear();
      }
      for (const key in this.features) {
        const feature = this.features[key];
        if (feature) {
          feature.unmount();
          feature.isMounted = false;
        }
      }
      this.current = null;
    }
    bindToMotionValue(key, value) {
      if (this.valueSubscriptions.has(key)) {
        this.valueSubscriptions.get(key)();
      }
      const valueIsTransform = transformProps.has(key);
      const removeOnChange = value.on("change", (latestValue) => {
        this.latestValues[key] = latestValue;
        this.props.onUpdate && frame.preRender(this.notifyUpdate);
        if (valueIsTransform && this.projection) {
          this.projection.isTransformDirty = true;
        }
      });
      const removeOnRenderRequest = value.on("renderRequest", this.scheduleRender);
      let removeSyncCheck;
      if (window.MotionCheckAppearSync) {
        removeSyncCheck = window.MotionCheckAppearSync(this, key, value);
      }
      this.valueSubscriptions.set(key, () => {
        removeOnChange();
        removeOnRenderRequest();
        if (removeSyncCheck)
          removeSyncCheck();
        if (value.owner)
          value.stop();
      });
    }
    sortNodePosition(other) {
      if (!this.current || !this.sortInstanceNodePosition || this.type !== other.type) {
        return 0;
      }
      return this.sortInstanceNodePosition(this.current, other.current);
    }
    updateFeatures() {
      let key = "animation";
      for (key in featureDefinitions) {
        const featureDefinition = featureDefinitions[key];
        if (!featureDefinition)
          continue;
        const { isEnabled, Feature: FeatureConstructor } = featureDefinition;
        if (!this.features[key] && FeatureConstructor && isEnabled(this.props)) {
          this.features[key] = new FeatureConstructor(this);
        }
        if (this.features[key]) {
          const feature = this.features[key];
          if (feature.isMounted) {
            feature.update();
          } else {
            feature.mount();
            feature.isMounted = true;
          }
        }
      }
    }
    triggerBuild() {
      this.build(this.renderState, this.latestValues, this.props);
    }
    /**
     * Measure the current viewport box with or without transforms.
     * Only measures axis-aligned boxes, rotate and skew must be manually
     * removed with a re-render to work.
     */
    measureViewportBox() {
      return this.current ? this.measureInstanceViewportBox(this.current, this.props) : createBox();
    }
    getStaticValue(key) {
      return this.latestValues[key];
    }
    setStaticValue(key, value) {
      this.latestValues[key] = value;
    }
    /**
     * Update the provided props. Ensure any newly-added motion values are
     * added to our map, old ones removed, and listeners updated.
     */
    update(props, presenceContext) {
      if (props.transformTemplate || this.props.transformTemplate) {
        this.scheduleRender();
      }
      this.prevProps = this.props;
      this.props = props;
      this.prevPresenceContext = this.presenceContext;
      this.presenceContext = presenceContext;
      for (let i3 = 0; i3 < propEventHandlers.length; i3++) {
        const key = propEventHandlers[i3];
        if (this.propEventSubscriptions[key]) {
          this.propEventSubscriptions[key]();
          delete this.propEventSubscriptions[key];
        }
        const listenerName = "on" + key;
        const listener = props[listenerName];
        if (listener) {
          this.propEventSubscriptions[key] = this.on(key, listener);
        }
      }
      this.prevMotionValues = updateMotionValuesFromProps(this, this.scrapeMotionValuesFromProps(props, this.prevProps, this), this.prevMotionValues);
      if (this.handleChildMotionValue) {
        this.handleChildMotionValue();
      }
    }
    getProps() {
      return this.props;
    }
    /**
     * Returns the variant definition with a given name.
     */
    getVariant(name) {
      return this.props.variants ? this.props.variants[name] : void 0;
    }
    /**
     * Returns the defined default transition on this component.
     */
    getDefaultTransition() {
      return this.props.transition;
    }
    getTransformPagePoint() {
      return this.props.transformPagePoint;
    }
    getClosestVariantNode() {
      return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0;
    }
    /**
     * Add a child visual element to our set of children.
     */
    addVariantChild(child) {
      const closestVariantNode = this.getClosestVariantNode();
      if (closestVariantNode) {
        closestVariantNode.variantChildren && closestVariantNode.variantChildren.add(child);
        return () => closestVariantNode.variantChildren.delete(child);
      }
    }
    /**
     * Add a motion value and bind it to this visual element.
     */
    addValue(key, value) {
      const existingValue = this.values.get(key);
      if (value !== existingValue) {
        if (existingValue)
          this.removeValue(key);
        this.bindToMotionValue(key, value);
        this.values.set(key, value);
        this.latestValues[key] = value.get();
      }
    }
    /**
     * Remove a motion value and unbind any active subscriptions.
     */
    removeValue(key) {
      this.values.delete(key);
      const unsubscribe = this.valueSubscriptions.get(key);
      if (unsubscribe) {
        unsubscribe();
        this.valueSubscriptions.delete(key);
      }
      delete this.latestValues[key];
      this.removeValueFromRenderState(key, this.renderState);
    }
    /**
     * Check whether we have a motion value for this key
     */
    hasValue(key) {
      return this.values.has(key);
    }
    getValue(key, defaultValue2) {
      if (this.props.values && this.props.values[key]) {
        return this.props.values[key];
      }
      let value = this.values.get(key);
      if (value === void 0 && defaultValue2 !== void 0) {
        value = motionValue(defaultValue2 === null ? void 0 : defaultValue2, { owner: this });
        this.addValue(key, value);
      }
      return value;
    }
    /**
     * If we're trying to animate to a previously unencountered value,
     * we need to check for it in our state and as a last resort read it
     * directly from the instance (which might have performance implications).
     */
    readValue(key, target) {
      var _a;
      let value = this.latestValues[key] !== void 0 || !this.current ? this.latestValues[key] : (_a = this.getBaseTargetFromProps(this.props, key)) !== null && _a !== void 0 ? _a : this.readValueFromInstance(this.current, key, this.options);
      if (value !== void 0 && value !== null) {
        if (typeof value === "string" && (isNumericalString(value) || isZeroValueString(value))) {
          value = parseFloat(value);
        } else if (!findValueType(value) && complex.test(target)) {
          value = getAnimatableNone2(key, target);
        }
        this.setBaseTarget(key, isMotionValue(value) ? value.get() : value);
      }
      return isMotionValue(value) ? value.get() : value;
    }
    /**
     * Set the base target to later animate back to. This is currently
     * only hydrated on creation and when we first read a value.
     */
    setBaseTarget(key, value) {
      this.baseTarget[key] = value;
    }
    /**
     * Find the base target for a value thats been removed from all animation
     * props.
     */
    getBaseTarget(key) {
      var _a;
      const { initial } = this.props;
      let valueFromInitial;
      if (typeof initial === "string" || typeof initial === "object") {
        const variant = resolveVariantFromProps(this.props, initial, (_a = this.presenceContext) === null || _a === void 0 ? void 0 : _a.custom);
        if (variant) {
          valueFromInitial = variant[key];
        }
      }
      if (initial && valueFromInitial !== void 0) {
        return valueFromInitial;
      }
      const target = this.getBaseTargetFromProps(this.props, key);
      if (target !== void 0 && !isMotionValue(target))
        return target;
      return this.initialValues[key] !== void 0 && valueFromInitial === void 0 ? void 0 : this.baseTarget[key];
    }
    on(eventName, callback) {
      if (!this.events[eventName]) {
        this.events[eventName] = new SubscriptionManager();
      }
      return this.events[eventName].add(callback);
    }
    notify(eventName, ...args) {
      if (this.events[eventName]) {
        this.events[eventName].notify(...args);
      }
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.mjs
  var DOMVisualElement = class extends VisualElement {
    constructor() {
      super(...arguments);
      this.KeyframeResolver = DOMKeyframesResolver;
    }
    sortInstanceNodePosition(a3, b3) {
      return a3.compareDocumentPosition(b3) & 2 ? 1 : -1;
    }
    getBaseTargetFromProps(props, key) {
      return props.style ? props.style[key] : void 0;
    }
    removeValueFromRenderState(key, { vars, style: style2 }) {
      delete vars[key];
      delete style2[key];
    }
    handleChildMotionValue() {
      if (this.childSubscription) {
        this.childSubscription();
        delete this.childSubscription;
      }
      const { children } = this.props;
      if (isMotionValue(children)) {
        this.childSubscription = children.on("change", (latest) => {
          if (this.current) {
            this.current.textContent = `${latest}`;
          }
        });
      }
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.mjs
  function getComputedStyle3(element) {
    return window.getComputedStyle(element);
  }
  var HTMLVisualElement = class extends DOMVisualElement {
    constructor() {
      super(...arguments);
      this.type = "html";
      this.renderInstance = renderHTML;
    }
    readValueFromInstance(instance, key) {
      if (transformProps.has(key)) {
        const defaultType = getDefaultValueType(key);
        return defaultType ? defaultType.default || 0 : 0;
      } else {
        const computedStyle = getComputedStyle3(instance);
        const value = (isCSSVariableName(key) ? computedStyle.getPropertyValue(key) : computedStyle[key]) || 0;
        return typeof value === "string" ? value.trim() : value;
      }
    }
    measureInstanceViewportBox(instance, { transformPagePoint }) {
      return measureViewportBox(instance, transformPagePoint);
    }
    build(renderState, latestValues, props) {
      buildHTMLStyles(renderState, latestValues, props.transformTemplate);
    }
    scrapeMotionValuesFromProps(props, prevProps, visualElement) {
      return scrapeMotionValuesFromProps(props, prevProps, visualElement);
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.mjs
  var SVGVisualElement = class extends DOMVisualElement {
    constructor() {
      super(...arguments);
      this.type = "svg";
      this.isSVGTag = false;
      this.measureInstanceViewportBox = createBox;
    }
    getBaseTargetFromProps(props, key) {
      return props[key];
    }
    readValueFromInstance(instance, key) {
      if (transformProps.has(key)) {
        const defaultType = getDefaultValueType(key);
        return defaultType ? defaultType.default || 0 : 0;
      }
      key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;
      return instance.getAttribute(key);
    }
    scrapeMotionValuesFromProps(props, prevProps, visualElement) {
      return scrapeMotionValuesFromProps2(props, prevProps, visualElement);
    }
    build(renderState, latestValues, props) {
      buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate);
    }
    renderInstance(instance, renderState, styleProp, projection) {
      renderSVG(instance, renderState, styleProp, projection);
    }
    mount(instance) {
      this.isSVGTag = isSVGTag(instance.tagName);
      super.mount(instance);
    }
  };

  // packages/components/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs
  var createDomVisualElement = (Component9, options2) => {
    return isSVGComponent(Component9) ? new SVGVisualElement(options2) : new HTMLVisualElement(options2, {
      allowProjection: Component9 !== import_react75.Fragment
    });
  };

  // packages/components/node_modules/framer-motion/dist/es/render/components/motion/create.mjs
  var createMotionComponent = /* @__PURE__ */ createMotionComponentFactory({
    ...animations,
    ...gestureAnimations,
    ...drag,
    ...layout
  }, createDomVisualElement);

  // packages/components/node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs
  var motion = /* @__PURE__ */ createDOMMotionComponentProxy(createMotionComponent);

  // packages/components/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs
  var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
  var import_react79 = __toESM(require_react(), 1);

  // packages/components/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs
  var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
  var React5 = __toESM(require_react(), 1);
  var import_react77 = __toESM(require_react(), 1);

  // packages/components/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs
  var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
  var React4 = __toESM(require_react(), 1);
  var import_react76 = __toESM(require_react(), 1);
  var PopChildMeasure = class extends React4.Component {
    getSnapshotBeforeUpdate(prevProps) {
      const element = this.props.childRef.current;
      if (element && prevProps.isPresent && !this.props.isPresent) {
        const size3 = this.props.sizeRef.current;
        size3.height = element.offsetHeight || 0;
        size3.width = element.offsetWidth || 0;
        size3.top = element.offsetTop;
        size3.left = element.offsetLeft;
      }
      return null;
    }
    /**
     * Required with getSnapshotBeforeUpdate to stop React complaining.
     */
    componentDidUpdate() {
    }
    render() {
      return this.props.children;
    }
  };
  function PopChild({ children, isPresent }) {
    const id3 = (0, import_react76.useId)();
    const ref = (0, import_react76.useRef)(null);
    const size3 = (0, import_react76.useRef)({
      width: 0,
      height: 0,
      top: 0,
      left: 0
    });
    const { nonce } = (0, import_react76.useContext)(MotionConfigContext);
    (0, import_react76.useInsertionEffect)(() => {
      const { width, height, top, left } = size3.current;
      if (isPresent || !ref.current || !width || !height)
        return;
      ref.current.dataset.motionPopId = id3;
      const style2 = document.createElement("style");
      if (nonce)
        style2.nonce = nonce;
      document.head.appendChild(style2);
      if (style2.sheet) {
        style2.sheet.insertRule(`
          [data-motion-pop-id="${id3}"] {
            position: absolute !important;
            width: ${width}px !important;
            height: ${height}px !important;
            top: ${top}px !important;
            left: ${left}px !important;
          }
        `);
      }
      return () => {
        document.head.removeChild(style2);
      };
    }, [isPresent]);
    return (0, import_jsx_runtime41.jsx)(PopChildMeasure, { isPresent, childRef: ref, sizeRef: size3, children: React4.cloneElement(children, { ref }) });
  }

  // packages/components/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs
  var PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode: mode2 }) => {
    const presenceChildren = useConstant(newChildrenMap);
    const id3 = (0, import_react77.useId)();
    const memoizedOnExitComplete = (0, import_react77.useCallback)((childId) => {
      presenceChildren.set(childId, true);
      for (const isComplete of presenceChildren.values()) {
        if (!isComplete)
          return;
      }
      onExitComplete && onExitComplete();
    }, [presenceChildren, onExitComplete]);
    const context = (0, import_react77.useMemo)(
      () => ({
        id: id3,
        initial,
        isPresent,
        custom,
        onExitComplete: memoizedOnExitComplete,
        register: (childId) => {
          presenceChildren.set(childId, false);
          return () => presenceChildren.delete(childId);
        }
      }),
      /**
       * If the presence of a child affects the layout of the components around it,
       * we want to make a new context value to ensure they get re-rendered
       * so they can detect that layout change.
       */
      presenceAffectsLayout ? [Math.random(), memoizedOnExitComplete] : [isPresent, memoizedOnExitComplete]
    );
    (0, import_react77.useMemo)(() => {
      presenceChildren.forEach((_2, key) => presenceChildren.set(key, false));
    }, [isPresent]);
    React5.useEffect(() => {
      !isPresent && !presenceChildren.size && onExitComplete && onExitComplete();
    }, [isPresent]);
    if (mode2 === "popLayout") {
      children = (0, import_jsx_runtime42.jsx)(PopChild, { isPresent, children });
    }
    return (0, import_jsx_runtime42.jsx)(PresenceContext.Provider, { value: context, children });
  };
  function newChildrenMap() {
    return /* @__PURE__ */ new Map();
  }

  // packages/components/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs
  var import_react78 = __toESM(require_react(), 1);
  var getChildKey = (child) => child.key || "";
  function onlyElements(children) {
    const filtered = [];
    import_react78.Children.forEach(children, (child) => {
      if ((0, import_react78.isValidElement)(child))
        filtered.push(child);
    });
    return filtered;
  }

  // packages/components/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs
  var AnimatePresence = ({ children, exitBeforeEnter, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode: mode2 = "sync" }) => {
    invariant2(!exitBeforeEnter, "Replace exitBeforeEnter with mode='wait'");
    const presentChildren = (0, import_react79.useMemo)(() => onlyElements(children), [children]);
    const presentKeys = presentChildren.map(getChildKey);
    const isInitialRender = (0, import_react79.useRef)(true);
    const pendingPresentChildren = (0, import_react79.useRef)(presentChildren);
    const exitComplete = useConstant(() => /* @__PURE__ */ new Map());
    const [diffedChildren, setDiffedChildren] = (0, import_react79.useState)(presentChildren);
    const [renderedChildren, setRenderedChildren] = (0, import_react79.useState)(presentChildren);
    useIsomorphicLayoutEffect(() => {
      isInitialRender.current = false;
      pendingPresentChildren.current = presentChildren;
      for (let i3 = 0; i3 < renderedChildren.length; i3++) {
        const key = getChildKey(renderedChildren[i3]);
        if (!presentKeys.includes(key)) {
          if (exitComplete.get(key) !== true) {
            exitComplete.set(key, false);
          }
        } else {
          exitComplete.delete(key);
        }
      }
    }, [renderedChildren, presentKeys.length, presentKeys.join("-")]);
    const exitingChildren = [];
    if (presentChildren !== diffedChildren) {
      let nextChildren = [...presentChildren];
      for (let i3 = 0; i3 < renderedChildren.length; i3++) {
        const child = renderedChildren[i3];
        const key = getChildKey(child);
        if (!presentKeys.includes(key)) {
          nextChildren.splice(i3, 0, child);
          exitingChildren.push(child);
        }
      }
      if (mode2 === "wait" && exitingChildren.length) {
        nextChildren = exitingChildren;
      }
      setRenderedChildren(onlyElements(nextChildren));
      setDiffedChildren(presentChildren);
      return;
    }
    if (mode2 === "wait" && renderedChildren.length > 1) {
      console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
    }
    const { forceRender } = (0, import_react79.useContext)(LayoutGroupContext);
    return (0, import_jsx_runtime43.jsx)(import_jsx_runtime43.Fragment, { children: renderedChildren.map((child) => {
      const key = getChildKey(child);
      const isPresent = presentChildren === renderedChildren || presentKeys.includes(key);
      const onExit = () => {
        if (exitComplete.has(key)) {
          exitComplete.set(key, true);
        } else {
          return;
        }
        let isEveryExitComplete = true;
        exitComplete.forEach((isExitComplete) => {
          if (!isExitComplete)
            isEveryExitComplete = false;
        });
        if (isEveryExitComplete) {
          forceRender === null || forceRender === void 0 ? void 0 : forceRender();
          setRenderedChildren(pendingPresentChildren.current);
          onExitComplete && onExitComplete();
        }
      };
      return (0, import_jsx_runtime43.jsx)(PresenceChild, { isPresent, initial: !isInitialRender.current || initial ? void 0 : false, custom: isPresent ? void 0 : custom, presenceAffectsLayout, mode: mode2, onExitComplete: isPresent ? void 0 : onExit, children: child }, key);
    }) });
  };

  // packages/components/build-module/utils/hooks/use-controlled-state.mjs
  var import_element9 = __toESM(require_element(), 1);

  // packages/components/build-module/utils/values.mjs
  function isValueDefined(value) {
    return value !== void 0 && value !== null;
  }
  function isValueEmpty(value) {
    const isEmptyString = value === "";
    return !isValueDefined(value) || isEmptyString;
  }
  function getDefinedValue(values = [], fallbackValue) {
    return values.find(isValueDefined) ?? fallbackValue;
  }
  var stringToNumber = (value) => {
    return parseFloat(value);
  };
  var ensureNumber = (value) => {
    return typeof value === "string" ? stringToNumber(value) : value;
  };

  // packages/components/build-module/utils/hooks/use-controlled-state.mjs
  var defaultOptions = {
    initial: void 0,
    /**
     * Defaults to empty string, as that is preferred for usage with
     * <input />, <textarea />, and <select /> form elements.
     */
    fallback: ""
  };
  function useControlledState(currentState, options2 = defaultOptions) {
    const {
      initial,
      fallback
    } = {
      ...defaultOptions,
      ...options2
    };
    const [internalState, setInternalState] = (0, import_element9.useState)(currentState);
    const hasCurrentState = isValueDefined(currentState);
    (0, import_element9.useEffect)(() => {
      if (hasCurrentState && internalState) {
        setInternalState(void 0);
      }
    }, [hasCurrentState, internalState]);
    const state = getDefinedValue([currentState, internalState, initial], fallback);
    const setState = (0, import_element9.useCallback)((nextState) => {
      if (!hasCurrentState) {
        setInternalState(nextState);
      }
    }, [hasCurrentState]);
    return [state, setState];
  }
  var use_controlled_state_default = useControlledState;

  // packages/components/build-module/utils/hooks/use-update-effect.mjs
  var import_element10 = __toESM(require_element(), 1);
  function useUpdateEffect2(effect, deps) {
    const mountedRef = (0, import_element10.useRef)(false);
    (0, import_element10.useEffect)(() => {
      if (mountedRef.current) {
        return effect();
      }
      mountedRef.current = true;
      return void 0;
    }, deps);
    (0, import_element10.useEffect)(() => () => {
      mountedRef.current = false;
    }, []);
  }
  var use_update_effect_default = useUpdateEffect2;

  // packages/components/build-module/utils/hooks/use-controlled-value.mjs
  var import_element11 = __toESM(require_element(), 1);
  function useControlledValue({
    defaultValue: defaultValue2,
    onChange,
    value: valueProp
  }) {
    const hasValue = typeof valueProp !== "undefined";
    const initialValue2 = hasValue ? valueProp : defaultValue2;
    const [state, setState] = (0, import_element11.useState)(initialValue2);
    const value = hasValue ? valueProp : state;
    const uncontrolledSetValue = (0, import_element11.useCallback)((nextValue, ...args) => {
      setState(nextValue);
      onChange?.(nextValue, ...args);
    }, [onChange]);
    let setValue;
    if (hasValue && typeof onChange === "function") {
      setValue = onChange;
    } else if (!hasValue && typeof onChange === "function") {
      setValue = uncontrolledSetValue;
    } else {
      setValue = setState;
    }
    return [value, setValue];
  }

  // node_modules/@emotion/react/dist/emotion-element-f0de968e.browser.esm.js
  var React7 = __toESM(require_react());
  var import_react80 = __toESM(require_react());

  // node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
  var isDevelopment = false;
  function sheetForTag(tag) {
    if (tag.sheet) {
      return tag.sheet;
    }
    for (var i3 = 0; i3 < document.styleSheets.length; i3++) {
      if (document.styleSheets[i3].ownerNode === tag) {
        return document.styleSheets[i3];
      }
    }
    return void 0;
  }
  function createStyleElement(options2) {
    var tag = document.createElement("style");
    tag.setAttribute("data-emotion", options2.key);
    if (options2.nonce !== void 0) {
      tag.setAttribute("nonce", options2.nonce);
    }
    tag.appendChild(document.createTextNode(""));
    tag.setAttribute("data-s", "");
    return tag;
  }
  var StyleSheet = /* @__PURE__ */ (function() {
    function StyleSheet2(options2) {
      var _this = this;
      this._insertTag = function(tag) {
        var before;
        if (_this.tags.length === 0) {
          if (_this.insertionPoint) {
            before = _this.insertionPoint.nextSibling;
          } else if (_this.prepend) {
            before = _this.container.firstChild;
          } else {
            before = _this.before;
          }
        } else {
          before = _this.tags[_this.tags.length - 1].nextSibling;
        }
        _this.container.insertBefore(tag, before);
        _this.tags.push(tag);
      };
      this.isSpeedy = options2.speedy === void 0 ? !isDevelopment : options2.speedy;
      this.tags = [];
      this.ctr = 0;
      this.nonce = options2.nonce;
      this.key = options2.key;
      this.container = options2.container;
      this.prepend = options2.prepend;
      this.insertionPoint = options2.insertionPoint;
      this.before = null;
    }
    var _proto = StyleSheet2.prototype;
    _proto.hydrate = function hydrate2(nodes) {
      nodes.forEach(this._insertTag);
    };
    _proto.insert = function insert2(rule) {
      if (this.ctr % (this.isSpeedy ? 65e3 : 1) === 0) {
        this._insertTag(createStyleElement(this));
      }
      var tag = this.tags[this.tags.length - 1];
      if (this.isSpeedy) {
        var sheet2 = sheetForTag(tag);
        try {
          sheet2.insertRule(rule, sheet2.cssRules.length);
        } catch (e3) {
        }
      } else {
        tag.appendChild(document.createTextNode(rule));
      }
      this.ctr++;
    };
    _proto.flush = function flush2() {
      this.tags.forEach(function(tag) {
        var _tag$parentNode;
        return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);
      });
      this.tags = [];
      this.ctr = 0;
    };
    return StyleSheet2;
  })();

  // node_modules/stylis/src/Enum.js
  var MS = "-ms-";
  var MOZ = "-moz-";
  var WEBKIT = "-webkit-";
  var COMMENT = "comm";
  var RULESET = "rule";
  var DECLARATION = "decl";
  var IMPORT = "@import";
  var KEYFRAMES = "@keyframes";
  var LAYER = "@layer";

  // node_modules/stylis/src/Utility.js
  var abs = Math.abs;
  var from = String.fromCharCode;
  var assign = Object.assign;
  function hash(value, length2) {
    return charat(value, 0) ^ 45 ? (((length2 << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
  }
  function trim(value) {
    return value.trim();
  }
  function match(value, pattern) {
    return (value = pattern.exec(value)) ? value[0] : value;
  }
  function replace(value, pattern, replacement) {
    return value.replace(pattern, replacement);
  }
  function indexof(value, search) {
    return value.indexOf(search);
  }
  function charat(value, index2) {
    return value.charCodeAt(index2) | 0;
  }
  function substr(value, begin, end) {
    return value.slice(begin, end);
  }
  function strlen(value) {
    return value.length;
  }
  function sizeof(value) {
    return value.length;
  }
  function append(value, array) {
    return array.push(value), value;
  }
  function combine(array, callback) {
    return array.map(callback).join("");
  }

  // node_modules/stylis/src/Tokenizer.js
  var line = 1;
  var column = 1;
  var length = 0;
  var position = 0;
  var character = 0;
  var characters = "";
  function node(value, root, parent, type, props, children, length2) {
    return { value, root, parent, type, props, children, line, column, length: length2, return: "" };
  }
  function copy(root, props) {
    return assign(node("", null, null, "", null, null, 0), root, { length: -root.length }, props);
  }
  function char() {
    return character;
  }
  function prev() {
    character = position > 0 ? charat(characters, --position) : 0;
    if (column--, character === 10)
      column = 1, line--;
    return character;
  }
  function next() {
    character = position < length ? charat(characters, position++) : 0;
    if (column++, character === 10)
      column = 1, line++;
    return character;
  }
  function peek() {
    return charat(characters, position);
  }
  function caret() {
    return position;
  }
  function slice(begin, end) {
    return substr(characters, begin, end);
  }
  function token(type) {
    switch (type) {
      // \0 \t \n \r \s whitespace token
      case 0:
      case 9:
      case 10:
      case 13:
      case 32:
        return 5;
      // ! + , / > @ ~ isolate token
      case 33:
      case 43:
      case 44:
      case 47:
      case 62:
      case 64:
      case 126:
      // ; { } breakpoint token
      case 59:
      case 123:
      case 125:
        return 4;
      // : accompanied token
      case 58:
        return 3;
      // " ' ( [ opening delimit token
      case 34:
      case 39:
      case 40:
      case 91:
        return 2;
      // ) ] closing delimit token
      case 41:
      case 93:
        return 1;
    }
    return 0;
  }
  function alloc(value) {
    return line = column = 1, length = strlen(characters = value), position = 0, [];
  }
  function dealloc(value) {
    return characters = "", value;
  }
  function delimit(type) {
    return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));
  }
  function whitespace(type) {
    while (character = peek())
      if (character < 33)
        next();
      else
        break;
    return token(type) > 2 || token(character) > 3 ? "" : " ";
  }
  function escaping(index2, count) {
    while (--count && next())
      if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97)
        break;
    return slice(index2, caret() + (count < 6 && peek() == 32 && next() == 32));
  }
  function delimiter(type) {
    while (next())
      switch (character) {
        // ] ) " '
        case type:
          return position;
        // " '
        case 34:
        case 39:
          if (type !== 34 && type !== 39)
            delimiter(character);
          break;
        // (
        case 40:
          if (type === 41)
            delimiter(type);
          break;
        // \
        case 92:
          next();
          break;
      }
    return position;
  }
  function commenter(type, index2) {
    while (next())
      if (type + character === 47 + 10)
        break;
      else if (type + character === 42 + 42 && peek() === 47)
        break;
    return "/*" + slice(index2, position - 1) + "*" + from(type === 47 ? type : next());
  }
  function identifier(index2) {
    while (!token(peek()))
      next();
    return slice(index2, position);
  }

  // node_modules/stylis/src/Parser.js
  function compile(value) {
    return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value));
  }
  function parse(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
    var index2 = 0;
    var offset3 = 0;
    var length2 = pseudo;
    var atrule = 0;
    var property = 0;
    var previous = 0;
    var variable = 1;
    var scanning = 1;
    var ampersand = 1;
    var character2 = 0;
    var type = "";
    var props = rules;
    var children = rulesets;
    var reference = rule;
    var characters2 = type;
    while (scanning)
      switch (previous = character2, character2 = next()) {
        // (
        case 40:
          if (previous != 108 && charat(characters2, length2 - 1) == 58) {
            if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f") != -1)
              ampersand = -1;
            break;
          }
        // " ' [
        case 34:
        case 39:
        case 91:
          characters2 += delimit(character2);
          break;
        // \t \n \r \s
        case 9:
        case 10:
        case 13:
        case 32:
          characters2 += whitespace(previous);
          break;
        // \
        case 92:
          characters2 += escaping(caret() - 1, 7);
          continue;
        // /
        case 47:
          switch (peek()) {
            case 42:
            case 47:
              append(comment(commenter(next(), caret()), root, parent), declarations);
              break;
            default:
              characters2 += "/";
          }
          break;
        // {
        case 123 * variable:
          points[index2++] = strlen(characters2) * ampersand;
        // } ; \0
        case 125 * variable:
        case 59:
        case 0:
          switch (character2) {
            // \0 }
            case 0:
            case 125:
              scanning = 0;
            // ;
            case 59 + offset3:
              if (ampersand == -1) characters2 = replace(characters2, /\f/g, "");
              if (property > 0 && strlen(characters2) - length2)
                append(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2), declarations);
              break;
            // @ ;
            case 59:
              characters2 += ";";
            // { rule/at-rule
            default:
              append(reference = ruleset(characters2, root, parent, index2, offset3, rules, points, type, props = [], children = [], length2), rulesets);
              if (character2 === 123)
                if (offset3 === 0)
                  parse(characters2, root, reference, reference, props, rulesets, length2, points, children);
                else
                  switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) {
                    // d l m s
                    case 100:
                    case 108:
                    case 109:
                    case 115:
                      parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length2), children), rules, children, length2, points, rule ? props : children);
                      break;
                    default:
                      parse(characters2, reference, reference, reference, [""], children, 0, points, children);
                  }
          }
          index2 = offset3 = property = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
          break;
        // :
        case 58:
          length2 = 1 + strlen(characters2), property = previous;
        default:
          if (variable < 1) {
            if (character2 == 123)
              --variable;
            else if (character2 == 125 && variable++ == 0 && prev() == 125)
              continue;
          }
          switch (characters2 += from(character2), character2 * variable) {
            // &
            case 38:
              ampersand = offset3 > 0 ? 1 : (characters2 += "\f", -1);
              break;
            // ,
            case 44:
              points[index2++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
              break;
            // @
            case 64:
              if (peek() === 45)
                characters2 += delimit(next());
              atrule = peek(), offset3 = length2 = strlen(type = characters2 += identifier(caret())), character2++;
              break;
            // -
            case 45:
              if (previous === 45 && strlen(characters2) == 2)
                variable = 0;
          }
      }
    return rulesets;
  }
  function ruleset(value, root, parent, index2, offset3, rules, points, type, props, children, length2) {
    var post = offset3 - 1;
    var rule = offset3 === 0 ? rules : [""];
    var size3 = sizeof(rule);
    for (var i3 = 0, j2 = 0, k3 = 0; i3 < index2; ++i3)
      for (var x2 = 0, y3 = substr(value, post + 1, post = abs(j2 = points[i3])), z2 = value; x2 < size3; ++x2)
        if (z2 = trim(j2 > 0 ? rule[x2] + " " + y3 : replace(y3, /&\f/g, rule[x2])))
          props[k3++] = z2;
    return node(value, root, parent, offset3 === 0 ? RULESET : type, props, children, length2);
  }
  function comment(value, root, parent) {
    return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0);
  }
  function declaration(value, root, parent, length2) {
    return node(value, root, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2);
  }

  // node_modules/stylis/src/Serializer.js
  function serialize(children, callback) {
    var output = "";
    var length2 = sizeof(children);
    for (var i3 = 0; i3 < length2; i3++)
      output += callback(children[i3], i3, children, callback) || "";
    return output;
  }
  function stringify(element, index2, children, callback) {
    switch (element.type) {
      case LAYER:
        if (element.children.length) break;
      case IMPORT:
      case DECLARATION:
        return element.return = element.return || element.value;
      case COMMENT:
        return "";
      case KEYFRAMES:
        return element.return = element.value + "{" + serialize(element.children, callback) + "}";
      case RULESET:
        element.value = element.props.join(",");
    }
    return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
  }

  // node_modules/stylis/src/Middleware.js
  function middleware(collection) {
    var length2 = sizeof(collection);
    return function(element, index2, children, callback) {
      var output = "";
      for (var i3 = 0; i3 < length2; i3++)
        output += collection[i3](element, index2, children, callback) || "";
      return output;
    };
  }
  function rulesheet(callback) {
    return function(element) {
      if (!element.root) {
        if (element = element.return)
          callback(element);
      }
    };
  }

  // node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js
  init_emotion_memoize_esm();
  var identifierWithPointTracking = function identifierWithPointTracking2(begin, points, index2) {
    var previous = 0;
    var character2 = 0;
    while (true) {
      previous = character2;
      character2 = peek();
      if (previous === 38 && character2 === 12) {
        points[index2] = 1;
      }
      if (token(character2)) {
        break;
      }
      next();
    }
    return slice(begin, position);
  };
  var toRules = function toRules2(parsed, points) {
    var index2 = -1;
    var character2 = 44;
    do {
      switch (token(character2)) {
        case 0:
          if (character2 === 38 && peek() === 12) {
            points[index2] = 1;
          }
          parsed[index2] += identifierWithPointTracking(position - 1, points, index2);
          break;
        case 2:
          parsed[index2] += delimit(character2);
          break;
        case 4:
          if (character2 === 44) {
            parsed[++index2] = peek() === 58 ? "&\f" : "";
            points[index2] = parsed[index2].length;
            break;
          }
        // fallthrough
        default:
          parsed[index2] += from(character2);
      }
    } while (character2 = next());
    return parsed;
  };
  var getRules = function getRules2(value, points) {
    return dealloc(toRules(alloc(value), points));
  };
  var fixedElements = /* @__PURE__ */ new WeakMap();
  var compat = function compat2(element) {
    if (element.type !== "rule" || !element.parent || // positive .length indicates that this rule contains pseudo
    // negative .length indicates that this rule has been already prefixed
    element.length < 1) {
      return;
    }
    var value = element.value;
    var parent = element.parent;
    var isImplicitRule = element.column === parent.column && element.line === parent.line;
    while (parent.type !== "rule") {
      parent = parent.parent;
      if (!parent) return;
    }
    if (element.props.length === 1 && value.charCodeAt(0) !== 58 && !fixedElements.get(parent)) {
      return;
    }
    if (isImplicitRule) {
      return;
    }
    fixedElements.set(element, true);
    var points = [];
    var rules = getRules(value, points);
    var parentRules = parent.props;
    for (var i3 = 0, k3 = 0; i3 < rules.length; i3++) {
      for (var j2 = 0; j2 < parentRules.length; j2++, k3++) {
        element.props[k3] = points[i3] ? rules[i3].replace(/&\f/g, parentRules[j2]) : parentRules[j2] + " " + rules[i3];
      }
    }
  };
  var removeLabel = function removeLabel2(element) {
    if (element.type === "decl") {
      var value = element.value;
      if (
        // charcode for l
        value.charCodeAt(0) === 108 && // charcode for b
        value.charCodeAt(2) === 98
      ) {
        element["return"] = "";
        element.value = "";
      }
    }
  };
  function prefix(value, length2) {
    switch (hash(value, length2)) {
      // color-adjust
      case 5103:
        return WEBKIT + "print-" + value + value;
      // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
      case 5737:
      case 4201:
      case 3177:
      case 3433:
      case 1641:
      case 4457:
      case 2921:
      // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
      case 5572:
      case 6356:
      case 5844:
      case 3191:
      case 6645:
      case 3005:
      // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
      case 6391:
      case 5879:
      case 5623:
      case 6135:
      case 4599:
      case 4855:
      // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
      case 4215:
      case 6389:
      case 5109:
      case 5365:
      case 5621:
      case 3829:
        return WEBKIT + value + value;
      // appearance, user-select, transform, hyphens, text-size-adjust
      case 5349:
      case 4246:
      case 4810:
      case 6968:
      case 2756:
        return WEBKIT + value + MOZ + value + MS + value + value;
      // flex, flex-direction
      case 6828:
      case 4268:
        return WEBKIT + value + MS + value + value;
      // order
      case 6165:
        return WEBKIT + value + MS + "flex-" + value + value;
      // align-items
      case 5187:
        return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + "box-$1$2" + MS + "flex-$1$2") + value;
      // align-self
      case 5443:
        return WEBKIT + value + MS + "flex-item-" + replace(value, /flex-|-self/, "") + value;
      // align-content
      case 4675:
        return WEBKIT + value + MS + "flex-line-pack" + replace(value, /align-content|flex-|-self/, "") + value;
      // flex-shrink
      case 5548:
        return WEBKIT + value + MS + replace(value, "shrink", "negative") + value;
      // flex-basis
      case 5292:
        return WEBKIT + value + MS + replace(value, "basis", "preferred-size") + value;
      // flex-grow
      case 6060:
        return WEBKIT + "box-" + replace(value, "-grow", "") + WEBKIT + value + MS + replace(value, "grow", "positive") + value;
      // transition
      case 4554:
        return WEBKIT + replace(value, /([^-])(transform)/g, "$1" + WEBKIT + "$2") + value;
      // cursor
      case 6187:
        return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + "$1"), /(image-set)/, WEBKIT + "$1"), value, "") + value;
      // background, background-image
      case 5495:
      case 3959:
        return replace(value, /(image-set\([^]*)/, WEBKIT + "$1$`$1");
      // justify-content
      case 4968:
        return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + "box-pack:$3" + MS + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + WEBKIT + value + value;
      // (margin|padding)-inline-(start|end)
      case 4095:
      case 3583:
      case 4068:
      case 2532:
        return replace(value, /(.+)-inline(.+)/, WEBKIT + "$1$2") + value;
      // (min|max)?(width|height|inline-size|block-size)
      case 8116:
      case 7059:
      case 5753:
      case 5535:
      case 5445:
      case 5701:
      case 4933:
      case 4677:
      case 5533:
      case 5789:
      case 5021:
      case 4765:
        if (strlen(value) - 1 - length2 > 6) switch (charat(value, length2 + 1)) {
          // (m)ax-content, (m)in-content
          case 109:
            if (charat(value, length2 + 4) !== 45) break;
          // (f)ill-available, (f)it-content
          case 102:
            return replace(value, /(.+:)(.+)-([^]+)/, "$1" + WEBKIT + "$2-$3$1" + MOZ + (charat(value, length2 + 3) == 108 ? "$3" : "$2-$3")) + value;
          // (s)tretch
          case 115:
            return ~indexof(value, "stretch") ? prefix(replace(value, "stretch", "fill-available"), length2) + value : value;
        }
        break;
      // position: sticky
      case 4949:
        if (charat(value, length2 + 1) !== 115) break;
      // display: (flex|inline-flex)
      case 6444:
        switch (charat(value, strlen(value) - 3 - (~indexof(value, "!important") && 10))) {
          // stic(k)y
          case 107:
            return replace(value, ":", ":" + WEBKIT) + value;
          // (inline-)?fl(e)x
          case 101:
            return replace(value, /(.+:)([^;!]+)(;|!.+)?/, "$1" + WEBKIT + (charat(value, 14) === 45 ? "inline-" : "") + "box$3$1" + WEBKIT + "$2$3$1" + MS + "$2box$3") + value;
        }
        break;
      // writing-mode
      case 5936:
        switch (charat(value, length2 + 11)) {
          // vertical-l(r)
          case 114:
            return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb") + value;
          // vertical-r(l)
          case 108:
            return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb-rl") + value;
          // horizontal(-)tb
          case 45:
            return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "lr") + value;
        }
        return WEBKIT + value + MS + value + value;
    }
    return value;
  }
  var prefixer = function prefixer2(element, index2, children, callback) {
    if (element.length > -1) {
      if (!element["return"]) switch (element.type) {
        case DECLARATION:
          element["return"] = prefix(element.value, element.length);
          break;
        case KEYFRAMES:
          return serialize([copy(element, {
            value: replace(element.value, "@", "@" + WEBKIT)
          })], callback);
        case RULESET:
          if (element.length) return combine(element.props, function(value) {
            switch (match(value, /(::plac\w+|:read-\w+)/)) {
              // :read-(only|write)
              case ":read-only":
              case ":read-write":
                return serialize([copy(element, {
                  props: [replace(value, /:(read-\w+)/, ":" + MOZ + "$1")]
                })], callback);
              // :placeholder
              case "::placeholder":
                return serialize([copy(element, {
                  props: [replace(value, /:(plac\w+)/, ":" + WEBKIT + "input-$1")]
                }), copy(element, {
                  props: [replace(value, /:(plac\w+)/, ":" + MOZ + "$1")]
                }), copy(element, {
                  props: [replace(value, /:(plac\w+)/, MS + "input-$1")]
                })], callback);
            }
            return "";
          });
      }
    }
  };
  var defaultStylisPlugins = [prefixer];
  var createCache = function createCache2(options2) {
    var key = options2.key;
    if (key === "css") {
      var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])");
      Array.prototype.forEach.call(ssrStyles, function(node2) {
        var dataEmotionAttribute = node2.getAttribute("data-emotion");
        if (dataEmotionAttribute.indexOf(" ") === -1) {
          return;
        }
        document.head.appendChild(node2);
        node2.setAttribute("data-s", "");
      });
    }
    var stylisPlugins = options2.stylisPlugins || defaultStylisPlugins;
    var inserted = {};
    var container;
    var nodesToHydrate = [];
    {
      container = options2.container || document.head;
      Array.prototype.forEach.call(
        // this means we will ignore elements which don't have a space in them which
        // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
        document.querySelectorAll('style[data-emotion^="' + key + ' "]'),
        function(node2) {
          var attrib = node2.getAttribute("data-emotion").split(" ");
          for (var i3 = 1; i3 < attrib.length; i3++) {
            inserted[attrib[i3]] = true;
          }
          nodesToHydrate.push(node2);
        }
      );
    }
    var _insert;
    var omnipresentPlugins = [compat, removeLabel];
    {
      var currentSheet;
      var finalizingPlugins = [stringify, rulesheet(function(rule) {
        currentSheet.insert(rule);
      })];
      var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
      var stylis = function stylis2(styles3) {
        return serialize(compile(styles3), serializer);
      };
      _insert = function insert2(selector2, serialized, sheet2, shouldCache) {
        currentSheet = sheet2;
        stylis(selector2 ? selector2 + "{" + serialized.styles + "}" : serialized.styles);
        if (shouldCache) {
          cache2.inserted[serialized.name] = true;
        }
      };
    }
    var cache2 = {
      key,
      sheet: new StyleSheet({
        key,
        container,
        nonce: options2.nonce,
        speedy: options2.speedy,
        prepend: options2.prepend,
        insertionPoint: options2.insertionPoint
      }),
      nonce: options2.nonce,
      inserted,
      registered: {},
      insert: _insert
    };
    cache2.sheet.hydrate(nodesToHydrate);
    return cache2;
  };

  // node_modules/@babel/runtime/helpers/esm/extends.js
  function _extends() {
    return _extends = Object.assign ? Object.assign.bind() : function(n3) {
      for (var e3 = 1; e3 < arguments.length; e3++) {
        var t4 = arguments[e3];
        for (var r4 in t4) ({}).hasOwnProperty.call(t4, r4) && (n3[r4] = t4[r4]);
      }
      return n3;
    }, _extends.apply(null, arguments);
  }

  // node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js
  var isBrowser2 = true;
  function getRegisteredStyles(registered, registeredStyles, classNames) {
    var rawClassName = "";
    classNames.split(" ").forEach(function(className2) {
      if (registered[className2] !== void 0) {
        registeredStyles.push(registered[className2] + ";");
      } else if (className2) {
        rawClassName += className2 + " ";
      }
    });
    return rawClassName;
  }
  var registerStyles = function registerStyles2(cache2, serialized, isStringTag) {
    var className2 = cache2.key + "-" + serialized.name;
    if (
      // we only need to add the styles to the registered cache if the
      // class name could be used further down
      // the tree but if it's a string tag, we know it won't
      // so we don't have to add it to registered cache.
      // this improves memory usage since we can avoid storing the whole style string
      (isStringTag === false || // we need to always store it if we're in compat mode and
      // in node since emotion-server relies on whether a style is in
      // the registered cache to know whether a style is global or not
      // also, note that this check will be dead code eliminated in the browser
      isBrowser2 === false) && cache2.registered[className2] === void 0
    ) {
      cache2.registered[className2] = serialized.styles;
    }
  };
  var insertStyles = function insertStyles2(cache2, serialized, isStringTag) {
    registerStyles(cache2, serialized, isStringTag);
    var className2 = cache2.key + "-" + serialized.name;
    if (cache2.inserted[serialized.name] === void 0) {
      var current = serialized;
      do {
        cache2.insert(serialized === current ? "." + className2 : "", current, cache2.sheet, true);
        current = current.next;
      } while (current !== void 0);
    }
  };

  // node_modules/@emotion/hash/dist/emotion-hash.esm.js
  function murmur2(str) {
    var h3 = 0;
    var k3, i3 = 0, len = str.length;
    for (; len >= 4; ++i3, len -= 4) {
      k3 = str.charCodeAt(i3) & 255 | (str.charCodeAt(++i3) & 255) << 8 | (str.charCodeAt(++i3) & 255) << 16 | (str.charCodeAt(++i3) & 255) << 24;
      k3 = /* Math.imul(k, m): */
      (k3 & 65535) * 1540483477 + ((k3 >>> 16) * 59797 << 16);
      k3 ^= /* k >>> r: */
      k3 >>> 24;
      h3 = /* Math.imul(k, m): */
      (k3 & 65535) * 1540483477 + ((k3 >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
      (h3 & 65535) * 1540483477 + ((h3 >>> 16) * 59797 << 16);
    }
    switch (len) {
      case 3:
        h3 ^= (str.charCodeAt(i3 + 2) & 255) << 16;
      case 2:
        h3 ^= (str.charCodeAt(i3 + 1) & 255) << 8;
      case 1:
        h3 ^= str.charCodeAt(i3) & 255;
        h3 = /* Math.imul(h, m): */
        (h3 & 65535) * 1540483477 + ((h3 >>> 16) * 59797 << 16);
    }
    h3 ^= h3 >>> 13;
    h3 = /* Math.imul(h, m): */
    (h3 & 65535) * 1540483477 + ((h3 >>> 16) * 59797 << 16);
    return ((h3 ^ h3 >>> 15) >>> 0).toString(36);
  }

  // node_modules/@emotion/unitless/dist/emotion-unitless.esm.js
  var unitlessKeys = {
    animationIterationCount: 1,
    aspectRatio: 1,
    borderImageOutset: 1,
    borderImageSlice: 1,
    borderImageWidth: 1,
    boxFlex: 1,
    boxFlexGroup: 1,
    boxOrdinalGroup: 1,
    columnCount: 1,
    columns: 1,
    flex: 1,
    flexGrow: 1,
    flexPositive: 1,
    flexShrink: 1,
    flexNegative: 1,
    flexOrder: 1,
    gridRow: 1,
    gridRowEnd: 1,
    gridRowSpan: 1,
    gridRowStart: 1,
    gridColumn: 1,
    gridColumnEnd: 1,
    gridColumnSpan: 1,
    gridColumnStart: 1,
    msGridRow: 1,
    msGridRowSpan: 1,
    msGridColumn: 1,
    msGridColumnSpan: 1,
    fontWeight: 1,
    lineHeight: 1,
    opacity: 1,
    order: 1,
    orphans: 1,
    scale: 1,
    tabSize: 1,
    widows: 1,
    zIndex: 1,
    zoom: 1,
    WebkitLineClamp: 1,
    // SVG-related properties
    fillOpacity: 1,
    floodOpacity: 1,
    stopOpacity: 1,
    strokeDasharray: 1,
    strokeDashoffset: 1,
    strokeMiterlimit: 1,
    strokeOpacity: 1,
    strokeWidth: 1
  };

  // node_modules/@emotion/serialize/dist/emotion-serialize.esm.js
  init_emotion_memoize_esm();
  var isDevelopment2 = false;
  var hyphenateRegex = /[A-Z]|^ms/g;
  var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
  var isCustomProperty = function isCustomProperty2(property) {
    return property.charCodeAt(1) === 45;
  };
  var isProcessableValue = function isProcessableValue2(value) {
    return value != null && typeof value !== "boolean";
  };
  var processStyleName = /* @__PURE__ */ memoize(function(styleName) {
    return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, "-$&").toLowerCase();
  });
  var processStyleValue = function processStyleValue2(key, value) {
    switch (key) {
      case "animation":
      case "animationName": {
        if (typeof value === "string") {
          return value.replace(animationRegex, function(match4, p1, p22) {
            cursor = {
              name: p1,
              styles: p22,
              next: cursor
            };
            return p1;
          });
        }
      }
    }
    if (unitlessKeys[key] !== 1 && !isCustomProperty(key) && typeof value === "number" && value !== 0) {
      return value + "px";
    }
    return value;
  };
  var noComponentSelectorMessage = "Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";
  function handleInterpolation(mergedProps, registered, interpolation) {
    if (interpolation == null) {
      return "";
    }
    var componentSelector = interpolation;
    if (componentSelector.__emotion_styles !== void 0) {
      return componentSelector;
    }
    switch (typeof interpolation) {
      case "boolean": {
        return "";
      }
      case "object": {
        var keyframes4 = interpolation;
        if (keyframes4.anim === 1) {
          cursor = {
            name: keyframes4.name,
            styles: keyframes4.styles,
            next: cursor
          };
          return keyframes4.name;
        }
        var serializedStyles = interpolation;
        if (serializedStyles.styles !== void 0) {
          var next2 = serializedStyles.next;
          if (next2 !== void 0) {
            while (next2 !== void 0) {
              cursor = {
                name: next2.name,
                styles: next2.styles,
                next: cursor
              };
              next2 = next2.next;
            }
          }
          var styles3 = serializedStyles.styles + ";";
          return styles3;
        }
        return createStringFromObject(mergedProps, registered, interpolation);
      }
      case "function": {
        if (mergedProps !== void 0) {
          var previousCursor = cursor;
          var result = interpolation(mergedProps);
          cursor = previousCursor;
          return handleInterpolation(mergedProps, registered, result);
        }
        break;
      }
    }
    var asString = interpolation;
    if (registered == null) {
      return asString;
    }
    var cached = registered[asString];
    return cached !== void 0 ? cached : asString;
  }
  function createStringFromObject(mergedProps, registered, obj) {
    var string = "";
    if (Array.isArray(obj)) {
      for (var i3 = 0; i3 < obj.length; i3++) {
        string += handleInterpolation(mergedProps, registered, obj[i3]) + ";";
      }
    } else {
      for (var key in obj) {
        var value = obj[key];
        if (typeof value !== "object") {
          var asString = value;
          if (registered != null && registered[asString] !== void 0) {
            string += key + "{" + registered[asString] + "}";
          } else if (isProcessableValue(asString)) {
            string += processStyleName(key) + ":" + processStyleValue(key, asString) + ";";
          }
        } else {
          if (key === "NO_COMPONENT_SELECTOR" && isDevelopment2) {
            throw new Error(noComponentSelectorMessage);
          }
          if (Array.isArray(value) && typeof value[0] === "string" && (registered == null || registered[value[0]] === void 0)) {
            for (var _i = 0; _i < value.length; _i++) {
              if (isProcessableValue(value[_i])) {
                string += processStyleName(key) + ":" + processStyleValue(key, value[_i]) + ";";
              }
            }
          } else {
            var interpolated = handleInterpolation(mergedProps, registered, value);
            switch (key) {
              case "animation":
              case "animationName": {
                string += processStyleName(key) + ":" + interpolated + ";";
                break;
              }
              default: {
                string += key + "{" + interpolated + "}";
              }
            }
          }
        }
      }
    }
    return string;
  }
  var labelPattern = /label:\s*([^\s;{]+)\s*(;|$)/g;
  var cursor;
  function serializeStyles(args, registered, mergedProps) {
    if (args.length === 1 && typeof args[0] === "object" && args[0] !== null && args[0].styles !== void 0) {
      return args[0];
    }
    var stringMode = true;
    var styles3 = "";
    cursor = void 0;
    var strings = args[0];
    if (strings == null || strings.raw === void 0) {
      stringMode = false;
      styles3 += handleInterpolation(mergedProps, registered, strings);
    } else {
      var asTemplateStringsArr = strings;
      styles3 += asTemplateStringsArr[0];
    }
    for (var i3 = 1; i3 < args.length; i3++) {
      styles3 += handleInterpolation(mergedProps, registered, args[i3]);
      if (stringMode) {
        var templateStringsArr = strings;
        styles3 += templateStringsArr[i3];
      }
    }
    labelPattern.lastIndex = 0;
    var identifierName = "";
    var match4;
    while ((match4 = labelPattern.exec(styles3)) !== null) {
      identifierName += "-" + match4[1];
    }
    var name = murmur2(styles3) + identifierName;
    return {
      name,
      styles: styles3,
      next: cursor
    };
  }

  // node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js
  var React6 = __toESM(require_react());
  var syncFallback = function syncFallback2(create2) {
    return create2();
  };
  var useInsertionEffect4 = React6["useInsertionEffect"] ? React6["useInsertionEffect"] : false;
  var useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect4 || syncFallback;

  // node_modules/@emotion/react/dist/emotion-element-f0de968e.browser.esm.js
  var isDevelopment3 = false;
  var EmotionCacheContext = /* @__PURE__ */ React7.createContext(
    // we're doing this to avoid preconstruct's dead code elimination in this one case
    // because this module is primarily intended for the browser and node
    // but it's also required in react native and similar environments sometimes
    // and we could have a special build just for that
    // but this is much easier and the native packages
    // might use a different theme context in the future anyway
    typeof HTMLElement !== "undefined" ? /* @__PURE__ */ createCache({
      key: "css"
    }) : null
  );
  var CacheProvider = EmotionCacheContext.Provider;
  var __unsafe_useEmotionCache = function useEmotionCache() {
    return (0, import_react80.useContext)(EmotionCacheContext);
  };
  var withEmotionCache = function withEmotionCache2(func) {
    return /* @__PURE__ */ (0, import_react80.forwardRef)(function(props, ref) {
      var cache2 = (0, import_react80.useContext)(EmotionCacheContext);
      return func(props, cache2, ref);
    });
  };
  var ThemeContext = /* @__PURE__ */ React7.createContext({});
  var hasOwn = {}.hasOwnProperty;
  var typePropName = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__";
  var createEmotionProps = function createEmotionProps2(type, props) {
    var newProps = {};
    for (var _key in props) {
      if (hasOwn.call(props, _key)) {
        newProps[_key] = props[_key];
      }
    }
    newProps[typePropName] = type;
    return newProps;
  };
  var Insertion = function Insertion2(_ref11) {
    var cache2 = _ref11.cache, serialized = _ref11.serialized, isStringTag = _ref11.isStringTag;
    registerStyles(cache2, serialized, isStringTag);
    useInsertionEffectAlwaysWithSyncFallback(function() {
      return insertStyles(cache2, serialized, isStringTag);
    });
    return null;
  };
  var Emotion = /* @__PURE__ */ withEmotionCache(function(props, cache2, ref) {
    var cssProp = props.css;
    if (typeof cssProp === "string" && cache2.registered[cssProp] !== void 0) {
      cssProp = cache2.registered[cssProp];
    }
    var WrappedComponent = props[typePropName];
    var registeredStyles = [cssProp];
    var className2 = "";
    if (typeof props.className === "string") {
      className2 = getRegisteredStyles(cache2.registered, registeredStyles, props.className);
    } else if (props.className != null) {
      className2 = props.className + " ";
    }
    var serialized = serializeStyles(registeredStyles, void 0, React7.useContext(ThemeContext));
    className2 += cache2.key + "-" + serialized.name;
    var newProps = {};
    for (var _key2 in props) {
      if (hasOwn.call(props, _key2) && _key2 !== "css" && _key2 !== typePropName && !isDevelopment3) {
        newProps[_key2] = props[_key2];
      }
    }
    newProps.className = className2;
    if (ref) {
      newProps.ref = ref;
    }
    return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(Insertion, {
      cache: cache2,
      serialized,
      isStringTag: typeof WrappedComponent === "string"
    }), /* @__PURE__ */ React7.createElement(WrappedComponent, newProps));
  });
  var Emotion$1 = Emotion;

  // node_modules/@emotion/react/dist/emotion-react.browser.esm.js
  var React8 = __toESM(require_react());
  var import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs());
  var jsx36 = function jsx37(type, props) {
    var args = arguments;
    if (props == null || !hasOwn.call(props, "css")) {
      return React8.createElement.apply(void 0, args);
    }
    var argsLength = args.length;
    var createElementArgArray = new Array(argsLength);
    createElementArgArray[0] = Emotion$1;
    createElementArgArray[1] = createEmotionProps(type, props);
    for (var i3 = 2; i3 < argsLength; i3++) {
      createElementArgArray[i3] = args[i3];
    }
    return React8.createElement.apply(null, createElementArgArray);
  };
  (function(_jsx269) {
    var JSX;
    /* @__PURE__ */ (function(_JSX) {
    })(JSX || (JSX = _jsx269.JSX || (_jsx269.JSX = {})));
  })(jsx36 || (jsx36 = {}));
  function css() {
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    return serializeStyles(args);
  }
  function keyframes2() {
    var insertable = css.apply(void 0, arguments);
    var name = "animation-" + insertable.name;
    return {
      name,
      styles: "@keyframes " + name + "{" + insertable.styles + "}",
      anim: 1,
      toString: function toString() {
        return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
      }
    };
  }

  // packages/components/node_modules/@emotion/css/create-instance/dist/emotion-css-create-instance.esm.js
  function insertWithoutScoping(cache2, serialized) {
    if (cache2.inserted[serialized.name] === void 0) {
      return cache2.insert("", serialized, cache2.sheet, true);
    }
  }
  function merge(registered, css3, className2) {
    var registeredStyles = [];
    var rawClassName = getRegisteredStyles(registered, registeredStyles, className2);
    if (registeredStyles.length < 2) {
      return className2;
    }
    return rawClassName + css3(registeredStyles);
  }
  var createEmotion = function createEmotion2(options2) {
    var cache2 = createCache(options2);
    cache2.sheet.speedy = function(value) {
      this.isSpeedy = value;
    };
    cache2.compat = true;
    var css3 = function css4() {
      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
      var serialized = serializeStyles(args, cache2.registered, void 0);
      insertStyles(cache2, serialized, false);
      return cache2.key + "-" + serialized.name;
    };
    var keyframes4 = function keyframes5() {
      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
        args[_key2] = arguments[_key2];
      }
      var serialized = serializeStyles(args, cache2.registered);
      var animation = "animation-" + serialized.name;
      insertWithoutScoping(cache2, {
        name: serialized.name,
        styles: "@keyframes " + animation + "{" + serialized.styles + "}"
      });
      return animation;
    };
    var injectGlobal2 = function injectGlobal3() {
      for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
        args[_key3] = arguments[_key3];
      }
      var serialized = serializeStyles(args, cache2.registered);
      insertWithoutScoping(cache2, serialized);
    };
    var cx3 = function cx4() {
      for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
        args[_key4] = arguments[_key4];
      }
      return merge(cache2.registered, css3, classnames(args));
    };
    return {
      css: css3,
      cx: cx3,
      injectGlobal: injectGlobal2,
      keyframes: keyframes4,
      hydrate: function hydrate2(ids) {
        ids.forEach(function(key) {
          cache2.inserted[key] = true;
        });
      },
      flush: function flush2() {
        cache2.registered = {};
        cache2.inserted = {};
        cache2.sheet.flush();
      },
      sheet: cache2.sheet,
      cache: cache2,
      getRegisteredStyles: getRegisteredStyles.bind(null, cache2.registered),
      merge: merge.bind(null, cache2.registered, css3)
    };
  };
  var classnames = function classnames2(args) {
    var cls = "";
    for (var i3 = 0; i3 < args.length; i3++) {
      var arg = args[i3];
      if (arg == null) continue;
      var toAdd = void 0;
      switch (typeof arg) {
        case "boolean":
          break;
        case "object": {
          if (Array.isArray(arg)) {
            toAdd = classnames2(arg);
          } else {
            toAdd = "";
            for (var k3 in arg) {
              if (arg[k3] && k3) {
                toAdd && (toAdd += " ");
                toAdd += k3;
              }
            }
          }
          break;
        }
        default: {
          toAdd = arg;
        }
      }
      if (toAdd) {
        cls && (cls += " ");
        cls += toAdd;
      }
    }
    return cls;
  };

  // packages/components/node_modules/@emotion/css/dist/emotion-css.esm.js
  var _createEmotion = createEmotion({
    key: "css"
  });
  var flush = _createEmotion.flush;
  var hydrate = _createEmotion.hydrate;
  var cx2 = _createEmotion.cx;
  var merge2 = _createEmotion.merge;
  var getRegisteredStyles2 = _createEmotion.getRegisteredStyles;
  var injectGlobal = _createEmotion.injectGlobal;
  var keyframes3 = _createEmotion.keyframes;
  var css2 = _createEmotion.css;
  var sheet = _createEmotion.sheet;
  var cache = _createEmotion.cache;

  // packages/components/build-module/utils/hooks/use-cx.mjs
  var import_element12 = __toESM(require_element(), 1);
  var isSerializedStyles = (o4) => typeof o4 !== "undefined" && o4 !== null && ["name", "styles"].every((p3) => typeof o4[p3] !== "undefined");
  var useCx = () => {
    const cache2 = __unsafe_useEmotionCache();
    const cx3 = (0, import_element12.useCallback)((...classNames) => {
      if (cache2 === null) {
        throw new Error("The `useCx` hook should be only used within a valid Emotion Cache Context");
      }
      return cx2(...classNames.map((arg) => {
        if (isSerializedStyles(arg)) {
          insertStyles(cache2, arg, false);
          return `${cache2.key}-${arg.name}`;
        }
        return arg;
      }));
    }, [cache2]);
    return cx3;
  };

  // packages/components/build-module/utils/box-sizing.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var boxSizingReset = false ? {
    name: "kv6lnz",
    styles: "box-sizing:border-box;*,*::before,*::after{box-sizing:inherit;}"
  } : {
    name: "1pa5nhz-boxSizingReset",
    styles: "box-sizing:border-box;*,*::before,*::after{box-sizing:inherit;};label:boxSizingReset;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJveC1zaXppbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS2lDIiwiZmlsZSI6ImJveC1zaXppbmcudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmV4cG9ydCBjb25zdCBib3hTaXppbmdSZXNldCA9IGNzc2Bcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQqLFxuXHQqOjpiZWZvcmUsXG5cdCo6OmFmdGVyIHtcblx0XHRib3gtc2l6aW5nOiBpbmhlcml0O1xuXHR9XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__
  };

  // node_modules/memize/dist/index.js
  function memize(fn, options2) {
    var size3 = 0;
    var head;
    var tail;
    options2 = options2 || {};
    function memoized() {
      var node2 = head, len = arguments.length, args, i3;
      searchCache: while (node2) {
        if (node2.args.length !== arguments.length) {
          node2 = node2.next;
          continue;
        }
        for (i3 = 0; i3 < len; i3++) {
          if (node2.args[i3] !== arguments[i3]) {
            node2 = node2.next;
            continue searchCache;
          }
        }
        if (node2 !== head) {
          if (node2 === tail) {
            tail = node2.prev;
          }
          node2.prev.next = node2.next;
          if (node2.next) {
            node2.next.prev = node2.prev;
          }
          node2.next = head;
          node2.prev = null;
          head.prev = node2;
          head = node2;
        }
        return node2.val;
      }
      args = new Array(len);
      for (i3 = 0; i3 < len; i3++) {
        args[i3] = arguments[i3];
      }
      node2 = {
        args,
        // Generate the result from original function
        val: fn.apply(null, args)
      };
      if (head) {
        head.prev = node2;
        node2.next = head;
      } else {
        tail = node2;
      }
      if (size3 === /** @type {MemizeOptions} */
      options2.maxSize) {
        tail = /** @type {MemizeCacheNode} */
        tail.prev;
        tail.next = null;
      } else {
        size3++;
      }
      head = node2;
      return node2.val;
    }
    memoized.clear = function() {
      head = null;
      tail = null;
      size3 = 0;
    };
    return memoized;
  }

  // node_modules/colord/index.mjs
  var r2 = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) };
  var t = function(r4) {
    return "string" == typeof r4 ? r4.length > 0 : "number" == typeof r4;
  };
  var n = function(r4, t4, n3) {
    return void 0 === t4 && (t4 = 0), void 0 === n3 && (n3 = Math.pow(10, t4)), Math.round(n3 * r4) / n3 + 0;
  };
  var e = function(r4, t4, n3) {
    return void 0 === t4 && (t4 = 0), void 0 === n3 && (n3 = 1), r4 > n3 ? n3 : r4 > t4 ? r4 : t4;
  };
  var u = function(r4) {
    return (r4 = isFinite(r4) ? r4 % 360 : 0) > 0 ? r4 : r4 + 360;
  };
  var a = function(r4) {
    return { r: e(r4.r, 0, 255), g: e(r4.g, 0, 255), b: e(r4.b, 0, 255), a: e(r4.a) };
  };
  var o = function(r4) {
    return { r: n(r4.r), g: n(r4.g), b: n(r4.b), a: n(r4.a, 3) };
  };
  var i = /^#([0-9a-f]{3,8})$/i;
  var s = function(r4) {
    var t4 = r4.toString(16);
    return t4.length < 2 ? "0" + t4 : t4;
  };
  var h = function(r4) {
    var t4 = r4.r, n3 = r4.g, e3 = r4.b, u3 = r4.a, a3 = Math.max(t4, n3, e3), o4 = a3 - Math.min(t4, n3, e3), i3 = o4 ? a3 === t4 ? (n3 - e3) / o4 : a3 === n3 ? 2 + (e3 - t4) / o4 : 4 + (t4 - n3) / o4 : 0;
    return { h: 60 * (i3 < 0 ? i3 + 6 : i3), s: a3 ? o4 / a3 * 100 : 0, v: a3 / 255 * 100, a: u3 };
  };
  var b = function(r4) {
    var t4 = r4.h, n3 = r4.s, e3 = r4.v, u3 = r4.a;
    t4 = t4 / 360 * 6, n3 /= 100, e3 /= 100;
    var a3 = Math.floor(t4), o4 = e3 * (1 - n3), i3 = e3 * (1 - (t4 - a3) * n3), s3 = e3 * (1 - (1 - t4 + a3) * n3), h3 = a3 % 6;
    return { r: 255 * [e3, i3, o4, o4, s3, e3][h3], g: 255 * [s3, e3, e3, i3, o4, o4][h3], b: 255 * [o4, o4, s3, e3, e3, i3][h3], a: u3 };
  };
  var g = function(r4) {
    return { h: u(r4.h), s: e(r4.s, 0, 100), l: e(r4.l, 0, 100), a: e(r4.a) };
  };
  var d = function(r4) {
    return { h: n(r4.h), s: n(r4.s), l: n(r4.l), a: n(r4.a, 3) };
  };
  var f = function(r4) {
    return b((n3 = (t4 = r4).s, { h: t4.h, s: (n3 *= ((e3 = t4.l) < 50 ? e3 : 100 - e3) / 100) > 0 ? 2 * n3 / (e3 + n3) * 100 : 0, v: e3 + n3, a: t4.a }));
    var t4, n3, e3;
  };
  var c = function(r4) {
    return { h: (t4 = h(r4)).h, s: (u3 = (200 - (n3 = t4.s)) * (e3 = t4.v) / 100) > 0 && u3 < 200 ? n3 * e3 / 100 / (u3 <= 100 ? u3 : 200 - u3) * 100 : 0, l: u3 / 2, a: t4.a };
    var t4, n3, e3, u3;
  };
  var l = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var p = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var v = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var m = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var y = { string: [[function(r4) {
    var t4 = i.exec(r4);
    return t4 ? (r4 = t4[1]).length <= 4 ? { r: parseInt(r4[0] + r4[0], 16), g: parseInt(r4[1] + r4[1], 16), b: parseInt(r4[2] + r4[2], 16), a: 4 === r4.length ? n(parseInt(r4[3] + r4[3], 16) / 255, 2) : 1 } : 6 === r4.length || 8 === r4.length ? { r: parseInt(r4.substr(0, 2), 16), g: parseInt(r4.substr(2, 2), 16), b: parseInt(r4.substr(4, 2), 16), a: 8 === r4.length ? n(parseInt(r4.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
  }, "hex"], [function(r4) {
    var t4 = v.exec(r4) || m.exec(r4);
    return t4 ? t4[2] !== t4[4] || t4[4] !== t4[6] ? null : a({ r: Number(t4[1]) / (t4[2] ? 100 / 255 : 1), g: Number(t4[3]) / (t4[4] ? 100 / 255 : 1), b: Number(t4[5]) / (t4[6] ? 100 / 255 : 1), a: void 0 === t4[7] ? 1 : Number(t4[7]) / (t4[8] ? 100 : 1) }) : null;
  }, "rgb"], [function(t4) {
    var n3 = l.exec(t4) || p.exec(t4);
    if (!n3) return null;
    var e3, u3, a3 = g({ h: (e3 = n3[1], u3 = n3[2], void 0 === u3 && (u3 = "deg"), Number(e3) * (r2[u3] || 1)), s: Number(n3[3]), l: Number(n3[4]), a: void 0 === n3[5] ? 1 : Number(n3[5]) / (n3[6] ? 100 : 1) });
    return f(a3);
  }, "hsl"]], object: [[function(r4) {
    var n3 = r4.r, e3 = r4.g, u3 = r4.b, o4 = r4.a, i3 = void 0 === o4 ? 1 : o4;
    return t(n3) && t(e3) && t(u3) ? a({ r: Number(n3), g: Number(e3), b: Number(u3), a: Number(i3) }) : null;
  }, "rgb"], [function(r4) {
    var n3 = r4.h, e3 = r4.s, u3 = r4.l, a3 = r4.a, o4 = void 0 === a3 ? 1 : a3;
    if (!t(n3) || !t(e3) || !t(u3)) return null;
    var i3 = g({ h: Number(n3), s: Number(e3), l: Number(u3), a: Number(o4) });
    return f(i3);
  }, "hsl"], [function(r4) {
    var n3 = r4.h, a3 = r4.s, o4 = r4.v, i3 = r4.a, s3 = void 0 === i3 ? 1 : i3;
    if (!t(n3) || !t(a3) || !t(o4)) return null;
    var h3 = (function(r5) {
      return { h: u(r5.h), s: e(r5.s, 0, 100), v: e(r5.v, 0, 100), a: e(r5.a) };
    })({ h: Number(n3), s: Number(a3), v: Number(o4), a: Number(s3) });
    return b(h3);
  }, "hsv"]] };
  var N = function(r4, t4) {
    for (var n3 = 0; n3 < t4.length; n3++) {
      var e3 = t4[n3][0](r4);
      if (e3) return [e3, t4[n3][1]];
    }
    return [null, void 0];
  };
  var x = function(r4) {
    return "string" == typeof r4 ? N(r4.trim(), y.string) : "object" == typeof r4 && null !== r4 ? N(r4, y.object) : [null, void 0];
  };
  var I = function(r4) {
    return x(r4)[1];
  };
  var M = function(r4, t4) {
    var n3 = c(r4);
    return { h: n3.h, s: e(n3.s + 100 * t4, 0, 100), l: n3.l, a: n3.a };
  };
  var H = function(r4) {
    return (299 * r4.r + 587 * r4.g + 114 * r4.b) / 1e3 / 255;
  };
  var $ = function(r4, t4) {
    var n3 = c(r4);
    return { h: n3.h, s: n3.s, l: e(n3.l + 100 * t4, 0, 100), a: n3.a };
  };
  var j = (function() {
    function r4(r5) {
      this.parsed = x(r5)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
    }
    return r4.prototype.isValid = function() {
      return null !== this.parsed;
    }, r4.prototype.brightness = function() {
      return n(H(this.rgba), 2);
    }, r4.prototype.isDark = function() {
      return H(this.rgba) < 0.5;
    }, r4.prototype.isLight = function() {
      return H(this.rgba) >= 0.5;
    }, r4.prototype.toHex = function() {
      return r5 = o(this.rgba), t4 = r5.r, e3 = r5.g, u3 = r5.b, i3 = (a3 = r5.a) < 1 ? s(n(255 * a3)) : "", "#" + s(t4) + s(e3) + s(u3) + i3;
      var r5, t4, e3, u3, a3, i3;
    }, r4.prototype.toRgb = function() {
      return o(this.rgba);
    }, r4.prototype.toRgbString = function() {
      return r5 = o(this.rgba), t4 = r5.r, n3 = r5.g, e3 = r5.b, (u3 = r5.a) < 1 ? "rgba(" + t4 + ", " + n3 + ", " + e3 + ", " + u3 + ")" : "rgb(" + t4 + ", " + n3 + ", " + e3 + ")";
      var r5, t4, n3, e3, u3;
    }, r4.prototype.toHsl = function() {
      return d(c(this.rgba));
    }, r4.prototype.toHslString = function() {
      return r5 = d(c(this.rgba)), t4 = r5.h, n3 = r5.s, e3 = r5.l, (u3 = r5.a) < 1 ? "hsla(" + t4 + ", " + n3 + "%, " + e3 + "%, " + u3 + ")" : "hsl(" + t4 + ", " + n3 + "%, " + e3 + "%)";
      var r5, t4, n3, e3, u3;
    }, r4.prototype.toHsv = function() {
      return r5 = h(this.rgba), { h: n(r5.h), s: n(r5.s), v: n(r5.v), a: n(r5.a, 3) };
      var r5;
    }, r4.prototype.invert = function() {
      return w({ r: 255 - (r5 = this.rgba).r, g: 255 - r5.g, b: 255 - r5.b, a: r5.a });
      var r5;
    }, r4.prototype.saturate = function(r5) {
      return void 0 === r5 && (r5 = 0.1), w(M(this.rgba, r5));
    }, r4.prototype.desaturate = function(r5) {
      return void 0 === r5 && (r5 = 0.1), w(M(this.rgba, -r5));
    }, r4.prototype.grayscale = function() {
      return w(M(this.rgba, -1));
    }, r4.prototype.lighten = function(r5) {
      return void 0 === r5 && (r5 = 0.1), w($(this.rgba, r5));
    }, r4.prototype.darken = function(r5) {
      return void 0 === r5 && (r5 = 0.1), w($(this.rgba, -r5));
    }, r4.prototype.rotate = function(r5) {
      return void 0 === r5 && (r5 = 15), this.hue(this.hue() + r5);
    }, r4.prototype.alpha = function(r5) {
      return "number" == typeof r5 ? w({ r: (t4 = this.rgba).r, g: t4.g, b: t4.b, a: r5 }) : n(this.rgba.a, 3);
      var t4;
    }, r4.prototype.hue = function(r5) {
      var t4 = c(this.rgba);
      return "number" == typeof r5 ? w({ h: r5, s: t4.s, l: t4.l, a: t4.a }) : n(t4.h);
    }, r4.prototype.isEqual = function(r5) {
      return this.toHex() === w(r5).toHex();
    }, r4;
  })();
  var w = function(r4) {
    return r4 instanceof j ? r4 : new j(r4);
  };
  var S = [];
  var k = function(r4) {
    r4.forEach(function(r5) {
      S.indexOf(r5) < 0 && (r5(j, y), S.push(r5));
    });
  };

  // node_modules/colord/plugins/names.mjs
  function names_default(e3, f3) {
    var a3 = { white: "#ffffff", bisque: "#ffe4c4", blue: "#0000ff", cadetblue: "#5f9ea0", chartreuse: "#7fff00", chocolate: "#d2691e", coral: "#ff7f50", antiquewhite: "#faebd7", aqua: "#00ffff", azure: "#f0ffff", whitesmoke: "#f5f5f5", papayawhip: "#ffefd5", plum: "#dda0dd", blanchedalmond: "#ffebcd", black: "#000000", gold: "#ffd700", goldenrod: "#daa520", gainsboro: "#dcdcdc", cornsilk: "#fff8dc", cornflowerblue: "#6495ed", burlywood: "#deb887", aquamarine: "#7fffd4", beige: "#f5f5dc", crimson: "#dc143c", cyan: "#00ffff", darkblue: "#00008b", darkcyan: "#008b8b", darkgoldenrod: "#b8860b", darkkhaki: "#bdb76b", darkgray: "#a9a9a9", darkgreen: "#006400", darkgrey: "#a9a9a9", peachpuff: "#ffdab9", darkmagenta: "#8b008b", darkred: "#8b0000", darkorchid: "#9932cc", darkorange: "#ff8c00", darkslateblue: "#483d8b", gray: "#808080", darkslategray: "#2f4f4f", darkslategrey: "#2f4f4f", deeppink: "#ff1493", deepskyblue: "#00bfff", wheat: "#f5deb3", firebrick: "#b22222", floralwhite: "#fffaf0", ghostwhite: "#f8f8ff", darkviolet: "#9400d3", magenta: "#ff00ff", green: "#008000", dodgerblue: "#1e90ff", grey: "#808080", honeydew: "#f0fff0", hotpink: "#ff69b4", blueviolet: "#8a2be2", forestgreen: "#228b22", lawngreen: "#7cfc00", indianred: "#cd5c5c", indigo: "#4b0082", fuchsia: "#ff00ff", brown: "#a52a2a", maroon: "#800000", mediumblue: "#0000cd", lightcoral: "#f08080", darkturquoise: "#00ced1", lightcyan: "#e0ffff", ivory: "#fffff0", lightyellow: "#ffffe0", lightsalmon: "#ffa07a", lightseagreen: "#20b2aa", linen: "#faf0e6", mediumaquamarine: "#66cdaa", lemonchiffon: "#fffacd", lime: "#00ff00", khaki: "#f0e68c", mediumseagreen: "#3cb371", limegreen: "#32cd32", mediumspringgreen: "#00fa9a", lightskyblue: "#87cefa", lightblue: "#add8e6", midnightblue: "#191970", lightpink: "#ffb6c1", mistyrose: "#ffe4e1", moccasin: "#ffe4b5", mintcream: "#f5fffa", lightslategray: "#778899", lightslategrey: "#778899", navajowhite: "#ffdead", navy: "#000080", mediumvioletred: "#c71585", powderblue: "#b0e0e6", palegoldenrod: "#eee8aa", oldlace: "#fdf5e6", paleturquoise: "#afeeee", mediumturquoise: "#48d1cc", mediumorchid: "#ba55d3", rebeccapurple: "#663399", lightsteelblue: "#b0c4de", mediumslateblue: "#7b68ee", thistle: "#d8bfd8", tan: "#d2b48c", orchid: "#da70d6", mediumpurple: "#9370db", purple: "#800080", pink: "#ffc0cb", skyblue: "#87ceeb", springgreen: "#00ff7f", palegreen: "#98fb98", red: "#ff0000", yellow: "#ffff00", slateblue: "#6a5acd", lavenderblush: "#fff0f5", peru: "#cd853f", palevioletred: "#db7093", violet: "#ee82ee", teal: "#008080", slategray: "#708090", slategrey: "#708090", aliceblue: "#f0f8ff", darkseagreen: "#8fbc8f", darkolivegreen: "#556b2f", greenyellow: "#adff2f", seagreen: "#2e8b57", seashell: "#fff5ee", tomato: "#ff6347", silver: "#c0c0c0", sienna: "#a0522d", lavender: "#e6e6fa", lightgreen: "#90ee90", orange: "#ffa500", orangered: "#ff4500", steelblue: "#4682b4", royalblue: "#4169e1", turquoise: "#40e0d0", yellowgreen: "#9acd32", salmon: "#fa8072", saddlebrown: "#8b4513", sandybrown: "#f4a460", rosybrown: "#bc8f8f", darksalmon: "#e9967a", lightgoldenrodyellow: "#fafad2", snow: "#fffafa", lightgrey: "#d3d3d3", lightgray: "#d3d3d3", dimgray: "#696969", dimgrey: "#696969", olivedrab: "#6b8e23", olive: "#808000" }, r4 = {};
    for (var d3 in a3) r4[a3[d3]] = d3;
    var l3 = {};
    e3.prototype.toName = function(f4) {
      if (!(this.rgba.a || this.rgba.r || this.rgba.g || this.rgba.b)) return "transparent";
      var d4, i3, n3 = r4[this.toHex()];
      if (n3) return n3;
      if (null == f4 ? void 0 : f4.closest) {
        var o4 = this.toRgb(), t4 = 1 / 0, b3 = "black";
        if (!l3.length) for (var c3 in a3) l3[c3] = new e3(a3[c3]).toRgb();
        for (var g3 in a3) {
          var u3 = (d4 = o4, i3 = l3[g3], Math.pow(d4.r - i3.r, 2) + Math.pow(d4.g - i3.g, 2) + Math.pow(d4.b - i3.b, 2));
          u3 < t4 && (t4 = u3, b3 = g3);
        }
        return b3;
      }
    };
    f3.string.push([function(f4) {
      var r5 = f4.toLowerCase(), d4 = "transparent" === r5 ? "#0000" : a3[r5];
      return d4 ? new e3(d4).toRgb() : null;
    }, "name"]);
  }

  // packages/components/build-module/utils/colors.mjs
  var colorComputationNode;
  k([names_default]);
  function getColorComputationNode() {
    if (typeof document === "undefined") {
      return;
    }
    if (!colorComputationNode) {
      const el = document.createElement("div");
      el.setAttribute("data-g2-color-computation-node", "");
      document.body.appendChild(el);
      colorComputationNode = el;
    }
    return colorComputationNode;
  }
  function isColor(value) {
    if (typeof value !== "string") {
      return false;
    }
    const test2 = w(value);
    return test2.isValid();
  }
  function _getComputedBackgroundColor(backgroundColor) {
    if (typeof backgroundColor !== "string") {
      return "";
    }
    if (isColor(backgroundColor)) {
      return backgroundColor;
    }
    if (!backgroundColor.includes("var(")) {
      return "";
    }
    if (typeof document === "undefined") {
      return "";
    }
    const el = getColorComputationNode();
    if (!el) {
      return "";
    }
    el.style.background = backgroundColor;
    const computedColor = window?.getComputedStyle(el).background;
    el.style.background = "";
    return computedColor || "";
  }
  var getComputedBackgroundColor = memize(_getComputedBackgroundColor);
  function getOptimalTextColor(backgroundColor) {
    const background2 = getComputedBackgroundColor(backgroundColor);
    return w(background2).isLight() ? "#000000" : "#ffffff";
  }
  function getOptimalTextShade(backgroundColor) {
    const result = getOptimalTextColor(backgroundColor);
    return result === "#000000" ? "dark" : "light";
  }

  // packages/components/build-module/utils/rtl.mjs
  var import_i18n2 = __toESM(require_i18n(), 1);
  var LOWER_LEFT_REGEXP = new RegExp(/-left/g);
  var LOWER_RIGHT_REGEXP = new RegExp(/-right/g);
  var UPPER_LEFT_REGEXP = new RegExp(/Left/g);
  var UPPER_RIGHT_REGEXP = new RegExp(/Right/g);
  function getConvertedKey(key) {
    if (key === "left") {
      return "right";
    }
    if (key === "right") {
      return "left";
    }
    if (LOWER_LEFT_REGEXP.test(key)) {
      return key.replace(LOWER_LEFT_REGEXP, "-right");
    }
    if (LOWER_RIGHT_REGEXP.test(key)) {
      return key.replace(LOWER_RIGHT_REGEXP, "-left");
    }
    if (UPPER_LEFT_REGEXP.test(key)) {
      return key.replace(UPPER_LEFT_REGEXP, "Right");
    }
    if (UPPER_RIGHT_REGEXP.test(key)) {
      return key.replace(UPPER_RIGHT_REGEXP, "Left");
    }
    return key;
  }
  var convertLTRToRTL = (ltrStyles = {}) => {
    return Object.fromEntries(Object.entries(ltrStyles).map(([key, value]) => [getConvertedKey(key), value]));
  };
  function rtl(ltrStyles = {}, rtlStyles) {
    return () => {
      if (rtlStyles) {
        return (0, import_i18n2.isRTL)() ? /* @__PURE__ */ css(rtlStyles, false ? "" : ";label:rtl;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJ0bC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE4RW9CIiwiZmlsZSI6InJ0bC5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBXb3JkUHJlc3MgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGlzUlRMIH0gZnJvbSAnQHdvcmRwcmVzcy9pMThuJztcblxuY29uc3QgTE9XRVJfTEVGVF9SRUdFWFAgPSBuZXcgUmVnRXhwKCAvLWxlZnQvZyApO1xuY29uc3QgTE9XRVJfUklHSFRfUkVHRVhQID0gbmV3IFJlZ0V4cCggLy1yaWdodC9nICk7XG5jb25zdCBVUFBFUl9MRUZUX1JFR0VYUCA9IG5ldyBSZWdFeHAoIC9MZWZ0L2cgKTtcbmNvbnN0IFVQUEVSX1JJR0hUX1JFR0VYUCA9IG5ldyBSZWdFeHAoIC9SaWdodC9nICk7XG5cbi8qKlxuICogRmxpcHMgYSBDU1MgcHJvcGVydHkgZnJvbSBsZWZ0IDwtPiByaWdodC5cbiAqXG4gKiBAcGFyYW0ge3N0cmluZ30ga2V5IFRoZSBDU1MgcHJvcGVydHkgbmFtZS5cbiAqXG4gKiBAcmV0dXJuIHtzdHJpbmd9IFRoZSBmbGlwcGVkIENTUyBwcm9wZXJ0eSBuYW1lLCBpZiBhcHBsaWNhYmxlLlxuICovXG5mdW5jdGlvbiBnZXRDb252ZXJ0ZWRLZXkoIGtleSApIHtcblx0aWYgKCBrZXkgPT09ICdsZWZ0JyApIHtcblx0XHRyZXR1cm4gJ3JpZ2h0Jztcblx0fVxuXG5cdGlmICgga2V5ID09PSAncmlnaHQnICkge1xuXHRcdHJldHVybiAnbGVmdCc7XG5cdH1cblxuXHRpZiAoIExPV0VSX0xFRlRfUkVHRVhQLnRlc3QoIGtleSApICkge1xuXHRcdHJldHVybiBrZXkucmVwbGFjZSggTE9XRVJfTEVGVF9SRUdFWFAsICctcmlnaHQnICk7XG5cdH1cblxuXHRpZiAoIExPV0VSX1JJR0hUX1JFR0VYUC50ZXN0KCBrZXkgKSApIHtcblx0XHRyZXR1cm4ga2V5LnJlcGxhY2UoIExPV0VSX1JJR0hUX1JFR0VYUCwgJy1sZWZ0JyApO1xuXHR9XG5cblx0aWYgKCBVUFBFUl9MRUZUX1JFR0VYUC50ZXN0KCBrZXkgKSApIHtcblx0XHRyZXR1cm4ga2V5LnJlcGxhY2UoIFVQUEVSX0xFRlRfUkVHRVhQLCAnUmlnaHQnICk7XG5cdH1cblxuXHRpZiAoIFVQUEVSX1JJR0hUX1JFR0VYUC50ZXN0KCBrZXkgKSApIHtcblx0XHRyZXR1cm4ga2V5LnJlcGxhY2UoIFVQUEVSX1JJR0hUX1JFR0VYUCwgJ0xlZnQnICk7XG5cdH1cblxuXHRyZXR1cm4ga2V5O1xufVxuXG4vKipcbiAqIEFuIGluY3JlZGlibHkgYmFzaWMgbHRyIC0+IHJ0bCBjb252ZXJ0ZXIgZm9yIHN0eWxlIHByb3BlcnRpZXNcbiAqXG4gKiBAcGFyYW0ge1JlYWN0LkNTU1Byb3BlcnRpZXN9IGx0clN0eWxlc1xuICpcbiAqIEByZXR1cm4ge1JlYWN0LkNTU1Byb3BlcnRpZXN9IENvbnZlcnRlZCBsdHIgLT4gcnRsIHN0eWxlc1xuICovXG5leHBvcnQgY29uc3QgY29udmVydExUUlRvUlRMID0gKCBsdHJTdHlsZXMgPSB7fSApID0+IHtcblx0cmV0dXJuIE9iamVjdC5mcm9tRW50cmllcyhcblx0XHRPYmplY3QuZW50cmllcyggbHRyU3R5bGVzICkubWFwKCAoIFsga2V5LCB2YWx1ZSBdICkgPT4gW1xuXHRcdFx0Z2V0Q29udmVydGVkS2V5KCBrZXkgKSxcblx0XHRcdHZhbHVlLFxuXHRcdF0gKVxuXHQpO1xufTtcblxuLyoqXG4gKiBBIGhpZ2hlci1vcmRlciBmdW5jdGlvbiB0aGF0IGNyZWF0ZSBhbiBpbmNyZWRpYmx5IGJhc2ljIGx0ciAtPiBydGwgc3R5bGUgY29udmVydGVyIGZvciBDU1Mgb2JqZWN0cy5cbiAqXG4gKiBAcGFyYW0ge1JlYWN0LkNTU1Byb3BlcnRpZXN9IGx0clN0eWxlcyAgIEx0ciBzdHlsZXMuIENvbnZlcnRzIGFuZCByZW5kZXJzIGZyb20gbHRyIC0+IHJ0bCBzdHlsZXMsIGlmIGFwcGxpY2FibGUuXG4gKiBAcGFyYW0ge1JlYWN0LkNTU1Byb3BlcnRpZXN9IFtydGxTdHlsZXNdIFJ0bCBzdHlsZXMuIFJlbmRlcnMgaWYgcHJvdmlkZWQuXG4gKlxuICogQHJldHVybiB7KCkgPT4gaW1wb3J0KCdAZW1vdGlvbi9yZWFjdCcpLlNlcmlhbGl6ZWRTdHlsZXN9IEEgZnVuY3Rpb24gdG8gb3V0cHV0IENTUyBzdHlsZXMgZm9yIEVtb3Rpb24ncyByZW5kZXJlclxuICovXG5leHBvcnQgZnVuY3Rpb24gcnRsKCBsdHJTdHlsZXMgPSB7fSwgcnRsU3R5bGVzICkge1xuXHRyZXR1cm4gKCkgPT4ge1xuXHRcdGlmICggcnRsU3R5bGVzICkge1xuXHRcdFx0Ly8gQHRzLWlnbm9yZTogYGNzc2AgdHlwZXMgYXJlIHdyb25nLCBpdCBjYW4gYWNjZXB0IGFuIG9iamVjdDogaHR0cHM6Ly9lbW90aW9uLnNoL2RvY3Mvb2JqZWN0LXN0eWxlcyN3aXRoLWNzc1xuXHRcdFx0cmV0dXJuIGlzUlRMKCkgPyBjc3MoIHJ0bFN0eWxlcyApIDogY3NzKCBsdHJTdHlsZXMgKTtcblx0XHR9XG5cblx0XHQvLyBAdHMtaWdub3JlOiBgY3NzYCB0eXBlcyBhcmUgd3JvbmcsIGl0IGNhbiBhY2NlcHQgYW4gb2JqZWN0OiBodHRwczovL2Vtb3Rpb24uc2gvZG9jcy9vYmplY3Qtc3R5bGVzI3dpdGgtY3NzXG5cdFx0cmV0dXJuIGlzUlRMKCkgPyBjc3MoIGNvbnZlcnRMVFJUb1JUTCggbHRyU3R5bGVzICkgKSA6IGNzcyggbHRyU3R5bGVzICk7XG5cdH07XG59XG5cbi8qKlxuICogQ2FsbCB0aGlzIGluIHRoZSBgdXNlTWVtb2AgZGVwZW5kZW5jeSBhcnJheSB0byBlbnN1cmUgdGhhdCBzdWJzZXF1ZW50IHJlbmRlcnMgd2lsbFxuICogY2F1c2UgcnRsIHN0eWxlcyB0byB1cGRhdGUgYmFzZWQgb24gdGhlIGBpc1JUTGAgcmV0dXJuIHZhbHVlIGV2ZW4gaWYgYWxsIG90aGVyIGRlcGVuZGVuY2llc1xuICogcmVtYWluIHRoZSBzYW1lLlxuICpcbiAqIEBleGFtcGxlXG4gKiBjb25zdCBzdHlsZXMgPSB1c2VNZW1vKCAoKSA9PiB7XG4gKiAgIHJldHVybiBjc3NgXG4gKiAgICAgJHsgcnRsKCB7IG1hcmdpblJpZ2h0OiAnMTBweCcgfSApIH1cbiAqICAgYDtcbiAqIH0sIFsgcnRsLndhdGNoKCkgXSApO1xuICovXG5ydGwud2F0Y2ggPSAoKSA9PiBpc1JUTCgpO1xuIl19 */") : /* @__PURE__ */ css(ltrStyles, false ? "" : ";label:rtl;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJ0bC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE4RXVDIiwiZmlsZSI6InJ0bC5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBXb3JkUHJlc3MgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGlzUlRMIH0gZnJvbSAnQHdvcmRwcmVzcy9pMThuJztcblxuY29uc3QgTE9XRVJfTEVGVF9SRUdFWFAgPSBuZXcgUmVnRXhwKCAvLWxlZnQvZyApO1xuY29uc3QgTE9XRVJfUklHSFRfUkVHRVhQID0gbmV3IFJlZ0V4cCggLy1yaWdodC9nICk7XG5jb25zdCBVUFBFUl9MRUZUX1JFR0VYUCA9IG5ldyBSZWdFeHAoIC9MZWZ0L2cgKTtcbmNvbnN0IFVQUEVSX1JJR0hUX1JFR0VYUCA9IG5ldyBSZWdFeHAoIC9SaWdodC9nICk7XG5cbi8qKlxuICogRmxpcHMgYSBDU1MgcHJvcGVydHkgZnJvbSBsZWZ0IDwtPiByaWdodC5cbiAqXG4gKiBAcGFyYW0ge3N0cmluZ30ga2V5IFRoZSBDU1MgcHJvcGVydHkgbmFtZS5cbiAqXG4gKiBAcmV0dXJuIHtzdHJpbmd9IFRoZSBmbGlwcGVkIENTUyBwcm9wZXJ0eSBuYW1lLCBpZiBhcHBsaWNhYmxlLlxuICovXG5mdW5jdGlvbiBnZXRDb252ZXJ0ZWRLZXkoIGtleSApIHtcblx0aWYgKCBrZXkgPT09ICdsZWZ0JyApIHtcblx0XHRyZXR1cm4gJ3JpZ2h0Jztcblx0fVxuXG5cdGlmICgga2V5ID09PSAncmlnaHQnICkge1xuXHRcdHJldHVybiAnbGVmdCc7XG5cdH1cblxuXHRpZiAoIExPV0VSX0xFRlRfUkVHRVhQLnRlc3QoIGtleSApICkge1xuXHRcdHJldHVybiBrZXkucmVwbGFjZSggTE9XRVJfTEVGVF9SRUdFWFAsICctcmlnaHQnICk7XG5cdH1cblxuXHRpZiAoIExPV0VSX1JJR0hUX1JFR0VYUC50ZXN0KCBrZXkgKSApIHtcblx0XHRyZXR1cm4ga2V5LnJlcGxhY2UoIExPV0VSX1JJR0hUX1JFR0VYUCwgJy1sZWZ0JyApO1xuXHR9XG5cblx0aWYgKCBVUFBFUl9MRUZUX1JFR0VYUC50ZXN0KCBrZXkgKSApIHtcblx0XHRyZXR1cm4ga2V5LnJlcGxhY2UoIFVQUEVSX0xFRlRfUkVHRVhQLCAnUmlnaHQnICk7XG5cdH1cblxuXHRpZiAoIFVQUEVSX1JJR0hUX1JFR0VYUC50ZXN0KCBrZXkgKSApIHtcblx0XHRyZXR1cm4ga2V5LnJlcGxhY2UoIFVQUEVSX1JJR0hUX1JFR0VYUCwgJ0xlZnQnICk7XG5cdH1cblxuXHRyZXR1cm4ga2V5O1xufVxuXG4vKipcbiAqIEFuIGluY3JlZGlibHkgYmFzaWMgbHRyIC0+IHJ0bCBjb252ZXJ0ZXIgZm9yIHN0eWxlIHByb3BlcnRpZXNcbiAqXG4gKiBAcGFyYW0ge1JlYWN0LkNTU1Byb3BlcnRpZXN9IGx0clN0eWxlc1xuICpcbiAqIEByZXR1cm4ge1JlYWN0LkNTU1Byb3BlcnRpZXN9IENvbnZlcnRlZCBsdHIgLT4gcnRsIHN0eWxlc1xuICovXG5leHBvcnQgY29uc3QgY29udmVydExUUlRvUlRMID0gKCBsdHJTdHlsZXMgPSB7fSApID0+IHtcblx0cmV0dXJuIE9iamVjdC5mcm9tRW50cmllcyhcblx0XHRPYmplY3QuZW50cmllcyggbHRyU3R5bGVzICkubWFwKCAoIFsga2V5LCB2YWx1ZSBdICkgPT4gW1xuXHRcdFx0Z2V0Q29udmVydGVkS2V5KCBrZXkgKSxcblx0XHRcdHZhbHVlLFxuXHRcdF0gKVxuXHQpO1xufTtcblxuLyoqXG4gKiBBIGhpZ2hlci1vcmRlciBmdW5jdGlvbiB0aGF0IGNyZWF0ZSBhbiBpbmNyZWRpYmx5IGJhc2ljIGx0ciAtPiBydGwgc3R5bGUgY29udmVydGVyIGZvciBDU1Mgb2JqZWN0cy5cbiAqXG4gKiBAcGFyYW0ge1JlYWN0LkNTU1Byb3BlcnRpZXN9IGx0clN0eWxlcyAgIEx0ciBzdHlsZXMuIENvbnZlcnRzIGFuZCByZW5kZXJzIGZyb20gbHRyIC0+IHJ0bCBzdHlsZXMsIGlmIGFwcGxpY2FibGUuXG4gKiBAcGFyYW0ge1JlYWN0LkNTU1Byb3BlcnRpZXN9IFtydGxTdHlsZXNdIFJ0bCBzdHlsZXMuIFJlbmRlcnMgaWYgcHJvdmlkZWQuXG4gKlxuICogQHJldHVybiB7KCkgPT4gaW1wb3J0KCdAZW1vdGlvbi9yZWFjdCcpLlNlcmlhbGl6ZWRTdHlsZXN9IEEgZnVuY3Rpb24gdG8gb3V0cHV0IENTUyBzdHlsZXMgZm9yIEVtb3Rpb24ncyByZW5kZXJlclxuICovXG5leHBvcnQgZnVuY3Rpb24gcnRsKCBsdHJTdHlsZXMgPSB7fSwgcnRsU3R5bGVzICkge1xuXHRyZXR1cm4gKCkgPT4ge1xuXHRcdGlmICggcnRsU3R5bGVzICkge1xuXHRcdFx0Ly8gQHRzLWlnbm9yZTogYGNzc2AgdHlwZXMgYXJlIHdyb25nLCBpdCBjYW4gYWNjZXB0IGFuIG9iamVjdDogaHR0cHM6Ly9lbW90aW9uLnNoL2RvY3Mvb2JqZWN0LXN0eWxlcyN3aXRoLWNzc1xuXHRcdFx0cmV0dXJuIGlzUlRMKCkgPyBjc3MoIHJ0bFN0eWxlcyApIDogY3NzKCBsdHJTdHlsZXMgKTtcblx0XHR9XG5cblx0XHQvLyBAdHMtaWdub3JlOiBgY3NzYCB0eXBlcyBhcmUgd3JvbmcsIGl0IGNhbiBhY2NlcHQgYW4gb2JqZWN0OiBodHRwczovL2Vtb3Rpb24uc2gvZG9jcy9vYmplY3Qtc3R5bGVzI3dpdGgtY3NzXG5cdFx0cmV0dXJuIGlzUlRMKCkgPyBjc3MoIGNvbnZlcnRMVFJUb1JUTCggbHRyU3R5bGVzICkgKSA6IGNzcyggbHRyU3R5bGVzICk7XG5cdH07XG59XG5cbi8qKlxuICogQ2FsbCB0aGlzIGluIHRoZSBgdXNlTWVtb2AgZGVwZW5kZW5jeSBhcnJheSB0byBlbnN1cmUgdGhhdCBzdWJzZXF1ZW50IHJlbmRlcnMgd2lsbFxuICogY2F1c2UgcnRsIHN0eWxlcyB0byB1cGRhdGUgYmFzZWQgb24gdGhlIGBpc1JUTGAgcmV0dXJuIHZhbHVlIGV2ZW4gaWYgYWxsIG90aGVyIGRlcGVuZGVuY2llc1xuICogcmVtYWluIHRoZSBzYW1lLlxuICpcbiAqIEBleGFtcGxlXG4gKiBjb25zdCBzdHlsZXMgPSB1c2VNZW1vKCAoKSA9PiB7XG4gKiAgIHJldHVybiBjc3NgXG4gKiAgICAgJHsgcnRsKCB7IG1hcmdpblJpZ2h0OiAnMTBweCcgfSApIH1cbiAqICAgYDtcbiAqIH0sIFsgcnRsLndhdGNoKCkgXSApO1xuICovXG5ydGwud2F0Y2ggPSAoKSA9PiBpc1JUTCgpO1xuIl19 */");
      }
      return (0, import_i18n2.isRTL)() ? /* @__PURE__ */ css(convertLTRToRTL(ltrStyles), false ? "" : ";label:rtl;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJ0bC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrRm1CIiwiZmlsZSI6InJ0bC5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBXb3JkUHJlc3MgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGlzUlRMIH0gZnJvbSAnQHdvcmRwcmVzcy9pMThuJztcblxuY29uc3QgTE9XRVJfTEVGVF9SRUdFWFAgPSBuZXcgUmVnRXhwKCAvLWxlZnQvZyApO1xuY29uc3QgTE9XRVJfUklHSFRfUkVHRVhQID0gbmV3IFJlZ0V4cCggLy1yaWdodC9nICk7XG5jb25zdCBVUFBFUl9MRUZUX1JFR0VYUCA9IG5ldyBSZWdFeHAoIC9MZWZ0L2cgKTtcbmNvbnN0IFVQUEVSX1JJR0hUX1JFR0VYUCA9IG5ldyBSZWdFeHAoIC9SaWdodC9nICk7XG5cbi8qKlxuICogRmxpcHMgYSBDU1MgcHJvcGVydHkgZnJvbSBsZWZ0IDwtPiByaWdodC5cbiAqXG4gKiBAcGFyYW0ge3N0cmluZ30ga2V5IFRoZSBDU1MgcHJvcGVydHkgbmFtZS5cbiAqXG4gKiBAcmV0dXJuIHtzdHJpbmd9IFRoZSBmbGlwcGVkIENTUyBwcm9wZXJ0eSBuYW1lLCBpZiBhcHBsaWNhYmxlLlxuICovXG5mdW5jdGlvbiBnZXRDb252ZXJ0ZWRLZXkoIGtleSApIHtcblx0aWYgKCBrZXkgPT09ICdsZWZ0JyApIHtcblx0XHRyZXR1cm4gJ3JpZ2h0Jztcblx0fVxuXG5cdGlmICgga2V5ID09PSAncmlnaHQnICkge1xuXHRcdHJldHVybiAnbGVmdCc7XG5cdH1cblxuXHRpZiAoIExPV0VSX0xFRlRfUkVHRVhQLnRlc3QoIGtleSApICkge1xuXHRcdHJldHVybiBrZXkucmVwbGFjZSggTE9XRVJfTEVGVF9SRUdFWFAsICctcmlnaHQnICk7XG5cdH1cblxuXHRpZiAoIExPV0VSX1JJR0hUX1JFR0VYUC50ZXN0KCBrZXkgKSApIHtcblx0XHRyZXR1cm4ga2V5LnJlcGxhY2UoIExPV0VSX1JJR0hUX1JFR0VYUCwgJy1sZWZ0JyApO1xuXHR9XG5cblx0aWYgKCBVUFBFUl9MRUZUX1JFR0VYUC50ZXN0KCBrZXkgKSApIHtcblx0XHRyZXR1cm4ga2V5LnJlcGxhY2UoIFVQUEVSX0xFRlRfUkVHRVhQLCAnUmlnaHQnICk7XG5cdH1cblxuXHRpZiAoIFVQUEVSX1JJR0hUX1JFR0VYUC50ZXN0KCBrZXkgKSApIHtcblx0XHRyZXR1cm4ga2V5LnJlcGxhY2UoIFVQUEVSX1JJR0hUX1JFR0VYUCwgJ0xlZnQnICk7XG5cdH1cblxuXHRyZXR1cm4ga2V5O1xufVxuXG4vKipcbiAqIEFuIGluY3JlZGlibHkgYmFzaWMgbHRyIC0+IHJ0bCBjb252ZXJ0ZXIgZm9yIHN0eWxlIHByb3BlcnRpZXNcbiAqXG4gKiBAcGFyYW0ge1JlYWN0LkNTU1Byb3BlcnRpZXN9IGx0clN0eWxlc1xuICpcbiAqIEByZXR1cm4ge1JlYWN0LkNTU1Byb3BlcnRpZXN9IENvbnZlcnRlZCBsdHIgLT4gcnRsIHN0eWxlc1xuICovXG5leHBvcnQgY29uc3QgY29udmVydExUUlRvUlRMID0gKCBsdHJTdHlsZXMgPSB7fSApID0+IHtcblx0cmV0dXJuIE9iamVjdC5mcm9tRW50cmllcyhcblx0XHRPYmplY3QuZW50cmllcyggbHRyU3R5bGVzICkubWFwKCAoIFsga2V5LCB2YWx1ZSBdICkgPT4gW1xuXHRcdFx0Z2V0Q29udmVydGVkS2V5KCBrZXkgKSxcblx0XHRcdHZhbHVlLFxuXHRcdF0gKVxuXHQpO1xufTtcblxuLyoqXG4gKiBBIGhpZ2hlci1vcmRlciBmdW5jdGlvbiB0aGF0IGNyZWF0ZSBhbiBpbmNyZWRpYmx5IGJhc2ljIGx0ciAtPiBydGwgc3R5bGUgY29udmVydGVyIGZvciBDU1Mgb2JqZWN0cy5cbiAqXG4gKiBAcGFyYW0ge1JlYWN0LkNTU1Byb3BlcnRpZXN9IGx0clN0eWxlcyAgIEx0ciBzdHlsZXMuIENvbnZlcnRzIGFuZCByZW5kZXJzIGZyb20gbHRyIC0+IHJ0bCBzdHlsZXMsIGlmIGFwcGxpY2FibGUuXG4gKiBAcGFyYW0ge1JlYWN0LkNTU1Byb3BlcnRpZXN9IFtydGxTdHlsZXNdIFJ0bCBzdHlsZXMuIFJlbmRlcnMgaWYgcHJvdmlkZWQuXG4gKlxuICogQHJldHVybiB7KCkgPT4gaW1wb3J0KCdAZW1vdGlvbi9yZWFjdCcpLlNlcmlhbGl6ZWRTdHlsZXN9IEEgZnVuY3Rpb24gdG8gb3V0cHV0IENTUyBzdHlsZXMgZm9yIEVtb3Rpb24ncyByZW5kZXJlclxuICovXG5leHBvcnQgZnVuY3Rpb24gcnRsKCBsdHJTdHlsZXMgPSB7fSwgcnRsU3R5bGVzICkge1xuXHRyZXR1cm4gKCkgPT4ge1xuXHRcdGlmICggcnRsU3R5bGVzICkge1xuXHRcdFx0Ly8gQHRzLWlnbm9yZTogYGNzc2AgdHlwZXMgYXJlIHdyb25nLCBpdCBjYW4gYWNjZXB0IGFuIG9iamVjdDogaHR0cHM6Ly9lbW90aW9uLnNoL2RvY3Mvb2JqZWN0LXN0eWxlcyN3aXRoLWNzc1xuXHRcdFx0cmV0dXJuIGlzUlRMKCkgPyBjc3MoIHJ0bFN0eWxlcyApIDogY3NzKCBsdHJTdHlsZXMgKTtcblx0XHR9XG5cblx0XHQvLyBAdHMtaWdub3JlOiBgY3NzYCB0eXBlcyBhcmUgd3JvbmcsIGl0IGNhbiBhY2NlcHQgYW4gb2JqZWN0OiBodHRwczovL2Vtb3Rpb24uc2gvZG9jcy9vYmplY3Qtc3R5bGVzI3dpdGgtY3NzXG5cdFx0cmV0dXJuIGlzUlRMKCkgPyBjc3MoIGNvbnZlcnRMVFJUb1JUTCggbHRyU3R5bGVzICkgKSA6IGNzcyggbHRyU3R5bGVzICk7XG5cdH07XG59XG5cbi8qKlxuICogQ2FsbCB0aGlzIGluIHRoZSBgdXNlTWVtb2AgZGVwZW5kZW5jeSBhcnJheSB0byBlbnN1cmUgdGhhdCBzdWJzZXF1ZW50IHJlbmRlcnMgd2lsbFxuICogY2F1c2UgcnRsIHN0eWxlcyB0byB1cGRhdGUgYmFzZWQgb24gdGhlIGBpc1JUTGAgcmV0dXJuIHZhbHVlIGV2ZW4gaWYgYWxsIG90aGVyIGRlcGVuZGVuY2llc1xuICogcmVtYWluIHRoZSBzYW1lLlxuICpcbiAqIEBleGFtcGxlXG4gKiBjb25zdCBzdHlsZXMgPSB1c2VNZW1vKCAoKSA9PiB7XG4gKiAgIHJldHVybiBjc3NgXG4gKiAgICAgJHsgcnRsKCB7IG1hcmdpblJpZ2h0OiAnMTBweCcgfSApIH1cbiAqICAgYDtcbiAqIH0sIFsgcnRsLndhdGNoKCkgXSApO1xuICovXG5ydGwud2F0Y2ggPSAoKSA9PiBpc1JUTCgpO1xuIl19 */") : /* @__PURE__ */ css(ltrStyles, false ? "" : ";label:rtl;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJ0bC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrRnlEIiwiZmlsZSI6InJ0bC5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBXb3JkUHJlc3MgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGlzUlRMIH0gZnJvbSAnQHdvcmRwcmVzcy9pMThuJztcblxuY29uc3QgTE9XRVJfTEVGVF9SRUdFWFAgPSBuZXcgUmVnRXhwKCAvLWxlZnQvZyApO1xuY29uc3QgTE9XRVJfUklHSFRfUkVHRVhQID0gbmV3IFJlZ0V4cCggLy1yaWdodC9nICk7XG5jb25zdCBVUFBFUl9MRUZUX1JFR0VYUCA9IG5ldyBSZWdFeHAoIC9MZWZ0L2cgKTtcbmNvbnN0IFVQUEVSX1JJR0hUX1JFR0VYUCA9IG5ldyBSZWdFeHAoIC9SaWdodC9nICk7XG5cbi8qKlxuICogRmxpcHMgYSBDU1MgcHJvcGVydHkgZnJvbSBsZWZ0IDwtPiByaWdodC5cbiAqXG4gKiBAcGFyYW0ge3N0cmluZ30ga2V5IFRoZSBDU1MgcHJvcGVydHkgbmFtZS5cbiAqXG4gKiBAcmV0dXJuIHtzdHJpbmd9IFRoZSBmbGlwcGVkIENTUyBwcm9wZXJ0eSBuYW1lLCBpZiBhcHBsaWNhYmxlLlxuICovXG5mdW5jdGlvbiBnZXRDb252ZXJ0ZWRLZXkoIGtleSApIHtcblx0aWYgKCBrZXkgPT09ICdsZWZ0JyApIHtcblx0XHRyZXR1cm4gJ3JpZ2h0Jztcblx0fVxuXG5cdGlmICgga2V5ID09PSAncmlnaHQnICkge1xuXHRcdHJldHVybiAnbGVmdCc7XG5cdH1cblxuXHRpZiAoIExPV0VSX0xFRlRfUkVHRVhQLnRlc3QoIGtleSApICkge1xuXHRcdHJldHVybiBrZXkucmVwbGFjZSggTE9XRVJfTEVGVF9SRUdFWFAsICctcmlnaHQnICk7XG5cdH1cblxuXHRpZiAoIExPV0VSX1JJR0hUX1JFR0VYUC50ZXN0KCBrZXkgKSApIHtcblx0XHRyZXR1cm4ga2V5LnJlcGxhY2UoIExPV0VSX1JJR0hUX1JFR0VYUCwgJy1sZWZ0JyApO1xuXHR9XG5cblx0aWYgKCBVUFBFUl9MRUZUX1JFR0VYUC50ZXN0KCBrZXkgKSApIHtcblx0XHRyZXR1cm4ga2V5LnJlcGxhY2UoIFVQUEVSX0xFRlRfUkVHRVhQLCAnUmlnaHQnICk7XG5cdH1cblxuXHRpZiAoIFVQUEVSX1JJR0hUX1JFR0VYUC50ZXN0KCBrZXkgKSApIHtcblx0XHRyZXR1cm4ga2V5LnJlcGxhY2UoIFVQUEVSX1JJR0hUX1JFR0VYUCwgJ0xlZnQnICk7XG5cdH1cblxuXHRyZXR1cm4ga2V5O1xufVxuXG4vKipcbiAqIEFuIGluY3JlZGlibHkgYmFzaWMgbHRyIC0+IHJ0bCBjb252ZXJ0ZXIgZm9yIHN0eWxlIHByb3BlcnRpZXNcbiAqXG4gKiBAcGFyYW0ge1JlYWN0LkNTU1Byb3BlcnRpZXN9IGx0clN0eWxlc1xuICpcbiAqIEByZXR1cm4ge1JlYWN0LkNTU1Byb3BlcnRpZXN9IENvbnZlcnRlZCBsdHIgLT4gcnRsIHN0eWxlc1xuICovXG5leHBvcnQgY29uc3QgY29udmVydExUUlRvUlRMID0gKCBsdHJTdHlsZXMgPSB7fSApID0+IHtcblx0cmV0dXJuIE9iamVjdC5mcm9tRW50cmllcyhcblx0XHRPYmplY3QuZW50cmllcyggbHRyU3R5bGVzICkubWFwKCAoIFsga2V5LCB2YWx1ZSBdICkgPT4gW1xuXHRcdFx0Z2V0Q29udmVydGVkS2V5KCBrZXkgKSxcblx0XHRcdHZhbHVlLFxuXHRcdF0gKVxuXHQpO1xufTtcblxuLyoqXG4gKiBBIGhpZ2hlci1vcmRlciBmdW5jdGlvbiB0aGF0IGNyZWF0ZSBhbiBpbmNyZWRpYmx5IGJhc2ljIGx0ciAtPiBydGwgc3R5bGUgY29udmVydGVyIGZvciBDU1Mgb2JqZWN0cy5cbiAqXG4gKiBAcGFyYW0ge1JlYWN0LkNTU1Byb3BlcnRpZXN9IGx0clN0eWxlcyAgIEx0ciBzdHlsZXMuIENvbnZlcnRzIGFuZCByZW5kZXJzIGZyb20gbHRyIC0+IHJ0bCBzdHlsZXMsIGlmIGFwcGxpY2FibGUuXG4gKiBAcGFyYW0ge1JlYWN0LkNTU1Byb3BlcnRpZXN9IFtydGxTdHlsZXNdIFJ0bCBzdHlsZXMuIFJlbmRlcnMgaWYgcHJvdmlkZWQuXG4gKlxuICogQHJldHVybiB7KCkgPT4gaW1wb3J0KCdAZW1vdGlvbi9yZWFjdCcpLlNlcmlhbGl6ZWRTdHlsZXN9IEEgZnVuY3Rpb24gdG8gb3V0cHV0IENTUyBzdHlsZXMgZm9yIEVtb3Rpb24ncyByZW5kZXJlclxuICovXG5leHBvcnQgZnVuY3Rpb24gcnRsKCBsdHJTdHlsZXMgPSB7fSwgcnRsU3R5bGVzICkge1xuXHRyZXR1cm4gKCkgPT4ge1xuXHRcdGlmICggcnRsU3R5bGVzICkge1xuXHRcdFx0Ly8gQHRzLWlnbm9yZTogYGNzc2AgdHlwZXMgYXJlIHdyb25nLCBpdCBjYW4gYWNjZXB0IGFuIG9iamVjdDogaHR0cHM6Ly9lbW90aW9uLnNoL2RvY3Mvb2JqZWN0LXN0eWxlcyN3aXRoLWNzc1xuXHRcdFx0cmV0dXJuIGlzUlRMKCkgPyBjc3MoIHJ0bFN0eWxlcyApIDogY3NzKCBsdHJTdHlsZXMgKTtcblx0XHR9XG5cblx0XHQvLyBAdHMtaWdub3JlOiBgY3NzYCB0eXBlcyBhcmUgd3JvbmcsIGl0IGNhbiBhY2NlcHQgYW4gb2JqZWN0OiBodHRwczovL2Vtb3Rpb24uc2gvZG9jcy9vYmplY3Qtc3R5bGVzI3dpdGgtY3NzXG5cdFx0cmV0dXJuIGlzUlRMKCkgPyBjc3MoIGNvbnZlcnRMVFJUb1JUTCggbHRyU3R5bGVzICkgKSA6IGNzcyggbHRyU3R5bGVzICk7XG5cdH07XG59XG5cbi8qKlxuICogQ2FsbCB0aGlzIGluIHRoZSBgdXNlTWVtb2AgZGVwZW5kZW5jeSBhcnJheSB0byBlbnN1cmUgdGhhdCBzdWJzZXF1ZW50IHJlbmRlcnMgd2lsbFxuICogY2F1c2UgcnRsIHN0eWxlcyB0byB1cGRhdGUgYmFzZWQgb24gdGhlIGBpc1JUTGAgcmV0dXJuIHZhbHVlIGV2ZW4gaWYgYWxsIG90aGVyIGRlcGVuZGVuY2llc1xuICogcmVtYWluIHRoZSBzYW1lLlxuICpcbiAqIEBleGFtcGxlXG4gKiBjb25zdCBzdHlsZXMgPSB1c2VNZW1vKCAoKSA9PiB7XG4gKiAgIHJldHVybiBjc3NgXG4gKiAgICAgJHsgcnRsKCB7IG1hcmdpblJpZ2h0OiAnMTBweCcgfSApIH1cbiAqICAgYDtcbiAqIH0sIFsgcnRsLndhdGNoKCkgXSApO1xuICovXG5ydGwud2F0Y2ggPSAoKSA9PiBpc1JUTCgpO1xuIl19 */");
    };
  }
  rtl.watch = () => (0, import_i18n2.isRTL)();

  // packages/components/build-module/utils/font-values.mjs
  var font_values_default = {
    "default.fontFamily": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif",
    "default.fontSize": "13px",
    "helpText.fontSize": "12px",
    mobileTextMinFontSize: "16px"
  };

  // packages/components/build-module/utils/font.mjs
  function font(value) {
    return font_values_default[value] ?? "";
  }

  // packages/components/build-module/utils/breakpoint-values.mjs
  var breakpoint_values_default = {
    huge: "1440px",
    wide: "1280px",
    "x-large": "1080px",
    large: "960px",
    // admin sidebar auto folds
    medium: "782px",
    // Adminbar goes big.
    small: "600px",
    mobile: "480px",
    "zoomed-in": "280px"
  };

  // packages/components/build-module/utils/breakpoint.mjs
  var breakpoint = (point) => `@media (min-width: ${breakpoint_values_default[point]})`;

  // packages/components/build-module/utils/colors-values.mjs
  var white = "#fff";
  var GRAY = {
    900: "#1e1e1e",
    800: "#2f2f2f",
    /** Meets 4.6:1 text contrast against white. */
    700: "#757575",
    /** Meets 3:1 UI or large text contrast against white. */
    600: "#949494",
    400: "#ccc",
    /** Used for most borders. */
    300: "#ddd",
    /** Used sparingly for light borders. */
    200: "#e0e0e0",
    /** Used for light gray backgrounds. */
    100: "#f0f0f0"
  };
  var ALERT = {
    yellow: "#f0b849",
    red: "#d94f4f",
    green: "#4ab866"
  };
  var THEME = {
    accent: `var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9))`,
    accentDarker10: `var(--wp-components-color-accent-darker-10, var(--wp-admin-theme-color-darker-10, #2145e6))`,
    accentDarker20: `var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6))`,
    /** Used when placing text on the accent color. */
    accentInverted: `var(--wp-components-color-accent-inverted, ${white})`,
    background: `var(--wp-components-color-background, ${white})`,
    foreground: `var(--wp-components-color-foreground, ${GRAY[900]})`,
    /** Used when placing text on the foreground color. */
    foregroundInverted: `var(--wp-components-color-foreground-inverted, ${white})`,
    gray: {
      /** @deprecated Use `COLORS.theme.foreground` instead. */
      900: `var(--wp-components-color-foreground, ${GRAY[900]})`,
      800: `var(--wp-components-color-gray-800, ${GRAY[800]})`,
      700: `var(--wp-components-color-gray-700, ${GRAY[700]})`,
      600: `var(--wp-components-color-gray-600, ${GRAY[600]})`,
      400: `var(--wp-components-color-gray-400, ${GRAY[400]})`,
      300: `var(--wp-components-color-gray-300, ${GRAY[300]})`,
      200: `var(--wp-components-color-gray-200, ${GRAY[200]})`,
      100: `var(--wp-components-color-gray-100, ${GRAY[100]})`
    }
  };
  var UI = {
    background: THEME.background,
    backgroundDisabled: THEME.gray[100],
    border: THEME.gray[600],
    borderHover: THEME.gray[700],
    borderFocus: THEME.accent,
    borderDisabled: THEME.gray[400],
    textDisabled: THEME.gray[600],
    // Matches @wordpress/base-styles
    darkGrayPlaceholder: `color-mix(in srgb, ${THEME.foreground}, transparent 38%)`,
    lightGrayPlaceholder: `color-mix(in srgb, ${THEME.background}, transparent 35%)`
  };
  var COLORS = Object.freeze({
    /**
     * The main gray color object.
     *
     * @deprecated Use semantic aliases in `COLORS.ui` or theme-ready variables in `COLORS.theme.gray`.
     */
    gray: GRAY,
    // TODO: Stop exporting this when everything is migrated to `theme` or `ui`
    /**
     * @deprecated Prefer theme-ready variables in `COLORS.theme`.
     */
    white,
    alert: ALERT,
    /**
     * Theme-ready variables with fallbacks.
     *
     * Prefer semantic aliases in `COLORS.ui` when applicable.
     */
    theme: THEME,
    /**
     * Semantic aliases (prefer these over raw variables when applicable).
     */
    ui: UI
  });

  // packages/components/build-module/utils/config-values.mjs
  var CONTROL_HEIGHT = "36px";
  var CONTROL_PROPS = {
    // These values should be shared with TextControl.
    controlPaddingX: 12,
    controlPaddingXSmall: 8,
    controlPaddingXLarge: 12 * 1.3334,
    // TODO: Deprecate
    controlBoxShadowFocus: `0 0 0 0.5px ${COLORS.theme.accent}`,
    controlHeight: CONTROL_HEIGHT,
    controlHeightXSmall: `calc( ${CONTROL_HEIGHT} * 0.6 )`,
    controlHeightSmall: `calc( ${CONTROL_HEIGHT} * 0.8 )`,
    controlHeightLarge: `calc( ${CONTROL_HEIGHT} * 1.2 )`,
    controlHeightXLarge: `calc( ${CONTROL_HEIGHT} * 1.4 )`
  };
  var config_values_default = Object.assign({}, CONTROL_PROPS, {
    colorDivider: "rgba(0, 0, 0, 0.1)",
    colorScrollbarThumb: "rgba(0, 0, 0, 0.2)",
    colorScrollbarThumbHover: "rgba(0, 0, 0, 0.5)",
    colorScrollbarTrack: "rgba(0, 0, 0, 0.04)",
    elevationIntensity: 1,
    radiusXSmall: "1px",
    radiusSmall: "2px",
    radiusMedium: "4px",
    radiusLarge: "8px",
    radiusFull: "9999px",
    radiusRound: "50%",
    borderWidth: "1px",
    borderWidthFocus: "1.5px",
    borderWidthTab: "4px",
    spinnerSize: 16,
    fontSize: "13px",
    fontSizeH1: "calc(2.44 * 13px)",
    fontSizeH2: "calc(1.95 * 13px)",
    fontSizeH3: "calc(1.56 * 13px)",
    fontSizeH4: "calc(1.25 * 13px)",
    fontSizeH5: "13px",
    fontSizeH6: "calc(0.8 * 13px)",
    fontSizeInputMobile: "16px",
    fontSizeMobile: "15px",
    fontSizeSmall: "calc(0.92 * 13px)",
    fontSizeXSmall: "calc(0.75 * 13px)",
    fontLineHeightBase: "1.4",
    fontWeight: "normal",
    fontWeightMedium: "499",
    // ensures fallback to 400 (instead of 600)
    fontWeightHeading: "600",
    gridBase: "4px",
    elevationXSmall: `0 1px 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 3px rgba(0, 0, 0, 0.02), 0 4px 4px rgba(0, 0, 0, 0.01)`,
    elevationSmall: `0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 3px rgba(0, 0, 0, 0.04), 0 6px 6px rgba(0, 0, 0, 0.03), 0 8px 8px rgba(0, 0, 0, 0.02)`,
    elevationMedium: `0 2px 3px rgba(0, 0, 0, 0.05), 0 4px 5px rgba(0, 0, 0, 0.04), 0 12px 12px rgba(0, 0, 0, 0.03), 0 16px 16px rgba(0, 0, 0, 0.02)`,
    elevationLarge: `0 5px 15px rgba(0, 0, 0, 0.08), 0 15px 27px rgba(0, 0, 0, 0.07), 0 30px 36px rgba(0, 0, 0, 0.04), 0 50px 43px rgba(0, 0, 0, 0.02)`,
    surfaceBackgroundColor: COLORS.white,
    surfaceBackgroundSubtleColor: "#F3F3F3",
    surfaceBackgroundTintColor: "#F5F5F5",
    surfaceBorderColor: "rgba(0, 0, 0, 0.1)",
    surfaceBorderBoldColor: "rgba(0, 0, 0, 0.15)",
    surfaceBorderSubtleColor: "rgba(0, 0, 0, 0.05)",
    surfaceBackgroundTertiaryColor: COLORS.white,
    surfaceColor: COLORS.white,
    transitionDuration: "200ms",
    transitionDurationFast: "160ms",
    transitionDurationFaster: "120ms",
    transitionDurationFastest: "100ms",
    transitionTimingFunction: "cubic-bezier(0.08, 0.52, 0.52, 1)",
    transitionTimingFunctionControl: "cubic-bezier(0.12, 0.8, 0.32, 1)"
  });

  // packages/components/build-module/utils/base-label.mjs
  var baseLabelTypography = /* @__PURE__ */ css("font-size:11px;font-weight:", config_values_default.fontWeightMedium, ";line-height:1.4;text-transform:uppercase;" + (false ? "" : ";label:baseLabelTypography;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJhc2UtbGFiZWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBWXNDIiwiZmlsZSI6ImJhc2UtbGFiZWwudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBDT05GSUcgZnJvbSAnLi9jb25maWctdmFsdWVzLmpzJztcblxuLy8gVGhpcyBpcyBhIHZlcnkgbG93LWxldmVsIG1peGluIHdoaWNoIHlvdSBzaG91bGRuJ3QgaGF2ZSB0byB1c2UgZGlyZWN0bHkuXG4vLyBUcnkgdG8gdXNlIEJhc2VDb250cm9sJ3MgU3R5bGVkTGFiZWwgb3IgQmFzZUNvbnRyb2wuVmlzdWFsTGFiZWwgaWYgeW91IGNhbi5cbmV4cG9ydCBjb25zdCBiYXNlTGFiZWxUeXBvZ3JhcGh5ID0gY3NzYFxuXHRmb250LXNpemU6IDExcHg7XG5cdGZvbnQtd2VpZ2h0OiAkeyBDT05GSUcuZm9udFdlaWdodE1lZGl1bSB9O1xuXHRsaW5lLWhlaWdodDogMS40O1xuXHR0ZXh0LXRyYW5zZm9ybTogdXBwZXJjYXNlO1xuYDtcbiJdfQ== */");

  // packages/components/build-module/utils/dropdown-motion.mjs
  var DROPDOWN_MOTION = Object.freeze({
    SLIDE_DISTANCE: 4,
    SLIDE_DURATION: 200,
    SLIDE_EASING: {
      function: "cubic-bezier",
      args: [0, 0, 0, 1]
    },
    FADE_DURATION: 80,
    FADE_EASING: {
      function: "linear"
    }
  });
  var convertEasingToString = (easing) => {
    if (easing.args?.length) {
      return `${easing.function}(${easing.args.join(",")})`;
    }
    return easing.function;
  };
  var DROPDOWN_MOTION_CSS = Object.freeze({
    SLIDE_DISTANCE: `${DROPDOWN_MOTION.SLIDE_DISTANCE}px`,
    SLIDE_DURATION: `${DROPDOWN_MOTION.SLIDE_DURATION}ms`,
    SLIDE_EASING: convertEasingToString(DROPDOWN_MOTION.SLIDE_EASING),
    FADE_DURATION: `${DROPDOWN_MOTION.FADE_DURATION}ms`,
    FADE_EASING: convertEasingToString(DROPDOWN_MOTION.FADE_EASING)
  });

  // packages/components/build-module/popover/utils.mjs
  var POSITION_TO_PLACEMENT = {
    bottom: "bottom",
    top: "top",
    "middle left": "left",
    "middle right": "right",
    "bottom left": "bottom-end",
    "bottom center": "bottom",
    "bottom right": "bottom-start",
    "top left": "top-end",
    "top center": "top",
    "top right": "top-start",
    "middle left left": "left",
    "middle left right": "left",
    "middle left bottom": "left-end",
    "middle left top": "left-start",
    "middle right left": "right",
    "middle right right": "right",
    "middle right bottom": "right-end",
    "middle right top": "right-start",
    "bottom left left": "bottom-end",
    "bottom left right": "bottom-end",
    "bottom left bottom": "bottom-end",
    "bottom left top": "bottom-end",
    "bottom center left": "bottom",
    "bottom center right": "bottom",
    "bottom center bottom": "bottom",
    "bottom center top": "bottom",
    "bottom right left": "bottom-start",
    "bottom right right": "bottom-start",
    "bottom right bottom": "bottom-start",
    "bottom right top": "bottom-start",
    "top left left": "top-end",
    "top left right": "top-end",
    "top left bottom": "top-end",
    "top left top": "top-end",
    "top center left": "top",
    "top center right": "top",
    "top center bottom": "top",
    "top center top": "top",
    "top right left": "top-start",
    "top right right": "top-start",
    "top right bottom": "top-start",
    "top right top": "top-start",
    // `middle`/`middle center [corner?]` positions are associated to a fallback
    // `bottom` placement because there aren't any corresponding placement values.
    middle: "bottom",
    "middle center": "bottom",
    "middle center bottom": "bottom",
    "middle center left": "bottom",
    "middle center right": "bottom",
    "middle center top": "bottom"
  };
  var positionToPlacement = (position2) => POSITION_TO_PLACEMENT[position2] ?? "bottom";
  var PLACEMENT_TO_ANIMATION_ORIGIN = {
    top: {
      originX: 0.5,
      originY: 1
    },
    // open from bottom, center
    "top-start": {
      originX: 0,
      originY: 1
    },
    // open from bottom, left
    "top-end": {
      originX: 1,
      originY: 1
    },
    // open from bottom, right
    right: {
      originX: 0,
      originY: 0.5
    },
    // open from middle, left
    "right-start": {
      originX: 0,
      originY: 0
    },
    // open from top, left
    "right-end": {
      originX: 0,
      originY: 1
    },
    // open from bottom, left
    bottom: {
      originX: 0.5,
      originY: 0
    },
    // open from top, center
    "bottom-start": {
      originX: 0,
      originY: 0
    },
    // open from top, left
    "bottom-end": {
      originX: 1,
      originY: 0
    },
    // open from top, right
    left: {
      originX: 1,
      originY: 0.5
    },
    // open from middle, right
    "left-start": {
      originX: 1,
      originY: 0
    },
    // open from top, right
    "left-end": {
      originX: 1,
      originY: 1
    },
    // open from bottom, right
    overlay: {
      originX: 0.5,
      originY: 0.5
    }
    // open from center, center
  };
  var placementToMotionAnimationProps = (placement) => {
    const translateProp = placement.startsWith("top") || placement.startsWith("bottom") ? "translateY" : "translateX";
    const translateDirection = placement.startsWith("top") || placement.startsWith("left") ? 1 : -1;
    return {
      style: PLACEMENT_TO_ANIMATION_ORIGIN[placement],
      initial: {
        opacity: 0,
        [translateProp]: `${DROPDOWN_MOTION.SLIDE_DISTANCE * translateDirection}px`
      },
      animate: {
        opacity: 1,
        [translateProp]: 0
      },
      transition: {
        opacity: {
          duration: DROPDOWN_MOTION.FADE_DURATION / 1e3,
          ease: DROPDOWN_MOTION.FADE_EASING.function
        },
        [translateProp]: {
          duration: DROPDOWN_MOTION.SLIDE_DURATION / 1e3,
          ease: cubicBezier(...DROPDOWN_MOTION.SLIDE_EASING.args)
        }
      }
    };
  };
  function isTopBottom(anchorRef) {
    return !!anchorRef?.top;
  }
  function isRef(anchorRef) {
    return !!anchorRef?.current;
  }
  var getReferenceElement = ({
    anchor,
    anchorRef,
    anchorRect,
    getAnchorRect,
    fallbackReferenceElement
  }) => {
    let referenceElement = null;
    if (anchor) {
      referenceElement = anchor;
    } else if (isTopBottom(anchorRef)) {
      referenceElement = {
        getBoundingClientRect() {
          const topRect = anchorRef.top.getBoundingClientRect();
          const bottomRect = anchorRef.bottom.getBoundingClientRect();
          return new window.DOMRect(topRect.x, topRect.y, topRect.width, bottomRect.bottom - topRect.top);
        }
      };
    } else if (isRef(anchorRef)) {
      referenceElement = anchorRef.current;
    } else if (anchorRef) {
      referenceElement = anchorRef;
    } else if (anchorRect) {
      referenceElement = {
        getBoundingClientRect() {
          return anchorRect;
        }
      };
    } else if (getAnchorRect) {
      referenceElement = {
        getBoundingClientRect() {
          const rect = getAnchorRect(fallbackReferenceElement);
          return new window.DOMRect(rect.x ?? rect.left, rect.y ?? rect.top, rect.width ?? rect.right - rect.left, rect.height ?? rect.bottom - rect.top);
        }
      };
    } else if (fallbackReferenceElement) {
      referenceElement = fallbackReferenceElement.parentElement;
    }
    return referenceElement ?? null;
  };
  var computePopoverPosition = (c3) => c3 === null || Number.isNaN(c3) ? void 0 : Math.round(c3);

  // packages/components/build-module/tooltip/context.mjs
  var import_element13 = __toESM(require_element(), 1);
  var TooltipInternalContext = (0, import_element13.createContext)({
    isNestedInTooltip: false
  });
  TooltipInternalContext.displayName = "TooltipInternalContext";

  // packages/components/build-module/tooltip/index.mjs
  var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
  var TOOLTIP_DELAY = 700;
  var CONTEXT_VALUE = {
    isNestedInTooltip: true
  };
  function UnforwardedTooltip(props, ref) {
    const {
      children,
      className: className2,
      delay: delay2 = TOOLTIP_DELAY,
      hideOnClick = true,
      placement,
      position: position2,
      shortcut,
      text,
      ...restProps
    } = props;
    const {
      isNestedInTooltip
    } = (0, import_element14.useContext)(TooltipInternalContext);
    const baseId = (0, import_compose.useInstanceId)(Tooltip22, "tooltip");
    const describedById = text || shortcut ? baseId : void 0;
    const isOnlyChild = import_element14.Children.count(children) === 1;
    if (!isOnlyChild) {
      if (true) {
        console.error("wp-components.Tooltip should be called with only a single child element.");
      }
    }
    let computedPlacement;
    if (placement !== void 0) {
      computedPlacement = placement;
    } else if (position2 !== void 0) {
      computedPlacement = positionToPlacement(position2);
      (0, import_deprecated.default)("`position` prop in wp.components.tooltip", {
        since: "6.4",
        alternative: "`placement` prop"
      });
    }
    computedPlacement = computedPlacement || "bottom";
    const tooltipStore = useTooltipStore({
      placement: computedPlacement,
      showTimeout: delay2
    });
    const mounted = useStoreState(tooltipStore, "mounted");
    if (isNestedInTooltip) {
      return isOnlyChild ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Role, {
        ...restProps,
        render: children
      }) : children;
    }
    function addDescribedById(element) {
      return describedById && mounted && element.props["aria-describedby"] === void 0 && element.props["aria-label"] !== text ? (0, import_element14.cloneElement)(element, {
        "aria-describedby": describedById
      }) : element;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(TooltipInternalContext.Provider, {
      value: CONTEXT_VALUE,
      children: [/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TooltipAnchor, {
        onClick: hideOnClick ? tooltipStore.hide : void 0,
        store: tooltipStore,
        render: isOnlyChild ? addDescribedById(children) : void 0,
        ref,
        children: isOnlyChild ? void 0 : children
      }), isOnlyChild && (text || shortcut) && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Tooltip, {
        ...restProps,
        className: clsx_default("components-tooltip", className2),
        unmountOnHide: true,
        gutter: 4,
        id: describedById,
        overflowPadding: 0.5,
        store: tooltipStore,
        children: [text, shortcut && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(shortcut_default, {
          className: text ? "components-tooltip__shortcut" : "",
          shortcut
        })]
      })]
    });
  }
  var Tooltip22 = (0, import_element14.forwardRef)(UnforwardedTooltip);
  var tooltip_default = Tooltip22;

  // packages/components/build-module/context/context-system-provider.mjs
  var import_deepmerge = __toESM(require_cjs(), 1);
  var import_es6 = __toESM(require_es6(), 1);

  // node_modules/is-plain-object/dist/is-plain-object.mjs
  function isObject2(o4) {
    return Object.prototype.toString.call(o4) === "[object Object]";
  }
  function isPlainObject(o4) {
    var ctor, prot;
    if (isObject2(o4) === false) return false;
    ctor = o4.constructor;
    if (ctor === void 0) return true;
    prot = ctor.prototype;
    if (isObject2(prot) === false) return false;
    if (prot.hasOwnProperty("isPrototypeOf") === false) {
      return false;
    }
    return true;
  }

  // packages/components/build-module/context/context-system-provider.mjs
  var import_element15 = __toESM(require_element(), 1);
  var import_warning = __toESM(require_warning(), 1);
  var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
  var ComponentsContext = (0, import_element15.createContext)(
    /** @type {Record<string, any>} */
    {}
  );
  ComponentsContext.displayName = "ComponentsContext";
  var useComponentsContext = () => (0, import_element15.useContext)(ComponentsContext);
  function useContextSystemBridge({
    value
  }) {
    const parentContext = useComponentsContext();
    const valueRef = (0, import_element15.useRef)(value);
    use_update_effect_default(() => {
      if (
        // Objects are equivalent.
        (0, import_es6.default)(valueRef.current, value) && // But not the same reference.
        valueRef.current !== value
      ) {
        true ? (0, import_warning.default)(`Please memoize your context: ${JSON.stringify(value)}`) : void 0;
      }
    }, [value]);
    const config = (0, import_element15.useMemo)(() => {
      return (0, import_deepmerge.default)(parentContext ?? {}, value ?? {}, {
        isMergeableObject: isPlainObject
      });
    }, [parentContext, value]);
    return config;
  }
  var BaseContextSystemProvider = ({
    children,
    value
  }) => {
    const contextValue = useContextSystemBridge({
      value
    });
    return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ComponentsContext.Provider, {
      value: contextValue,
      children
    });
  };
  var ContextSystemProvider = (0, import_element15.memo)(BaseContextSystemProvider);

  // packages/components/build-module/context/context-connect.mjs
  var import_element16 = __toESM(require_element(), 1);
  var import_warning2 = __toESM(require_warning(), 1);

  // packages/components/build-module/context/constants.mjs
  var COMPONENT_NAMESPACE = "data-wp-component";
  var CONNECTED_NAMESPACE = "data-wp-c16t";
  var CONNECT_STATIC_NAMESPACE = "__contextSystemKey__";

  // node_modules/tslib/tslib.es6.mjs
  var __assign = function() {
    __assign = Object.assign || function __assign4(t4) {
      for (var s3, i3 = 1, n3 = arguments.length; i3 < n3; i3++) {
        s3 = arguments[i3];
        for (var p3 in s3) if (Object.prototype.hasOwnProperty.call(s3, p3)) t4[p3] = s3[p3];
      }
      return t4;
    };
    return __assign.apply(this, arguments);
  };

  // node_modules/lower-case/dist.es2015/index.js
  function lowerCase(str) {
    return str.toLowerCase();
  }

  // node_modules/no-case/dist.es2015/index.js
  var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
  var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
  function noCase(input, options2) {
    if (options2 === void 0) {
      options2 = {};
    }
    var _a = options2.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options2.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options2.transform, transform = _c === void 0 ? lowerCase : _c, _d = options2.delimiter, delimiter2 = _d === void 0 ? " " : _d;
    var result = replace2(replace2(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
    var start = 0;
    var end = result.length;
    while (result.charAt(start) === "\0")
      start++;
    while (result.charAt(end - 1) === "\0")
      end--;
    return result.slice(start, end).split("\0").map(transform).join(delimiter2);
  }
  function replace2(input, re4, value) {
    if (re4 instanceof RegExp)
      return input.replace(re4, value);
    return re4.reduce(function(input2, re5) {
      return input2.replace(re5, value);
    }, input);
  }

  // node_modules/dot-case/dist.es2015/index.js
  function dotCase(input, options2) {
    if (options2 === void 0) {
      options2 = {};
    }
    return noCase(input, __assign({ delimiter: "." }, options2));
  }

  // node_modules/param-case/dist.es2015/index.js
  function paramCase(input, options2) {
    if (options2 === void 0) {
      options2 = {};
    }
    return dotCase(input, __assign({ delimiter: "-" }, options2));
  }

  // packages/components/build-module/context/get-styled-class-name-from-key.mjs
  function getStyledClassName(namespace) {
    const kebab = paramCase(namespace);
    return `components-${kebab}`;
  }
  var getStyledClassNameFromKey = memize(getStyledClassName);

  // packages/components/build-module/context/context-connect.mjs
  function contextConnect(Component9, namespace) {
    return _contextConnect(Component9, namespace, {
      forwardsRef: true
    });
  }
  function contextConnectWithoutRef(Component9, namespace) {
    return _contextConnect(Component9, namespace);
  }
  function _contextConnect(Component9, namespace, options2) {
    const WrappedComponent = options2?.forwardsRef ? (0, import_element16.forwardRef)(Component9) : Component9;
    if (typeof namespace === "undefined") {
      true ? (0, import_warning2.default)("contextConnect: Please provide a namespace") : void 0;
    }
    let mergedNamespace = WrappedComponent[CONNECT_STATIC_NAMESPACE] || [namespace];
    if (Array.isArray(namespace)) {
      mergedNamespace = [...mergedNamespace, ...namespace];
    }
    if (typeof namespace === "string") {
      mergedNamespace = [...mergedNamespace, namespace];
    }
    return Object.assign(WrappedComponent, {
      [CONNECT_STATIC_NAMESPACE]: [...new Set(mergedNamespace)],
      displayName: namespace,
      selector: `.${getStyledClassNameFromKey(namespace)}`
    });
  }
  function getConnectNamespace(Component9) {
    if (!Component9) {
      return [];
    }
    let namespaces = [];
    if (Component9[CONNECT_STATIC_NAMESPACE]) {
      namespaces = Component9[CONNECT_STATIC_NAMESPACE];
    }
    if (Component9.type && Component9.type[CONNECT_STATIC_NAMESPACE]) {
      namespaces = Component9.type[CONNECT_STATIC_NAMESPACE];
    }
    return namespaces;
  }
  function hasConnectNamespace(Component9, match4) {
    if (!Component9) {
      return false;
    }
    if (typeof match4 === "string") {
      return getConnectNamespace(Component9).includes(match4);
    }
    if (Array.isArray(match4)) {
      return match4.some((result) => getConnectNamespace(Component9).includes(result));
    }
    return false;
  }

  // packages/components/build-module/context/use-context-system.mjs
  var import_warning3 = __toESM(require_warning(), 1);

  // packages/components/build-module/context/utils.mjs
  function getNamespace(componentName) {
    return {
      [COMPONENT_NAMESPACE]: componentName
    };
  }
  function getConnectedNamespace() {
    return {
      [CONNECTED_NAMESPACE]: true
    };
  }

  // packages/components/build-module/context/use-context-system.mjs
  function useContextSystem(props, namespace) {
    const contextSystemProps = useComponentsContext();
    if (typeof namespace === "undefined") {
      true ? (0, import_warning3.default)("useContextSystem: Please provide a namespace") : void 0;
    }
    const contextProps = contextSystemProps?.[namespace] || {};
    const finalComponentProps = {
      ...getConnectedNamespace(),
      ...getNamespace(namespace)
    };
    const {
      _overrides: overrideProps,
      ...otherContextProps
    } = contextProps;
    const initialMergedProps = Object.entries(otherContextProps).length ? Object.assign({}, otherContextProps, props) : props;
    const cx3 = useCx();
    const classes = cx3(getStyledClassNameFromKey(namespace), props.className);
    const rendered = typeof initialMergedProps.renderChildren === "function" ? initialMergedProps.renderChildren(initialMergedProps) : initialMergedProps.children;
    for (const key in initialMergedProps) {
      finalComponentProps[key] = initialMergedProps[key];
    }
    for (const key in overrideProps) {
      finalComponentProps[key] = overrideProps[key];
    }
    if (rendered !== void 0) {
      finalComponentProps.children = rendered;
    }
    finalComponentProps.className = classes;
    return finalComponentProps;
  }

  // packages/components/build-module/visually-hidden/styles.mjs
  var visuallyHidden = {
    border: 0,
    clip: "rect(1px, 1px, 1px, 1px)",
    WebkitClipPath: "inset( 50% )",
    clipPath: "inset( 50% )",
    height: "1px",
    margin: "-1px",
    overflow: "hidden",
    padding: 0,
    position: "absolute",
    width: "1px",
    wordWrap: "normal"
  };

  // node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js
  var React9 = __toESM(require_react());
  init_emotion_is_prop_valid_esm();
  var isDevelopment4 = false;
  var testOmitPropsOnStringTag = isPropValid;
  var testOmitPropsOnComponent = function testOmitPropsOnComponent2(key) {
    return key !== "theme";
  };
  var getDefaultShouldForwardProp = function getDefaultShouldForwardProp2(tag) {
    return typeof tag === "string" && // 96 is one less than the char code
    // for "a" so this is checking that
    // it's a lowercase character
    tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;
  };
  var composeShouldForwardProps = function composeShouldForwardProps2(tag, options2, isReal) {
    var shouldForwardProp;
    if (options2) {
      var optionsShouldForwardProp = options2.shouldForwardProp;
      shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function(propName) {
        return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);
      } : optionsShouldForwardProp;
    }
    if (typeof shouldForwardProp !== "function" && isReal) {
      shouldForwardProp = tag.__emotion_forwardProp;
    }
    return shouldForwardProp;
  };
  var Insertion3 = function Insertion4(_ref11) {
    var cache2 = _ref11.cache, serialized = _ref11.serialized, isStringTag = _ref11.isStringTag;
    registerStyles(cache2, serialized, isStringTag);
    useInsertionEffectAlwaysWithSyncFallback(function() {
      return insertStyles(cache2, serialized, isStringTag);
    });
    return null;
  };
  var createStyled = function createStyled2(tag, options2) {
    var isReal = tag.__emotion_real === tag;
    var baseTag = isReal && tag.__emotion_base || tag;
    var identifierName;
    var targetClassName;
    if (options2 !== void 0) {
      identifierName = options2.label;
      targetClassName = options2.target;
    }
    var shouldForwardProp = composeShouldForwardProps(tag, options2, isReal);
    var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag);
    var shouldUseAs = !defaultShouldForwardProp("as");
    return function() {
      var args = arguments;
      var styles3 = isReal && tag.__emotion_styles !== void 0 ? tag.__emotion_styles.slice(0) : [];
      if (identifierName !== void 0) {
        styles3.push("label:" + identifierName + ";");
      }
      if (args[0] == null || args[0].raw === void 0) {
        styles3.push.apply(styles3, args);
      } else {
        var templateStringsArr = args[0];
        styles3.push(templateStringsArr[0]);
        var len = args.length;
        var i3 = 1;
        for (; i3 < len; i3++) {
          styles3.push(args[i3], templateStringsArr[i3]);
        }
      }
      var Styled = withEmotionCache(function(props, cache2, ref) {
        var FinalTag = shouldUseAs && props.as || baseTag;
        var className2 = "";
        var classInterpolations = [];
        var mergedProps = props;
        if (props.theme == null) {
          mergedProps = {};
          for (var key in props) {
            mergedProps[key] = props[key];
          }
          mergedProps.theme = React9.useContext(ThemeContext);
        }
        if (typeof props.className === "string") {
          className2 = getRegisteredStyles(cache2.registered, classInterpolations, props.className);
        } else if (props.className != null) {
          className2 = props.className + " ";
        }
        var serialized = serializeStyles(styles3.concat(classInterpolations), cache2.registered, mergedProps);
        className2 += cache2.key + "-" + serialized.name;
        if (targetClassName !== void 0) {
          className2 += " " + targetClassName;
        }
        var finalShouldForwardProp = shouldUseAs && shouldForwardProp === void 0 ? getDefaultShouldForwardProp(FinalTag) : defaultShouldForwardProp;
        var newProps = {};
        for (var _key in props) {
          if (shouldUseAs && _key === "as") continue;
          if (finalShouldForwardProp(_key)) {
            newProps[_key] = props[_key];
          }
        }
        newProps.className = className2;
        if (ref) {
          newProps.ref = ref;
        }
        return /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(Insertion3, {
          cache: cache2,
          serialized,
          isStringTag: typeof FinalTag === "string"
        }), /* @__PURE__ */ React9.createElement(FinalTag, newProps));
      });
      Styled.displayName = identifierName !== void 0 ? identifierName : "Styled(" + (typeof baseTag === "string" ? baseTag : baseTag.displayName || baseTag.name || "Component") + ")";
      Styled.defaultProps = tag.defaultProps;
      Styled.__emotion_real = Styled;
      Styled.__emotion_base = baseTag;
      Styled.__emotion_styles = styles3;
      Styled.__emotion_forwardProp = shouldForwardProp;
      Object.defineProperty(Styled, "toString", {
        value: function value() {
          if (targetClassName === void 0 && isDevelopment4) {
            return "NO_COMPONENT_SELECTOR";
          }
          return "." + targetClassName;
        }
      });
      Styled.withComponent = function(nextTag, nextOptions) {
        var newStyled = createStyled2(nextTag, _extends({}, options2, nextOptions, {
          shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)
        }));
        return newStyled.apply(void 0, styles3);
      };
      return Styled;
    };
  };

  // packages/components/build-module/view/component.mjs
  var import_element17 = __toESM(require_element(), 1);
  var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
  var PolymorphicDiv = /* @__PURE__ */ createStyled("div", false ? {
    target: "e19lxcc00"
  } : {
    target: "e19lxcc00",
    label: "PolymorphicDiv"
  })(false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbXBvbmVudC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZWlDIiwiZmlsZSI6ImNvbXBvbmVudC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbi8qKlxuICogV29yZFByZXNzIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBmb3J3YXJkUmVmIH0gZnJvbSAnQHdvcmRwcmVzcy9lbGVtZW50JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBXb3JkUHJlc3NDb21wb25lbnRQcm9wcyB9IGZyb20gJy4uL2NvbnRleHQnO1xuXG5jb25zdCBQb2x5bW9ycGhpY0RpdiA9IHN0eWxlZC5kaXZgYDtcblxuZnVuY3Rpb24gVW5mb3J3YXJkZWRWaWV3PCBUIGV4dGVuZHMgUmVhY3QuRWxlbWVudFR5cGUgPSAnZGl2JyA+KFxuXHR7IGFzLCAuLi5yZXN0UHJvcHMgfTogV29yZFByZXNzQ29tcG9uZW50UHJvcHM8IHt9LCBUID4sXG5cdHJlZjogUmVhY3QuRm9yd2FyZGVkUmVmPCBhbnkgPlxuKSB7XG5cdHJldHVybiA8UG9seW1vcnBoaWNEaXYgYXM9eyBhcyB9IHJlZj17IHJlZiB9IHsgLi4ucmVzdFByb3BzIH0gLz47XG59XG5cbi8qKlxuICogYFZpZXdgIGlzIGEgY29yZSBjb21wb25lbnQgdGhhdCByZW5kZXJzIGV2ZXJ5dGhpbmcgaW4gdGhlIGxpYnJhcnkuXG4gKiBJdCBpcyB0aGUgcHJpbmNpcGxlIGNvbXBvbmVudCBpbiB0aGUgZW50aXJlIGxpYnJhcnkuXG4gKlxuICogYGBganN4XG4gKiBpbXBvcnQgeyBWaWV3IH0gZnJvbSBgQHdvcmRwcmVzcy9jb21wb25lbnRzYDtcbiAqXG4gKiBmdW5jdGlvbiBFeGFtcGxlKCkge1xuICogXHRyZXR1cm4gKFxuICogXHRcdDxWaWV3PlxuICogXHRcdFx0IENvZGUgaXMgUG9ldHJ5XG4gKiBcdFx0PC9WaWV3PlxuICogXHQpO1xuICogfVxuICogYGBgXG4gKi9cbmV4cG9ydCBjb25zdCBWaWV3ID0gT2JqZWN0LmFzc2lnbiggZm9yd2FyZFJlZiggVW5mb3J3YXJkZWRWaWV3ICksIHtcblx0c2VsZWN0b3I6ICcuY29tcG9uZW50cy12aWV3Jyxcbn0gKTtcblxuZXhwb3J0IGRlZmF1bHQgVmlldztcbiJdfQ== */");
  function UnforwardedView({
    as,
    ...restProps
  }, ref) {
    return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(PolymorphicDiv, {
      as,
      ref,
      ...restProps
    });
  }
  var View = Object.assign((0, import_element17.forwardRef)(UnforwardedView), {
    selector: ".components-view"
  });
  var component_default = View;

  // packages/components/build-module/visually-hidden/component.mjs
  var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedVisuallyHidden(props, forwardedRef) {
    const {
      style: styleProp,
      ...contextProps
    } = useContextSystem(props, "VisuallyHidden");
    return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(component_default, {
      ref: forwardedRef,
      ...contextProps,
      style: {
        ...visuallyHidden,
        ...styleProp || {}
      }
    });
  }
  var VisuallyHidden3 = contextConnect(UnconnectedVisuallyHidden, "VisuallyHidden");
  var component_default2 = VisuallyHidden3;

  // packages/components/build-module/alignment-matrix-control/utils.mjs
  var import_i18n3 = __toESM(require_i18n(), 1);
  var GRID = [["top left", "top center", "top right"], ["center left", "center center", "center right"], ["bottom left", "bottom center", "bottom right"]];
  var ALIGNMENT_LABEL = {
    "top left": (0, import_i18n3.__)("Top Left"),
    "top center": (0, import_i18n3.__)("Top Center"),
    "top right": (0, import_i18n3.__)("Top Right"),
    "center left": (0, import_i18n3.__)("Center Left"),
    "center center": (0, import_i18n3.__)("Center"),
    center: (0, import_i18n3.__)("Center"),
    "center right": (0, import_i18n3.__)("Center Right"),
    "bottom left": (0, import_i18n3.__)("Bottom Left"),
    "bottom center": (0, import_i18n3.__)("Bottom Center"),
    "bottom right": (0, import_i18n3.__)("Bottom Right")
  };
  var ALIGNMENTS = GRID.flat();
  function normalize(value) {
    const normalized = value === "center" ? "center center" : value;
    const transformed = normalized?.replace("-", " ");
    return ALIGNMENTS.includes(transformed) ? transformed : void 0;
  }
  function getItemId(prefixId, value) {
    const normalized = normalize(value);
    if (!normalized) {
      return;
    }
    const id3 = normalized.replace(" ", "-");
    return `${prefixId}-${id3}`;
  }
  function getItemValue(prefixId, id3) {
    const value = id3?.replace(prefixId + "-", "");
    return normalize(value);
  }
  function getAlignmentIndex(alignment = "center") {
    const normalized = normalize(alignment);
    if (!normalized) {
      return void 0;
    }
    const index2 = ALIGNMENTS.indexOf(normalized);
    return index2 > -1 ? index2 : void 0;
  }

  // packages/components/build-module/alignment-matrix-control/cell.mjs
  var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
  if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='4c2e860238']")) {
    const style2 = document.createElement("style");
    style2.setAttribute("data-wp-hash", "4c2e860238");
    style2.appendChild(document.createTextNode("._02e2af5803bf5bda__grid-container{aspect-ratio:1;border:1px solid #0000;border-radius:4px;box-sizing:border-box;cursor:pointer;direction:ltr;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);outline:none}.c421f8ed08c23077__grid-row{box-sizing:border-box;display:grid;grid-column:1/-1;grid-template-columns:repeat(3,1fr)}._3af769f755097fdb__cell{align-items:center;appearance:none;border:none;box-sizing:border-box;display:flex;justify-content:center;margin:0;outline:none;padding:0;position:relative}._37ef12d4fb6d6131__point{aspect-ratio:1;border:3px solid;box-sizing:border-box;color:var(--wp-components-color-gray-400,#ccc);contain:strict;display:block;margin:auto;width:6px}._3af769f755097fdb__cell[data-active-item] ._37ef12d4fb6d6131__point{color:var(--wp-components-color-foreground,#1e1e1e);transform:scale(1.6666666667)}._3af769f755097fdb__cell:not([data-active-item]):hover ._37ef12d4fb6d6131__point{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}._3af769f755097fdb__cell[data-focus-visible] ._37ef12d4fb6d6131__point{outline:1px solid var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));outline-offset:1px}@media not (prefers-reduced-motion){._37ef12d4fb6d6131__point{transition-duration:.12s;transition-property:color,transform;transition-timing-function:linear}}"));
    document.head.appendChild(style2);
  }
  var style_module_default = { "grid-container": "_02e2af5803bf5bda__grid-container", "grid-row": "c421f8ed08c23077__grid-row", "cell": "_3af769f755097fdb__cell", "point": "_37ef12d4fb6d6131__point" };
  function Cell({
    id: id3,
    value,
    ...props
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(tooltip_default, {
      text: ALIGNMENT_LABEL[value],
      children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Composite22.Item, {
        id: id3,
        render: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", {
          ...props,
          className: clsx_default(style_module_default.cell, props.className),
          role: "gridcell"
        }),
        children: [/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(component_default2, {
          children: value
        }), /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", {
          className: style_module_default.point,
          role: "presentation"
        })]
      })
    });
  }

  // packages/components/build-module/alignment-matrix-control/icon.mjs
  var import_primitives = __toESM(require_primitives(), 1);
  var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
  var BASE_SIZE = 24;
  var GRID_CELL_SIZE = 7;
  var GRID_PADDING = (BASE_SIZE - 3 * GRID_CELL_SIZE) / 2;
  var DOT_SIZE = 2;
  var DOT_SIZE_SELECTED = 4;
  function AlignmentMatrixControlIcon({
    className: className2,
    disablePointerEvents = true,
    size: size3,
    width,
    height,
    style: style2 = {},
    value = "center",
    ...props
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_primitives.SVG, {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: `0 0 ${BASE_SIZE} ${BASE_SIZE}`,
      width: size3 ?? width ?? BASE_SIZE,
      height: size3 ?? height ?? BASE_SIZE,
      role: "presentation",
      className: clsx_default("component-alignment-matrix-control-icon", className2),
      style: {
        pointerEvents: disablePointerEvents ? "none" : void 0,
        ...style2
      },
      ...props,
      children: ALIGNMENTS.map((align, index2) => {
        const dotSize = getAlignmentIndex(value) === index2 ? DOT_SIZE_SELECTED : DOT_SIZE;
        return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_primitives.Rect, {
          x: GRID_PADDING + index2 % 3 * GRID_CELL_SIZE + (GRID_CELL_SIZE - dotSize) / 2,
          y: GRID_PADDING + Math.floor(index2 / 3) * GRID_CELL_SIZE + (GRID_CELL_SIZE - dotSize) / 2,
          width: dotSize,
          height: dotSize,
          fill: "currentColor"
        }, align);
      })
    });
  }
  var icon_default = AlignmentMatrixControlIcon;

  // packages/components/build-module/alignment-matrix-control/index.mjs
  var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
  if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='4c2e860238']")) {
    const style2 = document.createElement("style");
    style2.setAttribute("data-wp-hash", "4c2e860238");
    style2.appendChild(document.createTextNode("._02e2af5803bf5bda__grid-container{aspect-ratio:1;border:1px solid #0000;border-radius:4px;box-sizing:border-box;cursor:pointer;direction:ltr;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);outline:none}.c421f8ed08c23077__grid-row{box-sizing:border-box;display:grid;grid-column:1/-1;grid-template-columns:repeat(3,1fr)}._3af769f755097fdb__cell{align-items:center;appearance:none;border:none;box-sizing:border-box;display:flex;justify-content:center;margin:0;outline:none;padding:0;position:relative}._37ef12d4fb6d6131__point{aspect-ratio:1;border:3px solid;box-sizing:border-box;color:var(--wp-components-color-gray-400,#ccc);contain:strict;display:block;margin:auto;width:6px}._3af769f755097fdb__cell[data-active-item] ._37ef12d4fb6d6131__point{color:var(--wp-components-color-foreground,#1e1e1e);transform:scale(1.6666666667)}._3af769f755097fdb__cell:not([data-active-item]):hover ._37ef12d4fb6d6131__point{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}._3af769f755097fdb__cell[data-focus-visible] ._37ef12d4fb6d6131__point{outline:1px solid var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));outline-offset:1px}@media not (prefers-reduced-motion){._37ef12d4fb6d6131__point{transition-duration:.12s;transition-property:color,transform;transition-timing-function:linear}}"));
    document.head.appendChild(style2);
  }
  var style_module_default2 = { "grid-container": "_02e2af5803bf5bda__grid-container", "grid-row": "c421f8ed08c23077__grid-row", "cell": "_3af769f755097fdb__cell", "point": "_37ef12d4fb6d6131__point" };
  function UnforwardedAlignmentMatrixControl({
    className: className2,
    id: id3,
    label = (0, import_i18n4.__)("Alignment Matrix Control"),
    defaultValue: defaultValue2 = "center center",
    value,
    onChange,
    width = 92,
    ...props
  }) {
    const baseId = (0, import_compose2.useInstanceId)(UnforwardedAlignmentMatrixControl, "alignment-matrix-control", id3);
    const setActiveId = (0, import_element18.useCallback)((nextActiveId) => {
      const nextValue = getItemValue(baseId, nextActiveId);
      if (nextValue) {
        onChange?.(nextValue);
      }
    }, [baseId, onChange]);
    const classes = clsx_default("component-alignment-matrix-control", style_module_default2["grid-container"], className2);
    return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Composite22, {
      defaultActiveId: getItemId(baseId, defaultValue2),
      activeId: getItemId(baseId, value),
      setActiveId,
      rtl: (0, import_i18n4.isRTL)(),
      render: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", {
        ...props,
        className: classes,
        "aria-label": label,
        id: baseId,
        role: "grid",
        style: {
          width: `${width}px`
        }
      }),
      children: GRID.map((cells, index2) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Composite22.Row, {
        render: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", {
          className: style_module_default2["grid-row"],
          role: "row"
        }),
        children: cells.map((cell) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Cell, {
          id: getItemId(baseId, cell),
          value: cell
        }, cell))
      }, index2))
    });
  }
  var AlignmentMatrixControl = Object.assign(UnforwardedAlignmentMatrixControl, {
    /**
     * Render an alignment matrix as an icon.
     *
     * ```jsx
     * import { AlignmentMatrixControl } from '@wordpress/components';
     *
     * <Icon icon={<AlignmentMatrixControl.Icon value="top left" />} />
     * ```
     */
    Icon: Object.assign(icon_default, {
      displayName: "AlignmentMatrixControl.Icon"
    })
  });
  var alignment_matrix_control_default = AlignmentMatrixControl;

  // packages/components/build-module/animate/index.mjs
  function getDefaultOrigin(type) {
    return type === "appear" ? "top" : "left";
  }
  function getAnimateClassName(options2) {
    if (options2.type === "loading") {
      return "components-animate__loading";
    }
    const {
      type,
      origin = getDefaultOrigin(type)
    } = options2;
    if (type === "appear") {
      const [yAxis, xAxis = "center"] = origin.split(" ");
      return clsx_default("components-animate__appear", {
        ["is-from-" + xAxis]: xAxis !== "center",
        ["is-from-" + yAxis]: yAxis !== "middle"
      });
    }
    if (type === "slide-in") {
      return clsx_default("components-animate__slide-in", "is-from-" + origin);
    }
    return void 0;
  }
  function Animate({
    type,
    options: options2 = {},
    children
  }) {
    return children({
      className: getAnimateClassName({
        type,
        ...options2
      })
    });
  }
  var animate_default = Animate;

  // packages/components/build-module/angle-picker-control/index.mjs
  var import_element38 = __toESM(require_element(), 1);
  var import_i18n6 = __toESM(require_i18n(), 1);

  // packages/components/build-module/flex/flex/hook.mjs
  var import_element20 = __toESM(require_element(), 1);
  var import_deprecated2 = __toESM(require_deprecated(), 1);

  // packages/components/build-module/utils/use-responsive-value.mjs
  var import_element19 = __toESM(require_element(), 1);
  var breakpoints = ["40em", "52em", "64em"];
  var useBreakpointIndex = (options2 = {}) => {
    const {
      defaultIndex = 0
    } = options2;
    if (typeof defaultIndex !== "number") {
      throw new TypeError(`Default breakpoint index should be a number. Got: ${defaultIndex}, ${typeof defaultIndex}`);
    } else if (defaultIndex < 0 || defaultIndex > breakpoints.length - 1) {
      throw new RangeError(`Default breakpoint index out of range. Theme has ${breakpoints.length} breakpoints, got index ${defaultIndex}`);
    }
    const [value, setValue] = (0, import_element19.useState)(defaultIndex);
    (0, import_element19.useEffect)(() => {
      const getIndex = () => breakpoints.filter((bp) => {
        return typeof window !== "undefined" ? window.matchMedia(`screen and (min-width: ${bp})`).matches : false;
      }).length;
      const onResize = () => {
        const newValue = getIndex();
        if (value !== newValue) {
          setValue(newValue);
        }
      };
      onResize();
      if (typeof window !== "undefined") {
        window.addEventListener("resize", onResize);
      }
      return () => {
        if (typeof window !== "undefined") {
          window.removeEventListener("resize", onResize);
        }
      };
    }, [value]);
    return value;
  };
  function useResponsiveValue(values, options2 = {}) {
    const index2 = useBreakpointIndex(options2);
    if (!Array.isArray(values) && typeof values !== "function") {
      return values;
    }
    const array = values || [];
    return array[index2 >= array.length ? array.length - 1 : index2];
  }

  // packages/components/build-module/utils/space.mjs
  var GRID_BASE = "4px";
  function space(value) {
    if (typeof value === "undefined") {
      return void 0;
    }
    if (!value) {
      return "0";
    }
    const asInt = typeof value === "number" ? value : Number(value);
    if (typeof window !== "undefined" && window.CSS?.supports?.("margin", value.toString()) || Number.isNaN(asInt)) {
      return value.toString();
    }
    return `calc(${GRID_BASE} * ${value})`;
  }

  // packages/components/build-module/flex/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__2() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var Flex = false ? {
    name: "zjik7",
    styles: "display:flex"
  } : {
    name: "a57899-Flex",
    styles: "display:flex;label:Flex;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLdUIiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5leHBvcnQgY29uc3QgRmxleCA9IGNzc2Bcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtID0gY3NzYFxuXHRkaXNwbGF5OiBibG9jaztcblx0bWF4LWhlaWdodDogMTAwJTtcblx0bWF4LXdpZHRoOiAxMDAlO1xuXHRtaW4taGVpZ2h0OiAwO1xuXHRtaW4td2lkdGg6IDA7XG5gO1xuXG5leHBvcnQgY29uc3QgYmxvY2sgPSBjc3NgXG5cdGZsZXg6IDE7XG5gO1xuXG4vKipcbiAqIFdvcmthcm91bmQgdG8gb3B0aW1pemUgRE9NIHJlbmRlcmluZy5cbiAqIFdlJ2xsIGVuaGFuY2UgYWxpZ25tZW50IHdpdGggbmFpdmUgcGFyZW50IGZsZXggYXNzdW1wdGlvbnMuXG4gKlxuICogVHJhZGUtb2ZmOlxuICogRmFyIGxlc3MgRE9NIGxlc3MuIEhvd2V2ZXIsIFVJIHJlbmRlcmluZyBpcyBub3QgYXMgcmVsaWFibGUuXG4gKi9cblxuLyoqXG4gKiBJbXByb3ZlcyBzdGFiaWxpdHkgb2Ygd2lkdGgvaGVpZ2h0IHJlbmRlcmluZy5cbiAqIGh0dHBzOi8vZ2l0aHViLmNvbS9JdHNKb25RL2cyL3B1bGwvMTQ5XG4gKi9cbmV4cG9ydCBjb25zdCBJdGVtc0NvbHVtbiA9IGNzc2Bcblx0PiAqIHtcblx0XHRtaW4taGVpZ2h0OiAwO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbXNSb3cgPSBjc3NgXG5cdD4gKiB7XG5cdFx0bWluLXdpZHRoOiAwO1xuXHR9XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__2
  };
  var Item = false ? {
    name: "qgaee5",
    styles: "display:block;max-height:100%;max-width:100%;min-height:0;min-width:0"
  } : {
    name: "14ac8g8-Item",
    styles: "display:block;max-height:100%;max-width:100%;min-height:0;min-width:0;label:Item;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFTdUIiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5leHBvcnQgY29uc3QgRmxleCA9IGNzc2Bcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtID0gY3NzYFxuXHRkaXNwbGF5OiBibG9jaztcblx0bWF4LWhlaWdodDogMTAwJTtcblx0bWF4LXdpZHRoOiAxMDAlO1xuXHRtaW4taGVpZ2h0OiAwO1xuXHRtaW4td2lkdGg6IDA7XG5gO1xuXG5leHBvcnQgY29uc3QgYmxvY2sgPSBjc3NgXG5cdGZsZXg6IDE7XG5gO1xuXG4vKipcbiAqIFdvcmthcm91bmQgdG8gb3B0aW1pemUgRE9NIHJlbmRlcmluZy5cbiAqIFdlJ2xsIGVuaGFuY2UgYWxpZ25tZW50IHdpdGggbmFpdmUgcGFyZW50IGZsZXggYXNzdW1wdGlvbnMuXG4gKlxuICogVHJhZGUtb2ZmOlxuICogRmFyIGxlc3MgRE9NIGxlc3MuIEhvd2V2ZXIsIFVJIHJlbmRlcmluZyBpcyBub3QgYXMgcmVsaWFibGUuXG4gKi9cblxuLyoqXG4gKiBJbXByb3ZlcyBzdGFiaWxpdHkgb2Ygd2lkdGgvaGVpZ2h0IHJlbmRlcmluZy5cbiAqIGh0dHBzOi8vZ2l0aHViLmNvbS9JdHNKb25RL2cyL3B1bGwvMTQ5XG4gKi9cbmV4cG9ydCBjb25zdCBJdGVtc0NvbHVtbiA9IGNzc2Bcblx0PiAqIHtcblx0XHRtaW4taGVpZ2h0OiAwO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbXNSb3cgPSBjc3NgXG5cdD4gKiB7XG5cdFx0bWluLXdpZHRoOiAwO1xuXHR9XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__2
  };
  var block = false ? {
    name: "82a6rk",
    styles: "flex:1"
  } : {
    name: "1ya6i3g-block",
    styles: "flex:1;label:block;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQndCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuZXhwb3J0IGNvbnN0IEZsZXggPSBjc3NgXG5cdGRpc3BsYXk6IGZsZXg7XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbSA9IGNzc2Bcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1heC1oZWlnaHQ6IDEwMCU7XG5cdG1heC13aWR0aDogMTAwJTtcblx0bWluLWhlaWdodDogMDtcblx0bWluLXdpZHRoOiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IGJsb2NrID0gY3NzYFxuXHRmbGV4OiAxO1xuYDtcblxuLyoqXG4gKiBXb3JrYXJvdW5kIHRvIG9wdGltaXplIERPTSByZW5kZXJpbmcuXG4gKiBXZSdsbCBlbmhhbmNlIGFsaWdubWVudCB3aXRoIG5haXZlIHBhcmVudCBmbGV4IGFzc3VtcHRpb25zLlxuICpcbiAqIFRyYWRlLW9mZjpcbiAqIEZhciBsZXNzIERPTSBsZXNzLiBIb3dldmVyLCBVSSByZW5kZXJpbmcgaXMgbm90IGFzIHJlbGlhYmxlLlxuICovXG5cbi8qKlxuICogSW1wcm92ZXMgc3RhYmlsaXR5IG9mIHdpZHRoL2hlaWdodCByZW5kZXJpbmcuXG4gKiBodHRwczovL2dpdGh1Yi5jb20vSXRzSm9uUS9nMi9wdWxsLzE0OVxuICovXG5leHBvcnQgY29uc3QgSXRlbXNDb2x1bW4gPSBjc3NgXG5cdD4gKiB7XG5cdFx0bWluLWhlaWdodDogMDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW1zUm93ID0gY3NzYFxuXHQ+ICoge1xuXHRcdG1pbi13aWR0aDogMDtcblx0fVxuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__2
  };
  var ItemsColumn = false ? {
    name: "13nosa1",
    styles: ">*{min-height:0;}"
  } : {
    name: "9k4k7f-ItemsColumn",
    styles: ">*{min-height:0;};label:ItemsColumn;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQzhCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuZXhwb3J0IGNvbnN0IEZsZXggPSBjc3NgXG5cdGRpc3BsYXk6IGZsZXg7XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbSA9IGNzc2Bcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1heC1oZWlnaHQ6IDEwMCU7XG5cdG1heC13aWR0aDogMTAwJTtcblx0bWluLWhlaWdodDogMDtcblx0bWluLXdpZHRoOiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IGJsb2NrID0gY3NzYFxuXHRmbGV4OiAxO1xuYDtcblxuLyoqXG4gKiBXb3JrYXJvdW5kIHRvIG9wdGltaXplIERPTSByZW5kZXJpbmcuXG4gKiBXZSdsbCBlbmhhbmNlIGFsaWdubWVudCB3aXRoIG5haXZlIHBhcmVudCBmbGV4IGFzc3VtcHRpb25zLlxuICpcbiAqIFRyYWRlLW9mZjpcbiAqIEZhciBsZXNzIERPTSBsZXNzLiBIb3dldmVyLCBVSSByZW5kZXJpbmcgaXMgbm90IGFzIHJlbGlhYmxlLlxuICovXG5cbi8qKlxuICogSW1wcm92ZXMgc3RhYmlsaXR5IG9mIHdpZHRoL2hlaWdodCByZW5kZXJpbmcuXG4gKiBodHRwczovL2dpdGh1Yi5jb20vSXRzSm9uUS9nMi9wdWxsLzE0OVxuICovXG5leHBvcnQgY29uc3QgSXRlbXNDb2x1bW4gPSBjc3NgXG5cdD4gKiB7XG5cdFx0bWluLWhlaWdodDogMDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW1zUm93ID0gY3NzYFxuXHQ+ICoge1xuXHRcdG1pbi13aWR0aDogMDtcblx0fVxuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__2
  };
  var ItemsRow = false ? {
    name: "1pwxzk4",
    styles: ">*{min-width:0;}"
  } : {
    name: "1ozeagb-ItemsRow",
    styles: ">*{min-width:0;};label:ItemsRow;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1QzJCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuZXhwb3J0IGNvbnN0IEZsZXggPSBjc3NgXG5cdGRpc3BsYXk6IGZsZXg7XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbSA9IGNzc2Bcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1heC1oZWlnaHQ6IDEwMCU7XG5cdG1heC13aWR0aDogMTAwJTtcblx0bWluLWhlaWdodDogMDtcblx0bWluLXdpZHRoOiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IGJsb2NrID0gY3NzYFxuXHRmbGV4OiAxO1xuYDtcblxuLyoqXG4gKiBXb3JrYXJvdW5kIHRvIG9wdGltaXplIERPTSByZW5kZXJpbmcuXG4gKiBXZSdsbCBlbmhhbmNlIGFsaWdubWVudCB3aXRoIG5haXZlIHBhcmVudCBmbGV4IGFzc3VtcHRpb25zLlxuICpcbiAqIFRyYWRlLW9mZjpcbiAqIEZhciBsZXNzIERPTSBsZXNzLiBIb3dldmVyLCBVSSByZW5kZXJpbmcgaXMgbm90IGFzIHJlbGlhYmxlLlxuICovXG5cbi8qKlxuICogSW1wcm92ZXMgc3RhYmlsaXR5IG9mIHdpZHRoL2hlaWdodCByZW5kZXJpbmcuXG4gKiBodHRwczovL2dpdGh1Yi5jb20vSXRzSm9uUS9nMi9wdWxsLzE0OVxuICovXG5leHBvcnQgY29uc3QgSXRlbXNDb2x1bW4gPSBjc3NgXG5cdD4gKiB7XG5cdFx0bWluLWhlaWdodDogMDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW1zUm93ID0gY3NzYFxuXHQ+ICoge1xuXHRcdG1pbi13aWR0aDogMDtcblx0fVxuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__2
  };

  // packages/components/build-module/flex/flex/hook.mjs
  function useDeprecatedProps(props) {
    const {
      isReversed,
      ...otherProps
    } = props;
    if (typeof isReversed !== "undefined") {
      (0, import_deprecated2.default)("Flex isReversed", {
        alternative: 'Flex direction="row-reverse" or "column-reverse"',
        since: "5.9"
      });
      return {
        ...otherProps,
        direction: isReversed ? "row-reverse" : "row"
      };
    }
    return otherProps;
  }
  function useFlex(props) {
    const {
      align,
      className: className2,
      direction: directionProp = "row",
      expanded = true,
      gap = 2,
      justify = "space-between",
      wrap = false,
      ...otherProps
    } = useContextSystem(useDeprecatedProps(props), "Flex");
    const directionAsArray = Array.isArray(directionProp) ? directionProp : [directionProp];
    const direction = useResponsiveValue(directionAsArray);
    const isColumn = typeof direction === "string" && !!direction.includes("column");
    const cx3 = useCx();
    const classes = (0, import_element20.useMemo)(() => {
      const base = /* @__PURE__ */ css({
        alignItems: align ?? (isColumn ? "normal" : "center"),
        flexDirection: direction,
        flexWrap: wrap ? "wrap" : void 0,
        gap: space(gap),
        justifyContent: justify,
        height: isColumn && expanded ? "100%" : void 0,
        width: !isColumn && expanded ? "100%" : void 0
      }, false ? "" : ";label:base;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZ0VlIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogV29yZFByZXNzIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyB1c2VNZW1vIH0gZnJvbSAnQHdvcmRwcmVzcy9lbGVtZW50JztcbmltcG9ydCBkZXByZWNhdGVkIGZyb20gJ0B3b3JkcHJlc3MvZGVwcmVjYXRlZCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi8uLi9jb250ZXh0JztcbmltcG9ydCB7IHVzZUNvbnRleHRTeXN0ZW0gfSBmcm9tICcuLi8uLi9jb250ZXh0JztcbmltcG9ydCB7IHVzZVJlc3BvbnNpdmVWYWx1ZSB9IGZyb20gJy4uLy4uL3V0aWxzL3VzZS1yZXNwb25zaXZlLXZhbHVlJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0ICogYXMgc3R5bGVzIGZyb20gJy4uL3N0eWxlcyc7XG5pbXBvcnQgeyB1c2VDeCB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgRmxleFByb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuXG5mdW5jdGlvbiB1c2VEZXByZWNhdGVkUHJvcHMoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczwgRmxleFByb3BzLCAnZGl2JyA+XG4pOiBPbWl0PCB0eXBlb2YgcHJvcHMsICdpc1JldmVyc2VkJyA+IHtcblx0Y29uc3QgeyBpc1JldmVyc2VkLCAuLi5vdGhlclByb3BzIH0gPSBwcm9wcztcblxuXHRpZiAoIHR5cGVvZiBpc1JldmVyc2VkICE9PSAndW5kZWZpbmVkJyApIHtcblx0XHRkZXByZWNhdGVkKCAnRmxleCBpc1JldmVyc2VkJywge1xuXHRcdFx0YWx0ZXJuYXRpdmU6ICdGbGV4IGRpcmVjdGlvbj1cInJvdy1yZXZlcnNlXCIgb3IgXCJjb2x1bW4tcmV2ZXJzZVwiJyxcblx0XHRcdHNpbmNlOiAnNS45Jyxcblx0XHR9ICk7XG5cdFx0cmV0dXJuIHtcblx0XHRcdC4uLm90aGVyUHJvcHMsXG5cdFx0XHRkaXJlY3Rpb246IGlzUmV2ZXJzZWQgPyAncm93LXJldmVyc2UnIDogJ3JvdycsXG5cdFx0fTtcblx0fVxuXG5cdHJldHVybiBvdGhlclByb3BzO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gdXNlRmxleCggcHJvcHM6IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzPCBGbGV4UHJvcHMsICdkaXYnID4gKSB7XG5cdGNvbnN0IHtcblx0XHRhbGlnbixcblx0XHRjbGFzc05hbWUsXG5cdFx0ZGlyZWN0aW9uOiBkaXJlY3Rpb25Qcm9wID0gJ3JvdycsXG5cdFx0ZXhwYW5kZWQgPSB0cnVlLFxuXHRcdGdhcCA9IDIsXG5cdFx0anVzdGlmeSA9ICdzcGFjZS1iZXR3ZWVuJyxcblx0XHR3cmFwID0gZmFsc2UsXG5cdFx0Li4ub3RoZXJQcm9wc1xuXHR9ID0gdXNlQ29udGV4dFN5c3RlbSggdXNlRGVwcmVjYXRlZFByb3BzKCBwcm9wcyApLCAnRmxleCcgKTtcblxuXHRjb25zdCBkaXJlY3Rpb25Bc0FycmF5ID0gQXJyYXkuaXNBcnJheSggZGlyZWN0aW9uUHJvcCApXG5cdFx0PyBkaXJlY3Rpb25Qcm9wXG5cdFx0OiBbIGRpcmVjdGlvblByb3AgXTtcblx0Y29uc3QgZGlyZWN0aW9uID0gdXNlUmVzcG9uc2l2ZVZhbHVlKCBkaXJlY3Rpb25Bc0FycmF5ICk7XG5cblx0Y29uc3QgaXNDb2x1bW4gPVxuXHRcdHR5cGVvZiBkaXJlY3Rpb24gPT09ICdzdHJpbmcnICYmICEhIGRpcmVjdGlvbi5pbmNsdWRlcyggJ2NvbHVtbicgKTtcblxuXHRjb25zdCBjeCA9IHVzZUN4KCk7XG5cblx0Y29uc3QgY2xhc3NlcyA9IHVzZU1lbW8oICgpID0+IHtcblx0XHRjb25zdCBiYXNlID0gY3NzKCB7XG5cdFx0XHRhbGlnbkl0ZW1zOiBhbGlnbiA/PyAoIGlzQ29sdW1uID8gJ25vcm1hbCcgOiAnY2VudGVyJyApLFxuXHRcdFx0ZmxleERpcmVjdGlvbjogZGlyZWN0aW9uLFxuXHRcdFx0ZmxleFdyYXA6IHdyYXAgPyAnd3JhcCcgOiB1bmRlZmluZWQsXG5cdFx0XHRnYXA6IHNwYWNlKCBnYXAgKSxcblx0XHRcdGp1c3RpZnlDb250ZW50OiBqdXN0aWZ5LFxuXHRcdFx0aGVpZ2h0OiBpc0NvbHVtbiAmJiBleHBhbmRlZCA/ICcxMDAlJyA6IHVuZGVmaW5lZCxcblx0XHRcdHdpZHRoOiAhIGlzQ29sdW1uICYmIGV4cGFuZGVkID8gJzEwMCUnIDogdW5kZWZpbmVkLFxuXHRcdH0gKTtcblxuXHRcdHJldHVybiBjeChcblx0XHRcdHN0eWxlcy5GbGV4LFxuXHRcdFx0YmFzZSxcblx0XHRcdGlzQ29sdW1uID8gc3R5bGVzLkl0ZW1zQ29sdW1uIDogc3R5bGVzLkl0ZW1zUm93LFxuXHRcdFx0Y2xhc3NOYW1lXG5cdFx0KTtcblx0fSwgW1xuXHRcdGFsaWduLFxuXHRcdGNsYXNzTmFtZSxcblx0XHRjeCxcblx0XHRkaXJlY3Rpb24sXG5cdFx0ZXhwYW5kZWQsXG5cdFx0Z2FwLFxuXHRcdGlzQ29sdW1uLFxuXHRcdGp1c3RpZnksXG5cdFx0d3JhcCxcblx0XSApO1xuXG5cdHJldHVybiB7IC4uLm90aGVyUHJvcHMsIGNsYXNzTmFtZTogY2xhc3NlcywgaXNDb2x1bW4gfTtcbn1cbiJdfQ== */");
      return cx3(Flex, base, isColumn ? ItemsColumn : ItemsRow, className2);
    }, [align, className2, cx3, direction, expanded, gap, isColumn, justify, wrap]);
    return {
      ...otherProps,
      className: classes,
      isColumn
    };
  }

  // packages/components/build-module/flex/context.mjs
  var import_element21 = __toESM(require_element(), 1);
  var FlexContext = (0, import_element21.createContext)({
    flexItemDisplay: void 0
  });
  var useFlexContext = () => (0, import_element21.useContext)(FlexContext);

  // packages/components/build-module/flex/flex/component.mjs
  var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedFlex(props, forwardedRef) {
    const {
      children,
      isColumn,
      ...otherProps
    } = useFlex(props);
    return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(FlexContext.Provider, {
      value: {
        flexItemDisplay: isColumn ? "block" : void 0
      },
      children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(component_default, {
        ...otherProps,
        ref: forwardedRef,
        children
      })
    });
  }
  var Flex2 = contextConnect(UnconnectedFlex, "Flex");
  var component_default3 = Flex2;

  // packages/components/build-module/flex/flex-item/hook.mjs
  function useFlexItem(props) {
    const {
      className: className2,
      display: displayProp,
      isBlock = false,
      ...otherProps
    } = useContextSystem(props, "FlexItem");
    const sx = {};
    const contextDisplay = useFlexContext().flexItemDisplay;
    sx.Base = /* @__PURE__ */ css({
      display: displayProp || contextDisplay
    }, false ? "" : ";label:sx-Base;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZ0NXIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFNlcmlhbGl6ZWRTdHlsZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi8uLi9jb250ZXh0JztcbmltcG9ydCB7IHVzZUNvbnRleHRTeXN0ZW0gfSBmcm9tICcuLi8uLi9jb250ZXh0JztcbmltcG9ydCB7IHVzZUZsZXhDb250ZXh0IH0gZnJvbSAnLi4vY29udGV4dCc7XG5pbXBvcnQgKiBhcyBzdHlsZXMgZnJvbSAnLi4vc3R5bGVzJztcbmltcG9ydCB7IHVzZUN4IH0gZnJvbSAnLi4vLi4vdXRpbHMvaG9va3MvdXNlLWN4JztcbmltcG9ydCB0eXBlIHsgRmxleEl0ZW1Qcm9wcyB9IGZyb20gJy4uL3R5cGVzJztcblxuZXhwb3J0IGZ1bmN0aW9uIHVzZUZsZXhJdGVtKFxuXHRwcm9wczogV29yZFByZXNzQ29tcG9uZW50UHJvcHM8IEZsZXhJdGVtUHJvcHMsICdkaXYnID5cbikge1xuXHRjb25zdCB7XG5cdFx0Y2xhc3NOYW1lLFxuXHRcdGRpc3BsYXk6IGRpc3BsYXlQcm9wLFxuXHRcdGlzQmxvY2sgPSBmYWxzZSxcblx0XHQuLi5vdGhlclByb3BzXG5cdH0gPSB1c2VDb250ZXh0U3lzdGVtKCBwcm9wcywgJ0ZsZXhJdGVtJyApO1xuXG5cdGNvbnN0IHN4OiB7XG5cdFx0QmFzZT86IFNlcmlhbGl6ZWRTdHlsZXM7XG5cdH0gPSB7fTtcblxuXHRjb25zdCBjb250ZXh0RGlzcGxheSA9IHVzZUZsZXhDb250ZXh0KCkuZmxleEl0ZW1EaXNwbGF5O1xuXG5cdHN4LkJhc2UgPSBjc3MoIHtcblx0XHRkaXNwbGF5OiBkaXNwbGF5UHJvcCB8fCBjb250ZXh0RGlzcGxheSxcblx0fSApO1xuXG5cdGNvbnN0IGN4ID0gdXNlQ3goKTtcblxuXHRjb25zdCBjbGFzc2VzID0gY3goXG5cdFx0c3R5bGVzLkl0ZW0sXG5cdFx0c3guQmFzZSxcblx0XHRpc0Jsb2NrICYmIHN0eWxlcy5ibG9jayxcblx0XHRjbGFzc05hbWVcblx0KTtcblxuXHRyZXR1cm4ge1xuXHRcdC4uLm90aGVyUHJvcHMsXG5cdFx0Y2xhc3NOYW1lOiBjbGFzc2VzLFxuXHR9O1xufVxuIl19 */");
    const cx3 = useCx();
    const classes = cx3(Item, sx.Base, isBlock && block, className2);
    return {
      ...otherProps,
      className: classes
    };
  }

  // packages/components/build-module/flex/flex-item/component.mjs
  var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedFlexItem(props, forwardedRef) {
    const flexItemProps = useFlexItem(props);
    return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(component_default, {
      ...flexItemProps,
      ref: forwardedRef
    });
  }
  var FlexItem = contextConnect(UnconnectedFlexItem, "FlexItem");
  var component_default4 = FlexItem;

  // packages/components/build-module/flex/flex-block/hook.mjs
  function useFlexBlock(props) {
    const otherProps = useContextSystem(props, "FlexBlock");
    const flexItemProps = useFlexItem({
      isBlock: true,
      ...otherProps
    });
    return flexItemProps;
  }

  // packages/components/build-module/flex/flex-block/component.mjs
  var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedFlexBlock(props, forwardedRef) {
    const flexBlockProps = useFlexBlock(props);
    return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(component_default, {
      ...flexBlockProps,
      ref: forwardedRef
    });
  }
  var FlexBlock = contextConnect(UnconnectedFlexBlock, "FlexBlock");
  var component_default5 = FlexBlock;

  // packages/components/build-module/spacer/hook.mjs
  function isDefined(o4) {
    return typeof o4 !== "undefined" && o4 !== null;
  }
  function useSpacer(props) {
    const {
      className: className2,
      margin,
      marginBottom = 2,
      marginLeft,
      marginRight,
      marginTop,
      marginX,
      marginY,
      padding: padding2,
      paddingBottom,
      paddingLeft,
      paddingRight,
      paddingTop,
      paddingX,
      paddingY: paddingY2,
      ...otherProps
    } = useContextSystem(props, "Spacer");
    const cx3 = useCx();
    const classes = cx3(isDefined(margin) && /* @__PURE__ */ css("margin:", space(margin), ";" + (false ? "" : ";label:classes;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNENNIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHVzZUNvbnRleHRTeXN0ZW0gfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgcnRsLCB1c2VDeCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgU3BhY2VyUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuZnVuY3Rpb24gaXNEZWZpbmVkPCBUID4oIG86IFQgKTogbyBpcyBFeGNsdWRlPCBULCBudWxsIHwgdW5kZWZpbmVkID4ge1xuXHRyZXR1cm4gdHlwZW9mIG8gIT09ICd1bmRlZmluZWQnICYmIG8gIT09IG51bGw7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiB1c2VTcGFjZXIoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczwgU3BhY2VyUHJvcHMsICdkaXYnID5cbikge1xuXHRjb25zdCB7XG5cdFx0Y2xhc3NOYW1lLFxuXHRcdG1hcmdpbixcblx0XHRtYXJnaW5Cb3R0b20gPSAyLFxuXHRcdG1hcmdpbkxlZnQsXG5cdFx0bWFyZ2luUmlnaHQsXG5cdFx0bWFyZ2luVG9wLFxuXHRcdG1hcmdpblgsXG5cdFx0bWFyZ2luWSxcblx0XHRwYWRkaW5nLFxuXHRcdHBhZGRpbmdCb3R0b20sXG5cdFx0cGFkZGluZ0xlZnQsXG5cdFx0cGFkZGluZ1JpZ2h0LFxuXHRcdHBhZGRpbmdUb3AsXG5cdFx0cGFkZGluZ1gsXG5cdFx0cGFkZGluZ1ksXG5cdFx0Li4ub3RoZXJQcm9wc1xuXHR9ID0gdXNlQ29udGV4dFN5c3RlbSggcHJvcHMsICdTcGFjZXInICk7XG5cblx0Y29uc3QgY3ggPSB1c2VDeCgpO1xuXG5cdGNvbnN0IGNsYXNzZXMgPSBjeChcblx0XHRpc0RlZmluZWQoIG1hcmdpbiApICYmXG5cdFx0XHRjc3NgXG5cdFx0XHRcdG1hcmdpbjogJHsgc3BhY2UoIG1hcmdpbiApIH07XG5cdFx0XHRgLFxuXHRcdGlzRGVmaW5lZCggbWFyZ2luWSApICYmXG5cdFx0XHRjc3NgXG5cdFx0XHRcdG1hcmdpbi1ib3R0b206ICR7IHNwYWNlKCBtYXJnaW5ZICkgfTtcblx0XHRcdFx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIG1hcmdpblkgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIG1hcmdpblggKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tbGVmdDogJHsgc3BhY2UoIG1hcmdpblggKSB9O1xuXHRcdFx0XHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCBtYXJnaW5YICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5Ub3AgKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tdG9wOiAkeyBzcGFjZSggbWFyZ2luVG9wICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5Cb3R0b20gKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tYm90dG9tOiAkeyBzcGFjZSggbWFyZ2luQm90dG9tICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5MZWZ0ICkgJiZcblx0XHRcdHJ0bCgge1xuXHRcdFx0XHRtYXJnaW5MZWZ0OiBzcGFjZSggbWFyZ2luTGVmdCApLFxuXHRcdFx0fSApKCksXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5SaWdodCApICYmXG5cdFx0XHRydGwoIHtcblx0XHRcdFx0bWFyZ2luUmlnaHQ6IHNwYWNlKCBtYXJnaW5SaWdodCApLFxuXHRcdFx0fSApKCksXG5cdFx0aXNEZWZpbmVkKCBwYWRkaW5nICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZzogJHsgc3BhY2UoIHBhZGRpbmcgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdZICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZy1ib3R0b206ICR7IHNwYWNlKCBwYWRkaW5nWSApIH07XG5cdFx0XHRcdHBhZGRpbmctdG9wOiAkeyBzcGFjZSggcGFkZGluZ1kgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdYICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZy1sZWZ0OiAkeyBzcGFjZSggcGFkZGluZ1ggKSB9O1xuXHRcdFx0XHRwYWRkaW5nLXJpZ2h0OiAkeyBzcGFjZSggcGFkZGluZ1ggKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdUb3AgKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRwYWRkaW5nLXRvcDogJHsgc3BhY2UoIHBhZGRpbmdUb3AgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdCb3R0b20gKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRwYWRkaW5nLWJvdHRvbTogJHsgc3BhY2UoIHBhZGRpbmdCb3R0b20gKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdMZWZ0ICkgJiZcblx0XHRcdHJ0bCgge1xuXHRcdFx0XHRwYWRkaW5nTGVmdDogc3BhY2UoIHBhZGRpbmdMZWZ0ICksXG5cdFx0XHR9ICkoKSxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdSaWdodCApICYmXG5cdFx0XHRydGwoIHtcblx0XHRcdFx0cGFkZGluZ1JpZ2h0OiBzcGFjZSggcGFkZGluZ1JpZ2h0ICksXG5cdFx0XHR9ICkoKSxcblx0XHRjbGFzc05hbWVcblx0KTtcblxuXHRyZXR1cm4geyAuLi5vdGhlclByb3BzLCBjbGFzc05hbWU6IGNsYXNzZXMgfTtcbn1cbiJdfQ== */"), isDefined(marginY) && /* @__PURE__ */ css("margin-bottom:", space(marginY), ";margin-top:", space(marginY), ";" + (false ? "" : ";label:classes;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZ0RNIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHVzZUNvbnRleHRTeXN0ZW0gfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgcnRsLCB1c2VDeCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgU3BhY2VyUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuZnVuY3Rpb24gaXNEZWZpbmVkPCBUID4oIG86IFQgKTogbyBpcyBFeGNsdWRlPCBULCBudWxsIHwgdW5kZWZpbmVkID4ge1xuXHRyZXR1cm4gdHlwZW9mIG8gIT09ICd1bmRlZmluZWQnICYmIG8gIT09IG51bGw7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiB1c2VTcGFjZXIoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczwgU3BhY2VyUHJvcHMsICdkaXYnID5cbikge1xuXHRjb25zdCB7XG5cdFx0Y2xhc3NOYW1lLFxuXHRcdG1hcmdpbixcblx0XHRtYXJnaW5Cb3R0b20gPSAyLFxuXHRcdG1hcmdpbkxlZnQsXG5cdFx0bWFyZ2luUmlnaHQsXG5cdFx0bWFyZ2luVG9wLFxuXHRcdG1hcmdpblgsXG5cdFx0bWFyZ2luWSxcblx0XHRwYWRkaW5nLFxuXHRcdHBhZGRpbmdCb3R0b20sXG5cdFx0cGFkZGluZ0xlZnQsXG5cdFx0cGFkZGluZ1JpZ2h0LFxuXHRcdHBhZGRpbmdUb3AsXG5cdFx0cGFkZGluZ1gsXG5cdFx0cGFkZGluZ1ksXG5cdFx0Li4ub3RoZXJQcm9wc1xuXHR9ID0gdXNlQ29udGV4dFN5c3RlbSggcHJvcHMsICdTcGFjZXInICk7XG5cblx0Y29uc3QgY3ggPSB1c2VDeCgpO1xuXG5cdGNvbnN0IGNsYXNzZXMgPSBjeChcblx0XHRpc0RlZmluZWQoIG1hcmdpbiApICYmXG5cdFx0XHRjc3NgXG5cdFx0XHRcdG1hcmdpbjogJHsgc3BhY2UoIG1hcmdpbiApIH07XG5cdFx0XHRgLFxuXHRcdGlzRGVmaW5lZCggbWFyZ2luWSApICYmXG5cdFx0XHRjc3NgXG5cdFx0XHRcdG1hcmdpbi1ib3R0b206ICR7IHNwYWNlKCBtYXJnaW5ZICkgfTtcblx0XHRcdFx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIG1hcmdpblkgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIG1hcmdpblggKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tbGVmdDogJHsgc3BhY2UoIG1hcmdpblggKSB9O1xuXHRcdFx0XHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCBtYXJnaW5YICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5Ub3AgKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tdG9wOiAkeyBzcGFjZSggbWFyZ2luVG9wICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5Cb3R0b20gKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tYm90dG9tOiAkeyBzcGFjZSggbWFyZ2luQm90dG9tICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5MZWZ0ICkgJiZcblx0XHRcdHJ0bCgge1xuXHRcdFx0XHRtYXJnaW5MZWZ0OiBzcGFjZSggbWFyZ2luTGVmdCApLFxuXHRcdFx0fSApKCksXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5SaWdodCApICYmXG5cdFx0XHRydGwoIHtcblx0XHRcdFx0bWFyZ2luUmlnaHQ6IHNwYWNlKCBtYXJnaW5SaWdodCApLFxuXHRcdFx0fSApKCksXG5cdFx0aXNEZWZpbmVkKCBwYWRkaW5nICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZzogJHsgc3BhY2UoIHBhZGRpbmcgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdZICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZy1ib3R0b206ICR7IHNwYWNlKCBwYWRkaW5nWSApIH07XG5cdFx0XHRcdHBhZGRpbmctdG9wOiAkeyBzcGFjZSggcGFkZGluZ1kgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdYICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZy1sZWZ0OiAkeyBzcGFjZSggcGFkZGluZ1ggKSB9O1xuXHRcdFx0XHRwYWRkaW5nLXJpZ2h0OiAkeyBzcGFjZSggcGFkZGluZ1ggKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdUb3AgKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRwYWRkaW5nLXRvcDogJHsgc3BhY2UoIHBhZGRpbmdUb3AgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdCb3R0b20gKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRwYWRkaW5nLWJvdHRvbTogJHsgc3BhY2UoIHBhZGRpbmdCb3R0b20gKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdMZWZ0ICkgJiZcblx0XHRcdHJ0bCgge1xuXHRcdFx0XHRwYWRkaW5nTGVmdDogc3BhY2UoIHBhZGRpbmdMZWZ0ICksXG5cdFx0XHR9ICkoKSxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdSaWdodCApICYmXG5cdFx0XHRydGwoIHtcblx0XHRcdFx0cGFkZGluZ1JpZ2h0OiBzcGFjZSggcGFkZGluZ1JpZ2h0ICksXG5cdFx0XHR9ICkoKSxcblx0XHRjbGFzc05hbWVcblx0KTtcblxuXHRyZXR1cm4geyAuLi5vdGhlclByb3BzLCBjbGFzc05hbWU6IGNsYXNzZXMgfTtcbn1cbiJdfQ== */"), isDefined(marginX) && /* @__PURE__ */ css("margin-left:", space(marginX), ";margin-right:", space(marginX), ";" + (false ? "" : ";label:classes;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBcURNIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHVzZUNvbnRleHRTeXN0ZW0gfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgcnRsLCB1c2VDeCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgU3BhY2VyUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuZnVuY3Rpb24gaXNEZWZpbmVkPCBUID4oIG86IFQgKTogbyBpcyBFeGNsdWRlPCBULCBudWxsIHwgdW5kZWZpbmVkID4ge1xuXHRyZXR1cm4gdHlwZW9mIG8gIT09ICd1bmRlZmluZWQnICYmIG8gIT09IG51bGw7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiB1c2VTcGFjZXIoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczwgU3BhY2VyUHJvcHMsICdkaXYnID5cbikge1xuXHRjb25zdCB7XG5cdFx0Y2xhc3NOYW1lLFxuXHRcdG1hcmdpbixcblx0XHRtYXJnaW5Cb3R0b20gPSAyLFxuXHRcdG1hcmdpbkxlZnQsXG5cdFx0bWFyZ2luUmlnaHQsXG5cdFx0bWFyZ2luVG9wLFxuXHRcdG1hcmdpblgsXG5cdFx0bWFyZ2luWSxcblx0XHRwYWRkaW5nLFxuXHRcdHBhZGRpbmdCb3R0b20sXG5cdFx0cGFkZGluZ0xlZnQsXG5cdFx0cGFkZGluZ1JpZ2h0LFxuXHRcdHBhZGRpbmdUb3AsXG5cdFx0cGFkZGluZ1gsXG5cdFx0cGFkZGluZ1ksXG5cdFx0Li4ub3RoZXJQcm9wc1xuXHR9ID0gdXNlQ29udGV4dFN5c3RlbSggcHJvcHMsICdTcGFjZXInICk7XG5cblx0Y29uc3QgY3ggPSB1c2VDeCgpO1xuXG5cdGNvbnN0IGNsYXNzZXMgPSBjeChcblx0XHRpc0RlZmluZWQoIG1hcmdpbiApICYmXG5cdFx0XHRjc3NgXG5cdFx0XHRcdG1hcmdpbjogJHsgc3BhY2UoIG1hcmdpbiApIH07XG5cdFx0XHRgLFxuXHRcdGlzRGVmaW5lZCggbWFyZ2luWSApICYmXG5cdFx0XHRjc3NgXG5cdFx0XHRcdG1hcmdpbi1ib3R0b206ICR7IHNwYWNlKCBtYXJnaW5ZICkgfTtcblx0XHRcdFx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIG1hcmdpblkgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIG1hcmdpblggKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tbGVmdDogJHsgc3BhY2UoIG1hcmdpblggKSB9O1xuXHRcdFx0XHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCBtYXJnaW5YICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5Ub3AgKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tdG9wOiAkeyBzcGFjZSggbWFyZ2luVG9wICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5Cb3R0b20gKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tYm90dG9tOiAkeyBzcGFjZSggbWFyZ2luQm90dG9tICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5MZWZ0ICkgJiZcblx0XHRcdHJ0bCgge1xuXHRcdFx0XHRtYXJnaW5MZWZ0OiBzcGFjZSggbWFyZ2luTGVmdCApLFxuXHRcdFx0fSApKCksXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5SaWdodCApICYmXG5cdFx0XHRydGwoIHtcblx0XHRcdFx0bWFyZ2luUmlnaHQ6IHNwYWNlKCBtYXJnaW5SaWdodCApLFxuXHRcdFx0fSApKCksXG5cdFx0aXNEZWZpbmVkKCBwYWRkaW5nICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZzogJHsgc3BhY2UoIHBhZGRpbmcgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdZICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZy1ib3R0b206ICR7IHNwYWNlKCBwYWRkaW5nWSApIH07XG5cdFx0XHRcdHBhZGRpbmctdG9wOiAkeyBzcGFjZSggcGFkZGluZ1kgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdYICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZy1sZWZ0OiAkeyBzcGFjZSggcGFkZGluZ1ggKSB9O1xuXHRcdFx0XHRwYWRkaW5nLXJpZ2h0OiAkeyBzcGFjZSggcGFkZGluZ1ggKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdUb3AgKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRwYWRkaW5nLXRvcDogJHsgc3BhY2UoIHBhZGRpbmdUb3AgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdCb3R0b20gKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRwYWRkaW5nLWJvdHRvbTogJHsgc3BhY2UoIHBhZGRpbmdCb3R0b20gKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdMZWZ0ICkgJiZcblx0XHRcdHJ0bCgge1xuXHRcdFx0XHRwYWRkaW5nTGVmdDogc3BhY2UoIHBhZGRpbmdMZWZ0ICksXG5cdFx0XHR9ICkoKSxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdSaWdodCApICYmXG5cdFx0XHRydGwoIHtcblx0XHRcdFx0cGFkZGluZ1JpZ2h0OiBzcGFjZSggcGFkZGluZ1JpZ2h0ICksXG5cdFx0XHR9ICkoKSxcblx0XHRjbGFzc05hbWVcblx0KTtcblxuXHRyZXR1cm4geyAuLi5vdGhlclByb3BzLCBjbGFzc05hbWU6IGNsYXNzZXMgfTtcbn1cbiJdfQ== */"), isDefined(marginTop) && /* @__PURE__ */ css("margin-top:", space(marginTop), ";" + (false ? "" : ";label:classes;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMERNIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHVzZUNvbnRleHRTeXN0ZW0gfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgcnRsLCB1c2VDeCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgU3BhY2VyUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuZnVuY3Rpb24gaXNEZWZpbmVkPCBUID4oIG86IFQgKTogbyBpcyBFeGNsdWRlPCBULCBudWxsIHwgdW5kZWZpbmVkID4ge1xuXHRyZXR1cm4gdHlwZW9mIG8gIT09ICd1bmRlZmluZWQnICYmIG8gIT09IG51bGw7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiB1c2VTcGFjZXIoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczwgU3BhY2VyUHJvcHMsICdkaXYnID5cbikge1xuXHRjb25zdCB7XG5cdFx0Y2xhc3NOYW1lLFxuXHRcdG1hcmdpbixcblx0XHRtYXJnaW5Cb3R0b20gPSAyLFxuXHRcdG1hcmdpbkxlZnQsXG5cdFx0bWFyZ2luUmlnaHQsXG5cdFx0bWFyZ2luVG9wLFxuXHRcdG1hcmdpblgsXG5cdFx0bWFyZ2luWSxcblx0XHRwYWRkaW5nLFxuXHRcdHBhZGRpbmdCb3R0b20sXG5cdFx0cGFkZGluZ0xlZnQsXG5cdFx0cGFkZGluZ1JpZ2h0LFxuXHRcdHBhZGRpbmdUb3AsXG5cdFx0cGFkZGluZ1gsXG5cdFx0cGFkZGluZ1ksXG5cdFx0Li4ub3RoZXJQcm9wc1xuXHR9ID0gdXNlQ29udGV4dFN5c3RlbSggcHJvcHMsICdTcGFjZXInICk7XG5cblx0Y29uc3QgY3ggPSB1c2VDeCgpO1xuXG5cdGNvbnN0IGNsYXNzZXMgPSBjeChcblx0XHRpc0RlZmluZWQoIG1hcmdpbiApICYmXG5cdFx0XHRjc3NgXG5cdFx0XHRcdG1hcmdpbjogJHsgc3BhY2UoIG1hcmdpbiApIH07XG5cdFx0XHRgLFxuXHRcdGlzRGVmaW5lZCggbWFyZ2luWSApICYmXG5cdFx0XHRjc3NgXG5cdFx0XHRcdG1hcmdpbi1ib3R0b206ICR7IHNwYWNlKCBtYXJnaW5ZICkgfTtcblx0XHRcdFx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIG1hcmdpblkgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIG1hcmdpblggKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tbGVmdDogJHsgc3BhY2UoIG1hcmdpblggKSB9O1xuXHRcdFx0XHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCBtYXJnaW5YICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5Ub3AgKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tdG9wOiAkeyBzcGFjZSggbWFyZ2luVG9wICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5Cb3R0b20gKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tYm90dG9tOiAkeyBzcGFjZSggbWFyZ2luQm90dG9tICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5MZWZ0ICkgJiZcblx0XHRcdHJ0bCgge1xuXHRcdFx0XHRtYXJnaW5MZWZ0OiBzcGFjZSggbWFyZ2luTGVmdCApLFxuXHRcdFx0fSApKCksXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5SaWdodCApICYmXG5cdFx0XHRydGwoIHtcblx0XHRcdFx0bWFyZ2luUmlnaHQ6IHNwYWNlKCBtYXJnaW5SaWdodCApLFxuXHRcdFx0fSApKCksXG5cdFx0aXNEZWZpbmVkKCBwYWRkaW5nICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZzogJHsgc3BhY2UoIHBhZGRpbmcgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdZICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZy1ib3R0b206ICR7IHNwYWNlKCBwYWRkaW5nWSApIH07XG5cdFx0XHRcdHBhZGRpbmctdG9wOiAkeyBzcGFjZSggcGFkZGluZ1kgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdYICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZy1sZWZ0OiAkeyBzcGFjZSggcGFkZGluZ1ggKSB9O1xuXHRcdFx0XHRwYWRkaW5nLXJpZ2h0OiAkeyBzcGFjZSggcGFkZGluZ1ggKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdUb3AgKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRwYWRkaW5nLXRvcDogJHsgc3BhY2UoIHBhZGRpbmdUb3AgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdCb3R0b20gKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRwYWRkaW5nLWJvdHRvbTogJHsgc3BhY2UoIHBhZGRpbmdCb3R0b20gKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdMZWZ0ICkgJiZcblx0XHRcdHJ0bCgge1xuXHRcdFx0XHRwYWRkaW5nTGVmdDogc3BhY2UoIHBhZGRpbmdMZWZ0ICksXG5cdFx0XHR9ICkoKSxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdSaWdodCApICYmXG5cdFx0XHRydGwoIHtcblx0XHRcdFx0cGFkZGluZ1JpZ2h0OiBzcGFjZSggcGFkZGluZ1JpZ2h0ICksXG5cdFx0XHR9ICkoKSxcblx0XHRjbGFzc05hbWVcblx0KTtcblxuXHRyZXR1cm4geyAuLi5vdGhlclByb3BzLCBjbGFzc05hbWU6IGNsYXNzZXMgfTtcbn1cbiJdfQ== */"), isDefined(marginBottom) && /* @__PURE__ */ css("margin-bottom:", space(marginBottom), ";" + (false ? "" : ";label:classes;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBOERNIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHVzZUNvbnRleHRTeXN0ZW0gfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgcnRsLCB1c2VDeCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgU3BhY2VyUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuZnVuY3Rpb24gaXNEZWZpbmVkPCBUID4oIG86IFQgKTogbyBpcyBFeGNsdWRlPCBULCBudWxsIHwgdW5kZWZpbmVkID4ge1xuXHRyZXR1cm4gdHlwZW9mIG8gIT09ICd1bmRlZmluZWQnICYmIG8gIT09IG51bGw7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiB1c2VTcGFjZXIoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczwgU3BhY2VyUHJvcHMsICdkaXYnID5cbikge1xuXHRjb25zdCB7XG5cdFx0Y2xhc3NOYW1lLFxuXHRcdG1hcmdpbixcblx0XHRtYXJnaW5Cb3R0b20gPSAyLFxuXHRcdG1hcmdpbkxlZnQsXG5cdFx0bWFyZ2luUmlnaHQsXG5cdFx0bWFyZ2luVG9wLFxuXHRcdG1hcmdpblgsXG5cdFx0bWFyZ2luWSxcblx0XHRwYWRkaW5nLFxuXHRcdHBhZGRpbmdCb3R0b20sXG5cdFx0cGFkZGluZ0xlZnQsXG5cdFx0cGFkZGluZ1JpZ2h0LFxuXHRcdHBhZGRpbmdUb3AsXG5cdFx0cGFkZGluZ1gsXG5cdFx0cGFkZGluZ1ksXG5cdFx0Li4ub3RoZXJQcm9wc1xuXHR9ID0gdXNlQ29udGV4dFN5c3RlbSggcHJvcHMsICdTcGFjZXInICk7XG5cblx0Y29uc3QgY3ggPSB1c2VDeCgpO1xuXG5cdGNvbnN0IGNsYXNzZXMgPSBjeChcblx0XHRpc0RlZmluZWQoIG1hcmdpbiApICYmXG5cdFx0XHRjc3NgXG5cdFx0XHRcdG1hcmdpbjogJHsgc3BhY2UoIG1hcmdpbiApIH07XG5cdFx0XHRgLFxuXHRcdGlzRGVmaW5lZCggbWFyZ2luWSApICYmXG5cdFx0XHRjc3NgXG5cdFx0XHRcdG1hcmdpbi1ib3R0b206ICR7IHNwYWNlKCBtYXJnaW5ZICkgfTtcblx0XHRcdFx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIG1hcmdpblkgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIG1hcmdpblggKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tbGVmdDogJHsgc3BhY2UoIG1hcmdpblggKSB9O1xuXHRcdFx0XHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCBtYXJnaW5YICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5Ub3AgKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tdG9wOiAkeyBzcGFjZSggbWFyZ2luVG9wICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5Cb3R0b20gKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tYm90dG9tOiAkeyBzcGFjZSggbWFyZ2luQm90dG9tICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5MZWZ0ICkgJiZcblx0XHRcdHJ0bCgge1xuXHRcdFx0XHRtYXJnaW5MZWZ0OiBzcGFjZSggbWFyZ2luTGVmdCApLFxuXHRcdFx0fSApKCksXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5SaWdodCApICYmXG5cdFx0XHRydGwoIHtcblx0XHRcdFx0bWFyZ2luUmlnaHQ6IHNwYWNlKCBtYXJnaW5SaWdodCApLFxuXHRcdFx0fSApKCksXG5cdFx0aXNEZWZpbmVkKCBwYWRkaW5nICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZzogJHsgc3BhY2UoIHBhZGRpbmcgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdZICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZy1ib3R0b206ICR7IHNwYWNlKCBwYWRkaW5nWSApIH07XG5cdFx0XHRcdHBhZGRpbmctdG9wOiAkeyBzcGFjZSggcGFkZGluZ1kgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdYICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZy1sZWZ0OiAkeyBzcGFjZSggcGFkZGluZ1ggKSB9O1xuXHRcdFx0XHRwYWRkaW5nLXJpZ2h0OiAkeyBzcGFjZSggcGFkZGluZ1ggKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdUb3AgKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRwYWRkaW5nLXRvcDogJHsgc3BhY2UoIHBhZGRpbmdUb3AgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdCb3R0b20gKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRwYWRkaW5nLWJvdHRvbTogJHsgc3BhY2UoIHBhZGRpbmdCb3R0b20gKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdMZWZ0ICkgJiZcblx0XHRcdHJ0bCgge1xuXHRcdFx0XHRwYWRkaW5nTGVmdDogc3BhY2UoIHBhZGRpbmdMZWZ0ICksXG5cdFx0XHR9ICkoKSxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdSaWdodCApICYmXG5cdFx0XHRydGwoIHtcblx0XHRcdFx0cGFkZGluZ1JpZ2h0OiBzcGFjZSggcGFkZGluZ1JpZ2h0ICksXG5cdFx0XHR9ICkoKSxcblx0XHRjbGFzc05hbWVcblx0KTtcblxuXHRyZXR1cm4geyAuLi5vdGhlclByb3BzLCBjbGFzc05hbWU6IGNsYXNzZXMgfTtcbn1cbiJdfQ== */"), isDefined(marginLeft) && rtl({
      marginLeft: space(marginLeft)
    })(), isDefined(marginRight) && rtl({
      marginRight: space(marginRight)
    })(), isDefined(padding2) && /* @__PURE__ */ css("padding:", space(padding2), ";" + (false ? "" : ";label:classes;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMEVNIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHVzZUNvbnRleHRTeXN0ZW0gfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgcnRsLCB1c2VDeCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgU3BhY2VyUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuZnVuY3Rpb24gaXNEZWZpbmVkPCBUID4oIG86IFQgKTogbyBpcyBFeGNsdWRlPCBULCBudWxsIHwgdW5kZWZpbmVkID4ge1xuXHRyZXR1cm4gdHlwZW9mIG8gIT09ICd1bmRlZmluZWQnICYmIG8gIT09IG51bGw7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiB1c2VTcGFjZXIoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczwgU3BhY2VyUHJvcHMsICdkaXYnID5cbikge1xuXHRjb25zdCB7XG5cdFx0Y2xhc3NOYW1lLFxuXHRcdG1hcmdpbixcblx0XHRtYXJnaW5Cb3R0b20gPSAyLFxuXHRcdG1hcmdpbkxlZnQsXG5cdFx0bWFyZ2luUmlnaHQsXG5cdFx0bWFyZ2luVG9wLFxuXHRcdG1hcmdpblgsXG5cdFx0bWFyZ2luWSxcblx0XHRwYWRkaW5nLFxuXHRcdHBhZGRpbmdCb3R0b20sXG5cdFx0cGFkZGluZ0xlZnQsXG5cdFx0cGFkZGluZ1JpZ2h0LFxuXHRcdHBhZGRpbmdUb3AsXG5cdFx0cGFkZGluZ1gsXG5cdFx0cGFkZGluZ1ksXG5cdFx0Li4ub3RoZXJQcm9wc1xuXHR9ID0gdXNlQ29udGV4dFN5c3RlbSggcHJvcHMsICdTcGFjZXInICk7XG5cblx0Y29uc3QgY3ggPSB1c2VDeCgpO1xuXG5cdGNvbnN0IGNsYXNzZXMgPSBjeChcblx0XHRpc0RlZmluZWQoIG1hcmdpbiApICYmXG5cdFx0XHRjc3NgXG5cdFx0XHRcdG1hcmdpbjogJHsgc3BhY2UoIG1hcmdpbiApIH07XG5cdFx0XHRgLFxuXHRcdGlzRGVmaW5lZCggbWFyZ2luWSApICYmXG5cdFx0XHRjc3NgXG5cdFx0XHRcdG1hcmdpbi1ib3R0b206ICR7IHNwYWNlKCBtYXJnaW5ZICkgfTtcblx0XHRcdFx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIG1hcmdpblkgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIG1hcmdpblggKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tbGVmdDogJHsgc3BhY2UoIG1hcmdpblggKSB9O1xuXHRcdFx0XHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCBtYXJnaW5YICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5Ub3AgKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tdG9wOiAkeyBzcGFjZSggbWFyZ2luVG9wICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5Cb3R0b20gKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tYm90dG9tOiAkeyBzcGFjZSggbWFyZ2luQm90dG9tICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5MZWZ0ICkgJiZcblx0XHRcdHJ0bCgge1xuXHRcdFx0XHRtYXJnaW5MZWZ0OiBzcGFjZSggbWFyZ2luTGVmdCApLFxuXHRcdFx0fSApKCksXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5SaWdodCApICYmXG5cdFx0XHRydGwoIHtcblx0XHRcdFx0bWFyZ2luUmlnaHQ6IHNwYWNlKCBtYXJnaW5SaWdodCApLFxuXHRcdFx0fSApKCksXG5cdFx0aXNEZWZpbmVkKCBwYWRkaW5nICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZzogJHsgc3BhY2UoIHBhZGRpbmcgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdZICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZy1ib3R0b206ICR7IHNwYWNlKCBwYWRkaW5nWSApIH07XG5cdFx0XHRcdHBhZGRpbmctdG9wOiAkeyBzcGFjZSggcGFkZGluZ1kgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdYICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZy1sZWZ0OiAkeyBzcGFjZSggcGFkZGluZ1ggKSB9O1xuXHRcdFx0XHRwYWRkaW5nLXJpZ2h0OiAkeyBzcGFjZSggcGFkZGluZ1ggKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdUb3AgKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRwYWRkaW5nLXRvcDogJHsgc3BhY2UoIHBhZGRpbmdUb3AgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdCb3R0b20gKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRwYWRkaW5nLWJvdHRvbTogJHsgc3BhY2UoIHBhZGRpbmdCb3R0b20gKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdMZWZ0ICkgJiZcblx0XHRcdHJ0bCgge1xuXHRcdFx0XHRwYWRkaW5nTGVmdDogc3BhY2UoIHBhZGRpbmdMZWZ0ICksXG5cdFx0XHR9ICkoKSxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdSaWdodCApICYmXG5cdFx0XHRydGwoIHtcblx0XHRcdFx0cGFkZGluZ1JpZ2h0OiBzcGFjZSggcGFkZGluZ1JpZ2h0ICksXG5cdFx0XHR9ICkoKSxcblx0XHRjbGFzc05hbWVcblx0KTtcblxuXHRyZXR1cm4geyAuLi5vdGhlclByb3BzLCBjbGFzc05hbWU6IGNsYXNzZXMgfTtcbn1cbiJdfQ== */"), isDefined(paddingY2) && /* @__PURE__ */ css("padding-bottom:", space(paddingY2), ";padding-top:", space(paddingY2), ";" + (false ? "" : ";label:classes;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBOEVNIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHVzZUNvbnRleHRTeXN0ZW0gfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgcnRsLCB1c2VDeCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgU3BhY2VyUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuZnVuY3Rpb24gaXNEZWZpbmVkPCBUID4oIG86IFQgKTogbyBpcyBFeGNsdWRlPCBULCBudWxsIHwgdW5kZWZpbmVkID4ge1xuXHRyZXR1cm4gdHlwZW9mIG8gIT09ICd1bmRlZmluZWQnICYmIG8gIT09IG51bGw7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiB1c2VTcGFjZXIoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczwgU3BhY2VyUHJvcHMsICdkaXYnID5cbikge1xuXHRjb25zdCB7XG5cdFx0Y2xhc3NOYW1lLFxuXHRcdG1hcmdpbixcblx0XHRtYXJnaW5Cb3R0b20gPSAyLFxuXHRcdG1hcmdpbkxlZnQsXG5cdFx0bWFyZ2luUmlnaHQsXG5cdFx0bWFyZ2luVG9wLFxuXHRcdG1hcmdpblgsXG5cdFx0bWFyZ2luWSxcblx0XHRwYWRkaW5nLFxuXHRcdHBhZGRpbmdCb3R0b20sXG5cdFx0cGFkZGluZ0xlZnQsXG5cdFx0cGFkZGluZ1JpZ2h0LFxuXHRcdHBhZGRpbmdUb3AsXG5cdFx0cGFkZGluZ1gsXG5cdFx0cGFkZGluZ1ksXG5cdFx0Li4ub3RoZXJQcm9wc1xuXHR9ID0gdXNlQ29udGV4dFN5c3RlbSggcHJvcHMsICdTcGFjZXInICk7XG5cblx0Y29uc3QgY3ggPSB1c2VDeCgpO1xuXG5cdGNvbnN0IGNsYXNzZXMgPSBjeChcblx0XHRpc0RlZmluZWQoIG1hcmdpbiApICYmXG5cdFx0XHRjc3NgXG5cdFx0XHRcdG1hcmdpbjogJHsgc3BhY2UoIG1hcmdpbiApIH07XG5cdFx0XHRgLFxuXHRcdGlzRGVmaW5lZCggbWFyZ2luWSApICYmXG5cdFx0XHRjc3NgXG5cdFx0XHRcdG1hcmdpbi1ib3R0b206ICR7IHNwYWNlKCBtYXJnaW5ZICkgfTtcblx0XHRcdFx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIG1hcmdpblkgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIG1hcmdpblggKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tbGVmdDogJHsgc3BhY2UoIG1hcmdpblggKSB9O1xuXHRcdFx0XHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCBtYXJnaW5YICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5Ub3AgKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tdG9wOiAkeyBzcGFjZSggbWFyZ2luVG9wICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5Cb3R0b20gKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tYm90dG9tOiAkeyBzcGFjZSggbWFyZ2luQm90dG9tICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5MZWZ0ICkgJiZcblx0XHRcdHJ0bCgge1xuXHRcdFx0XHRtYXJnaW5MZWZ0OiBzcGFjZSggbWFyZ2luTGVmdCApLFxuXHRcdFx0fSApKCksXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5SaWdodCApICYmXG5cdFx0XHRydGwoIHtcblx0XHRcdFx0bWFyZ2luUmlnaHQ6IHNwYWNlKCBtYXJnaW5SaWdodCApLFxuXHRcdFx0fSApKCksXG5cdFx0aXNEZWZpbmVkKCBwYWRkaW5nICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZzogJHsgc3BhY2UoIHBhZGRpbmcgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdZICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZy1ib3R0b206ICR7IHNwYWNlKCBwYWRkaW5nWSApIH07XG5cdFx0XHRcdHBhZGRpbmctdG9wOiAkeyBzcGFjZSggcGFkZGluZ1kgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdYICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZy1sZWZ0OiAkeyBzcGFjZSggcGFkZGluZ1ggKSB9O1xuXHRcdFx0XHRwYWRkaW5nLXJpZ2h0OiAkeyBzcGFjZSggcGFkZGluZ1ggKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdUb3AgKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRwYWRkaW5nLXRvcDogJHsgc3BhY2UoIHBhZGRpbmdUb3AgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdCb3R0b20gKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRwYWRkaW5nLWJvdHRvbTogJHsgc3BhY2UoIHBhZGRpbmdCb3R0b20gKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdMZWZ0ICkgJiZcblx0XHRcdHJ0bCgge1xuXHRcdFx0XHRwYWRkaW5nTGVmdDogc3BhY2UoIHBhZGRpbmdMZWZ0ICksXG5cdFx0XHR9ICkoKSxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdSaWdodCApICYmXG5cdFx0XHRydGwoIHtcblx0XHRcdFx0cGFkZGluZ1JpZ2h0OiBzcGFjZSggcGFkZGluZ1JpZ2h0ICksXG5cdFx0XHR9ICkoKSxcblx0XHRjbGFzc05hbWVcblx0KTtcblxuXHRyZXR1cm4geyAuLi5vdGhlclByb3BzLCBjbGFzc05hbWU6IGNsYXNzZXMgfTtcbn1cbiJdfQ== */"), isDefined(paddingX) && /* @__PURE__ */ css("padding-left:", space(paddingX), ";padding-right:", space(paddingX), ";" + (false ? "" : ";label:classes;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBbUZNIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHVzZUNvbnRleHRTeXN0ZW0gfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgcnRsLCB1c2VDeCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgU3BhY2VyUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuZnVuY3Rpb24gaXNEZWZpbmVkPCBUID4oIG86IFQgKTogbyBpcyBFeGNsdWRlPCBULCBudWxsIHwgdW5kZWZpbmVkID4ge1xuXHRyZXR1cm4gdHlwZW9mIG8gIT09ICd1bmRlZmluZWQnICYmIG8gIT09IG51bGw7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiB1c2VTcGFjZXIoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczwgU3BhY2VyUHJvcHMsICdkaXYnID5cbikge1xuXHRjb25zdCB7XG5cdFx0Y2xhc3NOYW1lLFxuXHRcdG1hcmdpbixcblx0XHRtYXJnaW5Cb3R0b20gPSAyLFxuXHRcdG1hcmdpbkxlZnQsXG5cdFx0bWFyZ2luUmlnaHQsXG5cdFx0bWFyZ2luVG9wLFxuXHRcdG1hcmdpblgsXG5cdFx0bWFyZ2luWSxcblx0XHRwYWRkaW5nLFxuXHRcdHBhZGRpbmdCb3R0b20sXG5cdFx0cGFkZGluZ0xlZnQsXG5cdFx0cGFkZGluZ1JpZ2h0LFxuXHRcdHBhZGRpbmdUb3AsXG5cdFx0cGFkZGluZ1gsXG5cdFx0cGFkZGluZ1ksXG5cdFx0Li4ub3RoZXJQcm9wc1xuXHR9ID0gdXNlQ29udGV4dFN5c3RlbSggcHJvcHMsICdTcGFjZXInICk7XG5cblx0Y29uc3QgY3ggPSB1c2VDeCgpO1xuXG5cdGNvbnN0IGNsYXNzZXMgPSBjeChcblx0XHRpc0RlZmluZWQoIG1hcmdpbiApICYmXG5cdFx0XHRjc3NgXG5cdFx0XHRcdG1hcmdpbjogJHsgc3BhY2UoIG1hcmdpbiApIH07XG5cdFx0XHRgLFxuXHRcdGlzRGVmaW5lZCggbWFyZ2luWSApICYmXG5cdFx0XHRjc3NgXG5cdFx0XHRcdG1hcmdpbi1ib3R0b206ICR7IHNwYWNlKCBtYXJnaW5ZICkgfTtcblx0XHRcdFx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIG1hcmdpblkgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIG1hcmdpblggKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tbGVmdDogJHsgc3BhY2UoIG1hcmdpblggKSB9O1xuXHRcdFx0XHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCBtYXJnaW5YICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5Ub3AgKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tdG9wOiAkeyBzcGFjZSggbWFyZ2luVG9wICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5Cb3R0b20gKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tYm90dG9tOiAkeyBzcGFjZSggbWFyZ2luQm90dG9tICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5MZWZ0ICkgJiZcblx0XHRcdHJ0bCgge1xuXHRcdFx0XHRtYXJnaW5MZWZ0OiBzcGFjZSggbWFyZ2luTGVmdCApLFxuXHRcdFx0fSApKCksXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5SaWdodCApICYmXG5cdFx0XHRydGwoIHtcblx0XHRcdFx0bWFyZ2luUmlnaHQ6IHNwYWNlKCBtYXJnaW5SaWdodCApLFxuXHRcdFx0fSApKCksXG5cdFx0aXNEZWZpbmVkKCBwYWRkaW5nICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZzogJHsgc3BhY2UoIHBhZGRpbmcgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdZICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZy1ib3R0b206ICR7IHNwYWNlKCBwYWRkaW5nWSApIH07XG5cdFx0XHRcdHBhZGRpbmctdG9wOiAkeyBzcGFjZSggcGFkZGluZ1kgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdYICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZy1sZWZ0OiAkeyBzcGFjZSggcGFkZGluZ1ggKSB9O1xuXHRcdFx0XHRwYWRkaW5nLXJpZ2h0OiAkeyBzcGFjZSggcGFkZGluZ1ggKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdUb3AgKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRwYWRkaW5nLXRvcDogJHsgc3BhY2UoIHBhZGRpbmdUb3AgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdCb3R0b20gKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRwYWRkaW5nLWJvdHRvbTogJHsgc3BhY2UoIHBhZGRpbmdCb3R0b20gKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdMZWZ0ICkgJiZcblx0XHRcdHJ0bCgge1xuXHRcdFx0XHRwYWRkaW5nTGVmdDogc3BhY2UoIHBhZGRpbmdMZWZ0ICksXG5cdFx0XHR9ICkoKSxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdSaWdodCApICYmXG5cdFx0XHRydGwoIHtcblx0XHRcdFx0cGFkZGluZ1JpZ2h0OiBzcGFjZSggcGFkZGluZ1JpZ2h0ICksXG5cdFx0XHR9ICkoKSxcblx0XHRjbGFzc05hbWVcblx0KTtcblxuXHRyZXR1cm4geyAuLi5vdGhlclByb3BzLCBjbGFzc05hbWU6IGNsYXNzZXMgfTtcbn1cbiJdfQ== */"), isDefined(paddingTop) && /* @__PURE__ */ css("padding-top:", space(paddingTop), ";" + (false ? "" : ";label:classes;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBd0ZNIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHVzZUNvbnRleHRTeXN0ZW0gfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgcnRsLCB1c2VDeCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgU3BhY2VyUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuZnVuY3Rpb24gaXNEZWZpbmVkPCBUID4oIG86IFQgKTogbyBpcyBFeGNsdWRlPCBULCBudWxsIHwgdW5kZWZpbmVkID4ge1xuXHRyZXR1cm4gdHlwZW9mIG8gIT09ICd1bmRlZmluZWQnICYmIG8gIT09IG51bGw7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiB1c2VTcGFjZXIoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczwgU3BhY2VyUHJvcHMsICdkaXYnID5cbikge1xuXHRjb25zdCB7XG5cdFx0Y2xhc3NOYW1lLFxuXHRcdG1hcmdpbixcblx0XHRtYXJnaW5Cb3R0b20gPSAyLFxuXHRcdG1hcmdpbkxlZnQsXG5cdFx0bWFyZ2luUmlnaHQsXG5cdFx0bWFyZ2luVG9wLFxuXHRcdG1hcmdpblgsXG5cdFx0bWFyZ2luWSxcblx0XHRwYWRkaW5nLFxuXHRcdHBhZGRpbmdCb3R0b20sXG5cdFx0cGFkZGluZ0xlZnQsXG5cdFx0cGFkZGluZ1JpZ2h0LFxuXHRcdHBhZGRpbmdUb3AsXG5cdFx0cGFkZGluZ1gsXG5cdFx0cGFkZGluZ1ksXG5cdFx0Li4ub3RoZXJQcm9wc1xuXHR9ID0gdXNlQ29udGV4dFN5c3RlbSggcHJvcHMsICdTcGFjZXInICk7XG5cblx0Y29uc3QgY3ggPSB1c2VDeCgpO1xuXG5cdGNvbnN0IGNsYXNzZXMgPSBjeChcblx0XHRpc0RlZmluZWQoIG1hcmdpbiApICYmXG5cdFx0XHRjc3NgXG5cdFx0XHRcdG1hcmdpbjogJHsgc3BhY2UoIG1hcmdpbiApIH07XG5cdFx0XHRgLFxuXHRcdGlzRGVmaW5lZCggbWFyZ2luWSApICYmXG5cdFx0XHRjc3NgXG5cdFx0XHRcdG1hcmdpbi1ib3R0b206ICR7IHNwYWNlKCBtYXJnaW5ZICkgfTtcblx0XHRcdFx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIG1hcmdpblkgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIG1hcmdpblggKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tbGVmdDogJHsgc3BhY2UoIG1hcmdpblggKSB9O1xuXHRcdFx0XHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCBtYXJnaW5YICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5Ub3AgKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tdG9wOiAkeyBzcGFjZSggbWFyZ2luVG9wICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5Cb3R0b20gKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tYm90dG9tOiAkeyBzcGFjZSggbWFyZ2luQm90dG9tICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5MZWZ0ICkgJiZcblx0XHRcdHJ0bCgge1xuXHRcdFx0XHRtYXJnaW5MZWZ0OiBzcGFjZSggbWFyZ2luTGVmdCApLFxuXHRcdFx0fSApKCksXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5SaWdodCApICYmXG5cdFx0XHRydGwoIHtcblx0XHRcdFx0bWFyZ2luUmlnaHQ6IHNwYWNlKCBtYXJnaW5SaWdodCApLFxuXHRcdFx0fSApKCksXG5cdFx0aXNEZWZpbmVkKCBwYWRkaW5nICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZzogJHsgc3BhY2UoIHBhZGRpbmcgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdZICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZy1ib3R0b206ICR7IHNwYWNlKCBwYWRkaW5nWSApIH07XG5cdFx0XHRcdHBhZGRpbmctdG9wOiAkeyBzcGFjZSggcGFkZGluZ1kgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdYICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZy1sZWZ0OiAkeyBzcGFjZSggcGFkZGluZ1ggKSB9O1xuXHRcdFx0XHRwYWRkaW5nLXJpZ2h0OiAkeyBzcGFjZSggcGFkZGluZ1ggKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdUb3AgKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRwYWRkaW5nLXRvcDogJHsgc3BhY2UoIHBhZGRpbmdUb3AgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdCb3R0b20gKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRwYWRkaW5nLWJvdHRvbTogJHsgc3BhY2UoIHBhZGRpbmdCb3R0b20gKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdMZWZ0ICkgJiZcblx0XHRcdHJ0bCgge1xuXHRcdFx0XHRwYWRkaW5nTGVmdDogc3BhY2UoIHBhZGRpbmdMZWZ0ICksXG5cdFx0XHR9ICkoKSxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdSaWdodCApICYmXG5cdFx0XHRydGwoIHtcblx0XHRcdFx0cGFkZGluZ1JpZ2h0OiBzcGFjZSggcGFkZGluZ1JpZ2h0ICksXG5cdFx0XHR9ICkoKSxcblx0XHRjbGFzc05hbWVcblx0KTtcblxuXHRyZXR1cm4geyAuLi5vdGhlclByb3BzLCBjbGFzc05hbWU6IGNsYXNzZXMgfTtcbn1cbiJdfQ== */"), isDefined(paddingBottom) && /* @__PURE__ */ css("padding-bottom:", space(paddingBottom), ";" + (false ? "" : ";label:classes;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNEZNIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHVzZUNvbnRleHRTeXN0ZW0gfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgcnRsLCB1c2VDeCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgU3BhY2VyUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuZnVuY3Rpb24gaXNEZWZpbmVkPCBUID4oIG86IFQgKTogbyBpcyBFeGNsdWRlPCBULCBudWxsIHwgdW5kZWZpbmVkID4ge1xuXHRyZXR1cm4gdHlwZW9mIG8gIT09ICd1bmRlZmluZWQnICYmIG8gIT09IG51bGw7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiB1c2VTcGFjZXIoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczwgU3BhY2VyUHJvcHMsICdkaXYnID5cbikge1xuXHRjb25zdCB7XG5cdFx0Y2xhc3NOYW1lLFxuXHRcdG1hcmdpbixcblx0XHRtYXJnaW5Cb3R0b20gPSAyLFxuXHRcdG1hcmdpbkxlZnQsXG5cdFx0bWFyZ2luUmlnaHQsXG5cdFx0bWFyZ2luVG9wLFxuXHRcdG1hcmdpblgsXG5cdFx0bWFyZ2luWSxcblx0XHRwYWRkaW5nLFxuXHRcdHBhZGRpbmdCb3R0b20sXG5cdFx0cGFkZGluZ0xlZnQsXG5cdFx0cGFkZGluZ1JpZ2h0LFxuXHRcdHBhZGRpbmdUb3AsXG5cdFx0cGFkZGluZ1gsXG5cdFx0cGFkZGluZ1ksXG5cdFx0Li4ub3RoZXJQcm9wc1xuXHR9ID0gdXNlQ29udGV4dFN5c3RlbSggcHJvcHMsICdTcGFjZXInICk7XG5cblx0Y29uc3QgY3ggPSB1c2VDeCgpO1xuXG5cdGNvbnN0IGNsYXNzZXMgPSBjeChcblx0XHRpc0RlZmluZWQoIG1hcmdpbiApICYmXG5cdFx0XHRjc3NgXG5cdFx0XHRcdG1hcmdpbjogJHsgc3BhY2UoIG1hcmdpbiApIH07XG5cdFx0XHRgLFxuXHRcdGlzRGVmaW5lZCggbWFyZ2luWSApICYmXG5cdFx0XHRjc3NgXG5cdFx0XHRcdG1hcmdpbi1ib3R0b206ICR7IHNwYWNlKCBtYXJnaW5ZICkgfTtcblx0XHRcdFx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIG1hcmdpblkgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIG1hcmdpblggKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tbGVmdDogJHsgc3BhY2UoIG1hcmdpblggKSB9O1xuXHRcdFx0XHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCBtYXJnaW5YICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5Ub3AgKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tdG9wOiAkeyBzcGFjZSggbWFyZ2luVG9wICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5Cb3R0b20gKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRtYXJnaW4tYm90dG9tOiAkeyBzcGFjZSggbWFyZ2luQm90dG9tICkgfTtcblx0XHRcdGAsXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5MZWZ0ICkgJiZcblx0XHRcdHJ0bCgge1xuXHRcdFx0XHRtYXJnaW5MZWZ0OiBzcGFjZSggbWFyZ2luTGVmdCApLFxuXHRcdFx0fSApKCksXG5cdFx0aXNEZWZpbmVkKCBtYXJnaW5SaWdodCApICYmXG5cdFx0XHRydGwoIHtcblx0XHRcdFx0bWFyZ2luUmlnaHQ6IHNwYWNlKCBtYXJnaW5SaWdodCApLFxuXHRcdFx0fSApKCksXG5cdFx0aXNEZWZpbmVkKCBwYWRkaW5nICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZzogJHsgc3BhY2UoIHBhZGRpbmcgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdZICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZy1ib3R0b206ICR7IHNwYWNlKCBwYWRkaW5nWSApIH07XG5cdFx0XHRcdHBhZGRpbmctdG9wOiAkeyBzcGFjZSggcGFkZGluZ1kgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdYICkgJiZcblx0XHRcdGNzc2Bcblx0XHRcdFx0cGFkZGluZy1sZWZ0OiAkeyBzcGFjZSggcGFkZGluZ1ggKSB9O1xuXHRcdFx0XHRwYWRkaW5nLXJpZ2h0OiAkeyBzcGFjZSggcGFkZGluZ1ggKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdUb3AgKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRwYWRkaW5nLXRvcDogJHsgc3BhY2UoIHBhZGRpbmdUb3AgKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdCb3R0b20gKSAmJlxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRwYWRkaW5nLWJvdHRvbTogJHsgc3BhY2UoIHBhZGRpbmdCb3R0b20gKSB9O1xuXHRcdFx0YCxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdMZWZ0ICkgJiZcblx0XHRcdHJ0bCgge1xuXHRcdFx0XHRwYWRkaW5nTGVmdDogc3BhY2UoIHBhZGRpbmdMZWZ0ICksXG5cdFx0XHR9ICkoKSxcblx0XHRpc0RlZmluZWQoIHBhZGRpbmdSaWdodCApICYmXG5cdFx0XHRydGwoIHtcblx0XHRcdFx0cGFkZGluZ1JpZ2h0OiBzcGFjZSggcGFkZGluZ1JpZ2h0ICksXG5cdFx0XHR9ICkoKSxcblx0XHRjbGFzc05hbWVcblx0KTtcblxuXHRyZXR1cm4geyAuLi5vdGhlclByb3BzLCBjbGFzc05hbWU6IGNsYXNzZXMgfTtcbn1cbiJdfQ== */"), isDefined(paddingLeft) && rtl({
      paddingLeft: space(paddingLeft)
    })(), isDefined(paddingRight) && rtl({
      paddingRight: space(paddingRight)
    })(), className2);
    return {
      ...otherProps,
      className: classes
    };
  }

  // packages/components/build-module/spacer/component.mjs
  var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedSpacer(props, forwardedRef) {
    const spacerProps = useSpacer(props);
    return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(component_default, {
      ...spacerProps,
      ref: forwardedRef
    });
  }
  var Spacer = contextConnect(UnconnectedSpacer, "Spacer");
  var component_default6 = Spacer;

  // packages/components/build-module/number-control/index.mjs
  var import_element36 = __toESM(require_element(), 1);
  var import_i18n5 = __toESM(require_i18n(), 1);

  // packages/icons/build-module/icon/index.mjs
  var import_element22 = __toESM(require_element(), 1);
  var icon_default2 = (0, import_element22.forwardRef)(
    ({ icon, size: size3 = 24, ...props }, ref) => {
      return (0, import_element22.cloneElement)(icon, {
        width: size3,
        height: size3,
        ...props,
        ref
      });
    }
  );

  // packages/icons/build-module/library/arrow-left.mjs
  var import_primitives2 = __toESM(require_primitives(), 1);
  var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
  var arrow_left_default = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_primitives2.Path, { d: "M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z" }) });

  // packages/icons/build-module/library/arrow-right.mjs
  var import_primitives3 = __toESM(require_primitives(), 1);
  var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
  var arrow_right_default = /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_primitives3.Path, { d: "m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z" }) });

  // packages/icons/build-module/library/caution.mjs
  var import_primitives4 = __toESM(require_primitives(), 1);
  var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1);
  var caution_default = /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_primitives4.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-.75 12v-1.5h1.5V16h-1.5Zm0-8v5h1.5V8h-1.5Z" }) });

  // packages/icons/build-module/library/check.mjs
  var import_primitives5 = __toESM(require_primitives(), 1);
  var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1);
  var check_default = /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_primitives5.Path, { d: "M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z" }) });

  // packages/icons/build-module/library/chevron-down.mjs
  var import_primitives6 = __toESM(require_primitives(), 1);
  var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1);
  var chevron_down_default = /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_primitives6.Path, { d: "M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z" }) });

  // packages/icons/build-module/library/chevron-left.mjs
  var import_primitives7 = __toESM(require_primitives(), 1);
  var import_jsx_runtime60 = __toESM(require_jsx_runtime(), 1);
  var chevron_left_default = /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_primitives7.Path, { d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z" }) });

  // packages/icons/build-module/library/chevron-right-small.mjs
  var import_primitives8 = __toESM(require_primitives(), 1);
  var import_jsx_runtime61 = __toESM(require_jsx_runtime(), 1);
  var chevron_right_small_default = /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_primitives8.Path, { d: "M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z" }) });

  // packages/icons/build-module/library/chevron-right.mjs
  var import_primitives9 = __toESM(require_primitives(), 1);
  var import_jsx_runtime62 = __toESM(require_jsx_runtime(), 1);
  var chevron_right_default = /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_primitives9.Path, { d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z" }) });

  // packages/icons/build-module/library/chevron-up.mjs
  var import_primitives10 = __toESM(require_primitives(), 1);
  var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1);
  var chevron_up_default = /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_primitives10.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_primitives10.Path, { d: "M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z" }) });

  // packages/icons/build-module/library/close-small.mjs
  var import_primitives11 = __toESM(require_primitives(), 1);
  var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
  var close_small_default = /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_primitives11.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_primitives11.Path, { 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" }) });

  // packages/icons/build-module/library/close.mjs
  var import_primitives12 = __toESM(require_primitives(), 1);
  var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1);
  var close_default = /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_primitives12.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_primitives12.Path, { d: "m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z" }) });

  // packages/icons/build-module/library/copy.mjs
  var import_primitives13 = __toESM(require_primitives(), 1);
  var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1);
  var copy_default = /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_primitives13.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_primitives13.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z" }) });

  // packages/icons/build-module/library/error.mjs
  var import_primitives14 = __toESM(require_primitives(), 1);
  var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
  var error_default = /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_primitives14.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_primitives14.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z" }) });

  // packages/icons/build-module/library/info.mjs
  var import_primitives15 = __toESM(require_primitives(), 1);
  var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
  var info_default = /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_primitives15.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_primitives15.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z" }) });

  // packages/icons/build-module/library/line-dashed.mjs
  var import_primitives16 = __toESM(require_primitives(), 1);
  var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
  var line_dashed_default = /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_primitives16.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_primitives16.Path, { fillRule: "evenodd", d: "M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z", clipRule: "evenodd" }) });

  // packages/icons/build-module/library/line-dotted.mjs
  var import_primitives17 = __toESM(require_primitives(), 1);
  var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
  var line_dotted_default = /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_primitives17.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_primitives17.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M5.25 11.25h1.5v1.5h-1.5v-1.5zm3 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5zm1.5 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5z" }) });

  // packages/icons/build-module/library/line-solid.mjs
  var import_primitives18 = __toESM(require_primitives(), 1);
  var import_jsx_runtime71 = __toESM(require_jsx_runtime(), 1);
  var line_solid_default = /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_primitives18.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_primitives18.Path, { d: "M5 11.25h14v1.5H5z" }) });

  // packages/icons/build-module/library/link-off.mjs
  var import_primitives19 = __toESM(require_primitives(), 1);
  var import_jsx_runtime72 = __toESM(require_jsx_runtime(), 1);
  var link_off_default = /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_primitives19.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_primitives19.Path, { d: "M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z" }) });

  // packages/icons/build-module/library/link.mjs
  var import_primitives20 = __toESM(require_primitives(), 1);
  var import_jsx_runtime73 = __toESM(require_jsx_runtime(), 1);
  var link_default = /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_primitives20.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_primitives20.Path, { d: "M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z" }) });

  // packages/icons/build-module/library/menu.mjs
  var import_primitives21 = __toESM(require_primitives(), 1);
  var import_jsx_runtime74 = __toESM(require_jsx_runtime(), 1);
  var menu_default = /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_primitives21.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_primitives21.Path, { d: "M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z" }) });

  // packages/icons/build-module/library/more-vertical.mjs
  var import_primitives22 = __toESM(require_primitives(), 1);
  var import_jsx_runtime75 = __toESM(require_jsx_runtime(), 1);
  var more_vertical_default = /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_primitives22.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_primitives22.Path, { d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" }) });

  // packages/icons/build-module/library/plus.mjs
  var import_primitives23 = __toESM(require_primitives(), 1);
  var import_jsx_runtime76 = __toESM(require_jsx_runtime(), 1);
  var plus_default = /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_primitives23.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_primitives23.Path, { d: "M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z" }) });

  // packages/icons/build-module/library/published.mjs
  var import_primitives24 = __toESM(require_primitives(), 1);
  var import_jsx_runtime77 = __toESM(require_jsx_runtime(), 1);
  var published_default = /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_primitives24.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_primitives24.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/reset.mjs
  var import_primitives25 = __toESM(require_primitives(), 1);
  var import_jsx_runtime78 = __toESM(require_jsx_runtime(), 1);
  var reset_default = /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_primitives25.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_primitives25.Path, { d: "M7 11.5h10V13H7z" }) });

  // packages/icons/build-module/library/search.mjs
  var import_primitives26 = __toESM(require_primitives(), 1);
  var import_jsx_runtime79 = __toESM(require_jsx_runtime(), 1);
  var search_default = /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_primitives26.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_primitives26.Path, { 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" }) });

  // packages/icons/build-module/library/settings.mjs
  var import_primitives27 = __toESM(require_primitives(), 1);
  var import_jsx_runtime80 = __toESM(require_jsx_runtime(), 1);
  var settings_default = /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_primitives27.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_primitives27.Path, { 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" }),
    /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_primitives27.Path, { 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" })
  ] });

  // packages/icons/build-module/library/swatch.mjs
  var import_primitives28 = __toESM(require_primitives(), 1);
  var import_jsx_runtime81 = __toESM(require_jsx_runtime(), 1);
  var swatch_default = /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_primitives28.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_primitives28.Path, { d: "M7.1 5.7 8 6.9c.4-.3.9-.6 1.5-.8l-.6-1.4c-.7.3-1.3.6-1.8 1ZM4.6 8.9l1.4.6c.2-.5.5-1 .8-1.5l-1.2-.9c-.4.6-.8 1.2-1 1.8Zm14.8 0c-.3-.7-.6-1.3-1-1.8l-1.2.9c.3.4.6.9.8 1.5l1.4-.6ZM7.1 18.3c.6.4 1.2.8 1.8 1l.6-1.4c-.5-.2-1-.5-1.5-.8l-.9 1.2ZM5.5 12v-.9h-.7l-.7-.2v2l1.5-.2v-.9Zm-.7 3h-.2c.3.7.6 1.3 1 1.9l1.2-.9c-.3-.4-.6-.9-.8-1.5l-1.2.5Zm9.7 3 .5 1.2v.2c.7-.3 1.3-.6 1.9-1l-.9-1.2c-.4.3-.9.6-1.5.8Zm-2.5.5h-.9l-.2 1.3v.2h2l-.2-1.5h-.9Zm7.9-7.5-1.5.2V13h.7l.7.2v-2ZM18 14.5c-.2.5-.5 1-.8 1.5l1.2.9c.4-.6.8-1.2 1-1.8h-.2l-1.2-.6ZM11 4.1l.2 1.5H13V4.2h-1.9ZM14.5 6c.5.2 1 .5 1.5.8l.9-1.2c-.6-.4-1.2-.8-1.8-1L14.5 6Z" }) });

  // packages/icons/build-module/library/tip.mjs
  var import_primitives29 = __toESM(require_primitives(), 1);
  var import_jsx_runtime82 = __toESM(require_jsx_runtime(), 1);
  var tip_default = /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_primitives29.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_primitives29.Path, { d: "M12 15.8c-3.7 0-6.8-3-6.8-6.8s3-6.8 6.8-6.8c3.7 0 6.8 3 6.8 6.8s-3.1 6.8-6.8 6.8zm0-12C9.1 3.8 6.8 6.1 6.8 9s2.4 5.2 5.2 5.2c2.9 0 5.2-2.4 5.2-5.2S14.9 3.8 12 3.8zM8 17.5h8V19H8zM10 20.5h4V22h-4z" }) });

  // packages/icons/build-module/library/upload.mjs
  var import_primitives30 = __toESM(require_primitives(), 1);
  var import_jsx_runtime83 = __toESM(require_jsx_runtime(), 1);
  var upload_default = /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_primitives30.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_primitives30.Path, { 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" }) });

  // packages/components/build-module/number-control/index.mjs
  var import_compose7 = __toESM(require_compose(), 1);
  var import_deprecated5 = __toESM(require_deprecated(), 1);

  // packages/components/build-module/input-control/index.mjs
  var import_compose5 = __toESM(require_compose(), 1);
  var import_element32 = __toESM(require_element(), 1);

  // packages/components/build-module/input-control/input-base.mjs
  var import_compose3 = __toESM(require_compose(), 1);
  var import_element27 = __toESM(require_element(), 1);

  // packages/components/build-module/input-control/backdrop.mjs
  var import_element26 = __toESM(require_element(), 1);

  // packages/components/build-module/text/hook.mjs
  var import_element25 = __toESM(require_element(), 1);

  // packages/components/build-module/truncate/hook.mjs
  var import_element23 = __toESM(require_element(), 1);

  // packages/components/build-module/truncate/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__3() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var Truncate = false ? {
    name: "hdknak",
    styles: "display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"
  } : {
    name: "abxxyf-Truncate",
    styles: "display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;label:Truncate;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLMkIiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5leHBvcnQgY29uc3QgVHJ1bmNhdGUgPSBjc3NgXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuXHR0ZXh0LW92ZXJmbG93OiBlbGxpcHNpcztcblx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcbmA7XG4iXX0= */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__3
  };

  // packages/components/build-module/truncate/utils.mjs
  var TRUNCATE_ELLIPSIS = "\u2026";
  var TRUNCATE_TYPE = {
    auto: "auto",
    head: "head",
    middle: "middle",
    tail: "tail",
    none: "none"
  };
  var TRUNCATE_DEFAULT_PROPS = {
    ellipsis: TRUNCATE_ELLIPSIS,
    ellipsizeMode: TRUNCATE_TYPE.auto,
    limit: 0,
    numberOfLines: 0
  };
  function truncateMiddle(word, headLength, tailLength, ellipsis) {
    if (typeof word !== "string") {
      return "";
    }
    const wordLength = word.length;
    const frontLength = ~~headLength;
    const backLength = ~~tailLength;
    const truncateStr = isValueDefined(ellipsis) ? ellipsis : TRUNCATE_ELLIPSIS;
    if (frontLength === 0 && backLength === 0 || frontLength >= wordLength || backLength >= wordLength || frontLength + backLength >= wordLength) {
      return word;
    } else if (backLength === 0) {
      return word.slice(0, frontLength) + truncateStr;
    }
    return word.slice(0, frontLength) + truncateStr + word.slice(wordLength - backLength);
  }
  function truncateContent(words = "", props) {
    const mergedProps = {
      ...TRUNCATE_DEFAULT_PROPS,
      ...props
    };
    const {
      ellipsis,
      ellipsizeMode,
      limit
    } = mergedProps;
    if (ellipsizeMode === TRUNCATE_TYPE.none) {
      return words;
    }
    let truncateHead;
    let truncateTail;
    switch (ellipsizeMode) {
      case TRUNCATE_TYPE.head:
        truncateHead = 0;
        truncateTail = limit;
        break;
      case TRUNCATE_TYPE.middle:
        truncateHead = Math.floor(limit / 2);
        truncateTail = Math.floor(limit / 2);
        break;
      default:
        truncateHead = limit;
        truncateTail = 0;
    }
    const truncatedContent = ellipsizeMode !== TRUNCATE_TYPE.auto ? truncateMiddle(words, truncateHead, truncateTail, ellipsis) : words;
    return truncatedContent;
  }

  // packages/components/build-module/truncate/hook.mjs
  function useTruncate(props) {
    const {
      className: className2,
      children,
      ellipsis = TRUNCATE_ELLIPSIS,
      ellipsizeMode = TRUNCATE_TYPE.auto,
      limit = 0,
      numberOfLines = 0,
      ...otherProps
    } = useContextSystem(props, "Truncate");
    const cx3 = useCx();
    let childrenAsText;
    if (typeof children === "string") {
      childrenAsText = children;
    } else if (typeof children === "number") {
      childrenAsText = children.toString();
    }
    const truncatedContent = childrenAsText ? truncateContent(childrenAsText, {
      ellipsis,
      ellipsizeMode,
      limit,
      numberOfLines
    }) : children;
    const shouldTruncate = !!childrenAsText && ellipsizeMode === TRUNCATE_TYPE.auto;
    const classes = (0, import_element23.useMemo)(() => {
      const truncateLines = /* @__PURE__ */ css(numberOfLines === 1 ? "word-break: break-all;" : "", " -webkit-box-orient:vertical;-webkit-line-clamp:", numberOfLines, ";display:-webkit-box;overflow:hidden;" + (false ? "" : ";label:truncateLines;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMEQyQiIsImZpbGUiOiJob29rLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIFdvcmRQcmVzcyBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgdXNlTWVtbyB9IGZyb20gJ0B3b3JkcHJlc3MvZWxlbWVudCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHVzZUNvbnRleHRTeXN0ZW0gfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCAqIGFzIHN0eWxlcyBmcm9tICcuL3N0eWxlcyc7XG5pbXBvcnQgeyBUUlVOQ0FURV9FTExJUFNJUywgVFJVTkNBVEVfVFlQRSwgdHJ1bmNhdGVDb250ZW50IH0gZnJvbSAnLi91dGlscyc7XG5pbXBvcnQgeyB1c2VDeCB9IGZyb20gJy4uL3V0aWxzL2hvb2tzL3VzZS1jeCc7XG5pbXBvcnQgdHlwZSB7IFRydW5jYXRlUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gdXNlVHJ1bmNhdGUoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczwgVHJ1bmNhdGVQcm9wcywgJ3NwYW4nID5cbikge1xuXHRjb25zdCB7XG5cdFx0Y2xhc3NOYW1lLFxuXHRcdGNoaWxkcmVuLFxuXHRcdGVsbGlwc2lzID0gVFJVTkNBVEVfRUxMSVBTSVMsXG5cdFx0ZWxsaXBzaXplTW9kZSA9IFRSVU5DQVRFX1RZUEUuYXV0byxcblx0XHRsaW1pdCA9IDAsXG5cdFx0bnVtYmVyT2ZMaW5lcyA9IDAsXG5cdFx0Li4ub3RoZXJQcm9wc1xuXHR9ID0gdXNlQ29udGV4dFN5c3RlbSggcHJvcHMsICdUcnVuY2F0ZScgKTtcblxuXHRjb25zdCBjeCA9IHVzZUN4KCk7XG5cblx0bGV0IGNoaWxkcmVuQXNUZXh0O1xuXHRpZiAoIHR5cGVvZiBjaGlsZHJlbiA9PT0gJ3N0cmluZycgKSB7XG5cdFx0Y2hpbGRyZW5Bc1RleHQgPSBjaGlsZHJlbjtcblx0fSBlbHNlIGlmICggdHlwZW9mIGNoaWxkcmVuID09PSAnbnVtYmVyJyApIHtcblx0XHRjaGlsZHJlbkFzVGV4dCA9IGNoaWxkcmVuLnRvU3RyaW5nKCk7XG5cdH1cblxuXHRjb25zdCB0cnVuY2F0ZWRDb250ZW50ID0gY2hpbGRyZW5Bc1RleHRcblx0XHQ/IHRydW5jYXRlQ29udGVudCggY2hpbGRyZW5Bc1RleHQsIHtcblx0XHRcdFx0ZWxsaXBzaXMsXG5cdFx0XHRcdGVsbGlwc2l6ZU1vZGUsXG5cdFx0XHRcdGxpbWl0LFxuXHRcdFx0XHRudW1iZXJPZkxpbmVzLFxuXHRcdCAgfSApXG5cdFx0OiBjaGlsZHJlbjtcblxuXHRjb25zdCBzaG91bGRUcnVuY2F0ZSA9XG5cdFx0ISEgY2hpbGRyZW5Bc1RleHQgJiYgZWxsaXBzaXplTW9kZSA9PT0gVFJVTkNBVEVfVFlQRS5hdXRvO1xuXG5cdGNvbnN0IGNsYXNzZXMgPSB1c2VNZW1vKCAoKSA9PiB7XG5cdFx0Ly8gVGhlIGB3b3JkLWJyZWFrOiBicmVhay1hbGxgIHByb3BlcnR5IGZpcnN0IG1ha2VzIHN1cmUgYSB0ZXh0IGxpbmVcblx0XHQvLyBicmVha3MgZXZlbiB3aGVuIGl0IGNvbnRhaW5zICd1bmJyZWFrYWJsZScgY29udGVudCBzdWNoIGFzIGxvbmcgVVJMcy5cblx0XHQvLyBTZWUgaHR0cHM6Ly9naXRodWIuY29tL1dvcmRQcmVzcy9ndXRlbmJlcmcvaXNzdWVzLzYwODYwLlxuXHRcdGNvbnN0IHRydW5jYXRlTGluZXMgPSBjc3NgXG5cdFx0XHQkeyBudW1iZXJPZkxpbmVzID09PSAxID8gJ3dvcmQtYnJlYWs6IGJyZWFrLWFsbDsnIDogJycgfVxuXHRcdFx0LXdlYmtpdC1ib3gtb3JpZW50OiB2ZXJ0aWNhbDtcblx0XHRcdC13ZWJraXQtbGluZS1jbGFtcDogJHsgbnVtYmVyT2ZMaW5lcyB9O1xuXHRcdFx0ZGlzcGxheTogLXdlYmtpdC1ib3g7XG5cdFx0XHRvdmVyZmxvdzogaGlkZGVuO1xuXHRcdGA7XG5cblx0XHRyZXR1cm4gY3goXG5cdFx0XHRzaG91bGRUcnVuY2F0ZSAmJiAhIG51bWJlck9mTGluZXMgJiYgc3R5bGVzLlRydW5jYXRlLFxuXHRcdFx0c2hvdWxkVHJ1bmNhdGUgJiYgISEgbnVtYmVyT2ZMaW5lcyAmJiB0cnVuY2F0ZUxpbmVzLFxuXHRcdFx0Y2xhc3NOYW1lXG5cdFx0KTtcblx0fSwgWyBjbGFzc05hbWUsIGN4LCBudW1iZXJPZkxpbmVzLCBzaG91bGRUcnVuY2F0ZSBdICk7XG5cblx0cmV0dXJuIHsgLi4ub3RoZXJQcm9wcywgY2xhc3NOYW1lOiBjbGFzc2VzLCBjaGlsZHJlbjogdHJ1bmNhdGVkQ29udGVudCB9O1xufVxuIl19 */");
      return cx3(shouldTruncate && !numberOfLines && Truncate, shouldTruncate && !!numberOfLines && truncateLines, className2);
    }, [className2, cx3, numberOfLines, shouldTruncate]);
    return {
      ...otherProps,
      className: classes,
      children: truncatedContent
    };
  }

  // packages/components/build-module/truncate/component.mjs
  var import_jsx_runtime84 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedTruncate(props, forwardedRef) {
    const truncateProps = useTruncate(props);
    return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(component_default, {
      as: "span",
      ...truncateProps,
      ref: forwardedRef
    });
  }
  var Truncate2 = contextConnect(UnconnectedTruncate, "Truncate");
  var component_default7 = Truncate2;

  // packages/components/build-module/text/styles.mjs
  var styles_exports3 = {};
  __export(styles_exports3, {
    Text: () => Text,
    block: () => block2,
    destructive: () => destructive,
    highlighterText: () => highlighterText,
    muted: () => muted,
    positive: () => positive,
    upperCase: () => upperCase
  });
  function _EMOTION_STRINGIFIED_CSS_ERROR__4() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var Text = /* @__PURE__ */ css("color:", COLORS.theme.foreground, ";line-height:", config_values_default.fontLineHeightBase, ";margin:0;text-wrap:pretty;" + (false ? "" : ";label:Text;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFVdUIiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGNvbnN0IFRleHQgPSBjc3NgXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9O1xuXHRsaW5lLWhlaWdodDogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9O1xuXHRtYXJnaW46IDA7XG5cdHRleHQtd3JhcDogcHJldHR5O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJsb2NrID0gY3NzYFxuXHRkaXNwbGF5OiBibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBwb3NpdGl2ZSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5hbGVydC5ncmVlbiB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGRlc3RydWN0aXZlID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLmFsZXJ0LnJlZCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IG11dGVkID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDcwMCBdIH07XG5gO1xuXG5leHBvcnQgY29uc3QgaGlnaGxpZ2h0ZXJUZXh0ID0gY3NzYFxuXHRtYXJrIHtcblx0XHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMuYWxlcnQueWVsbG93IH07XG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdFx0Ym94LXNoYWRvdzpcblx0XHRcdDAgMCAwIDFweCByZ2JhKCAwLCAwLCAwLCAwLjA1ICkgaW5zZXQsXG5cdFx0XHQwIC0xcHggMCByZ2JhKCAwLCAwLCAwLCAwLjEgKSBpbnNldDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IHVwcGVyQ2FzZSA9IGNzc2Bcblx0dGV4dC10cmFuc2Zvcm06IHVwcGVyY2FzZTtcbmA7XG4iXX0= */");
  var block2 = false ? {
    name: "4zleql",
    styles: "display:block"
  } : {
    name: "14aceuy-block",
    styles: "display:block;label:block;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQndCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBUZXh0ID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0bGluZS1oZWlnaHQ6ICR7IENPTkZJRy5mb250TGluZUhlaWdodEJhc2UgfTtcblx0bWFyZ2luOiAwO1xuXHR0ZXh0LXdyYXA6IHByZXR0eTtcbmA7XG5cbmV4cG9ydCBjb25zdCBibG9jayA9IGNzc2Bcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgcG9zaXRpdmUgPSBjc3NgXG5cdGNvbG9yOiAkeyBDT0xPUlMuYWxlcnQuZ3JlZW4gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBkZXN0cnVjdGl2ZSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5hbGVydC5yZWQgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBtdXRlZCA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGhpZ2hsaWdodGVyVGV4dCA9IGNzc2Bcblx0bWFyayB7XG5cdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLmFsZXJ0LnllbGxvdyB9O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRcdGJveC1zaGFkb3c6XG5cdFx0XHQwIDAgMCAxcHggcmdiYSggMCwgMCwgMCwgMC4wNSApIGluc2V0LFxuXHRcdFx0MCAtMXB4IDAgcmdiYSggMCwgMCwgMCwgMC4xICkgaW5zZXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCB1cHBlckNhc2UgPSBjc3NgXG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__4
  };
  var positive = /* @__PURE__ */ css("color:", COLORS.alert.green, ";" + (false ? "" : ";label:positive;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQjJCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBUZXh0ID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0bGluZS1oZWlnaHQ6ICR7IENPTkZJRy5mb250TGluZUhlaWdodEJhc2UgfTtcblx0bWFyZ2luOiAwO1xuXHR0ZXh0LXdyYXA6IHByZXR0eTtcbmA7XG5cbmV4cG9ydCBjb25zdCBibG9jayA9IGNzc2Bcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgcG9zaXRpdmUgPSBjc3NgXG5cdGNvbG9yOiAkeyBDT0xPUlMuYWxlcnQuZ3JlZW4gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBkZXN0cnVjdGl2ZSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5hbGVydC5yZWQgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBtdXRlZCA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGhpZ2hsaWdodGVyVGV4dCA9IGNzc2Bcblx0bWFyayB7XG5cdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLmFsZXJ0LnllbGxvdyB9O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRcdGJveC1zaGFkb3c6XG5cdFx0XHQwIDAgMCAxcHggcmdiYSggMCwgMCwgMCwgMC4wNSApIGluc2V0LFxuXHRcdFx0MCAtMXB4IDAgcmdiYSggMCwgMCwgMCwgMC4xICkgaW5zZXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCB1cHBlckNhc2UgPSBjc3NgXG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuIl19 */");
  var destructive = /* @__PURE__ */ css("color:", COLORS.alert.red, ";" + (false ? "" : ";label:destructive;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF5QjhCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBUZXh0ID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0bGluZS1oZWlnaHQ6ICR7IENPTkZJRy5mb250TGluZUhlaWdodEJhc2UgfTtcblx0bWFyZ2luOiAwO1xuXHR0ZXh0LXdyYXA6IHByZXR0eTtcbmA7XG5cbmV4cG9ydCBjb25zdCBibG9jayA9IGNzc2Bcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgcG9zaXRpdmUgPSBjc3NgXG5cdGNvbG9yOiAkeyBDT0xPUlMuYWxlcnQuZ3JlZW4gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBkZXN0cnVjdGl2ZSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5hbGVydC5yZWQgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBtdXRlZCA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGhpZ2hsaWdodGVyVGV4dCA9IGNzc2Bcblx0bWFyayB7XG5cdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLmFsZXJ0LnllbGxvdyB9O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRcdGJveC1zaGFkb3c6XG5cdFx0XHQwIDAgMCAxcHggcmdiYSggMCwgMCwgMCwgMC4wNSApIGluc2V0LFxuXHRcdFx0MCAtMXB4IDAgcmdiYSggMCwgMCwgMCwgMC4xICkgaW5zZXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCB1cHBlckNhc2UgPSBjc3NgXG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuIl19 */");
  var muted = /* @__PURE__ */ css("color:", COLORS.gray[700], ";" + (false ? "" : ";label:muted;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE2QndCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBUZXh0ID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0bGluZS1oZWlnaHQ6ICR7IENPTkZJRy5mb250TGluZUhlaWdodEJhc2UgfTtcblx0bWFyZ2luOiAwO1xuXHR0ZXh0LXdyYXA6IHByZXR0eTtcbmA7XG5cbmV4cG9ydCBjb25zdCBibG9jayA9IGNzc2Bcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgcG9zaXRpdmUgPSBjc3NgXG5cdGNvbG9yOiAkeyBDT0xPUlMuYWxlcnQuZ3JlZW4gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBkZXN0cnVjdGl2ZSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5hbGVydC5yZWQgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBtdXRlZCA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGhpZ2hsaWdodGVyVGV4dCA9IGNzc2Bcblx0bWFyayB7XG5cdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLmFsZXJ0LnllbGxvdyB9O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRcdGJveC1zaGFkb3c6XG5cdFx0XHQwIDAgMCAxcHggcmdiYSggMCwgMCwgMCwgMC4wNSApIGluc2V0LFxuXHRcdFx0MCAtMXB4IDAgcmdiYSggMCwgMCwgMCwgMC4xICkgaW5zZXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCB1cHBlckNhc2UgPSBjc3NgXG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuIl19 */");
  var highlighterText = /* @__PURE__ */ css("mark{background:", COLORS.alert.yellow, ";border-radius:", config_values_default.radiusSmall, ";box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.05 ) inset,0 -1px 0 rgba( 0, 0, 0, 0.1 ) inset;}" + (false ? "" : ";label:highlighterText;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQ2tDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBUZXh0ID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0bGluZS1oZWlnaHQ6ICR7IENPTkZJRy5mb250TGluZUhlaWdodEJhc2UgfTtcblx0bWFyZ2luOiAwO1xuXHR0ZXh0LXdyYXA6IHByZXR0eTtcbmA7XG5cbmV4cG9ydCBjb25zdCBibG9jayA9IGNzc2Bcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgcG9zaXRpdmUgPSBjc3NgXG5cdGNvbG9yOiAkeyBDT0xPUlMuYWxlcnQuZ3JlZW4gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBkZXN0cnVjdGl2ZSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5hbGVydC5yZWQgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBtdXRlZCA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGhpZ2hsaWdodGVyVGV4dCA9IGNzc2Bcblx0bWFyayB7XG5cdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLmFsZXJ0LnllbGxvdyB9O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRcdGJveC1zaGFkb3c6XG5cdFx0XHQwIDAgMCAxcHggcmdiYSggMCwgMCwgMCwgMC4wNSApIGluc2V0LFxuXHRcdFx0MCAtMXB4IDAgcmdiYSggMCwgMCwgMCwgMC4xICkgaW5zZXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCB1cHBlckNhc2UgPSBjc3NgXG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuIl19 */");
  var upperCase = false ? {
    name: "50zrmy",
    styles: "text-transform:uppercase"
  } : {
    name: "1mrt3zt-upperCase",
    styles: "text-transform:uppercase;label:upperCase;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyQzRCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBUZXh0ID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0bGluZS1oZWlnaHQ6ICR7IENPTkZJRy5mb250TGluZUhlaWdodEJhc2UgfTtcblx0bWFyZ2luOiAwO1xuXHR0ZXh0LXdyYXA6IHByZXR0eTtcbmA7XG5cbmV4cG9ydCBjb25zdCBibG9jayA9IGNzc2Bcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgcG9zaXRpdmUgPSBjc3NgXG5cdGNvbG9yOiAkeyBDT0xPUlMuYWxlcnQuZ3JlZW4gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBkZXN0cnVjdGl2ZSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5hbGVydC5yZWQgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBtdXRlZCA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGhpZ2hsaWdodGVyVGV4dCA9IGNzc2Bcblx0bWFyayB7XG5cdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLmFsZXJ0LnllbGxvdyB9O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRcdGJveC1zaGFkb3c6XG5cdFx0XHQwIDAgMCAxcHggcmdiYSggMCwgMCwgMCwgMC4wNSApIGluc2V0LFxuXHRcdFx0MCAtMXB4IDAgcmdiYSggMCwgMCwgMCwgMC4xICkgaW5zZXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCB1cHBlckNhc2UgPSBjc3NgXG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__4
  };

  // packages/components/build-module/text/utils.mjs
  var import_highlight_words_core = __toESM(require_dist(), 1);
  var import_element24 = __toESM(require_element(), 1);
  var lowercaseProps = (object) => {
    const mapped = {};
    for (const key in object) {
      mapped[key.toLowerCase()] = object[key];
    }
    return mapped;
  };
  var memoizedLowercaseProps = memize(lowercaseProps);
  function createHighlighterText({
    activeClassName = "",
    activeIndex = -1,
    activeStyle,
    autoEscape,
    caseSensitive = false,
    children,
    findChunks,
    highlightClassName = "",
    highlightStyle = {},
    highlightTag = "mark",
    sanitize: sanitize2,
    searchWords = [],
    unhighlightClassName = "",
    unhighlightStyle
  }) {
    if (!children) {
      return null;
    }
    if (typeof children !== "string") {
      return children;
    }
    const textToHighlight = children;
    const chunks = (0, import_highlight_words_core.findAll)({
      autoEscape,
      caseSensitive,
      findChunks,
      sanitize: sanitize2,
      searchWords,
      textToHighlight
    });
    const HighlightTag = highlightTag;
    let highlightIndex = -1;
    let highlightClassNames = "";
    let highlightStyles;
    const textContent = chunks.map((chunk, index2) => {
      const text = textToHighlight.substr(chunk.start, chunk.end - chunk.start);
      if (chunk.highlight) {
        highlightIndex++;
        let highlightClass;
        if (typeof highlightClassName === "object") {
          if (!caseSensitive) {
            highlightClassName = memoizedLowercaseProps(highlightClassName);
            highlightClass = highlightClassName[text.toLowerCase()];
          } else {
            highlightClass = highlightClassName[text];
          }
        } else {
          highlightClass = highlightClassName;
        }
        const isActive = highlightIndex === +activeIndex;
        highlightClassNames = `${highlightClass} ${isActive ? activeClassName : ""}`;
        highlightStyles = isActive === true && activeStyle !== null ? Object.assign({}, highlightStyle, activeStyle) : highlightStyle;
        const props = {
          children: text,
          className: highlightClassNames,
          key: index2,
          style: highlightStyles
        };
        if (typeof HighlightTag !== "string") {
          props.highlightIndex = highlightIndex;
        }
        return (0, import_element24.createElement)(HighlightTag, props);
      }
      return (0, import_element24.createElement)("span", {
        children: text,
        className: unhighlightClassName,
        key: index2,
        style: unhighlightStyle
      });
    });
    return textContent;
  }

  // packages/components/build-module/utils/font-size.mjs
  var BASE_FONT_SIZE = 13;
  var PRESET_FONT_SIZES = {
    body: BASE_FONT_SIZE,
    caption: 10,
    footnote: 11,
    largeTitle: 28,
    subheadline: 12,
    title: 20
  };
  var HEADING_FONT_SIZES = [1, 2, 3, 4, 5, 6].flatMap((n3) => [n3, n3.toString()]);
  function getFontSize(size3 = BASE_FONT_SIZE) {
    if (size3 in PRESET_FONT_SIZES) {
      return getFontSize(PRESET_FONT_SIZES[size3]);
    }
    if (typeof size3 !== "number") {
      const parsed = parseFloat(size3);
      if (Number.isNaN(parsed)) {
        return size3;
      }
      size3 = parsed;
    }
    const ratio = `(${size3} / ${BASE_FONT_SIZE})`;
    return `calc(${ratio} * ${config_values_default.fontSize})`;
  }
  function getHeadingFontSize(size3 = 3) {
    if (!HEADING_FONT_SIZES.includes(size3)) {
      return getFontSize(size3);
    }
    const headingSize = `fontSizeH${size3}`;
    return config_values_default[headingSize];
  }

  // packages/components/build-module/text/get-line-height.mjs
  function getLineHeight(adjustLineHeightForInnerControls, lineHeight) {
    if (lineHeight) {
      return lineHeight;
    }
    if (!adjustLineHeightForInnerControls) {
      return;
    }
    let value = `calc(${config_values_default.controlHeight} + ${space(2)})`;
    switch (adjustLineHeightForInnerControls) {
      case "large":
        value = `calc(${config_values_default.controlHeightLarge} + ${space(2)})`;
        break;
      case "small":
        value = `calc(${config_values_default.controlHeightSmall} + ${space(2)})`;
        break;
      case "xSmall":
        value = `calc(${config_values_default.controlHeightXSmall} + ${space(2)})`;
        break;
      default:
        break;
    }
    return value;
  }

  // packages/components/build-module/text/hook.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__5() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var _ref = false ? {
    name: "50zrmy",
    styles: "text-transform:uppercase"
  } : {
    name: "18bqwxz-sx-upperCase",
    styles: "text-transform:uppercase;label:sx-upperCase;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBa0dpQiIsImZpbGUiOiJob29rLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIFdvcmRQcmVzcyBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgdXNlTWVtbywgQ2hpbGRyZW4sIGNsb25lRWxlbWVudCB9IGZyb20gJ0B3b3JkcHJlc3MvZWxlbWVudCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IGhhc0Nvbm5lY3ROYW1lc3BhY2UsIHVzZUNvbnRleHRTeXN0ZW0gfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHVzZVRydW5jYXRlIH0gZnJvbSAnLi4vdHJ1bmNhdGUnO1xuaW1wb3J0IHsgZ2V0T3B0aW1hbFRleHRTaGFkZSB9IGZyb20gJy4uL3V0aWxzL2NvbG9ycyc7XG5pbXBvcnQgKiBhcyBzdHlsZXMgZnJvbSAnLi9zdHlsZXMnO1xuaW1wb3J0IHsgY3JlYXRlSGlnaGxpZ2h0ZXJUZXh0IH0gZnJvbSAnLi91dGlscyc7XG5pbXBvcnQgeyBnZXRGb250U2l6ZSB9IGZyb20gJy4uL3V0aWxzL2ZvbnQtc2l6ZSc7XG5pbXBvcnQgeyBDT05GSUcsIENPTE9SUyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IGdldExpbmVIZWlnaHQgfSBmcm9tICcuL2dldC1saW5lLWhlaWdodCc7XG5pbXBvcnQgeyB1c2VDeCB9IGZyb20gJy4uL3V0aWxzL2hvb2tzL3VzZS1jeCc7XG5pbXBvcnQgdHlwZSB7IFByb3BzIH0gZnJvbSAnLi90eXBlcyc7XG5pbXBvcnQgdHlwZSBSZWFjdCBmcm9tICdyZWFjdCc7XG5cbi8qKlxuICogQHBhcmFtIHtpbXBvcnQoJy4uL2NvbnRleHQnKS5Xb3JkUHJlc3NDb21wb25lbnRQcm9wczxpbXBvcnQoJy4vdHlwZXMnKS5Qcm9wcywgJ3NwYW4nPn0gcHJvcHNcbiAqL1xuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gdXNlVGV4dChcblx0cHJvcHM6IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzPCBQcm9wcywgJ3NwYW4nID5cbikge1xuXHRjb25zdCB7XG5cdFx0YWRqdXN0TGluZUhlaWdodEZvcklubmVyQ29udHJvbHMsXG5cdFx0YWxpZ24sXG5cdFx0Y2hpbGRyZW4sXG5cdFx0Y2xhc3NOYW1lLFxuXHRcdGNvbG9yLFxuXHRcdGVsbGlwc2l6ZU1vZGUsXG5cdFx0aXNEZXN0cnVjdGl2ZSA9IGZhbHNlLFxuXHRcdGRpc3BsYXksXG5cdFx0aGlnaGxpZ2h0RXNjYXBlID0gZmFsc2UsXG5cdFx0aGlnaGxpZ2h0Q2FzZVNlbnNpdGl2ZSA9IGZhbHNlLFxuXHRcdGhpZ2hsaWdodFdvcmRzLFxuXHRcdGhpZ2hsaWdodFNhbml0aXplLFxuXHRcdGlzQmxvY2sgPSBmYWxzZSxcblx0XHRsZXR0ZXJTcGFjaW5nLFxuXHRcdGxpbmVIZWlnaHQ6IGxpbmVIZWlnaHRQcm9wLFxuXHRcdG9wdGltaXplUmVhZGFiaWxpdHlGb3IsXG5cdFx0c2l6ZSxcblx0XHR0cnVuY2F0ZSA9IGZhbHNlLFxuXHRcdHVwcGVyQ2FzZSA9IGZhbHNlLFxuXHRcdHZhcmlhbnQsXG5cdFx0d2VpZ2h0ID0gQ09ORklHLmZvbnRXZWlnaHQsXG5cdFx0Li4ub3RoZXJQcm9wc1xuXHR9ID0gdXNlQ29udGV4dFN5c3RlbSggcHJvcHMsICdUZXh0JyApO1xuXG5cdGxldCBjb250ZW50OiBSZWFjdC5SZWFjdE5vZGUgPSBjaGlsZHJlbjtcblx0Y29uc3QgaXNIaWdobGlnaHRlciA9IEFycmF5LmlzQXJyYXkoIGhpZ2hsaWdodFdvcmRzICk7XG5cdGNvbnN0IGlzQ2FwdGlvbiA9IHNpemUgPT09ICdjYXB0aW9uJztcblxuXHRpZiAoIGlzSGlnaGxpZ2h0ZXIgKSB7XG5cdFx0aWYgKCB0eXBlb2YgY2hpbGRyZW4gIT09ICdzdHJpbmcnICkge1xuXHRcdFx0dGhyb3cgbmV3IFR5cGVFcnJvcihcblx0XHRcdFx0J2BjaGlsZHJlbmAgb2YgYFRleHRgIG11c3Qgb25seSBiZSBgc3RyaW5nYCB0eXBlcyB3aGVuIGBoaWdobGlnaHRXb3Jkc2AgaXMgZGVmaW5lZCdcblx0XHRcdCk7XG5cdFx0fVxuXG5cdFx0Y29udGVudCA9IGNyZWF0ZUhpZ2hsaWdodGVyVGV4dCgge1xuXHRcdFx0YXV0b0VzY2FwZTogaGlnaGxpZ2h0RXNjYXBlLFxuXHRcdFx0Y2hpbGRyZW4sXG5cdFx0XHRjYXNlU2Vuc2l0aXZlOiBoaWdobGlnaHRDYXNlU2Vuc2l0aXZlLFxuXHRcdFx0c2VhcmNoV29yZHM6IGhpZ2hsaWdodFdvcmRzLFxuXHRcdFx0c2FuaXRpemU6IGhpZ2hsaWdodFNhbml0aXplLFxuXHRcdH0gKTtcblx0fVxuXG5cdGNvbnN0IGN4ID0gdXNlQ3goKTtcblxuXHRjb25zdCBjbGFzc2VzID0gdXNlTWVtbyggKCkgPT4ge1xuXHRcdGNvbnN0IHN4OiBSZWNvcmQ8IHN0cmluZywgU2VyaWFsaXplZFN0eWxlcyB8IG51bGwgPiA9IHt9O1xuXG5cdFx0Y29uc3QgbGluZUhlaWdodCA9IGdldExpbmVIZWlnaHQoXG5cdFx0XHRhZGp1c3RMaW5lSGVpZ2h0Rm9ySW5uZXJDb250cm9scyxcblx0XHRcdGxpbmVIZWlnaHRQcm9wXG5cdFx0KTtcblxuXHRcdHN4LkJhc2UgPSBjc3MoIHtcblx0XHRcdGNvbG9yLFxuXHRcdFx0ZGlzcGxheSxcblx0XHRcdGZvbnRTaXplOiBnZXRGb250U2l6ZSggc2l6ZSApLFxuXHRcdFx0Zm9udFdlaWdodDogd2VpZ2h0LFxuXHRcdFx0bGluZUhlaWdodCxcblx0XHRcdGxldHRlclNwYWNpbmcsXG5cdFx0XHR0ZXh0QWxpZ246IGFsaWduLFxuXHRcdH0gKTtcblxuXHRcdHN4LnVwcGVyQ2FzZSA9IGNzcyggeyB0ZXh0VHJhbnNmb3JtOiAndXBwZXJjYXNlJyB9ICk7XG5cblx0XHRzeC5vcHRpbWFsVGV4dENvbG9yID0gbnVsbDtcblxuXHRcdGlmICggb3B0aW1pemVSZWFkYWJpbGl0eUZvciApIHtcblx0XHRcdGNvbnN0IGlzT3B0aW1hbFRleHRDb2xvckRhcmsgPVxuXHRcdFx0XHRnZXRPcHRpbWFsVGV4dFNoYWRlKCBvcHRpbWl6ZVJlYWRhYmlsaXR5Rm9yICkgPT09ICdkYXJrJztcblxuXHRcdFx0Ly8gU2hvdWxkIG5vdCB1c2UgdGhlbWUgY29sb3JzXG5cdFx0XHRzeC5vcHRpbWFsVGV4dENvbG9yID0gaXNPcHRpbWFsVGV4dENvbG9yRGFya1xuXHRcdFx0XHQ/IGNzcyggeyBjb2xvcjogQ09MT1JTLmdyYXlbIDkwMCBdIH0gKVxuXHRcdFx0XHQ6IGNzcyggeyBjb2xvcjogQ09MT1JTLndoaXRlIH0gKTtcblx0XHR9XG5cblx0XHRyZXR1cm4gY3goXG5cdFx0XHRzdHlsZXMuVGV4dCxcblx0XHRcdHN4LkJhc2UsXG5cdFx0XHRzeC5vcHRpbWFsVGV4dENvbG9yLFxuXHRcdFx0aXNEZXN0cnVjdGl2ZSAmJiBzdHlsZXMuZGVzdHJ1Y3RpdmUsXG5cdFx0XHQhISBpc0hpZ2hsaWdodGVyICYmIHN0eWxlcy5oaWdobGlnaHRlclRleHQsXG5cdFx0XHRpc0Jsb2NrICYmIHN0eWxlcy5ibG9jayxcblx0XHRcdGlzQ2FwdGlvbiAmJiBzdHlsZXMubXV0ZWQsXG5cdFx0XHR2YXJpYW50ICYmIHN0eWxlc1sgdmFyaWFudCBdLFxuXHRcdFx0dXBwZXJDYXNlICYmIHN4LnVwcGVyQ2FzZSxcblx0XHRcdGNsYXNzTmFtZVxuXHRcdCk7XG5cdH0sIFtcblx0XHRhZGp1c3RMaW5lSGVpZ2h0Rm9ySW5uZXJDb250cm9scyxcblx0XHRhbGlnbixcblx0XHRjbGFzc05hbWUsXG5cdFx0Y29sb3IsXG5cdFx0Y3gsXG5cdFx0ZGlzcGxheSxcblx0XHRpc0Jsb2NrLFxuXHRcdGlzQ2FwdGlvbixcblx0XHRpc0Rlc3RydWN0aXZlLFxuXHRcdGlzSGlnaGxpZ2h0ZXIsXG5cdFx0bGV0dGVyU3BhY2luZyxcblx0XHRsaW5lSGVpZ2h0UHJvcCxcblx0XHRvcHRpbWl6ZVJlYWRhYmlsaXR5Rm9yLFxuXHRcdHNpemUsXG5cdFx0dXBwZXJDYXNlLFxuXHRcdHZhcmlhbnQsXG5cdFx0d2VpZ2h0LFxuXHRdICk7XG5cblx0bGV0IGZpbmFsRWxsaXBzaXplTW9kZTogdW5kZWZpbmVkIHwgJ2F1dG8nIHwgJ25vbmUnO1xuXHRpZiAoIHRydW5jYXRlID09PSB0cnVlICkge1xuXHRcdGZpbmFsRWxsaXBzaXplTW9kZSA9ICdhdXRvJztcblx0fVxuXHRpZiAoIHRydW5jYXRlID09PSBmYWxzZSApIHtcblx0XHRmaW5hbEVsbGlwc2l6ZU1vZGUgPSAnbm9uZSc7XG5cdH1cblxuXHRjb25zdCBmaW5hbENvbXBvbmVudFByb3BzID0ge1xuXHRcdC4uLm90aGVyUHJvcHMsXG5cdFx0Y2xhc3NOYW1lOiBjbGFzc2VzLFxuXHRcdGNoaWxkcmVuLFxuXHRcdGVsbGlwc2l6ZU1vZGU6IGVsbGlwc2l6ZU1vZGUgfHwgZmluYWxFbGxpcHNpemVNb2RlLFxuXHR9O1xuXG5cdGNvbnN0IHRydW5jYXRlUHJvcHMgPSB1c2VUcnVuY2F0ZSggZmluYWxDb21wb25lbnRQcm9wcyApO1xuXG5cdC8qKlxuXHQgKiBFbmhhbmNlIGNoaWxkIGA8TGluayAvPmAgY29tcG9uZW50cyB0byBpbmhlcml0IGZvbnQgc2l6ZS5cblx0ICovXG5cdGlmICggISB0cnVuY2F0ZSAmJiBBcnJheS5pc0FycmF5KCBjaGlsZHJlbiApICkge1xuXHRcdGNvbnRlbnQgPSBDaGlsZHJlbi5tYXAoIGNoaWxkcmVuLCAoIGNoaWxkICkgPT4ge1xuXHRcdFx0aWYgKFxuXHRcdFx0XHR0eXBlb2YgY2hpbGQgIT09ICdvYmplY3QnIHx8XG5cdFx0XHRcdGNoaWxkID09PSBudWxsIHx8XG5cdFx0XHRcdCEgKCAncHJvcHMnIGluIGNoaWxkIClcblx0XHRcdCkge1xuXHRcdFx0XHRyZXR1cm4gY2hpbGQ7XG5cdFx0XHR9XG5cblx0XHRcdGNvbnN0IGlzTGluayA9IGhhc0Nvbm5lY3ROYW1lc3BhY2UoIGNoaWxkLCBbICdMaW5rJyBdICk7XG5cdFx0XHRpZiAoIGlzTGluayApIHtcblx0XHRcdFx0cmV0dXJuIGNsb25lRWxlbWVudCggY2hpbGQsIHtcblx0XHRcdFx0XHRzaXplOiBjaGlsZC5wcm9wcy5zaXplIHx8ICdpbmhlcml0Jyxcblx0XHRcdFx0fSApO1xuXHRcdFx0fVxuXG5cdFx0XHRyZXR1cm4gY2hpbGQ7XG5cdFx0fSApO1xuXHR9XG5cblx0cmV0dXJuIHtcblx0XHQuLi50cnVuY2F0ZVByb3BzLFxuXHRcdGNoaWxkcmVuOiB0cnVuY2F0ZSA/IHRydW5jYXRlUHJvcHMuY2hpbGRyZW4gOiBjb250ZW50LFxuXHR9O1xufVxuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__5
  };
  function useText(props) {
    const {
      adjustLineHeightForInnerControls,
      align,
      children,
      className: className2,
      color: color2,
      ellipsizeMode,
      isDestructive = false,
      display,
      highlightEscape = false,
      highlightCaseSensitive = false,
      highlightWords,
      highlightSanitize,
      isBlock = false,
      letterSpacing,
      lineHeight: lineHeightProp,
      optimizeReadabilityFor,
      size: size3,
      truncate = false,
      upperCase: upperCase2 = false,
      variant,
      weight = config_values_default.fontWeight,
      ...otherProps
    } = useContextSystem(props, "Text");
    let content = children;
    const isHighlighter = Array.isArray(highlightWords);
    const isCaption = size3 === "caption";
    if (isHighlighter) {
      if (typeof children !== "string") {
        throw new TypeError("`children` of `Text` must only be `string` types when `highlightWords` is defined");
      }
      content = createHighlighterText({
        autoEscape: highlightEscape,
        children,
        caseSensitive: highlightCaseSensitive,
        searchWords: highlightWords,
        sanitize: highlightSanitize
      });
    }
    const cx3 = useCx();
    const classes = (0, import_element25.useMemo)(() => {
      const sx = {};
      const lineHeight = getLineHeight(adjustLineHeightForInnerControls, lineHeightProp);
      sx.Base = /* @__PURE__ */ css({
        color: color2,
        display,
        fontSize: getFontSize(size3),
        fontWeight: weight,
        lineHeight,
        letterSpacing,
        textAlign: align
      }, false ? "" : ";label:sx-Base;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBd0ZZIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFNlcmlhbGl6ZWRTdHlsZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogV29yZFByZXNzIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyB1c2VNZW1vLCBDaGlsZHJlbiwgY2xvbmVFbGVtZW50IH0gZnJvbSAnQHdvcmRwcmVzcy9lbGVtZW50JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBXb3JkUHJlc3NDb21wb25lbnRQcm9wcyB9IGZyb20gJy4uL2NvbnRleHQnO1xuaW1wb3J0IHsgaGFzQ29ubmVjdE5hbWVzcGFjZSwgdXNlQ29udGV4dFN5c3RlbSB9IGZyb20gJy4uL2NvbnRleHQnO1xuaW1wb3J0IHsgdXNlVHJ1bmNhdGUgfSBmcm9tICcuLi90cnVuY2F0ZSc7XG5pbXBvcnQgeyBnZXRPcHRpbWFsVGV4dFNoYWRlIH0gZnJvbSAnLi4vdXRpbHMvY29sb3JzJztcbmltcG9ydCAqIGFzIHN0eWxlcyBmcm9tICcuL3N0eWxlcyc7XG5pbXBvcnQgeyBjcmVhdGVIaWdobGlnaHRlclRleHQgfSBmcm9tICcuL3V0aWxzJztcbmltcG9ydCB7IGdldEZvbnRTaXplIH0gZnJvbSAnLi4vdXRpbHMvZm9udC1zaXplJztcbmltcG9ydCB7IENPTkZJRywgQ09MT1JTIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgZ2V0TGluZUhlaWdodCB9IGZyb20gJy4vZ2V0LWxpbmUtaGVpZ2h0JztcbmltcG9ydCB7IHVzZUN4IH0gZnJvbSAnLi4vdXRpbHMvaG9va3MvdXNlLWN4JztcbmltcG9ydCB0eXBlIHsgUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcbmltcG9ydCB0eXBlIFJlYWN0IGZyb20gJ3JlYWN0JztcblxuLyoqXG4gKiBAcGFyYW0ge2ltcG9ydCgnLi4vY29udGV4dCcpLldvcmRQcmVzc0NvbXBvbmVudFByb3BzPGltcG9ydCgnLi90eXBlcycpLlByb3BzLCAnc3Bhbic+fSBwcm9wc1xuICovXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiB1c2VUZXh0KFxuXHRwcm9wczogV29yZFByZXNzQ29tcG9uZW50UHJvcHM8IFByb3BzLCAnc3BhbicgPlxuKSB7XG5cdGNvbnN0IHtcblx0XHRhZGp1c3RMaW5lSGVpZ2h0Rm9ySW5uZXJDb250cm9scyxcblx0XHRhbGlnbixcblx0XHRjaGlsZHJlbixcblx0XHRjbGFzc05hbWUsXG5cdFx0Y29sb3IsXG5cdFx0ZWxsaXBzaXplTW9kZSxcblx0XHRpc0Rlc3RydWN0aXZlID0gZmFsc2UsXG5cdFx0ZGlzcGxheSxcblx0XHRoaWdobGlnaHRFc2NhcGUgPSBmYWxzZSxcblx0XHRoaWdobGlnaHRDYXNlU2Vuc2l0aXZlID0gZmFsc2UsXG5cdFx0aGlnaGxpZ2h0V29yZHMsXG5cdFx0aGlnaGxpZ2h0U2FuaXRpemUsXG5cdFx0aXNCbG9jayA9IGZhbHNlLFxuXHRcdGxldHRlclNwYWNpbmcsXG5cdFx0bGluZUhlaWdodDogbGluZUhlaWdodFByb3AsXG5cdFx0b3B0aW1pemVSZWFkYWJpbGl0eUZvcixcblx0XHRzaXplLFxuXHRcdHRydW5jYXRlID0gZmFsc2UsXG5cdFx0dXBwZXJDYXNlID0gZmFsc2UsXG5cdFx0dmFyaWFudCxcblx0XHR3ZWlnaHQgPSBDT05GSUcuZm9udFdlaWdodCxcblx0XHQuLi5vdGhlclByb3BzXG5cdH0gPSB1c2VDb250ZXh0U3lzdGVtKCBwcm9wcywgJ1RleHQnICk7XG5cblx0bGV0IGNvbnRlbnQ6IFJlYWN0LlJlYWN0Tm9kZSA9IGNoaWxkcmVuO1xuXHRjb25zdCBpc0hpZ2hsaWdodGVyID0gQXJyYXkuaXNBcnJheSggaGlnaGxpZ2h0V29yZHMgKTtcblx0Y29uc3QgaXNDYXB0aW9uID0gc2l6ZSA9PT0gJ2NhcHRpb24nO1xuXG5cdGlmICggaXNIaWdobGlnaHRlciApIHtcblx0XHRpZiAoIHR5cGVvZiBjaGlsZHJlbiAhPT0gJ3N0cmluZycgKSB7XG5cdFx0XHR0aHJvdyBuZXcgVHlwZUVycm9yKFxuXHRcdFx0XHQnYGNoaWxkcmVuYCBvZiBgVGV4dGAgbXVzdCBvbmx5IGJlIGBzdHJpbmdgIHR5cGVzIHdoZW4gYGhpZ2hsaWdodFdvcmRzYCBpcyBkZWZpbmVkJ1xuXHRcdFx0KTtcblx0XHR9XG5cblx0XHRjb250ZW50ID0gY3JlYXRlSGlnaGxpZ2h0ZXJUZXh0KCB7XG5cdFx0XHRhdXRvRXNjYXBlOiBoaWdobGlnaHRFc2NhcGUsXG5cdFx0XHRjaGlsZHJlbixcblx0XHRcdGNhc2VTZW5zaXRpdmU6IGhpZ2hsaWdodENhc2VTZW5zaXRpdmUsXG5cdFx0XHRzZWFyY2hXb3JkczogaGlnaGxpZ2h0V29yZHMsXG5cdFx0XHRzYW5pdGl6ZTogaGlnaGxpZ2h0U2FuaXRpemUsXG5cdFx0fSApO1xuXHR9XG5cblx0Y29uc3QgY3ggPSB1c2VDeCgpO1xuXG5cdGNvbnN0IGNsYXNzZXMgPSB1c2VNZW1vKCAoKSA9PiB7XG5cdFx0Y29uc3Qgc3g6IFJlY29yZDwgc3RyaW5nLCBTZXJpYWxpemVkU3R5bGVzIHwgbnVsbCA+ID0ge307XG5cblx0XHRjb25zdCBsaW5lSGVpZ2h0ID0gZ2V0TGluZUhlaWdodChcblx0XHRcdGFkanVzdExpbmVIZWlnaHRGb3JJbm5lckNvbnRyb2xzLFxuXHRcdFx0bGluZUhlaWdodFByb3Bcblx0XHQpO1xuXG5cdFx0c3guQmFzZSA9IGNzcygge1xuXHRcdFx0Y29sb3IsXG5cdFx0XHRkaXNwbGF5LFxuXHRcdFx0Zm9udFNpemU6IGdldEZvbnRTaXplKCBzaXplICksXG5cdFx0XHRmb250V2VpZ2h0OiB3ZWlnaHQsXG5cdFx0XHRsaW5lSGVpZ2h0LFxuXHRcdFx0bGV0dGVyU3BhY2luZyxcblx0XHRcdHRleHRBbGlnbjogYWxpZ24sXG5cdFx0fSApO1xuXG5cdFx0c3gudXBwZXJDYXNlID0gY3NzKCB7IHRleHRUcmFuc2Zvcm06ICd1cHBlcmNhc2UnIH0gKTtcblxuXHRcdHN4Lm9wdGltYWxUZXh0Q29sb3IgPSBudWxsO1xuXG5cdFx0aWYgKCBvcHRpbWl6ZVJlYWRhYmlsaXR5Rm9yICkge1xuXHRcdFx0Y29uc3QgaXNPcHRpbWFsVGV4dENvbG9yRGFyayA9XG5cdFx0XHRcdGdldE9wdGltYWxUZXh0U2hhZGUoIG9wdGltaXplUmVhZGFiaWxpdHlGb3IgKSA9PT0gJ2RhcmsnO1xuXG5cdFx0XHQvLyBTaG91bGQgbm90IHVzZSB0aGVtZSBjb2xvcnNcblx0XHRcdHN4Lm9wdGltYWxUZXh0Q29sb3IgPSBpc09wdGltYWxUZXh0Q29sb3JEYXJrXG5cdFx0XHRcdD8gY3NzKCB7IGNvbG9yOiBDT0xPUlMuZ3JheVsgOTAwIF0gfSApXG5cdFx0XHRcdDogY3NzKCB7IGNvbG9yOiBDT0xPUlMud2hpdGUgfSApO1xuXHRcdH1cblxuXHRcdHJldHVybiBjeChcblx0XHRcdHN0eWxlcy5UZXh0LFxuXHRcdFx0c3guQmFzZSxcblx0XHRcdHN4Lm9wdGltYWxUZXh0Q29sb3IsXG5cdFx0XHRpc0Rlc3RydWN0aXZlICYmIHN0eWxlcy5kZXN0cnVjdGl2ZSxcblx0XHRcdCEhIGlzSGlnaGxpZ2h0ZXIgJiYgc3R5bGVzLmhpZ2hsaWdodGVyVGV4dCxcblx0XHRcdGlzQmxvY2sgJiYgc3R5bGVzLmJsb2NrLFxuXHRcdFx0aXNDYXB0aW9uICYmIHN0eWxlcy5tdXRlZCxcblx0XHRcdHZhcmlhbnQgJiYgc3R5bGVzWyB2YXJpYW50IF0sXG5cdFx0XHR1cHBlckNhc2UgJiYgc3gudXBwZXJDYXNlLFxuXHRcdFx0Y2xhc3NOYW1lXG5cdFx0KTtcblx0fSwgW1xuXHRcdGFkanVzdExpbmVIZWlnaHRGb3JJbm5lckNvbnRyb2xzLFxuXHRcdGFsaWduLFxuXHRcdGNsYXNzTmFtZSxcblx0XHRjb2xvcixcblx0XHRjeCxcblx0XHRkaXNwbGF5LFxuXHRcdGlzQmxvY2ssXG5cdFx0aXNDYXB0aW9uLFxuXHRcdGlzRGVzdHJ1Y3RpdmUsXG5cdFx0aXNIaWdobGlnaHRlcixcblx0XHRsZXR0ZXJTcGFjaW5nLFxuXHRcdGxpbmVIZWlnaHRQcm9wLFxuXHRcdG9wdGltaXplUmVhZGFiaWxpdHlGb3IsXG5cdFx0c2l6ZSxcblx0XHR1cHBlckNhc2UsXG5cdFx0dmFyaWFudCxcblx0XHR3ZWlnaHQsXG5cdF0gKTtcblxuXHRsZXQgZmluYWxFbGxpcHNpemVNb2RlOiB1bmRlZmluZWQgfCAnYXV0bycgfCAnbm9uZSc7XG5cdGlmICggdHJ1bmNhdGUgPT09IHRydWUgKSB7XG5cdFx0ZmluYWxFbGxpcHNpemVNb2RlID0gJ2F1dG8nO1xuXHR9XG5cdGlmICggdHJ1bmNhdGUgPT09IGZhbHNlICkge1xuXHRcdGZpbmFsRWxsaXBzaXplTW9kZSA9ICdub25lJztcblx0fVxuXG5cdGNvbnN0IGZpbmFsQ29tcG9uZW50UHJvcHMgPSB7XG5cdFx0Li4ub3RoZXJQcm9wcyxcblx0XHRjbGFzc05hbWU6IGNsYXNzZXMsXG5cdFx0Y2hpbGRyZW4sXG5cdFx0ZWxsaXBzaXplTW9kZTogZWxsaXBzaXplTW9kZSB8fCBmaW5hbEVsbGlwc2l6ZU1vZGUsXG5cdH07XG5cblx0Y29uc3QgdHJ1bmNhdGVQcm9wcyA9IHVzZVRydW5jYXRlKCBmaW5hbENvbXBvbmVudFByb3BzICk7XG5cblx0LyoqXG5cdCAqIEVuaGFuY2UgY2hpbGQgYDxMaW5rIC8+YCBjb21wb25lbnRzIHRvIGluaGVyaXQgZm9udCBzaXplLlxuXHQgKi9cblx0aWYgKCAhIHRydW5jYXRlICYmIEFycmF5LmlzQXJyYXkoIGNoaWxkcmVuICkgKSB7XG5cdFx0Y29udGVudCA9IENoaWxkcmVuLm1hcCggY2hpbGRyZW4sICggY2hpbGQgKSA9PiB7XG5cdFx0XHRpZiAoXG5cdFx0XHRcdHR5cGVvZiBjaGlsZCAhPT0gJ29iamVjdCcgfHxcblx0XHRcdFx0Y2hpbGQgPT09IG51bGwgfHxcblx0XHRcdFx0ISAoICdwcm9wcycgaW4gY2hpbGQgKVxuXHRcdFx0KSB7XG5cdFx0XHRcdHJldHVybiBjaGlsZDtcblx0XHRcdH1cblxuXHRcdFx0Y29uc3QgaXNMaW5rID0gaGFzQ29ubmVjdE5hbWVzcGFjZSggY2hpbGQsIFsgJ0xpbmsnIF0gKTtcblx0XHRcdGlmICggaXNMaW5rICkge1xuXHRcdFx0XHRyZXR1cm4gY2xvbmVFbGVtZW50KCBjaGlsZCwge1xuXHRcdFx0XHRcdHNpemU6IGNoaWxkLnByb3BzLnNpemUgfHwgJ2luaGVyaXQnLFxuXHRcdFx0XHR9ICk7XG5cdFx0XHR9XG5cblx0XHRcdHJldHVybiBjaGlsZDtcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4ge1xuXHRcdC4uLnRydW5jYXRlUHJvcHMsXG5cdFx0Y2hpbGRyZW46IHRydW5jYXRlID8gdHJ1bmNhdGVQcm9wcy5jaGlsZHJlbiA6IGNvbnRlbnQsXG5cdH07XG59XG4iXX0= */");
      sx.upperCase = _ref;
      sx.optimalTextColor = null;
      if (optimizeReadabilityFor) {
        const isOptimalTextColorDark = getOptimalTextShade(optimizeReadabilityFor) === "dark";
        sx.optimalTextColor = isOptimalTextColorDark ? /* @__PURE__ */ css({
          color: COLORS.gray[900]
        }, false ? "" : ";label:sx-optimalTextColor;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNEdNIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFNlcmlhbGl6ZWRTdHlsZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogV29yZFByZXNzIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyB1c2VNZW1vLCBDaGlsZHJlbiwgY2xvbmVFbGVtZW50IH0gZnJvbSAnQHdvcmRwcmVzcy9lbGVtZW50JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBXb3JkUHJlc3NDb21wb25lbnRQcm9wcyB9IGZyb20gJy4uL2NvbnRleHQnO1xuaW1wb3J0IHsgaGFzQ29ubmVjdE5hbWVzcGFjZSwgdXNlQ29udGV4dFN5c3RlbSB9IGZyb20gJy4uL2NvbnRleHQnO1xuaW1wb3J0IHsgdXNlVHJ1bmNhdGUgfSBmcm9tICcuLi90cnVuY2F0ZSc7XG5pbXBvcnQgeyBnZXRPcHRpbWFsVGV4dFNoYWRlIH0gZnJvbSAnLi4vdXRpbHMvY29sb3JzJztcbmltcG9ydCAqIGFzIHN0eWxlcyBmcm9tICcuL3N0eWxlcyc7XG5pbXBvcnQgeyBjcmVhdGVIaWdobGlnaHRlclRleHQgfSBmcm9tICcuL3V0aWxzJztcbmltcG9ydCB7IGdldEZvbnRTaXplIH0gZnJvbSAnLi4vdXRpbHMvZm9udC1zaXplJztcbmltcG9ydCB7IENPTkZJRywgQ09MT1JTIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgZ2V0TGluZUhlaWdodCB9IGZyb20gJy4vZ2V0LWxpbmUtaGVpZ2h0JztcbmltcG9ydCB7IHVzZUN4IH0gZnJvbSAnLi4vdXRpbHMvaG9va3MvdXNlLWN4JztcbmltcG9ydCB0eXBlIHsgUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcbmltcG9ydCB0eXBlIFJlYWN0IGZyb20gJ3JlYWN0JztcblxuLyoqXG4gKiBAcGFyYW0ge2ltcG9ydCgnLi4vY29udGV4dCcpLldvcmRQcmVzc0NvbXBvbmVudFByb3BzPGltcG9ydCgnLi90eXBlcycpLlByb3BzLCAnc3Bhbic+fSBwcm9wc1xuICovXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiB1c2VUZXh0KFxuXHRwcm9wczogV29yZFByZXNzQ29tcG9uZW50UHJvcHM8IFByb3BzLCAnc3BhbicgPlxuKSB7XG5cdGNvbnN0IHtcblx0XHRhZGp1c3RMaW5lSGVpZ2h0Rm9ySW5uZXJDb250cm9scyxcblx0XHRhbGlnbixcblx0XHRjaGlsZHJlbixcblx0XHRjbGFzc05hbWUsXG5cdFx0Y29sb3IsXG5cdFx0ZWxsaXBzaXplTW9kZSxcblx0XHRpc0Rlc3RydWN0aXZlID0gZmFsc2UsXG5cdFx0ZGlzcGxheSxcblx0XHRoaWdobGlnaHRFc2NhcGUgPSBmYWxzZSxcblx0XHRoaWdobGlnaHRDYXNlU2Vuc2l0aXZlID0gZmFsc2UsXG5cdFx0aGlnaGxpZ2h0V29yZHMsXG5cdFx0aGlnaGxpZ2h0U2FuaXRpemUsXG5cdFx0aXNCbG9jayA9IGZhbHNlLFxuXHRcdGxldHRlclNwYWNpbmcsXG5cdFx0bGluZUhlaWdodDogbGluZUhlaWdodFByb3AsXG5cdFx0b3B0aW1pemVSZWFkYWJpbGl0eUZvcixcblx0XHRzaXplLFxuXHRcdHRydW5jYXRlID0gZmFsc2UsXG5cdFx0dXBwZXJDYXNlID0gZmFsc2UsXG5cdFx0dmFyaWFudCxcblx0XHR3ZWlnaHQgPSBDT05GSUcuZm9udFdlaWdodCxcblx0XHQuLi5vdGhlclByb3BzXG5cdH0gPSB1c2VDb250ZXh0U3lzdGVtKCBwcm9wcywgJ1RleHQnICk7XG5cblx0bGV0IGNvbnRlbnQ6IFJlYWN0LlJlYWN0Tm9kZSA9IGNoaWxkcmVuO1xuXHRjb25zdCBpc0hpZ2hsaWdodGVyID0gQXJyYXkuaXNBcnJheSggaGlnaGxpZ2h0V29yZHMgKTtcblx0Y29uc3QgaXNDYXB0aW9uID0gc2l6ZSA9PT0gJ2NhcHRpb24nO1xuXG5cdGlmICggaXNIaWdobGlnaHRlciApIHtcblx0XHRpZiAoIHR5cGVvZiBjaGlsZHJlbiAhPT0gJ3N0cmluZycgKSB7XG5cdFx0XHR0aHJvdyBuZXcgVHlwZUVycm9yKFxuXHRcdFx0XHQnYGNoaWxkcmVuYCBvZiBgVGV4dGAgbXVzdCBvbmx5IGJlIGBzdHJpbmdgIHR5cGVzIHdoZW4gYGhpZ2hsaWdodFdvcmRzYCBpcyBkZWZpbmVkJ1xuXHRcdFx0KTtcblx0XHR9XG5cblx0XHRjb250ZW50ID0gY3JlYXRlSGlnaGxpZ2h0ZXJUZXh0KCB7XG5cdFx0XHRhdXRvRXNjYXBlOiBoaWdobGlnaHRFc2NhcGUsXG5cdFx0XHRjaGlsZHJlbixcblx0XHRcdGNhc2VTZW5zaXRpdmU6IGhpZ2hsaWdodENhc2VTZW5zaXRpdmUsXG5cdFx0XHRzZWFyY2hXb3JkczogaGlnaGxpZ2h0V29yZHMsXG5cdFx0XHRzYW5pdGl6ZTogaGlnaGxpZ2h0U2FuaXRpemUsXG5cdFx0fSApO1xuXHR9XG5cblx0Y29uc3QgY3ggPSB1c2VDeCgpO1xuXG5cdGNvbnN0IGNsYXNzZXMgPSB1c2VNZW1vKCAoKSA9PiB7XG5cdFx0Y29uc3Qgc3g6IFJlY29yZDwgc3RyaW5nLCBTZXJpYWxpemVkU3R5bGVzIHwgbnVsbCA+ID0ge307XG5cblx0XHRjb25zdCBsaW5lSGVpZ2h0ID0gZ2V0TGluZUhlaWdodChcblx0XHRcdGFkanVzdExpbmVIZWlnaHRGb3JJbm5lckNvbnRyb2xzLFxuXHRcdFx0bGluZUhlaWdodFByb3Bcblx0XHQpO1xuXG5cdFx0c3guQmFzZSA9IGNzcygge1xuXHRcdFx0Y29sb3IsXG5cdFx0XHRkaXNwbGF5LFxuXHRcdFx0Zm9udFNpemU6IGdldEZvbnRTaXplKCBzaXplICksXG5cdFx0XHRmb250V2VpZ2h0OiB3ZWlnaHQsXG5cdFx0XHRsaW5lSGVpZ2h0LFxuXHRcdFx0bGV0dGVyU3BhY2luZyxcblx0XHRcdHRleHRBbGlnbjogYWxpZ24sXG5cdFx0fSApO1xuXG5cdFx0c3gudXBwZXJDYXNlID0gY3NzKCB7IHRleHRUcmFuc2Zvcm06ICd1cHBlcmNhc2UnIH0gKTtcblxuXHRcdHN4Lm9wdGltYWxUZXh0Q29sb3IgPSBudWxsO1xuXG5cdFx0aWYgKCBvcHRpbWl6ZVJlYWRhYmlsaXR5Rm9yICkge1xuXHRcdFx0Y29uc3QgaXNPcHRpbWFsVGV4dENvbG9yRGFyayA9XG5cdFx0XHRcdGdldE9wdGltYWxUZXh0U2hhZGUoIG9wdGltaXplUmVhZGFiaWxpdHlGb3IgKSA9PT0gJ2RhcmsnO1xuXG5cdFx0XHQvLyBTaG91bGQgbm90IHVzZSB0aGVtZSBjb2xvcnNcblx0XHRcdHN4Lm9wdGltYWxUZXh0Q29sb3IgPSBpc09wdGltYWxUZXh0Q29sb3JEYXJrXG5cdFx0XHRcdD8gY3NzKCB7IGNvbG9yOiBDT0xPUlMuZ3JheVsgOTAwIF0gfSApXG5cdFx0XHRcdDogY3NzKCB7IGNvbG9yOiBDT0xPUlMud2hpdGUgfSApO1xuXHRcdH1cblxuXHRcdHJldHVybiBjeChcblx0XHRcdHN0eWxlcy5UZXh0LFxuXHRcdFx0c3guQmFzZSxcblx0XHRcdHN4Lm9wdGltYWxUZXh0Q29sb3IsXG5cdFx0XHRpc0Rlc3RydWN0aXZlICYmIHN0eWxlcy5kZXN0cnVjdGl2ZSxcblx0XHRcdCEhIGlzSGlnaGxpZ2h0ZXIgJiYgc3R5bGVzLmhpZ2hsaWdodGVyVGV4dCxcblx0XHRcdGlzQmxvY2sgJiYgc3R5bGVzLmJsb2NrLFxuXHRcdFx0aXNDYXB0aW9uICYmIHN0eWxlcy5tdXRlZCxcblx0XHRcdHZhcmlhbnQgJiYgc3R5bGVzWyB2YXJpYW50IF0sXG5cdFx0XHR1cHBlckNhc2UgJiYgc3gudXBwZXJDYXNlLFxuXHRcdFx0Y2xhc3NOYW1lXG5cdFx0KTtcblx0fSwgW1xuXHRcdGFkanVzdExpbmVIZWlnaHRGb3JJbm5lckNvbnRyb2xzLFxuXHRcdGFsaWduLFxuXHRcdGNsYXNzTmFtZSxcblx0XHRjb2xvcixcblx0XHRjeCxcblx0XHRkaXNwbGF5LFxuXHRcdGlzQmxvY2ssXG5cdFx0aXNDYXB0aW9uLFxuXHRcdGlzRGVzdHJ1Y3RpdmUsXG5cdFx0aXNIaWdobGlnaHRlcixcblx0XHRsZXR0ZXJTcGFjaW5nLFxuXHRcdGxpbmVIZWlnaHRQcm9wLFxuXHRcdG9wdGltaXplUmVhZGFiaWxpdHlGb3IsXG5cdFx0c2l6ZSxcblx0XHR1cHBlckNhc2UsXG5cdFx0dmFyaWFudCxcblx0XHR3ZWlnaHQsXG5cdF0gKTtcblxuXHRsZXQgZmluYWxFbGxpcHNpemVNb2RlOiB1bmRlZmluZWQgfCAnYXV0bycgfCAnbm9uZSc7XG5cdGlmICggdHJ1bmNhdGUgPT09IHRydWUgKSB7XG5cdFx0ZmluYWxFbGxpcHNpemVNb2RlID0gJ2F1dG8nO1xuXHR9XG5cdGlmICggdHJ1bmNhdGUgPT09IGZhbHNlICkge1xuXHRcdGZpbmFsRWxsaXBzaXplTW9kZSA9ICdub25lJztcblx0fVxuXG5cdGNvbnN0IGZpbmFsQ29tcG9uZW50UHJvcHMgPSB7XG5cdFx0Li4ub3RoZXJQcm9wcyxcblx0XHRjbGFzc05hbWU6IGNsYXNzZXMsXG5cdFx0Y2hpbGRyZW4sXG5cdFx0ZWxsaXBzaXplTW9kZTogZWxsaXBzaXplTW9kZSB8fCBmaW5hbEVsbGlwc2l6ZU1vZGUsXG5cdH07XG5cblx0Y29uc3QgdHJ1bmNhdGVQcm9wcyA9IHVzZVRydW5jYXRlKCBmaW5hbENvbXBvbmVudFByb3BzICk7XG5cblx0LyoqXG5cdCAqIEVuaGFuY2UgY2hpbGQgYDxMaW5rIC8+YCBjb21wb25lbnRzIHRvIGluaGVyaXQgZm9udCBzaXplLlxuXHQgKi9cblx0aWYgKCAhIHRydW5jYXRlICYmIEFycmF5LmlzQXJyYXkoIGNoaWxkcmVuICkgKSB7XG5cdFx0Y29udGVudCA9IENoaWxkcmVuLm1hcCggY2hpbGRyZW4sICggY2hpbGQgKSA9PiB7XG5cdFx0XHRpZiAoXG5cdFx0XHRcdHR5cGVvZiBjaGlsZCAhPT0gJ29iamVjdCcgfHxcblx0XHRcdFx0Y2hpbGQgPT09IG51bGwgfHxcblx0XHRcdFx0ISAoICdwcm9wcycgaW4gY2hpbGQgKVxuXHRcdFx0KSB7XG5cdFx0XHRcdHJldHVybiBjaGlsZDtcblx0XHRcdH1cblxuXHRcdFx0Y29uc3QgaXNMaW5rID0gaGFzQ29ubmVjdE5hbWVzcGFjZSggY2hpbGQsIFsgJ0xpbmsnIF0gKTtcblx0XHRcdGlmICggaXNMaW5rICkge1xuXHRcdFx0XHRyZXR1cm4gY2xvbmVFbGVtZW50KCBjaGlsZCwge1xuXHRcdFx0XHRcdHNpemU6IGNoaWxkLnByb3BzLnNpemUgfHwgJ2luaGVyaXQnLFxuXHRcdFx0XHR9ICk7XG5cdFx0XHR9XG5cblx0XHRcdHJldHVybiBjaGlsZDtcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4ge1xuXHRcdC4uLnRydW5jYXRlUHJvcHMsXG5cdFx0Y2hpbGRyZW46IHRydW5jYXRlID8gdHJ1bmNhdGVQcm9wcy5jaGlsZHJlbiA6IGNvbnRlbnQsXG5cdH07XG59XG4iXX0= */") : /* @__PURE__ */ css({
          color: COLORS.white
        }, false ? "" : ";label:sx-optimalTextColor;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNkdNIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFNlcmlhbGl6ZWRTdHlsZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogV29yZFByZXNzIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyB1c2VNZW1vLCBDaGlsZHJlbiwgY2xvbmVFbGVtZW50IH0gZnJvbSAnQHdvcmRwcmVzcy9lbGVtZW50JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBXb3JkUHJlc3NDb21wb25lbnRQcm9wcyB9IGZyb20gJy4uL2NvbnRleHQnO1xuaW1wb3J0IHsgaGFzQ29ubmVjdE5hbWVzcGFjZSwgdXNlQ29udGV4dFN5c3RlbSB9IGZyb20gJy4uL2NvbnRleHQnO1xuaW1wb3J0IHsgdXNlVHJ1bmNhdGUgfSBmcm9tICcuLi90cnVuY2F0ZSc7XG5pbXBvcnQgeyBnZXRPcHRpbWFsVGV4dFNoYWRlIH0gZnJvbSAnLi4vdXRpbHMvY29sb3JzJztcbmltcG9ydCAqIGFzIHN0eWxlcyBmcm9tICcuL3N0eWxlcyc7XG5pbXBvcnQgeyBjcmVhdGVIaWdobGlnaHRlclRleHQgfSBmcm9tICcuL3V0aWxzJztcbmltcG9ydCB7IGdldEZvbnRTaXplIH0gZnJvbSAnLi4vdXRpbHMvZm9udC1zaXplJztcbmltcG9ydCB7IENPTkZJRywgQ09MT1JTIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgZ2V0TGluZUhlaWdodCB9IGZyb20gJy4vZ2V0LWxpbmUtaGVpZ2h0JztcbmltcG9ydCB7IHVzZUN4IH0gZnJvbSAnLi4vdXRpbHMvaG9va3MvdXNlLWN4JztcbmltcG9ydCB0eXBlIHsgUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcbmltcG9ydCB0eXBlIFJlYWN0IGZyb20gJ3JlYWN0JztcblxuLyoqXG4gKiBAcGFyYW0ge2ltcG9ydCgnLi4vY29udGV4dCcpLldvcmRQcmVzc0NvbXBvbmVudFByb3BzPGltcG9ydCgnLi90eXBlcycpLlByb3BzLCAnc3Bhbic+fSBwcm9wc1xuICovXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiB1c2VUZXh0KFxuXHRwcm9wczogV29yZFByZXNzQ29tcG9uZW50UHJvcHM8IFByb3BzLCAnc3BhbicgPlxuKSB7XG5cdGNvbnN0IHtcblx0XHRhZGp1c3RMaW5lSGVpZ2h0Rm9ySW5uZXJDb250cm9scyxcblx0XHRhbGlnbixcblx0XHRjaGlsZHJlbixcblx0XHRjbGFzc05hbWUsXG5cdFx0Y29sb3IsXG5cdFx0ZWxsaXBzaXplTW9kZSxcblx0XHRpc0Rlc3RydWN0aXZlID0gZmFsc2UsXG5cdFx0ZGlzcGxheSxcblx0XHRoaWdobGlnaHRFc2NhcGUgPSBmYWxzZSxcblx0XHRoaWdobGlnaHRDYXNlU2Vuc2l0aXZlID0gZmFsc2UsXG5cdFx0aGlnaGxpZ2h0V29yZHMsXG5cdFx0aGlnaGxpZ2h0U2FuaXRpemUsXG5cdFx0aXNCbG9jayA9IGZhbHNlLFxuXHRcdGxldHRlclNwYWNpbmcsXG5cdFx0bGluZUhlaWdodDogbGluZUhlaWdodFByb3AsXG5cdFx0b3B0aW1pemVSZWFkYWJpbGl0eUZvcixcblx0XHRzaXplLFxuXHRcdHRydW5jYXRlID0gZmFsc2UsXG5cdFx0dXBwZXJDYXNlID0gZmFsc2UsXG5cdFx0dmFyaWFudCxcblx0XHR3ZWlnaHQgPSBDT05GSUcuZm9udFdlaWdodCxcblx0XHQuLi5vdGhlclByb3BzXG5cdH0gPSB1c2VDb250ZXh0U3lzdGVtKCBwcm9wcywgJ1RleHQnICk7XG5cblx0bGV0IGNvbnRlbnQ6IFJlYWN0LlJlYWN0Tm9kZSA9IGNoaWxkcmVuO1xuXHRjb25zdCBpc0hpZ2hsaWdodGVyID0gQXJyYXkuaXNBcnJheSggaGlnaGxpZ2h0V29yZHMgKTtcblx0Y29uc3QgaXNDYXB0aW9uID0gc2l6ZSA9PT0gJ2NhcHRpb24nO1xuXG5cdGlmICggaXNIaWdobGlnaHRlciApIHtcblx0XHRpZiAoIHR5cGVvZiBjaGlsZHJlbiAhPT0gJ3N0cmluZycgKSB7XG5cdFx0XHR0aHJvdyBuZXcgVHlwZUVycm9yKFxuXHRcdFx0XHQnYGNoaWxkcmVuYCBvZiBgVGV4dGAgbXVzdCBvbmx5IGJlIGBzdHJpbmdgIHR5cGVzIHdoZW4gYGhpZ2hsaWdodFdvcmRzYCBpcyBkZWZpbmVkJ1xuXHRcdFx0KTtcblx0XHR9XG5cblx0XHRjb250ZW50ID0gY3JlYXRlSGlnaGxpZ2h0ZXJUZXh0KCB7XG5cdFx0XHRhdXRvRXNjYXBlOiBoaWdobGlnaHRFc2NhcGUsXG5cdFx0XHRjaGlsZHJlbixcblx0XHRcdGNhc2VTZW5zaXRpdmU6IGhpZ2hsaWdodENhc2VTZW5zaXRpdmUsXG5cdFx0XHRzZWFyY2hXb3JkczogaGlnaGxpZ2h0V29yZHMsXG5cdFx0XHRzYW5pdGl6ZTogaGlnaGxpZ2h0U2FuaXRpemUsXG5cdFx0fSApO1xuXHR9XG5cblx0Y29uc3QgY3ggPSB1c2VDeCgpO1xuXG5cdGNvbnN0IGNsYXNzZXMgPSB1c2VNZW1vKCAoKSA9PiB7XG5cdFx0Y29uc3Qgc3g6IFJlY29yZDwgc3RyaW5nLCBTZXJpYWxpemVkU3R5bGVzIHwgbnVsbCA+ID0ge307XG5cblx0XHRjb25zdCBsaW5lSGVpZ2h0ID0gZ2V0TGluZUhlaWdodChcblx0XHRcdGFkanVzdExpbmVIZWlnaHRGb3JJbm5lckNvbnRyb2xzLFxuXHRcdFx0bGluZUhlaWdodFByb3Bcblx0XHQpO1xuXG5cdFx0c3guQmFzZSA9IGNzcygge1xuXHRcdFx0Y29sb3IsXG5cdFx0XHRkaXNwbGF5LFxuXHRcdFx0Zm9udFNpemU6IGdldEZvbnRTaXplKCBzaXplICksXG5cdFx0XHRmb250V2VpZ2h0OiB3ZWlnaHQsXG5cdFx0XHRsaW5lSGVpZ2h0LFxuXHRcdFx0bGV0dGVyU3BhY2luZyxcblx0XHRcdHRleHRBbGlnbjogYWxpZ24sXG5cdFx0fSApO1xuXG5cdFx0c3gudXBwZXJDYXNlID0gY3NzKCB7IHRleHRUcmFuc2Zvcm06ICd1cHBlcmNhc2UnIH0gKTtcblxuXHRcdHN4Lm9wdGltYWxUZXh0Q29sb3IgPSBudWxsO1xuXG5cdFx0aWYgKCBvcHRpbWl6ZVJlYWRhYmlsaXR5Rm9yICkge1xuXHRcdFx0Y29uc3QgaXNPcHRpbWFsVGV4dENvbG9yRGFyayA9XG5cdFx0XHRcdGdldE9wdGltYWxUZXh0U2hhZGUoIG9wdGltaXplUmVhZGFiaWxpdHlGb3IgKSA9PT0gJ2RhcmsnO1xuXG5cdFx0XHQvLyBTaG91bGQgbm90IHVzZSB0aGVtZSBjb2xvcnNcblx0XHRcdHN4Lm9wdGltYWxUZXh0Q29sb3IgPSBpc09wdGltYWxUZXh0Q29sb3JEYXJrXG5cdFx0XHRcdD8gY3NzKCB7IGNvbG9yOiBDT0xPUlMuZ3JheVsgOTAwIF0gfSApXG5cdFx0XHRcdDogY3NzKCB7IGNvbG9yOiBDT0xPUlMud2hpdGUgfSApO1xuXHRcdH1cblxuXHRcdHJldHVybiBjeChcblx0XHRcdHN0eWxlcy5UZXh0LFxuXHRcdFx0c3guQmFzZSxcblx0XHRcdHN4Lm9wdGltYWxUZXh0Q29sb3IsXG5cdFx0XHRpc0Rlc3RydWN0aXZlICYmIHN0eWxlcy5kZXN0cnVjdGl2ZSxcblx0XHRcdCEhIGlzSGlnaGxpZ2h0ZXIgJiYgc3R5bGVzLmhpZ2hsaWdodGVyVGV4dCxcblx0XHRcdGlzQmxvY2sgJiYgc3R5bGVzLmJsb2NrLFxuXHRcdFx0aXNDYXB0aW9uICYmIHN0eWxlcy5tdXRlZCxcblx0XHRcdHZhcmlhbnQgJiYgc3R5bGVzWyB2YXJpYW50IF0sXG5cdFx0XHR1cHBlckNhc2UgJiYgc3gudXBwZXJDYXNlLFxuXHRcdFx0Y2xhc3NOYW1lXG5cdFx0KTtcblx0fSwgW1xuXHRcdGFkanVzdExpbmVIZWlnaHRGb3JJbm5lckNvbnRyb2xzLFxuXHRcdGFsaWduLFxuXHRcdGNsYXNzTmFtZSxcblx0XHRjb2xvcixcblx0XHRjeCxcblx0XHRkaXNwbGF5LFxuXHRcdGlzQmxvY2ssXG5cdFx0aXNDYXB0aW9uLFxuXHRcdGlzRGVzdHJ1Y3RpdmUsXG5cdFx0aXNIaWdobGlnaHRlcixcblx0XHRsZXR0ZXJTcGFjaW5nLFxuXHRcdGxpbmVIZWlnaHRQcm9wLFxuXHRcdG9wdGltaXplUmVhZGFiaWxpdHlGb3IsXG5cdFx0c2l6ZSxcblx0XHR1cHBlckNhc2UsXG5cdFx0dmFyaWFudCxcblx0XHR3ZWlnaHQsXG5cdF0gKTtcblxuXHRsZXQgZmluYWxFbGxpcHNpemVNb2RlOiB1bmRlZmluZWQgfCAnYXV0bycgfCAnbm9uZSc7XG5cdGlmICggdHJ1bmNhdGUgPT09IHRydWUgKSB7XG5cdFx0ZmluYWxFbGxpcHNpemVNb2RlID0gJ2F1dG8nO1xuXHR9XG5cdGlmICggdHJ1bmNhdGUgPT09IGZhbHNlICkge1xuXHRcdGZpbmFsRWxsaXBzaXplTW9kZSA9ICdub25lJztcblx0fVxuXG5cdGNvbnN0IGZpbmFsQ29tcG9uZW50UHJvcHMgPSB7XG5cdFx0Li4ub3RoZXJQcm9wcyxcblx0XHRjbGFzc05hbWU6IGNsYXNzZXMsXG5cdFx0Y2hpbGRyZW4sXG5cdFx0ZWxsaXBzaXplTW9kZTogZWxsaXBzaXplTW9kZSB8fCBmaW5hbEVsbGlwc2l6ZU1vZGUsXG5cdH07XG5cblx0Y29uc3QgdHJ1bmNhdGVQcm9wcyA9IHVzZVRydW5jYXRlKCBmaW5hbENvbXBvbmVudFByb3BzICk7XG5cblx0LyoqXG5cdCAqIEVuaGFuY2UgY2hpbGQgYDxMaW5rIC8+YCBjb21wb25lbnRzIHRvIGluaGVyaXQgZm9udCBzaXplLlxuXHQgKi9cblx0aWYgKCAhIHRydW5jYXRlICYmIEFycmF5LmlzQXJyYXkoIGNoaWxkcmVuICkgKSB7XG5cdFx0Y29udGVudCA9IENoaWxkcmVuLm1hcCggY2hpbGRyZW4sICggY2hpbGQgKSA9PiB7XG5cdFx0XHRpZiAoXG5cdFx0XHRcdHR5cGVvZiBjaGlsZCAhPT0gJ29iamVjdCcgfHxcblx0XHRcdFx0Y2hpbGQgPT09IG51bGwgfHxcblx0XHRcdFx0ISAoICdwcm9wcycgaW4gY2hpbGQgKVxuXHRcdFx0KSB7XG5cdFx0XHRcdHJldHVybiBjaGlsZDtcblx0XHRcdH1cblxuXHRcdFx0Y29uc3QgaXNMaW5rID0gaGFzQ29ubmVjdE5hbWVzcGFjZSggY2hpbGQsIFsgJ0xpbmsnIF0gKTtcblx0XHRcdGlmICggaXNMaW5rICkge1xuXHRcdFx0XHRyZXR1cm4gY2xvbmVFbGVtZW50KCBjaGlsZCwge1xuXHRcdFx0XHRcdHNpemU6IGNoaWxkLnByb3BzLnNpemUgfHwgJ2luaGVyaXQnLFxuXHRcdFx0XHR9ICk7XG5cdFx0XHR9XG5cblx0XHRcdHJldHVybiBjaGlsZDtcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4ge1xuXHRcdC4uLnRydW5jYXRlUHJvcHMsXG5cdFx0Y2hpbGRyZW46IHRydW5jYXRlID8gdHJ1bmNhdGVQcm9wcy5jaGlsZHJlbiA6IGNvbnRlbnQsXG5cdH07XG59XG4iXX0= */");
      }
      return cx3(Text, sx.Base, sx.optimalTextColor, isDestructive && destructive, !!isHighlighter && highlighterText, isBlock && block2, isCaption && muted, variant && styles_exports3[variant], upperCase2 && sx.upperCase, className2);
    }, [adjustLineHeightForInnerControls, align, className2, color2, cx3, display, isBlock, isCaption, isDestructive, isHighlighter, letterSpacing, lineHeightProp, optimizeReadabilityFor, size3, upperCase2, variant, weight]);
    let finalEllipsizeMode;
    if (truncate === true) {
      finalEllipsizeMode = "auto";
    }
    if (truncate === false) {
      finalEllipsizeMode = "none";
    }
    const finalComponentProps = {
      ...otherProps,
      className: classes,
      children,
      ellipsizeMode: ellipsizeMode || finalEllipsizeMode
    };
    const truncateProps = useTruncate(finalComponentProps);
    if (!truncate && Array.isArray(children)) {
      content = import_element25.Children.map(children, (child) => {
        if (typeof child !== "object" || child === null || !("props" in child)) {
          return child;
        }
        const isLink = hasConnectNamespace(child, ["Link"]);
        if (isLink) {
          return (0, import_element25.cloneElement)(child, {
            size: child.props.size || "inherit"
          });
        }
        return child;
      });
    }
    return {
      ...truncateProps,
      children: truncate ? truncateProps.children : content
    };
  }

  // packages/components/build-module/text/component.mjs
  var import_jsx_runtime85 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedText(props, forwardedRef) {
    const textProps = useText(props);
    return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(component_default, {
      as: "span",
      ...textProps,
      ref: forwardedRef
    });
  }
  var Text2 = contextConnect(UnconnectedText, "Text");
  var component_default8 = Text2;

  // packages/components/build-module/input-control/styles/input-control-styles.mjs
  var import_jsx_runtime86 = __toESM(require_jsx_runtime(), 1);
  function _EMOTION_STRINGIFIED_CSS_ERROR__6() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var Prefix = /* @__PURE__ */ createStyled("span", false ? {
    target: "em5sgkm8"
  } : {
    target: "em5sgkm8",
    label: "Prefix"
  })(false ? {
    name: "pvvbxf",
    styles: "box-sizing:border-box;display:block"
  } : {
    name: "pvvbxf",
    styles: "box-sizing:border-box;display:block/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3QmlDIiwiZmlsZSI6ImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgU2VyaWFsaXplZFN0eWxlcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB0eXBlIHsgQ1NTUHJvcGVydGllcywgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzIH0gZnJvbSAnLi4vLi4vY29udGV4dCc7XG5pbXBvcnQgeyBGbGV4LCBGbGV4SXRlbSB9IGZyb20gJy4uLy4uL2ZsZXgnO1xuaW1wb3J0IHsgVGV4dCB9IGZyb20gJy4uLy4uL3RleHQnO1xuaW1wb3J0IHsgYmFzZUxhYmVsVHlwb2dyYXBoeSwgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgTGFiZWxQb3NpdGlvbiwgU2l6ZSwgUHJlZml4U3VmZml4V3JhcHBlclByb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuXG50eXBlIENvbnRhaW5lclByb3BzID0ge1xuXHRkaXNhYmxlZD86IGJvb2xlYW47XG5cdGhpZGVMYWJlbD86IGJvb2xlYW47XG5cdF9fdW5zdGFibGVJbnB1dFdpZHRoPzogQ1NTUHJvcGVydGllc1sgJ3dpZHRoJyBdO1xuXHRsYWJlbFBvc2l0aW9uPzogTGFiZWxQb3NpdGlvbjtcbn07XG5cbmV4cG9ydCBjb25zdCBQcmVmaXggPSBzdHlsZWQuc3BhbmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VmZml4ID0gc3R5bGVkLnNwYW5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGFsaWduLXNlbGY6IHN0cmV0Y2g7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGZsZXg7XG5gO1xuXG50eXBlIEJhY2tkcm9wUHJvcHMgPSB7XG5cdGRpc2FibGVkPzogYm9vbGVhbjtcblx0aXNCb3JkZXJsZXNzPzogYm9vbGVhbjtcbn07XG5cbmNvbnN0IGJhY2tkcm9wQm9yZGVyQ29sb3IgPSAoIHtcblx0ZGlzYWJsZWQsXG5cdGlzQm9yZGVybGVzcyxcbn06IEJhY2tkcm9wUHJvcHMgKTogQ1NTUHJvcGVydGllc1sgJ2JvcmRlckNvbG9yJyBdID0+IHtcblx0aWYgKCBpc0JvcmRlcmxlc3MgKSB7XG5cdFx0cmV0dXJuICd0cmFuc3BhcmVudCc7XG5cdH1cblxuXHRpZiAoIGRpc2FibGVkICkge1xuXHRcdHJldHVybiBDT0xPUlMudWkuYm9yZGVyRGlzYWJsZWQ7XG5cdH1cblxuXHRyZXR1cm4gQ09MT1JTLnVpLmJvcmRlcjtcbn07XG5cbmV4cG9ydCBjb25zdCBCYWNrZHJvcFVJID0gc3R5bGVkLmRpdjwgQmFja2Ryb3BQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyLWNvbG9yOiAkeyBiYWNrZHJvcEJvcmRlckNvbG9yIH07XG5cdFx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0XHRib3JkZXItc3R5bGU6IHNvbGlkO1xuXHRcdGJvcmRlci13aWR0aDogMXB4O1xuXHRcdGJvdHRvbTogMDtcblx0XHRsZWZ0OiAwO1xuXHRcdG1hcmdpbjogMDtcblx0XHRwYWRkaW5nOiAwO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRyaWdodDogMDtcblx0XHR0b3A6IDA7XG5cblx0XHQkeyBydGwoIHsgcGFkZGluZ0xlZnQ6IDIgfSApIH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQoIEZsZXggKWBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0cGFkZGluZy10b3A6IDA7XG5cblx0Ly8gRm9jdXMgd2l0aGluLCBleGNsdWRpbmcgY2FzZXMgd2hlcmUgYXV4aWxpYXJ5IGNvbnRyb2xzIGluIHByZWZpeCBvciBzdWZmaXggaGF2ZSBmb2N1cy5cblx0Jjpmb2N1cy13aXRoaW46bm90KCA6aGFzKCA6aXMoICR7IFByZWZpeCB9LCAkeyBTdWZmaXggfSApOmZvY3VzLXdpdGhpbiApICkge1xuXHRcdCR7IEJhY2tkcm9wVUkgfSB7XG5cdFx0XHRib3JkZXItY29sb3I6ICR7IENPTE9SUy51aS5ib3JkZXJGb2N1cyB9O1xuXHRcdFx0Ym94LXNoYWRvdzogJHsgQ09ORklHLmNvbnRyb2xCb3hTaGFkb3dGb2N1cyB9O1xuXHRcdFx0Ly8gV2luZG93cyBIaWdoIENvbnRyYXN0IG1vZGUgd2lsbCBzaG93IHRoaXMgb3V0bGluZSwgYnV0IG5vdCB0aGUgYm94LXNoYWRvdy5cblx0XHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRcdG91dGxpbmUtb2Zmc2V0OiAtMnB4O1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgY29udGFpbmVyRGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogQ29udGFpbmVyUHJvcHMgKSA9PiB7XG5cdGNvbnN0IGJhY2tncm91bmRDb2xvciA9IGRpc2FibGVkXG5cdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0OiBDT0xPUlMudWkuYmFja2dyb3VuZDtcblxuXHRyZXR1cm4gY3NzKCB7IGJhY2tncm91bmRDb2xvciB9ICk7XG59O1xuXG5jb25zdCBjb250YWluZXJXaWR0aFN0eWxlcyA9ICgge1xuXHRfX3Vuc3RhYmxlSW5wdXRXaWR0aCxcblx0bGFiZWxQb3NpdGlvbixcbn06IENvbnRhaW5lclByb3BzICkgPT4ge1xuXHRpZiAoICEgX191bnN0YWJsZUlucHV0V2lkdGggKSB7XG5cdFx0cmV0dXJuIGNzcyggeyB3aWR0aDogJzEwMCUnIH0gKTtcblx0fVxuXG5cdGlmICggbGFiZWxQb3NpdGlvbiA9PT0gJ3NpZGUnICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdGlmICggbGFiZWxQb3NpdGlvbiA9PT0gJ2VkZ2UnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdGZsZXg6IGAwIDAgJHsgX191bnN0YWJsZUlucHV0V2lkdGggfWAsXG5cdFx0fSApO1xuXHR9XG5cblx0cmV0dXJuIGNzcyggeyB3aWR0aDogX191bnN0YWJsZUlucHV0V2lkdGggfSApO1xufTtcblxuZXhwb3J0IGNvbnN0IENvbnRhaW5lciA9IHN0eWxlZC5kaXY8IENvbnRhaW5lclByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdGRpc3BsYXk6IGZsZXg7XG5cdGZsZXg6IDE7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuXHQkeyBjb250YWluZXJEaXNhYmxlZFN0eWxlcyB9XG5cdCR7IGNvbnRhaW5lcldpZHRoU3R5bGVzIH1cbmA7XG5cbnR5cGUgSW5wdXRQcm9wcyA9IHtcblx0X19uZXh0NDBweERlZmF1bHRTaXplPzogYm9vbGVhbjtcblx0ZGlzYWJsZWQ/OiBib29sZWFuO1xuXHRpbnB1dFNpemU/OiBTaXplO1xuXHRpc0RyYWdnaW5nPzogYm9vbGVhbjtcblx0ZHJhZ0N1cnNvcj86IENTU1Byb3BlcnRpZXNbICdjdXJzb3InIF07XG5cdHBhZGRpbmdJbmxpbmVTdGFydD86IENTU1Byb3BlcnRpZXNbICdwYWRkaW5nSW5saW5lU3RhcnQnIF07XG5cdHBhZGRpbmdJbmxpbmVFbmQ/OiBDU1NQcm9wZXJ0aWVzWyAncGFkZGluZ0lubGluZUVuZCcgXTtcbn07XG5cbmNvbnN0IGRpc2FibGVkU3R5bGVzID0gKCB7IGRpc2FibGVkIH06IElucHV0UHJvcHMgKSA9PiB7XG5cdGlmICggISBkaXNhYmxlZCApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzKCB7XG5cdFx0Y29sb3I6IENPTE9SUy51aS50ZXh0RGlzYWJsZWQsXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBmb250U2l6ZVN0eWxlcyA9ICggeyBpbnB1dFNpemU6IHNpemUgfTogSW5wdXRQcm9wcyApID0+IHtcblx0Y29uc3Qgc2l6ZXMgPSB7XG5cdFx0ZGVmYXVsdDogJzEzcHgnLFxuXHRcdHNtYWxsOiAnMTFweCcsXG5cdFx0Y29tcGFjdDogJzEzcHgnLFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzogJzEzcHgnLFxuXHR9O1xuXG5cdGNvbnN0IGZvbnRTaXplID0gc2l6ZXNbIHNpemUgYXMgU2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG5cdGNvbnN0IGZvbnRTaXplTW9iaWxlID0gJzE2cHgnO1xuXG5cdGlmICggISBmb250U2l6ZSApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdGZvbnQtc2l6ZTogJHsgZm9udFNpemVNb2JpbGUgfTtcblxuXHRcdEBtZWRpYSAoIG1pbi13aWR0aDogNjAwcHggKSB7XG5cdFx0XHRmb250LXNpemU6ICR7IGZvbnRTaXplIH07XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGdldFNpemVDb25maWcgPSAoIHtcblx0aW5wdXRTaXplOiBzaXplLFxuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBJbnB1dFByb3BzICkgPT4ge1xuXHQvLyBQYWRkaW5ncyBtYXkgYmUgb3ZlcnJpZGRlbiBieSB0aGUgY3VzdG9tIHBhZGRpbmdzIHByb3BzLlxuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiB7XG5cdFx0XHRoZWlnaHQ6IDQwLFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogNDAsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHRcdHBhZGRpbmdSaWdodDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHR9LFxuXHRcdHNtYWxsOiB7XG5cdFx0XHRoZWlnaHQ6IDI0LFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogMjQsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0fSxcblx0XHRjb21wYWN0OiB7XG5cdFx0XHRoZWlnaHQ6IDMyLFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogMzIsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0fSxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdH0sXG5cdH07XG5cblx0aWYgKCAhIF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSApIHtcblx0XHRzaXplcy5kZWZhdWx0ID0gc2l6ZXMuY29tcGFjdDtcblx0fVxuXG5cdHJldHVybiBzaXplc1sgc2l6ZSBhcyBTaXplIF0gfHwgc2l6ZXMuZGVmYXVsdDtcbn07XG5cbmNvbnN0IHNpemVTdHlsZXMgPSAoIHByb3BzOiBJbnB1dFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCBnZXRTaXplQ29uZmlnKCBwcm9wcyApICk7XG59O1xuXG5jb25zdCBjdXN0b21QYWRkaW5ncyA9ICgge1xuXHRwYWRkaW5nSW5saW5lU3RhcnQsXG5cdHBhZGRpbmdJbmxpbmVFbmQsXG59OiBJbnB1dFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCB7IHBhZGRpbmdJbmxpbmVTdGFydCwgcGFkZGluZ0lubGluZUVuZCB9ICk7XG59O1xuXG5jb25zdCBkcmFnU3R5bGVzID0gKCB7IGlzRHJhZ2dpbmcsIGRyYWdDdXJzb3IgfTogSW5wdXRQcm9wcyApID0+IHtcblx0bGV0IGRlZmF1bHRBcnJvd1N0eWxlczogU2VyaWFsaXplZFN0eWxlcyB8IHVuZGVmaW5lZDtcblx0bGV0IGFjdGl2ZURyYWdDdXJzb3JTdHlsZXM6IFNlcmlhbGl6ZWRTdHlsZXMgfCB1bmRlZmluZWQ7XG5cblx0aWYgKCBpc0RyYWdnaW5nICkge1xuXHRcdGRlZmF1bHRBcnJvd1N0eWxlcyA9IGNzc2Bcblx0XHRcdGN1cnNvcjogJHsgZHJhZ0N1cnNvciB9O1xuXHRcdFx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cblx0XHRcdCY6Oi13ZWJraXQtb3V0ZXItc3Bpbi1idXR0b24sXG5cdFx0XHQmOjotd2Via2l0LWlubmVyLXNwaW4tYnV0dG9uIHtcblx0XHRcdFx0LXdlYmtpdC1hcHBlYXJhbmNlOiBub25lICFpbXBvcnRhbnQ7XG5cdFx0XHRcdG1hcmdpbjogMCAhaW1wb3J0YW50O1xuXHRcdFx0fVxuXHRcdGA7XG5cdH1cblxuXHRpZiAoIGlzRHJhZ2dpbmcgJiYgZHJhZ0N1cnNvciApIHtcblx0XHRhY3RpdmVEcmFnQ3Vyc29yU3R5bGVzID0gY3NzYFxuXHRcdFx0JjphY3RpdmUge1xuXHRcdFx0XHRjdXJzb3I6ICR7IGRyYWdDdXJzb3IgfTtcblx0XHRcdH1cblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHQkeyBkZWZhdWx0QXJyb3dTdHlsZXMgfVxuXHRcdCR7IGFjdGl2ZURyYWdDdXJzb3JTdHlsZXMgfVxuXHRgO1xufTtcblxuLy8gVE9ETzogUmVzb2x2ZSBuZWVkIHRvIHVzZSAmJiYgdG8gaW5jcmVhc2Ugc3BlY2lmaWNpdHlcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9Xb3JkUHJlc3MvZ3V0ZW5iZXJnL2lzc3Vlcy8xODQ4M1xuXG5leHBvcnQgY29uc3QgSW5wdXQgPSBzdHlsZWQuaW5wdXQ8IElucHV0UHJvcHMgPmBcblx0JiYmIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDtcblx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdGJvcmRlcjogbm9uZTtcblx0XHRib3gtc2hhZG93OiBub25lICFpbXBvcnRhbnQ7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdFx0bWFyZ2luOiAwO1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cblx0XHQkeyBkcmFnU3R5bGVzIH1cblx0XHQkeyBkaXNhYmxlZFN0eWxlcyB9XG5cdFx0JHsgZm9udFNpemVTdHlsZXMgfVxuXHRcdCR7IHNpemVTdHlsZXMgfVxuXHRcdCR7IGN1c3RvbVBhZGRpbmdzIH1cblxuXHRcdCY6Oi13ZWJraXQtaW5wdXQtcGxhY2Vob2xkZXIge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy51aS5kYXJrR3JheVBsYWNlaG9sZGVyIH07XG5cdFx0fVxuXG5cdFx0Jjo6LW1vei1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOi1tcy1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmW3R5cGU9J2VtYWlsJ10sXG5cdFx0Jlt0eXBlPSd1cmwnXSB7XG5cdFx0XHQvKiBydGw6aWdub3JlICovXG5cdFx0XHRkaXJlY3Rpb246IGx0cjtcblx0XHR9XG5cdH1cbmA7XG5cbmNvbnN0IEJhc2VMYWJlbCA9IHN0eWxlZCggVGV4dCApPCB7IGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uIH0gPmBcblx0JiYmIHtcblx0XHQkeyBiYXNlTGFiZWxUeXBvZ3JhcGh5IH07XG5cblx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdHBhZGRpbmctdG9wOiAwO1xuXHRcdHBhZGRpbmctYm90dG9tOiAwO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0XHR6LWluZGV4OiAxO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTGFiZWwgPSAoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczxcblx0XHR7IGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uOyBjaGlsZHJlbjogUmVhY3ROb2RlIH0sXG5cdFx0J2xhYmVsJyxcblx0XHRmYWxzZVxuXHQ+XG4pID0+IDxCYXNlTGFiZWwgeyAuLi5wcm9wcyB9IGFzPVwibGFiZWxcIiAvPjtcblxuZXhwb3J0IGNvbnN0IExhYmVsV3JhcHBlciA9IHN0eWxlZCggRmxleEl0ZW0gKWBcblx0bWF4LXdpZHRoOiBjYWxjKCAxMDAlIC0gMTBweCApO1xuYDtcblxuY29uc3QgcHJlZml4U3VmZml4V3JhcHBlclN0eWxlcyA9ICgge1xuXHR2YXJpYW50ID0gJ2RlZmF1bHQnLFxuXHRzaXplLFxuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdGlzUHJlZml4LFxufTogUHJlZml4U3VmZml4V3JhcHBlclByb3BzICYgeyBpc1ByZWZpeD86IGJvb2xlYW4gfSApID0+IHtcblx0Y29uc3QgeyBwYWRkaW5nTGVmdDogcGFkZGluZyB9ID0gZ2V0U2l6ZUNvbmZpZygge1xuXHRcdGlucHV0U2l6ZTogc2l6ZSxcblx0XHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdH0gKTtcblxuXHRjb25zdCBwYWRkaW5nUHJvcGVydHkgPSBpc1ByZWZpeFxuXHRcdD8gJ3BhZGRpbmdJbmxpbmVTdGFydCdcblx0XHQ6ICdwYWRkaW5nSW5saW5lRW5kJztcblxuXHRpZiAoIHZhcmlhbnQgPT09ICdkZWZhdWx0JyApIHtcblx0XHRyZXR1cm4gY3NzKCB7XG5cdFx0XHRbIHBhZGRpbmdQcm9wZXJ0eSBdOiBwYWRkaW5nLFxuXHRcdH0gKTtcblx0fVxuXG5cdC8vIElmIHZhcmlhbnQgaXMgJ2ljb24nIG9yICdjb250cm9sJ1xuXHRyZXR1cm4gY3NzKCB7XG5cdFx0ZGlzcGxheTogJ2ZsZXgnLFxuXHRcdFsgcGFkZGluZ1Byb3BlcnR5IF06IHBhZGRpbmcgLSA0LFxuXHR9ICk7XG59O1xuXG5leHBvcnQgY29uc3QgUHJlZml4U3VmZml4V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdCR7IHByZWZpeFN1ZmZpeFdyYXBwZXJTdHlsZXMgfVxuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__6
  });
  var Suffix = /* @__PURE__ */ createStyled("span", false ? {
    target: "em5sgkm7"
  } : {
    target: "em5sgkm7",
    label: "Suffix"
  })(false ? {
    name: "jgf79h",
    styles: "align-items:center;align-self:stretch;box-sizing:border-box;display:flex"
  } : {
    name: "jgf79h",
    styles: "align-items:center;align-self:stretch;box-sizing:border-box;display:flex/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE2QmlDIiwiZmlsZSI6ImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgU2VyaWFsaXplZFN0eWxlcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB0eXBlIHsgQ1NTUHJvcGVydGllcywgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzIH0gZnJvbSAnLi4vLi4vY29udGV4dCc7XG5pbXBvcnQgeyBGbGV4LCBGbGV4SXRlbSB9IGZyb20gJy4uLy4uL2ZsZXgnO1xuaW1wb3J0IHsgVGV4dCB9IGZyb20gJy4uLy4uL3RleHQnO1xuaW1wb3J0IHsgYmFzZUxhYmVsVHlwb2dyYXBoeSwgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgTGFiZWxQb3NpdGlvbiwgU2l6ZSwgUHJlZml4U3VmZml4V3JhcHBlclByb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuXG50eXBlIENvbnRhaW5lclByb3BzID0ge1xuXHRkaXNhYmxlZD86IGJvb2xlYW47XG5cdGhpZGVMYWJlbD86IGJvb2xlYW47XG5cdF9fdW5zdGFibGVJbnB1dFdpZHRoPzogQ1NTUHJvcGVydGllc1sgJ3dpZHRoJyBdO1xuXHRsYWJlbFBvc2l0aW9uPzogTGFiZWxQb3NpdGlvbjtcbn07XG5cbmV4cG9ydCBjb25zdCBQcmVmaXggPSBzdHlsZWQuc3BhbmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VmZml4ID0gc3R5bGVkLnNwYW5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGFsaWduLXNlbGY6IHN0cmV0Y2g7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGZsZXg7XG5gO1xuXG50eXBlIEJhY2tkcm9wUHJvcHMgPSB7XG5cdGRpc2FibGVkPzogYm9vbGVhbjtcblx0aXNCb3JkZXJsZXNzPzogYm9vbGVhbjtcbn07XG5cbmNvbnN0IGJhY2tkcm9wQm9yZGVyQ29sb3IgPSAoIHtcblx0ZGlzYWJsZWQsXG5cdGlzQm9yZGVybGVzcyxcbn06IEJhY2tkcm9wUHJvcHMgKTogQ1NTUHJvcGVydGllc1sgJ2JvcmRlckNvbG9yJyBdID0+IHtcblx0aWYgKCBpc0JvcmRlcmxlc3MgKSB7XG5cdFx0cmV0dXJuICd0cmFuc3BhcmVudCc7XG5cdH1cblxuXHRpZiAoIGRpc2FibGVkICkge1xuXHRcdHJldHVybiBDT0xPUlMudWkuYm9yZGVyRGlzYWJsZWQ7XG5cdH1cblxuXHRyZXR1cm4gQ09MT1JTLnVpLmJvcmRlcjtcbn07XG5cbmV4cG9ydCBjb25zdCBCYWNrZHJvcFVJID0gc3R5bGVkLmRpdjwgQmFja2Ryb3BQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyLWNvbG9yOiAkeyBiYWNrZHJvcEJvcmRlckNvbG9yIH07XG5cdFx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0XHRib3JkZXItc3R5bGU6IHNvbGlkO1xuXHRcdGJvcmRlci13aWR0aDogMXB4O1xuXHRcdGJvdHRvbTogMDtcblx0XHRsZWZ0OiAwO1xuXHRcdG1hcmdpbjogMDtcblx0XHRwYWRkaW5nOiAwO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRyaWdodDogMDtcblx0XHR0b3A6IDA7XG5cblx0XHQkeyBydGwoIHsgcGFkZGluZ0xlZnQ6IDIgfSApIH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQoIEZsZXggKWBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0cGFkZGluZy10b3A6IDA7XG5cblx0Ly8gRm9jdXMgd2l0aGluLCBleGNsdWRpbmcgY2FzZXMgd2hlcmUgYXV4aWxpYXJ5IGNvbnRyb2xzIGluIHByZWZpeCBvciBzdWZmaXggaGF2ZSBmb2N1cy5cblx0Jjpmb2N1cy13aXRoaW46bm90KCA6aGFzKCA6aXMoICR7IFByZWZpeCB9LCAkeyBTdWZmaXggfSApOmZvY3VzLXdpdGhpbiApICkge1xuXHRcdCR7IEJhY2tkcm9wVUkgfSB7XG5cdFx0XHRib3JkZXItY29sb3I6ICR7IENPTE9SUy51aS5ib3JkZXJGb2N1cyB9O1xuXHRcdFx0Ym94LXNoYWRvdzogJHsgQ09ORklHLmNvbnRyb2xCb3hTaGFkb3dGb2N1cyB9O1xuXHRcdFx0Ly8gV2luZG93cyBIaWdoIENvbnRyYXN0IG1vZGUgd2lsbCBzaG93IHRoaXMgb3V0bGluZSwgYnV0IG5vdCB0aGUgYm94LXNoYWRvdy5cblx0XHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRcdG91dGxpbmUtb2Zmc2V0OiAtMnB4O1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgY29udGFpbmVyRGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogQ29udGFpbmVyUHJvcHMgKSA9PiB7XG5cdGNvbnN0IGJhY2tncm91bmRDb2xvciA9IGRpc2FibGVkXG5cdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0OiBDT0xPUlMudWkuYmFja2dyb3VuZDtcblxuXHRyZXR1cm4gY3NzKCB7IGJhY2tncm91bmRDb2xvciB9ICk7XG59O1xuXG5jb25zdCBjb250YWluZXJXaWR0aFN0eWxlcyA9ICgge1xuXHRfX3Vuc3RhYmxlSW5wdXRXaWR0aCxcblx0bGFiZWxQb3NpdGlvbixcbn06IENvbnRhaW5lclByb3BzICkgPT4ge1xuXHRpZiAoICEgX191bnN0YWJsZUlucHV0V2lkdGggKSB7XG5cdFx0cmV0dXJuIGNzcyggeyB3aWR0aDogJzEwMCUnIH0gKTtcblx0fVxuXG5cdGlmICggbGFiZWxQb3NpdGlvbiA9PT0gJ3NpZGUnICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdGlmICggbGFiZWxQb3NpdGlvbiA9PT0gJ2VkZ2UnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdGZsZXg6IGAwIDAgJHsgX191bnN0YWJsZUlucHV0V2lkdGggfWAsXG5cdFx0fSApO1xuXHR9XG5cblx0cmV0dXJuIGNzcyggeyB3aWR0aDogX191bnN0YWJsZUlucHV0V2lkdGggfSApO1xufTtcblxuZXhwb3J0IGNvbnN0IENvbnRhaW5lciA9IHN0eWxlZC5kaXY8IENvbnRhaW5lclByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdGRpc3BsYXk6IGZsZXg7XG5cdGZsZXg6IDE7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuXHQkeyBjb250YWluZXJEaXNhYmxlZFN0eWxlcyB9XG5cdCR7IGNvbnRhaW5lcldpZHRoU3R5bGVzIH1cbmA7XG5cbnR5cGUgSW5wdXRQcm9wcyA9IHtcblx0X19uZXh0NDBweERlZmF1bHRTaXplPzogYm9vbGVhbjtcblx0ZGlzYWJsZWQ/OiBib29sZWFuO1xuXHRpbnB1dFNpemU/OiBTaXplO1xuXHRpc0RyYWdnaW5nPzogYm9vbGVhbjtcblx0ZHJhZ0N1cnNvcj86IENTU1Byb3BlcnRpZXNbICdjdXJzb3InIF07XG5cdHBhZGRpbmdJbmxpbmVTdGFydD86IENTU1Byb3BlcnRpZXNbICdwYWRkaW5nSW5saW5lU3RhcnQnIF07XG5cdHBhZGRpbmdJbmxpbmVFbmQ/OiBDU1NQcm9wZXJ0aWVzWyAncGFkZGluZ0lubGluZUVuZCcgXTtcbn07XG5cbmNvbnN0IGRpc2FibGVkU3R5bGVzID0gKCB7IGRpc2FibGVkIH06IElucHV0UHJvcHMgKSA9PiB7XG5cdGlmICggISBkaXNhYmxlZCApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzKCB7XG5cdFx0Y29sb3I6IENPTE9SUy51aS50ZXh0RGlzYWJsZWQsXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBmb250U2l6ZVN0eWxlcyA9ICggeyBpbnB1dFNpemU6IHNpemUgfTogSW5wdXRQcm9wcyApID0+IHtcblx0Y29uc3Qgc2l6ZXMgPSB7XG5cdFx0ZGVmYXVsdDogJzEzcHgnLFxuXHRcdHNtYWxsOiAnMTFweCcsXG5cdFx0Y29tcGFjdDogJzEzcHgnLFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzogJzEzcHgnLFxuXHR9O1xuXG5cdGNvbnN0IGZvbnRTaXplID0gc2l6ZXNbIHNpemUgYXMgU2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG5cdGNvbnN0IGZvbnRTaXplTW9iaWxlID0gJzE2cHgnO1xuXG5cdGlmICggISBmb250U2l6ZSApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdGZvbnQtc2l6ZTogJHsgZm9udFNpemVNb2JpbGUgfTtcblxuXHRcdEBtZWRpYSAoIG1pbi13aWR0aDogNjAwcHggKSB7XG5cdFx0XHRmb250LXNpemU6ICR7IGZvbnRTaXplIH07XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGdldFNpemVDb25maWcgPSAoIHtcblx0aW5wdXRTaXplOiBzaXplLFxuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBJbnB1dFByb3BzICkgPT4ge1xuXHQvLyBQYWRkaW5ncyBtYXkgYmUgb3ZlcnJpZGRlbiBieSB0aGUgY3VzdG9tIHBhZGRpbmdzIHByb3BzLlxuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiB7XG5cdFx0XHRoZWlnaHQ6IDQwLFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogNDAsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHRcdHBhZGRpbmdSaWdodDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHR9LFxuXHRcdHNtYWxsOiB7XG5cdFx0XHRoZWlnaHQ6IDI0LFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogMjQsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0fSxcblx0XHRjb21wYWN0OiB7XG5cdFx0XHRoZWlnaHQ6IDMyLFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogMzIsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0fSxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdH0sXG5cdH07XG5cblx0aWYgKCAhIF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSApIHtcblx0XHRzaXplcy5kZWZhdWx0ID0gc2l6ZXMuY29tcGFjdDtcblx0fVxuXG5cdHJldHVybiBzaXplc1sgc2l6ZSBhcyBTaXplIF0gfHwgc2l6ZXMuZGVmYXVsdDtcbn07XG5cbmNvbnN0IHNpemVTdHlsZXMgPSAoIHByb3BzOiBJbnB1dFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCBnZXRTaXplQ29uZmlnKCBwcm9wcyApICk7XG59O1xuXG5jb25zdCBjdXN0b21QYWRkaW5ncyA9ICgge1xuXHRwYWRkaW5nSW5saW5lU3RhcnQsXG5cdHBhZGRpbmdJbmxpbmVFbmQsXG59OiBJbnB1dFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCB7IHBhZGRpbmdJbmxpbmVTdGFydCwgcGFkZGluZ0lubGluZUVuZCB9ICk7XG59O1xuXG5jb25zdCBkcmFnU3R5bGVzID0gKCB7IGlzRHJhZ2dpbmcsIGRyYWdDdXJzb3IgfTogSW5wdXRQcm9wcyApID0+IHtcblx0bGV0IGRlZmF1bHRBcnJvd1N0eWxlczogU2VyaWFsaXplZFN0eWxlcyB8IHVuZGVmaW5lZDtcblx0bGV0IGFjdGl2ZURyYWdDdXJzb3JTdHlsZXM6IFNlcmlhbGl6ZWRTdHlsZXMgfCB1bmRlZmluZWQ7XG5cblx0aWYgKCBpc0RyYWdnaW5nICkge1xuXHRcdGRlZmF1bHRBcnJvd1N0eWxlcyA9IGNzc2Bcblx0XHRcdGN1cnNvcjogJHsgZHJhZ0N1cnNvciB9O1xuXHRcdFx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cblx0XHRcdCY6Oi13ZWJraXQtb3V0ZXItc3Bpbi1idXR0b24sXG5cdFx0XHQmOjotd2Via2l0LWlubmVyLXNwaW4tYnV0dG9uIHtcblx0XHRcdFx0LXdlYmtpdC1hcHBlYXJhbmNlOiBub25lICFpbXBvcnRhbnQ7XG5cdFx0XHRcdG1hcmdpbjogMCAhaW1wb3J0YW50O1xuXHRcdFx0fVxuXHRcdGA7XG5cdH1cblxuXHRpZiAoIGlzRHJhZ2dpbmcgJiYgZHJhZ0N1cnNvciApIHtcblx0XHRhY3RpdmVEcmFnQ3Vyc29yU3R5bGVzID0gY3NzYFxuXHRcdFx0JjphY3RpdmUge1xuXHRcdFx0XHRjdXJzb3I6ICR7IGRyYWdDdXJzb3IgfTtcblx0XHRcdH1cblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHQkeyBkZWZhdWx0QXJyb3dTdHlsZXMgfVxuXHRcdCR7IGFjdGl2ZURyYWdDdXJzb3JTdHlsZXMgfVxuXHRgO1xufTtcblxuLy8gVE9ETzogUmVzb2x2ZSBuZWVkIHRvIHVzZSAmJiYgdG8gaW5jcmVhc2Ugc3BlY2lmaWNpdHlcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9Xb3JkUHJlc3MvZ3V0ZW5iZXJnL2lzc3Vlcy8xODQ4M1xuXG5leHBvcnQgY29uc3QgSW5wdXQgPSBzdHlsZWQuaW5wdXQ8IElucHV0UHJvcHMgPmBcblx0JiYmIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDtcblx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdGJvcmRlcjogbm9uZTtcblx0XHRib3gtc2hhZG93OiBub25lICFpbXBvcnRhbnQ7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdFx0bWFyZ2luOiAwO1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cblx0XHQkeyBkcmFnU3R5bGVzIH1cblx0XHQkeyBkaXNhYmxlZFN0eWxlcyB9XG5cdFx0JHsgZm9udFNpemVTdHlsZXMgfVxuXHRcdCR7IHNpemVTdHlsZXMgfVxuXHRcdCR7IGN1c3RvbVBhZGRpbmdzIH1cblxuXHRcdCY6Oi13ZWJraXQtaW5wdXQtcGxhY2Vob2xkZXIge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy51aS5kYXJrR3JheVBsYWNlaG9sZGVyIH07XG5cdFx0fVxuXG5cdFx0Jjo6LW1vei1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOi1tcy1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmW3R5cGU9J2VtYWlsJ10sXG5cdFx0Jlt0eXBlPSd1cmwnXSB7XG5cdFx0XHQvKiBydGw6aWdub3JlICovXG5cdFx0XHRkaXJlY3Rpb246IGx0cjtcblx0XHR9XG5cdH1cbmA7XG5cbmNvbnN0IEJhc2VMYWJlbCA9IHN0eWxlZCggVGV4dCApPCB7IGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uIH0gPmBcblx0JiYmIHtcblx0XHQkeyBiYXNlTGFiZWxUeXBvZ3JhcGh5IH07XG5cblx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdHBhZGRpbmctdG9wOiAwO1xuXHRcdHBhZGRpbmctYm90dG9tOiAwO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0XHR6LWluZGV4OiAxO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTGFiZWwgPSAoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczxcblx0XHR7IGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uOyBjaGlsZHJlbjogUmVhY3ROb2RlIH0sXG5cdFx0J2xhYmVsJyxcblx0XHRmYWxzZVxuXHQ+XG4pID0+IDxCYXNlTGFiZWwgeyAuLi5wcm9wcyB9IGFzPVwibGFiZWxcIiAvPjtcblxuZXhwb3J0IGNvbnN0IExhYmVsV3JhcHBlciA9IHN0eWxlZCggRmxleEl0ZW0gKWBcblx0bWF4LXdpZHRoOiBjYWxjKCAxMDAlIC0gMTBweCApO1xuYDtcblxuY29uc3QgcHJlZml4U3VmZml4V3JhcHBlclN0eWxlcyA9ICgge1xuXHR2YXJpYW50ID0gJ2RlZmF1bHQnLFxuXHRzaXplLFxuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdGlzUHJlZml4LFxufTogUHJlZml4U3VmZml4V3JhcHBlclByb3BzICYgeyBpc1ByZWZpeD86IGJvb2xlYW4gfSApID0+IHtcblx0Y29uc3QgeyBwYWRkaW5nTGVmdDogcGFkZGluZyB9ID0gZ2V0U2l6ZUNvbmZpZygge1xuXHRcdGlucHV0U2l6ZTogc2l6ZSxcblx0XHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdH0gKTtcblxuXHRjb25zdCBwYWRkaW5nUHJvcGVydHkgPSBpc1ByZWZpeFxuXHRcdD8gJ3BhZGRpbmdJbmxpbmVTdGFydCdcblx0XHQ6ICdwYWRkaW5nSW5saW5lRW5kJztcblxuXHRpZiAoIHZhcmlhbnQgPT09ICdkZWZhdWx0JyApIHtcblx0XHRyZXR1cm4gY3NzKCB7XG5cdFx0XHRbIHBhZGRpbmdQcm9wZXJ0eSBdOiBwYWRkaW5nLFxuXHRcdH0gKTtcblx0fVxuXG5cdC8vIElmIHZhcmlhbnQgaXMgJ2ljb24nIG9yICdjb250cm9sJ1xuXHRyZXR1cm4gY3NzKCB7XG5cdFx0ZGlzcGxheTogJ2ZsZXgnLFxuXHRcdFsgcGFkZGluZ1Byb3BlcnR5IF06IHBhZGRpbmcgLSA0LFxuXHR9ICk7XG59O1xuXG5leHBvcnQgY29uc3QgUHJlZml4U3VmZml4V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdCR7IHByZWZpeFN1ZmZpeFdyYXBwZXJTdHlsZXMgfVxuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__6
  });
  var backdropBorderColor = ({
    disabled,
    isBorderless
  }) => {
    if (isBorderless) {
      return "transparent";
    }
    if (disabled) {
      return COLORS.ui.borderDisabled;
    }
    return COLORS.ui.border;
  };
  var BackdropUI = /* @__PURE__ */ createStyled("div", false ? {
    target: "em5sgkm6"
  } : {
    target: "em5sgkm6",
    label: "BackdropUI"
  })("&&&{box-sizing:border-box;border-color:", backdropBorderColor, ";border-radius:inherit;border-style:solid;border-width:1px;bottom:0;left:0;margin:0;padding:0;pointer-events:none;position:absolute;right:0;top:0;", rtl({
    paddingLeft: 2
  }), ";}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3RHFEIiwiZmlsZSI6ImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgU2VyaWFsaXplZFN0eWxlcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB0eXBlIHsgQ1NTUHJvcGVydGllcywgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzIH0gZnJvbSAnLi4vLi4vY29udGV4dCc7XG5pbXBvcnQgeyBGbGV4LCBGbGV4SXRlbSB9IGZyb20gJy4uLy4uL2ZsZXgnO1xuaW1wb3J0IHsgVGV4dCB9IGZyb20gJy4uLy4uL3RleHQnO1xuaW1wb3J0IHsgYmFzZUxhYmVsVHlwb2dyYXBoeSwgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgTGFiZWxQb3NpdGlvbiwgU2l6ZSwgUHJlZml4U3VmZml4V3JhcHBlclByb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuXG50eXBlIENvbnRhaW5lclByb3BzID0ge1xuXHRkaXNhYmxlZD86IGJvb2xlYW47XG5cdGhpZGVMYWJlbD86IGJvb2xlYW47XG5cdF9fdW5zdGFibGVJbnB1dFdpZHRoPzogQ1NTUHJvcGVydGllc1sgJ3dpZHRoJyBdO1xuXHRsYWJlbFBvc2l0aW9uPzogTGFiZWxQb3NpdGlvbjtcbn07XG5cbmV4cG9ydCBjb25zdCBQcmVmaXggPSBzdHlsZWQuc3BhbmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VmZml4ID0gc3R5bGVkLnNwYW5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGFsaWduLXNlbGY6IHN0cmV0Y2g7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGZsZXg7XG5gO1xuXG50eXBlIEJhY2tkcm9wUHJvcHMgPSB7XG5cdGRpc2FibGVkPzogYm9vbGVhbjtcblx0aXNCb3JkZXJsZXNzPzogYm9vbGVhbjtcbn07XG5cbmNvbnN0IGJhY2tkcm9wQm9yZGVyQ29sb3IgPSAoIHtcblx0ZGlzYWJsZWQsXG5cdGlzQm9yZGVybGVzcyxcbn06IEJhY2tkcm9wUHJvcHMgKTogQ1NTUHJvcGVydGllc1sgJ2JvcmRlckNvbG9yJyBdID0+IHtcblx0aWYgKCBpc0JvcmRlcmxlc3MgKSB7XG5cdFx0cmV0dXJuICd0cmFuc3BhcmVudCc7XG5cdH1cblxuXHRpZiAoIGRpc2FibGVkICkge1xuXHRcdHJldHVybiBDT0xPUlMudWkuYm9yZGVyRGlzYWJsZWQ7XG5cdH1cblxuXHRyZXR1cm4gQ09MT1JTLnVpLmJvcmRlcjtcbn07XG5cbmV4cG9ydCBjb25zdCBCYWNrZHJvcFVJID0gc3R5bGVkLmRpdjwgQmFja2Ryb3BQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyLWNvbG9yOiAkeyBiYWNrZHJvcEJvcmRlckNvbG9yIH07XG5cdFx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0XHRib3JkZXItc3R5bGU6IHNvbGlkO1xuXHRcdGJvcmRlci13aWR0aDogMXB4O1xuXHRcdGJvdHRvbTogMDtcblx0XHRsZWZ0OiAwO1xuXHRcdG1hcmdpbjogMDtcblx0XHRwYWRkaW5nOiAwO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRyaWdodDogMDtcblx0XHR0b3A6IDA7XG5cblx0XHQkeyBydGwoIHsgcGFkZGluZ0xlZnQ6IDIgfSApIH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQoIEZsZXggKWBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0cGFkZGluZy10b3A6IDA7XG5cblx0Ly8gRm9jdXMgd2l0aGluLCBleGNsdWRpbmcgY2FzZXMgd2hlcmUgYXV4aWxpYXJ5IGNvbnRyb2xzIGluIHByZWZpeCBvciBzdWZmaXggaGF2ZSBmb2N1cy5cblx0Jjpmb2N1cy13aXRoaW46bm90KCA6aGFzKCA6aXMoICR7IFByZWZpeCB9LCAkeyBTdWZmaXggfSApOmZvY3VzLXdpdGhpbiApICkge1xuXHRcdCR7IEJhY2tkcm9wVUkgfSB7XG5cdFx0XHRib3JkZXItY29sb3I6ICR7IENPTE9SUy51aS5ib3JkZXJGb2N1cyB9O1xuXHRcdFx0Ym94LXNoYWRvdzogJHsgQ09ORklHLmNvbnRyb2xCb3hTaGFkb3dGb2N1cyB9O1xuXHRcdFx0Ly8gV2luZG93cyBIaWdoIENvbnRyYXN0IG1vZGUgd2lsbCBzaG93IHRoaXMgb3V0bGluZSwgYnV0IG5vdCB0aGUgYm94LXNoYWRvdy5cblx0XHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRcdG91dGxpbmUtb2Zmc2V0OiAtMnB4O1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgY29udGFpbmVyRGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogQ29udGFpbmVyUHJvcHMgKSA9PiB7XG5cdGNvbnN0IGJhY2tncm91bmRDb2xvciA9IGRpc2FibGVkXG5cdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0OiBDT0xPUlMudWkuYmFja2dyb3VuZDtcblxuXHRyZXR1cm4gY3NzKCB7IGJhY2tncm91bmRDb2xvciB9ICk7XG59O1xuXG5jb25zdCBjb250YWluZXJXaWR0aFN0eWxlcyA9ICgge1xuXHRfX3Vuc3RhYmxlSW5wdXRXaWR0aCxcblx0bGFiZWxQb3NpdGlvbixcbn06IENvbnRhaW5lclByb3BzICkgPT4ge1xuXHRpZiAoICEgX191bnN0YWJsZUlucHV0V2lkdGggKSB7XG5cdFx0cmV0dXJuIGNzcyggeyB3aWR0aDogJzEwMCUnIH0gKTtcblx0fVxuXG5cdGlmICggbGFiZWxQb3NpdGlvbiA9PT0gJ3NpZGUnICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdGlmICggbGFiZWxQb3NpdGlvbiA9PT0gJ2VkZ2UnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdGZsZXg6IGAwIDAgJHsgX191bnN0YWJsZUlucHV0V2lkdGggfWAsXG5cdFx0fSApO1xuXHR9XG5cblx0cmV0dXJuIGNzcyggeyB3aWR0aDogX191bnN0YWJsZUlucHV0V2lkdGggfSApO1xufTtcblxuZXhwb3J0IGNvbnN0IENvbnRhaW5lciA9IHN0eWxlZC5kaXY8IENvbnRhaW5lclByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdGRpc3BsYXk6IGZsZXg7XG5cdGZsZXg6IDE7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuXHQkeyBjb250YWluZXJEaXNhYmxlZFN0eWxlcyB9XG5cdCR7IGNvbnRhaW5lcldpZHRoU3R5bGVzIH1cbmA7XG5cbnR5cGUgSW5wdXRQcm9wcyA9IHtcblx0X19uZXh0NDBweERlZmF1bHRTaXplPzogYm9vbGVhbjtcblx0ZGlzYWJsZWQ/OiBib29sZWFuO1xuXHRpbnB1dFNpemU/OiBTaXplO1xuXHRpc0RyYWdnaW5nPzogYm9vbGVhbjtcblx0ZHJhZ0N1cnNvcj86IENTU1Byb3BlcnRpZXNbICdjdXJzb3InIF07XG5cdHBhZGRpbmdJbmxpbmVTdGFydD86IENTU1Byb3BlcnRpZXNbICdwYWRkaW5nSW5saW5lU3RhcnQnIF07XG5cdHBhZGRpbmdJbmxpbmVFbmQ/OiBDU1NQcm9wZXJ0aWVzWyAncGFkZGluZ0lubGluZUVuZCcgXTtcbn07XG5cbmNvbnN0IGRpc2FibGVkU3R5bGVzID0gKCB7IGRpc2FibGVkIH06IElucHV0UHJvcHMgKSA9PiB7XG5cdGlmICggISBkaXNhYmxlZCApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzKCB7XG5cdFx0Y29sb3I6IENPTE9SUy51aS50ZXh0RGlzYWJsZWQsXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBmb250U2l6ZVN0eWxlcyA9ICggeyBpbnB1dFNpemU6IHNpemUgfTogSW5wdXRQcm9wcyApID0+IHtcblx0Y29uc3Qgc2l6ZXMgPSB7XG5cdFx0ZGVmYXVsdDogJzEzcHgnLFxuXHRcdHNtYWxsOiAnMTFweCcsXG5cdFx0Y29tcGFjdDogJzEzcHgnLFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzogJzEzcHgnLFxuXHR9O1xuXG5cdGNvbnN0IGZvbnRTaXplID0gc2l6ZXNbIHNpemUgYXMgU2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG5cdGNvbnN0IGZvbnRTaXplTW9iaWxlID0gJzE2cHgnO1xuXG5cdGlmICggISBmb250U2l6ZSApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdGZvbnQtc2l6ZTogJHsgZm9udFNpemVNb2JpbGUgfTtcblxuXHRcdEBtZWRpYSAoIG1pbi13aWR0aDogNjAwcHggKSB7XG5cdFx0XHRmb250LXNpemU6ICR7IGZvbnRTaXplIH07XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGdldFNpemVDb25maWcgPSAoIHtcblx0aW5wdXRTaXplOiBzaXplLFxuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBJbnB1dFByb3BzICkgPT4ge1xuXHQvLyBQYWRkaW5ncyBtYXkgYmUgb3ZlcnJpZGRlbiBieSB0aGUgY3VzdG9tIHBhZGRpbmdzIHByb3BzLlxuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiB7XG5cdFx0XHRoZWlnaHQ6IDQwLFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogNDAsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHRcdHBhZGRpbmdSaWdodDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHR9LFxuXHRcdHNtYWxsOiB7XG5cdFx0XHRoZWlnaHQ6IDI0LFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogMjQsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0fSxcblx0XHRjb21wYWN0OiB7XG5cdFx0XHRoZWlnaHQ6IDMyLFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogMzIsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0fSxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdH0sXG5cdH07XG5cblx0aWYgKCAhIF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSApIHtcblx0XHRzaXplcy5kZWZhdWx0ID0gc2l6ZXMuY29tcGFjdDtcblx0fVxuXG5cdHJldHVybiBzaXplc1sgc2l6ZSBhcyBTaXplIF0gfHwgc2l6ZXMuZGVmYXVsdDtcbn07XG5cbmNvbnN0IHNpemVTdHlsZXMgPSAoIHByb3BzOiBJbnB1dFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCBnZXRTaXplQ29uZmlnKCBwcm9wcyApICk7XG59O1xuXG5jb25zdCBjdXN0b21QYWRkaW5ncyA9ICgge1xuXHRwYWRkaW5nSW5saW5lU3RhcnQsXG5cdHBhZGRpbmdJbmxpbmVFbmQsXG59OiBJbnB1dFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCB7IHBhZGRpbmdJbmxpbmVTdGFydCwgcGFkZGluZ0lubGluZUVuZCB9ICk7XG59O1xuXG5jb25zdCBkcmFnU3R5bGVzID0gKCB7IGlzRHJhZ2dpbmcsIGRyYWdDdXJzb3IgfTogSW5wdXRQcm9wcyApID0+IHtcblx0bGV0IGRlZmF1bHRBcnJvd1N0eWxlczogU2VyaWFsaXplZFN0eWxlcyB8IHVuZGVmaW5lZDtcblx0bGV0IGFjdGl2ZURyYWdDdXJzb3JTdHlsZXM6IFNlcmlhbGl6ZWRTdHlsZXMgfCB1bmRlZmluZWQ7XG5cblx0aWYgKCBpc0RyYWdnaW5nICkge1xuXHRcdGRlZmF1bHRBcnJvd1N0eWxlcyA9IGNzc2Bcblx0XHRcdGN1cnNvcjogJHsgZHJhZ0N1cnNvciB9O1xuXHRcdFx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cblx0XHRcdCY6Oi13ZWJraXQtb3V0ZXItc3Bpbi1idXR0b24sXG5cdFx0XHQmOjotd2Via2l0LWlubmVyLXNwaW4tYnV0dG9uIHtcblx0XHRcdFx0LXdlYmtpdC1hcHBlYXJhbmNlOiBub25lICFpbXBvcnRhbnQ7XG5cdFx0XHRcdG1hcmdpbjogMCAhaW1wb3J0YW50O1xuXHRcdFx0fVxuXHRcdGA7XG5cdH1cblxuXHRpZiAoIGlzRHJhZ2dpbmcgJiYgZHJhZ0N1cnNvciApIHtcblx0XHRhY3RpdmVEcmFnQ3Vyc29yU3R5bGVzID0gY3NzYFxuXHRcdFx0JjphY3RpdmUge1xuXHRcdFx0XHRjdXJzb3I6ICR7IGRyYWdDdXJzb3IgfTtcblx0XHRcdH1cblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHQkeyBkZWZhdWx0QXJyb3dTdHlsZXMgfVxuXHRcdCR7IGFjdGl2ZURyYWdDdXJzb3JTdHlsZXMgfVxuXHRgO1xufTtcblxuLy8gVE9ETzogUmVzb2x2ZSBuZWVkIHRvIHVzZSAmJiYgdG8gaW5jcmVhc2Ugc3BlY2lmaWNpdHlcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9Xb3JkUHJlc3MvZ3V0ZW5iZXJnL2lzc3Vlcy8xODQ4M1xuXG5leHBvcnQgY29uc3QgSW5wdXQgPSBzdHlsZWQuaW5wdXQ8IElucHV0UHJvcHMgPmBcblx0JiYmIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDtcblx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdGJvcmRlcjogbm9uZTtcblx0XHRib3gtc2hhZG93OiBub25lICFpbXBvcnRhbnQ7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdFx0bWFyZ2luOiAwO1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cblx0XHQkeyBkcmFnU3R5bGVzIH1cblx0XHQkeyBkaXNhYmxlZFN0eWxlcyB9XG5cdFx0JHsgZm9udFNpemVTdHlsZXMgfVxuXHRcdCR7IHNpemVTdHlsZXMgfVxuXHRcdCR7IGN1c3RvbVBhZGRpbmdzIH1cblxuXHRcdCY6Oi13ZWJraXQtaW5wdXQtcGxhY2Vob2xkZXIge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy51aS5kYXJrR3JheVBsYWNlaG9sZGVyIH07XG5cdFx0fVxuXG5cdFx0Jjo6LW1vei1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOi1tcy1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmW3R5cGU9J2VtYWlsJ10sXG5cdFx0Jlt0eXBlPSd1cmwnXSB7XG5cdFx0XHQvKiBydGw6aWdub3JlICovXG5cdFx0XHRkaXJlY3Rpb246IGx0cjtcblx0XHR9XG5cdH1cbmA7XG5cbmNvbnN0IEJhc2VMYWJlbCA9IHN0eWxlZCggVGV4dCApPCB7IGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uIH0gPmBcblx0JiYmIHtcblx0XHQkeyBiYXNlTGFiZWxUeXBvZ3JhcGh5IH07XG5cblx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdHBhZGRpbmctdG9wOiAwO1xuXHRcdHBhZGRpbmctYm90dG9tOiAwO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0XHR6LWluZGV4OiAxO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTGFiZWwgPSAoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczxcblx0XHR7IGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uOyBjaGlsZHJlbjogUmVhY3ROb2RlIH0sXG5cdFx0J2xhYmVsJyxcblx0XHRmYWxzZVxuXHQ+XG4pID0+IDxCYXNlTGFiZWwgeyAuLi5wcm9wcyB9IGFzPVwibGFiZWxcIiAvPjtcblxuZXhwb3J0IGNvbnN0IExhYmVsV3JhcHBlciA9IHN0eWxlZCggRmxleEl0ZW0gKWBcblx0bWF4LXdpZHRoOiBjYWxjKCAxMDAlIC0gMTBweCApO1xuYDtcblxuY29uc3QgcHJlZml4U3VmZml4V3JhcHBlclN0eWxlcyA9ICgge1xuXHR2YXJpYW50ID0gJ2RlZmF1bHQnLFxuXHRzaXplLFxuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdGlzUHJlZml4LFxufTogUHJlZml4U3VmZml4V3JhcHBlclByb3BzICYgeyBpc1ByZWZpeD86IGJvb2xlYW4gfSApID0+IHtcblx0Y29uc3QgeyBwYWRkaW5nTGVmdDogcGFkZGluZyB9ID0gZ2V0U2l6ZUNvbmZpZygge1xuXHRcdGlucHV0U2l6ZTogc2l6ZSxcblx0XHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdH0gKTtcblxuXHRjb25zdCBwYWRkaW5nUHJvcGVydHkgPSBpc1ByZWZpeFxuXHRcdD8gJ3BhZGRpbmdJbmxpbmVTdGFydCdcblx0XHQ6ICdwYWRkaW5nSW5saW5lRW5kJztcblxuXHRpZiAoIHZhcmlhbnQgPT09ICdkZWZhdWx0JyApIHtcblx0XHRyZXR1cm4gY3NzKCB7XG5cdFx0XHRbIHBhZGRpbmdQcm9wZXJ0eSBdOiBwYWRkaW5nLFxuXHRcdH0gKTtcblx0fVxuXG5cdC8vIElmIHZhcmlhbnQgaXMgJ2ljb24nIG9yICdjb250cm9sJ1xuXHRyZXR1cm4gY3NzKCB7XG5cdFx0ZGlzcGxheTogJ2ZsZXgnLFxuXHRcdFsgcGFkZGluZ1Byb3BlcnR5IF06IHBhZGRpbmcgLSA0LFxuXHR9ICk7XG59O1xuXG5leHBvcnQgY29uc3QgUHJlZml4U3VmZml4V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdCR7IHByZWZpeFN1ZmZpeFdyYXBwZXJTdHlsZXMgfVxuYDtcbiJdfQ== */"));
  var Root = /* @__PURE__ */ createStyled(component_default3, false ? {
    target: "em5sgkm5"
  } : {
    target: "em5sgkm5",
    label: "Root"
  })("box-sizing:border-box;position:relative;border-radius:", config_values_default.radiusSmall, ";padding-top:0;&:focus-within:not( :has( :is( ", Prefix, ", ", Suffix, " ):focus-within ) ){", BackdropUI, "{border-color:", COLORS.ui.borderFocus, ";box-shadow:", config_values_default.controlBoxShadowFocus, ";outline:2px solid transparent;outline-offset:-2px;}}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE0RWtDIiwiZmlsZSI6ImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgU2VyaWFsaXplZFN0eWxlcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB0eXBlIHsgQ1NTUHJvcGVydGllcywgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzIH0gZnJvbSAnLi4vLi4vY29udGV4dCc7XG5pbXBvcnQgeyBGbGV4LCBGbGV4SXRlbSB9IGZyb20gJy4uLy4uL2ZsZXgnO1xuaW1wb3J0IHsgVGV4dCB9IGZyb20gJy4uLy4uL3RleHQnO1xuaW1wb3J0IHsgYmFzZUxhYmVsVHlwb2dyYXBoeSwgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgTGFiZWxQb3NpdGlvbiwgU2l6ZSwgUHJlZml4U3VmZml4V3JhcHBlclByb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuXG50eXBlIENvbnRhaW5lclByb3BzID0ge1xuXHRkaXNhYmxlZD86IGJvb2xlYW47XG5cdGhpZGVMYWJlbD86IGJvb2xlYW47XG5cdF9fdW5zdGFibGVJbnB1dFdpZHRoPzogQ1NTUHJvcGVydGllc1sgJ3dpZHRoJyBdO1xuXHRsYWJlbFBvc2l0aW9uPzogTGFiZWxQb3NpdGlvbjtcbn07XG5cbmV4cG9ydCBjb25zdCBQcmVmaXggPSBzdHlsZWQuc3BhbmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VmZml4ID0gc3R5bGVkLnNwYW5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGFsaWduLXNlbGY6IHN0cmV0Y2g7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGZsZXg7XG5gO1xuXG50eXBlIEJhY2tkcm9wUHJvcHMgPSB7XG5cdGRpc2FibGVkPzogYm9vbGVhbjtcblx0aXNCb3JkZXJsZXNzPzogYm9vbGVhbjtcbn07XG5cbmNvbnN0IGJhY2tkcm9wQm9yZGVyQ29sb3IgPSAoIHtcblx0ZGlzYWJsZWQsXG5cdGlzQm9yZGVybGVzcyxcbn06IEJhY2tkcm9wUHJvcHMgKTogQ1NTUHJvcGVydGllc1sgJ2JvcmRlckNvbG9yJyBdID0+IHtcblx0aWYgKCBpc0JvcmRlcmxlc3MgKSB7XG5cdFx0cmV0dXJuICd0cmFuc3BhcmVudCc7XG5cdH1cblxuXHRpZiAoIGRpc2FibGVkICkge1xuXHRcdHJldHVybiBDT0xPUlMudWkuYm9yZGVyRGlzYWJsZWQ7XG5cdH1cblxuXHRyZXR1cm4gQ09MT1JTLnVpLmJvcmRlcjtcbn07XG5cbmV4cG9ydCBjb25zdCBCYWNrZHJvcFVJID0gc3R5bGVkLmRpdjwgQmFja2Ryb3BQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyLWNvbG9yOiAkeyBiYWNrZHJvcEJvcmRlckNvbG9yIH07XG5cdFx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0XHRib3JkZXItc3R5bGU6IHNvbGlkO1xuXHRcdGJvcmRlci13aWR0aDogMXB4O1xuXHRcdGJvdHRvbTogMDtcblx0XHRsZWZ0OiAwO1xuXHRcdG1hcmdpbjogMDtcblx0XHRwYWRkaW5nOiAwO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRyaWdodDogMDtcblx0XHR0b3A6IDA7XG5cblx0XHQkeyBydGwoIHsgcGFkZGluZ0xlZnQ6IDIgfSApIH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQoIEZsZXggKWBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0cGFkZGluZy10b3A6IDA7XG5cblx0Ly8gRm9jdXMgd2l0aGluLCBleGNsdWRpbmcgY2FzZXMgd2hlcmUgYXV4aWxpYXJ5IGNvbnRyb2xzIGluIHByZWZpeCBvciBzdWZmaXggaGF2ZSBmb2N1cy5cblx0Jjpmb2N1cy13aXRoaW46bm90KCA6aGFzKCA6aXMoICR7IFByZWZpeCB9LCAkeyBTdWZmaXggfSApOmZvY3VzLXdpdGhpbiApICkge1xuXHRcdCR7IEJhY2tkcm9wVUkgfSB7XG5cdFx0XHRib3JkZXItY29sb3I6ICR7IENPTE9SUy51aS5ib3JkZXJGb2N1cyB9O1xuXHRcdFx0Ym94LXNoYWRvdzogJHsgQ09ORklHLmNvbnRyb2xCb3hTaGFkb3dGb2N1cyB9O1xuXHRcdFx0Ly8gV2luZG93cyBIaWdoIENvbnRyYXN0IG1vZGUgd2lsbCBzaG93IHRoaXMgb3V0bGluZSwgYnV0IG5vdCB0aGUgYm94LXNoYWRvdy5cblx0XHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRcdG91dGxpbmUtb2Zmc2V0OiAtMnB4O1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgY29udGFpbmVyRGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogQ29udGFpbmVyUHJvcHMgKSA9PiB7XG5cdGNvbnN0IGJhY2tncm91bmRDb2xvciA9IGRpc2FibGVkXG5cdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0OiBDT0xPUlMudWkuYmFja2dyb3VuZDtcblxuXHRyZXR1cm4gY3NzKCB7IGJhY2tncm91bmRDb2xvciB9ICk7XG59O1xuXG5jb25zdCBjb250YWluZXJXaWR0aFN0eWxlcyA9ICgge1xuXHRfX3Vuc3RhYmxlSW5wdXRXaWR0aCxcblx0bGFiZWxQb3NpdGlvbixcbn06IENvbnRhaW5lclByb3BzICkgPT4ge1xuXHRpZiAoICEgX191bnN0YWJsZUlucHV0V2lkdGggKSB7XG5cdFx0cmV0dXJuIGNzcyggeyB3aWR0aDogJzEwMCUnIH0gKTtcblx0fVxuXG5cdGlmICggbGFiZWxQb3NpdGlvbiA9PT0gJ3NpZGUnICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdGlmICggbGFiZWxQb3NpdGlvbiA9PT0gJ2VkZ2UnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdGZsZXg6IGAwIDAgJHsgX191bnN0YWJsZUlucHV0V2lkdGggfWAsXG5cdFx0fSApO1xuXHR9XG5cblx0cmV0dXJuIGNzcyggeyB3aWR0aDogX191bnN0YWJsZUlucHV0V2lkdGggfSApO1xufTtcblxuZXhwb3J0IGNvbnN0IENvbnRhaW5lciA9IHN0eWxlZC5kaXY8IENvbnRhaW5lclByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdGRpc3BsYXk6IGZsZXg7XG5cdGZsZXg6IDE7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuXHQkeyBjb250YWluZXJEaXNhYmxlZFN0eWxlcyB9XG5cdCR7IGNvbnRhaW5lcldpZHRoU3R5bGVzIH1cbmA7XG5cbnR5cGUgSW5wdXRQcm9wcyA9IHtcblx0X19uZXh0NDBweERlZmF1bHRTaXplPzogYm9vbGVhbjtcblx0ZGlzYWJsZWQ/OiBib29sZWFuO1xuXHRpbnB1dFNpemU/OiBTaXplO1xuXHRpc0RyYWdnaW5nPzogYm9vbGVhbjtcblx0ZHJhZ0N1cnNvcj86IENTU1Byb3BlcnRpZXNbICdjdXJzb3InIF07XG5cdHBhZGRpbmdJbmxpbmVTdGFydD86IENTU1Byb3BlcnRpZXNbICdwYWRkaW5nSW5saW5lU3RhcnQnIF07XG5cdHBhZGRpbmdJbmxpbmVFbmQ/OiBDU1NQcm9wZXJ0aWVzWyAncGFkZGluZ0lubGluZUVuZCcgXTtcbn07XG5cbmNvbnN0IGRpc2FibGVkU3R5bGVzID0gKCB7IGRpc2FibGVkIH06IElucHV0UHJvcHMgKSA9PiB7XG5cdGlmICggISBkaXNhYmxlZCApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzKCB7XG5cdFx0Y29sb3I6IENPTE9SUy51aS50ZXh0RGlzYWJsZWQsXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBmb250U2l6ZVN0eWxlcyA9ICggeyBpbnB1dFNpemU6IHNpemUgfTogSW5wdXRQcm9wcyApID0+IHtcblx0Y29uc3Qgc2l6ZXMgPSB7XG5cdFx0ZGVmYXVsdDogJzEzcHgnLFxuXHRcdHNtYWxsOiAnMTFweCcsXG5cdFx0Y29tcGFjdDogJzEzcHgnLFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzogJzEzcHgnLFxuXHR9O1xuXG5cdGNvbnN0IGZvbnRTaXplID0gc2l6ZXNbIHNpemUgYXMgU2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG5cdGNvbnN0IGZvbnRTaXplTW9iaWxlID0gJzE2cHgnO1xuXG5cdGlmICggISBmb250U2l6ZSApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdGZvbnQtc2l6ZTogJHsgZm9udFNpemVNb2JpbGUgfTtcblxuXHRcdEBtZWRpYSAoIG1pbi13aWR0aDogNjAwcHggKSB7XG5cdFx0XHRmb250LXNpemU6ICR7IGZvbnRTaXplIH07XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGdldFNpemVDb25maWcgPSAoIHtcblx0aW5wdXRTaXplOiBzaXplLFxuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBJbnB1dFByb3BzICkgPT4ge1xuXHQvLyBQYWRkaW5ncyBtYXkgYmUgb3ZlcnJpZGRlbiBieSB0aGUgY3VzdG9tIHBhZGRpbmdzIHByb3BzLlxuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiB7XG5cdFx0XHRoZWlnaHQ6IDQwLFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogNDAsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHRcdHBhZGRpbmdSaWdodDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHR9LFxuXHRcdHNtYWxsOiB7XG5cdFx0XHRoZWlnaHQ6IDI0LFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogMjQsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0fSxcblx0XHRjb21wYWN0OiB7XG5cdFx0XHRoZWlnaHQ6IDMyLFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogMzIsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0fSxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdH0sXG5cdH07XG5cblx0aWYgKCAhIF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSApIHtcblx0XHRzaXplcy5kZWZhdWx0ID0gc2l6ZXMuY29tcGFjdDtcblx0fVxuXG5cdHJldHVybiBzaXplc1sgc2l6ZSBhcyBTaXplIF0gfHwgc2l6ZXMuZGVmYXVsdDtcbn07XG5cbmNvbnN0IHNpemVTdHlsZXMgPSAoIHByb3BzOiBJbnB1dFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCBnZXRTaXplQ29uZmlnKCBwcm9wcyApICk7XG59O1xuXG5jb25zdCBjdXN0b21QYWRkaW5ncyA9ICgge1xuXHRwYWRkaW5nSW5saW5lU3RhcnQsXG5cdHBhZGRpbmdJbmxpbmVFbmQsXG59OiBJbnB1dFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCB7IHBhZGRpbmdJbmxpbmVTdGFydCwgcGFkZGluZ0lubGluZUVuZCB9ICk7XG59O1xuXG5jb25zdCBkcmFnU3R5bGVzID0gKCB7IGlzRHJhZ2dpbmcsIGRyYWdDdXJzb3IgfTogSW5wdXRQcm9wcyApID0+IHtcblx0bGV0IGRlZmF1bHRBcnJvd1N0eWxlczogU2VyaWFsaXplZFN0eWxlcyB8IHVuZGVmaW5lZDtcblx0bGV0IGFjdGl2ZURyYWdDdXJzb3JTdHlsZXM6IFNlcmlhbGl6ZWRTdHlsZXMgfCB1bmRlZmluZWQ7XG5cblx0aWYgKCBpc0RyYWdnaW5nICkge1xuXHRcdGRlZmF1bHRBcnJvd1N0eWxlcyA9IGNzc2Bcblx0XHRcdGN1cnNvcjogJHsgZHJhZ0N1cnNvciB9O1xuXHRcdFx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cblx0XHRcdCY6Oi13ZWJraXQtb3V0ZXItc3Bpbi1idXR0b24sXG5cdFx0XHQmOjotd2Via2l0LWlubmVyLXNwaW4tYnV0dG9uIHtcblx0XHRcdFx0LXdlYmtpdC1hcHBlYXJhbmNlOiBub25lICFpbXBvcnRhbnQ7XG5cdFx0XHRcdG1hcmdpbjogMCAhaW1wb3J0YW50O1xuXHRcdFx0fVxuXHRcdGA7XG5cdH1cblxuXHRpZiAoIGlzRHJhZ2dpbmcgJiYgZHJhZ0N1cnNvciApIHtcblx0XHRhY3RpdmVEcmFnQ3Vyc29yU3R5bGVzID0gY3NzYFxuXHRcdFx0JjphY3RpdmUge1xuXHRcdFx0XHRjdXJzb3I6ICR7IGRyYWdDdXJzb3IgfTtcblx0XHRcdH1cblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHQkeyBkZWZhdWx0QXJyb3dTdHlsZXMgfVxuXHRcdCR7IGFjdGl2ZURyYWdDdXJzb3JTdHlsZXMgfVxuXHRgO1xufTtcblxuLy8gVE9ETzogUmVzb2x2ZSBuZWVkIHRvIHVzZSAmJiYgdG8gaW5jcmVhc2Ugc3BlY2lmaWNpdHlcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9Xb3JkUHJlc3MvZ3V0ZW5iZXJnL2lzc3Vlcy8xODQ4M1xuXG5leHBvcnQgY29uc3QgSW5wdXQgPSBzdHlsZWQuaW5wdXQ8IElucHV0UHJvcHMgPmBcblx0JiYmIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDtcblx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdGJvcmRlcjogbm9uZTtcblx0XHRib3gtc2hhZG93OiBub25lICFpbXBvcnRhbnQ7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdFx0bWFyZ2luOiAwO1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cblx0XHQkeyBkcmFnU3R5bGVzIH1cblx0XHQkeyBkaXNhYmxlZFN0eWxlcyB9XG5cdFx0JHsgZm9udFNpemVTdHlsZXMgfVxuXHRcdCR7IHNpemVTdHlsZXMgfVxuXHRcdCR7IGN1c3RvbVBhZGRpbmdzIH1cblxuXHRcdCY6Oi13ZWJraXQtaW5wdXQtcGxhY2Vob2xkZXIge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy51aS5kYXJrR3JheVBsYWNlaG9sZGVyIH07XG5cdFx0fVxuXG5cdFx0Jjo6LW1vei1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOi1tcy1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmW3R5cGU9J2VtYWlsJ10sXG5cdFx0Jlt0eXBlPSd1cmwnXSB7XG5cdFx0XHQvKiBydGw6aWdub3JlICovXG5cdFx0XHRkaXJlY3Rpb246IGx0cjtcblx0XHR9XG5cdH1cbmA7XG5cbmNvbnN0IEJhc2VMYWJlbCA9IHN0eWxlZCggVGV4dCApPCB7IGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uIH0gPmBcblx0JiYmIHtcblx0XHQkeyBiYXNlTGFiZWxUeXBvZ3JhcGh5IH07XG5cblx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdHBhZGRpbmctdG9wOiAwO1xuXHRcdHBhZGRpbmctYm90dG9tOiAwO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0XHR6LWluZGV4OiAxO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTGFiZWwgPSAoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczxcblx0XHR7IGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uOyBjaGlsZHJlbjogUmVhY3ROb2RlIH0sXG5cdFx0J2xhYmVsJyxcblx0XHRmYWxzZVxuXHQ+XG4pID0+IDxCYXNlTGFiZWwgeyAuLi5wcm9wcyB9IGFzPVwibGFiZWxcIiAvPjtcblxuZXhwb3J0IGNvbnN0IExhYmVsV3JhcHBlciA9IHN0eWxlZCggRmxleEl0ZW0gKWBcblx0bWF4LXdpZHRoOiBjYWxjKCAxMDAlIC0gMTBweCApO1xuYDtcblxuY29uc3QgcHJlZml4U3VmZml4V3JhcHBlclN0eWxlcyA9ICgge1xuXHR2YXJpYW50ID0gJ2RlZmF1bHQnLFxuXHRzaXplLFxuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdGlzUHJlZml4LFxufTogUHJlZml4U3VmZml4V3JhcHBlclByb3BzICYgeyBpc1ByZWZpeD86IGJvb2xlYW4gfSApID0+IHtcblx0Y29uc3QgeyBwYWRkaW5nTGVmdDogcGFkZGluZyB9ID0gZ2V0U2l6ZUNvbmZpZygge1xuXHRcdGlucHV0U2l6ZTogc2l6ZSxcblx0XHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdH0gKTtcblxuXHRjb25zdCBwYWRkaW5nUHJvcGVydHkgPSBpc1ByZWZpeFxuXHRcdD8gJ3BhZGRpbmdJbmxpbmVTdGFydCdcblx0XHQ6ICdwYWRkaW5nSW5saW5lRW5kJztcblxuXHRpZiAoIHZhcmlhbnQgPT09ICdkZWZhdWx0JyApIHtcblx0XHRyZXR1cm4gY3NzKCB7XG5cdFx0XHRbIHBhZGRpbmdQcm9wZXJ0eSBdOiBwYWRkaW5nLFxuXHRcdH0gKTtcblx0fVxuXG5cdC8vIElmIHZhcmlhbnQgaXMgJ2ljb24nIG9yICdjb250cm9sJ1xuXHRyZXR1cm4gY3NzKCB7XG5cdFx0ZGlzcGxheTogJ2ZsZXgnLFxuXHRcdFsgcGFkZGluZ1Byb3BlcnR5IF06IHBhZGRpbmcgLSA0LFxuXHR9ICk7XG59O1xuXG5leHBvcnQgY29uc3QgUHJlZml4U3VmZml4V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdCR7IHByZWZpeFN1ZmZpeFdyYXBwZXJTdHlsZXMgfVxuYDtcbiJdfQ== */"));
  var containerDisabledStyles = ({
    disabled
  }) => {
    const backgroundColor = disabled ? COLORS.ui.backgroundDisabled : COLORS.ui.background;
    return /* @__PURE__ */ css({
      backgroundColor
    }, false ? "" : ";label:containerDisabledStyles;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtR1EiLCJmaWxlIjoiaW5wdXQtY29udHJvbC1zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHR5cGUgeyBDU1NQcm9wZXJ0aWVzLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi8uLi9jb250ZXh0JztcbmltcG9ydCB7IEZsZXgsIEZsZXhJdGVtIH0gZnJvbSAnLi4vLi4vZmxleCc7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vdGV4dCc7XG5pbXBvcnQgeyBiYXNlTGFiZWxUeXBvZ3JhcGh5LCBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHR5cGUgeyBMYWJlbFBvc2l0aW9uLCBTaXplLCBQcmVmaXhTdWZmaXhXcmFwcGVyUHJvcHMgfSBmcm9tICcuLi90eXBlcyc7XG5cbnR5cGUgQ29udGFpbmVyUHJvcHMgPSB7XG5cdGRpc2FibGVkPzogYm9vbGVhbjtcblx0aGlkZUxhYmVsPzogYm9vbGVhbjtcblx0X191bnN0YWJsZUlucHV0V2lkdGg/OiBDU1NQcm9wZXJ0aWVzWyAnd2lkdGgnIF07XG5cdGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uO1xufTtcblxuZXhwb3J0IGNvbnN0IFByZWZpeCA9IHN0eWxlZC5zcGFuYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBTdWZmaXggPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0YWxpZ24tc2VsZjogc3RyZXRjaDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbnR5cGUgQmFja2Ryb3BQcm9wcyA9IHtcblx0ZGlzYWJsZWQ/OiBib29sZWFuO1xuXHRpc0JvcmRlcmxlc3M/OiBib29sZWFuO1xufTtcblxuY29uc3QgYmFja2Ryb3BCb3JkZXJDb2xvciA9ICgge1xuXHRkaXNhYmxlZCxcblx0aXNCb3JkZXJsZXNzLFxufTogQmFja2Ryb3BQcm9wcyApOiBDU1NQcm9wZXJ0aWVzWyAnYm9yZGVyQ29sb3InIF0gPT4ge1xuXHRpZiAoIGlzQm9yZGVybGVzcyApIHtcblx0XHRyZXR1cm4gJ3RyYW5zcGFyZW50Jztcblx0fVxuXG5cdGlmICggZGlzYWJsZWQgKSB7XG5cdFx0cmV0dXJuIENPTE9SUy51aS5ib3JkZXJEaXNhYmxlZDtcblx0fVxuXG5cdHJldHVybiBDT0xPUlMudWkuYm9yZGVyO1xufTtcblxuZXhwb3J0IGNvbnN0IEJhY2tkcm9wVUkgPSBzdHlsZWQuZGl2PCBCYWNrZHJvcFByb3BzID5gXG5cdCYmJiB7XG5cdFx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0XHRib3JkZXItY29sb3I6ICR7IGJhY2tkcm9wQm9yZGVyQ29sb3IgfTtcblx0XHRib3JkZXItcmFkaXVzOiBpbmhlcml0O1xuXHRcdGJvcmRlci1zdHlsZTogc29saWQ7XG5cdFx0Ym9yZGVyLXdpZHRoOiAxcHg7XG5cdFx0Ym90dG9tOiAwO1xuXHRcdGxlZnQ6IDA7XG5cdFx0bWFyZ2luOiAwO1xuXHRcdHBhZGRpbmc6IDA7XG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdHJpZ2h0OiAwO1xuXHRcdHRvcDogMDtcblxuXHRcdCR7IHJ0bCggeyBwYWRkaW5nTGVmdDogMiB9ICkgfVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgUm9vdCA9IHN0eWxlZCggRmxleCApYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRwYWRkaW5nLXRvcDogMDtcblxuXHQvLyBGb2N1cyB3aXRoaW4sIGV4Y2x1ZGluZyBjYXNlcyB3aGVyZSBhdXhpbGlhcnkgY29udHJvbHMgaW4gcHJlZml4IG9yIHN1ZmZpeCBoYXZlIGZvY3VzLlxuXHQmOmZvY3VzLXdpdGhpbjpub3QoIDpoYXMoIDppcyggJHsgUHJlZml4IH0sICR7IFN1ZmZpeCB9ICk6Zm9jdXMtd2l0aGluICkgKSB7XG5cdFx0JHsgQmFja2Ryb3BVSSB9IHtcblx0XHRcdGJvcmRlci1jb2xvcjogJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRib3gtc2hhZG93OiAkeyBDT05GSUcuY29udHJvbEJveFNoYWRvd0ZvY3VzIH07XG5cdFx0XHQvLyBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSB3aWxsIHNob3cgdGhpcyBvdXRsaW5lLCBidXQgbm90IHRoZSBib3gtc2hhZG93LlxuXHRcdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdFx0b3V0bGluZS1vZmZzZXQ6IC0ycHg7XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBjb250YWluZXJEaXNhYmxlZFN0eWxlcyA9ICggeyBkaXNhYmxlZCB9OiBDb250YWluZXJQcm9wcyApID0+IHtcblx0Y29uc3QgYmFja2dyb3VuZENvbG9yID0gZGlzYWJsZWRcblx0XHQ/IENPTE9SUy51aS5iYWNrZ3JvdW5kRGlzYWJsZWRcblx0XHQ6IENPTE9SUy51aS5iYWNrZ3JvdW5kO1xuXG5cdHJldHVybiBjc3MoIHsgYmFja2dyb3VuZENvbG9yIH0gKTtcbn07XG5cbmNvbnN0IGNvbnRhaW5lcldpZHRoU3R5bGVzID0gKCB7XG5cdF9fdW5zdGFibGVJbnB1dFdpZHRoLFxuXHRsYWJlbFBvc2l0aW9uLFxufTogQ29udGFpbmVyUHJvcHMgKSA9PiB7XG5cdGlmICggISBfX3Vuc3RhYmxlSW5wdXRXaWR0aCApIHtcblx0XHRyZXR1cm4gY3NzKCB7IHdpZHRoOiAnMTAwJScgfSApO1xuXHR9XG5cblx0aWYgKCBsYWJlbFBvc2l0aW9uID09PSAnc2lkZScgKSB7XG5cdFx0cmV0dXJuICcnO1xuXHR9XG5cblx0aWYgKCBsYWJlbFBvc2l0aW9uID09PSAnZWRnZScgKSB7XG5cdFx0cmV0dXJuIGNzcygge1xuXHRcdFx0ZmxleDogYDAgMCAkeyBfX3Vuc3RhYmxlSW5wdXRXaWR0aCB9YCxcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4gY3NzKCB7IHdpZHRoOiBfX3Vuc3RhYmxlSW5wdXRXaWR0aCB9ICk7XG59O1xuXG5leHBvcnQgY29uc3QgQ29udGFpbmVyID0gc3R5bGVkLmRpdjwgQ29udGFpbmVyUHJvcHMgPmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleDogMTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXG5cdCR7IGNvbnRhaW5lckRpc2FibGVkU3R5bGVzIH1cblx0JHsgY29udGFpbmVyV2lkdGhTdHlsZXMgfVxuYDtcblxudHlwZSBJbnB1dFByb3BzID0ge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemU/OiBib29sZWFuO1xuXHRkaXNhYmxlZD86IGJvb2xlYW47XG5cdGlucHV0U2l6ZT86IFNpemU7XG5cdGlzRHJhZ2dpbmc/OiBib29sZWFuO1xuXHRkcmFnQ3Vyc29yPzogQ1NTUHJvcGVydGllc1sgJ2N1cnNvcicgXTtcblx0cGFkZGluZ0lubGluZVN0YXJ0PzogQ1NTUHJvcGVydGllc1sgJ3BhZGRpbmdJbmxpbmVTdGFydCcgXTtcblx0cGFkZGluZ0lubGluZUVuZD86IENTU1Byb3BlcnRpZXNbICdwYWRkaW5nSW5saW5lRW5kJyBdO1xufTtcblxuY29uc3QgZGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogSW5wdXRQcm9wcyApID0+IHtcblx0aWYgKCAhIGRpc2FibGVkICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogQ09MT1JTLnVpLnRleHREaXNhYmxlZCxcblx0fSApO1xufTtcblxuZXhwb3J0IGNvbnN0IGZvbnRTaXplU3R5bGVzID0gKCB7IGlucHV0U2l6ZTogc2l6ZSB9OiBJbnB1dFByb3BzICkgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiAnMTNweCcsXG5cdFx0c21hbGw6ICcxMXB4Jyxcblx0XHRjb21wYWN0OiAnMTNweCcsXG5cdFx0J19fdW5zdGFibGUtbGFyZ2UnOiAnMTNweCcsXG5cdH07XG5cblx0Y29uc3QgZm9udFNpemUgPSBzaXplc1sgc2l6ZSBhcyBTaXplIF0gfHwgc2l6ZXMuZGVmYXVsdDtcblx0Y29uc3QgZm9udFNpemVNb2JpbGUgPSAnMTZweCc7XG5cblx0aWYgKCAhIGZvbnRTaXplICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdHJldHVybiBjc3NgXG5cdFx0Zm9udC1zaXplOiAkeyBmb250U2l6ZU1vYmlsZSB9O1xuXG5cdFx0QG1lZGlhICggbWluLXdpZHRoOiA2MDBweCApIHtcblx0XHRcdGZvbnQtc2l6ZTogJHsgZm9udFNpemUgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgZ2V0U2l6ZUNvbmZpZyA9ICgge1xuXHRpbnB1dFNpemU6IHNpemUsXG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcbn06IElucHV0UHJvcHMgKSA9PiB7XG5cdC8vIFBhZGRpbmdzIG1heSBiZSBvdmVycmlkZGVuIGJ5IHRoZSBjdXN0b20gcGFkZGluZ3MgcHJvcHMuXG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdH0sXG5cdFx0c21hbGw6IHtcblx0XHRcdGhlaWdodDogMjQsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiAyNCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHR9LFxuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdGhlaWdodDogMzIsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiAzMixcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHR9LFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzoge1xuXHRcdFx0aGVpZ2h0OiA0MCxcblx0XHRcdGxpbmVIZWlnaHQ6IDEsXG5cdFx0XHRtaW5IZWlnaHQ6IDQwLFxuXHRcdFx0cGFkZGluZ0xlZnQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdFx0fSxcblx0fTtcblxuXHRpZiAoICEgX19uZXh0NDBweERlZmF1bHRTaXplICkge1xuXHRcdHNpemVzLmRlZmF1bHQgPSBzaXplcy5jb21wYWN0O1xuXHR9XG5cblx0cmV0dXJuIHNpemVzWyBzaXplIGFzIFNpemUgXSB8fCBzaXplcy5kZWZhdWx0O1xufTtcblxuY29uc3Qgc2l6ZVN0eWxlcyA9ICggcHJvcHM6IElucHV0UHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIGdldFNpemVDb25maWcoIHByb3BzICkgKTtcbn07XG5cbmNvbnN0IGN1c3RvbVBhZGRpbmdzID0gKCB7XG5cdHBhZGRpbmdJbmxpbmVTdGFydCxcblx0cGFkZGluZ0lubGluZUVuZCxcbn06IElucHV0UHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHsgcGFkZGluZ0lubGluZVN0YXJ0LCBwYWRkaW5nSW5saW5lRW5kIH0gKTtcbn07XG5cbmNvbnN0IGRyYWdTdHlsZXMgPSAoIHsgaXNEcmFnZ2luZywgZHJhZ0N1cnNvciB9OiBJbnB1dFByb3BzICkgPT4ge1xuXHRsZXQgZGVmYXVsdEFycm93U3R5bGVzOiBTZXJpYWxpemVkU3R5bGVzIHwgdW5kZWZpbmVkO1xuXHRsZXQgYWN0aXZlRHJhZ0N1cnNvclN0eWxlczogU2VyaWFsaXplZFN0eWxlcyB8IHVuZGVmaW5lZDtcblxuXHRpZiAoIGlzRHJhZ2dpbmcgKSB7XG5cdFx0ZGVmYXVsdEFycm93U3R5bGVzID0gY3NzYFxuXHRcdFx0Y3Vyc29yOiAkeyBkcmFnQ3Vyc29yIH07XG5cdFx0XHR1c2VyLXNlbGVjdDogbm9uZTtcblxuXHRcdFx0Jjo6LXdlYmtpdC1vdXRlci1zcGluLWJ1dHRvbixcblx0XHRcdCY6Oi13ZWJraXQtaW5uZXItc3Bpbi1idXR0b24ge1xuXHRcdFx0XHQtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmUgIWltcG9ydGFudDtcblx0XHRcdFx0bWFyZ2luOiAwICFpbXBvcnRhbnQ7XG5cdFx0XHR9XG5cdFx0YDtcblx0fVxuXG5cdGlmICggaXNEcmFnZ2luZyAmJiBkcmFnQ3Vyc29yICkge1xuXHRcdGFjdGl2ZURyYWdDdXJzb3JTdHlsZXMgPSBjc3NgXG5cdFx0XHQmOmFjdGl2ZSB7XG5cdFx0XHRcdGN1cnNvcjogJHsgZHJhZ0N1cnNvciB9O1xuXHRcdFx0fVxuXHRcdGA7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdCR7IGRlZmF1bHRBcnJvd1N0eWxlcyB9XG5cdFx0JHsgYWN0aXZlRHJhZ0N1cnNvclN0eWxlcyB9XG5cdGA7XG59O1xuXG4vLyBUT0RPOiBSZXNvbHZlIG5lZWQgdG8gdXNlICYmJiB0byBpbmNyZWFzZSBzcGVjaWZpY2l0eVxuLy8gaHR0cHM6Ly9naXRodWIuY29tL1dvcmRQcmVzcy9ndXRlbmJlcmcvaXNzdWVzLzE4NDgzXG5cbmV4cG9ydCBjb25zdCBJbnB1dCA9IHN0eWxlZC5pbnB1dDwgSW5wdXRQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyOiBub25lO1xuXHRcdGJveC1zaGFkb3c6IG5vbmUgIWltcG9ydGFudDtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRmb250LWZhbWlseTogaW5oZXJpdDtcblx0XHRtYXJnaW46IDA7XG5cdFx0b3V0bGluZTogbm9uZTtcblx0XHR3aWR0aDogMTAwJTtcblxuXHRcdCR7IGRyYWdTdHlsZXMgfVxuXHRcdCR7IGRpc2FibGVkU3R5bGVzIH1cblx0XHQkeyBmb250U2l6ZVN0eWxlcyB9XG5cdFx0JHsgc2l6ZVN0eWxlcyB9XG5cdFx0JHsgY3VzdG9tUGFkZGluZ3MgfVxuXG5cdFx0Jjo6LXdlYmtpdC1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOjotbW96LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblxuXHRcdCY6LW1zLWlucHV0LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblxuXHRcdCZbdHlwZT0nZW1haWwnXSxcblx0XHQmW3R5cGU9J3VybCddIHtcblx0XHRcdC8qIHJ0bDppZ25vcmUgKi9cblx0XHRcdGRpcmVjdGlvbjogbHRyO1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgQmFzZUxhYmVsID0gc3R5bGVkKCBUZXh0ICk8IHsgbGFiZWxQb3NpdGlvbj86IExhYmVsUG9zaXRpb24gfSA+YFxuXHQmJiYge1xuXHRcdCR7IGJhc2VMYWJlbFR5cG9ncmFwaHkgfTtcblxuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0cGFkZGluZy10b3A6IDA7XG5cdFx0cGFkZGluZy1ib3R0b206IDA7XG5cdFx0bWF4LXdpZHRoOiAxMDAlO1xuXHRcdHotaW5kZXg6IDE7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBMYWJlbCA9IChcblx0cHJvcHM6IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzPFxuXHRcdHsgbGFiZWxQb3NpdGlvbj86IExhYmVsUG9zaXRpb247IGNoaWxkcmVuOiBSZWFjdE5vZGUgfSxcblx0XHQnbGFiZWwnLFxuXHRcdGZhbHNlXG5cdD5cbikgPT4gPEJhc2VMYWJlbCB7IC4uLnByb3BzIH0gYXM9XCJsYWJlbFwiIC8+O1xuXG5leHBvcnQgY29uc3QgTGFiZWxXcmFwcGVyID0gc3R5bGVkKCBGbGV4SXRlbSApYFxuXHRtYXgtd2lkdGg6IGNhbGMoIDEwMCUgLSAxMHB4ICk7XG5gO1xuXG5jb25zdCBwcmVmaXhTdWZmaXhXcmFwcGVyU3R5bGVzID0gKCB7XG5cdHZhcmlhbnQgPSAnZGVmYXVsdCcsXG5cdHNpemUsXG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0aXNQcmVmaXgsXG59OiBQcmVmaXhTdWZmaXhXcmFwcGVyUHJvcHMgJiB7IGlzUHJlZml4PzogYm9vbGVhbiB9ICkgPT4ge1xuXHRjb25zdCB7IHBhZGRpbmdMZWZ0OiBwYWRkaW5nIH0gPSBnZXRTaXplQ29uZmlnKCB7XG5cdFx0aW5wdXRTaXplOiBzaXplLFxuXHRcdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0fSApO1xuXG5cdGNvbnN0IHBhZGRpbmdQcm9wZXJ0eSA9IGlzUHJlZml4XG5cdFx0PyAncGFkZGluZ0lubGluZVN0YXJ0J1xuXHRcdDogJ3BhZGRpbmdJbmxpbmVFbmQnO1xuXG5cdGlmICggdmFyaWFudCA9PT0gJ2RlZmF1bHQnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdFsgcGFkZGluZ1Byb3BlcnR5IF06IHBhZGRpbmcsXG5cdFx0fSApO1xuXHR9XG5cblx0Ly8gSWYgdmFyaWFudCBpcyAnaWNvbicgb3IgJ2NvbnRyb2wnXG5cdHJldHVybiBjc3MoIHtcblx0XHRkaXNwbGF5OiAnZmxleCcsXG5cdFx0WyBwYWRkaW5nUHJvcGVydHkgXTogcGFkZGluZyAtIDQsXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBQcmVmaXhTdWZmaXhXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0JHsgcHJlZml4U3VmZml4V3JhcHBlclN0eWxlcyB9XG5gO1xuIl19 */");
  };
  var _ref2 = false ? {
    name: "1d3w5wq",
    styles: "width:100%"
  } : {
    name: "uo2pd2-containerWidthStyles",
    styles: "width:100%;label:containerWidthStyles;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyR1MiLCJmaWxlIjoiaW5wdXQtY29udHJvbC1zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHR5cGUgeyBDU1NQcm9wZXJ0aWVzLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi8uLi9jb250ZXh0JztcbmltcG9ydCB7IEZsZXgsIEZsZXhJdGVtIH0gZnJvbSAnLi4vLi4vZmxleCc7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vdGV4dCc7XG5pbXBvcnQgeyBiYXNlTGFiZWxUeXBvZ3JhcGh5LCBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHR5cGUgeyBMYWJlbFBvc2l0aW9uLCBTaXplLCBQcmVmaXhTdWZmaXhXcmFwcGVyUHJvcHMgfSBmcm9tICcuLi90eXBlcyc7XG5cbnR5cGUgQ29udGFpbmVyUHJvcHMgPSB7XG5cdGRpc2FibGVkPzogYm9vbGVhbjtcblx0aGlkZUxhYmVsPzogYm9vbGVhbjtcblx0X191bnN0YWJsZUlucHV0V2lkdGg/OiBDU1NQcm9wZXJ0aWVzWyAnd2lkdGgnIF07XG5cdGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uO1xufTtcblxuZXhwb3J0IGNvbnN0IFByZWZpeCA9IHN0eWxlZC5zcGFuYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBTdWZmaXggPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0YWxpZ24tc2VsZjogc3RyZXRjaDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbnR5cGUgQmFja2Ryb3BQcm9wcyA9IHtcblx0ZGlzYWJsZWQ/OiBib29sZWFuO1xuXHRpc0JvcmRlcmxlc3M/OiBib29sZWFuO1xufTtcblxuY29uc3QgYmFja2Ryb3BCb3JkZXJDb2xvciA9ICgge1xuXHRkaXNhYmxlZCxcblx0aXNCb3JkZXJsZXNzLFxufTogQmFja2Ryb3BQcm9wcyApOiBDU1NQcm9wZXJ0aWVzWyAnYm9yZGVyQ29sb3InIF0gPT4ge1xuXHRpZiAoIGlzQm9yZGVybGVzcyApIHtcblx0XHRyZXR1cm4gJ3RyYW5zcGFyZW50Jztcblx0fVxuXG5cdGlmICggZGlzYWJsZWQgKSB7XG5cdFx0cmV0dXJuIENPTE9SUy51aS5ib3JkZXJEaXNhYmxlZDtcblx0fVxuXG5cdHJldHVybiBDT0xPUlMudWkuYm9yZGVyO1xufTtcblxuZXhwb3J0IGNvbnN0IEJhY2tkcm9wVUkgPSBzdHlsZWQuZGl2PCBCYWNrZHJvcFByb3BzID5gXG5cdCYmJiB7XG5cdFx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0XHRib3JkZXItY29sb3I6ICR7IGJhY2tkcm9wQm9yZGVyQ29sb3IgfTtcblx0XHRib3JkZXItcmFkaXVzOiBpbmhlcml0O1xuXHRcdGJvcmRlci1zdHlsZTogc29saWQ7XG5cdFx0Ym9yZGVyLXdpZHRoOiAxcHg7XG5cdFx0Ym90dG9tOiAwO1xuXHRcdGxlZnQ6IDA7XG5cdFx0bWFyZ2luOiAwO1xuXHRcdHBhZGRpbmc6IDA7XG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdHJpZ2h0OiAwO1xuXHRcdHRvcDogMDtcblxuXHRcdCR7IHJ0bCggeyBwYWRkaW5nTGVmdDogMiB9ICkgfVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgUm9vdCA9IHN0eWxlZCggRmxleCApYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRwYWRkaW5nLXRvcDogMDtcblxuXHQvLyBGb2N1cyB3aXRoaW4sIGV4Y2x1ZGluZyBjYXNlcyB3aGVyZSBhdXhpbGlhcnkgY29udHJvbHMgaW4gcHJlZml4IG9yIHN1ZmZpeCBoYXZlIGZvY3VzLlxuXHQmOmZvY3VzLXdpdGhpbjpub3QoIDpoYXMoIDppcyggJHsgUHJlZml4IH0sICR7IFN1ZmZpeCB9ICk6Zm9jdXMtd2l0aGluICkgKSB7XG5cdFx0JHsgQmFja2Ryb3BVSSB9IHtcblx0XHRcdGJvcmRlci1jb2xvcjogJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRib3gtc2hhZG93OiAkeyBDT05GSUcuY29udHJvbEJveFNoYWRvd0ZvY3VzIH07XG5cdFx0XHQvLyBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSB3aWxsIHNob3cgdGhpcyBvdXRsaW5lLCBidXQgbm90IHRoZSBib3gtc2hhZG93LlxuXHRcdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdFx0b3V0bGluZS1vZmZzZXQ6IC0ycHg7XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBjb250YWluZXJEaXNhYmxlZFN0eWxlcyA9ICggeyBkaXNhYmxlZCB9OiBDb250YWluZXJQcm9wcyApID0+IHtcblx0Y29uc3QgYmFja2dyb3VuZENvbG9yID0gZGlzYWJsZWRcblx0XHQ/IENPTE9SUy51aS5iYWNrZ3JvdW5kRGlzYWJsZWRcblx0XHQ6IENPTE9SUy51aS5iYWNrZ3JvdW5kO1xuXG5cdHJldHVybiBjc3MoIHsgYmFja2dyb3VuZENvbG9yIH0gKTtcbn07XG5cbmNvbnN0IGNvbnRhaW5lcldpZHRoU3R5bGVzID0gKCB7XG5cdF9fdW5zdGFibGVJbnB1dFdpZHRoLFxuXHRsYWJlbFBvc2l0aW9uLFxufTogQ29udGFpbmVyUHJvcHMgKSA9PiB7XG5cdGlmICggISBfX3Vuc3RhYmxlSW5wdXRXaWR0aCApIHtcblx0XHRyZXR1cm4gY3NzKCB7IHdpZHRoOiAnMTAwJScgfSApO1xuXHR9XG5cblx0aWYgKCBsYWJlbFBvc2l0aW9uID09PSAnc2lkZScgKSB7XG5cdFx0cmV0dXJuICcnO1xuXHR9XG5cblx0aWYgKCBsYWJlbFBvc2l0aW9uID09PSAnZWRnZScgKSB7XG5cdFx0cmV0dXJuIGNzcygge1xuXHRcdFx0ZmxleDogYDAgMCAkeyBfX3Vuc3RhYmxlSW5wdXRXaWR0aCB9YCxcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4gY3NzKCB7IHdpZHRoOiBfX3Vuc3RhYmxlSW5wdXRXaWR0aCB9ICk7XG59O1xuXG5leHBvcnQgY29uc3QgQ29udGFpbmVyID0gc3R5bGVkLmRpdjwgQ29udGFpbmVyUHJvcHMgPmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleDogMTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXG5cdCR7IGNvbnRhaW5lckRpc2FibGVkU3R5bGVzIH1cblx0JHsgY29udGFpbmVyV2lkdGhTdHlsZXMgfVxuYDtcblxudHlwZSBJbnB1dFByb3BzID0ge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemU/OiBib29sZWFuO1xuXHRkaXNhYmxlZD86IGJvb2xlYW47XG5cdGlucHV0U2l6ZT86IFNpemU7XG5cdGlzRHJhZ2dpbmc/OiBib29sZWFuO1xuXHRkcmFnQ3Vyc29yPzogQ1NTUHJvcGVydGllc1sgJ2N1cnNvcicgXTtcblx0cGFkZGluZ0lubGluZVN0YXJ0PzogQ1NTUHJvcGVydGllc1sgJ3BhZGRpbmdJbmxpbmVTdGFydCcgXTtcblx0cGFkZGluZ0lubGluZUVuZD86IENTU1Byb3BlcnRpZXNbICdwYWRkaW5nSW5saW5lRW5kJyBdO1xufTtcblxuY29uc3QgZGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogSW5wdXRQcm9wcyApID0+IHtcblx0aWYgKCAhIGRpc2FibGVkICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogQ09MT1JTLnVpLnRleHREaXNhYmxlZCxcblx0fSApO1xufTtcblxuZXhwb3J0IGNvbnN0IGZvbnRTaXplU3R5bGVzID0gKCB7IGlucHV0U2l6ZTogc2l6ZSB9OiBJbnB1dFByb3BzICkgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiAnMTNweCcsXG5cdFx0c21hbGw6ICcxMXB4Jyxcblx0XHRjb21wYWN0OiAnMTNweCcsXG5cdFx0J19fdW5zdGFibGUtbGFyZ2UnOiAnMTNweCcsXG5cdH07XG5cblx0Y29uc3QgZm9udFNpemUgPSBzaXplc1sgc2l6ZSBhcyBTaXplIF0gfHwgc2l6ZXMuZGVmYXVsdDtcblx0Y29uc3QgZm9udFNpemVNb2JpbGUgPSAnMTZweCc7XG5cblx0aWYgKCAhIGZvbnRTaXplICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdHJldHVybiBjc3NgXG5cdFx0Zm9udC1zaXplOiAkeyBmb250U2l6ZU1vYmlsZSB9O1xuXG5cdFx0QG1lZGlhICggbWluLXdpZHRoOiA2MDBweCApIHtcblx0XHRcdGZvbnQtc2l6ZTogJHsgZm9udFNpemUgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgZ2V0U2l6ZUNvbmZpZyA9ICgge1xuXHRpbnB1dFNpemU6IHNpemUsXG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcbn06IElucHV0UHJvcHMgKSA9PiB7XG5cdC8vIFBhZGRpbmdzIG1heSBiZSBvdmVycmlkZGVuIGJ5IHRoZSBjdXN0b20gcGFkZGluZ3MgcHJvcHMuXG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdH0sXG5cdFx0c21hbGw6IHtcblx0XHRcdGhlaWdodDogMjQsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiAyNCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHR9LFxuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdGhlaWdodDogMzIsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiAzMixcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHR9LFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzoge1xuXHRcdFx0aGVpZ2h0OiA0MCxcblx0XHRcdGxpbmVIZWlnaHQ6IDEsXG5cdFx0XHRtaW5IZWlnaHQ6IDQwLFxuXHRcdFx0cGFkZGluZ0xlZnQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdFx0fSxcblx0fTtcblxuXHRpZiAoICEgX19uZXh0NDBweERlZmF1bHRTaXplICkge1xuXHRcdHNpemVzLmRlZmF1bHQgPSBzaXplcy5jb21wYWN0O1xuXHR9XG5cblx0cmV0dXJuIHNpemVzWyBzaXplIGFzIFNpemUgXSB8fCBzaXplcy5kZWZhdWx0O1xufTtcblxuY29uc3Qgc2l6ZVN0eWxlcyA9ICggcHJvcHM6IElucHV0UHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIGdldFNpemVDb25maWcoIHByb3BzICkgKTtcbn07XG5cbmNvbnN0IGN1c3RvbVBhZGRpbmdzID0gKCB7XG5cdHBhZGRpbmdJbmxpbmVTdGFydCxcblx0cGFkZGluZ0lubGluZUVuZCxcbn06IElucHV0UHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHsgcGFkZGluZ0lubGluZVN0YXJ0LCBwYWRkaW5nSW5saW5lRW5kIH0gKTtcbn07XG5cbmNvbnN0IGRyYWdTdHlsZXMgPSAoIHsgaXNEcmFnZ2luZywgZHJhZ0N1cnNvciB9OiBJbnB1dFByb3BzICkgPT4ge1xuXHRsZXQgZGVmYXVsdEFycm93U3R5bGVzOiBTZXJpYWxpemVkU3R5bGVzIHwgdW5kZWZpbmVkO1xuXHRsZXQgYWN0aXZlRHJhZ0N1cnNvclN0eWxlczogU2VyaWFsaXplZFN0eWxlcyB8IHVuZGVmaW5lZDtcblxuXHRpZiAoIGlzRHJhZ2dpbmcgKSB7XG5cdFx0ZGVmYXVsdEFycm93U3R5bGVzID0gY3NzYFxuXHRcdFx0Y3Vyc29yOiAkeyBkcmFnQ3Vyc29yIH07XG5cdFx0XHR1c2VyLXNlbGVjdDogbm9uZTtcblxuXHRcdFx0Jjo6LXdlYmtpdC1vdXRlci1zcGluLWJ1dHRvbixcblx0XHRcdCY6Oi13ZWJraXQtaW5uZXItc3Bpbi1idXR0b24ge1xuXHRcdFx0XHQtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmUgIWltcG9ydGFudDtcblx0XHRcdFx0bWFyZ2luOiAwICFpbXBvcnRhbnQ7XG5cdFx0XHR9XG5cdFx0YDtcblx0fVxuXG5cdGlmICggaXNEcmFnZ2luZyAmJiBkcmFnQ3Vyc29yICkge1xuXHRcdGFjdGl2ZURyYWdDdXJzb3JTdHlsZXMgPSBjc3NgXG5cdFx0XHQmOmFjdGl2ZSB7XG5cdFx0XHRcdGN1cnNvcjogJHsgZHJhZ0N1cnNvciB9O1xuXHRcdFx0fVxuXHRcdGA7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdCR7IGRlZmF1bHRBcnJvd1N0eWxlcyB9XG5cdFx0JHsgYWN0aXZlRHJhZ0N1cnNvclN0eWxlcyB9XG5cdGA7XG59O1xuXG4vLyBUT0RPOiBSZXNvbHZlIG5lZWQgdG8gdXNlICYmJiB0byBpbmNyZWFzZSBzcGVjaWZpY2l0eVxuLy8gaHR0cHM6Ly9naXRodWIuY29tL1dvcmRQcmVzcy9ndXRlbmJlcmcvaXNzdWVzLzE4NDgzXG5cbmV4cG9ydCBjb25zdCBJbnB1dCA9IHN0eWxlZC5pbnB1dDwgSW5wdXRQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyOiBub25lO1xuXHRcdGJveC1zaGFkb3c6IG5vbmUgIWltcG9ydGFudDtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRmb250LWZhbWlseTogaW5oZXJpdDtcblx0XHRtYXJnaW46IDA7XG5cdFx0b3V0bGluZTogbm9uZTtcblx0XHR3aWR0aDogMTAwJTtcblxuXHRcdCR7IGRyYWdTdHlsZXMgfVxuXHRcdCR7IGRpc2FibGVkU3R5bGVzIH1cblx0XHQkeyBmb250U2l6ZVN0eWxlcyB9XG5cdFx0JHsgc2l6ZVN0eWxlcyB9XG5cdFx0JHsgY3VzdG9tUGFkZGluZ3MgfVxuXG5cdFx0Jjo6LXdlYmtpdC1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOjotbW96LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblxuXHRcdCY6LW1zLWlucHV0LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblxuXHRcdCZbdHlwZT0nZW1haWwnXSxcblx0XHQmW3R5cGU9J3VybCddIHtcblx0XHRcdC8qIHJ0bDppZ25vcmUgKi9cblx0XHRcdGRpcmVjdGlvbjogbHRyO1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgQmFzZUxhYmVsID0gc3R5bGVkKCBUZXh0ICk8IHsgbGFiZWxQb3NpdGlvbj86IExhYmVsUG9zaXRpb24gfSA+YFxuXHQmJiYge1xuXHRcdCR7IGJhc2VMYWJlbFR5cG9ncmFwaHkgfTtcblxuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0cGFkZGluZy10b3A6IDA7XG5cdFx0cGFkZGluZy1ib3R0b206IDA7XG5cdFx0bWF4LXdpZHRoOiAxMDAlO1xuXHRcdHotaW5kZXg6IDE7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBMYWJlbCA9IChcblx0cHJvcHM6IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzPFxuXHRcdHsgbGFiZWxQb3NpdGlvbj86IExhYmVsUG9zaXRpb247IGNoaWxkcmVuOiBSZWFjdE5vZGUgfSxcblx0XHQnbGFiZWwnLFxuXHRcdGZhbHNlXG5cdD5cbikgPT4gPEJhc2VMYWJlbCB7IC4uLnByb3BzIH0gYXM9XCJsYWJlbFwiIC8+O1xuXG5leHBvcnQgY29uc3QgTGFiZWxXcmFwcGVyID0gc3R5bGVkKCBGbGV4SXRlbSApYFxuXHRtYXgtd2lkdGg6IGNhbGMoIDEwMCUgLSAxMHB4ICk7XG5gO1xuXG5jb25zdCBwcmVmaXhTdWZmaXhXcmFwcGVyU3R5bGVzID0gKCB7XG5cdHZhcmlhbnQgPSAnZGVmYXVsdCcsXG5cdHNpemUsXG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0aXNQcmVmaXgsXG59OiBQcmVmaXhTdWZmaXhXcmFwcGVyUHJvcHMgJiB7IGlzUHJlZml4PzogYm9vbGVhbiB9ICkgPT4ge1xuXHRjb25zdCB7IHBhZGRpbmdMZWZ0OiBwYWRkaW5nIH0gPSBnZXRTaXplQ29uZmlnKCB7XG5cdFx0aW5wdXRTaXplOiBzaXplLFxuXHRcdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0fSApO1xuXG5cdGNvbnN0IHBhZGRpbmdQcm9wZXJ0eSA9IGlzUHJlZml4XG5cdFx0PyAncGFkZGluZ0lubGluZVN0YXJ0J1xuXHRcdDogJ3BhZGRpbmdJbmxpbmVFbmQnO1xuXG5cdGlmICggdmFyaWFudCA9PT0gJ2RlZmF1bHQnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdFsgcGFkZGluZ1Byb3BlcnR5IF06IHBhZGRpbmcsXG5cdFx0fSApO1xuXHR9XG5cblx0Ly8gSWYgdmFyaWFudCBpcyAnaWNvbicgb3IgJ2NvbnRyb2wnXG5cdHJldHVybiBjc3MoIHtcblx0XHRkaXNwbGF5OiAnZmxleCcsXG5cdFx0WyBwYWRkaW5nUHJvcGVydHkgXTogcGFkZGluZyAtIDQsXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBQcmVmaXhTdWZmaXhXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0JHsgcHJlZml4U3VmZml4V3JhcHBlclN0eWxlcyB9XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__6
  };
  var containerWidthStyles = ({
    __unstableInputWidth,
    labelPosition
  }) => {
    if (!__unstableInputWidth) {
      return _ref2;
    }
    if (labelPosition === "side") {
      return "";
    }
    if (labelPosition === "edge") {
      return /* @__PURE__ */ css({
        flex: `0 0 ${__unstableInputWidth}`
      }, false ? "" : ";label:containerWidthStyles;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtSFMiLCJmaWxlIjoiaW5wdXQtY29udHJvbC1zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHR5cGUgeyBDU1NQcm9wZXJ0aWVzLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi8uLi9jb250ZXh0JztcbmltcG9ydCB7IEZsZXgsIEZsZXhJdGVtIH0gZnJvbSAnLi4vLi4vZmxleCc7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vdGV4dCc7XG5pbXBvcnQgeyBiYXNlTGFiZWxUeXBvZ3JhcGh5LCBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHR5cGUgeyBMYWJlbFBvc2l0aW9uLCBTaXplLCBQcmVmaXhTdWZmaXhXcmFwcGVyUHJvcHMgfSBmcm9tICcuLi90eXBlcyc7XG5cbnR5cGUgQ29udGFpbmVyUHJvcHMgPSB7XG5cdGRpc2FibGVkPzogYm9vbGVhbjtcblx0aGlkZUxhYmVsPzogYm9vbGVhbjtcblx0X191bnN0YWJsZUlucHV0V2lkdGg/OiBDU1NQcm9wZXJ0aWVzWyAnd2lkdGgnIF07XG5cdGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uO1xufTtcblxuZXhwb3J0IGNvbnN0IFByZWZpeCA9IHN0eWxlZC5zcGFuYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBTdWZmaXggPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0YWxpZ24tc2VsZjogc3RyZXRjaDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbnR5cGUgQmFja2Ryb3BQcm9wcyA9IHtcblx0ZGlzYWJsZWQ/OiBib29sZWFuO1xuXHRpc0JvcmRlcmxlc3M/OiBib29sZWFuO1xufTtcblxuY29uc3QgYmFja2Ryb3BCb3JkZXJDb2xvciA9ICgge1xuXHRkaXNhYmxlZCxcblx0aXNCb3JkZXJsZXNzLFxufTogQmFja2Ryb3BQcm9wcyApOiBDU1NQcm9wZXJ0aWVzWyAnYm9yZGVyQ29sb3InIF0gPT4ge1xuXHRpZiAoIGlzQm9yZGVybGVzcyApIHtcblx0XHRyZXR1cm4gJ3RyYW5zcGFyZW50Jztcblx0fVxuXG5cdGlmICggZGlzYWJsZWQgKSB7XG5cdFx0cmV0dXJuIENPTE9SUy51aS5ib3JkZXJEaXNhYmxlZDtcblx0fVxuXG5cdHJldHVybiBDT0xPUlMudWkuYm9yZGVyO1xufTtcblxuZXhwb3J0IGNvbnN0IEJhY2tkcm9wVUkgPSBzdHlsZWQuZGl2PCBCYWNrZHJvcFByb3BzID5gXG5cdCYmJiB7XG5cdFx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0XHRib3JkZXItY29sb3I6ICR7IGJhY2tkcm9wQm9yZGVyQ29sb3IgfTtcblx0XHRib3JkZXItcmFkaXVzOiBpbmhlcml0O1xuXHRcdGJvcmRlci1zdHlsZTogc29saWQ7XG5cdFx0Ym9yZGVyLXdpZHRoOiAxcHg7XG5cdFx0Ym90dG9tOiAwO1xuXHRcdGxlZnQ6IDA7XG5cdFx0bWFyZ2luOiAwO1xuXHRcdHBhZGRpbmc6IDA7XG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdHJpZ2h0OiAwO1xuXHRcdHRvcDogMDtcblxuXHRcdCR7IHJ0bCggeyBwYWRkaW5nTGVmdDogMiB9ICkgfVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgUm9vdCA9IHN0eWxlZCggRmxleCApYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRwYWRkaW5nLXRvcDogMDtcblxuXHQvLyBGb2N1cyB3aXRoaW4sIGV4Y2x1ZGluZyBjYXNlcyB3aGVyZSBhdXhpbGlhcnkgY29udHJvbHMgaW4gcHJlZml4IG9yIHN1ZmZpeCBoYXZlIGZvY3VzLlxuXHQmOmZvY3VzLXdpdGhpbjpub3QoIDpoYXMoIDppcyggJHsgUHJlZml4IH0sICR7IFN1ZmZpeCB9ICk6Zm9jdXMtd2l0aGluICkgKSB7XG5cdFx0JHsgQmFja2Ryb3BVSSB9IHtcblx0XHRcdGJvcmRlci1jb2xvcjogJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRib3gtc2hhZG93OiAkeyBDT05GSUcuY29udHJvbEJveFNoYWRvd0ZvY3VzIH07XG5cdFx0XHQvLyBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSB3aWxsIHNob3cgdGhpcyBvdXRsaW5lLCBidXQgbm90IHRoZSBib3gtc2hhZG93LlxuXHRcdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdFx0b3V0bGluZS1vZmZzZXQ6IC0ycHg7XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBjb250YWluZXJEaXNhYmxlZFN0eWxlcyA9ICggeyBkaXNhYmxlZCB9OiBDb250YWluZXJQcm9wcyApID0+IHtcblx0Y29uc3QgYmFja2dyb3VuZENvbG9yID0gZGlzYWJsZWRcblx0XHQ/IENPTE9SUy51aS5iYWNrZ3JvdW5kRGlzYWJsZWRcblx0XHQ6IENPTE9SUy51aS5iYWNrZ3JvdW5kO1xuXG5cdHJldHVybiBjc3MoIHsgYmFja2dyb3VuZENvbG9yIH0gKTtcbn07XG5cbmNvbnN0IGNvbnRhaW5lcldpZHRoU3R5bGVzID0gKCB7XG5cdF9fdW5zdGFibGVJbnB1dFdpZHRoLFxuXHRsYWJlbFBvc2l0aW9uLFxufTogQ29udGFpbmVyUHJvcHMgKSA9PiB7XG5cdGlmICggISBfX3Vuc3RhYmxlSW5wdXRXaWR0aCApIHtcblx0XHRyZXR1cm4gY3NzKCB7IHdpZHRoOiAnMTAwJScgfSApO1xuXHR9XG5cblx0aWYgKCBsYWJlbFBvc2l0aW9uID09PSAnc2lkZScgKSB7XG5cdFx0cmV0dXJuICcnO1xuXHR9XG5cblx0aWYgKCBsYWJlbFBvc2l0aW9uID09PSAnZWRnZScgKSB7XG5cdFx0cmV0dXJuIGNzcygge1xuXHRcdFx0ZmxleDogYDAgMCAkeyBfX3Vuc3RhYmxlSW5wdXRXaWR0aCB9YCxcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4gY3NzKCB7IHdpZHRoOiBfX3Vuc3RhYmxlSW5wdXRXaWR0aCB9ICk7XG59O1xuXG5leHBvcnQgY29uc3QgQ29udGFpbmVyID0gc3R5bGVkLmRpdjwgQ29udGFpbmVyUHJvcHMgPmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleDogMTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXG5cdCR7IGNvbnRhaW5lckRpc2FibGVkU3R5bGVzIH1cblx0JHsgY29udGFpbmVyV2lkdGhTdHlsZXMgfVxuYDtcblxudHlwZSBJbnB1dFByb3BzID0ge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemU/OiBib29sZWFuO1xuXHRkaXNhYmxlZD86IGJvb2xlYW47XG5cdGlucHV0U2l6ZT86IFNpemU7XG5cdGlzRHJhZ2dpbmc/OiBib29sZWFuO1xuXHRkcmFnQ3Vyc29yPzogQ1NTUHJvcGVydGllc1sgJ2N1cnNvcicgXTtcblx0cGFkZGluZ0lubGluZVN0YXJ0PzogQ1NTUHJvcGVydGllc1sgJ3BhZGRpbmdJbmxpbmVTdGFydCcgXTtcblx0cGFkZGluZ0lubGluZUVuZD86IENTU1Byb3BlcnRpZXNbICdwYWRkaW5nSW5saW5lRW5kJyBdO1xufTtcblxuY29uc3QgZGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogSW5wdXRQcm9wcyApID0+IHtcblx0aWYgKCAhIGRpc2FibGVkICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogQ09MT1JTLnVpLnRleHREaXNhYmxlZCxcblx0fSApO1xufTtcblxuZXhwb3J0IGNvbnN0IGZvbnRTaXplU3R5bGVzID0gKCB7IGlucHV0U2l6ZTogc2l6ZSB9OiBJbnB1dFByb3BzICkgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiAnMTNweCcsXG5cdFx0c21hbGw6ICcxMXB4Jyxcblx0XHRjb21wYWN0OiAnMTNweCcsXG5cdFx0J19fdW5zdGFibGUtbGFyZ2UnOiAnMTNweCcsXG5cdH07XG5cblx0Y29uc3QgZm9udFNpemUgPSBzaXplc1sgc2l6ZSBhcyBTaXplIF0gfHwgc2l6ZXMuZGVmYXVsdDtcblx0Y29uc3QgZm9udFNpemVNb2JpbGUgPSAnMTZweCc7XG5cblx0aWYgKCAhIGZvbnRTaXplICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdHJldHVybiBjc3NgXG5cdFx0Zm9udC1zaXplOiAkeyBmb250U2l6ZU1vYmlsZSB9O1xuXG5cdFx0QG1lZGlhICggbWluLXdpZHRoOiA2MDBweCApIHtcblx0XHRcdGZvbnQtc2l6ZTogJHsgZm9udFNpemUgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgZ2V0U2l6ZUNvbmZpZyA9ICgge1xuXHRpbnB1dFNpemU6IHNpemUsXG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcbn06IElucHV0UHJvcHMgKSA9PiB7XG5cdC8vIFBhZGRpbmdzIG1heSBiZSBvdmVycmlkZGVuIGJ5IHRoZSBjdXN0b20gcGFkZGluZ3MgcHJvcHMuXG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdH0sXG5cdFx0c21hbGw6IHtcblx0XHRcdGhlaWdodDogMjQsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiAyNCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHR9LFxuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdGhlaWdodDogMzIsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiAzMixcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHR9LFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzoge1xuXHRcdFx0aGVpZ2h0OiA0MCxcblx0XHRcdGxpbmVIZWlnaHQ6IDEsXG5cdFx0XHRtaW5IZWlnaHQ6IDQwLFxuXHRcdFx0cGFkZGluZ0xlZnQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdFx0fSxcblx0fTtcblxuXHRpZiAoICEgX19uZXh0NDBweERlZmF1bHRTaXplICkge1xuXHRcdHNpemVzLmRlZmF1bHQgPSBzaXplcy5jb21wYWN0O1xuXHR9XG5cblx0cmV0dXJuIHNpemVzWyBzaXplIGFzIFNpemUgXSB8fCBzaXplcy5kZWZhdWx0O1xufTtcblxuY29uc3Qgc2l6ZVN0eWxlcyA9ICggcHJvcHM6IElucHV0UHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIGdldFNpemVDb25maWcoIHByb3BzICkgKTtcbn07XG5cbmNvbnN0IGN1c3RvbVBhZGRpbmdzID0gKCB7XG5cdHBhZGRpbmdJbmxpbmVTdGFydCxcblx0cGFkZGluZ0lubGluZUVuZCxcbn06IElucHV0UHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHsgcGFkZGluZ0lubGluZVN0YXJ0LCBwYWRkaW5nSW5saW5lRW5kIH0gKTtcbn07XG5cbmNvbnN0IGRyYWdTdHlsZXMgPSAoIHsgaXNEcmFnZ2luZywgZHJhZ0N1cnNvciB9OiBJbnB1dFByb3BzICkgPT4ge1xuXHRsZXQgZGVmYXVsdEFycm93U3R5bGVzOiBTZXJpYWxpemVkU3R5bGVzIHwgdW5kZWZpbmVkO1xuXHRsZXQgYWN0aXZlRHJhZ0N1cnNvclN0eWxlczogU2VyaWFsaXplZFN0eWxlcyB8IHVuZGVmaW5lZDtcblxuXHRpZiAoIGlzRHJhZ2dpbmcgKSB7XG5cdFx0ZGVmYXVsdEFycm93U3R5bGVzID0gY3NzYFxuXHRcdFx0Y3Vyc29yOiAkeyBkcmFnQ3Vyc29yIH07XG5cdFx0XHR1c2VyLXNlbGVjdDogbm9uZTtcblxuXHRcdFx0Jjo6LXdlYmtpdC1vdXRlci1zcGluLWJ1dHRvbixcblx0XHRcdCY6Oi13ZWJraXQtaW5uZXItc3Bpbi1idXR0b24ge1xuXHRcdFx0XHQtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmUgIWltcG9ydGFudDtcblx0XHRcdFx0bWFyZ2luOiAwICFpbXBvcnRhbnQ7XG5cdFx0XHR9XG5cdFx0YDtcblx0fVxuXG5cdGlmICggaXNEcmFnZ2luZyAmJiBkcmFnQ3Vyc29yICkge1xuXHRcdGFjdGl2ZURyYWdDdXJzb3JTdHlsZXMgPSBjc3NgXG5cdFx0XHQmOmFjdGl2ZSB7XG5cdFx0XHRcdGN1cnNvcjogJHsgZHJhZ0N1cnNvciB9O1xuXHRcdFx0fVxuXHRcdGA7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdCR7IGRlZmF1bHRBcnJvd1N0eWxlcyB9XG5cdFx0JHsgYWN0aXZlRHJhZ0N1cnNvclN0eWxlcyB9XG5cdGA7XG59O1xuXG4vLyBUT0RPOiBSZXNvbHZlIG5lZWQgdG8gdXNlICYmJiB0byBpbmNyZWFzZSBzcGVjaWZpY2l0eVxuLy8gaHR0cHM6Ly9naXRodWIuY29tL1dvcmRQcmVzcy9ndXRlbmJlcmcvaXNzdWVzLzE4NDgzXG5cbmV4cG9ydCBjb25zdCBJbnB1dCA9IHN0eWxlZC5pbnB1dDwgSW5wdXRQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyOiBub25lO1xuXHRcdGJveC1zaGFkb3c6IG5vbmUgIWltcG9ydGFudDtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRmb250LWZhbWlseTogaW5oZXJpdDtcblx0XHRtYXJnaW46IDA7XG5cdFx0b3V0bGluZTogbm9uZTtcblx0XHR3aWR0aDogMTAwJTtcblxuXHRcdCR7IGRyYWdTdHlsZXMgfVxuXHRcdCR7IGRpc2FibGVkU3R5bGVzIH1cblx0XHQkeyBmb250U2l6ZVN0eWxlcyB9XG5cdFx0JHsgc2l6ZVN0eWxlcyB9XG5cdFx0JHsgY3VzdG9tUGFkZGluZ3MgfVxuXG5cdFx0Jjo6LXdlYmtpdC1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOjotbW96LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblxuXHRcdCY6LW1zLWlucHV0LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblxuXHRcdCZbdHlwZT0nZW1haWwnXSxcblx0XHQmW3R5cGU9J3VybCddIHtcblx0XHRcdC8qIHJ0bDppZ25vcmUgKi9cblx0XHRcdGRpcmVjdGlvbjogbHRyO1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgQmFzZUxhYmVsID0gc3R5bGVkKCBUZXh0ICk8IHsgbGFiZWxQb3NpdGlvbj86IExhYmVsUG9zaXRpb24gfSA+YFxuXHQmJiYge1xuXHRcdCR7IGJhc2VMYWJlbFR5cG9ncmFwaHkgfTtcblxuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0cGFkZGluZy10b3A6IDA7XG5cdFx0cGFkZGluZy1ib3R0b206IDA7XG5cdFx0bWF4LXdpZHRoOiAxMDAlO1xuXHRcdHotaW5kZXg6IDE7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBMYWJlbCA9IChcblx0cHJvcHM6IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzPFxuXHRcdHsgbGFiZWxQb3NpdGlvbj86IExhYmVsUG9zaXRpb247IGNoaWxkcmVuOiBSZWFjdE5vZGUgfSxcblx0XHQnbGFiZWwnLFxuXHRcdGZhbHNlXG5cdD5cbikgPT4gPEJhc2VMYWJlbCB7IC4uLnByb3BzIH0gYXM9XCJsYWJlbFwiIC8+O1xuXG5leHBvcnQgY29uc3QgTGFiZWxXcmFwcGVyID0gc3R5bGVkKCBGbGV4SXRlbSApYFxuXHRtYXgtd2lkdGg6IGNhbGMoIDEwMCUgLSAxMHB4ICk7XG5gO1xuXG5jb25zdCBwcmVmaXhTdWZmaXhXcmFwcGVyU3R5bGVzID0gKCB7XG5cdHZhcmlhbnQgPSAnZGVmYXVsdCcsXG5cdHNpemUsXG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0aXNQcmVmaXgsXG59OiBQcmVmaXhTdWZmaXhXcmFwcGVyUHJvcHMgJiB7IGlzUHJlZml4PzogYm9vbGVhbiB9ICkgPT4ge1xuXHRjb25zdCB7IHBhZGRpbmdMZWZ0OiBwYWRkaW5nIH0gPSBnZXRTaXplQ29uZmlnKCB7XG5cdFx0aW5wdXRTaXplOiBzaXplLFxuXHRcdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0fSApO1xuXG5cdGNvbnN0IHBhZGRpbmdQcm9wZXJ0eSA9IGlzUHJlZml4XG5cdFx0PyAncGFkZGluZ0lubGluZVN0YXJ0J1xuXHRcdDogJ3BhZGRpbmdJbmxpbmVFbmQnO1xuXG5cdGlmICggdmFyaWFudCA9PT0gJ2RlZmF1bHQnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdFsgcGFkZGluZ1Byb3BlcnR5IF06IHBhZGRpbmcsXG5cdFx0fSApO1xuXHR9XG5cblx0Ly8gSWYgdmFyaWFudCBpcyAnaWNvbicgb3IgJ2NvbnRyb2wnXG5cdHJldHVybiBjc3MoIHtcblx0XHRkaXNwbGF5OiAnZmxleCcsXG5cdFx0WyBwYWRkaW5nUHJvcGVydHkgXTogcGFkZGluZyAtIDQsXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBQcmVmaXhTdWZmaXhXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0JHsgcHJlZml4U3VmZml4V3JhcHBlclN0eWxlcyB9XG5gO1xuIl19 */");
    }
    return /* @__PURE__ */ css({
      width: __unstableInputWidth
    }, false ? "" : ";label:containerWidthStyles;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3SFEiLCJmaWxlIjoiaW5wdXQtY29udHJvbC1zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHR5cGUgeyBDU1NQcm9wZXJ0aWVzLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi8uLi9jb250ZXh0JztcbmltcG9ydCB7IEZsZXgsIEZsZXhJdGVtIH0gZnJvbSAnLi4vLi4vZmxleCc7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vdGV4dCc7XG5pbXBvcnQgeyBiYXNlTGFiZWxUeXBvZ3JhcGh5LCBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHR5cGUgeyBMYWJlbFBvc2l0aW9uLCBTaXplLCBQcmVmaXhTdWZmaXhXcmFwcGVyUHJvcHMgfSBmcm9tICcuLi90eXBlcyc7XG5cbnR5cGUgQ29udGFpbmVyUHJvcHMgPSB7XG5cdGRpc2FibGVkPzogYm9vbGVhbjtcblx0aGlkZUxhYmVsPzogYm9vbGVhbjtcblx0X191bnN0YWJsZUlucHV0V2lkdGg/OiBDU1NQcm9wZXJ0aWVzWyAnd2lkdGgnIF07XG5cdGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uO1xufTtcblxuZXhwb3J0IGNvbnN0IFByZWZpeCA9IHN0eWxlZC5zcGFuYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBTdWZmaXggPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0YWxpZ24tc2VsZjogc3RyZXRjaDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbnR5cGUgQmFja2Ryb3BQcm9wcyA9IHtcblx0ZGlzYWJsZWQ/OiBib29sZWFuO1xuXHRpc0JvcmRlcmxlc3M/OiBib29sZWFuO1xufTtcblxuY29uc3QgYmFja2Ryb3BCb3JkZXJDb2xvciA9ICgge1xuXHRkaXNhYmxlZCxcblx0aXNCb3JkZXJsZXNzLFxufTogQmFja2Ryb3BQcm9wcyApOiBDU1NQcm9wZXJ0aWVzWyAnYm9yZGVyQ29sb3InIF0gPT4ge1xuXHRpZiAoIGlzQm9yZGVybGVzcyApIHtcblx0XHRyZXR1cm4gJ3RyYW5zcGFyZW50Jztcblx0fVxuXG5cdGlmICggZGlzYWJsZWQgKSB7XG5cdFx0cmV0dXJuIENPTE9SUy51aS5ib3JkZXJEaXNhYmxlZDtcblx0fVxuXG5cdHJldHVybiBDT0xPUlMudWkuYm9yZGVyO1xufTtcblxuZXhwb3J0IGNvbnN0IEJhY2tkcm9wVUkgPSBzdHlsZWQuZGl2PCBCYWNrZHJvcFByb3BzID5gXG5cdCYmJiB7XG5cdFx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0XHRib3JkZXItY29sb3I6ICR7IGJhY2tkcm9wQm9yZGVyQ29sb3IgfTtcblx0XHRib3JkZXItcmFkaXVzOiBpbmhlcml0O1xuXHRcdGJvcmRlci1zdHlsZTogc29saWQ7XG5cdFx0Ym9yZGVyLXdpZHRoOiAxcHg7XG5cdFx0Ym90dG9tOiAwO1xuXHRcdGxlZnQ6IDA7XG5cdFx0bWFyZ2luOiAwO1xuXHRcdHBhZGRpbmc6IDA7XG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdHJpZ2h0OiAwO1xuXHRcdHRvcDogMDtcblxuXHRcdCR7IHJ0bCggeyBwYWRkaW5nTGVmdDogMiB9ICkgfVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgUm9vdCA9IHN0eWxlZCggRmxleCApYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRwYWRkaW5nLXRvcDogMDtcblxuXHQvLyBGb2N1cyB3aXRoaW4sIGV4Y2x1ZGluZyBjYXNlcyB3aGVyZSBhdXhpbGlhcnkgY29udHJvbHMgaW4gcHJlZml4IG9yIHN1ZmZpeCBoYXZlIGZvY3VzLlxuXHQmOmZvY3VzLXdpdGhpbjpub3QoIDpoYXMoIDppcyggJHsgUHJlZml4IH0sICR7IFN1ZmZpeCB9ICk6Zm9jdXMtd2l0aGluICkgKSB7XG5cdFx0JHsgQmFja2Ryb3BVSSB9IHtcblx0XHRcdGJvcmRlci1jb2xvcjogJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRib3gtc2hhZG93OiAkeyBDT05GSUcuY29udHJvbEJveFNoYWRvd0ZvY3VzIH07XG5cdFx0XHQvLyBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSB3aWxsIHNob3cgdGhpcyBvdXRsaW5lLCBidXQgbm90IHRoZSBib3gtc2hhZG93LlxuXHRcdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdFx0b3V0bGluZS1vZmZzZXQ6IC0ycHg7XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBjb250YWluZXJEaXNhYmxlZFN0eWxlcyA9ICggeyBkaXNhYmxlZCB9OiBDb250YWluZXJQcm9wcyApID0+IHtcblx0Y29uc3QgYmFja2dyb3VuZENvbG9yID0gZGlzYWJsZWRcblx0XHQ/IENPTE9SUy51aS5iYWNrZ3JvdW5kRGlzYWJsZWRcblx0XHQ6IENPTE9SUy51aS5iYWNrZ3JvdW5kO1xuXG5cdHJldHVybiBjc3MoIHsgYmFja2dyb3VuZENvbG9yIH0gKTtcbn07XG5cbmNvbnN0IGNvbnRhaW5lcldpZHRoU3R5bGVzID0gKCB7XG5cdF9fdW5zdGFibGVJbnB1dFdpZHRoLFxuXHRsYWJlbFBvc2l0aW9uLFxufTogQ29udGFpbmVyUHJvcHMgKSA9PiB7XG5cdGlmICggISBfX3Vuc3RhYmxlSW5wdXRXaWR0aCApIHtcblx0XHRyZXR1cm4gY3NzKCB7IHdpZHRoOiAnMTAwJScgfSApO1xuXHR9XG5cblx0aWYgKCBsYWJlbFBvc2l0aW9uID09PSAnc2lkZScgKSB7XG5cdFx0cmV0dXJuICcnO1xuXHR9XG5cblx0aWYgKCBsYWJlbFBvc2l0aW9uID09PSAnZWRnZScgKSB7XG5cdFx0cmV0dXJuIGNzcygge1xuXHRcdFx0ZmxleDogYDAgMCAkeyBfX3Vuc3RhYmxlSW5wdXRXaWR0aCB9YCxcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4gY3NzKCB7IHdpZHRoOiBfX3Vuc3RhYmxlSW5wdXRXaWR0aCB9ICk7XG59O1xuXG5leHBvcnQgY29uc3QgQ29udGFpbmVyID0gc3R5bGVkLmRpdjwgQ29udGFpbmVyUHJvcHMgPmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleDogMTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXG5cdCR7IGNvbnRhaW5lckRpc2FibGVkU3R5bGVzIH1cblx0JHsgY29udGFpbmVyV2lkdGhTdHlsZXMgfVxuYDtcblxudHlwZSBJbnB1dFByb3BzID0ge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemU/OiBib29sZWFuO1xuXHRkaXNhYmxlZD86IGJvb2xlYW47XG5cdGlucHV0U2l6ZT86IFNpemU7XG5cdGlzRHJhZ2dpbmc/OiBib29sZWFuO1xuXHRkcmFnQ3Vyc29yPzogQ1NTUHJvcGVydGllc1sgJ2N1cnNvcicgXTtcblx0cGFkZGluZ0lubGluZVN0YXJ0PzogQ1NTUHJvcGVydGllc1sgJ3BhZGRpbmdJbmxpbmVTdGFydCcgXTtcblx0cGFkZGluZ0lubGluZUVuZD86IENTU1Byb3BlcnRpZXNbICdwYWRkaW5nSW5saW5lRW5kJyBdO1xufTtcblxuY29uc3QgZGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogSW5wdXRQcm9wcyApID0+IHtcblx0aWYgKCAhIGRpc2FibGVkICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogQ09MT1JTLnVpLnRleHREaXNhYmxlZCxcblx0fSApO1xufTtcblxuZXhwb3J0IGNvbnN0IGZvbnRTaXplU3R5bGVzID0gKCB7IGlucHV0U2l6ZTogc2l6ZSB9OiBJbnB1dFByb3BzICkgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiAnMTNweCcsXG5cdFx0c21hbGw6ICcxMXB4Jyxcblx0XHRjb21wYWN0OiAnMTNweCcsXG5cdFx0J19fdW5zdGFibGUtbGFyZ2UnOiAnMTNweCcsXG5cdH07XG5cblx0Y29uc3QgZm9udFNpemUgPSBzaXplc1sgc2l6ZSBhcyBTaXplIF0gfHwgc2l6ZXMuZGVmYXVsdDtcblx0Y29uc3QgZm9udFNpemVNb2JpbGUgPSAnMTZweCc7XG5cblx0aWYgKCAhIGZvbnRTaXplICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdHJldHVybiBjc3NgXG5cdFx0Zm9udC1zaXplOiAkeyBmb250U2l6ZU1vYmlsZSB9O1xuXG5cdFx0QG1lZGlhICggbWluLXdpZHRoOiA2MDBweCApIHtcblx0XHRcdGZvbnQtc2l6ZTogJHsgZm9udFNpemUgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgZ2V0U2l6ZUNvbmZpZyA9ICgge1xuXHRpbnB1dFNpemU6IHNpemUsXG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcbn06IElucHV0UHJvcHMgKSA9PiB7XG5cdC8vIFBhZGRpbmdzIG1heSBiZSBvdmVycmlkZGVuIGJ5IHRoZSBjdXN0b20gcGFkZGluZ3MgcHJvcHMuXG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdH0sXG5cdFx0c21hbGw6IHtcblx0XHRcdGhlaWdodDogMjQsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiAyNCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHR9LFxuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdGhlaWdodDogMzIsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiAzMixcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHR9LFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzoge1xuXHRcdFx0aGVpZ2h0OiA0MCxcblx0XHRcdGxpbmVIZWlnaHQ6IDEsXG5cdFx0XHRtaW5IZWlnaHQ6IDQwLFxuXHRcdFx0cGFkZGluZ0xlZnQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdFx0fSxcblx0fTtcblxuXHRpZiAoICEgX19uZXh0NDBweERlZmF1bHRTaXplICkge1xuXHRcdHNpemVzLmRlZmF1bHQgPSBzaXplcy5jb21wYWN0O1xuXHR9XG5cblx0cmV0dXJuIHNpemVzWyBzaXplIGFzIFNpemUgXSB8fCBzaXplcy5kZWZhdWx0O1xufTtcblxuY29uc3Qgc2l6ZVN0eWxlcyA9ICggcHJvcHM6IElucHV0UHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIGdldFNpemVDb25maWcoIHByb3BzICkgKTtcbn07XG5cbmNvbnN0IGN1c3RvbVBhZGRpbmdzID0gKCB7XG5cdHBhZGRpbmdJbmxpbmVTdGFydCxcblx0cGFkZGluZ0lubGluZUVuZCxcbn06IElucHV0UHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHsgcGFkZGluZ0lubGluZVN0YXJ0LCBwYWRkaW5nSW5saW5lRW5kIH0gKTtcbn07XG5cbmNvbnN0IGRyYWdTdHlsZXMgPSAoIHsgaXNEcmFnZ2luZywgZHJhZ0N1cnNvciB9OiBJbnB1dFByb3BzICkgPT4ge1xuXHRsZXQgZGVmYXVsdEFycm93U3R5bGVzOiBTZXJpYWxpemVkU3R5bGVzIHwgdW5kZWZpbmVkO1xuXHRsZXQgYWN0aXZlRHJhZ0N1cnNvclN0eWxlczogU2VyaWFsaXplZFN0eWxlcyB8IHVuZGVmaW5lZDtcblxuXHRpZiAoIGlzRHJhZ2dpbmcgKSB7XG5cdFx0ZGVmYXVsdEFycm93U3R5bGVzID0gY3NzYFxuXHRcdFx0Y3Vyc29yOiAkeyBkcmFnQ3Vyc29yIH07XG5cdFx0XHR1c2VyLXNlbGVjdDogbm9uZTtcblxuXHRcdFx0Jjo6LXdlYmtpdC1vdXRlci1zcGluLWJ1dHRvbixcblx0XHRcdCY6Oi13ZWJraXQtaW5uZXItc3Bpbi1idXR0b24ge1xuXHRcdFx0XHQtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmUgIWltcG9ydGFudDtcblx0XHRcdFx0bWFyZ2luOiAwICFpbXBvcnRhbnQ7XG5cdFx0XHR9XG5cdFx0YDtcblx0fVxuXG5cdGlmICggaXNEcmFnZ2luZyAmJiBkcmFnQ3Vyc29yICkge1xuXHRcdGFjdGl2ZURyYWdDdXJzb3JTdHlsZXMgPSBjc3NgXG5cdFx0XHQmOmFjdGl2ZSB7XG5cdFx0XHRcdGN1cnNvcjogJHsgZHJhZ0N1cnNvciB9O1xuXHRcdFx0fVxuXHRcdGA7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdCR7IGRlZmF1bHRBcnJvd1N0eWxlcyB9XG5cdFx0JHsgYWN0aXZlRHJhZ0N1cnNvclN0eWxlcyB9XG5cdGA7XG59O1xuXG4vLyBUT0RPOiBSZXNvbHZlIG5lZWQgdG8gdXNlICYmJiB0byBpbmNyZWFzZSBzcGVjaWZpY2l0eVxuLy8gaHR0cHM6Ly9naXRodWIuY29tL1dvcmRQcmVzcy9ndXRlbmJlcmcvaXNzdWVzLzE4NDgzXG5cbmV4cG9ydCBjb25zdCBJbnB1dCA9IHN0eWxlZC5pbnB1dDwgSW5wdXRQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyOiBub25lO1xuXHRcdGJveC1zaGFkb3c6IG5vbmUgIWltcG9ydGFudDtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRmb250LWZhbWlseTogaW5oZXJpdDtcblx0XHRtYXJnaW46IDA7XG5cdFx0b3V0bGluZTogbm9uZTtcblx0XHR3aWR0aDogMTAwJTtcblxuXHRcdCR7IGRyYWdTdHlsZXMgfVxuXHRcdCR7IGRpc2FibGVkU3R5bGVzIH1cblx0XHQkeyBmb250U2l6ZVN0eWxlcyB9XG5cdFx0JHsgc2l6ZVN0eWxlcyB9XG5cdFx0JHsgY3VzdG9tUGFkZGluZ3MgfVxuXG5cdFx0Jjo6LXdlYmtpdC1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOjotbW96LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblxuXHRcdCY6LW1zLWlucHV0LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblxuXHRcdCZbdHlwZT0nZW1haWwnXSxcblx0XHQmW3R5cGU9J3VybCddIHtcblx0XHRcdC8qIHJ0bDppZ25vcmUgKi9cblx0XHRcdGRpcmVjdGlvbjogbHRyO1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgQmFzZUxhYmVsID0gc3R5bGVkKCBUZXh0ICk8IHsgbGFiZWxQb3NpdGlvbj86IExhYmVsUG9zaXRpb24gfSA+YFxuXHQmJiYge1xuXHRcdCR7IGJhc2VMYWJlbFR5cG9ncmFwaHkgfTtcblxuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0cGFkZGluZy10b3A6IDA7XG5cdFx0cGFkZGluZy1ib3R0b206IDA7XG5cdFx0bWF4LXdpZHRoOiAxMDAlO1xuXHRcdHotaW5kZXg6IDE7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBMYWJlbCA9IChcblx0cHJvcHM6IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzPFxuXHRcdHsgbGFiZWxQb3NpdGlvbj86IExhYmVsUG9zaXRpb247IGNoaWxkcmVuOiBSZWFjdE5vZGUgfSxcblx0XHQnbGFiZWwnLFxuXHRcdGZhbHNlXG5cdD5cbikgPT4gPEJhc2VMYWJlbCB7IC4uLnByb3BzIH0gYXM9XCJsYWJlbFwiIC8+O1xuXG5leHBvcnQgY29uc3QgTGFiZWxXcmFwcGVyID0gc3R5bGVkKCBGbGV4SXRlbSApYFxuXHRtYXgtd2lkdGg6IGNhbGMoIDEwMCUgLSAxMHB4ICk7XG5gO1xuXG5jb25zdCBwcmVmaXhTdWZmaXhXcmFwcGVyU3R5bGVzID0gKCB7XG5cdHZhcmlhbnQgPSAnZGVmYXVsdCcsXG5cdHNpemUsXG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0aXNQcmVmaXgsXG59OiBQcmVmaXhTdWZmaXhXcmFwcGVyUHJvcHMgJiB7IGlzUHJlZml4PzogYm9vbGVhbiB9ICkgPT4ge1xuXHRjb25zdCB7IHBhZGRpbmdMZWZ0OiBwYWRkaW5nIH0gPSBnZXRTaXplQ29uZmlnKCB7XG5cdFx0aW5wdXRTaXplOiBzaXplLFxuXHRcdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0fSApO1xuXG5cdGNvbnN0IHBhZGRpbmdQcm9wZXJ0eSA9IGlzUHJlZml4XG5cdFx0PyAncGFkZGluZ0lubGluZVN0YXJ0J1xuXHRcdDogJ3BhZGRpbmdJbmxpbmVFbmQnO1xuXG5cdGlmICggdmFyaWFudCA9PT0gJ2RlZmF1bHQnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdFsgcGFkZGluZ1Byb3BlcnR5IF06IHBhZGRpbmcsXG5cdFx0fSApO1xuXHR9XG5cblx0Ly8gSWYgdmFyaWFudCBpcyAnaWNvbicgb3IgJ2NvbnRyb2wnXG5cdHJldHVybiBjc3MoIHtcblx0XHRkaXNwbGF5OiAnZmxleCcsXG5cdFx0WyBwYWRkaW5nUHJvcGVydHkgXTogcGFkZGluZyAtIDQsXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBQcmVmaXhTdWZmaXhXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0JHsgcHJlZml4U3VmZml4V3JhcHBlclN0eWxlcyB9XG5gO1xuIl19 */");
  };
  var Container = /* @__PURE__ */ createStyled("div", false ? {
    target: "em5sgkm4"
  } : {
    target: "em5sgkm4",
    label: "Container"
  })("align-items:center;box-sizing:border-box;border-radius:inherit;display:flex;flex:1;position:relative;", containerDisabledStyles, " ", containerWidthStyles, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEySHFEIiwiZmlsZSI6ImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgU2VyaWFsaXplZFN0eWxlcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB0eXBlIHsgQ1NTUHJvcGVydGllcywgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzIH0gZnJvbSAnLi4vLi4vY29udGV4dCc7XG5pbXBvcnQgeyBGbGV4LCBGbGV4SXRlbSB9IGZyb20gJy4uLy4uL2ZsZXgnO1xuaW1wb3J0IHsgVGV4dCB9IGZyb20gJy4uLy4uL3RleHQnO1xuaW1wb3J0IHsgYmFzZUxhYmVsVHlwb2dyYXBoeSwgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgTGFiZWxQb3NpdGlvbiwgU2l6ZSwgUHJlZml4U3VmZml4V3JhcHBlclByb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuXG50eXBlIENvbnRhaW5lclByb3BzID0ge1xuXHRkaXNhYmxlZD86IGJvb2xlYW47XG5cdGhpZGVMYWJlbD86IGJvb2xlYW47XG5cdF9fdW5zdGFibGVJbnB1dFdpZHRoPzogQ1NTUHJvcGVydGllc1sgJ3dpZHRoJyBdO1xuXHRsYWJlbFBvc2l0aW9uPzogTGFiZWxQb3NpdGlvbjtcbn07XG5cbmV4cG9ydCBjb25zdCBQcmVmaXggPSBzdHlsZWQuc3BhbmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VmZml4ID0gc3R5bGVkLnNwYW5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGFsaWduLXNlbGY6IHN0cmV0Y2g7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGZsZXg7XG5gO1xuXG50eXBlIEJhY2tkcm9wUHJvcHMgPSB7XG5cdGRpc2FibGVkPzogYm9vbGVhbjtcblx0aXNCb3JkZXJsZXNzPzogYm9vbGVhbjtcbn07XG5cbmNvbnN0IGJhY2tkcm9wQm9yZGVyQ29sb3IgPSAoIHtcblx0ZGlzYWJsZWQsXG5cdGlzQm9yZGVybGVzcyxcbn06IEJhY2tkcm9wUHJvcHMgKTogQ1NTUHJvcGVydGllc1sgJ2JvcmRlckNvbG9yJyBdID0+IHtcblx0aWYgKCBpc0JvcmRlcmxlc3MgKSB7XG5cdFx0cmV0dXJuICd0cmFuc3BhcmVudCc7XG5cdH1cblxuXHRpZiAoIGRpc2FibGVkICkge1xuXHRcdHJldHVybiBDT0xPUlMudWkuYm9yZGVyRGlzYWJsZWQ7XG5cdH1cblxuXHRyZXR1cm4gQ09MT1JTLnVpLmJvcmRlcjtcbn07XG5cbmV4cG9ydCBjb25zdCBCYWNrZHJvcFVJID0gc3R5bGVkLmRpdjwgQmFja2Ryb3BQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyLWNvbG9yOiAkeyBiYWNrZHJvcEJvcmRlckNvbG9yIH07XG5cdFx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0XHRib3JkZXItc3R5bGU6IHNvbGlkO1xuXHRcdGJvcmRlci13aWR0aDogMXB4O1xuXHRcdGJvdHRvbTogMDtcblx0XHRsZWZ0OiAwO1xuXHRcdG1hcmdpbjogMDtcblx0XHRwYWRkaW5nOiAwO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRyaWdodDogMDtcblx0XHR0b3A6IDA7XG5cblx0XHQkeyBydGwoIHsgcGFkZGluZ0xlZnQ6IDIgfSApIH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQoIEZsZXggKWBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0cGFkZGluZy10b3A6IDA7XG5cblx0Ly8gRm9jdXMgd2l0aGluLCBleGNsdWRpbmcgY2FzZXMgd2hlcmUgYXV4aWxpYXJ5IGNvbnRyb2xzIGluIHByZWZpeCBvciBzdWZmaXggaGF2ZSBmb2N1cy5cblx0Jjpmb2N1cy13aXRoaW46bm90KCA6aGFzKCA6aXMoICR7IFByZWZpeCB9LCAkeyBTdWZmaXggfSApOmZvY3VzLXdpdGhpbiApICkge1xuXHRcdCR7IEJhY2tkcm9wVUkgfSB7XG5cdFx0XHRib3JkZXItY29sb3I6ICR7IENPTE9SUy51aS5ib3JkZXJGb2N1cyB9O1xuXHRcdFx0Ym94LXNoYWRvdzogJHsgQ09ORklHLmNvbnRyb2xCb3hTaGFkb3dGb2N1cyB9O1xuXHRcdFx0Ly8gV2luZG93cyBIaWdoIENvbnRyYXN0IG1vZGUgd2lsbCBzaG93IHRoaXMgb3V0bGluZSwgYnV0IG5vdCB0aGUgYm94LXNoYWRvdy5cblx0XHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRcdG91dGxpbmUtb2Zmc2V0OiAtMnB4O1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgY29udGFpbmVyRGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogQ29udGFpbmVyUHJvcHMgKSA9PiB7XG5cdGNvbnN0IGJhY2tncm91bmRDb2xvciA9IGRpc2FibGVkXG5cdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0OiBDT0xPUlMudWkuYmFja2dyb3VuZDtcblxuXHRyZXR1cm4gY3NzKCB7IGJhY2tncm91bmRDb2xvciB9ICk7XG59O1xuXG5jb25zdCBjb250YWluZXJXaWR0aFN0eWxlcyA9ICgge1xuXHRfX3Vuc3RhYmxlSW5wdXRXaWR0aCxcblx0bGFiZWxQb3NpdGlvbixcbn06IENvbnRhaW5lclByb3BzICkgPT4ge1xuXHRpZiAoICEgX191bnN0YWJsZUlucHV0V2lkdGggKSB7XG5cdFx0cmV0dXJuIGNzcyggeyB3aWR0aDogJzEwMCUnIH0gKTtcblx0fVxuXG5cdGlmICggbGFiZWxQb3NpdGlvbiA9PT0gJ3NpZGUnICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdGlmICggbGFiZWxQb3NpdGlvbiA9PT0gJ2VkZ2UnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdGZsZXg6IGAwIDAgJHsgX191bnN0YWJsZUlucHV0V2lkdGggfWAsXG5cdFx0fSApO1xuXHR9XG5cblx0cmV0dXJuIGNzcyggeyB3aWR0aDogX191bnN0YWJsZUlucHV0V2lkdGggfSApO1xufTtcblxuZXhwb3J0IGNvbnN0IENvbnRhaW5lciA9IHN0eWxlZC5kaXY8IENvbnRhaW5lclByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdGRpc3BsYXk6IGZsZXg7XG5cdGZsZXg6IDE7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuXHQkeyBjb250YWluZXJEaXNhYmxlZFN0eWxlcyB9XG5cdCR7IGNvbnRhaW5lcldpZHRoU3R5bGVzIH1cbmA7XG5cbnR5cGUgSW5wdXRQcm9wcyA9IHtcblx0X19uZXh0NDBweERlZmF1bHRTaXplPzogYm9vbGVhbjtcblx0ZGlzYWJsZWQ/OiBib29sZWFuO1xuXHRpbnB1dFNpemU/OiBTaXplO1xuXHRpc0RyYWdnaW5nPzogYm9vbGVhbjtcblx0ZHJhZ0N1cnNvcj86IENTU1Byb3BlcnRpZXNbICdjdXJzb3InIF07XG5cdHBhZGRpbmdJbmxpbmVTdGFydD86IENTU1Byb3BlcnRpZXNbICdwYWRkaW5nSW5saW5lU3RhcnQnIF07XG5cdHBhZGRpbmdJbmxpbmVFbmQ/OiBDU1NQcm9wZXJ0aWVzWyAncGFkZGluZ0lubGluZUVuZCcgXTtcbn07XG5cbmNvbnN0IGRpc2FibGVkU3R5bGVzID0gKCB7IGRpc2FibGVkIH06IElucHV0UHJvcHMgKSA9PiB7XG5cdGlmICggISBkaXNhYmxlZCApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzKCB7XG5cdFx0Y29sb3I6IENPTE9SUy51aS50ZXh0RGlzYWJsZWQsXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBmb250U2l6ZVN0eWxlcyA9ICggeyBpbnB1dFNpemU6IHNpemUgfTogSW5wdXRQcm9wcyApID0+IHtcblx0Y29uc3Qgc2l6ZXMgPSB7XG5cdFx0ZGVmYXVsdDogJzEzcHgnLFxuXHRcdHNtYWxsOiAnMTFweCcsXG5cdFx0Y29tcGFjdDogJzEzcHgnLFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzogJzEzcHgnLFxuXHR9O1xuXG5cdGNvbnN0IGZvbnRTaXplID0gc2l6ZXNbIHNpemUgYXMgU2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG5cdGNvbnN0IGZvbnRTaXplTW9iaWxlID0gJzE2cHgnO1xuXG5cdGlmICggISBmb250U2l6ZSApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdGZvbnQtc2l6ZTogJHsgZm9udFNpemVNb2JpbGUgfTtcblxuXHRcdEBtZWRpYSAoIG1pbi13aWR0aDogNjAwcHggKSB7XG5cdFx0XHRmb250LXNpemU6ICR7IGZvbnRTaXplIH07XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGdldFNpemVDb25maWcgPSAoIHtcblx0aW5wdXRTaXplOiBzaXplLFxuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBJbnB1dFByb3BzICkgPT4ge1xuXHQvLyBQYWRkaW5ncyBtYXkgYmUgb3ZlcnJpZGRlbiBieSB0aGUgY3VzdG9tIHBhZGRpbmdzIHByb3BzLlxuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiB7XG5cdFx0XHRoZWlnaHQ6IDQwLFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogNDAsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHRcdHBhZGRpbmdSaWdodDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHR9LFxuXHRcdHNtYWxsOiB7XG5cdFx0XHRoZWlnaHQ6IDI0LFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogMjQsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0fSxcblx0XHRjb21wYWN0OiB7XG5cdFx0XHRoZWlnaHQ6IDMyLFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogMzIsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0fSxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdH0sXG5cdH07XG5cblx0aWYgKCAhIF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSApIHtcblx0XHRzaXplcy5kZWZhdWx0ID0gc2l6ZXMuY29tcGFjdDtcblx0fVxuXG5cdHJldHVybiBzaXplc1sgc2l6ZSBhcyBTaXplIF0gfHwgc2l6ZXMuZGVmYXVsdDtcbn07XG5cbmNvbnN0IHNpemVTdHlsZXMgPSAoIHByb3BzOiBJbnB1dFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCBnZXRTaXplQ29uZmlnKCBwcm9wcyApICk7XG59O1xuXG5jb25zdCBjdXN0b21QYWRkaW5ncyA9ICgge1xuXHRwYWRkaW5nSW5saW5lU3RhcnQsXG5cdHBhZGRpbmdJbmxpbmVFbmQsXG59OiBJbnB1dFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCB7IHBhZGRpbmdJbmxpbmVTdGFydCwgcGFkZGluZ0lubGluZUVuZCB9ICk7XG59O1xuXG5jb25zdCBkcmFnU3R5bGVzID0gKCB7IGlzRHJhZ2dpbmcsIGRyYWdDdXJzb3IgfTogSW5wdXRQcm9wcyApID0+IHtcblx0bGV0IGRlZmF1bHRBcnJvd1N0eWxlczogU2VyaWFsaXplZFN0eWxlcyB8IHVuZGVmaW5lZDtcblx0bGV0IGFjdGl2ZURyYWdDdXJzb3JTdHlsZXM6IFNlcmlhbGl6ZWRTdHlsZXMgfCB1bmRlZmluZWQ7XG5cblx0aWYgKCBpc0RyYWdnaW5nICkge1xuXHRcdGRlZmF1bHRBcnJvd1N0eWxlcyA9IGNzc2Bcblx0XHRcdGN1cnNvcjogJHsgZHJhZ0N1cnNvciB9O1xuXHRcdFx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cblx0XHRcdCY6Oi13ZWJraXQtb3V0ZXItc3Bpbi1idXR0b24sXG5cdFx0XHQmOjotd2Via2l0LWlubmVyLXNwaW4tYnV0dG9uIHtcblx0XHRcdFx0LXdlYmtpdC1hcHBlYXJhbmNlOiBub25lICFpbXBvcnRhbnQ7XG5cdFx0XHRcdG1hcmdpbjogMCAhaW1wb3J0YW50O1xuXHRcdFx0fVxuXHRcdGA7XG5cdH1cblxuXHRpZiAoIGlzRHJhZ2dpbmcgJiYgZHJhZ0N1cnNvciApIHtcblx0XHRhY3RpdmVEcmFnQ3Vyc29yU3R5bGVzID0gY3NzYFxuXHRcdFx0JjphY3RpdmUge1xuXHRcdFx0XHRjdXJzb3I6ICR7IGRyYWdDdXJzb3IgfTtcblx0XHRcdH1cblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHQkeyBkZWZhdWx0QXJyb3dTdHlsZXMgfVxuXHRcdCR7IGFjdGl2ZURyYWdDdXJzb3JTdHlsZXMgfVxuXHRgO1xufTtcblxuLy8gVE9ETzogUmVzb2x2ZSBuZWVkIHRvIHVzZSAmJiYgdG8gaW5jcmVhc2Ugc3BlY2lmaWNpdHlcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9Xb3JkUHJlc3MvZ3V0ZW5iZXJnL2lzc3Vlcy8xODQ4M1xuXG5leHBvcnQgY29uc3QgSW5wdXQgPSBzdHlsZWQuaW5wdXQ8IElucHV0UHJvcHMgPmBcblx0JiYmIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDtcblx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdGJvcmRlcjogbm9uZTtcblx0XHRib3gtc2hhZG93OiBub25lICFpbXBvcnRhbnQ7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdFx0bWFyZ2luOiAwO1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cblx0XHQkeyBkcmFnU3R5bGVzIH1cblx0XHQkeyBkaXNhYmxlZFN0eWxlcyB9XG5cdFx0JHsgZm9udFNpemVTdHlsZXMgfVxuXHRcdCR7IHNpemVTdHlsZXMgfVxuXHRcdCR7IGN1c3RvbVBhZGRpbmdzIH1cblxuXHRcdCY6Oi13ZWJraXQtaW5wdXQtcGxhY2Vob2xkZXIge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy51aS5kYXJrR3JheVBsYWNlaG9sZGVyIH07XG5cdFx0fVxuXG5cdFx0Jjo6LW1vei1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOi1tcy1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmW3R5cGU9J2VtYWlsJ10sXG5cdFx0Jlt0eXBlPSd1cmwnXSB7XG5cdFx0XHQvKiBydGw6aWdub3JlICovXG5cdFx0XHRkaXJlY3Rpb246IGx0cjtcblx0XHR9XG5cdH1cbmA7XG5cbmNvbnN0IEJhc2VMYWJlbCA9IHN0eWxlZCggVGV4dCApPCB7IGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uIH0gPmBcblx0JiYmIHtcblx0XHQkeyBiYXNlTGFiZWxUeXBvZ3JhcGh5IH07XG5cblx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdHBhZGRpbmctdG9wOiAwO1xuXHRcdHBhZGRpbmctYm90dG9tOiAwO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0XHR6LWluZGV4OiAxO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTGFiZWwgPSAoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczxcblx0XHR7IGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uOyBjaGlsZHJlbjogUmVhY3ROb2RlIH0sXG5cdFx0J2xhYmVsJyxcblx0XHRmYWxzZVxuXHQ+XG4pID0+IDxCYXNlTGFiZWwgeyAuLi5wcm9wcyB9IGFzPVwibGFiZWxcIiAvPjtcblxuZXhwb3J0IGNvbnN0IExhYmVsV3JhcHBlciA9IHN0eWxlZCggRmxleEl0ZW0gKWBcblx0bWF4LXdpZHRoOiBjYWxjKCAxMDAlIC0gMTBweCApO1xuYDtcblxuY29uc3QgcHJlZml4U3VmZml4V3JhcHBlclN0eWxlcyA9ICgge1xuXHR2YXJpYW50ID0gJ2RlZmF1bHQnLFxuXHRzaXplLFxuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdGlzUHJlZml4LFxufTogUHJlZml4U3VmZml4V3JhcHBlclByb3BzICYgeyBpc1ByZWZpeD86IGJvb2xlYW4gfSApID0+IHtcblx0Y29uc3QgeyBwYWRkaW5nTGVmdDogcGFkZGluZyB9ID0gZ2V0U2l6ZUNvbmZpZygge1xuXHRcdGlucHV0U2l6ZTogc2l6ZSxcblx0XHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdH0gKTtcblxuXHRjb25zdCBwYWRkaW5nUHJvcGVydHkgPSBpc1ByZWZpeFxuXHRcdD8gJ3BhZGRpbmdJbmxpbmVTdGFydCdcblx0XHQ6ICdwYWRkaW5nSW5saW5lRW5kJztcblxuXHRpZiAoIHZhcmlhbnQgPT09ICdkZWZhdWx0JyApIHtcblx0XHRyZXR1cm4gY3NzKCB7XG5cdFx0XHRbIHBhZGRpbmdQcm9wZXJ0eSBdOiBwYWRkaW5nLFxuXHRcdH0gKTtcblx0fVxuXG5cdC8vIElmIHZhcmlhbnQgaXMgJ2ljb24nIG9yICdjb250cm9sJ1xuXHRyZXR1cm4gY3NzKCB7XG5cdFx0ZGlzcGxheTogJ2ZsZXgnLFxuXHRcdFsgcGFkZGluZ1Byb3BlcnR5IF06IHBhZGRpbmcgLSA0LFxuXHR9ICk7XG59O1xuXG5leHBvcnQgY29uc3QgUHJlZml4U3VmZml4V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdCR7IHByZWZpeFN1ZmZpeFdyYXBwZXJTdHlsZXMgfVxuYDtcbiJdfQ== */"));
  var disabledStyles = ({
    disabled
  }) => {
    if (!disabled) {
      return "";
    }
    return /* @__PURE__ */ css({
      color: COLORS.ui.textDisabled
    }, false ? "" : ";label:disabledStyles;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzSlEiLCJmaWxlIjoiaW5wdXQtY29udHJvbC1zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHR5cGUgeyBDU1NQcm9wZXJ0aWVzLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi8uLi9jb250ZXh0JztcbmltcG9ydCB7IEZsZXgsIEZsZXhJdGVtIH0gZnJvbSAnLi4vLi4vZmxleCc7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vdGV4dCc7XG5pbXBvcnQgeyBiYXNlTGFiZWxUeXBvZ3JhcGh5LCBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHR5cGUgeyBMYWJlbFBvc2l0aW9uLCBTaXplLCBQcmVmaXhTdWZmaXhXcmFwcGVyUHJvcHMgfSBmcm9tICcuLi90eXBlcyc7XG5cbnR5cGUgQ29udGFpbmVyUHJvcHMgPSB7XG5cdGRpc2FibGVkPzogYm9vbGVhbjtcblx0aGlkZUxhYmVsPzogYm9vbGVhbjtcblx0X191bnN0YWJsZUlucHV0V2lkdGg/OiBDU1NQcm9wZXJ0aWVzWyAnd2lkdGgnIF07XG5cdGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uO1xufTtcblxuZXhwb3J0IGNvbnN0IFByZWZpeCA9IHN0eWxlZC5zcGFuYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBTdWZmaXggPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0YWxpZ24tc2VsZjogc3RyZXRjaDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbnR5cGUgQmFja2Ryb3BQcm9wcyA9IHtcblx0ZGlzYWJsZWQ/OiBib29sZWFuO1xuXHRpc0JvcmRlcmxlc3M/OiBib29sZWFuO1xufTtcblxuY29uc3QgYmFja2Ryb3BCb3JkZXJDb2xvciA9ICgge1xuXHRkaXNhYmxlZCxcblx0aXNCb3JkZXJsZXNzLFxufTogQmFja2Ryb3BQcm9wcyApOiBDU1NQcm9wZXJ0aWVzWyAnYm9yZGVyQ29sb3InIF0gPT4ge1xuXHRpZiAoIGlzQm9yZGVybGVzcyApIHtcblx0XHRyZXR1cm4gJ3RyYW5zcGFyZW50Jztcblx0fVxuXG5cdGlmICggZGlzYWJsZWQgKSB7XG5cdFx0cmV0dXJuIENPTE9SUy51aS5ib3JkZXJEaXNhYmxlZDtcblx0fVxuXG5cdHJldHVybiBDT0xPUlMudWkuYm9yZGVyO1xufTtcblxuZXhwb3J0IGNvbnN0IEJhY2tkcm9wVUkgPSBzdHlsZWQuZGl2PCBCYWNrZHJvcFByb3BzID5gXG5cdCYmJiB7XG5cdFx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0XHRib3JkZXItY29sb3I6ICR7IGJhY2tkcm9wQm9yZGVyQ29sb3IgfTtcblx0XHRib3JkZXItcmFkaXVzOiBpbmhlcml0O1xuXHRcdGJvcmRlci1zdHlsZTogc29saWQ7XG5cdFx0Ym9yZGVyLXdpZHRoOiAxcHg7XG5cdFx0Ym90dG9tOiAwO1xuXHRcdGxlZnQ6IDA7XG5cdFx0bWFyZ2luOiAwO1xuXHRcdHBhZGRpbmc6IDA7XG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdHJpZ2h0OiAwO1xuXHRcdHRvcDogMDtcblxuXHRcdCR7IHJ0bCggeyBwYWRkaW5nTGVmdDogMiB9ICkgfVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgUm9vdCA9IHN0eWxlZCggRmxleCApYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRwYWRkaW5nLXRvcDogMDtcblxuXHQvLyBGb2N1cyB3aXRoaW4sIGV4Y2x1ZGluZyBjYXNlcyB3aGVyZSBhdXhpbGlhcnkgY29udHJvbHMgaW4gcHJlZml4IG9yIHN1ZmZpeCBoYXZlIGZvY3VzLlxuXHQmOmZvY3VzLXdpdGhpbjpub3QoIDpoYXMoIDppcyggJHsgUHJlZml4IH0sICR7IFN1ZmZpeCB9ICk6Zm9jdXMtd2l0aGluICkgKSB7XG5cdFx0JHsgQmFja2Ryb3BVSSB9IHtcblx0XHRcdGJvcmRlci1jb2xvcjogJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRib3gtc2hhZG93OiAkeyBDT05GSUcuY29udHJvbEJveFNoYWRvd0ZvY3VzIH07XG5cdFx0XHQvLyBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSB3aWxsIHNob3cgdGhpcyBvdXRsaW5lLCBidXQgbm90IHRoZSBib3gtc2hhZG93LlxuXHRcdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdFx0b3V0bGluZS1vZmZzZXQ6IC0ycHg7XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBjb250YWluZXJEaXNhYmxlZFN0eWxlcyA9ICggeyBkaXNhYmxlZCB9OiBDb250YWluZXJQcm9wcyApID0+IHtcblx0Y29uc3QgYmFja2dyb3VuZENvbG9yID0gZGlzYWJsZWRcblx0XHQ/IENPTE9SUy51aS5iYWNrZ3JvdW5kRGlzYWJsZWRcblx0XHQ6IENPTE9SUy51aS5iYWNrZ3JvdW5kO1xuXG5cdHJldHVybiBjc3MoIHsgYmFja2dyb3VuZENvbG9yIH0gKTtcbn07XG5cbmNvbnN0IGNvbnRhaW5lcldpZHRoU3R5bGVzID0gKCB7XG5cdF9fdW5zdGFibGVJbnB1dFdpZHRoLFxuXHRsYWJlbFBvc2l0aW9uLFxufTogQ29udGFpbmVyUHJvcHMgKSA9PiB7XG5cdGlmICggISBfX3Vuc3RhYmxlSW5wdXRXaWR0aCApIHtcblx0XHRyZXR1cm4gY3NzKCB7IHdpZHRoOiAnMTAwJScgfSApO1xuXHR9XG5cblx0aWYgKCBsYWJlbFBvc2l0aW9uID09PSAnc2lkZScgKSB7XG5cdFx0cmV0dXJuICcnO1xuXHR9XG5cblx0aWYgKCBsYWJlbFBvc2l0aW9uID09PSAnZWRnZScgKSB7XG5cdFx0cmV0dXJuIGNzcygge1xuXHRcdFx0ZmxleDogYDAgMCAkeyBfX3Vuc3RhYmxlSW5wdXRXaWR0aCB9YCxcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4gY3NzKCB7IHdpZHRoOiBfX3Vuc3RhYmxlSW5wdXRXaWR0aCB9ICk7XG59O1xuXG5leHBvcnQgY29uc3QgQ29udGFpbmVyID0gc3R5bGVkLmRpdjwgQ29udGFpbmVyUHJvcHMgPmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleDogMTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXG5cdCR7IGNvbnRhaW5lckRpc2FibGVkU3R5bGVzIH1cblx0JHsgY29udGFpbmVyV2lkdGhTdHlsZXMgfVxuYDtcblxudHlwZSBJbnB1dFByb3BzID0ge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemU/OiBib29sZWFuO1xuXHRkaXNhYmxlZD86IGJvb2xlYW47XG5cdGlucHV0U2l6ZT86IFNpemU7XG5cdGlzRHJhZ2dpbmc/OiBib29sZWFuO1xuXHRkcmFnQ3Vyc29yPzogQ1NTUHJvcGVydGllc1sgJ2N1cnNvcicgXTtcblx0cGFkZGluZ0lubGluZVN0YXJ0PzogQ1NTUHJvcGVydGllc1sgJ3BhZGRpbmdJbmxpbmVTdGFydCcgXTtcblx0cGFkZGluZ0lubGluZUVuZD86IENTU1Byb3BlcnRpZXNbICdwYWRkaW5nSW5saW5lRW5kJyBdO1xufTtcblxuY29uc3QgZGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogSW5wdXRQcm9wcyApID0+IHtcblx0aWYgKCAhIGRpc2FibGVkICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogQ09MT1JTLnVpLnRleHREaXNhYmxlZCxcblx0fSApO1xufTtcblxuZXhwb3J0IGNvbnN0IGZvbnRTaXplU3R5bGVzID0gKCB7IGlucHV0U2l6ZTogc2l6ZSB9OiBJbnB1dFByb3BzICkgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiAnMTNweCcsXG5cdFx0c21hbGw6ICcxMXB4Jyxcblx0XHRjb21wYWN0OiAnMTNweCcsXG5cdFx0J19fdW5zdGFibGUtbGFyZ2UnOiAnMTNweCcsXG5cdH07XG5cblx0Y29uc3QgZm9udFNpemUgPSBzaXplc1sgc2l6ZSBhcyBTaXplIF0gfHwgc2l6ZXMuZGVmYXVsdDtcblx0Y29uc3QgZm9udFNpemVNb2JpbGUgPSAnMTZweCc7XG5cblx0aWYgKCAhIGZvbnRTaXplICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdHJldHVybiBjc3NgXG5cdFx0Zm9udC1zaXplOiAkeyBmb250U2l6ZU1vYmlsZSB9O1xuXG5cdFx0QG1lZGlhICggbWluLXdpZHRoOiA2MDBweCApIHtcblx0XHRcdGZvbnQtc2l6ZTogJHsgZm9udFNpemUgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgZ2V0U2l6ZUNvbmZpZyA9ICgge1xuXHRpbnB1dFNpemU6IHNpemUsXG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcbn06IElucHV0UHJvcHMgKSA9PiB7XG5cdC8vIFBhZGRpbmdzIG1heSBiZSBvdmVycmlkZGVuIGJ5IHRoZSBjdXN0b20gcGFkZGluZ3MgcHJvcHMuXG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdH0sXG5cdFx0c21hbGw6IHtcblx0XHRcdGhlaWdodDogMjQsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiAyNCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHR9LFxuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdGhlaWdodDogMzIsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiAzMixcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHR9LFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzoge1xuXHRcdFx0aGVpZ2h0OiA0MCxcblx0XHRcdGxpbmVIZWlnaHQ6IDEsXG5cdFx0XHRtaW5IZWlnaHQ6IDQwLFxuXHRcdFx0cGFkZGluZ0xlZnQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdFx0fSxcblx0fTtcblxuXHRpZiAoICEgX19uZXh0NDBweERlZmF1bHRTaXplICkge1xuXHRcdHNpemVzLmRlZmF1bHQgPSBzaXplcy5jb21wYWN0O1xuXHR9XG5cblx0cmV0dXJuIHNpemVzWyBzaXplIGFzIFNpemUgXSB8fCBzaXplcy5kZWZhdWx0O1xufTtcblxuY29uc3Qgc2l6ZVN0eWxlcyA9ICggcHJvcHM6IElucHV0UHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIGdldFNpemVDb25maWcoIHByb3BzICkgKTtcbn07XG5cbmNvbnN0IGN1c3RvbVBhZGRpbmdzID0gKCB7XG5cdHBhZGRpbmdJbmxpbmVTdGFydCxcblx0cGFkZGluZ0lubGluZUVuZCxcbn06IElucHV0UHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHsgcGFkZGluZ0lubGluZVN0YXJ0LCBwYWRkaW5nSW5saW5lRW5kIH0gKTtcbn07XG5cbmNvbnN0IGRyYWdTdHlsZXMgPSAoIHsgaXNEcmFnZ2luZywgZHJhZ0N1cnNvciB9OiBJbnB1dFByb3BzICkgPT4ge1xuXHRsZXQgZGVmYXVsdEFycm93U3R5bGVzOiBTZXJpYWxpemVkU3R5bGVzIHwgdW5kZWZpbmVkO1xuXHRsZXQgYWN0aXZlRHJhZ0N1cnNvclN0eWxlczogU2VyaWFsaXplZFN0eWxlcyB8IHVuZGVmaW5lZDtcblxuXHRpZiAoIGlzRHJhZ2dpbmcgKSB7XG5cdFx0ZGVmYXVsdEFycm93U3R5bGVzID0gY3NzYFxuXHRcdFx0Y3Vyc29yOiAkeyBkcmFnQ3Vyc29yIH07XG5cdFx0XHR1c2VyLXNlbGVjdDogbm9uZTtcblxuXHRcdFx0Jjo6LXdlYmtpdC1vdXRlci1zcGluLWJ1dHRvbixcblx0XHRcdCY6Oi13ZWJraXQtaW5uZXItc3Bpbi1idXR0b24ge1xuXHRcdFx0XHQtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmUgIWltcG9ydGFudDtcblx0XHRcdFx0bWFyZ2luOiAwICFpbXBvcnRhbnQ7XG5cdFx0XHR9XG5cdFx0YDtcblx0fVxuXG5cdGlmICggaXNEcmFnZ2luZyAmJiBkcmFnQ3Vyc29yICkge1xuXHRcdGFjdGl2ZURyYWdDdXJzb3JTdHlsZXMgPSBjc3NgXG5cdFx0XHQmOmFjdGl2ZSB7XG5cdFx0XHRcdGN1cnNvcjogJHsgZHJhZ0N1cnNvciB9O1xuXHRcdFx0fVxuXHRcdGA7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdCR7IGRlZmF1bHRBcnJvd1N0eWxlcyB9XG5cdFx0JHsgYWN0aXZlRHJhZ0N1cnNvclN0eWxlcyB9XG5cdGA7XG59O1xuXG4vLyBUT0RPOiBSZXNvbHZlIG5lZWQgdG8gdXNlICYmJiB0byBpbmNyZWFzZSBzcGVjaWZpY2l0eVxuLy8gaHR0cHM6Ly9naXRodWIuY29tL1dvcmRQcmVzcy9ndXRlbmJlcmcvaXNzdWVzLzE4NDgzXG5cbmV4cG9ydCBjb25zdCBJbnB1dCA9IHN0eWxlZC5pbnB1dDwgSW5wdXRQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyOiBub25lO1xuXHRcdGJveC1zaGFkb3c6IG5vbmUgIWltcG9ydGFudDtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRmb250LWZhbWlseTogaW5oZXJpdDtcblx0XHRtYXJnaW46IDA7XG5cdFx0b3V0bGluZTogbm9uZTtcblx0XHR3aWR0aDogMTAwJTtcblxuXHRcdCR7IGRyYWdTdHlsZXMgfVxuXHRcdCR7IGRpc2FibGVkU3R5bGVzIH1cblx0XHQkeyBmb250U2l6ZVN0eWxlcyB9XG5cdFx0JHsgc2l6ZVN0eWxlcyB9XG5cdFx0JHsgY3VzdG9tUGFkZGluZ3MgfVxuXG5cdFx0Jjo6LXdlYmtpdC1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOjotbW96LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblxuXHRcdCY6LW1zLWlucHV0LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblxuXHRcdCZbdHlwZT0nZW1haWwnXSxcblx0XHQmW3R5cGU9J3VybCddIHtcblx0XHRcdC8qIHJ0bDppZ25vcmUgKi9cblx0XHRcdGRpcmVjdGlvbjogbHRyO1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgQmFzZUxhYmVsID0gc3R5bGVkKCBUZXh0ICk8IHsgbGFiZWxQb3NpdGlvbj86IExhYmVsUG9zaXRpb24gfSA+YFxuXHQmJiYge1xuXHRcdCR7IGJhc2VMYWJlbFR5cG9ncmFwaHkgfTtcblxuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0cGFkZGluZy10b3A6IDA7XG5cdFx0cGFkZGluZy1ib3R0b206IDA7XG5cdFx0bWF4LXdpZHRoOiAxMDAlO1xuXHRcdHotaW5kZXg6IDE7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBMYWJlbCA9IChcblx0cHJvcHM6IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzPFxuXHRcdHsgbGFiZWxQb3NpdGlvbj86IExhYmVsUG9zaXRpb247IGNoaWxkcmVuOiBSZWFjdE5vZGUgfSxcblx0XHQnbGFiZWwnLFxuXHRcdGZhbHNlXG5cdD5cbikgPT4gPEJhc2VMYWJlbCB7IC4uLnByb3BzIH0gYXM9XCJsYWJlbFwiIC8+O1xuXG5leHBvcnQgY29uc3QgTGFiZWxXcmFwcGVyID0gc3R5bGVkKCBGbGV4SXRlbSApYFxuXHRtYXgtd2lkdGg6IGNhbGMoIDEwMCUgLSAxMHB4ICk7XG5gO1xuXG5jb25zdCBwcmVmaXhTdWZmaXhXcmFwcGVyU3R5bGVzID0gKCB7XG5cdHZhcmlhbnQgPSAnZGVmYXVsdCcsXG5cdHNpemUsXG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0aXNQcmVmaXgsXG59OiBQcmVmaXhTdWZmaXhXcmFwcGVyUHJvcHMgJiB7IGlzUHJlZml4PzogYm9vbGVhbiB9ICkgPT4ge1xuXHRjb25zdCB7IHBhZGRpbmdMZWZ0OiBwYWRkaW5nIH0gPSBnZXRTaXplQ29uZmlnKCB7XG5cdFx0aW5wdXRTaXplOiBzaXplLFxuXHRcdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0fSApO1xuXG5cdGNvbnN0IHBhZGRpbmdQcm9wZXJ0eSA9IGlzUHJlZml4XG5cdFx0PyAncGFkZGluZ0lubGluZVN0YXJ0J1xuXHRcdDogJ3BhZGRpbmdJbmxpbmVFbmQnO1xuXG5cdGlmICggdmFyaWFudCA9PT0gJ2RlZmF1bHQnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdFsgcGFkZGluZ1Byb3BlcnR5IF06IHBhZGRpbmcsXG5cdFx0fSApO1xuXHR9XG5cblx0Ly8gSWYgdmFyaWFudCBpcyAnaWNvbicgb3IgJ2NvbnRyb2wnXG5cdHJldHVybiBjc3MoIHtcblx0XHRkaXNwbGF5OiAnZmxleCcsXG5cdFx0WyBwYWRkaW5nUHJvcGVydHkgXTogcGFkZGluZyAtIDQsXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBQcmVmaXhTdWZmaXhXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0JHsgcHJlZml4U3VmZml4V3JhcHBlclN0eWxlcyB9XG5gO1xuIl19 */");
  };
  var fontSizeStyles = ({
    inputSize: size3
  }) => {
    const sizes = {
      default: "13px",
      small: "11px",
      compact: "13px",
      "__unstable-large": "13px"
    };
    const fontSize = sizes[size3] || sizes.default;
    const fontSizeMobile = "16px";
    if (!fontSize) {
      return "";
    }
    return /* @__PURE__ */ css("font-size:", fontSizeMobile, ";@media ( min-width: 600px ){font-size:", fontSize, ";}" + (false ? "" : ";label:fontSizeStyles;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEwS1ciLCJmaWxlIjoiaW5wdXQtY29udHJvbC1zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHR5cGUgeyBDU1NQcm9wZXJ0aWVzLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi8uLi9jb250ZXh0JztcbmltcG9ydCB7IEZsZXgsIEZsZXhJdGVtIH0gZnJvbSAnLi4vLi4vZmxleCc7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vdGV4dCc7XG5pbXBvcnQgeyBiYXNlTGFiZWxUeXBvZ3JhcGh5LCBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHR5cGUgeyBMYWJlbFBvc2l0aW9uLCBTaXplLCBQcmVmaXhTdWZmaXhXcmFwcGVyUHJvcHMgfSBmcm9tICcuLi90eXBlcyc7XG5cbnR5cGUgQ29udGFpbmVyUHJvcHMgPSB7XG5cdGRpc2FibGVkPzogYm9vbGVhbjtcblx0aGlkZUxhYmVsPzogYm9vbGVhbjtcblx0X191bnN0YWJsZUlucHV0V2lkdGg/OiBDU1NQcm9wZXJ0aWVzWyAnd2lkdGgnIF07XG5cdGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uO1xufTtcblxuZXhwb3J0IGNvbnN0IFByZWZpeCA9IHN0eWxlZC5zcGFuYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBTdWZmaXggPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0YWxpZ24tc2VsZjogc3RyZXRjaDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbnR5cGUgQmFja2Ryb3BQcm9wcyA9IHtcblx0ZGlzYWJsZWQ/OiBib29sZWFuO1xuXHRpc0JvcmRlcmxlc3M/OiBib29sZWFuO1xufTtcblxuY29uc3QgYmFja2Ryb3BCb3JkZXJDb2xvciA9ICgge1xuXHRkaXNhYmxlZCxcblx0aXNCb3JkZXJsZXNzLFxufTogQmFja2Ryb3BQcm9wcyApOiBDU1NQcm9wZXJ0aWVzWyAnYm9yZGVyQ29sb3InIF0gPT4ge1xuXHRpZiAoIGlzQm9yZGVybGVzcyApIHtcblx0XHRyZXR1cm4gJ3RyYW5zcGFyZW50Jztcblx0fVxuXG5cdGlmICggZGlzYWJsZWQgKSB7XG5cdFx0cmV0dXJuIENPTE9SUy51aS5ib3JkZXJEaXNhYmxlZDtcblx0fVxuXG5cdHJldHVybiBDT0xPUlMudWkuYm9yZGVyO1xufTtcblxuZXhwb3J0IGNvbnN0IEJhY2tkcm9wVUkgPSBzdHlsZWQuZGl2PCBCYWNrZHJvcFByb3BzID5gXG5cdCYmJiB7XG5cdFx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0XHRib3JkZXItY29sb3I6ICR7IGJhY2tkcm9wQm9yZGVyQ29sb3IgfTtcblx0XHRib3JkZXItcmFkaXVzOiBpbmhlcml0O1xuXHRcdGJvcmRlci1zdHlsZTogc29saWQ7XG5cdFx0Ym9yZGVyLXdpZHRoOiAxcHg7XG5cdFx0Ym90dG9tOiAwO1xuXHRcdGxlZnQ6IDA7XG5cdFx0bWFyZ2luOiAwO1xuXHRcdHBhZGRpbmc6IDA7XG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdHJpZ2h0OiAwO1xuXHRcdHRvcDogMDtcblxuXHRcdCR7IHJ0bCggeyBwYWRkaW5nTGVmdDogMiB9ICkgfVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgUm9vdCA9IHN0eWxlZCggRmxleCApYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRwYWRkaW5nLXRvcDogMDtcblxuXHQvLyBGb2N1cyB3aXRoaW4sIGV4Y2x1ZGluZyBjYXNlcyB3aGVyZSBhdXhpbGlhcnkgY29udHJvbHMgaW4gcHJlZml4IG9yIHN1ZmZpeCBoYXZlIGZvY3VzLlxuXHQmOmZvY3VzLXdpdGhpbjpub3QoIDpoYXMoIDppcyggJHsgUHJlZml4IH0sICR7IFN1ZmZpeCB9ICk6Zm9jdXMtd2l0aGluICkgKSB7XG5cdFx0JHsgQmFja2Ryb3BVSSB9IHtcblx0XHRcdGJvcmRlci1jb2xvcjogJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRib3gtc2hhZG93OiAkeyBDT05GSUcuY29udHJvbEJveFNoYWRvd0ZvY3VzIH07XG5cdFx0XHQvLyBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSB3aWxsIHNob3cgdGhpcyBvdXRsaW5lLCBidXQgbm90IHRoZSBib3gtc2hhZG93LlxuXHRcdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdFx0b3V0bGluZS1vZmZzZXQ6IC0ycHg7XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBjb250YWluZXJEaXNhYmxlZFN0eWxlcyA9ICggeyBkaXNhYmxlZCB9OiBDb250YWluZXJQcm9wcyApID0+IHtcblx0Y29uc3QgYmFja2dyb3VuZENvbG9yID0gZGlzYWJsZWRcblx0XHQ/IENPTE9SUy51aS5iYWNrZ3JvdW5kRGlzYWJsZWRcblx0XHQ6IENPTE9SUy51aS5iYWNrZ3JvdW5kO1xuXG5cdHJldHVybiBjc3MoIHsgYmFja2dyb3VuZENvbG9yIH0gKTtcbn07XG5cbmNvbnN0IGNvbnRhaW5lcldpZHRoU3R5bGVzID0gKCB7XG5cdF9fdW5zdGFibGVJbnB1dFdpZHRoLFxuXHRsYWJlbFBvc2l0aW9uLFxufTogQ29udGFpbmVyUHJvcHMgKSA9PiB7XG5cdGlmICggISBfX3Vuc3RhYmxlSW5wdXRXaWR0aCApIHtcblx0XHRyZXR1cm4gY3NzKCB7IHdpZHRoOiAnMTAwJScgfSApO1xuXHR9XG5cblx0aWYgKCBsYWJlbFBvc2l0aW9uID09PSAnc2lkZScgKSB7XG5cdFx0cmV0dXJuICcnO1xuXHR9XG5cblx0aWYgKCBsYWJlbFBvc2l0aW9uID09PSAnZWRnZScgKSB7XG5cdFx0cmV0dXJuIGNzcygge1xuXHRcdFx0ZmxleDogYDAgMCAkeyBfX3Vuc3RhYmxlSW5wdXRXaWR0aCB9YCxcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4gY3NzKCB7IHdpZHRoOiBfX3Vuc3RhYmxlSW5wdXRXaWR0aCB9ICk7XG59O1xuXG5leHBvcnQgY29uc3QgQ29udGFpbmVyID0gc3R5bGVkLmRpdjwgQ29udGFpbmVyUHJvcHMgPmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleDogMTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXG5cdCR7IGNvbnRhaW5lckRpc2FibGVkU3R5bGVzIH1cblx0JHsgY29udGFpbmVyV2lkdGhTdHlsZXMgfVxuYDtcblxudHlwZSBJbnB1dFByb3BzID0ge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemU/OiBib29sZWFuO1xuXHRkaXNhYmxlZD86IGJvb2xlYW47XG5cdGlucHV0U2l6ZT86IFNpemU7XG5cdGlzRHJhZ2dpbmc/OiBib29sZWFuO1xuXHRkcmFnQ3Vyc29yPzogQ1NTUHJvcGVydGllc1sgJ2N1cnNvcicgXTtcblx0cGFkZGluZ0lubGluZVN0YXJ0PzogQ1NTUHJvcGVydGllc1sgJ3BhZGRpbmdJbmxpbmVTdGFydCcgXTtcblx0cGFkZGluZ0lubGluZUVuZD86IENTU1Byb3BlcnRpZXNbICdwYWRkaW5nSW5saW5lRW5kJyBdO1xufTtcblxuY29uc3QgZGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogSW5wdXRQcm9wcyApID0+IHtcblx0aWYgKCAhIGRpc2FibGVkICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogQ09MT1JTLnVpLnRleHREaXNhYmxlZCxcblx0fSApO1xufTtcblxuZXhwb3J0IGNvbnN0IGZvbnRTaXplU3R5bGVzID0gKCB7IGlucHV0U2l6ZTogc2l6ZSB9OiBJbnB1dFByb3BzICkgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiAnMTNweCcsXG5cdFx0c21hbGw6ICcxMXB4Jyxcblx0XHRjb21wYWN0OiAnMTNweCcsXG5cdFx0J19fdW5zdGFibGUtbGFyZ2UnOiAnMTNweCcsXG5cdH07XG5cblx0Y29uc3QgZm9udFNpemUgPSBzaXplc1sgc2l6ZSBhcyBTaXplIF0gfHwgc2l6ZXMuZGVmYXVsdDtcblx0Y29uc3QgZm9udFNpemVNb2JpbGUgPSAnMTZweCc7XG5cblx0aWYgKCAhIGZvbnRTaXplICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdHJldHVybiBjc3NgXG5cdFx0Zm9udC1zaXplOiAkeyBmb250U2l6ZU1vYmlsZSB9O1xuXG5cdFx0QG1lZGlhICggbWluLXdpZHRoOiA2MDBweCApIHtcblx0XHRcdGZvbnQtc2l6ZTogJHsgZm9udFNpemUgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgZ2V0U2l6ZUNvbmZpZyA9ICgge1xuXHRpbnB1dFNpemU6IHNpemUsXG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcbn06IElucHV0UHJvcHMgKSA9PiB7XG5cdC8vIFBhZGRpbmdzIG1heSBiZSBvdmVycmlkZGVuIGJ5IHRoZSBjdXN0b20gcGFkZGluZ3MgcHJvcHMuXG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdH0sXG5cdFx0c21hbGw6IHtcblx0XHRcdGhlaWdodDogMjQsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiAyNCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHR9LFxuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdGhlaWdodDogMzIsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiAzMixcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHR9LFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzoge1xuXHRcdFx0aGVpZ2h0OiA0MCxcblx0XHRcdGxpbmVIZWlnaHQ6IDEsXG5cdFx0XHRtaW5IZWlnaHQ6IDQwLFxuXHRcdFx0cGFkZGluZ0xlZnQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdFx0fSxcblx0fTtcblxuXHRpZiAoICEgX19uZXh0NDBweERlZmF1bHRTaXplICkge1xuXHRcdHNpemVzLmRlZmF1bHQgPSBzaXplcy5jb21wYWN0O1xuXHR9XG5cblx0cmV0dXJuIHNpemVzWyBzaXplIGFzIFNpemUgXSB8fCBzaXplcy5kZWZhdWx0O1xufTtcblxuY29uc3Qgc2l6ZVN0eWxlcyA9ICggcHJvcHM6IElucHV0UHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIGdldFNpemVDb25maWcoIHByb3BzICkgKTtcbn07XG5cbmNvbnN0IGN1c3RvbVBhZGRpbmdzID0gKCB7XG5cdHBhZGRpbmdJbmxpbmVTdGFydCxcblx0cGFkZGluZ0lubGluZUVuZCxcbn06IElucHV0UHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHsgcGFkZGluZ0lubGluZVN0YXJ0LCBwYWRkaW5nSW5saW5lRW5kIH0gKTtcbn07XG5cbmNvbnN0IGRyYWdTdHlsZXMgPSAoIHsgaXNEcmFnZ2luZywgZHJhZ0N1cnNvciB9OiBJbnB1dFByb3BzICkgPT4ge1xuXHRsZXQgZGVmYXVsdEFycm93U3R5bGVzOiBTZXJpYWxpemVkU3R5bGVzIHwgdW5kZWZpbmVkO1xuXHRsZXQgYWN0aXZlRHJhZ0N1cnNvclN0eWxlczogU2VyaWFsaXplZFN0eWxlcyB8IHVuZGVmaW5lZDtcblxuXHRpZiAoIGlzRHJhZ2dpbmcgKSB7XG5cdFx0ZGVmYXVsdEFycm93U3R5bGVzID0gY3NzYFxuXHRcdFx0Y3Vyc29yOiAkeyBkcmFnQ3Vyc29yIH07XG5cdFx0XHR1c2VyLXNlbGVjdDogbm9uZTtcblxuXHRcdFx0Jjo6LXdlYmtpdC1vdXRlci1zcGluLWJ1dHRvbixcblx0XHRcdCY6Oi13ZWJraXQtaW5uZXItc3Bpbi1idXR0b24ge1xuXHRcdFx0XHQtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmUgIWltcG9ydGFudDtcblx0XHRcdFx0bWFyZ2luOiAwICFpbXBvcnRhbnQ7XG5cdFx0XHR9XG5cdFx0YDtcblx0fVxuXG5cdGlmICggaXNEcmFnZ2luZyAmJiBkcmFnQ3Vyc29yICkge1xuXHRcdGFjdGl2ZURyYWdDdXJzb3JTdHlsZXMgPSBjc3NgXG5cdFx0XHQmOmFjdGl2ZSB7XG5cdFx0XHRcdGN1cnNvcjogJHsgZHJhZ0N1cnNvciB9O1xuXHRcdFx0fVxuXHRcdGA7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdCR7IGRlZmF1bHRBcnJvd1N0eWxlcyB9XG5cdFx0JHsgYWN0aXZlRHJhZ0N1cnNvclN0eWxlcyB9XG5cdGA7XG59O1xuXG4vLyBUT0RPOiBSZXNvbHZlIG5lZWQgdG8gdXNlICYmJiB0byBpbmNyZWFzZSBzcGVjaWZpY2l0eVxuLy8gaHR0cHM6Ly9naXRodWIuY29tL1dvcmRQcmVzcy9ndXRlbmJlcmcvaXNzdWVzLzE4NDgzXG5cbmV4cG9ydCBjb25zdCBJbnB1dCA9IHN0eWxlZC5pbnB1dDwgSW5wdXRQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyOiBub25lO1xuXHRcdGJveC1zaGFkb3c6IG5vbmUgIWltcG9ydGFudDtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRmb250LWZhbWlseTogaW5oZXJpdDtcblx0XHRtYXJnaW46IDA7XG5cdFx0b3V0bGluZTogbm9uZTtcblx0XHR3aWR0aDogMTAwJTtcblxuXHRcdCR7IGRyYWdTdHlsZXMgfVxuXHRcdCR7IGRpc2FibGVkU3R5bGVzIH1cblx0XHQkeyBmb250U2l6ZVN0eWxlcyB9XG5cdFx0JHsgc2l6ZVN0eWxlcyB9XG5cdFx0JHsgY3VzdG9tUGFkZGluZ3MgfVxuXG5cdFx0Jjo6LXdlYmtpdC1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOjotbW96LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblxuXHRcdCY6LW1zLWlucHV0LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblxuXHRcdCZbdHlwZT0nZW1haWwnXSxcblx0XHQmW3R5cGU9J3VybCddIHtcblx0XHRcdC8qIHJ0bDppZ25vcmUgKi9cblx0XHRcdGRpcmVjdGlvbjogbHRyO1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgQmFzZUxhYmVsID0gc3R5bGVkKCBUZXh0ICk8IHsgbGFiZWxQb3NpdGlvbj86IExhYmVsUG9zaXRpb24gfSA+YFxuXHQmJiYge1xuXHRcdCR7IGJhc2VMYWJlbFR5cG9ncmFwaHkgfTtcblxuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0cGFkZGluZy10b3A6IDA7XG5cdFx0cGFkZGluZy1ib3R0b206IDA7XG5cdFx0bWF4LXdpZHRoOiAxMDAlO1xuXHRcdHotaW5kZXg6IDE7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBMYWJlbCA9IChcblx0cHJvcHM6IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzPFxuXHRcdHsgbGFiZWxQb3NpdGlvbj86IExhYmVsUG9zaXRpb247IGNoaWxkcmVuOiBSZWFjdE5vZGUgfSxcblx0XHQnbGFiZWwnLFxuXHRcdGZhbHNlXG5cdD5cbikgPT4gPEJhc2VMYWJlbCB7IC4uLnByb3BzIH0gYXM9XCJsYWJlbFwiIC8+O1xuXG5leHBvcnQgY29uc3QgTGFiZWxXcmFwcGVyID0gc3R5bGVkKCBGbGV4SXRlbSApYFxuXHRtYXgtd2lkdGg6IGNhbGMoIDEwMCUgLSAxMHB4ICk7XG5gO1xuXG5jb25zdCBwcmVmaXhTdWZmaXhXcmFwcGVyU3R5bGVzID0gKCB7XG5cdHZhcmlhbnQgPSAnZGVmYXVsdCcsXG5cdHNpemUsXG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0aXNQcmVmaXgsXG59OiBQcmVmaXhTdWZmaXhXcmFwcGVyUHJvcHMgJiB7IGlzUHJlZml4PzogYm9vbGVhbiB9ICkgPT4ge1xuXHRjb25zdCB7IHBhZGRpbmdMZWZ0OiBwYWRkaW5nIH0gPSBnZXRTaXplQ29uZmlnKCB7XG5cdFx0aW5wdXRTaXplOiBzaXplLFxuXHRcdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0fSApO1xuXG5cdGNvbnN0IHBhZGRpbmdQcm9wZXJ0eSA9IGlzUHJlZml4XG5cdFx0PyAncGFkZGluZ0lubGluZVN0YXJ0J1xuXHRcdDogJ3BhZGRpbmdJbmxpbmVFbmQnO1xuXG5cdGlmICggdmFyaWFudCA9PT0gJ2RlZmF1bHQnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdFsgcGFkZGluZ1Byb3BlcnR5IF06IHBhZGRpbmcsXG5cdFx0fSApO1xuXHR9XG5cblx0Ly8gSWYgdmFyaWFudCBpcyAnaWNvbicgb3IgJ2NvbnRyb2wnXG5cdHJldHVybiBjc3MoIHtcblx0XHRkaXNwbGF5OiAnZmxleCcsXG5cdFx0WyBwYWRkaW5nUHJvcGVydHkgXTogcGFkZGluZyAtIDQsXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBQcmVmaXhTdWZmaXhXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0JHsgcHJlZml4U3VmZml4V3JhcHBlclN0eWxlcyB9XG5gO1xuIl19 */");
  };
  var getSizeConfig = ({
    inputSize: size3,
    __next40pxDefaultSize
  }) => {
    const sizes = {
      default: {
        height: 40,
        lineHeight: 1,
        minHeight: 40,
        paddingLeft: config_values_default.controlPaddingX,
        paddingRight: config_values_default.controlPaddingX
      },
      small: {
        height: 24,
        lineHeight: 1,
        minHeight: 24,
        paddingLeft: config_values_default.controlPaddingXSmall,
        paddingRight: config_values_default.controlPaddingXSmall
      },
      compact: {
        height: 32,
        lineHeight: 1,
        minHeight: 32,
        paddingLeft: config_values_default.controlPaddingXSmall,
        paddingRight: config_values_default.controlPaddingXSmall
      },
      "__unstable-large": {
        height: 40,
        lineHeight: 1,
        minHeight: 40,
        paddingLeft: config_values_default.controlPaddingX,
        paddingRight: config_values_default.controlPaddingX
      }
    };
    if (!__next40pxDefaultSize) {
      sizes.default = sizes.compact;
    }
    return sizes[size3] || sizes.default;
  };
  var sizeStyles = (props) => {
    return /* @__PURE__ */ css(getSizeConfig(props), false ? "" : ";label:sizeStyles;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUErTlEiLCJmaWxlIjoiaW5wdXQtY29udHJvbC1zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHR5cGUgeyBDU1NQcm9wZXJ0aWVzLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi8uLi9jb250ZXh0JztcbmltcG9ydCB7IEZsZXgsIEZsZXhJdGVtIH0gZnJvbSAnLi4vLi4vZmxleCc7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vdGV4dCc7XG5pbXBvcnQgeyBiYXNlTGFiZWxUeXBvZ3JhcGh5LCBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHR5cGUgeyBMYWJlbFBvc2l0aW9uLCBTaXplLCBQcmVmaXhTdWZmaXhXcmFwcGVyUHJvcHMgfSBmcm9tICcuLi90eXBlcyc7XG5cbnR5cGUgQ29udGFpbmVyUHJvcHMgPSB7XG5cdGRpc2FibGVkPzogYm9vbGVhbjtcblx0aGlkZUxhYmVsPzogYm9vbGVhbjtcblx0X191bnN0YWJsZUlucHV0V2lkdGg/OiBDU1NQcm9wZXJ0aWVzWyAnd2lkdGgnIF07XG5cdGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uO1xufTtcblxuZXhwb3J0IGNvbnN0IFByZWZpeCA9IHN0eWxlZC5zcGFuYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBTdWZmaXggPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0YWxpZ24tc2VsZjogc3RyZXRjaDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbnR5cGUgQmFja2Ryb3BQcm9wcyA9IHtcblx0ZGlzYWJsZWQ/OiBib29sZWFuO1xuXHRpc0JvcmRlcmxlc3M/OiBib29sZWFuO1xufTtcblxuY29uc3QgYmFja2Ryb3BCb3JkZXJDb2xvciA9ICgge1xuXHRkaXNhYmxlZCxcblx0aXNCb3JkZXJsZXNzLFxufTogQmFja2Ryb3BQcm9wcyApOiBDU1NQcm9wZXJ0aWVzWyAnYm9yZGVyQ29sb3InIF0gPT4ge1xuXHRpZiAoIGlzQm9yZGVybGVzcyApIHtcblx0XHRyZXR1cm4gJ3RyYW5zcGFyZW50Jztcblx0fVxuXG5cdGlmICggZGlzYWJsZWQgKSB7XG5cdFx0cmV0dXJuIENPTE9SUy51aS5ib3JkZXJEaXNhYmxlZDtcblx0fVxuXG5cdHJldHVybiBDT0xPUlMudWkuYm9yZGVyO1xufTtcblxuZXhwb3J0IGNvbnN0IEJhY2tkcm9wVUkgPSBzdHlsZWQuZGl2PCBCYWNrZHJvcFByb3BzID5gXG5cdCYmJiB7XG5cdFx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0XHRib3JkZXItY29sb3I6ICR7IGJhY2tkcm9wQm9yZGVyQ29sb3IgfTtcblx0XHRib3JkZXItcmFkaXVzOiBpbmhlcml0O1xuXHRcdGJvcmRlci1zdHlsZTogc29saWQ7XG5cdFx0Ym9yZGVyLXdpZHRoOiAxcHg7XG5cdFx0Ym90dG9tOiAwO1xuXHRcdGxlZnQ6IDA7XG5cdFx0bWFyZ2luOiAwO1xuXHRcdHBhZGRpbmc6IDA7XG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdHJpZ2h0OiAwO1xuXHRcdHRvcDogMDtcblxuXHRcdCR7IHJ0bCggeyBwYWRkaW5nTGVmdDogMiB9ICkgfVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgUm9vdCA9IHN0eWxlZCggRmxleCApYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRwYWRkaW5nLXRvcDogMDtcblxuXHQvLyBGb2N1cyB3aXRoaW4sIGV4Y2x1ZGluZyBjYXNlcyB3aGVyZSBhdXhpbGlhcnkgY29udHJvbHMgaW4gcHJlZml4IG9yIHN1ZmZpeCBoYXZlIGZvY3VzLlxuXHQmOmZvY3VzLXdpdGhpbjpub3QoIDpoYXMoIDppcyggJHsgUHJlZml4IH0sICR7IFN1ZmZpeCB9ICk6Zm9jdXMtd2l0aGluICkgKSB7XG5cdFx0JHsgQmFja2Ryb3BVSSB9IHtcblx0XHRcdGJvcmRlci1jb2xvcjogJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRib3gtc2hhZG93OiAkeyBDT05GSUcuY29udHJvbEJveFNoYWRvd0ZvY3VzIH07XG5cdFx0XHQvLyBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSB3aWxsIHNob3cgdGhpcyBvdXRsaW5lLCBidXQgbm90IHRoZSBib3gtc2hhZG93LlxuXHRcdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdFx0b3V0bGluZS1vZmZzZXQ6IC0ycHg7XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBjb250YWluZXJEaXNhYmxlZFN0eWxlcyA9ICggeyBkaXNhYmxlZCB9OiBDb250YWluZXJQcm9wcyApID0+IHtcblx0Y29uc3QgYmFja2dyb3VuZENvbG9yID0gZGlzYWJsZWRcblx0XHQ/IENPTE9SUy51aS5iYWNrZ3JvdW5kRGlzYWJsZWRcblx0XHQ6IENPTE9SUy51aS5iYWNrZ3JvdW5kO1xuXG5cdHJldHVybiBjc3MoIHsgYmFja2dyb3VuZENvbG9yIH0gKTtcbn07XG5cbmNvbnN0IGNvbnRhaW5lcldpZHRoU3R5bGVzID0gKCB7XG5cdF9fdW5zdGFibGVJbnB1dFdpZHRoLFxuXHRsYWJlbFBvc2l0aW9uLFxufTogQ29udGFpbmVyUHJvcHMgKSA9PiB7XG5cdGlmICggISBfX3Vuc3RhYmxlSW5wdXRXaWR0aCApIHtcblx0XHRyZXR1cm4gY3NzKCB7IHdpZHRoOiAnMTAwJScgfSApO1xuXHR9XG5cblx0aWYgKCBsYWJlbFBvc2l0aW9uID09PSAnc2lkZScgKSB7XG5cdFx0cmV0dXJuICcnO1xuXHR9XG5cblx0aWYgKCBsYWJlbFBvc2l0aW9uID09PSAnZWRnZScgKSB7XG5cdFx0cmV0dXJuIGNzcygge1xuXHRcdFx0ZmxleDogYDAgMCAkeyBfX3Vuc3RhYmxlSW5wdXRXaWR0aCB9YCxcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4gY3NzKCB7IHdpZHRoOiBfX3Vuc3RhYmxlSW5wdXRXaWR0aCB9ICk7XG59O1xuXG5leHBvcnQgY29uc3QgQ29udGFpbmVyID0gc3R5bGVkLmRpdjwgQ29udGFpbmVyUHJvcHMgPmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleDogMTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXG5cdCR7IGNvbnRhaW5lckRpc2FibGVkU3R5bGVzIH1cblx0JHsgY29udGFpbmVyV2lkdGhTdHlsZXMgfVxuYDtcblxudHlwZSBJbnB1dFByb3BzID0ge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemU/OiBib29sZWFuO1xuXHRkaXNhYmxlZD86IGJvb2xlYW47XG5cdGlucHV0U2l6ZT86IFNpemU7XG5cdGlzRHJhZ2dpbmc/OiBib29sZWFuO1xuXHRkcmFnQ3Vyc29yPzogQ1NTUHJvcGVydGllc1sgJ2N1cnNvcicgXTtcblx0cGFkZGluZ0lubGluZVN0YXJ0PzogQ1NTUHJvcGVydGllc1sgJ3BhZGRpbmdJbmxpbmVTdGFydCcgXTtcblx0cGFkZGluZ0lubGluZUVuZD86IENTU1Byb3BlcnRpZXNbICdwYWRkaW5nSW5saW5lRW5kJyBdO1xufTtcblxuY29uc3QgZGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogSW5wdXRQcm9wcyApID0+IHtcblx0aWYgKCAhIGRpc2FibGVkICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogQ09MT1JTLnVpLnRleHREaXNhYmxlZCxcblx0fSApO1xufTtcblxuZXhwb3J0IGNvbnN0IGZvbnRTaXplU3R5bGVzID0gKCB7IGlucHV0U2l6ZTogc2l6ZSB9OiBJbnB1dFByb3BzICkgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiAnMTNweCcsXG5cdFx0c21hbGw6ICcxMXB4Jyxcblx0XHRjb21wYWN0OiAnMTNweCcsXG5cdFx0J19fdW5zdGFibGUtbGFyZ2UnOiAnMTNweCcsXG5cdH07XG5cblx0Y29uc3QgZm9udFNpemUgPSBzaXplc1sgc2l6ZSBhcyBTaXplIF0gfHwgc2l6ZXMuZGVmYXVsdDtcblx0Y29uc3QgZm9udFNpemVNb2JpbGUgPSAnMTZweCc7XG5cblx0aWYgKCAhIGZvbnRTaXplICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdHJldHVybiBjc3NgXG5cdFx0Zm9udC1zaXplOiAkeyBmb250U2l6ZU1vYmlsZSB9O1xuXG5cdFx0QG1lZGlhICggbWluLXdpZHRoOiA2MDBweCApIHtcblx0XHRcdGZvbnQtc2l6ZTogJHsgZm9udFNpemUgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgZ2V0U2l6ZUNvbmZpZyA9ICgge1xuXHRpbnB1dFNpemU6IHNpemUsXG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcbn06IElucHV0UHJvcHMgKSA9PiB7XG5cdC8vIFBhZGRpbmdzIG1heSBiZSBvdmVycmlkZGVuIGJ5IHRoZSBjdXN0b20gcGFkZGluZ3MgcHJvcHMuXG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdH0sXG5cdFx0c21hbGw6IHtcblx0XHRcdGhlaWdodDogMjQsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiAyNCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHR9LFxuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdGhlaWdodDogMzIsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiAzMixcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHR9LFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzoge1xuXHRcdFx0aGVpZ2h0OiA0MCxcblx0XHRcdGxpbmVIZWlnaHQ6IDEsXG5cdFx0XHRtaW5IZWlnaHQ6IDQwLFxuXHRcdFx0cGFkZGluZ0xlZnQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdFx0fSxcblx0fTtcblxuXHRpZiAoICEgX19uZXh0NDBweERlZmF1bHRTaXplICkge1xuXHRcdHNpemVzLmRlZmF1bHQgPSBzaXplcy5jb21wYWN0O1xuXHR9XG5cblx0cmV0dXJuIHNpemVzWyBzaXplIGFzIFNpemUgXSB8fCBzaXplcy5kZWZhdWx0O1xufTtcblxuY29uc3Qgc2l6ZVN0eWxlcyA9ICggcHJvcHM6IElucHV0UHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIGdldFNpemVDb25maWcoIHByb3BzICkgKTtcbn07XG5cbmNvbnN0IGN1c3RvbVBhZGRpbmdzID0gKCB7XG5cdHBhZGRpbmdJbmxpbmVTdGFydCxcblx0cGFkZGluZ0lubGluZUVuZCxcbn06IElucHV0UHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHsgcGFkZGluZ0lubGluZVN0YXJ0LCBwYWRkaW5nSW5saW5lRW5kIH0gKTtcbn07XG5cbmNvbnN0IGRyYWdTdHlsZXMgPSAoIHsgaXNEcmFnZ2luZywgZHJhZ0N1cnNvciB9OiBJbnB1dFByb3BzICkgPT4ge1xuXHRsZXQgZGVmYXVsdEFycm93U3R5bGVzOiBTZXJpYWxpemVkU3R5bGVzIHwgdW5kZWZpbmVkO1xuXHRsZXQgYWN0aXZlRHJhZ0N1cnNvclN0eWxlczogU2VyaWFsaXplZFN0eWxlcyB8IHVuZGVmaW5lZDtcblxuXHRpZiAoIGlzRHJhZ2dpbmcgKSB7XG5cdFx0ZGVmYXVsdEFycm93U3R5bGVzID0gY3NzYFxuXHRcdFx0Y3Vyc29yOiAkeyBkcmFnQ3Vyc29yIH07XG5cdFx0XHR1c2VyLXNlbGVjdDogbm9uZTtcblxuXHRcdFx0Jjo6LXdlYmtpdC1vdXRlci1zcGluLWJ1dHRvbixcblx0XHRcdCY6Oi13ZWJraXQtaW5uZXItc3Bpbi1idXR0b24ge1xuXHRcdFx0XHQtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmUgIWltcG9ydGFudDtcblx0XHRcdFx0bWFyZ2luOiAwICFpbXBvcnRhbnQ7XG5cdFx0XHR9XG5cdFx0YDtcblx0fVxuXG5cdGlmICggaXNEcmFnZ2luZyAmJiBkcmFnQ3Vyc29yICkge1xuXHRcdGFjdGl2ZURyYWdDdXJzb3JTdHlsZXMgPSBjc3NgXG5cdFx0XHQmOmFjdGl2ZSB7XG5cdFx0XHRcdGN1cnNvcjogJHsgZHJhZ0N1cnNvciB9O1xuXHRcdFx0fVxuXHRcdGA7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdCR7IGRlZmF1bHRBcnJvd1N0eWxlcyB9XG5cdFx0JHsgYWN0aXZlRHJhZ0N1cnNvclN0eWxlcyB9XG5cdGA7XG59O1xuXG4vLyBUT0RPOiBSZXNvbHZlIG5lZWQgdG8gdXNlICYmJiB0byBpbmNyZWFzZSBzcGVjaWZpY2l0eVxuLy8gaHR0cHM6Ly9naXRodWIuY29tL1dvcmRQcmVzcy9ndXRlbmJlcmcvaXNzdWVzLzE4NDgzXG5cbmV4cG9ydCBjb25zdCBJbnB1dCA9IHN0eWxlZC5pbnB1dDwgSW5wdXRQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyOiBub25lO1xuXHRcdGJveC1zaGFkb3c6IG5vbmUgIWltcG9ydGFudDtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRmb250LWZhbWlseTogaW5oZXJpdDtcblx0XHRtYXJnaW46IDA7XG5cdFx0b3V0bGluZTogbm9uZTtcblx0XHR3aWR0aDogMTAwJTtcblxuXHRcdCR7IGRyYWdTdHlsZXMgfVxuXHRcdCR7IGRpc2FibGVkU3R5bGVzIH1cblx0XHQkeyBmb250U2l6ZVN0eWxlcyB9XG5cdFx0JHsgc2l6ZVN0eWxlcyB9XG5cdFx0JHsgY3VzdG9tUGFkZGluZ3MgfVxuXG5cdFx0Jjo6LXdlYmtpdC1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOjotbW96LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblxuXHRcdCY6LW1zLWlucHV0LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblxuXHRcdCZbdHlwZT0nZW1haWwnXSxcblx0XHQmW3R5cGU9J3VybCddIHtcblx0XHRcdC8qIHJ0bDppZ25vcmUgKi9cblx0XHRcdGRpcmVjdGlvbjogbHRyO1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgQmFzZUxhYmVsID0gc3R5bGVkKCBUZXh0ICk8IHsgbGFiZWxQb3NpdGlvbj86IExhYmVsUG9zaXRpb24gfSA+YFxuXHQmJiYge1xuXHRcdCR7IGJhc2VMYWJlbFR5cG9ncmFwaHkgfTtcblxuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0cGFkZGluZy10b3A6IDA7XG5cdFx0cGFkZGluZy1ib3R0b206IDA7XG5cdFx0bWF4LXdpZHRoOiAxMDAlO1xuXHRcdHotaW5kZXg6IDE7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBMYWJlbCA9IChcblx0cHJvcHM6IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzPFxuXHRcdHsgbGFiZWxQb3NpdGlvbj86IExhYmVsUG9zaXRpb247IGNoaWxkcmVuOiBSZWFjdE5vZGUgfSxcblx0XHQnbGFiZWwnLFxuXHRcdGZhbHNlXG5cdD5cbikgPT4gPEJhc2VMYWJlbCB7IC4uLnByb3BzIH0gYXM9XCJsYWJlbFwiIC8+O1xuXG5leHBvcnQgY29uc3QgTGFiZWxXcmFwcGVyID0gc3R5bGVkKCBGbGV4SXRlbSApYFxuXHRtYXgtd2lkdGg6IGNhbGMoIDEwMCUgLSAxMHB4ICk7XG5gO1xuXG5jb25zdCBwcmVmaXhTdWZmaXhXcmFwcGVyU3R5bGVzID0gKCB7XG5cdHZhcmlhbnQgPSAnZGVmYXVsdCcsXG5cdHNpemUsXG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0aXNQcmVmaXgsXG59OiBQcmVmaXhTdWZmaXhXcmFwcGVyUHJvcHMgJiB7IGlzUHJlZml4PzogYm9vbGVhbiB9ICkgPT4ge1xuXHRjb25zdCB7IHBhZGRpbmdMZWZ0OiBwYWRkaW5nIH0gPSBnZXRTaXplQ29uZmlnKCB7XG5cdFx0aW5wdXRTaXplOiBzaXplLFxuXHRcdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0fSApO1xuXG5cdGNvbnN0IHBhZGRpbmdQcm9wZXJ0eSA9IGlzUHJlZml4XG5cdFx0PyAncGFkZGluZ0lubGluZVN0YXJ0J1xuXHRcdDogJ3BhZGRpbmdJbmxpbmVFbmQnO1xuXG5cdGlmICggdmFyaWFudCA9PT0gJ2RlZmF1bHQnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdFsgcGFkZGluZ1Byb3BlcnR5IF06IHBhZGRpbmcsXG5cdFx0fSApO1xuXHR9XG5cblx0Ly8gSWYgdmFyaWFudCBpcyAnaWNvbicgb3IgJ2NvbnRyb2wnXG5cdHJldHVybiBjc3MoIHtcblx0XHRkaXNwbGF5OiAnZmxleCcsXG5cdFx0WyBwYWRkaW5nUHJvcGVydHkgXTogcGFkZGluZyAtIDQsXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBQcmVmaXhTdWZmaXhXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0JHsgcHJlZml4U3VmZml4V3JhcHBlclN0eWxlcyB9XG5gO1xuIl19 */");
  };
  var customPaddings = ({
    paddingInlineStart,
    paddingInlineEnd
  }) => {
    return /* @__PURE__ */ css({
      paddingInlineStart,
      paddingInlineEnd
    }, false ? "" : ";label:customPaddings;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzT1EiLCJmaWxlIjoiaW5wdXQtY29udHJvbC1zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHR5cGUgeyBDU1NQcm9wZXJ0aWVzLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi8uLi9jb250ZXh0JztcbmltcG9ydCB7IEZsZXgsIEZsZXhJdGVtIH0gZnJvbSAnLi4vLi4vZmxleCc7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vdGV4dCc7XG5pbXBvcnQgeyBiYXNlTGFiZWxUeXBvZ3JhcGh5LCBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHR5cGUgeyBMYWJlbFBvc2l0aW9uLCBTaXplLCBQcmVmaXhTdWZmaXhXcmFwcGVyUHJvcHMgfSBmcm9tICcuLi90eXBlcyc7XG5cbnR5cGUgQ29udGFpbmVyUHJvcHMgPSB7XG5cdGRpc2FibGVkPzogYm9vbGVhbjtcblx0aGlkZUxhYmVsPzogYm9vbGVhbjtcblx0X191bnN0YWJsZUlucHV0V2lkdGg/OiBDU1NQcm9wZXJ0aWVzWyAnd2lkdGgnIF07XG5cdGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uO1xufTtcblxuZXhwb3J0IGNvbnN0IFByZWZpeCA9IHN0eWxlZC5zcGFuYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBTdWZmaXggPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0YWxpZ24tc2VsZjogc3RyZXRjaDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbnR5cGUgQmFja2Ryb3BQcm9wcyA9IHtcblx0ZGlzYWJsZWQ/OiBib29sZWFuO1xuXHRpc0JvcmRlcmxlc3M/OiBib29sZWFuO1xufTtcblxuY29uc3QgYmFja2Ryb3BCb3JkZXJDb2xvciA9ICgge1xuXHRkaXNhYmxlZCxcblx0aXNCb3JkZXJsZXNzLFxufTogQmFja2Ryb3BQcm9wcyApOiBDU1NQcm9wZXJ0aWVzWyAnYm9yZGVyQ29sb3InIF0gPT4ge1xuXHRpZiAoIGlzQm9yZGVybGVzcyApIHtcblx0XHRyZXR1cm4gJ3RyYW5zcGFyZW50Jztcblx0fVxuXG5cdGlmICggZGlzYWJsZWQgKSB7XG5cdFx0cmV0dXJuIENPTE9SUy51aS5ib3JkZXJEaXNhYmxlZDtcblx0fVxuXG5cdHJldHVybiBDT0xPUlMudWkuYm9yZGVyO1xufTtcblxuZXhwb3J0IGNvbnN0IEJhY2tkcm9wVUkgPSBzdHlsZWQuZGl2PCBCYWNrZHJvcFByb3BzID5gXG5cdCYmJiB7XG5cdFx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0XHRib3JkZXItY29sb3I6ICR7IGJhY2tkcm9wQm9yZGVyQ29sb3IgfTtcblx0XHRib3JkZXItcmFkaXVzOiBpbmhlcml0O1xuXHRcdGJvcmRlci1zdHlsZTogc29saWQ7XG5cdFx0Ym9yZGVyLXdpZHRoOiAxcHg7XG5cdFx0Ym90dG9tOiAwO1xuXHRcdGxlZnQ6IDA7XG5cdFx0bWFyZ2luOiAwO1xuXHRcdHBhZGRpbmc6IDA7XG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdHJpZ2h0OiAwO1xuXHRcdHRvcDogMDtcblxuXHRcdCR7IHJ0bCggeyBwYWRkaW5nTGVmdDogMiB9ICkgfVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgUm9vdCA9IHN0eWxlZCggRmxleCApYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRwYWRkaW5nLXRvcDogMDtcblxuXHQvLyBGb2N1cyB3aXRoaW4sIGV4Y2x1ZGluZyBjYXNlcyB3aGVyZSBhdXhpbGlhcnkgY29udHJvbHMgaW4gcHJlZml4IG9yIHN1ZmZpeCBoYXZlIGZvY3VzLlxuXHQmOmZvY3VzLXdpdGhpbjpub3QoIDpoYXMoIDppcyggJHsgUHJlZml4IH0sICR7IFN1ZmZpeCB9ICk6Zm9jdXMtd2l0aGluICkgKSB7XG5cdFx0JHsgQmFja2Ryb3BVSSB9IHtcblx0XHRcdGJvcmRlci1jb2xvcjogJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRib3gtc2hhZG93OiAkeyBDT05GSUcuY29udHJvbEJveFNoYWRvd0ZvY3VzIH07XG5cdFx0XHQvLyBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSB3aWxsIHNob3cgdGhpcyBvdXRsaW5lLCBidXQgbm90IHRoZSBib3gtc2hhZG93LlxuXHRcdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdFx0b3V0bGluZS1vZmZzZXQ6IC0ycHg7XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBjb250YWluZXJEaXNhYmxlZFN0eWxlcyA9ICggeyBkaXNhYmxlZCB9OiBDb250YWluZXJQcm9wcyApID0+IHtcblx0Y29uc3QgYmFja2dyb3VuZENvbG9yID0gZGlzYWJsZWRcblx0XHQ/IENPTE9SUy51aS5iYWNrZ3JvdW5kRGlzYWJsZWRcblx0XHQ6IENPTE9SUy51aS5iYWNrZ3JvdW5kO1xuXG5cdHJldHVybiBjc3MoIHsgYmFja2dyb3VuZENvbG9yIH0gKTtcbn07XG5cbmNvbnN0IGNvbnRhaW5lcldpZHRoU3R5bGVzID0gKCB7XG5cdF9fdW5zdGFibGVJbnB1dFdpZHRoLFxuXHRsYWJlbFBvc2l0aW9uLFxufTogQ29udGFpbmVyUHJvcHMgKSA9PiB7XG5cdGlmICggISBfX3Vuc3RhYmxlSW5wdXRXaWR0aCApIHtcblx0XHRyZXR1cm4gY3NzKCB7IHdpZHRoOiAnMTAwJScgfSApO1xuXHR9XG5cblx0aWYgKCBsYWJlbFBvc2l0aW9uID09PSAnc2lkZScgKSB7XG5cdFx0cmV0dXJuICcnO1xuXHR9XG5cblx0aWYgKCBsYWJlbFBvc2l0aW9uID09PSAnZWRnZScgKSB7XG5cdFx0cmV0dXJuIGNzcygge1xuXHRcdFx0ZmxleDogYDAgMCAkeyBfX3Vuc3RhYmxlSW5wdXRXaWR0aCB9YCxcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4gY3NzKCB7IHdpZHRoOiBfX3Vuc3RhYmxlSW5wdXRXaWR0aCB9ICk7XG59O1xuXG5leHBvcnQgY29uc3QgQ29udGFpbmVyID0gc3R5bGVkLmRpdjwgQ29udGFpbmVyUHJvcHMgPmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleDogMTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXG5cdCR7IGNvbnRhaW5lckRpc2FibGVkU3R5bGVzIH1cblx0JHsgY29udGFpbmVyV2lkdGhTdHlsZXMgfVxuYDtcblxudHlwZSBJbnB1dFByb3BzID0ge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemU/OiBib29sZWFuO1xuXHRkaXNhYmxlZD86IGJvb2xlYW47XG5cdGlucHV0U2l6ZT86IFNpemU7XG5cdGlzRHJhZ2dpbmc/OiBib29sZWFuO1xuXHRkcmFnQ3Vyc29yPzogQ1NTUHJvcGVydGllc1sgJ2N1cnNvcicgXTtcblx0cGFkZGluZ0lubGluZVN0YXJ0PzogQ1NTUHJvcGVydGllc1sgJ3BhZGRpbmdJbmxpbmVTdGFydCcgXTtcblx0cGFkZGluZ0lubGluZUVuZD86IENTU1Byb3BlcnRpZXNbICdwYWRkaW5nSW5saW5lRW5kJyBdO1xufTtcblxuY29uc3QgZGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogSW5wdXRQcm9wcyApID0+IHtcblx0aWYgKCAhIGRpc2FibGVkICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogQ09MT1JTLnVpLnRleHREaXNhYmxlZCxcblx0fSApO1xufTtcblxuZXhwb3J0IGNvbnN0IGZvbnRTaXplU3R5bGVzID0gKCB7IGlucHV0U2l6ZTogc2l6ZSB9OiBJbnB1dFByb3BzICkgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiAnMTNweCcsXG5cdFx0c21hbGw6ICcxMXB4Jyxcblx0XHRjb21wYWN0OiAnMTNweCcsXG5cdFx0J19fdW5zdGFibGUtbGFyZ2UnOiAnMTNweCcsXG5cdH07XG5cblx0Y29uc3QgZm9udFNpemUgPSBzaXplc1sgc2l6ZSBhcyBTaXplIF0gfHwgc2l6ZXMuZGVmYXVsdDtcblx0Y29uc3QgZm9udFNpemVNb2JpbGUgPSAnMTZweCc7XG5cblx0aWYgKCAhIGZvbnRTaXplICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdHJldHVybiBjc3NgXG5cdFx0Zm9udC1zaXplOiAkeyBmb250U2l6ZU1vYmlsZSB9O1xuXG5cdFx0QG1lZGlhICggbWluLXdpZHRoOiA2MDBweCApIHtcblx0XHRcdGZvbnQtc2l6ZTogJHsgZm9udFNpemUgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgZ2V0U2l6ZUNvbmZpZyA9ICgge1xuXHRpbnB1dFNpemU6IHNpemUsXG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcbn06IElucHV0UHJvcHMgKSA9PiB7XG5cdC8vIFBhZGRpbmdzIG1heSBiZSBvdmVycmlkZGVuIGJ5IHRoZSBjdXN0b20gcGFkZGluZ3MgcHJvcHMuXG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdH0sXG5cdFx0c21hbGw6IHtcblx0XHRcdGhlaWdodDogMjQsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiAyNCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHR9LFxuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdGhlaWdodDogMzIsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiAzMixcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHR9LFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzoge1xuXHRcdFx0aGVpZ2h0OiA0MCxcblx0XHRcdGxpbmVIZWlnaHQ6IDEsXG5cdFx0XHRtaW5IZWlnaHQ6IDQwLFxuXHRcdFx0cGFkZGluZ0xlZnQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdFx0fSxcblx0fTtcblxuXHRpZiAoICEgX19uZXh0NDBweERlZmF1bHRTaXplICkge1xuXHRcdHNpemVzLmRlZmF1bHQgPSBzaXplcy5jb21wYWN0O1xuXHR9XG5cblx0cmV0dXJuIHNpemVzWyBzaXplIGFzIFNpemUgXSB8fCBzaXplcy5kZWZhdWx0O1xufTtcblxuY29uc3Qgc2l6ZVN0eWxlcyA9ICggcHJvcHM6IElucHV0UHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIGdldFNpemVDb25maWcoIHByb3BzICkgKTtcbn07XG5cbmNvbnN0IGN1c3RvbVBhZGRpbmdzID0gKCB7XG5cdHBhZGRpbmdJbmxpbmVTdGFydCxcblx0cGFkZGluZ0lubGluZUVuZCxcbn06IElucHV0UHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHsgcGFkZGluZ0lubGluZVN0YXJ0LCBwYWRkaW5nSW5saW5lRW5kIH0gKTtcbn07XG5cbmNvbnN0IGRyYWdTdHlsZXMgPSAoIHsgaXNEcmFnZ2luZywgZHJhZ0N1cnNvciB9OiBJbnB1dFByb3BzICkgPT4ge1xuXHRsZXQgZGVmYXVsdEFycm93U3R5bGVzOiBTZXJpYWxpemVkU3R5bGVzIHwgdW5kZWZpbmVkO1xuXHRsZXQgYWN0aXZlRHJhZ0N1cnNvclN0eWxlczogU2VyaWFsaXplZFN0eWxlcyB8IHVuZGVmaW5lZDtcblxuXHRpZiAoIGlzRHJhZ2dpbmcgKSB7XG5cdFx0ZGVmYXVsdEFycm93U3R5bGVzID0gY3NzYFxuXHRcdFx0Y3Vyc29yOiAkeyBkcmFnQ3Vyc29yIH07XG5cdFx0XHR1c2VyLXNlbGVjdDogbm9uZTtcblxuXHRcdFx0Jjo6LXdlYmtpdC1vdXRlci1zcGluLWJ1dHRvbixcblx0XHRcdCY6Oi13ZWJraXQtaW5uZXItc3Bpbi1idXR0b24ge1xuXHRcdFx0XHQtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmUgIWltcG9ydGFudDtcblx0XHRcdFx0bWFyZ2luOiAwICFpbXBvcnRhbnQ7XG5cdFx0XHR9XG5cdFx0YDtcblx0fVxuXG5cdGlmICggaXNEcmFnZ2luZyAmJiBkcmFnQ3Vyc29yICkge1xuXHRcdGFjdGl2ZURyYWdDdXJzb3JTdHlsZXMgPSBjc3NgXG5cdFx0XHQmOmFjdGl2ZSB7XG5cdFx0XHRcdGN1cnNvcjogJHsgZHJhZ0N1cnNvciB9O1xuXHRcdFx0fVxuXHRcdGA7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdCR7IGRlZmF1bHRBcnJvd1N0eWxlcyB9XG5cdFx0JHsgYWN0aXZlRHJhZ0N1cnNvclN0eWxlcyB9XG5cdGA7XG59O1xuXG4vLyBUT0RPOiBSZXNvbHZlIG5lZWQgdG8gdXNlICYmJiB0byBpbmNyZWFzZSBzcGVjaWZpY2l0eVxuLy8gaHR0cHM6Ly9naXRodWIuY29tL1dvcmRQcmVzcy9ndXRlbmJlcmcvaXNzdWVzLzE4NDgzXG5cbmV4cG9ydCBjb25zdCBJbnB1dCA9IHN0eWxlZC5pbnB1dDwgSW5wdXRQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyOiBub25lO1xuXHRcdGJveC1zaGFkb3c6IG5vbmUgIWltcG9ydGFudDtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRmb250LWZhbWlseTogaW5oZXJpdDtcblx0XHRtYXJnaW46IDA7XG5cdFx0b3V0bGluZTogbm9uZTtcblx0XHR3aWR0aDogMTAwJTtcblxuXHRcdCR7IGRyYWdTdHlsZXMgfVxuXHRcdCR7IGRpc2FibGVkU3R5bGVzIH1cblx0XHQkeyBmb250U2l6ZVN0eWxlcyB9XG5cdFx0JHsgc2l6ZVN0eWxlcyB9XG5cdFx0JHsgY3VzdG9tUGFkZGluZ3MgfVxuXG5cdFx0Jjo6LXdlYmtpdC1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOjotbW96LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblxuXHRcdCY6LW1zLWlucHV0LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblxuXHRcdCZbdHlwZT0nZW1haWwnXSxcblx0XHQmW3R5cGU9J3VybCddIHtcblx0XHRcdC8qIHJ0bDppZ25vcmUgKi9cblx0XHRcdGRpcmVjdGlvbjogbHRyO1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgQmFzZUxhYmVsID0gc3R5bGVkKCBUZXh0ICk8IHsgbGFiZWxQb3NpdGlvbj86IExhYmVsUG9zaXRpb24gfSA+YFxuXHQmJiYge1xuXHRcdCR7IGJhc2VMYWJlbFR5cG9ncmFwaHkgfTtcblxuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0cGFkZGluZy10b3A6IDA7XG5cdFx0cGFkZGluZy1ib3R0b206IDA7XG5cdFx0bWF4LXdpZHRoOiAxMDAlO1xuXHRcdHotaW5kZXg6IDE7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBMYWJlbCA9IChcblx0cHJvcHM6IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzPFxuXHRcdHsgbGFiZWxQb3NpdGlvbj86IExhYmVsUG9zaXRpb247IGNoaWxkcmVuOiBSZWFjdE5vZGUgfSxcblx0XHQnbGFiZWwnLFxuXHRcdGZhbHNlXG5cdD5cbikgPT4gPEJhc2VMYWJlbCB7IC4uLnByb3BzIH0gYXM9XCJsYWJlbFwiIC8+O1xuXG5leHBvcnQgY29uc3QgTGFiZWxXcmFwcGVyID0gc3R5bGVkKCBGbGV4SXRlbSApYFxuXHRtYXgtd2lkdGg6IGNhbGMoIDEwMCUgLSAxMHB4ICk7XG5gO1xuXG5jb25zdCBwcmVmaXhTdWZmaXhXcmFwcGVyU3R5bGVzID0gKCB7XG5cdHZhcmlhbnQgPSAnZGVmYXVsdCcsXG5cdHNpemUsXG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0aXNQcmVmaXgsXG59OiBQcmVmaXhTdWZmaXhXcmFwcGVyUHJvcHMgJiB7IGlzUHJlZml4PzogYm9vbGVhbiB9ICkgPT4ge1xuXHRjb25zdCB7IHBhZGRpbmdMZWZ0OiBwYWRkaW5nIH0gPSBnZXRTaXplQ29uZmlnKCB7XG5cdFx0aW5wdXRTaXplOiBzaXplLFxuXHRcdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0fSApO1xuXG5cdGNvbnN0IHBhZGRpbmdQcm9wZXJ0eSA9IGlzUHJlZml4XG5cdFx0PyAncGFkZGluZ0lubGluZVN0YXJ0J1xuXHRcdDogJ3BhZGRpbmdJbmxpbmVFbmQnO1xuXG5cdGlmICggdmFyaWFudCA9PT0gJ2RlZmF1bHQnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdFsgcGFkZGluZ1Byb3BlcnR5IF06IHBhZGRpbmcsXG5cdFx0fSApO1xuXHR9XG5cblx0Ly8gSWYgdmFyaWFudCBpcyAnaWNvbicgb3IgJ2NvbnRyb2wnXG5cdHJldHVybiBjc3MoIHtcblx0XHRkaXNwbGF5OiAnZmxleCcsXG5cdFx0WyBwYWRkaW5nUHJvcGVydHkgXTogcGFkZGluZyAtIDQsXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBQcmVmaXhTdWZmaXhXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0JHsgcHJlZml4U3VmZml4V3JhcHBlclN0eWxlcyB9XG5gO1xuIl19 */");
  };
  var dragStyles = ({
    isDragging: isDragging2,
    dragCursor
  }) => {
    let defaultArrowStyles;
    let activeDragCursorStyles;
    if (isDragging2) {
      defaultArrowStyles = /* @__PURE__ */ css("cursor:", dragCursor, ";user-select:none;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}" + (false ? "" : ";label:defaultArrowStyles;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE4TzBCIiwiZmlsZSI6ImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgU2VyaWFsaXplZFN0eWxlcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB0eXBlIHsgQ1NTUHJvcGVydGllcywgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzIH0gZnJvbSAnLi4vLi4vY29udGV4dCc7XG5pbXBvcnQgeyBGbGV4LCBGbGV4SXRlbSB9IGZyb20gJy4uLy4uL2ZsZXgnO1xuaW1wb3J0IHsgVGV4dCB9IGZyb20gJy4uLy4uL3RleHQnO1xuaW1wb3J0IHsgYmFzZUxhYmVsVHlwb2dyYXBoeSwgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgTGFiZWxQb3NpdGlvbiwgU2l6ZSwgUHJlZml4U3VmZml4V3JhcHBlclByb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuXG50eXBlIENvbnRhaW5lclByb3BzID0ge1xuXHRkaXNhYmxlZD86IGJvb2xlYW47XG5cdGhpZGVMYWJlbD86IGJvb2xlYW47XG5cdF9fdW5zdGFibGVJbnB1dFdpZHRoPzogQ1NTUHJvcGVydGllc1sgJ3dpZHRoJyBdO1xuXHRsYWJlbFBvc2l0aW9uPzogTGFiZWxQb3NpdGlvbjtcbn07XG5cbmV4cG9ydCBjb25zdCBQcmVmaXggPSBzdHlsZWQuc3BhbmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VmZml4ID0gc3R5bGVkLnNwYW5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGFsaWduLXNlbGY6IHN0cmV0Y2g7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGZsZXg7XG5gO1xuXG50eXBlIEJhY2tkcm9wUHJvcHMgPSB7XG5cdGRpc2FibGVkPzogYm9vbGVhbjtcblx0aXNCb3JkZXJsZXNzPzogYm9vbGVhbjtcbn07XG5cbmNvbnN0IGJhY2tkcm9wQm9yZGVyQ29sb3IgPSAoIHtcblx0ZGlzYWJsZWQsXG5cdGlzQm9yZGVybGVzcyxcbn06IEJhY2tkcm9wUHJvcHMgKTogQ1NTUHJvcGVydGllc1sgJ2JvcmRlckNvbG9yJyBdID0+IHtcblx0aWYgKCBpc0JvcmRlcmxlc3MgKSB7XG5cdFx0cmV0dXJuICd0cmFuc3BhcmVudCc7XG5cdH1cblxuXHRpZiAoIGRpc2FibGVkICkge1xuXHRcdHJldHVybiBDT0xPUlMudWkuYm9yZGVyRGlzYWJsZWQ7XG5cdH1cblxuXHRyZXR1cm4gQ09MT1JTLnVpLmJvcmRlcjtcbn07XG5cbmV4cG9ydCBjb25zdCBCYWNrZHJvcFVJID0gc3R5bGVkLmRpdjwgQmFja2Ryb3BQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyLWNvbG9yOiAkeyBiYWNrZHJvcEJvcmRlckNvbG9yIH07XG5cdFx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0XHRib3JkZXItc3R5bGU6IHNvbGlkO1xuXHRcdGJvcmRlci13aWR0aDogMXB4O1xuXHRcdGJvdHRvbTogMDtcblx0XHRsZWZ0OiAwO1xuXHRcdG1hcmdpbjogMDtcblx0XHRwYWRkaW5nOiAwO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRyaWdodDogMDtcblx0XHR0b3A6IDA7XG5cblx0XHQkeyBydGwoIHsgcGFkZGluZ0xlZnQ6IDIgfSApIH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQoIEZsZXggKWBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0cGFkZGluZy10b3A6IDA7XG5cblx0Ly8gRm9jdXMgd2l0aGluLCBleGNsdWRpbmcgY2FzZXMgd2hlcmUgYXV4aWxpYXJ5IGNvbnRyb2xzIGluIHByZWZpeCBvciBzdWZmaXggaGF2ZSBmb2N1cy5cblx0Jjpmb2N1cy13aXRoaW46bm90KCA6aGFzKCA6aXMoICR7IFByZWZpeCB9LCAkeyBTdWZmaXggfSApOmZvY3VzLXdpdGhpbiApICkge1xuXHRcdCR7IEJhY2tkcm9wVUkgfSB7XG5cdFx0XHRib3JkZXItY29sb3I6ICR7IENPTE9SUy51aS5ib3JkZXJGb2N1cyB9O1xuXHRcdFx0Ym94LXNoYWRvdzogJHsgQ09ORklHLmNvbnRyb2xCb3hTaGFkb3dGb2N1cyB9O1xuXHRcdFx0Ly8gV2luZG93cyBIaWdoIENvbnRyYXN0IG1vZGUgd2lsbCBzaG93IHRoaXMgb3V0bGluZSwgYnV0IG5vdCB0aGUgYm94LXNoYWRvdy5cblx0XHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRcdG91dGxpbmUtb2Zmc2V0OiAtMnB4O1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgY29udGFpbmVyRGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogQ29udGFpbmVyUHJvcHMgKSA9PiB7XG5cdGNvbnN0IGJhY2tncm91bmRDb2xvciA9IGRpc2FibGVkXG5cdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0OiBDT0xPUlMudWkuYmFja2dyb3VuZDtcblxuXHRyZXR1cm4gY3NzKCB7IGJhY2tncm91bmRDb2xvciB9ICk7XG59O1xuXG5jb25zdCBjb250YWluZXJXaWR0aFN0eWxlcyA9ICgge1xuXHRfX3Vuc3RhYmxlSW5wdXRXaWR0aCxcblx0bGFiZWxQb3NpdGlvbixcbn06IENvbnRhaW5lclByb3BzICkgPT4ge1xuXHRpZiAoICEgX191bnN0YWJsZUlucHV0V2lkdGggKSB7XG5cdFx0cmV0dXJuIGNzcyggeyB3aWR0aDogJzEwMCUnIH0gKTtcblx0fVxuXG5cdGlmICggbGFiZWxQb3NpdGlvbiA9PT0gJ3NpZGUnICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdGlmICggbGFiZWxQb3NpdGlvbiA9PT0gJ2VkZ2UnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdGZsZXg6IGAwIDAgJHsgX191bnN0YWJsZUlucHV0V2lkdGggfWAsXG5cdFx0fSApO1xuXHR9XG5cblx0cmV0dXJuIGNzcyggeyB3aWR0aDogX191bnN0YWJsZUlucHV0V2lkdGggfSApO1xufTtcblxuZXhwb3J0IGNvbnN0IENvbnRhaW5lciA9IHN0eWxlZC5kaXY8IENvbnRhaW5lclByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdGRpc3BsYXk6IGZsZXg7XG5cdGZsZXg6IDE7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuXHQkeyBjb250YWluZXJEaXNhYmxlZFN0eWxlcyB9XG5cdCR7IGNvbnRhaW5lcldpZHRoU3R5bGVzIH1cbmA7XG5cbnR5cGUgSW5wdXRQcm9wcyA9IHtcblx0X19uZXh0NDBweERlZmF1bHRTaXplPzogYm9vbGVhbjtcblx0ZGlzYWJsZWQ/OiBib29sZWFuO1xuXHRpbnB1dFNpemU/OiBTaXplO1xuXHRpc0RyYWdnaW5nPzogYm9vbGVhbjtcblx0ZHJhZ0N1cnNvcj86IENTU1Byb3BlcnRpZXNbICdjdXJzb3InIF07XG5cdHBhZGRpbmdJbmxpbmVTdGFydD86IENTU1Byb3BlcnRpZXNbICdwYWRkaW5nSW5saW5lU3RhcnQnIF07XG5cdHBhZGRpbmdJbmxpbmVFbmQ/OiBDU1NQcm9wZXJ0aWVzWyAncGFkZGluZ0lubGluZUVuZCcgXTtcbn07XG5cbmNvbnN0IGRpc2FibGVkU3R5bGVzID0gKCB7IGRpc2FibGVkIH06IElucHV0UHJvcHMgKSA9PiB7XG5cdGlmICggISBkaXNhYmxlZCApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzKCB7XG5cdFx0Y29sb3I6IENPTE9SUy51aS50ZXh0RGlzYWJsZWQsXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBmb250U2l6ZVN0eWxlcyA9ICggeyBpbnB1dFNpemU6IHNpemUgfTogSW5wdXRQcm9wcyApID0+IHtcblx0Y29uc3Qgc2l6ZXMgPSB7XG5cdFx0ZGVmYXVsdDogJzEzcHgnLFxuXHRcdHNtYWxsOiAnMTFweCcsXG5cdFx0Y29tcGFjdDogJzEzcHgnLFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzogJzEzcHgnLFxuXHR9O1xuXG5cdGNvbnN0IGZvbnRTaXplID0gc2l6ZXNbIHNpemUgYXMgU2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG5cdGNvbnN0IGZvbnRTaXplTW9iaWxlID0gJzE2cHgnO1xuXG5cdGlmICggISBmb250U2l6ZSApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdGZvbnQtc2l6ZTogJHsgZm9udFNpemVNb2JpbGUgfTtcblxuXHRcdEBtZWRpYSAoIG1pbi13aWR0aDogNjAwcHggKSB7XG5cdFx0XHRmb250LXNpemU6ICR7IGZvbnRTaXplIH07XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGdldFNpemVDb25maWcgPSAoIHtcblx0aW5wdXRTaXplOiBzaXplLFxuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBJbnB1dFByb3BzICkgPT4ge1xuXHQvLyBQYWRkaW5ncyBtYXkgYmUgb3ZlcnJpZGRlbiBieSB0aGUgY3VzdG9tIHBhZGRpbmdzIHByb3BzLlxuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiB7XG5cdFx0XHRoZWlnaHQ6IDQwLFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogNDAsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHRcdHBhZGRpbmdSaWdodDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHR9LFxuXHRcdHNtYWxsOiB7XG5cdFx0XHRoZWlnaHQ6IDI0LFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogMjQsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0fSxcblx0XHRjb21wYWN0OiB7XG5cdFx0XHRoZWlnaHQ6IDMyLFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogMzIsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0fSxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdH0sXG5cdH07XG5cblx0aWYgKCAhIF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSApIHtcblx0XHRzaXplcy5kZWZhdWx0ID0gc2l6ZXMuY29tcGFjdDtcblx0fVxuXG5cdHJldHVybiBzaXplc1sgc2l6ZSBhcyBTaXplIF0gfHwgc2l6ZXMuZGVmYXVsdDtcbn07XG5cbmNvbnN0IHNpemVTdHlsZXMgPSAoIHByb3BzOiBJbnB1dFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCBnZXRTaXplQ29uZmlnKCBwcm9wcyApICk7XG59O1xuXG5jb25zdCBjdXN0b21QYWRkaW5ncyA9ICgge1xuXHRwYWRkaW5nSW5saW5lU3RhcnQsXG5cdHBhZGRpbmdJbmxpbmVFbmQsXG59OiBJbnB1dFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCB7IHBhZGRpbmdJbmxpbmVTdGFydCwgcGFkZGluZ0lubGluZUVuZCB9ICk7XG59O1xuXG5jb25zdCBkcmFnU3R5bGVzID0gKCB7IGlzRHJhZ2dpbmcsIGRyYWdDdXJzb3IgfTogSW5wdXRQcm9wcyApID0+IHtcblx0bGV0IGRlZmF1bHRBcnJvd1N0eWxlczogU2VyaWFsaXplZFN0eWxlcyB8IHVuZGVmaW5lZDtcblx0bGV0IGFjdGl2ZURyYWdDdXJzb3JTdHlsZXM6IFNlcmlhbGl6ZWRTdHlsZXMgfCB1bmRlZmluZWQ7XG5cblx0aWYgKCBpc0RyYWdnaW5nICkge1xuXHRcdGRlZmF1bHRBcnJvd1N0eWxlcyA9IGNzc2Bcblx0XHRcdGN1cnNvcjogJHsgZHJhZ0N1cnNvciB9O1xuXHRcdFx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cblx0XHRcdCY6Oi13ZWJraXQtb3V0ZXItc3Bpbi1idXR0b24sXG5cdFx0XHQmOjotd2Via2l0LWlubmVyLXNwaW4tYnV0dG9uIHtcblx0XHRcdFx0LXdlYmtpdC1hcHBlYXJhbmNlOiBub25lICFpbXBvcnRhbnQ7XG5cdFx0XHRcdG1hcmdpbjogMCAhaW1wb3J0YW50O1xuXHRcdFx0fVxuXHRcdGA7XG5cdH1cblxuXHRpZiAoIGlzRHJhZ2dpbmcgJiYgZHJhZ0N1cnNvciApIHtcblx0XHRhY3RpdmVEcmFnQ3Vyc29yU3R5bGVzID0gY3NzYFxuXHRcdFx0JjphY3RpdmUge1xuXHRcdFx0XHRjdXJzb3I6ICR7IGRyYWdDdXJzb3IgfTtcblx0XHRcdH1cblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHQkeyBkZWZhdWx0QXJyb3dTdHlsZXMgfVxuXHRcdCR7IGFjdGl2ZURyYWdDdXJzb3JTdHlsZXMgfVxuXHRgO1xufTtcblxuLy8gVE9ETzogUmVzb2x2ZSBuZWVkIHRvIHVzZSAmJiYgdG8gaW5jcmVhc2Ugc3BlY2lmaWNpdHlcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9Xb3JkUHJlc3MvZ3V0ZW5iZXJnL2lzc3Vlcy8xODQ4M1xuXG5leHBvcnQgY29uc3QgSW5wdXQgPSBzdHlsZWQuaW5wdXQ8IElucHV0UHJvcHMgPmBcblx0JiYmIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDtcblx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdGJvcmRlcjogbm9uZTtcblx0XHRib3gtc2hhZG93OiBub25lICFpbXBvcnRhbnQ7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdFx0bWFyZ2luOiAwO1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cblx0XHQkeyBkcmFnU3R5bGVzIH1cblx0XHQkeyBkaXNhYmxlZFN0eWxlcyB9XG5cdFx0JHsgZm9udFNpemVTdHlsZXMgfVxuXHRcdCR7IHNpemVTdHlsZXMgfVxuXHRcdCR7IGN1c3RvbVBhZGRpbmdzIH1cblxuXHRcdCY6Oi13ZWJraXQtaW5wdXQtcGxhY2Vob2xkZXIge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy51aS5kYXJrR3JheVBsYWNlaG9sZGVyIH07XG5cdFx0fVxuXG5cdFx0Jjo6LW1vei1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOi1tcy1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmW3R5cGU9J2VtYWlsJ10sXG5cdFx0Jlt0eXBlPSd1cmwnXSB7XG5cdFx0XHQvKiBydGw6aWdub3JlICovXG5cdFx0XHRkaXJlY3Rpb246IGx0cjtcblx0XHR9XG5cdH1cbmA7XG5cbmNvbnN0IEJhc2VMYWJlbCA9IHN0eWxlZCggVGV4dCApPCB7IGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uIH0gPmBcblx0JiYmIHtcblx0XHQkeyBiYXNlTGFiZWxUeXBvZ3JhcGh5IH07XG5cblx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdHBhZGRpbmctdG9wOiAwO1xuXHRcdHBhZGRpbmctYm90dG9tOiAwO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0XHR6LWluZGV4OiAxO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTGFiZWwgPSAoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczxcblx0XHR7IGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uOyBjaGlsZHJlbjogUmVhY3ROb2RlIH0sXG5cdFx0J2xhYmVsJyxcblx0XHRmYWxzZVxuXHQ+XG4pID0+IDxCYXNlTGFiZWwgeyAuLi5wcm9wcyB9IGFzPVwibGFiZWxcIiAvPjtcblxuZXhwb3J0IGNvbnN0IExhYmVsV3JhcHBlciA9IHN0eWxlZCggRmxleEl0ZW0gKWBcblx0bWF4LXdpZHRoOiBjYWxjKCAxMDAlIC0gMTBweCApO1xuYDtcblxuY29uc3QgcHJlZml4U3VmZml4V3JhcHBlclN0eWxlcyA9ICgge1xuXHR2YXJpYW50ID0gJ2RlZmF1bHQnLFxuXHRzaXplLFxuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdGlzUHJlZml4LFxufTogUHJlZml4U3VmZml4V3JhcHBlclByb3BzICYgeyBpc1ByZWZpeD86IGJvb2xlYW4gfSApID0+IHtcblx0Y29uc3QgeyBwYWRkaW5nTGVmdDogcGFkZGluZyB9ID0gZ2V0U2l6ZUNvbmZpZygge1xuXHRcdGlucHV0U2l6ZTogc2l6ZSxcblx0XHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdH0gKTtcblxuXHRjb25zdCBwYWRkaW5nUHJvcGVydHkgPSBpc1ByZWZpeFxuXHRcdD8gJ3BhZGRpbmdJbmxpbmVTdGFydCdcblx0XHQ6ICdwYWRkaW5nSW5saW5lRW5kJztcblxuXHRpZiAoIHZhcmlhbnQgPT09ICdkZWZhdWx0JyApIHtcblx0XHRyZXR1cm4gY3NzKCB7XG5cdFx0XHRbIHBhZGRpbmdQcm9wZXJ0eSBdOiBwYWRkaW5nLFxuXHRcdH0gKTtcblx0fVxuXG5cdC8vIElmIHZhcmlhbnQgaXMgJ2ljb24nIG9yICdjb250cm9sJ1xuXHRyZXR1cm4gY3NzKCB7XG5cdFx0ZGlzcGxheTogJ2ZsZXgnLFxuXHRcdFsgcGFkZGluZ1Byb3BlcnR5IF06IHBhZGRpbmcgLSA0LFxuXHR9ICk7XG59O1xuXG5leHBvcnQgY29uc3QgUHJlZml4U3VmZml4V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdCR7IHByZWZpeFN1ZmZpeFdyYXBwZXJTdHlsZXMgfVxuYDtcbiJdfQ== */");
    }
    if (isDragging2 && dragCursor) {
      activeDragCursorStyles = /* @__PURE__ */ css("&:active{cursor:", dragCursor, ";}" + (false ? "" : ";label:activeDragCursorStyles;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyUDhCIiwiZmlsZSI6ImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgU2VyaWFsaXplZFN0eWxlcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB0eXBlIHsgQ1NTUHJvcGVydGllcywgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzIH0gZnJvbSAnLi4vLi4vY29udGV4dCc7XG5pbXBvcnQgeyBGbGV4LCBGbGV4SXRlbSB9IGZyb20gJy4uLy4uL2ZsZXgnO1xuaW1wb3J0IHsgVGV4dCB9IGZyb20gJy4uLy4uL3RleHQnO1xuaW1wb3J0IHsgYmFzZUxhYmVsVHlwb2dyYXBoeSwgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgTGFiZWxQb3NpdGlvbiwgU2l6ZSwgUHJlZml4U3VmZml4V3JhcHBlclByb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuXG50eXBlIENvbnRhaW5lclByb3BzID0ge1xuXHRkaXNhYmxlZD86IGJvb2xlYW47XG5cdGhpZGVMYWJlbD86IGJvb2xlYW47XG5cdF9fdW5zdGFibGVJbnB1dFdpZHRoPzogQ1NTUHJvcGVydGllc1sgJ3dpZHRoJyBdO1xuXHRsYWJlbFBvc2l0aW9uPzogTGFiZWxQb3NpdGlvbjtcbn07XG5cbmV4cG9ydCBjb25zdCBQcmVmaXggPSBzdHlsZWQuc3BhbmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VmZml4ID0gc3R5bGVkLnNwYW5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGFsaWduLXNlbGY6IHN0cmV0Y2g7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGZsZXg7XG5gO1xuXG50eXBlIEJhY2tkcm9wUHJvcHMgPSB7XG5cdGRpc2FibGVkPzogYm9vbGVhbjtcblx0aXNCb3JkZXJsZXNzPzogYm9vbGVhbjtcbn07XG5cbmNvbnN0IGJhY2tkcm9wQm9yZGVyQ29sb3IgPSAoIHtcblx0ZGlzYWJsZWQsXG5cdGlzQm9yZGVybGVzcyxcbn06IEJhY2tkcm9wUHJvcHMgKTogQ1NTUHJvcGVydGllc1sgJ2JvcmRlckNvbG9yJyBdID0+IHtcblx0aWYgKCBpc0JvcmRlcmxlc3MgKSB7XG5cdFx0cmV0dXJuICd0cmFuc3BhcmVudCc7XG5cdH1cblxuXHRpZiAoIGRpc2FibGVkICkge1xuXHRcdHJldHVybiBDT0xPUlMudWkuYm9yZGVyRGlzYWJsZWQ7XG5cdH1cblxuXHRyZXR1cm4gQ09MT1JTLnVpLmJvcmRlcjtcbn07XG5cbmV4cG9ydCBjb25zdCBCYWNrZHJvcFVJID0gc3R5bGVkLmRpdjwgQmFja2Ryb3BQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyLWNvbG9yOiAkeyBiYWNrZHJvcEJvcmRlckNvbG9yIH07XG5cdFx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0XHRib3JkZXItc3R5bGU6IHNvbGlkO1xuXHRcdGJvcmRlci13aWR0aDogMXB4O1xuXHRcdGJvdHRvbTogMDtcblx0XHRsZWZ0OiAwO1xuXHRcdG1hcmdpbjogMDtcblx0XHRwYWRkaW5nOiAwO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRyaWdodDogMDtcblx0XHR0b3A6IDA7XG5cblx0XHQkeyBydGwoIHsgcGFkZGluZ0xlZnQ6IDIgfSApIH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQoIEZsZXggKWBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0cGFkZGluZy10b3A6IDA7XG5cblx0Ly8gRm9jdXMgd2l0aGluLCBleGNsdWRpbmcgY2FzZXMgd2hlcmUgYXV4aWxpYXJ5IGNvbnRyb2xzIGluIHByZWZpeCBvciBzdWZmaXggaGF2ZSBmb2N1cy5cblx0Jjpmb2N1cy13aXRoaW46bm90KCA6aGFzKCA6aXMoICR7IFByZWZpeCB9LCAkeyBTdWZmaXggfSApOmZvY3VzLXdpdGhpbiApICkge1xuXHRcdCR7IEJhY2tkcm9wVUkgfSB7XG5cdFx0XHRib3JkZXItY29sb3I6ICR7IENPTE9SUy51aS5ib3JkZXJGb2N1cyB9O1xuXHRcdFx0Ym94LXNoYWRvdzogJHsgQ09ORklHLmNvbnRyb2xCb3hTaGFkb3dGb2N1cyB9O1xuXHRcdFx0Ly8gV2luZG93cyBIaWdoIENvbnRyYXN0IG1vZGUgd2lsbCBzaG93IHRoaXMgb3V0bGluZSwgYnV0IG5vdCB0aGUgYm94LXNoYWRvdy5cblx0XHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRcdG91dGxpbmUtb2Zmc2V0OiAtMnB4O1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgY29udGFpbmVyRGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogQ29udGFpbmVyUHJvcHMgKSA9PiB7XG5cdGNvbnN0IGJhY2tncm91bmRDb2xvciA9IGRpc2FibGVkXG5cdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0OiBDT0xPUlMudWkuYmFja2dyb3VuZDtcblxuXHRyZXR1cm4gY3NzKCB7IGJhY2tncm91bmRDb2xvciB9ICk7XG59O1xuXG5jb25zdCBjb250YWluZXJXaWR0aFN0eWxlcyA9ICgge1xuXHRfX3Vuc3RhYmxlSW5wdXRXaWR0aCxcblx0bGFiZWxQb3NpdGlvbixcbn06IENvbnRhaW5lclByb3BzICkgPT4ge1xuXHRpZiAoICEgX191bnN0YWJsZUlucHV0V2lkdGggKSB7XG5cdFx0cmV0dXJuIGNzcyggeyB3aWR0aDogJzEwMCUnIH0gKTtcblx0fVxuXG5cdGlmICggbGFiZWxQb3NpdGlvbiA9PT0gJ3NpZGUnICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdGlmICggbGFiZWxQb3NpdGlvbiA9PT0gJ2VkZ2UnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdGZsZXg6IGAwIDAgJHsgX191bnN0YWJsZUlucHV0V2lkdGggfWAsXG5cdFx0fSApO1xuXHR9XG5cblx0cmV0dXJuIGNzcyggeyB3aWR0aDogX191bnN0YWJsZUlucHV0V2lkdGggfSApO1xufTtcblxuZXhwb3J0IGNvbnN0IENvbnRhaW5lciA9IHN0eWxlZC5kaXY8IENvbnRhaW5lclByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdGRpc3BsYXk6IGZsZXg7XG5cdGZsZXg6IDE7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuXHQkeyBjb250YWluZXJEaXNhYmxlZFN0eWxlcyB9XG5cdCR7IGNvbnRhaW5lcldpZHRoU3R5bGVzIH1cbmA7XG5cbnR5cGUgSW5wdXRQcm9wcyA9IHtcblx0X19uZXh0NDBweERlZmF1bHRTaXplPzogYm9vbGVhbjtcblx0ZGlzYWJsZWQ/OiBib29sZWFuO1xuXHRpbnB1dFNpemU/OiBTaXplO1xuXHRpc0RyYWdnaW5nPzogYm9vbGVhbjtcblx0ZHJhZ0N1cnNvcj86IENTU1Byb3BlcnRpZXNbICdjdXJzb3InIF07XG5cdHBhZGRpbmdJbmxpbmVTdGFydD86IENTU1Byb3BlcnRpZXNbICdwYWRkaW5nSW5saW5lU3RhcnQnIF07XG5cdHBhZGRpbmdJbmxpbmVFbmQ/OiBDU1NQcm9wZXJ0aWVzWyAncGFkZGluZ0lubGluZUVuZCcgXTtcbn07XG5cbmNvbnN0IGRpc2FibGVkU3R5bGVzID0gKCB7IGRpc2FibGVkIH06IElucHV0UHJvcHMgKSA9PiB7XG5cdGlmICggISBkaXNhYmxlZCApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzKCB7XG5cdFx0Y29sb3I6IENPTE9SUy51aS50ZXh0RGlzYWJsZWQsXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBmb250U2l6ZVN0eWxlcyA9ICggeyBpbnB1dFNpemU6IHNpemUgfTogSW5wdXRQcm9wcyApID0+IHtcblx0Y29uc3Qgc2l6ZXMgPSB7XG5cdFx0ZGVmYXVsdDogJzEzcHgnLFxuXHRcdHNtYWxsOiAnMTFweCcsXG5cdFx0Y29tcGFjdDogJzEzcHgnLFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzogJzEzcHgnLFxuXHR9O1xuXG5cdGNvbnN0IGZvbnRTaXplID0gc2l6ZXNbIHNpemUgYXMgU2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG5cdGNvbnN0IGZvbnRTaXplTW9iaWxlID0gJzE2cHgnO1xuXG5cdGlmICggISBmb250U2l6ZSApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdGZvbnQtc2l6ZTogJHsgZm9udFNpemVNb2JpbGUgfTtcblxuXHRcdEBtZWRpYSAoIG1pbi13aWR0aDogNjAwcHggKSB7XG5cdFx0XHRmb250LXNpemU6ICR7IGZvbnRTaXplIH07XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGdldFNpemVDb25maWcgPSAoIHtcblx0aW5wdXRTaXplOiBzaXplLFxuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBJbnB1dFByb3BzICkgPT4ge1xuXHQvLyBQYWRkaW5ncyBtYXkgYmUgb3ZlcnJpZGRlbiBieSB0aGUgY3VzdG9tIHBhZGRpbmdzIHByb3BzLlxuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiB7XG5cdFx0XHRoZWlnaHQ6IDQwLFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogNDAsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHRcdHBhZGRpbmdSaWdodDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHR9LFxuXHRcdHNtYWxsOiB7XG5cdFx0XHRoZWlnaHQ6IDI0LFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogMjQsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0fSxcblx0XHRjb21wYWN0OiB7XG5cdFx0XHRoZWlnaHQ6IDMyLFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogMzIsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0fSxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdH0sXG5cdH07XG5cblx0aWYgKCAhIF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSApIHtcblx0XHRzaXplcy5kZWZhdWx0ID0gc2l6ZXMuY29tcGFjdDtcblx0fVxuXG5cdHJldHVybiBzaXplc1sgc2l6ZSBhcyBTaXplIF0gfHwgc2l6ZXMuZGVmYXVsdDtcbn07XG5cbmNvbnN0IHNpemVTdHlsZXMgPSAoIHByb3BzOiBJbnB1dFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCBnZXRTaXplQ29uZmlnKCBwcm9wcyApICk7XG59O1xuXG5jb25zdCBjdXN0b21QYWRkaW5ncyA9ICgge1xuXHRwYWRkaW5nSW5saW5lU3RhcnQsXG5cdHBhZGRpbmdJbmxpbmVFbmQsXG59OiBJbnB1dFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCB7IHBhZGRpbmdJbmxpbmVTdGFydCwgcGFkZGluZ0lubGluZUVuZCB9ICk7XG59O1xuXG5jb25zdCBkcmFnU3R5bGVzID0gKCB7IGlzRHJhZ2dpbmcsIGRyYWdDdXJzb3IgfTogSW5wdXRQcm9wcyApID0+IHtcblx0bGV0IGRlZmF1bHRBcnJvd1N0eWxlczogU2VyaWFsaXplZFN0eWxlcyB8IHVuZGVmaW5lZDtcblx0bGV0IGFjdGl2ZURyYWdDdXJzb3JTdHlsZXM6IFNlcmlhbGl6ZWRTdHlsZXMgfCB1bmRlZmluZWQ7XG5cblx0aWYgKCBpc0RyYWdnaW5nICkge1xuXHRcdGRlZmF1bHRBcnJvd1N0eWxlcyA9IGNzc2Bcblx0XHRcdGN1cnNvcjogJHsgZHJhZ0N1cnNvciB9O1xuXHRcdFx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cblx0XHRcdCY6Oi13ZWJraXQtb3V0ZXItc3Bpbi1idXR0b24sXG5cdFx0XHQmOjotd2Via2l0LWlubmVyLXNwaW4tYnV0dG9uIHtcblx0XHRcdFx0LXdlYmtpdC1hcHBlYXJhbmNlOiBub25lICFpbXBvcnRhbnQ7XG5cdFx0XHRcdG1hcmdpbjogMCAhaW1wb3J0YW50O1xuXHRcdFx0fVxuXHRcdGA7XG5cdH1cblxuXHRpZiAoIGlzRHJhZ2dpbmcgJiYgZHJhZ0N1cnNvciApIHtcblx0XHRhY3RpdmVEcmFnQ3Vyc29yU3R5bGVzID0gY3NzYFxuXHRcdFx0JjphY3RpdmUge1xuXHRcdFx0XHRjdXJzb3I6ICR7IGRyYWdDdXJzb3IgfTtcblx0XHRcdH1cblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHQkeyBkZWZhdWx0QXJyb3dTdHlsZXMgfVxuXHRcdCR7IGFjdGl2ZURyYWdDdXJzb3JTdHlsZXMgfVxuXHRgO1xufTtcblxuLy8gVE9ETzogUmVzb2x2ZSBuZWVkIHRvIHVzZSAmJiYgdG8gaW5jcmVhc2Ugc3BlY2lmaWNpdHlcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9Xb3JkUHJlc3MvZ3V0ZW5iZXJnL2lzc3Vlcy8xODQ4M1xuXG5leHBvcnQgY29uc3QgSW5wdXQgPSBzdHlsZWQuaW5wdXQ8IElucHV0UHJvcHMgPmBcblx0JiYmIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDtcblx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdGJvcmRlcjogbm9uZTtcblx0XHRib3gtc2hhZG93OiBub25lICFpbXBvcnRhbnQ7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdFx0bWFyZ2luOiAwO1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cblx0XHQkeyBkcmFnU3R5bGVzIH1cblx0XHQkeyBkaXNhYmxlZFN0eWxlcyB9XG5cdFx0JHsgZm9udFNpemVTdHlsZXMgfVxuXHRcdCR7IHNpemVTdHlsZXMgfVxuXHRcdCR7IGN1c3RvbVBhZGRpbmdzIH1cblxuXHRcdCY6Oi13ZWJraXQtaW5wdXQtcGxhY2Vob2xkZXIge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy51aS5kYXJrR3JheVBsYWNlaG9sZGVyIH07XG5cdFx0fVxuXG5cdFx0Jjo6LW1vei1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOi1tcy1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmW3R5cGU9J2VtYWlsJ10sXG5cdFx0Jlt0eXBlPSd1cmwnXSB7XG5cdFx0XHQvKiBydGw6aWdub3JlICovXG5cdFx0XHRkaXJlY3Rpb246IGx0cjtcblx0XHR9XG5cdH1cbmA7XG5cbmNvbnN0IEJhc2VMYWJlbCA9IHN0eWxlZCggVGV4dCApPCB7IGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uIH0gPmBcblx0JiYmIHtcblx0XHQkeyBiYXNlTGFiZWxUeXBvZ3JhcGh5IH07XG5cblx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdHBhZGRpbmctdG9wOiAwO1xuXHRcdHBhZGRpbmctYm90dG9tOiAwO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0XHR6LWluZGV4OiAxO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTGFiZWwgPSAoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczxcblx0XHR7IGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uOyBjaGlsZHJlbjogUmVhY3ROb2RlIH0sXG5cdFx0J2xhYmVsJyxcblx0XHRmYWxzZVxuXHQ+XG4pID0+IDxCYXNlTGFiZWwgeyAuLi5wcm9wcyB9IGFzPVwibGFiZWxcIiAvPjtcblxuZXhwb3J0IGNvbnN0IExhYmVsV3JhcHBlciA9IHN0eWxlZCggRmxleEl0ZW0gKWBcblx0bWF4LXdpZHRoOiBjYWxjKCAxMDAlIC0gMTBweCApO1xuYDtcblxuY29uc3QgcHJlZml4U3VmZml4V3JhcHBlclN0eWxlcyA9ICgge1xuXHR2YXJpYW50ID0gJ2RlZmF1bHQnLFxuXHRzaXplLFxuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdGlzUHJlZml4LFxufTogUHJlZml4U3VmZml4V3JhcHBlclByb3BzICYgeyBpc1ByZWZpeD86IGJvb2xlYW4gfSApID0+IHtcblx0Y29uc3QgeyBwYWRkaW5nTGVmdDogcGFkZGluZyB9ID0gZ2V0U2l6ZUNvbmZpZygge1xuXHRcdGlucHV0U2l6ZTogc2l6ZSxcblx0XHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdH0gKTtcblxuXHRjb25zdCBwYWRkaW5nUHJvcGVydHkgPSBpc1ByZWZpeFxuXHRcdD8gJ3BhZGRpbmdJbmxpbmVTdGFydCdcblx0XHQ6ICdwYWRkaW5nSW5saW5lRW5kJztcblxuXHRpZiAoIHZhcmlhbnQgPT09ICdkZWZhdWx0JyApIHtcblx0XHRyZXR1cm4gY3NzKCB7XG5cdFx0XHRbIHBhZGRpbmdQcm9wZXJ0eSBdOiBwYWRkaW5nLFxuXHRcdH0gKTtcblx0fVxuXG5cdC8vIElmIHZhcmlhbnQgaXMgJ2ljb24nIG9yICdjb250cm9sJ1xuXHRyZXR1cm4gY3NzKCB7XG5cdFx0ZGlzcGxheTogJ2ZsZXgnLFxuXHRcdFsgcGFkZGluZ1Byb3BlcnR5IF06IHBhZGRpbmcgLSA0LFxuXHR9ICk7XG59O1xuXG5leHBvcnQgY29uc3QgUHJlZml4U3VmZml4V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdCR7IHByZWZpeFN1ZmZpeFdyYXBwZXJTdHlsZXMgfVxuYDtcbiJdfQ== */");
    }
    return /* @__PURE__ */ css(defaultArrowStyles, " ", activeDragCursorStyles, ";" + (false ? "" : ";label:dragStyles;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrUVciLCJmaWxlIjoiaW5wdXQtY29udHJvbC1zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHR5cGUgeyBDU1NQcm9wZXJ0aWVzLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi8uLi9jb250ZXh0JztcbmltcG9ydCB7IEZsZXgsIEZsZXhJdGVtIH0gZnJvbSAnLi4vLi4vZmxleCc7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vdGV4dCc7XG5pbXBvcnQgeyBiYXNlTGFiZWxUeXBvZ3JhcGh5LCBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHR5cGUgeyBMYWJlbFBvc2l0aW9uLCBTaXplLCBQcmVmaXhTdWZmaXhXcmFwcGVyUHJvcHMgfSBmcm9tICcuLi90eXBlcyc7XG5cbnR5cGUgQ29udGFpbmVyUHJvcHMgPSB7XG5cdGRpc2FibGVkPzogYm9vbGVhbjtcblx0aGlkZUxhYmVsPzogYm9vbGVhbjtcblx0X191bnN0YWJsZUlucHV0V2lkdGg/OiBDU1NQcm9wZXJ0aWVzWyAnd2lkdGgnIF07XG5cdGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uO1xufTtcblxuZXhwb3J0IGNvbnN0IFByZWZpeCA9IHN0eWxlZC5zcGFuYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBTdWZmaXggPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0YWxpZ24tc2VsZjogc3RyZXRjaDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbnR5cGUgQmFja2Ryb3BQcm9wcyA9IHtcblx0ZGlzYWJsZWQ/OiBib29sZWFuO1xuXHRpc0JvcmRlcmxlc3M/OiBib29sZWFuO1xufTtcblxuY29uc3QgYmFja2Ryb3BCb3JkZXJDb2xvciA9ICgge1xuXHRkaXNhYmxlZCxcblx0aXNCb3JkZXJsZXNzLFxufTogQmFja2Ryb3BQcm9wcyApOiBDU1NQcm9wZXJ0aWVzWyAnYm9yZGVyQ29sb3InIF0gPT4ge1xuXHRpZiAoIGlzQm9yZGVybGVzcyApIHtcblx0XHRyZXR1cm4gJ3RyYW5zcGFyZW50Jztcblx0fVxuXG5cdGlmICggZGlzYWJsZWQgKSB7XG5cdFx0cmV0dXJuIENPTE9SUy51aS5ib3JkZXJEaXNhYmxlZDtcblx0fVxuXG5cdHJldHVybiBDT0xPUlMudWkuYm9yZGVyO1xufTtcblxuZXhwb3J0IGNvbnN0IEJhY2tkcm9wVUkgPSBzdHlsZWQuZGl2PCBCYWNrZHJvcFByb3BzID5gXG5cdCYmJiB7XG5cdFx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0XHRib3JkZXItY29sb3I6ICR7IGJhY2tkcm9wQm9yZGVyQ29sb3IgfTtcblx0XHRib3JkZXItcmFkaXVzOiBpbmhlcml0O1xuXHRcdGJvcmRlci1zdHlsZTogc29saWQ7XG5cdFx0Ym9yZGVyLXdpZHRoOiAxcHg7XG5cdFx0Ym90dG9tOiAwO1xuXHRcdGxlZnQ6IDA7XG5cdFx0bWFyZ2luOiAwO1xuXHRcdHBhZGRpbmc6IDA7XG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdHJpZ2h0OiAwO1xuXHRcdHRvcDogMDtcblxuXHRcdCR7IHJ0bCggeyBwYWRkaW5nTGVmdDogMiB9ICkgfVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgUm9vdCA9IHN0eWxlZCggRmxleCApYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRwYWRkaW5nLXRvcDogMDtcblxuXHQvLyBGb2N1cyB3aXRoaW4sIGV4Y2x1ZGluZyBjYXNlcyB3aGVyZSBhdXhpbGlhcnkgY29udHJvbHMgaW4gcHJlZml4IG9yIHN1ZmZpeCBoYXZlIGZvY3VzLlxuXHQmOmZvY3VzLXdpdGhpbjpub3QoIDpoYXMoIDppcyggJHsgUHJlZml4IH0sICR7IFN1ZmZpeCB9ICk6Zm9jdXMtd2l0aGluICkgKSB7XG5cdFx0JHsgQmFja2Ryb3BVSSB9IHtcblx0XHRcdGJvcmRlci1jb2xvcjogJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRib3gtc2hhZG93OiAkeyBDT05GSUcuY29udHJvbEJveFNoYWRvd0ZvY3VzIH07XG5cdFx0XHQvLyBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSB3aWxsIHNob3cgdGhpcyBvdXRsaW5lLCBidXQgbm90IHRoZSBib3gtc2hhZG93LlxuXHRcdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdFx0b3V0bGluZS1vZmZzZXQ6IC0ycHg7XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBjb250YWluZXJEaXNhYmxlZFN0eWxlcyA9ICggeyBkaXNhYmxlZCB9OiBDb250YWluZXJQcm9wcyApID0+IHtcblx0Y29uc3QgYmFja2dyb3VuZENvbG9yID0gZGlzYWJsZWRcblx0XHQ/IENPTE9SUy51aS5iYWNrZ3JvdW5kRGlzYWJsZWRcblx0XHQ6IENPTE9SUy51aS5iYWNrZ3JvdW5kO1xuXG5cdHJldHVybiBjc3MoIHsgYmFja2dyb3VuZENvbG9yIH0gKTtcbn07XG5cbmNvbnN0IGNvbnRhaW5lcldpZHRoU3R5bGVzID0gKCB7XG5cdF9fdW5zdGFibGVJbnB1dFdpZHRoLFxuXHRsYWJlbFBvc2l0aW9uLFxufTogQ29udGFpbmVyUHJvcHMgKSA9PiB7XG5cdGlmICggISBfX3Vuc3RhYmxlSW5wdXRXaWR0aCApIHtcblx0XHRyZXR1cm4gY3NzKCB7IHdpZHRoOiAnMTAwJScgfSApO1xuXHR9XG5cblx0aWYgKCBsYWJlbFBvc2l0aW9uID09PSAnc2lkZScgKSB7XG5cdFx0cmV0dXJuICcnO1xuXHR9XG5cblx0aWYgKCBsYWJlbFBvc2l0aW9uID09PSAnZWRnZScgKSB7XG5cdFx0cmV0dXJuIGNzcygge1xuXHRcdFx0ZmxleDogYDAgMCAkeyBfX3Vuc3RhYmxlSW5wdXRXaWR0aCB9YCxcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4gY3NzKCB7IHdpZHRoOiBfX3Vuc3RhYmxlSW5wdXRXaWR0aCB9ICk7XG59O1xuXG5leHBvcnQgY29uc3QgQ29udGFpbmVyID0gc3R5bGVkLmRpdjwgQ29udGFpbmVyUHJvcHMgPmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleDogMTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXG5cdCR7IGNvbnRhaW5lckRpc2FibGVkU3R5bGVzIH1cblx0JHsgY29udGFpbmVyV2lkdGhTdHlsZXMgfVxuYDtcblxudHlwZSBJbnB1dFByb3BzID0ge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemU/OiBib29sZWFuO1xuXHRkaXNhYmxlZD86IGJvb2xlYW47XG5cdGlucHV0U2l6ZT86IFNpemU7XG5cdGlzRHJhZ2dpbmc/OiBib29sZWFuO1xuXHRkcmFnQ3Vyc29yPzogQ1NTUHJvcGVydGllc1sgJ2N1cnNvcicgXTtcblx0cGFkZGluZ0lubGluZVN0YXJ0PzogQ1NTUHJvcGVydGllc1sgJ3BhZGRpbmdJbmxpbmVTdGFydCcgXTtcblx0cGFkZGluZ0lubGluZUVuZD86IENTU1Byb3BlcnRpZXNbICdwYWRkaW5nSW5saW5lRW5kJyBdO1xufTtcblxuY29uc3QgZGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogSW5wdXRQcm9wcyApID0+IHtcblx0aWYgKCAhIGRpc2FibGVkICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogQ09MT1JTLnVpLnRleHREaXNhYmxlZCxcblx0fSApO1xufTtcblxuZXhwb3J0IGNvbnN0IGZvbnRTaXplU3R5bGVzID0gKCB7IGlucHV0U2l6ZTogc2l6ZSB9OiBJbnB1dFByb3BzICkgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiAnMTNweCcsXG5cdFx0c21hbGw6ICcxMXB4Jyxcblx0XHRjb21wYWN0OiAnMTNweCcsXG5cdFx0J19fdW5zdGFibGUtbGFyZ2UnOiAnMTNweCcsXG5cdH07XG5cblx0Y29uc3QgZm9udFNpemUgPSBzaXplc1sgc2l6ZSBhcyBTaXplIF0gfHwgc2l6ZXMuZGVmYXVsdDtcblx0Y29uc3QgZm9udFNpemVNb2JpbGUgPSAnMTZweCc7XG5cblx0aWYgKCAhIGZvbnRTaXplICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdHJldHVybiBjc3NgXG5cdFx0Zm9udC1zaXplOiAkeyBmb250U2l6ZU1vYmlsZSB9O1xuXG5cdFx0QG1lZGlhICggbWluLXdpZHRoOiA2MDBweCApIHtcblx0XHRcdGZvbnQtc2l6ZTogJHsgZm9udFNpemUgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgZ2V0U2l6ZUNvbmZpZyA9ICgge1xuXHRpbnB1dFNpemU6IHNpemUsXG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcbn06IElucHV0UHJvcHMgKSA9PiB7XG5cdC8vIFBhZGRpbmdzIG1heSBiZSBvdmVycmlkZGVuIGJ5IHRoZSBjdXN0b20gcGFkZGluZ3MgcHJvcHMuXG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdH0sXG5cdFx0c21hbGw6IHtcblx0XHRcdGhlaWdodDogMjQsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiAyNCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHR9LFxuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdGhlaWdodDogMzIsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiAzMixcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHR9LFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzoge1xuXHRcdFx0aGVpZ2h0OiA0MCxcblx0XHRcdGxpbmVIZWlnaHQ6IDEsXG5cdFx0XHRtaW5IZWlnaHQ6IDQwLFxuXHRcdFx0cGFkZGluZ0xlZnQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdFx0fSxcblx0fTtcblxuXHRpZiAoICEgX19uZXh0NDBweERlZmF1bHRTaXplICkge1xuXHRcdHNpemVzLmRlZmF1bHQgPSBzaXplcy5jb21wYWN0O1xuXHR9XG5cblx0cmV0dXJuIHNpemVzWyBzaXplIGFzIFNpemUgXSB8fCBzaXplcy5kZWZhdWx0O1xufTtcblxuY29uc3Qgc2l6ZVN0eWxlcyA9ICggcHJvcHM6IElucHV0UHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIGdldFNpemVDb25maWcoIHByb3BzICkgKTtcbn07XG5cbmNvbnN0IGN1c3RvbVBhZGRpbmdzID0gKCB7XG5cdHBhZGRpbmdJbmxpbmVTdGFydCxcblx0cGFkZGluZ0lubGluZUVuZCxcbn06IElucHV0UHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHsgcGFkZGluZ0lubGluZVN0YXJ0LCBwYWRkaW5nSW5saW5lRW5kIH0gKTtcbn07XG5cbmNvbnN0IGRyYWdTdHlsZXMgPSAoIHsgaXNEcmFnZ2luZywgZHJhZ0N1cnNvciB9OiBJbnB1dFByb3BzICkgPT4ge1xuXHRsZXQgZGVmYXVsdEFycm93U3R5bGVzOiBTZXJpYWxpemVkU3R5bGVzIHwgdW5kZWZpbmVkO1xuXHRsZXQgYWN0aXZlRHJhZ0N1cnNvclN0eWxlczogU2VyaWFsaXplZFN0eWxlcyB8IHVuZGVmaW5lZDtcblxuXHRpZiAoIGlzRHJhZ2dpbmcgKSB7XG5cdFx0ZGVmYXVsdEFycm93U3R5bGVzID0gY3NzYFxuXHRcdFx0Y3Vyc29yOiAkeyBkcmFnQ3Vyc29yIH07XG5cdFx0XHR1c2VyLXNlbGVjdDogbm9uZTtcblxuXHRcdFx0Jjo6LXdlYmtpdC1vdXRlci1zcGluLWJ1dHRvbixcblx0XHRcdCY6Oi13ZWJraXQtaW5uZXItc3Bpbi1idXR0b24ge1xuXHRcdFx0XHQtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmUgIWltcG9ydGFudDtcblx0XHRcdFx0bWFyZ2luOiAwICFpbXBvcnRhbnQ7XG5cdFx0XHR9XG5cdFx0YDtcblx0fVxuXG5cdGlmICggaXNEcmFnZ2luZyAmJiBkcmFnQ3Vyc29yICkge1xuXHRcdGFjdGl2ZURyYWdDdXJzb3JTdHlsZXMgPSBjc3NgXG5cdFx0XHQmOmFjdGl2ZSB7XG5cdFx0XHRcdGN1cnNvcjogJHsgZHJhZ0N1cnNvciB9O1xuXHRcdFx0fVxuXHRcdGA7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdCR7IGRlZmF1bHRBcnJvd1N0eWxlcyB9XG5cdFx0JHsgYWN0aXZlRHJhZ0N1cnNvclN0eWxlcyB9XG5cdGA7XG59O1xuXG4vLyBUT0RPOiBSZXNvbHZlIG5lZWQgdG8gdXNlICYmJiB0byBpbmNyZWFzZSBzcGVjaWZpY2l0eVxuLy8gaHR0cHM6Ly9naXRodWIuY29tL1dvcmRQcmVzcy9ndXRlbmJlcmcvaXNzdWVzLzE4NDgzXG5cbmV4cG9ydCBjb25zdCBJbnB1dCA9IHN0eWxlZC5pbnB1dDwgSW5wdXRQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyOiBub25lO1xuXHRcdGJveC1zaGFkb3c6IG5vbmUgIWltcG9ydGFudDtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRmb250LWZhbWlseTogaW5oZXJpdDtcblx0XHRtYXJnaW46IDA7XG5cdFx0b3V0bGluZTogbm9uZTtcblx0XHR3aWR0aDogMTAwJTtcblxuXHRcdCR7IGRyYWdTdHlsZXMgfVxuXHRcdCR7IGRpc2FibGVkU3R5bGVzIH1cblx0XHQkeyBmb250U2l6ZVN0eWxlcyB9XG5cdFx0JHsgc2l6ZVN0eWxlcyB9XG5cdFx0JHsgY3VzdG9tUGFkZGluZ3MgfVxuXG5cdFx0Jjo6LXdlYmtpdC1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOjotbW96LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblxuXHRcdCY6LW1zLWlucHV0LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblxuXHRcdCZbdHlwZT0nZW1haWwnXSxcblx0XHQmW3R5cGU9J3VybCddIHtcblx0XHRcdC8qIHJ0bDppZ25vcmUgKi9cblx0XHRcdGRpcmVjdGlvbjogbHRyO1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgQmFzZUxhYmVsID0gc3R5bGVkKCBUZXh0ICk8IHsgbGFiZWxQb3NpdGlvbj86IExhYmVsUG9zaXRpb24gfSA+YFxuXHQmJiYge1xuXHRcdCR7IGJhc2VMYWJlbFR5cG9ncmFwaHkgfTtcblxuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0cGFkZGluZy10b3A6IDA7XG5cdFx0cGFkZGluZy1ib3R0b206IDA7XG5cdFx0bWF4LXdpZHRoOiAxMDAlO1xuXHRcdHotaW5kZXg6IDE7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBMYWJlbCA9IChcblx0cHJvcHM6IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzPFxuXHRcdHsgbGFiZWxQb3NpdGlvbj86IExhYmVsUG9zaXRpb247IGNoaWxkcmVuOiBSZWFjdE5vZGUgfSxcblx0XHQnbGFiZWwnLFxuXHRcdGZhbHNlXG5cdD5cbikgPT4gPEJhc2VMYWJlbCB7IC4uLnByb3BzIH0gYXM9XCJsYWJlbFwiIC8+O1xuXG5leHBvcnQgY29uc3QgTGFiZWxXcmFwcGVyID0gc3R5bGVkKCBGbGV4SXRlbSApYFxuXHRtYXgtd2lkdGg6IGNhbGMoIDEwMCUgLSAxMHB4ICk7XG5gO1xuXG5jb25zdCBwcmVmaXhTdWZmaXhXcmFwcGVyU3R5bGVzID0gKCB7XG5cdHZhcmlhbnQgPSAnZGVmYXVsdCcsXG5cdHNpemUsXG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0aXNQcmVmaXgsXG59OiBQcmVmaXhTdWZmaXhXcmFwcGVyUHJvcHMgJiB7IGlzUHJlZml4PzogYm9vbGVhbiB9ICkgPT4ge1xuXHRjb25zdCB7IHBhZGRpbmdMZWZ0OiBwYWRkaW5nIH0gPSBnZXRTaXplQ29uZmlnKCB7XG5cdFx0aW5wdXRTaXplOiBzaXplLFxuXHRcdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0fSApO1xuXG5cdGNvbnN0IHBhZGRpbmdQcm9wZXJ0eSA9IGlzUHJlZml4XG5cdFx0PyAncGFkZGluZ0lubGluZVN0YXJ0J1xuXHRcdDogJ3BhZGRpbmdJbmxpbmVFbmQnO1xuXG5cdGlmICggdmFyaWFudCA9PT0gJ2RlZmF1bHQnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdFsgcGFkZGluZ1Byb3BlcnR5IF06IHBhZGRpbmcsXG5cdFx0fSApO1xuXHR9XG5cblx0Ly8gSWYgdmFyaWFudCBpcyAnaWNvbicgb3IgJ2NvbnRyb2wnXG5cdHJldHVybiBjc3MoIHtcblx0XHRkaXNwbGF5OiAnZmxleCcsXG5cdFx0WyBwYWRkaW5nUHJvcGVydHkgXTogcGFkZGluZyAtIDQsXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBQcmVmaXhTdWZmaXhXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0JHsgcHJlZml4U3VmZml4V3JhcHBlclN0eWxlcyB9XG5gO1xuIl19 */");
  };
  var Input = /* @__PURE__ */ createStyled("input", false ? {
    target: "em5sgkm3"
  } : {
    target: "em5sgkm3",
    label: "Input"
  })("&&&{background-color:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:", COLORS.theme.foreground, ";display:block;font-family:inherit;margin:0;outline:none;width:100%;", dragStyles, " ", disabledStyles, " ", fontSizeStyles, " ", sizeStyles, " ", customPaddings, " &::-webkit-input-placeholder{color:", COLORS.ui.darkGrayPlaceholder, ";}&::-moz-placeholder{color:", COLORS.ui.darkGrayPlaceholder, ";}&:-ms-input-placeholder{color:", COLORS.ui.darkGrayPlaceholder, ";}&[type='email'],&[type='url']{direction:ltr;}}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyUStDIiwiZmlsZSI6ImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgU2VyaWFsaXplZFN0eWxlcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB0eXBlIHsgQ1NTUHJvcGVydGllcywgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzIH0gZnJvbSAnLi4vLi4vY29udGV4dCc7XG5pbXBvcnQgeyBGbGV4LCBGbGV4SXRlbSB9IGZyb20gJy4uLy4uL2ZsZXgnO1xuaW1wb3J0IHsgVGV4dCB9IGZyb20gJy4uLy4uL3RleHQnO1xuaW1wb3J0IHsgYmFzZUxhYmVsVHlwb2dyYXBoeSwgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgTGFiZWxQb3NpdGlvbiwgU2l6ZSwgUHJlZml4U3VmZml4V3JhcHBlclByb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuXG50eXBlIENvbnRhaW5lclByb3BzID0ge1xuXHRkaXNhYmxlZD86IGJvb2xlYW47XG5cdGhpZGVMYWJlbD86IGJvb2xlYW47XG5cdF9fdW5zdGFibGVJbnB1dFdpZHRoPzogQ1NTUHJvcGVydGllc1sgJ3dpZHRoJyBdO1xuXHRsYWJlbFBvc2l0aW9uPzogTGFiZWxQb3NpdGlvbjtcbn07XG5cbmV4cG9ydCBjb25zdCBQcmVmaXggPSBzdHlsZWQuc3BhbmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VmZml4ID0gc3R5bGVkLnNwYW5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGFsaWduLXNlbGY6IHN0cmV0Y2g7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGZsZXg7XG5gO1xuXG50eXBlIEJhY2tkcm9wUHJvcHMgPSB7XG5cdGRpc2FibGVkPzogYm9vbGVhbjtcblx0aXNCb3JkZXJsZXNzPzogYm9vbGVhbjtcbn07XG5cbmNvbnN0IGJhY2tkcm9wQm9yZGVyQ29sb3IgPSAoIHtcblx0ZGlzYWJsZWQsXG5cdGlzQm9yZGVybGVzcyxcbn06IEJhY2tkcm9wUHJvcHMgKTogQ1NTUHJvcGVydGllc1sgJ2JvcmRlckNvbG9yJyBdID0+IHtcblx0aWYgKCBpc0JvcmRlcmxlc3MgKSB7XG5cdFx0cmV0dXJuICd0cmFuc3BhcmVudCc7XG5cdH1cblxuXHRpZiAoIGRpc2FibGVkICkge1xuXHRcdHJldHVybiBDT0xPUlMudWkuYm9yZGVyRGlzYWJsZWQ7XG5cdH1cblxuXHRyZXR1cm4gQ09MT1JTLnVpLmJvcmRlcjtcbn07XG5cbmV4cG9ydCBjb25zdCBCYWNrZHJvcFVJID0gc3R5bGVkLmRpdjwgQmFja2Ryb3BQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyLWNvbG9yOiAkeyBiYWNrZHJvcEJvcmRlckNvbG9yIH07XG5cdFx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0XHRib3JkZXItc3R5bGU6IHNvbGlkO1xuXHRcdGJvcmRlci13aWR0aDogMXB4O1xuXHRcdGJvdHRvbTogMDtcblx0XHRsZWZ0OiAwO1xuXHRcdG1hcmdpbjogMDtcblx0XHRwYWRkaW5nOiAwO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRyaWdodDogMDtcblx0XHR0b3A6IDA7XG5cblx0XHQkeyBydGwoIHsgcGFkZGluZ0xlZnQ6IDIgfSApIH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQoIEZsZXggKWBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0cGFkZGluZy10b3A6IDA7XG5cblx0Ly8gRm9jdXMgd2l0aGluLCBleGNsdWRpbmcgY2FzZXMgd2hlcmUgYXV4aWxpYXJ5IGNvbnRyb2xzIGluIHByZWZpeCBvciBzdWZmaXggaGF2ZSBmb2N1cy5cblx0Jjpmb2N1cy13aXRoaW46bm90KCA6aGFzKCA6aXMoICR7IFByZWZpeCB9LCAkeyBTdWZmaXggfSApOmZvY3VzLXdpdGhpbiApICkge1xuXHRcdCR7IEJhY2tkcm9wVUkgfSB7XG5cdFx0XHRib3JkZXItY29sb3I6ICR7IENPTE9SUy51aS5ib3JkZXJGb2N1cyB9O1xuXHRcdFx0Ym94LXNoYWRvdzogJHsgQ09ORklHLmNvbnRyb2xCb3hTaGFkb3dGb2N1cyB9O1xuXHRcdFx0Ly8gV2luZG93cyBIaWdoIENvbnRyYXN0IG1vZGUgd2lsbCBzaG93IHRoaXMgb3V0bGluZSwgYnV0IG5vdCB0aGUgYm94LXNoYWRvdy5cblx0XHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRcdG91dGxpbmUtb2Zmc2V0OiAtMnB4O1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgY29udGFpbmVyRGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogQ29udGFpbmVyUHJvcHMgKSA9PiB7XG5cdGNvbnN0IGJhY2tncm91bmRDb2xvciA9IGRpc2FibGVkXG5cdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0OiBDT0xPUlMudWkuYmFja2dyb3VuZDtcblxuXHRyZXR1cm4gY3NzKCB7IGJhY2tncm91bmRDb2xvciB9ICk7XG59O1xuXG5jb25zdCBjb250YWluZXJXaWR0aFN0eWxlcyA9ICgge1xuXHRfX3Vuc3RhYmxlSW5wdXRXaWR0aCxcblx0bGFiZWxQb3NpdGlvbixcbn06IENvbnRhaW5lclByb3BzICkgPT4ge1xuXHRpZiAoICEgX191bnN0YWJsZUlucHV0V2lkdGggKSB7XG5cdFx0cmV0dXJuIGNzcyggeyB3aWR0aDogJzEwMCUnIH0gKTtcblx0fVxuXG5cdGlmICggbGFiZWxQb3NpdGlvbiA9PT0gJ3NpZGUnICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdGlmICggbGFiZWxQb3NpdGlvbiA9PT0gJ2VkZ2UnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdGZsZXg6IGAwIDAgJHsgX191bnN0YWJsZUlucHV0V2lkdGggfWAsXG5cdFx0fSApO1xuXHR9XG5cblx0cmV0dXJuIGNzcyggeyB3aWR0aDogX191bnN0YWJsZUlucHV0V2lkdGggfSApO1xufTtcblxuZXhwb3J0IGNvbnN0IENvbnRhaW5lciA9IHN0eWxlZC5kaXY8IENvbnRhaW5lclByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdGRpc3BsYXk6IGZsZXg7XG5cdGZsZXg6IDE7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuXHQkeyBjb250YWluZXJEaXNhYmxlZFN0eWxlcyB9XG5cdCR7IGNvbnRhaW5lcldpZHRoU3R5bGVzIH1cbmA7XG5cbnR5cGUgSW5wdXRQcm9wcyA9IHtcblx0X19uZXh0NDBweERlZmF1bHRTaXplPzogYm9vbGVhbjtcblx0ZGlzYWJsZWQ/OiBib29sZWFuO1xuXHRpbnB1dFNpemU/OiBTaXplO1xuXHRpc0RyYWdnaW5nPzogYm9vbGVhbjtcblx0ZHJhZ0N1cnNvcj86IENTU1Byb3BlcnRpZXNbICdjdXJzb3InIF07XG5cdHBhZGRpbmdJbmxpbmVTdGFydD86IENTU1Byb3BlcnRpZXNbICdwYWRkaW5nSW5saW5lU3RhcnQnIF07XG5cdHBhZGRpbmdJbmxpbmVFbmQ/OiBDU1NQcm9wZXJ0aWVzWyAncGFkZGluZ0lubGluZUVuZCcgXTtcbn07XG5cbmNvbnN0IGRpc2FibGVkU3R5bGVzID0gKCB7IGRpc2FibGVkIH06IElucHV0UHJvcHMgKSA9PiB7XG5cdGlmICggISBkaXNhYmxlZCApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzKCB7XG5cdFx0Y29sb3I6IENPTE9SUy51aS50ZXh0RGlzYWJsZWQsXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBmb250U2l6ZVN0eWxlcyA9ICggeyBpbnB1dFNpemU6IHNpemUgfTogSW5wdXRQcm9wcyApID0+IHtcblx0Y29uc3Qgc2l6ZXMgPSB7XG5cdFx0ZGVmYXVsdDogJzEzcHgnLFxuXHRcdHNtYWxsOiAnMTFweCcsXG5cdFx0Y29tcGFjdDogJzEzcHgnLFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzogJzEzcHgnLFxuXHR9O1xuXG5cdGNvbnN0IGZvbnRTaXplID0gc2l6ZXNbIHNpemUgYXMgU2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG5cdGNvbnN0IGZvbnRTaXplTW9iaWxlID0gJzE2cHgnO1xuXG5cdGlmICggISBmb250U2l6ZSApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdGZvbnQtc2l6ZTogJHsgZm9udFNpemVNb2JpbGUgfTtcblxuXHRcdEBtZWRpYSAoIG1pbi13aWR0aDogNjAwcHggKSB7XG5cdFx0XHRmb250LXNpemU6ICR7IGZvbnRTaXplIH07XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGdldFNpemVDb25maWcgPSAoIHtcblx0aW5wdXRTaXplOiBzaXplLFxuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBJbnB1dFByb3BzICkgPT4ge1xuXHQvLyBQYWRkaW5ncyBtYXkgYmUgb3ZlcnJpZGRlbiBieSB0aGUgY3VzdG9tIHBhZGRpbmdzIHByb3BzLlxuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiB7XG5cdFx0XHRoZWlnaHQ6IDQwLFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogNDAsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHRcdHBhZGRpbmdSaWdodDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHR9LFxuXHRcdHNtYWxsOiB7XG5cdFx0XHRoZWlnaHQ6IDI0LFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogMjQsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0fSxcblx0XHRjb21wYWN0OiB7XG5cdFx0XHRoZWlnaHQ6IDMyLFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogMzIsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0fSxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdH0sXG5cdH07XG5cblx0aWYgKCAhIF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSApIHtcblx0XHRzaXplcy5kZWZhdWx0ID0gc2l6ZXMuY29tcGFjdDtcblx0fVxuXG5cdHJldHVybiBzaXplc1sgc2l6ZSBhcyBTaXplIF0gfHwgc2l6ZXMuZGVmYXVsdDtcbn07XG5cbmNvbnN0IHNpemVTdHlsZXMgPSAoIHByb3BzOiBJbnB1dFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCBnZXRTaXplQ29uZmlnKCBwcm9wcyApICk7XG59O1xuXG5jb25zdCBjdXN0b21QYWRkaW5ncyA9ICgge1xuXHRwYWRkaW5nSW5saW5lU3RhcnQsXG5cdHBhZGRpbmdJbmxpbmVFbmQsXG59OiBJbnB1dFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCB7IHBhZGRpbmdJbmxpbmVTdGFydCwgcGFkZGluZ0lubGluZUVuZCB9ICk7XG59O1xuXG5jb25zdCBkcmFnU3R5bGVzID0gKCB7IGlzRHJhZ2dpbmcsIGRyYWdDdXJzb3IgfTogSW5wdXRQcm9wcyApID0+IHtcblx0bGV0IGRlZmF1bHRBcnJvd1N0eWxlczogU2VyaWFsaXplZFN0eWxlcyB8IHVuZGVmaW5lZDtcblx0bGV0IGFjdGl2ZURyYWdDdXJzb3JTdHlsZXM6IFNlcmlhbGl6ZWRTdHlsZXMgfCB1bmRlZmluZWQ7XG5cblx0aWYgKCBpc0RyYWdnaW5nICkge1xuXHRcdGRlZmF1bHRBcnJvd1N0eWxlcyA9IGNzc2Bcblx0XHRcdGN1cnNvcjogJHsgZHJhZ0N1cnNvciB9O1xuXHRcdFx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cblx0XHRcdCY6Oi13ZWJraXQtb3V0ZXItc3Bpbi1idXR0b24sXG5cdFx0XHQmOjotd2Via2l0LWlubmVyLXNwaW4tYnV0dG9uIHtcblx0XHRcdFx0LXdlYmtpdC1hcHBlYXJhbmNlOiBub25lICFpbXBvcnRhbnQ7XG5cdFx0XHRcdG1hcmdpbjogMCAhaW1wb3J0YW50O1xuXHRcdFx0fVxuXHRcdGA7XG5cdH1cblxuXHRpZiAoIGlzRHJhZ2dpbmcgJiYgZHJhZ0N1cnNvciApIHtcblx0XHRhY3RpdmVEcmFnQ3Vyc29yU3R5bGVzID0gY3NzYFxuXHRcdFx0JjphY3RpdmUge1xuXHRcdFx0XHRjdXJzb3I6ICR7IGRyYWdDdXJzb3IgfTtcblx0XHRcdH1cblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHQkeyBkZWZhdWx0QXJyb3dTdHlsZXMgfVxuXHRcdCR7IGFjdGl2ZURyYWdDdXJzb3JTdHlsZXMgfVxuXHRgO1xufTtcblxuLy8gVE9ETzogUmVzb2x2ZSBuZWVkIHRvIHVzZSAmJiYgdG8gaW5jcmVhc2Ugc3BlY2lmaWNpdHlcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9Xb3JkUHJlc3MvZ3V0ZW5iZXJnL2lzc3Vlcy8xODQ4M1xuXG5leHBvcnQgY29uc3QgSW5wdXQgPSBzdHlsZWQuaW5wdXQ8IElucHV0UHJvcHMgPmBcblx0JiYmIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDtcblx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdGJvcmRlcjogbm9uZTtcblx0XHRib3gtc2hhZG93OiBub25lICFpbXBvcnRhbnQ7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdFx0bWFyZ2luOiAwO1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cblx0XHQkeyBkcmFnU3R5bGVzIH1cblx0XHQkeyBkaXNhYmxlZFN0eWxlcyB9XG5cdFx0JHsgZm9udFNpemVTdHlsZXMgfVxuXHRcdCR7IHNpemVTdHlsZXMgfVxuXHRcdCR7IGN1c3RvbVBhZGRpbmdzIH1cblxuXHRcdCY6Oi13ZWJraXQtaW5wdXQtcGxhY2Vob2xkZXIge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy51aS5kYXJrR3JheVBsYWNlaG9sZGVyIH07XG5cdFx0fVxuXG5cdFx0Jjo6LW1vei1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOi1tcy1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmW3R5cGU9J2VtYWlsJ10sXG5cdFx0Jlt0eXBlPSd1cmwnXSB7XG5cdFx0XHQvKiBydGw6aWdub3JlICovXG5cdFx0XHRkaXJlY3Rpb246IGx0cjtcblx0XHR9XG5cdH1cbmA7XG5cbmNvbnN0IEJhc2VMYWJlbCA9IHN0eWxlZCggVGV4dCApPCB7IGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uIH0gPmBcblx0JiYmIHtcblx0XHQkeyBiYXNlTGFiZWxUeXBvZ3JhcGh5IH07XG5cblx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdHBhZGRpbmctdG9wOiAwO1xuXHRcdHBhZGRpbmctYm90dG9tOiAwO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0XHR6LWluZGV4OiAxO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTGFiZWwgPSAoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczxcblx0XHR7IGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uOyBjaGlsZHJlbjogUmVhY3ROb2RlIH0sXG5cdFx0J2xhYmVsJyxcblx0XHRmYWxzZVxuXHQ+XG4pID0+IDxCYXNlTGFiZWwgeyAuLi5wcm9wcyB9IGFzPVwibGFiZWxcIiAvPjtcblxuZXhwb3J0IGNvbnN0IExhYmVsV3JhcHBlciA9IHN0eWxlZCggRmxleEl0ZW0gKWBcblx0bWF4LXdpZHRoOiBjYWxjKCAxMDAlIC0gMTBweCApO1xuYDtcblxuY29uc3QgcHJlZml4U3VmZml4V3JhcHBlclN0eWxlcyA9ICgge1xuXHR2YXJpYW50ID0gJ2RlZmF1bHQnLFxuXHRzaXplLFxuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdGlzUHJlZml4LFxufTogUHJlZml4U3VmZml4V3JhcHBlclByb3BzICYgeyBpc1ByZWZpeD86IGJvb2xlYW4gfSApID0+IHtcblx0Y29uc3QgeyBwYWRkaW5nTGVmdDogcGFkZGluZyB9ID0gZ2V0U2l6ZUNvbmZpZygge1xuXHRcdGlucHV0U2l6ZTogc2l6ZSxcblx0XHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdH0gKTtcblxuXHRjb25zdCBwYWRkaW5nUHJvcGVydHkgPSBpc1ByZWZpeFxuXHRcdD8gJ3BhZGRpbmdJbmxpbmVTdGFydCdcblx0XHQ6ICdwYWRkaW5nSW5saW5lRW5kJztcblxuXHRpZiAoIHZhcmlhbnQgPT09ICdkZWZhdWx0JyApIHtcblx0XHRyZXR1cm4gY3NzKCB7XG5cdFx0XHRbIHBhZGRpbmdQcm9wZXJ0eSBdOiBwYWRkaW5nLFxuXHRcdH0gKTtcblx0fVxuXG5cdC8vIElmIHZhcmlhbnQgaXMgJ2ljb24nIG9yICdjb250cm9sJ1xuXHRyZXR1cm4gY3NzKCB7XG5cdFx0ZGlzcGxheTogJ2ZsZXgnLFxuXHRcdFsgcGFkZGluZ1Byb3BlcnR5IF06IHBhZGRpbmcgLSA0LFxuXHR9ICk7XG59O1xuXG5leHBvcnQgY29uc3QgUHJlZml4U3VmZml4V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdCR7IHByZWZpeFN1ZmZpeFdyYXBwZXJTdHlsZXMgfVxuYDtcbiJdfQ== */"));
  var BaseLabel = /* @__PURE__ */ createStyled(component_default8, false ? {
    target: "em5sgkm2"
  } : {
    target: "em5sgkm2",
    label: "BaseLabel"
  })("&&&{", baseLabelTypography, ";box-sizing:border-box;display:block;padding-top:0;padding-bottom:0;max-width:100%;z-index:1;}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrVHFFIiwiZmlsZSI6ImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgU2VyaWFsaXplZFN0eWxlcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB0eXBlIHsgQ1NTUHJvcGVydGllcywgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzIH0gZnJvbSAnLi4vLi4vY29udGV4dCc7XG5pbXBvcnQgeyBGbGV4LCBGbGV4SXRlbSB9IGZyb20gJy4uLy4uL2ZsZXgnO1xuaW1wb3J0IHsgVGV4dCB9IGZyb20gJy4uLy4uL3RleHQnO1xuaW1wb3J0IHsgYmFzZUxhYmVsVHlwb2dyYXBoeSwgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgTGFiZWxQb3NpdGlvbiwgU2l6ZSwgUHJlZml4U3VmZml4V3JhcHBlclByb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuXG50eXBlIENvbnRhaW5lclByb3BzID0ge1xuXHRkaXNhYmxlZD86IGJvb2xlYW47XG5cdGhpZGVMYWJlbD86IGJvb2xlYW47XG5cdF9fdW5zdGFibGVJbnB1dFdpZHRoPzogQ1NTUHJvcGVydGllc1sgJ3dpZHRoJyBdO1xuXHRsYWJlbFBvc2l0aW9uPzogTGFiZWxQb3NpdGlvbjtcbn07XG5cbmV4cG9ydCBjb25zdCBQcmVmaXggPSBzdHlsZWQuc3BhbmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VmZml4ID0gc3R5bGVkLnNwYW5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGFsaWduLXNlbGY6IHN0cmV0Y2g7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGZsZXg7XG5gO1xuXG50eXBlIEJhY2tkcm9wUHJvcHMgPSB7XG5cdGRpc2FibGVkPzogYm9vbGVhbjtcblx0aXNCb3JkZXJsZXNzPzogYm9vbGVhbjtcbn07XG5cbmNvbnN0IGJhY2tkcm9wQm9yZGVyQ29sb3IgPSAoIHtcblx0ZGlzYWJsZWQsXG5cdGlzQm9yZGVybGVzcyxcbn06IEJhY2tkcm9wUHJvcHMgKTogQ1NTUHJvcGVydGllc1sgJ2JvcmRlckNvbG9yJyBdID0+IHtcblx0aWYgKCBpc0JvcmRlcmxlc3MgKSB7XG5cdFx0cmV0dXJuICd0cmFuc3BhcmVudCc7XG5cdH1cblxuXHRpZiAoIGRpc2FibGVkICkge1xuXHRcdHJldHVybiBDT0xPUlMudWkuYm9yZGVyRGlzYWJsZWQ7XG5cdH1cblxuXHRyZXR1cm4gQ09MT1JTLnVpLmJvcmRlcjtcbn07XG5cbmV4cG9ydCBjb25zdCBCYWNrZHJvcFVJID0gc3R5bGVkLmRpdjwgQmFja2Ryb3BQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyLWNvbG9yOiAkeyBiYWNrZHJvcEJvcmRlckNvbG9yIH07XG5cdFx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0XHRib3JkZXItc3R5bGU6IHNvbGlkO1xuXHRcdGJvcmRlci13aWR0aDogMXB4O1xuXHRcdGJvdHRvbTogMDtcblx0XHRsZWZ0OiAwO1xuXHRcdG1hcmdpbjogMDtcblx0XHRwYWRkaW5nOiAwO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRyaWdodDogMDtcblx0XHR0b3A6IDA7XG5cblx0XHQkeyBydGwoIHsgcGFkZGluZ0xlZnQ6IDIgfSApIH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQoIEZsZXggKWBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0cGFkZGluZy10b3A6IDA7XG5cblx0Ly8gRm9jdXMgd2l0aGluLCBleGNsdWRpbmcgY2FzZXMgd2hlcmUgYXV4aWxpYXJ5IGNvbnRyb2xzIGluIHByZWZpeCBvciBzdWZmaXggaGF2ZSBmb2N1cy5cblx0Jjpmb2N1cy13aXRoaW46bm90KCA6aGFzKCA6aXMoICR7IFByZWZpeCB9LCAkeyBTdWZmaXggfSApOmZvY3VzLXdpdGhpbiApICkge1xuXHRcdCR7IEJhY2tkcm9wVUkgfSB7XG5cdFx0XHRib3JkZXItY29sb3I6ICR7IENPTE9SUy51aS5ib3JkZXJGb2N1cyB9O1xuXHRcdFx0Ym94LXNoYWRvdzogJHsgQ09ORklHLmNvbnRyb2xCb3hTaGFkb3dGb2N1cyB9O1xuXHRcdFx0Ly8gV2luZG93cyBIaWdoIENvbnRyYXN0IG1vZGUgd2lsbCBzaG93IHRoaXMgb3V0bGluZSwgYnV0IG5vdCB0aGUgYm94LXNoYWRvdy5cblx0XHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRcdG91dGxpbmUtb2Zmc2V0OiAtMnB4O1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgY29udGFpbmVyRGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogQ29udGFpbmVyUHJvcHMgKSA9PiB7XG5cdGNvbnN0IGJhY2tncm91bmRDb2xvciA9IGRpc2FibGVkXG5cdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0OiBDT0xPUlMudWkuYmFja2dyb3VuZDtcblxuXHRyZXR1cm4gY3NzKCB7IGJhY2tncm91bmRDb2xvciB9ICk7XG59O1xuXG5jb25zdCBjb250YWluZXJXaWR0aFN0eWxlcyA9ICgge1xuXHRfX3Vuc3RhYmxlSW5wdXRXaWR0aCxcblx0bGFiZWxQb3NpdGlvbixcbn06IENvbnRhaW5lclByb3BzICkgPT4ge1xuXHRpZiAoICEgX191bnN0YWJsZUlucHV0V2lkdGggKSB7XG5cdFx0cmV0dXJuIGNzcyggeyB3aWR0aDogJzEwMCUnIH0gKTtcblx0fVxuXG5cdGlmICggbGFiZWxQb3NpdGlvbiA9PT0gJ3NpZGUnICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdGlmICggbGFiZWxQb3NpdGlvbiA9PT0gJ2VkZ2UnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdGZsZXg6IGAwIDAgJHsgX191bnN0YWJsZUlucHV0V2lkdGggfWAsXG5cdFx0fSApO1xuXHR9XG5cblx0cmV0dXJuIGNzcyggeyB3aWR0aDogX191bnN0YWJsZUlucHV0V2lkdGggfSApO1xufTtcblxuZXhwb3J0IGNvbnN0IENvbnRhaW5lciA9IHN0eWxlZC5kaXY8IENvbnRhaW5lclByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdGRpc3BsYXk6IGZsZXg7XG5cdGZsZXg6IDE7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuXHQkeyBjb250YWluZXJEaXNhYmxlZFN0eWxlcyB9XG5cdCR7IGNvbnRhaW5lcldpZHRoU3R5bGVzIH1cbmA7XG5cbnR5cGUgSW5wdXRQcm9wcyA9IHtcblx0X19uZXh0NDBweERlZmF1bHRTaXplPzogYm9vbGVhbjtcblx0ZGlzYWJsZWQ/OiBib29sZWFuO1xuXHRpbnB1dFNpemU/OiBTaXplO1xuXHRpc0RyYWdnaW5nPzogYm9vbGVhbjtcblx0ZHJhZ0N1cnNvcj86IENTU1Byb3BlcnRpZXNbICdjdXJzb3InIF07XG5cdHBhZGRpbmdJbmxpbmVTdGFydD86IENTU1Byb3BlcnRpZXNbICdwYWRkaW5nSW5saW5lU3RhcnQnIF07XG5cdHBhZGRpbmdJbmxpbmVFbmQ/OiBDU1NQcm9wZXJ0aWVzWyAncGFkZGluZ0lubGluZUVuZCcgXTtcbn07XG5cbmNvbnN0IGRpc2FibGVkU3R5bGVzID0gKCB7IGRpc2FibGVkIH06IElucHV0UHJvcHMgKSA9PiB7XG5cdGlmICggISBkaXNhYmxlZCApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzKCB7XG5cdFx0Y29sb3I6IENPTE9SUy51aS50ZXh0RGlzYWJsZWQsXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBmb250U2l6ZVN0eWxlcyA9ICggeyBpbnB1dFNpemU6IHNpemUgfTogSW5wdXRQcm9wcyApID0+IHtcblx0Y29uc3Qgc2l6ZXMgPSB7XG5cdFx0ZGVmYXVsdDogJzEzcHgnLFxuXHRcdHNtYWxsOiAnMTFweCcsXG5cdFx0Y29tcGFjdDogJzEzcHgnLFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzogJzEzcHgnLFxuXHR9O1xuXG5cdGNvbnN0IGZvbnRTaXplID0gc2l6ZXNbIHNpemUgYXMgU2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG5cdGNvbnN0IGZvbnRTaXplTW9iaWxlID0gJzE2cHgnO1xuXG5cdGlmICggISBmb250U2l6ZSApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdGZvbnQtc2l6ZTogJHsgZm9udFNpemVNb2JpbGUgfTtcblxuXHRcdEBtZWRpYSAoIG1pbi13aWR0aDogNjAwcHggKSB7XG5cdFx0XHRmb250LXNpemU6ICR7IGZvbnRTaXplIH07XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGdldFNpemVDb25maWcgPSAoIHtcblx0aW5wdXRTaXplOiBzaXplLFxuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBJbnB1dFByb3BzICkgPT4ge1xuXHQvLyBQYWRkaW5ncyBtYXkgYmUgb3ZlcnJpZGRlbiBieSB0aGUgY3VzdG9tIHBhZGRpbmdzIHByb3BzLlxuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiB7XG5cdFx0XHRoZWlnaHQ6IDQwLFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogNDAsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHRcdHBhZGRpbmdSaWdodDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHR9LFxuXHRcdHNtYWxsOiB7XG5cdFx0XHRoZWlnaHQ6IDI0LFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogMjQsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0fSxcblx0XHRjb21wYWN0OiB7XG5cdFx0XHRoZWlnaHQ6IDMyLFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogMzIsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0fSxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdH0sXG5cdH07XG5cblx0aWYgKCAhIF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSApIHtcblx0XHRzaXplcy5kZWZhdWx0ID0gc2l6ZXMuY29tcGFjdDtcblx0fVxuXG5cdHJldHVybiBzaXplc1sgc2l6ZSBhcyBTaXplIF0gfHwgc2l6ZXMuZGVmYXVsdDtcbn07XG5cbmNvbnN0IHNpemVTdHlsZXMgPSAoIHByb3BzOiBJbnB1dFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCBnZXRTaXplQ29uZmlnKCBwcm9wcyApICk7XG59O1xuXG5jb25zdCBjdXN0b21QYWRkaW5ncyA9ICgge1xuXHRwYWRkaW5nSW5saW5lU3RhcnQsXG5cdHBhZGRpbmdJbmxpbmVFbmQsXG59OiBJbnB1dFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCB7IHBhZGRpbmdJbmxpbmVTdGFydCwgcGFkZGluZ0lubGluZUVuZCB9ICk7XG59O1xuXG5jb25zdCBkcmFnU3R5bGVzID0gKCB7IGlzRHJhZ2dpbmcsIGRyYWdDdXJzb3IgfTogSW5wdXRQcm9wcyApID0+IHtcblx0bGV0IGRlZmF1bHRBcnJvd1N0eWxlczogU2VyaWFsaXplZFN0eWxlcyB8IHVuZGVmaW5lZDtcblx0bGV0IGFjdGl2ZURyYWdDdXJzb3JTdHlsZXM6IFNlcmlhbGl6ZWRTdHlsZXMgfCB1bmRlZmluZWQ7XG5cblx0aWYgKCBpc0RyYWdnaW5nICkge1xuXHRcdGRlZmF1bHRBcnJvd1N0eWxlcyA9IGNzc2Bcblx0XHRcdGN1cnNvcjogJHsgZHJhZ0N1cnNvciB9O1xuXHRcdFx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cblx0XHRcdCY6Oi13ZWJraXQtb3V0ZXItc3Bpbi1idXR0b24sXG5cdFx0XHQmOjotd2Via2l0LWlubmVyLXNwaW4tYnV0dG9uIHtcblx0XHRcdFx0LXdlYmtpdC1hcHBlYXJhbmNlOiBub25lICFpbXBvcnRhbnQ7XG5cdFx0XHRcdG1hcmdpbjogMCAhaW1wb3J0YW50O1xuXHRcdFx0fVxuXHRcdGA7XG5cdH1cblxuXHRpZiAoIGlzRHJhZ2dpbmcgJiYgZHJhZ0N1cnNvciApIHtcblx0XHRhY3RpdmVEcmFnQ3Vyc29yU3R5bGVzID0gY3NzYFxuXHRcdFx0JjphY3RpdmUge1xuXHRcdFx0XHRjdXJzb3I6ICR7IGRyYWdDdXJzb3IgfTtcblx0XHRcdH1cblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHQkeyBkZWZhdWx0QXJyb3dTdHlsZXMgfVxuXHRcdCR7IGFjdGl2ZURyYWdDdXJzb3JTdHlsZXMgfVxuXHRgO1xufTtcblxuLy8gVE9ETzogUmVzb2x2ZSBuZWVkIHRvIHVzZSAmJiYgdG8gaW5jcmVhc2Ugc3BlY2lmaWNpdHlcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9Xb3JkUHJlc3MvZ3V0ZW5iZXJnL2lzc3Vlcy8xODQ4M1xuXG5leHBvcnQgY29uc3QgSW5wdXQgPSBzdHlsZWQuaW5wdXQ8IElucHV0UHJvcHMgPmBcblx0JiYmIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDtcblx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdGJvcmRlcjogbm9uZTtcblx0XHRib3gtc2hhZG93OiBub25lICFpbXBvcnRhbnQ7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdFx0bWFyZ2luOiAwO1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cblx0XHQkeyBkcmFnU3R5bGVzIH1cblx0XHQkeyBkaXNhYmxlZFN0eWxlcyB9XG5cdFx0JHsgZm9udFNpemVTdHlsZXMgfVxuXHRcdCR7IHNpemVTdHlsZXMgfVxuXHRcdCR7IGN1c3RvbVBhZGRpbmdzIH1cblxuXHRcdCY6Oi13ZWJraXQtaW5wdXQtcGxhY2Vob2xkZXIge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy51aS5kYXJrR3JheVBsYWNlaG9sZGVyIH07XG5cdFx0fVxuXG5cdFx0Jjo6LW1vei1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOi1tcy1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmW3R5cGU9J2VtYWlsJ10sXG5cdFx0Jlt0eXBlPSd1cmwnXSB7XG5cdFx0XHQvKiBydGw6aWdub3JlICovXG5cdFx0XHRkaXJlY3Rpb246IGx0cjtcblx0XHR9XG5cdH1cbmA7XG5cbmNvbnN0IEJhc2VMYWJlbCA9IHN0eWxlZCggVGV4dCApPCB7IGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uIH0gPmBcblx0JiYmIHtcblx0XHQkeyBiYXNlTGFiZWxUeXBvZ3JhcGh5IH07XG5cblx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdHBhZGRpbmctdG9wOiAwO1xuXHRcdHBhZGRpbmctYm90dG9tOiAwO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0XHR6LWluZGV4OiAxO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTGFiZWwgPSAoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczxcblx0XHR7IGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uOyBjaGlsZHJlbjogUmVhY3ROb2RlIH0sXG5cdFx0J2xhYmVsJyxcblx0XHRmYWxzZVxuXHQ+XG4pID0+IDxCYXNlTGFiZWwgeyAuLi5wcm9wcyB9IGFzPVwibGFiZWxcIiAvPjtcblxuZXhwb3J0IGNvbnN0IExhYmVsV3JhcHBlciA9IHN0eWxlZCggRmxleEl0ZW0gKWBcblx0bWF4LXdpZHRoOiBjYWxjKCAxMDAlIC0gMTBweCApO1xuYDtcblxuY29uc3QgcHJlZml4U3VmZml4V3JhcHBlclN0eWxlcyA9ICgge1xuXHR2YXJpYW50ID0gJ2RlZmF1bHQnLFxuXHRzaXplLFxuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdGlzUHJlZml4LFxufTogUHJlZml4U3VmZml4V3JhcHBlclByb3BzICYgeyBpc1ByZWZpeD86IGJvb2xlYW4gfSApID0+IHtcblx0Y29uc3QgeyBwYWRkaW5nTGVmdDogcGFkZGluZyB9ID0gZ2V0U2l6ZUNvbmZpZygge1xuXHRcdGlucHV0U2l6ZTogc2l6ZSxcblx0XHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdH0gKTtcblxuXHRjb25zdCBwYWRkaW5nUHJvcGVydHkgPSBpc1ByZWZpeFxuXHRcdD8gJ3BhZGRpbmdJbmxpbmVTdGFydCdcblx0XHQ6ICdwYWRkaW5nSW5saW5lRW5kJztcblxuXHRpZiAoIHZhcmlhbnQgPT09ICdkZWZhdWx0JyApIHtcblx0XHRyZXR1cm4gY3NzKCB7XG5cdFx0XHRbIHBhZGRpbmdQcm9wZXJ0eSBdOiBwYWRkaW5nLFxuXHRcdH0gKTtcblx0fVxuXG5cdC8vIElmIHZhcmlhbnQgaXMgJ2ljb24nIG9yICdjb250cm9sJ1xuXHRyZXR1cm4gY3NzKCB7XG5cdFx0ZGlzcGxheTogJ2ZsZXgnLFxuXHRcdFsgcGFkZGluZ1Byb3BlcnR5IF06IHBhZGRpbmcgLSA0LFxuXHR9ICk7XG59O1xuXG5leHBvcnQgY29uc3QgUHJlZml4U3VmZml4V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdCR7IHByZWZpeFN1ZmZpeFdyYXBwZXJTdHlsZXMgfVxuYDtcbiJdfQ== */"));
  var Label = (props) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(BaseLabel, {
    ...props,
    as: "label"
  });
  var LabelWrapper = /* @__PURE__ */ createStyled(component_default4, false ? {
    target: "em5sgkm1"
  } : {
    target: "em5sgkm1",
    label: "LabelWrapper"
  })(false ? {
    name: "1b6uupn",
    styles: "max-width:calc( 100% - 10px )"
  } : {
    name: "1b6uupn",
    styles: "max-width:calc( 100% - 10px )/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1VThDIiwiZmlsZSI6ImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgU2VyaWFsaXplZFN0eWxlcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB0eXBlIHsgQ1NTUHJvcGVydGllcywgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzIH0gZnJvbSAnLi4vLi4vY29udGV4dCc7XG5pbXBvcnQgeyBGbGV4LCBGbGV4SXRlbSB9IGZyb20gJy4uLy4uL2ZsZXgnO1xuaW1wb3J0IHsgVGV4dCB9IGZyb20gJy4uLy4uL3RleHQnO1xuaW1wb3J0IHsgYmFzZUxhYmVsVHlwb2dyYXBoeSwgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgTGFiZWxQb3NpdGlvbiwgU2l6ZSwgUHJlZml4U3VmZml4V3JhcHBlclByb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuXG50eXBlIENvbnRhaW5lclByb3BzID0ge1xuXHRkaXNhYmxlZD86IGJvb2xlYW47XG5cdGhpZGVMYWJlbD86IGJvb2xlYW47XG5cdF9fdW5zdGFibGVJbnB1dFdpZHRoPzogQ1NTUHJvcGVydGllc1sgJ3dpZHRoJyBdO1xuXHRsYWJlbFBvc2l0aW9uPzogTGFiZWxQb3NpdGlvbjtcbn07XG5cbmV4cG9ydCBjb25zdCBQcmVmaXggPSBzdHlsZWQuc3BhbmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VmZml4ID0gc3R5bGVkLnNwYW5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGFsaWduLXNlbGY6IHN0cmV0Y2g7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGZsZXg7XG5gO1xuXG50eXBlIEJhY2tkcm9wUHJvcHMgPSB7XG5cdGRpc2FibGVkPzogYm9vbGVhbjtcblx0aXNCb3JkZXJsZXNzPzogYm9vbGVhbjtcbn07XG5cbmNvbnN0IGJhY2tkcm9wQm9yZGVyQ29sb3IgPSAoIHtcblx0ZGlzYWJsZWQsXG5cdGlzQm9yZGVybGVzcyxcbn06IEJhY2tkcm9wUHJvcHMgKTogQ1NTUHJvcGVydGllc1sgJ2JvcmRlckNvbG9yJyBdID0+IHtcblx0aWYgKCBpc0JvcmRlcmxlc3MgKSB7XG5cdFx0cmV0dXJuICd0cmFuc3BhcmVudCc7XG5cdH1cblxuXHRpZiAoIGRpc2FibGVkICkge1xuXHRcdHJldHVybiBDT0xPUlMudWkuYm9yZGVyRGlzYWJsZWQ7XG5cdH1cblxuXHRyZXR1cm4gQ09MT1JTLnVpLmJvcmRlcjtcbn07XG5cbmV4cG9ydCBjb25zdCBCYWNrZHJvcFVJID0gc3R5bGVkLmRpdjwgQmFja2Ryb3BQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyLWNvbG9yOiAkeyBiYWNrZHJvcEJvcmRlckNvbG9yIH07XG5cdFx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0XHRib3JkZXItc3R5bGU6IHNvbGlkO1xuXHRcdGJvcmRlci13aWR0aDogMXB4O1xuXHRcdGJvdHRvbTogMDtcblx0XHRsZWZ0OiAwO1xuXHRcdG1hcmdpbjogMDtcblx0XHRwYWRkaW5nOiAwO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRyaWdodDogMDtcblx0XHR0b3A6IDA7XG5cblx0XHQkeyBydGwoIHsgcGFkZGluZ0xlZnQ6IDIgfSApIH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQoIEZsZXggKWBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0cGFkZGluZy10b3A6IDA7XG5cblx0Ly8gRm9jdXMgd2l0aGluLCBleGNsdWRpbmcgY2FzZXMgd2hlcmUgYXV4aWxpYXJ5IGNvbnRyb2xzIGluIHByZWZpeCBvciBzdWZmaXggaGF2ZSBmb2N1cy5cblx0Jjpmb2N1cy13aXRoaW46bm90KCA6aGFzKCA6aXMoICR7IFByZWZpeCB9LCAkeyBTdWZmaXggfSApOmZvY3VzLXdpdGhpbiApICkge1xuXHRcdCR7IEJhY2tkcm9wVUkgfSB7XG5cdFx0XHRib3JkZXItY29sb3I6ICR7IENPTE9SUy51aS5ib3JkZXJGb2N1cyB9O1xuXHRcdFx0Ym94LXNoYWRvdzogJHsgQ09ORklHLmNvbnRyb2xCb3hTaGFkb3dGb2N1cyB9O1xuXHRcdFx0Ly8gV2luZG93cyBIaWdoIENvbnRyYXN0IG1vZGUgd2lsbCBzaG93IHRoaXMgb3V0bGluZSwgYnV0IG5vdCB0aGUgYm94LXNoYWRvdy5cblx0XHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRcdG91dGxpbmUtb2Zmc2V0OiAtMnB4O1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgY29udGFpbmVyRGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogQ29udGFpbmVyUHJvcHMgKSA9PiB7XG5cdGNvbnN0IGJhY2tncm91bmRDb2xvciA9IGRpc2FibGVkXG5cdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0OiBDT0xPUlMudWkuYmFja2dyb3VuZDtcblxuXHRyZXR1cm4gY3NzKCB7IGJhY2tncm91bmRDb2xvciB9ICk7XG59O1xuXG5jb25zdCBjb250YWluZXJXaWR0aFN0eWxlcyA9ICgge1xuXHRfX3Vuc3RhYmxlSW5wdXRXaWR0aCxcblx0bGFiZWxQb3NpdGlvbixcbn06IENvbnRhaW5lclByb3BzICkgPT4ge1xuXHRpZiAoICEgX191bnN0YWJsZUlucHV0V2lkdGggKSB7XG5cdFx0cmV0dXJuIGNzcyggeyB3aWR0aDogJzEwMCUnIH0gKTtcblx0fVxuXG5cdGlmICggbGFiZWxQb3NpdGlvbiA9PT0gJ3NpZGUnICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdGlmICggbGFiZWxQb3NpdGlvbiA9PT0gJ2VkZ2UnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdGZsZXg6IGAwIDAgJHsgX191bnN0YWJsZUlucHV0V2lkdGggfWAsXG5cdFx0fSApO1xuXHR9XG5cblx0cmV0dXJuIGNzcyggeyB3aWR0aDogX191bnN0YWJsZUlucHV0V2lkdGggfSApO1xufTtcblxuZXhwb3J0IGNvbnN0IENvbnRhaW5lciA9IHN0eWxlZC5kaXY8IENvbnRhaW5lclByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdGRpc3BsYXk6IGZsZXg7XG5cdGZsZXg6IDE7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuXHQkeyBjb250YWluZXJEaXNhYmxlZFN0eWxlcyB9XG5cdCR7IGNvbnRhaW5lcldpZHRoU3R5bGVzIH1cbmA7XG5cbnR5cGUgSW5wdXRQcm9wcyA9IHtcblx0X19uZXh0NDBweERlZmF1bHRTaXplPzogYm9vbGVhbjtcblx0ZGlzYWJsZWQ/OiBib29sZWFuO1xuXHRpbnB1dFNpemU/OiBTaXplO1xuXHRpc0RyYWdnaW5nPzogYm9vbGVhbjtcblx0ZHJhZ0N1cnNvcj86IENTU1Byb3BlcnRpZXNbICdjdXJzb3InIF07XG5cdHBhZGRpbmdJbmxpbmVTdGFydD86IENTU1Byb3BlcnRpZXNbICdwYWRkaW5nSW5saW5lU3RhcnQnIF07XG5cdHBhZGRpbmdJbmxpbmVFbmQ/OiBDU1NQcm9wZXJ0aWVzWyAncGFkZGluZ0lubGluZUVuZCcgXTtcbn07XG5cbmNvbnN0IGRpc2FibGVkU3R5bGVzID0gKCB7IGRpc2FibGVkIH06IElucHV0UHJvcHMgKSA9PiB7XG5cdGlmICggISBkaXNhYmxlZCApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzKCB7XG5cdFx0Y29sb3I6IENPTE9SUy51aS50ZXh0RGlzYWJsZWQsXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBmb250U2l6ZVN0eWxlcyA9ICggeyBpbnB1dFNpemU6IHNpemUgfTogSW5wdXRQcm9wcyApID0+IHtcblx0Y29uc3Qgc2l6ZXMgPSB7XG5cdFx0ZGVmYXVsdDogJzEzcHgnLFxuXHRcdHNtYWxsOiAnMTFweCcsXG5cdFx0Y29tcGFjdDogJzEzcHgnLFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzogJzEzcHgnLFxuXHR9O1xuXG5cdGNvbnN0IGZvbnRTaXplID0gc2l6ZXNbIHNpemUgYXMgU2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG5cdGNvbnN0IGZvbnRTaXplTW9iaWxlID0gJzE2cHgnO1xuXG5cdGlmICggISBmb250U2l6ZSApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdGZvbnQtc2l6ZTogJHsgZm9udFNpemVNb2JpbGUgfTtcblxuXHRcdEBtZWRpYSAoIG1pbi13aWR0aDogNjAwcHggKSB7XG5cdFx0XHRmb250LXNpemU6ICR7IGZvbnRTaXplIH07XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGdldFNpemVDb25maWcgPSAoIHtcblx0aW5wdXRTaXplOiBzaXplLFxuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBJbnB1dFByb3BzICkgPT4ge1xuXHQvLyBQYWRkaW5ncyBtYXkgYmUgb3ZlcnJpZGRlbiBieSB0aGUgY3VzdG9tIHBhZGRpbmdzIHByb3BzLlxuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiB7XG5cdFx0XHRoZWlnaHQ6IDQwLFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogNDAsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHRcdHBhZGRpbmdSaWdodDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHR9LFxuXHRcdHNtYWxsOiB7XG5cdFx0XHRoZWlnaHQ6IDI0LFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogMjQsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0fSxcblx0XHRjb21wYWN0OiB7XG5cdFx0XHRoZWlnaHQ6IDMyLFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogMzIsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0fSxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdH0sXG5cdH07XG5cblx0aWYgKCAhIF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSApIHtcblx0XHRzaXplcy5kZWZhdWx0ID0gc2l6ZXMuY29tcGFjdDtcblx0fVxuXG5cdHJldHVybiBzaXplc1sgc2l6ZSBhcyBTaXplIF0gfHwgc2l6ZXMuZGVmYXVsdDtcbn07XG5cbmNvbnN0IHNpemVTdHlsZXMgPSAoIHByb3BzOiBJbnB1dFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCBnZXRTaXplQ29uZmlnKCBwcm9wcyApICk7XG59O1xuXG5jb25zdCBjdXN0b21QYWRkaW5ncyA9ICgge1xuXHRwYWRkaW5nSW5saW5lU3RhcnQsXG5cdHBhZGRpbmdJbmxpbmVFbmQsXG59OiBJbnB1dFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCB7IHBhZGRpbmdJbmxpbmVTdGFydCwgcGFkZGluZ0lubGluZUVuZCB9ICk7XG59O1xuXG5jb25zdCBkcmFnU3R5bGVzID0gKCB7IGlzRHJhZ2dpbmcsIGRyYWdDdXJzb3IgfTogSW5wdXRQcm9wcyApID0+IHtcblx0bGV0IGRlZmF1bHRBcnJvd1N0eWxlczogU2VyaWFsaXplZFN0eWxlcyB8IHVuZGVmaW5lZDtcblx0bGV0IGFjdGl2ZURyYWdDdXJzb3JTdHlsZXM6IFNlcmlhbGl6ZWRTdHlsZXMgfCB1bmRlZmluZWQ7XG5cblx0aWYgKCBpc0RyYWdnaW5nICkge1xuXHRcdGRlZmF1bHRBcnJvd1N0eWxlcyA9IGNzc2Bcblx0XHRcdGN1cnNvcjogJHsgZHJhZ0N1cnNvciB9O1xuXHRcdFx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cblx0XHRcdCY6Oi13ZWJraXQtb3V0ZXItc3Bpbi1idXR0b24sXG5cdFx0XHQmOjotd2Via2l0LWlubmVyLXNwaW4tYnV0dG9uIHtcblx0XHRcdFx0LXdlYmtpdC1hcHBlYXJhbmNlOiBub25lICFpbXBvcnRhbnQ7XG5cdFx0XHRcdG1hcmdpbjogMCAhaW1wb3J0YW50O1xuXHRcdFx0fVxuXHRcdGA7XG5cdH1cblxuXHRpZiAoIGlzRHJhZ2dpbmcgJiYgZHJhZ0N1cnNvciApIHtcblx0XHRhY3RpdmVEcmFnQ3Vyc29yU3R5bGVzID0gY3NzYFxuXHRcdFx0JjphY3RpdmUge1xuXHRcdFx0XHRjdXJzb3I6ICR7IGRyYWdDdXJzb3IgfTtcblx0XHRcdH1cblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHQkeyBkZWZhdWx0QXJyb3dTdHlsZXMgfVxuXHRcdCR7IGFjdGl2ZURyYWdDdXJzb3JTdHlsZXMgfVxuXHRgO1xufTtcblxuLy8gVE9ETzogUmVzb2x2ZSBuZWVkIHRvIHVzZSAmJiYgdG8gaW5jcmVhc2Ugc3BlY2lmaWNpdHlcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9Xb3JkUHJlc3MvZ3V0ZW5iZXJnL2lzc3Vlcy8xODQ4M1xuXG5leHBvcnQgY29uc3QgSW5wdXQgPSBzdHlsZWQuaW5wdXQ8IElucHV0UHJvcHMgPmBcblx0JiYmIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDtcblx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdGJvcmRlcjogbm9uZTtcblx0XHRib3gtc2hhZG93OiBub25lICFpbXBvcnRhbnQ7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdFx0bWFyZ2luOiAwO1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cblx0XHQkeyBkcmFnU3R5bGVzIH1cblx0XHQkeyBkaXNhYmxlZFN0eWxlcyB9XG5cdFx0JHsgZm9udFNpemVTdHlsZXMgfVxuXHRcdCR7IHNpemVTdHlsZXMgfVxuXHRcdCR7IGN1c3RvbVBhZGRpbmdzIH1cblxuXHRcdCY6Oi13ZWJraXQtaW5wdXQtcGxhY2Vob2xkZXIge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy51aS5kYXJrR3JheVBsYWNlaG9sZGVyIH07XG5cdFx0fVxuXG5cdFx0Jjo6LW1vei1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOi1tcy1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmW3R5cGU9J2VtYWlsJ10sXG5cdFx0Jlt0eXBlPSd1cmwnXSB7XG5cdFx0XHQvKiBydGw6aWdub3JlICovXG5cdFx0XHRkaXJlY3Rpb246IGx0cjtcblx0XHR9XG5cdH1cbmA7XG5cbmNvbnN0IEJhc2VMYWJlbCA9IHN0eWxlZCggVGV4dCApPCB7IGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uIH0gPmBcblx0JiYmIHtcblx0XHQkeyBiYXNlTGFiZWxUeXBvZ3JhcGh5IH07XG5cblx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdHBhZGRpbmctdG9wOiAwO1xuXHRcdHBhZGRpbmctYm90dG9tOiAwO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0XHR6LWluZGV4OiAxO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTGFiZWwgPSAoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczxcblx0XHR7IGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uOyBjaGlsZHJlbjogUmVhY3ROb2RlIH0sXG5cdFx0J2xhYmVsJyxcblx0XHRmYWxzZVxuXHQ+XG4pID0+IDxCYXNlTGFiZWwgeyAuLi5wcm9wcyB9IGFzPVwibGFiZWxcIiAvPjtcblxuZXhwb3J0IGNvbnN0IExhYmVsV3JhcHBlciA9IHN0eWxlZCggRmxleEl0ZW0gKWBcblx0bWF4LXdpZHRoOiBjYWxjKCAxMDAlIC0gMTBweCApO1xuYDtcblxuY29uc3QgcHJlZml4U3VmZml4V3JhcHBlclN0eWxlcyA9ICgge1xuXHR2YXJpYW50ID0gJ2RlZmF1bHQnLFxuXHRzaXplLFxuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdGlzUHJlZml4LFxufTogUHJlZml4U3VmZml4V3JhcHBlclByb3BzICYgeyBpc1ByZWZpeD86IGJvb2xlYW4gfSApID0+IHtcblx0Y29uc3QgeyBwYWRkaW5nTGVmdDogcGFkZGluZyB9ID0gZ2V0U2l6ZUNvbmZpZygge1xuXHRcdGlucHV0U2l6ZTogc2l6ZSxcblx0XHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdH0gKTtcblxuXHRjb25zdCBwYWRkaW5nUHJvcGVydHkgPSBpc1ByZWZpeFxuXHRcdD8gJ3BhZGRpbmdJbmxpbmVTdGFydCdcblx0XHQ6ICdwYWRkaW5nSW5saW5lRW5kJztcblxuXHRpZiAoIHZhcmlhbnQgPT09ICdkZWZhdWx0JyApIHtcblx0XHRyZXR1cm4gY3NzKCB7XG5cdFx0XHRbIHBhZGRpbmdQcm9wZXJ0eSBdOiBwYWRkaW5nLFxuXHRcdH0gKTtcblx0fVxuXG5cdC8vIElmIHZhcmlhbnQgaXMgJ2ljb24nIG9yICdjb250cm9sJ1xuXHRyZXR1cm4gY3NzKCB7XG5cdFx0ZGlzcGxheTogJ2ZsZXgnLFxuXHRcdFsgcGFkZGluZ1Byb3BlcnR5IF06IHBhZGRpbmcgLSA0LFxuXHR9ICk7XG59O1xuXG5leHBvcnQgY29uc3QgUHJlZml4U3VmZml4V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdCR7IHByZWZpeFN1ZmZpeFdyYXBwZXJTdHlsZXMgfVxuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__6
  });
  var prefixSuffixWrapperStyles = ({
    variant = "default",
    size: size3,
    __next40pxDefaultSize,
    isPrefix
  }) => {
    const {
      paddingLeft: padding2
    } = getSizeConfig({
      inputSize: size3,
      __next40pxDefaultSize
    });
    const paddingProperty = isPrefix ? "paddingInlineStart" : "paddingInlineEnd";
    if (variant === "default") {
      return /* @__PURE__ */ css({
        [paddingProperty]: padding2
      }, false ? "" : ";label:prefixSuffixWrapperStyles;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyVlMiLCJmaWxlIjoiaW5wdXQtY29udHJvbC1zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHR5cGUgeyBDU1NQcm9wZXJ0aWVzLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi8uLi9jb250ZXh0JztcbmltcG9ydCB7IEZsZXgsIEZsZXhJdGVtIH0gZnJvbSAnLi4vLi4vZmxleCc7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vdGV4dCc7XG5pbXBvcnQgeyBiYXNlTGFiZWxUeXBvZ3JhcGh5LCBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHR5cGUgeyBMYWJlbFBvc2l0aW9uLCBTaXplLCBQcmVmaXhTdWZmaXhXcmFwcGVyUHJvcHMgfSBmcm9tICcuLi90eXBlcyc7XG5cbnR5cGUgQ29udGFpbmVyUHJvcHMgPSB7XG5cdGRpc2FibGVkPzogYm9vbGVhbjtcblx0aGlkZUxhYmVsPzogYm9vbGVhbjtcblx0X191bnN0YWJsZUlucHV0V2lkdGg/OiBDU1NQcm9wZXJ0aWVzWyAnd2lkdGgnIF07XG5cdGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uO1xufTtcblxuZXhwb3J0IGNvbnN0IFByZWZpeCA9IHN0eWxlZC5zcGFuYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBTdWZmaXggPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0YWxpZ24tc2VsZjogc3RyZXRjaDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbnR5cGUgQmFja2Ryb3BQcm9wcyA9IHtcblx0ZGlzYWJsZWQ/OiBib29sZWFuO1xuXHRpc0JvcmRlcmxlc3M/OiBib29sZWFuO1xufTtcblxuY29uc3QgYmFja2Ryb3BCb3JkZXJDb2xvciA9ICgge1xuXHRkaXNhYmxlZCxcblx0aXNCb3JkZXJsZXNzLFxufTogQmFja2Ryb3BQcm9wcyApOiBDU1NQcm9wZXJ0aWVzWyAnYm9yZGVyQ29sb3InIF0gPT4ge1xuXHRpZiAoIGlzQm9yZGVybGVzcyApIHtcblx0XHRyZXR1cm4gJ3RyYW5zcGFyZW50Jztcblx0fVxuXG5cdGlmICggZGlzYWJsZWQgKSB7XG5cdFx0cmV0dXJuIENPTE9SUy51aS5ib3JkZXJEaXNhYmxlZDtcblx0fVxuXG5cdHJldHVybiBDT0xPUlMudWkuYm9yZGVyO1xufTtcblxuZXhwb3J0IGNvbnN0IEJhY2tkcm9wVUkgPSBzdHlsZWQuZGl2PCBCYWNrZHJvcFByb3BzID5gXG5cdCYmJiB7XG5cdFx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0XHRib3JkZXItY29sb3I6ICR7IGJhY2tkcm9wQm9yZGVyQ29sb3IgfTtcblx0XHRib3JkZXItcmFkaXVzOiBpbmhlcml0O1xuXHRcdGJvcmRlci1zdHlsZTogc29saWQ7XG5cdFx0Ym9yZGVyLXdpZHRoOiAxcHg7XG5cdFx0Ym90dG9tOiAwO1xuXHRcdGxlZnQ6IDA7XG5cdFx0bWFyZ2luOiAwO1xuXHRcdHBhZGRpbmc6IDA7XG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdHJpZ2h0OiAwO1xuXHRcdHRvcDogMDtcblxuXHRcdCR7IHJ0bCggeyBwYWRkaW5nTGVmdDogMiB9ICkgfVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgUm9vdCA9IHN0eWxlZCggRmxleCApYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRwYWRkaW5nLXRvcDogMDtcblxuXHQvLyBGb2N1cyB3aXRoaW4sIGV4Y2x1ZGluZyBjYXNlcyB3aGVyZSBhdXhpbGlhcnkgY29udHJvbHMgaW4gcHJlZml4IG9yIHN1ZmZpeCBoYXZlIGZvY3VzLlxuXHQmOmZvY3VzLXdpdGhpbjpub3QoIDpoYXMoIDppcyggJHsgUHJlZml4IH0sICR7IFN1ZmZpeCB9ICk6Zm9jdXMtd2l0aGluICkgKSB7XG5cdFx0JHsgQmFja2Ryb3BVSSB9IHtcblx0XHRcdGJvcmRlci1jb2xvcjogJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRib3gtc2hhZG93OiAkeyBDT05GSUcuY29udHJvbEJveFNoYWRvd0ZvY3VzIH07XG5cdFx0XHQvLyBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSB3aWxsIHNob3cgdGhpcyBvdXRsaW5lLCBidXQgbm90IHRoZSBib3gtc2hhZG93LlxuXHRcdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdFx0b3V0bGluZS1vZmZzZXQ6IC0ycHg7XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBjb250YWluZXJEaXNhYmxlZFN0eWxlcyA9ICggeyBkaXNhYmxlZCB9OiBDb250YWluZXJQcm9wcyApID0+IHtcblx0Y29uc3QgYmFja2dyb3VuZENvbG9yID0gZGlzYWJsZWRcblx0XHQ/IENPTE9SUy51aS5iYWNrZ3JvdW5kRGlzYWJsZWRcblx0XHQ6IENPTE9SUy51aS5iYWNrZ3JvdW5kO1xuXG5cdHJldHVybiBjc3MoIHsgYmFja2dyb3VuZENvbG9yIH0gKTtcbn07XG5cbmNvbnN0IGNvbnRhaW5lcldpZHRoU3R5bGVzID0gKCB7XG5cdF9fdW5zdGFibGVJbnB1dFdpZHRoLFxuXHRsYWJlbFBvc2l0aW9uLFxufTogQ29udGFpbmVyUHJvcHMgKSA9PiB7XG5cdGlmICggISBfX3Vuc3RhYmxlSW5wdXRXaWR0aCApIHtcblx0XHRyZXR1cm4gY3NzKCB7IHdpZHRoOiAnMTAwJScgfSApO1xuXHR9XG5cblx0aWYgKCBsYWJlbFBvc2l0aW9uID09PSAnc2lkZScgKSB7XG5cdFx0cmV0dXJuICcnO1xuXHR9XG5cblx0aWYgKCBsYWJlbFBvc2l0aW9uID09PSAnZWRnZScgKSB7XG5cdFx0cmV0dXJuIGNzcygge1xuXHRcdFx0ZmxleDogYDAgMCAkeyBfX3Vuc3RhYmxlSW5wdXRXaWR0aCB9YCxcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4gY3NzKCB7IHdpZHRoOiBfX3Vuc3RhYmxlSW5wdXRXaWR0aCB9ICk7XG59O1xuXG5leHBvcnQgY29uc3QgQ29udGFpbmVyID0gc3R5bGVkLmRpdjwgQ29udGFpbmVyUHJvcHMgPmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleDogMTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXG5cdCR7IGNvbnRhaW5lckRpc2FibGVkU3R5bGVzIH1cblx0JHsgY29udGFpbmVyV2lkdGhTdHlsZXMgfVxuYDtcblxudHlwZSBJbnB1dFByb3BzID0ge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemU/OiBib29sZWFuO1xuXHRkaXNhYmxlZD86IGJvb2xlYW47XG5cdGlucHV0U2l6ZT86IFNpemU7XG5cdGlzRHJhZ2dpbmc/OiBib29sZWFuO1xuXHRkcmFnQ3Vyc29yPzogQ1NTUHJvcGVydGllc1sgJ2N1cnNvcicgXTtcblx0cGFkZGluZ0lubGluZVN0YXJ0PzogQ1NTUHJvcGVydGllc1sgJ3BhZGRpbmdJbmxpbmVTdGFydCcgXTtcblx0cGFkZGluZ0lubGluZUVuZD86IENTU1Byb3BlcnRpZXNbICdwYWRkaW5nSW5saW5lRW5kJyBdO1xufTtcblxuY29uc3QgZGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogSW5wdXRQcm9wcyApID0+IHtcblx0aWYgKCAhIGRpc2FibGVkICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogQ09MT1JTLnVpLnRleHREaXNhYmxlZCxcblx0fSApO1xufTtcblxuZXhwb3J0IGNvbnN0IGZvbnRTaXplU3R5bGVzID0gKCB7IGlucHV0U2l6ZTogc2l6ZSB9OiBJbnB1dFByb3BzICkgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiAnMTNweCcsXG5cdFx0c21hbGw6ICcxMXB4Jyxcblx0XHRjb21wYWN0OiAnMTNweCcsXG5cdFx0J19fdW5zdGFibGUtbGFyZ2UnOiAnMTNweCcsXG5cdH07XG5cblx0Y29uc3QgZm9udFNpemUgPSBzaXplc1sgc2l6ZSBhcyBTaXplIF0gfHwgc2l6ZXMuZGVmYXVsdDtcblx0Y29uc3QgZm9udFNpemVNb2JpbGUgPSAnMTZweCc7XG5cblx0aWYgKCAhIGZvbnRTaXplICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdHJldHVybiBjc3NgXG5cdFx0Zm9udC1zaXplOiAkeyBmb250U2l6ZU1vYmlsZSB9O1xuXG5cdFx0QG1lZGlhICggbWluLXdpZHRoOiA2MDBweCApIHtcblx0XHRcdGZvbnQtc2l6ZTogJHsgZm9udFNpemUgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgZ2V0U2l6ZUNvbmZpZyA9ICgge1xuXHRpbnB1dFNpemU6IHNpemUsXG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcbn06IElucHV0UHJvcHMgKSA9PiB7XG5cdC8vIFBhZGRpbmdzIG1heSBiZSBvdmVycmlkZGVuIGJ5IHRoZSBjdXN0b20gcGFkZGluZ3MgcHJvcHMuXG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdH0sXG5cdFx0c21hbGw6IHtcblx0XHRcdGhlaWdodDogMjQsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiAyNCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHR9LFxuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdGhlaWdodDogMzIsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiAzMixcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHR9LFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzoge1xuXHRcdFx0aGVpZ2h0OiA0MCxcblx0XHRcdGxpbmVIZWlnaHQ6IDEsXG5cdFx0XHRtaW5IZWlnaHQ6IDQwLFxuXHRcdFx0cGFkZGluZ0xlZnQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdFx0fSxcblx0fTtcblxuXHRpZiAoICEgX19uZXh0NDBweERlZmF1bHRTaXplICkge1xuXHRcdHNpemVzLmRlZmF1bHQgPSBzaXplcy5jb21wYWN0O1xuXHR9XG5cblx0cmV0dXJuIHNpemVzWyBzaXplIGFzIFNpemUgXSB8fCBzaXplcy5kZWZhdWx0O1xufTtcblxuY29uc3Qgc2l6ZVN0eWxlcyA9ICggcHJvcHM6IElucHV0UHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIGdldFNpemVDb25maWcoIHByb3BzICkgKTtcbn07XG5cbmNvbnN0IGN1c3RvbVBhZGRpbmdzID0gKCB7XG5cdHBhZGRpbmdJbmxpbmVTdGFydCxcblx0cGFkZGluZ0lubGluZUVuZCxcbn06IElucHV0UHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHsgcGFkZGluZ0lubGluZVN0YXJ0LCBwYWRkaW5nSW5saW5lRW5kIH0gKTtcbn07XG5cbmNvbnN0IGRyYWdTdHlsZXMgPSAoIHsgaXNEcmFnZ2luZywgZHJhZ0N1cnNvciB9OiBJbnB1dFByb3BzICkgPT4ge1xuXHRsZXQgZGVmYXVsdEFycm93U3R5bGVzOiBTZXJpYWxpemVkU3R5bGVzIHwgdW5kZWZpbmVkO1xuXHRsZXQgYWN0aXZlRHJhZ0N1cnNvclN0eWxlczogU2VyaWFsaXplZFN0eWxlcyB8IHVuZGVmaW5lZDtcblxuXHRpZiAoIGlzRHJhZ2dpbmcgKSB7XG5cdFx0ZGVmYXVsdEFycm93U3R5bGVzID0gY3NzYFxuXHRcdFx0Y3Vyc29yOiAkeyBkcmFnQ3Vyc29yIH07XG5cdFx0XHR1c2VyLXNlbGVjdDogbm9uZTtcblxuXHRcdFx0Jjo6LXdlYmtpdC1vdXRlci1zcGluLWJ1dHRvbixcblx0XHRcdCY6Oi13ZWJraXQtaW5uZXItc3Bpbi1idXR0b24ge1xuXHRcdFx0XHQtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmUgIWltcG9ydGFudDtcblx0XHRcdFx0bWFyZ2luOiAwICFpbXBvcnRhbnQ7XG5cdFx0XHR9XG5cdFx0YDtcblx0fVxuXG5cdGlmICggaXNEcmFnZ2luZyAmJiBkcmFnQ3Vyc29yICkge1xuXHRcdGFjdGl2ZURyYWdDdXJzb3JTdHlsZXMgPSBjc3NgXG5cdFx0XHQmOmFjdGl2ZSB7XG5cdFx0XHRcdGN1cnNvcjogJHsgZHJhZ0N1cnNvciB9O1xuXHRcdFx0fVxuXHRcdGA7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdCR7IGRlZmF1bHRBcnJvd1N0eWxlcyB9XG5cdFx0JHsgYWN0aXZlRHJhZ0N1cnNvclN0eWxlcyB9XG5cdGA7XG59O1xuXG4vLyBUT0RPOiBSZXNvbHZlIG5lZWQgdG8gdXNlICYmJiB0byBpbmNyZWFzZSBzcGVjaWZpY2l0eVxuLy8gaHR0cHM6Ly9naXRodWIuY29tL1dvcmRQcmVzcy9ndXRlbmJlcmcvaXNzdWVzLzE4NDgzXG5cbmV4cG9ydCBjb25zdCBJbnB1dCA9IHN0eWxlZC5pbnB1dDwgSW5wdXRQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyOiBub25lO1xuXHRcdGJveC1zaGFkb3c6IG5vbmUgIWltcG9ydGFudDtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRmb250LWZhbWlseTogaW5oZXJpdDtcblx0XHRtYXJnaW46IDA7XG5cdFx0b3V0bGluZTogbm9uZTtcblx0XHR3aWR0aDogMTAwJTtcblxuXHRcdCR7IGRyYWdTdHlsZXMgfVxuXHRcdCR7IGRpc2FibGVkU3R5bGVzIH1cblx0XHQkeyBmb250U2l6ZVN0eWxlcyB9XG5cdFx0JHsgc2l6ZVN0eWxlcyB9XG5cdFx0JHsgY3VzdG9tUGFkZGluZ3MgfVxuXG5cdFx0Jjo6LXdlYmtpdC1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOjotbW96LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblxuXHRcdCY6LW1zLWlucHV0LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblxuXHRcdCZbdHlwZT0nZW1haWwnXSxcblx0XHQmW3R5cGU9J3VybCddIHtcblx0XHRcdC8qIHJ0bDppZ25vcmUgKi9cblx0XHRcdGRpcmVjdGlvbjogbHRyO1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgQmFzZUxhYmVsID0gc3R5bGVkKCBUZXh0ICk8IHsgbGFiZWxQb3NpdGlvbj86IExhYmVsUG9zaXRpb24gfSA+YFxuXHQmJiYge1xuXHRcdCR7IGJhc2VMYWJlbFR5cG9ncmFwaHkgfTtcblxuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0cGFkZGluZy10b3A6IDA7XG5cdFx0cGFkZGluZy1ib3R0b206IDA7XG5cdFx0bWF4LXdpZHRoOiAxMDAlO1xuXHRcdHotaW5kZXg6IDE7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBMYWJlbCA9IChcblx0cHJvcHM6IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzPFxuXHRcdHsgbGFiZWxQb3NpdGlvbj86IExhYmVsUG9zaXRpb247IGNoaWxkcmVuOiBSZWFjdE5vZGUgfSxcblx0XHQnbGFiZWwnLFxuXHRcdGZhbHNlXG5cdD5cbikgPT4gPEJhc2VMYWJlbCB7IC4uLnByb3BzIH0gYXM9XCJsYWJlbFwiIC8+O1xuXG5leHBvcnQgY29uc3QgTGFiZWxXcmFwcGVyID0gc3R5bGVkKCBGbGV4SXRlbSApYFxuXHRtYXgtd2lkdGg6IGNhbGMoIDEwMCUgLSAxMHB4ICk7XG5gO1xuXG5jb25zdCBwcmVmaXhTdWZmaXhXcmFwcGVyU3R5bGVzID0gKCB7XG5cdHZhcmlhbnQgPSAnZGVmYXVsdCcsXG5cdHNpemUsXG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0aXNQcmVmaXgsXG59OiBQcmVmaXhTdWZmaXhXcmFwcGVyUHJvcHMgJiB7IGlzUHJlZml4PzogYm9vbGVhbiB9ICkgPT4ge1xuXHRjb25zdCB7IHBhZGRpbmdMZWZ0OiBwYWRkaW5nIH0gPSBnZXRTaXplQ29uZmlnKCB7XG5cdFx0aW5wdXRTaXplOiBzaXplLFxuXHRcdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0fSApO1xuXG5cdGNvbnN0IHBhZGRpbmdQcm9wZXJ0eSA9IGlzUHJlZml4XG5cdFx0PyAncGFkZGluZ0lubGluZVN0YXJ0J1xuXHRcdDogJ3BhZGRpbmdJbmxpbmVFbmQnO1xuXG5cdGlmICggdmFyaWFudCA9PT0gJ2RlZmF1bHQnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdFsgcGFkZGluZ1Byb3BlcnR5IF06IHBhZGRpbmcsXG5cdFx0fSApO1xuXHR9XG5cblx0Ly8gSWYgdmFyaWFudCBpcyAnaWNvbicgb3IgJ2NvbnRyb2wnXG5cdHJldHVybiBjc3MoIHtcblx0XHRkaXNwbGF5OiAnZmxleCcsXG5cdFx0WyBwYWRkaW5nUHJvcGVydHkgXTogcGFkZGluZyAtIDQsXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBQcmVmaXhTdWZmaXhXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0JHsgcHJlZml4U3VmZml4V3JhcHBlclN0eWxlcyB9XG5gO1xuIl19 */");
    }
    return /* @__PURE__ */ css({
      display: "flex",
      [paddingProperty]: padding2 - 4
    }, false ? "" : ";label:prefixSuffixWrapperStyles;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpV1EiLCJmaWxlIjoiaW5wdXQtY29udHJvbC1zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHR5cGUgeyBDU1NQcm9wZXJ0aWVzLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi8uLi9jb250ZXh0JztcbmltcG9ydCB7IEZsZXgsIEZsZXhJdGVtIH0gZnJvbSAnLi4vLi4vZmxleCc7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vdGV4dCc7XG5pbXBvcnQgeyBiYXNlTGFiZWxUeXBvZ3JhcGh5LCBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHR5cGUgeyBMYWJlbFBvc2l0aW9uLCBTaXplLCBQcmVmaXhTdWZmaXhXcmFwcGVyUHJvcHMgfSBmcm9tICcuLi90eXBlcyc7XG5cbnR5cGUgQ29udGFpbmVyUHJvcHMgPSB7XG5cdGRpc2FibGVkPzogYm9vbGVhbjtcblx0aGlkZUxhYmVsPzogYm9vbGVhbjtcblx0X191bnN0YWJsZUlucHV0V2lkdGg/OiBDU1NQcm9wZXJ0aWVzWyAnd2lkdGgnIF07XG5cdGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uO1xufTtcblxuZXhwb3J0IGNvbnN0IFByZWZpeCA9IHN0eWxlZC5zcGFuYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBTdWZmaXggPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0YWxpZ24tc2VsZjogc3RyZXRjaDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbnR5cGUgQmFja2Ryb3BQcm9wcyA9IHtcblx0ZGlzYWJsZWQ/OiBib29sZWFuO1xuXHRpc0JvcmRlcmxlc3M/OiBib29sZWFuO1xufTtcblxuY29uc3QgYmFja2Ryb3BCb3JkZXJDb2xvciA9ICgge1xuXHRkaXNhYmxlZCxcblx0aXNCb3JkZXJsZXNzLFxufTogQmFja2Ryb3BQcm9wcyApOiBDU1NQcm9wZXJ0aWVzWyAnYm9yZGVyQ29sb3InIF0gPT4ge1xuXHRpZiAoIGlzQm9yZGVybGVzcyApIHtcblx0XHRyZXR1cm4gJ3RyYW5zcGFyZW50Jztcblx0fVxuXG5cdGlmICggZGlzYWJsZWQgKSB7XG5cdFx0cmV0dXJuIENPTE9SUy51aS5ib3JkZXJEaXNhYmxlZDtcblx0fVxuXG5cdHJldHVybiBDT0xPUlMudWkuYm9yZGVyO1xufTtcblxuZXhwb3J0IGNvbnN0IEJhY2tkcm9wVUkgPSBzdHlsZWQuZGl2PCBCYWNrZHJvcFByb3BzID5gXG5cdCYmJiB7XG5cdFx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0XHRib3JkZXItY29sb3I6ICR7IGJhY2tkcm9wQm9yZGVyQ29sb3IgfTtcblx0XHRib3JkZXItcmFkaXVzOiBpbmhlcml0O1xuXHRcdGJvcmRlci1zdHlsZTogc29saWQ7XG5cdFx0Ym9yZGVyLXdpZHRoOiAxcHg7XG5cdFx0Ym90dG9tOiAwO1xuXHRcdGxlZnQ6IDA7XG5cdFx0bWFyZ2luOiAwO1xuXHRcdHBhZGRpbmc6IDA7XG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdHJpZ2h0OiAwO1xuXHRcdHRvcDogMDtcblxuXHRcdCR7IHJ0bCggeyBwYWRkaW5nTGVmdDogMiB9ICkgfVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgUm9vdCA9IHN0eWxlZCggRmxleCApYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRwYWRkaW5nLXRvcDogMDtcblxuXHQvLyBGb2N1cyB3aXRoaW4sIGV4Y2x1ZGluZyBjYXNlcyB3aGVyZSBhdXhpbGlhcnkgY29udHJvbHMgaW4gcHJlZml4IG9yIHN1ZmZpeCBoYXZlIGZvY3VzLlxuXHQmOmZvY3VzLXdpdGhpbjpub3QoIDpoYXMoIDppcyggJHsgUHJlZml4IH0sICR7IFN1ZmZpeCB9ICk6Zm9jdXMtd2l0aGluICkgKSB7XG5cdFx0JHsgQmFja2Ryb3BVSSB9IHtcblx0XHRcdGJvcmRlci1jb2xvcjogJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRib3gtc2hhZG93OiAkeyBDT05GSUcuY29udHJvbEJveFNoYWRvd0ZvY3VzIH07XG5cdFx0XHQvLyBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSB3aWxsIHNob3cgdGhpcyBvdXRsaW5lLCBidXQgbm90IHRoZSBib3gtc2hhZG93LlxuXHRcdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdFx0b3V0bGluZS1vZmZzZXQ6IC0ycHg7XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBjb250YWluZXJEaXNhYmxlZFN0eWxlcyA9ICggeyBkaXNhYmxlZCB9OiBDb250YWluZXJQcm9wcyApID0+IHtcblx0Y29uc3QgYmFja2dyb3VuZENvbG9yID0gZGlzYWJsZWRcblx0XHQ/IENPTE9SUy51aS5iYWNrZ3JvdW5kRGlzYWJsZWRcblx0XHQ6IENPTE9SUy51aS5iYWNrZ3JvdW5kO1xuXG5cdHJldHVybiBjc3MoIHsgYmFja2dyb3VuZENvbG9yIH0gKTtcbn07XG5cbmNvbnN0IGNvbnRhaW5lcldpZHRoU3R5bGVzID0gKCB7XG5cdF9fdW5zdGFibGVJbnB1dFdpZHRoLFxuXHRsYWJlbFBvc2l0aW9uLFxufTogQ29udGFpbmVyUHJvcHMgKSA9PiB7XG5cdGlmICggISBfX3Vuc3RhYmxlSW5wdXRXaWR0aCApIHtcblx0XHRyZXR1cm4gY3NzKCB7IHdpZHRoOiAnMTAwJScgfSApO1xuXHR9XG5cblx0aWYgKCBsYWJlbFBvc2l0aW9uID09PSAnc2lkZScgKSB7XG5cdFx0cmV0dXJuICcnO1xuXHR9XG5cblx0aWYgKCBsYWJlbFBvc2l0aW9uID09PSAnZWRnZScgKSB7XG5cdFx0cmV0dXJuIGNzcygge1xuXHRcdFx0ZmxleDogYDAgMCAkeyBfX3Vuc3RhYmxlSW5wdXRXaWR0aCB9YCxcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4gY3NzKCB7IHdpZHRoOiBfX3Vuc3RhYmxlSW5wdXRXaWR0aCB9ICk7XG59O1xuXG5leHBvcnQgY29uc3QgQ29udGFpbmVyID0gc3R5bGVkLmRpdjwgQ29udGFpbmVyUHJvcHMgPmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleDogMTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXG5cdCR7IGNvbnRhaW5lckRpc2FibGVkU3R5bGVzIH1cblx0JHsgY29udGFpbmVyV2lkdGhTdHlsZXMgfVxuYDtcblxudHlwZSBJbnB1dFByb3BzID0ge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemU/OiBib29sZWFuO1xuXHRkaXNhYmxlZD86IGJvb2xlYW47XG5cdGlucHV0U2l6ZT86IFNpemU7XG5cdGlzRHJhZ2dpbmc/OiBib29sZWFuO1xuXHRkcmFnQ3Vyc29yPzogQ1NTUHJvcGVydGllc1sgJ2N1cnNvcicgXTtcblx0cGFkZGluZ0lubGluZVN0YXJ0PzogQ1NTUHJvcGVydGllc1sgJ3BhZGRpbmdJbmxpbmVTdGFydCcgXTtcblx0cGFkZGluZ0lubGluZUVuZD86IENTU1Byb3BlcnRpZXNbICdwYWRkaW5nSW5saW5lRW5kJyBdO1xufTtcblxuY29uc3QgZGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogSW5wdXRQcm9wcyApID0+IHtcblx0aWYgKCAhIGRpc2FibGVkICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogQ09MT1JTLnVpLnRleHREaXNhYmxlZCxcblx0fSApO1xufTtcblxuZXhwb3J0IGNvbnN0IGZvbnRTaXplU3R5bGVzID0gKCB7IGlucHV0U2l6ZTogc2l6ZSB9OiBJbnB1dFByb3BzICkgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiAnMTNweCcsXG5cdFx0c21hbGw6ICcxMXB4Jyxcblx0XHRjb21wYWN0OiAnMTNweCcsXG5cdFx0J19fdW5zdGFibGUtbGFyZ2UnOiAnMTNweCcsXG5cdH07XG5cblx0Y29uc3QgZm9udFNpemUgPSBzaXplc1sgc2l6ZSBhcyBTaXplIF0gfHwgc2l6ZXMuZGVmYXVsdDtcblx0Y29uc3QgZm9udFNpemVNb2JpbGUgPSAnMTZweCc7XG5cblx0aWYgKCAhIGZvbnRTaXplICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdHJldHVybiBjc3NgXG5cdFx0Zm9udC1zaXplOiAkeyBmb250U2l6ZU1vYmlsZSB9O1xuXG5cdFx0QG1lZGlhICggbWluLXdpZHRoOiA2MDBweCApIHtcblx0XHRcdGZvbnQtc2l6ZTogJHsgZm9udFNpemUgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgZ2V0U2l6ZUNvbmZpZyA9ICgge1xuXHRpbnB1dFNpemU6IHNpemUsXG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcbn06IElucHV0UHJvcHMgKSA9PiB7XG5cdC8vIFBhZGRpbmdzIG1heSBiZSBvdmVycmlkZGVuIGJ5IHRoZSBjdXN0b20gcGFkZGluZ3MgcHJvcHMuXG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdH0sXG5cdFx0c21hbGw6IHtcblx0XHRcdGhlaWdodDogMjQsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiAyNCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHR9LFxuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdGhlaWdodDogMzIsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiAzMixcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHR9LFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzoge1xuXHRcdFx0aGVpZ2h0OiA0MCxcblx0XHRcdGxpbmVIZWlnaHQ6IDEsXG5cdFx0XHRtaW5IZWlnaHQ6IDQwLFxuXHRcdFx0cGFkZGluZ0xlZnQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdFx0XHRwYWRkaW5nUmlnaHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdFx0fSxcblx0fTtcblxuXHRpZiAoICEgX19uZXh0NDBweERlZmF1bHRTaXplICkge1xuXHRcdHNpemVzLmRlZmF1bHQgPSBzaXplcy5jb21wYWN0O1xuXHR9XG5cblx0cmV0dXJuIHNpemVzWyBzaXplIGFzIFNpemUgXSB8fCBzaXplcy5kZWZhdWx0O1xufTtcblxuY29uc3Qgc2l6ZVN0eWxlcyA9ICggcHJvcHM6IElucHV0UHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIGdldFNpemVDb25maWcoIHByb3BzICkgKTtcbn07XG5cbmNvbnN0IGN1c3RvbVBhZGRpbmdzID0gKCB7XG5cdHBhZGRpbmdJbmxpbmVTdGFydCxcblx0cGFkZGluZ0lubGluZUVuZCxcbn06IElucHV0UHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHsgcGFkZGluZ0lubGluZVN0YXJ0LCBwYWRkaW5nSW5saW5lRW5kIH0gKTtcbn07XG5cbmNvbnN0IGRyYWdTdHlsZXMgPSAoIHsgaXNEcmFnZ2luZywgZHJhZ0N1cnNvciB9OiBJbnB1dFByb3BzICkgPT4ge1xuXHRsZXQgZGVmYXVsdEFycm93U3R5bGVzOiBTZXJpYWxpemVkU3R5bGVzIHwgdW5kZWZpbmVkO1xuXHRsZXQgYWN0aXZlRHJhZ0N1cnNvclN0eWxlczogU2VyaWFsaXplZFN0eWxlcyB8IHVuZGVmaW5lZDtcblxuXHRpZiAoIGlzRHJhZ2dpbmcgKSB7XG5cdFx0ZGVmYXVsdEFycm93U3R5bGVzID0gY3NzYFxuXHRcdFx0Y3Vyc29yOiAkeyBkcmFnQ3Vyc29yIH07XG5cdFx0XHR1c2VyLXNlbGVjdDogbm9uZTtcblxuXHRcdFx0Jjo6LXdlYmtpdC1vdXRlci1zcGluLWJ1dHRvbixcblx0XHRcdCY6Oi13ZWJraXQtaW5uZXItc3Bpbi1idXR0b24ge1xuXHRcdFx0XHQtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmUgIWltcG9ydGFudDtcblx0XHRcdFx0bWFyZ2luOiAwICFpbXBvcnRhbnQ7XG5cdFx0XHR9XG5cdFx0YDtcblx0fVxuXG5cdGlmICggaXNEcmFnZ2luZyAmJiBkcmFnQ3Vyc29yICkge1xuXHRcdGFjdGl2ZURyYWdDdXJzb3JTdHlsZXMgPSBjc3NgXG5cdFx0XHQmOmFjdGl2ZSB7XG5cdFx0XHRcdGN1cnNvcjogJHsgZHJhZ0N1cnNvciB9O1xuXHRcdFx0fVxuXHRcdGA7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdCR7IGRlZmF1bHRBcnJvd1N0eWxlcyB9XG5cdFx0JHsgYWN0aXZlRHJhZ0N1cnNvclN0eWxlcyB9XG5cdGA7XG59O1xuXG4vLyBUT0RPOiBSZXNvbHZlIG5lZWQgdG8gdXNlICYmJiB0byBpbmNyZWFzZSBzcGVjaWZpY2l0eVxuLy8gaHR0cHM6Ly9naXRodWIuY29tL1dvcmRQcmVzcy9ndXRlbmJlcmcvaXNzdWVzLzE4NDgzXG5cbmV4cG9ydCBjb25zdCBJbnB1dCA9IHN0eWxlZC5pbnB1dDwgSW5wdXRQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyOiBub25lO1xuXHRcdGJveC1zaGFkb3c6IG5vbmUgIWltcG9ydGFudDtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRmb250LWZhbWlseTogaW5oZXJpdDtcblx0XHRtYXJnaW46IDA7XG5cdFx0b3V0bGluZTogbm9uZTtcblx0XHR3aWR0aDogMTAwJTtcblxuXHRcdCR7IGRyYWdTdHlsZXMgfVxuXHRcdCR7IGRpc2FibGVkU3R5bGVzIH1cblx0XHQkeyBmb250U2l6ZVN0eWxlcyB9XG5cdFx0JHsgc2l6ZVN0eWxlcyB9XG5cdFx0JHsgY3VzdG9tUGFkZGluZ3MgfVxuXG5cdFx0Jjo6LXdlYmtpdC1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOjotbW96LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblxuXHRcdCY6LW1zLWlucHV0LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblxuXHRcdCZbdHlwZT0nZW1haWwnXSxcblx0XHQmW3R5cGU9J3VybCddIHtcblx0XHRcdC8qIHJ0bDppZ25vcmUgKi9cblx0XHRcdGRpcmVjdGlvbjogbHRyO1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgQmFzZUxhYmVsID0gc3R5bGVkKCBUZXh0ICk8IHsgbGFiZWxQb3NpdGlvbj86IExhYmVsUG9zaXRpb24gfSA+YFxuXHQmJiYge1xuXHRcdCR7IGJhc2VMYWJlbFR5cG9ncmFwaHkgfTtcblxuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0cGFkZGluZy10b3A6IDA7XG5cdFx0cGFkZGluZy1ib3R0b206IDA7XG5cdFx0bWF4LXdpZHRoOiAxMDAlO1xuXHRcdHotaW5kZXg6IDE7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBMYWJlbCA9IChcblx0cHJvcHM6IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzPFxuXHRcdHsgbGFiZWxQb3NpdGlvbj86IExhYmVsUG9zaXRpb247IGNoaWxkcmVuOiBSZWFjdE5vZGUgfSxcblx0XHQnbGFiZWwnLFxuXHRcdGZhbHNlXG5cdD5cbikgPT4gPEJhc2VMYWJlbCB7IC4uLnByb3BzIH0gYXM9XCJsYWJlbFwiIC8+O1xuXG5leHBvcnQgY29uc3QgTGFiZWxXcmFwcGVyID0gc3R5bGVkKCBGbGV4SXRlbSApYFxuXHRtYXgtd2lkdGg6IGNhbGMoIDEwMCUgLSAxMHB4ICk7XG5gO1xuXG5jb25zdCBwcmVmaXhTdWZmaXhXcmFwcGVyU3R5bGVzID0gKCB7XG5cdHZhcmlhbnQgPSAnZGVmYXVsdCcsXG5cdHNpemUsXG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0aXNQcmVmaXgsXG59OiBQcmVmaXhTdWZmaXhXcmFwcGVyUHJvcHMgJiB7IGlzUHJlZml4PzogYm9vbGVhbiB9ICkgPT4ge1xuXHRjb25zdCB7IHBhZGRpbmdMZWZ0OiBwYWRkaW5nIH0gPSBnZXRTaXplQ29uZmlnKCB7XG5cdFx0aW5wdXRTaXplOiBzaXplLFxuXHRcdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0fSApO1xuXG5cdGNvbnN0IHBhZGRpbmdQcm9wZXJ0eSA9IGlzUHJlZml4XG5cdFx0PyAncGFkZGluZ0lubGluZVN0YXJ0J1xuXHRcdDogJ3BhZGRpbmdJbmxpbmVFbmQnO1xuXG5cdGlmICggdmFyaWFudCA9PT0gJ2RlZmF1bHQnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdFsgcGFkZGluZ1Byb3BlcnR5IF06IHBhZGRpbmcsXG5cdFx0fSApO1xuXHR9XG5cblx0Ly8gSWYgdmFyaWFudCBpcyAnaWNvbicgb3IgJ2NvbnRyb2wnXG5cdHJldHVybiBjc3MoIHtcblx0XHRkaXNwbGF5OiAnZmxleCcsXG5cdFx0WyBwYWRkaW5nUHJvcGVydHkgXTogcGFkZGluZyAtIDQsXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBQcmVmaXhTdWZmaXhXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0JHsgcHJlZml4U3VmZml4V3JhcHBlclN0eWxlcyB9XG5gO1xuIl19 */");
  };
  var PrefixSuffixWrapper = /* @__PURE__ */ createStyled("div", false ? {
    target: "em5sgkm0"
  } : {
    target: "em5sgkm0",
    label: "PrefixSuffixWrapper"
  })(prefixSuffixWrapperStyles, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1VzZDIiwiZmlsZSI6ImlucHV0LWNvbnRyb2wtc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgU2VyaWFsaXplZFN0eWxlcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB0eXBlIHsgQ1NTUHJvcGVydGllcywgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzIH0gZnJvbSAnLi4vLi4vY29udGV4dCc7XG5pbXBvcnQgeyBGbGV4LCBGbGV4SXRlbSB9IGZyb20gJy4uLy4uL2ZsZXgnO1xuaW1wb3J0IHsgVGV4dCB9IGZyb20gJy4uLy4uL3RleHQnO1xuaW1wb3J0IHsgYmFzZUxhYmVsVHlwb2dyYXBoeSwgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgTGFiZWxQb3NpdGlvbiwgU2l6ZSwgUHJlZml4U3VmZml4V3JhcHBlclByb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuXG50eXBlIENvbnRhaW5lclByb3BzID0ge1xuXHRkaXNhYmxlZD86IGJvb2xlYW47XG5cdGhpZGVMYWJlbD86IGJvb2xlYW47XG5cdF9fdW5zdGFibGVJbnB1dFdpZHRoPzogQ1NTUHJvcGVydGllc1sgJ3dpZHRoJyBdO1xuXHRsYWJlbFBvc2l0aW9uPzogTGFiZWxQb3NpdGlvbjtcbn07XG5cbmV4cG9ydCBjb25zdCBQcmVmaXggPSBzdHlsZWQuc3BhbmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VmZml4ID0gc3R5bGVkLnNwYW5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGFsaWduLXNlbGY6IHN0cmV0Y2g7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGZsZXg7XG5gO1xuXG50eXBlIEJhY2tkcm9wUHJvcHMgPSB7XG5cdGRpc2FibGVkPzogYm9vbGVhbjtcblx0aXNCb3JkZXJsZXNzPzogYm9vbGVhbjtcbn07XG5cbmNvbnN0IGJhY2tkcm9wQm9yZGVyQ29sb3IgPSAoIHtcblx0ZGlzYWJsZWQsXG5cdGlzQm9yZGVybGVzcyxcbn06IEJhY2tkcm9wUHJvcHMgKTogQ1NTUHJvcGVydGllc1sgJ2JvcmRlckNvbG9yJyBdID0+IHtcblx0aWYgKCBpc0JvcmRlcmxlc3MgKSB7XG5cdFx0cmV0dXJuICd0cmFuc3BhcmVudCc7XG5cdH1cblxuXHRpZiAoIGRpc2FibGVkICkge1xuXHRcdHJldHVybiBDT0xPUlMudWkuYm9yZGVyRGlzYWJsZWQ7XG5cdH1cblxuXHRyZXR1cm4gQ09MT1JTLnVpLmJvcmRlcjtcbn07XG5cbmV4cG9ydCBjb25zdCBCYWNrZHJvcFVJID0gc3R5bGVkLmRpdjwgQmFja2Ryb3BQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyLWNvbG9yOiAkeyBiYWNrZHJvcEJvcmRlckNvbG9yIH07XG5cdFx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0XHRib3JkZXItc3R5bGU6IHNvbGlkO1xuXHRcdGJvcmRlci13aWR0aDogMXB4O1xuXHRcdGJvdHRvbTogMDtcblx0XHRsZWZ0OiAwO1xuXHRcdG1hcmdpbjogMDtcblx0XHRwYWRkaW5nOiAwO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRyaWdodDogMDtcblx0XHR0b3A6IDA7XG5cblx0XHQkeyBydGwoIHsgcGFkZGluZ0xlZnQ6IDIgfSApIH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQoIEZsZXggKWBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0cGFkZGluZy10b3A6IDA7XG5cblx0Ly8gRm9jdXMgd2l0aGluLCBleGNsdWRpbmcgY2FzZXMgd2hlcmUgYXV4aWxpYXJ5IGNvbnRyb2xzIGluIHByZWZpeCBvciBzdWZmaXggaGF2ZSBmb2N1cy5cblx0Jjpmb2N1cy13aXRoaW46bm90KCA6aGFzKCA6aXMoICR7IFByZWZpeCB9LCAkeyBTdWZmaXggfSApOmZvY3VzLXdpdGhpbiApICkge1xuXHRcdCR7IEJhY2tkcm9wVUkgfSB7XG5cdFx0XHRib3JkZXItY29sb3I6ICR7IENPTE9SUy51aS5ib3JkZXJGb2N1cyB9O1xuXHRcdFx0Ym94LXNoYWRvdzogJHsgQ09ORklHLmNvbnRyb2xCb3hTaGFkb3dGb2N1cyB9O1xuXHRcdFx0Ly8gV2luZG93cyBIaWdoIENvbnRyYXN0IG1vZGUgd2lsbCBzaG93IHRoaXMgb3V0bGluZSwgYnV0IG5vdCB0aGUgYm94LXNoYWRvdy5cblx0XHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRcdG91dGxpbmUtb2Zmc2V0OiAtMnB4O1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgY29udGFpbmVyRGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogQ29udGFpbmVyUHJvcHMgKSA9PiB7XG5cdGNvbnN0IGJhY2tncm91bmRDb2xvciA9IGRpc2FibGVkXG5cdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0OiBDT0xPUlMudWkuYmFja2dyb3VuZDtcblxuXHRyZXR1cm4gY3NzKCB7IGJhY2tncm91bmRDb2xvciB9ICk7XG59O1xuXG5jb25zdCBjb250YWluZXJXaWR0aFN0eWxlcyA9ICgge1xuXHRfX3Vuc3RhYmxlSW5wdXRXaWR0aCxcblx0bGFiZWxQb3NpdGlvbixcbn06IENvbnRhaW5lclByb3BzICkgPT4ge1xuXHRpZiAoICEgX191bnN0YWJsZUlucHV0V2lkdGggKSB7XG5cdFx0cmV0dXJuIGNzcyggeyB3aWR0aDogJzEwMCUnIH0gKTtcblx0fVxuXG5cdGlmICggbGFiZWxQb3NpdGlvbiA9PT0gJ3NpZGUnICkge1xuXHRcdHJldHVybiAnJztcblx0fVxuXG5cdGlmICggbGFiZWxQb3NpdGlvbiA9PT0gJ2VkZ2UnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdGZsZXg6IGAwIDAgJHsgX191bnN0YWJsZUlucHV0V2lkdGggfWAsXG5cdFx0fSApO1xuXHR9XG5cblx0cmV0dXJuIGNzcyggeyB3aWR0aDogX191bnN0YWJsZUlucHV0V2lkdGggfSApO1xufTtcblxuZXhwb3J0IGNvbnN0IENvbnRhaW5lciA9IHN0eWxlZC5kaXY8IENvbnRhaW5lclByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdGRpc3BsYXk6IGZsZXg7XG5cdGZsZXg6IDE7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuXHQkeyBjb250YWluZXJEaXNhYmxlZFN0eWxlcyB9XG5cdCR7IGNvbnRhaW5lcldpZHRoU3R5bGVzIH1cbmA7XG5cbnR5cGUgSW5wdXRQcm9wcyA9IHtcblx0X19uZXh0NDBweERlZmF1bHRTaXplPzogYm9vbGVhbjtcblx0ZGlzYWJsZWQ/OiBib29sZWFuO1xuXHRpbnB1dFNpemU/OiBTaXplO1xuXHRpc0RyYWdnaW5nPzogYm9vbGVhbjtcblx0ZHJhZ0N1cnNvcj86IENTU1Byb3BlcnRpZXNbICdjdXJzb3InIF07XG5cdHBhZGRpbmdJbmxpbmVTdGFydD86IENTU1Byb3BlcnRpZXNbICdwYWRkaW5nSW5saW5lU3RhcnQnIF07XG5cdHBhZGRpbmdJbmxpbmVFbmQ/OiBDU1NQcm9wZXJ0aWVzWyAncGFkZGluZ0lubGluZUVuZCcgXTtcbn07XG5cbmNvbnN0IGRpc2FibGVkU3R5bGVzID0gKCB7IGRpc2FibGVkIH06IElucHV0UHJvcHMgKSA9PiB7XG5cdGlmICggISBkaXNhYmxlZCApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzKCB7XG5cdFx0Y29sb3I6IENPTE9SUy51aS50ZXh0RGlzYWJsZWQsXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBmb250U2l6ZVN0eWxlcyA9ICggeyBpbnB1dFNpemU6IHNpemUgfTogSW5wdXRQcm9wcyApID0+IHtcblx0Y29uc3Qgc2l6ZXMgPSB7XG5cdFx0ZGVmYXVsdDogJzEzcHgnLFxuXHRcdHNtYWxsOiAnMTFweCcsXG5cdFx0Y29tcGFjdDogJzEzcHgnLFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzogJzEzcHgnLFxuXHR9O1xuXG5cdGNvbnN0IGZvbnRTaXplID0gc2l6ZXNbIHNpemUgYXMgU2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG5cdGNvbnN0IGZvbnRTaXplTW9iaWxlID0gJzE2cHgnO1xuXG5cdGlmICggISBmb250U2l6ZSApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdGZvbnQtc2l6ZTogJHsgZm9udFNpemVNb2JpbGUgfTtcblxuXHRcdEBtZWRpYSAoIG1pbi13aWR0aDogNjAwcHggKSB7XG5cdFx0XHRmb250LXNpemU6ICR7IGZvbnRTaXplIH07XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGdldFNpemVDb25maWcgPSAoIHtcblx0aW5wdXRTaXplOiBzaXplLFxuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBJbnB1dFByb3BzICkgPT4ge1xuXHQvLyBQYWRkaW5ncyBtYXkgYmUgb3ZlcnJpZGRlbiBieSB0aGUgY3VzdG9tIHBhZGRpbmdzIHByb3BzLlxuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiB7XG5cdFx0XHRoZWlnaHQ6IDQwLFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogNDAsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHRcdHBhZGRpbmdSaWdodDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHR9LFxuXHRcdHNtYWxsOiB7XG5cdFx0XHRoZWlnaHQ6IDI0LFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogMjQsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0fSxcblx0XHRjb21wYWN0OiB7XG5cdFx0XHRoZWlnaHQ6IDMyLFxuXHRcdFx0bGluZUhlaWdodDogMSxcblx0XHRcdG1pbkhlaWdodDogMzIsXG5cdFx0XHRwYWRkaW5nTGVmdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0fSxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRsaW5lSGVpZ2h0OiAxLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdMZWZ0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdFx0cGFkZGluZ1JpZ2h0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdH0sXG5cdH07XG5cblx0aWYgKCAhIF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSApIHtcblx0XHRzaXplcy5kZWZhdWx0ID0gc2l6ZXMuY29tcGFjdDtcblx0fVxuXG5cdHJldHVybiBzaXplc1sgc2l6ZSBhcyBTaXplIF0gfHwgc2l6ZXMuZGVmYXVsdDtcbn07XG5cbmNvbnN0IHNpemVTdHlsZXMgPSAoIHByb3BzOiBJbnB1dFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCBnZXRTaXplQ29uZmlnKCBwcm9wcyApICk7XG59O1xuXG5jb25zdCBjdXN0b21QYWRkaW5ncyA9ICgge1xuXHRwYWRkaW5nSW5saW5lU3RhcnQsXG5cdHBhZGRpbmdJbmxpbmVFbmQsXG59OiBJbnB1dFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCB7IHBhZGRpbmdJbmxpbmVTdGFydCwgcGFkZGluZ0lubGluZUVuZCB9ICk7XG59O1xuXG5jb25zdCBkcmFnU3R5bGVzID0gKCB7IGlzRHJhZ2dpbmcsIGRyYWdDdXJzb3IgfTogSW5wdXRQcm9wcyApID0+IHtcblx0bGV0IGRlZmF1bHRBcnJvd1N0eWxlczogU2VyaWFsaXplZFN0eWxlcyB8IHVuZGVmaW5lZDtcblx0bGV0IGFjdGl2ZURyYWdDdXJzb3JTdHlsZXM6IFNlcmlhbGl6ZWRTdHlsZXMgfCB1bmRlZmluZWQ7XG5cblx0aWYgKCBpc0RyYWdnaW5nICkge1xuXHRcdGRlZmF1bHRBcnJvd1N0eWxlcyA9IGNzc2Bcblx0XHRcdGN1cnNvcjogJHsgZHJhZ0N1cnNvciB9O1xuXHRcdFx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cblx0XHRcdCY6Oi13ZWJraXQtb3V0ZXItc3Bpbi1idXR0b24sXG5cdFx0XHQmOjotd2Via2l0LWlubmVyLXNwaW4tYnV0dG9uIHtcblx0XHRcdFx0LXdlYmtpdC1hcHBlYXJhbmNlOiBub25lICFpbXBvcnRhbnQ7XG5cdFx0XHRcdG1hcmdpbjogMCAhaW1wb3J0YW50O1xuXHRcdFx0fVxuXHRcdGA7XG5cdH1cblxuXHRpZiAoIGlzRHJhZ2dpbmcgJiYgZHJhZ0N1cnNvciApIHtcblx0XHRhY3RpdmVEcmFnQ3Vyc29yU3R5bGVzID0gY3NzYFxuXHRcdFx0JjphY3RpdmUge1xuXHRcdFx0XHRjdXJzb3I6ICR7IGRyYWdDdXJzb3IgfTtcblx0XHRcdH1cblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHQkeyBkZWZhdWx0QXJyb3dTdHlsZXMgfVxuXHRcdCR7IGFjdGl2ZURyYWdDdXJzb3JTdHlsZXMgfVxuXHRgO1xufTtcblxuLy8gVE9ETzogUmVzb2x2ZSBuZWVkIHRvIHVzZSAmJiYgdG8gaW5jcmVhc2Ugc3BlY2lmaWNpdHlcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9Xb3JkUHJlc3MvZ3V0ZW5iZXJnL2lzc3Vlcy8xODQ4M1xuXG5leHBvcnQgY29uc3QgSW5wdXQgPSBzdHlsZWQuaW5wdXQ8IElucHV0UHJvcHMgPmBcblx0JiYmIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDtcblx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdGJvcmRlcjogbm9uZTtcblx0XHRib3gtc2hhZG93OiBub25lICFpbXBvcnRhbnQ7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdFx0bWFyZ2luOiAwO1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cblx0XHQkeyBkcmFnU3R5bGVzIH1cblx0XHQkeyBkaXNhYmxlZFN0eWxlcyB9XG5cdFx0JHsgZm9udFNpemVTdHlsZXMgfVxuXHRcdCR7IHNpemVTdHlsZXMgfVxuXHRcdCR7IGN1c3RvbVBhZGRpbmdzIH1cblxuXHRcdCY6Oi13ZWJraXQtaW5wdXQtcGxhY2Vob2xkZXIge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy51aS5kYXJrR3JheVBsYWNlaG9sZGVyIH07XG5cdFx0fVxuXG5cdFx0Jjo6LW1vei1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOi1tcy1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmW3R5cGU9J2VtYWlsJ10sXG5cdFx0Jlt0eXBlPSd1cmwnXSB7XG5cdFx0XHQvKiBydGw6aWdub3JlICovXG5cdFx0XHRkaXJlY3Rpb246IGx0cjtcblx0XHR9XG5cdH1cbmA7XG5cbmNvbnN0IEJhc2VMYWJlbCA9IHN0eWxlZCggVGV4dCApPCB7IGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uIH0gPmBcblx0JiYmIHtcblx0XHQkeyBiYXNlTGFiZWxUeXBvZ3JhcGh5IH07XG5cblx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdHBhZGRpbmctdG9wOiAwO1xuXHRcdHBhZGRpbmctYm90dG9tOiAwO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0XHR6LWluZGV4OiAxO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTGFiZWwgPSAoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczxcblx0XHR7IGxhYmVsUG9zaXRpb24/OiBMYWJlbFBvc2l0aW9uOyBjaGlsZHJlbjogUmVhY3ROb2RlIH0sXG5cdFx0J2xhYmVsJyxcblx0XHRmYWxzZVxuXHQ+XG4pID0+IDxCYXNlTGFiZWwgeyAuLi5wcm9wcyB9IGFzPVwibGFiZWxcIiAvPjtcblxuZXhwb3J0IGNvbnN0IExhYmVsV3JhcHBlciA9IHN0eWxlZCggRmxleEl0ZW0gKWBcblx0bWF4LXdpZHRoOiBjYWxjKCAxMDAlIC0gMTBweCApO1xuYDtcblxuY29uc3QgcHJlZml4U3VmZml4V3JhcHBlclN0eWxlcyA9ICgge1xuXHR2YXJpYW50ID0gJ2RlZmF1bHQnLFxuXHRzaXplLFxuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdGlzUHJlZml4LFxufTogUHJlZml4U3VmZml4V3JhcHBlclByb3BzICYgeyBpc1ByZWZpeD86IGJvb2xlYW4gfSApID0+IHtcblx0Y29uc3QgeyBwYWRkaW5nTGVmdDogcGFkZGluZyB9ID0gZ2V0U2l6ZUNvbmZpZygge1xuXHRcdGlucHV0U2l6ZTogc2l6ZSxcblx0XHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdH0gKTtcblxuXHRjb25zdCBwYWRkaW5nUHJvcGVydHkgPSBpc1ByZWZpeFxuXHRcdD8gJ3BhZGRpbmdJbmxpbmVTdGFydCdcblx0XHQ6ICdwYWRkaW5nSW5saW5lRW5kJztcblxuXHRpZiAoIHZhcmlhbnQgPT09ICdkZWZhdWx0JyApIHtcblx0XHRyZXR1cm4gY3NzKCB7XG5cdFx0XHRbIHBhZGRpbmdQcm9wZXJ0eSBdOiBwYWRkaW5nLFxuXHRcdH0gKTtcblx0fVxuXG5cdC8vIElmIHZhcmlhbnQgaXMgJ2ljb24nIG9yICdjb250cm9sJ1xuXHRyZXR1cm4gY3NzKCB7XG5cdFx0ZGlzcGxheTogJ2ZsZXgnLFxuXHRcdFsgcGFkZGluZ1Byb3BlcnR5IF06IHBhZGRpbmcgLSA0LFxuXHR9ICk7XG59O1xuXG5leHBvcnQgY29uc3QgUHJlZml4U3VmZml4V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdCR7IHByZWZpeFN1ZmZpeFdyYXBwZXJTdHlsZXMgfVxuYDtcbiJdfQ== */"));

  // packages/components/build-module/input-control/backdrop.mjs
  var import_jsx_runtime87 = __toESM(require_jsx_runtime(), 1);
  function Backdrop({
    disabled = false,
    isBorderless = false
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(BackdropUI, {
      "aria-hidden": "true",
      className: "components-input-control__backdrop",
      disabled,
      isBorderless
    });
  }
  var MemoizedBackdrop = (0, import_element26.memo)(Backdrop);
  var backdrop_default = MemoizedBackdrop;

  // packages/components/build-module/input-control/label.mjs
  var import_jsx_runtime88 = __toESM(require_jsx_runtime(), 1);
  function Label2({
    children,
    hideLabelFromVision,
    htmlFor,
    ...props
  }) {
    if (!children) {
      return null;
    }
    if (hideLabelFromVision) {
      return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(component_default2, {
        as: "label",
        htmlFor,
        children
      });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(LabelWrapper, {
      children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Label, {
        htmlFor,
        ...props,
        children
      })
    });
  }

  // packages/components/build-module/utils/use-deprecated-props.mjs
  function useDeprecated36pxDefaultSizeProp(props) {
    const {
      __next36pxDefaultSize,
      __next40pxDefaultSize,
      ...otherProps
    } = props;
    return {
      ...otherProps,
      __next40pxDefaultSize: __next40pxDefaultSize ?? __next36pxDefaultSize
    };
  }

  // packages/components/build-module/input-control/input-base.mjs
  var import_jsx_runtime89 = __toESM(require_jsx_runtime(), 1);
  function useUniqueId(idProp) {
    const instanceId = (0, import_compose3.useInstanceId)(InputBase);
    const id3 = `input-base-control-${instanceId}`;
    return idProp || id3;
  }
  function getUIFlexProps(labelPosition) {
    const props = {};
    switch (labelPosition) {
      case "top":
        props.direction = "column";
        props.expanded = false;
        props.gap = 0;
        break;
      case "bottom":
        props.direction = "column-reverse";
        props.expanded = false;
        props.gap = 0;
        break;
      case "edge":
        props.justify = "space-between";
        break;
    }
    return props;
  }
  function InputBase(props, ref) {
    const {
      __next40pxDefaultSize,
      __unstableInputWidth,
      children,
      className: className2,
      disabled = false,
      hideLabelFromVision = false,
      labelPosition,
      id: idProp,
      isBorderless = false,
      label,
      prefix: prefix2,
      size: size3 = "default",
      suffix,
      ...restProps
    } = useDeprecated36pxDefaultSizeProp(useContextSystem(props, "InputBase"));
    const id3 = useUniqueId(idProp);
    const hideLabel = hideLabelFromVision || !label;
    const prefixSuffixContextValue = (0, import_element27.useMemo)(() => {
      return {
        InputControlPrefixWrapper: {
          __next40pxDefaultSize,
          size: size3
        },
        InputControlSuffixWrapper: {
          __next40pxDefaultSize,
          size: size3
        }
      };
    }, [__next40pxDefaultSize, size3]);
    return (
      // @ts-expect-error The `direction` prop from Flex (FlexDirection) conflicts with legacy SVGAttributes `direction` (string) that come from React intrinsic prop definitions.
      /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(Root, {
        ...restProps,
        ...getUIFlexProps(labelPosition),
        className: className2,
        gap: 2,
        ref,
        children: [/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Label2, {
          className: "components-input-control__label",
          hideLabelFromVision,
          labelPosition,
          htmlFor: id3,
          children: label
        }), /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(Container, {
          __unstableInputWidth,
          className: "components-input-control__container",
          disabled,
          hideLabel,
          labelPosition,
          children: [/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(ContextSystemProvider, {
            value: prefixSuffixContextValue,
            children: [prefix2 && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Prefix, {
              className: "components-input-control__prefix",
              children: prefix2
            }), children, suffix && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Suffix, {
              className: "components-input-control__suffix",
              children: suffix
            })]
          }), /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(backdrop_default, {
            disabled,
            isBorderless
          })]
        })]
      })
    );
  }
  var input_base_default = contextConnect(InputBase, "InputBase");

  // node_modules/@use-gesture/core/dist/maths-0ab39ae9.esm.js
  function clamp3(v3, min3, max3) {
    return Math.max(min3, Math.min(v3, max3));
  }
  var V = {
    toVector(v3, fallback) {
      if (v3 === void 0) v3 = fallback;
      return Array.isArray(v3) ? v3 : [v3, v3];
    },
    add(v1, v22) {
      return [v1[0] + v22[0], v1[1] + v22[1]];
    },
    sub(v1, v22) {
      return [v1[0] - v22[0], v1[1] - v22[1]];
    },
    addTo(v1, v22) {
      v1[0] += v22[0];
      v1[1] += v22[1];
    },
    subTo(v1, v22) {
      v1[0] -= v22[0];
      v1[1] -= v22[1];
    }
  };
  function rubberband(distance2, dimension, constant) {
    if (dimension === 0 || Math.abs(dimension) === Infinity) return Math.pow(distance2, constant * 5);
    return distance2 * dimension * constant / (dimension + constant * distance2);
  }
  function rubberbandIfOutOfBounds(position2, min3, max3, constant = 0.15) {
    if (constant === 0) return clamp3(position2, min3, max3);
    if (position2 < min3) return -rubberband(min3 - position2, max3 - min3, constant) + min3;
    if (position2 > max3) return +rubberband(position2 - max3, max3 - min3, constant) + max3;
    return position2;
  }
  function computeRubberband(bounds, [Vx, Vy], [Rx, Ry]) {
    const [[X0, X1], [Y0, Y1]] = bounds;
    return [rubberbandIfOutOfBounds(Vx, X0, X1, Rx), rubberbandIfOutOfBounds(Vy, Y0, Y1, Ry)];
  }

  // node_modules/@use-gesture/core/dist/actions-fe213e88.esm.js
  function _toPrimitive(input, hint) {
    if (typeof input !== "object" || input === null) return input;
    var prim = input[Symbol.toPrimitive];
    if (prim !== void 0) {
      var res = prim.call(input, hint || "default");
      if (typeof res !== "object") return res;
      throw new TypeError("@@toPrimitive must return a primitive value.");
    }
    return (hint === "string" ? String : Number)(input);
  }
  function _toPropertyKey(arg) {
    var key = _toPrimitive(arg, "string");
    return typeof key === "symbol" ? key : String(key);
  }
  function _defineProperty(obj, key, value) {
    key = _toPropertyKey(key);
    if (key in obj) {
      Object.defineProperty(obj, key, {
        value,
        enumerable: true,
        configurable: true,
        writable: true
      });
    } else {
      obj[key] = value;
    }
    return obj;
  }
  function ownKeys(e3, r4) {
    var t4 = Object.keys(e3);
    if (Object.getOwnPropertySymbols) {
      var o4 = Object.getOwnPropertySymbols(e3);
      r4 && (o4 = o4.filter(function(r5) {
        return Object.getOwnPropertyDescriptor(e3, r5).enumerable;
      })), t4.push.apply(t4, o4);
    }
    return t4;
  }
  function _objectSpread2(e3) {
    for (var r4 = 1; r4 < arguments.length; r4++) {
      var t4 = null != arguments[r4] ? arguments[r4] : {};
      r4 % 2 ? ownKeys(Object(t4), true).forEach(function(r5) {
        _defineProperty(e3, r5, t4[r5]);
      }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e3, Object.getOwnPropertyDescriptors(t4)) : ownKeys(Object(t4)).forEach(function(r5) {
        Object.defineProperty(e3, r5, Object.getOwnPropertyDescriptor(t4, r5));
      });
    }
    return e3;
  }
  var EVENT_TYPE_MAP = {
    pointer: {
      start: "down",
      change: "move",
      end: "up"
    },
    mouse: {
      start: "down",
      change: "move",
      end: "up"
    },
    touch: {
      start: "start",
      change: "move",
      end: "end"
    },
    gesture: {
      start: "start",
      change: "change",
      end: "end"
    }
  };
  function capitalize(string) {
    if (!string) return "";
    return string[0].toUpperCase() + string.slice(1);
  }
  var actionsWithoutCaptureSupported = ["enter", "leave"];
  function hasCapture(capture = false, actionKey) {
    return capture && !actionsWithoutCaptureSupported.includes(actionKey);
  }
  function toHandlerProp(device, action = "", capture = false) {
    const deviceProps = EVENT_TYPE_MAP[device];
    const actionKey = deviceProps ? deviceProps[action] || action : action;
    return "on" + capitalize(device) + capitalize(actionKey) + (hasCapture(capture, actionKey) ? "Capture" : "");
  }
  var pointerCaptureEvents = ["gotpointercapture", "lostpointercapture"];
  function parseProp(prop) {
    let eventKey = prop.substring(2).toLowerCase();
    const passive = !!~eventKey.indexOf("passive");
    if (passive) eventKey = eventKey.replace("passive", "");
    const captureKey = pointerCaptureEvents.includes(eventKey) ? "capturecapture" : "capture";
    const capture = !!~eventKey.indexOf(captureKey);
    if (capture) eventKey = eventKey.replace("capture", "");
    return {
      device: eventKey,
      capture,
      passive
    };
  }
  function toDomEventType(device, action = "") {
    const deviceProps = EVENT_TYPE_MAP[device];
    const actionKey = deviceProps ? deviceProps[action] || action : action;
    return device + actionKey;
  }
  function isTouch(event) {
    return "touches" in event;
  }
  function getPointerType(event) {
    if (isTouch(event)) return "touch";
    if ("pointerType" in event) return event.pointerType;
    return "mouse";
  }
  function getCurrentTargetTouchList(event) {
    return Array.from(event.touches).filter((e3) => {
      var _event$currentTarget, _event$currentTarget$;
      return e3.target === event.currentTarget || ((_event$currentTarget = event.currentTarget) === null || _event$currentTarget === void 0 || (_event$currentTarget$ = _event$currentTarget.contains) === null || _event$currentTarget$ === void 0 ? void 0 : _event$currentTarget$.call(_event$currentTarget, e3.target));
    });
  }
  function getTouchList(event) {
    return event.type === "touchend" || event.type === "touchcancel" ? event.changedTouches : event.targetTouches;
  }
  function getValueEvent(event) {
    return isTouch(event) ? getTouchList(event)[0] : event;
  }
  function touchIds(event) {
    return getCurrentTargetTouchList(event).map((touch) => touch.identifier);
  }
  function pointerId(event) {
    const valueEvent = getValueEvent(event);
    return isTouch(event) ? valueEvent.identifier : valueEvent.pointerId;
  }
  function pointerValues(event) {
    const valueEvent = getValueEvent(event);
    return [valueEvent.clientX, valueEvent.clientY];
  }
  function getEventDetails(event) {
    const payload = {};
    if ("buttons" in event) payload.buttons = event.buttons;
    if ("shiftKey" in event) {
      const {
        shiftKey,
        altKey,
        metaKey,
        ctrlKey
      } = event;
      Object.assign(payload, {
        shiftKey,
        altKey,
        metaKey,
        ctrlKey
      });
    }
    return payload;
  }
  function call(v3, ...args) {
    if (typeof v3 === "function") {
      return v3(...args);
    } else {
      return v3;
    }
  }
  function noop3() {
  }
  function chain2(...fns) {
    if (fns.length === 0) return noop3;
    if (fns.length === 1) return fns[0];
    return function() {
      let result;
      for (const fn of fns) {
        result = fn.apply(this, arguments) || result;
      }
      return result;
    };
  }
  function assignDefault(value, fallback) {
    return Object.assign({}, fallback, value || {});
  }
  var BEFORE_LAST_KINEMATICS_DELAY = 32;
  var Engine = class {
    constructor(ctrl, args, key) {
      this.ctrl = ctrl;
      this.args = args;
      this.key = key;
      if (!this.state) {
        this.state = {};
        this.computeValues([0, 0]);
        this.computeInitial();
        if (this.init) this.init();
        this.reset();
      }
    }
    get state() {
      return this.ctrl.state[this.key];
    }
    set state(state) {
      this.ctrl.state[this.key] = state;
    }
    get shared() {
      return this.ctrl.state.shared;
    }
    get eventStore() {
      return this.ctrl.gestureEventStores[this.key];
    }
    get timeoutStore() {
      return this.ctrl.gestureTimeoutStores[this.key];
    }
    get config() {
      return this.ctrl.config[this.key];
    }
    get sharedConfig() {
      return this.ctrl.config.shared;
    }
    get handler() {
      return this.ctrl.handlers[this.key];
    }
    reset() {
      const {
        state,
        shared,
        ingKey,
        args
      } = this;
      shared[ingKey] = state._active = state.active = state._blocked = state._force = false;
      state._step = [false, false];
      state.intentional = false;
      state._movement = [0, 0];
      state._distance = [0, 0];
      state._direction = [0, 0];
      state._delta = [0, 0];
      state._bounds = [[-Infinity, Infinity], [-Infinity, Infinity]];
      state.args = args;
      state.axis = void 0;
      state.memo = void 0;
      state.elapsedTime = state.timeDelta = 0;
      state.direction = [0, 0];
      state.distance = [0, 0];
      state.overflow = [0, 0];
      state._movementBound = [false, false];
      state.velocity = [0, 0];
      state.movement = [0, 0];
      state.delta = [0, 0];
      state.timeStamp = 0;
    }
    start(event) {
      const state = this.state;
      const config = this.config;
      if (!state._active) {
        this.reset();
        this.computeInitial();
        state._active = true;
        state.target = event.target;
        state.currentTarget = event.currentTarget;
        state.lastOffset = config.from ? call(config.from, state) : state.offset;
        state.offset = state.lastOffset;
        state.startTime = state.timeStamp = event.timeStamp;
      }
    }
    computeValues(values) {
      const state = this.state;
      state._values = values;
      state.values = this.config.transform(values);
    }
    computeInitial() {
      const state = this.state;
      state._initial = state._values;
      state.initial = state.values;
    }
    compute(event) {
      const {
        state,
        config,
        shared
      } = this;
      state.args = this.args;
      let dt = 0;
      if (event) {
        state.event = event;
        if (config.preventDefault && event.cancelable) state.event.preventDefault();
        state.type = event.type;
        shared.touches = this.ctrl.pointerIds.size || this.ctrl.touchIds.size;
        shared.locked = !!document.pointerLockElement;
        Object.assign(shared, getEventDetails(event));
        shared.down = shared.pressed = shared.buttons % 2 === 1 || shared.touches > 0;
        dt = event.timeStamp - state.timeStamp;
        state.timeStamp = event.timeStamp;
        state.elapsedTime = state.timeStamp - state.startTime;
      }
      if (state._active) {
        const _absoluteDelta = state._delta.map(Math.abs);
        V.addTo(state._distance, _absoluteDelta);
      }
      if (this.axisIntent) this.axisIntent(event);
      const [_m0, _m1] = state._movement;
      const [t0, t1] = config.threshold;
      const {
        _step,
        values
      } = state;
      if (config.hasCustomTransform) {
        if (_step[0] === false) _step[0] = Math.abs(_m0) >= t0 && values[0];
        if (_step[1] === false) _step[1] = Math.abs(_m1) >= t1 && values[1];
      } else {
        if (_step[0] === false) _step[0] = Math.abs(_m0) >= t0 && Math.sign(_m0) * t0;
        if (_step[1] === false) _step[1] = Math.abs(_m1) >= t1 && Math.sign(_m1) * t1;
      }
      state.intentional = _step[0] !== false || _step[1] !== false;
      if (!state.intentional) return;
      const movement = [0, 0];
      if (config.hasCustomTransform) {
        const [v0, v1] = values;
        movement[0] = _step[0] !== false ? v0 - _step[0] : 0;
        movement[1] = _step[1] !== false ? v1 - _step[1] : 0;
      } else {
        movement[0] = _step[0] !== false ? _m0 - _step[0] : 0;
        movement[1] = _step[1] !== false ? _m1 - _step[1] : 0;
      }
      if (this.restrictToAxis && !state._blocked) this.restrictToAxis(movement);
      const previousOffset = state.offset;
      const gestureIsActive = state._active && !state._blocked || state.active;
      if (gestureIsActive) {
        state.first = state._active && !state.active;
        state.last = !state._active && state.active;
        state.active = shared[this.ingKey] = state._active;
        if (event) {
          if (state.first) {
            if ("bounds" in config) state._bounds = call(config.bounds, state);
            if (this.setup) this.setup();
          }
          state.movement = movement;
          this.computeOffset();
        }
      }
      const [ox, oy] = state.offset;
      const [[x0, x1], [y0, y1]] = state._bounds;
      state.overflow = [ox < x0 ? -1 : ox > x1 ? 1 : 0, oy < y0 ? -1 : oy > y1 ? 1 : 0];
      state._movementBound[0] = state.overflow[0] ? state._movementBound[0] === false ? state._movement[0] : state._movementBound[0] : false;
      state._movementBound[1] = state.overflow[1] ? state._movementBound[1] === false ? state._movement[1] : state._movementBound[1] : false;
      const rubberband2 = state._active ? config.rubberband || [0, 0] : [0, 0];
      state.offset = computeRubberband(state._bounds, state.offset, rubberband2);
      state.delta = V.sub(state.offset, previousOffset);
      this.computeMovement();
      if (gestureIsActive && (!state.last || dt > BEFORE_LAST_KINEMATICS_DELAY)) {
        state.delta = V.sub(state.offset, previousOffset);
        const absoluteDelta = state.delta.map(Math.abs);
        V.addTo(state.distance, absoluteDelta);
        state.direction = state.delta.map(Math.sign);
        state._direction = state._delta.map(Math.sign);
        if (!state.first && dt > 0) {
          state.velocity = [absoluteDelta[0] / dt, absoluteDelta[1] / dt];
          state.timeDelta = dt;
        }
      }
    }
    emit() {
      const state = this.state;
      const shared = this.shared;
      const config = this.config;
      if (!state._active) this.clean();
      if ((state._blocked || !state.intentional) && !state._force && !config.triggerAllEvents) return;
      const memo6 = this.handler(_objectSpread2(_objectSpread2(_objectSpread2({}, shared), state), {}, {
        [this.aliasKey]: state.values
      }));
      if (memo6 !== void 0) state.memo = memo6;
    }
    clean() {
      this.eventStore.clean();
      this.timeoutStore.clean();
    }
  };
  function selectAxis([dx, dy], threshold) {
    const absDx = Math.abs(dx);
    const absDy = Math.abs(dy);
    if (absDx > absDy && absDx > threshold) {
      return "x";
    }
    if (absDy > absDx && absDy > threshold) {
      return "y";
    }
    return void 0;
  }
  var CoordinatesEngine = class extends Engine {
    constructor(...args) {
      super(...args);
      _defineProperty(this, "aliasKey", "xy");
    }
    reset() {
      super.reset();
      this.state.axis = void 0;
    }
    init() {
      this.state.offset = [0, 0];
      this.state.lastOffset = [0, 0];
    }
    computeOffset() {
      this.state.offset = V.add(this.state.lastOffset, this.state.movement);
    }
    computeMovement() {
      this.state.movement = V.sub(this.state.offset, this.state.lastOffset);
    }
    axisIntent(event) {
      const state = this.state;
      const config = this.config;
      if (!state.axis && event) {
        const threshold = typeof config.axisThreshold === "object" ? config.axisThreshold[getPointerType(event)] : config.axisThreshold;
        state.axis = selectAxis(state._movement, threshold);
      }
      state._blocked = (config.lockDirection || !!config.axis) && !state.axis || !!config.axis && config.axis !== state.axis;
    }
    restrictToAxis(v3) {
      if (this.config.axis || this.config.lockDirection) {
        switch (this.state.axis) {
          case "x":
            v3[1] = 0;
            break;
          case "y":
            v3[0] = 0;
            break;
        }
      }
    }
  };
  var identity2 = (v3) => v3;
  var DEFAULT_RUBBERBAND = 0.15;
  var commonConfigResolver = {
    enabled(value = true) {
      return value;
    },
    eventOptions(value, _k, config) {
      return _objectSpread2(_objectSpread2({}, config.shared.eventOptions), value);
    },
    preventDefault(value = false) {
      return value;
    },
    triggerAllEvents(value = false) {
      return value;
    },
    rubberband(value = 0) {
      switch (value) {
        case true:
          return [DEFAULT_RUBBERBAND, DEFAULT_RUBBERBAND];
        case false:
          return [0, 0];
        default:
          return V.toVector(value);
      }
    },
    from(value) {
      if (typeof value === "function") return value;
      if (value != null) return V.toVector(value);
    },
    transform(value, _k, config) {
      const transform = value || config.shared.transform;
      this.hasCustomTransform = !!transform;
      if (true) {
        const originalTransform = transform || identity2;
        return (v3) => {
          const r4 = originalTransform(v3);
          if (!isFinite(r4[0]) || !isFinite(r4[1])) {
            console.warn(`[@use-gesture]: config.transform() must produce a valid result, but it was: [${r4[0]},${[1]}]`);
          }
          return r4;
        };
      }
      return transform || identity2;
    },
    threshold(value) {
      return V.toVector(value, 0);
    }
  };
  if (true) {
    Object.assign(commonConfigResolver, {
      domTarget(value) {
        if (value !== void 0) {
          throw Error(`[@use-gesture]: \`domTarget\` option has been renamed to \`target\`.`);
        }
        return NaN;
      },
      lockDirection(value) {
        if (value !== void 0) {
          throw Error(`[@use-gesture]: \`lockDirection\` option has been merged with \`axis\`. Use it as in \`{ axis: 'lock' }\``);
        }
        return NaN;
      },
      initial(value) {
        if (value !== void 0) {
          throw Error(`[@use-gesture]: \`initial\` option has been renamed to \`from\`.`);
        }
        return NaN;
      }
    });
  }
  var DEFAULT_AXIS_THRESHOLD = 0;
  var coordinatesConfigResolver = _objectSpread2(_objectSpread2({}, commonConfigResolver), {}, {
    axis(_v, _k, {
      axis
    }) {
      this.lockDirection = axis === "lock";
      if (!this.lockDirection) return axis;
    },
    axisThreshold(value = DEFAULT_AXIS_THRESHOLD) {
      return value;
    },
    bounds(value = {}) {
      if (typeof value === "function") {
        return (state) => coordinatesConfigResolver.bounds(value(state));
      }
      if ("current" in value) {
        return () => value.current;
      }
      if (typeof HTMLElement === "function" && value instanceof HTMLElement) {
        return value;
      }
      const {
        left = -Infinity,
        right = Infinity,
        top = -Infinity,
        bottom = Infinity
      } = value;
      return [[left, right], [top, bottom]];
    }
  });
  var KEYS_DELTA_MAP = {
    ArrowRight: (displacement, factor = 1) => [displacement * factor, 0],
    ArrowLeft: (displacement, factor = 1) => [-1 * displacement * factor, 0],
    ArrowUp: (displacement, factor = 1) => [0, -1 * displacement * factor],
    ArrowDown: (displacement, factor = 1) => [0, displacement * factor]
  };
  var DragEngine = class extends CoordinatesEngine {
    constructor(...args) {
      super(...args);
      _defineProperty(this, "ingKey", "dragging");
    }
    reset() {
      super.reset();
      const state = this.state;
      state._pointerId = void 0;
      state._pointerActive = false;
      state._keyboardActive = false;
      state._preventScroll = false;
      state._delayed = false;
      state.swipe = [0, 0];
      state.tap = false;
      state.canceled = false;
      state.cancel = this.cancel.bind(this);
    }
    setup() {
      const state = this.state;
      if (state._bounds instanceof HTMLElement) {
        const boundRect = state._bounds.getBoundingClientRect();
        const targetRect = state.currentTarget.getBoundingClientRect();
        const _bounds = {
          left: boundRect.left - targetRect.left + state.offset[0],
          right: boundRect.right - targetRect.right + state.offset[0],
          top: boundRect.top - targetRect.top + state.offset[1],
          bottom: boundRect.bottom - targetRect.bottom + state.offset[1]
        };
        state._bounds = coordinatesConfigResolver.bounds(_bounds);
      }
    }
    cancel() {
      const state = this.state;
      if (state.canceled) return;
      state.canceled = true;
      state._active = false;
      setTimeout(() => {
        this.compute();
        this.emit();
      }, 0);
    }
    setActive() {
      this.state._active = this.state._pointerActive || this.state._keyboardActive;
    }
    clean() {
      this.pointerClean();
      this.state._pointerActive = false;
      this.state._keyboardActive = false;
      super.clean();
    }
    pointerDown(event) {
      const config = this.config;
      const state = this.state;
      if (event.buttons != null && (Array.isArray(config.pointerButtons) ? !config.pointerButtons.includes(event.buttons) : config.pointerButtons !== -1 && config.pointerButtons !== event.buttons)) return;
      const ctrlIds = this.ctrl.setEventIds(event);
      if (config.pointerCapture) {
        event.target.setPointerCapture(event.pointerId);
      }
      if (ctrlIds && ctrlIds.size > 1 && state._pointerActive) return;
      this.start(event);
      this.setupPointer(event);
      state._pointerId = pointerId(event);
      state._pointerActive = true;
      this.computeValues(pointerValues(event));
      this.computeInitial();
      if (config.preventScrollAxis && getPointerType(event) !== "mouse") {
        state._active = false;
        this.setupScrollPrevention(event);
      } else if (config.delay > 0) {
        this.setupDelayTrigger(event);
        if (config.triggerAllEvents) {
          this.compute(event);
          this.emit();
        }
      } else {
        this.startPointerDrag(event);
      }
    }
    startPointerDrag(event) {
      const state = this.state;
      state._active = true;
      state._preventScroll = true;
      state._delayed = false;
      this.compute(event);
      this.emit();
    }
    pointerMove(event) {
      const state = this.state;
      const config = this.config;
      if (!state._pointerActive) return;
      const id3 = pointerId(event);
      if (state._pointerId !== void 0 && id3 !== state._pointerId) return;
      const _values = pointerValues(event);
      if (document.pointerLockElement === event.target) {
        state._delta = [event.movementX, event.movementY];
      } else {
        state._delta = V.sub(_values, state._values);
        this.computeValues(_values);
      }
      V.addTo(state._movement, state._delta);
      this.compute(event);
      if (state._delayed && state.intentional) {
        this.timeoutStore.remove("dragDelay");
        state.active = false;
        this.startPointerDrag(event);
        return;
      }
      if (config.preventScrollAxis && !state._preventScroll) {
        if (state.axis) {
          if (state.axis === config.preventScrollAxis || config.preventScrollAxis === "xy") {
            state._active = false;
            this.clean();
            return;
          } else {
            this.timeoutStore.remove("startPointerDrag");
            this.startPointerDrag(event);
            return;
          }
        } else {
          return;
        }
      }
      this.emit();
    }
    pointerUp(event) {
      this.ctrl.setEventIds(event);
      try {
        if (this.config.pointerCapture && event.target.hasPointerCapture(event.pointerId)) {
          ;
          event.target.releasePointerCapture(event.pointerId);
        }
      } catch (_unused) {
        if (true) {
          console.warn(`[@use-gesture]: If you see this message, it's likely that you're using an outdated version of \`@react-three/fiber\`. 

Please upgrade to the latest version.`);
        }
      }
      const state = this.state;
      const config = this.config;
      if (!state._active || !state._pointerActive) return;
      const id3 = pointerId(event);
      if (state._pointerId !== void 0 && id3 !== state._pointerId) return;
      this.state._pointerActive = false;
      this.setActive();
      this.compute(event);
      const [dx, dy] = state._distance;
      state.tap = dx <= config.tapsThreshold && dy <= config.tapsThreshold;
      if (state.tap && config.filterTaps) {
        state._force = true;
      } else {
        const [_dx, _dy] = state._delta;
        const [_mx, _my] = state._movement;
        const [svx, svy] = config.swipe.velocity;
        const [sx, sy] = config.swipe.distance;
        const sdt = config.swipe.duration;
        if (state.elapsedTime < sdt) {
          const _vx = Math.abs(_dx / state.timeDelta);
          const _vy = Math.abs(_dy / state.timeDelta);
          if (_vx > svx && Math.abs(_mx) > sx) state.swipe[0] = Math.sign(_dx);
          if (_vy > svy && Math.abs(_my) > sy) state.swipe[1] = Math.sign(_dy);
        }
      }
      this.emit();
    }
    pointerClick(event) {
      if (!this.state.tap && event.detail > 0) {
        event.preventDefault();
        event.stopPropagation();
      }
    }
    setupPointer(event) {
      const config = this.config;
      const device = config.device;
      if (true) {
        try {
          if (device === "pointer" && config.preventScrollDelay === void 0) {
            const currentTarget = "uv" in event ? event.sourceEvent.currentTarget : event.currentTarget;
            const style2 = window.getComputedStyle(currentTarget);
            if (style2.touchAction === "auto") {
              console.warn(`[@use-gesture]: The drag target has its \`touch-action\` style property set to \`auto\`. It is recommended to add \`touch-action: 'none'\` so that the drag gesture behaves correctly on touch-enabled devices. For more information read this: https://use-gesture.netlify.app/docs/extras/#touch-action.

This message will only show in development mode. It won't appear in production. If this is intended, you can ignore it.`, currentTarget);
            }
          }
        } catch (_unused2) {
        }
      }
      if (config.pointerLock) {
        event.currentTarget.requestPointerLock();
      }
      if (!config.pointerCapture) {
        this.eventStore.add(this.sharedConfig.window, device, "change", this.pointerMove.bind(this));
        this.eventStore.add(this.sharedConfig.window, device, "end", this.pointerUp.bind(this));
        this.eventStore.add(this.sharedConfig.window, device, "cancel", this.pointerUp.bind(this));
      }
    }
    pointerClean() {
      if (this.config.pointerLock && document.pointerLockElement === this.state.currentTarget) {
        document.exitPointerLock();
      }
    }
    preventScroll(event) {
      if (this.state._preventScroll && event.cancelable) {
        event.preventDefault();
      }
    }
    setupScrollPrevention(event) {
      this.state._preventScroll = false;
      persistEvent(event);
      const remove = this.eventStore.add(this.sharedConfig.window, "touch", "change", this.preventScroll.bind(this), {
        passive: false
      });
      this.eventStore.add(this.sharedConfig.window, "touch", "end", remove);
      this.eventStore.add(this.sharedConfig.window, "touch", "cancel", remove);
      this.timeoutStore.add("startPointerDrag", this.startPointerDrag.bind(this), this.config.preventScrollDelay, event);
    }
    setupDelayTrigger(event) {
      this.state._delayed = true;
      this.timeoutStore.add("dragDelay", () => {
        this.state._step = [0, 0];
        this.startPointerDrag(event);
      }, this.config.delay);
    }
    keyDown(event) {
      const deltaFn = KEYS_DELTA_MAP[event.key];
      if (deltaFn) {
        const state = this.state;
        const factor = event.shiftKey ? 10 : event.altKey ? 0.1 : 1;
        this.start(event);
        state._delta = deltaFn(this.config.keyboardDisplacement, factor);
        state._keyboardActive = true;
        V.addTo(state._movement, state._delta);
        this.compute(event);
        this.emit();
      }
    }
    keyUp(event) {
      if (!(event.key in KEYS_DELTA_MAP)) return;
      this.state._keyboardActive = false;
      this.setActive();
      this.compute(event);
      this.emit();
    }
    bind(bindFunction) {
      const device = this.config.device;
      bindFunction(device, "start", this.pointerDown.bind(this));
      if (this.config.pointerCapture) {
        bindFunction(device, "change", this.pointerMove.bind(this));
        bindFunction(device, "end", this.pointerUp.bind(this));
        bindFunction(device, "cancel", this.pointerUp.bind(this));
        bindFunction("lostPointerCapture", "", this.pointerUp.bind(this));
      }
      if (this.config.keys) {
        bindFunction("key", "down", this.keyDown.bind(this));
        bindFunction("key", "up", this.keyUp.bind(this));
      }
      if (this.config.filterTaps) {
        bindFunction("click", "", this.pointerClick.bind(this), {
          capture: true,
          passive: false
        });
      }
    }
  };
  function persistEvent(event) {
    "persist" in event && typeof event.persist === "function" && event.persist();
  }
  var isBrowser3 = typeof window !== "undefined" && window.document && window.document.createElement;
  function supportsTouchEvents() {
    return isBrowser3 && "ontouchstart" in window;
  }
  function isTouchScreen() {
    return supportsTouchEvents() || isBrowser3 && window.navigator.maxTouchPoints > 1;
  }
  function supportsPointerEvents() {
    return isBrowser3 && "onpointerdown" in window;
  }
  function supportsPointerLock() {
    return isBrowser3 && "exitPointerLock" in window.document;
  }
  function supportsGestureEvents() {
    try {
      return "constructor" in GestureEvent;
    } catch (e3) {
      return false;
    }
  }
  var SUPPORT = {
    isBrowser: isBrowser3,
    gesture: supportsGestureEvents(),
    touch: supportsTouchEvents(),
    touchscreen: isTouchScreen(),
    pointer: supportsPointerEvents(),
    pointerLock: supportsPointerLock()
  };
  var DEFAULT_PREVENT_SCROLL_DELAY = 250;
  var DEFAULT_DRAG_DELAY = 180;
  var DEFAULT_SWIPE_VELOCITY = 0.5;
  var DEFAULT_SWIPE_DISTANCE = 50;
  var DEFAULT_SWIPE_DURATION = 250;
  var DEFAULT_KEYBOARD_DISPLACEMENT = 10;
  var DEFAULT_DRAG_AXIS_THRESHOLD = {
    mouse: 0,
    touch: 0,
    pen: 8
  };
  var dragConfigResolver = _objectSpread2(_objectSpread2({}, coordinatesConfigResolver), {}, {
    device(_v, _k, {
      pointer: {
        touch = false,
        lock: lock2 = false,
        mouse = false
      } = {}
    }) {
      this.pointerLock = lock2 && SUPPORT.pointerLock;
      if (SUPPORT.touch && touch) return "touch";
      if (this.pointerLock) return "mouse";
      if (SUPPORT.pointer && !mouse) return "pointer";
      if (SUPPORT.touch) return "touch";
      return "mouse";
    },
    preventScrollAxis(value, _k, {
      preventScroll
    }) {
      this.preventScrollDelay = typeof preventScroll === "number" ? preventScroll : preventScroll || preventScroll === void 0 && value ? DEFAULT_PREVENT_SCROLL_DELAY : void 0;
      if (!SUPPORT.touchscreen || preventScroll === false) return void 0;
      return value ? value : preventScroll !== void 0 ? "y" : void 0;
    },
    pointerCapture(_v, _k, {
      pointer: {
        capture = true,
        buttons = 1,
        keys = true
      } = {}
    }) {
      this.pointerButtons = buttons;
      this.keys = keys;
      return !this.pointerLock && this.device === "pointer" && capture;
    },
    threshold(value, _k, {
      filterTaps = false,
      tapsThreshold = 3,
      axis = void 0
    }) {
      const threshold = V.toVector(value, filterTaps ? tapsThreshold : axis ? 1 : 0);
      this.filterTaps = filterTaps;
      this.tapsThreshold = tapsThreshold;
      return threshold;
    },
    swipe({
      velocity = DEFAULT_SWIPE_VELOCITY,
      distance: distance2 = DEFAULT_SWIPE_DISTANCE,
      duration = DEFAULT_SWIPE_DURATION
    } = {}) {
      return {
        velocity: this.transform(V.toVector(velocity)),
        distance: this.transform(V.toVector(distance2)),
        duration
      };
    },
    delay(value = 0) {
      switch (value) {
        case true:
          return DEFAULT_DRAG_DELAY;
        case false:
          return 0;
        default:
          return value;
      }
    },
    axisThreshold(value) {
      if (!value) return DEFAULT_DRAG_AXIS_THRESHOLD;
      return _objectSpread2(_objectSpread2({}, DEFAULT_DRAG_AXIS_THRESHOLD), value);
    },
    keyboardDisplacement(value = DEFAULT_KEYBOARD_DISPLACEMENT) {
      return value;
    }
  });
  if (true) {
    Object.assign(dragConfigResolver, {
      useTouch(value) {
        if (value !== void 0) {
          throw Error(`[@use-gesture]: \`useTouch\` option has been renamed to \`pointer.touch\`. Use it as in \`{ pointer: { touch: true } }\`.`);
        }
        return NaN;
      },
      experimental_preventWindowScrollY(value) {
        if (value !== void 0) {
          throw Error(`[@use-gesture]: \`experimental_preventWindowScrollY\` option has been renamed to \`preventScroll\`.`);
        }
        return NaN;
      },
      swipeVelocity(value) {
        if (value !== void 0) {
          throw Error(`[@use-gesture]: \`swipeVelocity\` option has been renamed to \`swipe.velocity\`. Use it as in \`{ swipe: { velocity: 0.5 } }\`.`);
        }
        return NaN;
      },
      swipeDistance(value) {
        if (value !== void 0) {
          throw Error(`[@use-gesture]: \`swipeDistance\` option has been renamed to \`swipe.distance\`. Use it as in \`{ swipe: { distance: 50 } }\`.`);
        }
        return NaN;
      },
      swipeDuration(value) {
        if (value !== void 0) {
          throw Error(`[@use-gesture]: \`swipeDuration\` option has been renamed to \`swipe.duration\`. Use it as in \`{ swipe: { duration: 250 } }\`.`);
        }
        return NaN;
      }
    });
  }
  var pinchConfigResolver = _objectSpread2(_objectSpread2({}, commonConfigResolver), {}, {
    device(_v, _k, {
      shared,
      pointer: {
        touch = false
      } = {}
    }) {
      const sharedConfig = shared;
      if (sharedConfig.target && !SUPPORT.touch && SUPPORT.gesture) return "gesture";
      if (SUPPORT.touch && touch) return "touch";
      if (SUPPORT.touchscreen) {
        if (SUPPORT.pointer) return "pointer";
        if (SUPPORT.touch) return "touch";
      }
    },
    bounds(_v, _k, {
      scaleBounds = {},
      angleBounds = {}
    }) {
      const _scaleBounds = (state) => {
        const D = assignDefault(call(scaleBounds, state), {
          min: -Infinity,
          max: Infinity
        });
        return [D.min, D.max];
      };
      const _angleBounds = (state) => {
        const A = assignDefault(call(angleBounds, state), {
          min: -Infinity,
          max: Infinity
        });
        return [A.min, A.max];
      };
      if (typeof scaleBounds !== "function" && typeof angleBounds !== "function") return [_scaleBounds(), _angleBounds()];
      return (state) => [_scaleBounds(state), _angleBounds(state)];
    },
    threshold(value, _k, config) {
      this.lockDirection = config.axis === "lock";
      const threshold = V.toVector(value, this.lockDirection ? [0.1, 3] : 0);
      return threshold;
    },
    modifierKey(value) {
      if (value === void 0) return "ctrlKey";
      return value;
    },
    pinchOnWheel(value = true) {
      return value;
    }
  });
  var moveConfigResolver = _objectSpread2(_objectSpread2({}, coordinatesConfigResolver), {}, {
    mouseOnly: (value = true) => value
  });
  var hoverConfigResolver = _objectSpread2(_objectSpread2({}, coordinatesConfigResolver), {}, {
    mouseOnly: (value = true) => value
  });
  var EngineMap = /* @__PURE__ */ new Map();
  var ConfigResolverMap = /* @__PURE__ */ new Map();
  function registerAction(action) {
    EngineMap.set(action.key, action.engine);
    ConfigResolverMap.set(action.key, action.resolver);
  }
  var dragAction = {
    key: "drag",
    engine: DragEngine,
    resolver: dragConfigResolver
  };

  // node_modules/@use-gesture/react/dist/use-gesture-react.esm.js
  var import_react92 = __toESM(require_react());

  // node_modules/@use-gesture/core/dist/use-gesture-core.esm.js
  function _objectWithoutPropertiesLoose(source, excluded) {
    if (source == null) return {};
    var target = {};
    var sourceKeys = Object.keys(source);
    var key, i3;
    for (i3 = 0; i3 < sourceKeys.length; i3++) {
      key = sourceKeys[i3];
      if (excluded.indexOf(key) >= 0) continue;
      target[key] = source[key];
    }
    return target;
  }
  function _objectWithoutProperties(source, excluded) {
    if (source == null) return {};
    var target = _objectWithoutPropertiesLoose(source, excluded);
    var key, i3;
    if (Object.getOwnPropertySymbols) {
      var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
      for (i3 = 0; i3 < sourceSymbolKeys.length; i3++) {
        key = sourceSymbolKeys[i3];
        if (excluded.indexOf(key) >= 0) continue;
        if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
        target[key] = source[key];
      }
    }
    return target;
  }
  var sharedConfigResolver = {
    target(value) {
      if (value) {
        return () => "current" in value ? value.current : value;
      }
      return void 0;
    },
    enabled(value = true) {
      return value;
    },
    window(value = SUPPORT.isBrowser ? window : void 0) {
      return value;
    },
    eventOptions({
      passive = true,
      capture = false
    } = {}) {
      return {
        passive,
        capture
      };
    },
    transform(value) {
      return value;
    }
  };
  var _excluded = ["target", "eventOptions", "window", "enabled", "transform"];
  function resolveWith(config = {}, resolvers) {
    const result = {};
    for (const [key, resolver] of Object.entries(resolvers)) {
      switch (typeof resolver) {
        case "function":
          if (true) {
            const r4 = resolver.call(result, config[key], key, config);
            if (!Number.isNaN(r4)) result[key] = r4;
          } else {
            result[key] = resolver.call(result, config[key], key, config);
          }
          break;
        case "object":
          result[key] = resolveWith(config[key], resolver);
          break;
        case "boolean":
          if (resolver) result[key] = config[key];
          break;
      }
    }
    return result;
  }
  function parse2(newConfig, gestureKey, _config = {}) {
    const _ref11 = newConfig, {
      target,
      eventOptions,
      window: window2,
      enabled,
      transform
    } = _ref11, rest = _objectWithoutProperties(_ref11, _excluded);
    _config.shared = resolveWith({
      target,
      eventOptions,
      window: window2,
      enabled,
      transform
    }, sharedConfigResolver);
    if (gestureKey) {
      const resolver = ConfigResolverMap.get(gestureKey);
      _config[gestureKey] = resolveWith(_objectSpread2({
        shared: _config.shared
      }, rest), resolver);
    } else {
      for (const key in rest) {
        const resolver = ConfigResolverMap.get(key);
        if (resolver) {
          _config[key] = resolveWith(_objectSpread2({
            shared: _config.shared
          }, rest[key]), resolver);
        } else if (true) {
          if (!["drag", "pinch", "scroll", "wheel", "move", "hover"].includes(key)) {
            if (key === "domTarget") {
              throw Error(`[@use-gesture]: \`domTarget\` option has been renamed to \`target\`.`);
            }
            console.warn(`[@use-gesture]: Unknown config key \`${key}\` was used. Please read the documentation for further information.`);
          }
        }
      }
    }
    return _config;
  }
  var EventStore = class {
    constructor(ctrl, gestureKey) {
      _defineProperty(this, "_listeners", /* @__PURE__ */ new Set());
      this._ctrl = ctrl;
      this._gestureKey = gestureKey;
    }
    add(element, device, action, handler, options2) {
      const listeners = this._listeners;
      const type = toDomEventType(device, action);
      const _options = this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {};
      const eventOptions = _objectSpread2(_objectSpread2({}, _options), options2);
      element.addEventListener(type, handler, eventOptions);
      const remove = () => {
        element.removeEventListener(type, handler, eventOptions);
        listeners.delete(remove);
      };
      listeners.add(remove);
      return remove;
    }
    clean() {
      this._listeners.forEach((remove) => remove());
      this._listeners.clear();
    }
  };
  var TimeoutStore = class {
    constructor() {
      _defineProperty(this, "_timeouts", /* @__PURE__ */ new Map());
    }
    add(key, callback, ms = 140, ...args) {
      this.remove(key);
      this._timeouts.set(key, window.setTimeout(callback, ms, ...args));
    }
    remove(key) {
      const timeout = this._timeouts.get(key);
      if (timeout) window.clearTimeout(timeout);
    }
    clean() {
      this._timeouts.forEach((timeout) => void window.clearTimeout(timeout));
      this._timeouts.clear();
    }
  };
  var Controller = class {
    constructor(handlers) {
      _defineProperty(this, "gestures", /* @__PURE__ */ new Set());
      _defineProperty(this, "_targetEventStore", new EventStore(this));
      _defineProperty(this, "gestureEventStores", {});
      _defineProperty(this, "gestureTimeoutStores", {});
      _defineProperty(this, "handlers", {});
      _defineProperty(this, "config", {});
      _defineProperty(this, "pointerIds", /* @__PURE__ */ new Set());
      _defineProperty(this, "touchIds", /* @__PURE__ */ new Set());
      _defineProperty(this, "state", {
        shared: {
          shiftKey: false,
          metaKey: false,
          ctrlKey: false,
          altKey: false
        }
      });
      resolveGestures(this, handlers);
    }
    setEventIds(event) {
      if (isTouch(event)) {
        this.touchIds = new Set(touchIds(event));
        return this.touchIds;
      } else if ("pointerId" in event) {
        if (event.type === "pointerup" || event.type === "pointercancel") this.pointerIds.delete(event.pointerId);
        else if (event.type === "pointerdown") this.pointerIds.add(event.pointerId);
        return this.pointerIds;
      }
    }
    applyHandlers(handlers, nativeHandlers) {
      this.handlers = handlers;
      this.nativeHandlers = nativeHandlers;
    }
    applyConfig(config, gestureKey) {
      this.config = parse2(config, gestureKey, this.config);
    }
    clean() {
      this._targetEventStore.clean();
      for (const key of this.gestures) {
        this.gestureEventStores[key].clean();
        this.gestureTimeoutStores[key].clean();
      }
    }
    effect() {
      if (this.config.shared.target) this.bind();
      return () => this._targetEventStore.clean();
    }
    bind(...args) {
      const sharedConfig = this.config.shared;
      const props = {};
      let target;
      if (sharedConfig.target) {
        target = sharedConfig.target();
        if (!target) return;
      }
      if (sharedConfig.enabled) {
        for (const gestureKey of this.gestures) {
          const gestureConfig = this.config[gestureKey];
          const bindFunction = bindToProps(props, gestureConfig.eventOptions, !!target);
          if (gestureConfig.enabled) {
            const Engine2 = EngineMap.get(gestureKey);
            new Engine2(this, args, gestureKey).bind(bindFunction);
          }
        }
        const nativeBindFunction = bindToProps(props, sharedConfig.eventOptions, !!target);
        for (const eventKey in this.nativeHandlers) {
          nativeBindFunction(eventKey, "", (event) => this.nativeHandlers[eventKey](_objectSpread2(_objectSpread2({}, this.state.shared), {}, {
            event,
            args
          })), void 0, true);
        }
      }
      for (const handlerProp in props) {
        props[handlerProp] = chain2(...props[handlerProp]);
      }
      if (!target) return props;
      for (const handlerProp in props) {
        const {
          device,
          capture,
          passive
        } = parseProp(handlerProp);
        this._targetEventStore.add(target, device, "", props[handlerProp], {
          capture,
          passive
        });
      }
    }
  };
  function setupGesture2(ctrl, gestureKey) {
    ctrl.gestures.add(gestureKey);
    ctrl.gestureEventStores[gestureKey] = new EventStore(ctrl, gestureKey);
    ctrl.gestureTimeoutStores[gestureKey] = new TimeoutStore();
  }
  function resolveGestures(ctrl, internalHandlers) {
    if (internalHandlers.drag) setupGesture2(ctrl, "drag");
    if (internalHandlers.wheel) setupGesture2(ctrl, "wheel");
    if (internalHandlers.scroll) setupGesture2(ctrl, "scroll");
    if (internalHandlers.move) setupGesture2(ctrl, "move");
    if (internalHandlers.pinch) setupGesture2(ctrl, "pinch");
    if (internalHandlers.hover) setupGesture2(ctrl, "hover");
  }
  var bindToProps = (props, eventOptions, withPassiveOption) => (device, action, handler, options2 = {}, isNative = false) => {
    var _options$capture, _options$passive;
    const capture = (_options$capture = options2.capture) !== null && _options$capture !== void 0 ? _options$capture : eventOptions.capture;
    const passive = (_options$passive = options2.passive) !== null && _options$passive !== void 0 ? _options$passive : eventOptions.passive;
    let handlerProp = isNative ? device : toHandlerProp(device, action, capture);
    if (withPassiveOption && passive) handlerProp += "Passive";
    props[handlerProp] = props[handlerProp] || [];
    props[handlerProp].push(handler);
  };

  // node_modules/@use-gesture/react/dist/use-gesture-react.esm.js
  function useRecognizers(handlers, config = {}, gestureKey, nativeHandlers) {
    const ctrl = import_react92.default.useMemo(() => new Controller(handlers), []);
    ctrl.applyHandlers(handlers, nativeHandlers);
    ctrl.applyConfig(config, gestureKey);
    import_react92.default.useEffect(ctrl.effect.bind(ctrl));
    import_react92.default.useEffect(() => {
      return ctrl.clean.bind(ctrl);
    }, []);
    if (config.target === void 0) {
      return ctrl.bind.bind(ctrl);
    }
    return void 0;
  }
  function useDrag(handler, config) {
    registerAction(dragAction);
    return useRecognizers({
      drag: handler
    }, config || {}, "drag");
  }

  // packages/components/build-module/input-control/input-field.mjs
  var import_element30 = __toESM(require_element(), 1);

  // packages/components/build-module/input-control/utils.mjs
  var import_element28 = __toESM(require_element(), 1);
  function getDragCursor(dragDirection) {
    let dragCursor = "ns-resize";
    switch (dragDirection) {
      case "n":
      case "s":
        dragCursor = "ns-resize";
        break;
      case "e":
      case "w":
        dragCursor = "ew-resize";
        break;
    }
    return dragCursor;
  }
  function useDragCursor(isDragging2, dragDirection) {
    const dragCursor = getDragCursor(dragDirection);
    (0, import_element28.useEffect)(() => {
      if (isDragging2) {
        document.documentElement.style.cursor = dragCursor;
      } else {
        document.documentElement.style.cursor = null;
      }
    }, [isDragging2, dragCursor]);
    return dragCursor;
  }
  function useDraft(props) {
    const previousValueRef = (0, import_element28.useRef)(props.value);
    const [draft, setDraft] = (0, import_element28.useState)({});
    const value = draft.value !== void 0 ? draft.value : props.value;
    (0, import_element28.useLayoutEffect)(() => {
      const {
        current: previousValue
      } = previousValueRef;
      previousValueRef.current = props.value;
      if (draft.value !== void 0 && !draft.isStale) {
        setDraft({
          ...draft,
          isStale: true
        });
      } else if (draft.isStale && props.value !== previousValue) {
        setDraft({});
      }
    }, [props.value, draft]);
    const onChange = (nextValue, extra) => {
      setDraft((current) => Object.assign(current, {
        value: nextValue,
        isStale: false
      }));
      props.onChange(nextValue, extra);
    };
    const onBlur = (event) => {
      setDraft({});
      props.onBlur?.(event);
    };
    return {
      value,
      onBlur,
      onChange
    };
  }

  // packages/components/build-module/input-control/reducer/reducer.mjs
  var import_element29 = __toESM(require_element(), 1);

  // packages/components/build-module/input-control/reducer/state.mjs
  var initialStateReducer = (state) => state;
  var initialInputControlState = {
    error: null,
    initialValue: "",
    isDirty: false,
    isDragEnabled: false,
    isDragging: false,
    isPressEnterToChange: false,
    value: ""
  };

  // packages/components/build-module/input-control/reducer/actions.mjs
  var CHANGE = "CHANGE";
  var COMMIT = "COMMIT";
  var CONTROL = "CONTROL";
  var DRAG_END = "DRAG_END";
  var DRAG_START = "DRAG_START";
  var DRAG = "DRAG";
  var INVALIDATE = "INVALIDATE";
  var PRESS_DOWN = "PRESS_DOWN";
  var PRESS_ENTER = "PRESS_ENTER";
  var PRESS_UP = "PRESS_UP";
  var RESET = "RESET";

  // packages/components/build-module/input-control/reducer/reducer.mjs
  function mergeInitialState(initialState = initialInputControlState) {
    const {
      value
    } = initialState;
    return {
      ...initialInputControlState,
      ...initialState,
      initialValue: value
    };
  }
  function inputControlStateReducer(composedStateReducers) {
    return (state, action) => {
      const nextState = {
        ...state
      };
      switch (action.type) {
        /*
         * Controlled updates
         */
        case CONTROL:
          nextState.value = action.payload.value;
          nextState.isDirty = false;
          nextState._event = void 0;
          return nextState;
        /**
         * Keyboard events
         */
        case PRESS_UP:
          nextState.isDirty = false;
          break;
        case PRESS_DOWN:
          nextState.isDirty = false;
          break;
        /**
         * Drag events
         */
        case DRAG_START:
          nextState.isDragging = true;
          break;
        case DRAG_END:
          nextState.isDragging = false;
          break;
        /**
         * Input events
         */
        case CHANGE:
          nextState.error = null;
          nextState.value = action.payload.value;
          if (state.isPressEnterToChange) {
            nextState.isDirty = true;
          }
          break;
        case COMMIT:
          nextState.value = action.payload.value;
          nextState.isDirty = false;
          break;
        case RESET:
          nextState.error = null;
          nextState.isDirty = false;
          nextState.value = action.payload.value || state.initialValue;
          break;
        /**
         * Validation
         */
        case INVALIDATE:
          nextState.error = action.payload.error;
          break;
      }
      nextState._event = action.payload.event;
      return composedStateReducers(nextState, action);
    };
  }
  function useInputControlStateReducer(stateReducer = initialStateReducer, initialState = initialInputControlState, onChangeHandler) {
    const [state, dispatch] = (0, import_element29.useReducer)(inputControlStateReducer(stateReducer), mergeInitialState(initialState));
    const createChangeEvent = (type) => (nextValue, event) => {
      dispatch({
        type,
        payload: {
          value: nextValue,
          event
        }
      });
    };
    const createKeyEvent = (type) => (event) => {
      dispatch({
        type,
        payload: {
          event
        }
      });
    };
    const createDragEvent = (type) => (payload) => {
      dispatch({
        type,
        payload
      });
    };
    const change = createChangeEvent(CHANGE);
    const invalidate = (error, event) => dispatch({
      type: INVALIDATE,
      payload: {
        error,
        event
      }
    });
    const reset = createChangeEvent(RESET);
    const commit = createChangeEvent(COMMIT);
    const dragStart = createDragEvent(DRAG_START);
    const drag2 = createDragEvent(DRAG);
    const dragEnd = createDragEvent(DRAG_END);
    const pressUp = createKeyEvent(PRESS_UP);
    const pressDown = createKeyEvent(PRESS_DOWN);
    const pressEnter = createKeyEvent(PRESS_ENTER);
    const currentStateRef = (0, import_element29.useRef)(state);
    const refPropsRef = (0, import_element29.useRef)({
      value: initialState.value,
      onChangeHandler
    });
    (0, import_element29.useLayoutEffect)(() => {
      currentStateRef.current = state;
      refPropsRef.current = {
        value: initialState.value,
        onChangeHandler
      };
    });
    (0, import_element29.useLayoutEffect)(() => {
      if (currentStateRef.current._event !== void 0 && state.value !== refPropsRef.current.value && !state.isDirty) {
        refPropsRef.current.onChangeHandler(state.value ?? "", {
          event: currentStateRef.current._event
        });
      }
    }, [state.value, state.isDirty]);
    (0, import_element29.useLayoutEffect)(() => {
      if (initialState.value !== currentStateRef.current.value && !currentStateRef.current.isDirty) {
        dispatch({
          type: CONTROL,
          payload: {
            value: initialState.value ?? ""
          }
        });
      }
    }, [initialState.value]);
    return {
      change,
      commit,
      dispatch,
      drag: drag2,
      dragEnd,
      dragStart,
      invalidate,
      pressDown,
      pressEnter,
      pressUp,
      reset,
      state
    };
  }

  // packages/components/build-module/utils/with-ignore-ime-events.mjs
  function withIgnoreIMEEvents(handler) {
    return (event) => {
      const {
        isComposing
      } = "nativeEvent" in event ? event.nativeEvent : event;
      if (isComposing || // Workaround for Mac Safari where the final Enter/Backspace of an IME composition
      // is `isComposing=false`, even though it's technically still part of the composition.
      // These can only be detected by keyCode.
      event.keyCode === 229) {
        return;
      }
      handler(event);
    };
  }

  // packages/components/build-module/input-control/input-field.mjs
  var import_jsx_runtime90 = __toESM(require_jsx_runtime(), 1);
  var noop4 = () => {
  };
  function InputField({
    disabled = false,
    dragDirection = "n",
    dragThreshold = 10,
    id: id3,
    isDragEnabled = false,
    isPressEnterToChange = false,
    onBlur = noop4,
    onChange = noop4,
    onDrag = noop4,
    onDragEnd = noop4,
    onDragStart = noop4,
    onKeyDown = noop4,
    onValidate = noop4,
    size: size3 = "default",
    stateReducer = (state) => state,
    value: valueProp,
    type,
    ...props
  }, ref) {
    const {
      // State.
      state,
      // Actions.
      change,
      commit,
      drag: drag2,
      dragEnd,
      dragStart,
      invalidate,
      pressDown,
      pressEnter,
      pressUp,
      reset
    } = useInputControlStateReducer(stateReducer, {
      isDragEnabled,
      value: valueProp,
      isPressEnterToChange
    }, onChange);
    const {
      value,
      isDragging: isDragging2,
      isDirty
    } = state;
    const wasDirtyOnBlur = (0, import_element30.useRef)(false);
    const dragCursor = useDragCursor(isDragging2, dragDirection);
    const handleOnBlur = (event) => {
      onBlur(event);
      if (isDirty || !event.target.validity.valid) {
        wasDirtyOnBlur.current = true;
        handleOnCommit(event);
      }
    };
    const handleOnChange = (event) => {
      const nextValue = event.target.value;
      change(nextValue, event);
    };
    const handleOnCommit = (event) => {
      const nextValue = event.currentTarget.value;
      try {
        onValidate(nextValue);
        commit(nextValue, event);
      } catch (err) {
        invalidate(err, event);
      }
    };
    const handleOnKeyDown = (event) => {
      const {
        key
      } = event;
      onKeyDown(event);
      switch (key) {
        case "ArrowUp":
          pressUp(event);
          break;
        case "ArrowDown":
          pressDown(event);
          break;
        case "Enter":
          pressEnter(event);
          if (isPressEnterToChange) {
            event.preventDefault();
            handleOnCommit(event);
          }
          break;
        case "Escape":
          if (isPressEnterToChange && isDirty) {
            event.preventDefault();
            reset(valueProp, event);
          }
          break;
      }
    };
    const dragGestureProps = useDrag((dragProps2) => {
      const {
        distance: distance2,
        dragging,
        event,
        target
      } = dragProps2;
      dragProps2.event = {
        ...dragProps2.event,
        target
      };
      if (!distance2) {
        return;
      }
      event.stopPropagation();
      if (!dragging) {
        onDragEnd(dragProps2);
        dragEnd(dragProps2);
        return;
      }
      onDrag(dragProps2);
      drag2(dragProps2);
      if (!isDragging2) {
        onDragStart(dragProps2);
        dragStart(dragProps2);
      }
    }, {
      axis: dragDirection === "e" || dragDirection === "w" ? "x" : "y",
      threshold: dragThreshold,
      enabled: isDragEnabled,
      pointer: {
        capture: false
      }
    });
    const dragProps = isDragEnabled ? dragGestureProps() : {};
    return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Input, {
      ...props,
      ...dragProps,
      className: "components-input-control__input",
      disabled,
      dragCursor,
      isDragging: isDragging2,
      id: id3,
      onBlur: handleOnBlur,
      onChange: handleOnChange,
      onKeyDown: withIgnoreIMEEvents(handleOnKeyDown),
      ref,
      inputSize: size3,
      value: value ?? "",
      type
    });
  }
  var ForwardedComponent = (0, import_element30.forwardRef)(InputField);
  var input_field_default = ForwardedComponent;

  // packages/components/build-module/base-control/index.mjs
  var import_element31 = __toESM(require_element(), 1);

  // packages/components/build-module/base-control/styles/base-control-styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__7() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var Wrapper = /* @__PURE__ */ createStyled("div", false ? {
    target: "ej5x27r4"
  } : {
    target: "ej5x27r4",
    label: "Wrapper"
  })("font-family:", font("default.fontFamily"), ";font-size:", font("default.fontSize"), ";", boxSizingReset, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJhc2UtY29udHJvbC1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBWWlDIiwiZmlsZSI6ImJhc2UtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGJhc2VMYWJlbFR5cG9ncmFwaHksIGJveFNpemluZ1Jlc2V0LCBmb250LCBDT0xPUlMgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuZXhwb3J0IGNvbnN0IFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRmb250LWZhbWlseTogJHsgZm9udCggJ2RlZmF1bHQuZm9udEZhbWlseScgKSB9O1xuXHRmb250LXNpemU6ICR7IGZvbnQoICdkZWZhdWx0LmZvbnRTaXplJyApIH07XG5cblx0JHsgYm94U2l6aW5nUmVzZXQgfVxuYDtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZEZpZWxkID0gc3R5bGVkLmRpdmBcblx0LmNvbXBvbmVudHMtcGFuZWxfX3JvdyAmIHtcblx0XHRtYXJnaW4tYm90dG9tOiBpbmhlcml0O1xuXHR9XG5gO1xuXG5jb25zdCBsYWJlbFN0eWxlcyA9IGNzc2Bcblx0JHsgYmFzZUxhYmVsVHlwb2dyYXBoeSB9O1xuXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRtYXJnaW4tYm90dG9tOiAkeyBzcGFjZSggMiApIH07XG5cdC8qKlxuXHQgKiBSZW1vdmVzIENocm9tZS9TYWZhcmkvRmlyZWZveCB1c2VyIGFnZW50IHN0eWxlc2hlZXQgcGFkZGluZyBmcm9tXG5cdCAqIFN0eWxlZExhYmVsIHdoZW4gaXQgaXMgcmVuZGVyZWQgYXMgYSBsZWdlbmQuXG5cdCAqL1xuXHRwYWRkaW5nOiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZExhYmVsID0gc3R5bGVkLmxhYmVsYFxuXHQkeyBsYWJlbFN0eWxlcyB9XG5gO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkSGVscCA9IHN0eWxlZC5wYFxuXHRtYXJnaW4tdG9wOiAkeyBzcGFjZSggMiApIH07XG5cdG1hcmdpbi1ib3R0b206IDA7XG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2hlbHBUZXh0LmZvbnRTaXplJyApIH07XG5cdGZvbnQtc3R5bGU6IG5vcm1hbDtcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZFZpc3VhbExhYmVsID0gc3R5bGVkLnNwYW5gXG5cdCR7IGxhYmVsU3R5bGVzIH1cbmA7XG4iXX0= */"));
  var StyledField = /* @__PURE__ */ createStyled("div", false ? {
    target: "ej5x27r3"
  } : {
    target: "ej5x27r3",
    label: "StyledField"
  })(false ? {
    name: "1chyuqs",
    styles: ".components-panel__row &{margin-bottom:inherit;}"
  } : {
    name: "1chyuqs",
    styles: ".components-panel__row &{margin-bottom:inherit;}/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJhc2UtY29udHJvbC1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBbUJxQyIsImZpbGUiOiJiYXNlLWNvbnRyb2wtc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBiYXNlTGFiZWxUeXBvZ3JhcGh5LCBib3hTaXppbmdSZXNldCwgZm9udCwgQ09MT1JTIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi8uLi91dGlscy9zcGFjZSc7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0Zm9udC1mYW1pbHk6ICR7IGZvbnQoICdkZWZhdWx0LmZvbnRGYW1pbHknICkgfTtcblx0Zm9udC1zaXplOiAkeyBmb250KCAnZGVmYXVsdC5mb250U2l6ZScgKSB9O1xuXG5cdCR7IGJveFNpemluZ1Jlc2V0IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRGaWVsZCA9IHN0eWxlZC5kaXZgXG5cdC5jb21wb25lbnRzLXBhbmVsX19yb3cgJiB7XG5cdFx0bWFyZ2luLWJvdHRvbTogaW5oZXJpdDtcblx0fVxuYDtcblxuY29uc3QgbGFiZWxTdHlsZXMgPSBjc3NgXG5cdCR7IGJhc2VMYWJlbFR5cG9ncmFwaHkgfTtcblxuXHRkaXNwbGF5OiBibG9jaztcblx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDIgKSB9O1xuXHQvKipcblx0ICogUmVtb3ZlcyBDaHJvbWUvU2FmYXJpL0ZpcmVmb3ggdXNlciBhZ2VudCBzdHlsZXNoZWV0IHBhZGRpbmcgZnJvbVxuXHQgKiBTdHlsZWRMYWJlbCB3aGVuIGl0IGlzIHJlbmRlcmVkIGFzIGEgbGVnZW5kLlxuXHQgKi9cblx0cGFkZGluZzogMDtcbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRMYWJlbCA9IHN0eWxlZC5sYWJlbGBcblx0JHsgbGFiZWxTdHlsZXMgfVxuYDtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZEhlbHAgPSBzdHlsZWQucGBcblx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIDIgKSB9O1xuXHRtYXJnaW4tYm90dG9tOiAwO1xuXHRmb250LXNpemU6ICR7IGZvbnQoICdoZWxwVGV4dC5mb250U2l6ZScgKSB9O1xuXHRmb250LXN0eWxlOiBub3JtYWw7XG5cdGNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgNzAwIF0gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRWaXN1YWxMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHQkeyBsYWJlbFN0eWxlcyB9XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__7
  });
  var labelStyles = /* @__PURE__ */ css(baseLabelTypography, ";display:block;margin-bottom:", space(2), ";padding:0;" + (false ? "" : ";label:labelStyles;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJhc2UtY29udHJvbC1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBeUJ1QiIsImZpbGUiOiJiYXNlLWNvbnRyb2wtc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBiYXNlTGFiZWxUeXBvZ3JhcGh5LCBib3hTaXppbmdSZXNldCwgZm9udCwgQ09MT1JTIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi8uLi91dGlscy9zcGFjZSc7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0Zm9udC1mYW1pbHk6ICR7IGZvbnQoICdkZWZhdWx0LmZvbnRGYW1pbHknICkgfTtcblx0Zm9udC1zaXplOiAkeyBmb250KCAnZGVmYXVsdC5mb250U2l6ZScgKSB9O1xuXG5cdCR7IGJveFNpemluZ1Jlc2V0IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRGaWVsZCA9IHN0eWxlZC5kaXZgXG5cdC5jb21wb25lbnRzLXBhbmVsX19yb3cgJiB7XG5cdFx0bWFyZ2luLWJvdHRvbTogaW5oZXJpdDtcblx0fVxuYDtcblxuY29uc3QgbGFiZWxTdHlsZXMgPSBjc3NgXG5cdCR7IGJhc2VMYWJlbFR5cG9ncmFwaHkgfTtcblxuXHRkaXNwbGF5OiBibG9jaztcblx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDIgKSB9O1xuXHQvKipcblx0ICogUmVtb3ZlcyBDaHJvbWUvU2FmYXJpL0ZpcmVmb3ggdXNlciBhZ2VudCBzdHlsZXNoZWV0IHBhZGRpbmcgZnJvbVxuXHQgKiBTdHlsZWRMYWJlbCB3aGVuIGl0IGlzIHJlbmRlcmVkIGFzIGEgbGVnZW5kLlxuXHQgKi9cblx0cGFkZGluZzogMDtcbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRMYWJlbCA9IHN0eWxlZC5sYWJlbGBcblx0JHsgbGFiZWxTdHlsZXMgfVxuYDtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZEhlbHAgPSBzdHlsZWQucGBcblx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIDIgKSB9O1xuXHRtYXJnaW4tYm90dG9tOiAwO1xuXHRmb250LXNpemU6ICR7IGZvbnQoICdoZWxwVGV4dC5mb250U2l6ZScgKSB9O1xuXHRmb250LXN0eWxlOiBub3JtYWw7XG5cdGNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgNzAwIF0gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRWaXN1YWxMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHQkeyBsYWJlbFN0eWxlcyB9XG5gO1xuIl19 */");
  var StyledLabel = /* @__PURE__ */ createStyled("label", false ? {
    target: "ej5x27r2"
  } : {
    target: "ej5x27r2",
    label: "StyledLabel"
  })(labelStyles, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJhc2UtY29udHJvbC1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBcUN1QyIsImZpbGUiOiJiYXNlLWNvbnRyb2wtc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBiYXNlTGFiZWxUeXBvZ3JhcGh5LCBib3hTaXppbmdSZXNldCwgZm9udCwgQ09MT1JTIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi8uLi91dGlscy9zcGFjZSc7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0Zm9udC1mYW1pbHk6ICR7IGZvbnQoICdkZWZhdWx0LmZvbnRGYW1pbHknICkgfTtcblx0Zm9udC1zaXplOiAkeyBmb250KCAnZGVmYXVsdC5mb250U2l6ZScgKSB9O1xuXG5cdCR7IGJveFNpemluZ1Jlc2V0IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRGaWVsZCA9IHN0eWxlZC5kaXZgXG5cdC5jb21wb25lbnRzLXBhbmVsX19yb3cgJiB7XG5cdFx0bWFyZ2luLWJvdHRvbTogaW5oZXJpdDtcblx0fVxuYDtcblxuY29uc3QgbGFiZWxTdHlsZXMgPSBjc3NgXG5cdCR7IGJhc2VMYWJlbFR5cG9ncmFwaHkgfTtcblxuXHRkaXNwbGF5OiBibG9jaztcblx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDIgKSB9O1xuXHQvKipcblx0ICogUmVtb3ZlcyBDaHJvbWUvU2FmYXJpL0ZpcmVmb3ggdXNlciBhZ2VudCBzdHlsZXNoZWV0IHBhZGRpbmcgZnJvbVxuXHQgKiBTdHlsZWRMYWJlbCB3aGVuIGl0IGlzIHJlbmRlcmVkIGFzIGEgbGVnZW5kLlxuXHQgKi9cblx0cGFkZGluZzogMDtcbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRMYWJlbCA9IHN0eWxlZC5sYWJlbGBcblx0JHsgbGFiZWxTdHlsZXMgfVxuYDtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZEhlbHAgPSBzdHlsZWQucGBcblx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIDIgKSB9O1xuXHRtYXJnaW4tYm90dG9tOiAwO1xuXHRmb250LXNpemU6ICR7IGZvbnQoICdoZWxwVGV4dC5mb250U2l6ZScgKSB9O1xuXHRmb250LXN0eWxlOiBub3JtYWw7XG5cdGNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgNzAwIF0gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRWaXN1YWxMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHQkeyBsYWJlbFN0eWxlcyB9XG5gO1xuIl19 */"));
  var StyledHelp = /* @__PURE__ */ createStyled("p", false ? {
    target: "ej5x27r1"
  } : {
    target: "ej5x27r1",
    label: "StyledHelp"
  })("margin-top:", space(2), ";margin-bottom:0;font-size:", font("helpText.fontSize"), ";font-style:normal;color:", COLORS.gray[700], ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJhc2UtY29udHJvbC1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBeUNrQyIsImZpbGUiOiJiYXNlLWNvbnRyb2wtc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBiYXNlTGFiZWxUeXBvZ3JhcGh5LCBib3hTaXppbmdSZXNldCwgZm9udCwgQ09MT1JTIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi8uLi91dGlscy9zcGFjZSc7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0Zm9udC1mYW1pbHk6ICR7IGZvbnQoICdkZWZhdWx0LmZvbnRGYW1pbHknICkgfTtcblx0Zm9udC1zaXplOiAkeyBmb250KCAnZGVmYXVsdC5mb250U2l6ZScgKSB9O1xuXG5cdCR7IGJveFNpemluZ1Jlc2V0IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRGaWVsZCA9IHN0eWxlZC5kaXZgXG5cdC5jb21wb25lbnRzLXBhbmVsX19yb3cgJiB7XG5cdFx0bWFyZ2luLWJvdHRvbTogaW5oZXJpdDtcblx0fVxuYDtcblxuY29uc3QgbGFiZWxTdHlsZXMgPSBjc3NgXG5cdCR7IGJhc2VMYWJlbFR5cG9ncmFwaHkgfTtcblxuXHRkaXNwbGF5OiBibG9jaztcblx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDIgKSB9O1xuXHQvKipcblx0ICogUmVtb3ZlcyBDaHJvbWUvU2FmYXJpL0ZpcmVmb3ggdXNlciBhZ2VudCBzdHlsZXNoZWV0IHBhZGRpbmcgZnJvbVxuXHQgKiBTdHlsZWRMYWJlbCB3aGVuIGl0IGlzIHJlbmRlcmVkIGFzIGEgbGVnZW5kLlxuXHQgKi9cblx0cGFkZGluZzogMDtcbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRMYWJlbCA9IHN0eWxlZC5sYWJlbGBcblx0JHsgbGFiZWxTdHlsZXMgfVxuYDtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZEhlbHAgPSBzdHlsZWQucGBcblx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIDIgKSB9O1xuXHRtYXJnaW4tYm90dG9tOiAwO1xuXHRmb250LXNpemU6ICR7IGZvbnQoICdoZWxwVGV4dC5mb250U2l6ZScgKSB9O1xuXHRmb250LXN0eWxlOiBub3JtYWw7XG5cdGNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgNzAwIF0gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRWaXN1YWxMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHQkeyBsYWJlbFN0eWxlcyB9XG5gO1xuIl19 */"));
  var StyledVisualLabel = /* @__PURE__ */ createStyled("span", false ? {
    target: "ej5x27r0"
  } : {
    target: "ej5x27r0",
    label: "StyledVisualLabel"
  })(labelStyles, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJhc2UtY29udHJvbC1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBaUQ0QyIsImZpbGUiOiJiYXNlLWNvbnRyb2wtc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBiYXNlTGFiZWxUeXBvZ3JhcGh5LCBib3hTaXppbmdSZXNldCwgZm9udCwgQ09MT1JTIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi8uLi91dGlscy9zcGFjZSc7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0Zm9udC1mYW1pbHk6ICR7IGZvbnQoICdkZWZhdWx0LmZvbnRGYW1pbHknICkgfTtcblx0Zm9udC1zaXplOiAkeyBmb250KCAnZGVmYXVsdC5mb250U2l6ZScgKSB9O1xuXG5cdCR7IGJveFNpemluZ1Jlc2V0IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRGaWVsZCA9IHN0eWxlZC5kaXZgXG5cdC5jb21wb25lbnRzLXBhbmVsX19yb3cgJiB7XG5cdFx0bWFyZ2luLWJvdHRvbTogaW5oZXJpdDtcblx0fVxuYDtcblxuY29uc3QgbGFiZWxTdHlsZXMgPSBjc3NgXG5cdCR7IGJhc2VMYWJlbFR5cG9ncmFwaHkgfTtcblxuXHRkaXNwbGF5OiBibG9jaztcblx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDIgKSB9O1xuXHQvKipcblx0ICogUmVtb3ZlcyBDaHJvbWUvU2FmYXJpL0ZpcmVmb3ggdXNlciBhZ2VudCBzdHlsZXNoZWV0IHBhZGRpbmcgZnJvbVxuXHQgKiBTdHlsZWRMYWJlbCB3aGVuIGl0IGlzIHJlbmRlcmVkIGFzIGEgbGVnZW5kLlxuXHQgKi9cblx0cGFkZGluZzogMDtcbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRMYWJlbCA9IHN0eWxlZC5sYWJlbGBcblx0JHsgbGFiZWxTdHlsZXMgfVxuYDtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZEhlbHAgPSBzdHlsZWQucGBcblx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIDIgKSB9O1xuXHRtYXJnaW4tYm90dG9tOiAwO1xuXHRmb250LXNpemU6ICR7IGZvbnQoICdoZWxwVGV4dC5mb250U2l6ZScgKSB9O1xuXHRmb250LXN0eWxlOiBub3JtYWw7XG5cdGNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgNzAwIF0gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRWaXN1YWxMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHQkeyBsYWJlbFN0eWxlcyB9XG5gO1xuIl19 */"));

  // packages/components/build-module/base-control/index.mjs
  var import_jsx_runtime91 = __toESM(require_jsx_runtime(), 1);

  // packages/components/build-module/base-control/hooks.mjs
  var import_compose4 = __toESM(require_compose(), 1);
  function useBaseControlProps(props) {
    const {
      help,
      id: preferredId,
      ...restProps
    } = props;
    const uniqueId3 = (0, import_compose4.useInstanceId)(base_control_default, "wp-components-base-control", preferredId);
    return {
      baseControlProps: {
        id: uniqueId3,
        help,
        ...restProps
      },
      controlProps: {
        id: uniqueId3,
        ...!!help ? {
          "aria-describedby": `${uniqueId3}__help`
        } : {}
      }
    };
  }

  // packages/components/build-module/base-control/index.mjs
  var UnconnectedBaseControl = (props) => {
    const {
      id: id3,
      label,
      hideLabelFromVision = false,
      help,
      className: className2,
      children
    } = useContextSystem(props, "BaseControl");
    return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(Wrapper, {
      className: className2,
      children: [/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(StyledField, {
        className: "components-base-control__field",
        children: [label && id3 && (hideLabelFromVision ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(component_default2, {
          as: "label",
          htmlFor: id3,
          children: label
        }) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(StyledLabel, {
          className: "components-base-control__label",
          htmlFor: id3,
          children: label
        })), label && !id3 && (hideLabelFromVision ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(component_default2, {
          as: "label",
          children: label
        }) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(VisualLabel, {
          children: label
        })), children]
      }), !!help && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(StyledHelp, {
        id: id3 ? id3 + "__help" : void 0,
        className: "components-base-control__help",
        children: help
      })]
    });
  };
  var UnforwardedVisualLabel = (props, ref) => {
    const {
      className: className2,
      children,
      ...restProps
    } = props;
    return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(StyledVisualLabel, {
      ref,
      ...restProps,
      className: clsx_default("components-base-control__label", className2),
      children
    });
  };
  var VisualLabel = (0, import_element31.forwardRef)(UnforwardedVisualLabel);
  var BaseControl = Object.assign(contextConnectWithoutRef(UnconnectedBaseControl, "BaseControl"), {
    /**
     * `BaseControl.VisualLabel` is used to render a purely visual label inside a `BaseControl` component.
     *
     * It should only be used in cases where the children being rendered inside `BaseControl` are already accessibly labeled,
     * e.g., a button, but we want an additional visual label for that section equivalent to the labels `BaseControl` would
     * otherwise use if the `label` prop was passed.
     *
     * ```jsx
     * import { BaseControl } from '@wordpress/components';
     *
     * const MyBaseControl = () => (
     * 	<BaseControl help="This button is already accessibly labeled.">
     * 		<BaseControl.VisualLabel>Author</BaseControl.VisualLabel>
     * 		<Button>Select an author</Button>
     * 	</BaseControl>
     * );
     * ```
     */
    VisualLabel
  });
  var base_control_default = BaseControl;

  // packages/components/build-module/utils/deprecated-36px-size.mjs
  var import_deprecated3 = __toESM(require_deprecated(), 1);
  function maybeWarnDeprecated36pxSize({
    componentName,
    __next40pxDefaultSize,
    size: size3,
    __shouldNotWarnDeprecated36pxSize
  }) {
    if (__shouldNotWarnDeprecated36pxSize || __next40pxDefaultSize || size3 !== void 0 && size3 !== "default") {
      return;
    }
    (0, import_deprecated3.default)(`36px default size for wp.components.${componentName}`, {
      since: "6.8",
      version: "7.1",
      hint: "Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."
    });
  }

  // packages/components/build-module/input-control/index.mjs
  var import_jsx_runtime92 = __toESM(require_jsx_runtime(), 1);
  var noop5 = () => {
  };
  function useUniqueId2(idProp) {
    const instanceId = (0, import_compose5.useInstanceId)(InputControl);
    const id3 = `inspector-input-control-${instanceId}`;
    return idProp || id3;
  }
  function UnforwardedInputControl(props, ref) {
    const {
      __next40pxDefaultSize,
      __shouldNotWarnDeprecated36pxSize,
      __unstableStateReducer: stateReducer = (state) => state,
      __unstableInputWidth,
      className: className2,
      disabled = false,
      help,
      hideLabelFromVision = false,
      id: idProp,
      isPressEnterToChange = false,
      label,
      labelPosition = "top",
      onChange = noop5,
      onValidate = noop5,
      onKeyDown = noop5,
      prefix: prefix2,
      size: size3 = "default",
      style: style2,
      suffix,
      value,
      ...restProps
    } = useDeprecated36pxDefaultSizeProp(props);
    const id3 = useUniqueId2(idProp);
    const classes = clsx_default("components-input-control", className2);
    const draftHookProps = useDraft({
      value,
      onBlur: restProps.onBlur,
      onChange
    });
    const helpProp = !!help ? {
      "aria-describedby": `${id3}__help`
    } : {};
    maybeWarnDeprecated36pxSize({
      componentName: "InputControl",
      __next40pxDefaultSize,
      size: size3,
      __shouldNotWarnDeprecated36pxSize
    });
    return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(base_control_default, {
      className: classes,
      help,
      id: id3,
      children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(input_base_default, {
        __next40pxDefaultSize,
        __unstableInputWidth,
        disabled,
        gap: 3,
        hideLabelFromVision,
        id: id3,
        justify: "left",
        label,
        labelPosition,
        prefix: prefix2,
        size: size3,
        style: style2,
        suffix,
        children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(input_field_default, {
          ...restProps,
          ...helpProp,
          __next40pxDefaultSize,
          className: "components-input-control__input",
          disabled,
          id: id3,
          isPressEnterToChange,
          onKeyDown,
          onValidate,
          paddingInlineStart: prefix2 ? space(1) : void 0,
          paddingInlineEnd: suffix ? space(1) : void 0,
          ref,
          size: size3,
          stateReducer,
          ...draftHookProps
        })
      })
    });
  }
  var InputControl = (0, import_element32.forwardRef)(UnforwardedInputControl);
  InputControl.displayName = "InputControl";
  var input_control_default = InputControl;

  // packages/components/build-module/button/index.mjs
  var import_deprecated4 = __toESM(require_deprecated(), 1);
  var import_element34 = __toESM(require_element(), 1);
  var import_compose6 = __toESM(require_compose(), 1);

  // packages/components/build-module/icon/index.mjs
  var import_element33 = __toESM(require_element(), 1);
  var import_primitives31 = __toESM(require_primitives(), 1);

  // packages/components/build-module/dashicon/index.mjs
  var import_jsx_runtime93 = __toESM(require_jsx_runtime(), 1);
  function Dashicon({
    icon,
    className: className2,
    size: size3 = 20,
    style: style2 = {},
    ...extraProps
  }) {
    const iconClass = ["dashicon", "dashicons", "dashicons-" + icon, className2].filter(Boolean).join(" ");
    const sizeStyles3 = (
      // using `!=` to catch both 20 and "20"
      // eslint-disable-next-line eqeqeq
      20 != size3 ? {
        fontSize: `${size3}px`,
        width: `${size3}px`,
        height: `${size3}px`
      } : {}
    );
    const styles3 = {
      ...sizeStyles3,
      ...style2
    };
    return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", {
      className: iconClass,
      style: styles3,
      ...extraProps
    });
  }
  var dashicon_default = Dashicon;

  // packages/components/build-module/icon/index.mjs
  var import_jsx_runtime94 = __toESM(require_jsx_runtime(), 1);
  function Icon({
    icon = null,
    size: size3 = "string" === typeof icon ? 20 : 24,
    ...additionalProps
  }) {
    if ("string" === typeof icon) {
      return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(dashicon_default, {
        icon,
        size: size3,
        ...additionalProps
      });
    }
    if ((0, import_element33.isValidElement)(icon) && dashicon_default === icon.type) {
      return (0, import_element33.cloneElement)(icon, {
        ...additionalProps
      });
    }
    if ("function" === typeof icon) {
      return (0, import_element33.createElement)(icon, {
        size: size3,
        ...additionalProps
      });
    }
    if (icon && (icon.type === "svg" || icon.type === import_primitives31.SVG)) {
      const appliedProps = {
        ...icon.props,
        width: size3,
        height: size3,
        ...additionalProps
      };
      return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_primitives31.SVG, {
        ...appliedProps
      });
    }
    if ((0, import_element33.isValidElement)(icon)) {
      return (0, import_element33.cloneElement)(icon, {
        // @ts-ignore Just forwarding the size prop along
        size: size3,
        width: size3,
        height: size3,
        ...additionalProps
      });
    }
    return icon;
  }
  var icon_default3 = Icon;

  // packages/components/build-module/button/index.mjs
  var import_jsx_runtime95 = __toESM(require_jsx_runtime(), 1);
  var disabledEventsOnDisabledButton = ["onMouseDown", "onClick"];
  function useDeprecatedProps2({
    __experimentalIsFocusable,
    isDefault,
    isPrimary,
    isSecondary,
    isTertiary,
    isLink,
    isPressed,
    isSmall,
    size: size3,
    variant,
    describedBy,
    ...otherProps
  }) {
    let computedSize = size3;
    let computedVariant = variant;
    const newProps = {
      accessibleWhenDisabled: __experimentalIsFocusable,
      // @todo Mark `isPressed` as deprecated
      "aria-pressed": isPressed,
      description: describedBy
    };
    if (isSmall) {
      computedSize ??= "small";
    }
    if (isPrimary) {
      computedVariant ??= "primary";
    }
    if (isTertiary) {
      computedVariant ??= "tertiary";
    }
    if (isSecondary) {
      computedVariant ??= "secondary";
    }
    if (isDefault) {
      (0, import_deprecated4.default)("wp.components.Button `isDefault` prop", {
        since: "5.4",
        alternative: 'variant="secondary"'
      });
      computedVariant ??= "secondary";
    }
    if (isLink) {
      computedVariant ??= "link";
    }
    return {
      ...newProps,
      ...otherProps,
      size: computedSize,
      variant: computedVariant
    };
  }
  function UnforwardedButton(props, ref) {
    const {
      __next40pxDefaultSize,
      accessibleWhenDisabled,
      isBusy,
      isDestructive,
      className: className2,
      disabled,
      icon,
      iconPosition = "left",
      iconSize,
      showTooltip,
      tooltipPosition,
      shortcut,
      label,
      children,
      size: size3 = "default",
      text,
      variant,
      description,
      ...buttonOrAnchorProps
    } = useDeprecatedProps2(props);
    const {
      href,
      target,
      "aria-checked": ariaChecked,
      "aria-pressed": ariaPressed,
      "aria-selected": ariaSelected,
      ...additionalProps
    } = "href" in buttonOrAnchorProps ? buttonOrAnchorProps : {
      href: void 0,
      target: void 0,
      ...buttonOrAnchorProps
    };
    const instanceId = (0, import_compose6.useInstanceId)(Button3, "components-button__description");
    const hasChildren = "string" === typeof children && !!children || Array.isArray(children) && children?.[0] && children[0] !== null && // Tooltip should not considered as a child
    children?.[0]?.props?.className !== "components-tooltip";
    const truthyAriaPressedValues = [true, "true", "mixed"];
    const classes = clsx_default("components-button", className2, {
      "is-next-40px-default-size": __next40pxDefaultSize,
      "is-secondary": variant === "secondary",
      "is-primary": variant === "primary",
      "is-small": size3 === "small",
      "is-compact": size3 === "compact",
      "is-tertiary": variant === "tertiary",
      "is-pressed": truthyAriaPressedValues.includes(ariaPressed),
      "is-pressed-mixed": ariaPressed === "mixed",
      "is-busy": isBusy,
      "is-link": variant === "link",
      "is-destructive": isDestructive,
      "has-text": !!icon && (hasChildren || text),
      "has-icon": !!icon,
      "has-icon-right": iconPosition === "right"
    });
    const trulyDisabled = disabled && !accessibleWhenDisabled;
    const Tag = href !== void 0 && !disabled ? "a" : "button";
    const buttonProps = Tag === "button" ? {
      type: "button",
      disabled: trulyDisabled,
      "aria-checked": ariaChecked,
      "aria-pressed": ariaPressed,
      "aria-selected": ariaSelected
    } : {};
    const anchorProps = Tag === "a" ? {
      href,
      target
    } : {};
    const disableEventProps = {};
    if (disabled && accessibleWhenDisabled) {
      buttonProps["aria-disabled"] = true;
      anchorProps["aria-disabled"] = true;
      for (const disabledEvent of disabledEventsOnDisabledButton) {
        disableEventProps[disabledEvent] = (event) => {
          if (event) {
            event.stopPropagation();
            event.preventDefault();
          }
        };
      }
    }
    const shouldShowTooltip = !trulyDisabled && // An explicit tooltip is passed or...
    (showTooltip && !!label || // There's a shortcut or...
    !!shortcut || // There's a label and...
    !!label && // The children are empty and...
    !children?.length && // The tooltip is not explicitly disabled.
    false !== showTooltip);
    const descriptionId = description ? instanceId : void 0;
    const describedById = additionalProps["aria-describedby"] || descriptionId;
    const commonProps = {
      className: classes,
      "aria-label": additionalProps["aria-label"] || label,
      "aria-describedby": describedById,
      ref
    };
    const elementChildren = /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, {
      children: [icon && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(icon_default3, {
        icon,
        size: iconSize
      }), text && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_jsx_runtime95.Fragment, {
        children: text
      }), children, icon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(icon_default3, {
        icon,
        size: iconSize
      })]
    });
    const element = Tag === "a" ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("a", {
      ...anchorProps,
      ...additionalProps,
      ...disableEventProps,
      ...commonProps,
      children: elementChildren
    }) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("button", {
      ...buttonProps,
      ...additionalProps,
      ...disableEventProps,
      ...commonProps,
      children: elementChildren
    });
    const tooltipProps = shouldShowTooltip ? {
      text: children?.length && description ? description : label,
      shortcut,
      placement: tooltipPosition && // Convert legacy `position` values to be used with the new `placement` prop
      positionToPlacement(tooltipPosition)
    } : {};
    return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, {
      children: [/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(tooltip_default, {
        ...tooltipProps,
        children: element
      }), description && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(component_default2, {
        children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", {
          id: descriptionId,
          children: description
        })
      })]
    });
  }
  var Button3 = (0, import_element34.forwardRef)(UnforwardedButton);
  Button3.displayName = "Button";
  var button_default = Button3;

  // packages/components/build-module/number-control/styles/number-control-styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__8() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var _ref3 = false ? {
    name: "euqsgg",
    styles: "input[type='number']::-webkit-outer-spin-button,input[type='number']::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}input[type='number']{-moz-appearance:textfield;}"
  } : {
    name: "jl4rev-htmlArrowStyles",
    styles: "input[type='number']::-webkit-outer-spin-button,input[type='number']::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}input[type='number']{-moz-appearance:textfield;};label:htmlArrowStyles;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm51bWJlci1jb250cm9sLXN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtQlciLCJmaWxlIjoibnVtYmVyLWNvbnRyb2wtc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgSW5wdXRDb250cm9sIGZyb20gJy4uLy4uL2lucHV0LWNvbnRyb2wnO1xuaW1wb3J0IHsgQ09MT1JTIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IEJ1dHRvbiBmcm9tICcuLi8uLi9idXR0b24nO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi8uLi91dGlscy9zcGFjZSc7XG5cbmNvbnN0IGh0bWxBcnJvd1N0eWxlcyA9ICggeyBoaWRlSFRNTEFycm93cyB9OiB7IGhpZGVIVE1MQXJyb3dzOiBib29sZWFuIH0gKSA9PiB7XG5cdGlmICggISBoaWRlSFRNTEFycm93cyApIHtcblx0XHRyZXR1cm4gYGA7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdGlucHV0W3R5cGU9J251bWJlciddOjotd2Via2l0LW91dGVyLXNwaW4tYnV0dG9uLFxuXHRcdGlucHV0W3R5cGU9J251bWJlciddOjotd2Via2l0LWlubmVyLXNwaW4tYnV0dG9uIHtcblx0XHRcdC13ZWJraXQtYXBwZWFyYW5jZTogbm9uZSAhaW1wb3J0YW50O1xuXHRcdFx0bWFyZ2luOiAwICFpbXBvcnRhbnQ7XG5cdFx0fVxuXG5cdFx0aW5wdXRbdHlwZT0nbnVtYmVyJ10ge1xuXHRcdFx0LW1vei1hcHBlYXJhbmNlOiB0ZXh0ZmllbGQ7XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IElucHV0ID0gc3R5bGVkKCBJbnB1dENvbnRyb2wgKWBcblx0JHsgaHRtbEFycm93U3R5bGVzIH07XG5gO1xuXG5leHBvcnQgY29uc3QgU3BpbkJ1dHRvbiA9IHN0eWxlZCggQnV0dG9uIClgXG5cdCYmJiYmIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHR9XG5gO1xuXG5jb25zdCBzbWFsbFNwaW5CdXR0b25zID0gY3NzYFxuXHR3aWR0aDogJHsgc3BhY2UoIDUgKSB9O1xuXHRtaW4td2lkdGg6ICR7IHNwYWNlKCA1ICkgfTtcblx0aGVpZ2h0OiAkeyBzcGFjZSggNSApIH07XG5gO1xuXG5leHBvcnQgY29uc3Qgc3R5bGVzID0geyBzbWFsbFNwaW5CdXR0b25zIH07XG4iXX0= */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__8
  };
  var htmlArrowStyles = ({
    hideHTMLArrows
  }) => {
    if (!hideHTMLArrows) {
      return ``;
    }
    return _ref3;
  };
  var Input2 = /* @__PURE__ */ createStyled(input_control_default, false ? {
    target: "ep09it41"
  } : {
    target: "ep09it41",
    label: "Input"
  })(htmlArrowStyles, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm51bWJlci1jb250cm9sLXN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnQzJDIiwiZmlsZSI6Im51bWJlci1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IElucHV0Q29udHJvbCBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sJztcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCBCdXR0b24gZnJvbSAnLi4vLi4vYnV0dG9uJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5jb25zdCBodG1sQXJyb3dTdHlsZXMgPSAoIHsgaGlkZUhUTUxBcnJvd3MgfTogeyBoaWRlSFRNTEFycm93czogYm9vbGVhbiB9ICkgPT4ge1xuXHRpZiAoICEgaGlkZUhUTUxBcnJvd3MgKSB7XG5cdFx0cmV0dXJuIGBgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHRpbnB1dFt0eXBlPSdudW1iZXInXTo6LXdlYmtpdC1vdXRlci1zcGluLWJ1dHRvbixcblx0XHRpbnB1dFt0eXBlPSdudW1iZXInXTo6LXdlYmtpdC1pbm5lci1zcGluLWJ1dHRvbiB7XG5cdFx0XHQtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmUgIWltcG9ydGFudDtcblx0XHRcdG1hcmdpbjogMCAhaW1wb3J0YW50O1xuXHRcdH1cblxuXHRcdGlucHV0W3R5cGU9J251bWJlciddIHtcblx0XHRcdC1tb3otYXBwZWFyYW5jZTogdGV4dGZpZWxkO1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBJbnB1dCA9IHN0eWxlZCggSW5wdXRDb250cm9sIClgXG5cdCR7IGh0bWxBcnJvd1N0eWxlcyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFNwaW5CdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHQmJiYmJiB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0fVxuYDtcblxuY29uc3Qgc21hbGxTcGluQnV0dG9ucyA9IGNzc2Bcblx0d2lkdGg6ICR7IHNwYWNlKCA1ICkgfTtcblx0bWluLXdpZHRoOiAkeyBzcGFjZSggNSApIH07XG5cdGhlaWdodDogJHsgc3BhY2UoIDUgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IHN0eWxlcyA9IHsgc21hbGxTcGluQnV0dG9ucyB9O1xuIl19 */"));
  var SpinButton = /* @__PURE__ */ createStyled(button_default, false ? {
    target: "ep09it40"
  } : {
    target: "ep09it40",
    label: "SpinButton"
  })("&&&&&{color:", COLORS.theme.accent, ";}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm51bWJlci1jb250cm9sLXN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvQzBDIiwiZmlsZSI6Im51bWJlci1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IElucHV0Q29udHJvbCBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sJztcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCBCdXR0b24gZnJvbSAnLi4vLi4vYnV0dG9uJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5jb25zdCBodG1sQXJyb3dTdHlsZXMgPSAoIHsgaGlkZUhUTUxBcnJvd3MgfTogeyBoaWRlSFRNTEFycm93czogYm9vbGVhbiB9ICkgPT4ge1xuXHRpZiAoICEgaGlkZUhUTUxBcnJvd3MgKSB7XG5cdFx0cmV0dXJuIGBgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHRpbnB1dFt0eXBlPSdudW1iZXInXTo6LXdlYmtpdC1vdXRlci1zcGluLWJ1dHRvbixcblx0XHRpbnB1dFt0eXBlPSdudW1iZXInXTo6LXdlYmtpdC1pbm5lci1zcGluLWJ1dHRvbiB7XG5cdFx0XHQtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmUgIWltcG9ydGFudDtcblx0XHRcdG1hcmdpbjogMCAhaW1wb3J0YW50O1xuXHRcdH1cblxuXHRcdGlucHV0W3R5cGU9J251bWJlciddIHtcblx0XHRcdC1tb3otYXBwZWFyYW5jZTogdGV4dGZpZWxkO1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBJbnB1dCA9IHN0eWxlZCggSW5wdXRDb250cm9sIClgXG5cdCR7IGh0bWxBcnJvd1N0eWxlcyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFNwaW5CdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHQmJiYmJiB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0fVxuYDtcblxuY29uc3Qgc21hbGxTcGluQnV0dG9ucyA9IGNzc2Bcblx0d2lkdGg6ICR7IHNwYWNlKCA1ICkgfTtcblx0bWluLXdpZHRoOiAkeyBzcGFjZSggNSApIH07XG5cdGhlaWdodDogJHsgc3BhY2UoIDUgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IHN0eWxlcyA9IHsgc21hbGxTcGluQnV0dG9ucyB9O1xuIl19 */"));
  var smallSpinButtons = /* @__PURE__ */ css("width:", space(5), ";min-width:", space(5), ";height:", space(5), ";" + (false ? "" : ";label:smallSpinButtons;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm51bWJlci1jb250cm9sLXN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEwQzRCIiwiZmlsZSI6Im51bWJlci1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IElucHV0Q29udHJvbCBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sJztcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCBCdXR0b24gZnJvbSAnLi4vLi4vYnV0dG9uJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5jb25zdCBodG1sQXJyb3dTdHlsZXMgPSAoIHsgaGlkZUhUTUxBcnJvd3MgfTogeyBoaWRlSFRNTEFycm93czogYm9vbGVhbiB9ICkgPT4ge1xuXHRpZiAoICEgaGlkZUhUTUxBcnJvd3MgKSB7XG5cdFx0cmV0dXJuIGBgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHRpbnB1dFt0eXBlPSdudW1iZXInXTo6LXdlYmtpdC1vdXRlci1zcGluLWJ1dHRvbixcblx0XHRpbnB1dFt0eXBlPSdudW1iZXInXTo6LXdlYmtpdC1pbm5lci1zcGluLWJ1dHRvbiB7XG5cdFx0XHQtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmUgIWltcG9ydGFudDtcblx0XHRcdG1hcmdpbjogMCAhaW1wb3J0YW50O1xuXHRcdH1cblxuXHRcdGlucHV0W3R5cGU9J251bWJlciddIHtcblx0XHRcdC1tb3otYXBwZWFyYW5jZTogdGV4dGZpZWxkO1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBJbnB1dCA9IHN0eWxlZCggSW5wdXRDb250cm9sIClgXG5cdCR7IGh0bWxBcnJvd1N0eWxlcyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFNwaW5CdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHQmJiYmJiB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0fVxuYDtcblxuY29uc3Qgc21hbGxTcGluQnV0dG9ucyA9IGNzc2Bcblx0d2lkdGg6ICR7IHNwYWNlKCA1ICkgfTtcblx0bWluLXdpZHRoOiAkeyBzcGFjZSggNSApIH07XG5cdGhlaWdodDogJHsgc3BhY2UoIDUgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IHN0eWxlcyA9IHsgc21hbGxTcGluQnV0dG9ucyB9O1xuIl19 */");
  var styles = {
    smallSpinButtons
  };

  // packages/components/build-module/utils/math.mjs
  function getNumber(value) {
    const number2 = Number(value);
    return isNaN(number2) ? 0 : number2;
  }
  function add(...args) {
    return args.reduce(
      /** @type {(sum:number, arg: number|string) => number} */
      (sum, arg) => sum + getNumber(arg),
      0
    );
  }
  function subtract(...args) {
    return args.reduce(
      /** @type {(diff:number, arg: number|string, index:number) => number} */
      (diff, arg, index2) => {
        const value = getNumber(arg);
        return index2 === 0 ? value : diff - value;
      },
      0
    );
  }
  function getPrecision(value) {
    const split = (value + "").split(".");
    return split[1] !== void 0 ? split[1].length : 0;
  }
  function clamp4(value, min3, max3) {
    const baseValue = getNumber(value);
    return Math.max(min3, Math.min(baseValue, max3));
  }
  function ensureValidStep(value, min3, step) {
    const baseValue = getNumber(value);
    const minValue = getNumber(min3);
    const stepValue = getNumber(step);
    const precision = Math.max(getPrecision(step), getPrecision(min3));
    const tare = minValue % stepValue ? minValue : 0;
    const rounded3 = Math.round((baseValue - tare) / stepValue) * stepValue;
    const fromMin = rounded3 + tare;
    return precision ? getNumber(fromMin.toFixed(precision)) : fromMin;
  }

  // packages/components/build-module/h-stack/utils.mjs
  var H_ALIGNMENTS = {
    bottom: {
      align: "flex-end",
      justify: "center"
    },
    bottomLeft: {
      align: "flex-end",
      justify: "flex-start"
    },
    bottomRight: {
      align: "flex-end",
      justify: "flex-end"
    },
    center: {
      align: "center",
      justify: "center"
    },
    edge: {
      align: "center",
      justify: "space-between"
    },
    left: {
      align: "center",
      justify: "flex-start"
    },
    right: {
      align: "center",
      justify: "flex-end"
    },
    stretch: {
      align: "stretch"
    },
    top: {
      align: "flex-start",
      justify: "center"
    },
    topLeft: {
      align: "flex-start",
      justify: "flex-start"
    },
    topRight: {
      align: "flex-start",
      justify: "flex-end"
    }
  };
  var V_ALIGNMENTS = {
    bottom: {
      justify: "flex-end",
      align: "center"
    },
    bottomLeft: {
      justify: "flex-end",
      align: "flex-start"
    },
    bottomRight: {
      justify: "flex-end",
      align: "flex-end"
    },
    center: {
      justify: "center",
      align: "center"
    },
    edge: {
      justify: "space-between",
      align: "center"
    },
    left: {
      justify: "center",
      align: "flex-start"
    },
    right: {
      justify: "center",
      align: "flex-end"
    },
    stretch: {
      align: "stretch"
    },
    top: {
      justify: "flex-start",
      align: "center"
    },
    topLeft: {
      justify: "flex-start",
      align: "flex-start"
    },
    topRight: {
      justify: "flex-start",
      align: "flex-end"
    }
  };
  function getAlignmentProps(alignment, direction = "row") {
    if (!isValueDefined(alignment)) {
      return {};
    }
    const isVertical = direction === "column";
    const props = isVertical ? V_ALIGNMENTS : H_ALIGNMENTS;
    const alignmentProps = alignment in props ? props[alignment] : {
      align: alignment
    };
    return alignmentProps;
  }

  // packages/components/build-module/utils/get-valid-children.mjs
  var import_element35 = __toESM(require_element(), 1);
  function getValidChildren(children) {
    if (typeof children === "string") {
      return [children];
    }
    return import_element35.Children.toArray(children).filter((child) => (0, import_element35.isValidElement)(child));
  }

  // packages/components/build-module/h-stack/hook.mjs
  var import_jsx_runtime96 = __toESM(require_jsx_runtime(), 1);
  function useHStack(props) {
    const {
      alignment = "edge",
      children,
      direction,
      spacing = 2,
      ...otherProps
    } = useContextSystem(props, "HStack");
    const align = getAlignmentProps(alignment, direction);
    const validChildren = getValidChildren(children);
    const clonedChildren = validChildren.map((child, index2) => {
      const _isSpacer = hasConnectNamespace(child, ["Spacer"]);
      if (_isSpacer) {
        const childElement = child;
        const _key = childElement.key || `hstack-${index2}`;
        return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(component_default4, {
          isBlock: true,
          ...childElement.props
        }, _key);
      }
      return child;
    });
    const propsForFlex = {
      children: clonedChildren,
      direction,
      justify: "center",
      ...align,
      ...otherProps,
      gap: spacing
    };
    const {
      isColumn,
      ...flexProps
    } = useFlex(propsForFlex);
    return flexProps;
  }

  // packages/components/build-module/h-stack/component.mjs
  var import_jsx_runtime97 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedHStack(props, forwardedRef) {
    const hStackProps = useHStack(props);
    return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(component_default, {
      ...hStackProps,
      ref: forwardedRef
    });
  }
  var HStack = contextConnect(UnconnectedHStack, "HStack");
  var component_default9 = HStack;

  // packages/components/build-module/number-control/index.mjs
  var import_jsx_runtime98 = __toESM(require_jsx_runtime(), 1);
  var noop6 = () => {
  };
  function UnforwardedNumberControl(props, forwardedRef) {
    const {
      __unstableStateReducer: stateReducerProp,
      className: className2,
      dragDirection = "n",
      hideHTMLArrows = false,
      spinControls = hideHTMLArrows ? "none" : "native",
      isDragEnabled = true,
      isShiftStepEnabled = true,
      label,
      max: max3 = Infinity,
      min: min3 = -Infinity,
      required = false,
      shiftStep = 10,
      step = 1,
      spinFactor = 1,
      type: typeProp = "number",
      value: valueProp,
      size: size3 = "default",
      suffix,
      onChange = noop6,
      __shouldNotWarnDeprecated36pxSize,
      ...restProps
    } = useDeprecated36pxDefaultSizeProp(props);
    maybeWarnDeprecated36pxSize({
      componentName: "NumberControl",
      size: size3,
      __next40pxDefaultSize: restProps.__next40pxDefaultSize,
      __shouldNotWarnDeprecated36pxSize
    });
    if (hideHTMLArrows) {
      (0, import_deprecated5.default)("wp.components.NumberControl hideHTMLArrows prop ", {
        alternative: 'spinControls="none"',
        since: "6.2",
        version: "6.3"
      });
    }
    const inputRef = (0, import_element36.useRef)(null);
    const mergedRef = (0, import_compose7.useMergeRefs)([inputRef, forwardedRef]);
    const isStepAny = step === "any";
    const baseStep = isStepAny ? 1 : ensureNumber(step);
    const baseSpin = ensureNumber(spinFactor) * baseStep;
    const constrainValue = (value, stepOverride) => {
      if (!isStepAny) {
        value = ensureValidStep(value, min3, stepOverride ?? baseStep);
      }
      return `${clamp4(value, min3, max3)}`;
    };
    const baseValue = constrainValue(0);
    const autoComplete = typeProp === "number" ? "off" : void 0;
    const classes = clsx_default("components-number-control", className2);
    const cx3 = useCx();
    const spinButtonClasses = cx3(size3 === "small" && styles.smallSpinButtons);
    const spinValue = (value, direction, event) => {
      event?.preventDefault();
      const shift3 = event?.shiftKey && isShiftStepEnabled;
      const delta = shift3 ? ensureNumber(shiftStep) * baseSpin : baseSpin;
      let nextValue = isValueEmpty(value) ? baseValue : value;
      if (direction === "up") {
        nextValue = add(nextValue, delta);
      } else if (direction === "down") {
        nextValue = subtract(nextValue, delta);
      }
      return constrainValue(nextValue, shift3 ? delta : void 0);
    };
    const numberControlStateReducer = (state, action) => {
      const nextState = {
        ...state
      };
      const {
        type,
        payload
      } = action;
      const event = payload.event;
      const currentValue = nextState.value;
      if (type === PRESS_UP || type === PRESS_DOWN) {
        nextState.value = spinValue(currentValue, type === PRESS_UP ? "up" : "down", event);
      }
      if (type === DRAG && isDragEnabled) {
        const [x2, y3] = payload.delta;
        const enableShift = payload.shiftKey && isShiftStepEnabled;
        const modifier = enableShift ? ensureNumber(shiftStep) * baseSpin : baseSpin;
        let directionModifier;
        let delta;
        switch (dragDirection) {
          case "n":
            delta = y3;
            directionModifier = -1;
            break;
          case "e":
            delta = x2;
            directionModifier = (0, import_i18n5.isRTL)() ? -1 : 1;
            break;
          case "s":
            delta = y3;
            directionModifier = 1;
            break;
          case "w":
            delta = x2;
            directionModifier = (0, import_i18n5.isRTL)() ? 1 : -1;
            break;
        }
        if (delta !== 0) {
          delta = Math.ceil(Math.abs(delta)) * Math.sign(delta);
          const distance2 = delta * modifier * directionModifier;
          nextState.value = constrainValue(
            // @ts-expect-error TODO: Investigate if it's ok for currentValue to be undefined
            add(currentValue, distance2),
            enableShift ? modifier : void 0
          );
        }
      }
      if (type === PRESS_ENTER || type === COMMIT) {
        const applyEmptyValue = required === false && currentValue === "";
        nextState.value = applyEmptyValue ? currentValue : (
          // @ts-expect-error TODO: Investigate if it's ok for currentValue to be undefined
          constrainValue(currentValue)
        );
      }
      return nextState;
    };
    const buildSpinButtonClickHandler = (direction) => (event) => onChange(String(spinValue(valueProp, direction, event)), {
      // Set event.target to the <input> so that consumers can use
      // e.g. event.target.validity.
      event: {
        ...event,
        target: inputRef.current
      }
    });
    return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Input2, {
      autoComplete,
      inputMode: "numeric",
      ...restProps,
      className: classes,
      dragDirection,
      hideHTMLArrows: spinControls !== "native",
      isDragEnabled,
      label,
      max: max3 === Infinity ? void 0 : max3,
      min: min3 === -Infinity ? void 0 : min3,
      ref: mergedRef,
      required,
      step,
      type: typeProp,
      value: valueProp,
      __unstableStateReducer: (state, action) => {
        const baseState = numberControlStateReducer(state, action);
        return stateReducerProp?.(baseState, action) ?? baseState;
      },
      size: size3,
      __shouldNotWarnDeprecated36pxSize: true,
      suffix: spinControls === "custom" ? /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_jsx_runtime98.Fragment, {
        children: [suffix, /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(component_default6, {
          marginBottom: 0,
          marginRight: 2,
          children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(component_default9, {
            spacing: 1,
            children: [/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SpinButton, {
              className: spinButtonClasses,
              icon: plus_default,
              size: "small",
              label: (0, import_i18n5.__)("Increment"),
              onClick: buildSpinButtonClickHandler("up")
            }), /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SpinButton, {
              className: spinButtonClasses,
              icon: reset_default,
              size: "small",
              label: (0, import_i18n5.__)("Decrement"),
              onClick: buildSpinButtonClickHandler("down")
            })]
          })
        })]
      }) : suffix,
      onChange
    });
  }
  var NumberControl = (0, import_element36.forwardRef)(UnforwardedNumberControl);
  NumberControl.displayName = "NumberControl";
  var number_control_default = NumberControl;

  // packages/components/build-module/input-control/input-prefix-wrapper.mjs
  var import_jsx_runtime99 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedInputControlPrefixWrapper(props, forwardedRef) {
    const derivedProps = useContextSystem(props, "InputControlPrefixWrapper");
    return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(PrefixSuffixWrapper, {
      ...derivedProps,
      isPrefix: true,
      ref: forwardedRef
    });
  }
  var InputControlPrefixWrapper = contextConnect(UnconnectedInputControlPrefixWrapper, "InputControlPrefixWrapper");
  var input_prefix_wrapper_default = InputControlPrefixWrapper;

  // packages/components/build-module/input-control/input-suffix-wrapper.mjs
  var import_jsx_runtime100 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedInputControlSuffixWrapper(props, forwardedRef) {
    const derivedProps = useContextSystem(props, "InputControlSuffixWrapper");
    return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(PrefixSuffixWrapper, {
      ...derivedProps,
      ref: forwardedRef
    });
  }
  var InputControlSuffixWrapper = contextConnect(UnconnectedInputControlSuffixWrapper, "InputControlSuffixWrapper");
  var input_suffix_wrapper_default = InputControlSuffixWrapper;

  // packages/components/build-module/angle-picker-control/angle-circle.mjs
  var import_element37 = __toESM(require_element(), 1);
  var import_compose8 = __toESM(require_compose(), 1);
  var import_jsx_runtime101 = __toESM(require_jsx_runtime(), 1);
  if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='f35cc94692']")) {
    const style2 = document.createElement("style");
    style2.setAttribute("data-wp-hash", "f35cc94692");
    style2.appendChild(document.createTextNode("._8f57b8d483c51fbe__circle-root{border:1px solid var(--wp-components-color-gray-600,#949494);border-radius:50%;box-sizing:border-box;cursor:grab;height:32px;overflow:hidden;width:32px}._8f57b8d483c51fbe__circle-root:active{cursor:grabbing}.b1bae984ac10fcc3__circle-indicator-wrapper{box-sizing:border-box;height:100%;position:relative;width:100%}.b1bae984ac10fcc3__circle-indicator-wrapper:focus-visible{outline:none}._6d2fe0a2cbb31bf0__circle-indicator{background:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));border-radius:50%;box-sizing:border-box;display:block;height:6px;left:50%;position:absolute;top:4px;transform:translateX(-50%);width:6px}"));
    document.head.appendChild(style2);
  }
  var style_module_default3 = { "circle-root": "_8f57b8d483c51fbe__circle-root", "circle-indicator-wrapper": "b1bae984ac10fcc3__circle-indicator-wrapper", "circle-indicator": "_6d2fe0a2cbb31bf0__circle-indicator" };
  function AngleCircle({
    value,
    onChange,
    className: className2,
    ...props
  }) {
    const angleCircleRef = (0, import_element37.useRef)(null);
    const angleCircleCenterRef = (0, import_element37.useRef)(void 0);
    const previousCursorValueRef = (0, import_element37.useRef)(void 0);
    const setAngleCircleCenter = () => {
      if (angleCircleRef.current === null) {
        return;
      }
      const rect = angleCircleRef.current.getBoundingClientRect();
      angleCircleCenterRef.current = {
        x: rect.x + rect.width / 2,
        y: rect.y + rect.height / 2
      };
    };
    const changeAngleToPosition = (event) => {
      if (event === void 0) {
        return;
      }
      event.preventDefault();
      event.target?.focus();
      if (angleCircleCenterRef.current !== void 0 && onChange !== void 0) {
        const {
          x: centerX,
          y: centerY
        } = angleCircleCenterRef.current;
        onChange(getAngle(centerX, centerY, event.clientX, event.clientY));
      }
    };
    const {
      startDrag,
      isDragging: isDragging2
    } = (0, import_compose8.__experimentalUseDragging)({
      onDragStart: (event) => {
        setAngleCircleCenter();
        changeAngleToPosition(event);
      },
      onDragMove: changeAngleToPosition,
      onDragEnd: changeAngleToPosition
    });
    (0, import_element37.useEffect)(() => {
      if (isDragging2) {
        if (previousCursorValueRef.current === void 0) {
          previousCursorValueRef.current = document.body.style.cursor;
        }
        document.body.style.cursor = "grabbing";
      } else {
        document.body.style.cursor = previousCursorValueRef.current || "";
        previousCursorValueRef.current = void 0;
      }
    }, [isDragging2]);
    return (
      // eslint-disable-next-line jsx-a11y/no-static-element-interactions
      /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", {
        ref: angleCircleRef,
        onMouseDown: startDrag,
        className: clsx_default("components-angle-picker-control__angle-circle", style_module_default3["circle-root"], className2),
        ...props,
        children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", {
          style: value ? {
            transform: `rotate(${value}deg)`
          } : void 0,
          className: clsx_default("components-angle-picker-control__angle-circle-indicator-wrapper", style_module_default3["circle-indicator-wrapper"]),
          tabIndex: -1,
          children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", {
            className: clsx_default("components-angle-picker-control__angle-circle-indicator", style_module_default3["circle-indicator"])
          })
        })
      })
    );
  }
  function getAngle(centerX, centerY, pointX, pointY) {
    const y3 = pointY - centerY;
    const x2 = pointX - centerX;
    const angleInRadians = Math.atan2(y3, x2);
    const angleInDeg = Math.round(angleInRadians * (180 / Math.PI)) + 90;
    if (angleInDeg < 0) {
      return 360 + angleInDeg;
    }
    return angleInDeg;
  }
  var angle_circle_default = AngleCircle;

  // packages/components/build-module/angle-picker-control/index.mjs
  var import_jsx_runtime102 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedAnglePickerControl(props, ref) {
    const {
      className: className2,
      label = (0, import_i18n6.__)("Angle"),
      onChange,
      value,
      ...restProps
    } = props;
    const handleOnNumberChange = (unprocessedValue) => {
      if (onChange === void 0) {
        return;
      }
      const inputValue = unprocessedValue !== void 0 && unprocessedValue !== "" ? parseInt(unprocessedValue, 10) : 0;
      onChange(inputValue);
    };
    const classes = clsx_default("components-angle-picker-control", className2);
    const prefixOrSuffixProp = (0, import_i18n6.isRTL)() ? {
      prefix: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(input_prefix_wrapper_default, {
        children: "\xB0"
      })
    } : {
      suffix: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(input_suffix_wrapper_default, {
        children: "\xB0"
      })
    };
    return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(component_default3, {
      ...restProps,
      ref,
      className: classes,
      gap: 2,
      children: [/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(component_default5, {
        children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(number_control_default, {
          __next40pxDefaultSize: true,
          label,
          className: "components-angle-picker-control__input-field",
          max: 360,
          min: 0,
          onChange: handleOnNumberChange,
          step: "1",
          value,
          spinControls: "none",
          ...prefixOrSuffixProp
        })
      }), /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(component_default6, {
        marginBottom: "1",
        marginTop: "auto",
        children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(angle_circle_default, {
          "aria-hidden": "true",
          value,
          onChange
        })
      })]
    });
  }
  var AnglePickerControl = (0, import_element38.forwardRef)(UnforwardedAnglePickerControl);
  AnglePickerControl.displayName = "AnglePickerControl";
  var angle_picker_control_default = AnglePickerControl;

  // packages/components/build-module/autocomplete/index.mjs
  var import_remove_accents3 = __toESM(require_remove_accents(), 1);
  var import_element52 = __toESM(require_element(), 1);
  var import_compose18 = __toESM(require_compose(), 1);
  var import_rich_text2 = __toESM(require_rich_text(), 1);
  var import_a11y2 = __toESM(require_a11y(), 1);
  var import_keycodes = __toESM(require_keycodes(), 1);

  // packages/components/build-module/autocomplete/autocompleter-ui.mjs
  var import_react_dom6 = __toESM(require_react_dom(), 1);
  var import_element51 = __toESM(require_element(), 1);
  var import_rich_text = __toESM(require_rich_text(), 1);
  var import_compose17 = __toESM(require_compose(), 1);
  var import_a11y = __toESM(require_a11y(), 1);
  var import_i18n8 = __toESM(require_i18n(), 1);

  // packages/components/build-module/autocomplete/get-default-use-items.mjs
  var import_remove_accents2 = __toESM(require_remove_accents(), 1);
  var import_compose9 = __toESM(require_compose(), 1);
  var import_element39 = __toESM(require_element(), 1);

  // packages/components/build-module/utils/strings.mjs
  var import_remove_accents = __toESM(require_remove_accents(), 1);
  var ALL_UNICODE_DASH_CHARACTERS = new RegExp(/[\u007e\u00ad\u2053\u207b\u208b\u2212\p{Pd}]/gu);
  var normalizeTextString = (value) => {
    return (0, import_remove_accents.default)(value).normalize("NFKC").toLocaleLowerCase().replace(ALL_UNICODE_DASH_CHARACTERS, "-");
  };
  function kebabCase(str) {
    let input = str?.toString?.() ?? "";
    input = input.replace(/['\u2019]/, "");
    return paramCase(input, {
      splitRegexp: [
        /(?!(?:1ST|2ND|3RD|[4-9]TH)(?![a-z]))([a-z0-9])([A-Z])/g,
        // fooBar => foo-bar, 3Bar => 3-bar
        /(?!(?:1st|2nd|3rd|[4-9]th)(?![a-z]))([0-9])([a-z])/g,
        // 3bar => 3-bar
        /([A-Za-z])([0-9])/g,
        // Foo3 => foo-3, foo3 => foo-3
        /([A-Z])([A-Z][a-z])/g
        // FOOBar => foo-bar
      ]
    });
  }
  function escapeRegExp(string) {
    return string.replace(/[\\^$.*+?()[\]{}|]/g, "\\$&");
  }

  // packages/components/build-module/autocomplete/get-default-use-items.mjs
  function filterOptions(search, options2 = [], maxResults = 10) {
    const filtered = [];
    for (let i3 = 0; i3 < options2.length; i3++) {
      const option = options2[i3];
      let {
        keywords = []
      } = option;
      if ("string" === typeof option.label) {
        keywords = [...keywords, option.label];
      }
      const isMatch = keywords.some((keyword) => search.test((0, import_remove_accents2.default)(keyword)));
      if (!isMatch) {
        continue;
      }
      filtered.push(option);
      if (filtered.length === maxResults) {
        break;
      }
    }
    return filtered;
  }
  function getDefaultUseItems(autocompleter) {
    return (filterValue) => {
      const [items, setItems] = (0, import_element39.useState)([]);
      (0, import_element39.useLayoutEffect)(() => {
        const {
          options: options2,
          isDebounced
        } = autocompleter;
        const loadOptions = (0, import_compose9.debounce)(() => {
          const promise2 = Promise.resolve(typeof options2 === "function" ? options2(filterValue) : options2).then((optionsData) => {
            if (promise2.canceled) {
              return;
            }
            const keyedOptions = optionsData.map((optionData, optionIndex) => ({
              key: `${autocompleter.name}-${optionIndex}`,
              value: optionData,
              label: autocompleter.getOptionLabel(optionData),
              keywords: autocompleter.getOptionKeywords ? autocompleter.getOptionKeywords(optionData) : [],
              isDisabled: autocompleter.isOptionDisabled ? autocompleter.isOptionDisabled(optionData) : false
            }));
            const search = new RegExp("(?:\\b|\\s|^)" + escapeRegExp(filterValue), "i");
            setItems(filterOptions(search, keyedOptions));
          });
          return promise2;
        }, isDebounced ? 250 : 0);
        const promise = loadOptions();
        return () => {
          loadOptions.cancel();
          if (promise) {
            promise.canceled = true;
          }
        };
      }, [filterValue]);
      return [items];
    };
  }

  // node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
  var React11 = __toESM(require_react(), 1);
  var import_react96 = __toESM(require_react(), 1);
  var ReactDOM = __toESM(require_react_dom(), 1);
  var arrow3 = (options2) => {
    function isRef2(value) {
      return {}.hasOwnProperty.call(value, "current");
    }
    return {
      name: "arrow",
      options: options2,
      fn(state) {
        const {
          element,
          padding: padding2
        } = typeof options2 === "function" ? options2(state) : options2;
        if (element && isRef2(element)) {
          if (element.current != null) {
            return arrow2({
              element: element.current,
              padding: padding2
            }).fn(state);
          }
          return {};
        }
        if (element) {
          return arrow2({
            element,
            padding: padding2
          }).fn(state);
        }
        return {};
      }
    };
  };
  var index = typeof document !== "undefined" ? import_react96.useLayoutEffect : import_react96.useEffect;
  function deepEqual(a3, b3) {
    if (a3 === b3) {
      return true;
    }
    if (typeof a3 !== typeof b3) {
      return false;
    }
    if (typeof a3 === "function" && a3.toString() === b3.toString()) {
      return true;
    }
    let length2;
    let i3;
    let keys;
    if (a3 && b3 && typeof a3 === "object") {
      if (Array.isArray(a3)) {
        length2 = a3.length;
        if (length2 !== b3.length) return false;
        for (i3 = length2; i3-- !== 0; ) {
          if (!deepEqual(a3[i3], b3[i3])) {
            return false;
          }
        }
        return true;
      }
      keys = Object.keys(a3);
      length2 = keys.length;
      if (length2 !== Object.keys(b3).length) {
        return false;
      }
      for (i3 = length2; i3-- !== 0; ) {
        if (!{}.hasOwnProperty.call(b3, keys[i3])) {
          return false;
        }
      }
      for (i3 = length2; i3-- !== 0; ) {
        const key = keys[i3];
        if (key === "_owner" && a3.$$typeof) {
          continue;
        }
        if (!deepEqual(a3[key], b3[key])) {
          return false;
        }
      }
      return true;
    }
    return a3 !== a3 && b3 !== b3;
  }
  function getDPR(element) {
    if (typeof window === "undefined") {
      return 1;
    }
    const win = element.ownerDocument.defaultView || window;
    return win.devicePixelRatio || 1;
  }
  function roundByDPR2(element, value) {
    const dpr = getDPR(element);
    return Math.round(value * dpr) / dpr;
  }
  function useLatestRef(value) {
    const ref = React11.useRef(value);
    index(() => {
      ref.current = value;
    });
    return ref;
  }
  function useFloating(options2) {
    if (options2 === void 0) {
      options2 = {};
    }
    const {
      placement = "bottom",
      strategy = "absolute",
      middleware: middleware2 = [],
      platform: platform2,
      elements: {
        reference: externalReference,
        floating: externalFloating
      } = {},
      transform = true,
      whileElementsMounted,
      open
    } = options2;
    const [data, setData] = React11.useState({
      x: 0,
      y: 0,
      strategy,
      placement,
      middlewareData: {},
      isPositioned: false
    });
    const [latestMiddleware, setLatestMiddleware] = React11.useState(middleware2);
    if (!deepEqual(latestMiddleware, middleware2)) {
      setLatestMiddleware(middleware2);
    }
    const [_reference, _setReference] = React11.useState(null);
    const [_floating, _setFloating] = React11.useState(null);
    const setReference = React11.useCallback((node2) => {
      if (node2 !== referenceRef.current) {
        referenceRef.current = node2;
        _setReference(node2);
      }
    }, []);
    const setFloating = React11.useCallback((node2) => {
      if (node2 !== floatingRef.current) {
        floatingRef.current = node2;
        _setFloating(node2);
      }
    }, []);
    const referenceEl = externalReference || _reference;
    const floatingEl = externalFloating || _floating;
    const referenceRef = React11.useRef(null);
    const floatingRef = React11.useRef(null);
    const dataRef = React11.useRef(data);
    const hasWhileElementsMounted = whileElementsMounted != null;
    const whileElementsMountedRef = useLatestRef(whileElementsMounted);
    const platformRef = useLatestRef(platform2);
    const update = React11.useCallback(() => {
      if (!referenceRef.current || !floatingRef.current) {
        return;
      }
      const config = {
        placement,
        strategy,
        middleware: latestMiddleware
      };
      if (platformRef.current) {
        config.platform = platformRef.current;
      }
      computePosition2(referenceRef.current, floatingRef.current, config).then((data2) => {
        const fullData = {
          ...data2,
          isPositioned: true
        };
        if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
          dataRef.current = fullData;
          ReactDOM.flushSync(() => {
            setData(fullData);
          });
        }
      });
    }, [latestMiddleware, placement, strategy, platformRef]);
    index(() => {
      if (open === false && dataRef.current.isPositioned) {
        dataRef.current.isPositioned = false;
        setData((data2) => ({
          ...data2,
          isPositioned: false
        }));
      }
    }, [open]);
    const isMountedRef = React11.useRef(false);
    index(() => {
      isMountedRef.current = true;
      return () => {
        isMountedRef.current = false;
      };
    }, []);
    index(() => {
      if (referenceEl) referenceRef.current = referenceEl;
      if (floatingEl) floatingRef.current = floatingEl;
      if (referenceEl && floatingEl) {
        if (whileElementsMountedRef.current) {
          return whileElementsMountedRef.current(referenceEl, floatingEl, update);
        }
        update();
      }
    }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
    const refs = React11.useMemo(() => ({
      reference: referenceRef,
      floating: floatingRef,
      setReference,
      setFloating
    }), [setReference, setFloating]);
    const elements2 = React11.useMemo(() => ({
      reference: referenceEl,
      floating: floatingEl
    }), [referenceEl, floatingEl]);
    const floatingStyles = React11.useMemo(() => {
      const initialStyles = {
        position: strategy,
        left: 0,
        top: 0
      };
      if (!elements2.floating) {
        return initialStyles;
      }
      const x2 = roundByDPR2(elements2.floating, data.x);
      const y3 = roundByDPR2(elements2.floating, data.y);
      if (transform) {
        return {
          ...initialStyles,
          transform: "translate(" + x2 + "px, " + y3 + "px)",
          ...getDPR(elements2.floating) >= 1.5 && {
            willChange: "transform"
          }
        };
      }
      return {
        position: strategy,
        left: x2,
        top: y3
      };
    }, [strategy, transform, elements2.floating, data.x, data.y]);
    return React11.useMemo(() => ({
      ...data,
      update,
      refs,
      elements: elements2,
      floatingStyles
    }), [data, update, refs, elements2, floatingStyles]);
  }

  // packages/components/build-module/popover/index.mjs
  var import_element50 = __toESM(require_element(), 1);
  var import_compose16 = __toESM(require_compose(), 1);
  var import_deprecated6 = __toESM(require_deprecated(), 1);
  var import_primitives32 = __toESM(require_primitives(), 1);
  var import_i18n7 = __toESM(require_i18n(), 1);

  // packages/components/build-module/scroll-lock/index.mjs
  var import_element40 = __toESM(require_element(), 1);
  var previousScrollTop = 0;
  function setLocked(locked) {
    const scrollingElement = document.scrollingElement || document.body;
    if (locked) {
      previousScrollTop = scrollingElement.scrollTop;
    }
    const methodName = locked ? "add" : "remove";
    scrollingElement.classList[methodName]("lockscroll");
    document.documentElement.classList[methodName]("lockscroll");
    if (!locked) {
      scrollingElement.scrollTop = previousScrollTop;
    }
  }
  var lockCounter = 0;
  function ScrollLock() {
    (0, import_element40.useEffect)(() => {
      if (lockCounter === 0) {
        setLocked(true);
      }
      ++lockCounter;
      return () => {
        if (lockCounter === 1) {
          setLocked(false);
        }
        --lockCounter;
      };
    }, []);
    return null;
  }
  var scroll_lock_default = ScrollLock;

  // packages/components/build-module/slot-fill/index.mjs
  var import_element48 = __toESM(require_element(), 1);

  // packages/components/build-module/slot-fill/fill.mjs
  var import_compose11 = __toESM(require_compose(), 1);
  var import_element42 = __toESM(require_element(), 1);

  // packages/components/build-module/slot-fill/context.mjs
  var import_compose10 = __toESM(require_compose(), 1);
  var import_element41 = __toESM(require_element(), 1);
  var import_warning4 = __toESM(require_warning(), 1);
  var initialValue = {
    slots: (0, import_compose10.observableMap)(),
    fills: (0, import_compose10.observableMap)(),
    registerSlot: () => {
      true ? (0, import_warning4.default)("Components must be wrapped within `SlotFillProvider`. See https://developer.wordpress.org/block-editor/components/slot-fill/") : void 0;
    },
    unregisterSlot: () => {
    },
    updateSlot: () => {
    },
    registerFill: () => {
    },
    unregisterFill: () => {
    },
    updateFill: () => {
    },
    // This helps the provider know if it's using the default context value or not.
    isDefault: true
  };
  var SlotFillContext = (0, import_element41.createContext)(initialValue);
  SlotFillContext.displayName = "SlotFillContext";
  var context_default = SlotFillContext;

  // node_modules/uuid/dist/esm-browser/rng.js
  var getRandomValues;
  var rnds8 = new Uint8Array(16);
  function rng() {
    if (!getRandomValues) {
      getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
      if (!getRandomValues) {
        throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
      }
    }
    return getRandomValues(rnds8);
  }

  // node_modules/uuid/dist/esm-browser/stringify.js
  var byteToHex = [];
  for (let i3 = 0; i3 < 256; ++i3) {
    byteToHex.push((i3 + 256).toString(16).slice(1));
  }
  function unsafeStringify(arr, offset3 = 0) {
    return byteToHex[arr[offset3 + 0]] + byteToHex[arr[offset3 + 1]] + byteToHex[arr[offset3 + 2]] + byteToHex[arr[offset3 + 3]] + "-" + byteToHex[arr[offset3 + 4]] + byteToHex[arr[offset3 + 5]] + "-" + byteToHex[arr[offset3 + 6]] + byteToHex[arr[offset3 + 7]] + "-" + byteToHex[arr[offset3 + 8]] + byteToHex[arr[offset3 + 9]] + "-" + byteToHex[arr[offset3 + 10]] + byteToHex[arr[offset3 + 11]] + byteToHex[arr[offset3 + 12]] + byteToHex[arr[offset3 + 13]] + byteToHex[arr[offset3 + 14]] + byteToHex[arr[offset3 + 15]];
  }

  // node_modules/uuid/dist/esm-browser/native.js
  var randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
  var native_default = {
    randomUUID
  };

  // node_modules/uuid/dist/esm-browser/v4.js
  function v4(options2, buf, offset3) {
    if (native_default.randomUUID && !buf && !options2) {
      return native_default.randomUUID();
    }
    options2 = options2 || {};
    const rnds = options2.random || (options2.rng || rng)();
    rnds[6] = rnds[6] & 15 | 64;
    rnds[8] = rnds[8] & 63 | 128;
    if (buf) {
      offset3 = offset3 || 0;
      for (let i3 = 0; i3 < 16; ++i3) {
        buf[offset3 + i3] = rnds[i3];
      }
      return buf;
    }
    return unsafeStringify(rnds);
  }
  var v4_default = v4;

  // packages/components/build-module/style-provider/index.mjs
  var import_jsx_runtime103 = __toESM(require_jsx_runtime(), 1);
  var uuidCache = /* @__PURE__ */ new Set();
  var containerCacheMap = /* @__PURE__ */ new WeakMap();
  var memoizedCreateCacheWithContainer = (container) => {
    if (containerCacheMap.has(container)) {
      return containerCacheMap.get(container);
    }
    let key = v4_default().replace(/[0-9]/g, "");
    while (uuidCache.has(key)) {
      key = v4_default().replace(/[0-9]/g, "");
    }
    uuidCache.add(key);
    const cache2 = createCache({
      container,
      key
    });
    containerCacheMap.set(container, cache2);
    return cache2;
  };
  function StyleProvider(props) {
    const {
      children,
      document: document2
    } = props;
    if (!document2) {
      return null;
    }
    const cache2 = memoizedCreateCacheWithContainer(document2.head);
    return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(CacheProvider, {
      value: cache2,
      children
    });
  }
  var style_provider_default = StyleProvider;

  // packages/components/build-module/slot-fill/fill.mjs
  var import_jsx_runtime104 = __toESM(require_jsx_runtime(), 1);
  function Fill({
    name,
    children
  }) {
    const registry = (0, import_element42.useContext)(context_default);
    const instanceRef = (0, import_element42.useRef)({});
    const childrenRef = (0, import_element42.useRef)(children);
    (0, import_element42.useLayoutEffect)(() => {
      childrenRef.current = children;
    }, [children]);
    (0, import_element42.useLayoutEffect)(() => {
      const instance = instanceRef.current;
      registry.registerFill(name, {
        instance,
        children: childrenRef.current
      });
      return () => registry.unregisterFill(name, instance);
    }, [registry, name]);
    (0, import_element42.useLayoutEffect)(() => {
      registry.updateFill(name, {
        instance: instanceRef.current,
        children: childrenRef.current
      });
    });
    const slot = (0, import_compose11.useObservableValue)(registry.slots, name);
    if (!slot) {
      return null;
    }
    if (slot.type === "children") {
      return null;
    }
    const portalEl = slot.ref.current;
    if (!portalEl) {
      return null;
    }
    const wrappedChildren = typeof children === "function" ? children(slot.fillProps ?? {}) : children;
    return (0, import_element42.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(style_provider_default, {
      document: portalEl.ownerDocument,
      children: wrappedChildren
    }), portalEl);
  }

  // packages/components/build-module/slot-fill/slot.mjs
  var import_compose12 = __toESM(require_compose(), 1);
  var import_element43 = __toESM(require_element(), 1);
  var import_jsx_runtime105 = __toESM(require_jsx_runtime(), 1);
  function isFunction(maybeFunc) {
    return typeof maybeFunc === "function";
  }
  function addKeysToChildren(children) {
    return import_element43.Children.map(children, (child, childIndex) => {
      if (!child || typeof child === "string") {
        return child;
      }
      let childKey = childIndex;
      if (typeof child === "object" && "key" in child && child?.key) {
        childKey = child.key;
      }
      return (0, import_element43.cloneElement)(child, {
        key: childKey
      });
    });
  }
  function Slot(props) {
    const {
      name,
      children,
      fillProps = {}
    } = props;
    const registry = (0, import_element43.useContext)(context_default);
    const instanceRef = (0, import_element43.useRef)({});
    (0, import_element43.useLayoutEffect)(() => {
      const instance = instanceRef.current;
      registry.registerSlot(name, {
        type: "children",
        instance
      });
      return () => registry.unregisterSlot(name, instance);
    }, [registry, name]);
    let fills = (0, import_compose12.useObservableValue)(registry.fills, name) ?? [];
    const currentSlot = (0, import_compose12.useObservableValue)(registry.slots, name);
    if (!currentSlot || currentSlot.instance !== instanceRef.current) {
      fills = [];
    }
    const renderedFills = fills.map((fill) => {
      const fillChildren = isFunction(fill.children) ? fill.children(fillProps) : fill.children;
      return addKeysToChildren(fillChildren);
    }).filter(
      // In some cases fills are rendered only when some conditions apply.
      // This ensures that we only use non-empty fills when rendering, i.e.,
      // it allows us to render wrappers only when the fills are actually present.
      (element) => !(0, import_element43.isEmptyElement)(element)
    );
    return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_jsx_runtime105.Fragment, {
      children: isFunction(children) ? children(renderedFills) : renderedFills
    });
  }
  var slot_default = Slot;

  // packages/components/build-module/slot-fill/bubbles-virtually/slot.mjs
  var import_element44 = __toESM(require_element(), 1);
  var import_compose13 = __toESM(require_compose(), 1);
  var import_jsx_runtime106 = __toESM(require_jsx_runtime(), 1);
  function Slot2(props, forwardedRef) {
    const {
      name,
      fillProps = {},
      as,
      // `children` is not allowed. However, if it is passed,
      // it will be displayed as is, so remove `children`.
      children,
      ...restProps
    } = props;
    const registry = (0, import_element44.useContext)(context_default);
    const instanceRef = (0, import_element44.useRef)({});
    const ref = (0, import_element44.useRef)(null);
    const fillPropsRef = (0, import_element44.useRef)(fillProps);
    (0, import_element44.useLayoutEffect)(() => {
      fillPropsRef.current = fillProps;
    }, [fillProps]);
    (0, import_element44.useLayoutEffect)(() => {
      const instance = instanceRef.current;
      registry.registerSlot(name, {
        type: "portal",
        instance,
        ref,
        fillProps: fillPropsRef.current
      });
      return () => registry.unregisterSlot(name, instance);
    }, [registry, name]);
    (0, import_element44.useLayoutEffect)(() => {
      registry.updateSlot(name, {
        type: "portal",
        instance: instanceRef.current,
        ref,
        fillProps: fillPropsRef.current
      });
    });
    return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(component_default, {
      as,
      ref: (0, import_compose13.useMergeRefs)([forwardedRef, ref]),
      ...restProps
    });
  }
  var slot_default2 = (0, import_element44.forwardRef)(Slot2);

  // packages/components/build-module/slot-fill/provider.mjs
  var import_compose14 = __toESM(require_compose(), 1);
  var import_element45 = __toESM(require_element(), 1);
  var import_is_shallow_equal = __toESM(require_is_shallow_equal(), 1);
  var import_jsx_runtime107 = __toESM(require_jsx_runtime(), 1);
  function createSlotRegistry() {
    const slots = (0, import_compose14.observableMap)();
    const fills = (0, import_compose14.observableMap)();
    function registerSlot(name, slot) {
      slots.set(name, slot);
    }
    function unregisterSlot(name, instance) {
      const currentSlot = slots.get(name);
      if (!currentSlot || currentSlot.instance !== instance) {
        return;
      }
      slots.delete(name);
    }
    function updateSlot(name, slot) {
      if (slot.type !== "portal") {
        return;
      }
      const slotForName = slots.get(name);
      if (!slotForName) {
        return;
      }
      if (slotForName.type !== "portal") {
        return;
      }
      if (slotForName.instance !== slot.instance) {
        return;
      }
      if ((0, import_is_shallow_equal.isShallowEqual)(slotForName.fillProps, slot.fillProps)) {
        return;
      }
      slots.set(name, slot);
    }
    function registerFill(name, fill) {
      fills.set(name, [...fills.get(name) || [], fill]);
    }
    function unregisterFill(name, instance) {
      const fillsForName = fills.get(name);
      if (!fillsForName) {
        return;
      }
      fills.set(name, fillsForName.filter((fill) => fill.instance !== instance));
    }
    function updateFill(name, fill) {
      const fillsForName = fills.get(name);
      if (!fillsForName) {
        return;
      }
      const fillForInstance = fillsForName.find((f3) => f3.instance === fill.instance);
      if (!fillForInstance) {
        return;
      }
      if (fillForInstance.children === fill.children) {
        return;
      }
      fills.set(name, fillsForName.map((f3) => {
        if (f3.instance === fill.instance) {
          return fill;
        }
        return f3;
      }));
    }
    return {
      slots,
      fills,
      registerSlot,
      unregisterSlot,
      updateSlot,
      registerFill,
      unregisterFill,
      updateFill
    };
  }
  function SlotFillProvider({
    children
  }) {
    const [contextValue] = (0, import_element45.useState)(createSlotRegistry);
    return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(context_default.Provider, {
      value: contextValue,
      children
    });
  }
  var provider_default = SlotFillProvider;

  // packages/components/build-module/slot-fill/index.mjs
  var import_jsx_runtime108 = __toESM(require_jsx_runtime(), 1);

  // packages/components/build-module/slot-fill/bubbles-virtually/use-slot.mjs
  var import_element46 = __toESM(require_element(), 1);
  var import_compose15 = __toESM(require_compose(), 1);
  function useSlot(name) {
    const registry = (0, import_element46.useContext)(context_default);
    const slot = (0, import_compose15.useObservableValue)(registry.slots, name);
    let ref;
    if (slot && slot.type === "portal") {
      ref = slot.ref;
    }
    return {
      ref
    };
  }

  // packages/components/build-module/slot-fill/bubbles-virtually/use-slot-fills.mjs
  var import_element47 = __toESM(require_element(), 1);
  function useObservableValueWithSelector(map, name, selector2) {
    const subscribe2 = (0, import_element47.useMemo)(() => (listener) => map.subscribe(name, listener), [map, name]);
    const getValue3 = () => selector2(map.get(name));
    return (0, import_element47.useSyncExternalStore)(subscribe2, getValue3, getValue3);
  }
  function getLength(array) {
    return array?.length;
  }
  function useSlotFills(name) {
    const registry = (0, import_element47.useContext)(context_default);
    const length2 = useObservableValueWithSelector(registry.fills, name, getLength);
    const fills = (0, import_element47.useMemo)(() => {
      return length2 !== void 0 ? Array.from({
        length: length2
      }) : void 0;
    }, [length2]);
    return fills;
  }

  // packages/components/build-module/slot-fill/index.mjs
  var Slot3 = (0, import_element48.forwardRef)((props, ref) => {
    const {
      bubblesVirtually,
      ...restProps
    } = props;
    if (bubblesVirtually) {
      return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(slot_default2, {
        ...restProps,
        ref
      });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(slot_default, {
      ...restProps
    });
  });
  Slot3.displayName = "Slot";
  function Provider({
    children,
    passthrough = false
  }) {
    const parent = (0, import_element48.useContext)(context_default);
    if (!parent.isDefault && passthrough) {
      return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_jsx_runtime108.Fragment, {
        children
      });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(provider_default, {
      children
    });
  }
  Provider.displayName = "SlotFillProvider";
  function createSlotFill(key) {
    const baseName = typeof key === "symbol" ? key.description : key;
    const FillComponent = (props) => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Fill, {
      name: key,
      ...props
    });
    FillComponent.displayName = `${baseName}Fill`;
    const SlotComponent = (0, import_element48.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Slot3, {
      name: key,
      ref,
      ...props
    }));
    SlotComponent.displayName = `${baseName}Slot`;
    SlotComponent.__unstableName = key;
    return {
      name: key,
      Fill: FillComponent,
      Slot: SlotComponent
    };
  }

  // packages/components/build-module/popover/overlay-middlewares.mjs
  function overlayMiddlewares() {
    return [{
      name: "overlay",
      fn({
        rects
      }) {
        return rects.reference;
      }
    }, size2({
      apply({
        rects,
        elements: elements2
      }) {
        const {
          firstElementChild
        } = elements2.floating ?? {};
        if (!(firstElementChild instanceof HTMLElement)) {
          return;
        }
        Object.assign(firstElementChild.style, {
          width: `${rects.reference.width}px`,
          height: `${rects.reference.height}px`
        });
      }
    })];
  }

  // packages/components/build-module/popover/context.mjs
  var import_element49 = __toESM(require_element(), 1);
  var slotNameContext = (0, import_element49.createContext)(void 0);
  slotNameContext.displayName = "__unstableSlotNameContext";

  // packages/components/build-module/popover/index.mjs
  var import_jsx_runtime109 = __toESM(require_jsx_runtime(), 1);
  var SLOT_NAME = "Popover";
  var OVERFLOW_PADDING = 8;
  var ArrowTriangle = () => /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(import_primitives32.SVG, {
    xmlns: "http://www.w3.org/2000/svg",
    viewBox: "0 0 100 100",
    className: "components-popover__triangle",
    role: "presentation",
    children: [/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_primitives32.Path, {
      className: "components-popover__triangle-bg",
      d: "M 0 0 L 50 50 L 100 0"
    }), /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_primitives32.Path, {
      className: "components-popover__triangle-border",
      d: "M 0 0 L 50 50 L 100 0",
      vectorEffect: "non-scaling-stroke"
    })]
  });
  var fallbackContainerClassname = "components-popover__fallback-container";
  var getPopoverFallbackContainer = () => {
    let container = document.body.querySelector("." + fallbackContainerClassname);
    if (!container) {
      container = document.createElement("div");
      container.className = fallbackContainerClassname;
      document.body.append(container);
    }
    return container;
  };
  var UnforwardedPopover = (props, forwardedRef) => {
    const {
      animate = true,
      headerTitle,
      constrainTabbing,
      onClose,
      children,
      className: className2,
      noArrow = true,
      position: position2,
      placement: placementProp = "bottom-start",
      offset: offsetProp = 0,
      focusOnMount = "firstElement",
      anchor,
      expandOnMobile,
      onFocusOutside,
      __unstableSlotName = SLOT_NAME,
      flip: flip3 = true,
      resize = true,
      shift: shift3 = false,
      inline: inline3 = false,
      variant,
      style: contentStyle,
      // Deprecated props
      __unstableForcePosition,
      anchorRef,
      anchorRect,
      getAnchorRect,
      isAlternate,
      // Rest
      ...contentProps
    } = useContextSystem(props, "Popover");
    let computedFlipProp = flip3;
    let computedResizeProp = resize;
    if (__unstableForcePosition !== void 0) {
      (0, import_deprecated6.default)("`__unstableForcePosition` prop in wp.components.Popover", {
        since: "6.1",
        version: "6.3",
        alternative: "`flip={ false }` and  `resize={ false }`"
      });
      computedFlipProp = !__unstableForcePosition;
      computedResizeProp = !__unstableForcePosition;
    }
    if (anchorRef !== void 0) {
      (0, import_deprecated6.default)("`anchorRef` prop in wp.components.Popover", {
        since: "6.1",
        alternative: "`anchor` prop"
      });
    }
    if (anchorRect !== void 0) {
      (0, import_deprecated6.default)("`anchorRect` prop in wp.components.Popover", {
        since: "6.1",
        alternative: "`anchor` prop"
      });
    }
    if (getAnchorRect !== void 0) {
      (0, import_deprecated6.default)("`getAnchorRect` prop in wp.components.Popover", {
        since: "6.1",
        alternative: "`anchor` prop"
      });
    }
    const computedVariant = isAlternate ? "toolbar" : variant;
    if (isAlternate !== void 0) {
      (0, import_deprecated6.default)("`isAlternate` prop in wp.components.Popover", {
        since: "6.2",
        alternative: "`variant` prop with the `'toolbar'` value"
      });
    }
    const arrowRef = (0, import_element50.useRef)(null);
    const [fallbackReferenceElement, setFallbackReferenceElement] = (0, import_element50.useState)(null);
    const anchorRefFallback = (0, import_element50.useCallback)((node2) => {
      setFallbackReferenceElement(node2);
    }, []);
    const isMobileViewport = (0, import_compose16.useViewportMatch)("medium", "<");
    const isExpanded = expandOnMobile && isMobileViewport;
    const hasArrow = !isExpanded && !noArrow;
    const normalizedPlacementFromProps = position2 ? positionToPlacement(position2) : placementProp;
    const middleware2 = [...placementProp === "overlay" ? overlayMiddlewares() : [], offset2(offsetProp), computedFlipProp && flip2(), computedResizeProp && size2({
      padding: OVERFLOW_PADDING,
      apply(sizeProps) {
        const {
          firstElementChild
        } = refs.floating.current ?? {};
        if (!(firstElementChild instanceof HTMLElement)) {
          return;
        }
        Object.assign(firstElementChild.style, {
          maxHeight: `${Math.max(0, sizeProps.availableHeight)}px`,
          overflow: "auto"
        });
      }
    }), shift3 && shift2({
      crossAxis: true,
      limiter: limitShift2(),
      padding: 1
      // Necessary to avoid flickering at the edge of the viewport.
    }), arrow3({
      element: arrowRef
    })];
    const slotName = (0, import_element50.useContext)(slotNameContext) || __unstableSlotName;
    const slot = useSlot(slotName);
    let onDialogClose;
    if (onClose || onFocusOutside) {
      onDialogClose = (type, event) => {
        if (type === "focus-outside") {
          const blurTarget = event?.target;
          const referenceElement = refs.reference.current;
          const floatingElement = refs.floating.current;
          const isBlurFromThisPopover = referenceElement && "contains" in referenceElement && referenceElement.contains(blurTarget) || floatingElement?.contains(blurTarget);
          const ownerDocument = floatingElement?.ownerDocument;
          if (!isBlurFromThisPopover && !("relatedTarget" in event && event.relatedTarget) && ownerDocument?.activeElement === ownerDocument?.body) {
            return;
          }
          if (onFocusOutside) {
            onFocusOutside(event);
          } else if (onClose) {
            onClose();
          }
        } else if (onClose) {
          onClose();
        }
      };
    }
    const [dialogRef, dialogProps] = (0, import_compose16.__experimentalUseDialog)({
      constrainTabbing,
      focusOnMount,
      __unstableOnClose: onDialogClose,
      // @ts-expect-error The __unstableOnClose property needs to be deprecated first (see https://github.com/WordPress/gutenberg/pull/27675)
      onClose: onDialogClose
    });
    const {
      // Positioning coordinates
      x: x2,
      y: y3,
      // Object with "regular" refs to both "reference" and "floating"
      refs,
      // Type of CSS position property to use (absolute or fixed)
      strategy,
      update,
      placement: computedPlacement,
      middlewareData: {
        arrow: arrowData
      }
    } = useFloating({
      placement: normalizedPlacementFromProps === "overlay" ? void 0 : normalizedPlacementFromProps,
      middleware: middleware2,
      whileElementsMounted: (referenceParam, floatingParam, updateParam) => autoUpdate(referenceParam, floatingParam, updateParam, {
        layoutShift: false,
        animationFrame: true
      })
    });
    const arrowCallbackRef = (0, import_element50.useCallback)((node2) => {
      arrowRef.current = node2;
      update();
    }, [update]);
    const anchorRefTop = anchorRef?.top;
    const anchorRefBottom = anchorRef?.bottom;
    const anchorRefStartContainer = anchorRef?.startContainer;
    const anchorRefCurrent = anchorRef?.current;
    (0, import_element50.useLayoutEffect)(() => {
      const resultingReferenceElement = getReferenceElement({
        anchor,
        anchorRef,
        anchorRect,
        getAnchorRect,
        fallbackReferenceElement
      });
      refs.setReference(resultingReferenceElement);
    }, [anchor, anchorRef, anchorRefTop, anchorRefBottom, anchorRefStartContainer, anchorRefCurrent, anchorRect, getAnchorRect, fallbackReferenceElement, refs]);
    const mergedFloatingRef = (0, import_compose16.useMergeRefs)([refs.setFloating, dialogRef, forwardedRef]);
    const style2 = isExpanded ? void 0 : {
      position: strategy,
      top: 0,
      left: 0,
      // `x` and `y` are framer-motion specific props and are shorthands
      // for `translateX` and `translateY`. Currently it is not possible
      // to use `translateX` and `translateY` because those values would
      // be overridden by the return value of the
      // `placementToMotionAnimationProps` function.
      x: computePopoverPosition(x2),
      y: computePopoverPosition(y3)
    };
    const shouldReduceMotion = (0, import_compose16.useReducedMotion)();
    const shouldAnimate = animate && !isExpanded && !shouldReduceMotion;
    const [animationFinished, setAnimationFinished] = (0, import_element50.useState)(false);
    const {
      style: motionInlineStyles,
      ...otherMotionProps
    } = (0, import_element50.useMemo)(() => placementToMotionAnimationProps(computedPlacement), [computedPlacement]);
    const animationProps = shouldAnimate ? {
      style: {
        ...contentStyle,
        ...motionInlineStyles,
        ...style2
      },
      onAnimationComplete: () => setAnimationFinished(true),
      ...otherMotionProps
    } : {
      animate: false,
      style: {
        ...contentStyle,
        ...style2
      }
    };
    const isPositioned = (!shouldAnimate || animationFinished) && x2 !== null && y3 !== null;
    let content = /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(motion.div, {
      className: clsx_default(className2, {
        "is-expanded": isExpanded,
        "is-positioned": isPositioned,
        // Use the 'alternate' classname for 'toolbar' variant for back compat.
        [`is-${computedVariant === "toolbar" ? "alternate" : computedVariant}`]: computedVariant
      }),
      ...animationProps,
      ...contentProps,
      ref: mergedFloatingRef,
      ...dialogProps,
      tabIndex: -1,
      children: [isExpanded && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(scroll_lock_default, {}), isExpanded && /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", {
        className: "components-popover__header",
        children: [/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", {
          className: "components-popover__header-title",
          children: headerTitle
        }), /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(button_default, {
          className: "components-popover__close",
          size: "small",
          icon: close_default,
          onClick: onClose,
          label: (0, import_i18n7.__)("Close")
        })]
      }), /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", {
        className: "components-popover__content",
        children
      }), hasArrow && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", {
        ref: arrowCallbackRef,
        className: ["components-popover__arrow", `is-${computedPlacement.split("-")[0]}`].join(" "),
        style: {
          left: typeof arrowData?.x !== "undefined" && Number.isFinite(arrowData.x) ? `${arrowData.x}px` : "",
          top: typeof arrowData?.y !== "undefined" && Number.isFinite(arrowData.y) ? `${arrowData.y}px` : ""
        },
        children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(ArrowTriangle, {})
      })]
    });
    const shouldRenderWithinSlot = slot.ref && !inline3;
    const hasAnchor = anchorRef || anchorRect || anchor;
    if (shouldRenderWithinSlot) {
      content = /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Fill, {
        name: slotName,
        children: content
      });
    } else if (!inline3) {
      content = (0, import_element50.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(StyleProvider, {
        document,
        children: content
      }), getPopoverFallbackContainer());
    }
    if (hasAnchor) {
      return content;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(import_jsx_runtime109.Fragment, {
      children: [/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", {
        ref: anchorRefFallback
      }), content]
    });
  };
  var PopoverSlot = (0, import_element50.forwardRef)(({
    name = SLOT_NAME
  }, ref) => {
    return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Slot3, {
      bubblesVirtually: true,
      name,
      className: "popover-slot",
      ref
    });
  });
  var Popover3 = Object.assign(contextConnect(UnforwardedPopover, "Popover"), {
    /**
     * Renders a slot that is used internally by Popover for rendering content.
     */
    Slot: Object.assign(PopoverSlot, {
      displayName: "Popover.Slot"
    }),
    /**
     * Provides a context to manage popover slot names.
     *
     * This is marked as unstable and should not be used directly.
     */
    __unstableSlotNameProvider: Object.assign(slotNameContext.Provider, {
      displayName: "Popover.__unstableSlotNameProvider"
    })
  });
  var popover_default = Popover3;

  // packages/components/build-module/autocomplete/autocompleter-ui.mjs
  var import_jsx_runtime110 = __toESM(require_jsx_runtime(), 1);
  function ListBox({
    items,
    onSelect,
    selectedIndex,
    instanceId,
    listBoxId,
    className: className2,
    Component: Component9 = "div"
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Component9, {
      id: listBoxId,
      role: "listbox",
      className: "components-autocomplete__results",
      children: items.map((option, index2) => /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(button_default, {
        id: `components-autocomplete-item-${instanceId}-${option.key}`,
        role: "option",
        __next40pxDefaultSize: true,
        "aria-selected": index2 === selectedIndex,
        accessibleWhenDisabled: true,
        disabled: option.isDisabled,
        className: clsx_default("components-autocomplete__result", className2, {
          // Unused, for backwards compatibility.
          "is-selected": index2 === selectedIndex
        }),
        variant: index2 === selectedIndex ? "primary" : void 0,
        onClick: () => onSelect(option),
        children: option.label
      }, option.key))
    });
  }
  function getAutoCompleterUI(autocompleter) {
    const useItems = autocompleter.useItems ?? getDefaultUseItems(autocompleter);
    function AutocompleterUI({
      filterValue,
      instanceId,
      listBoxId,
      className: className2,
      selectedIndex,
      onChangeOptions,
      onSelect,
      onReset,
      reset,
      contentRef
    }) {
      const [items] = useItems(filterValue);
      const popoverAnchor = (0, import_rich_text.useAnchor)({
        editableContentElement: contentRef.current
      });
      const [needsA11yCompat, setNeedsA11yCompat] = (0, import_element51.useState)(false);
      const popoverRef = (0, import_element51.useRef)(null);
      const popoverRefs = (0, import_compose17.useMergeRefs)([popoverRef, (0, import_compose17.useRefEffect)((node2) => {
        if (!contentRef.current) {
          return;
        }
        setNeedsA11yCompat(node2.ownerDocument !== contentRef.current.ownerDocument);
      }, [contentRef])]);
      useOnClickOutside(popoverRef, reset);
      const debouncedSpeak = (0, import_compose17.useDebounce)(import_a11y.speak, 500);
      function announce(options2) {
        if (!debouncedSpeak) {
          return;
        }
        if (!!options2.length) {
          if (filterValue) {
            debouncedSpeak((0, import_i18n8.sprintf)(
              /* translators: %d: number of results. */
              (0, import_i18n8._n)("%d result found, use up and down arrow keys to navigate.", "%d results found, use up and down arrow keys to navigate.", options2.length),
              options2.length
            ), "assertive");
          } else {
            debouncedSpeak((0, import_i18n8.sprintf)(
              /* translators: %d: number of results. */
              (0, import_i18n8._n)("Initial %d result loaded. Type to filter all available results. Use up and down arrow keys to navigate.", "Initial %d results loaded. Type to filter all available results. Use up and down arrow keys to navigate.", options2.length),
              options2.length
            ), "assertive");
          }
        } else {
          debouncedSpeak((0, import_i18n8.__)("No results."), "assertive");
        }
      }
      (0, import_element51.useLayoutEffect)(() => {
        onChangeOptions(items);
        announce(items);
      }, [items]);
      if (items.length === 0) {
        return null;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_jsx_runtime110.Fragment, {
        children: [/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(popover_default, {
          offset: 8,
          focusOnMount: false,
          onClose: onReset,
          placement: "top-start",
          className: "components-autocomplete__popover",
          anchor: popoverAnchor,
          ref: popoverRefs,
          children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(ListBox, {
            items,
            onSelect,
            selectedIndex,
            instanceId,
            listBoxId,
            className: className2
          })
        }), contentRef.current && needsA11yCompat && (0, import_react_dom6.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(ListBox, {
          items,
          onSelect,
          selectedIndex,
          instanceId,
          listBoxId,
          className: className2,
          Component: component_default2
        }), contentRef.current.ownerDocument.body)]
      });
    }
    return AutocompleterUI;
  }
  function useOnClickOutside(ref, handler) {
    (0, import_element51.useEffect)(() => {
      const listener = (event) => {
        if (!ref.current || ref.current.contains(event.target)) {
          return;
        }
        handler(event);
      };
      document.addEventListener("mousedown", listener);
      document.addEventListener("touchstart", listener);
      return () => {
        document.removeEventListener("mousedown", listener);
        document.removeEventListener("touchstart", listener);
      };
    }, [handler, ref]);
  }

  // packages/components/build-module/utils/get-node-text.mjs
  var getNodeText = (node2) => {
    if (node2 === null) {
      return "";
    }
    switch (typeof node2) {
      case "string":
      case "number":
        return node2.toString();
      case "object": {
        if (node2 instanceof Array) {
          return node2.map(getNodeText).join("");
        }
        if ("props" in node2) {
          return getNodeText(node2.props.children);
        }
        return "";
      }
      default:
        return "";
    }
  };
  var get_node_text_default = getNodeText;

  // packages/components/build-module/autocomplete/index.mjs
  var import_jsx_runtime111 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_FILTERED_OPTIONS = [];
  var AUTOCOMPLETE_HOOK_REFERENCE = {};
  function useAutocomplete({
    record,
    onChange,
    onReplace,
    completers,
    contentRef
  }) {
    const instanceId = (0, import_compose18.useInstanceId)(AUTOCOMPLETE_HOOK_REFERENCE);
    const [selectedIndex, setSelectedIndex] = (0, import_element52.useState)(0);
    const [filteredOptions, setFilteredOptions] = (0, import_element52.useState)(EMPTY_FILTERED_OPTIONS);
    const [filterValue, setFilterValue] = (0, import_element52.useState)("");
    const [autocompleter, setAutocompleter] = (0, import_element52.useState)(null);
    const [AutocompleterUI, setAutocompleterUI] = (0, import_element52.useState)(null);
    const backspacingRef = (0, import_element52.useRef)(false);
    function insertCompletion(replacement) {
      if (autocompleter === null) {
        return;
      }
      const end = record.start;
      const start = end - autocompleter.triggerPrefix.length - filterValue.length;
      const toInsert = (0, import_rich_text2.create)({
        html: (0, import_element52.renderToString)(replacement)
      });
      onChange((0, import_rich_text2.insert)(record, toInsert, start, end));
    }
    function select(option) {
      const {
        getOptionCompletion
      } = autocompleter || {};
      if (option.isDisabled) {
        return;
      }
      if (getOptionCompletion) {
        const completion = getOptionCompletion(option.value, filterValue);
        const isCompletionObject = (obj) => {
          return obj !== null && typeof obj === "object" && "action" in obj && obj.action !== void 0 && "value" in obj && obj.value !== void 0;
        };
        const completionObject = isCompletionObject(completion) ? completion : {
          action: "insert-at-caret",
          value: completion
        };
        if ("replace" === completionObject.action) {
          onReplace([completionObject.value]);
          return;
        } else if ("insert-at-caret" === completionObject.action) {
          insertCompletion(completionObject.value);
        }
      }
      reset();
      contentRef.current?.focus();
    }
    function reset() {
      setSelectedIndex(0);
      setFilteredOptions(EMPTY_FILTERED_OPTIONS);
      setFilterValue("");
      setAutocompleter(null);
      setAutocompleterUI(null);
    }
    function onChangeOptions(options2) {
      setSelectedIndex(options2.length === filteredOptions.length ? selectedIndex : 0);
      setFilteredOptions(options2);
    }
    function handleKeyDown(event) {
      backspacingRef.current = event.key === "Backspace";
      if (!autocompleter) {
        return;
      }
      if (filteredOptions.length === 0) {
        return;
      }
      if (event.defaultPrevented) {
        return;
      }
      switch (event.key) {
        case "ArrowUp": {
          const newIndex = (selectedIndex === 0 ? filteredOptions.length : selectedIndex) - 1;
          setSelectedIndex(newIndex);
          if ((0, import_keycodes.isAppleOS)()) {
            (0, import_a11y2.speak)(get_node_text_default(filteredOptions[newIndex].label), "assertive");
          }
          break;
        }
        case "ArrowDown": {
          const newIndex = (selectedIndex + 1) % filteredOptions.length;
          setSelectedIndex(newIndex);
          if ((0, import_keycodes.isAppleOS)()) {
            (0, import_a11y2.speak)(get_node_text_default(filteredOptions[newIndex].label), "assertive");
          }
          break;
        }
        case "Escape":
          setAutocompleter(null);
          setAutocompleterUI(null);
          event.preventDefault();
          break;
        case "Enter":
          select(filteredOptions[selectedIndex]);
          break;
        case "ArrowLeft":
        case "ArrowRight":
          reset();
          return;
        default:
          return;
      }
      event.preventDefault();
    }
    const textContent = (0, import_element52.useMemo)(() => {
      if ((0, import_rich_text2.isCollapsed)(record)) {
        return (0, import_rich_text2.getTextContent)((0, import_rich_text2.slice)(record, 0));
      }
      return "";
    }, [record]);
    (0, import_element52.useEffect)(() => {
      if (!textContent) {
        if (autocompleter) {
          reset();
        }
        return;
      }
      const completer = completers.reduce((lastTrigger, currentCompleter) => {
        const triggerIndex2 = textContent.lastIndexOf(currentCompleter.triggerPrefix);
        const lastTriggerIndex = lastTrigger !== null ? textContent.lastIndexOf(lastTrigger.triggerPrefix) : -1;
        return triggerIndex2 > lastTriggerIndex ? currentCompleter : lastTrigger;
      }, null);
      if (!completer) {
        if (autocompleter) {
          reset();
        }
        return;
      }
      const {
        allowContext,
        triggerPrefix
      } = completer;
      const triggerIndex = textContent.lastIndexOf(triggerPrefix);
      const textWithoutTrigger = textContent.slice(triggerIndex + triggerPrefix.length);
      const tooDistantFromTrigger = textWithoutTrigger.length > 50;
      if (tooDistantFromTrigger) {
        return;
      }
      const mismatch = filteredOptions.length === 0;
      const wordsFromTrigger = textWithoutTrigger.split(/\s/);
      const hasOneTriggerWord = wordsFromTrigger.length === 1;
      const matchingWhileBackspacing = backspacingRef.current && wordsFromTrigger.length <= 3;
      if (mismatch && !(matchingWhileBackspacing || hasOneTriggerWord)) {
        if (autocompleter) {
          reset();
        }
        return;
      }
      const textAfterSelection = (0, import_rich_text2.getTextContent)((0, import_rich_text2.slice)(record, void 0, (0, import_rich_text2.getTextContent)(record).length));
      if (allowContext && !allowContext(textContent.slice(0, triggerIndex), textAfterSelection)) {
        if (autocompleter) {
          reset();
        }
        return;
      }
      if (/^\s/.test(textWithoutTrigger) || /\s\s+$/.test(textWithoutTrigger)) {
        if (autocompleter) {
          reset();
        }
        return;
      }
      if (!/[\u0000-\uFFFF]*$/.test(textWithoutTrigger)) {
        if (autocompleter) {
          reset();
        }
        return;
      }
      const safeTrigger = escapeRegExp(completer.triggerPrefix);
      const text = (0, import_remove_accents3.default)(textContent);
      const match4 = text.slice(text.lastIndexOf(completer.triggerPrefix)).match(new RegExp(`${safeTrigger}([\0-\uFFFF]*)$`));
      const query = match4 && match4[1];
      setAutocompleter(completer);
      setAutocompleterUI(() => completer !== autocompleter ? getAutoCompleterUI(completer) : AutocompleterUI);
      setFilterValue(query === null ? "" : query);
    }, [textContent]);
    const {
      key: selectedKey = ""
    } = filteredOptions[selectedIndex] || {};
    const {
      className: className2
    } = autocompleter || {};
    const isExpanded = !!autocompleter && filteredOptions.length > 0;
    const listBoxId = isExpanded ? `components-autocomplete-listbox-${instanceId}` : void 0;
    const activeId = isExpanded ? `components-autocomplete-item-${instanceId}-${selectedKey}` : null;
    const hasSelection = record.start !== void 0;
    const showPopover = !!textContent && hasSelection && !!AutocompleterUI;
    return {
      listBoxId,
      activeId,
      onKeyDown: withIgnoreIMEEvents(handleKeyDown),
      popover: showPopover && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(AutocompleterUI, {
        className: className2,
        filterValue,
        instanceId,
        listBoxId,
        selectedIndex,
        onChangeOptions,
        onSelect: select,
        value: record,
        contentRef,
        reset
      })
    };
  }
  function recordValuesMatch(a3, b3) {
    return a3.text === b3.text && a3.start === b3.start && a3.end === b3.end;
  }
  function useLastDifferentValue(value) {
    const history = (0, import_element52.useRef)([]);
    const lastEntry = history.current[history.current.length - 1];
    if (!lastEntry || !recordValuesMatch(value, lastEntry)) {
      history.current.push(value);
    }
    if (history.current.length > 2) {
      history.current.shift();
    }
    return history.current[0];
  }
  function useAutocompleteProps(options2) {
    const ref = (0, import_element52.useRef)(null);
    const onKeyDownRef = (0, import_element52.useRef)(void 0);
    const {
      record
    } = options2;
    const previousRecord = useLastDifferentValue(record);
    const {
      popover,
      listBoxId,
      activeId,
      onKeyDown
    } = useAutocomplete({
      ...options2,
      contentRef: ref
    });
    onKeyDownRef.current = onKeyDown;
    const mergedRefs = (0, import_compose18.useMergeRefs)([ref, (0, import_compose18.useRefEffect)((element) => {
      function _onKeyDown(event) {
        onKeyDownRef.current?.(event);
      }
      element.addEventListener("keydown", _onKeyDown);
      return () => {
        element.removeEventListener("keydown", _onKeyDown);
      };
    }, [])]);
    const didUserInput = record.text !== previousRecord?.text;
    if (!didUserInput) {
      return {
        ref: mergedRefs
      };
    }
    return {
      ref: mergedRefs,
      children: popover,
      "aria-autocomplete": listBoxId ? "list" : void 0,
      "aria-owns": listBoxId,
      "aria-activedescendant": activeId
    };
  }
  function Autocomplete({
    children,
    isSelected: isSelected2,
    ...options2
  }) {
    const {
      popover,
      ...props
    } = useAutocomplete(options2);
    return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(import_jsx_runtime111.Fragment, {
      children: [children(props), isSelected2 && popover]
    });
  }

  // packages/components/build-module/border-box-control/border-box-control/component.mjs
  var import_i18n26 = __toESM(require_i18n(), 1);
  var import_element91 = __toESM(require_element(), 1);
  var import_compose36 = __toESM(require_compose(), 1);

  // packages/components/build-module/border-box-control/border-box-control-linked-button/component.mjs
  var import_i18n9 = __toESM(require_i18n(), 1);

  // packages/components/build-module/border-box-control/border-box-control-linked-button/hook.mjs
  var import_element53 = __toESM(require_element(), 1);

  // packages/components/build-module/border-box-control/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__9() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var borderBoxControl = /* @__PURE__ */ css(false ? "" : ";label:borderBoxControl;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFhbUMiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG5pbXBvcnQgdHlwZSB7IEJvcmRlciB9IGZyb20gJy4uL2JvcmRlci1jb250cm9sL3R5cGVzJztcbmltcG9ydCB0eXBlIHsgQm9yZGVycyB9IGZyb20gJy4vdHlwZXMnO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyQm94Q29udHJvbCA9IGNzc2BgO1xuXG5leHBvcnQgY29uc3QgbGlua2VkQm9yZGVyQ29udHJvbCA9ICgpID0+IGNzc2Bcblx0ZmxleDogMTtcblx0JHsgcnRsKCB7IG1hcmdpblJpZ2h0OiAnMjRweCcgfSApKCkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IHdyYXBwZXIgPSBjc3NgXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJCb3hDb250cm9sTGlua2VkQnV0dG9uID0gKFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdFx0dG9wOiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnOHB4JyA6ICczcHgnIH07XG5cdFx0JHsgcnRsKCB7IHJpZ2h0OiAwIH0gKSgpIH1cblx0XHRsaW5lLWhlaWdodDogMDtcblx0YDtcbn07XG5cbmNvbnN0IGJvcmRlckJveFN0eWxlV2l0aEZhbGxiYWNrID0gKCBib3JkZXI/OiBCb3JkZXIgKSA9PiB7XG5cdGNvbnN0IHtcblx0XHRjb2xvciA9IENPTE9SUy5ncmF5WyAyMDAgXSxcblx0XHRzdHlsZSA9ICdzb2xpZCcsXG5cdFx0d2lkdGggPSBDT05GSUcuYm9yZGVyV2lkdGgsXG5cdH0gPSBib3JkZXIgfHwge307XG5cblx0Y29uc3QgY2xhbXBlZFdpZHRoID1cblx0XHR3aWR0aCAhPT0gQ09ORklHLmJvcmRlcldpZHRoID8gYGNsYW1wKDFweCwgJHsgd2lkdGggfSwgMTBweClgIDogd2lkdGg7XG5cdGNvbnN0IGhhc1Zpc2libGVCb3JkZXIgPSAoICEhIHdpZHRoICYmIHdpZHRoICE9PSAnMCcgKSB8fCAhISBjb2xvcjtcblx0Y29uc3QgYm9yZGVyU3R5bGUgPSBoYXNWaXNpYmxlQm9yZGVyID8gc3R5bGUgfHwgJ3NvbGlkJyA6IHN0eWxlO1xuXG5cdHJldHVybiBgJHsgY29sb3IgfSAkeyBib3JkZXJTdHlsZSB9ICR7IGNsYW1wZWRXaWR0aCB9YDtcbn07XG5cbmV4cG9ydCBjb25zdCBib3JkZXJCb3hDb250cm9sVmlzdWFsaXplciA9IChcblx0Ym9yZGVycz86IEJvcmRlcnMsXG5cdHNpemU/OiAnZGVmYXVsdCcgfCAnX191bnN0YWJsZS1sYXJnZSdcbikgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHR0b3A6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICcyMHB4JyA6ICcxNXB4JyB9O1xuXHRcdHJpZ2h0OiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnMzlweCcgOiAnMjlweCcgfTtcblx0XHRib3R0b206ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICcyMHB4JyA6ICcxNXB4JyB9O1xuXHRcdGxlZnQ6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICczOXB4JyA6ICcyOXB4JyB9O1xuXHRcdGJvcmRlci10b3A6ICR7IGJvcmRlckJveFN0eWxlV2l0aEZhbGxiYWNrKCBib3JkZXJzPy50b3AgKSB9O1xuXHRcdGJvcmRlci1ib3R0b206ICR7IGJvcmRlckJveFN0eWxlV2l0aEZhbGxiYWNrKCBib3JkZXJzPy5ib3R0b20gKSB9O1xuXHRcdCR7IHJ0bCgge1xuXHRcdFx0Ym9yZGVyTGVmdDogYm9yZGVyQm94U3R5bGVXaXRoRmFsbGJhY2soIGJvcmRlcnM/LmxlZnQgKSxcblx0XHR9ICkoKSB9XG5cdFx0JHsgcnRsKCB7XG5cdFx0XHRib3JkZXJSaWdodDogYm9yZGVyQm94U3R5bGVXaXRoRmFsbGJhY2soIGJvcmRlcnM/LnJpZ2h0ICksXG5cdFx0fSApKCkgfVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckJveENvbnRyb2xTcGxpdENvbnRyb2xzID0gKFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IGNzc2Bcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRmbGV4OiAxO1xuXHR3aWR0aDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gdW5kZWZpbmVkIDogJzgwJScgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBjZW50ZXJlZEJvcmRlckNvbnRyb2wgPSBjc3NgXG5cdGdyaWQtY29sdW1uOiBzcGFuIDI7XG5cdG1hcmdpbjogMCBhdXRvO1xuYDtcblxuZXhwb3J0IGNvbnN0IHJpZ2h0Qm9yZGVyQ29udHJvbCA9ICgpID0+IGNzc2Bcblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6ICdhdXRvJyB9ICkoKSB9XG5gO1xuIl19 */");
  var linkedBorderControl = () => /* @__PURE__ */ css("flex:1;", rtl({
    marginRight: "24px"
  })(), ";" + (false ? "" : ";label:linkedBorderControl;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFlNEMiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG5pbXBvcnQgdHlwZSB7IEJvcmRlciB9IGZyb20gJy4uL2JvcmRlci1jb250cm9sL3R5cGVzJztcbmltcG9ydCB0eXBlIHsgQm9yZGVycyB9IGZyb20gJy4vdHlwZXMnO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyQm94Q29udHJvbCA9IGNzc2BgO1xuXG5leHBvcnQgY29uc3QgbGlua2VkQm9yZGVyQ29udHJvbCA9ICgpID0+IGNzc2Bcblx0ZmxleDogMTtcblx0JHsgcnRsKCB7IG1hcmdpblJpZ2h0OiAnMjRweCcgfSApKCkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IHdyYXBwZXIgPSBjc3NgXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJCb3hDb250cm9sTGlua2VkQnV0dG9uID0gKFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdFx0dG9wOiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnOHB4JyA6ICczcHgnIH07XG5cdFx0JHsgcnRsKCB7IHJpZ2h0OiAwIH0gKSgpIH1cblx0XHRsaW5lLWhlaWdodDogMDtcblx0YDtcbn07XG5cbmNvbnN0IGJvcmRlckJveFN0eWxlV2l0aEZhbGxiYWNrID0gKCBib3JkZXI/OiBCb3JkZXIgKSA9PiB7XG5cdGNvbnN0IHtcblx0XHRjb2xvciA9IENPTE9SUy5ncmF5WyAyMDAgXSxcblx0XHRzdHlsZSA9ICdzb2xpZCcsXG5cdFx0d2lkdGggPSBDT05GSUcuYm9yZGVyV2lkdGgsXG5cdH0gPSBib3JkZXIgfHwge307XG5cblx0Y29uc3QgY2xhbXBlZFdpZHRoID1cblx0XHR3aWR0aCAhPT0gQ09ORklHLmJvcmRlcldpZHRoID8gYGNsYW1wKDFweCwgJHsgd2lkdGggfSwgMTBweClgIDogd2lkdGg7XG5cdGNvbnN0IGhhc1Zpc2libGVCb3JkZXIgPSAoICEhIHdpZHRoICYmIHdpZHRoICE9PSAnMCcgKSB8fCAhISBjb2xvcjtcblx0Y29uc3QgYm9yZGVyU3R5bGUgPSBoYXNWaXNpYmxlQm9yZGVyID8gc3R5bGUgfHwgJ3NvbGlkJyA6IHN0eWxlO1xuXG5cdHJldHVybiBgJHsgY29sb3IgfSAkeyBib3JkZXJTdHlsZSB9ICR7IGNsYW1wZWRXaWR0aCB9YDtcbn07XG5cbmV4cG9ydCBjb25zdCBib3JkZXJCb3hDb250cm9sVmlzdWFsaXplciA9IChcblx0Ym9yZGVycz86IEJvcmRlcnMsXG5cdHNpemU/OiAnZGVmYXVsdCcgfCAnX191bnN0YWJsZS1sYXJnZSdcbikgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHR0b3A6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICcyMHB4JyA6ICcxNXB4JyB9O1xuXHRcdHJpZ2h0OiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnMzlweCcgOiAnMjlweCcgfTtcblx0XHRib3R0b206ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICcyMHB4JyA6ICcxNXB4JyB9O1xuXHRcdGxlZnQ6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICczOXB4JyA6ICcyOXB4JyB9O1xuXHRcdGJvcmRlci10b3A6ICR7IGJvcmRlckJveFN0eWxlV2l0aEZhbGxiYWNrKCBib3JkZXJzPy50b3AgKSB9O1xuXHRcdGJvcmRlci1ib3R0b206ICR7IGJvcmRlckJveFN0eWxlV2l0aEZhbGxiYWNrKCBib3JkZXJzPy5ib3R0b20gKSB9O1xuXHRcdCR7IHJ0bCgge1xuXHRcdFx0Ym9yZGVyTGVmdDogYm9yZGVyQm94U3R5bGVXaXRoRmFsbGJhY2soIGJvcmRlcnM/LmxlZnQgKSxcblx0XHR9ICkoKSB9XG5cdFx0JHsgcnRsKCB7XG5cdFx0XHRib3JkZXJSaWdodDogYm9yZGVyQm94U3R5bGVXaXRoRmFsbGJhY2soIGJvcmRlcnM/LnJpZ2h0ICksXG5cdFx0fSApKCkgfVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckJveENvbnRyb2xTcGxpdENvbnRyb2xzID0gKFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IGNzc2Bcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRmbGV4OiAxO1xuXHR3aWR0aDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gdW5kZWZpbmVkIDogJzgwJScgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBjZW50ZXJlZEJvcmRlckNvbnRyb2wgPSBjc3NgXG5cdGdyaWQtY29sdW1uOiBzcGFuIDI7XG5cdG1hcmdpbjogMCBhdXRvO1xuYDtcblxuZXhwb3J0IGNvbnN0IHJpZ2h0Qm9yZGVyQ29udHJvbCA9ICgpID0+IGNzc2Bcblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6ICdhdXRvJyB9ICkoKSB9XG5gO1xuIl19 */");
  var wrapper = false ? {
    name: "bjn8wh",
    styles: "position:relative"
  } : {
    name: "memc06-wrapper",
    styles: "position:relative;label:wrapper;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvQjBCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcblxuaW1wb3J0IHR5cGUgeyBCb3JkZXIgfSBmcm9tICcuLi9ib3JkZXItY29udHJvbC90eXBlcyc7XG5pbXBvcnQgdHlwZSB7IEJvcmRlcnMgfSBmcm9tICcuL3R5cGVzJztcblxuZXhwb3J0IGNvbnN0IGJvcmRlckJveENvbnRyb2wgPSBjc3NgYDtcblxuZXhwb3J0IGNvbnN0IGxpbmtlZEJvcmRlckNvbnRyb2wgPSAoKSA9PiBjc3NgXG5cdGZsZXg6IDE7XG5cdCR7IHJ0bCggeyBtYXJnaW5SaWdodDogJzI0cHgnIH0gKSgpIH1cbmA7XG5cbmV4cG9ydCBjb25zdCB3cmFwcGVyID0gY3NzYFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyQm94Q29udHJvbExpbmtlZEJ1dHRvbiA9IChcblx0c2l6ZT86ICdkZWZhdWx0JyB8ICdfX3Vuc3RhYmxlLWxhcmdlJ1xuKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdHRvcDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzhweCcgOiAnM3B4JyB9O1xuXHRcdCR7IHJ0bCggeyByaWdodDogMCB9ICkoKSB9XG5cdFx0bGluZS1oZWlnaHQ6IDA7XG5cdGA7XG59O1xuXG5jb25zdCBib3JkZXJCb3hTdHlsZVdpdGhGYWxsYmFjayA9ICggYm9yZGVyPzogQm9yZGVyICkgPT4ge1xuXHRjb25zdCB7XG5cdFx0Y29sb3IgPSBDT0xPUlMuZ3JheVsgMjAwIF0sXG5cdFx0c3R5bGUgPSAnc29saWQnLFxuXHRcdHdpZHRoID0gQ09ORklHLmJvcmRlcldpZHRoLFxuXHR9ID0gYm9yZGVyIHx8IHt9O1xuXG5cdGNvbnN0IGNsYW1wZWRXaWR0aCA9XG5cdFx0d2lkdGggIT09IENPTkZJRy5ib3JkZXJXaWR0aCA/IGBjbGFtcCgxcHgsICR7IHdpZHRoIH0sIDEwcHgpYCA6IHdpZHRoO1xuXHRjb25zdCBoYXNWaXNpYmxlQm9yZGVyID0gKCAhISB3aWR0aCAmJiB3aWR0aCAhPT0gJzAnICkgfHwgISEgY29sb3I7XG5cdGNvbnN0IGJvcmRlclN0eWxlID0gaGFzVmlzaWJsZUJvcmRlciA/IHN0eWxlIHx8ICdzb2xpZCcgOiBzdHlsZTtcblxuXHRyZXR1cm4gYCR7IGNvbG9yIH0gJHsgYm9yZGVyU3R5bGUgfSAkeyBjbGFtcGVkV2lkdGggfWA7XG59O1xuXG5leHBvcnQgY29uc3QgYm9yZGVyQm94Q29udHJvbFZpc3VhbGl6ZXIgPSAoXG5cdGJvcmRlcnM/OiBCb3JkZXJzLFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdFx0dG9wOiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnMjBweCcgOiAnMTVweCcgfTtcblx0XHRyaWdodDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzM5cHgnIDogJzI5cHgnIH07XG5cdFx0Ym90dG9tOiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnMjBweCcgOiAnMTVweCcgfTtcblx0XHRsZWZ0OiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnMzlweCcgOiAnMjlweCcgfTtcblx0XHRib3JkZXItdG9wOiAkeyBib3JkZXJCb3hTdHlsZVdpdGhGYWxsYmFjayggYm9yZGVycz8udG9wICkgfTtcblx0XHRib3JkZXItYm90dG9tOiAkeyBib3JkZXJCb3hTdHlsZVdpdGhGYWxsYmFjayggYm9yZGVycz8uYm90dG9tICkgfTtcblx0XHQkeyBydGwoIHtcblx0XHRcdGJvcmRlckxlZnQ6IGJvcmRlckJveFN0eWxlV2l0aEZhbGxiYWNrKCBib3JkZXJzPy5sZWZ0ICksXG5cdFx0fSApKCkgfVxuXHRcdCR7IHJ0bCgge1xuXHRcdFx0Ym9yZGVyUmlnaHQ6IGJvcmRlckJveFN0eWxlV2l0aEZhbGxiYWNrKCBib3JkZXJzPy5yaWdodCApLFxuXHRcdH0gKSgpIH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBib3JkZXJCb3hDb250cm9sU3BsaXRDb250cm9scyA9IChcblx0c2l6ZT86ICdkZWZhdWx0JyB8ICdfX3Vuc3RhYmxlLWxhcmdlJ1xuKSA9PiBjc3NgXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0ZmxleDogMTtcblx0d2lkdGg6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/IHVuZGVmaW5lZCA6ICc4MCUnIH07XG5gO1xuXG5leHBvcnQgY29uc3QgY2VudGVyZWRCb3JkZXJDb250cm9sID0gY3NzYFxuXHRncmlkLWNvbHVtbjogc3BhbiAyO1xuXHRtYXJnaW46IDAgYXV0bztcbmA7XG5cbmV4cG9ydCBjb25zdCByaWdodEJvcmRlckNvbnRyb2wgPSAoKSA9PiBjc3NgXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiAnYXV0bycgfSApKCkgfVxuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__9
  };
  var borderBoxControlLinkedButton = (size3) => {
    return /* @__PURE__ */ css("position:absolute;top:", size3 === "__unstable-large" ? "8px" : "3px", ";", rtl({
      right: 0
    })(), " line-height:0;" + (false ? "" : ";label:borderBoxControlLinkedButton;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyQlciLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG5pbXBvcnQgdHlwZSB7IEJvcmRlciB9IGZyb20gJy4uL2JvcmRlci1jb250cm9sL3R5cGVzJztcbmltcG9ydCB0eXBlIHsgQm9yZGVycyB9IGZyb20gJy4vdHlwZXMnO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyQm94Q29udHJvbCA9IGNzc2BgO1xuXG5leHBvcnQgY29uc3QgbGlua2VkQm9yZGVyQ29udHJvbCA9ICgpID0+IGNzc2Bcblx0ZmxleDogMTtcblx0JHsgcnRsKCB7IG1hcmdpblJpZ2h0OiAnMjRweCcgfSApKCkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IHdyYXBwZXIgPSBjc3NgXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJCb3hDb250cm9sTGlua2VkQnV0dG9uID0gKFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdFx0dG9wOiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnOHB4JyA6ICczcHgnIH07XG5cdFx0JHsgcnRsKCB7IHJpZ2h0OiAwIH0gKSgpIH1cblx0XHRsaW5lLWhlaWdodDogMDtcblx0YDtcbn07XG5cbmNvbnN0IGJvcmRlckJveFN0eWxlV2l0aEZhbGxiYWNrID0gKCBib3JkZXI/OiBCb3JkZXIgKSA9PiB7XG5cdGNvbnN0IHtcblx0XHRjb2xvciA9IENPTE9SUy5ncmF5WyAyMDAgXSxcblx0XHRzdHlsZSA9ICdzb2xpZCcsXG5cdFx0d2lkdGggPSBDT05GSUcuYm9yZGVyV2lkdGgsXG5cdH0gPSBib3JkZXIgfHwge307XG5cblx0Y29uc3QgY2xhbXBlZFdpZHRoID1cblx0XHR3aWR0aCAhPT0gQ09ORklHLmJvcmRlcldpZHRoID8gYGNsYW1wKDFweCwgJHsgd2lkdGggfSwgMTBweClgIDogd2lkdGg7XG5cdGNvbnN0IGhhc1Zpc2libGVCb3JkZXIgPSAoICEhIHdpZHRoICYmIHdpZHRoICE9PSAnMCcgKSB8fCAhISBjb2xvcjtcblx0Y29uc3QgYm9yZGVyU3R5bGUgPSBoYXNWaXNpYmxlQm9yZGVyID8gc3R5bGUgfHwgJ3NvbGlkJyA6IHN0eWxlO1xuXG5cdHJldHVybiBgJHsgY29sb3IgfSAkeyBib3JkZXJTdHlsZSB9ICR7IGNsYW1wZWRXaWR0aCB9YDtcbn07XG5cbmV4cG9ydCBjb25zdCBib3JkZXJCb3hDb250cm9sVmlzdWFsaXplciA9IChcblx0Ym9yZGVycz86IEJvcmRlcnMsXG5cdHNpemU/OiAnZGVmYXVsdCcgfCAnX191bnN0YWJsZS1sYXJnZSdcbikgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHR0b3A6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICcyMHB4JyA6ICcxNXB4JyB9O1xuXHRcdHJpZ2h0OiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnMzlweCcgOiAnMjlweCcgfTtcblx0XHRib3R0b206ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICcyMHB4JyA6ICcxNXB4JyB9O1xuXHRcdGxlZnQ6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICczOXB4JyA6ICcyOXB4JyB9O1xuXHRcdGJvcmRlci10b3A6ICR7IGJvcmRlckJveFN0eWxlV2l0aEZhbGxiYWNrKCBib3JkZXJzPy50b3AgKSB9O1xuXHRcdGJvcmRlci1ib3R0b206ICR7IGJvcmRlckJveFN0eWxlV2l0aEZhbGxiYWNrKCBib3JkZXJzPy5ib3R0b20gKSB9O1xuXHRcdCR7IHJ0bCgge1xuXHRcdFx0Ym9yZGVyTGVmdDogYm9yZGVyQm94U3R5bGVXaXRoRmFsbGJhY2soIGJvcmRlcnM/LmxlZnQgKSxcblx0XHR9ICkoKSB9XG5cdFx0JHsgcnRsKCB7XG5cdFx0XHRib3JkZXJSaWdodDogYm9yZGVyQm94U3R5bGVXaXRoRmFsbGJhY2soIGJvcmRlcnM/LnJpZ2h0ICksXG5cdFx0fSApKCkgfVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckJveENvbnRyb2xTcGxpdENvbnRyb2xzID0gKFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IGNzc2Bcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRmbGV4OiAxO1xuXHR3aWR0aDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gdW5kZWZpbmVkIDogJzgwJScgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBjZW50ZXJlZEJvcmRlckNvbnRyb2wgPSBjc3NgXG5cdGdyaWQtY29sdW1uOiBzcGFuIDI7XG5cdG1hcmdpbjogMCBhdXRvO1xuYDtcblxuZXhwb3J0IGNvbnN0IHJpZ2h0Qm9yZGVyQ29udHJvbCA9ICgpID0+IGNzc2Bcblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6ICdhdXRvJyB9ICkoKSB9XG5gO1xuIl19 */");
  };
  var borderBoxStyleWithFallback = (border) => {
    const {
      color: color2 = COLORS.gray[200],
      style: style2 = "solid",
      width = config_values_default.borderWidth
    } = border || {};
    const clampedWidth = width !== config_values_default.borderWidth ? `clamp(1px, ${width}, 10px)` : width;
    const hasVisibleBorder = !!width && width !== "0" || !!color2;
    const borderStyle = hasVisibleBorder ? style2 || "solid" : style2;
    return `${color2} ${borderStyle} ${clampedWidth}`;
  };
  var borderBoxControlVisualizer = (borders2, size3) => {
    return /* @__PURE__ */ css("position:absolute;top:", size3 === "__unstable-large" ? "20px" : "15px", ";right:", size3 === "__unstable-large" ? "39px" : "29px", ";bottom:", size3 === "__unstable-large" ? "20px" : "15px", ";left:", size3 === "__unstable-large" ? "39px" : "29px", ";border-top:", borderBoxStyleWithFallback(borders2?.top), ";border-bottom:", borderBoxStyleWithFallback(borders2?.bottom), ";", rtl({
      borderLeft: borderBoxStyleWithFallback(borders2?.left)
    })(), " ", rtl({
      borderRight: borderBoxStyleWithFallback(borders2?.right)
    })(), ";" + (false ? "" : ";label:borderBoxControlVisualizer;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzRFciLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG5pbXBvcnQgdHlwZSB7IEJvcmRlciB9IGZyb20gJy4uL2JvcmRlci1jb250cm9sL3R5cGVzJztcbmltcG9ydCB0eXBlIHsgQm9yZGVycyB9IGZyb20gJy4vdHlwZXMnO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyQm94Q29udHJvbCA9IGNzc2BgO1xuXG5leHBvcnQgY29uc3QgbGlua2VkQm9yZGVyQ29udHJvbCA9ICgpID0+IGNzc2Bcblx0ZmxleDogMTtcblx0JHsgcnRsKCB7IG1hcmdpblJpZ2h0OiAnMjRweCcgfSApKCkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IHdyYXBwZXIgPSBjc3NgXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJCb3hDb250cm9sTGlua2VkQnV0dG9uID0gKFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdFx0dG9wOiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnOHB4JyA6ICczcHgnIH07XG5cdFx0JHsgcnRsKCB7IHJpZ2h0OiAwIH0gKSgpIH1cblx0XHRsaW5lLWhlaWdodDogMDtcblx0YDtcbn07XG5cbmNvbnN0IGJvcmRlckJveFN0eWxlV2l0aEZhbGxiYWNrID0gKCBib3JkZXI/OiBCb3JkZXIgKSA9PiB7XG5cdGNvbnN0IHtcblx0XHRjb2xvciA9IENPTE9SUy5ncmF5WyAyMDAgXSxcblx0XHRzdHlsZSA9ICdzb2xpZCcsXG5cdFx0d2lkdGggPSBDT05GSUcuYm9yZGVyV2lkdGgsXG5cdH0gPSBib3JkZXIgfHwge307XG5cblx0Y29uc3QgY2xhbXBlZFdpZHRoID1cblx0XHR3aWR0aCAhPT0gQ09ORklHLmJvcmRlcldpZHRoID8gYGNsYW1wKDFweCwgJHsgd2lkdGggfSwgMTBweClgIDogd2lkdGg7XG5cdGNvbnN0IGhhc1Zpc2libGVCb3JkZXIgPSAoICEhIHdpZHRoICYmIHdpZHRoICE9PSAnMCcgKSB8fCAhISBjb2xvcjtcblx0Y29uc3QgYm9yZGVyU3R5bGUgPSBoYXNWaXNpYmxlQm9yZGVyID8gc3R5bGUgfHwgJ3NvbGlkJyA6IHN0eWxlO1xuXG5cdHJldHVybiBgJHsgY29sb3IgfSAkeyBib3JkZXJTdHlsZSB9ICR7IGNsYW1wZWRXaWR0aCB9YDtcbn07XG5cbmV4cG9ydCBjb25zdCBib3JkZXJCb3hDb250cm9sVmlzdWFsaXplciA9IChcblx0Ym9yZGVycz86IEJvcmRlcnMsXG5cdHNpemU/OiAnZGVmYXVsdCcgfCAnX191bnN0YWJsZS1sYXJnZSdcbikgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHR0b3A6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICcyMHB4JyA6ICcxNXB4JyB9O1xuXHRcdHJpZ2h0OiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnMzlweCcgOiAnMjlweCcgfTtcblx0XHRib3R0b206ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICcyMHB4JyA6ICcxNXB4JyB9O1xuXHRcdGxlZnQ6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICczOXB4JyA6ICcyOXB4JyB9O1xuXHRcdGJvcmRlci10b3A6ICR7IGJvcmRlckJveFN0eWxlV2l0aEZhbGxiYWNrKCBib3JkZXJzPy50b3AgKSB9O1xuXHRcdGJvcmRlci1ib3R0b206ICR7IGJvcmRlckJveFN0eWxlV2l0aEZhbGxiYWNrKCBib3JkZXJzPy5ib3R0b20gKSB9O1xuXHRcdCR7IHJ0bCgge1xuXHRcdFx0Ym9yZGVyTGVmdDogYm9yZGVyQm94U3R5bGVXaXRoRmFsbGJhY2soIGJvcmRlcnM/LmxlZnQgKSxcblx0XHR9ICkoKSB9XG5cdFx0JHsgcnRsKCB7XG5cdFx0XHRib3JkZXJSaWdodDogYm9yZGVyQm94U3R5bGVXaXRoRmFsbGJhY2soIGJvcmRlcnM/LnJpZ2h0ICksXG5cdFx0fSApKCkgfVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckJveENvbnRyb2xTcGxpdENvbnRyb2xzID0gKFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IGNzc2Bcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRmbGV4OiAxO1xuXHR3aWR0aDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gdW5kZWZpbmVkIDogJzgwJScgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBjZW50ZXJlZEJvcmRlckNvbnRyb2wgPSBjc3NgXG5cdGdyaWQtY29sdW1uOiBzcGFuIDI7XG5cdG1hcmdpbjogMCBhdXRvO1xuYDtcblxuZXhwb3J0IGNvbnN0IHJpZ2h0Qm9yZGVyQ29udHJvbCA9ICgpID0+IGNzc2Bcblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6ICdhdXRvJyB9ICkoKSB9XG5gO1xuIl19 */");
  };
  var borderBoxControlSplitControls = (size3) => /* @__PURE__ */ css("position:relative;flex:1;width:", size3 === "__unstable-large" ? void 0 : "80%", ";" + (false ? "" : ";label:borderBoxControlSplitControls;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF5RVEiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG5pbXBvcnQgdHlwZSB7IEJvcmRlciB9IGZyb20gJy4uL2JvcmRlci1jb250cm9sL3R5cGVzJztcbmltcG9ydCB0eXBlIHsgQm9yZGVycyB9IGZyb20gJy4vdHlwZXMnO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyQm94Q29udHJvbCA9IGNzc2BgO1xuXG5leHBvcnQgY29uc3QgbGlua2VkQm9yZGVyQ29udHJvbCA9ICgpID0+IGNzc2Bcblx0ZmxleDogMTtcblx0JHsgcnRsKCB7IG1hcmdpblJpZ2h0OiAnMjRweCcgfSApKCkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IHdyYXBwZXIgPSBjc3NgXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJCb3hDb250cm9sTGlua2VkQnV0dG9uID0gKFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdFx0dG9wOiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnOHB4JyA6ICczcHgnIH07XG5cdFx0JHsgcnRsKCB7IHJpZ2h0OiAwIH0gKSgpIH1cblx0XHRsaW5lLWhlaWdodDogMDtcblx0YDtcbn07XG5cbmNvbnN0IGJvcmRlckJveFN0eWxlV2l0aEZhbGxiYWNrID0gKCBib3JkZXI/OiBCb3JkZXIgKSA9PiB7XG5cdGNvbnN0IHtcblx0XHRjb2xvciA9IENPTE9SUy5ncmF5WyAyMDAgXSxcblx0XHRzdHlsZSA9ICdzb2xpZCcsXG5cdFx0d2lkdGggPSBDT05GSUcuYm9yZGVyV2lkdGgsXG5cdH0gPSBib3JkZXIgfHwge307XG5cblx0Y29uc3QgY2xhbXBlZFdpZHRoID1cblx0XHR3aWR0aCAhPT0gQ09ORklHLmJvcmRlcldpZHRoID8gYGNsYW1wKDFweCwgJHsgd2lkdGggfSwgMTBweClgIDogd2lkdGg7XG5cdGNvbnN0IGhhc1Zpc2libGVCb3JkZXIgPSAoICEhIHdpZHRoICYmIHdpZHRoICE9PSAnMCcgKSB8fCAhISBjb2xvcjtcblx0Y29uc3QgYm9yZGVyU3R5bGUgPSBoYXNWaXNpYmxlQm9yZGVyID8gc3R5bGUgfHwgJ3NvbGlkJyA6IHN0eWxlO1xuXG5cdHJldHVybiBgJHsgY29sb3IgfSAkeyBib3JkZXJTdHlsZSB9ICR7IGNsYW1wZWRXaWR0aCB9YDtcbn07XG5cbmV4cG9ydCBjb25zdCBib3JkZXJCb3hDb250cm9sVmlzdWFsaXplciA9IChcblx0Ym9yZGVycz86IEJvcmRlcnMsXG5cdHNpemU/OiAnZGVmYXVsdCcgfCAnX191bnN0YWJsZS1sYXJnZSdcbikgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHR0b3A6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICcyMHB4JyA6ICcxNXB4JyB9O1xuXHRcdHJpZ2h0OiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnMzlweCcgOiAnMjlweCcgfTtcblx0XHRib3R0b206ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICcyMHB4JyA6ICcxNXB4JyB9O1xuXHRcdGxlZnQ6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICczOXB4JyA6ICcyOXB4JyB9O1xuXHRcdGJvcmRlci10b3A6ICR7IGJvcmRlckJveFN0eWxlV2l0aEZhbGxiYWNrKCBib3JkZXJzPy50b3AgKSB9O1xuXHRcdGJvcmRlci1ib3R0b206ICR7IGJvcmRlckJveFN0eWxlV2l0aEZhbGxiYWNrKCBib3JkZXJzPy5ib3R0b20gKSB9O1xuXHRcdCR7IHJ0bCgge1xuXHRcdFx0Ym9yZGVyTGVmdDogYm9yZGVyQm94U3R5bGVXaXRoRmFsbGJhY2soIGJvcmRlcnM/LmxlZnQgKSxcblx0XHR9ICkoKSB9XG5cdFx0JHsgcnRsKCB7XG5cdFx0XHRib3JkZXJSaWdodDogYm9yZGVyQm94U3R5bGVXaXRoRmFsbGJhY2soIGJvcmRlcnM/LnJpZ2h0ICksXG5cdFx0fSApKCkgfVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckJveENvbnRyb2xTcGxpdENvbnRyb2xzID0gKFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IGNzc2Bcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRmbGV4OiAxO1xuXHR3aWR0aDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gdW5kZWZpbmVkIDogJzgwJScgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBjZW50ZXJlZEJvcmRlckNvbnRyb2wgPSBjc3NgXG5cdGdyaWQtY29sdW1uOiBzcGFuIDI7XG5cdG1hcmdpbjogMCBhdXRvO1xuYDtcblxuZXhwb3J0IGNvbnN0IHJpZ2h0Qm9yZGVyQ29udHJvbCA9ICgpID0+IGNzc2Bcblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6ICdhdXRvJyB9ICkoKSB9XG5gO1xuIl19 */");
  var centeredBorderControl = false ? {
    name: "1nwbfnf",
    styles: "grid-column:span 2;margin:0 auto"
  } : {
    name: "gedmrr-centeredBorderControl",
    styles: "grid-column:span 2;margin:0 auto;label:centeredBorderControl;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUErRXdDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcblxuaW1wb3J0IHR5cGUgeyBCb3JkZXIgfSBmcm9tICcuLi9ib3JkZXItY29udHJvbC90eXBlcyc7XG5pbXBvcnQgdHlwZSB7IEJvcmRlcnMgfSBmcm9tICcuL3R5cGVzJztcblxuZXhwb3J0IGNvbnN0IGJvcmRlckJveENvbnRyb2wgPSBjc3NgYDtcblxuZXhwb3J0IGNvbnN0IGxpbmtlZEJvcmRlckNvbnRyb2wgPSAoKSA9PiBjc3NgXG5cdGZsZXg6IDE7XG5cdCR7IHJ0bCggeyBtYXJnaW5SaWdodDogJzI0cHgnIH0gKSgpIH1cbmA7XG5cbmV4cG9ydCBjb25zdCB3cmFwcGVyID0gY3NzYFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyQm94Q29udHJvbExpbmtlZEJ1dHRvbiA9IChcblx0c2l6ZT86ICdkZWZhdWx0JyB8ICdfX3Vuc3RhYmxlLWxhcmdlJ1xuKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdHRvcDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzhweCcgOiAnM3B4JyB9O1xuXHRcdCR7IHJ0bCggeyByaWdodDogMCB9ICkoKSB9XG5cdFx0bGluZS1oZWlnaHQ6IDA7XG5cdGA7XG59O1xuXG5jb25zdCBib3JkZXJCb3hTdHlsZVdpdGhGYWxsYmFjayA9ICggYm9yZGVyPzogQm9yZGVyICkgPT4ge1xuXHRjb25zdCB7XG5cdFx0Y29sb3IgPSBDT0xPUlMuZ3JheVsgMjAwIF0sXG5cdFx0c3R5bGUgPSAnc29saWQnLFxuXHRcdHdpZHRoID0gQ09ORklHLmJvcmRlcldpZHRoLFxuXHR9ID0gYm9yZGVyIHx8IHt9O1xuXG5cdGNvbnN0IGNsYW1wZWRXaWR0aCA9XG5cdFx0d2lkdGggIT09IENPTkZJRy5ib3JkZXJXaWR0aCA/IGBjbGFtcCgxcHgsICR7IHdpZHRoIH0sIDEwcHgpYCA6IHdpZHRoO1xuXHRjb25zdCBoYXNWaXNpYmxlQm9yZGVyID0gKCAhISB3aWR0aCAmJiB3aWR0aCAhPT0gJzAnICkgfHwgISEgY29sb3I7XG5cdGNvbnN0IGJvcmRlclN0eWxlID0gaGFzVmlzaWJsZUJvcmRlciA/IHN0eWxlIHx8ICdzb2xpZCcgOiBzdHlsZTtcblxuXHRyZXR1cm4gYCR7IGNvbG9yIH0gJHsgYm9yZGVyU3R5bGUgfSAkeyBjbGFtcGVkV2lkdGggfWA7XG59O1xuXG5leHBvcnQgY29uc3QgYm9yZGVyQm94Q29udHJvbFZpc3VhbGl6ZXIgPSAoXG5cdGJvcmRlcnM/OiBCb3JkZXJzLFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdFx0dG9wOiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnMjBweCcgOiAnMTVweCcgfTtcblx0XHRyaWdodDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzM5cHgnIDogJzI5cHgnIH07XG5cdFx0Ym90dG9tOiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnMjBweCcgOiAnMTVweCcgfTtcblx0XHRsZWZ0OiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnMzlweCcgOiAnMjlweCcgfTtcblx0XHRib3JkZXItdG9wOiAkeyBib3JkZXJCb3hTdHlsZVdpdGhGYWxsYmFjayggYm9yZGVycz8udG9wICkgfTtcblx0XHRib3JkZXItYm90dG9tOiAkeyBib3JkZXJCb3hTdHlsZVdpdGhGYWxsYmFjayggYm9yZGVycz8uYm90dG9tICkgfTtcblx0XHQkeyBydGwoIHtcblx0XHRcdGJvcmRlckxlZnQ6IGJvcmRlckJveFN0eWxlV2l0aEZhbGxiYWNrKCBib3JkZXJzPy5sZWZ0ICksXG5cdFx0fSApKCkgfVxuXHRcdCR7IHJ0bCgge1xuXHRcdFx0Ym9yZGVyUmlnaHQ6IGJvcmRlckJveFN0eWxlV2l0aEZhbGxiYWNrKCBib3JkZXJzPy5yaWdodCApLFxuXHRcdH0gKSgpIH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBib3JkZXJCb3hDb250cm9sU3BsaXRDb250cm9scyA9IChcblx0c2l6ZT86ICdkZWZhdWx0JyB8ICdfX3Vuc3RhYmxlLWxhcmdlJ1xuKSA9PiBjc3NgXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0ZmxleDogMTtcblx0d2lkdGg6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/IHVuZGVmaW5lZCA6ICc4MCUnIH07XG5gO1xuXG5leHBvcnQgY29uc3QgY2VudGVyZWRCb3JkZXJDb250cm9sID0gY3NzYFxuXHRncmlkLWNvbHVtbjogc3BhbiAyO1xuXHRtYXJnaW46IDAgYXV0bztcbmA7XG5cbmV4cG9ydCBjb25zdCByaWdodEJvcmRlckNvbnRyb2wgPSAoKSA9PiBjc3NgXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiAnYXV0bycgfSApKCkgfVxuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__9
  };
  var rightBorderControl = () => /* @__PURE__ */ css(rtl({
    marginLeft: "auto"
  })(), ";" + (false ? "" : ";label:rightBorderControl;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvRjJDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcblxuaW1wb3J0IHR5cGUgeyBCb3JkZXIgfSBmcm9tICcuLi9ib3JkZXItY29udHJvbC90eXBlcyc7XG5pbXBvcnQgdHlwZSB7IEJvcmRlcnMgfSBmcm9tICcuL3R5cGVzJztcblxuZXhwb3J0IGNvbnN0IGJvcmRlckJveENvbnRyb2wgPSBjc3NgYDtcblxuZXhwb3J0IGNvbnN0IGxpbmtlZEJvcmRlckNvbnRyb2wgPSAoKSA9PiBjc3NgXG5cdGZsZXg6IDE7XG5cdCR7IHJ0bCggeyBtYXJnaW5SaWdodDogJzI0cHgnIH0gKSgpIH1cbmA7XG5cbmV4cG9ydCBjb25zdCB3cmFwcGVyID0gY3NzYFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyQm94Q29udHJvbExpbmtlZEJ1dHRvbiA9IChcblx0c2l6ZT86ICdkZWZhdWx0JyB8ICdfX3Vuc3RhYmxlLWxhcmdlJ1xuKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdHRvcDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzhweCcgOiAnM3B4JyB9O1xuXHRcdCR7IHJ0bCggeyByaWdodDogMCB9ICkoKSB9XG5cdFx0bGluZS1oZWlnaHQ6IDA7XG5cdGA7XG59O1xuXG5jb25zdCBib3JkZXJCb3hTdHlsZVdpdGhGYWxsYmFjayA9ICggYm9yZGVyPzogQm9yZGVyICkgPT4ge1xuXHRjb25zdCB7XG5cdFx0Y29sb3IgPSBDT0xPUlMuZ3JheVsgMjAwIF0sXG5cdFx0c3R5bGUgPSAnc29saWQnLFxuXHRcdHdpZHRoID0gQ09ORklHLmJvcmRlcldpZHRoLFxuXHR9ID0gYm9yZGVyIHx8IHt9O1xuXG5cdGNvbnN0IGNsYW1wZWRXaWR0aCA9XG5cdFx0d2lkdGggIT09IENPTkZJRy5ib3JkZXJXaWR0aCA/IGBjbGFtcCgxcHgsICR7IHdpZHRoIH0sIDEwcHgpYCA6IHdpZHRoO1xuXHRjb25zdCBoYXNWaXNpYmxlQm9yZGVyID0gKCAhISB3aWR0aCAmJiB3aWR0aCAhPT0gJzAnICkgfHwgISEgY29sb3I7XG5cdGNvbnN0IGJvcmRlclN0eWxlID0gaGFzVmlzaWJsZUJvcmRlciA/IHN0eWxlIHx8ICdzb2xpZCcgOiBzdHlsZTtcblxuXHRyZXR1cm4gYCR7IGNvbG9yIH0gJHsgYm9yZGVyU3R5bGUgfSAkeyBjbGFtcGVkV2lkdGggfWA7XG59O1xuXG5leHBvcnQgY29uc3QgYm9yZGVyQm94Q29udHJvbFZpc3VhbGl6ZXIgPSAoXG5cdGJvcmRlcnM/OiBCb3JkZXJzLFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdFx0dG9wOiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnMjBweCcgOiAnMTVweCcgfTtcblx0XHRyaWdodDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzM5cHgnIDogJzI5cHgnIH07XG5cdFx0Ym90dG9tOiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnMjBweCcgOiAnMTVweCcgfTtcblx0XHRsZWZ0OiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnMzlweCcgOiAnMjlweCcgfTtcblx0XHRib3JkZXItdG9wOiAkeyBib3JkZXJCb3hTdHlsZVdpdGhGYWxsYmFjayggYm9yZGVycz8udG9wICkgfTtcblx0XHRib3JkZXItYm90dG9tOiAkeyBib3JkZXJCb3hTdHlsZVdpdGhGYWxsYmFjayggYm9yZGVycz8uYm90dG9tICkgfTtcblx0XHQkeyBydGwoIHtcblx0XHRcdGJvcmRlckxlZnQ6IGJvcmRlckJveFN0eWxlV2l0aEZhbGxiYWNrKCBib3JkZXJzPy5sZWZ0ICksXG5cdFx0fSApKCkgfVxuXHRcdCR7IHJ0bCgge1xuXHRcdFx0Ym9yZGVyUmlnaHQ6IGJvcmRlckJveFN0eWxlV2l0aEZhbGxiYWNrKCBib3JkZXJzPy5yaWdodCApLFxuXHRcdH0gKSgpIH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBib3JkZXJCb3hDb250cm9sU3BsaXRDb250cm9scyA9IChcblx0c2l6ZT86ICdkZWZhdWx0JyB8ICdfX3Vuc3RhYmxlLWxhcmdlJ1xuKSA9PiBjc3NgXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0ZmxleDogMTtcblx0d2lkdGg6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/IHVuZGVmaW5lZCA6ICc4MCUnIH07XG5gO1xuXG5leHBvcnQgY29uc3QgY2VudGVyZWRCb3JkZXJDb250cm9sID0gY3NzYFxuXHRncmlkLWNvbHVtbjogc3BhbiAyO1xuXHRtYXJnaW46IDAgYXV0bztcbmA7XG5cbmV4cG9ydCBjb25zdCByaWdodEJvcmRlckNvbnRyb2wgPSAoKSA9PiBjc3NgXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiAnYXV0bycgfSApKCkgfVxuYDtcbiJdfQ== */");

  // packages/components/build-module/border-box-control/border-box-control-linked-button/hook.mjs
  function useBorderBoxControlLinkedButton(props) {
    const {
      className: className2,
      size: size3 = "default",
      ...otherProps
    } = useContextSystem(props, "BorderBoxControlLinkedButton");
    const cx3 = useCx();
    const classes = (0, import_element53.useMemo)(() => {
      return cx3(borderBoxControlLinkedButton(size3), className2);
    }, [className2, cx3, size3]);
    return {
      ...otherProps,
      className: classes
    };
  }

  // packages/components/build-module/border-box-control/border-box-control-linked-button/component.mjs
  var import_jsx_runtime112 = __toESM(require_jsx_runtime(), 1);
  var BorderBoxControlLinkedButton = (props, forwardedRef) => {
    const {
      className: className2,
      isLinked,
      ...buttonProps
    } = useBorderBoxControlLinkedButton(props);
    const label = isLinked ? (0, import_i18n9.__)("Unlink sides") : (0, import_i18n9.__)("Link sides");
    return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(button_default, {
      ...buttonProps,
      size: "small",
      icon: isLinked ? link_default : link_off_default,
      iconSize: 24,
      label,
      ref: forwardedRef,
      className: className2
    });
  };
  var ConnectedBorderBoxControlLinkedButton = contextConnect(BorderBoxControlLinkedButton, "BorderBoxControlLinkedButton");
  var component_default10 = ConnectedBorderBoxControlLinkedButton;

  // packages/components/build-module/border-box-control/border-box-control-split-controls/component.mjs
  var import_i18n25 = __toESM(require_i18n(), 1);
  var import_element89 = __toESM(require_element(), 1);
  var import_compose35 = __toESM(require_compose(), 1);

  // packages/components/build-module/border-box-control/border-box-control-visualizer/hook.mjs
  var import_element54 = __toESM(require_element(), 1);
  function useBorderBoxControlVisualizer(props) {
    const {
      className: className2,
      value,
      size: size3 = "default",
      ...otherProps
    } = useContextSystem(props, "BorderBoxControlVisualizer");
    const cx3 = useCx();
    const classes = (0, import_element54.useMemo)(() => {
      return cx3(borderBoxControlVisualizer(value, size3), className2);
    }, [cx3, className2, value, size3]);
    return {
      ...otherProps,
      className: classes,
      value
    };
  }

  // packages/components/build-module/border-box-control/border-box-control-visualizer/component.mjs
  var import_jsx_runtime113 = __toESM(require_jsx_runtime(), 1);
  var BorderBoxControlVisualizer = (props, forwardedRef) => {
    const {
      value,
      ...otherProps
    } = useBorderBoxControlVisualizer(props);
    return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(component_default, {
      ...otherProps,
      ref: forwardedRef
    });
  };
  var ConnectedBorderBoxControlVisualizer = contextConnect(BorderBoxControlVisualizer, "BorderBoxControlVisualizer");
  var component_default11 = ConnectedBorderBoxControlVisualizer;

  // packages/components/build-module/border-control/border-control/component.mjs
  var import_i18n24 = __toESM(require_i18n(), 1);

  // packages/components/build-module/border-control/border-control-dropdown/component.mjs
  var import_i18n22 = __toESM(require_i18n(), 1);

  // packages/components/build-module/border-control/border-control-style-picker/component.mjs
  var import_i18n11 = __toESM(require_i18n(), 1);

  // packages/components/build-module/toggle-group-control/toggle-group-control/component.mjs
  var import_element62 = __toESM(require_element(), 1);
  var import_compose25 = __toESM(require_compose(), 1);

  // packages/components/build-module/toggle-group-control/toggle-group-control/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__10() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var toggleGroupControl = ({
    isBlock,
    isDeselectable,
    size: size3
  }) => /* @__PURE__ */ css("background:", COLORS.ui.background, ";border:1px solid transparent;border-radius:", config_values_default.radiusSmall, ";display:inline-flex;min-width:0;position:relative;", toggleGroupControlSize(size3), " ", !isDeselectable && enclosingBorders(isBlock), "@media not ( prefers-reduced-motion ){&[data-indicator-animated]::before{transition-property:transform,border-radius;transition-duration:0.2s;transition-timing-function:ease-out;}}&::before{content:'';position:absolute;pointer-events:none;background:", COLORS.theme.gray[100], ";border:1px solid ", COLORS.theme.gray[700], ";outline:2px solid transparent;outline-offset:-3px;border-radius:", config_values_default.radiusSmall, ";top:-1px;left:-2px;width:calc( calc( var( --selected-width, 0 ) * 1px ) + 2px );height:calc( calc( var( --selected-height, 0 ) * 1px ) + 2px );transform:translateX( calc( var( --selected-left, 0 ) * 1px ) );opacity:min(\n			1,\n			max( 0, var( --selected-width, 0 ), var( --selected-height, 0 ) )\n		);}" + (false ? "" : ";label:toggleGroupControl;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrQlUiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT05GSUcsIENPTE9SUyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgVG9nZ2xlR3JvdXBDb250cm9sUHJvcHMgfSBmcm9tICcuLi90eXBlcyc7XG5cbmV4cG9ydCBjb25zdCB0b2dnbGVHcm91cENvbnRyb2wgPSAoIHtcblx0aXNCbG9jayxcblx0aXNEZXNlbGVjdGFibGUsXG5cdHNpemUsXG59OiBQaWNrPCBUb2dnbGVHcm91cENvbnRyb2xQcm9wcywgJ2lzQmxvY2snIHwgJ2lzRGVzZWxlY3RhYmxlJyA+ICYge1xuXHRzaXplOiBOb25OdWxsYWJsZTwgVG9nZ2xlR3JvdXBDb250cm9sUHJvcHNbICdzaXplJyBdID47XG59ICkgPT4gY3NzYFxuXHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZCB9O1xuXHRib3JkZXI6IDFweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGRpc3BsYXk6IGlubGluZS1mbGV4O1xuXHRtaW4td2lkdGg6IDA7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuXHQkeyB0b2dnbGVHcm91cENvbnRyb2xTaXplKCBzaXplICkgfVxuXHQkeyAhIGlzRGVzZWxlY3RhYmxlICYmIGVuY2xvc2luZ0JvcmRlcnMoIGlzQmxvY2sgKSB9XG5cblx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0JltkYXRhLWluZGljYXRvci1hbmltYXRlZF06OmJlZm9yZSB7XG5cdFx0XHR0cmFuc2l0aW9uLXByb3BlcnR5OiB0cmFuc2Zvcm0sIGJvcmRlci1yYWRpdXM7XG5cdFx0XHR0cmFuc2l0aW9uLWR1cmF0aW9uOiAwLjJzO1xuXHRcdFx0dHJhbnNpdGlvbi10aW1pbmctZnVuY3Rpb246IGVhc2Utb3V0O1xuXHRcdH1cblx0fVxuXG5cdCY6OmJlZm9yZSB7XG5cdFx0Y29udGVudDogJyc7XG5cdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdGJhY2tncm91bmQ6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAxMDAgXSB9O1xuXHRcdGJvcmRlcjogMXB4IHNvbGlkICR7IENPTE9SUy50aGVtZS5ncmF5WyA3MDAgXSB9O1xuXG5cdFx0Ly8gV2luZG93cyBIaWdoIENvbnRyYXN0IG1vZGUgd2lsbCBzaG93IHRoaXMgb3V0bGluZSwgYnV0IG5vdCB0aGUgYm94LXNoYWRvdy5cblx0XHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0b3V0bGluZS1vZmZzZXQ6IC0zcHg7XG5cblx0XHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0XHR0b3A6IC0xcHg7XG5cdFx0bGVmdDogLTJweDtcblx0XHR3aWR0aDogY2FsYyggY2FsYyggdmFyKCAtLXNlbGVjdGVkLXdpZHRoLCAwICkgKiAxcHggKSArIDJweCApO1xuXHRcdGhlaWdodDogY2FsYyggY2FsYyggdmFyKCAtLXNlbGVjdGVkLWhlaWdodCwgMCApICogMXB4ICkgKyAycHggKTtcblx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoIGNhbGMoIHZhciggLS1zZWxlY3RlZC1sZWZ0LCAwICkgKiAxcHggKSApO1xuXHRcdC8qIEhpZGUgd2hlbiBkaW1lbnNpb25zIGFyZSB1bnNldCAoMCkgKi9cblx0XHRvcGFjaXR5OiBtaW4oXG5cdFx0XHQxLFxuXHRcdFx0bWF4KCAwLCB2YXIoIC0tc2VsZWN0ZWQtd2lkdGgsIDAgKSwgdmFyKCAtLXNlbGVjdGVkLWhlaWdodCwgMCApIClcblx0XHQpO1xuXHR9XG5gO1xuXG5jb25zdCBlbmNsb3NpbmdCb3JkZXJzID0gKCBpc0Jsb2NrOiBUb2dnbGVHcm91cENvbnRyb2xQcm9wc1sgJ2lzQmxvY2snIF0gKSA9PiB7XG5cdGNvbnN0IGVuY2xvc2luZ0JvcmRlciA9IGNzc2Bcblx0XHRib3JkZXItY29sb3I6ICR7IENPTE9SUy5ncmF5WyAzMDAgXSB9O1xuXHRgO1xuXG5cdHJldHVybiBjc3NgXG5cdFx0JHsgaXNCbG9jayAmJiBlbmNsb3NpbmdCb3JkZXIgfVxuXG5cdFx0Jjpob3ZlciB7XG5cdFx0XHRib3JkZXItY29sb3I6ICR7IENPTE9SUy5ncmF5WyA0MDAgXSB9O1xuXHRcdH1cblxuXHRcdCY6Zm9jdXMtd2l0aGluIHtcblx0XHRcdHotaW5kZXg6IDE7XG5cdFx0XHRvdXRsaW5lOiAkeyBDT05GSUcuYm9yZGVyV2lkdGhGb2N1cyB9IHNvbGlkXG5cdFx0XHRcdCR7IENPTE9SUy51aS5ib3JkZXJGb2N1cyB9O1xuXHRcdFx0b3V0bGluZS1vZmZzZXQ6IDFweDtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgdG9nZ2xlR3JvdXBDb250cm9sU2l6ZSA9IChcblx0c2l6ZTogTm9uTnVsbGFibGU8IFRvZ2dsZUdyb3VwQ29udHJvbFByb3BzWyAnc2l6ZScgXSA+XG4pID0+IHtcblx0Y29uc3Qgc3R5bGVzID0ge1xuXHRcdGRlZmF1bHQ6IGNzc2Bcblx0XHRcdGhlaWdodDogMzZweDtcblx0XHRgLFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzogY3NzYFxuXHRcdFx0aGVpZ2h0OiA0MHB4O1xuXHRcdGAsXG5cdH07XG5cblx0cmV0dXJuIHN0eWxlc1sgc2l6ZSBdO1xufTtcblxuZXhwb3J0IGNvbnN0IGJsb2NrID0gY3NzYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHR3aWR0aDogMTAwJTtcbmA7XG5cbmV4cG9ydCBjb25zdCBWaXN1YWxMYWJlbFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQvLyBNYWtlcyB0aGUgaW5saW5lIGxhYmVsIGJlIHRoZSBjb3JyZWN0IGhlaWdodCwgZXF1aXZhbGVudCB0byBzZXR0aW5nIGxpbmUtaGVpZ2h0OiAwXG5cdGRpc3BsYXk6IGZsZXg7XG5gO1xuIl19 */");
  var enclosingBorders = (isBlock) => {
    const enclosingBorder = /* @__PURE__ */ css("border-color:", COLORS.gray[300], ";" + (false ? "" : ";label:enclosingBorder;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUErRDRCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09ORklHLCBDT0xPUlMgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7IFRvZ2dsZUdyb3VwQ29udHJvbFByb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuXG5leHBvcnQgY29uc3QgdG9nZ2xlR3JvdXBDb250cm9sID0gKCB7XG5cdGlzQmxvY2ssXG5cdGlzRGVzZWxlY3RhYmxlLFxuXHRzaXplLFxufTogUGljazwgVG9nZ2xlR3JvdXBDb250cm9sUHJvcHMsICdpc0Jsb2NrJyB8ICdpc0Rlc2VsZWN0YWJsZScgPiAmIHtcblx0c2l6ZTogTm9uTnVsbGFibGU8IFRvZ2dsZUdyb3VwQ29udHJvbFByb3BzWyAnc2l6ZScgXSA+O1xufSApID0+IGNzc2Bcblx0YmFja2dyb3VuZDogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0Ym9yZGVyOiAxcHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRkaXNwbGF5OiBpbmxpbmUtZmxleDtcblx0bWluLXdpZHRoOiAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cblx0JHsgdG9nZ2xlR3JvdXBDb250cm9sU2l6ZSggc2l6ZSApIH1cblx0JHsgISBpc0Rlc2VsZWN0YWJsZSAmJiBlbmNsb3NpbmdCb3JkZXJzKCBpc0Jsb2NrICkgfVxuXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdCZbZGF0YS1pbmRpY2F0b3ItYW5pbWF0ZWRdOjpiZWZvcmUge1xuXHRcdFx0dHJhbnNpdGlvbi1wcm9wZXJ0eTogdHJhbnNmb3JtLCBib3JkZXItcmFkaXVzO1xuXHRcdFx0dHJhbnNpdGlvbi1kdXJhdGlvbjogMC4ycztcblx0XHRcdHRyYW5zaXRpb24tdGltaW5nLWZ1bmN0aW9uOiBlYXNlLW91dDtcblx0XHR9XG5cdH1cblxuXHQmOjpiZWZvcmUge1xuXHRcdGNvbnRlbnQ6ICcnO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0XHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMudGhlbWUuZ3JheVsgMTAwIF0gfTtcblx0XHRib3JkZXI6IDFweCBzb2xpZCAkeyBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF0gfTtcblxuXHRcdC8vIFdpbmRvd3MgSGlnaCBDb250cmFzdCBtb2RlIHdpbGwgc2hvdyB0aGlzIG91dGxpbmUsIGJ1dCBub3QgdGhlIGJveC1zaGFkb3cuXG5cdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdG91dGxpbmUtb2Zmc2V0OiAtM3B4O1xuXG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdFx0dG9wOiAtMXB4O1xuXHRcdGxlZnQ6IC0ycHg7XG5cdFx0d2lkdGg6IGNhbGMoIGNhbGMoIHZhciggLS1zZWxlY3RlZC13aWR0aCwgMCApICogMXB4ICkgKyAycHggKTtcblx0XHRoZWlnaHQ6IGNhbGMoIGNhbGMoIHZhciggLS1zZWxlY3RlZC1oZWlnaHQsIDAgKSAqIDFweCApICsgMnB4ICk7XG5cdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKCBjYWxjKCB2YXIoIC0tc2VsZWN0ZWQtbGVmdCwgMCApICogMXB4ICkgKTtcblx0XHQvKiBIaWRlIHdoZW4gZGltZW5zaW9ucyBhcmUgdW5zZXQgKDApICovXG5cdFx0b3BhY2l0eTogbWluKFxuXHRcdFx0MSxcblx0XHRcdG1heCggMCwgdmFyKCAtLXNlbGVjdGVkLXdpZHRoLCAwICksIHZhciggLS1zZWxlY3RlZC1oZWlnaHQsIDAgKSApXG5cdFx0KTtcblx0fVxuYDtcblxuY29uc3QgZW5jbG9zaW5nQm9yZGVycyA9ICggaXNCbG9jazogVG9nZ2xlR3JvdXBDb250cm9sUHJvcHNbICdpc0Jsb2NrJyBdICkgPT4ge1xuXHRjb25zdCBlbmNsb3NpbmdCb3JkZXIgPSBjc3NgXG5cdFx0Ym9yZGVyLWNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgMzAwIF0gfTtcblx0YDtcblxuXHRyZXR1cm4gY3NzYFxuXHRcdCR7IGlzQmxvY2sgJiYgZW5jbG9zaW5nQm9yZGVyIH1cblxuXHRcdCY6aG92ZXIge1xuXHRcdFx0Ym9yZGVyLWNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgNDAwIF0gfTtcblx0XHR9XG5cblx0XHQmOmZvY3VzLXdpdGhpbiB7XG5cdFx0XHR6LWluZGV4OiAxO1xuXHRcdFx0b3V0bGluZTogJHsgQ09ORklHLmJvcmRlcldpZHRoRm9jdXMgfSBzb2xpZFxuXHRcdFx0XHQkeyBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTtcblx0XHRcdG91dGxpbmUtb2Zmc2V0OiAxcHg7XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IHRvZ2dsZUdyb3VwQ29udHJvbFNpemUgPSAoXG5cdHNpemU6IE5vbk51bGxhYmxlPCBUb2dnbGVHcm91cENvbnRyb2xQcm9wc1sgJ3NpemUnIF0gPlxuKSA9PiB7XG5cdGNvbnN0IHN0eWxlcyA9IHtcblx0XHRkZWZhdWx0OiBjc3NgXG5cdFx0XHRoZWlnaHQ6IDM2cHg7XG5cdFx0YCxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6IGNzc2Bcblx0XHRcdGhlaWdodDogNDBweDtcblx0XHRgLFxuXHR9O1xuXG5cdHJldHVybiBzdHlsZXNbIHNpemUgXTtcbn07XG5cbmV4cG9ydCBjb25zdCBibG9jayA9IGNzc2Bcblx0ZGlzcGxheTogZmxleDtcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgVmlzdWFsTGFiZWxXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0Ly8gTWFrZXMgdGhlIGlubGluZSBsYWJlbCBiZSB0aGUgY29ycmVjdCBoZWlnaHQsIGVxdWl2YWxlbnQgdG8gc2V0dGluZyBsaW5lLWhlaWdodDogMFxuXHRkaXNwbGF5OiBmbGV4O1xuYDtcbiJdfQ== */");
    return /* @__PURE__ */ css(isBlock && enclosingBorder, " &:hover{border-color:", COLORS.gray[400], ";}&:focus-within{z-index:1;outline:", config_values_default.borderWidthFocus, " solid ", COLORS.ui.borderFocus, ";outline-offset:1px;}" + (false ? "" : ";label:enclosingBorders;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtRVciLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT05GSUcsIENPTE9SUyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgVG9nZ2xlR3JvdXBDb250cm9sUHJvcHMgfSBmcm9tICcuLi90eXBlcyc7XG5cbmV4cG9ydCBjb25zdCB0b2dnbGVHcm91cENvbnRyb2wgPSAoIHtcblx0aXNCbG9jayxcblx0aXNEZXNlbGVjdGFibGUsXG5cdHNpemUsXG59OiBQaWNrPCBUb2dnbGVHcm91cENvbnRyb2xQcm9wcywgJ2lzQmxvY2snIHwgJ2lzRGVzZWxlY3RhYmxlJyA+ICYge1xuXHRzaXplOiBOb25OdWxsYWJsZTwgVG9nZ2xlR3JvdXBDb250cm9sUHJvcHNbICdzaXplJyBdID47XG59ICkgPT4gY3NzYFxuXHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZCB9O1xuXHRib3JkZXI6IDFweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGRpc3BsYXk6IGlubGluZS1mbGV4O1xuXHRtaW4td2lkdGg6IDA7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuXHQkeyB0b2dnbGVHcm91cENvbnRyb2xTaXplKCBzaXplICkgfVxuXHQkeyAhIGlzRGVzZWxlY3RhYmxlICYmIGVuY2xvc2luZ0JvcmRlcnMoIGlzQmxvY2sgKSB9XG5cblx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0JltkYXRhLWluZGljYXRvci1hbmltYXRlZF06OmJlZm9yZSB7XG5cdFx0XHR0cmFuc2l0aW9uLXByb3BlcnR5OiB0cmFuc2Zvcm0sIGJvcmRlci1yYWRpdXM7XG5cdFx0XHR0cmFuc2l0aW9uLWR1cmF0aW9uOiAwLjJzO1xuXHRcdFx0dHJhbnNpdGlvbi10aW1pbmctZnVuY3Rpb246IGVhc2Utb3V0O1xuXHRcdH1cblx0fVxuXG5cdCY6OmJlZm9yZSB7XG5cdFx0Y29udGVudDogJyc7XG5cdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdGJhY2tncm91bmQ6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAxMDAgXSB9O1xuXHRcdGJvcmRlcjogMXB4IHNvbGlkICR7IENPTE9SUy50aGVtZS5ncmF5WyA3MDAgXSB9O1xuXG5cdFx0Ly8gV2luZG93cyBIaWdoIENvbnRyYXN0IG1vZGUgd2lsbCBzaG93IHRoaXMgb3V0bGluZSwgYnV0IG5vdCB0aGUgYm94LXNoYWRvdy5cblx0XHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0b3V0bGluZS1vZmZzZXQ6IC0zcHg7XG5cblx0XHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0XHR0b3A6IC0xcHg7XG5cdFx0bGVmdDogLTJweDtcblx0XHR3aWR0aDogY2FsYyggY2FsYyggdmFyKCAtLXNlbGVjdGVkLXdpZHRoLCAwICkgKiAxcHggKSArIDJweCApO1xuXHRcdGhlaWdodDogY2FsYyggY2FsYyggdmFyKCAtLXNlbGVjdGVkLWhlaWdodCwgMCApICogMXB4ICkgKyAycHggKTtcblx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoIGNhbGMoIHZhciggLS1zZWxlY3RlZC1sZWZ0LCAwICkgKiAxcHggKSApO1xuXHRcdC8qIEhpZGUgd2hlbiBkaW1lbnNpb25zIGFyZSB1bnNldCAoMCkgKi9cblx0XHRvcGFjaXR5OiBtaW4oXG5cdFx0XHQxLFxuXHRcdFx0bWF4KCAwLCB2YXIoIC0tc2VsZWN0ZWQtd2lkdGgsIDAgKSwgdmFyKCAtLXNlbGVjdGVkLWhlaWdodCwgMCApIClcblx0XHQpO1xuXHR9XG5gO1xuXG5jb25zdCBlbmNsb3NpbmdCb3JkZXJzID0gKCBpc0Jsb2NrOiBUb2dnbGVHcm91cENvbnRyb2xQcm9wc1sgJ2lzQmxvY2snIF0gKSA9PiB7XG5cdGNvbnN0IGVuY2xvc2luZ0JvcmRlciA9IGNzc2Bcblx0XHRib3JkZXItY29sb3I6ICR7IENPTE9SUy5ncmF5WyAzMDAgXSB9O1xuXHRgO1xuXG5cdHJldHVybiBjc3NgXG5cdFx0JHsgaXNCbG9jayAmJiBlbmNsb3NpbmdCb3JkZXIgfVxuXG5cdFx0Jjpob3ZlciB7XG5cdFx0XHRib3JkZXItY29sb3I6ICR7IENPTE9SUy5ncmF5WyA0MDAgXSB9O1xuXHRcdH1cblxuXHRcdCY6Zm9jdXMtd2l0aGluIHtcblx0XHRcdHotaW5kZXg6IDE7XG5cdFx0XHRvdXRsaW5lOiAkeyBDT05GSUcuYm9yZGVyV2lkdGhGb2N1cyB9IHNvbGlkXG5cdFx0XHRcdCR7IENPTE9SUy51aS5ib3JkZXJGb2N1cyB9O1xuXHRcdFx0b3V0bGluZS1vZmZzZXQ6IDFweDtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgdG9nZ2xlR3JvdXBDb250cm9sU2l6ZSA9IChcblx0c2l6ZTogTm9uTnVsbGFibGU8IFRvZ2dsZUdyb3VwQ29udHJvbFByb3BzWyAnc2l6ZScgXSA+XG4pID0+IHtcblx0Y29uc3Qgc3R5bGVzID0ge1xuXHRcdGRlZmF1bHQ6IGNzc2Bcblx0XHRcdGhlaWdodDogMzZweDtcblx0XHRgLFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzogY3NzYFxuXHRcdFx0aGVpZ2h0OiA0MHB4O1xuXHRcdGAsXG5cdH07XG5cblx0cmV0dXJuIHN0eWxlc1sgc2l6ZSBdO1xufTtcblxuZXhwb3J0IGNvbnN0IGJsb2NrID0gY3NzYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHR3aWR0aDogMTAwJTtcbmA7XG5cbmV4cG9ydCBjb25zdCBWaXN1YWxMYWJlbFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQvLyBNYWtlcyB0aGUgaW5saW5lIGxhYmVsIGJlIHRoZSBjb3JyZWN0IGhlaWdodCwgZXF1aXZhbGVudCB0byBzZXR0aW5nIGxpbmUtaGVpZ2h0OiAwXG5cdGRpc3BsYXk6IGZsZXg7XG5gO1xuIl19 */");
  };
  var _ref4 = false ? {
    name: "1k18kha",
    styles: "height:40px"
  } : {
    name: "152dw7p-__unstable-large",
    styles: "height:40px;label:__unstable-large;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEwRnlCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09ORklHLCBDT0xPUlMgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7IFRvZ2dsZUdyb3VwQ29udHJvbFByb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuXG5leHBvcnQgY29uc3QgdG9nZ2xlR3JvdXBDb250cm9sID0gKCB7XG5cdGlzQmxvY2ssXG5cdGlzRGVzZWxlY3RhYmxlLFxuXHRzaXplLFxufTogUGljazwgVG9nZ2xlR3JvdXBDb250cm9sUHJvcHMsICdpc0Jsb2NrJyB8ICdpc0Rlc2VsZWN0YWJsZScgPiAmIHtcblx0c2l6ZTogTm9uTnVsbGFibGU8IFRvZ2dsZUdyb3VwQ29udHJvbFByb3BzWyAnc2l6ZScgXSA+O1xufSApID0+IGNzc2Bcblx0YmFja2dyb3VuZDogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0Ym9yZGVyOiAxcHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRkaXNwbGF5OiBpbmxpbmUtZmxleDtcblx0bWluLXdpZHRoOiAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cblx0JHsgdG9nZ2xlR3JvdXBDb250cm9sU2l6ZSggc2l6ZSApIH1cblx0JHsgISBpc0Rlc2VsZWN0YWJsZSAmJiBlbmNsb3NpbmdCb3JkZXJzKCBpc0Jsb2NrICkgfVxuXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdCZbZGF0YS1pbmRpY2F0b3ItYW5pbWF0ZWRdOjpiZWZvcmUge1xuXHRcdFx0dHJhbnNpdGlvbi1wcm9wZXJ0eTogdHJhbnNmb3JtLCBib3JkZXItcmFkaXVzO1xuXHRcdFx0dHJhbnNpdGlvbi1kdXJhdGlvbjogMC4ycztcblx0XHRcdHRyYW5zaXRpb24tdGltaW5nLWZ1bmN0aW9uOiBlYXNlLW91dDtcblx0XHR9XG5cdH1cblxuXHQmOjpiZWZvcmUge1xuXHRcdGNvbnRlbnQ6ICcnO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0XHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMudGhlbWUuZ3JheVsgMTAwIF0gfTtcblx0XHRib3JkZXI6IDFweCBzb2xpZCAkeyBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF0gfTtcblxuXHRcdC8vIFdpbmRvd3MgSGlnaCBDb250cmFzdCBtb2RlIHdpbGwgc2hvdyB0aGlzIG91dGxpbmUsIGJ1dCBub3QgdGhlIGJveC1zaGFkb3cuXG5cdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdG91dGxpbmUtb2Zmc2V0OiAtM3B4O1xuXG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdFx0dG9wOiAtMXB4O1xuXHRcdGxlZnQ6IC0ycHg7XG5cdFx0d2lkdGg6IGNhbGMoIGNhbGMoIHZhciggLS1zZWxlY3RlZC13aWR0aCwgMCApICogMXB4ICkgKyAycHggKTtcblx0XHRoZWlnaHQ6IGNhbGMoIGNhbGMoIHZhciggLS1zZWxlY3RlZC1oZWlnaHQsIDAgKSAqIDFweCApICsgMnB4ICk7XG5cdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKCBjYWxjKCB2YXIoIC0tc2VsZWN0ZWQtbGVmdCwgMCApICogMXB4ICkgKTtcblx0XHQvKiBIaWRlIHdoZW4gZGltZW5zaW9ucyBhcmUgdW5zZXQgKDApICovXG5cdFx0b3BhY2l0eTogbWluKFxuXHRcdFx0MSxcblx0XHRcdG1heCggMCwgdmFyKCAtLXNlbGVjdGVkLXdpZHRoLCAwICksIHZhciggLS1zZWxlY3RlZC1oZWlnaHQsIDAgKSApXG5cdFx0KTtcblx0fVxuYDtcblxuY29uc3QgZW5jbG9zaW5nQm9yZGVycyA9ICggaXNCbG9jazogVG9nZ2xlR3JvdXBDb250cm9sUHJvcHNbICdpc0Jsb2NrJyBdICkgPT4ge1xuXHRjb25zdCBlbmNsb3NpbmdCb3JkZXIgPSBjc3NgXG5cdFx0Ym9yZGVyLWNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgMzAwIF0gfTtcblx0YDtcblxuXHRyZXR1cm4gY3NzYFxuXHRcdCR7IGlzQmxvY2sgJiYgZW5jbG9zaW5nQm9yZGVyIH1cblxuXHRcdCY6aG92ZXIge1xuXHRcdFx0Ym9yZGVyLWNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgNDAwIF0gfTtcblx0XHR9XG5cblx0XHQmOmZvY3VzLXdpdGhpbiB7XG5cdFx0XHR6LWluZGV4OiAxO1xuXHRcdFx0b3V0bGluZTogJHsgQ09ORklHLmJvcmRlcldpZHRoRm9jdXMgfSBzb2xpZFxuXHRcdFx0XHQkeyBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTtcblx0XHRcdG91dGxpbmUtb2Zmc2V0OiAxcHg7XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IHRvZ2dsZUdyb3VwQ29udHJvbFNpemUgPSAoXG5cdHNpemU6IE5vbk51bGxhYmxlPCBUb2dnbGVHcm91cENvbnRyb2xQcm9wc1sgJ3NpemUnIF0gPlxuKSA9PiB7XG5cdGNvbnN0IHN0eWxlcyA9IHtcblx0XHRkZWZhdWx0OiBjc3NgXG5cdFx0XHRoZWlnaHQ6IDM2cHg7XG5cdFx0YCxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6IGNzc2Bcblx0XHRcdGhlaWdodDogNDBweDtcblx0XHRgLFxuXHR9O1xuXG5cdHJldHVybiBzdHlsZXNbIHNpemUgXTtcbn07XG5cbmV4cG9ydCBjb25zdCBibG9jayA9IGNzc2Bcblx0ZGlzcGxheTogZmxleDtcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgVmlzdWFsTGFiZWxXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0Ly8gTWFrZXMgdGhlIGlubGluZSBsYWJlbCBiZSB0aGUgY29ycmVjdCBoZWlnaHQsIGVxdWl2YWxlbnQgdG8gc2V0dGluZyBsaW5lLWhlaWdodDogMFxuXHRkaXNwbGF5OiBmbGV4O1xuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__10
  };
  var _ref22 = false ? {
    name: "j4fzus",
    styles: "height:36px"
  } : {
    name: "ky6vtv-default",
    styles: "height:36px;label:default;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1RmMiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT05GSUcsIENPTE9SUyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgVG9nZ2xlR3JvdXBDb250cm9sUHJvcHMgfSBmcm9tICcuLi90eXBlcyc7XG5cbmV4cG9ydCBjb25zdCB0b2dnbGVHcm91cENvbnRyb2wgPSAoIHtcblx0aXNCbG9jayxcblx0aXNEZXNlbGVjdGFibGUsXG5cdHNpemUsXG59OiBQaWNrPCBUb2dnbGVHcm91cENvbnRyb2xQcm9wcywgJ2lzQmxvY2snIHwgJ2lzRGVzZWxlY3RhYmxlJyA+ICYge1xuXHRzaXplOiBOb25OdWxsYWJsZTwgVG9nZ2xlR3JvdXBDb250cm9sUHJvcHNbICdzaXplJyBdID47XG59ICkgPT4gY3NzYFxuXHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZCB9O1xuXHRib3JkZXI6IDFweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGRpc3BsYXk6IGlubGluZS1mbGV4O1xuXHRtaW4td2lkdGg6IDA7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuXHQkeyB0b2dnbGVHcm91cENvbnRyb2xTaXplKCBzaXplICkgfVxuXHQkeyAhIGlzRGVzZWxlY3RhYmxlICYmIGVuY2xvc2luZ0JvcmRlcnMoIGlzQmxvY2sgKSB9XG5cblx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0JltkYXRhLWluZGljYXRvci1hbmltYXRlZF06OmJlZm9yZSB7XG5cdFx0XHR0cmFuc2l0aW9uLXByb3BlcnR5OiB0cmFuc2Zvcm0sIGJvcmRlci1yYWRpdXM7XG5cdFx0XHR0cmFuc2l0aW9uLWR1cmF0aW9uOiAwLjJzO1xuXHRcdFx0dHJhbnNpdGlvbi10aW1pbmctZnVuY3Rpb246IGVhc2Utb3V0O1xuXHRcdH1cblx0fVxuXG5cdCY6OmJlZm9yZSB7XG5cdFx0Y29udGVudDogJyc7XG5cdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdGJhY2tncm91bmQ6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAxMDAgXSB9O1xuXHRcdGJvcmRlcjogMXB4IHNvbGlkICR7IENPTE9SUy50aGVtZS5ncmF5WyA3MDAgXSB9O1xuXG5cdFx0Ly8gV2luZG93cyBIaWdoIENvbnRyYXN0IG1vZGUgd2lsbCBzaG93IHRoaXMgb3V0bGluZSwgYnV0IG5vdCB0aGUgYm94LXNoYWRvdy5cblx0XHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0b3V0bGluZS1vZmZzZXQ6IC0zcHg7XG5cblx0XHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0XHR0b3A6IC0xcHg7XG5cdFx0bGVmdDogLTJweDtcblx0XHR3aWR0aDogY2FsYyggY2FsYyggdmFyKCAtLXNlbGVjdGVkLXdpZHRoLCAwICkgKiAxcHggKSArIDJweCApO1xuXHRcdGhlaWdodDogY2FsYyggY2FsYyggdmFyKCAtLXNlbGVjdGVkLWhlaWdodCwgMCApICogMXB4ICkgKyAycHggKTtcblx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoIGNhbGMoIHZhciggLS1zZWxlY3RlZC1sZWZ0LCAwICkgKiAxcHggKSApO1xuXHRcdC8qIEhpZGUgd2hlbiBkaW1lbnNpb25zIGFyZSB1bnNldCAoMCkgKi9cblx0XHRvcGFjaXR5OiBtaW4oXG5cdFx0XHQxLFxuXHRcdFx0bWF4KCAwLCB2YXIoIC0tc2VsZWN0ZWQtd2lkdGgsIDAgKSwgdmFyKCAtLXNlbGVjdGVkLWhlaWdodCwgMCApIClcblx0XHQpO1xuXHR9XG5gO1xuXG5jb25zdCBlbmNsb3NpbmdCb3JkZXJzID0gKCBpc0Jsb2NrOiBUb2dnbGVHcm91cENvbnRyb2xQcm9wc1sgJ2lzQmxvY2snIF0gKSA9PiB7XG5cdGNvbnN0IGVuY2xvc2luZ0JvcmRlciA9IGNzc2Bcblx0XHRib3JkZXItY29sb3I6ICR7IENPTE9SUy5ncmF5WyAzMDAgXSB9O1xuXHRgO1xuXG5cdHJldHVybiBjc3NgXG5cdFx0JHsgaXNCbG9jayAmJiBlbmNsb3NpbmdCb3JkZXIgfVxuXG5cdFx0Jjpob3ZlciB7XG5cdFx0XHRib3JkZXItY29sb3I6ICR7IENPTE9SUy5ncmF5WyA0MDAgXSB9O1xuXHRcdH1cblxuXHRcdCY6Zm9jdXMtd2l0aGluIHtcblx0XHRcdHotaW5kZXg6IDE7XG5cdFx0XHRvdXRsaW5lOiAkeyBDT05GSUcuYm9yZGVyV2lkdGhGb2N1cyB9IHNvbGlkXG5cdFx0XHRcdCR7IENPTE9SUy51aS5ib3JkZXJGb2N1cyB9O1xuXHRcdFx0b3V0bGluZS1vZmZzZXQ6IDFweDtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgdG9nZ2xlR3JvdXBDb250cm9sU2l6ZSA9IChcblx0c2l6ZTogTm9uTnVsbGFibGU8IFRvZ2dsZUdyb3VwQ29udHJvbFByb3BzWyAnc2l6ZScgXSA+XG4pID0+IHtcblx0Y29uc3Qgc3R5bGVzID0ge1xuXHRcdGRlZmF1bHQ6IGNzc2Bcblx0XHRcdGhlaWdodDogMzZweDtcblx0XHRgLFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzogY3NzYFxuXHRcdFx0aGVpZ2h0OiA0MHB4O1xuXHRcdGAsXG5cdH07XG5cblx0cmV0dXJuIHN0eWxlc1sgc2l6ZSBdO1xufTtcblxuZXhwb3J0IGNvbnN0IGJsb2NrID0gY3NzYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHR3aWR0aDogMTAwJTtcbmA7XG5cbmV4cG9ydCBjb25zdCBWaXN1YWxMYWJlbFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQvLyBNYWtlcyB0aGUgaW5saW5lIGxhYmVsIGJlIHRoZSBjb3JyZWN0IGhlaWdodCwgZXF1aXZhbGVudCB0byBzZXR0aW5nIGxpbmUtaGVpZ2h0OiAwXG5cdGRpc3BsYXk6IGZsZXg7XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__10
  };
  var toggleGroupControlSize = (size3) => {
    const styles3 = {
      default: _ref22,
      "__unstable-large": _ref4
    };
    return styles3[size3];
  };
  var block3 = false ? {
    name: "7whenc",
    styles: "display:flex;width:100%"
  } : {
    name: "2dfrl8-block",
    styles: "display:flex;width:100%;label:block;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrR3dCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09ORklHLCBDT0xPUlMgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7IFRvZ2dsZUdyb3VwQ29udHJvbFByb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuXG5leHBvcnQgY29uc3QgdG9nZ2xlR3JvdXBDb250cm9sID0gKCB7XG5cdGlzQmxvY2ssXG5cdGlzRGVzZWxlY3RhYmxlLFxuXHRzaXplLFxufTogUGljazwgVG9nZ2xlR3JvdXBDb250cm9sUHJvcHMsICdpc0Jsb2NrJyB8ICdpc0Rlc2VsZWN0YWJsZScgPiAmIHtcblx0c2l6ZTogTm9uTnVsbGFibGU8IFRvZ2dsZUdyb3VwQ29udHJvbFByb3BzWyAnc2l6ZScgXSA+O1xufSApID0+IGNzc2Bcblx0YmFja2dyb3VuZDogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0Ym9yZGVyOiAxcHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRkaXNwbGF5OiBpbmxpbmUtZmxleDtcblx0bWluLXdpZHRoOiAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cblx0JHsgdG9nZ2xlR3JvdXBDb250cm9sU2l6ZSggc2l6ZSApIH1cblx0JHsgISBpc0Rlc2VsZWN0YWJsZSAmJiBlbmNsb3NpbmdCb3JkZXJzKCBpc0Jsb2NrICkgfVxuXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdCZbZGF0YS1pbmRpY2F0b3ItYW5pbWF0ZWRdOjpiZWZvcmUge1xuXHRcdFx0dHJhbnNpdGlvbi1wcm9wZXJ0eTogdHJhbnNmb3JtLCBib3JkZXItcmFkaXVzO1xuXHRcdFx0dHJhbnNpdGlvbi1kdXJhdGlvbjogMC4ycztcblx0XHRcdHRyYW5zaXRpb24tdGltaW5nLWZ1bmN0aW9uOiBlYXNlLW91dDtcblx0XHR9XG5cdH1cblxuXHQmOjpiZWZvcmUge1xuXHRcdGNvbnRlbnQ6ICcnO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0XHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMudGhlbWUuZ3JheVsgMTAwIF0gfTtcblx0XHRib3JkZXI6IDFweCBzb2xpZCAkeyBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF0gfTtcblxuXHRcdC8vIFdpbmRvd3MgSGlnaCBDb250cmFzdCBtb2RlIHdpbGwgc2hvdyB0aGlzIG91dGxpbmUsIGJ1dCBub3QgdGhlIGJveC1zaGFkb3cuXG5cdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdG91dGxpbmUtb2Zmc2V0OiAtM3B4O1xuXG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdFx0dG9wOiAtMXB4O1xuXHRcdGxlZnQ6IC0ycHg7XG5cdFx0d2lkdGg6IGNhbGMoIGNhbGMoIHZhciggLS1zZWxlY3RlZC13aWR0aCwgMCApICogMXB4ICkgKyAycHggKTtcblx0XHRoZWlnaHQ6IGNhbGMoIGNhbGMoIHZhciggLS1zZWxlY3RlZC1oZWlnaHQsIDAgKSAqIDFweCApICsgMnB4ICk7XG5cdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKCBjYWxjKCB2YXIoIC0tc2VsZWN0ZWQtbGVmdCwgMCApICogMXB4ICkgKTtcblx0XHQvKiBIaWRlIHdoZW4gZGltZW5zaW9ucyBhcmUgdW5zZXQgKDApICovXG5cdFx0b3BhY2l0eTogbWluKFxuXHRcdFx0MSxcblx0XHRcdG1heCggMCwgdmFyKCAtLXNlbGVjdGVkLXdpZHRoLCAwICksIHZhciggLS1zZWxlY3RlZC1oZWlnaHQsIDAgKSApXG5cdFx0KTtcblx0fVxuYDtcblxuY29uc3QgZW5jbG9zaW5nQm9yZGVycyA9ICggaXNCbG9jazogVG9nZ2xlR3JvdXBDb250cm9sUHJvcHNbICdpc0Jsb2NrJyBdICkgPT4ge1xuXHRjb25zdCBlbmNsb3NpbmdCb3JkZXIgPSBjc3NgXG5cdFx0Ym9yZGVyLWNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgMzAwIF0gfTtcblx0YDtcblxuXHRyZXR1cm4gY3NzYFxuXHRcdCR7IGlzQmxvY2sgJiYgZW5jbG9zaW5nQm9yZGVyIH1cblxuXHRcdCY6aG92ZXIge1xuXHRcdFx0Ym9yZGVyLWNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgNDAwIF0gfTtcblx0XHR9XG5cblx0XHQmOmZvY3VzLXdpdGhpbiB7XG5cdFx0XHR6LWluZGV4OiAxO1xuXHRcdFx0b3V0bGluZTogJHsgQ09ORklHLmJvcmRlcldpZHRoRm9jdXMgfSBzb2xpZFxuXHRcdFx0XHQkeyBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTtcblx0XHRcdG91dGxpbmUtb2Zmc2V0OiAxcHg7XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IHRvZ2dsZUdyb3VwQ29udHJvbFNpemUgPSAoXG5cdHNpemU6IE5vbk51bGxhYmxlPCBUb2dnbGVHcm91cENvbnRyb2xQcm9wc1sgJ3NpemUnIF0gPlxuKSA9PiB7XG5cdGNvbnN0IHN0eWxlcyA9IHtcblx0XHRkZWZhdWx0OiBjc3NgXG5cdFx0XHRoZWlnaHQ6IDM2cHg7XG5cdFx0YCxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6IGNzc2Bcblx0XHRcdGhlaWdodDogNDBweDtcblx0XHRgLFxuXHR9O1xuXG5cdHJldHVybiBzdHlsZXNbIHNpemUgXTtcbn07XG5cbmV4cG9ydCBjb25zdCBibG9jayA9IGNzc2Bcblx0ZGlzcGxheTogZmxleDtcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgVmlzdWFsTGFiZWxXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0Ly8gTWFrZXMgdGhlIGlubGluZSBsYWJlbCBiZSB0aGUgY29ycmVjdCBoZWlnaHQsIGVxdWl2YWxlbnQgdG8gc2V0dGluZyBsaW5lLWhlaWdodDogMFxuXHRkaXNwbGF5OiBmbGV4O1xuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__10
  };
  var VisualLabelWrapper = /* @__PURE__ */ createStyled("div", false ? {
    target: "eakva830"
  } : {
    target: "eakva830",
    label: "VisualLabelWrapper"
  })(false ? {
    name: "zjik7",
    styles: "display:flex"
  } : {
    name: "zjik7",
    styles: "display:flex/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1RzRDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09ORklHLCBDT0xPUlMgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7IFRvZ2dsZUdyb3VwQ29udHJvbFByb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuXG5leHBvcnQgY29uc3QgdG9nZ2xlR3JvdXBDb250cm9sID0gKCB7XG5cdGlzQmxvY2ssXG5cdGlzRGVzZWxlY3RhYmxlLFxuXHRzaXplLFxufTogUGljazwgVG9nZ2xlR3JvdXBDb250cm9sUHJvcHMsICdpc0Jsb2NrJyB8ICdpc0Rlc2VsZWN0YWJsZScgPiAmIHtcblx0c2l6ZTogTm9uTnVsbGFibGU8IFRvZ2dsZUdyb3VwQ29udHJvbFByb3BzWyAnc2l6ZScgXSA+O1xufSApID0+IGNzc2Bcblx0YmFja2dyb3VuZDogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0Ym9yZGVyOiAxcHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRkaXNwbGF5OiBpbmxpbmUtZmxleDtcblx0bWluLXdpZHRoOiAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cblx0JHsgdG9nZ2xlR3JvdXBDb250cm9sU2l6ZSggc2l6ZSApIH1cblx0JHsgISBpc0Rlc2VsZWN0YWJsZSAmJiBlbmNsb3NpbmdCb3JkZXJzKCBpc0Jsb2NrICkgfVxuXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdCZbZGF0YS1pbmRpY2F0b3ItYW5pbWF0ZWRdOjpiZWZvcmUge1xuXHRcdFx0dHJhbnNpdGlvbi1wcm9wZXJ0eTogdHJhbnNmb3JtLCBib3JkZXItcmFkaXVzO1xuXHRcdFx0dHJhbnNpdGlvbi1kdXJhdGlvbjogMC4ycztcblx0XHRcdHRyYW5zaXRpb24tdGltaW5nLWZ1bmN0aW9uOiBlYXNlLW91dDtcblx0XHR9XG5cdH1cblxuXHQmOjpiZWZvcmUge1xuXHRcdGNvbnRlbnQ6ICcnO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0XHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMudGhlbWUuZ3JheVsgMTAwIF0gfTtcblx0XHRib3JkZXI6IDFweCBzb2xpZCAkeyBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF0gfTtcblxuXHRcdC8vIFdpbmRvd3MgSGlnaCBDb250cmFzdCBtb2RlIHdpbGwgc2hvdyB0aGlzIG91dGxpbmUsIGJ1dCBub3QgdGhlIGJveC1zaGFkb3cuXG5cdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdG91dGxpbmUtb2Zmc2V0OiAtM3B4O1xuXG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdFx0dG9wOiAtMXB4O1xuXHRcdGxlZnQ6IC0ycHg7XG5cdFx0d2lkdGg6IGNhbGMoIGNhbGMoIHZhciggLS1zZWxlY3RlZC13aWR0aCwgMCApICogMXB4ICkgKyAycHggKTtcblx0XHRoZWlnaHQ6IGNhbGMoIGNhbGMoIHZhciggLS1zZWxlY3RlZC1oZWlnaHQsIDAgKSAqIDFweCApICsgMnB4ICk7XG5cdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKCBjYWxjKCB2YXIoIC0tc2VsZWN0ZWQtbGVmdCwgMCApICogMXB4ICkgKTtcblx0XHQvKiBIaWRlIHdoZW4gZGltZW5zaW9ucyBhcmUgdW5zZXQgKDApICovXG5cdFx0b3BhY2l0eTogbWluKFxuXHRcdFx0MSxcblx0XHRcdG1heCggMCwgdmFyKCAtLXNlbGVjdGVkLXdpZHRoLCAwICksIHZhciggLS1zZWxlY3RlZC1oZWlnaHQsIDAgKSApXG5cdFx0KTtcblx0fVxuYDtcblxuY29uc3QgZW5jbG9zaW5nQm9yZGVycyA9ICggaXNCbG9jazogVG9nZ2xlR3JvdXBDb250cm9sUHJvcHNbICdpc0Jsb2NrJyBdICkgPT4ge1xuXHRjb25zdCBlbmNsb3NpbmdCb3JkZXIgPSBjc3NgXG5cdFx0Ym9yZGVyLWNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgMzAwIF0gfTtcblx0YDtcblxuXHRyZXR1cm4gY3NzYFxuXHRcdCR7IGlzQmxvY2sgJiYgZW5jbG9zaW5nQm9yZGVyIH1cblxuXHRcdCY6aG92ZXIge1xuXHRcdFx0Ym9yZGVyLWNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgNDAwIF0gfTtcblx0XHR9XG5cblx0XHQmOmZvY3VzLXdpdGhpbiB7XG5cdFx0XHR6LWluZGV4OiAxO1xuXHRcdFx0b3V0bGluZTogJHsgQ09ORklHLmJvcmRlcldpZHRoRm9jdXMgfSBzb2xpZFxuXHRcdFx0XHQkeyBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTtcblx0XHRcdG91dGxpbmUtb2Zmc2V0OiAxcHg7XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IHRvZ2dsZUdyb3VwQ29udHJvbFNpemUgPSAoXG5cdHNpemU6IE5vbk51bGxhYmxlPCBUb2dnbGVHcm91cENvbnRyb2xQcm9wc1sgJ3NpemUnIF0gPlxuKSA9PiB7XG5cdGNvbnN0IHN0eWxlcyA9IHtcblx0XHRkZWZhdWx0OiBjc3NgXG5cdFx0XHRoZWlnaHQ6IDM2cHg7XG5cdFx0YCxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6IGNzc2Bcblx0XHRcdGhlaWdodDogNDBweDtcblx0XHRgLFxuXHR9O1xuXG5cdHJldHVybiBzdHlsZXNbIHNpemUgXTtcbn07XG5cbmV4cG9ydCBjb25zdCBibG9jayA9IGNzc2Bcblx0ZGlzcGxheTogZmxleDtcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgVmlzdWFsTGFiZWxXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0Ly8gTWFrZXMgdGhlIGlubGluZSBsYWJlbCBiZSB0aGUgY29ycmVjdCBoZWlnaHQsIGVxdWl2YWxlbnQgdG8gc2V0dGluZyBsaW5lLWhlaWdodDogMFxuXHRkaXNwbGF5OiBmbGV4O1xuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__10
  });

  // packages/components/build-module/toggle-group-control/toggle-group-control/as-radio-group.mjs
  var import_compose20 = __toESM(require_compose(), 1);
  var import_element57 = __toESM(require_element(), 1);
  var import_i18n10 = __toESM(require_i18n(), 1);

  // packages/components/build-module/toggle-group-control/context.mjs
  var import_element55 = __toESM(require_element(), 1);
  var ToggleGroupControlContext = (0, import_element55.createContext)({});
  ToggleGroupControlContext.displayName = "ToggleGroupControlContext";
  var useToggleGroupControlContext = () => (0, import_element55.useContext)(ToggleGroupControlContext);
  var context_default2 = ToggleGroupControlContext;

  // packages/components/build-module/toggle-group-control/toggle-group-control/utils.mjs
  var import_compose19 = __toESM(require_compose(), 1);
  var import_element56 = __toESM(require_element(), 1);
  function useComputeControlledOrUncontrolledValue(valueProp) {
    const isInitialRenderRef = (0, import_element56.useRef)(true);
    const prevValueProp = (0, import_compose19.usePrevious)(valueProp);
    const prevIsControlledRef = (0, import_element56.useRef)(false);
    (0, import_element56.useEffect)(() => {
      if (isInitialRenderRef.current) {
        isInitialRenderRef.current = false;
      }
    }, []);
    const isControlled = prevIsControlledRef.current || !isInitialRenderRef.current && prevValueProp !== valueProp;
    (0, import_element56.useEffect)(() => {
      prevIsControlledRef.current = isControlled;
    }, [isControlled]);
    if (isControlled) {
      return {
        value: valueProp ?? "",
        defaultValue: void 0
      };
    }
    return {
      value: void 0,
      defaultValue: valueProp
    };
  }

  // packages/components/build-module/toggle-group-control/toggle-group-control/as-radio-group.mjs
  var import_jsx_runtime114 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedToggleGroupControlAsRadioGroup({
    children,
    isAdaptiveWidth,
    label,
    onChange: onChangeProp,
    size: size3,
    value: valueProp,
    id: idProp,
    setSelectedElement,
    ...otherProps
  }, forwardedRef) {
    const generatedId = (0, import_compose20.useInstanceId)(ToggleGroupControlAsRadioGroup, "toggle-group-control-as-radio-group");
    const baseId = idProp || generatedId;
    const {
      value,
      defaultValue: defaultValue2
    } = useComputeControlledOrUncontrolledValue(valueProp);
    const wrappedOnChangeProp = onChangeProp ? (v3) => {
      onChangeProp(v3 ?? void 0);
    } : void 0;
    const radio = useRadioStore({
      defaultValue: defaultValue2,
      value,
      setValue: wrappedOnChangeProp,
      rtl: (0, import_i18n10.isRTL)()
    });
    const selectedValue = useStoreState(radio, "value");
    const setValue = radio.setValue;
    (0, import_element57.useEffect)(() => {
      if (selectedValue === "") {
        radio.setActiveId(void 0);
      }
    }, [radio, selectedValue]);
    const groupContextValue = (0, import_element57.useMemo)(() => ({
      activeItemIsNotFirstItem: () => radio.getState().activeId !== radio.first(),
      baseId,
      isBlock: !isAdaptiveWidth,
      size: size3,
      // @ts-expect-error - This is wrong and we should fix it.
      value: selectedValue,
      // @ts-expect-error - This is wrong and we should fix it.
      setValue,
      setSelectedElement
    }), [baseId, isAdaptiveWidth, radio, selectedValue, setSelectedElement, setValue, size3]);
    return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(context_default2.Provider, {
      value: groupContextValue,
      children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(RadioGroup, {
        store: radio,
        "aria-label": label,
        render: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(component_default, {}),
        ...otherProps,
        id: baseId,
        ref: forwardedRef,
        children
      })
    });
  }
  var ToggleGroupControlAsRadioGroup = (0, import_element57.forwardRef)(UnforwardedToggleGroupControlAsRadioGroup);
  ToggleGroupControlAsRadioGroup.displayName = "ToggleGroupControlAsRadioGroup";

  // packages/components/build-module/toggle-group-control/toggle-group-control/as-button-group.mjs
  var import_compose21 = __toESM(require_compose(), 1);
  var import_element58 = __toESM(require_element(), 1);
  var import_jsx_runtime115 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedToggleGroupControlAsButtonGroup({
    children,
    isAdaptiveWidth,
    label,
    onChange,
    size: size3,
    value: valueProp,
    id: idProp,
    setSelectedElement,
    ...otherProps
  }, forwardedRef) {
    const generatedId = (0, import_compose21.useInstanceId)(ToggleGroupControlAsButtonGroup, "toggle-group-control-as-button-group");
    const baseId = idProp || generatedId;
    const {
      value,
      defaultValue: defaultValue2
    } = useComputeControlledOrUncontrolledValue(valueProp);
    const [selectedValue, setSelectedValue] = useControlledValue({
      defaultValue: defaultValue2,
      value,
      onChange
    });
    const groupContextValue = (0, import_element58.useMemo)(() => ({
      baseId,
      value: selectedValue,
      setValue: setSelectedValue,
      isBlock: !isAdaptiveWidth,
      isDeselectable: true,
      size: size3,
      setSelectedElement
    }), [baseId, selectedValue, setSelectedValue, isAdaptiveWidth, size3, setSelectedElement]);
    return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(context_default2.Provider, {
      value: groupContextValue,
      children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(component_default, {
        "aria-label": label,
        ...otherProps,
        ref: forwardedRef,
        role: "group",
        children
      })
    });
  }
  var ToggleGroupControlAsButtonGroup = (0, import_element58.forwardRef)(UnforwardedToggleGroupControlAsButtonGroup);
  ToggleGroupControlAsButtonGroup.displayName = "ToggleGroupControlAsButtonGroup";

  // packages/components/build-module/utils/element-rect.mjs
  var import_element59 = __toESM(require_element(), 1);
  var import_compose22 = __toESM(require_compose(), 1);
  var NULL_ELEMENT_OFFSET_RECT = {
    element: void 0,
    top: 0,
    right: 0,
    bottom: 0,
    left: 0,
    width: 0,
    height: 0
  };
  function getElementOffsetRect(element) {
    const rect = element.getBoundingClientRect();
    if (rect.width === 0 || rect.height === 0) {
      return;
    }
    const offsetParent = element.offsetParent;
    const offsetParentRect = offsetParent?.getBoundingClientRect() ?? NULL_ELEMENT_OFFSET_RECT;
    const offsetParentScrollX = offsetParent?.scrollLeft ?? 0;
    const offsetParentScrollY = offsetParent?.scrollTop ?? 0;
    const computedWidth = parseFloat(getComputedStyle(element).width);
    const computedHeight = parseFloat(getComputedStyle(element).height);
    const scaleX = computedWidth / rect.width;
    const scaleY = computedHeight / rect.height;
    return {
      element,
      // To obtain the adjusted values for the position:
      // 1. Compute the element's position relative to the offset parent.
      // 2. Correct for the scale factor.
      // 3. Adjust for the scroll position of the offset parent.
      top: (rect.top - offsetParentRect?.top) * scaleY + offsetParentScrollY,
      right: (offsetParentRect?.right - rect.right) * scaleX - offsetParentScrollX,
      bottom: (offsetParentRect?.bottom - rect.bottom) * scaleY - offsetParentScrollY,
      left: (rect.left - offsetParentRect?.left) * scaleX + offsetParentScrollX,
      // Computed dimensions don't need any adjustments.
      width: computedWidth,
      height: computedHeight
    };
  }
  var POLL_RATE = 100;
  function useTrackElementOffsetRect(targetElement, deps = []) {
    const [indicatorPosition, setIndicatorPosition] = (0, import_element59.useState)(NULL_ELEMENT_OFFSET_RECT);
    const intervalRef = (0, import_element59.useRef)(void 0);
    const measure = (0, import_compose22.useEvent)(() => {
      if (targetElement && targetElement.isConnected) {
        const elementOffsetRect = getElementOffsetRect(targetElement);
        if (elementOffsetRect) {
          setIndicatorPosition(elementOffsetRect);
          clearInterval(intervalRef.current);
          return true;
        }
      } else {
        clearInterval(intervalRef.current);
      }
      return false;
    });
    const setElement = (0, import_compose22.useResizeObserver)(() => {
      if (!measure()) {
        requestAnimationFrame(() => {
          if (!measure()) {
            intervalRef.current = setInterval(measure, POLL_RATE);
          }
        });
      }
    });
    (0, import_element59.useLayoutEffect)(() => {
      setElement(targetElement);
      if (!targetElement) {
        setIndicatorPosition(NULL_ELEMENT_OFFSET_RECT);
      }
    }, [setElement, targetElement]);
    (0, import_element59.useLayoutEffect)(() => {
      measure();
    }, deps);
    return indicatorPosition;
  }

  // packages/components/build-module/utils/hooks/use-animated-offset-rect.mjs
  var import_compose24 = __toESM(require_compose(), 1);
  var import_element61 = __toESM(require_element(), 1);

  // packages/components/build-module/utils/hooks/use-on-value-update.mjs
  var import_compose23 = __toESM(require_compose(), 1);
  var import_element60 = __toESM(require_element(), 1);
  function useOnValueUpdate(value, onUpdate) {
    const previousValueRef = (0, import_element60.useRef)(value);
    const updateCallbackEvent = (0, import_compose23.useEvent)(onUpdate);
    (0, import_element60.useLayoutEffect)(() => {
      if (previousValueRef.current !== value) {
        updateCallbackEvent({
          previousValue: previousValueRef.current
        });
        previousValueRef.current = value;
      }
    }, [updateCallbackEvent, value]);
  }

  // packages/components/build-module/utils/hooks/use-animated-offset-rect.mjs
  function useAnimatedOffsetRect(container, rect, {
    prefix: prefix2 = "subelement",
    dataAttribute = `${prefix2}-animated`,
    transitionEndFilter = () => true,
    roundRect = false
  } = {}) {
    const setProperties = (0, import_compose24.useEvent)(() => {
      Object.keys(rect).forEach((property) => property !== "element" && container?.style.setProperty(`--${prefix2}-${property}`, String(roundRect ? Math.floor(rect[property]) : rect[property])));
    });
    (0, import_element61.useLayoutEffect)(() => {
      setProperties();
    }, [rect, setProperties]);
    useOnValueUpdate(rect.element, ({
      previousValue
    }) => {
      if (rect.element && previousValue) {
        container?.setAttribute(`data-${dataAttribute}`, "");
      }
    });
    (0, import_element61.useLayoutEffect)(() => {
      function onTransitionEnd(event) {
        if (transitionEndFilter(event)) {
          container?.removeAttribute(`data-${dataAttribute}`);
        }
      }
      container?.addEventListener("transitionend", onTransitionEnd);
      return () => container?.removeEventListener("transitionend", onTransitionEnd);
    }, [dataAttribute, container, transitionEndFilter]);
  }

  // packages/components/build-module/toggle-group-control/toggle-group-control/component.mjs
  var import_jsx_runtime116 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedToggleGroupControl(props, forwardedRef) {
    const {
      __nextHasNoMarginBottom: _2,
      // Prevent passing this to the internal component
      __next40pxDefaultSize = false,
      __shouldNotWarnDeprecated36pxSize,
      className: className2,
      isAdaptiveWidth = false,
      isBlock = false,
      isDeselectable = false,
      label,
      hideLabelFromVision = false,
      help,
      onChange,
      size: size3 = "default",
      value,
      children,
      ...otherProps
    } = useContextSystem(props, "ToggleGroupControl");
    const normalizedSize = __next40pxDefaultSize && size3 === "default" ? "__unstable-large" : size3;
    const [selectedElement, setSelectedElement] = (0, import_element62.useState)();
    const [controlElement, setControlElement] = (0, import_element62.useState)();
    const refs = (0, import_compose25.useMergeRefs)([setControlElement, forwardedRef]);
    const selectedRect = useTrackElementOffsetRect(value !== null && value !== void 0 ? selectedElement : void 0);
    useAnimatedOffsetRect(controlElement, selectedRect, {
      prefix: "selected",
      dataAttribute: "indicator-animated",
      transitionEndFilter: (event) => event.pseudoElement === "::before",
      roundRect: false
    });
    const cx3 = useCx();
    const classes = (0, import_element62.useMemo)(() => cx3(toggleGroupControl({
      isBlock,
      isDeselectable,
      size: normalizedSize
    }), isBlock && block3, className2), [className2, cx3, isBlock, isDeselectable, normalizedSize]);
    const MainControl = isDeselectable ? ToggleGroupControlAsButtonGroup : ToggleGroupControlAsRadioGroup;
    maybeWarnDeprecated36pxSize({
      componentName: "ToggleGroupControl",
      size: size3,
      __next40pxDefaultSize,
      __shouldNotWarnDeprecated36pxSize
    });
    return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(base_control_default, {
      help,
      children: [!hideLabelFromVision && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(VisualLabelWrapper, {
        children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(base_control_default.VisualLabel, {
          children: label
        })
      }), /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(MainControl, {
        ...otherProps,
        setSelectedElement,
        className: classes,
        isAdaptiveWidth,
        label,
        onChange,
        ref: refs,
        size: normalizedSize,
        value,
        children
      })]
    });
  }
  var ToggleGroupControl = contextConnect(UnconnectedToggleGroupControl, "ToggleGroupControl");
  var component_default12 = ToggleGroupControl;

  // packages/components/build-module/toggle-group-control/toggle-group-control-option/component.mjs
  var import_element64 = __toESM(require_element(), 1);

  // packages/components/build-module/toggle-group-control/toggle-group-control-option-base/component.mjs
  var import_compose26 = __toESM(require_compose(), 1);
  var import_element63 = __toESM(require_element(), 1);

  // packages/components/build-module/toggle-group-control/toggle-group-control-option-base/styles.mjs
  var styles_exports6 = {};
  __export(styles_exports6, {
    ButtonContentView: () => ButtonContentView,
    LabelView: () => LabelView,
    buttonView: () => buttonView,
    labelBlock: () => labelBlock
  });
  function _EMOTION_STRINGIFIED_CSS_ERROR__11() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var LabelView = /* @__PURE__ */ createStyled("div", false ? {
    target: "et6ln9s1"
  } : {
    target: "et6ln9s1",
    label: "LabelView"
  })(false ? {
    name: "sln1fl",
    styles: "display:inline-flex;max-width:100%;min-width:0;position:relative"
  } : {
    name: "sln1fl",
    styles: "display:inline-flex;max-width:100%;min-width:0;position:relative/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFlbUMiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT05GSUcsIENPTE9SUyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHtcblx0VG9nZ2xlR3JvdXBDb250cm9sUHJvcHMsXG5cdFRvZ2dsZUdyb3VwQ29udHJvbE9wdGlvbkJhc2VQcm9wcyxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuXG5leHBvcnQgY29uc3QgTGFiZWxWaWV3ID0gc3R5bGVkLmRpdmBcblx0ZGlzcGxheTogaW5saW5lLWZsZXg7XG5cdG1heC13aWR0aDogMTAwJTtcblx0bWluLXdpZHRoOiAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5gO1xuXG5leHBvcnQgY29uc3QgbGFiZWxCbG9jayA9IGNzc2Bcblx0ZmxleDogMTtcbmA7XG5cbmV4cG9ydCBjb25zdCBidXR0b25WaWV3ID0gKCB7XG5cdGlzRGVzZWxlY3RhYmxlLFxuXHRpc0ljb24sXG5cdGlzUHJlc3NlZCxcblx0c2l6ZSxcbn06IFBpY2s8IFRvZ2dsZUdyb3VwQ29udHJvbFByb3BzLCAnaXNEZXNlbGVjdGFibGUnIHwgJ3NpemUnID4gJlxuXHRQaWNrPCBUb2dnbGVHcm91cENvbnRyb2xPcHRpb25CYXNlUHJvcHMsICdpc0ljb24nID4gJiB7XG5cdFx0aXNQcmVzc2VkPzogYm9vbGVhbjtcblx0fSApID0+IGNzc2Bcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0YXBwZWFyYW5jZTogbm9uZTtcblx0YmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cdGJvcmRlcjogbm9uZTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1hTbWFsbCB9O1xuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmdyYXlbIDcwMCBdIH07XG5cdGZpbGw6IGN1cnJlbnRDb2xvcjtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRmb250LWZhbWlseTogaW5oZXJpdDtcblx0aGVpZ2h0OiAxMDAlO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0bGluZS1oZWlnaHQ6IDEwMCU7XG5cdG91dGxpbmU6IG5vbmU7XG5cdHBhZGRpbmc6IDAgMTJweDtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdHRyYW5zaXRpb246XG5cdFx0XHRjb2xvciAkeyBDT05GSUcudHJhbnNpdGlvbkR1cmF0aW9uRmFzdCB9IGxpbmVhcixcblx0XHRcdGZvbnQtd2VpZ2h0IDYwbXMgbGluZWFyO1xuXHR9XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHR3aWR0aDogMTAwJTtcblx0ei1pbmRleDogMjtcblxuXHQmOjotbW96LWZvY3VzLWlubmVyIHtcblx0XHRib3JkZXI6IDA7XG5cdH1cblxuXHQmW2Rpc2FibGVkXSxcblx0JlthcmlhLWRpc2FibGVkPSd0cnVlJ10ge1xuXHRcdG9wYWNpdHk6IDAuNDtcblx0XHRjdXJzb3I6IGRlZmF1bHQ7XG5cdH1cblxuXHQmOmhvdmVyOm5vdCggW2Rpc2FibGVkXSApOm5vdCggW2FyaWEtZGlzYWJsZWQ9J3RydWUnXSApIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0fVxuXG5cdCR7IGlzRGVzZWxlY3RhYmxlICYmIGRlc2VsZWN0YWJsZSB9XG5cdCR7IGlzSWNvbiAmJiBpc0ljb25TdHlsZXMoIHsgc2l6ZSB9ICkgfVxuXHQkeyBpc1ByZXNzZWQgJiYgcHJlc3NlZCB9XG5gO1xuXG5jb25zdCBwcmVzc2VkID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5gO1xuXG5jb25zdCBkZXNlbGVjdGFibGUgPSBjc3NgXG5cdCY6Zm9jdXMge1xuXHRcdG91dGxpbmU6ICR7IENPTkZJRy5ib3JkZXJXaWR0aEZvY3VzIH0gc29saWQgJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0b3V0bGluZS1vZmZzZXQ6IDJweDtcblxuXHRcdC8vIEhpZGUgb3ZlcmxhcHBpbmcgYm9yZGVyXG5cdFx0JlthcmlhLXByZXNzZWQ9J2ZhbHNlJ10ge1xuXHRcdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0XHRcdGJveC1zaGFkb3c6IDAgMCAwIDJweCAkeyBDT0xPUlMudWkuYmFja2dyb3VuZCB9O1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEJ1dHRvbkNvbnRlbnRWaWV3ID0gc3R5bGVkLmRpdmBcblx0ZGlzcGxheTogZmxleDtcblx0Zm9udC1zaXplOiAkeyBDT05GSUcuZm9udFNpemUgfTtcblx0bGluZS1oZWlnaHQ6IDE7XG5gO1xuXG5jb25zdCBpc0ljb25TdHlsZXMgPSAoIHtcblx0c2l6ZSA9ICdkZWZhdWx0Jyxcbn06IFBpY2s8IFRvZ2dsZUdyb3VwQ29udHJvbFByb3BzLCAnc2l6ZScgPiApID0+IHtcblx0Y29uc3QgaWNvbkJ1dHRvblNpemVzID0ge1xuXHRcdGRlZmF1bHQ6ICczNHB4Jyxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6ICczOHB4Jyxcblx0fTtcblxuXHRyZXR1cm4gY3NzYFxuXHRcdGhlaWdodDogJHsgaWNvbkJ1dHRvblNpemVzWyBzaXplIF0gfTtcblx0XHRhc3BlY3QtcmF0aW86IDE7XG5cdFx0cGFkZGluZy1sZWZ0OiAwO1xuXHRcdHBhZGRpbmctcmlnaHQ6IDA7XG5cdGA7XG59O1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__11
  });
  var labelBlock = false ? {
    name: "82a6rk",
    styles: "flex:1"
  } : {
    name: "1sypmw-labelBlock",
    styles: "flex:1;label:labelBlock;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQjZCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09ORklHLCBDT0xPUlMgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7XG5cdFRvZ2dsZUdyb3VwQ29udHJvbFByb3BzLFxuXHRUb2dnbGVHcm91cENvbnRyb2xPcHRpb25CYXNlUHJvcHMsXG59IGZyb20gJy4uL3R5cGVzJztcblxuZXhwb3J0IGNvbnN0IExhYmVsVmlldyA9IHN0eWxlZC5kaXZgXG5cdGRpc3BsYXk6IGlubGluZS1mbGV4O1xuXHRtYXgtd2lkdGg6IDEwMCU7XG5cdG1pbi13aWR0aDogMDtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuYDtcblxuZXhwb3J0IGNvbnN0IGxhYmVsQmxvY2sgPSBjc3NgXG5cdGZsZXg6IDE7XG5gO1xuXG5leHBvcnQgY29uc3QgYnV0dG9uVmlldyA9ICgge1xuXHRpc0Rlc2VsZWN0YWJsZSxcblx0aXNJY29uLFxuXHRpc1ByZXNzZWQsXG5cdHNpemUsXG59OiBQaWNrPCBUb2dnbGVHcm91cENvbnRyb2xQcm9wcywgJ2lzRGVzZWxlY3RhYmxlJyB8ICdzaXplJyA+ICZcblx0UGljazwgVG9nZ2xlR3JvdXBDb250cm9sT3B0aW9uQmFzZVByb3BzLCAnaXNJY29uJyA+ICYge1xuXHRcdGlzUHJlc3NlZD86IGJvb2xlYW47XG5cdH0gKSA9PiBjc3NgXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGFwcGVhcmFuY2U6IG5vbmU7XG5cdGJhY2tncm91bmQ6IHRyYW5zcGFyZW50O1xuXHRib3JkZXI6IG5vbmU7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNYU21hbGwgfTtcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyA3MDAgXSB9O1xuXHRmaWxsOiBjdXJyZW50Q29sb3I7XG5cdGN1cnNvcjogcG9pbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdGhlaWdodDogMTAwJTtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cdGxpbmUtaGVpZ2h0OiAxMDAlO1xuXHRvdXRsaW5lOiBub25lO1xuXHRwYWRkaW5nOiAwIDEycHg7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0dGV4dC1hbGlnbjogY2VudGVyO1xuXHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHR0cmFuc2l0aW9uOlxuXHRcdFx0Y29sb3IgJHsgQ09ORklHLnRyYW5zaXRpb25EdXJhdGlvbkZhc3QgfSBsaW5lYXIsXG5cdFx0XHRmb250LXdlaWdodCA2MG1zIGxpbmVhcjtcblx0fVxuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdHotaW5kZXg6IDI7XG5cblx0Jjo6LW1vei1mb2N1cy1pbm5lciB7XG5cdFx0Ym9yZGVyOiAwO1xuXHR9XG5cblx0JltkaXNhYmxlZF0sXG5cdCZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRvcGFjaXR5OiAwLjQ7XG5cdFx0Y3Vyc29yOiBkZWZhdWx0O1xuXHR9XG5cblx0Jjpob3Zlcjpub3QoIFtkaXNhYmxlZF0gKTpub3QoIFthcmlhLWRpc2FibGVkPSd0cnVlJ10gKSB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdH1cblxuXHQkeyBpc0Rlc2VsZWN0YWJsZSAmJiBkZXNlbGVjdGFibGUgfVxuXHQkeyBpc0ljb24gJiYgaXNJY29uU3R5bGVzKCB7IHNpemUgfSApIH1cblx0JHsgaXNQcmVzc2VkICYmIHByZXNzZWQgfVxuYDtcblxuY29uc3QgcHJlc3NlZCA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdGZvbnQtd2VpZ2h0OiAkeyBDT05GSUcuZm9udFdlaWdodE1lZGl1bSB9O1xuYDtcblxuY29uc3QgZGVzZWxlY3RhYmxlID0gY3NzYFxuXHQmOmZvY3VzIHtcblx0XHRvdXRsaW5lOiAkeyBDT05GSUcuYm9yZGVyV2lkdGhGb2N1cyB9IHNvbGlkICR7IENPTE9SUy51aS5ib3JkZXJGb2N1cyB9O1xuXHRcdG91dGxpbmUtb2Zmc2V0OiAycHg7XG5cblx0XHQvLyBIaWRlIG92ZXJsYXBwaW5nIGJvcmRlclxuXHRcdCZbYXJpYS1wcmVzc2VkPSdmYWxzZSddIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IENPTE9SUy51aS5iYWNrZ3JvdW5kIH07XG5cdFx0XHRib3gtc2hhZG93OiAwIDAgMCAycHggJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0XHR9XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBCdXR0b25Db250ZW50VmlldyA9IHN0eWxlZC5kaXZgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGZvbnQtc2l6ZTogJHsgQ09ORklHLmZvbnRTaXplIH07XG5cdGxpbmUtaGVpZ2h0OiAxO1xuYDtcblxuY29uc3QgaXNJY29uU3R5bGVzID0gKCB7XG5cdHNpemUgPSAnZGVmYXVsdCcsXG59OiBQaWNrPCBUb2dnbGVHcm91cENvbnRyb2xQcm9wcywgJ3NpemUnID4gKSA9PiB7XG5cdGNvbnN0IGljb25CdXR0b25TaXplcyA9IHtcblx0XHRkZWZhdWx0OiAnMzRweCcsXG5cdFx0J19fdW5zdGFibGUtbGFyZ2UnOiAnMzhweCcsXG5cdH07XG5cblx0cmV0dXJuIGNzc2Bcblx0XHRoZWlnaHQ6ICR7IGljb25CdXR0b25TaXplc1sgc2l6ZSBdIH07XG5cdFx0YXNwZWN0LXJhdGlvOiAxO1xuXHRcdHBhZGRpbmctbGVmdDogMDtcblx0XHRwYWRkaW5nLXJpZ2h0OiAwO1xuXHRgO1xufTtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__11
  };
  var buttonView = ({
    isDeselectable,
    isIcon,
    isPressed,
    size: size3
  }) => /* @__PURE__ */ css("align-items:center;appearance:none;background:transparent;border:none;border-radius:", config_values_default.radiusXSmall, ";color:", COLORS.theme.gray[700], ";fill:currentColor;cursor:pointer;display:flex;font-family:inherit;height:100%;justify-content:center;line-height:100%;outline:none;padding:0 12px;position:relative;text-align:center;@media not ( prefers-reduced-motion ){transition:color ", config_values_default.transitionDurationFast, " linear,font-weight 60ms linear;}user-select:none;width:100%;z-index:2;&::-moz-focus-inner{border:0;}&[disabled],&[aria-disabled='true']{opacity:0.4;cursor:default;}&:hover:not( [disabled] ):not( [aria-disabled='true'] ){color:", COLORS.theme.foreground, ";}", isDeselectable && deselectable, " ", isIcon && isIconStyles({
    size: size3
  }), " ", isPressed && pressed, ";" + (false ? "" : ";label:buttonView;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrQ1ciLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT05GSUcsIENPTE9SUyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHtcblx0VG9nZ2xlR3JvdXBDb250cm9sUHJvcHMsXG5cdFRvZ2dsZUdyb3VwQ29udHJvbE9wdGlvbkJhc2VQcm9wcyxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuXG5leHBvcnQgY29uc3QgTGFiZWxWaWV3ID0gc3R5bGVkLmRpdmBcblx0ZGlzcGxheTogaW5saW5lLWZsZXg7XG5cdG1heC13aWR0aDogMTAwJTtcblx0bWluLXdpZHRoOiAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5gO1xuXG5leHBvcnQgY29uc3QgbGFiZWxCbG9jayA9IGNzc2Bcblx0ZmxleDogMTtcbmA7XG5cbmV4cG9ydCBjb25zdCBidXR0b25WaWV3ID0gKCB7XG5cdGlzRGVzZWxlY3RhYmxlLFxuXHRpc0ljb24sXG5cdGlzUHJlc3NlZCxcblx0c2l6ZSxcbn06IFBpY2s8IFRvZ2dsZUdyb3VwQ29udHJvbFByb3BzLCAnaXNEZXNlbGVjdGFibGUnIHwgJ3NpemUnID4gJlxuXHRQaWNrPCBUb2dnbGVHcm91cENvbnRyb2xPcHRpb25CYXNlUHJvcHMsICdpc0ljb24nID4gJiB7XG5cdFx0aXNQcmVzc2VkPzogYm9vbGVhbjtcblx0fSApID0+IGNzc2Bcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0YXBwZWFyYW5jZTogbm9uZTtcblx0YmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cdGJvcmRlcjogbm9uZTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1hTbWFsbCB9O1xuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmdyYXlbIDcwMCBdIH07XG5cdGZpbGw6IGN1cnJlbnRDb2xvcjtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRmb250LWZhbWlseTogaW5oZXJpdDtcblx0aGVpZ2h0OiAxMDAlO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0bGluZS1oZWlnaHQ6IDEwMCU7XG5cdG91dGxpbmU6IG5vbmU7XG5cdHBhZGRpbmc6IDAgMTJweDtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdHRyYW5zaXRpb246XG5cdFx0XHRjb2xvciAkeyBDT05GSUcudHJhbnNpdGlvbkR1cmF0aW9uRmFzdCB9IGxpbmVhcixcblx0XHRcdGZvbnQtd2VpZ2h0IDYwbXMgbGluZWFyO1xuXHR9XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHR3aWR0aDogMTAwJTtcblx0ei1pbmRleDogMjtcblxuXHQmOjotbW96LWZvY3VzLWlubmVyIHtcblx0XHRib3JkZXI6IDA7XG5cdH1cblxuXHQmW2Rpc2FibGVkXSxcblx0JlthcmlhLWRpc2FibGVkPSd0cnVlJ10ge1xuXHRcdG9wYWNpdHk6IDAuNDtcblx0XHRjdXJzb3I6IGRlZmF1bHQ7XG5cdH1cblxuXHQmOmhvdmVyOm5vdCggW2Rpc2FibGVkXSApOm5vdCggW2FyaWEtZGlzYWJsZWQ9J3RydWUnXSApIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0fVxuXG5cdCR7IGlzRGVzZWxlY3RhYmxlICYmIGRlc2VsZWN0YWJsZSB9XG5cdCR7IGlzSWNvbiAmJiBpc0ljb25TdHlsZXMoIHsgc2l6ZSB9ICkgfVxuXHQkeyBpc1ByZXNzZWQgJiYgcHJlc3NlZCB9XG5gO1xuXG5jb25zdCBwcmVzc2VkID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5gO1xuXG5jb25zdCBkZXNlbGVjdGFibGUgPSBjc3NgXG5cdCY6Zm9jdXMge1xuXHRcdG91dGxpbmU6ICR7IENPTkZJRy5ib3JkZXJXaWR0aEZvY3VzIH0gc29saWQgJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0b3V0bGluZS1vZmZzZXQ6IDJweDtcblxuXHRcdC8vIEhpZGUgb3ZlcmxhcHBpbmcgYm9yZGVyXG5cdFx0JlthcmlhLXByZXNzZWQ9J2ZhbHNlJ10ge1xuXHRcdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0XHRcdGJveC1zaGFkb3c6IDAgMCAwIDJweCAkeyBDT0xPUlMudWkuYmFja2dyb3VuZCB9O1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEJ1dHRvbkNvbnRlbnRWaWV3ID0gc3R5bGVkLmRpdmBcblx0ZGlzcGxheTogZmxleDtcblx0Zm9udC1zaXplOiAkeyBDT05GSUcuZm9udFNpemUgfTtcblx0bGluZS1oZWlnaHQ6IDE7XG5gO1xuXG5jb25zdCBpc0ljb25TdHlsZXMgPSAoIHtcblx0c2l6ZSA9ICdkZWZhdWx0Jyxcbn06IFBpY2s8IFRvZ2dsZUdyb3VwQ29udHJvbFByb3BzLCAnc2l6ZScgPiApID0+IHtcblx0Y29uc3QgaWNvbkJ1dHRvblNpemVzID0ge1xuXHRcdGRlZmF1bHQ6ICczNHB4Jyxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6ICczOHB4Jyxcblx0fTtcblxuXHRyZXR1cm4gY3NzYFxuXHRcdGhlaWdodDogJHsgaWNvbkJ1dHRvblNpemVzWyBzaXplIF0gfTtcblx0XHRhc3BlY3QtcmF0aW86IDE7XG5cdFx0cGFkZGluZy1sZWZ0OiAwO1xuXHRcdHBhZGRpbmctcmlnaHQ6IDA7XG5cdGA7XG59O1xuIl19 */");
  var pressed = /* @__PURE__ */ css("color:", COLORS.theme.foreground, ";font-weight:", config_values_default.fontWeightMedium, ";" + (false ? "" : ";label:pressed;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnRm1CIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09ORklHLCBDT0xPUlMgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7XG5cdFRvZ2dsZUdyb3VwQ29udHJvbFByb3BzLFxuXHRUb2dnbGVHcm91cENvbnRyb2xPcHRpb25CYXNlUHJvcHMsXG59IGZyb20gJy4uL3R5cGVzJztcblxuZXhwb3J0IGNvbnN0IExhYmVsVmlldyA9IHN0eWxlZC5kaXZgXG5cdGRpc3BsYXk6IGlubGluZS1mbGV4O1xuXHRtYXgtd2lkdGg6IDEwMCU7XG5cdG1pbi13aWR0aDogMDtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuYDtcblxuZXhwb3J0IGNvbnN0IGxhYmVsQmxvY2sgPSBjc3NgXG5cdGZsZXg6IDE7XG5gO1xuXG5leHBvcnQgY29uc3QgYnV0dG9uVmlldyA9ICgge1xuXHRpc0Rlc2VsZWN0YWJsZSxcblx0aXNJY29uLFxuXHRpc1ByZXNzZWQsXG5cdHNpemUsXG59OiBQaWNrPCBUb2dnbGVHcm91cENvbnRyb2xQcm9wcywgJ2lzRGVzZWxlY3RhYmxlJyB8ICdzaXplJyA+ICZcblx0UGljazwgVG9nZ2xlR3JvdXBDb250cm9sT3B0aW9uQmFzZVByb3BzLCAnaXNJY29uJyA+ICYge1xuXHRcdGlzUHJlc3NlZD86IGJvb2xlYW47XG5cdH0gKSA9PiBjc3NgXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGFwcGVhcmFuY2U6IG5vbmU7XG5cdGJhY2tncm91bmQ6IHRyYW5zcGFyZW50O1xuXHRib3JkZXI6IG5vbmU7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNYU21hbGwgfTtcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyA3MDAgXSB9O1xuXHRmaWxsOiBjdXJyZW50Q29sb3I7XG5cdGN1cnNvcjogcG9pbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdGhlaWdodDogMTAwJTtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cdGxpbmUtaGVpZ2h0OiAxMDAlO1xuXHRvdXRsaW5lOiBub25lO1xuXHRwYWRkaW5nOiAwIDEycHg7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0dGV4dC1hbGlnbjogY2VudGVyO1xuXHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHR0cmFuc2l0aW9uOlxuXHRcdFx0Y29sb3IgJHsgQ09ORklHLnRyYW5zaXRpb25EdXJhdGlvbkZhc3QgfSBsaW5lYXIsXG5cdFx0XHRmb250LXdlaWdodCA2MG1zIGxpbmVhcjtcblx0fVxuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdHotaW5kZXg6IDI7XG5cblx0Jjo6LW1vei1mb2N1cy1pbm5lciB7XG5cdFx0Ym9yZGVyOiAwO1xuXHR9XG5cblx0JltkaXNhYmxlZF0sXG5cdCZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRvcGFjaXR5OiAwLjQ7XG5cdFx0Y3Vyc29yOiBkZWZhdWx0O1xuXHR9XG5cblx0Jjpob3Zlcjpub3QoIFtkaXNhYmxlZF0gKTpub3QoIFthcmlhLWRpc2FibGVkPSd0cnVlJ10gKSB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdH1cblxuXHQkeyBpc0Rlc2VsZWN0YWJsZSAmJiBkZXNlbGVjdGFibGUgfVxuXHQkeyBpc0ljb24gJiYgaXNJY29uU3R5bGVzKCB7IHNpemUgfSApIH1cblx0JHsgaXNQcmVzc2VkICYmIHByZXNzZWQgfVxuYDtcblxuY29uc3QgcHJlc3NlZCA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdGZvbnQtd2VpZ2h0OiAkeyBDT05GSUcuZm9udFdlaWdodE1lZGl1bSB9O1xuYDtcblxuY29uc3QgZGVzZWxlY3RhYmxlID0gY3NzYFxuXHQmOmZvY3VzIHtcblx0XHRvdXRsaW5lOiAkeyBDT05GSUcuYm9yZGVyV2lkdGhGb2N1cyB9IHNvbGlkICR7IENPTE9SUy51aS5ib3JkZXJGb2N1cyB9O1xuXHRcdG91dGxpbmUtb2Zmc2V0OiAycHg7XG5cblx0XHQvLyBIaWRlIG92ZXJsYXBwaW5nIGJvcmRlclxuXHRcdCZbYXJpYS1wcmVzc2VkPSdmYWxzZSddIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IENPTE9SUy51aS5iYWNrZ3JvdW5kIH07XG5cdFx0XHRib3gtc2hhZG93OiAwIDAgMCAycHggJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0XHR9XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBCdXR0b25Db250ZW50VmlldyA9IHN0eWxlZC5kaXZgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGZvbnQtc2l6ZTogJHsgQ09ORklHLmZvbnRTaXplIH07XG5cdGxpbmUtaGVpZ2h0OiAxO1xuYDtcblxuY29uc3QgaXNJY29uU3R5bGVzID0gKCB7XG5cdHNpemUgPSAnZGVmYXVsdCcsXG59OiBQaWNrPCBUb2dnbGVHcm91cENvbnRyb2xQcm9wcywgJ3NpemUnID4gKSA9PiB7XG5cdGNvbnN0IGljb25CdXR0b25TaXplcyA9IHtcblx0XHRkZWZhdWx0OiAnMzRweCcsXG5cdFx0J19fdW5zdGFibGUtbGFyZ2UnOiAnMzhweCcsXG5cdH07XG5cblx0cmV0dXJuIGNzc2Bcblx0XHRoZWlnaHQ6ICR7IGljb25CdXR0b25TaXplc1sgc2l6ZSBdIH07XG5cdFx0YXNwZWN0LXJhdGlvOiAxO1xuXHRcdHBhZGRpbmctbGVmdDogMDtcblx0XHRwYWRkaW5nLXJpZ2h0OiAwO1xuXHRgO1xufTtcbiJdfQ== */");
  var deselectable = /* @__PURE__ */ css("&:focus{outline:", config_values_default.borderWidthFocus, " solid ", COLORS.ui.borderFocus, ";outline-offset:2px;&[aria-pressed='false']{background:", COLORS.ui.background, ";box-shadow:0 0 0 2px ", COLORS.ui.background, ";}}" + (false ? "" : ";label:deselectable;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxRndCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09ORklHLCBDT0xPUlMgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7XG5cdFRvZ2dsZUdyb3VwQ29udHJvbFByb3BzLFxuXHRUb2dnbGVHcm91cENvbnRyb2xPcHRpb25CYXNlUHJvcHMsXG59IGZyb20gJy4uL3R5cGVzJztcblxuZXhwb3J0IGNvbnN0IExhYmVsVmlldyA9IHN0eWxlZC5kaXZgXG5cdGRpc3BsYXk6IGlubGluZS1mbGV4O1xuXHRtYXgtd2lkdGg6IDEwMCU7XG5cdG1pbi13aWR0aDogMDtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuYDtcblxuZXhwb3J0IGNvbnN0IGxhYmVsQmxvY2sgPSBjc3NgXG5cdGZsZXg6IDE7XG5gO1xuXG5leHBvcnQgY29uc3QgYnV0dG9uVmlldyA9ICgge1xuXHRpc0Rlc2VsZWN0YWJsZSxcblx0aXNJY29uLFxuXHRpc1ByZXNzZWQsXG5cdHNpemUsXG59OiBQaWNrPCBUb2dnbGVHcm91cENvbnRyb2xQcm9wcywgJ2lzRGVzZWxlY3RhYmxlJyB8ICdzaXplJyA+ICZcblx0UGljazwgVG9nZ2xlR3JvdXBDb250cm9sT3B0aW9uQmFzZVByb3BzLCAnaXNJY29uJyA+ICYge1xuXHRcdGlzUHJlc3NlZD86IGJvb2xlYW47XG5cdH0gKSA9PiBjc3NgXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGFwcGVhcmFuY2U6IG5vbmU7XG5cdGJhY2tncm91bmQ6IHRyYW5zcGFyZW50O1xuXHRib3JkZXI6IG5vbmU7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNYU21hbGwgfTtcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyA3MDAgXSB9O1xuXHRmaWxsOiBjdXJyZW50Q29sb3I7XG5cdGN1cnNvcjogcG9pbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdGhlaWdodDogMTAwJTtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cdGxpbmUtaGVpZ2h0OiAxMDAlO1xuXHRvdXRsaW5lOiBub25lO1xuXHRwYWRkaW5nOiAwIDEycHg7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0dGV4dC1hbGlnbjogY2VudGVyO1xuXHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHR0cmFuc2l0aW9uOlxuXHRcdFx0Y29sb3IgJHsgQ09ORklHLnRyYW5zaXRpb25EdXJhdGlvbkZhc3QgfSBsaW5lYXIsXG5cdFx0XHRmb250LXdlaWdodCA2MG1zIGxpbmVhcjtcblx0fVxuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdHotaW5kZXg6IDI7XG5cblx0Jjo6LW1vei1mb2N1cy1pbm5lciB7XG5cdFx0Ym9yZGVyOiAwO1xuXHR9XG5cblx0JltkaXNhYmxlZF0sXG5cdCZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRvcGFjaXR5OiAwLjQ7XG5cdFx0Y3Vyc29yOiBkZWZhdWx0O1xuXHR9XG5cblx0Jjpob3Zlcjpub3QoIFtkaXNhYmxlZF0gKTpub3QoIFthcmlhLWRpc2FibGVkPSd0cnVlJ10gKSB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdH1cblxuXHQkeyBpc0Rlc2VsZWN0YWJsZSAmJiBkZXNlbGVjdGFibGUgfVxuXHQkeyBpc0ljb24gJiYgaXNJY29uU3R5bGVzKCB7IHNpemUgfSApIH1cblx0JHsgaXNQcmVzc2VkICYmIHByZXNzZWQgfVxuYDtcblxuY29uc3QgcHJlc3NlZCA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdGZvbnQtd2VpZ2h0OiAkeyBDT05GSUcuZm9udFdlaWdodE1lZGl1bSB9O1xuYDtcblxuY29uc3QgZGVzZWxlY3RhYmxlID0gY3NzYFxuXHQmOmZvY3VzIHtcblx0XHRvdXRsaW5lOiAkeyBDT05GSUcuYm9yZGVyV2lkdGhGb2N1cyB9IHNvbGlkICR7IENPTE9SUy51aS5ib3JkZXJGb2N1cyB9O1xuXHRcdG91dGxpbmUtb2Zmc2V0OiAycHg7XG5cblx0XHQvLyBIaWRlIG92ZXJsYXBwaW5nIGJvcmRlclxuXHRcdCZbYXJpYS1wcmVzc2VkPSdmYWxzZSddIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IENPTE9SUy51aS5iYWNrZ3JvdW5kIH07XG5cdFx0XHRib3gtc2hhZG93OiAwIDAgMCAycHggJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0XHR9XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBCdXR0b25Db250ZW50VmlldyA9IHN0eWxlZC5kaXZgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGZvbnQtc2l6ZTogJHsgQ09ORklHLmZvbnRTaXplIH07XG5cdGxpbmUtaGVpZ2h0OiAxO1xuYDtcblxuY29uc3QgaXNJY29uU3R5bGVzID0gKCB7XG5cdHNpemUgPSAnZGVmYXVsdCcsXG59OiBQaWNrPCBUb2dnbGVHcm91cENvbnRyb2xQcm9wcywgJ3NpemUnID4gKSA9PiB7XG5cdGNvbnN0IGljb25CdXR0b25TaXplcyA9IHtcblx0XHRkZWZhdWx0OiAnMzRweCcsXG5cdFx0J19fdW5zdGFibGUtbGFyZ2UnOiAnMzhweCcsXG5cdH07XG5cblx0cmV0dXJuIGNzc2Bcblx0XHRoZWlnaHQ6ICR7IGljb25CdXR0b25TaXplc1sgc2l6ZSBdIH07XG5cdFx0YXNwZWN0LXJhdGlvOiAxO1xuXHRcdHBhZGRpbmctbGVmdDogMDtcblx0XHRwYWRkaW5nLXJpZ2h0OiAwO1xuXHRgO1xufTtcbiJdfQ== */");
  var ButtonContentView = /* @__PURE__ */ createStyled("div", false ? {
    target: "et6ln9s0"
  } : {
    target: "et6ln9s0",
    label: "ButtonContentView"
  })("display:flex;font-size:", config_values_default.fontSize, ";line-height:1;" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrRzJDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09ORklHLCBDT0xPUlMgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7XG5cdFRvZ2dsZUdyb3VwQ29udHJvbFByb3BzLFxuXHRUb2dnbGVHcm91cENvbnRyb2xPcHRpb25CYXNlUHJvcHMsXG59IGZyb20gJy4uL3R5cGVzJztcblxuZXhwb3J0IGNvbnN0IExhYmVsVmlldyA9IHN0eWxlZC5kaXZgXG5cdGRpc3BsYXk6IGlubGluZS1mbGV4O1xuXHRtYXgtd2lkdGg6IDEwMCU7XG5cdG1pbi13aWR0aDogMDtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuYDtcblxuZXhwb3J0IGNvbnN0IGxhYmVsQmxvY2sgPSBjc3NgXG5cdGZsZXg6IDE7XG5gO1xuXG5leHBvcnQgY29uc3QgYnV0dG9uVmlldyA9ICgge1xuXHRpc0Rlc2VsZWN0YWJsZSxcblx0aXNJY29uLFxuXHRpc1ByZXNzZWQsXG5cdHNpemUsXG59OiBQaWNrPCBUb2dnbGVHcm91cENvbnRyb2xQcm9wcywgJ2lzRGVzZWxlY3RhYmxlJyB8ICdzaXplJyA+ICZcblx0UGljazwgVG9nZ2xlR3JvdXBDb250cm9sT3B0aW9uQmFzZVByb3BzLCAnaXNJY29uJyA+ICYge1xuXHRcdGlzUHJlc3NlZD86IGJvb2xlYW47XG5cdH0gKSA9PiBjc3NgXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGFwcGVhcmFuY2U6IG5vbmU7XG5cdGJhY2tncm91bmQ6IHRyYW5zcGFyZW50O1xuXHRib3JkZXI6IG5vbmU7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNYU21hbGwgfTtcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyA3MDAgXSB9O1xuXHRmaWxsOiBjdXJyZW50Q29sb3I7XG5cdGN1cnNvcjogcG9pbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdGhlaWdodDogMTAwJTtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cdGxpbmUtaGVpZ2h0OiAxMDAlO1xuXHRvdXRsaW5lOiBub25lO1xuXHRwYWRkaW5nOiAwIDEycHg7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0dGV4dC1hbGlnbjogY2VudGVyO1xuXHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHR0cmFuc2l0aW9uOlxuXHRcdFx0Y29sb3IgJHsgQ09ORklHLnRyYW5zaXRpb25EdXJhdGlvbkZhc3QgfSBsaW5lYXIsXG5cdFx0XHRmb250LXdlaWdodCA2MG1zIGxpbmVhcjtcblx0fVxuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdHotaW5kZXg6IDI7XG5cblx0Jjo6LW1vei1mb2N1cy1pbm5lciB7XG5cdFx0Ym9yZGVyOiAwO1xuXHR9XG5cblx0JltkaXNhYmxlZF0sXG5cdCZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRvcGFjaXR5OiAwLjQ7XG5cdFx0Y3Vyc29yOiBkZWZhdWx0O1xuXHR9XG5cblx0Jjpob3Zlcjpub3QoIFtkaXNhYmxlZF0gKTpub3QoIFthcmlhLWRpc2FibGVkPSd0cnVlJ10gKSB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdH1cblxuXHQkeyBpc0Rlc2VsZWN0YWJsZSAmJiBkZXNlbGVjdGFibGUgfVxuXHQkeyBpc0ljb24gJiYgaXNJY29uU3R5bGVzKCB7IHNpemUgfSApIH1cblx0JHsgaXNQcmVzc2VkICYmIHByZXNzZWQgfVxuYDtcblxuY29uc3QgcHJlc3NlZCA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdGZvbnQtd2VpZ2h0OiAkeyBDT05GSUcuZm9udFdlaWdodE1lZGl1bSB9O1xuYDtcblxuY29uc3QgZGVzZWxlY3RhYmxlID0gY3NzYFxuXHQmOmZvY3VzIHtcblx0XHRvdXRsaW5lOiAkeyBDT05GSUcuYm9yZGVyV2lkdGhGb2N1cyB9IHNvbGlkICR7IENPTE9SUy51aS5ib3JkZXJGb2N1cyB9O1xuXHRcdG91dGxpbmUtb2Zmc2V0OiAycHg7XG5cblx0XHQvLyBIaWRlIG92ZXJsYXBwaW5nIGJvcmRlclxuXHRcdCZbYXJpYS1wcmVzc2VkPSdmYWxzZSddIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IENPTE9SUy51aS5iYWNrZ3JvdW5kIH07XG5cdFx0XHRib3gtc2hhZG93OiAwIDAgMCAycHggJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0XHR9XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBCdXR0b25Db250ZW50VmlldyA9IHN0eWxlZC5kaXZgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGZvbnQtc2l6ZTogJHsgQ09ORklHLmZvbnRTaXplIH07XG5cdGxpbmUtaGVpZ2h0OiAxO1xuYDtcblxuY29uc3QgaXNJY29uU3R5bGVzID0gKCB7XG5cdHNpemUgPSAnZGVmYXVsdCcsXG59OiBQaWNrPCBUb2dnbGVHcm91cENvbnRyb2xQcm9wcywgJ3NpemUnID4gKSA9PiB7XG5cdGNvbnN0IGljb25CdXR0b25TaXplcyA9IHtcblx0XHRkZWZhdWx0OiAnMzRweCcsXG5cdFx0J19fdW5zdGFibGUtbGFyZ2UnOiAnMzhweCcsXG5cdH07XG5cblx0cmV0dXJuIGNzc2Bcblx0XHRoZWlnaHQ6ICR7IGljb25CdXR0b25TaXplc1sgc2l6ZSBdIH07XG5cdFx0YXNwZWN0LXJhdGlvOiAxO1xuXHRcdHBhZGRpbmctbGVmdDogMDtcblx0XHRwYWRkaW5nLXJpZ2h0OiAwO1xuXHRgO1xufTtcbiJdfQ== */"));
  var isIconStyles = ({
    size: size3 = "default"
  }) => {
    const iconButtonSizes = {
      default: "34px",
      "__unstable-large": "38px"
    };
    return /* @__PURE__ */ css("height:", iconButtonSizes[size3], ";aspect-ratio:1;padding-left:0;padding-right:0;" + (false ? "" : ";label:isIconStyles;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnSFciLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT05GSUcsIENPTE9SUyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHtcblx0VG9nZ2xlR3JvdXBDb250cm9sUHJvcHMsXG5cdFRvZ2dsZUdyb3VwQ29udHJvbE9wdGlvbkJhc2VQcm9wcyxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuXG5leHBvcnQgY29uc3QgTGFiZWxWaWV3ID0gc3R5bGVkLmRpdmBcblx0ZGlzcGxheTogaW5saW5lLWZsZXg7XG5cdG1heC13aWR0aDogMTAwJTtcblx0bWluLXdpZHRoOiAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5gO1xuXG5leHBvcnQgY29uc3QgbGFiZWxCbG9jayA9IGNzc2Bcblx0ZmxleDogMTtcbmA7XG5cbmV4cG9ydCBjb25zdCBidXR0b25WaWV3ID0gKCB7XG5cdGlzRGVzZWxlY3RhYmxlLFxuXHRpc0ljb24sXG5cdGlzUHJlc3NlZCxcblx0c2l6ZSxcbn06IFBpY2s8IFRvZ2dsZUdyb3VwQ29udHJvbFByb3BzLCAnaXNEZXNlbGVjdGFibGUnIHwgJ3NpemUnID4gJlxuXHRQaWNrPCBUb2dnbGVHcm91cENvbnRyb2xPcHRpb25CYXNlUHJvcHMsICdpc0ljb24nID4gJiB7XG5cdFx0aXNQcmVzc2VkPzogYm9vbGVhbjtcblx0fSApID0+IGNzc2Bcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0YXBwZWFyYW5jZTogbm9uZTtcblx0YmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cdGJvcmRlcjogbm9uZTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1hTbWFsbCB9O1xuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmdyYXlbIDcwMCBdIH07XG5cdGZpbGw6IGN1cnJlbnRDb2xvcjtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRmb250LWZhbWlseTogaW5oZXJpdDtcblx0aGVpZ2h0OiAxMDAlO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0bGluZS1oZWlnaHQ6IDEwMCU7XG5cdG91dGxpbmU6IG5vbmU7XG5cdHBhZGRpbmc6IDAgMTJweDtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdHRyYW5zaXRpb246XG5cdFx0XHRjb2xvciAkeyBDT05GSUcudHJhbnNpdGlvbkR1cmF0aW9uRmFzdCB9IGxpbmVhcixcblx0XHRcdGZvbnQtd2VpZ2h0IDYwbXMgbGluZWFyO1xuXHR9XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHR3aWR0aDogMTAwJTtcblx0ei1pbmRleDogMjtcblxuXHQmOjotbW96LWZvY3VzLWlubmVyIHtcblx0XHRib3JkZXI6IDA7XG5cdH1cblxuXHQmW2Rpc2FibGVkXSxcblx0JlthcmlhLWRpc2FibGVkPSd0cnVlJ10ge1xuXHRcdG9wYWNpdHk6IDAuNDtcblx0XHRjdXJzb3I6IGRlZmF1bHQ7XG5cdH1cblxuXHQmOmhvdmVyOm5vdCggW2Rpc2FibGVkXSApOm5vdCggW2FyaWEtZGlzYWJsZWQ9J3RydWUnXSApIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0fVxuXG5cdCR7IGlzRGVzZWxlY3RhYmxlICYmIGRlc2VsZWN0YWJsZSB9XG5cdCR7IGlzSWNvbiAmJiBpc0ljb25TdHlsZXMoIHsgc2l6ZSB9ICkgfVxuXHQkeyBpc1ByZXNzZWQgJiYgcHJlc3NlZCB9XG5gO1xuXG5jb25zdCBwcmVzc2VkID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5gO1xuXG5jb25zdCBkZXNlbGVjdGFibGUgPSBjc3NgXG5cdCY6Zm9jdXMge1xuXHRcdG91dGxpbmU6ICR7IENPTkZJRy5ib3JkZXJXaWR0aEZvY3VzIH0gc29saWQgJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0b3V0bGluZS1vZmZzZXQ6IDJweDtcblxuXHRcdC8vIEhpZGUgb3ZlcmxhcHBpbmcgYm9yZGVyXG5cdFx0JlthcmlhLXByZXNzZWQ9J2ZhbHNlJ10ge1xuXHRcdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0XHRcdGJveC1zaGFkb3c6IDAgMCAwIDJweCAkeyBDT0xPUlMudWkuYmFja2dyb3VuZCB9O1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEJ1dHRvbkNvbnRlbnRWaWV3ID0gc3R5bGVkLmRpdmBcblx0ZGlzcGxheTogZmxleDtcblx0Zm9udC1zaXplOiAkeyBDT05GSUcuZm9udFNpemUgfTtcblx0bGluZS1oZWlnaHQ6IDE7XG5gO1xuXG5jb25zdCBpc0ljb25TdHlsZXMgPSAoIHtcblx0c2l6ZSA9ICdkZWZhdWx0Jyxcbn06IFBpY2s8IFRvZ2dsZUdyb3VwQ29udHJvbFByb3BzLCAnc2l6ZScgPiApID0+IHtcblx0Y29uc3QgaWNvbkJ1dHRvblNpemVzID0ge1xuXHRcdGRlZmF1bHQ6ICczNHB4Jyxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6ICczOHB4Jyxcblx0fTtcblxuXHRyZXR1cm4gY3NzYFxuXHRcdGhlaWdodDogJHsgaWNvbkJ1dHRvblNpemVzWyBzaXplIF0gfTtcblx0XHRhc3BlY3QtcmF0aW86IDE7XG5cdFx0cGFkZGluZy1sZWZ0OiAwO1xuXHRcdHBhZGRpbmctcmlnaHQ6IDA7XG5cdGA7XG59O1xuIl19 */");
  };

  // packages/components/build-module/toggle-group-control/toggle-group-control-option-base/component.mjs
  var import_jsx_runtime117 = __toESM(require_jsx_runtime(), 1);
  var {
    ButtonContentView: ButtonContentView2,
    LabelView: LabelView2
  } = styles_exports6;
  var WithToolTip = ({
    showTooltip,
    text,
    children
  }) => {
    if (showTooltip && text) {
      return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(tooltip_default, {
        text,
        placement: "top",
        children
      });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_jsx_runtime117.Fragment, {
      children
    });
  };
  function ToggleGroupControlOptionBase(props, forwardedRef) {
    const toggleGroupControlContext = useToggleGroupControlContext();
    const id3 = (0, import_compose26.useInstanceId)(ToggleGroupControlOptionBase, toggleGroupControlContext.baseId || "toggle-group-control-option-base");
    const buttonProps = useContextSystem({
      ...props,
      id: id3
    }, "ToggleGroupControlOptionBase");
    const {
      isBlock = false,
      isDeselectable = false,
      size: size3 = "default"
    } = toggleGroupControlContext;
    const {
      className: className2,
      isIcon = false,
      value,
      children,
      showTooltip = false,
      disabled,
      ...otherButtonProps
    } = buttonProps;
    const isPressed = toggleGroupControlContext.value === value;
    const cx3 = useCx();
    const labelViewClasses = (0, import_element63.useMemo)(() => cx3(isBlock && labelBlock), [cx3, isBlock]);
    const itemClasses = (0, import_element63.useMemo)(() => cx3(buttonView({
      isDeselectable,
      isIcon,
      isPressed,
      size: size3
    }), className2), [cx3, isDeselectable, isIcon, isPressed, size3, className2]);
    const buttonOnClick = () => {
      if (isDeselectable && isPressed) {
        toggleGroupControlContext.setValue(void 0);
      } else {
        toggleGroupControlContext.setValue(value);
      }
    };
    const commonProps = {
      ...otherButtonProps,
      className: itemClasses,
      "data-value": value,
      ref: forwardedRef
    };
    const labelRef = (0, import_element63.useRef)(null);
    (0, import_element63.useLayoutEffect)(() => {
      if (isPressed && labelRef.current) {
        toggleGroupControlContext.setSelectedElement(labelRef.current);
      }
    }, [isPressed, toggleGroupControlContext]);
    return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(LabelView2, {
      ref: labelRef,
      className: labelViewClasses,
      children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(WithToolTip, {
        showTooltip,
        text: otherButtonProps["aria-label"],
        children: isDeselectable ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("button", {
          ...commonProps,
          disabled,
          "aria-pressed": isPressed,
          type: "button",
          onClick: buttonOnClick,
          children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(ButtonContentView2, {
            children
          })
        }) : /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Radio, {
          disabled,
          onFocusVisible: () => {
            const selectedValueIsEmpty = toggleGroupControlContext.value === null || toggleGroupControlContext.value === "";
            if (!selectedValueIsEmpty || toggleGroupControlContext.activeItemIsNotFirstItem?.()) {
              toggleGroupControlContext.setValue(value);
            }
          },
          render: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("button", {
            type: "button",
            ...commonProps
          }),
          value,
          children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(ButtonContentView2, {
            children
          })
        })
      })
    });
  }
  var ConnectedToggleGroupControlOptionBase = contextConnect(ToggleGroupControlOptionBase, "ToggleGroupControlOptionBase");
  var component_default13 = ConnectedToggleGroupControlOptionBase;

  // packages/components/build-module/toggle-group-control/toggle-group-control-option/component.mjs
  var import_jsx_runtime118 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedToggleGroupControlOption(props, ref) {
    const {
      label,
      ...restProps
    } = props;
    const optionLabel = restProps["aria-label"] || label;
    return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(component_default13, {
      ...restProps,
      "aria-label": optionLabel,
      ref,
      children: label
    });
  }
  var ToggleGroupControlOption = (0, import_element64.forwardRef)(UnforwardedToggleGroupControlOption);
  ToggleGroupControlOption.displayName = "ToggleGroupControlOption";
  var component_default14 = ToggleGroupControlOption;

  // packages/components/build-module/toggle-group-control/toggle-group-control-option-icon/component.mjs
  var import_element65 = __toESM(require_element(), 1);
  var import_jsx_runtime119 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedToggleGroupControlOptionIcon(props, ref) {
    const {
      icon,
      label,
      ...restProps
    } = props;
    return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(component_default13, {
      ...restProps,
      isIcon: true,
      "aria-label": label,
      showTooltip: true,
      ref,
      children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(icon_default3, {
        icon
      })
    });
  }
  var ToggleGroupControlOptionIcon = (0, import_element65.forwardRef)(UnforwardedToggleGroupControlOptionIcon);
  ToggleGroupControlOptionIcon.displayName = "ToggleGroupControlOptionIcon";
  var component_default15 = ToggleGroupControlOptionIcon;

  // packages/components/build-module/border-control/border-control-style-picker/component.mjs
  var import_jsx_runtime120 = __toESM(require_jsx_runtime(), 1);
  var BORDER_STYLES = [{
    label: (0, import_i18n11.__)("Solid"),
    icon: line_solid_default,
    value: "solid"
  }, {
    label: (0, import_i18n11.__)("Dashed"),
    icon: line_dashed_default,
    value: "dashed"
  }, {
    label: (0, import_i18n11.__)("Dotted"),
    icon: line_dotted_default,
    value: "dotted"
  }];
  function UnconnectedBorderControlStylePicker({
    onChange,
    ...restProps
  }, forwardedRef) {
    return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(component_default12, {
      __next40pxDefaultSize: true,
      ref: forwardedRef,
      isDeselectable: true,
      onChange: (value) => {
        onChange?.(value);
      },
      ...restProps,
      children: BORDER_STYLES.map((borderStyle) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(component_default15, {
        value: borderStyle.value,
        icon: borderStyle.icon,
        label: borderStyle.label
      }, borderStyle.value))
    });
  }
  var BorderControlStylePicker = contextConnect(UnconnectedBorderControlStylePicker, "BorderControlStylePicker");
  var component_default16 = BorderControlStylePicker;

  // packages/components/build-module/color-indicator/index.mjs
  var import_element66 = __toESM(require_element(), 1);
  var import_jsx_runtime121 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedColorIndicator(props, forwardedRef) {
    const {
      className: className2,
      colorValue,
      ...additionalProps
    } = props;
    return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", {
      className: clsx_default("component-color-indicator", className2),
      style: {
        background: colorValue
      },
      ref: forwardedRef,
      ...additionalProps
    });
  }
  var ColorIndicator = (0, import_element66.forwardRef)(UnforwardedColorIndicator);
  ColorIndicator.displayName = "ColorIndicator";
  var color_indicator_default = ColorIndicator;

  // node_modules/colord/plugins/a11y.mjs
  var o2 = function(o4) {
    var t4 = o4 / 255;
    return t4 < 0.04045 ? t4 / 12.92 : Math.pow((t4 + 0.055) / 1.055, 2.4);
  };
  var t2 = function(t4) {
    return 0.2126 * o2(t4.r) + 0.7152 * o2(t4.g) + 0.0722 * o2(t4.b);
  };
  function a11y_default(o4) {
    o4.prototype.luminance = function() {
      return o5 = t2(this.rgba), void 0 === (r4 = 2) && (r4 = 0), void 0 === n3 && (n3 = Math.pow(10, r4)), Math.round(n3 * o5) / n3 + 0;
      var o5, r4, n3;
    }, o4.prototype.contrast = function(r4) {
      void 0 === r4 && (r4 = "#FFF");
      var n3, a3, i3, e3, v3, u3, d3, c3 = r4 instanceof o4 ? r4 : new o4(r4);
      return e3 = this.rgba, v3 = c3.toRgb(), u3 = t2(e3), d3 = t2(v3), n3 = u3 > d3 ? (u3 + 0.05) / (d3 + 0.05) : (d3 + 0.05) / (u3 + 0.05), void 0 === (a3 = 2) && (a3 = 0), void 0 === i3 && (i3 = Math.pow(10, a3)), Math.floor(i3 * n3) / i3 + 0;
    }, o4.prototype.isReadable = function(o5, t4) {
      return void 0 === o5 && (o5 = "#FFF"), void 0 === t4 && (t4 = {}), this.contrast(o5) >= (e3 = void 0 === (i3 = (r4 = t4).size) ? "normal" : i3, "AAA" === (a3 = void 0 === (n3 = r4.level) ? "AA" : n3) && "normal" === e3 ? 7 : "AA" === a3 && "large" === e3 ? 3 : 4.5);
      var r4, n3, a3, i3, e3;
    };
  }

  // packages/components/build-module/color-palette/index.mjs
  var import_compose34 = __toESM(require_compose(), 1);
  var import_i18n20 = __toESM(require_i18n(), 1);
  var import_element81 = __toESM(require_element(), 1);

  // packages/components/build-module/dropdown/index.mjs
  var import_element67 = __toESM(require_element(), 1);
  var import_compose27 = __toESM(require_compose(), 1);
  var import_deprecated7 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime122 = __toESM(require_jsx_runtime(), 1);
  var UnconnectedDropdown = (props, forwardedRef) => {
    const {
      renderContent,
      renderToggle,
      className: className2,
      contentClassName,
      expandOnMobile,
      headerTitle,
      focusOnMount,
      popoverProps,
      onClose,
      onToggle,
      style: style2,
      open,
      defaultOpen,
      // Deprecated props
      position: position2,
      // From context system
      variant
    } = useContextSystem(props, "Dropdown");
    if (position2 !== void 0) {
      (0, import_deprecated7.default)("`position` prop in wp.components.Dropdown", {
        since: "6.2",
        alternative: "`popoverProps.placement` prop",
        hint: "Note that the `position` prop will override any values passed through the `popoverProps.placement` prop."
      });
    }
    const [fallbackPopoverAnchor, setFallbackPopoverAnchor] = (0, import_element67.useState)(null);
    const containerRef = (0, import_element67.useRef)(null);
    const [isOpen, setIsOpen] = useControlledValue({
      defaultValue: defaultOpen,
      value: open,
      onChange: onToggle
    });
    function closeIfFocusOutside() {
      if (!containerRef.current) {
        return;
      }
      const {
        ownerDocument
      } = containerRef.current;
      const dialog = ownerDocument?.activeElement?.closest('[role="dialog"]');
      if (!containerRef.current.contains(ownerDocument.activeElement) && (!dialog || dialog.contains(containerRef.current))) {
        close();
      }
    }
    function close() {
      onClose?.();
      setIsOpen(false);
    }
    const args = {
      isOpen: !!isOpen,
      onToggle: () => setIsOpen(!isOpen),
      onClose: close
    };
    const popoverPropsHaveAnchor = !!popoverProps?.anchor || // Note: `anchorRef`, `getAnchorRect` and `anchorRect` are deprecated and
    // be removed from `Popover` from WordPress 6.3
    !!popoverProps?.anchorRef || !!popoverProps?.getAnchorRect || !!popoverProps?.anchorRect;
    return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("div", {
      className: className2,
      ref: (0, import_compose27.useMergeRefs)([containerRef, forwardedRef, setFallbackPopoverAnchor]),
      tabIndex: -1,
      style: style2,
      children: [renderToggle(args), isOpen && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(popover_default, {
        position: position2,
        onClose: close,
        onFocusOutside: closeIfFocusOutside,
        expandOnMobile,
        headerTitle,
        focusOnMount,
        offset: 13,
        anchor: !popoverPropsHaveAnchor ? fallbackPopoverAnchor : void 0,
        variant,
        ...popoverProps,
        className: clsx_default("components-dropdown__content", popoverProps?.className, contentClassName),
        children: renderContent(args)
      })]
    });
  };
  var Dropdown = contextConnect(UnconnectedDropdown, "Dropdown");
  var dropdown_default = Dropdown;

  // packages/components/build-module/color-picker/component.mjs
  var import_element76 = __toESM(require_element(), 1);
  var import_compose31 = __toESM(require_compose(), 1);
  var import_i18n16 = __toESM(require_i18n(), 1);

  // packages/components/build-module/select-control/index.mjs
  var import_compose28 = __toESM(require_compose(), 1);
  var import_element68 = __toESM(require_element(), 1);

  // packages/components/build-module/select-control/styles/select-control-styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__12() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var disabledStyles2 = ({
    disabled
  }) => {
    if (!disabled) {
      return "";
    }
    return /* @__PURE__ */ css("color:", COLORS.ui.textDisabled, ";cursor:default;" + (false ? "" : ";label:disabledStyles;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNlbGVjdC1jb250cm9sLXN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUErQlciLCJmaWxlIjoic2VsZWN0LWNvbnRyb2wtc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIHJ0bCwgQ09ORklHIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi8uLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgdHlwZSB7IFNlbGVjdENvbnRyb2xQcm9wcyB9IGZyb20gJy4uL3R5cGVzJztcbmltcG9ydCBJbnB1dENvbnRyb2xTdWZmaXhXcmFwcGVyIGZyb20gJy4uLy4uL2lucHV0LWNvbnRyb2wvaW5wdXQtc3VmZml4LXdyYXBwZXInO1xuaW1wb3J0IHsgZm9udFNpemVTdHlsZXMgfSBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL3N0eWxlcy9pbnB1dC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgSW5wdXRCYXNlIGZyb20gJy4uLy4uL2lucHV0LWNvbnRyb2wvaW5wdXQtYmFzZSc7XG5cbmludGVyZmFjZSBTZWxlY3RQcm9wc1xuXHRleHRlbmRzIFBpY2s8XG5cdFx0U2VsZWN0Q29udHJvbFByb3BzLFxuXHRcdCdfX25leHQ0MHB4RGVmYXVsdFNpemUnIHwgJ2Rpc2FibGVkJyB8ICdtdWx0aXBsZScgfCAndmFyaWFudCdcblx0PiB7XG5cdC8vIFVzaW5nIGBzZWxlY3RTaXplYCBpbnN0ZWFkIG9mIGBzaXplYCB0byBhdm9pZCBhIHR5cGUgY29uZmxpY3Qgd2l0aCB0aGVcblx0Ly8gYHNpemVgIEhUTUwgYXR0cmlidXRlIG9mIHRoZSBgc2VsZWN0YCBlbGVtZW50LlxuXHRzZWxlY3RTaXplPzogU2VsZWN0Q29udHJvbFByb3BzWyAnc2l6ZScgXTtcbn1cblxuY29uc3QgZGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogU2VsZWN0UHJvcHMgKSA9PiB7XG5cdGlmICggISBkaXNhYmxlZCApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdGNvbG9yOiAkeyBDT0xPUlMudWkudGV4dERpc2FibGVkIH07XG5cdFx0Y3Vyc29yOiBkZWZhdWx0O1xuXHRgO1xufTtcblxuY29uc3QgaW5wdXRCYXNlVmFyaWFudFN0eWxlcyA9ICggeyB2YXJpYW50IH06IFNlbGVjdFByb3BzICkgPT4ge1xuXHRpZiAoIHZhcmlhbnQgPT09ICdtaW5pbWFsJyApIHtcblx0XHRyZXR1cm4gY3NzYFxuXHRcdFx0ZGlzcGxheTogaW5saW5lLWZsZXg7XG5cdFx0YDtcblx0fVxuXG5cdHJldHVybiAnJztcbn07XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRJbnB1dEJhc2UgPSBzdHlsZWQoIElucHV0QmFzZSApYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXG5cdCR7IGRpc2FibGVkU3R5bGVzIH1cblx0JHsgaW5wdXRCYXNlVmFyaWFudFN0eWxlcyB9XG5gO1xuXG5jb25zdCBzaXplU3R5bGVzID0gKCB7XG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0bXVsdGlwbGUsXG5cdHNlbGVjdFNpemUgPSAnZGVmYXVsdCcsXG59OiBTZWxlY3RQcm9wcyApID0+IHtcblx0aWYgKCBtdWx0aXBsZSApIHtcblx0XHQvLyBXaGVuIGBtdWx0aXBsZWAsIGp1c3QgdXNlIHRoZSBuYXRpdmUgYnJvd3NlciBzdHlsZXNcblx0XHQvLyB3aXRob3V0IHNldHRpbmcgZXhwbGljaXQgaGVpZ2h0LlxuXHRcdHJldHVybjtcblx0fVxuXG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRtaW5IZWlnaHQ6IDQwLFxuXHRcdFx0cGFkZGluZ1RvcDogMCxcblx0XHRcdHBhZGRpbmdCb3R0b206IDAsXG5cdFx0fSxcblx0XHRzbWFsbDoge1xuXHRcdFx0aGVpZ2h0OiAyNCxcblx0XHRcdG1pbkhlaWdodDogMjQsXG5cdFx0XHRwYWRkaW5nVG9wOiAwLFxuXHRcdFx0cGFkZGluZ0JvdHRvbTogMCxcblx0XHR9LFxuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdGhlaWdodDogMzIsXG5cdFx0XHRtaW5IZWlnaHQ6IDMyLFxuXHRcdFx0cGFkZGluZ1RvcDogMCxcblx0XHRcdHBhZGRpbmdCb3R0b206IDAsXG5cdFx0fSxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRtaW5IZWlnaHQ6IDQwLFxuXHRcdFx0cGFkZGluZ1RvcDogMCxcblx0XHRcdHBhZGRpbmdCb3R0b206IDAsXG5cdFx0fSxcblx0fTtcblxuXHRpZiAoICEgX19uZXh0NDBweERlZmF1bHRTaXplICkge1xuXHRcdHNpemVzLmRlZmF1bHQgPSBzaXplcy5jb21wYWN0O1xuXHR9XG5cblx0Y29uc3Qgc3R5bGUgPSBzaXplc1sgc2VsZWN0U2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG5cblx0cmV0dXJuIGNzcyggc3R5bGUgKTtcbn07XG5cbmV4cG9ydCBjb25zdCBjaGV2cm9uSWNvblNpemUgPSAxODtcblxuY29uc3Qgc2l6ZVBhZGRpbmdzID0gKCB7XG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0bXVsdGlwbGUsXG5cdHNlbGVjdFNpemUgPSAnZGVmYXVsdCcsXG59OiBTZWxlY3RQcm9wcyApID0+IHtcblx0Y29uc3QgcGFkZGluZyA9IHtcblx0XHRkZWZhdWx0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdHNtYWxsOiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0Y29tcGFjdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0fTtcblxuXHRpZiAoICEgX19uZXh0NDBweERlZmF1bHRTaXplICkge1xuXHRcdHBhZGRpbmcuZGVmYXVsdCA9IHBhZGRpbmcuY29tcGFjdDtcblx0fVxuXG5cdGNvbnN0IHNlbGVjdGVkUGFkZGluZyA9IHBhZGRpbmdbIHNlbGVjdFNpemUgXSB8fCBwYWRkaW5nLmRlZmF1bHQ7XG5cblx0cmV0dXJuIHJ0bCgge1xuXHRcdHBhZGRpbmdMZWZ0OiBzZWxlY3RlZFBhZGRpbmcsXG5cdFx0cGFkZGluZ1JpZ2h0OiBzZWxlY3RlZFBhZGRpbmcgKyBjaGV2cm9uSWNvblNpemUsXG5cdFx0Li4uKCBtdWx0aXBsZVxuXHRcdFx0PyB7XG5cdFx0XHRcdFx0cGFkZGluZ1RvcDogc2VsZWN0ZWRQYWRkaW5nLFxuXHRcdFx0XHRcdHBhZGRpbmdCb3R0b206IHNlbGVjdGVkUGFkZGluZyxcblx0XHRcdCAgfVxuXHRcdFx0OiB7fSApLFxuXHR9ICk7XG59O1xuXG5jb25zdCBvdmVyZmxvd1N0eWxlcyA9ICggeyBtdWx0aXBsZSB9OiBTZWxlY3RQcm9wcyApID0+IHtcblx0cmV0dXJuIHtcblx0XHRvdmVyZmxvdzogbXVsdGlwbGUgPyAnYXV0bycgOiAnaGlkZGVuJyxcblx0fTtcbn07XG5cbmNvbnN0IHZhcmlhbnRTdHlsZXMgPSAoIHsgdmFyaWFudCB9OiBTZWxlY3RQcm9wcyApID0+IHtcblx0aWYgKCB2YXJpYW50ID09PSAnbWluaW1hbCcgKSB7XG5cdFx0cmV0dXJuIGNzcygge1xuXHRcdFx0ZmllbGRTaXppbmc6ICdjb250ZW50Jyxcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4gJyc7XG59O1xuXG4vLyBUT0RPOiBSZXNvbHZlIG5lZWQgdG8gdXNlICYmJiB0byBpbmNyZWFzZSBzcGVjaWZpY2l0eVxuLy8gaHR0cHM6Ly9naXRodWIuY29tL1dvcmRQcmVzcy9ndXRlbmJlcmcvaXNzdWVzLzE4NDgzXG5cbmV4cG9ydCBjb25zdCBTZWxlY3QgPSBzdHlsZWQuc2VsZWN0PCBTZWxlY3RQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGFwcGVhcmFuY2U6IG5vbmU7XG5cdFx0YmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cdFx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0XHRib3JkZXI6IG5vbmU7XG5cdFx0Ym94LXNoYWRvdzogbm9uZSAhaW1wb3J0YW50O1xuXHRcdGNvbG9yOiBjdXJyZW50Q29sb3I7IC8vIE92ZXJyaWRlcyBob3Zlci9mb2N1cyBzdHlsZXMgaW4gZm9ybXMuY3NzXG5cdFx0Y3Vyc29yOiBpbmhlcml0O1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdGZvbnQtZmFtaWx5OiBpbmhlcml0O1xuXHRcdGxpbmUtaGVpZ2h0OiAxLjM7IC8vIE92ZXJyaWRlIGZvcm1zLmNzcyBzdHlsZXMsIGxhcmdlIGVub3VnaCB2YWx1ZSB0byBwcmV2ZW50IGRlc2NlbmRlciBjbGlwcGluZyB3aXRob3V0IGFmZmVjdGluZyBoZWlnaHRcblx0XHRtYXJnaW46IDA7XG5cdFx0d2lkdGg6IDEwMCU7XG5cdFx0bWF4LXdpZHRoOiBub25lO1xuXHRcdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cdFx0dGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5cblx0XHQkeyBmb250U2l6ZVN0eWxlcyB9O1xuXHRcdCR7IHNpemVTdHlsZXMgfTtcblx0XHQkeyBzaXplUGFkZGluZ3MgfTtcblx0XHQkeyBvdmVyZmxvd1N0eWxlcyB9XG5cdFx0JHsgdmFyaWFudFN0eWxlcyB9XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBEb3duQXJyb3dXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0bWFyZ2luLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAtMSApIH07IC8vIG9wdGljYWxseSBhZGp1c3QgdGhlIGljb25cblx0bGluZS1oZWlnaHQ6IDA7XG5cblx0cGF0aCB7XG5cdFx0ZmlsbDogY3VycmVudENvbG9yO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRDb250cm9sU3VmZml4V3JhcHBlcldpdGhDbGlja1Rocm91Z2ggPSBzdHlsZWQoXG5cdElucHV0Q29udHJvbFN1ZmZpeFdyYXBwZXJcbilgXG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cblx0JHsgcnRsKCB7IHJpZ2h0OiAwIH0gKSB9XG5gO1xuIl19 */");
  };
  var _ref23 = false ? {
    name: "1lv1yo7",
    styles: "display:inline-flex"
  } : {
    name: "siqiia-inputBaseVariantStyles",
    styles: "display:inline-flex;label:inputBaseVariantStyles;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNlbGVjdC1jb250cm9sLXN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1Q1kiLCJmaWxlIjoic2VsZWN0LWNvbnRyb2wtc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIHJ0bCwgQ09ORklHIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi8uLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgdHlwZSB7IFNlbGVjdENvbnRyb2xQcm9wcyB9IGZyb20gJy4uL3R5cGVzJztcbmltcG9ydCBJbnB1dENvbnRyb2xTdWZmaXhXcmFwcGVyIGZyb20gJy4uLy4uL2lucHV0LWNvbnRyb2wvaW5wdXQtc3VmZml4LXdyYXBwZXInO1xuaW1wb3J0IHsgZm9udFNpemVTdHlsZXMgfSBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL3N0eWxlcy9pbnB1dC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgSW5wdXRCYXNlIGZyb20gJy4uLy4uL2lucHV0LWNvbnRyb2wvaW5wdXQtYmFzZSc7XG5cbmludGVyZmFjZSBTZWxlY3RQcm9wc1xuXHRleHRlbmRzIFBpY2s8XG5cdFx0U2VsZWN0Q29udHJvbFByb3BzLFxuXHRcdCdfX25leHQ0MHB4RGVmYXVsdFNpemUnIHwgJ2Rpc2FibGVkJyB8ICdtdWx0aXBsZScgfCAndmFyaWFudCdcblx0PiB7XG5cdC8vIFVzaW5nIGBzZWxlY3RTaXplYCBpbnN0ZWFkIG9mIGBzaXplYCB0byBhdm9pZCBhIHR5cGUgY29uZmxpY3Qgd2l0aCB0aGVcblx0Ly8gYHNpemVgIEhUTUwgYXR0cmlidXRlIG9mIHRoZSBgc2VsZWN0YCBlbGVtZW50LlxuXHRzZWxlY3RTaXplPzogU2VsZWN0Q29udHJvbFByb3BzWyAnc2l6ZScgXTtcbn1cblxuY29uc3QgZGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogU2VsZWN0UHJvcHMgKSA9PiB7XG5cdGlmICggISBkaXNhYmxlZCApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdGNvbG9yOiAkeyBDT0xPUlMudWkudGV4dERpc2FibGVkIH07XG5cdFx0Y3Vyc29yOiBkZWZhdWx0O1xuXHRgO1xufTtcblxuY29uc3QgaW5wdXRCYXNlVmFyaWFudFN0eWxlcyA9ICggeyB2YXJpYW50IH06IFNlbGVjdFByb3BzICkgPT4ge1xuXHRpZiAoIHZhcmlhbnQgPT09ICdtaW5pbWFsJyApIHtcblx0XHRyZXR1cm4gY3NzYFxuXHRcdFx0ZGlzcGxheTogaW5saW5lLWZsZXg7XG5cdFx0YDtcblx0fVxuXG5cdHJldHVybiAnJztcbn07XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRJbnB1dEJhc2UgPSBzdHlsZWQoIElucHV0QmFzZSApYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXG5cdCR7IGRpc2FibGVkU3R5bGVzIH1cblx0JHsgaW5wdXRCYXNlVmFyaWFudFN0eWxlcyB9XG5gO1xuXG5jb25zdCBzaXplU3R5bGVzID0gKCB7XG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0bXVsdGlwbGUsXG5cdHNlbGVjdFNpemUgPSAnZGVmYXVsdCcsXG59OiBTZWxlY3RQcm9wcyApID0+IHtcblx0aWYgKCBtdWx0aXBsZSApIHtcblx0XHQvLyBXaGVuIGBtdWx0aXBsZWAsIGp1c3QgdXNlIHRoZSBuYXRpdmUgYnJvd3NlciBzdHlsZXNcblx0XHQvLyB3aXRob3V0IHNldHRpbmcgZXhwbGljaXQgaGVpZ2h0LlxuXHRcdHJldHVybjtcblx0fVxuXG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRtaW5IZWlnaHQ6IDQwLFxuXHRcdFx0cGFkZGluZ1RvcDogMCxcblx0XHRcdHBhZGRpbmdCb3R0b206IDAsXG5cdFx0fSxcblx0XHRzbWFsbDoge1xuXHRcdFx0aGVpZ2h0OiAyNCxcblx0XHRcdG1pbkhlaWdodDogMjQsXG5cdFx0XHRwYWRkaW5nVG9wOiAwLFxuXHRcdFx0cGFkZGluZ0JvdHRvbTogMCxcblx0XHR9LFxuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdGhlaWdodDogMzIsXG5cdFx0XHRtaW5IZWlnaHQ6IDMyLFxuXHRcdFx0cGFkZGluZ1RvcDogMCxcblx0XHRcdHBhZGRpbmdCb3R0b206IDAsXG5cdFx0fSxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRtaW5IZWlnaHQ6IDQwLFxuXHRcdFx0cGFkZGluZ1RvcDogMCxcblx0XHRcdHBhZGRpbmdCb3R0b206IDAsXG5cdFx0fSxcblx0fTtcblxuXHRpZiAoICEgX19uZXh0NDBweERlZmF1bHRTaXplICkge1xuXHRcdHNpemVzLmRlZmF1bHQgPSBzaXplcy5jb21wYWN0O1xuXHR9XG5cblx0Y29uc3Qgc3R5bGUgPSBzaXplc1sgc2VsZWN0U2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG5cblx0cmV0dXJuIGNzcyggc3R5bGUgKTtcbn07XG5cbmV4cG9ydCBjb25zdCBjaGV2cm9uSWNvblNpemUgPSAxODtcblxuY29uc3Qgc2l6ZVBhZGRpbmdzID0gKCB7XG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0bXVsdGlwbGUsXG5cdHNlbGVjdFNpemUgPSAnZGVmYXVsdCcsXG59OiBTZWxlY3RQcm9wcyApID0+IHtcblx0Y29uc3QgcGFkZGluZyA9IHtcblx0XHRkZWZhdWx0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdHNtYWxsOiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0Y29tcGFjdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0fTtcblxuXHRpZiAoICEgX19uZXh0NDBweERlZmF1bHRTaXplICkge1xuXHRcdHBhZGRpbmcuZGVmYXVsdCA9IHBhZGRpbmcuY29tcGFjdDtcblx0fVxuXG5cdGNvbnN0IHNlbGVjdGVkUGFkZGluZyA9IHBhZGRpbmdbIHNlbGVjdFNpemUgXSB8fCBwYWRkaW5nLmRlZmF1bHQ7XG5cblx0cmV0dXJuIHJ0bCgge1xuXHRcdHBhZGRpbmdMZWZ0OiBzZWxlY3RlZFBhZGRpbmcsXG5cdFx0cGFkZGluZ1JpZ2h0OiBzZWxlY3RlZFBhZGRpbmcgKyBjaGV2cm9uSWNvblNpemUsXG5cdFx0Li4uKCBtdWx0aXBsZVxuXHRcdFx0PyB7XG5cdFx0XHRcdFx0cGFkZGluZ1RvcDogc2VsZWN0ZWRQYWRkaW5nLFxuXHRcdFx0XHRcdHBhZGRpbmdCb3R0b206IHNlbGVjdGVkUGFkZGluZyxcblx0XHRcdCAgfVxuXHRcdFx0OiB7fSApLFxuXHR9ICk7XG59O1xuXG5jb25zdCBvdmVyZmxvd1N0eWxlcyA9ICggeyBtdWx0aXBsZSB9OiBTZWxlY3RQcm9wcyApID0+IHtcblx0cmV0dXJuIHtcblx0XHRvdmVyZmxvdzogbXVsdGlwbGUgPyAnYXV0bycgOiAnaGlkZGVuJyxcblx0fTtcbn07XG5cbmNvbnN0IHZhcmlhbnRTdHlsZXMgPSAoIHsgdmFyaWFudCB9OiBTZWxlY3RQcm9wcyApID0+IHtcblx0aWYgKCB2YXJpYW50ID09PSAnbWluaW1hbCcgKSB7XG5cdFx0cmV0dXJuIGNzcygge1xuXHRcdFx0ZmllbGRTaXppbmc6ICdjb250ZW50Jyxcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4gJyc7XG59O1xuXG4vLyBUT0RPOiBSZXNvbHZlIG5lZWQgdG8gdXNlICYmJiB0byBpbmNyZWFzZSBzcGVjaWZpY2l0eVxuLy8gaHR0cHM6Ly9naXRodWIuY29tL1dvcmRQcmVzcy9ndXRlbmJlcmcvaXNzdWVzLzE4NDgzXG5cbmV4cG9ydCBjb25zdCBTZWxlY3QgPSBzdHlsZWQuc2VsZWN0PCBTZWxlY3RQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGFwcGVhcmFuY2U6IG5vbmU7XG5cdFx0YmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cdFx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0XHRib3JkZXI6IG5vbmU7XG5cdFx0Ym94LXNoYWRvdzogbm9uZSAhaW1wb3J0YW50O1xuXHRcdGNvbG9yOiBjdXJyZW50Q29sb3I7IC8vIE92ZXJyaWRlcyBob3Zlci9mb2N1cyBzdHlsZXMgaW4gZm9ybXMuY3NzXG5cdFx0Y3Vyc29yOiBpbmhlcml0O1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdGZvbnQtZmFtaWx5OiBpbmhlcml0O1xuXHRcdGxpbmUtaGVpZ2h0OiAxLjM7IC8vIE92ZXJyaWRlIGZvcm1zLmNzcyBzdHlsZXMsIGxhcmdlIGVub3VnaCB2YWx1ZSB0byBwcmV2ZW50IGRlc2NlbmRlciBjbGlwcGluZyB3aXRob3V0IGFmZmVjdGluZyBoZWlnaHRcblx0XHRtYXJnaW46IDA7XG5cdFx0d2lkdGg6IDEwMCU7XG5cdFx0bWF4LXdpZHRoOiBub25lO1xuXHRcdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cdFx0dGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5cblx0XHQkeyBmb250U2l6ZVN0eWxlcyB9O1xuXHRcdCR7IHNpemVTdHlsZXMgfTtcblx0XHQkeyBzaXplUGFkZGluZ3MgfTtcblx0XHQkeyBvdmVyZmxvd1N0eWxlcyB9XG5cdFx0JHsgdmFyaWFudFN0eWxlcyB9XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBEb3duQXJyb3dXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0bWFyZ2luLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAtMSApIH07IC8vIG9wdGljYWxseSBhZGp1c3QgdGhlIGljb25cblx0bGluZS1oZWlnaHQ6IDA7XG5cblx0cGF0aCB7XG5cdFx0ZmlsbDogY3VycmVudENvbG9yO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRDb250cm9sU3VmZml4V3JhcHBlcldpdGhDbGlja1Rocm91Z2ggPSBzdHlsZWQoXG5cdElucHV0Q29udHJvbFN1ZmZpeFdyYXBwZXJcbilgXG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cblx0JHsgcnRsKCB7IHJpZ2h0OiAwIH0gKSB9XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__12
  };
  var inputBaseVariantStyles = ({
    variant
  }) => {
    if (variant === "minimal") {
      return _ref23;
    }
    return "";
  };
  var StyledInputBase = /* @__PURE__ */ createStyled(input_base_default, false ? {
    target: "e1mv6sxx3"
  } : {
    target: "e1mv6sxx3",
    label: "StyledInputBase"
  })("color:", COLORS.theme.foreground, ";cursor:pointer;", disabledStyles2, " ", inputBaseVariantStyles, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNlbGVjdC1jb250cm9sLXN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUErQ2tEIiwiZmlsZSI6InNlbGVjdC1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHR5cGUgeyBTZWxlY3RDb250cm9sUHJvcHMgfSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgSW5wdXRDb250cm9sU3VmZml4V3JhcHBlciBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL2lucHV0LXN1ZmZpeC13cmFwcGVyJztcbmltcG9ydCB7IGZvbnRTaXplU3R5bGVzIH0gZnJvbSAnLi4vLi4vaW5wdXQtY29udHJvbC9zdHlsZXMvaW5wdXQtY29udHJvbC1zdHlsZXMnO1xuaW1wb3J0IElucHV0QmFzZSBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL2lucHV0LWJhc2UnO1xuXG5pbnRlcmZhY2UgU2VsZWN0UHJvcHNcblx0ZXh0ZW5kcyBQaWNrPFxuXHRcdFNlbGVjdENvbnRyb2xQcm9wcyxcblx0XHQnX19uZXh0NDBweERlZmF1bHRTaXplJyB8ICdkaXNhYmxlZCcgfCAnbXVsdGlwbGUnIHwgJ3ZhcmlhbnQnXG5cdD4ge1xuXHQvLyBVc2luZyBgc2VsZWN0U2l6ZWAgaW5zdGVhZCBvZiBgc2l6ZWAgdG8gYXZvaWQgYSB0eXBlIGNvbmZsaWN0IHdpdGggdGhlXG5cdC8vIGBzaXplYCBIVE1MIGF0dHJpYnV0ZSBvZiB0aGUgYHNlbGVjdGAgZWxlbWVudC5cblx0c2VsZWN0U2l6ZT86IFNlbGVjdENvbnRyb2xQcm9wc1sgJ3NpemUnIF07XG59XG5cbmNvbnN0IGRpc2FibGVkU3R5bGVzID0gKCB7IGRpc2FibGVkIH06IFNlbGVjdFByb3BzICkgPT4ge1xuXHRpZiAoICEgZGlzYWJsZWQgKSB7XG5cdFx0cmV0dXJuICcnO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLnRleHREaXNhYmxlZCB9O1xuXHRcdGN1cnNvcjogZGVmYXVsdDtcblx0YDtcbn07XG5cbmNvbnN0IGlucHV0QmFzZVZhcmlhbnRTdHlsZXMgPSAoIHsgdmFyaWFudCB9OiBTZWxlY3RQcm9wcyApID0+IHtcblx0aWYgKCB2YXJpYW50ID09PSAnbWluaW1hbCcgKSB7XG5cdFx0cmV0dXJuIGNzc2Bcblx0XHRcdGRpc3BsYXk6IGlubGluZS1mbGV4O1xuXHRcdGA7XG5cdH1cblxuXHRyZXR1cm4gJyc7XG59O1xuXG5leHBvcnQgY29uc3QgU3R5bGVkSW5wdXRCYXNlID0gc3R5bGVkKCBJbnB1dEJhc2UgKWBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdGN1cnNvcjogcG9pbnRlcjtcblxuXHQkeyBkaXNhYmxlZFN0eWxlcyB9XG5cdCR7IGlucHV0QmFzZVZhcmlhbnRTdHlsZXMgfVxuYDtcblxuY29uc3Qgc2l6ZVN0eWxlcyA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdG11bHRpcGxlLFxuXHRzZWxlY3RTaXplID0gJ2RlZmF1bHQnLFxufTogU2VsZWN0UHJvcHMgKSA9PiB7XG5cdGlmICggbXVsdGlwbGUgKSB7XG5cdFx0Ly8gV2hlbiBgbXVsdGlwbGVgLCBqdXN0IHVzZSB0aGUgbmF0aXZlIGJyb3dzZXIgc3R5bGVzXG5cdFx0Ly8gd2l0aG91dCBzZXR0aW5nIGV4cGxpY2l0IGhlaWdodC5cblx0XHRyZXR1cm47XG5cdH1cblxuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiB7XG5cdFx0XHRoZWlnaHQ6IDQwLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdUb3A6IDAsXG5cdFx0XHRwYWRkaW5nQm90dG9tOiAwLFxuXHRcdH0sXG5cdFx0c21hbGw6IHtcblx0XHRcdGhlaWdodDogMjQsXG5cdFx0XHRtaW5IZWlnaHQ6IDI0LFxuXHRcdFx0cGFkZGluZ1RvcDogMCxcblx0XHRcdHBhZGRpbmdCb3R0b206IDAsXG5cdFx0fSxcblx0XHRjb21wYWN0OiB7XG5cdFx0XHRoZWlnaHQ6IDMyLFxuXHRcdFx0bWluSGVpZ2h0OiAzMixcblx0XHRcdHBhZGRpbmdUb3A6IDAsXG5cdFx0XHRwYWRkaW5nQm90dG9tOiAwLFxuXHRcdH0sXG5cdFx0J19fdW5zdGFibGUtbGFyZ2UnOiB7XG5cdFx0XHRoZWlnaHQ6IDQwLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdUb3A6IDAsXG5cdFx0XHRwYWRkaW5nQm90dG9tOiAwLFxuXHRcdH0sXG5cdH07XG5cblx0aWYgKCAhIF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSApIHtcblx0XHRzaXplcy5kZWZhdWx0ID0gc2l6ZXMuY29tcGFjdDtcblx0fVxuXG5cdGNvbnN0IHN0eWxlID0gc2l6ZXNbIHNlbGVjdFNpemUgXSB8fCBzaXplcy5kZWZhdWx0O1xuXG5cdHJldHVybiBjc3MoIHN0eWxlICk7XG59O1xuXG5leHBvcnQgY29uc3QgY2hldnJvbkljb25TaXplID0gMTg7XG5cbmNvbnN0IHNpemVQYWRkaW5ncyA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdG11bHRpcGxlLFxuXHRzZWxlY3RTaXplID0gJ2RlZmF1bHQnLFxufTogU2VsZWN0UHJvcHMgKSA9PiB7XG5cdGNvbnN0IHBhZGRpbmcgPSB7XG5cdFx0ZGVmYXVsdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHRzbWFsbDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdGNvbXBhY3Q6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdH07XG5cblx0aWYgKCAhIF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSApIHtcblx0XHRwYWRkaW5nLmRlZmF1bHQgPSBwYWRkaW5nLmNvbXBhY3Q7XG5cdH1cblxuXHRjb25zdCBzZWxlY3RlZFBhZGRpbmcgPSBwYWRkaW5nWyBzZWxlY3RTaXplIF0gfHwgcGFkZGluZy5kZWZhdWx0O1xuXG5cdHJldHVybiBydGwoIHtcblx0XHRwYWRkaW5nTGVmdDogc2VsZWN0ZWRQYWRkaW5nLFxuXHRcdHBhZGRpbmdSaWdodDogc2VsZWN0ZWRQYWRkaW5nICsgY2hldnJvbkljb25TaXplLFxuXHRcdC4uLiggbXVsdGlwbGVcblx0XHRcdD8ge1xuXHRcdFx0XHRcdHBhZGRpbmdUb3A6IHNlbGVjdGVkUGFkZGluZyxcblx0XHRcdFx0XHRwYWRkaW5nQm90dG9tOiBzZWxlY3RlZFBhZGRpbmcsXG5cdFx0XHQgIH1cblx0XHRcdDoge30gKSxcblx0fSApO1xufTtcblxuY29uc3Qgb3ZlcmZsb3dTdHlsZXMgPSAoIHsgbXVsdGlwbGUgfTogU2VsZWN0UHJvcHMgKSA9PiB7XG5cdHJldHVybiB7XG5cdFx0b3ZlcmZsb3c6IG11bHRpcGxlID8gJ2F1dG8nIDogJ2hpZGRlbicsXG5cdH07XG59O1xuXG5jb25zdCB2YXJpYW50U3R5bGVzID0gKCB7IHZhcmlhbnQgfTogU2VsZWN0UHJvcHMgKSA9PiB7XG5cdGlmICggdmFyaWFudCA9PT0gJ21pbmltYWwnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdGZpZWxkU2l6aW5nOiAnY29udGVudCcsXG5cdFx0fSApO1xuXHR9XG5cblx0cmV0dXJuICcnO1xufTtcblxuLy8gVE9ETzogUmVzb2x2ZSBuZWVkIHRvIHVzZSAmJiYgdG8gaW5jcmVhc2Ugc3BlY2lmaWNpdHlcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9Xb3JkUHJlc3MvZ3V0ZW5iZXJnL2lzc3Vlcy8xODQ4M1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ID0gc3R5bGVkLnNlbGVjdDwgU2VsZWN0UHJvcHMgPmBcblx0JiYmIHtcblx0XHRhcHBlYXJhbmNlOiBub25lO1xuXHRcdGJhY2tncm91bmQ6IHRyYW5zcGFyZW50O1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyOiBub25lO1xuXHRcdGJveC1zaGFkb3c6IG5vbmUgIWltcG9ydGFudDtcblx0XHRjb2xvcjogY3VycmVudENvbG9yOyAvLyBPdmVycmlkZXMgaG92ZXIvZm9jdXMgc3R5bGVzIGluIGZvcm1zLmNzc1xuXHRcdGN1cnNvcjogaW5oZXJpdDtcblx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRmb250LWZhbWlseTogaW5oZXJpdDtcblx0XHRsaW5lLWhlaWdodDogMS4zOyAvLyBPdmVycmlkZSBmb3Jtcy5jc3Mgc3R5bGVzLCBsYXJnZSBlbm91Z2ggdmFsdWUgdG8gcHJldmVudCBkZXNjZW5kZXIgY2xpcHBpbmcgd2l0aG91dCBhZmZlY3RpbmcgaGVpZ2h0XG5cdFx0bWFyZ2luOiAwO1xuXHRcdHdpZHRoOiAxMDAlO1xuXHRcdG1heC13aWR0aDogbm9uZTtcblx0XHR3aGl0ZS1zcGFjZTogbm93cmFwO1xuXHRcdHRleHQtb3ZlcmZsb3c6IGVsbGlwc2lzO1xuXG5cdFx0JHsgZm9udFNpemVTdHlsZXMgfTtcblx0XHQkeyBzaXplU3R5bGVzIH07XG5cdFx0JHsgc2l6ZVBhZGRpbmdzIH07XG5cdFx0JHsgb3ZlcmZsb3dTdHlsZXMgfVxuXHRcdCR7IHZhcmlhbnRTdHlsZXMgfVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgRG93bkFycm93V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbi1pbmxpbmUtZW5kOiAkeyBzcGFjZSggLTEgKSB9OyAvLyBvcHRpY2FsbHkgYWRqdXN0IHRoZSBpY29uXG5cdGxpbmUtaGVpZ2h0OiAwO1xuXG5cdHBhdGgge1xuXHRcdGZpbGw6IGN1cnJlbnRDb2xvcjtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IElucHV0Q29udHJvbFN1ZmZpeFdyYXBwZXJXaXRoQ2xpY2tUaHJvdWdoID0gc3R5bGVkKFxuXHRJbnB1dENvbnRyb2xTdWZmaXhXcmFwcGVyXG4pYFxuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXG5cdCR7IHJ0bCggeyByaWdodDogMCB9ICkgfVxuYDtcbiJdfQ== */"));
  var sizeStyles2 = ({
    __next40pxDefaultSize,
    multiple,
    selectSize = "default"
  }) => {
    if (multiple) {
      return;
    }
    const sizes = {
      default: {
        height: 40,
        minHeight: 40,
        paddingTop: 0,
        paddingBottom: 0
      },
      small: {
        height: 24,
        minHeight: 24,
        paddingTop: 0,
        paddingBottom: 0
      },
      compact: {
        height: 32,
        minHeight: 32,
        paddingTop: 0,
        paddingBottom: 0
      },
      "__unstable-large": {
        height: 40,
        minHeight: 40,
        paddingTop: 0,
        paddingBottom: 0
      }
    };
    if (!__next40pxDefaultSize) {
      sizes.default = sizes.compact;
    }
    const style2 = sizes[selectSize] || sizes.default;
    return /* @__PURE__ */ css(style2, false ? "" : ";label:sizeStyles;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNlbGVjdC1jb250cm9sLXN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtR1EiLCJmaWxlIjoic2VsZWN0LWNvbnRyb2wtc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIHJ0bCwgQ09ORklHIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi8uLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgdHlwZSB7IFNlbGVjdENvbnRyb2xQcm9wcyB9IGZyb20gJy4uL3R5cGVzJztcbmltcG9ydCBJbnB1dENvbnRyb2xTdWZmaXhXcmFwcGVyIGZyb20gJy4uLy4uL2lucHV0LWNvbnRyb2wvaW5wdXQtc3VmZml4LXdyYXBwZXInO1xuaW1wb3J0IHsgZm9udFNpemVTdHlsZXMgfSBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL3N0eWxlcy9pbnB1dC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgSW5wdXRCYXNlIGZyb20gJy4uLy4uL2lucHV0LWNvbnRyb2wvaW5wdXQtYmFzZSc7XG5cbmludGVyZmFjZSBTZWxlY3RQcm9wc1xuXHRleHRlbmRzIFBpY2s8XG5cdFx0U2VsZWN0Q29udHJvbFByb3BzLFxuXHRcdCdfX25leHQ0MHB4RGVmYXVsdFNpemUnIHwgJ2Rpc2FibGVkJyB8ICdtdWx0aXBsZScgfCAndmFyaWFudCdcblx0PiB7XG5cdC8vIFVzaW5nIGBzZWxlY3RTaXplYCBpbnN0ZWFkIG9mIGBzaXplYCB0byBhdm9pZCBhIHR5cGUgY29uZmxpY3Qgd2l0aCB0aGVcblx0Ly8gYHNpemVgIEhUTUwgYXR0cmlidXRlIG9mIHRoZSBgc2VsZWN0YCBlbGVtZW50LlxuXHRzZWxlY3RTaXplPzogU2VsZWN0Q29udHJvbFByb3BzWyAnc2l6ZScgXTtcbn1cblxuY29uc3QgZGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogU2VsZWN0UHJvcHMgKSA9PiB7XG5cdGlmICggISBkaXNhYmxlZCApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdGNvbG9yOiAkeyBDT0xPUlMudWkudGV4dERpc2FibGVkIH07XG5cdFx0Y3Vyc29yOiBkZWZhdWx0O1xuXHRgO1xufTtcblxuY29uc3QgaW5wdXRCYXNlVmFyaWFudFN0eWxlcyA9ICggeyB2YXJpYW50IH06IFNlbGVjdFByb3BzICkgPT4ge1xuXHRpZiAoIHZhcmlhbnQgPT09ICdtaW5pbWFsJyApIHtcblx0XHRyZXR1cm4gY3NzYFxuXHRcdFx0ZGlzcGxheTogaW5saW5lLWZsZXg7XG5cdFx0YDtcblx0fVxuXG5cdHJldHVybiAnJztcbn07XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRJbnB1dEJhc2UgPSBzdHlsZWQoIElucHV0QmFzZSApYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXG5cdCR7IGRpc2FibGVkU3R5bGVzIH1cblx0JHsgaW5wdXRCYXNlVmFyaWFudFN0eWxlcyB9XG5gO1xuXG5jb25zdCBzaXplU3R5bGVzID0gKCB7XG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0bXVsdGlwbGUsXG5cdHNlbGVjdFNpemUgPSAnZGVmYXVsdCcsXG59OiBTZWxlY3RQcm9wcyApID0+IHtcblx0aWYgKCBtdWx0aXBsZSApIHtcblx0XHQvLyBXaGVuIGBtdWx0aXBsZWAsIGp1c3QgdXNlIHRoZSBuYXRpdmUgYnJvd3NlciBzdHlsZXNcblx0XHQvLyB3aXRob3V0IHNldHRpbmcgZXhwbGljaXQgaGVpZ2h0LlxuXHRcdHJldHVybjtcblx0fVxuXG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRtaW5IZWlnaHQ6IDQwLFxuXHRcdFx0cGFkZGluZ1RvcDogMCxcblx0XHRcdHBhZGRpbmdCb3R0b206IDAsXG5cdFx0fSxcblx0XHRzbWFsbDoge1xuXHRcdFx0aGVpZ2h0OiAyNCxcblx0XHRcdG1pbkhlaWdodDogMjQsXG5cdFx0XHRwYWRkaW5nVG9wOiAwLFxuXHRcdFx0cGFkZGluZ0JvdHRvbTogMCxcblx0XHR9LFxuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdGhlaWdodDogMzIsXG5cdFx0XHRtaW5IZWlnaHQ6IDMyLFxuXHRcdFx0cGFkZGluZ1RvcDogMCxcblx0XHRcdHBhZGRpbmdCb3R0b206IDAsXG5cdFx0fSxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRtaW5IZWlnaHQ6IDQwLFxuXHRcdFx0cGFkZGluZ1RvcDogMCxcblx0XHRcdHBhZGRpbmdCb3R0b206IDAsXG5cdFx0fSxcblx0fTtcblxuXHRpZiAoICEgX19uZXh0NDBweERlZmF1bHRTaXplICkge1xuXHRcdHNpemVzLmRlZmF1bHQgPSBzaXplcy5jb21wYWN0O1xuXHR9XG5cblx0Y29uc3Qgc3R5bGUgPSBzaXplc1sgc2VsZWN0U2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG5cblx0cmV0dXJuIGNzcyggc3R5bGUgKTtcbn07XG5cbmV4cG9ydCBjb25zdCBjaGV2cm9uSWNvblNpemUgPSAxODtcblxuY29uc3Qgc2l6ZVBhZGRpbmdzID0gKCB7XG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0bXVsdGlwbGUsXG5cdHNlbGVjdFNpemUgPSAnZGVmYXVsdCcsXG59OiBTZWxlY3RQcm9wcyApID0+IHtcblx0Y29uc3QgcGFkZGluZyA9IHtcblx0XHRkZWZhdWx0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdHNtYWxsOiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0Y29tcGFjdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0fTtcblxuXHRpZiAoICEgX19uZXh0NDBweERlZmF1bHRTaXplICkge1xuXHRcdHBhZGRpbmcuZGVmYXVsdCA9IHBhZGRpbmcuY29tcGFjdDtcblx0fVxuXG5cdGNvbnN0IHNlbGVjdGVkUGFkZGluZyA9IHBhZGRpbmdbIHNlbGVjdFNpemUgXSB8fCBwYWRkaW5nLmRlZmF1bHQ7XG5cblx0cmV0dXJuIHJ0bCgge1xuXHRcdHBhZGRpbmdMZWZ0OiBzZWxlY3RlZFBhZGRpbmcsXG5cdFx0cGFkZGluZ1JpZ2h0OiBzZWxlY3RlZFBhZGRpbmcgKyBjaGV2cm9uSWNvblNpemUsXG5cdFx0Li4uKCBtdWx0aXBsZVxuXHRcdFx0PyB7XG5cdFx0XHRcdFx0cGFkZGluZ1RvcDogc2VsZWN0ZWRQYWRkaW5nLFxuXHRcdFx0XHRcdHBhZGRpbmdCb3R0b206IHNlbGVjdGVkUGFkZGluZyxcblx0XHRcdCAgfVxuXHRcdFx0OiB7fSApLFxuXHR9ICk7XG59O1xuXG5jb25zdCBvdmVyZmxvd1N0eWxlcyA9ICggeyBtdWx0aXBsZSB9OiBTZWxlY3RQcm9wcyApID0+IHtcblx0cmV0dXJuIHtcblx0XHRvdmVyZmxvdzogbXVsdGlwbGUgPyAnYXV0bycgOiAnaGlkZGVuJyxcblx0fTtcbn07XG5cbmNvbnN0IHZhcmlhbnRTdHlsZXMgPSAoIHsgdmFyaWFudCB9OiBTZWxlY3RQcm9wcyApID0+IHtcblx0aWYgKCB2YXJpYW50ID09PSAnbWluaW1hbCcgKSB7XG5cdFx0cmV0dXJuIGNzcygge1xuXHRcdFx0ZmllbGRTaXppbmc6ICdjb250ZW50Jyxcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4gJyc7XG59O1xuXG4vLyBUT0RPOiBSZXNvbHZlIG5lZWQgdG8gdXNlICYmJiB0byBpbmNyZWFzZSBzcGVjaWZpY2l0eVxuLy8gaHR0cHM6Ly9naXRodWIuY29tL1dvcmRQcmVzcy9ndXRlbmJlcmcvaXNzdWVzLzE4NDgzXG5cbmV4cG9ydCBjb25zdCBTZWxlY3QgPSBzdHlsZWQuc2VsZWN0PCBTZWxlY3RQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGFwcGVhcmFuY2U6IG5vbmU7XG5cdFx0YmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cdFx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0XHRib3JkZXI6IG5vbmU7XG5cdFx0Ym94LXNoYWRvdzogbm9uZSAhaW1wb3J0YW50O1xuXHRcdGNvbG9yOiBjdXJyZW50Q29sb3I7IC8vIE92ZXJyaWRlcyBob3Zlci9mb2N1cyBzdHlsZXMgaW4gZm9ybXMuY3NzXG5cdFx0Y3Vyc29yOiBpbmhlcml0O1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdGZvbnQtZmFtaWx5OiBpbmhlcml0O1xuXHRcdGxpbmUtaGVpZ2h0OiAxLjM7IC8vIE92ZXJyaWRlIGZvcm1zLmNzcyBzdHlsZXMsIGxhcmdlIGVub3VnaCB2YWx1ZSB0byBwcmV2ZW50IGRlc2NlbmRlciBjbGlwcGluZyB3aXRob3V0IGFmZmVjdGluZyBoZWlnaHRcblx0XHRtYXJnaW46IDA7XG5cdFx0d2lkdGg6IDEwMCU7XG5cdFx0bWF4LXdpZHRoOiBub25lO1xuXHRcdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cdFx0dGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5cblx0XHQkeyBmb250U2l6ZVN0eWxlcyB9O1xuXHRcdCR7IHNpemVTdHlsZXMgfTtcblx0XHQkeyBzaXplUGFkZGluZ3MgfTtcblx0XHQkeyBvdmVyZmxvd1N0eWxlcyB9XG5cdFx0JHsgdmFyaWFudFN0eWxlcyB9XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBEb3duQXJyb3dXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0bWFyZ2luLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAtMSApIH07IC8vIG9wdGljYWxseSBhZGp1c3QgdGhlIGljb25cblx0bGluZS1oZWlnaHQ6IDA7XG5cblx0cGF0aCB7XG5cdFx0ZmlsbDogY3VycmVudENvbG9yO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRDb250cm9sU3VmZml4V3JhcHBlcldpdGhDbGlja1Rocm91Z2ggPSBzdHlsZWQoXG5cdElucHV0Q29udHJvbFN1ZmZpeFdyYXBwZXJcbilgXG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cblx0JHsgcnRsKCB7IHJpZ2h0OiAwIH0gKSB9XG5gO1xuIl19 */");
  };
  var chevronIconSize = 18;
  var sizePaddings = ({
    __next40pxDefaultSize,
    multiple,
    selectSize = "default"
  }) => {
    const padding2 = {
      default: config_values_default.controlPaddingX,
      small: config_values_default.controlPaddingXSmall,
      compact: config_values_default.controlPaddingXSmall,
      "__unstable-large": config_values_default.controlPaddingX
    };
    if (!__next40pxDefaultSize) {
      padding2.default = padding2.compact;
    }
    const selectedPadding = padding2[selectSize] || padding2.default;
    return rtl({
      paddingLeft: selectedPadding,
      paddingRight: selectedPadding + chevronIconSize,
      ...multiple ? {
        paddingTop: selectedPadding,
        paddingBottom: selectedPadding
      } : {}
    });
  };
  var overflowStyles = ({
    multiple
  }) => {
    return {
      overflow: multiple ? "auto" : "hidden"
    };
  };
  var _ref5 = false ? {
    name: "n1jncc",
    styles: "field-sizing:content"
  } : {
    name: "1n00qi9-variantStyles",
    styles: "field-sizing:content;label:variantStyles;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNlbGVjdC1jb250cm9sLXN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE4SVMiLCJmaWxlIjoic2VsZWN0LWNvbnRyb2wtc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIHJ0bCwgQ09ORklHIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi8uLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgdHlwZSB7IFNlbGVjdENvbnRyb2xQcm9wcyB9IGZyb20gJy4uL3R5cGVzJztcbmltcG9ydCBJbnB1dENvbnRyb2xTdWZmaXhXcmFwcGVyIGZyb20gJy4uLy4uL2lucHV0LWNvbnRyb2wvaW5wdXQtc3VmZml4LXdyYXBwZXInO1xuaW1wb3J0IHsgZm9udFNpemVTdHlsZXMgfSBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL3N0eWxlcy9pbnB1dC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgSW5wdXRCYXNlIGZyb20gJy4uLy4uL2lucHV0LWNvbnRyb2wvaW5wdXQtYmFzZSc7XG5cbmludGVyZmFjZSBTZWxlY3RQcm9wc1xuXHRleHRlbmRzIFBpY2s8XG5cdFx0U2VsZWN0Q29udHJvbFByb3BzLFxuXHRcdCdfX25leHQ0MHB4RGVmYXVsdFNpemUnIHwgJ2Rpc2FibGVkJyB8ICdtdWx0aXBsZScgfCAndmFyaWFudCdcblx0PiB7XG5cdC8vIFVzaW5nIGBzZWxlY3RTaXplYCBpbnN0ZWFkIG9mIGBzaXplYCB0byBhdm9pZCBhIHR5cGUgY29uZmxpY3Qgd2l0aCB0aGVcblx0Ly8gYHNpemVgIEhUTUwgYXR0cmlidXRlIG9mIHRoZSBgc2VsZWN0YCBlbGVtZW50LlxuXHRzZWxlY3RTaXplPzogU2VsZWN0Q29udHJvbFByb3BzWyAnc2l6ZScgXTtcbn1cblxuY29uc3QgZGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogU2VsZWN0UHJvcHMgKSA9PiB7XG5cdGlmICggISBkaXNhYmxlZCApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdGNvbG9yOiAkeyBDT0xPUlMudWkudGV4dERpc2FibGVkIH07XG5cdFx0Y3Vyc29yOiBkZWZhdWx0O1xuXHRgO1xufTtcblxuY29uc3QgaW5wdXRCYXNlVmFyaWFudFN0eWxlcyA9ICggeyB2YXJpYW50IH06IFNlbGVjdFByb3BzICkgPT4ge1xuXHRpZiAoIHZhcmlhbnQgPT09ICdtaW5pbWFsJyApIHtcblx0XHRyZXR1cm4gY3NzYFxuXHRcdFx0ZGlzcGxheTogaW5saW5lLWZsZXg7XG5cdFx0YDtcblx0fVxuXG5cdHJldHVybiAnJztcbn07XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRJbnB1dEJhc2UgPSBzdHlsZWQoIElucHV0QmFzZSApYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXG5cdCR7IGRpc2FibGVkU3R5bGVzIH1cblx0JHsgaW5wdXRCYXNlVmFyaWFudFN0eWxlcyB9XG5gO1xuXG5jb25zdCBzaXplU3R5bGVzID0gKCB7XG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0bXVsdGlwbGUsXG5cdHNlbGVjdFNpemUgPSAnZGVmYXVsdCcsXG59OiBTZWxlY3RQcm9wcyApID0+IHtcblx0aWYgKCBtdWx0aXBsZSApIHtcblx0XHQvLyBXaGVuIGBtdWx0aXBsZWAsIGp1c3QgdXNlIHRoZSBuYXRpdmUgYnJvd3NlciBzdHlsZXNcblx0XHQvLyB3aXRob3V0IHNldHRpbmcgZXhwbGljaXQgaGVpZ2h0LlxuXHRcdHJldHVybjtcblx0fVxuXG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRtaW5IZWlnaHQ6IDQwLFxuXHRcdFx0cGFkZGluZ1RvcDogMCxcblx0XHRcdHBhZGRpbmdCb3R0b206IDAsXG5cdFx0fSxcblx0XHRzbWFsbDoge1xuXHRcdFx0aGVpZ2h0OiAyNCxcblx0XHRcdG1pbkhlaWdodDogMjQsXG5cdFx0XHRwYWRkaW5nVG9wOiAwLFxuXHRcdFx0cGFkZGluZ0JvdHRvbTogMCxcblx0XHR9LFxuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdGhlaWdodDogMzIsXG5cdFx0XHRtaW5IZWlnaHQ6IDMyLFxuXHRcdFx0cGFkZGluZ1RvcDogMCxcblx0XHRcdHBhZGRpbmdCb3R0b206IDAsXG5cdFx0fSxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRtaW5IZWlnaHQ6IDQwLFxuXHRcdFx0cGFkZGluZ1RvcDogMCxcblx0XHRcdHBhZGRpbmdCb3R0b206IDAsXG5cdFx0fSxcblx0fTtcblxuXHRpZiAoICEgX19uZXh0NDBweERlZmF1bHRTaXplICkge1xuXHRcdHNpemVzLmRlZmF1bHQgPSBzaXplcy5jb21wYWN0O1xuXHR9XG5cblx0Y29uc3Qgc3R5bGUgPSBzaXplc1sgc2VsZWN0U2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG5cblx0cmV0dXJuIGNzcyggc3R5bGUgKTtcbn07XG5cbmV4cG9ydCBjb25zdCBjaGV2cm9uSWNvblNpemUgPSAxODtcblxuY29uc3Qgc2l6ZVBhZGRpbmdzID0gKCB7XG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0bXVsdGlwbGUsXG5cdHNlbGVjdFNpemUgPSAnZGVmYXVsdCcsXG59OiBTZWxlY3RQcm9wcyApID0+IHtcblx0Y29uc3QgcGFkZGluZyA9IHtcblx0XHRkZWZhdWx0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdHNtYWxsOiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0Y29tcGFjdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0fTtcblxuXHRpZiAoICEgX19uZXh0NDBweERlZmF1bHRTaXplICkge1xuXHRcdHBhZGRpbmcuZGVmYXVsdCA9IHBhZGRpbmcuY29tcGFjdDtcblx0fVxuXG5cdGNvbnN0IHNlbGVjdGVkUGFkZGluZyA9IHBhZGRpbmdbIHNlbGVjdFNpemUgXSB8fCBwYWRkaW5nLmRlZmF1bHQ7XG5cblx0cmV0dXJuIHJ0bCgge1xuXHRcdHBhZGRpbmdMZWZ0OiBzZWxlY3RlZFBhZGRpbmcsXG5cdFx0cGFkZGluZ1JpZ2h0OiBzZWxlY3RlZFBhZGRpbmcgKyBjaGV2cm9uSWNvblNpemUsXG5cdFx0Li4uKCBtdWx0aXBsZVxuXHRcdFx0PyB7XG5cdFx0XHRcdFx0cGFkZGluZ1RvcDogc2VsZWN0ZWRQYWRkaW5nLFxuXHRcdFx0XHRcdHBhZGRpbmdCb3R0b206IHNlbGVjdGVkUGFkZGluZyxcblx0XHRcdCAgfVxuXHRcdFx0OiB7fSApLFxuXHR9ICk7XG59O1xuXG5jb25zdCBvdmVyZmxvd1N0eWxlcyA9ICggeyBtdWx0aXBsZSB9OiBTZWxlY3RQcm9wcyApID0+IHtcblx0cmV0dXJuIHtcblx0XHRvdmVyZmxvdzogbXVsdGlwbGUgPyAnYXV0bycgOiAnaGlkZGVuJyxcblx0fTtcbn07XG5cbmNvbnN0IHZhcmlhbnRTdHlsZXMgPSAoIHsgdmFyaWFudCB9OiBTZWxlY3RQcm9wcyApID0+IHtcblx0aWYgKCB2YXJpYW50ID09PSAnbWluaW1hbCcgKSB7XG5cdFx0cmV0dXJuIGNzcygge1xuXHRcdFx0ZmllbGRTaXppbmc6ICdjb250ZW50Jyxcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4gJyc7XG59O1xuXG4vLyBUT0RPOiBSZXNvbHZlIG5lZWQgdG8gdXNlICYmJiB0byBpbmNyZWFzZSBzcGVjaWZpY2l0eVxuLy8gaHR0cHM6Ly9naXRodWIuY29tL1dvcmRQcmVzcy9ndXRlbmJlcmcvaXNzdWVzLzE4NDgzXG5cbmV4cG9ydCBjb25zdCBTZWxlY3QgPSBzdHlsZWQuc2VsZWN0PCBTZWxlY3RQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGFwcGVhcmFuY2U6IG5vbmU7XG5cdFx0YmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cdFx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0XHRib3JkZXI6IG5vbmU7XG5cdFx0Ym94LXNoYWRvdzogbm9uZSAhaW1wb3J0YW50O1xuXHRcdGNvbG9yOiBjdXJyZW50Q29sb3I7IC8vIE92ZXJyaWRlcyBob3Zlci9mb2N1cyBzdHlsZXMgaW4gZm9ybXMuY3NzXG5cdFx0Y3Vyc29yOiBpbmhlcml0O1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdGZvbnQtZmFtaWx5OiBpbmhlcml0O1xuXHRcdGxpbmUtaGVpZ2h0OiAxLjM7IC8vIE92ZXJyaWRlIGZvcm1zLmNzcyBzdHlsZXMsIGxhcmdlIGVub3VnaCB2YWx1ZSB0byBwcmV2ZW50IGRlc2NlbmRlciBjbGlwcGluZyB3aXRob3V0IGFmZmVjdGluZyBoZWlnaHRcblx0XHRtYXJnaW46IDA7XG5cdFx0d2lkdGg6IDEwMCU7XG5cdFx0bWF4LXdpZHRoOiBub25lO1xuXHRcdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cdFx0dGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5cblx0XHQkeyBmb250U2l6ZVN0eWxlcyB9O1xuXHRcdCR7IHNpemVTdHlsZXMgfTtcblx0XHQkeyBzaXplUGFkZGluZ3MgfTtcblx0XHQkeyBvdmVyZmxvd1N0eWxlcyB9XG5cdFx0JHsgdmFyaWFudFN0eWxlcyB9XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBEb3duQXJyb3dXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0bWFyZ2luLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAtMSApIH07IC8vIG9wdGljYWxseSBhZGp1c3QgdGhlIGljb25cblx0bGluZS1oZWlnaHQ6IDA7XG5cblx0cGF0aCB7XG5cdFx0ZmlsbDogY3VycmVudENvbG9yO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRDb250cm9sU3VmZml4V3JhcHBlcldpdGhDbGlja1Rocm91Z2ggPSBzdHlsZWQoXG5cdElucHV0Q29udHJvbFN1ZmZpeFdyYXBwZXJcbilgXG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cblx0JHsgcnRsKCB7IHJpZ2h0OiAwIH0gKSB9XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__12
  };
  var variantStyles = ({
    variant
  }) => {
    if (variant === "minimal") {
      return _ref5;
    }
    return "";
  };
  var Select3 = /* @__PURE__ */ createStyled("select", false ? {
    target: "e1mv6sxx2"
  } : {
    target: "e1mv6sxx2",
    label: "Select"
  })("&&&{appearance:none;background:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:currentColor;cursor:inherit;display:block;font-family:inherit;line-height:1.3;margin:0;width:100%;max-width:none;white-space:nowrap;text-overflow:ellipsis;", fontSizeStyles, ";", sizeStyles2, ";", sizePaddings, ";", overflowStyles, " ", variantStyles, ";}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNlbGVjdC1jb250cm9sLXN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF5SmtEIiwiZmlsZSI6InNlbGVjdC1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHR5cGUgeyBTZWxlY3RDb250cm9sUHJvcHMgfSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgSW5wdXRDb250cm9sU3VmZml4V3JhcHBlciBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL2lucHV0LXN1ZmZpeC13cmFwcGVyJztcbmltcG9ydCB7IGZvbnRTaXplU3R5bGVzIH0gZnJvbSAnLi4vLi4vaW5wdXQtY29udHJvbC9zdHlsZXMvaW5wdXQtY29udHJvbC1zdHlsZXMnO1xuaW1wb3J0IElucHV0QmFzZSBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL2lucHV0LWJhc2UnO1xuXG5pbnRlcmZhY2UgU2VsZWN0UHJvcHNcblx0ZXh0ZW5kcyBQaWNrPFxuXHRcdFNlbGVjdENvbnRyb2xQcm9wcyxcblx0XHQnX19uZXh0NDBweERlZmF1bHRTaXplJyB8ICdkaXNhYmxlZCcgfCAnbXVsdGlwbGUnIHwgJ3ZhcmlhbnQnXG5cdD4ge1xuXHQvLyBVc2luZyBgc2VsZWN0U2l6ZWAgaW5zdGVhZCBvZiBgc2l6ZWAgdG8gYXZvaWQgYSB0eXBlIGNvbmZsaWN0IHdpdGggdGhlXG5cdC8vIGBzaXplYCBIVE1MIGF0dHJpYnV0ZSBvZiB0aGUgYHNlbGVjdGAgZWxlbWVudC5cblx0c2VsZWN0U2l6ZT86IFNlbGVjdENvbnRyb2xQcm9wc1sgJ3NpemUnIF07XG59XG5cbmNvbnN0IGRpc2FibGVkU3R5bGVzID0gKCB7IGRpc2FibGVkIH06IFNlbGVjdFByb3BzICkgPT4ge1xuXHRpZiAoICEgZGlzYWJsZWQgKSB7XG5cdFx0cmV0dXJuICcnO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLnRleHREaXNhYmxlZCB9O1xuXHRcdGN1cnNvcjogZGVmYXVsdDtcblx0YDtcbn07XG5cbmNvbnN0IGlucHV0QmFzZVZhcmlhbnRTdHlsZXMgPSAoIHsgdmFyaWFudCB9OiBTZWxlY3RQcm9wcyApID0+IHtcblx0aWYgKCB2YXJpYW50ID09PSAnbWluaW1hbCcgKSB7XG5cdFx0cmV0dXJuIGNzc2Bcblx0XHRcdGRpc3BsYXk6IGlubGluZS1mbGV4O1xuXHRcdGA7XG5cdH1cblxuXHRyZXR1cm4gJyc7XG59O1xuXG5leHBvcnQgY29uc3QgU3R5bGVkSW5wdXRCYXNlID0gc3R5bGVkKCBJbnB1dEJhc2UgKWBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdGN1cnNvcjogcG9pbnRlcjtcblxuXHQkeyBkaXNhYmxlZFN0eWxlcyB9XG5cdCR7IGlucHV0QmFzZVZhcmlhbnRTdHlsZXMgfVxuYDtcblxuY29uc3Qgc2l6ZVN0eWxlcyA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdG11bHRpcGxlLFxuXHRzZWxlY3RTaXplID0gJ2RlZmF1bHQnLFxufTogU2VsZWN0UHJvcHMgKSA9PiB7XG5cdGlmICggbXVsdGlwbGUgKSB7XG5cdFx0Ly8gV2hlbiBgbXVsdGlwbGVgLCBqdXN0IHVzZSB0aGUgbmF0aXZlIGJyb3dzZXIgc3R5bGVzXG5cdFx0Ly8gd2l0aG91dCBzZXR0aW5nIGV4cGxpY2l0IGhlaWdodC5cblx0XHRyZXR1cm47XG5cdH1cblxuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiB7XG5cdFx0XHRoZWlnaHQ6IDQwLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdUb3A6IDAsXG5cdFx0XHRwYWRkaW5nQm90dG9tOiAwLFxuXHRcdH0sXG5cdFx0c21hbGw6IHtcblx0XHRcdGhlaWdodDogMjQsXG5cdFx0XHRtaW5IZWlnaHQ6IDI0LFxuXHRcdFx0cGFkZGluZ1RvcDogMCxcblx0XHRcdHBhZGRpbmdCb3R0b206IDAsXG5cdFx0fSxcblx0XHRjb21wYWN0OiB7XG5cdFx0XHRoZWlnaHQ6IDMyLFxuXHRcdFx0bWluSGVpZ2h0OiAzMixcblx0XHRcdHBhZGRpbmdUb3A6IDAsXG5cdFx0XHRwYWRkaW5nQm90dG9tOiAwLFxuXHRcdH0sXG5cdFx0J19fdW5zdGFibGUtbGFyZ2UnOiB7XG5cdFx0XHRoZWlnaHQ6IDQwLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdUb3A6IDAsXG5cdFx0XHRwYWRkaW5nQm90dG9tOiAwLFxuXHRcdH0sXG5cdH07XG5cblx0aWYgKCAhIF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSApIHtcblx0XHRzaXplcy5kZWZhdWx0ID0gc2l6ZXMuY29tcGFjdDtcblx0fVxuXG5cdGNvbnN0IHN0eWxlID0gc2l6ZXNbIHNlbGVjdFNpemUgXSB8fCBzaXplcy5kZWZhdWx0O1xuXG5cdHJldHVybiBjc3MoIHN0eWxlICk7XG59O1xuXG5leHBvcnQgY29uc3QgY2hldnJvbkljb25TaXplID0gMTg7XG5cbmNvbnN0IHNpemVQYWRkaW5ncyA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdG11bHRpcGxlLFxuXHRzZWxlY3RTaXplID0gJ2RlZmF1bHQnLFxufTogU2VsZWN0UHJvcHMgKSA9PiB7XG5cdGNvbnN0IHBhZGRpbmcgPSB7XG5cdFx0ZGVmYXVsdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHRzbWFsbDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdGNvbXBhY3Q6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdH07XG5cblx0aWYgKCAhIF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSApIHtcblx0XHRwYWRkaW5nLmRlZmF1bHQgPSBwYWRkaW5nLmNvbXBhY3Q7XG5cdH1cblxuXHRjb25zdCBzZWxlY3RlZFBhZGRpbmcgPSBwYWRkaW5nWyBzZWxlY3RTaXplIF0gfHwgcGFkZGluZy5kZWZhdWx0O1xuXG5cdHJldHVybiBydGwoIHtcblx0XHRwYWRkaW5nTGVmdDogc2VsZWN0ZWRQYWRkaW5nLFxuXHRcdHBhZGRpbmdSaWdodDogc2VsZWN0ZWRQYWRkaW5nICsgY2hldnJvbkljb25TaXplLFxuXHRcdC4uLiggbXVsdGlwbGVcblx0XHRcdD8ge1xuXHRcdFx0XHRcdHBhZGRpbmdUb3A6IHNlbGVjdGVkUGFkZGluZyxcblx0XHRcdFx0XHRwYWRkaW5nQm90dG9tOiBzZWxlY3RlZFBhZGRpbmcsXG5cdFx0XHQgIH1cblx0XHRcdDoge30gKSxcblx0fSApO1xufTtcblxuY29uc3Qgb3ZlcmZsb3dTdHlsZXMgPSAoIHsgbXVsdGlwbGUgfTogU2VsZWN0UHJvcHMgKSA9PiB7XG5cdHJldHVybiB7XG5cdFx0b3ZlcmZsb3c6IG11bHRpcGxlID8gJ2F1dG8nIDogJ2hpZGRlbicsXG5cdH07XG59O1xuXG5jb25zdCB2YXJpYW50U3R5bGVzID0gKCB7IHZhcmlhbnQgfTogU2VsZWN0UHJvcHMgKSA9PiB7XG5cdGlmICggdmFyaWFudCA9PT0gJ21pbmltYWwnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdGZpZWxkU2l6aW5nOiAnY29udGVudCcsXG5cdFx0fSApO1xuXHR9XG5cblx0cmV0dXJuICcnO1xufTtcblxuLy8gVE9ETzogUmVzb2x2ZSBuZWVkIHRvIHVzZSAmJiYgdG8gaW5jcmVhc2Ugc3BlY2lmaWNpdHlcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9Xb3JkUHJlc3MvZ3V0ZW5iZXJnL2lzc3Vlcy8xODQ4M1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ID0gc3R5bGVkLnNlbGVjdDwgU2VsZWN0UHJvcHMgPmBcblx0JiYmIHtcblx0XHRhcHBlYXJhbmNlOiBub25lO1xuXHRcdGJhY2tncm91bmQ6IHRyYW5zcGFyZW50O1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyOiBub25lO1xuXHRcdGJveC1zaGFkb3c6IG5vbmUgIWltcG9ydGFudDtcblx0XHRjb2xvcjogY3VycmVudENvbG9yOyAvLyBPdmVycmlkZXMgaG92ZXIvZm9jdXMgc3R5bGVzIGluIGZvcm1zLmNzc1xuXHRcdGN1cnNvcjogaW5oZXJpdDtcblx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRmb250LWZhbWlseTogaW5oZXJpdDtcblx0XHRsaW5lLWhlaWdodDogMS4zOyAvLyBPdmVycmlkZSBmb3Jtcy5jc3Mgc3R5bGVzLCBsYXJnZSBlbm91Z2ggdmFsdWUgdG8gcHJldmVudCBkZXNjZW5kZXIgY2xpcHBpbmcgd2l0aG91dCBhZmZlY3RpbmcgaGVpZ2h0XG5cdFx0bWFyZ2luOiAwO1xuXHRcdHdpZHRoOiAxMDAlO1xuXHRcdG1heC13aWR0aDogbm9uZTtcblx0XHR3aGl0ZS1zcGFjZTogbm93cmFwO1xuXHRcdHRleHQtb3ZlcmZsb3c6IGVsbGlwc2lzO1xuXG5cdFx0JHsgZm9udFNpemVTdHlsZXMgfTtcblx0XHQkeyBzaXplU3R5bGVzIH07XG5cdFx0JHsgc2l6ZVBhZGRpbmdzIH07XG5cdFx0JHsgb3ZlcmZsb3dTdHlsZXMgfVxuXHRcdCR7IHZhcmlhbnRTdHlsZXMgfVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgRG93bkFycm93V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbi1pbmxpbmUtZW5kOiAkeyBzcGFjZSggLTEgKSB9OyAvLyBvcHRpY2FsbHkgYWRqdXN0IHRoZSBpY29uXG5cdGxpbmUtaGVpZ2h0OiAwO1xuXG5cdHBhdGgge1xuXHRcdGZpbGw6IGN1cnJlbnRDb2xvcjtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IElucHV0Q29udHJvbFN1ZmZpeFdyYXBwZXJXaXRoQ2xpY2tUaHJvdWdoID0gc3R5bGVkKFxuXHRJbnB1dENvbnRyb2xTdWZmaXhXcmFwcGVyXG4pYFxuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXG5cdCR7IHJ0bCggeyByaWdodDogMCB9ICkgfVxuYDtcbiJdfQ== */"));
  var DownArrowWrapper = /* @__PURE__ */ createStyled("div", false ? {
    target: "e1mv6sxx1"
  } : {
    target: "e1mv6sxx1",
    label: "DownArrowWrapper"
  })("margin-inline-end:", space(-1), ";line-height:0;path{fill:currentColor;}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNlbGVjdC1jb250cm9sLXN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtTDBDIiwiZmlsZSI6InNlbGVjdC1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHR5cGUgeyBTZWxlY3RDb250cm9sUHJvcHMgfSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgSW5wdXRDb250cm9sU3VmZml4V3JhcHBlciBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL2lucHV0LXN1ZmZpeC13cmFwcGVyJztcbmltcG9ydCB7IGZvbnRTaXplU3R5bGVzIH0gZnJvbSAnLi4vLi4vaW5wdXQtY29udHJvbC9zdHlsZXMvaW5wdXQtY29udHJvbC1zdHlsZXMnO1xuaW1wb3J0IElucHV0QmFzZSBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL2lucHV0LWJhc2UnO1xuXG5pbnRlcmZhY2UgU2VsZWN0UHJvcHNcblx0ZXh0ZW5kcyBQaWNrPFxuXHRcdFNlbGVjdENvbnRyb2xQcm9wcyxcblx0XHQnX19uZXh0NDBweERlZmF1bHRTaXplJyB8ICdkaXNhYmxlZCcgfCAnbXVsdGlwbGUnIHwgJ3ZhcmlhbnQnXG5cdD4ge1xuXHQvLyBVc2luZyBgc2VsZWN0U2l6ZWAgaW5zdGVhZCBvZiBgc2l6ZWAgdG8gYXZvaWQgYSB0eXBlIGNvbmZsaWN0IHdpdGggdGhlXG5cdC8vIGBzaXplYCBIVE1MIGF0dHJpYnV0ZSBvZiB0aGUgYHNlbGVjdGAgZWxlbWVudC5cblx0c2VsZWN0U2l6ZT86IFNlbGVjdENvbnRyb2xQcm9wc1sgJ3NpemUnIF07XG59XG5cbmNvbnN0IGRpc2FibGVkU3R5bGVzID0gKCB7IGRpc2FibGVkIH06IFNlbGVjdFByb3BzICkgPT4ge1xuXHRpZiAoICEgZGlzYWJsZWQgKSB7XG5cdFx0cmV0dXJuICcnO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLnRleHREaXNhYmxlZCB9O1xuXHRcdGN1cnNvcjogZGVmYXVsdDtcblx0YDtcbn07XG5cbmNvbnN0IGlucHV0QmFzZVZhcmlhbnRTdHlsZXMgPSAoIHsgdmFyaWFudCB9OiBTZWxlY3RQcm9wcyApID0+IHtcblx0aWYgKCB2YXJpYW50ID09PSAnbWluaW1hbCcgKSB7XG5cdFx0cmV0dXJuIGNzc2Bcblx0XHRcdGRpc3BsYXk6IGlubGluZS1mbGV4O1xuXHRcdGA7XG5cdH1cblxuXHRyZXR1cm4gJyc7XG59O1xuXG5leHBvcnQgY29uc3QgU3R5bGVkSW5wdXRCYXNlID0gc3R5bGVkKCBJbnB1dEJhc2UgKWBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdGN1cnNvcjogcG9pbnRlcjtcblxuXHQkeyBkaXNhYmxlZFN0eWxlcyB9XG5cdCR7IGlucHV0QmFzZVZhcmlhbnRTdHlsZXMgfVxuYDtcblxuY29uc3Qgc2l6ZVN0eWxlcyA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdG11bHRpcGxlLFxuXHRzZWxlY3RTaXplID0gJ2RlZmF1bHQnLFxufTogU2VsZWN0UHJvcHMgKSA9PiB7XG5cdGlmICggbXVsdGlwbGUgKSB7XG5cdFx0Ly8gV2hlbiBgbXVsdGlwbGVgLCBqdXN0IHVzZSB0aGUgbmF0aXZlIGJyb3dzZXIgc3R5bGVzXG5cdFx0Ly8gd2l0aG91dCBzZXR0aW5nIGV4cGxpY2l0IGhlaWdodC5cblx0XHRyZXR1cm47XG5cdH1cblxuXHRjb25zdCBzaXplcyA9IHtcblx0XHRkZWZhdWx0OiB7XG5cdFx0XHRoZWlnaHQ6IDQwLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdUb3A6IDAsXG5cdFx0XHRwYWRkaW5nQm90dG9tOiAwLFxuXHRcdH0sXG5cdFx0c21hbGw6IHtcblx0XHRcdGhlaWdodDogMjQsXG5cdFx0XHRtaW5IZWlnaHQ6IDI0LFxuXHRcdFx0cGFkZGluZ1RvcDogMCxcblx0XHRcdHBhZGRpbmdCb3R0b206IDAsXG5cdFx0fSxcblx0XHRjb21wYWN0OiB7XG5cdFx0XHRoZWlnaHQ6IDMyLFxuXHRcdFx0bWluSGVpZ2h0OiAzMixcblx0XHRcdHBhZGRpbmdUb3A6IDAsXG5cdFx0XHRwYWRkaW5nQm90dG9tOiAwLFxuXHRcdH0sXG5cdFx0J19fdW5zdGFibGUtbGFyZ2UnOiB7XG5cdFx0XHRoZWlnaHQ6IDQwLFxuXHRcdFx0bWluSGVpZ2h0OiA0MCxcblx0XHRcdHBhZGRpbmdUb3A6IDAsXG5cdFx0XHRwYWRkaW5nQm90dG9tOiAwLFxuXHRcdH0sXG5cdH07XG5cblx0aWYgKCAhIF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSApIHtcblx0XHRzaXplcy5kZWZhdWx0ID0gc2l6ZXMuY29tcGFjdDtcblx0fVxuXG5cdGNvbnN0IHN0eWxlID0gc2l6ZXNbIHNlbGVjdFNpemUgXSB8fCBzaXplcy5kZWZhdWx0O1xuXG5cdHJldHVybiBjc3MoIHN0eWxlICk7XG59O1xuXG5leHBvcnQgY29uc3QgY2hldnJvbkljb25TaXplID0gMTg7XG5cbmNvbnN0IHNpemVQYWRkaW5ncyA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdG11bHRpcGxlLFxuXHRzZWxlY3RTaXplID0gJ2RlZmF1bHQnLFxufTogU2VsZWN0UHJvcHMgKSA9PiB7XG5cdGNvbnN0IHBhZGRpbmcgPSB7XG5cdFx0ZGVmYXVsdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0XHRzbWFsbDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdGNvbXBhY3Q6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG5cdH07XG5cblx0aWYgKCAhIF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSApIHtcblx0XHRwYWRkaW5nLmRlZmF1bHQgPSBwYWRkaW5nLmNvbXBhY3Q7XG5cdH1cblxuXHRjb25zdCBzZWxlY3RlZFBhZGRpbmcgPSBwYWRkaW5nWyBzZWxlY3RTaXplIF0gfHwgcGFkZGluZy5kZWZhdWx0O1xuXG5cdHJldHVybiBydGwoIHtcblx0XHRwYWRkaW5nTGVmdDogc2VsZWN0ZWRQYWRkaW5nLFxuXHRcdHBhZGRpbmdSaWdodDogc2VsZWN0ZWRQYWRkaW5nICsgY2hldnJvbkljb25TaXplLFxuXHRcdC4uLiggbXVsdGlwbGVcblx0XHRcdD8ge1xuXHRcdFx0XHRcdHBhZGRpbmdUb3A6IHNlbGVjdGVkUGFkZGluZyxcblx0XHRcdFx0XHRwYWRkaW5nQm90dG9tOiBzZWxlY3RlZFBhZGRpbmcsXG5cdFx0XHQgIH1cblx0XHRcdDoge30gKSxcblx0fSApO1xufTtcblxuY29uc3Qgb3ZlcmZsb3dTdHlsZXMgPSAoIHsgbXVsdGlwbGUgfTogU2VsZWN0UHJvcHMgKSA9PiB7XG5cdHJldHVybiB7XG5cdFx0b3ZlcmZsb3c6IG11bHRpcGxlID8gJ2F1dG8nIDogJ2hpZGRlbicsXG5cdH07XG59O1xuXG5jb25zdCB2YXJpYW50U3R5bGVzID0gKCB7IHZhcmlhbnQgfTogU2VsZWN0UHJvcHMgKSA9PiB7XG5cdGlmICggdmFyaWFudCA9PT0gJ21pbmltYWwnICkge1xuXHRcdHJldHVybiBjc3MoIHtcblx0XHRcdGZpZWxkU2l6aW5nOiAnY29udGVudCcsXG5cdFx0fSApO1xuXHR9XG5cblx0cmV0dXJuICcnO1xufTtcblxuLy8gVE9ETzogUmVzb2x2ZSBuZWVkIHRvIHVzZSAmJiYgdG8gaW5jcmVhc2Ugc3BlY2lmaWNpdHlcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9Xb3JkUHJlc3MvZ3V0ZW5iZXJnL2lzc3Vlcy8xODQ4M1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ID0gc3R5bGVkLnNlbGVjdDwgU2VsZWN0UHJvcHMgPmBcblx0JiYmIHtcblx0XHRhcHBlYXJhbmNlOiBub25lO1xuXHRcdGJhY2tncm91bmQ6IHRyYW5zcGFyZW50O1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0Ym9yZGVyOiBub25lO1xuXHRcdGJveC1zaGFkb3c6IG5vbmUgIWltcG9ydGFudDtcblx0XHRjb2xvcjogY3VycmVudENvbG9yOyAvLyBPdmVycmlkZXMgaG92ZXIvZm9jdXMgc3R5bGVzIGluIGZvcm1zLmNzc1xuXHRcdGN1cnNvcjogaW5oZXJpdDtcblx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRmb250LWZhbWlseTogaW5oZXJpdDtcblx0XHRsaW5lLWhlaWdodDogMS4zOyAvLyBPdmVycmlkZSBmb3Jtcy5jc3Mgc3R5bGVzLCBsYXJnZSBlbm91Z2ggdmFsdWUgdG8gcHJldmVudCBkZXNjZW5kZXIgY2xpcHBpbmcgd2l0aG91dCBhZmZlY3RpbmcgaGVpZ2h0XG5cdFx0bWFyZ2luOiAwO1xuXHRcdHdpZHRoOiAxMDAlO1xuXHRcdG1heC13aWR0aDogbm9uZTtcblx0XHR3aGl0ZS1zcGFjZTogbm93cmFwO1xuXHRcdHRleHQtb3ZlcmZsb3c6IGVsbGlwc2lzO1xuXG5cdFx0JHsgZm9udFNpemVTdHlsZXMgfTtcblx0XHQkeyBzaXplU3R5bGVzIH07XG5cdFx0JHsgc2l6ZVBhZGRpbmdzIH07XG5cdFx0JHsgb3ZlcmZsb3dTdHlsZXMgfVxuXHRcdCR7IHZhcmlhbnRTdHlsZXMgfVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgRG93bkFycm93V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbi1pbmxpbmUtZW5kOiAkeyBzcGFjZSggLTEgKSB9OyAvLyBvcHRpY2FsbHkgYWRqdXN0IHRoZSBpY29uXG5cdGxpbmUtaGVpZ2h0OiAwO1xuXG5cdHBhdGgge1xuXHRcdGZpbGw6IGN1cnJlbnRDb2xvcjtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IElucHV0Q29udHJvbFN1ZmZpeFdyYXBwZXJXaXRoQ2xpY2tUaHJvdWdoID0gc3R5bGVkKFxuXHRJbnB1dENvbnRyb2xTdWZmaXhXcmFwcGVyXG4pYFxuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXG5cdCR7IHJ0bCggeyByaWdodDogMCB9ICkgfVxuYDtcbiJdfQ== */"));
  var InputControlSuffixWrapperWithClickThrough = /* @__PURE__ */ createStyled(input_suffix_wrapper_default, false ? {
    target: "e1mv6sxx0"
  } : {
    target: "e1mv6sxx0",
    label: "InputControlSuffixWrapperWithClickThrough"
  })("position:absolute;pointer-events:none;", rtl({
    right: 0
  }), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNlbGVjdC1jb250cm9sLXN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE4TEMiLCJmaWxlIjoic2VsZWN0LWNvbnRyb2wtc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIHJ0bCwgQ09ORklHIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi8uLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgdHlwZSB7IFNlbGVjdENvbnRyb2xQcm9wcyB9IGZyb20gJy4uL3R5cGVzJztcbmltcG9ydCBJbnB1dENvbnRyb2xTdWZmaXhXcmFwcGVyIGZyb20gJy4uLy4uL2lucHV0LWNvbnRyb2wvaW5wdXQtc3VmZml4LXdyYXBwZXInO1xuaW1wb3J0IHsgZm9udFNpemVTdHlsZXMgfSBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL3N0eWxlcy9pbnB1dC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgSW5wdXRCYXNlIGZyb20gJy4uLy4uL2lucHV0LWNvbnRyb2wvaW5wdXQtYmFzZSc7XG5cbmludGVyZmFjZSBTZWxlY3RQcm9wc1xuXHRleHRlbmRzIFBpY2s8XG5cdFx0U2VsZWN0Q29udHJvbFByb3BzLFxuXHRcdCdfX25leHQ0MHB4RGVmYXVsdFNpemUnIHwgJ2Rpc2FibGVkJyB8ICdtdWx0aXBsZScgfCAndmFyaWFudCdcblx0PiB7XG5cdC8vIFVzaW5nIGBzZWxlY3RTaXplYCBpbnN0ZWFkIG9mIGBzaXplYCB0byBhdm9pZCBhIHR5cGUgY29uZmxpY3Qgd2l0aCB0aGVcblx0Ly8gYHNpemVgIEhUTUwgYXR0cmlidXRlIG9mIHRoZSBgc2VsZWN0YCBlbGVtZW50LlxuXHRzZWxlY3RTaXplPzogU2VsZWN0Q29udHJvbFByb3BzWyAnc2l6ZScgXTtcbn1cblxuY29uc3QgZGlzYWJsZWRTdHlsZXMgPSAoIHsgZGlzYWJsZWQgfTogU2VsZWN0UHJvcHMgKSA9PiB7XG5cdGlmICggISBkaXNhYmxlZCApIHtcblx0XHRyZXR1cm4gJyc7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdGNvbG9yOiAkeyBDT0xPUlMudWkudGV4dERpc2FibGVkIH07XG5cdFx0Y3Vyc29yOiBkZWZhdWx0O1xuXHRgO1xufTtcblxuY29uc3QgaW5wdXRCYXNlVmFyaWFudFN0eWxlcyA9ICggeyB2YXJpYW50IH06IFNlbGVjdFByb3BzICkgPT4ge1xuXHRpZiAoIHZhcmlhbnQgPT09ICdtaW5pbWFsJyApIHtcblx0XHRyZXR1cm4gY3NzYFxuXHRcdFx0ZGlzcGxheTogaW5saW5lLWZsZXg7XG5cdFx0YDtcblx0fVxuXG5cdHJldHVybiAnJztcbn07XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRJbnB1dEJhc2UgPSBzdHlsZWQoIElucHV0QmFzZSApYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXG5cdCR7IGRpc2FibGVkU3R5bGVzIH1cblx0JHsgaW5wdXRCYXNlVmFyaWFudFN0eWxlcyB9XG5gO1xuXG5jb25zdCBzaXplU3R5bGVzID0gKCB7XG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0bXVsdGlwbGUsXG5cdHNlbGVjdFNpemUgPSAnZGVmYXVsdCcsXG59OiBTZWxlY3RQcm9wcyApID0+IHtcblx0aWYgKCBtdWx0aXBsZSApIHtcblx0XHQvLyBXaGVuIGBtdWx0aXBsZWAsIGp1c3QgdXNlIHRoZSBuYXRpdmUgYnJvd3NlciBzdHlsZXNcblx0XHQvLyB3aXRob3V0IHNldHRpbmcgZXhwbGljaXQgaGVpZ2h0LlxuXHRcdHJldHVybjtcblx0fVxuXG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRtaW5IZWlnaHQ6IDQwLFxuXHRcdFx0cGFkZGluZ1RvcDogMCxcblx0XHRcdHBhZGRpbmdCb3R0b206IDAsXG5cdFx0fSxcblx0XHRzbWFsbDoge1xuXHRcdFx0aGVpZ2h0OiAyNCxcblx0XHRcdG1pbkhlaWdodDogMjQsXG5cdFx0XHRwYWRkaW5nVG9wOiAwLFxuXHRcdFx0cGFkZGluZ0JvdHRvbTogMCxcblx0XHR9LFxuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdGhlaWdodDogMzIsXG5cdFx0XHRtaW5IZWlnaHQ6IDMyLFxuXHRcdFx0cGFkZGluZ1RvcDogMCxcblx0XHRcdHBhZGRpbmdCb3R0b206IDAsXG5cdFx0fSxcblx0XHQnX191bnN0YWJsZS1sYXJnZSc6IHtcblx0XHRcdGhlaWdodDogNDAsXG5cdFx0XHRtaW5IZWlnaHQ6IDQwLFxuXHRcdFx0cGFkZGluZ1RvcDogMCxcblx0XHRcdHBhZGRpbmdCb3R0b206IDAsXG5cdFx0fSxcblx0fTtcblxuXHRpZiAoICEgX19uZXh0NDBweERlZmF1bHRTaXplICkge1xuXHRcdHNpemVzLmRlZmF1bHQgPSBzaXplcy5jb21wYWN0O1xuXHR9XG5cblx0Y29uc3Qgc3R5bGUgPSBzaXplc1sgc2VsZWN0U2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG5cblx0cmV0dXJuIGNzcyggc3R5bGUgKTtcbn07XG5cbmV4cG9ydCBjb25zdCBjaGV2cm9uSWNvblNpemUgPSAxODtcblxuY29uc3Qgc2l6ZVBhZGRpbmdzID0gKCB7XG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcblx0bXVsdGlwbGUsXG5cdHNlbGVjdFNpemUgPSAnZGVmYXVsdCcsXG59OiBTZWxlY3RQcm9wcyApID0+IHtcblx0Y29uc3QgcGFkZGluZyA9IHtcblx0XHRkZWZhdWx0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYLFxuXHRcdHNtYWxsOiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdFx0Y29tcGFjdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsLFxuXHRcdCdfX3Vuc3RhYmxlLWxhcmdlJzogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcblx0fTtcblxuXHRpZiAoICEgX19uZXh0NDBweERlZmF1bHRTaXplICkge1xuXHRcdHBhZGRpbmcuZGVmYXVsdCA9IHBhZGRpbmcuY29tcGFjdDtcblx0fVxuXG5cdGNvbnN0IHNlbGVjdGVkUGFkZGluZyA9IHBhZGRpbmdbIHNlbGVjdFNpemUgXSB8fCBwYWRkaW5nLmRlZmF1bHQ7XG5cblx0cmV0dXJuIHJ0bCgge1xuXHRcdHBhZGRpbmdMZWZ0OiBzZWxlY3RlZFBhZGRpbmcsXG5cdFx0cGFkZGluZ1JpZ2h0OiBzZWxlY3RlZFBhZGRpbmcgKyBjaGV2cm9uSWNvblNpemUsXG5cdFx0Li4uKCBtdWx0aXBsZVxuXHRcdFx0PyB7XG5cdFx0XHRcdFx0cGFkZGluZ1RvcDogc2VsZWN0ZWRQYWRkaW5nLFxuXHRcdFx0XHRcdHBhZGRpbmdCb3R0b206IHNlbGVjdGVkUGFkZGluZyxcblx0XHRcdCAgfVxuXHRcdFx0OiB7fSApLFxuXHR9ICk7XG59O1xuXG5jb25zdCBvdmVyZmxvd1N0eWxlcyA9ICggeyBtdWx0aXBsZSB9OiBTZWxlY3RQcm9wcyApID0+IHtcblx0cmV0dXJuIHtcblx0XHRvdmVyZmxvdzogbXVsdGlwbGUgPyAnYXV0bycgOiAnaGlkZGVuJyxcblx0fTtcbn07XG5cbmNvbnN0IHZhcmlhbnRTdHlsZXMgPSAoIHsgdmFyaWFudCB9OiBTZWxlY3RQcm9wcyApID0+IHtcblx0aWYgKCB2YXJpYW50ID09PSAnbWluaW1hbCcgKSB7XG5cdFx0cmV0dXJuIGNzcygge1xuXHRcdFx0ZmllbGRTaXppbmc6ICdjb250ZW50Jyxcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4gJyc7XG59O1xuXG4vLyBUT0RPOiBSZXNvbHZlIG5lZWQgdG8gdXNlICYmJiB0byBpbmNyZWFzZSBzcGVjaWZpY2l0eVxuLy8gaHR0cHM6Ly9naXRodWIuY29tL1dvcmRQcmVzcy9ndXRlbmJlcmcvaXNzdWVzLzE4NDgzXG5cbmV4cG9ydCBjb25zdCBTZWxlY3QgPSBzdHlsZWQuc2VsZWN0PCBTZWxlY3RQcm9wcyA+YFxuXHQmJiYge1xuXHRcdGFwcGVhcmFuY2U6IG5vbmU7XG5cdFx0YmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cdFx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0XHRib3JkZXI6IG5vbmU7XG5cdFx0Ym94LXNoYWRvdzogbm9uZSAhaW1wb3J0YW50O1xuXHRcdGNvbG9yOiBjdXJyZW50Q29sb3I7IC8vIE92ZXJyaWRlcyBob3Zlci9mb2N1cyBzdHlsZXMgaW4gZm9ybXMuY3NzXG5cdFx0Y3Vyc29yOiBpbmhlcml0O1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdGZvbnQtZmFtaWx5OiBpbmhlcml0O1xuXHRcdGxpbmUtaGVpZ2h0OiAxLjM7IC8vIE92ZXJyaWRlIGZvcm1zLmNzcyBzdHlsZXMsIGxhcmdlIGVub3VnaCB2YWx1ZSB0byBwcmV2ZW50IGRlc2NlbmRlciBjbGlwcGluZyB3aXRob3V0IGFmZmVjdGluZyBoZWlnaHRcblx0XHRtYXJnaW46IDA7XG5cdFx0d2lkdGg6IDEwMCU7XG5cdFx0bWF4LXdpZHRoOiBub25lO1xuXHRcdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cdFx0dGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5cblx0XHQkeyBmb250U2l6ZVN0eWxlcyB9O1xuXHRcdCR7IHNpemVTdHlsZXMgfTtcblx0XHQkeyBzaXplUGFkZGluZ3MgfTtcblx0XHQkeyBvdmVyZmxvd1N0eWxlcyB9XG5cdFx0JHsgdmFyaWFudFN0eWxlcyB9XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBEb3duQXJyb3dXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0bWFyZ2luLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAtMSApIH07IC8vIG9wdGljYWxseSBhZGp1c3QgdGhlIGljb25cblx0bGluZS1oZWlnaHQ6IDA7XG5cblx0cGF0aCB7XG5cdFx0ZmlsbDogY3VycmVudENvbG9yO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRDb250cm9sU3VmZml4V3JhcHBlcldpdGhDbGlja1Rocm91Z2ggPSBzdHlsZWQoXG5cdElucHV0Q29udHJvbFN1ZmZpeFdyYXBwZXJcbilgXG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cblx0JHsgcnRsKCB7IHJpZ2h0OiAwIH0gKSB9XG5gO1xuIl19 */"));

  // packages/components/build-module/select-control/chevron-down.mjs
  var import_jsx_runtime123 = __toESM(require_jsx_runtime(), 1);
  var SelectControlChevronDown = () => {
    return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(InputControlSuffixWrapperWithClickThrough, {
      children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(DownArrowWrapper, {
        children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(icon_default2, {
          icon: chevron_down_default,
          size: chevronIconSize
        })
      })
    });
  };
  var chevron_down_default2 = SelectControlChevronDown;

  // packages/components/build-module/select-control/index.mjs
  var import_jsx_runtime124 = __toESM(require_jsx_runtime(), 1);
  function useUniqueId3(idProp) {
    const instanceId = (0, import_compose28.useInstanceId)(SelectControl);
    const id3 = `inspector-select-control-${instanceId}`;
    return idProp || id3;
  }
  function SelectOptions({
    options: options2
  }) {
    return options2.map(({
      id: id3,
      label,
      value,
      ...optionProps
    }, index2) => {
      const key = id3 || `${label}-${value}-${index2}`;
      return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("option", {
        value,
        ...optionProps,
        children: label
      }, key);
    });
  }
  function UnforwardedSelectControl(props, ref) {
    const {
      className: className2,
      disabled = false,
      help,
      hideLabelFromVision,
      id: idProp,
      label,
      multiple = false,
      onChange,
      options: options2 = [],
      size: size3 = "default",
      value: valueProp,
      labelPosition = "top",
      children,
      prefix: prefix2,
      suffix,
      variant = "default",
      __next40pxDefaultSize = false,
      __nextHasNoMarginBottom: _2,
      // Prevent passing to internal component
      __shouldNotWarnDeprecated36pxSize,
      ...restProps
    } = useDeprecated36pxDefaultSizeProp(props);
    const id3 = useUniqueId3(idProp);
    const helpId = help ? `${id3}__help` : void 0;
    if (!options2?.length && !children) {
      return null;
    }
    const handleOnChange = (event) => {
      if (props.multiple) {
        const selectedOptions = Array.from(event.target.options).filter(({
          selected
        }) => selected);
        const newValues = selectedOptions.map(({
          value
        }) => value);
        props.onChange?.(newValues, {
          event
        });
        return;
      }
      props.onChange?.(event.target.value, {
        event
      });
    };
    const classes = clsx_default("components-select-control", className2);
    maybeWarnDeprecated36pxSize({
      componentName: "SelectControl",
      __next40pxDefaultSize,
      size: size3,
      __shouldNotWarnDeprecated36pxSize
    });
    return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(base_control_default, {
      help,
      id: id3,
      className: classes,
      children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(StyledInputBase, {
        disabled,
        hideLabelFromVision,
        id: id3,
        isBorderless: variant === "minimal",
        label,
        size: size3,
        suffix: suffix || !multiple && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(chevron_down_default2, {}),
        prefix: prefix2,
        labelPosition,
        __unstableInputWidth: variant === "minimal" ? "auto" : void 0,
        variant,
        __next40pxDefaultSize,
        children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Select3, {
          ...restProps,
          __next40pxDefaultSize,
          "aria-describedby": helpId,
          className: "components-select-control__input",
          disabled,
          id: id3,
          multiple,
          onChange: handleOnChange,
          ref,
          selectSize: size3,
          value: valueProp,
          variant,
          children: children || /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(SelectOptions, {
            options: options2
          })
        })
      })
    });
  }
  var SelectControl = (0, import_element68.forwardRef)(UnforwardedSelectControl);
  SelectControl.displayName = "SelectControl";
  var select_control_default = SelectControl;

  // packages/components/build-module/range-control/index.mjs
  var import_i18n13 = __toESM(require_i18n(), 1);
  var import_element72 = __toESM(require_element(), 1);
  var import_compose29 = __toESM(require_compose(), 1);

  // packages/components/build-module/range-control/utils.mjs
  var import_element69 = __toESM(require_element(), 1);
  function floatClamp(value, min3, max3) {
    if (typeof value !== "number") {
      return null;
    }
    return parseFloat(`${clamp4(value, min3, max3)}`);
  }
  function useControlledRangeValue(settings) {
    const {
      min: min3,
      max: max3,
      value: valueProp,
      initial
    } = settings;
    const [state, setInternalState] = use_controlled_state_default(floatClamp(valueProp, min3, max3), {
      initial: floatClamp(initial ?? null, min3, max3),
      fallback: null
    });
    const setState = (0, import_element69.useCallback)((nextValue) => {
      if (nextValue === null) {
        setInternalState(null);
      } else {
        setInternalState(floatClamp(nextValue, min3, max3));
      }
    }, [min3, max3, setInternalState]);
    return [state, setState];
  }

  // packages/components/build-module/range-control/input-range.mjs
  var import_element70 = __toESM(require_element(), 1);

  // packages/components/build-module/range-control/styles/range-control-styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__13() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var rangeHeightValue = 30;
  var railHeight = 4;
  var rangeHeight = () => /* @__PURE__ */ css({
    height: rangeHeightValue,
    minHeight: rangeHeightValue
  }, false ? "" : ";label:rangeHeight;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTBCQyIsImZpbGUiOiJyYW5nZS1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IE51bWJlckNvbnRyb2wgZnJvbSAnLi4vLi4vbnVtYmVyLWNvbnRyb2wnO1xuaW1wb3J0IHsgQ09MT1JTLCBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5pbXBvcnQgdHlwZSB7XG5cdFJhbmdlTWFya1Byb3BzLFxuXHRSYWlsUHJvcHMsXG5cdFRodW1iUHJvcHMsXG5cdFRvb2x0aXBQcm9wcyxcblx0VHJhY2tQcm9wcyxcblx0V3JhcHBlclByb3BzLFxuXHRSYW5nZUNvbnRyb2xQcm9wcyxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuXG5jb25zdCByYW5nZUhlaWdodFZhbHVlID0gMzA7XG5jb25zdCByYWlsSGVpZ2h0ID0gNDtcbmNvbnN0IHJhbmdlSGVpZ2h0ID0gKCkgPT5cblx0Y3NzKCB7IGhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSwgbWluSGVpZ2h0OiByYW5nZUhlaWdodFZhbHVlIH0gKTtcbmNvbnN0IHRodW1iU2l6ZSA9IDEyO1xuXG5jb25zdCBkZXByZWNhdGVkSGVpZ2h0ID0gKCB7XG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcbn06IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+ICkgPT5cblx0ISBfX25leHQ0MHB4RGVmYXVsdFNpemUgJiYgY3NzKCB7IG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5cbnR5cGUgUm9vdFByb3BzID0gUGljazwgUmFuZ2VDb250cm9sUHJvcHMsICdfX25leHQ0MHB4RGVmYXVsdFNpemUnID47XG5leHBvcnQgY29uc3QgUm9vdCA9IHN0eWxlZC5kaXY8IFJvb3RQcm9wcyA+YFxuXHQtd2Via2l0LXRhcC1oaWdobGlnaHQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7XG5cdHBhZGRpbmc6IDA7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0dG91Y2gtYWN0aW9uOiBub25lO1xuXHR3aWR0aDogMTAwJTtcblx0bWluLWhlaWdodDogNDBweDtcblx0LyogVE9ETzogcmVtb3ZlIGFmdGVyIHJlbW92aW5nIHRoZSBfX25leHQ0MHB4RGVmYXVsdFNpemUgcHJvcCAqL1xuXHQkeyBkZXByZWNhdGVkSGVpZ2h0IH07XG5gO1xuXG5jb25zdCB3cmFwcGVyQ29sb3IgPSAoIHsgY29sb3IgPSBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTogV3JhcHBlclByb3BzICkgPT5cblx0Y3NzKCB7IGNvbG9yIH0gKTtcblxuZXhwb3J0IGNvbnN0IFdyYXBwZXIgPSBzdHlsZWQoICdkaXYnLCB7XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3A6IHN0cmluZyApID0+XG5cdFx0ISBbICdjb2xvcicsICdtYXJrcycgXS5pbmNsdWRlcyggcHJvcCApLFxufSApPCBXcmFwcGVyUHJvcHMgPmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdGZsZXg6IDE7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cblx0JHsgd3JhcHBlckNvbG9yIH07XG5cdCR7IHJhbmdlSGVpZ2h0IH07XG5gO1xuXG5leHBvcnQgY29uc3QgQmVmb3JlSWNvbldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogZmxleDsgLy8gZW5zdXJlcyB0aGUgaGVpZ2h0IGlzbid0IGFmZmVjdGVkIGJ5IGxpbmUtaGVpZ2h0XG5cdG1hcmdpbi10b3A6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXG5cdCR7IHJ0bCggeyBtYXJnaW5SaWdodDogNiB9ICkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IEFmdGVySWNvbldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogZmxleDsgLy8gZW5zdXJlcyB0aGUgaGVpZ2h0IGlzbid0IGFmZmVjdGVkIGJ5IGxpbmUtaGVpZ2h0XG5cdG1hcmdpbi10b3A6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiA2IH0gKSB9XG5gO1xuXG5jb25zdCByYWlsQmFja2dyb3VuZENvbG9yID0gKCB7IGRpc2FibGVkLCByYWlsQ29sb3IgfTogUmFpbFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy51aS5iYWNrZ3JvdW5kRGlzYWJsZWRcblx0XHRcdDogcmFpbENvbG9yIHx8IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXG5cdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFJhaWwgPSBzdHlsZWQuc3BhbmBcblx0bGVmdDogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHJpZ2h0OiAwO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRtYXJnaW4tdG9wOiAkeyAoIHJhbmdlSGVpZ2h0VmFsdWUgLSByYWlsSGVpZ2h0ICkgLyAyIH1weDtcblx0dG9wOiAwO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXG5cdCR7IHJhaWxCYWNrZ3JvdW5kQ29sb3IgfTtcbmA7XG5cbmNvbnN0IHRyYWNrQmFja2dyb3VuZENvbG9yID0gKCB7IGRpc2FibGVkLCB0cmFja0NvbG9yIH06IFRyYWNrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IHRyYWNrQ29sb3IgfHwgJ2N1cnJlbnRDb2xvcicgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUcmFjayA9IHN0eWxlZC5zcGFuYFxuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXHRoZWlnaHQ6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0ZGlzcGxheTogYmxvY2s7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblxuXHQuaXMtbWFya2VkICYge1xuXHRcdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFx0dHJhbnNpdGlvbjogd2lkdGggZWFzZSAwLjFzO1xuXHRcdH1cblx0fVxuXG5cdCR7IHRyYWNrQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5leHBvcnQgY29uc3QgTWFya3NXcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHR3aWR0aDogMTAwJTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdG1hcmdpbi10b3A6IDE3cHg7XG5gO1xuXG5leHBvcnQgY29uc3QgTWFyayA9IHN0eWxlZC5zcGFuYFxuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdGxlZnQ6IDA7XG5cdHRvcDogLTRweDtcblx0aGVpZ2h0OiA0cHg7XG5cdHdpZHRoOiAycHg7XG5cdHRyYW5zZm9ybTogdHJhbnNsYXRlWCggLTUwJSApO1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZCB9O1xuXHR6LWluZGV4OiAxO1xuYDtcblxuY29uc3QgbWFya0xhYmVsRmlsbCA9ICggeyBpc0ZpbGxlZCB9OiBSYW5nZU1hcmtQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzcygge1xuXHRcdGNvbG9yOiBpc0ZpbGxlZCA/IENPTE9SUy50aGVtZS5ncmF5WyA3MDAgXSA6IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSxcblx0fSApO1xufTtcblxuZXhwb3J0IGNvbnN0IE1hcmtMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmdyYXlbIDMwMCBdIH07XG5cdGZvbnQtc2l6ZTogMTFweDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDhweDtcblx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcblxuXHQkeyBydGwoIHsgbGVmdDogMCB9ICkgfTtcblx0JHsgcnRsKFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggLTUwJSApJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggNTAlICknIH1cblx0KSB9O1xuXG5cdCR7IG1hcmtMYWJlbEZpbGwgfTtcbmA7XG5cbmNvbnN0IHRodW1iQ29sb3IgPSAoIHsgZGlzYWJsZWQgfTogVGh1bWJQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudGhlbWUuZ3JheVsgNDAwIF1cblx0XHRcdDogQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXG5cdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWQgPyAnR3JheVRleHQnIDogJ0NhbnZhc1RleHQnIH07XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFRodW1iV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRoZWlnaHQ6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRtYXJnaW4tdG9wOiAkeyAoIHJhbmdlSGVpZ2h0VmFsdWUgLSB0aHVtYlNpemUgKSAvIDIgfXB4O1xuXHRvdXRsaW5lOiAwO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHR3aWR0aDogJHsgdGh1bWJTaXplIH1weDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdHotaW5kZXg6IDM7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IGxlZnQgZWFzZSAwLjFzO1xuXHRcdH1cblx0fVxuXG5cdCR7IHRodW1iQ29sb3IgfTtcblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IC0xMCB9ICkgfTtcblx0JHsgcnRsKFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggNC41cHggKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC00LjVweCApJyB9XG5cdCkgfTtcbmA7XG5cbmNvbnN0IHRodW1iRm9jdXMgPSAoIHsgaXNGb2N1c2VkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBpc0ZvY3VzZWRcblx0XHQ/IGNzc2Bcblx0XHRcdFx0Jjo6YmVmb3JlIHtcblx0XHRcdFx0XHRjb250ZW50OiAnICc7XG5cdFx0XHRcdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdFx0XHRcdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHRcdFx0XHRvcGFjaXR5OiAwLjQ7XG5cdFx0XHRcdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdFx0XHRcdFx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgKyA4IH1weDtcblx0XHRcdFx0XHR3aWR0aDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0dG9wOiAtNHB4O1xuXHRcdFx0XHRcdGxlZnQ6IC00cHg7XG5cblx0XHRcdFx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRcdFx0XHRiYWNrZ3JvdW5kOiBHcmF5VGV4dDtcblx0XHRcdFx0XHR9XG5cdFx0XHRcdH1cblx0XHQgIGBcblx0XHQ6ICcnO1xufTtcblxuZXhwb3J0IGNvbnN0IFRodW1iID0gc3R5bGVkLnNwYW48IFRodW1iUHJvcHMgPmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdGhlaWdodDogMTAwJTtcblx0b3V0bGluZTogMDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdGJveC1zaGFkb3c6ICR7IENPTkZJRy5lbGV2YXRpb25YU21hbGwgfTtcblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHRodW1iRm9jdXMgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJbnB1dFJhbmdlID0gc3R5bGVkLmlucHV0YFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRjdXJzb3I6IHBvaW50ZXI7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRoZWlnaHQ6IDEwMCU7XG5cdGxlZnQ6IDA7XG5cdG1hcmdpbjogMCAtJHsgdGh1bWJTaXplIC8gMiB9cHg7XG5cdG9wYWNpdHk6IDA7XG5cdG91dGxpbmU6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0cmlnaHQ6IDA7XG5cdHRvcDogMDtcblx0d2lkdGg6IGNhbGMoIDEwMCUgKyAkeyB0aHVtYlNpemUgfXB4ICk7XG5gO1xuXG5jb25zdCB0b29sdGlwU2hvdyA9ICggeyBzaG93IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRkaXNwbGF5OiAkeyBzaG93ID8gJ2lubGluZS1ibG9jaycgOiAnbm9uZScgfTtcblx0XHRvcGFjaXR5OiAkeyBzaG93ID8gMSA6IDAgfTtcblxuXHRcdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFx0dHJhbnNpdGlvbjpcblx0XHRcdFx0b3BhY2l0eSAxMjBtcyBlYXNlLFxuXHRcdFx0XHRkaXNwbGF5IDEyMG1zIGVhc2UgYWxsb3ctZGlzY3JldGU7XG5cdFx0fVxuXG5cdFx0QHN0YXJ0aW5nLXN0eWxlIHtcblx0XHRcdG9wYWNpdHk6IDA7XG5cdFx0fVxuXHRgO1xufTtcblxuY29uc3QgdG9vbHRpcFBsYWNlbWVudCA9ICggeyBwbGFjZW1lbnQgfTogVG9vbHRpcFByb3BzICkgPT4ge1xuXHRjb25zdCBpc0JvdHRvbSA9IHBsYWNlbWVudCA9PT0gJ2JvdHRvbSc7XG5cblx0aWYgKCBpc0JvdHRvbSApIHtcblx0XHRyZXR1cm4gY3NzYFxuXHRcdFx0Ym90dG9tOiAtODAlO1xuXHRcdGA7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdHRvcDogLTgwJTtcblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUb29sdGlwID0gc3R5bGVkLnNwYW48IFRvb2x0aXBQcm9wcyA+YFxuXHRiYWNrZ3JvdW5kOiByZ2JhKCAwLCAwLCAwLCAwLjggKTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGNvbG9yOiB3aGl0ZTtcblx0Zm9udC1zaXplOiAxMnB4O1xuXHRtaW4td2lkdGg6IDMycHg7XG5cdHBhZGRpbmc6IDRweCA4cHg7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRleHQtYWxpZ246IGNlbnRlcjtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cblx0JHsgdG9vbHRpcFNob3cgfTtcblxuXHQkeyB0b29sdGlwUGxhY2VtZW50IH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoLTUwJSknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKDUwJSknIH1cblx0KSB9XG5gO1xuXG4vLyBAdG9kbyBSZWZhY3RvciBSYW5nZUNvbnRyb2wgd2l0aCBsYXRlc3QgSFN0YWNrIGNvbmZpZ3VyYXRpb25cbi8vIEBzZWU6IHBhY2thZ2VzL2NvbXBvbmVudHMvc3JjL2gtc3RhY2tcbmV4cG9ydCBjb25zdCBJbnB1dE51bWJlciA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHRkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG5cdGZvbnQtc2l6ZTogMTNweDtcblx0bWFyZ2luLXRvcDogMDtcblxuXHRpbnB1dFt0eXBlPSdudW1iZXInXSYge1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogYCR7IHNwYWNlKCA0ICkgfSAhaW1wb3J0YW50YCB9ICkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IEFjdGlvblJpZ2h0V3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0bWFyZ2luLXRvcDogMDtcblxuXHRidXR0b24sXG5cdGJ1dHRvbi5pcy1zbWFsbCB7XG5cdFx0bWFyZ2luLWxlZnQ6IDA7XG5cdFx0JHsgcmFuZ2VIZWlnaHQgfTtcblx0fVxuXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiA4IH0gKSB9XG5gO1xuIl19 */");
  var thumbSize = 12;
  var deprecatedHeight = ({
    __next40pxDefaultSize
  }) => !__next40pxDefaultSize && /* @__PURE__ */ css({
    minHeight: rangeHeightValue
  }, false ? "" : ";label:deprecatedHeight;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWdDNEIiLCJmaWxlIjoicmFuZ2UtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBOdW1iZXJDb250cm9sIGZyb20gJy4uLy4uL251bWJlci1jb250cm9sJztcbmltcG9ydCB7IENPTE9SUywgcnRsLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuaW1wb3J0IHR5cGUge1xuXHRSYW5nZU1hcmtQcm9wcyxcblx0UmFpbFByb3BzLFxuXHRUaHVtYlByb3BzLFxuXHRUb29sdGlwUHJvcHMsXG5cdFRyYWNrUHJvcHMsXG5cdFdyYXBwZXJQcm9wcyxcblx0UmFuZ2VDb250cm9sUHJvcHMsXG59IGZyb20gJy4uL3R5cGVzJztcblxuY29uc3QgcmFuZ2VIZWlnaHRWYWx1ZSA9IDMwO1xuY29uc3QgcmFpbEhlaWdodCA9IDQ7XG5jb25zdCByYW5nZUhlaWdodCA9ICgpID0+XG5cdGNzcyggeyBoZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUsIG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5jb25zdCB0aHVtYlNpemUgPSAxMjtcblxuY29uc3QgZGVwcmVjYXRlZEhlaWdodCA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBQaWNrPCBSYW5nZUNvbnRyb2xQcm9wcywgJ19fbmV4dDQwcHhEZWZhdWx0U2l6ZScgPiApID0+XG5cdCEgX19uZXh0NDBweERlZmF1bHRTaXplICYmIGNzcyggeyBtaW5IZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUgfSApO1xuXG50eXBlIFJvb3RQcm9wcyA9IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+O1xuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQuZGl2PCBSb290UHJvcHMgPmBcblx0LXdlYmtpdC10YXAtaGlnaGxpZ2h0LWNvbG9yOiB0cmFuc3BhcmVudDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0anVzdGlmeS1jb250ZW50OiBmbGV4LXN0YXJ0O1xuXHRwYWRkaW5nOiAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHRvdWNoLWFjdGlvbjogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdC8qIFRPRE86IHJlbW92ZSBhZnRlciByZW1vdmluZyB0aGUgX19uZXh0NDBweERlZmF1bHRTaXplIHByb3AgKi9cblx0JHsgZGVwcmVjYXRlZEhlaWdodCB9O1xuYDtcblxuY29uc3Qgd3JhcHBlckNvbG9yID0gKCB7IGNvbG9yID0gQ09MT1JTLnVpLmJvcmRlckZvY3VzIH06IFdyYXBwZXJQcm9wcyApID0+XG5cdGNzcyggeyBjb2xvciB9ICk7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkKCAnZGl2Jywge1xuXHRzaG91bGRGb3J3YXJkUHJvcDogKCBwcm9wOiBzdHJpbmcgKSA9PlxuXHRcdCEgWyAnY29sb3InLCAnbWFya3MnIF0uaW5jbHVkZXMoIHByb3AgKSxcbn0gKTwgV3JhcHBlclByb3BzID5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRmbGV4OiAxO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHdpZHRoOiAxMDAlO1xuXG5cdCR7IHdyYXBwZXJDb2xvciB9O1xuXHQkeyByYW5nZUhlaWdodCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEJlZm9yZUljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luUmlnaHQ6IDYgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBZnRlckljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogNiB9ICkgfVxuYDtcblxuY29uc3QgcmFpbEJhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgcmFpbENvbG9yIH06IFJhaWxQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0XHQ6IHJhaWxDb2xvciB8fCBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0gfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6IEdyYXlUZXh0O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBSYWlsID0gc3R5bGVkLnNwYW5gXG5cdGxlZnQ6IDA7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRyaWdodDogMDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdGhlaWdodDogJHsgcmFpbEhlaWdodCB9cHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblxuXHQkeyByYWlsQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5jb25zdCB0cmFja0JhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgdHJhY2tDb2xvciB9OiBUcmFja1Byb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy50aGVtZS5ncmF5WyA0MDAgXVxuXHRcdFx0OiB0cmFja0NvbG9yIHx8ICdjdXJyZW50Q29sb3InIH07XG5cblx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZCA/ICdHcmF5VGV4dCcgOiAnQ2FudmFzVGV4dCcgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVHJhY2sgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdG1hcmdpbi10b3A6ICR7ICggcmFuZ2VIZWlnaHRWYWx1ZSAtIHJhaWxIZWlnaHQgKSAvIDIgfXB4O1xuXHR0b3A6IDA7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IHdpZHRoIGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0cmFja0JhY2tncm91bmRDb2xvciB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmtzV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRtYXJnaW4tdG9wOiAxN3B4O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmsgPSBzdHlsZWQuc3BhbmBcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRsZWZ0OiAwO1xuXHR0b3A6IC00cHg7XG5cdGhlaWdodDogNHB4O1xuXHR3aWR0aDogMnB4O1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoIC01MCUgKTtcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0ei1pbmRleDogMTtcbmA7XG5cbmNvbnN0IG1hcmtMYWJlbEZpbGwgPSAoIHsgaXNGaWxsZWQgfTogUmFuZ2VNYXJrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogaXNGaWxsZWQgPyBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF0gOiBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0sXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBNYXJrTGFiZWwgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRmb250LXNpemU6IDExcHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiA4cHg7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cblx0JHsgcnRsKCB7IGxlZnQ6IDAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC01MCUgKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDUwJSApJyB9XG5cdCkgfTtcblxuXHQkeyBtYXJrTGFiZWxGaWxsIH07XG5gO1xuXG5jb25zdCB0aHVtYkNvbG9yID0gKCB7IGRpc2FibGVkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgfXB4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gdGh1bWJTaXplICkgLyAyIH1weDtcblx0b3V0bGluZTogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHR6LWluZGV4OiAzO1xuXG5cdC5pcy1tYXJrZWQgJiB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHR0cmFuc2l0aW9uOiBsZWZ0IGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiAtMTAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDQuNXB4ICknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKCAtNC41cHggKScgfVxuXHQpIH07XG5gO1xuXG5jb25zdCB0aHVtYkZvY3VzID0gKCB7IGlzRm9jdXNlZCB9OiBUaHVtYlByb3BzICkgPT4ge1xuXHRyZXR1cm4gaXNGb2N1c2VkXG5cdFx0PyBjc3NgXG5cdFx0XHRcdCY6OmJlZm9yZSB7XG5cdFx0XHRcdFx0Y29udGVudDogJyAnO1xuXHRcdFx0XHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRcdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHRcdFx0b3BhY2l0eTogMC40O1xuXHRcdFx0XHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRcdFx0XHRcdGhlaWdodDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0d2lkdGg6ICR7IHRodW1iU2l6ZSArIDggfXB4O1xuXHRcdFx0XHRcdHRvcDogLTRweDtcblx0XHRcdFx0XHRsZWZ0OiAtNHB4O1xuXG5cdFx0XHRcdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0XHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0XHRcdFx0fVxuXHRcdFx0XHR9XG5cdFx0ICBgXG5cdFx0OiAnJztcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYiA9IHN0eWxlZC5zcGFuPCBUaHVtYlByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRoZWlnaHQ6IDEwMCU7XG5cdG91dGxpbmU6IDA7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdHdpZHRoOiAxMDAlO1xuXHRib3gtc2hhZG93OiAkeyBDT05GSUcuZWxldmF0aW9uWFNtYWxsIH07XG5cblx0JHsgdGh1bWJDb2xvciB9O1xuXHQkeyB0aHVtYkZvY3VzIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRSYW5nZSA9IHN0eWxlZC5pbnB1dGBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAxMDAlO1xuXHRsZWZ0OiAwO1xuXHRtYXJnaW46IDAgLSR7IHRodW1iU2l6ZSAvIDIgfXB4O1xuXHRvcGFjaXR5OiAwO1xuXHRvdXRsaW5lOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHJpZ2h0OiAwO1xuXHR0b3A6IDA7XG5cdHdpZHRoOiBjYWxjKCAxMDAlICsgJHsgdGh1bWJTaXplIH1weCApO1xuYDtcblxuY29uc3QgdG9vbHRpcFNob3cgPSAoIHsgc2hvdyB9OiBUb29sdGlwUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0ZGlzcGxheTogJHsgc2hvdyA/ICdpbmxpbmUtYmxvY2snIDogJ25vbmUnIH07XG5cdFx0b3BhY2l0eTogJHsgc2hvdyA/IDEgOiAwIH07XG5cblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246XG5cdFx0XHRcdG9wYWNpdHkgMTIwbXMgZWFzZSxcblx0XHRcdFx0ZGlzcGxheSAxMjBtcyBlYXNlIGFsbG93LWRpc2NyZXRlO1xuXHRcdH1cblxuXHRcdEBzdGFydGluZy1zdHlsZSB7XG5cdFx0XHRvcGFjaXR5OiAwO1xuXHRcdH1cblx0YDtcbn07XG5cbmNvbnN0IHRvb2x0aXBQbGFjZW1lbnQgPSAoIHsgcGxhY2VtZW50IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0Y29uc3QgaXNCb3R0b20gPSBwbGFjZW1lbnQgPT09ICdib3R0b20nO1xuXG5cdGlmICggaXNCb3R0b20gKSB7XG5cdFx0cmV0dXJuIGNzc2Bcblx0XHRcdGJvdHRvbTogLTgwJTtcblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHR0b3A6IC04MCU7XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHRpcCA9IHN0eWxlZC5zcGFuPCBUb29sdGlwUHJvcHMgPmBcblx0YmFja2dyb3VuZDogcmdiYSggMCwgMCwgMCwgMC44ICk7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRjb2xvcjogd2hpdGU7XG5cdGZvbnQtc2l6ZTogMTJweDtcblx0bWluLXdpZHRoOiAzMnB4O1xuXHRwYWRkaW5nOiA0cHggOHB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRsaW5lLWhlaWdodDogMS40O1xuXG5cdCR7IHRvb2x0aXBTaG93IH07XG5cblx0JHsgdG9vbHRpcFBsYWNlbWVudCB9O1xuXHQkeyBydGwoXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKC01MCUpJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCg1MCUpJyB9XG5cdCkgfVxuYDtcblxuLy8gQHRvZG8gUmVmYWN0b3IgUmFuZ2VDb250cm9sIHdpdGggbGF0ZXN0IEhTdGFjayBjb25maWd1cmF0aW9uXG4vLyBAc2VlOiBwYWNrYWdlcy9jb21wb25lbnRzL3NyYy9oLXN0YWNrXG5leHBvcnQgY29uc3QgSW5wdXROdW1iZXIgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0ZGlzcGxheTogaW5saW5lLWJsb2NrO1xuXHRmb250LXNpemU6IDEzcHg7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0aW5wdXRbdHlwZT0nbnVtYmVyJ10mIHtcblx0XHQkeyByYW5nZUhlaWdodCB9O1xuXHR9XG5cblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IGAkeyBzcGFjZSggNCApIH0gIWltcG9ydGFudGAgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBY3Rpb25SaWdodFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0YnV0dG9uLFxuXHRidXR0b24uaXMtc21hbGwge1xuXHRcdG1hcmdpbi1sZWZ0OiAwO1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogOCB9ICkgfVxuYDtcbiJdfQ== */");
  var Root2 = /* @__PURE__ */ createStyled("div", false ? {
    target: "e1epgpqk14"
  } : {
    target: "e1epgpqk14",
    label: "Root"
  })("-webkit-tap-highlight-color:transparent;align-items:center;display:flex;justify-content:flex-start;padding:0;position:relative;touch-action:none;width:100%;min-height:40px;", deprecatedHeight, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1DMkMiLCJmaWxlIjoicmFuZ2UtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBOdW1iZXJDb250cm9sIGZyb20gJy4uLy4uL251bWJlci1jb250cm9sJztcbmltcG9ydCB7IENPTE9SUywgcnRsLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuaW1wb3J0IHR5cGUge1xuXHRSYW5nZU1hcmtQcm9wcyxcblx0UmFpbFByb3BzLFxuXHRUaHVtYlByb3BzLFxuXHRUb29sdGlwUHJvcHMsXG5cdFRyYWNrUHJvcHMsXG5cdFdyYXBwZXJQcm9wcyxcblx0UmFuZ2VDb250cm9sUHJvcHMsXG59IGZyb20gJy4uL3R5cGVzJztcblxuY29uc3QgcmFuZ2VIZWlnaHRWYWx1ZSA9IDMwO1xuY29uc3QgcmFpbEhlaWdodCA9IDQ7XG5jb25zdCByYW5nZUhlaWdodCA9ICgpID0+XG5cdGNzcyggeyBoZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUsIG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5jb25zdCB0aHVtYlNpemUgPSAxMjtcblxuY29uc3QgZGVwcmVjYXRlZEhlaWdodCA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBQaWNrPCBSYW5nZUNvbnRyb2xQcm9wcywgJ19fbmV4dDQwcHhEZWZhdWx0U2l6ZScgPiApID0+XG5cdCEgX19uZXh0NDBweERlZmF1bHRTaXplICYmIGNzcyggeyBtaW5IZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUgfSApO1xuXG50eXBlIFJvb3RQcm9wcyA9IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+O1xuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQuZGl2PCBSb290UHJvcHMgPmBcblx0LXdlYmtpdC10YXAtaGlnaGxpZ2h0LWNvbG9yOiB0cmFuc3BhcmVudDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0anVzdGlmeS1jb250ZW50OiBmbGV4LXN0YXJ0O1xuXHRwYWRkaW5nOiAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHRvdWNoLWFjdGlvbjogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdC8qIFRPRE86IHJlbW92ZSBhZnRlciByZW1vdmluZyB0aGUgX19uZXh0NDBweERlZmF1bHRTaXplIHByb3AgKi9cblx0JHsgZGVwcmVjYXRlZEhlaWdodCB9O1xuYDtcblxuY29uc3Qgd3JhcHBlckNvbG9yID0gKCB7IGNvbG9yID0gQ09MT1JTLnVpLmJvcmRlckZvY3VzIH06IFdyYXBwZXJQcm9wcyApID0+XG5cdGNzcyggeyBjb2xvciB9ICk7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkKCAnZGl2Jywge1xuXHRzaG91bGRGb3J3YXJkUHJvcDogKCBwcm9wOiBzdHJpbmcgKSA9PlxuXHRcdCEgWyAnY29sb3InLCAnbWFya3MnIF0uaW5jbHVkZXMoIHByb3AgKSxcbn0gKTwgV3JhcHBlclByb3BzID5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRmbGV4OiAxO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHdpZHRoOiAxMDAlO1xuXG5cdCR7IHdyYXBwZXJDb2xvciB9O1xuXHQkeyByYW5nZUhlaWdodCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEJlZm9yZUljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luUmlnaHQ6IDYgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBZnRlckljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogNiB9ICkgfVxuYDtcblxuY29uc3QgcmFpbEJhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgcmFpbENvbG9yIH06IFJhaWxQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0XHQ6IHJhaWxDb2xvciB8fCBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0gfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6IEdyYXlUZXh0O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBSYWlsID0gc3R5bGVkLnNwYW5gXG5cdGxlZnQ6IDA7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRyaWdodDogMDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdGhlaWdodDogJHsgcmFpbEhlaWdodCB9cHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblxuXHQkeyByYWlsQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5jb25zdCB0cmFja0JhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgdHJhY2tDb2xvciB9OiBUcmFja1Byb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy50aGVtZS5ncmF5WyA0MDAgXVxuXHRcdFx0OiB0cmFja0NvbG9yIHx8ICdjdXJyZW50Q29sb3InIH07XG5cblx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZCA/ICdHcmF5VGV4dCcgOiAnQ2FudmFzVGV4dCcgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVHJhY2sgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdG1hcmdpbi10b3A6ICR7ICggcmFuZ2VIZWlnaHRWYWx1ZSAtIHJhaWxIZWlnaHQgKSAvIDIgfXB4O1xuXHR0b3A6IDA7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IHdpZHRoIGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0cmFja0JhY2tncm91bmRDb2xvciB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmtzV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRtYXJnaW4tdG9wOiAxN3B4O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmsgPSBzdHlsZWQuc3BhbmBcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRsZWZ0OiAwO1xuXHR0b3A6IC00cHg7XG5cdGhlaWdodDogNHB4O1xuXHR3aWR0aDogMnB4O1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoIC01MCUgKTtcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0ei1pbmRleDogMTtcbmA7XG5cbmNvbnN0IG1hcmtMYWJlbEZpbGwgPSAoIHsgaXNGaWxsZWQgfTogUmFuZ2VNYXJrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogaXNGaWxsZWQgPyBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF0gOiBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0sXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBNYXJrTGFiZWwgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRmb250LXNpemU6IDExcHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiA4cHg7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cblx0JHsgcnRsKCB7IGxlZnQ6IDAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC01MCUgKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDUwJSApJyB9XG5cdCkgfTtcblxuXHQkeyBtYXJrTGFiZWxGaWxsIH07XG5gO1xuXG5jb25zdCB0aHVtYkNvbG9yID0gKCB7IGRpc2FibGVkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgfXB4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gdGh1bWJTaXplICkgLyAyIH1weDtcblx0b3V0bGluZTogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHR6LWluZGV4OiAzO1xuXG5cdC5pcy1tYXJrZWQgJiB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHR0cmFuc2l0aW9uOiBsZWZ0IGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiAtMTAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDQuNXB4ICknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKCAtNC41cHggKScgfVxuXHQpIH07XG5gO1xuXG5jb25zdCB0aHVtYkZvY3VzID0gKCB7IGlzRm9jdXNlZCB9OiBUaHVtYlByb3BzICkgPT4ge1xuXHRyZXR1cm4gaXNGb2N1c2VkXG5cdFx0PyBjc3NgXG5cdFx0XHRcdCY6OmJlZm9yZSB7XG5cdFx0XHRcdFx0Y29udGVudDogJyAnO1xuXHRcdFx0XHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRcdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHRcdFx0b3BhY2l0eTogMC40O1xuXHRcdFx0XHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRcdFx0XHRcdGhlaWdodDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0d2lkdGg6ICR7IHRodW1iU2l6ZSArIDggfXB4O1xuXHRcdFx0XHRcdHRvcDogLTRweDtcblx0XHRcdFx0XHRsZWZ0OiAtNHB4O1xuXG5cdFx0XHRcdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0XHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0XHRcdFx0fVxuXHRcdFx0XHR9XG5cdFx0ICBgXG5cdFx0OiAnJztcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYiA9IHN0eWxlZC5zcGFuPCBUaHVtYlByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRoZWlnaHQ6IDEwMCU7XG5cdG91dGxpbmU6IDA7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdHdpZHRoOiAxMDAlO1xuXHRib3gtc2hhZG93OiAkeyBDT05GSUcuZWxldmF0aW9uWFNtYWxsIH07XG5cblx0JHsgdGh1bWJDb2xvciB9O1xuXHQkeyB0aHVtYkZvY3VzIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRSYW5nZSA9IHN0eWxlZC5pbnB1dGBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAxMDAlO1xuXHRsZWZ0OiAwO1xuXHRtYXJnaW46IDAgLSR7IHRodW1iU2l6ZSAvIDIgfXB4O1xuXHRvcGFjaXR5OiAwO1xuXHRvdXRsaW5lOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHJpZ2h0OiAwO1xuXHR0b3A6IDA7XG5cdHdpZHRoOiBjYWxjKCAxMDAlICsgJHsgdGh1bWJTaXplIH1weCApO1xuYDtcblxuY29uc3QgdG9vbHRpcFNob3cgPSAoIHsgc2hvdyB9OiBUb29sdGlwUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0ZGlzcGxheTogJHsgc2hvdyA/ICdpbmxpbmUtYmxvY2snIDogJ25vbmUnIH07XG5cdFx0b3BhY2l0eTogJHsgc2hvdyA/IDEgOiAwIH07XG5cblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246XG5cdFx0XHRcdG9wYWNpdHkgMTIwbXMgZWFzZSxcblx0XHRcdFx0ZGlzcGxheSAxMjBtcyBlYXNlIGFsbG93LWRpc2NyZXRlO1xuXHRcdH1cblxuXHRcdEBzdGFydGluZy1zdHlsZSB7XG5cdFx0XHRvcGFjaXR5OiAwO1xuXHRcdH1cblx0YDtcbn07XG5cbmNvbnN0IHRvb2x0aXBQbGFjZW1lbnQgPSAoIHsgcGxhY2VtZW50IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0Y29uc3QgaXNCb3R0b20gPSBwbGFjZW1lbnQgPT09ICdib3R0b20nO1xuXG5cdGlmICggaXNCb3R0b20gKSB7XG5cdFx0cmV0dXJuIGNzc2Bcblx0XHRcdGJvdHRvbTogLTgwJTtcblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHR0b3A6IC04MCU7XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHRpcCA9IHN0eWxlZC5zcGFuPCBUb29sdGlwUHJvcHMgPmBcblx0YmFja2dyb3VuZDogcmdiYSggMCwgMCwgMCwgMC44ICk7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRjb2xvcjogd2hpdGU7XG5cdGZvbnQtc2l6ZTogMTJweDtcblx0bWluLXdpZHRoOiAzMnB4O1xuXHRwYWRkaW5nOiA0cHggOHB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRsaW5lLWhlaWdodDogMS40O1xuXG5cdCR7IHRvb2x0aXBTaG93IH07XG5cblx0JHsgdG9vbHRpcFBsYWNlbWVudCB9O1xuXHQkeyBydGwoXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKC01MCUpJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCg1MCUpJyB9XG5cdCkgfVxuYDtcblxuLy8gQHRvZG8gUmVmYWN0b3IgUmFuZ2VDb250cm9sIHdpdGggbGF0ZXN0IEhTdGFjayBjb25maWd1cmF0aW9uXG4vLyBAc2VlOiBwYWNrYWdlcy9jb21wb25lbnRzL3NyYy9oLXN0YWNrXG5leHBvcnQgY29uc3QgSW5wdXROdW1iZXIgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0ZGlzcGxheTogaW5saW5lLWJsb2NrO1xuXHRmb250LXNpemU6IDEzcHg7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0aW5wdXRbdHlwZT0nbnVtYmVyJ10mIHtcblx0XHQkeyByYW5nZUhlaWdodCB9O1xuXHR9XG5cblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IGAkeyBzcGFjZSggNCApIH0gIWltcG9ydGFudGAgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBY3Rpb25SaWdodFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0YnV0dG9uLFxuXHRidXR0b24uaXMtc21hbGwge1xuXHRcdG1hcmdpbi1sZWZ0OiAwO1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogOCB9ICkgfVxuYDtcbiJdfQ== */"));
  var wrapperColor = ({
    color: color2 = COLORS.ui.borderFocus
  }) => /* @__PURE__ */ css({
    color: color2
  }, false ? "" : ";label:wrapperColor;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWtEQyIsImZpbGUiOiJyYW5nZS1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IE51bWJlckNvbnRyb2wgZnJvbSAnLi4vLi4vbnVtYmVyLWNvbnRyb2wnO1xuaW1wb3J0IHsgQ09MT1JTLCBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5pbXBvcnQgdHlwZSB7XG5cdFJhbmdlTWFya1Byb3BzLFxuXHRSYWlsUHJvcHMsXG5cdFRodW1iUHJvcHMsXG5cdFRvb2x0aXBQcm9wcyxcblx0VHJhY2tQcm9wcyxcblx0V3JhcHBlclByb3BzLFxuXHRSYW5nZUNvbnRyb2xQcm9wcyxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuXG5jb25zdCByYW5nZUhlaWdodFZhbHVlID0gMzA7XG5jb25zdCByYWlsSGVpZ2h0ID0gNDtcbmNvbnN0IHJhbmdlSGVpZ2h0ID0gKCkgPT5cblx0Y3NzKCB7IGhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSwgbWluSGVpZ2h0OiByYW5nZUhlaWdodFZhbHVlIH0gKTtcbmNvbnN0IHRodW1iU2l6ZSA9IDEyO1xuXG5jb25zdCBkZXByZWNhdGVkSGVpZ2h0ID0gKCB7XG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcbn06IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+ICkgPT5cblx0ISBfX25leHQ0MHB4RGVmYXVsdFNpemUgJiYgY3NzKCB7IG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5cbnR5cGUgUm9vdFByb3BzID0gUGljazwgUmFuZ2VDb250cm9sUHJvcHMsICdfX25leHQ0MHB4RGVmYXVsdFNpemUnID47XG5leHBvcnQgY29uc3QgUm9vdCA9IHN0eWxlZC5kaXY8IFJvb3RQcm9wcyA+YFxuXHQtd2Via2l0LXRhcC1oaWdobGlnaHQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7XG5cdHBhZGRpbmc6IDA7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0dG91Y2gtYWN0aW9uOiBub25lO1xuXHR3aWR0aDogMTAwJTtcblx0bWluLWhlaWdodDogNDBweDtcblx0LyogVE9ETzogcmVtb3ZlIGFmdGVyIHJlbW92aW5nIHRoZSBfX25leHQ0MHB4RGVmYXVsdFNpemUgcHJvcCAqL1xuXHQkeyBkZXByZWNhdGVkSGVpZ2h0IH07XG5gO1xuXG5jb25zdCB3cmFwcGVyQ29sb3IgPSAoIHsgY29sb3IgPSBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTogV3JhcHBlclByb3BzICkgPT5cblx0Y3NzKCB7IGNvbG9yIH0gKTtcblxuZXhwb3J0IGNvbnN0IFdyYXBwZXIgPSBzdHlsZWQoICdkaXYnLCB7XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3A6IHN0cmluZyApID0+XG5cdFx0ISBbICdjb2xvcicsICdtYXJrcycgXS5pbmNsdWRlcyggcHJvcCApLFxufSApPCBXcmFwcGVyUHJvcHMgPmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdGZsZXg6IDE7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cblx0JHsgd3JhcHBlckNvbG9yIH07XG5cdCR7IHJhbmdlSGVpZ2h0IH07XG5gO1xuXG5leHBvcnQgY29uc3QgQmVmb3JlSWNvbldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogZmxleDsgLy8gZW5zdXJlcyB0aGUgaGVpZ2h0IGlzbid0IGFmZmVjdGVkIGJ5IGxpbmUtaGVpZ2h0XG5cdG1hcmdpbi10b3A6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXG5cdCR7IHJ0bCggeyBtYXJnaW5SaWdodDogNiB9ICkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IEFmdGVySWNvbldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogZmxleDsgLy8gZW5zdXJlcyB0aGUgaGVpZ2h0IGlzbid0IGFmZmVjdGVkIGJ5IGxpbmUtaGVpZ2h0XG5cdG1hcmdpbi10b3A6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiA2IH0gKSB9XG5gO1xuXG5jb25zdCByYWlsQmFja2dyb3VuZENvbG9yID0gKCB7IGRpc2FibGVkLCByYWlsQ29sb3IgfTogUmFpbFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy51aS5iYWNrZ3JvdW5kRGlzYWJsZWRcblx0XHRcdDogcmFpbENvbG9yIHx8IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXG5cdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFJhaWwgPSBzdHlsZWQuc3BhbmBcblx0bGVmdDogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHJpZ2h0OiAwO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRtYXJnaW4tdG9wOiAkeyAoIHJhbmdlSGVpZ2h0VmFsdWUgLSByYWlsSGVpZ2h0ICkgLyAyIH1weDtcblx0dG9wOiAwO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXG5cdCR7IHJhaWxCYWNrZ3JvdW5kQ29sb3IgfTtcbmA7XG5cbmNvbnN0IHRyYWNrQmFja2dyb3VuZENvbG9yID0gKCB7IGRpc2FibGVkLCB0cmFja0NvbG9yIH06IFRyYWNrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IHRyYWNrQ29sb3IgfHwgJ2N1cnJlbnRDb2xvcicgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUcmFjayA9IHN0eWxlZC5zcGFuYFxuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXHRoZWlnaHQ6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0ZGlzcGxheTogYmxvY2s7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblxuXHQuaXMtbWFya2VkICYge1xuXHRcdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFx0dHJhbnNpdGlvbjogd2lkdGggZWFzZSAwLjFzO1xuXHRcdH1cblx0fVxuXG5cdCR7IHRyYWNrQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5leHBvcnQgY29uc3QgTWFya3NXcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHR3aWR0aDogMTAwJTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdG1hcmdpbi10b3A6IDE3cHg7XG5gO1xuXG5leHBvcnQgY29uc3QgTWFyayA9IHN0eWxlZC5zcGFuYFxuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdGxlZnQ6IDA7XG5cdHRvcDogLTRweDtcblx0aGVpZ2h0OiA0cHg7XG5cdHdpZHRoOiAycHg7XG5cdHRyYW5zZm9ybTogdHJhbnNsYXRlWCggLTUwJSApO1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZCB9O1xuXHR6LWluZGV4OiAxO1xuYDtcblxuY29uc3QgbWFya0xhYmVsRmlsbCA9ICggeyBpc0ZpbGxlZCB9OiBSYW5nZU1hcmtQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzcygge1xuXHRcdGNvbG9yOiBpc0ZpbGxlZCA/IENPTE9SUy50aGVtZS5ncmF5WyA3MDAgXSA6IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSxcblx0fSApO1xufTtcblxuZXhwb3J0IGNvbnN0IE1hcmtMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmdyYXlbIDMwMCBdIH07XG5cdGZvbnQtc2l6ZTogMTFweDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDhweDtcblx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcblxuXHQkeyBydGwoIHsgbGVmdDogMCB9ICkgfTtcblx0JHsgcnRsKFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggLTUwJSApJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggNTAlICknIH1cblx0KSB9O1xuXG5cdCR7IG1hcmtMYWJlbEZpbGwgfTtcbmA7XG5cbmNvbnN0IHRodW1iQ29sb3IgPSAoIHsgZGlzYWJsZWQgfTogVGh1bWJQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudGhlbWUuZ3JheVsgNDAwIF1cblx0XHRcdDogQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXG5cdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWQgPyAnR3JheVRleHQnIDogJ0NhbnZhc1RleHQnIH07XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFRodW1iV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRoZWlnaHQ6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRtYXJnaW4tdG9wOiAkeyAoIHJhbmdlSGVpZ2h0VmFsdWUgLSB0aHVtYlNpemUgKSAvIDIgfXB4O1xuXHRvdXRsaW5lOiAwO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHR3aWR0aDogJHsgdGh1bWJTaXplIH1weDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdHotaW5kZXg6IDM7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IGxlZnQgZWFzZSAwLjFzO1xuXHRcdH1cblx0fVxuXG5cdCR7IHRodW1iQ29sb3IgfTtcblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IC0xMCB9ICkgfTtcblx0JHsgcnRsKFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggNC41cHggKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC00LjVweCApJyB9XG5cdCkgfTtcbmA7XG5cbmNvbnN0IHRodW1iRm9jdXMgPSAoIHsgaXNGb2N1c2VkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBpc0ZvY3VzZWRcblx0XHQ/IGNzc2Bcblx0XHRcdFx0Jjo6YmVmb3JlIHtcblx0XHRcdFx0XHRjb250ZW50OiAnICc7XG5cdFx0XHRcdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdFx0XHRcdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHRcdFx0XHRvcGFjaXR5OiAwLjQ7XG5cdFx0XHRcdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdFx0XHRcdFx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgKyA4IH1weDtcblx0XHRcdFx0XHR3aWR0aDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0dG9wOiAtNHB4O1xuXHRcdFx0XHRcdGxlZnQ6IC00cHg7XG5cblx0XHRcdFx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRcdFx0XHRiYWNrZ3JvdW5kOiBHcmF5VGV4dDtcblx0XHRcdFx0XHR9XG5cdFx0XHRcdH1cblx0XHQgIGBcblx0XHQ6ICcnO1xufTtcblxuZXhwb3J0IGNvbnN0IFRodW1iID0gc3R5bGVkLnNwYW48IFRodW1iUHJvcHMgPmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdGhlaWdodDogMTAwJTtcblx0b3V0bGluZTogMDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdGJveC1zaGFkb3c6ICR7IENPTkZJRy5lbGV2YXRpb25YU21hbGwgfTtcblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHRodW1iRm9jdXMgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJbnB1dFJhbmdlID0gc3R5bGVkLmlucHV0YFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRjdXJzb3I6IHBvaW50ZXI7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRoZWlnaHQ6IDEwMCU7XG5cdGxlZnQ6IDA7XG5cdG1hcmdpbjogMCAtJHsgdGh1bWJTaXplIC8gMiB9cHg7XG5cdG9wYWNpdHk6IDA7XG5cdG91dGxpbmU6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0cmlnaHQ6IDA7XG5cdHRvcDogMDtcblx0d2lkdGg6IGNhbGMoIDEwMCUgKyAkeyB0aHVtYlNpemUgfXB4ICk7XG5gO1xuXG5jb25zdCB0b29sdGlwU2hvdyA9ICggeyBzaG93IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRkaXNwbGF5OiAkeyBzaG93ID8gJ2lubGluZS1ibG9jaycgOiAnbm9uZScgfTtcblx0XHRvcGFjaXR5OiAkeyBzaG93ID8gMSA6IDAgfTtcblxuXHRcdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFx0dHJhbnNpdGlvbjpcblx0XHRcdFx0b3BhY2l0eSAxMjBtcyBlYXNlLFxuXHRcdFx0XHRkaXNwbGF5IDEyMG1zIGVhc2UgYWxsb3ctZGlzY3JldGU7XG5cdFx0fVxuXG5cdFx0QHN0YXJ0aW5nLXN0eWxlIHtcblx0XHRcdG9wYWNpdHk6IDA7XG5cdFx0fVxuXHRgO1xufTtcblxuY29uc3QgdG9vbHRpcFBsYWNlbWVudCA9ICggeyBwbGFjZW1lbnQgfTogVG9vbHRpcFByb3BzICkgPT4ge1xuXHRjb25zdCBpc0JvdHRvbSA9IHBsYWNlbWVudCA9PT0gJ2JvdHRvbSc7XG5cblx0aWYgKCBpc0JvdHRvbSApIHtcblx0XHRyZXR1cm4gY3NzYFxuXHRcdFx0Ym90dG9tOiAtODAlO1xuXHRcdGA7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdHRvcDogLTgwJTtcblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUb29sdGlwID0gc3R5bGVkLnNwYW48IFRvb2x0aXBQcm9wcyA+YFxuXHRiYWNrZ3JvdW5kOiByZ2JhKCAwLCAwLCAwLCAwLjggKTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGNvbG9yOiB3aGl0ZTtcblx0Zm9udC1zaXplOiAxMnB4O1xuXHRtaW4td2lkdGg6IDMycHg7XG5cdHBhZGRpbmc6IDRweCA4cHg7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRleHQtYWxpZ246IGNlbnRlcjtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cblx0JHsgdG9vbHRpcFNob3cgfTtcblxuXHQkeyB0b29sdGlwUGxhY2VtZW50IH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoLTUwJSknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKDUwJSknIH1cblx0KSB9XG5gO1xuXG4vLyBAdG9kbyBSZWZhY3RvciBSYW5nZUNvbnRyb2wgd2l0aCBsYXRlc3QgSFN0YWNrIGNvbmZpZ3VyYXRpb25cbi8vIEBzZWU6IHBhY2thZ2VzL2NvbXBvbmVudHMvc3JjL2gtc3RhY2tcbmV4cG9ydCBjb25zdCBJbnB1dE51bWJlciA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHRkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG5cdGZvbnQtc2l6ZTogMTNweDtcblx0bWFyZ2luLXRvcDogMDtcblxuXHRpbnB1dFt0eXBlPSdudW1iZXInXSYge1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogYCR7IHNwYWNlKCA0ICkgfSAhaW1wb3J0YW50YCB9ICkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IEFjdGlvblJpZ2h0V3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0bWFyZ2luLXRvcDogMDtcblxuXHRidXR0b24sXG5cdGJ1dHRvbi5pcy1zbWFsbCB7XG5cdFx0bWFyZ2luLWxlZnQ6IDA7XG5cdFx0JHsgcmFuZ2VIZWlnaHQgfTtcblx0fVxuXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiA4IH0gKSB9XG5gO1xuIl19 */");
  var Wrapper2 = /* @__PURE__ */ createStyled("div", false ? {
    shouldForwardProp: (prop) => !["color", "marks"].includes(prop),
    target: "e1epgpqk13"
  } : {
    shouldForwardProp: (prop) => !["color", "marks"].includes(prop),
    target: "e1epgpqk13",
    label: "Wrapper"
  })("display:block;flex:1;position:relative;width:100%;", wrapperColor, ";", rangeHeight, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXVEbUIiLCJmaWxlIjoicmFuZ2UtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBOdW1iZXJDb250cm9sIGZyb20gJy4uLy4uL251bWJlci1jb250cm9sJztcbmltcG9ydCB7IENPTE9SUywgcnRsLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuaW1wb3J0IHR5cGUge1xuXHRSYW5nZU1hcmtQcm9wcyxcblx0UmFpbFByb3BzLFxuXHRUaHVtYlByb3BzLFxuXHRUb29sdGlwUHJvcHMsXG5cdFRyYWNrUHJvcHMsXG5cdFdyYXBwZXJQcm9wcyxcblx0UmFuZ2VDb250cm9sUHJvcHMsXG59IGZyb20gJy4uL3R5cGVzJztcblxuY29uc3QgcmFuZ2VIZWlnaHRWYWx1ZSA9IDMwO1xuY29uc3QgcmFpbEhlaWdodCA9IDQ7XG5jb25zdCByYW5nZUhlaWdodCA9ICgpID0+XG5cdGNzcyggeyBoZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUsIG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5jb25zdCB0aHVtYlNpemUgPSAxMjtcblxuY29uc3QgZGVwcmVjYXRlZEhlaWdodCA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBQaWNrPCBSYW5nZUNvbnRyb2xQcm9wcywgJ19fbmV4dDQwcHhEZWZhdWx0U2l6ZScgPiApID0+XG5cdCEgX19uZXh0NDBweERlZmF1bHRTaXplICYmIGNzcyggeyBtaW5IZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUgfSApO1xuXG50eXBlIFJvb3RQcm9wcyA9IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+O1xuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQuZGl2PCBSb290UHJvcHMgPmBcblx0LXdlYmtpdC10YXAtaGlnaGxpZ2h0LWNvbG9yOiB0cmFuc3BhcmVudDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0anVzdGlmeS1jb250ZW50OiBmbGV4LXN0YXJ0O1xuXHRwYWRkaW5nOiAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHRvdWNoLWFjdGlvbjogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdC8qIFRPRE86IHJlbW92ZSBhZnRlciByZW1vdmluZyB0aGUgX19uZXh0NDBweERlZmF1bHRTaXplIHByb3AgKi9cblx0JHsgZGVwcmVjYXRlZEhlaWdodCB9O1xuYDtcblxuY29uc3Qgd3JhcHBlckNvbG9yID0gKCB7IGNvbG9yID0gQ09MT1JTLnVpLmJvcmRlckZvY3VzIH06IFdyYXBwZXJQcm9wcyApID0+XG5cdGNzcyggeyBjb2xvciB9ICk7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkKCAnZGl2Jywge1xuXHRzaG91bGRGb3J3YXJkUHJvcDogKCBwcm9wOiBzdHJpbmcgKSA9PlxuXHRcdCEgWyAnY29sb3InLCAnbWFya3MnIF0uaW5jbHVkZXMoIHByb3AgKSxcbn0gKTwgV3JhcHBlclByb3BzID5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRmbGV4OiAxO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHdpZHRoOiAxMDAlO1xuXG5cdCR7IHdyYXBwZXJDb2xvciB9O1xuXHQkeyByYW5nZUhlaWdodCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEJlZm9yZUljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luUmlnaHQ6IDYgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBZnRlckljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogNiB9ICkgfVxuYDtcblxuY29uc3QgcmFpbEJhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgcmFpbENvbG9yIH06IFJhaWxQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0XHQ6IHJhaWxDb2xvciB8fCBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0gfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6IEdyYXlUZXh0O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBSYWlsID0gc3R5bGVkLnNwYW5gXG5cdGxlZnQ6IDA7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRyaWdodDogMDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdGhlaWdodDogJHsgcmFpbEhlaWdodCB9cHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblxuXHQkeyByYWlsQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5jb25zdCB0cmFja0JhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgdHJhY2tDb2xvciB9OiBUcmFja1Byb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy50aGVtZS5ncmF5WyA0MDAgXVxuXHRcdFx0OiB0cmFja0NvbG9yIHx8ICdjdXJyZW50Q29sb3InIH07XG5cblx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZCA/ICdHcmF5VGV4dCcgOiAnQ2FudmFzVGV4dCcgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVHJhY2sgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdG1hcmdpbi10b3A6ICR7ICggcmFuZ2VIZWlnaHRWYWx1ZSAtIHJhaWxIZWlnaHQgKSAvIDIgfXB4O1xuXHR0b3A6IDA7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IHdpZHRoIGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0cmFja0JhY2tncm91bmRDb2xvciB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmtzV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRtYXJnaW4tdG9wOiAxN3B4O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmsgPSBzdHlsZWQuc3BhbmBcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRsZWZ0OiAwO1xuXHR0b3A6IC00cHg7XG5cdGhlaWdodDogNHB4O1xuXHR3aWR0aDogMnB4O1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoIC01MCUgKTtcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0ei1pbmRleDogMTtcbmA7XG5cbmNvbnN0IG1hcmtMYWJlbEZpbGwgPSAoIHsgaXNGaWxsZWQgfTogUmFuZ2VNYXJrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogaXNGaWxsZWQgPyBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF0gOiBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0sXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBNYXJrTGFiZWwgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRmb250LXNpemU6IDExcHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiA4cHg7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cblx0JHsgcnRsKCB7IGxlZnQ6IDAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC01MCUgKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDUwJSApJyB9XG5cdCkgfTtcblxuXHQkeyBtYXJrTGFiZWxGaWxsIH07XG5gO1xuXG5jb25zdCB0aHVtYkNvbG9yID0gKCB7IGRpc2FibGVkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgfXB4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gdGh1bWJTaXplICkgLyAyIH1weDtcblx0b3V0bGluZTogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHR6LWluZGV4OiAzO1xuXG5cdC5pcy1tYXJrZWQgJiB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHR0cmFuc2l0aW9uOiBsZWZ0IGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiAtMTAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDQuNXB4ICknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKCAtNC41cHggKScgfVxuXHQpIH07XG5gO1xuXG5jb25zdCB0aHVtYkZvY3VzID0gKCB7IGlzRm9jdXNlZCB9OiBUaHVtYlByb3BzICkgPT4ge1xuXHRyZXR1cm4gaXNGb2N1c2VkXG5cdFx0PyBjc3NgXG5cdFx0XHRcdCY6OmJlZm9yZSB7XG5cdFx0XHRcdFx0Y29udGVudDogJyAnO1xuXHRcdFx0XHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRcdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHRcdFx0b3BhY2l0eTogMC40O1xuXHRcdFx0XHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRcdFx0XHRcdGhlaWdodDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0d2lkdGg6ICR7IHRodW1iU2l6ZSArIDggfXB4O1xuXHRcdFx0XHRcdHRvcDogLTRweDtcblx0XHRcdFx0XHRsZWZ0OiAtNHB4O1xuXG5cdFx0XHRcdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0XHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0XHRcdFx0fVxuXHRcdFx0XHR9XG5cdFx0ICBgXG5cdFx0OiAnJztcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYiA9IHN0eWxlZC5zcGFuPCBUaHVtYlByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRoZWlnaHQ6IDEwMCU7XG5cdG91dGxpbmU6IDA7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdHdpZHRoOiAxMDAlO1xuXHRib3gtc2hhZG93OiAkeyBDT05GSUcuZWxldmF0aW9uWFNtYWxsIH07XG5cblx0JHsgdGh1bWJDb2xvciB9O1xuXHQkeyB0aHVtYkZvY3VzIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRSYW5nZSA9IHN0eWxlZC5pbnB1dGBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAxMDAlO1xuXHRsZWZ0OiAwO1xuXHRtYXJnaW46IDAgLSR7IHRodW1iU2l6ZSAvIDIgfXB4O1xuXHRvcGFjaXR5OiAwO1xuXHRvdXRsaW5lOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHJpZ2h0OiAwO1xuXHR0b3A6IDA7XG5cdHdpZHRoOiBjYWxjKCAxMDAlICsgJHsgdGh1bWJTaXplIH1weCApO1xuYDtcblxuY29uc3QgdG9vbHRpcFNob3cgPSAoIHsgc2hvdyB9OiBUb29sdGlwUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0ZGlzcGxheTogJHsgc2hvdyA/ICdpbmxpbmUtYmxvY2snIDogJ25vbmUnIH07XG5cdFx0b3BhY2l0eTogJHsgc2hvdyA/IDEgOiAwIH07XG5cblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246XG5cdFx0XHRcdG9wYWNpdHkgMTIwbXMgZWFzZSxcblx0XHRcdFx0ZGlzcGxheSAxMjBtcyBlYXNlIGFsbG93LWRpc2NyZXRlO1xuXHRcdH1cblxuXHRcdEBzdGFydGluZy1zdHlsZSB7XG5cdFx0XHRvcGFjaXR5OiAwO1xuXHRcdH1cblx0YDtcbn07XG5cbmNvbnN0IHRvb2x0aXBQbGFjZW1lbnQgPSAoIHsgcGxhY2VtZW50IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0Y29uc3QgaXNCb3R0b20gPSBwbGFjZW1lbnQgPT09ICdib3R0b20nO1xuXG5cdGlmICggaXNCb3R0b20gKSB7XG5cdFx0cmV0dXJuIGNzc2Bcblx0XHRcdGJvdHRvbTogLTgwJTtcblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHR0b3A6IC04MCU7XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHRpcCA9IHN0eWxlZC5zcGFuPCBUb29sdGlwUHJvcHMgPmBcblx0YmFja2dyb3VuZDogcmdiYSggMCwgMCwgMCwgMC44ICk7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRjb2xvcjogd2hpdGU7XG5cdGZvbnQtc2l6ZTogMTJweDtcblx0bWluLXdpZHRoOiAzMnB4O1xuXHRwYWRkaW5nOiA0cHggOHB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRsaW5lLWhlaWdodDogMS40O1xuXG5cdCR7IHRvb2x0aXBTaG93IH07XG5cblx0JHsgdG9vbHRpcFBsYWNlbWVudCB9O1xuXHQkeyBydGwoXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKC01MCUpJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCg1MCUpJyB9XG5cdCkgfVxuYDtcblxuLy8gQHRvZG8gUmVmYWN0b3IgUmFuZ2VDb250cm9sIHdpdGggbGF0ZXN0IEhTdGFjayBjb25maWd1cmF0aW9uXG4vLyBAc2VlOiBwYWNrYWdlcy9jb21wb25lbnRzL3NyYy9oLXN0YWNrXG5leHBvcnQgY29uc3QgSW5wdXROdW1iZXIgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0ZGlzcGxheTogaW5saW5lLWJsb2NrO1xuXHRmb250LXNpemU6IDEzcHg7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0aW5wdXRbdHlwZT0nbnVtYmVyJ10mIHtcblx0XHQkeyByYW5nZUhlaWdodCB9O1xuXHR9XG5cblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IGAkeyBzcGFjZSggNCApIH0gIWltcG9ydGFudGAgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBY3Rpb25SaWdodFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0YnV0dG9uLFxuXHRidXR0b24uaXMtc21hbGwge1xuXHRcdG1hcmdpbi1sZWZ0OiAwO1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogOCB9ICkgfVxuYDtcbiJdfQ== */"));
  var BeforeIconWrapper = /* @__PURE__ */ createStyled("span", false ? {
    target: "e1epgpqk12"
  } : {
    target: "e1epgpqk12",
    label: "BeforeIconWrapper"
  })("display:flex;margin-top:", railHeight, "px;", rtl({
    marginRight: 6
  }), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWlFNEMiLCJmaWxlIjoicmFuZ2UtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBOdW1iZXJDb250cm9sIGZyb20gJy4uLy4uL251bWJlci1jb250cm9sJztcbmltcG9ydCB7IENPTE9SUywgcnRsLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuaW1wb3J0IHR5cGUge1xuXHRSYW5nZU1hcmtQcm9wcyxcblx0UmFpbFByb3BzLFxuXHRUaHVtYlByb3BzLFxuXHRUb29sdGlwUHJvcHMsXG5cdFRyYWNrUHJvcHMsXG5cdFdyYXBwZXJQcm9wcyxcblx0UmFuZ2VDb250cm9sUHJvcHMsXG59IGZyb20gJy4uL3R5cGVzJztcblxuY29uc3QgcmFuZ2VIZWlnaHRWYWx1ZSA9IDMwO1xuY29uc3QgcmFpbEhlaWdodCA9IDQ7XG5jb25zdCByYW5nZUhlaWdodCA9ICgpID0+XG5cdGNzcyggeyBoZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUsIG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5jb25zdCB0aHVtYlNpemUgPSAxMjtcblxuY29uc3QgZGVwcmVjYXRlZEhlaWdodCA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBQaWNrPCBSYW5nZUNvbnRyb2xQcm9wcywgJ19fbmV4dDQwcHhEZWZhdWx0U2l6ZScgPiApID0+XG5cdCEgX19uZXh0NDBweERlZmF1bHRTaXplICYmIGNzcyggeyBtaW5IZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUgfSApO1xuXG50eXBlIFJvb3RQcm9wcyA9IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+O1xuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQuZGl2PCBSb290UHJvcHMgPmBcblx0LXdlYmtpdC10YXAtaGlnaGxpZ2h0LWNvbG9yOiB0cmFuc3BhcmVudDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0anVzdGlmeS1jb250ZW50OiBmbGV4LXN0YXJ0O1xuXHRwYWRkaW5nOiAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHRvdWNoLWFjdGlvbjogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdC8qIFRPRE86IHJlbW92ZSBhZnRlciByZW1vdmluZyB0aGUgX19uZXh0NDBweERlZmF1bHRTaXplIHByb3AgKi9cblx0JHsgZGVwcmVjYXRlZEhlaWdodCB9O1xuYDtcblxuY29uc3Qgd3JhcHBlckNvbG9yID0gKCB7IGNvbG9yID0gQ09MT1JTLnVpLmJvcmRlckZvY3VzIH06IFdyYXBwZXJQcm9wcyApID0+XG5cdGNzcyggeyBjb2xvciB9ICk7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkKCAnZGl2Jywge1xuXHRzaG91bGRGb3J3YXJkUHJvcDogKCBwcm9wOiBzdHJpbmcgKSA9PlxuXHRcdCEgWyAnY29sb3InLCAnbWFya3MnIF0uaW5jbHVkZXMoIHByb3AgKSxcbn0gKTwgV3JhcHBlclByb3BzID5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRmbGV4OiAxO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHdpZHRoOiAxMDAlO1xuXG5cdCR7IHdyYXBwZXJDb2xvciB9O1xuXHQkeyByYW5nZUhlaWdodCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEJlZm9yZUljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luUmlnaHQ6IDYgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBZnRlckljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogNiB9ICkgfVxuYDtcblxuY29uc3QgcmFpbEJhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgcmFpbENvbG9yIH06IFJhaWxQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0XHQ6IHJhaWxDb2xvciB8fCBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0gfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6IEdyYXlUZXh0O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBSYWlsID0gc3R5bGVkLnNwYW5gXG5cdGxlZnQ6IDA7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRyaWdodDogMDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdGhlaWdodDogJHsgcmFpbEhlaWdodCB9cHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblxuXHQkeyByYWlsQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5jb25zdCB0cmFja0JhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgdHJhY2tDb2xvciB9OiBUcmFja1Byb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy50aGVtZS5ncmF5WyA0MDAgXVxuXHRcdFx0OiB0cmFja0NvbG9yIHx8ICdjdXJyZW50Q29sb3InIH07XG5cblx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZCA/ICdHcmF5VGV4dCcgOiAnQ2FudmFzVGV4dCcgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVHJhY2sgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdG1hcmdpbi10b3A6ICR7ICggcmFuZ2VIZWlnaHRWYWx1ZSAtIHJhaWxIZWlnaHQgKSAvIDIgfXB4O1xuXHR0b3A6IDA7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IHdpZHRoIGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0cmFja0JhY2tncm91bmRDb2xvciB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmtzV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRtYXJnaW4tdG9wOiAxN3B4O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmsgPSBzdHlsZWQuc3BhbmBcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRsZWZ0OiAwO1xuXHR0b3A6IC00cHg7XG5cdGhlaWdodDogNHB4O1xuXHR3aWR0aDogMnB4O1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoIC01MCUgKTtcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0ei1pbmRleDogMTtcbmA7XG5cbmNvbnN0IG1hcmtMYWJlbEZpbGwgPSAoIHsgaXNGaWxsZWQgfTogUmFuZ2VNYXJrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogaXNGaWxsZWQgPyBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF0gOiBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0sXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBNYXJrTGFiZWwgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRmb250LXNpemU6IDExcHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiA4cHg7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cblx0JHsgcnRsKCB7IGxlZnQ6IDAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC01MCUgKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDUwJSApJyB9XG5cdCkgfTtcblxuXHQkeyBtYXJrTGFiZWxGaWxsIH07XG5gO1xuXG5jb25zdCB0aHVtYkNvbG9yID0gKCB7IGRpc2FibGVkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgfXB4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gdGh1bWJTaXplICkgLyAyIH1weDtcblx0b3V0bGluZTogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHR6LWluZGV4OiAzO1xuXG5cdC5pcy1tYXJrZWQgJiB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHR0cmFuc2l0aW9uOiBsZWZ0IGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiAtMTAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDQuNXB4ICknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKCAtNC41cHggKScgfVxuXHQpIH07XG5gO1xuXG5jb25zdCB0aHVtYkZvY3VzID0gKCB7IGlzRm9jdXNlZCB9OiBUaHVtYlByb3BzICkgPT4ge1xuXHRyZXR1cm4gaXNGb2N1c2VkXG5cdFx0PyBjc3NgXG5cdFx0XHRcdCY6OmJlZm9yZSB7XG5cdFx0XHRcdFx0Y29udGVudDogJyAnO1xuXHRcdFx0XHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRcdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHRcdFx0b3BhY2l0eTogMC40O1xuXHRcdFx0XHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRcdFx0XHRcdGhlaWdodDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0d2lkdGg6ICR7IHRodW1iU2l6ZSArIDggfXB4O1xuXHRcdFx0XHRcdHRvcDogLTRweDtcblx0XHRcdFx0XHRsZWZ0OiAtNHB4O1xuXG5cdFx0XHRcdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0XHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0XHRcdFx0fVxuXHRcdFx0XHR9XG5cdFx0ICBgXG5cdFx0OiAnJztcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYiA9IHN0eWxlZC5zcGFuPCBUaHVtYlByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRoZWlnaHQ6IDEwMCU7XG5cdG91dGxpbmU6IDA7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdHdpZHRoOiAxMDAlO1xuXHRib3gtc2hhZG93OiAkeyBDT05GSUcuZWxldmF0aW9uWFNtYWxsIH07XG5cblx0JHsgdGh1bWJDb2xvciB9O1xuXHQkeyB0aHVtYkZvY3VzIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRSYW5nZSA9IHN0eWxlZC5pbnB1dGBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAxMDAlO1xuXHRsZWZ0OiAwO1xuXHRtYXJnaW46IDAgLSR7IHRodW1iU2l6ZSAvIDIgfXB4O1xuXHRvcGFjaXR5OiAwO1xuXHRvdXRsaW5lOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHJpZ2h0OiAwO1xuXHR0b3A6IDA7XG5cdHdpZHRoOiBjYWxjKCAxMDAlICsgJHsgdGh1bWJTaXplIH1weCApO1xuYDtcblxuY29uc3QgdG9vbHRpcFNob3cgPSAoIHsgc2hvdyB9OiBUb29sdGlwUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0ZGlzcGxheTogJHsgc2hvdyA/ICdpbmxpbmUtYmxvY2snIDogJ25vbmUnIH07XG5cdFx0b3BhY2l0eTogJHsgc2hvdyA/IDEgOiAwIH07XG5cblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246XG5cdFx0XHRcdG9wYWNpdHkgMTIwbXMgZWFzZSxcblx0XHRcdFx0ZGlzcGxheSAxMjBtcyBlYXNlIGFsbG93LWRpc2NyZXRlO1xuXHRcdH1cblxuXHRcdEBzdGFydGluZy1zdHlsZSB7XG5cdFx0XHRvcGFjaXR5OiAwO1xuXHRcdH1cblx0YDtcbn07XG5cbmNvbnN0IHRvb2x0aXBQbGFjZW1lbnQgPSAoIHsgcGxhY2VtZW50IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0Y29uc3QgaXNCb3R0b20gPSBwbGFjZW1lbnQgPT09ICdib3R0b20nO1xuXG5cdGlmICggaXNCb3R0b20gKSB7XG5cdFx0cmV0dXJuIGNzc2Bcblx0XHRcdGJvdHRvbTogLTgwJTtcblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHR0b3A6IC04MCU7XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHRpcCA9IHN0eWxlZC5zcGFuPCBUb29sdGlwUHJvcHMgPmBcblx0YmFja2dyb3VuZDogcmdiYSggMCwgMCwgMCwgMC44ICk7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRjb2xvcjogd2hpdGU7XG5cdGZvbnQtc2l6ZTogMTJweDtcblx0bWluLXdpZHRoOiAzMnB4O1xuXHRwYWRkaW5nOiA0cHggOHB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRsaW5lLWhlaWdodDogMS40O1xuXG5cdCR7IHRvb2x0aXBTaG93IH07XG5cblx0JHsgdG9vbHRpcFBsYWNlbWVudCB9O1xuXHQkeyBydGwoXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKC01MCUpJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCg1MCUpJyB9XG5cdCkgfVxuYDtcblxuLy8gQHRvZG8gUmVmYWN0b3IgUmFuZ2VDb250cm9sIHdpdGggbGF0ZXN0IEhTdGFjayBjb25maWd1cmF0aW9uXG4vLyBAc2VlOiBwYWNrYWdlcy9jb21wb25lbnRzL3NyYy9oLXN0YWNrXG5leHBvcnQgY29uc3QgSW5wdXROdW1iZXIgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0ZGlzcGxheTogaW5saW5lLWJsb2NrO1xuXHRmb250LXNpemU6IDEzcHg7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0aW5wdXRbdHlwZT0nbnVtYmVyJ10mIHtcblx0XHQkeyByYW5nZUhlaWdodCB9O1xuXHR9XG5cblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IGAkeyBzcGFjZSggNCApIH0gIWltcG9ydGFudGAgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBY3Rpb25SaWdodFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0YnV0dG9uLFxuXHRidXR0b24uaXMtc21hbGwge1xuXHRcdG1hcmdpbi1sZWZ0OiAwO1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogOCB9ICkgfVxuYDtcbiJdfQ== */"));
  var AfterIconWrapper = /* @__PURE__ */ createStyled("span", false ? {
    target: "e1epgpqk11"
  } : {
    target: "e1epgpqk11",
    label: "AfterIconWrapper"
  })("display:flex;margin-top:", railHeight, "px;", rtl({
    marginLeft: 6
  }), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXdFMkMiLCJmaWxlIjoicmFuZ2UtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBOdW1iZXJDb250cm9sIGZyb20gJy4uLy4uL251bWJlci1jb250cm9sJztcbmltcG9ydCB7IENPTE9SUywgcnRsLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuaW1wb3J0IHR5cGUge1xuXHRSYW5nZU1hcmtQcm9wcyxcblx0UmFpbFByb3BzLFxuXHRUaHVtYlByb3BzLFxuXHRUb29sdGlwUHJvcHMsXG5cdFRyYWNrUHJvcHMsXG5cdFdyYXBwZXJQcm9wcyxcblx0UmFuZ2VDb250cm9sUHJvcHMsXG59IGZyb20gJy4uL3R5cGVzJztcblxuY29uc3QgcmFuZ2VIZWlnaHRWYWx1ZSA9IDMwO1xuY29uc3QgcmFpbEhlaWdodCA9IDQ7XG5jb25zdCByYW5nZUhlaWdodCA9ICgpID0+XG5cdGNzcyggeyBoZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUsIG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5jb25zdCB0aHVtYlNpemUgPSAxMjtcblxuY29uc3QgZGVwcmVjYXRlZEhlaWdodCA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBQaWNrPCBSYW5nZUNvbnRyb2xQcm9wcywgJ19fbmV4dDQwcHhEZWZhdWx0U2l6ZScgPiApID0+XG5cdCEgX19uZXh0NDBweERlZmF1bHRTaXplICYmIGNzcyggeyBtaW5IZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUgfSApO1xuXG50eXBlIFJvb3RQcm9wcyA9IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+O1xuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQuZGl2PCBSb290UHJvcHMgPmBcblx0LXdlYmtpdC10YXAtaGlnaGxpZ2h0LWNvbG9yOiB0cmFuc3BhcmVudDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0anVzdGlmeS1jb250ZW50OiBmbGV4LXN0YXJ0O1xuXHRwYWRkaW5nOiAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHRvdWNoLWFjdGlvbjogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdC8qIFRPRE86IHJlbW92ZSBhZnRlciByZW1vdmluZyB0aGUgX19uZXh0NDBweERlZmF1bHRTaXplIHByb3AgKi9cblx0JHsgZGVwcmVjYXRlZEhlaWdodCB9O1xuYDtcblxuY29uc3Qgd3JhcHBlckNvbG9yID0gKCB7IGNvbG9yID0gQ09MT1JTLnVpLmJvcmRlckZvY3VzIH06IFdyYXBwZXJQcm9wcyApID0+XG5cdGNzcyggeyBjb2xvciB9ICk7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkKCAnZGl2Jywge1xuXHRzaG91bGRGb3J3YXJkUHJvcDogKCBwcm9wOiBzdHJpbmcgKSA9PlxuXHRcdCEgWyAnY29sb3InLCAnbWFya3MnIF0uaW5jbHVkZXMoIHByb3AgKSxcbn0gKTwgV3JhcHBlclByb3BzID5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRmbGV4OiAxO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHdpZHRoOiAxMDAlO1xuXG5cdCR7IHdyYXBwZXJDb2xvciB9O1xuXHQkeyByYW5nZUhlaWdodCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEJlZm9yZUljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luUmlnaHQ6IDYgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBZnRlckljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogNiB9ICkgfVxuYDtcblxuY29uc3QgcmFpbEJhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgcmFpbENvbG9yIH06IFJhaWxQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0XHQ6IHJhaWxDb2xvciB8fCBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0gfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6IEdyYXlUZXh0O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBSYWlsID0gc3R5bGVkLnNwYW5gXG5cdGxlZnQ6IDA7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRyaWdodDogMDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdGhlaWdodDogJHsgcmFpbEhlaWdodCB9cHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblxuXHQkeyByYWlsQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5jb25zdCB0cmFja0JhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgdHJhY2tDb2xvciB9OiBUcmFja1Byb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy50aGVtZS5ncmF5WyA0MDAgXVxuXHRcdFx0OiB0cmFja0NvbG9yIHx8ICdjdXJyZW50Q29sb3InIH07XG5cblx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZCA/ICdHcmF5VGV4dCcgOiAnQ2FudmFzVGV4dCcgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVHJhY2sgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdG1hcmdpbi10b3A6ICR7ICggcmFuZ2VIZWlnaHRWYWx1ZSAtIHJhaWxIZWlnaHQgKSAvIDIgfXB4O1xuXHR0b3A6IDA7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IHdpZHRoIGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0cmFja0JhY2tncm91bmRDb2xvciB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmtzV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRtYXJnaW4tdG9wOiAxN3B4O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmsgPSBzdHlsZWQuc3BhbmBcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRsZWZ0OiAwO1xuXHR0b3A6IC00cHg7XG5cdGhlaWdodDogNHB4O1xuXHR3aWR0aDogMnB4O1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoIC01MCUgKTtcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0ei1pbmRleDogMTtcbmA7XG5cbmNvbnN0IG1hcmtMYWJlbEZpbGwgPSAoIHsgaXNGaWxsZWQgfTogUmFuZ2VNYXJrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogaXNGaWxsZWQgPyBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF0gOiBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0sXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBNYXJrTGFiZWwgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRmb250LXNpemU6IDExcHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiA4cHg7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cblx0JHsgcnRsKCB7IGxlZnQ6IDAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC01MCUgKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDUwJSApJyB9XG5cdCkgfTtcblxuXHQkeyBtYXJrTGFiZWxGaWxsIH07XG5gO1xuXG5jb25zdCB0aHVtYkNvbG9yID0gKCB7IGRpc2FibGVkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgfXB4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gdGh1bWJTaXplICkgLyAyIH1weDtcblx0b3V0bGluZTogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHR6LWluZGV4OiAzO1xuXG5cdC5pcy1tYXJrZWQgJiB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHR0cmFuc2l0aW9uOiBsZWZ0IGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiAtMTAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDQuNXB4ICknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKCAtNC41cHggKScgfVxuXHQpIH07XG5gO1xuXG5jb25zdCB0aHVtYkZvY3VzID0gKCB7IGlzRm9jdXNlZCB9OiBUaHVtYlByb3BzICkgPT4ge1xuXHRyZXR1cm4gaXNGb2N1c2VkXG5cdFx0PyBjc3NgXG5cdFx0XHRcdCY6OmJlZm9yZSB7XG5cdFx0XHRcdFx0Y29udGVudDogJyAnO1xuXHRcdFx0XHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRcdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHRcdFx0b3BhY2l0eTogMC40O1xuXHRcdFx0XHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRcdFx0XHRcdGhlaWdodDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0d2lkdGg6ICR7IHRodW1iU2l6ZSArIDggfXB4O1xuXHRcdFx0XHRcdHRvcDogLTRweDtcblx0XHRcdFx0XHRsZWZ0OiAtNHB4O1xuXG5cdFx0XHRcdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0XHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0XHRcdFx0fVxuXHRcdFx0XHR9XG5cdFx0ICBgXG5cdFx0OiAnJztcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYiA9IHN0eWxlZC5zcGFuPCBUaHVtYlByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRoZWlnaHQ6IDEwMCU7XG5cdG91dGxpbmU6IDA7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdHdpZHRoOiAxMDAlO1xuXHRib3gtc2hhZG93OiAkeyBDT05GSUcuZWxldmF0aW9uWFNtYWxsIH07XG5cblx0JHsgdGh1bWJDb2xvciB9O1xuXHQkeyB0aHVtYkZvY3VzIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRSYW5nZSA9IHN0eWxlZC5pbnB1dGBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAxMDAlO1xuXHRsZWZ0OiAwO1xuXHRtYXJnaW46IDAgLSR7IHRodW1iU2l6ZSAvIDIgfXB4O1xuXHRvcGFjaXR5OiAwO1xuXHRvdXRsaW5lOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHJpZ2h0OiAwO1xuXHR0b3A6IDA7XG5cdHdpZHRoOiBjYWxjKCAxMDAlICsgJHsgdGh1bWJTaXplIH1weCApO1xuYDtcblxuY29uc3QgdG9vbHRpcFNob3cgPSAoIHsgc2hvdyB9OiBUb29sdGlwUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0ZGlzcGxheTogJHsgc2hvdyA/ICdpbmxpbmUtYmxvY2snIDogJ25vbmUnIH07XG5cdFx0b3BhY2l0eTogJHsgc2hvdyA/IDEgOiAwIH07XG5cblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246XG5cdFx0XHRcdG9wYWNpdHkgMTIwbXMgZWFzZSxcblx0XHRcdFx0ZGlzcGxheSAxMjBtcyBlYXNlIGFsbG93LWRpc2NyZXRlO1xuXHRcdH1cblxuXHRcdEBzdGFydGluZy1zdHlsZSB7XG5cdFx0XHRvcGFjaXR5OiAwO1xuXHRcdH1cblx0YDtcbn07XG5cbmNvbnN0IHRvb2x0aXBQbGFjZW1lbnQgPSAoIHsgcGxhY2VtZW50IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0Y29uc3QgaXNCb3R0b20gPSBwbGFjZW1lbnQgPT09ICdib3R0b20nO1xuXG5cdGlmICggaXNCb3R0b20gKSB7XG5cdFx0cmV0dXJuIGNzc2Bcblx0XHRcdGJvdHRvbTogLTgwJTtcblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHR0b3A6IC04MCU7XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHRpcCA9IHN0eWxlZC5zcGFuPCBUb29sdGlwUHJvcHMgPmBcblx0YmFja2dyb3VuZDogcmdiYSggMCwgMCwgMCwgMC44ICk7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRjb2xvcjogd2hpdGU7XG5cdGZvbnQtc2l6ZTogMTJweDtcblx0bWluLXdpZHRoOiAzMnB4O1xuXHRwYWRkaW5nOiA0cHggOHB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRsaW5lLWhlaWdodDogMS40O1xuXG5cdCR7IHRvb2x0aXBTaG93IH07XG5cblx0JHsgdG9vbHRpcFBsYWNlbWVudCB9O1xuXHQkeyBydGwoXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKC01MCUpJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCg1MCUpJyB9XG5cdCkgfVxuYDtcblxuLy8gQHRvZG8gUmVmYWN0b3IgUmFuZ2VDb250cm9sIHdpdGggbGF0ZXN0IEhTdGFjayBjb25maWd1cmF0aW9uXG4vLyBAc2VlOiBwYWNrYWdlcy9jb21wb25lbnRzL3NyYy9oLXN0YWNrXG5leHBvcnQgY29uc3QgSW5wdXROdW1iZXIgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0ZGlzcGxheTogaW5saW5lLWJsb2NrO1xuXHRmb250LXNpemU6IDEzcHg7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0aW5wdXRbdHlwZT0nbnVtYmVyJ10mIHtcblx0XHQkeyByYW5nZUhlaWdodCB9O1xuXHR9XG5cblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IGAkeyBzcGFjZSggNCApIH0gIWltcG9ydGFudGAgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBY3Rpb25SaWdodFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0YnV0dG9uLFxuXHRidXR0b24uaXMtc21hbGwge1xuXHRcdG1hcmdpbi1sZWZ0OiAwO1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogOCB9ICkgfVxuYDtcbiJdfQ== */"));
  var railBackgroundColor = ({
    disabled,
    railColor
  }) => {
    return /* @__PURE__ */ css("background:", disabled ? COLORS.ui.backgroundDisabled : railColor || COLORS.theme.gray[300], ";@media ( forced-colors: active ){background:GrayText;}" + (false ? "" : ";label:railBackgroundColor;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWdGVyIsImZpbGUiOiJyYW5nZS1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IE51bWJlckNvbnRyb2wgZnJvbSAnLi4vLi4vbnVtYmVyLWNvbnRyb2wnO1xuaW1wb3J0IHsgQ09MT1JTLCBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5pbXBvcnQgdHlwZSB7XG5cdFJhbmdlTWFya1Byb3BzLFxuXHRSYWlsUHJvcHMsXG5cdFRodW1iUHJvcHMsXG5cdFRvb2x0aXBQcm9wcyxcblx0VHJhY2tQcm9wcyxcblx0V3JhcHBlclByb3BzLFxuXHRSYW5nZUNvbnRyb2xQcm9wcyxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuXG5jb25zdCByYW5nZUhlaWdodFZhbHVlID0gMzA7XG5jb25zdCByYWlsSGVpZ2h0ID0gNDtcbmNvbnN0IHJhbmdlSGVpZ2h0ID0gKCkgPT5cblx0Y3NzKCB7IGhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSwgbWluSGVpZ2h0OiByYW5nZUhlaWdodFZhbHVlIH0gKTtcbmNvbnN0IHRodW1iU2l6ZSA9IDEyO1xuXG5jb25zdCBkZXByZWNhdGVkSGVpZ2h0ID0gKCB7XG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcbn06IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+ICkgPT5cblx0ISBfX25leHQ0MHB4RGVmYXVsdFNpemUgJiYgY3NzKCB7IG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5cbnR5cGUgUm9vdFByb3BzID0gUGljazwgUmFuZ2VDb250cm9sUHJvcHMsICdfX25leHQ0MHB4RGVmYXVsdFNpemUnID47XG5leHBvcnQgY29uc3QgUm9vdCA9IHN0eWxlZC5kaXY8IFJvb3RQcm9wcyA+YFxuXHQtd2Via2l0LXRhcC1oaWdobGlnaHQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7XG5cdHBhZGRpbmc6IDA7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0dG91Y2gtYWN0aW9uOiBub25lO1xuXHR3aWR0aDogMTAwJTtcblx0bWluLWhlaWdodDogNDBweDtcblx0LyogVE9ETzogcmVtb3ZlIGFmdGVyIHJlbW92aW5nIHRoZSBfX25leHQ0MHB4RGVmYXVsdFNpemUgcHJvcCAqL1xuXHQkeyBkZXByZWNhdGVkSGVpZ2h0IH07XG5gO1xuXG5jb25zdCB3cmFwcGVyQ29sb3IgPSAoIHsgY29sb3IgPSBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTogV3JhcHBlclByb3BzICkgPT5cblx0Y3NzKCB7IGNvbG9yIH0gKTtcblxuZXhwb3J0IGNvbnN0IFdyYXBwZXIgPSBzdHlsZWQoICdkaXYnLCB7XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3A6IHN0cmluZyApID0+XG5cdFx0ISBbICdjb2xvcicsICdtYXJrcycgXS5pbmNsdWRlcyggcHJvcCApLFxufSApPCBXcmFwcGVyUHJvcHMgPmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdGZsZXg6IDE7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cblx0JHsgd3JhcHBlckNvbG9yIH07XG5cdCR7IHJhbmdlSGVpZ2h0IH07XG5gO1xuXG5leHBvcnQgY29uc3QgQmVmb3JlSWNvbldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogZmxleDsgLy8gZW5zdXJlcyB0aGUgaGVpZ2h0IGlzbid0IGFmZmVjdGVkIGJ5IGxpbmUtaGVpZ2h0XG5cdG1hcmdpbi10b3A6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXG5cdCR7IHJ0bCggeyBtYXJnaW5SaWdodDogNiB9ICkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IEFmdGVySWNvbldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogZmxleDsgLy8gZW5zdXJlcyB0aGUgaGVpZ2h0IGlzbid0IGFmZmVjdGVkIGJ5IGxpbmUtaGVpZ2h0XG5cdG1hcmdpbi10b3A6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiA2IH0gKSB9XG5gO1xuXG5jb25zdCByYWlsQmFja2dyb3VuZENvbG9yID0gKCB7IGRpc2FibGVkLCByYWlsQ29sb3IgfTogUmFpbFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy51aS5iYWNrZ3JvdW5kRGlzYWJsZWRcblx0XHRcdDogcmFpbENvbG9yIHx8IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXG5cdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFJhaWwgPSBzdHlsZWQuc3BhbmBcblx0bGVmdDogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHJpZ2h0OiAwO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRtYXJnaW4tdG9wOiAkeyAoIHJhbmdlSGVpZ2h0VmFsdWUgLSByYWlsSGVpZ2h0ICkgLyAyIH1weDtcblx0dG9wOiAwO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXG5cdCR7IHJhaWxCYWNrZ3JvdW5kQ29sb3IgfTtcbmA7XG5cbmNvbnN0IHRyYWNrQmFja2dyb3VuZENvbG9yID0gKCB7IGRpc2FibGVkLCB0cmFja0NvbG9yIH06IFRyYWNrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IHRyYWNrQ29sb3IgfHwgJ2N1cnJlbnRDb2xvcicgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUcmFjayA9IHN0eWxlZC5zcGFuYFxuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXHRoZWlnaHQ6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0ZGlzcGxheTogYmxvY2s7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblxuXHQuaXMtbWFya2VkICYge1xuXHRcdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFx0dHJhbnNpdGlvbjogd2lkdGggZWFzZSAwLjFzO1xuXHRcdH1cblx0fVxuXG5cdCR7IHRyYWNrQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5leHBvcnQgY29uc3QgTWFya3NXcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHR3aWR0aDogMTAwJTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdG1hcmdpbi10b3A6IDE3cHg7XG5gO1xuXG5leHBvcnQgY29uc3QgTWFyayA9IHN0eWxlZC5zcGFuYFxuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdGxlZnQ6IDA7XG5cdHRvcDogLTRweDtcblx0aGVpZ2h0OiA0cHg7XG5cdHdpZHRoOiAycHg7XG5cdHRyYW5zZm9ybTogdHJhbnNsYXRlWCggLTUwJSApO1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZCB9O1xuXHR6LWluZGV4OiAxO1xuYDtcblxuY29uc3QgbWFya0xhYmVsRmlsbCA9ICggeyBpc0ZpbGxlZCB9OiBSYW5nZU1hcmtQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzcygge1xuXHRcdGNvbG9yOiBpc0ZpbGxlZCA/IENPTE9SUy50aGVtZS5ncmF5WyA3MDAgXSA6IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSxcblx0fSApO1xufTtcblxuZXhwb3J0IGNvbnN0IE1hcmtMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmdyYXlbIDMwMCBdIH07XG5cdGZvbnQtc2l6ZTogMTFweDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDhweDtcblx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcblxuXHQkeyBydGwoIHsgbGVmdDogMCB9ICkgfTtcblx0JHsgcnRsKFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggLTUwJSApJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggNTAlICknIH1cblx0KSB9O1xuXG5cdCR7IG1hcmtMYWJlbEZpbGwgfTtcbmA7XG5cbmNvbnN0IHRodW1iQ29sb3IgPSAoIHsgZGlzYWJsZWQgfTogVGh1bWJQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudGhlbWUuZ3JheVsgNDAwIF1cblx0XHRcdDogQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXG5cdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWQgPyAnR3JheVRleHQnIDogJ0NhbnZhc1RleHQnIH07XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFRodW1iV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRoZWlnaHQ6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRtYXJnaW4tdG9wOiAkeyAoIHJhbmdlSGVpZ2h0VmFsdWUgLSB0aHVtYlNpemUgKSAvIDIgfXB4O1xuXHRvdXRsaW5lOiAwO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHR3aWR0aDogJHsgdGh1bWJTaXplIH1weDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdHotaW5kZXg6IDM7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IGxlZnQgZWFzZSAwLjFzO1xuXHRcdH1cblx0fVxuXG5cdCR7IHRodW1iQ29sb3IgfTtcblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IC0xMCB9ICkgfTtcblx0JHsgcnRsKFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggNC41cHggKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC00LjVweCApJyB9XG5cdCkgfTtcbmA7XG5cbmNvbnN0IHRodW1iRm9jdXMgPSAoIHsgaXNGb2N1c2VkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBpc0ZvY3VzZWRcblx0XHQ/IGNzc2Bcblx0XHRcdFx0Jjo6YmVmb3JlIHtcblx0XHRcdFx0XHRjb250ZW50OiAnICc7XG5cdFx0XHRcdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdFx0XHRcdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHRcdFx0XHRvcGFjaXR5OiAwLjQ7XG5cdFx0XHRcdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdFx0XHRcdFx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgKyA4IH1weDtcblx0XHRcdFx0XHR3aWR0aDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0dG9wOiAtNHB4O1xuXHRcdFx0XHRcdGxlZnQ6IC00cHg7XG5cblx0XHRcdFx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRcdFx0XHRiYWNrZ3JvdW5kOiBHcmF5VGV4dDtcblx0XHRcdFx0XHR9XG5cdFx0XHRcdH1cblx0XHQgIGBcblx0XHQ6ICcnO1xufTtcblxuZXhwb3J0IGNvbnN0IFRodW1iID0gc3R5bGVkLnNwYW48IFRodW1iUHJvcHMgPmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdGhlaWdodDogMTAwJTtcblx0b3V0bGluZTogMDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdGJveC1zaGFkb3c6ICR7IENPTkZJRy5lbGV2YXRpb25YU21hbGwgfTtcblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHRodW1iRm9jdXMgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJbnB1dFJhbmdlID0gc3R5bGVkLmlucHV0YFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRjdXJzb3I6IHBvaW50ZXI7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRoZWlnaHQ6IDEwMCU7XG5cdGxlZnQ6IDA7XG5cdG1hcmdpbjogMCAtJHsgdGh1bWJTaXplIC8gMiB9cHg7XG5cdG9wYWNpdHk6IDA7XG5cdG91dGxpbmU6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0cmlnaHQ6IDA7XG5cdHRvcDogMDtcblx0d2lkdGg6IGNhbGMoIDEwMCUgKyAkeyB0aHVtYlNpemUgfXB4ICk7XG5gO1xuXG5jb25zdCB0b29sdGlwU2hvdyA9ICggeyBzaG93IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRkaXNwbGF5OiAkeyBzaG93ID8gJ2lubGluZS1ibG9jaycgOiAnbm9uZScgfTtcblx0XHRvcGFjaXR5OiAkeyBzaG93ID8gMSA6IDAgfTtcblxuXHRcdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFx0dHJhbnNpdGlvbjpcblx0XHRcdFx0b3BhY2l0eSAxMjBtcyBlYXNlLFxuXHRcdFx0XHRkaXNwbGF5IDEyMG1zIGVhc2UgYWxsb3ctZGlzY3JldGU7XG5cdFx0fVxuXG5cdFx0QHN0YXJ0aW5nLXN0eWxlIHtcblx0XHRcdG9wYWNpdHk6IDA7XG5cdFx0fVxuXHRgO1xufTtcblxuY29uc3QgdG9vbHRpcFBsYWNlbWVudCA9ICggeyBwbGFjZW1lbnQgfTogVG9vbHRpcFByb3BzICkgPT4ge1xuXHRjb25zdCBpc0JvdHRvbSA9IHBsYWNlbWVudCA9PT0gJ2JvdHRvbSc7XG5cblx0aWYgKCBpc0JvdHRvbSApIHtcblx0XHRyZXR1cm4gY3NzYFxuXHRcdFx0Ym90dG9tOiAtODAlO1xuXHRcdGA7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdHRvcDogLTgwJTtcblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUb29sdGlwID0gc3R5bGVkLnNwYW48IFRvb2x0aXBQcm9wcyA+YFxuXHRiYWNrZ3JvdW5kOiByZ2JhKCAwLCAwLCAwLCAwLjggKTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGNvbG9yOiB3aGl0ZTtcblx0Zm9udC1zaXplOiAxMnB4O1xuXHRtaW4td2lkdGg6IDMycHg7XG5cdHBhZGRpbmc6IDRweCA4cHg7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRleHQtYWxpZ246IGNlbnRlcjtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cblx0JHsgdG9vbHRpcFNob3cgfTtcblxuXHQkeyB0b29sdGlwUGxhY2VtZW50IH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoLTUwJSknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKDUwJSknIH1cblx0KSB9XG5gO1xuXG4vLyBAdG9kbyBSZWZhY3RvciBSYW5nZUNvbnRyb2wgd2l0aCBsYXRlc3QgSFN0YWNrIGNvbmZpZ3VyYXRpb25cbi8vIEBzZWU6IHBhY2thZ2VzL2NvbXBvbmVudHMvc3JjL2gtc3RhY2tcbmV4cG9ydCBjb25zdCBJbnB1dE51bWJlciA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHRkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG5cdGZvbnQtc2l6ZTogMTNweDtcblx0bWFyZ2luLXRvcDogMDtcblxuXHRpbnB1dFt0eXBlPSdudW1iZXInXSYge1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogYCR7IHNwYWNlKCA0ICkgfSAhaW1wb3J0YW50YCB9ICkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IEFjdGlvblJpZ2h0V3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0bWFyZ2luLXRvcDogMDtcblxuXHRidXR0b24sXG5cdGJ1dHRvbi5pcy1zbWFsbCB7XG5cdFx0bWFyZ2luLWxlZnQ6IDA7XG5cdFx0JHsgcmFuZ2VIZWlnaHQgfTtcblx0fVxuXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiA4IH0gKSB9XG5gO1xuIl19 */");
  };
  var Rail = /* @__PURE__ */ createStyled("span", false ? {
    target: "e1epgpqk10"
  } : {
    target: "e1epgpqk10",
    label: "Rail"
  })("left:0;pointer-events:none;right:0;display:block;height:", railHeight, "px;position:absolute;margin-top:", (rangeHeightValue - railHeight) / 2, "px;top:0;border-radius:", config_values_default.radiusFull, ";", railBackgroundColor, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTJGK0IiLCJmaWxlIjoicmFuZ2UtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBOdW1iZXJDb250cm9sIGZyb20gJy4uLy4uL251bWJlci1jb250cm9sJztcbmltcG9ydCB7IENPTE9SUywgcnRsLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuaW1wb3J0IHR5cGUge1xuXHRSYW5nZU1hcmtQcm9wcyxcblx0UmFpbFByb3BzLFxuXHRUaHVtYlByb3BzLFxuXHRUb29sdGlwUHJvcHMsXG5cdFRyYWNrUHJvcHMsXG5cdFdyYXBwZXJQcm9wcyxcblx0UmFuZ2VDb250cm9sUHJvcHMsXG59IGZyb20gJy4uL3R5cGVzJztcblxuY29uc3QgcmFuZ2VIZWlnaHRWYWx1ZSA9IDMwO1xuY29uc3QgcmFpbEhlaWdodCA9IDQ7XG5jb25zdCByYW5nZUhlaWdodCA9ICgpID0+XG5cdGNzcyggeyBoZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUsIG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5jb25zdCB0aHVtYlNpemUgPSAxMjtcblxuY29uc3QgZGVwcmVjYXRlZEhlaWdodCA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBQaWNrPCBSYW5nZUNvbnRyb2xQcm9wcywgJ19fbmV4dDQwcHhEZWZhdWx0U2l6ZScgPiApID0+XG5cdCEgX19uZXh0NDBweERlZmF1bHRTaXplICYmIGNzcyggeyBtaW5IZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUgfSApO1xuXG50eXBlIFJvb3RQcm9wcyA9IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+O1xuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQuZGl2PCBSb290UHJvcHMgPmBcblx0LXdlYmtpdC10YXAtaGlnaGxpZ2h0LWNvbG9yOiB0cmFuc3BhcmVudDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0anVzdGlmeS1jb250ZW50OiBmbGV4LXN0YXJ0O1xuXHRwYWRkaW5nOiAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHRvdWNoLWFjdGlvbjogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdC8qIFRPRE86IHJlbW92ZSBhZnRlciByZW1vdmluZyB0aGUgX19uZXh0NDBweERlZmF1bHRTaXplIHByb3AgKi9cblx0JHsgZGVwcmVjYXRlZEhlaWdodCB9O1xuYDtcblxuY29uc3Qgd3JhcHBlckNvbG9yID0gKCB7IGNvbG9yID0gQ09MT1JTLnVpLmJvcmRlckZvY3VzIH06IFdyYXBwZXJQcm9wcyApID0+XG5cdGNzcyggeyBjb2xvciB9ICk7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkKCAnZGl2Jywge1xuXHRzaG91bGRGb3J3YXJkUHJvcDogKCBwcm9wOiBzdHJpbmcgKSA9PlxuXHRcdCEgWyAnY29sb3InLCAnbWFya3MnIF0uaW5jbHVkZXMoIHByb3AgKSxcbn0gKTwgV3JhcHBlclByb3BzID5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRmbGV4OiAxO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHdpZHRoOiAxMDAlO1xuXG5cdCR7IHdyYXBwZXJDb2xvciB9O1xuXHQkeyByYW5nZUhlaWdodCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEJlZm9yZUljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luUmlnaHQ6IDYgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBZnRlckljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogNiB9ICkgfVxuYDtcblxuY29uc3QgcmFpbEJhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgcmFpbENvbG9yIH06IFJhaWxQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0XHQ6IHJhaWxDb2xvciB8fCBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0gfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6IEdyYXlUZXh0O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBSYWlsID0gc3R5bGVkLnNwYW5gXG5cdGxlZnQ6IDA7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRyaWdodDogMDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdGhlaWdodDogJHsgcmFpbEhlaWdodCB9cHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblxuXHQkeyByYWlsQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5jb25zdCB0cmFja0JhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgdHJhY2tDb2xvciB9OiBUcmFja1Byb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy50aGVtZS5ncmF5WyA0MDAgXVxuXHRcdFx0OiB0cmFja0NvbG9yIHx8ICdjdXJyZW50Q29sb3InIH07XG5cblx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZCA/ICdHcmF5VGV4dCcgOiAnQ2FudmFzVGV4dCcgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVHJhY2sgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdG1hcmdpbi10b3A6ICR7ICggcmFuZ2VIZWlnaHRWYWx1ZSAtIHJhaWxIZWlnaHQgKSAvIDIgfXB4O1xuXHR0b3A6IDA7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IHdpZHRoIGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0cmFja0JhY2tncm91bmRDb2xvciB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmtzV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRtYXJnaW4tdG9wOiAxN3B4O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmsgPSBzdHlsZWQuc3BhbmBcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRsZWZ0OiAwO1xuXHR0b3A6IC00cHg7XG5cdGhlaWdodDogNHB4O1xuXHR3aWR0aDogMnB4O1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoIC01MCUgKTtcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0ei1pbmRleDogMTtcbmA7XG5cbmNvbnN0IG1hcmtMYWJlbEZpbGwgPSAoIHsgaXNGaWxsZWQgfTogUmFuZ2VNYXJrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogaXNGaWxsZWQgPyBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF0gOiBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0sXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBNYXJrTGFiZWwgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRmb250LXNpemU6IDExcHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiA4cHg7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cblx0JHsgcnRsKCB7IGxlZnQ6IDAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC01MCUgKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDUwJSApJyB9XG5cdCkgfTtcblxuXHQkeyBtYXJrTGFiZWxGaWxsIH07XG5gO1xuXG5jb25zdCB0aHVtYkNvbG9yID0gKCB7IGRpc2FibGVkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgfXB4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gdGh1bWJTaXplICkgLyAyIH1weDtcblx0b3V0bGluZTogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHR6LWluZGV4OiAzO1xuXG5cdC5pcy1tYXJrZWQgJiB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHR0cmFuc2l0aW9uOiBsZWZ0IGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiAtMTAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDQuNXB4ICknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKCAtNC41cHggKScgfVxuXHQpIH07XG5gO1xuXG5jb25zdCB0aHVtYkZvY3VzID0gKCB7IGlzRm9jdXNlZCB9OiBUaHVtYlByb3BzICkgPT4ge1xuXHRyZXR1cm4gaXNGb2N1c2VkXG5cdFx0PyBjc3NgXG5cdFx0XHRcdCY6OmJlZm9yZSB7XG5cdFx0XHRcdFx0Y29udGVudDogJyAnO1xuXHRcdFx0XHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRcdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHRcdFx0b3BhY2l0eTogMC40O1xuXHRcdFx0XHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRcdFx0XHRcdGhlaWdodDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0d2lkdGg6ICR7IHRodW1iU2l6ZSArIDggfXB4O1xuXHRcdFx0XHRcdHRvcDogLTRweDtcblx0XHRcdFx0XHRsZWZ0OiAtNHB4O1xuXG5cdFx0XHRcdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0XHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0XHRcdFx0fVxuXHRcdFx0XHR9XG5cdFx0ICBgXG5cdFx0OiAnJztcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYiA9IHN0eWxlZC5zcGFuPCBUaHVtYlByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRoZWlnaHQ6IDEwMCU7XG5cdG91dGxpbmU6IDA7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdHdpZHRoOiAxMDAlO1xuXHRib3gtc2hhZG93OiAkeyBDT05GSUcuZWxldmF0aW9uWFNtYWxsIH07XG5cblx0JHsgdGh1bWJDb2xvciB9O1xuXHQkeyB0aHVtYkZvY3VzIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRSYW5nZSA9IHN0eWxlZC5pbnB1dGBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAxMDAlO1xuXHRsZWZ0OiAwO1xuXHRtYXJnaW46IDAgLSR7IHRodW1iU2l6ZSAvIDIgfXB4O1xuXHRvcGFjaXR5OiAwO1xuXHRvdXRsaW5lOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHJpZ2h0OiAwO1xuXHR0b3A6IDA7XG5cdHdpZHRoOiBjYWxjKCAxMDAlICsgJHsgdGh1bWJTaXplIH1weCApO1xuYDtcblxuY29uc3QgdG9vbHRpcFNob3cgPSAoIHsgc2hvdyB9OiBUb29sdGlwUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0ZGlzcGxheTogJHsgc2hvdyA/ICdpbmxpbmUtYmxvY2snIDogJ25vbmUnIH07XG5cdFx0b3BhY2l0eTogJHsgc2hvdyA/IDEgOiAwIH07XG5cblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246XG5cdFx0XHRcdG9wYWNpdHkgMTIwbXMgZWFzZSxcblx0XHRcdFx0ZGlzcGxheSAxMjBtcyBlYXNlIGFsbG93LWRpc2NyZXRlO1xuXHRcdH1cblxuXHRcdEBzdGFydGluZy1zdHlsZSB7XG5cdFx0XHRvcGFjaXR5OiAwO1xuXHRcdH1cblx0YDtcbn07XG5cbmNvbnN0IHRvb2x0aXBQbGFjZW1lbnQgPSAoIHsgcGxhY2VtZW50IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0Y29uc3QgaXNCb3R0b20gPSBwbGFjZW1lbnQgPT09ICdib3R0b20nO1xuXG5cdGlmICggaXNCb3R0b20gKSB7XG5cdFx0cmV0dXJuIGNzc2Bcblx0XHRcdGJvdHRvbTogLTgwJTtcblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHR0b3A6IC04MCU7XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHRpcCA9IHN0eWxlZC5zcGFuPCBUb29sdGlwUHJvcHMgPmBcblx0YmFja2dyb3VuZDogcmdiYSggMCwgMCwgMCwgMC44ICk7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRjb2xvcjogd2hpdGU7XG5cdGZvbnQtc2l6ZTogMTJweDtcblx0bWluLXdpZHRoOiAzMnB4O1xuXHRwYWRkaW5nOiA0cHggOHB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRsaW5lLWhlaWdodDogMS40O1xuXG5cdCR7IHRvb2x0aXBTaG93IH07XG5cblx0JHsgdG9vbHRpcFBsYWNlbWVudCB9O1xuXHQkeyBydGwoXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKC01MCUpJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCg1MCUpJyB9XG5cdCkgfVxuYDtcblxuLy8gQHRvZG8gUmVmYWN0b3IgUmFuZ2VDb250cm9sIHdpdGggbGF0ZXN0IEhTdGFjayBjb25maWd1cmF0aW9uXG4vLyBAc2VlOiBwYWNrYWdlcy9jb21wb25lbnRzL3NyYy9oLXN0YWNrXG5leHBvcnQgY29uc3QgSW5wdXROdW1iZXIgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0ZGlzcGxheTogaW5saW5lLWJsb2NrO1xuXHRmb250LXNpemU6IDEzcHg7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0aW5wdXRbdHlwZT0nbnVtYmVyJ10mIHtcblx0XHQkeyByYW5nZUhlaWdodCB9O1xuXHR9XG5cblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IGAkeyBzcGFjZSggNCApIH0gIWltcG9ydGFudGAgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBY3Rpb25SaWdodFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0YnV0dG9uLFxuXHRidXR0b24uaXMtc21hbGwge1xuXHRcdG1hcmdpbi1sZWZ0OiAwO1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogOCB9ICkgfVxuYDtcbiJdfQ== */"));
  var trackBackgroundColor = ({
    disabled,
    trackColor
  }) => {
    return /* @__PURE__ */ css("background:", disabled ? COLORS.theme.gray[400] : trackColor || "currentColor", ";@media ( forced-colors: active ){background:", disabled ? "GrayText" : "CanvasText", ";}" + (false ? "" : ";label:trackBackgroundColor;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTBHVyIsImZpbGUiOiJyYW5nZS1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IE51bWJlckNvbnRyb2wgZnJvbSAnLi4vLi4vbnVtYmVyLWNvbnRyb2wnO1xuaW1wb3J0IHsgQ09MT1JTLCBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5pbXBvcnQgdHlwZSB7XG5cdFJhbmdlTWFya1Byb3BzLFxuXHRSYWlsUHJvcHMsXG5cdFRodW1iUHJvcHMsXG5cdFRvb2x0aXBQcm9wcyxcblx0VHJhY2tQcm9wcyxcblx0V3JhcHBlclByb3BzLFxuXHRSYW5nZUNvbnRyb2xQcm9wcyxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuXG5jb25zdCByYW5nZUhlaWdodFZhbHVlID0gMzA7XG5jb25zdCByYWlsSGVpZ2h0ID0gNDtcbmNvbnN0IHJhbmdlSGVpZ2h0ID0gKCkgPT5cblx0Y3NzKCB7IGhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSwgbWluSGVpZ2h0OiByYW5nZUhlaWdodFZhbHVlIH0gKTtcbmNvbnN0IHRodW1iU2l6ZSA9IDEyO1xuXG5jb25zdCBkZXByZWNhdGVkSGVpZ2h0ID0gKCB7XG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcbn06IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+ICkgPT5cblx0ISBfX25leHQ0MHB4RGVmYXVsdFNpemUgJiYgY3NzKCB7IG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5cbnR5cGUgUm9vdFByb3BzID0gUGljazwgUmFuZ2VDb250cm9sUHJvcHMsICdfX25leHQ0MHB4RGVmYXVsdFNpemUnID47XG5leHBvcnQgY29uc3QgUm9vdCA9IHN0eWxlZC5kaXY8IFJvb3RQcm9wcyA+YFxuXHQtd2Via2l0LXRhcC1oaWdobGlnaHQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7XG5cdHBhZGRpbmc6IDA7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0dG91Y2gtYWN0aW9uOiBub25lO1xuXHR3aWR0aDogMTAwJTtcblx0bWluLWhlaWdodDogNDBweDtcblx0LyogVE9ETzogcmVtb3ZlIGFmdGVyIHJlbW92aW5nIHRoZSBfX25leHQ0MHB4RGVmYXVsdFNpemUgcHJvcCAqL1xuXHQkeyBkZXByZWNhdGVkSGVpZ2h0IH07XG5gO1xuXG5jb25zdCB3cmFwcGVyQ29sb3IgPSAoIHsgY29sb3IgPSBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTogV3JhcHBlclByb3BzICkgPT5cblx0Y3NzKCB7IGNvbG9yIH0gKTtcblxuZXhwb3J0IGNvbnN0IFdyYXBwZXIgPSBzdHlsZWQoICdkaXYnLCB7XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3A6IHN0cmluZyApID0+XG5cdFx0ISBbICdjb2xvcicsICdtYXJrcycgXS5pbmNsdWRlcyggcHJvcCApLFxufSApPCBXcmFwcGVyUHJvcHMgPmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdGZsZXg6IDE7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cblx0JHsgd3JhcHBlckNvbG9yIH07XG5cdCR7IHJhbmdlSGVpZ2h0IH07XG5gO1xuXG5leHBvcnQgY29uc3QgQmVmb3JlSWNvbldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogZmxleDsgLy8gZW5zdXJlcyB0aGUgaGVpZ2h0IGlzbid0IGFmZmVjdGVkIGJ5IGxpbmUtaGVpZ2h0XG5cdG1hcmdpbi10b3A6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXG5cdCR7IHJ0bCggeyBtYXJnaW5SaWdodDogNiB9ICkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IEFmdGVySWNvbldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogZmxleDsgLy8gZW5zdXJlcyB0aGUgaGVpZ2h0IGlzbid0IGFmZmVjdGVkIGJ5IGxpbmUtaGVpZ2h0XG5cdG1hcmdpbi10b3A6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiA2IH0gKSB9XG5gO1xuXG5jb25zdCByYWlsQmFja2dyb3VuZENvbG9yID0gKCB7IGRpc2FibGVkLCByYWlsQ29sb3IgfTogUmFpbFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy51aS5iYWNrZ3JvdW5kRGlzYWJsZWRcblx0XHRcdDogcmFpbENvbG9yIHx8IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXG5cdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFJhaWwgPSBzdHlsZWQuc3BhbmBcblx0bGVmdDogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHJpZ2h0OiAwO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRtYXJnaW4tdG9wOiAkeyAoIHJhbmdlSGVpZ2h0VmFsdWUgLSByYWlsSGVpZ2h0ICkgLyAyIH1weDtcblx0dG9wOiAwO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXG5cdCR7IHJhaWxCYWNrZ3JvdW5kQ29sb3IgfTtcbmA7XG5cbmNvbnN0IHRyYWNrQmFja2dyb3VuZENvbG9yID0gKCB7IGRpc2FibGVkLCB0cmFja0NvbG9yIH06IFRyYWNrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IHRyYWNrQ29sb3IgfHwgJ2N1cnJlbnRDb2xvcicgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUcmFjayA9IHN0eWxlZC5zcGFuYFxuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXHRoZWlnaHQ6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0ZGlzcGxheTogYmxvY2s7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblxuXHQuaXMtbWFya2VkICYge1xuXHRcdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFx0dHJhbnNpdGlvbjogd2lkdGggZWFzZSAwLjFzO1xuXHRcdH1cblx0fVxuXG5cdCR7IHRyYWNrQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5leHBvcnQgY29uc3QgTWFya3NXcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHR3aWR0aDogMTAwJTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdG1hcmdpbi10b3A6IDE3cHg7XG5gO1xuXG5leHBvcnQgY29uc3QgTWFyayA9IHN0eWxlZC5zcGFuYFxuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdGxlZnQ6IDA7XG5cdHRvcDogLTRweDtcblx0aGVpZ2h0OiA0cHg7XG5cdHdpZHRoOiAycHg7XG5cdHRyYW5zZm9ybTogdHJhbnNsYXRlWCggLTUwJSApO1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZCB9O1xuXHR6LWluZGV4OiAxO1xuYDtcblxuY29uc3QgbWFya0xhYmVsRmlsbCA9ICggeyBpc0ZpbGxlZCB9OiBSYW5nZU1hcmtQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzcygge1xuXHRcdGNvbG9yOiBpc0ZpbGxlZCA/IENPTE9SUy50aGVtZS5ncmF5WyA3MDAgXSA6IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSxcblx0fSApO1xufTtcblxuZXhwb3J0IGNvbnN0IE1hcmtMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmdyYXlbIDMwMCBdIH07XG5cdGZvbnQtc2l6ZTogMTFweDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDhweDtcblx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcblxuXHQkeyBydGwoIHsgbGVmdDogMCB9ICkgfTtcblx0JHsgcnRsKFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggLTUwJSApJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggNTAlICknIH1cblx0KSB9O1xuXG5cdCR7IG1hcmtMYWJlbEZpbGwgfTtcbmA7XG5cbmNvbnN0IHRodW1iQ29sb3IgPSAoIHsgZGlzYWJsZWQgfTogVGh1bWJQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudGhlbWUuZ3JheVsgNDAwIF1cblx0XHRcdDogQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXG5cdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWQgPyAnR3JheVRleHQnIDogJ0NhbnZhc1RleHQnIH07XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFRodW1iV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRoZWlnaHQ6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRtYXJnaW4tdG9wOiAkeyAoIHJhbmdlSGVpZ2h0VmFsdWUgLSB0aHVtYlNpemUgKSAvIDIgfXB4O1xuXHRvdXRsaW5lOiAwO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHR3aWR0aDogJHsgdGh1bWJTaXplIH1weDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdHotaW5kZXg6IDM7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IGxlZnQgZWFzZSAwLjFzO1xuXHRcdH1cblx0fVxuXG5cdCR7IHRodW1iQ29sb3IgfTtcblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IC0xMCB9ICkgfTtcblx0JHsgcnRsKFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggNC41cHggKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC00LjVweCApJyB9XG5cdCkgfTtcbmA7XG5cbmNvbnN0IHRodW1iRm9jdXMgPSAoIHsgaXNGb2N1c2VkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBpc0ZvY3VzZWRcblx0XHQ/IGNzc2Bcblx0XHRcdFx0Jjo6YmVmb3JlIHtcblx0XHRcdFx0XHRjb250ZW50OiAnICc7XG5cdFx0XHRcdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdFx0XHRcdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHRcdFx0XHRvcGFjaXR5OiAwLjQ7XG5cdFx0XHRcdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdFx0XHRcdFx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgKyA4IH1weDtcblx0XHRcdFx0XHR3aWR0aDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0dG9wOiAtNHB4O1xuXHRcdFx0XHRcdGxlZnQ6IC00cHg7XG5cblx0XHRcdFx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRcdFx0XHRiYWNrZ3JvdW5kOiBHcmF5VGV4dDtcblx0XHRcdFx0XHR9XG5cdFx0XHRcdH1cblx0XHQgIGBcblx0XHQ6ICcnO1xufTtcblxuZXhwb3J0IGNvbnN0IFRodW1iID0gc3R5bGVkLnNwYW48IFRodW1iUHJvcHMgPmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdGhlaWdodDogMTAwJTtcblx0b3V0bGluZTogMDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdGJveC1zaGFkb3c6ICR7IENPTkZJRy5lbGV2YXRpb25YU21hbGwgfTtcblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHRodW1iRm9jdXMgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJbnB1dFJhbmdlID0gc3R5bGVkLmlucHV0YFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRjdXJzb3I6IHBvaW50ZXI7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRoZWlnaHQ6IDEwMCU7XG5cdGxlZnQ6IDA7XG5cdG1hcmdpbjogMCAtJHsgdGh1bWJTaXplIC8gMiB9cHg7XG5cdG9wYWNpdHk6IDA7XG5cdG91dGxpbmU6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0cmlnaHQ6IDA7XG5cdHRvcDogMDtcblx0d2lkdGg6IGNhbGMoIDEwMCUgKyAkeyB0aHVtYlNpemUgfXB4ICk7XG5gO1xuXG5jb25zdCB0b29sdGlwU2hvdyA9ICggeyBzaG93IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRkaXNwbGF5OiAkeyBzaG93ID8gJ2lubGluZS1ibG9jaycgOiAnbm9uZScgfTtcblx0XHRvcGFjaXR5OiAkeyBzaG93ID8gMSA6IDAgfTtcblxuXHRcdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFx0dHJhbnNpdGlvbjpcblx0XHRcdFx0b3BhY2l0eSAxMjBtcyBlYXNlLFxuXHRcdFx0XHRkaXNwbGF5IDEyMG1zIGVhc2UgYWxsb3ctZGlzY3JldGU7XG5cdFx0fVxuXG5cdFx0QHN0YXJ0aW5nLXN0eWxlIHtcblx0XHRcdG9wYWNpdHk6IDA7XG5cdFx0fVxuXHRgO1xufTtcblxuY29uc3QgdG9vbHRpcFBsYWNlbWVudCA9ICggeyBwbGFjZW1lbnQgfTogVG9vbHRpcFByb3BzICkgPT4ge1xuXHRjb25zdCBpc0JvdHRvbSA9IHBsYWNlbWVudCA9PT0gJ2JvdHRvbSc7XG5cblx0aWYgKCBpc0JvdHRvbSApIHtcblx0XHRyZXR1cm4gY3NzYFxuXHRcdFx0Ym90dG9tOiAtODAlO1xuXHRcdGA7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdHRvcDogLTgwJTtcblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUb29sdGlwID0gc3R5bGVkLnNwYW48IFRvb2x0aXBQcm9wcyA+YFxuXHRiYWNrZ3JvdW5kOiByZ2JhKCAwLCAwLCAwLCAwLjggKTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGNvbG9yOiB3aGl0ZTtcblx0Zm9udC1zaXplOiAxMnB4O1xuXHRtaW4td2lkdGg6IDMycHg7XG5cdHBhZGRpbmc6IDRweCA4cHg7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRleHQtYWxpZ246IGNlbnRlcjtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cblx0JHsgdG9vbHRpcFNob3cgfTtcblxuXHQkeyB0b29sdGlwUGxhY2VtZW50IH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoLTUwJSknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKDUwJSknIH1cblx0KSB9XG5gO1xuXG4vLyBAdG9kbyBSZWZhY3RvciBSYW5nZUNvbnRyb2wgd2l0aCBsYXRlc3QgSFN0YWNrIGNvbmZpZ3VyYXRpb25cbi8vIEBzZWU6IHBhY2thZ2VzL2NvbXBvbmVudHMvc3JjL2gtc3RhY2tcbmV4cG9ydCBjb25zdCBJbnB1dE51bWJlciA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHRkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG5cdGZvbnQtc2l6ZTogMTNweDtcblx0bWFyZ2luLXRvcDogMDtcblxuXHRpbnB1dFt0eXBlPSdudW1iZXInXSYge1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogYCR7IHNwYWNlKCA0ICkgfSAhaW1wb3J0YW50YCB9ICkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IEFjdGlvblJpZ2h0V3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0bWFyZ2luLXRvcDogMDtcblxuXHRidXR0b24sXG5cdGJ1dHRvbi5pcy1zbWFsbCB7XG5cdFx0bWFyZ2luLWxlZnQ6IDA7XG5cdFx0JHsgcmFuZ2VIZWlnaHQgfTtcblx0fVxuXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiA4IH0gKSB9XG5gO1xuIl19 */");
  };
  var Track = /* @__PURE__ */ createStyled("span", false ? {
    target: "e1epgpqk9"
  } : {
    target: "e1epgpqk9",
    label: "Track"
  })("border-radius:", config_values_default.radiusFull, ";height:", railHeight, "px;pointer-events:none;display:block;position:absolute;margin-top:", (rangeHeightValue - railHeight) / 2, "px;top:0;.is-marked &{@media not ( prefers-reduced-motion ){transition:width ease 0.1s;}}", trackBackgroundColor, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXFIZ0MiLCJmaWxlIjoicmFuZ2UtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBOdW1iZXJDb250cm9sIGZyb20gJy4uLy4uL251bWJlci1jb250cm9sJztcbmltcG9ydCB7IENPTE9SUywgcnRsLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuaW1wb3J0IHR5cGUge1xuXHRSYW5nZU1hcmtQcm9wcyxcblx0UmFpbFByb3BzLFxuXHRUaHVtYlByb3BzLFxuXHRUb29sdGlwUHJvcHMsXG5cdFRyYWNrUHJvcHMsXG5cdFdyYXBwZXJQcm9wcyxcblx0UmFuZ2VDb250cm9sUHJvcHMsXG59IGZyb20gJy4uL3R5cGVzJztcblxuY29uc3QgcmFuZ2VIZWlnaHRWYWx1ZSA9IDMwO1xuY29uc3QgcmFpbEhlaWdodCA9IDQ7XG5jb25zdCByYW5nZUhlaWdodCA9ICgpID0+XG5cdGNzcyggeyBoZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUsIG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5jb25zdCB0aHVtYlNpemUgPSAxMjtcblxuY29uc3QgZGVwcmVjYXRlZEhlaWdodCA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBQaWNrPCBSYW5nZUNvbnRyb2xQcm9wcywgJ19fbmV4dDQwcHhEZWZhdWx0U2l6ZScgPiApID0+XG5cdCEgX19uZXh0NDBweERlZmF1bHRTaXplICYmIGNzcyggeyBtaW5IZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUgfSApO1xuXG50eXBlIFJvb3RQcm9wcyA9IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+O1xuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQuZGl2PCBSb290UHJvcHMgPmBcblx0LXdlYmtpdC10YXAtaGlnaGxpZ2h0LWNvbG9yOiB0cmFuc3BhcmVudDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0anVzdGlmeS1jb250ZW50OiBmbGV4LXN0YXJ0O1xuXHRwYWRkaW5nOiAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHRvdWNoLWFjdGlvbjogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdC8qIFRPRE86IHJlbW92ZSBhZnRlciByZW1vdmluZyB0aGUgX19uZXh0NDBweERlZmF1bHRTaXplIHByb3AgKi9cblx0JHsgZGVwcmVjYXRlZEhlaWdodCB9O1xuYDtcblxuY29uc3Qgd3JhcHBlckNvbG9yID0gKCB7IGNvbG9yID0gQ09MT1JTLnVpLmJvcmRlckZvY3VzIH06IFdyYXBwZXJQcm9wcyApID0+XG5cdGNzcyggeyBjb2xvciB9ICk7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkKCAnZGl2Jywge1xuXHRzaG91bGRGb3J3YXJkUHJvcDogKCBwcm9wOiBzdHJpbmcgKSA9PlxuXHRcdCEgWyAnY29sb3InLCAnbWFya3MnIF0uaW5jbHVkZXMoIHByb3AgKSxcbn0gKTwgV3JhcHBlclByb3BzID5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRmbGV4OiAxO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHdpZHRoOiAxMDAlO1xuXG5cdCR7IHdyYXBwZXJDb2xvciB9O1xuXHQkeyByYW5nZUhlaWdodCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEJlZm9yZUljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luUmlnaHQ6IDYgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBZnRlckljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogNiB9ICkgfVxuYDtcblxuY29uc3QgcmFpbEJhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgcmFpbENvbG9yIH06IFJhaWxQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0XHQ6IHJhaWxDb2xvciB8fCBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0gfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6IEdyYXlUZXh0O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBSYWlsID0gc3R5bGVkLnNwYW5gXG5cdGxlZnQ6IDA7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRyaWdodDogMDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdGhlaWdodDogJHsgcmFpbEhlaWdodCB9cHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblxuXHQkeyByYWlsQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5jb25zdCB0cmFja0JhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgdHJhY2tDb2xvciB9OiBUcmFja1Byb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy50aGVtZS5ncmF5WyA0MDAgXVxuXHRcdFx0OiB0cmFja0NvbG9yIHx8ICdjdXJyZW50Q29sb3InIH07XG5cblx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZCA/ICdHcmF5VGV4dCcgOiAnQ2FudmFzVGV4dCcgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVHJhY2sgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdG1hcmdpbi10b3A6ICR7ICggcmFuZ2VIZWlnaHRWYWx1ZSAtIHJhaWxIZWlnaHQgKSAvIDIgfXB4O1xuXHR0b3A6IDA7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IHdpZHRoIGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0cmFja0JhY2tncm91bmRDb2xvciB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmtzV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRtYXJnaW4tdG9wOiAxN3B4O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmsgPSBzdHlsZWQuc3BhbmBcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRsZWZ0OiAwO1xuXHR0b3A6IC00cHg7XG5cdGhlaWdodDogNHB4O1xuXHR3aWR0aDogMnB4O1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoIC01MCUgKTtcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0ei1pbmRleDogMTtcbmA7XG5cbmNvbnN0IG1hcmtMYWJlbEZpbGwgPSAoIHsgaXNGaWxsZWQgfTogUmFuZ2VNYXJrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogaXNGaWxsZWQgPyBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF0gOiBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0sXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBNYXJrTGFiZWwgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRmb250LXNpemU6IDExcHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiA4cHg7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cblx0JHsgcnRsKCB7IGxlZnQ6IDAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC01MCUgKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDUwJSApJyB9XG5cdCkgfTtcblxuXHQkeyBtYXJrTGFiZWxGaWxsIH07XG5gO1xuXG5jb25zdCB0aHVtYkNvbG9yID0gKCB7IGRpc2FibGVkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgfXB4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gdGh1bWJTaXplICkgLyAyIH1weDtcblx0b3V0bGluZTogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHR6LWluZGV4OiAzO1xuXG5cdC5pcy1tYXJrZWQgJiB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHR0cmFuc2l0aW9uOiBsZWZ0IGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiAtMTAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDQuNXB4ICknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKCAtNC41cHggKScgfVxuXHQpIH07XG5gO1xuXG5jb25zdCB0aHVtYkZvY3VzID0gKCB7IGlzRm9jdXNlZCB9OiBUaHVtYlByb3BzICkgPT4ge1xuXHRyZXR1cm4gaXNGb2N1c2VkXG5cdFx0PyBjc3NgXG5cdFx0XHRcdCY6OmJlZm9yZSB7XG5cdFx0XHRcdFx0Y29udGVudDogJyAnO1xuXHRcdFx0XHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRcdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHRcdFx0b3BhY2l0eTogMC40O1xuXHRcdFx0XHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRcdFx0XHRcdGhlaWdodDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0d2lkdGg6ICR7IHRodW1iU2l6ZSArIDggfXB4O1xuXHRcdFx0XHRcdHRvcDogLTRweDtcblx0XHRcdFx0XHRsZWZ0OiAtNHB4O1xuXG5cdFx0XHRcdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0XHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0XHRcdFx0fVxuXHRcdFx0XHR9XG5cdFx0ICBgXG5cdFx0OiAnJztcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYiA9IHN0eWxlZC5zcGFuPCBUaHVtYlByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRoZWlnaHQ6IDEwMCU7XG5cdG91dGxpbmU6IDA7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdHdpZHRoOiAxMDAlO1xuXHRib3gtc2hhZG93OiAkeyBDT05GSUcuZWxldmF0aW9uWFNtYWxsIH07XG5cblx0JHsgdGh1bWJDb2xvciB9O1xuXHQkeyB0aHVtYkZvY3VzIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRSYW5nZSA9IHN0eWxlZC5pbnB1dGBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAxMDAlO1xuXHRsZWZ0OiAwO1xuXHRtYXJnaW46IDAgLSR7IHRodW1iU2l6ZSAvIDIgfXB4O1xuXHRvcGFjaXR5OiAwO1xuXHRvdXRsaW5lOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHJpZ2h0OiAwO1xuXHR0b3A6IDA7XG5cdHdpZHRoOiBjYWxjKCAxMDAlICsgJHsgdGh1bWJTaXplIH1weCApO1xuYDtcblxuY29uc3QgdG9vbHRpcFNob3cgPSAoIHsgc2hvdyB9OiBUb29sdGlwUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0ZGlzcGxheTogJHsgc2hvdyA/ICdpbmxpbmUtYmxvY2snIDogJ25vbmUnIH07XG5cdFx0b3BhY2l0eTogJHsgc2hvdyA/IDEgOiAwIH07XG5cblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246XG5cdFx0XHRcdG9wYWNpdHkgMTIwbXMgZWFzZSxcblx0XHRcdFx0ZGlzcGxheSAxMjBtcyBlYXNlIGFsbG93LWRpc2NyZXRlO1xuXHRcdH1cblxuXHRcdEBzdGFydGluZy1zdHlsZSB7XG5cdFx0XHRvcGFjaXR5OiAwO1xuXHRcdH1cblx0YDtcbn07XG5cbmNvbnN0IHRvb2x0aXBQbGFjZW1lbnQgPSAoIHsgcGxhY2VtZW50IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0Y29uc3QgaXNCb3R0b20gPSBwbGFjZW1lbnQgPT09ICdib3R0b20nO1xuXG5cdGlmICggaXNCb3R0b20gKSB7XG5cdFx0cmV0dXJuIGNzc2Bcblx0XHRcdGJvdHRvbTogLTgwJTtcblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHR0b3A6IC04MCU7XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHRpcCA9IHN0eWxlZC5zcGFuPCBUb29sdGlwUHJvcHMgPmBcblx0YmFja2dyb3VuZDogcmdiYSggMCwgMCwgMCwgMC44ICk7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRjb2xvcjogd2hpdGU7XG5cdGZvbnQtc2l6ZTogMTJweDtcblx0bWluLXdpZHRoOiAzMnB4O1xuXHRwYWRkaW5nOiA0cHggOHB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRsaW5lLWhlaWdodDogMS40O1xuXG5cdCR7IHRvb2x0aXBTaG93IH07XG5cblx0JHsgdG9vbHRpcFBsYWNlbWVudCB9O1xuXHQkeyBydGwoXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKC01MCUpJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCg1MCUpJyB9XG5cdCkgfVxuYDtcblxuLy8gQHRvZG8gUmVmYWN0b3IgUmFuZ2VDb250cm9sIHdpdGggbGF0ZXN0IEhTdGFjayBjb25maWd1cmF0aW9uXG4vLyBAc2VlOiBwYWNrYWdlcy9jb21wb25lbnRzL3NyYy9oLXN0YWNrXG5leHBvcnQgY29uc3QgSW5wdXROdW1iZXIgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0ZGlzcGxheTogaW5saW5lLWJsb2NrO1xuXHRmb250LXNpemU6IDEzcHg7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0aW5wdXRbdHlwZT0nbnVtYmVyJ10mIHtcblx0XHQkeyByYW5nZUhlaWdodCB9O1xuXHR9XG5cblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IGAkeyBzcGFjZSggNCApIH0gIWltcG9ydGFudGAgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBY3Rpb25SaWdodFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0YnV0dG9uLFxuXHRidXR0b24uaXMtc21hbGwge1xuXHRcdG1hcmdpbi1sZWZ0OiAwO1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogOCB9ICkgfVxuYDtcbiJdfQ== */"));
  var MarksWrapper = /* @__PURE__ */ createStyled("span", false ? {
    target: "e1epgpqk8"
  } : {
    target: "e1epgpqk8",
    label: "MarksWrapper"
  })(false ? {
    name: "g5kg28",
    styles: "display:block;pointer-events:none;position:relative;width:100%;user-select:none;margin-top:17px"
  } : {
    name: "g5kg28",
    styles: "display:block;pointer-events:none;position:relative;width:100%;user-select:none;margin-top:17px/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXVJdUMiLCJmaWxlIjoicmFuZ2UtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBOdW1iZXJDb250cm9sIGZyb20gJy4uLy4uL251bWJlci1jb250cm9sJztcbmltcG9ydCB7IENPTE9SUywgcnRsLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuaW1wb3J0IHR5cGUge1xuXHRSYW5nZU1hcmtQcm9wcyxcblx0UmFpbFByb3BzLFxuXHRUaHVtYlByb3BzLFxuXHRUb29sdGlwUHJvcHMsXG5cdFRyYWNrUHJvcHMsXG5cdFdyYXBwZXJQcm9wcyxcblx0UmFuZ2VDb250cm9sUHJvcHMsXG59IGZyb20gJy4uL3R5cGVzJztcblxuY29uc3QgcmFuZ2VIZWlnaHRWYWx1ZSA9IDMwO1xuY29uc3QgcmFpbEhlaWdodCA9IDQ7XG5jb25zdCByYW5nZUhlaWdodCA9ICgpID0+XG5cdGNzcyggeyBoZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUsIG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5jb25zdCB0aHVtYlNpemUgPSAxMjtcblxuY29uc3QgZGVwcmVjYXRlZEhlaWdodCA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBQaWNrPCBSYW5nZUNvbnRyb2xQcm9wcywgJ19fbmV4dDQwcHhEZWZhdWx0U2l6ZScgPiApID0+XG5cdCEgX19uZXh0NDBweERlZmF1bHRTaXplICYmIGNzcyggeyBtaW5IZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUgfSApO1xuXG50eXBlIFJvb3RQcm9wcyA9IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+O1xuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQuZGl2PCBSb290UHJvcHMgPmBcblx0LXdlYmtpdC10YXAtaGlnaGxpZ2h0LWNvbG9yOiB0cmFuc3BhcmVudDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0anVzdGlmeS1jb250ZW50OiBmbGV4LXN0YXJ0O1xuXHRwYWRkaW5nOiAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHRvdWNoLWFjdGlvbjogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdC8qIFRPRE86IHJlbW92ZSBhZnRlciByZW1vdmluZyB0aGUgX19uZXh0NDBweERlZmF1bHRTaXplIHByb3AgKi9cblx0JHsgZGVwcmVjYXRlZEhlaWdodCB9O1xuYDtcblxuY29uc3Qgd3JhcHBlckNvbG9yID0gKCB7IGNvbG9yID0gQ09MT1JTLnVpLmJvcmRlckZvY3VzIH06IFdyYXBwZXJQcm9wcyApID0+XG5cdGNzcyggeyBjb2xvciB9ICk7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkKCAnZGl2Jywge1xuXHRzaG91bGRGb3J3YXJkUHJvcDogKCBwcm9wOiBzdHJpbmcgKSA9PlxuXHRcdCEgWyAnY29sb3InLCAnbWFya3MnIF0uaW5jbHVkZXMoIHByb3AgKSxcbn0gKTwgV3JhcHBlclByb3BzID5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRmbGV4OiAxO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHdpZHRoOiAxMDAlO1xuXG5cdCR7IHdyYXBwZXJDb2xvciB9O1xuXHQkeyByYW5nZUhlaWdodCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEJlZm9yZUljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luUmlnaHQ6IDYgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBZnRlckljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogNiB9ICkgfVxuYDtcblxuY29uc3QgcmFpbEJhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgcmFpbENvbG9yIH06IFJhaWxQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0XHQ6IHJhaWxDb2xvciB8fCBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0gfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6IEdyYXlUZXh0O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBSYWlsID0gc3R5bGVkLnNwYW5gXG5cdGxlZnQ6IDA7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRyaWdodDogMDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdGhlaWdodDogJHsgcmFpbEhlaWdodCB9cHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblxuXHQkeyByYWlsQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5jb25zdCB0cmFja0JhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgdHJhY2tDb2xvciB9OiBUcmFja1Byb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy50aGVtZS5ncmF5WyA0MDAgXVxuXHRcdFx0OiB0cmFja0NvbG9yIHx8ICdjdXJyZW50Q29sb3InIH07XG5cblx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZCA/ICdHcmF5VGV4dCcgOiAnQ2FudmFzVGV4dCcgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVHJhY2sgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdG1hcmdpbi10b3A6ICR7ICggcmFuZ2VIZWlnaHRWYWx1ZSAtIHJhaWxIZWlnaHQgKSAvIDIgfXB4O1xuXHR0b3A6IDA7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IHdpZHRoIGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0cmFja0JhY2tncm91bmRDb2xvciB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmtzV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRtYXJnaW4tdG9wOiAxN3B4O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmsgPSBzdHlsZWQuc3BhbmBcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRsZWZ0OiAwO1xuXHR0b3A6IC00cHg7XG5cdGhlaWdodDogNHB4O1xuXHR3aWR0aDogMnB4O1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoIC01MCUgKTtcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0ei1pbmRleDogMTtcbmA7XG5cbmNvbnN0IG1hcmtMYWJlbEZpbGwgPSAoIHsgaXNGaWxsZWQgfTogUmFuZ2VNYXJrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogaXNGaWxsZWQgPyBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF0gOiBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0sXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBNYXJrTGFiZWwgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRmb250LXNpemU6IDExcHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiA4cHg7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cblx0JHsgcnRsKCB7IGxlZnQ6IDAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC01MCUgKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDUwJSApJyB9XG5cdCkgfTtcblxuXHQkeyBtYXJrTGFiZWxGaWxsIH07XG5gO1xuXG5jb25zdCB0aHVtYkNvbG9yID0gKCB7IGRpc2FibGVkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgfXB4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gdGh1bWJTaXplICkgLyAyIH1weDtcblx0b3V0bGluZTogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHR6LWluZGV4OiAzO1xuXG5cdC5pcy1tYXJrZWQgJiB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHR0cmFuc2l0aW9uOiBsZWZ0IGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiAtMTAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDQuNXB4ICknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKCAtNC41cHggKScgfVxuXHQpIH07XG5gO1xuXG5jb25zdCB0aHVtYkZvY3VzID0gKCB7IGlzRm9jdXNlZCB9OiBUaHVtYlByb3BzICkgPT4ge1xuXHRyZXR1cm4gaXNGb2N1c2VkXG5cdFx0PyBjc3NgXG5cdFx0XHRcdCY6OmJlZm9yZSB7XG5cdFx0XHRcdFx0Y29udGVudDogJyAnO1xuXHRcdFx0XHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRcdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHRcdFx0b3BhY2l0eTogMC40O1xuXHRcdFx0XHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRcdFx0XHRcdGhlaWdodDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0d2lkdGg6ICR7IHRodW1iU2l6ZSArIDggfXB4O1xuXHRcdFx0XHRcdHRvcDogLTRweDtcblx0XHRcdFx0XHRsZWZ0OiAtNHB4O1xuXG5cdFx0XHRcdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0XHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0XHRcdFx0fVxuXHRcdFx0XHR9XG5cdFx0ICBgXG5cdFx0OiAnJztcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYiA9IHN0eWxlZC5zcGFuPCBUaHVtYlByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRoZWlnaHQ6IDEwMCU7XG5cdG91dGxpbmU6IDA7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdHdpZHRoOiAxMDAlO1xuXHRib3gtc2hhZG93OiAkeyBDT05GSUcuZWxldmF0aW9uWFNtYWxsIH07XG5cblx0JHsgdGh1bWJDb2xvciB9O1xuXHQkeyB0aHVtYkZvY3VzIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRSYW5nZSA9IHN0eWxlZC5pbnB1dGBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAxMDAlO1xuXHRsZWZ0OiAwO1xuXHRtYXJnaW46IDAgLSR7IHRodW1iU2l6ZSAvIDIgfXB4O1xuXHRvcGFjaXR5OiAwO1xuXHRvdXRsaW5lOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHJpZ2h0OiAwO1xuXHR0b3A6IDA7XG5cdHdpZHRoOiBjYWxjKCAxMDAlICsgJHsgdGh1bWJTaXplIH1weCApO1xuYDtcblxuY29uc3QgdG9vbHRpcFNob3cgPSAoIHsgc2hvdyB9OiBUb29sdGlwUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0ZGlzcGxheTogJHsgc2hvdyA/ICdpbmxpbmUtYmxvY2snIDogJ25vbmUnIH07XG5cdFx0b3BhY2l0eTogJHsgc2hvdyA/IDEgOiAwIH07XG5cblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246XG5cdFx0XHRcdG9wYWNpdHkgMTIwbXMgZWFzZSxcblx0XHRcdFx0ZGlzcGxheSAxMjBtcyBlYXNlIGFsbG93LWRpc2NyZXRlO1xuXHRcdH1cblxuXHRcdEBzdGFydGluZy1zdHlsZSB7XG5cdFx0XHRvcGFjaXR5OiAwO1xuXHRcdH1cblx0YDtcbn07XG5cbmNvbnN0IHRvb2x0aXBQbGFjZW1lbnQgPSAoIHsgcGxhY2VtZW50IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0Y29uc3QgaXNCb3R0b20gPSBwbGFjZW1lbnQgPT09ICdib3R0b20nO1xuXG5cdGlmICggaXNCb3R0b20gKSB7XG5cdFx0cmV0dXJuIGNzc2Bcblx0XHRcdGJvdHRvbTogLTgwJTtcblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHR0b3A6IC04MCU7XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHRpcCA9IHN0eWxlZC5zcGFuPCBUb29sdGlwUHJvcHMgPmBcblx0YmFja2dyb3VuZDogcmdiYSggMCwgMCwgMCwgMC44ICk7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRjb2xvcjogd2hpdGU7XG5cdGZvbnQtc2l6ZTogMTJweDtcblx0bWluLXdpZHRoOiAzMnB4O1xuXHRwYWRkaW5nOiA0cHggOHB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRsaW5lLWhlaWdodDogMS40O1xuXG5cdCR7IHRvb2x0aXBTaG93IH07XG5cblx0JHsgdG9vbHRpcFBsYWNlbWVudCB9O1xuXHQkeyBydGwoXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKC01MCUpJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCg1MCUpJyB9XG5cdCkgfVxuYDtcblxuLy8gQHRvZG8gUmVmYWN0b3IgUmFuZ2VDb250cm9sIHdpdGggbGF0ZXN0IEhTdGFjayBjb25maWd1cmF0aW9uXG4vLyBAc2VlOiBwYWNrYWdlcy9jb21wb25lbnRzL3NyYy9oLXN0YWNrXG5leHBvcnQgY29uc3QgSW5wdXROdW1iZXIgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0ZGlzcGxheTogaW5saW5lLWJsb2NrO1xuXHRmb250LXNpemU6IDEzcHg7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0aW5wdXRbdHlwZT0nbnVtYmVyJ10mIHtcblx0XHQkeyByYW5nZUhlaWdodCB9O1xuXHR9XG5cblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IGAkeyBzcGFjZSggNCApIH0gIWltcG9ydGFudGAgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBY3Rpb25SaWdodFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0YnV0dG9uLFxuXHRidXR0b24uaXMtc21hbGwge1xuXHRcdG1hcmdpbi1sZWZ0OiAwO1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogOCB9ICkgfVxuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__13
  });
  var Mark = /* @__PURE__ */ createStyled("span", false ? {
    target: "e1epgpqk7"
  } : {
    target: "e1epgpqk7",
    label: "Mark"
  })("position:absolute;left:0;top:-4px;height:4px;width:2px;transform:translateX( -50% );background-color:", COLORS.ui.background, ";z-index:1;" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWdKK0IiLCJmaWxlIjoicmFuZ2UtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBOdW1iZXJDb250cm9sIGZyb20gJy4uLy4uL251bWJlci1jb250cm9sJztcbmltcG9ydCB7IENPTE9SUywgcnRsLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuaW1wb3J0IHR5cGUge1xuXHRSYW5nZU1hcmtQcm9wcyxcblx0UmFpbFByb3BzLFxuXHRUaHVtYlByb3BzLFxuXHRUb29sdGlwUHJvcHMsXG5cdFRyYWNrUHJvcHMsXG5cdFdyYXBwZXJQcm9wcyxcblx0UmFuZ2VDb250cm9sUHJvcHMsXG59IGZyb20gJy4uL3R5cGVzJztcblxuY29uc3QgcmFuZ2VIZWlnaHRWYWx1ZSA9IDMwO1xuY29uc3QgcmFpbEhlaWdodCA9IDQ7XG5jb25zdCByYW5nZUhlaWdodCA9ICgpID0+XG5cdGNzcyggeyBoZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUsIG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5jb25zdCB0aHVtYlNpemUgPSAxMjtcblxuY29uc3QgZGVwcmVjYXRlZEhlaWdodCA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBQaWNrPCBSYW5nZUNvbnRyb2xQcm9wcywgJ19fbmV4dDQwcHhEZWZhdWx0U2l6ZScgPiApID0+XG5cdCEgX19uZXh0NDBweERlZmF1bHRTaXplICYmIGNzcyggeyBtaW5IZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUgfSApO1xuXG50eXBlIFJvb3RQcm9wcyA9IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+O1xuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQuZGl2PCBSb290UHJvcHMgPmBcblx0LXdlYmtpdC10YXAtaGlnaGxpZ2h0LWNvbG9yOiB0cmFuc3BhcmVudDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0anVzdGlmeS1jb250ZW50OiBmbGV4LXN0YXJ0O1xuXHRwYWRkaW5nOiAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHRvdWNoLWFjdGlvbjogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdC8qIFRPRE86IHJlbW92ZSBhZnRlciByZW1vdmluZyB0aGUgX19uZXh0NDBweERlZmF1bHRTaXplIHByb3AgKi9cblx0JHsgZGVwcmVjYXRlZEhlaWdodCB9O1xuYDtcblxuY29uc3Qgd3JhcHBlckNvbG9yID0gKCB7IGNvbG9yID0gQ09MT1JTLnVpLmJvcmRlckZvY3VzIH06IFdyYXBwZXJQcm9wcyApID0+XG5cdGNzcyggeyBjb2xvciB9ICk7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkKCAnZGl2Jywge1xuXHRzaG91bGRGb3J3YXJkUHJvcDogKCBwcm9wOiBzdHJpbmcgKSA9PlxuXHRcdCEgWyAnY29sb3InLCAnbWFya3MnIF0uaW5jbHVkZXMoIHByb3AgKSxcbn0gKTwgV3JhcHBlclByb3BzID5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRmbGV4OiAxO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHdpZHRoOiAxMDAlO1xuXG5cdCR7IHdyYXBwZXJDb2xvciB9O1xuXHQkeyByYW5nZUhlaWdodCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEJlZm9yZUljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luUmlnaHQ6IDYgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBZnRlckljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogNiB9ICkgfVxuYDtcblxuY29uc3QgcmFpbEJhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgcmFpbENvbG9yIH06IFJhaWxQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0XHQ6IHJhaWxDb2xvciB8fCBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0gfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6IEdyYXlUZXh0O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBSYWlsID0gc3R5bGVkLnNwYW5gXG5cdGxlZnQ6IDA7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRyaWdodDogMDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdGhlaWdodDogJHsgcmFpbEhlaWdodCB9cHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblxuXHQkeyByYWlsQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5jb25zdCB0cmFja0JhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgdHJhY2tDb2xvciB9OiBUcmFja1Byb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy50aGVtZS5ncmF5WyA0MDAgXVxuXHRcdFx0OiB0cmFja0NvbG9yIHx8ICdjdXJyZW50Q29sb3InIH07XG5cblx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZCA/ICdHcmF5VGV4dCcgOiAnQ2FudmFzVGV4dCcgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVHJhY2sgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdG1hcmdpbi10b3A6ICR7ICggcmFuZ2VIZWlnaHRWYWx1ZSAtIHJhaWxIZWlnaHQgKSAvIDIgfXB4O1xuXHR0b3A6IDA7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IHdpZHRoIGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0cmFja0JhY2tncm91bmRDb2xvciB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmtzV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRtYXJnaW4tdG9wOiAxN3B4O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmsgPSBzdHlsZWQuc3BhbmBcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRsZWZ0OiAwO1xuXHR0b3A6IC00cHg7XG5cdGhlaWdodDogNHB4O1xuXHR3aWR0aDogMnB4O1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoIC01MCUgKTtcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0ei1pbmRleDogMTtcbmA7XG5cbmNvbnN0IG1hcmtMYWJlbEZpbGwgPSAoIHsgaXNGaWxsZWQgfTogUmFuZ2VNYXJrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogaXNGaWxsZWQgPyBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF0gOiBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0sXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBNYXJrTGFiZWwgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRmb250LXNpemU6IDExcHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiA4cHg7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cblx0JHsgcnRsKCB7IGxlZnQ6IDAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC01MCUgKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDUwJSApJyB9XG5cdCkgfTtcblxuXHQkeyBtYXJrTGFiZWxGaWxsIH07XG5gO1xuXG5jb25zdCB0aHVtYkNvbG9yID0gKCB7IGRpc2FibGVkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgfXB4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gdGh1bWJTaXplICkgLyAyIH1weDtcblx0b3V0bGluZTogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHR6LWluZGV4OiAzO1xuXG5cdC5pcy1tYXJrZWQgJiB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHR0cmFuc2l0aW9uOiBsZWZ0IGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiAtMTAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDQuNXB4ICknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKCAtNC41cHggKScgfVxuXHQpIH07XG5gO1xuXG5jb25zdCB0aHVtYkZvY3VzID0gKCB7IGlzRm9jdXNlZCB9OiBUaHVtYlByb3BzICkgPT4ge1xuXHRyZXR1cm4gaXNGb2N1c2VkXG5cdFx0PyBjc3NgXG5cdFx0XHRcdCY6OmJlZm9yZSB7XG5cdFx0XHRcdFx0Y29udGVudDogJyAnO1xuXHRcdFx0XHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRcdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHRcdFx0b3BhY2l0eTogMC40O1xuXHRcdFx0XHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRcdFx0XHRcdGhlaWdodDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0d2lkdGg6ICR7IHRodW1iU2l6ZSArIDggfXB4O1xuXHRcdFx0XHRcdHRvcDogLTRweDtcblx0XHRcdFx0XHRsZWZ0OiAtNHB4O1xuXG5cdFx0XHRcdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0XHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0XHRcdFx0fVxuXHRcdFx0XHR9XG5cdFx0ICBgXG5cdFx0OiAnJztcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYiA9IHN0eWxlZC5zcGFuPCBUaHVtYlByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRoZWlnaHQ6IDEwMCU7XG5cdG91dGxpbmU6IDA7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdHdpZHRoOiAxMDAlO1xuXHRib3gtc2hhZG93OiAkeyBDT05GSUcuZWxldmF0aW9uWFNtYWxsIH07XG5cblx0JHsgdGh1bWJDb2xvciB9O1xuXHQkeyB0aHVtYkZvY3VzIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRSYW5nZSA9IHN0eWxlZC5pbnB1dGBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAxMDAlO1xuXHRsZWZ0OiAwO1xuXHRtYXJnaW46IDAgLSR7IHRodW1iU2l6ZSAvIDIgfXB4O1xuXHRvcGFjaXR5OiAwO1xuXHRvdXRsaW5lOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHJpZ2h0OiAwO1xuXHR0b3A6IDA7XG5cdHdpZHRoOiBjYWxjKCAxMDAlICsgJHsgdGh1bWJTaXplIH1weCApO1xuYDtcblxuY29uc3QgdG9vbHRpcFNob3cgPSAoIHsgc2hvdyB9OiBUb29sdGlwUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0ZGlzcGxheTogJHsgc2hvdyA/ICdpbmxpbmUtYmxvY2snIDogJ25vbmUnIH07XG5cdFx0b3BhY2l0eTogJHsgc2hvdyA/IDEgOiAwIH07XG5cblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246XG5cdFx0XHRcdG9wYWNpdHkgMTIwbXMgZWFzZSxcblx0XHRcdFx0ZGlzcGxheSAxMjBtcyBlYXNlIGFsbG93LWRpc2NyZXRlO1xuXHRcdH1cblxuXHRcdEBzdGFydGluZy1zdHlsZSB7XG5cdFx0XHRvcGFjaXR5OiAwO1xuXHRcdH1cblx0YDtcbn07XG5cbmNvbnN0IHRvb2x0aXBQbGFjZW1lbnQgPSAoIHsgcGxhY2VtZW50IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0Y29uc3QgaXNCb3R0b20gPSBwbGFjZW1lbnQgPT09ICdib3R0b20nO1xuXG5cdGlmICggaXNCb3R0b20gKSB7XG5cdFx0cmV0dXJuIGNzc2Bcblx0XHRcdGJvdHRvbTogLTgwJTtcblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHR0b3A6IC04MCU7XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHRpcCA9IHN0eWxlZC5zcGFuPCBUb29sdGlwUHJvcHMgPmBcblx0YmFja2dyb3VuZDogcmdiYSggMCwgMCwgMCwgMC44ICk7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRjb2xvcjogd2hpdGU7XG5cdGZvbnQtc2l6ZTogMTJweDtcblx0bWluLXdpZHRoOiAzMnB4O1xuXHRwYWRkaW5nOiA0cHggOHB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRsaW5lLWhlaWdodDogMS40O1xuXG5cdCR7IHRvb2x0aXBTaG93IH07XG5cblx0JHsgdG9vbHRpcFBsYWNlbWVudCB9O1xuXHQkeyBydGwoXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKC01MCUpJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCg1MCUpJyB9XG5cdCkgfVxuYDtcblxuLy8gQHRvZG8gUmVmYWN0b3IgUmFuZ2VDb250cm9sIHdpdGggbGF0ZXN0IEhTdGFjayBjb25maWd1cmF0aW9uXG4vLyBAc2VlOiBwYWNrYWdlcy9jb21wb25lbnRzL3NyYy9oLXN0YWNrXG5leHBvcnQgY29uc3QgSW5wdXROdW1iZXIgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0ZGlzcGxheTogaW5saW5lLWJsb2NrO1xuXHRmb250LXNpemU6IDEzcHg7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0aW5wdXRbdHlwZT0nbnVtYmVyJ10mIHtcblx0XHQkeyByYW5nZUhlaWdodCB9O1xuXHR9XG5cblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IGAkeyBzcGFjZSggNCApIH0gIWltcG9ydGFudGAgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBY3Rpb25SaWdodFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0YnV0dG9uLFxuXHRidXR0b24uaXMtc21hbGwge1xuXHRcdG1hcmdpbi1sZWZ0OiAwO1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogOCB9ICkgfVxuYDtcbiJdfQ== */"));
  var markLabelFill = ({
    isFilled
  }) => {
    return /* @__PURE__ */ css({
      color: isFilled ? COLORS.theme.gray[700] : COLORS.theme.gray[300]
    }, false ? "" : ";label:markLabelFill;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTRKUSIsImZpbGUiOiJyYW5nZS1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IE51bWJlckNvbnRyb2wgZnJvbSAnLi4vLi4vbnVtYmVyLWNvbnRyb2wnO1xuaW1wb3J0IHsgQ09MT1JTLCBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5pbXBvcnQgdHlwZSB7XG5cdFJhbmdlTWFya1Byb3BzLFxuXHRSYWlsUHJvcHMsXG5cdFRodW1iUHJvcHMsXG5cdFRvb2x0aXBQcm9wcyxcblx0VHJhY2tQcm9wcyxcblx0V3JhcHBlclByb3BzLFxuXHRSYW5nZUNvbnRyb2xQcm9wcyxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuXG5jb25zdCByYW5nZUhlaWdodFZhbHVlID0gMzA7XG5jb25zdCByYWlsSGVpZ2h0ID0gNDtcbmNvbnN0IHJhbmdlSGVpZ2h0ID0gKCkgPT5cblx0Y3NzKCB7IGhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSwgbWluSGVpZ2h0OiByYW5nZUhlaWdodFZhbHVlIH0gKTtcbmNvbnN0IHRodW1iU2l6ZSA9IDEyO1xuXG5jb25zdCBkZXByZWNhdGVkSGVpZ2h0ID0gKCB7XG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcbn06IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+ICkgPT5cblx0ISBfX25leHQ0MHB4RGVmYXVsdFNpemUgJiYgY3NzKCB7IG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5cbnR5cGUgUm9vdFByb3BzID0gUGljazwgUmFuZ2VDb250cm9sUHJvcHMsICdfX25leHQ0MHB4RGVmYXVsdFNpemUnID47XG5leHBvcnQgY29uc3QgUm9vdCA9IHN0eWxlZC5kaXY8IFJvb3RQcm9wcyA+YFxuXHQtd2Via2l0LXRhcC1oaWdobGlnaHQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7XG5cdHBhZGRpbmc6IDA7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0dG91Y2gtYWN0aW9uOiBub25lO1xuXHR3aWR0aDogMTAwJTtcblx0bWluLWhlaWdodDogNDBweDtcblx0LyogVE9ETzogcmVtb3ZlIGFmdGVyIHJlbW92aW5nIHRoZSBfX25leHQ0MHB4RGVmYXVsdFNpemUgcHJvcCAqL1xuXHQkeyBkZXByZWNhdGVkSGVpZ2h0IH07XG5gO1xuXG5jb25zdCB3cmFwcGVyQ29sb3IgPSAoIHsgY29sb3IgPSBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTogV3JhcHBlclByb3BzICkgPT5cblx0Y3NzKCB7IGNvbG9yIH0gKTtcblxuZXhwb3J0IGNvbnN0IFdyYXBwZXIgPSBzdHlsZWQoICdkaXYnLCB7XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3A6IHN0cmluZyApID0+XG5cdFx0ISBbICdjb2xvcicsICdtYXJrcycgXS5pbmNsdWRlcyggcHJvcCApLFxufSApPCBXcmFwcGVyUHJvcHMgPmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdGZsZXg6IDE7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cblx0JHsgd3JhcHBlckNvbG9yIH07XG5cdCR7IHJhbmdlSGVpZ2h0IH07XG5gO1xuXG5leHBvcnQgY29uc3QgQmVmb3JlSWNvbldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogZmxleDsgLy8gZW5zdXJlcyB0aGUgaGVpZ2h0IGlzbid0IGFmZmVjdGVkIGJ5IGxpbmUtaGVpZ2h0XG5cdG1hcmdpbi10b3A6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXG5cdCR7IHJ0bCggeyBtYXJnaW5SaWdodDogNiB9ICkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IEFmdGVySWNvbldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogZmxleDsgLy8gZW5zdXJlcyB0aGUgaGVpZ2h0IGlzbid0IGFmZmVjdGVkIGJ5IGxpbmUtaGVpZ2h0XG5cdG1hcmdpbi10b3A6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiA2IH0gKSB9XG5gO1xuXG5jb25zdCByYWlsQmFja2dyb3VuZENvbG9yID0gKCB7IGRpc2FibGVkLCByYWlsQ29sb3IgfTogUmFpbFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy51aS5iYWNrZ3JvdW5kRGlzYWJsZWRcblx0XHRcdDogcmFpbENvbG9yIHx8IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXG5cdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFJhaWwgPSBzdHlsZWQuc3BhbmBcblx0bGVmdDogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHJpZ2h0OiAwO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRtYXJnaW4tdG9wOiAkeyAoIHJhbmdlSGVpZ2h0VmFsdWUgLSByYWlsSGVpZ2h0ICkgLyAyIH1weDtcblx0dG9wOiAwO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXG5cdCR7IHJhaWxCYWNrZ3JvdW5kQ29sb3IgfTtcbmA7XG5cbmNvbnN0IHRyYWNrQmFja2dyb3VuZENvbG9yID0gKCB7IGRpc2FibGVkLCB0cmFja0NvbG9yIH06IFRyYWNrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IHRyYWNrQ29sb3IgfHwgJ2N1cnJlbnRDb2xvcicgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUcmFjayA9IHN0eWxlZC5zcGFuYFxuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXHRoZWlnaHQ6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0ZGlzcGxheTogYmxvY2s7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblxuXHQuaXMtbWFya2VkICYge1xuXHRcdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFx0dHJhbnNpdGlvbjogd2lkdGggZWFzZSAwLjFzO1xuXHRcdH1cblx0fVxuXG5cdCR7IHRyYWNrQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5leHBvcnQgY29uc3QgTWFya3NXcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHR3aWR0aDogMTAwJTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdG1hcmdpbi10b3A6IDE3cHg7XG5gO1xuXG5leHBvcnQgY29uc3QgTWFyayA9IHN0eWxlZC5zcGFuYFxuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdGxlZnQ6IDA7XG5cdHRvcDogLTRweDtcblx0aGVpZ2h0OiA0cHg7XG5cdHdpZHRoOiAycHg7XG5cdHRyYW5zZm9ybTogdHJhbnNsYXRlWCggLTUwJSApO1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZCB9O1xuXHR6LWluZGV4OiAxO1xuYDtcblxuY29uc3QgbWFya0xhYmVsRmlsbCA9ICggeyBpc0ZpbGxlZCB9OiBSYW5nZU1hcmtQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzcygge1xuXHRcdGNvbG9yOiBpc0ZpbGxlZCA/IENPTE9SUy50aGVtZS5ncmF5WyA3MDAgXSA6IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSxcblx0fSApO1xufTtcblxuZXhwb3J0IGNvbnN0IE1hcmtMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmdyYXlbIDMwMCBdIH07XG5cdGZvbnQtc2l6ZTogMTFweDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDhweDtcblx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcblxuXHQkeyBydGwoIHsgbGVmdDogMCB9ICkgfTtcblx0JHsgcnRsKFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggLTUwJSApJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggNTAlICknIH1cblx0KSB9O1xuXG5cdCR7IG1hcmtMYWJlbEZpbGwgfTtcbmA7XG5cbmNvbnN0IHRodW1iQ29sb3IgPSAoIHsgZGlzYWJsZWQgfTogVGh1bWJQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudGhlbWUuZ3JheVsgNDAwIF1cblx0XHRcdDogQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXG5cdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWQgPyAnR3JheVRleHQnIDogJ0NhbnZhc1RleHQnIH07XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFRodW1iV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRoZWlnaHQ6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRtYXJnaW4tdG9wOiAkeyAoIHJhbmdlSGVpZ2h0VmFsdWUgLSB0aHVtYlNpemUgKSAvIDIgfXB4O1xuXHRvdXRsaW5lOiAwO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHR3aWR0aDogJHsgdGh1bWJTaXplIH1weDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdHotaW5kZXg6IDM7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IGxlZnQgZWFzZSAwLjFzO1xuXHRcdH1cblx0fVxuXG5cdCR7IHRodW1iQ29sb3IgfTtcblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IC0xMCB9ICkgfTtcblx0JHsgcnRsKFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggNC41cHggKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC00LjVweCApJyB9XG5cdCkgfTtcbmA7XG5cbmNvbnN0IHRodW1iRm9jdXMgPSAoIHsgaXNGb2N1c2VkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBpc0ZvY3VzZWRcblx0XHQ/IGNzc2Bcblx0XHRcdFx0Jjo6YmVmb3JlIHtcblx0XHRcdFx0XHRjb250ZW50OiAnICc7XG5cdFx0XHRcdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdFx0XHRcdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHRcdFx0XHRvcGFjaXR5OiAwLjQ7XG5cdFx0XHRcdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdFx0XHRcdFx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgKyA4IH1weDtcblx0XHRcdFx0XHR3aWR0aDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0dG9wOiAtNHB4O1xuXHRcdFx0XHRcdGxlZnQ6IC00cHg7XG5cblx0XHRcdFx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRcdFx0XHRiYWNrZ3JvdW5kOiBHcmF5VGV4dDtcblx0XHRcdFx0XHR9XG5cdFx0XHRcdH1cblx0XHQgIGBcblx0XHQ6ICcnO1xufTtcblxuZXhwb3J0IGNvbnN0IFRodW1iID0gc3R5bGVkLnNwYW48IFRodW1iUHJvcHMgPmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdGhlaWdodDogMTAwJTtcblx0b3V0bGluZTogMDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdGJveC1zaGFkb3c6ICR7IENPTkZJRy5lbGV2YXRpb25YU21hbGwgfTtcblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHRodW1iRm9jdXMgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJbnB1dFJhbmdlID0gc3R5bGVkLmlucHV0YFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRjdXJzb3I6IHBvaW50ZXI7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRoZWlnaHQ6IDEwMCU7XG5cdGxlZnQ6IDA7XG5cdG1hcmdpbjogMCAtJHsgdGh1bWJTaXplIC8gMiB9cHg7XG5cdG9wYWNpdHk6IDA7XG5cdG91dGxpbmU6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0cmlnaHQ6IDA7XG5cdHRvcDogMDtcblx0d2lkdGg6IGNhbGMoIDEwMCUgKyAkeyB0aHVtYlNpemUgfXB4ICk7XG5gO1xuXG5jb25zdCB0b29sdGlwU2hvdyA9ICggeyBzaG93IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRkaXNwbGF5OiAkeyBzaG93ID8gJ2lubGluZS1ibG9jaycgOiAnbm9uZScgfTtcblx0XHRvcGFjaXR5OiAkeyBzaG93ID8gMSA6IDAgfTtcblxuXHRcdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFx0dHJhbnNpdGlvbjpcblx0XHRcdFx0b3BhY2l0eSAxMjBtcyBlYXNlLFxuXHRcdFx0XHRkaXNwbGF5IDEyMG1zIGVhc2UgYWxsb3ctZGlzY3JldGU7XG5cdFx0fVxuXG5cdFx0QHN0YXJ0aW5nLXN0eWxlIHtcblx0XHRcdG9wYWNpdHk6IDA7XG5cdFx0fVxuXHRgO1xufTtcblxuY29uc3QgdG9vbHRpcFBsYWNlbWVudCA9ICggeyBwbGFjZW1lbnQgfTogVG9vbHRpcFByb3BzICkgPT4ge1xuXHRjb25zdCBpc0JvdHRvbSA9IHBsYWNlbWVudCA9PT0gJ2JvdHRvbSc7XG5cblx0aWYgKCBpc0JvdHRvbSApIHtcblx0XHRyZXR1cm4gY3NzYFxuXHRcdFx0Ym90dG9tOiAtODAlO1xuXHRcdGA7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdHRvcDogLTgwJTtcblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUb29sdGlwID0gc3R5bGVkLnNwYW48IFRvb2x0aXBQcm9wcyA+YFxuXHRiYWNrZ3JvdW5kOiByZ2JhKCAwLCAwLCAwLCAwLjggKTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGNvbG9yOiB3aGl0ZTtcblx0Zm9udC1zaXplOiAxMnB4O1xuXHRtaW4td2lkdGg6IDMycHg7XG5cdHBhZGRpbmc6IDRweCA4cHg7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRleHQtYWxpZ246IGNlbnRlcjtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cblx0JHsgdG9vbHRpcFNob3cgfTtcblxuXHQkeyB0b29sdGlwUGxhY2VtZW50IH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoLTUwJSknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKDUwJSknIH1cblx0KSB9XG5gO1xuXG4vLyBAdG9kbyBSZWZhY3RvciBSYW5nZUNvbnRyb2wgd2l0aCBsYXRlc3QgSFN0YWNrIGNvbmZpZ3VyYXRpb25cbi8vIEBzZWU6IHBhY2thZ2VzL2NvbXBvbmVudHMvc3JjL2gtc3RhY2tcbmV4cG9ydCBjb25zdCBJbnB1dE51bWJlciA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHRkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG5cdGZvbnQtc2l6ZTogMTNweDtcblx0bWFyZ2luLXRvcDogMDtcblxuXHRpbnB1dFt0eXBlPSdudW1iZXInXSYge1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogYCR7IHNwYWNlKCA0ICkgfSAhaW1wb3J0YW50YCB9ICkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IEFjdGlvblJpZ2h0V3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0bWFyZ2luLXRvcDogMDtcblxuXHRidXR0b24sXG5cdGJ1dHRvbi5pcy1zbWFsbCB7XG5cdFx0bWFyZ2luLWxlZnQ6IDA7XG5cdFx0JHsgcmFuZ2VIZWlnaHQgfTtcblx0fVxuXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiA4IH0gKSB9XG5gO1xuIl19 */");
  };
  var MarkLabel = /* @__PURE__ */ createStyled("span", false ? {
    target: "e1epgpqk6"
  } : {
    target: "e1epgpqk6",
    label: "MarkLabel"
  })("color:", COLORS.theme.gray[300], ";font-size:11px;position:absolute;top:8px;white-space:nowrap;", rtl({
    left: 0
  }), ";", rtl({
    transform: "translateX( -50% )"
  }, {
    transform: "translateX( 50% )"
  }), ";", markLabelFill, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWlLb0MiLCJmaWxlIjoicmFuZ2UtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBOdW1iZXJDb250cm9sIGZyb20gJy4uLy4uL251bWJlci1jb250cm9sJztcbmltcG9ydCB7IENPTE9SUywgcnRsLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuaW1wb3J0IHR5cGUge1xuXHRSYW5nZU1hcmtQcm9wcyxcblx0UmFpbFByb3BzLFxuXHRUaHVtYlByb3BzLFxuXHRUb29sdGlwUHJvcHMsXG5cdFRyYWNrUHJvcHMsXG5cdFdyYXBwZXJQcm9wcyxcblx0UmFuZ2VDb250cm9sUHJvcHMsXG59IGZyb20gJy4uL3R5cGVzJztcblxuY29uc3QgcmFuZ2VIZWlnaHRWYWx1ZSA9IDMwO1xuY29uc3QgcmFpbEhlaWdodCA9IDQ7XG5jb25zdCByYW5nZUhlaWdodCA9ICgpID0+XG5cdGNzcyggeyBoZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUsIG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5jb25zdCB0aHVtYlNpemUgPSAxMjtcblxuY29uc3QgZGVwcmVjYXRlZEhlaWdodCA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBQaWNrPCBSYW5nZUNvbnRyb2xQcm9wcywgJ19fbmV4dDQwcHhEZWZhdWx0U2l6ZScgPiApID0+XG5cdCEgX19uZXh0NDBweERlZmF1bHRTaXplICYmIGNzcyggeyBtaW5IZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUgfSApO1xuXG50eXBlIFJvb3RQcm9wcyA9IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+O1xuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQuZGl2PCBSb290UHJvcHMgPmBcblx0LXdlYmtpdC10YXAtaGlnaGxpZ2h0LWNvbG9yOiB0cmFuc3BhcmVudDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0anVzdGlmeS1jb250ZW50OiBmbGV4LXN0YXJ0O1xuXHRwYWRkaW5nOiAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHRvdWNoLWFjdGlvbjogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdC8qIFRPRE86IHJlbW92ZSBhZnRlciByZW1vdmluZyB0aGUgX19uZXh0NDBweERlZmF1bHRTaXplIHByb3AgKi9cblx0JHsgZGVwcmVjYXRlZEhlaWdodCB9O1xuYDtcblxuY29uc3Qgd3JhcHBlckNvbG9yID0gKCB7IGNvbG9yID0gQ09MT1JTLnVpLmJvcmRlckZvY3VzIH06IFdyYXBwZXJQcm9wcyApID0+XG5cdGNzcyggeyBjb2xvciB9ICk7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkKCAnZGl2Jywge1xuXHRzaG91bGRGb3J3YXJkUHJvcDogKCBwcm9wOiBzdHJpbmcgKSA9PlxuXHRcdCEgWyAnY29sb3InLCAnbWFya3MnIF0uaW5jbHVkZXMoIHByb3AgKSxcbn0gKTwgV3JhcHBlclByb3BzID5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRmbGV4OiAxO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHdpZHRoOiAxMDAlO1xuXG5cdCR7IHdyYXBwZXJDb2xvciB9O1xuXHQkeyByYW5nZUhlaWdodCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEJlZm9yZUljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luUmlnaHQ6IDYgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBZnRlckljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogNiB9ICkgfVxuYDtcblxuY29uc3QgcmFpbEJhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgcmFpbENvbG9yIH06IFJhaWxQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0XHQ6IHJhaWxDb2xvciB8fCBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0gfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6IEdyYXlUZXh0O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBSYWlsID0gc3R5bGVkLnNwYW5gXG5cdGxlZnQ6IDA7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRyaWdodDogMDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdGhlaWdodDogJHsgcmFpbEhlaWdodCB9cHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblxuXHQkeyByYWlsQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5jb25zdCB0cmFja0JhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgdHJhY2tDb2xvciB9OiBUcmFja1Byb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy50aGVtZS5ncmF5WyA0MDAgXVxuXHRcdFx0OiB0cmFja0NvbG9yIHx8ICdjdXJyZW50Q29sb3InIH07XG5cblx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZCA/ICdHcmF5VGV4dCcgOiAnQ2FudmFzVGV4dCcgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVHJhY2sgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdG1hcmdpbi10b3A6ICR7ICggcmFuZ2VIZWlnaHRWYWx1ZSAtIHJhaWxIZWlnaHQgKSAvIDIgfXB4O1xuXHR0b3A6IDA7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IHdpZHRoIGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0cmFja0JhY2tncm91bmRDb2xvciB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmtzV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRtYXJnaW4tdG9wOiAxN3B4O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmsgPSBzdHlsZWQuc3BhbmBcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRsZWZ0OiAwO1xuXHR0b3A6IC00cHg7XG5cdGhlaWdodDogNHB4O1xuXHR3aWR0aDogMnB4O1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoIC01MCUgKTtcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0ei1pbmRleDogMTtcbmA7XG5cbmNvbnN0IG1hcmtMYWJlbEZpbGwgPSAoIHsgaXNGaWxsZWQgfTogUmFuZ2VNYXJrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogaXNGaWxsZWQgPyBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF0gOiBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0sXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBNYXJrTGFiZWwgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRmb250LXNpemU6IDExcHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiA4cHg7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cblx0JHsgcnRsKCB7IGxlZnQ6IDAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC01MCUgKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDUwJSApJyB9XG5cdCkgfTtcblxuXHQkeyBtYXJrTGFiZWxGaWxsIH07XG5gO1xuXG5jb25zdCB0aHVtYkNvbG9yID0gKCB7IGRpc2FibGVkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgfXB4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gdGh1bWJTaXplICkgLyAyIH1weDtcblx0b3V0bGluZTogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHR6LWluZGV4OiAzO1xuXG5cdC5pcy1tYXJrZWQgJiB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHR0cmFuc2l0aW9uOiBsZWZ0IGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiAtMTAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDQuNXB4ICknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKCAtNC41cHggKScgfVxuXHQpIH07XG5gO1xuXG5jb25zdCB0aHVtYkZvY3VzID0gKCB7IGlzRm9jdXNlZCB9OiBUaHVtYlByb3BzICkgPT4ge1xuXHRyZXR1cm4gaXNGb2N1c2VkXG5cdFx0PyBjc3NgXG5cdFx0XHRcdCY6OmJlZm9yZSB7XG5cdFx0XHRcdFx0Y29udGVudDogJyAnO1xuXHRcdFx0XHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRcdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHRcdFx0b3BhY2l0eTogMC40O1xuXHRcdFx0XHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRcdFx0XHRcdGhlaWdodDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0d2lkdGg6ICR7IHRodW1iU2l6ZSArIDggfXB4O1xuXHRcdFx0XHRcdHRvcDogLTRweDtcblx0XHRcdFx0XHRsZWZ0OiAtNHB4O1xuXG5cdFx0XHRcdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0XHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0XHRcdFx0fVxuXHRcdFx0XHR9XG5cdFx0ICBgXG5cdFx0OiAnJztcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYiA9IHN0eWxlZC5zcGFuPCBUaHVtYlByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRoZWlnaHQ6IDEwMCU7XG5cdG91dGxpbmU6IDA7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdHdpZHRoOiAxMDAlO1xuXHRib3gtc2hhZG93OiAkeyBDT05GSUcuZWxldmF0aW9uWFNtYWxsIH07XG5cblx0JHsgdGh1bWJDb2xvciB9O1xuXHQkeyB0aHVtYkZvY3VzIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRSYW5nZSA9IHN0eWxlZC5pbnB1dGBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAxMDAlO1xuXHRsZWZ0OiAwO1xuXHRtYXJnaW46IDAgLSR7IHRodW1iU2l6ZSAvIDIgfXB4O1xuXHRvcGFjaXR5OiAwO1xuXHRvdXRsaW5lOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHJpZ2h0OiAwO1xuXHR0b3A6IDA7XG5cdHdpZHRoOiBjYWxjKCAxMDAlICsgJHsgdGh1bWJTaXplIH1weCApO1xuYDtcblxuY29uc3QgdG9vbHRpcFNob3cgPSAoIHsgc2hvdyB9OiBUb29sdGlwUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0ZGlzcGxheTogJHsgc2hvdyA/ICdpbmxpbmUtYmxvY2snIDogJ25vbmUnIH07XG5cdFx0b3BhY2l0eTogJHsgc2hvdyA/IDEgOiAwIH07XG5cblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246XG5cdFx0XHRcdG9wYWNpdHkgMTIwbXMgZWFzZSxcblx0XHRcdFx0ZGlzcGxheSAxMjBtcyBlYXNlIGFsbG93LWRpc2NyZXRlO1xuXHRcdH1cblxuXHRcdEBzdGFydGluZy1zdHlsZSB7XG5cdFx0XHRvcGFjaXR5OiAwO1xuXHRcdH1cblx0YDtcbn07XG5cbmNvbnN0IHRvb2x0aXBQbGFjZW1lbnQgPSAoIHsgcGxhY2VtZW50IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0Y29uc3QgaXNCb3R0b20gPSBwbGFjZW1lbnQgPT09ICdib3R0b20nO1xuXG5cdGlmICggaXNCb3R0b20gKSB7XG5cdFx0cmV0dXJuIGNzc2Bcblx0XHRcdGJvdHRvbTogLTgwJTtcblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHR0b3A6IC04MCU7XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHRpcCA9IHN0eWxlZC5zcGFuPCBUb29sdGlwUHJvcHMgPmBcblx0YmFja2dyb3VuZDogcmdiYSggMCwgMCwgMCwgMC44ICk7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRjb2xvcjogd2hpdGU7XG5cdGZvbnQtc2l6ZTogMTJweDtcblx0bWluLXdpZHRoOiAzMnB4O1xuXHRwYWRkaW5nOiA0cHggOHB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRsaW5lLWhlaWdodDogMS40O1xuXG5cdCR7IHRvb2x0aXBTaG93IH07XG5cblx0JHsgdG9vbHRpcFBsYWNlbWVudCB9O1xuXHQkeyBydGwoXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKC01MCUpJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCg1MCUpJyB9XG5cdCkgfVxuYDtcblxuLy8gQHRvZG8gUmVmYWN0b3IgUmFuZ2VDb250cm9sIHdpdGggbGF0ZXN0IEhTdGFjayBjb25maWd1cmF0aW9uXG4vLyBAc2VlOiBwYWNrYWdlcy9jb21wb25lbnRzL3NyYy9oLXN0YWNrXG5leHBvcnQgY29uc3QgSW5wdXROdW1iZXIgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0ZGlzcGxheTogaW5saW5lLWJsb2NrO1xuXHRmb250LXNpemU6IDEzcHg7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0aW5wdXRbdHlwZT0nbnVtYmVyJ10mIHtcblx0XHQkeyByYW5nZUhlaWdodCB9O1xuXHR9XG5cblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IGAkeyBzcGFjZSggNCApIH0gIWltcG9ydGFudGAgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBY3Rpb25SaWdodFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0YnV0dG9uLFxuXHRidXR0b24uaXMtc21hbGwge1xuXHRcdG1hcmdpbi1sZWZ0OiAwO1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogOCB9ICkgfVxuYDtcbiJdfQ== */"));
  var thumbColor = ({
    disabled
  }) => {
    return /* @__PURE__ */ css("background:", disabled ? COLORS.theme.gray[400] : COLORS.theme.accent, ";@media ( forced-colors: active ){background:", disabled ? "GrayText" : "CanvasText", ";}" + (false ? "" : ";label:thumbColor;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWtMVyIsImZpbGUiOiJyYW5nZS1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IE51bWJlckNvbnRyb2wgZnJvbSAnLi4vLi4vbnVtYmVyLWNvbnRyb2wnO1xuaW1wb3J0IHsgQ09MT1JTLCBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5pbXBvcnQgdHlwZSB7XG5cdFJhbmdlTWFya1Byb3BzLFxuXHRSYWlsUHJvcHMsXG5cdFRodW1iUHJvcHMsXG5cdFRvb2x0aXBQcm9wcyxcblx0VHJhY2tQcm9wcyxcblx0V3JhcHBlclByb3BzLFxuXHRSYW5nZUNvbnRyb2xQcm9wcyxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuXG5jb25zdCByYW5nZUhlaWdodFZhbHVlID0gMzA7XG5jb25zdCByYWlsSGVpZ2h0ID0gNDtcbmNvbnN0IHJhbmdlSGVpZ2h0ID0gKCkgPT5cblx0Y3NzKCB7IGhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSwgbWluSGVpZ2h0OiByYW5nZUhlaWdodFZhbHVlIH0gKTtcbmNvbnN0IHRodW1iU2l6ZSA9IDEyO1xuXG5jb25zdCBkZXByZWNhdGVkSGVpZ2h0ID0gKCB7XG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcbn06IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+ICkgPT5cblx0ISBfX25leHQ0MHB4RGVmYXVsdFNpemUgJiYgY3NzKCB7IG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5cbnR5cGUgUm9vdFByb3BzID0gUGljazwgUmFuZ2VDb250cm9sUHJvcHMsICdfX25leHQ0MHB4RGVmYXVsdFNpemUnID47XG5leHBvcnQgY29uc3QgUm9vdCA9IHN0eWxlZC5kaXY8IFJvb3RQcm9wcyA+YFxuXHQtd2Via2l0LXRhcC1oaWdobGlnaHQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7XG5cdHBhZGRpbmc6IDA7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0dG91Y2gtYWN0aW9uOiBub25lO1xuXHR3aWR0aDogMTAwJTtcblx0bWluLWhlaWdodDogNDBweDtcblx0LyogVE9ETzogcmVtb3ZlIGFmdGVyIHJlbW92aW5nIHRoZSBfX25leHQ0MHB4RGVmYXVsdFNpemUgcHJvcCAqL1xuXHQkeyBkZXByZWNhdGVkSGVpZ2h0IH07XG5gO1xuXG5jb25zdCB3cmFwcGVyQ29sb3IgPSAoIHsgY29sb3IgPSBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTogV3JhcHBlclByb3BzICkgPT5cblx0Y3NzKCB7IGNvbG9yIH0gKTtcblxuZXhwb3J0IGNvbnN0IFdyYXBwZXIgPSBzdHlsZWQoICdkaXYnLCB7XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3A6IHN0cmluZyApID0+XG5cdFx0ISBbICdjb2xvcicsICdtYXJrcycgXS5pbmNsdWRlcyggcHJvcCApLFxufSApPCBXcmFwcGVyUHJvcHMgPmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdGZsZXg6IDE7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cblx0JHsgd3JhcHBlckNvbG9yIH07XG5cdCR7IHJhbmdlSGVpZ2h0IH07XG5gO1xuXG5leHBvcnQgY29uc3QgQmVmb3JlSWNvbldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogZmxleDsgLy8gZW5zdXJlcyB0aGUgaGVpZ2h0IGlzbid0IGFmZmVjdGVkIGJ5IGxpbmUtaGVpZ2h0XG5cdG1hcmdpbi10b3A6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXG5cdCR7IHJ0bCggeyBtYXJnaW5SaWdodDogNiB9ICkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IEFmdGVySWNvbldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogZmxleDsgLy8gZW5zdXJlcyB0aGUgaGVpZ2h0IGlzbid0IGFmZmVjdGVkIGJ5IGxpbmUtaGVpZ2h0XG5cdG1hcmdpbi10b3A6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiA2IH0gKSB9XG5gO1xuXG5jb25zdCByYWlsQmFja2dyb3VuZENvbG9yID0gKCB7IGRpc2FibGVkLCByYWlsQ29sb3IgfTogUmFpbFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy51aS5iYWNrZ3JvdW5kRGlzYWJsZWRcblx0XHRcdDogcmFpbENvbG9yIHx8IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXG5cdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFJhaWwgPSBzdHlsZWQuc3BhbmBcblx0bGVmdDogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHJpZ2h0OiAwO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRtYXJnaW4tdG9wOiAkeyAoIHJhbmdlSGVpZ2h0VmFsdWUgLSByYWlsSGVpZ2h0ICkgLyAyIH1weDtcblx0dG9wOiAwO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXG5cdCR7IHJhaWxCYWNrZ3JvdW5kQ29sb3IgfTtcbmA7XG5cbmNvbnN0IHRyYWNrQmFja2dyb3VuZENvbG9yID0gKCB7IGRpc2FibGVkLCB0cmFja0NvbG9yIH06IFRyYWNrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IHRyYWNrQ29sb3IgfHwgJ2N1cnJlbnRDb2xvcicgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUcmFjayA9IHN0eWxlZC5zcGFuYFxuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXHRoZWlnaHQ6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0ZGlzcGxheTogYmxvY2s7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblxuXHQuaXMtbWFya2VkICYge1xuXHRcdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFx0dHJhbnNpdGlvbjogd2lkdGggZWFzZSAwLjFzO1xuXHRcdH1cblx0fVxuXG5cdCR7IHRyYWNrQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5leHBvcnQgY29uc3QgTWFya3NXcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHR3aWR0aDogMTAwJTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdG1hcmdpbi10b3A6IDE3cHg7XG5gO1xuXG5leHBvcnQgY29uc3QgTWFyayA9IHN0eWxlZC5zcGFuYFxuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdGxlZnQ6IDA7XG5cdHRvcDogLTRweDtcblx0aGVpZ2h0OiA0cHg7XG5cdHdpZHRoOiAycHg7XG5cdHRyYW5zZm9ybTogdHJhbnNsYXRlWCggLTUwJSApO1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZCB9O1xuXHR6LWluZGV4OiAxO1xuYDtcblxuY29uc3QgbWFya0xhYmVsRmlsbCA9ICggeyBpc0ZpbGxlZCB9OiBSYW5nZU1hcmtQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzcygge1xuXHRcdGNvbG9yOiBpc0ZpbGxlZCA/IENPTE9SUy50aGVtZS5ncmF5WyA3MDAgXSA6IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSxcblx0fSApO1xufTtcblxuZXhwb3J0IGNvbnN0IE1hcmtMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmdyYXlbIDMwMCBdIH07XG5cdGZvbnQtc2l6ZTogMTFweDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDhweDtcblx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcblxuXHQkeyBydGwoIHsgbGVmdDogMCB9ICkgfTtcblx0JHsgcnRsKFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggLTUwJSApJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggNTAlICknIH1cblx0KSB9O1xuXG5cdCR7IG1hcmtMYWJlbEZpbGwgfTtcbmA7XG5cbmNvbnN0IHRodW1iQ29sb3IgPSAoIHsgZGlzYWJsZWQgfTogVGh1bWJQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudGhlbWUuZ3JheVsgNDAwIF1cblx0XHRcdDogQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXG5cdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWQgPyAnR3JheVRleHQnIDogJ0NhbnZhc1RleHQnIH07XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFRodW1iV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRoZWlnaHQ6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRtYXJnaW4tdG9wOiAkeyAoIHJhbmdlSGVpZ2h0VmFsdWUgLSB0aHVtYlNpemUgKSAvIDIgfXB4O1xuXHRvdXRsaW5lOiAwO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHR3aWR0aDogJHsgdGh1bWJTaXplIH1weDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdHotaW5kZXg6IDM7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IGxlZnQgZWFzZSAwLjFzO1xuXHRcdH1cblx0fVxuXG5cdCR7IHRodW1iQ29sb3IgfTtcblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IC0xMCB9ICkgfTtcblx0JHsgcnRsKFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggNC41cHggKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC00LjVweCApJyB9XG5cdCkgfTtcbmA7XG5cbmNvbnN0IHRodW1iRm9jdXMgPSAoIHsgaXNGb2N1c2VkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBpc0ZvY3VzZWRcblx0XHQ/IGNzc2Bcblx0XHRcdFx0Jjo6YmVmb3JlIHtcblx0XHRcdFx0XHRjb250ZW50OiAnICc7XG5cdFx0XHRcdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdFx0XHRcdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHRcdFx0XHRvcGFjaXR5OiAwLjQ7XG5cdFx0XHRcdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdFx0XHRcdFx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgKyA4IH1weDtcblx0XHRcdFx0XHR3aWR0aDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0dG9wOiAtNHB4O1xuXHRcdFx0XHRcdGxlZnQ6IC00cHg7XG5cblx0XHRcdFx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRcdFx0XHRiYWNrZ3JvdW5kOiBHcmF5VGV4dDtcblx0XHRcdFx0XHR9XG5cdFx0XHRcdH1cblx0XHQgIGBcblx0XHQ6ICcnO1xufTtcblxuZXhwb3J0IGNvbnN0IFRodW1iID0gc3R5bGVkLnNwYW48IFRodW1iUHJvcHMgPmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdGhlaWdodDogMTAwJTtcblx0b3V0bGluZTogMDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdGJveC1zaGFkb3c6ICR7IENPTkZJRy5lbGV2YXRpb25YU21hbGwgfTtcblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHRodW1iRm9jdXMgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJbnB1dFJhbmdlID0gc3R5bGVkLmlucHV0YFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRjdXJzb3I6IHBvaW50ZXI7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRoZWlnaHQ6IDEwMCU7XG5cdGxlZnQ6IDA7XG5cdG1hcmdpbjogMCAtJHsgdGh1bWJTaXplIC8gMiB9cHg7XG5cdG9wYWNpdHk6IDA7XG5cdG91dGxpbmU6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0cmlnaHQ6IDA7XG5cdHRvcDogMDtcblx0d2lkdGg6IGNhbGMoIDEwMCUgKyAkeyB0aHVtYlNpemUgfXB4ICk7XG5gO1xuXG5jb25zdCB0b29sdGlwU2hvdyA9ICggeyBzaG93IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRkaXNwbGF5OiAkeyBzaG93ID8gJ2lubGluZS1ibG9jaycgOiAnbm9uZScgfTtcblx0XHRvcGFjaXR5OiAkeyBzaG93ID8gMSA6IDAgfTtcblxuXHRcdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFx0dHJhbnNpdGlvbjpcblx0XHRcdFx0b3BhY2l0eSAxMjBtcyBlYXNlLFxuXHRcdFx0XHRkaXNwbGF5IDEyMG1zIGVhc2UgYWxsb3ctZGlzY3JldGU7XG5cdFx0fVxuXG5cdFx0QHN0YXJ0aW5nLXN0eWxlIHtcblx0XHRcdG9wYWNpdHk6IDA7XG5cdFx0fVxuXHRgO1xufTtcblxuY29uc3QgdG9vbHRpcFBsYWNlbWVudCA9ICggeyBwbGFjZW1lbnQgfTogVG9vbHRpcFByb3BzICkgPT4ge1xuXHRjb25zdCBpc0JvdHRvbSA9IHBsYWNlbWVudCA9PT0gJ2JvdHRvbSc7XG5cblx0aWYgKCBpc0JvdHRvbSApIHtcblx0XHRyZXR1cm4gY3NzYFxuXHRcdFx0Ym90dG9tOiAtODAlO1xuXHRcdGA7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdHRvcDogLTgwJTtcblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUb29sdGlwID0gc3R5bGVkLnNwYW48IFRvb2x0aXBQcm9wcyA+YFxuXHRiYWNrZ3JvdW5kOiByZ2JhKCAwLCAwLCAwLCAwLjggKTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGNvbG9yOiB3aGl0ZTtcblx0Zm9udC1zaXplOiAxMnB4O1xuXHRtaW4td2lkdGg6IDMycHg7XG5cdHBhZGRpbmc6IDRweCA4cHg7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRleHQtYWxpZ246IGNlbnRlcjtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cblx0JHsgdG9vbHRpcFNob3cgfTtcblxuXHQkeyB0b29sdGlwUGxhY2VtZW50IH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoLTUwJSknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKDUwJSknIH1cblx0KSB9XG5gO1xuXG4vLyBAdG9kbyBSZWZhY3RvciBSYW5nZUNvbnRyb2wgd2l0aCBsYXRlc3QgSFN0YWNrIGNvbmZpZ3VyYXRpb25cbi8vIEBzZWU6IHBhY2thZ2VzL2NvbXBvbmVudHMvc3JjL2gtc3RhY2tcbmV4cG9ydCBjb25zdCBJbnB1dE51bWJlciA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHRkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG5cdGZvbnQtc2l6ZTogMTNweDtcblx0bWFyZ2luLXRvcDogMDtcblxuXHRpbnB1dFt0eXBlPSdudW1iZXInXSYge1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogYCR7IHNwYWNlKCA0ICkgfSAhaW1wb3J0YW50YCB9ICkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IEFjdGlvblJpZ2h0V3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0bWFyZ2luLXRvcDogMDtcblxuXHRidXR0b24sXG5cdGJ1dHRvbi5pcy1zbWFsbCB7XG5cdFx0bWFyZ2luLWxlZnQ6IDA7XG5cdFx0JHsgcmFuZ2VIZWlnaHQgfTtcblx0fVxuXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiA4IH0gKSB9XG5gO1xuIl19 */");
  };
  var ThumbWrapper = /* @__PURE__ */ createStyled("span", false ? {
    target: "e1epgpqk5"
  } : {
    target: "e1epgpqk5",
    label: "ThumbWrapper"
  })("align-items:center;display:flex;height:", thumbSize, "px;justify-content:center;margin-top:", (rangeHeightValue - thumbSize) / 2, "px;outline:0;pointer-events:none;position:absolute;top:0;user-select:none;width:", thumbSize, "px;border-radius:", config_values_default.radiusRound, ";z-index:3;.is-marked &{@media not ( prefers-reduced-motion ){transition:left ease 0.1s;}}", thumbColor, ";", rtl({
    marginLeft: -10
  }), ";", rtl({
    transform: "translateX( 4.5px )"
  }, {
    transform: "translateX( -4.5px )"
  }), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTZMdUMiLCJmaWxlIjoicmFuZ2UtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBOdW1iZXJDb250cm9sIGZyb20gJy4uLy4uL251bWJlci1jb250cm9sJztcbmltcG9ydCB7IENPTE9SUywgcnRsLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuaW1wb3J0IHR5cGUge1xuXHRSYW5nZU1hcmtQcm9wcyxcblx0UmFpbFByb3BzLFxuXHRUaHVtYlByb3BzLFxuXHRUb29sdGlwUHJvcHMsXG5cdFRyYWNrUHJvcHMsXG5cdFdyYXBwZXJQcm9wcyxcblx0UmFuZ2VDb250cm9sUHJvcHMsXG59IGZyb20gJy4uL3R5cGVzJztcblxuY29uc3QgcmFuZ2VIZWlnaHRWYWx1ZSA9IDMwO1xuY29uc3QgcmFpbEhlaWdodCA9IDQ7XG5jb25zdCByYW5nZUhlaWdodCA9ICgpID0+XG5cdGNzcyggeyBoZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUsIG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5jb25zdCB0aHVtYlNpemUgPSAxMjtcblxuY29uc3QgZGVwcmVjYXRlZEhlaWdodCA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBQaWNrPCBSYW5nZUNvbnRyb2xQcm9wcywgJ19fbmV4dDQwcHhEZWZhdWx0U2l6ZScgPiApID0+XG5cdCEgX19uZXh0NDBweERlZmF1bHRTaXplICYmIGNzcyggeyBtaW5IZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUgfSApO1xuXG50eXBlIFJvb3RQcm9wcyA9IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+O1xuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQuZGl2PCBSb290UHJvcHMgPmBcblx0LXdlYmtpdC10YXAtaGlnaGxpZ2h0LWNvbG9yOiB0cmFuc3BhcmVudDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0anVzdGlmeS1jb250ZW50OiBmbGV4LXN0YXJ0O1xuXHRwYWRkaW5nOiAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHRvdWNoLWFjdGlvbjogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdC8qIFRPRE86IHJlbW92ZSBhZnRlciByZW1vdmluZyB0aGUgX19uZXh0NDBweERlZmF1bHRTaXplIHByb3AgKi9cblx0JHsgZGVwcmVjYXRlZEhlaWdodCB9O1xuYDtcblxuY29uc3Qgd3JhcHBlckNvbG9yID0gKCB7IGNvbG9yID0gQ09MT1JTLnVpLmJvcmRlckZvY3VzIH06IFdyYXBwZXJQcm9wcyApID0+XG5cdGNzcyggeyBjb2xvciB9ICk7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkKCAnZGl2Jywge1xuXHRzaG91bGRGb3J3YXJkUHJvcDogKCBwcm9wOiBzdHJpbmcgKSA9PlxuXHRcdCEgWyAnY29sb3InLCAnbWFya3MnIF0uaW5jbHVkZXMoIHByb3AgKSxcbn0gKTwgV3JhcHBlclByb3BzID5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRmbGV4OiAxO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHdpZHRoOiAxMDAlO1xuXG5cdCR7IHdyYXBwZXJDb2xvciB9O1xuXHQkeyByYW5nZUhlaWdodCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEJlZm9yZUljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luUmlnaHQ6IDYgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBZnRlckljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogNiB9ICkgfVxuYDtcblxuY29uc3QgcmFpbEJhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgcmFpbENvbG9yIH06IFJhaWxQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0XHQ6IHJhaWxDb2xvciB8fCBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0gfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6IEdyYXlUZXh0O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBSYWlsID0gc3R5bGVkLnNwYW5gXG5cdGxlZnQ6IDA7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRyaWdodDogMDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdGhlaWdodDogJHsgcmFpbEhlaWdodCB9cHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblxuXHQkeyByYWlsQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5jb25zdCB0cmFja0JhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgdHJhY2tDb2xvciB9OiBUcmFja1Byb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy50aGVtZS5ncmF5WyA0MDAgXVxuXHRcdFx0OiB0cmFja0NvbG9yIHx8ICdjdXJyZW50Q29sb3InIH07XG5cblx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZCA/ICdHcmF5VGV4dCcgOiAnQ2FudmFzVGV4dCcgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVHJhY2sgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdG1hcmdpbi10b3A6ICR7ICggcmFuZ2VIZWlnaHRWYWx1ZSAtIHJhaWxIZWlnaHQgKSAvIDIgfXB4O1xuXHR0b3A6IDA7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IHdpZHRoIGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0cmFja0JhY2tncm91bmRDb2xvciB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmtzV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRtYXJnaW4tdG9wOiAxN3B4O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmsgPSBzdHlsZWQuc3BhbmBcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRsZWZ0OiAwO1xuXHR0b3A6IC00cHg7XG5cdGhlaWdodDogNHB4O1xuXHR3aWR0aDogMnB4O1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoIC01MCUgKTtcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0ei1pbmRleDogMTtcbmA7XG5cbmNvbnN0IG1hcmtMYWJlbEZpbGwgPSAoIHsgaXNGaWxsZWQgfTogUmFuZ2VNYXJrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogaXNGaWxsZWQgPyBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF0gOiBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0sXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBNYXJrTGFiZWwgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRmb250LXNpemU6IDExcHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiA4cHg7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cblx0JHsgcnRsKCB7IGxlZnQ6IDAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC01MCUgKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDUwJSApJyB9XG5cdCkgfTtcblxuXHQkeyBtYXJrTGFiZWxGaWxsIH07XG5gO1xuXG5jb25zdCB0aHVtYkNvbG9yID0gKCB7IGRpc2FibGVkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgfXB4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gdGh1bWJTaXplICkgLyAyIH1weDtcblx0b3V0bGluZTogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHR6LWluZGV4OiAzO1xuXG5cdC5pcy1tYXJrZWQgJiB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHR0cmFuc2l0aW9uOiBsZWZ0IGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiAtMTAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDQuNXB4ICknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKCAtNC41cHggKScgfVxuXHQpIH07XG5gO1xuXG5jb25zdCB0aHVtYkZvY3VzID0gKCB7IGlzRm9jdXNlZCB9OiBUaHVtYlByb3BzICkgPT4ge1xuXHRyZXR1cm4gaXNGb2N1c2VkXG5cdFx0PyBjc3NgXG5cdFx0XHRcdCY6OmJlZm9yZSB7XG5cdFx0XHRcdFx0Y29udGVudDogJyAnO1xuXHRcdFx0XHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRcdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHRcdFx0b3BhY2l0eTogMC40O1xuXHRcdFx0XHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRcdFx0XHRcdGhlaWdodDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0d2lkdGg6ICR7IHRodW1iU2l6ZSArIDggfXB4O1xuXHRcdFx0XHRcdHRvcDogLTRweDtcblx0XHRcdFx0XHRsZWZ0OiAtNHB4O1xuXG5cdFx0XHRcdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0XHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0XHRcdFx0fVxuXHRcdFx0XHR9XG5cdFx0ICBgXG5cdFx0OiAnJztcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYiA9IHN0eWxlZC5zcGFuPCBUaHVtYlByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRoZWlnaHQ6IDEwMCU7XG5cdG91dGxpbmU6IDA7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdHdpZHRoOiAxMDAlO1xuXHRib3gtc2hhZG93OiAkeyBDT05GSUcuZWxldmF0aW9uWFNtYWxsIH07XG5cblx0JHsgdGh1bWJDb2xvciB9O1xuXHQkeyB0aHVtYkZvY3VzIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRSYW5nZSA9IHN0eWxlZC5pbnB1dGBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAxMDAlO1xuXHRsZWZ0OiAwO1xuXHRtYXJnaW46IDAgLSR7IHRodW1iU2l6ZSAvIDIgfXB4O1xuXHRvcGFjaXR5OiAwO1xuXHRvdXRsaW5lOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHJpZ2h0OiAwO1xuXHR0b3A6IDA7XG5cdHdpZHRoOiBjYWxjKCAxMDAlICsgJHsgdGh1bWJTaXplIH1weCApO1xuYDtcblxuY29uc3QgdG9vbHRpcFNob3cgPSAoIHsgc2hvdyB9OiBUb29sdGlwUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0ZGlzcGxheTogJHsgc2hvdyA/ICdpbmxpbmUtYmxvY2snIDogJ25vbmUnIH07XG5cdFx0b3BhY2l0eTogJHsgc2hvdyA/IDEgOiAwIH07XG5cblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246XG5cdFx0XHRcdG9wYWNpdHkgMTIwbXMgZWFzZSxcblx0XHRcdFx0ZGlzcGxheSAxMjBtcyBlYXNlIGFsbG93LWRpc2NyZXRlO1xuXHRcdH1cblxuXHRcdEBzdGFydGluZy1zdHlsZSB7XG5cdFx0XHRvcGFjaXR5OiAwO1xuXHRcdH1cblx0YDtcbn07XG5cbmNvbnN0IHRvb2x0aXBQbGFjZW1lbnQgPSAoIHsgcGxhY2VtZW50IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0Y29uc3QgaXNCb3R0b20gPSBwbGFjZW1lbnQgPT09ICdib3R0b20nO1xuXG5cdGlmICggaXNCb3R0b20gKSB7XG5cdFx0cmV0dXJuIGNzc2Bcblx0XHRcdGJvdHRvbTogLTgwJTtcblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHR0b3A6IC04MCU7XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHRpcCA9IHN0eWxlZC5zcGFuPCBUb29sdGlwUHJvcHMgPmBcblx0YmFja2dyb3VuZDogcmdiYSggMCwgMCwgMCwgMC44ICk7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRjb2xvcjogd2hpdGU7XG5cdGZvbnQtc2l6ZTogMTJweDtcblx0bWluLXdpZHRoOiAzMnB4O1xuXHRwYWRkaW5nOiA0cHggOHB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRsaW5lLWhlaWdodDogMS40O1xuXG5cdCR7IHRvb2x0aXBTaG93IH07XG5cblx0JHsgdG9vbHRpcFBsYWNlbWVudCB9O1xuXHQkeyBydGwoXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKC01MCUpJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCg1MCUpJyB9XG5cdCkgfVxuYDtcblxuLy8gQHRvZG8gUmVmYWN0b3IgUmFuZ2VDb250cm9sIHdpdGggbGF0ZXN0IEhTdGFjayBjb25maWd1cmF0aW9uXG4vLyBAc2VlOiBwYWNrYWdlcy9jb21wb25lbnRzL3NyYy9oLXN0YWNrXG5leHBvcnQgY29uc3QgSW5wdXROdW1iZXIgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0ZGlzcGxheTogaW5saW5lLWJsb2NrO1xuXHRmb250LXNpemU6IDEzcHg7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0aW5wdXRbdHlwZT0nbnVtYmVyJ10mIHtcblx0XHQkeyByYW5nZUhlaWdodCB9O1xuXHR9XG5cblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IGAkeyBzcGFjZSggNCApIH0gIWltcG9ydGFudGAgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBY3Rpb25SaWdodFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0YnV0dG9uLFxuXHRidXR0b24uaXMtc21hbGwge1xuXHRcdG1hcmdpbi1sZWZ0OiAwO1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogOCB9ICkgfVxuYDtcbiJdfQ== */"));
  var thumbFocus = ({
    isFocused
  }) => {
    return isFocused ? /* @__PURE__ */ css("&::before{content:' ';position:absolute;background-color:", COLORS.theme.accent, ";opacity:0.4;border-radius:", config_values_default.radiusRound, ";height:", thumbSize + 8, "px;width:", thumbSize + 8, "px;top:-4px;left:-4px;@media ( forced-colors: active ){background:GrayText;}}" + (false ? "" : ";label:thumbFocus;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTROTyIsImZpbGUiOiJyYW5nZS1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IE51bWJlckNvbnRyb2wgZnJvbSAnLi4vLi4vbnVtYmVyLWNvbnRyb2wnO1xuaW1wb3J0IHsgQ09MT1JTLCBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5pbXBvcnQgdHlwZSB7XG5cdFJhbmdlTWFya1Byb3BzLFxuXHRSYWlsUHJvcHMsXG5cdFRodW1iUHJvcHMsXG5cdFRvb2x0aXBQcm9wcyxcblx0VHJhY2tQcm9wcyxcblx0V3JhcHBlclByb3BzLFxuXHRSYW5nZUNvbnRyb2xQcm9wcyxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuXG5jb25zdCByYW5nZUhlaWdodFZhbHVlID0gMzA7XG5jb25zdCByYWlsSGVpZ2h0ID0gNDtcbmNvbnN0IHJhbmdlSGVpZ2h0ID0gKCkgPT5cblx0Y3NzKCB7IGhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSwgbWluSGVpZ2h0OiByYW5nZUhlaWdodFZhbHVlIH0gKTtcbmNvbnN0IHRodW1iU2l6ZSA9IDEyO1xuXG5jb25zdCBkZXByZWNhdGVkSGVpZ2h0ID0gKCB7XG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcbn06IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+ICkgPT5cblx0ISBfX25leHQ0MHB4RGVmYXVsdFNpemUgJiYgY3NzKCB7IG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5cbnR5cGUgUm9vdFByb3BzID0gUGljazwgUmFuZ2VDb250cm9sUHJvcHMsICdfX25leHQ0MHB4RGVmYXVsdFNpemUnID47XG5leHBvcnQgY29uc3QgUm9vdCA9IHN0eWxlZC5kaXY8IFJvb3RQcm9wcyA+YFxuXHQtd2Via2l0LXRhcC1oaWdobGlnaHQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7XG5cdHBhZGRpbmc6IDA7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0dG91Y2gtYWN0aW9uOiBub25lO1xuXHR3aWR0aDogMTAwJTtcblx0bWluLWhlaWdodDogNDBweDtcblx0LyogVE9ETzogcmVtb3ZlIGFmdGVyIHJlbW92aW5nIHRoZSBfX25leHQ0MHB4RGVmYXVsdFNpemUgcHJvcCAqL1xuXHQkeyBkZXByZWNhdGVkSGVpZ2h0IH07XG5gO1xuXG5jb25zdCB3cmFwcGVyQ29sb3IgPSAoIHsgY29sb3IgPSBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTogV3JhcHBlclByb3BzICkgPT5cblx0Y3NzKCB7IGNvbG9yIH0gKTtcblxuZXhwb3J0IGNvbnN0IFdyYXBwZXIgPSBzdHlsZWQoICdkaXYnLCB7XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3A6IHN0cmluZyApID0+XG5cdFx0ISBbICdjb2xvcicsICdtYXJrcycgXS5pbmNsdWRlcyggcHJvcCApLFxufSApPCBXcmFwcGVyUHJvcHMgPmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdGZsZXg6IDE7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cblx0JHsgd3JhcHBlckNvbG9yIH07XG5cdCR7IHJhbmdlSGVpZ2h0IH07XG5gO1xuXG5leHBvcnQgY29uc3QgQmVmb3JlSWNvbldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogZmxleDsgLy8gZW5zdXJlcyB0aGUgaGVpZ2h0IGlzbid0IGFmZmVjdGVkIGJ5IGxpbmUtaGVpZ2h0XG5cdG1hcmdpbi10b3A6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXG5cdCR7IHJ0bCggeyBtYXJnaW5SaWdodDogNiB9ICkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IEFmdGVySWNvbldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogZmxleDsgLy8gZW5zdXJlcyB0aGUgaGVpZ2h0IGlzbid0IGFmZmVjdGVkIGJ5IGxpbmUtaGVpZ2h0XG5cdG1hcmdpbi10b3A6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiA2IH0gKSB9XG5gO1xuXG5jb25zdCByYWlsQmFja2dyb3VuZENvbG9yID0gKCB7IGRpc2FibGVkLCByYWlsQ29sb3IgfTogUmFpbFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy51aS5iYWNrZ3JvdW5kRGlzYWJsZWRcblx0XHRcdDogcmFpbENvbG9yIHx8IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXG5cdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFJhaWwgPSBzdHlsZWQuc3BhbmBcblx0bGVmdDogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHJpZ2h0OiAwO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRtYXJnaW4tdG9wOiAkeyAoIHJhbmdlSGVpZ2h0VmFsdWUgLSByYWlsSGVpZ2h0ICkgLyAyIH1weDtcblx0dG9wOiAwO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXG5cdCR7IHJhaWxCYWNrZ3JvdW5kQ29sb3IgfTtcbmA7XG5cbmNvbnN0IHRyYWNrQmFja2dyb3VuZENvbG9yID0gKCB7IGRpc2FibGVkLCB0cmFja0NvbG9yIH06IFRyYWNrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IHRyYWNrQ29sb3IgfHwgJ2N1cnJlbnRDb2xvcicgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUcmFjayA9IHN0eWxlZC5zcGFuYFxuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXHRoZWlnaHQ6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0ZGlzcGxheTogYmxvY2s7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblxuXHQuaXMtbWFya2VkICYge1xuXHRcdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFx0dHJhbnNpdGlvbjogd2lkdGggZWFzZSAwLjFzO1xuXHRcdH1cblx0fVxuXG5cdCR7IHRyYWNrQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5leHBvcnQgY29uc3QgTWFya3NXcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHR3aWR0aDogMTAwJTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdG1hcmdpbi10b3A6IDE3cHg7XG5gO1xuXG5leHBvcnQgY29uc3QgTWFyayA9IHN0eWxlZC5zcGFuYFxuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdGxlZnQ6IDA7XG5cdHRvcDogLTRweDtcblx0aGVpZ2h0OiA0cHg7XG5cdHdpZHRoOiAycHg7XG5cdHRyYW5zZm9ybTogdHJhbnNsYXRlWCggLTUwJSApO1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZCB9O1xuXHR6LWluZGV4OiAxO1xuYDtcblxuY29uc3QgbWFya0xhYmVsRmlsbCA9ICggeyBpc0ZpbGxlZCB9OiBSYW5nZU1hcmtQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzcygge1xuXHRcdGNvbG9yOiBpc0ZpbGxlZCA/IENPTE9SUy50aGVtZS5ncmF5WyA3MDAgXSA6IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSxcblx0fSApO1xufTtcblxuZXhwb3J0IGNvbnN0IE1hcmtMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmdyYXlbIDMwMCBdIH07XG5cdGZvbnQtc2l6ZTogMTFweDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDhweDtcblx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcblxuXHQkeyBydGwoIHsgbGVmdDogMCB9ICkgfTtcblx0JHsgcnRsKFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggLTUwJSApJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggNTAlICknIH1cblx0KSB9O1xuXG5cdCR7IG1hcmtMYWJlbEZpbGwgfTtcbmA7XG5cbmNvbnN0IHRodW1iQ29sb3IgPSAoIHsgZGlzYWJsZWQgfTogVGh1bWJQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudGhlbWUuZ3JheVsgNDAwIF1cblx0XHRcdDogQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXG5cdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWQgPyAnR3JheVRleHQnIDogJ0NhbnZhc1RleHQnIH07XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFRodW1iV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRoZWlnaHQ6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRtYXJnaW4tdG9wOiAkeyAoIHJhbmdlSGVpZ2h0VmFsdWUgLSB0aHVtYlNpemUgKSAvIDIgfXB4O1xuXHRvdXRsaW5lOiAwO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHR3aWR0aDogJHsgdGh1bWJTaXplIH1weDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdHotaW5kZXg6IDM7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IGxlZnQgZWFzZSAwLjFzO1xuXHRcdH1cblx0fVxuXG5cdCR7IHRodW1iQ29sb3IgfTtcblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IC0xMCB9ICkgfTtcblx0JHsgcnRsKFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggNC41cHggKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC00LjVweCApJyB9XG5cdCkgfTtcbmA7XG5cbmNvbnN0IHRodW1iRm9jdXMgPSAoIHsgaXNGb2N1c2VkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBpc0ZvY3VzZWRcblx0XHQ/IGNzc2Bcblx0XHRcdFx0Jjo6YmVmb3JlIHtcblx0XHRcdFx0XHRjb250ZW50OiAnICc7XG5cdFx0XHRcdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdFx0XHRcdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHRcdFx0XHRvcGFjaXR5OiAwLjQ7XG5cdFx0XHRcdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdFx0XHRcdFx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgKyA4IH1weDtcblx0XHRcdFx0XHR3aWR0aDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0dG9wOiAtNHB4O1xuXHRcdFx0XHRcdGxlZnQ6IC00cHg7XG5cblx0XHRcdFx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRcdFx0XHRiYWNrZ3JvdW5kOiBHcmF5VGV4dDtcblx0XHRcdFx0XHR9XG5cdFx0XHRcdH1cblx0XHQgIGBcblx0XHQ6ICcnO1xufTtcblxuZXhwb3J0IGNvbnN0IFRodW1iID0gc3R5bGVkLnNwYW48IFRodW1iUHJvcHMgPmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdGhlaWdodDogMTAwJTtcblx0b3V0bGluZTogMDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdGJveC1zaGFkb3c6ICR7IENPTkZJRy5lbGV2YXRpb25YU21hbGwgfTtcblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHRodW1iRm9jdXMgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJbnB1dFJhbmdlID0gc3R5bGVkLmlucHV0YFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRjdXJzb3I6IHBvaW50ZXI7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRoZWlnaHQ6IDEwMCU7XG5cdGxlZnQ6IDA7XG5cdG1hcmdpbjogMCAtJHsgdGh1bWJTaXplIC8gMiB9cHg7XG5cdG9wYWNpdHk6IDA7XG5cdG91dGxpbmU6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0cmlnaHQ6IDA7XG5cdHRvcDogMDtcblx0d2lkdGg6IGNhbGMoIDEwMCUgKyAkeyB0aHVtYlNpemUgfXB4ICk7XG5gO1xuXG5jb25zdCB0b29sdGlwU2hvdyA9ICggeyBzaG93IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRkaXNwbGF5OiAkeyBzaG93ID8gJ2lubGluZS1ibG9jaycgOiAnbm9uZScgfTtcblx0XHRvcGFjaXR5OiAkeyBzaG93ID8gMSA6IDAgfTtcblxuXHRcdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFx0dHJhbnNpdGlvbjpcblx0XHRcdFx0b3BhY2l0eSAxMjBtcyBlYXNlLFxuXHRcdFx0XHRkaXNwbGF5IDEyMG1zIGVhc2UgYWxsb3ctZGlzY3JldGU7XG5cdFx0fVxuXG5cdFx0QHN0YXJ0aW5nLXN0eWxlIHtcblx0XHRcdG9wYWNpdHk6IDA7XG5cdFx0fVxuXHRgO1xufTtcblxuY29uc3QgdG9vbHRpcFBsYWNlbWVudCA9ICggeyBwbGFjZW1lbnQgfTogVG9vbHRpcFByb3BzICkgPT4ge1xuXHRjb25zdCBpc0JvdHRvbSA9IHBsYWNlbWVudCA9PT0gJ2JvdHRvbSc7XG5cblx0aWYgKCBpc0JvdHRvbSApIHtcblx0XHRyZXR1cm4gY3NzYFxuXHRcdFx0Ym90dG9tOiAtODAlO1xuXHRcdGA7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdHRvcDogLTgwJTtcblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUb29sdGlwID0gc3R5bGVkLnNwYW48IFRvb2x0aXBQcm9wcyA+YFxuXHRiYWNrZ3JvdW5kOiByZ2JhKCAwLCAwLCAwLCAwLjggKTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGNvbG9yOiB3aGl0ZTtcblx0Zm9udC1zaXplOiAxMnB4O1xuXHRtaW4td2lkdGg6IDMycHg7XG5cdHBhZGRpbmc6IDRweCA4cHg7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRleHQtYWxpZ246IGNlbnRlcjtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cblx0JHsgdG9vbHRpcFNob3cgfTtcblxuXHQkeyB0b29sdGlwUGxhY2VtZW50IH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoLTUwJSknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKDUwJSknIH1cblx0KSB9XG5gO1xuXG4vLyBAdG9kbyBSZWZhY3RvciBSYW5nZUNvbnRyb2wgd2l0aCBsYXRlc3QgSFN0YWNrIGNvbmZpZ3VyYXRpb25cbi8vIEBzZWU6IHBhY2thZ2VzL2NvbXBvbmVudHMvc3JjL2gtc3RhY2tcbmV4cG9ydCBjb25zdCBJbnB1dE51bWJlciA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHRkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG5cdGZvbnQtc2l6ZTogMTNweDtcblx0bWFyZ2luLXRvcDogMDtcblxuXHRpbnB1dFt0eXBlPSdudW1iZXInXSYge1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogYCR7IHNwYWNlKCA0ICkgfSAhaW1wb3J0YW50YCB9ICkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IEFjdGlvblJpZ2h0V3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0bWFyZ2luLXRvcDogMDtcblxuXHRidXR0b24sXG5cdGJ1dHRvbi5pcy1zbWFsbCB7XG5cdFx0bWFyZ2luLWxlZnQ6IDA7XG5cdFx0JHsgcmFuZ2VIZWlnaHQgfTtcblx0fVxuXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiA4IH0gKSB9XG5gO1xuIl19 */") : "";
  };
  var Thumb = /* @__PURE__ */ createStyled("span", false ? {
    target: "e1epgpqk4"
  } : {
    target: "e1epgpqk4",
    label: "Thumb"
  })("align-items:center;border-radius:", config_values_default.radiusRound, ";height:100%;outline:0;position:absolute;user-select:none;width:100%;box-shadow:", config_values_default.elevationXSmall, ";", thumbColor, ";", thumbFocus, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWdQOEMiLCJmaWxlIjoicmFuZ2UtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBOdW1iZXJDb250cm9sIGZyb20gJy4uLy4uL251bWJlci1jb250cm9sJztcbmltcG9ydCB7IENPTE9SUywgcnRsLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuaW1wb3J0IHR5cGUge1xuXHRSYW5nZU1hcmtQcm9wcyxcblx0UmFpbFByb3BzLFxuXHRUaHVtYlByb3BzLFxuXHRUb29sdGlwUHJvcHMsXG5cdFRyYWNrUHJvcHMsXG5cdFdyYXBwZXJQcm9wcyxcblx0UmFuZ2VDb250cm9sUHJvcHMsXG59IGZyb20gJy4uL3R5cGVzJztcblxuY29uc3QgcmFuZ2VIZWlnaHRWYWx1ZSA9IDMwO1xuY29uc3QgcmFpbEhlaWdodCA9IDQ7XG5jb25zdCByYW5nZUhlaWdodCA9ICgpID0+XG5cdGNzcyggeyBoZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUsIG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5jb25zdCB0aHVtYlNpemUgPSAxMjtcblxuY29uc3QgZGVwcmVjYXRlZEhlaWdodCA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBQaWNrPCBSYW5nZUNvbnRyb2xQcm9wcywgJ19fbmV4dDQwcHhEZWZhdWx0U2l6ZScgPiApID0+XG5cdCEgX19uZXh0NDBweERlZmF1bHRTaXplICYmIGNzcyggeyBtaW5IZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUgfSApO1xuXG50eXBlIFJvb3RQcm9wcyA9IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+O1xuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQuZGl2PCBSb290UHJvcHMgPmBcblx0LXdlYmtpdC10YXAtaGlnaGxpZ2h0LWNvbG9yOiB0cmFuc3BhcmVudDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0anVzdGlmeS1jb250ZW50OiBmbGV4LXN0YXJ0O1xuXHRwYWRkaW5nOiAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHRvdWNoLWFjdGlvbjogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdC8qIFRPRE86IHJlbW92ZSBhZnRlciByZW1vdmluZyB0aGUgX19uZXh0NDBweERlZmF1bHRTaXplIHByb3AgKi9cblx0JHsgZGVwcmVjYXRlZEhlaWdodCB9O1xuYDtcblxuY29uc3Qgd3JhcHBlckNvbG9yID0gKCB7IGNvbG9yID0gQ09MT1JTLnVpLmJvcmRlckZvY3VzIH06IFdyYXBwZXJQcm9wcyApID0+XG5cdGNzcyggeyBjb2xvciB9ICk7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkKCAnZGl2Jywge1xuXHRzaG91bGRGb3J3YXJkUHJvcDogKCBwcm9wOiBzdHJpbmcgKSA9PlxuXHRcdCEgWyAnY29sb3InLCAnbWFya3MnIF0uaW5jbHVkZXMoIHByb3AgKSxcbn0gKTwgV3JhcHBlclByb3BzID5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRmbGV4OiAxO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHdpZHRoOiAxMDAlO1xuXG5cdCR7IHdyYXBwZXJDb2xvciB9O1xuXHQkeyByYW5nZUhlaWdodCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEJlZm9yZUljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luUmlnaHQ6IDYgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBZnRlckljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogNiB9ICkgfVxuYDtcblxuY29uc3QgcmFpbEJhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgcmFpbENvbG9yIH06IFJhaWxQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0XHQ6IHJhaWxDb2xvciB8fCBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0gfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6IEdyYXlUZXh0O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBSYWlsID0gc3R5bGVkLnNwYW5gXG5cdGxlZnQ6IDA7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRyaWdodDogMDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdGhlaWdodDogJHsgcmFpbEhlaWdodCB9cHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblxuXHQkeyByYWlsQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5jb25zdCB0cmFja0JhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgdHJhY2tDb2xvciB9OiBUcmFja1Byb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy50aGVtZS5ncmF5WyA0MDAgXVxuXHRcdFx0OiB0cmFja0NvbG9yIHx8ICdjdXJyZW50Q29sb3InIH07XG5cblx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZCA/ICdHcmF5VGV4dCcgOiAnQ2FudmFzVGV4dCcgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVHJhY2sgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdG1hcmdpbi10b3A6ICR7ICggcmFuZ2VIZWlnaHRWYWx1ZSAtIHJhaWxIZWlnaHQgKSAvIDIgfXB4O1xuXHR0b3A6IDA7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IHdpZHRoIGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0cmFja0JhY2tncm91bmRDb2xvciB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmtzV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRtYXJnaW4tdG9wOiAxN3B4O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmsgPSBzdHlsZWQuc3BhbmBcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRsZWZ0OiAwO1xuXHR0b3A6IC00cHg7XG5cdGhlaWdodDogNHB4O1xuXHR3aWR0aDogMnB4O1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoIC01MCUgKTtcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0ei1pbmRleDogMTtcbmA7XG5cbmNvbnN0IG1hcmtMYWJlbEZpbGwgPSAoIHsgaXNGaWxsZWQgfTogUmFuZ2VNYXJrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogaXNGaWxsZWQgPyBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF0gOiBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0sXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBNYXJrTGFiZWwgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRmb250LXNpemU6IDExcHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiA4cHg7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cblx0JHsgcnRsKCB7IGxlZnQ6IDAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC01MCUgKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDUwJSApJyB9XG5cdCkgfTtcblxuXHQkeyBtYXJrTGFiZWxGaWxsIH07XG5gO1xuXG5jb25zdCB0aHVtYkNvbG9yID0gKCB7IGRpc2FibGVkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgfXB4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gdGh1bWJTaXplICkgLyAyIH1weDtcblx0b3V0bGluZTogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHR6LWluZGV4OiAzO1xuXG5cdC5pcy1tYXJrZWQgJiB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHR0cmFuc2l0aW9uOiBsZWZ0IGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiAtMTAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDQuNXB4ICknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKCAtNC41cHggKScgfVxuXHQpIH07XG5gO1xuXG5jb25zdCB0aHVtYkZvY3VzID0gKCB7IGlzRm9jdXNlZCB9OiBUaHVtYlByb3BzICkgPT4ge1xuXHRyZXR1cm4gaXNGb2N1c2VkXG5cdFx0PyBjc3NgXG5cdFx0XHRcdCY6OmJlZm9yZSB7XG5cdFx0XHRcdFx0Y29udGVudDogJyAnO1xuXHRcdFx0XHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRcdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHRcdFx0b3BhY2l0eTogMC40O1xuXHRcdFx0XHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRcdFx0XHRcdGhlaWdodDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0d2lkdGg6ICR7IHRodW1iU2l6ZSArIDggfXB4O1xuXHRcdFx0XHRcdHRvcDogLTRweDtcblx0XHRcdFx0XHRsZWZ0OiAtNHB4O1xuXG5cdFx0XHRcdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0XHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0XHRcdFx0fVxuXHRcdFx0XHR9XG5cdFx0ICBgXG5cdFx0OiAnJztcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYiA9IHN0eWxlZC5zcGFuPCBUaHVtYlByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRoZWlnaHQ6IDEwMCU7XG5cdG91dGxpbmU6IDA7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdHdpZHRoOiAxMDAlO1xuXHRib3gtc2hhZG93OiAkeyBDT05GSUcuZWxldmF0aW9uWFNtYWxsIH07XG5cblx0JHsgdGh1bWJDb2xvciB9O1xuXHQkeyB0aHVtYkZvY3VzIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRSYW5nZSA9IHN0eWxlZC5pbnB1dGBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAxMDAlO1xuXHRsZWZ0OiAwO1xuXHRtYXJnaW46IDAgLSR7IHRodW1iU2l6ZSAvIDIgfXB4O1xuXHRvcGFjaXR5OiAwO1xuXHRvdXRsaW5lOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHJpZ2h0OiAwO1xuXHR0b3A6IDA7XG5cdHdpZHRoOiBjYWxjKCAxMDAlICsgJHsgdGh1bWJTaXplIH1weCApO1xuYDtcblxuY29uc3QgdG9vbHRpcFNob3cgPSAoIHsgc2hvdyB9OiBUb29sdGlwUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0ZGlzcGxheTogJHsgc2hvdyA/ICdpbmxpbmUtYmxvY2snIDogJ25vbmUnIH07XG5cdFx0b3BhY2l0eTogJHsgc2hvdyA/IDEgOiAwIH07XG5cblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246XG5cdFx0XHRcdG9wYWNpdHkgMTIwbXMgZWFzZSxcblx0XHRcdFx0ZGlzcGxheSAxMjBtcyBlYXNlIGFsbG93LWRpc2NyZXRlO1xuXHRcdH1cblxuXHRcdEBzdGFydGluZy1zdHlsZSB7XG5cdFx0XHRvcGFjaXR5OiAwO1xuXHRcdH1cblx0YDtcbn07XG5cbmNvbnN0IHRvb2x0aXBQbGFjZW1lbnQgPSAoIHsgcGxhY2VtZW50IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0Y29uc3QgaXNCb3R0b20gPSBwbGFjZW1lbnQgPT09ICdib3R0b20nO1xuXG5cdGlmICggaXNCb3R0b20gKSB7XG5cdFx0cmV0dXJuIGNzc2Bcblx0XHRcdGJvdHRvbTogLTgwJTtcblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHR0b3A6IC04MCU7XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHRpcCA9IHN0eWxlZC5zcGFuPCBUb29sdGlwUHJvcHMgPmBcblx0YmFja2dyb3VuZDogcmdiYSggMCwgMCwgMCwgMC44ICk7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRjb2xvcjogd2hpdGU7XG5cdGZvbnQtc2l6ZTogMTJweDtcblx0bWluLXdpZHRoOiAzMnB4O1xuXHRwYWRkaW5nOiA0cHggOHB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRsaW5lLWhlaWdodDogMS40O1xuXG5cdCR7IHRvb2x0aXBTaG93IH07XG5cblx0JHsgdG9vbHRpcFBsYWNlbWVudCB9O1xuXHQkeyBydGwoXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKC01MCUpJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCg1MCUpJyB9XG5cdCkgfVxuYDtcblxuLy8gQHRvZG8gUmVmYWN0b3IgUmFuZ2VDb250cm9sIHdpdGggbGF0ZXN0IEhTdGFjayBjb25maWd1cmF0aW9uXG4vLyBAc2VlOiBwYWNrYWdlcy9jb21wb25lbnRzL3NyYy9oLXN0YWNrXG5leHBvcnQgY29uc3QgSW5wdXROdW1iZXIgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0ZGlzcGxheTogaW5saW5lLWJsb2NrO1xuXHRmb250LXNpemU6IDEzcHg7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0aW5wdXRbdHlwZT0nbnVtYmVyJ10mIHtcblx0XHQkeyByYW5nZUhlaWdodCB9O1xuXHR9XG5cblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IGAkeyBzcGFjZSggNCApIH0gIWltcG9ydGFudGAgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBY3Rpb25SaWdodFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0YnV0dG9uLFxuXHRidXR0b24uaXMtc21hbGwge1xuXHRcdG1hcmdpbi1sZWZ0OiAwO1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogOCB9ICkgfVxuYDtcbiJdfQ== */"));
  var InputRange = /* @__PURE__ */ createStyled("input", false ? {
    target: "e1epgpqk3"
  } : {
    target: "e1epgpqk3",
    label: "InputRange"
  })("box-sizing:border-box;cursor:pointer;display:block;height:100%;left:0;margin:0 -", thumbSize / 2, "px;opacity:0;outline:none;position:absolute;right:0;top:0;width:calc( 100% + ", thumbSize, "px );" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQThQc0MiLCJmaWxlIjoicmFuZ2UtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBOdW1iZXJDb250cm9sIGZyb20gJy4uLy4uL251bWJlci1jb250cm9sJztcbmltcG9ydCB7IENPTE9SUywgcnRsLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuaW1wb3J0IHR5cGUge1xuXHRSYW5nZU1hcmtQcm9wcyxcblx0UmFpbFByb3BzLFxuXHRUaHVtYlByb3BzLFxuXHRUb29sdGlwUHJvcHMsXG5cdFRyYWNrUHJvcHMsXG5cdFdyYXBwZXJQcm9wcyxcblx0UmFuZ2VDb250cm9sUHJvcHMsXG59IGZyb20gJy4uL3R5cGVzJztcblxuY29uc3QgcmFuZ2VIZWlnaHRWYWx1ZSA9IDMwO1xuY29uc3QgcmFpbEhlaWdodCA9IDQ7XG5jb25zdCByYW5nZUhlaWdodCA9ICgpID0+XG5cdGNzcyggeyBoZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUsIG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5jb25zdCB0aHVtYlNpemUgPSAxMjtcblxuY29uc3QgZGVwcmVjYXRlZEhlaWdodCA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBQaWNrPCBSYW5nZUNvbnRyb2xQcm9wcywgJ19fbmV4dDQwcHhEZWZhdWx0U2l6ZScgPiApID0+XG5cdCEgX19uZXh0NDBweERlZmF1bHRTaXplICYmIGNzcyggeyBtaW5IZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUgfSApO1xuXG50eXBlIFJvb3RQcm9wcyA9IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+O1xuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQuZGl2PCBSb290UHJvcHMgPmBcblx0LXdlYmtpdC10YXAtaGlnaGxpZ2h0LWNvbG9yOiB0cmFuc3BhcmVudDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0anVzdGlmeS1jb250ZW50OiBmbGV4LXN0YXJ0O1xuXHRwYWRkaW5nOiAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHRvdWNoLWFjdGlvbjogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdC8qIFRPRE86IHJlbW92ZSBhZnRlciByZW1vdmluZyB0aGUgX19uZXh0NDBweERlZmF1bHRTaXplIHByb3AgKi9cblx0JHsgZGVwcmVjYXRlZEhlaWdodCB9O1xuYDtcblxuY29uc3Qgd3JhcHBlckNvbG9yID0gKCB7IGNvbG9yID0gQ09MT1JTLnVpLmJvcmRlckZvY3VzIH06IFdyYXBwZXJQcm9wcyApID0+XG5cdGNzcyggeyBjb2xvciB9ICk7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkKCAnZGl2Jywge1xuXHRzaG91bGRGb3J3YXJkUHJvcDogKCBwcm9wOiBzdHJpbmcgKSA9PlxuXHRcdCEgWyAnY29sb3InLCAnbWFya3MnIF0uaW5jbHVkZXMoIHByb3AgKSxcbn0gKTwgV3JhcHBlclByb3BzID5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRmbGV4OiAxO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHdpZHRoOiAxMDAlO1xuXG5cdCR7IHdyYXBwZXJDb2xvciB9O1xuXHQkeyByYW5nZUhlaWdodCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEJlZm9yZUljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luUmlnaHQ6IDYgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBZnRlckljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogNiB9ICkgfVxuYDtcblxuY29uc3QgcmFpbEJhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgcmFpbENvbG9yIH06IFJhaWxQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0XHQ6IHJhaWxDb2xvciB8fCBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0gfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6IEdyYXlUZXh0O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBSYWlsID0gc3R5bGVkLnNwYW5gXG5cdGxlZnQ6IDA7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRyaWdodDogMDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdGhlaWdodDogJHsgcmFpbEhlaWdodCB9cHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblxuXHQkeyByYWlsQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5jb25zdCB0cmFja0JhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgdHJhY2tDb2xvciB9OiBUcmFja1Byb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy50aGVtZS5ncmF5WyA0MDAgXVxuXHRcdFx0OiB0cmFja0NvbG9yIHx8ICdjdXJyZW50Q29sb3InIH07XG5cblx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZCA/ICdHcmF5VGV4dCcgOiAnQ2FudmFzVGV4dCcgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVHJhY2sgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdG1hcmdpbi10b3A6ICR7ICggcmFuZ2VIZWlnaHRWYWx1ZSAtIHJhaWxIZWlnaHQgKSAvIDIgfXB4O1xuXHR0b3A6IDA7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IHdpZHRoIGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0cmFja0JhY2tncm91bmRDb2xvciB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmtzV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRtYXJnaW4tdG9wOiAxN3B4O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmsgPSBzdHlsZWQuc3BhbmBcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRsZWZ0OiAwO1xuXHR0b3A6IC00cHg7XG5cdGhlaWdodDogNHB4O1xuXHR3aWR0aDogMnB4O1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoIC01MCUgKTtcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0ei1pbmRleDogMTtcbmA7XG5cbmNvbnN0IG1hcmtMYWJlbEZpbGwgPSAoIHsgaXNGaWxsZWQgfTogUmFuZ2VNYXJrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogaXNGaWxsZWQgPyBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF0gOiBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0sXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBNYXJrTGFiZWwgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRmb250LXNpemU6IDExcHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiA4cHg7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cblx0JHsgcnRsKCB7IGxlZnQ6IDAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC01MCUgKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDUwJSApJyB9XG5cdCkgfTtcblxuXHQkeyBtYXJrTGFiZWxGaWxsIH07XG5gO1xuXG5jb25zdCB0aHVtYkNvbG9yID0gKCB7IGRpc2FibGVkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgfXB4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gdGh1bWJTaXplICkgLyAyIH1weDtcblx0b3V0bGluZTogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHR6LWluZGV4OiAzO1xuXG5cdC5pcy1tYXJrZWQgJiB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHR0cmFuc2l0aW9uOiBsZWZ0IGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiAtMTAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDQuNXB4ICknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKCAtNC41cHggKScgfVxuXHQpIH07XG5gO1xuXG5jb25zdCB0aHVtYkZvY3VzID0gKCB7IGlzRm9jdXNlZCB9OiBUaHVtYlByb3BzICkgPT4ge1xuXHRyZXR1cm4gaXNGb2N1c2VkXG5cdFx0PyBjc3NgXG5cdFx0XHRcdCY6OmJlZm9yZSB7XG5cdFx0XHRcdFx0Y29udGVudDogJyAnO1xuXHRcdFx0XHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRcdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHRcdFx0b3BhY2l0eTogMC40O1xuXHRcdFx0XHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRcdFx0XHRcdGhlaWdodDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0d2lkdGg6ICR7IHRodW1iU2l6ZSArIDggfXB4O1xuXHRcdFx0XHRcdHRvcDogLTRweDtcblx0XHRcdFx0XHRsZWZ0OiAtNHB4O1xuXG5cdFx0XHRcdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0XHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0XHRcdFx0fVxuXHRcdFx0XHR9XG5cdFx0ICBgXG5cdFx0OiAnJztcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYiA9IHN0eWxlZC5zcGFuPCBUaHVtYlByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRoZWlnaHQ6IDEwMCU7XG5cdG91dGxpbmU6IDA7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdHdpZHRoOiAxMDAlO1xuXHRib3gtc2hhZG93OiAkeyBDT05GSUcuZWxldmF0aW9uWFNtYWxsIH07XG5cblx0JHsgdGh1bWJDb2xvciB9O1xuXHQkeyB0aHVtYkZvY3VzIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRSYW5nZSA9IHN0eWxlZC5pbnB1dGBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAxMDAlO1xuXHRsZWZ0OiAwO1xuXHRtYXJnaW46IDAgLSR7IHRodW1iU2l6ZSAvIDIgfXB4O1xuXHRvcGFjaXR5OiAwO1xuXHRvdXRsaW5lOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHJpZ2h0OiAwO1xuXHR0b3A6IDA7XG5cdHdpZHRoOiBjYWxjKCAxMDAlICsgJHsgdGh1bWJTaXplIH1weCApO1xuYDtcblxuY29uc3QgdG9vbHRpcFNob3cgPSAoIHsgc2hvdyB9OiBUb29sdGlwUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0ZGlzcGxheTogJHsgc2hvdyA/ICdpbmxpbmUtYmxvY2snIDogJ25vbmUnIH07XG5cdFx0b3BhY2l0eTogJHsgc2hvdyA/IDEgOiAwIH07XG5cblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246XG5cdFx0XHRcdG9wYWNpdHkgMTIwbXMgZWFzZSxcblx0XHRcdFx0ZGlzcGxheSAxMjBtcyBlYXNlIGFsbG93LWRpc2NyZXRlO1xuXHRcdH1cblxuXHRcdEBzdGFydGluZy1zdHlsZSB7XG5cdFx0XHRvcGFjaXR5OiAwO1xuXHRcdH1cblx0YDtcbn07XG5cbmNvbnN0IHRvb2x0aXBQbGFjZW1lbnQgPSAoIHsgcGxhY2VtZW50IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0Y29uc3QgaXNCb3R0b20gPSBwbGFjZW1lbnQgPT09ICdib3R0b20nO1xuXG5cdGlmICggaXNCb3R0b20gKSB7XG5cdFx0cmV0dXJuIGNzc2Bcblx0XHRcdGJvdHRvbTogLTgwJTtcblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHR0b3A6IC04MCU7XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHRpcCA9IHN0eWxlZC5zcGFuPCBUb29sdGlwUHJvcHMgPmBcblx0YmFja2dyb3VuZDogcmdiYSggMCwgMCwgMCwgMC44ICk7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRjb2xvcjogd2hpdGU7XG5cdGZvbnQtc2l6ZTogMTJweDtcblx0bWluLXdpZHRoOiAzMnB4O1xuXHRwYWRkaW5nOiA0cHggOHB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRsaW5lLWhlaWdodDogMS40O1xuXG5cdCR7IHRvb2x0aXBTaG93IH07XG5cblx0JHsgdG9vbHRpcFBsYWNlbWVudCB9O1xuXHQkeyBydGwoXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKC01MCUpJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCg1MCUpJyB9XG5cdCkgfVxuYDtcblxuLy8gQHRvZG8gUmVmYWN0b3IgUmFuZ2VDb250cm9sIHdpdGggbGF0ZXN0IEhTdGFjayBjb25maWd1cmF0aW9uXG4vLyBAc2VlOiBwYWNrYWdlcy9jb21wb25lbnRzL3NyYy9oLXN0YWNrXG5leHBvcnQgY29uc3QgSW5wdXROdW1iZXIgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0ZGlzcGxheTogaW5saW5lLWJsb2NrO1xuXHRmb250LXNpemU6IDEzcHg7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0aW5wdXRbdHlwZT0nbnVtYmVyJ10mIHtcblx0XHQkeyByYW5nZUhlaWdodCB9O1xuXHR9XG5cblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IGAkeyBzcGFjZSggNCApIH0gIWltcG9ydGFudGAgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBY3Rpb25SaWdodFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0YnV0dG9uLFxuXHRidXR0b24uaXMtc21hbGwge1xuXHRcdG1hcmdpbi1sZWZ0OiAwO1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogOCB9ICkgfVxuYDtcbiJdfQ== */"));
  var tooltipShow = ({
    show
  }) => {
    return /* @__PURE__ */ css("display:", show ? "inline-block" : "none", ";opacity:", show ? 1 : 0, ";@media not ( prefers-reduced-motion ){transition:opacity 120ms ease,display 120ms ease allow-discrete;}@starting-style{opacity:0;}" + (false ? "" : ";label:tooltipShow;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQThRVyIsImZpbGUiOiJyYW5nZS1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IE51bWJlckNvbnRyb2wgZnJvbSAnLi4vLi4vbnVtYmVyLWNvbnRyb2wnO1xuaW1wb3J0IHsgQ09MT1JTLCBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5pbXBvcnQgdHlwZSB7XG5cdFJhbmdlTWFya1Byb3BzLFxuXHRSYWlsUHJvcHMsXG5cdFRodW1iUHJvcHMsXG5cdFRvb2x0aXBQcm9wcyxcblx0VHJhY2tQcm9wcyxcblx0V3JhcHBlclByb3BzLFxuXHRSYW5nZUNvbnRyb2xQcm9wcyxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuXG5jb25zdCByYW5nZUhlaWdodFZhbHVlID0gMzA7XG5jb25zdCByYWlsSGVpZ2h0ID0gNDtcbmNvbnN0IHJhbmdlSGVpZ2h0ID0gKCkgPT5cblx0Y3NzKCB7IGhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSwgbWluSGVpZ2h0OiByYW5nZUhlaWdodFZhbHVlIH0gKTtcbmNvbnN0IHRodW1iU2l6ZSA9IDEyO1xuXG5jb25zdCBkZXByZWNhdGVkSGVpZ2h0ID0gKCB7XG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcbn06IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+ICkgPT5cblx0ISBfX25leHQ0MHB4RGVmYXVsdFNpemUgJiYgY3NzKCB7IG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5cbnR5cGUgUm9vdFByb3BzID0gUGljazwgUmFuZ2VDb250cm9sUHJvcHMsICdfX25leHQ0MHB4RGVmYXVsdFNpemUnID47XG5leHBvcnQgY29uc3QgUm9vdCA9IHN0eWxlZC5kaXY8IFJvb3RQcm9wcyA+YFxuXHQtd2Via2l0LXRhcC1oaWdobGlnaHQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7XG5cdHBhZGRpbmc6IDA7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0dG91Y2gtYWN0aW9uOiBub25lO1xuXHR3aWR0aDogMTAwJTtcblx0bWluLWhlaWdodDogNDBweDtcblx0LyogVE9ETzogcmVtb3ZlIGFmdGVyIHJlbW92aW5nIHRoZSBfX25leHQ0MHB4RGVmYXVsdFNpemUgcHJvcCAqL1xuXHQkeyBkZXByZWNhdGVkSGVpZ2h0IH07XG5gO1xuXG5jb25zdCB3cmFwcGVyQ29sb3IgPSAoIHsgY29sb3IgPSBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTogV3JhcHBlclByb3BzICkgPT5cblx0Y3NzKCB7IGNvbG9yIH0gKTtcblxuZXhwb3J0IGNvbnN0IFdyYXBwZXIgPSBzdHlsZWQoICdkaXYnLCB7XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3A6IHN0cmluZyApID0+XG5cdFx0ISBbICdjb2xvcicsICdtYXJrcycgXS5pbmNsdWRlcyggcHJvcCApLFxufSApPCBXcmFwcGVyUHJvcHMgPmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdGZsZXg6IDE7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cblx0JHsgd3JhcHBlckNvbG9yIH07XG5cdCR7IHJhbmdlSGVpZ2h0IH07XG5gO1xuXG5leHBvcnQgY29uc3QgQmVmb3JlSWNvbldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogZmxleDsgLy8gZW5zdXJlcyB0aGUgaGVpZ2h0IGlzbid0IGFmZmVjdGVkIGJ5IGxpbmUtaGVpZ2h0XG5cdG1hcmdpbi10b3A6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXG5cdCR7IHJ0bCggeyBtYXJnaW5SaWdodDogNiB9ICkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IEFmdGVySWNvbldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogZmxleDsgLy8gZW5zdXJlcyB0aGUgaGVpZ2h0IGlzbid0IGFmZmVjdGVkIGJ5IGxpbmUtaGVpZ2h0XG5cdG1hcmdpbi10b3A6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiA2IH0gKSB9XG5gO1xuXG5jb25zdCByYWlsQmFja2dyb3VuZENvbG9yID0gKCB7IGRpc2FibGVkLCByYWlsQ29sb3IgfTogUmFpbFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy51aS5iYWNrZ3JvdW5kRGlzYWJsZWRcblx0XHRcdDogcmFpbENvbG9yIHx8IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXG5cdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFJhaWwgPSBzdHlsZWQuc3BhbmBcblx0bGVmdDogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHJpZ2h0OiAwO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRtYXJnaW4tdG9wOiAkeyAoIHJhbmdlSGVpZ2h0VmFsdWUgLSByYWlsSGVpZ2h0ICkgLyAyIH1weDtcblx0dG9wOiAwO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXG5cdCR7IHJhaWxCYWNrZ3JvdW5kQ29sb3IgfTtcbmA7XG5cbmNvbnN0IHRyYWNrQmFja2dyb3VuZENvbG9yID0gKCB7IGRpc2FibGVkLCB0cmFja0NvbG9yIH06IFRyYWNrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IHRyYWNrQ29sb3IgfHwgJ2N1cnJlbnRDb2xvcicgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUcmFjayA9IHN0eWxlZC5zcGFuYFxuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXHRoZWlnaHQ6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0ZGlzcGxheTogYmxvY2s7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblxuXHQuaXMtbWFya2VkICYge1xuXHRcdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFx0dHJhbnNpdGlvbjogd2lkdGggZWFzZSAwLjFzO1xuXHRcdH1cblx0fVxuXG5cdCR7IHRyYWNrQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5leHBvcnQgY29uc3QgTWFya3NXcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHR3aWR0aDogMTAwJTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdG1hcmdpbi10b3A6IDE3cHg7XG5gO1xuXG5leHBvcnQgY29uc3QgTWFyayA9IHN0eWxlZC5zcGFuYFxuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdGxlZnQ6IDA7XG5cdHRvcDogLTRweDtcblx0aGVpZ2h0OiA0cHg7XG5cdHdpZHRoOiAycHg7XG5cdHRyYW5zZm9ybTogdHJhbnNsYXRlWCggLTUwJSApO1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZCB9O1xuXHR6LWluZGV4OiAxO1xuYDtcblxuY29uc3QgbWFya0xhYmVsRmlsbCA9ICggeyBpc0ZpbGxlZCB9OiBSYW5nZU1hcmtQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzcygge1xuXHRcdGNvbG9yOiBpc0ZpbGxlZCA/IENPTE9SUy50aGVtZS5ncmF5WyA3MDAgXSA6IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSxcblx0fSApO1xufTtcblxuZXhwb3J0IGNvbnN0IE1hcmtMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmdyYXlbIDMwMCBdIH07XG5cdGZvbnQtc2l6ZTogMTFweDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDhweDtcblx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcblxuXHQkeyBydGwoIHsgbGVmdDogMCB9ICkgfTtcblx0JHsgcnRsKFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggLTUwJSApJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggNTAlICknIH1cblx0KSB9O1xuXG5cdCR7IG1hcmtMYWJlbEZpbGwgfTtcbmA7XG5cbmNvbnN0IHRodW1iQ29sb3IgPSAoIHsgZGlzYWJsZWQgfTogVGh1bWJQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudGhlbWUuZ3JheVsgNDAwIF1cblx0XHRcdDogQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXG5cdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWQgPyAnR3JheVRleHQnIDogJ0NhbnZhc1RleHQnIH07XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFRodW1iV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRoZWlnaHQ6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRtYXJnaW4tdG9wOiAkeyAoIHJhbmdlSGVpZ2h0VmFsdWUgLSB0aHVtYlNpemUgKSAvIDIgfXB4O1xuXHRvdXRsaW5lOiAwO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHR3aWR0aDogJHsgdGh1bWJTaXplIH1weDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdHotaW5kZXg6IDM7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IGxlZnQgZWFzZSAwLjFzO1xuXHRcdH1cblx0fVxuXG5cdCR7IHRodW1iQ29sb3IgfTtcblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IC0xMCB9ICkgfTtcblx0JHsgcnRsKFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggNC41cHggKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC00LjVweCApJyB9XG5cdCkgfTtcbmA7XG5cbmNvbnN0IHRodW1iRm9jdXMgPSAoIHsgaXNGb2N1c2VkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBpc0ZvY3VzZWRcblx0XHQ/IGNzc2Bcblx0XHRcdFx0Jjo6YmVmb3JlIHtcblx0XHRcdFx0XHRjb250ZW50OiAnICc7XG5cdFx0XHRcdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdFx0XHRcdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHRcdFx0XHRvcGFjaXR5OiAwLjQ7XG5cdFx0XHRcdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdFx0XHRcdFx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgKyA4IH1weDtcblx0XHRcdFx0XHR3aWR0aDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0dG9wOiAtNHB4O1xuXHRcdFx0XHRcdGxlZnQ6IC00cHg7XG5cblx0XHRcdFx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRcdFx0XHRiYWNrZ3JvdW5kOiBHcmF5VGV4dDtcblx0XHRcdFx0XHR9XG5cdFx0XHRcdH1cblx0XHQgIGBcblx0XHQ6ICcnO1xufTtcblxuZXhwb3J0IGNvbnN0IFRodW1iID0gc3R5bGVkLnNwYW48IFRodW1iUHJvcHMgPmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdGhlaWdodDogMTAwJTtcblx0b3V0bGluZTogMDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdGJveC1zaGFkb3c6ICR7IENPTkZJRy5lbGV2YXRpb25YU21hbGwgfTtcblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHRodW1iRm9jdXMgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJbnB1dFJhbmdlID0gc3R5bGVkLmlucHV0YFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRjdXJzb3I6IHBvaW50ZXI7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRoZWlnaHQ6IDEwMCU7XG5cdGxlZnQ6IDA7XG5cdG1hcmdpbjogMCAtJHsgdGh1bWJTaXplIC8gMiB9cHg7XG5cdG9wYWNpdHk6IDA7XG5cdG91dGxpbmU6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0cmlnaHQ6IDA7XG5cdHRvcDogMDtcblx0d2lkdGg6IGNhbGMoIDEwMCUgKyAkeyB0aHVtYlNpemUgfXB4ICk7XG5gO1xuXG5jb25zdCB0b29sdGlwU2hvdyA9ICggeyBzaG93IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRkaXNwbGF5OiAkeyBzaG93ID8gJ2lubGluZS1ibG9jaycgOiAnbm9uZScgfTtcblx0XHRvcGFjaXR5OiAkeyBzaG93ID8gMSA6IDAgfTtcblxuXHRcdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFx0dHJhbnNpdGlvbjpcblx0XHRcdFx0b3BhY2l0eSAxMjBtcyBlYXNlLFxuXHRcdFx0XHRkaXNwbGF5IDEyMG1zIGVhc2UgYWxsb3ctZGlzY3JldGU7XG5cdFx0fVxuXG5cdFx0QHN0YXJ0aW5nLXN0eWxlIHtcblx0XHRcdG9wYWNpdHk6IDA7XG5cdFx0fVxuXHRgO1xufTtcblxuY29uc3QgdG9vbHRpcFBsYWNlbWVudCA9ICggeyBwbGFjZW1lbnQgfTogVG9vbHRpcFByb3BzICkgPT4ge1xuXHRjb25zdCBpc0JvdHRvbSA9IHBsYWNlbWVudCA9PT0gJ2JvdHRvbSc7XG5cblx0aWYgKCBpc0JvdHRvbSApIHtcblx0XHRyZXR1cm4gY3NzYFxuXHRcdFx0Ym90dG9tOiAtODAlO1xuXHRcdGA7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdHRvcDogLTgwJTtcblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUb29sdGlwID0gc3R5bGVkLnNwYW48IFRvb2x0aXBQcm9wcyA+YFxuXHRiYWNrZ3JvdW5kOiByZ2JhKCAwLCAwLCAwLCAwLjggKTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGNvbG9yOiB3aGl0ZTtcblx0Zm9udC1zaXplOiAxMnB4O1xuXHRtaW4td2lkdGg6IDMycHg7XG5cdHBhZGRpbmc6IDRweCA4cHg7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRleHQtYWxpZ246IGNlbnRlcjtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cblx0JHsgdG9vbHRpcFNob3cgfTtcblxuXHQkeyB0b29sdGlwUGxhY2VtZW50IH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoLTUwJSknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKDUwJSknIH1cblx0KSB9XG5gO1xuXG4vLyBAdG9kbyBSZWZhY3RvciBSYW5nZUNvbnRyb2wgd2l0aCBsYXRlc3QgSFN0YWNrIGNvbmZpZ3VyYXRpb25cbi8vIEBzZWU6IHBhY2thZ2VzL2NvbXBvbmVudHMvc3JjL2gtc3RhY2tcbmV4cG9ydCBjb25zdCBJbnB1dE51bWJlciA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHRkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG5cdGZvbnQtc2l6ZTogMTNweDtcblx0bWFyZ2luLXRvcDogMDtcblxuXHRpbnB1dFt0eXBlPSdudW1iZXInXSYge1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogYCR7IHNwYWNlKCA0ICkgfSAhaW1wb3J0YW50YCB9ICkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IEFjdGlvblJpZ2h0V3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0bWFyZ2luLXRvcDogMDtcblxuXHRidXR0b24sXG5cdGJ1dHRvbi5pcy1zbWFsbCB7XG5cdFx0bWFyZ2luLWxlZnQ6IDA7XG5cdFx0JHsgcmFuZ2VIZWlnaHQgfTtcblx0fVxuXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiA4IH0gKSB9XG5gO1xuIl19 */");
  };
  var _ref6 = false ? {
    name: "1cypxip",
    styles: "top:-80%"
  } : {
    name: "1g4vnux-tooltipPlacement",
    styles: "top:-80%;label:tooltipPlacement;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXVTVyIsImZpbGUiOiJyYW5nZS1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IE51bWJlckNvbnRyb2wgZnJvbSAnLi4vLi4vbnVtYmVyLWNvbnRyb2wnO1xuaW1wb3J0IHsgQ09MT1JTLCBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5pbXBvcnQgdHlwZSB7XG5cdFJhbmdlTWFya1Byb3BzLFxuXHRSYWlsUHJvcHMsXG5cdFRodW1iUHJvcHMsXG5cdFRvb2x0aXBQcm9wcyxcblx0VHJhY2tQcm9wcyxcblx0V3JhcHBlclByb3BzLFxuXHRSYW5nZUNvbnRyb2xQcm9wcyxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuXG5jb25zdCByYW5nZUhlaWdodFZhbHVlID0gMzA7XG5jb25zdCByYWlsSGVpZ2h0ID0gNDtcbmNvbnN0IHJhbmdlSGVpZ2h0ID0gKCkgPT5cblx0Y3NzKCB7IGhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSwgbWluSGVpZ2h0OiByYW5nZUhlaWdodFZhbHVlIH0gKTtcbmNvbnN0IHRodW1iU2l6ZSA9IDEyO1xuXG5jb25zdCBkZXByZWNhdGVkSGVpZ2h0ID0gKCB7XG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcbn06IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+ICkgPT5cblx0ISBfX25leHQ0MHB4RGVmYXVsdFNpemUgJiYgY3NzKCB7IG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5cbnR5cGUgUm9vdFByb3BzID0gUGljazwgUmFuZ2VDb250cm9sUHJvcHMsICdfX25leHQ0MHB4RGVmYXVsdFNpemUnID47XG5leHBvcnQgY29uc3QgUm9vdCA9IHN0eWxlZC5kaXY8IFJvb3RQcm9wcyA+YFxuXHQtd2Via2l0LXRhcC1oaWdobGlnaHQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7XG5cdHBhZGRpbmc6IDA7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0dG91Y2gtYWN0aW9uOiBub25lO1xuXHR3aWR0aDogMTAwJTtcblx0bWluLWhlaWdodDogNDBweDtcblx0LyogVE9ETzogcmVtb3ZlIGFmdGVyIHJlbW92aW5nIHRoZSBfX25leHQ0MHB4RGVmYXVsdFNpemUgcHJvcCAqL1xuXHQkeyBkZXByZWNhdGVkSGVpZ2h0IH07XG5gO1xuXG5jb25zdCB3cmFwcGVyQ29sb3IgPSAoIHsgY29sb3IgPSBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTogV3JhcHBlclByb3BzICkgPT5cblx0Y3NzKCB7IGNvbG9yIH0gKTtcblxuZXhwb3J0IGNvbnN0IFdyYXBwZXIgPSBzdHlsZWQoICdkaXYnLCB7XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3A6IHN0cmluZyApID0+XG5cdFx0ISBbICdjb2xvcicsICdtYXJrcycgXS5pbmNsdWRlcyggcHJvcCApLFxufSApPCBXcmFwcGVyUHJvcHMgPmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdGZsZXg6IDE7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cblx0JHsgd3JhcHBlckNvbG9yIH07XG5cdCR7IHJhbmdlSGVpZ2h0IH07XG5gO1xuXG5leHBvcnQgY29uc3QgQmVmb3JlSWNvbldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogZmxleDsgLy8gZW5zdXJlcyB0aGUgaGVpZ2h0IGlzbid0IGFmZmVjdGVkIGJ5IGxpbmUtaGVpZ2h0XG5cdG1hcmdpbi10b3A6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXG5cdCR7IHJ0bCggeyBtYXJnaW5SaWdodDogNiB9ICkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IEFmdGVySWNvbldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogZmxleDsgLy8gZW5zdXJlcyB0aGUgaGVpZ2h0IGlzbid0IGFmZmVjdGVkIGJ5IGxpbmUtaGVpZ2h0XG5cdG1hcmdpbi10b3A6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiA2IH0gKSB9XG5gO1xuXG5jb25zdCByYWlsQmFja2dyb3VuZENvbG9yID0gKCB7IGRpc2FibGVkLCByYWlsQ29sb3IgfTogUmFpbFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy51aS5iYWNrZ3JvdW5kRGlzYWJsZWRcblx0XHRcdDogcmFpbENvbG9yIHx8IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXG5cdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFJhaWwgPSBzdHlsZWQuc3BhbmBcblx0bGVmdDogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHJpZ2h0OiAwO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRtYXJnaW4tdG9wOiAkeyAoIHJhbmdlSGVpZ2h0VmFsdWUgLSByYWlsSGVpZ2h0ICkgLyAyIH1weDtcblx0dG9wOiAwO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXG5cdCR7IHJhaWxCYWNrZ3JvdW5kQ29sb3IgfTtcbmA7XG5cbmNvbnN0IHRyYWNrQmFja2dyb3VuZENvbG9yID0gKCB7IGRpc2FibGVkLCB0cmFja0NvbG9yIH06IFRyYWNrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IHRyYWNrQ29sb3IgfHwgJ2N1cnJlbnRDb2xvcicgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUcmFjayA9IHN0eWxlZC5zcGFuYFxuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXHRoZWlnaHQ6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0ZGlzcGxheTogYmxvY2s7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblxuXHQuaXMtbWFya2VkICYge1xuXHRcdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFx0dHJhbnNpdGlvbjogd2lkdGggZWFzZSAwLjFzO1xuXHRcdH1cblx0fVxuXG5cdCR7IHRyYWNrQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5leHBvcnQgY29uc3QgTWFya3NXcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHR3aWR0aDogMTAwJTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdG1hcmdpbi10b3A6IDE3cHg7XG5gO1xuXG5leHBvcnQgY29uc3QgTWFyayA9IHN0eWxlZC5zcGFuYFxuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdGxlZnQ6IDA7XG5cdHRvcDogLTRweDtcblx0aGVpZ2h0OiA0cHg7XG5cdHdpZHRoOiAycHg7XG5cdHRyYW5zZm9ybTogdHJhbnNsYXRlWCggLTUwJSApO1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZCB9O1xuXHR6LWluZGV4OiAxO1xuYDtcblxuY29uc3QgbWFya0xhYmVsRmlsbCA9ICggeyBpc0ZpbGxlZCB9OiBSYW5nZU1hcmtQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzcygge1xuXHRcdGNvbG9yOiBpc0ZpbGxlZCA/IENPTE9SUy50aGVtZS5ncmF5WyA3MDAgXSA6IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSxcblx0fSApO1xufTtcblxuZXhwb3J0IGNvbnN0IE1hcmtMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmdyYXlbIDMwMCBdIH07XG5cdGZvbnQtc2l6ZTogMTFweDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDhweDtcblx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcblxuXHQkeyBydGwoIHsgbGVmdDogMCB9ICkgfTtcblx0JHsgcnRsKFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggLTUwJSApJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggNTAlICknIH1cblx0KSB9O1xuXG5cdCR7IG1hcmtMYWJlbEZpbGwgfTtcbmA7XG5cbmNvbnN0IHRodW1iQ29sb3IgPSAoIHsgZGlzYWJsZWQgfTogVGh1bWJQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudGhlbWUuZ3JheVsgNDAwIF1cblx0XHRcdDogQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXG5cdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWQgPyAnR3JheVRleHQnIDogJ0NhbnZhc1RleHQnIH07XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFRodW1iV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRoZWlnaHQ6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRtYXJnaW4tdG9wOiAkeyAoIHJhbmdlSGVpZ2h0VmFsdWUgLSB0aHVtYlNpemUgKSAvIDIgfXB4O1xuXHRvdXRsaW5lOiAwO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHR3aWR0aDogJHsgdGh1bWJTaXplIH1weDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdHotaW5kZXg6IDM7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IGxlZnQgZWFzZSAwLjFzO1xuXHRcdH1cblx0fVxuXG5cdCR7IHRodW1iQ29sb3IgfTtcblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IC0xMCB9ICkgfTtcblx0JHsgcnRsKFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggNC41cHggKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC00LjVweCApJyB9XG5cdCkgfTtcbmA7XG5cbmNvbnN0IHRodW1iRm9jdXMgPSAoIHsgaXNGb2N1c2VkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBpc0ZvY3VzZWRcblx0XHQ/IGNzc2Bcblx0XHRcdFx0Jjo6YmVmb3JlIHtcblx0XHRcdFx0XHRjb250ZW50OiAnICc7XG5cdFx0XHRcdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdFx0XHRcdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHRcdFx0XHRvcGFjaXR5OiAwLjQ7XG5cdFx0XHRcdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdFx0XHRcdFx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgKyA4IH1weDtcblx0XHRcdFx0XHR3aWR0aDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0dG9wOiAtNHB4O1xuXHRcdFx0XHRcdGxlZnQ6IC00cHg7XG5cblx0XHRcdFx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRcdFx0XHRiYWNrZ3JvdW5kOiBHcmF5VGV4dDtcblx0XHRcdFx0XHR9XG5cdFx0XHRcdH1cblx0XHQgIGBcblx0XHQ6ICcnO1xufTtcblxuZXhwb3J0IGNvbnN0IFRodW1iID0gc3R5bGVkLnNwYW48IFRodW1iUHJvcHMgPmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdGhlaWdodDogMTAwJTtcblx0b3V0bGluZTogMDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdGJveC1zaGFkb3c6ICR7IENPTkZJRy5lbGV2YXRpb25YU21hbGwgfTtcblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHRodW1iRm9jdXMgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJbnB1dFJhbmdlID0gc3R5bGVkLmlucHV0YFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRjdXJzb3I6IHBvaW50ZXI7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRoZWlnaHQ6IDEwMCU7XG5cdGxlZnQ6IDA7XG5cdG1hcmdpbjogMCAtJHsgdGh1bWJTaXplIC8gMiB9cHg7XG5cdG9wYWNpdHk6IDA7XG5cdG91dGxpbmU6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0cmlnaHQ6IDA7XG5cdHRvcDogMDtcblx0d2lkdGg6IGNhbGMoIDEwMCUgKyAkeyB0aHVtYlNpemUgfXB4ICk7XG5gO1xuXG5jb25zdCB0b29sdGlwU2hvdyA9ICggeyBzaG93IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRkaXNwbGF5OiAkeyBzaG93ID8gJ2lubGluZS1ibG9jaycgOiAnbm9uZScgfTtcblx0XHRvcGFjaXR5OiAkeyBzaG93ID8gMSA6IDAgfTtcblxuXHRcdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFx0dHJhbnNpdGlvbjpcblx0XHRcdFx0b3BhY2l0eSAxMjBtcyBlYXNlLFxuXHRcdFx0XHRkaXNwbGF5IDEyMG1zIGVhc2UgYWxsb3ctZGlzY3JldGU7XG5cdFx0fVxuXG5cdFx0QHN0YXJ0aW5nLXN0eWxlIHtcblx0XHRcdG9wYWNpdHk6IDA7XG5cdFx0fVxuXHRgO1xufTtcblxuY29uc3QgdG9vbHRpcFBsYWNlbWVudCA9ICggeyBwbGFjZW1lbnQgfTogVG9vbHRpcFByb3BzICkgPT4ge1xuXHRjb25zdCBpc0JvdHRvbSA9IHBsYWNlbWVudCA9PT0gJ2JvdHRvbSc7XG5cblx0aWYgKCBpc0JvdHRvbSApIHtcblx0XHRyZXR1cm4gY3NzYFxuXHRcdFx0Ym90dG9tOiAtODAlO1xuXHRcdGA7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdHRvcDogLTgwJTtcblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUb29sdGlwID0gc3R5bGVkLnNwYW48IFRvb2x0aXBQcm9wcyA+YFxuXHRiYWNrZ3JvdW5kOiByZ2JhKCAwLCAwLCAwLCAwLjggKTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGNvbG9yOiB3aGl0ZTtcblx0Zm9udC1zaXplOiAxMnB4O1xuXHRtaW4td2lkdGg6IDMycHg7XG5cdHBhZGRpbmc6IDRweCA4cHg7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRleHQtYWxpZ246IGNlbnRlcjtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cblx0JHsgdG9vbHRpcFNob3cgfTtcblxuXHQkeyB0b29sdGlwUGxhY2VtZW50IH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoLTUwJSknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKDUwJSknIH1cblx0KSB9XG5gO1xuXG4vLyBAdG9kbyBSZWZhY3RvciBSYW5nZUNvbnRyb2wgd2l0aCBsYXRlc3QgSFN0YWNrIGNvbmZpZ3VyYXRpb25cbi8vIEBzZWU6IHBhY2thZ2VzL2NvbXBvbmVudHMvc3JjL2gtc3RhY2tcbmV4cG9ydCBjb25zdCBJbnB1dE51bWJlciA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHRkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG5cdGZvbnQtc2l6ZTogMTNweDtcblx0bWFyZ2luLXRvcDogMDtcblxuXHRpbnB1dFt0eXBlPSdudW1iZXInXSYge1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogYCR7IHNwYWNlKCA0ICkgfSAhaW1wb3J0YW50YCB9ICkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IEFjdGlvblJpZ2h0V3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0bWFyZ2luLXRvcDogMDtcblxuXHRidXR0b24sXG5cdGJ1dHRvbi5pcy1zbWFsbCB7XG5cdFx0bWFyZ2luLWxlZnQ6IDA7XG5cdFx0JHsgcmFuZ2VIZWlnaHQgfTtcblx0fVxuXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiA4IH0gKSB9XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__13
  };
  var _ref24 = false ? {
    name: "1lr98c4",
    styles: "bottom:-80%"
  } : {
    name: "1g13zjq-tooltipPlacement",
    styles: "bottom:-80%;label:tooltipPlacement;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWtTWSIsImZpbGUiOiJyYW5nZS1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IE51bWJlckNvbnRyb2wgZnJvbSAnLi4vLi4vbnVtYmVyLWNvbnRyb2wnO1xuaW1wb3J0IHsgQ09MT1JTLCBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5pbXBvcnQgdHlwZSB7XG5cdFJhbmdlTWFya1Byb3BzLFxuXHRSYWlsUHJvcHMsXG5cdFRodW1iUHJvcHMsXG5cdFRvb2x0aXBQcm9wcyxcblx0VHJhY2tQcm9wcyxcblx0V3JhcHBlclByb3BzLFxuXHRSYW5nZUNvbnRyb2xQcm9wcyxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuXG5jb25zdCByYW5nZUhlaWdodFZhbHVlID0gMzA7XG5jb25zdCByYWlsSGVpZ2h0ID0gNDtcbmNvbnN0IHJhbmdlSGVpZ2h0ID0gKCkgPT5cblx0Y3NzKCB7IGhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSwgbWluSGVpZ2h0OiByYW5nZUhlaWdodFZhbHVlIH0gKTtcbmNvbnN0IHRodW1iU2l6ZSA9IDEyO1xuXG5jb25zdCBkZXByZWNhdGVkSGVpZ2h0ID0gKCB7XG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcbn06IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+ICkgPT5cblx0ISBfX25leHQ0MHB4RGVmYXVsdFNpemUgJiYgY3NzKCB7IG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5cbnR5cGUgUm9vdFByb3BzID0gUGljazwgUmFuZ2VDb250cm9sUHJvcHMsICdfX25leHQ0MHB4RGVmYXVsdFNpemUnID47XG5leHBvcnQgY29uc3QgUm9vdCA9IHN0eWxlZC5kaXY8IFJvb3RQcm9wcyA+YFxuXHQtd2Via2l0LXRhcC1oaWdobGlnaHQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7XG5cdHBhZGRpbmc6IDA7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0dG91Y2gtYWN0aW9uOiBub25lO1xuXHR3aWR0aDogMTAwJTtcblx0bWluLWhlaWdodDogNDBweDtcblx0LyogVE9ETzogcmVtb3ZlIGFmdGVyIHJlbW92aW5nIHRoZSBfX25leHQ0MHB4RGVmYXVsdFNpemUgcHJvcCAqL1xuXHQkeyBkZXByZWNhdGVkSGVpZ2h0IH07XG5gO1xuXG5jb25zdCB3cmFwcGVyQ29sb3IgPSAoIHsgY29sb3IgPSBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTogV3JhcHBlclByb3BzICkgPT5cblx0Y3NzKCB7IGNvbG9yIH0gKTtcblxuZXhwb3J0IGNvbnN0IFdyYXBwZXIgPSBzdHlsZWQoICdkaXYnLCB7XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3A6IHN0cmluZyApID0+XG5cdFx0ISBbICdjb2xvcicsICdtYXJrcycgXS5pbmNsdWRlcyggcHJvcCApLFxufSApPCBXcmFwcGVyUHJvcHMgPmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdGZsZXg6IDE7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cblx0JHsgd3JhcHBlckNvbG9yIH07XG5cdCR7IHJhbmdlSGVpZ2h0IH07XG5gO1xuXG5leHBvcnQgY29uc3QgQmVmb3JlSWNvbldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogZmxleDsgLy8gZW5zdXJlcyB0aGUgaGVpZ2h0IGlzbid0IGFmZmVjdGVkIGJ5IGxpbmUtaGVpZ2h0XG5cdG1hcmdpbi10b3A6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXG5cdCR7IHJ0bCggeyBtYXJnaW5SaWdodDogNiB9ICkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IEFmdGVySWNvbldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogZmxleDsgLy8gZW5zdXJlcyB0aGUgaGVpZ2h0IGlzbid0IGFmZmVjdGVkIGJ5IGxpbmUtaGVpZ2h0XG5cdG1hcmdpbi10b3A6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiA2IH0gKSB9XG5gO1xuXG5jb25zdCByYWlsQmFja2dyb3VuZENvbG9yID0gKCB7IGRpc2FibGVkLCByYWlsQ29sb3IgfTogUmFpbFByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy51aS5iYWNrZ3JvdW5kRGlzYWJsZWRcblx0XHRcdDogcmFpbENvbG9yIHx8IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXG5cdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFJhaWwgPSBzdHlsZWQuc3BhbmBcblx0bGVmdDogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHJpZ2h0OiAwO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRtYXJnaW4tdG9wOiAkeyAoIHJhbmdlSGVpZ2h0VmFsdWUgLSByYWlsSGVpZ2h0ICkgLyAyIH1weDtcblx0dG9wOiAwO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXG5cdCR7IHJhaWxCYWNrZ3JvdW5kQ29sb3IgfTtcbmA7XG5cbmNvbnN0IHRyYWNrQmFja2dyb3VuZENvbG9yID0gKCB7IGRpc2FibGVkLCB0cmFja0NvbG9yIH06IFRyYWNrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IHRyYWNrQ29sb3IgfHwgJ2N1cnJlbnRDb2xvcicgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUcmFjayA9IHN0eWxlZC5zcGFuYFxuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXHRoZWlnaHQ6ICR7IHJhaWxIZWlnaHQgfXB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0ZGlzcGxheTogYmxvY2s7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblxuXHQuaXMtbWFya2VkICYge1xuXHRcdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFx0dHJhbnNpdGlvbjogd2lkdGggZWFzZSAwLjFzO1xuXHRcdH1cblx0fVxuXG5cdCR7IHRyYWNrQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5leHBvcnQgY29uc3QgTWFya3NXcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHR3aWR0aDogMTAwJTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdG1hcmdpbi10b3A6IDE3cHg7XG5gO1xuXG5leHBvcnQgY29uc3QgTWFyayA9IHN0eWxlZC5zcGFuYFxuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdGxlZnQ6IDA7XG5cdHRvcDogLTRweDtcblx0aGVpZ2h0OiA0cHg7XG5cdHdpZHRoOiAycHg7XG5cdHRyYW5zZm9ybTogdHJhbnNsYXRlWCggLTUwJSApO1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZCB9O1xuXHR6LWluZGV4OiAxO1xuYDtcblxuY29uc3QgbWFya0xhYmVsRmlsbCA9ICggeyBpc0ZpbGxlZCB9OiBSYW5nZU1hcmtQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzcygge1xuXHRcdGNvbG9yOiBpc0ZpbGxlZCA/IENPTE9SUy50aGVtZS5ncmF5WyA3MDAgXSA6IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSxcblx0fSApO1xufTtcblxuZXhwb3J0IGNvbnN0IE1hcmtMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmdyYXlbIDMwMCBdIH07XG5cdGZvbnQtc2l6ZTogMTFweDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDhweDtcblx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcblxuXHQkeyBydGwoIHsgbGVmdDogMCB9ICkgfTtcblx0JHsgcnRsKFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggLTUwJSApJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggNTAlICknIH1cblx0KSB9O1xuXG5cdCR7IG1hcmtMYWJlbEZpbGwgfTtcbmA7XG5cbmNvbnN0IHRodW1iQ29sb3IgPSAoIHsgZGlzYWJsZWQgfTogVGh1bWJQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudGhlbWUuZ3JheVsgNDAwIF1cblx0XHRcdDogQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXG5cdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWQgPyAnR3JheVRleHQnIDogJ0NhbnZhc1RleHQnIH07XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFRodW1iV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRoZWlnaHQ6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRtYXJnaW4tdG9wOiAkeyAoIHJhbmdlSGVpZ2h0VmFsdWUgLSB0aHVtYlNpemUgKSAvIDIgfXB4O1xuXHRvdXRsaW5lOiAwO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHR3aWR0aDogJHsgdGh1bWJTaXplIH1weDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdHotaW5kZXg6IDM7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IGxlZnQgZWFzZSAwLjFzO1xuXHRcdH1cblx0fVxuXG5cdCR7IHRodW1iQ29sb3IgfTtcblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IC0xMCB9ICkgfTtcblx0JHsgcnRsKFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCggNC41cHggKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC00LjVweCApJyB9XG5cdCkgfTtcbmA7XG5cbmNvbnN0IHRodW1iRm9jdXMgPSAoIHsgaXNGb2N1c2VkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBpc0ZvY3VzZWRcblx0XHQ/IGNzc2Bcblx0XHRcdFx0Jjo6YmVmb3JlIHtcblx0XHRcdFx0XHRjb250ZW50OiAnICc7XG5cdFx0XHRcdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdFx0XHRcdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHRcdFx0XHRvcGFjaXR5OiAwLjQ7XG5cdFx0XHRcdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdFx0XHRcdFx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgKyA4IH1weDtcblx0XHRcdFx0XHR3aWR0aDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0dG9wOiAtNHB4O1xuXHRcdFx0XHRcdGxlZnQ6IC00cHg7XG5cblx0XHRcdFx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRcdFx0XHRiYWNrZ3JvdW5kOiBHcmF5VGV4dDtcblx0XHRcdFx0XHR9XG5cdFx0XHRcdH1cblx0XHQgIGBcblx0XHQ6ICcnO1xufTtcblxuZXhwb3J0IGNvbnN0IFRodW1iID0gc3R5bGVkLnNwYW48IFRodW1iUHJvcHMgPmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdGhlaWdodDogMTAwJTtcblx0b3V0bGluZTogMDtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdGJveC1zaGFkb3c6ICR7IENPTkZJRy5lbGV2YXRpb25YU21hbGwgfTtcblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHRodW1iRm9jdXMgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJbnB1dFJhbmdlID0gc3R5bGVkLmlucHV0YFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRjdXJzb3I6IHBvaW50ZXI7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRoZWlnaHQ6IDEwMCU7XG5cdGxlZnQ6IDA7XG5cdG1hcmdpbjogMCAtJHsgdGh1bWJTaXplIC8gMiB9cHg7XG5cdG9wYWNpdHk6IDA7XG5cdG91dGxpbmU6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0cmlnaHQ6IDA7XG5cdHRvcDogMDtcblx0d2lkdGg6IGNhbGMoIDEwMCUgKyAkeyB0aHVtYlNpemUgfXB4ICk7XG5gO1xuXG5jb25zdCB0b29sdGlwU2hvdyA9ICggeyBzaG93IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRkaXNwbGF5OiAkeyBzaG93ID8gJ2lubGluZS1ibG9jaycgOiAnbm9uZScgfTtcblx0XHRvcGFjaXR5OiAkeyBzaG93ID8gMSA6IDAgfTtcblxuXHRcdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFx0dHJhbnNpdGlvbjpcblx0XHRcdFx0b3BhY2l0eSAxMjBtcyBlYXNlLFxuXHRcdFx0XHRkaXNwbGF5IDEyMG1zIGVhc2UgYWxsb3ctZGlzY3JldGU7XG5cdFx0fVxuXG5cdFx0QHN0YXJ0aW5nLXN0eWxlIHtcblx0XHRcdG9wYWNpdHk6IDA7XG5cdFx0fVxuXHRgO1xufTtcblxuY29uc3QgdG9vbHRpcFBsYWNlbWVudCA9ICggeyBwbGFjZW1lbnQgfTogVG9vbHRpcFByb3BzICkgPT4ge1xuXHRjb25zdCBpc0JvdHRvbSA9IHBsYWNlbWVudCA9PT0gJ2JvdHRvbSc7XG5cblx0aWYgKCBpc0JvdHRvbSApIHtcblx0XHRyZXR1cm4gY3NzYFxuXHRcdFx0Ym90dG9tOiAtODAlO1xuXHRcdGA7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdHRvcDogLTgwJTtcblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUb29sdGlwID0gc3R5bGVkLnNwYW48IFRvb2x0aXBQcm9wcyA+YFxuXHRiYWNrZ3JvdW5kOiByZ2JhKCAwLCAwLCAwLCAwLjggKTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGNvbG9yOiB3aGl0ZTtcblx0Zm9udC1zaXplOiAxMnB4O1xuXHRtaW4td2lkdGg6IDMycHg7XG5cdHBhZGRpbmc6IDRweCA4cHg7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRleHQtYWxpZ246IGNlbnRlcjtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cblx0JHsgdG9vbHRpcFNob3cgfTtcblxuXHQkeyB0b29sdGlwUGxhY2VtZW50IH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoLTUwJSknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKDUwJSknIH1cblx0KSB9XG5gO1xuXG4vLyBAdG9kbyBSZWZhY3RvciBSYW5nZUNvbnRyb2wgd2l0aCBsYXRlc3QgSFN0YWNrIGNvbmZpZ3VyYXRpb25cbi8vIEBzZWU6IHBhY2thZ2VzL2NvbXBvbmVudHMvc3JjL2gtc3RhY2tcbmV4cG9ydCBjb25zdCBJbnB1dE51bWJlciA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHRkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG5cdGZvbnQtc2l6ZTogMTNweDtcblx0bWFyZ2luLXRvcDogMDtcblxuXHRpbnB1dFt0eXBlPSdudW1iZXInXSYge1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogYCR7IHNwYWNlKCA0ICkgfSAhaW1wb3J0YW50YCB9ICkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IEFjdGlvblJpZ2h0V3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0bWFyZ2luLXRvcDogMDtcblxuXHRidXR0b24sXG5cdGJ1dHRvbi5pcy1zbWFsbCB7XG5cdFx0bWFyZ2luLWxlZnQ6IDA7XG5cdFx0JHsgcmFuZ2VIZWlnaHQgfTtcblx0fVxuXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiA4IH0gKSB9XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__13
  };
  var tooltipPlacement = ({
    placement
  }) => {
    const isBottom = placement === "bottom";
    if (isBottom) {
      return _ref24;
    }
    return _ref6;
  };
  var Tooltip3 = /* @__PURE__ */ createStyled("span", false ? {
    target: "e1epgpqk2"
  } : {
    target: "e1epgpqk2",
    label: "Tooltip"
  })("background:rgba( 0, 0, 0, 0.8 );border-radius:", config_values_default.radiusSmall, ";color:white;font-size:12px;min-width:32px;padding:4px 8px;pointer-events:none;position:absolute;text-align:center;user-select:none;line-height:1.4;", tooltipShow, ";", tooltipPlacement, ";", rtl({
    transform: "translateX(-50%)"
  }, {
    transform: "translateX(50%)"
  }), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTRTa0QiLCJmaWxlIjoicmFuZ2UtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBOdW1iZXJDb250cm9sIGZyb20gJy4uLy4uL251bWJlci1jb250cm9sJztcbmltcG9ydCB7IENPTE9SUywgcnRsLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuaW1wb3J0IHR5cGUge1xuXHRSYW5nZU1hcmtQcm9wcyxcblx0UmFpbFByb3BzLFxuXHRUaHVtYlByb3BzLFxuXHRUb29sdGlwUHJvcHMsXG5cdFRyYWNrUHJvcHMsXG5cdFdyYXBwZXJQcm9wcyxcblx0UmFuZ2VDb250cm9sUHJvcHMsXG59IGZyb20gJy4uL3R5cGVzJztcblxuY29uc3QgcmFuZ2VIZWlnaHRWYWx1ZSA9IDMwO1xuY29uc3QgcmFpbEhlaWdodCA9IDQ7XG5jb25zdCByYW5nZUhlaWdodCA9ICgpID0+XG5cdGNzcyggeyBoZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUsIG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5jb25zdCB0aHVtYlNpemUgPSAxMjtcblxuY29uc3QgZGVwcmVjYXRlZEhlaWdodCA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBQaWNrPCBSYW5nZUNvbnRyb2xQcm9wcywgJ19fbmV4dDQwcHhEZWZhdWx0U2l6ZScgPiApID0+XG5cdCEgX19uZXh0NDBweERlZmF1bHRTaXplICYmIGNzcyggeyBtaW5IZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUgfSApO1xuXG50eXBlIFJvb3RQcm9wcyA9IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+O1xuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQuZGl2PCBSb290UHJvcHMgPmBcblx0LXdlYmtpdC10YXAtaGlnaGxpZ2h0LWNvbG9yOiB0cmFuc3BhcmVudDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0anVzdGlmeS1jb250ZW50OiBmbGV4LXN0YXJ0O1xuXHRwYWRkaW5nOiAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHRvdWNoLWFjdGlvbjogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdC8qIFRPRE86IHJlbW92ZSBhZnRlciByZW1vdmluZyB0aGUgX19uZXh0NDBweERlZmF1bHRTaXplIHByb3AgKi9cblx0JHsgZGVwcmVjYXRlZEhlaWdodCB9O1xuYDtcblxuY29uc3Qgd3JhcHBlckNvbG9yID0gKCB7IGNvbG9yID0gQ09MT1JTLnVpLmJvcmRlckZvY3VzIH06IFdyYXBwZXJQcm9wcyApID0+XG5cdGNzcyggeyBjb2xvciB9ICk7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkKCAnZGl2Jywge1xuXHRzaG91bGRGb3J3YXJkUHJvcDogKCBwcm9wOiBzdHJpbmcgKSA9PlxuXHRcdCEgWyAnY29sb3InLCAnbWFya3MnIF0uaW5jbHVkZXMoIHByb3AgKSxcbn0gKTwgV3JhcHBlclByb3BzID5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRmbGV4OiAxO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHdpZHRoOiAxMDAlO1xuXG5cdCR7IHdyYXBwZXJDb2xvciB9O1xuXHQkeyByYW5nZUhlaWdodCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEJlZm9yZUljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luUmlnaHQ6IDYgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBZnRlckljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogNiB9ICkgfVxuYDtcblxuY29uc3QgcmFpbEJhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgcmFpbENvbG9yIH06IFJhaWxQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0XHQ6IHJhaWxDb2xvciB8fCBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0gfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6IEdyYXlUZXh0O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBSYWlsID0gc3R5bGVkLnNwYW5gXG5cdGxlZnQ6IDA7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRyaWdodDogMDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdGhlaWdodDogJHsgcmFpbEhlaWdodCB9cHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblxuXHQkeyByYWlsQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5jb25zdCB0cmFja0JhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgdHJhY2tDb2xvciB9OiBUcmFja1Byb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy50aGVtZS5ncmF5WyA0MDAgXVxuXHRcdFx0OiB0cmFja0NvbG9yIHx8ICdjdXJyZW50Q29sb3InIH07XG5cblx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZCA/ICdHcmF5VGV4dCcgOiAnQ2FudmFzVGV4dCcgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVHJhY2sgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdG1hcmdpbi10b3A6ICR7ICggcmFuZ2VIZWlnaHRWYWx1ZSAtIHJhaWxIZWlnaHQgKSAvIDIgfXB4O1xuXHR0b3A6IDA7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IHdpZHRoIGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0cmFja0JhY2tncm91bmRDb2xvciB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmtzV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRtYXJnaW4tdG9wOiAxN3B4O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmsgPSBzdHlsZWQuc3BhbmBcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRsZWZ0OiAwO1xuXHR0b3A6IC00cHg7XG5cdGhlaWdodDogNHB4O1xuXHR3aWR0aDogMnB4O1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoIC01MCUgKTtcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0ei1pbmRleDogMTtcbmA7XG5cbmNvbnN0IG1hcmtMYWJlbEZpbGwgPSAoIHsgaXNGaWxsZWQgfTogUmFuZ2VNYXJrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogaXNGaWxsZWQgPyBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF0gOiBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0sXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBNYXJrTGFiZWwgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRmb250LXNpemU6IDExcHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiA4cHg7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cblx0JHsgcnRsKCB7IGxlZnQ6IDAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC01MCUgKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDUwJSApJyB9XG5cdCkgfTtcblxuXHQkeyBtYXJrTGFiZWxGaWxsIH07XG5gO1xuXG5jb25zdCB0aHVtYkNvbG9yID0gKCB7IGRpc2FibGVkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgfXB4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gdGh1bWJTaXplICkgLyAyIH1weDtcblx0b3V0bGluZTogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHR6LWluZGV4OiAzO1xuXG5cdC5pcy1tYXJrZWQgJiB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHR0cmFuc2l0aW9uOiBsZWZ0IGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiAtMTAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDQuNXB4ICknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKCAtNC41cHggKScgfVxuXHQpIH07XG5gO1xuXG5jb25zdCB0aHVtYkZvY3VzID0gKCB7IGlzRm9jdXNlZCB9OiBUaHVtYlByb3BzICkgPT4ge1xuXHRyZXR1cm4gaXNGb2N1c2VkXG5cdFx0PyBjc3NgXG5cdFx0XHRcdCY6OmJlZm9yZSB7XG5cdFx0XHRcdFx0Y29udGVudDogJyAnO1xuXHRcdFx0XHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRcdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHRcdFx0b3BhY2l0eTogMC40O1xuXHRcdFx0XHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRcdFx0XHRcdGhlaWdodDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0d2lkdGg6ICR7IHRodW1iU2l6ZSArIDggfXB4O1xuXHRcdFx0XHRcdHRvcDogLTRweDtcblx0XHRcdFx0XHRsZWZ0OiAtNHB4O1xuXG5cdFx0XHRcdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0XHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0XHRcdFx0fVxuXHRcdFx0XHR9XG5cdFx0ICBgXG5cdFx0OiAnJztcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYiA9IHN0eWxlZC5zcGFuPCBUaHVtYlByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRoZWlnaHQ6IDEwMCU7XG5cdG91dGxpbmU6IDA7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdHdpZHRoOiAxMDAlO1xuXHRib3gtc2hhZG93OiAkeyBDT05GSUcuZWxldmF0aW9uWFNtYWxsIH07XG5cblx0JHsgdGh1bWJDb2xvciB9O1xuXHQkeyB0aHVtYkZvY3VzIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRSYW5nZSA9IHN0eWxlZC5pbnB1dGBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAxMDAlO1xuXHRsZWZ0OiAwO1xuXHRtYXJnaW46IDAgLSR7IHRodW1iU2l6ZSAvIDIgfXB4O1xuXHRvcGFjaXR5OiAwO1xuXHRvdXRsaW5lOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHJpZ2h0OiAwO1xuXHR0b3A6IDA7XG5cdHdpZHRoOiBjYWxjKCAxMDAlICsgJHsgdGh1bWJTaXplIH1weCApO1xuYDtcblxuY29uc3QgdG9vbHRpcFNob3cgPSAoIHsgc2hvdyB9OiBUb29sdGlwUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0ZGlzcGxheTogJHsgc2hvdyA/ICdpbmxpbmUtYmxvY2snIDogJ25vbmUnIH07XG5cdFx0b3BhY2l0eTogJHsgc2hvdyA/IDEgOiAwIH07XG5cblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246XG5cdFx0XHRcdG9wYWNpdHkgMTIwbXMgZWFzZSxcblx0XHRcdFx0ZGlzcGxheSAxMjBtcyBlYXNlIGFsbG93LWRpc2NyZXRlO1xuXHRcdH1cblxuXHRcdEBzdGFydGluZy1zdHlsZSB7XG5cdFx0XHRvcGFjaXR5OiAwO1xuXHRcdH1cblx0YDtcbn07XG5cbmNvbnN0IHRvb2x0aXBQbGFjZW1lbnQgPSAoIHsgcGxhY2VtZW50IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0Y29uc3QgaXNCb3R0b20gPSBwbGFjZW1lbnQgPT09ICdib3R0b20nO1xuXG5cdGlmICggaXNCb3R0b20gKSB7XG5cdFx0cmV0dXJuIGNzc2Bcblx0XHRcdGJvdHRvbTogLTgwJTtcblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHR0b3A6IC04MCU7XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHRpcCA9IHN0eWxlZC5zcGFuPCBUb29sdGlwUHJvcHMgPmBcblx0YmFja2dyb3VuZDogcmdiYSggMCwgMCwgMCwgMC44ICk7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRjb2xvcjogd2hpdGU7XG5cdGZvbnQtc2l6ZTogMTJweDtcblx0bWluLXdpZHRoOiAzMnB4O1xuXHRwYWRkaW5nOiA0cHggOHB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRsaW5lLWhlaWdodDogMS40O1xuXG5cdCR7IHRvb2x0aXBTaG93IH07XG5cblx0JHsgdG9vbHRpcFBsYWNlbWVudCB9O1xuXHQkeyBydGwoXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKC01MCUpJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCg1MCUpJyB9XG5cdCkgfVxuYDtcblxuLy8gQHRvZG8gUmVmYWN0b3IgUmFuZ2VDb250cm9sIHdpdGggbGF0ZXN0IEhTdGFjayBjb25maWd1cmF0aW9uXG4vLyBAc2VlOiBwYWNrYWdlcy9jb21wb25lbnRzL3NyYy9oLXN0YWNrXG5leHBvcnQgY29uc3QgSW5wdXROdW1iZXIgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0ZGlzcGxheTogaW5saW5lLWJsb2NrO1xuXHRmb250LXNpemU6IDEzcHg7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0aW5wdXRbdHlwZT0nbnVtYmVyJ10mIHtcblx0XHQkeyByYW5nZUhlaWdodCB9O1xuXHR9XG5cblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IGAkeyBzcGFjZSggNCApIH0gIWltcG9ydGFudGAgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBY3Rpb25SaWdodFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0YnV0dG9uLFxuXHRidXR0b24uaXMtc21hbGwge1xuXHRcdG1hcmdpbi1sZWZ0OiAwO1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogOCB9ICkgfVxuYDtcbiJdfQ== */"));
  var InputNumber = /* @__PURE__ */ createStyled(number_control_default, false ? {
    target: "e1epgpqk1"
  } : {
    target: "e1epgpqk1",
    label: "InputNumber"
  })("display:inline-block;font-size:13px;margin-top:0;input[type='number']&{", rangeHeight, ";}", rtl({
    marginLeft: `${space(4)} !important`
  }), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9Va0QiLCJmaWxlIjoicmFuZ2UtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBOdW1iZXJDb250cm9sIGZyb20gJy4uLy4uL251bWJlci1jb250cm9sJztcbmltcG9ydCB7IENPTE9SUywgcnRsLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuaW1wb3J0IHR5cGUge1xuXHRSYW5nZU1hcmtQcm9wcyxcblx0UmFpbFByb3BzLFxuXHRUaHVtYlByb3BzLFxuXHRUb29sdGlwUHJvcHMsXG5cdFRyYWNrUHJvcHMsXG5cdFdyYXBwZXJQcm9wcyxcblx0UmFuZ2VDb250cm9sUHJvcHMsXG59IGZyb20gJy4uL3R5cGVzJztcblxuY29uc3QgcmFuZ2VIZWlnaHRWYWx1ZSA9IDMwO1xuY29uc3QgcmFpbEhlaWdodCA9IDQ7XG5jb25zdCByYW5nZUhlaWdodCA9ICgpID0+XG5cdGNzcyggeyBoZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUsIG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5jb25zdCB0aHVtYlNpemUgPSAxMjtcblxuY29uc3QgZGVwcmVjYXRlZEhlaWdodCA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBQaWNrPCBSYW5nZUNvbnRyb2xQcm9wcywgJ19fbmV4dDQwcHhEZWZhdWx0U2l6ZScgPiApID0+XG5cdCEgX19uZXh0NDBweERlZmF1bHRTaXplICYmIGNzcyggeyBtaW5IZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUgfSApO1xuXG50eXBlIFJvb3RQcm9wcyA9IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+O1xuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQuZGl2PCBSb290UHJvcHMgPmBcblx0LXdlYmtpdC10YXAtaGlnaGxpZ2h0LWNvbG9yOiB0cmFuc3BhcmVudDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0anVzdGlmeS1jb250ZW50OiBmbGV4LXN0YXJ0O1xuXHRwYWRkaW5nOiAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHRvdWNoLWFjdGlvbjogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdC8qIFRPRE86IHJlbW92ZSBhZnRlciByZW1vdmluZyB0aGUgX19uZXh0NDBweERlZmF1bHRTaXplIHByb3AgKi9cblx0JHsgZGVwcmVjYXRlZEhlaWdodCB9O1xuYDtcblxuY29uc3Qgd3JhcHBlckNvbG9yID0gKCB7IGNvbG9yID0gQ09MT1JTLnVpLmJvcmRlckZvY3VzIH06IFdyYXBwZXJQcm9wcyApID0+XG5cdGNzcyggeyBjb2xvciB9ICk7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkKCAnZGl2Jywge1xuXHRzaG91bGRGb3J3YXJkUHJvcDogKCBwcm9wOiBzdHJpbmcgKSA9PlxuXHRcdCEgWyAnY29sb3InLCAnbWFya3MnIF0uaW5jbHVkZXMoIHByb3AgKSxcbn0gKTwgV3JhcHBlclByb3BzID5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRmbGV4OiAxO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHdpZHRoOiAxMDAlO1xuXG5cdCR7IHdyYXBwZXJDb2xvciB9O1xuXHQkeyByYW5nZUhlaWdodCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEJlZm9yZUljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luUmlnaHQ6IDYgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBZnRlckljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogNiB9ICkgfVxuYDtcblxuY29uc3QgcmFpbEJhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgcmFpbENvbG9yIH06IFJhaWxQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0XHQ6IHJhaWxDb2xvciB8fCBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0gfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6IEdyYXlUZXh0O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBSYWlsID0gc3R5bGVkLnNwYW5gXG5cdGxlZnQ6IDA7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRyaWdodDogMDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdGhlaWdodDogJHsgcmFpbEhlaWdodCB9cHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblxuXHQkeyByYWlsQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5jb25zdCB0cmFja0JhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgdHJhY2tDb2xvciB9OiBUcmFja1Byb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy50aGVtZS5ncmF5WyA0MDAgXVxuXHRcdFx0OiB0cmFja0NvbG9yIHx8ICdjdXJyZW50Q29sb3InIH07XG5cblx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZCA/ICdHcmF5VGV4dCcgOiAnQ2FudmFzVGV4dCcgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVHJhY2sgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdG1hcmdpbi10b3A6ICR7ICggcmFuZ2VIZWlnaHRWYWx1ZSAtIHJhaWxIZWlnaHQgKSAvIDIgfXB4O1xuXHR0b3A6IDA7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IHdpZHRoIGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0cmFja0JhY2tncm91bmRDb2xvciB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmtzV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRtYXJnaW4tdG9wOiAxN3B4O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmsgPSBzdHlsZWQuc3BhbmBcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRsZWZ0OiAwO1xuXHR0b3A6IC00cHg7XG5cdGhlaWdodDogNHB4O1xuXHR3aWR0aDogMnB4O1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoIC01MCUgKTtcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0ei1pbmRleDogMTtcbmA7XG5cbmNvbnN0IG1hcmtMYWJlbEZpbGwgPSAoIHsgaXNGaWxsZWQgfTogUmFuZ2VNYXJrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogaXNGaWxsZWQgPyBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF0gOiBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0sXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBNYXJrTGFiZWwgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRmb250LXNpemU6IDExcHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiA4cHg7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cblx0JHsgcnRsKCB7IGxlZnQ6IDAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC01MCUgKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDUwJSApJyB9XG5cdCkgfTtcblxuXHQkeyBtYXJrTGFiZWxGaWxsIH07XG5gO1xuXG5jb25zdCB0aHVtYkNvbG9yID0gKCB7IGRpc2FibGVkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgfXB4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gdGh1bWJTaXplICkgLyAyIH1weDtcblx0b3V0bGluZTogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHR6LWluZGV4OiAzO1xuXG5cdC5pcy1tYXJrZWQgJiB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHR0cmFuc2l0aW9uOiBsZWZ0IGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiAtMTAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDQuNXB4ICknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKCAtNC41cHggKScgfVxuXHQpIH07XG5gO1xuXG5jb25zdCB0aHVtYkZvY3VzID0gKCB7IGlzRm9jdXNlZCB9OiBUaHVtYlByb3BzICkgPT4ge1xuXHRyZXR1cm4gaXNGb2N1c2VkXG5cdFx0PyBjc3NgXG5cdFx0XHRcdCY6OmJlZm9yZSB7XG5cdFx0XHRcdFx0Y29udGVudDogJyAnO1xuXHRcdFx0XHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRcdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHRcdFx0b3BhY2l0eTogMC40O1xuXHRcdFx0XHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRcdFx0XHRcdGhlaWdodDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0d2lkdGg6ICR7IHRodW1iU2l6ZSArIDggfXB4O1xuXHRcdFx0XHRcdHRvcDogLTRweDtcblx0XHRcdFx0XHRsZWZ0OiAtNHB4O1xuXG5cdFx0XHRcdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0XHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0XHRcdFx0fVxuXHRcdFx0XHR9XG5cdFx0ICBgXG5cdFx0OiAnJztcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYiA9IHN0eWxlZC5zcGFuPCBUaHVtYlByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRoZWlnaHQ6IDEwMCU7XG5cdG91dGxpbmU6IDA7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdHdpZHRoOiAxMDAlO1xuXHRib3gtc2hhZG93OiAkeyBDT05GSUcuZWxldmF0aW9uWFNtYWxsIH07XG5cblx0JHsgdGh1bWJDb2xvciB9O1xuXHQkeyB0aHVtYkZvY3VzIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRSYW5nZSA9IHN0eWxlZC5pbnB1dGBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAxMDAlO1xuXHRsZWZ0OiAwO1xuXHRtYXJnaW46IDAgLSR7IHRodW1iU2l6ZSAvIDIgfXB4O1xuXHRvcGFjaXR5OiAwO1xuXHRvdXRsaW5lOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHJpZ2h0OiAwO1xuXHR0b3A6IDA7XG5cdHdpZHRoOiBjYWxjKCAxMDAlICsgJHsgdGh1bWJTaXplIH1weCApO1xuYDtcblxuY29uc3QgdG9vbHRpcFNob3cgPSAoIHsgc2hvdyB9OiBUb29sdGlwUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0ZGlzcGxheTogJHsgc2hvdyA/ICdpbmxpbmUtYmxvY2snIDogJ25vbmUnIH07XG5cdFx0b3BhY2l0eTogJHsgc2hvdyA/IDEgOiAwIH07XG5cblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246XG5cdFx0XHRcdG9wYWNpdHkgMTIwbXMgZWFzZSxcblx0XHRcdFx0ZGlzcGxheSAxMjBtcyBlYXNlIGFsbG93LWRpc2NyZXRlO1xuXHRcdH1cblxuXHRcdEBzdGFydGluZy1zdHlsZSB7XG5cdFx0XHRvcGFjaXR5OiAwO1xuXHRcdH1cblx0YDtcbn07XG5cbmNvbnN0IHRvb2x0aXBQbGFjZW1lbnQgPSAoIHsgcGxhY2VtZW50IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0Y29uc3QgaXNCb3R0b20gPSBwbGFjZW1lbnQgPT09ICdib3R0b20nO1xuXG5cdGlmICggaXNCb3R0b20gKSB7XG5cdFx0cmV0dXJuIGNzc2Bcblx0XHRcdGJvdHRvbTogLTgwJTtcblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHR0b3A6IC04MCU7XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHRpcCA9IHN0eWxlZC5zcGFuPCBUb29sdGlwUHJvcHMgPmBcblx0YmFja2dyb3VuZDogcmdiYSggMCwgMCwgMCwgMC44ICk7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRjb2xvcjogd2hpdGU7XG5cdGZvbnQtc2l6ZTogMTJweDtcblx0bWluLXdpZHRoOiAzMnB4O1xuXHRwYWRkaW5nOiA0cHggOHB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRsaW5lLWhlaWdodDogMS40O1xuXG5cdCR7IHRvb2x0aXBTaG93IH07XG5cblx0JHsgdG9vbHRpcFBsYWNlbWVudCB9O1xuXHQkeyBydGwoXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKC01MCUpJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCg1MCUpJyB9XG5cdCkgfVxuYDtcblxuLy8gQHRvZG8gUmVmYWN0b3IgUmFuZ2VDb250cm9sIHdpdGggbGF0ZXN0IEhTdGFjayBjb25maWd1cmF0aW9uXG4vLyBAc2VlOiBwYWNrYWdlcy9jb21wb25lbnRzL3NyYy9oLXN0YWNrXG5leHBvcnQgY29uc3QgSW5wdXROdW1iZXIgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0ZGlzcGxheTogaW5saW5lLWJsb2NrO1xuXHRmb250LXNpemU6IDEzcHg7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0aW5wdXRbdHlwZT0nbnVtYmVyJ10mIHtcblx0XHQkeyByYW5nZUhlaWdodCB9O1xuXHR9XG5cblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IGAkeyBzcGFjZSggNCApIH0gIWltcG9ydGFudGAgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBY3Rpb25SaWdodFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0YnV0dG9uLFxuXHRidXR0b24uaXMtc21hbGwge1xuXHRcdG1hcmdpbi1sZWZ0OiAwO1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogOCB9ICkgfVxuYDtcbiJdfQ== */"));
  var ActionRightWrapper = /* @__PURE__ */ createStyled("span", false ? {
    target: "e1epgpqk0"
  } : {
    target: "e1epgpqk0",
    label: "ActionRightWrapper"
  })("display:block;margin-top:0;button,button.is-small{margin-left:0;", rangeHeight, ";}", rtl({
    marginLeft: 8
  }), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJhbmdlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWdWNkMiLCJmaWxlIjoicmFuZ2UtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBOdW1iZXJDb250cm9sIGZyb20gJy4uLy4uL251bWJlci1jb250cm9sJztcbmltcG9ydCB7IENPTE9SUywgcnRsLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuaW1wb3J0IHR5cGUge1xuXHRSYW5nZU1hcmtQcm9wcyxcblx0UmFpbFByb3BzLFxuXHRUaHVtYlByb3BzLFxuXHRUb29sdGlwUHJvcHMsXG5cdFRyYWNrUHJvcHMsXG5cdFdyYXBwZXJQcm9wcyxcblx0UmFuZ2VDb250cm9sUHJvcHMsXG59IGZyb20gJy4uL3R5cGVzJztcblxuY29uc3QgcmFuZ2VIZWlnaHRWYWx1ZSA9IDMwO1xuY29uc3QgcmFpbEhlaWdodCA9IDQ7XG5jb25zdCByYW5nZUhlaWdodCA9ICgpID0+XG5cdGNzcyggeyBoZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUsIG1pbkhlaWdodDogcmFuZ2VIZWlnaHRWYWx1ZSB9ICk7XG5jb25zdCB0aHVtYlNpemUgPSAxMjtcblxuY29uc3QgZGVwcmVjYXRlZEhlaWdodCA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBQaWNrPCBSYW5nZUNvbnRyb2xQcm9wcywgJ19fbmV4dDQwcHhEZWZhdWx0U2l6ZScgPiApID0+XG5cdCEgX19uZXh0NDBweERlZmF1bHRTaXplICYmIGNzcyggeyBtaW5IZWlnaHQ6IHJhbmdlSGVpZ2h0VmFsdWUgfSApO1xuXG50eXBlIFJvb3RQcm9wcyA9IFBpY2s8IFJhbmdlQ29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+O1xuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQuZGl2PCBSb290UHJvcHMgPmBcblx0LXdlYmtpdC10YXAtaGlnaGxpZ2h0LWNvbG9yOiB0cmFuc3BhcmVudDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0anVzdGlmeS1jb250ZW50OiBmbGV4LXN0YXJ0O1xuXHRwYWRkaW5nOiAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHRvdWNoLWFjdGlvbjogbm9uZTtcblx0d2lkdGg6IDEwMCU7XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdC8qIFRPRE86IHJlbW92ZSBhZnRlciByZW1vdmluZyB0aGUgX19uZXh0NDBweERlZmF1bHRTaXplIHByb3AgKi9cblx0JHsgZGVwcmVjYXRlZEhlaWdodCB9O1xuYDtcblxuY29uc3Qgd3JhcHBlckNvbG9yID0gKCB7IGNvbG9yID0gQ09MT1JTLnVpLmJvcmRlckZvY3VzIH06IFdyYXBwZXJQcm9wcyApID0+XG5cdGNzcyggeyBjb2xvciB9ICk7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkKCAnZGl2Jywge1xuXHRzaG91bGRGb3J3YXJkUHJvcDogKCBwcm9wOiBzdHJpbmcgKSA9PlxuXHRcdCEgWyAnY29sb3InLCAnbWFya3MnIF0uaW5jbHVkZXMoIHByb3AgKSxcbn0gKTwgV3JhcHBlclByb3BzID5gXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRmbGV4OiAxO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHdpZHRoOiAxMDAlO1xuXG5cdCR7IHdyYXBwZXJDb2xvciB9O1xuXHQkeyByYW5nZUhlaWdodCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEJlZm9yZUljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luUmlnaHQ6IDYgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBZnRlckljb25XcmFwcGVyID0gc3R5bGVkLnNwYW5gXG5cdGRpc3BsYXk6IGZsZXg7IC8vIGVuc3VyZXMgdGhlIGhlaWdodCBpc24ndCBhZmZlY3RlZCBieSBsaW5lLWhlaWdodFxuXHRtYXJnaW4tdG9wOiAkeyByYWlsSGVpZ2h0IH1weDtcblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogNiB9ICkgfVxuYDtcblxuY29uc3QgcmFpbEJhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgcmFpbENvbG9yIH06IFJhaWxQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZFxuXHRcdFx0PyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkXG5cdFx0XHQ6IHJhaWxDb2xvciB8fCBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0gfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6IEdyYXlUZXh0O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBSYWlsID0gc3R5bGVkLnNwYW5gXG5cdGxlZnQ6IDA7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRyaWdodDogMDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdGhlaWdodDogJHsgcmFpbEhlaWdodCB9cHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gcmFpbEhlaWdodCApIC8gMiB9cHg7XG5cdHRvcDogMDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblxuXHQkeyByYWlsQmFja2dyb3VuZENvbG9yIH07XG5gO1xuXG5jb25zdCB0cmFja0JhY2tncm91bmRDb2xvciA9ICggeyBkaXNhYmxlZCwgdHJhY2tDb2xvciB9OiBUcmFja1Byb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkXG5cdFx0XHQ/IENPTE9SUy50aGVtZS5ncmF5WyA0MDAgXVxuXHRcdFx0OiB0cmFja0NvbG9yIHx8ICdjdXJyZW50Q29sb3InIH07XG5cblx0XHRAbWVkaWEgKCBmb3JjZWQtY29sb3JzOiBhY3RpdmUgKSB7XG5cdFx0XHRiYWNrZ3JvdW5kOiAkeyBkaXNhYmxlZCA/ICdHcmF5VGV4dCcgOiAnQ2FudmFzVGV4dCcgfTtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVHJhY2sgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0aGVpZ2h0OiAkeyByYWlsSGVpZ2h0IH1weDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdG1hcmdpbi10b3A6ICR7ICggcmFuZ2VIZWlnaHRWYWx1ZSAtIHJhaWxIZWlnaHQgKSAvIDIgfXB4O1xuXHR0b3A6IDA7XG5cblx0LmlzLW1hcmtlZCAmIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246IHdpZHRoIGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0cmFja0JhY2tncm91bmRDb2xvciB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmtzV3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBibG9jaztcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRtYXJnaW4tdG9wOiAxN3B4O1xuYDtcblxuZXhwb3J0IGNvbnN0IE1hcmsgPSBzdHlsZWQuc3BhbmBcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRsZWZ0OiAwO1xuXHR0b3A6IC00cHg7XG5cdGhlaWdodDogNHB4O1xuXHR3aWR0aDogMnB4O1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoIC01MCUgKTtcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0ei1pbmRleDogMTtcbmA7XG5cbmNvbnN0IG1hcmtMYWJlbEZpbGwgPSAoIHsgaXNGaWxsZWQgfTogUmFuZ2VNYXJrUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3MoIHtcblx0XHRjb2xvcjogaXNGaWxsZWQgPyBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF0gOiBDT0xPUlMudGhlbWUuZ3JheVsgMzAwIF0sXG5cdH0gKTtcbn07XG5cbmV4cG9ydCBjb25zdCBNYXJrTGFiZWwgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRmb250LXNpemU6IDExcHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiA4cHg7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cblx0JHsgcnRsKCB7IGxlZnQ6IDAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIC01MCUgKScgfSxcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDUwJSApJyB9XG5cdCkgfTtcblxuXHQkeyBtYXJrTGFiZWxGaWxsIH07XG5gO1xuXG5jb25zdCB0aHVtYkNvbG9yID0gKCB7IGRpc2FibGVkIH06IFRodW1iUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogJHsgZGlzYWJsZWRcblx0XHRcdD8gQ09MT1JTLnRoZW1lLmdyYXlbIDQwMCBdXG5cdFx0XHQ6IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdEBtZWRpYSAoIGZvcmNlZC1jb2xvcnM6IGFjdGl2ZSApIHtcblx0XHRcdGJhY2tncm91bmQ6ICR7IGRpc2FibGVkID8gJ0dyYXlUZXh0JyA6ICdDYW52YXNUZXh0JyB9O1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYldyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZGlzcGxheTogZmxleDtcblx0aGVpZ2h0OiAkeyB0aHVtYlNpemUgfXB4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0bWFyZ2luLXRvcDogJHsgKCByYW5nZUhlaWdodFZhbHVlIC0gdGh1bWJTaXplICkgLyAyIH1weDtcblx0b3V0bGluZTogMDtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHR1c2VyLXNlbGVjdDogbm9uZTtcblx0d2lkdGg6ICR7IHRodW1iU2l6ZSB9cHg7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHR6LWluZGV4OiAzO1xuXG5cdC5pcy1tYXJrZWQgJiB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHR0cmFuc2l0aW9uOiBsZWZ0IGVhc2UgMC4xcztcblx0XHR9XG5cdH1cblxuXHQkeyB0aHVtYkNvbG9yIH07XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiAtMTAgfSApIH07XG5cdCR7IHJ0bChcblx0XHR7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoIDQuNXB4ICknIH0sXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKCAtNC41cHggKScgfVxuXHQpIH07XG5gO1xuXG5jb25zdCB0aHVtYkZvY3VzID0gKCB7IGlzRm9jdXNlZCB9OiBUaHVtYlByb3BzICkgPT4ge1xuXHRyZXR1cm4gaXNGb2N1c2VkXG5cdFx0PyBjc3NgXG5cdFx0XHRcdCY6OmJlZm9yZSB7XG5cdFx0XHRcdFx0Y29udGVudDogJyAnO1xuXHRcdFx0XHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRcdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHRcdFx0b3BhY2l0eTogMC40O1xuXHRcdFx0XHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRcdFx0XHRcdGhlaWdodDogJHsgdGh1bWJTaXplICsgOCB9cHg7XG5cdFx0XHRcdFx0d2lkdGg6ICR7IHRodW1iU2l6ZSArIDggfXB4O1xuXHRcdFx0XHRcdHRvcDogLTRweDtcblx0XHRcdFx0XHRsZWZ0OiAtNHB4O1xuXG5cdFx0XHRcdFx0QG1lZGlhICggZm9yY2VkLWNvbG9yczogYWN0aXZlICkge1xuXHRcdFx0XHRcdFx0YmFja2dyb3VuZDogR3JheVRleHQ7XG5cdFx0XHRcdFx0fVxuXHRcdFx0XHR9XG5cdFx0ICBgXG5cdFx0OiAnJztcbn07XG5cbmV4cG9ydCBjb25zdCBUaHVtYiA9IHN0eWxlZC5zcGFuPCBUaHVtYlByb3BzID5gXG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRoZWlnaHQ6IDEwMCU7XG5cdG91dGxpbmU6IDA7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdHdpZHRoOiAxMDAlO1xuXHRib3gtc2hhZG93OiAkeyBDT05GSUcuZWxldmF0aW9uWFNtYWxsIH07XG5cblx0JHsgdGh1bWJDb2xvciB9O1xuXHQkeyB0aHVtYkZvY3VzIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRSYW5nZSA9IHN0eWxlZC5pbnB1dGBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXHRkaXNwbGF5OiBibG9jaztcblx0aGVpZ2h0OiAxMDAlO1xuXHRsZWZ0OiAwO1xuXHRtYXJnaW46IDAgLSR7IHRodW1iU2l6ZSAvIDIgfXB4O1xuXHRvcGFjaXR5OiAwO1xuXHRvdXRsaW5lOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHJpZ2h0OiAwO1xuXHR0b3A6IDA7XG5cdHdpZHRoOiBjYWxjKCAxMDAlICsgJHsgdGh1bWJTaXplIH1weCApO1xuYDtcblxuY29uc3QgdG9vbHRpcFNob3cgPSAoIHsgc2hvdyB9OiBUb29sdGlwUHJvcHMgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0ZGlzcGxheTogJHsgc2hvdyA/ICdpbmxpbmUtYmxvY2snIDogJ25vbmUnIH07XG5cdFx0b3BhY2l0eTogJHsgc2hvdyA/IDEgOiAwIH07XG5cblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdHRyYW5zaXRpb246XG5cdFx0XHRcdG9wYWNpdHkgMTIwbXMgZWFzZSxcblx0XHRcdFx0ZGlzcGxheSAxMjBtcyBlYXNlIGFsbG93LWRpc2NyZXRlO1xuXHRcdH1cblxuXHRcdEBzdGFydGluZy1zdHlsZSB7XG5cdFx0XHRvcGFjaXR5OiAwO1xuXHRcdH1cblx0YDtcbn07XG5cbmNvbnN0IHRvb2x0aXBQbGFjZW1lbnQgPSAoIHsgcGxhY2VtZW50IH06IFRvb2x0aXBQcm9wcyApID0+IHtcblx0Y29uc3QgaXNCb3R0b20gPSBwbGFjZW1lbnQgPT09ICdib3R0b20nO1xuXG5cdGlmICggaXNCb3R0b20gKSB7XG5cdFx0cmV0dXJuIGNzc2Bcblx0XHRcdGJvdHRvbTogLTgwJTtcblx0XHRgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHR0b3A6IC04MCU7XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHRpcCA9IHN0eWxlZC5zcGFuPCBUb29sdGlwUHJvcHMgPmBcblx0YmFja2dyb3VuZDogcmdiYSggMCwgMCwgMCwgMC44ICk7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRjb2xvcjogd2hpdGU7XG5cdGZvbnQtc2l6ZTogMTJweDtcblx0bWluLXdpZHRoOiAzMnB4O1xuXHRwYWRkaW5nOiA0cHggOHB4O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRsaW5lLWhlaWdodDogMS40O1xuXG5cdCR7IHRvb2x0aXBTaG93IH07XG5cblx0JHsgdG9vbHRpcFBsYWNlbWVudCB9O1xuXHQkeyBydGwoXG5cdFx0eyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKC01MCUpJyB9LFxuXHRcdHsgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCg1MCUpJyB9XG5cdCkgfVxuYDtcblxuLy8gQHRvZG8gUmVmYWN0b3IgUmFuZ2VDb250cm9sIHdpdGggbGF0ZXN0IEhTdGFjayBjb25maWd1cmF0aW9uXG4vLyBAc2VlOiBwYWNrYWdlcy9jb21wb25lbnRzL3NyYy9oLXN0YWNrXG5leHBvcnQgY29uc3QgSW5wdXROdW1iZXIgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0ZGlzcGxheTogaW5saW5lLWJsb2NrO1xuXHRmb250LXNpemU6IDEzcHg7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0aW5wdXRbdHlwZT0nbnVtYmVyJ10mIHtcblx0XHQkeyByYW5nZUhlaWdodCB9O1xuXHR9XG5cblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IGAkeyBzcGFjZSggNCApIH0gIWltcG9ydGFudGAgfSApIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBBY3Rpb25SaWdodFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1hcmdpbi10b3A6IDA7XG5cblx0YnV0dG9uLFxuXHRidXR0b24uaXMtc21hbGwge1xuXHRcdG1hcmdpbi1sZWZ0OiAwO1xuXHRcdCR7IHJhbmdlSGVpZ2h0IH07XG5cdH1cblxuXHQkeyBydGwoIHsgbWFyZ2luTGVmdDogOCB9ICkgfVxuYDtcbiJdfQ== */"));

  // packages/components/build-module/range-control/input-range.mjs
  var import_jsx_runtime125 = __toESM(require_jsx_runtime(), 1);
  function InputRange2(props, ref) {
    const {
      describedBy,
      label,
      value,
      ...otherProps
    } = props;
    return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(InputRange, {
      ...otherProps,
      "aria-describedby": describedBy,
      "aria-label": label,
      "aria-hidden": false,
      ref,
      tabIndex: 0,
      type: "range",
      value
    });
  }
  var ForwardedComponent2 = (0, import_element70.forwardRef)(InputRange2);
  var input_range_default = ForwardedComponent2;

  // packages/components/build-module/range-control/rail.mjs
  var import_i18n12 = __toESM(require_i18n(), 1);

  // packages/components/build-module/range-control/mark.mjs
  var import_jsx_runtime126 = __toESM(require_jsx_runtime(), 1);
  function RangeMark(props) {
    const {
      className: className2,
      isFilled = false,
      label,
      style: style2 = {},
      ...otherProps
    } = props;
    const classes = clsx_default("components-range-control__mark", isFilled && "is-filled", className2);
    const labelClasses = clsx_default("components-range-control__mark-label", isFilled && "is-filled");
    return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_jsx_runtime126.Fragment, {
      children: [/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Mark, {
        ...otherProps,
        "aria-hidden": "true",
        className: classes,
        style: style2
      }), label && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(MarkLabel, {
        "aria-hidden": "true",
        className: labelClasses,
        isFilled,
        style: style2,
        children: label
      })]
    });
  }

  // packages/components/build-module/range-control/rail.mjs
  var import_jsx_runtime127 = __toESM(require_jsx_runtime(), 1);
  var import_react103 = __toESM(require_react(), 1);
  function RangeRail(props) {
    const {
      disabled = false,
      marks = false,
      min: min3 = 0,
      max: max3 = 100,
      step = 1,
      value = 0,
      ...restProps
    } = props;
    return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_jsx_runtime127.Fragment, {
      children: [/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Rail, {
        disabled,
        ...restProps
      }), marks && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Marks, {
        disabled,
        marks,
        min: min3,
        max: max3,
        step,
        value
      })]
    });
  }
  function Marks(props) {
    const {
      disabled = false,
      marks = false,
      min: min3 = 0,
      max: max3 = 100,
      step: stepProp = 1,
      value = 0
    } = props;
    const step = stepProp === "any" ? 1 : stepProp;
    const marksData = useMarks({
      marks,
      min: min3,
      max: max3,
      step,
      value
    });
    return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(MarksWrapper, {
      "aria-hidden": "true",
      className: "components-range-control__marks",
      children: marksData.map((mark) => /* @__PURE__ */ (0, import_react103.createElement)(RangeMark, {
        ...mark,
        key: mark.key,
        "aria-hidden": "true",
        disabled
      }))
    });
  }
  function useMarks({
    marks,
    min: min3 = 0,
    max: max3 = 100,
    step = 1,
    value = 0
  }) {
    if (!marks) {
      return [];
    }
    const range = max3 - min3;
    if (!Array.isArray(marks)) {
      marks = [];
      const count = 1 + Math.round(range / step);
      while (count > marks.push({
        value: step * marks.length + min3
      })) {
      }
    }
    const placedMarks = [];
    marks.forEach((mark, index2) => {
      if (mark.value < min3 || mark.value > max3) {
        return;
      }
      const key = `mark-${index2}`;
      const isFilled = mark.value <= value;
      const offset3 = `${(mark.value - min3) / range * 100}%`;
      const offsetStyle = {
        [(0, import_i18n12.isRTL)() ? "right" : "left"]: offset3
      };
      placedMarks.push({
        ...mark,
        isFilled,
        key,
        style: offsetStyle
      });
    });
    return placedMarks;
  }

  // packages/components/build-module/range-control/tooltip.mjs
  var import_element71 = __toESM(require_element(), 1);
  var import_jsx_runtime128 = __toESM(require_jsx_runtime(), 1);
  function SimpleTooltip(props) {
    const {
      className: className2,
      inputRef,
      tooltipPlacement: tooltipPlacement2,
      show = false,
      style: style2 = {},
      value = 0,
      renderTooltipContent = (v3) => v3,
      zIndex = 100,
      ...restProps
    } = props;
    const placement = useTooltipPlacement({
      inputRef,
      tooltipPlacement: tooltipPlacement2
    });
    const classes = clsx_default("components-simple-tooltip", className2);
    const styles3 = {
      ...style2,
      zIndex
    };
    return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Tooltip3, {
      ...restProps,
      "aria-hidden": "false",
      className: classes,
      placement,
      show,
      role: "tooltip",
      style: styles3,
      children: renderTooltipContent(value)
    });
  }
  function useTooltipPlacement({
    inputRef,
    tooltipPlacement: tooltipPlacement2
  }) {
    const [placement, setPlacement] = (0, import_element71.useState)();
    const setTooltipPlacement = (0, import_element71.useCallback)(() => {
      if (inputRef && inputRef.current) {
        setPlacement(tooltipPlacement2);
      }
    }, [tooltipPlacement2, inputRef]);
    (0, import_element71.useEffect)(() => {
      setTooltipPlacement();
    }, [setTooltipPlacement]);
    (0, import_element71.useEffect)(() => {
      window.addEventListener("resize", setTooltipPlacement);
      return () => {
        window.removeEventListener("resize", setTooltipPlacement);
      };
    });
    return placement;
  }

  // packages/components/build-module/range-control/index.mjs
  var import_jsx_runtime129 = __toESM(require_jsx_runtime(), 1);
  var noop7 = () => {
  };
  function computeResetValue({
    resetFallbackValue,
    initialPosition
  }) {
    if (resetFallbackValue !== void 0) {
      return !Number.isNaN(resetFallbackValue) ? resetFallbackValue : null;
    }
    if (initialPosition !== void 0) {
      return !Number.isNaN(initialPosition) ? initialPosition : null;
    }
    return null;
  }
  function UnforwardedRangeControl(props, forwardedRef) {
    const {
      __nextHasNoMarginBottom: _2,
      // Prevent passing to internal component
      afterIcon,
      allowReset = false,
      beforeIcon,
      className: className2,
      color: colorProp = COLORS.theme.accent,
      currentInput,
      disabled = false,
      help,
      hideLabelFromVision = false,
      initialPosition,
      isShiftStepEnabled = true,
      label,
      marks = false,
      max: max3 = 100,
      min: min3 = 0,
      onBlur = noop7,
      onChange = noop7,
      onFocus = noop7,
      onMouseLeave = noop7,
      onMouseMove = noop7,
      railColor,
      renderTooltipContent = (v3) => v3,
      resetFallbackValue,
      __next40pxDefaultSize = false,
      shiftStep = 10,
      showTooltip: showTooltipProp,
      step = 1,
      trackColor,
      value: valueProp,
      withInputField = true,
      __shouldNotWarnDeprecated36pxSize,
      ...otherProps
    } = props;
    const [value, setValue] = useControlledRangeValue({
      min: min3,
      max: max3,
      value: valueProp ?? null,
      initial: initialPosition
    });
    const isResetPendent = (0, import_element72.useRef)(false);
    let hasTooltip = showTooltipProp;
    let hasInputField = withInputField;
    if (step === "any") {
      hasTooltip = false;
      hasInputField = false;
    }
    const [showTooltip, setShowTooltip] = (0, import_element72.useState)(hasTooltip);
    const [isFocused, setIsFocused] = (0, import_element72.useState)(false);
    const inputRef = (0, import_element72.useRef)(null);
    const isCurrentlyFocused = inputRef.current?.matches(":focus");
    const isThumbFocused = !disabled && isFocused;
    const isValueReset = value === null;
    const currentValue = value !== void 0 ? value : currentInput;
    const inputSliderValue = isValueReset ? "" : currentValue;
    const rangeFillValue = isValueReset ? (max3 - min3) / 2 + min3 : value;
    const fillValue = isValueReset ? 50 : (value - min3) / (max3 - min3) * 100;
    const fillValueOffset = `${clamp4(fillValue, 0, 100)}%`;
    const classes = clsx_default("components-range-control", className2);
    const wrapperClasses = clsx_default("components-range-control__wrapper", !!marks && "is-marked");
    const id3 = (0, import_compose29.useInstanceId)(UnforwardedRangeControl, "inspector-range-control");
    const describedBy = !!help ? `${id3}__help` : void 0;
    const enableTooltip = hasTooltip !== false && Number.isFinite(value);
    const handleOnRangeChange = (event) => {
      const nextValue = parseFloat(event.target.value);
      setValue(nextValue);
      onChange(nextValue);
    };
    const handleOnChange = (next2) => {
      let nextValue = parseFloat(next2);
      setValue(nextValue);
      if (!isNaN(nextValue)) {
        if (nextValue < min3 || nextValue > max3) {
          nextValue = floatClamp(nextValue, min3, max3);
        }
        onChange(nextValue);
        isResetPendent.current = false;
      } else if (allowReset) {
        isResetPendent.current = true;
      }
    };
    const handleOnInputNumberBlur = () => {
      if (isResetPendent.current) {
        handleOnReset();
        isResetPendent.current = false;
      }
    };
    const handleOnReset = () => {
      const resetValue = Number.isNaN(resetFallbackValue) ? null : resetFallbackValue ?? null;
      setValue(resetValue);
      onChange(resetValue ?? void 0);
    };
    const handleShowTooltip = () => setShowTooltip(true);
    const handleHideTooltip = () => setShowTooltip(false);
    const handleOnBlur = (event) => {
      onBlur(event);
      setIsFocused(false);
      handleHideTooltip();
    };
    const handleOnFocus = (event) => {
      onFocus(event);
      setIsFocused(true);
      handleShowTooltip();
    };
    const offsetStyle = {
      [(0, import_i18n13.isRTL)() ? "right" : "left"]: fillValueOffset
    };
    maybeWarnDeprecated36pxSize({
      componentName: "RangeControl",
      __next40pxDefaultSize,
      size: void 0,
      __shouldNotWarnDeprecated36pxSize
    });
    return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(base_control_default, {
      className: classes,
      label,
      hideLabelFromVision,
      id: `${id3}`,
      help,
      children: /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(Root2, {
        className: "components-range-control__root",
        __next40pxDefaultSize,
        children: [beforeIcon && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(BeforeIconWrapper, {
          children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(icon_default3, {
            icon: beforeIcon
          })
        }), /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(Wrapper2, {
          className: wrapperClasses,
          color: colorProp,
          marks: !!marks,
          children: [/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(input_range_default, {
            ...otherProps,
            className: "components-range-control__slider",
            describedBy,
            disabled,
            id: `${id3}`,
            label,
            max: max3,
            min: min3,
            onBlur: handleOnBlur,
            onChange: handleOnRangeChange,
            onFocus: handleOnFocus,
            onMouseMove,
            onMouseLeave,
            ref: (0, import_compose29.useMergeRefs)([inputRef, forwardedRef]),
            step,
            value: inputSliderValue ?? void 0
          }), /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(RangeRail, {
            "aria-hidden": true,
            disabled,
            marks,
            max: max3,
            min: min3,
            railColor,
            step,
            value: rangeFillValue
          }), /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Track, {
            "aria-hidden": true,
            className: "components-range-control__track",
            disabled,
            style: {
              width: fillValueOffset
            },
            trackColor
          }), /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(ThumbWrapper, {
            className: "components-range-control__thumb-wrapper",
            style: offsetStyle,
            disabled,
            children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Thumb, {
              "aria-hidden": true,
              isFocused: isThumbFocused,
              disabled
            })
          }), enableTooltip && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(SimpleTooltip, {
            className: "components-range-control__tooltip",
            inputRef,
            tooltipPlacement: "bottom",
            renderTooltipContent,
            show: isCurrentlyFocused || showTooltip,
            style: offsetStyle,
            value
          })]
        }), afterIcon && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(AfterIconWrapper, {
          children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(icon_default3, {
            icon: afterIcon
          })
        }), hasInputField && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(InputNumber, {
          "aria-label": label,
          className: "components-range-control__number",
          disabled,
          inputMode: "decimal",
          isShiftStepEnabled,
          max: max3,
          min: min3,
          onBlur: handleOnInputNumberBlur,
          onChange: handleOnChange,
          shiftStep,
          size: __next40pxDefaultSize ? "__unstable-large" : "default",
          __unstableInputWidth: __next40pxDefaultSize ? space(20) : space(16),
          step,
          value: inputSliderValue,
          __shouldNotWarnDeprecated36pxSize: true
        }), allowReset && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(ActionRightWrapper, {
          children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(button_default, {
            className: "components-range-control__reset",
            accessibleWhenDisabled: !disabled,
            disabled: disabled || value === computeResetValue({
              resetFallbackValue,
              initialPosition
            }),
            variant: "secondary",
            size: "small",
            onClick: handleOnReset,
            children: (0, import_i18n13.__)("Reset")
          })
        })]
      })
    });
  }
  var RangeControl = (0, import_element72.forwardRef)(UnforwardedRangeControl);
  RangeControl.displayName = "RangeControl";
  var range_control_default = RangeControl;

  // packages/components/build-module/color-picker/styles.mjs
  var NumberControlWrapper = /* @__PURE__ */ createStyled(number_control_default, false ? {
    target: "ez9hsf46"
  } : {
    target: "ez9hsf46",
    label: "NumberControlWrapper"
  })("width:", space(24), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQjJEIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IE51bWJlckNvbnRyb2wgZnJvbSAnLi4vbnVtYmVyLWNvbnRyb2wnO1xuaW1wb3J0IElubmVyU2VsZWN0Q29udHJvbCBmcm9tICcuLi9zZWxlY3QtY29udHJvbCc7XG5pbXBvcnQgSW5uZXJSYW5nZUNvbnRyb2wgZnJvbSAnLi4vcmFuZ2UtY29udHJvbCc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IGJveFNpemluZ1Jlc2V0IH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgRmxleCB9IGZyb20gJy4uL2ZsZXgnO1xuaW1wb3J0IHsgSFN0YWNrIH0gZnJvbSAnLi4vaC1zdGFjayc7XG5pbXBvcnQgQ09ORklHIGZyb20gJy4uL3V0aWxzL2NvbmZpZy12YWx1ZXMnO1xuXG5leHBvcnQgY29uc3QgTnVtYmVyQ29udHJvbFdyYXBwZXIgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0d2lkdGg6ICR7IHNwYWNlKCAyNCApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0Q29udHJvbCA9IHN0eWxlZCggSW5uZXJTZWxlY3RDb250cm9sIClgXG5cdG1hcmdpbi1sZWZ0OiAkeyBzcGFjZSggLTIgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFJhbmdlQ29udHJvbCA9IHN0eWxlZCggSW5uZXJSYW5nZUNvbnRyb2wgKWBcblx0ZmxleDogMTtcblx0bWFyZ2luLXJpZ2h0OiAkeyBzcGFjZSggMiApIH07XG5gO1xuXG4vLyBNYWtlIHRoZSBIdWUgY2lyY2xlIHBpY2tlciBub3QgZ28gb3V0IG9mIHRoZSBiYXIuXG5jb25zdCBpbnRlcmFjdGl2ZUh1ZVN0eWxlcyA9IGBcbi5yZWFjdC1jb2xvcmZ1bF9faW50ZXJhY3RpdmUge1xuXHR3aWR0aDogY2FsYyggMTAwJSAtICR7IHNwYWNlKCAyICkgfSApO1xuXHRtYXJnaW4tbGVmdDogJHsgc3BhY2UoIDEgKSB9O1xufWA7XG5cbmV4cG9ydCBjb25zdCBBdXhpbGlhcnlDb2xvckFydGVmYWN0V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdHBhZGRpbmctdG9wOiAkeyBzcGFjZSggMiApIH07XG5cdHBhZGRpbmctcmlnaHQ6IDA7XG5cdHBhZGRpbmctbGVmdDogMDtcblx0cGFkZGluZy1ib3R0b206IDA7XG5gO1xuXG5leHBvcnQgY29uc3QgQXV4aWxpYXJ5Q29sb3JBcnRlZmFjdEhTdGFja0hlYWRlciA9IHN0eWxlZCggSFN0YWNrIClgXG5cdHBhZGRpbmctbGVmdDogJHsgc3BhY2UoIDQgKSB9O1xuXHRwYWRkaW5nLXJpZ2h0OiAkeyBzcGFjZSggNCApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgQ29sb3JJbnB1dFdyYXBwZXIgPSBzdHlsZWQoIEZsZXggKWBcblx0cGFkZGluZy10b3A6ICR7IHNwYWNlKCA0ICkgfTtcblx0cGFkZGluZy1sZWZ0OiAkeyBzcGFjZSggNCApIH07XG5cdHBhZGRpbmctcmlnaHQ6ICR7IHNwYWNlKCAzICkgfTtcblx0cGFkZGluZy1ib3R0b206ICR7IHNwYWNlKCA1ICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBDb2xvcmZ1bFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQkeyBib3hTaXppbmdSZXNldCB9O1xuXG5cdHdpZHRoOiAyMTZweDtcblxuXHQucmVhY3QtY29sb3JmdWwge1xuXHRcdGRpc3BsYXk6IGZsZXg7XG5cdFx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRcdHdpZHRoOiAyMTZweDtcblx0XHRoZWlnaHQ6IGF1dG87XG5cdH1cblxuXHQucmVhY3QtY29sb3JmdWxfX3NhdHVyYXRpb24ge1xuXHRcdHdpZHRoOiAxMDAlO1xuXHRcdGJvcmRlci1yYWRpdXM6IDA7XG5cdFx0aGVpZ2h0OiAyMTZweDtcblx0XHRtYXJnaW4tYm90dG9tOiAkeyBzcGFjZSggNCApIH07XG5cdFx0Ym9yZGVyLWJvdHRvbTogbm9uZTtcblx0fVxuXG5cdC5yZWFjdC1jb2xvcmZ1bF9faHVlLFxuXHQucmVhY3QtY29sb3JmdWxfX2FscGhhIHtcblx0XHR3aWR0aDogMTg0cHg7XG5cdFx0aGVpZ2h0OiAxNnB4O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNGdWxsIH07XG5cdFx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDIgKSB9O1xuXHR9XG5cblx0LnJlYWN0LWNvbG9yZnVsX19wb2ludGVyIHtcblx0XHRoZWlnaHQ6IDE2cHg7XG5cdFx0d2lkdGg6IDE2cHg7XG5cdFx0Ym9yZGVyOiBub25lO1xuXHRcdGJveC1zaGFkb3c6IDAgMCAycHggMCByZ2JhKCAwLCAwLCAwLCAwLjI1ICk7XG5cblx0XHQvLyBTaG93biBpbnN0ZWFkIG9mIGJveC1zaGFkb3cgdG8gV2luZG93cyBoaWdoIGNvbnRyYXN0IG1vZGUuXG5cdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHR0cmFuc2l0aW9uOiB0cmFuc2Zvcm0gJHsgQ09ORklHLnRyYW5zaXRpb25EdXJhdGlvbkZhc3QgfSBlYXNlLWluLW91dDtcblx0XHR9XG5cdH1cblxuXHQucmVhY3QtY29sb3JmdWxfX2ludGVyYWN0aXZlOmZvY3VzIC5yZWFjdC1jb2xvcmZ1bF9fcG9pbnRlciB7XG5cdFx0Ym94LXNoYWRvdzogMCAwIDAgJHsgQ09ORklHLmJvcmRlcldpZHRoRm9jdXMgfSAkeyBDT05GSUcuc3VyZmFjZUNvbG9yIH07XG5cdFx0Ym9yZGVyOiAkeyBDT05GSUcuYm9yZGVyV2lkdGhGb2N1cyB9IHNvbGlkIGJsYWNrO1xuXHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlKCAtNTAlLCAtNTAlICkgc2NhbGUoIDEuNSApO1xuXHR9XG5cblx0LnJlYWN0LWNvbG9yZnVsX19wb2ludGVyLWZpbGwge1xuXHRcdGJveC1zaGFkb3c6IGluc2V0IDAgMCAwICR7IENPTkZJRy5ib3JkZXJXaWR0aEZvY3VzIH0gI2ZmZjtcblx0fVxuXG5cdCR7IGludGVyYWN0aXZlSHVlU3R5bGVzIH1cbmA7XG4iXX0= */"));
  var SelectControl2 = /* @__PURE__ */ createStyled(select_control_default, false ? {
    target: "ez9hsf45"
  } : {
    target: "ez9hsf45",
    label: "SelectControl"
  })("margin-left:", space(-2), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQnlEIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IE51bWJlckNvbnRyb2wgZnJvbSAnLi4vbnVtYmVyLWNvbnRyb2wnO1xuaW1wb3J0IElubmVyU2VsZWN0Q29udHJvbCBmcm9tICcuLi9zZWxlY3QtY29udHJvbCc7XG5pbXBvcnQgSW5uZXJSYW5nZUNvbnRyb2wgZnJvbSAnLi4vcmFuZ2UtY29udHJvbCc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IGJveFNpemluZ1Jlc2V0IH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgRmxleCB9IGZyb20gJy4uL2ZsZXgnO1xuaW1wb3J0IHsgSFN0YWNrIH0gZnJvbSAnLi4vaC1zdGFjayc7XG5pbXBvcnQgQ09ORklHIGZyb20gJy4uL3V0aWxzL2NvbmZpZy12YWx1ZXMnO1xuXG5leHBvcnQgY29uc3QgTnVtYmVyQ29udHJvbFdyYXBwZXIgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0d2lkdGg6ICR7IHNwYWNlKCAyNCApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0Q29udHJvbCA9IHN0eWxlZCggSW5uZXJTZWxlY3RDb250cm9sIClgXG5cdG1hcmdpbi1sZWZ0OiAkeyBzcGFjZSggLTIgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFJhbmdlQ29udHJvbCA9IHN0eWxlZCggSW5uZXJSYW5nZUNvbnRyb2wgKWBcblx0ZmxleDogMTtcblx0bWFyZ2luLXJpZ2h0OiAkeyBzcGFjZSggMiApIH07XG5gO1xuXG4vLyBNYWtlIHRoZSBIdWUgY2lyY2xlIHBpY2tlciBub3QgZ28gb3V0IG9mIHRoZSBiYXIuXG5jb25zdCBpbnRlcmFjdGl2ZUh1ZVN0eWxlcyA9IGBcbi5yZWFjdC1jb2xvcmZ1bF9faW50ZXJhY3RpdmUge1xuXHR3aWR0aDogY2FsYyggMTAwJSAtICR7IHNwYWNlKCAyICkgfSApO1xuXHRtYXJnaW4tbGVmdDogJHsgc3BhY2UoIDEgKSB9O1xufWA7XG5cbmV4cG9ydCBjb25zdCBBdXhpbGlhcnlDb2xvckFydGVmYWN0V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdHBhZGRpbmctdG9wOiAkeyBzcGFjZSggMiApIH07XG5cdHBhZGRpbmctcmlnaHQ6IDA7XG5cdHBhZGRpbmctbGVmdDogMDtcblx0cGFkZGluZy1ib3R0b206IDA7XG5gO1xuXG5leHBvcnQgY29uc3QgQXV4aWxpYXJ5Q29sb3JBcnRlZmFjdEhTdGFja0hlYWRlciA9IHN0eWxlZCggSFN0YWNrIClgXG5cdHBhZGRpbmctbGVmdDogJHsgc3BhY2UoIDQgKSB9O1xuXHRwYWRkaW5nLXJpZ2h0OiAkeyBzcGFjZSggNCApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgQ29sb3JJbnB1dFdyYXBwZXIgPSBzdHlsZWQoIEZsZXggKWBcblx0cGFkZGluZy10b3A6ICR7IHNwYWNlKCA0ICkgfTtcblx0cGFkZGluZy1sZWZ0OiAkeyBzcGFjZSggNCApIH07XG5cdHBhZGRpbmctcmlnaHQ6ICR7IHNwYWNlKCAzICkgfTtcblx0cGFkZGluZy1ib3R0b206ICR7IHNwYWNlKCA1ICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBDb2xvcmZ1bFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQkeyBib3hTaXppbmdSZXNldCB9O1xuXG5cdHdpZHRoOiAyMTZweDtcblxuXHQucmVhY3QtY29sb3JmdWwge1xuXHRcdGRpc3BsYXk6IGZsZXg7XG5cdFx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRcdHdpZHRoOiAyMTZweDtcblx0XHRoZWlnaHQ6IGF1dG87XG5cdH1cblxuXHQucmVhY3QtY29sb3JmdWxfX3NhdHVyYXRpb24ge1xuXHRcdHdpZHRoOiAxMDAlO1xuXHRcdGJvcmRlci1yYWRpdXM6IDA7XG5cdFx0aGVpZ2h0OiAyMTZweDtcblx0XHRtYXJnaW4tYm90dG9tOiAkeyBzcGFjZSggNCApIH07XG5cdFx0Ym9yZGVyLWJvdHRvbTogbm9uZTtcblx0fVxuXG5cdC5yZWFjdC1jb2xvcmZ1bF9faHVlLFxuXHQucmVhY3QtY29sb3JmdWxfX2FscGhhIHtcblx0XHR3aWR0aDogMTg0cHg7XG5cdFx0aGVpZ2h0OiAxNnB4O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNGdWxsIH07XG5cdFx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDIgKSB9O1xuXHR9XG5cblx0LnJlYWN0LWNvbG9yZnVsX19wb2ludGVyIHtcblx0XHRoZWlnaHQ6IDE2cHg7XG5cdFx0d2lkdGg6IDE2cHg7XG5cdFx0Ym9yZGVyOiBub25lO1xuXHRcdGJveC1zaGFkb3c6IDAgMCAycHggMCByZ2JhKCAwLCAwLCAwLCAwLjI1ICk7XG5cblx0XHQvLyBTaG93biBpbnN0ZWFkIG9mIGJveC1zaGFkb3cgdG8gV2luZG93cyBoaWdoIGNvbnRyYXN0IG1vZGUuXG5cdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHR0cmFuc2l0aW9uOiB0cmFuc2Zvcm0gJHsgQ09ORklHLnRyYW5zaXRpb25EdXJhdGlvbkZhc3QgfSBlYXNlLWluLW91dDtcblx0XHR9XG5cdH1cblxuXHQucmVhY3QtY29sb3JmdWxfX2ludGVyYWN0aXZlOmZvY3VzIC5yZWFjdC1jb2xvcmZ1bF9fcG9pbnRlciB7XG5cdFx0Ym94LXNoYWRvdzogMCAwIDAgJHsgQ09ORklHLmJvcmRlcldpZHRoRm9jdXMgfSAkeyBDT05GSUcuc3VyZmFjZUNvbG9yIH07XG5cdFx0Ym9yZGVyOiAkeyBDT05GSUcuYm9yZGVyV2lkdGhGb2N1cyB9IHNvbGlkIGJsYWNrO1xuXHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlKCAtNTAlLCAtNTAlICkgc2NhbGUoIDEuNSApO1xuXHR9XG5cblx0LnJlYWN0LWNvbG9yZnVsX19wb2ludGVyLWZpbGwge1xuXHRcdGJveC1zaGFkb3c6IGluc2V0IDAgMCAwICR7IENPTkZJRy5ib3JkZXJXaWR0aEZvY3VzIH0gI2ZmZjtcblx0fVxuXG5cdCR7IGludGVyYWN0aXZlSHVlU3R5bGVzIH1cbmA7XG4iXX0= */"));
  var RangeControl2 = /* @__PURE__ */ createStyled(range_control_default, false ? {
    target: "ez9hsf44"
  } : {
    target: "ez9hsf44",
    label: "RangeControl"
  })("flex:1;margin-right:", space(2), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF5QnVEIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IE51bWJlckNvbnRyb2wgZnJvbSAnLi4vbnVtYmVyLWNvbnRyb2wnO1xuaW1wb3J0IElubmVyU2VsZWN0Q29udHJvbCBmcm9tICcuLi9zZWxlY3QtY29udHJvbCc7XG5pbXBvcnQgSW5uZXJSYW5nZUNvbnRyb2wgZnJvbSAnLi4vcmFuZ2UtY29udHJvbCc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IGJveFNpemluZ1Jlc2V0IH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgRmxleCB9IGZyb20gJy4uL2ZsZXgnO1xuaW1wb3J0IHsgSFN0YWNrIH0gZnJvbSAnLi4vaC1zdGFjayc7XG5pbXBvcnQgQ09ORklHIGZyb20gJy4uL3V0aWxzL2NvbmZpZy12YWx1ZXMnO1xuXG5leHBvcnQgY29uc3QgTnVtYmVyQ29udHJvbFdyYXBwZXIgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0d2lkdGg6ICR7IHNwYWNlKCAyNCApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0Q29udHJvbCA9IHN0eWxlZCggSW5uZXJTZWxlY3RDb250cm9sIClgXG5cdG1hcmdpbi1sZWZ0OiAkeyBzcGFjZSggLTIgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFJhbmdlQ29udHJvbCA9IHN0eWxlZCggSW5uZXJSYW5nZUNvbnRyb2wgKWBcblx0ZmxleDogMTtcblx0bWFyZ2luLXJpZ2h0OiAkeyBzcGFjZSggMiApIH07XG5gO1xuXG4vLyBNYWtlIHRoZSBIdWUgY2lyY2xlIHBpY2tlciBub3QgZ28gb3V0IG9mIHRoZSBiYXIuXG5jb25zdCBpbnRlcmFjdGl2ZUh1ZVN0eWxlcyA9IGBcbi5yZWFjdC1jb2xvcmZ1bF9faW50ZXJhY3RpdmUge1xuXHR3aWR0aDogY2FsYyggMTAwJSAtICR7IHNwYWNlKCAyICkgfSApO1xuXHRtYXJnaW4tbGVmdDogJHsgc3BhY2UoIDEgKSB9O1xufWA7XG5cbmV4cG9ydCBjb25zdCBBdXhpbGlhcnlDb2xvckFydGVmYWN0V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdHBhZGRpbmctdG9wOiAkeyBzcGFjZSggMiApIH07XG5cdHBhZGRpbmctcmlnaHQ6IDA7XG5cdHBhZGRpbmctbGVmdDogMDtcblx0cGFkZGluZy1ib3R0b206IDA7XG5gO1xuXG5leHBvcnQgY29uc3QgQXV4aWxpYXJ5Q29sb3JBcnRlZmFjdEhTdGFja0hlYWRlciA9IHN0eWxlZCggSFN0YWNrIClgXG5cdHBhZGRpbmctbGVmdDogJHsgc3BhY2UoIDQgKSB9O1xuXHRwYWRkaW5nLXJpZ2h0OiAkeyBzcGFjZSggNCApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgQ29sb3JJbnB1dFdyYXBwZXIgPSBzdHlsZWQoIEZsZXggKWBcblx0cGFkZGluZy10b3A6ICR7IHNwYWNlKCA0ICkgfTtcblx0cGFkZGluZy1sZWZ0OiAkeyBzcGFjZSggNCApIH07XG5cdHBhZGRpbmctcmlnaHQ6ICR7IHNwYWNlKCAzICkgfTtcblx0cGFkZGluZy1ib3R0b206ICR7IHNwYWNlKCA1ICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBDb2xvcmZ1bFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQkeyBib3hTaXppbmdSZXNldCB9O1xuXG5cdHdpZHRoOiAyMTZweDtcblxuXHQucmVhY3QtY29sb3JmdWwge1xuXHRcdGRpc3BsYXk6IGZsZXg7XG5cdFx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRcdHdpZHRoOiAyMTZweDtcblx0XHRoZWlnaHQ6IGF1dG87XG5cdH1cblxuXHQucmVhY3QtY29sb3JmdWxfX3NhdHVyYXRpb24ge1xuXHRcdHdpZHRoOiAxMDAlO1xuXHRcdGJvcmRlci1yYWRpdXM6IDA7XG5cdFx0aGVpZ2h0OiAyMTZweDtcblx0XHRtYXJnaW4tYm90dG9tOiAkeyBzcGFjZSggNCApIH07XG5cdFx0Ym9yZGVyLWJvdHRvbTogbm9uZTtcblx0fVxuXG5cdC5yZWFjdC1jb2xvcmZ1bF9faHVlLFxuXHQucmVhY3QtY29sb3JmdWxfX2FscGhhIHtcblx0XHR3aWR0aDogMTg0cHg7XG5cdFx0aGVpZ2h0OiAxNnB4O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNGdWxsIH07XG5cdFx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDIgKSB9O1xuXHR9XG5cblx0LnJlYWN0LWNvbG9yZnVsX19wb2ludGVyIHtcblx0XHRoZWlnaHQ6IDE2cHg7XG5cdFx0d2lkdGg6IDE2cHg7XG5cdFx0Ym9yZGVyOiBub25lO1xuXHRcdGJveC1zaGFkb3c6IDAgMCAycHggMCByZ2JhKCAwLCAwLCAwLCAwLjI1ICk7XG5cblx0XHQvLyBTaG93biBpbnN0ZWFkIG9mIGJveC1zaGFkb3cgdG8gV2luZG93cyBoaWdoIGNvbnRyYXN0IG1vZGUuXG5cdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHR0cmFuc2l0aW9uOiB0cmFuc2Zvcm0gJHsgQ09ORklHLnRyYW5zaXRpb25EdXJhdGlvbkZhc3QgfSBlYXNlLWluLW91dDtcblx0XHR9XG5cdH1cblxuXHQucmVhY3QtY29sb3JmdWxfX2ludGVyYWN0aXZlOmZvY3VzIC5yZWFjdC1jb2xvcmZ1bF9fcG9pbnRlciB7XG5cdFx0Ym94LXNoYWRvdzogMCAwIDAgJHsgQ09ORklHLmJvcmRlcldpZHRoRm9jdXMgfSAkeyBDT05GSUcuc3VyZmFjZUNvbG9yIH07XG5cdFx0Ym9yZGVyOiAkeyBDT05GSUcuYm9yZGVyV2lkdGhGb2N1cyB9IHNvbGlkIGJsYWNrO1xuXHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlKCAtNTAlLCAtNTAlICkgc2NhbGUoIDEuNSApO1xuXHR9XG5cblx0LnJlYWN0LWNvbG9yZnVsX19wb2ludGVyLWZpbGwge1xuXHRcdGJveC1zaGFkb3c6IGluc2V0IDAgMCAwICR7IENPTkZJRy5ib3JkZXJXaWR0aEZvY3VzIH0gI2ZmZjtcblx0fVxuXG5cdCR7IGludGVyYWN0aXZlSHVlU3R5bGVzIH1cbmA7XG4iXX0= */"));
  var interactiveHueStyles = `
.react-colorful__interactive {
	width: calc( 100% - ${space(2)} );
	margin-left: ${space(1)};
}`;
  var AuxiliaryColorArtefactWrapper = /* @__PURE__ */ createStyled("div", false ? {
    target: "ez9hsf43"
  } : {
    target: "ez9hsf43",
    label: "AuxiliaryColorArtefactWrapper"
  })("padding-top:", space(2), ";padding-right:0;padding-left:0;padding-bottom:0;" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQ3VEIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IE51bWJlckNvbnRyb2wgZnJvbSAnLi4vbnVtYmVyLWNvbnRyb2wnO1xuaW1wb3J0IElubmVyU2VsZWN0Q29udHJvbCBmcm9tICcuLi9zZWxlY3QtY29udHJvbCc7XG5pbXBvcnQgSW5uZXJSYW5nZUNvbnRyb2wgZnJvbSAnLi4vcmFuZ2UtY29udHJvbCc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IGJveFNpemluZ1Jlc2V0IH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgRmxleCB9IGZyb20gJy4uL2ZsZXgnO1xuaW1wb3J0IHsgSFN0YWNrIH0gZnJvbSAnLi4vaC1zdGFjayc7XG5pbXBvcnQgQ09ORklHIGZyb20gJy4uL3V0aWxzL2NvbmZpZy12YWx1ZXMnO1xuXG5leHBvcnQgY29uc3QgTnVtYmVyQ29udHJvbFdyYXBwZXIgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0d2lkdGg6ICR7IHNwYWNlKCAyNCApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0Q29udHJvbCA9IHN0eWxlZCggSW5uZXJTZWxlY3RDb250cm9sIClgXG5cdG1hcmdpbi1sZWZ0OiAkeyBzcGFjZSggLTIgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFJhbmdlQ29udHJvbCA9IHN0eWxlZCggSW5uZXJSYW5nZUNvbnRyb2wgKWBcblx0ZmxleDogMTtcblx0bWFyZ2luLXJpZ2h0OiAkeyBzcGFjZSggMiApIH07XG5gO1xuXG4vLyBNYWtlIHRoZSBIdWUgY2lyY2xlIHBpY2tlciBub3QgZ28gb3V0IG9mIHRoZSBiYXIuXG5jb25zdCBpbnRlcmFjdGl2ZUh1ZVN0eWxlcyA9IGBcbi5yZWFjdC1jb2xvcmZ1bF9faW50ZXJhY3RpdmUge1xuXHR3aWR0aDogY2FsYyggMTAwJSAtICR7IHNwYWNlKCAyICkgfSApO1xuXHRtYXJnaW4tbGVmdDogJHsgc3BhY2UoIDEgKSB9O1xufWA7XG5cbmV4cG9ydCBjb25zdCBBdXhpbGlhcnlDb2xvckFydGVmYWN0V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdHBhZGRpbmctdG9wOiAkeyBzcGFjZSggMiApIH07XG5cdHBhZGRpbmctcmlnaHQ6IDA7XG5cdHBhZGRpbmctbGVmdDogMDtcblx0cGFkZGluZy1ib3R0b206IDA7XG5gO1xuXG5leHBvcnQgY29uc3QgQXV4aWxpYXJ5Q29sb3JBcnRlZmFjdEhTdGFja0hlYWRlciA9IHN0eWxlZCggSFN0YWNrIClgXG5cdHBhZGRpbmctbGVmdDogJHsgc3BhY2UoIDQgKSB9O1xuXHRwYWRkaW5nLXJpZ2h0OiAkeyBzcGFjZSggNCApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgQ29sb3JJbnB1dFdyYXBwZXIgPSBzdHlsZWQoIEZsZXggKWBcblx0cGFkZGluZy10b3A6ICR7IHNwYWNlKCA0ICkgfTtcblx0cGFkZGluZy1sZWZ0OiAkeyBzcGFjZSggNCApIH07XG5cdHBhZGRpbmctcmlnaHQ6ICR7IHNwYWNlKCAzICkgfTtcblx0cGFkZGluZy1ib3R0b206ICR7IHNwYWNlKCA1ICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBDb2xvcmZ1bFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQkeyBib3hTaXppbmdSZXNldCB9O1xuXG5cdHdpZHRoOiAyMTZweDtcblxuXHQucmVhY3QtY29sb3JmdWwge1xuXHRcdGRpc3BsYXk6IGZsZXg7XG5cdFx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRcdHdpZHRoOiAyMTZweDtcblx0XHRoZWlnaHQ6IGF1dG87XG5cdH1cblxuXHQucmVhY3QtY29sb3JmdWxfX3NhdHVyYXRpb24ge1xuXHRcdHdpZHRoOiAxMDAlO1xuXHRcdGJvcmRlci1yYWRpdXM6IDA7XG5cdFx0aGVpZ2h0OiAyMTZweDtcblx0XHRtYXJnaW4tYm90dG9tOiAkeyBzcGFjZSggNCApIH07XG5cdFx0Ym9yZGVyLWJvdHRvbTogbm9uZTtcblx0fVxuXG5cdC5yZWFjdC1jb2xvcmZ1bF9faHVlLFxuXHQucmVhY3QtY29sb3JmdWxfX2FscGhhIHtcblx0XHR3aWR0aDogMTg0cHg7XG5cdFx0aGVpZ2h0OiAxNnB4O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNGdWxsIH07XG5cdFx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDIgKSB9O1xuXHR9XG5cblx0LnJlYWN0LWNvbG9yZnVsX19wb2ludGVyIHtcblx0XHRoZWlnaHQ6IDE2cHg7XG5cdFx0d2lkdGg6IDE2cHg7XG5cdFx0Ym9yZGVyOiBub25lO1xuXHRcdGJveC1zaGFkb3c6IDAgMCAycHggMCByZ2JhKCAwLCAwLCAwLCAwLjI1ICk7XG5cblx0XHQvLyBTaG93biBpbnN0ZWFkIG9mIGJveC1zaGFkb3cgdG8gV2luZG93cyBoaWdoIGNvbnRyYXN0IG1vZGUuXG5cdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHR0cmFuc2l0aW9uOiB0cmFuc2Zvcm0gJHsgQ09ORklHLnRyYW5zaXRpb25EdXJhdGlvbkZhc3QgfSBlYXNlLWluLW91dDtcblx0XHR9XG5cdH1cblxuXHQucmVhY3QtY29sb3JmdWxfX2ludGVyYWN0aXZlOmZvY3VzIC5yZWFjdC1jb2xvcmZ1bF9fcG9pbnRlciB7XG5cdFx0Ym94LXNoYWRvdzogMCAwIDAgJHsgQ09ORklHLmJvcmRlcldpZHRoRm9jdXMgfSAkeyBDT05GSUcuc3VyZmFjZUNvbG9yIH07XG5cdFx0Ym9yZGVyOiAkeyBDT05GSUcuYm9yZGVyV2lkdGhGb2N1cyB9IHNvbGlkIGJsYWNrO1xuXHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlKCAtNTAlLCAtNTAlICkgc2NhbGUoIDEuNSApO1xuXHR9XG5cblx0LnJlYWN0LWNvbG9yZnVsX19wb2ludGVyLWZpbGwge1xuXHRcdGJveC1zaGFkb3c6IGluc2V0IDAgMCAwICR7IENPTkZJRy5ib3JkZXJXaWR0aEZvY3VzIH0gI2ZmZjtcblx0fVxuXG5cdCR7IGludGVyYWN0aXZlSHVlU3R5bGVzIH1cbmA7XG4iXX0= */"));
  var AuxiliaryColorArtefactHStackHeader = /* @__PURE__ */ createStyled(component_default9, false ? {
    target: "ez9hsf42"
  } : {
    target: "ez9hsf42",
    label: "AuxiliaryColorArtefactHStackHeader"
  })("padding-left:", space(4), ";padding-right:", space(4), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE0Q2tFIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IE51bWJlckNvbnRyb2wgZnJvbSAnLi4vbnVtYmVyLWNvbnRyb2wnO1xuaW1wb3J0IElubmVyU2VsZWN0Q29udHJvbCBmcm9tICcuLi9zZWxlY3QtY29udHJvbCc7XG5pbXBvcnQgSW5uZXJSYW5nZUNvbnRyb2wgZnJvbSAnLi4vcmFuZ2UtY29udHJvbCc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IGJveFNpemluZ1Jlc2V0IH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgRmxleCB9IGZyb20gJy4uL2ZsZXgnO1xuaW1wb3J0IHsgSFN0YWNrIH0gZnJvbSAnLi4vaC1zdGFjayc7XG5pbXBvcnQgQ09ORklHIGZyb20gJy4uL3V0aWxzL2NvbmZpZy12YWx1ZXMnO1xuXG5leHBvcnQgY29uc3QgTnVtYmVyQ29udHJvbFdyYXBwZXIgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0d2lkdGg6ICR7IHNwYWNlKCAyNCApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0Q29udHJvbCA9IHN0eWxlZCggSW5uZXJTZWxlY3RDb250cm9sIClgXG5cdG1hcmdpbi1sZWZ0OiAkeyBzcGFjZSggLTIgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFJhbmdlQ29udHJvbCA9IHN0eWxlZCggSW5uZXJSYW5nZUNvbnRyb2wgKWBcblx0ZmxleDogMTtcblx0bWFyZ2luLXJpZ2h0OiAkeyBzcGFjZSggMiApIH07XG5gO1xuXG4vLyBNYWtlIHRoZSBIdWUgY2lyY2xlIHBpY2tlciBub3QgZ28gb3V0IG9mIHRoZSBiYXIuXG5jb25zdCBpbnRlcmFjdGl2ZUh1ZVN0eWxlcyA9IGBcbi5yZWFjdC1jb2xvcmZ1bF9faW50ZXJhY3RpdmUge1xuXHR3aWR0aDogY2FsYyggMTAwJSAtICR7IHNwYWNlKCAyICkgfSApO1xuXHRtYXJnaW4tbGVmdDogJHsgc3BhY2UoIDEgKSB9O1xufWA7XG5cbmV4cG9ydCBjb25zdCBBdXhpbGlhcnlDb2xvckFydGVmYWN0V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdHBhZGRpbmctdG9wOiAkeyBzcGFjZSggMiApIH07XG5cdHBhZGRpbmctcmlnaHQ6IDA7XG5cdHBhZGRpbmctbGVmdDogMDtcblx0cGFkZGluZy1ib3R0b206IDA7XG5gO1xuXG5leHBvcnQgY29uc3QgQXV4aWxpYXJ5Q29sb3JBcnRlZmFjdEhTdGFja0hlYWRlciA9IHN0eWxlZCggSFN0YWNrIClgXG5cdHBhZGRpbmctbGVmdDogJHsgc3BhY2UoIDQgKSB9O1xuXHRwYWRkaW5nLXJpZ2h0OiAkeyBzcGFjZSggNCApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgQ29sb3JJbnB1dFdyYXBwZXIgPSBzdHlsZWQoIEZsZXggKWBcblx0cGFkZGluZy10b3A6ICR7IHNwYWNlKCA0ICkgfTtcblx0cGFkZGluZy1sZWZ0OiAkeyBzcGFjZSggNCApIH07XG5cdHBhZGRpbmctcmlnaHQ6ICR7IHNwYWNlKCAzICkgfTtcblx0cGFkZGluZy1ib3R0b206ICR7IHNwYWNlKCA1ICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBDb2xvcmZ1bFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQkeyBib3hTaXppbmdSZXNldCB9O1xuXG5cdHdpZHRoOiAyMTZweDtcblxuXHQucmVhY3QtY29sb3JmdWwge1xuXHRcdGRpc3BsYXk6IGZsZXg7XG5cdFx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRcdHdpZHRoOiAyMTZweDtcblx0XHRoZWlnaHQ6IGF1dG87XG5cdH1cblxuXHQucmVhY3QtY29sb3JmdWxfX3NhdHVyYXRpb24ge1xuXHRcdHdpZHRoOiAxMDAlO1xuXHRcdGJvcmRlci1yYWRpdXM6IDA7XG5cdFx0aGVpZ2h0OiAyMTZweDtcblx0XHRtYXJnaW4tYm90dG9tOiAkeyBzcGFjZSggNCApIH07XG5cdFx0Ym9yZGVyLWJvdHRvbTogbm9uZTtcblx0fVxuXG5cdC5yZWFjdC1jb2xvcmZ1bF9faHVlLFxuXHQucmVhY3QtY29sb3JmdWxfX2FscGhhIHtcblx0XHR3aWR0aDogMTg0cHg7XG5cdFx0aGVpZ2h0OiAxNnB4O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNGdWxsIH07XG5cdFx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDIgKSB9O1xuXHR9XG5cblx0LnJlYWN0LWNvbG9yZnVsX19wb2ludGVyIHtcblx0XHRoZWlnaHQ6IDE2cHg7XG5cdFx0d2lkdGg6IDE2cHg7XG5cdFx0Ym9yZGVyOiBub25lO1xuXHRcdGJveC1zaGFkb3c6IDAgMCAycHggMCByZ2JhKCAwLCAwLCAwLCAwLjI1ICk7XG5cblx0XHQvLyBTaG93biBpbnN0ZWFkIG9mIGJveC1zaGFkb3cgdG8gV2luZG93cyBoaWdoIGNvbnRyYXN0IG1vZGUuXG5cdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHR0cmFuc2l0aW9uOiB0cmFuc2Zvcm0gJHsgQ09ORklHLnRyYW5zaXRpb25EdXJhdGlvbkZhc3QgfSBlYXNlLWluLW91dDtcblx0XHR9XG5cdH1cblxuXHQucmVhY3QtY29sb3JmdWxfX2ludGVyYWN0aXZlOmZvY3VzIC5yZWFjdC1jb2xvcmZ1bF9fcG9pbnRlciB7XG5cdFx0Ym94LXNoYWRvdzogMCAwIDAgJHsgQ09ORklHLmJvcmRlcldpZHRoRm9jdXMgfSAkeyBDT05GSUcuc3VyZmFjZUNvbG9yIH07XG5cdFx0Ym9yZGVyOiAkeyBDT05GSUcuYm9yZGVyV2lkdGhGb2N1cyB9IHNvbGlkIGJsYWNrO1xuXHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlKCAtNTAlLCAtNTAlICkgc2NhbGUoIDEuNSApO1xuXHR9XG5cblx0LnJlYWN0LWNvbG9yZnVsX19wb2ludGVyLWZpbGwge1xuXHRcdGJveC1zaGFkb3c6IGluc2V0IDAgMCAwICR7IENPTkZJRy5ib3JkZXJXaWR0aEZvY3VzIH0gI2ZmZjtcblx0fVxuXG5cdCR7IGludGVyYWN0aXZlSHVlU3R5bGVzIH1cbmA7XG4iXX0= */"));
  var ColorInputWrapper = /* @__PURE__ */ createStyled(component_default3, false ? {
    target: "ez9hsf41"
  } : {
    target: "ez9hsf41",
    label: "ColorInputWrapper"
  })("padding-top:", space(4), ";padding-left:", space(4), ";padding-right:", space(3), ";padding-bottom:", space(5), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpRCtDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IE51bWJlckNvbnRyb2wgZnJvbSAnLi4vbnVtYmVyLWNvbnRyb2wnO1xuaW1wb3J0IElubmVyU2VsZWN0Q29udHJvbCBmcm9tICcuLi9zZWxlY3QtY29udHJvbCc7XG5pbXBvcnQgSW5uZXJSYW5nZUNvbnRyb2wgZnJvbSAnLi4vcmFuZ2UtY29udHJvbCc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IGJveFNpemluZ1Jlc2V0IH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgRmxleCB9IGZyb20gJy4uL2ZsZXgnO1xuaW1wb3J0IHsgSFN0YWNrIH0gZnJvbSAnLi4vaC1zdGFjayc7XG5pbXBvcnQgQ09ORklHIGZyb20gJy4uL3V0aWxzL2NvbmZpZy12YWx1ZXMnO1xuXG5leHBvcnQgY29uc3QgTnVtYmVyQ29udHJvbFdyYXBwZXIgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0d2lkdGg6ICR7IHNwYWNlKCAyNCApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0Q29udHJvbCA9IHN0eWxlZCggSW5uZXJTZWxlY3RDb250cm9sIClgXG5cdG1hcmdpbi1sZWZ0OiAkeyBzcGFjZSggLTIgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFJhbmdlQ29udHJvbCA9IHN0eWxlZCggSW5uZXJSYW5nZUNvbnRyb2wgKWBcblx0ZmxleDogMTtcblx0bWFyZ2luLXJpZ2h0OiAkeyBzcGFjZSggMiApIH07XG5gO1xuXG4vLyBNYWtlIHRoZSBIdWUgY2lyY2xlIHBpY2tlciBub3QgZ28gb3V0IG9mIHRoZSBiYXIuXG5jb25zdCBpbnRlcmFjdGl2ZUh1ZVN0eWxlcyA9IGBcbi5yZWFjdC1jb2xvcmZ1bF9faW50ZXJhY3RpdmUge1xuXHR3aWR0aDogY2FsYyggMTAwJSAtICR7IHNwYWNlKCAyICkgfSApO1xuXHRtYXJnaW4tbGVmdDogJHsgc3BhY2UoIDEgKSB9O1xufWA7XG5cbmV4cG9ydCBjb25zdCBBdXhpbGlhcnlDb2xvckFydGVmYWN0V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdHBhZGRpbmctdG9wOiAkeyBzcGFjZSggMiApIH07XG5cdHBhZGRpbmctcmlnaHQ6IDA7XG5cdHBhZGRpbmctbGVmdDogMDtcblx0cGFkZGluZy1ib3R0b206IDA7XG5gO1xuXG5leHBvcnQgY29uc3QgQXV4aWxpYXJ5Q29sb3JBcnRlZmFjdEhTdGFja0hlYWRlciA9IHN0eWxlZCggSFN0YWNrIClgXG5cdHBhZGRpbmctbGVmdDogJHsgc3BhY2UoIDQgKSB9O1xuXHRwYWRkaW5nLXJpZ2h0OiAkeyBzcGFjZSggNCApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgQ29sb3JJbnB1dFdyYXBwZXIgPSBzdHlsZWQoIEZsZXggKWBcblx0cGFkZGluZy10b3A6ICR7IHNwYWNlKCA0ICkgfTtcblx0cGFkZGluZy1sZWZ0OiAkeyBzcGFjZSggNCApIH07XG5cdHBhZGRpbmctcmlnaHQ6ICR7IHNwYWNlKCAzICkgfTtcblx0cGFkZGluZy1ib3R0b206ICR7IHNwYWNlKCA1ICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBDb2xvcmZ1bFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQkeyBib3hTaXppbmdSZXNldCB9O1xuXG5cdHdpZHRoOiAyMTZweDtcblxuXHQucmVhY3QtY29sb3JmdWwge1xuXHRcdGRpc3BsYXk6IGZsZXg7XG5cdFx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRcdHdpZHRoOiAyMTZweDtcblx0XHRoZWlnaHQ6IGF1dG87XG5cdH1cblxuXHQucmVhY3QtY29sb3JmdWxfX3NhdHVyYXRpb24ge1xuXHRcdHdpZHRoOiAxMDAlO1xuXHRcdGJvcmRlci1yYWRpdXM6IDA7XG5cdFx0aGVpZ2h0OiAyMTZweDtcblx0XHRtYXJnaW4tYm90dG9tOiAkeyBzcGFjZSggNCApIH07XG5cdFx0Ym9yZGVyLWJvdHRvbTogbm9uZTtcblx0fVxuXG5cdC5yZWFjdC1jb2xvcmZ1bF9faHVlLFxuXHQucmVhY3QtY29sb3JmdWxfX2FscGhhIHtcblx0XHR3aWR0aDogMTg0cHg7XG5cdFx0aGVpZ2h0OiAxNnB4O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNGdWxsIH07XG5cdFx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDIgKSB9O1xuXHR9XG5cblx0LnJlYWN0LWNvbG9yZnVsX19wb2ludGVyIHtcblx0XHRoZWlnaHQ6IDE2cHg7XG5cdFx0d2lkdGg6IDE2cHg7XG5cdFx0Ym9yZGVyOiBub25lO1xuXHRcdGJveC1zaGFkb3c6IDAgMCAycHggMCByZ2JhKCAwLCAwLCAwLCAwLjI1ICk7XG5cblx0XHQvLyBTaG93biBpbnN0ZWFkIG9mIGJveC1zaGFkb3cgdG8gV2luZG93cyBoaWdoIGNvbnRyYXN0IG1vZGUuXG5cdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHR0cmFuc2l0aW9uOiB0cmFuc2Zvcm0gJHsgQ09ORklHLnRyYW5zaXRpb25EdXJhdGlvbkZhc3QgfSBlYXNlLWluLW91dDtcblx0XHR9XG5cdH1cblxuXHQucmVhY3QtY29sb3JmdWxfX2ludGVyYWN0aXZlOmZvY3VzIC5yZWFjdC1jb2xvcmZ1bF9fcG9pbnRlciB7XG5cdFx0Ym94LXNoYWRvdzogMCAwIDAgJHsgQ09ORklHLmJvcmRlcldpZHRoRm9jdXMgfSAkeyBDT05GSUcuc3VyZmFjZUNvbG9yIH07XG5cdFx0Ym9yZGVyOiAkeyBDT05GSUcuYm9yZGVyV2lkdGhGb2N1cyB9IHNvbGlkIGJsYWNrO1xuXHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlKCAtNTAlLCAtNTAlICkgc2NhbGUoIDEuNSApO1xuXHR9XG5cblx0LnJlYWN0LWNvbG9yZnVsX19wb2ludGVyLWZpbGwge1xuXHRcdGJveC1zaGFkb3c6IGluc2V0IDAgMCAwICR7IENPTkZJRy5ib3JkZXJXaWR0aEZvY3VzIH0gI2ZmZjtcblx0fVxuXG5cdCR7IGludGVyYWN0aXZlSHVlU3R5bGVzIH1cbmA7XG4iXX0= */"));
  var ColorfulWrapper = /* @__PURE__ */ createStyled("div", false ? {
    target: "ez9hsf40"
  } : {
    target: "ez9hsf40",
    label: "ColorfulWrapper"
  })(boxSizingReset, ";width:216px;.react-colorful{display:flex;flex-direction:column;align-items:center;width:216px;height:auto;}.react-colorful__saturation{width:100%;border-radius:0;height:216px;margin-bottom:", space(4), ";border-bottom:none;}.react-colorful__hue,.react-colorful__alpha{width:184px;height:16px;border-radius:", config_values_default.radiusFull, ";margin-bottom:", space(2), ";}.react-colorful__pointer{height:16px;width:16px;border:none;box-shadow:0 0 2px 0 rgba( 0, 0, 0, 0.25 );outline:2px solid transparent;@media not ( prefers-reduced-motion ){transition:transform ", config_values_default.transitionDurationFast, " ease-in-out;}}.react-colorful__interactive:focus .react-colorful__pointer{box-shadow:0 0 0 ", config_values_default.borderWidthFocus, " ", config_values_default.surfaceColor, ";border:", config_values_default.borderWidthFocus, " solid black;transform:translate( -50%, -50% ) scale( 1.5 );}.react-colorful__pointer-fill{box-shadow:inset 0 0 0 ", config_values_default.borderWidthFocus, " #fff;}", interactiveHueStyles, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3RHlDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IE51bWJlckNvbnRyb2wgZnJvbSAnLi4vbnVtYmVyLWNvbnRyb2wnO1xuaW1wb3J0IElubmVyU2VsZWN0Q29udHJvbCBmcm9tICcuLi9zZWxlY3QtY29udHJvbCc7XG5pbXBvcnQgSW5uZXJSYW5nZUNvbnRyb2wgZnJvbSAnLi4vcmFuZ2UtY29udHJvbCc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IGJveFNpemluZ1Jlc2V0IH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgRmxleCB9IGZyb20gJy4uL2ZsZXgnO1xuaW1wb3J0IHsgSFN0YWNrIH0gZnJvbSAnLi4vaC1zdGFjayc7XG5pbXBvcnQgQ09ORklHIGZyb20gJy4uL3V0aWxzL2NvbmZpZy12YWx1ZXMnO1xuXG5leHBvcnQgY29uc3QgTnVtYmVyQ29udHJvbFdyYXBwZXIgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0d2lkdGg6ICR7IHNwYWNlKCAyNCApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0Q29udHJvbCA9IHN0eWxlZCggSW5uZXJTZWxlY3RDb250cm9sIClgXG5cdG1hcmdpbi1sZWZ0OiAkeyBzcGFjZSggLTIgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFJhbmdlQ29udHJvbCA9IHN0eWxlZCggSW5uZXJSYW5nZUNvbnRyb2wgKWBcblx0ZmxleDogMTtcblx0bWFyZ2luLXJpZ2h0OiAkeyBzcGFjZSggMiApIH07XG5gO1xuXG4vLyBNYWtlIHRoZSBIdWUgY2lyY2xlIHBpY2tlciBub3QgZ28gb3V0IG9mIHRoZSBiYXIuXG5jb25zdCBpbnRlcmFjdGl2ZUh1ZVN0eWxlcyA9IGBcbi5yZWFjdC1jb2xvcmZ1bF9faW50ZXJhY3RpdmUge1xuXHR3aWR0aDogY2FsYyggMTAwJSAtICR7IHNwYWNlKCAyICkgfSApO1xuXHRtYXJnaW4tbGVmdDogJHsgc3BhY2UoIDEgKSB9O1xufWA7XG5cbmV4cG9ydCBjb25zdCBBdXhpbGlhcnlDb2xvckFydGVmYWN0V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdHBhZGRpbmctdG9wOiAkeyBzcGFjZSggMiApIH07XG5cdHBhZGRpbmctcmlnaHQ6IDA7XG5cdHBhZGRpbmctbGVmdDogMDtcblx0cGFkZGluZy1ib3R0b206IDA7XG5gO1xuXG5leHBvcnQgY29uc3QgQXV4aWxpYXJ5Q29sb3JBcnRlZmFjdEhTdGFja0hlYWRlciA9IHN0eWxlZCggSFN0YWNrIClgXG5cdHBhZGRpbmctbGVmdDogJHsgc3BhY2UoIDQgKSB9O1xuXHRwYWRkaW5nLXJpZ2h0OiAkeyBzcGFjZSggNCApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgQ29sb3JJbnB1dFdyYXBwZXIgPSBzdHlsZWQoIEZsZXggKWBcblx0cGFkZGluZy10b3A6ICR7IHNwYWNlKCA0ICkgfTtcblx0cGFkZGluZy1sZWZ0OiAkeyBzcGFjZSggNCApIH07XG5cdHBhZGRpbmctcmlnaHQ6ICR7IHNwYWNlKCAzICkgfTtcblx0cGFkZGluZy1ib3R0b206ICR7IHNwYWNlKCA1ICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBDb2xvcmZ1bFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQkeyBib3hTaXppbmdSZXNldCB9O1xuXG5cdHdpZHRoOiAyMTZweDtcblxuXHQucmVhY3QtY29sb3JmdWwge1xuXHRcdGRpc3BsYXk6IGZsZXg7XG5cdFx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRcdHdpZHRoOiAyMTZweDtcblx0XHRoZWlnaHQ6IGF1dG87XG5cdH1cblxuXHQucmVhY3QtY29sb3JmdWxfX3NhdHVyYXRpb24ge1xuXHRcdHdpZHRoOiAxMDAlO1xuXHRcdGJvcmRlci1yYWRpdXM6IDA7XG5cdFx0aGVpZ2h0OiAyMTZweDtcblx0XHRtYXJnaW4tYm90dG9tOiAkeyBzcGFjZSggNCApIH07XG5cdFx0Ym9yZGVyLWJvdHRvbTogbm9uZTtcblx0fVxuXG5cdC5yZWFjdC1jb2xvcmZ1bF9faHVlLFxuXHQucmVhY3QtY29sb3JmdWxfX2FscGhhIHtcblx0XHR3aWR0aDogMTg0cHg7XG5cdFx0aGVpZ2h0OiAxNnB4O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNGdWxsIH07XG5cdFx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDIgKSB9O1xuXHR9XG5cblx0LnJlYWN0LWNvbG9yZnVsX19wb2ludGVyIHtcblx0XHRoZWlnaHQ6IDE2cHg7XG5cdFx0d2lkdGg6IDE2cHg7XG5cdFx0Ym9yZGVyOiBub25lO1xuXHRcdGJveC1zaGFkb3c6IDAgMCAycHggMCByZ2JhKCAwLCAwLCAwLCAwLjI1ICk7XG5cblx0XHQvLyBTaG93biBpbnN0ZWFkIG9mIGJveC1zaGFkb3cgdG8gV2luZG93cyBoaWdoIGNvbnRyYXN0IG1vZGUuXG5cdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHR0cmFuc2l0aW9uOiB0cmFuc2Zvcm0gJHsgQ09ORklHLnRyYW5zaXRpb25EdXJhdGlvbkZhc3QgfSBlYXNlLWluLW91dDtcblx0XHR9XG5cdH1cblxuXHQucmVhY3QtY29sb3JmdWxfX2ludGVyYWN0aXZlOmZvY3VzIC5yZWFjdC1jb2xvcmZ1bF9fcG9pbnRlciB7XG5cdFx0Ym94LXNoYWRvdzogMCAwIDAgJHsgQ09ORklHLmJvcmRlcldpZHRoRm9jdXMgfSAkeyBDT05GSUcuc3VyZmFjZUNvbG9yIH07XG5cdFx0Ym9yZGVyOiAkeyBDT05GSUcuYm9yZGVyV2lkdGhGb2N1cyB9IHNvbGlkIGJsYWNrO1xuXHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlKCAtNTAlLCAtNTAlICkgc2NhbGUoIDEuNSApO1xuXHR9XG5cblx0LnJlYWN0LWNvbG9yZnVsX19wb2ludGVyLWZpbGwge1xuXHRcdGJveC1zaGFkb3c6IGluc2V0IDAgMCAwICR7IENPTkZJRy5ib3JkZXJXaWR0aEZvY3VzIH0gI2ZmZjtcblx0fVxuXG5cdCR7IGludGVyYWN0aXZlSHVlU3R5bGVzIH1cbmA7XG4iXX0= */"));

  // packages/components/build-module/color-picker/color-copy-button.mjs
  var import_compose30 = __toESM(require_compose(), 1);
  var import_element73 = __toESM(require_element(), 1);
  var import_i18n14 = __toESM(require_i18n(), 1);
  var import_jsx_runtime130 = __toESM(require_jsx_runtime(), 1);
  var ColorCopyButton = (props) => {
    const {
      color: color2,
      colorType
    } = props;
    const [copiedColor, setCopiedColor] = (0, import_element73.useState)(null);
    const copyTimerRef = (0, import_element73.useRef)(void 0);
    const copyRef = (0, import_compose30.useCopyToClipboard)(() => {
      switch (colorType) {
        case "hsl": {
          return color2.toHslString();
        }
        case "rgb": {
          return color2.toRgbString();
        }
        default:
        case "hex": {
          return color2.toHex();
        }
      }
    }, () => {
      if (copyTimerRef.current) {
        clearTimeout(copyTimerRef.current);
      }
      setCopiedColor(color2.toHex());
      copyTimerRef.current = setTimeout(() => {
        setCopiedColor(null);
        copyTimerRef.current = void 0;
      }, 3e3);
    });
    (0, import_element73.useEffect)(() => {
      return () => {
        if (copyTimerRef.current) {
          clearTimeout(copyTimerRef.current);
        }
      };
    }, []);
    const isCopied = copiedColor === color2.toHex();
    const label = isCopied ? (0, import_i18n14.__)("Copied!") : (0, import_i18n14.__)("Copy");
    return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(tooltip_default, {
      delay: 0,
      hideOnClick: false,
      text: label,
      children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Button3, {
        size: "compact",
        "aria-label": label,
        ref: copyRef,
        icon: isCopied ? check_default : copy_default,
        showTooltip: false
      })
    });
  };

  // packages/components/build-module/color-picker/input-with-slider.mjs
  var import_jsx_runtime131 = __toESM(require_jsx_runtime(), 1);
  var InputWithSlider = ({
    min: min3,
    max: max3,
    label,
    abbreviation,
    onChange,
    value
  }) => {
    const onNumberControlChange = (newValue) => {
      if (!newValue) {
        onChange(0);
        return;
      }
      if (typeof newValue === "string") {
        onChange(parseInt(newValue, 10));
        return;
      }
      onChange(newValue);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(component_default9, {
      spacing: 4,
      children: [/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(NumberControlWrapper, {
        __next40pxDefaultSize: true,
        min: min3,
        max: max3,
        label,
        hideLabelFromVision: true,
        value,
        onChange: onNumberControlChange,
        prefix: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(input_prefix_wrapper_default, {
          children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(component_default8, {
            color: COLORS.theme.accent,
            lineHeight: 1,
            children: abbreviation
          })
        }),
        spinControls: "none"
      }), /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(RangeControl2, {
        __next40pxDefaultSize: true,
        label,
        hideLabelFromVision: true,
        min: min3,
        max: max3,
        value,
        onChange,
        withInputField: false
      })]
    });
  };

  // packages/components/build-module/color-picker/rgb-input.mjs
  var import_jsx_runtime132 = __toESM(require_jsx_runtime(), 1);
  var RgbInput = ({
    color: color2,
    onChange,
    enableAlpha
  }) => {
    const {
      r: r4,
      g: g3,
      b: b3,
      a: a3
    } = color2.toRgb();
    return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_jsx_runtime132.Fragment, {
      children: [/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(InputWithSlider, {
        min: 0,
        max: 255,
        label: "Red",
        abbreviation: "R",
        value: r4,
        onChange: (nextR) => onChange(w({
          r: nextR,
          g: g3,
          b: b3,
          a: a3
        }))
      }), /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(InputWithSlider, {
        min: 0,
        max: 255,
        label: "Green",
        abbreviation: "G",
        value: g3,
        onChange: (nextG) => onChange(w({
          r: r4,
          g: nextG,
          b: b3,
          a: a3
        }))
      }), /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(InputWithSlider, {
        min: 0,
        max: 255,
        label: "Blue",
        abbreviation: "B",
        value: b3,
        onChange: (nextB) => onChange(w({
          r: r4,
          g: g3,
          b: nextB,
          a: a3
        }))
      }), enableAlpha && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(InputWithSlider, {
        min: 0,
        max: 100,
        label: "Alpha",
        abbreviation: "A",
        value: Math.trunc(a3 * 100),
        onChange: (nextA) => onChange(w({
          r: r4,
          g: g3,
          b: b3,
          a: nextA / 100
        }))
      })]
    });
  };

  // packages/components/build-module/color-picker/hsl-input.mjs
  var import_element74 = __toESM(require_element(), 1);
  var import_jsx_runtime133 = __toESM(require_jsx_runtime(), 1);
  var HslInput = ({
    color: color2,
    onChange,
    enableAlpha
  }) => {
    const colorPropHSLA = (0, import_element74.useMemo)(() => color2.toHsl(), [color2]);
    const [internalHSLA, setInternalHSLA] = (0, import_element74.useState)({
      ...colorPropHSLA
    });
    const isInternalColorSameAsReceivedColor = color2.isEqual(w(internalHSLA));
    (0, import_element74.useEffect)(() => {
      if (!isInternalColorSameAsReceivedColor) {
        setInternalHSLA(colorPropHSLA);
      }
    }, [colorPropHSLA, isInternalColorSameAsReceivedColor]);
    const colorValue = isInternalColorSameAsReceivedColor ? internalHSLA : colorPropHSLA;
    const updateHSLAValue = (partialNewValue) => {
      const nextOnChangeValue = w({
        ...colorValue,
        ...partialNewValue
      });
      if (!color2.isEqual(nextOnChangeValue)) {
        onChange(nextOnChangeValue);
      } else {
        setInternalHSLA((prevHSLA) => ({
          ...prevHSLA,
          ...partialNewValue
        }));
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_jsx_runtime133.Fragment, {
      children: [/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(InputWithSlider, {
        min: 0,
        max: 359,
        label: "Hue",
        abbreviation: "H",
        value: colorValue.h,
        onChange: (nextH) => {
          updateHSLAValue({
            h: nextH
          });
        }
      }), /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(InputWithSlider, {
        min: 0,
        max: 100,
        label: "Saturation",
        abbreviation: "S",
        value: colorValue.s,
        onChange: (nextS) => {
          updateHSLAValue({
            s: nextS
          });
        }
      }), /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(InputWithSlider, {
        min: 0,
        max: 100,
        label: "Lightness",
        abbreviation: "L",
        value: colorValue.l,
        onChange: (nextL) => {
          updateHSLAValue({
            l: nextL
          });
        }
      }), enableAlpha && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(InputWithSlider, {
        min: 0,
        max: 100,
        label: "Alpha",
        abbreviation: "A",
        value: Math.trunc(100 * colorValue.a),
        onChange: (nextA) => {
          updateHSLAValue({
            a: nextA / 100
          });
        }
      })]
    });
  };

  // packages/components/build-module/color-picker/hex-input.mjs
  var import_i18n15 = __toESM(require_i18n(), 1);
  var import_jsx_runtime134 = __toESM(require_jsx_runtime(), 1);
  var HexInput = ({
    color: color2,
    onChange,
    enableAlpha
  }) => {
    const handleChange = (nextValue) => {
      if (!nextValue) {
        return;
      }
      const hexValue = nextValue.startsWith("#") ? nextValue : "#" + nextValue;
      onChange(w(hexValue));
    };
    const stateReducer = (state, action) => {
      const nativeEvent = action.payload?.event?.nativeEvent;
      if ("insertFromPaste" !== nativeEvent?.inputType) {
        return {
          ...state
        };
      }
      const value = state.value?.startsWith("#") ? state.value.slice(1).toUpperCase() : state.value?.toUpperCase();
      return {
        ...state,
        value
      };
    };
    return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(InputControl, {
      prefix: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(input_prefix_wrapper_default, {
        children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(component_default8, {
          color: COLORS.theme.accent,
          lineHeight: 1,
          children: "#"
        })
      }),
      value: color2.toHex().slice(1).toUpperCase(),
      onChange: handleChange,
      maxLength: enableAlpha ? 9 : 7,
      label: (0, import_i18n15.__)("Hex color"),
      hideLabelFromVision: true,
      size: "__unstable-large",
      __unstableStateReducer: stateReducer,
      __unstableInputWidth: "9em"
    });
  };

  // packages/components/build-module/color-picker/color-input.mjs
  var import_jsx_runtime135 = __toESM(require_jsx_runtime(), 1);
  var ColorInput = ({
    colorType,
    color: color2,
    onChange,
    enableAlpha
  }) => {
    const props = {
      color: color2,
      onChange,
      enableAlpha
    };
    switch (colorType) {
      case "hsl":
        return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(HslInput, {
          ...props
        });
      case "rgb":
        return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(RgbInput, {
          ...props
        });
      default:
      case "hex":
        return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(HexInput, {
          ...props
        });
    }
  };

  // packages/components/node_modules/react-colorful/dist/index.mjs
  var import_react104 = __toESM(require_react(), 1);
  function u2() {
    return (u2 = Object.assign || function(e3) {
      for (var r4 = 1; r4 < arguments.length; r4++) {
        var t4 = arguments[r4];
        for (var n3 in t4) Object.prototype.hasOwnProperty.call(t4, n3) && (e3[n3] = t4[n3]);
      }
      return e3;
    }).apply(this, arguments);
  }
  function c2(e3, r4) {
    if (null == e3) return {};
    var t4, n3, o4 = {}, a3 = Object.keys(e3);
    for (n3 = 0; n3 < a3.length; n3++) r4.indexOf(t4 = a3[n3]) >= 0 || (o4[t4] = e3[t4]);
    return o4;
  }
  function i2(e3) {
    var t4 = (0, import_react104.useRef)(e3), n3 = (0, import_react104.useRef)(function(e4) {
      t4.current && t4.current(e4);
    });
    return t4.current = e3, n3.current;
  }
  var s2 = function(e3, r4, t4) {
    return void 0 === r4 && (r4 = 0), void 0 === t4 && (t4 = 1), e3 > t4 ? t4 : e3 < r4 ? r4 : e3;
  };
  var f2 = function(e3) {
    return "touches" in e3;
  };
  var v2 = function(e3) {
    return e3 && e3.ownerDocument.defaultView || self;
  };
  var d2 = function(e3, r4, t4) {
    var n3 = e3.getBoundingClientRect(), o4 = f2(r4) ? (function(e4, r5) {
      for (var t5 = 0; t5 < e4.length; t5++) if (e4[t5].identifier === r5) return e4[t5];
      return e4[0];
    })(r4.touches, t4) : r4;
    return { left: s2((o4.pageX - (n3.left + v2(e3).pageXOffset)) / n3.width), top: s2((o4.pageY - (n3.top + v2(e3).pageYOffset)) / n3.height) };
  };
  var h2 = function(e3) {
    !f2(e3) && e3.preventDefault();
  };
  var m2 = import_react104.default.memo(function(o4) {
    var a3 = o4.onMove, l3 = o4.onKey, s3 = c2(o4, ["onMove", "onKey"]), m3 = (0, import_react104.useRef)(null), g3 = i2(a3), p3 = i2(l3), b3 = (0, import_react104.useRef)(null), _2 = (0, import_react104.useRef)(false), x2 = (0, import_react104.useMemo)(function() {
      var e3 = function(e4) {
        h2(e4), (f2(e4) ? e4.touches.length > 0 : e4.buttons > 0) && m3.current ? g3(d2(m3.current, e4, b3.current)) : t4(false);
      }, r4 = function() {
        return t4(false);
      };
      function t4(t5) {
        var n3 = _2.current, o5 = v2(m3.current), a4 = t5 ? o5.addEventListener : o5.removeEventListener;
        a4(n3 ? "touchmove" : "mousemove", e3), a4(n3 ? "touchend" : "mouseup", r4);
      }
      return [function(e4) {
        var r5 = e4.nativeEvent, n3 = m3.current;
        if (n3 && (h2(r5), !(function(e5, r6) {
          return r6 && !f2(e5);
        })(r5, _2.current) && n3)) {
          if (f2(r5)) {
            _2.current = true;
            var o5 = r5.changedTouches || [];
            o5.length && (b3.current = o5[0].identifier);
          }
          n3.focus(), g3(d2(n3, r5, b3.current)), t4(true);
        }
      }, function(e4) {
        var r5 = e4.which || e4.keyCode;
        r5 < 37 || r5 > 40 || (e4.preventDefault(), p3({ left: 39 === r5 ? 0.05 : 37 === r5 ? -0.05 : 0, top: 40 === r5 ? 0.05 : 38 === r5 ? -0.05 : 0 }));
      }, t4];
    }, [p3, g3]), C = x2[0], E = x2[1], H2 = x2[2];
    return (0, import_react104.useEffect)(function() {
      return H2;
    }, [H2]), import_react104.default.createElement("div", u2({}, s3, { onTouchStart: C, onMouseDown: C, className: "react-colorful__interactive", ref: m3, onKeyDown: E, tabIndex: 0, role: "slider" }));
  });
  var g2 = function(e3) {
    return e3.filter(Boolean).join(" ");
  };
  var p2 = function(r4) {
    var t4 = r4.color, n3 = r4.left, o4 = r4.top, a3 = void 0 === o4 ? 0.5 : o4, l3 = g2(["react-colorful__pointer", r4.className]);
    return import_react104.default.createElement("div", { className: l3, style: { top: 100 * a3 + "%", left: 100 * n3 + "%" } }, import_react104.default.createElement("div", { className: "react-colorful__pointer-fill", style: { backgroundColor: t4 } }));
  };
  var b2 = function(e3, r4, t4) {
    return void 0 === r4 && (r4 = 0), void 0 === t4 && (t4 = Math.pow(10, r4)), Math.round(t4 * e3) / t4;
  };
  var _ = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) };
  var y2 = function(e3) {
    var r4 = e3.s, t4 = e3.v, n3 = e3.a, o4 = (200 - r4) * t4 / 100;
    return { h: b2(e3.h), s: b2(o4 > 0 && o4 < 200 ? r4 * t4 / 100 / (o4 <= 100 ? o4 : 200 - o4) * 100 : 0), l: b2(o4 / 2), a: b2(n3, 2) };
  };
  var q = function(e3) {
    var r4 = y2(e3);
    return "hsl(" + r4.h + ", " + r4.s + "%, " + r4.l + "%)";
  };
  var k2 = function(e3) {
    var r4 = y2(e3);
    return "hsla(" + r4.h + ", " + r4.s + "%, " + r4.l + "%, " + r4.a + ")";
  };
  var I2 = function(e3) {
    var r4 = e3.h, t4 = e3.s, n3 = e3.v, o4 = e3.a;
    r4 = r4 / 360 * 6, t4 /= 100, n3 /= 100;
    var a3 = Math.floor(r4), l3 = n3 * (1 - t4), u3 = n3 * (1 - (r4 - a3) * t4), c3 = n3 * (1 - (1 - r4 + a3) * t4), i3 = a3 % 6;
    return { r: b2(255 * [n3, u3, l3, l3, c3, n3][i3]), g: b2(255 * [c3, n3, n3, u3, l3, l3][i3]), b: b2(255 * [l3, l3, c3, n3, n3, u3][i3]), a: b2(o4, 2) };
  };
  var z = function(e3) {
    var r4 = /rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e3);
    return r4 ? L({ r: Number(r4[1]) / (r4[2] ? 100 / 255 : 1), g: Number(r4[3]) / (r4[4] ? 100 / 255 : 1), b: Number(r4[5]) / (r4[6] ? 100 / 255 : 1), a: void 0 === r4[7] ? 1 : Number(r4[7]) / (r4[8] ? 100 : 1) }) : { h: 0, s: 0, v: 0, a: 1 };
  };
  var B = z;
  var L = function(e3) {
    var r4 = e3.r, t4 = e3.g, n3 = e3.b, o4 = e3.a, a3 = Math.max(r4, t4, n3), l3 = a3 - Math.min(r4, t4, n3), u3 = l3 ? a3 === r4 ? (t4 - n3) / l3 : a3 === t4 ? 2 + (n3 - r4) / l3 : 4 + (r4 - t4) / l3 : 0;
    return { h: b2(60 * (u3 < 0 ? u3 + 6 : u3)), s: b2(a3 ? l3 / a3 * 100 : 0), v: b2(a3 / 255 * 100), a: o4 };
  };
  var S2 = import_react104.default.memo(function(r4) {
    var t4 = r4.hue, n3 = r4.onChange, o4 = g2(["react-colorful__hue", r4.className]);
    return import_react104.default.createElement("div", { className: o4 }, import_react104.default.createElement(m2, { onMove: function(e3) {
      n3({ h: 360 * e3.left });
    }, onKey: function(e3) {
      n3({ h: s2(t4 + 360 * e3.left, 0, 360) });
    }, "aria-label": "Hue", "aria-valuenow": b2(t4), "aria-valuemax": "360", "aria-valuemin": "0" }, import_react104.default.createElement(p2, { className: "react-colorful__hue-pointer", left: t4 / 360, color: q({ h: t4, s: 100, v: 100, a: 1 }) })));
  });
  var T = import_react104.default.memo(function(r4) {
    var t4 = r4.hsva, n3 = r4.onChange, o4 = { backgroundColor: q({ h: t4.h, s: 100, v: 100, a: 1 }) };
    return import_react104.default.createElement("div", { className: "react-colorful__saturation", style: o4 }, import_react104.default.createElement(m2, { onMove: function(e3) {
      n3({ s: 100 * e3.left, v: 100 - 100 * e3.top });
    }, onKey: function(e3) {
      n3({ s: s2(t4.s + 100 * e3.left, 0, 100), v: s2(t4.v - 100 * e3.top, 0, 100) });
    }, "aria-label": "Color", "aria-valuetext": "Saturation " + b2(t4.s) + "%, Brightness " + b2(t4.v) + "%" }, import_react104.default.createElement(p2, { className: "react-colorful__saturation-pointer", top: 1 - t4.v / 100, left: t4.s / 100, color: q(t4) })));
  });
  var F = function(e3, r4) {
    if (e3 === r4) return true;
    for (var t4 in e3) if (e3[t4] !== r4[t4]) return false;
    return true;
  };
  var P = function(e3, r4) {
    return e3.replace(/\s/g, "") === r4.replace(/\s/g, "");
  };
  function Y(e3, t4, l3) {
    var u3 = i2(l3), c3 = (0, import_react104.useState)(function() {
      return e3.toHsva(t4);
    }), s3 = c3[0], f3 = c3[1], v3 = (0, import_react104.useRef)({ color: t4, hsva: s3 });
    (0, import_react104.useEffect)(function() {
      if (!e3.equal(t4, v3.current.color)) {
        var r4 = e3.toHsva(t4);
        v3.current = { hsva: r4, color: t4 }, f3(r4);
      }
    }, [t4, e3]), (0, import_react104.useEffect)(function() {
      var r4;
      F(s3, v3.current.hsva) || e3.equal(r4 = e3.fromHsva(s3), v3.current.color) || (v3.current = { hsva: s3, color: r4 }, u3(r4));
    }, [s3, e3, u3]);
    var d3 = (0, import_react104.useCallback)(function(e4) {
      f3(function(r4) {
        return Object.assign({}, r4, e4);
      });
    }, []);
    return [s3, d3];
  }
  var R;
  var V2 = "undefined" != typeof window ? import_react104.useLayoutEffect : import_react104.useEffect;
  var $2 = function() {
    return R || ("undefined" != typeof __webpack_nonce__ ? __webpack_nonce__ : void 0);
  };
  var J = /* @__PURE__ */ new Map();
  var Q = function(e3) {
    V2(function() {
      var r4 = e3.current ? e3.current.ownerDocument : document;
      if (void 0 !== r4 && !J.has(r4)) {
        var t4 = r4.createElement("style");
        t4.innerHTML = `.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`, J.set(r4, t4);
        var n3 = $2();
        n3 && t4.setAttribute("nonce", n3), r4.head.appendChild(t4);
      }
    }, []);
  };
  var U = function(t4) {
    var n3 = t4.className, o4 = t4.colorModel, a3 = t4.color, l3 = void 0 === a3 ? o4.defaultColor : a3, i3 = t4.onChange, s3 = c2(t4, ["className", "colorModel", "color", "onChange"]), f3 = (0, import_react104.useRef)(null);
    Q(f3);
    var v3 = Y(o4, l3, i3), d3 = v3[0], h3 = v3[1], m3 = g2(["react-colorful", n3]);
    return import_react104.default.createElement("div", u2({}, s3, { ref: f3, className: m3 }), import_react104.default.createElement(T, { hsva: d3, onChange: h3 }), import_react104.default.createElement(S2, { hue: d3.h, onChange: h3, className: "react-colorful__last-control" }));
  };
  var ee = function(r4) {
    var t4 = r4.className, n3 = r4.hsva, o4 = r4.onChange, a3 = { backgroundImage: "linear-gradient(90deg, " + k2(Object.assign({}, n3, { a: 0 })) + ", " + k2(Object.assign({}, n3, { a: 1 })) + ")" }, l3 = g2(["react-colorful__alpha", t4]), u3 = b2(100 * n3.a);
    return import_react104.default.createElement("div", { className: l3 }, import_react104.default.createElement("div", { className: "react-colorful__alpha-gradient", style: a3 }), import_react104.default.createElement(m2, { onMove: function(e3) {
      o4({ a: e3.left });
    }, onKey: function(e3) {
      o4({ a: s2(n3.a + e3.left) });
    }, "aria-label": "Alpha", "aria-valuetext": u3 + "%", "aria-valuenow": u3, "aria-valuemin": "0", "aria-valuemax": "100" }, import_react104.default.createElement(p2, { className: "react-colorful__alpha-pointer", left: n3.a, color: k2(n3) })));
  };
  var re = function(t4) {
    var n3 = t4.className, o4 = t4.colorModel, a3 = t4.color, l3 = void 0 === a3 ? o4.defaultColor : a3, i3 = t4.onChange, s3 = c2(t4, ["className", "colorModel", "color", "onChange"]), f3 = (0, import_react104.useRef)(null);
    Q(f3);
    var v3 = Y(o4, l3, i3), d3 = v3[0], h3 = v3[1], m3 = g2(["react-colorful", n3]);
    return import_react104.default.createElement("div", u2({}, s3, { ref: f3, className: m3 }), import_react104.default.createElement(T, { hsva: d3, onChange: h3 }), import_react104.default.createElement(S2, { hue: d3.h, onChange: h3 }), import_react104.default.createElement(ee, { hsva: d3, onChange: h3, className: "react-colorful__last-control" }));
  };
  var Ee = { defaultColor: "rgba(0, 0, 0, 1)", toHsva: z, fromHsva: function(e3) {
    var r4 = I2(e3);
    return "rgba(" + r4.r + ", " + r4.g + ", " + r4.b + ", " + r4.a + ")";
  }, equal: P };
  var He = function(r4) {
    return import_react104.default.createElement(re, u2({}, r4, { colorModel: Ee }));
  };
  var we = { defaultColor: "rgb(0, 0, 0)", toHsva: B, fromHsva: function(e3) {
    var r4 = I2(e3);
    return "rgb(" + r4.r + ", " + r4.g + ", " + r4.b + ")";
  }, equal: P };
  var ye = function(r4) {
    return import_react104.default.createElement(U, u2({}, r4, { colorModel: we }));
  };

  // packages/components/build-module/color-picker/picker.mjs
  var import_element75 = __toESM(require_element(), 1);
  var import_jsx_runtime136 = __toESM(require_jsx_runtime(), 1);
  var Picker = ({
    color: color2,
    enableAlpha,
    onChange
  }) => {
    const Component9 = enableAlpha ? He : ye;
    const rgbColor = (0, import_element75.useMemo)(() => color2.toRgbString(), [color2]);
    return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Component9, {
      color: rgbColor,
      onChange: (nextColor) => {
        onChange(w(nextColor));
      },
      onPointerDown: ({
        currentTarget,
        pointerId: pointerId2
      }) => {
        currentTarget.setPointerCapture(pointerId2);
      },
      onPointerUp: ({
        currentTarget,
        pointerId: pointerId2
      }) => {
        currentTarget.releasePointerCapture(pointerId2);
      }
    });
  };

  // packages/components/build-module/color-picker/component.mjs
  var import_jsx_runtime137 = __toESM(require_jsx_runtime(), 1);
  k([names_default]);
  var options = [{
    label: "RGB",
    value: "rgb"
  }, {
    label: "HSL",
    value: "hsl"
  }, {
    label: "Hex",
    value: "hex"
  }];
  var UnconnectedColorPicker = (props, forwardedRef) => {
    const {
      enableAlpha = false,
      color: colorProp,
      onChange,
      defaultValue: defaultValue2 = "#fff",
      copyFormat,
      ...divProps
    } = useContextSystem(props, "ColorPicker");
    const [color2, setColor] = useControlledValue({
      onChange,
      value: colorProp,
      defaultValue: defaultValue2
    });
    const safeColordColor = (0, import_element76.useMemo)(() => {
      return w(color2 || "");
    }, [color2]);
    const debouncedSetColor = (0, import_compose31.useDebounce)(setColor);
    const handleChange = (0, import_element76.useCallback)((nextValue) => {
      debouncedSetColor(nextValue.toHex());
    }, [debouncedSetColor]);
    const [colorType, setColorType] = (0, import_element76.useState)(copyFormat || "hex");
    const maybeHandlePaste = (0, import_element76.useCallback)((event) => {
      const pastedText = event.clipboardData?.getData("text")?.trim();
      if (!pastedText) {
        return;
      }
      const parsedColor = w(pastedText);
      if (!parsedColor.isValid()) {
        return;
      }
      handleChange(parsedColor);
      const supportedFormats = {
        hex: "hex",
        rgb: "rgb",
        hsl: "hsl"
      };
      const detectedFormat = String(I(pastedText));
      const newColorType = supportedFormats[detectedFormat];
      if (newColorType) {
        setColorType(newColorType);
      }
      event.stopPropagation();
      event.preventDefault();
    }, [handleChange, setColorType]);
    return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(ColorfulWrapper, {
      ref: forwardedRef,
      ...divProps,
      onPasteCapture: maybeHandlePaste,
      children: [/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Picker, {
        onChange: handleChange,
        color: safeColordColor,
        enableAlpha
      }), /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(AuxiliaryColorArtefactWrapper, {
        children: [/* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(AuxiliaryColorArtefactHStackHeader, {
          justify: "space-between",
          children: [/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(SelectControl2, {
            size: "compact",
            options,
            value: colorType,
            onChange: (nextColorType) => setColorType(nextColorType),
            label: (0, import_i18n16.__)("Color format"),
            hideLabelFromVision: true,
            variant: "minimal"
          }), /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ColorCopyButton, {
            color: safeColordColor,
            colorType: copyFormat || colorType
          })]
        }), /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ColorInputWrapper, {
          direction: "column",
          gap: 2,
          children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ColorInput, {
            colorType,
            color: safeColordColor,
            onChange: handleChange,
            enableAlpha
          })
        })]
      })]
    });
  };
  var ColorPicker = contextConnect(UnconnectedColorPicker, "ColorPicker");
  var component_default17 = ColorPicker;

  // packages/components/build-module/color-picker/use-deprecated-props.mjs
  var import_element77 = __toESM(require_element(), 1);
  function isLegacyProps(props) {
    return typeof props.onChangeComplete !== "undefined" || typeof props.disableAlpha !== "undefined" || typeof props.color?.hex === "string";
  }
  function getColorFromLegacyProps(color2) {
    if (color2 === void 0) {
      return;
    }
    if (typeof color2 === "string") {
      return color2;
    }
    if (color2.hex) {
      return color2.hex;
    }
    return void 0;
  }
  var transformColorStringToLegacyColor = memize((color2) => {
    const colordColor = w(color2);
    const hex2 = colordColor.toHex();
    const rgb = colordColor.toRgb();
    const hsv = colordColor.toHsv();
    const hsl = colordColor.toHsl();
    return {
      hex: hex2,
      rgb,
      hsv,
      hsl,
      source: "hex",
      oldHue: hsl.h
    };
  });
  function useDeprecatedProps3(props) {
    const {
      onChangeComplete
    } = props;
    const legacyChangeHandler = (0, import_element77.useCallback)((color2) => {
      onChangeComplete(transformColorStringToLegacyColor(color2));
    }, [onChangeComplete]);
    if (isLegacyProps(props)) {
      return {
        color: getColorFromLegacyProps(props.color),
        enableAlpha: !props.disableAlpha,
        onChange: legacyChangeHandler
      };
    }
    return {
      ...props,
      color: props.color,
      enableAlpha: props.enableAlpha,
      onChange: props.onChange
    };
  }

  // packages/components/build-module/color-picker/legacy-adapter.mjs
  var import_jsx_runtime138 = __toESM(require_jsx_runtime(), 1);
  var LegacyAdapter = (props) => {
    return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(component_default17, {
      ...useDeprecatedProps3(props)
    });
  };

  // packages/components/build-module/circular-option-picker/circular-option-picker.mjs
  var import_compose33 = __toESM(require_compose(), 1);
  var import_i18n17 = __toESM(require_i18n(), 1);
  var import_element80 = __toESM(require_element(), 1);

  // packages/components/build-module/circular-option-picker/circular-option-picker-context.mjs
  var import_element78 = __toESM(require_element(), 1);
  var CircularOptionPickerContext = (0, import_element78.createContext)({});
  CircularOptionPickerContext.displayName = "CircularOptionPickerContext";

  // packages/components/build-module/circular-option-picker/circular-option-picker-option.mjs
  var import_compose32 = __toESM(require_compose(), 1);
  var import_element79 = __toESM(require_element(), 1);
  var import_jsx_runtime139 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedOptionAsButton(props, forwardedRef) {
    const {
      isPressed,
      label,
      ...additionalProps
    } = props;
    return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(button_default, {
      __next40pxDefaultSize: true,
      ...additionalProps,
      "aria-pressed": isPressed,
      ref: forwardedRef,
      label
    });
  }
  var OptionAsButton = (0, import_element79.forwardRef)(UnforwardedOptionAsButton);
  function UnforwardedOptionAsOption(props, forwardedRef) {
    const {
      id: id3,
      isSelected: isSelected2,
      label,
      ...additionalProps
    } = props;
    const {
      setActiveId,
      activeId
    } = (0, import_element79.useContext)(CircularOptionPickerContext);
    (0, import_element79.useEffect)(() => {
      if (isSelected2 && !activeId) {
        window.setTimeout(() => setActiveId?.(id3), 0);
      }
    }, [isSelected2, setActiveId, activeId, id3]);
    return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Composite22.Item, {
      render: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(button_default, {
        __next40pxDefaultSize: true,
        ...additionalProps,
        role: "option",
        "aria-selected": !!isSelected2,
        ref: forwardedRef,
        label
      }),
      id: id3
    });
  }
  var OptionAsOption = (0, import_element79.forwardRef)(UnforwardedOptionAsOption);
  function Option({
    className: className2,
    isSelected: isSelected2,
    selectedIconProps = {},
    tooltipText,
    ...additionalProps
  }) {
    const {
      baseId,
      setActiveId
    } = (0, import_element79.useContext)(CircularOptionPickerContext);
    const id3 = (0, import_compose32.useInstanceId)(Option, baseId || "components-circular-option-picker__option");
    const commonProps = {
      id: id3,
      className: "components-circular-option-picker__option",
      ...additionalProps
    };
    const isListbox = setActiveId !== void 0;
    const optionControl = isListbox ? /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(OptionAsOption, {
      ...commonProps,
      label: tooltipText,
      isSelected: isSelected2
    }) : /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(OptionAsButton, {
      ...commonProps,
      label: tooltipText,
      isPressed: isSelected2
    });
    return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", {
      className: clsx_default(className2, "components-circular-option-picker__option-wrapper"),
      children: [optionControl, isSelected2 && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(icon_default2, {
        icon: check_default,
        ...selectedIconProps
      })]
    });
  }

  // packages/components/build-module/circular-option-picker/circular-option-picker-option-group.mjs
  var import_jsx_runtime140 = __toESM(require_jsx_runtime(), 1);
  function OptionGroup({
    className: className2,
    options: options2,
    ...additionalProps
  }) {
    const role = "aria-label" in additionalProps || "aria-labelledby" in additionalProps ? "group" : void 0;
    return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", {
      ...additionalProps,
      role,
      className: clsx_default("components-circular-option-picker__option-group", "components-circular-option-picker__swatches", className2),
      children: options2
    });
  }

  // packages/components/build-module/circular-option-picker/circular-option-picker-actions.mjs
  var import_jsx_runtime141 = __toESM(require_jsx_runtime(), 1);
  function DropdownLinkAction({
    buttonProps,
    className: className2,
    dropdownProps,
    linkText
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(dropdown_default, {
      className: clsx_default("components-circular-option-picker__dropdown-link-action", className2),
      renderToggle: ({
        isOpen,
        onToggle
      }) => /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(button_default, {
        "aria-expanded": isOpen,
        "aria-haspopup": "true",
        onClick: onToggle,
        variant: "link",
        ...buttonProps,
        children: linkText
      }),
      ...dropdownProps
    });
  }
  function ButtonAction({
    className: className2,
    children,
    ...additionalProps
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(button_default, {
      __next40pxDefaultSize: true,
      className: clsx_default("components-circular-option-picker__clear", className2),
      variant: "tertiary",
      ...additionalProps,
      children
    });
  }

  // packages/components/build-module/circular-option-picker/circular-option-picker.mjs
  var import_jsx_runtime142 = __toESM(require_jsx_runtime(), 1);
  function ListboxCircularOptionPicker(props) {
    const {
      actions,
      options: options2,
      baseId,
      className: className2,
      loop = true,
      children,
      ...additionalProps
    } = props;
    const [activeId, setActiveId] = (0, import_element80.useState)(void 0);
    const contextValue = (0, import_element80.useMemo)(() => ({
      baseId,
      activeId,
      setActiveId
    }), [baseId, activeId, setActiveId]);
    return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", {
      className: className2,
      children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(CircularOptionPickerContext.Provider, {
        value: contextValue,
        children: [/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Composite22, {
          ...additionalProps,
          id: baseId,
          focusLoop: loop,
          rtl: (0, import_i18n17.isRTL)(),
          role: "listbox",
          activeId,
          setActiveId,
          children: options2
        }), children, actions]
      })
    });
  }
  function ButtonsCircularOptionPicker(props) {
    const {
      actions,
      options: options2,
      children,
      baseId,
      ...additionalProps
    } = props;
    const contextValue = (0, import_element80.useMemo)(() => ({
      baseId
    }), [baseId]);
    return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", {
      ...additionalProps,
      role: "group",
      id: baseId,
      children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(CircularOptionPickerContext.Provider, {
        value: contextValue,
        children: [options2, children, actions]
      })
    });
  }
  function CircularOptionPicker(props) {
    const {
      asButtons,
      actions: actionsProp,
      options: optionsProp,
      children,
      className: className2,
      ...additionalProps
    } = props;
    const baseId = (0, import_compose33.useInstanceId)(CircularOptionPicker, "components-circular-option-picker", additionalProps.id);
    const OptionPickerImplementation = asButtons ? ButtonsCircularOptionPicker : ListboxCircularOptionPicker;
    const actions = actionsProp ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", {
      className: "components-circular-option-picker__custom-clear-wrapper",
      children: actionsProp
    }) : void 0;
    const options2 = /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", {
      className: "components-circular-option-picker__swatches",
      children: optionsProp
    });
    return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(OptionPickerImplementation, {
      ...additionalProps,
      baseId,
      className: clsx_default("components-circular-option-picker", className2),
      actions,
      options: options2,
      children
    });
  }
  CircularOptionPicker.Option = Option;
  CircularOptionPicker.OptionGroup = OptionGroup;
  CircularOptionPicker.ButtonAction = ButtonAction;
  CircularOptionPicker.DropdownLinkAction = DropdownLinkAction;
  CircularOptionPicker.displayName = "CircularOptionPicker";
  var circular_option_picker_default = CircularOptionPicker;

  // packages/components/build-module/circular-option-picker/utils.mjs
  var import_i18n18 = __toESM(require_i18n(), 1);
  function getComputeCircularOptionPickerCommonProps(asButtons, loop, ariaLabel, ariaLabelledby) {
    const metaProps = asButtons ? {
      asButtons: true
    } : {
      asButtons: false,
      loop
    };
    const labelProps = {
      "aria-labelledby": ariaLabelledby,
      "aria-label": ariaLabelledby ? void 0 : ariaLabel || (0, import_i18n18.__)("Custom color picker")
    };
    return {
      metaProps,
      labelProps
    };
  }

  // packages/components/build-module/circular-option-picker/index.mjs
  var circular_option_picker_default2 = circular_option_picker_default;

  // packages/components/build-module/v-stack/hook.mjs
  function useVStack(props) {
    const {
      expanded = false,
      alignment = "stretch",
      ...otherProps
    } = useContextSystem(props, "VStack");
    const hStackProps = useHStack({
      direction: "column",
      expanded,
      alignment,
      ...otherProps
    });
    return hStackProps;
  }

  // packages/components/build-module/v-stack/component.mjs
  var import_jsx_runtime143 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedVStack(props, forwardedRef) {
    const vStackProps = useVStack(props);
    return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(component_default, {
      ...vStackProps,
      ref: forwardedRef
    });
  }
  var VStack = contextConnect(UnconnectedVStack, "VStack");
  var component_default18 = VStack;

  // packages/components/build-module/heading/hook.mjs
  function useHeading(props) {
    const {
      as: asProp,
      level = 2,
      color: color2 = COLORS.theme.foreground,
      isBlock = true,
      weight = config_values_default.fontWeightHeading,
      ...otherProps
    } = useContextSystem(props, "Heading");
    const as = asProp || `h${level}`;
    const a11yProps = {};
    if (typeof as === "string" && as[0] !== "h") {
      a11yProps.role = "heading";
      a11yProps["aria-level"] = typeof level === "string" ? parseInt(level) : level;
    }
    const textProps = useText({
      color: color2,
      isBlock,
      weight,
      size: getHeadingFontSize(level),
      ...otherProps
    });
    return {
      ...textProps,
      ...a11yProps,
      as
    };
  }

  // packages/components/build-module/heading/component.mjs
  var import_jsx_runtime144 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedHeading(props, forwardedRef) {
    const headerProps = useHeading(props);
    return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(component_default, {
      ...headerProps,
      ref: forwardedRef
    });
  }
  var Heading = contextConnect(UnconnectedHeading, "Heading");
  var component_default19 = Heading;

  // packages/components/build-module/color-palette/styles.mjs
  var ColorHeading = /* @__PURE__ */ createStyled(component_default19, false ? {
    target: "ev9wop70"
  } : {
    target: "ev9wop70",
    label: "ColorHeading"
  })("text-transform:uppercase;line-height:24px;font-weight:", config_values_default.fontWeightMedium, ";&&&{font-size:11px;margin-bottom:0;}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFXNkMiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBIZWFkaW5nIH0gZnJvbSAnLi4vaGVhZGluZyc7XG5pbXBvcnQgeyBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBDb2xvckhlYWRpbmcgPSBzdHlsZWQoIEhlYWRpbmcgKWBcblx0dGV4dC10cmFuc2Zvcm06IHVwcGVyY2FzZTtcblx0bGluZS1oZWlnaHQ6IDI0cHg7XG5cdGZvbnQtd2VpZ2h0OiAkeyBDT05GSUcuZm9udFdlaWdodE1lZGl1bSB9O1xuXHQmJiYge1xuXHRcdGZvbnQtc2l6ZTogMTFweDtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5gO1xuIl19 */"));

  // packages/components/build-module/dropdown/styles.mjs
  var padding = ({
    paddingSize = "small"
  }) => {
    if (paddingSize === "none") {
      return;
    }
    const paddingValues = {
      small: space(2),
      medium: space(4)
    };
    return /* @__PURE__ */ css("padding:", paddingValues[paddingSize] || paddingValues.small, ";" + (false ? "" : ";label:padding;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQlciLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB0eXBlIHsgRHJvcGRvd25Db250ZW50V3JhcHBlclByb3BzIH0gZnJvbSAnLi90eXBlcyc7XG5cbmNvbnN0IHBhZGRpbmcgPSAoIHsgcGFkZGluZ1NpemUgPSAnc21hbGwnIH06IERyb3Bkb3duQ29udGVudFdyYXBwZXJQcm9wcyApID0+IHtcblx0aWYgKCBwYWRkaW5nU2l6ZSA9PT0gJ25vbmUnICkge1xuXHRcdHJldHVybjtcblx0fVxuXG5cdGNvbnN0IHBhZGRpbmdWYWx1ZXMgPSB7XG5cdFx0c21hbGw6IHNwYWNlKCAyICksXG5cdFx0bWVkaXVtOiBzcGFjZSggNCApLFxuXHR9O1xuXG5cdHJldHVybiBjc3NgXG5cdFx0cGFkZGluZzogJHsgcGFkZGluZ1ZhbHVlc1sgcGFkZGluZ1NpemUgXSB8fCBwYWRkaW5nVmFsdWVzLnNtYWxsIH07XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgRHJvcGRvd25Db250ZW50V3JhcHBlckRpdiA9IHN0eWxlZC5kaXY8IERyb3Bkb3duQ29udGVudFdyYXBwZXJQcm9wcyA+YFxuXHQvLyBOZWdhdGl2ZSBtYXJnaW4gdG8gcmVzZXQgKG9mZnNldCkgdGhlIGRlZmF1bHQgcGFkZGluZyBvbiAuY29tcG9uZW50cy1wb3BvdmVyX19jb250ZW50XG5cdG1hcmdpbi1sZWZ0OiAkeyBzcGFjZSggLTIgKSB9O1xuXHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAtMiApIH07XG5cdCY6Zmlyc3Qtb2YtdHlwZSB7XG5cdFx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIC0yICkgfTtcblx0fVxuXHQmOmxhc3Qtb2YtdHlwZSB7XG5cdFx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIC0yICkgfTtcblx0fVxuXG5cdCR7IHBhZGRpbmcgfTtcbmA7XG4iXX0= */");
  };
  var DropdownContentWrapperDiv = /* @__PURE__ */ createStyled("div", false ? {
    target: "eovvns30"
  } : {
    target: "eovvns30",
    label: "DropdownContentWrapperDiv"
  })("margin-left:", space(-2), ";margin-right:", space(-2), ";&:first-of-type{margin-top:", space(-2), ";}&:last-of-type{margin-bottom:", space(-2), ";}", padding, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyQmtGIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgdHlwZSB7IERyb3Bkb3duQ29udGVudFdyYXBwZXJQcm9wcyB9IGZyb20gJy4vdHlwZXMnO1xuXG5jb25zdCBwYWRkaW5nID0gKCB7IHBhZGRpbmdTaXplID0gJ3NtYWxsJyB9OiBEcm9wZG93bkNvbnRlbnRXcmFwcGVyUHJvcHMgKSA9PiB7XG5cdGlmICggcGFkZGluZ1NpemUgPT09ICdub25lJyApIHtcblx0XHRyZXR1cm47XG5cdH1cblxuXHRjb25zdCBwYWRkaW5nVmFsdWVzID0ge1xuXHRcdHNtYWxsOiBzcGFjZSggMiApLFxuXHRcdG1lZGl1bTogc3BhY2UoIDQgKSxcblx0fTtcblxuXHRyZXR1cm4gY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHBhZGRpbmdWYWx1ZXNbIHBhZGRpbmdTaXplIF0gfHwgcGFkZGluZ1ZhbHVlcy5zbWFsbCB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IERyb3Bkb3duQ29udGVudFdyYXBwZXJEaXYgPSBzdHlsZWQuZGl2PCBEcm9wZG93bkNvbnRlbnRXcmFwcGVyUHJvcHMgPmBcblx0Ly8gTmVnYXRpdmUgbWFyZ2luIHRvIHJlc2V0IChvZmZzZXQpIHRoZSBkZWZhdWx0IHBhZGRpbmcgb24gLmNvbXBvbmVudHMtcG9wb3Zlcl9fY29udGVudFxuXHRtYXJnaW4tbGVmdDogJHsgc3BhY2UoIC0yICkgfTtcblx0bWFyZ2luLXJpZ2h0OiAkeyBzcGFjZSggLTIgKSB9O1xuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdG1hcmdpbi10b3A6ICR7IHNwYWNlKCAtMiApIH07XG5cdH1cblx0JjpsYXN0LW9mLXR5cGUge1xuXHRcdG1hcmdpbi1ib3R0b206ICR7IHNwYWNlKCAtMiApIH07XG5cdH1cblxuXHQkeyBwYWRkaW5nIH07XG5gO1xuIl19 */"));

  // packages/components/build-module/dropdown/dropdown-content-wrapper.mjs
  var import_jsx_runtime145 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedDropdownContentWrapper(props, forwardedRef) {
    const {
      paddingSize = "small",
      ...derivedProps
    } = useContextSystem(props, "DropdownContentWrapper");
    return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(DropdownContentWrapperDiv, {
      ...derivedProps,
      paddingSize,
      ref: forwardedRef
    });
  }
  var DropdownContentWrapper = contextConnect(UnconnectedDropdownContentWrapper, "DropdownContentWrapper");
  var dropdown_content_wrapper_default = DropdownContentWrapper;

  // packages/components/build-module/color-palette/utils.mjs
  var import_i18n19 = __toESM(require_i18n(), 1);
  k([names_default, a11y_default]);
  var isSimpleCSSColor = (value) => {
    const valueIsCssVariable = /var\(/.test(value ?? "");
    const valueIsColorMix = /color-mix\(/.test(value ?? "");
    return !valueIsCssVariable && !valueIsColorMix;
  };
  var extractColorNameFromCurrentValue = (currentValue, colors = [], showMultiplePalettes = false) => {
    if (!currentValue) {
      return "";
    }
    const currentValueIsSimpleColor = currentValue ? isSimpleCSSColor(currentValue) : false;
    const normalizedCurrentValue = currentValueIsSimpleColor ? w(currentValue).toHex() : currentValue;
    const colorPalettes = showMultiplePalettes ? colors : [{
      colors
    }];
    for (const {
      colors: paletteColors
    } of colorPalettes) {
      for (const {
        name: colorName,
        color: colorValue
      } of paletteColors) {
        const normalizedColorValue = currentValueIsSimpleColor ? w(colorValue).toHex() : colorValue;
        if (normalizedCurrentValue === normalizedColorValue) {
          return colorName;
        }
      }
    }
    return (0, import_i18n19.__)("Custom");
  };
  var isMultiplePaletteObject = (obj) => Array.isArray(obj.colors) && !("color" in obj);
  var isMultiplePaletteArray = (arr) => {
    return arr.length > 0 && arr.every((colorObj) => isMultiplePaletteObject(colorObj));
  };
  var normalizeColorValue = (value, element) => {
    if (!value || !element || isSimpleCSSColor(value)) {
      return value;
    }
    const {
      ownerDocument
    } = element;
    const {
      defaultView
    } = ownerDocument;
    const computedBackgroundColor = defaultView?.getComputedStyle(element).backgroundColor;
    return computedBackgroundColor ? w(computedBackgroundColor).toHex() : value;
  };

  // packages/components/build-module/color-palette/index.mjs
  var import_jsx_runtime146 = __toESM(require_jsx_runtime(), 1);
  k([names_default, a11y_default]);
  function SinglePalette({
    className: className2,
    clearColor,
    colors,
    onChange,
    value,
    ...additionalProps
  }) {
    const colorOptions = (0, import_element81.useMemo)(() => {
      return colors.map(({
        color: color2,
        name
      }, index2) => {
        const colordColor = w(color2);
        const isSelected2 = value === color2;
        return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(circular_option_picker_default2.Option, {
          isSelected: isSelected2,
          selectedIconProps: isSelected2 ? {
            fill: colordColor.contrast() > colordColor.contrast("#000") ? "#fff" : "#000"
          } : {},
          tooltipText: name || // translators: %s: color hex code e.g: "#f00".
          (0, import_i18n20.sprintf)((0, import_i18n20.__)("Color code: %s"), color2),
          style: {
            backgroundColor: color2,
            color: color2
          },
          onClick: isSelected2 ? clearColor : () => onChange(color2, index2)
        }, `${color2}-${index2}`);
      });
    }, [colors, value, onChange, clearColor]);
    return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(circular_option_picker_default2.OptionGroup, {
      className: className2,
      options: colorOptions,
      ...additionalProps
    });
  }
  function MultiplePalettes({
    className: className2,
    clearColor,
    colors,
    onChange,
    value,
    headingLevel
  }) {
    const instanceId = (0, import_compose34.useInstanceId)(MultiplePalettes, "color-palette");
    if (colors.length === 0) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(component_default18, {
      spacing: 3,
      className: className2,
      children: colors.map(({
        name,
        colors: colorPalette
      }, index2) => {
        const id3 = `${instanceId}-${index2}`;
        return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(component_default18, {
          spacing: 2,
          children: [/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(ColorHeading, {
            id: id3,
            level: headingLevel,
            children: name
          }), /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(SinglePalette, {
            clearColor,
            colors: colorPalette,
            onChange: (newColor) => onChange(newColor, index2),
            value,
            "aria-labelledby": id3
          })]
        }, index2);
      })
    });
  }
  function CustomColorPickerDropdown({
    isRenderedInSidebar,
    popoverProps: receivedPopoverProps,
    ...props
  }) {
    const popoverProps = (0, import_element81.useMemo)(() => ({
      shift: true,
      // Disabling resize as it would otherwise cause the popover to show
      // scrollbars while dragging the color picker's handle close to the
      // popover edge.
      resize: false,
      ...isRenderedInSidebar ? {
        // When in the sidebar: open to the left (stacking),
        // leaving the same gap as the parent popover.
        placement: "left-start",
        offset: 34
      } : {
        // Default behavior: open below the anchor
        placement: "bottom",
        offset: 8
      },
      ...receivedPopoverProps
    }), [isRenderedInSidebar, receivedPopoverProps]);
    return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(dropdown_default, {
      contentClassName: "components-color-palette__custom-color-dropdown-content",
      popoverProps,
      ...props
    });
  }
  function UnforwardedColorPalette(props, forwardedRef) {
    const {
      asButtons,
      loop,
      clearable = true,
      colors = [],
      disableCustomColors = false,
      enableAlpha = false,
      onChange,
      value,
      __experimentalIsRenderedInSidebar = false,
      headingLevel = 2,
      "aria-label": ariaLabel,
      "aria-labelledby": ariaLabelledby,
      ...additionalProps
    } = props;
    const [normalizedColorValue, setNormalizedColorValue] = (0, import_element81.useState)(value);
    const clearColor = (0, import_element81.useCallback)(() => onChange(void 0), [onChange]);
    const customColorPaletteCallbackRef = (0, import_element81.useCallback)((node2) => {
      setNormalizedColorValue(normalizeColorValue(value, node2));
    }, [value]);
    const hasMultipleColorOrigins = isMultiplePaletteArray(colors);
    const buttonLabelName = (0, import_element81.useMemo)(() => extractColorNameFromCurrentValue(value, colors, hasMultipleColorOrigins), [value, colors, hasMultipleColorOrigins]);
    const renderCustomColorPicker = () => /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(dropdown_content_wrapper_default, {
      paddingSize: "none",
      children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(LegacyAdapter, {
        color: normalizedColorValue,
        onChange: (color2) => onChange(color2),
        enableAlpha
      })
    });
    const isHex = value?.startsWith("#");
    const displayValue = value?.replace(/^var\((.+)\)$/, "$1");
    const customColorAccessibleLabel = !!displayValue ? (0, import_i18n20.sprintf)(
      // translators: 1: The name of the color e.g: "vivid red". 2: The color's hex code e.g: "#f00".
      (0, import_i18n20.__)('Custom color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'),
      buttonLabelName,
      displayValue
    ) : (0, import_i18n20.__)("Custom color picker");
    const paletteCommonProps = {
      clearColor,
      onChange,
      value
    };
    const actions = !!clearable && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(circular_option_picker_default2.ButtonAction, {
      onClick: clearColor,
      accessibleWhenDisabled: true,
      disabled: !value,
      children: (0, import_i18n20.__)("Clear")
    });
    const {
      metaProps,
      labelProps
    } = getComputeCircularOptionPickerCommonProps(asButtons, loop, ariaLabel, ariaLabelledby);
    return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(component_default18, {
      spacing: 3,
      ref: forwardedRef,
      ...additionalProps,
      children: [!disableCustomColors && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(CustomColorPickerDropdown, {
        isRenderedInSidebar: __experimentalIsRenderedInSidebar,
        renderContent: renderCustomColorPicker,
        renderToggle: ({
          isOpen,
          onToggle
        }) => /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(component_default18, {
          className: "components-color-palette__custom-color-wrapper",
          spacing: 0,
          children: [/* @__PURE__ */ (0, import_jsx_runtime146.jsx)("button", {
            ref: customColorPaletteCallbackRef,
            className: "components-color-palette__custom-color-button",
            "aria-expanded": isOpen,
            "aria-haspopup": "true",
            onClick: onToggle,
            "aria-label": customColorAccessibleLabel,
            style: {
              background: value
            },
            type: "button"
          }), /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(component_default18, {
            className: "components-color-palette__custom-color-text-wrapper",
            spacing: 0.5,
            children: [/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(component_default7, {
              className: "components-color-palette__custom-color-name",
              children: value ? buttonLabelName : (0, import_i18n20.__)("No color selected")
            }), /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(component_default7, {
              className: clsx_default("components-color-palette__custom-color-value", {
                "components-color-palette__custom-color-value--is-hex": isHex
              }),
              children: displayValue
            })]
          })]
        })
      }), (colors.length > 0 || actions) && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(circular_option_picker_default2, {
        ...metaProps,
        ...labelProps,
        actions,
        options: hasMultipleColorOrigins ? /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(MultiplePalettes, {
          ...paletteCommonProps,
          headingLevel,
          colors,
          value
        }) : /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(SinglePalette, {
          ...paletteCommonProps,
          colors,
          value
        })
      })]
    });
  }
  var ColorPalette = (0, import_element81.forwardRef)(UnforwardedColorPalette);
  ColorPalette.displayName = "ColorPalette";
  var color_palette_default = ColorPalette;

  // packages/components/build-module/border-control/border-control-dropdown/hook.mjs
  var import_element83 = __toESM(require_element(), 1);

  // packages/components/build-module/unit-control/styles/unit-control-styles.mjs
  var ValueInput = /* @__PURE__ */ createStyled(number_control_default, false ? {
    target: "e1bagdl32"
  } : {
    target: "e1bagdl32",
    label: "ValueInput"
  })("&&&{input{display:block;width:100%;}", BackdropUI, "{transition:box-shadow 0.1s linear;}}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInVuaXQtY29udHJvbC1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBdUJpRCIsImZpbGUiOiJ1bml0LWNvbnRyb2wtc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCBOdW1iZXJDb250cm9sIGZyb20gJy4uLy4uL251bWJlci1jb250cm9sJztcbmltcG9ydCB7IEJhY2tkcm9wVUkgfSBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL3N0eWxlcy9pbnB1dC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgdHlwZSB7IFNlbGVjdFNpemUgfSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuLy8gVXNpbmcgYHNlbGVjdFNpemVgIGluc3RlYWQgb2YgYHNpemVgIHRvIGF2b2lkIGEgdHlwZSBjb25mbGljdCB3aXRoIHRoZVxuLy8gYHNpemVgIEhUTUwgYXR0cmlidXRlIG9mIHRoZSBgc2VsZWN0YCBlbGVtZW50LlxudHlwZSBTZWxlY3RQcm9wcyA9IHtcblx0c2VsZWN0U2l6ZTogU2VsZWN0U2l6ZTtcbn07XG5cbi8vIFRPRE86IFJlc29sdmUgbmVlZCB0byB1c2UgJiYmIHRvIGluY3JlYXNlIHNwZWNpZmljaXR5XG4vLyBodHRwczovL2dpdGh1Yi5jb20vV29yZFByZXNzL2d1dGVuYmVyZy9pc3N1ZXMvMTg0ODNcblxuZXhwb3J0IGNvbnN0IFZhbHVlSW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JiYmIHtcblx0XHRpbnB1dCB7XG5cdFx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRcdHdpZHRoOiAxMDAlO1xuXHRcdH1cblxuXHRcdCR7IEJhY2tkcm9wVUkgfSB7XG5cdFx0XHR0cmFuc2l0aW9uOiBib3gtc2hhZG93IDAuMXMgbGluZWFyO1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgYmFzZVVuaXRMYWJlbFN0eWxlcyA9ICggeyBzZWxlY3RTaXplIH06IFNlbGVjdFByb3BzICkgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRzbWFsbDogY3NzYFxuXHRcdFx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0XHRcdHBhZGRpbmc6IDJweCAxcHg7XG5cdFx0XHR3aWR0aDogMjBweDtcblx0XHRcdGZvbnQtc2l6ZTogOHB4O1xuXHRcdFx0bGluZS1oZWlnaHQ6IDE7XG5cdFx0XHRsZXR0ZXItc3BhY2luZzogLTAuNXB4O1xuXHRcdFx0dGV4dC10cmFuc2Zvcm06IHVwcGVyY2FzZTtcblx0XHRcdHRleHQtYWxpZ24tbGFzdDogY2VudGVyO1xuXG5cdFx0XHQmOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0XHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDgwMCBdIH07XG5cdFx0XHR9XG5cdFx0YCxcblx0XHRkZWZhdWx0OiBjc3NgXG5cdFx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdFx0bWluLXdpZHRoOiAyNHB4O1xuXHRcdFx0bWF4LXdpZHRoOiA0OHB4O1xuXHRcdFx0aGVpZ2h0OiAyNHB4O1xuXHRcdFx0bWFyZ2luLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAyICkgfTtcblx0XHRcdHBhZGRpbmc6ICR7IHNwYWNlKCAxICkgfTtcblxuXHRcdFx0Zm9udC1zaXplOiAxM3B4O1xuXHRcdFx0bGluZS1oZWlnaHQ6IDE7XG5cdFx0XHR0ZXh0LWFsaWduLWxhc3Q6IGNlbnRlcjtcblx0XHRcdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cdFx0XHRvdmVyZmxvdzogaGlkZGVuO1xuXHRcdFx0dGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5cdFx0XHRmaWVsZC1zaXppbmc6IGNvbnRlbnQ7XG5cblx0XHRcdCY6bm90KCA6ZGlzYWJsZWQgKSB7XG5cdFx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHR9XG5cdFx0YCxcblx0fTtcblxuXHRyZXR1cm4gc2l6ZXNbIHNlbGVjdFNpemUgXTtcbn07XG5cbmV4cG9ydCBjb25zdCBVbml0TGFiZWwgPSBzdHlsZWQuZGl2PCBTZWxlY3RQcm9wcyA+YFxuXHQmJiYge1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXG5cdFx0JHsgYmFzZVVuaXRMYWJlbFN0eWxlcyB9O1xuXG5cdFx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA5MDAgXSB9O1xuXHR9XG5gO1xuXG5jb25zdCB1bml0U2VsZWN0U2l6ZXMgPSAoIHsgc2VsZWN0U2l6ZSA9ICdkZWZhdWx0JyB9OiBTZWxlY3RQcm9wcyApID0+IHtcblx0Y29uc3Qgc2l6ZXMgPSB7XG5cdFx0c21hbGw6IGNzc2Bcblx0XHRcdGhlaWdodDogMTAwJTtcblx0XHRcdGJvcmRlcjogMXB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdFx0dHJhbnNpdGlvbjpcblx0XHRcdFx0Ym94LXNoYWRvdyAwLjFzIGxpbmVhcixcblx0XHRcdFx0Ym9yZGVyIDAuMXMgbGluZWFyO1xuXG5cdFx0XHQkeyBydGwoIHsgYm9yZGVyVG9wTGVmdFJhZGl1czogMCwgYm9yZGVyQm90dG9tTGVmdFJhZGl1czogMCB9ICkoKSB9XG5cblx0XHRcdCY6bm90KDpkaXNhYmxlZCk6aG92ZXIge1xuXHRcdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgMTAwIF0gfTtcblx0XHRcdH1cblxuXHRcdFx0Jjpmb2N1cyB7XG5cdFx0XHRcdGJvcmRlcjogMXB4IHNvbGlkICR7IENPTE9SUy51aS5ib3JkZXJGb2N1cyB9O1xuXHRcdFx0XHRib3gtc2hhZG93OiBpbnNldCAwIDAgMFxuXHRcdFx0XHRcdCR7IENPTkZJRy5ib3JkZXJXaWR0aCArICcgJyArIENPTE9SUy51aS5ib3JkZXJGb2N1cyB9O1xuXHRcdFx0XHRvdXRsaW5lLW9mZnNldDogMDtcblx0XHRcdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdFx0XHR6LWluZGV4OiAxO1xuXHRcdFx0fVxuXHRcdGAsXG5cdFx0ZGVmYXVsdDogY3NzYFxuXHRcdFx0ZGlzcGxheTogZmxleDtcblx0XHRcdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRcdFx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblxuXHRcdFx0Jjp3aGVyZSggOm5vdCggOmRpc2FibGVkICkgKTpob3ZlciB7XG5cdFx0XHRcdGJveC1zaGFkb3c6IDAgMCAwXG5cdFx0XHRcdFx0JHsgQ09ORklHLmJvcmRlcldpZHRoICsgJyAnICsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRcdG91dGxpbmU6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkIHRyYW5zcGFyZW50OyAvLyBGb3IgSGlnaCBDb250cmFzdCBNb2RlXG5cdFx0XHR9XG5cblx0XHRcdCY6Zm9jdXMge1xuXHRcdFx0XHRib3gtc2hhZG93OiAwIDAgMFxuXHRcdFx0XHRcdCR7IENPTkZJRy5ib3JkZXJXaWR0aEZvY3VzICsgJyAnICsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRcdG91dGxpbmU6ICR7IENPTkZJRy5ib3JkZXJXaWR0aEZvY3VzIH0gc29saWQgdHJhbnNwYXJlbnQ7IC8vIEZvciBIaWdoIENvbnRyYXN0IE1vZGVcblx0XHRcdH1cblx0XHRgLFxuXHR9O1xuXG5cdHJldHVybiBzaXplc1sgc2VsZWN0U2l6ZSBdO1xufTtcblxuZXhwb3J0IGNvbnN0IFVuaXRTZWxlY3QgPSBzdHlsZWQuc2VsZWN0PCBTZWxlY3RQcm9wcyA+YFxuXHQvLyBUaGUgJiYmIGNvdW50ZXJhY3RzIDxzZWxlY3Q+IHN0eWxlcyBpbiBXUCBmb3Jtcy5jc3Ncblx0JiYmIHtcblx0XHRhcHBlYXJhbmNlOiBub25lO1xuXHRcdGJhY2tncm91bmQ6IHRyYW5zcGFyZW50O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNYU21hbGwgfTtcblx0XHRib3JkZXI6IG5vbmU7XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0b3V0bGluZTogbm9uZTtcblx0XHQvKiBSZW1vdmluZyBtYXJnaW4gZW5zdXJlcyBmb2N1cyBzdHlsZXMgbmVhdGx5IG92ZXJsYXkgdGhlIHdyYXBwZXIuICovXG5cdFx0bWFyZ2luOiAwO1xuXHRcdG1pbi1oZWlnaHQ6IGF1dG87XG5cdFx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cblx0XHQmOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0Y3Vyc29yOiBwb2ludGVyO1xuXHRcdH1cblxuXHRcdCR7IGJhc2VVbml0TGFiZWxTdHlsZXMgfTtcblx0XHQkeyB1bml0U2VsZWN0U2l6ZXMgfTtcblx0fVxuYDtcbiJdfQ== */"));
  var baseUnitLabelStyles = ({
    selectSize
  }) => {
    const sizes = {
      small: /* @__PURE__ */ css("box-sizing:border-box;padding:2px 1px;width:20px;font-size:8px;line-height:1;letter-spacing:-0.5px;text-transform:uppercase;text-align-last:center;&:not( :disabled ){color:", COLORS.gray[800], ";}" + (false ? "" : ";label:small;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInVuaXQtY29udHJvbC1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBc0NZIiwiZmlsZSI6InVuaXQtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IE51bWJlckNvbnRyb2wgZnJvbSAnLi4vLi4vbnVtYmVyLWNvbnRyb2wnO1xuaW1wb3J0IHsgQmFja2Ryb3BVSSB9IGZyb20gJy4uLy4uL2lucHV0LWNvbnRyb2wvc3R5bGVzL2lucHV0LWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB0eXBlIHsgU2VsZWN0U2l6ZSB9IGZyb20gJy4uL3R5cGVzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG4vLyBVc2luZyBgc2VsZWN0U2l6ZWAgaW5zdGVhZCBvZiBgc2l6ZWAgdG8gYXZvaWQgYSB0eXBlIGNvbmZsaWN0IHdpdGggdGhlXG4vLyBgc2l6ZWAgSFRNTCBhdHRyaWJ1dGUgb2YgdGhlIGBzZWxlY3RgIGVsZW1lbnQuXG50eXBlIFNlbGVjdFByb3BzID0ge1xuXHRzZWxlY3RTaXplOiBTZWxlY3RTaXplO1xufTtcblxuLy8gVE9ETzogUmVzb2x2ZSBuZWVkIHRvIHVzZSAmJiYgdG8gaW5jcmVhc2Ugc3BlY2lmaWNpdHlcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9Xb3JkUHJlc3MvZ3V0ZW5iZXJnL2lzc3Vlcy8xODQ4M1xuXG5leHBvcnQgY29uc3QgVmFsdWVJbnB1dCA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHQmJiYge1xuXHRcdGlucHV0IHtcblx0XHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdFx0d2lkdGg6IDEwMCU7XG5cdFx0fVxuXG5cdFx0JHsgQmFja2Ryb3BVSSB9IHtcblx0XHRcdHRyYW5zaXRpb246IGJveC1zaGFkb3cgMC4xcyBsaW5lYXI7XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBiYXNlVW5pdExhYmVsU3R5bGVzID0gKCB7IHNlbGVjdFNpemUgfTogU2VsZWN0UHJvcHMgKSA9PiB7XG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdHNtYWxsOiBjc3NgXG5cdFx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdFx0cGFkZGluZzogMnB4IDFweDtcblx0XHRcdHdpZHRoOiAyMHB4O1xuXHRcdFx0Zm9udC1zaXplOiA4cHg7XG5cdFx0XHRsaW5lLWhlaWdodDogMTtcblx0XHRcdGxldHRlci1zcGFjaW5nOiAtMC41cHg7XG5cdFx0XHR0ZXh0LXRyYW5zZm9ybTogdXBwZXJjYXNlO1xuXHRcdFx0dGV4dC1hbGlnbi1sYXN0OiBjZW50ZXI7XG5cblx0XHRcdCY6bm90KCA6ZGlzYWJsZWQgKSB7XG5cdFx0XHRcdGNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgODAwIF0gfTtcblx0XHRcdH1cblx0XHRgLFxuXHRcdGRlZmF1bHQ6IGNzc2Bcblx0XHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0XHRtaW4td2lkdGg6IDI0cHg7XG5cdFx0XHRtYXgtd2lkdGg6IDQ4cHg7XG5cdFx0XHRoZWlnaHQ6IDI0cHg7XG5cdFx0XHRtYXJnaW4taW5saW5lLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHRcdFx0cGFkZGluZzogJHsgc3BhY2UoIDEgKSB9O1xuXG5cdFx0XHRmb250LXNpemU6IDEzcHg7XG5cdFx0XHRsaW5lLWhlaWdodDogMTtcblx0XHRcdHRleHQtYWxpZ24tbGFzdDogY2VudGVyO1xuXHRcdFx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcblx0XHRcdG92ZXJmbG93OiBoaWRkZW47XG5cdFx0XHR0ZXh0LW92ZXJmbG93OiBlbGxpcHNpcztcblx0XHRcdGZpZWxkLXNpemluZzogY29udGVudDtcblxuXHRcdFx0Jjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHRcdH1cblx0XHRgLFxuXHR9O1xuXG5cdHJldHVybiBzaXplc1sgc2VsZWN0U2l6ZSBdO1xufTtcblxuZXhwb3J0IGNvbnN0IFVuaXRMYWJlbCA9IHN0eWxlZC5kaXY8IFNlbGVjdFByb3BzID5gXG5cdCYmJiB7XG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cblx0XHQkeyBiYXNlVW5pdExhYmVsU3R5bGVzIH07XG5cblx0XHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDkwMCBdIH07XG5cdH1cbmA7XG5cbmNvbnN0IHVuaXRTZWxlY3RTaXplcyA9ICggeyBzZWxlY3RTaXplID0gJ2RlZmF1bHQnIH06IFNlbGVjdFByb3BzICkgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRzbWFsbDogY3NzYFxuXHRcdFx0aGVpZ2h0OiAxMDAlO1xuXHRcdFx0Ym9yZGVyOiAxcHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0XHR0cmFuc2l0aW9uOlxuXHRcdFx0XHRib3gtc2hhZG93IDAuMXMgbGluZWFyLFxuXHRcdFx0XHRib3JkZXIgMC4xcyBsaW5lYXI7XG5cblx0XHRcdCR7IHJ0bCggeyBib3JkZXJUb3BMZWZ0UmFkaXVzOiAwLCBib3JkZXJCb3R0b21MZWZ0UmFkaXVzOiAwIH0gKSgpIH1cblxuXHRcdFx0Jjpub3QoOmRpc2FibGVkKTpob3ZlciB7XG5cdFx0XHRcdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy5ncmF5WyAxMDAgXSB9O1xuXHRcdFx0fVxuXG5cdFx0XHQmOmZvY3VzIHtcblx0XHRcdFx0Ym9yZGVyOiAxcHggc29saWQgJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRcdGJveC1zaGFkb3c6IGluc2V0IDAgMCAwXG5cdFx0XHRcdFx0JHsgQ09ORklHLmJvcmRlcldpZHRoICsgJyAnICsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRcdG91dGxpbmUtb2Zmc2V0OiAwO1xuXHRcdFx0XHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0XHRcdHotaW5kZXg6IDE7XG5cdFx0XHR9XG5cdFx0YCxcblx0XHRkZWZhdWx0OiBjc3NgXG5cdFx0XHRkaXNwbGF5OiBmbGV4O1xuXHRcdFx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cdFx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXG5cdFx0XHQmOndoZXJlKCA6bm90KCA6ZGlzYWJsZWQgKSApOmhvdmVyIHtcblx0XHRcdFx0Ym94LXNoYWRvdzogMCAwIDBcblx0XHRcdFx0XHQkeyBDT05GSUcuYm9yZGVyV2lkdGggKyAnICcgKyBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTtcblx0XHRcdFx0b3V0bGluZTogJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gc29saWQgdHJhbnNwYXJlbnQ7IC8vIEZvciBIaWdoIENvbnRyYXN0IE1vZGVcblx0XHRcdH1cblxuXHRcdFx0Jjpmb2N1cyB7XG5cdFx0XHRcdGJveC1zaGFkb3c6IDAgMCAwXG5cdFx0XHRcdFx0JHsgQ09ORklHLmJvcmRlcldpZHRoRm9jdXMgKyAnICcgKyBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTtcblx0XHRcdFx0b3V0bGluZTogJHsgQ09ORklHLmJvcmRlcldpZHRoRm9jdXMgfSBzb2xpZCB0cmFuc3BhcmVudDsgLy8gRm9yIEhpZ2ggQ29udHJhc3QgTW9kZVxuXHRcdFx0fVxuXHRcdGAsXG5cdH07XG5cblx0cmV0dXJuIHNpemVzWyBzZWxlY3RTaXplIF07XG59O1xuXG5leHBvcnQgY29uc3QgVW5pdFNlbGVjdCA9IHN0eWxlZC5zZWxlY3Q8IFNlbGVjdFByb3BzID5gXG5cdC8vIFRoZSAmJiYgY291bnRlcmFjdHMgPHNlbGVjdD4gc3R5bGVzIGluIFdQIGZvcm1zLmNzc1xuXHQmJiYge1xuXHRcdGFwcGVhcmFuY2U6IG5vbmU7XG5cdFx0YmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1hTbWFsbCB9O1xuXHRcdGJvcmRlcjogbm9uZTtcblx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRvdXRsaW5lOiBub25lO1xuXHRcdC8qIFJlbW92aW5nIG1hcmdpbiBlbnN1cmVzIGZvY3VzIHN0eWxlcyBuZWF0bHkgb3ZlcmxheSB0aGUgd3JhcHBlci4gKi9cblx0XHRtYXJnaW46IDA7XG5cdFx0bWluLWhlaWdodDogYXV0bztcblx0XHRmb250LWZhbWlseTogaW5oZXJpdDtcblxuXHRcdCY6bm90KCA6ZGlzYWJsZWQgKSB7XG5cdFx0XHRjdXJzb3I6IHBvaW50ZXI7XG5cdFx0fVxuXG5cdFx0JHsgYmFzZVVuaXRMYWJlbFN0eWxlcyB9O1xuXHRcdCR7IHVuaXRTZWxlY3RTaXplcyB9O1xuXHR9XG5gO1xuIl19 */"),
      default: /* @__PURE__ */ css("box-sizing:border-box;min-width:24px;max-width:48px;height:24px;margin-inline-end:", space(2), ";padding:", space(1), ";font-size:13px;line-height:1;text-align-last:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;field-sizing:content;&:not( :disabled ){color:", COLORS.theme.accent, ";}" + (false ? "" : ";label:default;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInVuaXQtY29udHJvbC1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBb0RjIiwiZmlsZSI6InVuaXQtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IE51bWJlckNvbnRyb2wgZnJvbSAnLi4vLi4vbnVtYmVyLWNvbnRyb2wnO1xuaW1wb3J0IHsgQmFja2Ryb3BVSSB9IGZyb20gJy4uLy4uL2lucHV0LWNvbnRyb2wvc3R5bGVzL2lucHV0LWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB0eXBlIHsgU2VsZWN0U2l6ZSB9IGZyb20gJy4uL3R5cGVzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG4vLyBVc2luZyBgc2VsZWN0U2l6ZWAgaW5zdGVhZCBvZiBgc2l6ZWAgdG8gYXZvaWQgYSB0eXBlIGNvbmZsaWN0IHdpdGggdGhlXG4vLyBgc2l6ZWAgSFRNTCBhdHRyaWJ1dGUgb2YgdGhlIGBzZWxlY3RgIGVsZW1lbnQuXG50eXBlIFNlbGVjdFByb3BzID0ge1xuXHRzZWxlY3RTaXplOiBTZWxlY3RTaXplO1xufTtcblxuLy8gVE9ETzogUmVzb2x2ZSBuZWVkIHRvIHVzZSAmJiYgdG8gaW5jcmVhc2Ugc3BlY2lmaWNpdHlcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9Xb3JkUHJlc3MvZ3V0ZW5iZXJnL2lzc3Vlcy8xODQ4M1xuXG5leHBvcnQgY29uc3QgVmFsdWVJbnB1dCA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHQmJiYge1xuXHRcdGlucHV0IHtcblx0XHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdFx0d2lkdGg6IDEwMCU7XG5cdFx0fVxuXG5cdFx0JHsgQmFja2Ryb3BVSSB9IHtcblx0XHRcdHRyYW5zaXRpb246IGJveC1zaGFkb3cgMC4xcyBsaW5lYXI7XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBiYXNlVW5pdExhYmVsU3R5bGVzID0gKCB7IHNlbGVjdFNpemUgfTogU2VsZWN0UHJvcHMgKSA9PiB7XG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdHNtYWxsOiBjc3NgXG5cdFx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdFx0cGFkZGluZzogMnB4IDFweDtcblx0XHRcdHdpZHRoOiAyMHB4O1xuXHRcdFx0Zm9udC1zaXplOiA4cHg7XG5cdFx0XHRsaW5lLWhlaWdodDogMTtcblx0XHRcdGxldHRlci1zcGFjaW5nOiAtMC41cHg7XG5cdFx0XHR0ZXh0LXRyYW5zZm9ybTogdXBwZXJjYXNlO1xuXHRcdFx0dGV4dC1hbGlnbi1sYXN0OiBjZW50ZXI7XG5cblx0XHRcdCY6bm90KCA6ZGlzYWJsZWQgKSB7XG5cdFx0XHRcdGNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgODAwIF0gfTtcblx0XHRcdH1cblx0XHRgLFxuXHRcdGRlZmF1bHQ6IGNzc2Bcblx0XHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0XHRtaW4td2lkdGg6IDI0cHg7XG5cdFx0XHRtYXgtd2lkdGg6IDQ4cHg7XG5cdFx0XHRoZWlnaHQ6IDI0cHg7XG5cdFx0XHRtYXJnaW4taW5saW5lLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHRcdFx0cGFkZGluZzogJHsgc3BhY2UoIDEgKSB9O1xuXG5cdFx0XHRmb250LXNpemU6IDEzcHg7XG5cdFx0XHRsaW5lLWhlaWdodDogMTtcblx0XHRcdHRleHQtYWxpZ24tbGFzdDogY2VudGVyO1xuXHRcdFx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcblx0XHRcdG92ZXJmbG93OiBoaWRkZW47XG5cdFx0XHR0ZXh0LW92ZXJmbG93OiBlbGxpcHNpcztcblx0XHRcdGZpZWxkLXNpemluZzogY29udGVudDtcblxuXHRcdFx0Jjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHRcdH1cblx0XHRgLFxuXHR9O1xuXG5cdHJldHVybiBzaXplc1sgc2VsZWN0U2l6ZSBdO1xufTtcblxuZXhwb3J0IGNvbnN0IFVuaXRMYWJlbCA9IHN0eWxlZC5kaXY8IFNlbGVjdFByb3BzID5gXG5cdCYmJiB7XG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cblx0XHQkeyBiYXNlVW5pdExhYmVsU3R5bGVzIH07XG5cblx0XHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDkwMCBdIH07XG5cdH1cbmA7XG5cbmNvbnN0IHVuaXRTZWxlY3RTaXplcyA9ICggeyBzZWxlY3RTaXplID0gJ2RlZmF1bHQnIH06IFNlbGVjdFByb3BzICkgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRzbWFsbDogY3NzYFxuXHRcdFx0aGVpZ2h0OiAxMDAlO1xuXHRcdFx0Ym9yZGVyOiAxcHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0XHR0cmFuc2l0aW9uOlxuXHRcdFx0XHRib3gtc2hhZG93IDAuMXMgbGluZWFyLFxuXHRcdFx0XHRib3JkZXIgMC4xcyBsaW5lYXI7XG5cblx0XHRcdCR7IHJ0bCggeyBib3JkZXJUb3BMZWZ0UmFkaXVzOiAwLCBib3JkZXJCb3R0b21MZWZ0UmFkaXVzOiAwIH0gKSgpIH1cblxuXHRcdFx0Jjpub3QoOmRpc2FibGVkKTpob3ZlciB7XG5cdFx0XHRcdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy5ncmF5WyAxMDAgXSB9O1xuXHRcdFx0fVxuXG5cdFx0XHQmOmZvY3VzIHtcblx0XHRcdFx0Ym9yZGVyOiAxcHggc29saWQgJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRcdGJveC1zaGFkb3c6IGluc2V0IDAgMCAwXG5cdFx0XHRcdFx0JHsgQ09ORklHLmJvcmRlcldpZHRoICsgJyAnICsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRcdG91dGxpbmUtb2Zmc2V0OiAwO1xuXHRcdFx0XHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0XHRcdHotaW5kZXg6IDE7XG5cdFx0XHR9XG5cdFx0YCxcblx0XHRkZWZhdWx0OiBjc3NgXG5cdFx0XHRkaXNwbGF5OiBmbGV4O1xuXHRcdFx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cdFx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXG5cdFx0XHQmOndoZXJlKCA6bm90KCA6ZGlzYWJsZWQgKSApOmhvdmVyIHtcblx0XHRcdFx0Ym94LXNoYWRvdzogMCAwIDBcblx0XHRcdFx0XHQkeyBDT05GSUcuYm9yZGVyV2lkdGggKyAnICcgKyBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTtcblx0XHRcdFx0b3V0bGluZTogJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gc29saWQgdHJhbnNwYXJlbnQ7IC8vIEZvciBIaWdoIENvbnRyYXN0IE1vZGVcblx0XHRcdH1cblxuXHRcdFx0Jjpmb2N1cyB7XG5cdFx0XHRcdGJveC1zaGFkb3c6IDAgMCAwXG5cdFx0XHRcdFx0JHsgQ09ORklHLmJvcmRlcldpZHRoRm9jdXMgKyAnICcgKyBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTtcblx0XHRcdFx0b3V0bGluZTogJHsgQ09ORklHLmJvcmRlcldpZHRoRm9jdXMgfSBzb2xpZCB0cmFuc3BhcmVudDsgLy8gRm9yIEhpZ2ggQ29udHJhc3QgTW9kZVxuXHRcdFx0fVxuXHRcdGAsXG5cdH07XG5cblx0cmV0dXJuIHNpemVzWyBzZWxlY3RTaXplIF07XG59O1xuXG5leHBvcnQgY29uc3QgVW5pdFNlbGVjdCA9IHN0eWxlZC5zZWxlY3Q8IFNlbGVjdFByb3BzID5gXG5cdC8vIFRoZSAmJiYgY291bnRlcmFjdHMgPHNlbGVjdD4gc3R5bGVzIGluIFdQIGZvcm1zLmNzc1xuXHQmJiYge1xuXHRcdGFwcGVhcmFuY2U6IG5vbmU7XG5cdFx0YmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1hTbWFsbCB9O1xuXHRcdGJvcmRlcjogbm9uZTtcblx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRvdXRsaW5lOiBub25lO1xuXHRcdC8qIFJlbW92aW5nIG1hcmdpbiBlbnN1cmVzIGZvY3VzIHN0eWxlcyBuZWF0bHkgb3ZlcmxheSB0aGUgd3JhcHBlci4gKi9cblx0XHRtYXJnaW46IDA7XG5cdFx0bWluLWhlaWdodDogYXV0bztcblx0XHRmb250LWZhbWlseTogaW5oZXJpdDtcblxuXHRcdCY6bm90KCA6ZGlzYWJsZWQgKSB7XG5cdFx0XHRjdXJzb3I6IHBvaW50ZXI7XG5cdFx0fVxuXG5cdFx0JHsgYmFzZVVuaXRMYWJlbFN0eWxlcyB9O1xuXHRcdCR7IHVuaXRTZWxlY3RTaXplcyB9O1xuXHR9XG5gO1xuIl19 */")
    };
    return sizes[selectSize];
  };
  var UnitLabel = /* @__PURE__ */ createStyled("div", false ? {
    target: "e1bagdl31"
  } : {
    target: "e1bagdl31",
    label: "UnitLabel"
  })("&&&{pointer-events:none;", baseUnitLabelStyles, ";color:", COLORS.gray[900], ";}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInVuaXQtY29udHJvbC1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNkVrRCIsImZpbGUiOiJ1bml0LWNvbnRyb2wtc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCBOdW1iZXJDb250cm9sIGZyb20gJy4uLy4uL251bWJlci1jb250cm9sJztcbmltcG9ydCB7IEJhY2tkcm9wVUkgfSBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL3N0eWxlcy9pbnB1dC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgdHlwZSB7IFNlbGVjdFNpemUgfSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuLy8gVXNpbmcgYHNlbGVjdFNpemVgIGluc3RlYWQgb2YgYHNpemVgIHRvIGF2b2lkIGEgdHlwZSBjb25mbGljdCB3aXRoIHRoZVxuLy8gYHNpemVgIEhUTUwgYXR0cmlidXRlIG9mIHRoZSBgc2VsZWN0YCBlbGVtZW50LlxudHlwZSBTZWxlY3RQcm9wcyA9IHtcblx0c2VsZWN0U2l6ZTogU2VsZWN0U2l6ZTtcbn07XG5cbi8vIFRPRE86IFJlc29sdmUgbmVlZCB0byB1c2UgJiYmIHRvIGluY3JlYXNlIHNwZWNpZmljaXR5XG4vLyBodHRwczovL2dpdGh1Yi5jb20vV29yZFByZXNzL2d1dGVuYmVyZy9pc3N1ZXMvMTg0ODNcblxuZXhwb3J0IGNvbnN0IFZhbHVlSW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JiYmIHtcblx0XHRpbnB1dCB7XG5cdFx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRcdHdpZHRoOiAxMDAlO1xuXHRcdH1cblxuXHRcdCR7IEJhY2tkcm9wVUkgfSB7XG5cdFx0XHR0cmFuc2l0aW9uOiBib3gtc2hhZG93IDAuMXMgbGluZWFyO1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgYmFzZVVuaXRMYWJlbFN0eWxlcyA9ICggeyBzZWxlY3RTaXplIH06IFNlbGVjdFByb3BzICkgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRzbWFsbDogY3NzYFxuXHRcdFx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0XHRcdHBhZGRpbmc6IDJweCAxcHg7XG5cdFx0XHR3aWR0aDogMjBweDtcblx0XHRcdGZvbnQtc2l6ZTogOHB4O1xuXHRcdFx0bGluZS1oZWlnaHQ6IDE7XG5cdFx0XHRsZXR0ZXItc3BhY2luZzogLTAuNXB4O1xuXHRcdFx0dGV4dC10cmFuc2Zvcm06IHVwcGVyY2FzZTtcblx0XHRcdHRleHQtYWxpZ24tbGFzdDogY2VudGVyO1xuXG5cdFx0XHQmOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0XHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDgwMCBdIH07XG5cdFx0XHR9XG5cdFx0YCxcblx0XHRkZWZhdWx0OiBjc3NgXG5cdFx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdFx0bWluLXdpZHRoOiAyNHB4O1xuXHRcdFx0bWF4LXdpZHRoOiA0OHB4O1xuXHRcdFx0aGVpZ2h0OiAyNHB4O1xuXHRcdFx0bWFyZ2luLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAyICkgfTtcblx0XHRcdHBhZGRpbmc6ICR7IHNwYWNlKCAxICkgfTtcblxuXHRcdFx0Zm9udC1zaXplOiAxM3B4O1xuXHRcdFx0bGluZS1oZWlnaHQ6IDE7XG5cdFx0XHR0ZXh0LWFsaWduLWxhc3Q6IGNlbnRlcjtcblx0XHRcdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cdFx0XHRvdmVyZmxvdzogaGlkZGVuO1xuXHRcdFx0dGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5cdFx0XHRmaWVsZC1zaXppbmc6IGNvbnRlbnQ7XG5cblx0XHRcdCY6bm90KCA6ZGlzYWJsZWQgKSB7XG5cdFx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHR9XG5cdFx0YCxcblx0fTtcblxuXHRyZXR1cm4gc2l6ZXNbIHNlbGVjdFNpemUgXTtcbn07XG5cbmV4cG9ydCBjb25zdCBVbml0TGFiZWwgPSBzdHlsZWQuZGl2PCBTZWxlY3RQcm9wcyA+YFxuXHQmJiYge1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXG5cdFx0JHsgYmFzZVVuaXRMYWJlbFN0eWxlcyB9O1xuXG5cdFx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA5MDAgXSB9O1xuXHR9XG5gO1xuXG5jb25zdCB1bml0U2VsZWN0U2l6ZXMgPSAoIHsgc2VsZWN0U2l6ZSA9ICdkZWZhdWx0JyB9OiBTZWxlY3RQcm9wcyApID0+IHtcblx0Y29uc3Qgc2l6ZXMgPSB7XG5cdFx0c21hbGw6IGNzc2Bcblx0XHRcdGhlaWdodDogMTAwJTtcblx0XHRcdGJvcmRlcjogMXB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdFx0dHJhbnNpdGlvbjpcblx0XHRcdFx0Ym94LXNoYWRvdyAwLjFzIGxpbmVhcixcblx0XHRcdFx0Ym9yZGVyIDAuMXMgbGluZWFyO1xuXG5cdFx0XHQkeyBydGwoIHsgYm9yZGVyVG9wTGVmdFJhZGl1czogMCwgYm9yZGVyQm90dG9tTGVmdFJhZGl1czogMCB9ICkoKSB9XG5cblx0XHRcdCY6bm90KDpkaXNhYmxlZCk6aG92ZXIge1xuXHRcdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgMTAwIF0gfTtcblx0XHRcdH1cblxuXHRcdFx0Jjpmb2N1cyB7XG5cdFx0XHRcdGJvcmRlcjogMXB4IHNvbGlkICR7IENPTE9SUy51aS5ib3JkZXJGb2N1cyB9O1xuXHRcdFx0XHRib3gtc2hhZG93OiBpbnNldCAwIDAgMFxuXHRcdFx0XHRcdCR7IENPTkZJRy5ib3JkZXJXaWR0aCArICcgJyArIENPTE9SUy51aS5ib3JkZXJGb2N1cyB9O1xuXHRcdFx0XHRvdXRsaW5lLW9mZnNldDogMDtcblx0XHRcdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdFx0XHR6LWluZGV4OiAxO1xuXHRcdFx0fVxuXHRcdGAsXG5cdFx0ZGVmYXVsdDogY3NzYFxuXHRcdFx0ZGlzcGxheTogZmxleDtcblx0XHRcdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRcdFx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblxuXHRcdFx0Jjp3aGVyZSggOm5vdCggOmRpc2FibGVkICkgKTpob3ZlciB7XG5cdFx0XHRcdGJveC1zaGFkb3c6IDAgMCAwXG5cdFx0XHRcdFx0JHsgQ09ORklHLmJvcmRlcldpZHRoICsgJyAnICsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRcdG91dGxpbmU6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkIHRyYW5zcGFyZW50OyAvLyBGb3IgSGlnaCBDb250cmFzdCBNb2RlXG5cdFx0XHR9XG5cblx0XHRcdCY6Zm9jdXMge1xuXHRcdFx0XHRib3gtc2hhZG93OiAwIDAgMFxuXHRcdFx0XHRcdCR7IENPTkZJRy5ib3JkZXJXaWR0aEZvY3VzICsgJyAnICsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRcdG91dGxpbmU6ICR7IENPTkZJRy5ib3JkZXJXaWR0aEZvY3VzIH0gc29saWQgdHJhbnNwYXJlbnQ7IC8vIEZvciBIaWdoIENvbnRyYXN0IE1vZGVcblx0XHRcdH1cblx0XHRgLFxuXHR9O1xuXG5cdHJldHVybiBzaXplc1sgc2VsZWN0U2l6ZSBdO1xufTtcblxuZXhwb3J0IGNvbnN0IFVuaXRTZWxlY3QgPSBzdHlsZWQuc2VsZWN0PCBTZWxlY3RQcm9wcyA+YFxuXHQvLyBUaGUgJiYmIGNvdW50ZXJhY3RzIDxzZWxlY3Q+IHN0eWxlcyBpbiBXUCBmb3Jtcy5jc3Ncblx0JiYmIHtcblx0XHRhcHBlYXJhbmNlOiBub25lO1xuXHRcdGJhY2tncm91bmQ6IHRyYW5zcGFyZW50O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNYU21hbGwgfTtcblx0XHRib3JkZXI6IG5vbmU7XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0b3V0bGluZTogbm9uZTtcblx0XHQvKiBSZW1vdmluZyBtYXJnaW4gZW5zdXJlcyBmb2N1cyBzdHlsZXMgbmVhdGx5IG92ZXJsYXkgdGhlIHdyYXBwZXIuICovXG5cdFx0bWFyZ2luOiAwO1xuXHRcdG1pbi1oZWlnaHQ6IGF1dG87XG5cdFx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cblx0XHQmOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0Y3Vyc29yOiBwb2ludGVyO1xuXHRcdH1cblxuXHRcdCR7IGJhc2VVbml0TGFiZWxTdHlsZXMgfTtcblx0XHQkeyB1bml0U2VsZWN0U2l6ZXMgfTtcblx0fVxuYDtcbiJdfQ== */"));
  var unitSelectSizes = ({
    selectSize = "default"
  }) => {
    const sizes = {
      small: /* @__PURE__ */ css("height:100%;border:1px solid transparent;transition:box-shadow 0.1s linear,border 0.1s linear;", rtl({
        borderTopLeftRadius: 0,
        borderBottomLeftRadius: 0
      })(), " &:not(:disabled):hover{background-color:", COLORS.gray[100], ";}&:focus{border:1px solid ", COLORS.ui.borderFocus, ";box-shadow:inset 0 0 0 ", config_values_default.borderWidth + " " + COLORS.ui.borderFocus, ";outline-offset:0;outline:2px solid transparent;z-index:1;}" + (false ? "" : ";label:small;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInVuaXQtY29udHJvbC1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBeUZZIiwiZmlsZSI6InVuaXQtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IE51bWJlckNvbnRyb2wgZnJvbSAnLi4vLi4vbnVtYmVyLWNvbnRyb2wnO1xuaW1wb3J0IHsgQmFja2Ryb3BVSSB9IGZyb20gJy4uLy4uL2lucHV0LWNvbnRyb2wvc3R5bGVzL2lucHV0LWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB0eXBlIHsgU2VsZWN0U2l6ZSB9IGZyb20gJy4uL3R5cGVzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG4vLyBVc2luZyBgc2VsZWN0U2l6ZWAgaW5zdGVhZCBvZiBgc2l6ZWAgdG8gYXZvaWQgYSB0eXBlIGNvbmZsaWN0IHdpdGggdGhlXG4vLyBgc2l6ZWAgSFRNTCBhdHRyaWJ1dGUgb2YgdGhlIGBzZWxlY3RgIGVsZW1lbnQuXG50eXBlIFNlbGVjdFByb3BzID0ge1xuXHRzZWxlY3RTaXplOiBTZWxlY3RTaXplO1xufTtcblxuLy8gVE9ETzogUmVzb2x2ZSBuZWVkIHRvIHVzZSAmJiYgdG8gaW5jcmVhc2Ugc3BlY2lmaWNpdHlcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9Xb3JkUHJlc3MvZ3V0ZW5iZXJnL2lzc3Vlcy8xODQ4M1xuXG5leHBvcnQgY29uc3QgVmFsdWVJbnB1dCA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHQmJiYge1xuXHRcdGlucHV0IHtcblx0XHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdFx0d2lkdGg6IDEwMCU7XG5cdFx0fVxuXG5cdFx0JHsgQmFja2Ryb3BVSSB9IHtcblx0XHRcdHRyYW5zaXRpb246IGJveC1zaGFkb3cgMC4xcyBsaW5lYXI7XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBiYXNlVW5pdExhYmVsU3R5bGVzID0gKCB7IHNlbGVjdFNpemUgfTogU2VsZWN0UHJvcHMgKSA9PiB7XG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdHNtYWxsOiBjc3NgXG5cdFx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdFx0cGFkZGluZzogMnB4IDFweDtcblx0XHRcdHdpZHRoOiAyMHB4O1xuXHRcdFx0Zm9udC1zaXplOiA4cHg7XG5cdFx0XHRsaW5lLWhlaWdodDogMTtcblx0XHRcdGxldHRlci1zcGFjaW5nOiAtMC41cHg7XG5cdFx0XHR0ZXh0LXRyYW5zZm9ybTogdXBwZXJjYXNlO1xuXHRcdFx0dGV4dC1hbGlnbi1sYXN0OiBjZW50ZXI7XG5cblx0XHRcdCY6bm90KCA6ZGlzYWJsZWQgKSB7XG5cdFx0XHRcdGNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgODAwIF0gfTtcblx0XHRcdH1cblx0XHRgLFxuXHRcdGRlZmF1bHQ6IGNzc2Bcblx0XHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0XHRtaW4td2lkdGg6IDI0cHg7XG5cdFx0XHRtYXgtd2lkdGg6IDQ4cHg7XG5cdFx0XHRoZWlnaHQ6IDI0cHg7XG5cdFx0XHRtYXJnaW4taW5saW5lLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHRcdFx0cGFkZGluZzogJHsgc3BhY2UoIDEgKSB9O1xuXG5cdFx0XHRmb250LXNpemU6IDEzcHg7XG5cdFx0XHRsaW5lLWhlaWdodDogMTtcblx0XHRcdHRleHQtYWxpZ24tbGFzdDogY2VudGVyO1xuXHRcdFx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcblx0XHRcdG92ZXJmbG93OiBoaWRkZW47XG5cdFx0XHR0ZXh0LW92ZXJmbG93OiBlbGxpcHNpcztcblx0XHRcdGZpZWxkLXNpemluZzogY29udGVudDtcblxuXHRcdFx0Jjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHRcdH1cblx0XHRgLFxuXHR9O1xuXG5cdHJldHVybiBzaXplc1sgc2VsZWN0U2l6ZSBdO1xufTtcblxuZXhwb3J0IGNvbnN0IFVuaXRMYWJlbCA9IHN0eWxlZC5kaXY8IFNlbGVjdFByb3BzID5gXG5cdCYmJiB7XG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cblx0XHQkeyBiYXNlVW5pdExhYmVsU3R5bGVzIH07XG5cblx0XHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDkwMCBdIH07XG5cdH1cbmA7XG5cbmNvbnN0IHVuaXRTZWxlY3RTaXplcyA9ICggeyBzZWxlY3RTaXplID0gJ2RlZmF1bHQnIH06IFNlbGVjdFByb3BzICkgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRzbWFsbDogY3NzYFxuXHRcdFx0aGVpZ2h0OiAxMDAlO1xuXHRcdFx0Ym9yZGVyOiAxcHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0XHR0cmFuc2l0aW9uOlxuXHRcdFx0XHRib3gtc2hhZG93IDAuMXMgbGluZWFyLFxuXHRcdFx0XHRib3JkZXIgMC4xcyBsaW5lYXI7XG5cblx0XHRcdCR7IHJ0bCggeyBib3JkZXJUb3BMZWZ0UmFkaXVzOiAwLCBib3JkZXJCb3R0b21MZWZ0UmFkaXVzOiAwIH0gKSgpIH1cblxuXHRcdFx0Jjpub3QoOmRpc2FibGVkKTpob3ZlciB7XG5cdFx0XHRcdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy5ncmF5WyAxMDAgXSB9O1xuXHRcdFx0fVxuXG5cdFx0XHQmOmZvY3VzIHtcblx0XHRcdFx0Ym9yZGVyOiAxcHggc29saWQgJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRcdGJveC1zaGFkb3c6IGluc2V0IDAgMCAwXG5cdFx0XHRcdFx0JHsgQ09ORklHLmJvcmRlcldpZHRoICsgJyAnICsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRcdG91dGxpbmUtb2Zmc2V0OiAwO1xuXHRcdFx0XHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0XHRcdHotaW5kZXg6IDE7XG5cdFx0XHR9XG5cdFx0YCxcblx0XHRkZWZhdWx0OiBjc3NgXG5cdFx0XHRkaXNwbGF5OiBmbGV4O1xuXHRcdFx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cdFx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXG5cdFx0XHQmOndoZXJlKCA6bm90KCA6ZGlzYWJsZWQgKSApOmhvdmVyIHtcblx0XHRcdFx0Ym94LXNoYWRvdzogMCAwIDBcblx0XHRcdFx0XHQkeyBDT05GSUcuYm9yZGVyV2lkdGggKyAnICcgKyBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTtcblx0XHRcdFx0b3V0bGluZTogJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gc29saWQgdHJhbnNwYXJlbnQ7IC8vIEZvciBIaWdoIENvbnRyYXN0IE1vZGVcblx0XHRcdH1cblxuXHRcdFx0Jjpmb2N1cyB7XG5cdFx0XHRcdGJveC1zaGFkb3c6IDAgMCAwXG5cdFx0XHRcdFx0JHsgQ09ORklHLmJvcmRlcldpZHRoRm9jdXMgKyAnICcgKyBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTtcblx0XHRcdFx0b3V0bGluZTogJHsgQ09ORklHLmJvcmRlcldpZHRoRm9jdXMgfSBzb2xpZCB0cmFuc3BhcmVudDsgLy8gRm9yIEhpZ2ggQ29udHJhc3QgTW9kZVxuXHRcdFx0fVxuXHRcdGAsXG5cdH07XG5cblx0cmV0dXJuIHNpemVzWyBzZWxlY3RTaXplIF07XG59O1xuXG5leHBvcnQgY29uc3QgVW5pdFNlbGVjdCA9IHN0eWxlZC5zZWxlY3Q8IFNlbGVjdFByb3BzID5gXG5cdC8vIFRoZSAmJiYgY291bnRlcmFjdHMgPHNlbGVjdD4gc3R5bGVzIGluIFdQIGZvcm1zLmNzc1xuXHQmJiYge1xuXHRcdGFwcGVhcmFuY2U6IG5vbmU7XG5cdFx0YmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1hTbWFsbCB9O1xuXHRcdGJvcmRlcjogbm9uZTtcblx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRvdXRsaW5lOiBub25lO1xuXHRcdC8qIFJlbW92aW5nIG1hcmdpbiBlbnN1cmVzIGZvY3VzIHN0eWxlcyBuZWF0bHkgb3ZlcmxheSB0aGUgd3JhcHBlci4gKi9cblx0XHRtYXJnaW46IDA7XG5cdFx0bWluLWhlaWdodDogYXV0bztcblx0XHRmb250LWZhbWlseTogaW5oZXJpdDtcblxuXHRcdCY6bm90KCA6ZGlzYWJsZWQgKSB7XG5cdFx0XHRjdXJzb3I6IHBvaW50ZXI7XG5cdFx0fVxuXG5cdFx0JHsgYmFzZVVuaXRMYWJlbFN0eWxlcyB9O1xuXHRcdCR7IHVuaXRTZWxlY3RTaXplcyB9O1xuXHR9XG5gO1xuIl19 */"),
      default: /* @__PURE__ */ css("display:flex;justify-content:center;align-items:center;&:where( :not( :disabled ) ):hover{box-shadow:0 0 0 ", config_values_default.borderWidth + " " + COLORS.ui.borderFocus, ";outline:", config_values_default.borderWidth, " solid transparent;}&:focus{box-shadow:0 0 0 ", config_values_default.borderWidthFocus + " " + COLORS.ui.borderFocus, ";outline:", config_values_default.borderWidthFocus, " solid transparent;}" + (false ? "" : ";label:default;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInVuaXQtY29udHJvbC1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBK0djIiwiZmlsZSI6InVuaXQtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IE51bWJlckNvbnRyb2wgZnJvbSAnLi4vLi4vbnVtYmVyLWNvbnRyb2wnO1xuaW1wb3J0IHsgQmFja2Ryb3BVSSB9IGZyb20gJy4uLy4uL2lucHV0LWNvbnRyb2wvc3R5bGVzL2lucHV0LWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB0eXBlIHsgU2VsZWN0U2l6ZSB9IGZyb20gJy4uL3R5cGVzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG4vLyBVc2luZyBgc2VsZWN0U2l6ZWAgaW5zdGVhZCBvZiBgc2l6ZWAgdG8gYXZvaWQgYSB0eXBlIGNvbmZsaWN0IHdpdGggdGhlXG4vLyBgc2l6ZWAgSFRNTCBhdHRyaWJ1dGUgb2YgdGhlIGBzZWxlY3RgIGVsZW1lbnQuXG50eXBlIFNlbGVjdFByb3BzID0ge1xuXHRzZWxlY3RTaXplOiBTZWxlY3RTaXplO1xufTtcblxuLy8gVE9ETzogUmVzb2x2ZSBuZWVkIHRvIHVzZSAmJiYgdG8gaW5jcmVhc2Ugc3BlY2lmaWNpdHlcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9Xb3JkUHJlc3MvZ3V0ZW5iZXJnL2lzc3Vlcy8xODQ4M1xuXG5leHBvcnQgY29uc3QgVmFsdWVJbnB1dCA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHQmJiYge1xuXHRcdGlucHV0IHtcblx0XHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdFx0d2lkdGg6IDEwMCU7XG5cdFx0fVxuXG5cdFx0JHsgQmFja2Ryb3BVSSB9IHtcblx0XHRcdHRyYW5zaXRpb246IGJveC1zaGFkb3cgMC4xcyBsaW5lYXI7XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBiYXNlVW5pdExhYmVsU3R5bGVzID0gKCB7IHNlbGVjdFNpemUgfTogU2VsZWN0UHJvcHMgKSA9PiB7XG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdHNtYWxsOiBjc3NgXG5cdFx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdFx0cGFkZGluZzogMnB4IDFweDtcblx0XHRcdHdpZHRoOiAyMHB4O1xuXHRcdFx0Zm9udC1zaXplOiA4cHg7XG5cdFx0XHRsaW5lLWhlaWdodDogMTtcblx0XHRcdGxldHRlci1zcGFjaW5nOiAtMC41cHg7XG5cdFx0XHR0ZXh0LXRyYW5zZm9ybTogdXBwZXJjYXNlO1xuXHRcdFx0dGV4dC1hbGlnbi1sYXN0OiBjZW50ZXI7XG5cblx0XHRcdCY6bm90KCA6ZGlzYWJsZWQgKSB7XG5cdFx0XHRcdGNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgODAwIF0gfTtcblx0XHRcdH1cblx0XHRgLFxuXHRcdGRlZmF1bHQ6IGNzc2Bcblx0XHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0XHRtaW4td2lkdGg6IDI0cHg7XG5cdFx0XHRtYXgtd2lkdGg6IDQ4cHg7XG5cdFx0XHRoZWlnaHQ6IDI0cHg7XG5cdFx0XHRtYXJnaW4taW5saW5lLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHRcdFx0cGFkZGluZzogJHsgc3BhY2UoIDEgKSB9O1xuXG5cdFx0XHRmb250LXNpemU6IDEzcHg7XG5cdFx0XHRsaW5lLWhlaWdodDogMTtcblx0XHRcdHRleHQtYWxpZ24tbGFzdDogY2VudGVyO1xuXHRcdFx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcblx0XHRcdG92ZXJmbG93OiBoaWRkZW47XG5cdFx0XHR0ZXh0LW92ZXJmbG93OiBlbGxpcHNpcztcblx0XHRcdGZpZWxkLXNpemluZzogY29udGVudDtcblxuXHRcdFx0Jjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHRcdH1cblx0XHRgLFxuXHR9O1xuXG5cdHJldHVybiBzaXplc1sgc2VsZWN0U2l6ZSBdO1xufTtcblxuZXhwb3J0IGNvbnN0IFVuaXRMYWJlbCA9IHN0eWxlZC5kaXY8IFNlbGVjdFByb3BzID5gXG5cdCYmJiB7XG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cblx0XHQkeyBiYXNlVW5pdExhYmVsU3R5bGVzIH07XG5cblx0XHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDkwMCBdIH07XG5cdH1cbmA7XG5cbmNvbnN0IHVuaXRTZWxlY3RTaXplcyA9ICggeyBzZWxlY3RTaXplID0gJ2RlZmF1bHQnIH06IFNlbGVjdFByb3BzICkgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRzbWFsbDogY3NzYFxuXHRcdFx0aGVpZ2h0OiAxMDAlO1xuXHRcdFx0Ym9yZGVyOiAxcHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0XHR0cmFuc2l0aW9uOlxuXHRcdFx0XHRib3gtc2hhZG93IDAuMXMgbGluZWFyLFxuXHRcdFx0XHRib3JkZXIgMC4xcyBsaW5lYXI7XG5cblx0XHRcdCR7IHJ0bCggeyBib3JkZXJUb3BMZWZ0UmFkaXVzOiAwLCBib3JkZXJCb3R0b21MZWZ0UmFkaXVzOiAwIH0gKSgpIH1cblxuXHRcdFx0Jjpub3QoOmRpc2FibGVkKTpob3ZlciB7XG5cdFx0XHRcdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy5ncmF5WyAxMDAgXSB9O1xuXHRcdFx0fVxuXG5cdFx0XHQmOmZvY3VzIHtcblx0XHRcdFx0Ym9yZGVyOiAxcHggc29saWQgJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRcdGJveC1zaGFkb3c6IGluc2V0IDAgMCAwXG5cdFx0XHRcdFx0JHsgQ09ORklHLmJvcmRlcldpZHRoICsgJyAnICsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRcdG91dGxpbmUtb2Zmc2V0OiAwO1xuXHRcdFx0XHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0XHRcdHotaW5kZXg6IDE7XG5cdFx0XHR9XG5cdFx0YCxcblx0XHRkZWZhdWx0OiBjc3NgXG5cdFx0XHRkaXNwbGF5OiBmbGV4O1xuXHRcdFx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cdFx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXG5cdFx0XHQmOndoZXJlKCA6bm90KCA6ZGlzYWJsZWQgKSApOmhvdmVyIHtcblx0XHRcdFx0Ym94LXNoYWRvdzogMCAwIDBcblx0XHRcdFx0XHQkeyBDT05GSUcuYm9yZGVyV2lkdGggKyAnICcgKyBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTtcblx0XHRcdFx0b3V0bGluZTogJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gc29saWQgdHJhbnNwYXJlbnQ7IC8vIEZvciBIaWdoIENvbnRyYXN0IE1vZGVcblx0XHRcdH1cblxuXHRcdFx0Jjpmb2N1cyB7XG5cdFx0XHRcdGJveC1zaGFkb3c6IDAgMCAwXG5cdFx0XHRcdFx0JHsgQ09ORklHLmJvcmRlcldpZHRoRm9jdXMgKyAnICcgKyBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTtcblx0XHRcdFx0b3V0bGluZTogJHsgQ09ORklHLmJvcmRlcldpZHRoRm9jdXMgfSBzb2xpZCB0cmFuc3BhcmVudDsgLy8gRm9yIEhpZ2ggQ29udHJhc3QgTW9kZVxuXHRcdFx0fVxuXHRcdGAsXG5cdH07XG5cblx0cmV0dXJuIHNpemVzWyBzZWxlY3RTaXplIF07XG59O1xuXG5leHBvcnQgY29uc3QgVW5pdFNlbGVjdCA9IHN0eWxlZC5zZWxlY3Q8IFNlbGVjdFByb3BzID5gXG5cdC8vIFRoZSAmJiYgY291bnRlcmFjdHMgPHNlbGVjdD4gc3R5bGVzIGluIFdQIGZvcm1zLmNzc1xuXHQmJiYge1xuXHRcdGFwcGVhcmFuY2U6IG5vbmU7XG5cdFx0YmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1hTbWFsbCB9O1xuXHRcdGJvcmRlcjogbm9uZTtcblx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRvdXRsaW5lOiBub25lO1xuXHRcdC8qIFJlbW92aW5nIG1hcmdpbiBlbnN1cmVzIGZvY3VzIHN0eWxlcyBuZWF0bHkgb3ZlcmxheSB0aGUgd3JhcHBlci4gKi9cblx0XHRtYXJnaW46IDA7XG5cdFx0bWluLWhlaWdodDogYXV0bztcblx0XHRmb250LWZhbWlseTogaW5oZXJpdDtcblxuXHRcdCY6bm90KCA6ZGlzYWJsZWQgKSB7XG5cdFx0XHRjdXJzb3I6IHBvaW50ZXI7XG5cdFx0fVxuXG5cdFx0JHsgYmFzZVVuaXRMYWJlbFN0eWxlcyB9O1xuXHRcdCR7IHVuaXRTZWxlY3RTaXplcyB9O1xuXHR9XG5gO1xuIl19 */")
    };
    return sizes[selectSize];
  };
  var UnitSelect = /* @__PURE__ */ createStyled("select", false ? {
    target: "e1bagdl30"
  } : {
    target: "e1bagdl30",
    label: "UnitSelect"
  })("&&&{appearance:none;background:transparent;border-radius:", config_values_default.radiusXSmall, ";border:none;display:block;outline:none;margin:0;min-height:auto;font-family:inherit;", baseUnitLabelStyles, ";", unitSelectSizes, ";&:not( :disabled ){cursor:pointer;}}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInVuaXQtY29udHJvbC1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBcUlzRCIsImZpbGUiOiJ1bml0LWNvbnRyb2wtc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCBOdW1iZXJDb250cm9sIGZyb20gJy4uLy4uL251bWJlci1jb250cm9sJztcbmltcG9ydCB7IEJhY2tkcm9wVUkgfSBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL3N0eWxlcy9pbnB1dC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgdHlwZSB7IFNlbGVjdFNpemUgfSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuLy8gVXNpbmcgYHNlbGVjdFNpemVgIGluc3RlYWQgb2YgYHNpemVgIHRvIGF2b2lkIGEgdHlwZSBjb25mbGljdCB3aXRoIHRoZVxuLy8gYHNpemVgIEhUTUwgYXR0cmlidXRlIG9mIHRoZSBgc2VsZWN0YCBlbGVtZW50LlxudHlwZSBTZWxlY3RQcm9wcyA9IHtcblx0c2VsZWN0U2l6ZTogU2VsZWN0U2l6ZTtcbn07XG5cbi8vIFRPRE86IFJlc29sdmUgbmVlZCB0byB1c2UgJiYmIHRvIGluY3JlYXNlIHNwZWNpZmljaXR5XG4vLyBodHRwczovL2dpdGh1Yi5jb20vV29yZFByZXNzL2d1dGVuYmVyZy9pc3N1ZXMvMTg0ODNcblxuZXhwb3J0IGNvbnN0IFZhbHVlSW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JiYmIHtcblx0XHRpbnB1dCB7XG5cdFx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRcdHdpZHRoOiAxMDAlO1xuXHRcdH1cblxuXHRcdCR7IEJhY2tkcm9wVUkgfSB7XG5cdFx0XHR0cmFuc2l0aW9uOiBib3gtc2hhZG93IDAuMXMgbGluZWFyO1xuXHRcdH1cblx0fVxuYDtcblxuY29uc3QgYmFzZVVuaXRMYWJlbFN0eWxlcyA9ICggeyBzZWxlY3RTaXplIH06IFNlbGVjdFByb3BzICkgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRzbWFsbDogY3NzYFxuXHRcdFx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0XHRcdHBhZGRpbmc6IDJweCAxcHg7XG5cdFx0XHR3aWR0aDogMjBweDtcblx0XHRcdGZvbnQtc2l6ZTogOHB4O1xuXHRcdFx0bGluZS1oZWlnaHQ6IDE7XG5cdFx0XHRsZXR0ZXItc3BhY2luZzogLTAuNXB4O1xuXHRcdFx0dGV4dC10cmFuc2Zvcm06IHVwcGVyY2FzZTtcblx0XHRcdHRleHQtYWxpZ24tbGFzdDogY2VudGVyO1xuXG5cdFx0XHQmOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0XHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDgwMCBdIH07XG5cdFx0XHR9XG5cdFx0YCxcblx0XHRkZWZhdWx0OiBjc3NgXG5cdFx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdFx0bWluLXdpZHRoOiAyNHB4O1xuXHRcdFx0bWF4LXdpZHRoOiA0OHB4O1xuXHRcdFx0aGVpZ2h0OiAyNHB4O1xuXHRcdFx0bWFyZ2luLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAyICkgfTtcblx0XHRcdHBhZGRpbmc6ICR7IHNwYWNlKCAxICkgfTtcblxuXHRcdFx0Zm9udC1zaXplOiAxM3B4O1xuXHRcdFx0bGluZS1oZWlnaHQ6IDE7XG5cdFx0XHR0ZXh0LWFsaWduLWxhc3Q6IGNlbnRlcjtcblx0XHRcdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cdFx0XHRvdmVyZmxvdzogaGlkZGVuO1xuXHRcdFx0dGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5cdFx0XHRmaWVsZC1zaXppbmc6IGNvbnRlbnQ7XG5cblx0XHRcdCY6bm90KCA6ZGlzYWJsZWQgKSB7XG5cdFx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHR9XG5cdFx0YCxcblx0fTtcblxuXHRyZXR1cm4gc2l6ZXNbIHNlbGVjdFNpemUgXTtcbn07XG5cbmV4cG9ydCBjb25zdCBVbml0TGFiZWwgPSBzdHlsZWQuZGl2PCBTZWxlY3RQcm9wcyA+YFxuXHQmJiYge1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXG5cdFx0JHsgYmFzZVVuaXRMYWJlbFN0eWxlcyB9O1xuXG5cdFx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA5MDAgXSB9O1xuXHR9XG5gO1xuXG5jb25zdCB1bml0U2VsZWN0U2l6ZXMgPSAoIHsgc2VsZWN0U2l6ZSA9ICdkZWZhdWx0JyB9OiBTZWxlY3RQcm9wcyApID0+IHtcblx0Y29uc3Qgc2l6ZXMgPSB7XG5cdFx0c21hbGw6IGNzc2Bcblx0XHRcdGhlaWdodDogMTAwJTtcblx0XHRcdGJvcmRlcjogMXB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdFx0dHJhbnNpdGlvbjpcblx0XHRcdFx0Ym94LXNoYWRvdyAwLjFzIGxpbmVhcixcblx0XHRcdFx0Ym9yZGVyIDAuMXMgbGluZWFyO1xuXG5cdFx0XHQkeyBydGwoIHsgYm9yZGVyVG9wTGVmdFJhZGl1czogMCwgYm9yZGVyQm90dG9tTGVmdFJhZGl1czogMCB9ICkoKSB9XG5cblx0XHRcdCY6bm90KDpkaXNhYmxlZCk6aG92ZXIge1xuXHRcdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgMTAwIF0gfTtcblx0XHRcdH1cblxuXHRcdFx0Jjpmb2N1cyB7XG5cdFx0XHRcdGJvcmRlcjogMXB4IHNvbGlkICR7IENPTE9SUy51aS5ib3JkZXJGb2N1cyB9O1xuXHRcdFx0XHRib3gtc2hhZG93OiBpbnNldCAwIDAgMFxuXHRcdFx0XHRcdCR7IENPTkZJRy5ib3JkZXJXaWR0aCArICcgJyArIENPTE9SUy51aS5ib3JkZXJGb2N1cyB9O1xuXHRcdFx0XHRvdXRsaW5lLW9mZnNldDogMDtcblx0XHRcdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdFx0XHR6LWluZGV4OiAxO1xuXHRcdFx0fVxuXHRcdGAsXG5cdFx0ZGVmYXVsdDogY3NzYFxuXHRcdFx0ZGlzcGxheTogZmxleDtcblx0XHRcdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRcdFx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblxuXHRcdFx0Jjp3aGVyZSggOm5vdCggOmRpc2FibGVkICkgKTpob3ZlciB7XG5cdFx0XHRcdGJveC1zaGFkb3c6IDAgMCAwXG5cdFx0XHRcdFx0JHsgQ09ORklHLmJvcmRlcldpZHRoICsgJyAnICsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRcdG91dGxpbmU6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkIHRyYW5zcGFyZW50OyAvLyBGb3IgSGlnaCBDb250cmFzdCBNb2RlXG5cdFx0XHR9XG5cblx0XHRcdCY6Zm9jdXMge1xuXHRcdFx0XHRib3gtc2hhZG93OiAwIDAgMFxuXHRcdFx0XHRcdCR7IENPTkZJRy5ib3JkZXJXaWR0aEZvY3VzICsgJyAnICsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHRcdG91dGxpbmU6ICR7IENPTkZJRy5ib3JkZXJXaWR0aEZvY3VzIH0gc29saWQgdHJhbnNwYXJlbnQ7IC8vIEZvciBIaWdoIENvbnRyYXN0IE1vZGVcblx0XHRcdH1cblx0XHRgLFxuXHR9O1xuXG5cdHJldHVybiBzaXplc1sgc2VsZWN0U2l6ZSBdO1xufTtcblxuZXhwb3J0IGNvbnN0IFVuaXRTZWxlY3QgPSBzdHlsZWQuc2VsZWN0PCBTZWxlY3RQcm9wcyA+YFxuXHQvLyBUaGUgJiYmIGNvdW50ZXJhY3RzIDxzZWxlY3Q+IHN0eWxlcyBpbiBXUCBmb3Jtcy5jc3Ncblx0JiYmIHtcblx0XHRhcHBlYXJhbmNlOiBub25lO1xuXHRcdGJhY2tncm91bmQ6IHRyYW5zcGFyZW50O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNYU21hbGwgfTtcblx0XHRib3JkZXI6IG5vbmU7XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0b3V0bGluZTogbm9uZTtcblx0XHQvKiBSZW1vdmluZyBtYXJnaW4gZW5zdXJlcyBmb2N1cyBzdHlsZXMgbmVhdGx5IG92ZXJsYXkgdGhlIHdyYXBwZXIuICovXG5cdFx0bWFyZ2luOiAwO1xuXHRcdG1pbi1oZWlnaHQ6IGF1dG87XG5cdFx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cblx0XHQmOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0Y3Vyc29yOiBwb2ludGVyO1xuXHRcdH1cblxuXHRcdCR7IGJhc2VVbml0TGFiZWxTdHlsZXMgfTtcblx0XHQkeyB1bml0U2VsZWN0U2l6ZXMgfTtcblx0fVxuYDtcbiJdfQ== */"));

  // packages/components/build-module/border-control/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__14() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var focusBoxShadow = /* @__PURE__ */ css("box-shadow:inset ", config_values_default.controlBoxShadowFocus, ";" + (false ? "" : ";label:focusBoxShadow;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrQjBCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIGJveFNpemluZ1Jlc2V0LCBydGwgfSBmcm9tICcuLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IFN0eWxlZExhYmVsIH0gZnJvbSAnLi4vYmFzZS1jb250cm9sL3N0eWxlcy9iYXNlLWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB7XG5cdFZhbHVlSW5wdXQgYXMgVW5pdENvbnRyb2xXcmFwcGVyLFxuXHRVbml0U2VsZWN0LFxufSBmcm9tICcuLi91bml0LWNvbnRyb2wvc3R5bGVzL3VuaXQtY29udHJvbC1zdHlsZXMnO1xuXG5pbXBvcnQgdHlwZSB7IEJvcmRlciB9IGZyb20gJy4vdHlwZXMnO1xuXG5jb25zdCBmb2N1c0JveFNoYWRvdyA9IGNzc2Bcblx0Ym94LXNoYWRvdzogaW5zZXQgJHsgQ09ORklHLmNvbnRyb2xCb3hTaGFkb3dGb2N1cyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2wgPSBjc3NgXG5cdGJvcmRlcjogMDtcblx0cGFkZGluZzogMDtcblx0bWFyZ2luOiAwO1xuXHQkeyBib3hTaXppbmdSZXNldCB9XG5gO1xuXG5leHBvcnQgY29uc3QgaW5uZXJXcmFwcGVyID0gKCkgPT4gY3NzYFxuXHQkeyBVbml0Q29udHJvbFdyYXBwZXIgfSB7XG5cdFx0ZmxleDogMSAxIDQwJTtcblx0fVxuXHQmJiAkeyBVbml0U2VsZWN0IH0ge1xuXHRcdC8qIFByZXZlbnQgdW5pdCBzZWxlY3QgZm9yY2luZyBtaW4gaGVpZ2h0IGxhcmdlciB0aGFuIGl0cyBVbml0Q29udHJvbCAqL1xuXHRcdG1pbi1oZWlnaHQ6IDA7XG5cdH1cbmA7XG5cbi8qXG4gKiBUaGlzIHN0eWxlIGlzIG9ubHkgYXBwbGllZCB0byB0aGUgVW5pdENvbnRyb2wgd3JhcHBlciB3aGVuIHRoZSBib3JkZXIgd2lkdGhcbiAqIGZpZWxkIHNob3VsZCBiZSBhIHNldCB3aWR0aC4gT21pdHRpbmcgdGhpcyBhbGxvd3MgdGhlIFVuaXRDb250cm9sICZcbiAqIFJhbmdlQ29udHJvbCB0byBzaGFyZSB0aGUgYXZhaWxhYmxlIHdpZHRoIGluIGEgNDAvNjAgc3BsaXQgcmVzcGVjdGl2ZWx5LlxuICovXG5leHBvcnQgY29uc3Qgd3JhcHBlcldpZHRoID0gY3NzYFxuXHQkeyBVbml0Q29udHJvbFdyYXBwZXIgfSB7XG5cdFx0LyogRm9yY2UgdGhlIFVuaXRDb250cm9sJ3Mgc2V0IHdpZHRoLiAqL1xuXHRcdGZsZXg6IDAgMCBhdXRvO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3Qgd3JhcHBlckhlaWdodCA9ICggc2l6ZT86ICdkZWZhdWx0JyB8ICdfX3Vuc3RhYmxlLWxhcmdlJyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRoZWlnaHQ6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICc0MHB4JyA6ICczMHB4JyB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2xEcm9wZG93biA9IGNzc2Bcblx0YmFja2dyb3VuZDogI2ZmZjtcblxuXHQmJiA+IGJ1dHRvbiB7XG5cdFx0YXNwZWN0LXJhdGlvOiAxO1xuXHRcdHBhZGRpbmc6IDA7XG5cdFx0ZGlzcGxheTogZmxleDtcblx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRcdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRcdCR7IHJ0bChcblx0XHRcdHsgYm9yZGVyUmFkaXVzOiBgMnB4IDAgMCAycHhgIH0sXG5cdFx0XHR7IGJvcmRlclJhZGl1czogYDAgMnB4IDJweCAwYCB9XG5cdFx0KSgpIH1cblx0XHRib3JkZXI6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy51aS5ib3JkZXIgfTtcblxuXHRcdCY6Zm9jdXMsXG5cdFx0Jjpob3Zlcjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdCR7IGZvY3VzQm94U2hhZG93IH1cblx0XHRcdGJvcmRlci1jb2xvcjogJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHR6LWluZGV4OiAxO1xuXHRcdFx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGNvbG9ySW5kaWNhdG9yQm9yZGVyID0gKCBib3JkZXI/OiBCb3JkZXIgKSA9PiB7XG5cdGNvbnN0IHsgY29sb3IsIHN0eWxlIH0gPSBib3JkZXIgfHwge307XG5cblx0Y29uc3QgZmFsbGJhY2tDb2xvciA9XG5cdFx0ISEgc3R5bGUgJiYgc3R5bGUgIT09ICdub25lJyA/IENPTE9SUy5ncmF5WyAzMDAgXSA6IHVuZGVmaW5lZDtcblxuXHRyZXR1cm4gY3NzYFxuXHRcdGJvcmRlci1zdHlsZTogJHsgc3R5bGUgPT09ICdub25lJyA/ICdzb2xpZCcgOiBzdHlsZSB9O1xuXHRcdGJvcmRlci1jb2xvcjogJHsgY29sb3IgfHwgZmFsbGJhY2tDb2xvciB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGNvbG9ySW5kaWNhdG9yV3JhcHBlciA9IChcblx0Ym9yZGVyPzogQm9yZGVyLFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IHtcblx0Y29uc3QgeyBzdHlsZSB9ID0gYm9yZGVyIHx8IHt9O1xuXG5cdHJldHVybiBjc3NgXG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0XHRib3JkZXI6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHQkeyBzdHlsZSA/IGNvbG9ySW5kaWNhdG9yQm9yZGVyKCBib3JkZXIgKSA6IHVuZGVmaW5lZCB9XG5cdFx0d2lkdGg6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICcyNHB4JyA6ICcyMnB4JyB9O1xuXHRcdGhlaWdodDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzI0cHgnIDogJzIycHgnIH07XG5cdFx0cGFkZGluZzogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzJweCcgOiAnMXB4JyB9O1xuXG5cdFx0Lypcblx0XHQgKiBDb2xvckluZGljYXRvclxuXHRcdCAqXG5cdFx0ICogVGhlIHRyYW5zcGFyZW50IGNvbG9ycyB1c2VkIGhlcmUgZW5zdXJlIHZpc2liaWxpdHkgb2YgdGhlIGluZGljYXRvclxuXHRcdCAqIG92ZXIgdGhlIGFjdGl2ZSBzdGF0ZSBvZiB0aGUgYm9yZGVyIGNvbnRyb2wgZHJvcGRvd24ncyB0b2dnbGUgYnV0dG9uLlxuXHRcdCAqL1xuXHRcdCYgPiBzcGFuIHtcblx0XHRcdGhlaWdodDogJHsgc3BhY2UoIDQgKSB9O1xuXHRcdFx0d2lkdGg6ICR7IHNwYWNlKCA0ICkgfTtcblx0XHRcdGJhY2tncm91bmQ6IGxpbmVhci1ncmFkaWVudChcblx0XHRcdFx0LTQ1ZGVnLFxuXHRcdFx0XHR0cmFuc3BhcmVudCA0OCUsXG5cdFx0XHRcdHJnYiggMCAwIDAgLyAyMCUgKSA0OCUsXG5cdFx0XHRcdHJnYiggMCAwIDAgLyAyMCUgKSA1MiUsXG5cdFx0XHRcdHRyYW5zcGFyZW50IDUyJVxuXHRcdFx0KTtcblx0XHR9XG5cdGA7XG59O1xuXG4vLyBNdXN0IGVxdWFsICRjb2xvci1wYWxldHRlLWNpcmNsZS1zaXplIGZyb206XG4vLyBAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2NpcmN1bGFyLW9wdGlvbi1waWNrZXIvc3R5bGUuc2Nzc1xuY29uc3Qgc3dhdGNoU2l6ZSA9IDI4O1xuY29uc3Qgc3dhdGNoR2FwID0gMTI7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJDb250cm9sUG9wb3ZlckNvbnRyb2xzID0gY3NzYFxuXHR3aWR0aDogJHsgc3dhdGNoU2l6ZSAqIDYgKyBzd2F0Y2hHYXAgKiA1IH1weDtcblxuXHQ+IGRpdjpmaXJzdC1vZi10eXBlID4gJHsgU3R5bGVkTGFiZWwgfSB7XG5cdFx0bWFyZ2luLWJvdHRvbTogMDtcblx0fVxuXG5cdCYmICR7IFN0eWxlZExhYmVsIH0gKyBidXR0b246bm90KCAuaGFzLXRleHQgKSB7XG5cdFx0bWluLXdpZHRoOiAyNHB4O1xuXHRcdHBhZGRpbmc6IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJDb250cm9sUG9wb3ZlckNvbnRlbnQgPSBjc3NgYDtcbmV4cG9ydCBjb25zdCBib3JkZXJDb2xvckluZGljYXRvciA9IGNzc2BgO1xuXG5leHBvcnQgY29uc3QgcmVzZXRCdXR0b25XcmFwcGVyID0gY3NzYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kO1xuXHRtYXJnaW4tdG9wOiAxMnB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlclNsaWRlciA9ICgpID0+IGNzc2Bcblx0ZmxleDogMSAxIDYwJTtcblx0JHsgcnRsKCB7IG1hcmdpblJpZ2h0OiBzcGFjZSggMyApIH0gKSgpIH1cbmA7XG4iXX0= */");
  var borderControl = /* @__PURE__ */ css("border:0;padding:0;margin:0;", boxSizingReset, ";" + (false ? "" : ";label:borderControl;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQmdDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIGJveFNpemluZ1Jlc2V0LCBydGwgfSBmcm9tICcuLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IFN0eWxlZExhYmVsIH0gZnJvbSAnLi4vYmFzZS1jb250cm9sL3N0eWxlcy9iYXNlLWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB7XG5cdFZhbHVlSW5wdXQgYXMgVW5pdENvbnRyb2xXcmFwcGVyLFxuXHRVbml0U2VsZWN0LFxufSBmcm9tICcuLi91bml0LWNvbnRyb2wvc3R5bGVzL3VuaXQtY29udHJvbC1zdHlsZXMnO1xuXG5pbXBvcnQgdHlwZSB7IEJvcmRlciB9IGZyb20gJy4vdHlwZXMnO1xuXG5jb25zdCBmb2N1c0JveFNoYWRvdyA9IGNzc2Bcblx0Ym94LXNoYWRvdzogaW5zZXQgJHsgQ09ORklHLmNvbnRyb2xCb3hTaGFkb3dGb2N1cyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2wgPSBjc3NgXG5cdGJvcmRlcjogMDtcblx0cGFkZGluZzogMDtcblx0bWFyZ2luOiAwO1xuXHQkeyBib3hTaXppbmdSZXNldCB9XG5gO1xuXG5leHBvcnQgY29uc3QgaW5uZXJXcmFwcGVyID0gKCkgPT4gY3NzYFxuXHQkeyBVbml0Q29udHJvbFdyYXBwZXIgfSB7XG5cdFx0ZmxleDogMSAxIDQwJTtcblx0fVxuXHQmJiAkeyBVbml0U2VsZWN0IH0ge1xuXHRcdC8qIFByZXZlbnQgdW5pdCBzZWxlY3QgZm9yY2luZyBtaW4gaGVpZ2h0IGxhcmdlciB0aGFuIGl0cyBVbml0Q29udHJvbCAqL1xuXHRcdG1pbi1oZWlnaHQ6IDA7XG5cdH1cbmA7XG5cbi8qXG4gKiBUaGlzIHN0eWxlIGlzIG9ubHkgYXBwbGllZCB0byB0aGUgVW5pdENvbnRyb2wgd3JhcHBlciB3aGVuIHRoZSBib3JkZXIgd2lkdGhcbiAqIGZpZWxkIHNob3VsZCBiZSBhIHNldCB3aWR0aC4gT21pdHRpbmcgdGhpcyBhbGxvd3MgdGhlIFVuaXRDb250cm9sICZcbiAqIFJhbmdlQ29udHJvbCB0byBzaGFyZSB0aGUgYXZhaWxhYmxlIHdpZHRoIGluIGEgNDAvNjAgc3BsaXQgcmVzcGVjdGl2ZWx5LlxuICovXG5leHBvcnQgY29uc3Qgd3JhcHBlcldpZHRoID0gY3NzYFxuXHQkeyBVbml0Q29udHJvbFdyYXBwZXIgfSB7XG5cdFx0LyogRm9yY2UgdGhlIFVuaXRDb250cm9sJ3Mgc2V0IHdpZHRoLiAqL1xuXHRcdGZsZXg6IDAgMCBhdXRvO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3Qgd3JhcHBlckhlaWdodCA9ICggc2l6ZT86ICdkZWZhdWx0JyB8ICdfX3Vuc3RhYmxlLWxhcmdlJyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRoZWlnaHQ6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICc0MHB4JyA6ICczMHB4JyB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2xEcm9wZG93biA9IGNzc2Bcblx0YmFja2dyb3VuZDogI2ZmZjtcblxuXHQmJiA+IGJ1dHRvbiB7XG5cdFx0YXNwZWN0LXJhdGlvOiAxO1xuXHRcdHBhZGRpbmc6IDA7XG5cdFx0ZGlzcGxheTogZmxleDtcblx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRcdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRcdCR7IHJ0bChcblx0XHRcdHsgYm9yZGVyUmFkaXVzOiBgMnB4IDAgMCAycHhgIH0sXG5cdFx0XHR7IGJvcmRlclJhZGl1czogYDAgMnB4IDJweCAwYCB9XG5cdFx0KSgpIH1cblx0XHRib3JkZXI6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy51aS5ib3JkZXIgfTtcblxuXHRcdCY6Zm9jdXMsXG5cdFx0Jjpob3Zlcjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdCR7IGZvY3VzQm94U2hhZG93IH1cblx0XHRcdGJvcmRlci1jb2xvcjogJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHR6LWluZGV4OiAxO1xuXHRcdFx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGNvbG9ySW5kaWNhdG9yQm9yZGVyID0gKCBib3JkZXI/OiBCb3JkZXIgKSA9PiB7XG5cdGNvbnN0IHsgY29sb3IsIHN0eWxlIH0gPSBib3JkZXIgfHwge307XG5cblx0Y29uc3QgZmFsbGJhY2tDb2xvciA9XG5cdFx0ISEgc3R5bGUgJiYgc3R5bGUgIT09ICdub25lJyA/IENPTE9SUy5ncmF5WyAzMDAgXSA6IHVuZGVmaW5lZDtcblxuXHRyZXR1cm4gY3NzYFxuXHRcdGJvcmRlci1zdHlsZTogJHsgc3R5bGUgPT09ICdub25lJyA/ICdzb2xpZCcgOiBzdHlsZSB9O1xuXHRcdGJvcmRlci1jb2xvcjogJHsgY29sb3IgfHwgZmFsbGJhY2tDb2xvciB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGNvbG9ySW5kaWNhdG9yV3JhcHBlciA9IChcblx0Ym9yZGVyPzogQm9yZGVyLFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IHtcblx0Y29uc3QgeyBzdHlsZSB9ID0gYm9yZGVyIHx8IHt9O1xuXG5cdHJldHVybiBjc3NgXG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0XHRib3JkZXI6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHQkeyBzdHlsZSA/IGNvbG9ySW5kaWNhdG9yQm9yZGVyKCBib3JkZXIgKSA6IHVuZGVmaW5lZCB9XG5cdFx0d2lkdGg6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICcyNHB4JyA6ICcyMnB4JyB9O1xuXHRcdGhlaWdodDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzI0cHgnIDogJzIycHgnIH07XG5cdFx0cGFkZGluZzogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzJweCcgOiAnMXB4JyB9O1xuXG5cdFx0Lypcblx0XHQgKiBDb2xvckluZGljYXRvclxuXHRcdCAqXG5cdFx0ICogVGhlIHRyYW5zcGFyZW50IGNvbG9ycyB1c2VkIGhlcmUgZW5zdXJlIHZpc2liaWxpdHkgb2YgdGhlIGluZGljYXRvclxuXHRcdCAqIG92ZXIgdGhlIGFjdGl2ZSBzdGF0ZSBvZiB0aGUgYm9yZGVyIGNvbnRyb2wgZHJvcGRvd24ncyB0b2dnbGUgYnV0dG9uLlxuXHRcdCAqL1xuXHRcdCYgPiBzcGFuIHtcblx0XHRcdGhlaWdodDogJHsgc3BhY2UoIDQgKSB9O1xuXHRcdFx0d2lkdGg6ICR7IHNwYWNlKCA0ICkgfTtcblx0XHRcdGJhY2tncm91bmQ6IGxpbmVhci1ncmFkaWVudChcblx0XHRcdFx0LTQ1ZGVnLFxuXHRcdFx0XHR0cmFuc3BhcmVudCA0OCUsXG5cdFx0XHRcdHJnYiggMCAwIDAgLyAyMCUgKSA0OCUsXG5cdFx0XHRcdHJnYiggMCAwIDAgLyAyMCUgKSA1MiUsXG5cdFx0XHRcdHRyYW5zcGFyZW50IDUyJVxuXHRcdFx0KTtcblx0XHR9XG5cdGA7XG59O1xuXG4vLyBNdXN0IGVxdWFsICRjb2xvci1wYWxldHRlLWNpcmNsZS1zaXplIGZyb206XG4vLyBAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2NpcmN1bGFyLW9wdGlvbi1waWNrZXIvc3R5bGUuc2Nzc1xuY29uc3Qgc3dhdGNoU2l6ZSA9IDI4O1xuY29uc3Qgc3dhdGNoR2FwID0gMTI7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJDb250cm9sUG9wb3ZlckNvbnRyb2xzID0gY3NzYFxuXHR3aWR0aDogJHsgc3dhdGNoU2l6ZSAqIDYgKyBzd2F0Y2hHYXAgKiA1IH1weDtcblxuXHQ+IGRpdjpmaXJzdC1vZi10eXBlID4gJHsgU3R5bGVkTGFiZWwgfSB7XG5cdFx0bWFyZ2luLWJvdHRvbTogMDtcblx0fVxuXG5cdCYmICR7IFN0eWxlZExhYmVsIH0gKyBidXR0b246bm90KCAuaGFzLXRleHQgKSB7XG5cdFx0bWluLXdpZHRoOiAyNHB4O1xuXHRcdHBhZGRpbmc6IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJDb250cm9sUG9wb3ZlckNvbnRlbnQgPSBjc3NgYDtcbmV4cG9ydCBjb25zdCBib3JkZXJDb2xvckluZGljYXRvciA9IGNzc2BgO1xuXG5leHBvcnQgY29uc3QgcmVzZXRCdXR0b25XcmFwcGVyID0gY3NzYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kO1xuXHRtYXJnaW4tdG9wOiAxMnB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlclNsaWRlciA9ICgpID0+IGNzc2Bcblx0ZmxleDogMSAxIDYwJTtcblx0JHsgcnRsKCB7IG1hcmdpblJpZ2h0OiBzcGFjZSggMyApIH0gKSgpIH1cbmA7XG4iXX0= */");
  var innerWrapper = () => /* @__PURE__ */ css(ValueInput, "{flex:1 1 40%;}&& ", UnitSelect, "{min-height:0;}" + (false ? "" : ";label:innerWrapper;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE2QnFDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIGJveFNpemluZ1Jlc2V0LCBydGwgfSBmcm9tICcuLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IFN0eWxlZExhYmVsIH0gZnJvbSAnLi4vYmFzZS1jb250cm9sL3N0eWxlcy9iYXNlLWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB7XG5cdFZhbHVlSW5wdXQgYXMgVW5pdENvbnRyb2xXcmFwcGVyLFxuXHRVbml0U2VsZWN0LFxufSBmcm9tICcuLi91bml0LWNvbnRyb2wvc3R5bGVzL3VuaXQtY29udHJvbC1zdHlsZXMnO1xuXG5pbXBvcnQgdHlwZSB7IEJvcmRlciB9IGZyb20gJy4vdHlwZXMnO1xuXG5jb25zdCBmb2N1c0JveFNoYWRvdyA9IGNzc2Bcblx0Ym94LXNoYWRvdzogaW5zZXQgJHsgQ09ORklHLmNvbnRyb2xCb3hTaGFkb3dGb2N1cyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2wgPSBjc3NgXG5cdGJvcmRlcjogMDtcblx0cGFkZGluZzogMDtcblx0bWFyZ2luOiAwO1xuXHQkeyBib3hTaXppbmdSZXNldCB9XG5gO1xuXG5leHBvcnQgY29uc3QgaW5uZXJXcmFwcGVyID0gKCkgPT4gY3NzYFxuXHQkeyBVbml0Q29udHJvbFdyYXBwZXIgfSB7XG5cdFx0ZmxleDogMSAxIDQwJTtcblx0fVxuXHQmJiAkeyBVbml0U2VsZWN0IH0ge1xuXHRcdC8qIFByZXZlbnQgdW5pdCBzZWxlY3QgZm9yY2luZyBtaW4gaGVpZ2h0IGxhcmdlciB0aGFuIGl0cyBVbml0Q29udHJvbCAqL1xuXHRcdG1pbi1oZWlnaHQ6IDA7XG5cdH1cbmA7XG5cbi8qXG4gKiBUaGlzIHN0eWxlIGlzIG9ubHkgYXBwbGllZCB0byB0aGUgVW5pdENvbnRyb2wgd3JhcHBlciB3aGVuIHRoZSBib3JkZXIgd2lkdGhcbiAqIGZpZWxkIHNob3VsZCBiZSBhIHNldCB3aWR0aC4gT21pdHRpbmcgdGhpcyBhbGxvd3MgdGhlIFVuaXRDb250cm9sICZcbiAqIFJhbmdlQ29udHJvbCB0byBzaGFyZSB0aGUgYXZhaWxhYmxlIHdpZHRoIGluIGEgNDAvNjAgc3BsaXQgcmVzcGVjdGl2ZWx5LlxuICovXG5leHBvcnQgY29uc3Qgd3JhcHBlcldpZHRoID0gY3NzYFxuXHQkeyBVbml0Q29udHJvbFdyYXBwZXIgfSB7XG5cdFx0LyogRm9yY2UgdGhlIFVuaXRDb250cm9sJ3Mgc2V0IHdpZHRoLiAqL1xuXHRcdGZsZXg6IDAgMCBhdXRvO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3Qgd3JhcHBlckhlaWdodCA9ICggc2l6ZT86ICdkZWZhdWx0JyB8ICdfX3Vuc3RhYmxlLWxhcmdlJyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRoZWlnaHQ6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICc0MHB4JyA6ICczMHB4JyB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2xEcm9wZG93biA9IGNzc2Bcblx0YmFja2dyb3VuZDogI2ZmZjtcblxuXHQmJiA+IGJ1dHRvbiB7XG5cdFx0YXNwZWN0LXJhdGlvOiAxO1xuXHRcdHBhZGRpbmc6IDA7XG5cdFx0ZGlzcGxheTogZmxleDtcblx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRcdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRcdCR7IHJ0bChcblx0XHRcdHsgYm9yZGVyUmFkaXVzOiBgMnB4IDAgMCAycHhgIH0sXG5cdFx0XHR7IGJvcmRlclJhZGl1czogYDAgMnB4IDJweCAwYCB9XG5cdFx0KSgpIH1cblx0XHRib3JkZXI6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy51aS5ib3JkZXIgfTtcblxuXHRcdCY6Zm9jdXMsXG5cdFx0Jjpob3Zlcjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdCR7IGZvY3VzQm94U2hhZG93IH1cblx0XHRcdGJvcmRlci1jb2xvcjogJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHR6LWluZGV4OiAxO1xuXHRcdFx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGNvbG9ySW5kaWNhdG9yQm9yZGVyID0gKCBib3JkZXI/OiBCb3JkZXIgKSA9PiB7XG5cdGNvbnN0IHsgY29sb3IsIHN0eWxlIH0gPSBib3JkZXIgfHwge307XG5cblx0Y29uc3QgZmFsbGJhY2tDb2xvciA9XG5cdFx0ISEgc3R5bGUgJiYgc3R5bGUgIT09ICdub25lJyA/IENPTE9SUy5ncmF5WyAzMDAgXSA6IHVuZGVmaW5lZDtcblxuXHRyZXR1cm4gY3NzYFxuXHRcdGJvcmRlci1zdHlsZTogJHsgc3R5bGUgPT09ICdub25lJyA/ICdzb2xpZCcgOiBzdHlsZSB9O1xuXHRcdGJvcmRlci1jb2xvcjogJHsgY29sb3IgfHwgZmFsbGJhY2tDb2xvciB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGNvbG9ySW5kaWNhdG9yV3JhcHBlciA9IChcblx0Ym9yZGVyPzogQm9yZGVyLFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IHtcblx0Y29uc3QgeyBzdHlsZSB9ID0gYm9yZGVyIHx8IHt9O1xuXG5cdHJldHVybiBjc3NgXG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0XHRib3JkZXI6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHQkeyBzdHlsZSA/IGNvbG9ySW5kaWNhdG9yQm9yZGVyKCBib3JkZXIgKSA6IHVuZGVmaW5lZCB9XG5cdFx0d2lkdGg6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICcyNHB4JyA6ICcyMnB4JyB9O1xuXHRcdGhlaWdodDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzI0cHgnIDogJzIycHgnIH07XG5cdFx0cGFkZGluZzogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzJweCcgOiAnMXB4JyB9O1xuXG5cdFx0Lypcblx0XHQgKiBDb2xvckluZGljYXRvclxuXHRcdCAqXG5cdFx0ICogVGhlIHRyYW5zcGFyZW50IGNvbG9ycyB1c2VkIGhlcmUgZW5zdXJlIHZpc2liaWxpdHkgb2YgdGhlIGluZGljYXRvclxuXHRcdCAqIG92ZXIgdGhlIGFjdGl2ZSBzdGF0ZSBvZiB0aGUgYm9yZGVyIGNvbnRyb2wgZHJvcGRvd24ncyB0b2dnbGUgYnV0dG9uLlxuXHRcdCAqL1xuXHRcdCYgPiBzcGFuIHtcblx0XHRcdGhlaWdodDogJHsgc3BhY2UoIDQgKSB9O1xuXHRcdFx0d2lkdGg6ICR7IHNwYWNlKCA0ICkgfTtcblx0XHRcdGJhY2tncm91bmQ6IGxpbmVhci1ncmFkaWVudChcblx0XHRcdFx0LTQ1ZGVnLFxuXHRcdFx0XHR0cmFuc3BhcmVudCA0OCUsXG5cdFx0XHRcdHJnYiggMCAwIDAgLyAyMCUgKSA0OCUsXG5cdFx0XHRcdHJnYiggMCAwIDAgLyAyMCUgKSA1MiUsXG5cdFx0XHRcdHRyYW5zcGFyZW50IDUyJVxuXHRcdFx0KTtcblx0XHR9XG5cdGA7XG59O1xuXG4vLyBNdXN0IGVxdWFsICRjb2xvci1wYWxldHRlLWNpcmNsZS1zaXplIGZyb206XG4vLyBAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2NpcmN1bGFyLW9wdGlvbi1waWNrZXIvc3R5bGUuc2Nzc1xuY29uc3Qgc3dhdGNoU2l6ZSA9IDI4O1xuY29uc3Qgc3dhdGNoR2FwID0gMTI7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJDb250cm9sUG9wb3ZlckNvbnRyb2xzID0gY3NzYFxuXHR3aWR0aDogJHsgc3dhdGNoU2l6ZSAqIDYgKyBzd2F0Y2hHYXAgKiA1IH1weDtcblxuXHQ+IGRpdjpmaXJzdC1vZi10eXBlID4gJHsgU3R5bGVkTGFiZWwgfSB7XG5cdFx0bWFyZ2luLWJvdHRvbTogMDtcblx0fVxuXG5cdCYmICR7IFN0eWxlZExhYmVsIH0gKyBidXR0b246bm90KCAuaGFzLXRleHQgKSB7XG5cdFx0bWluLXdpZHRoOiAyNHB4O1xuXHRcdHBhZGRpbmc6IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJDb250cm9sUG9wb3ZlckNvbnRlbnQgPSBjc3NgYDtcbmV4cG9ydCBjb25zdCBib3JkZXJDb2xvckluZGljYXRvciA9IGNzc2BgO1xuXG5leHBvcnQgY29uc3QgcmVzZXRCdXR0b25XcmFwcGVyID0gY3NzYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kO1xuXHRtYXJnaW4tdG9wOiAxMnB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlclNsaWRlciA9ICgpID0+IGNzc2Bcblx0ZmxleDogMSAxIDYwJTtcblx0JHsgcnRsKCB7IG1hcmdpblJpZ2h0OiBzcGFjZSggMyApIH0gKSgpIH1cbmA7XG4iXX0= */");
  var wrapperWidth = /* @__PURE__ */ css(ValueInput, "{flex:0 0 auto;}" + (false ? "" : ";label:wrapperWidth;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE0QytCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIGJveFNpemluZ1Jlc2V0LCBydGwgfSBmcm9tICcuLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IFN0eWxlZExhYmVsIH0gZnJvbSAnLi4vYmFzZS1jb250cm9sL3N0eWxlcy9iYXNlLWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB7XG5cdFZhbHVlSW5wdXQgYXMgVW5pdENvbnRyb2xXcmFwcGVyLFxuXHRVbml0U2VsZWN0LFxufSBmcm9tICcuLi91bml0LWNvbnRyb2wvc3R5bGVzL3VuaXQtY29udHJvbC1zdHlsZXMnO1xuXG5pbXBvcnQgdHlwZSB7IEJvcmRlciB9IGZyb20gJy4vdHlwZXMnO1xuXG5jb25zdCBmb2N1c0JveFNoYWRvdyA9IGNzc2Bcblx0Ym94LXNoYWRvdzogaW5zZXQgJHsgQ09ORklHLmNvbnRyb2xCb3hTaGFkb3dGb2N1cyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2wgPSBjc3NgXG5cdGJvcmRlcjogMDtcblx0cGFkZGluZzogMDtcblx0bWFyZ2luOiAwO1xuXHQkeyBib3hTaXppbmdSZXNldCB9XG5gO1xuXG5leHBvcnQgY29uc3QgaW5uZXJXcmFwcGVyID0gKCkgPT4gY3NzYFxuXHQkeyBVbml0Q29udHJvbFdyYXBwZXIgfSB7XG5cdFx0ZmxleDogMSAxIDQwJTtcblx0fVxuXHQmJiAkeyBVbml0U2VsZWN0IH0ge1xuXHRcdC8qIFByZXZlbnQgdW5pdCBzZWxlY3QgZm9yY2luZyBtaW4gaGVpZ2h0IGxhcmdlciB0aGFuIGl0cyBVbml0Q29udHJvbCAqL1xuXHRcdG1pbi1oZWlnaHQ6IDA7XG5cdH1cbmA7XG5cbi8qXG4gKiBUaGlzIHN0eWxlIGlzIG9ubHkgYXBwbGllZCB0byB0aGUgVW5pdENvbnRyb2wgd3JhcHBlciB3aGVuIHRoZSBib3JkZXIgd2lkdGhcbiAqIGZpZWxkIHNob3VsZCBiZSBhIHNldCB3aWR0aC4gT21pdHRpbmcgdGhpcyBhbGxvd3MgdGhlIFVuaXRDb250cm9sICZcbiAqIFJhbmdlQ29udHJvbCB0byBzaGFyZSB0aGUgYXZhaWxhYmxlIHdpZHRoIGluIGEgNDAvNjAgc3BsaXQgcmVzcGVjdGl2ZWx5LlxuICovXG5leHBvcnQgY29uc3Qgd3JhcHBlcldpZHRoID0gY3NzYFxuXHQkeyBVbml0Q29udHJvbFdyYXBwZXIgfSB7XG5cdFx0LyogRm9yY2UgdGhlIFVuaXRDb250cm9sJ3Mgc2V0IHdpZHRoLiAqL1xuXHRcdGZsZXg6IDAgMCBhdXRvO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3Qgd3JhcHBlckhlaWdodCA9ICggc2l6ZT86ICdkZWZhdWx0JyB8ICdfX3Vuc3RhYmxlLWxhcmdlJyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRoZWlnaHQ6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICc0MHB4JyA6ICczMHB4JyB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2xEcm9wZG93biA9IGNzc2Bcblx0YmFja2dyb3VuZDogI2ZmZjtcblxuXHQmJiA+IGJ1dHRvbiB7XG5cdFx0YXNwZWN0LXJhdGlvOiAxO1xuXHRcdHBhZGRpbmc6IDA7XG5cdFx0ZGlzcGxheTogZmxleDtcblx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRcdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRcdCR7IHJ0bChcblx0XHRcdHsgYm9yZGVyUmFkaXVzOiBgMnB4IDAgMCAycHhgIH0sXG5cdFx0XHR7IGJvcmRlclJhZGl1czogYDAgMnB4IDJweCAwYCB9XG5cdFx0KSgpIH1cblx0XHRib3JkZXI6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy51aS5ib3JkZXIgfTtcblxuXHRcdCY6Zm9jdXMsXG5cdFx0Jjpob3Zlcjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdCR7IGZvY3VzQm94U2hhZG93IH1cblx0XHRcdGJvcmRlci1jb2xvcjogJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHR6LWluZGV4OiAxO1xuXHRcdFx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGNvbG9ySW5kaWNhdG9yQm9yZGVyID0gKCBib3JkZXI/OiBCb3JkZXIgKSA9PiB7XG5cdGNvbnN0IHsgY29sb3IsIHN0eWxlIH0gPSBib3JkZXIgfHwge307XG5cblx0Y29uc3QgZmFsbGJhY2tDb2xvciA9XG5cdFx0ISEgc3R5bGUgJiYgc3R5bGUgIT09ICdub25lJyA/IENPTE9SUy5ncmF5WyAzMDAgXSA6IHVuZGVmaW5lZDtcblxuXHRyZXR1cm4gY3NzYFxuXHRcdGJvcmRlci1zdHlsZTogJHsgc3R5bGUgPT09ICdub25lJyA/ICdzb2xpZCcgOiBzdHlsZSB9O1xuXHRcdGJvcmRlci1jb2xvcjogJHsgY29sb3IgfHwgZmFsbGJhY2tDb2xvciB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGNvbG9ySW5kaWNhdG9yV3JhcHBlciA9IChcblx0Ym9yZGVyPzogQm9yZGVyLFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IHtcblx0Y29uc3QgeyBzdHlsZSB9ID0gYm9yZGVyIHx8IHt9O1xuXG5cdHJldHVybiBjc3NgXG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0XHRib3JkZXI6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHQkeyBzdHlsZSA/IGNvbG9ySW5kaWNhdG9yQm9yZGVyKCBib3JkZXIgKSA6IHVuZGVmaW5lZCB9XG5cdFx0d2lkdGg6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICcyNHB4JyA6ICcyMnB4JyB9O1xuXHRcdGhlaWdodDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzI0cHgnIDogJzIycHgnIH07XG5cdFx0cGFkZGluZzogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzJweCcgOiAnMXB4JyB9O1xuXG5cdFx0Lypcblx0XHQgKiBDb2xvckluZGljYXRvclxuXHRcdCAqXG5cdFx0ICogVGhlIHRyYW5zcGFyZW50IGNvbG9ycyB1c2VkIGhlcmUgZW5zdXJlIHZpc2liaWxpdHkgb2YgdGhlIGluZGljYXRvclxuXHRcdCAqIG92ZXIgdGhlIGFjdGl2ZSBzdGF0ZSBvZiB0aGUgYm9yZGVyIGNvbnRyb2wgZHJvcGRvd24ncyB0b2dnbGUgYnV0dG9uLlxuXHRcdCAqL1xuXHRcdCYgPiBzcGFuIHtcblx0XHRcdGhlaWdodDogJHsgc3BhY2UoIDQgKSB9O1xuXHRcdFx0d2lkdGg6ICR7IHNwYWNlKCA0ICkgfTtcblx0XHRcdGJhY2tncm91bmQ6IGxpbmVhci1ncmFkaWVudChcblx0XHRcdFx0LTQ1ZGVnLFxuXHRcdFx0XHR0cmFuc3BhcmVudCA0OCUsXG5cdFx0XHRcdHJnYiggMCAwIDAgLyAyMCUgKSA0OCUsXG5cdFx0XHRcdHJnYiggMCAwIDAgLyAyMCUgKSA1MiUsXG5cdFx0XHRcdHRyYW5zcGFyZW50IDUyJVxuXHRcdFx0KTtcblx0XHR9XG5cdGA7XG59O1xuXG4vLyBNdXN0IGVxdWFsICRjb2xvci1wYWxldHRlLWNpcmNsZS1zaXplIGZyb206XG4vLyBAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2NpcmN1bGFyLW9wdGlvbi1waWNrZXIvc3R5bGUuc2Nzc1xuY29uc3Qgc3dhdGNoU2l6ZSA9IDI4O1xuY29uc3Qgc3dhdGNoR2FwID0gMTI7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJDb250cm9sUG9wb3ZlckNvbnRyb2xzID0gY3NzYFxuXHR3aWR0aDogJHsgc3dhdGNoU2l6ZSAqIDYgKyBzd2F0Y2hHYXAgKiA1IH1weDtcblxuXHQ+IGRpdjpmaXJzdC1vZi10eXBlID4gJHsgU3R5bGVkTGFiZWwgfSB7XG5cdFx0bWFyZ2luLWJvdHRvbTogMDtcblx0fVxuXG5cdCYmICR7IFN0eWxlZExhYmVsIH0gKyBidXR0b246bm90KCAuaGFzLXRleHQgKSB7XG5cdFx0bWluLXdpZHRoOiAyNHB4O1xuXHRcdHBhZGRpbmc6IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJDb250cm9sUG9wb3ZlckNvbnRlbnQgPSBjc3NgYDtcbmV4cG9ydCBjb25zdCBib3JkZXJDb2xvckluZGljYXRvciA9IGNzc2BgO1xuXG5leHBvcnQgY29uc3QgcmVzZXRCdXR0b25XcmFwcGVyID0gY3NzYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kO1xuXHRtYXJnaW4tdG9wOiAxMnB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlclNsaWRlciA9ICgpID0+IGNzc2Bcblx0ZmxleDogMSAxIDYwJTtcblx0JHsgcnRsKCB7IG1hcmdpblJpZ2h0OiBzcGFjZSggMyApIH0gKSgpIH1cbmA7XG4iXX0= */");
  var wrapperHeight = (size3) => {
    return /* @__PURE__ */ css("height:", size3 === "__unstable-large" ? "40px" : "30px", ";" + (false ? "" : ";label:wrapperHeight;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvRFciLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgYm94U2l6aW5nUmVzZXQsIHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgU3R5bGVkTGFiZWwgfSBmcm9tICcuLi9iYXNlLWNvbnRyb2wvc3R5bGVzL2Jhc2UtY29udHJvbC1zdHlsZXMnO1xuaW1wb3J0IHtcblx0VmFsdWVJbnB1dCBhcyBVbml0Q29udHJvbFdyYXBwZXIsXG5cdFVuaXRTZWxlY3QsXG59IGZyb20gJy4uL3VuaXQtY29udHJvbC9zdHlsZXMvdW5pdC1jb250cm9sLXN0eWxlcyc7XG5cbmltcG9ydCB0eXBlIHsgQm9yZGVyIH0gZnJvbSAnLi90eXBlcyc7XG5cbmNvbnN0IGZvY3VzQm94U2hhZG93ID0gY3NzYFxuXHRib3gtc2hhZG93OiBpbnNldCAkeyBDT05GSUcuY29udHJvbEJveFNoYWRvd0ZvY3VzIH07XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyQ29udHJvbCA9IGNzc2Bcblx0Ym9yZGVyOiAwO1xuXHRwYWRkaW5nOiAwO1xuXHRtYXJnaW46IDA7XG5cdCR7IGJveFNpemluZ1Jlc2V0IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBpbm5lcldyYXBwZXIgPSAoKSA9PiBjc3NgXG5cdCR7IFVuaXRDb250cm9sV3JhcHBlciB9IHtcblx0XHRmbGV4OiAxIDEgNDAlO1xuXHR9XG5cdCYmICR7IFVuaXRTZWxlY3QgfSB7XG5cdFx0LyogUHJldmVudCB1bml0IHNlbGVjdCBmb3JjaW5nIG1pbiBoZWlnaHQgbGFyZ2VyIHRoYW4gaXRzIFVuaXRDb250cm9sICovXG5cdFx0bWluLWhlaWdodDogMDtcblx0fVxuYDtcblxuLypcbiAqIFRoaXMgc3R5bGUgaXMgb25seSBhcHBsaWVkIHRvIHRoZSBVbml0Q29udHJvbCB3cmFwcGVyIHdoZW4gdGhlIGJvcmRlciB3aWR0aFxuICogZmllbGQgc2hvdWxkIGJlIGEgc2V0IHdpZHRoLiBPbWl0dGluZyB0aGlzIGFsbG93cyB0aGUgVW5pdENvbnRyb2wgJlxuICogUmFuZ2VDb250cm9sIHRvIHNoYXJlIHRoZSBhdmFpbGFibGUgd2lkdGggaW4gYSA0MC82MCBzcGxpdCByZXNwZWN0aXZlbHkuXG4gKi9cbmV4cG9ydCBjb25zdCB3cmFwcGVyV2lkdGggPSBjc3NgXG5cdCR7IFVuaXRDb250cm9sV3JhcHBlciB9IHtcblx0XHQvKiBGb3JjZSB0aGUgVW5pdENvbnRyb2wncyBzZXQgd2lkdGguICovXG5cdFx0ZmxleDogMCAwIGF1dG87XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCB3cmFwcGVySGVpZ2h0ID0gKCBzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGhlaWdodDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzQwcHgnIDogJzMwcHgnIH07XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgYm9yZGVyQ29udHJvbERyb3Bkb3duID0gY3NzYFxuXHRiYWNrZ3JvdW5kOiAjZmZmO1xuXG5cdCYmID4gYnV0dG9uIHtcblx0XHRhc3BlY3QtcmF0aW86IDE7XG5cdFx0cGFkZGluZzogMDtcblx0XHRkaXNwbGF5OiBmbGV4O1xuXHRcdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdFx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cdFx0JHsgcnRsKFxuXHRcdFx0eyBib3JkZXJSYWRpdXM6IGAycHggMCAwIDJweGAgfSxcblx0XHRcdHsgYm9yZGVyUmFkaXVzOiBgMCAycHggMnB4IDBgIH1cblx0XHQpKCkgfVxuXHRcdGJvcmRlcjogJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gc29saWQgJHsgQ09MT1JTLnVpLmJvcmRlciB9O1xuXG5cdFx0Jjpmb2N1cyxcblx0XHQmOmhvdmVyOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0JHsgZm9jdXNCb3hTaGFkb3cgfVxuXHRcdFx0Ym9yZGVyLWNvbG9yOiAkeyBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTtcblx0XHRcdHotaW5kZXg6IDE7XG5cdFx0XHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgY29sb3JJbmRpY2F0b3JCb3JkZXIgPSAoIGJvcmRlcj86IEJvcmRlciApID0+IHtcblx0Y29uc3QgeyBjb2xvciwgc3R5bGUgfSA9IGJvcmRlciB8fCB7fTtcblxuXHRjb25zdCBmYWxsYmFja0NvbG9yID1cblx0XHQhISBzdHlsZSAmJiBzdHlsZSAhPT0gJ25vbmUnID8gQ09MT1JTLmdyYXlbIDMwMCBdIDogdW5kZWZpbmVkO1xuXG5cdHJldHVybiBjc3NgXG5cdFx0Ym9yZGVyLXN0eWxlOiAkeyBzdHlsZSA9PT0gJ25vbmUnID8gJ3NvbGlkJyA6IHN0eWxlIH07XG5cdFx0Ym9yZGVyLWNvbG9yOiAkeyBjb2xvciB8fCBmYWxsYmFja0NvbG9yIH07XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgY29sb3JJbmRpY2F0b3JXcmFwcGVyID0gKFxuXHRib3JkZXI/OiBCb3JkZXIsXG5cdHNpemU/OiAnZGVmYXVsdCcgfCAnX191bnN0YWJsZS1sYXJnZSdcbikgPT4ge1xuXHRjb25zdCB7IHN0eWxlIH0gPSBib3JkZXIgfHwge307XG5cblx0cmV0dXJuIGNzc2Bcblx0XHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXHRcdGJvcmRlcjogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdCR7IHN0eWxlID8gY29sb3JJbmRpY2F0b3JCb3JkZXIoIGJvcmRlciApIDogdW5kZWZpbmVkIH1cblx0XHR3aWR0aDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzI0cHgnIDogJzIycHgnIH07XG5cdFx0aGVpZ2h0OiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnMjRweCcgOiAnMjJweCcgfTtcblx0XHRwYWRkaW5nOiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnMnB4JyA6ICcxcHgnIH07XG5cblx0XHQvKlxuXHRcdCAqIENvbG9ySW5kaWNhdG9yXG5cdFx0ICpcblx0XHQgKiBUaGUgdHJhbnNwYXJlbnQgY29sb3JzIHVzZWQgaGVyZSBlbnN1cmUgdmlzaWJpbGl0eSBvZiB0aGUgaW5kaWNhdG9yXG5cdFx0ICogb3ZlciB0aGUgYWN0aXZlIHN0YXRlIG9mIHRoZSBib3JkZXIgY29udHJvbCBkcm9wZG93bidzIHRvZ2dsZSBidXR0b24uXG5cdFx0ICovXG5cdFx0JiA+IHNwYW4ge1xuXHRcdFx0aGVpZ2h0OiAkeyBzcGFjZSggNCApIH07XG5cdFx0XHR3aWR0aDogJHsgc3BhY2UoIDQgKSB9O1xuXHRcdFx0YmFja2dyb3VuZDogbGluZWFyLWdyYWRpZW50KFxuXHRcdFx0XHQtNDVkZWcsXG5cdFx0XHRcdHRyYW5zcGFyZW50IDQ4JSxcblx0XHRcdFx0cmdiKCAwIDAgMCAvIDIwJSApIDQ4JSxcblx0XHRcdFx0cmdiKCAwIDAgMCAvIDIwJSApIDUyJSxcblx0XHRcdFx0dHJhbnNwYXJlbnQgNTIlXG5cdFx0XHQpO1xuXHRcdH1cblx0YDtcbn07XG5cbi8vIE11c3QgZXF1YWwgJGNvbG9yLXBhbGV0dGUtY2lyY2xlLXNpemUgZnJvbTpcbi8vIEB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvY2lyY3VsYXItb3B0aW9uLXBpY2tlci9zdHlsZS5zY3NzXG5jb25zdCBzd2F0Y2hTaXplID0gMjg7XG5jb25zdCBzd2F0Y2hHYXAgPSAxMjtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2xQb3BvdmVyQ29udHJvbHMgPSBjc3NgXG5cdHdpZHRoOiAkeyBzd2F0Y2hTaXplICogNiArIHN3YXRjaEdhcCAqIDUgfXB4O1xuXG5cdD4gZGl2OmZpcnN0LW9mLXR5cGUgPiAkeyBTdHlsZWRMYWJlbCB9IHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5cblx0JiYgJHsgU3R5bGVkTGFiZWwgfSArIGJ1dHRvbjpub3QoIC5oYXMtdGV4dCApIHtcblx0XHRtaW4td2lkdGg6IDI0cHg7XG5cdFx0cGFkZGluZzogMDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2xQb3BvdmVyQ29udGVudCA9IGNzc2BgO1xuZXhwb3J0IGNvbnN0IGJvcmRlckNvbG9ySW5kaWNhdG9yID0gY3NzYGA7XG5cbmV4cG9ydCBjb25zdCByZXNldEJ1dHRvbldyYXBwZXIgPSBjc3NgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGp1c3RpZnktY29udGVudDogZmxleC1lbmQ7XG5cdG1hcmdpbi10b3A6IDEycHg7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyU2xpZGVyID0gKCkgPT4gY3NzYFxuXHRmbGV4OiAxIDEgNjAlO1xuXHQkeyBydGwoIHsgbWFyZ2luUmlnaHQ6IHNwYWNlKCAzICkgfSApKCkgfVxuYDtcbiJdfQ== */");
  };
  var borderControlDropdown = /* @__PURE__ */ css("background:#fff;&&>button{aspect-ratio:1;padding:0;display:flex;align-items:center;justify-content:center;", rtl({
    borderRadius: `2px 0 0 2px`
  }, {
    borderRadius: `0 2px 2px 0`
  })(), " border:", config_values_default.borderWidth, " solid ", COLORS.ui.border, ";&:focus,&:hover:not( :disabled ){", focusBoxShadow, " border-color:", COLORS.ui.borderFocus, ";z-index:1;position:relative;}}" + (false ? "" : ";label:borderControlDropdown;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF5RHdDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIGJveFNpemluZ1Jlc2V0LCBydGwgfSBmcm9tICcuLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IFN0eWxlZExhYmVsIH0gZnJvbSAnLi4vYmFzZS1jb250cm9sL3N0eWxlcy9iYXNlLWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB7XG5cdFZhbHVlSW5wdXQgYXMgVW5pdENvbnRyb2xXcmFwcGVyLFxuXHRVbml0U2VsZWN0LFxufSBmcm9tICcuLi91bml0LWNvbnRyb2wvc3R5bGVzL3VuaXQtY29udHJvbC1zdHlsZXMnO1xuXG5pbXBvcnQgdHlwZSB7IEJvcmRlciB9IGZyb20gJy4vdHlwZXMnO1xuXG5jb25zdCBmb2N1c0JveFNoYWRvdyA9IGNzc2Bcblx0Ym94LXNoYWRvdzogaW5zZXQgJHsgQ09ORklHLmNvbnRyb2xCb3hTaGFkb3dGb2N1cyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2wgPSBjc3NgXG5cdGJvcmRlcjogMDtcblx0cGFkZGluZzogMDtcblx0bWFyZ2luOiAwO1xuXHQkeyBib3hTaXppbmdSZXNldCB9XG5gO1xuXG5leHBvcnQgY29uc3QgaW5uZXJXcmFwcGVyID0gKCkgPT4gY3NzYFxuXHQkeyBVbml0Q29udHJvbFdyYXBwZXIgfSB7XG5cdFx0ZmxleDogMSAxIDQwJTtcblx0fVxuXHQmJiAkeyBVbml0U2VsZWN0IH0ge1xuXHRcdC8qIFByZXZlbnQgdW5pdCBzZWxlY3QgZm9yY2luZyBtaW4gaGVpZ2h0IGxhcmdlciB0aGFuIGl0cyBVbml0Q29udHJvbCAqL1xuXHRcdG1pbi1oZWlnaHQ6IDA7XG5cdH1cbmA7XG5cbi8qXG4gKiBUaGlzIHN0eWxlIGlzIG9ubHkgYXBwbGllZCB0byB0aGUgVW5pdENvbnRyb2wgd3JhcHBlciB3aGVuIHRoZSBib3JkZXIgd2lkdGhcbiAqIGZpZWxkIHNob3VsZCBiZSBhIHNldCB3aWR0aC4gT21pdHRpbmcgdGhpcyBhbGxvd3MgdGhlIFVuaXRDb250cm9sICZcbiAqIFJhbmdlQ29udHJvbCB0byBzaGFyZSB0aGUgYXZhaWxhYmxlIHdpZHRoIGluIGEgNDAvNjAgc3BsaXQgcmVzcGVjdGl2ZWx5LlxuICovXG5leHBvcnQgY29uc3Qgd3JhcHBlcldpZHRoID0gY3NzYFxuXHQkeyBVbml0Q29udHJvbFdyYXBwZXIgfSB7XG5cdFx0LyogRm9yY2UgdGhlIFVuaXRDb250cm9sJ3Mgc2V0IHdpZHRoLiAqL1xuXHRcdGZsZXg6IDAgMCBhdXRvO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3Qgd3JhcHBlckhlaWdodCA9ICggc2l6ZT86ICdkZWZhdWx0JyB8ICdfX3Vuc3RhYmxlLWxhcmdlJyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRoZWlnaHQ6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICc0MHB4JyA6ICczMHB4JyB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2xEcm9wZG93biA9IGNzc2Bcblx0YmFja2dyb3VuZDogI2ZmZjtcblxuXHQmJiA+IGJ1dHRvbiB7XG5cdFx0YXNwZWN0LXJhdGlvOiAxO1xuXHRcdHBhZGRpbmc6IDA7XG5cdFx0ZGlzcGxheTogZmxleDtcblx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRcdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRcdCR7IHJ0bChcblx0XHRcdHsgYm9yZGVyUmFkaXVzOiBgMnB4IDAgMCAycHhgIH0sXG5cdFx0XHR7IGJvcmRlclJhZGl1czogYDAgMnB4IDJweCAwYCB9XG5cdFx0KSgpIH1cblx0XHRib3JkZXI6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy51aS5ib3JkZXIgfTtcblxuXHRcdCY6Zm9jdXMsXG5cdFx0Jjpob3Zlcjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdCR7IGZvY3VzQm94U2hhZG93IH1cblx0XHRcdGJvcmRlci1jb2xvcjogJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHR6LWluZGV4OiAxO1xuXHRcdFx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGNvbG9ySW5kaWNhdG9yQm9yZGVyID0gKCBib3JkZXI/OiBCb3JkZXIgKSA9PiB7XG5cdGNvbnN0IHsgY29sb3IsIHN0eWxlIH0gPSBib3JkZXIgfHwge307XG5cblx0Y29uc3QgZmFsbGJhY2tDb2xvciA9XG5cdFx0ISEgc3R5bGUgJiYgc3R5bGUgIT09ICdub25lJyA/IENPTE9SUy5ncmF5WyAzMDAgXSA6IHVuZGVmaW5lZDtcblxuXHRyZXR1cm4gY3NzYFxuXHRcdGJvcmRlci1zdHlsZTogJHsgc3R5bGUgPT09ICdub25lJyA/ICdzb2xpZCcgOiBzdHlsZSB9O1xuXHRcdGJvcmRlci1jb2xvcjogJHsgY29sb3IgfHwgZmFsbGJhY2tDb2xvciB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGNvbG9ySW5kaWNhdG9yV3JhcHBlciA9IChcblx0Ym9yZGVyPzogQm9yZGVyLFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IHtcblx0Y29uc3QgeyBzdHlsZSB9ID0gYm9yZGVyIHx8IHt9O1xuXG5cdHJldHVybiBjc3NgXG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0XHRib3JkZXI6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHQkeyBzdHlsZSA/IGNvbG9ySW5kaWNhdG9yQm9yZGVyKCBib3JkZXIgKSA6IHVuZGVmaW5lZCB9XG5cdFx0d2lkdGg6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICcyNHB4JyA6ICcyMnB4JyB9O1xuXHRcdGhlaWdodDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzI0cHgnIDogJzIycHgnIH07XG5cdFx0cGFkZGluZzogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzJweCcgOiAnMXB4JyB9O1xuXG5cdFx0Lypcblx0XHQgKiBDb2xvckluZGljYXRvclxuXHRcdCAqXG5cdFx0ICogVGhlIHRyYW5zcGFyZW50IGNvbG9ycyB1c2VkIGhlcmUgZW5zdXJlIHZpc2liaWxpdHkgb2YgdGhlIGluZGljYXRvclxuXHRcdCAqIG92ZXIgdGhlIGFjdGl2ZSBzdGF0ZSBvZiB0aGUgYm9yZGVyIGNvbnRyb2wgZHJvcGRvd24ncyB0b2dnbGUgYnV0dG9uLlxuXHRcdCAqL1xuXHRcdCYgPiBzcGFuIHtcblx0XHRcdGhlaWdodDogJHsgc3BhY2UoIDQgKSB9O1xuXHRcdFx0d2lkdGg6ICR7IHNwYWNlKCA0ICkgfTtcblx0XHRcdGJhY2tncm91bmQ6IGxpbmVhci1ncmFkaWVudChcblx0XHRcdFx0LTQ1ZGVnLFxuXHRcdFx0XHR0cmFuc3BhcmVudCA0OCUsXG5cdFx0XHRcdHJnYiggMCAwIDAgLyAyMCUgKSA0OCUsXG5cdFx0XHRcdHJnYiggMCAwIDAgLyAyMCUgKSA1MiUsXG5cdFx0XHRcdHRyYW5zcGFyZW50IDUyJVxuXHRcdFx0KTtcblx0XHR9XG5cdGA7XG59O1xuXG4vLyBNdXN0IGVxdWFsICRjb2xvci1wYWxldHRlLWNpcmNsZS1zaXplIGZyb206XG4vLyBAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2NpcmN1bGFyLW9wdGlvbi1waWNrZXIvc3R5bGUuc2Nzc1xuY29uc3Qgc3dhdGNoU2l6ZSA9IDI4O1xuY29uc3Qgc3dhdGNoR2FwID0gMTI7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJDb250cm9sUG9wb3ZlckNvbnRyb2xzID0gY3NzYFxuXHR3aWR0aDogJHsgc3dhdGNoU2l6ZSAqIDYgKyBzd2F0Y2hHYXAgKiA1IH1weDtcblxuXHQ+IGRpdjpmaXJzdC1vZi10eXBlID4gJHsgU3R5bGVkTGFiZWwgfSB7XG5cdFx0bWFyZ2luLWJvdHRvbTogMDtcblx0fVxuXG5cdCYmICR7IFN0eWxlZExhYmVsIH0gKyBidXR0b246bm90KCAuaGFzLXRleHQgKSB7XG5cdFx0bWluLXdpZHRoOiAyNHB4O1xuXHRcdHBhZGRpbmc6IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJDb250cm9sUG9wb3ZlckNvbnRlbnQgPSBjc3NgYDtcbmV4cG9ydCBjb25zdCBib3JkZXJDb2xvckluZGljYXRvciA9IGNzc2BgO1xuXG5leHBvcnQgY29uc3QgcmVzZXRCdXR0b25XcmFwcGVyID0gY3NzYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kO1xuXHRtYXJnaW4tdG9wOiAxMnB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlclNsaWRlciA9ICgpID0+IGNzc2Bcblx0ZmxleDogMSAxIDYwJTtcblx0JHsgcnRsKCB7IG1hcmdpblJpZ2h0OiBzcGFjZSggMyApIH0gKSgpIH1cbmA7XG4iXX0= */");
  var colorIndicatorBorder = (border) => {
    const {
      color: color2,
      style: style2
    } = border || {};
    const fallbackColor = !!style2 && style2 !== "none" ? COLORS.gray[300] : void 0;
    return /* @__PURE__ */ css("border-style:", style2 === "none" ? "solid" : style2, ";border-color:", color2 || fallbackColor, ";" + (false ? "" : ";label:colorIndicatorBorder;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3RlciLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgYm94U2l6aW5nUmVzZXQsIHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgU3R5bGVkTGFiZWwgfSBmcm9tICcuLi9iYXNlLWNvbnRyb2wvc3R5bGVzL2Jhc2UtY29udHJvbC1zdHlsZXMnO1xuaW1wb3J0IHtcblx0VmFsdWVJbnB1dCBhcyBVbml0Q29udHJvbFdyYXBwZXIsXG5cdFVuaXRTZWxlY3QsXG59IGZyb20gJy4uL3VuaXQtY29udHJvbC9zdHlsZXMvdW5pdC1jb250cm9sLXN0eWxlcyc7XG5cbmltcG9ydCB0eXBlIHsgQm9yZGVyIH0gZnJvbSAnLi90eXBlcyc7XG5cbmNvbnN0IGZvY3VzQm94U2hhZG93ID0gY3NzYFxuXHRib3gtc2hhZG93OiBpbnNldCAkeyBDT05GSUcuY29udHJvbEJveFNoYWRvd0ZvY3VzIH07XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyQ29udHJvbCA9IGNzc2Bcblx0Ym9yZGVyOiAwO1xuXHRwYWRkaW5nOiAwO1xuXHRtYXJnaW46IDA7XG5cdCR7IGJveFNpemluZ1Jlc2V0IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBpbm5lcldyYXBwZXIgPSAoKSA9PiBjc3NgXG5cdCR7IFVuaXRDb250cm9sV3JhcHBlciB9IHtcblx0XHRmbGV4OiAxIDEgNDAlO1xuXHR9XG5cdCYmICR7IFVuaXRTZWxlY3QgfSB7XG5cdFx0LyogUHJldmVudCB1bml0IHNlbGVjdCBmb3JjaW5nIG1pbiBoZWlnaHQgbGFyZ2VyIHRoYW4gaXRzIFVuaXRDb250cm9sICovXG5cdFx0bWluLWhlaWdodDogMDtcblx0fVxuYDtcblxuLypcbiAqIFRoaXMgc3R5bGUgaXMgb25seSBhcHBsaWVkIHRvIHRoZSBVbml0Q29udHJvbCB3cmFwcGVyIHdoZW4gdGhlIGJvcmRlciB3aWR0aFxuICogZmllbGQgc2hvdWxkIGJlIGEgc2V0IHdpZHRoLiBPbWl0dGluZyB0aGlzIGFsbG93cyB0aGUgVW5pdENvbnRyb2wgJlxuICogUmFuZ2VDb250cm9sIHRvIHNoYXJlIHRoZSBhdmFpbGFibGUgd2lkdGggaW4gYSA0MC82MCBzcGxpdCByZXNwZWN0aXZlbHkuXG4gKi9cbmV4cG9ydCBjb25zdCB3cmFwcGVyV2lkdGggPSBjc3NgXG5cdCR7IFVuaXRDb250cm9sV3JhcHBlciB9IHtcblx0XHQvKiBGb3JjZSB0aGUgVW5pdENvbnRyb2wncyBzZXQgd2lkdGguICovXG5cdFx0ZmxleDogMCAwIGF1dG87XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCB3cmFwcGVySGVpZ2h0ID0gKCBzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGhlaWdodDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzQwcHgnIDogJzMwcHgnIH07XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgYm9yZGVyQ29udHJvbERyb3Bkb3duID0gY3NzYFxuXHRiYWNrZ3JvdW5kOiAjZmZmO1xuXG5cdCYmID4gYnV0dG9uIHtcblx0XHRhc3BlY3QtcmF0aW86IDE7XG5cdFx0cGFkZGluZzogMDtcblx0XHRkaXNwbGF5OiBmbGV4O1xuXHRcdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdFx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cdFx0JHsgcnRsKFxuXHRcdFx0eyBib3JkZXJSYWRpdXM6IGAycHggMCAwIDJweGAgfSxcblx0XHRcdHsgYm9yZGVyUmFkaXVzOiBgMCAycHggMnB4IDBgIH1cblx0XHQpKCkgfVxuXHRcdGJvcmRlcjogJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gc29saWQgJHsgQ09MT1JTLnVpLmJvcmRlciB9O1xuXG5cdFx0Jjpmb2N1cyxcblx0XHQmOmhvdmVyOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0JHsgZm9jdXNCb3hTaGFkb3cgfVxuXHRcdFx0Ym9yZGVyLWNvbG9yOiAkeyBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTtcblx0XHRcdHotaW5kZXg6IDE7XG5cdFx0XHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgY29sb3JJbmRpY2F0b3JCb3JkZXIgPSAoIGJvcmRlcj86IEJvcmRlciApID0+IHtcblx0Y29uc3QgeyBjb2xvciwgc3R5bGUgfSA9IGJvcmRlciB8fCB7fTtcblxuXHRjb25zdCBmYWxsYmFja0NvbG9yID1cblx0XHQhISBzdHlsZSAmJiBzdHlsZSAhPT0gJ25vbmUnID8gQ09MT1JTLmdyYXlbIDMwMCBdIDogdW5kZWZpbmVkO1xuXG5cdHJldHVybiBjc3NgXG5cdFx0Ym9yZGVyLXN0eWxlOiAkeyBzdHlsZSA9PT0gJ25vbmUnID8gJ3NvbGlkJyA6IHN0eWxlIH07XG5cdFx0Ym9yZGVyLWNvbG9yOiAkeyBjb2xvciB8fCBmYWxsYmFja0NvbG9yIH07XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgY29sb3JJbmRpY2F0b3JXcmFwcGVyID0gKFxuXHRib3JkZXI/OiBCb3JkZXIsXG5cdHNpemU/OiAnZGVmYXVsdCcgfCAnX191bnN0YWJsZS1sYXJnZSdcbikgPT4ge1xuXHRjb25zdCB7IHN0eWxlIH0gPSBib3JkZXIgfHwge307XG5cblx0cmV0dXJuIGNzc2Bcblx0XHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXHRcdGJvcmRlcjogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdCR7IHN0eWxlID8gY29sb3JJbmRpY2F0b3JCb3JkZXIoIGJvcmRlciApIDogdW5kZWZpbmVkIH1cblx0XHR3aWR0aDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzI0cHgnIDogJzIycHgnIH07XG5cdFx0aGVpZ2h0OiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnMjRweCcgOiAnMjJweCcgfTtcblx0XHRwYWRkaW5nOiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnMnB4JyA6ICcxcHgnIH07XG5cblx0XHQvKlxuXHRcdCAqIENvbG9ySW5kaWNhdG9yXG5cdFx0ICpcblx0XHQgKiBUaGUgdHJhbnNwYXJlbnQgY29sb3JzIHVzZWQgaGVyZSBlbnN1cmUgdmlzaWJpbGl0eSBvZiB0aGUgaW5kaWNhdG9yXG5cdFx0ICogb3ZlciB0aGUgYWN0aXZlIHN0YXRlIG9mIHRoZSBib3JkZXIgY29udHJvbCBkcm9wZG93bidzIHRvZ2dsZSBidXR0b24uXG5cdFx0ICovXG5cdFx0JiA+IHNwYW4ge1xuXHRcdFx0aGVpZ2h0OiAkeyBzcGFjZSggNCApIH07XG5cdFx0XHR3aWR0aDogJHsgc3BhY2UoIDQgKSB9O1xuXHRcdFx0YmFja2dyb3VuZDogbGluZWFyLWdyYWRpZW50KFxuXHRcdFx0XHQtNDVkZWcsXG5cdFx0XHRcdHRyYW5zcGFyZW50IDQ4JSxcblx0XHRcdFx0cmdiKCAwIDAgMCAvIDIwJSApIDQ4JSxcblx0XHRcdFx0cmdiKCAwIDAgMCAvIDIwJSApIDUyJSxcblx0XHRcdFx0dHJhbnNwYXJlbnQgNTIlXG5cdFx0XHQpO1xuXHRcdH1cblx0YDtcbn07XG5cbi8vIE11c3QgZXF1YWwgJGNvbG9yLXBhbGV0dGUtY2lyY2xlLXNpemUgZnJvbTpcbi8vIEB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvY2lyY3VsYXItb3B0aW9uLXBpY2tlci9zdHlsZS5zY3NzXG5jb25zdCBzd2F0Y2hTaXplID0gMjg7XG5jb25zdCBzd2F0Y2hHYXAgPSAxMjtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2xQb3BvdmVyQ29udHJvbHMgPSBjc3NgXG5cdHdpZHRoOiAkeyBzd2F0Y2hTaXplICogNiArIHN3YXRjaEdhcCAqIDUgfXB4O1xuXG5cdD4gZGl2OmZpcnN0LW9mLXR5cGUgPiAkeyBTdHlsZWRMYWJlbCB9IHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5cblx0JiYgJHsgU3R5bGVkTGFiZWwgfSArIGJ1dHRvbjpub3QoIC5oYXMtdGV4dCApIHtcblx0XHRtaW4td2lkdGg6IDI0cHg7XG5cdFx0cGFkZGluZzogMDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2xQb3BvdmVyQ29udGVudCA9IGNzc2BgO1xuZXhwb3J0IGNvbnN0IGJvcmRlckNvbG9ySW5kaWNhdG9yID0gY3NzYGA7XG5cbmV4cG9ydCBjb25zdCByZXNldEJ1dHRvbldyYXBwZXIgPSBjc3NgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGp1c3RpZnktY29udGVudDogZmxleC1lbmQ7XG5cdG1hcmdpbi10b3A6IDEycHg7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyU2xpZGVyID0gKCkgPT4gY3NzYFxuXHRmbGV4OiAxIDEgNjAlO1xuXHQkeyBydGwoIHsgbWFyZ2luUmlnaHQ6IHNwYWNlKCAzICkgfSApKCkgfVxuYDtcbiJdfQ== */");
  };
  var colorIndicatorWrapper = (border, size3) => {
    const {
      style: style2
    } = border || {};
    return /* @__PURE__ */ css("border-radius:", config_values_default.radiusFull, ";border:2px solid transparent;", style2 ? colorIndicatorBorder(border) : void 0, " width:", size3 === "__unstable-large" ? "24px" : "22px", ";height:", size3 === "__unstable-large" ? "24px" : "22px", ";padding:", size3 === "__unstable-large" ? "2px" : "1px", ";&>span{height:", space(4), ";width:", space(4), ";background:linear-gradient(\n				-45deg,\n				transparent 48%,\n				rgb( 0 0 0 / 20% ) 48%,\n				rgb( 0 0 0 / 20% ) 52%,\n				transparent 52%\n			);}" + (false ? "" : ";label:colorIndicatorWrapper;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvR1ciLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgYm94U2l6aW5nUmVzZXQsIHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgU3R5bGVkTGFiZWwgfSBmcm9tICcuLi9iYXNlLWNvbnRyb2wvc3R5bGVzL2Jhc2UtY29udHJvbC1zdHlsZXMnO1xuaW1wb3J0IHtcblx0VmFsdWVJbnB1dCBhcyBVbml0Q29udHJvbFdyYXBwZXIsXG5cdFVuaXRTZWxlY3QsXG59IGZyb20gJy4uL3VuaXQtY29udHJvbC9zdHlsZXMvdW5pdC1jb250cm9sLXN0eWxlcyc7XG5cbmltcG9ydCB0eXBlIHsgQm9yZGVyIH0gZnJvbSAnLi90eXBlcyc7XG5cbmNvbnN0IGZvY3VzQm94U2hhZG93ID0gY3NzYFxuXHRib3gtc2hhZG93OiBpbnNldCAkeyBDT05GSUcuY29udHJvbEJveFNoYWRvd0ZvY3VzIH07XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyQ29udHJvbCA9IGNzc2Bcblx0Ym9yZGVyOiAwO1xuXHRwYWRkaW5nOiAwO1xuXHRtYXJnaW46IDA7XG5cdCR7IGJveFNpemluZ1Jlc2V0IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBpbm5lcldyYXBwZXIgPSAoKSA9PiBjc3NgXG5cdCR7IFVuaXRDb250cm9sV3JhcHBlciB9IHtcblx0XHRmbGV4OiAxIDEgNDAlO1xuXHR9XG5cdCYmICR7IFVuaXRTZWxlY3QgfSB7XG5cdFx0LyogUHJldmVudCB1bml0IHNlbGVjdCBmb3JjaW5nIG1pbiBoZWlnaHQgbGFyZ2VyIHRoYW4gaXRzIFVuaXRDb250cm9sICovXG5cdFx0bWluLWhlaWdodDogMDtcblx0fVxuYDtcblxuLypcbiAqIFRoaXMgc3R5bGUgaXMgb25seSBhcHBsaWVkIHRvIHRoZSBVbml0Q29udHJvbCB3cmFwcGVyIHdoZW4gdGhlIGJvcmRlciB3aWR0aFxuICogZmllbGQgc2hvdWxkIGJlIGEgc2V0IHdpZHRoLiBPbWl0dGluZyB0aGlzIGFsbG93cyB0aGUgVW5pdENvbnRyb2wgJlxuICogUmFuZ2VDb250cm9sIHRvIHNoYXJlIHRoZSBhdmFpbGFibGUgd2lkdGggaW4gYSA0MC82MCBzcGxpdCByZXNwZWN0aXZlbHkuXG4gKi9cbmV4cG9ydCBjb25zdCB3cmFwcGVyV2lkdGggPSBjc3NgXG5cdCR7IFVuaXRDb250cm9sV3JhcHBlciB9IHtcblx0XHQvKiBGb3JjZSB0aGUgVW5pdENvbnRyb2wncyBzZXQgd2lkdGguICovXG5cdFx0ZmxleDogMCAwIGF1dG87XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCB3cmFwcGVySGVpZ2h0ID0gKCBzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGhlaWdodDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzQwcHgnIDogJzMwcHgnIH07XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgYm9yZGVyQ29udHJvbERyb3Bkb3duID0gY3NzYFxuXHRiYWNrZ3JvdW5kOiAjZmZmO1xuXG5cdCYmID4gYnV0dG9uIHtcblx0XHRhc3BlY3QtcmF0aW86IDE7XG5cdFx0cGFkZGluZzogMDtcblx0XHRkaXNwbGF5OiBmbGV4O1xuXHRcdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdFx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cdFx0JHsgcnRsKFxuXHRcdFx0eyBib3JkZXJSYWRpdXM6IGAycHggMCAwIDJweGAgfSxcblx0XHRcdHsgYm9yZGVyUmFkaXVzOiBgMCAycHggMnB4IDBgIH1cblx0XHQpKCkgfVxuXHRcdGJvcmRlcjogJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gc29saWQgJHsgQ09MT1JTLnVpLmJvcmRlciB9O1xuXG5cdFx0Jjpmb2N1cyxcblx0XHQmOmhvdmVyOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0JHsgZm9jdXNCb3hTaGFkb3cgfVxuXHRcdFx0Ym9yZGVyLWNvbG9yOiAkeyBDT0xPUlMudWkuYm9yZGVyRm9jdXMgfTtcblx0XHRcdHotaW5kZXg6IDE7XG5cdFx0XHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgY29sb3JJbmRpY2F0b3JCb3JkZXIgPSAoIGJvcmRlcj86IEJvcmRlciApID0+IHtcblx0Y29uc3QgeyBjb2xvciwgc3R5bGUgfSA9IGJvcmRlciB8fCB7fTtcblxuXHRjb25zdCBmYWxsYmFja0NvbG9yID1cblx0XHQhISBzdHlsZSAmJiBzdHlsZSAhPT0gJ25vbmUnID8gQ09MT1JTLmdyYXlbIDMwMCBdIDogdW5kZWZpbmVkO1xuXG5cdHJldHVybiBjc3NgXG5cdFx0Ym9yZGVyLXN0eWxlOiAkeyBzdHlsZSA9PT0gJ25vbmUnID8gJ3NvbGlkJyA6IHN0eWxlIH07XG5cdFx0Ym9yZGVyLWNvbG9yOiAkeyBjb2xvciB8fCBmYWxsYmFja0NvbG9yIH07XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgY29sb3JJbmRpY2F0b3JXcmFwcGVyID0gKFxuXHRib3JkZXI/OiBCb3JkZXIsXG5cdHNpemU/OiAnZGVmYXVsdCcgfCAnX191bnN0YWJsZS1sYXJnZSdcbikgPT4ge1xuXHRjb25zdCB7IHN0eWxlIH0gPSBib3JkZXIgfHwge307XG5cblx0cmV0dXJuIGNzc2Bcblx0XHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXHRcdGJvcmRlcjogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdCR7IHN0eWxlID8gY29sb3JJbmRpY2F0b3JCb3JkZXIoIGJvcmRlciApIDogdW5kZWZpbmVkIH1cblx0XHR3aWR0aDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzI0cHgnIDogJzIycHgnIH07XG5cdFx0aGVpZ2h0OiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnMjRweCcgOiAnMjJweCcgfTtcblx0XHRwYWRkaW5nOiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnMnB4JyA6ICcxcHgnIH07XG5cblx0XHQvKlxuXHRcdCAqIENvbG9ySW5kaWNhdG9yXG5cdFx0ICpcblx0XHQgKiBUaGUgdHJhbnNwYXJlbnQgY29sb3JzIHVzZWQgaGVyZSBlbnN1cmUgdmlzaWJpbGl0eSBvZiB0aGUgaW5kaWNhdG9yXG5cdFx0ICogb3ZlciB0aGUgYWN0aXZlIHN0YXRlIG9mIHRoZSBib3JkZXIgY29udHJvbCBkcm9wZG93bidzIHRvZ2dsZSBidXR0b24uXG5cdFx0ICovXG5cdFx0JiA+IHNwYW4ge1xuXHRcdFx0aGVpZ2h0OiAkeyBzcGFjZSggNCApIH07XG5cdFx0XHR3aWR0aDogJHsgc3BhY2UoIDQgKSB9O1xuXHRcdFx0YmFja2dyb3VuZDogbGluZWFyLWdyYWRpZW50KFxuXHRcdFx0XHQtNDVkZWcsXG5cdFx0XHRcdHRyYW5zcGFyZW50IDQ4JSxcblx0XHRcdFx0cmdiKCAwIDAgMCAvIDIwJSApIDQ4JSxcblx0XHRcdFx0cmdiKCAwIDAgMCAvIDIwJSApIDUyJSxcblx0XHRcdFx0dHJhbnNwYXJlbnQgNTIlXG5cdFx0XHQpO1xuXHRcdH1cblx0YDtcbn07XG5cbi8vIE11c3QgZXF1YWwgJGNvbG9yLXBhbGV0dGUtY2lyY2xlLXNpemUgZnJvbTpcbi8vIEB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvY2lyY3VsYXItb3B0aW9uLXBpY2tlci9zdHlsZS5zY3NzXG5jb25zdCBzd2F0Y2hTaXplID0gMjg7XG5jb25zdCBzd2F0Y2hHYXAgPSAxMjtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2xQb3BvdmVyQ29udHJvbHMgPSBjc3NgXG5cdHdpZHRoOiAkeyBzd2F0Y2hTaXplICogNiArIHN3YXRjaEdhcCAqIDUgfXB4O1xuXG5cdD4gZGl2OmZpcnN0LW9mLXR5cGUgPiAkeyBTdHlsZWRMYWJlbCB9IHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5cblx0JiYgJHsgU3R5bGVkTGFiZWwgfSArIGJ1dHRvbjpub3QoIC5oYXMtdGV4dCApIHtcblx0XHRtaW4td2lkdGg6IDI0cHg7XG5cdFx0cGFkZGluZzogMDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2xQb3BvdmVyQ29udGVudCA9IGNzc2BgO1xuZXhwb3J0IGNvbnN0IGJvcmRlckNvbG9ySW5kaWNhdG9yID0gY3NzYGA7XG5cbmV4cG9ydCBjb25zdCByZXNldEJ1dHRvbldyYXBwZXIgPSBjc3NgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGp1c3RpZnktY29udGVudDogZmxleC1lbmQ7XG5cdG1hcmdpbi10b3A6IDEycHg7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyU2xpZGVyID0gKCkgPT4gY3NzYFxuXHRmbGV4OiAxIDEgNjAlO1xuXHQkeyBydGwoIHsgbWFyZ2luUmlnaHQ6IHNwYWNlKCAzICkgfSApKCkgfVxuYDtcbiJdfQ== */");
  };
  var swatchSize = 28;
  var swatchGap = 12;
  var borderControlPopoverControls = /* @__PURE__ */ css("width:", swatchSize * 6 + swatchGap * 5, "px;>div:first-of-type>", StyledLabel, "{margin-bottom:0;}&& ", StyledLabel, "+button:not( .has-text ){min-width:24px;padding:0;}" + (false ? "" : ";label:borderControlPopoverControls;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxSStDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIGJveFNpemluZ1Jlc2V0LCBydGwgfSBmcm9tICcuLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IFN0eWxlZExhYmVsIH0gZnJvbSAnLi4vYmFzZS1jb250cm9sL3N0eWxlcy9iYXNlLWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB7XG5cdFZhbHVlSW5wdXQgYXMgVW5pdENvbnRyb2xXcmFwcGVyLFxuXHRVbml0U2VsZWN0LFxufSBmcm9tICcuLi91bml0LWNvbnRyb2wvc3R5bGVzL3VuaXQtY29udHJvbC1zdHlsZXMnO1xuXG5pbXBvcnQgdHlwZSB7IEJvcmRlciB9IGZyb20gJy4vdHlwZXMnO1xuXG5jb25zdCBmb2N1c0JveFNoYWRvdyA9IGNzc2Bcblx0Ym94LXNoYWRvdzogaW5zZXQgJHsgQ09ORklHLmNvbnRyb2xCb3hTaGFkb3dGb2N1cyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2wgPSBjc3NgXG5cdGJvcmRlcjogMDtcblx0cGFkZGluZzogMDtcblx0bWFyZ2luOiAwO1xuXHQkeyBib3hTaXppbmdSZXNldCB9XG5gO1xuXG5leHBvcnQgY29uc3QgaW5uZXJXcmFwcGVyID0gKCkgPT4gY3NzYFxuXHQkeyBVbml0Q29udHJvbFdyYXBwZXIgfSB7XG5cdFx0ZmxleDogMSAxIDQwJTtcblx0fVxuXHQmJiAkeyBVbml0U2VsZWN0IH0ge1xuXHRcdC8qIFByZXZlbnQgdW5pdCBzZWxlY3QgZm9yY2luZyBtaW4gaGVpZ2h0IGxhcmdlciB0aGFuIGl0cyBVbml0Q29udHJvbCAqL1xuXHRcdG1pbi1oZWlnaHQ6IDA7XG5cdH1cbmA7XG5cbi8qXG4gKiBUaGlzIHN0eWxlIGlzIG9ubHkgYXBwbGllZCB0byB0aGUgVW5pdENvbnRyb2wgd3JhcHBlciB3aGVuIHRoZSBib3JkZXIgd2lkdGhcbiAqIGZpZWxkIHNob3VsZCBiZSBhIHNldCB3aWR0aC4gT21pdHRpbmcgdGhpcyBhbGxvd3MgdGhlIFVuaXRDb250cm9sICZcbiAqIFJhbmdlQ29udHJvbCB0byBzaGFyZSB0aGUgYXZhaWxhYmxlIHdpZHRoIGluIGEgNDAvNjAgc3BsaXQgcmVzcGVjdGl2ZWx5LlxuICovXG5leHBvcnQgY29uc3Qgd3JhcHBlcldpZHRoID0gY3NzYFxuXHQkeyBVbml0Q29udHJvbFdyYXBwZXIgfSB7XG5cdFx0LyogRm9yY2UgdGhlIFVuaXRDb250cm9sJ3Mgc2V0IHdpZHRoLiAqL1xuXHRcdGZsZXg6IDAgMCBhdXRvO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3Qgd3JhcHBlckhlaWdodCA9ICggc2l6ZT86ICdkZWZhdWx0JyB8ICdfX3Vuc3RhYmxlLWxhcmdlJyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRoZWlnaHQ6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICc0MHB4JyA6ICczMHB4JyB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2xEcm9wZG93biA9IGNzc2Bcblx0YmFja2dyb3VuZDogI2ZmZjtcblxuXHQmJiA+IGJ1dHRvbiB7XG5cdFx0YXNwZWN0LXJhdGlvOiAxO1xuXHRcdHBhZGRpbmc6IDA7XG5cdFx0ZGlzcGxheTogZmxleDtcblx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRcdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRcdCR7IHJ0bChcblx0XHRcdHsgYm9yZGVyUmFkaXVzOiBgMnB4IDAgMCAycHhgIH0sXG5cdFx0XHR7IGJvcmRlclJhZGl1czogYDAgMnB4IDJweCAwYCB9XG5cdFx0KSgpIH1cblx0XHRib3JkZXI6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy51aS5ib3JkZXIgfTtcblxuXHRcdCY6Zm9jdXMsXG5cdFx0Jjpob3Zlcjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdCR7IGZvY3VzQm94U2hhZG93IH1cblx0XHRcdGJvcmRlci1jb2xvcjogJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHR6LWluZGV4OiAxO1xuXHRcdFx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGNvbG9ySW5kaWNhdG9yQm9yZGVyID0gKCBib3JkZXI/OiBCb3JkZXIgKSA9PiB7XG5cdGNvbnN0IHsgY29sb3IsIHN0eWxlIH0gPSBib3JkZXIgfHwge307XG5cblx0Y29uc3QgZmFsbGJhY2tDb2xvciA9XG5cdFx0ISEgc3R5bGUgJiYgc3R5bGUgIT09ICdub25lJyA/IENPTE9SUy5ncmF5WyAzMDAgXSA6IHVuZGVmaW5lZDtcblxuXHRyZXR1cm4gY3NzYFxuXHRcdGJvcmRlci1zdHlsZTogJHsgc3R5bGUgPT09ICdub25lJyA/ICdzb2xpZCcgOiBzdHlsZSB9O1xuXHRcdGJvcmRlci1jb2xvcjogJHsgY29sb3IgfHwgZmFsbGJhY2tDb2xvciB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGNvbG9ySW5kaWNhdG9yV3JhcHBlciA9IChcblx0Ym9yZGVyPzogQm9yZGVyLFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IHtcblx0Y29uc3QgeyBzdHlsZSB9ID0gYm9yZGVyIHx8IHt9O1xuXG5cdHJldHVybiBjc3NgXG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0XHRib3JkZXI6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHQkeyBzdHlsZSA/IGNvbG9ySW5kaWNhdG9yQm9yZGVyKCBib3JkZXIgKSA6IHVuZGVmaW5lZCB9XG5cdFx0d2lkdGg6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICcyNHB4JyA6ICcyMnB4JyB9O1xuXHRcdGhlaWdodDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzI0cHgnIDogJzIycHgnIH07XG5cdFx0cGFkZGluZzogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzJweCcgOiAnMXB4JyB9O1xuXG5cdFx0Lypcblx0XHQgKiBDb2xvckluZGljYXRvclxuXHRcdCAqXG5cdFx0ICogVGhlIHRyYW5zcGFyZW50IGNvbG9ycyB1c2VkIGhlcmUgZW5zdXJlIHZpc2liaWxpdHkgb2YgdGhlIGluZGljYXRvclxuXHRcdCAqIG92ZXIgdGhlIGFjdGl2ZSBzdGF0ZSBvZiB0aGUgYm9yZGVyIGNvbnRyb2wgZHJvcGRvd24ncyB0b2dnbGUgYnV0dG9uLlxuXHRcdCAqL1xuXHRcdCYgPiBzcGFuIHtcblx0XHRcdGhlaWdodDogJHsgc3BhY2UoIDQgKSB9O1xuXHRcdFx0d2lkdGg6ICR7IHNwYWNlKCA0ICkgfTtcblx0XHRcdGJhY2tncm91bmQ6IGxpbmVhci1ncmFkaWVudChcblx0XHRcdFx0LTQ1ZGVnLFxuXHRcdFx0XHR0cmFuc3BhcmVudCA0OCUsXG5cdFx0XHRcdHJnYiggMCAwIDAgLyAyMCUgKSA0OCUsXG5cdFx0XHRcdHJnYiggMCAwIDAgLyAyMCUgKSA1MiUsXG5cdFx0XHRcdHRyYW5zcGFyZW50IDUyJVxuXHRcdFx0KTtcblx0XHR9XG5cdGA7XG59O1xuXG4vLyBNdXN0IGVxdWFsICRjb2xvci1wYWxldHRlLWNpcmNsZS1zaXplIGZyb206XG4vLyBAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2NpcmN1bGFyLW9wdGlvbi1waWNrZXIvc3R5bGUuc2Nzc1xuY29uc3Qgc3dhdGNoU2l6ZSA9IDI4O1xuY29uc3Qgc3dhdGNoR2FwID0gMTI7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJDb250cm9sUG9wb3ZlckNvbnRyb2xzID0gY3NzYFxuXHR3aWR0aDogJHsgc3dhdGNoU2l6ZSAqIDYgKyBzd2F0Y2hHYXAgKiA1IH1weDtcblxuXHQ+IGRpdjpmaXJzdC1vZi10eXBlID4gJHsgU3R5bGVkTGFiZWwgfSB7XG5cdFx0bWFyZ2luLWJvdHRvbTogMDtcblx0fVxuXG5cdCYmICR7IFN0eWxlZExhYmVsIH0gKyBidXR0b246bm90KCAuaGFzLXRleHQgKSB7XG5cdFx0bWluLXdpZHRoOiAyNHB4O1xuXHRcdHBhZGRpbmc6IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJDb250cm9sUG9wb3ZlckNvbnRlbnQgPSBjc3NgYDtcbmV4cG9ydCBjb25zdCBib3JkZXJDb2xvckluZGljYXRvciA9IGNzc2BgO1xuXG5leHBvcnQgY29uc3QgcmVzZXRCdXR0b25XcmFwcGVyID0gY3NzYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kO1xuXHRtYXJnaW4tdG9wOiAxMnB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlclNsaWRlciA9ICgpID0+IGNzc2Bcblx0ZmxleDogMSAxIDYwJTtcblx0JHsgcnRsKCB7IG1hcmdpblJpZ2h0OiBzcGFjZSggMyApIH0gKSgpIH1cbmA7XG4iXX0= */");
  var borderControlPopoverContent = /* @__PURE__ */ css(false ? "" : ";label:borderControlPopoverContent;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrSjhDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIGJveFNpemluZ1Jlc2V0LCBydGwgfSBmcm9tICcuLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IFN0eWxlZExhYmVsIH0gZnJvbSAnLi4vYmFzZS1jb250cm9sL3N0eWxlcy9iYXNlLWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB7XG5cdFZhbHVlSW5wdXQgYXMgVW5pdENvbnRyb2xXcmFwcGVyLFxuXHRVbml0U2VsZWN0LFxufSBmcm9tICcuLi91bml0LWNvbnRyb2wvc3R5bGVzL3VuaXQtY29udHJvbC1zdHlsZXMnO1xuXG5pbXBvcnQgdHlwZSB7IEJvcmRlciB9IGZyb20gJy4vdHlwZXMnO1xuXG5jb25zdCBmb2N1c0JveFNoYWRvdyA9IGNzc2Bcblx0Ym94LXNoYWRvdzogaW5zZXQgJHsgQ09ORklHLmNvbnRyb2xCb3hTaGFkb3dGb2N1cyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2wgPSBjc3NgXG5cdGJvcmRlcjogMDtcblx0cGFkZGluZzogMDtcblx0bWFyZ2luOiAwO1xuXHQkeyBib3hTaXppbmdSZXNldCB9XG5gO1xuXG5leHBvcnQgY29uc3QgaW5uZXJXcmFwcGVyID0gKCkgPT4gY3NzYFxuXHQkeyBVbml0Q29udHJvbFdyYXBwZXIgfSB7XG5cdFx0ZmxleDogMSAxIDQwJTtcblx0fVxuXHQmJiAkeyBVbml0U2VsZWN0IH0ge1xuXHRcdC8qIFByZXZlbnQgdW5pdCBzZWxlY3QgZm9yY2luZyBtaW4gaGVpZ2h0IGxhcmdlciB0aGFuIGl0cyBVbml0Q29udHJvbCAqL1xuXHRcdG1pbi1oZWlnaHQ6IDA7XG5cdH1cbmA7XG5cbi8qXG4gKiBUaGlzIHN0eWxlIGlzIG9ubHkgYXBwbGllZCB0byB0aGUgVW5pdENvbnRyb2wgd3JhcHBlciB3aGVuIHRoZSBib3JkZXIgd2lkdGhcbiAqIGZpZWxkIHNob3VsZCBiZSBhIHNldCB3aWR0aC4gT21pdHRpbmcgdGhpcyBhbGxvd3MgdGhlIFVuaXRDb250cm9sICZcbiAqIFJhbmdlQ29udHJvbCB0byBzaGFyZSB0aGUgYXZhaWxhYmxlIHdpZHRoIGluIGEgNDAvNjAgc3BsaXQgcmVzcGVjdGl2ZWx5LlxuICovXG5leHBvcnQgY29uc3Qgd3JhcHBlcldpZHRoID0gY3NzYFxuXHQkeyBVbml0Q29udHJvbFdyYXBwZXIgfSB7XG5cdFx0LyogRm9yY2UgdGhlIFVuaXRDb250cm9sJ3Mgc2V0IHdpZHRoLiAqL1xuXHRcdGZsZXg6IDAgMCBhdXRvO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3Qgd3JhcHBlckhlaWdodCA9ICggc2l6ZT86ICdkZWZhdWx0JyB8ICdfX3Vuc3RhYmxlLWxhcmdlJyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRoZWlnaHQ6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICc0MHB4JyA6ICczMHB4JyB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2xEcm9wZG93biA9IGNzc2Bcblx0YmFja2dyb3VuZDogI2ZmZjtcblxuXHQmJiA+IGJ1dHRvbiB7XG5cdFx0YXNwZWN0LXJhdGlvOiAxO1xuXHRcdHBhZGRpbmc6IDA7XG5cdFx0ZGlzcGxheTogZmxleDtcblx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRcdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRcdCR7IHJ0bChcblx0XHRcdHsgYm9yZGVyUmFkaXVzOiBgMnB4IDAgMCAycHhgIH0sXG5cdFx0XHR7IGJvcmRlclJhZGl1czogYDAgMnB4IDJweCAwYCB9XG5cdFx0KSgpIH1cblx0XHRib3JkZXI6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy51aS5ib3JkZXIgfTtcblxuXHRcdCY6Zm9jdXMsXG5cdFx0Jjpob3Zlcjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdCR7IGZvY3VzQm94U2hhZG93IH1cblx0XHRcdGJvcmRlci1jb2xvcjogJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHR6LWluZGV4OiAxO1xuXHRcdFx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGNvbG9ySW5kaWNhdG9yQm9yZGVyID0gKCBib3JkZXI/OiBCb3JkZXIgKSA9PiB7XG5cdGNvbnN0IHsgY29sb3IsIHN0eWxlIH0gPSBib3JkZXIgfHwge307XG5cblx0Y29uc3QgZmFsbGJhY2tDb2xvciA9XG5cdFx0ISEgc3R5bGUgJiYgc3R5bGUgIT09ICdub25lJyA/IENPTE9SUy5ncmF5WyAzMDAgXSA6IHVuZGVmaW5lZDtcblxuXHRyZXR1cm4gY3NzYFxuXHRcdGJvcmRlci1zdHlsZTogJHsgc3R5bGUgPT09ICdub25lJyA/ICdzb2xpZCcgOiBzdHlsZSB9O1xuXHRcdGJvcmRlci1jb2xvcjogJHsgY29sb3IgfHwgZmFsbGJhY2tDb2xvciB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGNvbG9ySW5kaWNhdG9yV3JhcHBlciA9IChcblx0Ym9yZGVyPzogQm9yZGVyLFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IHtcblx0Y29uc3QgeyBzdHlsZSB9ID0gYm9yZGVyIHx8IHt9O1xuXG5cdHJldHVybiBjc3NgXG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0XHRib3JkZXI6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHQkeyBzdHlsZSA/IGNvbG9ySW5kaWNhdG9yQm9yZGVyKCBib3JkZXIgKSA6IHVuZGVmaW5lZCB9XG5cdFx0d2lkdGg6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICcyNHB4JyA6ICcyMnB4JyB9O1xuXHRcdGhlaWdodDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzI0cHgnIDogJzIycHgnIH07XG5cdFx0cGFkZGluZzogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzJweCcgOiAnMXB4JyB9O1xuXG5cdFx0Lypcblx0XHQgKiBDb2xvckluZGljYXRvclxuXHRcdCAqXG5cdFx0ICogVGhlIHRyYW5zcGFyZW50IGNvbG9ycyB1c2VkIGhlcmUgZW5zdXJlIHZpc2liaWxpdHkgb2YgdGhlIGluZGljYXRvclxuXHRcdCAqIG92ZXIgdGhlIGFjdGl2ZSBzdGF0ZSBvZiB0aGUgYm9yZGVyIGNvbnRyb2wgZHJvcGRvd24ncyB0b2dnbGUgYnV0dG9uLlxuXHRcdCAqL1xuXHRcdCYgPiBzcGFuIHtcblx0XHRcdGhlaWdodDogJHsgc3BhY2UoIDQgKSB9O1xuXHRcdFx0d2lkdGg6ICR7IHNwYWNlKCA0ICkgfTtcblx0XHRcdGJhY2tncm91bmQ6IGxpbmVhci1ncmFkaWVudChcblx0XHRcdFx0LTQ1ZGVnLFxuXHRcdFx0XHR0cmFuc3BhcmVudCA0OCUsXG5cdFx0XHRcdHJnYiggMCAwIDAgLyAyMCUgKSA0OCUsXG5cdFx0XHRcdHJnYiggMCAwIDAgLyAyMCUgKSA1MiUsXG5cdFx0XHRcdHRyYW5zcGFyZW50IDUyJVxuXHRcdFx0KTtcblx0XHR9XG5cdGA7XG59O1xuXG4vLyBNdXN0IGVxdWFsICRjb2xvci1wYWxldHRlLWNpcmNsZS1zaXplIGZyb206XG4vLyBAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2NpcmN1bGFyLW9wdGlvbi1waWNrZXIvc3R5bGUuc2Nzc1xuY29uc3Qgc3dhdGNoU2l6ZSA9IDI4O1xuY29uc3Qgc3dhdGNoR2FwID0gMTI7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJDb250cm9sUG9wb3ZlckNvbnRyb2xzID0gY3NzYFxuXHR3aWR0aDogJHsgc3dhdGNoU2l6ZSAqIDYgKyBzd2F0Y2hHYXAgKiA1IH1weDtcblxuXHQ+IGRpdjpmaXJzdC1vZi10eXBlID4gJHsgU3R5bGVkTGFiZWwgfSB7XG5cdFx0bWFyZ2luLWJvdHRvbTogMDtcblx0fVxuXG5cdCYmICR7IFN0eWxlZExhYmVsIH0gKyBidXR0b246bm90KCAuaGFzLXRleHQgKSB7XG5cdFx0bWluLXdpZHRoOiAyNHB4O1xuXHRcdHBhZGRpbmc6IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJDb250cm9sUG9wb3ZlckNvbnRlbnQgPSBjc3NgYDtcbmV4cG9ydCBjb25zdCBib3JkZXJDb2xvckluZGljYXRvciA9IGNzc2BgO1xuXG5leHBvcnQgY29uc3QgcmVzZXRCdXR0b25XcmFwcGVyID0gY3NzYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kO1xuXHRtYXJnaW4tdG9wOiAxMnB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlclNsaWRlciA9ICgpID0+IGNzc2Bcblx0ZmxleDogMSAxIDYwJTtcblx0JHsgcnRsKCB7IG1hcmdpblJpZ2h0OiBzcGFjZSggMyApIH0gKSgpIH1cbmA7XG4iXX0= */");
  var borderColorIndicator = /* @__PURE__ */ css(false ? "" : ";label:borderColorIndicator;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtSnVDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIGJveFNpemluZ1Jlc2V0LCBydGwgfSBmcm9tICcuLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IFN0eWxlZExhYmVsIH0gZnJvbSAnLi4vYmFzZS1jb250cm9sL3N0eWxlcy9iYXNlLWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB7XG5cdFZhbHVlSW5wdXQgYXMgVW5pdENvbnRyb2xXcmFwcGVyLFxuXHRVbml0U2VsZWN0LFxufSBmcm9tICcuLi91bml0LWNvbnRyb2wvc3R5bGVzL3VuaXQtY29udHJvbC1zdHlsZXMnO1xuXG5pbXBvcnQgdHlwZSB7IEJvcmRlciB9IGZyb20gJy4vdHlwZXMnO1xuXG5jb25zdCBmb2N1c0JveFNoYWRvdyA9IGNzc2Bcblx0Ym94LXNoYWRvdzogaW5zZXQgJHsgQ09ORklHLmNvbnRyb2xCb3hTaGFkb3dGb2N1cyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2wgPSBjc3NgXG5cdGJvcmRlcjogMDtcblx0cGFkZGluZzogMDtcblx0bWFyZ2luOiAwO1xuXHQkeyBib3hTaXppbmdSZXNldCB9XG5gO1xuXG5leHBvcnQgY29uc3QgaW5uZXJXcmFwcGVyID0gKCkgPT4gY3NzYFxuXHQkeyBVbml0Q29udHJvbFdyYXBwZXIgfSB7XG5cdFx0ZmxleDogMSAxIDQwJTtcblx0fVxuXHQmJiAkeyBVbml0U2VsZWN0IH0ge1xuXHRcdC8qIFByZXZlbnQgdW5pdCBzZWxlY3QgZm9yY2luZyBtaW4gaGVpZ2h0IGxhcmdlciB0aGFuIGl0cyBVbml0Q29udHJvbCAqL1xuXHRcdG1pbi1oZWlnaHQ6IDA7XG5cdH1cbmA7XG5cbi8qXG4gKiBUaGlzIHN0eWxlIGlzIG9ubHkgYXBwbGllZCB0byB0aGUgVW5pdENvbnRyb2wgd3JhcHBlciB3aGVuIHRoZSBib3JkZXIgd2lkdGhcbiAqIGZpZWxkIHNob3VsZCBiZSBhIHNldCB3aWR0aC4gT21pdHRpbmcgdGhpcyBhbGxvd3MgdGhlIFVuaXRDb250cm9sICZcbiAqIFJhbmdlQ29udHJvbCB0byBzaGFyZSB0aGUgYXZhaWxhYmxlIHdpZHRoIGluIGEgNDAvNjAgc3BsaXQgcmVzcGVjdGl2ZWx5LlxuICovXG5leHBvcnQgY29uc3Qgd3JhcHBlcldpZHRoID0gY3NzYFxuXHQkeyBVbml0Q29udHJvbFdyYXBwZXIgfSB7XG5cdFx0LyogRm9yY2UgdGhlIFVuaXRDb250cm9sJ3Mgc2V0IHdpZHRoLiAqL1xuXHRcdGZsZXg6IDAgMCBhdXRvO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3Qgd3JhcHBlckhlaWdodCA9ICggc2l6ZT86ICdkZWZhdWx0JyB8ICdfX3Vuc3RhYmxlLWxhcmdlJyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRoZWlnaHQ6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICc0MHB4JyA6ICczMHB4JyB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2xEcm9wZG93biA9IGNzc2Bcblx0YmFja2dyb3VuZDogI2ZmZjtcblxuXHQmJiA+IGJ1dHRvbiB7XG5cdFx0YXNwZWN0LXJhdGlvOiAxO1xuXHRcdHBhZGRpbmc6IDA7XG5cdFx0ZGlzcGxheTogZmxleDtcblx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRcdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRcdCR7IHJ0bChcblx0XHRcdHsgYm9yZGVyUmFkaXVzOiBgMnB4IDAgMCAycHhgIH0sXG5cdFx0XHR7IGJvcmRlclJhZGl1czogYDAgMnB4IDJweCAwYCB9XG5cdFx0KSgpIH1cblx0XHRib3JkZXI6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy51aS5ib3JkZXIgfTtcblxuXHRcdCY6Zm9jdXMsXG5cdFx0Jjpob3Zlcjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdCR7IGZvY3VzQm94U2hhZG93IH1cblx0XHRcdGJvcmRlci1jb2xvcjogJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHR6LWluZGV4OiAxO1xuXHRcdFx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGNvbG9ySW5kaWNhdG9yQm9yZGVyID0gKCBib3JkZXI/OiBCb3JkZXIgKSA9PiB7XG5cdGNvbnN0IHsgY29sb3IsIHN0eWxlIH0gPSBib3JkZXIgfHwge307XG5cblx0Y29uc3QgZmFsbGJhY2tDb2xvciA9XG5cdFx0ISEgc3R5bGUgJiYgc3R5bGUgIT09ICdub25lJyA/IENPTE9SUy5ncmF5WyAzMDAgXSA6IHVuZGVmaW5lZDtcblxuXHRyZXR1cm4gY3NzYFxuXHRcdGJvcmRlci1zdHlsZTogJHsgc3R5bGUgPT09ICdub25lJyA/ICdzb2xpZCcgOiBzdHlsZSB9O1xuXHRcdGJvcmRlci1jb2xvcjogJHsgY29sb3IgfHwgZmFsbGJhY2tDb2xvciB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGNvbG9ySW5kaWNhdG9yV3JhcHBlciA9IChcblx0Ym9yZGVyPzogQm9yZGVyLFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IHtcblx0Y29uc3QgeyBzdHlsZSB9ID0gYm9yZGVyIHx8IHt9O1xuXG5cdHJldHVybiBjc3NgXG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0XHRib3JkZXI6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHQkeyBzdHlsZSA/IGNvbG9ySW5kaWNhdG9yQm9yZGVyKCBib3JkZXIgKSA6IHVuZGVmaW5lZCB9XG5cdFx0d2lkdGg6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICcyNHB4JyA6ICcyMnB4JyB9O1xuXHRcdGhlaWdodDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzI0cHgnIDogJzIycHgnIH07XG5cdFx0cGFkZGluZzogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzJweCcgOiAnMXB4JyB9O1xuXG5cdFx0Lypcblx0XHQgKiBDb2xvckluZGljYXRvclxuXHRcdCAqXG5cdFx0ICogVGhlIHRyYW5zcGFyZW50IGNvbG9ycyB1c2VkIGhlcmUgZW5zdXJlIHZpc2liaWxpdHkgb2YgdGhlIGluZGljYXRvclxuXHRcdCAqIG92ZXIgdGhlIGFjdGl2ZSBzdGF0ZSBvZiB0aGUgYm9yZGVyIGNvbnRyb2wgZHJvcGRvd24ncyB0b2dnbGUgYnV0dG9uLlxuXHRcdCAqL1xuXHRcdCYgPiBzcGFuIHtcblx0XHRcdGhlaWdodDogJHsgc3BhY2UoIDQgKSB9O1xuXHRcdFx0d2lkdGg6ICR7IHNwYWNlKCA0ICkgfTtcblx0XHRcdGJhY2tncm91bmQ6IGxpbmVhci1ncmFkaWVudChcblx0XHRcdFx0LTQ1ZGVnLFxuXHRcdFx0XHR0cmFuc3BhcmVudCA0OCUsXG5cdFx0XHRcdHJnYiggMCAwIDAgLyAyMCUgKSA0OCUsXG5cdFx0XHRcdHJnYiggMCAwIDAgLyAyMCUgKSA1MiUsXG5cdFx0XHRcdHRyYW5zcGFyZW50IDUyJVxuXHRcdFx0KTtcblx0XHR9XG5cdGA7XG59O1xuXG4vLyBNdXN0IGVxdWFsICRjb2xvci1wYWxldHRlLWNpcmNsZS1zaXplIGZyb206XG4vLyBAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2NpcmN1bGFyLW9wdGlvbi1waWNrZXIvc3R5bGUuc2Nzc1xuY29uc3Qgc3dhdGNoU2l6ZSA9IDI4O1xuY29uc3Qgc3dhdGNoR2FwID0gMTI7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJDb250cm9sUG9wb3ZlckNvbnRyb2xzID0gY3NzYFxuXHR3aWR0aDogJHsgc3dhdGNoU2l6ZSAqIDYgKyBzd2F0Y2hHYXAgKiA1IH1weDtcblxuXHQ+IGRpdjpmaXJzdC1vZi10eXBlID4gJHsgU3R5bGVkTGFiZWwgfSB7XG5cdFx0bWFyZ2luLWJvdHRvbTogMDtcblx0fVxuXG5cdCYmICR7IFN0eWxlZExhYmVsIH0gKyBidXR0b246bm90KCAuaGFzLXRleHQgKSB7XG5cdFx0bWluLXdpZHRoOiAyNHB4O1xuXHRcdHBhZGRpbmc6IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJDb250cm9sUG9wb3ZlckNvbnRlbnQgPSBjc3NgYDtcbmV4cG9ydCBjb25zdCBib3JkZXJDb2xvckluZGljYXRvciA9IGNzc2BgO1xuXG5leHBvcnQgY29uc3QgcmVzZXRCdXR0b25XcmFwcGVyID0gY3NzYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kO1xuXHRtYXJnaW4tdG9wOiAxMnB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlclNsaWRlciA9ICgpID0+IGNzc2Bcblx0ZmxleDogMSAxIDYwJTtcblx0JHsgcnRsKCB7IG1hcmdpblJpZ2h0OiBzcGFjZSggMyApIH0gKSgpIH1cbmA7XG4iXX0= */");
  var resetButtonWrapper = false ? {
    name: "1ghe26v",
    styles: "display:flex;justify-content:flex-end;margin-top:12px"
  } : {
    name: "1a93xby-resetButtonWrapper",
    styles: "display:flex;justify-content:flex-end;margin-top:12px;label:resetButtonWrapper;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxSnFDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIGJveFNpemluZ1Jlc2V0LCBydGwgfSBmcm9tICcuLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IFN0eWxlZExhYmVsIH0gZnJvbSAnLi4vYmFzZS1jb250cm9sL3N0eWxlcy9iYXNlLWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB7XG5cdFZhbHVlSW5wdXQgYXMgVW5pdENvbnRyb2xXcmFwcGVyLFxuXHRVbml0U2VsZWN0LFxufSBmcm9tICcuLi91bml0LWNvbnRyb2wvc3R5bGVzL3VuaXQtY29udHJvbC1zdHlsZXMnO1xuXG5pbXBvcnQgdHlwZSB7IEJvcmRlciB9IGZyb20gJy4vdHlwZXMnO1xuXG5jb25zdCBmb2N1c0JveFNoYWRvdyA9IGNzc2Bcblx0Ym94LXNoYWRvdzogaW5zZXQgJHsgQ09ORklHLmNvbnRyb2xCb3hTaGFkb3dGb2N1cyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2wgPSBjc3NgXG5cdGJvcmRlcjogMDtcblx0cGFkZGluZzogMDtcblx0bWFyZ2luOiAwO1xuXHQkeyBib3hTaXppbmdSZXNldCB9XG5gO1xuXG5leHBvcnQgY29uc3QgaW5uZXJXcmFwcGVyID0gKCkgPT4gY3NzYFxuXHQkeyBVbml0Q29udHJvbFdyYXBwZXIgfSB7XG5cdFx0ZmxleDogMSAxIDQwJTtcblx0fVxuXHQmJiAkeyBVbml0U2VsZWN0IH0ge1xuXHRcdC8qIFByZXZlbnQgdW5pdCBzZWxlY3QgZm9yY2luZyBtaW4gaGVpZ2h0IGxhcmdlciB0aGFuIGl0cyBVbml0Q29udHJvbCAqL1xuXHRcdG1pbi1oZWlnaHQ6IDA7XG5cdH1cbmA7XG5cbi8qXG4gKiBUaGlzIHN0eWxlIGlzIG9ubHkgYXBwbGllZCB0byB0aGUgVW5pdENvbnRyb2wgd3JhcHBlciB3aGVuIHRoZSBib3JkZXIgd2lkdGhcbiAqIGZpZWxkIHNob3VsZCBiZSBhIHNldCB3aWR0aC4gT21pdHRpbmcgdGhpcyBhbGxvd3MgdGhlIFVuaXRDb250cm9sICZcbiAqIFJhbmdlQ29udHJvbCB0byBzaGFyZSB0aGUgYXZhaWxhYmxlIHdpZHRoIGluIGEgNDAvNjAgc3BsaXQgcmVzcGVjdGl2ZWx5LlxuICovXG5leHBvcnQgY29uc3Qgd3JhcHBlcldpZHRoID0gY3NzYFxuXHQkeyBVbml0Q29udHJvbFdyYXBwZXIgfSB7XG5cdFx0LyogRm9yY2UgdGhlIFVuaXRDb250cm9sJ3Mgc2V0IHdpZHRoLiAqL1xuXHRcdGZsZXg6IDAgMCBhdXRvO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3Qgd3JhcHBlckhlaWdodCA9ICggc2l6ZT86ICdkZWZhdWx0JyB8ICdfX3Vuc3RhYmxlLWxhcmdlJyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRoZWlnaHQ6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICc0MHB4JyA6ICczMHB4JyB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2xEcm9wZG93biA9IGNzc2Bcblx0YmFja2dyb3VuZDogI2ZmZjtcblxuXHQmJiA+IGJ1dHRvbiB7XG5cdFx0YXNwZWN0LXJhdGlvOiAxO1xuXHRcdHBhZGRpbmc6IDA7XG5cdFx0ZGlzcGxheTogZmxleDtcblx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRcdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRcdCR7IHJ0bChcblx0XHRcdHsgYm9yZGVyUmFkaXVzOiBgMnB4IDAgMCAycHhgIH0sXG5cdFx0XHR7IGJvcmRlclJhZGl1czogYDAgMnB4IDJweCAwYCB9XG5cdFx0KSgpIH1cblx0XHRib3JkZXI6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy51aS5ib3JkZXIgfTtcblxuXHRcdCY6Zm9jdXMsXG5cdFx0Jjpob3Zlcjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdCR7IGZvY3VzQm94U2hhZG93IH1cblx0XHRcdGJvcmRlci1jb2xvcjogJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHR6LWluZGV4OiAxO1xuXHRcdFx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGNvbG9ySW5kaWNhdG9yQm9yZGVyID0gKCBib3JkZXI/OiBCb3JkZXIgKSA9PiB7XG5cdGNvbnN0IHsgY29sb3IsIHN0eWxlIH0gPSBib3JkZXIgfHwge307XG5cblx0Y29uc3QgZmFsbGJhY2tDb2xvciA9XG5cdFx0ISEgc3R5bGUgJiYgc3R5bGUgIT09ICdub25lJyA/IENPTE9SUy5ncmF5WyAzMDAgXSA6IHVuZGVmaW5lZDtcblxuXHRyZXR1cm4gY3NzYFxuXHRcdGJvcmRlci1zdHlsZTogJHsgc3R5bGUgPT09ICdub25lJyA/ICdzb2xpZCcgOiBzdHlsZSB9O1xuXHRcdGJvcmRlci1jb2xvcjogJHsgY29sb3IgfHwgZmFsbGJhY2tDb2xvciB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGNvbG9ySW5kaWNhdG9yV3JhcHBlciA9IChcblx0Ym9yZGVyPzogQm9yZGVyLFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IHtcblx0Y29uc3QgeyBzdHlsZSB9ID0gYm9yZGVyIHx8IHt9O1xuXG5cdHJldHVybiBjc3NgXG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0XHRib3JkZXI6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHQkeyBzdHlsZSA/IGNvbG9ySW5kaWNhdG9yQm9yZGVyKCBib3JkZXIgKSA6IHVuZGVmaW5lZCB9XG5cdFx0d2lkdGg6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICcyNHB4JyA6ICcyMnB4JyB9O1xuXHRcdGhlaWdodDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzI0cHgnIDogJzIycHgnIH07XG5cdFx0cGFkZGluZzogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzJweCcgOiAnMXB4JyB9O1xuXG5cdFx0Lypcblx0XHQgKiBDb2xvckluZGljYXRvclxuXHRcdCAqXG5cdFx0ICogVGhlIHRyYW5zcGFyZW50IGNvbG9ycyB1c2VkIGhlcmUgZW5zdXJlIHZpc2liaWxpdHkgb2YgdGhlIGluZGljYXRvclxuXHRcdCAqIG92ZXIgdGhlIGFjdGl2ZSBzdGF0ZSBvZiB0aGUgYm9yZGVyIGNvbnRyb2wgZHJvcGRvd24ncyB0b2dnbGUgYnV0dG9uLlxuXHRcdCAqL1xuXHRcdCYgPiBzcGFuIHtcblx0XHRcdGhlaWdodDogJHsgc3BhY2UoIDQgKSB9O1xuXHRcdFx0d2lkdGg6ICR7IHNwYWNlKCA0ICkgfTtcblx0XHRcdGJhY2tncm91bmQ6IGxpbmVhci1ncmFkaWVudChcblx0XHRcdFx0LTQ1ZGVnLFxuXHRcdFx0XHR0cmFuc3BhcmVudCA0OCUsXG5cdFx0XHRcdHJnYiggMCAwIDAgLyAyMCUgKSA0OCUsXG5cdFx0XHRcdHJnYiggMCAwIDAgLyAyMCUgKSA1MiUsXG5cdFx0XHRcdHRyYW5zcGFyZW50IDUyJVxuXHRcdFx0KTtcblx0XHR9XG5cdGA7XG59O1xuXG4vLyBNdXN0IGVxdWFsICRjb2xvci1wYWxldHRlLWNpcmNsZS1zaXplIGZyb206XG4vLyBAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2NpcmN1bGFyLW9wdGlvbi1waWNrZXIvc3R5bGUuc2Nzc1xuY29uc3Qgc3dhdGNoU2l6ZSA9IDI4O1xuY29uc3Qgc3dhdGNoR2FwID0gMTI7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJDb250cm9sUG9wb3ZlckNvbnRyb2xzID0gY3NzYFxuXHR3aWR0aDogJHsgc3dhdGNoU2l6ZSAqIDYgKyBzd2F0Y2hHYXAgKiA1IH1weDtcblxuXHQ+IGRpdjpmaXJzdC1vZi10eXBlID4gJHsgU3R5bGVkTGFiZWwgfSB7XG5cdFx0bWFyZ2luLWJvdHRvbTogMDtcblx0fVxuXG5cdCYmICR7IFN0eWxlZExhYmVsIH0gKyBidXR0b246bm90KCAuaGFzLXRleHQgKSB7XG5cdFx0bWluLXdpZHRoOiAyNHB4O1xuXHRcdHBhZGRpbmc6IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJDb250cm9sUG9wb3ZlckNvbnRlbnQgPSBjc3NgYDtcbmV4cG9ydCBjb25zdCBib3JkZXJDb2xvckluZGljYXRvciA9IGNzc2BgO1xuXG5leHBvcnQgY29uc3QgcmVzZXRCdXR0b25XcmFwcGVyID0gY3NzYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kO1xuXHRtYXJnaW4tdG9wOiAxMnB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlclNsaWRlciA9ICgpID0+IGNzc2Bcblx0ZmxleDogMSAxIDYwJTtcblx0JHsgcnRsKCB7IG1hcmdpblJpZ2h0OiBzcGFjZSggMyApIH0gKSgpIH1cbmA7XG4iXX0= */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__14
  };
  var borderSlider = () => /* @__PURE__ */ css("flex:1 1 60%;", rtl({
    marginRight: space(3)
  })(), ";" + (false ? "" : ";label:borderSlider;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEySnFDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIGJveFNpemluZ1Jlc2V0LCBydGwgfSBmcm9tICcuLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IFN0eWxlZExhYmVsIH0gZnJvbSAnLi4vYmFzZS1jb250cm9sL3N0eWxlcy9iYXNlLWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB7XG5cdFZhbHVlSW5wdXQgYXMgVW5pdENvbnRyb2xXcmFwcGVyLFxuXHRVbml0U2VsZWN0LFxufSBmcm9tICcuLi91bml0LWNvbnRyb2wvc3R5bGVzL3VuaXQtY29udHJvbC1zdHlsZXMnO1xuXG5pbXBvcnQgdHlwZSB7IEJvcmRlciB9IGZyb20gJy4vdHlwZXMnO1xuXG5jb25zdCBmb2N1c0JveFNoYWRvdyA9IGNzc2Bcblx0Ym94LXNoYWRvdzogaW5zZXQgJHsgQ09ORklHLmNvbnRyb2xCb3hTaGFkb3dGb2N1cyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2wgPSBjc3NgXG5cdGJvcmRlcjogMDtcblx0cGFkZGluZzogMDtcblx0bWFyZ2luOiAwO1xuXHQkeyBib3hTaXppbmdSZXNldCB9XG5gO1xuXG5leHBvcnQgY29uc3QgaW5uZXJXcmFwcGVyID0gKCkgPT4gY3NzYFxuXHQkeyBVbml0Q29udHJvbFdyYXBwZXIgfSB7XG5cdFx0ZmxleDogMSAxIDQwJTtcblx0fVxuXHQmJiAkeyBVbml0U2VsZWN0IH0ge1xuXHRcdC8qIFByZXZlbnQgdW5pdCBzZWxlY3QgZm9yY2luZyBtaW4gaGVpZ2h0IGxhcmdlciB0aGFuIGl0cyBVbml0Q29udHJvbCAqL1xuXHRcdG1pbi1oZWlnaHQ6IDA7XG5cdH1cbmA7XG5cbi8qXG4gKiBUaGlzIHN0eWxlIGlzIG9ubHkgYXBwbGllZCB0byB0aGUgVW5pdENvbnRyb2wgd3JhcHBlciB3aGVuIHRoZSBib3JkZXIgd2lkdGhcbiAqIGZpZWxkIHNob3VsZCBiZSBhIHNldCB3aWR0aC4gT21pdHRpbmcgdGhpcyBhbGxvd3MgdGhlIFVuaXRDb250cm9sICZcbiAqIFJhbmdlQ29udHJvbCB0byBzaGFyZSB0aGUgYXZhaWxhYmxlIHdpZHRoIGluIGEgNDAvNjAgc3BsaXQgcmVzcGVjdGl2ZWx5LlxuICovXG5leHBvcnQgY29uc3Qgd3JhcHBlcldpZHRoID0gY3NzYFxuXHQkeyBVbml0Q29udHJvbFdyYXBwZXIgfSB7XG5cdFx0LyogRm9yY2UgdGhlIFVuaXRDb250cm9sJ3Mgc2V0IHdpZHRoLiAqL1xuXHRcdGZsZXg6IDAgMCBhdXRvO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3Qgd3JhcHBlckhlaWdodCA9ICggc2l6ZT86ICdkZWZhdWx0JyB8ICdfX3Vuc3RhYmxlLWxhcmdlJyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRoZWlnaHQ6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICc0MHB4JyA6ICczMHB4JyB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbnRyb2xEcm9wZG93biA9IGNzc2Bcblx0YmFja2dyb3VuZDogI2ZmZjtcblxuXHQmJiA+IGJ1dHRvbiB7XG5cdFx0YXNwZWN0LXJhdGlvOiAxO1xuXHRcdHBhZGRpbmc6IDA7XG5cdFx0ZGlzcGxheTogZmxleDtcblx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRcdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRcdCR7IHJ0bChcblx0XHRcdHsgYm9yZGVyUmFkaXVzOiBgMnB4IDAgMCAycHhgIH0sXG5cdFx0XHR7IGJvcmRlclJhZGl1czogYDAgMnB4IDJweCAwYCB9XG5cdFx0KSgpIH1cblx0XHRib3JkZXI6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy51aS5ib3JkZXIgfTtcblxuXHRcdCY6Zm9jdXMsXG5cdFx0Jjpob3Zlcjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdCR7IGZvY3VzQm94U2hhZG93IH1cblx0XHRcdGJvcmRlci1jb2xvcjogJHsgQ09MT1JTLnVpLmJvcmRlckZvY3VzIH07XG5cdFx0XHR6LWluZGV4OiAxO1xuXHRcdFx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGNvbG9ySW5kaWNhdG9yQm9yZGVyID0gKCBib3JkZXI/OiBCb3JkZXIgKSA9PiB7XG5cdGNvbnN0IHsgY29sb3IsIHN0eWxlIH0gPSBib3JkZXIgfHwge307XG5cblx0Y29uc3QgZmFsbGJhY2tDb2xvciA9XG5cdFx0ISEgc3R5bGUgJiYgc3R5bGUgIT09ICdub25lJyA/IENPTE9SUy5ncmF5WyAzMDAgXSA6IHVuZGVmaW5lZDtcblxuXHRyZXR1cm4gY3NzYFxuXHRcdGJvcmRlci1zdHlsZTogJHsgc3R5bGUgPT09ICdub25lJyA/ICdzb2xpZCcgOiBzdHlsZSB9O1xuXHRcdGJvcmRlci1jb2xvcjogJHsgY29sb3IgfHwgZmFsbGJhY2tDb2xvciB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGNvbG9ySW5kaWNhdG9yV3JhcHBlciA9IChcblx0Ym9yZGVyPzogQm9yZGVyLFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IHtcblx0Y29uc3QgeyBzdHlsZSB9ID0gYm9yZGVyIHx8IHt9O1xuXG5cdHJldHVybiBjc3NgXG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0XHRib3JkZXI6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHQkeyBzdHlsZSA/IGNvbG9ySW5kaWNhdG9yQm9yZGVyKCBib3JkZXIgKSA6IHVuZGVmaW5lZCB9XG5cdFx0d2lkdGg6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/ICcyNHB4JyA6ICcyMnB4JyB9O1xuXHRcdGhlaWdodDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzI0cHgnIDogJzIycHgnIH07XG5cdFx0cGFkZGluZzogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gJzJweCcgOiAnMXB4JyB9O1xuXG5cdFx0Lypcblx0XHQgKiBDb2xvckluZGljYXRvclxuXHRcdCAqXG5cdFx0ICogVGhlIHRyYW5zcGFyZW50IGNvbG9ycyB1c2VkIGhlcmUgZW5zdXJlIHZpc2liaWxpdHkgb2YgdGhlIGluZGljYXRvclxuXHRcdCAqIG92ZXIgdGhlIGFjdGl2ZSBzdGF0ZSBvZiB0aGUgYm9yZGVyIGNvbnRyb2wgZHJvcGRvd24ncyB0b2dnbGUgYnV0dG9uLlxuXHRcdCAqL1xuXHRcdCYgPiBzcGFuIHtcblx0XHRcdGhlaWdodDogJHsgc3BhY2UoIDQgKSB9O1xuXHRcdFx0d2lkdGg6ICR7IHNwYWNlKCA0ICkgfTtcblx0XHRcdGJhY2tncm91bmQ6IGxpbmVhci1ncmFkaWVudChcblx0XHRcdFx0LTQ1ZGVnLFxuXHRcdFx0XHR0cmFuc3BhcmVudCA0OCUsXG5cdFx0XHRcdHJnYiggMCAwIDAgLyAyMCUgKSA0OCUsXG5cdFx0XHRcdHJnYiggMCAwIDAgLyAyMCUgKSA1MiUsXG5cdFx0XHRcdHRyYW5zcGFyZW50IDUyJVxuXHRcdFx0KTtcblx0XHR9XG5cdGA7XG59O1xuXG4vLyBNdXN0IGVxdWFsICRjb2xvci1wYWxldHRlLWNpcmNsZS1zaXplIGZyb206XG4vLyBAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2NpcmN1bGFyLW9wdGlvbi1waWNrZXIvc3R5bGUuc2Nzc1xuY29uc3Qgc3dhdGNoU2l6ZSA9IDI4O1xuY29uc3Qgc3dhdGNoR2FwID0gMTI7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJDb250cm9sUG9wb3ZlckNvbnRyb2xzID0gY3NzYFxuXHR3aWR0aDogJHsgc3dhdGNoU2l6ZSAqIDYgKyBzd2F0Y2hHYXAgKiA1IH1weDtcblxuXHQ+IGRpdjpmaXJzdC1vZi10eXBlID4gJHsgU3R5bGVkTGFiZWwgfSB7XG5cdFx0bWFyZ2luLWJvdHRvbTogMDtcblx0fVxuXG5cdCYmICR7IFN0eWxlZExhYmVsIH0gKyBidXR0b246bm90KCAuaGFzLXRleHQgKSB7XG5cdFx0bWluLXdpZHRoOiAyNHB4O1xuXHRcdHBhZGRpbmc6IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJDb250cm9sUG9wb3ZlckNvbnRlbnQgPSBjc3NgYDtcbmV4cG9ydCBjb25zdCBib3JkZXJDb2xvckluZGljYXRvciA9IGNzc2BgO1xuXG5leHBvcnQgY29uc3QgcmVzZXRCdXR0b25XcmFwcGVyID0gY3NzYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kO1xuXHRtYXJnaW4tdG9wOiAxMnB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlclNsaWRlciA9ICgpID0+IGNzc2Bcblx0ZmxleDogMSAxIDYwJTtcblx0JHsgcnRsKCB7IG1hcmdpblJpZ2h0OiBzcGFjZSggMyApIH0gKSgpIH1cbmA7XG4iXX0= */");

  // packages/components/build-module/unit-control/utils.mjs
  var import_i18n21 = __toESM(require_i18n(), 1);
  var import_element82 = __toESM(require_element(), 1);
  var isWeb = import_element82.Platform.OS === "web";
  var allUnits = {
    px: {
      value: "px",
      label: isWeb ? "px" : (0, import_i18n21.__)("Pixels (px)"),
      a11yLabel: (0, import_i18n21.__)("Pixels (px)"),
      step: 1
    },
    "%": {
      value: "%",
      label: isWeb ? "%" : (0, import_i18n21.__)("Percentage (%)"),
      a11yLabel: (0, import_i18n21.__)("Percent (%)"),
      step: 0.1
    },
    em: {
      value: "em",
      label: isWeb ? "em" : (0, import_i18n21.__)("Relative to parent font size (em)"),
      a11yLabel: (0, import_i18n21._x)("ems", "Relative to parent font size (em)"),
      step: 0.01
    },
    rem: {
      value: "rem",
      label: isWeb ? "rem" : (0, import_i18n21.__)("Relative to root font size (rem)"),
      a11yLabel: (0, import_i18n21._x)("rems", "Relative to root font size (rem)"),
      step: 0.01
    },
    vw: {
      value: "vw",
      label: isWeb ? "vw" : (0, import_i18n21.__)("Viewport width (vw)"),
      a11yLabel: (0, import_i18n21.__)("Viewport width (vw)"),
      step: 0.1
    },
    vh: {
      value: "vh",
      label: isWeb ? "vh" : (0, import_i18n21.__)("Viewport height (vh)"),
      a11yLabel: (0, import_i18n21.__)("Viewport height (vh)"),
      step: 0.1
    },
    vmin: {
      value: "vmin",
      label: isWeb ? "vmin" : (0, import_i18n21.__)("Viewport smallest dimension (vmin)"),
      a11yLabel: (0, import_i18n21.__)("Viewport smallest dimension (vmin)"),
      step: 0.1
    },
    vmax: {
      value: "vmax",
      label: isWeb ? "vmax" : (0, import_i18n21.__)("Viewport largest dimension (vmax)"),
      a11yLabel: (0, import_i18n21.__)("Viewport largest dimension (vmax)"),
      step: 0.1
    },
    ch: {
      value: "ch",
      label: isWeb ? "ch" : (0, import_i18n21.__)("Width of the zero (0) character (ch)"),
      a11yLabel: (0, import_i18n21.__)("Width of the zero (0) character (ch)"),
      step: 0.01
    },
    ex: {
      value: "ex",
      label: isWeb ? "ex" : (0, import_i18n21.__)("x-height of the font (ex)"),
      a11yLabel: (0, import_i18n21.__)("x-height of the font (ex)"),
      step: 0.01
    },
    cm: {
      value: "cm",
      label: isWeb ? "cm" : (0, import_i18n21.__)("Centimeters (cm)"),
      a11yLabel: (0, import_i18n21.__)("Centimeters (cm)"),
      step: 1e-3
    },
    mm: {
      value: "mm",
      label: isWeb ? "mm" : (0, import_i18n21.__)("Millimeters (mm)"),
      a11yLabel: (0, import_i18n21.__)("Millimeters (mm)"),
      step: 0.1
    },
    in: {
      value: "in",
      label: isWeb ? "in" : (0, import_i18n21.__)("Inches (in)"),
      a11yLabel: (0, import_i18n21.__)("Inches (in)"),
      step: 1e-3
    },
    pc: {
      value: "pc",
      label: isWeb ? "pc" : (0, import_i18n21.__)("Picas (pc)"),
      a11yLabel: (0, import_i18n21.__)("Picas (pc)"),
      step: 1
    },
    pt: {
      value: "pt",
      label: isWeb ? "pt" : (0, import_i18n21.__)("Points (pt)"),
      a11yLabel: (0, import_i18n21.__)("Points (pt)"),
      step: 1
    },
    svw: {
      value: "svw",
      label: isWeb ? "svw" : (0, import_i18n21.__)("Small viewport width (svw)"),
      a11yLabel: (0, import_i18n21.__)("Small viewport width (svw)"),
      step: 0.1
    },
    svh: {
      value: "svh",
      label: isWeb ? "svh" : (0, import_i18n21.__)("Small viewport height (svh)"),
      a11yLabel: (0, import_i18n21.__)("Small viewport height (svh)"),
      step: 0.1
    },
    svi: {
      value: "svi",
      label: isWeb ? "svi" : (0, import_i18n21.__)("Viewport smallest size in the inline direction (svi)"),
      a11yLabel: (0, import_i18n21.__)("Small viewport width or height (svi)"),
      step: 0.1
    },
    svb: {
      value: "svb",
      label: isWeb ? "svb" : (0, import_i18n21.__)("Viewport smallest size in the block direction (svb)"),
      a11yLabel: (0, import_i18n21.__)("Small viewport width or height (svb)"),
      step: 0.1
    },
    svmin: {
      value: "svmin",
      label: isWeb ? "svmin" : (0, import_i18n21.__)("Small viewport smallest dimension (svmin)"),
      a11yLabel: (0, import_i18n21.__)("Small viewport smallest dimension (svmin)"),
      step: 0.1
    },
    lvw: {
      value: "lvw",
      label: isWeb ? "lvw" : (0, import_i18n21.__)("Large viewport width (lvw)"),
      a11yLabel: (0, import_i18n21.__)("Large viewport width (lvw)"),
      step: 0.1
    },
    lvh: {
      value: "lvh",
      label: isWeb ? "lvh" : (0, import_i18n21.__)("Large viewport height (lvh)"),
      a11yLabel: (0, import_i18n21.__)("Large viewport height (lvh)"),
      step: 0.1
    },
    lvi: {
      value: "lvi",
      label: isWeb ? "lvi" : (0, import_i18n21.__)("Large viewport width or height (lvi)"),
      a11yLabel: (0, import_i18n21.__)("Large viewport width or height (lvi)"),
      step: 0.1
    },
    lvb: {
      value: "lvb",
      label: isWeb ? "lvb" : (0, import_i18n21.__)("Large viewport width or height (lvb)"),
      a11yLabel: (0, import_i18n21.__)("Large viewport width or height (lvb)"),
      step: 0.1
    },
    lvmin: {
      value: "lvmin",
      label: isWeb ? "lvmin" : (0, import_i18n21.__)("Large viewport smallest dimension (lvmin)"),
      a11yLabel: (0, import_i18n21.__)("Large viewport smallest dimension (lvmin)"),
      step: 0.1
    },
    dvw: {
      value: "dvw",
      label: isWeb ? "dvw" : (0, import_i18n21.__)("Dynamic viewport width (dvw)"),
      a11yLabel: (0, import_i18n21.__)("Dynamic viewport width (dvw)"),
      step: 0.1
    },
    dvh: {
      value: "dvh",
      label: isWeb ? "dvh" : (0, import_i18n21.__)("Dynamic viewport height (dvh)"),
      a11yLabel: (0, import_i18n21.__)("Dynamic viewport height (dvh)"),
      step: 0.1
    },
    dvi: {
      value: "dvi",
      label: isWeb ? "dvi" : (0, import_i18n21.__)("Dynamic viewport width or height (dvi)"),
      a11yLabel: (0, import_i18n21.__)("Dynamic viewport width or height (dvi)"),
      step: 0.1
    },
    dvb: {
      value: "dvb",
      label: isWeb ? "dvb" : (0, import_i18n21.__)("Dynamic viewport width or height (dvb)"),
      a11yLabel: (0, import_i18n21.__)("Dynamic viewport width or height (dvb)"),
      step: 0.1
    },
    dvmin: {
      value: "dvmin",
      label: isWeb ? "dvmin" : (0, import_i18n21.__)("Dynamic viewport smallest dimension (dvmin)"),
      a11yLabel: (0, import_i18n21.__)("Dynamic viewport smallest dimension (dvmin)"),
      step: 0.1
    },
    dvmax: {
      value: "dvmax",
      label: isWeb ? "dvmax" : (0, import_i18n21.__)("Dynamic viewport largest dimension (dvmax)"),
      a11yLabel: (0, import_i18n21.__)("Dynamic viewport largest dimension (dvmax)"),
      step: 0.1
    },
    svmax: {
      value: "svmax",
      label: isWeb ? "svmax" : (0, import_i18n21.__)("Small viewport largest dimension (svmax)"),
      a11yLabel: (0, import_i18n21.__)("Small viewport largest dimension (svmax)"),
      step: 0.1
    },
    lvmax: {
      value: "lvmax",
      label: isWeb ? "lvmax" : (0, import_i18n21.__)("Large viewport largest dimension (lvmax)"),
      a11yLabel: (0, import_i18n21.__)("Large viewport largest dimension (lvmax)"),
      step: 0.1
    }
  };
  var ALL_CSS_UNITS = Object.values(allUnits);
  var CSS_UNITS = [allUnits.px, allUnits["%"], allUnits.em, allUnits.rem, allUnits.vw, allUnits.vh];
  var DEFAULT_UNIT = allUnits.px;
  function getParsedQuantityAndUnit(rawValue, fallbackUnit, allowedUnits) {
    const initialValue2 = fallbackUnit ? `${rawValue ?? ""}${fallbackUnit}` : rawValue;
    return parseQuantityAndUnitFromRawValue(initialValue2, allowedUnits);
  }
  function hasUnits(units) {
    return Array.isArray(units) && !!units.length;
  }
  function parseQuantityAndUnitFromRawValue(rawValue, allowedUnits = ALL_CSS_UNITS) {
    let trimmedValue;
    let quantityToReturn;
    if (typeof rawValue !== "undefined" || rawValue === null) {
      trimmedValue = `${rawValue}`.trim();
      const parsedQuantity = parseFloat(trimmedValue);
      quantityToReturn = !isFinite(parsedQuantity) ? void 0 : parsedQuantity;
    }
    const unitMatch = trimmedValue?.match(/[\d.\-\+]*\s*(.*)/);
    const matchedUnit = unitMatch?.[1]?.toLowerCase();
    let unitToReturn;
    if (hasUnits(allowedUnits)) {
      const match4 = allowedUnits.find((item2) => item2.value === matchedUnit);
      unitToReturn = match4?.value;
    } else {
      unitToReturn = DEFAULT_UNIT.value;
    }
    return [quantityToReturn, unitToReturn];
  }
  function getValidParsedQuantityAndUnit(rawValue, allowedUnits, fallbackQuantity, fallbackUnit) {
    const [parsedQuantity, parsedUnit] = parseQuantityAndUnitFromRawValue(rawValue, allowedUnits);
    const quantityToReturn = parsedQuantity ?? fallbackQuantity;
    let unitToReturn = parsedUnit || fallbackUnit;
    if (!unitToReturn && hasUnits(allowedUnits)) {
      unitToReturn = allowedUnits[0].value;
    }
    return [quantityToReturn, unitToReturn];
  }
  function filterUnitsWithSettings(allowedUnitValues = [], availableUnits) {
    return Array.isArray(availableUnits) ? availableUnits.filter((unit) => allowedUnitValues.includes(unit.value)) : [];
  }
  var useCustomUnits = ({
    units = ALL_CSS_UNITS,
    availableUnits = [],
    defaultValues
  }) => {
    const customUnitsToReturn = filterUnitsWithSettings(availableUnits, units);
    if (!defaultValues) {
      return customUnitsToReturn;
    }
    return customUnitsToReturn.map((unit) => {
      const [defaultValue2] = defaultValues[unit.value] ? parseQuantityAndUnitFromRawValue(defaultValues[unit.value]) : [];
      return {
        ...unit,
        default: defaultValue2
      };
    });
  };
  function getUnitsWithCurrentUnit(rawValue, legacyUnit, units = ALL_CSS_UNITS) {
    const unitsToReturn = Array.isArray(units) ? [...units] : [];
    const [, currentUnit] = getParsedQuantityAndUnit(rawValue, legacyUnit, ALL_CSS_UNITS);
    if (currentUnit && !unitsToReturn.some((unit) => unit.value === currentUnit)) {
      if (allUnits[currentUnit]) {
        unitsToReturn.unshift(allUnits[currentUnit]);
      }
    }
    return unitsToReturn;
  }

  // packages/components/build-module/border-control/border-control-dropdown/hook.mjs
  function useBorderControlDropdown(props) {
    const {
      border,
      className: className2,
      colors = [],
      enableAlpha = false,
      enableStyle = true,
      onChange,
      previousStyleSelection,
      size: size3 = "default",
      __experimentalIsRenderedInSidebar = false,
      ...otherProps
    } = useContextSystem(props, "BorderControlDropdown");
    const [widthValue] = parseQuantityAndUnitFromRawValue(border?.width);
    const hasZeroWidth = widthValue === 0;
    const onColorChange = (color2) => {
      const style2 = border?.style === "none" ? previousStyleSelection : border?.style;
      const width = hasZeroWidth && !!color2 ? "1px" : border?.width;
      onChange({
        color: color2,
        style: style2,
        width
      });
    };
    const onStyleChange = (style2) => {
      const width = hasZeroWidth && !!style2 ? "1px" : border?.width;
      onChange({
        ...border,
        style: style2,
        width
      });
    };
    const onReset = () => {
      onChange({
        ...border,
        color: void 0,
        style: void 0
      });
    };
    const cx3 = useCx();
    const classes = (0, import_element83.useMemo)(() => {
      return cx3(borderControlDropdown, className2);
    }, [className2, cx3]);
    const indicatorClassName = (0, import_element83.useMemo)(() => {
      return cx3(borderColorIndicator);
    }, [cx3]);
    const indicatorWrapperClassName = (0, import_element83.useMemo)(() => {
      return cx3(colorIndicatorWrapper(border, size3));
    }, [border, cx3, size3]);
    const popoverControlsClassName = (0, import_element83.useMemo)(() => {
      return cx3(borderControlPopoverControls);
    }, [cx3]);
    const popoverContentClassName = (0, import_element83.useMemo)(() => {
      return cx3(borderControlPopoverContent);
    }, [cx3]);
    const resetButtonWrapperClassName = (0, import_element83.useMemo)(() => {
      return cx3(resetButtonWrapper);
    }, [cx3]);
    return {
      ...otherProps,
      border,
      className: classes,
      colors,
      enableAlpha,
      enableStyle,
      indicatorClassName,
      indicatorWrapperClassName,
      onColorChange,
      onStyleChange,
      onReset,
      popoverContentClassName,
      popoverControlsClassName,
      resetButtonWrapperClassName,
      size: size3,
      __experimentalIsRenderedInSidebar
    };
  }

  // packages/components/build-module/border-control/border-control-dropdown/component.mjs
  var import_jsx_runtime147 = __toESM(require_jsx_runtime(), 1);
  var getAriaLabelColorValue = (colorValue) => {
    return colorValue.replace(/^var\((.+)\)$/, "$1");
  };
  var getColorObject = (colorValue, colors) => {
    if (!colorValue || !colors) {
      return;
    }
    if (isMultiplePaletteArray(colors)) {
      let matchedColor;
      colors.some((origin) => origin.colors.some((color2) => {
        if (color2.color === colorValue) {
          matchedColor = color2;
          return true;
        }
        return false;
      }));
      return matchedColor;
    }
    return colors.find((color2) => color2.color === colorValue);
  };
  var getToggleAriaLabel = (colorValue, colorObject, style2, isStyleEnabled) => {
    if (isStyleEnabled) {
      if (colorObject) {
        const ariaLabelValue = getAriaLabelColorValue(colorObject.color);
        return style2 ? (0, import_i18n22.sprintf)(
          // translators: 1: The name of the color e.g. "vivid red". 2: The color's hex code e.g.: "#f00:". 3: The current border style selection e.g. "solid".
          (0, import_i18n22.__)('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s". The currently selected style is "%3$s".'),
          colorObject.name,
          ariaLabelValue,
          style2
        ) : (0, import_i18n22.sprintf)(
          // translators: 1: The name of the color e.g. "vivid red". 2: The color's hex code e.g.: "#f00:".
          (0, import_i18n22.__)('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s".'),
          colorObject.name,
          ariaLabelValue
        );
      }
      if (colorValue) {
        const ariaLabelValue = getAriaLabelColorValue(colorValue);
        return style2 ? (0, import_i18n22.sprintf)(
          // translators: 1: The color's hex code e.g.: "#f00:". 2: The current border style selection e.g. "solid".
          (0, import_i18n22.__)('Border color and style picker. The currently selected color has a value of "%1$s". The currently selected style is "%2$s".'),
          ariaLabelValue,
          style2
        ) : (0, import_i18n22.sprintf)(
          // translators: %s: The color's hex code e.g: "#f00".
          (0, import_i18n22.__)('Border color and style picker. The currently selected color has a value of "%s".'),
          ariaLabelValue
        );
      }
      return (0, import_i18n22.__)("Border color and style picker.");
    }
    if (colorObject) {
      return (0, import_i18n22.sprintf)(
        // translators: 1: The name of the color e.g. "vivid red". 2: The color's hex code e.g: "#f00".
        (0, import_i18n22.__)('Border color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'),
        colorObject.name,
        getAriaLabelColorValue(colorObject.color)
      );
    }
    if (colorValue) {
      return (0, import_i18n22.sprintf)(
        // translators: %s: The color's hex code e.g: "#f00".
        (0, import_i18n22.__)('Border color picker. The currently selected color has a value of "%s".'),
        getAriaLabelColorValue(colorValue)
      );
    }
    return (0, import_i18n22.__)("Border color picker.");
  };
  var BorderControlDropdown = (props, forwardedRef) => {
    const {
      __experimentalIsRenderedInSidebar,
      border,
      colors,
      disableCustomColors,
      enableAlpha,
      enableStyle,
      indicatorClassName,
      indicatorWrapperClassName,
      isStyleSettable,
      onReset,
      onColorChange,
      onStyleChange,
      popoverContentClassName,
      popoverControlsClassName,
      resetButtonWrapperClassName,
      size: size3,
      __unstablePopoverProps,
      ...otherProps
    } = useBorderControlDropdown(props);
    const {
      color: color2,
      style: style2
    } = border || {};
    const colorObject = getColorObject(color2, colors);
    const toggleAriaLabel = getToggleAriaLabel(color2, colorObject, style2, enableStyle);
    const enableResetButton = color2 || style2 && style2 !== "none";
    const dropdownPosition = __experimentalIsRenderedInSidebar ? "bottom left" : void 0;
    const renderToggle = ({
      onToggle
    }) => /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(button_default, {
      onClick: onToggle,
      variant: "tertiary",
      "aria-label": toggleAriaLabel,
      tooltipPosition: dropdownPosition,
      label: (0, import_i18n22.__)("Border color and style picker"),
      showTooltip: true,
      __next40pxDefaultSize: size3 === "__unstable-large",
      children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", {
        className: indicatorWrapperClassName,
        children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(color_indicator_default, {
          className: indicatorClassName,
          colorValue: color2
        })
      })
    });
    const renderContent = () => /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_jsx_runtime147.Fragment, {
      children: /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(dropdown_content_wrapper_default, {
        paddingSize: "medium",
        children: [/* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(component_default18, {
          className: popoverControlsClassName,
          spacing: 6,
          children: [/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(color_palette_default, {
            className: popoverContentClassName,
            value: color2,
            onChange: onColorChange,
            colors,
            disableCustomColors,
            __experimentalIsRenderedInSidebar,
            clearable: false,
            enableAlpha
          }), enableStyle && isStyleSettable && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(component_default16, {
            label: (0, import_i18n22.__)("Style"),
            value: style2,
            onChange: onStyleChange
          })]
        }), /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("div", {
          className: resetButtonWrapperClassName,
          children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(button_default, {
            variant: "tertiary",
            onClick: () => {
              onReset();
            },
            disabled: !enableResetButton,
            accessibleWhenDisabled: true,
            __next40pxDefaultSize: true,
            children: (0, import_i18n22.__)("Reset")
          })
        })]
      })
    });
    return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(dropdown_default, {
      renderToggle,
      renderContent,
      popoverProps: {
        ...__unstablePopoverProps
      },
      ...otherProps,
      ref: forwardedRef
    });
  };
  var ConnectedBorderControlDropdown = contextConnect(BorderControlDropdown, "BorderControlDropdown");
  var component_default20 = ConnectedBorderControlDropdown;

  // packages/components/build-module/unit-control/index.mjs
  var import_deprecated8 = __toESM(require_deprecated(), 1);
  var import_element85 = __toESM(require_element(), 1);
  var import_i18n23 = __toESM(require_i18n(), 1);

  // packages/components/build-module/unit-control/unit-select-control.mjs
  var import_element84 = __toESM(require_element(), 1);
  var import_jsx_runtime148 = __toESM(require_jsx_runtime(), 1);
  function UnitSelectControl({
    className: className2,
    isUnitSelectTabbable: isTabbable2 = true,
    onChange,
    size: size3 = "default",
    unit = "px",
    units = CSS_UNITS,
    ...props
  }, ref) {
    if (!hasUnits(units) || units?.length === 1) {
      return /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(UnitLabel, {
        className: "components-unit-control__unit-label",
        selectSize: size3,
        children: unit
      });
    }
    const handleOnChange = (event) => {
      const {
        value: unitValue
      } = event.target;
      const data = units.find((option) => option.value === unitValue);
      onChange?.(unitValue, {
        event,
        data
      });
    };
    const classes = clsx_default("components-unit-control__select", className2);
    return /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(UnitSelect, {
      ref,
      className: classes,
      onChange: handleOnChange,
      selectSize: size3,
      tabIndex: isTabbable2 ? void 0 : -1,
      value: unit,
      ...props,
      children: units.map((option) => /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("option", {
        value: option.value,
        children: option.label
      }, option.value))
    });
  }
  var unit_select_control_default = (0, import_element84.forwardRef)(UnitSelectControl);

  // packages/components/build-module/unit-control/index.mjs
  var import_jsx_runtime149 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedUnitControl(unitControlProps, forwardedRef) {
    const {
      __unstableStateReducer,
      autoComplete = "off",
      // @ts-expect-error Ensure that children is omitted from restProps
      children,
      className: className2,
      disabled = false,
      disableUnits = false,
      isPressEnterToChange = false,
      isResetValueOnUnitChange = false,
      isUnitSelectTabbable = true,
      label,
      onChange: onChangeProp,
      onUnitChange,
      size: size3 = "default",
      unit: unitProp,
      units: unitsProp = CSS_UNITS,
      value: valueProp,
      onFocus: onFocusProp,
      __shouldNotWarnDeprecated36pxSize,
      ...props
    } = useDeprecated36pxDefaultSizeProp(unitControlProps);
    maybeWarnDeprecated36pxSize({
      componentName: "UnitControl",
      __next40pxDefaultSize: props.__next40pxDefaultSize,
      size: size3,
      __shouldNotWarnDeprecated36pxSize
    });
    if ("unit" in unitControlProps) {
      (0, import_deprecated8.default)("UnitControl unit prop", {
        since: "5.6",
        hint: "The unit should be provided within the `value` prop.",
        version: "6.2"
      });
    }
    const nonNullValueProp = valueProp ?? void 0;
    const [units, reFirstCharacterOfUnits] = (0, import_element85.useMemo)(() => {
      const list = getUnitsWithCurrentUnit(nonNullValueProp, unitProp, unitsProp);
      const [{
        value: firstUnitValue = ""
      } = {}, ...rest] = list;
      const firstCharacters = rest.reduce((carry, {
        value
      }) => {
        const first = escapeRegExp(value?.substring(0, 1) || "");
        return carry.includes(first) ? carry : `${carry}|${first}`;
      }, escapeRegExp(firstUnitValue.substring(0, 1)));
      return [list, new RegExp(`^(?:${firstCharacters})$`, "i")];
    }, [nonNullValueProp, unitProp, unitsProp]);
    const [parsedQuantity, parsedUnit] = getParsedQuantityAndUnit(nonNullValueProp, unitProp, units);
    const [unit, setUnit] = use_controlled_state_default(units.length === 1 ? units[0].value : unitProp, {
      initial: parsedUnit,
      fallback: ""
    });
    (0, import_element85.useEffect)(() => {
      if (parsedUnit !== void 0) {
        setUnit(parsedUnit);
      }
    }, [parsedUnit, setUnit]);
    const classes = clsx_default(
      "components-unit-control",
      // This class is added for legacy purposes to maintain it on the outer
      // wrapper. See: https://github.com/WordPress/gutenberg/pull/45139
      "components-unit-control-wrapper",
      className2
    );
    const handleOnQuantityChange = (nextQuantityValue, changeProps) => {
      if (nextQuantityValue === "" || typeof nextQuantityValue === "undefined" || nextQuantityValue === null) {
        onChangeProp?.("", changeProps);
        return;
      }
      const onChangeValue = getValidParsedQuantityAndUnit(nextQuantityValue, units, parsedQuantity, unit).join("");
      onChangeProp?.(onChangeValue, changeProps);
    };
    const handleOnUnitChange = (nextUnitValue, changeProps) => {
      const {
        data
      } = changeProps;
      let nextValue = `${parsedQuantity ?? ""}${nextUnitValue}`;
      if (isResetValueOnUnitChange && data?.default !== void 0) {
        nextValue = `${data.default}${nextUnitValue}`;
      }
      onChangeProp?.(nextValue, changeProps);
      onUnitChange?.(nextUnitValue, changeProps);
      setUnit(nextUnitValue);
    };
    let handleOnKeyDown;
    if (!disableUnits && isUnitSelectTabbable && units.length) {
      handleOnKeyDown = (event) => {
        props.onKeyDown?.(event);
        if (!event.metaKey && !event.ctrlKey && reFirstCharacterOfUnits.test(event.key)) {
          refInputSuffix.current?.focus();
        }
      };
    }
    const refInputSuffix = (0, import_element85.useRef)(null);
    const inputSuffix = !disableUnits ? /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(unit_select_control_default, {
      ref: refInputSuffix,
      "aria-label": (0, import_i18n23.__)("Select unit"),
      disabled,
      isUnitSelectTabbable,
      onChange: handleOnUnitChange,
      size: ["small", "compact"].includes(size3) || size3 === "default" && !props.__next40pxDefaultSize ? "small" : "default",
      unit,
      units,
      onFocus: onFocusProp,
      onBlur: unitControlProps.onBlur
    }) : null;
    let step = props.step;
    if (!step && units) {
      const activeUnit = units.find((option) => option.value === unit);
      step = activeUnit?.step ?? 1;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(ValueInput, {
      ...props,
      __shouldNotWarnDeprecated36pxSize: true,
      autoComplete,
      className: classes,
      disabled,
      spinControls: "none",
      isPressEnterToChange,
      label,
      onKeyDown: handleOnKeyDown,
      onChange: handleOnQuantityChange,
      ref: forwardedRef,
      size: size3,
      suffix: inputSuffix,
      type: isPressEnterToChange ? "text" : "number",
      value: parsedQuantity ?? "",
      step,
      onFocus: onFocusProp,
      __unstableStateReducer
    });
  }
  var UnitControl = (0, import_element85.forwardRef)(UnforwardedUnitControl);
  UnitControl.displayName = "UnitControl";
  var unit_control_default = UnitControl;

  // packages/components/build-module/border-control/border-control/hook.mjs
  var import_element86 = __toESM(require_element(), 1);
  var isValidBorder = (border) => {
    const hasWidth = border?.width !== void 0 && border.width !== "";
    const hasColor = border?.color !== void 0;
    return hasWidth || hasColor;
  };
  function useBorderControl(props) {
    const {
      className: className2,
      colors = [],
      isCompact,
      onChange,
      enableAlpha = true,
      enableStyle = true,
      shouldSanitizeBorder = true,
      size: size3 = "default",
      value: border,
      width,
      __experimentalIsRenderedInSidebar = false,
      __next40pxDefaultSize,
      __shouldNotWarnDeprecated36pxSize,
      ...otherProps
    } = useContextSystem(props, "BorderControl");
    maybeWarnDeprecated36pxSize({
      componentName: "BorderControl",
      __next40pxDefaultSize,
      size: size3,
      __shouldNotWarnDeprecated36pxSize
    });
    const computedSize = size3 === "default" && __next40pxDefaultSize ? "__unstable-large" : size3;
    const [widthValue, originalWidthUnit] = parseQuantityAndUnitFromRawValue(border?.width);
    const widthUnit = originalWidthUnit || "px";
    const hadPreviousZeroWidth = widthValue === 0;
    const [colorSelection, setColorSelection] = (0, import_element86.useState)();
    const [styleSelection, setStyleSelection] = (0, import_element86.useState)();
    const isStyleSettable = shouldSanitizeBorder ? isValidBorder(border) : true;
    const onBorderChange = (0, import_element86.useCallback)((newBorder) => {
      if (shouldSanitizeBorder && !isValidBorder(newBorder)) {
        onChange(void 0);
        return;
      }
      onChange(newBorder);
    }, [onChange, shouldSanitizeBorder]);
    const onWidthChange = (0, import_element86.useCallback)((newWidth) => {
      const newWidthValue = newWidth === "" ? void 0 : newWidth;
      const [parsedValue] = parseQuantityAndUnitFromRawValue(newWidth);
      const hasZeroWidth = parsedValue === 0;
      const updatedBorder = {
        ...border,
        width: newWidthValue
      };
      if (hasZeroWidth && !hadPreviousZeroWidth) {
        setColorSelection(border?.color);
        setStyleSelection(border?.style);
        updatedBorder.color = void 0;
        updatedBorder.style = "none";
      }
      if (!hasZeroWidth && hadPreviousZeroWidth) {
        if (updatedBorder.color === void 0) {
          updatedBorder.color = colorSelection;
        }
        if (updatedBorder.style === "none") {
          updatedBorder.style = styleSelection;
        }
      }
      onBorderChange(updatedBorder);
    }, [border, hadPreviousZeroWidth, colorSelection, styleSelection, onBorderChange]);
    const onSliderChange = (0, import_element86.useCallback)((value) => {
      onWidthChange(`${value}${widthUnit}`);
    }, [onWidthChange, widthUnit]);
    const cx3 = useCx();
    const classes = (0, import_element86.useMemo)(() => {
      return cx3(borderControl, className2);
    }, [className2, cx3]);
    let wrapperWidth2 = width;
    if (isCompact) {
      wrapperWidth2 = size3 === "__unstable-large" ? "116px" : "90px";
    }
    const innerWrapperClassName = (0, import_element86.useMemo)(() => {
      const widthStyle = !!wrapperWidth2 && wrapperWidth;
      const heightStyle = wrapperHeight(computedSize);
      return cx3(innerWrapper(), widthStyle, heightStyle);
    }, [wrapperWidth2, cx3, computedSize]);
    const sliderClassName = (0, import_element86.useMemo)(() => {
      return cx3(borderSlider());
    }, [cx3]);
    return {
      ...otherProps,
      className: classes,
      colors,
      enableAlpha,
      enableStyle,
      innerWrapperClassName,
      inputWidth: wrapperWidth2,
      isStyleSettable,
      onBorderChange,
      onSliderChange,
      onWidthChange,
      previousStyleSelection: styleSelection,
      sliderClassName,
      value: border,
      widthUnit,
      widthValue,
      size: computedSize,
      __experimentalIsRenderedInSidebar,
      __next40pxDefaultSize
    };
  }

  // packages/components/build-module/border-control/border-control/component.mjs
  var import_jsx_runtime150 = __toESM(require_jsx_runtime(), 1);
  var BorderLabel = (props) => {
    const {
      label,
      hideLabelFromVision
    } = props;
    if (!label) {
      return null;
    }
    return hideLabelFromVision ? /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(component_default2, {
      as: "legend",
      children: label
    }) : /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(StyledLabel, {
      as: "legend",
      children: label
    });
  };
  var UnconnectedBorderControl = (props, forwardedRef) => {
    const {
      __next40pxDefaultSize = false,
      colors,
      disableCustomColors,
      disableUnits,
      enableAlpha,
      enableStyle,
      hideLabelFromVision,
      innerWrapperClassName,
      inputWidth,
      isStyleSettable,
      label,
      onBorderChange,
      onSliderChange,
      onWidthChange,
      placeholder,
      __unstablePopoverProps,
      previousStyleSelection,
      showDropdownHeader,
      size: size3,
      sliderClassName,
      value: border,
      widthUnit,
      widthValue,
      withSlider,
      __experimentalIsRenderedInSidebar,
      ...otherProps
    } = useBorderControl(props);
    return /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(component_default, {
      as: "fieldset",
      ...otherProps,
      ref: forwardedRef,
      children: [/* @__PURE__ */ (0, import_jsx_runtime150.jsx)(BorderLabel, {
        label,
        hideLabelFromVision
      }), /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(component_default9, {
        spacing: 4,
        className: innerWrapperClassName,
        children: [/* @__PURE__ */ (0, import_jsx_runtime150.jsx)(unit_control_default, {
          __next40pxDefaultSize,
          __shouldNotWarnDeprecated36pxSize: true,
          prefix: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(component_default6, {
            marginRight: 1,
            marginBottom: 0,
            children: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(component_default20, {
              border,
              colors,
              __unstablePopoverProps,
              disableCustomColors,
              enableAlpha,
              enableStyle,
              isStyleSettable,
              onChange: onBorderChange,
              previousStyleSelection,
              __experimentalIsRenderedInSidebar,
              size: size3
            })
          }),
          label: (0, import_i18n24.__)("Border width"),
          hideLabelFromVision: true,
          min: 0,
          onChange: onWidthChange,
          value: border?.width || "",
          placeholder,
          disableUnits,
          __unstableInputWidth: inputWidth,
          size: size3
        }), withSlider && /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(range_control_default, {
          label: (0, import_i18n24.__)("Border width"),
          hideLabelFromVision: true,
          className: sliderClassName,
          initialPosition: 0,
          max: 100,
          min: 0,
          onChange: onSliderChange,
          step: ["px", "%"].includes(widthUnit) ? 1 : 0.1,
          value: widthValue || void 0,
          withInputField: false,
          __next40pxDefaultSize,
          __shouldNotWarnDeprecated36pxSize: true
        })]
      })]
    });
  };
  var BorderControl = contextConnect(UnconnectedBorderControl, "BorderControl");
  var component_default21 = BorderControl;

  // packages/components/build-module/grid/hook.mjs
  var import_element87 = __toESM(require_element(), 1);

  // packages/components/build-module/grid/utils.mjs
  var ALIGNMENTS2 = {
    bottom: {
      alignItems: "flex-end",
      justifyContent: "center"
    },
    bottomLeft: {
      alignItems: "flex-start",
      justifyContent: "flex-end"
    },
    bottomRight: {
      alignItems: "flex-end",
      justifyContent: "flex-end"
    },
    center: {
      alignItems: "center",
      justifyContent: "center"
    },
    spaced: {
      alignItems: "center",
      justifyContent: "space-between"
    },
    left: {
      alignItems: "center",
      justifyContent: "flex-start"
    },
    right: {
      alignItems: "center",
      justifyContent: "flex-end"
    },
    stretch: {
      alignItems: "stretch"
    },
    top: {
      alignItems: "flex-start",
      justifyContent: "center"
    },
    topLeft: {
      alignItems: "flex-start",
      justifyContent: "flex-start"
    },
    topRight: {
      alignItems: "flex-start",
      justifyContent: "flex-end"
    }
  };
  function getAlignmentProps2(alignment) {
    const alignmentProps = alignment ? ALIGNMENTS2[alignment] : {};
    return alignmentProps;
  }

  // packages/components/build-module/grid/hook.mjs
  function useGrid(props) {
    const {
      align,
      alignment,
      className: className2,
      columnGap,
      columns = 2,
      gap = 3,
      isInline = false,
      justify,
      rowGap,
      rows,
      templateColumns,
      templateRows,
      ...otherProps
    } = useContextSystem(props, "Grid");
    const columnsAsArray = Array.isArray(columns) ? columns : [columns];
    const column2 = useResponsiveValue(columnsAsArray);
    const rowsAsArray = Array.isArray(rows) ? rows : [rows];
    const row = useResponsiveValue(rowsAsArray);
    const gridTemplateColumns = templateColumns || !!columns && `repeat( ${column2}, 1fr )`;
    const gridTemplateRows = templateRows || !!rows && `repeat( ${row}, 1fr )`;
    const cx3 = useCx();
    const classes = (0, import_element87.useMemo)(() => {
      const alignmentProps = getAlignmentProps2(alignment);
      const gridClasses = /* @__PURE__ */ css({
        alignItems: align,
        display: isInline ? "inline-grid" : "grid",
        gap: `calc( ${config_values_default.gridBase} * ${gap} )`,
        gridTemplateColumns: gridTemplateColumns || void 0,
        gridTemplateRows: gridTemplateRows || void 0,
        gridRowGap: rowGap,
        gridColumnGap: columnGap,
        justifyContent: justify,
        verticalAlign: isInline ? "middle" : void 0,
        ...alignmentProps
      }, false ? "" : ";label:gridClasses;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBdURzQiIsImZpbGUiOiJob29rLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIFdvcmRQcmVzcyBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgdXNlTWVtbyB9IGZyb20gJ0B3b3JkcHJlc3MvZWxlbWVudCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHVzZUNvbnRleHRTeXN0ZW0gfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IGdldEFsaWdubWVudFByb3BzIH0gZnJvbSAnLi91dGlscyc7XG5pbXBvcnQgeyB1c2VSZXNwb25zaXZlVmFsdWUgfSBmcm9tICcuLi91dGlscy91c2UtcmVzcG9uc2l2ZS12YWx1ZSc7XG5pbXBvcnQgQ09ORklHIGZyb20gJy4uL3V0aWxzL2NvbmZpZy12YWx1ZXMnO1xuaW1wb3J0IHsgdXNlQ3ggfSBmcm9tICcuLi91dGlscy9ob29rcy91c2UtY3gnO1xuaW1wb3J0IHR5cGUgeyBHcmlkUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gdXNlR3JpZChcblx0cHJvcHM6IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzPCBHcmlkUHJvcHMsICdkaXYnID5cbikge1xuXHRjb25zdCB7XG5cdFx0YWxpZ24sXG5cdFx0YWxpZ25tZW50LFxuXHRcdGNsYXNzTmFtZSxcblx0XHRjb2x1bW5HYXAsXG5cdFx0Y29sdW1ucyA9IDIsXG5cdFx0Z2FwID0gMyxcblx0XHRpc0lubGluZSA9IGZhbHNlLFxuXHRcdGp1c3RpZnksXG5cdFx0cm93R2FwLFxuXHRcdHJvd3MsXG5cdFx0dGVtcGxhdGVDb2x1bW5zLFxuXHRcdHRlbXBsYXRlUm93cyxcblx0XHQuLi5vdGhlclByb3BzXG5cdH0gPSB1c2VDb250ZXh0U3lzdGVtKCBwcm9wcywgJ0dyaWQnICk7XG5cblx0Y29uc3QgY29sdW1uc0FzQXJyYXkgPSBBcnJheS5pc0FycmF5KCBjb2x1bW5zICkgPyBjb2x1bW5zIDogWyBjb2x1bW5zIF07XG5cdGNvbnN0IGNvbHVtbiA9IHVzZVJlc3BvbnNpdmVWYWx1ZSggY29sdW1uc0FzQXJyYXkgKTtcblx0Y29uc3Qgcm93c0FzQXJyYXkgPSBBcnJheS5pc0FycmF5KCByb3dzICkgPyByb3dzIDogWyByb3dzIF07XG5cdGNvbnN0IHJvdyA9IHVzZVJlc3BvbnNpdmVWYWx1ZSggcm93c0FzQXJyYXkgKTtcblxuXHRjb25zdCBncmlkVGVtcGxhdGVDb2x1bW5zID1cblx0XHR0ZW1wbGF0ZUNvbHVtbnMgfHwgKCAhISBjb2x1bW5zICYmIGByZXBlYXQoICR7IGNvbHVtbiB9LCAxZnIgKWAgKTtcblx0Y29uc3QgZ3JpZFRlbXBsYXRlUm93cyA9XG5cdFx0dGVtcGxhdGVSb3dzIHx8ICggISEgcm93cyAmJiBgcmVwZWF0KCAkeyByb3cgfSwgMWZyIClgICk7XG5cblx0Y29uc3QgY3ggPSB1c2VDeCgpO1xuXG5cdGNvbnN0IGNsYXNzZXMgPSB1c2VNZW1vKCAoKSA9PiB7XG5cdFx0Y29uc3QgYWxpZ25tZW50UHJvcHMgPSBnZXRBbGlnbm1lbnRQcm9wcyggYWxpZ25tZW50ICk7XG5cblx0XHRjb25zdCBncmlkQ2xhc3NlcyA9IGNzcygge1xuXHRcdFx0YWxpZ25JdGVtczogYWxpZ24sXG5cdFx0XHRkaXNwbGF5OiBpc0lubGluZSA/ICdpbmxpbmUtZ3JpZCcgOiAnZ3JpZCcsXG5cdFx0XHRnYXA6IGBjYWxjKCAkeyBDT05GSUcuZ3JpZEJhc2UgfSAqICR7IGdhcCB9IClgLFxuXHRcdFx0Z3JpZFRlbXBsYXRlQ29sdW1uczogZ3JpZFRlbXBsYXRlQ29sdW1ucyB8fCB1bmRlZmluZWQsXG5cdFx0XHRncmlkVGVtcGxhdGVSb3dzOiBncmlkVGVtcGxhdGVSb3dzIHx8IHVuZGVmaW5lZCxcblx0XHRcdGdyaWRSb3dHYXA6IHJvd0dhcCxcblx0XHRcdGdyaWRDb2x1bW5HYXA6IGNvbHVtbkdhcCxcblx0XHRcdGp1c3RpZnlDb250ZW50OiBqdXN0aWZ5LFxuXHRcdFx0dmVydGljYWxBbGlnbjogaXNJbmxpbmUgPyAnbWlkZGxlJyA6IHVuZGVmaW5lZCxcblx0XHRcdC4uLmFsaWdubWVudFByb3BzLFxuXHRcdH0gKTtcblxuXHRcdHJldHVybiBjeCggZ3JpZENsYXNzZXMsIGNsYXNzTmFtZSApO1xuXHR9LCBbXG5cdFx0YWxpZ24sXG5cdFx0YWxpZ25tZW50LFxuXHRcdGNsYXNzTmFtZSxcblx0XHRjb2x1bW5HYXAsXG5cdFx0Y3gsXG5cdFx0Z2FwLFxuXHRcdGdyaWRUZW1wbGF0ZUNvbHVtbnMsXG5cdFx0Z3JpZFRlbXBsYXRlUm93cyxcblx0XHRpc0lubGluZSxcblx0XHRqdXN0aWZ5LFxuXHRcdHJvd0dhcCxcblx0XSApO1xuXG5cdHJldHVybiB7IC4uLm90aGVyUHJvcHMsIGNsYXNzTmFtZTogY2xhc3NlcyB9O1xufVxuIl19 */");
      return cx3(gridClasses, className2);
    }, [align, alignment, className2, columnGap, cx3, gap, gridTemplateColumns, gridTemplateRows, isInline, justify, rowGap]);
    return {
      ...otherProps,
      className: classes
    };
  }

  // packages/components/build-module/grid/component.mjs
  var import_jsx_runtime151 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedGrid(props, forwardedRef) {
    const gridProps = useGrid(props);
    return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(component_default, {
      ...gridProps,
      ref: forwardedRef
    });
  }
  var Grid = contextConnect(UnconnectedGrid, "Grid");
  var component_default22 = Grid;

  // packages/components/build-module/border-box-control/border-box-control-split-controls/hook.mjs
  var import_element88 = __toESM(require_element(), 1);
  function useBorderBoxControlSplitControls(props) {
    const {
      className: className2,
      colors = [],
      enableAlpha = false,
      enableStyle = true,
      size: size3 = "default",
      __experimentalIsRenderedInSidebar = false,
      ...otherProps
    } = useContextSystem(props, "BorderBoxControlSplitControls");
    const cx3 = useCx();
    const classes = (0, import_element88.useMemo)(() => {
      return cx3(borderBoxControlSplitControls(size3), className2);
    }, [cx3, className2, size3]);
    const centeredClassName = (0, import_element88.useMemo)(() => {
      return cx3(centeredBorderControl, className2);
    }, [cx3, className2]);
    const rightAlignedClassName = (0, import_element88.useMemo)(() => {
      return cx3(rightBorderControl(), className2);
    }, [cx3, className2]);
    return {
      ...otherProps,
      centeredClassName,
      className: classes,
      colors,
      enableAlpha,
      enableStyle,
      rightAlignedClassName,
      size: size3,
      __experimentalIsRenderedInSidebar
    };
  }

  // packages/components/build-module/border-box-control/border-box-control-split-controls/component.mjs
  var import_jsx_runtime152 = __toESM(require_jsx_runtime(), 1);
  var BorderBoxControlSplitControls = (props, forwardedRef) => {
    const {
      centeredClassName,
      colors,
      disableCustomColors,
      enableAlpha,
      enableStyle,
      onChange,
      popoverPlacement,
      popoverOffset,
      rightAlignedClassName,
      size: size3 = "default",
      value,
      __experimentalIsRenderedInSidebar,
      ...otherProps
    } = useBorderBoxControlSplitControls(props);
    const [popoverAnchor, setPopoverAnchor] = (0, import_element89.useState)(null);
    const popoverProps = (0, import_element89.useMemo)(() => popoverPlacement ? {
      placement: popoverPlacement,
      offset: popoverOffset,
      anchor: popoverAnchor,
      shift: true
    } : void 0, [popoverPlacement, popoverOffset, popoverAnchor]);
    const sharedBorderControlProps = {
      colors,
      disableCustomColors,
      enableAlpha,
      enableStyle,
      isCompact: true,
      __experimentalIsRenderedInSidebar,
      size: size3,
      __shouldNotWarnDeprecated36pxSize: true
    };
    const mergedRef = (0, import_compose35.useMergeRefs)([setPopoverAnchor, forwardedRef]);
    return /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(component_default22, {
      ...otherProps,
      ref: mergedRef,
      gap: 3,
      children: [/* @__PURE__ */ (0, import_jsx_runtime152.jsx)(component_default11, {
        value,
        size: size3
      }), /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(component_default21, {
        className: centeredClassName,
        hideLabelFromVision: true,
        label: (0, import_i18n25.__)("Top border"),
        onChange: (newBorder) => onChange(newBorder, "top"),
        __unstablePopoverProps: popoverProps,
        value: value?.top,
        ...sharedBorderControlProps
      }), /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(component_default21, {
        hideLabelFromVision: true,
        label: (0, import_i18n25.__)("Left border"),
        onChange: (newBorder) => onChange(newBorder, "left"),
        __unstablePopoverProps: popoverProps,
        value: value?.left,
        ...sharedBorderControlProps
      }), /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(component_default21, {
        className: rightAlignedClassName,
        hideLabelFromVision: true,
        label: (0, import_i18n25.__)("Right border"),
        onChange: (newBorder) => onChange(newBorder, "right"),
        __unstablePopoverProps: popoverProps,
        value: value?.right,
        ...sharedBorderControlProps
      }), /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(component_default21, {
        className: centeredClassName,
        hideLabelFromVision: true,
        label: (0, import_i18n25.__)("Bottom border"),
        onChange: (newBorder) => onChange(newBorder, "bottom"),
        __unstablePopoverProps: popoverProps,
        value: value?.bottom,
        ...sharedBorderControlProps
      })]
    });
  };
  var ConnectedBorderBoxControlSplitControls = contextConnect(BorderBoxControlSplitControls, "BorderBoxControlSplitControls");
  var component_default23 = ConnectedBorderBoxControlSplitControls;

  // packages/components/build-module/border-box-control/border-box-control/hook.mjs
  var import_element90 = __toESM(require_element(), 1);

  // packages/components/build-module/utils/unit-values.mjs
  var UNITED_VALUE_REGEX = /^([\d.\-+]*)\s*(fr|cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|vw|vh|vmin|vmax|%|cap|ic|rlh|vi|vb|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx|svw|lvw|dvw|svh|lvh|dvh|svi|lvi|dvi|svb|lvb|dvb|svmin|lvmin|dvmin|svmax|lvmax|dvmax)?$/;
  function parseCSSUnitValue(toParse) {
    const value = toParse.trim();
    const matched = value.match(UNITED_VALUE_REGEX);
    if (!matched) {
      return [void 0, void 0];
    }
    const [, num, unit] = matched;
    let numParsed = parseFloat(num);
    numParsed = Number.isNaN(numParsed) ? void 0 : numParsed;
    return [numParsed, unit];
  }

  // packages/components/build-module/border-box-control/utils.mjs
  var sides2 = ["top", "right", "bottom", "left"];
  var borderProps = ["color", "style", "width"];
  var isEmptyBorder = (border) => {
    if (!border) {
      return true;
    }
    return !borderProps.some((prop) => border[prop] !== void 0);
  };
  var isDefinedBorder = (border) => {
    if (!border) {
      return false;
    }
    if (hasSplitBorders(border)) {
      const allSidesEmpty = sides2.every((side) => isEmptyBorder(border[side]));
      return !allSidesEmpty;
    }
    return !isEmptyBorder(border);
  };
  var isCompleteBorder = (border) => {
    if (!border) {
      return false;
    }
    return borderProps.every((prop) => border[prop] !== void 0);
  };
  var hasSplitBorders = (border = {}) => {
    return Object.keys(border).some((side) => sides2.indexOf(side) !== -1);
  };
  var hasMixedBorders = (borders2) => {
    if (!hasSplitBorders(borders2)) {
      return false;
    }
    const shorthandBorders = sides2.map((side) => getShorthandBorderStyle(borders2?.[side]));
    return !shorthandBorders.every((border) => border === shorthandBorders[0]);
  };
  var getSplitBorders = (border) => {
    if (!border || isEmptyBorder(border)) {
      return void 0;
    }
    return {
      top: border,
      right: border,
      bottom: border,
      left: border
    };
  };
  var getBorderDiff = (original, updated) => {
    const diff = {};
    if (original.color !== updated.color) {
      diff.color = updated.color;
    }
    if (original.style !== updated.style) {
      diff.style = updated.style;
    }
    if (original.width !== updated.width) {
      diff.width = updated.width;
    }
    return diff;
  };
  var getCommonBorder = (borders2) => {
    if (!borders2) {
      return void 0;
    }
    const colors = [];
    const styles3 = [];
    const widths = [];
    sides2.forEach((side) => {
      colors.push(borders2[side]?.color);
      styles3.push(borders2[side]?.style);
      widths.push(borders2[side]?.width);
    });
    const allColorsMatch = colors.every((value) => value === colors[0]);
    const allStylesMatch = styles3.every((value) => value === styles3[0]);
    const allWidthsMatch = widths.every((value) => value === widths[0]);
    return {
      color: allColorsMatch ? colors[0] : void 0,
      style: allStylesMatch ? styles3[0] : void 0,
      width: allWidthsMatch ? widths[0] : getMostCommonUnit(widths)
    };
  };
  var getShorthandBorderStyle = (border, fallbackBorder) => {
    if (isEmptyBorder(border)) {
      return fallbackBorder;
    }
    const {
      color: fallbackColor,
      style: fallbackStyle,
      width: fallbackWidth
    } = fallbackBorder || {};
    const {
      color: color2 = fallbackColor,
      style: style2 = fallbackStyle,
      width = fallbackWidth
    } = border;
    const hasVisibleBorder = !!width && width !== "0" || !!color2;
    const borderStyle = hasVisibleBorder ? style2 || "solid" : style2;
    return [width, borderStyle, color2].filter(Boolean).join(" ");
  };
  var getMostCommonUnit = (values) => {
    const units = values.map((value) => value === void 0 ? void 0 : parseCSSUnitValue(`${value}`)[1]);
    const filteredUnits = units.filter((value) => value !== void 0);
    return mode(filteredUnits);
  };
  function mode(values) {
    if (values.length === 0) {
      return void 0;
    }
    const map = {};
    let maxCount = 0;
    let currentMode;
    values.forEach((value) => {
      map[value] = map[value] === void 0 ? 1 : map[value] + 1;
      if (map[value] > maxCount) {
        currentMode = value;
        maxCount = map[value];
      }
    });
    return currentMode;
  }

  // packages/components/build-module/border-box-control/border-box-control/hook.mjs
  function useBorderBoxControl(props) {
    const {
      className: className2,
      colors = [],
      onChange,
      enableAlpha = false,
      enableStyle = true,
      size: size3 = "default",
      value,
      __experimentalIsRenderedInSidebar = false,
      __next40pxDefaultSize,
      ...otherProps
    } = useContextSystem(props, "BorderBoxControl");
    maybeWarnDeprecated36pxSize({
      componentName: "BorderBoxControl",
      __next40pxDefaultSize,
      size: size3
    });
    const computedSize = size3 === "default" && __next40pxDefaultSize ? "__unstable-large" : size3;
    const mixedBorders = hasMixedBorders(value);
    const splitBorders = hasSplitBorders(value);
    const linkedValue = splitBorders ? getCommonBorder(value) : value;
    const splitValue = splitBorders ? value : getSplitBorders(value);
    const hasWidthValue = !isNaN(parseFloat(`${linkedValue?.width}`));
    const [isLinked, setIsLinked] = (0, import_element90.useState)(!mixedBorders);
    const toggleLinked = () => setIsLinked(!isLinked);
    const onLinkedChange = (newBorder) => {
      if (!newBorder) {
        return onChange(void 0);
      }
      if (!mixedBorders || isCompleteBorder(newBorder)) {
        return onChange(isEmptyBorder(newBorder) ? void 0 : newBorder);
      }
      const changes = getBorderDiff(linkedValue, newBorder);
      const updatedBorders = {
        top: {
          ...value?.top,
          ...changes
        },
        right: {
          ...value?.right,
          ...changes
        },
        bottom: {
          ...value?.bottom,
          ...changes
        },
        left: {
          ...value?.left,
          ...changes
        }
      };
      if (hasMixedBorders(updatedBorders)) {
        return onChange(updatedBorders);
      }
      const filteredResult = isEmptyBorder(updatedBorders.top) ? void 0 : updatedBorders.top;
      onChange(filteredResult);
    };
    const onSplitChange = (newBorder, side) => {
      const updatedBorders = {
        ...splitValue,
        [side]: newBorder
      };
      if (hasMixedBorders(updatedBorders)) {
        onChange(updatedBorders);
      } else {
        onChange(newBorder);
      }
    };
    const cx3 = useCx();
    const classes = (0, import_element90.useMemo)(() => {
      return cx3(borderBoxControl, className2);
    }, [cx3, className2]);
    const linkedControlClassName = (0, import_element90.useMemo)(() => {
      return cx3(linkedBorderControl());
    }, [cx3]);
    const wrapperClassName = (0, import_element90.useMemo)(() => {
      return cx3(wrapper);
    }, [cx3]);
    return {
      ...otherProps,
      className: classes,
      colors,
      disableUnits: mixedBorders && !hasWidthValue,
      enableAlpha,
      enableStyle,
      hasMixedBorders: mixedBorders,
      isLinked,
      linkedControlClassName,
      onLinkedChange,
      onSplitChange,
      toggleLinked,
      linkedValue,
      size: computedSize,
      splitValue,
      wrapperClassName,
      __experimentalIsRenderedInSidebar
    };
  }

  // packages/components/build-module/border-box-control/border-box-control/component.mjs
  var import_jsx_runtime153 = __toESM(require_jsx_runtime(), 1);
  var BorderLabel2 = (props) => {
    const {
      label,
      hideLabelFromVision
    } = props;
    if (!label) {
      return null;
    }
    return hideLabelFromVision ? /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(component_default2, {
      as: "label",
      children: label
    }) : /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(StyledLabel, {
      children: label
    });
  };
  var UnconnectedBorderBoxControl = (props, forwardedRef) => {
    const {
      className: className2,
      colors,
      disableCustomColors,
      disableUnits,
      enableAlpha,
      enableStyle,
      hasMixedBorders: hasMixedBorders2,
      hideLabelFromVision,
      isLinked,
      label,
      linkedControlClassName,
      linkedValue,
      onLinkedChange,
      onSplitChange,
      popoverPlacement,
      popoverOffset,
      size: size3,
      splitValue,
      toggleLinked,
      wrapperClassName,
      __experimentalIsRenderedInSidebar,
      ...otherProps
    } = useBorderBoxControl(props);
    const [popoverAnchor, setPopoverAnchor] = (0, import_element91.useState)(null);
    const popoverProps = (0, import_element91.useMemo)(() => popoverPlacement ? {
      placement: popoverPlacement,
      offset: popoverOffset,
      anchor: popoverAnchor,
      shift: true
    } : void 0, [popoverPlacement, popoverOffset, popoverAnchor]);
    const mergedRef = (0, import_compose36.useMergeRefs)([setPopoverAnchor, forwardedRef]);
    return /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(component_default, {
      className: className2,
      ...otherProps,
      ref: mergedRef,
      children: [/* @__PURE__ */ (0, import_jsx_runtime153.jsx)(BorderLabel2, {
        label,
        hideLabelFromVision
      }), /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(component_default, {
        className: wrapperClassName,
        children: [isLinked ? /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(component_default21, {
          className: linkedControlClassName,
          colors,
          disableUnits,
          disableCustomColors,
          enableAlpha,
          enableStyle,
          onChange: onLinkedChange,
          placeholder: hasMixedBorders2 ? (0, import_i18n26.__)("Mixed") : void 0,
          __unstablePopoverProps: popoverProps,
          shouldSanitizeBorder: false,
          value: linkedValue,
          withSlider: true,
          width: size3 === "__unstable-large" ? "116px" : "110px",
          __experimentalIsRenderedInSidebar,
          __shouldNotWarnDeprecated36pxSize: true,
          size: size3
        }) : /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(component_default23, {
          colors,
          disableCustomColors,
          enableAlpha,
          enableStyle,
          onChange: onSplitChange,
          popoverPlacement,
          popoverOffset,
          value: splitValue,
          __experimentalIsRenderedInSidebar,
          size: size3
        }), /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(component_default10, {
          onClick: toggleLinked,
          isLinked,
          size: size3
        })]
      })]
    });
  };
  var BorderBoxControl = contextConnect(UnconnectedBorderBoxControl, "BorderBoxControl");
  var component_default24 = BorderBoxControl;

  // packages/components/build-module/box-control/index.mjs
  var import_compose38 = __toESM(require_compose(), 1);
  var import_element93 = __toESM(require_element(), 1);
  var import_i18n30 = __toESM(require_i18n(), 1);
  var import_warning5 = __toESM(require_warning(), 1);

  // packages/components/build-module/box-control/input-control.mjs
  var import_compose37 = __toESM(require_compose(), 1);
  var import_i18n28 = __toESM(require_i18n(), 1);
  var import_element92 = __toESM(require_element(), 1);

  // packages/components/build-module/box-control/utils.mjs
  var import_i18n27 = __toESM(require_i18n(), 1);
  var import_deprecated9 = __toESM(require_deprecated(), 1);
  var CUSTOM_VALUE_SETTINGS = {
    px: {
      max: 300,
      step: 1
    },
    "%": {
      max: 100,
      step: 1
    },
    vw: {
      max: 100,
      step: 1
    },
    vh: {
      max: 100,
      step: 1
    },
    em: {
      max: 10,
      step: 0.1
    },
    rm: {
      max: 10,
      step: 0.1
    },
    svw: {
      max: 100,
      step: 1
    },
    lvw: {
      max: 100,
      step: 1
    },
    dvw: {
      max: 100,
      step: 1
    },
    svh: {
      max: 100,
      step: 1
    },
    lvh: {
      max: 100,
      step: 1
    },
    dvh: {
      max: 100,
      step: 1
    },
    vi: {
      max: 100,
      step: 1
    },
    svi: {
      max: 100,
      step: 1
    },
    lvi: {
      max: 100,
      step: 1
    },
    dvi: {
      max: 100,
      step: 1
    },
    vb: {
      max: 100,
      step: 1
    },
    svb: {
      max: 100,
      step: 1
    },
    lvb: {
      max: 100,
      step: 1
    },
    dvb: {
      max: 100,
      step: 1
    },
    vmin: {
      max: 100,
      step: 1
    },
    svmin: {
      max: 100,
      step: 1
    },
    lvmin: {
      max: 100,
      step: 1
    },
    dvmin: {
      max: 100,
      step: 1
    },
    vmax: {
      max: 100,
      step: 1
    },
    svmax: {
      max: 100,
      step: 1
    },
    lvmax: {
      max: 100,
      step: 1
    },
    dvmax: {
      max: 100,
      step: 1
    }
  };
  var LABELS = {
    all: (0, import_i18n27.__)("All sides"),
    top: (0, import_i18n27.__)("Top side"),
    bottom: (0, import_i18n27.__)("Bottom side"),
    left: (0, import_i18n27.__)("Left side"),
    right: (0, import_i18n27.__)("Right side"),
    vertical: (0, import_i18n27.__)("Top and bottom sides"),
    horizontal: (0, import_i18n27.__)("Left and right sides")
  };
  var DEFAULT_VALUES = {
    top: void 0,
    right: void 0,
    bottom: void 0,
    left: void 0
  };
  var ALL_SIDES = ["top", "right", "bottom", "left"];
  function getMergedValue(values = {}, availableSides = ALL_SIDES) {
    const sides3 = normalizeSides(availableSides);
    if (sides3.every((side) => values[side] === values[sides3[0]])) {
      return values[sides3[0]];
    }
    return void 0;
  }
  function isValueMixed(values = {}, availableSides = ALL_SIDES) {
    const sides3 = normalizeSides(availableSides);
    return sides3.some((side) => values[side] !== values[sides3[0]]);
  }
  function isValuesDefined(values) {
    return values && Object.values(values).filter(
      // Switching units when input is empty causes values only
      // containing units. This gives false positive on mixed values
      // unless filtered.
      (value) => !!value && /\d/.test(value)
    ).length > 0;
  }
  function getInitialSide(isLinked, splitOnAxis) {
    let initialSide = "all";
    if (!isLinked) {
      initialSide = splitOnAxis ? "vertical" : "top";
    }
    return initialSide;
  }
  function normalizeSides(sides3) {
    const filteredSides = [];
    if (!sides3?.length) {
      return ALL_SIDES;
    }
    if (sides3.includes("vertical")) {
      filteredSides.push(...["top", "bottom"]);
    } else if (sides3.includes("horizontal")) {
      filteredSides.push(...["left", "right"]);
    } else {
      const newSides = ALL_SIDES.filter((side) => sides3.includes(side));
      filteredSides.push(...newSides);
    }
    return filteredSides;
  }
  function applyValueToSides(currentValues, newValue, sides3) {
    (0, import_deprecated9.default)("applyValueToSides", {
      since: "6.8",
      version: "7.0"
    });
    const newValues = {
      ...currentValues
    };
    if (sides3?.length) {
      sides3.forEach((side) => {
        if (side === "vertical") {
          newValues.top = newValue;
          newValues.bottom = newValue;
        } else if (side === "horizontal") {
          newValues.left = newValue;
          newValues.right = newValue;
        } else {
          newValues[side] = newValue;
        }
      });
    } else {
      ALL_SIDES.forEach((side) => newValues[side] = newValue);
    }
    return newValues;
  }
  function getAllowedSides(sides3) {
    const allowedSides = new Set(!sides3 ? ALL_SIDES : []);
    sides3?.forEach((allowedSide) => {
      if (allowedSide === "vertical") {
        allowedSides.add("top");
        allowedSides.add("bottom");
      } else if (allowedSide === "horizontal") {
        allowedSides.add("right");
        allowedSides.add("left");
      } else {
        allowedSides.add(allowedSide);
      }
    });
    return allowedSides;
  }
  function isValuePreset(value, presetKey) {
    return value.startsWith(`var:preset|${presetKey}|`);
  }
  function getPresetIndexFromValue(value, presetKey, presets) {
    if (!isValuePreset(value, presetKey)) {
      return void 0;
    }
    const match4 = value.match(new RegExp(`^var:preset\\|${presetKey}\\|(.+)$`));
    if (!match4) {
      return void 0;
    }
    const slug = match4[1];
    const index2 = presets.findIndex((preset) => {
      return preset.slug === slug;
    });
    return index2 !== -1 ? index2 : void 0;
  }
  function getPresetValueFromIndex(index2, presetKey, presets) {
    const preset = presets[index2];
    return `var:preset|${presetKey}|${preset.slug}`;
  }

  // packages/components/build-module/box-control/styles/box-control-icon-styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__15() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var Root3 = /* @__PURE__ */ createStyled("span", false ? {
    target: "e1j5nr4z8"
  } : {
    target: "e1j5nr4z8",
    label: "Root"
  })(false ? {
    name: "1w884gc",
    styles: "box-sizing:border-box;display:block;width:24px;height:24px;position:relative;padding:4px"
  } : {
    name: "1w884gc",
    styles: "box-sizing:border-box;display:block;width:24px;height:24px;position:relative;padding:4px/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJveC1jb250cm9sLWljb24tc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQU0rQiIsImZpbGUiOiJib3gtY29udHJvbC1pY29uLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQuc3BhbmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdHdpZHRoOiAyNHB4O1xuXHRoZWlnaHQ6IDI0cHg7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0cGFkZGluZzogNHB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IFZpZXdib3ggPSBzdHlsZWQuc3BhbmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cdGhlaWdodDogMTAwJTtcbmA7XG5cbmNvbnN0IHN0cm9rZUZvY3VzID0gKCB7IGlzRm9jdXNlZCB9OiB7IGlzRm9jdXNlZDogYm9vbGVhbiB9ICkgPT4ge1xuXHRyZXR1cm4gY3NzKCB7XG5cdFx0YmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcblx0XHRvcGFjaXR5OiBpc0ZvY3VzZWQgPyAxIDogMC4zLFxuXHR9ICk7XG59O1xuXG5jb25zdCBTdHJva2UgPSBzdHlsZWQuc3BhbmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdCR7IHN0cm9rZUZvY3VzIH07XG5gO1xuXG5jb25zdCBWZXJ0aWNhbFN0cm9rZSA9IHN0eWxlZCggU3Ryb2tlIClgXG5cdGJvdHRvbTogM3B4O1xuXHR0b3A6IDNweDtcblx0d2lkdGg6IDJweDtcbmA7XG5cbmNvbnN0IEhvcml6b250YWxTdHJva2UgPSBzdHlsZWQoIFN0cm9rZSApYFxuXHRoZWlnaHQ6IDJweDtcblx0bGVmdDogM3B4O1xuXHRyaWdodDogM3B4O1xuYDtcblxuZXhwb3J0IGNvbnN0IFRvcFN0cm9rZSA9IHN0eWxlZCggSG9yaXpvbnRhbFN0cm9rZSApYFxuXHR0b3A6IDA7XG5gO1xuXG5leHBvcnQgY29uc3QgUmlnaHRTdHJva2UgPSBzdHlsZWQoIFZlcnRpY2FsU3Ryb2tlIClgXG5cdHJpZ2h0OiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IEJvdHRvbVN0cm9rZSA9IHN0eWxlZCggSG9yaXpvbnRhbFN0cm9rZSApYFxuXHRib3R0b206IDA7XG5gO1xuXG5leHBvcnQgY29uc3QgTGVmdFN0cm9rZSA9IHN0eWxlZCggVmVydGljYWxTdHJva2UgKWBcblx0bGVmdDogMDtcbmA7XG4iXX0= */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__15
  });
  var Viewbox = /* @__PURE__ */ createStyled("span", false ? {
    target: "e1j5nr4z7"
  } : {
    target: "e1j5nr4z7",
    label: "Viewbox"
  })(false ? {
    name: "i6vjox",
    styles: "box-sizing:border-box;display:block;position:relative;width:100%;height:100%"
  } : {
    name: "i6vjox",
    styles: "box-sizing:border-box;display:block;position:relative;width:100%;height:100%/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJveC1jb250cm9sLWljb24tc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWVrQyIsImZpbGUiOiJib3gtY29udHJvbC1pY29uLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQuc3BhbmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdHdpZHRoOiAyNHB4O1xuXHRoZWlnaHQ6IDI0cHg7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0cGFkZGluZzogNHB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IFZpZXdib3ggPSBzdHlsZWQuc3BhbmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cdGhlaWdodDogMTAwJTtcbmA7XG5cbmNvbnN0IHN0cm9rZUZvY3VzID0gKCB7IGlzRm9jdXNlZCB9OiB7IGlzRm9jdXNlZDogYm9vbGVhbiB9ICkgPT4ge1xuXHRyZXR1cm4gY3NzKCB7XG5cdFx0YmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcblx0XHRvcGFjaXR5OiBpc0ZvY3VzZWQgPyAxIDogMC4zLFxuXHR9ICk7XG59O1xuXG5jb25zdCBTdHJva2UgPSBzdHlsZWQuc3BhbmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdCR7IHN0cm9rZUZvY3VzIH07XG5gO1xuXG5jb25zdCBWZXJ0aWNhbFN0cm9rZSA9IHN0eWxlZCggU3Ryb2tlIClgXG5cdGJvdHRvbTogM3B4O1xuXHR0b3A6IDNweDtcblx0d2lkdGg6IDJweDtcbmA7XG5cbmNvbnN0IEhvcml6b250YWxTdHJva2UgPSBzdHlsZWQoIFN0cm9rZSApYFxuXHRoZWlnaHQ6IDJweDtcblx0bGVmdDogM3B4O1xuXHRyaWdodDogM3B4O1xuYDtcblxuZXhwb3J0IGNvbnN0IFRvcFN0cm9rZSA9IHN0eWxlZCggSG9yaXpvbnRhbFN0cm9rZSApYFxuXHR0b3A6IDA7XG5gO1xuXG5leHBvcnQgY29uc3QgUmlnaHRTdHJva2UgPSBzdHlsZWQoIFZlcnRpY2FsU3Ryb2tlIClgXG5cdHJpZ2h0OiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IEJvdHRvbVN0cm9rZSA9IHN0eWxlZCggSG9yaXpvbnRhbFN0cm9rZSApYFxuXHRib3R0b206IDA7XG5gO1xuXG5leHBvcnQgY29uc3QgTGVmdFN0cm9rZSA9IHN0eWxlZCggVmVydGljYWxTdHJva2UgKWBcblx0bGVmdDogMDtcbmA7XG4iXX0= */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__15
  });
  var strokeFocus = ({
    isFocused
  }) => {
    return /* @__PURE__ */ css({
      backgroundColor: "currentColor",
      opacity: isFocused ? 1 : 0.3
    }, false ? "" : ";label:strokeFocus;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJveC1jb250cm9sLWljb24tc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXdCUSIsImZpbGUiOiJib3gtY29udHJvbC1pY29uLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQuc3BhbmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdHdpZHRoOiAyNHB4O1xuXHRoZWlnaHQ6IDI0cHg7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0cGFkZGluZzogNHB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IFZpZXdib3ggPSBzdHlsZWQuc3BhbmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0d2lkdGg6IDEwMCU7XG5cdGhlaWdodDogMTAwJTtcbmA7XG5cbmNvbnN0IHN0cm9rZUZvY3VzID0gKCB7IGlzRm9jdXNlZCB9OiB7IGlzRm9jdXNlZDogYm9vbGVhbiB9ICkgPT4ge1xuXHRyZXR1cm4gY3NzKCB7XG5cdFx0YmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcblx0XHRvcGFjaXR5OiBpc0ZvY3VzZWQgPyAxIDogMC4zLFxuXHR9ICk7XG59O1xuXG5jb25zdCBTdHJva2UgPSBzdHlsZWQuc3BhbmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdCR7IHN0cm9rZUZvY3VzIH07XG5gO1xuXG5jb25zdCBWZXJ0aWNhbFN0cm9rZSA9IHN0eWxlZCggU3Ryb2tlIClgXG5cdGJvdHRvbTogM3B4O1xuXHR0b3A6IDNweDtcblx0d2lkdGg6IDJweDtcbmA7XG5cbmNvbnN0IEhvcml6b250YWxTdHJva2UgPSBzdHlsZWQoIFN0cm9rZSApYFxuXHRoZWlnaHQ6IDJweDtcblx0bGVmdDogM3B4O1xuXHRyaWdodDogM3B4O1xuYDtcblxuZXhwb3J0IGNvbnN0IFRvcFN0cm9rZSA9IHN0eWxlZCggSG9yaXpvbnRhbFN0cm9rZSApYFxuXHR0b3A6IDA7XG5gO1xuXG5leHBvcnQgY29uc3QgUmlnaHRTdHJva2UgPSBzdHlsZWQoIFZlcnRpY2FsU3Ryb2tlIClgXG5cdHJpZ2h0OiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IEJvdHRvbVN0cm9rZSA9IHN0eWxlZCggSG9yaXpvbnRhbFN0cm9rZSApYFxuXHRib3R0b206IDA7XG5gO1xuXG5leHBvcnQgY29uc3QgTGVmdFN0cm9rZSA9IHN0eWxlZCggVmVydGljYWxTdHJva2UgKWBcblx0bGVmdDogMDtcbmA7XG4iXX0= */");
  };
  var Stroke = /* @__PURE__ */ createStyled("span", false ? {
    target: "e1j5nr4z6"
  } : {
    target: "e1j5nr4z6",
    label: "Stroke"
  })("box-sizing:border-box;display:block;pointer-events:none;position:absolute;", strokeFocus, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJveC1jb250cm9sLWljb24tc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQThCMEIiLCJmaWxlIjoiYm94LWNvbnRyb2wtaWNvbi1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmV4cG9ydCBjb25zdCBSb290ID0gc3R5bGVkLnNwYW5gXG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHR3aWR0aDogMjRweDtcblx0aGVpZ2h0OiAyNHB4O1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHBhZGRpbmc6IDRweDtcbmA7XG5cbmV4cG9ydCBjb25zdCBWaWV3Ym94ID0gc3R5bGVkLnNwYW5gXG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHdpZHRoOiAxMDAlO1xuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuXG5jb25zdCBzdHJva2VGb2N1cyA9ICggeyBpc0ZvY3VzZWQgfTogeyBpc0ZvY3VzZWQ6IGJvb2xlYW4gfSApID0+IHtcblx0cmV0dXJuIGNzcygge1xuXHRcdGJhY2tncm91bmRDb2xvcjogJ2N1cnJlbnRDb2xvcicsXG5cdFx0b3BhY2l0eTogaXNGb2N1c2VkID8gMSA6IDAuMyxcblx0fSApO1xufTtcblxuY29uc3QgU3Ryb2tlID0gc3R5bGVkLnNwYW5gXG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHQkeyBzdHJva2VGb2N1cyB9O1xuYDtcblxuY29uc3QgVmVydGljYWxTdHJva2UgPSBzdHlsZWQoIFN0cm9rZSApYFxuXHRib3R0b206IDNweDtcblx0dG9wOiAzcHg7XG5cdHdpZHRoOiAycHg7XG5gO1xuXG5jb25zdCBIb3Jpem9udGFsU3Ryb2tlID0gc3R5bGVkKCBTdHJva2UgKWBcblx0aGVpZ2h0OiAycHg7XG5cdGxlZnQ6IDNweDtcblx0cmlnaHQ6IDNweDtcbmA7XG5cbmV4cG9ydCBjb25zdCBUb3BTdHJva2UgPSBzdHlsZWQoIEhvcml6b250YWxTdHJva2UgKWBcblx0dG9wOiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IFJpZ2h0U3Ryb2tlID0gc3R5bGVkKCBWZXJ0aWNhbFN0cm9rZSApYFxuXHRyaWdodDogMDtcbmA7XG5cbmV4cG9ydCBjb25zdCBCb3R0b21TdHJva2UgPSBzdHlsZWQoIEhvcml6b250YWxTdHJva2UgKWBcblx0Ym90dG9tOiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IExlZnRTdHJva2UgPSBzdHlsZWQoIFZlcnRpY2FsU3Ryb2tlIClgXG5cdGxlZnQ6IDA7XG5gO1xuIl19 */"));
  var VerticalStroke = /* @__PURE__ */ createStyled(Stroke, false ? {
    target: "e1j5nr4z5"
  } : {
    target: "e1j5nr4z5",
    label: "VerticalStroke"
  })(false ? {
    name: "1k2w39q",
    styles: "bottom:3px;top:3px;width:2px"
  } : {
    name: "1k2w39q",
    styles: "bottom:3px;top:3px;width:2px/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJveC1jb250cm9sLWljb24tc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXNDdUMiLCJmaWxlIjoiYm94LWNvbnRyb2wtaWNvbi1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmV4cG9ydCBjb25zdCBSb290ID0gc3R5bGVkLnNwYW5gXG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHR3aWR0aDogMjRweDtcblx0aGVpZ2h0OiAyNHB4O1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHBhZGRpbmc6IDRweDtcbmA7XG5cbmV4cG9ydCBjb25zdCBWaWV3Ym94ID0gc3R5bGVkLnNwYW5gXG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHdpZHRoOiAxMDAlO1xuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuXG5jb25zdCBzdHJva2VGb2N1cyA9ICggeyBpc0ZvY3VzZWQgfTogeyBpc0ZvY3VzZWQ6IGJvb2xlYW4gfSApID0+IHtcblx0cmV0dXJuIGNzcygge1xuXHRcdGJhY2tncm91bmRDb2xvcjogJ2N1cnJlbnRDb2xvcicsXG5cdFx0b3BhY2l0eTogaXNGb2N1c2VkID8gMSA6IDAuMyxcblx0fSApO1xufTtcblxuY29uc3QgU3Ryb2tlID0gc3R5bGVkLnNwYW5gXG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHQkeyBzdHJva2VGb2N1cyB9O1xuYDtcblxuY29uc3QgVmVydGljYWxTdHJva2UgPSBzdHlsZWQoIFN0cm9rZSApYFxuXHRib3R0b206IDNweDtcblx0dG9wOiAzcHg7XG5cdHdpZHRoOiAycHg7XG5gO1xuXG5jb25zdCBIb3Jpem9udGFsU3Ryb2tlID0gc3R5bGVkKCBTdHJva2UgKWBcblx0aGVpZ2h0OiAycHg7XG5cdGxlZnQ6IDNweDtcblx0cmlnaHQ6IDNweDtcbmA7XG5cbmV4cG9ydCBjb25zdCBUb3BTdHJva2UgPSBzdHlsZWQoIEhvcml6b250YWxTdHJva2UgKWBcblx0dG9wOiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IFJpZ2h0U3Ryb2tlID0gc3R5bGVkKCBWZXJ0aWNhbFN0cm9rZSApYFxuXHRyaWdodDogMDtcbmA7XG5cbmV4cG9ydCBjb25zdCBCb3R0b21TdHJva2UgPSBzdHlsZWQoIEhvcml6b250YWxTdHJva2UgKWBcblx0Ym90dG9tOiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IExlZnRTdHJva2UgPSBzdHlsZWQoIFZlcnRpY2FsU3Ryb2tlIClgXG5cdGxlZnQ6IDA7XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__15
  });
  var HorizontalStroke = /* @__PURE__ */ createStyled(Stroke, false ? {
    target: "e1j5nr4z4"
  } : {
    target: "e1j5nr4z4",
    label: "HorizontalStroke"
  })(false ? {
    name: "1q9b07k",
    styles: "height:2px;left:3px;right:3px"
  } : {
    name: "1q9b07k",
    styles: "height:2px;left:3px;right:3px/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJveC1jb250cm9sLWljb24tc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTRDeUMiLCJmaWxlIjoiYm94LWNvbnRyb2wtaWNvbi1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmV4cG9ydCBjb25zdCBSb290ID0gc3R5bGVkLnNwYW5gXG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHR3aWR0aDogMjRweDtcblx0aGVpZ2h0OiAyNHB4O1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHBhZGRpbmc6IDRweDtcbmA7XG5cbmV4cG9ydCBjb25zdCBWaWV3Ym94ID0gc3R5bGVkLnNwYW5gXG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHdpZHRoOiAxMDAlO1xuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuXG5jb25zdCBzdHJva2VGb2N1cyA9ICggeyBpc0ZvY3VzZWQgfTogeyBpc0ZvY3VzZWQ6IGJvb2xlYW4gfSApID0+IHtcblx0cmV0dXJuIGNzcygge1xuXHRcdGJhY2tncm91bmRDb2xvcjogJ2N1cnJlbnRDb2xvcicsXG5cdFx0b3BhY2l0eTogaXNGb2N1c2VkID8gMSA6IDAuMyxcblx0fSApO1xufTtcblxuY29uc3QgU3Ryb2tlID0gc3R5bGVkLnNwYW5gXG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHQkeyBzdHJva2VGb2N1cyB9O1xuYDtcblxuY29uc3QgVmVydGljYWxTdHJva2UgPSBzdHlsZWQoIFN0cm9rZSApYFxuXHRib3R0b206IDNweDtcblx0dG9wOiAzcHg7XG5cdHdpZHRoOiAycHg7XG5gO1xuXG5jb25zdCBIb3Jpem9udGFsU3Ryb2tlID0gc3R5bGVkKCBTdHJva2UgKWBcblx0aGVpZ2h0OiAycHg7XG5cdGxlZnQ6IDNweDtcblx0cmlnaHQ6IDNweDtcbmA7XG5cbmV4cG9ydCBjb25zdCBUb3BTdHJva2UgPSBzdHlsZWQoIEhvcml6b250YWxTdHJva2UgKWBcblx0dG9wOiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IFJpZ2h0U3Ryb2tlID0gc3R5bGVkKCBWZXJ0aWNhbFN0cm9rZSApYFxuXHRyaWdodDogMDtcbmA7XG5cbmV4cG9ydCBjb25zdCBCb3R0b21TdHJva2UgPSBzdHlsZWQoIEhvcml6b250YWxTdHJva2UgKWBcblx0Ym90dG9tOiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IExlZnRTdHJva2UgPSBzdHlsZWQoIFZlcnRpY2FsU3Ryb2tlIClgXG5cdGxlZnQ6IDA7XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__15
  });
  var TopStroke = /* @__PURE__ */ createStyled(HorizontalStroke, false ? {
    target: "e1j5nr4z3"
  } : {
    target: "e1j5nr4z3",
    label: "TopStroke"
  })(false ? {
    name: "abcix4",
    styles: "top:0"
  } : {
    name: "abcix4",
    styles: "top:0/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJveC1jb250cm9sLWljb24tc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWtEbUQiLCJmaWxlIjoiYm94LWNvbnRyb2wtaWNvbi1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmV4cG9ydCBjb25zdCBSb290ID0gc3R5bGVkLnNwYW5gXG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHR3aWR0aDogMjRweDtcblx0aGVpZ2h0OiAyNHB4O1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHBhZGRpbmc6IDRweDtcbmA7XG5cbmV4cG9ydCBjb25zdCBWaWV3Ym94ID0gc3R5bGVkLnNwYW5gXG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHdpZHRoOiAxMDAlO1xuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuXG5jb25zdCBzdHJva2VGb2N1cyA9ICggeyBpc0ZvY3VzZWQgfTogeyBpc0ZvY3VzZWQ6IGJvb2xlYW4gfSApID0+IHtcblx0cmV0dXJuIGNzcygge1xuXHRcdGJhY2tncm91bmRDb2xvcjogJ2N1cnJlbnRDb2xvcicsXG5cdFx0b3BhY2l0eTogaXNGb2N1c2VkID8gMSA6IDAuMyxcblx0fSApO1xufTtcblxuY29uc3QgU3Ryb2tlID0gc3R5bGVkLnNwYW5gXG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHQkeyBzdHJva2VGb2N1cyB9O1xuYDtcblxuY29uc3QgVmVydGljYWxTdHJva2UgPSBzdHlsZWQoIFN0cm9rZSApYFxuXHRib3R0b206IDNweDtcblx0dG9wOiAzcHg7XG5cdHdpZHRoOiAycHg7XG5gO1xuXG5jb25zdCBIb3Jpem9udGFsU3Ryb2tlID0gc3R5bGVkKCBTdHJva2UgKWBcblx0aGVpZ2h0OiAycHg7XG5cdGxlZnQ6IDNweDtcblx0cmlnaHQ6IDNweDtcbmA7XG5cbmV4cG9ydCBjb25zdCBUb3BTdHJva2UgPSBzdHlsZWQoIEhvcml6b250YWxTdHJva2UgKWBcblx0dG9wOiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IFJpZ2h0U3Ryb2tlID0gc3R5bGVkKCBWZXJ0aWNhbFN0cm9rZSApYFxuXHRyaWdodDogMDtcbmA7XG5cbmV4cG9ydCBjb25zdCBCb3R0b21TdHJva2UgPSBzdHlsZWQoIEhvcml6b250YWxTdHJva2UgKWBcblx0Ym90dG9tOiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IExlZnRTdHJva2UgPSBzdHlsZWQoIFZlcnRpY2FsU3Ryb2tlIClgXG5cdGxlZnQ6IDA7XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__15
  });
  var RightStroke = /* @__PURE__ */ createStyled(VerticalStroke, false ? {
    target: "e1j5nr4z2"
  } : {
    target: "e1j5nr4z2",
    label: "RightStroke"
  })(false ? {
    name: "1wf8jf",
    styles: "right:0"
  } : {
    name: "1wf8jf",
    styles: "right:0/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJveC1jb250cm9sLWljb24tc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXNEbUQiLCJmaWxlIjoiYm94LWNvbnRyb2wtaWNvbi1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmV4cG9ydCBjb25zdCBSb290ID0gc3R5bGVkLnNwYW5gXG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHR3aWR0aDogMjRweDtcblx0aGVpZ2h0OiAyNHB4O1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHBhZGRpbmc6IDRweDtcbmA7XG5cbmV4cG9ydCBjb25zdCBWaWV3Ym94ID0gc3R5bGVkLnNwYW5gXG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHdpZHRoOiAxMDAlO1xuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuXG5jb25zdCBzdHJva2VGb2N1cyA9ICggeyBpc0ZvY3VzZWQgfTogeyBpc0ZvY3VzZWQ6IGJvb2xlYW4gfSApID0+IHtcblx0cmV0dXJuIGNzcygge1xuXHRcdGJhY2tncm91bmRDb2xvcjogJ2N1cnJlbnRDb2xvcicsXG5cdFx0b3BhY2l0eTogaXNGb2N1c2VkID8gMSA6IDAuMyxcblx0fSApO1xufTtcblxuY29uc3QgU3Ryb2tlID0gc3R5bGVkLnNwYW5gXG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHQkeyBzdHJva2VGb2N1cyB9O1xuYDtcblxuY29uc3QgVmVydGljYWxTdHJva2UgPSBzdHlsZWQoIFN0cm9rZSApYFxuXHRib3R0b206IDNweDtcblx0dG9wOiAzcHg7XG5cdHdpZHRoOiAycHg7XG5gO1xuXG5jb25zdCBIb3Jpem9udGFsU3Ryb2tlID0gc3R5bGVkKCBTdHJva2UgKWBcblx0aGVpZ2h0OiAycHg7XG5cdGxlZnQ6IDNweDtcblx0cmlnaHQ6IDNweDtcbmA7XG5cbmV4cG9ydCBjb25zdCBUb3BTdHJva2UgPSBzdHlsZWQoIEhvcml6b250YWxTdHJva2UgKWBcblx0dG9wOiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IFJpZ2h0U3Ryb2tlID0gc3R5bGVkKCBWZXJ0aWNhbFN0cm9rZSApYFxuXHRyaWdodDogMDtcbmA7XG5cbmV4cG9ydCBjb25zdCBCb3R0b21TdHJva2UgPSBzdHlsZWQoIEhvcml6b250YWxTdHJva2UgKWBcblx0Ym90dG9tOiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IExlZnRTdHJva2UgPSBzdHlsZWQoIFZlcnRpY2FsU3Ryb2tlIClgXG5cdGxlZnQ6IDA7XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__15
  });
  var BottomStroke = /* @__PURE__ */ createStyled(HorizontalStroke, false ? {
    target: "e1j5nr4z1"
  } : {
    target: "e1j5nr4z1",
    label: "BottomStroke"
  })(false ? {
    name: "8tapst",
    styles: "bottom:0"
  } : {
    name: "8tapst",
    styles: "bottom:0/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJveC1jb250cm9sLWljb24tc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTBEc0QiLCJmaWxlIjoiYm94LWNvbnRyb2wtaWNvbi1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmV4cG9ydCBjb25zdCBSb290ID0gc3R5bGVkLnNwYW5gXG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHR3aWR0aDogMjRweDtcblx0aGVpZ2h0OiAyNHB4O1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHBhZGRpbmc6IDRweDtcbmA7XG5cbmV4cG9ydCBjb25zdCBWaWV3Ym94ID0gc3R5bGVkLnNwYW5gXG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHdpZHRoOiAxMDAlO1xuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuXG5jb25zdCBzdHJva2VGb2N1cyA9ICggeyBpc0ZvY3VzZWQgfTogeyBpc0ZvY3VzZWQ6IGJvb2xlYW4gfSApID0+IHtcblx0cmV0dXJuIGNzcygge1xuXHRcdGJhY2tncm91bmRDb2xvcjogJ2N1cnJlbnRDb2xvcicsXG5cdFx0b3BhY2l0eTogaXNGb2N1c2VkID8gMSA6IDAuMyxcblx0fSApO1xufTtcblxuY29uc3QgU3Ryb2tlID0gc3R5bGVkLnNwYW5gXG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHQkeyBzdHJva2VGb2N1cyB9O1xuYDtcblxuY29uc3QgVmVydGljYWxTdHJva2UgPSBzdHlsZWQoIFN0cm9rZSApYFxuXHRib3R0b206IDNweDtcblx0dG9wOiAzcHg7XG5cdHdpZHRoOiAycHg7XG5gO1xuXG5jb25zdCBIb3Jpem9udGFsU3Ryb2tlID0gc3R5bGVkKCBTdHJva2UgKWBcblx0aGVpZ2h0OiAycHg7XG5cdGxlZnQ6IDNweDtcblx0cmlnaHQ6IDNweDtcbmA7XG5cbmV4cG9ydCBjb25zdCBUb3BTdHJva2UgPSBzdHlsZWQoIEhvcml6b250YWxTdHJva2UgKWBcblx0dG9wOiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IFJpZ2h0U3Ryb2tlID0gc3R5bGVkKCBWZXJ0aWNhbFN0cm9rZSApYFxuXHRyaWdodDogMDtcbmA7XG5cbmV4cG9ydCBjb25zdCBCb3R0b21TdHJva2UgPSBzdHlsZWQoIEhvcml6b250YWxTdHJva2UgKWBcblx0Ym90dG9tOiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IExlZnRTdHJva2UgPSBzdHlsZWQoIFZlcnRpY2FsU3Ryb2tlIClgXG5cdGxlZnQ6IDA7XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__15
  });
  var LeftStroke = /* @__PURE__ */ createStyled(VerticalStroke, false ? {
    target: "e1j5nr4z0"
  } : {
    target: "e1j5nr4z0",
    label: "LeftStroke"
  })(false ? {
    name: "1ode3cm",
    styles: "left:0"
  } : {
    name: "1ode3cm",
    styles: "left:0/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJveC1jb250cm9sLWljb24tc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQThEa0QiLCJmaWxlIjoiYm94LWNvbnRyb2wtaWNvbi1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmV4cG9ydCBjb25zdCBSb290ID0gc3R5bGVkLnNwYW5gXG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHR3aWR0aDogMjRweDtcblx0aGVpZ2h0OiAyNHB4O1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHBhZGRpbmc6IDRweDtcbmA7XG5cbmV4cG9ydCBjb25zdCBWaWV3Ym94ID0gc3R5bGVkLnNwYW5gXG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdHdpZHRoOiAxMDAlO1xuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuXG5jb25zdCBzdHJva2VGb2N1cyA9ICggeyBpc0ZvY3VzZWQgfTogeyBpc0ZvY3VzZWQ6IGJvb2xlYW4gfSApID0+IHtcblx0cmV0dXJuIGNzcygge1xuXHRcdGJhY2tncm91bmRDb2xvcjogJ2N1cnJlbnRDb2xvcicsXG5cdFx0b3BhY2l0eTogaXNGb2N1c2VkID8gMSA6IDAuMyxcblx0fSApO1xufTtcblxuY29uc3QgU3Ryb2tlID0gc3R5bGVkLnNwYW5gXG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHQkeyBzdHJva2VGb2N1cyB9O1xuYDtcblxuY29uc3QgVmVydGljYWxTdHJva2UgPSBzdHlsZWQoIFN0cm9rZSApYFxuXHRib3R0b206IDNweDtcblx0dG9wOiAzcHg7XG5cdHdpZHRoOiAycHg7XG5gO1xuXG5jb25zdCBIb3Jpem9udGFsU3Ryb2tlID0gc3R5bGVkKCBTdHJva2UgKWBcblx0aGVpZ2h0OiAycHg7XG5cdGxlZnQ6IDNweDtcblx0cmlnaHQ6IDNweDtcbmA7XG5cbmV4cG9ydCBjb25zdCBUb3BTdHJva2UgPSBzdHlsZWQoIEhvcml6b250YWxTdHJva2UgKWBcblx0dG9wOiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IFJpZ2h0U3Ryb2tlID0gc3R5bGVkKCBWZXJ0aWNhbFN0cm9rZSApYFxuXHRyaWdodDogMDtcbmA7XG5cbmV4cG9ydCBjb25zdCBCb3R0b21TdHJva2UgPSBzdHlsZWQoIEhvcml6b250YWxTdHJva2UgKWBcblx0Ym90dG9tOiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IExlZnRTdHJva2UgPSBzdHlsZWQoIFZlcnRpY2FsU3Ryb2tlIClgXG5cdGxlZnQ6IDA7XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__15
  });

  // packages/components/build-module/box-control/icon.mjs
  var import_jsx_runtime154 = __toESM(require_jsx_runtime(), 1);
  var BASE_ICON_SIZE = 24;
  function BoxControlIcon({
    size: size3 = 24,
    side = "all",
    sides: sides3,
    ...props
  }) {
    const isSideDisabled = (value) => sides3?.length && !sides3.includes(value);
    const hasSide = (value) => {
      if (isSideDisabled(value)) {
        return false;
      }
      return side === "all" || side === value;
    };
    const top = hasSide("top") || hasSide("vertical");
    const right = hasSide("right") || hasSide("horizontal");
    const bottom = hasSide("bottom") || hasSide("vertical");
    const left = hasSide("left") || hasSide("horizontal");
    const scale2 = size3 / BASE_ICON_SIZE;
    return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(Root3, {
      style: {
        transform: `scale(${scale2})`
      },
      ...props,
      children: /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(Viewbox, {
        children: [/* @__PURE__ */ (0, import_jsx_runtime154.jsx)(TopStroke, {
          isFocused: top
        }), /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(RightStroke, {
          isFocused: right
        }), /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(BottomStroke, {
          isFocused: bottom
        }), /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(LeftStroke, {
          isFocused: left
        })]
      })
    });
  }

  // packages/components/build-module/box-control/styles/box-control-styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__16() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var StyledUnitControl = /* @__PURE__ */ createStyled(unit_control_default, false ? {
    target: "e1jovhle5"
  } : {
    target: "e1jovhle5",
    label: "StyledUnitControl"
  })(false ? {
    name: "1ejyr19",
    styles: "max-width:90px"
  } : {
    name: "1ejyr19",
    styles: "max-width:90px/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJveC1jb250cm9sLXN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFjc0QiLCJmaWxlIjoiYm94LWNvbnRyb2wtc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IEJveENvbnRyb2xJY29uIGZyb20gJy4uL2ljb24nO1xuaW1wb3J0IEJ1dHRvbiBmcm9tICcuLi8uLi9idXR0b24nO1xuaW1wb3J0IHsgSFN0YWNrIH0gZnJvbSAnLi4vLi4vaC1zdGFjayc7XG5pbXBvcnQgUmFuZ2VDb250cm9sIGZyb20gJy4uLy4uL3JhbmdlLWNvbnRyb2wnO1xuaW1wb3J0IFVuaXRDb250cm9sIGZyb20gJy4uLy4uL3VuaXQtY29udHJvbCc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuZXhwb3J0IGNvbnN0IFN0eWxlZFVuaXRDb250cm9sID0gc3R5bGVkKCBVbml0Q29udHJvbCApYFxuXHRtYXgtd2lkdGg6IDkwcHg7XG5gO1xuXG5leHBvcnQgY29uc3QgSW5wdXRXcmFwcGVyID0gc3R5bGVkKCBIU3RhY2sgKWBcblx0Z3JpZC1jb2x1bW46IDEgLyBzcGFuIDM7XG5gO1xuXG5leHBvcnQgY29uc3QgUmVzZXRCdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHRncmlkLWFyZWE6IDEgLyAyO1xuXHRqdXN0aWZ5LXNlbGY6IGVuZDtcbmA7XG5cbmV4cG9ydCBjb25zdCBMaW5rZWRCdXR0b25XcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0Z3JpZC1hcmVhOiAxIC8gMztcblx0anVzdGlmeS1zZWxmOiBlbmQ7XG5gO1xuXG5leHBvcnQgY29uc3QgRmxleGVkQm94Q29udHJvbEljb24gPSBzdHlsZWQoIEJveENvbnRyb2xJY29uIClgXG5cdGZsZXg6IDAgMCBhdXRvO1xuYDtcblxuZXhwb3J0IGNvbnN0IEZsZXhlZFJhbmdlQ29udHJvbCA9IHN0eWxlZCggUmFuZ2VDb250cm9sIClgXG5cdHdpZHRoOiAxMDAlO1xuXHRtYXJnaW4taW5saW5lLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__16
  });
  var InputWrapper = /* @__PURE__ */ createStyled(component_default9, false ? {
    target: "e1jovhle4"
  } : {
    target: "e1jovhle4",
    label: "InputWrapper"
  })(false ? {
    name: "1j1lmoi",
    styles: "grid-column:1/span 3"
  } : {
    name: "1j1lmoi",
    styles: "grid-column:1/span 3/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJveC1jb250cm9sLXN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrQjRDIiwiZmlsZSI6ImJveC1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBCb3hDb250cm9sSWNvbiBmcm9tICcuLi9pY29uJztcbmltcG9ydCBCdXR0b24gZnJvbSAnLi4vLi4vYnV0dG9uJztcbmltcG9ydCB7IEhTdGFjayB9IGZyb20gJy4uLy4uL2gtc3RhY2snO1xuaW1wb3J0IFJhbmdlQ29udHJvbCBmcm9tICcuLi8uLi9yYW5nZS1jb250cm9sJztcbmltcG9ydCBVbml0Q29udHJvbCBmcm9tICcuLi8uLi91bml0LWNvbnRyb2wnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi8uLi91dGlscy9zcGFjZSc7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRVbml0Q29udHJvbCA9IHN0eWxlZCggVW5pdENvbnRyb2wgKWBcblx0bWF4LXdpZHRoOiA5MHB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IElucHV0V3JhcHBlciA9IHN0eWxlZCggSFN0YWNrIClgXG5cdGdyaWQtY29sdW1uOiAxIC8gc3BhbiAzO1xuYDtcblxuZXhwb3J0IGNvbnN0IFJlc2V0QnV0dG9uID0gc3R5bGVkKCBCdXR0b24gKWBcblx0Z3JpZC1hcmVhOiAxIC8gMjtcblx0anVzdGlmeS1zZWxmOiBlbmQ7XG5gO1xuXG5leHBvcnQgY29uc3QgTGlua2VkQnV0dG9uV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdGdyaWQtYXJlYTogMSAvIDM7XG5cdGp1c3RpZnktc2VsZjogZW5kO1xuYDtcblxuZXhwb3J0IGNvbnN0IEZsZXhlZEJveENvbnRyb2xJY29uID0gc3R5bGVkKCBCb3hDb250cm9sSWNvbiApYFxuXHRmbGV4OiAwIDAgYXV0bztcbmA7XG5cbmV4cG9ydCBjb25zdCBGbGV4ZWRSYW5nZUNvbnRyb2wgPSBzdHlsZWQoIFJhbmdlQ29udHJvbCApYFxuXHR3aWR0aDogMTAwJTtcblx0bWFyZ2luLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG4iXX0= */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__16
  });
  var ResetButton = /* @__PURE__ */ createStyled(button_default, false ? {
    target: "e1jovhle3"
  } : {
    target: "e1jovhle3",
    label: "ResetButton"
  })(false ? {
    name: "tkya7b",
    styles: "grid-area:1/2;justify-self:end"
  } : {
    name: "tkya7b",
    styles: "grid-area:1/2;justify-self:end/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJveC1jb250cm9sLXN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQjJDIiwiZmlsZSI6ImJveC1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBCb3hDb250cm9sSWNvbiBmcm9tICcuLi9pY29uJztcbmltcG9ydCBCdXR0b24gZnJvbSAnLi4vLi4vYnV0dG9uJztcbmltcG9ydCB7IEhTdGFjayB9IGZyb20gJy4uLy4uL2gtc3RhY2snO1xuaW1wb3J0IFJhbmdlQ29udHJvbCBmcm9tICcuLi8uLi9yYW5nZS1jb250cm9sJztcbmltcG9ydCBVbml0Q29udHJvbCBmcm9tICcuLi8uLi91bml0LWNvbnRyb2wnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi8uLi91dGlscy9zcGFjZSc7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRVbml0Q29udHJvbCA9IHN0eWxlZCggVW5pdENvbnRyb2wgKWBcblx0bWF4LXdpZHRoOiA5MHB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IElucHV0V3JhcHBlciA9IHN0eWxlZCggSFN0YWNrIClgXG5cdGdyaWQtY29sdW1uOiAxIC8gc3BhbiAzO1xuYDtcblxuZXhwb3J0IGNvbnN0IFJlc2V0QnV0dG9uID0gc3R5bGVkKCBCdXR0b24gKWBcblx0Z3JpZC1hcmVhOiAxIC8gMjtcblx0anVzdGlmeS1zZWxmOiBlbmQ7XG5gO1xuXG5leHBvcnQgY29uc3QgTGlua2VkQnV0dG9uV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdGdyaWQtYXJlYTogMSAvIDM7XG5cdGp1c3RpZnktc2VsZjogZW5kO1xuYDtcblxuZXhwb3J0IGNvbnN0IEZsZXhlZEJveENvbnRyb2xJY29uID0gc3R5bGVkKCBCb3hDb250cm9sSWNvbiApYFxuXHRmbGV4OiAwIDAgYXV0bztcbmA7XG5cbmV4cG9ydCBjb25zdCBGbGV4ZWRSYW5nZUNvbnRyb2wgPSBzdHlsZWQoIFJhbmdlQ29udHJvbCApYFxuXHR3aWR0aDogMTAwJTtcblx0bWFyZ2luLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG4iXX0= */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__16
  });
  var LinkedButtonWrapper = /* @__PURE__ */ createStyled("div", false ? {
    target: "e1jovhle2"
  } : {
    target: "e1jovhle2",
    label: "LinkedButtonWrapper"
  })(false ? {
    name: "1dfa8al",
    styles: "grid-area:1/3;justify-self:end"
  } : {
    name: "1dfa8al",
    styles: "grid-area:1/3;justify-self:end/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJveC1jb250cm9sLXN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyQjZDIiwiZmlsZSI6ImJveC1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBCb3hDb250cm9sSWNvbiBmcm9tICcuLi9pY29uJztcbmltcG9ydCBCdXR0b24gZnJvbSAnLi4vLi4vYnV0dG9uJztcbmltcG9ydCB7IEhTdGFjayB9IGZyb20gJy4uLy4uL2gtc3RhY2snO1xuaW1wb3J0IFJhbmdlQ29udHJvbCBmcm9tICcuLi8uLi9yYW5nZS1jb250cm9sJztcbmltcG9ydCBVbml0Q29udHJvbCBmcm9tICcuLi8uLi91bml0LWNvbnRyb2wnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi8uLi91dGlscy9zcGFjZSc7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRVbml0Q29udHJvbCA9IHN0eWxlZCggVW5pdENvbnRyb2wgKWBcblx0bWF4LXdpZHRoOiA5MHB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IElucHV0V3JhcHBlciA9IHN0eWxlZCggSFN0YWNrIClgXG5cdGdyaWQtY29sdW1uOiAxIC8gc3BhbiAzO1xuYDtcblxuZXhwb3J0IGNvbnN0IFJlc2V0QnV0dG9uID0gc3R5bGVkKCBCdXR0b24gKWBcblx0Z3JpZC1hcmVhOiAxIC8gMjtcblx0anVzdGlmeS1zZWxmOiBlbmQ7XG5gO1xuXG5leHBvcnQgY29uc3QgTGlua2VkQnV0dG9uV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdGdyaWQtYXJlYTogMSAvIDM7XG5cdGp1c3RpZnktc2VsZjogZW5kO1xuYDtcblxuZXhwb3J0IGNvbnN0IEZsZXhlZEJveENvbnRyb2xJY29uID0gc3R5bGVkKCBCb3hDb250cm9sSWNvbiApYFxuXHRmbGV4OiAwIDAgYXV0bztcbmA7XG5cbmV4cG9ydCBjb25zdCBGbGV4ZWRSYW5nZUNvbnRyb2wgPSBzdHlsZWQoIFJhbmdlQ29udHJvbCApYFxuXHR3aWR0aDogMTAwJTtcblx0bWFyZ2luLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG4iXX0= */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__16
  });
  var FlexedBoxControlIcon = /* @__PURE__ */ createStyled(BoxControlIcon, false ? {
    target: "e1jovhle1"
  } : {
    target: "e1jovhle1",
    label: "FlexedBoxControlIcon"
  })(false ? {
    name: "ou8xsw",
    styles: "flex:0 0 auto"
  } : {
    name: "ou8xsw",
    styles: "flex:0 0 auto/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJveC1jb250cm9sLXN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnQzREIiwiZmlsZSI6ImJveC1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBCb3hDb250cm9sSWNvbiBmcm9tICcuLi9pY29uJztcbmltcG9ydCBCdXR0b24gZnJvbSAnLi4vLi4vYnV0dG9uJztcbmltcG9ydCB7IEhTdGFjayB9IGZyb20gJy4uLy4uL2gtc3RhY2snO1xuaW1wb3J0IFJhbmdlQ29udHJvbCBmcm9tICcuLi8uLi9yYW5nZS1jb250cm9sJztcbmltcG9ydCBVbml0Q29udHJvbCBmcm9tICcuLi8uLi91bml0LWNvbnRyb2wnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi8uLi91dGlscy9zcGFjZSc7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRVbml0Q29udHJvbCA9IHN0eWxlZCggVW5pdENvbnRyb2wgKWBcblx0bWF4LXdpZHRoOiA5MHB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IElucHV0V3JhcHBlciA9IHN0eWxlZCggSFN0YWNrIClgXG5cdGdyaWQtY29sdW1uOiAxIC8gc3BhbiAzO1xuYDtcblxuZXhwb3J0IGNvbnN0IFJlc2V0QnV0dG9uID0gc3R5bGVkKCBCdXR0b24gKWBcblx0Z3JpZC1hcmVhOiAxIC8gMjtcblx0anVzdGlmeS1zZWxmOiBlbmQ7XG5gO1xuXG5leHBvcnQgY29uc3QgTGlua2VkQnV0dG9uV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdGdyaWQtYXJlYTogMSAvIDM7XG5cdGp1c3RpZnktc2VsZjogZW5kO1xuYDtcblxuZXhwb3J0IGNvbnN0IEZsZXhlZEJveENvbnRyb2xJY29uID0gc3R5bGVkKCBCb3hDb250cm9sSWNvbiApYFxuXHRmbGV4OiAwIDAgYXV0bztcbmA7XG5cbmV4cG9ydCBjb25zdCBGbGV4ZWRSYW5nZUNvbnRyb2wgPSBzdHlsZWQoIFJhbmdlQ29udHJvbCApYFxuXHR3aWR0aDogMTAwJTtcblx0bWFyZ2luLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG4iXX0= */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__16
  });
  var FlexedRangeControl = /* @__PURE__ */ createStyled(range_control_default, false ? {
    target: "e1jovhle0"
  } : {
    target: "e1jovhle0",
    label: "FlexedRangeControl"
  })("width:100%;margin-inline-end:", space(2), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJveC1jb250cm9sLXN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvQ3dEIiwiZmlsZSI6ImJveC1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBCb3hDb250cm9sSWNvbiBmcm9tICcuLi9pY29uJztcbmltcG9ydCBCdXR0b24gZnJvbSAnLi4vLi4vYnV0dG9uJztcbmltcG9ydCB7IEhTdGFjayB9IGZyb20gJy4uLy4uL2gtc3RhY2snO1xuaW1wb3J0IFJhbmdlQ29udHJvbCBmcm9tICcuLi8uLi9yYW5nZS1jb250cm9sJztcbmltcG9ydCBVbml0Q29udHJvbCBmcm9tICcuLi8uLi91bml0LWNvbnRyb2wnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi8uLi91dGlscy9zcGFjZSc7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRVbml0Q29udHJvbCA9IHN0eWxlZCggVW5pdENvbnRyb2wgKWBcblx0bWF4LXdpZHRoOiA5MHB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IElucHV0V3JhcHBlciA9IHN0eWxlZCggSFN0YWNrIClgXG5cdGdyaWQtY29sdW1uOiAxIC8gc3BhbiAzO1xuYDtcblxuZXhwb3J0IGNvbnN0IFJlc2V0QnV0dG9uID0gc3R5bGVkKCBCdXR0b24gKWBcblx0Z3JpZC1hcmVhOiAxIC8gMjtcblx0anVzdGlmeS1zZWxmOiBlbmQ7XG5gO1xuXG5leHBvcnQgY29uc3QgTGlua2VkQnV0dG9uV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdGdyaWQtYXJlYTogMSAvIDM7XG5cdGp1c3RpZnktc2VsZjogZW5kO1xuYDtcblxuZXhwb3J0IGNvbnN0IEZsZXhlZEJveENvbnRyb2xJY29uID0gc3R5bGVkKCBCb3hDb250cm9sSWNvbiApYFxuXHRmbGV4OiAwIDAgYXV0bztcbmA7XG5cbmV4cG9ydCBjb25zdCBGbGV4ZWRSYW5nZUNvbnRyb2wgPSBzdHlsZWQoIFJhbmdlQ29udHJvbCApYFxuXHR3aWR0aDogMTAwJTtcblx0bWFyZ2luLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG4iXX0= */"));

  // packages/components/build-module/box-control/input-control.mjs
  var import_jsx_runtime155 = __toESM(require_jsx_runtime(), 1);
  var noop8 = () => {
  };
  function getSidesToModify(side, sides3, isAlt) {
    const allowedSides = getAllowedSides(sides3);
    let modifiedSides = [];
    switch (side) {
      case "all":
        modifiedSides = ["top", "bottom", "left", "right"];
        break;
      case "horizontal":
        modifiedSides = ["left", "right"];
        break;
      case "vertical":
        modifiedSides = ["top", "bottom"];
        break;
      default:
        modifiedSides = [side];
    }
    if (isAlt) {
      switch (side) {
        case "top":
          modifiedSides.push("bottom");
          break;
        case "bottom":
          modifiedSides.push("top");
          break;
        case "left":
          modifiedSides.push("left");
          break;
        case "right":
          modifiedSides.push("right");
          break;
      }
    }
    return modifiedSides.filter((s3) => allowedSides.has(s3));
  }
  function BoxInputControl({
    __next40pxDefaultSize,
    onChange = noop8,
    onFocus = noop8,
    values,
    selectedUnits,
    setSelectedUnits,
    sides: sides3,
    side,
    min: min3 = 0,
    presets,
    presetKey,
    ...props
  }) {
    const defaultValuesToModify = getSidesToModify(side, sides3);
    const handleOnFocus = (event) => {
      onFocus(event, {
        side
      });
    };
    const handleOnChange = (nextValues) => {
      onChange(nextValues);
    };
    const handleRawOnValueChange = (next2) => {
      const nextValues = {
        ...values
      };
      defaultValuesToModify.forEach((modifiedSide) => {
        nextValues[modifiedSide] = next2;
      });
      handleOnChange(nextValues);
    };
    const handleOnValueChange = (next2, extra) => {
      const nextValues = {
        ...values
      };
      const isNumeric = next2 !== void 0 && !isNaN(parseFloat(next2));
      const nextValue = isNumeric ? next2 : void 0;
      const modifiedSides = getSidesToModify(
        side,
        sides3,
        /**
         * Supports changing pair sides. For example, holding the ALT key
         * when changing the TOP will also update BOTTOM.
         */
        // @ts-expect-error - TODO: event.altKey is only present when the change event was
        // triggered by a keyboard event. Should this feature be implemented differently so
        // it also works with drag events?
        !!extra?.event.altKey
      );
      modifiedSides.forEach((modifiedSide) => {
        nextValues[modifiedSide] = nextValue;
      });
      handleOnChange(nextValues);
    };
    const handleOnUnitChange = (next2) => {
      const newUnits = {
        ...selectedUnits
      };
      defaultValuesToModify.forEach((modifiedSide) => {
        newUnits[modifiedSide] = next2;
      });
      setSelectedUnits(newUnits);
    };
    const mergedValue = getMergedValue(values, defaultValuesToModify);
    const hasValues = isValuesDefined(values);
    const isMixed = hasValues && defaultValuesToModify.length > 1 && isValueMixed(values, defaultValuesToModify);
    const [parsedQuantity, parsedUnit] = parseQuantityAndUnitFromRawValue(mergedValue);
    const computedUnit = hasValues ? parsedUnit : selectedUnits[defaultValuesToModify[0]];
    const generatedId = (0, import_compose37.useInstanceId)(BoxInputControl, "box-control-input");
    const inputId = [generatedId, side].join("-");
    const isMixedUnit = defaultValuesToModify.length > 1 && mergedValue === void 0 && defaultValuesToModify.some((s3) => selectedUnits[s3] !== computedUnit);
    const usedValue = mergedValue === void 0 && computedUnit ? computedUnit : mergedValue;
    const mixedPlaceholder = isMixed || isMixedUnit ? (0, import_i18n28.__)("Mixed") : void 0;
    const hasPresets = presets && presets.length > 0 && presetKey;
    const hasPresetValue = hasPresets && mergedValue !== void 0 && !isMixed && isValuePreset(mergedValue, presetKey);
    const [showCustomValueControl, setShowCustomValueControl] = (0, import_element92.useState)(!hasPresets || !hasPresetValue && !isMixed && mergedValue !== void 0);
    const presetIndex = hasPresetValue ? getPresetIndexFromValue(mergedValue, presetKey, presets) : void 0;
    const marks = hasPresets ? [{
      value: 0,
      label: "",
      tooltip: (0, import_i18n28.__)("None")
    }, ...presets.map((preset, index2) => ({
      value: index2 + 1,
      label: "",
      tooltip: preset.name ?? preset.slug
    }))] : [];
    return /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)(InputWrapper, {
      expanded: true,
      children: [/* @__PURE__ */ (0, import_jsx_runtime155.jsx)(FlexedBoxControlIcon, {
        side,
        sides: sides3
      }), showCustomValueControl && /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)(import_jsx_runtime155.Fragment, {
        children: [/* @__PURE__ */ (0, import_jsx_runtime155.jsx)(tooltip_default, {
          placement: "top-end",
          text: LABELS[side],
          children: /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(StyledUnitControl, {
            ...props,
            min: min3,
            __shouldNotWarnDeprecated36pxSize: true,
            __next40pxDefaultSize,
            className: "component-box-control__unit-control",
            id: inputId,
            isPressEnterToChange: true,
            disableUnits: isMixed || isMixedUnit,
            value: usedValue,
            onChange: handleOnValueChange,
            onUnitChange: handleOnUnitChange,
            onFocus: handleOnFocus,
            label: LABELS[side],
            placeholder: mixedPlaceholder,
            hideLabelFromVision: true
          })
        }), /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(FlexedRangeControl, {
          __next40pxDefaultSize,
          __shouldNotWarnDeprecated36pxSize: true,
          "aria-controls": inputId,
          label: LABELS[side],
          hideLabelFromVision: true,
          onChange: (newValue) => {
            handleOnValueChange(newValue !== void 0 ? [newValue, computedUnit].join("") : void 0);
          },
          min: isFinite(min3) ? min3 : 0,
          max: CUSTOM_VALUE_SETTINGS[computedUnit ?? "px"]?.max ?? 10,
          step: CUSTOM_VALUE_SETTINGS[computedUnit ?? "px"]?.step ?? 0.1,
          value: parsedQuantity ?? 0,
          withInputField: false
        })]
      }), hasPresets && !showCustomValueControl && /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(FlexedRangeControl, {
        __next40pxDefaultSize: true,
        className: "spacing-sizes-control__range-control",
        value: presetIndex !== void 0 ? presetIndex + 1 : 0,
        onChange: (newIndex) => {
          const newValue = newIndex === 0 || newIndex === void 0 ? void 0 : getPresetValueFromIndex(newIndex - 1, presetKey, presets);
          handleRawOnValueChange(newValue);
        },
        withInputField: false,
        "aria-valuenow": presetIndex !== void 0 ? presetIndex + 1 : 0,
        "aria-valuetext": marks[presetIndex !== void 0 ? presetIndex + 1 : 0].tooltip,
        renderTooltipContent: (index2) => marks[!index2 ? 0 : index2].tooltip,
        min: 0,
        max: marks.length - 1,
        marks,
        label: LABELS[side],
        hideLabelFromVision: true
      }), hasPresets && /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(button_default, {
        label: showCustomValueControl ? (0, import_i18n28.__)("Use size preset") : (0, import_i18n28.__)("Set custom size"),
        icon: settings_default,
        onClick: () => {
          setShowCustomValueControl(!showCustomValueControl);
        },
        isPressed: showCustomValueControl,
        size: "small",
        iconSize: 24
      })]
    }, `box-control-${side}`);
  }

  // packages/components/build-module/box-control/linked-button.mjs
  var import_i18n29 = __toESM(require_i18n(), 1);
  var import_jsx_runtime156 = __toESM(require_jsx_runtime(), 1);
  function LinkedButton({
    isLinked,
    ...props
  }) {
    const label = isLinked ? (0, import_i18n29.__)("Unlink sides") : (0, import_i18n29.__)("Link sides");
    return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(button_default, {
      ...props,
      className: "component-box-control__linked-button",
      size: "small",
      icon: isLinked ? link_default : link_off_default,
      iconSize: 24,
      label
    });
  }

  // packages/components/build-module/box-control/index.mjs
  var import_jsx_runtime157 = __toESM(require_jsx_runtime(), 1);
  var defaultInputProps = {
    min: 0
  };
  var noop9 = () => {
  };
  function useUniqueId4(idProp) {
    const instanceId = (0, import_compose38.useInstanceId)(BoxControl, "inspector-box-control");
    return idProp || instanceId;
  }
  function BoxControl({
    __next40pxDefaultSize = false,
    id: idProp,
    inputProps = defaultInputProps,
    onChange = noop9,
    label = (0, import_i18n30.__)("Box Control"),
    values: valuesProp,
    units,
    sides: sides3,
    splitOnAxis = false,
    allowReset = true,
    resetValues = DEFAULT_VALUES,
    presets,
    presetKey,
    onMouseOver,
    onMouseOut
  }) {
    const [values, setValues] = use_controlled_state_default(valuesProp, {
      fallback: DEFAULT_VALUES
    });
    const inputValues = values || DEFAULT_VALUES;
    const hasInitialValue = isValuesDefined(valuesProp);
    const hasOneSide = sides3?.length === 1;
    const [isDirty, setIsDirty] = (0, import_element93.useState)(hasInitialValue);
    const [isLinked, setIsLinked] = (0, import_element93.useState)(!hasInitialValue || !isValueMixed(inputValues) || hasOneSide);
    const [side, setSide] = (0, import_element93.useState)(getInitialSide(isLinked, splitOnAxis));
    const [selectedUnits, setSelectedUnits] = (0, import_element93.useState)({
      top: parseQuantityAndUnitFromRawValue(valuesProp?.top)[1],
      right: parseQuantityAndUnitFromRawValue(valuesProp?.right)[1],
      bottom: parseQuantityAndUnitFromRawValue(valuesProp?.bottom)[1],
      left: parseQuantityAndUnitFromRawValue(valuesProp?.left)[1]
    });
    const id3 = useUniqueId4(idProp);
    const headingId = `${id3}-heading`;
    const toggleLinked = () => {
      setIsLinked(!isLinked);
      setSide(getInitialSide(!isLinked, splitOnAxis));
    };
    const handleOnFocus = (_event, {
      side: nextSide
    }) => {
      setSide(nextSide);
    };
    const handleOnChange = (nextValues) => {
      onChange(nextValues);
      setValues(nextValues);
      setIsDirty(true);
    };
    const handleOnReset = () => {
      onChange(resetValues);
      setValues(resetValues);
      setSelectedUnits(resetValues);
      setIsDirty(false);
    };
    const inputControlProps = {
      onMouseOver,
      onMouseOut,
      ...inputProps,
      onChange: handleOnChange,
      onFocus: handleOnFocus,
      isLinked,
      units,
      selectedUnits,
      setSelectedUnits,
      sides: sides3,
      values: inputValues,
      __next40pxDefaultSize,
      presets,
      presetKey
    };
    maybeWarnDeprecated36pxSize({
      componentName: "BoxControl",
      __next40pxDefaultSize,
      size: void 0
    });
    const sidesToRender = getAllowedSides(sides3);
    if (presets && !presetKey || !presets && presetKey) {
      const definedProp = presets ? "presets" : "presetKey";
      const missingProp = presets ? "presetKey" : "presets";
      true ? (0, import_warning5.default)(`wp.components.BoxControl: the '${missingProp}' prop is required when the '${definedProp}' prop is defined.`) : void 0;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)(component_default22, {
      id: id3,
      columns: 3,
      templateColumns: "1fr min-content min-content",
      role: "group",
      "aria-labelledby": headingId,
      children: [/* @__PURE__ */ (0, import_jsx_runtime157.jsx)(BaseControl.VisualLabel, {
        id: headingId,
        children: label
      }), isLinked && /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(InputWrapper, {
        children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(BoxInputControl, {
          side: "all",
          ...inputControlProps
        })
      }), !hasOneSide && /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(LinkedButtonWrapper, {
        children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(LinkedButton, {
          onClick: toggleLinked,
          isLinked
        })
      }), !isLinked && splitOnAxis && ["vertical", "horizontal"].map((axis) => (
        // Disable reason: the parent component is handling the __next40pxDefaultSize prop
        // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop
        /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(BoxInputControl, {
          side: axis,
          ...inputControlProps
        }, axis)
      )), !isLinked && !splitOnAxis && Array.from(sidesToRender).map((axis) => (
        // Disable reason: the parent component is handling the __next40pxDefaultSize prop
        // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop
        /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(BoxInputControl, {
          side: axis,
          ...inputControlProps
        }, axis)
      )), allowReset && /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(ResetButton, {
        className: "component-box-control__reset-button",
        variant: "secondary",
        size: "small",
        onClick: handleOnReset,
        disabled: !isDirty,
        children: (0, import_i18n30.__)("Reset")
      })]
    });
  }
  var box_control_default = BoxControl;

  // packages/components/build-module/button-group/index.mjs
  var import_element94 = __toESM(require_element(), 1);
  var import_deprecated10 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime158 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedButtonGroup(props, ref) {
    const {
      className: className2,
      __shouldNotWarnDeprecated,
      ...restProps
    } = props;
    const classes = clsx_default("components-button-group", className2);
    if (!__shouldNotWarnDeprecated) {
      (0, import_deprecated10.default)("wp.components.ButtonGroup", {
        since: "6.8",
        alternative: "wp.components.__experimentalToggleGroupControl"
      });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("div", {
      ref,
      role: "group",
      className: classes,
      ...restProps
    });
  }
  var ButtonGroup = (0, import_element94.forwardRef)(UnforwardedButtonGroup);
  ButtonGroup.displayName = "ButtonGroup";
  var button_group_default = ButtonGroup;

  // packages/components/build-module/card/card/component.mjs
  var import_element98 = __toESM(require_element(), 1);

  // packages/components/build-module/elevation/hook.mjs
  var import_element95 = __toESM(require_element(), 1);

  // packages/components/build-module/elevation/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__17() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var Elevation = false ? {
    name: "12ip69d",
    styles: "background:transparent;display:block;margin:0!important;pointer-events:none;position:absolute;will-change:box-shadow"
  } : {
    name: "1n58bsy-Elevation",
    styles: "background:transparent;display:block;margin:0!important;pointer-events:none;position:absolute;will-change:box-shadow;label:Elevation;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLNEIiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5leHBvcnQgY29uc3QgRWxldmF0aW9uID0gY3NzYFxuXHRiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudDtcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1hcmdpbjogMCAhaW1wb3J0YW50O1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR3aWxsLWNoYW5nZTogYm94LXNoYWRvdztcbmA7XG4iXX0= */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__17
  };

  // packages/components/build-module/elevation/hook.mjs
  function getBoxShadow(value) {
    const boxShadowColor = `rgba(0, 0, 0, ${value / 20})`;
    const boxShadow = `0 ${value}px ${value * 2}px 0
	${boxShadowColor}`;
    return boxShadow;
  }
  function useElevation(props) {
    const {
      active,
      borderRadius: borderRadius3 = "inherit",
      className: className2,
      focus: focus4,
      hover: hover2,
      isInteractive = false,
      offset: offset3 = 0,
      value = 0,
      ...otherProps
    } = useContextSystem(props, "Elevation");
    const cx3 = useCx();
    const classes = (0, import_element95.useMemo)(() => {
      let hoverValue = isValueDefined(hover2) ? hover2 : value * 2;
      let activeValue = isValueDefined(active) ? active : value / 2;
      if (!isInteractive) {
        hoverValue = isValueDefined(hover2) ? hover2 : void 0;
        activeValue = isValueDefined(active) ? active : void 0;
      }
      const transition = `box-shadow ${config_values_default.transitionDuration} ${config_values_default.transitionTimingFunction}`;
      const sx = {};
      sx.Base = /* @__PURE__ */ css({
        borderRadius: borderRadius3,
        bottom: offset3,
        boxShadow: getBoxShadow(value),
        opacity: config_values_default.elevationIntensity,
        left: offset3,
        right: offset3,
        top: offset3
      }, /* @__PURE__ */ css("@media not ( prefers-reduced-motion ){transition:", transition, ";}" + (false ? "" : ";label:sx-Base;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBK0VNIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFNlcmlhbGl6ZWRTdHlsZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogV29yZFByZXNzIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyB1c2VNZW1vIH0gZnJvbSAnQHdvcmRwcmVzcy9lbGVtZW50JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBXb3JkUHJlc3NDb21wb25lbnRQcm9wcyB9IGZyb20gJy4uL2NvbnRleHQnO1xuaW1wb3J0IHsgdXNlQ29udGV4dFN5c3RlbSB9IGZyb20gJy4uL2NvbnRleHQnO1xuaW1wb3J0ICogYXMgc3R5bGVzIGZyb20gJy4vc3R5bGVzJztcbmltcG9ydCB7IENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHVzZUN4IH0gZnJvbSAnLi4vdXRpbHMvaG9va3MvdXNlLWN4JztcbmltcG9ydCB7IGlzVmFsdWVEZWZpbmVkIH0gZnJvbSAnLi4vdXRpbHMvdmFsdWVzJztcbmltcG9ydCB0eXBlIHsgRWxldmF0aW9uUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuZXhwb3J0IGZ1bmN0aW9uIGdldEJveFNoYWRvdyggdmFsdWU6IG51bWJlciApIHtcblx0Y29uc3QgYm94U2hhZG93Q29sb3IgPSBgcmdiYSgwLCAwLCAwLCAkeyB2YWx1ZSAvIDIwIH0pYDtcblx0Y29uc3QgYm94U2hhZG93ID0gYDAgJHsgdmFsdWUgfXB4ICR7IHZhbHVlICogMiB9cHggMFxuXHQkeyBib3hTaGFkb3dDb2xvciB9YDtcblxuXHRyZXR1cm4gYm94U2hhZG93O1xufVxuXG5leHBvcnQgZnVuY3Rpb24gdXNlRWxldmF0aW9uKFxuXHRwcm9wczogV29yZFByZXNzQ29tcG9uZW50UHJvcHM8IEVsZXZhdGlvblByb3BzLCAnZGl2JyA+XG4pIHtcblx0Y29uc3Qge1xuXHRcdGFjdGl2ZSxcblx0XHRib3JkZXJSYWRpdXMgPSAnaW5oZXJpdCcsXG5cdFx0Y2xhc3NOYW1lLFxuXHRcdGZvY3VzLFxuXHRcdGhvdmVyLFxuXHRcdGlzSW50ZXJhY3RpdmUgPSBmYWxzZSxcblx0XHRvZmZzZXQgPSAwLFxuXHRcdHZhbHVlID0gMCxcblx0XHQuLi5vdGhlclByb3BzXG5cdH0gPSB1c2VDb250ZXh0U3lzdGVtKCBwcm9wcywgJ0VsZXZhdGlvbicgKTtcblxuXHRjb25zdCBjeCA9IHVzZUN4KCk7XG5cblx0Y29uc3QgY2xhc3NlcyA9IHVzZU1lbW8oICgpID0+IHtcblx0XHRsZXQgaG92ZXJWYWx1ZTogbnVtYmVyIHwgdW5kZWZpbmVkID0gaXNWYWx1ZURlZmluZWQoIGhvdmVyIClcblx0XHRcdD8gaG92ZXJcblx0XHRcdDogdmFsdWUgKiAyO1xuXHRcdGxldCBhY3RpdmVWYWx1ZTogbnVtYmVyIHwgdW5kZWZpbmVkID0gaXNWYWx1ZURlZmluZWQoIGFjdGl2ZSApXG5cdFx0XHQ/IGFjdGl2ZVxuXHRcdFx0OiB2YWx1ZSAvIDI7XG5cblx0XHRpZiAoICEgaXNJbnRlcmFjdGl2ZSApIHtcblx0XHRcdGhvdmVyVmFsdWUgPSBpc1ZhbHVlRGVmaW5lZCggaG92ZXIgKSA/IGhvdmVyIDogdW5kZWZpbmVkO1xuXHRcdFx0YWN0aXZlVmFsdWUgPSBpc1ZhbHVlRGVmaW5lZCggYWN0aXZlICkgPyBhY3RpdmUgOiB1bmRlZmluZWQ7XG5cdFx0fVxuXG5cdFx0Y29uc3QgdHJhbnNpdGlvbiA9IGBib3gtc2hhZG93ICR7IENPTkZJRy50cmFuc2l0aW9uRHVyYXRpb24gfSAkeyBDT05GSUcudHJhbnNpdGlvblRpbWluZ0Z1bmN0aW9uIH1gO1xuXG5cdFx0Y29uc3Qgc3g6IHtcblx0XHRcdEJhc2U/OiBTZXJpYWxpemVkU3R5bGVzO1xuXHRcdFx0aG92ZXI/OiBTZXJpYWxpemVkU3R5bGVzO1xuXHRcdFx0YWN0aXZlPzogU2VyaWFsaXplZFN0eWxlcztcblx0XHRcdGZvY3VzPzogU2VyaWFsaXplZFN0eWxlcztcblx0XHR9ID0ge307XG5cblx0XHRzeC5CYXNlID0gY3NzKFxuXHRcdFx0e1xuXHRcdFx0XHRib3JkZXJSYWRpdXMsXG5cdFx0XHRcdGJvdHRvbTogb2Zmc2V0LFxuXHRcdFx0XHRib3hTaGFkb3c6IGdldEJveFNoYWRvdyggdmFsdWUgKSxcblx0XHRcdFx0b3BhY2l0eTogQ09ORklHLmVsZXZhdGlvbkludGVuc2l0eSxcblx0XHRcdFx0bGVmdDogb2Zmc2V0LFxuXHRcdFx0XHRyaWdodDogb2Zmc2V0LFxuXHRcdFx0XHR0b3A6IG9mZnNldCxcblx0XHRcdH0sXG5cdFx0XHRjc3NgXG5cdFx0XHRcdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFx0XHRcdHRyYW5zaXRpb246ICR7IHRyYW5zaXRpb24gfTtcblx0XHRcdFx0fVxuXHRcdFx0YFxuXHRcdCk7XG5cblx0XHRpZiAoIGlzVmFsdWVEZWZpbmVkKCBob3ZlclZhbHVlICkgKSB7XG5cdFx0XHRzeC5ob3ZlciA9IGNzc2Bcblx0XHRcdFx0Kjpob3ZlciA+ICYge1xuXHRcdFx0XHRcdGJveC1zaGFkb3c6ICR7IGdldEJveFNoYWRvdyggaG92ZXJWYWx1ZSApIH07XG5cdFx0XHRcdH1cblx0XHRcdGA7XG5cdFx0fVxuXG5cdFx0aWYgKCBpc1ZhbHVlRGVmaW5lZCggYWN0aXZlVmFsdWUgKSApIHtcblx0XHRcdHN4LmFjdGl2ZSA9IGNzc2Bcblx0XHRcdFx0KjphY3RpdmUgPiAmIHtcblx0XHRcdFx0XHRib3gtc2hhZG93OiAkeyBnZXRCb3hTaGFkb3coIGFjdGl2ZVZhbHVlICkgfTtcblx0XHRcdFx0fVxuXHRcdFx0YDtcblx0XHR9XG5cblx0XHRpZiAoIGlzVmFsdWVEZWZpbmVkKCBmb2N1cyApICkge1xuXHRcdFx0c3guZm9jdXMgPSBjc3NgXG5cdFx0XHRcdCo6Zm9jdXMgPiAmIHtcblx0XHRcdFx0XHRib3gtc2hhZG93OiAkeyBnZXRCb3hTaGFkb3coIGZvY3VzICkgfTtcblx0XHRcdFx0fVxuXHRcdFx0YDtcblx0XHR9XG5cblx0XHRyZXR1cm4gY3goXG5cdFx0XHRzdHlsZXMuRWxldmF0aW9uLFxuXHRcdFx0c3guQmFzZSxcblx0XHRcdHN4LmhvdmVyLFxuXHRcdFx0c3guZm9jdXMsXG5cdFx0XHRzeC5hY3RpdmUsXG5cdFx0XHRjbGFzc05hbWVcblx0XHQpO1xuXHR9LCBbXG5cdFx0YWN0aXZlLFxuXHRcdGJvcmRlclJhZGl1cyxcblx0XHRjbGFzc05hbWUsXG5cdFx0Y3gsXG5cdFx0Zm9jdXMsXG5cdFx0aG92ZXIsXG5cdFx0aXNJbnRlcmFjdGl2ZSxcblx0XHRvZmZzZXQsXG5cdFx0dmFsdWUsXG5cdF0gKTtcblxuXHRyZXR1cm4geyAuLi5vdGhlclByb3BzLCBjbGFzc05hbWU6IGNsYXNzZXMsICdhcmlhLWhpZGRlbic6IHRydWUgfTtcbn1cbiJdfQ== */"), false ? "" : ";label:sx-Base;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBcUVZIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFNlcmlhbGl6ZWRTdHlsZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogV29yZFByZXNzIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyB1c2VNZW1vIH0gZnJvbSAnQHdvcmRwcmVzcy9lbGVtZW50JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBXb3JkUHJlc3NDb21wb25lbnRQcm9wcyB9IGZyb20gJy4uL2NvbnRleHQnO1xuaW1wb3J0IHsgdXNlQ29udGV4dFN5c3RlbSB9IGZyb20gJy4uL2NvbnRleHQnO1xuaW1wb3J0ICogYXMgc3R5bGVzIGZyb20gJy4vc3R5bGVzJztcbmltcG9ydCB7IENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHVzZUN4IH0gZnJvbSAnLi4vdXRpbHMvaG9va3MvdXNlLWN4JztcbmltcG9ydCB7IGlzVmFsdWVEZWZpbmVkIH0gZnJvbSAnLi4vdXRpbHMvdmFsdWVzJztcbmltcG9ydCB0eXBlIHsgRWxldmF0aW9uUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuZXhwb3J0IGZ1bmN0aW9uIGdldEJveFNoYWRvdyggdmFsdWU6IG51bWJlciApIHtcblx0Y29uc3QgYm94U2hhZG93Q29sb3IgPSBgcmdiYSgwLCAwLCAwLCAkeyB2YWx1ZSAvIDIwIH0pYDtcblx0Y29uc3QgYm94U2hhZG93ID0gYDAgJHsgdmFsdWUgfXB4ICR7IHZhbHVlICogMiB9cHggMFxuXHQkeyBib3hTaGFkb3dDb2xvciB9YDtcblxuXHRyZXR1cm4gYm94U2hhZG93O1xufVxuXG5leHBvcnQgZnVuY3Rpb24gdXNlRWxldmF0aW9uKFxuXHRwcm9wczogV29yZFByZXNzQ29tcG9uZW50UHJvcHM8IEVsZXZhdGlvblByb3BzLCAnZGl2JyA+XG4pIHtcblx0Y29uc3Qge1xuXHRcdGFjdGl2ZSxcblx0XHRib3JkZXJSYWRpdXMgPSAnaW5oZXJpdCcsXG5cdFx0Y2xhc3NOYW1lLFxuXHRcdGZvY3VzLFxuXHRcdGhvdmVyLFxuXHRcdGlzSW50ZXJhY3RpdmUgPSBmYWxzZSxcblx0XHRvZmZzZXQgPSAwLFxuXHRcdHZhbHVlID0gMCxcblx0XHQuLi5vdGhlclByb3BzXG5cdH0gPSB1c2VDb250ZXh0U3lzdGVtKCBwcm9wcywgJ0VsZXZhdGlvbicgKTtcblxuXHRjb25zdCBjeCA9IHVzZUN4KCk7XG5cblx0Y29uc3QgY2xhc3NlcyA9IHVzZU1lbW8oICgpID0+IHtcblx0XHRsZXQgaG92ZXJWYWx1ZTogbnVtYmVyIHwgdW5kZWZpbmVkID0gaXNWYWx1ZURlZmluZWQoIGhvdmVyIClcblx0XHRcdD8gaG92ZXJcblx0XHRcdDogdmFsdWUgKiAyO1xuXHRcdGxldCBhY3RpdmVWYWx1ZTogbnVtYmVyIHwgdW5kZWZpbmVkID0gaXNWYWx1ZURlZmluZWQoIGFjdGl2ZSApXG5cdFx0XHQ/IGFjdGl2ZVxuXHRcdFx0OiB2YWx1ZSAvIDI7XG5cblx0XHRpZiAoICEgaXNJbnRlcmFjdGl2ZSApIHtcblx0XHRcdGhvdmVyVmFsdWUgPSBpc1ZhbHVlRGVmaW5lZCggaG92ZXIgKSA/IGhvdmVyIDogdW5kZWZpbmVkO1xuXHRcdFx0YWN0aXZlVmFsdWUgPSBpc1ZhbHVlRGVmaW5lZCggYWN0aXZlICkgPyBhY3RpdmUgOiB1bmRlZmluZWQ7XG5cdFx0fVxuXG5cdFx0Y29uc3QgdHJhbnNpdGlvbiA9IGBib3gtc2hhZG93ICR7IENPTkZJRy50cmFuc2l0aW9uRHVyYXRpb24gfSAkeyBDT05GSUcudHJhbnNpdGlvblRpbWluZ0Z1bmN0aW9uIH1gO1xuXG5cdFx0Y29uc3Qgc3g6IHtcblx0XHRcdEJhc2U/OiBTZXJpYWxpemVkU3R5bGVzO1xuXHRcdFx0aG92ZXI/OiBTZXJpYWxpemVkU3R5bGVzO1xuXHRcdFx0YWN0aXZlPzogU2VyaWFsaXplZFN0eWxlcztcblx0XHRcdGZvY3VzPzogU2VyaWFsaXplZFN0eWxlcztcblx0XHR9ID0ge307XG5cblx0XHRzeC5CYXNlID0gY3NzKFxuXHRcdFx0e1xuXHRcdFx0XHRib3JkZXJSYWRpdXMsXG5cdFx0XHRcdGJvdHRvbTogb2Zmc2V0LFxuXHRcdFx0XHRib3hTaGFkb3c6IGdldEJveFNoYWRvdyggdmFsdWUgKSxcblx0XHRcdFx0b3BhY2l0eTogQ09ORklHLmVsZXZhdGlvbkludGVuc2l0eSxcblx0XHRcdFx0bGVmdDogb2Zmc2V0LFxuXHRcdFx0XHRyaWdodDogb2Zmc2V0LFxuXHRcdFx0XHR0b3A6IG9mZnNldCxcblx0XHRcdH0sXG5cdFx0XHRjc3NgXG5cdFx0XHRcdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFx0XHRcdHRyYW5zaXRpb246ICR7IHRyYW5zaXRpb24gfTtcblx0XHRcdFx0fVxuXHRcdFx0YFxuXHRcdCk7XG5cblx0XHRpZiAoIGlzVmFsdWVEZWZpbmVkKCBob3ZlclZhbHVlICkgKSB7XG5cdFx0XHRzeC5ob3ZlciA9IGNzc2Bcblx0XHRcdFx0Kjpob3ZlciA+ICYge1xuXHRcdFx0XHRcdGJveC1zaGFkb3c6ICR7IGdldEJveFNoYWRvdyggaG92ZXJWYWx1ZSApIH07XG5cdFx0XHRcdH1cblx0XHRcdGA7XG5cdFx0fVxuXG5cdFx0aWYgKCBpc1ZhbHVlRGVmaW5lZCggYWN0aXZlVmFsdWUgKSApIHtcblx0XHRcdHN4LmFjdGl2ZSA9IGNzc2Bcblx0XHRcdFx0KjphY3RpdmUgPiAmIHtcblx0XHRcdFx0XHRib3gtc2hhZG93OiAkeyBnZXRCb3hTaGFkb3coIGFjdGl2ZVZhbHVlICkgfTtcblx0XHRcdFx0fVxuXHRcdFx0YDtcblx0XHR9XG5cblx0XHRpZiAoIGlzVmFsdWVEZWZpbmVkKCBmb2N1cyApICkge1xuXHRcdFx0c3guZm9jdXMgPSBjc3NgXG5cdFx0XHRcdCo6Zm9jdXMgPiAmIHtcblx0XHRcdFx0XHRib3gtc2hhZG93OiAkeyBnZXRCb3hTaGFkb3coIGZvY3VzICkgfTtcblx0XHRcdFx0fVxuXHRcdFx0YDtcblx0XHR9XG5cblx0XHRyZXR1cm4gY3goXG5cdFx0XHRzdHlsZXMuRWxldmF0aW9uLFxuXHRcdFx0c3guQmFzZSxcblx0XHRcdHN4LmhvdmVyLFxuXHRcdFx0c3guZm9jdXMsXG5cdFx0XHRzeC5hY3RpdmUsXG5cdFx0XHRjbGFzc05hbWVcblx0XHQpO1xuXHR9LCBbXG5cdFx0YWN0aXZlLFxuXHRcdGJvcmRlclJhZGl1cyxcblx0XHRjbGFzc05hbWUsXG5cdFx0Y3gsXG5cdFx0Zm9jdXMsXG5cdFx0aG92ZXIsXG5cdFx0aXNJbnRlcmFjdGl2ZSxcblx0XHRvZmZzZXQsXG5cdFx0dmFsdWUsXG5cdF0gKTtcblxuXHRyZXR1cm4geyAuLi5vdGhlclByb3BzLCBjbGFzc05hbWU6IGNsYXNzZXMsICdhcmlhLWhpZGRlbic6IHRydWUgfTtcbn1cbiJdfQ== */");
      if (isValueDefined(hoverValue)) {
        sx.hover = /* @__PURE__ */ css("*:hover>&{box-shadow:", getBoxShadow(hoverValue), ";}" + (false ? "" : ";label:sx-hover;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBdUZpQiIsImZpbGUiOiJob29rLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIFdvcmRQcmVzcyBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgdXNlTWVtbyB9IGZyb20gJ0B3b3JkcHJlc3MvZWxlbWVudCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHVzZUNvbnRleHRTeXN0ZW0gfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCAqIGFzIHN0eWxlcyBmcm9tICcuL3N0eWxlcyc7XG5pbXBvcnQgeyBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5pbXBvcnQgeyB1c2VDeCB9IGZyb20gJy4uL3V0aWxzL2hvb2tzL3VzZS1jeCc7XG5pbXBvcnQgeyBpc1ZhbHVlRGVmaW5lZCB9IGZyb20gJy4uL3V0aWxzL3ZhbHVlcyc7XG5pbXBvcnQgdHlwZSB7IEVsZXZhdGlvblByb3BzIH0gZnJvbSAnLi90eXBlcyc7XG5cbmV4cG9ydCBmdW5jdGlvbiBnZXRCb3hTaGFkb3coIHZhbHVlOiBudW1iZXIgKSB7XG5cdGNvbnN0IGJveFNoYWRvd0NvbG9yID0gYHJnYmEoMCwgMCwgMCwgJHsgdmFsdWUgLyAyMCB9KWA7XG5cdGNvbnN0IGJveFNoYWRvdyA9IGAwICR7IHZhbHVlIH1weCAkeyB2YWx1ZSAqIDIgfXB4IDBcblx0JHsgYm94U2hhZG93Q29sb3IgfWA7XG5cblx0cmV0dXJuIGJveFNoYWRvdztcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHVzZUVsZXZhdGlvbihcblx0cHJvcHM6IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzPCBFbGV2YXRpb25Qcm9wcywgJ2RpdicgPlxuKSB7XG5cdGNvbnN0IHtcblx0XHRhY3RpdmUsXG5cdFx0Ym9yZGVyUmFkaXVzID0gJ2luaGVyaXQnLFxuXHRcdGNsYXNzTmFtZSxcblx0XHRmb2N1cyxcblx0XHRob3Zlcixcblx0XHRpc0ludGVyYWN0aXZlID0gZmFsc2UsXG5cdFx0b2Zmc2V0ID0gMCxcblx0XHR2YWx1ZSA9IDAsXG5cdFx0Li4ub3RoZXJQcm9wc1xuXHR9ID0gdXNlQ29udGV4dFN5c3RlbSggcHJvcHMsICdFbGV2YXRpb24nICk7XG5cblx0Y29uc3QgY3ggPSB1c2VDeCgpO1xuXG5cdGNvbnN0IGNsYXNzZXMgPSB1c2VNZW1vKCAoKSA9PiB7XG5cdFx0bGV0IGhvdmVyVmFsdWU6IG51bWJlciB8IHVuZGVmaW5lZCA9IGlzVmFsdWVEZWZpbmVkKCBob3ZlciApXG5cdFx0XHQ/IGhvdmVyXG5cdFx0XHQ6IHZhbHVlICogMjtcblx0XHRsZXQgYWN0aXZlVmFsdWU6IG51bWJlciB8IHVuZGVmaW5lZCA9IGlzVmFsdWVEZWZpbmVkKCBhY3RpdmUgKVxuXHRcdFx0PyBhY3RpdmVcblx0XHRcdDogdmFsdWUgLyAyO1xuXG5cdFx0aWYgKCAhIGlzSW50ZXJhY3RpdmUgKSB7XG5cdFx0XHRob3ZlclZhbHVlID0gaXNWYWx1ZURlZmluZWQoIGhvdmVyICkgPyBob3ZlciA6IHVuZGVmaW5lZDtcblx0XHRcdGFjdGl2ZVZhbHVlID0gaXNWYWx1ZURlZmluZWQoIGFjdGl2ZSApID8gYWN0aXZlIDogdW5kZWZpbmVkO1xuXHRcdH1cblxuXHRcdGNvbnN0IHRyYW5zaXRpb24gPSBgYm94LXNoYWRvdyAkeyBDT05GSUcudHJhbnNpdGlvbkR1cmF0aW9uIH0gJHsgQ09ORklHLnRyYW5zaXRpb25UaW1pbmdGdW5jdGlvbiB9YDtcblxuXHRcdGNvbnN0IHN4OiB7XG5cdFx0XHRCYXNlPzogU2VyaWFsaXplZFN0eWxlcztcblx0XHRcdGhvdmVyPzogU2VyaWFsaXplZFN0eWxlcztcblx0XHRcdGFjdGl2ZT86IFNlcmlhbGl6ZWRTdHlsZXM7XG5cdFx0XHRmb2N1cz86IFNlcmlhbGl6ZWRTdHlsZXM7XG5cdFx0fSA9IHt9O1xuXG5cdFx0c3guQmFzZSA9IGNzcyhcblx0XHRcdHtcblx0XHRcdFx0Ym9yZGVyUmFkaXVzLFxuXHRcdFx0XHRib3R0b206IG9mZnNldCxcblx0XHRcdFx0Ym94U2hhZG93OiBnZXRCb3hTaGFkb3coIHZhbHVlICksXG5cdFx0XHRcdG9wYWNpdHk6IENPTkZJRy5lbGV2YXRpb25JbnRlbnNpdHksXG5cdFx0XHRcdGxlZnQ6IG9mZnNldCxcblx0XHRcdFx0cmlnaHQ6IG9mZnNldCxcblx0XHRcdFx0dG9wOiBvZmZzZXQsXG5cdFx0XHR9LFxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdFx0XHR0cmFuc2l0aW9uOiAkeyB0cmFuc2l0aW9uIH07XG5cdFx0XHRcdH1cblx0XHRcdGBcblx0XHQpO1xuXG5cdFx0aWYgKCBpc1ZhbHVlRGVmaW5lZCggaG92ZXJWYWx1ZSApICkge1xuXHRcdFx0c3guaG92ZXIgPSBjc3NgXG5cdFx0XHRcdCo6aG92ZXIgPiAmIHtcblx0XHRcdFx0XHRib3gtc2hhZG93OiAkeyBnZXRCb3hTaGFkb3coIGhvdmVyVmFsdWUgKSB9O1xuXHRcdFx0XHR9XG5cdFx0XHRgO1xuXHRcdH1cblxuXHRcdGlmICggaXNWYWx1ZURlZmluZWQoIGFjdGl2ZVZhbHVlICkgKSB7XG5cdFx0XHRzeC5hY3RpdmUgPSBjc3NgXG5cdFx0XHRcdCo6YWN0aXZlID4gJiB7XG5cdFx0XHRcdFx0Ym94LXNoYWRvdzogJHsgZ2V0Qm94U2hhZG93KCBhY3RpdmVWYWx1ZSApIH07XG5cdFx0XHRcdH1cblx0XHRcdGA7XG5cdFx0fVxuXG5cdFx0aWYgKCBpc1ZhbHVlRGVmaW5lZCggZm9jdXMgKSApIHtcblx0XHRcdHN4LmZvY3VzID0gY3NzYFxuXHRcdFx0XHQqOmZvY3VzID4gJiB7XG5cdFx0XHRcdFx0Ym94LXNoYWRvdzogJHsgZ2V0Qm94U2hhZG93KCBmb2N1cyApIH07XG5cdFx0XHRcdH1cblx0XHRcdGA7XG5cdFx0fVxuXG5cdFx0cmV0dXJuIGN4KFxuXHRcdFx0c3R5bGVzLkVsZXZhdGlvbixcblx0XHRcdHN4LkJhc2UsXG5cdFx0XHRzeC5ob3Zlcixcblx0XHRcdHN4LmZvY3VzLFxuXHRcdFx0c3guYWN0aXZlLFxuXHRcdFx0Y2xhc3NOYW1lXG5cdFx0KTtcblx0fSwgW1xuXHRcdGFjdGl2ZSxcblx0XHRib3JkZXJSYWRpdXMsXG5cdFx0Y2xhc3NOYW1lLFxuXHRcdGN4LFxuXHRcdGZvY3VzLFxuXHRcdGhvdmVyLFxuXHRcdGlzSW50ZXJhY3RpdmUsXG5cdFx0b2Zmc2V0LFxuXHRcdHZhbHVlLFxuXHRdICk7XG5cblx0cmV0dXJuIHsgLi4ub3RoZXJQcm9wcywgY2xhc3NOYW1lOiBjbGFzc2VzLCAnYXJpYS1oaWRkZW4nOiB0cnVlIH07XG59XG4iXX0= */");
      }
      if (isValueDefined(activeValue)) {
        sx.active = /* @__PURE__ */ css("*:active>&{box-shadow:", getBoxShadow(activeValue), ";}" + (false ? "" : ";label:sx-active;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBK0ZrQiIsImZpbGUiOiJob29rLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIFdvcmRQcmVzcyBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgdXNlTWVtbyB9IGZyb20gJ0B3b3JkcHJlc3MvZWxlbWVudCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHVzZUNvbnRleHRTeXN0ZW0gfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCAqIGFzIHN0eWxlcyBmcm9tICcuL3N0eWxlcyc7XG5pbXBvcnQgeyBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5pbXBvcnQgeyB1c2VDeCB9IGZyb20gJy4uL3V0aWxzL2hvb2tzL3VzZS1jeCc7XG5pbXBvcnQgeyBpc1ZhbHVlRGVmaW5lZCB9IGZyb20gJy4uL3V0aWxzL3ZhbHVlcyc7XG5pbXBvcnQgdHlwZSB7IEVsZXZhdGlvblByb3BzIH0gZnJvbSAnLi90eXBlcyc7XG5cbmV4cG9ydCBmdW5jdGlvbiBnZXRCb3hTaGFkb3coIHZhbHVlOiBudW1iZXIgKSB7XG5cdGNvbnN0IGJveFNoYWRvd0NvbG9yID0gYHJnYmEoMCwgMCwgMCwgJHsgdmFsdWUgLyAyMCB9KWA7XG5cdGNvbnN0IGJveFNoYWRvdyA9IGAwICR7IHZhbHVlIH1weCAkeyB2YWx1ZSAqIDIgfXB4IDBcblx0JHsgYm94U2hhZG93Q29sb3IgfWA7XG5cblx0cmV0dXJuIGJveFNoYWRvdztcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHVzZUVsZXZhdGlvbihcblx0cHJvcHM6IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzPCBFbGV2YXRpb25Qcm9wcywgJ2RpdicgPlxuKSB7XG5cdGNvbnN0IHtcblx0XHRhY3RpdmUsXG5cdFx0Ym9yZGVyUmFkaXVzID0gJ2luaGVyaXQnLFxuXHRcdGNsYXNzTmFtZSxcblx0XHRmb2N1cyxcblx0XHRob3Zlcixcblx0XHRpc0ludGVyYWN0aXZlID0gZmFsc2UsXG5cdFx0b2Zmc2V0ID0gMCxcblx0XHR2YWx1ZSA9IDAsXG5cdFx0Li4ub3RoZXJQcm9wc1xuXHR9ID0gdXNlQ29udGV4dFN5c3RlbSggcHJvcHMsICdFbGV2YXRpb24nICk7XG5cblx0Y29uc3QgY3ggPSB1c2VDeCgpO1xuXG5cdGNvbnN0IGNsYXNzZXMgPSB1c2VNZW1vKCAoKSA9PiB7XG5cdFx0bGV0IGhvdmVyVmFsdWU6IG51bWJlciB8IHVuZGVmaW5lZCA9IGlzVmFsdWVEZWZpbmVkKCBob3ZlciApXG5cdFx0XHQ/IGhvdmVyXG5cdFx0XHQ6IHZhbHVlICogMjtcblx0XHRsZXQgYWN0aXZlVmFsdWU6IG51bWJlciB8IHVuZGVmaW5lZCA9IGlzVmFsdWVEZWZpbmVkKCBhY3RpdmUgKVxuXHRcdFx0PyBhY3RpdmVcblx0XHRcdDogdmFsdWUgLyAyO1xuXG5cdFx0aWYgKCAhIGlzSW50ZXJhY3RpdmUgKSB7XG5cdFx0XHRob3ZlclZhbHVlID0gaXNWYWx1ZURlZmluZWQoIGhvdmVyICkgPyBob3ZlciA6IHVuZGVmaW5lZDtcblx0XHRcdGFjdGl2ZVZhbHVlID0gaXNWYWx1ZURlZmluZWQoIGFjdGl2ZSApID8gYWN0aXZlIDogdW5kZWZpbmVkO1xuXHRcdH1cblxuXHRcdGNvbnN0IHRyYW5zaXRpb24gPSBgYm94LXNoYWRvdyAkeyBDT05GSUcudHJhbnNpdGlvbkR1cmF0aW9uIH0gJHsgQ09ORklHLnRyYW5zaXRpb25UaW1pbmdGdW5jdGlvbiB9YDtcblxuXHRcdGNvbnN0IHN4OiB7XG5cdFx0XHRCYXNlPzogU2VyaWFsaXplZFN0eWxlcztcblx0XHRcdGhvdmVyPzogU2VyaWFsaXplZFN0eWxlcztcblx0XHRcdGFjdGl2ZT86IFNlcmlhbGl6ZWRTdHlsZXM7XG5cdFx0XHRmb2N1cz86IFNlcmlhbGl6ZWRTdHlsZXM7XG5cdFx0fSA9IHt9O1xuXG5cdFx0c3guQmFzZSA9IGNzcyhcblx0XHRcdHtcblx0XHRcdFx0Ym9yZGVyUmFkaXVzLFxuXHRcdFx0XHRib3R0b206IG9mZnNldCxcblx0XHRcdFx0Ym94U2hhZG93OiBnZXRCb3hTaGFkb3coIHZhbHVlICksXG5cdFx0XHRcdG9wYWNpdHk6IENPTkZJRy5lbGV2YXRpb25JbnRlbnNpdHksXG5cdFx0XHRcdGxlZnQ6IG9mZnNldCxcblx0XHRcdFx0cmlnaHQ6IG9mZnNldCxcblx0XHRcdFx0dG9wOiBvZmZzZXQsXG5cdFx0XHR9LFxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdFx0XHR0cmFuc2l0aW9uOiAkeyB0cmFuc2l0aW9uIH07XG5cdFx0XHRcdH1cblx0XHRcdGBcblx0XHQpO1xuXG5cdFx0aWYgKCBpc1ZhbHVlRGVmaW5lZCggaG92ZXJWYWx1ZSApICkge1xuXHRcdFx0c3guaG92ZXIgPSBjc3NgXG5cdFx0XHRcdCo6aG92ZXIgPiAmIHtcblx0XHRcdFx0XHRib3gtc2hhZG93OiAkeyBnZXRCb3hTaGFkb3coIGhvdmVyVmFsdWUgKSB9O1xuXHRcdFx0XHR9XG5cdFx0XHRgO1xuXHRcdH1cblxuXHRcdGlmICggaXNWYWx1ZURlZmluZWQoIGFjdGl2ZVZhbHVlICkgKSB7XG5cdFx0XHRzeC5hY3RpdmUgPSBjc3NgXG5cdFx0XHRcdCo6YWN0aXZlID4gJiB7XG5cdFx0XHRcdFx0Ym94LXNoYWRvdzogJHsgZ2V0Qm94U2hhZG93KCBhY3RpdmVWYWx1ZSApIH07XG5cdFx0XHRcdH1cblx0XHRcdGA7XG5cdFx0fVxuXG5cdFx0aWYgKCBpc1ZhbHVlRGVmaW5lZCggZm9jdXMgKSApIHtcblx0XHRcdHN4LmZvY3VzID0gY3NzYFxuXHRcdFx0XHQqOmZvY3VzID4gJiB7XG5cdFx0XHRcdFx0Ym94LXNoYWRvdzogJHsgZ2V0Qm94U2hhZG93KCBmb2N1cyApIH07XG5cdFx0XHRcdH1cblx0XHRcdGA7XG5cdFx0fVxuXG5cdFx0cmV0dXJuIGN4KFxuXHRcdFx0c3R5bGVzLkVsZXZhdGlvbixcblx0XHRcdHN4LkJhc2UsXG5cdFx0XHRzeC5ob3Zlcixcblx0XHRcdHN4LmZvY3VzLFxuXHRcdFx0c3guYWN0aXZlLFxuXHRcdFx0Y2xhc3NOYW1lXG5cdFx0KTtcblx0fSwgW1xuXHRcdGFjdGl2ZSxcblx0XHRib3JkZXJSYWRpdXMsXG5cdFx0Y2xhc3NOYW1lLFxuXHRcdGN4LFxuXHRcdGZvY3VzLFxuXHRcdGhvdmVyLFxuXHRcdGlzSW50ZXJhY3RpdmUsXG5cdFx0b2Zmc2V0LFxuXHRcdHZhbHVlLFxuXHRdICk7XG5cblx0cmV0dXJuIHsgLi4ub3RoZXJQcm9wcywgY2xhc3NOYW1lOiBjbGFzc2VzLCAnYXJpYS1oaWRkZW4nOiB0cnVlIH07XG59XG4iXX0= */");
      }
      if (isValueDefined(focus4)) {
        sx.focus = /* @__PURE__ */ css("*:focus>&{box-shadow:", getBoxShadow(focus4), ";}" + (false ? "" : ";label:sx-focus;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBdUdpQiIsImZpbGUiOiJob29rLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIFdvcmRQcmVzcyBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgdXNlTWVtbyB9IGZyb20gJ0B3b3JkcHJlc3MvZWxlbWVudCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHVzZUNvbnRleHRTeXN0ZW0gfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCAqIGFzIHN0eWxlcyBmcm9tICcuL3N0eWxlcyc7XG5pbXBvcnQgeyBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5pbXBvcnQgeyB1c2VDeCB9IGZyb20gJy4uL3V0aWxzL2hvb2tzL3VzZS1jeCc7XG5pbXBvcnQgeyBpc1ZhbHVlRGVmaW5lZCB9IGZyb20gJy4uL3V0aWxzL3ZhbHVlcyc7XG5pbXBvcnQgdHlwZSB7IEVsZXZhdGlvblByb3BzIH0gZnJvbSAnLi90eXBlcyc7XG5cbmV4cG9ydCBmdW5jdGlvbiBnZXRCb3hTaGFkb3coIHZhbHVlOiBudW1iZXIgKSB7XG5cdGNvbnN0IGJveFNoYWRvd0NvbG9yID0gYHJnYmEoMCwgMCwgMCwgJHsgdmFsdWUgLyAyMCB9KWA7XG5cdGNvbnN0IGJveFNoYWRvdyA9IGAwICR7IHZhbHVlIH1weCAkeyB2YWx1ZSAqIDIgfXB4IDBcblx0JHsgYm94U2hhZG93Q29sb3IgfWA7XG5cblx0cmV0dXJuIGJveFNoYWRvdztcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHVzZUVsZXZhdGlvbihcblx0cHJvcHM6IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzPCBFbGV2YXRpb25Qcm9wcywgJ2RpdicgPlxuKSB7XG5cdGNvbnN0IHtcblx0XHRhY3RpdmUsXG5cdFx0Ym9yZGVyUmFkaXVzID0gJ2luaGVyaXQnLFxuXHRcdGNsYXNzTmFtZSxcblx0XHRmb2N1cyxcblx0XHRob3Zlcixcblx0XHRpc0ludGVyYWN0aXZlID0gZmFsc2UsXG5cdFx0b2Zmc2V0ID0gMCxcblx0XHR2YWx1ZSA9IDAsXG5cdFx0Li4ub3RoZXJQcm9wc1xuXHR9ID0gdXNlQ29udGV4dFN5c3RlbSggcHJvcHMsICdFbGV2YXRpb24nICk7XG5cblx0Y29uc3QgY3ggPSB1c2VDeCgpO1xuXG5cdGNvbnN0IGNsYXNzZXMgPSB1c2VNZW1vKCAoKSA9PiB7XG5cdFx0bGV0IGhvdmVyVmFsdWU6IG51bWJlciB8IHVuZGVmaW5lZCA9IGlzVmFsdWVEZWZpbmVkKCBob3ZlciApXG5cdFx0XHQ/IGhvdmVyXG5cdFx0XHQ6IHZhbHVlICogMjtcblx0XHRsZXQgYWN0aXZlVmFsdWU6IG51bWJlciB8IHVuZGVmaW5lZCA9IGlzVmFsdWVEZWZpbmVkKCBhY3RpdmUgKVxuXHRcdFx0PyBhY3RpdmVcblx0XHRcdDogdmFsdWUgLyAyO1xuXG5cdFx0aWYgKCAhIGlzSW50ZXJhY3RpdmUgKSB7XG5cdFx0XHRob3ZlclZhbHVlID0gaXNWYWx1ZURlZmluZWQoIGhvdmVyICkgPyBob3ZlciA6IHVuZGVmaW5lZDtcblx0XHRcdGFjdGl2ZVZhbHVlID0gaXNWYWx1ZURlZmluZWQoIGFjdGl2ZSApID8gYWN0aXZlIDogdW5kZWZpbmVkO1xuXHRcdH1cblxuXHRcdGNvbnN0IHRyYW5zaXRpb24gPSBgYm94LXNoYWRvdyAkeyBDT05GSUcudHJhbnNpdGlvbkR1cmF0aW9uIH0gJHsgQ09ORklHLnRyYW5zaXRpb25UaW1pbmdGdW5jdGlvbiB9YDtcblxuXHRcdGNvbnN0IHN4OiB7XG5cdFx0XHRCYXNlPzogU2VyaWFsaXplZFN0eWxlcztcblx0XHRcdGhvdmVyPzogU2VyaWFsaXplZFN0eWxlcztcblx0XHRcdGFjdGl2ZT86IFNlcmlhbGl6ZWRTdHlsZXM7XG5cdFx0XHRmb2N1cz86IFNlcmlhbGl6ZWRTdHlsZXM7XG5cdFx0fSA9IHt9O1xuXG5cdFx0c3guQmFzZSA9IGNzcyhcblx0XHRcdHtcblx0XHRcdFx0Ym9yZGVyUmFkaXVzLFxuXHRcdFx0XHRib3R0b206IG9mZnNldCxcblx0XHRcdFx0Ym94U2hhZG93OiBnZXRCb3hTaGFkb3coIHZhbHVlICksXG5cdFx0XHRcdG9wYWNpdHk6IENPTkZJRy5lbGV2YXRpb25JbnRlbnNpdHksXG5cdFx0XHRcdGxlZnQ6IG9mZnNldCxcblx0XHRcdFx0cmlnaHQ6IG9mZnNldCxcblx0XHRcdFx0dG9wOiBvZmZzZXQsXG5cdFx0XHR9LFxuXHRcdFx0Y3NzYFxuXHRcdFx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdFx0XHR0cmFuc2l0aW9uOiAkeyB0cmFuc2l0aW9uIH07XG5cdFx0XHRcdH1cblx0XHRcdGBcblx0XHQpO1xuXG5cdFx0aWYgKCBpc1ZhbHVlRGVmaW5lZCggaG92ZXJWYWx1ZSApICkge1xuXHRcdFx0c3guaG92ZXIgPSBjc3NgXG5cdFx0XHRcdCo6aG92ZXIgPiAmIHtcblx0XHRcdFx0XHRib3gtc2hhZG93OiAkeyBnZXRCb3hTaGFkb3coIGhvdmVyVmFsdWUgKSB9O1xuXHRcdFx0XHR9XG5cdFx0XHRgO1xuXHRcdH1cblxuXHRcdGlmICggaXNWYWx1ZURlZmluZWQoIGFjdGl2ZVZhbHVlICkgKSB7XG5cdFx0XHRzeC5hY3RpdmUgPSBjc3NgXG5cdFx0XHRcdCo6YWN0aXZlID4gJiB7XG5cdFx0XHRcdFx0Ym94LXNoYWRvdzogJHsgZ2V0Qm94U2hhZG93KCBhY3RpdmVWYWx1ZSApIH07XG5cdFx0XHRcdH1cblx0XHRcdGA7XG5cdFx0fVxuXG5cdFx0aWYgKCBpc1ZhbHVlRGVmaW5lZCggZm9jdXMgKSApIHtcblx0XHRcdHN4LmZvY3VzID0gY3NzYFxuXHRcdFx0XHQqOmZvY3VzID4gJiB7XG5cdFx0XHRcdFx0Ym94LXNoYWRvdzogJHsgZ2V0Qm94U2hhZG93KCBmb2N1cyApIH07XG5cdFx0XHRcdH1cblx0XHRcdGA7XG5cdFx0fVxuXG5cdFx0cmV0dXJuIGN4KFxuXHRcdFx0c3R5bGVzLkVsZXZhdGlvbixcblx0XHRcdHN4LkJhc2UsXG5cdFx0XHRzeC5ob3Zlcixcblx0XHRcdHN4LmZvY3VzLFxuXHRcdFx0c3guYWN0aXZlLFxuXHRcdFx0Y2xhc3NOYW1lXG5cdFx0KTtcblx0fSwgW1xuXHRcdGFjdGl2ZSxcblx0XHRib3JkZXJSYWRpdXMsXG5cdFx0Y2xhc3NOYW1lLFxuXHRcdGN4LFxuXHRcdGZvY3VzLFxuXHRcdGhvdmVyLFxuXHRcdGlzSW50ZXJhY3RpdmUsXG5cdFx0b2Zmc2V0LFxuXHRcdHZhbHVlLFxuXHRdICk7XG5cblx0cmV0dXJuIHsgLi4ub3RoZXJQcm9wcywgY2xhc3NOYW1lOiBjbGFzc2VzLCAnYXJpYS1oaWRkZW4nOiB0cnVlIH07XG59XG4iXX0= */");
      }
      return cx3(Elevation, sx.Base, sx.hover, sx.focus, sx.active, className2);
    }, [active, borderRadius3, className2, cx3, focus4, hover2, isInteractive, offset3, value]);
    return {
      ...otherProps,
      className: classes,
      "aria-hidden": true
    };
  }

  // packages/components/build-module/elevation/component.mjs
  var import_jsx_runtime159 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedElevation(props, forwardedRef) {
    const elevationProps = useElevation(props);
    return /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(component_default, {
      ...elevationProps,
      ref: forwardedRef
    });
  }
  var Elevation2 = contextConnect(UnconnectedElevation, "Elevation");
  var component_default25 = Elevation2;

  // packages/components/build-module/card/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__18() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var adjustedBorderRadius = `calc(${config_values_default.radiusLarge} - 1px)`;
  var Card = /* @__PURE__ */ css("box-shadow:0 0 0 1px ", config_values_default.surfaceBorderColor, ";outline:none;" + (false ? "" : ";label:Card;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnQnVCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbi8vIFNpbmNlIHRoZSBib3JkZXIgZm9yIGBDYXJkYCBpcyByZW5kZXJlZCB2aWEgdGhlIGBib3gtc2hhZG93YCBwcm9wZXJ0eVxuLy8gKGFzIG9wcG9zZWQgdG8gdGhlIGBib3JkZXJgIHByb3BlcnR5KSwgdGhlIHZhbHVlIG9mIHRoZSBib3JkZXIgcmFkaXVzIG5lZWRzXG4vLyB0byBiZSBhZGp1c3RlZCBieSByZW1vdmluZyAxcHggKHRoaXMgaXMgYmVjYXVzZSB0aGUgYGJveC1zaGFkb3dgIHJlbmRlcnNcbi8vIGFzIGFuIFwib3V0ZXIgcmFkaXVzXCIpLlxuY29uc3QgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgPSBgY2FsYygkeyBDT05GSUcucmFkaXVzTGFyZ2UgfSAtIDFweClgO1xuXG5leHBvcnQgY29uc3QgQ2FyZCA9IGNzc2Bcblx0Ym94LXNoYWRvdzogMCAwIDAgMXB4ICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfTtcblx0b3V0bGluZTogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBIZWFkZXIgPSBjc3NgXG5cdGJvcmRlci1ib3R0b206IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmxhc3QtY2hpbGQge1xuXHRcdGJvcmRlci1ib3R0b206IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBGb290ZXIgPSBjc3NgXG5cdGJvcmRlci10b3A6IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3A6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBDb250ZW50ID0gY3NzYFxuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgQm9keSA9IGNzc2Bcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0aGVpZ2h0OiBhdXRvO1xuXHRtYXgtaGVpZ2h0OiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuXG5cdCYgPiBpbWcsXG5cdCYgPiBpZnJhbWUge1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdGhlaWdodDogYXV0bztcblx0XHRtYXgtd2lkdGg6IDEwMCU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBEaXZpZGVyID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyUmFkaXVzID0gY3NzYFxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3AtbGVmdC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdFx0Ym9yZGVyLXRvcC1yaWdodC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdH1cblxuXHQmOmxhc3Qtb2YtdHlwZSB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1sZWZ0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbG9yID0gY3NzYFxuXHRib3JkZXItY29sb3I6ICR7IENPTkZJRy5jb2xvckRpdmlkZXIgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBib3hTaGFkb3dsZXNzID0gY3NzYFxuXHRib3gtc2hhZG93OiBub25lO1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlcmxlc3MgPSBjc3NgXG5cdGJvcmRlcjogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCByb3VuZGVkID0gY3NzYFxuXHRib3JkZXItcmFkaXVzOiAkeyBhZGp1c3RlZEJvcmRlclJhZGl1cyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IHNoYWR5ID0gY3NzYFxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkIH07XG5gO1xuIl19 */");
  var Header = false ? {
    name: "1showjb",
    styles: "border-bottom:1px solid;box-sizing:border-box;&:last-child{border-bottom:none;}"
  } : {
    name: "euqiwd-Header",
    styles: "border-bottom:1px solid;box-sizing:border-box;&:last-child{border-bottom:none;};label:Header;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQnlCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbi8vIFNpbmNlIHRoZSBib3JkZXIgZm9yIGBDYXJkYCBpcyByZW5kZXJlZCB2aWEgdGhlIGBib3gtc2hhZG93YCBwcm9wZXJ0eVxuLy8gKGFzIG9wcG9zZWQgdG8gdGhlIGBib3JkZXJgIHByb3BlcnR5KSwgdGhlIHZhbHVlIG9mIHRoZSBib3JkZXIgcmFkaXVzIG5lZWRzXG4vLyB0byBiZSBhZGp1c3RlZCBieSByZW1vdmluZyAxcHggKHRoaXMgaXMgYmVjYXVzZSB0aGUgYGJveC1zaGFkb3dgIHJlbmRlcnNcbi8vIGFzIGFuIFwib3V0ZXIgcmFkaXVzXCIpLlxuY29uc3QgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgPSBgY2FsYygkeyBDT05GSUcucmFkaXVzTGFyZ2UgfSAtIDFweClgO1xuXG5leHBvcnQgY29uc3QgQ2FyZCA9IGNzc2Bcblx0Ym94LXNoYWRvdzogMCAwIDAgMXB4ICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfTtcblx0b3V0bGluZTogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBIZWFkZXIgPSBjc3NgXG5cdGJvcmRlci1ib3R0b206IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmxhc3QtY2hpbGQge1xuXHRcdGJvcmRlci1ib3R0b206IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBGb290ZXIgPSBjc3NgXG5cdGJvcmRlci10b3A6IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3A6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBDb250ZW50ID0gY3NzYFxuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgQm9keSA9IGNzc2Bcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0aGVpZ2h0OiBhdXRvO1xuXHRtYXgtaGVpZ2h0OiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuXG5cdCYgPiBpbWcsXG5cdCYgPiBpZnJhbWUge1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdGhlaWdodDogYXV0bztcblx0XHRtYXgtd2lkdGg6IDEwMCU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBEaXZpZGVyID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyUmFkaXVzID0gY3NzYFxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3AtbGVmdC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdFx0Ym9yZGVyLXRvcC1yaWdodC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdH1cblxuXHQmOmxhc3Qtb2YtdHlwZSB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1sZWZ0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbG9yID0gY3NzYFxuXHRib3JkZXItY29sb3I6ICR7IENPTkZJRy5jb2xvckRpdmlkZXIgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBib3hTaGFkb3dsZXNzID0gY3NzYFxuXHRib3gtc2hhZG93OiBub25lO1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlcmxlc3MgPSBjc3NgXG5cdGJvcmRlcjogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCByb3VuZGVkID0gY3NzYFxuXHRib3JkZXItcmFkaXVzOiAkeyBhZGp1c3RlZEJvcmRlclJhZGl1cyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IHNoYWR5ID0gY3NzYFxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkIH07XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__18
  };
  var Footer = false ? {
    name: "14n5oej",
    styles: "border-top:1px solid;box-sizing:border-box;&:first-of-type{border-top:none;}"
  } : {
    name: "1rianq6-Footer",
    styles: "border-top:1px solid;box-sizing:border-box;&:first-of-type{border-top:none;};label:Footer;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE4QnlCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbi8vIFNpbmNlIHRoZSBib3JkZXIgZm9yIGBDYXJkYCBpcyByZW5kZXJlZCB2aWEgdGhlIGBib3gtc2hhZG93YCBwcm9wZXJ0eVxuLy8gKGFzIG9wcG9zZWQgdG8gdGhlIGBib3JkZXJgIHByb3BlcnR5KSwgdGhlIHZhbHVlIG9mIHRoZSBib3JkZXIgcmFkaXVzIG5lZWRzXG4vLyB0byBiZSBhZGp1c3RlZCBieSByZW1vdmluZyAxcHggKHRoaXMgaXMgYmVjYXVzZSB0aGUgYGJveC1zaGFkb3dgIHJlbmRlcnNcbi8vIGFzIGFuIFwib3V0ZXIgcmFkaXVzXCIpLlxuY29uc3QgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgPSBgY2FsYygkeyBDT05GSUcucmFkaXVzTGFyZ2UgfSAtIDFweClgO1xuXG5leHBvcnQgY29uc3QgQ2FyZCA9IGNzc2Bcblx0Ym94LXNoYWRvdzogMCAwIDAgMXB4ICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfTtcblx0b3V0bGluZTogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBIZWFkZXIgPSBjc3NgXG5cdGJvcmRlci1ib3R0b206IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmxhc3QtY2hpbGQge1xuXHRcdGJvcmRlci1ib3R0b206IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBGb290ZXIgPSBjc3NgXG5cdGJvcmRlci10b3A6IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3A6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBDb250ZW50ID0gY3NzYFxuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgQm9keSA9IGNzc2Bcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0aGVpZ2h0OiBhdXRvO1xuXHRtYXgtaGVpZ2h0OiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuXG5cdCYgPiBpbWcsXG5cdCYgPiBpZnJhbWUge1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdGhlaWdodDogYXV0bztcblx0XHRtYXgtd2lkdGg6IDEwMCU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBEaXZpZGVyID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyUmFkaXVzID0gY3NzYFxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3AtbGVmdC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdFx0Ym9yZGVyLXRvcC1yaWdodC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdH1cblxuXHQmOmxhc3Qtb2YtdHlwZSB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1sZWZ0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbG9yID0gY3NzYFxuXHRib3JkZXItY29sb3I6ICR7IENPTkZJRy5jb2xvckRpdmlkZXIgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBib3hTaGFkb3dsZXNzID0gY3NzYFxuXHRib3gtc2hhZG93OiBub25lO1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlcmxlc3MgPSBjc3NgXG5cdGJvcmRlcjogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCByb3VuZGVkID0gY3NzYFxuXHRib3JkZXItcmFkaXVzOiAkeyBhZGp1c3RlZEJvcmRlclJhZGl1cyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IHNoYWR5ID0gY3NzYFxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkIH07XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__18
  };
  var Content = false ? {
    name: "13udsys",
    styles: "height:100%"
  } : {
    name: "1ruapvy-Content",
    styles: "height:100%;label:Content;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1QzBCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbi8vIFNpbmNlIHRoZSBib3JkZXIgZm9yIGBDYXJkYCBpcyByZW5kZXJlZCB2aWEgdGhlIGBib3gtc2hhZG93YCBwcm9wZXJ0eVxuLy8gKGFzIG9wcG9zZWQgdG8gdGhlIGBib3JkZXJgIHByb3BlcnR5KSwgdGhlIHZhbHVlIG9mIHRoZSBib3JkZXIgcmFkaXVzIG5lZWRzXG4vLyB0byBiZSBhZGp1c3RlZCBieSByZW1vdmluZyAxcHggKHRoaXMgaXMgYmVjYXVzZSB0aGUgYGJveC1zaGFkb3dgIHJlbmRlcnNcbi8vIGFzIGFuIFwib3V0ZXIgcmFkaXVzXCIpLlxuY29uc3QgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgPSBgY2FsYygkeyBDT05GSUcucmFkaXVzTGFyZ2UgfSAtIDFweClgO1xuXG5leHBvcnQgY29uc3QgQ2FyZCA9IGNzc2Bcblx0Ym94LXNoYWRvdzogMCAwIDAgMXB4ICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfTtcblx0b3V0bGluZTogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBIZWFkZXIgPSBjc3NgXG5cdGJvcmRlci1ib3R0b206IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmxhc3QtY2hpbGQge1xuXHRcdGJvcmRlci1ib3R0b206IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBGb290ZXIgPSBjc3NgXG5cdGJvcmRlci10b3A6IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3A6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBDb250ZW50ID0gY3NzYFxuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgQm9keSA9IGNzc2Bcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0aGVpZ2h0OiBhdXRvO1xuXHRtYXgtaGVpZ2h0OiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuXG5cdCYgPiBpbWcsXG5cdCYgPiBpZnJhbWUge1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdGhlaWdodDogYXV0bztcblx0XHRtYXgtd2lkdGg6IDEwMCU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBEaXZpZGVyID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyUmFkaXVzID0gY3NzYFxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3AtbGVmdC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdFx0Ym9yZGVyLXRvcC1yaWdodC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdH1cblxuXHQmOmxhc3Qtb2YtdHlwZSB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1sZWZ0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbG9yID0gY3NzYFxuXHRib3JkZXItY29sb3I6ICR7IENPTkZJRy5jb2xvckRpdmlkZXIgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBib3hTaGFkb3dsZXNzID0gY3NzYFxuXHRib3gtc2hhZG93OiBub25lO1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlcmxlc3MgPSBjc3NgXG5cdGJvcmRlcjogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCByb3VuZGVkID0gY3NzYFxuXHRib3JkZXItcmFkaXVzOiAkeyBhZGp1c3RlZEJvcmRlclJhZGl1cyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IHNoYWR5ID0gY3NzYFxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkIH07XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__18
  };
  var Body = false ? {
    name: "6ywzd",
    styles: "box-sizing:border-box;height:auto;max-height:100%"
  } : {
    name: "1klm29z-Body",
    styles: "box-sizing:border-box;height:auto;max-height:100%;label:Body;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyQ3VCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbi8vIFNpbmNlIHRoZSBib3JkZXIgZm9yIGBDYXJkYCBpcyByZW5kZXJlZCB2aWEgdGhlIGBib3gtc2hhZG93YCBwcm9wZXJ0eVxuLy8gKGFzIG9wcG9zZWQgdG8gdGhlIGBib3JkZXJgIHByb3BlcnR5KSwgdGhlIHZhbHVlIG9mIHRoZSBib3JkZXIgcmFkaXVzIG5lZWRzXG4vLyB0byBiZSBhZGp1c3RlZCBieSByZW1vdmluZyAxcHggKHRoaXMgaXMgYmVjYXVzZSB0aGUgYGJveC1zaGFkb3dgIHJlbmRlcnNcbi8vIGFzIGFuIFwib3V0ZXIgcmFkaXVzXCIpLlxuY29uc3QgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgPSBgY2FsYygkeyBDT05GSUcucmFkaXVzTGFyZ2UgfSAtIDFweClgO1xuXG5leHBvcnQgY29uc3QgQ2FyZCA9IGNzc2Bcblx0Ym94LXNoYWRvdzogMCAwIDAgMXB4ICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfTtcblx0b3V0bGluZTogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBIZWFkZXIgPSBjc3NgXG5cdGJvcmRlci1ib3R0b206IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmxhc3QtY2hpbGQge1xuXHRcdGJvcmRlci1ib3R0b206IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBGb290ZXIgPSBjc3NgXG5cdGJvcmRlci10b3A6IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3A6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBDb250ZW50ID0gY3NzYFxuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgQm9keSA9IGNzc2Bcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0aGVpZ2h0OiBhdXRvO1xuXHRtYXgtaGVpZ2h0OiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuXG5cdCYgPiBpbWcsXG5cdCYgPiBpZnJhbWUge1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdGhlaWdodDogYXV0bztcblx0XHRtYXgtd2lkdGg6IDEwMCU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBEaXZpZGVyID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyUmFkaXVzID0gY3NzYFxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3AtbGVmdC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdFx0Ym9yZGVyLXRvcC1yaWdodC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdH1cblxuXHQmOmxhc3Qtb2YtdHlwZSB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1sZWZ0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbG9yID0gY3NzYFxuXHRib3JkZXItY29sb3I6ICR7IENPTkZJRy5jb2xvckRpdmlkZXIgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBib3hTaGFkb3dsZXNzID0gY3NzYFxuXHRib3gtc2hhZG93OiBub25lO1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlcmxlc3MgPSBjc3NgXG5cdGJvcmRlcjogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCByb3VuZGVkID0gY3NzYFxuXHRib3JkZXItcmFkaXVzOiAkeyBhZGp1c3RlZEJvcmRlclJhZGl1cyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IHNoYWR5ID0gY3NzYFxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkIH07XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__18
  };
  var Media = false ? {
    name: "dq805e",
    styles: "box-sizing:border-box;overflow:hidden;&>img,&>iframe{display:block;height:auto;max-width:100%;width:100%;}"
  } : {
    name: "6f4wyb-Media",
    styles: "box-sizing:border-box;overflow:hidden;&>img,&>iframe{display:block;height:auto;max-width:100%;width:100%;};label:Media;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpRHdCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbi8vIFNpbmNlIHRoZSBib3JkZXIgZm9yIGBDYXJkYCBpcyByZW5kZXJlZCB2aWEgdGhlIGBib3gtc2hhZG93YCBwcm9wZXJ0eVxuLy8gKGFzIG9wcG9zZWQgdG8gdGhlIGBib3JkZXJgIHByb3BlcnR5KSwgdGhlIHZhbHVlIG9mIHRoZSBib3JkZXIgcmFkaXVzIG5lZWRzXG4vLyB0byBiZSBhZGp1c3RlZCBieSByZW1vdmluZyAxcHggKHRoaXMgaXMgYmVjYXVzZSB0aGUgYGJveC1zaGFkb3dgIHJlbmRlcnNcbi8vIGFzIGFuIFwib3V0ZXIgcmFkaXVzXCIpLlxuY29uc3QgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgPSBgY2FsYygkeyBDT05GSUcucmFkaXVzTGFyZ2UgfSAtIDFweClgO1xuXG5leHBvcnQgY29uc3QgQ2FyZCA9IGNzc2Bcblx0Ym94LXNoYWRvdzogMCAwIDAgMXB4ICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfTtcblx0b3V0bGluZTogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBIZWFkZXIgPSBjc3NgXG5cdGJvcmRlci1ib3R0b206IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmxhc3QtY2hpbGQge1xuXHRcdGJvcmRlci1ib3R0b206IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBGb290ZXIgPSBjc3NgXG5cdGJvcmRlci10b3A6IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3A6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBDb250ZW50ID0gY3NzYFxuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgQm9keSA9IGNzc2Bcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0aGVpZ2h0OiBhdXRvO1xuXHRtYXgtaGVpZ2h0OiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuXG5cdCYgPiBpbWcsXG5cdCYgPiBpZnJhbWUge1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdGhlaWdodDogYXV0bztcblx0XHRtYXgtd2lkdGg6IDEwMCU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBEaXZpZGVyID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyUmFkaXVzID0gY3NzYFxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3AtbGVmdC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdFx0Ym9yZGVyLXRvcC1yaWdodC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdH1cblxuXHQmOmxhc3Qtb2YtdHlwZSB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1sZWZ0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbG9yID0gY3NzYFxuXHRib3JkZXItY29sb3I6ICR7IENPTkZJRy5jb2xvckRpdmlkZXIgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBib3hTaGFkb3dsZXNzID0gY3NzYFxuXHRib3gtc2hhZG93OiBub25lO1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlcmxlc3MgPSBjc3NgXG5cdGJvcmRlcjogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCByb3VuZGVkID0gY3NzYFxuXHRib3JkZXItcmFkaXVzOiAkeyBhZGp1c3RlZEJvcmRlclJhZGl1cyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IHNoYWR5ID0gY3NzYFxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkIH07XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__18
  };
  var Divider = false ? {
    name: "c990dr",
    styles: "box-sizing:border-box;display:block;width:100%"
  } : {
    name: "c5mt54-Divider",
    styles: "box-sizing:border-box;display:block;width:100%;label:Divider;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE4RDBCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbi8vIFNpbmNlIHRoZSBib3JkZXIgZm9yIGBDYXJkYCBpcyByZW5kZXJlZCB2aWEgdGhlIGBib3gtc2hhZG93YCBwcm9wZXJ0eVxuLy8gKGFzIG9wcG9zZWQgdG8gdGhlIGBib3JkZXJgIHByb3BlcnR5KSwgdGhlIHZhbHVlIG9mIHRoZSBib3JkZXIgcmFkaXVzIG5lZWRzXG4vLyB0byBiZSBhZGp1c3RlZCBieSByZW1vdmluZyAxcHggKHRoaXMgaXMgYmVjYXVzZSB0aGUgYGJveC1zaGFkb3dgIHJlbmRlcnNcbi8vIGFzIGFuIFwib3V0ZXIgcmFkaXVzXCIpLlxuY29uc3QgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgPSBgY2FsYygkeyBDT05GSUcucmFkaXVzTGFyZ2UgfSAtIDFweClgO1xuXG5leHBvcnQgY29uc3QgQ2FyZCA9IGNzc2Bcblx0Ym94LXNoYWRvdzogMCAwIDAgMXB4ICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfTtcblx0b3V0bGluZTogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBIZWFkZXIgPSBjc3NgXG5cdGJvcmRlci1ib3R0b206IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmxhc3QtY2hpbGQge1xuXHRcdGJvcmRlci1ib3R0b206IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBGb290ZXIgPSBjc3NgXG5cdGJvcmRlci10b3A6IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3A6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBDb250ZW50ID0gY3NzYFxuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgQm9keSA9IGNzc2Bcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0aGVpZ2h0OiBhdXRvO1xuXHRtYXgtaGVpZ2h0OiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuXG5cdCYgPiBpbWcsXG5cdCYgPiBpZnJhbWUge1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdGhlaWdodDogYXV0bztcblx0XHRtYXgtd2lkdGg6IDEwMCU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBEaXZpZGVyID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyUmFkaXVzID0gY3NzYFxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3AtbGVmdC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdFx0Ym9yZGVyLXRvcC1yaWdodC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdH1cblxuXHQmOmxhc3Qtb2YtdHlwZSB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1sZWZ0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbG9yID0gY3NzYFxuXHRib3JkZXItY29sb3I6ICR7IENPTkZJRy5jb2xvckRpdmlkZXIgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBib3hTaGFkb3dsZXNzID0gY3NzYFxuXHRib3gtc2hhZG93OiBub25lO1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlcmxlc3MgPSBjc3NgXG5cdGJvcmRlcjogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCByb3VuZGVkID0gY3NzYFxuXHRib3JkZXItcmFkaXVzOiAkeyBhZGp1c3RlZEJvcmRlclJhZGl1cyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IHNoYWR5ID0gY3NzYFxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkIH07XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__18
  };
  var borderRadius = /* @__PURE__ */ css("&:first-of-type{border-top-left-radius:", adjustedBorderRadius, ";border-top-right-radius:", adjustedBorderRadius, ";}&:last-of-type{border-bottom-left-radius:", adjustedBorderRadius, ";border-bottom-right-radius:", adjustedBorderRadius, ";}" + (false ? "" : ";label:borderRadius;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvRStCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbi8vIFNpbmNlIHRoZSBib3JkZXIgZm9yIGBDYXJkYCBpcyByZW5kZXJlZCB2aWEgdGhlIGBib3gtc2hhZG93YCBwcm9wZXJ0eVxuLy8gKGFzIG9wcG9zZWQgdG8gdGhlIGBib3JkZXJgIHByb3BlcnR5KSwgdGhlIHZhbHVlIG9mIHRoZSBib3JkZXIgcmFkaXVzIG5lZWRzXG4vLyB0byBiZSBhZGp1c3RlZCBieSByZW1vdmluZyAxcHggKHRoaXMgaXMgYmVjYXVzZSB0aGUgYGJveC1zaGFkb3dgIHJlbmRlcnNcbi8vIGFzIGFuIFwib3V0ZXIgcmFkaXVzXCIpLlxuY29uc3QgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgPSBgY2FsYygkeyBDT05GSUcucmFkaXVzTGFyZ2UgfSAtIDFweClgO1xuXG5leHBvcnQgY29uc3QgQ2FyZCA9IGNzc2Bcblx0Ym94LXNoYWRvdzogMCAwIDAgMXB4ICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfTtcblx0b3V0bGluZTogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBIZWFkZXIgPSBjc3NgXG5cdGJvcmRlci1ib3R0b206IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmxhc3QtY2hpbGQge1xuXHRcdGJvcmRlci1ib3R0b206IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBGb290ZXIgPSBjc3NgXG5cdGJvcmRlci10b3A6IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3A6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBDb250ZW50ID0gY3NzYFxuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgQm9keSA9IGNzc2Bcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0aGVpZ2h0OiBhdXRvO1xuXHRtYXgtaGVpZ2h0OiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuXG5cdCYgPiBpbWcsXG5cdCYgPiBpZnJhbWUge1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdGhlaWdodDogYXV0bztcblx0XHRtYXgtd2lkdGg6IDEwMCU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBEaXZpZGVyID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyUmFkaXVzID0gY3NzYFxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3AtbGVmdC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdFx0Ym9yZGVyLXRvcC1yaWdodC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdH1cblxuXHQmOmxhc3Qtb2YtdHlwZSB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1sZWZ0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbG9yID0gY3NzYFxuXHRib3JkZXItY29sb3I6ICR7IENPTkZJRy5jb2xvckRpdmlkZXIgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBib3hTaGFkb3dsZXNzID0gY3NzYFxuXHRib3gtc2hhZG93OiBub25lO1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlcmxlc3MgPSBjc3NgXG5cdGJvcmRlcjogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCByb3VuZGVkID0gY3NzYFxuXHRib3JkZXItcmFkaXVzOiAkeyBhZGp1c3RlZEJvcmRlclJhZGl1cyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IHNoYWR5ID0gY3NzYFxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkIH07XG5gO1xuIl19 */");
  var borderColor = /* @__PURE__ */ css("border-color:", config_values_default.colorDivider, ";" + (false ? "" : ";label:borderColor;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnRjhCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbi8vIFNpbmNlIHRoZSBib3JkZXIgZm9yIGBDYXJkYCBpcyByZW5kZXJlZCB2aWEgdGhlIGBib3gtc2hhZG93YCBwcm9wZXJ0eVxuLy8gKGFzIG9wcG9zZWQgdG8gdGhlIGBib3JkZXJgIHByb3BlcnR5KSwgdGhlIHZhbHVlIG9mIHRoZSBib3JkZXIgcmFkaXVzIG5lZWRzXG4vLyB0byBiZSBhZGp1c3RlZCBieSByZW1vdmluZyAxcHggKHRoaXMgaXMgYmVjYXVzZSB0aGUgYGJveC1zaGFkb3dgIHJlbmRlcnNcbi8vIGFzIGFuIFwib3V0ZXIgcmFkaXVzXCIpLlxuY29uc3QgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgPSBgY2FsYygkeyBDT05GSUcucmFkaXVzTGFyZ2UgfSAtIDFweClgO1xuXG5leHBvcnQgY29uc3QgQ2FyZCA9IGNzc2Bcblx0Ym94LXNoYWRvdzogMCAwIDAgMXB4ICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfTtcblx0b3V0bGluZTogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBIZWFkZXIgPSBjc3NgXG5cdGJvcmRlci1ib3R0b206IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmxhc3QtY2hpbGQge1xuXHRcdGJvcmRlci1ib3R0b206IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBGb290ZXIgPSBjc3NgXG5cdGJvcmRlci10b3A6IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3A6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBDb250ZW50ID0gY3NzYFxuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgQm9keSA9IGNzc2Bcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0aGVpZ2h0OiBhdXRvO1xuXHRtYXgtaGVpZ2h0OiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuXG5cdCYgPiBpbWcsXG5cdCYgPiBpZnJhbWUge1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdGhlaWdodDogYXV0bztcblx0XHRtYXgtd2lkdGg6IDEwMCU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBEaXZpZGVyID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyUmFkaXVzID0gY3NzYFxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3AtbGVmdC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdFx0Ym9yZGVyLXRvcC1yaWdodC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdH1cblxuXHQmOmxhc3Qtb2YtdHlwZSB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1sZWZ0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbG9yID0gY3NzYFxuXHRib3JkZXItY29sb3I6ICR7IENPTkZJRy5jb2xvckRpdmlkZXIgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBib3hTaGFkb3dsZXNzID0gY3NzYFxuXHRib3gtc2hhZG93OiBub25lO1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlcmxlc3MgPSBjc3NgXG5cdGJvcmRlcjogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCByb3VuZGVkID0gY3NzYFxuXHRib3JkZXItcmFkaXVzOiAkeyBhZGp1c3RlZEJvcmRlclJhZGl1cyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IHNoYWR5ID0gY3NzYFxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkIH07XG5gO1xuIl19 */");
  var boxShadowless = false ? {
    name: "1t90u8d",
    styles: "box-shadow:none"
  } : {
    name: "14zofrl-boxShadowless",
    styles: "box-shadow:none;label:boxShadowless;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvRmdDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbi8vIFNpbmNlIHRoZSBib3JkZXIgZm9yIGBDYXJkYCBpcyByZW5kZXJlZCB2aWEgdGhlIGBib3gtc2hhZG93YCBwcm9wZXJ0eVxuLy8gKGFzIG9wcG9zZWQgdG8gdGhlIGBib3JkZXJgIHByb3BlcnR5KSwgdGhlIHZhbHVlIG9mIHRoZSBib3JkZXIgcmFkaXVzIG5lZWRzXG4vLyB0byBiZSBhZGp1c3RlZCBieSByZW1vdmluZyAxcHggKHRoaXMgaXMgYmVjYXVzZSB0aGUgYGJveC1zaGFkb3dgIHJlbmRlcnNcbi8vIGFzIGFuIFwib3V0ZXIgcmFkaXVzXCIpLlxuY29uc3QgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgPSBgY2FsYygkeyBDT05GSUcucmFkaXVzTGFyZ2UgfSAtIDFweClgO1xuXG5leHBvcnQgY29uc3QgQ2FyZCA9IGNzc2Bcblx0Ym94LXNoYWRvdzogMCAwIDAgMXB4ICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfTtcblx0b3V0bGluZTogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBIZWFkZXIgPSBjc3NgXG5cdGJvcmRlci1ib3R0b206IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmxhc3QtY2hpbGQge1xuXHRcdGJvcmRlci1ib3R0b206IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBGb290ZXIgPSBjc3NgXG5cdGJvcmRlci10b3A6IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3A6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBDb250ZW50ID0gY3NzYFxuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgQm9keSA9IGNzc2Bcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0aGVpZ2h0OiBhdXRvO1xuXHRtYXgtaGVpZ2h0OiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuXG5cdCYgPiBpbWcsXG5cdCYgPiBpZnJhbWUge1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdGhlaWdodDogYXV0bztcblx0XHRtYXgtd2lkdGg6IDEwMCU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBEaXZpZGVyID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyUmFkaXVzID0gY3NzYFxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3AtbGVmdC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdFx0Ym9yZGVyLXRvcC1yaWdodC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdH1cblxuXHQmOmxhc3Qtb2YtdHlwZSB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1sZWZ0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbG9yID0gY3NzYFxuXHRib3JkZXItY29sb3I6ICR7IENPTkZJRy5jb2xvckRpdmlkZXIgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBib3hTaGFkb3dsZXNzID0gY3NzYFxuXHRib3gtc2hhZG93OiBub25lO1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlcmxlc3MgPSBjc3NgXG5cdGJvcmRlcjogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCByb3VuZGVkID0gY3NzYFxuXHRib3JkZXItcmFkaXVzOiAkeyBhZGp1c3RlZEJvcmRlclJhZGl1cyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IHNoYWR5ID0gY3NzYFxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkIH07XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__18
  };
  var borderless = false ? {
    name: "1e1ncky",
    styles: "border:none"
  } : {
    name: "kyy9w8-borderless",
    styles: "border:none;label:borderless;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3RjZCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbi8vIFNpbmNlIHRoZSBib3JkZXIgZm9yIGBDYXJkYCBpcyByZW5kZXJlZCB2aWEgdGhlIGBib3gtc2hhZG93YCBwcm9wZXJ0eVxuLy8gKGFzIG9wcG9zZWQgdG8gdGhlIGBib3JkZXJgIHByb3BlcnR5KSwgdGhlIHZhbHVlIG9mIHRoZSBib3JkZXIgcmFkaXVzIG5lZWRzXG4vLyB0byBiZSBhZGp1c3RlZCBieSByZW1vdmluZyAxcHggKHRoaXMgaXMgYmVjYXVzZSB0aGUgYGJveC1zaGFkb3dgIHJlbmRlcnNcbi8vIGFzIGFuIFwib3V0ZXIgcmFkaXVzXCIpLlxuY29uc3QgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgPSBgY2FsYygkeyBDT05GSUcucmFkaXVzTGFyZ2UgfSAtIDFweClgO1xuXG5leHBvcnQgY29uc3QgQ2FyZCA9IGNzc2Bcblx0Ym94LXNoYWRvdzogMCAwIDAgMXB4ICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfTtcblx0b3V0bGluZTogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBIZWFkZXIgPSBjc3NgXG5cdGJvcmRlci1ib3R0b206IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmxhc3QtY2hpbGQge1xuXHRcdGJvcmRlci1ib3R0b206IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBGb290ZXIgPSBjc3NgXG5cdGJvcmRlci10b3A6IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3A6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBDb250ZW50ID0gY3NzYFxuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgQm9keSA9IGNzc2Bcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0aGVpZ2h0OiBhdXRvO1xuXHRtYXgtaGVpZ2h0OiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuXG5cdCYgPiBpbWcsXG5cdCYgPiBpZnJhbWUge1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdGhlaWdodDogYXV0bztcblx0XHRtYXgtd2lkdGg6IDEwMCU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBEaXZpZGVyID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyUmFkaXVzID0gY3NzYFxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3AtbGVmdC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdFx0Ym9yZGVyLXRvcC1yaWdodC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdH1cblxuXHQmOmxhc3Qtb2YtdHlwZSB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1sZWZ0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbG9yID0gY3NzYFxuXHRib3JkZXItY29sb3I6ICR7IENPTkZJRy5jb2xvckRpdmlkZXIgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBib3hTaGFkb3dsZXNzID0gY3NzYFxuXHRib3gtc2hhZG93OiBub25lO1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlcmxlc3MgPSBjc3NgXG5cdGJvcmRlcjogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCByb3VuZGVkID0gY3NzYFxuXHRib3JkZXItcmFkaXVzOiAkeyBhZGp1c3RlZEJvcmRlclJhZGl1cyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IHNoYWR5ID0gY3NzYFxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkIH07XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__18
  };
  var rounded = /* @__PURE__ */ css("border-radius:", adjustedBorderRadius, ";" + (false ? "" : ";label:rounded;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE0RjBCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbi8vIFNpbmNlIHRoZSBib3JkZXIgZm9yIGBDYXJkYCBpcyByZW5kZXJlZCB2aWEgdGhlIGBib3gtc2hhZG93YCBwcm9wZXJ0eVxuLy8gKGFzIG9wcG9zZWQgdG8gdGhlIGBib3JkZXJgIHByb3BlcnR5KSwgdGhlIHZhbHVlIG9mIHRoZSBib3JkZXIgcmFkaXVzIG5lZWRzXG4vLyB0byBiZSBhZGp1c3RlZCBieSByZW1vdmluZyAxcHggKHRoaXMgaXMgYmVjYXVzZSB0aGUgYGJveC1zaGFkb3dgIHJlbmRlcnNcbi8vIGFzIGFuIFwib3V0ZXIgcmFkaXVzXCIpLlxuY29uc3QgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgPSBgY2FsYygkeyBDT05GSUcucmFkaXVzTGFyZ2UgfSAtIDFweClgO1xuXG5leHBvcnQgY29uc3QgQ2FyZCA9IGNzc2Bcblx0Ym94LXNoYWRvdzogMCAwIDAgMXB4ICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfTtcblx0b3V0bGluZTogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBIZWFkZXIgPSBjc3NgXG5cdGJvcmRlci1ib3R0b206IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmxhc3QtY2hpbGQge1xuXHRcdGJvcmRlci1ib3R0b206IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBGb290ZXIgPSBjc3NgXG5cdGJvcmRlci10b3A6IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3A6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBDb250ZW50ID0gY3NzYFxuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgQm9keSA9IGNzc2Bcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0aGVpZ2h0OiBhdXRvO1xuXHRtYXgtaGVpZ2h0OiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuXG5cdCYgPiBpbWcsXG5cdCYgPiBpZnJhbWUge1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdGhlaWdodDogYXV0bztcblx0XHRtYXgtd2lkdGg6IDEwMCU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBEaXZpZGVyID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyUmFkaXVzID0gY3NzYFxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3AtbGVmdC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdFx0Ym9yZGVyLXRvcC1yaWdodC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdH1cblxuXHQmOmxhc3Qtb2YtdHlwZSB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1sZWZ0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbG9yID0gY3NzYFxuXHRib3JkZXItY29sb3I6ICR7IENPTkZJRy5jb2xvckRpdmlkZXIgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBib3hTaGFkb3dsZXNzID0gY3NzYFxuXHRib3gtc2hhZG93OiBub25lO1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlcmxlc3MgPSBjc3NgXG5cdGJvcmRlcjogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCByb3VuZGVkID0gY3NzYFxuXHRib3JkZXItcmFkaXVzOiAkeyBhZGp1c3RlZEJvcmRlclJhZGl1cyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IHNoYWR5ID0gY3NzYFxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkIH07XG5gO1xuIl19 */");
  var shady = /* @__PURE__ */ css("background-color:", COLORS.ui.backgroundDisabled, ";" + (false ? "" : ";label:shady;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnR3dCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbi8vIFNpbmNlIHRoZSBib3JkZXIgZm9yIGBDYXJkYCBpcyByZW5kZXJlZCB2aWEgdGhlIGBib3gtc2hhZG93YCBwcm9wZXJ0eVxuLy8gKGFzIG9wcG9zZWQgdG8gdGhlIGBib3JkZXJgIHByb3BlcnR5KSwgdGhlIHZhbHVlIG9mIHRoZSBib3JkZXIgcmFkaXVzIG5lZWRzXG4vLyB0byBiZSBhZGp1c3RlZCBieSByZW1vdmluZyAxcHggKHRoaXMgaXMgYmVjYXVzZSB0aGUgYGJveC1zaGFkb3dgIHJlbmRlcnNcbi8vIGFzIGFuIFwib3V0ZXIgcmFkaXVzXCIpLlxuY29uc3QgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgPSBgY2FsYygkeyBDT05GSUcucmFkaXVzTGFyZ2UgfSAtIDFweClgO1xuXG5leHBvcnQgY29uc3QgQ2FyZCA9IGNzc2Bcblx0Ym94LXNoYWRvdzogMCAwIDAgMXB4ICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfTtcblx0b3V0bGluZTogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBIZWFkZXIgPSBjc3NgXG5cdGJvcmRlci1ib3R0b206IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmxhc3QtY2hpbGQge1xuXHRcdGJvcmRlci1ib3R0b206IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBGb290ZXIgPSBjc3NgXG5cdGJvcmRlci10b3A6IDFweCBzb2xpZDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3A6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBDb250ZW50ID0gY3NzYFxuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgQm9keSA9IGNzc2Bcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0aGVpZ2h0OiBhdXRvO1xuXHRtYXgtaGVpZ2h0OiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuXG5cdCYgPiBpbWcsXG5cdCYgPiBpZnJhbWUge1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdGhlaWdodDogYXV0bztcblx0XHRtYXgtd2lkdGg6IDEwMCU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBEaXZpZGVyID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBibG9jaztcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyUmFkaXVzID0gY3NzYFxuXHQmOmZpcnN0LW9mLXR5cGUge1xuXHRcdGJvcmRlci10b3AtbGVmdC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdFx0Ym9yZGVyLXRvcC1yaWdodC1yYWRpdXM6ICR7IGFkanVzdGVkQm9yZGVyUmFkaXVzIH07XG5cdH1cblxuXHQmOmxhc3Qtb2YtdHlwZSB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1sZWZ0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogJHsgYWRqdXN0ZWRCb3JkZXJSYWRpdXMgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckNvbG9yID0gY3NzYFxuXHRib3JkZXItY29sb3I6ICR7IENPTkZJRy5jb2xvckRpdmlkZXIgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBib3hTaGFkb3dsZXNzID0gY3NzYFxuXHRib3gtc2hhZG93OiBub25lO1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlcmxlc3MgPSBjc3NgXG5cdGJvcmRlcjogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCByb3VuZGVkID0gY3NzYFxuXHRib3JkZXItcmFkaXVzOiAkeyBhZGp1c3RlZEJvcmRlclJhZGl1cyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IHNoYWR5ID0gY3NzYFxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZERpc2FibGVkIH07XG5gO1xuIl19 */");

  // packages/components/build-module/card/card/hook.mjs
  var import_deprecated11 = __toESM(require_deprecated(), 1);
  var import_element97 = __toESM(require_element(), 1);

  // packages/components/build-module/surface/hook.mjs
  var import_element96 = __toESM(require_element(), 1);

  // packages/components/build-module/surface/styles.mjs
  var Surface = /* @__PURE__ */ css("background-color:", config_values_default.surfaceColor, ";color:", COLORS.gray[900], ";position:relative;" + (false ? "" : ";label:Surface;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFXMEIiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT05GSUcsIENPTE9SUyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgU3VyZmFjZVZhcmlhbnQsIFN1cmZhY2VQcm9wcyB9IGZyb20gJy4vdHlwZXMnO1xuXG5leHBvcnQgY29uc3QgU3VyZmFjZSA9IGNzc2Bcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09ORklHLnN1cmZhY2VDb2xvciB9O1xuXHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDkwMCBdIH07XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBiYWNrZ3JvdW5kID0gY3NzYFxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT05GSUcuc3VyZmFjZUJhY2tncm91bmRDb2xvciB9O1xuYDtcblxuZXhwb3J0IGZ1bmN0aW9uIGdldEJvcmRlcnMoIHtcblx0Ym9yZGVyQm90dG9tLFxuXHRib3JkZXJMZWZ0LFxuXHRib3JkZXJSaWdodCxcblx0Ym9yZGVyVG9wLFxufTogUGljazxcblx0U3VyZmFjZVByb3BzLFxuXHQnYm9yZGVyQm90dG9tJyB8ICdib3JkZXJMZWZ0JyB8ICdib3JkZXJSaWdodCcgfCAnYm9yZGVyVG9wJ1xuPiApIHtcblx0Y29uc3QgYm9yZGVyU3R5bGUgPSBgMXB4IHNvbGlkICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfWA7XG5cblx0cmV0dXJuIGNzcygge1xuXHRcdGJvcmRlckJvdHRvbTogYm9yZGVyQm90dG9tID8gYm9yZGVyU3R5bGUgOiB1bmRlZmluZWQsXG5cdFx0Ym9yZGVyTGVmdDogYm9yZGVyTGVmdCA/IGJvcmRlclN0eWxlIDogdW5kZWZpbmVkLFxuXHRcdGJvcmRlclJpZ2h0OiBib3JkZXJSaWdodCA/IGJvcmRlclN0eWxlIDogdW5kZWZpbmVkLFxuXHRcdGJvcmRlclRvcDogYm9yZGVyVG9wID8gYm9yZGVyU3R5bGUgOiB1bmRlZmluZWQsXG5cdH0gKTtcbn1cblxuZXhwb3J0IGNvbnN0IHByaW1hcnkgPSBjc3NgYDtcblxuZXhwb3J0IGNvbnN0IHNlY29uZGFyeSA9IGNzc2Bcblx0YmFja2dyb3VuZDogJHsgQ09ORklHLnN1cmZhY2VCYWNrZ3JvdW5kVGludENvbG9yIH07XG5gO1xuXG5leHBvcnQgY29uc3QgdGVydGlhcnkgPSBjc3NgXG5cdGJhY2tncm91bmQ6ICR7IENPTkZJRy5zdXJmYWNlQmFja2dyb3VuZFRlcnRpYXJ5Q29sb3IgfTtcbmA7XG5cbmNvbnN0IGN1c3RvbUJhY2tncm91bmRTaXplID0gKCBzdXJmYWNlQmFja2dyb3VuZFNpemU6IHN0cmluZyApID0+XG5cdFsgc3VyZmFjZUJhY2tncm91bmRTaXplLCBzdXJmYWNlQmFja2dyb3VuZFNpemUgXS5qb2luKCAnICcgKTtcblxuY29uc3QgZG90dGVkQmFja2dyb3VuZDEgPSAoIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZDogc3RyaW5nICkgPT5cblx0W1xuXHRcdCc5MGRlZycsXG5cdFx0WyBDT05GSUcuc3VyZmFjZUJhY2tncm91bmRDb2xvciwgc3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkIF0uam9pbihcblx0XHRcdCcgJ1xuXHRcdCksXG5cdFx0J3RyYW5zcGFyZW50IDElJyxcblx0XS5qb2luKCAnLCcgKTtcblxuY29uc3QgZG90dGVkQmFja2dyb3VuZDIgPSAoIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZDogc3RyaW5nICkgPT5cblx0W1xuXHRcdFsgQ09ORklHLnN1cmZhY2VCYWNrZ3JvdW5kQ29sb3IsIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZCBdLmpvaW4oXG5cdFx0XHQnICdcblx0XHQpLFxuXHRcdCd0cmFuc3BhcmVudCAxJScsXG5cdF0uam9pbiggJywnICk7XG5cbmNvbnN0IGRvdHRlZEJhY2tncm91bmRDb21iaW5lZCA9ICggc3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkOiBzdHJpbmcgKSA9PlxuXHRbXG5cdFx0YGxpbmVhci1ncmFkaWVudCggJHsgZG90dGVkQmFja2dyb3VuZDEoXG5cdFx0XHRzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWRcblx0XHQpIH0gKSBjZW50ZXJgLFxuXHRcdGBsaW5lYXItZ3JhZGllbnQoICR7IGRvdHRlZEJhY2tncm91bmQyKFxuXHRcdFx0c3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkXG5cdFx0KSB9ICkgY2VudGVyYCxcblx0XHRDT05GSUcuc3VyZmFjZUJvcmRlckJvbGRDb2xvcixcblx0XS5qb2luKCAnLCcgKTtcblxuZXhwb3J0IGNvbnN0IGdldERvdHRlZCA9IChcblx0c3VyZmFjZUJhY2tncm91bmRTaXplOiBzdHJpbmcsXG5cdHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZDogc3RyaW5nXG4pID0+IGNzc2Bcblx0YmFja2dyb3VuZDogJHsgZG90dGVkQmFja2dyb3VuZENvbWJpbmVkKCBzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWQgKSB9O1xuXHRiYWNrZ3JvdW5kLXNpemU6ICR7IGN1c3RvbUJhY2tncm91bmRTaXplKCBzdXJmYWNlQmFja2dyb3VuZFNpemUgKSB9O1xuYDtcblxuY29uc3QgZ3JpZEJhY2tncm91bmQxID0gW1xuXHRgJHsgQ09ORklHLnN1cmZhY2VCb3JkZXJTdWJ0bGVDb2xvciB9IDFweGAsXG5cdCd0cmFuc3BhcmVudCAxcHgnLFxuXS5qb2luKCAnLCcgKTtcblxuY29uc3QgZ3JpZEJhY2tncm91bmQyID0gW1xuXHQnOTBkZWcnLFxuXHRgJHsgQ09ORklHLnN1cmZhY2VCb3JkZXJTdWJ0bGVDb2xvciB9IDFweGAsXG5cdCd0cmFuc3BhcmVudCAxcHgnLFxuXS5qb2luKCAnLCcgKTtcblxuY29uc3QgZ3JpZEJhY2tncm91bmRDb21iaW5lZCA9IFtcblx0YGxpbmVhci1ncmFkaWVudCggJHsgZ3JpZEJhY2tncm91bmQxIH0gKWAsXG5cdGBsaW5lYXItZ3JhZGllbnQoICR7IGdyaWRCYWNrZ3JvdW5kMiB9IClgLFxuXS5qb2luKCAnLCcgKTtcblxuZXhwb3J0IGNvbnN0IGdldEdyaWQgPSAoIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZTogc3RyaW5nICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IENPTkZJRy5zdXJmYWNlQmFja2dyb3VuZENvbG9yIH07XG5cdFx0YmFja2dyb3VuZC1pbWFnZTogJHsgZ3JpZEJhY2tncm91bmRDb21iaW5lZCB9O1xuXHRcdGJhY2tncm91bmQtc2l6ZTogJHsgY3VzdG9tQmFja2dyb3VuZFNpemUoIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZSApIH07XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgZ2V0VmFyaWFudCA9IChcblx0dmFyaWFudDogU3VyZmFjZVZhcmlhbnQsXG5cdHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZTogc3RyaW5nLFxuXHRzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWQ6IHN0cmluZ1xuKSA9PiB7XG5cdHN3aXRjaCAoIHZhcmlhbnQgKSB7XG5cdFx0Y2FzZSAnZG90dGVkJzoge1xuXHRcdFx0cmV0dXJuIGdldERvdHRlZChcblx0XHRcdFx0c3VyZmFjZUJhY2tncm91bmRTaXplLFxuXHRcdFx0XHRzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWRcblx0XHRcdCk7XG5cdFx0fVxuXHRcdGNhc2UgJ2dyaWQnOiB7XG5cdFx0XHRyZXR1cm4gZ2V0R3JpZCggc3VyZmFjZUJhY2tncm91bmRTaXplICk7XG5cdFx0fVxuXHRcdGNhc2UgJ3ByaW1hcnknOiB7XG5cdFx0XHRyZXR1cm4gcHJpbWFyeTtcblx0XHR9XG5cdFx0Y2FzZSAnc2Vjb25kYXJ5Jzoge1xuXHRcdFx0cmV0dXJuIHNlY29uZGFyeTtcblx0XHR9XG5cdFx0Y2FzZSAndGVydGlhcnknOiB7XG5cdFx0XHRyZXR1cm4gdGVydGlhcnk7XG5cdFx0fVxuXHR9XG59O1xuIl19 */");
  var background = /* @__PURE__ */ css("background-color:", config_values_default.surfaceBackgroundColor, ";" + (false ? "" : ";label:background;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQjZCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09ORklHLCBDT0xPUlMgfSBmcm9tICcuLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7IFN1cmZhY2VWYXJpYW50LCBTdXJmYWNlUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuZXhwb3J0IGNvbnN0IFN1cmZhY2UgPSBjc3NgXG5cdGJhY2tncm91bmQtY29sb3I6ICR7IENPTkZJRy5zdXJmYWNlQ29sb3IgfTtcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA5MDAgXSB9O1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5gO1xuXG5leHBvcnQgY29uc3QgYmFja2dyb3VuZCA9IGNzc2Bcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09ORklHLnN1cmZhY2VCYWNrZ3JvdW5kQ29sb3IgfTtcbmA7XG5cbmV4cG9ydCBmdW5jdGlvbiBnZXRCb3JkZXJzKCB7XG5cdGJvcmRlckJvdHRvbSxcblx0Ym9yZGVyTGVmdCxcblx0Ym9yZGVyUmlnaHQsXG5cdGJvcmRlclRvcCxcbn06IFBpY2s8XG5cdFN1cmZhY2VQcm9wcyxcblx0J2JvcmRlckJvdHRvbScgfCAnYm9yZGVyTGVmdCcgfCAnYm9yZGVyUmlnaHQnIHwgJ2JvcmRlclRvcCdcbj4gKSB7XG5cdGNvbnN0IGJvcmRlclN0eWxlID0gYDFweCBzb2xpZCAkeyBDT05GSUcuc3VyZmFjZUJvcmRlckNvbG9yIH1gO1xuXG5cdHJldHVybiBjc3MoIHtcblx0XHRib3JkZXJCb3R0b206IGJvcmRlckJvdHRvbSA/IGJvcmRlclN0eWxlIDogdW5kZWZpbmVkLFxuXHRcdGJvcmRlckxlZnQ6IGJvcmRlckxlZnQgPyBib3JkZXJTdHlsZSA6IHVuZGVmaW5lZCxcblx0XHRib3JkZXJSaWdodDogYm9yZGVyUmlnaHQgPyBib3JkZXJTdHlsZSA6IHVuZGVmaW5lZCxcblx0XHRib3JkZXJUb3A6IGJvcmRlclRvcCA/IGJvcmRlclN0eWxlIDogdW5kZWZpbmVkLFxuXHR9ICk7XG59XG5cbmV4cG9ydCBjb25zdCBwcmltYXJ5ID0gY3NzYGA7XG5cbmV4cG9ydCBjb25zdCBzZWNvbmRhcnkgPSBjc3NgXG5cdGJhY2tncm91bmQ6ICR7IENPTkZJRy5zdXJmYWNlQmFja2dyb3VuZFRpbnRDb2xvciB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IHRlcnRpYXJ5ID0gY3NzYFxuXHRiYWNrZ3JvdW5kOiAkeyBDT05GSUcuc3VyZmFjZUJhY2tncm91bmRUZXJ0aWFyeUNvbG9yIH07XG5gO1xuXG5jb25zdCBjdXN0b21CYWNrZ3JvdW5kU2l6ZSA9ICggc3VyZmFjZUJhY2tncm91bmRTaXplOiBzdHJpbmcgKSA9PlxuXHRbIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZSwgc3VyZmFjZUJhY2tncm91bmRTaXplIF0uam9pbiggJyAnICk7XG5cbmNvbnN0IGRvdHRlZEJhY2tncm91bmQxID0gKCBzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWQ6IHN0cmluZyApID0+XG5cdFtcblx0XHQnOTBkZWcnLFxuXHRcdFsgQ09ORklHLnN1cmZhY2VCYWNrZ3JvdW5kQ29sb3IsIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZCBdLmpvaW4oXG5cdFx0XHQnICdcblx0XHQpLFxuXHRcdCd0cmFuc3BhcmVudCAxJScsXG5cdF0uam9pbiggJywnICk7XG5cbmNvbnN0IGRvdHRlZEJhY2tncm91bmQyID0gKCBzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWQ6IHN0cmluZyApID0+XG5cdFtcblx0XHRbIENPTkZJRy5zdXJmYWNlQmFja2dyb3VuZENvbG9yLCBzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWQgXS5qb2luKFxuXHRcdFx0JyAnXG5cdFx0KSxcblx0XHQndHJhbnNwYXJlbnQgMSUnLFxuXHRdLmpvaW4oICcsJyApO1xuXG5jb25zdCBkb3R0ZWRCYWNrZ3JvdW5kQ29tYmluZWQgPSAoIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZDogc3RyaW5nICkgPT5cblx0W1xuXHRcdGBsaW5lYXItZ3JhZGllbnQoICR7IGRvdHRlZEJhY2tncm91bmQxKFxuXHRcdFx0c3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkXG5cdFx0KSB9ICkgY2VudGVyYCxcblx0XHRgbGluZWFyLWdyYWRpZW50KCAkeyBkb3R0ZWRCYWNrZ3JvdW5kMihcblx0XHRcdHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZFxuXHRcdCkgfSApIGNlbnRlcmAsXG5cdFx0Q09ORklHLnN1cmZhY2VCb3JkZXJCb2xkQ29sb3IsXG5cdF0uam9pbiggJywnICk7XG5cbmV4cG9ydCBjb25zdCBnZXREb3R0ZWQgPSAoXG5cdHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZTogc3RyaW5nLFxuXHRzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWQ6IHN0cmluZ1xuKSA9PiBjc3NgXG5cdGJhY2tncm91bmQ6ICR7IGRvdHRlZEJhY2tncm91bmRDb21iaW5lZCggc3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkICkgfTtcblx0YmFja2dyb3VuZC1zaXplOiAkeyBjdXN0b21CYWNrZ3JvdW5kU2l6ZSggc3VyZmFjZUJhY2tncm91bmRTaXplICkgfTtcbmA7XG5cbmNvbnN0IGdyaWRCYWNrZ3JvdW5kMSA9IFtcblx0YCR7IENPTkZJRy5zdXJmYWNlQm9yZGVyU3VidGxlQ29sb3IgfSAxcHhgLFxuXHQndHJhbnNwYXJlbnQgMXB4Jyxcbl0uam9pbiggJywnICk7XG5cbmNvbnN0IGdyaWRCYWNrZ3JvdW5kMiA9IFtcblx0JzkwZGVnJyxcblx0YCR7IENPTkZJRy5zdXJmYWNlQm9yZGVyU3VidGxlQ29sb3IgfSAxcHhgLFxuXHQndHJhbnNwYXJlbnQgMXB4Jyxcbl0uam9pbiggJywnICk7XG5cbmNvbnN0IGdyaWRCYWNrZ3JvdW5kQ29tYmluZWQgPSBbXG5cdGBsaW5lYXItZ3JhZGllbnQoICR7IGdyaWRCYWNrZ3JvdW5kMSB9IClgLFxuXHRgbGluZWFyLWdyYWRpZW50KCAkeyBncmlkQmFja2dyb3VuZDIgfSApYCxcbl0uam9pbiggJywnICk7XG5cbmV4cG9ydCBjb25zdCBnZXRHcmlkID0gKCBzdXJmYWNlQmFja2dyb3VuZFNpemU6IHN0cmluZyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBDT05GSUcuc3VyZmFjZUJhY2tncm91bmRDb2xvciB9O1xuXHRcdGJhY2tncm91bmQtaW1hZ2U6ICR7IGdyaWRCYWNrZ3JvdW5kQ29tYmluZWQgfTtcblx0XHRiYWNrZ3JvdW5kLXNpemU6ICR7IGN1c3RvbUJhY2tncm91bmRTaXplKCBzdXJmYWNlQmFja2dyb3VuZFNpemUgKSB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGdldFZhcmlhbnQgPSAoXG5cdHZhcmlhbnQ6IFN1cmZhY2VWYXJpYW50LFxuXHRzdXJmYWNlQmFja2dyb3VuZFNpemU6IHN0cmluZyxcblx0c3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkOiBzdHJpbmdcbikgPT4ge1xuXHRzd2l0Y2ggKCB2YXJpYW50ICkge1xuXHRcdGNhc2UgJ2RvdHRlZCc6IHtcblx0XHRcdHJldHVybiBnZXREb3R0ZWQoXG5cdFx0XHRcdHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZSxcblx0XHRcdFx0c3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkXG5cdFx0XHQpO1xuXHRcdH1cblx0XHRjYXNlICdncmlkJzoge1xuXHRcdFx0cmV0dXJuIGdldEdyaWQoIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZSApO1xuXHRcdH1cblx0XHRjYXNlICdwcmltYXJ5Jzoge1xuXHRcdFx0cmV0dXJuIHByaW1hcnk7XG5cdFx0fVxuXHRcdGNhc2UgJ3NlY29uZGFyeSc6IHtcblx0XHRcdHJldHVybiBzZWNvbmRhcnk7XG5cdFx0fVxuXHRcdGNhc2UgJ3RlcnRpYXJ5Jzoge1xuXHRcdFx0cmV0dXJuIHRlcnRpYXJ5O1xuXHRcdH1cblx0fVxufTtcbiJdfQ== */");
  function getBorders({
    borderBottom,
    borderLeft,
    borderRight,
    borderTop
  }) {
    const borderStyle = `1px solid ${config_values_default.surfaceBorderColor}`;
    return /* @__PURE__ */ css({
      borderBottom: borderBottom ? borderStyle : void 0,
      borderLeft: borderLeft ? borderStyle : void 0,
      borderRight: borderRight ? borderStyle : void 0,
      borderTop: borderTop ? borderStyle : void 0
    }, false ? "" : ";label:getBorders;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnQ1EiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT05GSUcsIENPTE9SUyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgU3VyZmFjZVZhcmlhbnQsIFN1cmZhY2VQcm9wcyB9IGZyb20gJy4vdHlwZXMnO1xuXG5leHBvcnQgY29uc3QgU3VyZmFjZSA9IGNzc2Bcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09ORklHLnN1cmZhY2VDb2xvciB9O1xuXHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDkwMCBdIH07XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBiYWNrZ3JvdW5kID0gY3NzYFxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT05GSUcuc3VyZmFjZUJhY2tncm91bmRDb2xvciB9O1xuYDtcblxuZXhwb3J0IGZ1bmN0aW9uIGdldEJvcmRlcnMoIHtcblx0Ym9yZGVyQm90dG9tLFxuXHRib3JkZXJMZWZ0LFxuXHRib3JkZXJSaWdodCxcblx0Ym9yZGVyVG9wLFxufTogUGljazxcblx0U3VyZmFjZVByb3BzLFxuXHQnYm9yZGVyQm90dG9tJyB8ICdib3JkZXJMZWZ0JyB8ICdib3JkZXJSaWdodCcgfCAnYm9yZGVyVG9wJ1xuPiApIHtcblx0Y29uc3QgYm9yZGVyU3R5bGUgPSBgMXB4IHNvbGlkICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfWA7XG5cblx0cmV0dXJuIGNzcygge1xuXHRcdGJvcmRlckJvdHRvbTogYm9yZGVyQm90dG9tID8gYm9yZGVyU3R5bGUgOiB1bmRlZmluZWQsXG5cdFx0Ym9yZGVyTGVmdDogYm9yZGVyTGVmdCA/IGJvcmRlclN0eWxlIDogdW5kZWZpbmVkLFxuXHRcdGJvcmRlclJpZ2h0OiBib3JkZXJSaWdodCA/IGJvcmRlclN0eWxlIDogdW5kZWZpbmVkLFxuXHRcdGJvcmRlclRvcDogYm9yZGVyVG9wID8gYm9yZGVyU3R5bGUgOiB1bmRlZmluZWQsXG5cdH0gKTtcbn1cblxuZXhwb3J0IGNvbnN0IHByaW1hcnkgPSBjc3NgYDtcblxuZXhwb3J0IGNvbnN0IHNlY29uZGFyeSA9IGNzc2Bcblx0YmFja2dyb3VuZDogJHsgQ09ORklHLnN1cmZhY2VCYWNrZ3JvdW5kVGludENvbG9yIH07XG5gO1xuXG5leHBvcnQgY29uc3QgdGVydGlhcnkgPSBjc3NgXG5cdGJhY2tncm91bmQ6ICR7IENPTkZJRy5zdXJmYWNlQmFja2dyb3VuZFRlcnRpYXJ5Q29sb3IgfTtcbmA7XG5cbmNvbnN0IGN1c3RvbUJhY2tncm91bmRTaXplID0gKCBzdXJmYWNlQmFja2dyb3VuZFNpemU6IHN0cmluZyApID0+XG5cdFsgc3VyZmFjZUJhY2tncm91bmRTaXplLCBzdXJmYWNlQmFja2dyb3VuZFNpemUgXS5qb2luKCAnICcgKTtcblxuY29uc3QgZG90dGVkQmFja2dyb3VuZDEgPSAoIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZDogc3RyaW5nICkgPT5cblx0W1xuXHRcdCc5MGRlZycsXG5cdFx0WyBDT05GSUcuc3VyZmFjZUJhY2tncm91bmRDb2xvciwgc3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkIF0uam9pbihcblx0XHRcdCcgJ1xuXHRcdCksXG5cdFx0J3RyYW5zcGFyZW50IDElJyxcblx0XS5qb2luKCAnLCcgKTtcblxuY29uc3QgZG90dGVkQmFja2dyb3VuZDIgPSAoIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZDogc3RyaW5nICkgPT5cblx0W1xuXHRcdFsgQ09ORklHLnN1cmZhY2VCYWNrZ3JvdW5kQ29sb3IsIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZCBdLmpvaW4oXG5cdFx0XHQnICdcblx0XHQpLFxuXHRcdCd0cmFuc3BhcmVudCAxJScsXG5cdF0uam9pbiggJywnICk7XG5cbmNvbnN0IGRvdHRlZEJhY2tncm91bmRDb21iaW5lZCA9ICggc3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkOiBzdHJpbmcgKSA9PlxuXHRbXG5cdFx0YGxpbmVhci1ncmFkaWVudCggJHsgZG90dGVkQmFja2dyb3VuZDEoXG5cdFx0XHRzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWRcblx0XHQpIH0gKSBjZW50ZXJgLFxuXHRcdGBsaW5lYXItZ3JhZGllbnQoICR7IGRvdHRlZEJhY2tncm91bmQyKFxuXHRcdFx0c3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkXG5cdFx0KSB9ICkgY2VudGVyYCxcblx0XHRDT05GSUcuc3VyZmFjZUJvcmRlckJvbGRDb2xvcixcblx0XS5qb2luKCAnLCcgKTtcblxuZXhwb3J0IGNvbnN0IGdldERvdHRlZCA9IChcblx0c3VyZmFjZUJhY2tncm91bmRTaXplOiBzdHJpbmcsXG5cdHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZDogc3RyaW5nXG4pID0+IGNzc2Bcblx0YmFja2dyb3VuZDogJHsgZG90dGVkQmFja2dyb3VuZENvbWJpbmVkKCBzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWQgKSB9O1xuXHRiYWNrZ3JvdW5kLXNpemU6ICR7IGN1c3RvbUJhY2tncm91bmRTaXplKCBzdXJmYWNlQmFja2dyb3VuZFNpemUgKSB9O1xuYDtcblxuY29uc3QgZ3JpZEJhY2tncm91bmQxID0gW1xuXHRgJHsgQ09ORklHLnN1cmZhY2VCb3JkZXJTdWJ0bGVDb2xvciB9IDFweGAsXG5cdCd0cmFuc3BhcmVudCAxcHgnLFxuXS5qb2luKCAnLCcgKTtcblxuY29uc3QgZ3JpZEJhY2tncm91bmQyID0gW1xuXHQnOTBkZWcnLFxuXHRgJHsgQ09ORklHLnN1cmZhY2VCb3JkZXJTdWJ0bGVDb2xvciB9IDFweGAsXG5cdCd0cmFuc3BhcmVudCAxcHgnLFxuXS5qb2luKCAnLCcgKTtcblxuY29uc3QgZ3JpZEJhY2tncm91bmRDb21iaW5lZCA9IFtcblx0YGxpbmVhci1ncmFkaWVudCggJHsgZ3JpZEJhY2tncm91bmQxIH0gKWAsXG5cdGBsaW5lYXItZ3JhZGllbnQoICR7IGdyaWRCYWNrZ3JvdW5kMiB9IClgLFxuXS5qb2luKCAnLCcgKTtcblxuZXhwb3J0IGNvbnN0IGdldEdyaWQgPSAoIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZTogc3RyaW5nICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IENPTkZJRy5zdXJmYWNlQmFja2dyb3VuZENvbG9yIH07XG5cdFx0YmFja2dyb3VuZC1pbWFnZTogJHsgZ3JpZEJhY2tncm91bmRDb21iaW5lZCB9O1xuXHRcdGJhY2tncm91bmQtc2l6ZTogJHsgY3VzdG9tQmFja2dyb3VuZFNpemUoIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZSApIH07XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgZ2V0VmFyaWFudCA9IChcblx0dmFyaWFudDogU3VyZmFjZVZhcmlhbnQsXG5cdHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZTogc3RyaW5nLFxuXHRzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWQ6IHN0cmluZ1xuKSA9PiB7XG5cdHN3aXRjaCAoIHZhcmlhbnQgKSB7XG5cdFx0Y2FzZSAnZG90dGVkJzoge1xuXHRcdFx0cmV0dXJuIGdldERvdHRlZChcblx0XHRcdFx0c3VyZmFjZUJhY2tncm91bmRTaXplLFxuXHRcdFx0XHRzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWRcblx0XHRcdCk7XG5cdFx0fVxuXHRcdGNhc2UgJ2dyaWQnOiB7XG5cdFx0XHRyZXR1cm4gZ2V0R3JpZCggc3VyZmFjZUJhY2tncm91bmRTaXplICk7XG5cdFx0fVxuXHRcdGNhc2UgJ3ByaW1hcnknOiB7XG5cdFx0XHRyZXR1cm4gcHJpbWFyeTtcblx0XHR9XG5cdFx0Y2FzZSAnc2Vjb25kYXJ5Jzoge1xuXHRcdFx0cmV0dXJuIHNlY29uZGFyeTtcblx0XHR9XG5cdFx0Y2FzZSAndGVydGlhcnknOiB7XG5cdFx0XHRyZXR1cm4gdGVydGlhcnk7XG5cdFx0fVxuXHR9XG59O1xuIl19 */");
  }
  var primary = /* @__PURE__ */ css(false ? "" : ";label:primary;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3QzBCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09ORklHLCBDT0xPUlMgfSBmcm9tICcuLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7IFN1cmZhY2VWYXJpYW50LCBTdXJmYWNlUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuZXhwb3J0IGNvbnN0IFN1cmZhY2UgPSBjc3NgXG5cdGJhY2tncm91bmQtY29sb3I6ICR7IENPTkZJRy5zdXJmYWNlQ29sb3IgfTtcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA5MDAgXSB9O1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5gO1xuXG5leHBvcnQgY29uc3QgYmFja2dyb3VuZCA9IGNzc2Bcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09ORklHLnN1cmZhY2VCYWNrZ3JvdW5kQ29sb3IgfTtcbmA7XG5cbmV4cG9ydCBmdW5jdGlvbiBnZXRCb3JkZXJzKCB7XG5cdGJvcmRlckJvdHRvbSxcblx0Ym9yZGVyTGVmdCxcblx0Ym9yZGVyUmlnaHQsXG5cdGJvcmRlclRvcCxcbn06IFBpY2s8XG5cdFN1cmZhY2VQcm9wcyxcblx0J2JvcmRlckJvdHRvbScgfCAnYm9yZGVyTGVmdCcgfCAnYm9yZGVyUmlnaHQnIHwgJ2JvcmRlclRvcCdcbj4gKSB7XG5cdGNvbnN0IGJvcmRlclN0eWxlID0gYDFweCBzb2xpZCAkeyBDT05GSUcuc3VyZmFjZUJvcmRlckNvbG9yIH1gO1xuXG5cdHJldHVybiBjc3MoIHtcblx0XHRib3JkZXJCb3R0b206IGJvcmRlckJvdHRvbSA/IGJvcmRlclN0eWxlIDogdW5kZWZpbmVkLFxuXHRcdGJvcmRlckxlZnQ6IGJvcmRlckxlZnQgPyBib3JkZXJTdHlsZSA6IHVuZGVmaW5lZCxcblx0XHRib3JkZXJSaWdodDogYm9yZGVyUmlnaHQgPyBib3JkZXJTdHlsZSA6IHVuZGVmaW5lZCxcblx0XHRib3JkZXJUb3A6IGJvcmRlclRvcCA/IGJvcmRlclN0eWxlIDogdW5kZWZpbmVkLFxuXHR9ICk7XG59XG5cbmV4cG9ydCBjb25zdCBwcmltYXJ5ID0gY3NzYGA7XG5cbmV4cG9ydCBjb25zdCBzZWNvbmRhcnkgPSBjc3NgXG5cdGJhY2tncm91bmQ6ICR7IENPTkZJRy5zdXJmYWNlQmFja2dyb3VuZFRpbnRDb2xvciB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IHRlcnRpYXJ5ID0gY3NzYFxuXHRiYWNrZ3JvdW5kOiAkeyBDT05GSUcuc3VyZmFjZUJhY2tncm91bmRUZXJ0aWFyeUNvbG9yIH07XG5gO1xuXG5jb25zdCBjdXN0b21CYWNrZ3JvdW5kU2l6ZSA9ICggc3VyZmFjZUJhY2tncm91bmRTaXplOiBzdHJpbmcgKSA9PlxuXHRbIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZSwgc3VyZmFjZUJhY2tncm91bmRTaXplIF0uam9pbiggJyAnICk7XG5cbmNvbnN0IGRvdHRlZEJhY2tncm91bmQxID0gKCBzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWQ6IHN0cmluZyApID0+XG5cdFtcblx0XHQnOTBkZWcnLFxuXHRcdFsgQ09ORklHLnN1cmZhY2VCYWNrZ3JvdW5kQ29sb3IsIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZCBdLmpvaW4oXG5cdFx0XHQnICdcblx0XHQpLFxuXHRcdCd0cmFuc3BhcmVudCAxJScsXG5cdF0uam9pbiggJywnICk7XG5cbmNvbnN0IGRvdHRlZEJhY2tncm91bmQyID0gKCBzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWQ6IHN0cmluZyApID0+XG5cdFtcblx0XHRbIENPTkZJRy5zdXJmYWNlQmFja2dyb3VuZENvbG9yLCBzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWQgXS5qb2luKFxuXHRcdFx0JyAnXG5cdFx0KSxcblx0XHQndHJhbnNwYXJlbnQgMSUnLFxuXHRdLmpvaW4oICcsJyApO1xuXG5jb25zdCBkb3R0ZWRCYWNrZ3JvdW5kQ29tYmluZWQgPSAoIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZDogc3RyaW5nICkgPT5cblx0W1xuXHRcdGBsaW5lYXItZ3JhZGllbnQoICR7IGRvdHRlZEJhY2tncm91bmQxKFxuXHRcdFx0c3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkXG5cdFx0KSB9ICkgY2VudGVyYCxcblx0XHRgbGluZWFyLWdyYWRpZW50KCAkeyBkb3R0ZWRCYWNrZ3JvdW5kMihcblx0XHRcdHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZFxuXHRcdCkgfSApIGNlbnRlcmAsXG5cdFx0Q09ORklHLnN1cmZhY2VCb3JkZXJCb2xkQ29sb3IsXG5cdF0uam9pbiggJywnICk7XG5cbmV4cG9ydCBjb25zdCBnZXREb3R0ZWQgPSAoXG5cdHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZTogc3RyaW5nLFxuXHRzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWQ6IHN0cmluZ1xuKSA9PiBjc3NgXG5cdGJhY2tncm91bmQ6ICR7IGRvdHRlZEJhY2tncm91bmRDb21iaW5lZCggc3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkICkgfTtcblx0YmFja2dyb3VuZC1zaXplOiAkeyBjdXN0b21CYWNrZ3JvdW5kU2l6ZSggc3VyZmFjZUJhY2tncm91bmRTaXplICkgfTtcbmA7XG5cbmNvbnN0IGdyaWRCYWNrZ3JvdW5kMSA9IFtcblx0YCR7IENPTkZJRy5zdXJmYWNlQm9yZGVyU3VidGxlQ29sb3IgfSAxcHhgLFxuXHQndHJhbnNwYXJlbnQgMXB4Jyxcbl0uam9pbiggJywnICk7XG5cbmNvbnN0IGdyaWRCYWNrZ3JvdW5kMiA9IFtcblx0JzkwZGVnJyxcblx0YCR7IENPTkZJRy5zdXJmYWNlQm9yZGVyU3VidGxlQ29sb3IgfSAxcHhgLFxuXHQndHJhbnNwYXJlbnQgMXB4Jyxcbl0uam9pbiggJywnICk7XG5cbmNvbnN0IGdyaWRCYWNrZ3JvdW5kQ29tYmluZWQgPSBbXG5cdGBsaW5lYXItZ3JhZGllbnQoICR7IGdyaWRCYWNrZ3JvdW5kMSB9IClgLFxuXHRgbGluZWFyLWdyYWRpZW50KCAkeyBncmlkQmFja2dyb3VuZDIgfSApYCxcbl0uam9pbiggJywnICk7XG5cbmV4cG9ydCBjb25zdCBnZXRHcmlkID0gKCBzdXJmYWNlQmFja2dyb3VuZFNpemU6IHN0cmluZyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBDT05GSUcuc3VyZmFjZUJhY2tncm91bmRDb2xvciB9O1xuXHRcdGJhY2tncm91bmQtaW1hZ2U6ICR7IGdyaWRCYWNrZ3JvdW5kQ29tYmluZWQgfTtcblx0XHRiYWNrZ3JvdW5kLXNpemU6ICR7IGN1c3RvbUJhY2tncm91bmRTaXplKCBzdXJmYWNlQmFja2dyb3VuZFNpemUgKSB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGdldFZhcmlhbnQgPSAoXG5cdHZhcmlhbnQ6IFN1cmZhY2VWYXJpYW50LFxuXHRzdXJmYWNlQmFja2dyb3VuZFNpemU6IHN0cmluZyxcblx0c3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkOiBzdHJpbmdcbikgPT4ge1xuXHRzd2l0Y2ggKCB2YXJpYW50ICkge1xuXHRcdGNhc2UgJ2RvdHRlZCc6IHtcblx0XHRcdHJldHVybiBnZXREb3R0ZWQoXG5cdFx0XHRcdHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZSxcblx0XHRcdFx0c3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkXG5cdFx0XHQpO1xuXHRcdH1cblx0XHRjYXNlICdncmlkJzoge1xuXHRcdFx0cmV0dXJuIGdldEdyaWQoIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZSApO1xuXHRcdH1cblx0XHRjYXNlICdwcmltYXJ5Jzoge1xuXHRcdFx0cmV0dXJuIHByaW1hcnk7XG5cdFx0fVxuXHRcdGNhc2UgJ3NlY29uZGFyeSc6IHtcblx0XHRcdHJldHVybiBzZWNvbmRhcnk7XG5cdFx0fVxuXHRcdGNhc2UgJ3RlcnRpYXJ5Jzoge1xuXHRcdFx0cmV0dXJuIHRlcnRpYXJ5O1xuXHRcdH1cblx0fVxufTtcbiJdfQ== */");
  var secondary = /* @__PURE__ */ css("background:", config_values_default.surfaceBackgroundTintColor, ";" + (false ? "" : ";label:secondary;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEwQzRCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09ORklHLCBDT0xPUlMgfSBmcm9tICcuLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7IFN1cmZhY2VWYXJpYW50LCBTdXJmYWNlUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuZXhwb3J0IGNvbnN0IFN1cmZhY2UgPSBjc3NgXG5cdGJhY2tncm91bmQtY29sb3I6ICR7IENPTkZJRy5zdXJmYWNlQ29sb3IgfTtcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA5MDAgXSB9O1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5gO1xuXG5leHBvcnQgY29uc3QgYmFja2dyb3VuZCA9IGNzc2Bcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09ORklHLnN1cmZhY2VCYWNrZ3JvdW5kQ29sb3IgfTtcbmA7XG5cbmV4cG9ydCBmdW5jdGlvbiBnZXRCb3JkZXJzKCB7XG5cdGJvcmRlckJvdHRvbSxcblx0Ym9yZGVyTGVmdCxcblx0Ym9yZGVyUmlnaHQsXG5cdGJvcmRlclRvcCxcbn06IFBpY2s8XG5cdFN1cmZhY2VQcm9wcyxcblx0J2JvcmRlckJvdHRvbScgfCAnYm9yZGVyTGVmdCcgfCAnYm9yZGVyUmlnaHQnIHwgJ2JvcmRlclRvcCdcbj4gKSB7XG5cdGNvbnN0IGJvcmRlclN0eWxlID0gYDFweCBzb2xpZCAkeyBDT05GSUcuc3VyZmFjZUJvcmRlckNvbG9yIH1gO1xuXG5cdHJldHVybiBjc3MoIHtcblx0XHRib3JkZXJCb3R0b206IGJvcmRlckJvdHRvbSA/IGJvcmRlclN0eWxlIDogdW5kZWZpbmVkLFxuXHRcdGJvcmRlckxlZnQ6IGJvcmRlckxlZnQgPyBib3JkZXJTdHlsZSA6IHVuZGVmaW5lZCxcblx0XHRib3JkZXJSaWdodDogYm9yZGVyUmlnaHQgPyBib3JkZXJTdHlsZSA6IHVuZGVmaW5lZCxcblx0XHRib3JkZXJUb3A6IGJvcmRlclRvcCA/IGJvcmRlclN0eWxlIDogdW5kZWZpbmVkLFxuXHR9ICk7XG59XG5cbmV4cG9ydCBjb25zdCBwcmltYXJ5ID0gY3NzYGA7XG5cbmV4cG9ydCBjb25zdCBzZWNvbmRhcnkgPSBjc3NgXG5cdGJhY2tncm91bmQ6ICR7IENPTkZJRy5zdXJmYWNlQmFja2dyb3VuZFRpbnRDb2xvciB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IHRlcnRpYXJ5ID0gY3NzYFxuXHRiYWNrZ3JvdW5kOiAkeyBDT05GSUcuc3VyZmFjZUJhY2tncm91bmRUZXJ0aWFyeUNvbG9yIH07XG5gO1xuXG5jb25zdCBjdXN0b21CYWNrZ3JvdW5kU2l6ZSA9ICggc3VyZmFjZUJhY2tncm91bmRTaXplOiBzdHJpbmcgKSA9PlxuXHRbIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZSwgc3VyZmFjZUJhY2tncm91bmRTaXplIF0uam9pbiggJyAnICk7XG5cbmNvbnN0IGRvdHRlZEJhY2tncm91bmQxID0gKCBzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWQ6IHN0cmluZyApID0+XG5cdFtcblx0XHQnOTBkZWcnLFxuXHRcdFsgQ09ORklHLnN1cmZhY2VCYWNrZ3JvdW5kQ29sb3IsIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZCBdLmpvaW4oXG5cdFx0XHQnICdcblx0XHQpLFxuXHRcdCd0cmFuc3BhcmVudCAxJScsXG5cdF0uam9pbiggJywnICk7XG5cbmNvbnN0IGRvdHRlZEJhY2tncm91bmQyID0gKCBzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWQ6IHN0cmluZyApID0+XG5cdFtcblx0XHRbIENPTkZJRy5zdXJmYWNlQmFja2dyb3VuZENvbG9yLCBzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWQgXS5qb2luKFxuXHRcdFx0JyAnXG5cdFx0KSxcblx0XHQndHJhbnNwYXJlbnQgMSUnLFxuXHRdLmpvaW4oICcsJyApO1xuXG5jb25zdCBkb3R0ZWRCYWNrZ3JvdW5kQ29tYmluZWQgPSAoIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZDogc3RyaW5nICkgPT5cblx0W1xuXHRcdGBsaW5lYXItZ3JhZGllbnQoICR7IGRvdHRlZEJhY2tncm91bmQxKFxuXHRcdFx0c3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkXG5cdFx0KSB9ICkgY2VudGVyYCxcblx0XHRgbGluZWFyLWdyYWRpZW50KCAkeyBkb3R0ZWRCYWNrZ3JvdW5kMihcblx0XHRcdHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZFxuXHRcdCkgfSApIGNlbnRlcmAsXG5cdFx0Q09ORklHLnN1cmZhY2VCb3JkZXJCb2xkQ29sb3IsXG5cdF0uam9pbiggJywnICk7XG5cbmV4cG9ydCBjb25zdCBnZXREb3R0ZWQgPSAoXG5cdHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZTogc3RyaW5nLFxuXHRzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWQ6IHN0cmluZ1xuKSA9PiBjc3NgXG5cdGJhY2tncm91bmQ6ICR7IGRvdHRlZEJhY2tncm91bmRDb21iaW5lZCggc3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkICkgfTtcblx0YmFja2dyb3VuZC1zaXplOiAkeyBjdXN0b21CYWNrZ3JvdW5kU2l6ZSggc3VyZmFjZUJhY2tncm91bmRTaXplICkgfTtcbmA7XG5cbmNvbnN0IGdyaWRCYWNrZ3JvdW5kMSA9IFtcblx0YCR7IENPTkZJRy5zdXJmYWNlQm9yZGVyU3VidGxlQ29sb3IgfSAxcHhgLFxuXHQndHJhbnNwYXJlbnQgMXB4Jyxcbl0uam9pbiggJywnICk7XG5cbmNvbnN0IGdyaWRCYWNrZ3JvdW5kMiA9IFtcblx0JzkwZGVnJyxcblx0YCR7IENPTkZJRy5zdXJmYWNlQm9yZGVyU3VidGxlQ29sb3IgfSAxcHhgLFxuXHQndHJhbnNwYXJlbnQgMXB4Jyxcbl0uam9pbiggJywnICk7XG5cbmNvbnN0IGdyaWRCYWNrZ3JvdW5kQ29tYmluZWQgPSBbXG5cdGBsaW5lYXItZ3JhZGllbnQoICR7IGdyaWRCYWNrZ3JvdW5kMSB9IClgLFxuXHRgbGluZWFyLWdyYWRpZW50KCAkeyBncmlkQmFja2dyb3VuZDIgfSApYCxcbl0uam9pbiggJywnICk7XG5cbmV4cG9ydCBjb25zdCBnZXRHcmlkID0gKCBzdXJmYWNlQmFja2dyb3VuZFNpemU6IHN0cmluZyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBDT05GSUcuc3VyZmFjZUJhY2tncm91bmRDb2xvciB9O1xuXHRcdGJhY2tncm91bmQtaW1hZ2U6ICR7IGdyaWRCYWNrZ3JvdW5kQ29tYmluZWQgfTtcblx0XHRiYWNrZ3JvdW5kLXNpemU6ICR7IGN1c3RvbUJhY2tncm91bmRTaXplKCBzdXJmYWNlQmFja2dyb3VuZFNpemUgKSB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGdldFZhcmlhbnQgPSAoXG5cdHZhcmlhbnQ6IFN1cmZhY2VWYXJpYW50LFxuXHRzdXJmYWNlQmFja2dyb3VuZFNpemU6IHN0cmluZyxcblx0c3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkOiBzdHJpbmdcbikgPT4ge1xuXHRzd2l0Y2ggKCB2YXJpYW50ICkge1xuXHRcdGNhc2UgJ2RvdHRlZCc6IHtcblx0XHRcdHJldHVybiBnZXREb3R0ZWQoXG5cdFx0XHRcdHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZSxcblx0XHRcdFx0c3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkXG5cdFx0XHQpO1xuXHRcdH1cblx0XHRjYXNlICdncmlkJzoge1xuXHRcdFx0cmV0dXJuIGdldEdyaWQoIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZSApO1xuXHRcdH1cblx0XHRjYXNlICdwcmltYXJ5Jzoge1xuXHRcdFx0cmV0dXJuIHByaW1hcnk7XG5cdFx0fVxuXHRcdGNhc2UgJ3NlY29uZGFyeSc6IHtcblx0XHRcdHJldHVybiBzZWNvbmRhcnk7XG5cdFx0fVxuXHRcdGNhc2UgJ3RlcnRpYXJ5Jzoge1xuXHRcdFx0cmV0dXJuIHRlcnRpYXJ5O1xuXHRcdH1cblx0fVxufTtcbiJdfQ== */");
  var tertiary = /* @__PURE__ */ css("background:", config_values_default.surfaceBackgroundTertiaryColor, ";" + (false ? "" : ";label:tertiary;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE4QzJCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09ORklHLCBDT0xPUlMgfSBmcm9tICcuLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7IFN1cmZhY2VWYXJpYW50LCBTdXJmYWNlUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuZXhwb3J0IGNvbnN0IFN1cmZhY2UgPSBjc3NgXG5cdGJhY2tncm91bmQtY29sb3I6ICR7IENPTkZJRy5zdXJmYWNlQ29sb3IgfTtcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA5MDAgXSB9O1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5gO1xuXG5leHBvcnQgY29uc3QgYmFja2dyb3VuZCA9IGNzc2Bcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09ORklHLnN1cmZhY2VCYWNrZ3JvdW5kQ29sb3IgfTtcbmA7XG5cbmV4cG9ydCBmdW5jdGlvbiBnZXRCb3JkZXJzKCB7XG5cdGJvcmRlckJvdHRvbSxcblx0Ym9yZGVyTGVmdCxcblx0Ym9yZGVyUmlnaHQsXG5cdGJvcmRlclRvcCxcbn06IFBpY2s8XG5cdFN1cmZhY2VQcm9wcyxcblx0J2JvcmRlckJvdHRvbScgfCAnYm9yZGVyTGVmdCcgfCAnYm9yZGVyUmlnaHQnIHwgJ2JvcmRlclRvcCdcbj4gKSB7XG5cdGNvbnN0IGJvcmRlclN0eWxlID0gYDFweCBzb2xpZCAkeyBDT05GSUcuc3VyZmFjZUJvcmRlckNvbG9yIH1gO1xuXG5cdHJldHVybiBjc3MoIHtcblx0XHRib3JkZXJCb3R0b206IGJvcmRlckJvdHRvbSA/IGJvcmRlclN0eWxlIDogdW5kZWZpbmVkLFxuXHRcdGJvcmRlckxlZnQ6IGJvcmRlckxlZnQgPyBib3JkZXJTdHlsZSA6IHVuZGVmaW5lZCxcblx0XHRib3JkZXJSaWdodDogYm9yZGVyUmlnaHQgPyBib3JkZXJTdHlsZSA6IHVuZGVmaW5lZCxcblx0XHRib3JkZXJUb3A6IGJvcmRlclRvcCA/IGJvcmRlclN0eWxlIDogdW5kZWZpbmVkLFxuXHR9ICk7XG59XG5cbmV4cG9ydCBjb25zdCBwcmltYXJ5ID0gY3NzYGA7XG5cbmV4cG9ydCBjb25zdCBzZWNvbmRhcnkgPSBjc3NgXG5cdGJhY2tncm91bmQ6ICR7IENPTkZJRy5zdXJmYWNlQmFja2dyb3VuZFRpbnRDb2xvciB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IHRlcnRpYXJ5ID0gY3NzYFxuXHRiYWNrZ3JvdW5kOiAkeyBDT05GSUcuc3VyZmFjZUJhY2tncm91bmRUZXJ0aWFyeUNvbG9yIH07XG5gO1xuXG5jb25zdCBjdXN0b21CYWNrZ3JvdW5kU2l6ZSA9ICggc3VyZmFjZUJhY2tncm91bmRTaXplOiBzdHJpbmcgKSA9PlxuXHRbIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZSwgc3VyZmFjZUJhY2tncm91bmRTaXplIF0uam9pbiggJyAnICk7XG5cbmNvbnN0IGRvdHRlZEJhY2tncm91bmQxID0gKCBzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWQ6IHN0cmluZyApID0+XG5cdFtcblx0XHQnOTBkZWcnLFxuXHRcdFsgQ09ORklHLnN1cmZhY2VCYWNrZ3JvdW5kQ29sb3IsIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZCBdLmpvaW4oXG5cdFx0XHQnICdcblx0XHQpLFxuXHRcdCd0cmFuc3BhcmVudCAxJScsXG5cdF0uam9pbiggJywnICk7XG5cbmNvbnN0IGRvdHRlZEJhY2tncm91bmQyID0gKCBzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWQ6IHN0cmluZyApID0+XG5cdFtcblx0XHRbIENPTkZJRy5zdXJmYWNlQmFja2dyb3VuZENvbG9yLCBzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWQgXS5qb2luKFxuXHRcdFx0JyAnXG5cdFx0KSxcblx0XHQndHJhbnNwYXJlbnQgMSUnLFxuXHRdLmpvaW4oICcsJyApO1xuXG5jb25zdCBkb3R0ZWRCYWNrZ3JvdW5kQ29tYmluZWQgPSAoIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZDogc3RyaW5nICkgPT5cblx0W1xuXHRcdGBsaW5lYXItZ3JhZGllbnQoICR7IGRvdHRlZEJhY2tncm91bmQxKFxuXHRcdFx0c3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkXG5cdFx0KSB9ICkgY2VudGVyYCxcblx0XHRgbGluZWFyLWdyYWRpZW50KCAkeyBkb3R0ZWRCYWNrZ3JvdW5kMihcblx0XHRcdHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZFxuXHRcdCkgfSApIGNlbnRlcmAsXG5cdFx0Q09ORklHLnN1cmZhY2VCb3JkZXJCb2xkQ29sb3IsXG5cdF0uam9pbiggJywnICk7XG5cbmV4cG9ydCBjb25zdCBnZXREb3R0ZWQgPSAoXG5cdHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZTogc3RyaW5nLFxuXHRzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWQ6IHN0cmluZ1xuKSA9PiBjc3NgXG5cdGJhY2tncm91bmQ6ICR7IGRvdHRlZEJhY2tncm91bmRDb21iaW5lZCggc3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkICkgfTtcblx0YmFja2dyb3VuZC1zaXplOiAkeyBjdXN0b21CYWNrZ3JvdW5kU2l6ZSggc3VyZmFjZUJhY2tncm91bmRTaXplICkgfTtcbmA7XG5cbmNvbnN0IGdyaWRCYWNrZ3JvdW5kMSA9IFtcblx0YCR7IENPTkZJRy5zdXJmYWNlQm9yZGVyU3VidGxlQ29sb3IgfSAxcHhgLFxuXHQndHJhbnNwYXJlbnQgMXB4Jyxcbl0uam9pbiggJywnICk7XG5cbmNvbnN0IGdyaWRCYWNrZ3JvdW5kMiA9IFtcblx0JzkwZGVnJyxcblx0YCR7IENPTkZJRy5zdXJmYWNlQm9yZGVyU3VidGxlQ29sb3IgfSAxcHhgLFxuXHQndHJhbnNwYXJlbnQgMXB4Jyxcbl0uam9pbiggJywnICk7XG5cbmNvbnN0IGdyaWRCYWNrZ3JvdW5kQ29tYmluZWQgPSBbXG5cdGBsaW5lYXItZ3JhZGllbnQoICR7IGdyaWRCYWNrZ3JvdW5kMSB9IClgLFxuXHRgbGluZWFyLWdyYWRpZW50KCAkeyBncmlkQmFja2dyb3VuZDIgfSApYCxcbl0uam9pbiggJywnICk7XG5cbmV4cG9ydCBjb25zdCBnZXRHcmlkID0gKCBzdXJmYWNlQmFja2dyb3VuZFNpemU6IHN0cmluZyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiAkeyBDT05GSUcuc3VyZmFjZUJhY2tncm91bmRDb2xvciB9O1xuXHRcdGJhY2tncm91bmQtaW1hZ2U6ICR7IGdyaWRCYWNrZ3JvdW5kQ29tYmluZWQgfTtcblx0XHRiYWNrZ3JvdW5kLXNpemU6ICR7IGN1c3RvbUJhY2tncm91bmRTaXplKCBzdXJmYWNlQmFja2dyb3VuZFNpemUgKSB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGdldFZhcmlhbnQgPSAoXG5cdHZhcmlhbnQ6IFN1cmZhY2VWYXJpYW50LFxuXHRzdXJmYWNlQmFja2dyb3VuZFNpemU6IHN0cmluZyxcblx0c3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkOiBzdHJpbmdcbikgPT4ge1xuXHRzd2l0Y2ggKCB2YXJpYW50ICkge1xuXHRcdGNhc2UgJ2RvdHRlZCc6IHtcblx0XHRcdHJldHVybiBnZXREb3R0ZWQoXG5cdFx0XHRcdHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZSxcblx0XHRcdFx0c3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkXG5cdFx0XHQpO1xuXHRcdH1cblx0XHRjYXNlICdncmlkJzoge1xuXHRcdFx0cmV0dXJuIGdldEdyaWQoIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZSApO1xuXHRcdH1cblx0XHRjYXNlICdwcmltYXJ5Jzoge1xuXHRcdFx0cmV0dXJuIHByaW1hcnk7XG5cdFx0fVxuXHRcdGNhc2UgJ3NlY29uZGFyeSc6IHtcblx0XHRcdHJldHVybiBzZWNvbmRhcnk7XG5cdFx0fVxuXHRcdGNhc2UgJ3RlcnRpYXJ5Jzoge1xuXHRcdFx0cmV0dXJuIHRlcnRpYXJ5O1xuXHRcdH1cblx0fVxufTtcbiJdfQ== */");
  var customBackgroundSize = (surfaceBackgroundSize) => [surfaceBackgroundSize, surfaceBackgroundSize].join(" ");
  var dottedBackground1 = (surfaceBackgroundSizeDotted) => ["90deg", [config_values_default.surfaceBackgroundColor, surfaceBackgroundSizeDotted].join(" "), "transparent 1%"].join(",");
  var dottedBackground2 = (surfaceBackgroundSizeDotted) => [[config_values_default.surfaceBackgroundColor, surfaceBackgroundSizeDotted].join(" "), "transparent 1%"].join(",");
  var dottedBackgroundCombined = (surfaceBackgroundSizeDotted) => [`linear-gradient( ${dottedBackground1(surfaceBackgroundSizeDotted)} ) center`, `linear-gradient( ${dottedBackground2(surfaceBackgroundSizeDotted)} ) center`, config_values_default.surfaceBorderBoldColor].join(",");
  var getDotted = (surfaceBackgroundSize, surfaceBackgroundSizeDotted) => /* @__PURE__ */ css("background:", dottedBackgroundCombined(surfaceBackgroundSizeDotted), ";background-size:", customBackgroundSize(surfaceBackgroundSize), ";" + (false ? "" : ";label:getDotted;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvRlEiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT05GSUcsIENPTE9SUyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgU3VyZmFjZVZhcmlhbnQsIFN1cmZhY2VQcm9wcyB9IGZyb20gJy4vdHlwZXMnO1xuXG5leHBvcnQgY29uc3QgU3VyZmFjZSA9IGNzc2Bcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09ORklHLnN1cmZhY2VDb2xvciB9O1xuXHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDkwMCBdIH07XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBiYWNrZ3JvdW5kID0gY3NzYFxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT05GSUcuc3VyZmFjZUJhY2tncm91bmRDb2xvciB9O1xuYDtcblxuZXhwb3J0IGZ1bmN0aW9uIGdldEJvcmRlcnMoIHtcblx0Ym9yZGVyQm90dG9tLFxuXHRib3JkZXJMZWZ0LFxuXHRib3JkZXJSaWdodCxcblx0Ym9yZGVyVG9wLFxufTogUGljazxcblx0U3VyZmFjZVByb3BzLFxuXHQnYm9yZGVyQm90dG9tJyB8ICdib3JkZXJMZWZ0JyB8ICdib3JkZXJSaWdodCcgfCAnYm9yZGVyVG9wJ1xuPiApIHtcblx0Y29uc3QgYm9yZGVyU3R5bGUgPSBgMXB4IHNvbGlkICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfWA7XG5cblx0cmV0dXJuIGNzcygge1xuXHRcdGJvcmRlckJvdHRvbTogYm9yZGVyQm90dG9tID8gYm9yZGVyU3R5bGUgOiB1bmRlZmluZWQsXG5cdFx0Ym9yZGVyTGVmdDogYm9yZGVyTGVmdCA/IGJvcmRlclN0eWxlIDogdW5kZWZpbmVkLFxuXHRcdGJvcmRlclJpZ2h0OiBib3JkZXJSaWdodCA/IGJvcmRlclN0eWxlIDogdW5kZWZpbmVkLFxuXHRcdGJvcmRlclRvcDogYm9yZGVyVG9wID8gYm9yZGVyU3R5bGUgOiB1bmRlZmluZWQsXG5cdH0gKTtcbn1cblxuZXhwb3J0IGNvbnN0IHByaW1hcnkgPSBjc3NgYDtcblxuZXhwb3J0IGNvbnN0IHNlY29uZGFyeSA9IGNzc2Bcblx0YmFja2dyb3VuZDogJHsgQ09ORklHLnN1cmZhY2VCYWNrZ3JvdW5kVGludENvbG9yIH07XG5gO1xuXG5leHBvcnQgY29uc3QgdGVydGlhcnkgPSBjc3NgXG5cdGJhY2tncm91bmQ6ICR7IENPTkZJRy5zdXJmYWNlQmFja2dyb3VuZFRlcnRpYXJ5Q29sb3IgfTtcbmA7XG5cbmNvbnN0IGN1c3RvbUJhY2tncm91bmRTaXplID0gKCBzdXJmYWNlQmFja2dyb3VuZFNpemU6IHN0cmluZyApID0+XG5cdFsgc3VyZmFjZUJhY2tncm91bmRTaXplLCBzdXJmYWNlQmFja2dyb3VuZFNpemUgXS5qb2luKCAnICcgKTtcblxuY29uc3QgZG90dGVkQmFja2dyb3VuZDEgPSAoIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZDogc3RyaW5nICkgPT5cblx0W1xuXHRcdCc5MGRlZycsXG5cdFx0WyBDT05GSUcuc3VyZmFjZUJhY2tncm91bmRDb2xvciwgc3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkIF0uam9pbihcblx0XHRcdCcgJ1xuXHRcdCksXG5cdFx0J3RyYW5zcGFyZW50IDElJyxcblx0XS5qb2luKCAnLCcgKTtcblxuY29uc3QgZG90dGVkQmFja2dyb3VuZDIgPSAoIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZDogc3RyaW5nICkgPT5cblx0W1xuXHRcdFsgQ09ORklHLnN1cmZhY2VCYWNrZ3JvdW5kQ29sb3IsIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZCBdLmpvaW4oXG5cdFx0XHQnICdcblx0XHQpLFxuXHRcdCd0cmFuc3BhcmVudCAxJScsXG5cdF0uam9pbiggJywnICk7XG5cbmNvbnN0IGRvdHRlZEJhY2tncm91bmRDb21iaW5lZCA9ICggc3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkOiBzdHJpbmcgKSA9PlxuXHRbXG5cdFx0YGxpbmVhci1ncmFkaWVudCggJHsgZG90dGVkQmFja2dyb3VuZDEoXG5cdFx0XHRzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWRcblx0XHQpIH0gKSBjZW50ZXJgLFxuXHRcdGBsaW5lYXItZ3JhZGllbnQoICR7IGRvdHRlZEJhY2tncm91bmQyKFxuXHRcdFx0c3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkXG5cdFx0KSB9ICkgY2VudGVyYCxcblx0XHRDT05GSUcuc3VyZmFjZUJvcmRlckJvbGRDb2xvcixcblx0XS5qb2luKCAnLCcgKTtcblxuZXhwb3J0IGNvbnN0IGdldERvdHRlZCA9IChcblx0c3VyZmFjZUJhY2tncm91bmRTaXplOiBzdHJpbmcsXG5cdHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZDogc3RyaW5nXG4pID0+IGNzc2Bcblx0YmFja2dyb3VuZDogJHsgZG90dGVkQmFja2dyb3VuZENvbWJpbmVkKCBzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWQgKSB9O1xuXHRiYWNrZ3JvdW5kLXNpemU6ICR7IGN1c3RvbUJhY2tncm91bmRTaXplKCBzdXJmYWNlQmFja2dyb3VuZFNpemUgKSB9O1xuYDtcblxuY29uc3QgZ3JpZEJhY2tncm91bmQxID0gW1xuXHRgJHsgQ09ORklHLnN1cmZhY2VCb3JkZXJTdWJ0bGVDb2xvciB9IDFweGAsXG5cdCd0cmFuc3BhcmVudCAxcHgnLFxuXS5qb2luKCAnLCcgKTtcblxuY29uc3QgZ3JpZEJhY2tncm91bmQyID0gW1xuXHQnOTBkZWcnLFxuXHRgJHsgQ09ORklHLnN1cmZhY2VCb3JkZXJTdWJ0bGVDb2xvciB9IDFweGAsXG5cdCd0cmFuc3BhcmVudCAxcHgnLFxuXS5qb2luKCAnLCcgKTtcblxuY29uc3QgZ3JpZEJhY2tncm91bmRDb21iaW5lZCA9IFtcblx0YGxpbmVhci1ncmFkaWVudCggJHsgZ3JpZEJhY2tncm91bmQxIH0gKWAsXG5cdGBsaW5lYXItZ3JhZGllbnQoICR7IGdyaWRCYWNrZ3JvdW5kMiB9IClgLFxuXS5qb2luKCAnLCcgKTtcblxuZXhwb3J0IGNvbnN0IGdldEdyaWQgPSAoIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZTogc3RyaW5nICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IENPTkZJRy5zdXJmYWNlQmFja2dyb3VuZENvbG9yIH07XG5cdFx0YmFja2dyb3VuZC1pbWFnZTogJHsgZ3JpZEJhY2tncm91bmRDb21iaW5lZCB9O1xuXHRcdGJhY2tncm91bmQtc2l6ZTogJHsgY3VzdG9tQmFja2dyb3VuZFNpemUoIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZSApIH07XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgZ2V0VmFyaWFudCA9IChcblx0dmFyaWFudDogU3VyZmFjZVZhcmlhbnQsXG5cdHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZTogc3RyaW5nLFxuXHRzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWQ6IHN0cmluZ1xuKSA9PiB7XG5cdHN3aXRjaCAoIHZhcmlhbnQgKSB7XG5cdFx0Y2FzZSAnZG90dGVkJzoge1xuXHRcdFx0cmV0dXJuIGdldERvdHRlZChcblx0XHRcdFx0c3VyZmFjZUJhY2tncm91bmRTaXplLFxuXHRcdFx0XHRzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWRcblx0XHRcdCk7XG5cdFx0fVxuXHRcdGNhc2UgJ2dyaWQnOiB7XG5cdFx0XHRyZXR1cm4gZ2V0R3JpZCggc3VyZmFjZUJhY2tncm91bmRTaXplICk7XG5cdFx0fVxuXHRcdGNhc2UgJ3ByaW1hcnknOiB7XG5cdFx0XHRyZXR1cm4gcHJpbWFyeTtcblx0XHR9XG5cdFx0Y2FzZSAnc2Vjb25kYXJ5Jzoge1xuXHRcdFx0cmV0dXJuIHNlY29uZGFyeTtcblx0XHR9XG5cdFx0Y2FzZSAndGVydGlhcnknOiB7XG5cdFx0XHRyZXR1cm4gdGVydGlhcnk7XG5cdFx0fVxuXHR9XG59O1xuIl19 */");
  var gridBackground1 = [`${config_values_default.surfaceBorderSubtleColor} 1px`, "transparent 1px"].join(",");
  var gridBackground2 = ["90deg", `${config_values_default.surfaceBorderSubtleColor} 1px`, "transparent 1px"].join(",");
  var gridBackgroundCombined = [`linear-gradient( ${gridBackground1} )`, `linear-gradient( ${gridBackground2} )`].join(",");
  var getGrid = (surfaceBackgroundSize) => {
    return /* @__PURE__ */ css("background:", config_values_default.surfaceBackgroundColor, ";background-image:", gridBackgroundCombined, ";background-size:", customBackgroundSize(surfaceBackgroundSize), ";" + (false ? "" : ";label:getGrid;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEwR1ciLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT05GSUcsIENPTE9SUyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgU3VyZmFjZVZhcmlhbnQsIFN1cmZhY2VQcm9wcyB9IGZyb20gJy4vdHlwZXMnO1xuXG5leHBvcnQgY29uc3QgU3VyZmFjZSA9IGNzc2Bcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09ORklHLnN1cmZhY2VDb2xvciB9O1xuXHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDkwMCBdIH07XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBiYWNrZ3JvdW5kID0gY3NzYFxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT05GSUcuc3VyZmFjZUJhY2tncm91bmRDb2xvciB9O1xuYDtcblxuZXhwb3J0IGZ1bmN0aW9uIGdldEJvcmRlcnMoIHtcblx0Ym9yZGVyQm90dG9tLFxuXHRib3JkZXJMZWZ0LFxuXHRib3JkZXJSaWdodCxcblx0Ym9yZGVyVG9wLFxufTogUGljazxcblx0U3VyZmFjZVByb3BzLFxuXHQnYm9yZGVyQm90dG9tJyB8ICdib3JkZXJMZWZ0JyB8ICdib3JkZXJSaWdodCcgfCAnYm9yZGVyVG9wJ1xuPiApIHtcblx0Y29uc3QgYm9yZGVyU3R5bGUgPSBgMXB4IHNvbGlkICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfWA7XG5cblx0cmV0dXJuIGNzcygge1xuXHRcdGJvcmRlckJvdHRvbTogYm9yZGVyQm90dG9tID8gYm9yZGVyU3R5bGUgOiB1bmRlZmluZWQsXG5cdFx0Ym9yZGVyTGVmdDogYm9yZGVyTGVmdCA/IGJvcmRlclN0eWxlIDogdW5kZWZpbmVkLFxuXHRcdGJvcmRlclJpZ2h0OiBib3JkZXJSaWdodCA/IGJvcmRlclN0eWxlIDogdW5kZWZpbmVkLFxuXHRcdGJvcmRlclRvcDogYm9yZGVyVG9wID8gYm9yZGVyU3R5bGUgOiB1bmRlZmluZWQsXG5cdH0gKTtcbn1cblxuZXhwb3J0IGNvbnN0IHByaW1hcnkgPSBjc3NgYDtcblxuZXhwb3J0IGNvbnN0IHNlY29uZGFyeSA9IGNzc2Bcblx0YmFja2dyb3VuZDogJHsgQ09ORklHLnN1cmZhY2VCYWNrZ3JvdW5kVGludENvbG9yIH07XG5gO1xuXG5leHBvcnQgY29uc3QgdGVydGlhcnkgPSBjc3NgXG5cdGJhY2tncm91bmQ6ICR7IENPTkZJRy5zdXJmYWNlQmFja2dyb3VuZFRlcnRpYXJ5Q29sb3IgfTtcbmA7XG5cbmNvbnN0IGN1c3RvbUJhY2tncm91bmRTaXplID0gKCBzdXJmYWNlQmFja2dyb3VuZFNpemU6IHN0cmluZyApID0+XG5cdFsgc3VyZmFjZUJhY2tncm91bmRTaXplLCBzdXJmYWNlQmFja2dyb3VuZFNpemUgXS5qb2luKCAnICcgKTtcblxuY29uc3QgZG90dGVkQmFja2dyb3VuZDEgPSAoIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZDogc3RyaW5nICkgPT5cblx0W1xuXHRcdCc5MGRlZycsXG5cdFx0WyBDT05GSUcuc3VyZmFjZUJhY2tncm91bmRDb2xvciwgc3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkIF0uam9pbihcblx0XHRcdCcgJ1xuXHRcdCksXG5cdFx0J3RyYW5zcGFyZW50IDElJyxcblx0XS5qb2luKCAnLCcgKTtcblxuY29uc3QgZG90dGVkQmFja2dyb3VuZDIgPSAoIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZDogc3RyaW5nICkgPT5cblx0W1xuXHRcdFsgQ09ORklHLnN1cmZhY2VCYWNrZ3JvdW5kQ29sb3IsIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZCBdLmpvaW4oXG5cdFx0XHQnICdcblx0XHQpLFxuXHRcdCd0cmFuc3BhcmVudCAxJScsXG5cdF0uam9pbiggJywnICk7XG5cbmNvbnN0IGRvdHRlZEJhY2tncm91bmRDb21iaW5lZCA9ICggc3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkOiBzdHJpbmcgKSA9PlxuXHRbXG5cdFx0YGxpbmVhci1ncmFkaWVudCggJHsgZG90dGVkQmFja2dyb3VuZDEoXG5cdFx0XHRzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWRcblx0XHQpIH0gKSBjZW50ZXJgLFxuXHRcdGBsaW5lYXItZ3JhZGllbnQoICR7IGRvdHRlZEJhY2tncm91bmQyKFxuXHRcdFx0c3VyZmFjZUJhY2tncm91bmRTaXplRG90dGVkXG5cdFx0KSB9ICkgY2VudGVyYCxcblx0XHRDT05GSUcuc3VyZmFjZUJvcmRlckJvbGRDb2xvcixcblx0XS5qb2luKCAnLCcgKTtcblxuZXhwb3J0IGNvbnN0IGdldERvdHRlZCA9IChcblx0c3VyZmFjZUJhY2tncm91bmRTaXplOiBzdHJpbmcsXG5cdHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZURvdHRlZDogc3RyaW5nXG4pID0+IGNzc2Bcblx0YmFja2dyb3VuZDogJHsgZG90dGVkQmFja2dyb3VuZENvbWJpbmVkKCBzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWQgKSB9O1xuXHRiYWNrZ3JvdW5kLXNpemU6ICR7IGN1c3RvbUJhY2tncm91bmRTaXplKCBzdXJmYWNlQmFja2dyb3VuZFNpemUgKSB9O1xuYDtcblxuY29uc3QgZ3JpZEJhY2tncm91bmQxID0gW1xuXHRgJHsgQ09ORklHLnN1cmZhY2VCb3JkZXJTdWJ0bGVDb2xvciB9IDFweGAsXG5cdCd0cmFuc3BhcmVudCAxcHgnLFxuXS5qb2luKCAnLCcgKTtcblxuY29uc3QgZ3JpZEJhY2tncm91bmQyID0gW1xuXHQnOTBkZWcnLFxuXHRgJHsgQ09ORklHLnN1cmZhY2VCb3JkZXJTdWJ0bGVDb2xvciB9IDFweGAsXG5cdCd0cmFuc3BhcmVudCAxcHgnLFxuXS5qb2luKCAnLCcgKTtcblxuY29uc3QgZ3JpZEJhY2tncm91bmRDb21iaW5lZCA9IFtcblx0YGxpbmVhci1ncmFkaWVudCggJHsgZ3JpZEJhY2tncm91bmQxIH0gKWAsXG5cdGBsaW5lYXItZ3JhZGllbnQoICR7IGdyaWRCYWNrZ3JvdW5kMiB9IClgLFxuXS5qb2luKCAnLCcgKTtcblxuZXhwb3J0IGNvbnN0IGdldEdyaWQgPSAoIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZTogc3RyaW5nICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGJhY2tncm91bmQ6ICR7IENPTkZJRy5zdXJmYWNlQmFja2dyb3VuZENvbG9yIH07XG5cdFx0YmFja2dyb3VuZC1pbWFnZTogJHsgZ3JpZEJhY2tncm91bmRDb21iaW5lZCB9O1xuXHRcdGJhY2tncm91bmQtc2l6ZTogJHsgY3VzdG9tQmFja2dyb3VuZFNpemUoIHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZSApIH07XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgZ2V0VmFyaWFudCA9IChcblx0dmFyaWFudDogU3VyZmFjZVZhcmlhbnQsXG5cdHN1cmZhY2VCYWNrZ3JvdW5kU2l6ZTogc3RyaW5nLFxuXHRzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWQ6IHN0cmluZ1xuKSA9PiB7XG5cdHN3aXRjaCAoIHZhcmlhbnQgKSB7XG5cdFx0Y2FzZSAnZG90dGVkJzoge1xuXHRcdFx0cmV0dXJuIGdldERvdHRlZChcblx0XHRcdFx0c3VyZmFjZUJhY2tncm91bmRTaXplLFxuXHRcdFx0XHRzdXJmYWNlQmFja2dyb3VuZFNpemVEb3R0ZWRcblx0XHRcdCk7XG5cdFx0fVxuXHRcdGNhc2UgJ2dyaWQnOiB7XG5cdFx0XHRyZXR1cm4gZ2V0R3JpZCggc3VyZmFjZUJhY2tncm91bmRTaXplICk7XG5cdFx0fVxuXHRcdGNhc2UgJ3ByaW1hcnknOiB7XG5cdFx0XHRyZXR1cm4gcHJpbWFyeTtcblx0XHR9XG5cdFx0Y2FzZSAnc2Vjb25kYXJ5Jzoge1xuXHRcdFx0cmV0dXJuIHNlY29uZGFyeTtcblx0XHR9XG5cdFx0Y2FzZSAndGVydGlhcnknOiB7XG5cdFx0XHRyZXR1cm4gdGVydGlhcnk7XG5cdFx0fVxuXHR9XG59O1xuIl19 */");
  };
  var getVariant = (variant, surfaceBackgroundSize, surfaceBackgroundSizeDotted) => {
    switch (variant) {
      case "dotted": {
        return getDotted(surfaceBackgroundSize, surfaceBackgroundSizeDotted);
      }
      case "grid": {
        return getGrid(surfaceBackgroundSize);
      }
      case "primary": {
        return primary;
      }
      case "secondary": {
        return secondary;
      }
      case "tertiary": {
        return tertiary;
      }
    }
  };

  // packages/components/build-module/surface/hook.mjs
  function useSurface(props) {
    const {
      backgroundSize = 12,
      borderBottom = false,
      borderLeft = false,
      borderRight = false,
      borderTop = false,
      className: className2,
      variant = "primary",
      ...otherProps
    } = useContextSystem(props, "Surface");
    const cx3 = useCx();
    const classes = (0, import_element96.useMemo)(() => {
      const sx = {
        borders: getBorders({
          borderBottom,
          borderLeft,
          borderRight,
          borderTop
        })
      };
      return cx3(Surface, sx.borders, getVariant(variant, `${backgroundSize}px`, `${backgroundSize - 1}px`), className2);
    }, [backgroundSize, borderBottom, borderLeft, borderRight, borderTop, className2, cx3, variant]);
    return {
      ...otherProps,
      className: classes
    };
  }

  // packages/components/build-module/surface/component.mjs
  var import_jsx_runtime160 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedSurface(props, forwardedRef) {
    const surfaceProps = useSurface(props);
    return /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(component_default, {
      ...surfaceProps,
      ref: forwardedRef
    });
  }
  var Surface2 = contextConnect(UnconnectedSurface, "Surface");
  var component_default26 = Surface2;

  // packages/components/build-module/card/card/hook.mjs
  function useDeprecatedProps4({
    elevation,
    isElevated,
    ...otherProps
  }) {
    const propsToReturn = {
      ...otherProps
    };
    let computedElevation = elevation;
    if (isElevated) {
      (0, import_deprecated11.default)("Card isElevated prop", {
        since: "5.9",
        alternative: "elevation"
      });
      computedElevation ??= 2;
    }
    if (typeof computedElevation !== "undefined") {
      propsToReturn.elevation = computedElevation;
    }
    return propsToReturn;
  }
  function useCard(props) {
    const {
      className: className2,
      elevation = 0,
      isBorderless = false,
      isRounded = true,
      size: size3 = "medium",
      ...otherProps
    } = useContextSystem(useDeprecatedProps4(props), "Card");
    const cx3 = useCx();
    const classes = (0, import_element97.useMemo)(() => {
      return cx3(Card, isBorderless && boxShadowless, isRounded && rounded, className2);
    }, [className2, cx3, isBorderless, isRounded]);
    const surfaceProps = useSurface({
      ...otherProps,
      className: classes
    });
    return {
      ...surfaceProps,
      elevation,
      isBorderless,
      isRounded,
      size: size3
    };
  }

  // packages/components/build-module/card/card/component.mjs
  var import_jsx_runtime161 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedCard(props, forwardedRef) {
    const {
      children,
      elevation,
      isBorderless,
      isRounded,
      size: size3,
      ...otherProps
    } = useCard(props);
    const elevationBorderRadius = isRounded ? config_values_default.radiusLarge : 0;
    const cx3 = useCx();
    const elevationClassName = (0, import_element98.useMemo)(() => cx3(/* @__PURE__ */ css({
      borderRadius: elevationBorderRadius
    }, false ? "" : ";label:elevationClassName;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbXBvbmVudC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBeUNZIiwiZmlsZSI6ImNvbXBvbmVudC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgdHlwZSB7IEZvcndhcmRlZFJlZiB9IGZyb20gJ3JlYWN0JztcblxuLyoqXG4gKiBXb3JkUHJlc3MgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IHVzZU1lbW8gfSBmcm9tICdAd29yZHByZXNzL2VsZW1lbnQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzIH0gZnJvbSAnLi4vLi4vY29udGV4dCc7XG5pbXBvcnQgeyBjb250ZXh0Q29ubmVjdCwgQ29udGV4dFN5c3RlbVByb3ZpZGVyIH0gZnJvbSAnLi4vLi4vY29udGV4dCc7XG5pbXBvcnQgeyBFbGV2YXRpb24gfSBmcm9tICcuLi8uLi9lbGV2YXRpb24nO1xuaW1wb3J0IHsgVmlldyB9IGZyb20gJy4uLy4uL3ZpZXcnO1xuaW1wb3J0ICogYXMgc3R5bGVzIGZyb20gJy4uL3N0eWxlcyc7XG5pbXBvcnQgeyB1c2VDYXJkIH0gZnJvbSAnLi9ob29rJztcbmltcG9ydCBDT05GSUcgZnJvbSAnLi4vLi4vdXRpbHMvY29uZmlnLXZhbHVlcyc7XG5pbXBvcnQgeyB1c2VDeCB9IGZyb20gJy4uLy4uL3V0aWxzL2hvb2tzL3VzZS1jeCc7XG5pbXBvcnQgdHlwZSB7IFByb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuXG5mdW5jdGlvbiBVbmNvbm5lY3RlZENhcmQoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczwgUHJvcHMsICdkaXYnID4sXG5cdGZvcndhcmRlZFJlZjogRm9yd2FyZGVkUmVmPCBhbnkgPlxuKSB7XG5cdGNvbnN0IHtcblx0XHRjaGlsZHJlbixcblx0XHRlbGV2YXRpb24sXG5cdFx0aXNCb3JkZXJsZXNzLFxuXHRcdGlzUm91bmRlZCxcblx0XHRzaXplLFxuXHRcdC4uLm90aGVyUHJvcHNcblx0fSA9IHVzZUNhcmQoIHByb3BzICk7XG5cdGNvbnN0IGVsZXZhdGlvbkJvcmRlclJhZGl1cyA9IGlzUm91bmRlZCA/IENPTkZJRy5yYWRpdXNMYXJnZSA6IDA7XG5cblx0Y29uc3QgY3ggPSB1c2VDeCgpO1xuXG5cdGNvbnN0IGVsZXZhdGlvbkNsYXNzTmFtZSA9IHVzZU1lbW8oXG5cdFx0KCkgPT4gY3goIGNzcyggeyBib3JkZXJSYWRpdXM6IGVsZXZhdGlvbkJvcmRlclJhZGl1cyB9ICkgKSxcblx0XHRbIGN4LCBlbGV2YXRpb25Cb3JkZXJSYWRpdXMgXVxuXHQpO1xuXG5cdGNvbnN0IGNvbnRleHRQcm92aWRlclZhbHVlID0gdXNlTWVtbyggKCkgPT4ge1xuXHRcdGNvbnN0IGNvbnRleHRQcm9wcyA9IHtcblx0XHRcdHNpemUsXG5cdFx0XHRpc0JvcmRlcmxlc3MsXG5cdFx0fTtcblx0XHRyZXR1cm4ge1xuXHRcdFx0Q2FyZEJvZHk6IGNvbnRleHRQcm9wcyxcblx0XHRcdENhcmRIZWFkZXI6IGNvbnRleHRQcm9wcyxcblx0XHRcdENhcmRGb290ZXI6IGNvbnRleHRQcm9wcyxcblx0XHR9O1xuXHR9LCBbIGlzQm9yZGVybGVzcywgc2l6ZSBdICk7XG5cblx0cmV0dXJuIChcblx0XHQ8Q29udGV4dFN5c3RlbVByb3ZpZGVyIHZhbHVlPXsgY29udGV4dFByb3ZpZGVyVmFsdWUgfT5cblx0XHRcdDxWaWV3IHsgLi4ub3RoZXJQcm9wcyB9IHJlZj17IGZvcndhcmRlZFJlZiB9PlxuXHRcdFx0XHQ8VmlldyBjbGFzc05hbWU9eyBjeCggc3R5bGVzLkNvbnRlbnQgKSB9PnsgY2hpbGRyZW4gfTwvVmlldz5cblx0XHRcdFx0PEVsZXZhdGlvblxuXHRcdFx0XHRcdGNsYXNzTmFtZT17IGVsZXZhdGlvbkNsYXNzTmFtZSB9XG5cdFx0XHRcdFx0aXNJbnRlcmFjdGl2ZT17IGZhbHNlIH1cblx0XHRcdFx0XHR2YWx1ZT17IGVsZXZhdGlvbiA/IDEgOiAwIH1cblx0XHRcdFx0Lz5cblx0XHRcdFx0PEVsZXZhdGlvblxuXHRcdFx0XHRcdGNsYXNzTmFtZT17IGVsZXZhdGlvbkNsYXNzTmFtZSB9XG5cdFx0XHRcdFx0aXNJbnRlcmFjdGl2ZT17IGZhbHNlIH1cblx0XHRcdFx0XHR2YWx1ZT17IGVsZXZhdGlvbiB9XG5cdFx0XHRcdC8+XG5cdFx0XHQ8L1ZpZXc+XG5cdFx0PC9Db250ZXh0U3lzdGVtUHJvdmlkZXI+XG5cdCk7XG59XG5cbi8qKlxuICogYENhcmRgIHByb3ZpZGVzIGEgZmxleGlibGUgYW5kIGV4dGVuc2libGUgY29udGVudCBjb250YWluZXIuXG4gKiBgQ2FyZGAgYWxzbyBwcm92aWRlcyBhIGNvbnZlbmllbnQgc2V0IG9mIHN1Yi1jb21wb25lbnRzIHN1Y2ggYXMgYENhcmRCb2R5YCxcbiAqIGBDYXJkSGVhZGVyYCwgYENhcmRGb290ZXJgLCBhbmQgbW9yZS5cbiAqXG4gKiBgYGBqc3hcbiAqIGltcG9ydCB7XG4gKiAgIENhcmQsXG4gKiAgIENhcmRIZWFkZXIsXG4gKiAgIENhcmRCb2R5LFxuICogICBDYXJkRm9vdGVyLFxuICogICBfX2V4cGVyaW1lbnRhbFRleHQgYXMgVGV4dCxcbiAqICAgX19leHBlcmltZW50YWxIZWFkaW5nIGFzIEhlYWRpbmcsXG4gKiB9IGZyb20gYEB3b3JkcHJlc3MvY29tcG9uZW50c2A7XG4gKlxuICogZnVuY3Rpb24gRXhhbXBsZSgpIHtcbiAqICAgcmV0dXJuIChcbiAqICAgICA8Q2FyZD5cbiAqICAgICAgIDxDYXJkSGVhZGVyPlxuICogICAgICAgICA8SGVhZGluZyBsZXZlbD17IDQgfT5DYXJkIFRpdGxlPC9IZWFkaW5nPlxuICogICAgICAgPC9DYXJkSGVhZGVyPlxuICogICAgICAgPENhcmRCb2R5PlxuICogICAgICAgICA8VGV4dD5DYXJkIENvbnRlbnQ8L1RleHQ+XG4gKiAgICAgICA8L0NhcmRCb2R5PlxuICogICAgICAgPENhcmRGb290ZXI+XG4gKiAgICAgICAgIDxUZXh0PkNhcmQgRm9vdGVyPC9UZXh0PlxuICogICAgICAgPC9DYXJkRm9vdGVyPlxuICogICAgIDwvQ2FyZD5cbiAqICAgKTtcbiAqIH1cbiAqIGBgYFxuICovXG5leHBvcnQgY29uc3QgQ2FyZCA9IGNvbnRleHRDb25uZWN0KCBVbmNvbm5lY3RlZENhcmQsICdDYXJkJyApO1xuXG5leHBvcnQgZGVmYXVsdCBDYXJkO1xuIl19 */")), [cx3, elevationBorderRadius]);
    const contextProviderValue = (0, import_element98.useMemo)(() => {
      const contextProps = {
        size: size3,
        isBorderless
      };
      return {
        CardBody: contextProps,
        CardHeader: contextProps,
        CardFooter: contextProps
      };
    }, [isBorderless, size3]);
    return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(ContextSystemProvider, {
      value: contextProviderValue,
      children: /* @__PURE__ */ (0, import_jsx_runtime161.jsxs)(component_default, {
        ...otherProps,
        ref: forwardedRef,
        children: [/* @__PURE__ */ (0, import_jsx_runtime161.jsx)(component_default, {
          className: cx3(Content),
          children
        }), /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(component_default25, {
          className: elevationClassName,
          isInteractive: false,
          value: elevation ? 1 : 0
        }), /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(component_default25, {
          className: elevationClassName,
          isInteractive: false,
          value: elevation
        })]
      })
    });
  }
  var Card2 = contextConnect(UnconnectedCard, "Card");
  var component_default27 = Card2;

  // packages/components/build-module/scrollable/hook.mjs
  var import_element99 = __toESM(require_element(), 1);

  // packages/components/build-module/scrollable/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__19() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var scrollableScrollbar = /* @__PURE__ */ css("@media only screen and ( min-device-width: 40em ){&::-webkit-scrollbar{height:12px;width:12px;}&::-webkit-scrollbar-track{background-color:transparent;}&::-webkit-scrollbar-track{background:", config_values_default.colorScrollbarTrack, ";border-radius:8px;}&::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:", config_values_default.colorScrollbarThumb, ";border:2px solid rgba( 0, 0, 0, 0 );border-radius:7px;}&:hover::-webkit-scrollbar-thumb{background-color:", config_values_default.colorScrollbarThumbHover, ";}}" + (false ? "" : ";label:scrollableScrollbar;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFVc0MiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBzY3JvbGxhYmxlU2Nyb2xsYmFyID0gY3NzYFxuXHRAbWVkaWEgb25seSBzY3JlZW4gYW5kICggbWluLWRldmljZS13aWR0aDogNDBlbSApIHtcblx0XHQmOjotd2Via2l0LXNjcm9sbGJhciB7XG5cdFx0XHRoZWlnaHQ6IDEycHg7XG5cdFx0XHR3aWR0aDogMTJweDtcblx0XHR9XG5cblx0XHQmOjotd2Via2l0LXNjcm9sbGJhci10cmFjayB7XG5cdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDtcblx0XHR9XG5cblx0XHQmOjotd2Via2l0LXNjcm9sbGJhci10cmFjayB7XG5cdFx0XHRiYWNrZ3JvdW5kOiAkeyBDT05GSUcuY29sb3JTY3JvbGxiYXJUcmFjayB9O1xuXHRcdFx0Ym9yZGVyLXJhZGl1czogOHB4O1xuXHRcdH1cblxuXHRcdCY6Oi13ZWJraXQtc2Nyb2xsYmFyLXRodW1iIHtcblx0XHRcdGJhY2tncm91bmQtY2xpcDogcGFkZGluZy1ib3g7XG5cdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT05GSUcuY29sb3JTY3JvbGxiYXJUaHVtYiB9O1xuXHRcdFx0Ym9yZGVyOiAycHggc29saWQgcmdiYSggMCwgMCwgMCwgMCApO1xuXHRcdFx0Ym9yZGVyLXJhZGl1czogN3B4O1xuXHRcdH1cblxuXHRcdCY6aG92ZXI6Oi13ZWJraXQtc2Nyb2xsYmFyLXRodW1iIHtcblx0XHRcdGJhY2tncm91bmQtY29sb3I6ICR7IENPTkZJRy5jb2xvclNjcm9sbGJhclRodW1iSG92ZXIgfTtcblx0XHR9XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTY3JvbGxhYmxlID0gY3NzYFxuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgQ29udGVudCA9IGNzc2Bcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuYDtcblxuZXhwb3J0IGNvbnN0IHNtb290aFNjcm9sbCA9IGNzc2Bcblx0c2Nyb2xsLWJlaGF2aW9yOiBzbW9vdGg7XG5gO1xuXG5leHBvcnQgY29uc3Qgc2Nyb2xsWCA9IGNzc2Bcblx0b3ZlcmZsb3cteDogYXV0bztcblx0b3ZlcmZsb3cteTogaGlkZGVuO1xuYDtcblxuZXhwb3J0IGNvbnN0IHNjcm9sbFkgPSBjc3NgXG5cdG92ZXJmbG93LXg6IGhpZGRlbjtcblx0b3ZlcmZsb3cteTogYXV0bztcbmA7XG5cbmV4cG9ydCBjb25zdCBzY3JvbGxBdXRvID0gY3NzYFxuXHRvdmVyZmxvdy15OiBhdXRvO1xuYDtcbiJdfQ== */");
  var Scrollable = false ? {
    name: "13udsys",
    styles: "height:100%"
  } : {
    name: "drdujb-Scrollable",
    styles: "height:100%;label:Scrollable;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1QzZCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09ORklHIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG5leHBvcnQgY29uc3Qgc2Nyb2xsYWJsZVNjcm9sbGJhciA9IGNzc2Bcblx0QG1lZGlhIG9ubHkgc2NyZWVuIGFuZCAoIG1pbi1kZXZpY2Utd2lkdGg6IDQwZW0gKSB7XG5cdFx0Jjo6LXdlYmtpdC1zY3JvbGxiYXIge1xuXHRcdFx0aGVpZ2h0OiAxMnB4O1xuXHRcdFx0d2lkdGg6IDEycHg7XG5cdFx0fVxuXG5cdFx0Jjo6LXdlYmtpdC1zY3JvbGxiYXItdHJhY2sge1xuXHRcdFx0YmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7XG5cdFx0fVxuXG5cdFx0Jjo6LXdlYmtpdC1zY3JvbGxiYXItdHJhY2sge1xuXHRcdFx0YmFja2dyb3VuZDogJHsgQ09ORklHLmNvbG9yU2Nyb2xsYmFyVHJhY2sgfTtcblx0XHRcdGJvcmRlci1yYWRpdXM6IDhweDtcblx0XHR9XG5cblx0XHQmOjotd2Via2l0LXNjcm9sbGJhci10aHVtYiB7XG5cdFx0XHRiYWNrZ3JvdW5kLWNsaXA6IHBhZGRpbmctYm94O1xuXHRcdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09ORklHLmNvbG9yU2Nyb2xsYmFyVGh1bWIgfTtcblx0XHRcdGJvcmRlcjogMnB4IHNvbGlkIHJnYmEoIDAsIDAsIDAsIDAgKTtcblx0XHRcdGJvcmRlci1yYWRpdXM6IDdweDtcblx0XHR9XG5cblx0XHQmOmhvdmVyOjotd2Via2l0LXNjcm9sbGJhci10aHVtYiB7XG5cdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT05GSUcuY29sb3JTY3JvbGxiYXJUaHVtYkhvdmVyIH07XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgU2Nyb2xsYWJsZSA9IGNzc2Bcblx0aGVpZ2h0OiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IENvbnRlbnQgPSBjc3NgXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBzbW9vdGhTY3JvbGwgPSBjc3NgXG5cdHNjcm9sbC1iZWhhdmlvcjogc21vb3RoO1xuYDtcblxuZXhwb3J0IGNvbnN0IHNjcm9sbFggPSBjc3NgXG5cdG92ZXJmbG93LXg6IGF1dG87XG5cdG92ZXJmbG93LXk6IGhpZGRlbjtcbmA7XG5cbmV4cG9ydCBjb25zdCBzY3JvbGxZID0gY3NzYFxuXHRvdmVyZmxvdy14OiBoaWRkZW47XG5cdG92ZXJmbG93LXk6IGF1dG87XG5gO1xuXG5leHBvcnQgY29uc3Qgc2Nyb2xsQXV0byA9IGNzc2Bcblx0b3ZlcmZsb3cteTogYXV0bztcbmA7XG4iXX0= */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__19
  };
  var smoothScroll = false ? {
    name: "7zq9w",
    styles: "scroll-behavior:smooth"
  } : {
    name: "rnnynm-smoothScroll",
    styles: "scroll-behavior:smooth;label:smoothScroll;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUErQytCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09ORklHIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG5leHBvcnQgY29uc3Qgc2Nyb2xsYWJsZVNjcm9sbGJhciA9IGNzc2Bcblx0QG1lZGlhIG9ubHkgc2NyZWVuIGFuZCAoIG1pbi1kZXZpY2Utd2lkdGg6IDQwZW0gKSB7XG5cdFx0Jjo6LXdlYmtpdC1zY3JvbGxiYXIge1xuXHRcdFx0aGVpZ2h0OiAxMnB4O1xuXHRcdFx0d2lkdGg6IDEycHg7XG5cdFx0fVxuXG5cdFx0Jjo6LXdlYmtpdC1zY3JvbGxiYXItdHJhY2sge1xuXHRcdFx0YmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7XG5cdFx0fVxuXG5cdFx0Jjo6LXdlYmtpdC1zY3JvbGxiYXItdHJhY2sge1xuXHRcdFx0YmFja2dyb3VuZDogJHsgQ09ORklHLmNvbG9yU2Nyb2xsYmFyVHJhY2sgfTtcblx0XHRcdGJvcmRlci1yYWRpdXM6IDhweDtcblx0XHR9XG5cblx0XHQmOjotd2Via2l0LXNjcm9sbGJhci10aHVtYiB7XG5cdFx0XHRiYWNrZ3JvdW5kLWNsaXA6IHBhZGRpbmctYm94O1xuXHRcdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09ORklHLmNvbG9yU2Nyb2xsYmFyVGh1bWIgfTtcblx0XHRcdGJvcmRlcjogMnB4IHNvbGlkIHJnYmEoIDAsIDAsIDAsIDAgKTtcblx0XHRcdGJvcmRlci1yYWRpdXM6IDdweDtcblx0XHR9XG5cblx0XHQmOmhvdmVyOjotd2Via2l0LXNjcm9sbGJhci10aHVtYiB7XG5cdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT05GSUcuY29sb3JTY3JvbGxiYXJUaHVtYkhvdmVyIH07XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgU2Nyb2xsYWJsZSA9IGNzc2Bcblx0aGVpZ2h0OiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IENvbnRlbnQgPSBjc3NgXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBzbW9vdGhTY3JvbGwgPSBjc3NgXG5cdHNjcm9sbC1iZWhhdmlvcjogc21vb3RoO1xuYDtcblxuZXhwb3J0IGNvbnN0IHNjcm9sbFggPSBjc3NgXG5cdG92ZXJmbG93LXg6IGF1dG87XG5cdG92ZXJmbG93LXk6IGhpZGRlbjtcbmA7XG5cbmV4cG9ydCBjb25zdCBzY3JvbGxZID0gY3NzYFxuXHRvdmVyZmxvdy14OiBoaWRkZW47XG5cdG92ZXJmbG93LXk6IGF1dG87XG5gO1xuXG5leHBvcnQgY29uc3Qgc2Nyb2xsQXV0byA9IGNzc2Bcblx0b3ZlcmZsb3cteTogYXV0bztcbmA7XG4iXX0= */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__19
  };
  var scrollX = false ? {
    name: "q33xhg",
    styles: "overflow-x:auto;overflow-y:hidden"
  } : {
    name: "17z0rvw-scrollX",
    styles: "overflow-x:auto;overflow-y:hidden;label:scrollX;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtRDBCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09ORklHIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG5leHBvcnQgY29uc3Qgc2Nyb2xsYWJsZVNjcm9sbGJhciA9IGNzc2Bcblx0QG1lZGlhIG9ubHkgc2NyZWVuIGFuZCAoIG1pbi1kZXZpY2Utd2lkdGg6IDQwZW0gKSB7XG5cdFx0Jjo6LXdlYmtpdC1zY3JvbGxiYXIge1xuXHRcdFx0aGVpZ2h0OiAxMnB4O1xuXHRcdFx0d2lkdGg6IDEycHg7XG5cdFx0fVxuXG5cdFx0Jjo6LXdlYmtpdC1zY3JvbGxiYXItdHJhY2sge1xuXHRcdFx0YmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7XG5cdFx0fVxuXG5cdFx0Jjo6LXdlYmtpdC1zY3JvbGxiYXItdHJhY2sge1xuXHRcdFx0YmFja2dyb3VuZDogJHsgQ09ORklHLmNvbG9yU2Nyb2xsYmFyVHJhY2sgfTtcblx0XHRcdGJvcmRlci1yYWRpdXM6IDhweDtcblx0XHR9XG5cblx0XHQmOjotd2Via2l0LXNjcm9sbGJhci10aHVtYiB7XG5cdFx0XHRiYWNrZ3JvdW5kLWNsaXA6IHBhZGRpbmctYm94O1xuXHRcdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09ORklHLmNvbG9yU2Nyb2xsYmFyVGh1bWIgfTtcblx0XHRcdGJvcmRlcjogMnB4IHNvbGlkIHJnYmEoIDAsIDAsIDAsIDAgKTtcblx0XHRcdGJvcmRlci1yYWRpdXM6IDdweDtcblx0XHR9XG5cblx0XHQmOmhvdmVyOjotd2Via2l0LXNjcm9sbGJhci10aHVtYiB7XG5cdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT05GSUcuY29sb3JTY3JvbGxiYXJUaHVtYkhvdmVyIH07XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgU2Nyb2xsYWJsZSA9IGNzc2Bcblx0aGVpZ2h0OiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IENvbnRlbnQgPSBjc3NgXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBzbW9vdGhTY3JvbGwgPSBjc3NgXG5cdHNjcm9sbC1iZWhhdmlvcjogc21vb3RoO1xuYDtcblxuZXhwb3J0IGNvbnN0IHNjcm9sbFggPSBjc3NgXG5cdG92ZXJmbG93LXg6IGF1dG87XG5cdG92ZXJmbG93LXk6IGhpZGRlbjtcbmA7XG5cbmV4cG9ydCBjb25zdCBzY3JvbGxZID0gY3NzYFxuXHRvdmVyZmxvdy14OiBoaWRkZW47XG5cdG92ZXJmbG93LXk6IGF1dG87XG5gO1xuXG5leHBvcnQgY29uc3Qgc2Nyb2xsQXV0byA9IGNzc2Bcblx0b3ZlcmZsb3cteTogYXV0bztcbmA7XG4iXX0= */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__19
  };
  var scrollY = false ? {
    name: "103x71s",
    styles: "overflow-x:hidden;overflow-y:auto"
  } : {
    name: "flie1-scrollY",
    styles: "overflow-x:hidden;overflow-y:auto;label:scrollY;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3RDBCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09ORklHIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG5leHBvcnQgY29uc3Qgc2Nyb2xsYWJsZVNjcm9sbGJhciA9IGNzc2Bcblx0QG1lZGlhIG9ubHkgc2NyZWVuIGFuZCAoIG1pbi1kZXZpY2Utd2lkdGg6IDQwZW0gKSB7XG5cdFx0Jjo6LXdlYmtpdC1zY3JvbGxiYXIge1xuXHRcdFx0aGVpZ2h0OiAxMnB4O1xuXHRcdFx0d2lkdGg6IDEycHg7XG5cdFx0fVxuXG5cdFx0Jjo6LXdlYmtpdC1zY3JvbGxiYXItdHJhY2sge1xuXHRcdFx0YmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7XG5cdFx0fVxuXG5cdFx0Jjo6LXdlYmtpdC1zY3JvbGxiYXItdHJhY2sge1xuXHRcdFx0YmFja2dyb3VuZDogJHsgQ09ORklHLmNvbG9yU2Nyb2xsYmFyVHJhY2sgfTtcblx0XHRcdGJvcmRlci1yYWRpdXM6IDhweDtcblx0XHR9XG5cblx0XHQmOjotd2Via2l0LXNjcm9sbGJhci10aHVtYiB7XG5cdFx0XHRiYWNrZ3JvdW5kLWNsaXA6IHBhZGRpbmctYm94O1xuXHRcdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09ORklHLmNvbG9yU2Nyb2xsYmFyVGh1bWIgfTtcblx0XHRcdGJvcmRlcjogMnB4IHNvbGlkIHJnYmEoIDAsIDAsIDAsIDAgKTtcblx0XHRcdGJvcmRlci1yYWRpdXM6IDdweDtcblx0XHR9XG5cblx0XHQmOmhvdmVyOjotd2Via2l0LXNjcm9sbGJhci10aHVtYiB7XG5cdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT05GSUcuY29sb3JTY3JvbGxiYXJUaHVtYkhvdmVyIH07XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgU2Nyb2xsYWJsZSA9IGNzc2Bcblx0aGVpZ2h0OiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IENvbnRlbnQgPSBjc3NgXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBzbW9vdGhTY3JvbGwgPSBjc3NgXG5cdHNjcm9sbC1iZWhhdmlvcjogc21vb3RoO1xuYDtcblxuZXhwb3J0IGNvbnN0IHNjcm9sbFggPSBjc3NgXG5cdG92ZXJmbG93LXg6IGF1dG87XG5cdG92ZXJmbG93LXk6IGhpZGRlbjtcbmA7XG5cbmV4cG9ydCBjb25zdCBzY3JvbGxZID0gY3NzYFxuXHRvdmVyZmxvdy14OiBoaWRkZW47XG5cdG92ZXJmbG93LXk6IGF1dG87XG5gO1xuXG5leHBvcnQgY29uc3Qgc2Nyb2xsQXV0byA9IGNzc2Bcblx0b3ZlcmZsb3cteTogYXV0bztcbmA7XG4iXX0= */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__19
  };
  var scrollAuto = false ? {
    name: "umwchj",
    styles: "overflow-y:auto"
  } : {
    name: "1lcuu7v-scrollAuto",
    styles: "overflow-y:auto;label:scrollAuto;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE2RDZCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09ORklHIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG5leHBvcnQgY29uc3Qgc2Nyb2xsYWJsZVNjcm9sbGJhciA9IGNzc2Bcblx0QG1lZGlhIG9ubHkgc2NyZWVuIGFuZCAoIG1pbi1kZXZpY2Utd2lkdGg6IDQwZW0gKSB7XG5cdFx0Jjo6LXdlYmtpdC1zY3JvbGxiYXIge1xuXHRcdFx0aGVpZ2h0OiAxMnB4O1xuXHRcdFx0d2lkdGg6IDEycHg7XG5cdFx0fVxuXG5cdFx0Jjo6LXdlYmtpdC1zY3JvbGxiYXItdHJhY2sge1xuXHRcdFx0YmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7XG5cdFx0fVxuXG5cdFx0Jjo6LXdlYmtpdC1zY3JvbGxiYXItdHJhY2sge1xuXHRcdFx0YmFja2dyb3VuZDogJHsgQ09ORklHLmNvbG9yU2Nyb2xsYmFyVHJhY2sgfTtcblx0XHRcdGJvcmRlci1yYWRpdXM6IDhweDtcblx0XHR9XG5cblx0XHQmOjotd2Via2l0LXNjcm9sbGJhci10aHVtYiB7XG5cdFx0XHRiYWNrZ3JvdW5kLWNsaXA6IHBhZGRpbmctYm94O1xuXHRcdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09ORklHLmNvbG9yU2Nyb2xsYmFyVGh1bWIgfTtcblx0XHRcdGJvcmRlcjogMnB4IHNvbGlkIHJnYmEoIDAsIDAsIDAsIDAgKTtcblx0XHRcdGJvcmRlci1yYWRpdXM6IDdweDtcblx0XHR9XG5cblx0XHQmOmhvdmVyOjotd2Via2l0LXNjcm9sbGJhci10aHVtYiB7XG5cdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT05GSUcuY29sb3JTY3JvbGxiYXJUaHVtYkhvdmVyIH07XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgU2Nyb2xsYWJsZSA9IGNzc2Bcblx0aGVpZ2h0OiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IENvbnRlbnQgPSBjc3NgXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBzbW9vdGhTY3JvbGwgPSBjc3NgXG5cdHNjcm9sbC1iZWhhdmlvcjogc21vb3RoO1xuYDtcblxuZXhwb3J0IGNvbnN0IHNjcm9sbFggPSBjc3NgXG5cdG92ZXJmbG93LXg6IGF1dG87XG5cdG92ZXJmbG93LXk6IGhpZGRlbjtcbmA7XG5cbmV4cG9ydCBjb25zdCBzY3JvbGxZID0gY3NzYFxuXHRvdmVyZmxvdy14OiBoaWRkZW47XG5cdG92ZXJmbG93LXk6IGF1dG87XG5gO1xuXG5leHBvcnQgY29uc3Qgc2Nyb2xsQXV0byA9IGNzc2Bcblx0b3ZlcmZsb3cteTogYXV0bztcbmA7XG4iXX0= */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__19
  };

  // packages/components/build-module/scrollable/hook.mjs
  function useScrollable(props) {
    const {
      className: className2,
      scrollDirection = "y",
      smoothScroll: smoothScroll2 = false,
      ...otherProps
    } = useContextSystem(props, "Scrollable");
    const cx3 = useCx();
    const classes = (0, import_element99.useMemo)(() => cx3(Scrollable, scrollableScrollbar, smoothScroll2 && smoothScroll, scrollDirection === "x" && scrollX, scrollDirection === "y" && scrollY, scrollDirection === "auto" && scrollAuto, className2), [className2, cx3, scrollDirection, smoothScroll2]);
    return {
      ...otherProps,
      className: classes
    };
  }

  // packages/components/build-module/scrollable/component.mjs
  var import_jsx_runtime162 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedScrollable(props, forwardedRef) {
    const scrollableProps = useScrollable(props);
    return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(component_default, {
      ...scrollableProps,
      ref: forwardedRef
    });
  }
  var Scrollable2 = contextConnect(UnconnectedScrollable, "Scrollable");
  var component_default28 = Scrollable2;

  // packages/components/build-module/card/card-body/hook.mjs
  var import_element100 = __toESM(require_element(), 1);

  // packages/components/build-module/card/get-padding-by-size.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__20() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var xSmallCardPadding = /* @__PURE__ */ css("padding:", space(2), ";" + (false ? "" : ";label:xSmallCardPadding;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImdldC1wYWRkaW5nLWJ5LXNpemUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBVzZCIiwiZmlsZSI6ImdldC1wYWRkaW5nLWJ5LXNpemUudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MsIHR5cGUgU2VyaWFsaXplZFN0eWxlcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBQcm9wcywgU2l6ZVRva2VuIH0gZnJvbSAnLi90eXBlcyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcblxuY29uc3QgeFNtYWxsQ2FyZFBhZGRpbmcgPSBjc3NgXG5cdHBhZGRpbmc6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBjYXJkUGFkZGluZ3MgPSB7XG5cdG5vbmU6IGNzc2Bcblx0XHRwYWRkaW5nOiAwO1xuXHRgLFxuXHRsYXJnZTogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHNwYWNlKCA2ICkgfSAkeyBzcGFjZSggOCApIH07XG5cdGAsXG5cdG1lZGl1bTogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHNwYWNlKCA0ICkgfSAkeyBzcGFjZSggNiApIH07XG5cdGAsXG5cdHNtYWxsOiBjc3NgXG5cdFx0cGFkZGluZzogJHsgc3BhY2UoIDQgKSB9O1xuXHRgLFxuXHR4U21hbGw6IHhTbWFsbENhcmRQYWRkaW5nLFxuXHQvLyBUaGUgYGV4dHJhU21hbGxgIHNpemUgaXMgbm90IG9mZmljaWFsbHkgZG9jdW1lbnRlZCwgYnV0IHRoZSBmb2xsb3dpbmcgc3R5bGVzXG5cdC8vIGFyZSBrZXB0IGZvciBsZWdhY3kgcmVhc29ucyB0byBzdXBwb3J0IG9sZGVyIHZhbHVlcyBvZiB0aGUgYHNpemVgIHByb3AuXG5cdGV4dHJhU21hbGw6IHhTbWFsbENhcmRQYWRkaW5nLFxufTtcblxuY29uc3QgZ2V0U2luZ2xlUGFkZGluZ1ZhbHVlID0gKCBzaXplOiBTaXplVG9rZW4gKTogc3RyaW5nIHwgdW5kZWZpbmVkID0+IHtcblx0c3dpdGNoICggc2l6ZSApIHtcblx0XHRjYXNlICd4U21hbGwnOlxuXHRcdFx0cmV0dXJuIHNwYWNlKCAyICk7XG5cdFx0Y2FzZSAnc21hbGwnOlxuXHRcdFx0cmV0dXJuIHNwYWNlKCA0ICk7XG5cdFx0Y2FzZSAnbWVkaXVtJzpcblx0XHRcdHJldHVybiBzcGFjZSggNiApO1xuXHRcdGNhc2UgJ2xhcmdlJzpcblx0XHRcdHJldHVybiBzcGFjZSggOCApO1xuXHRcdGNhc2UgJ25vbmUnOlxuXHRcdFx0cmV0dXJuICcwJztcblx0XHRkZWZhdWx0OlxuXHRcdFx0cmV0dXJuIHNwYWNlKCA2ICk7XG5cdH1cbn07XG5cbmV4cG9ydCBjb25zdCBnZXRQYWRkaW5nQnlTaXplID0gKCBzaXplOiBQcm9wc1sgJ3NpemUnIF0gKTogU2VyaWFsaXplZFN0eWxlcyA9PiB7XG5cdC8vIEhhbmRsZSBzdHJpbmctYmFzZWQgc2l6ZXMgKGJvdGggc3RhbmRhcmQgYW5kIGRlcHJlY2F0ZWQpXG5cdGlmICggdHlwZW9mIHNpemUgPT09ICdzdHJpbmcnICkge1xuXHRcdHJldHVybiBjYXJkUGFkZGluZ3NbIHNpemUgYXMgU2l6ZVRva2VuIF07XG5cdH1cblxuXHRpZiAoIHNpemUgKSB7XG5cdFx0Y29uc3QgeyBibG9ja1N0YXJ0LCBibG9ja0VuZCwgaW5saW5lU3RhcnQsIGlubGluZUVuZCB9ID0gc2l6ZTtcblx0XHRyZXR1cm4gY3NzYFxuXHRcdFx0cGFkZGluZy1ibG9jay1zdGFydDogJHsgZ2V0U2luZ2xlUGFkZGluZ1ZhbHVlKCBibG9ja1N0YXJ0ICkgfTtcblx0XHRcdHBhZGRpbmctYmxvY2stZW5kOiAkeyBnZXRTaW5nbGVQYWRkaW5nVmFsdWUoIGJsb2NrRW5kICkgfTtcblx0XHRcdHBhZGRpbmctaW5saW5lLXN0YXJ0OiAkeyBnZXRTaW5nbGVQYWRkaW5nVmFsdWUoIGlubGluZVN0YXJ0ICkgfTtcblx0XHRcdHBhZGRpbmctaW5saW5lLWVuZDogJHsgZ2V0U2luZ2xlUGFkZGluZ1ZhbHVlKCBpbmxpbmVFbmQgKSB9O1xuXHRcdGA7XG5cdH1cblxuXHQvLyBEZWZhdWx0IHRvIG1lZGl1bSBpZiBubyBzaXplIGlzIHByb3ZpZGVkXG5cdHJldHVybiBjYXJkUGFkZGluZ3MubWVkaXVtO1xufTtcbiJdfQ== */");
  var cardPaddings = {
    none: false ? {
      name: "1hcx8jb",
      styles: "padding:0"
    } : {
      name: "1nt59cd-none",
      styles: "padding:0;label:none;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImdldC1wYWRkaW5nLWJ5LXNpemUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZ0JVIiwiZmlsZSI6ImdldC1wYWRkaW5nLWJ5LXNpemUudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MsIHR5cGUgU2VyaWFsaXplZFN0eWxlcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBQcm9wcywgU2l6ZVRva2VuIH0gZnJvbSAnLi90eXBlcyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcblxuY29uc3QgeFNtYWxsQ2FyZFBhZGRpbmcgPSBjc3NgXG5cdHBhZGRpbmc6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBjYXJkUGFkZGluZ3MgPSB7XG5cdG5vbmU6IGNzc2Bcblx0XHRwYWRkaW5nOiAwO1xuXHRgLFxuXHRsYXJnZTogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHNwYWNlKCA2ICkgfSAkeyBzcGFjZSggOCApIH07XG5cdGAsXG5cdG1lZGl1bTogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHNwYWNlKCA0ICkgfSAkeyBzcGFjZSggNiApIH07XG5cdGAsXG5cdHNtYWxsOiBjc3NgXG5cdFx0cGFkZGluZzogJHsgc3BhY2UoIDQgKSB9O1xuXHRgLFxuXHR4U21hbGw6IHhTbWFsbENhcmRQYWRkaW5nLFxuXHQvLyBUaGUgYGV4dHJhU21hbGxgIHNpemUgaXMgbm90IG9mZmljaWFsbHkgZG9jdW1lbnRlZCwgYnV0IHRoZSBmb2xsb3dpbmcgc3R5bGVzXG5cdC8vIGFyZSBrZXB0IGZvciBsZWdhY3kgcmVhc29ucyB0byBzdXBwb3J0IG9sZGVyIHZhbHVlcyBvZiB0aGUgYHNpemVgIHByb3AuXG5cdGV4dHJhU21hbGw6IHhTbWFsbENhcmRQYWRkaW5nLFxufTtcblxuY29uc3QgZ2V0U2luZ2xlUGFkZGluZ1ZhbHVlID0gKCBzaXplOiBTaXplVG9rZW4gKTogc3RyaW5nIHwgdW5kZWZpbmVkID0+IHtcblx0c3dpdGNoICggc2l6ZSApIHtcblx0XHRjYXNlICd4U21hbGwnOlxuXHRcdFx0cmV0dXJuIHNwYWNlKCAyICk7XG5cdFx0Y2FzZSAnc21hbGwnOlxuXHRcdFx0cmV0dXJuIHNwYWNlKCA0ICk7XG5cdFx0Y2FzZSAnbWVkaXVtJzpcblx0XHRcdHJldHVybiBzcGFjZSggNiApO1xuXHRcdGNhc2UgJ2xhcmdlJzpcblx0XHRcdHJldHVybiBzcGFjZSggOCApO1xuXHRcdGNhc2UgJ25vbmUnOlxuXHRcdFx0cmV0dXJuICcwJztcblx0XHRkZWZhdWx0OlxuXHRcdFx0cmV0dXJuIHNwYWNlKCA2ICk7XG5cdH1cbn07XG5cbmV4cG9ydCBjb25zdCBnZXRQYWRkaW5nQnlTaXplID0gKCBzaXplOiBQcm9wc1sgJ3NpemUnIF0gKTogU2VyaWFsaXplZFN0eWxlcyA9PiB7XG5cdC8vIEhhbmRsZSBzdHJpbmctYmFzZWQgc2l6ZXMgKGJvdGggc3RhbmRhcmQgYW5kIGRlcHJlY2F0ZWQpXG5cdGlmICggdHlwZW9mIHNpemUgPT09ICdzdHJpbmcnICkge1xuXHRcdHJldHVybiBjYXJkUGFkZGluZ3NbIHNpemUgYXMgU2l6ZVRva2VuIF07XG5cdH1cblxuXHRpZiAoIHNpemUgKSB7XG5cdFx0Y29uc3QgeyBibG9ja1N0YXJ0LCBibG9ja0VuZCwgaW5saW5lU3RhcnQsIGlubGluZUVuZCB9ID0gc2l6ZTtcblx0XHRyZXR1cm4gY3NzYFxuXHRcdFx0cGFkZGluZy1ibG9jay1zdGFydDogJHsgZ2V0U2luZ2xlUGFkZGluZ1ZhbHVlKCBibG9ja1N0YXJ0ICkgfTtcblx0XHRcdHBhZGRpbmctYmxvY2stZW5kOiAkeyBnZXRTaW5nbGVQYWRkaW5nVmFsdWUoIGJsb2NrRW5kICkgfTtcblx0XHRcdHBhZGRpbmctaW5saW5lLXN0YXJ0OiAkeyBnZXRTaW5nbGVQYWRkaW5nVmFsdWUoIGlubGluZVN0YXJ0ICkgfTtcblx0XHRcdHBhZGRpbmctaW5saW5lLWVuZDogJHsgZ2V0U2luZ2xlUGFkZGluZ1ZhbHVlKCBpbmxpbmVFbmQgKSB9O1xuXHRcdGA7XG5cdH1cblxuXHQvLyBEZWZhdWx0IHRvIG1lZGl1bSBpZiBubyBzaXplIGlzIHByb3ZpZGVkXG5cdHJldHVybiBjYXJkUGFkZGluZ3MubWVkaXVtO1xufTtcbiJdfQ== */",
      toString: _EMOTION_STRINGIFIED_CSS_ERROR__20
    },
    large: /* @__PURE__ */ css("padding:", space(6), " ", space(8), ";" + (false ? "" : ";label:large;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImdldC1wYWRkaW5nLWJ5LXNpemUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBbUJXIiwiZmlsZSI6ImdldC1wYWRkaW5nLWJ5LXNpemUudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MsIHR5cGUgU2VyaWFsaXplZFN0eWxlcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBQcm9wcywgU2l6ZVRva2VuIH0gZnJvbSAnLi90eXBlcyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcblxuY29uc3QgeFNtYWxsQ2FyZFBhZGRpbmcgPSBjc3NgXG5cdHBhZGRpbmc6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBjYXJkUGFkZGluZ3MgPSB7XG5cdG5vbmU6IGNzc2Bcblx0XHRwYWRkaW5nOiAwO1xuXHRgLFxuXHRsYXJnZTogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHNwYWNlKCA2ICkgfSAkeyBzcGFjZSggOCApIH07XG5cdGAsXG5cdG1lZGl1bTogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHNwYWNlKCA0ICkgfSAkeyBzcGFjZSggNiApIH07XG5cdGAsXG5cdHNtYWxsOiBjc3NgXG5cdFx0cGFkZGluZzogJHsgc3BhY2UoIDQgKSB9O1xuXHRgLFxuXHR4U21hbGw6IHhTbWFsbENhcmRQYWRkaW5nLFxuXHQvLyBUaGUgYGV4dHJhU21hbGxgIHNpemUgaXMgbm90IG9mZmljaWFsbHkgZG9jdW1lbnRlZCwgYnV0IHRoZSBmb2xsb3dpbmcgc3R5bGVzXG5cdC8vIGFyZSBrZXB0IGZvciBsZWdhY3kgcmVhc29ucyB0byBzdXBwb3J0IG9sZGVyIHZhbHVlcyBvZiB0aGUgYHNpemVgIHByb3AuXG5cdGV4dHJhU21hbGw6IHhTbWFsbENhcmRQYWRkaW5nLFxufTtcblxuY29uc3QgZ2V0U2luZ2xlUGFkZGluZ1ZhbHVlID0gKCBzaXplOiBTaXplVG9rZW4gKTogc3RyaW5nIHwgdW5kZWZpbmVkID0+IHtcblx0c3dpdGNoICggc2l6ZSApIHtcblx0XHRjYXNlICd4U21hbGwnOlxuXHRcdFx0cmV0dXJuIHNwYWNlKCAyICk7XG5cdFx0Y2FzZSAnc21hbGwnOlxuXHRcdFx0cmV0dXJuIHNwYWNlKCA0ICk7XG5cdFx0Y2FzZSAnbWVkaXVtJzpcblx0XHRcdHJldHVybiBzcGFjZSggNiApO1xuXHRcdGNhc2UgJ2xhcmdlJzpcblx0XHRcdHJldHVybiBzcGFjZSggOCApO1xuXHRcdGNhc2UgJ25vbmUnOlxuXHRcdFx0cmV0dXJuICcwJztcblx0XHRkZWZhdWx0OlxuXHRcdFx0cmV0dXJuIHNwYWNlKCA2ICk7XG5cdH1cbn07XG5cbmV4cG9ydCBjb25zdCBnZXRQYWRkaW5nQnlTaXplID0gKCBzaXplOiBQcm9wc1sgJ3NpemUnIF0gKTogU2VyaWFsaXplZFN0eWxlcyA9PiB7XG5cdC8vIEhhbmRsZSBzdHJpbmctYmFzZWQgc2l6ZXMgKGJvdGggc3RhbmRhcmQgYW5kIGRlcHJlY2F0ZWQpXG5cdGlmICggdHlwZW9mIHNpemUgPT09ICdzdHJpbmcnICkge1xuXHRcdHJldHVybiBjYXJkUGFkZGluZ3NbIHNpemUgYXMgU2l6ZVRva2VuIF07XG5cdH1cblxuXHRpZiAoIHNpemUgKSB7XG5cdFx0Y29uc3QgeyBibG9ja1N0YXJ0LCBibG9ja0VuZCwgaW5saW5lU3RhcnQsIGlubGluZUVuZCB9ID0gc2l6ZTtcblx0XHRyZXR1cm4gY3NzYFxuXHRcdFx0cGFkZGluZy1ibG9jay1zdGFydDogJHsgZ2V0U2luZ2xlUGFkZGluZ1ZhbHVlKCBibG9ja1N0YXJ0ICkgfTtcblx0XHRcdHBhZGRpbmctYmxvY2stZW5kOiAkeyBnZXRTaW5nbGVQYWRkaW5nVmFsdWUoIGJsb2NrRW5kICkgfTtcblx0XHRcdHBhZGRpbmctaW5saW5lLXN0YXJ0OiAkeyBnZXRTaW5nbGVQYWRkaW5nVmFsdWUoIGlubGluZVN0YXJ0ICkgfTtcblx0XHRcdHBhZGRpbmctaW5saW5lLWVuZDogJHsgZ2V0U2luZ2xlUGFkZGluZ1ZhbHVlKCBpbmxpbmVFbmQgKSB9O1xuXHRcdGA7XG5cdH1cblxuXHQvLyBEZWZhdWx0IHRvIG1lZGl1bSBpZiBubyBzaXplIGlzIHByb3ZpZGVkXG5cdHJldHVybiBjYXJkUGFkZGluZ3MubWVkaXVtO1xufTtcbiJdfQ== */"),
    medium: /* @__PURE__ */ css("padding:", space(4), " ", space(6), ";" + (false ? "" : ";label:medium;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImdldC1wYWRkaW5nLWJ5LXNpemUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBc0JZIiwiZmlsZSI6ImdldC1wYWRkaW5nLWJ5LXNpemUudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MsIHR5cGUgU2VyaWFsaXplZFN0eWxlcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBQcm9wcywgU2l6ZVRva2VuIH0gZnJvbSAnLi90eXBlcyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcblxuY29uc3QgeFNtYWxsQ2FyZFBhZGRpbmcgPSBjc3NgXG5cdHBhZGRpbmc6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBjYXJkUGFkZGluZ3MgPSB7XG5cdG5vbmU6IGNzc2Bcblx0XHRwYWRkaW5nOiAwO1xuXHRgLFxuXHRsYXJnZTogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHNwYWNlKCA2ICkgfSAkeyBzcGFjZSggOCApIH07XG5cdGAsXG5cdG1lZGl1bTogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHNwYWNlKCA0ICkgfSAkeyBzcGFjZSggNiApIH07XG5cdGAsXG5cdHNtYWxsOiBjc3NgXG5cdFx0cGFkZGluZzogJHsgc3BhY2UoIDQgKSB9O1xuXHRgLFxuXHR4U21hbGw6IHhTbWFsbENhcmRQYWRkaW5nLFxuXHQvLyBUaGUgYGV4dHJhU21hbGxgIHNpemUgaXMgbm90IG9mZmljaWFsbHkgZG9jdW1lbnRlZCwgYnV0IHRoZSBmb2xsb3dpbmcgc3R5bGVzXG5cdC8vIGFyZSBrZXB0IGZvciBsZWdhY3kgcmVhc29ucyB0byBzdXBwb3J0IG9sZGVyIHZhbHVlcyBvZiB0aGUgYHNpemVgIHByb3AuXG5cdGV4dHJhU21hbGw6IHhTbWFsbENhcmRQYWRkaW5nLFxufTtcblxuY29uc3QgZ2V0U2luZ2xlUGFkZGluZ1ZhbHVlID0gKCBzaXplOiBTaXplVG9rZW4gKTogc3RyaW5nIHwgdW5kZWZpbmVkID0+IHtcblx0c3dpdGNoICggc2l6ZSApIHtcblx0XHRjYXNlICd4U21hbGwnOlxuXHRcdFx0cmV0dXJuIHNwYWNlKCAyICk7XG5cdFx0Y2FzZSAnc21hbGwnOlxuXHRcdFx0cmV0dXJuIHNwYWNlKCA0ICk7XG5cdFx0Y2FzZSAnbWVkaXVtJzpcblx0XHRcdHJldHVybiBzcGFjZSggNiApO1xuXHRcdGNhc2UgJ2xhcmdlJzpcblx0XHRcdHJldHVybiBzcGFjZSggOCApO1xuXHRcdGNhc2UgJ25vbmUnOlxuXHRcdFx0cmV0dXJuICcwJztcblx0XHRkZWZhdWx0OlxuXHRcdFx0cmV0dXJuIHNwYWNlKCA2ICk7XG5cdH1cbn07XG5cbmV4cG9ydCBjb25zdCBnZXRQYWRkaW5nQnlTaXplID0gKCBzaXplOiBQcm9wc1sgJ3NpemUnIF0gKTogU2VyaWFsaXplZFN0eWxlcyA9PiB7XG5cdC8vIEhhbmRsZSBzdHJpbmctYmFzZWQgc2l6ZXMgKGJvdGggc3RhbmRhcmQgYW5kIGRlcHJlY2F0ZWQpXG5cdGlmICggdHlwZW9mIHNpemUgPT09ICdzdHJpbmcnICkge1xuXHRcdHJldHVybiBjYXJkUGFkZGluZ3NbIHNpemUgYXMgU2l6ZVRva2VuIF07XG5cdH1cblxuXHRpZiAoIHNpemUgKSB7XG5cdFx0Y29uc3QgeyBibG9ja1N0YXJ0LCBibG9ja0VuZCwgaW5saW5lU3RhcnQsIGlubGluZUVuZCB9ID0gc2l6ZTtcblx0XHRyZXR1cm4gY3NzYFxuXHRcdFx0cGFkZGluZy1ibG9jay1zdGFydDogJHsgZ2V0U2luZ2xlUGFkZGluZ1ZhbHVlKCBibG9ja1N0YXJ0ICkgfTtcblx0XHRcdHBhZGRpbmctYmxvY2stZW5kOiAkeyBnZXRTaW5nbGVQYWRkaW5nVmFsdWUoIGJsb2NrRW5kICkgfTtcblx0XHRcdHBhZGRpbmctaW5saW5lLXN0YXJ0OiAkeyBnZXRTaW5nbGVQYWRkaW5nVmFsdWUoIGlubGluZVN0YXJ0ICkgfTtcblx0XHRcdHBhZGRpbmctaW5saW5lLWVuZDogJHsgZ2V0U2luZ2xlUGFkZGluZ1ZhbHVlKCBpbmxpbmVFbmQgKSB9O1xuXHRcdGA7XG5cdH1cblxuXHQvLyBEZWZhdWx0IHRvIG1lZGl1bSBpZiBubyBzaXplIGlzIHByb3ZpZGVkXG5cdHJldHVybiBjYXJkUGFkZGluZ3MubWVkaXVtO1xufTtcbiJdfQ== */"),
    small: /* @__PURE__ */ css("padding:", space(4), ";" + (false ? "" : ";label:small;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImdldC1wYWRkaW5nLWJ5LXNpemUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBeUJXIiwiZmlsZSI6ImdldC1wYWRkaW5nLWJ5LXNpemUudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MsIHR5cGUgU2VyaWFsaXplZFN0eWxlcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBQcm9wcywgU2l6ZVRva2VuIH0gZnJvbSAnLi90eXBlcyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcblxuY29uc3QgeFNtYWxsQ2FyZFBhZGRpbmcgPSBjc3NgXG5cdHBhZGRpbmc6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBjYXJkUGFkZGluZ3MgPSB7XG5cdG5vbmU6IGNzc2Bcblx0XHRwYWRkaW5nOiAwO1xuXHRgLFxuXHRsYXJnZTogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHNwYWNlKCA2ICkgfSAkeyBzcGFjZSggOCApIH07XG5cdGAsXG5cdG1lZGl1bTogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHNwYWNlKCA0ICkgfSAkeyBzcGFjZSggNiApIH07XG5cdGAsXG5cdHNtYWxsOiBjc3NgXG5cdFx0cGFkZGluZzogJHsgc3BhY2UoIDQgKSB9O1xuXHRgLFxuXHR4U21hbGw6IHhTbWFsbENhcmRQYWRkaW5nLFxuXHQvLyBUaGUgYGV4dHJhU21hbGxgIHNpemUgaXMgbm90IG9mZmljaWFsbHkgZG9jdW1lbnRlZCwgYnV0IHRoZSBmb2xsb3dpbmcgc3R5bGVzXG5cdC8vIGFyZSBrZXB0IGZvciBsZWdhY3kgcmVhc29ucyB0byBzdXBwb3J0IG9sZGVyIHZhbHVlcyBvZiB0aGUgYHNpemVgIHByb3AuXG5cdGV4dHJhU21hbGw6IHhTbWFsbENhcmRQYWRkaW5nLFxufTtcblxuY29uc3QgZ2V0U2luZ2xlUGFkZGluZ1ZhbHVlID0gKCBzaXplOiBTaXplVG9rZW4gKTogc3RyaW5nIHwgdW5kZWZpbmVkID0+IHtcblx0c3dpdGNoICggc2l6ZSApIHtcblx0XHRjYXNlICd4U21hbGwnOlxuXHRcdFx0cmV0dXJuIHNwYWNlKCAyICk7XG5cdFx0Y2FzZSAnc21hbGwnOlxuXHRcdFx0cmV0dXJuIHNwYWNlKCA0ICk7XG5cdFx0Y2FzZSAnbWVkaXVtJzpcblx0XHRcdHJldHVybiBzcGFjZSggNiApO1xuXHRcdGNhc2UgJ2xhcmdlJzpcblx0XHRcdHJldHVybiBzcGFjZSggOCApO1xuXHRcdGNhc2UgJ25vbmUnOlxuXHRcdFx0cmV0dXJuICcwJztcblx0XHRkZWZhdWx0OlxuXHRcdFx0cmV0dXJuIHNwYWNlKCA2ICk7XG5cdH1cbn07XG5cbmV4cG9ydCBjb25zdCBnZXRQYWRkaW5nQnlTaXplID0gKCBzaXplOiBQcm9wc1sgJ3NpemUnIF0gKTogU2VyaWFsaXplZFN0eWxlcyA9PiB7XG5cdC8vIEhhbmRsZSBzdHJpbmctYmFzZWQgc2l6ZXMgKGJvdGggc3RhbmRhcmQgYW5kIGRlcHJlY2F0ZWQpXG5cdGlmICggdHlwZW9mIHNpemUgPT09ICdzdHJpbmcnICkge1xuXHRcdHJldHVybiBjYXJkUGFkZGluZ3NbIHNpemUgYXMgU2l6ZVRva2VuIF07XG5cdH1cblxuXHRpZiAoIHNpemUgKSB7XG5cdFx0Y29uc3QgeyBibG9ja1N0YXJ0LCBibG9ja0VuZCwgaW5saW5lU3RhcnQsIGlubGluZUVuZCB9ID0gc2l6ZTtcblx0XHRyZXR1cm4gY3NzYFxuXHRcdFx0cGFkZGluZy1ibG9jay1zdGFydDogJHsgZ2V0U2luZ2xlUGFkZGluZ1ZhbHVlKCBibG9ja1N0YXJ0ICkgfTtcblx0XHRcdHBhZGRpbmctYmxvY2stZW5kOiAkeyBnZXRTaW5nbGVQYWRkaW5nVmFsdWUoIGJsb2NrRW5kICkgfTtcblx0XHRcdHBhZGRpbmctaW5saW5lLXN0YXJ0OiAkeyBnZXRTaW5nbGVQYWRkaW5nVmFsdWUoIGlubGluZVN0YXJ0ICkgfTtcblx0XHRcdHBhZGRpbmctaW5saW5lLWVuZDogJHsgZ2V0U2luZ2xlUGFkZGluZ1ZhbHVlKCBpbmxpbmVFbmQgKSB9O1xuXHRcdGA7XG5cdH1cblxuXHQvLyBEZWZhdWx0IHRvIG1lZGl1bSBpZiBubyBzaXplIGlzIHByb3ZpZGVkXG5cdHJldHVybiBjYXJkUGFkZGluZ3MubWVkaXVtO1xufTtcbiJdfQ== */"),
    xSmall: xSmallCardPadding,
    // The `extraSmall` size is not officially documented, but the following styles
    // are kept for legacy reasons to support older values of the `size` prop.
    extraSmall: xSmallCardPadding
  };
  var getSinglePaddingValue = (size3) => {
    switch (size3) {
      case "xSmall":
        return space(2);
      case "small":
        return space(4);
      case "medium":
        return space(6);
      case "large":
        return space(8);
      case "none":
        return "0";
      default:
        return space(6);
    }
  };
  var getPaddingBySize = (size3) => {
    if (typeof size3 === "string") {
      return cardPaddings[size3];
    }
    if (size3) {
      const {
        blockStart,
        blockEnd,
        inlineStart,
        inlineEnd
      } = size3;
      return /* @__PURE__ */ css("padding-block-start:", getSinglePaddingValue(blockStart), ";padding-block-end:", getSinglePaddingValue(blockEnd), ";padding-inline-start:", getSinglePaddingValue(inlineStart), ";padding-inline-end:", getSinglePaddingValue(inlineEnd), ";" + (false ? "" : ";label:getPaddingBySize;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImdldC1wYWRkaW5nLWJ5LXNpemUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMkRZIiwiZmlsZSI6ImdldC1wYWRkaW5nLWJ5LXNpemUudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MsIHR5cGUgU2VyaWFsaXplZFN0eWxlcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBQcm9wcywgU2l6ZVRva2VuIH0gZnJvbSAnLi90eXBlcyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcblxuY29uc3QgeFNtYWxsQ2FyZFBhZGRpbmcgPSBjc3NgXG5cdHBhZGRpbmc6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBjYXJkUGFkZGluZ3MgPSB7XG5cdG5vbmU6IGNzc2Bcblx0XHRwYWRkaW5nOiAwO1xuXHRgLFxuXHRsYXJnZTogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHNwYWNlKCA2ICkgfSAkeyBzcGFjZSggOCApIH07XG5cdGAsXG5cdG1lZGl1bTogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHNwYWNlKCA0ICkgfSAkeyBzcGFjZSggNiApIH07XG5cdGAsXG5cdHNtYWxsOiBjc3NgXG5cdFx0cGFkZGluZzogJHsgc3BhY2UoIDQgKSB9O1xuXHRgLFxuXHR4U21hbGw6IHhTbWFsbENhcmRQYWRkaW5nLFxuXHQvLyBUaGUgYGV4dHJhU21hbGxgIHNpemUgaXMgbm90IG9mZmljaWFsbHkgZG9jdW1lbnRlZCwgYnV0IHRoZSBmb2xsb3dpbmcgc3R5bGVzXG5cdC8vIGFyZSBrZXB0IGZvciBsZWdhY3kgcmVhc29ucyB0byBzdXBwb3J0IG9sZGVyIHZhbHVlcyBvZiB0aGUgYHNpemVgIHByb3AuXG5cdGV4dHJhU21hbGw6IHhTbWFsbENhcmRQYWRkaW5nLFxufTtcblxuY29uc3QgZ2V0U2luZ2xlUGFkZGluZ1ZhbHVlID0gKCBzaXplOiBTaXplVG9rZW4gKTogc3RyaW5nIHwgdW5kZWZpbmVkID0+IHtcblx0c3dpdGNoICggc2l6ZSApIHtcblx0XHRjYXNlICd4U21hbGwnOlxuXHRcdFx0cmV0dXJuIHNwYWNlKCAyICk7XG5cdFx0Y2FzZSAnc21hbGwnOlxuXHRcdFx0cmV0dXJuIHNwYWNlKCA0ICk7XG5cdFx0Y2FzZSAnbWVkaXVtJzpcblx0XHRcdHJldHVybiBzcGFjZSggNiApO1xuXHRcdGNhc2UgJ2xhcmdlJzpcblx0XHRcdHJldHVybiBzcGFjZSggOCApO1xuXHRcdGNhc2UgJ25vbmUnOlxuXHRcdFx0cmV0dXJuICcwJztcblx0XHRkZWZhdWx0OlxuXHRcdFx0cmV0dXJuIHNwYWNlKCA2ICk7XG5cdH1cbn07XG5cbmV4cG9ydCBjb25zdCBnZXRQYWRkaW5nQnlTaXplID0gKCBzaXplOiBQcm9wc1sgJ3NpemUnIF0gKTogU2VyaWFsaXplZFN0eWxlcyA9PiB7XG5cdC8vIEhhbmRsZSBzdHJpbmctYmFzZWQgc2l6ZXMgKGJvdGggc3RhbmRhcmQgYW5kIGRlcHJlY2F0ZWQpXG5cdGlmICggdHlwZW9mIHNpemUgPT09ICdzdHJpbmcnICkge1xuXHRcdHJldHVybiBjYXJkUGFkZGluZ3NbIHNpemUgYXMgU2l6ZVRva2VuIF07XG5cdH1cblxuXHRpZiAoIHNpemUgKSB7XG5cdFx0Y29uc3QgeyBibG9ja1N0YXJ0LCBibG9ja0VuZCwgaW5saW5lU3RhcnQsIGlubGluZUVuZCB9ID0gc2l6ZTtcblx0XHRyZXR1cm4gY3NzYFxuXHRcdFx0cGFkZGluZy1ibG9jay1zdGFydDogJHsgZ2V0U2luZ2xlUGFkZGluZ1ZhbHVlKCBibG9ja1N0YXJ0ICkgfTtcblx0XHRcdHBhZGRpbmctYmxvY2stZW5kOiAkeyBnZXRTaW5nbGVQYWRkaW5nVmFsdWUoIGJsb2NrRW5kICkgfTtcblx0XHRcdHBhZGRpbmctaW5saW5lLXN0YXJ0OiAkeyBnZXRTaW5nbGVQYWRkaW5nVmFsdWUoIGlubGluZVN0YXJ0ICkgfTtcblx0XHRcdHBhZGRpbmctaW5saW5lLWVuZDogJHsgZ2V0U2luZ2xlUGFkZGluZ1ZhbHVlKCBpbmxpbmVFbmQgKSB9O1xuXHRcdGA7XG5cdH1cblxuXHQvLyBEZWZhdWx0IHRvIG1lZGl1bSBpZiBubyBzaXplIGlzIHByb3ZpZGVkXG5cdHJldHVybiBjYXJkUGFkZGluZ3MubWVkaXVtO1xufTtcbiJdfQ== */");
    }
    return cardPaddings.medium;
  };

  // packages/components/build-module/card/card-body/hook.mjs
  function useCardBody(props) {
    const {
      className: className2,
      isScrollable = false,
      isShady = false,
      size: size3 = "medium",
      ...otherProps
    } = useContextSystem(props, "CardBody");
    const cx3 = useCx();
    const classes = (0, import_element100.useMemo)(() => cx3(
      Body,
      borderRadius,
      getPaddingBySize(size3),
      isShady && shady,
      // This classname is added for legacy compatibility reasons.
      "components-card__body",
      className2
    ), [className2, cx3, isShady, size3]);
    return {
      ...otherProps,
      className: classes,
      isScrollable
    };
  }

  // packages/components/build-module/card/card-body/component.mjs
  var import_jsx_runtime163 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedCardBody(props, forwardedRef) {
    const {
      isScrollable,
      ...otherProps
    } = useCardBody(props);
    if (isScrollable) {
      return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(component_default28, {
        ...otherProps,
        ref: forwardedRef
      });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(component_default, {
      ...otherProps,
      ref: forwardedRef
    });
  }
  var CardBody = contextConnect(UnconnectedCardBody, "CardBody");
  var component_default29 = CardBody;

  // packages/components/build-module/divider/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__21() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var MARGIN_DIRECTIONS = {
    vertical: {
      start: "marginLeft",
      end: "marginRight"
    },
    horizontal: {
      start: "marginTop",
      end: "marginBottom"
    }
  };
  var renderMargin = ({
    "aria-orientation": orientation = "horizontal",
    margin,
    marginStart,
    marginEnd
  }) => /* @__PURE__ */ css(rtl({
    [MARGIN_DIRECTIONS[orientation].start]: space(marginStart ?? margin),
    [MARGIN_DIRECTIONS[orientation].end]: space(marginEnd ?? margin)
  })(), false ? "" : ";label:renderMargin;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvQ0MiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgRGl2aWRlclByb3BzIH0gZnJvbSAnLi90eXBlcyc7XG5cbmNvbnN0IE1BUkdJTl9ESVJFQ1RJT05TOiBSZWNvcmQ8XG5cdE5vbk51bGxhYmxlPCBEaXZpZGVyUHJvcHNbICdvcmllbnRhdGlvbicgXSA+LFxuXHRSZWNvcmQ8ICdzdGFydCcgfCAnZW5kJywgc3RyaW5nID5cbj4gPSB7XG5cdHZlcnRpY2FsOiB7XG5cdFx0c3RhcnQ6ICdtYXJnaW5MZWZ0Jyxcblx0XHRlbmQ6ICdtYXJnaW5SaWdodCcsXG5cdH0sXG5cdGhvcml6b250YWw6IHtcblx0XHRzdGFydDogJ21hcmdpblRvcCcsXG5cdFx0ZW5kOiAnbWFyZ2luQm90dG9tJyxcblx0fSxcbn07XG5cbi8vIFJlbmRlcnMgdGhlIGNvcnJlY3QgbWFyZ2lucyBnaXZlbiB0aGUgRGl2aWRlcidzIGBvcmllbnRhdGlvbmAgYW5kIHRoZSB3cml0aW5nIGRpcmVjdGlvbi5cbi8vIFdoZW4gYm90aCB0aGUgZ2VuZXJpYyBgbWFyZ2luYCBhbmQgdGhlIHNwZWNpZmljIGBtYXJnaW5TdGFydHxtYXJnaW5FbmRgIHByb3BzIGFyZSBkZWZpbmVkLFxuLy8gdGhlIGxhdHRlciB3aWxsIHRha2UgcHJpb3JpdHkuXG5jb25zdCByZW5kZXJNYXJnaW4gPSAoIHtcblx0J2FyaWEtb3JpZW50YXRpb24nOiBvcmllbnRhdGlvbiA9ICdob3Jpem9udGFsJyxcblx0bWFyZ2luLFxuXHRtYXJnaW5TdGFydCxcblx0bWFyZ2luRW5kLFxufTogRGl2aWRlclByb3BzICkgPT5cblx0Y3NzKFxuXHRcdHJ0bCgge1xuXHRcdFx0WyBNQVJHSU5fRElSRUNUSU9OU1sgb3JpZW50YXRpb24gXS5zdGFydCBdOiBzcGFjZShcblx0XHRcdFx0bWFyZ2luU3RhcnQgPz8gbWFyZ2luXG5cdFx0XHQpLFxuXHRcdFx0WyBNQVJHSU5fRElSRUNUSU9OU1sgb3JpZW50YXRpb24gXS5lbmQgXTogc3BhY2UoXG5cdFx0XHRcdG1hcmdpbkVuZCA/PyBtYXJnaW5cblx0XHRcdCksXG5cdFx0fSApKClcblx0KTtcblxuY29uc3QgcmVuZGVyRGlzcGxheSA9ICgge1xuXHQnYXJpYS1vcmllbnRhdGlvbic6IG9yaWVudGF0aW9uID0gJ2hvcml6b250YWwnLFxufTogRGl2aWRlclByb3BzICkgPT4ge1xuXHRyZXR1cm4gb3JpZW50YXRpb24gPT09ICd2ZXJ0aWNhbCdcblx0XHQ/IGNzcyggeyBkaXNwbGF5OiAnaW5saW5lJyB9IClcblx0XHQ6IHVuZGVmaW5lZDtcbn07XG5cbmNvbnN0IHJlbmRlckJvcmRlciA9ICgge1xuXHQnYXJpYS1vcmllbnRhdGlvbic6IG9yaWVudGF0aW9uID0gJ2hvcml6b250YWwnLFxufTogRGl2aWRlclByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCB7XG5cdFx0WyBvcmllbnRhdGlvbiA9PT0gJ3ZlcnRpY2FsJyA/ICdib3JkZXJSaWdodCcgOiAnYm9yZGVyQm90dG9tJyBdOlxuXHRcdFx0JzFweCBzb2xpZCBjdXJyZW50Q29sb3InLFxuXHR9ICk7XG59O1xuXG5jb25zdCByZW5kZXJTaXplID0gKCB7XG5cdCdhcmlhLW9yaWVudGF0aW9uJzogb3JpZW50YXRpb24gPSAnaG9yaXpvbnRhbCcsXG59OiBEaXZpZGVyUHJvcHMgKSA9PlxuXHRjc3MoIHtcblx0XHRoZWlnaHQ6IG9yaWVudGF0aW9uID09PSAndmVydGljYWwnID8gJ2F1dG8nIDogMCxcblx0XHR3aWR0aDogb3JpZW50YXRpb24gPT09ICd2ZXJ0aWNhbCcgPyAwIDogJ2F1dG8nLFxuXHR9ICk7XG5cbmV4cG9ydCBjb25zdCBEaXZpZGVyVmlldyA9IHN0eWxlZC5ocjwgRGl2aWRlclByb3BzID5gXG5cdGJvcmRlcjogMDtcblx0bWFyZ2luOiAwO1xuXG5cdCR7IHJlbmRlckRpc3BsYXkgfVxuXHQkeyByZW5kZXJCb3JkZXIgfVxuXHQkeyByZW5kZXJTaXplIH1cblx0JHsgcmVuZGVyTWFyZ2luIH1cbmA7XG4iXX0= */");
  var _ref7 = false ? {
    name: "1u4hpl4",
    styles: "display:inline"
  } : {
    name: "9r0jm7-renderDisplay",
    styles: "display:inline;label:renderDisplay;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtREkiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgRGl2aWRlclByb3BzIH0gZnJvbSAnLi90eXBlcyc7XG5cbmNvbnN0IE1BUkdJTl9ESVJFQ1RJT05TOiBSZWNvcmQ8XG5cdE5vbk51bGxhYmxlPCBEaXZpZGVyUHJvcHNbICdvcmllbnRhdGlvbicgXSA+LFxuXHRSZWNvcmQ8ICdzdGFydCcgfCAnZW5kJywgc3RyaW5nID5cbj4gPSB7XG5cdHZlcnRpY2FsOiB7XG5cdFx0c3RhcnQ6ICdtYXJnaW5MZWZ0Jyxcblx0XHRlbmQ6ICdtYXJnaW5SaWdodCcsXG5cdH0sXG5cdGhvcml6b250YWw6IHtcblx0XHRzdGFydDogJ21hcmdpblRvcCcsXG5cdFx0ZW5kOiAnbWFyZ2luQm90dG9tJyxcblx0fSxcbn07XG5cbi8vIFJlbmRlcnMgdGhlIGNvcnJlY3QgbWFyZ2lucyBnaXZlbiB0aGUgRGl2aWRlcidzIGBvcmllbnRhdGlvbmAgYW5kIHRoZSB3cml0aW5nIGRpcmVjdGlvbi5cbi8vIFdoZW4gYm90aCB0aGUgZ2VuZXJpYyBgbWFyZ2luYCBhbmQgdGhlIHNwZWNpZmljIGBtYXJnaW5TdGFydHxtYXJnaW5FbmRgIHByb3BzIGFyZSBkZWZpbmVkLFxuLy8gdGhlIGxhdHRlciB3aWxsIHRha2UgcHJpb3JpdHkuXG5jb25zdCByZW5kZXJNYXJnaW4gPSAoIHtcblx0J2FyaWEtb3JpZW50YXRpb24nOiBvcmllbnRhdGlvbiA9ICdob3Jpem9udGFsJyxcblx0bWFyZ2luLFxuXHRtYXJnaW5TdGFydCxcblx0bWFyZ2luRW5kLFxufTogRGl2aWRlclByb3BzICkgPT5cblx0Y3NzKFxuXHRcdHJ0bCgge1xuXHRcdFx0WyBNQVJHSU5fRElSRUNUSU9OU1sgb3JpZW50YXRpb24gXS5zdGFydCBdOiBzcGFjZShcblx0XHRcdFx0bWFyZ2luU3RhcnQgPz8gbWFyZ2luXG5cdFx0XHQpLFxuXHRcdFx0WyBNQVJHSU5fRElSRUNUSU9OU1sgb3JpZW50YXRpb24gXS5lbmQgXTogc3BhY2UoXG5cdFx0XHRcdG1hcmdpbkVuZCA/PyBtYXJnaW5cblx0XHRcdCksXG5cdFx0fSApKClcblx0KTtcblxuY29uc3QgcmVuZGVyRGlzcGxheSA9ICgge1xuXHQnYXJpYS1vcmllbnRhdGlvbic6IG9yaWVudGF0aW9uID0gJ2hvcml6b250YWwnLFxufTogRGl2aWRlclByb3BzICkgPT4ge1xuXHRyZXR1cm4gb3JpZW50YXRpb24gPT09ICd2ZXJ0aWNhbCdcblx0XHQ/IGNzcyggeyBkaXNwbGF5OiAnaW5saW5lJyB9IClcblx0XHQ6IHVuZGVmaW5lZDtcbn07XG5cbmNvbnN0IHJlbmRlckJvcmRlciA9ICgge1xuXHQnYXJpYS1vcmllbnRhdGlvbic6IG9yaWVudGF0aW9uID0gJ2hvcml6b250YWwnLFxufTogRGl2aWRlclByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCB7XG5cdFx0WyBvcmllbnRhdGlvbiA9PT0gJ3ZlcnRpY2FsJyA/ICdib3JkZXJSaWdodCcgOiAnYm9yZGVyQm90dG9tJyBdOlxuXHRcdFx0JzFweCBzb2xpZCBjdXJyZW50Q29sb3InLFxuXHR9ICk7XG59O1xuXG5jb25zdCByZW5kZXJTaXplID0gKCB7XG5cdCdhcmlhLW9yaWVudGF0aW9uJzogb3JpZW50YXRpb24gPSAnaG9yaXpvbnRhbCcsXG59OiBEaXZpZGVyUHJvcHMgKSA9PlxuXHRjc3MoIHtcblx0XHRoZWlnaHQ6IG9yaWVudGF0aW9uID09PSAndmVydGljYWwnID8gJ2F1dG8nIDogMCxcblx0XHR3aWR0aDogb3JpZW50YXRpb24gPT09ICd2ZXJ0aWNhbCcgPyAwIDogJ2F1dG8nLFxuXHR9ICk7XG5cbmV4cG9ydCBjb25zdCBEaXZpZGVyVmlldyA9IHN0eWxlZC5ocjwgRGl2aWRlclByb3BzID5gXG5cdGJvcmRlcjogMDtcblx0bWFyZ2luOiAwO1xuXG5cdCR7IHJlbmRlckRpc3BsYXkgfVxuXHQkeyByZW5kZXJCb3JkZXIgfVxuXHQkeyByZW5kZXJTaXplIH1cblx0JHsgcmVuZGVyTWFyZ2luIH1cbmA7XG4iXX0= */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__21
  };
  var renderDisplay = ({
    "aria-orientation": orientation = "horizontal"
  }) => {
    return orientation === "vertical" ? _ref7 : void 0;
  };
  var renderBorder = ({
    "aria-orientation": orientation = "horizontal"
  }) => {
    return /* @__PURE__ */ css({
      [orientation === "vertical" ? "borderRight" : "borderBottom"]: "1px solid currentColor"
    }, false ? "" : ";label:renderBorder;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEwRFEiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgRGl2aWRlclByb3BzIH0gZnJvbSAnLi90eXBlcyc7XG5cbmNvbnN0IE1BUkdJTl9ESVJFQ1RJT05TOiBSZWNvcmQ8XG5cdE5vbk51bGxhYmxlPCBEaXZpZGVyUHJvcHNbICdvcmllbnRhdGlvbicgXSA+LFxuXHRSZWNvcmQ8ICdzdGFydCcgfCAnZW5kJywgc3RyaW5nID5cbj4gPSB7XG5cdHZlcnRpY2FsOiB7XG5cdFx0c3RhcnQ6ICdtYXJnaW5MZWZ0Jyxcblx0XHRlbmQ6ICdtYXJnaW5SaWdodCcsXG5cdH0sXG5cdGhvcml6b250YWw6IHtcblx0XHRzdGFydDogJ21hcmdpblRvcCcsXG5cdFx0ZW5kOiAnbWFyZ2luQm90dG9tJyxcblx0fSxcbn07XG5cbi8vIFJlbmRlcnMgdGhlIGNvcnJlY3QgbWFyZ2lucyBnaXZlbiB0aGUgRGl2aWRlcidzIGBvcmllbnRhdGlvbmAgYW5kIHRoZSB3cml0aW5nIGRpcmVjdGlvbi5cbi8vIFdoZW4gYm90aCB0aGUgZ2VuZXJpYyBgbWFyZ2luYCBhbmQgdGhlIHNwZWNpZmljIGBtYXJnaW5TdGFydHxtYXJnaW5FbmRgIHByb3BzIGFyZSBkZWZpbmVkLFxuLy8gdGhlIGxhdHRlciB3aWxsIHRha2UgcHJpb3JpdHkuXG5jb25zdCByZW5kZXJNYXJnaW4gPSAoIHtcblx0J2FyaWEtb3JpZW50YXRpb24nOiBvcmllbnRhdGlvbiA9ICdob3Jpem9udGFsJyxcblx0bWFyZ2luLFxuXHRtYXJnaW5TdGFydCxcblx0bWFyZ2luRW5kLFxufTogRGl2aWRlclByb3BzICkgPT5cblx0Y3NzKFxuXHRcdHJ0bCgge1xuXHRcdFx0WyBNQVJHSU5fRElSRUNUSU9OU1sgb3JpZW50YXRpb24gXS5zdGFydCBdOiBzcGFjZShcblx0XHRcdFx0bWFyZ2luU3RhcnQgPz8gbWFyZ2luXG5cdFx0XHQpLFxuXHRcdFx0WyBNQVJHSU5fRElSRUNUSU9OU1sgb3JpZW50YXRpb24gXS5lbmQgXTogc3BhY2UoXG5cdFx0XHRcdG1hcmdpbkVuZCA/PyBtYXJnaW5cblx0XHRcdCksXG5cdFx0fSApKClcblx0KTtcblxuY29uc3QgcmVuZGVyRGlzcGxheSA9ICgge1xuXHQnYXJpYS1vcmllbnRhdGlvbic6IG9yaWVudGF0aW9uID0gJ2hvcml6b250YWwnLFxufTogRGl2aWRlclByb3BzICkgPT4ge1xuXHRyZXR1cm4gb3JpZW50YXRpb24gPT09ICd2ZXJ0aWNhbCdcblx0XHQ/IGNzcyggeyBkaXNwbGF5OiAnaW5saW5lJyB9IClcblx0XHQ6IHVuZGVmaW5lZDtcbn07XG5cbmNvbnN0IHJlbmRlckJvcmRlciA9ICgge1xuXHQnYXJpYS1vcmllbnRhdGlvbic6IG9yaWVudGF0aW9uID0gJ2hvcml6b250YWwnLFxufTogRGl2aWRlclByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCB7XG5cdFx0WyBvcmllbnRhdGlvbiA9PT0gJ3ZlcnRpY2FsJyA/ICdib3JkZXJSaWdodCcgOiAnYm9yZGVyQm90dG9tJyBdOlxuXHRcdFx0JzFweCBzb2xpZCBjdXJyZW50Q29sb3InLFxuXHR9ICk7XG59O1xuXG5jb25zdCByZW5kZXJTaXplID0gKCB7XG5cdCdhcmlhLW9yaWVudGF0aW9uJzogb3JpZW50YXRpb24gPSAnaG9yaXpvbnRhbCcsXG59OiBEaXZpZGVyUHJvcHMgKSA9PlxuXHRjc3MoIHtcblx0XHRoZWlnaHQ6IG9yaWVudGF0aW9uID09PSAndmVydGljYWwnID8gJ2F1dG8nIDogMCxcblx0XHR3aWR0aDogb3JpZW50YXRpb24gPT09ICd2ZXJ0aWNhbCcgPyAwIDogJ2F1dG8nLFxuXHR9ICk7XG5cbmV4cG9ydCBjb25zdCBEaXZpZGVyVmlldyA9IHN0eWxlZC5ocjwgRGl2aWRlclByb3BzID5gXG5cdGJvcmRlcjogMDtcblx0bWFyZ2luOiAwO1xuXG5cdCR7IHJlbmRlckRpc3BsYXkgfVxuXHQkeyByZW5kZXJCb3JkZXIgfVxuXHQkeyByZW5kZXJTaXplIH1cblx0JHsgcmVuZGVyTWFyZ2luIH1cbmA7XG4iXX0= */");
  };
  var renderSize = ({
    "aria-orientation": orientation = "horizontal"
  }) => /* @__PURE__ */ css({
    height: orientation === "vertical" ? "auto" : 0,
    width: orientation === "vertical" ? 0 : "auto"
  }, false ? "" : ";label:renderSize;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtRUMiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgRGl2aWRlclByb3BzIH0gZnJvbSAnLi90eXBlcyc7XG5cbmNvbnN0IE1BUkdJTl9ESVJFQ1RJT05TOiBSZWNvcmQ8XG5cdE5vbk51bGxhYmxlPCBEaXZpZGVyUHJvcHNbICdvcmllbnRhdGlvbicgXSA+LFxuXHRSZWNvcmQ8ICdzdGFydCcgfCAnZW5kJywgc3RyaW5nID5cbj4gPSB7XG5cdHZlcnRpY2FsOiB7XG5cdFx0c3RhcnQ6ICdtYXJnaW5MZWZ0Jyxcblx0XHRlbmQ6ICdtYXJnaW5SaWdodCcsXG5cdH0sXG5cdGhvcml6b250YWw6IHtcblx0XHRzdGFydDogJ21hcmdpblRvcCcsXG5cdFx0ZW5kOiAnbWFyZ2luQm90dG9tJyxcblx0fSxcbn07XG5cbi8vIFJlbmRlcnMgdGhlIGNvcnJlY3QgbWFyZ2lucyBnaXZlbiB0aGUgRGl2aWRlcidzIGBvcmllbnRhdGlvbmAgYW5kIHRoZSB3cml0aW5nIGRpcmVjdGlvbi5cbi8vIFdoZW4gYm90aCB0aGUgZ2VuZXJpYyBgbWFyZ2luYCBhbmQgdGhlIHNwZWNpZmljIGBtYXJnaW5TdGFydHxtYXJnaW5FbmRgIHByb3BzIGFyZSBkZWZpbmVkLFxuLy8gdGhlIGxhdHRlciB3aWxsIHRha2UgcHJpb3JpdHkuXG5jb25zdCByZW5kZXJNYXJnaW4gPSAoIHtcblx0J2FyaWEtb3JpZW50YXRpb24nOiBvcmllbnRhdGlvbiA9ICdob3Jpem9udGFsJyxcblx0bWFyZ2luLFxuXHRtYXJnaW5TdGFydCxcblx0bWFyZ2luRW5kLFxufTogRGl2aWRlclByb3BzICkgPT5cblx0Y3NzKFxuXHRcdHJ0bCgge1xuXHRcdFx0WyBNQVJHSU5fRElSRUNUSU9OU1sgb3JpZW50YXRpb24gXS5zdGFydCBdOiBzcGFjZShcblx0XHRcdFx0bWFyZ2luU3RhcnQgPz8gbWFyZ2luXG5cdFx0XHQpLFxuXHRcdFx0WyBNQVJHSU5fRElSRUNUSU9OU1sgb3JpZW50YXRpb24gXS5lbmQgXTogc3BhY2UoXG5cdFx0XHRcdG1hcmdpbkVuZCA/PyBtYXJnaW5cblx0XHRcdCksXG5cdFx0fSApKClcblx0KTtcblxuY29uc3QgcmVuZGVyRGlzcGxheSA9ICgge1xuXHQnYXJpYS1vcmllbnRhdGlvbic6IG9yaWVudGF0aW9uID0gJ2hvcml6b250YWwnLFxufTogRGl2aWRlclByb3BzICkgPT4ge1xuXHRyZXR1cm4gb3JpZW50YXRpb24gPT09ICd2ZXJ0aWNhbCdcblx0XHQ/IGNzcyggeyBkaXNwbGF5OiAnaW5saW5lJyB9IClcblx0XHQ6IHVuZGVmaW5lZDtcbn07XG5cbmNvbnN0IHJlbmRlckJvcmRlciA9ICgge1xuXHQnYXJpYS1vcmllbnRhdGlvbic6IG9yaWVudGF0aW9uID0gJ2hvcml6b250YWwnLFxufTogRGl2aWRlclByb3BzICkgPT4ge1xuXHRyZXR1cm4gY3NzKCB7XG5cdFx0WyBvcmllbnRhdGlvbiA9PT0gJ3ZlcnRpY2FsJyA/ICdib3JkZXJSaWdodCcgOiAnYm9yZGVyQm90dG9tJyBdOlxuXHRcdFx0JzFweCBzb2xpZCBjdXJyZW50Q29sb3InLFxuXHR9ICk7XG59O1xuXG5jb25zdCByZW5kZXJTaXplID0gKCB7XG5cdCdhcmlhLW9yaWVudGF0aW9uJzogb3JpZW50YXRpb24gPSAnaG9yaXpvbnRhbCcsXG59OiBEaXZpZGVyUHJvcHMgKSA9PlxuXHRjc3MoIHtcblx0XHRoZWlnaHQ6IG9yaWVudGF0aW9uID09PSAndmVydGljYWwnID8gJ2F1dG8nIDogMCxcblx0XHR3aWR0aDogb3JpZW50YXRpb24gPT09ICd2ZXJ0aWNhbCcgPyAwIDogJ2F1dG8nLFxuXHR9ICk7XG5cbmV4cG9ydCBjb25zdCBEaXZpZGVyVmlldyA9IHN0eWxlZC5ocjwgRGl2aWRlclByb3BzID5gXG5cdGJvcmRlcjogMDtcblx0bWFyZ2luOiAwO1xuXG5cdCR7IHJlbmRlckRpc3BsYXkgfVxuXHQkeyByZW5kZXJCb3JkZXIgfVxuXHQkeyByZW5kZXJTaXplIH1cblx0JHsgcmVuZGVyTWFyZ2luIH1cbmA7XG4iXX0= */");
  var DividerView = /* @__PURE__ */ createStyled("hr", false ? {
    target: "e19on6iw0"
  } : {
    target: "e19on6iw0",
    label: "DividerView"
  })("border:0;margin:0;", renderDisplay, " ", renderBorder, " ", renderSize, " ", renderMargin, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3RW9EIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgeyBydGwgfSBmcm9tICcuLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7IERpdmlkZXJQcm9wcyB9IGZyb20gJy4vdHlwZXMnO1xuXG5jb25zdCBNQVJHSU5fRElSRUNUSU9OUzogUmVjb3JkPFxuXHROb25OdWxsYWJsZTwgRGl2aWRlclByb3BzWyAnb3JpZW50YXRpb24nIF0gPixcblx0UmVjb3JkPCAnc3RhcnQnIHwgJ2VuZCcsIHN0cmluZyA+XG4+ID0ge1xuXHR2ZXJ0aWNhbDoge1xuXHRcdHN0YXJ0OiAnbWFyZ2luTGVmdCcsXG5cdFx0ZW5kOiAnbWFyZ2luUmlnaHQnLFxuXHR9LFxuXHRob3Jpem9udGFsOiB7XG5cdFx0c3RhcnQ6ICdtYXJnaW5Ub3AnLFxuXHRcdGVuZDogJ21hcmdpbkJvdHRvbScsXG5cdH0sXG59O1xuXG4vLyBSZW5kZXJzIHRoZSBjb3JyZWN0IG1hcmdpbnMgZ2l2ZW4gdGhlIERpdmlkZXIncyBgb3JpZW50YXRpb25gIGFuZCB0aGUgd3JpdGluZyBkaXJlY3Rpb24uXG4vLyBXaGVuIGJvdGggdGhlIGdlbmVyaWMgYG1hcmdpbmAgYW5kIHRoZSBzcGVjaWZpYyBgbWFyZ2luU3RhcnR8bWFyZ2luRW5kYCBwcm9wcyBhcmUgZGVmaW5lZCxcbi8vIHRoZSBsYXR0ZXIgd2lsbCB0YWtlIHByaW9yaXR5LlxuY29uc3QgcmVuZGVyTWFyZ2luID0gKCB7XG5cdCdhcmlhLW9yaWVudGF0aW9uJzogb3JpZW50YXRpb24gPSAnaG9yaXpvbnRhbCcsXG5cdG1hcmdpbixcblx0bWFyZ2luU3RhcnQsXG5cdG1hcmdpbkVuZCxcbn06IERpdmlkZXJQcm9wcyApID0+XG5cdGNzcyhcblx0XHRydGwoIHtcblx0XHRcdFsgTUFSR0lOX0RJUkVDVElPTlNbIG9yaWVudGF0aW9uIF0uc3RhcnQgXTogc3BhY2UoXG5cdFx0XHRcdG1hcmdpblN0YXJ0ID8/IG1hcmdpblxuXHRcdFx0KSxcblx0XHRcdFsgTUFSR0lOX0RJUkVDVElPTlNbIG9yaWVudGF0aW9uIF0uZW5kIF06IHNwYWNlKFxuXHRcdFx0XHRtYXJnaW5FbmQgPz8gbWFyZ2luXG5cdFx0XHQpLFxuXHRcdH0gKSgpXG5cdCk7XG5cbmNvbnN0IHJlbmRlckRpc3BsYXkgPSAoIHtcblx0J2FyaWEtb3JpZW50YXRpb24nOiBvcmllbnRhdGlvbiA9ICdob3Jpem9udGFsJyxcbn06IERpdmlkZXJQcm9wcyApID0+IHtcblx0cmV0dXJuIG9yaWVudGF0aW9uID09PSAndmVydGljYWwnXG5cdFx0PyBjc3MoIHsgZGlzcGxheTogJ2lubGluZScgfSApXG5cdFx0OiB1bmRlZmluZWQ7XG59O1xuXG5jb25zdCByZW5kZXJCb3JkZXIgPSAoIHtcblx0J2FyaWEtb3JpZW50YXRpb24nOiBvcmllbnRhdGlvbiA9ICdob3Jpem9udGFsJyxcbn06IERpdmlkZXJQcm9wcyApID0+IHtcblx0cmV0dXJuIGNzcygge1xuXHRcdFsgb3JpZW50YXRpb24gPT09ICd2ZXJ0aWNhbCcgPyAnYm9yZGVyUmlnaHQnIDogJ2JvcmRlckJvdHRvbScgXTpcblx0XHRcdCcxcHggc29saWQgY3VycmVudENvbG9yJyxcblx0fSApO1xufTtcblxuY29uc3QgcmVuZGVyU2l6ZSA9ICgge1xuXHQnYXJpYS1vcmllbnRhdGlvbic6IG9yaWVudGF0aW9uID0gJ2hvcml6b250YWwnLFxufTogRGl2aWRlclByb3BzICkgPT5cblx0Y3NzKCB7XG5cdFx0aGVpZ2h0OiBvcmllbnRhdGlvbiA9PT0gJ3ZlcnRpY2FsJyA/ICdhdXRvJyA6IDAsXG5cdFx0d2lkdGg6IG9yaWVudGF0aW9uID09PSAndmVydGljYWwnID8gMCA6ICdhdXRvJyxcblx0fSApO1xuXG5leHBvcnQgY29uc3QgRGl2aWRlclZpZXcgPSBzdHlsZWQuaHI8IERpdmlkZXJQcm9wcyA+YFxuXHRib3JkZXI6IDA7XG5cdG1hcmdpbjogMDtcblxuXHQkeyByZW5kZXJEaXNwbGF5IH1cblx0JHsgcmVuZGVyQm9yZGVyIH1cblx0JHsgcmVuZGVyU2l6ZSB9XG5cdCR7IHJlbmRlck1hcmdpbiB9XG5gO1xuIl19 */"));

  // packages/components/build-module/divider/component.mjs
  var import_jsx_runtime164 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedDivider(props, forwardedRef) {
    const contextProps = useContextSystem(props, "Divider");
    return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(Separator, {
      render: /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(DividerView, {}),
      ...contextProps,
      ref: forwardedRef
    });
  }
  var Divider2 = contextConnect(UnconnectedDivider, "Divider");
  var component_default30 = Divider2;

  // packages/components/build-module/card/card-divider/hook.mjs
  var import_element101 = __toESM(require_element(), 1);
  function useCardDivider(props) {
    const {
      className: className2,
      ...otherProps
    } = useContextSystem(props, "CardDivider");
    const cx3 = useCx();
    const classes = (0, import_element101.useMemo)(() => cx3(
      Divider,
      borderColor,
      // This classname is added for legacy compatibility reasons.
      "components-card__divider",
      className2
    ), [className2, cx3]);
    return {
      ...otherProps,
      className: classes
    };
  }

  // packages/components/build-module/card/card-divider/component.mjs
  var import_jsx_runtime165 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedCardDivider(props, forwardedRef) {
    const dividerProps = useCardDivider(props);
    return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(component_default30, {
      ...dividerProps,
      ref: forwardedRef
    });
  }
  var CardDivider = contextConnect(UnconnectedCardDivider, "CardDivider");
  var component_default31 = CardDivider;

  // packages/components/build-module/card/card-footer/hook.mjs
  var import_element102 = __toESM(require_element(), 1);
  function useCardFooter(props) {
    const {
      className: className2,
      justify,
      isBorderless = false,
      isShady = false,
      size: size3 = "medium",
      ...otherProps
    } = useContextSystem(props, "CardFooter");
    const cx3 = useCx();
    const classes = (0, import_element102.useMemo)(() => cx3(
      Footer,
      borderRadius,
      borderColor,
      getPaddingBySize(size3),
      isBorderless && borderless,
      isShady && shady,
      // This classname is added for legacy compatibility reasons.
      "components-card__footer",
      className2
    ), [className2, cx3, isBorderless, isShady, size3]);
    return {
      ...otherProps,
      className: classes,
      justify
    };
  }

  // packages/components/build-module/card/card-footer/component.mjs
  var import_jsx_runtime166 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedCardFooter(props, forwardedRef) {
    const footerProps = useCardFooter(props);
    return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(component_default3, {
      ...footerProps,
      ref: forwardedRef
    });
  }
  var CardFooter = contextConnect(UnconnectedCardFooter, "CardFooter");
  var component_default32 = CardFooter;

  // packages/components/build-module/card/card-header/hook.mjs
  var import_element103 = __toESM(require_element(), 1);
  function useCardHeader(props) {
    const {
      className: className2,
      isBorderless = false,
      isShady = false,
      size: size3 = "medium",
      ...otherProps
    } = useContextSystem(props, "CardHeader");
    const cx3 = useCx();
    const classes = (0, import_element103.useMemo)(() => cx3(
      Header,
      borderRadius,
      borderColor,
      getPaddingBySize(size3),
      isBorderless && borderless,
      isShady && shady,
      // This classname is added for legacy compatibility reasons.
      "components-card__header",
      className2
    ), [className2, cx3, isBorderless, isShady, size3]);
    return {
      ...otherProps,
      className: classes
    };
  }

  // packages/components/build-module/card/card-header/component.mjs
  var import_jsx_runtime167 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedCardHeader(props, forwardedRef) {
    const headerProps = useCardHeader(props);
    return /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(component_default3, {
      ...headerProps,
      ref: forwardedRef
    });
  }
  var CardHeader = contextConnect(UnconnectedCardHeader, "CardHeader");
  var component_default33 = CardHeader;

  // packages/components/build-module/card/card-media/hook.mjs
  var import_element104 = __toESM(require_element(), 1);
  function useCardMedia(props) {
    const {
      className: className2,
      ...otherProps
    } = useContextSystem(props, "CardMedia");
    const cx3 = useCx();
    const classes = (0, import_element104.useMemo)(() => cx3(
      Media,
      borderRadius,
      // This classname is added for legacy compatibility reasons.
      "components-card__media",
      className2
    ), [className2, cx3]);
    return {
      ...otherProps,
      className: classes
    };
  }

  // packages/components/build-module/card/card-media/component.mjs
  var import_jsx_runtime168 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedCardMedia(props, forwardedRef) {
    const cardMediaProps = useCardMedia(props);
    return /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(component_default, {
      ...cardMediaProps,
      ref: forwardedRef
    });
  }
  var CardMedia = contextConnect(UnconnectedCardMedia, "CardMedia");
  var component_default34 = CardMedia;

  // packages/components/build-module/checkbox-control/index.mjs
  var import_element105 = __toESM(require_element(), 1);
  var import_compose39 = __toESM(require_compose(), 1);
  var import_deprecated12 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime169 = __toESM(require_jsx_runtime(), 1);
  function CheckboxControl(props) {
    const {
      // Prevent passing this to `input`.
      __nextHasNoMarginBottom: _2,
      label,
      className: className2,
      heading,
      checked,
      indeterminate,
      help,
      id: idProp,
      onChange,
      onClick,
      ...additionalProps
    } = props;
    if (heading) {
      (0, import_deprecated12.default)("`heading` prop in `CheckboxControl`", {
        alternative: "a separate element to implement a heading",
        since: "5.8"
      });
    }
    const [showCheckedIcon, setShowCheckedIcon] = (0, import_element105.useState)(false);
    const [showIndeterminateIcon, setShowIndeterminateIcon] = (0, import_element105.useState)(false);
    const ref = (0, import_compose39.useRefEffect)((node2) => {
      if (!node2) {
        return;
      }
      node2.indeterminate = !!indeterminate;
      setShowCheckedIcon(node2.matches(":checked"));
      setShowIndeterminateIcon(node2.matches(":indeterminate"));
    }, [checked, indeterminate]);
    const id3 = (0, import_compose39.useInstanceId)(CheckboxControl, "inspector-checkbox-control", idProp);
    const onChangeValue = (event) => onChange(event.target.checked);
    return /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(base_control_default, {
      label: heading,
      id: id3,
      help: help && /* @__PURE__ */ (0, import_jsx_runtime169.jsx)("span", {
        className: "components-checkbox-control__help",
        children: help
      }),
      className: clsx_default("components-checkbox-control", className2),
      children: /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)(component_default9, {
        spacing: 0,
        justify: "start",
        alignment: "top",
        children: [/* @__PURE__ */ (0, import_jsx_runtime169.jsxs)("span", {
          className: "components-checkbox-control__input-container",
          children: [/* @__PURE__ */ (0, import_jsx_runtime169.jsx)("input", {
            ref,
            id: id3,
            className: "components-checkbox-control__input",
            type: "checkbox",
            value: "1",
            onChange: onChangeValue,
            checked,
            "aria-describedby": !!help ? id3 + "__help" : void 0,
            onClick: (event) => {
              event.currentTarget.focus();
              onClick?.(event);
            },
            ...additionalProps
          }), showIndeterminateIcon ? /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(icon_default2, {
            icon: reset_default,
            className: "components-checkbox-control__indeterminate",
            role: "presentation"
          }) : null, showCheckedIcon ? /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(icon_default2, {
            icon: check_default,
            className: "components-checkbox-control__checked",
            role: "presentation"
          }) : null]
        }), label && /* @__PURE__ */ (0, import_jsx_runtime169.jsx)("label", {
          className: "components-checkbox-control__label",
          htmlFor: id3,
          children: label
        })]
      })
    });
  }
  var checkbox_control_default = CheckboxControl;

  // packages/components/build-module/clipboard-button/index.mjs
  var import_element106 = __toESM(require_element(), 1);
  var import_compose40 = __toESM(require_compose(), 1);
  var import_deprecated13 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime170 = __toESM(require_jsx_runtime(), 1);
  var TIMEOUT = 4e3;
  function ClipboardButton({
    className: className2,
    children,
    onCopy,
    onFinishCopy,
    text,
    ...buttonProps
  }) {
    (0, import_deprecated13.default)("wp.components.ClipboardButton", {
      since: "5.8",
      alternative: "wp.compose.useCopyToClipboard"
    });
    const timeoutIdRef = (0, import_element106.useRef)(void 0);
    const ref = (0, import_compose40.useCopyToClipboard)(text, () => {
      onCopy();
      if (timeoutIdRef.current) {
        clearTimeout(timeoutIdRef.current);
      }
      if (onFinishCopy) {
        timeoutIdRef.current = setTimeout(() => onFinishCopy(), TIMEOUT);
      }
    });
    (0, import_element106.useEffect)(() => {
      return () => {
        if (timeoutIdRef.current) {
          clearTimeout(timeoutIdRef.current);
        }
      };
    }, []);
    const classes = clsx_default("components-clipboard-button", className2);
    const focusOnCopyEventTarget = (event) => {
      event.target.focus();
    };
    return (
      // Disable reasons: the parent component takes care of the __next40pxDefaultSize prop.
      // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop
      /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(button_default, {
        ...buttonProps,
        className: classes,
        ref,
        onCopy: focusOnCopyEventTarget,
        children
      })
    );
  }

  // packages/components/build-module/palette-edit/index.mjs
  var import_element115 = __toESM(require_element(), 1);
  var import_i18n35 = __toESM(require_i18n(), 1);
  var import_compose43 = __toESM(require_compose(), 1);

  // packages/components/build-module/item-group/item/hook.mjs
  var import_element108 = __toESM(require_element(), 1);

  // packages/components/build-module/item-group/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__22() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var unstyledButton = (as) => {
    return /* @__PURE__ */ css("font-size:", font("default.fontSize"), ";font-family:inherit;appearance:none;border:1px solid transparent;cursor:pointer;background:none;text-align:start;text-decoration:", as === "a" ? "none" : void 0, ";svg,path{fill:currentColor;}&:hover{color:", COLORS.theme.accent, ";}&:focus{box-shadow:none;outline:none;}&:focus-visible{box-shadow:0 0 0 var( --wp-admin-border-width-focus ) ", COLORS.theme.accent, ";outline:2px solid transparent;outline-offset:0;}" + (false ? "" : ";label:unstyledButton;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFXVyIsImZpbGUiOiJzdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IENPTkZJRywgQ09MT1JTLCBmb250IH0gZnJvbSAnLi4vdXRpbHMnO1xuXG5leHBvcnQgY29uc3QgdW5zdHlsZWRCdXR0b24gPSAoIGFzOiAnYScgfCAnYnV0dG9uJyApID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRmb250LXNpemU6ICR7IGZvbnQoICdkZWZhdWx0LmZvbnRTaXplJyApIH07XG5cdFx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdFx0YXBwZWFyYW5jZTogbm9uZTtcblx0XHRib3JkZXI6IDFweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRjdXJzb3I6IHBvaW50ZXI7XG5cdFx0YmFja2dyb3VuZDogbm9uZTtcblx0XHR0ZXh0LWFsaWduOiBzdGFydDtcblx0XHR0ZXh0LWRlY29yYXRpb246ICR7IGFzID09PSAnYScgPyAnbm9uZScgOiB1bmRlZmluZWQgfTtcblxuXHRcdHN2Zyxcblx0XHRwYXRoIHtcblx0XHRcdGZpbGw6IGN1cnJlbnRDb2xvcjtcblx0XHR9XG5cblx0XHQmOmhvdmVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0fVxuXG5cdFx0Jjpmb2N1cyB7XG5cdFx0XHRib3gtc2hhZG93OiBub25lO1xuXHRcdFx0b3V0bGluZTogbm9uZTtcblx0XHR9XG5cblx0XHQmOmZvY3VzLXZpc2libGUge1xuXHRcdFx0Ym94LXNoYWRvdzogMCAwIDAgdmFyKCAtLXdwLWFkbWluLWJvcmRlci13aWR0aC1mb2N1cyApXG5cdFx0XHRcdCR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHRcdC8vIFdpbmRvd3MgaGlnaCBjb250cmFzdCBtb2RlLlxuXHRcdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdFx0b3V0bGluZS1vZmZzZXQ6IDA7XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGl0ZW1XcmFwcGVyID0gY3NzYFxuXHR3aWR0aDogMTAwJTtcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgaXRlbSA9IGNzc2Bcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0d2lkdGg6IDEwMCU7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRtYXJnaW46IDA7XG5cdGNvbG9yOiBpbmhlcml0O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJvcmRlcmVkID0gY3NzYFxuXHRib3JkZXI6IDFweCBzb2xpZCAkeyBDT05GSUcuc3VyZmFjZUJvcmRlckNvbG9yIH07XG5gO1xuXG5leHBvcnQgY29uc3Qgc2VwYXJhdGVkID0gY3NzYFxuXHQ+ICo6bm90KCBtYXJxdWVlICkgPiAqIHtcblx0XHRib3JkZXItYm90dG9tOiAxcHggc29saWQgJHsgQ09ORklHLnN1cmZhY2VCb3JkZXJDb2xvciB9O1xuXHR9XG5cblx0PiAqOmxhc3Qtb2YtdHlwZSA+ICoge1xuXHRcdGJvcmRlci1ib3R0b20tY29sb3I6IHRyYW5zcGFyZW50O1xuXHR9XG5gO1xuXG5jb25zdCBib3JkZXJSYWRpdXMgPSBDT05GSUcucmFkaXVzU21hbGw7XG5cbmV4cG9ydCBjb25zdCBzcGFjZWRBcm91bmQgPSBjc3NgXG5cdGJvcmRlci1yYWRpdXM6ICR7IGJvcmRlclJhZGl1cyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IHJvdW5kZWQgPSBjc3NgXG5cdGJvcmRlci1yYWRpdXM6ICR7IGJvcmRlclJhZGl1cyB9O1xuXG5cdD4gKjpmaXJzdC1vZi10eXBlID4gKiB7XG5cdFx0Ym9yZGVyLXRvcC1sZWZ0LXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5cdFx0Ym9yZGVyLXRvcC1yaWdodC1yYWRpdXM6ICR7IGJvcmRlclJhZGl1cyB9O1xuXHR9XG5cblx0PiAqOmxhc3Qtb2YtdHlwZSA+ICoge1xuXHRcdGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6ICR7IGJvcmRlclJhZGl1cyB9O1xuXHRcdGJvcmRlci1ib3R0b20tcmlnaHQtcmFkaXVzOiAkeyBib3JkZXJSYWRpdXMgfTtcblx0fVxuYDtcblxuY29uc3QgYmFzZUZvbnRIZWlnaHQgPSBgY2FsYygkeyBDT05GSUcuZm9udFNpemUgfSAqICR7IENPTkZJRy5mb250TGluZUhlaWdodEJhc2UgfSlgO1xuXG4vKlxuICogTWF0aDpcbiAqIC0gVXNlIHRoZSBkZXNpcmVkIGhlaWdodCBhcyB0aGUgYmFzZSB2YWx1ZVxuICogLSBTdWJ0cmFjdCB0aGUgY29tcHV0ZWQgaGVpZ2h0IG9mIChkZWZhdWx0KSB0ZXh0XG4gKiAtIFN1YnRyYWN0IHRoZSBlZmZlY3RzIG9mIGJvcmRlclxuICogLSBEaXZpZGUgdGhlIGNhbGN1bGF0ZWQgbnVtYmVyIGJ5IDIsIGluIG9yZGVyIHRvIGdldCBhbiBpbmRpdmlkdWFsIHRvcC9ib3R0b20gcGFkZGluZ1xuICovXG5jb25zdCBwYWRkaW5nWSA9IGBjYWxjKCgkeyBDT05GSUcuY29udHJvbEhlaWdodCB9IC0gJHsgYmFzZUZvbnRIZWlnaHQgfSAtIDJweCkgLyAyKWA7XG5jb25zdCBwYWRkaW5nWVNtYWxsID0gYGNhbGMoKCR7IENPTkZJRy5jb250cm9sSGVpZ2h0U21hbGwgfSAtICR7IGJhc2VGb250SGVpZ2h0IH0gLSAycHgpIC8gMilgO1xuY29uc3QgcGFkZGluZ1lMYXJnZSA9IGBjYWxjKCgkeyBDT05GSUcuY29udHJvbEhlaWdodExhcmdlIH0gLSAkeyBiYXNlRm9udEhlaWdodCB9IC0gMnB4KSAvIDIpYDtcblxuZXhwb3J0IGNvbnN0IGl0ZW1TaXplcyA9IHtcblx0c21hbGw6IGNzc2Bcblx0XHRwYWRkaW5nOiAkeyBwYWRkaW5nWVNtYWxsIH0gJHsgQ09ORklHLmNvbnRyb2xQYWRkaW5nWFNtYWxsIH1weDtcblx0YCxcblx0bWVkaXVtOiBjc3NgXG5cdFx0cGFkZGluZzogJHsgcGFkZGluZ1kgfSAkeyBDT05GSUcuY29udHJvbFBhZGRpbmdYIH1weDtcblx0YCxcblx0bGFyZ2U6IGNzc2Bcblx0XHRwYWRkaW5nOiAkeyBwYWRkaW5nWUxhcmdlIH0gJHsgQ09ORklHLmNvbnRyb2xQYWRkaW5nWExhcmdlIH1weDtcblx0YCxcbn07XG4iXX0= */");
  };
  var itemWrapper = false ? {
    name: "1bcj5ek",
    styles: "width:100%;display:block"
  } : {
    name: "dcjs67-itemWrapper",
    styles: "width:100%;display:block;label:itemWrapper;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE2QzhCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09ORklHLCBDT0xPUlMsIGZvbnQgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCB1bnN0eWxlZEJ1dHRvbiA9ICggYXM6ICdhJyB8ICdidXR0b24nICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0XHRmb250LWZhbWlseTogaW5oZXJpdDtcblx0XHRhcHBlYXJhbmNlOiBub25lO1xuXHRcdGJvcmRlcjogMXB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdGN1cnNvcjogcG9pbnRlcjtcblx0XHRiYWNrZ3JvdW5kOiBub25lO1xuXHRcdHRleHQtYWxpZ246IHN0YXJ0O1xuXHRcdHRleHQtZGVjb3JhdGlvbjogJHsgYXMgPT09ICdhJyA/ICdub25lJyA6IHVuZGVmaW5lZCB9O1xuXG5cdFx0c3ZnLFxuXHRcdHBhdGgge1xuXHRcdFx0ZmlsbDogY3VycmVudENvbG9yO1xuXHRcdH1cblxuXHRcdCY6aG92ZXIge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHR9XG5cblx0XHQmOmZvY3VzIHtcblx0XHRcdGJveC1zaGFkb3c6IG5vbmU7XG5cdFx0XHRvdXRsaW5lOiBub25lO1xuXHRcdH1cblxuXHRcdCY6Zm9jdXMtdmlzaWJsZSB7XG5cdFx0XHRib3gtc2hhZG93OiAwIDAgMCB2YXIoIC0td3AtYWRtaW4tYm9yZGVyLXdpZHRoLWZvY3VzIClcblx0XHRcdFx0JHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdFx0Ly8gV2luZG93cyBoaWdoIGNvbnRyYXN0IG1vZGUuXG5cdFx0XHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0XHRvdXRsaW5lLW9mZnNldDogMDtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgaXRlbVdyYXBwZXIgPSBjc3NgXG5cdHdpZHRoOiAxMDAlO1xuXHRkaXNwbGF5OiBibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBpdGVtID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHR3aWR0aDogMTAwJTtcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1hcmdpbjogMDtcblx0Y29sb3I6IGluaGVyaXQ7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyZWQgPSBjc3NgXG5cdGJvcmRlcjogMXB4IHNvbGlkICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBzZXBhcmF0ZWQgPSBjc3NgXG5cdD4gKjpub3QoIG1hcnF1ZWUgKSA+ICoge1xuXHRcdGJvcmRlci1ib3R0b206IDFweCBzb2xpZCAkeyBDT05GSUcuc3VyZmFjZUJvcmRlckNvbG9yIH07XG5cdH1cblxuXHQ+ICo6bGFzdC1vZi10eXBlID4gKiB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1jb2xvcjogdHJhbnNwYXJlbnQ7XG5cdH1cbmA7XG5cbmNvbnN0IGJvcmRlclJhZGl1cyA9IENPTkZJRy5yYWRpdXNTbWFsbDtcblxuZXhwb3J0IGNvbnN0IHNwYWNlZEFyb3VuZCA9IGNzc2Bcblx0Ym9yZGVyLXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5gO1xuXG5leHBvcnQgY29uc3Qgcm91bmRlZCA9IGNzc2Bcblx0Ym9yZGVyLXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5cblx0PiAqOmZpcnN0LW9mLXR5cGUgPiAqIHtcblx0XHRib3JkZXItdG9wLWxlZnQtcmFkaXVzOiAkeyBib3JkZXJSYWRpdXMgfTtcblx0XHRib3JkZXItdG9wLXJpZ2h0LXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5cdH1cblxuXHQ+ICo6bGFzdC1vZi10eXBlID4gKiB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1sZWZ0LXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5cdFx0Ym9yZGVyLWJvdHRvbS1yaWdodC1yYWRpdXM6ICR7IGJvcmRlclJhZGl1cyB9O1xuXHR9XG5gO1xuXG5jb25zdCBiYXNlRm9udEhlaWdodCA9IGBjYWxjKCR7IENPTkZJRy5mb250U2l6ZSB9ICogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9KWA7XG5cbi8qXG4gKiBNYXRoOlxuICogLSBVc2UgdGhlIGRlc2lyZWQgaGVpZ2h0IGFzIHRoZSBiYXNlIHZhbHVlXG4gKiAtIFN1YnRyYWN0IHRoZSBjb21wdXRlZCBoZWlnaHQgb2YgKGRlZmF1bHQpIHRleHRcbiAqIC0gU3VidHJhY3QgdGhlIGVmZmVjdHMgb2YgYm9yZGVyXG4gKiAtIERpdmlkZSB0aGUgY2FsY3VsYXRlZCBudW1iZXIgYnkgMiwgaW4gb3JkZXIgdG8gZ2V0IGFuIGluZGl2aWR1YWwgdG9wL2JvdHRvbSBwYWRkaW5nXG4gKi9cbmNvbnN0IHBhZGRpbmdZID0gYGNhbGMoKCR7IENPTkZJRy5jb250cm9sSGVpZ2h0IH0gLSAkeyBiYXNlRm9udEhlaWdodCB9IC0gMnB4KSAvIDIpYDtcbmNvbnN0IHBhZGRpbmdZU21hbGwgPSBgY2FsYygoJHsgQ09ORklHLmNvbnRyb2xIZWlnaHRTbWFsbCB9IC0gJHsgYmFzZUZvbnRIZWlnaHQgfSAtIDJweCkgLyAyKWA7XG5jb25zdCBwYWRkaW5nWUxhcmdlID0gYGNhbGMoKCR7IENPTkZJRy5jb250cm9sSGVpZ2h0TGFyZ2UgfSAtICR7IGJhc2VGb250SGVpZ2h0IH0gLSAycHgpIC8gMilgO1xuXG5leHBvcnQgY29uc3QgaXRlbVNpemVzID0ge1xuXHRzbWFsbDogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHBhZGRpbmdZU21hbGwgfSAkeyBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwgfXB4O1xuXHRgLFxuXHRtZWRpdW06IGNzc2Bcblx0XHRwYWRkaW5nOiAkeyBwYWRkaW5nWSB9ICR7IENPTkZJRy5jb250cm9sUGFkZGluZ1ggfXB4O1xuXHRgLFxuXHRsYXJnZTogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHBhZGRpbmdZTGFyZ2UgfSAkeyBDT05GSUcuY29udHJvbFBhZGRpbmdYTGFyZ2UgfXB4O1xuXHRgLFxufTtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__22
  };
  var item = false ? {
    name: "150ruhm",
    styles: "box-sizing:border-box;width:100%;display:block;margin:0;color:inherit"
  } : {
    name: "1izz8ne-item",
    styles: "box-sizing:border-box;width:100%;display:block;margin:0;color:inherit;label:item;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrRHVCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09ORklHLCBDT0xPUlMsIGZvbnQgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCB1bnN0eWxlZEJ1dHRvbiA9ICggYXM6ICdhJyB8ICdidXR0b24nICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0XHRmb250LWZhbWlseTogaW5oZXJpdDtcblx0XHRhcHBlYXJhbmNlOiBub25lO1xuXHRcdGJvcmRlcjogMXB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdGN1cnNvcjogcG9pbnRlcjtcblx0XHRiYWNrZ3JvdW5kOiBub25lO1xuXHRcdHRleHQtYWxpZ246IHN0YXJ0O1xuXHRcdHRleHQtZGVjb3JhdGlvbjogJHsgYXMgPT09ICdhJyA/ICdub25lJyA6IHVuZGVmaW5lZCB9O1xuXG5cdFx0c3ZnLFxuXHRcdHBhdGgge1xuXHRcdFx0ZmlsbDogY3VycmVudENvbG9yO1xuXHRcdH1cblxuXHRcdCY6aG92ZXIge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHR9XG5cblx0XHQmOmZvY3VzIHtcblx0XHRcdGJveC1zaGFkb3c6IG5vbmU7XG5cdFx0XHRvdXRsaW5lOiBub25lO1xuXHRcdH1cblxuXHRcdCY6Zm9jdXMtdmlzaWJsZSB7XG5cdFx0XHRib3gtc2hhZG93OiAwIDAgMCB2YXIoIC0td3AtYWRtaW4tYm9yZGVyLXdpZHRoLWZvY3VzIClcblx0XHRcdFx0JHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdFx0Ly8gV2luZG93cyBoaWdoIGNvbnRyYXN0IG1vZGUuXG5cdFx0XHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0XHRvdXRsaW5lLW9mZnNldDogMDtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgaXRlbVdyYXBwZXIgPSBjc3NgXG5cdHdpZHRoOiAxMDAlO1xuXHRkaXNwbGF5OiBibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBpdGVtID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHR3aWR0aDogMTAwJTtcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1hcmdpbjogMDtcblx0Y29sb3I6IGluaGVyaXQ7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyZWQgPSBjc3NgXG5cdGJvcmRlcjogMXB4IHNvbGlkICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBzZXBhcmF0ZWQgPSBjc3NgXG5cdD4gKjpub3QoIG1hcnF1ZWUgKSA+ICoge1xuXHRcdGJvcmRlci1ib3R0b206IDFweCBzb2xpZCAkeyBDT05GSUcuc3VyZmFjZUJvcmRlckNvbG9yIH07XG5cdH1cblxuXHQ+ICo6bGFzdC1vZi10eXBlID4gKiB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1jb2xvcjogdHJhbnNwYXJlbnQ7XG5cdH1cbmA7XG5cbmNvbnN0IGJvcmRlclJhZGl1cyA9IENPTkZJRy5yYWRpdXNTbWFsbDtcblxuZXhwb3J0IGNvbnN0IHNwYWNlZEFyb3VuZCA9IGNzc2Bcblx0Ym9yZGVyLXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5gO1xuXG5leHBvcnQgY29uc3Qgcm91bmRlZCA9IGNzc2Bcblx0Ym9yZGVyLXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5cblx0PiAqOmZpcnN0LW9mLXR5cGUgPiAqIHtcblx0XHRib3JkZXItdG9wLWxlZnQtcmFkaXVzOiAkeyBib3JkZXJSYWRpdXMgfTtcblx0XHRib3JkZXItdG9wLXJpZ2h0LXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5cdH1cblxuXHQ+ICo6bGFzdC1vZi10eXBlID4gKiB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1sZWZ0LXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5cdFx0Ym9yZGVyLWJvdHRvbS1yaWdodC1yYWRpdXM6ICR7IGJvcmRlclJhZGl1cyB9O1xuXHR9XG5gO1xuXG5jb25zdCBiYXNlRm9udEhlaWdodCA9IGBjYWxjKCR7IENPTkZJRy5mb250U2l6ZSB9ICogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9KWA7XG5cbi8qXG4gKiBNYXRoOlxuICogLSBVc2UgdGhlIGRlc2lyZWQgaGVpZ2h0IGFzIHRoZSBiYXNlIHZhbHVlXG4gKiAtIFN1YnRyYWN0IHRoZSBjb21wdXRlZCBoZWlnaHQgb2YgKGRlZmF1bHQpIHRleHRcbiAqIC0gU3VidHJhY3QgdGhlIGVmZmVjdHMgb2YgYm9yZGVyXG4gKiAtIERpdmlkZSB0aGUgY2FsY3VsYXRlZCBudW1iZXIgYnkgMiwgaW4gb3JkZXIgdG8gZ2V0IGFuIGluZGl2aWR1YWwgdG9wL2JvdHRvbSBwYWRkaW5nXG4gKi9cbmNvbnN0IHBhZGRpbmdZID0gYGNhbGMoKCR7IENPTkZJRy5jb250cm9sSGVpZ2h0IH0gLSAkeyBiYXNlRm9udEhlaWdodCB9IC0gMnB4KSAvIDIpYDtcbmNvbnN0IHBhZGRpbmdZU21hbGwgPSBgY2FsYygoJHsgQ09ORklHLmNvbnRyb2xIZWlnaHRTbWFsbCB9IC0gJHsgYmFzZUZvbnRIZWlnaHQgfSAtIDJweCkgLyAyKWA7XG5jb25zdCBwYWRkaW5nWUxhcmdlID0gYGNhbGMoKCR7IENPTkZJRy5jb250cm9sSGVpZ2h0TGFyZ2UgfSAtICR7IGJhc2VGb250SGVpZ2h0IH0gLSAycHgpIC8gMilgO1xuXG5leHBvcnQgY29uc3QgaXRlbVNpemVzID0ge1xuXHRzbWFsbDogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHBhZGRpbmdZU21hbGwgfSAkeyBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwgfXB4O1xuXHRgLFxuXHRtZWRpdW06IGNzc2Bcblx0XHRwYWRkaW5nOiAkeyBwYWRkaW5nWSB9ICR7IENPTkZJRy5jb250cm9sUGFkZGluZ1ggfXB4O1xuXHRgLFxuXHRsYXJnZTogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHBhZGRpbmdZTGFyZ2UgfSAkeyBDT05GSUcuY29udHJvbFBhZGRpbmdYTGFyZ2UgfXB4O1xuXHRgLFxufTtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__22
  };
  var bordered = /* @__PURE__ */ css("border:1px solid ", config_values_default.surfaceBorderColor, ";" + (false ? "" : ";label:bordered;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEwRDJCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09ORklHLCBDT0xPUlMsIGZvbnQgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCB1bnN0eWxlZEJ1dHRvbiA9ICggYXM6ICdhJyB8ICdidXR0b24nICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0XHRmb250LWZhbWlseTogaW5oZXJpdDtcblx0XHRhcHBlYXJhbmNlOiBub25lO1xuXHRcdGJvcmRlcjogMXB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdGN1cnNvcjogcG9pbnRlcjtcblx0XHRiYWNrZ3JvdW5kOiBub25lO1xuXHRcdHRleHQtYWxpZ246IHN0YXJ0O1xuXHRcdHRleHQtZGVjb3JhdGlvbjogJHsgYXMgPT09ICdhJyA/ICdub25lJyA6IHVuZGVmaW5lZCB9O1xuXG5cdFx0c3ZnLFxuXHRcdHBhdGgge1xuXHRcdFx0ZmlsbDogY3VycmVudENvbG9yO1xuXHRcdH1cblxuXHRcdCY6aG92ZXIge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHR9XG5cblx0XHQmOmZvY3VzIHtcblx0XHRcdGJveC1zaGFkb3c6IG5vbmU7XG5cdFx0XHRvdXRsaW5lOiBub25lO1xuXHRcdH1cblxuXHRcdCY6Zm9jdXMtdmlzaWJsZSB7XG5cdFx0XHRib3gtc2hhZG93OiAwIDAgMCB2YXIoIC0td3AtYWRtaW4tYm9yZGVyLXdpZHRoLWZvY3VzIClcblx0XHRcdFx0JHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdFx0Ly8gV2luZG93cyBoaWdoIGNvbnRyYXN0IG1vZGUuXG5cdFx0XHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0XHRvdXRsaW5lLW9mZnNldDogMDtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgaXRlbVdyYXBwZXIgPSBjc3NgXG5cdHdpZHRoOiAxMDAlO1xuXHRkaXNwbGF5OiBibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBpdGVtID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHR3aWR0aDogMTAwJTtcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1hcmdpbjogMDtcblx0Y29sb3I6IGluaGVyaXQ7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyZWQgPSBjc3NgXG5cdGJvcmRlcjogMXB4IHNvbGlkICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBzZXBhcmF0ZWQgPSBjc3NgXG5cdD4gKjpub3QoIG1hcnF1ZWUgKSA+ICoge1xuXHRcdGJvcmRlci1ib3R0b206IDFweCBzb2xpZCAkeyBDT05GSUcuc3VyZmFjZUJvcmRlckNvbG9yIH07XG5cdH1cblxuXHQ+ICo6bGFzdC1vZi10eXBlID4gKiB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1jb2xvcjogdHJhbnNwYXJlbnQ7XG5cdH1cbmA7XG5cbmNvbnN0IGJvcmRlclJhZGl1cyA9IENPTkZJRy5yYWRpdXNTbWFsbDtcblxuZXhwb3J0IGNvbnN0IHNwYWNlZEFyb3VuZCA9IGNzc2Bcblx0Ym9yZGVyLXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5gO1xuXG5leHBvcnQgY29uc3Qgcm91bmRlZCA9IGNzc2Bcblx0Ym9yZGVyLXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5cblx0PiAqOmZpcnN0LW9mLXR5cGUgPiAqIHtcblx0XHRib3JkZXItdG9wLWxlZnQtcmFkaXVzOiAkeyBib3JkZXJSYWRpdXMgfTtcblx0XHRib3JkZXItdG9wLXJpZ2h0LXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5cdH1cblxuXHQ+ICo6bGFzdC1vZi10eXBlID4gKiB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1sZWZ0LXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5cdFx0Ym9yZGVyLWJvdHRvbS1yaWdodC1yYWRpdXM6ICR7IGJvcmRlclJhZGl1cyB9O1xuXHR9XG5gO1xuXG5jb25zdCBiYXNlRm9udEhlaWdodCA9IGBjYWxjKCR7IENPTkZJRy5mb250U2l6ZSB9ICogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9KWA7XG5cbi8qXG4gKiBNYXRoOlxuICogLSBVc2UgdGhlIGRlc2lyZWQgaGVpZ2h0IGFzIHRoZSBiYXNlIHZhbHVlXG4gKiAtIFN1YnRyYWN0IHRoZSBjb21wdXRlZCBoZWlnaHQgb2YgKGRlZmF1bHQpIHRleHRcbiAqIC0gU3VidHJhY3QgdGhlIGVmZmVjdHMgb2YgYm9yZGVyXG4gKiAtIERpdmlkZSB0aGUgY2FsY3VsYXRlZCBudW1iZXIgYnkgMiwgaW4gb3JkZXIgdG8gZ2V0IGFuIGluZGl2aWR1YWwgdG9wL2JvdHRvbSBwYWRkaW5nXG4gKi9cbmNvbnN0IHBhZGRpbmdZID0gYGNhbGMoKCR7IENPTkZJRy5jb250cm9sSGVpZ2h0IH0gLSAkeyBiYXNlRm9udEhlaWdodCB9IC0gMnB4KSAvIDIpYDtcbmNvbnN0IHBhZGRpbmdZU21hbGwgPSBgY2FsYygoJHsgQ09ORklHLmNvbnRyb2xIZWlnaHRTbWFsbCB9IC0gJHsgYmFzZUZvbnRIZWlnaHQgfSAtIDJweCkgLyAyKWA7XG5jb25zdCBwYWRkaW5nWUxhcmdlID0gYGNhbGMoKCR7IENPTkZJRy5jb250cm9sSGVpZ2h0TGFyZ2UgfSAtICR7IGJhc2VGb250SGVpZ2h0IH0gLSAycHgpIC8gMilgO1xuXG5leHBvcnQgY29uc3QgaXRlbVNpemVzID0ge1xuXHRzbWFsbDogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHBhZGRpbmdZU21hbGwgfSAkeyBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwgfXB4O1xuXHRgLFxuXHRtZWRpdW06IGNzc2Bcblx0XHRwYWRkaW5nOiAkeyBwYWRkaW5nWSB9ICR7IENPTkZJRy5jb250cm9sUGFkZGluZ1ggfXB4O1xuXHRgLFxuXHRsYXJnZTogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHBhZGRpbmdZTGFyZ2UgfSAkeyBDT05GSUcuY29udHJvbFBhZGRpbmdYTGFyZ2UgfXB4O1xuXHRgLFxufTtcbiJdfQ== */");
  var separated = /* @__PURE__ */ css(">*:not( marquee )>*{border-bottom:1px solid ", config_values_default.surfaceBorderColor, ";}>*:last-of-type>*{border-bottom-color:transparent;}" + (false ? "" : ";label:separated;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE4RDRCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09ORklHLCBDT0xPUlMsIGZvbnQgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCB1bnN0eWxlZEJ1dHRvbiA9ICggYXM6ICdhJyB8ICdidXR0b24nICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0XHRmb250LWZhbWlseTogaW5oZXJpdDtcblx0XHRhcHBlYXJhbmNlOiBub25lO1xuXHRcdGJvcmRlcjogMXB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdGN1cnNvcjogcG9pbnRlcjtcblx0XHRiYWNrZ3JvdW5kOiBub25lO1xuXHRcdHRleHQtYWxpZ246IHN0YXJ0O1xuXHRcdHRleHQtZGVjb3JhdGlvbjogJHsgYXMgPT09ICdhJyA/ICdub25lJyA6IHVuZGVmaW5lZCB9O1xuXG5cdFx0c3ZnLFxuXHRcdHBhdGgge1xuXHRcdFx0ZmlsbDogY3VycmVudENvbG9yO1xuXHRcdH1cblxuXHRcdCY6aG92ZXIge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHR9XG5cblx0XHQmOmZvY3VzIHtcblx0XHRcdGJveC1zaGFkb3c6IG5vbmU7XG5cdFx0XHRvdXRsaW5lOiBub25lO1xuXHRcdH1cblxuXHRcdCY6Zm9jdXMtdmlzaWJsZSB7XG5cdFx0XHRib3gtc2hhZG93OiAwIDAgMCB2YXIoIC0td3AtYWRtaW4tYm9yZGVyLXdpZHRoLWZvY3VzIClcblx0XHRcdFx0JHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdFx0Ly8gV2luZG93cyBoaWdoIGNvbnRyYXN0IG1vZGUuXG5cdFx0XHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0XHRvdXRsaW5lLW9mZnNldDogMDtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgaXRlbVdyYXBwZXIgPSBjc3NgXG5cdHdpZHRoOiAxMDAlO1xuXHRkaXNwbGF5OiBibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBpdGVtID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHR3aWR0aDogMTAwJTtcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1hcmdpbjogMDtcblx0Y29sb3I6IGluaGVyaXQ7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyZWQgPSBjc3NgXG5cdGJvcmRlcjogMXB4IHNvbGlkICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBzZXBhcmF0ZWQgPSBjc3NgXG5cdD4gKjpub3QoIG1hcnF1ZWUgKSA+ICoge1xuXHRcdGJvcmRlci1ib3R0b206IDFweCBzb2xpZCAkeyBDT05GSUcuc3VyZmFjZUJvcmRlckNvbG9yIH07XG5cdH1cblxuXHQ+ICo6bGFzdC1vZi10eXBlID4gKiB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1jb2xvcjogdHJhbnNwYXJlbnQ7XG5cdH1cbmA7XG5cbmNvbnN0IGJvcmRlclJhZGl1cyA9IENPTkZJRy5yYWRpdXNTbWFsbDtcblxuZXhwb3J0IGNvbnN0IHNwYWNlZEFyb3VuZCA9IGNzc2Bcblx0Ym9yZGVyLXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5gO1xuXG5leHBvcnQgY29uc3Qgcm91bmRlZCA9IGNzc2Bcblx0Ym9yZGVyLXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5cblx0PiAqOmZpcnN0LW9mLXR5cGUgPiAqIHtcblx0XHRib3JkZXItdG9wLWxlZnQtcmFkaXVzOiAkeyBib3JkZXJSYWRpdXMgfTtcblx0XHRib3JkZXItdG9wLXJpZ2h0LXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5cdH1cblxuXHQ+ICo6bGFzdC1vZi10eXBlID4gKiB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1sZWZ0LXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5cdFx0Ym9yZGVyLWJvdHRvbS1yaWdodC1yYWRpdXM6ICR7IGJvcmRlclJhZGl1cyB9O1xuXHR9XG5gO1xuXG5jb25zdCBiYXNlRm9udEhlaWdodCA9IGBjYWxjKCR7IENPTkZJRy5mb250U2l6ZSB9ICogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9KWA7XG5cbi8qXG4gKiBNYXRoOlxuICogLSBVc2UgdGhlIGRlc2lyZWQgaGVpZ2h0IGFzIHRoZSBiYXNlIHZhbHVlXG4gKiAtIFN1YnRyYWN0IHRoZSBjb21wdXRlZCBoZWlnaHQgb2YgKGRlZmF1bHQpIHRleHRcbiAqIC0gU3VidHJhY3QgdGhlIGVmZmVjdHMgb2YgYm9yZGVyXG4gKiAtIERpdmlkZSB0aGUgY2FsY3VsYXRlZCBudW1iZXIgYnkgMiwgaW4gb3JkZXIgdG8gZ2V0IGFuIGluZGl2aWR1YWwgdG9wL2JvdHRvbSBwYWRkaW5nXG4gKi9cbmNvbnN0IHBhZGRpbmdZID0gYGNhbGMoKCR7IENPTkZJRy5jb250cm9sSGVpZ2h0IH0gLSAkeyBiYXNlRm9udEhlaWdodCB9IC0gMnB4KSAvIDIpYDtcbmNvbnN0IHBhZGRpbmdZU21hbGwgPSBgY2FsYygoJHsgQ09ORklHLmNvbnRyb2xIZWlnaHRTbWFsbCB9IC0gJHsgYmFzZUZvbnRIZWlnaHQgfSAtIDJweCkgLyAyKWA7XG5jb25zdCBwYWRkaW5nWUxhcmdlID0gYGNhbGMoKCR7IENPTkZJRy5jb250cm9sSGVpZ2h0TGFyZ2UgfSAtICR7IGJhc2VGb250SGVpZ2h0IH0gLSAycHgpIC8gMilgO1xuXG5leHBvcnQgY29uc3QgaXRlbVNpemVzID0ge1xuXHRzbWFsbDogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHBhZGRpbmdZU21hbGwgfSAkeyBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwgfXB4O1xuXHRgLFxuXHRtZWRpdW06IGNzc2Bcblx0XHRwYWRkaW5nOiAkeyBwYWRkaW5nWSB9ICR7IENPTkZJRy5jb250cm9sUGFkZGluZ1ggfXB4O1xuXHRgLFxuXHRsYXJnZTogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHBhZGRpbmdZTGFyZ2UgfSAkeyBDT05GSUcuY29udHJvbFBhZGRpbmdYTGFyZ2UgfXB4O1xuXHRgLFxufTtcbiJdfQ== */");
  var borderRadius2 = config_values_default.radiusSmall;
  var spacedAround = /* @__PURE__ */ css("border-radius:", borderRadius2, ";" + (false ? "" : ";label:spacedAround;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEwRStCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09ORklHLCBDT0xPUlMsIGZvbnQgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCB1bnN0eWxlZEJ1dHRvbiA9ICggYXM6ICdhJyB8ICdidXR0b24nICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0XHRmb250LWZhbWlseTogaW5oZXJpdDtcblx0XHRhcHBlYXJhbmNlOiBub25lO1xuXHRcdGJvcmRlcjogMXB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdGN1cnNvcjogcG9pbnRlcjtcblx0XHRiYWNrZ3JvdW5kOiBub25lO1xuXHRcdHRleHQtYWxpZ246IHN0YXJ0O1xuXHRcdHRleHQtZGVjb3JhdGlvbjogJHsgYXMgPT09ICdhJyA/ICdub25lJyA6IHVuZGVmaW5lZCB9O1xuXG5cdFx0c3ZnLFxuXHRcdHBhdGgge1xuXHRcdFx0ZmlsbDogY3VycmVudENvbG9yO1xuXHRcdH1cblxuXHRcdCY6aG92ZXIge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHR9XG5cblx0XHQmOmZvY3VzIHtcblx0XHRcdGJveC1zaGFkb3c6IG5vbmU7XG5cdFx0XHRvdXRsaW5lOiBub25lO1xuXHRcdH1cblxuXHRcdCY6Zm9jdXMtdmlzaWJsZSB7XG5cdFx0XHRib3gtc2hhZG93OiAwIDAgMCB2YXIoIC0td3AtYWRtaW4tYm9yZGVyLXdpZHRoLWZvY3VzIClcblx0XHRcdFx0JHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdFx0Ly8gV2luZG93cyBoaWdoIGNvbnRyYXN0IG1vZGUuXG5cdFx0XHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0XHRvdXRsaW5lLW9mZnNldDogMDtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgaXRlbVdyYXBwZXIgPSBjc3NgXG5cdHdpZHRoOiAxMDAlO1xuXHRkaXNwbGF5OiBibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBpdGVtID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHR3aWR0aDogMTAwJTtcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1hcmdpbjogMDtcblx0Y29sb3I6IGluaGVyaXQ7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyZWQgPSBjc3NgXG5cdGJvcmRlcjogMXB4IHNvbGlkICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBzZXBhcmF0ZWQgPSBjc3NgXG5cdD4gKjpub3QoIG1hcnF1ZWUgKSA+ICoge1xuXHRcdGJvcmRlci1ib3R0b206IDFweCBzb2xpZCAkeyBDT05GSUcuc3VyZmFjZUJvcmRlckNvbG9yIH07XG5cdH1cblxuXHQ+ICo6bGFzdC1vZi10eXBlID4gKiB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1jb2xvcjogdHJhbnNwYXJlbnQ7XG5cdH1cbmA7XG5cbmNvbnN0IGJvcmRlclJhZGl1cyA9IENPTkZJRy5yYWRpdXNTbWFsbDtcblxuZXhwb3J0IGNvbnN0IHNwYWNlZEFyb3VuZCA9IGNzc2Bcblx0Ym9yZGVyLXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5gO1xuXG5leHBvcnQgY29uc3Qgcm91bmRlZCA9IGNzc2Bcblx0Ym9yZGVyLXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5cblx0PiAqOmZpcnN0LW9mLXR5cGUgPiAqIHtcblx0XHRib3JkZXItdG9wLWxlZnQtcmFkaXVzOiAkeyBib3JkZXJSYWRpdXMgfTtcblx0XHRib3JkZXItdG9wLXJpZ2h0LXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5cdH1cblxuXHQ+ICo6bGFzdC1vZi10eXBlID4gKiB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1sZWZ0LXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5cdFx0Ym9yZGVyLWJvdHRvbS1yaWdodC1yYWRpdXM6ICR7IGJvcmRlclJhZGl1cyB9O1xuXHR9XG5gO1xuXG5jb25zdCBiYXNlRm9udEhlaWdodCA9IGBjYWxjKCR7IENPTkZJRy5mb250U2l6ZSB9ICogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9KWA7XG5cbi8qXG4gKiBNYXRoOlxuICogLSBVc2UgdGhlIGRlc2lyZWQgaGVpZ2h0IGFzIHRoZSBiYXNlIHZhbHVlXG4gKiAtIFN1YnRyYWN0IHRoZSBjb21wdXRlZCBoZWlnaHQgb2YgKGRlZmF1bHQpIHRleHRcbiAqIC0gU3VidHJhY3QgdGhlIGVmZmVjdHMgb2YgYm9yZGVyXG4gKiAtIERpdmlkZSB0aGUgY2FsY3VsYXRlZCBudW1iZXIgYnkgMiwgaW4gb3JkZXIgdG8gZ2V0IGFuIGluZGl2aWR1YWwgdG9wL2JvdHRvbSBwYWRkaW5nXG4gKi9cbmNvbnN0IHBhZGRpbmdZID0gYGNhbGMoKCR7IENPTkZJRy5jb250cm9sSGVpZ2h0IH0gLSAkeyBiYXNlRm9udEhlaWdodCB9IC0gMnB4KSAvIDIpYDtcbmNvbnN0IHBhZGRpbmdZU21hbGwgPSBgY2FsYygoJHsgQ09ORklHLmNvbnRyb2xIZWlnaHRTbWFsbCB9IC0gJHsgYmFzZUZvbnRIZWlnaHQgfSAtIDJweCkgLyAyKWA7XG5jb25zdCBwYWRkaW5nWUxhcmdlID0gYGNhbGMoKCR7IENPTkZJRy5jb250cm9sSGVpZ2h0TGFyZ2UgfSAtICR7IGJhc2VGb250SGVpZ2h0IH0gLSAycHgpIC8gMilgO1xuXG5leHBvcnQgY29uc3QgaXRlbVNpemVzID0ge1xuXHRzbWFsbDogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHBhZGRpbmdZU21hbGwgfSAkeyBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwgfXB4O1xuXHRgLFxuXHRtZWRpdW06IGNzc2Bcblx0XHRwYWRkaW5nOiAkeyBwYWRkaW5nWSB9ICR7IENPTkZJRy5jb250cm9sUGFkZGluZ1ggfXB4O1xuXHRgLFxuXHRsYXJnZTogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHBhZGRpbmdZTGFyZ2UgfSAkeyBDT05GSUcuY29udHJvbFBhZGRpbmdYTGFyZ2UgfXB4O1xuXHRgLFxufTtcbiJdfQ== */");
  var rounded2 = /* @__PURE__ */ css("border-radius:", borderRadius2, ";>*:first-of-type>*{border-top-left-radius:", borderRadius2, ";border-top-right-radius:", borderRadius2, ";}>*:last-of-type>*{border-bottom-left-radius:", borderRadius2, ";border-bottom-right-radius:", borderRadius2, ";}" + (false ? "" : ";label:rounded;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE4RTBCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09ORklHLCBDT0xPUlMsIGZvbnQgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCB1bnN0eWxlZEJ1dHRvbiA9ICggYXM6ICdhJyB8ICdidXR0b24nICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0XHRmb250LWZhbWlseTogaW5oZXJpdDtcblx0XHRhcHBlYXJhbmNlOiBub25lO1xuXHRcdGJvcmRlcjogMXB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdGN1cnNvcjogcG9pbnRlcjtcblx0XHRiYWNrZ3JvdW5kOiBub25lO1xuXHRcdHRleHQtYWxpZ246IHN0YXJ0O1xuXHRcdHRleHQtZGVjb3JhdGlvbjogJHsgYXMgPT09ICdhJyA/ICdub25lJyA6IHVuZGVmaW5lZCB9O1xuXG5cdFx0c3ZnLFxuXHRcdHBhdGgge1xuXHRcdFx0ZmlsbDogY3VycmVudENvbG9yO1xuXHRcdH1cblxuXHRcdCY6aG92ZXIge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHR9XG5cblx0XHQmOmZvY3VzIHtcblx0XHRcdGJveC1zaGFkb3c6IG5vbmU7XG5cdFx0XHRvdXRsaW5lOiBub25lO1xuXHRcdH1cblxuXHRcdCY6Zm9jdXMtdmlzaWJsZSB7XG5cdFx0XHRib3gtc2hhZG93OiAwIDAgMCB2YXIoIC0td3AtYWRtaW4tYm9yZGVyLXdpZHRoLWZvY3VzIClcblx0XHRcdFx0JHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdFx0Ly8gV2luZG93cyBoaWdoIGNvbnRyYXN0IG1vZGUuXG5cdFx0XHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0XHRvdXRsaW5lLW9mZnNldDogMDtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgaXRlbVdyYXBwZXIgPSBjc3NgXG5cdHdpZHRoOiAxMDAlO1xuXHRkaXNwbGF5OiBibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBpdGVtID0gY3NzYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHR3aWR0aDogMTAwJTtcblx0ZGlzcGxheTogYmxvY2s7XG5cdG1hcmdpbjogMDtcblx0Y29sb3I6IGluaGVyaXQ7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyZWQgPSBjc3NgXG5cdGJvcmRlcjogMXB4IHNvbGlkICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBzZXBhcmF0ZWQgPSBjc3NgXG5cdD4gKjpub3QoIG1hcnF1ZWUgKSA+ICoge1xuXHRcdGJvcmRlci1ib3R0b206IDFweCBzb2xpZCAkeyBDT05GSUcuc3VyZmFjZUJvcmRlckNvbG9yIH07XG5cdH1cblxuXHQ+ICo6bGFzdC1vZi10eXBlID4gKiB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1jb2xvcjogdHJhbnNwYXJlbnQ7XG5cdH1cbmA7XG5cbmNvbnN0IGJvcmRlclJhZGl1cyA9IENPTkZJRy5yYWRpdXNTbWFsbDtcblxuZXhwb3J0IGNvbnN0IHNwYWNlZEFyb3VuZCA9IGNzc2Bcblx0Ym9yZGVyLXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5gO1xuXG5leHBvcnQgY29uc3Qgcm91bmRlZCA9IGNzc2Bcblx0Ym9yZGVyLXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5cblx0PiAqOmZpcnN0LW9mLXR5cGUgPiAqIHtcblx0XHRib3JkZXItdG9wLWxlZnQtcmFkaXVzOiAkeyBib3JkZXJSYWRpdXMgfTtcblx0XHRib3JkZXItdG9wLXJpZ2h0LXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5cdH1cblxuXHQ+ICo6bGFzdC1vZi10eXBlID4gKiB7XG5cdFx0Ym9yZGVyLWJvdHRvbS1sZWZ0LXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5cdFx0Ym9yZGVyLWJvdHRvbS1yaWdodC1yYWRpdXM6ICR7IGJvcmRlclJhZGl1cyB9O1xuXHR9XG5gO1xuXG5jb25zdCBiYXNlRm9udEhlaWdodCA9IGBjYWxjKCR7IENPTkZJRy5mb250U2l6ZSB9ICogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9KWA7XG5cbi8qXG4gKiBNYXRoOlxuICogLSBVc2UgdGhlIGRlc2lyZWQgaGVpZ2h0IGFzIHRoZSBiYXNlIHZhbHVlXG4gKiAtIFN1YnRyYWN0IHRoZSBjb21wdXRlZCBoZWlnaHQgb2YgKGRlZmF1bHQpIHRleHRcbiAqIC0gU3VidHJhY3QgdGhlIGVmZmVjdHMgb2YgYm9yZGVyXG4gKiAtIERpdmlkZSB0aGUgY2FsY3VsYXRlZCBudW1iZXIgYnkgMiwgaW4gb3JkZXIgdG8gZ2V0IGFuIGluZGl2aWR1YWwgdG9wL2JvdHRvbSBwYWRkaW5nXG4gKi9cbmNvbnN0IHBhZGRpbmdZID0gYGNhbGMoKCR7IENPTkZJRy5jb250cm9sSGVpZ2h0IH0gLSAkeyBiYXNlRm9udEhlaWdodCB9IC0gMnB4KSAvIDIpYDtcbmNvbnN0IHBhZGRpbmdZU21hbGwgPSBgY2FsYygoJHsgQ09ORklHLmNvbnRyb2xIZWlnaHRTbWFsbCB9IC0gJHsgYmFzZUZvbnRIZWlnaHQgfSAtIDJweCkgLyAyKWA7XG5jb25zdCBwYWRkaW5nWUxhcmdlID0gYGNhbGMoKCR7IENPTkZJRy5jb250cm9sSGVpZ2h0TGFyZ2UgfSAtICR7IGJhc2VGb250SGVpZ2h0IH0gLSAycHgpIC8gMilgO1xuXG5leHBvcnQgY29uc3QgaXRlbVNpemVzID0ge1xuXHRzbWFsbDogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHBhZGRpbmdZU21hbGwgfSAkeyBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwgfXB4O1xuXHRgLFxuXHRtZWRpdW06IGNzc2Bcblx0XHRwYWRkaW5nOiAkeyBwYWRkaW5nWSB9ICR7IENPTkZJRy5jb250cm9sUGFkZGluZ1ggfXB4O1xuXHRgLFxuXHRsYXJnZTogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHBhZGRpbmdZTGFyZ2UgfSAkeyBDT05GSUcuY29udHJvbFBhZGRpbmdYTGFyZ2UgfXB4O1xuXHRgLFxufTtcbiJdfQ== */");
  var baseFontHeight = `calc(${config_values_default.fontSize} * ${config_values_default.fontLineHeightBase})`;
  var paddingY = `calc((${config_values_default.controlHeight} - ${baseFontHeight} - 2px) / 2)`;
  var paddingYSmall = `calc((${config_values_default.controlHeightSmall} - ${baseFontHeight} - 2px) / 2)`;
  var paddingYLarge = `calc((${config_values_default.controlHeightLarge} - ${baseFontHeight} - 2px) / 2)`;
  var itemSizes = {
    small: /* @__PURE__ */ css("padding:", paddingYSmall, " ", config_values_default.controlPaddingXSmall, "px;" + (false ? "" : ";label:small;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEwR1ciLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT05GSUcsIENPTE9SUywgZm9udCB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGNvbnN0IHVuc3R5bGVkQnV0dG9uID0gKCBhczogJ2EnIHwgJ2J1dHRvbicgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0Zm9udC1zaXplOiAkeyBmb250KCAnZGVmYXVsdC5mb250U2l6ZScgKSB9O1xuXHRcdGZvbnQtZmFtaWx5OiBpbmhlcml0O1xuXHRcdGFwcGVhcmFuY2U6IG5vbmU7XG5cdFx0Ym9yZGVyOiAxcHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0Y3Vyc29yOiBwb2ludGVyO1xuXHRcdGJhY2tncm91bmQ6IG5vbmU7XG5cdFx0dGV4dC1hbGlnbjogc3RhcnQ7XG5cdFx0dGV4dC1kZWNvcmF0aW9uOiAkeyBhcyA9PT0gJ2EnID8gJ25vbmUnIDogdW5kZWZpbmVkIH07XG5cblx0XHRzdmcsXG5cdFx0cGF0aCB7XG5cdFx0XHRmaWxsOiBjdXJyZW50Q29sb3I7XG5cdFx0fVxuXG5cdFx0Jjpob3ZlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdH1cblxuXHRcdCY6Zm9jdXMge1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHRcdG91dGxpbmU6IG5vbmU7XG5cdFx0fVxuXG5cdFx0Jjpmb2N1cy12aXNpYmxlIHtcblx0XHRcdGJveC1zaGFkb3c6IDAgMCAwIHZhciggLS13cC1hZG1pbi1ib3JkZXItd2lkdGgtZm9jdXMgKVxuXHRcdFx0XHQkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHQvLyBXaW5kb3dzIGhpZ2ggY29udHJhc3QgbW9kZS5cblx0XHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRcdG91dGxpbmUtb2Zmc2V0OiAwO1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBpdGVtV3JhcHBlciA9IGNzc2Bcblx0d2lkdGg6IDEwMCU7XG5cdGRpc3BsYXk6IGJsb2NrO1xuYDtcblxuZXhwb3J0IGNvbnN0IGl0ZW0gPSBjc3NgXG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdHdpZHRoOiAxMDAlO1xuXHRkaXNwbGF5OiBibG9jaztcblx0bWFyZ2luOiAwO1xuXHRjb2xvcjogaW5oZXJpdDtcbmA7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJlZCA9IGNzc2Bcblx0Ym9yZGVyOiAxcHggc29saWQgJHsgQ09ORklHLnN1cmZhY2VCb3JkZXJDb2xvciB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IHNlcGFyYXRlZCA9IGNzc2Bcblx0PiAqOm5vdCggbWFycXVlZSApID4gKiB7XG5cdFx0Ym9yZGVyLWJvdHRvbTogMXB4IHNvbGlkICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfTtcblx0fVxuXG5cdD4gKjpsYXN0LW9mLXR5cGUgPiAqIHtcblx0XHRib3JkZXItYm90dG9tLWNvbG9yOiB0cmFuc3BhcmVudDtcblx0fVxuYDtcblxuY29uc3QgYm9yZGVyUmFkaXVzID0gQ09ORklHLnJhZGl1c1NtYWxsO1xuXG5leHBvcnQgY29uc3Qgc3BhY2VkQXJvdW5kID0gY3NzYFxuXHRib3JkZXItcmFkaXVzOiAkeyBib3JkZXJSYWRpdXMgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCByb3VuZGVkID0gY3NzYFxuXHRib3JkZXItcmFkaXVzOiAkeyBib3JkZXJSYWRpdXMgfTtcblxuXHQ+ICo6Zmlyc3Qtb2YtdHlwZSA+ICoge1xuXHRcdGJvcmRlci10b3AtbGVmdC1yYWRpdXM6ICR7IGJvcmRlclJhZGl1cyB9O1xuXHRcdGJvcmRlci10b3AtcmlnaHQtcmFkaXVzOiAkeyBib3JkZXJSYWRpdXMgfTtcblx0fVxuXG5cdD4gKjpsYXN0LW9mLXR5cGUgPiAqIHtcblx0XHRib3JkZXItYm90dG9tLWxlZnQtcmFkaXVzOiAkeyBib3JkZXJSYWRpdXMgfTtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5cdH1cbmA7XG5cbmNvbnN0IGJhc2VGb250SGVpZ2h0ID0gYGNhbGMoJHsgQ09ORklHLmZvbnRTaXplIH0gKiAkeyBDT05GSUcuZm9udExpbmVIZWlnaHRCYXNlIH0pYDtcblxuLypcbiAqIE1hdGg6XG4gKiAtIFVzZSB0aGUgZGVzaXJlZCBoZWlnaHQgYXMgdGhlIGJhc2UgdmFsdWVcbiAqIC0gU3VidHJhY3QgdGhlIGNvbXB1dGVkIGhlaWdodCBvZiAoZGVmYXVsdCkgdGV4dFxuICogLSBTdWJ0cmFjdCB0aGUgZWZmZWN0cyBvZiBib3JkZXJcbiAqIC0gRGl2aWRlIHRoZSBjYWxjdWxhdGVkIG51bWJlciBieSAyLCBpbiBvcmRlciB0byBnZXQgYW4gaW5kaXZpZHVhbCB0b3AvYm90dG9tIHBhZGRpbmdcbiAqL1xuY29uc3QgcGFkZGluZ1kgPSBgY2FsYygoJHsgQ09ORklHLmNvbnRyb2xIZWlnaHQgfSAtICR7IGJhc2VGb250SGVpZ2h0IH0gLSAycHgpIC8gMilgO1xuY29uc3QgcGFkZGluZ1lTbWFsbCA9IGBjYWxjKCgkeyBDT05GSUcuY29udHJvbEhlaWdodFNtYWxsIH0gLSAkeyBiYXNlRm9udEhlaWdodCB9IC0gMnB4KSAvIDIpYDtcbmNvbnN0IHBhZGRpbmdZTGFyZ2UgPSBgY2FsYygoJHsgQ09ORklHLmNvbnRyb2xIZWlnaHRMYXJnZSB9IC0gJHsgYmFzZUZvbnRIZWlnaHQgfSAtIDJweCkgLyAyKWA7XG5cbmV4cG9ydCBjb25zdCBpdGVtU2l6ZXMgPSB7XG5cdHNtYWxsOiBjc3NgXG5cdFx0cGFkZGluZzogJHsgcGFkZGluZ1lTbWFsbCB9ICR7IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCB9cHg7XG5cdGAsXG5cdG1lZGl1bTogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHBhZGRpbmdZIH0gJHsgQ09ORklHLmNvbnRyb2xQYWRkaW5nWCB9cHg7XG5cdGAsXG5cdGxhcmdlOiBjc3NgXG5cdFx0cGFkZGluZzogJHsgcGFkZGluZ1lMYXJnZSB9ICR7IENPTkZJRy5jb250cm9sUGFkZGluZ1hMYXJnZSB9cHg7XG5cdGAsXG59O1xuIl19 */"),
    medium: /* @__PURE__ */ css("padding:", paddingY, " ", config_values_default.controlPaddingX, "px;" + (false ? "" : ";label:medium;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE2R1kiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT05GSUcsIENPTE9SUywgZm9udCB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGNvbnN0IHVuc3R5bGVkQnV0dG9uID0gKCBhczogJ2EnIHwgJ2J1dHRvbicgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0Zm9udC1zaXplOiAkeyBmb250KCAnZGVmYXVsdC5mb250U2l6ZScgKSB9O1xuXHRcdGZvbnQtZmFtaWx5OiBpbmhlcml0O1xuXHRcdGFwcGVhcmFuY2U6IG5vbmU7XG5cdFx0Ym9yZGVyOiAxcHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0Y3Vyc29yOiBwb2ludGVyO1xuXHRcdGJhY2tncm91bmQ6IG5vbmU7XG5cdFx0dGV4dC1hbGlnbjogc3RhcnQ7XG5cdFx0dGV4dC1kZWNvcmF0aW9uOiAkeyBhcyA9PT0gJ2EnID8gJ25vbmUnIDogdW5kZWZpbmVkIH07XG5cblx0XHRzdmcsXG5cdFx0cGF0aCB7XG5cdFx0XHRmaWxsOiBjdXJyZW50Q29sb3I7XG5cdFx0fVxuXG5cdFx0Jjpob3ZlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdH1cblxuXHRcdCY6Zm9jdXMge1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHRcdG91dGxpbmU6IG5vbmU7XG5cdFx0fVxuXG5cdFx0Jjpmb2N1cy12aXNpYmxlIHtcblx0XHRcdGJveC1zaGFkb3c6IDAgMCAwIHZhciggLS13cC1hZG1pbi1ib3JkZXItd2lkdGgtZm9jdXMgKVxuXHRcdFx0XHQkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHQvLyBXaW5kb3dzIGhpZ2ggY29udHJhc3QgbW9kZS5cblx0XHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRcdG91dGxpbmUtb2Zmc2V0OiAwO1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBpdGVtV3JhcHBlciA9IGNzc2Bcblx0d2lkdGg6IDEwMCU7XG5cdGRpc3BsYXk6IGJsb2NrO1xuYDtcblxuZXhwb3J0IGNvbnN0IGl0ZW0gPSBjc3NgXG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdHdpZHRoOiAxMDAlO1xuXHRkaXNwbGF5OiBibG9jaztcblx0bWFyZ2luOiAwO1xuXHRjb2xvcjogaW5oZXJpdDtcbmA7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJlZCA9IGNzc2Bcblx0Ym9yZGVyOiAxcHggc29saWQgJHsgQ09ORklHLnN1cmZhY2VCb3JkZXJDb2xvciB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IHNlcGFyYXRlZCA9IGNzc2Bcblx0PiAqOm5vdCggbWFycXVlZSApID4gKiB7XG5cdFx0Ym9yZGVyLWJvdHRvbTogMXB4IHNvbGlkICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfTtcblx0fVxuXG5cdD4gKjpsYXN0LW9mLXR5cGUgPiAqIHtcblx0XHRib3JkZXItYm90dG9tLWNvbG9yOiB0cmFuc3BhcmVudDtcblx0fVxuYDtcblxuY29uc3QgYm9yZGVyUmFkaXVzID0gQ09ORklHLnJhZGl1c1NtYWxsO1xuXG5leHBvcnQgY29uc3Qgc3BhY2VkQXJvdW5kID0gY3NzYFxuXHRib3JkZXItcmFkaXVzOiAkeyBib3JkZXJSYWRpdXMgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCByb3VuZGVkID0gY3NzYFxuXHRib3JkZXItcmFkaXVzOiAkeyBib3JkZXJSYWRpdXMgfTtcblxuXHQ+ICo6Zmlyc3Qtb2YtdHlwZSA+ICoge1xuXHRcdGJvcmRlci10b3AtbGVmdC1yYWRpdXM6ICR7IGJvcmRlclJhZGl1cyB9O1xuXHRcdGJvcmRlci10b3AtcmlnaHQtcmFkaXVzOiAkeyBib3JkZXJSYWRpdXMgfTtcblx0fVxuXG5cdD4gKjpsYXN0LW9mLXR5cGUgPiAqIHtcblx0XHRib3JkZXItYm90dG9tLWxlZnQtcmFkaXVzOiAkeyBib3JkZXJSYWRpdXMgfTtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5cdH1cbmA7XG5cbmNvbnN0IGJhc2VGb250SGVpZ2h0ID0gYGNhbGMoJHsgQ09ORklHLmZvbnRTaXplIH0gKiAkeyBDT05GSUcuZm9udExpbmVIZWlnaHRCYXNlIH0pYDtcblxuLypcbiAqIE1hdGg6XG4gKiAtIFVzZSB0aGUgZGVzaXJlZCBoZWlnaHQgYXMgdGhlIGJhc2UgdmFsdWVcbiAqIC0gU3VidHJhY3QgdGhlIGNvbXB1dGVkIGhlaWdodCBvZiAoZGVmYXVsdCkgdGV4dFxuICogLSBTdWJ0cmFjdCB0aGUgZWZmZWN0cyBvZiBib3JkZXJcbiAqIC0gRGl2aWRlIHRoZSBjYWxjdWxhdGVkIG51bWJlciBieSAyLCBpbiBvcmRlciB0byBnZXQgYW4gaW5kaXZpZHVhbCB0b3AvYm90dG9tIHBhZGRpbmdcbiAqL1xuY29uc3QgcGFkZGluZ1kgPSBgY2FsYygoJHsgQ09ORklHLmNvbnRyb2xIZWlnaHQgfSAtICR7IGJhc2VGb250SGVpZ2h0IH0gLSAycHgpIC8gMilgO1xuY29uc3QgcGFkZGluZ1lTbWFsbCA9IGBjYWxjKCgkeyBDT05GSUcuY29udHJvbEhlaWdodFNtYWxsIH0gLSAkeyBiYXNlRm9udEhlaWdodCB9IC0gMnB4KSAvIDIpYDtcbmNvbnN0IHBhZGRpbmdZTGFyZ2UgPSBgY2FsYygoJHsgQ09ORklHLmNvbnRyb2xIZWlnaHRMYXJnZSB9IC0gJHsgYmFzZUZvbnRIZWlnaHQgfSAtIDJweCkgLyAyKWA7XG5cbmV4cG9ydCBjb25zdCBpdGVtU2l6ZXMgPSB7XG5cdHNtYWxsOiBjc3NgXG5cdFx0cGFkZGluZzogJHsgcGFkZGluZ1lTbWFsbCB9ICR7IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCB9cHg7XG5cdGAsXG5cdG1lZGl1bTogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHBhZGRpbmdZIH0gJHsgQ09ORklHLmNvbnRyb2xQYWRkaW5nWCB9cHg7XG5cdGAsXG5cdGxhcmdlOiBjc3NgXG5cdFx0cGFkZGluZzogJHsgcGFkZGluZ1lMYXJnZSB9ICR7IENPTkZJRy5jb250cm9sUGFkZGluZ1hMYXJnZSB9cHg7XG5cdGAsXG59O1xuIl19 */"),
    large: /* @__PURE__ */ css("padding:", paddingYLarge, " ", config_values_default.controlPaddingXLarge, "px;" + (false ? "" : ";label:large;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnSFciLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT05GSUcsIENPTE9SUywgZm9udCB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGNvbnN0IHVuc3R5bGVkQnV0dG9uID0gKCBhczogJ2EnIHwgJ2J1dHRvbicgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0Zm9udC1zaXplOiAkeyBmb250KCAnZGVmYXVsdC5mb250U2l6ZScgKSB9O1xuXHRcdGZvbnQtZmFtaWx5OiBpbmhlcml0O1xuXHRcdGFwcGVhcmFuY2U6IG5vbmU7XG5cdFx0Ym9yZGVyOiAxcHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0Y3Vyc29yOiBwb2ludGVyO1xuXHRcdGJhY2tncm91bmQ6IG5vbmU7XG5cdFx0dGV4dC1hbGlnbjogc3RhcnQ7XG5cdFx0dGV4dC1kZWNvcmF0aW9uOiAkeyBhcyA9PT0gJ2EnID8gJ25vbmUnIDogdW5kZWZpbmVkIH07XG5cblx0XHRzdmcsXG5cdFx0cGF0aCB7XG5cdFx0XHRmaWxsOiBjdXJyZW50Q29sb3I7XG5cdFx0fVxuXG5cdFx0Jjpob3ZlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdH1cblxuXHRcdCY6Zm9jdXMge1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHRcdG91dGxpbmU6IG5vbmU7XG5cdFx0fVxuXG5cdFx0Jjpmb2N1cy12aXNpYmxlIHtcblx0XHRcdGJveC1zaGFkb3c6IDAgMCAwIHZhciggLS13cC1hZG1pbi1ib3JkZXItd2lkdGgtZm9jdXMgKVxuXHRcdFx0XHQkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHQvLyBXaW5kb3dzIGhpZ2ggY29udHJhc3QgbW9kZS5cblx0XHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRcdG91dGxpbmUtb2Zmc2V0OiAwO1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBpdGVtV3JhcHBlciA9IGNzc2Bcblx0d2lkdGg6IDEwMCU7XG5cdGRpc3BsYXk6IGJsb2NrO1xuYDtcblxuZXhwb3J0IGNvbnN0IGl0ZW0gPSBjc3NgXG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdHdpZHRoOiAxMDAlO1xuXHRkaXNwbGF5OiBibG9jaztcblx0bWFyZ2luOiAwO1xuXHRjb2xvcjogaW5oZXJpdDtcbmA7XG5cbmV4cG9ydCBjb25zdCBib3JkZXJlZCA9IGNzc2Bcblx0Ym9yZGVyOiAxcHggc29saWQgJHsgQ09ORklHLnN1cmZhY2VCb3JkZXJDb2xvciB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IHNlcGFyYXRlZCA9IGNzc2Bcblx0PiAqOm5vdCggbWFycXVlZSApID4gKiB7XG5cdFx0Ym9yZGVyLWJvdHRvbTogMXB4IHNvbGlkICR7IENPTkZJRy5zdXJmYWNlQm9yZGVyQ29sb3IgfTtcblx0fVxuXG5cdD4gKjpsYXN0LW9mLXR5cGUgPiAqIHtcblx0XHRib3JkZXItYm90dG9tLWNvbG9yOiB0cmFuc3BhcmVudDtcblx0fVxuYDtcblxuY29uc3QgYm9yZGVyUmFkaXVzID0gQ09ORklHLnJhZGl1c1NtYWxsO1xuXG5leHBvcnQgY29uc3Qgc3BhY2VkQXJvdW5kID0gY3NzYFxuXHRib3JkZXItcmFkaXVzOiAkeyBib3JkZXJSYWRpdXMgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCByb3VuZGVkID0gY3NzYFxuXHRib3JkZXItcmFkaXVzOiAkeyBib3JkZXJSYWRpdXMgfTtcblxuXHQ+ICo6Zmlyc3Qtb2YtdHlwZSA+ICoge1xuXHRcdGJvcmRlci10b3AtbGVmdC1yYWRpdXM6ICR7IGJvcmRlclJhZGl1cyB9O1xuXHRcdGJvcmRlci10b3AtcmlnaHQtcmFkaXVzOiAkeyBib3JkZXJSYWRpdXMgfTtcblx0fVxuXG5cdD4gKjpsYXN0LW9mLXR5cGUgPiAqIHtcblx0XHRib3JkZXItYm90dG9tLWxlZnQtcmFkaXVzOiAkeyBib3JkZXJSYWRpdXMgfTtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogJHsgYm9yZGVyUmFkaXVzIH07XG5cdH1cbmA7XG5cbmNvbnN0IGJhc2VGb250SGVpZ2h0ID0gYGNhbGMoJHsgQ09ORklHLmZvbnRTaXplIH0gKiAkeyBDT05GSUcuZm9udExpbmVIZWlnaHRCYXNlIH0pYDtcblxuLypcbiAqIE1hdGg6XG4gKiAtIFVzZSB0aGUgZGVzaXJlZCBoZWlnaHQgYXMgdGhlIGJhc2UgdmFsdWVcbiAqIC0gU3VidHJhY3QgdGhlIGNvbXB1dGVkIGhlaWdodCBvZiAoZGVmYXVsdCkgdGV4dFxuICogLSBTdWJ0cmFjdCB0aGUgZWZmZWN0cyBvZiBib3JkZXJcbiAqIC0gRGl2aWRlIHRoZSBjYWxjdWxhdGVkIG51bWJlciBieSAyLCBpbiBvcmRlciB0byBnZXQgYW4gaW5kaXZpZHVhbCB0b3AvYm90dG9tIHBhZGRpbmdcbiAqL1xuY29uc3QgcGFkZGluZ1kgPSBgY2FsYygoJHsgQ09ORklHLmNvbnRyb2xIZWlnaHQgfSAtICR7IGJhc2VGb250SGVpZ2h0IH0gLSAycHgpIC8gMilgO1xuY29uc3QgcGFkZGluZ1lTbWFsbCA9IGBjYWxjKCgkeyBDT05GSUcuY29udHJvbEhlaWdodFNtYWxsIH0gLSAkeyBiYXNlRm9udEhlaWdodCB9IC0gMnB4KSAvIDIpYDtcbmNvbnN0IHBhZGRpbmdZTGFyZ2UgPSBgY2FsYygoJHsgQ09ORklHLmNvbnRyb2xIZWlnaHRMYXJnZSB9IC0gJHsgYmFzZUZvbnRIZWlnaHQgfSAtIDJweCkgLyAyKWA7XG5cbmV4cG9ydCBjb25zdCBpdGVtU2l6ZXMgPSB7XG5cdHNtYWxsOiBjc3NgXG5cdFx0cGFkZGluZzogJHsgcGFkZGluZ1lTbWFsbCB9ICR7IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCB9cHg7XG5cdGAsXG5cdG1lZGl1bTogY3NzYFxuXHRcdHBhZGRpbmc6ICR7IHBhZGRpbmdZIH0gJHsgQ09ORklHLmNvbnRyb2xQYWRkaW5nWCB9cHg7XG5cdGAsXG5cdGxhcmdlOiBjc3NgXG5cdFx0cGFkZGluZzogJHsgcGFkZGluZ1lMYXJnZSB9ICR7IENPTkZJRy5jb250cm9sUGFkZGluZ1hMYXJnZSB9cHg7XG5cdGAsXG59O1xuIl19 */")
  };

  // packages/components/build-module/item-group/context.mjs
  var import_element107 = __toESM(require_element(), 1);
  var ItemGroupContext = (0, import_element107.createContext)({
    size: "medium"
  });
  ItemGroupContext.displayName = "ItemGroupContext";
  var useItemGroupContext = () => (0, import_element107.useContext)(ItemGroupContext);

  // packages/components/build-module/item-group/item/hook.mjs
  function useItem(props) {
    const {
      as: asProp,
      className: className2,
      onClick,
      role = "listitem",
      size: sizeProp,
      ...otherProps
    } = useContextSystem(props, "Item");
    const {
      spacedAround: spacedAround2,
      size: contextSize
    } = useItemGroupContext();
    const size3 = sizeProp || contextSize;
    const as = asProp || (typeof onClick !== "undefined" ? "button" : "div");
    const cx3 = useCx();
    const classes = (0, import_element108.useMemo)(() => cx3((as === "button" || as === "a") && unstyledButton(as), itemSizes[size3] || itemSizes.medium, item, spacedAround2 && spacedAround, className2), [as, className2, cx3, size3, spacedAround2]);
    const wrapperClassName = cx3(itemWrapper);
    return {
      as,
      className: classes,
      onClick,
      wrapperClassName,
      role,
      ...otherProps
    };
  }

  // packages/components/build-module/item-group/item/component.mjs
  var import_jsx_runtime171 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedItem(props, forwardedRef) {
    const {
      role,
      wrapperClassName,
      ...otherProps
    } = useItem(props);
    return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)("div", {
      role,
      className: wrapperClassName,
      children: /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(component_default, {
        ...otherProps,
        ref: forwardedRef
      })
    });
  }
  var Item2 = contextConnect(UnconnectedItem, "Item");
  var component_default35 = Item2;

  // packages/components/build-module/item-group/item-group/hook.mjs
  function useItemGroup(props) {
    const {
      className: className2,
      isBordered = false,
      isRounded = true,
      isSeparated = false,
      role = "list",
      ...otherProps
    } = useContextSystem(props, "ItemGroup");
    const cx3 = useCx();
    const classes = cx3(isBordered && bordered, isSeparated && separated, isRounded && rounded2, className2);
    return {
      isBordered,
      className: classes,
      role,
      isSeparated,
      ...otherProps
    };
  }

  // packages/components/build-module/item-group/item-group/component.mjs
  var import_jsx_runtime172 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedItemGroup(props, forwardedRef) {
    const {
      isBordered,
      isSeparated,
      size: sizeProp,
      ...otherProps
    } = useItemGroup(props);
    const {
      size: contextSize
    } = useItemGroupContext();
    const spacedAround2 = !isBordered && !isSeparated;
    const size3 = sizeProp || contextSize;
    const contextValue = {
      spacedAround: spacedAround2,
      size: size3
    };
    return /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(ItemGroupContext.Provider, {
      value: contextValue,
      children: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(component_default, {
        ...otherProps,
        ref: forwardedRef
      })
    });
  }
  var ItemGroup = contextConnect(UnconnectedItemGroup, "ItemGroup");
  var component_default36 = ItemGroup;

  // packages/components/build-module/gradient-picker/index.mjs
  var import_i18n34 = __toESM(require_i18n(), 1);
  var import_compose42 = __toESM(require_compose(), 1);
  var import_element111 = __toESM(require_element(), 1);

  // packages/components/build-module/custom-gradient-picker/index.mjs
  var import_i18n33 = __toESM(require_i18n(), 1);

  // packages/components/build-module/custom-gradient-picker/gradient-bar/index.mjs
  var import_element110 = __toESM(require_element(), 1);

  // packages/components/build-module/custom-gradient-picker/gradient-bar/control-points.mjs
  var import_compose41 = __toESM(require_compose(), 1);
  var import_element109 = __toESM(require_element(), 1);
  var import_i18n31 = __toESM(require_i18n(), 1);

  // packages/components/build-module/custom-gradient-picker/gradient-bar/constants.mjs
  var GRADIENT_MARKERS_WIDTH = 16;
  var INSERT_POINT_WIDTH = 16;
  var MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT = 10;
  var MINIMUM_DISTANCE_BETWEEN_POINTS = 0;
  var MINIMUM_SIGNIFICANT_MOVE = 5;
  var KEYBOARD_CONTROL_POINT_VARIATION = MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT;
  var MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_MARKER = (INSERT_POINT_WIDTH + GRADIENT_MARKERS_WIDTH) / 2;

  // packages/components/build-module/custom-gradient-picker/gradient-bar/utils.mjs
  function clampPercent(value) {
    return Math.max(0, Math.min(100, value));
  }
  function isOverlapping(value, initialIndex, newPosition, minDistance = MINIMUM_DISTANCE_BETWEEN_POINTS) {
    const initialPosition = value[initialIndex].position;
    const minPosition = Math.min(initialPosition, newPosition);
    const maxPosition = Math.max(initialPosition, newPosition);
    return value.some(({
      position: position2
    }, index2) => {
      return index2 !== initialIndex && (Math.abs(position2 - newPosition) < minDistance || minPosition < position2 && position2 < maxPosition);
    });
  }
  function addControlPoint(points, position2, color2) {
    const nextIndex = points.findIndex((point) => point.position > position2);
    const newPoint = {
      color: color2,
      position: position2
    };
    const newPoints = points.slice();
    newPoints.splice(nextIndex - 1, 0, newPoint);
    return newPoints;
  }
  function removeControlPoint(points, index2) {
    return points.filter((_point, pointIndex) => {
      return pointIndex !== index2;
    });
  }
  function updateControlPoint(points, index2, newPoint) {
    const newValue = points.slice();
    newValue[index2] = newPoint;
    return newValue;
  }
  function updateControlPointPosition(points, index2, newPosition) {
    if (isOverlapping(points, index2, newPosition)) {
      return points;
    }
    const newPoint = {
      ...points[index2],
      position: newPosition
    };
    return updateControlPoint(points, index2, newPoint);
  }
  function updateControlPointColor(points, index2, newColor) {
    const newPoint = {
      ...points[index2],
      color: newColor
    };
    return updateControlPoint(points, index2, newPoint);
  }
  function updateControlPointColorByPosition(points, position2, newColor) {
    const index2 = points.findIndex((point) => point.position === position2);
    return updateControlPointColor(points, index2, newColor);
  }
  function getHorizontalRelativeGradientPosition(mouseXCoordinate, containerElement) {
    if (!containerElement) {
      return;
    }
    const {
      x: x2,
      width
    } = containerElement.getBoundingClientRect();
    const absolutePositionValue = mouseXCoordinate - x2;
    return Math.round(clampPercent(absolutePositionValue * 100 / width));
  }

  // packages/components/build-module/custom-gradient-picker/gradient-bar/control-points.mjs
  var import_jsx_runtime173 = __toESM(require_jsx_runtime(), 1);
  function ControlPointButton({
    isOpen,
    position: position2,
    color: color2,
    ...additionalProps
  }) {
    const instanceId = (0, import_compose41.useInstanceId)(ControlPointButton);
    const descriptionId = `components-custom-gradient-picker__control-point-button-description-${instanceId}`;
    return /* @__PURE__ */ (0, import_jsx_runtime173.jsxs)(import_jsx_runtime173.Fragment, {
      children: [/* @__PURE__ */ (0, import_jsx_runtime173.jsx)(button_default, {
        "aria-label": (0, import_i18n31.sprintf)(
          // translators: 1: gradient position e.g: 70. 2: gradient color code e.g: rgb(52,121,151).
          (0, import_i18n31.__)("Gradient control point at position %1$d%% with color code %2$s."),
          position2,
          color2
        ),
        "aria-describedby": descriptionId,
        "aria-haspopup": "true",
        "aria-expanded": isOpen,
        __next40pxDefaultSize: true,
        className: clsx_default("components-custom-gradient-picker__control-point-button", {
          "is-active": isOpen
        }),
        ...additionalProps
      }), /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(component_default2, {
        id: descriptionId,
        children: (0, import_i18n31.__)("Use your left or right arrow keys or drag and drop with the mouse to change the gradient position. Press the button to change the color or remove the control point.")
      })]
    });
  }
  function GradientColorPickerDropdown({
    isRenderedInSidebar,
    className: className2,
    ...props
  }) {
    const popoverProps = (0, import_element109.useMemo)(() => ({
      placement: "bottom",
      offset: 8,
      // Disabling resize as it would otherwise cause the popover to show
      // scrollbars while dragging the color picker's handle close to the
      // popover edge.
      resize: false
    }), []);
    const mergedClassName = clsx_default("components-custom-gradient-picker__control-point-dropdown", className2);
    return /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(CustomColorPickerDropdown, {
      isRenderedInSidebar,
      popoverProps,
      className: mergedClassName,
      ...props
    });
  }
  function ControlPoints({
    disableRemove,
    disableAlpha,
    gradientPickerDomRef,
    ignoreMarkerPosition,
    value: controlPoints,
    onChange,
    onStartControlPointChange,
    onStopControlPointChange,
    __experimentalIsRenderedInSidebar
  }) {
    const controlPointMoveStateRef = (0, import_element109.useRef)(void 0);
    const onMouseMove = (event) => {
      if (controlPointMoveStateRef.current === void 0 || gradientPickerDomRef.current === null) {
        return;
      }
      const relativePosition = getHorizontalRelativeGradientPosition(event.clientX, gradientPickerDomRef.current);
      const {
        initialPosition,
        index: index2,
        significantMoveHappened
      } = controlPointMoveStateRef.current;
      if (!significantMoveHappened && Math.abs(initialPosition - relativePosition) >= MINIMUM_SIGNIFICANT_MOVE) {
        controlPointMoveStateRef.current.significantMoveHappened = true;
      }
      onChange(updateControlPointPosition(controlPoints, index2, relativePosition));
    };
    const cleanEventListeners = () => {
      if (window && window.removeEventListener && controlPointMoveStateRef.current && controlPointMoveStateRef.current.listenersActivated) {
        window.removeEventListener("mousemove", onMouseMove);
        window.removeEventListener("mouseup", cleanEventListeners);
        onStopControlPointChange();
        controlPointMoveStateRef.current.listenersActivated = false;
      }
    };
    const cleanEventListenersRef = (0, import_element109.useRef)(void 0);
    cleanEventListenersRef.current = cleanEventListeners;
    (0, import_element109.useEffect)(() => {
      return () => {
        cleanEventListenersRef.current?.();
      };
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(import_jsx_runtime173.Fragment, {
      children: controlPoints.map((point, index2) => {
        const initialPosition = point?.position;
        return ignoreMarkerPosition !== initialPosition && /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(GradientColorPickerDropdown, {
          isRenderedInSidebar: __experimentalIsRenderedInSidebar,
          onClose: onStopControlPointChange,
          renderToggle: ({
            isOpen,
            onToggle
          }) => /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(ControlPointButton, {
            onClick: () => {
              if (controlPointMoveStateRef.current && controlPointMoveStateRef.current.significantMoveHappened) {
                return;
              }
              if (isOpen) {
                onStopControlPointChange();
              } else {
                onStartControlPointChange();
              }
              onToggle();
            },
            onMouseDown: () => {
              if (window && window.addEventListener) {
                controlPointMoveStateRef.current = {
                  initialPosition,
                  index: index2,
                  significantMoveHappened: false,
                  listenersActivated: true
                };
                onStartControlPointChange();
                window.addEventListener("mousemove", onMouseMove);
                window.addEventListener("mouseup", cleanEventListeners);
              }
            },
            onKeyDown: (event) => {
              if (event.code === "ArrowLeft") {
                event.stopPropagation();
                onChange(updateControlPointPosition(controlPoints, index2, clampPercent(point.position - KEYBOARD_CONTROL_POINT_VARIATION)));
              } else if (event.code === "ArrowRight") {
                event.stopPropagation();
                onChange(updateControlPointPosition(controlPoints, index2, clampPercent(point.position + KEYBOARD_CONTROL_POINT_VARIATION)));
              }
            },
            isOpen,
            position: point.position,
            color: point.color
          }, index2),
          renderContent: ({
            onClose
          }) => /* @__PURE__ */ (0, import_jsx_runtime173.jsxs)(dropdown_content_wrapper_default, {
            paddingSize: "none",
            children: [/* @__PURE__ */ (0, import_jsx_runtime173.jsx)(LegacyAdapter, {
              enableAlpha: !disableAlpha,
              color: point.color,
              onChange: (color2) => {
                onChange(updateControlPointColor(controlPoints, index2, w(color2).toRgbString()));
              }
            }), !disableRemove && controlPoints.length > 2 && /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(component_default9, {
              className: "components-custom-gradient-picker__remove-control-point-wrapper",
              alignment: "center",
              children: /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(button_default, {
                onClick: () => {
                  onChange(removeControlPoint(controlPoints, index2));
                  onClose();
                },
                variant: "link",
                children: (0, import_i18n31.__)("Remove Control Point")
              })
            })]
          }),
          style: {
            left: `${point.position}%`,
            transform: "translateX( -50% )"
          }
        }, index2);
      })
    });
  }
  function InsertPoint({
    value: controlPoints,
    onChange,
    onOpenInserter,
    onCloseInserter,
    insertPosition,
    disableAlpha,
    __experimentalIsRenderedInSidebar
  }) {
    const [alreadyInsertedPoint, setAlreadyInsertedPoint] = (0, import_element109.useState)(false);
    return /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(GradientColorPickerDropdown, {
      isRenderedInSidebar: __experimentalIsRenderedInSidebar,
      className: "components-custom-gradient-picker__inserter",
      onClose: () => {
        onCloseInserter();
      },
      renderToggle: ({
        isOpen,
        onToggle
      }) => /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(button_default, {
        __next40pxDefaultSize: true,
        "aria-expanded": isOpen,
        "aria-haspopup": "true",
        onClick: () => {
          if (isOpen) {
            onCloseInserter();
          } else {
            setAlreadyInsertedPoint(false);
            onOpenInserter();
          }
          onToggle();
        },
        className: "components-custom-gradient-picker__insert-point-dropdown",
        icon: plus_default
      }),
      renderContent: () => /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(dropdown_content_wrapper_default, {
        paddingSize: "none",
        children: /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(LegacyAdapter, {
          enableAlpha: !disableAlpha,
          onChange: (color2) => {
            if (!alreadyInsertedPoint) {
              onChange(addControlPoint(controlPoints, insertPosition, w(color2).toRgbString()));
              setAlreadyInsertedPoint(true);
            } else {
              onChange(updateControlPointColorByPosition(controlPoints, insertPosition, w(color2).toRgbString()));
            }
          }
        })
      }),
      style: insertPosition !== null ? {
        left: `${insertPosition}%`,
        transform: "translateX( -50% )"
      } : void 0
    });
  }
  ControlPoints.InsertPoint = InsertPoint;
  var control_points_default = ControlPoints;

  // packages/components/build-module/custom-gradient-picker/gradient-bar/index.mjs
  var import_jsx_runtime174 = __toESM(require_jsx_runtime(), 1);
  var customGradientBarReducer = (state, action) => {
    switch (action.type) {
      case "MOVE_INSERTER":
        if (state.id === "IDLE" || state.id === "MOVING_INSERTER") {
          return {
            id: "MOVING_INSERTER",
            insertPosition: action.insertPosition
          };
        }
        break;
      case "STOP_INSERTER_MOVE":
        if (state.id === "MOVING_INSERTER") {
          return {
            id: "IDLE"
          };
        }
        break;
      case "OPEN_INSERTER":
        if (state.id === "MOVING_INSERTER") {
          return {
            id: "INSERTING_CONTROL_POINT",
            insertPosition: state.insertPosition
          };
        }
        break;
      case "CLOSE_INSERTER":
        if (state.id === "INSERTING_CONTROL_POINT") {
          return {
            id: "IDLE"
          };
        }
        break;
      case "START_CONTROL_CHANGE":
        if (state.id === "IDLE") {
          return {
            id: "MOVING_CONTROL_POINT"
          };
        }
        break;
      case "STOP_CONTROL_CHANGE":
        if (state.id === "MOVING_CONTROL_POINT") {
          return {
            id: "IDLE"
          };
        }
        break;
    }
    return state;
  };
  var customGradientBarReducerInitialState = {
    id: "IDLE"
  };
  function CustomGradientBar({
    background: background2,
    hasGradient,
    value: controlPoints,
    onChange,
    disableInserter = false,
    disableAlpha = false,
    __experimentalIsRenderedInSidebar = false
  }) {
    const gradientMarkersContainerDomRef = (0, import_element110.useRef)(null);
    const [gradientBarState, gradientBarStateDispatch] = (0, import_element110.useReducer)(customGradientBarReducer, customGradientBarReducerInitialState);
    const onMouseEnterAndMove = (event) => {
      if (!gradientMarkersContainerDomRef.current) {
        return;
      }
      const insertPosition = getHorizontalRelativeGradientPosition(event.clientX, gradientMarkersContainerDomRef.current);
      if (controlPoints.some(({
        position: position2
      }) => {
        return Math.abs(insertPosition - position2) < MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT;
      })) {
        if (gradientBarState.id === "MOVING_INSERTER") {
          gradientBarStateDispatch({
            type: "STOP_INSERTER_MOVE"
          });
        }
        return;
      }
      gradientBarStateDispatch({
        type: "MOVE_INSERTER",
        insertPosition
      });
    };
    const onMouseLeave = () => {
      gradientBarStateDispatch({
        type: "STOP_INSERTER_MOVE"
      });
    };
    const isMovingInserter = gradientBarState.id === "MOVING_INSERTER";
    const isInsertingControlPoint = gradientBarState.id === "INSERTING_CONTROL_POINT";
    return /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)("div", {
      className: clsx_default("components-custom-gradient-picker__gradient-bar", {
        "has-gradient": hasGradient
      }),
      onMouseEnter: onMouseEnterAndMove,
      onMouseMove: onMouseEnterAndMove,
      onMouseLeave,
      children: [/* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", {
        className: "components-custom-gradient-picker__gradient-bar-background",
        style: {
          background: background2,
          opacity: hasGradient ? 1 : 0.4
        }
      }), /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)("div", {
        ref: gradientMarkersContainerDomRef,
        className: "components-custom-gradient-picker__markers-container",
        children: [!disableInserter && (isMovingInserter || isInsertingControlPoint) && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(control_points_default.InsertPoint, {
          __experimentalIsRenderedInSidebar,
          disableAlpha,
          insertPosition: gradientBarState.insertPosition,
          value: controlPoints,
          onChange,
          onOpenInserter: () => {
            gradientBarStateDispatch({
              type: "OPEN_INSERTER"
            });
          },
          onCloseInserter: () => {
            gradientBarStateDispatch({
              type: "CLOSE_INSERTER"
            });
          }
        }), /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(control_points_default, {
          __experimentalIsRenderedInSidebar,
          disableAlpha,
          disableRemove: disableInserter,
          gradientPickerDomRef: gradientMarkersContainerDomRef,
          ignoreMarkerPosition: isInsertingControlPoint ? gradientBarState.insertPosition : void 0,
          value: controlPoints,
          onChange,
          onStartControlPointChange: () => {
            gradientBarStateDispatch({
              type: "START_CONTROL_CHANGE"
            });
          },
          onStopControlPointChange: () => {
            gradientBarStateDispatch({
              type: "STOP_CONTROL_CHANGE"
            });
          }
        })]
      })]
    });
  }

  // packages/components/build-module/custom-gradient-picker/utils.mjs
  var import_gradient_parser = __toESM(require_node(), 1);

  // packages/components/build-module/custom-gradient-picker/constants.mjs
  var import_i18n32 = __toESM(require_i18n(), 1);
  var DEFAULT_GRADIENT = "linear-gradient(135deg, rgba(6, 147, 227, 1) 0%, rgb(155, 81, 224) 100%)";
  var DEFAULT_LINEAR_GRADIENT_ANGLE = 180;
  var HORIZONTAL_GRADIENT_ORIENTATION = {
    type: "angular",
    value: "90"
  };
  var GRADIENT_OPTIONS = [{
    value: "linear-gradient",
    label: (0, import_i18n32.__)("Linear")
  }, {
    value: "radial-gradient",
    label: (0, import_i18n32.__)("Radial")
  }];
  var DIRECTIONAL_ORIENTATION_ANGLE_MAP = {
    top: 0,
    "top right": 45,
    "right top": 45,
    right: 90,
    "right bottom": 135,
    "bottom right": 135,
    bottom: 180,
    "bottom left": 225,
    "left bottom": 225,
    left: 270,
    "top left": 315,
    "left top": 315
  };

  // packages/components/build-module/custom-gradient-picker/serializer.mjs
  function serializeGradientColor({
    type,
    value
  }) {
    if (type === "literal") {
      return value;
    }
    if (type === "hex") {
      return `#${value}`;
    }
    if (type === "var") {
      return `var(${value})`;
    }
    if (type === "hsl") {
      const [hue, saturation, lightness] = value;
      return `hsl(${hue},${saturation}%,${lightness}%)`;
    }
    if (type === "hsla") {
      const [hue, saturation, lightness, alpha2] = value;
      return `hsla(${hue},${saturation}%,${lightness}%,${alpha2})`;
    }
    return `${type}(${value.join(",")})`;
  }
  function serializeGradientPosition(position2) {
    if (!position2) {
      return "";
    }
    const {
      value,
      type
    } = position2;
    if (type === "calc") {
      return `calc(${value})`;
    }
    return `${value}${type}`;
  }
  function serializeGradientColorStop({
    type,
    value,
    length: length2
  }) {
    return `${serializeGradientColor({
      type,
      value
    })} ${serializeGradientPosition(length2)}`;
  }
  function serializeGradientOrientation(orientation) {
    if (Array.isArray(orientation) || !orientation || orientation.type !== "angular") {
      return;
    }
    return `${orientation.value}deg`;
  }
  function serializeGradient({
    type,
    orientation,
    colorStops
  }) {
    const serializedOrientation = serializeGradientOrientation(orientation);
    const serializedColorStops = colorStops.sort((colorStop1, colorStop2) => {
      const getNumericStopValue = (colorStop) => {
        return colorStop?.length?.value === void 0 ? 0 : parseInt(colorStop.length.value);
      };
      return getNumericStopValue(colorStop1) - getNumericStopValue(colorStop2);
    }).map(serializeGradientColorStop);
    return `${type}(${[serializedOrientation, ...serializedColorStops].filter(Boolean).join(",")})`;
  }

  // packages/components/build-module/custom-gradient-picker/utils.mjs
  k([names_default]);
  function getLinearGradientRepresentation(gradientAST) {
    return serializeGradient({
      type: "linear-gradient",
      orientation: HORIZONTAL_GRADIENT_ORIENTATION,
      colorStops: gradientAST.colorStops
    });
  }
  function hasUnsupportedLength(item2) {
    return item2.length === void 0 || item2.length.type !== "%";
  }
  function getGradientAstWithDefault(value) {
    let gradientAST;
    let hasGradient = !!value;
    const valueToParse = value ?? DEFAULT_GRADIENT;
    try {
      gradientAST = import_gradient_parser.default.parse(valueToParse)[0];
    } catch (error) {
      console.warn("wp.components.CustomGradientPicker failed to parse the gradient with error", error);
      gradientAST = import_gradient_parser.default.parse(DEFAULT_GRADIENT)[0];
      hasGradient = false;
    }
    if (!Array.isArray(gradientAST.orientation) && gradientAST.orientation?.type === "directional") {
      gradientAST.orientation = {
        type: "angular",
        value: DIRECTIONAL_ORIENTATION_ANGLE_MAP[gradientAST.orientation.value].toString()
      };
    }
    if (gradientAST.colorStops.some(hasUnsupportedLength)) {
      const {
        colorStops
      } = gradientAST;
      const step = 100 / (colorStops.length - 1);
      colorStops.forEach((stop, index2) => {
        stop.length = {
          value: `${step * index2}`,
          type: "%"
        };
      });
    }
    return {
      gradientAST,
      hasGradient
    };
  }
  function getGradientAstWithControlPoints(gradientAST, newControlPoints) {
    return {
      ...gradientAST,
      colorStops: newControlPoints.map(({
        position: position2,
        color: color2
      }) => {
        const {
          r: r4,
          g: g3,
          b: b3,
          a: a3
        } = w(color2).toRgb();
        return {
          length: {
            type: "%",
            value: position2?.toString()
          },
          type: a3 < 1 ? "rgba" : "rgb",
          value: a3 < 1 ? [`${r4}`, `${g3}`, `${b3}`, `${a3}`] : [`${r4}`, `${g3}`, `${b3}`]
        };
      })
    };
  }
  function getStopCssColor(colorStop) {
    switch (colorStop.type) {
      case "hex":
        return `#${colorStop.value}`;
      case "literal":
        return colorStop.value;
      case "var":
        return `${colorStop.type}(${colorStop.value})`;
      case "rgb":
      case "rgba":
        return `${colorStop.type}(${colorStop.value.join(",")})`;
      case "hsl": {
        const [hue, saturation, lightness] = colorStop.value;
        return `hsl(${hue},${saturation}%,${lightness}%)`;
      }
      case "hsla": {
        const [hue, saturation, lightness, alpha2] = colorStop.value;
        return `hsla(${hue},${saturation}%,${lightness}%,${alpha2})`;
      }
      default:
        return "transparent";
    }
  }

  // packages/components/build-module/custom-gradient-picker/styles/custom-gradient-picker-styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__23() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var SelectWrapper = /* @__PURE__ */ createStyled(component_default5, false ? {
    target: "e10bzpgi1"
  } : {
    target: "e10bzpgi1",
    label: "SelectWrapper"
  })(false ? {
    name: "1gvx10y",
    styles: "flex-grow:5"
  } : {
    name: "1gvx10y",
    styles: "flex-grow:5/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImN1c3RvbS1ncmFkaWVudC1waWNrZXItc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFTZ0QiLCJmaWxlIjoiY3VzdG9tLWdyYWRpZW50LXBpY2tlci1zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgRmxleEJsb2NrIH0gZnJvbSAnLi4vLi4vZmxleCc7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RXcmFwcGVyID0gc3R5bGVkKCBGbGV4QmxvY2sgKWBcblx0ZmxleC1ncm93OiA1O1xuYDtcblxuZXhwb3J0IGNvbnN0IEFjY2Vzc29yeVdyYXBwZXIgPSBzdHlsZWQoIEZsZXhCbG9jayApYFxuXHRmbGV4LWdyb3c6IDU7XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__23
  });
  var AccessoryWrapper = /* @__PURE__ */ createStyled(component_default5, false ? {
    target: "e10bzpgi0"
  } : {
    target: "e10bzpgi0",
    label: "AccessoryWrapper"
  })(false ? {
    name: "1gvx10y",
    styles: "flex-grow:5"
  } : {
    name: "1gvx10y",
    styles: "flex-grow:5/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImN1c3RvbS1ncmFkaWVudC1waWNrZXItc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFhbUQiLCJmaWxlIjoiY3VzdG9tLWdyYWRpZW50LXBpY2tlci1zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgRmxleEJsb2NrIH0gZnJvbSAnLi4vLi4vZmxleCc7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RXcmFwcGVyID0gc3R5bGVkKCBGbGV4QmxvY2sgKWBcblx0ZmxleC1ncm93OiA1O1xuYDtcblxuZXhwb3J0IGNvbnN0IEFjY2Vzc29yeVdyYXBwZXIgPSBzdHlsZWQoIEZsZXhCbG9jayApYFxuXHRmbGV4LWdyb3c6IDU7XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__23
  });

  // packages/components/build-module/custom-gradient-picker/index.mjs
  var import_jsx_runtime175 = __toESM(require_jsx_runtime(), 1);
  var GradientAnglePicker = ({
    gradientAST,
    hasGradient,
    onChange
  }) => {
    const angle = gradientAST?.orientation?.value ?? DEFAULT_LINEAR_GRADIENT_ANGLE;
    const onAngleChange = (newAngle) => {
      onChange(serializeGradient({
        ...gradientAST,
        orientation: {
          type: "angular",
          value: `${newAngle}`
        }
      }));
    };
    return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(angle_picker_control_default, {
      onChange: onAngleChange,
      value: hasGradient ? angle : ""
    });
  };
  var GradientTypePicker = ({
    gradientAST,
    hasGradient,
    onChange
  }) => {
    const {
      type
    } = gradientAST;
    const onSetLinearGradient = () => {
      onChange(serializeGradient({
        ...gradientAST,
        orientation: gradientAST.orientation ? void 0 : HORIZONTAL_GRADIENT_ORIENTATION,
        type: "linear-gradient"
      }));
    };
    const onSetRadialGradient = () => {
      const {
        orientation,
        ...restGradientAST
      } = gradientAST;
      onChange(serializeGradient({
        ...restGradientAST,
        type: "radial-gradient"
      }));
    };
    const handleOnChange = (next2) => {
      if (next2 === "linear-gradient") {
        onSetLinearGradient();
      }
      if (next2 === "radial-gradient") {
        onSetRadialGradient();
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(select_control_default, {
      className: "components-custom-gradient-picker__type-picker",
      label: (0, import_i18n33.__)("Type"),
      labelPosition: "top",
      onChange: handleOnChange,
      options: GRADIENT_OPTIONS,
      size: "__unstable-large",
      value: hasGradient ? type : void 0
    });
  };
  function CustomGradientPicker({
    value,
    onChange,
    enableAlpha = true,
    __experimentalIsRenderedInSidebar = false
  }) {
    const {
      gradientAST,
      hasGradient
    } = getGradientAstWithDefault(value);
    const background2 = getLinearGradientRepresentation(gradientAST);
    const controlPoints = gradientAST.colorStops.map((colorStop) => {
      return {
        color: getStopCssColor(colorStop),
        // Although it's already been checked by `hasUnsupportedLength` in `getGradientAstWithDefault`,
        // TypeScript doesn't know that `colorStop.length` is not undefined here.
        // @ts-expect-error
        position: parseInt(colorStop.length.value)
      };
    });
    return /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)(component_default18, {
      spacing: 4,
      className: "components-custom-gradient-picker",
      children: [/* @__PURE__ */ (0, import_jsx_runtime175.jsx)(CustomGradientBar, {
        __experimentalIsRenderedInSidebar,
        disableAlpha: !enableAlpha,
        background: background2,
        hasGradient,
        value: controlPoints,
        onChange: (newControlPoints) => {
          onChange(serializeGradient(getGradientAstWithControlPoints(gradientAST, newControlPoints)));
        }
      }), /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)(component_default3, {
        gap: 3,
        className: "components-custom-gradient-picker__ui-line",
        children: [/* @__PURE__ */ (0, import_jsx_runtime175.jsx)(SelectWrapper, {
          children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(GradientTypePicker, {
            gradientAST,
            hasGradient,
            onChange
          })
        }), /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(AccessoryWrapper, {
          children: gradientAST.type === "linear-gradient" && /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(GradientAnglePicker, {
            gradientAST,
            hasGradient,
            onChange
          })
        })]
      })]
    });
  }
  var custom_gradient_picker_default = CustomGradientPicker;

  // packages/components/build-module/gradient-picker/index.mjs
  var import_jsx_runtime176 = __toESM(require_jsx_runtime(), 1);
  var isMultipleOriginObject = (obj) => Array.isArray(obj.gradients) && !("gradient" in obj);
  var isMultipleOriginArray = (arr) => {
    return arr.length > 0 && arr.every((gradientObj) => isMultipleOriginObject(gradientObj));
  };
  function SingleOrigin({
    className: className2,
    clearGradient,
    gradients,
    onChange,
    value,
    ...additionalProps
  }) {
    const gradientOptions = (0, import_element111.useMemo)(() => {
      return gradients.map(({
        gradient,
        name,
        slug
      }, index2) => /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(circular_option_picker_default2.Option, {
        value: gradient,
        isSelected: value === gradient,
        tooltipText: name || // translators: %s: gradient code e.g: "linear-gradient(90deg, rgba(98,16,153,1) 0%, rgba(172,110,22,1) 100%);".
        (0, import_i18n34.sprintf)((0, import_i18n34.__)("Gradient code: %s"), gradient),
        style: {
          color: "rgba( 0,0,0,0 )",
          background: gradient
        },
        onClick: value === gradient ? clearGradient : () => onChange(gradient, index2),
        "aria-label": name ? (
          // translators: %s: The name of the gradient e.g: "Angular red to blue".
          (0, import_i18n34.sprintf)((0, import_i18n34.__)("Gradient: %s"), name)
        ) : (
          // translators: %s: gradient code e.g: "linear-gradient(90deg, rgba(98,16,153,1) 0%, rgba(172,110,22,1) 100%);".
          (0, import_i18n34.sprintf)((0, import_i18n34.__)("Gradient code: %s"), gradient)
        )
      }, slug));
    }, [gradients, value, onChange, clearGradient]);
    return /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(circular_option_picker_default2.OptionGroup, {
      className: className2,
      options: gradientOptions,
      ...additionalProps
    });
  }
  function MultipleOrigin({
    className: className2,
    clearGradient,
    gradients,
    onChange,
    value,
    headingLevel
  }) {
    const instanceId = (0, import_compose42.useInstanceId)(MultipleOrigin);
    return /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(component_default18, {
      spacing: 3,
      className: className2,
      children: gradients.map(({
        name,
        gradients: gradientSet
      }, index2) => {
        const id3 = `color-palette-${instanceId}-${index2}`;
        return /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(component_default18, {
          spacing: 2,
          children: [/* @__PURE__ */ (0, import_jsx_runtime176.jsx)(ColorHeading, {
            level: headingLevel,
            id: id3,
            children: name
          }), /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(SingleOrigin, {
            clearGradient,
            gradients: gradientSet,
            onChange: (gradient) => onChange(gradient, index2),
            value,
            "aria-labelledby": id3
          })]
        }, index2);
      })
    });
  }
  function Component3(props) {
    const {
      asButtons,
      loop,
      actions,
      headingLevel,
      "aria-label": ariaLabel,
      "aria-labelledby": ariaLabelledby,
      ...additionalProps
    } = props;
    const options2 = isMultipleOriginArray(props.gradients) ? /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(MultipleOrigin, {
      headingLevel,
      ...additionalProps
    }) : /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(SingleOrigin, {
      ...additionalProps
    });
    const {
      metaProps,
      labelProps
    } = getComputeCircularOptionPickerCommonProps(asButtons, loop, ariaLabel, ariaLabelledby);
    return /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(circular_option_picker_default2, {
      ...metaProps,
      ...labelProps,
      actions,
      options: options2
    });
  }
  function GradientPicker({
    className: className2,
    gradients = [],
    onChange,
    value,
    clearable = true,
    enableAlpha = true,
    disableCustomGradients = false,
    __experimentalIsRenderedInSidebar,
    headingLevel = 2,
    ...additionalProps
  }) {
    const clearGradient = (0, import_element111.useCallback)(() => onChange(void 0), [onChange]);
    return /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(component_default18, {
      spacing: gradients.length ? 4 : 0,
      children: [!disableCustomGradients && /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(custom_gradient_picker_default, {
        __experimentalIsRenderedInSidebar,
        enableAlpha,
        value,
        onChange
      }), (gradients.length > 0 || clearable) && /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(Component3, {
        ...additionalProps,
        className: className2,
        clearGradient,
        gradients,
        onChange,
        value,
        actions: clearable && !disableCustomGradients && /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(circular_option_picker_default2.ButtonAction, {
          onClick: clearGradient,
          accessibleWhenDisabled: true,
          disabled: !value,
          children: (0, import_i18n34.__)("Clear")
        }),
        headingLevel
      })]
    });
  }
  var gradient_picker_default = GradientPicker;

  // packages/components/build-module/navigable-container/menu.mjs
  var import_element113 = __toESM(require_element(), 1);

  // packages/components/build-module/navigable-container/container.mjs
  var import_element112 = __toESM(require_element(), 1);
  var import_dom29 = __toESM(require_dom(), 1);
  var import_jsx_runtime177 = __toESM(require_jsx_runtime(), 1);
  var noop10 = () => {
  };
  var MENU_ITEM_ROLES = ["menuitem", "menuitemradio", "menuitemcheckbox"];
  function cycleValue(value, total, offset3) {
    const nextValue = value + offset3;
    if (nextValue < 0) {
      return total + nextValue;
    } else if (nextValue >= total) {
      return nextValue - total;
    }
    return nextValue;
  }
  var NavigableContainer = class extends import_element112.Component {
    constructor(args) {
      super(args);
      this.onKeyDown = this.onKeyDown.bind(this);
      this.bindContainer = this.bindContainer.bind(this);
      this.getFocusableContext = this.getFocusableContext.bind(this);
      this.getFocusableIndex = this.getFocusableIndex.bind(this);
    }
    componentDidMount() {
      if (!this.container) {
        return;
      }
      this.container.addEventListener("keydown", this.onKeyDown);
    }
    componentWillUnmount() {
      if (!this.container) {
        return;
      }
      this.container.removeEventListener("keydown", this.onKeyDown);
    }
    bindContainer(ref) {
      const {
        forwardedRef
      } = this.props;
      this.container = ref;
      if (typeof forwardedRef === "function") {
        forwardedRef(ref);
      } else if (forwardedRef && "current" in forwardedRef) {
        forwardedRef.current = ref;
      }
    }
    getFocusableContext(target) {
      if (!this.container) {
        return null;
      }
      const {
        onlyBrowserTabstops
      } = this.props;
      const finder = onlyBrowserTabstops ? import_dom29.focus.tabbable : import_dom29.focus.focusable;
      const focusables = finder.find(this.container);
      const index2 = this.getFocusableIndex(focusables, target);
      if (index2 > -1 && target) {
        return {
          index: index2,
          target,
          focusables
        };
      }
      return null;
    }
    getFocusableIndex(focusables, target) {
      return focusables.indexOf(target);
    }
    onKeyDown(event) {
      if (this.props.onKeyDown) {
        this.props.onKeyDown(event);
      }
      const {
        getFocusableContext
      } = this;
      const {
        cycle = true,
        eventToOffset,
        onNavigate = noop10,
        stopNavigationEvents
      } = this.props;
      const offset3 = eventToOffset(event);
      if (offset3 !== void 0 && stopNavigationEvents) {
        event.stopImmediatePropagation();
        const targetRole = event.target?.getAttribute("role");
        const targetHasMenuItemRole = !!targetRole && MENU_ITEM_ROLES.includes(targetRole);
        if (targetHasMenuItemRole) {
          event.preventDefault();
        }
      }
      if (!offset3) {
        return;
      }
      const activeElement = event.target?.ownerDocument?.activeElement;
      if (!activeElement) {
        return;
      }
      const context = getFocusableContext(activeElement);
      if (!context) {
        return;
      }
      const {
        index: index2,
        focusables
      } = context;
      const nextIndex = cycle ? cycleValue(index2, focusables.length, offset3) : index2 + offset3;
      if (nextIndex >= 0 && nextIndex < focusables.length) {
        focusables[nextIndex].focus();
        onNavigate(nextIndex, focusables[nextIndex]);
        if (event.code === "Tab") {
          event.preventDefault();
        }
      }
    }
    render() {
      const {
        children,
        stopNavigationEvents,
        eventToOffset,
        onNavigate,
        onKeyDown,
        cycle,
        onlyBrowserTabstops,
        forwardedRef,
        ...restProps
      } = this.props;
      return /* @__PURE__ */ (0, import_jsx_runtime177.jsx)("div", {
        ref: this.bindContainer,
        ...restProps,
        children
      });
    }
  };
  var forwardedNavigableContainer = (props, ref) => {
    return /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(NavigableContainer, {
      ...props,
      forwardedRef: ref
    });
  };
  forwardedNavigableContainer.displayName = "NavigableContainer";
  var container_default = (0, import_element112.forwardRef)(forwardedNavigableContainer);

  // packages/components/build-module/navigable-container/menu.mjs
  var import_jsx_runtime178 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedNavigableMenu({
    role = "menu",
    orientation = "vertical",
    ...rest
  }, ref) {
    const eventToOffset = (evt) => {
      const {
        code
      } = evt;
      let next2 = ["ArrowDown"];
      let previous = ["ArrowUp"];
      if (orientation === "horizontal") {
        next2 = ["ArrowRight"];
        previous = ["ArrowLeft"];
      }
      if (orientation === "both") {
        next2 = ["ArrowRight", "ArrowDown"];
        previous = ["ArrowLeft", "ArrowUp"];
      }
      if (next2.includes(code)) {
        return 1;
      } else if (previous.includes(code)) {
        return -1;
      } else if (["ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"].includes(code)) {
        return 0;
      }
      return void 0;
    };
    return /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(container_default, {
      ref,
      stopNavigationEvents: true,
      onlyBrowserTabstops: false,
      role,
      "aria-orientation": role !== "presentation" && (orientation === "vertical" || orientation === "horizontal") ? orientation : void 0,
      eventToOffset,
      ...rest
    });
  }
  var NavigableMenu = (0, import_element113.forwardRef)(UnforwardedNavigableMenu);
  NavigableMenu.displayName = "NavigableMenu";
  var menu_default2 = NavigableMenu;

  // packages/components/build-module/navigable-container/tabbable.mjs
  var import_element114 = __toESM(require_element(), 1);
  var import_jsx_runtime179 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedTabbableContainer({
    eventToOffset,
    ...props
  }, ref) {
    const innerEventToOffset = (evt) => {
      const {
        code,
        shiftKey
      } = evt;
      if ("Tab" === code) {
        return shiftKey ? -1 : 1;
      }
      if (eventToOffset) {
        return eventToOffset(evt);
      }
      return void 0;
    };
    return /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(container_default, {
      ref,
      stopNavigationEvents: true,
      onlyBrowserTabstops: true,
      eventToOffset: innerEventToOffset,
      ...props
    });
  }
  var TabbableContainer = (0, import_element114.forwardRef)(UnforwardedTabbableContainer);
  TabbableContainer.displayName = "TabbableContainer";
  var tabbable_default = TabbableContainer;

  // packages/components/build-module/dropdown-menu/index.mjs
  var import_jsx_runtime180 = __toESM(require_jsx_runtime(), 1);
  function mergeProps2(defaultProps = {}, props = {}) {
    const mergedProps = {
      ...defaultProps,
      ...props
    };
    if (props.className && defaultProps.className) {
      mergedProps.className = clsx_default(props.className, defaultProps.className);
    }
    return mergedProps;
  }
  function isFunction2(maybeFunc) {
    return typeof maybeFunc === "function";
  }
  function UnconnectedDropdownMenu(dropdownMenuProps) {
    const {
      children,
      className: className2,
      controls,
      icon = menu_default,
      label,
      popoverProps,
      toggleProps,
      menuProps,
      disableOpenOnArrowDown = false,
      text,
      noIcons,
      open,
      defaultOpen,
      onToggle: onToggleProp,
      // Context
      variant
    } = useContextSystem(dropdownMenuProps, "DropdownMenu");
    if (!controls?.length && !isFunction2(children)) {
      return null;
    }
    let controlSets;
    if (controls?.length) {
      controlSets = controls;
      if (!Array.isArray(controlSets[0])) {
        controlSets = [controls];
      }
    }
    const mergedPopoverProps = mergeProps2({
      className: "components-dropdown-menu__popover",
      variant
    }, popoverProps);
    return /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(dropdown_default, {
      className: className2,
      popoverProps: mergedPopoverProps,
      renderToggle: ({
        isOpen,
        onToggle
      }) => {
        const openOnArrowDown = (event) => {
          if (disableOpenOnArrowDown) {
            return;
          }
          if (!isOpen && event.code === "ArrowDown") {
            event.preventDefault();
            onToggle();
          }
        };
        const {
          as: Toggle = button_default,
          ...restToggleProps
        } = toggleProps ?? {};
        const mergedToggleProps = mergeProps2({
          className: clsx_default("components-dropdown-menu__toggle", {
            "is-opened": isOpen
          })
        }, restToggleProps);
        return /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(Toggle, {
          ...mergedToggleProps,
          icon,
          onClick: (event) => {
            onToggle();
            if (mergedToggleProps.onClick) {
              mergedToggleProps.onClick(event);
            }
          },
          onKeyDown: (event) => {
            openOnArrowDown(event);
            if (mergedToggleProps.onKeyDown) {
              mergedToggleProps.onKeyDown(event);
            }
          },
          "aria-haspopup": "true",
          "aria-expanded": isOpen,
          label,
          text,
          showTooltip: toggleProps?.showTooltip ?? true,
          children: mergedToggleProps.children
        });
      },
      renderContent: (props) => {
        const mergedMenuProps = mergeProps2({
          "aria-label": label,
          className: clsx_default("components-dropdown-menu__menu", {
            "no-icons": noIcons
          })
        }, menuProps);
        return /* @__PURE__ */ (0, import_jsx_runtime180.jsxs)(menu_default2, {
          ...mergedMenuProps,
          role: "menu",
          children: [isFunction2(children) ? children(props) : null, controlSets?.flatMap((controlSet, indexOfSet) => controlSet.map((control, indexOfControl) => /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(button_default, {
            size: "compact",
            onClick: (event) => {
              event.stopPropagation();
              props.onClose();
              if (control.onClick) {
                control.onClick();
              }
            },
            className: clsx_default("components-dropdown-menu__menu-item", {
              "has-separator": indexOfSet > 0 && indexOfControl === 0,
              "is-active": control.isActive,
              "is-icon-only": !control.title
            }),
            icon: control.icon,
            label: control.label,
            "aria-checked": control.role === "menuitemcheckbox" || control.role === "menuitemradio" ? control.isActive : void 0,
            role: control.role === "menuitemcheckbox" || control.role === "menuitemradio" ? control.role : "menuitem",
            accessibleWhenDisabled: true,
            disabled: control.isDisabled,
            children: control.title
          }, [indexOfSet, indexOfControl].join())))]
        });
      },
      open,
      defaultOpen,
      onToggle: onToggleProp
    });
  }
  var DropdownMenu = contextConnectWithoutRef(UnconnectedDropdownMenu, "DropdownMenu");
  var dropdown_menu_default = DropdownMenu;

  // packages/components/build-module/palette-edit/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__24() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var IndicatorStyled = /* @__PURE__ */ createStyled(color_indicator_default, false ? {
    target: "e1lpqc908"
  } : {
    target: "e1lpqc908",
    label: "IndicatorStyled"
  })("&&{flex-shrink:0;width:", space(6), ";height:", space(6), ";}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQnVEIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IEJ1dHRvbiBmcm9tICcuLi9idXR0b24nO1xuaW1wb3J0IHsgSGVhZGluZyB9IGZyb20gJy4uL2hlYWRpbmcnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IFZpZXcgfSBmcm9tICcuLi92aWV3JztcbmltcG9ydCBJbnB1dENvbnRyb2wgZnJvbSAnLi4vaW5wdXQtY29udHJvbCc7XG5pbXBvcnQge1xuXHRDb250YWluZXIgYXMgSW5wdXRDb250cm9sQ29udGFpbmVyLFxuXHRJbnB1dCxcblx0QmFja2Ryb3BVSSBhcyBJbnB1dEJhY2tkcm9wVUksXG59IGZyb20gJy4uL2lucHV0LWNvbnRyb2wvc3R5bGVzL2lucHV0LWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCBDb2xvckluZGljYXRvciBmcm9tICcuLi9jb2xvci1pbmRpY2F0b3InO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU3R5bGVkID0gc3R5bGVkKCBDb2xvckluZGljYXRvciApYFxuXHQmJiB7XG5cdFx0ZmxleC1zaHJpbms6IDA7XG5cdFx0d2lkdGg6ICR7IHNwYWNlKCA2ICkgfTtcblx0XHRoZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IE5hbWVJbnB1dENvbnRyb2wgPSBzdHlsZWQoIElucHV0Q29udHJvbCApYFxuXHQkeyBJbnB1dENvbnRyb2xDb250YWluZXIgfSB7XG5cdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLmdyYXlbIDEwMCBdIH07XG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1hTbWFsbCB9O1xuXHRcdCR7IElucHV0IH0keyBJbnB1dCB9JHsgSW5wdXQgfSR7IElucHV0IH0ge1xuXHRcdFx0aGVpZ2h0OiAkeyBzcGFjZSggOCApIH07XG5cdFx0fVxuXHRcdCR7IElucHV0QmFja2Ryb3BVSSB9JHsgSW5wdXRCYWNrZHJvcFVJIH0keyBJbnB1dEJhY2tkcm9wVUkgfSB7XG5cdFx0XHRib3JkZXItY29sb3I6IHRyYW5zcGFyZW50O1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHR9XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBOYW1lQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0bGluZS1oZWlnaHQ6ICR7IHNwYWNlKCA4ICkgfTtcblx0bWFyZ2luLWxlZnQ6ICR7IHNwYWNlKCAyICkgfTtcblx0bWFyZ2luLXJpZ2h0OiAkeyBzcGFjZSggMiApIH07XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cdG92ZXJmbG93OiBoaWRkZW47XG5gO1xuXG5leHBvcnQgY29uc3QgUGFsZXR0ZUhlYWRpbmcgPSBzdHlsZWQoIEhlYWRpbmcgKWBcblx0dGV4dC10cmFuc2Zvcm06IHVwcGVyY2FzZTtcblx0bGluZS1oZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdCYmJiB7XG5cdFx0Zm9udC1zaXplOiAxMXB4O1xuXHRcdG1hcmdpbi1ib3R0b206IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlQWN0aW9uc0NvbnRhaW5lciA9IHN0eWxlZCggVmlldyApYFxuXHRoZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlRWRpdENvbnRlbnRzID0gc3R5bGVkKCBWaWV3IClgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlRWRpdFN0eWxlcyA9IHN0eWxlZCggVmlldyApYFxuXHQmJiYge1xuXHRcdC5jb21wb25lbnRzLWJ1dHRvbi5oYXMtaWNvbiB7XG5cdFx0XHRtaW4td2lkdGg6IDA7XG5cdFx0XHRwYWRkaW5nOiAwO1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IERvbmVCdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHQmJiB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFJlbW92ZUJ1dHRvbiA9IHN0eWxlZCggQnV0dG9uIClgXG5cdCYmIHtcblx0XHRtYXJnaW4tdG9wOiAkeyBzcGFjZSggMSApIH07XG5cdH1cbmA7XG4iXX0= */"));
  var NameInputControl = /* @__PURE__ */ createStyled(input_control_default, false ? {
    target: "e1lpqc907"
  } : {
    target: "e1lpqc907",
    label: "NameInputControl"
  })(Container, "{background:", COLORS.gray[100], ";border-radius:", config_values_default.radiusXSmall, ";", Input, Input, Input, Input, "{height:", space(8), ";}", BackdropUI, BackdropUI, BackdropUI, "{border-color:transparent;box-shadow:none;}}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE2QnNEIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IEJ1dHRvbiBmcm9tICcuLi9idXR0b24nO1xuaW1wb3J0IHsgSGVhZGluZyB9IGZyb20gJy4uL2hlYWRpbmcnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IFZpZXcgfSBmcm9tICcuLi92aWV3JztcbmltcG9ydCBJbnB1dENvbnRyb2wgZnJvbSAnLi4vaW5wdXQtY29udHJvbCc7XG5pbXBvcnQge1xuXHRDb250YWluZXIgYXMgSW5wdXRDb250cm9sQ29udGFpbmVyLFxuXHRJbnB1dCxcblx0QmFja2Ryb3BVSSBhcyBJbnB1dEJhY2tkcm9wVUksXG59IGZyb20gJy4uL2lucHV0LWNvbnRyb2wvc3R5bGVzL2lucHV0LWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCBDb2xvckluZGljYXRvciBmcm9tICcuLi9jb2xvci1pbmRpY2F0b3InO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU3R5bGVkID0gc3R5bGVkKCBDb2xvckluZGljYXRvciApYFxuXHQmJiB7XG5cdFx0ZmxleC1zaHJpbms6IDA7XG5cdFx0d2lkdGg6ICR7IHNwYWNlKCA2ICkgfTtcblx0XHRoZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IE5hbWVJbnB1dENvbnRyb2wgPSBzdHlsZWQoIElucHV0Q29udHJvbCApYFxuXHQkeyBJbnB1dENvbnRyb2xDb250YWluZXIgfSB7XG5cdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLmdyYXlbIDEwMCBdIH07XG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1hTbWFsbCB9O1xuXHRcdCR7IElucHV0IH0keyBJbnB1dCB9JHsgSW5wdXQgfSR7IElucHV0IH0ge1xuXHRcdFx0aGVpZ2h0OiAkeyBzcGFjZSggOCApIH07XG5cdFx0fVxuXHRcdCR7IElucHV0QmFja2Ryb3BVSSB9JHsgSW5wdXRCYWNrZHJvcFVJIH0keyBJbnB1dEJhY2tkcm9wVUkgfSB7XG5cdFx0XHRib3JkZXItY29sb3I6IHRyYW5zcGFyZW50O1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHR9XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBOYW1lQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0bGluZS1oZWlnaHQ6ICR7IHNwYWNlKCA4ICkgfTtcblx0bWFyZ2luLWxlZnQ6ICR7IHNwYWNlKCAyICkgfTtcblx0bWFyZ2luLXJpZ2h0OiAkeyBzcGFjZSggMiApIH07XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cdG92ZXJmbG93OiBoaWRkZW47XG5gO1xuXG5leHBvcnQgY29uc3QgUGFsZXR0ZUhlYWRpbmcgPSBzdHlsZWQoIEhlYWRpbmcgKWBcblx0dGV4dC10cmFuc2Zvcm06IHVwcGVyY2FzZTtcblx0bGluZS1oZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdCYmJiB7XG5cdFx0Zm9udC1zaXplOiAxMXB4O1xuXHRcdG1hcmdpbi1ib3R0b206IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlQWN0aW9uc0NvbnRhaW5lciA9IHN0eWxlZCggVmlldyApYFxuXHRoZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlRWRpdENvbnRlbnRzID0gc3R5bGVkKCBWaWV3IClgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlRWRpdFN0eWxlcyA9IHN0eWxlZCggVmlldyApYFxuXHQmJiYge1xuXHRcdC5jb21wb25lbnRzLWJ1dHRvbi5oYXMtaWNvbiB7XG5cdFx0XHRtaW4td2lkdGg6IDA7XG5cdFx0XHRwYWRkaW5nOiAwO1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IERvbmVCdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHQmJiB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFJlbW92ZUJ1dHRvbiA9IHN0eWxlZCggQnV0dG9uIClgXG5cdCYmIHtcblx0XHRtYXJnaW4tdG9wOiAkeyBzcGFjZSggMSApIH07XG5cdH1cbmA7XG4iXX0= */"));
  var NameContainer = /* @__PURE__ */ createStyled("div", false ? {
    target: "e1lpqc906"
  } : {
    target: "e1lpqc906",
    label: "NameContainer"
  })("line-height:", space(8), ";margin-left:", space(2), ";margin-right:", space(2), ";white-space:nowrap;overflow:hidden;" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyQ3VDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IEJ1dHRvbiBmcm9tICcuLi9idXR0b24nO1xuaW1wb3J0IHsgSGVhZGluZyB9IGZyb20gJy4uL2hlYWRpbmcnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IFZpZXcgfSBmcm9tICcuLi92aWV3JztcbmltcG9ydCBJbnB1dENvbnRyb2wgZnJvbSAnLi4vaW5wdXQtY29udHJvbCc7XG5pbXBvcnQge1xuXHRDb250YWluZXIgYXMgSW5wdXRDb250cm9sQ29udGFpbmVyLFxuXHRJbnB1dCxcblx0QmFja2Ryb3BVSSBhcyBJbnB1dEJhY2tkcm9wVUksXG59IGZyb20gJy4uL2lucHV0LWNvbnRyb2wvc3R5bGVzL2lucHV0LWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCBDb2xvckluZGljYXRvciBmcm9tICcuLi9jb2xvci1pbmRpY2F0b3InO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU3R5bGVkID0gc3R5bGVkKCBDb2xvckluZGljYXRvciApYFxuXHQmJiB7XG5cdFx0ZmxleC1zaHJpbms6IDA7XG5cdFx0d2lkdGg6ICR7IHNwYWNlKCA2ICkgfTtcblx0XHRoZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IE5hbWVJbnB1dENvbnRyb2wgPSBzdHlsZWQoIElucHV0Q29udHJvbCApYFxuXHQkeyBJbnB1dENvbnRyb2xDb250YWluZXIgfSB7XG5cdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLmdyYXlbIDEwMCBdIH07XG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1hTbWFsbCB9O1xuXHRcdCR7IElucHV0IH0keyBJbnB1dCB9JHsgSW5wdXQgfSR7IElucHV0IH0ge1xuXHRcdFx0aGVpZ2h0OiAkeyBzcGFjZSggOCApIH07XG5cdFx0fVxuXHRcdCR7IElucHV0QmFja2Ryb3BVSSB9JHsgSW5wdXRCYWNrZHJvcFVJIH0keyBJbnB1dEJhY2tkcm9wVUkgfSB7XG5cdFx0XHRib3JkZXItY29sb3I6IHRyYW5zcGFyZW50O1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHR9XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBOYW1lQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0bGluZS1oZWlnaHQ6ICR7IHNwYWNlKCA4ICkgfTtcblx0bWFyZ2luLWxlZnQ6ICR7IHNwYWNlKCAyICkgfTtcblx0bWFyZ2luLXJpZ2h0OiAkeyBzcGFjZSggMiApIH07XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cdG92ZXJmbG93OiBoaWRkZW47XG5gO1xuXG5leHBvcnQgY29uc3QgUGFsZXR0ZUhlYWRpbmcgPSBzdHlsZWQoIEhlYWRpbmcgKWBcblx0dGV4dC10cmFuc2Zvcm06IHVwcGVyY2FzZTtcblx0bGluZS1oZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdCYmJiB7XG5cdFx0Zm9udC1zaXplOiAxMXB4O1xuXHRcdG1hcmdpbi1ib3R0b206IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlQWN0aW9uc0NvbnRhaW5lciA9IHN0eWxlZCggVmlldyApYFxuXHRoZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlRWRpdENvbnRlbnRzID0gc3R5bGVkKCBWaWV3IClgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlRWRpdFN0eWxlcyA9IHN0eWxlZCggVmlldyApYFxuXHQmJiYge1xuXHRcdC5jb21wb25lbnRzLWJ1dHRvbi5oYXMtaWNvbiB7XG5cdFx0XHRtaW4td2lkdGg6IDA7XG5cdFx0XHRwYWRkaW5nOiAwO1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IERvbmVCdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHQmJiB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFJlbW92ZUJ1dHRvbiA9IHN0eWxlZCggQnV0dG9uIClgXG5cdCYmIHtcblx0XHRtYXJnaW4tdG9wOiAkeyBzcGFjZSggMSApIH07XG5cdH1cbmA7XG4iXX0= */"));
  var PaletteHeading = /* @__PURE__ */ createStyled(component_default19, false ? {
    target: "e1lpqc905"
  } : {
    target: "e1lpqc905",
    label: "PaletteHeading"
  })("text-transform:uppercase;line-height:", space(6), ";font-weight:", config_values_default.fontWeightMedium, ";&&&{font-size:11px;margin-bottom:0;}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtRCtDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IEJ1dHRvbiBmcm9tICcuLi9idXR0b24nO1xuaW1wb3J0IHsgSGVhZGluZyB9IGZyb20gJy4uL2hlYWRpbmcnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IFZpZXcgfSBmcm9tICcuLi92aWV3JztcbmltcG9ydCBJbnB1dENvbnRyb2wgZnJvbSAnLi4vaW5wdXQtY29udHJvbCc7XG5pbXBvcnQge1xuXHRDb250YWluZXIgYXMgSW5wdXRDb250cm9sQ29udGFpbmVyLFxuXHRJbnB1dCxcblx0QmFja2Ryb3BVSSBhcyBJbnB1dEJhY2tkcm9wVUksXG59IGZyb20gJy4uL2lucHV0LWNvbnRyb2wvc3R5bGVzL2lucHV0LWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCBDb2xvckluZGljYXRvciBmcm9tICcuLi9jb2xvci1pbmRpY2F0b3InO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU3R5bGVkID0gc3R5bGVkKCBDb2xvckluZGljYXRvciApYFxuXHQmJiB7XG5cdFx0ZmxleC1zaHJpbms6IDA7XG5cdFx0d2lkdGg6ICR7IHNwYWNlKCA2ICkgfTtcblx0XHRoZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IE5hbWVJbnB1dENvbnRyb2wgPSBzdHlsZWQoIElucHV0Q29udHJvbCApYFxuXHQkeyBJbnB1dENvbnRyb2xDb250YWluZXIgfSB7XG5cdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLmdyYXlbIDEwMCBdIH07XG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1hTbWFsbCB9O1xuXHRcdCR7IElucHV0IH0keyBJbnB1dCB9JHsgSW5wdXQgfSR7IElucHV0IH0ge1xuXHRcdFx0aGVpZ2h0OiAkeyBzcGFjZSggOCApIH07XG5cdFx0fVxuXHRcdCR7IElucHV0QmFja2Ryb3BVSSB9JHsgSW5wdXRCYWNrZHJvcFVJIH0keyBJbnB1dEJhY2tkcm9wVUkgfSB7XG5cdFx0XHRib3JkZXItY29sb3I6IHRyYW5zcGFyZW50O1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHR9XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBOYW1lQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0bGluZS1oZWlnaHQ6ICR7IHNwYWNlKCA4ICkgfTtcblx0bWFyZ2luLWxlZnQ6ICR7IHNwYWNlKCAyICkgfTtcblx0bWFyZ2luLXJpZ2h0OiAkeyBzcGFjZSggMiApIH07XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cdG92ZXJmbG93OiBoaWRkZW47XG5gO1xuXG5leHBvcnQgY29uc3QgUGFsZXR0ZUhlYWRpbmcgPSBzdHlsZWQoIEhlYWRpbmcgKWBcblx0dGV4dC10cmFuc2Zvcm06IHVwcGVyY2FzZTtcblx0bGluZS1oZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdCYmJiB7XG5cdFx0Zm9udC1zaXplOiAxMXB4O1xuXHRcdG1hcmdpbi1ib3R0b206IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlQWN0aW9uc0NvbnRhaW5lciA9IHN0eWxlZCggVmlldyApYFxuXHRoZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlRWRpdENvbnRlbnRzID0gc3R5bGVkKCBWaWV3IClgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlRWRpdFN0eWxlcyA9IHN0eWxlZCggVmlldyApYFxuXHQmJiYge1xuXHRcdC5jb21wb25lbnRzLWJ1dHRvbi5oYXMtaWNvbiB7XG5cdFx0XHRtaW4td2lkdGg6IDA7XG5cdFx0XHRwYWRkaW5nOiAwO1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IERvbmVCdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHQmJiB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFJlbW92ZUJ1dHRvbiA9IHN0eWxlZCggQnV0dG9uIClgXG5cdCYmIHtcblx0XHRtYXJnaW4tdG9wOiAkeyBzcGFjZSggMSApIH07XG5cdH1cbmA7XG4iXX0= */"));
  var PaletteActionsContainer = /* @__PURE__ */ createStyled(component_default, false ? {
    target: "e1lpqc904"
  } : {
    target: "e1lpqc904",
    label: "PaletteActionsContainer"
  })("height:", space(6), ";display:flex;" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE2RHFEIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IEJ1dHRvbiBmcm9tICcuLi9idXR0b24nO1xuaW1wb3J0IHsgSGVhZGluZyB9IGZyb20gJy4uL2hlYWRpbmcnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IFZpZXcgfSBmcm9tICcuLi92aWV3JztcbmltcG9ydCBJbnB1dENvbnRyb2wgZnJvbSAnLi4vaW5wdXQtY29udHJvbCc7XG5pbXBvcnQge1xuXHRDb250YWluZXIgYXMgSW5wdXRDb250cm9sQ29udGFpbmVyLFxuXHRJbnB1dCxcblx0QmFja2Ryb3BVSSBhcyBJbnB1dEJhY2tkcm9wVUksXG59IGZyb20gJy4uL2lucHV0LWNvbnRyb2wvc3R5bGVzL2lucHV0LWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCBDb2xvckluZGljYXRvciBmcm9tICcuLi9jb2xvci1pbmRpY2F0b3InO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU3R5bGVkID0gc3R5bGVkKCBDb2xvckluZGljYXRvciApYFxuXHQmJiB7XG5cdFx0ZmxleC1zaHJpbms6IDA7XG5cdFx0d2lkdGg6ICR7IHNwYWNlKCA2ICkgfTtcblx0XHRoZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IE5hbWVJbnB1dENvbnRyb2wgPSBzdHlsZWQoIElucHV0Q29udHJvbCApYFxuXHQkeyBJbnB1dENvbnRyb2xDb250YWluZXIgfSB7XG5cdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLmdyYXlbIDEwMCBdIH07XG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1hTbWFsbCB9O1xuXHRcdCR7IElucHV0IH0keyBJbnB1dCB9JHsgSW5wdXQgfSR7IElucHV0IH0ge1xuXHRcdFx0aGVpZ2h0OiAkeyBzcGFjZSggOCApIH07XG5cdFx0fVxuXHRcdCR7IElucHV0QmFja2Ryb3BVSSB9JHsgSW5wdXRCYWNrZHJvcFVJIH0keyBJbnB1dEJhY2tkcm9wVUkgfSB7XG5cdFx0XHRib3JkZXItY29sb3I6IHRyYW5zcGFyZW50O1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHR9XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBOYW1lQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0bGluZS1oZWlnaHQ6ICR7IHNwYWNlKCA4ICkgfTtcblx0bWFyZ2luLWxlZnQ6ICR7IHNwYWNlKCAyICkgfTtcblx0bWFyZ2luLXJpZ2h0OiAkeyBzcGFjZSggMiApIH07XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cdG92ZXJmbG93OiBoaWRkZW47XG5gO1xuXG5leHBvcnQgY29uc3QgUGFsZXR0ZUhlYWRpbmcgPSBzdHlsZWQoIEhlYWRpbmcgKWBcblx0dGV4dC10cmFuc2Zvcm06IHVwcGVyY2FzZTtcblx0bGluZS1oZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdCYmJiB7XG5cdFx0Zm9udC1zaXplOiAxMXB4O1xuXHRcdG1hcmdpbi1ib3R0b206IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlQWN0aW9uc0NvbnRhaW5lciA9IHN0eWxlZCggVmlldyApYFxuXHRoZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlRWRpdENvbnRlbnRzID0gc3R5bGVkKCBWaWV3IClgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlRWRpdFN0eWxlcyA9IHN0eWxlZCggVmlldyApYFxuXHQmJiYge1xuXHRcdC5jb21wb25lbnRzLWJ1dHRvbi5oYXMtaWNvbiB7XG5cdFx0XHRtaW4td2lkdGg6IDA7XG5cdFx0XHRwYWRkaW5nOiAwO1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IERvbmVCdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHQmJiB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFJlbW92ZUJ1dHRvbiA9IHN0eWxlZCggQnV0dG9uIClgXG5cdCYmIHtcblx0XHRtYXJnaW4tdG9wOiAkeyBzcGFjZSggMSApIH07XG5cdH1cbmA7XG4iXX0= */"));
  var PaletteEditContents = /* @__PURE__ */ createStyled(component_default, false ? {
    target: "e1lpqc903"
  } : {
    target: "e1lpqc903",
    label: "PaletteEditContents"
  })("margin-top:", space(2), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrRWlEIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IEJ1dHRvbiBmcm9tICcuLi9idXR0b24nO1xuaW1wb3J0IHsgSGVhZGluZyB9IGZyb20gJy4uL2hlYWRpbmcnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IFZpZXcgfSBmcm9tICcuLi92aWV3JztcbmltcG9ydCBJbnB1dENvbnRyb2wgZnJvbSAnLi4vaW5wdXQtY29udHJvbCc7XG5pbXBvcnQge1xuXHRDb250YWluZXIgYXMgSW5wdXRDb250cm9sQ29udGFpbmVyLFxuXHRJbnB1dCxcblx0QmFja2Ryb3BVSSBhcyBJbnB1dEJhY2tkcm9wVUksXG59IGZyb20gJy4uL2lucHV0LWNvbnRyb2wvc3R5bGVzL2lucHV0LWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCBDb2xvckluZGljYXRvciBmcm9tICcuLi9jb2xvci1pbmRpY2F0b3InO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU3R5bGVkID0gc3R5bGVkKCBDb2xvckluZGljYXRvciApYFxuXHQmJiB7XG5cdFx0ZmxleC1zaHJpbms6IDA7XG5cdFx0d2lkdGg6ICR7IHNwYWNlKCA2ICkgfTtcblx0XHRoZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IE5hbWVJbnB1dENvbnRyb2wgPSBzdHlsZWQoIElucHV0Q29udHJvbCApYFxuXHQkeyBJbnB1dENvbnRyb2xDb250YWluZXIgfSB7XG5cdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLmdyYXlbIDEwMCBdIH07XG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1hTbWFsbCB9O1xuXHRcdCR7IElucHV0IH0keyBJbnB1dCB9JHsgSW5wdXQgfSR7IElucHV0IH0ge1xuXHRcdFx0aGVpZ2h0OiAkeyBzcGFjZSggOCApIH07XG5cdFx0fVxuXHRcdCR7IElucHV0QmFja2Ryb3BVSSB9JHsgSW5wdXRCYWNrZHJvcFVJIH0keyBJbnB1dEJhY2tkcm9wVUkgfSB7XG5cdFx0XHRib3JkZXItY29sb3I6IHRyYW5zcGFyZW50O1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHR9XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBOYW1lQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0bGluZS1oZWlnaHQ6ICR7IHNwYWNlKCA4ICkgfTtcblx0bWFyZ2luLWxlZnQ6ICR7IHNwYWNlKCAyICkgfTtcblx0bWFyZ2luLXJpZ2h0OiAkeyBzcGFjZSggMiApIH07XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cdG92ZXJmbG93OiBoaWRkZW47XG5gO1xuXG5leHBvcnQgY29uc3QgUGFsZXR0ZUhlYWRpbmcgPSBzdHlsZWQoIEhlYWRpbmcgKWBcblx0dGV4dC10cmFuc2Zvcm06IHVwcGVyY2FzZTtcblx0bGluZS1oZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdCYmJiB7XG5cdFx0Zm9udC1zaXplOiAxMXB4O1xuXHRcdG1hcmdpbi1ib3R0b206IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlQWN0aW9uc0NvbnRhaW5lciA9IHN0eWxlZCggVmlldyApYFxuXHRoZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlRWRpdENvbnRlbnRzID0gc3R5bGVkKCBWaWV3IClgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlRWRpdFN0eWxlcyA9IHN0eWxlZCggVmlldyApYFxuXHQmJiYge1xuXHRcdC5jb21wb25lbnRzLWJ1dHRvbi5oYXMtaWNvbiB7XG5cdFx0XHRtaW4td2lkdGg6IDA7XG5cdFx0XHRwYWRkaW5nOiAwO1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IERvbmVCdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHQmJiB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFJlbW92ZUJ1dHRvbiA9IHN0eWxlZCggQnV0dG9uIClgXG5cdCYmIHtcblx0XHRtYXJnaW4tdG9wOiAkeyBzcGFjZSggMSApIH07XG5cdH1cbmA7XG4iXX0= */"));
  var PaletteEditStyles = /* @__PURE__ */ createStyled(component_default, false ? {
    target: "e1lpqc902"
  } : {
    target: "e1lpqc902",
    label: "PaletteEditStyles"
  })(false ? {
    name: "u6wnko",
    styles: "&&&{.components-button.has-icon{min-width:0;padding:0;}}"
  } : {
    name: "u6wnko",
    styles: "&&&{.components-button.has-icon{min-width:0;padding:0;}}/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzRStDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IEJ1dHRvbiBmcm9tICcuLi9idXR0b24nO1xuaW1wb3J0IHsgSGVhZGluZyB9IGZyb20gJy4uL2hlYWRpbmcnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IFZpZXcgfSBmcm9tICcuLi92aWV3JztcbmltcG9ydCBJbnB1dENvbnRyb2wgZnJvbSAnLi4vaW5wdXQtY29udHJvbCc7XG5pbXBvcnQge1xuXHRDb250YWluZXIgYXMgSW5wdXRDb250cm9sQ29udGFpbmVyLFxuXHRJbnB1dCxcblx0QmFja2Ryb3BVSSBhcyBJbnB1dEJhY2tkcm9wVUksXG59IGZyb20gJy4uL2lucHV0LWNvbnRyb2wvc3R5bGVzL2lucHV0LWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCBDb2xvckluZGljYXRvciBmcm9tICcuLi9jb2xvci1pbmRpY2F0b3InO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU3R5bGVkID0gc3R5bGVkKCBDb2xvckluZGljYXRvciApYFxuXHQmJiB7XG5cdFx0ZmxleC1zaHJpbms6IDA7XG5cdFx0d2lkdGg6ICR7IHNwYWNlKCA2ICkgfTtcblx0XHRoZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IE5hbWVJbnB1dENvbnRyb2wgPSBzdHlsZWQoIElucHV0Q29udHJvbCApYFxuXHQkeyBJbnB1dENvbnRyb2xDb250YWluZXIgfSB7XG5cdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLmdyYXlbIDEwMCBdIH07XG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1hTbWFsbCB9O1xuXHRcdCR7IElucHV0IH0keyBJbnB1dCB9JHsgSW5wdXQgfSR7IElucHV0IH0ge1xuXHRcdFx0aGVpZ2h0OiAkeyBzcGFjZSggOCApIH07XG5cdFx0fVxuXHRcdCR7IElucHV0QmFja2Ryb3BVSSB9JHsgSW5wdXRCYWNrZHJvcFVJIH0keyBJbnB1dEJhY2tkcm9wVUkgfSB7XG5cdFx0XHRib3JkZXItY29sb3I6IHRyYW5zcGFyZW50O1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHR9XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBOYW1lQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0bGluZS1oZWlnaHQ6ICR7IHNwYWNlKCA4ICkgfTtcblx0bWFyZ2luLWxlZnQ6ICR7IHNwYWNlKCAyICkgfTtcblx0bWFyZ2luLXJpZ2h0OiAkeyBzcGFjZSggMiApIH07XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cdG92ZXJmbG93OiBoaWRkZW47XG5gO1xuXG5leHBvcnQgY29uc3QgUGFsZXR0ZUhlYWRpbmcgPSBzdHlsZWQoIEhlYWRpbmcgKWBcblx0dGV4dC10cmFuc2Zvcm06IHVwcGVyY2FzZTtcblx0bGluZS1oZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdCYmJiB7XG5cdFx0Zm9udC1zaXplOiAxMXB4O1xuXHRcdG1hcmdpbi1ib3R0b206IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlQWN0aW9uc0NvbnRhaW5lciA9IHN0eWxlZCggVmlldyApYFxuXHRoZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlRWRpdENvbnRlbnRzID0gc3R5bGVkKCBWaWV3IClgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlRWRpdFN0eWxlcyA9IHN0eWxlZCggVmlldyApYFxuXHQmJiYge1xuXHRcdC5jb21wb25lbnRzLWJ1dHRvbi5oYXMtaWNvbiB7XG5cdFx0XHRtaW4td2lkdGg6IDA7XG5cdFx0XHRwYWRkaW5nOiAwO1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IERvbmVCdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHQmJiB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFJlbW92ZUJ1dHRvbiA9IHN0eWxlZCggQnV0dG9uIClgXG5cdCYmIHtcblx0XHRtYXJnaW4tdG9wOiAkeyBzcGFjZSggMSApIH07XG5cdH1cbmA7XG4iXX0= */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__24
  });
  var DoneButton = /* @__PURE__ */ createStyled(button_default, false ? {
    target: "e1lpqc901"
  } : {
    target: "e1lpqc901",
    label: "DoneButton"
  })("&&{color:", COLORS.theme.accent, ";}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUErRTBDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IEJ1dHRvbiBmcm9tICcuLi9idXR0b24nO1xuaW1wb3J0IHsgSGVhZGluZyB9IGZyb20gJy4uL2hlYWRpbmcnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IFZpZXcgfSBmcm9tICcuLi92aWV3JztcbmltcG9ydCBJbnB1dENvbnRyb2wgZnJvbSAnLi4vaW5wdXQtY29udHJvbCc7XG5pbXBvcnQge1xuXHRDb250YWluZXIgYXMgSW5wdXRDb250cm9sQ29udGFpbmVyLFxuXHRJbnB1dCxcblx0QmFja2Ryb3BVSSBhcyBJbnB1dEJhY2tkcm9wVUksXG59IGZyb20gJy4uL2lucHV0LWNvbnRyb2wvc3R5bGVzL2lucHV0LWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCBDb2xvckluZGljYXRvciBmcm9tICcuLi9jb2xvci1pbmRpY2F0b3InO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU3R5bGVkID0gc3R5bGVkKCBDb2xvckluZGljYXRvciApYFxuXHQmJiB7XG5cdFx0ZmxleC1zaHJpbms6IDA7XG5cdFx0d2lkdGg6ICR7IHNwYWNlKCA2ICkgfTtcblx0XHRoZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IE5hbWVJbnB1dENvbnRyb2wgPSBzdHlsZWQoIElucHV0Q29udHJvbCApYFxuXHQkeyBJbnB1dENvbnRyb2xDb250YWluZXIgfSB7XG5cdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLmdyYXlbIDEwMCBdIH07XG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1hTbWFsbCB9O1xuXHRcdCR7IElucHV0IH0keyBJbnB1dCB9JHsgSW5wdXQgfSR7IElucHV0IH0ge1xuXHRcdFx0aGVpZ2h0OiAkeyBzcGFjZSggOCApIH07XG5cdFx0fVxuXHRcdCR7IElucHV0QmFja2Ryb3BVSSB9JHsgSW5wdXRCYWNrZHJvcFVJIH0keyBJbnB1dEJhY2tkcm9wVUkgfSB7XG5cdFx0XHRib3JkZXItY29sb3I6IHRyYW5zcGFyZW50O1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHR9XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBOYW1lQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0bGluZS1oZWlnaHQ6ICR7IHNwYWNlKCA4ICkgfTtcblx0bWFyZ2luLWxlZnQ6ICR7IHNwYWNlKCAyICkgfTtcblx0bWFyZ2luLXJpZ2h0OiAkeyBzcGFjZSggMiApIH07XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cdG92ZXJmbG93OiBoaWRkZW47XG5gO1xuXG5leHBvcnQgY29uc3QgUGFsZXR0ZUhlYWRpbmcgPSBzdHlsZWQoIEhlYWRpbmcgKWBcblx0dGV4dC10cmFuc2Zvcm06IHVwcGVyY2FzZTtcblx0bGluZS1oZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdCYmJiB7XG5cdFx0Zm9udC1zaXplOiAxMXB4O1xuXHRcdG1hcmdpbi1ib3R0b206IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlQWN0aW9uc0NvbnRhaW5lciA9IHN0eWxlZCggVmlldyApYFxuXHRoZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlRWRpdENvbnRlbnRzID0gc3R5bGVkKCBWaWV3IClgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlRWRpdFN0eWxlcyA9IHN0eWxlZCggVmlldyApYFxuXHQmJiYge1xuXHRcdC5jb21wb25lbnRzLWJ1dHRvbi5oYXMtaWNvbiB7XG5cdFx0XHRtaW4td2lkdGg6IDA7XG5cdFx0XHRwYWRkaW5nOiAwO1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IERvbmVCdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHQmJiB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFJlbW92ZUJ1dHRvbiA9IHN0eWxlZCggQnV0dG9uIClgXG5cdCYmIHtcblx0XHRtYXJnaW4tdG9wOiAkeyBzcGFjZSggMSApIH07XG5cdH1cbmA7XG4iXX0= */"));
  var RemoveButton = /* @__PURE__ */ createStyled(button_default, false ? {
    target: "e1lpqc900"
  } : {
    target: "e1lpqc900",
    label: "RemoveButton"
  })("&&{margin-top:", space(1), ";}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxRjRDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IEJ1dHRvbiBmcm9tICcuLi9idXR0b24nO1xuaW1wb3J0IHsgSGVhZGluZyB9IGZyb20gJy4uL2hlYWRpbmcnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IFZpZXcgfSBmcm9tICcuLi92aWV3JztcbmltcG9ydCBJbnB1dENvbnRyb2wgZnJvbSAnLi4vaW5wdXQtY29udHJvbCc7XG5pbXBvcnQge1xuXHRDb250YWluZXIgYXMgSW5wdXRDb250cm9sQ29udGFpbmVyLFxuXHRJbnB1dCxcblx0QmFja2Ryb3BVSSBhcyBJbnB1dEJhY2tkcm9wVUksXG59IGZyb20gJy4uL2lucHV0LWNvbnRyb2wvc3R5bGVzL2lucHV0LWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCBDb2xvckluZGljYXRvciBmcm9tICcuLi9jb2xvci1pbmRpY2F0b3InO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU3R5bGVkID0gc3R5bGVkKCBDb2xvckluZGljYXRvciApYFxuXHQmJiB7XG5cdFx0ZmxleC1zaHJpbms6IDA7XG5cdFx0d2lkdGg6ICR7IHNwYWNlKCA2ICkgfTtcblx0XHRoZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IE5hbWVJbnB1dENvbnRyb2wgPSBzdHlsZWQoIElucHV0Q29udHJvbCApYFxuXHQkeyBJbnB1dENvbnRyb2xDb250YWluZXIgfSB7XG5cdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLmdyYXlbIDEwMCBdIH07XG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1hTbWFsbCB9O1xuXHRcdCR7IElucHV0IH0keyBJbnB1dCB9JHsgSW5wdXQgfSR7IElucHV0IH0ge1xuXHRcdFx0aGVpZ2h0OiAkeyBzcGFjZSggOCApIH07XG5cdFx0fVxuXHRcdCR7IElucHV0QmFja2Ryb3BVSSB9JHsgSW5wdXRCYWNrZHJvcFVJIH0keyBJbnB1dEJhY2tkcm9wVUkgfSB7XG5cdFx0XHRib3JkZXItY29sb3I6IHRyYW5zcGFyZW50O1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHR9XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBOYW1lQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0bGluZS1oZWlnaHQ6ICR7IHNwYWNlKCA4ICkgfTtcblx0bWFyZ2luLWxlZnQ6ICR7IHNwYWNlKCAyICkgfTtcblx0bWFyZ2luLXJpZ2h0OiAkeyBzcGFjZSggMiApIH07XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cdG92ZXJmbG93OiBoaWRkZW47XG5gO1xuXG5leHBvcnQgY29uc3QgUGFsZXR0ZUhlYWRpbmcgPSBzdHlsZWQoIEhlYWRpbmcgKWBcblx0dGV4dC10cmFuc2Zvcm06IHVwcGVyY2FzZTtcblx0bGluZS1oZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdCYmJiB7XG5cdFx0Zm9udC1zaXplOiAxMXB4O1xuXHRcdG1hcmdpbi1ib3R0b206IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlQWN0aW9uc0NvbnRhaW5lciA9IHN0eWxlZCggVmlldyApYFxuXHRoZWlnaHQ6ICR7IHNwYWNlKCA2ICkgfTtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlRWRpdENvbnRlbnRzID0gc3R5bGVkKCBWaWV3IClgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBQYWxldHRlRWRpdFN0eWxlcyA9IHN0eWxlZCggVmlldyApYFxuXHQmJiYge1xuXHRcdC5jb21wb25lbnRzLWJ1dHRvbi5oYXMtaWNvbiB7XG5cdFx0XHRtaW4td2lkdGg6IDA7XG5cdFx0XHRwYWRkaW5nOiAwO1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IERvbmVCdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHQmJiB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFJlbW92ZUJ1dHRvbiA9IHN0eWxlZCggQnV0dG9uIClgXG5cdCYmIHtcblx0XHRtYXJnaW4tdG9wOiAkeyBzcGFjZSggMSApIH07XG5cdH1cbmA7XG4iXX0= */"));

  // packages/components/build-module/palette-edit/index.mjs
  var import_jsx_runtime181 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_COLOR = "#000";
  function NameInput({
    value,
    onChange,
    label
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(NameInputControl, {
      size: "compact",
      label,
      hideLabelFromVision: true,
      value,
      onChange
    });
  }
  function deduplicateElementSlugs(elements2) {
    const slugCounts = {};
    return elements2.map((element) => {
      let newSlug;
      const {
        slug
      } = element;
      slugCounts[slug] = (slugCounts[slug] || 0) + 1;
      if (slugCounts[slug] > 1) {
        newSlug = `${slug}-${slugCounts[slug] - 1}`;
      }
      return {
        ...element,
        slug: newSlug ?? slug
      };
    });
  }
  function getNameAndSlugForPosition(elements2, slugPrefix) {
    const nameRegex = new RegExp(`^${slugPrefix}color-([\\d]+)$`);
    const position2 = elements2.reduce((previousValue, currentValue) => {
      if (typeof currentValue?.slug === "string") {
        const matches = currentValue?.slug.match(nameRegex);
        if (matches) {
          const id3 = parseInt(matches[1], 10);
          if (id3 >= previousValue) {
            return id3 + 1;
          }
        }
      }
      return previousValue;
    }, 1);
    return {
      name: (0, import_i18n35.sprintf)(
        /* translators: %d: is an id for a custom color */
        (0, import_i18n35.__)("Color %d"),
        position2
      ),
      slug: `${slugPrefix}color-${position2}`
    };
  }
  function ColorPickerPopover({
    isGradient,
    element,
    onChange,
    popoverProps: receivedPopoverProps,
    onClose = () => {
    }
  }) {
    const popoverProps = (0, import_element115.useMemo)(() => ({
      shift: true,
      offset: 20,
      // Disabling resize as it would otherwise cause the popover to show
      // scrollbars while dragging the color picker's handle close to the
      // popover edge.
      resize: false,
      placement: "left-start",
      ...receivedPopoverProps,
      className: clsx_default("components-palette-edit__popover", receivedPopoverProps?.className)
    }), [receivedPopoverProps]);
    return /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(popover_default, {
      ...popoverProps,
      onClose,
      children: [!isGradient && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(LegacyAdapter, {
        color: element.color,
        enableAlpha: true,
        onChange: (newColor) => {
          onChange({
            ...element,
            color: newColor
          });
        }
      }), isGradient && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", {
        className: "components-palette-edit__popover-gradient-picker",
        children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(custom_gradient_picker_default, {
          __experimentalIsRenderedInSidebar: true,
          value: element.gradient,
          onChange: (newGradient) => {
            onChange({
              ...element,
              gradient: newGradient
            });
          }
        })
      })]
    });
  }
  function Option2({
    canOnlyChangeValues,
    element,
    onChange,
    onRemove,
    popoverProps: receivedPopoverProps,
    slugPrefix,
    isGradient
  }) {
    const value = isGradient ? element.gradient : element.color;
    const [isEditingColor, setIsEditingColor] = (0, import_element115.useState)(false);
    const [popoverAnchor, setPopoverAnchor] = (0, import_element115.useState)(null);
    const popoverProps = (0, import_element115.useMemo)(() => ({
      ...receivedPopoverProps,
      // Use the custom palette color item as the popover anchor.
      anchor: popoverAnchor
    }), [popoverAnchor, receivedPopoverProps]);
    return /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(component_default35, {
      ref: setPopoverAnchor,
      size: "small",
      children: [/* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(component_default9, {
        justify: "flex-start",
        children: [/* @__PURE__ */ (0, import_jsx_runtime181.jsx)(button_default, {
          size: "small",
          onClick: () => {
            setIsEditingColor(true);
          },
          "aria-label": (0, import_i18n35.sprintf)(
            // translators: %s is a color or gradient name, e.g. "Red".
            (0, import_i18n35.__)("Edit: %s"),
            element.name.trim().length ? element.name : value || ""
          ),
          style: {
            padding: 0
          },
          children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(IndicatorStyled, {
            colorValue: value
          })
        }), /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(component_default5, {
          children: !canOnlyChangeValues ? /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(NameInput, {
            label: isGradient ? (0, import_i18n35.__)("Gradient name") : (0, import_i18n35.__)("Color name"),
            value: element.name,
            onChange: (nextName) => onChange({
              ...element,
              name: nextName,
              slug: slugPrefix + kebabCase(nextName ?? "")
            })
          }) : /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(NameContainer, {
            children: element.name.trim().length ? element.name : (
              /* Fall back to non-breaking space to maintain height */
              "\xA0"
            )
          })
        }), !canOnlyChangeValues && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(component_default4, {
          children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(RemoveButton, {
            size: "small",
            icon: line_solid_default,
            label: (0, import_i18n35.sprintf)(
              // translators: %s is a color or gradient name, e.g. "Red".
              (0, import_i18n35.__)("Remove color: %s"),
              element.name.trim().length ? element.name : value || ""
            ),
            onClick: onRemove
          })
        })]
      }), isEditingColor && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(ColorPickerPopover, {
        isGradient,
        onChange,
        element,
        popoverProps,
        onClose: () => setIsEditingColor(false)
      })]
    });
  }
  function PaletteEditListView({
    elements: elements2,
    onChange,
    canOnlyChangeValues,
    slugPrefix,
    isGradient,
    popoverProps,
    addColorRef
  }) {
    const elementsReferenceRef = (0, import_element115.useRef)(void 0);
    (0, import_element115.useEffect)(() => {
      elementsReferenceRef.current = elements2;
    }, [elements2]);
    const debounceOnChange = (0, import_compose43.useDebounce)((updatedElements) => onChange(deduplicateElementSlugs(updatedElements)), 100);
    return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(component_default18, {
      spacing: 3,
      children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(component_default36, {
        isRounded: true,
        isBordered: true,
        isSeparated: true,
        children: elements2.map((element, index2) => /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(Option2, {
          isGradient,
          canOnlyChangeValues,
          element,
          onChange: (newElement) => {
            debounceOnChange(elements2.map((currentElement, currentIndex) => {
              if (currentIndex === index2) {
                return newElement;
              }
              return currentElement;
            }));
          },
          onRemove: () => {
            const newElements = elements2.filter((_currentElement, currentIndex) => {
              if (currentIndex === index2) {
                return false;
              }
              return true;
            });
            onChange(newElements.length ? newElements : void 0);
            addColorRef.current?.focus();
          },
          slugPrefix,
          popoverProps
        }, index2))
      })
    });
  }
  var EMPTY_ARRAY = [];
  function PaletteEdit({
    gradients,
    colors = EMPTY_ARRAY,
    onChange,
    paletteLabel,
    paletteLabelHeadingLevel = 2,
    emptyMessage,
    canOnlyChangeValues,
    canReset,
    slugPrefix = "",
    popoverProps
  }) {
    const isGradient = !!gradients;
    const elements2 = isGradient ? gradients : colors;
    const [isEditing, setIsEditing] = (0, import_element115.useState)(false);
    const [editingElement, setEditingElement] = (0, import_element115.useState)(null);
    const isAdding = isEditing && !!editingElement && elements2[editingElement] && !elements2[editingElement].slug;
    const elementsLength = elements2.length;
    const hasElements = elementsLength > 0;
    const debounceOnChange = (0, import_compose43.useDebounce)(onChange, 100);
    const onSelectPaletteItem = (0, import_element115.useCallback)((value, newEditingElementIndex) => {
      const selectedElement = newEditingElementIndex === void 0 ? void 0 : elements2[newEditingElementIndex];
      const key = isGradient ? "gradient" : "color";
      if (!!selectedElement && selectedElement[key] === value) {
        setEditingElement(newEditingElementIndex);
      } else {
        setIsEditing(true);
      }
    }, [isGradient, elements2]);
    const addColorRef = (0, import_element115.useRef)(null);
    return /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(PaletteEditStyles, {
      children: [/* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(component_default9, {
        children: [/* @__PURE__ */ (0, import_jsx_runtime181.jsx)(PaletteHeading, {
          level: paletteLabelHeadingLevel,
          children: paletteLabel
        }), /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(PaletteActionsContainer, {
          children: [hasElements && isEditing && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(DoneButton, {
            size: "small",
            onClick: () => {
              setIsEditing(false);
              setEditingElement(null);
            },
            children: (0, import_i18n35.__)("Done")
          }), !canOnlyChangeValues && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(button_default, {
            ref: addColorRef,
            size: "small",
            isPressed: isAdding,
            icon: plus_default,
            label: isGradient ? (0, import_i18n35.__)("Add gradient") : (0, import_i18n35.__)("Add color"),
            onClick: () => {
              const {
                name,
                slug
              } = getNameAndSlugForPosition(elements2, slugPrefix);
              if (!!gradients) {
                onChange([...gradients, {
                  gradient: DEFAULT_GRADIENT,
                  name,
                  slug
                }]);
              } else {
                onChange([...colors, {
                  color: DEFAULT_COLOR,
                  name,
                  slug
                }]);
              }
              setIsEditing(true);
              setEditingElement(elements2.length);
            }
          }), hasElements && (!isEditing || !canOnlyChangeValues || canReset) && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(dropdown_menu_default, {
            icon: more_vertical_default,
            label: isGradient ? (0, import_i18n35.__)("Gradient options") : (0, import_i18n35.__)("Color options"),
            toggleProps: {
              size: "small"
            },
            children: ({
              onClose
            }) => /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(import_jsx_runtime181.Fragment, {
              children: /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(menu_default2, {
                role: "menu",
                children: [!isEditing && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(button_default, {
                  __next40pxDefaultSize: true,
                  variant: "tertiary",
                  onClick: () => {
                    setIsEditing(true);
                    onClose();
                  },
                  className: "components-palette-edit__menu-button",
                  children: (0, import_i18n35.__)("Show details")
                }), !canOnlyChangeValues && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(button_default, {
                  __next40pxDefaultSize: true,
                  variant: "tertiary",
                  onClick: () => {
                    setEditingElement(null);
                    setIsEditing(false);
                    onChange();
                    onClose();
                  },
                  className: "components-palette-edit__menu-button",
                  children: isGradient ? (0, import_i18n35.__)("Remove all gradients") : (0, import_i18n35.__)("Remove all colors")
                }), canReset && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(button_default, {
                  __next40pxDefaultSize: true,
                  className: "components-palette-edit__menu-button",
                  variant: "tertiary",
                  onClick: () => {
                    setEditingElement(null);
                    onChange();
                    onClose();
                  },
                  children: isGradient ? (0, import_i18n35.__)("Reset gradient") : (0, import_i18n35.__)("Reset colors")
                })]
              })
            })
          })]
        })]
      }), hasElements && /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(PaletteEditContents, {
        children: [isEditing && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(PaletteEditListView, {
          canOnlyChangeValues,
          elements: elements2,
          onChange,
          slugPrefix,
          isGradient,
          popoverProps,
          addColorRef
        }), !isEditing && editingElement !== null && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(ColorPickerPopover, {
          isGradient,
          onClose: () => setEditingElement(null),
          onChange: (newElement) => {
            debounceOnChange(
              // @ts-expect-error TODO: Don't know how to resolve
              elements2.map((currentElement, currentIndex) => {
                if (currentIndex === editingElement) {
                  return newElement;
                }
                return currentElement;
              })
            );
          },
          element: elements2[editingElement ?? -1],
          popoverProps
        }), !isEditing && (isGradient ? /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(gradient_picker_default, {
          gradients,
          onChange: onSelectPaletteItem,
          clearable: false,
          disableCustomGradients: true
        }) : /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(color_palette_default, {
          colors,
          onChange: onSelectPaletteItem,
          clearable: false,
          disableCustomColors: true
        }))]
      }), !hasElements && emptyMessage && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(PaletteEditContents, {
        children: emptyMessage
      })]
    });
  }
  var palette_edit_default = PaletteEdit;

  // packages/components/build-module/combobox-control/index.mjs
  var import_i18n37 = __toESM(require_i18n(), 1);
  var import_element119 = __toESM(require_element(), 1);
  var import_compose46 = __toESM(require_compose(), 1);
  var import_a11y5 = __toESM(require_a11y(), 1);

  // packages/components/build-module/combobox-control/styles.mjs
  var deprecatedDefaultSize = ({
    __next40pxDefaultSize
  }) => !__next40pxDefaultSize && /* @__PURE__ */ css("height:28px;padding-left:", space(1), ";padding-right:", space(1), ";" + (false ? "" : ";label:deprecatedDefaultSize;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQkkiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBGbGV4IH0gZnJvbSAnLi4vZmxleCc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB0eXBlIHsgQ29tYm9ib3hDb250cm9sUHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuY29uc3QgZGVwcmVjYXRlZERlZmF1bHRTaXplID0gKCB7XG5cdF9fbmV4dDQwcHhEZWZhdWx0U2l6ZSxcbn06IFBpY2s8IENvbWJvYm94Q29udHJvbFByb3BzLCAnX19uZXh0NDBweERlZmF1bHRTaXplJyA+ICkgPT5cblx0ISBfX25leHQ0MHB4RGVmYXVsdFNpemUgJiZcblx0Y3NzYFxuXHRcdGhlaWdodDogMjhweDsgLy8gMzBweCAtIDJweCB2ZXJ0aWNhbCBib3JkZXJzIG9uIHBhcmVudCBjb250YWluZXJcblx0XHRwYWRkaW5nLWxlZnQ6ICR7IHNwYWNlKCAxICkgfTtcblx0XHRwYWRkaW5nLXJpZ2h0OiAkeyBzcGFjZSggMSApIH07XG5cdGA7XG5cbmV4cG9ydCBjb25zdCBJbnB1dFdyYXBwZXJGbGV4ID0gc3R5bGVkKCBGbGV4IClgXG5cdGhlaWdodDogMzhweDsgLy8gNDBweCAtIDJweCB2ZXJ0aWNhbCBib3JkZXJzIG9uIHBhcmVudCBjb250YWluZXJcblx0cGFkZGluZy1sZWZ0OiAkeyBzcGFjZSggMiApIH07XG5cdHBhZGRpbmctcmlnaHQ6ICR7IHNwYWNlKCAyICkgfTtcblxuXHQkeyBkZXByZWNhdGVkRGVmYXVsdFNpemUgfVxuYDtcbiJdfQ== */");
  var InputWrapperFlex = /* @__PURE__ */ createStyled(component_default3, false ? {
    target: "evuatpg0"
  } : {
    target: "evuatpg0",
    label: "InputWrapperFlex"
  })("height:38px;padding-left:", space(2), ";padding-right:", space(2), ";", deprecatedDefaultSize, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1QjhDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgRmxleCB9IGZyb20gJy4uL2ZsZXgnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgdHlwZSB7IENvbWJvYm94Q29udHJvbFByb3BzIH0gZnJvbSAnLi90eXBlcyc7XG5cbmNvbnN0IGRlcHJlY2F0ZWREZWZhdWx0U2l6ZSA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG59OiBQaWNrPCBDb21ib2JveENvbnRyb2xQcm9wcywgJ19fbmV4dDQwcHhEZWZhdWx0U2l6ZScgPiApID0+XG5cdCEgX19uZXh0NDBweERlZmF1bHRTaXplICYmXG5cdGNzc2Bcblx0XHRoZWlnaHQ6IDI4cHg7IC8vIDMwcHggLSAycHggdmVydGljYWwgYm9yZGVycyBvbiBwYXJlbnQgY29udGFpbmVyXG5cdFx0cGFkZGluZy1sZWZ0OiAkeyBzcGFjZSggMSApIH07XG5cdFx0cGFkZGluZy1yaWdodDogJHsgc3BhY2UoIDEgKSB9O1xuXHRgO1xuXG5leHBvcnQgY29uc3QgSW5wdXRXcmFwcGVyRmxleCA9IHN0eWxlZCggRmxleCApYFxuXHRoZWlnaHQ6IDM4cHg7IC8vIDQwcHggLSAycHggdmVydGljYWwgYm9yZGVycyBvbiBwYXJlbnQgY29udGFpbmVyXG5cdHBhZGRpbmctbGVmdDogJHsgc3BhY2UoIDIgKSB9O1xuXHRwYWRkaW5nLXJpZ2h0OiAkeyBzcGFjZSggMiApIH07XG5cblx0JHsgZGVwcmVjYXRlZERlZmF1bHRTaXplIH1cbmA7XG4iXX0= */"));

  // packages/components/build-module/form-token-field/token-input.mjs
  var import_element116 = __toESM(require_element(), 1);
  var import_jsx_runtime182 = __toESM(require_jsx_runtime(), 1);
  function UnForwardedTokenInput(props, ref) {
    const {
      value,
      isExpanded,
      instanceId,
      selectedSuggestionIndex,
      className: className2,
      onChange,
      onFocus,
      onBlur,
      ...restProps
    } = props;
    const [hasFocus2, setHasFocus] = (0, import_element116.useState)(false);
    const size3 = value ? value.length + 1 : 0;
    const onChangeHandler = (event) => {
      if (onChange) {
        onChange({
          value: event.target.value
        });
      }
    };
    const onFocusHandler = (e3) => {
      setHasFocus(true);
      onFocus?.(e3);
    };
    const onBlurHandler = (e3) => {
      setHasFocus(false);
      onBlur?.(e3);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime182.jsx)("input", {
      ref,
      id: `components-form-token-input-${instanceId}`,
      type: "text",
      ...restProps,
      value: value || "",
      onChange: onChangeHandler,
      onFocus: onFocusHandler,
      onBlur: onBlurHandler,
      size: size3,
      className: clsx_default(className2, "components-form-token-field__input"),
      autoComplete: "off",
      role: "combobox",
      "aria-expanded": isExpanded,
      "aria-autocomplete": "list",
      "aria-owns": isExpanded ? `components-form-token-suggestions-${instanceId}` : void 0,
      "aria-activedescendant": (
        // Only add the `aria-activedescendant` attribute when:
        // - the user is actively interacting with the input (`hasFocus`)
        // - there is a selected suggestion (`selectedSuggestionIndex !== -1`)
        // - the list of suggestions are rendered in the DOM (`isExpanded`)
        hasFocus2 && selectedSuggestionIndex !== -1 && isExpanded ? `components-form-token-suggestions-${instanceId}-${selectedSuggestionIndex}` : void 0
      ),
      "aria-describedby": `components-form-token-suggestions-howto-${instanceId}`
    });
  }
  var TokenInput = (0, import_element116.forwardRef)(UnForwardedTokenInput);
  TokenInput.displayName = "TokenInput";
  var token_input_default = TokenInput;

  // packages/components/build-module/form-token-field/suggestions-list.mjs
  var import_compose44 = __toESM(require_compose(), 1);
  var import_i18n36 = __toESM(require_i18n(), 1);
  var import_jsx_runtime183 = __toESM(require_jsx_runtime(), 1);
  var handleMouseDown = (e3) => {
    e3.preventDefault();
  };
  function SuggestionsList({
    selectedIndex,
    scrollIntoView,
    match: match4,
    onHover,
    onSelect,
    suggestions = [],
    displayTransform,
    instanceId,
    __experimentalRenderItem
  }) {
    const listRef = (0, import_compose44.useRefEffect)((listNode) => {
      if (selectedIndex > -1 && scrollIntoView && listNode.children[selectedIndex]) {
        listNode.children[selectedIndex].scrollIntoView({
          behavior: "instant",
          block: "nearest",
          inline: "nearest"
        });
      }
    }, [selectedIndex, scrollIntoView]);
    const handleHover = (suggestion) => {
      return () => {
        onHover?.(suggestion);
      };
    };
    const handleClick = (suggestion) => {
      return () => {
        onSelect?.(suggestion);
      };
    };
    const computeSuggestionMatch = (suggestion) => {
      const matchText = displayTransform(match4).normalize("NFKC").toLocaleLowerCase();
      if (matchText.length === 0) {
        return null;
      }
      const transformedSuggestion = displayTransform(suggestion);
      const indexOfMatch = transformedSuggestion.normalize("NFKC").toLocaleLowerCase().indexOf(matchText);
      return {
        suggestionBeforeMatch: transformedSuggestion.substring(0, indexOfMatch),
        suggestionMatch: transformedSuggestion.substring(indexOfMatch, indexOfMatch + matchText.length),
        suggestionAfterMatch: transformedSuggestion.substring(indexOfMatch + matchText.length)
      };
    };
    return /* @__PURE__ */ (0, import_jsx_runtime183.jsxs)("ul", {
      ref: listRef,
      className: "components-form-token-field__suggestions-list",
      id: `components-form-token-suggestions-${instanceId}`,
      role: "listbox",
      children: [suggestions.map((suggestion, index2) => {
        const matchText = computeSuggestionMatch(suggestion);
        const isSelected2 = index2 === selectedIndex;
        const isDisabled = typeof suggestion === "object" && suggestion?.disabled;
        const key = typeof suggestion === "object" && "value" in suggestion ? suggestion?.value : displayTransform(suggestion);
        const className2 = clsx_default("components-form-token-field__suggestion", {
          "is-selected": isSelected2
        });
        let output;
        if (typeof __experimentalRenderItem === "function") {
          output = __experimentalRenderItem({
            item: suggestion
          });
        } else if (matchText) {
          output = /* @__PURE__ */ (0, import_jsx_runtime183.jsxs)("span", {
            "aria-label": displayTransform(suggestion),
            children: [matchText.suggestionBeforeMatch, /* @__PURE__ */ (0, import_jsx_runtime183.jsx)("strong", {
              className: "components-form-token-field__suggestion-match",
              children: matchText.suggestionMatch
            }), matchText.suggestionAfterMatch]
          });
        } else {
          output = displayTransform(suggestion);
        }
        return /* @__PURE__ */ (0, import_jsx_runtime183.jsx)("li", {
          id: `components-form-token-suggestions-${instanceId}-${index2}`,
          role: "option",
          className: className2,
          onMouseDown: handleMouseDown,
          onClick: handleClick(suggestion),
          onMouseEnter: handleHover(suggestion),
          "aria-selected": index2 === selectedIndex,
          "aria-disabled": isDisabled,
          children: output
        }, key);
      }), suggestions.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime183.jsx)("li", {
        className: "components-form-token-field__suggestion is-empty",
        children: (0, import_i18n36.__)("No items found")
      })]
    });
  }
  var suggestions_list_default = SuggestionsList;

  // packages/components/build-module/higher-order/with-focus-outside/index.mjs
  var import_element117 = __toESM(require_element(), 1);
  var import_compose45 = __toESM(require_compose(), 1);
  var import_jsx_runtime184 = __toESM(require_jsx_runtime(), 1);
  var with_focus_outside_default = (0, import_compose45.createHigherOrderComponent)((WrappedComponent) => function WithFocusOutside(props) {
    const [handleFocusOutside, setHandleFocusOutside] = (0, import_element117.useState)(void 0);
    const bindFocusOutsideHandler = (0, import_element117.useCallback)((node2) => setHandleFocusOutside(() => node2?.handleFocusOutside ? node2.handleFocusOutside.bind(node2) : void 0), []);
    return /* @__PURE__ */ (0, import_jsx_runtime184.jsx)("div", {
      ...(0, import_compose45.__experimentalUseFocusOutside)(handleFocusOutside),
      children: /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(WrappedComponent, {
        ref: bindFocusOutsideHandler,
        ...props
      })
    });
  }, "withFocusOutside");

  // packages/components/build-module/spinner/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__25() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var spinAnimation = keyframes2`
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
 `;
  var StyledSpinner = /* @__PURE__ */ createStyled("svg", false ? {
    target: "ea4tfvq2"
  } : {
    target: "ea4tfvq2",
    label: "StyledSpinner"
  })("width:", config_values_default.spinnerSize, "px;height:", config_values_default.spinnerSize, "px;display:inline-block;margin:5px 11px 0;position:relative;color:", COLORS.theme.accent, ";overflow:visible;opacity:1;background-color:transparent;" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvQnVDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcywga2V5ZnJhbWVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcblxuY29uc3Qgc3BpbkFuaW1hdGlvbiA9IGtleWZyYW1lc2Bcblx0ZnJvbSB7XG5cdFx0dHJhbnNmb3JtOiByb3RhdGUoMGRlZyk7XG5cdH1cblx0dG8ge1xuXHRcdHRyYW5zZm9ybTogcm90YXRlKDM2MGRlZyk7XG5cdH1cbiBgO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkU3Bpbm5lciA9IHN0eWxlZC5zdmdgXG5cdHdpZHRoOiAkeyBDT05GSUcuc3Bpbm5lclNpemUgfXB4O1xuXHRoZWlnaHQ6ICR7IENPTkZJRy5zcGlubmVyU2l6ZSB9cHg7XG5cdGRpc3BsYXk6IGlubGluZS1ibG9jaztcblx0bWFyZ2luOiA1cHggMTFweCAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdG92ZXJmbG93OiB2aXNpYmxlO1xuXHRvcGFjaXR5OiAxO1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDtcbmA7XG5cbmNvbnN0IGNvbW1vblBhdGhQcm9wcyA9IGNzc2Bcblx0ZmlsbDogdHJhbnNwYXJlbnQ7XG5cdHN0cm9rZS13aWR0aDogMS41cHg7XG5gO1xuXG5leHBvcnQgY29uc3QgU3Bpbm5lclRyYWNrID0gc3R5bGVkLmNpcmNsZWBcblx0JHsgY29tbW9uUGF0aFByb3BzIH07XG5cdHN0cm9rZTogJHsgQ09MT1JTLmdyYXlbIDMwMCBdIH07XG5gO1xuXG5leHBvcnQgY29uc3QgU3Bpbm5lckluZGljYXRvciA9IHN0eWxlZC5wYXRoYFxuXHQkeyBjb21tb25QYXRoUHJvcHMgfTtcblx0c3Ryb2tlOiBjdXJyZW50Q29sb3I7XG5cdHN0cm9rZS1saW5lY2FwOiByb3VuZDtcblx0dHJhbnNmb3JtLW9yaWdpbjogNTAlIDUwJTtcblx0YW5pbWF0aW9uOiAxLjRzIGxpbmVhciBpbmZpbml0ZSBib3RoICR7IHNwaW5BbmltYXRpb24gfTtcbmA7XG4iXX0= */"));
  var commonPathProps = false ? {
    name: "9s4963",
    styles: "fill:transparent;stroke-width:1.5px"
  } : {
    name: "o2zng0-commonPathProps",
    styles: "fill:transparent;stroke-width:1.5px;label:commonPathProps;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnQzJCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcywga2V5ZnJhbWVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcblxuY29uc3Qgc3BpbkFuaW1hdGlvbiA9IGtleWZyYW1lc2Bcblx0ZnJvbSB7XG5cdFx0dHJhbnNmb3JtOiByb3RhdGUoMGRlZyk7XG5cdH1cblx0dG8ge1xuXHRcdHRyYW5zZm9ybTogcm90YXRlKDM2MGRlZyk7XG5cdH1cbiBgO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkU3Bpbm5lciA9IHN0eWxlZC5zdmdgXG5cdHdpZHRoOiAkeyBDT05GSUcuc3Bpbm5lclNpemUgfXB4O1xuXHRoZWlnaHQ6ICR7IENPTkZJRy5zcGlubmVyU2l6ZSB9cHg7XG5cdGRpc3BsYXk6IGlubGluZS1ibG9jaztcblx0bWFyZ2luOiA1cHggMTFweCAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdG92ZXJmbG93OiB2aXNpYmxlO1xuXHRvcGFjaXR5OiAxO1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDtcbmA7XG5cbmNvbnN0IGNvbW1vblBhdGhQcm9wcyA9IGNzc2Bcblx0ZmlsbDogdHJhbnNwYXJlbnQ7XG5cdHN0cm9rZS13aWR0aDogMS41cHg7XG5gO1xuXG5leHBvcnQgY29uc3QgU3Bpbm5lclRyYWNrID0gc3R5bGVkLmNpcmNsZWBcblx0JHsgY29tbW9uUGF0aFByb3BzIH07XG5cdHN0cm9rZTogJHsgQ09MT1JTLmdyYXlbIDMwMCBdIH07XG5gO1xuXG5leHBvcnQgY29uc3QgU3Bpbm5lckluZGljYXRvciA9IHN0eWxlZC5wYXRoYFxuXHQkeyBjb21tb25QYXRoUHJvcHMgfTtcblx0c3Ryb2tlOiBjdXJyZW50Q29sb3I7XG5cdHN0cm9rZS1saW5lY2FwOiByb3VuZDtcblx0dHJhbnNmb3JtLW9yaWdpbjogNTAlIDUwJTtcblx0YW5pbWF0aW9uOiAxLjRzIGxpbmVhciBpbmZpbml0ZSBib3RoICR7IHNwaW5BbmltYXRpb24gfTtcbmA7XG4iXX0= */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__25
  };
  var SpinnerTrack = /* @__PURE__ */ createStyled("circle", false ? {
    target: "ea4tfvq1"
  } : {
    target: "ea4tfvq1",
    label: "SpinnerTrack"
  })(commonPathProps, ";stroke:", COLORS.gray[300], ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQ3lDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcywga2V5ZnJhbWVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcblxuY29uc3Qgc3BpbkFuaW1hdGlvbiA9IGtleWZyYW1lc2Bcblx0ZnJvbSB7XG5cdFx0dHJhbnNmb3JtOiByb3RhdGUoMGRlZyk7XG5cdH1cblx0dG8ge1xuXHRcdHRyYW5zZm9ybTogcm90YXRlKDM2MGRlZyk7XG5cdH1cbiBgO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkU3Bpbm5lciA9IHN0eWxlZC5zdmdgXG5cdHdpZHRoOiAkeyBDT05GSUcuc3Bpbm5lclNpemUgfXB4O1xuXHRoZWlnaHQ6ICR7IENPTkZJRy5zcGlubmVyU2l6ZSB9cHg7XG5cdGRpc3BsYXk6IGlubGluZS1ibG9jaztcblx0bWFyZ2luOiA1cHggMTFweCAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdG92ZXJmbG93OiB2aXNpYmxlO1xuXHRvcGFjaXR5OiAxO1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDtcbmA7XG5cbmNvbnN0IGNvbW1vblBhdGhQcm9wcyA9IGNzc2Bcblx0ZmlsbDogdHJhbnNwYXJlbnQ7XG5cdHN0cm9rZS13aWR0aDogMS41cHg7XG5gO1xuXG5leHBvcnQgY29uc3QgU3Bpbm5lclRyYWNrID0gc3R5bGVkLmNpcmNsZWBcblx0JHsgY29tbW9uUGF0aFByb3BzIH07XG5cdHN0cm9rZTogJHsgQ09MT1JTLmdyYXlbIDMwMCBdIH07XG5gO1xuXG5leHBvcnQgY29uc3QgU3Bpbm5lckluZGljYXRvciA9IHN0eWxlZC5wYXRoYFxuXHQkeyBjb21tb25QYXRoUHJvcHMgfTtcblx0c3Ryb2tlOiBjdXJyZW50Q29sb3I7XG5cdHN0cm9rZS1saW5lY2FwOiByb3VuZDtcblx0dHJhbnNmb3JtLW9yaWdpbjogNTAlIDUwJTtcblx0YW5pbWF0aW9uOiAxLjRzIGxpbmVhciBpbmZpbml0ZSBib3RoICR7IHNwaW5BbmltYXRpb24gfTtcbmA7XG4iXX0= */"));
  var SpinnerIndicator = /* @__PURE__ */ createStyled("path", false ? {
    target: "ea4tfvq0"
  } : {
    target: "ea4tfvq0",
    label: "SpinnerIndicator"
  })(commonPathProps, ";stroke:currentColor;stroke-linecap:round;transform-origin:50% 50%;animation:1.4s linear infinite both ", spinAnimation, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEwQzJDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcywga2V5ZnJhbWVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcblxuY29uc3Qgc3BpbkFuaW1hdGlvbiA9IGtleWZyYW1lc2Bcblx0ZnJvbSB7XG5cdFx0dHJhbnNmb3JtOiByb3RhdGUoMGRlZyk7XG5cdH1cblx0dG8ge1xuXHRcdHRyYW5zZm9ybTogcm90YXRlKDM2MGRlZyk7XG5cdH1cbiBgO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkU3Bpbm5lciA9IHN0eWxlZC5zdmdgXG5cdHdpZHRoOiAkeyBDT05GSUcuc3Bpbm5lclNpemUgfXB4O1xuXHRoZWlnaHQ6ICR7IENPTkZJRy5zcGlubmVyU2l6ZSB9cHg7XG5cdGRpc3BsYXk6IGlubGluZS1ibG9jaztcblx0bWFyZ2luOiA1cHggMTFweCAwO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdG92ZXJmbG93OiB2aXNpYmxlO1xuXHRvcGFjaXR5OiAxO1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDtcbmA7XG5cbmNvbnN0IGNvbW1vblBhdGhQcm9wcyA9IGNzc2Bcblx0ZmlsbDogdHJhbnNwYXJlbnQ7XG5cdHN0cm9rZS13aWR0aDogMS41cHg7XG5gO1xuXG5leHBvcnQgY29uc3QgU3Bpbm5lclRyYWNrID0gc3R5bGVkLmNpcmNsZWBcblx0JHsgY29tbW9uUGF0aFByb3BzIH07XG5cdHN0cm9rZTogJHsgQ09MT1JTLmdyYXlbIDMwMCBdIH07XG5gO1xuXG5leHBvcnQgY29uc3QgU3Bpbm5lckluZGljYXRvciA9IHN0eWxlZC5wYXRoYFxuXHQkeyBjb21tb25QYXRoUHJvcHMgfTtcblx0c3Ryb2tlOiBjdXJyZW50Q29sb3I7XG5cdHN0cm9rZS1saW5lY2FwOiByb3VuZDtcblx0dHJhbnNmb3JtLW9yaWdpbjogNTAlIDUwJTtcblx0YW5pbWF0aW9uOiAxLjRzIGxpbmVhciBpbmZpbml0ZSBib3RoICR7IHNwaW5BbmltYXRpb24gfTtcbmA7XG4iXX0= */"));

  // packages/components/build-module/spinner/index.mjs
  var import_element118 = __toESM(require_element(), 1);
  var import_jsx_runtime185 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedSpinner({
    className: className2,
    ...props
  }, forwardedRef) {
    return /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)(StyledSpinner, {
      className: clsx_default("components-spinner", className2),
      viewBox: "0 0 100 100",
      width: "16",
      height: "16",
      xmlns: "http://www.w3.org/2000/svg",
      role: "presentation",
      focusable: "false",
      ...props,
      ref: forwardedRef,
      children: [/* @__PURE__ */ (0, import_jsx_runtime185.jsx)(SpinnerTrack, {
        cx: "50",
        cy: "50",
        r: "50",
        vectorEffect: "non-scaling-stroke"
      }), /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(SpinnerIndicator, {
        d: "m 50 0 a 50 50 0 0 1 50 50",
        vectorEffect: "non-scaling-stroke"
      })]
    });
  }
  var Spinner = (0, import_element118.forwardRef)(UnforwardedSpinner);
  Spinner.displayName = "Spinner";
  var spinner_default = Spinner;

  // packages/components/build-module/combobox-control/index.mjs
  var import_jsx_runtime186 = __toESM(require_jsx_runtime(), 1);
  var noop11 = () => {
  };
  var DetectOutside = with_focus_outside_default(class DetectOutsideComponent extends import_element119.Component {
    handleFocusOutside(event) {
      this.props.onFocusOutside(event);
    }
    render() {
      return this.props.children;
    }
  });
  var getIndexOfMatchingSuggestion = (selectedSuggestion, matchingSuggestions) => selectedSuggestion === null ? -1 : matchingSuggestions.indexOf(selectedSuggestion);
  function ComboboxControl(props) {
    const {
      __next40pxDefaultSize = false,
      value: valueProp,
      label,
      options: options2,
      onChange: onChangeProp,
      onFilterValueChange = noop11,
      hideLabelFromVision,
      help,
      allowReset = true,
      className: className2,
      isLoading = false,
      messages = {
        selected: (0, import_i18n37.__)("Item selected.")
      },
      __experimentalRenderItem,
      expandOnFocus = true,
      placeholder
    } = useDeprecated36pxDefaultSizeProp(props);
    const [value, setValue] = useControlledValue({
      value: valueProp,
      onChange: onChangeProp
    });
    const currentOption = options2.find((option) => option.value === value);
    const currentLabel = currentOption?.label ?? "";
    const instanceId = (0, import_compose46.useInstanceId)(ComboboxControl, "combobox-control");
    const [selectedSuggestion, setSelectedSuggestion] = (0, import_element119.useState)(currentOption || null);
    const [isExpanded, setIsExpanded] = (0, import_element119.useState)(false);
    const [inputHasFocus, setInputHasFocus] = (0, import_element119.useState)(false);
    const [inputValue, setInputValue] = (0, import_element119.useState)("");
    const inputContainer = (0, import_element119.useRef)(null);
    const matchingSuggestions = (0, import_element119.useMemo)(() => {
      const startsWithMatch = [];
      const containsMatch = [];
      const match4 = normalizeTextString(inputValue);
      options2.forEach((option) => {
        const index2 = normalizeTextString(option.label).indexOf(match4);
        if (index2 === 0) {
          startsWithMatch.push(option);
        } else if (index2 > 0) {
          containsMatch.push(option);
        }
      });
      return startsWithMatch.concat(containsMatch);
    }, [inputValue, options2]);
    const onSuggestionSelected = (newSelectedSuggestion) => {
      if (newSelectedSuggestion.disabled) {
        return;
      }
      setValue(newSelectedSuggestion.value);
      (0, import_a11y5.speak)(messages.selected, "assertive");
      setSelectedSuggestion(newSelectedSuggestion);
      setInputValue("");
      setIsExpanded(false);
    };
    const handleArrowNavigation = (offset3 = 1) => {
      const index2 = getIndexOfMatchingSuggestion(selectedSuggestion, matchingSuggestions);
      let nextIndex = index2 + offset3;
      if (nextIndex < 0) {
        nextIndex = matchingSuggestions.length - 1;
      } else if (nextIndex >= matchingSuggestions.length) {
        nextIndex = 0;
      }
      setSelectedSuggestion(matchingSuggestions[nextIndex]);
      setIsExpanded(true);
    };
    const onKeyDown = withIgnoreIMEEvents((event) => {
      let preventDefault = false;
      if (event.defaultPrevented) {
        return;
      }
      switch (event.code) {
        case "Enter":
          if (selectedSuggestion) {
            onSuggestionSelected(selectedSuggestion);
            preventDefault = true;
          }
          break;
        case "ArrowUp":
          handleArrowNavigation(-1);
          preventDefault = true;
          break;
        case "ArrowDown":
          handleArrowNavigation(1);
          preventDefault = true;
          break;
        case "Escape":
          setIsExpanded(false);
          setSelectedSuggestion(null);
          preventDefault = true;
          break;
        default:
          break;
      }
      if (preventDefault) {
        event.preventDefault();
      }
    });
    const onBlur = () => {
      setInputHasFocus(false);
    };
    const onFocus = () => {
      setInputHasFocus(true);
      if (expandOnFocus) {
        setIsExpanded(true);
      }
      onFilterValueChange("");
      setInputValue("");
    };
    const onClick = () => {
      setIsExpanded(true);
    };
    const onFocusOutside = () => {
      setIsExpanded(false);
    };
    const onInputChange = (event) => {
      const text = event.value;
      setInputValue(text);
      onFilterValueChange(text);
      if (inputHasFocus) {
        setIsExpanded(true);
      }
    };
    const handleOnReset = () => {
      setValue(null);
      inputContainer.current?.focus();
    };
    const handleResetStopPropagation = (event) => {
      event.stopPropagation();
    };
    (0, import_element119.useEffect)(() => {
      const hasMatchingSuggestions = matchingSuggestions.length > 0;
      const hasSelectedMatchingSuggestions = getIndexOfMatchingSuggestion(selectedSuggestion, matchingSuggestions) > 0;
      if (hasMatchingSuggestions && !hasSelectedMatchingSuggestions) {
        setSelectedSuggestion(matchingSuggestions[0]);
      }
    }, [matchingSuggestions, selectedSuggestion]);
    (0, import_element119.useEffect)(() => {
      const hasMatchingSuggestions = matchingSuggestions.length > 0;
      if (isExpanded) {
        const message2 = hasMatchingSuggestions ? (0, import_i18n37.sprintf)(
          /* translators: %d: number of results. */
          (0, import_i18n37._n)("%d result found, use up and down arrow keys to navigate.", "%d results found, use up and down arrow keys to navigate.", matchingSuggestions.length),
          matchingSuggestions.length
        ) : (0, import_i18n37.__)("No results.");
        (0, import_a11y5.speak)(message2, "polite");
      }
    }, [matchingSuggestions, isExpanded]);
    maybeWarnDeprecated36pxSize({
      componentName: "ComboboxControl",
      __next40pxDefaultSize,
      size: void 0
    });
    return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(DetectOutside, {
      onFocusOutside,
      children: /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(base_control_default, {
        className: clsx_default(className2, "components-combobox-control"),
        label,
        id: `components-form-token-input-${instanceId}`,
        hideLabelFromVision,
        help,
        children: /* @__PURE__ */ (0, import_jsx_runtime186.jsxs)("div", {
          className: "components-combobox-control__suggestions-container",
          tabIndex: -1,
          onKeyDown,
          children: [/* @__PURE__ */ (0, import_jsx_runtime186.jsxs)(InputWrapperFlex, {
            __next40pxDefaultSize,
            children: [/* @__PURE__ */ (0, import_jsx_runtime186.jsx)(component_default5, {
              children: /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(token_input_default, {
                className: "components-combobox-control__input",
                instanceId,
                ref: inputContainer,
                placeholder,
                value: isExpanded ? inputValue : currentLabel,
                onFocus,
                onBlur,
                onClick,
                isExpanded,
                selectedSuggestionIndex: getIndexOfMatchingSuggestion(selectedSuggestion, matchingSuggestions),
                onChange: onInputChange
              })
            }), isLoading && /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(spinner_default, {}), allowReset && Boolean(value) && !isExpanded && /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(button_default, {
              size: "small",
              icon: close_small_default,
              onClick: handleOnReset,
              onKeyDown: handleResetStopPropagation,
              label: (0, import_i18n37.__)("Reset")
            })]
          }), isExpanded && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(suggestions_list_default, {
            instanceId,
            match: {
              label: inputValue,
              value: ""
            },
            displayTransform: (suggestion) => suggestion.label,
            suggestions: matchingSuggestions,
            selectedIndex: getIndexOfMatchingSuggestion(selectedSuggestion, matchingSuggestions),
            onHover: setSelectedSuggestion,
            onSelect: onSuggestionSelected,
            scrollIntoView: true,
            __experimentalRenderItem
          })]
        })
      })
    });
  }
  var combobox_control_default = ComboboxControl;

  // packages/components/build-module/composite/legacy/index.mjs
  var import_element120 = __toESM(require_element(), 1);
  var import_compose47 = __toESM(require_compose(), 1);
  var import_deprecated14 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime187 = __toESM(require_jsx_runtime(), 1);
  function mapLegacyStatePropsToComponentProps(legacyProps) {
    if (legacyProps.state) {
      const {
        state,
        ...rest
      } = legacyProps;
      const {
        store,
        ...props
      } = mapLegacyStatePropsToComponentProps(state);
      return {
        ...rest,
        ...props,
        store
      };
    }
    return legacyProps;
  }
  var LEGACY_TO_NEW_DISPLAY_NAME = {
    __unstableComposite: "Composite",
    __unstableCompositeGroup: "Composite.Group or Composite.Row",
    __unstableCompositeItem: "Composite.Item",
    __unstableUseCompositeState: "Composite"
  };
  function proxyComposite(ProxiedComponent, propMap = {}) {
    const displayName = ProxiedComponent.displayName ?? "";
    const Component9 = (legacyProps) => {
      (0, import_deprecated14.default)(`wp.components.${displayName}`, {
        since: "6.7",
        alternative: LEGACY_TO_NEW_DISPLAY_NAME.hasOwnProperty(displayName) ? LEGACY_TO_NEW_DISPLAY_NAME[displayName] : void 0
      });
      const {
        store,
        ...rest
      } = mapLegacyStatePropsToComponentProps(legacyProps);
      let props = rest;
      props = {
        ...props,
        id: (0, import_compose47.useInstanceId)(store, props.baseId, props.id)
      };
      Object.entries(propMap).forEach(([from2, to]) => {
        if (props.hasOwnProperty(from2)) {
          Object.assign(props, {
            [to]: props[from2]
          });
          delete props[from2];
        }
      });
      delete props.baseId;
      return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(ProxiedComponent, {
        ...props,
        store
      });
    };
    Component9.displayName = displayName;
    return Component9;
  }
  var UnproxiedCompositeGroup = (0, import_element120.forwardRef)(({
    role,
    ...props
  }, ref) => {
    const Component9 = role === "row" ? Composite22.Row : Composite22.Group;
    return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Component9, {
      ref,
      role,
      ...props
    });
  });
  var Composite4 = proxyComposite(Object.assign(Composite22, {
    displayName: "__unstableComposite"
  }), {
    baseId: "id"
  });
  var CompositeGroup4 = proxyComposite(Object.assign(UnproxiedCompositeGroup, {
    displayName: "__unstableCompositeGroup"
  }));
  var CompositeItem4 = proxyComposite(Object.assign(Composite22.Item, {
    displayName: "__unstableCompositeItem"
  }), {
    focusable: "accessibleWhenDisabled"
  });
  function useCompositeState(legacyStateOptions = {}) {
    (0, import_deprecated14.default)(`wp.components.__unstableUseCompositeState`, {
      since: "6.7",
      alternative: LEGACY_TO_NEW_DISPLAY_NAME.__unstableUseCompositeState
    });
    const {
      baseId,
      currentId: defaultActiveId,
      orientation,
      rtl: rtl2 = false,
      loop: focusLoop = false,
      wrap: focusWrap = false,
      shift: focusShift = false,
      unstable_virtual: virtualFocus
    } = legacyStateOptions;
    return {
      baseId: (0, import_compose47.useInstanceId)(Composite4, "composite", baseId),
      store: useCompositeStore({
        defaultActiveId,
        rtl: rtl2,
        orientation,
        focusLoop,
        focusShift,
        focusWrap,
        virtualFocus
      })
    };
  }

  // packages/components/build-module/confirm-dialog/component.mjs
  var import_i18n39 = __toESM(require_i18n(), 1);
  var import_element124 = __toESM(require_element(), 1);

  // packages/components/build-module/modal/index.mjs
  var import_element123 = __toESM(require_element(), 1);
  var import_compose49 = __toESM(require_compose(), 1);
  var import_i18n38 = __toESM(require_i18n(), 1);
  var import_dom30 = __toESM(require_dom(), 1);

  // packages/components/build-module/modal/aria-helper.mjs
  var LIVE_REGION_ARIA_ROLES = /* @__PURE__ */ new Set(["alert", "status", "log", "marquee", "timer"]);
  var hiddenElementsByDepth = [];
  function modalize(modalElement) {
    const elements2 = Array.from(document.body.children);
    const hiddenElements = [];
    hiddenElementsByDepth.push(hiddenElements);
    for (const element of elements2) {
      if (element === modalElement) {
        continue;
      }
      if (elementShouldBeHidden(element)) {
        element.setAttribute("aria-hidden", "true");
        hiddenElements.push(element);
      }
    }
  }
  function elementShouldBeHidden(element) {
    const role = element.getAttribute("role");
    return !(element.tagName === "SCRIPT" || element.hasAttribute("hidden") || element.hasAttribute("aria-hidden") || element.hasAttribute("aria-live") || role && LIVE_REGION_ARIA_ROLES.has(role));
  }
  function unmodalize() {
    const hiddenElements = hiddenElementsByDepth.pop();
    if (!hiddenElements) {
      return;
    }
    for (const element of hiddenElements) {
      element.removeAttribute("aria-hidden");
    }
  }

  // packages/components/build-module/modal/use-modal-exit-animation.mjs
  var import_compose48 = __toESM(require_compose(), 1);
  var import_element121 = __toESM(require_element(), 1);
  var import_warning6 = __toESM(require_warning(), 1);
  var FRAME_ANIMATION_DURATION = config_values_default.transitionDuration;
  var FRAME_ANIMATION_DURATION_NUMBER = Number.parseInt(config_values_default.transitionDuration);
  var EXIT_ANIMATION_NAME = "components-modal__disappear-animation";
  function useModalExitAnimation() {
    const frameRef = (0, import_element121.useRef)(null);
    const [isAnimatingOut, setIsAnimatingOut] = (0, import_element121.useState)(false);
    const isReducedMotion = (0, import_compose48.useReducedMotion)();
    const closeModal = (0, import_element121.useCallback)(() => new Promise((closeModalResolve) => {
      const frameEl = frameRef.current;
      if (isReducedMotion) {
        closeModalResolve();
        return;
      }
      if (!frameEl) {
        true ? (0, import_warning6.default)("wp.components.Modal: the Modal component can't be closed with an exit animation because of a missing reference to the modal frame element.") : void 0;
        closeModalResolve();
        return;
      }
      let handleAnimationEnd;
      const startAnimation = () => new Promise((animationResolve) => {
        handleAnimationEnd = (e3) => {
          if (e3.animationName === EXIT_ANIMATION_NAME) {
            animationResolve();
          }
        };
        frameEl.addEventListener("animationend", handleAnimationEnd);
        setIsAnimatingOut(true);
      });
      const animationTimeout = () => new Promise((timeoutResolve) => {
        setTimeout(
          () => timeoutResolve(),
          // Allow an extra 20% of the animation duration for the
          // animationend event to fire, in case the animation frame is
          // slightly delayes by some other events in the event loop.
          FRAME_ANIMATION_DURATION_NUMBER * 1.2
        );
      });
      Promise.race([startAnimation(), animationTimeout()]).then(() => {
        if (handleAnimationEnd) {
          frameEl.removeEventListener("animationend", handleAnimationEnd);
        }
        setIsAnimatingOut(false);
        closeModalResolve();
      });
    }), [isReducedMotion]);
    return {
      overlayClassname: isAnimatingOut ? "is-animating-out" : void 0,
      frameRef,
      frameStyle: {
        "--modal-frame-animation-duration": `${FRAME_ANIMATION_DURATION}`
      },
      closeModal
    };
  }

  // packages/components/build-module/modal/context.mjs
  var import_element122 = __toESM(require_element(), 1);
  var ModalContext = (0, import_element122.createContext)(/* @__PURE__ */ new Set());
  ModalContext.displayName = "ModalContext";

  // packages/components/build-module/modal/index.mjs
  var import_jsx_runtime188 = __toESM(require_jsx_runtime(), 1);
  var bodyOpenClasses = /* @__PURE__ */ new Map();
  function UnforwardedModal(props, forwardedRef) {
    const {
      bodyOpenClassName = "modal-open",
      role = "dialog",
      title = null,
      focusOnMount = true,
      shouldCloseOnEsc = true,
      shouldCloseOnClickOutside = true,
      isDismissible = true,
      /* Accessibility. */
      aria = {
        labelledby: void 0,
        describedby: void 0
      },
      onRequestClose,
      icon,
      closeButtonLabel,
      children,
      style: style2,
      overlayClassName: overlayClassnameProp,
      className: className2,
      contentLabel,
      onKeyDown,
      isFullScreen = false,
      size: size3,
      headerActions = null,
      __experimentalHideHeader = false
    } = props;
    const ref = (0, import_element123.useRef)(null);
    const instanceId = (0, import_compose49.useInstanceId)(Modal);
    const headingId = title ? `components-modal-header-${instanceId}` : aria.labelledby;
    const focusOnMountRef = (0, import_compose49.useFocusOnMount)(focusOnMount === "firstContentElement" ? "firstElement" : focusOnMount);
    const constrainedTabbingRef = (0, import_compose49.useConstrainedTabbing)();
    const focusReturnRef = (0, import_compose49.useFocusReturn)();
    const contentRef = (0, import_element123.useRef)(null);
    const childrenContainerRef = (0, import_element123.useRef)(null);
    const [hasScrolledContent, setHasScrolledContent] = (0, import_element123.useState)(false);
    const [hasScrollableContent, setHasScrollableContent] = (0, import_element123.useState)(false);
    let sizeClass;
    if (isFullScreen || size3 === "fill") {
      sizeClass = "is-full-screen";
    } else if (size3) {
      sizeClass = `has-size-${size3}`;
    }
    const isContentScrollable = (0, import_element123.useCallback)(() => {
      if (!contentRef.current) {
        return;
      }
      const closestScrollContainer = (0, import_dom30.getScrollContainer)(contentRef.current);
      if (contentRef.current === closestScrollContainer) {
        setHasScrollableContent(true);
      } else {
        setHasScrollableContent(false);
      }
    }, [contentRef]);
    (0, import_element123.useEffect)(() => {
      modalize(ref.current);
      return () => unmodalize();
    }, []);
    const onRequestCloseRef = (0, import_element123.useRef)(void 0);
    (0, import_element123.useEffect)(() => {
      onRequestCloseRef.current = onRequestClose;
    }, [onRequestClose]);
    const dismissers = (0, import_element123.useContext)(ModalContext);
    const [nestedDismissers] = (0, import_element123.useState)(() => /* @__PURE__ */ new Set());
    (0, import_element123.useEffect)(() => {
      dismissers.add(onRequestCloseRef);
      for (const dismisser of dismissers) {
        if (dismisser !== onRequestCloseRef) {
          dismisser.current?.();
        }
      }
      return () => {
        for (const dismisser of nestedDismissers) {
          dismisser.current?.();
        }
        dismissers.delete(onRequestCloseRef);
      };
    }, [dismissers, nestedDismissers]);
    (0, import_element123.useEffect)(() => {
      const theClass = bodyOpenClassName;
      const oneMore = 1 + (bodyOpenClasses.get(theClass) ?? 0);
      bodyOpenClasses.set(theClass, oneMore);
      document.body.classList.add(bodyOpenClassName);
      return () => {
        const oneLess = bodyOpenClasses.get(theClass) - 1;
        if (oneLess === 0) {
          document.body.classList.remove(theClass);
          bodyOpenClasses.delete(theClass);
        } else {
          bodyOpenClasses.set(theClass, oneLess);
        }
      };
    }, [bodyOpenClassName]);
    const {
      closeModal,
      frameRef,
      frameStyle,
      overlayClassname
    } = useModalExitAnimation();
    (0, import_element123.useLayoutEffect)(() => {
      if (!window.ResizeObserver || !childrenContainerRef.current) {
        return;
      }
      const resizeObserver = new ResizeObserver(isContentScrollable);
      resizeObserver.observe(childrenContainerRef.current);
      isContentScrollable();
      return () => {
        resizeObserver.disconnect();
      };
    }, [isContentScrollable, childrenContainerRef]);
    function handleEscapeKeyDown(event) {
      if (shouldCloseOnEsc && (event.code === "Escape" || event.key === "Escape") && !event.defaultPrevented) {
        event.preventDefault();
        closeModal().then(() => onRequestClose(event));
      }
    }
    const onContentContainerScroll = (0, import_element123.useCallback)((e3) => {
      const scrollY2 = e3?.currentTarget?.scrollTop ?? -1;
      if (!hasScrolledContent && scrollY2 > 0) {
        setHasScrolledContent(true);
      } else if (hasScrolledContent && scrollY2 <= 0) {
        setHasScrolledContent(false);
      }
    }, [hasScrolledContent]);
    let pressTarget = null;
    const overlayPressHandlers = {
      onPointerDown: (event) => {
        if (event.target === event.currentTarget) {
          pressTarget = event.target;
          event.preventDefault();
        }
      },
      // Closes the modal with two exceptions. 1. Opening the context menu on
      // the overlay. 2. Pressing on the overlay then dragging the pointer
      // over the modal and releasing. Due to the modal being a child of the
      // overlay, such a gesture is a `click` on the overlay and cannot be
      // excepted by a `click` handler. Thus the tactic of handling
      // `pointerup` and comparing its target to that of the `pointerdown`.
      onPointerUp: ({
        target,
        button
      }) => {
        const isSameTarget = target === pressTarget;
        pressTarget = null;
        if (button === 0 && isSameTarget) {
          closeModal().then(() => onRequestClose());
        }
      }
    };
    const modal = (
      // eslint-disable-next-line jsx-a11y/no-static-element-interactions
      /* @__PURE__ */ (0, import_jsx_runtime188.jsx)("div", {
        ref: (0, import_compose49.useMergeRefs)([ref, forwardedRef]),
        className: clsx_default("components-modal__screen-overlay", overlayClassname, overlayClassnameProp),
        onKeyDown: withIgnoreIMEEvents(handleEscapeKeyDown),
        ...shouldCloseOnClickOutside ? overlayPressHandlers : {},
        children: /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(style_provider_default, {
          document,
          children: /* @__PURE__ */ (0, import_jsx_runtime188.jsx)("div", {
            className: clsx_default("components-modal__frame", sizeClass, className2),
            style: {
              ...frameStyle,
              ...style2
            },
            ref: (0, import_compose49.useMergeRefs)([frameRef, constrainedTabbingRef, focusReturnRef, focusOnMount !== "firstContentElement" ? focusOnMountRef : null]),
            role,
            "aria-label": contentLabel,
            "aria-labelledby": contentLabel ? void 0 : headingId,
            "aria-describedby": aria.describedby,
            tabIndex: -1,
            onKeyDown,
            children: /* @__PURE__ */ (0, import_jsx_runtime188.jsxs)("div", {
              className: clsx_default("components-modal__content", {
                "hide-header": __experimentalHideHeader,
                "is-scrollable": hasScrollableContent,
                "has-scrolled-content": hasScrolledContent
              }),
              role: "document",
              onScroll: onContentContainerScroll,
              ref: contentRef,
              "aria-label": hasScrollableContent ? (0, import_i18n38.__)("Scrollable section") : void 0,
              tabIndex: hasScrollableContent ? 0 : void 0,
              children: [!__experimentalHideHeader && /* @__PURE__ */ (0, import_jsx_runtime188.jsxs)("div", {
                className: "components-modal__header",
                children: [/* @__PURE__ */ (0, import_jsx_runtime188.jsxs)("div", {
                  className: "components-modal__header-heading-container",
                  children: [icon && /* @__PURE__ */ (0, import_jsx_runtime188.jsx)("span", {
                    className: "components-modal__icon-container",
                    "aria-hidden": true,
                    children: icon
                  }), title && /* @__PURE__ */ (0, import_jsx_runtime188.jsx)("h1", {
                    id: headingId,
                    className: "components-modal__header-heading",
                    children: title
                  })]
                }), headerActions, isDismissible && /* @__PURE__ */ (0, import_jsx_runtime188.jsxs)(import_jsx_runtime188.Fragment, {
                  children: [/* @__PURE__ */ (0, import_jsx_runtime188.jsx)(component_default6, {
                    marginBottom: 0,
                    marginLeft: 2
                  }), /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(button_default, {
                    size: "compact",
                    onClick: (event) => closeModal().then(() => onRequestClose(event)),
                    icon: close_default,
                    label: closeButtonLabel || (0, import_i18n38.__)("Close")
                  })]
                })]
              }), /* @__PURE__ */ (0, import_jsx_runtime188.jsx)("div", {
                ref: (0, import_compose49.useMergeRefs)([childrenContainerRef, focusOnMount === "firstContentElement" ? focusOnMountRef : null]),
                className: "components-modal__children-container",
                children
              })]
            })
          })
        })
      })
    );
    return (0, import_element123.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime188.jsx)(ModalContext.Provider, {
      value: nestedDismissers,
      children: modal
    }), document.body);
  }
  var Modal = (0, import_element123.forwardRef)(UnforwardedModal);
  Modal.displayName = "Modal";
  var modal_default = Modal;

  // packages/components/build-module/confirm-dialog/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__26() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var wrapper2 = false ? {
    name: "7g5ii0",
    styles: "&&{z-index:1000001;}"
  } : {
    name: "1gucf3d-wrapper",
    styles: "&&{z-index:1000001;};label:wrapper;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFhMEIiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIFRoZSB6LWluZGV4IGZvciBDb25maXJtRGlhbG9nIGlzIGJlaW5nIHNldCBoZXJlIGluc3RlYWQgb2YgaW5cbiAqIHBhY2thZ2VzL2Jhc2Utc3R5bGVzL196LWluZGV4LnNjc3MsIGJlY2F1c2UgdGhpcyBjb21wb25lbnQgdXNlc1xuICogZW1vdGlvbiBpbnN0ZWFkIG9mIHNhc3MuXG4gKlxuICogQ29uZmlybURpYWxvZyBuZWVkcyB0aGlzIGhpZ2hlciB6LWluZGV4IHRvIGVuc3VyZSBpdCByZW5kZXJzIG9uIHRvcCBvZlxuICogYW55IHBhcmVudCBQb3BvdmVyIGNvbXBvbmVudC5cbiAqL1xuZXhwb3J0IGNvbnN0IHdyYXBwZXIgPSBjc3NgXG5cdCYmIHtcblx0XHR6LWluZGV4OiAxMDAwMDAxO1xuXHR9XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__26
  };

  // packages/components/build-module/confirm-dialog/component.mjs
  var import_jsx_runtime189 = __toESM(require_jsx_runtime(), 1);
  var UnconnectedConfirmDialog = (props, forwardedRef) => {
    const {
      isOpen: isOpenProp,
      onConfirm,
      onCancel,
      children,
      confirmButtonText,
      cancelButtonText,
      isBusy,
      ...otherProps
    } = useContextSystem(props, "ConfirmDialog");
    const cx3 = useCx();
    const wrapperClassName = cx3(wrapper2);
    const cancelButtonRef = (0, import_element124.useRef)(null);
    const confirmButtonRef = (0, import_element124.useRef)(null);
    const [isOpen, setIsOpen] = (0, import_element124.useState)();
    const [shouldSelfClose, setShouldSelfClose] = (0, import_element124.useState)();
    (0, import_element124.useEffect)(() => {
      const isIsOpenSet = typeof isOpenProp !== "undefined";
      setIsOpen(isIsOpenSet ? isOpenProp : true);
      setShouldSelfClose(!isIsOpenSet);
    }, [isOpenProp]);
    const handleEvent = (0, import_element124.useCallback)((callback) => (event) => {
      callback?.(event);
      if (shouldSelfClose) {
        setIsOpen(false);
      }
    }, [shouldSelfClose, setIsOpen]);
    const handleEnter = (0, import_element124.useCallback)((event) => {
      const isConfirmOrCancelButton = event.target === cancelButtonRef.current || event.target === confirmButtonRef.current;
      if (!isConfirmOrCancelButton && event.key === "Enter") {
        handleEvent(onConfirm)(event);
      }
    }, [handleEvent, onConfirm]);
    const cancelLabel = cancelButtonText ?? (0, import_i18n39.__)("Cancel");
    const confirmLabel = confirmButtonText ?? (0, import_i18n39.__)("OK");
    return /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(import_jsx_runtime189.Fragment, {
      children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(modal_default, {
        onRequestClose: handleEvent(onCancel),
        onKeyDown: handleEnter,
        closeButtonLabel: cancelLabel,
        isDismissible: true,
        ref: forwardedRef,
        overlayClassName: wrapperClassName,
        __experimentalHideHeader: true,
        ...otherProps,
        children: /* @__PURE__ */ (0, import_jsx_runtime189.jsxs)(component_default18, {
          spacing: 8,
          children: [/* @__PURE__ */ (0, import_jsx_runtime189.jsx)(component_default8, {
            children
          }), /* @__PURE__ */ (0, import_jsx_runtime189.jsxs)(component_default3, {
            direction: "row",
            justify: "flex-end",
            children: [/* @__PURE__ */ (0, import_jsx_runtime189.jsx)(button_default, {
              __next40pxDefaultSize: true,
              ref: cancelButtonRef,
              variant: "tertiary",
              onClick: handleEvent(onCancel),
              accessibleWhenDisabled: true,
              disabled: isBusy,
              children: cancelLabel
            }), /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(button_default, {
              __next40pxDefaultSize: true,
              ref: confirmButtonRef,
              variant: "primary",
              onClick: handleEvent(onConfirm),
              accessibleWhenDisabled: true,
              disabled: isBusy,
              isBusy,
              children: confirmLabel
            })]
          })]
        })
      })
    });
  };
  var ConfirmDialog = contextConnect(UnconnectedConfirmDialog, "ConfirmDialog");
  var component_default37 = ConfirmDialog;

  // packages/components/build-module/custom-select-control/index.mjs
  var import_compose50 = __toESM(require_compose(), 1);
  var import_i18n41 = __toESM(require_i18n(), 1);

  // packages/components/build-module/custom-select-control-v2/custom-select.mjs
  var import_element125 = __toESM(require_element(), 1);
  var import_i18n40 = __toESM(require_i18n(), 1);

  // packages/components/build-module/custom-select-control-v2/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__27() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var INLINE_PADDING = {
    compact: config_values_default.controlPaddingXSmall,
    small: config_values_default.controlPaddingXSmall,
    default: config_values_default.controlPaddingX
  };
  var getSelectSize = (size3, heightProperty) => {
    const sizes = {
      compact: {
        [heightProperty]: 32,
        paddingInlineStart: INLINE_PADDING.compact,
        paddingInlineEnd: INLINE_PADDING.compact + chevronIconSize
      },
      default: {
        [heightProperty]: 40,
        paddingInlineStart: INLINE_PADDING.default,
        paddingInlineEnd: INLINE_PADDING.default + chevronIconSize
      },
      small: {
        [heightProperty]: 24,
        paddingInlineStart: INLINE_PADDING.small,
        paddingInlineEnd: INLINE_PADDING.small + chevronIconSize
      }
    };
    return sizes[size3] || sizes.default;
  };
  var getSelectItemSize = (size3) => {
    const checkmarkCorrection = 6;
    const sizes = {
      compact: {
        paddingInlineStart: INLINE_PADDING.compact,
        paddingInlineEnd: INLINE_PADDING.compact - checkmarkCorrection
      },
      default: {
        paddingInlineStart: INLINE_PADDING.default,
        paddingInlineEnd: INLINE_PADDING.default - checkmarkCorrection
      },
      small: {
        paddingInlineStart: INLINE_PADDING.small,
        paddingInlineEnd: INLINE_PADDING.small - checkmarkCorrection
      }
    };
    return sizes[size3] || sizes.default;
  };
  var Select22 = /* @__PURE__ */ createStyled(Select, false ? {
    // Do not forward `hasCustomRenderProp` to the underlying Ariakit.Select component
    shouldForwardProp: (prop) => prop !== "hasCustomRenderProp",
    target: "e1p3eej77"
  } : {
    // Do not forward `hasCustomRenderProp` to the underlying Ariakit.Select component
    shouldForwardProp: (prop) => prop !== "hasCustomRenderProp",
    target: "e1p3eej77",
    label: "Select"
  })(({
    size: size3,
    hasCustomRenderProp
  }) => /* @__PURE__ */ css("display:block;background-color:", COLORS.theme.background, ";border:none;color:", COLORS.theme.foreground, ";cursor:pointer;font-family:inherit;text-align:start;user-select:none;width:100%;&[data-focus-visible]{outline:none;}", getSelectSize(size3, hasCustomRenderProp ? "minHeight" : "height"), " ", !hasCustomRenderProp && truncateStyles, " ", fontSizeStyles({
    inputSize: size3
  }), ";" + (false ? "" : ";label:Select;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnRlciLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0ICogYXMgQXJpYWtpdCBmcm9tICdAYXJpYWtpdC9yZWFjdCc7XG5pbXBvcnQgeyBjc3MsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IENPTE9SUywgQ09ORklHIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgeyBjaGV2cm9uSWNvblNpemUgfSBmcm9tICcuLi9zZWxlY3QtY29udHJvbC9zdHlsZXMvc2VsZWN0LWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB7IGZvbnRTaXplU3R5bGVzIH0gZnJvbSAnLi4vaW5wdXQtY29udHJvbC9zdHlsZXMvaW5wdXQtY29udHJvbC1zdHlsZXMnO1xuaW1wb3J0IHsgRFJPUERPV05fTU9USU9OX0NTUyB9IGZyb20gJy4uL3V0aWxzL3N0eWxlLW1peGlucyc7XG5pbXBvcnQgdHlwZSB7IEN1c3RvbVNlbGVjdEJ1dHRvblNpemUgfSBmcm9tICcuL3R5cGVzJztcblxuY29uc3QgSU5MSU5FX1BBRERJTkcgPSB7XG5cdGNvbXBhY3Q6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0c21hbGw6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0ZGVmYXVsdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcbn07XG5cbmNvbnN0IGdldFNlbGVjdFNpemUgPSAoXG5cdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+LFxuXHRoZWlnaHRQcm9wZXJ0eTogJ21pbkhlaWdodCcgfCAnaGVpZ2h0J1xuKSA9PiB7XG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdFsgaGVpZ2h0UHJvcGVydHkgXTogMzIsXG5cdFx0XHRwYWRkaW5nSW5saW5lU3RhcnQ6IElOTElORV9QQURESU5HLmNvbXBhY3QsXG5cdFx0XHRwYWRkaW5nSW5saW5lRW5kOiBJTkxJTkVfUEFERElORy5jb21wYWN0ICsgY2hldnJvbkljb25TaXplLFxuXHRcdH0sXG5cdFx0ZGVmYXVsdDoge1xuXHRcdFx0WyBoZWlnaHRQcm9wZXJ0eSBdOiA0MCxcblx0XHRcdHBhZGRpbmdJbmxpbmVTdGFydDogSU5MSU5FX1BBRERJTkcuZGVmYXVsdCxcblx0XHRcdHBhZGRpbmdJbmxpbmVFbmQ6IElOTElORV9QQURESU5HLmRlZmF1bHQgKyBjaGV2cm9uSWNvblNpemUsXG5cdFx0fSxcblx0XHRzbWFsbDoge1xuXHRcdFx0WyBoZWlnaHRQcm9wZXJ0eSBdOiAyNCxcblx0XHRcdHBhZGRpbmdJbmxpbmVTdGFydDogSU5MSU5FX1BBRERJTkcuc21hbGwsXG5cdFx0XHRwYWRkaW5nSW5saW5lRW5kOiBJTkxJTkVfUEFERElORy5zbWFsbCArIGNoZXZyb25JY29uU2l6ZSxcblx0XHR9LFxuXHR9O1xuXG5cdHJldHVybiBzaXplc1sgc2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG59O1xuXG5jb25zdCBnZXRTZWxlY3RJdGVtU2l6ZSA9IChcblx0c2l6ZTogTm9uTnVsbGFibGU8IEN1c3RvbVNlbGVjdEJ1dHRvblNpemVbICdzaXplJyBdID5cbikgPT4ge1xuXHQvLyBVc2VkIHRvIHZpc3VhbGx5IGFsaWduIHRoZSBjaGVja21hcmsgd2l0aCB0aGUgY2hldnJvblxuXHRjb25zdCBjaGVja21hcmtDb3JyZWN0aW9uID0gNjtcblx0Y29uc3Qgc2l6ZXMgPSB7XG5cdFx0Y29tcGFjdDoge1xuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5jb21wYWN0LFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuY29tcGFjdCAtIGNoZWNrbWFya0NvcnJlY3Rpb24sXG5cdFx0fSxcblx0XHRkZWZhdWx0OiB7XG5cdFx0XHRwYWRkaW5nSW5saW5lU3RhcnQ6IElOTElORV9QQURESU5HLmRlZmF1bHQsXG5cdFx0XHRwYWRkaW5nSW5saW5lRW5kOiBJTkxJTkVfUEFERElORy5kZWZhdWx0IC0gY2hlY2ttYXJrQ29ycmVjdGlvbixcblx0XHR9LFxuXHRcdHNtYWxsOiB7XG5cdFx0XHRwYWRkaW5nSW5saW5lU3RhcnQ6IElOTElORV9QQURESU5HLnNtYWxsLFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuc21hbGwgLSBjaGVja21hcmtDb3JyZWN0aW9uLFxuXHRcdH0sXG5cdH07XG5cblx0cmV0dXJuIHNpemVzWyBzaXplIF0gfHwgc2l6ZXMuZGVmYXVsdDtcbn07XG5cbmV4cG9ydCBjb25zdCBTZWxlY3QgPSBzdHlsZWQoIEFyaWFraXQuU2VsZWN0LCB7XG5cdC8vIERvIG5vdCBmb3J3YXJkIGBoYXNDdXN0b21SZW5kZXJQcm9wYCB0byB0aGUgdW5kZXJseWluZyBBcmlha2l0LlNlbGVjdCBjb21wb25lbnRcblx0c2hvdWxkRm9yd2FyZFByb3A6ICggcHJvcCApID0+IHByb3AgIT09ICdoYXNDdXN0b21SZW5kZXJQcm9wJyxcbn0gKShcblx0KCB7XG5cdFx0c2l6ZSxcblx0XHRoYXNDdXN0b21SZW5kZXJQcm9wLFxuXHR9OiB7XG5cdFx0c2l6ZTogTm9uTnVsbGFibGU8IEN1c3RvbVNlbGVjdEJ1dHRvblNpemVbICdzaXplJyBdID47XG5cdFx0aGFzQ3VzdG9tUmVuZGVyUHJvcDogYm9vbGVhbjtcblx0fSApID0+IGNzc2Bcblx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYmFja2dyb3VuZCB9O1xuXHRcdGJvcmRlcjogbm9uZTtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0XHRjdXJzb3I6IHBvaW50ZXI7XG5cdFx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdFx0dGV4dC1hbGlnbjogc3RhcnQ7XG5cdFx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cblx0XHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdFx0b3V0bGluZTogbm9uZTsgLy8gaGFuZGxlZCBieSBJbnB1dEJhc2UgY29tcG9uZW50XG5cdFx0fVxuXG5cdFx0JHsgZ2V0U2VsZWN0U2l6ZSggc2l6ZSwgaGFzQ3VzdG9tUmVuZGVyUHJvcCA/ICdtaW5IZWlnaHQnIDogJ2hlaWdodCcgKSB9XG5cdFx0JHsgISBoYXNDdXN0b21SZW5kZXJQcm9wICYmIHRydW5jYXRlU3R5bGVzIH1cblx0XHQkeyBmb250U2l6ZVN0eWxlcyggeyBpbnB1dFNpemU6IHNpemUgfSApIH1cblx0YFxuKTtcblxuY29uc3Qgc2xpZGVEb3duID0ga2V5ZnJhbWVzKCB7XG5cdCcwJSc6IHsgdHJhbnNmb3JtOiBgdHJhbnNsYXRlWSgtJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9ESVNUQU5DRSB9KWAgfSxcblx0JzEwMCUnOiB7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVkoMCknIH0sXG59ICk7XG5cbmNvbnN0IGZhZGVJbiA9IGtleWZyYW1lcygge1xuXHQnMCUnOiB7IG9wYWNpdHk6IDAgfSxcblx0JzEwMCUnOiB7IG9wYWNpdHk6IDEgfSxcbn0gKTtcblxuZXhwb3J0IGNvbnN0IFNlbGVjdFBvcG92ZXIgPSBzdHlsZWQoIEFyaWFraXQuU2VsZWN0UG9wb3ZlciApYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXG5cdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy50aGVtZS5iYWNrZ3JvdW5kIH07XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRib3JkZXI6IDFweCBzb2xpZCAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9O1xuXHRib3gtc2hhZG93OiAkeyBDT05GSUcuZWxldmF0aW9uTWVkaXVtIH07XG5cblx0Lyogei1pbmRleChcIi5jb21wb25lbnRzLXBvcG92ZXJcIikgKi9cblx0ei1pbmRleDogMTAwMDAwMDtcblxuXHRtYXgtaGVpZ2h0OiBtaW4oIHZhciggLS1wb3BvdmVyLWF2YWlsYWJsZS1oZWlnaHQsIDQwMHB4ICksIDQwMHB4ICk7XG5cdG92ZXJmbG93OiBhdXRvO1xuXHRvdmVyc2Nyb2xsLWJlaGF2aW9yOiBjb250YWluO1xuXG5cdC8qIFRoZSBzbWFsbGVzdCBzaXplIHdpdGhvdXQgb3ZlcmZsb3dpbmcgdGhlIGNvbnRhaW5lci4gKi9cblx0bWluLXdpZHRoOiBtaW4tY29udGVudDtcblxuXHQvKiBBbmltYXRpb24gKi9cblx0JltkYXRhLW9wZW5dIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdGFuaW1hdGlvbi1uYW1lOiAkeyBzbGlkZURvd24gfSwgJHsgZmFkZUluIH07XG5cdFx0XHRhbmltYXRpb24tZHVyYXRpb246ICR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRFVSQVRJT04gfSxcblx0XHRcdFx0JHsgRFJPUERPV05fTU9USU9OX0NTUy5GQURFX0RVUkFUSU9OIH07XG5cdFx0XHRhbmltYXRpb24tdGltaW5nLWZ1bmN0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0VBU0lORyB9LFxuXHRcdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLkZBREVfRUFTSU5HIH07XG5cdFx0XHR3aWxsLWNoYW5nZTogdHJhbnNmb3JtLCBvcGFjaXR5O1xuXHRcdH1cblx0fVxuXG5cdCZbZGF0YS1mb2N1cy12aXNpYmxlXSB7XG5cdFx0LyogVGhlIG91dGxpbmUgd2lsbCBiZSBvbiB0aGUgdHJpZ2dlciwgcmF0aGVyIHRoYW4gdGhlIHBvcG92ZXIuICovXG5cdFx0b3V0bGluZTogbm9uZTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFNlbGVjdEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuU2VsZWN0SXRlbSApKFxuXHQoIHtcblx0XHRzaXplLFxuXHR9OiB7XG5cdFx0c2l6ZTogTm9uTnVsbGFibGU8IEN1c3RvbVNlbGVjdEJ1dHRvblNpemVbICdzaXplJyBdID47XG5cdH0gKSA9PiBjc3NgXG5cdFx0Y3Vyc29yOiBkZWZhdWx0O1xuXHRcdGRpc3BsYXk6IGZsZXg7XG5cdFx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0XHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdFx0Zm9udC1zaXplOiAkeyBDT05GSUcuZm9udFNpemUgfTtcblx0XHQvLyBUT0RPOiByZWFzc2VzcyBsaW5lLWhlaWdodCBmb3Igbm9uLWxlZ2FjeSB2MlxuXHRcdGxpbmUtaGVpZ2h0OiAyOHB4O1xuXHRcdHBhZGRpbmctYmxvY2s6ICR7IHNwYWNlKCAyICkgfTtcblx0XHRzY3JvbGwtbWFyZ2luOiAkeyBzcGFjZSggMSApIH07XG5cdFx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cblx0XHQmW2FyaWEtZGlzYWJsZWQ9J3RydWUnXSB7XG5cdFx0XHRjdXJzb3I6IG5vdC1hbGxvd2VkO1xuXHRcdH1cblxuXHRcdCZbZGF0YS1hY3RpdmUtaXRlbV0ge1xuXHRcdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmdyYXlbIDMwMCBdIH07XG5cdFx0fVxuXG5cdFx0JHsgZ2V0U2VsZWN0SXRlbVNpemUoIHNpemUgKSB9XG5cdGBcbik7XG5cbmNvbnN0IHRydW5jYXRlU3R5bGVzID0gY3NzYFxuXHRvdmVyZmxvdzogaGlkZGVuO1xuXHR0ZXh0LW92ZXJmbG93OiBlbGxpcHNpcztcblx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcbmA7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RlZEV4cGVyaW1lbnRhbEhpbnRXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0JHsgdHJ1bmNhdGVTdHlsZXMgfVxuYDtcblxuZXhwb3J0IGNvbnN0IFNlbGVjdGVkRXhwZXJpbWVudGFsSGludEl0ZW0gPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyA2MDAgXSB9O1xuXHRtYXJnaW4taW5saW5lLXN0YXJ0OiAkeyBzcGFjZSggMiApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgV2l0aEhpbnRJdGVtV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2Vlbjtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZmxleC13cmFwOiB3cmFwO1xuXHRmbGV4OiAxO1xuXHRjb2x1bW4tZ2FwOiAkeyBzcGFjZSggNCApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgV2l0aEhpbnRJdGVtSGludCA9IHN0eWxlZC5zcGFuYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmdyYXlbIDYwMCBdIH07XG5cdHRleHQtYWxpZ246IGluaXRpYWw7XG5cdGxpbmUtaGVpZ2h0OiAkeyBDT05GSUcuZm9udExpbmVIZWlnaHRCYXNlIH07XG5cdHBhZGRpbmctaW5saW5lLWVuZDogJHsgc3BhY2UoIDEgKSB9O1xuXHRtYXJnaW4tYmxvY2s6ICR7IHNwYWNlKCAxICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RlZEl0ZW1DaGVjayA9IHN0eWxlZCggQXJpYWtpdC5TZWxlY3RJdGVtQ2hlY2sgKWBcblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0bWFyZ2luLWlubGluZS1zdGFydDogJHsgc3BhY2UoIDIgKSB9O1xuXHRmaWxsOiBjdXJyZW50Q29sb3I7XG5cblx0Ly8gS2VlcCB0aGUgY2hlY2ttYXJrIHZlcnRpY2FsbHkgYWxpZ25lZCBhdCB0aGUgdG9wLiBTaW5jZSB0aGUgaXRlbSB0ZXh0IGhhcyBhXG5cdC8vIDI4cHggbGluZSBoZWlnaHQgYW5kIHRoZSBjaGVja21hcmsgaXMgMjRweCB0YWxsLCBhICgyOC0yNCkvMiA9IDJweCBtYXJnaW5cblx0Ly8gaXMgYXBwbGllZCB0byBrZWVwIHRoZSBjb3JyZWN0IGFsaWdubWVudCBiZXR3ZWVuIHRoZSB0ZXh0IGFuZCB0aGUgY2hlY2ttYXJrLlxuXHRhbGlnbi1zZWxmOiBzdGFydDtcblx0bWFyZ2luLWJsb2NrLXN0YXJ0OiAycHg7XG5cblx0Ly8gU2luY2UgdGhlIGNoZWNrbWFyaydzIGRpbWVuc2lvbnMgYXJlIGFwcGxpZWQgd2l0aCAnZW0nIHVuaXRzLCBzZXR0aW5nIGFcblx0Ly8gZm9udCBzaXplIG9mIDAgYWxsb3dzIHRoZSBzcGFjZSByZXNlcnZlZCBmb3IgdGhlIGNoZWNrbWFyayB0byBjb2xsYXBzZSBmb3Jcblx0Ly8gaXRlbXMgdGhhdCBhcmUgbm90IHNlbGVjdGVkIG9yIHRoYXQgZG9uJ3QgaGF2ZSBhbiBhc3NvY2lhdGVkIGl0ZW0gaGludC5cblx0Zm9udC1zaXplOiAwO1xuXHQkeyBXaXRoSGludEl0ZW1XcmFwcGVyIH0gfiAmLFxuXHQmOm5vdCg6ZW1wdHkpIHtcblx0XHRmb250LXNpemU6IDI0cHg7IC8vIFNpemUgb2YgY2hlY2ttYXJrIGljb25cblx0fVxuYDtcbiJdfQ== */"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzRXNCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzLCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgY2hldnJvbkljb25TaXplIH0gZnJvbSAnLi4vc2VsZWN0LWNvbnRyb2wvc3R5bGVzL3NlbGVjdC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgeyBmb250U2l6ZVN0eWxlcyB9IGZyb20gJy4uL2lucHV0LWNvbnRyb2wvc3R5bGVzL2lucHV0LWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB7IERST1BET1dOX01PVElPTl9DU1MgfSBmcm9tICcuLi91dGlscy9zdHlsZS1taXhpbnMnO1xuaW1wb3J0IHR5cGUgeyBDdXN0b21TZWxlY3RCdXR0b25TaXplIH0gZnJvbSAnLi90eXBlcyc7XG5cbmNvbnN0IElOTElORV9QQURESU5HID0ge1xuXHRjb21wYWN0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdHNtYWxsOiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdGRlZmF1bHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG59O1xuXG5jb25zdCBnZXRTZWxlY3RTaXplID0gKFxuXHRzaXplOiBOb25OdWxsYWJsZTwgQ3VzdG9tU2VsZWN0QnV0dG9uU2l6ZVsgJ3NpemUnIF0gPixcblx0aGVpZ2h0UHJvcGVydHk6ICdtaW5IZWlnaHQnIHwgJ2hlaWdodCdcbikgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRjb21wYWN0OiB7XG5cdFx0XHRbIGhlaWdodFByb3BlcnR5IF06IDMyLFxuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5jb21wYWN0LFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuY29tcGFjdCArIGNoZXZyb25JY29uU2l6ZSxcblx0XHR9LFxuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdFsgaGVpZ2h0UHJvcGVydHkgXTogNDAsXG5cdFx0XHRwYWRkaW5nSW5saW5lU3RhcnQ6IElOTElORV9QQURESU5HLmRlZmF1bHQsXG5cdFx0XHRwYWRkaW5nSW5saW5lRW5kOiBJTkxJTkVfUEFERElORy5kZWZhdWx0ICsgY2hldnJvbkljb25TaXplLFxuXHRcdH0sXG5cdFx0c21hbGw6IHtcblx0XHRcdFsgaGVpZ2h0UHJvcGVydHkgXTogMjQsXG5cdFx0XHRwYWRkaW5nSW5saW5lU3RhcnQ6IElOTElORV9QQURESU5HLnNtYWxsLFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuc21hbGwgKyBjaGV2cm9uSWNvblNpemUsXG5cdFx0fSxcblx0fTtcblxuXHRyZXR1cm4gc2l6ZXNbIHNpemUgXSB8fCBzaXplcy5kZWZhdWx0O1xufTtcblxuY29uc3QgZ2V0U2VsZWN0SXRlbVNpemUgPSAoXG5cdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+XG4pID0+IHtcblx0Ly8gVXNlZCB0byB2aXN1YWxseSBhbGlnbiB0aGUgY2hlY2ttYXJrIHdpdGggdGhlIGNoZXZyb25cblx0Y29uc3QgY2hlY2ttYXJrQ29ycmVjdGlvbiA9IDY7XG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdHBhZGRpbmdJbmxpbmVTdGFydDogSU5MSU5FX1BBRERJTkcuY29tcGFjdCxcblx0XHRcdHBhZGRpbmdJbmxpbmVFbmQ6IElOTElORV9QQURESU5HLmNvbXBhY3QgLSBjaGVja21hcmtDb3JyZWN0aW9uLFxuXHRcdH0sXG5cdFx0ZGVmYXVsdDoge1xuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5kZWZhdWx0LFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuZGVmYXVsdCAtIGNoZWNrbWFya0NvcnJlY3Rpb24sXG5cdFx0fSxcblx0XHRzbWFsbDoge1xuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5zbWFsbCxcblx0XHRcdHBhZGRpbmdJbmxpbmVFbmQ6IElOTElORV9QQURESU5HLnNtYWxsIC0gY2hlY2ttYXJrQ29ycmVjdGlvbixcblx0XHR9LFxuXHR9O1xuXG5cdHJldHVybiBzaXplc1sgc2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG59O1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdCwge1xuXHQvLyBEbyBub3QgZm9yd2FyZCBgaGFzQ3VzdG9tUmVuZGVyUHJvcGAgdG8gdGhlIHVuZGVybHlpbmcgQXJpYWtpdC5TZWxlY3QgY29tcG9uZW50XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3AgKSA9PiBwcm9wICE9PSAnaGFzQ3VzdG9tUmVuZGVyUHJvcCcsXG59ICkoXG5cdCgge1xuXHRcdHNpemUsXG5cdFx0aGFzQ3VzdG9tUmVuZGVyUHJvcCxcblx0fToge1xuXHRcdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+O1xuXHRcdGhhc0N1c3RvbVJlbmRlclByb3A6IGJvb2xlYW47XG5cdH0gKSA9PiBjc3NgXG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmJhY2tncm91bmQgfTtcblx0XHRib3JkZXI6IG5vbmU7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdFx0Y3Vyc29yOiBwb2ludGVyO1xuXHRcdGZvbnQtZmFtaWx5OiBpbmhlcml0O1xuXHRcdHRleHQtYWxpZ246IHN0YXJ0O1xuXHRcdHVzZXItc2VsZWN0OiBub25lO1xuXHRcdHdpZHRoOiAxMDAlO1xuXG5cdFx0JltkYXRhLWZvY3VzLXZpc2libGVdIHtcblx0XHRcdG91dGxpbmU6IG5vbmU7IC8vIGhhbmRsZWQgYnkgSW5wdXRCYXNlIGNvbXBvbmVudFxuXHRcdH1cblxuXHRcdCR7IGdldFNlbGVjdFNpemUoIHNpemUsIGhhc0N1c3RvbVJlbmRlclByb3AgPyAnbWluSGVpZ2h0JyA6ICdoZWlnaHQnICkgfVxuXHRcdCR7ICEgaGFzQ3VzdG9tUmVuZGVyUHJvcCAmJiB0cnVuY2F0ZVN0eWxlcyB9XG5cdFx0JHsgZm9udFNpemVTdHlsZXMoIHsgaW5wdXRTaXplOiBzaXplIH0gKSB9XG5cdGBcbik7XG5cbmNvbnN0IHNsaWRlRG93biA9IGtleWZyYW1lcygge1xuXHQnMCUnOiB7IHRyYW5zZm9ybTogYHRyYW5zbGF0ZVkoLSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfSlgIH0sXG5cdCcxMDAlJzogeyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVZKDApJyB9LFxufSApO1xuXG5jb25zdCBmYWRlSW4gPSBrZXlmcmFtZXMoIHtcblx0JzAlJzogeyBvcGFjaXR5OiAwIH0sXG5cdCcxMDAlJzogeyBvcGFjaXR5OiAxIH0sXG59ICk7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RQb3BvdmVyID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdFBvcG92ZXIgKWBcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYmFja2dyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0Ym94LXNoYWRvdzogJHsgQ09ORklHLmVsZXZhdGlvbk1lZGl1bSB9O1xuXG5cdC8qIHotaW5kZXgoXCIuY29tcG9uZW50cy1wb3BvdmVyXCIpICovXG5cdHotaW5kZXg6IDEwMDAwMDA7XG5cblx0bWF4LWhlaWdodDogbWluKCB2YXIoIC0tcG9wb3Zlci1hdmFpbGFibGUtaGVpZ2h0LCA0MDBweCApLCA0MDBweCApO1xuXHRvdmVyZmxvdzogYXV0bztcblx0b3ZlcnNjcm9sbC1iZWhhdmlvcjogY29udGFpbjtcblxuXHQvKiBUaGUgc21hbGxlc3Qgc2l6ZSB3aXRob3V0IG92ZXJmbG93aW5nIHRoZSBjb250YWluZXIuICovXG5cdG1pbi13aWR0aDogbWluLWNvbnRlbnQ7XG5cblx0LyogQW5pbWF0aW9uICovXG5cdCZbZGF0YS1vcGVuXSB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHRhbmltYXRpb24tbmFtZTogJHsgc2xpZGVEb3duIH0sICR7IGZhZGVJbiB9O1xuXHRcdFx0YW5pbWF0aW9uLWR1cmF0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RVUkFUSU9OIH0sXG5cdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9EVVJBVElPTiB9O1xuXHRcdFx0YW5pbWF0aW9uLXRpbWluZy1mdW5jdGlvbjogJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9FQVNJTkcgfSxcblx0XHRcdFx0JHsgRFJPUERPV05fTU9USU9OX0NTUy5GQURFX0VBU0lORyB9O1xuXHRcdFx0d2lsbC1jaGFuZ2U6IHRyYW5zZm9ybSwgb3BhY2l0eTtcblx0XHR9XG5cdH1cblxuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdC8qIFRoZSBvdXRsaW5lIHdpbGwgYmUgb24gdGhlIHRyaWdnZXIsIHJhdGhlciB0aGFuIHRoZSBwb3BvdmVyLiAqL1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RJdGVtID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdEl0ZW0gKShcblx0KCB7XG5cdFx0c2l6ZSxcblx0fToge1xuXHRcdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+O1xuXHR9ICkgPT4gY3NzYFxuXHRcdGN1cnNvcjogZGVmYXVsdDtcblx0XHRkaXNwbGF5OiBmbGV4O1xuXHRcdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdFx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRcdGZvbnQtc2l6ZTogJHsgQ09ORklHLmZvbnRTaXplIH07XG5cdFx0Ly8gVE9ETzogcmVhc3Nlc3MgbGluZS1oZWlnaHQgZm9yIG5vbi1sZWdhY3kgdjJcblx0XHRsaW5lLWhlaWdodDogMjhweDtcblx0XHRwYWRkaW5nLWJsb2NrOiAkeyBzcGFjZSggMiApIH07XG5cdFx0c2Nyb2xsLW1hcmdpbjogJHsgc3BhY2UoIDEgKSB9O1xuXHRcdHVzZXItc2VsZWN0OiBub25lO1xuXG5cdFx0JlthcmlhLWRpc2FibGVkPSd0cnVlJ10ge1xuXHRcdFx0Y3Vyc29yOiBub3QtYWxsb3dlZDtcblx0XHR9XG5cblx0XHQmW2RhdGEtYWN0aXZlLWl0ZW1dIHtcblx0XHRcdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRcdH1cblxuXHRcdCR7IGdldFNlbGVjdEl0ZW1TaXplKCBzaXplICkgfVxuXHRgXG4pO1xuXG5jb25zdCB0cnVuY2F0ZVN0eWxlcyA9IGNzc2Bcblx0b3ZlcmZsb3c6IGhpZGRlbjtcblx0dGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ZWRFeHBlcmltZW50YWxIaW50V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdCR7IHRydW5jYXRlU3R5bGVzIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RlZEV4cGVyaW1lbnRhbEhpbnRJdGVtID0gc3R5bGVkLnNwYW5gXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZ3JheVsgNjAwIF0gfTtcblx0bWFyZ2luLWlubGluZS1zdGFydDogJHsgc3BhY2UoIDIgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFdpdGhIaW50SXRlbVdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGZsZXgtd3JhcDogd3JhcDtcblx0ZmxleDogMTtcblx0Y29sdW1uLWdhcDogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFdpdGhIaW50SXRlbUhpbnQgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyA2MDAgXSB9O1xuXHR0ZXh0LWFsaWduOiBpbml0aWFsO1xuXHRsaW5lLWhlaWdodDogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9O1xuXHRwYWRkaW5nLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAxICkgfTtcblx0bWFyZ2luLWJsb2NrOiAkeyBzcGFjZSggMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ZWRJdGVtQ2hlY2sgPSBzdHlsZWQoIEFyaWFraXQuU2VsZWN0SXRlbUNoZWNrIClgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdG1hcmdpbi1pbmxpbmUtc3RhcnQ6ICR7IHNwYWNlKCAyICkgfTtcblx0ZmlsbDogY3VycmVudENvbG9yO1xuXG5cdC8vIEtlZXAgdGhlIGNoZWNrbWFyayB2ZXJ0aWNhbGx5IGFsaWduZWQgYXQgdGhlIHRvcC4gU2luY2UgdGhlIGl0ZW0gdGV4dCBoYXMgYVxuXHQvLyAyOHB4IGxpbmUgaGVpZ2h0IGFuZCB0aGUgY2hlY2ttYXJrIGlzIDI0cHggdGFsbCwgYSAoMjgtMjQpLzIgPSAycHggbWFyZ2luXG5cdC8vIGlzIGFwcGxpZWQgdG8ga2VlcCB0aGUgY29ycmVjdCBhbGlnbm1lbnQgYmV0d2VlbiB0aGUgdGV4dCBhbmQgdGhlIGNoZWNrbWFyay5cblx0YWxpZ24tc2VsZjogc3RhcnQ7XG5cdG1hcmdpbi1ibG9jay1zdGFydDogMnB4O1xuXG5cdC8vIFNpbmNlIHRoZSBjaGVja21hcmsncyBkaW1lbnNpb25zIGFyZSBhcHBsaWVkIHdpdGggJ2VtJyB1bml0cywgc2V0dGluZyBhXG5cdC8vIGZvbnQgc2l6ZSBvZiAwIGFsbG93cyB0aGUgc3BhY2UgcmVzZXJ2ZWQgZm9yIHRoZSBjaGVja21hcmsgdG8gY29sbGFwc2UgZm9yXG5cdC8vIGl0ZW1zIHRoYXQgYXJlIG5vdCBzZWxlY3RlZCBvciB0aGF0IGRvbid0IGhhdmUgYW4gYXNzb2NpYXRlZCBpdGVtIGhpbnQuXG5cdGZvbnQtc2l6ZTogMDtcblx0JHsgV2l0aEhpbnRJdGVtV3JhcHBlciB9IH4gJixcblx0Jjpub3QoOmVtcHR5KSB7XG5cdFx0Zm9udC1zaXplOiAyNHB4OyAvLyBTaXplIG9mIGNoZWNrbWFyayBpY29uXG5cdH1cbmA7XG4iXX0= */");
  var slideDown = keyframes2({
    "0%": {
      transform: `translateY(-${DROPDOWN_MOTION_CSS.SLIDE_DISTANCE})`
    },
    "100%": {
      transform: "translateY(0)"
    }
  });
  var fadeIn = keyframes2({
    "0%": {
      opacity: 0
    },
    "100%": {
      opacity: 1
    }
  });
  var SelectPopover22 = /* @__PURE__ */ createStyled(SelectPopover, false ? {
    target: "e1p3eej76"
  } : {
    target: "e1p3eej76",
    label: "SelectPopover"
  })("display:flex;flex-direction:column;background-color:", COLORS.theme.background, ";border-radius:", config_values_default.radiusSmall, ";border:1px solid ", COLORS.theme.foreground, ";box-shadow:", config_values_default.elevationMedium, ";z-index:1000000;max-height:min( var( --popover-available-height, 400px ), 400px );overflow:auto;overscroll-behavior:contain;min-width:min-content;&[data-open]{@media not ( prefers-reduced-motion ){animation-name:", slideDown, ",", fadeIn, ";animation-duration:", DROPDOWN_MOTION_CSS.SLIDE_DURATION, ",", DROPDOWN_MOTION_CSS.FADE_DURATION, ";animation-timing-function:", DROPDOWN_MOTION_CSS.SLIDE_EASING, ",", DROPDOWN_MOTION_CSS.FADE_EASING, ";will-change:transform,opacity;}}&[data-focus-visible]{outline:none;}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUErRzREIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzLCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgY2hldnJvbkljb25TaXplIH0gZnJvbSAnLi4vc2VsZWN0LWNvbnRyb2wvc3R5bGVzL3NlbGVjdC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgeyBmb250U2l6ZVN0eWxlcyB9IGZyb20gJy4uL2lucHV0LWNvbnRyb2wvc3R5bGVzL2lucHV0LWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB7IERST1BET1dOX01PVElPTl9DU1MgfSBmcm9tICcuLi91dGlscy9zdHlsZS1taXhpbnMnO1xuaW1wb3J0IHR5cGUgeyBDdXN0b21TZWxlY3RCdXR0b25TaXplIH0gZnJvbSAnLi90eXBlcyc7XG5cbmNvbnN0IElOTElORV9QQURESU5HID0ge1xuXHRjb21wYWN0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdHNtYWxsOiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdGRlZmF1bHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG59O1xuXG5jb25zdCBnZXRTZWxlY3RTaXplID0gKFxuXHRzaXplOiBOb25OdWxsYWJsZTwgQ3VzdG9tU2VsZWN0QnV0dG9uU2l6ZVsgJ3NpemUnIF0gPixcblx0aGVpZ2h0UHJvcGVydHk6ICdtaW5IZWlnaHQnIHwgJ2hlaWdodCdcbikgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRjb21wYWN0OiB7XG5cdFx0XHRbIGhlaWdodFByb3BlcnR5IF06IDMyLFxuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5jb21wYWN0LFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuY29tcGFjdCArIGNoZXZyb25JY29uU2l6ZSxcblx0XHR9LFxuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdFsgaGVpZ2h0UHJvcGVydHkgXTogNDAsXG5cdFx0XHRwYWRkaW5nSW5saW5lU3RhcnQ6IElOTElORV9QQURESU5HLmRlZmF1bHQsXG5cdFx0XHRwYWRkaW5nSW5saW5lRW5kOiBJTkxJTkVfUEFERElORy5kZWZhdWx0ICsgY2hldnJvbkljb25TaXplLFxuXHRcdH0sXG5cdFx0c21hbGw6IHtcblx0XHRcdFsgaGVpZ2h0UHJvcGVydHkgXTogMjQsXG5cdFx0XHRwYWRkaW5nSW5saW5lU3RhcnQ6IElOTElORV9QQURESU5HLnNtYWxsLFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuc21hbGwgKyBjaGV2cm9uSWNvblNpemUsXG5cdFx0fSxcblx0fTtcblxuXHRyZXR1cm4gc2l6ZXNbIHNpemUgXSB8fCBzaXplcy5kZWZhdWx0O1xufTtcblxuY29uc3QgZ2V0U2VsZWN0SXRlbVNpemUgPSAoXG5cdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+XG4pID0+IHtcblx0Ly8gVXNlZCB0byB2aXN1YWxseSBhbGlnbiB0aGUgY2hlY2ttYXJrIHdpdGggdGhlIGNoZXZyb25cblx0Y29uc3QgY2hlY2ttYXJrQ29ycmVjdGlvbiA9IDY7XG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdHBhZGRpbmdJbmxpbmVTdGFydDogSU5MSU5FX1BBRERJTkcuY29tcGFjdCxcblx0XHRcdHBhZGRpbmdJbmxpbmVFbmQ6IElOTElORV9QQURESU5HLmNvbXBhY3QgLSBjaGVja21hcmtDb3JyZWN0aW9uLFxuXHRcdH0sXG5cdFx0ZGVmYXVsdDoge1xuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5kZWZhdWx0LFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuZGVmYXVsdCAtIGNoZWNrbWFya0NvcnJlY3Rpb24sXG5cdFx0fSxcblx0XHRzbWFsbDoge1xuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5zbWFsbCxcblx0XHRcdHBhZGRpbmdJbmxpbmVFbmQ6IElOTElORV9QQURESU5HLnNtYWxsIC0gY2hlY2ttYXJrQ29ycmVjdGlvbixcblx0XHR9LFxuXHR9O1xuXG5cdHJldHVybiBzaXplc1sgc2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG59O1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdCwge1xuXHQvLyBEbyBub3QgZm9yd2FyZCBgaGFzQ3VzdG9tUmVuZGVyUHJvcGAgdG8gdGhlIHVuZGVybHlpbmcgQXJpYWtpdC5TZWxlY3QgY29tcG9uZW50XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3AgKSA9PiBwcm9wICE9PSAnaGFzQ3VzdG9tUmVuZGVyUHJvcCcsXG59ICkoXG5cdCgge1xuXHRcdHNpemUsXG5cdFx0aGFzQ3VzdG9tUmVuZGVyUHJvcCxcblx0fToge1xuXHRcdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+O1xuXHRcdGhhc0N1c3RvbVJlbmRlclByb3A6IGJvb2xlYW47XG5cdH0gKSA9PiBjc3NgXG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmJhY2tncm91bmQgfTtcblx0XHRib3JkZXI6IG5vbmU7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdFx0Y3Vyc29yOiBwb2ludGVyO1xuXHRcdGZvbnQtZmFtaWx5OiBpbmhlcml0O1xuXHRcdHRleHQtYWxpZ246IHN0YXJ0O1xuXHRcdHVzZXItc2VsZWN0OiBub25lO1xuXHRcdHdpZHRoOiAxMDAlO1xuXG5cdFx0JltkYXRhLWZvY3VzLXZpc2libGVdIHtcblx0XHRcdG91dGxpbmU6IG5vbmU7IC8vIGhhbmRsZWQgYnkgSW5wdXRCYXNlIGNvbXBvbmVudFxuXHRcdH1cblxuXHRcdCR7IGdldFNlbGVjdFNpemUoIHNpemUsIGhhc0N1c3RvbVJlbmRlclByb3AgPyAnbWluSGVpZ2h0JyA6ICdoZWlnaHQnICkgfVxuXHRcdCR7ICEgaGFzQ3VzdG9tUmVuZGVyUHJvcCAmJiB0cnVuY2F0ZVN0eWxlcyB9XG5cdFx0JHsgZm9udFNpemVTdHlsZXMoIHsgaW5wdXRTaXplOiBzaXplIH0gKSB9XG5cdGBcbik7XG5cbmNvbnN0IHNsaWRlRG93biA9IGtleWZyYW1lcygge1xuXHQnMCUnOiB7IHRyYW5zZm9ybTogYHRyYW5zbGF0ZVkoLSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfSlgIH0sXG5cdCcxMDAlJzogeyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVZKDApJyB9LFxufSApO1xuXG5jb25zdCBmYWRlSW4gPSBrZXlmcmFtZXMoIHtcblx0JzAlJzogeyBvcGFjaXR5OiAwIH0sXG5cdCcxMDAlJzogeyBvcGFjaXR5OiAxIH0sXG59ICk7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RQb3BvdmVyID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdFBvcG92ZXIgKWBcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYmFja2dyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0Ym94LXNoYWRvdzogJHsgQ09ORklHLmVsZXZhdGlvbk1lZGl1bSB9O1xuXG5cdC8qIHotaW5kZXgoXCIuY29tcG9uZW50cy1wb3BvdmVyXCIpICovXG5cdHotaW5kZXg6IDEwMDAwMDA7XG5cblx0bWF4LWhlaWdodDogbWluKCB2YXIoIC0tcG9wb3Zlci1hdmFpbGFibGUtaGVpZ2h0LCA0MDBweCApLCA0MDBweCApO1xuXHRvdmVyZmxvdzogYXV0bztcblx0b3ZlcnNjcm9sbC1iZWhhdmlvcjogY29udGFpbjtcblxuXHQvKiBUaGUgc21hbGxlc3Qgc2l6ZSB3aXRob3V0IG92ZXJmbG93aW5nIHRoZSBjb250YWluZXIuICovXG5cdG1pbi13aWR0aDogbWluLWNvbnRlbnQ7XG5cblx0LyogQW5pbWF0aW9uICovXG5cdCZbZGF0YS1vcGVuXSB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHRhbmltYXRpb24tbmFtZTogJHsgc2xpZGVEb3duIH0sICR7IGZhZGVJbiB9O1xuXHRcdFx0YW5pbWF0aW9uLWR1cmF0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RVUkFUSU9OIH0sXG5cdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9EVVJBVElPTiB9O1xuXHRcdFx0YW5pbWF0aW9uLXRpbWluZy1mdW5jdGlvbjogJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9FQVNJTkcgfSxcblx0XHRcdFx0JHsgRFJPUERPV05fTU9USU9OX0NTUy5GQURFX0VBU0lORyB9O1xuXHRcdFx0d2lsbC1jaGFuZ2U6IHRyYW5zZm9ybSwgb3BhY2l0eTtcblx0XHR9XG5cdH1cblxuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdC8qIFRoZSBvdXRsaW5lIHdpbGwgYmUgb24gdGhlIHRyaWdnZXIsIHJhdGhlciB0aGFuIHRoZSBwb3BvdmVyLiAqL1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RJdGVtID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdEl0ZW0gKShcblx0KCB7XG5cdFx0c2l6ZSxcblx0fToge1xuXHRcdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+O1xuXHR9ICkgPT4gY3NzYFxuXHRcdGN1cnNvcjogZGVmYXVsdDtcblx0XHRkaXNwbGF5OiBmbGV4O1xuXHRcdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdFx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRcdGZvbnQtc2l6ZTogJHsgQ09ORklHLmZvbnRTaXplIH07XG5cdFx0Ly8gVE9ETzogcmVhc3Nlc3MgbGluZS1oZWlnaHQgZm9yIG5vbi1sZWdhY3kgdjJcblx0XHRsaW5lLWhlaWdodDogMjhweDtcblx0XHRwYWRkaW5nLWJsb2NrOiAkeyBzcGFjZSggMiApIH07XG5cdFx0c2Nyb2xsLW1hcmdpbjogJHsgc3BhY2UoIDEgKSB9O1xuXHRcdHVzZXItc2VsZWN0OiBub25lO1xuXG5cdFx0JlthcmlhLWRpc2FibGVkPSd0cnVlJ10ge1xuXHRcdFx0Y3Vyc29yOiBub3QtYWxsb3dlZDtcblx0XHR9XG5cblx0XHQmW2RhdGEtYWN0aXZlLWl0ZW1dIHtcblx0XHRcdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRcdH1cblxuXHRcdCR7IGdldFNlbGVjdEl0ZW1TaXplKCBzaXplICkgfVxuXHRgXG4pO1xuXG5jb25zdCB0cnVuY2F0ZVN0eWxlcyA9IGNzc2Bcblx0b3ZlcmZsb3c6IGhpZGRlbjtcblx0dGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ZWRFeHBlcmltZW50YWxIaW50V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdCR7IHRydW5jYXRlU3R5bGVzIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RlZEV4cGVyaW1lbnRhbEhpbnRJdGVtID0gc3R5bGVkLnNwYW5gXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZ3JheVsgNjAwIF0gfTtcblx0bWFyZ2luLWlubGluZS1zdGFydDogJHsgc3BhY2UoIDIgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFdpdGhIaW50SXRlbVdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGZsZXgtd3JhcDogd3JhcDtcblx0ZmxleDogMTtcblx0Y29sdW1uLWdhcDogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFdpdGhIaW50SXRlbUhpbnQgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyA2MDAgXSB9O1xuXHR0ZXh0LWFsaWduOiBpbml0aWFsO1xuXHRsaW5lLWhlaWdodDogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9O1xuXHRwYWRkaW5nLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAxICkgfTtcblx0bWFyZ2luLWJsb2NrOiAkeyBzcGFjZSggMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ZWRJdGVtQ2hlY2sgPSBzdHlsZWQoIEFyaWFraXQuU2VsZWN0SXRlbUNoZWNrIClgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdG1hcmdpbi1pbmxpbmUtc3RhcnQ6ICR7IHNwYWNlKCAyICkgfTtcblx0ZmlsbDogY3VycmVudENvbG9yO1xuXG5cdC8vIEtlZXAgdGhlIGNoZWNrbWFyayB2ZXJ0aWNhbGx5IGFsaWduZWQgYXQgdGhlIHRvcC4gU2luY2UgdGhlIGl0ZW0gdGV4dCBoYXMgYVxuXHQvLyAyOHB4IGxpbmUgaGVpZ2h0IGFuZCB0aGUgY2hlY2ttYXJrIGlzIDI0cHggdGFsbCwgYSAoMjgtMjQpLzIgPSAycHggbWFyZ2luXG5cdC8vIGlzIGFwcGxpZWQgdG8ga2VlcCB0aGUgY29ycmVjdCBhbGlnbm1lbnQgYmV0d2VlbiB0aGUgdGV4dCBhbmQgdGhlIGNoZWNrbWFyay5cblx0YWxpZ24tc2VsZjogc3RhcnQ7XG5cdG1hcmdpbi1ibG9jay1zdGFydDogMnB4O1xuXG5cdC8vIFNpbmNlIHRoZSBjaGVja21hcmsncyBkaW1lbnNpb25zIGFyZSBhcHBsaWVkIHdpdGggJ2VtJyB1bml0cywgc2V0dGluZyBhXG5cdC8vIGZvbnQgc2l6ZSBvZiAwIGFsbG93cyB0aGUgc3BhY2UgcmVzZXJ2ZWQgZm9yIHRoZSBjaGVja21hcmsgdG8gY29sbGFwc2UgZm9yXG5cdC8vIGl0ZW1zIHRoYXQgYXJlIG5vdCBzZWxlY3RlZCBvciB0aGF0IGRvbid0IGhhdmUgYW4gYXNzb2NpYXRlZCBpdGVtIGhpbnQuXG5cdGZvbnQtc2l6ZTogMDtcblx0JHsgV2l0aEhpbnRJdGVtV3JhcHBlciB9IH4gJixcblx0Jjpub3QoOmVtcHR5KSB7XG5cdFx0Zm9udC1zaXplOiAyNHB4OyAvLyBTaXplIG9mIGNoZWNrbWFyayBpY29uXG5cdH1cbmA7XG4iXX0= */"));
  var SelectItem22 = /* @__PURE__ */ createStyled(SelectItem, false ? {
    target: "e1p3eej75"
  } : {
    target: "e1p3eej75",
    label: "SelectItem"
  })(({
    size: size3
  }) => /* @__PURE__ */ css("cursor:default;display:flex;align-items:center;justify-content:space-between;font-size:", config_values_default.fontSize, ";line-height:28px;padding-block:", space(2), ";scroll-margin:", space(1), ";user-select:none;&[aria-disabled='true']{cursor:not-allowed;}&[data-active-item]{background-color:", COLORS.theme.gray[300], ";}", getSelectItemSize(size3), ";" + (false ? "" : ";label:SelectItem;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF5SlciLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0ICogYXMgQXJpYWtpdCBmcm9tICdAYXJpYWtpdC9yZWFjdCc7XG5pbXBvcnQgeyBjc3MsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IENPTE9SUywgQ09ORklHIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgeyBjaGV2cm9uSWNvblNpemUgfSBmcm9tICcuLi9zZWxlY3QtY29udHJvbC9zdHlsZXMvc2VsZWN0LWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB7IGZvbnRTaXplU3R5bGVzIH0gZnJvbSAnLi4vaW5wdXQtY29udHJvbC9zdHlsZXMvaW5wdXQtY29udHJvbC1zdHlsZXMnO1xuaW1wb3J0IHsgRFJPUERPV05fTU9USU9OX0NTUyB9IGZyb20gJy4uL3V0aWxzL3N0eWxlLW1peGlucyc7XG5pbXBvcnQgdHlwZSB7IEN1c3RvbVNlbGVjdEJ1dHRvblNpemUgfSBmcm9tICcuL3R5cGVzJztcblxuY29uc3QgSU5MSU5FX1BBRERJTkcgPSB7XG5cdGNvbXBhY3Q6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0c21hbGw6IENPTkZJRy5jb250cm9sUGFkZGluZ1hTbWFsbCxcblx0ZGVmYXVsdDogQ09ORklHLmNvbnRyb2xQYWRkaW5nWCxcbn07XG5cbmNvbnN0IGdldFNlbGVjdFNpemUgPSAoXG5cdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+LFxuXHRoZWlnaHRQcm9wZXJ0eTogJ21pbkhlaWdodCcgfCAnaGVpZ2h0J1xuKSA9PiB7XG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdFsgaGVpZ2h0UHJvcGVydHkgXTogMzIsXG5cdFx0XHRwYWRkaW5nSW5saW5lU3RhcnQ6IElOTElORV9QQURESU5HLmNvbXBhY3QsXG5cdFx0XHRwYWRkaW5nSW5saW5lRW5kOiBJTkxJTkVfUEFERElORy5jb21wYWN0ICsgY2hldnJvbkljb25TaXplLFxuXHRcdH0sXG5cdFx0ZGVmYXVsdDoge1xuXHRcdFx0WyBoZWlnaHRQcm9wZXJ0eSBdOiA0MCxcblx0XHRcdHBhZGRpbmdJbmxpbmVTdGFydDogSU5MSU5FX1BBRERJTkcuZGVmYXVsdCxcblx0XHRcdHBhZGRpbmdJbmxpbmVFbmQ6IElOTElORV9QQURESU5HLmRlZmF1bHQgKyBjaGV2cm9uSWNvblNpemUsXG5cdFx0fSxcblx0XHRzbWFsbDoge1xuXHRcdFx0WyBoZWlnaHRQcm9wZXJ0eSBdOiAyNCxcblx0XHRcdHBhZGRpbmdJbmxpbmVTdGFydDogSU5MSU5FX1BBRERJTkcuc21hbGwsXG5cdFx0XHRwYWRkaW5nSW5saW5lRW5kOiBJTkxJTkVfUEFERElORy5zbWFsbCArIGNoZXZyb25JY29uU2l6ZSxcblx0XHR9LFxuXHR9O1xuXG5cdHJldHVybiBzaXplc1sgc2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG59O1xuXG5jb25zdCBnZXRTZWxlY3RJdGVtU2l6ZSA9IChcblx0c2l6ZTogTm9uTnVsbGFibGU8IEN1c3RvbVNlbGVjdEJ1dHRvblNpemVbICdzaXplJyBdID5cbikgPT4ge1xuXHQvLyBVc2VkIHRvIHZpc3VhbGx5IGFsaWduIHRoZSBjaGVja21hcmsgd2l0aCB0aGUgY2hldnJvblxuXHRjb25zdCBjaGVja21hcmtDb3JyZWN0aW9uID0gNjtcblx0Y29uc3Qgc2l6ZXMgPSB7XG5cdFx0Y29tcGFjdDoge1xuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5jb21wYWN0LFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuY29tcGFjdCAtIGNoZWNrbWFya0NvcnJlY3Rpb24sXG5cdFx0fSxcblx0XHRkZWZhdWx0OiB7XG5cdFx0XHRwYWRkaW5nSW5saW5lU3RhcnQ6IElOTElORV9QQURESU5HLmRlZmF1bHQsXG5cdFx0XHRwYWRkaW5nSW5saW5lRW5kOiBJTkxJTkVfUEFERElORy5kZWZhdWx0IC0gY2hlY2ttYXJrQ29ycmVjdGlvbixcblx0XHR9LFxuXHRcdHNtYWxsOiB7XG5cdFx0XHRwYWRkaW5nSW5saW5lU3RhcnQ6IElOTElORV9QQURESU5HLnNtYWxsLFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuc21hbGwgLSBjaGVja21hcmtDb3JyZWN0aW9uLFxuXHRcdH0sXG5cdH07XG5cblx0cmV0dXJuIHNpemVzWyBzaXplIF0gfHwgc2l6ZXMuZGVmYXVsdDtcbn07XG5cbmV4cG9ydCBjb25zdCBTZWxlY3QgPSBzdHlsZWQoIEFyaWFraXQuU2VsZWN0LCB7XG5cdC8vIERvIG5vdCBmb3J3YXJkIGBoYXNDdXN0b21SZW5kZXJQcm9wYCB0byB0aGUgdW5kZXJseWluZyBBcmlha2l0LlNlbGVjdCBjb21wb25lbnRcblx0c2hvdWxkRm9yd2FyZFByb3A6ICggcHJvcCApID0+IHByb3AgIT09ICdoYXNDdXN0b21SZW5kZXJQcm9wJyxcbn0gKShcblx0KCB7XG5cdFx0c2l6ZSxcblx0XHRoYXNDdXN0b21SZW5kZXJQcm9wLFxuXHR9OiB7XG5cdFx0c2l6ZTogTm9uTnVsbGFibGU8IEN1c3RvbVNlbGVjdEJ1dHRvblNpemVbICdzaXplJyBdID47XG5cdFx0aGFzQ3VzdG9tUmVuZGVyUHJvcDogYm9vbGVhbjtcblx0fSApID0+IGNzc2Bcblx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYmFja2dyb3VuZCB9O1xuXHRcdGJvcmRlcjogbm9uZTtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0XHRjdXJzb3I6IHBvaW50ZXI7XG5cdFx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdFx0dGV4dC1hbGlnbjogc3RhcnQ7XG5cdFx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdFx0d2lkdGg6IDEwMCU7XG5cblx0XHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdFx0b3V0bGluZTogbm9uZTsgLy8gaGFuZGxlZCBieSBJbnB1dEJhc2UgY29tcG9uZW50XG5cdFx0fVxuXG5cdFx0JHsgZ2V0U2VsZWN0U2l6ZSggc2l6ZSwgaGFzQ3VzdG9tUmVuZGVyUHJvcCA/ICdtaW5IZWlnaHQnIDogJ2hlaWdodCcgKSB9XG5cdFx0JHsgISBoYXNDdXN0b21SZW5kZXJQcm9wICYmIHRydW5jYXRlU3R5bGVzIH1cblx0XHQkeyBmb250U2l6ZVN0eWxlcyggeyBpbnB1dFNpemU6IHNpemUgfSApIH1cblx0YFxuKTtcblxuY29uc3Qgc2xpZGVEb3duID0ga2V5ZnJhbWVzKCB7XG5cdCcwJSc6IHsgdHJhbnNmb3JtOiBgdHJhbnNsYXRlWSgtJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9ESVNUQU5DRSB9KWAgfSxcblx0JzEwMCUnOiB7IHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVkoMCknIH0sXG59ICk7XG5cbmNvbnN0IGZhZGVJbiA9IGtleWZyYW1lcygge1xuXHQnMCUnOiB7IG9wYWNpdHk6IDAgfSxcblx0JzEwMCUnOiB7IG9wYWNpdHk6IDEgfSxcbn0gKTtcblxuZXhwb3J0IGNvbnN0IFNlbGVjdFBvcG92ZXIgPSBzdHlsZWQoIEFyaWFraXQuU2VsZWN0UG9wb3ZlciApYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXG5cdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy50aGVtZS5iYWNrZ3JvdW5kIH07XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRib3JkZXI6IDFweCBzb2xpZCAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9O1xuXHRib3gtc2hhZG93OiAkeyBDT05GSUcuZWxldmF0aW9uTWVkaXVtIH07XG5cblx0Lyogei1pbmRleChcIi5jb21wb25lbnRzLXBvcG92ZXJcIikgKi9cblx0ei1pbmRleDogMTAwMDAwMDtcblxuXHRtYXgtaGVpZ2h0OiBtaW4oIHZhciggLS1wb3BvdmVyLWF2YWlsYWJsZS1oZWlnaHQsIDQwMHB4ICksIDQwMHB4ICk7XG5cdG92ZXJmbG93OiBhdXRvO1xuXHRvdmVyc2Nyb2xsLWJlaGF2aW9yOiBjb250YWluO1xuXG5cdC8qIFRoZSBzbWFsbGVzdCBzaXplIHdpdGhvdXQgb3ZlcmZsb3dpbmcgdGhlIGNvbnRhaW5lci4gKi9cblx0bWluLXdpZHRoOiBtaW4tY29udGVudDtcblxuXHQvKiBBbmltYXRpb24gKi9cblx0JltkYXRhLW9wZW5dIHtcblx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdGFuaW1hdGlvbi1uYW1lOiAkeyBzbGlkZURvd24gfSwgJHsgZmFkZUluIH07XG5cdFx0XHRhbmltYXRpb24tZHVyYXRpb246ICR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRFVSQVRJT04gfSxcblx0XHRcdFx0JHsgRFJPUERPV05fTU9USU9OX0NTUy5GQURFX0RVUkFUSU9OIH07XG5cdFx0XHRhbmltYXRpb24tdGltaW5nLWZ1bmN0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0VBU0lORyB9LFxuXHRcdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLkZBREVfRUFTSU5HIH07XG5cdFx0XHR3aWxsLWNoYW5nZTogdHJhbnNmb3JtLCBvcGFjaXR5O1xuXHRcdH1cblx0fVxuXG5cdCZbZGF0YS1mb2N1cy12aXNpYmxlXSB7XG5cdFx0LyogVGhlIG91dGxpbmUgd2lsbCBiZSBvbiB0aGUgdHJpZ2dlciwgcmF0aGVyIHRoYW4gdGhlIHBvcG92ZXIuICovXG5cdFx0b3V0bGluZTogbm9uZTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFNlbGVjdEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuU2VsZWN0SXRlbSApKFxuXHQoIHtcblx0XHRzaXplLFxuXHR9OiB7XG5cdFx0c2l6ZTogTm9uTnVsbGFibGU8IEN1c3RvbVNlbGVjdEJ1dHRvblNpemVbICdzaXplJyBdID47XG5cdH0gKSA9PiBjc3NgXG5cdFx0Y3Vyc29yOiBkZWZhdWx0O1xuXHRcdGRpc3BsYXk6IGZsZXg7XG5cdFx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0XHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdFx0Zm9udC1zaXplOiAkeyBDT05GSUcuZm9udFNpemUgfTtcblx0XHQvLyBUT0RPOiByZWFzc2VzcyBsaW5lLWhlaWdodCBmb3Igbm9uLWxlZ2FjeSB2MlxuXHRcdGxpbmUtaGVpZ2h0OiAyOHB4O1xuXHRcdHBhZGRpbmctYmxvY2s6ICR7IHNwYWNlKCAyICkgfTtcblx0XHRzY3JvbGwtbWFyZ2luOiAkeyBzcGFjZSggMSApIH07XG5cdFx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cblx0XHQmW2FyaWEtZGlzYWJsZWQ9J3RydWUnXSB7XG5cdFx0XHRjdXJzb3I6IG5vdC1hbGxvd2VkO1xuXHRcdH1cblxuXHRcdCZbZGF0YS1hY3RpdmUtaXRlbV0ge1xuXHRcdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmdyYXlbIDMwMCBdIH07XG5cdFx0fVxuXG5cdFx0JHsgZ2V0U2VsZWN0SXRlbVNpemUoIHNpemUgKSB9XG5cdGBcbik7XG5cbmNvbnN0IHRydW5jYXRlU3R5bGVzID0gY3NzYFxuXHRvdmVyZmxvdzogaGlkZGVuO1xuXHR0ZXh0LW92ZXJmbG93OiBlbGxpcHNpcztcblx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcbmA7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RlZEV4cGVyaW1lbnRhbEhpbnRXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0JHsgdHJ1bmNhdGVTdHlsZXMgfVxuYDtcblxuZXhwb3J0IGNvbnN0IFNlbGVjdGVkRXhwZXJpbWVudGFsSGludEl0ZW0gPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyA2MDAgXSB9O1xuXHRtYXJnaW4taW5saW5lLXN0YXJ0OiAkeyBzcGFjZSggMiApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgV2l0aEhpbnRJdGVtV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2Vlbjtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZmxleC13cmFwOiB3cmFwO1xuXHRmbGV4OiAxO1xuXHRjb2x1bW4tZ2FwOiAkeyBzcGFjZSggNCApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgV2l0aEhpbnRJdGVtSGludCA9IHN0eWxlZC5zcGFuYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmdyYXlbIDYwMCBdIH07XG5cdHRleHQtYWxpZ246IGluaXRpYWw7XG5cdGxpbmUtaGVpZ2h0OiAkeyBDT05GSUcuZm9udExpbmVIZWlnaHRCYXNlIH07XG5cdHBhZGRpbmctaW5saW5lLWVuZDogJHsgc3BhY2UoIDEgKSB9O1xuXHRtYXJnaW4tYmxvY2s6ICR7IHNwYWNlKCAxICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RlZEl0ZW1DaGVjayA9IHN0eWxlZCggQXJpYWtpdC5TZWxlY3RJdGVtQ2hlY2sgKWBcblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0bWFyZ2luLWlubGluZS1zdGFydDogJHsgc3BhY2UoIDIgKSB9O1xuXHRmaWxsOiBjdXJyZW50Q29sb3I7XG5cblx0Ly8gS2VlcCB0aGUgY2hlY2ttYXJrIHZlcnRpY2FsbHkgYWxpZ25lZCBhdCB0aGUgdG9wLiBTaW5jZSB0aGUgaXRlbSB0ZXh0IGhhcyBhXG5cdC8vIDI4cHggbGluZSBoZWlnaHQgYW5kIHRoZSBjaGVja21hcmsgaXMgMjRweCB0YWxsLCBhICgyOC0yNCkvMiA9IDJweCBtYXJnaW5cblx0Ly8gaXMgYXBwbGllZCB0byBrZWVwIHRoZSBjb3JyZWN0IGFsaWdubWVudCBiZXR3ZWVuIHRoZSB0ZXh0IGFuZCB0aGUgY2hlY2ttYXJrLlxuXHRhbGlnbi1zZWxmOiBzdGFydDtcblx0bWFyZ2luLWJsb2NrLXN0YXJ0OiAycHg7XG5cblx0Ly8gU2luY2UgdGhlIGNoZWNrbWFyaydzIGRpbWVuc2lvbnMgYXJlIGFwcGxpZWQgd2l0aCAnZW0nIHVuaXRzLCBzZXR0aW5nIGFcblx0Ly8gZm9udCBzaXplIG9mIDAgYWxsb3dzIHRoZSBzcGFjZSByZXNlcnZlZCBmb3IgdGhlIGNoZWNrbWFyayB0byBjb2xsYXBzZSBmb3Jcblx0Ly8gaXRlbXMgdGhhdCBhcmUgbm90IHNlbGVjdGVkIG9yIHRoYXQgZG9uJ3QgaGF2ZSBhbiBhc3NvY2lhdGVkIGl0ZW0gaGludC5cblx0Zm9udC1zaXplOiAwO1xuXHQkeyBXaXRoSGludEl0ZW1XcmFwcGVyIH0gfiAmLFxuXHQmOm5vdCg6ZW1wdHkpIHtcblx0XHRmb250LXNpemU6IDI0cHg7IC8vIFNpemUgb2YgY2hlY2ttYXJrIGljb25cblx0fVxuYDtcbiJdfQ== */"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvSjBCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzLCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgY2hldnJvbkljb25TaXplIH0gZnJvbSAnLi4vc2VsZWN0LWNvbnRyb2wvc3R5bGVzL3NlbGVjdC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgeyBmb250U2l6ZVN0eWxlcyB9IGZyb20gJy4uL2lucHV0LWNvbnRyb2wvc3R5bGVzL2lucHV0LWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB7IERST1BET1dOX01PVElPTl9DU1MgfSBmcm9tICcuLi91dGlscy9zdHlsZS1taXhpbnMnO1xuaW1wb3J0IHR5cGUgeyBDdXN0b21TZWxlY3RCdXR0b25TaXplIH0gZnJvbSAnLi90eXBlcyc7XG5cbmNvbnN0IElOTElORV9QQURESU5HID0ge1xuXHRjb21wYWN0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdHNtYWxsOiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdGRlZmF1bHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG59O1xuXG5jb25zdCBnZXRTZWxlY3RTaXplID0gKFxuXHRzaXplOiBOb25OdWxsYWJsZTwgQ3VzdG9tU2VsZWN0QnV0dG9uU2l6ZVsgJ3NpemUnIF0gPixcblx0aGVpZ2h0UHJvcGVydHk6ICdtaW5IZWlnaHQnIHwgJ2hlaWdodCdcbikgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRjb21wYWN0OiB7XG5cdFx0XHRbIGhlaWdodFByb3BlcnR5IF06IDMyLFxuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5jb21wYWN0LFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuY29tcGFjdCArIGNoZXZyb25JY29uU2l6ZSxcblx0XHR9LFxuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdFsgaGVpZ2h0UHJvcGVydHkgXTogNDAsXG5cdFx0XHRwYWRkaW5nSW5saW5lU3RhcnQ6IElOTElORV9QQURESU5HLmRlZmF1bHQsXG5cdFx0XHRwYWRkaW5nSW5saW5lRW5kOiBJTkxJTkVfUEFERElORy5kZWZhdWx0ICsgY2hldnJvbkljb25TaXplLFxuXHRcdH0sXG5cdFx0c21hbGw6IHtcblx0XHRcdFsgaGVpZ2h0UHJvcGVydHkgXTogMjQsXG5cdFx0XHRwYWRkaW5nSW5saW5lU3RhcnQ6IElOTElORV9QQURESU5HLnNtYWxsLFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuc21hbGwgKyBjaGV2cm9uSWNvblNpemUsXG5cdFx0fSxcblx0fTtcblxuXHRyZXR1cm4gc2l6ZXNbIHNpemUgXSB8fCBzaXplcy5kZWZhdWx0O1xufTtcblxuY29uc3QgZ2V0U2VsZWN0SXRlbVNpemUgPSAoXG5cdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+XG4pID0+IHtcblx0Ly8gVXNlZCB0byB2aXN1YWxseSBhbGlnbiB0aGUgY2hlY2ttYXJrIHdpdGggdGhlIGNoZXZyb25cblx0Y29uc3QgY2hlY2ttYXJrQ29ycmVjdGlvbiA9IDY7XG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdHBhZGRpbmdJbmxpbmVTdGFydDogSU5MSU5FX1BBRERJTkcuY29tcGFjdCxcblx0XHRcdHBhZGRpbmdJbmxpbmVFbmQ6IElOTElORV9QQURESU5HLmNvbXBhY3QgLSBjaGVja21hcmtDb3JyZWN0aW9uLFxuXHRcdH0sXG5cdFx0ZGVmYXVsdDoge1xuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5kZWZhdWx0LFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuZGVmYXVsdCAtIGNoZWNrbWFya0NvcnJlY3Rpb24sXG5cdFx0fSxcblx0XHRzbWFsbDoge1xuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5zbWFsbCxcblx0XHRcdHBhZGRpbmdJbmxpbmVFbmQ6IElOTElORV9QQURESU5HLnNtYWxsIC0gY2hlY2ttYXJrQ29ycmVjdGlvbixcblx0XHR9LFxuXHR9O1xuXG5cdHJldHVybiBzaXplc1sgc2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG59O1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdCwge1xuXHQvLyBEbyBub3QgZm9yd2FyZCBgaGFzQ3VzdG9tUmVuZGVyUHJvcGAgdG8gdGhlIHVuZGVybHlpbmcgQXJpYWtpdC5TZWxlY3QgY29tcG9uZW50XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3AgKSA9PiBwcm9wICE9PSAnaGFzQ3VzdG9tUmVuZGVyUHJvcCcsXG59ICkoXG5cdCgge1xuXHRcdHNpemUsXG5cdFx0aGFzQ3VzdG9tUmVuZGVyUHJvcCxcblx0fToge1xuXHRcdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+O1xuXHRcdGhhc0N1c3RvbVJlbmRlclByb3A6IGJvb2xlYW47XG5cdH0gKSA9PiBjc3NgXG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmJhY2tncm91bmQgfTtcblx0XHRib3JkZXI6IG5vbmU7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdFx0Y3Vyc29yOiBwb2ludGVyO1xuXHRcdGZvbnQtZmFtaWx5OiBpbmhlcml0O1xuXHRcdHRleHQtYWxpZ246IHN0YXJ0O1xuXHRcdHVzZXItc2VsZWN0OiBub25lO1xuXHRcdHdpZHRoOiAxMDAlO1xuXG5cdFx0JltkYXRhLWZvY3VzLXZpc2libGVdIHtcblx0XHRcdG91dGxpbmU6IG5vbmU7IC8vIGhhbmRsZWQgYnkgSW5wdXRCYXNlIGNvbXBvbmVudFxuXHRcdH1cblxuXHRcdCR7IGdldFNlbGVjdFNpemUoIHNpemUsIGhhc0N1c3RvbVJlbmRlclByb3AgPyAnbWluSGVpZ2h0JyA6ICdoZWlnaHQnICkgfVxuXHRcdCR7ICEgaGFzQ3VzdG9tUmVuZGVyUHJvcCAmJiB0cnVuY2F0ZVN0eWxlcyB9XG5cdFx0JHsgZm9udFNpemVTdHlsZXMoIHsgaW5wdXRTaXplOiBzaXplIH0gKSB9XG5cdGBcbik7XG5cbmNvbnN0IHNsaWRlRG93biA9IGtleWZyYW1lcygge1xuXHQnMCUnOiB7IHRyYW5zZm9ybTogYHRyYW5zbGF0ZVkoLSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfSlgIH0sXG5cdCcxMDAlJzogeyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVZKDApJyB9LFxufSApO1xuXG5jb25zdCBmYWRlSW4gPSBrZXlmcmFtZXMoIHtcblx0JzAlJzogeyBvcGFjaXR5OiAwIH0sXG5cdCcxMDAlJzogeyBvcGFjaXR5OiAxIH0sXG59ICk7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RQb3BvdmVyID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdFBvcG92ZXIgKWBcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYmFja2dyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0Ym94LXNoYWRvdzogJHsgQ09ORklHLmVsZXZhdGlvbk1lZGl1bSB9O1xuXG5cdC8qIHotaW5kZXgoXCIuY29tcG9uZW50cy1wb3BvdmVyXCIpICovXG5cdHotaW5kZXg6IDEwMDAwMDA7XG5cblx0bWF4LWhlaWdodDogbWluKCB2YXIoIC0tcG9wb3Zlci1hdmFpbGFibGUtaGVpZ2h0LCA0MDBweCApLCA0MDBweCApO1xuXHRvdmVyZmxvdzogYXV0bztcblx0b3ZlcnNjcm9sbC1iZWhhdmlvcjogY29udGFpbjtcblxuXHQvKiBUaGUgc21hbGxlc3Qgc2l6ZSB3aXRob3V0IG92ZXJmbG93aW5nIHRoZSBjb250YWluZXIuICovXG5cdG1pbi13aWR0aDogbWluLWNvbnRlbnQ7XG5cblx0LyogQW5pbWF0aW9uICovXG5cdCZbZGF0YS1vcGVuXSB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHRhbmltYXRpb24tbmFtZTogJHsgc2xpZGVEb3duIH0sICR7IGZhZGVJbiB9O1xuXHRcdFx0YW5pbWF0aW9uLWR1cmF0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RVUkFUSU9OIH0sXG5cdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9EVVJBVElPTiB9O1xuXHRcdFx0YW5pbWF0aW9uLXRpbWluZy1mdW5jdGlvbjogJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9FQVNJTkcgfSxcblx0XHRcdFx0JHsgRFJPUERPV05fTU9USU9OX0NTUy5GQURFX0VBU0lORyB9O1xuXHRcdFx0d2lsbC1jaGFuZ2U6IHRyYW5zZm9ybSwgb3BhY2l0eTtcblx0XHR9XG5cdH1cblxuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdC8qIFRoZSBvdXRsaW5lIHdpbGwgYmUgb24gdGhlIHRyaWdnZXIsIHJhdGhlciB0aGFuIHRoZSBwb3BvdmVyLiAqL1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RJdGVtID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdEl0ZW0gKShcblx0KCB7XG5cdFx0c2l6ZSxcblx0fToge1xuXHRcdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+O1xuXHR9ICkgPT4gY3NzYFxuXHRcdGN1cnNvcjogZGVmYXVsdDtcblx0XHRkaXNwbGF5OiBmbGV4O1xuXHRcdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdFx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRcdGZvbnQtc2l6ZTogJHsgQ09ORklHLmZvbnRTaXplIH07XG5cdFx0Ly8gVE9ETzogcmVhc3Nlc3MgbGluZS1oZWlnaHQgZm9yIG5vbi1sZWdhY3kgdjJcblx0XHRsaW5lLWhlaWdodDogMjhweDtcblx0XHRwYWRkaW5nLWJsb2NrOiAkeyBzcGFjZSggMiApIH07XG5cdFx0c2Nyb2xsLW1hcmdpbjogJHsgc3BhY2UoIDEgKSB9O1xuXHRcdHVzZXItc2VsZWN0OiBub25lO1xuXG5cdFx0JlthcmlhLWRpc2FibGVkPSd0cnVlJ10ge1xuXHRcdFx0Y3Vyc29yOiBub3QtYWxsb3dlZDtcblx0XHR9XG5cblx0XHQmW2RhdGEtYWN0aXZlLWl0ZW1dIHtcblx0XHRcdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRcdH1cblxuXHRcdCR7IGdldFNlbGVjdEl0ZW1TaXplKCBzaXplICkgfVxuXHRgXG4pO1xuXG5jb25zdCB0cnVuY2F0ZVN0eWxlcyA9IGNzc2Bcblx0b3ZlcmZsb3c6IGhpZGRlbjtcblx0dGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ZWRFeHBlcmltZW50YWxIaW50V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdCR7IHRydW5jYXRlU3R5bGVzIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RlZEV4cGVyaW1lbnRhbEhpbnRJdGVtID0gc3R5bGVkLnNwYW5gXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZ3JheVsgNjAwIF0gfTtcblx0bWFyZ2luLWlubGluZS1zdGFydDogJHsgc3BhY2UoIDIgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFdpdGhIaW50SXRlbVdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGZsZXgtd3JhcDogd3JhcDtcblx0ZmxleDogMTtcblx0Y29sdW1uLWdhcDogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFdpdGhIaW50SXRlbUhpbnQgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyA2MDAgXSB9O1xuXHR0ZXh0LWFsaWduOiBpbml0aWFsO1xuXHRsaW5lLWhlaWdodDogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9O1xuXHRwYWRkaW5nLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAxICkgfTtcblx0bWFyZ2luLWJsb2NrOiAkeyBzcGFjZSggMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ZWRJdGVtQ2hlY2sgPSBzdHlsZWQoIEFyaWFraXQuU2VsZWN0SXRlbUNoZWNrIClgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdG1hcmdpbi1pbmxpbmUtc3RhcnQ6ICR7IHNwYWNlKCAyICkgfTtcblx0ZmlsbDogY3VycmVudENvbG9yO1xuXG5cdC8vIEtlZXAgdGhlIGNoZWNrbWFyayB2ZXJ0aWNhbGx5IGFsaWduZWQgYXQgdGhlIHRvcC4gU2luY2UgdGhlIGl0ZW0gdGV4dCBoYXMgYVxuXHQvLyAyOHB4IGxpbmUgaGVpZ2h0IGFuZCB0aGUgY2hlY2ttYXJrIGlzIDI0cHggdGFsbCwgYSAoMjgtMjQpLzIgPSAycHggbWFyZ2luXG5cdC8vIGlzIGFwcGxpZWQgdG8ga2VlcCB0aGUgY29ycmVjdCBhbGlnbm1lbnQgYmV0d2VlbiB0aGUgdGV4dCBhbmQgdGhlIGNoZWNrbWFyay5cblx0YWxpZ24tc2VsZjogc3RhcnQ7XG5cdG1hcmdpbi1ibG9jay1zdGFydDogMnB4O1xuXG5cdC8vIFNpbmNlIHRoZSBjaGVja21hcmsncyBkaW1lbnNpb25zIGFyZSBhcHBsaWVkIHdpdGggJ2VtJyB1bml0cywgc2V0dGluZyBhXG5cdC8vIGZvbnQgc2l6ZSBvZiAwIGFsbG93cyB0aGUgc3BhY2UgcmVzZXJ2ZWQgZm9yIHRoZSBjaGVja21hcmsgdG8gY29sbGFwc2UgZm9yXG5cdC8vIGl0ZW1zIHRoYXQgYXJlIG5vdCBzZWxlY3RlZCBvciB0aGF0IGRvbid0IGhhdmUgYW4gYXNzb2NpYXRlZCBpdGVtIGhpbnQuXG5cdGZvbnQtc2l6ZTogMDtcblx0JHsgV2l0aEhpbnRJdGVtV3JhcHBlciB9IH4gJixcblx0Jjpub3QoOmVtcHR5KSB7XG5cdFx0Zm9udC1zaXplOiAyNHB4OyAvLyBTaXplIG9mIGNoZWNrbWFyayBpY29uXG5cdH1cbmA7XG4iXX0= */");
  var truncateStyles = false ? {
    name: "1h52dri",
    styles: "overflow:hidden;text-overflow:ellipsis;white-space:nowrap"
  } : {
    name: "5u3cjr-truncateStyles",
    styles: "overflow:hidden;text-overflow:ellipsis;white-space:nowrap;label:truncateStyles;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpTDBCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzLCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgY2hldnJvbkljb25TaXplIH0gZnJvbSAnLi4vc2VsZWN0LWNvbnRyb2wvc3R5bGVzL3NlbGVjdC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgeyBmb250U2l6ZVN0eWxlcyB9IGZyb20gJy4uL2lucHV0LWNvbnRyb2wvc3R5bGVzL2lucHV0LWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB7IERST1BET1dOX01PVElPTl9DU1MgfSBmcm9tICcuLi91dGlscy9zdHlsZS1taXhpbnMnO1xuaW1wb3J0IHR5cGUgeyBDdXN0b21TZWxlY3RCdXR0b25TaXplIH0gZnJvbSAnLi90eXBlcyc7XG5cbmNvbnN0IElOTElORV9QQURESU5HID0ge1xuXHRjb21wYWN0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdHNtYWxsOiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdGRlZmF1bHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG59O1xuXG5jb25zdCBnZXRTZWxlY3RTaXplID0gKFxuXHRzaXplOiBOb25OdWxsYWJsZTwgQ3VzdG9tU2VsZWN0QnV0dG9uU2l6ZVsgJ3NpemUnIF0gPixcblx0aGVpZ2h0UHJvcGVydHk6ICdtaW5IZWlnaHQnIHwgJ2hlaWdodCdcbikgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRjb21wYWN0OiB7XG5cdFx0XHRbIGhlaWdodFByb3BlcnR5IF06IDMyLFxuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5jb21wYWN0LFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuY29tcGFjdCArIGNoZXZyb25JY29uU2l6ZSxcblx0XHR9LFxuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdFsgaGVpZ2h0UHJvcGVydHkgXTogNDAsXG5cdFx0XHRwYWRkaW5nSW5saW5lU3RhcnQ6IElOTElORV9QQURESU5HLmRlZmF1bHQsXG5cdFx0XHRwYWRkaW5nSW5saW5lRW5kOiBJTkxJTkVfUEFERElORy5kZWZhdWx0ICsgY2hldnJvbkljb25TaXplLFxuXHRcdH0sXG5cdFx0c21hbGw6IHtcblx0XHRcdFsgaGVpZ2h0UHJvcGVydHkgXTogMjQsXG5cdFx0XHRwYWRkaW5nSW5saW5lU3RhcnQ6IElOTElORV9QQURESU5HLnNtYWxsLFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuc21hbGwgKyBjaGV2cm9uSWNvblNpemUsXG5cdFx0fSxcblx0fTtcblxuXHRyZXR1cm4gc2l6ZXNbIHNpemUgXSB8fCBzaXplcy5kZWZhdWx0O1xufTtcblxuY29uc3QgZ2V0U2VsZWN0SXRlbVNpemUgPSAoXG5cdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+XG4pID0+IHtcblx0Ly8gVXNlZCB0byB2aXN1YWxseSBhbGlnbiB0aGUgY2hlY2ttYXJrIHdpdGggdGhlIGNoZXZyb25cblx0Y29uc3QgY2hlY2ttYXJrQ29ycmVjdGlvbiA9IDY7XG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdHBhZGRpbmdJbmxpbmVTdGFydDogSU5MSU5FX1BBRERJTkcuY29tcGFjdCxcblx0XHRcdHBhZGRpbmdJbmxpbmVFbmQ6IElOTElORV9QQURESU5HLmNvbXBhY3QgLSBjaGVja21hcmtDb3JyZWN0aW9uLFxuXHRcdH0sXG5cdFx0ZGVmYXVsdDoge1xuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5kZWZhdWx0LFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuZGVmYXVsdCAtIGNoZWNrbWFya0NvcnJlY3Rpb24sXG5cdFx0fSxcblx0XHRzbWFsbDoge1xuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5zbWFsbCxcblx0XHRcdHBhZGRpbmdJbmxpbmVFbmQ6IElOTElORV9QQURESU5HLnNtYWxsIC0gY2hlY2ttYXJrQ29ycmVjdGlvbixcblx0XHR9LFxuXHR9O1xuXG5cdHJldHVybiBzaXplc1sgc2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG59O1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdCwge1xuXHQvLyBEbyBub3QgZm9yd2FyZCBgaGFzQ3VzdG9tUmVuZGVyUHJvcGAgdG8gdGhlIHVuZGVybHlpbmcgQXJpYWtpdC5TZWxlY3QgY29tcG9uZW50XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3AgKSA9PiBwcm9wICE9PSAnaGFzQ3VzdG9tUmVuZGVyUHJvcCcsXG59ICkoXG5cdCgge1xuXHRcdHNpemUsXG5cdFx0aGFzQ3VzdG9tUmVuZGVyUHJvcCxcblx0fToge1xuXHRcdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+O1xuXHRcdGhhc0N1c3RvbVJlbmRlclByb3A6IGJvb2xlYW47XG5cdH0gKSA9PiBjc3NgXG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmJhY2tncm91bmQgfTtcblx0XHRib3JkZXI6IG5vbmU7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdFx0Y3Vyc29yOiBwb2ludGVyO1xuXHRcdGZvbnQtZmFtaWx5OiBpbmhlcml0O1xuXHRcdHRleHQtYWxpZ246IHN0YXJ0O1xuXHRcdHVzZXItc2VsZWN0OiBub25lO1xuXHRcdHdpZHRoOiAxMDAlO1xuXG5cdFx0JltkYXRhLWZvY3VzLXZpc2libGVdIHtcblx0XHRcdG91dGxpbmU6IG5vbmU7IC8vIGhhbmRsZWQgYnkgSW5wdXRCYXNlIGNvbXBvbmVudFxuXHRcdH1cblxuXHRcdCR7IGdldFNlbGVjdFNpemUoIHNpemUsIGhhc0N1c3RvbVJlbmRlclByb3AgPyAnbWluSGVpZ2h0JyA6ICdoZWlnaHQnICkgfVxuXHRcdCR7ICEgaGFzQ3VzdG9tUmVuZGVyUHJvcCAmJiB0cnVuY2F0ZVN0eWxlcyB9XG5cdFx0JHsgZm9udFNpemVTdHlsZXMoIHsgaW5wdXRTaXplOiBzaXplIH0gKSB9XG5cdGBcbik7XG5cbmNvbnN0IHNsaWRlRG93biA9IGtleWZyYW1lcygge1xuXHQnMCUnOiB7IHRyYW5zZm9ybTogYHRyYW5zbGF0ZVkoLSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfSlgIH0sXG5cdCcxMDAlJzogeyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVZKDApJyB9LFxufSApO1xuXG5jb25zdCBmYWRlSW4gPSBrZXlmcmFtZXMoIHtcblx0JzAlJzogeyBvcGFjaXR5OiAwIH0sXG5cdCcxMDAlJzogeyBvcGFjaXR5OiAxIH0sXG59ICk7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RQb3BvdmVyID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdFBvcG92ZXIgKWBcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYmFja2dyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0Ym94LXNoYWRvdzogJHsgQ09ORklHLmVsZXZhdGlvbk1lZGl1bSB9O1xuXG5cdC8qIHotaW5kZXgoXCIuY29tcG9uZW50cy1wb3BvdmVyXCIpICovXG5cdHotaW5kZXg6IDEwMDAwMDA7XG5cblx0bWF4LWhlaWdodDogbWluKCB2YXIoIC0tcG9wb3Zlci1hdmFpbGFibGUtaGVpZ2h0LCA0MDBweCApLCA0MDBweCApO1xuXHRvdmVyZmxvdzogYXV0bztcblx0b3ZlcnNjcm9sbC1iZWhhdmlvcjogY29udGFpbjtcblxuXHQvKiBUaGUgc21hbGxlc3Qgc2l6ZSB3aXRob3V0IG92ZXJmbG93aW5nIHRoZSBjb250YWluZXIuICovXG5cdG1pbi13aWR0aDogbWluLWNvbnRlbnQ7XG5cblx0LyogQW5pbWF0aW9uICovXG5cdCZbZGF0YS1vcGVuXSB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHRhbmltYXRpb24tbmFtZTogJHsgc2xpZGVEb3duIH0sICR7IGZhZGVJbiB9O1xuXHRcdFx0YW5pbWF0aW9uLWR1cmF0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RVUkFUSU9OIH0sXG5cdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9EVVJBVElPTiB9O1xuXHRcdFx0YW5pbWF0aW9uLXRpbWluZy1mdW5jdGlvbjogJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9FQVNJTkcgfSxcblx0XHRcdFx0JHsgRFJPUERPV05fTU9USU9OX0NTUy5GQURFX0VBU0lORyB9O1xuXHRcdFx0d2lsbC1jaGFuZ2U6IHRyYW5zZm9ybSwgb3BhY2l0eTtcblx0XHR9XG5cdH1cblxuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdC8qIFRoZSBvdXRsaW5lIHdpbGwgYmUgb24gdGhlIHRyaWdnZXIsIHJhdGhlciB0aGFuIHRoZSBwb3BvdmVyLiAqL1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RJdGVtID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdEl0ZW0gKShcblx0KCB7XG5cdFx0c2l6ZSxcblx0fToge1xuXHRcdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+O1xuXHR9ICkgPT4gY3NzYFxuXHRcdGN1cnNvcjogZGVmYXVsdDtcblx0XHRkaXNwbGF5OiBmbGV4O1xuXHRcdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdFx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRcdGZvbnQtc2l6ZTogJHsgQ09ORklHLmZvbnRTaXplIH07XG5cdFx0Ly8gVE9ETzogcmVhc3Nlc3MgbGluZS1oZWlnaHQgZm9yIG5vbi1sZWdhY3kgdjJcblx0XHRsaW5lLWhlaWdodDogMjhweDtcblx0XHRwYWRkaW5nLWJsb2NrOiAkeyBzcGFjZSggMiApIH07XG5cdFx0c2Nyb2xsLW1hcmdpbjogJHsgc3BhY2UoIDEgKSB9O1xuXHRcdHVzZXItc2VsZWN0OiBub25lO1xuXG5cdFx0JlthcmlhLWRpc2FibGVkPSd0cnVlJ10ge1xuXHRcdFx0Y3Vyc29yOiBub3QtYWxsb3dlZDtcblx0XHR9XG5cblx0XHQmW2RhdGEtYWN0aXZlLWl0ZW1dIHtcblx0XHRcdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRcdH1cblxuXHRcdCR7IGdldFNlbGVjdEl0ZW1TaXplKCBzaXplICkgfVxuXHRgXG4pO1xuXG5jb25zdCB0cnVuY2F0ZVN0eWxlcyA9IGNzc2Bcblx0b3ZlcmZsb3c6IGhpZGRlbjtcblx0dGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ZWRFeHBlcmltZW50YWxIaW50V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdCR7IHRydW5jYXRlU3R5bGVzIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RlZEV4cGVyaW1lbnRhbEhpbnRJdGVtID0gc3R5bGVkLnNwYW5gXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZ3JheVsgNjAwIF0gfTtcblx0bWFyZ2luLWlubGluZS1zdGFydDogJHsgc3BhY2UoIDIgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFdpdGhIaW50SXRlbVdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGZsZXgtd3JhcDogd3JhcDtcblx0ZmxleDogMTtcblx0Y29sdW1uLWdhcDogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFdpdGhIaW50SXRlbUhpbnQgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyA2MDAgXSB9O1xuXHR0ZXh0LWFsaWduOiBpbml0aWFsO1xuXHRsaW5lLWhlaWdodDogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9O1xuXHRwYWRkaW5nLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAxICkgfTtcblx0bWFyZ2luLWJsb2NrOiAkeyBzcGFjZSggMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ZWRJdGVtQ2hlY2sgPSBzdHlsZWQoIEFyaWFraXQuU2VsZWN0SXRlbUNoZWNrIClgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdG1hcmdpbi1pbmxpbmUtc3RhcnQ6ICR7IHNwYWNlKCAyICkgfTtcblx0ZmlsbDogY3VycmVudENvbG9yO1xuXG5cdC8vIEtlZXAgdGhlIGNoZWNrbWFyayB2ZXJ0aWNhbGx5IGFsaWduZWQgYXQgdGhlIHRvcC4gU2luY2UgdGhlIGl0ZW0gdGV4dCBoYXMgYVxuXHQvLyAyOHB4IGxpbmUgaGVpZ2h0IGFuZCB0aGUgY2hlY2ttYXJrIGlzIDI0cHggdGFsbCwgYSAoMjgtMjQpLzIgPSAycHggbWFyZ2luXG5cdC8vIGlzIGFwcGxpZWQgdG8ga2VlcCB0aGUgY29ycmVjdCBhbGlnbm1lbnQgYmV0d2VlbiB0aGUgdGV4dCBhbmQgdGhlIGNoZWNrbWFyay5cblx0YWxpZ24tc2VsZjogc3RhcnQ7XG5cdG1hcmdpbi1ibG9jay1zdGFydDogMnB4O1xuXG5cdC8vIFNpbmNlIHRoZSBjaGVja21hcmsncyBkaW1lbnNpb25zIGFyZSBhcHBsaWVkIHdpdGggJ2VtJyB1bml0cywgc2V0dGluZyBhXG5cdC8vIGZvbnQgc2l6ZSBvZiAwIGFsbG93cyB0aGUgc3BhY2UgcmVzZXJ2ZWQgZm9yIHRoZSBjaGVja21hcmsgdG8gY29sbGFwc2UgZm9yXG5cdC8vIGl0ZW1zIHRoYXQgYXJlIG5vdCBzZWxlY3RlZCBvciB0aGF0IGRvbid0IGhhdmUgYW4gYXNzb2NpYXRlZCBpdGVtIGhpbnQuXG5cdGZvbnQtc2l6ZTogMDtcblx0JHsgV2l0aEhpbnRJdGVtV3JhcHBlciB9IH4gJixcblx0Jjpub3QoOmVtcHR5KSB7XG5cdFx0Zm9udC1zaXplOiAyNHB4OyAvLyBTaXplIG9mIGNoZWNrbWFyayBpY29uXG5cdH1cbmA7XG4iXX0= */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__27
  };
  var SelectedExperimentalHintWrapper = /* @__PURE__ */ createStyled("div", false ? {
    target: "e1p3eej74"
  } : {
    target: "e1p3eej74",
    label: "SelectedExperimentalHintWrapper"
  })(truncateStyles, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1THlEIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzLCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgY2hldnJvbkljb25TaXplIH0gZnJvbSAnLi4vc2VsZWN0LWNvbnRyb2wvc3R5bGVzL3NlbGVjdC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgeyBmb250U2l6ZVN0eWxlcyB9IGZyb20gJy4uL2lucHV0LWNvbnRyb2wvc3R5bGVzL2lucHV0LWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB7IERST1BET1dOX01PVElPTl9DU1MgfSBmcm9tICcuLi91dGlscy9zdHlsZS1taXhpbnMnO1xuaW1wb3J0IHR5cGUgeyBDdXN0b21TZWxlY3RCdXR0b25TaXplIH0gZnJvbSAnLi90eXBlcyc7XG5cbmNvbnN0IElOTElORV9QQURESU5HID0ge1xuXHRjb21wYWN0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdHNtYWxsOiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdGRlZmF1bHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG59O1xuXG5jb25zdCBnZXRTZWxlY3RTaXplID0gKFxuXHRzaXplOiBOb25OdWxsYWJsZTwgQ3VzdG9tU2VsZWN0QnV0dG9uU2l6ZVsgJ3NpemUnIF0gPixcblx0aGVpZ2h0UHJvcGVydHk6ICdtaW5IZWlnaHQnIHwgJ2hlaWdodCdcbikgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRjb21wYWN0OiB7XG5cdFx0XHRbIGhlaWdodFByb3BlcnR5IF06IDMyLFxuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5jb21wYWN0LFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuY29tcGFjdCArIGNoZXZyb25JY29uU2l6ZSxcblx0XHR9LFxuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdFsgaGVpZ2h0UHJvcGVydHkgXTogNDAsXG5cdFx0XHRwYWRkaW5nSW5saW5lU3RhcnQ6IElOTElORV9QQURESU5HLmRlZmF1bHQsXG5cdFx0XHRwYWRkaW5nSW5saW5lRW5kOiBJTkxJTkVfUEFERElORy5kZWZhdWx0ICsgY2hldnJvbkljb25TaXplLFxuXHRcdH0sXG5cdFx0c21hbGw6IHtcblx0XHRcdFsgaGVpZ2h0UHJvcGVydHkgXTogMjQsXG5cdFx0XHRwYWRkaW5nSW5saW5lU3RhcnQ6IElOTElORV9QQURESU5HLnNtYWxsLFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuc21hbGwgKyBjaGV2cm9uSWNvblNpemUsXG5cdFx0fSxcblx0fTtcblxuXHRyZXR1cm4gc2l6ZXNbIHNpemUgXSB8fCBzaXplcy5kZWZhdWx0O1xufTtcblxuY29uc3QgZ2V0U2VsZWN0SXRlbVNpemUgPSAoXG5cdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+XG4pID0+IHtcblx0Ly8gVXNlZCB0byB2aXN1YWxseSBhbGlnbiB0aGUgY2hlY2ttYXJrIHdpdGggdGhlIGNoZXZyb25cblx0Y29uc3QgY2hlY2ttYXJrQ29ycmVjdGlvbiA9IDY7XG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdHBhZGRpbmdJbmxpbmVTdGFydDogSU5MSU5FX1BBRERJTkcuY29tcGFjdCxcblx0XHRcdHBhZGRpbmdJbmxpbmVFbmQ6IElOTElORV9QQURESU5HLmNvbXBhY3QgLSBjaGVja21hcmtDb3JyZWN0aW9uLFxuXHRcdH0sXG5cdFx0ZGVmYXVsdDoge1xuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5kZWZhdWx0LFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuZGVmYXVsdCAtIGNoZWNrbWFya0NvcnJlY3Rpb24sXG5cdFx0fSxcblx0XHRzbWFsbDoge1xuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5zbWFsbCxcblx0XHRcdHBhZGRpbmdJbmxpbmVFbmQ6IElOTElORV9QQURESU5HLnNtYWxsIC0gY2hlY2ttYXJrQ29ycmVjdGlvbixcblx0XHR9LFxuXHR9O1xuXG5cdHJldHVybiBzaXplc1sgc2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG59O1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdCwge1xuXHQvLyBEbyBub3QgZm9yd2FyZCBgaGFzQ3VzdG9tUmVuZGVyUHJvcGAgdG8gdGhlIHVuZGVybHlpbmcgQXJpYWtpdC5TZWxlY3QgY29tcG9uZW50XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3AgKSA9PiBwcm9wICE9PSAnaGFzQ3VzdG9tUmVuZGVyUHJvcCcsXG59ICkoXG5cdCgge1xuXHRcdHNpemUsXG5cdFx0aGFzQ3VzdG9tUmVuZGVyUHJvcCxcblx0fToge1xuXHRcdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+O1xuXHRcdGhhc0N1c3RvbVJlbmRlclByb3A6IGJvb2xlYW47XG5cdH0gKSA9PiBjc3NgXG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmJhY2tncm91bmQgfTtcblx0XHRib3JkZXI6IG5vbmU7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdFx0Y3Vyc29yOiBwb2ludGVyO1xuXHRcdGZvbnQtZmFtaWx5OiBpbmhlcml0O1xuXHRcdHRleHQtYWxpZ246IHN0YXJ0O1xuXHRcdHVzZXItc2VsZWN0OiBub25lO1xuXHRcdHdpZHRoOiAxMDAlO1xuXG5cdFx0JltkYXRhLWZvY3VzLXZpc2libGVdIHtcblx0XHRcdG91dGxpbmU6IG5vbmU7IC8vIGhhbmRsZWQgYnkgSW5wdXRCYXNlIGNvbXBvbmVudFxuXHRcdH1cblxuXHRcdCR7IGdldFNlbGVjdFNpemUoIHNpemUsIGhhc0N1c3RvbVJlbmRlclByb3AgPyAnbWluSGVpZ2h0JyA6ICdoZWlnaHQnICkgfVxuXHRcdCR7ICEgaGFzQ3VzdG9tUmVuZGVyUHJvcCAmJiB0cnVuY2F0ZVN0eWxlcyB9XG5cdFx0JHsgZm9udFNpemVTdHlsZXMoIHsgaW5wdXRTaXplOiBzaXplIH0gKSB9XG5cdGBcbik7XG5cbmNvbnN0IHNsaWRlRG93biA9IGtleWZyYW1lcygge1xuXHQnMCUnOiB7IHRyYW5zZm9ybTogYHRyYW5zbGF0ZVkoLSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfSlgIH0sXG5cdCcxMDAlJzogeyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVZKDApJyB9LFxufSApO1xuXG5jb25zdCBmYWRlSW4gPSBrZXlmcmFtZXMoIHtcblx0JzAlJzogeyBvcGFjaXR5OiAwIH0sXG5cdCcxMDAlJzogeyBvcGFjaXR5OiAxIH0sXG59ICk7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RQb3BvdmVyID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdFBvcG92ZXIgKWBcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYmFja2dyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0Ym94LXNoYWRvdzogJHsgQ09ORklHLmVsZXZhdGlvbk1lZGl1bSB9O1xuXG5cdC8qIHotaW5kZXgoXCIuY29tcG9uZW50cy1wb3BvdmVyXCIpICovXG5cdHotaW5kZXg6IDEwMDAwMDA7XG5cblx0bWF4LWhlaWdodDogbWluKCB2YXIoIC0tcG9wb3Zlci1hdmFpbGFibGUtaGVpZ2h0LCA0MDBweCApLCA0MDBweCApO1xuXHRvdmVyZmxvdzogYXV0bztcblx0b3ZlcnNjcm9sbC1iZWhhdmlvcjogY29udGFpbjtcblxuXHQvKiBUaGUgc21hbGxlc3Qgc2l6ZSB3aXRob3V0IG92ZXJmbG93aW5nIHRoZSBjb250YWluZXIuICovXG5cdG1pbi13aWR0aDogbWluLWNvbnRlbnQ7XG5cblx0LyogQW5pbWF0aW9uICovXG5cdCZbZGF0YS1vcGVuXSB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHRhbmltYXRpb24tbmFtZTogJHsgc2xpZGVEb3duIH0sICR7IGZhZGVJbiB9O1xuXHRcdFx0YW5pbWF0aW9uLWR1cmF0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RVUkFUSU9OIH0sXG5cdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9EVVJBVElPTiB9O1xuXHRcdFx0YW5pbWF0aW9uLXRpbWluZy1mdW5jdGlvbjogJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9FQVNJTkcgfSxcblx0XHRcdFx0JHsgRFJPUERPV05fTU9USU9OX0NTUy5GQURFX0VBU0lORyB9O1xuXHRcdFx0d2lsbC1jaGFuZ2U6IHRyYW5zZm9ybSwgb3BhY2l0eTtcblx0XHR9XG5cdH1cblxuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdC8qIFRoZSBvdXRsaW5lIHdpbGwgYmUgb24gdGhlIHRyaWdnZXIsIHJhdGhlciB0aGFuIHRoZSBwb3BvdmVyLiAqL1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RJdGVtID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdEl0ZW0gKShcblx0KCB7XG5cdFx0c2l6ZSxcblx0fToge1xuXHRcdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+O1xuXHR9ICkgPT4gY3NzYFxuXHRcdGN1cnNvcjogZGVmYXVsdDtcblx0XHRkaXNwbGF5OiBmbGV4O1xuXHRcdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdFx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRcdGZvbnQtc2l6ZTogJHsgQ09ORklHLmZvbnRTaXplIH07XG5cdFx0Ly8gVE9ETzogcmVhc3Nlc3MgbGluZS1oZWlnaHQgZm9yIG5vbi1sZWdhY3kgdjJcblx0XHRsaW5lLWhlaWdodDogMjhweDtcblx0XHRwYWRkaW5nLWJsb2NrOiAkeyBzcGFjZSggMiApIH07XG5cdFx0c2Nyb2xsLW1hcmdpbjogJHsgc3BhY2UoIDEgKSB9O1xuXHRcdHVzZXItc2VsZWN0OiBub25lO1xuXG5cdFx0JlthcmlhLWRpc2FibGVkPSd0cnVlJ10ge1xuXHRcdFx0Y3Vyc29yOiBub3QtYWxsb3dlZDtcblx0XHR9XG5cblx0XHQmW2RhdGEtYWN0aXZlLWl0ZW1dIHtcblx0XHRcdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRcdH1cblxuXHRcdCR7IGdldFNlbGVjdEl0ZW1TaXplKCBzaXplICkgfVxuXHRgXG4pO1xuXG5jb25zdCB0cnVuY2F0ZVN0eWxlcyA9IGNzc2Bcblx0b3ZlcmZsb3c6IGhpZGRlbjtcblx0dGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ZWRFeHBlcmltZW50YWxIaW50V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdCR7IHRydW5jYXRlU3R5bGVzIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RlZEV4cGVyaW1lbnRhbEhpbnRJdGVtID0gc3R5bGVkLnNwYW5gXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZ3JheVsgNjAwIF0gfTtcblx0bWFyZ2luLWlubGluZS1zdGFydDogJHsgc3BhY2UoIDIgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFdpdGhIaW50SXRlbVdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGZsZXgtd3JhcDogd3JhcDtcblx0ZmxleDogMTtcblx0Y29sdW1uLWdhcDogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFdpdGhIaW50SXRlbUhpbnQgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyA2MDAgXSB9O1xuXHR0ZXh0LWFsaWduOiBpbml0aWFsO1xuXHRsaW5lLWhlaWdodDogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9O1xuXHRwYWRkaW5nLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAxICkgfTtcblx0bWFyZ2luLWJsb2NrOiAkeyBzcGFjZSggMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ZWRJdGVtQ2hlY2sgPSBzdHlsZWQoIEFyaWFraXQuU2VsZWN0SXRlbUNoZWNrIClgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdG1hcmdpbi1pbmxpbmUtc3RhcnQ6ICR7IHNwYWNlKCAyICkgfTtcblx0ZmlsbDogY3VycmVudENvbG9yO1xuXG5cdC8vIEtlZXAgdGhlIGNoZWNrbWFyayB2ZXJ0aWNhbGx5IGFsaWduZWQgYXQgdGhlIHRvcC4gU2luY2UgdGhlIGl0ZW0gdGV4dCBoYXMgYVxuXHQvLyAyOHB4IGxpbmUgaGVpZ2h0IGFuZCB0aGUgY2hlY2ttYXJrIGlzIDI0cHggdGFsbCwgYSAoMjgtMjQpLzIgPSAycHggbWFyZ2luXG5cdC8vIGlzIGFwcGxpZWQgdG8ga2VlcCB0aGUgY29ycmVjdCBhbGlnbm1lbnQgYmV0d2VlbiB0aGUgdGV4dCBhbmQgdGhlIGNoZWNrbWFyay5cblx0YWxpZ24tc2VsZjogc3RhcnQ7XG5cdG1hcmdpbi1ibG9jay1zdGFydDogMnB4O1xuXG5cdC8vIFNpbmNlIHRoZSBjaGVja21hcmsncyBkaW1lbnNpb25zIGFyZSBhcHBsaWVkIHdpdGggJ2VtJyB1bml0cywgc2V0dGluZyBhXG5cdC8vIGZvbnQgc2l6ZSBvZiAwIGFsbG93cyB0aGUgc3BhY2UgcmVzZXJ2ZWQgZm9yIHRoZSBjaGVja21hcmsgdG8gY29sbGFwc2UgZm9yXG5cdC8vIGl0ZW1zIHRoYXQgYXJlIG5vdCBzZWxlY3RlZCBvciB0aGF0IGRvbid0IGhhdmUgYW4gYXNzb2NpYXRlZCBpdGVtIGhpbnQuXG5cdGZvbnQtc2l6ZTogMDtcblx0JHsgV2l0aEhpbnRJdGVtV3JhcHBlciB9IH4gJixcblx0Jjpub3QoOmVtcHR5KSB7XG5cdFx0Zm9udC1zaXplOiAyNHB4OyAvLyBTaXplIG9mIGNoZWNrbWFyayBpY29uXG5cdH1cbmA7XG4iXX0= */"));
  var SelectedExperimentalHintItem = /* @__PURE__ */ createStyled("span", false ? {
    target: "e1p3eej73"
  } : {
    target: "e1p3eej73",
    label: "SelectedExperimentalHintItem"
  })("color:", COLORS.theme.gray[600], ";margin-inline-start:", space(2), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyTHVEIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzLCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgY2hldnJvbkljb25TaXplIH0gZnJvbSAnLi4vc2VsZWN0LWNvbnRyb2wvc3R5bGVzL3NlbGVjdC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgeyBmb250U2l6ZVN0eWxlcyB9IGZyb20gJy4uL2lucHV0LWNvbnRyb2wvc3R5bGVzL2lucHV0LWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB7IERST1BET1dOX01PVElPTl9DU1MgfSBmcm9tICcuLi91dGlscy9zdHlsZS1taXhpbnMnO1xuaW1wb3J0IHR5cGUgeyBDdXN0b21TZWxlY3RCdXR0b25TaXplIH0gZnJvbSAnLi90eXBlcyc7XG5cbmNvbnN0IElOTElORV9QQURESU5HID0ge1xuXHRjb21wYWN0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdHNtYWxsOiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdGRlZmF1bHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG59O1xuXG5jb25zdCBnZXRTZWxlY3RTaXplID0gKFxuXHRzaXplOiBOb25OdWxsYWJsZTwgQ3VzdG9tU2VsZWN0QnV0dG9uU2l6ZVsgJ3NpemUnIF0gPixcblx0aGVpZ2h0UHJvcGVydHk6ICdtaW5IZWlnaHQnIHwgJ2hlaWdodCdcbikgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRjb21wYWN0OiB7XG5cdFx0XHRbIGhlaWdodFByb3BlcnR5IF06IDMyLFxuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5jb21wYWN0LFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuY29tcGFjdCArIGNoZXZyb25JY29uU2l6ZSxcblx0XHR9LFxuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdFsgaGVpZ2h0UHJvcGVydHkgXTogNDAsXG5cdFx0XHRwYWRkaW5nSW5saW5lU3RhcnQ6IElOTElORV9QQURESU5HLmRlZmF1bHQsXG5cdFx0XHRwYWRkaW5nSW5saW5lRW5kOiBJTkxJTkVfUEFERElORy5kZWZhdWx0ICsgY2hldnJvbkljb25TaXplLFxuXHRcdH0sXG5cdFx0c21hbGw6IHtcblx0XHRcdFsgaGVpZ2h0UHJvcGVydHkgXTogMjQsXG5cdFx0XHRwYWRkaW5nSW5saW5lU3RhcnQ6IElOTElORV9QQURESU5HLnNtYWxsLFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuc21hbGwgKyBjaGV2cm9uSWNvblNpemUsXG5cdFx0fSxcblx0fTtcblxuXHRyZXR1cm4gc2l6ZXNbIHNpemUgXSB8fCBzaXplcy5kZWZhdWx0O1xufTtcblxuY29uc3QgZ2V0U2VsZWN0SXRlbVNpemUgPSAoXG5cdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+XG4pID0+IHtcblx0Ly8gVXNlZCB0byB2aXN1YWxseSBhbGlnbiB0aGUgY2hlY2ttYXJrIHdpdGggdGhlIGNoZXZyb25cblx0Y29uc3QgY2hlY2ttYXJrQ29ycmVjdGlvbiA9IDY7XG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdHBhZGRpbmdJbmxpbmVTdGFydDogSU5MSU5FX1BBRERJTkcuY29tcGFjdCxcblx0XHRcdHBhZGRpbmdJbmxpbmVFbmQ6IElOTElORV9QQURESU5HLmNvbXBhY3QgLSBjaGVja21hcmtDb3JyZWN0aW9uLFxuXHRcdH0sXG5cdFx0ZGVmYXVsdDoge1xuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5kZWZhdWx0LFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuZGVmYXVsdCAtIGNoZWNrbWFya0NvcnJlY3Rpb24sXG5cdFx0fSxcblx0XHRzbWFsbDoge1xuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5zbWFsbCxcblx0XHRcdHBhZGRpbmdJbmxpbmVFbmQ6IElOTElORV9QQURESU5HLnNtYWxsIC0gY2hlY2ttYXJrQ29ycmVjdGlvbixcblx0XHR9LFxuXHR9O1xuXG5cdHJldHVybiBzaXplc1sgc2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG59O1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdCwge1xuXHQvLyBEbyBub3QgZm9yd2FyZCBgaGFzQ3VzdG9tUmVuZGVyUHJvcGAgdG8gdGhlIHVuZGVybHlpbmcgQXJpYWtpdC5TZWxlY3QgY29tcG9uZW50XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3AgKSA9PiBwcm9wICE9PSAnaGFzQ3VzdG9tUmVuZGVyUHJvcCcsXG59ICkoXG5cdCgge1xuXHRcdHNpemUsXG5cdFx0aGFzQ3VzdG9tUmVuZGVyUHJvcCxcblx0fToge1xuXHRcdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+O1xuXHRcdGhhc0N1c3RvbVJlbmRlclByb3A6IGJvb2xlYW47XG5cdH0gKSA9PiBjc3NgXG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmJhY2tncm91bmQgfTtcblx0XHRib3JkZXI6IG5vbmU7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdFx0Y3Vyc29yOiBwb2ludGVyO1xuXHRcdGZvbnQtZmFtaWx5OiBpbmhlcml0O1xuXHRcdHRleHQtYWxpZ246IHN0YXJ0O1xuXHRcdHVzZXItc2VsZWN0OiBub25lO1xuXHRcdHdpZHRoOiAxMDAlO1xuXG5cdFx0JltkYXRhLWZvY3VzLXZpc2libGVdIHtcblx0XHRcdG91dGxpbmU6IG5vbmU7IC8vIGhhbmRsZWQgYnkgSW5wdXRCYXNlIGNvbXBvbmVudFxuXHRcdH1cblxuXHRcdCR7IGdldFNlbGVjdFNpemUoIHNpemUsIGhhc0N1c3RvbVJlbmRlclByb3AgPyAnbWluSGVpZ2h0JyA6ICdoZWlnaHQnICkgfVxuXHRcdCR7ICEgaGFzQ3VzdG9tUmVuZGVyUHJvcCAmJiB0cnVuY2F0ZVN0eWxlcyB9XG5cdFx0JHsgZm9udFNpemVTdHlsZXMoIHsgaW5wdXRTaXplOiBzaXplIH0gKSB9XG5cdGBcbik7XG5cbmNvbnN0IHNsaWRlRG93biA9IGtleWZyYW1lcygge1xuXHQnMCUnOiB7IHRyYW5zZm9ybTogYHRyYW5zbGF0ZVkoLSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfSlgIH0sXG5cdCcxMDAlJzogeyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVZKDApJyB9LFxufSApO1xuXG5jb25zdCBmYWRlSW4gPSBrZXlmcmFtZXMoIHtcblx0JzAlJzogeyBvcGFjaXR5OiAwIH0sXG5cdCcxMDAlJzogeyBvcGFjaXR5OiAxIH0sXG59ICk7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RQb3BvdmVyID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdFBvcG92ZXIgKWBcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYmFja2dyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0Ym94LXNoYWRvdzogJHsgQ09ORklHLmVsZXZhdGlvbk1lZGl1bSB9O1xuXG5cdC8qIHotaW5kZXgoXCIuY29tcG9uZW50cy1wb3BvdmVyXCIpICovXG5cdHotaW5kZXg6IDEwMDAwMDA7XG5cblx0bWF4LWhlaWdodDogbWluKCB2YXIoIC0tcG9wb3Zlci1hdmFpbGFibGUtaGVpZ2h0LCA0MDBweCApLCA0MDBweCApO1xuXHRvdmVyZmxvdzogYXV0bztcblx0b3ZlcnNjcm9sbC1iZWhhdmlvcjogY29udGFpbjtcblxuXHQvKiBUaGUgc21hbGxlc3Qgc2l6ZSB3aXRob3V0IG92ZXJmbG93aW5nIHRoZSBjb250YWluZXIuICovXG5cdG1pbi13aWR0aDogbWluLWNvbnRlbnQ7XG5cblx0LyogQW5pbWF0aW9uICovXG5cdCZbZGF0YS1vcGVuXSB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHRhbmltYXRpb24tbmFtZTogJHsgc2xpZGVEb3duIH0sICR7IGZhZGVJbiB9O1xuXHRcdFx0YW5pbWF0aW9uLWR1cmF0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RVUkFUSU9OIH0sXG5cdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9EVVJBVElPTiB9O1xuXHRcdFx0YW5pbWF0aW9uLXRpbWluZy1mdW5jdGlvbjogJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9FQVNJTkcgfSxcblx0XHRcdFx0JHsgRFJPUERPV05fTU9USU9OX0NTUy5GQURFX0VBU0lORyB9O1xuXHRcdFx0d2lsbC1jaGFuZ2U6IHRyYW5zZm9ybSwgb3BhY2l0eTtcblx0XHR9XG5cdH1cblxuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdC8qIFRoZSBvdXRsaW5lIHdpbGwgYmUgb24gdGhlIHRyaWdnZXIsIHJhdGhlciB0aGFuIHRoZSBwb3BvdmVyLiAqL1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RJdGVtID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdEl0ZW0gKShcblx0KCB7XG5cdFx0c2l6ZSxcblx0fToge1xuXHRcdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+O1xuXHR9ICkgPT4gY3NzYFxuXHRcdGN1cnNvcjogZGVmYXVsdDtcblx0XHRkaXNwbGF5OiBmbGV4O1xuXHRcdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdFx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRcdGZvbnQtc2l6ZTogJHsgQ09ORklHLmZvbnRTaXplIH07XG5cdFx0Ly8gVE9ETzogcmVhc3Nlc3MgbGluZS1oZWlnaHQgZm9yIG5vbi1sZWdhY3kgdjJcblx0XHRsaW5lLWhlaWdodDogMjhweDtcblx0XHRwYWRkaW5nLWJsb2NrOiAkeyBzcGFjZSggMiApIH07XG5cdFx0c2Nyb2xsLW1hcmdpbjogJHsgc3BhY2UoIDEgKSB9O1xuXHRcdHVzZXItc2VsZWN0OiBub25lO1xuXG5cdFx0JlthcmlhLWRpc2FibGVkPSd0cnVlJ10ge1xuXHRcdFx0Y3Vyc29yOiBub3QtYWxsb3dlZDtcblx0XHR9XG5cblx0XHQmW2RhdGEtYWN0aXZlLWl0ZW1dIHtcblx0XHRcdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRcdH1cblxuXHRcdCR7IGdldFNlbGVjdEl0ZW1TaXplKCBzaXplICkgfVxuXHRgXG4pO1xuXG5jb25zdCB0cnVuY2F0ZVN0eWxlcyA9IGNzc2Bcblx0b3ZlcmZsb3c6IGhpZGRlbjtcblx0dGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ZWRFeHBlcmltZW50YWxIaW50V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdCR7IHRydW5jYXRlU3R5bGVzIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RlZEV4cGVyaW1lbnRhbEhpbnRJdGVtID0gc3R5bGVkLnNwYW5gXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZ3JheVsgNjAwIF0gfTtcblx0bWFyZ2luLWlubGluZS1zdGFydDogJHsgc3BhY2UoIDIgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFdpdGhIaW50SXRlbVdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGZsZXgtd3JhcDogd3JhcDtcblx0ZmxleDogMTtcblx0Y29sdW1uLWdhcDogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFdpdGhIaW50SXRlbUhpbnQgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyA2MDAgXSB9O1xuXHR0ZXh0LWFsaWduOiBpbml0aWFsO1xuXHRsaW5lLWhlaWdodDogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9O1xuXHRwYWRkaW5nLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAxICkgfTtcblx0bWFyZ2luLWJsb2NrOiAkeyBzcGFjZSggMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ZWRJdGVtQ2hlY2sgPSBzdHlsZWQoIEFyaWFraXQuU2VsZWN0SXRlbUNoZWNrIClgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdG1hcmdpbi1pbmxpbmUtc3RhcnQ6ICR7IHNwYWNlKCAyICkgfTtcblx0ZmlsbDogY3VycmVudENvbG9yO1xuXG5cdC8vIEtlZXAgdGhlIGNoZWNrbWFyayB2ZXJ0aWNhbGx5IGFsaWduZWQgYXQgdGhlIHRvcC4gU2luY2UgdGhlIGl0ZW0gdGV4dCBoYXMgYVxuXHQvLyAyOHB4IGxpbmUgaGVpZ2h0IGFuZCB0aGUgY2hlY2ttYXJrIGlzIDI0cHggdGFsbCwgYSAoMjgtMjQpLzIgPSAycHggbWFyZ2luXG5cdC8vIGlzIGFwcGxpZWQgdG8ga2VlcCB0aGUgY29ycmVjdCBhbGlnbm1lbnQgYmV0d2VlbiB0aGUgdGV4dCBhbmQgdGhlIGNoZWNrbWFyay5cblx0YWxpZ24tc2VsZjogc3RhcnQ7XG5cdG1hcmdpbi1ibG9jay1zdGFydDogMnB4O1xuXG5cdC8vIFNpbmNlIHRoZSBjaGVja21hcmsncyBkaW1lbnNpb25zIGFyZSBhcHBsaWVkIHdpdGggJ2VtJyB1bml0cywgc2V0dGluZyBhXG5cdC8vIGZvbnQgc2l6ZSBvZiAwIGFsbG93cyB0aGUgc3BhY2UgcmVzZXJ2ZWQgZm9yIHRoZSBjaGVja21hcmsgdG8gY29sbGFwc2UgZm9yXG5cdC8vIGl0ZW1zIHRoYXQgYXJlIG5vdCBzZWxlY3RlZCBvciB0aGF0IGRvbid0IGhhdmUgYW4gYXNzb2NpYXRlZCBpdGVtIGhpbnQuXG5cdGZvbnQtc2l6ZTogMDtcblx0JHsgV2l0aEhpbnRJdGVtV3JhcHBlciB9IH4gJixcblx0Jjpub3QoOmVtcHR5KSB7XG5cdFx0Zm9udC1zaXplOiAyNHB4OyAvLyBTaXplIG9mIGNoZWNrbWFyayBpY29uXG5cdH1cbmA7XG4iXX0= */"));
  var WithHintItemWrapper = /* @__PURE__ */ createStyled("div", false ? {
    target: "e1p3eej72"
  } : {
    target: "e1p3eej72",
    label: "WithHintItemWrapper"
  })("display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;flex:1;column-gap:", space(4), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnTTZDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzLCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgY2hldnJvbkljb25TaXplIH0gZnJvbSAnLi4vc2VsZWN0LWNvbnRyb2wvc3R5bGVzL3NlbGVjdC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgeyBmb250U2l6ZVN0eWxlcyB9IGZyb20gJy4uL2lucHV0LWNvbnRyb2wvc3R5bGVzL2lucHV0LWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB7IERST1BET1dOX01PVElPTl9DU1MgfSBmcm9tICcuLi91dGlscy9zdHlsZS1taXhpbnMnO1xuaW1wb3J0IHR5cGUgeyBDdXN0b21TZWxlY3RCdXR0b25TaXplIH0gZnJvbSAnLi90eXBlcyc7XG5cbmNvbnN0IElOTElORV9QQURESU5HID0ge1xuXHRjb21wYWN0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdHNtYWxsOiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdGRlZmF1bHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG59O1xuXG5jb25zdCBnZXRTZWxlY3RTaXplID0gKFxuXHRzaXplOiBOb25OdWxsYWJsZTwgQ3VzdG9tU2VsZWN0QnV0dG9uU2l6ZVsgJ3NpemUnIF0gPixcblx0aGVpZ2h0UHJvcGVydHk6ICdtaW5IZWlnaHQnIHwgJ2hlaWdodCdcbikgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRjb21wYWN0OiB7XG5cdFx0XHRbIGhlaWdodFByb3BlcnR5IF06IDMyLFxuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5jb21wYWN0LFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuY29tcGFjdCArIGNoZXZyb25JY29uU2l6ZSxcblx0XHR9LFxuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdFsgaGVpZ2h0UHJvcGVydHkgXTogNDAsXG5cdFx0XHRwYWRkaW5nSW5saW5lU3RhcnQ6IElOTElORV9QQURESU5HLmRlZmF1bHQsXG5cdFx0XHRwYWRkaW5nSW5saW5lRW5kOiBJTkxJTkVfUEFERElORy5kZWZhdWx0ICsgY2hldnJvbkljb25TaXplLFxuXHRcdH0sXG5cdFx0c21hbGw6IHtcblx0XHRcdFsgaGVpZ2h0UHJvcGVydHkgXTogMjQsXG5cdFx0XHRwYWRkaW5nSW5saW5lU3RhcnQ6IElOTElORV9QQURESU5HLnNtYWxsLFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuc21hbGwgKyBjaGV2cm9uSWNvblNpemUsXG5cdFx0fSxcblx0fTtcblxuXHRyZXR1cm4gc2l6ZXNbIHNpemUgXSB8fCBzaXplcy5kZWZhdWx0O1xufTtcblxuY29uc3QgZ2V0U2VsZWN0SXRlbVNpemUgPSAoXG5cdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+XG4pID0+IHtcblx0Ly8gVXNlZCB0byB2aXN1YWxseSBhbGlnbiB0aGUgY2hlY2ttYXJrIHdpdGggdGhlIGNoZXZyb25cblx0Y29uc3QgY2hlY2ttYXJrQ29ycmVjdGlvbiA9IDY7XG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdHBhZGRpbmdJbmxpbmVTdGFydDogSU5MSU5FX1BBRERJTkcuY29tcGFjdCxcblx0XHRcdHBhZGRpbmdJbmxpbmVFbmQ6IElOTElORV9QQURESU5HLmNvbXBhY3QgLSBjaGVja21hcmtDb3JyZWN0aW9uLFxuXHRcdH0sXG5cdFx0ZGVmYXVsdDoge1xuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5kZWZhdWx0LFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuZGVmYXVsdCAtIGNoZWNrbWFya0NvcnJlY3Rpb24sXG5cdFx0fSxcblx0XHRzbWFsbDoge1xuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5zbWFsbCxcblx0XHRcdHBhZGRpbmdJbmxpbmVFbmQ6IElOTElORV9QQURESU5HLnNtYWxsIC0gY2hlY2ttYXJrQ29ycmVjdGlvbixcblx0XHR9LFxuXHR9O1xuXG5cdHJldHVybiBzaXplc1sgc2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG59O1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdCwge1xuXHQvLyBEbyBub3QgZm9yd2FyZCBgaGFzQ3VzdG9tUmVuZGVyUHJvcGAgdG8gdGhlIHVuZGVybHlpbmcgQXJpYWtpdC5TZWxlY3QgY29tcG9uZW50XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3AgKSA9PiBwcm9wICE9PSAnaGFzQ3VzdG9tUmVuZGVyUHJvcCcsXG59ICkoXG5cdCgge1xuXHRcdHNpemUsXG5cdFx0aGFzQ3VzdG9tUmVuZGVyUHJvcCxcblx0fToge1xuXHRcdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+O1xuXHRcdGhhc0N1c3RvbVJlbmRlclByb3A6IGJvb2xlYW47XG5cdH0gKSA9PiBjc3NgXG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmJhY2tncm91bmQgfTtcblx0XHRib3JkZXI6IG5vbmU7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdFx0Y3Vyc29yOiBwb2ludGVyO1xuXHRcdGZvbnQtZmFtaWx5OiBpbmhlcml0O1xuXHRcdHRleHQtYWxpZ246IHN0YXJ0O1xuXHRcdHVzZXItc2VsZWN0OiBub25lO1xuXHRcdHdpZHRoOiAxMDAlO1xuXG5cdFx0JltkYXRhLWZvY3VzLXZpc2libGVdIHtcblx0XHRcdG91dGxpbmU6IG5vbmU7IC8vIGhhbmRsZWQgYnkgSW5wdXRCYXNlIGNvbXBvbmVudFxuXHRcdH1cblxuXHRcdCR7IGdldFNlbGVjdFNpemUoIHNpemUsIGhhc0N1c3RvbVJlbmRlclByb3AgPyAnbWluSGVpZ2h0JyA6ICdoZWlnaHQnICkgfVxuXHRcdCR7ICEgaGFzQ3VzdG9tUmVuZGVyUHJvcCAmJiB0cnVuY2F0ZVN0eWxlcyB9XG5cdFx0JHsgZm9udFNpemVTdHlsZXMoIHsgaW5wdXRTaXplOiBzaXplIH0gKSB9XG5cdGBcbik7XG5cbmNvbnN0IHNsaWRlRG93biA9IGtleWZyYW1lcygge1xuXHQnMCUnOiB7IHRyYW5zZm9ybTogYHRyYW5zbGF0ZVkoLSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfSlgIH0sXG5cdCcxMDAlJzogeyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVZKDApJyB9LFxufSApO1xuXG5jb25zdCBmYWRlSW4gPSBrZXlmcmFtZXMoIHtcblx0JzAlJzogeyBvcGFjaXR5OiAwIH0sXG5cdCcxMDAlJzogeyBvcGFjaXR5OiAxIH0sXG59ICk7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RQb3BvdmVyID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdFBvcG92ZXIgKWBcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYmFja2dyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0Ym94LXNoYWRvdzogJHsgQ09ORklHLmVsZXZhdGlvbk1lZGl1bSB9O1xuXG5cdC8qIHotaW5kZXgoXCIuY29tcG9uZW50cy1wb3BvdmVyXCIpICovXG5cdHotaW5kZXg6IDEwMDAwMDA7XG5cblx0bWF4LWhlaWdodDogbWluKCB2YXIoIC0tcG9wb3Zlci1hdmFpbGFibGUtaGVpZ2h0LCA0MDBweCApLCA0MDBweCApO1xuXHRvdmVyZmxvdzogYXV0bztcblx0b3ZlcnNjcm9sbC1iZWhhdmlvcjogY29udGFpbjtcblxuXHQvKiBUaGUgc21hbGxlc3Qgc2l6ZSB3aXRob3V0IG92ZXJmbG93aW5nIHRoZSBjb250YWluZXIuICovXG5cdG1pbi13aWR0aDogbWluLWNvbnRlbnQ7XG5cblx0LyogQW5pbWF0aW9uICovXG5cdCZbZGF0YS1vcGVuXSB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHRhbmltYXRpb24tbmFtZTogJHsgc2xpZGVEb3duIH0sICR7IGZhZGVJbiB9O1xuXHRcdFx0YW5pbWF0aW9uLWR1cmF0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RVUkFUSU9OIH0sXG5cdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9EVVJBVElPTiB9O1xuXHRcdFx0YW5pbWF0aW9uLXRpbWluZy1mdW5jdGlvbjogJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9FQVNJTkcgfSxcblx0XHRcdFx0JHsgRFJPUERPV05fTU9USU9OX0NTUy5GQURFX0VBU0lORyB9O1xuXHRcdFx0d2lsbC1jaGFuZ2U6IHRyYW5zZm9ybSwgb3BhY2l0eTtcblx0XHR9XG5cdH1cblxuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdC8qIFRoZSBvdXRsaW5lIHdpbGwgYmUgb24gdGhlIHRyaWdnZXIsIHJhdGhlciB0aGFuIHRoZSBwb3BvdmVyLiAqL1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RJdGVtID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdEl0ZW0gKShcblx0KCB7XG5cdFx0c2l6ZSxcblx0fToge1xuXHRcdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+O1xuXHR9ICkgPT4gY3NzYFxuXHRcdGN1cnNvcjogZGVmYXVsdDtcblx0XHRkaXNwbGF5OiBmbGV4O1xuXHRcdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdFx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRcdGZvbnQtc2l6ZTogJHsgQ09ORklHLmZvbnRTaXplIH07XG5cdFx0Ly8gVE9ETzogcmVhc3Nlc3MgbGluZS1oZWlnaHQgZm9yIG5vbi1sZWdhY3kgdjJcblx0XHRsaW5lLWhlaWdodDogMjhweDtcblx0XHRwYWRkaW5nLWJsb2NrOiAkeyBzcGFjZSggMiApIH07XG5cdFx0c2Nyb2xsLW1hcmdpbjogJHsgc3BhY2UoIDEgKSB9O1xuXHRcdHVzZXItc2VsZWN0OiBub25lO1xuXG5cdFx0JlthcmlhLWRpc2FibGVkPSd0cnVlJ10ge1xuXHRcdFx0Y3Vyc29yOiBub3QtYWxsb3dlZDtcblx0XHR9XG5cblx0XHQmW2RhdGEtYWN0aXZlLWl0ZW1dIHtcblx0XHRcdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRcdH1cblxuXHRcdCR7IGdldFNlbGVjdEl0ZW1TaXplKCBzaXplICkgfVxuXHRgXG4pO1xuXG5jb25zdCB0cnVuY2F0ZVN0eWxlcyA9IGNzc2Bcblx0b3ZlcmZsb3c6IGhpZGRlbjtcblx0dGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ZWRFeHBlcmltZW50YWxIaW50V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdCR7IHRydW5jYXRlU3R5bGVzIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RlZEV4cGVyaW1lbnRhbEhpbnRJdGVtID0gc3R5bGVkLnNwYW5gXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZ3JheVsgNjAwIF0gfTtcblx0bWFyZ2luLWlubGluZS1zdGFydDogJHsgc3BhY2UoIDIgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFdpdGhIaW50SXRlbVdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGZsZXgtd3JhcDogd3JhcDtcblx0ZmxleDogMTtcblx0Y29sdW1uLWdhcDogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFdpdGhIaW50SXRlbUhpbnQgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyA2MDAgXSB9O1xuXHR0ZXh0LWFsaWduOiBpbml0aWFsO1xuXHRsaW5lLWhlaWdodDogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9O1xuXHRwYWRkaW5nLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAxICkgfTtcblx0bWFyZ2luLWJsb2NrOiAkeyBzcGFjZSggMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ZWRJdGVtQ2hlY2sgPSBzdHlsZWQoIEFyaWFraXQuU2VsZWN0SXRlbUNoZWNrIClgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdG1hcmdpbi1pbmxpbmUtc3RhcnQ6ICR7IHNwYWNlKCAyICkgfTtcblx0ZmlsbDogY3VycmVudENvbG9yO1xuXG5cdC8vIEtlZXAgdGhlIGNoZWNrbWFyayB2ZXJ0aWNhbGx5IGFsaWduZWQgYXQgdGhlIHRvcC4gU2luY2UgdGhlIGl0ZW0gdGV4dCBoYXMgYVxuXHQvLyAyOHB4IGxpbmUgaGVpZ2h0IGFuZCB0aGUgY2hlY2ttYXJrIGlzIDI0cHggdGFsbCwgYSAoMjgtMjQpLzIgPSAycHggbWFyZ2luXG5cdC8vIGlzIGFwcGxpZWQgdG8ga2VlcCB0aGUgY29ycmVjdCBhbGlnbm1lbnQgYmV0d2VlbiB0aGUgdGV4dCBhbmQgdGhlIGNoZWNrbWFyay5cblx0YWxpZ24tc2VsZjogc3RhcnQ7XG5cdG1hcmdpbi1ibG9jay1zdGFydDogMnB4O1xuXG5cdC8vIFNpbmNlIHRoZSBjaGVja21hcmsncyBkaW1lbnNpb25zIGFyZSBhcHBsaWVkIHdpdGggJ2VtJyB1bml0cywgc2V0dGluZyBhXG5cdC8vIGZvbnQgc2l6ZSBvZiAwIGFsbG93cyB0aGUgc3BhY2UgcmVzZXJ2ZWQgZm9yIHRoZSBjaGVja21hcmsgdG8gY29sbGFwc2UgZm9yXG5cdC8vIGl0ZW1zIHRoYXQgYXJlIG5vdCBzZWxlY3RlZCBvciB0aGF0IGRvbid0IGhhdmUgYW4gYXNzb2NpYXRlZCBpdGVtIGhpbnQuXG5cdGZvbnQtc2l6ZTogMDtcblx0JHsgV2l0aEhpbnRJdGVtV3JhcHBlciB9IH4gJixcblx0Jjpub3QoOmVtcHR5KSB7XG5cdFx0Zm9udC1zaXplOiAyNHB4OyAvLyBTaXplIG9mIGNoZWNrbWFyayBpY29uXG5cdH1cbmA7XG4iXX0= */"));
  var WithHintItemHint = /* @__PURE__ */ createStyled("span", false ? {
    target: "e1p3eej71"
  } : {
    target: "e1p3eej71",
    label: "WithHintItemHint"
  })("color:", COLORS.theme.gray[600], ";text-align:initial;line-height:", config_values_default.fontLineHeightBase, ";padding-inline-end:", space(1), ";margin-block:", space(1), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF5TTJDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzLCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgY2hldnJvbkljb25TaXplIH0gZnJvbSAnLi4vc2VsZWN0LWNvbnRyb2wvc3R5bGVzL3NlbGVjdC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgeyBmb250U2l6ZVN0eWxlcyB9IGZyb20gJy4uL2lucHV0LWNvbnRyb2wvc3R5bGVzL2lucHV0LWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB7IERST1BET1dOX01PVElPTl9DU1MgfSBmcm9tICcuLi91dGlscy9zdHlsZS1taXhpbnMnO1xuaW1wb3J0IHR5cGUgeyBDdXN0b21TZWxlY3RCdXR0b25TaXplIH0gZnJvbSAnLi90eXBlcyc7XG5cbmNvbnN0IElOTElORV9QQURESU5HID0ge1xuXHRjb21wYWN0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdHNtYWxsOiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdGRlZmF1bHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG59O1xuXG5jb25zdCBnZXRTZWxlY3RTaXplID0gKFxuXHRzaXplOiBOb25OdWxsYWJsZTwgQ3VzdG9tU2VsZWN0QnV0dG9uU2l6ZVsgJ3NpemUnIF0gPixcblx0aGVpZ2h0UHJvcGVydHk6ICdtaW5IZWlnaHQnIHwgJ2hlaWdodCdcbikgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRjb21wYWN0OiB7XG5cdFx0XHRbIGhlaWdodFByb3BlcnR5IF06IDMyLFxuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5jb21wYWN0LFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuY29tcGFjdCArIGNoZXZyb25JY29uU2l6ZSxcblx0XHR9LFxuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdFsgaGVpZ2h0UHJvcGVydHkgXTogNDAsXG5cdFx0XHRwYWRkaW5nSW5saW5lU3RhcnQ6IElOTElORV9QQURESU5HLmRlZmF1bHQsXG5cdFx0XHRwYWRkaW5nSW5saW5lRW5kOiBJTkxJTkVfUEFERElORy5kZWZhdWx0ICsgY2hldnJvbkljb25TaXplLFxuXHRcdH0sXG5cdFx0c21hbGw6IHtcblx0XHRcdFsgaGVpZ2h0UHJvcGVydHkgXTogMjQsXG5cdFx0XHRwYWRkaW5nSW5saW5lU3RhcnQ6IElOTElORV9QQURESU5HLnNtYWxsLFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuc21hbGwgKyBjaGV2cm9uSWNvblNpemUsXG5cdFx0fSxcblx0fTtcblxuXHRyZXR1cm4gc2l6ZXNbIHNpemUgXSB8fCBzaXplcy5kZWZhdWx0O1xufTtcblxuY29uc3QgZ2V0U2VsZWN0SXRlbVNpemUgPSAoXG5cdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+XG4pID0+IHtcblx0Ly8gVXNlZCB0byB2aXN1YWxseSBhbGlnbiB0aGUgY2hlY2ttYXJrIHdpdGggdGhlIGNoZXZyb25cblx0Y29uc3QgY2hlY2ttYXJrQ29ycmVjdGlvbiA9IDY7XG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdHBhZGRpbmdJbmxpbmVTdGFydDogSU5MSU5FX1BBRERJTkcuY29tcGFjdCxcblx0XHRcdHBhZGRpbmdJbmxpbmVFbmQ6IElOTElORV9QQURESU5HLmNvbXBhY3QgLSBjaGVja21hcmtDb3JyZWN0aW9uLFxuXHRcdH0sXG5cdFx0ZGVmYXVsdDoge1xuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5kZWZhdWx0LFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuZGVmYXVsdCAtIGNoZWNrbWFya0NvcnJlY3Rpb24sXG5cdFx0fSxcblx0XHRzbWFsbDoge1xuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5zbWFsbCxcblx0XHRcdHBhZGRpbmdJbmxpbmVFbmQ6IElOTElORV9QQURESU5HLnNtYWxsIC0gY2hlY2ttYXJrQ29ycmVjdGlvbixcblx0XHR9LFxuXHR9O1xuXG5cdHJldHVybiBzaXplc1sgc2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG59O1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdCwge1xuXHQvLyBEbyBub3QgZm9yd2FyZCBgaGFzQ3VzdG9tUmVuZGVyUHJvcGAgdG8gdGhlIHVuZGVybHlpbmcgQXJpYWtpdC5TZWxlY3QgY29tcG9uZW50XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3AgKSA9PiBwcm9wICE9PSAnaGFzQ3VzdG9tUmVuZGVyUHJvcCcsXG59ICkoXG5cdCgge1xuXHRcdHNpemUsXG5cdFx0aGFzQ3VzdG9tUmVuZGVyUHJvcCxcblx0fToge1xuXHRcdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+O1xuXHRcdGhhc0N1c3RvbVJlbmRlclByb3A6IGJvb2xlYW47XG5cdH0gKSA9PiBjc3NgXG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmJhY2tncm91bmQgfTtcblx0XHRib3JkZXI6IG5vbmU7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdFx0Y3Vyc29yOiBwb2ludGVyO1xuXHRcdGZvbnQtZmFtaWx5OiBpbmhlcml0O1xuXHRcdHRleHQtYWxpZ246IHN0YXJ0O1xuXHRcdHVzZXItc2VsZWN0OiBub25lO1xuXHRcdHdpZHRoOiAxMDAlO1xuXG5cdFx0JltkYXRhLWZvY3VzLXZpc2libGVdIHtcblx0XHRcdG91dGxpbmU6IG5vbmU7IC8vIGhhbmRsZWQgYnkgSW5wdXRCYXNlIGNvbXBvbmVudFxuXHRcdH1cblxuXHRcdCR7IGdldFNlbGVjdFNpemUoIHNpemUsIGhhc0N1c3RvbVJlbmRlclByb3AgPyAnbWluSGVpZ2h0JyA6ICdoZWlnaHQnICkgfVxuXHRcdCR7ICEgaGFzQ3VzdG9tUmVuZGVyUHJvcCAmJiB0cnVuY2F0ZVN0eWxlcyB9XG5cdFx0JHsgZm9udFNpemVTdHlsZXMoIHsgaW5wdXRTaXplOiBzaXplIH0gKSB9XG5cdGBcbik7XG5cbmNvbnN0IHNsaWRlRG93biA9IGtleWZyYW1lcygge1xuXHQnMCUnOiB7IHRyYW5zZm9ybTogYHRyYW5zbGF0ZVkoLSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfSlgIH0sXG5cdCcxMDAlJzogeyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVZKDApJyB9LFxufSApO1xuXG5jb25zdCBmYWRlSW4gPSBrZXlmcmFtZXMoIHtcblx0JzAlJzogeyBvcGFjaXR5OiAwIH0sXG5cdCcxMDAlJzogeyBvcGFjaXR5OiAxIH0sXG59ICk7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RQb3BvdmVyID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdFBvcG92ZXIgKWBcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYmFja2dyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0Ym94LXNoYWRvdzogJHsgQ09ORklHLmVsZXZhdGlvbk1lZGl1bSB9O1xuXG5cdC8qIHotaW5kZXgoXCIuY29tcG9uZW50cy1wb3BvdmVyXCIpICovXG5cdHotaW5kZXg6IDEwMDAwMDA7XG5cblx0bWF4LWhlaWdodDogbWluKCB2YXIoIC0tcG9wb3Zlci1hdmFpbGFibGUtaGVpZ2h0LCA0MDBweCApLCA0MDBweCApO1xuXHRvdmVyZmxvdzogYXV0bztcblx0b3ZlcnNjcm9sbC1iZWhhdmlvcjogY29udGFpbjtcblxuXHQvKiBUaGUgc21hbGxlc3Qgc2l6ZSB3aXRob3V0IG92ZXJmbG93aW5nIHRoZSBjb250YWluZXIuICovXG5cdG1pbi13aWR0aDogbWluLWNvbnRlbnQ7XG5cblx0LyogQW5pbWF0aW9uICovXG5cdCZbZGF0YS1vcGVuXSB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHRhbmltYXRpb24tbmFtZTogJHsgc2xpZGVEb3duIH0sICR7IGZhZGVJbiB9O1xuXHRcdFx0YW5pbWF0aW9uLWR1cmF0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RVUkFUSU9OIH0sXG5cdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9EVVJBVElPTiB9O1xuXHRcdFx0YW5pbWF0aW9uLXRpbWluZy1mdW5jdGlvbjogJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9FQVNJTkcgfSxcblx0XHRcdFx0JHsgRFJPUERPV05fTU9USU9OX0NTUy5GQURFX0VBU0lORyB9O1xuXHRcdFx0d2lsbC1jaGFuZ2U6IHRyYW5zZm9ybSwgb3BhY2l0eTtcblx0XHR9XG5cdH1cblxuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdC8qIFRoZSBvdXRsaW5lIHdpbGwgYmUgb24gdGhlIHRyaWdnZXIsIHJhdGhlciB0aGFuIHRoZSBwb3BvdmVyLiAqL1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RJdGVtID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdEl0ZW0gKShcblx0KCB7XG5cdFx0c2l6ZSxcblx0fToge1xuXHRcdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+O1xuXHR9ICkgPT4gY3NzYFxuXHRcdGN1cnNvcjogZGVmYXVsdDtcblx0XHRkaXNwbGF5OiBmbGV4O1xuXHRcdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdFx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRcdGZvbnQtc2l6ZTogJHsgQ09ORklHLmZvbnRTaXplIH07XG5cdFx0Ly8gVE9ETzogcmVhc3Nlc3MgbGluZS1oZWlnaHQgZm9yIG5vbi1sZWdhY3kgdjJcblx0XHRsaW5lLWhlaWdodDogMjhweDtcblx0XHRwYWRkaW5nLWJsb2NrOiAkeyBzcGFjZSggMiApIH07XG5cdFx0c2Nyb2xsLW1hcmdpbjogJHsgc3BhY2UoIDEgKSB9O1xuXHRcdHVzZXItc2VsZWN0OiBub25lO1xuXG5cdFx0JlthcmlhLWRpc2FibGVkPSd0cnVlJ10ge1xuXHRcdFx0Y3Vyc29yOiBub3QtYWxsb3dlZDtcblx0XHR9XG5cblx0XHQmW2RhdGEtYWN0aXZlLWl0ZW1dIHtcblx0XHRcdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRcdH1cblxuXHRcdCR7IGdldFNlbGVjdEl0ZW1TaXplKCBzaXplICkgfVxuXHRgXG4pO1xuXG5jb25zdCB0cnVuY2F0ZVN0eWxlcyA9IGNzc2Bcblx0b3ZlcmZsb3c6IGhpZGRlbjtcblx0dGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ZWRFeHBlcmltZW50YWxIaW50V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdCR7IHRydW5jYXRlU3R5bGVzIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RlZEV4cGVyaW1lbnRhbEhpbnRJdGVtID0gc3R5bGVkLnNwYW5gXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZ3JheVsgNjAwIF0gfTtcblx0bWFyZ2luLWlubGluZS1zdGFydDogJHsgc3BhY2UoIDIgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFdpdGhIaW50SXRlbVdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGZsZXgtd3JhcDogd3JhcDtcblx0ZmxleDogMTtcblx0Y29sdW1uLWdhcDogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFdpdGhIaW50SXRlbUhpbnQgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyA2MDAgXSB9O1xuXHR0ZXh0LWFsaWduOiBpbml0aWFsO1xuXHRsaW5lLWhlaWdodDogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9O1xuXHRwYWRkaW5nLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAxICkgfTtcblx0bWFyZ2luLWJsb2NrOiAkeyBzcGFjZSggMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ZWRJdGVtQ2hlY2sgPSBzdHlsZWQoIEFyaWFraXQuU2VsZWN0SXRlbUNoZWNrIClgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdG1hcmdpbi1pbmxpbmUtc3RhcnQ6ICR7IHNwYWNlKCAyICkgfTtcblx0ZmlsbDogY3VycmVudENvbG9yO1xuXG5cdC8vIEtlZXAgdGhlIGNoZWNrbWFyayB2ZXJ0aWNhbGx5IGFsaWduZWQgYXQgdGhlIHRvcC4gU2luY2UgdGhlIGl0ZW0gdGV4dCBoYXMgYVxuXHQvLyAyOHB4IGxpbmUgaGVpZ2h0IGFuZCB0aGUgY2hlY2ttYXJrIGlzIDI0cHggdGFsbCwgYSAoMjgtMjQpLzIgPSAycHggbWFyZ2luXG5cdC8vIGlzIGFwcGxpZWQgdG8ga2VlcCB0aGUgY29ycmVjdCBhbGlnbm1lbnQgYmV0d2VlbiB0aGUgdGV4dCBhbmQgdGhlIGNoZWNrbWFyay5cblx0YWxpZ24tc2VsZjogc3RhcnQ7XG5cdG1hcmdpbi1ibG9jay1zdGFydDogMnB4O1xuXG5cdC8vIFNpbmNlIHRoZSBjaGVja21hcmsncyBkaW1lbnNpb25zIGFyZSBhcHBsaWVkIHdpdGggJ2VtJyB1bml0cywgc2V0dGluZyBhXG5cdC8vIGZvbnQgc2l6ZSBvZiAwIGFsbG93cyB0aGUgc3BhY2UgcmVzZXJ2ZWQgZm9yIHRoZSBjaGVja21hcmsgdG8gY29sbGFwc2UgZm9yXG5cdC8vIGl0ZW1zIHRoYXQgYXJlIG5vdCBzZWxlY3RlZCBvciB0aGF0IGRvbid0IGhhdmUgYW4gYXNzb2NpYXRlZCBpdGVtIGhpbnQuXG5cdGZvbnQtc2l6ZTogMDtcblx0JHsgV2l0aEhpbnRJdGVtV3JhcHBlciB9IH4gJixcblx0Jjpub3QoOmVtcHR5KSB7XG5cdFx0Zm9udC1zaXplOiAyNHB4OyAvLyBTaXplIG9mIGNoZWNrbWFyayBpY29uXG5cdH1cbmA7XG4iXX0= */"));
  var SelectedItemCheck = /* @__PURE__ */ createStyled(SelectItemCheck, false ? {
    target: "e1p3eej70"
  } : {
    target: "e1p3eej70",
    label: "SelectedItemCheck"
  })("display:flex;align-items:center;margin-inline-start:", space(2), ";fill:currentColor;align-self:start;margin-block-start:2px;font-size:0;", WithHintItemWrapper, "~&,&:not(:empty){font-size:24px;}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpTmtFIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzLCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IHsgY2hldnJvbkljb25TaXplIH0gZnJvbSAnLi4vc2VsZWN0LWNvbnRyb2wvc3R5bGVzL3NlbGVjdC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgeyBmb250U2l6ZVN0eWxlcyB9IGZyb20gJy4uL2lucHV0LWNvbnRyb2wvc3R5bGVzL2lucHV0LWNvbnRyb2wtc3R5bGVzJztcbmltcG9ydCB7IERST1BET1dOX01PVElPTl9DU1MgfSBmcm9tICcuLi91dGlscy9zdHlsZS1taXhpbnMnO1xuaW1wb3J0IHR5cGUgeyBDdXN0b21TZWxlY3RCdXR0b25TaXplIH0gZnJvbSAnLi90eXBlcyc7XG5cbmNvbnN0IElOTElORV9QQURESU5HID0ge1xuXHRjb21wYWN0OiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdHNtYWxsOiBDT05GSUcuY29udHJvbFBhZGRpbmdYU21hbGwsXG5cdGRlZmF1bHQ6IENPTkZJRy5jb250cm9sUGFkZGluZ1gsXG59O1xuXG5jb25zdCBnZXRTZWxlY3RTaXplID0gKFxuXHRzaXplOiBOb25OdWxsYWJsZTwgQ3VzdG9tU2VsZWN0QnV0dG9uU2l6ZVsgJ3NpemUnIF0gPixcblx0aGVpZ2h0UHJvcGVydHk6ICdtaW5IZWlnaHQnIHwgJ2hlaWdodCdcbikgPT4ge1xuXHRjb25zdCBzaXplcyA9IHtcblx0XHRjb21wYWN0OiB7XG5cdFx0XHRbIGhlaWdodFByb3BlcnR5IF06IDMyLFxuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5jb21wYWN0LFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuY29tcGFjdCArIGNoZXZyb25JY29uU2l6ZSxcblx0XHR9LFxuXHRcdGRlZmF1bHQ6IHtcblx0XHRcdFsgaGVpZ2h0UHJvcGVydHkgXTogNDAsXG5cdFx0XHRwYWRkaW5nSW5saW5lU3RhcnQ6IElOTElORV9QQURESU5HLmRlZmF1bHQsXG5cdFx0XHRwYWRkaW5nSW5saW5lRW5kOiBJTkxJTkVfUEFERElORy5kZWZhdWx0ICsgY2hldnJvbkljb25TaXplLFxuXHRcdH0sXG5cdFx0c21hbGw6IHtcblx0XHRcdFsgaGVpZ2h0UHJvcGVydHkgXTogMjQsXG5cdFx0XHRwYWRkaW5nSW5saW5lU3RhcnQ6IElOTElORV9QQURESU5HLnNtYWxsLFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuc21hbGwgKyBjaGV2cm9uSWNvblNpemUsXG5cdFx0fSxcblx0fTtcblxuXHRyZXR1cm4gc2l6ZXNbIHNpemUgXSB8fCBzaXplcy5kZWZhdWx0O1xufTtcblxuY29uc3QgZ2V0U2VsZWN0SXRlbVNpemUgPSAoXG5cdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+XG4pID0+IHtcblx0Ly8gVXNlZCB0byB2aXN1YWxseSBhbGlnbiB0aGUgY2hlY2ttYXJrIHdpdGggdGhlIGNoZXZyb25cblx0Y29uc3QgY2hlY2ttYXJrQ29ycmVjdGlvbiA9IDY7XG5cdGNvbnN0IHNpemVzID0ge1xuXHRcdGNvbXBhY3Q6IHtcblx0XHRcdHBhZGRpbmdJbmxpbmVTdGFydDogSU5MSU5FX1BBRERJTkcuY29tcGFjdCxcblx0XHRcdHBhZGRpbmdJbmxpbmVFbmQ6IElOTElORV9QQURESU5HLmNvbXBhY3QgLSBjaGVja21hcmtDb3JyZWN0aW9uLFxuXHRcdH0sXG5cdFx0ZGVmYXVsdDoge1xuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5kZWZhdWx0LFxuXHRcdFx0cGFkZGluZ0lubGluZUVuZDogSU5MSU5FX1BBRERJTkcuZGVmYXVsdCAtIGNoZWNrbWFya0NvcnJlY3Rpb24sXG5cdFx0fSxcblx0XHRzbWFsbDoge1xuXHRcdFx0cGFkZGluZ0lubGluZVN0YXJ0OiBJTkxJTkVfUEFERElORy5zbWFsbCxcblx0XHRcdHBhZGRpbmdJbmxpbmVFbmQ6IElOTElORV9QQURESU5HLnNtYWxsIC0gY2hlY2ttYXJrQ29ycmVjdGlvbixcblx0XHR9LFxuXHR9O1xuXG5cdHJldHVybiBzaXplc1sgc2l6ZSBdIHx8IHNpemVzLmRlZmF1bHQ7XG59O1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdCwge1xuXHQvLyBEbyBub3QgZm9yd2FyZCBgaGFzQ3VzdG9tUmVuZGVyUHJvcGAgdG8gdGhlIHVuZGVybHlpbmcgQXJpYWtpdC5TZWxlY3QgY29tcG9uZW50XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3AgKSA9PiBwcm9wICE9PSAnaGFzQ3VzdG9tUmVuZGVyUHJvcCcsXG59ICkoXG5cdCgge1xuXHRcdHNpemUsXG5cdFx0aGFzQ3VzdG9tUmVuZGVyUHJvcCxcblx0fToge1xuXHRcdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+O1xuXHRcdGhhc0N1c3RvbVJlbmRlclByb3A6IGJvb2xlYW47XG5cdH0gKSA9PiBjc3NgXG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmJhY2tncm91bmQgfTtcblx0XHRib3JkZXI6IG5vbmU7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdFx0Y3Vyc29yOiBwb2ludGVyO1xuXHRcdGZvbnQtZmFtaWx5OiBpbmhlcml0O1xuXHRcdHRleHQtYWxpZ246IHN0YXJ0O1xuXHRcdHVzZXItc2VsZWN0OiBub25lO1xuXHRcdHdpZHRoOiAxMDAlO1xuXG5cdFx0JltkYXRhLWZvY3VzLXZpc2libGVdIHtcblx0XHRcdG91dGxpbmU6IG5vbmU7IC8vIGhhbmRsZWQgYnkgSW5wdXRCYXNlIGNvbXBvbmVudFxuXHRcdH1cblxuXHRcdCR7IGdldFNlbGVjdFNpemUoIHNpemUsIGhhc0N1c3RvbVJlbmRlclByb3AgPyAnbWluSGVpZ2h0JyA6ICdoZWlnaHQnICkgfVxuXHRcdCR7ICEgaGFzQ3VzdG9tUmVuZGVyUHJvcCAmJiB0cnVuY2F0ZVN0eWxlcyB9XG5cdFx0JHsgZm9udFNpemVTdHlsZXMoIHsgaW5wdXRTaXplOiBzaXplIH0gKSB9XG5cdGBcbik7XG5cbmNvbnN0IHNsaWRlRG93biA9IGtleWZyYW1lcygge1xuXHQnMCUnOiB7IHRyYW5zZm9ybTogYHRyYW5zbGF0ZVkoLSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfSlgIH0sXG5cdCcxMDAlJzogeyB0cmFuc2Zvcm06ICd0cmFuc2xhdGVZKDApJyB9LFxufSApO1xuXG5jb25zdCBmYWRlSW4gPSBrZXlmcmFtZXMoIHtcblx0JzAlJzogeyBvcGFjaXR5OiAwIH0sXG5cdCcxMDAlJzogeyBvcGFjaXR5OiAxIH0sXG59ICk7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RQb3BvdmVyID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdFBvcG92ZXIgKWBcblx0ZGlzcGxheTogZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYmFja2dyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0Ym94LXNoYWRvdzogJHsgQ09ORklHLmVsZXZhdGlvbk1lZGl1bSB9O1xuXG5cdC8qIHotaW5kZXgoXCIuY29tcG9uZW50cy1wb3BvdmVyXCIpICovXG5cdHotaW5kZXg6IDEwMDAwMDA7XG5cblx0bWF4LWhlaWdodDogbWluKCB2YXIoIC0tcG9wb3Zlci1hdmFpbGFibGUtaGVpZ2h0LCA0MDBweCApLCA0MDBweCApO1xuXHRvdmVyZmxvdzogYXV0bztcblx0b3ZlcnNjcm9sbC1iZWhhdmlvcjogY29udGFpbjtcblxuXHQvKiBUaGUgc21hbGxlc3Qgc2l6ZSB3aXRob3V0IG92ZXJmbG93aW5nIHRoZSBjb250YWluZXIuICovXG5cdG1pbi13aWR0aDogbWluLWNvbnRlbnQ7XG5cblx0LyogQW5pbWF0aW9uICovXG5cdCZbZGF0YS1vcGVuXSB7XG5cdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHRhbmltYXRpb24tbmFtZTogJHsgc2xpZGVEb3duIH0sICR7IGZhZGVJbiB9O1xuXHRcdFx0YW5pbWF0aW9uLWR1cmF0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RVUkFUSU9OIH0sXG5cdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9EVVJBVElPTiB9O1xuXHRcdFx0YW5pbWF0aW9uLXRpbWluZy1mdW5jdGlvbjogJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9FQVNJTkcgfSxcblx0XHRcdFx0JHsgRFJPUERPV05fTU9USU9OX0NTUy5GQURFX0VBU0lORyB9O1xuXHRcdFx0d2lsbC1jaGFuZ2U6IHRyYW5zZm9ybSwgb3BhY2l0eTtcblx0XHR9XG5cdH1cblxuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdC8qIFRoZSBvdXRsaW5lIHdpbGwgYmUgb24gdGhlIHRyaWdnZXIsIHJhdGhlciB0aGFuIHRoZSBwb3BvdmVyLiAqL1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RJdGVtID0gc3R5bGVkKCBBcmlha2l0LlNlbGVjdEl0ZW0gKShcblx0KCB7XG5cdFx0c2l6ZSxcblx0fToge1xuXHRcdHNpemU6IE5vbk51bGxhYmxlPCBDdXN0b21TZWxlY3RCdXR0b25TaXplWyAnc2l6ZScgXSA+O1xuXHR9ICkgPT4gY3NzYFxuXHRcdGN1cnNvcjogZGVmYXVsdDtcblx0XHRkaXNwbGF5OiBmbGV4O1xuXHRcdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdFx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRcdGZvbnQtc2l6ZTogJHsgQ09ORklHLmZvbnRTaXplIH07XG5cdFx0Ly8gVE9ETzogcmVhc3Nlc3MgbGluZS1oZWlnaHQgZm9yIG5vbi1sZWdhY3kgdjJcblx0XHRsaW5lLWhlaWdodDogMjhweDtcblx0XHRwYWRkaW5nLWJsb2NrOiAkeyBzcGFjZSggMiApIH07XG5cdFx0c2Nyb2xsLW1hcmdpbjogJHsgc3BhY2UoIDEgKSB9O1xuXHRcdHVzZXItc2VsZWN0OiBub25lO1xuXG5cdFx0JlthcmlhLWRpc2FibGVkPSd0cnVlJ10ge1xuXHRcdFx0Y3Vyc29yOiBub3QtYWxsb3dlZDtcblx0XHR9XG5cblx0XHQmW2RhdGEtYWN0aXZlLWl0ZW1dIHtcblx0XHRcdGJhY2tncm91bmQtY29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXSB9O1xuXHRcdH1cblxuXHRcdCR7IGdldFNlbGVjdEl0ZW1TaXplKCBzaXplICkgfVxuXHRgXG4pO1xuXG5jb25zdCB0cnVuY2F0ZVN0eWxlcyA9IGNzc2Bcblx0b3ZlcmZsb3c6IGhpZGRlbjtcblx0dGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5cdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ZWRFeHBlcmltZW50YWxIaW50V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdCR7IHRydW5jYXRlU3R5bGVzIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTZWxlY3RlZEV4cGVyaW1lbnRhbEhpbnRJdGVtID0gc3R5bGVkLnNwYW5gXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZ3JheVsgNjAwIF0gfTtcblx0bWFyZ2luLWlubGluZS1zdGFydDogJHsgc3BhY2UoIDIgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFdpdGhIaW50SXRlbVdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGZsZXgtd3JhcDogd3JhcDtcblx0ZmxleDogMTtcblx0Y29sdW1uLWdhcDogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFdpdGhIaW50SXRlbUhpbnQgPSBzdHlsZWQuc3BhbmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyA2MDAgXSB9O1xuXHR0ZXh0LWFsaWduOiBpbml0aWFsO1xuXHRsaW5lLWhlaWdodDogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9O1xuXHRwYWRkaW5nLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAxICkgfTtcblx0bWFyZ2luLWJsb2NrOiAkeyBzcGFjZSggMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgU2VsZWN0ZWRJdGVtQ2hlY2sgPSBzdHlsZWQoIEFyaWFraXQuU2VsZWN0SXRlbUNoZWNrIClgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdG1hcmdpbi1pbmxpbmUtc3RhcnQ6ICR7IHNwYWNlKCAyICkgfTtcblx0ZmlsbDogY3VycmVudENvbG9yO1xuXG5cdC8vIEtlZXAgdGhlIGNoZWNrbWFyayB2ZXJ0aWNhbGx5IGFsaWduZWQgYXQgdGhlIHRvcC4gU2luY2UgdGhlIGl0ZW0gdGV4dCBoYXMgYVxuXHQvLyAyOHB4IGxpbmUgaGVpZ2h0IGFuZCB0aGUgY2hlY2ttYXJrIGlzIDI0cHggdGFsbCwgYSAoMjgtMjQpLzIgPSAycHggbWFyZ2luXG5cdC8vIGlzIGFwcGxpZWQgdG8ga2VlcCB0aGUgY29ycmVjdCBhbGlnbm1lbnQgYmV0d2VlbiB0aGUgdGV4dCBhbmQgdGhlIGNoZWNrbWFyay5cblx0YWxpZ24tc2VsZjogc3RhcnQ7XG5cdG1hcmdpbi1ibG9jay1zdGFydDogMnB4O1xuXG5cdC8vIFNpbmNlIHRoZSBjaGVja21hcmsncyBkaW1lbnNpb25zIGFyZSBhcHBsaWVkIHdpdGggJ2VtJyB1bml0cywgc2V0dGluZyBhXG5cdC8vIGZvbnQgc2l6ZSBvZiAwIGFsbG93cyB0aGUgc3BhY2UgcmVzZXJ2ZWQgZm9yIHRoZSBjaGVja21hcmsgdG8gY29sbGFwc2UgZm9yXG5cdC8vIGl0ZW1zIHRoYXQgYXJlIG5vdCBzZWxlY3RlZCBvciB0aGF0IGRvbid0IGhhdmUgYW4gYXNzb2NpYXRlZCBpdGVtIGhpbnQuXG5cdGZvbnQtc2l6ZTogMDtcblx0JHsgV2l0aEhpbnRJdGVtV3JhcHBlciB9IH4gJixcblx0Jjpub3QoOmVtcHR5KSB7XG5cdFx0Zm9udC1zaXplOiAyNHB4OyAvLyBTaXplIG9mIGNoZWNrbWFyayBpY29uXG5cdH1cbmA7XG4iXX0= */"));

  // packages/components/build-module/custom-select-control-v2/custom-select.mjs
  var import_jsx_runtime190 = __toESM(require_jsx_runtime(), 1);
  var CustomSelectContext = (0, import_element125.createContext)(void 0);
  CustomSelectContext.displayName = "CustomSelectContext";
  function defaultRenderSelectedValue(value) {
    const isValueEmpty2 = Array.isArray(value) ? value.length === 0 : value === void 0 || value === null;
    if (isValueEmpty2) {
      return (0, import_i18n40.__)("Select an item");
    }
    if (Array.isArray(value)) {
      return value.length === 1 ? value[0] : (0, import_i18n40.sprintf)(
        // translators: %d: number of items selected (it will always be 2 or more items)
        (0, import_i18n40._n)("%d item selected", "%d items selected", value.length),
        value.length
      );
    }
    return value;
  }
  var CustomSelectButton = ({
    renderSelectedValue,
    size: size3 = "default",
    store,
    ...restProps
  }) => {
    const {
      value: currentValue
    } = useStoreState(store);
    const computedRenderSelectedValue = (0, import_element125.useMemo)(() => renderSelectedValue ?? defaultRenderSelectedValue, [renderSelectedValue]);
    return /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(Select22, {
      ...restProps,
      size: size3,
      hasCustomRenderProp: !!renderSelectedValue,
      store,
      children: computedRenderSelectedValue(currentValue)
    });
  };
  function _CustomSelect(props) {
    const {
      children,
      hideLabelFromVision = false,
      label,
      size: size3,
      store,
      className: className2,
      isLegacy = false,
      ...restProps
    } = props;
    const onSelectPopoverKeyDown = (0, import_element125.useCallback)((e3) => {
      if (isLegacy) {
        e3.stopPropagation();
      }
    }, [isLegacy]);
    const contextValue = (0, import_element125.useMemo)(() => ({
      store,
      size: size3
    }), [store, size3]);
    return (
      // Where should `restProps` be forwarded to?
      /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)("div", {
        className: className2,
        children: [/* @__PURE__ */ (0, import_jsx_runtime190.jsx)(SelectLabel, {
          store,
          render: hideLabelFromVision ? (
            // @ts-expect-error `children` are passed via the render prop
            /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(component_default2, {})
          ) : (
            // @ts-expect-error `children` are passed via the render prop
            /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(base_control_default.VisualLabel, {
              as: "div"
            })
          ),
          children: label
        }), /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(input_base_default, {
          __next40pxDefaultSize: true,
          size: size3,
          suffix: /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(chevron_down_default2, {}),
          children: [/* @__PURE__ */ (0, import_jsx_runtime190.jsx)(CustomSelectButton, {
            ...restProps,
            size: size3,
            store,
            showOnKeyDown: !isLegacy
          }), /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(SelectPopover22, {
            gutter: 12,
            store,
            sameWidth: true,
            slide: false,
            onKeyDown: onSelectPopoverKeyDown,
            flip: !isLegacy,
            children: /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(CustomSelectContext.Provider, {
              value: contextValue,
              children
            })
          })]
        })]
      })
    );
  }
  var custom_select_default = _CustomSelect;

  // packages/components/build-module/custom-select-control-v2/item.mjs
  var import_element126 = __toESM(require_element(), 1);
  var import_jsx_runtime191 = __toESM(require_jsx_runtime(), 1);
  function CustomSelectItem({
    children,
    ...props
  }) {
    const customSelectContext = (0, import_element126.useContext)(CustomSelectContext);
    return /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(SelectItem22, {
      store: customSelectContext?.store,
      size: customSelectContext?.size ?? "default",
      ...props,
      children: [children ?? props.value, /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(SelectedItemCheck, {
        children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(icon_default2, {
          icon: check_default
        })
      })]
    });
  }
  CustomSelectItem.displayName = "CustomSelectControlV2.Item";
  var item_default = CustomSelectItem;

  // packages/components/build-module/custom-select-control/index.mjs
  var import_jsx_runtime192 = __toESM(require_jsx_runtime(), 1);
  function useDeprecatedProps5({
    __experimentalShowSelectedHint,
    ...otherProps
  }) {
    return {
      showSelectedHint: __experimentalShowSelectedHint,
      ...otherProps
    };
  }
  function applyOptionDeprecations({
    __experimentalHint,
    ...rest
  }) {
    return {
      hint: __experimentalHint,
      ...rest
    };
  }
  function getDescribedBy(currentName, describedBy) {
    if (describedBy) {
      return describedBy;
    }
    return (0, import_i18n41.sprintf)((0, import_i18n41.__)("Currently selected: %s"), currentName);
  }
  function CustomSelectControl(props) {
    const {
      __next40pxDefaultSize = false,
      __shouldNotWarnDeprecated36pxSize,
      describedBy,
      options: options2,
      onChange,
      size: size3 = "default",
      value,
      className: classNameProp,
      showSelectedHint = false,
      ...restProps
    } = useDeprecatedProps5(props);
    maybeWarnDeprecated36pxSize({
      componentName: "CustomSelectControl",
      __next40pxDefaultSize,
      size: size3,
      __shouldNotWarnDeprecated36pxSize
    });
    const descriptionId = (0, import_compose50.useInstanceId)(CustomSelectControl, "custom-select-control__description");
    const store = useSelectStore({
      async setValue(nextValue) {
        const nextOption = options2.find((item2) => item2.key === nextValue);
        if (!onChange || !nextOption) {
          return;
        }
        await Promise.resolve();
        const state = store.getState();
        const changeObject = {
          highlightedIndex: state.renderedItems.findIndex((item2) => item2.value === nextValue),
          inputValue: "",
          isOpen: state.open,
          selectedItem: nextOption,
          type: ""
        };
        onChange(changeObject);
      },
      value: value?.key,
      // Setting the first option as a default value when no value is provided
      // is already done natively by the underlying Ariakit component,
      // but doing this explicitly avoids the `onChange` callback from firing
      // on initial render, thus making this implementation closer to the v1.
      defaultValue: options2[0]?.key
    });
    const children = options2.map(applyOptionDeprecations).map(({
      name,
      key,
      hint,
      style: style2,
      className: className2
    }) => {
      const withHint = /* @__PURE__ */ (0, import_jsx_runtime192.jsxs)(WithHintItemWrapper, {
        children: [/* @__PURE__ */ (0, import_jsx_runtime192.jsx)("span", {
          children: name
        }), /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(WithHintItemHint, {
          // Keeping the classname for legacy reasons
          className: "components-custom-select-control__item-hint",
          children: hint
        })]
      });
      return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(item_default, {
        value: key,
        children: hint ? withHint : name,
        style: style2,
        className: clsx_default(
          className2,
          // Keeping the classnames for legacy reasons
          "components-custom-select-control__item",
          {
            "has-hint": hint
          }
        )
      }, key);
    });
    const currentValue = useStoreState(store, "value");
    const selectedOption = options2?.map(applyOptionDeprecations)?.find(({
      key
    }) => currentValue === key) ?? options2[0];
    const renderSelectedValue = () => {
      if (!showSelectedHint || !selectedOption.hint) {
        return selectedOption?.name;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime192.jsxs)(SelectedExperimentalHintWrapper, {
        children: [selectedOption?.name, /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(SelectedExperimentalHintItem, {
          // Keeping the classname for legacy reasons
          className: "components-custom-select-control__hint",
          children: selectedOption?.hint
        })]
      });
    };
    const translatedSize = (() => {
      if (__next40pxDefaultSize && size3 === "default" || size3 === "__unstable-large") {
        return "default";
      }
      if (!__next40pxDefaultSize && size3 === "default") {
        return "compact";
      }
      return size3;
    })();
    return /* @__PURE__ */ (0, import_jsx_runtime192.jsxs)(import_jsx_runtime192.Fragment, {
      children: [/* @__PURE__ */ (0, import_jsx_runtime192.jsx)(custom_select_default, {
        "aria-describedby": descriptionId,
        renderSelectedValue,
        size: translatedSize,
        store,
        className: clsx_default(
          // Keeping the classname for legacy reasons
          "components-custom-select-control",
          classNameProp
        ),
        isLegacy: true,
        ...restProps,
        children
      }), /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(component_default2, {
        children: /* @__PURE__ */ (0, import_jsx_runtime192.jsx)("span", {
          id: descriptionId,
          children: getDescribedBy(selectedOption?.name, describedBy)
        })
      })]
    });
  }
  var custom_select_control_default = CustomSelectControl;

  // node_modules/date-fns/toDate.mjs
  function toDate(argument) {
    const argStr = Object.prototype.toString.call(argument);
    if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") {
      return new argument.constructor(+argument);
    } else if (typeof argument === "number" || argStr === "[object Number]" || typeof argument === "string" || argStr === "[object String]") {
      return new Date(argument);
    } else {
      return /* @__PURE__ */ new Date(NaN);
    }
  }

  // node_modules/date-fns/constructFrom.mjs
  function constructFrom(date, value) {
    if (date instanceof Date) {
      return new date.constructor(value);
    } else {
      return new Date(value);
    }
  }

  // node_modules/date-fns/addDays.mjs
  function addDays(date, amount) {
    const _date = toDate(date);
    if (isNaN(amount)) return constructFrom(date, NaN);
    if (!amount) {
      return _date;
    }
    _date.setDate(_date.getDate() + amount);
    return _date;
  }

  // node_modules/date-fns/addMonths.mjs
  function addMonths(date, amount) {
    const _date = toDate(date);
    if (isNaN(amount)) return constructFrom(date, NaN);
    if (!amount) {
      return _date;
    }
    const dayOfMonth = _date.getDate();
    const endOfDesiredMonth = constructFrom(date, _date.getTime());
    endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);
    const daysInMonth = endOfDesiredMonth.getDate();
    if (dayOfMonth >= daysInMonth) {
      return endOfDesiredMonth;
    } else {
      _date.setFullYear(
        endOfDesiredMonth.getFullYear(),
        endOfDesiredMonth.getMonth(),
        dayOfMonth
      );
      return _date;
    }
  }

  // node_modules/date-fns/constants.mjs
  var daysInYear = 365.2425;
  var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1e3;
  var minTime = -maxTime;
  var millisecondsInDay = 864e5;
  var secondsInHour = 3600;
  var secondsInDay = secondsInHour * 24;
  var secondsInWeek = secondsInDay * 7;
  var secondsInYear = secondsInDay * daysInYear;
  var secondsInMonth = secondsInYear / 12;
  var secondsInQuarter = secondsInMonth * 3;

  // node_modules/date-fns/_lib/defaultOptions.mjs
  var defaultOptions2 = {};
  function getDefaultOptions() {
    return defaultOptions2;
  }

  // node_modules/date-fns/startOfWeek.mjs
  function startOfWeek(date, options2) {
    const defaultOptions4 = getDefaultOptions();
    const weekStartsOn = options2?.weekStartsOn ?? options2?.locale?.options?.weekStartsOn ?? defaultOptions4.weekStartsOn ?? defaultOptions4.locale?.options?.weekStartsOn ?? 0;
    const _date = toDate(date);
    const day = _date.getDay();
    const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
    _date.setDate(_date.getDate() - diff);
    _date.setHours(0, 0, 0, 0);
    return _date;
  }

  // node_modules/date-fns/startOfDay.mjs
  function startOfDay(date) {
    const _date = toDate(date);
    _date.setHours(0, 0, 0, 0);
    return _date;
  }

  // node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.mjs
  function getTimezoneOffsetInMilliseconds(date) {
    const _date = toDate(date);
    const utcDate = new Date(
      Date.UTC(
        _date.getFullYear(),
        _date.getMonth(),
        _date.getDate(),
        _date.getHours(),
        _date.getMinutes(),
        _date.getSeconds(),
        _date.getMilliseconds()
      )
    );
    utcDate.setUTCFullYear(_date.getFullYear());
    return +date - +utcDate;
  }

  // node_modules/date-fns/differenceInCalendarDays.mjs
  function differenceInCalendarDays(dateLeft, dateRight) {
    const startOfDayLeft = startOfDay(dateLeft);
    const startOfDayRight = startOfDay(dateRight);
    const timestampLeft = +startOfDayLeft - getTimezoneOffsetInMilliseconds(startOfDayLeft);
    const timestampRight = +startOfDayRight - getTimezoneOffsetInMilliseconds(startOfDayRight);
    return Math.round((timestampLeft - timestampRight) / millisecondsInDay);
  }

  // node_modules/date-fns/addWeeks.mjs
  function addWeeks(date, amount) {
    const days = amount * 7;
    return addDays(date, days);
  }

  // node_modules/date-fns/addYears.mjs
  function addYears(date, amount) {
    return addMonths(date, amount * 12);
  }

  // node_modules/date-fns/isSameDay.mjs
  function isSameDay(dateLeft, dateRight) {
    const dateLeftStartOfDay = startOfDay(dateLeft);
    const dateRightStartOfDay = startOfDay(dateRight);
    return +dateLeftStartOfDay === +dateRightStartOfDay;
  }

  // node_modules/date-fns/endOfMonth.mjs
  function endOfMonth(date) {
    const _date = toDate(date);
    const month = _date.getMonth();
    _date.setFullYear(_date.getFullYear(), month + 1, 0);
    _date.setHours(23, 59, 59, 999);
    return _date;
  }

  // node_modules/date-fns/eachDayOfInterval.mjs
  function eachDayOfInterval(interval, options2) {
    const startDate = toDate(interval.start);
    const endDate = toDate(interval.end);
    let reversed = +startDate > +endDate;
    const endTime = reversed ? +startDate : +endDate;
    const currentDate = reversed ? endDate : startDate;
    currentDate.setHours(0, 0, 0, 0);
    let step = options2?.step ?? 1;
    if (!step) return [];
    if (step < 0) {
      step = -step;
      reversed = !reversed;
    }
    const dates = [];
    while (+currentDate <= endTime) {
      dates.push(toDate(currentDate));
      currentDate.setDate(currentDate.getDate() + step);
      currentDate.setHours(0, 0, 0, 0);
    }
    return reversed ? dates.reverse() : dates;
  }

  // node_modules/date-fns/startOfMinute.mjs
  function startOfMinute(date) {
    const _date = toDate(date);
    _date.setSeconds(0, 0);
    return _date;
  }

  // node_modules/date-fns/eachMonthOfInterval.mjs
  function eachMonthOfInterval(interval, options2) {
    const startDate = toDate(interval.start);
    const endDate = toDate(interval.end);
    let reversed = +startDate > +endDate;
    const endTime = reversed ? +startDate : +endDate;
    const currentDate = reversed ? endDate : startDate;
    currentDate.setHours(0, 0, 0, 0);
    currentDate.setDate(1);
    let step = options2?.step ?? 1;
    if (!step) return [];
    if (step < 0) {
      step = -step;
      reversed = !reversed;
    }
    const dates = [];
    while (+currentDate <= endTime) {
      dates.push(toDate(currentDate));
      currentDate.setMonth(currentDate.getMonth() + step);
    }
    return reversed ? dates.reverse() : dates;
  }

  // node_modules/date-fns/eachWeekOfInterval.mjs
  function eachWeekOfInterval(interval, options2) {
    const startDate = toDate(interval.start);
    const endDate = toDate(interval.end);
    let reversed = +startDate > +endDate;
    const startDateWeek = reversed ? startOfWeek(endDate, options2) : startOfWeek(startDate, options2);
    const endDateWeek = reversed ? startOfWeek(startDate, options2) : startOfWeek(endDate, options2);
    startDateWeek.setHours(15);
    endDateWeek.setHours(15);
    const endTime = +endDateWeek.getTime();
    let currentDate = startDateWeek;
    let step = options2?.step ?? 1;
    if (!step) return [];
    if (step < 0) {
      step = -step;
      reversed = !reversed;
    }
    const dates = [];
    while (+currentDate <= endTime) {
      currentDate.setHours(0);
      dates.push(toDate(currentDate));
      currentDate = addWeeks(currentDate, step);
      currentDate.setHours(15);
    }
    return reversed ? dates.reverse() : dates;
  }

  // node_modules/date-fns/startOfMonth.mjs
  function startOfMonth(date) {
    const _date = toDate(date);
    _date.setDate(1);
    _date.setHours(0, 0, 0, 0);
    return _date;
  }

  // node_modules/date-fns/endOfWeek.mjs
  function endOfWeek(date, options2) {
    const defaultOptions4 = getDefaultOptions();
    const weekStartsOn = options2?.weekStartsOn ?? options2?.locale?.options?.weekStartsOn ?? defaultOptions4.weekStartsOn ?? defaultOptions4.locale?.options?.weekStartsOn ?? 0;
    const _date = toDate(date);
    const day = _date.getDay();
    const diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);
    _date.setDate(_date.getDate() + diff);
    _date.setHours(23, 59, 59, 999);
    return _date;
  }

  // node_modules/date-fns/getDaysInMonth.mjs
  function getDaysInMonth(date) {
    const _date = toDate(date);
    const year = _date.getFullYear();
    const monthIndex = _date.getMonth();
    const lastDayOfMonth = constructFrom(date, 0);
    lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);
    lastDayOfMonth.setHours(0, 0, 0, 0);
    return lastDayOfMonth.getDate();
  }

  // node_modules/date-fns/isAfter.mjs
  function isAfter(date, dateToCompare) {
    const _date = toDate(date);
    const _dateToCompare = toDate(dateToCompare);
    return _date.getTime() > _dateToCompare.getTime();
  }

  // node_modules/date-fns/isBefore.mjs
  function isBefore(date, dateToCompare) {
    const _date = toDate(date);
    const _dateToCompare = toDate(dateToCompare);
    return +_date < +_dateToCompare;
  }

  // node_modules/date-fns/isEqual.mjs
  function isEqual(leftDate, rightDate) {
    const _dateLeft = toDate(leftDate);
    const _dateRight = toDate(rightDate);
    return +_dateLeft === +_dateRight;
  }

  // node_modules/date-fns/isSameMonth.mjs
  function isSameMonth(dateLeft, dateRight) {
    const _dateLeft = toDate(dateLeft);
    const _dateRight = toDate(dateRight);
    return _dateLeft.getFullYear() === _dateRight.getFullYear() && _dateLeft.getMonth() === _dateRight.getMonth();
  }

  // node_modules/date-fns/subDays.mjs
  function subDays(date, amount) {
    return addDays(date, -amount);
  }

  // node_modules/date-fns/setMonth.mjs
  function setMonth(date, month) {
    const _date = toDate(date);
    const year = _date.getFullYear();
    const day = _date.getDate();
    const dateWithDesiredMonth = constructFrom(date, 0);
    dateWithDesiredMonth.setFullYear(year, month, 15);
    dateWithDesiredMonth.setHours(0, 0, 0, 0);
    const daysInMonth = getDaysInMonth(dateWithDesiredMonth);
    _date.setMonth(month, Math.min(day, daysInMonth));
    return _date;
  }

  // node_modules/date-fns/set.mjs
  function set(date, values) {
    let _date = toDate(date);
    if (isNaN(+_date)) {
      return constructFrom(date, NaN);
    }
    if (values.year != null) {
      _date.setFullYear(values.year);
    }
    if (values.month != null) {
      _date = setMonth(_date, values.month);
    }
    if (values.date != null) {
      _date.setDate(values.date);
    }
    if (values.hours != null) {
      _date.setHours(values.hours);
    }
    if (values.minutes != null) {
      _date.setMinutes(values.minutes);
    }
    if (values.seconds != null) {
      _date.setSeconds(values.seconds);
    }
    if (values.milliseconds != null) {
      _date.setMilliseconds(values.milliseconds);
    }
    return _date;
  }

  // node_modules/date-fns/setYear.mjs
  function setYear(date, year) {
    const _date = toDate(date);
    if (isNaN(+_date)) {
      return constructFrom(date, NaN);
    }
    _date.setFullYear(year);
    return _date;
  }

  // node_modules/date-fns/startOfToday.mjs
  function startOfToday() {
    return startOfDay(Date.now());
  }

  // node_modules/date-fns/subMonths.mjs
  function subMonths(date, amount) {
    return addMonths(date, -amount);
  }

  // node_modules/date-fns/subWeeks.mjs
  function subWeeks(date, amount) {
    return addWeeks(date, -amount);
  }

  // node_modules/date-fns/subYears.mjs
  function subYears(date, amount) {
    return addYears(date, -amount);
  }

  // packages/components/build-module/date-time/date/index.mjs
  var import_i18n42 = __toESM(require_i18n(), 1);
  var import_date3 = __toESM(require_date(), 1);
  var import_element128 = __toESM(require_element(), 1);

  // packages/components/build-module/date-time/date/use-lilius/index.mjs
  var import_element127 = __toESM(require_element(), 1);
  var Day = /* @__PURE__ */ (function(Day22) {
    Day22[Day22["SUNDAY"] = 0] = "SUNDAY";
    Day22[Day22["MONDAY"] = 1] = "MONDAY";
    Day22[Day22["TUESDAY"] = 2] = "TUESDAY";
    Day22[Day22["WEDNESDAY"] = 3] = "WEDNESDAY";
    Day22[Day22["THURSDAY"] = 4] = "THURSDAY";
    Day22[Day22["FRIDAY"] = 5] = "FRIDAY";
    Day22[Day22["SATURDAY"] = 6] = "SATURDAY";
    return Day22;
  })({});
  var inRange = (date, min3, max3) => (isEqual(date, min3) || isAfter(date, min3)) && (isEqual(date, max3) || isBefore(date, max3));
  var clearTime2 = (date) => set(date, {
    hours: 0,
    minutes: 0,
    seconds: 0,
    milliseconds: 0
  });
  var useLilius = ({
    weekStartsOn = Day.SUNDAY,
    viewing: initialViewing = /* @__PURE__ */ new Date(),
    selected: initialSelected = [],
    numberOfMonths = 1
  } = {}) => {
    const [viewing, setViewing] = (0, import_element127.useState)(initialViewing);
    const viewToday = (0, import_element127.useCallback)(() => setViewing(startOfToday()), [setViewing]);
    const viewMonth = (0, import_element127.useCallback)((month) => setViewing((v3) => setMonth(v3, month)), []);
    const viewPreviousMonth = (0, import_element127.useCallback)(() => setViewing((v3) => subMonths(v3, 1)), []);
    const viewNextMonth = (0, import_element127.useCallback)(() => setViewing((v3) => addMonths(v3, 1)), []);
    const viewYear = (0, import_element127.useCallback)((year) => setViewing((v3) => setYear(v3, year)), []);
    const viewPreviousYear = (0, import_element127.useCallback)(() => setViewing((v3) => subYears(v3, 1)), []);
    const viewNextYear = (0, import_element127.useCallback)(() => setViewing((v3) => addYears(v3, 1)), []);
    const [selected, setSelected] = (0, import_element127.useState)(initialSelected.map(clearTime2));
    const clearSelected = () => setSelected([]);
    const isSelected2 = (0, import_element127.useCallback)((date) => selected.findIndex((s3) => isEqual(s3, date)) > -1, [selected]);
    const select = (0, import_element127.useCallback)((date, replaceExisting) => {
      if (replaceExisting) {
        setSelected(Array.isArray(date) ? date : [date]);
      } else {
        setSelected((selectedItems) => selectedItems.concat(Array.isArray(date) ? date : [date]));
      }
    }, []);
    const deselect = (0, import_element127.useCallback)((date) => setSelected((selectedItems) => Array.isArray(date) ? selectedItems.filter((s3) => !date.map((d3) => d3.getTime()).includes(s3.getTime())) : selectedItems.filter((s3) => !isEqual(s3, date))), []);
    const toggle = (0, import_element127.useCallback)((date, replaceExisting) => isSelected2(date) ? deselect(date) : select(date, replaceExisting), [deselect, isSelected2, select]);
    const selectRange = (0, import_element127.useCallback)((start, end, replaceExisting) => {
      if (replaceExisting) {
        setSelected(eachDayOfInterval({
          start,
          end
        }));
      } else {
        setSelected((selectedItems) => selectedItems.concat(eachDayOfInterval({
          start,
          end
        })));
      }
    }, []);
    const deselectRange = (0, import_element127.useCallback)((start, end) => {
      setSelected((selectedItems) => selectedItems.filter((s3) => !eachDayOfInterval({
        start,
        end
      }).map((d3) => d3.getTime()).includes(s3.getTime())));
    }, []);
    const calendar = (0, import_element127.useMemo)(() => eachMonthOfInterval({
      start: startOfMonth(viewing),
      end: endOfMonth(addMonths(viewing, numberOfMonths - 1))
    }).map((month) => eachWeekOfInterval({
      start: startOfMonth(month),
      end: endOfMonth(month)
    }, {
      weekStartsOn
    }).map((week) => eachDayOfInterval({
      start: startOfWeek(week, {
        weekStartsOn
      }),
      end: endOfWeek(week, {
        weekStartsOn
      })
    }))), [viewing, weekStartsOn, numberOfMonths]);
    return {
      clearTime: clearTime2,
      inRange,
      viewing,
      setViewing,
      viewToday,
      viewMonth,
      viewPreviousMonth,
      viewNextMonth,
      viewYear,
      viewPreviousYear,
      viewNextYear,
      selected,
      setSelected,
      clearSelected,
      isSelected: isSelected2,
      select,
      deselect,
      toggle,
      selectRange,
      deselectRange,
      calendar
    };
  };

  // packages/components/build-module/date-time/date/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__28() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var Wrapper3 = /* @__PURE__ */ createStyled("div", false ? {
    target: "e105ri6r7"
  } : {
    target: "e105ri6r7",
    label: "Wrapper"
  })(boxSizingReset, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFjaUMiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgQnV0dG9uIGZyb20gJy4uLy4uL2J1dHRvbic7XG5pbXBvcnQgeyBib3hTaXppbmdSZXNldCwgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBIU3RhY2sgfSBmcm9tICcuLi8uLi9oLXN0YWNrJztcbmltcG9ydCB7IEhlYWRpbmcgfSBmcm9tICcuLi8uLi9oZWFkaW5nJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5leHBvcnQgY29uc3QgV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdCR7IGJveFNpemluZ1Jlc2V0IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBOYXZpZ2F0b3IgPSBzdHlsZWQoIEhTdGFjayApYFxuXHRjb2x1bW4tZ2FwOiAkeyBzcGFjZSggMiApIH07XG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogMC41ZnIgcmVwZWF0KCA1LCAxZnIgKSAwLjVmcjtcblx0anVzdGlmeS1pdGVtczogY2VudGVyO1xuXHRtYXJnaW4tYm90dG9tOiAkeyBzcGFjZSggNCApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgVmlld1ByZXZpb3VzTW9udGhCdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHRncmlkLWNvbHVtbjogMSAvIDI7XG5gO1xuXG5leHBvcnQgY29uc3QgVmlld05leHRNb250aEJ1dHRvbiA9IHN0eWxlZCggQnV0dG9uIClgXG5cdGdyaWQtY29sdW1uOiA3IC8gODtcbmA7XG5cbmV4cG9ydCBjb25zdCBOYXZpZ2F0b3JIZWFkaW5nID0gc3R5bGVkKCBIZWFkaW5nIClgXG5cdGZvbnQtc2l6ZTogJHsgQ09ORklHLmZvbnRTaXplIH07XG5cdGZvbnQtd2VpZ2h0OiAkeyBDT05GSUcuZm9udFdlaWdodCB9O1xuXHRncmlkLWNvbHVtbjogMiAvIDc7XG5cblx0c3Ryb25nIHtcblx0XHRmb250LXdlaWdodDogJHsgQ09ORklHLmZvbnRXZWlnaHRIZWFkaW5nIH07XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBDYWxlbmRhciA9IHN0eWxlZC5kaXZgXG5cdGNvbHVtbi1nYXA6ICR7IHNwYWNlKCAyICkgfTtcblx0ZGlzcGxheTogZ3JpZDtcblx0Z3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiAwLjVmciByZXBlYXQoIDUsIDFmciApIDAuNWZyO1xuXHRqdXN0aWZ5LWl0ZW1zOiBjZW50ZXI7XG5cdHJvdy1nYXA6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBEYXlPZldlZWsgPSBzdHlsZWQuZGl2YFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmdyYXlbIDcwMCBdIH07XG5cdGZvbnQtc2l6ZTogJHsgQ09ORklHLmZvbnRTaXplIH07XG5cdGxpbmUtaGVpZ2h0OiAkeyBDT05GSUcuZm9udExpbmVIZWlnaHRCYXNlIH07XG5gO1xuXG5leHBvcnQgY29uc3QgRGF5QnV0dG9uID0gc3R5bGVkKCBCdXR0b24sIHtcblx0c2hvdWxkRm9yd2FyZFByb3A6ICggcHJvcDogc3RyaW5nICkgPT5cblx0XHQhIFsgJ2NvbHVtbicsICdpc1NlbGVjdGVkJywgJ2lzVG9kYXknLCAnaGFzRXZlbnRzJyBdLmluY2x1ZGVzKCBwcm9wICksXG59ICk8IHtcblx0Y29sdW1uOiBudW1iZXI7XG5cdGlzU2VsZWN0ZWQ6IGJvb2xlYW47XG5cdGlzVG9kYXk6IGJvb2xlYW47XG5cdGhhc0V2ZW50czogYm9vbGVhbjtcbn0gPmBcblx0Z3JpZC1jb2x1bW46ICR7ICggcHJvcHMgKSA9PiBwcm9wcy5jb2x1bW4gfTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblxuXHQkeyAoIHByb3BzICkgPT5cblx0XHRwcm9wcy5kaXNhYmxlZCAmJlxuXHRcdGBcblx0XHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0XHRgIH1cblxuXHQmJiYge1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRcdGhlaWdodDogJHsgc3BhY2UoIDcgKSB9O1xuXHRcdHdpZHRoOiAkeyBzcGFjZSggNyApIH07XG5cdFx0Zm9udC13ZWlnaHQ6IDQwMDtcblxuXHRcdCR7ICggcHJvcHMgKSA9PlxuXHRcdFx0cHJvcHMuaXNTZWxlY3RlZCAmJlxuXHRcdFx0YFxuXHRcdFx0XHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cblx0XHRcdFx0Jixcblx0XHRcdFx0Jjpob3Zlcjpub3QoOmRpc2FibGVkLCBbYXJpYS1kaXNhYmxlZD10cnVlXSkge1xuXHRcdFx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblx0XHRcdFx0fVxuXG5cdFx0XHRcdCY6Zm9jdXM6bm90KDpkaXNhYmxlZCksXG5cdFx0XHRcdCY6Zm9jdXM6bm90KDpkaXNhYmxlZCkge1xuXHRcdFx0XHRcdGJvcmRlcjogJHsgQ09ORklHLmJvcmRlcldpZHRoRm9jdXMgfSBzb2xpZCBjdXJyZW50Q29sb3I7XG5cdFx0XHRcdH1cblxuXHRcdFx0XHQvKiBIaWdobGlnaHQgdGhlIHNlbGVjdGVkIGRheSBmb3IgaGlnaC1jb250cmFzdCBtb2RlICovXG5cdFx0XHRcdCY6OmFmdGVyIHtcblx0XHRcdFx0XHRjb250ZW50OiAnJztcblx0XHRcdFx0XHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdFx0XHRcdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdFx0XHRcdFx0aW5zZXQ6IDA7XG5cdFx0XHRcdFx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0XHRcdFx0XHRib3JkZXI6IDFweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRcdFx0fVxuXHRcdFx0YCB9XG5cblx0XHQkeyAoIHByb3BzICkgPT5cblx0XHRcdCEgcHJvcHMuaXNTZWxlY3RlZCAmJlxuXHRcdFx0cHJvcHMuaXNUb2RheSAmJlxuXHRcdFx0YFxuXHRcdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLnRoZW1lLmdyYXlbIDIwMCBdIH07XG5cdFx0XHRgIH1cblx0fVxuXG5cdCR7ICggcHJvcHMgKSA9PlxuXHRcdHByb3BzLmhhc0V2ZW50cyAmJlxuXHRcdGBcblx0XHQ6OmJlZm9yZSB7XG5cdFx0XHRib3JkZXI6IDJweCBzb2xpZCAke1xuXHRcdFx0XHRwcm9wcy5pc1NlbGVjdGVkXG5cdFx0XHRcdFx0PyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWRcblx0XHRcdFx0XHQ6IENPTE9SUy50aGVtZS5hY2NlbnRcblx0XHRcdH07XG5cdFx0XHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzUm91bmQgfTtcblx0XHRcdGNvbnRlbnQ6IFwiIFwiO1xuXHRcdFx0bGVmdDogNTAlO1xuXHRcdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGUoLTUwJSwgOXB4KTtcblx0XHR9XG5cdFx0YCB9XG5gO1xuIl19 */"));
  var Navigator = /* @__PURE__ */ createStyled(component_default9, false ? {
    target: "e105ri6r6"
  } : {
    target: "e105ri6r6",
    label: "Navigator"
  })("column-gap:", space(2), ";display:grid;grid-template-columns:0.5fr repeat( 5, 1fr ) 0.5fr;justify-items:center;margin-bottom:", space(4), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrQnlDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IEJ1dHRvbiBmcm9tICcuLi8uLi9idXR0b24nO1xuaW1wb3J0IHsgYm94U2l6aW5nUmVzZXQsIENPTE9SUywgQ09ORklHIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHsgSFN0YWNrIH0gZnJvbSAnLi4vLi4vaC1zdGFjayc7XG5pbXBvcnQgeyBIZWFkaW5nIH0gZnJvbSAnLi4vLi4vaGVhZGluZyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuZXhwb3J0IGNvbnN0IFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQkeyBib3hTaXppbmdSZXNldCB9XG5gO1xuXG5leHBvcnQgY29uc3QgTmF2aWdhdG9yID0gc3R5bGVkKCBIU3RhY2sgKWBcblx0Y29sdW1uLWdhcDogJHsgc3BhY2UoIDIgKSB9O1xuXHRkaXNwbGF5OiBncmlkO1xuXHRncmlkLXRlbXBsYXRlLWNvbHVtbnM6IDAuNWZyIHJlcGVhdCggNSwgMWZyICkgMC41ZnI7XG5cdGp1c3RpZnktaXRlbXM6IGNlbnRlcjtcblx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFZpZXdQcmV2aW91c01vbnRoQnV0dG9uID0gc3R5bGVkKCBCdXR0b24gKWBcblx0Z3JpZC1jb2x1bW46IDEgLyAyO1xuYDtcblxuZXhwb3J0IGNvbnN0IFZpZXdOZXh0TW9udGhCdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHRncmlkLWNvbHVtbjogNyAvIDg7XG5gO1xuXG5leHBvcnQgY29uc3QgTmF2aWdhdG9ySGVhZGluZyA9IHN0eWxlZCggSGVhZGluZyApYFxuXHRmb250LXNpemU6ICR7IENPTkZJRy5mb250U2l6ZSB9O1xuXHRmb250LXdlaWdodDogJHsgQ09ORklHLmZvbnRXZWlnaHQgfTtcblx0Z3JpZC1jb2x1bW46IDIgLyA3O1xuXG5cdHN0cm9uZyB7XG5cdFx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0SGVhZGluZyB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgQ2FsZW5kYXIgPSBzdHlsZWQuZGl2YFxuXHRjb2x1bW4tZ2FwOiAkeyBzcGFjZSggMiApIH07XG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogMC41ZnIgcmVwZWF0KCA1LCAxZnIgKSAwLjVmcjtcblx0anVzdGlmeS1pdGVtczogY2VudGVyO1xuXHRyb3ctZ2FwOiAkeyBzcGFjZSggMiApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgRGF5T2ZXZWVrID0gc3R5bGVkLmRpdmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyA3MDAgXSB9O1xuXHRmb250LXNpemU6ICR7IENPTkZJRy5mb250U2l6ZSB9O1xuXHRsaW5lLWhlaWdodDogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IERheUJ1dHRvbiA9IHN0eWxlZCggQnV0dG9uLCB7XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3A6IHN0cmluZyApID0+XG5cdFx0ISBbICdjb2x1bW4nLCAnaXNTZWxlY3RlZCcsICdpc1RvZGF5JywgJ2hhc0V2ZW50cycgXS5pbmNsdWRlcyggcHJvcCApLFxufSApPCB7XG5cdGNvbHVtbjogbnVtYmVyO1xuXHRpc1NlbGVjdGVkOiBib29sZWFuO1xuXHRpc1RvZGF5OiBib29sZWFuO1xuXHRoYXNFdmVudHM6IGJvb2xlYW47XG59ID5gXG5cdGdyaWQtY29sdW1uOiAkeyAoIHByb3BzICkgPT4gcHJvcHMuY29sdW1uIH07XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cblx0JHsgKCBwcm9wcyApID0+XG5cdFx0cHJvcHMuZGlzYWJsZWQgJiZcblx0XHRgXG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdFx0YCB9XG5cblx0JiYmIHtcblx0XHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzUm91bmQgfTtcblx0XHRoZWlnaHQ6ICR7IHNwYWNlKCA3ICkgfTtcblx0XHR3aWR0aDogJHsgc3BhY2UoIDcgKSB9O1xuXHRcdGZvbnQtd2VpZ2h0OiA0MDA7XG5cblx0XHQkeyAoIHByb3BzICkgPT5cblx0XHRcdHByb3BzLmlzU2VsZWN0ZWQgJiZcblx0XHRcdGBcblx0XHRcdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXG5cdFx0XHRcdCYsXG5cdFx0XHRcdCY6aG92ZXI6bm90KDpkaXNhYmxlZCwgW2FyaWEtZGlzYWJsZWQ9dHJ1ZV0pIHtcblx0XHRcdFx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudEludmVydGVkIH07XG5cdFx0XHRcdH1cblxuXHRcdFx0XHQmOmZvY3VzOm5vdCg6ZGlzYWJsZWQpLFxuXHRcdFx0XHQmOmZvY3VzOm5vdCg6ZGlzYWJsZWQpIHtcblx0XHRcdFx0XHRib3JkZXI6ICR7IENPTkZJRy5ib3JkZXJXaWR0aEZvY3VzIH0gc29saWQgY3VycmVudENvbG9yO1xuXHRcdFx0XHR9XG5cblx0XHRcdFx0LyogSGlnaGxpZ2h0IHRoZSBzZWxlY3RlZCBkYXkgZm9yIGhpZ2gtY29udHJhc3QgbW9kZSAqL1xuXHRcdFx0XHQmOjphZnRlciB7XG5cdFx0XHRcdFx0Y29udGVudDogJyc7XG5cdFx0XHRcdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdFx0XHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdFx0XHRcdGluc2V0OiAwO1xuXHRcdFx0XHRcdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdFx0XHRcdFx0Ym9yZGVyOiAxcHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0XHRcdH1cblx0XHRcdGAgfVxuXG5cdFx0JHsgKCBwcm9wcyApID0+XG5cdFx0XHQhIHByb3BzLmlzU2VsZWN0ZWQgJiZcblx0XHRcdHByb3BzLmlzVG9kYXkgJiZcblx0XHRcdGBcblx0XHRcdGJhY2tncm91bmQ6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAyMDAgXSB9O1xuXHRcdFx0YCB9XG5cdH1cblxuXHQkeyAoIHByb3BzICkgPT5cblx0XHRwcm9wcy5oYXNFdmVudHMgJiZcblx0XHRgXG5cdFx0OjpiZWZvcmUge1xuXHRcdFx0Ym9yZGVyOiAycHggc29saWQgJHtcblx0XHRcdFx0cHJvcHMuaXNTZWxlY3RlZFxuXHRcdFx0XHRcdD8gQ09MT1JTLnRoZW1lLmFjY2VudEludmVydGVkXG5cdFx0XHRcdFx0OiBDT0xPUlMudGhlbWUuYWNjZW50XG5cdFx0XHR9O1xuXHRcdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdFx0XHRjb250ZW50OiBcIiBcIjtcblx0XHRcdGxlZnQ6IDUwJTtcblx0XHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlKC01MCUsIDlweCk7XG5cdFx0fVxuXHRcdGAgfVxuYDtcbiJdfQ== */"));
  var ViewPreviousMonthButton = /* @__PURE__ */ createStyled(button_default, false ? {
    target: "e105ri6r5"
  } : {
    target: "e105ri6r5",
    label: "ViewPreviousMonthButton"
  })(false ? {
    name: "sarfoe",
    styles: "grid-column:1/2"
  } : {
    name: "sarfoe",
    styles: "grid-column:1/2/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEwQnVEIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IEJ1dHRvbiBmcm9tICcuLi8uLi9idXR0b24nO1xuaW1wb3J0IHsgYm94U2l6aW5nUmVzZXQsIENPTE9SUywgQ09ORklHIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHsgSFN0YWNrIH0gZnJvbSAnLi4vLi4vaC1zdGFjayc7XG5pbXBvcnQgeyBIZWFkaW5nIH0gZnJvbSAnLi4vLi4vaGVhZGluZyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuZXhwb3J0IGNvbnN0IFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQkeyBib3hTaXppbmdSZXNldCB9XG5gO1xuXG5leHBvcnQgY29uc3QgTmF2aWdhdG9yID0gc3R5bGVkKCBIU3RhY2sgKWBcblx0Y29sdW1uLWdhcDogJHsgc3BhY2UoIDIgKSB9O1xuXHRkaXNwbGF5OiBncmlkO1xuXHRncmlkLXRlbXBsYXRlLWNvbHVtbnM6IDAuNWZyIHJlcGVhdCggNSwgMWZyICkgMC41ZnI7XG5cdGp1c3RpZnktaXRlbXM6IGNlbnRlcjtcblx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFZpZXdQcmV2aW91c01vbnRoQnV0dG9uID0gc3R5bGVkKCBCdXR0b24gKWBcblx0Z3JpZC1jb2x1bW46IDEgLyAyO1xuYDtcblxuZXhwb3J0IGNvbnN0IFZpZXdOZXh0TW9udGhCdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHRncmlkLWNvbHVtbjogNyAvIDg7XG5gO1xuXG5leHBvcnQgY29uc3QgTmF2aWdhdG9ySGVhZGluZyA9IHN0eWxlZCggSGVhZGluZyApYFxuXHRmb250LXNpemU6ICR7IENPTkZJRy5mb250U2l6ZSB9O1xuXHRmb250LXdlaWdodDogJHsgQ09ORklHLmZvbnRXZWlnaHQgfTtcblx0Z3JpZC1jb2x1bW46IDIgLyA3O1xuXG5cdHN0cm9uZyB7XG5cdFx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0SGVhZGluZyB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgQ2FsZW5kYXIgPSBzdHlsZWQuZGl2YFxuXHRjb2x1bW4tZ2FwOiAkeyBzcGFjZSggMiApIH07XG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogMC41ZnIgcmVwZWF0KCA1LCAxZnIgKSAwLjVmcjtcblx0anVzdGlmeS1pdGVtczogY2VudGVyO1xuXHRyb3ctZ2FwOiAkeyBzcGFjZSggMiApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgRGF5T2ZXZWVrID0gc3R5bGVkLmRpdmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyA3MDAgXSB9O1xuXHRmb250LXNpemU6ICR7IENPTkZJRy5mb250U2l6ZSB9O1xuXHRsaW5lLWhlaWdodDogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IERheUJ1dHRvbiA9IHN0eWxlZCggQnV0dG9uLCB7XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3A6IHN0cmluZyApID0+XG5cdFx0ISBbICdjb2x1bW4nLCAnaXNTZWxlY3RlZCcsICdpc1RvZGF5JywgJ2hhc0V2ZW50cycgXS5pbmNsdWRlcyggcHJvcCApLFxufSApPCB7XG5cdGNvbHVtbjogbnVtYmVyO1xuXHRpc1NlbGVjdGVkOiBib29sZWFuO1xuXHRpc1RvZGF5OiBib29sZWFuO1xuXHRoYXNFdmVudHM6IGJvb2xlYW47XG59ID5gXG5cdGdyaWQtY29sdW1uOiAkeyAoIHByb3BzICkgPT4gcHJvcHMuY29sdW1uIH07XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cblx0JHsgKCBwcm9wcyApID0+XG5cdFx0cHJvcHMuZGlzYWJsZWQgJiZcblx0XHRgXG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdFx0YCB9XG5cblx0JiYmIHtcblx0XHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzUm91bmQgfTtcblx0XHRoZWlnaHQ6ICR7IHNwYWNlKCA3ICkgfTtcblx0XHR3aWR0aDogJHsgc3BhY2UoIDcgKSB9O1xuXHRcdGZvbnQtd2VpZ2h0OiA0MDA7XG5cblx0XHQkeyAoIHByb3BzICkgPT5cblx0XHRcdHByb3BzLmlzU2VsZWN0ZWQgJiZcblx0XHRcdGBcblx0XHRcdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXG5cdFx0XHRcdCYsXG5cdFx0XHRcdCY6aG92ZXI6bm90KDpkaXNhYmxlZCwgW2FyaWEtZGlzYWJsZWQ9dHJ1ZV0pIHtcblx0XHRcdFx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudEludmVydGVkIH07XG5cdFx0XHRcdH1cblxuXHRcdFx0XHQmOmZvY3VzOm5vdCg6ZGlzYWJsZWQpLFxuXHRcdFx0XHQmOmZvY3VzOm5vdCg6ZGlzYWJsZWQpIHtcblx0XHRcdFx0XHRib3JkZXI6ICR7IENPTkZJRy5ib3JkZXJXaWR0aEZvY3VzIH0gc29saWQgY3VycmVudENvbG9yO1xuXHRcdFx0XHR9XG5cblx0XHRcdFx0LyogSGlnaGxpZ2h0IHRoZSBzZWxlY3RlZCBkYXkgZm9yIGhpZ2gtY29udHJhc3QgbW9kZSAqL1xuXHRcdFx0XHQmOjphZnRlciB7XG5cdFx0XHRcdFx0Y29udGVudDogJyc7XG5cdFx0XHRcdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdFx0XHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdFx0XHRcdGluc2V0OiAwO1xuXHRcdFx0XHRcdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdFx0XHRcdFx0Ym9yZGVyOiAxcHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0XHRcdH1cblx0XHRcdGAgfVxuXG5cdFx0JHsgKCBwcm9wcyApID0+XG5cdFx0XHQhIHByb3BzLmlzU2VsZWN0ZWQgJiZcblx0XHRcdHByb3BzLmlzVG9kYXkgJiZcblx0XHRcdGBcblx0XHRcdGJhY2tncm91bmQ6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAyMDAgXSB9O1xuXHRcdFx0YCB9XG5cdH1cblxuXHQkeyAoIHByb3BzICkgPT5cblx0XHRwcm9wcy5oYXNFdmVudHMgJiZcblx0XHRgXG5cdFx0OjpiZWZvcmUge1xuXHRcdFx0Ym9yZGVyOiAycHggc29saWQgJHtcblx0XHRcdFx0cHJvcHMuaXNTZWxlY3RlZFxuXHRcdFx0XHRcdD8gQ09MT1JTLnRoZW1lLmFjY2VudEludmVydGVkXG5cdFx0XHRcdFx0OiBDT0xPUlMudGhlbWUuYWNjZW50XG5cdFx0XHR9O1xuXHRcdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdFx0XHRjb250ZW50OiBcIiBcIjtcblx0XHRcdGxlZnQ6IDUwJTtcblx0XHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlKC01MCUsIDlweCk7XG5cdFx0fVxuXHRcdGAgfVxuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__28
  });
  var ViewNextMonthButton = /* @__PURE__ */ createStyled(button_default, false ? {
    target: "e105ri6r4"
  } : {
    target: "e105ri6r4",
    label: "ViewNextMonthButton"
  })(false ? {
    name: "1v98r3z",
    styles: "grid-column:7/8"
  } : {
    name: "1v98r3z",
    styles: "grid-column:7/8/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE4Qm1EIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IEJ1dHRvbiBmcm9tICcuLi8uLi9idXR0b24nO1xuaW1wb3J0IHsgYm94U2l6aW5nUmVzZXQsIENPTE9SUywgQ09ORklHIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHsgSFN0YWNrIH0gZnJvbSAnLi4vLi4vaC1zdGFjayc7XG5pbXBvcnQgeyBIZWFkaW5nIH0gZnJvbSAnLi4vLi4vaGVhZGluZyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuZXhwb3J0IGNvbnN0IFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQkeyBib3hTaXppbmdSZXNldCB9XG5gO1xuXG5leHBvcnQgY29uc3QgTmF2aWdhdG9yID0gc3R5bGVkKCBIU3RhY2sgKWBcblx0Y29sdW1uLWdhcDogJHsgc3BhY2UoIDIgKSB9O1xuXHRkaXNwbGF5OiBncmlkO1xuXHRncmlkLXRlbXBsYXRlLWNvbHVtbnM6IDAuNWZyIHJlcGVhdCggNSwgMWZyICkgMC41ZnI7XG5cdGp1c3RpZnktaXRlbXM6IGNlbnRlcjtcblx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFZpZXdQcmV2aW91c01vbnRoQnV0dG9uID0gc3R5bGVkKCBCdXR0b24gKWBcblx0Z3JpZC1jb2x1bW46IDEgLyAyO1xuYDtcblxuZXhwb3J0IGNvbnN0IFZpZXdOZXh0TW9udGhCdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHRncmlkLWNvbHVtbjogNyAvIDg7XG5gO1xuXG5leHBvcnQgY29uc3QgTmF2aWdhdG9ySGVhZGluZyA9IHN0eWxlZCggSGVhZGluZyApYFxuXHRmb250LXNpemU6ICR7IENPTkZJRy5mb250U2l6ZSB9O1xuXHRmb250LXdlaWdodDogJHsgQ09ORklHLmZvbnRXZWlnaHQgfTtcblx0Z3JpZC1jb2x1bW46IDIgLyA3O1xuXG5cdHN0cm9uZyB7XG5cdFx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0SGVhZGluZyB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgQ2FsZW5kYXIgPSBzdHlsZWQuZGl2YFxuXHRjb2x1bW4tZ2FwOiAkeyBzcGFjZSggMiApIH07XG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogMC41ZnIgcmVwZWF0KCA1LCAxZnIgKSAwLjVmcjtcblx0anVzdGlmeS1pdGVtczogY2VudGVyO1xuXHRyb3ctZ2FwOiAkeyBzcGFjZSggMiApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgRGF5T2ZXZWVrID0gc3R5bGVkLmRpdmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyA3MDAgXSB9O1xuXHRmb250LXNpemU6ICR7IENPTkZJRy5mb250U2l6ZSB9O1xuXHRsaW5lLWhlaWdodDogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IERheUJ1dHRvbiA9IHN0eWxlZCggQnV0dG9uLCB7XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3A6IHN0cmluZyApID0+XG5cdFx0ISBbICdjb2x1bW4nLCAnaXNTZWxlY3RlZCcsICdpc1RvZGF5JywgJ2hhc0V2ZW50cycgXS5pbmNsdWRlcyggcHJvcCApLFxufSApPCB7XG5cdGNvbHVtbjogbnVtYmVyO1xuXHRpc1NlbGVjdGVkOiBib29sZWFuO1xuXHRpc1RvZGF5OiBib29sZWFuO1xuXHRoYXNFdmVudHM6IGJvb2xlYW47XG59ID5gXG5cdGdyaWQtY29sdW1uOiAkeyAoIHByb3BzICkgPT4gcHJvcHMuY29sdW1uIH07XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cblx0JHsgKCBwcm9wcyApID0+XG5cdFx0cHJvcHMuZGlzYWJsZWQgJiZcblx0XHRgXG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdFx0YCB9XG5cblx0JiYmIHtcblx0XHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzUm91bmQgfTtcblx0XHRoZWlnaHQ6ICR7IHNwYWNlKCA3ICkgfTtcblx0XHR3aWR0aDogJHsgc3BhY2UoIDcgKSB9O1xuXHRcdGZvbnQtd2VpZ2h0OiA0MDA7XG5cblx0XHQkeyAoIHByb3BzICkgPT5cblx0XHRcdHByb3BzLmlzU2VsZWN0ZWQgJiZcblx0XHRcdGBcblx0XHRcdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXG5cdFx0XHRcdCYsXG5cdFx0XHRcdCY6aG92ZXI6bm90KDpkaXNhYmxlZCwgW2FyaWEtZGlzYWJsZWQ9dHJ1ZV0pIHtcblx0XHRcdFx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudEludmVydGVkIH07XG5cdFx0XHRcdH1cblxuXHRcdFx0XHQmOmZvY3VzOm5vdCg6ZGlzYWJsZWQpLFxuXHRcdFx0XHQmOmZvY3VzOm5vdCg6ZGlzYWJsZWQpIHtcblx0XHRcdFx0XHRib3JkZXI6ICR7IENPTkZJRy5ib3JkZXJXaWR0aEZvY3VzIH0gc29saWQgY3VycmVudENvbG9yO1xuXHRcdFx0XHR9XG5cblx0XHRcdFx0LyogSGlnaGxpZ2h0IHRoZSBzZWxlY3RlZCBkYXkgZm9yIGhpZ2gtY29udHJhc3QgbW9kZSAqL1xuXHRcdFx0XHQmOjphZnRlciB7XG5cdFx0XHRcdFx0Y29udGVudDogJyc7XG5cdFx0XHRcdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdFx0XHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdFx0XHRcdGluc2V0OiAwO1xuXHRcdFx0XHRcdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdFx0XHRcdFx0Ym9yZGVyOiAxcHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0XHRcdH1cblx0XHRcdGAgfVxuXG5cdFx0JHsgKCBwcm9wcyApID0+XG5cdFx0XHQhIHByb3BzLmlzU2VsZWN0ZWQgJiZcblx0XHRcdHByb3BzLmlzVG9kYXkgJiZcblx0XHRcdGBcblx0XHRcdGJhY2tncm91bmQ6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAyMDAgXSB9O1xuXHRcdFx0YCB9XG5cdH1cblxuXHQkeyAoIHByb3BzICkgPT5cblx0XHRwcm9wcy5oYXNFdmVudHMgJiZcblx0XHRgXG5cdFx0OjpiZWZvcmUge1xuXHRcdFx0Ym9yZGVyOiAycHggc29saWQgJHtcblx0XHRcdFx0cHJvcHMuaXNTZWxlY3RlZFxuXHRcdFx0XHRcdD8gQ09MT1JTLnRoZW1lLmFjY2VudEludmVydGVkXG5cdFx0XHRcdFx0OiBDT0xPUlMudGhlbWUuYWNjZW50XG5cdFx0XHR9O1xuXHRcdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdFx0XHRjb250ZW50OiBcIiBcIjtcblx0XHRcdGxlZnQ6IDUwJTtcblx0XHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlKC01MCUsIDlweCk7XG5cdFx0fVxuXHRcdGAgfVxuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__28
  });
  var NavigatorHeading = /* @__PURE__ */ createStyled(component_default19, false ? {
    target: "e105ri6r3"
  } : {
    target: "e105ri6r3",
    label: "NavigatorHeading"
  })("font-size:", config_values_default.fontSize, ";font-weight:", config_values_default.fontWeight, ";grid-column:2/7;strong{font-weight:", config_values_default.fontWeightHeading, ";}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrQ2lEIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IEJ1dHRvbiBmcm9tICcuLi8uLi9idXR0b24nO1xuaW1wb3J0IHsgYm94U2l6aW5nUmVzZXQsIENPTE9SUywgQ09ORklHIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHsgSFN0YWNrIH0gZnJvbSAnLi4vLi4vaC1zdGFjayc7XG5pbXBvcnQgeyBIZWFkaW5nIH0gZnJvbSAnLi4vLi4vaGVhZGluZyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuZXhwb3J0IGNvbnN0IFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQkeyBib3hTaXppbmdSZXNldCB9XG5gO1xuXG5leHBvcnQgY29uc3QgTmF2aWdhdG9yID0gc3R5bGVkKCBIU3RhY2sgKWBcblx0Y29sdW1uLWdhcDogJHsgc3BhY2UoIDIgKSB9O1xuXHRkaXNwbGF5OiBncmlkO1xuXHRncmlkLXRlbXBsYXRlLWNvbHVtbnM6IDAuNWZyIHJlcGVhdCggNSwgMWZyICkgMC41ZnI7XG5cdGp1c3RpZnktaXRlbXM6IGNlbnRlcjtcblx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFZpZXdQcmV2aW91c01vbnRoQnV0dG9uID0gc3R5bGVkKCBCdXR0b24gKWBcblx0Z3JpZC1jb2x1bW46IDEgLyAyO1xuYDtcblxuZXhwb3J0IGNvbnN0IFZpZXdOZXh0TW9udGhCdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHRncmlkLWNvbHVtbjogNyAvIDg7XG5gO1xuXG5leHBvcnQgY29uc3QgTmF2aWdhdG9ySGVhZGluZyA9IHN0eWxlZCggSGVhZGluZyApYFxuXHRmb250LXNpemU6ICR7IENPTkZJRy5mb250U2l6ZSB9O1xuXHRmb250LXdlaWdodDogJHsgQ09ORklHLmZvbnRXZWlnaHQgfTtcblx0Z3JpZC1jb2x1bW46IDIgLyA3O1xuXG5cdHN0cm9uZyB7XG5cdFx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0SGVhZGluZyB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgQ2FsZW5kYXIgPSBzdHlsZWQuZGl2YFxuXHRjb2x1bW4tZ2FwOiAkeyBzcGFjZSggMiApIH07XG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogMC41ZnIgcmVwZWF0KCA1LCAxZnIgKSAwLjVmcjtcblx0anVzdGlmeS1pdGVtczogY2VudGVyO1xuXHRyb3ctZ2FwOiAkeyBzcGFjZSggMiApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgRGF5T2ZXZWVrID0gc3R5bGVkLmRpdmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyA3MDAgXSB9O1xuXHRmb250LXNpemU6ICR7IENPTkZJRy5mb250U2l6ZSB9O1xuXHRsaW5lLWhlaWdodDogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IERheUJ1dHRvbiA9IHN0eWxlZCggQnV0dG9uLCB7XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3A6IHN0cmluZyApID0+XG5cdFx0ISBbICdjb2x1bW4nLCAnaXNTZWxlY3RlZCcsICdpc1RvZGF5JywgJ2hhc0V2ZW50cycgXS5pbmNsdWRlcyggcHJvcCApLFxufSApPCB7XG5cdGNvbHVtbjogbnVtYmVyO1xuXHRpc1NlbGVjdGVkOiBib29sZWFuO1xuXHRpc1RvZGF5OiBib29sZWFuO1xuXHRoYXNFdmVudHM6IGJvb2xlYW47XG59ID5gXG5cdGdyaWQtY29sdW1uOiAkeyAoIHByb3BzICkgPT4gcHJvcHMuY29sdW1uIH07XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cblx0JHsgKCBwcm9wcyApID0+XG5cdFx0cHJvcHMuZGlzYWJsZWQgJiZcblx0XHRgXG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdFx0YCB9XG5cblx0JiYmIHtcblx0XHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzUm91bmQgfTtcblx0XHRoZWlnaHQ6ICR7IHNwYWNlKCA3ICkgfTtcblx0XHR3aWR0aDogJHsgc3BhY2UoIDcgKSB9O1xuXHRcdGZvbnQtd2VpZ2h0OiA0MDA7XG5cblx0XHQkeyAoIHByb3BzICkgPT5cblx0XHRcdHByb3BzLmlzU2VsZWN0ZWQgJiZcblx0XHRcdGBcblx0XHRcdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXG5cdFx0XHRcdCYsXG5cdFx0XHRcdCY6aG92ZXI6bm90KDpkaXNhYmxlZCwgW2FyaWEtZGlzYWJsZWQ9dHJ1ZV0pIHtcblx0XHRcdFx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudEludmVydGVkIH07XG5cdFx0XHRcdH1cblxuXHRcdFx0XHQmOmZvY3VzOm5vdCg6ZGlzYWJsZWQpLFxuXHRcdFx0XHQmOmZvY3VzOm5vdCg6ZGlzYWJsZWQpIHtcblx0XHRcdFx0XHRib3JkZXI6ICR7IENPTkZJRy5ib3JkZXJXaWR0aEZvY3VzIH0gc29saWQgY3VycmVudENvbG9yO1xuXHRcdFx0XHR9XG5cblx0XHRcdFx0LyogSGlnaGxpZ2h0IHRoZSBzZWxlY3RlZCBkYXkgZm9yIGhpZ2gtY29udHJhc3QgbW9kZSAqL1xuXHRcdFx0XHQmOjphZnRlciB7XG5cdFx0XHRcdFx0Y29udGVudDogJyc7XG5cdFx0XHRcdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdFx0XHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdFx0XHRcdGluc2V0OiAwO1xuXHRcdFx0XHRcdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdFx0XHRcdFx0Ym9yZGVyOiAxcHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0XHRcdH1cblx0XHRcdGAgfVxuXG5cdFx0JHsgKCBwcm9wcyApID0+XG5cdFx0XHQhIHByb3BzLmlzU2VsZWN0ZWQgJiZcblx0XHRcdHByb3BzLmlzVG9kYXkgJiZcblx0XHRcdGBcblx0XHRcdGJhY2tncm91bmQ6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAyMDAgXSB9O1xuXHRcdFx0YCB9XG5cdH1cblxuXHQkeyAoIHByb3BzICkgPT5cblx0XHRwcm9wcy5oYXNFdmVudHMgJiZcblx0XHRgXG5cdFx0OjpiZWZvcmUge1xuXHRcdFx0Ym9yZGVyOiAycHggc29saWQgJHtcblx0XHRcdFx0cHJvcHMuaXNTZWxlY3RlZFxuXHRcdFx0XHRcdD8gQ09MT1JTLnRoZW1lLmFjY2VudEludmVydGVkXG5cdFx0XHRcdFx0OiBDT0xPUlMudGhlbWUuYWNjZW50XG5cdFx0XHR9O1xuXHRcdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdFx0XHRjb250ZW50OiBcIiBcIjtcblx0XHRcdGxlZnQ6IDUwJTtcblx0XHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlKC01MCUsIDlweCk7XG5cdFx0fVxuXHRcdGAgfVxuYDtcbiJdfQ== */"));
  var Calendar = /* @__PURE__ */ createStyled("div", false ? {
    target: "e105ri6r2"
  } : {
    target: "e105ri6r2",
    label: "Calendar"
  })("column-gap:", space(2), ";display:grid;grid-template-columns:0.5fr repeat( 5, 1fr ) 0.5fr;justify-items:center;row-gap:", space(2), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE0Q2tDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IEJ1dHRvbiBmcm9tICcuLi8uLi9idXR0b24nO1xuaW1wb3J0IHsgYm94U2l6aW5nUmVzZXQsIENPTE9SUywgQ09ORklHIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHsgSFN0YWNrIH0gZnJvbSAnLi4vLi4vaC1zdGFjayc7XG5pbXBvcnQgeyBIZWFkaW5nIH0gZnJvbSAnLi4vLi4vaGVhZGluZyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuZXhwb3J0IGNvbnN0IFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQkeyBib3hTaXppbmdSZXNldCB9XG5gO1xuXG5leHBvcnQgY29uc3QgTmF2aWdhdG9yID0gc3R5bGVkKCBIU3RhY2sgKWBcblx0Y29sdW1uLWdhcDogJHsgc3BhY2UoIDIgKSB9O1xuXHRkaXNwbGF5OiBncmlkO1xuXHRncmlkLXRlbXBsYXRlLWNvbHVtbnM6IDAuNWZyIHJlcGVhdCggNSwgMWZyICkgMC41ZnI7XG5cdGp1c3RpZnktaXRlbXM6IGNlbnRlcjtcblx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFZpZXdQcmV2aW91c01vbnRoQnV0dG9uID0gc3R5bGVkKCBCdXR0b24gKWBcblx0Z3JpZC1jb2x1bW46IDEgLyAyO1xuYDtcblxuZXhwb3J0IGNvbnN0IFZpZXdOZXh0TW9udGhCdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHRncmlkLWNvbHVtbjogNyAvIDg7XG5gO1xuXG5leHBvcnQgY29uc3QgTmF2aWdhdG9ySGVhZGluZyA9IHN0eWxlZCggSGVhZGluZyApYFxuXHRmb250LXNpemU6ICR7IENPTkZJRy5mb250U2l6ZSB9O1xuXHRmb250LXdlaWdodDogJHsgQ09ORklHLmZvbnRXZWlnaHQgfTtcblx0Z3JpZC1jb2x1bW46IDIgLyA3O1xuXG5cdHN0cm9uZyB7XG5cdFx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0SGVhZGluZyB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgQ2FsZW5kYXIgPSBzdHlsZWQuZGl2YFxuXHRjb2x1bW4tZ2FwOiAkeyBzcGFjZSggMiApIH07XG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogMC41ZnIgcmVwZWF0KCA1LCAxZnIgKSAwLjVmcjtcblx0anVzdGlmeS1pdGVtczogY2VudGVyO1xuXHRyb3ctZ2FwOiAkeyBzcGFjZSggMiApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgRGF5T2ZXZWVrID0gc3R5bGVkLmRpdmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyA3MDAgXSB9O1xuXHRmb250LXNpemU6ICR7IENPTkZJRy5mb250U2l6ZSB9O1xuXHRsaW5lLWhlaWdodDogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IERheUJ1dHRvbiA9IHN0eWxlZCggQnV0dG9uLCB7XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3A6IHN0cmluZyApID0+XG5cdFx0ISBbICdjb2x1bW4nLCAnaXNTZWxlY3RlZCcsICdpc1RvZGF5JywgJ2hhc0V2ZW50cycgXS5pbmNsdWRlcyggcHJvcCApLFxufSApPCB7XG5cdGNvbHVtbjogbnVtYmVyO1xuXHRpc1NlbGVjdGVkOiBib29sZWFuO1xuXHRpc1RvZGF5OiBib29sZWFuO1xuXHRoYXNFdmVudHM6IGJvb2xlYW47XG59ID5gXG5cdGdyaWQtY29sdW1uOiAkeyAoIHByb3BzICkgPT4gcHJvcHMuY29sdW1uIH07XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cblx0JHsgKCBwcm9wcyApID0+XG5cdFx0cHJvcHMuZGlzYWJsZWQgJiZcblx0XHRgXG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdFx0YCB9XG5cblx0JiYmIHtcblx0XHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzUm91bmQgfTtcblx0XHRoZWlnaHQ6ICR7IHNwYWNlKCA3ICkgfTtcblx0XHR3aWR0aDogJHsgc3BhY2UoIDcgKSB9O1xuXHRcdGZvbnQtd2VpZ2h0OiA0MDA7XG5cblx0XHQkeyAoIHByb3BzICkgPT5cblx0XHRcdHByb3BzLmlzU2VsZWN0ZWQgJiZcblx0XHRcdGBcblx0XHRcdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXG5cdFx0XHRcdCYsXG5cdFx0XHRcdCY6aG92ZXI6bm90KDpkaXNhYmxlZCwgW2FyaWEtZGlzYWJsZWQ9dHJ1ZV0pIHtcblx0XHRcdFx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudEludmVydGVkIH07XG5cdFx0XHRcdH1cblxuXHRcdFx0XHQmOmZvY3VzOm5vdCg6ZGlzYWJsZWQpLFxuXHRcdFx0XHQmOmZvY3VzOm5vdCg6ZGlzYWJsZWQpIHtcblx0XHRcdFx0XHRib3JkZXI6ICR7IENPTkZJRy5ib3JkZXJXaWR0aEZvY3VzIH0gc29saWQgY3VycmVudENvbG9yO1xuXHRcdFx0XHR9XG5cblx0XHRcdFx0LyogSGlnaGxpZ2h0IHRoZSBzZWxlY3RlZCBkYXkgZm9yIGhpZ2gtY29udHJhc3QgbW9kZSAqL1xuXHRcdFx0XHQmOjphZnRlciB7XG5cdFx0XHRcdFx0Y29udGVudDogJyc7XG5cdFx0XHRcdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdFx0XHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdFx0XHRcdGluc2V0OiAwO1xuXHRcdFx0XHRcdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdFx0XHRcdFx0Ym9yZGVyOiAxcHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0XHRcdH1cblx0XHRcdGAgfVxuXG5cdFx0JHsgKCBwcm9wcyApID0+XG5cdFx0XHQhIHByb3BzLmlzU2VsZWN0ZWQgJiZcblx0XHRcdHByb3BzLmlzVG9kYXkgJiZcblx0XHRcdGBcblx0XHRcdGJhY2tncm91bmQ6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAyMDAgXSB9O1xuXHRcdFx0YCB9XG5cdH1cblxuXHQkeyAoIHByb3BzICkgPT5cblx0XHRwcm9wcy5oYXNFdmVudHMgJiZcblx0XHRgXG5cdFx0OjpiZWZvcmUge1xuXHRcdFx0Ym9yZGVyOiAycHggc29saWQgJHtcblx0XHRcdFx0cHJvcHMuaXNTZWxlY3RlZFxuXHRcdFx0XHRcdD8gQ09MT1JTLnRoZW1lLmFjY2VudEludmVydGVkXG5cdFx0XHRcdFx0OiBDT0xPUlMudGhlbWUuYWNjZW50XG5cdFx0XHR9O1xuXHRcdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdFx0XHRjb250ZW50OiBcIiBcIjtcblx0XHRcdGxlZnQ6IDUwJTtcblx0XHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlKC01MCUsIDlweCk7XG5cdFx0fVxuXHRcdGAgfVxuYDtcbiJdfQ== */"));
  var DayOfWeek = /* @__PURE__ */ createStyled("div", false ? {
    target: "e105ri6r1"
  } : {
    target: "e105ri6r1",
    label: "DayOfWeek"
  })("color:", COLORS.theme.gray[700], ";font-size:", config_values_default.fontSize, ";line-height:", config_values_default.fontLineHeightBase, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvRG1DIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IEJ1dHRvbiBmcm9tICcuLi8uLi9idXR0b24nO1xuaW1wb3J0IHsgYm94U2l6aW5nUmVzZXQsIENPTE9SUywgQ09ORklHIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHsgSFN0YWNrIH0gZnJvbSAnLi4vLi4vaC1zdGFjayc7XG5pbXBvcnQgeyBIZWFkaW5nIH0gZnJvbSAnLi4vLi4vaGVhZGluZyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuZXhwb3J0IGNvbnN0IFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQkeyBib3hTaXppbmdSZXNldCB9XG5gO1xuXG5leHBvcnQgY29uc3QgTmF2aWdhdG9yID0gc3R5bGVkKCBIU3RhY2sgKWBcblx0Y29sdW1uLWdhcDogJHsgc3BhY2UoIDIgKSB9O1xuXHRkaXNwbGF5OiBncmlkO1xuXHRncmlkLXRlbXBsYXRlLWNvbHVtbnM6IDAuNWZyIHJlcGVhdCggNSwgMWZyICkgMC41ZnI7XG5cdGp1c3RpZnktaXRlbXM6IGNlbnRlcjtcblx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFZpZXdQcmV2aW91c01vbnRoQnV0dG9uID0gc3R5bGVkKCBCdXR0b24gKWBcblx0Z3JpZC1jb2x1bW46IDEgLyAyO1xuYDtcblxuZXhwb3J0IGNvbnN0IFZpZXdOZXh0TW9udGhCdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHRncmlkLWNvbHVtbjogNyAvIDg7XG5gO1xuXG5leHBvcnQgY29uc3QgTmF2aWdhdG9ySGVhZGluZyA9IHN0eWxlZCggSGVhZGluZyApYFxuXHRmb250LXNpemU6ICR7IENPTkZJRy5mb250U2l6ZSB9O1xuXHRmb250LXdlaWdodDogJHsgQ09ORklHLmZvbnRXZWlnaHQgfTtcblx0Z3JpZC1jb2x1bW46IDIgLyA3O1xuXG5cdHN0cm9uZyB7XG5cdFx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0SGVhZGluZyB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgQ2FsZW5kYXIgPSBzdHlsZWQuZGl2YFxuXHRjb2x1bW4tZ2FwOiAkeyBzcGFjZSggMiApIH07XG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogMC41ZnIgcmVwZWF0KCA1LCAxZnIgKSAwLjVmcjtcblx0anVzdGlmeS1pdGVtczogY2VudGVyO1xuXHRyb3ctZ2FwOiAkeyBzcGFjZSggMiApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgRGF5T2ZXZWVrID0gc3R5bGVkLmRpdmBcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5ncmF5WyA3MDAgXSB9O1xuXHRmb250LXNpemU6ICR7IENPTkZJRy5mb250U2l6ZSB9O1xuXHRsaW5lLWhlaWdodDogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IERheUJ1dHRvbiA9IHN0eWxlZCggQnV0dG9uLCB7XG5cdHNob3VsZEZvcndhcmRQcm9wOiAoIHByb3A6IHN0cmluZyApID0+XG5cdFx0ISBbICdjb2x1bW4nLCAnaXNTZWxlY3RlZCcsICdpc1RvZGF5JywgJ2hhc0V2ZW50cycgXS5pbmNsdWRlcyggcHJvcCApLFxufSApPCB7XG5cdGNvbHVtbjogbnVtYmVyO1xuXHRpc1NlbGVjdGVkOiBib29sZWFuO1xuXHRpc1RvZGF5OiBib29sZWFuO1xuXHRoYXNFdmVudHM6IGJvb2xlYW47XG59ID5gXG5cdGdyaWQtY29sdW1uOiAkeyAoIHByb3BzICkgPT4gcHJvcHMuY29sdW1uIH07XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cblx0JHsgKCBwcm9wcyApID0+XG5cdFx0cHJvcHMuZGlzYWJsZWQgJiZcblx0XHRgXG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdFx0YCB9XG5cblx0JiYmIHtcblx0XHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzUm91bmQgfTtcblx0XHRoZWlnaHQ6ICR7IHNwYWNlKCA3ICkgfTtcblx0XHR3aWR0aDogJHsgc3BhY2UoIDcgKSB9O1xuXHRcdGZvbnQtd2VpZ2h0OiA0MDA7XG5cblx0XHQkeyAoIHByb3BzICkgPT5cblx0XHRcdHByb3BzLmlzU2VsZWN0ZWQgJiZcblx0XHRcdGBcblx0XHRcdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXG5cdFx0XHRcdCYsXG5cdFx0XHRcdCY6aG92ZXI6bm90KDpkaXNhYmxlZCwgW2FyaWEtZGlzYWJsZWQ9dHJ1ZV0pIHtcblx0XHRcdFx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudEludmVydGVkIH07XG5cdFx0XHRcdH1cblxuXHRcdFx0XHQmOmZvY3VzOm5vdCg6ZGlzYWJsZWQpLFxuXHRcdFx0XHQmOmZvY3VzOm5vdCg6ZGlzYWJsZWQpIHtcblx0XHRcdFx0XHRib3JkZXI6ICR7IENPTkZJRy5ib3JkZXJXaWR0aEZvY3VzIH0gc29saWQgY3VycmVudENvbG9yO1xuXHRcdFx0XHR9XG5cblx0XHRcdFx0LyogSGlnaGxpZ2h0IHRoZSBzZWxlY3RlZCBkYXkgZm9yIGhpZ2gtY29udHJhc3QgbW9kZSAqL1xuXHRcdFx0XHQmOjphZnRlciB7XG5cdFx0XHRcdFx0Y29udGVudDogJyc7XG5cdFx0XHRcdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdFx0XHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdFx0XHRcdGluc2V0OiAwO1xuXHRcdFx0XHRcdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdFx0XHRcdFx0Ym9yZGVyOiAxcHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0XHRcdH1cblx0XHRcdGAgfVxuXG5cdFx0JHsgKCBwcm9wcyApID0+XG5cdFx0XHQhIHByb3BzLmlzU2VsZWN0ZWQgJiZcblx0XHRcdHByb3BzLmlzVG9kYXkgJiZcblx0XHRcdGBcblx0XHRcdGJhY2tncm91bmQ6ICR7IENPTE9SUy50aGVtZS5ncmF5WyAyMDAgXSB9O1xuXHRcdFx0YCB9XG5cdH1cblxuXHQkeyAoIHByb3BzICkgPT5cblx0XHRwcm9wcy5oYXNFdmVudHMgJiZcblx0XHRgXG5cdFx0OjpiZWZvcmUge1xuXHRcdFx0Ym9yZGVyOiAycHggc29saWQgJHtcblx0XHRcdFx0cHJvcHMuaXNTZWxlY3RlZFxuXHRcdFx0XHRcdD8gQ09MT1JTLnRoZW1lLmFjY2VudEludmVydGVkXG5cdFx0XHRcdFx0OiBDT0xPUlMudGhlbWUuYWNjZW50XG5cdFx0XHR9O1xuXHRcdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1JvdW5kIH07XG5cdFx0XHRjb250ZW50OiBcIiBcIjtcblx0XHRcdGxlZnQ6IDUwJTtcblx0XHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlKC01MCUsIDlweCk7XG5cdFx0fVxuXHRcdGAgfVxuYDtcbiJdfQ== */"));
  var DayButton = /* @__PURE__ */ createStyled(button_default, false ? {
    shouldForwardProp: (prop) => !["column", "isSelected", "isToday", "hasEvents"].includes(prop),
    target: "e105ri6r0"
  } : {
    shouldForwardProp: (prop) => !["column", "isSelected", "isToday", "hasEvents"].includes(prop),
    target: "e105ri6r0",
    label: "DayButton"
  })("grid-column:", (props) => props.column, ";position:relative;justify-content:center;", (props) => props.disabled && `
		pointer-events: none;
		`, " &&&{border-radius:", config_values_default.radiusRound, ";height:", space(7), ";width:", space(7), ";font-weight:400;", (props) => props.isSelected && `
				background: ${COLORS.theme.accent};

				&,
				&:hover:not(:disabled, [aria-disabled=true]) {
					color: ${COLORS.theme.accentInverted};
				}

				&:focus:not(:disabled),
				&:focus:not(:disabled) {
					border: ${config_values_default.borderWidthFocus} solid currentColor;
				}

				/* Highlight the selected day for high-contrast mode */
				&::after {
					content: '';
					position: absolute;
					pointer-events: none;
					inset: 0;
					border-radius: inherit;
					border: 1px solid transparent;
				}
			`, " ", (props) => !props.isSelected && props.isToday && `
			background: ${COLORS.theme.gray[200]};
			`, ";}", (props) => props.hasEvents && `
		::before {
			border: 2px solid ${props.isSelected ? COLORS.theme.accentInverted : COLORS.theme.accent};
			border-radius: ${config_values_default.radiusRound};
			content: " ";
			left: 50%;
			position: absolute;
			transform: translate(-50%, 9px);
		}
		`, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrRUciLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgQnV0dG9uIGZyb20gJy4uLy4uL2J1dHRvbic7XG5pbXBvcnQgeyBib3hTaXppbmdSZXNldCwgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBIU3RhY2sgfSBmcm9tICcuLi8uLi9oLXN0YWNrJztcbmltcG9ydCB7IEhlYWRpbmcgfSBmcm9tICcuLi8uLi9oZWFkaW5nJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5leHBvcnQgY29uc3QgV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdCR7IGJveFNpemluZ1Jlc2V0IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBOYXZpZ2F0b3IgPSBzdHlsZWQoIEhTdGFjayApYFxuXHRjb2x1bW4tZ2FwOiAkeyBzcGFjZSggMiApIH07XG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogMC41ZnIgcmVwZWF0KCA1LCAxZnIgKSAwLjVmcjtcblx0anVzdGlmeS1pdGVtczogY2VudGVyO1xuXHRtYXJnaW4tYm90dG9tOiAkeyBzcGFjZSggNCApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgVmlld1ByZXZpb3VzTW9udGhCdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHRncmlkLWNvbHVtbjogMSAvIDI7XG5gO1xuXG5leHBvcnQgY29uc3QgVmlld05leHRNb250aEJ1dHRvbiA9IHN0eWxlZCggQnV0dG9uIClgXG5cdGdyaWQtY29sdW1uOiA3IC8gODtcbmA7XG5cbmV4cG9ydCBjb25zdCBOYXZpZ2F0b3JIZWFkaW5nID0gc3R5bGVkKCBIZWFkaW5nIClgXG5cdGZvbnQtc2l6ZTogJHsgQ09ORklHLmZvbnRTaXplIH07XG5cdGZvbnQtd2VpZ2h0OiAkeyBDT05GSUcuZm9udFdlaWdodCB9O1xuXHRncmlkLWNvbHVtbjogMiAvIDc7XG5cblx0c3Ryb25nIHtcblx0XHRmb250LXdlaWdodDogJHsgQ09ORklHLmZvbnRXZWlnaHRIZWFkaW5nIH07XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBDYWxlbmRhciA9IHN0eWxlZC5kaXZgXG5cdGNvbHVtbi1nYXA6ICR7IHNwYWNlKCAyICkgfTtcblx0ZGlzcGxheTogZ3JpZDtcblx0Z3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiAwLjVmciByZXBlYXQoIDUsIDFmciApIDAuNWZyO1xuXHRqdXN0aWZ5LWl0ZW1zOiBjZW50ZXI7XG5cdHJvdy1nYXA6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBEYXlPZldlZWsgPSBzdHlsZWQuZGl2YFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmdyYXlbIDcwMCBdIH07XG5cdGZvbnQtc2l6ZTogJHsgQ09ORklHLmZvbnRTaXplIH07XG5cdGxpbmUtaGVpZ2h0OiAkeyBDT05GSUcuZm9udExpbmVIZWlnaHRCYXNlIH07XG5gO1xuXG5leHBvcnQgY29uc3QgRGF5QnV0dG9uID0gc3R5bGVkKCBCdXR0b24sIHtcblx0c2hvdWxkRm9yd2FyZFByb3A6ICggcHJvcDogc3RyaW5nICkgPT5cblx0XHQhIFsgJ2NvbHVtbicsICdpc1NlbGVjdGVkJywgJ2lzVG9kYXknLCAnaGFzRXZlbnRzJyBdLmluY2x1ZGVzKCBwcm9wICksXG59ICk8IHtcblx0Y29sdW1uOiBudW1iZXI7XG5cdGlzU2VsZWN0ZWQ6IGJvb2xlYW47XG5cdGlzVG9kYXk6IGJvb2xlYW47XG5cdGhhc0V2ZW50czogYm9vbGVhbjtcbn0gPmBcblx0Z3JpZC1jb2x1bW46ICR7ICggcHJvcHMgKSA9PiBwcm9wcy5jb2x1bW4gfTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblxuXHQkeyAoIHByb3BzICkgPT5cblx0XHRwcm9wcy5kaXNhYmxlZCAmJlxuXHRcdGBcblx0XHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0XHRgIH1cblxuXHQmJiYge1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNSb3VuZCB9O1xuXHRcdGhlaWdodDogJHsgc3BhY2UoIDcgKSB9O1xuXHRcdHdpZHRoOiAkeyBzcGFjZSggNyApIH07XG5cdFx0Zm9udC13ZWlnaHQ6IDQwMDtcblxuXHRcdCR7ICggcHJvcHMgKSA9PlxuXHRcdFx0cHJvcHMuaXNTZWxlY3RlZCAmJlxuXHRcdFx0YFxuXHRcdFx0XHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cblx0XHRcdFx0Jixcblx0XHRcdFx0Jjpob3Zlcjpub3QoOmRpc2FibGVkLCBbYXJpYS1kaXNhYmxlZD10cnVlXSkge1xuXHRcdFx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblx0XHRcdFx0fVxuXG5cdFx0XHRcdCY6Zm9jdXM6bm90KDpkaXNhYmxlZCksXG5cdFx0XHRcdCY6Zm9jdXM6bm90KDpkaXNhYmxlZCkge1xuXHRcdFx0XHRcdGJvcmRlcjogJHsgQ09ORklHLmJvcmRlcldpZHRoRm9jdXMgfSBzb2xpZCBjdXJyZW50Q29sb3I7XG5cdFx0XHRcdH1cblxuXHRcdFx0XHQvKiBIaWdobGlnaHQgdGhlIHNlbGVjdGVkIGRheSBmb3IgaGlnaC1jb250cmFzdCBtb2RlICovXG5cdFx0XHRcdCY6OmFmdGVyIHtcblx0XHRcdFx0XHRjb250ZW50OiAnJztcblx0XHRcdFx0XHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdFx0XHRcdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdFx0XHRcdFx0aW5zZXQ6IDA7XG5cdFx0XHRcdFx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0XHRcdFx0XHRib3JkZXI6IDFweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRcdFx0fVxuXHRcdFx0YCB9XG5cblx0XHQkeyAoIHByb3BzICkgPT5cblx0XHRcdCEgcHJvcHMuaXNTZWxlY3RlZCAmJlxuXHRcdFx0cHJvcHMuaXNUb2RheSAmJlxuXHRcdFx0YFxuXHRcdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLnRoZW1lLmdyYXlbIDIwMCBdIH07XG5cdFx0XHRgIH1cblx0fVxuXG5cdCR7ICggcHJvcHMgKSA9PlxuXHRcdHByb3BzLmhhc0V2ZW50cyAmJlxuXHRcdGBcblx0XHQ6OmJlZm9yZSB7XG5cdFx0XHRib3JkZXI6IDJweCBzb2xpZCAke1xuXHRcdFx0XHRwcm9wcy5pc1NlbGVjdGVkXG5cdFx0XHRcdFx0PyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWRcblx0XHRcdFx0XHQ6IENPTE9SUy50aGVtZS5hY2NlbnRcblx0XHRcdH07XG5cdFx0XHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzUm91bmQgfTtcblx0XHRcdGNvbnRlbnQ6IFwiIFwiO1xuXHRcdFx0bGVmdDogNTAlO1xuXHRcdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGUoLTUwJSwgOXB4KTtcblx0XHR9XG5cdFx0YCB9XG5gO1xuIl19 */"));

  // node_modules/@date-fns/utc/date/mini.js
  var UTCDateMini = class extends Date {
    constructor() {
      super();
      this.setTime(arguments.length === 0 ? (
        // Enables Sinon's fake timers that override the constructor
        Date.now()
      ) : arguments.length === 1 ? typeof arguments[0] === "string" ? +new Date(arguments[0]) : arguments[0] : Date.UTC(...arguments));
    }
    getTimezoneOffset() {
      return 0;
    }
  };
  var re2 = /^(get|set)(?!UTC)/;
  Object.getOwnPropertyNames(Date.prototype).forEach((method) => {
    if (re2.test(method)) {
      const utcMethod = Date.prototype[method.replace(re2, "$1UTC")];
      if (utcMethod) UTCDateMini.prototype[method] = utcMethod;
    }
  });

  // node_modules/@date-fns/utc/date/index.js
  var weekdayFormat = new Intl.DateTimeFormat("en-US", {
    weekday: "short",
    timeZone: "UTC"
  });
  var dateFormat = new Intl.DateTimeFormat("en-US", {
    month: "short",
    day: "numeric",
    timeZone: "UTC"
  });
  var timeFormat = new Intl.DateTimeFormat("en-GB", {
    hour12: false,
    hour: "numeric",
    minute: "numeric",
    second: "numeric",
    timeZone: "UTC"
  });

  // packages/components/build-module/date-time/utils.mjs
  var import_date2 = __toESM(require_date(), 1);
  function inputToDate(input) {
    if (typeof input === "string") {
      const hasTimezone = /Z|[+-]\d{2}(:?\d{2})?$/.test(input);
      if (hasTimezone) {
        return new UTCDateMini(new Date(input));
      }
      return new UTCDateMini((0, import_date2.getDate)(input).getTime());
    }
    const time2 = input instanceof Date ? input.getTime() : input;
    return new UTCDateMini(time2);
  }
  function startOfDayInConfiguredTimezone(date) {
    const year = Number((0, import_date2.date)("Y", date));
    const month = Number((0, import_date2.date)("n", date)) - 1;
    const day = Number((0, import_date2.date)("j", date));
    return new Date(year, month, day, 0, 0, 0, 0);
  }
  function from12hTo24h(hours, isPm) {
    return isPm ? (hours % 12 + 12) % 24 : hours % 12;
  }
  function from24hTo12h(hours) {
    return hours % 12 || 12;
  }
  function buildPadInputStateReducer(pad) {
    return (state, action) => {
      const nextState = {
        ...state
      };
      if (action.type === COMMIT || action.type === PRESS_UP || action.type === PRESS_DOWN) {
        if (nextState.value !== void 0) {
          nextState.value = nextState.value.toString().padStart(pad, "0");
        }
      }
      return nextState;
    };
  }
  var getDaysInMonth2 = (year, month) => (
    // Take advantage of JavaScript's built-in date wrapping logic, where day 0
    // of the next month is interpreted as the last day of the preceding month.
    new Date(year, month + 1, 0).getDate()
  );
  function setInConfiguredTimezone(date, updates) {
    const values = {
      year: Number((0, import_date2.date)("Y", date)),
      month: Number((0, import_date2.date)("n", date)) - 1,
      date: Number((0, import_date2.date)("j", date)),
      hours: Number((0, import_date2.date)("H", date)),
      minutes: Number((0, import_date2.date)("i", date)),
      seconds: Number((0, import_date2.date)("s", date)),
      ...updates
    };
    const daysInMonth = getDaysInMonth2(values.year, values.month);
    values.date = Math.min(values.date, daysInMonth);
    const year = String(values.year).padStart(4, "0");
    const month = String(values.month + 1).padStart(2, "0");
    const day = String(values.date).padStart(2, "0");
    const hours = String(values.hours).padStart(2, "0");
    const minutes = String(values.minutes).padStart(2, "0");
    const seconds = String(values.seconds).padStart(2, "0");
    const timezoneless = `${year}-${month}-${day}T${hours}:${minutes}:${seconds}`;
    return new UTCDateMini((0, import_date2.getDate)(timezoneless).getTime());
  }
  function validateInputElementTarget(event) {
    const HTMLInputElementInstance = event.target?.ownerDocument.defaultView?.HTMLInputElement ?? HTMLInputElement;
    if (!(event.target instanceof HTMLInputElementInstance)) {
      return false;
    }
    return event.target.validity.valid;
  }

  // packages/components/build-module/date-time/constants.mjs
  var TIMEZONELESS_FORMAT = "Y-m-d\\TH:i:s";

  // packages/components/build-module/date-time/date/index.mjs
  var import_jsx_runtime193 = __toESM(require_jsx_runtime(), 1);
  function DatePicker({
    currentDate,
    onChange,
    events = [],
    isInvalidDate,
    onMonthPreviewed,
    startOfWeek: weekStartsOn = 0
  }) {
    const date = inputToDate(currentDate ?? /* @__PURE__ */ new Date());
    const {
      calendar,
      viewing,
      setSelected,
      setViewing,
      isSelected: isSelected2,
      viewPreviousMonth,
      viewNextMonth
    } = useLilius({
      selected: [startOfDayInConfiguredTimezone(date)],
      viewing: startOfDayInConfiguredTimezone(date),
      weekStartsOn
    });
    const [focusable, setFocusable] = (0, import_element128.useState)(startOfDayInConfiguredTimezone(date));
    const [isFocusWithinCalendar, setIsFocusWithinCalendar] = (0, import_element128.useState)(false);
    const [prevCurrentDate, setPrevCurrentDate] = (0, import_element128.useState)(currentDate);
    if (currentDate !== prevCurrentDate) {
      setPrevCurrentDate(currentDate);
      setSelected([startOfDayInConfiguredTimezone(date)]);
      setViewing(startOfDayInConfiguredTimezone(date));
      setFocusable(startOfDayInConfiguredTimezone(date));
    }
    return /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(Wrapper3, {
      className: "components-datetime__date",
      role: "application",
      "aria-label": (0, import_i18n42.__)("Calendar"),
      children: [/* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(Navigator, {
        children: [/* @__PURE__ */ (0, import_jsx_runtime193.jsx)(ViewPreviousMonthButton, {
          icon: (0, import_i18n42.isRTL)() ? arrow_right_default : arrow_left_default,
          variant: "tertiary",
          "aria-label": (0, import_i18n42.__)("View previous month"),
          onClick: () => {
            viewPreviousMonth();
            setFocusable(subMonths(focusable, 1));
            const prevMonth = subMonths(viewing, 1);
            onMonthPreviewed?.((0, import_date3.dateI18n)(TIMEZONELESS_FORMAT, prevMonth, -prevMonth.getTimezoneOffset()));
          },
          size: "compact"
        }), /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(NavigatorHeading, {
          level: 3,
          children: [/* @__PURE__ */ (0, import_jsx_runtime193.jsx)("strong", {
            children: (0, import_date3.dateI18n)("F", viewing, -viewing.getTimezoneOffset())
          }), " ", (0, import_date3.dateI18n)("Y", viewing, -viewing.getTimezoneOffset())]
        }), /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(ViewNextMonthButton, {
          icon: (0, import_i18n42.isRTL)() ? arrow_left_default : arrow_right_default,
          variant: "tertiary",
          "aria-label": (0, import_i18n42.__)("View next month"),
          onClick: () => {
            viewNextMonth();
            setFocusable(addMonths(focusable, 1));
            const nextMonth = addMonths(viewing, 1);
            onMonthPreviewed?.((0, import_date3.dateI18n)(TIMEZONELESS_FORMAT, nextMonth, -nextMonth.getTimezoneOffset()));
          },
          size: "compact"
        })]
      }), /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(Calendar, {
        onFocus: () => setIsFocusWithinCalendar(true),
        onBlur: () => setIsFocusWithinCalendar(false),
        children: [calendar[0][0].map((day) => /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(DayOfWeek, {
          children: (0, import_date3.dateI18n)("D", day, -day.getTimezoneOffset())
        }, day.toString())), calendar[0].map((week) => week.map((day, index2) => {
          if (!isSameMonth(day, viewing)) {
            return null;
          }
          return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(Day2, {
            day,
            column: index2 + 1,
            isSelected: isSelected2(day),
            isFocusable: isEqual(day, focusable),
            isFocusAllowed: isFocusWithinCalendar,
            isToday: isSameDay(day, startOfDayInConfiguredTimezone(/* @__PURE__ */ new Date())),
            isInvalid: isInvalidDate ? isInvalidDate(day) : false,
            numEvents: events.filter((event) => isSameDay(event.date, day)).length,
            onClick: () => {
              setSelected([day]);
              setFocusable(day);
              const newDate = setInConfiguredTimezone(date, {
                year: day.getFullYear(),
                month: day.getMonth(),
                date: day.getDate()
              });
              onChange?.((0, import_date3.date)(TIMEZONELESS_FORMAT, newDate));
            },
            onKeyDown: (event) => {
              let nextFocusable;
              if (event.key === "ArrowLeft") {
                nextFocusable = addDays(day, (0, import_i18n42.isRTL)() ? 1 : -1);
              }
              if (event.key === "ArrowRight") {
                nextFocusable = addDays(day, (0, import_i18n42.isRTL)() ? -1 : 1);
              }
              if (event.key === "ArrowUp") {
                nextFocusable = subWeeks(day, 1);
              }
              if (event.key === "ArrowDown") {
                nextFocusable = addWeeks(day, 1);
              }
              if (event.key === "PageUp") {
                nextFocusable = subMonths(day, 1);
              }
              if (event.key === "PageDown") {
                nextFocusable = addMonths(day, 1);
              }
              if (event.key === "Home") {
                const dayOfWeek = day.getDay();
                const daysToSubtract = (dayOfWeek - weekStartsOn + 7) % 7;
                nextFocusable = subDays(day, daysToSubtract);
              }
              if (event.key === "End") {
                const dayOfWeek = day.getDay();
                const daysToAdd = (weekStartsOn + 6 - dayOfWeek) % 7;
                nextFocusable = addDays(day, daysToAdd);
              }
              if (nextFocusable) {
                event.preventDefault();
                setFocusable(nextFocusable);
                if (!isSameMonth(nextFocusable, viewing)) {
                  setViewing(nextFocusable);
                  onMonthPreviewed?.((0, import_date3.dateI18n)(TIMEZONELESS_FORMAT, nextFocusable, -nextFocusable.getTimezoneOffset()));
                }
              }
            }
          }, day.toString());
        }))]
      })]
    });
  }
  function Day2({
    day,
    column: column2,
    isSelected: isSelected2,
    isFocusable: isFocusable2,
    isFocusAllowed,
    isToday,
    isInvalid,
    numEvents,
    onClick,
    onKeyDown
  }) {
    const ref = (0, import_element128.useRef)(null);
    (0, import_element128.useEffect)(() => {
      if (ref.current && isFocusable2 && isFocusAllowed) {
        ref.current.focus();
      }
    }, [isFocusable2]);
    return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(DayButton, {
      __next40pxDefaultSize: true,
      ref,
      className: "components-datetime__date__day",
      disabled: isInvalid,
      tabIndex: isFocusable2 ? 0 : -1,
      "aria-label": getDayLabel(day, isSelected2, isToday, numEvents),
      column: column2,
      isSelected: isSelected2,
      isToday,
      hasEvents: numEvents > 0,
      onClick,
      onKeyDown,
      children: (0, import_date3.dateI18n)("j", day, -day.getTimezoneOffset())
    });
  }
  function getDayLabel(date, isSelected2, isToday, numEvents) {
    const {
      formats
    } = (0, import_date3.getSettings)();
    const localizedDate = (0, import_date3.dateI18n)(formats.date, date, -date.getTimezoneOffset());
    const parts = [localizedDate];
    if (isSelected2) {
      parts.push((0, import_i18n42.__)("Selected"));
    }
    if (isToday) {
      parts.push((0, import_i18n42.__)("Today"));
    }
    if (numEvents > 0) {
      parts.push((0, import_i18n42.sprintf)(
        // translators: %d: Number of events on the calendar date.
        (0, import_i18n42._n)("There is %d event", "There are %d events", numEvents),
        numEvents
      ));
    }
    return parts.join(". ");
  }
  var date_default = DatePicker;

  // packages/components/build-module/date-time/time/index.mjs
  var import_element130 = __toESM(require_element(), 1);
  var import_i18n45 = __toESM(require_i18n(), 1);
  var import_date5 = __toESM(require_date(), 1);

  // packages/components/build-module/date-time/time/timezone.mjs
  var import_i18n43 = __toESM(require_i18n(), 1);
  var import_date4 = __toESM(require_date(), 1);

  // packages/components/build-module/date-time/time/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__29() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var Wrapper4 = /* @__PURE__ */ createStyled("div", false ? {
    target: "evcr2319"
  } : {
    target: "evcr2319",
    label: "Wrapper"
  })("box-sizing:border-box;font-size:", config_values_default.fontSize, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQmlDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7XG5cdElucHV0LFxuXHRCYWNrZHJvcFVJLFxufSBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL3N0eWxlcy9pbnB1dC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgTnVtYmVyQ29udHJvbCBmcm9tICcuLi8uLi9udW1iZXItY29udHJvbCc7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Zm9udC1zaXplOiAkeyBDT05GSUcuZm9udFNpemUgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBGaWVsZHNldCA9IHN0eWxlZC5maWVsZHNldGBcblx0Ym9yZGVyOiAwO1xuXHRtYXJnaW46IDAgMCAkeyBzcGFjZSggMiAqIDIgKSB9IDA7XG5cdHBhZGRpbmc6IDA7XG5cblx0JjpsYXN0LWNoaWxkIHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVGltZVdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRkaXJlY3Rpb246IGx0cjtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbmNvbnN0IGJhc2VJbnB1dCA9IGNzc2Bcblx0JiYmICR7IElucHV0IH0ge1xuXHRcdHBhZGRpbmctbGVmdDogJHsgc3BhY2UoIDIgKSB9O1xuXHRcdHBhZGRpbmctcmlnaHQ6ICR7IHNwYWNlKCAyICkgfTtcblx0XHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBIb3Vyc0lucHV0ID0gc3R5bGVkKCBOdW1iZXJDb250cm9sIClgXG5cdCR7IGJhc2VJbnB1dCB9XG5cblx0d2lkdGg6ICR7IHNwYWNlKCA5ICkgfTtcblxuXHQmJiYgJHsgSW5wdXQgfSB7XG5cdFx0cGFkZGluZy1yaWdodDogMDtcblx0fVxuXG5cdCYmJiAkeyBCYWNrZHJvcFVJIH0ge1xuXHRcdGJvcmRlci1yaWdodDogMDtcblx0XHRib3JkZXItdG9wLXJpZ2h0LXJhZGl1czogMDtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogMDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFRpbWVTZXBhcmF0b3IgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXRvcDogJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gc29saWQgJHsgQ09MT1JTLmdyYXlbIDcwMCBdIH07XG5cdGJvcmRlci1ib3R0b206ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXHRmb250LXNpemU6ICR7IENPTkZJRy5mb250U2l6ZSB9O1xuXHRsaW5lLWhlaWdodDogY2FsYyhcblx0XHQkeyBDT05GSUcuY29udHJvbEhlaWdodCB9IC0gJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gKiAyXG5cdCk7XG5cdGRpc3BsYXk6IGlubGluZS1ibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBNaW51dGVzSW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JHsgYmFzZUlucHV0IH1cblxuXHR3aWR0aDogJHsgc3BhY2UoIDkgKSB9O1xuXG5cdCYmJiAkeyBJbnB1dCB9IHtcblx0XHRwYWRkaW5nLWxlZnQ6IDA7XG5cdH1cblxuXHQmJiYgJHsgQmFja2Ryb3BVSSB9IHtcblx0XHRib3JkZXItbGVmdDogMDtcblx0XHRib3JkZXItdG9wLWxlZnQtcmFkaXVzOiAwO1xuXHRcdGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDA7XG5cdH1cbmA7XG5cbi8vIElkZWFsbHkgd2Ugd291bGRuJ3QgbmVlZCBhIHdyYXBwZXIsIGJ1dCBjYW4ndCBvdGhlcndpc2UgdGFyZ2V0IHRoZVxuLy8gPEJhc2VDb250cm9sPiBpbiA8U2VsZWN0Q29udHJvbD5cbmV4cG9ydCBjb25zdCBNb250aFNlbGVjdFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRmbGV4LWdyb3c6IDE7XG5gO1xuXG5leHBvcnQgY29uc3QgRGF5SW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JHsgYmFzZUlucHV0IH1cblxuXHR3aWR0aDogJHsgc3BhY2UoIDkgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFllYXJJbnB1dCA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHQkeyBiYXNlSW5wdXQgfVxuXG5cdHdpZHRoOiAkeyBzcGFjZSggMTQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFRpbWVab25lID0gc3R5bGVkLmRpdmBcblx0dGV4dC1kZWNvcmF0aW9uOiB1bmRlcmxpbmUgZG90dGVkO1xuYDtcbiJdfQ== */"));
  var Fieldset = /* @__PURE__ */ createStyled("fieldset", false ? {
    target: "evcr2318"
  } : {
    target: "evcr2318",
    label: "Fieldset"
  })("border:0;margin:0 0 ", space(2 * 2), " 0;padding:0;&:last-child{margin-bottom:0;}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQnVDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7XG5cdElucHV0LFxuXHRCYWNrZHJvcFVJLFxufSBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL3N0eWxlcy9pbnB1dC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgTnVtYmVyQ29udHJvbCBmcm9tICcuLi8uLi9udW1iZXItY29udHJvbCc7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Zm9udC1zaXplOiAkeyBDT05GSUcuZm9udFNpemUgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBGaWVsZHNldCA9IHN0eWxlZC5maWVsZHNldGBcblx0Ym9yZGVyOiAwO1xuXHRtYXJnaW46IDAgMCAkeyBzcGFjZSggMiAqIDIgKSB9IDA7XG5cdHBhZGRpbmc6IDA7XG5cblx0JjpsYXN0LWNoaWxkIHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVGltZVdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRkaXJlY3Rpb246IGx0cjtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbmNvbnN0IGJhc2VJbnB1dCA9IGNzc2Bcblx0JiYmICR7IElucHV0IH0ge1xuXHRcdHBhZGRpbmctbGVmdDogJHsgc3BhY2UoIDIgKSB9O1xuXHRcdHBhZGRpbmctcmlnaHQ6ICR7IHNwYWNlKCAyICkgfTtcblx0XHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBIb3Vyc0lucHV0ID0gc3R5bGVkKCBOdW1iZXJDb250cm9sIClgXG5cdCR7IGJhc2VJbnB1dCB9XG5cblx0d2lkdGg6ICR7IHNwYWNlKCA5ICkgfTtcblxuXHQmJiYgJHsgSW5wdXQgfSB7XG5cdFx0cGFkZGluZy1yaWdodDogMDtcblx0fVxuXG5cdCYmJiAkeyBCYWNrZHJvcFVJIH0ge1xuXHRcdGJvcmRlci1yaWdodDogMDtcblx0XHRib3JkZXItdG9wLXJpZ2h0LXJhZGl1czogMDtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogMDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFRpbWVTZXBhcmF0b3IgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXRvcDogJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gc29saWQgJHsgQ09MT1JTLmdyYXlbIDcwMCBdIH07XG5cdGJvcmRlci1ib3R0b206ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXHRmb250LXNpemU6ICR7IENPTkZJRy5mb250U2l6ZSB9O1xuXHRsaW5lLWhlaWdodDogY2FsYyhcblx0XHQkeyBDT05GSUcuY29udHJvbEhlaWdodCB9IC0gJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gKiAyXG5cdCk7XG5cdGRpc3BsYXk6IGlubGluZS1ibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBNaW51dGVzSW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JHsgYmFzZUlucHV0IH1cblxuXHR3aWR0aDogJHsgc3BhY2UoIDkgKSB9O1xuXG5cdCYmJiAkeyBJbnB1dCB9IHtcblx0XHRwYWRkaW5nLWxlZnQ6IDA7XG5cdH1cblxuXHQmJiYgJHsgQmFja2Ryb3BVSSB9IHtcblx0XHRib3JkZXItbGVmdDogMDtcblx0XHRib3JkZXItdG9wLWxlZnQtcmFkaXVzOiAwO1xuXHRcdGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDA7XG5cdH1cbmA7XG5cbi8vIElkZWFsbHkgd2Ugd291bGRuJ3QgbmVlZCBhIHdyYXBwZXIsIGJ1dCBjYW4ndCBvdGhlcndpc2UgdGFyZ2V0IHRoZVxuLy8gPEJhc2VDb250cm9sPiBpbiA8U2VsZWN0Q29udHJvbD5cbmV4cG9ydCBjb25zdCBNb250aFNlbGVjdFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRmbGV4LWdyb3c6IDE7XG5gO1xuXG5leHBvcnQgY29uc3QgRGF5SW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JHsgYmFzZUlucHV0IH1cblxuXHR3aWR0aDogJHsgc3BhY2UoIDkgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFllYXJJbnB1dCA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHQkeyBiYXNlSW5wdXQgfVxuXG5cdHdpZHRoOiAkeyBzcGFjZSggMTQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFRpbWVab25lID0gc3R5bGVkLmRpdmBcblx0dGV4dC1kZWNvcmF0aW9uOiB1bmRlcmxpbmUgZG90dGVkO1xuYDtcbiJdfQ== */"));
  var TimeWrapper = /* @__PURE__ */ createStyled("div", false ? {
    target: "evcr2317"
  } : {
    target: "evcr2317",
    label: "TimeWrapper"
  })(false ? {
    name: "pd0mhc",
    styles: "direction:ltr;display:flex"
  } : {
    name: "pd0mhc",
    styles: "direction:ltr;display:flex/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnQ3FDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7XG5cdElucHV0LFxuXHRCYWNrZHJvcFVJLFxufSBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL3N0eWxlcy9pbnB1dC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgTnVtYmVyQ29udHJvbCBmcm9tICcuLi8uLi9udW1iZXItY29udHJvbCc7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Zm9udC1zaXplOiAkeyBDT05GSUcuZm9udFNpemUgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBGaWVsZHNldCA9IHN0eWxlZC5maWVsZHNldGBcblx0Ym9yZGVyOiAwO1xuXHRtYXJnaW46IDAgMCAkeyBzcGFjZSggMiAqIDIgKSB9IDA7XG5cdHBhZGRpbmc6IDA7XG5cblx0JjpsYXN0LWNoaWxkIHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVGltZVdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRkaXJlY3Rpb246IGx0cjtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbmNvbnN0IGJhc2VJbnB1dCA9IGNzc2Bcblx0JiYmICR7IElucHV0IH0ge1xuXHRcdHBhZGRpbmctbGVmdDogJHsgc3BhY2UoIDIgKSB9O1xuXHRcdHBhZGRpbmctcmlnaHQ6ICR7IHNwYWNlKCAyICkgfTtcblx0XHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBIb3Vyc0lucHV0ID0gc3R5bGVkKCBOdW1iZXJDb250cm9sIClgXG5cdCR7IGJhc2VJbnB1dCB9XG5cblx0d2lkdGg6ICR7IHNwYWNlKCA5ICkgfTtcblxuXHQmJiYgJHsgSW5wdXQgfSB7XG5cdFx0cGFkZGluZy1yaWdodDogMDtcblx0fVxuXG5cdCYmJiAkeyBCYWNrZHJvcFVJIH0ge1xuXHRcdGJvcmRlci1yaWdodDogMDtcblx0XHRib3JkZXItdG9wLXJpZ2h0LXJhZGl1czogMDtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogMDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFRpbWVTZXBhcmF0b3IgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXRvcDogJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gc29saWQgJHsgQ09MT1JTLmdyYXlbIDcwMCBdIH07XG5cdGJvcmRlci1ib3R0b206ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXHRmb250LXNpemU6ICR7IENPTkZJRy5mb250U2l6ZSB9O1xuXHRsaW5lLWhlaWdodDogY2FsYyhcblx0XHQkeyBDT05GSUcuY29udHJvbEhlaWdodCB9IC0gJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gKiAyXG5cdCk7XG5cdGRpc3BsYXk6IGlubGluZS1ibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBNaW51dGVzSW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JHsgYmFzZUlucHV0IH1cblxuXHR3aWR0aDogJHsgc3BhY2UoIDkgKSB9O1xuXG5cdCYmJiAkeyBJbnB1dCB9IHtcblx0XHRwYWRkaW5nLWxlZnQ6IDA7XG5cdH1cblxuXHQmJiYgJHsgQmFja2Ryb3BVSSB9IHtcblx0XHRib3JkZXItbGVmdDogMDtcblx0XHRib3JkZXItdG9wLWxlZnQtcmFkaXVzOiAwO1xuXHRcdGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDA7XG5cdH1cbmA7XG5cbi8vIElkZWFsbHkgd2Ugd291bGRuJ3QgbmVlZCBhIHdyYXBwZXIsIGJ1dCBjYW4ndCBvdGhlcndpc2UgdGFyZ2V0IHRoZVxuLy8gPEJhc2VDb250cm9sPiBpbiA8U2VsZWN0Q29udHJvbD5cbmV4cG9ydCBjb25zdCBNb250aFNlbGVjdFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRmbGV4LWdyb3c6IDE7XG5gO1xuXG5leHBvcnQgY29uc3QgRGF5SW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JHsgYmFzZUlucHV0IH1cblxuXHR3aWR0aDogJHsgc3BhY2UoIDkgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFllYXJJbnB1dCA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHQkeyBiYXNlSW5wdXQgfVxuXG5cdHdpZHRoOiAkeyBzcGFjZSggMTQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFRpbWVab25lID0gc3R5bGVkLmRpdmBcblx0dGV4dC1kZWNvcmF0aW9uOiB1bmRlcmxpbmUgZG90dGVkO1xuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__29
  });
  var baseInput = /* @__PURE__ */ css("&&& ", Input, "{padding-left:", space(2), ";padding-right:", space(2), ";text-align:center;}" + (false ? "" : ";label:baseInput;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQ3FCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7XG5cdElucHV0LFxuXHRCYWNrZHJvcFVJLFxufSBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL3N0eWxlcy9pbnB1dC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgTnVtYmVyQ29udHJvbCBmcm9tICcuLi8uLi9udW1iZXItY29udHJvbCc7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Zm9udC1zaXplOiAkeyBDT05GSUcuZm9udFNpemUgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBGaWVsZHNldCA9IHN0eWxlZC5maWVsZHNldGBcblx0Ym9yZGVyOiAwO1xuXHRtYXJnaW46IDAgMCAkeyBzcGFjZSggMiAqIDIgKSB9IDA7XG5cdHBhZGRpbmc6IDA7XG5cblx0JjpsYXN0LWNoaWxkIHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVGltZVdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRkaXJlY3Rpb246IGx0cjtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbmNvbnN0IGJhc2VJbnB1dCA9IGNzc2Bcblx0JiYmICR7IElucHV0IH0ge1xuXHRcdHBhZGRpbmctbGVmdDogJHsgc3BhY2UoIDIgKSB9O1xuXHRcdHBhZGRpbmctcmlnaHQ6ICR7IHNwYWNlKCAyICkgfTtcblx0XHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBIb3Vyc0lucHV0ID0gc3R5bGVkKCBOdW1iZXJDb250cm9sIClgXG5cdCR7IGJhc2VJbnB1dCB9XG5cblx0d2lkdGg6ICR7IHNwYWNlKCA5ICkgfTtcblxuXHQmJiYgJHsgSW5wdXQgfSB7XG5cdFx0cGFkZGluZy1yaWdodDogMDtcblx0fVxuXG5cdCYmJiAkeyBCYWNrZHJvcFVJIH0ge1xuXHRcdGJvcmRlci1yaWdodDogMDtcblx0XHRib3JkZXItdG9wLXJpZ2h0LXJhZGl1czogMDtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogMDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFRpbWVTZXBhcmF0b3IgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXRvcDogJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gc29saWQgJHsgQ09MT1JTLmdyYXlbIDcwMCBdIH07XG5cdGJvcmRlci1ib3R0b206ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXHRmb250LXNpemU6ICR7IENPTkZJRy5mb250U2l6ZSB9O1xuXHRsaW5lLWhlaWdodDogY2FsYyhcblx0XHQkeyBDT05GSUcuY29udHJvbEhlaWdodCB9IC0gJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gKiAyXG5cdCk7XG5cdGRpc3BsYXk6IGlubGluZS1ibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBNaW51dGVzSW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JHsgYmFzZUlucHV0IH1cblxuXHR3aWR0aDogJHsgc3BhY2UoIDkgKSB9O1xuXG5cdCYmJiAkeyBJbnB1dCB9IHtcblx0XHRwYWRkaW5nLWxlZnQ6IDA7XG5cdH1cblxuXHQmJiYgJHsgQmFja2Ryb3BVSSB9IHtcblx0XHRib3JkZXItbGVmdDogMDtcblx0XHRib3JkZXItdG9wLWxlZnQtcmFkaXVzOiAwO1xuXHRcdGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDA7XG5cdH1cbmA7XG5cbi8vIElkZWFsbHkgd2Ugd291bGRuJ3QgbmVlZCBhIHdyYXBwZXIsIGJ1dCBjYW4ndCBvdGhlcndpc2UgdGFyZ2V0IHRoZVxuLy8gPEJhc2VDb250cm9sPiBpbiA8U2VsZWN0Q29udHJvbD5cbmV4cG9ydCBjb25zdCBNb250aFNlbGVjdFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRmbGV4LWdyb3c6IDE7XG5gO1xuXG5leHBvcnQgY29uc3QgRGF5SW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JHsgYmFzZUlucHV0IH1cblxuXHR3aWR0aDogJHsgc3BhY2UoIDkgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFllYXJJbnB1dCA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHQkeyBiYXNlSW5wdXQgfVxuXG5cdHdpZHRoOiAkeyBzcGFjZSggMTQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFRpbWVab25lID0gc3R5bGVkLmRpdmBcblx0dGV4dC1kZWNvcmF0aW9uOiB1bmRlcmxpbmUgZG90dGVkO1xuYDtcbiJdfQ== */");
  var HoursInput = /* @__PURE__ */ createStyled(number_control_default, false ? {
    target: "evcr2316"
  } : {
    target: "evcr2316",
    label: "HoursInput"
  })(baseInput, " width:", space(9), ";&&& ", Input, "{padding-right:0;}&&& ", BackdropUI, "{border-right:0;border-top-right-radius:0;border-bottom-right-radius:0;}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE2Q2lEIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7XG5cdElucHV0LFxuXHRCYWNrZHJvcFVJLFxufSBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL3N0eWxlcy9pbnB1dC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgTnVtYmVyQ29udHJvbCBmcm9tICcuLi8uLi9udW1iZXItY29udHJvbCc7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Zm9udC1zaXplOiAkeyBDT05GSUcuZm9udFNpemUgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBGaWVsZHNldCA9IHN0eWxlZC5maWVsZHNldGBcblx0Ym9yZGVyOiAwO1xuXHRtYXJnaW46IDAgMCAkeyBzcGFjZSggMiAqIDIgKSB9IDA7XG5cdHBhZGRpbmc6IDA7XG5cblx0JjpsYXN0LWNoaWxkIHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVGltZVdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRkaXJlY3Rpb246IGx0cjtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbmNvbnN0IGJhc2VJbnB1dCA9IGNzc2Bcblx0JiYmICR7IElucHV0IH0ge1xuXHRcdHBhZGRpbmctbGVmdDogJHsgc3BhY2UoIDIgKSB9O1xuXHRcdHBhZGRpbmctcmlnaHQ6ICR7IHNwYWNlKCAyICkgfTtcblx0XHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBIb3Vyc0lucHV0ID0gc3R5bGVkKCBOdW1iZXJDb250cm9sIClgXG5cdCR7IGJhc2VJbnB1dCB9XG5cblx0d2lkdGg6ICR7IHNwYWNlKCA5ICkgfTtcblxuXHQmJiYgJHsgSW5wdXQgfSB7XG5cdFx0cGFkZGluZy1yaWdodDogMDtcblx0fVxuXG5cdCYmJiAkeyBCYWNrZHJvcFVJIH0ge1xuXHRcdGJvcmRlci1yaWdodDogMDtcblx0XHRib3JkZXItdG9wLXJpZ2h0LXJhZGl1czogMDtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogMDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFRpbWVTZXBhcmF0b3IgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXRvcDogJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gc29saWQgJHsgQ09MT1JTLmdyYXlbIDcwMCBdIH07XG5cdGJvcmRlci1ib3R0b206ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXHRmb250LXNpemU6ICR7IENPTkZJRy5mb250U2l6ZSB9O1xuXHRsaW5lLWhlaWdodDogY2FsYyhcblx0XHQkeyBDT05GSUcuY29udHJvbEhlaWdodCB9IC0gJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gKiAyXG5cdCk7XG5cdGRpc3BsYXk6IGlubGluZS1ibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBNaW51dGVzSW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JHsgYmFzZUlucHV0IH1cblxuXHR3aWR0aDogJHsgc3BhY2UoIDkgKSB9O1xuXG5cdCYmJiAkeyBJbnB1dCB9IHtcblx0XHRwYWRkaW5nLWxlZnQ6IDA7XG5cdH1cblxuXHQmJiYgJHsgQmFja2Ryb3BVSSB9IHtcblx0XHRib3JkZXItbGVmdDogMDtcblx0XHRib3JkZXItdG9wLWxlZnQtcmFkaXVzOiAwO1xuXHRcdGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDA7XG5cdH1cbmA7XG5cbi8vIElkZWFsbHkgd2Ugd291bGRuJ3QgbmVlZCBhIHdyYXBwZXIsIGJ1dCBjYW4ndCBvdGhlcndpc2UgdGFyZ2V0IHRoZVxuLy8gPEJhc2VDb250cm9sPiBpbiA8U2VsZWN0Q29udHJvbD5cbmV4cG9ydCBjb25zdCBNb250aFNlbGVjdFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRmbGV4LWdyb3c6IDE7XG5gO1xuXG5leHBvcnQgY29uc3QgRGF5SW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JHsgYmFzZUlucHV0IH1cblxuXHR3aWR0aDogJHsgc3BhY2UoIDkgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFllYXJJbnB1dCA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHQkeyBiYXNlSW5wdXQgfVxuXG5cdHdpZHRoOiAkeyBzcGFjZSggMTQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFRpbWVab25lID0gc3R5bGVkLmRpdmBcblx0dGV4dC1kZWNvcmF0aW9uOiB1bmRlcmxpbmUgZG90dGVkO1xuYDtcbiJdfQ== */"));
  var TimeSeparator = /* @__PURE__ */ createStyled("span", false ? {
    target: "evcr2315"
  } : {
    target: "evcr2315",
    label: "TimeSeparator"
  })("border-top:", config_values_default.borderWidth, " solid ", COLORS.gray[700], ";border-bottom:", config_values_default.borderWidth, " solid ", COLORS.gray[700], ";font-size:", config_values_default.fontSize, ";line-height:calc(\n		", config_values_default.controlHeight, " - ", config_values_default.borderWidth, " * 2\n	);display:inline-block;" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE2RHdDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7XG5cdElucHV0LFxuXHRCYWNrZHJvcFVJLFxufSBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL3N0eWxlcy9pbnB1dC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgTnVtYmVyQ29udHJvbCBmcm9tICcuLi8uLi9udW1iZXItY29udHJvbCc7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Zm9udC1zaXplOiAkeyBDT05GSUcuZm9udFNpemUgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBGaWVsZHNldCA9IHN0eWxlZC5maWVsZHNldGBcblx0Ym9yZGVyOiAwO1xuXHRtYXJnaW46IDAgMCAkeyBzcGFjZSggMiAqIDIgKSB9IDA7XG5cdHBhZGRpbmc6IDA7XG5cblx0JjpsYXN0LWNoaWxkIHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVGltZVdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRkaXJlY3Rpb246IGx0cjtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbmNvbnN0IGJhc2VJbnB1dCA9IGNzc2Bcblx0JiYmICR7IElucHV0IH0ge1xuXHRcdHBhZGRpbmctbGVmdDogJHsgc3BhY2UoIDIgKSB9O1xuXHRcdHBhZGRpbmctcmlnaHQ6ICR7IHNwYWNlKCAyICkgfTtcblx0XHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBIb3Vyc0lucHV0ID0gc3R5bGVkKCBOdW1iZXJDb250cm9sIClgXG5cdCR7IGJhc2VJbnB1dCB9XG5cblx0d2lkdGg6ICR7IHNwYWNlKCA5ICkgfTtcblxuXHQmJiYgJHsgSW5wdXQgfSB7XG5cdFx0cGFkZGluZy1yaWdodDogMDtcblx0fVxuXG5cdCYmJiAkeyBCYWNrZHJvcFVJIH0ge1xuXHRcdGJvcmRlci1yaWdodDogMDtcblx0XHRib3JkZXItdG9wLXJpZ2h0LXJhZGl1czogMDtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogMDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFRpbWVTZXBhcmF0b3IgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXRvcDogJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gc29saWQgJHsgQ09MT1JTLmdyYXlbIDcwMCBdIH07XG5cdGJvcmRlci1ib3R0b206ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXHRmb250LXNpemU6ICR7IENPTkZJRy5mb250U2l6ZSB9O1xuXHRsaW5lLWhlaWdodDogY2FsYyhcblx0XHQkeyBDT05GSUcuY29udHJvbEhlaWdodCB9IC0gJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gKiAyXG5cdCk7XG5cdGRpc3BsYXk6IGlubGluZS1ibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBNaW51dGVzSW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JHsgYmFzZUlucHV0IH1cblxuXHR3aWR0aDogJHsgc3BhY2UoIDkgKSB9O1xuXG5cdCYmJiAkeyBJbnB1dCB9IHtcblx0XHRwYWRkaW5nLWxlZnQ6IDA7XG5cdH1cblxuXHQmJiYgJHsgQmFja2Ryb3BVSSB9IHtcblx0XHRib3JkZXItbGVmdDogMDtcblx0XHRib3JkZXItdG9wLWxlZnQtcmFkaXVzOiAwO1xuXHRcdGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDA7XG5cdH1cbmA7XG5cbi8vIElkZWFsbHkgd2Ugd291bGRuJ3QgbmVlZCBhIHdyYXBwZXIsIGJ1dCBjYW4ndCBvdGhlcndpc2UgdGFyZ2V0IHRoZVxuLy8gPEJhc2VDb250cm9sPiBpbiA8U2VsZWN0Q29udHJvbD5cbmV4cG9ydCBjb25zdCBNb250aFNlbGVjdFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRmbGV4LWdyb3c6IDE7XG5gO1xuXG5leHBvcnQgY29uc3QgRGF5SW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JHsgYmFzZUlucHV0IH1cblxuXHR3aWR0aDogJHsgc3BhY2UoIDkgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFllYXJJbnB1dCA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHQkeyBiYXNlSW5wdXQgfVxuXG5cdHdpZHRoOiAkeyBzcGFjZSggMTQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFRpbWVab25lID0gc3R5bGVkLmRpdmBcblx0dGV4dC1kZWNvcmF0aW9uOiB1bmRlcmxpbmUgZG90dGVkO1xuYDtcbiJdfQ== */"));
  var MinutesInput = /* @__PURE__ */ createStyled(number_control_default, false ? {
    target: "evcr2314"
  } : {
    target: "evcr2314",
    label: "MinutesInput"
  })(baseInput, " width:", space(9), ";&&& ", Input, "{padding-left:0;}&&& ", BackdropUI, "{border-left:0;border-top-left-radius:0;border-bottom-left-radius:0;}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1RW1EIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7XG5cdElucHV0LFxuXHRCYWNrZHJvcFVJLFxufSBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL3N0eWxlcy9pbnB1dC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgTnVtYmVyQ29udHJvbCBmcm9tICcuLi8uLi9udW1iZXItY29udHJvbCc7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Zm9udC1zaXplOiAkeyBDT05GSUcuZm9udFNpemUgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBGaWVsZHNldCA9IHN0eWxlZC5maWVsZHNldGBcblx0Ym9yZGVyOiAwO1xuXHRtYXJnaW46IDAgMCAkeyBzcGFjZSggMiAqIDIgKSB9IDA7XG5cdHBhZGRpbmc6IDA7XG5cblx0JjpsYXN0LWNoaWxkIHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVGltZVdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRkaXJlY3Rpb246IGx0cjtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbmNvbnN0IGJhc2VJbnB1dCA9IGNzc2Bcblx0JiYmICR7IElucHV0IH0ge1xuXHRcdHBhZGRpbmctbGVmdDogJHsgc3BhY2UoIDIgKSB9O1xuXHRcdHBhZGRpbmctcmlnaHQ6ICR7IHNwYWNlKCAyICkgfTtcblx0XHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBIb3Vyc0lucHV0ID0gc3R5bGVkKCBOdW1iZXJDb250cm9sIClgXG5cdCR7IGJhc2VJbnB1dCB9XG5cblx0d2lkdGg6ICR7IHNwYWNlKCA5ICkgfTtcblxuXHQmJiYgJHsgSW5wdXQgfSB7XG5cdFx0cGFkZGluZy1yaWdodDogMDtcblx0fVxuXG5cdCYmJiAkeyBCYWNrZHJvcFVJIH0ge1xuXHRcdGJvcmRlci1yaWdodDogMDtcblx0XHRib3JkZXItdG9wLXJpZ2h0LXJhZGl1czogMDtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogMDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFRpbWVTZXBhcmF0b3IgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXRvcDogJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gc29saWQgJHsgQ09MT1JTLmdyYXlbIDcwMCBdIH07XG5cdGJvcmRlci1ib3R0b206ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXHRmb250LXNpemU6ICR7IENPTkZJRy5mb250U2l6ZSB9O1xuXHRsaW5lLWhlaWdodDogY2FsYyhcblx0XHQkeyBDT05GSUcuY29udHJvbEhlaWdodCB9IC0gJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gKiAyXG5cdCk7XG5cdGRpc3BsYXk6IGlubGluZS1ibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBNaW51dGVzSW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JHsgYmFzZUlucHV0IH1cblxuXHR3aWR0aDogJHsgc3BhY2UoIDkgKSB9O1xuXG5cdCYmJiAkeyBJbnB1dCB9IHtcblx0XHRwYWRkaW5nLWxlZnQ6IDA7XG5cdH1cblxuXHQmJiYgJHsgQmFja2Ryb3BVSSB9IHtcblx0XHRib3JkZXItbGVmdDogMDtcblx0XHRib3JkZXItdG9wLWxlZnQtcmFkaXVzOiAwO1xuXHRcdGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDA7XG5cdH1cbmA7XG5cbi8vIElkZWFsbHkgd2Ugd291bGRuJ3QgbmVlZCBhIHdyYXBwZXIsIGJ1dCBjYW4ndCBvdGhlcndpc2UgdGFyZ2V0IHRoZVxuLy8gPEJhc2VDb250cm9sPiBpbiA8U2VsZWN0Q29udHJvbD5cbmV4cG9ydCBjb25zdCBNb250aFNlbGVjdFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRmbGV4LWdyb3c6IDE7XG5gO1xuXG5leHBvcnQgY29uc3QgRGF5SW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JHsgYmFzZUlucHV0IH1cblxuXHR3aWR0aDogJHsgc3BhY2UoIDkgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFllYXJJbnB1dCA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHQkeyBiYXNlSW5wdXQgfVxuXG5cdHdpZHRoOiAkeyBzcGFjZSggMTQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFRpbWVab25lID0gc3R5bGVkLmRpdmBcblx0dGV4dC1kZWNvcmF0aW9uOiB1bmRlcmxpbmUgZG90dGVkO1xuYDtcbiJdfQ== */"));
  var MonthSelectWrapper = /* @__PURE__ */ createStyled("div", false ? {
    target: "evcr2313"
  } : {
    target: "evcr2313",
    label: "MonthSelectWrapper"
  })(false ? {
    name: "1ff36h2",
    styles: "flex-grow:1"
  } : {
    name: "1ff36h2",
    styles: "flex-grow:1/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF5RjRDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7XG5cdElucHV0LFxuXHRCYWNrZHJvcFVJLFxufSBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL3N0eWxlcy9pbnB1dC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgTnVtYmVyQ29udHJvbCBmcm9tICcuLi8uLi9udW1iZXItY29udHJvbCc7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Zm9udC1zaXplOiAkeyBDT05GSUcuZm9udFNpemUgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBGaWVsZHNldCA9IHN0eWxlZC5maWVsZHNldGBcblx0Ym9yZGVyOiAwO1xuXHRtYXJnaW46IDAgMCAkeyBzcGFjZSggMiAqIDIgKSB9IDA7XG5cdHBhZGRpbmc6IDA7XG5cblx0JjpsYXN0LWNoaWxkIHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVGltZVdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRkaXJlY3Rpb246IGx0cjtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbmNvbnN0IGJhc2VJbnB1dCA9IGNzc2Bcblx0JiYmICR7IElucHV0IH0ge1xuXHRcdHBhZGRpbmctbGVmdDogJHsgc3BhY2UoIDIgKSB9O1xuXHRcdHBhZGRpbmctcmlnaHQ6ICR7IHNwYWNlKCAyICkgfTtcblx0XHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBIb3Vyc0lucHV0ID0gc3R5bGVkKCBOdW1iZXJDb250cm9sIClgXG5cdCR7IGJhc2VJbnB1dCB9XG5cblx0d2lkdGg6ICR7IHNwYWNlKCA5ICkgfTtcblxuXHQmJiYgJHsgSW5wdXQgfSB7XG5cdFx0cGFkZGluZy1yaWdodDogMDtcblx0fVxuXG5cdCYmJiAkeyBCYWNrZHJvcFVJIH0ge1xuXHRcdGJvcmRlci1yaWdodDogMDtcblx0XHRib3JkZXItdG9wLXJpZ2h0LXJhZGl1czogMDtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogMDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFRpbWVTZXBhcmF0b3IgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXRvcDogJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gc29saWQgJHsgQ09MT1JTLmdyYXlbIDcwMCBdIH07XG5cdGJvcmRlci1ib3R0b206ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXHRmb250LXNpemU6ICR7IENPTkZJRy5mb250U2l6ZSB9O1xuXHRsaW5lLWhlaWdodDogY2FsYyhcblx0XHQkeyBDT05GSUcuY29udHJvbEhlaWdodCB9IC0gJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gKiAyXG5cdCk7XG5cdGRpc3BsYXk6IGlubGluZS1ibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBNaW51dGVzSW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JHsgYmFzZUlucHV0IH1cblxuXHR3aWR0aDogJHsgc3BhY2UoIDkgKSB9O1xuXG5cdCYmJiAkeyBJbnB1dCB9IHtcblx0XHRwYWRkaW5nLWxlZnQ6IDA7XG5cdH1cblxuXHQmJiYgJHsgQmFja2Ryb3BVSSB9IHtcblx0XHRib3JkZXItbGVmdDogMDtcblx0XHRib3JkZXItdG9wLWxlZnQtcmFkaXVzOiAwO1xuXHRcdGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDA7XG5cdH1cbmA7XG5cbi8vIElkZWFsbHkgd2Ugd291bGRuJ3QgbmVlZCBhIHdyYXBwZXIsIGJ1dCBjYW4ndCBvdGhlcndpc2UgdGFyZ2V0IHRoZVxuLy8gPEJhc2VDb250cm9sPiBpbiA8U2VsZWN0Q29udHJvbD5cbmV4cG9ydCBjb25zdCBNb250aFNlbGVjdFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRmbGV4LWdyb3c6IDE7XG5gO1xuXG5leHBvcnQgY29uc3QgRGF5SW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JHsgYmFzZUlucHV0IH1cblxuXHR3aWR0aDogJHsgc3BhY2UoIDkgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFllYXJJbnB1dCA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHQkeyBiYXNlSW5wdXQgfVxuXG5cdHdpZHRoOiAkeyBzcGFjZSggMTQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFRpbWVab25lID0gc3R5bGVkLmRpdmBcblx0dGV4dC1kZWNvcmF0aW9uOiB1bmRlcmxpbmUgZG90dGVkO1xuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__29
  });
  var DayInput = /* @__PURE__ */ createStyled(number_control_default, false ? {
    target: "evcr2312"
  } : {
    target: "evcr2312",
    label: "DayInput"
  })(baseInput, " width:", space(9), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE2RitDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7XG5cdElucHV0LFxuXHRCYWNrZHJvcFVJLFxufSBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL3N0eWxlcy9pbnB1dC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgTnVtYmVyQ29udHJvbCBmcm9tICcuLi8uLi9udW1iZXItY29udHJvbCc7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Zm9udC1zaXplOiAkeyBDT05GSUcuZm9udFNpemUgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBGaWVsZHNldCA9IHN0eWxlZC5maWVsZHNldGBcblx0Ym9yZGVyOiAwO1xuXHRtYXJnaW46IDAgMCAkeyBzcGFjZSggMiAqIDIgKSB9IDA7XG5cdHBhZGRpbmc6IDA7XG5cblx0JjpsYXN0LWNoaWxkIHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVGltZVdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRkaXJlY3Rpb246IGx0cjtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbmNvbnN0IGJhc2VJbnB1dCA9IGNzc2Bcblx0JiYmICR7IElucHV0IH0ge1xuXHRcdHBhZGRpbmctbGVmdDogJHsgc3BhY2UoIDIgKSB9O1xuXHRcdHBhZGRpbmctcmlnaHQ6ICR7IHNwYWNlKCAyICkgfTtcblx0XHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBIb3Vyc0lucHV0ID0gc3R5bGVkKCBOdW1iZXJDb250cm9sIClgXG5cdCR7IGJhc2VJbnB1dCB9XG5cblx0d2lkdGg6ICR7IHNwYWNlKCA5ICkgfTtcblxuXHQmJiYgJHsgSW5wdXQgfSB7XG5cdFx0cGFkZGluZy1yaWdodDogMDtcblx0fVxuXG5cdCYmJiAkeyBCYWNrZHJvcFVJIH0ge1xuXHRcdGJvcmRlci1yaWdodDogMDtcblx0XHRib3JkZXItdG9wLXJpZ2h0LXJhZGl1czogMDtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogMDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFRpbWVTZXBhcmF0b3IgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXRvcDogJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gc29saWQgJHsgQ09MT1JTLmdyYXlbIDcwMCBdIH07XG5cdGJvcmRlci1ib3R0b206ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXHRmb250LXNpemU6ICR7IENPTkZJRy5mb250U2l6ZSB9O1xuXHRsaW5lLWhlaWdodDogY2FsYyhcblx0XHQkeyBDT05GSUcuY29udHJvbEhlaWdodCB9IC0gJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gKiAyXG5cdCk7XG5cdGRpc3BsYXk6IGlubGluZS1ibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBNaW51dGVzSW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JHsgYmFzZUlucHV0IH1cblxuXHR3aWR0aDogJHsgc3BhY2UoIDkgKSB9O1xuXG5cdCYmJiAkeyBJbnB1dCB9IHtcblx0XHRwYWRkaW5nLWxlZnQ6IDA7XG5cdH1cblxuXHQmJiYgJHsgQmFja2Ryb3BVSSB9IHtcblx0XHRib3JkZXItbGVmdDogMDtcblx0XHRib3JkZXItdG9wLWxlZnQtcmFkaXVzOiAwO1xuXHRcdGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDA7XG5cdH1cbmA7XG5cbi8vIElkZWFsbHkgd2Ugd291bGRuJ3QgbmVlZCBhIHdyYXBwZXIsIGJ1dCBjYW4ndCBvdGhlcndpc2UgdGFyZ2V0IHRoZVxuLy8gPEJhc2VDb250cm9sPiBpbiA8U2VsZWN0Q29udHJvbD5cbmV4cG9ydCBjb25zdCBNb250aFNlbGVjdFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRmbGV4LWdyb3c6IDE7XG5gO1xuXG5leHBvcnQgY29uc3QgRGF5SW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JHsgYmFzZUlucHV0IH1cblxuXHR3aWR0aDogJHsgc3BhY2UoIDkgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFllYXJJbnB1dCA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHQkeyBiYXNlSW5wdXQgfVxuXG5cdHdpZHRoOiAkeyBzcGFjZSggMTQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFRpbWVab25lID0gc3R5bGVkLmRpdmBcblx0dGV4dC1kZWNvcmF0aW9uOiB1bmRlcmxpbmUgZG90dGVkO1xuYDtcbiJdfQ== */"));
  var YearInput = /* @__PURE__ */ createStyled(number_control_default, false ? {
    target: "evcr2311"
  } : {
    target: "evcr2311",
    label: "YearInput"
  })(baseInput, " width:", space(14), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtR2dEIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7XG5cdElucHV0LFxuXHRCYWNrZHJvcFVJLFxufSBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL3N0eWxlcy9pbnB1dC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgTnVtYmVyQ29udHJvbCBmcm9tICcuLi8uLi9udW1iZXItY29udHJvbCc7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Zm9udC1zaXplOiAkeyBDT05GSUcuZm9udFNpemUgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBGaWVsZHNldCA9IHN0eWxlZC5maWVsZHNldGBcblx0Ym9yZGVyOiAwO1xuXHRtYXJnaW46IDAgMCAkeyBzcGFjZSggMiAqIDIgKSB9IDA7XG5cdHBhZGRpbmc6IDA7XG5cblx0JjpsYXN0LWNoaWxkIHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVGltZVdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRkaXJlY3Rpb246IGx0cjtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbmNvbnN0IGJhc2VJbnB1dCA9IGNzc2Bcblx0JiYmICR7IElucHV0IH0ge1xuXHRcdHBhZGRpbmctbGVmdDogJHsgc3BhY2UoIDIgKSB9O1xuXHRcdHBhZGRpbmctcmlnaHQ6ICR7IHNwYWNlKCAyICkgfTtcblx0XHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBIb3Vyc0lucHV0ID0gc3R5bGVkKCBOdW1iZXJDb250cm9sIClgXG5cdCR7IGJhc2VJbnB1dCB9XG5cblx0d2lkdGg6ICR7IHNwYWNlKCA5ICkgfTtcblxuXHQmJiYgJHsgSW5wdXQgfSB7XG5cdFx0cGFkZGluZy1yaWdodDogMDtcblx0fVxuXG5cdCYmJiAkeyBCYWNrZHJvcFVJIH0ge1xuXHRcdGJvcmRlci1yaWdodDogMDtcblx0XHRib3JkZXItdG9wLXJpZ2h0LXJhZGl1czogMDtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogMDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFRpbWVTZXBhcmF0b3IgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXRvcDogJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gc29saWQgJHsgQ09MT1JTLmdyYXlbIDcwMCBdIH07XG5cdGJvcmRlci1ib3R0b206ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXHRmb250LXNpemU6ICR7IENPTkZJRy5mb250U2l6ZSB9O1xuXHRsaW5lLWhlaWdodDogY2FsYyhcblx0XHQkeyBDT05GSUcuY29udHJvbEhlaWdodCB9IC0gJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gKiAyXG5cdCk7XG5cdGRpc3BsYXk6IGlubGluZS1ibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBNaW51dGVzSW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JHsgYmFzZUlucHV0IH1cblxuXHR3aWR0aDogJHsgc3BhY2UoIDkgKSB9O1xuXG5cdCYmJiAkeyBJbnB1dCB9IHtcblx0XHRwYWRkaW5nLWxlZnQ6IDA7XG5cdH1cblxuXHQmJiYgJHsgQmFja2Ryb3BVSSB9IHtcblx0XHRib3JkZXItbGVmdDogMDtcblx0XHRib3JkZXItdG9wLWxlZnQtcmFkaXVzOiAwO1xuXHRcdGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDA7XG5cdH1cbmA7XG5cbi8vIElkZWFsbHkgd2Ugd291bGRuJ3QgbmVlZCBhIHdyYXBwZXIsIGJ1dCBjYW4ndCBvdGhlcndpc2UgdGFyZ2V0IHRoZVxuLy8gPEJhc2VDb250cm9sPiBpbiA8U2VsZWN0Q29udHJvbD5cbmV4cG9ydCBjb25zdCBNb250aFNlbGVjdFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRmbGV4LWdyb3c6IDE7XG5gO1xuXG5leHBvcnQgY29uc3QgRGF5SW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JHsgYmFzZUlucHV0IH1cblxuXHR3aWR0aDogJHsgc3BhY2UoIDkgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFllYXJJbnB1dCA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHQkeyBiYXNlSW5wdXQgfVxuXG5cdHdpZHRoOiAkeyBzcGFjZSggMTQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFRpbWVab25lID0gc3R5bGVkLmRpdmBcblx0dGV4dC1kZWNvcmF0aW9uOiB1bmRlcmxpbmUgZG90dGVkO1xuYDtcbiJdfQ== */"));
  var TimeZone = /* @__PURE__ */ createStyled("div", false ? {
    target: "evcr2310"
  } : {
    target: "evcr2310",
    label: "TimeZone"
  })(false ? {
    name: "ebu3jh",
    styles: "text-decoration:underline dotted"
  } : {
    name: "ebu3jh",
    styles: "text-decoration:underline dotted/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF5R2tDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7XG5cdElucHV0LFxuXHRCYWNrZHJvcFVJLFxufSBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sL3N0eWxlcy9pbnB1dC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgTnVtYmVyQ29udHJvbCBmcm9tICcuLi8uLi9udW1iZXItY29udHJvbCc7XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0Zm9udC1zaXplOiAkeyBDT05GSUcuZm9udFNpemUgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBGaWVsZHNldCA9IHN0eWxlZC5maWVsZHNldGBcblx0Ym9yZGVyOiAwO1xuXHRtYXJnaW46IDAgMCAkeyBzcGFjZSggMiAqIDIgKSB9IDA7XG5cdHBhZGRpbmc6IDA7XG5cblx0JjpsYXN0LWNoaWxkIHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVGltZVdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRkaXJlY3Rpb246IGx0cjtcblx0ZGlzcGxheTogZmxleDtcbmA7XG5cbmNvbnN0IGJhc2VJbnB1dCA9IGNzc2Bcblx0JiYmICR7IElucHV0IH0ge1xuXHRcdHBhZGRpbmctbGVmdDogJHsgc3BhY2UoIDIgKSB9O1xuXHRcdHBhZGRpbmctcmlnaHQ6ICR7IHNwYWNlKCAyICkgfTtcblx0XHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBIb3Vyc0lucHV0ID0gc3R5bGVkKCBOdW1iZXJDb250cm9sIClgXG5cdCR7IGJhc2VJbnB1dCB9XG5cblx0d2lkdGg6ICR7IHNwYWNlKCA5ICkgfTtcblxuXHQmJiYgJHsgSW5wdXQgfSB7XG5cdFx0cGFkZGluZy1yaWdodDogMDtcblx0fVxuXG5cdCYmJiAkeyBCYWNrZHJvcFVJIH0ge1xuXHRcdGJvcmRlci1yaWdodDogMDtcblx0XHRib3JkZXItdG9wLXJpZ2h0LXJhZGl1czogMDtcblx0XHRib3JkZXItYm90dG9tLXJpZ2h0LXJhZGl1czogMDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFRpbWVTZXBhcmF0b3IgPSBzdHlsZWQuc3BhbmBcblx0Ym9yZGVyLXRvcDogJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gc29saWQgJHsgQ09MT1JTLmdyYXlbIDcwMCBdIH07XG5cdGJvcmRlci1ib3R0b206ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXHRmb250LXNpemU6ICR7IENPTkZJRy5mb250U2l6ZSB9O1xuXHRsaW5lLWhlaWdodDogY2FsYyhcblx0XHQkeyBDT05GSUcuY29udHJvbEhlaWdodCB9IC0gJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gKiAyXG5cdCk7XG5cdGRpc3BsYXk6IGlubGluZS1ibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBNaW51dGVzSW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JHsgYmFzZUlucHV0IH1cblxuXHR3aWR0aDogJHsgc3BhY2UoIDkgKSB9O1xuXG5cdCYmJiAkeyBJbnB1dCB9IHtcblx0XHRwYWRkaW5nLWxlZnQ6IDA7XG5cdH1cblxuXHQmJiYgJHsgQmFja2Ryb3BVSSB9IHtcblx0XHRib3JkZXItbGVmdDogMDtcblx0XHRib3JkZXItdG9wLWxlZnQtcmFkaXVzOiAwO1xuXHRcdGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDA7XG5cdH1cbmA7XG5cbi8vIElkZWFsbHkgd2Ugd291bGRuJ3QgbmVlZCBhIHdyYXBwZXIsIGJ1dCBjYW4ndCBvdGhlcndpc2UgdGFyZ2V0IHRoZVxuLy8gPEJhc2VDb250cm9sPiBpbiA8U2VsZWN0Q29udHJvbD5cbmV4cG9ydCBjb25zdCBNb250aFNlbGVjdFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRmbGV4LWdyb3c6IDE7XG5gO1xuXG5leHBvcnQgY29uc3QgRGF5SW5wdXQgPSBzdHlsZWQoIE51bWJlckNvbnRyb2wgKWBcblx0JHsgYmFzZUlucHV0IH1cblxuXHR3aWR0aDogJHsgc3BhY2UoIDkgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFllYXJJbnB1dCA9IHN0eWxlZCggTnVtYmVyQ29udHJvbCApYFxuXHQkeyBiYXNlSW5wdXQgfVxuXG5cdHdpZHRoOiAkeyBzcGFjZSggMTQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFRpbWVab25lID0gc3R5bGVkLmRpdmBcblx0dGV4dC1kZWNvcmF0aW9uOiB1bmRlcmxpbmUgZG90dGVkO1xuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__29
  });

  // packages/components/build-module/date-time/time/timezone.mjs
  var import_jsx_runtime194 = __toESM(require_jsx_runtime(), 1);
  var TimeZone2 = () => {
    const {
      timezone
    } = (0, import_date4.getSettings)();
    const userTimezoneOffset = -1 * ((/* @__PURE__ */ new Date()).getTimezoneOffset() / 60);
    if (Number(timezone.offset) === userTimezoneOffset) {
      return null;
    }
    const offsetSymbol = Number(timezone.offset) >= 0 ? "+" : "";
    const zoneAbbr = "" !== timezone.abbr && isNaN(Number(timezone.abbr)) ? timezone.abbr : `UTC${offsetSymbol}${timezone.offsetFormatted}`;
    const prettyTimezoneString = timezone.string.replace("_", " ");
    const timezoneDetail = "UTC" === timezone.string ? (0, import_i18n43.__)("Coordinated Universal Time") : `(${zoneAbbr}) ${prettyTimezoneString}`;
    const hasNoAdditionalTimezoneDetail = prettyTimezoneString.trim().length === 0;
    return hasNoAdditionalTimezoneDetail ? /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(TimeZone, {
      className: "components-datetime__timezone",
      children: zoneAbbr
    }) : /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(tooltip_default, {
      placement: "top",
      text: timezoneDetail,
      children: /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(TimeZone, {
        className: "components-datetime__timezone",
        children: zoneAbbr
      })
    });
  };
  var timezone_default = TimeZone2;

  // packages/components/build-module/date-time/time/time-input/index.mjs
  var import_i18n44 = __toESM(require_i18n(), 1);
  var import_element129 = __toESM(require_element(), 1);
  var import_jsx_runtime195 = __toESM(require_jsx_runtime(), 1);
  function TimeInput({
    value: valueProp,
    defaultValue: defaultValue2,
    is12Hour,
    label,
    minutesProps,
    onChange
  }) {
    const [value = {
      hours: (/* @__PURE__ */ new Date()).getHours(),
      minutes: (/* @__PURE__ */ new Date()).getMinutes()
    }, setValue] = useControlledValue({
      value: valueProp,
      onChange,
      defaultValue: defaultValue2
    });
    const dayPeriod = parseDayPeriod(value.hours);
    const hours12Format = from24hTo12h(value.hours);
    const buildNumberControlChangeCallback = (method) => {
      return (_value, {
        event
      }) => {
        if (!validateInputElementTarget(event)) {
          return;
        }
        const numberValue = Number(_value);
        setValue({
          ...value,
          [method]: method === "hours" && is12Hour ? from12hTo24h(numberValue, dayPeriod === "PM") : numberValue
        });
      };
    };
    const buildAmPmChangeCallback = (_value) => {
      return () => {
        if (dayPeriod === _value) {
          return;
        }
        setValue({
          ...value,
          hours: from12hTo24h(hours12Format, _value === "PM")
        });
      };
    };
    function parseDayPeriod(_hours) {
      return _hours < 12 ? "AM" : "PM";
    }
    const Wrapper7 = label ? Fieldset : import_element129.Fragment;
    return /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)(Wrapper7, {
      children: [label && /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(base_control_default.VisualLabel, {
        as: "legend",
        children: label
      }), /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)(component_default9, {
        alignment: "left",
        expanded: false,
        children: [/* @__PURE__ */ (0, import_jsx_runtime195.jsxs)(TimeWrapper, {
          className: "components-datetime__time-field components-datetime__time-field-time",
          children: [/* @__PURE__ */ (0, import_jsx_runtime195.jsx)(HoursInput, {
            className: "components-datetime__time-field-hours-input",
            label: (0, import_i18n44.__)("Hours"),
            hideLabelFromVision: true,
            __next40pxDefaultSize: true,
            value: String(is12Hour ? hours12Format : value.hours).padStart(2, "0"),
            step: 1,
            min: is12Hour ? 1 : 0,
            max: is12Hour ? 12 : 23,
            required: true,
            spinControls: "none",
            isPressEnterToChange: true,
            isDragEnabled: false,
            isShiftStepEnabled: false,
            onChange: buildNumberControlChangeCallback("hours"),
            __unstableStateReducer: buildPadInputStateReducer(2)
          }), /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(TimeSeparator, {
            className: "components-datetime__time-separator",
            "aria-hidden": "true",
            children: ":"
          }), /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(MinutesInput, {
            className: clsx_default(
              "components-datetime__time-field-minutes-input",
              // Unused, for backwards compatibility.
              minutesProps?.className
            ),
            label: (0, import_i18n44.__)("Minutes"),
            hideLabelFromVision: true,
            __next40pxDefaultSize: true,
            value: String(value.minutes).padStart(2, "0"),
            step: 1,
            min: 0,
            max: 59,
            required: true,
            spinControls: "none",
            isPressEnterToChange: true,
            isDragEnabled: false,
            isShiftStepEnabled: false,
            onChange: (...args) => {
              buildNumberControlChangeCallback("minutes")(...args);
              minutesProps?.onChange?.(...args);
            },
            __unstableStateReducer: buildPadInputStateReducer(2),
            ...minutesProps
          })]
        }), is12Hour && /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)(component_default12, {
          __next40pxDefaultSize: true,
          isBlock: true,
          label: (0, import_i18n44.__)("Select AM or PM"),
          hideLabelFromVision: true,
          value: dayPeriod,
          onChange: (newValue) => {
            buildAmPmChangeCallback(newValue)();
          },
          children: [/* @__PURE__ */ (0, import_jsx_runtime195.jsx)(component_default14, {
            value: "AM",
            label: (0, import_i18n44.__)("AM")
          }), /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(component_default14, {
            value: "PM",
            label: (0, import_i18n44.__)("PM")
          })]
        })]
      })]
    });
  }

  // packages/components/build-module/date-time/time/index.mjs
  var import_jsx_runtime196 = __toESM(require_jsx_runtime(), 1);
  var VALID_DATE_ORDERS = ["dmy", "mdy", "ymd"];
  function TimePicker({
    is12Hour,
    currentTime,
    onChange,
    dateOrder: dateOrderProp,
    hideLabelFromVision = false
  }) {
    const [date, setDate] = (0, import_element130.useState)(() => (
      // Truncate the date at the minutes, see: #15495.
      startOfMinute(inputToDate(currentTime ?? /* @__PURE__ */ new Date()))
    ));
    (0, import_element130.useEffect)(() => {
      setDate(startOfMinute(inputToDate(currentTime ?? /* @__PURE__ */ new Date())));
    }, [currentTime]);
    const monthOptions = [{
      value: "01",
      label: (0, import_i18n45.__)("January")
    }, {
      value: "02",
      label: (0, import_i18n45.__)("February")
    }, {
      value: "03",
      label: (0, import_i18n45.__)("March")
    }, {
      value: "04",
      label: (0, import_i18n45.__)("April")
    }, {
      value: "05",
      label: (0, import_i18n45.__)("May")
    }, {
      value: "06",
      label: (0, import_i18n45.__)("June")
    }, {
      value: "07",
      label: (0, import_i18n45.__)("July")
    }, {
      value: "08",
      label: (0, import_i18n45.__)("August")
    }, {
      value: "09",
      label: (0, import_i18n45.__)("September")
    }, {
      value: "10",
      label: (0, import_i18n45.__)("October")
    }, {
      value: "11",
      label: (0, import_i18n45.__)("November")
    }, {
      value: "12",
      label: (0, import_i18n45.__)("December")
    }];
    const {
      day,
      month,
      year,
      minutes,
      hours
    } = (0, import_element130.useMemo)(() => ({
      day: (0, import_date5.date)("d", date),
      month: (0, import_date5.date)("m", date),
      year: (0, import_date5.date)("Y", date),
      minutes: (0, import_date5.date)("i", date),
      hours: (0, import_date5.date)("H", date)
    }), [date]);
    const buildNumberControlChangeCallback = (method) => {
      const callback = (value, {
        event
      }) => {
        if (!validateInputElementTarget(event)) {
          return;
        }
        const numberValue = Number(value);
        const newDate = setInConfiguredTimezone(date, {
          [method]: numberValue
        });
        setDate(newDate);
        onChange?.((0, import_date5.date)(TIMEZONELESS_FORMAT, newDate));
      };
      return callback;
    };
    const onTimeInputChangeCallback = ({
      hours: newHours,
      minutes: newMinutes
    }) => {
      const newDate = setInConfiguredTimezone(date, {
        hours: newHours,
        minutes: newMinutes
      });
      setDate(newDate);
      onChange?.((0, import_date5.date)(TIMEZONELESS_FORMAT, newDate));
    };
    const dayField = /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(DayInput, {
      className: "components-datetime__time-field components-datetime__time-field-day",
      label: (0, import_i18n45.__)("Day"),
      hideLabelFromVision: true,
      __next40pxDefaultSize: true,
      value: day,
      step: 1,
      min: 1,
      max: getDaysInMonth2(Number(year), Number(month) - 1),
      required: true,
      spinControls: "none",
      isPressEnterToChange: true,
      isDragEnabled: false,
      isShiftStepEnabled: false,
      onChange: buildNumberControlChangeCallback("date")
    }, "day");
    const monthField = /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(MonthSelectWrapper, {
      children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(select_control_default, {
        className: "components-datetime__time-field components-datetime__time-field-month",
        label: (0, import_i18n45.__)("Month"),
        hideLabelFromVision: true,
        __next40pxDefaultSize: true,
        value: month,
        options: monthOptions,
        onChange: (value) => {
          const newDate = setInConfiguredTimezone(date, {
            month: Number(value) - 1
          });
          setDate(newDate);
          onChange?.((0, import_date5.date)(TIMEZONELESS_FORMAT, newDate));
        }
      })
    }, "month");
    const yearField = /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(YearInput, {
      className: "components-datetime__time-field components-datetime__time-field-year",
      label: (0, import_i18n45.__)("Year"),
      hideLabelFromVision: true,
      __next40pxDefaultSize: true,
      value: year,
      step: 1,
      min: 1,
      max: 9999,
      required: true,
      spinControls: "none",
      isPressEnterToChange: true,
      isDragEnabled: false,
      isShiftStepEnabled: false,
      onChange: buildNumberControlChangeCallback("year"),
      __unstableStateReducer: buildPadInputStateReducer(4)
    }, "year");
    const defaultDateOrder = is12Hour ? "mdy" : "dmy";
    const dateOrder = dateOrderProp && VALID_DATE_ORDERS.includes(dateOrderProp) ? dateOrderProp : defaultDateOrder;
    const fields = dateOrder.split("").map((field) => {
      switch (field) {
        case "d":
          return dayField;
        case "m":
          return monthField;
        case "y":
          return yearField;
        default:
          return null;
      }
    });
    return /* @__PURE__ */ (0, import_jsx_runtime196.jsxs)(Wrapper4, {
      className: "components-datetime__time",
      children: [/* @__PURE__ */ (0, import_jsx_runtime196.jsxs)(Fieldset, {
        children: [hideLabelFromVision ? /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(component_default2, {
          as: "legend",
          children: (0, import_i18n45.__)("Time")
        }) : /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(base_control_default.VisualLabel, {
          as: "legend",
          className: "components-datetime__time-legend",
          children: (0, import_i18n45.__)("Time")
        }), /* @__PURE__ */ (0, import_jsx_runtime196.jsxs)(component_default9, {
          className: "components-datetime__time-wrapper",
          children: [/* @__PURE__ */ (0, import_jsx_runtime196.jsx)(TimeInput, {
            value: {
              hours: Number(hours),
              minutes: Number(minutes)
            },
            is12Hour,
            onChange: onTimeInputChangeCallback
          }), /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(component_default6, {}), /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(timezone_default, {})]
        })]
      }), /* @__PURE__ */ (0, import_jsx_runtime196.jsxs)(Fieldset, {
        children: [hideLabelFromVision ? /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(component_default2, {
          as: "legend",
          children: (0, import_i18n45.__)("Date")
        }) : /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(base_control_default.VisualLabel, {
          as: "legend",
          className: "components-datetime__time-legend",
          children: (0, import_i18n45.__)("Date")
        }), /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(component_default9, {
          className: "components-datetime__time-wrapper",
          children: fields
        })]
      })]
    });
  }
  TimePicker.TimeInput = TimeInput;
  Object.assign(TimePicker.TimeInput, {
    displayName: "TimePicker.TimeInput"
  });
  var time_default = TimePicker;

  // packages/components/build-module/date-time/date-time/index.mjs
  var import_element131 = __toESM(require_element(), 1);

  // packages/components/build-module/date-time/date-time/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__30() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var Wrapper5 = /* @__PURE__ */ createStyled(component_default18, false ? {
    target: "e1p5onf00"
  } : {
    target: "e1p5onf00",
    label: "Wrapper"
  })(false ? {
    name: "1khn195",
    styles: "box-sizing:border-box"
  } : {
    name: "1khn195",
    styles: "box-sizing:border-box/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFVdUMiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBWU3RhY2sgfSBmcm9tICcuLi8uLi92LXN0YWNrJztcblxuZXhwb3J0IGNvbnN0IFdyYXBwZXIgPSBzdHlsZWQoIFZTdGFjayApYFxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__30
  });

  // packages/components/build-module/date-time/date-time/index.mjs
  var import_jsx_runtime197 = __toESM(require_jsx_runtime(), 1);
  var noop12 = () => {
  };
  function UnforwardedDateTimePicker({
    currentDate,
    is12Hour,
    dateOrder,
    isInvalidDate,
    onMonthPreviewed = noop12,
    onChange,
    events,
    startOfWeek: startOfWeek3
  }, ref) {
    return /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(Wrapper5, {
      ref,
      className: "components-datetime",
      spacing: 4,
      children: /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(import_jsx_runtime197.Fragment, {
        children: [/* @__PURE__ */ (0, import_jsx_runtime197.jsx)(time_default, {
          currentTime: currentDate,
          onChange,
          is12Hour,
          dateOrder
        }), /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(date_default, {
          currentDate,
          onChange,
          isInvalidDate,
          events,
          onMonthPreviewed,
          startOfWeek: startOfWeek3
        })]
      })
    });
  }
  var DateTimePicker = (0, import_element131.forwardRef)(UnforwardedDateTimePicker);
  DateTimePicker.displayName = "DateTimePicker";
  var date_time_default = DateTimePicker;

  // packages/components/build-module/date-time/index.mjs
  var date_time_default2 = date_time_default;

  // packages/components/build-module/disabled/styles/disabled-styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__31() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var disabledStyles3 = false ? {
    name: "u2jump",
    styles: "position:relative;pointer-events:none;&::after{content:'';position:absolute;top:0;right:0;bottom:0;left:0;}*{pointer-events:none;}"
  } : {
    name: "iqemdn-disabledStyles",
    styles: "position:relative;pointer-events:none;&::after{content:'';position:absolute;top:0;right:0;bottom:0;left:0;}*{pointer-events:none;};label:disabledStyles;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRpc2FibGVkLXN0eWxlcy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS2lDIiwiZmlsZSI6ImRpc2FibGVkLXN0eWxlcy50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmV4cG9ydCBjb25zdCBkaXNhYmxlZFN0eWxlcyA9IGNzc2Bcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblxuXHQmOjphZnRlciB7XG5cdFx0Y29udGVudDogJyc7XG5cdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdHRvcDogMDtcblx0XHRyaWdodDogMDtcblx0XHRib3R0b206IDA7XG5cdFx0bGVmdDogMDtcblx0fVxuXG5cdC8vIEFsc28gbWFrZSBuZXN0ZWQgYmxvY2tzIHVuc2VsZWN0YWJsZS5cblx0KiB7XG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdH1cbmA7XG4iXX0= */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__31
  };

  // packages/components/build-module/disabled/context.mjs
  var import_element132 = __toESM(require_element(), 1);
  var Context = (0, import_element132.createContext)(false);
  Context.displayName = "DisabledContext";
  var context_default3 = Context;

  // packages/components/build-module/disabled/index.mjs
  var import_jsx_runtime198 = __toESM(require_jsx_runtime(), 1);
  var {
    Consumer,
    Provider: Provider2
  } = context_default3;
  function Disabled({
    className: className2,
    children,
    isDisabled = true,
    ...props
  }) {
    const cx3 = useCx();
    return /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(Provider2, {
      value: isDisabled,
      children: /* @__PURE__ */ (0, import_jsx_runtime198.jsx)("div", {
        // @ts-ignore Reason: inert is a recent HTML attribute
        inert: isDisabled ? "true" : void 0,
        className: isDisabled ? cx3(disabledStyles3, className2, "components-disabled") : void 0,
        ...props,
        children
      })
    });
  }
  Disabled.Context = context_default3;
  Disabled.Consumer = Consumer;
  var disabled_default = Disabled;

  // packages/components/build-module/disclosure/index.mjs
  var import_element133 = __toESM(require_element(), 1);
  var import_jsx_runtime199 = __toESM(require_jsx_runtime(), 1);
  var UnforwardedDisclosureContent = ({
    visible,
    children,
    ...props
  }, ref) => {
    const disclosure = useDisclosureStore({
      open: visible
    });
    return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(DisclosureContent, {
      store: disclosure,
      ref,
      ...props,
      children
    });
  };
  var DisclosureContent22 = (0, import_element133.forwardRef)(UnforwardedDisclosureContent);
  DisclosureContent22.displayName = "DisclosureContent";

  // packages/components/build-module/draggable/index.mjs
  var import_compose51 = __toESM(require_compose(), 1);
  var import_element134 = __toESM(require_element(), 1);
  var import_jsx_runtime200 = __toESM(require_jsx_runtime(), 1);
  var dragImageClass = "components-draggable__invisible-drag-image";
  var cloneWrapperClass = "components-draggable__clone";
  var clonePadding = 0;
  var bodyClass = "is-dragging-components-draggable";
  function Draggable({
    children,
    onDragStart,
    onDragOver,
    onDragEnd,
    appendToOwnerDocument = false,
    cloneClassname,
    elementId,
    transferData,
    __experimentalTransferDataType: transferDataType = "text",
    __experimentalDragComponent: dragComponent
  }) {
    const dragComponentRef = (0, import_element134.useRef)(null);
    const cleanupRef = (0, import_element134.useRef)(() => {
    });
    function end(event) {
      event.preventDefault();
      cleanupRef.current();
      if (onDragEnd) {
        onDragEnd(event);
      }
    }
    function start(event) {
      const {
        ownerDocument
      } = event.target;
      event.dataTransfer.setData(transferDataType, JSON.stringify(transferData));
      const cloneWrapper = ownerDocument.createElement("div");
      cloneWrapper.style.top = "0";
      cloneWrapper.style.left = "0";
      const dragImage = ownerDocument.createElement("div");
      if ("function" === typeof event.dataTransfer.setDragImage) {
        dragImage.classList.add(dragImageClass);
        ownerDocument.body.appendChild(dragImage);
        event.dataTransfer.setDragImage(dragImage, 0, 0);
      }
      cloneWrapper.classList.add(cloneWrapperClass);
      if (cloneClassname) {
        cloneWrapper.classList.add(cloneClassname);
      }
      let x2 = 0;
      let y3 = 0;
      if (dragComponentRef.current) {
        x2 = event.clientX;
        y3 = event.clientY;
        cloneWrapper.style.transform = `translate( ${x2}px, ${y3}px )`;
        const clonedDragComponent = ownerDocument.createElement("div");
        clonedDragComponent.innerHTML = dragComponentRef.current.innerHTML;
        cloneWrapper.appendChild(clonedDragComponent);
        ownerDocument.body.appendChild(cloneWrapper);
      } else {
        const element = ownerDocument.getElementById(elementId);
        const elementRect = element.getBoundingClientRect();
        const elementWrapper = element.parentNode;
        const elementTopOffset = elementRect.top;
        const elementLeftOffset = elementRect.left;
        cloneWrapper.style.width = `${elementRect.width + clonePadding * 2}px`;
        const clone = element.cloneNode(true);
        clone.id = `clone-${elementId}`;
        x2 = elementLeftOffset - clonePadding;
        y3 = elementTopOffset - clonePadding;
        cloneWrapper.style.transform = `translate( ${x2}px, ${y3}px )`;
        Array.from(clone.querySelectorAll("iframe")).forEach((child) => child.parentNode?.removeChild(child));
        cloneWrapper.appendChild(clone);
        if (appendToOwnerDocument) {
          ownerDocument.body.appendChild(cloneWrapper);
        } else {
          elementWrapper?.appendChild(cloneWrapper);
        }
      }
      let cursorLeft = event.clientX;
      let cursorTop = event.clientY;
      function over(e3) {
        if (cursorLeft === e3.clientX && cursorTop === e3.clientY) {
          return;
        }
        const nextX = x2 + e3.clientX - cursorLeft;
        const nextY = y3 + e3.clientY - cursorTop;
        cloneWrapper.style.transform = `translate( ${nextX}px, ${nextY}px )`;
        cursorLeft = e3.clientX;
        cursorTop = e3.clientY;
        x2 = nextX;
        y3 = nextY;
        if (onDragOver) {
          onDragOver(e3);
        }
      }
      const throttledDragOver = (0, import_compose51.throttle)(over, 16);
      ownerDocument.addEventListener("dragover", throttledDragOver);
      ownerDocument.body.classList.add(bodyClass);
      if (onDragStart) {
        onDragStart(event);
      }
      cleanupRef.current = () => {
        if (cloneWrapper && cloneWrapper.parentNode) {
          cloneWrapper.parentNode.removeChild(cloneWrapper);
        }
        if (dragImage && dragImage.parentNode) {
          dragImage.parentNode.removeChild(dragImage);
        }
        ownerDocument.body.classList.remove(bodyClass);
        ownerDocument.removeEventListener("dragover", throttledDragOver);
      };
    }
    (0, import_element134.useEffect)(() => () => {
      cleanupRef.current();
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(import_jsx_runtime200.Fragment, {
      children: [children({
        onDraggableStart: start,
        onDraggableEnd: end
      }), dragComponent && /* @__PURE__ */ (0, import_jsx_runtime200.jsx)("div", {
        className: "components-draggable-drag-component-root",
        style: {
          display: "none"
        },
        ref: dragComponentRef,
        children: dragComponent
      })]
    });
  }
  var draggable_default = Draggable;

  // packages/components/build-module/drop-zone/index.mjs
  var import_i18n46 = __toESM(require_i18n(), 1);
  var import_element135 = __toESM(require_element(), 1);
  var import_dom31 = __toESM(require_dom(), 1);
  var import_compose52 = __toESM(require_compose(), 1);
  var import_jsx_runtime201 = __toESM(require_jsx_runtime(), 1);
  function DropZoneComponent({
    className: className2,
    icon = upload_default,
    label,
    onFilesDrop,
    onHTMLDrop,
    onDrop,
    isEligible = () => true,
    ...restProps
  }) {
    const [isDraggingOverDocument, setIsDraggingOverDocument] = (0, import_element135.useState)();
    const [isDraggingOverElement, setIsDraggingOverElement] = (0, import_element135.useState)();
    const [isActive, setIsActive] = (0, import_element135.useState)();
    const ref = (0, import_compose52.__experimentalUseDropZone)({
      onDrop(event) {
        if (!event.dataTransfer) {
          return;
        }
        const files = (0, import_dom31.getFilesFromDataTransfer)(event.dataTransfer);
        const html = event.dataTransfer.getData("text/html");
        if (html && onHTMLDrop) {
          onHTMLDrop(html);
        } else if (files.length && onFilesDrop) {
          onFilesDrop(files);
        } else if (onDrop) {
          onDrop(event);
        }
      },
      onDragStart(event) {
        setIsDraggingOverDocument(true);
        if (!event.dataTransfer) {
          return;
        }
        if (event.dataTransfer.types.includes("text/html")) {
          setIsActive(!!onHTMLDrop);
        } else if (
          // Check for the types because sometimes the files themselves
          // are only available on drop.
          event.dataTransfer.types.includes("Files") || (0, import_dom31.getFilesFromDataTransfer)(event.dataTransfer).length > 0
        ) {
          setIsActive(!!onFilesDrop);
        } else {
          setIsActive(!!onDrop && isEligible(event.dataTransfer));
        }
      },
      onDragEnd() {
        setIsDraggingOverElement(false);
        setIsDraggingOverDocument(false);
        setIsActive(void 0);
      },
      onDragEnter() {
        setIsDraggingOverElement(true);
      },
      onDragLeave() {
        setIsDraggingOverElement(false);
      }
    });
    const classes = clsx_default("components-drop-zone", className2, {
      "is-active": isActive,
      "is-dragging-over-document": isDraggingOverDocument,
      "is-dragging-over-element": isDraggingOverElement
    });
    return /* @__PURE__ */ (0, import_jsx_runtime201.jsx)("div", {
      ...restProps,
      ref,
      className: classes,
      children: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)("div", {
        className: "components-drop-zone__content",
        children: /* @__PURE__ */ (0, import_jsx_runtime201.jsxs)("div", {
          className: "components-drop-zone__content-inner",
          children: [/* @__PURE__ */ (0, import_jsx_runtime201.jsx)(icon_default2, {
            icon,
            className: "components-drop-zone__content-icon"
          }), /* @__PURE__ */ (0, import_jsx_runtime201.jsx)("span", {
            className: "components-drop-zone__content-text",
            children: label ? label : (0, import_i18n46.__)("Drop files to upload")
          })]
        })
      })
    });
  }
  var drop_zone_default = DropZoneComponent;

  // packages/components/build-module/drop-zone/provider.mjs
  var import_deprecated15 = __toESM(require_deprecated(), 1);
  function DropZoneProvider({
    children
  }) {
    (0, import_deprecated15.default)("wp.components.DropZoneProvider", {
      since: "5.8",
      hint: "wp.component.DropZone no longer needs a provider. wp.components.DropZoneProvider is safe to remove from your code."
    });
    return children;
  }

  // packages/components/build-module/duotone-picker/duotone-picker.mjs
  var import_es62 = __toESM(require_es6(), 1);
  var import_element137 = __toESM(require_element(), 1);
  var import_i18n48 = __toESM(require_i18n(), 1);

  // packages/components/build-module/duotone-picker/color-list-picker/index.mjs
  var import_element136 = __toESM(require_element(), 1);
  var import_i18n47 = __toESM(require_i18n(), 1);
  var import_compose53 = __toESM(require_compose(), 1);
  var import_jsx_runtime202 = __toESM(require_jsx_runtime(), 1);
  function ColorOption({
    label,
    value,
    colors,
    disableCustomColors,
    enableAlpha,
    onChange
  }) {
    const [isOpen, setIsOpen] = (0, import_element136.useState)(false);
    const idRoot = (0, import_compose53.useInstanceId)(ColorOption, "color-list-picker-option");
    const labelId = `${idRoot}__label`;
    const contentId = `${idRoot}__content`;
    return /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)(import_jsx_runtime202.Fragment, {
      children: [/* @__PURE__ */ (0, import_jsx_runtime202.jsx)(button_default, {
        __next40pxDefaultSize: true,
        className: "components-color-list-picker__swatch-button",
        id: labelId,
        onClick: () => setIsOpen((prev2) => !prev2),
        "aria-expanded": isOpen,
        "aria-controls": contentId,
        icon: value ? /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(color_indicator_default, {
          colorValue: value,
          className: "components-color-list-picker__swatch-color"
        }) : /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(icon_default3, {
          icon: swatch_default
        }),
        text: label
      }), /* @__PURE__ */ (0, import_jsx_runtime202.jsx)("div", {
        role: "group",
        id: contentId,
        "aria-labelledby": labelId,
        "aria-hidden": !isOpen,
        children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(color_palette_default, {
          "aria-label": (0, import_i18n47.__)("Color options"),
          className: "components-color-list-picker__color-picker",
          colors,
          value,
          clearable: false,
          onChange,
          disableCustomColors,
          enableAlpha
        })
      })]
    });
  }
  function ColorListPicker({
    colors,
    labels,
    value = [],
    disableCustomColors,
    enableAlpha,
    onChange
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)("div", {
      className: "components-color-list-picker",
      children: labels.map((label, index2) => /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(ColorOption, {
        label,
        value: value[index2],
        colors,
        disableCustomColors,
        enableAlpha,
        onChange: (newColor) => {
          const newColors = value.slice();
          newColors[index2] = newColor;
          onChange(newColors);
        }
      }, index2))
    });
  }
  var color_list_picker_default = ColorListPicker;

  // packages/components/build-module/duotone-picker/utils.mjs
  k([names_default]);
  function getDefaultColors(palette) {
    if (!palette || palette.length < 2) {
      return ["#000", "#fff"];
    }
    return palette.map(({
      color: color2
    }) => ({
      color: color2,
      brightness: w(color2).brightness()
    })).reduce(([min3, max3], current) => {
      return [current.brightness <= min3.brightness ? current : min3, current.brightness >= max3.brightness ? current : max3];
    }, [{
      brightness: 1,
      color: ""
    }, {
      brightness: 0,
      color: ""
    }]).map(({
      color: color2
    }) => color2);
  }
  function getGradientFromCSSColors(colors = [], angle = "90deg") {
    const l3 = 100 / colors.length;
    const stops = colors.map((c3, i3) => `${c3} ${i3 * l3}%, ${c3} ${(i3 + 1) * l3}%`).join(", ");
    return `linear-gradient( ${angle}, ${stops} )`;
  }
  function getColorStopsFromColors(colors) {
    return colors.map((color2, i3) => ({
      position: i3 * 100 / (colors.length - 1),
      color: color2
    }));
  }
  function getColorsFromColorStops(colorStops = []) {
    return colorStops.map(({
      color: color2
    }) => color2);
  }

  // packages/components/build-module/duotone-picker/custom-duotone-bar.mjs
  var import_jsx_runtime203 = __toESM(require_jsx_runtime(), 1);
  var PLACEHOLDER_VALUES = ["#333", "#CCC"];
  function CustomDuotoneBar({
    value,
    onChange
  }) {
    const hasGradient = !!value;
    const values = hasGradient ? value : PLACEHOLDER_VALUES;
    const background2 = getGradientFromCSSColors(values);
    const controlPoints = getColorStopsFromColors(values);
    return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(CustomGradientBar, {
      disableInserter: true,
      background: background2,
      hasGradient,
      value: controlPoints,
      onChange: (newColorStops) => {
        const newValue = getColorsFromColorStops(newColorStops);
        onChange(newValue);
      }
    });
  }

  // packages/components/build-module/duotone-picker/duotone-picker.mjs
  var import_jsx_runtime204 = __toESM(require_jsx_runtime(), 1);
  function DuotonePicker({
    asButtons,
    loop,
    clearable = true,
    unsetable = true,
    colorPalette,
    duotonePalette,
    disableCustomColors,
    disableCustomDuotone,
    value,
    onChange,
    "aria-label": ariaLabel,
    "aria-labelledby": ariaLabelledby,
    ...otherProps
  }) {
    const [defaultDark, defaultLight] = (0, import_element137.useMemo)(() => getDefaultColors(colorPalette), [colorPalette]);
    const isUnset = value === "unset";
    const unsetOptionLabel = (0, import_i18n48.__)("Unset");
    const unsetOption = /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(circular_option_picker_default2.Option, {
      value: "unset",
      isSelected: isUnset,
      tooltipText: unsetOptionLabel,
      "aria-label": unsetOptionLabel,
      className: "components-duotone-picker__color-indicator",
      onClick: () => {
        onChange(isUnset ? void 0 : "unset");
      }
    }, "unset");
    const duotoneOptions = duotonePalette.map(({
      colors,
      slug,
      name
    }) => {
      const style2 = {
        background: getGradientFromCSSColors(colors, "135deg"),
        color: "transparent"
      };
      const tooltipText = name ?? (0, import_i18n48.sprintf)(
        // translators: %s: duotone code e.g: "dark-grayscale" or "7f7f7f-ffffff".
        (0, import_i18n48.__)("Duotone code: %s"),
        slug
      );
      const label = name ? (0, import_i18n48.sprintf)(
        // translators: %s: The name of the option e.g: "Dark grayscale".
        (0, import_i18n48.__)("Duotone: %s"),
        name
      ) : tooltipText;
      const isSelected2 = (0, import_es62.default)(colors, value);
      return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(circular_option_picker_default2.Option, {
        value: colors,
        isSelected: isSelected2,
        "aria-label": label,
        tooltipText,
        style: style2,
        onClick: () => {
          onChange(isSelected2 ? void 0 : colors);
        }
      }, slug);
    });
    const {
      metaProps,
      labelProps
    } = getComputeCircularOptionPickerCommonProps(asButtons, loop, ariaLabel, ariaLabelledby);
    const options2 = unsetable ? [unsetOption, ...duotoneOptions] : duotoneOptions;
    return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(circular_option_picker_default2, {
      ...otherProps,
      ...metaProps,
      ...labelProps,
      options: options2,
      actions: !!clearable && /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(circular_option_picker_default2.ButtonAction, {
        onClick: () => onChange(void 0),
        accessibleWhenDisabled: true,
        disabled: !value,
        children: (0, import_i18n48.__)("Clear")
      }),
      children: /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(component_default6, {
        paddingTop: options2.length === 0 ? 0 : 4,
        children: /* @__PURE__ */ (0, import_jsx_runtime204.jsxs)(component_default18, {
          spacing: 3,
          children: [!disableCustomColors && !disableCustomDuotone && /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(CustomDuotoneBar, {
            value: isUnset ? void 0 : value,
            onChange
          }), !disableCustomDuotone && /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(color_list_picker_default, {
            labels: [(0, import_i18n48.__)("Shadows"), (0, import_i18n48.__)("Highlights")],
            colors: colorPalette,
            value: isUnset ? void 0 : value,
            disableCustomColors,
            enableAlpha: true,
            onChange: (newColors) => {
              if (!newColors[0]) {
                newColors[0] = defaultDark;
              }
              if (!newColors[1]) {
                newColors[1] = defaultLight;
              }
              const newValue = newColors.length >= 2 ? newColors : void 0;
              onChange(newValue);
            }
          })]
        })
      })
    });
  }
  var duotone_picker_default = DuotonePicker;

  // packages/components/build-module/duotone-picker/duotone-swatch.mjs
  var import_jsx_runtime205 = __toESM(require_jsx_runtime(), 1);
  function DuotoneSwatch({
    values
  }) {
    return values ? /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(color_indicator_default, {
      colorValue: getGradientFromCSSColors(values, "135deg")
    }) : /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(icon_default3, {
      icon: swatch_default
    });
  }
  var duotone_swatch_default = DuotoneSwatch;

  // packages/components/build-module/external-link/index.mjs
  var import_i18n49 = __toESM(require_i18n(), 1);
  var import_element138 = __toESM(require_element(), 1);
  var import_jsx_runtime206 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedExternalLink(props, ref) {
    const {
      href,
      children,
      className: className2,
      rel = "",
      ...additionalProps
    } = props;
    const optimizedRel = [...new Set([...rel.split(" "), "external", "noreferrer", "noopener"].filter(Boolean))].join(" ");
    const classes = clsx_default("components-external-link", className2);
    const isInternalAnchor = !!href?.startsWith("#");
    const onClickHandler = (event) => {
      if (isInternalAnchor) {
        event.preventDefault();
      }
      if (props.onClick) {
        props.onClick(event);
      }
    };
    return (
      /* eslint-disable react/jsx-no-target-blank */
      /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)("a", {
        ...additionalProps,
        className: classes,
        href,
        onClick: onClickHandler,
        target: "_blank",
        rel: optimizedRel,
        ref,
        children: [/* @__PURE__ */ (0, import_jsx_runtime206.jsx)("span", {
          className: "components-external-link__contents",
          children
        }), /* @__PURE__ */ (0, import_jsx_runtime206.jsx)("span", {
          className: clsx_default(
            "components-external-link__icon",
            // This class prevents the arrow from being replaced by a Twemoji image.
            "wp-exclude-emoji"
          ),
          "aria-label": (
            /* translators: accessibility text */
            (0, import_i18n49.__)("(opens in a new tab)")
          ),
          children: (0, import_i18n49.isRTL)() ? "\u2196" : "\u2197"
        })]
      })
    );
  }
  var ExternalLink = (0, import_element138.forwardRef)(UnforwardedExternalLink);
  ExternalLink.displayName = "ExternalLink";
  var external_link_default = ExternalLink;

  // packages/components/build-module/focal-point-picker/index.mjs
  var import_i18n51 = __toESM(require_i18n(), 1);
  var import_element139 = __toESM(require_element(), 1);
  var import_compose54 = __toESM(require_compose(), 1);

  // packages/components/build-module/focal-point-picker/controls.mjs
  var import_i18n50 = __toESM(require_i18n(), 1);

  // packages/components/build-module/focal-point-picker/utils.mjs
  var INITIAL_BOUNDS = {
    width: 200,
    height: 170
  };
  var VIDEO_EXTENSIONS = ["avi", "mpg", "mpeg", "mov", "mp4", "m4v", "ogg", "ogv", "webm", "wmv"];
  function getExtension(filename = "") {
    const parts = filename.split(".");
    return parts[parts.length - 1];
  }
  function isVideoType(filename = "") {
    if (!filename) {
      return false;
    }
    return filename.startsWith("data:video/") || VIDEO_EXTENSIONS.includes(getExtension(filename));
  }
  function fractionToPercentage(fraction) {
    return Math.round(fraction * 100);
  }

  // packages/components/build-module/focal-point-picker/styles/focal-point-picker-style.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__32() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var Container2 = /* @__PURE__ */ createStyled(component_default, false ? {
    target: "eeew7dm9"
  } : {
    target: "eeew7dm9",
    label: "Container"
  })("border:0;padding:0;margin:0;font-family:", font("default.fontFamily"), ";font-size:", font("default.fontSize"), ";", boxSizingReset, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvY2FsLXBvaW50LXBpY2tlci1zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnQnVDIiwiZmlsZSI6ImZvY2FsLXBvaW50LXBpY2tlci1zdHlsZS50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgRmxleCB9IGZyb20gJy4uLy4uL2ZsZXgnO1xuaW1wb3J0IFVuaXRDb250cm9sIGZyb20gJy4uLy4uL3VuaXQtY29udHJvbCc7XG5pbXBvcnQgeyBWaWV3IH0gZnJvbSAnLi4vLi4vdmlldyc7XG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgYm94U2l6aW5nUmVzZXQsIGZvbnQgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7IEZvY2FsUG9pbnRQaWNrZXJDb250cm9sc1Byb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgSU5JVElBTF9CT1VORFMgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBDb250YWluZXIgPSBzdHlsZWQoIFZpZXcgKWBcblx0Ym9yZGVyOiAwO1xuXHRwYWRkaW5nOiAwO1xuXHRtYXJnaW46IDA7XG5cdGZvbnQtZmFtaWx5OiAkeyBmb250KCAnZGVmYXVsdC5mb250RmFtaWx5JyApIH07XG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0JHsgYm94U2l6aW5nUmVzZXQgfVxuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHdpZHRoOiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGN1cnNvcjogcG9pbnRlcjtcblx0ZGlzcGxheTogaW5saW5lLWZsZXg7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRtYXJnaW46IGF1dG87XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0aGVpZ2h0OiAxMDAlO1xuXG5cdCY6YWZ0ZXIge1xuXHRcdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdFx0Ym90dG9tOiAwO1xuXHRcdGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCByZ2JhKCAwLCAwLCAwLCAwLjEgKTtcblx0XHRjb250ZW50OiAnJztcblx0XHRsZWZ0OiAwO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRyaWdodDogMDtcblx0XHR0b3A6IDA7XG5cdH1cblxuXHRpbWcsXG5cdHZpZGVvIHtcblx0XHRib3JkZXItcmFkaXVzOiBpbmhlcml0O1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0aGVpZ2h0OiBhdXRvO1xuXHRcdG1hcmdpbjogMDtcblx0XHRtYXgtaGVpZ2h0OiAxMDAlO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0XHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0XHR1c2VyLXNlbGVjdDogbm9uZTtcblx0XHR3aWR0aDogMTAwJTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhUGxhY2Vob2xkZXIgPSBzdHlsZWQuZGl2YFxuXHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMuZ3JheVsgMTAwIF0gfTtcblx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0aGVpZ2h0OiAkeyBJTklUSUFMX0JPVU5EUy5oZWlnaHQgfXB4O1xuXHRtYXgtd2lkdGg6IDI4MHB4O1xuXHRtaW4td2lkdGg6ICR7IElOSVRJQUxfQk9VTkRTLndpZHRoIH1weDtcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkVW5pdENvbnRyb2wgPSBzdHlsZWQoIFVuaXRDb250cm9sIClgXG5cdHdpZHRoOiAxMDAlO1xuYDtcblxuY29uc3QgZXh0cmFIZWxwVGV4dE1hcmdpbiA9ICgge1xuXHRoYXNIZWxwVGV4dCA9IGZhbHNlLFxufTogRm9jYWxQb2ludFBpY2tlckNvbnRyb2xzUHJvcHMgKSA9PiB7XG5cdHJldHVybiBoYXNIZWxwVGV4dFxuXHRcdD8gY3NzYFxuXHRcdFx0XHRwYWRkaW5nLWJvdHRvbTogMWVtO1xuXHRcdCAgYFxuXHRcdDogdW5kZWZpbmVkO1xufTtcblxuZXhwb3J0IGNvbnN0IENvbnRyb2xXcmFwcGVyID0gc3R5bGVkKCBGbGV4IClgXG5cdG1heC13aWR0aDogMzIwcHg7XG5cdHBhZGRpbmctdG9wOiAxZW07XG5cblx0JHsgZXh0cmFIZWxwVGV4dE1hcmdpbiB9XG5gO1xuXG5leHBvcnQgY29uc3QgR3JpZFZpZXcgPSBzdHlsZWQuZGl2YFxuXHRsZWZ0OiA1MCU7XG5cdG92ZXJmbG93OiBoaWRkZW47XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRvcDogNTAlO1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZTNkKCAtNTAlLCAtNTAlLCAwICk7XG5cdHotaW5kZXg6IDE7XG5cblx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0dHJhbnNpdGlvbjogb3BhY2l0eSAxMDBtcyBsaW5lYXI7XG5cdH1cblxuXHRvcGFjaXR5OiAkeyAoIHsgc2hvd092ZXJsYXkgfTogeyBzaG93T3ZlcmxheT86IGJvb2xlYW4gfSApID0+XG5cdFx0c2hvd092ZXJsYXkgPyAxIDogMCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEdyaWRMaW5lID0gc3R5bGVkLmRpdmBcblx0YmFja2dyb3VuZDogcmdiYSggMjU1LCAyNTUsIDI1NSwgMC40ICk7XG5cdGJhY2tkcm9wLWZpbHRlcjogYmx1ciggMTZweCApIHNhdHVyYXRlKCAxODAlICk7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dHJhbnNmb3JtOiB0cmFuc2xhdGVaKCAwICk7XG5gO1xuXG5leHBvcnQgY29uc3QgR3JpZExpbmVYID0gc3R5bGVkKCBHcmlkTGluZSApYFxuXHRoZWlnaHQ6IDFweDtcblx0bGVmdDogMXB4O1xuXHRyaWdodDogMXB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IEdyaWRMaW5lWSA9IHN0eWxlZCggR3JpZExpbmUgKWBcblx0d2lkdGg6IDFweDtcblx0dG9wOiAxcHg7XG5cdGJvdHRvbTogMXB4O1xuYDtcbiJdfQ== */"));
  var MediaWrapper = /* @__PURE__ */ createStyled("div", false ? {
    target: "eeew7dm8"
  } : {
    target: "eeew7dm8",
    label: "MediaWrapper"
  })(false ? {
    name: "jqnsxy",
    styles: "background-color:transparent;display:flex;text-align:center;width:100%"
  } : {
    name: "jqnsxy",
    styles: "background-color:transparent;display:flex;text-align:center;width:100%/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvY2FsLXBvaW50LXBpY2tlci1zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF5QnNDIiwiZmlsZSI6ImZvY2FsLXBvaW50LXBpY2tlci1zdHlsZS50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgRmxleCB9IGZyb20gJy4uLy4uL2ZsZXgnO1xuaW1wb3J0IFVuaXRDb250cm9sIGZyb20gJy4uLy4uL3VuaXQtY29udHJvbCc7XG5pbXBvcnQgeyBWaWV3IH0gZnJvbSAnLi4vLi4vdmlldyc7XG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgYm94U2l6aW5nUmVzZXQsIGZvbnQgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7IEZvY2FsUG9pbnRQaWNrZXJDb250cm9sc1Byb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgSU5JVElBTF9CT1VORFMgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBDb250YWluZXIgPSBzdHlsZWQoIFZpZXcgKWBcblx0Ym9yZGVyOiAwO1xuXHRwYWRkaW5nOiAwO1xuXHRtYXJnaW46IDA7XG5cdGZvbnQtZmFtaWx5OiAkeyBmb250KCAnZGVmYXVsdC5mb250RmFtaWx5JyApIH07XG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0JHsgYm94U2l6aW5nUmVzZXQgfVxuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHdpZHRoOiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGN1cnNvcjogcG9pbnRlcjtcblx0ZGlzcGxheTogaW5saW5lLWZsZXg7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRtYXJnaW46IGF1dG87XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0aGVpZ2h0OiAxMDAlO1xuXG5cdCY6YWZ0ZXIge1xuXHRcdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdFx0Ym90dG9tOiAwO1xuXHRcdGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCByZ2JhKCAwLCAwLCAwLCAwLjEgKTtcblx0XHRjb250ZW50OiAnJztcblx0XHRsZWZ0OiAwO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRyaWdodDogMDtcblx0XHR0b3A6IDA7XG5cdH1cblxuXHRpbWcsXG5cdHZpZGVvIHtcblx0XHRib3JkZXItcmFkaXVzOiBpbmhlcml0O1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0aGVpZ2h0OiBhdXRvO1xuXHRcdG1hcmdpbjogMDtcblx0XHRtYXgtaGVpZ2h0OiAxMDAlO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0XHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0XHR1c2VyLXNlbGVjdDogbm9uZTtcblx0XHR3aWR0aDogMTAwJTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhUGxhY2Vob2xkZXIgPSBzdHlsZWQuZGl2YFxuXHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMuZ3JheVsgMTAwIF0gfTtcblx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0aGVpZ2h0OiAkeyBJTklUSUFMX0JPVU5EUy5oZWlnaHQgfXB4O1xuXHRtYXgtd2lkdGg6IDI4MHB4O1xuXHRtaW4td2lkdGg6ICR7IElOSVRJQUxfQk9VTkRTLndpZHRoIH1weDtcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkVW5pdENvbnRyb2wgPSBzdHlsZWQoIFVuaXRDb250cm9sIClgXG5cdHdpZHRoOiAxMDAlO1xuYDtcblxuY29uc3QgZXh0cmFIZWxwVGV4dE1hcmdpbiA9ICgge1xuXHRoYXNIZWxwVGV4dCA9IGZhbHNlLFxufTogRm9jYWxQb2ludFBpY2tlckNvbnRyb2xzUHJvcHMgKSA9PiB7XG5cdHJldHVybiBoYXNIZWxwVGV4dFxuXHRcdD8gY3NzYFxuXHRcdFx0XHRwYWRkaW5nLWJvdHRvbTogMWVtO1xuXHRcdCAgYFxuXHRcdDogdW5kZWZpbmVkO1xufTtcblxuZXhwb3J0IGNvbnN0IENvbnRyb2xXcmFwcGVyID0gc3R5bGVkKCBGbGV4IClgXG5cdG1heC13aWR0aDogMzIwcHg7XG5cdHBhZGRpbmctdG9wOiAxZW07XG5cblx0JHsgZXh0cmFIZWxwVGV4dE1hcmdpbiB9XG5gO1xuXG5leHBvcnQgY29uc3QgR3JpZFZpZXcgPSBzdHlsZWQuZGl2YFxuXHRsZWZ0OiA1MCU7XG5cdG92ZXJmbG93OiBoaWRkZW47XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRvcDogNTAlO1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZTNkKCAtNTAlLCAtNTAlLCAwICk7XG5cdHotaW5kZXg6IDE7XG5cblx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0dHJhbnNpdGlvbjogb3BhY2l0eSAxMDBtcyBsaW5lYXI7XG5cdH1cblxuXHRvcGFjaXR5OiAkeyAoIHsgc2hvd092ZXJsYXkgfTogeyBzaG93T3ZlcmxheT86IGJvb2xlYW4gfSApID0+XG5cdFx0c2hvd092ZXJsYXkgPyAxIDogMCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEdyaWRMaW5lID0gc3R5bGVkLmRpdmBcblx0YmFja2dyb3VuZDogcmdiYSggMjU1LCAyNTUsIDI1NSwgMC40ICk7XG5cdGJhY2tkcm9wLWZpbHRlcjogYmx1ciggMTZweCApIHNhdHVyYXRlKCAxODAlICk7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dHJhbnNmb3JtOiB0cmFuc2xhdGVaKCAwICk7XG5gO1xuXG5leHBvcnQgY29uc3QgR3JpZExpbmVYID0gc3R5bGVkKCBHcmlkTGluZSApYFxuXHRoZWlnaHQ6IDFweDtcblx0bGVmdDogMXB4O1xuXHRyaWdodDogMXB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IEdyaWRMaW5lWSA9IHN0eWxlZCggR3JpZExpbmUgKWBcblx0d2lkdGg6IDFweDtcblx0dG9wOiAxcHg7XG5cdGJvdHRvbTogMXB4O1xuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__32
  });
  var MediaContainer = /* @__PURE__ */ createStyled("div", false ? {
    target: "eeew7dm7"
  } : {
    target: "eeew7dm7",
    label: "MediaContainer"
  })("align-items:center;border-radius:", config_values_default.radiusSmall, ";cursor:pointer;display:inline-flex;justify-content:center;margin:auto;position:relative;height:100%;&:after{border-radius:inherit;bottom:0;box-shadow:inset 0 0 0 1px rgba( 0, 0, 0, 0.1 );content:'';left:0;pointer-events:none;position:absolute;right:0;top:0;}img,video{border-radius:inherit;box-sizing:border-box;display:block;height:auto;margin:0;max-height:100%;max-width:100%;pointer-events:none;user-select:none;width:100%;}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvY2FsLXBvaW50LXBpY2tlci1zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnQ3dDIiwiZmlsZSI6ImZvY2FsLXBvaW50LXBpY2tlci1zdHlsZS50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgRmxleCB9IGZyb20gJy4uLy4uL2ZsZXgnO1xuaW1wb3J0IFVuaXRDb250cm9sIGZyb20gJy4uLy4uL3VuaXQtY29udHJvbCc7XG5pbXBvcnQgeyBWaWV3IH0gZnJvbSAnLi4vLi4vdmlldyc7XG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgYm94U2l6aW5nUmVzZXQsIGZvbnQgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7IEZvY2FsUG9pbnRQaWNrZXJDb250cm9sc1Byb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgSU5JVElBTF9CT1VORFMgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBDb250YWluZXIgPSBzdHlsZWQoIFZpZXcgKWBcblx0Ym9yZGVyOiAwO1xuXHRwYWRkaW5nOiAwO1xuXHRtYXJnaW46IDA7XG5cdGZvbnQtZmFtaWx5OiAkeyBmb250KCAnZGVmYXVsdC5mb250RmFtaWx5JyApIH07XG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0JHsgYm94U2l6aW5nUmVzZXQgfVxuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHdpZHRoOiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGN1cnNvcjogcG9pbnRlcjtcblx0ZGlzcGxheTogaW5saW5lLWZsZXg7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRtYXJnaW46IGF1dG87XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0aGVpZ2h0OiAxMDAlO1xuXG5cdCY6YWZ0ZXIge1xuXHRcdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdFx0Ym90dG9tOiAwO1xuXHRcdGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCByZ2JhKCAwLCAwLCAwLCAwLjEgKTtcblx0XHRjb250ZW50OiAnJztcblx0XHRsZWZ0OiAwO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRyaWdodDogMDtcblx0XHR0b3A6IDA7XG5cdH1cblxuXHRpbWcsXG5cdHZpZGVvIHtcblx0XHRib3JkZXItcmFkaXVzOiBpbmhlcml0O1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0aGVpZ2h0OiBhdXRvO1xuXHRcdG1hcmdpbjogMDtcblx0XHRtYXgtaGVpZ2h0OiAxMDAlO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0XHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0XHR1c2VyLXNlbGVjdDogbm9uZTtcblx0XHR3aWR0aDogMTAwJTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhUGxhY2Vob2xkZXIgPSBzdHlsZWQuZGl2YFxuXHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMuZ3JheVsgMTAwIF0gfTtcblx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0aGVpZ2h0OiAkeyBJTklUSUFMX0JPVU5EUy5oZWlnaHQgfXB4O1xuXHRtYXgtd2lkdGg6IDI4MHB4O1xuXHRtaW4td2lkdGg6ICR7IElOSVRJQUxfQk9VTkRTLndpZHRoIH1weDtcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkVW5pdENvbnRyb2wgPSBzdHlsZWQoIFVuaXRDb250cm9sIClgXG5cdHdpZHRoOiAxMDAlO1xuYDtcblxuY29uc3QgZXh0cmFIZWxwVGV4dE1hcmdpbiA9ICgge1xuXHRoYXNIZWxwVGV4dCA9IGZhbHNlLFxufTogRm9jYWxQb2ludFBpY2tlckNvbnRyb2xzUHJvcHMgKSA9PiB7XG5cdHJldHVybiBoYXNIZWxwVGV4dFxuXHRcdD8gY3NzYFxuXHRcdFx0XHRwYWRkaW5nLWJvdHRvbTogMWVtO1xuXHRcdCAgYFxuXHRcdDogdW5kZWZpbmVkO1xufTtcblxuZXhwb3J0IGNvbnN0IENvbnRyb2xXcmFwcGVyID0gc3R5bGVkKCBGbGV4IClgXG5cdG1heC13aWR0aDogMzIwcHg7XG5cdHBhZGRpbmctdG9wOiAxZW07XG5cblx0JHsgZXh0cmFIZWxwVGV4dE1hcmdpbiB9XG5gO1xuXG5leHBvcnQgY29uc3QgR3JpZFZpZXcgPSBzdHlsZWQuZGl2YFxuXHRsZWZ0OiA1MCU7XG5cdG92ZXJmbG93OiBoaWRkZW47XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRvcDogNTAlO1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZTNkKCAtNTAlLCAtNTAlLCAwICk7XG5cdHotaW5kZXg6IDE7XG5cblx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0dHJhbnNpdGlvbjogb3BhY2l0eSAxMDBtcyBsaW5lYXI7XG5cdH1cblxuXHRvcGFjaXR5OiAkeyAoIHsgc2hvd092ZXJsYXkgfTogeyBzaG93T3ZlcmxheT86IGJvb2xlYW4gfSApID0+XG5cdFx0c2hvd092ZXJsYXkgPyAxIDogMCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEdyaWRMaW5lID0gc3R5bGVkLmRpdmBcblx0YmFja2dyb3VuZDogcmdiYSggMjU1LCAyNTUsIDI1NSwgMC40ICk7XG5cdGJhY2tkcm9wLWZpbHRlcjogYmx1ciggMTZweCApIHNhdHVyYXRlKCAxODAlICk7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dHJhbnNmb3JtOiB0cmFuc2xhdGVaKCAwICk7XG5gO1xuXG5leHBvcnQgY29uc3QgR3JpZExpbmVYID0gc3R5bGVkKCBHcmlkTGluZSApYFxuXHRoZWlnaHQ6IDFweDtcblx0bGVmdDogMXB4O1xuXHRyaWdodDogMXB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IEdyaWRMaW5lWSA9IHN0eWxlZCggR3JpZExpbmUgKWBcblx0d2lkdGg6IDFweDtcblx0dG9wOiAxcHg7XG5cdGJvdHRvbTogMXB4O1xuYDtcbiJdfQ== */"));
  var MediaPlaceholder = /* @__PURE__ */ createStyled("div", false ? {
    target: "eeew7dm6"
  } : {
    target: "eeew7dm6",
    label: "MediaPlaceholder"
  })("background:", COLORS.gray[100], ";border-radius:inherit;box-sizing:border-box;height:", INITIAL_BOUNDS.height, "px;max-width:280px;min-width:", INITIAL_BOUNDS.width, "px;width:100%;" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvY2FsLXBvaW50LXBpY2tlci1zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxRTBDIiwiZmlsZSI6ImZvY2FsLXBvaW50LXBpY2tlci1zdHlsZS50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgRmxleCB9IGZyb20gJy4uLy4uL2ZsZXgnO1xuaW1wb3J0IFVuaXRDb250cm9sIGZyb20gJy4uLy4uL3VuaXQtY29udHJvbCc7XG5pbXBvcnQgeyBWaWV3IH0gZnJvbSAnLi4vLi4vdmlldyc7XG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgYm94U2l6aW5nUmVzZXQsIGZvbnQgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7IEZvY2FsUG9pbnRQaWNrZXJDb250cm9sc1Byb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgSU5JVElBTF9CT1VORFMgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBDb250YWluZXIgPSBzdHlsZWQoIFZpZXcgKWBcblx0Ym9yZGVyOiAwO1xuXHRwYWRkaW5nOiAwO1xuXHRtYXJnaW46IDA7XG5cdGZvbnQtZmFtaWx5OiAkeyBmb250KCAnZGVmYXVsdC5mb250RmFtaWx5JyApIH07XG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0JHsgYm94U2l6aW5nUmVzZXQgfVxuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHdpZHRoOiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGN1cnNvcjogcG9pbnRlcjtcblx0ZGlzcGxheTogaW5saW5lLWZsZXg7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRtYXJnaW46IGF1dG87XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0aGVpZ2h0OiAxMDAlO1xuXG5cdCY6YWZ0ZXIge1xuXHRcdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdFx0Ym90dG9tOiAwO1xuXHRcdGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCByZ2JhKCAwLCAwLCAwLCAwLjEgKTtcblx0XHRjb250ZW50OiAnJztcblx0XHRsZWZ0OiAwO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRyaWdodDogMDtcblx0XHR0b3A6IDA7XG5cdH1cblxuXHRpbWcsXG5cdHZpZGVvIHtcblx0XHRib3JkZXItcmFkaXVzOiBpbmhlcml0O1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0aGVpZ2h0OiBhdXRvO1xuXHRcdG1hcmdpbjogMDtcblx0XHRtYXgtaGVpZ2h0OiAxMDAlO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0XHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0XHR1c2VyLXNlbGVjdDogbm9uZTtcblx0XHR3aWR0aDogMTAwJTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhUGxhY2Vob2xkZXIgPSBzdHlsZWQuZGl2YFxuXHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMuZ3JheVsgMTAwIF0gfTtcblx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0aGVpZ2h0OiAkeyBJTklUSUFMX0JPVU5EUy5oZWlnaHQgfXB4O1xuXHRtYXgtd2lkdGg6IDI4MHB4O1xuXHRtaW4td2lkdGg6ICR7IElOSVRJQUxfQk9VTkRTLndpZHRoIH1weDtcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkVW5pdENvbnRyb2wgPSBzdHlsZWQoIFVuaXRDb250cm9sIClgXG5cdHdpZHRoOiAxMDAlO1xuYDtcblxuY29uc3QgZXh0cmFIZWxwVGV4dE1hcmdpbiA9ICgge1xuXHRoYXNIZWxwVGV4dCA9IGZhbHNlLFxufTogRm9jYWxQb2ludFBpY2tlckNvbnRyb2xzUHJvcHMgKSA9PiB7XG5cdHJldHVybiBoYXNIZWxwVGV4dFxuXHRcdD8gY3NzYFxuXHRcdFx0XHRwYWRkaW5nLWJvdHRvbTogMWVtO1xuXHRcdCAgYFxuXHRcdDogdW5kZWZpbmVkO1xufTtcblxuZXhwb3J0IGNvbnN0IENvbnRyb2xXcmFwcGVyID0gc3R5bGVkKCBGbGV4IClgXG5cdG1heC13aWR0aDogMzIwcHg7XG5cdHBhZGRpbmctdG9wOiAxZW07XG5cblx0JHsgZXh0cmFIZWxwVGV4dE1hcmdpbiB9XG5gO1xuXG5leHBvcnQgY29uc3QgR3JpZFZpZXcgPSBzdHlsZWQuZGl2YFxuXHRsZWZ0OiA1MCU7XG5cdG92ZXJmbG93OiBoaWRkZW47XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRvcDogNTAlO1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZTNkKCAtNTAlLCAtNTAlLCAwICk7XG5cdHotaW5kZXg6IDE7XG5cblx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0dHJhbnNpdGlvbjogb3BhY2l0eSAxMDBtcyBsaW5lYXI7XG5cdH1cblxuXHRvcGFjaXR5OiAkeyAoIHsgc2hvd092ZXJsYXkgfTogeyBzaG93T3ZlcmxheT86IGJvb2xlYW4gfSApID0+XG5cdFx0c2hvd092ZXJsYXkgPyAxIDogMCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEdyaWRMaW5lID0gc3R5bGVkLmRpdmBcblx0YmFja2dyb3VuZDogcmdiYSggMjU1LCAyNTUsIDI1NSwgMC40ICk7XG5cdGJhY2tkcm9wLWZpbHRlcjogYmx1ciggMTZweCApIHNhdHVyYXRlKCAxODAlICk7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dHJhbnNmb3JtOiB0cmFuc2xhdGVaKCAwICk7XG5gO1xuXG5leHBvcnQgY29uc3QgR3JpZExpbmVYID0gc3R5bGVkKCBHcmlkTGluZSApYFxuXHRoZWlnaHQ6IDFweDtcblx0bGVmdDogMXB4O1xuXHRyaWdodDogMXB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IEdyaWRMaW5lWSA9IHN0eWxlZCggR3JpZExpbmUgKWBcblx0d2lkdGg6IDFweDtcblx0dG9wOiAxcHg7XG5cdGJvdHRvbTogMXB4O1xuYDtcbiJdfQ== */"));
  var StyledUnitControl2 = /* @__PURE__ */ createStyled(unit_control_default, false ? {
    target: "eeew7dm5"
  } : {
    target: "eeew7dm5",
    label: "StyledUnitControl"
  })(false ? {
    name: "1d3w5wq",
    styles: "width:100%"
  } : {
    name: "1d3w5wq",
    styles: "width:100%/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvY2FsLXBvaW50LXBpY2tlci1zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUErRXNEIiwiZmlsZSI6ImZvY2FsLXBvaW50LXBpY2tlci1zdHlsZS50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgRmxleCB9IGZyb20gJy4uLy4uL2ZsZXgnO1xuaW1wb3J0IFVuaXRDb250cm9sIGZyb20gJy4uLy4uL3VuaXQtY29udHJvbCc7XG5pbXBvcnQgeyBWaWV3IH0gZnJvbSAnLi4vLi4vdmlldyc7XG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgYm94U2l6aW5nUmVzZXQsIGZvbnQgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7IEZvY2FsUG9pbnRQaWNrZXJDb250cm9sc1Byb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgSU5JVElBTF9CT1VORFMgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBDb250YWluZXIgPSBzdHlsZWQoIFZpZXcgKWBcblx0Ym9yZGVyOiAwO1xuXHRwYWRkaW5nOiAwO1xuXHRtYXJnaW46IDA7XG5cdGZvbnQtZmFtaWx5OiAkeyBmb250KCAnZGVmYXVsdC5mb250RmFtaWx5JyApIH07XG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0JHsgYm94U2l6aW5nUmVzZXQgfVxuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHdpZHRoOiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGN1cnNvcjogcG9pbnRlcjtcblx0ZGlzcGxheTogaW5saW5lLWZsZXg7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRtYXJnaW46IGF1dG87XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0aGVpZ2h0OiAxMDAlO1xuXG5cdCY6YWZ0ZXIge1xuXHRcdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdFx0Ym90dG9tOiAwO1xuXHRcdGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCByZ2JhKCAwLCAwLCAwLCAwLjEgKTtcblx0XHRjb250ZW50OiAnJztcblx0XHRsZWZ0OiAwO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRyaWdodDogMDtcblx0XHR0b3A6IDA7XG5cdH1cblxuXHRpbWcsXG5cdHZpZGVvIHtcblx0XHRib3JkZXItcmFkaXVzOiBpbmhlcml0O1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0aGVpZ2h0OiBhdXRvO1xuXHRcdG1hcmdpbjogMDtcblx0XHRtYXgtaGVpZ2h0OiAxMDAlO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0XHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0XHR1c2VyLXNlbGVjdDogbm9uZTtcblx0XHR3aWR0aDogMTAwJTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhUGxhY2Vob2xkZXIgPSBzdHlsZWQuZGl2YFxuXHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMuZ3JheVsgMTAwIF0gfTtcblx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0aGVpZ2h0OiAkeyBJTklUSUFMX0JPVU5EUy5oZWlnaHQgfXB4O1xuXHRtYXgtd2lkdGg6IDI4MHB4O1xuXHRtaW4td2lkdGg6ICR7IElOSVRJQUxfQk9VTkRTLndpZHRoIH1weDtcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkVW5pdENvbnRyb2wgPSBzdHlsZWQoIFVuaXRDb250cm9sIClgXG5cdHdpZHRoOiAxMDAlO1xuYDtcblxuY29uc3QgZXh0cmFIZWxwVGV4dE1hcmdpbiA9ICgge1xuXHRoYXNIZWxwVGV4dCA9IGZhbHNlLFxufTogRm9jYWxQb2ludFBpY2tlckNvbnRyb2xzUHJvcHMgKSA9PiB7XG5cdHJldHVybiBoYXNIZWxwVGV4dFxuXHRcdD8gY3NzYFxuXHRcdFx0XHRwYWRkaW5nLWJvdHRvbTogMWVtO1xuXHRcdCAgYFxuXHRcdDogdW5kZWZpbmVkO1xufTtcblxuZXhwb3J0IGNvbnN0IENvbnRyb2xXcmFwcGVyID0gc3R5bGVkKCBGbGV4IClgXG5cdG1heC13aWR0aDogMzIwcHg7XG5cdHBhZGRpbmctdG9wOiAxZW07XG5cblx0JHsgZXh0cmFIZWxwVGV4dE1hcmdpbiB9XG5gO1xuXG5leHBvcnQgY29uc3QgR3JpZFZpZXcgPSBzdHlsZWQuZGl2YFxuXHRsZWZ0OiA1MCU7XG5cdG92ZXJmbG93OiBoaWRkZW47XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRvcDogNTAlO1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZTNkKCAtNTAlLCAtNTAlLCAwICk7XG5cdHotaW5kZXg6IDE7XG5cblx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0dHJhbnNpdGlvbjogb3BhY2l0eSAxMDBtcyBsaW5lYXI7XG5cdH1cblxuXHRvcGFjaXR5OiAkeyAoIHsgc2hvd092ZXJsYXkgfTogeyBzaG93T3ZlcmxheT86IGJvb2xlYW4gfSApID0+XG5cdFx0c2hvd092ZXJsYXkgPyAxIDogMCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEdyaWRMaW5lID0gc3R5bGVkLmRpdmBcblx0YmFja2dyb3VuZDogcmdiYSggMjU1LCAyNTUsIDI1NSwgMC40ICk7XG5cdGJhY2tkcm9wLWZpbHRlcjogYmx1ciggMTZweCApIHNhdHVyYXRlKCAxODAlICk7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dHJhbnNmb3JtOiB0cmFuc2xhdGVaKCAwICk7XG5gO1xuXG5leHBvcnQgY29uc3QgR3JpZExpbmVYID0gc3R5bGVkKCBHcmlkTGluZSApYFxuXHRoZWlnaHQ6IDFweDtcblx0bGVmdDogMXB4O1xuXHRyaWdodDogMXB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IEdyaWRMaW5lWSA9IHN0eWxlZCggR3JpZExpbmUgKWBcblx0d2lkdGg6IDFweDtcblx0dG9wOiAxcHg7XG5cdGJvdHRvbTogMXB4O1xuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__32
  });
  var _ref8 = false ? {
    name: "1mn7kwb",
    styles: "padding-bottom:1em"
  } : {
    name: "ho4pgl-extraHelpTextMargin",
    styles: "padding-bottom:1em;label:extraHelpTextMargin;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvY2FsLXBvaW50LXBpY2tlci1zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1Rk8iLCJmaWxlIjoiZm9jYWwtcG9pbnQtcGlja2VyLXN0eWxlLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBGbGV4IH0gZnJvbSAnLi4vLi4vZmxleCc7XG5pbXBvcnQgVW5pdENvbnRyb2wgZnJvbSAnLi4vLi4vdW5pdC1jb250cm9sJztcbmltcG9ydCB7IFZpZXcgfSBmcm9tICcuLi8uLi92aWV3JztcbmltcG9ydCB7IENPTE9SUywgQ09ORklHLCBib3hTaXppbmdSZXNldCwgZm9udCB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB0eXBlIHsgRm9jYWxQb2ludFBpY2tlckNvbnRyb2xzUHJvcHMgfSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBJTklUSUFMX0JPVU5EUyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGNvbnN0IENvbnRhaW5lciA9IHN0eWxlZCggVmlldyApYFxuXHRib3JkZXI6IDA7XG5cdHBhZGRpbmc6IDA7XG5cdG1hcmdpbjogMDtcblx0Zm9udC1mYW1pbHk6ICR7IGZvbnQoICdkZWZhdWx0LmZvbnRGYW1pbHknICkgfTtcblx0Zm9udC1zaXplOiAkeyBmb250KCAnZGVmYXVsdC5mb250U2l6ZScgKSB9O1xuXHQkeyBib3hTaXppbmdSZXNldCB9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVkaWFXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0YmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7XG5cdGRpc3BsYXk6IGZsZXg7XG5cdHRleHQtYWxpZ246IGNlbnRlcjtcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgTWVkaWFDb250YWluZXIgPSBzdHlsZWQuZGl2YFxuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0Y3Vyc29yOiBwb2ludGVyO1xuXHRkaXNwbGF5OiBpbmxpbmUtZmxleDtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cdG1hcmdpbjogYXV0bztcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRoZWlnaHQ6IDEwMCU7XG5cblx0JjphZnRlciB7XG5cdFx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0XHRib3R0b206IDA7XG5cdFx0Ym94LXNoYWRvdzogaW5zZXQgMCAwIDAgMXB4IHJnYmEoIDAsIDAsIDAsIDAuMSApO1xuXHRcdGNvbnRlbnQ6ICcnO1xuXHRcdGxlZnQ6IDA7XG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdHJpZ2h0OiAwO1xuXHRcdHRvcDogMDtcblx0fVxuXG5cdGltZyxcblx0dmlkZW8ge1xuXHRcdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdFx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRoZWlnaHQ6IGF1dG87XG5cdFx0bWFyZ2luOiAwO1xuXHRcdG1heC1oZWlnaHQ6IDEwMCU7XG5cdFx0bWF4LXdpZHRoOiAxMDAlO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdHVzZXItc2VsZWN0OiBub25lO1xuXHRcdHdpZHRoOiAxMDAlO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVkaWFQbGFjZWhvbGRlciA9IHN0eWxlZC5kaXZgXG5cdGJhY2tncm91bmQ6ICR7IENPTE9SUy5ncmF5WyAxMDAgXSB9O1xuXHRib3JkZXItcmFkaXVzOiBpbmhlcml0O1xuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRoZWlnaHQ6ICR7IElOSVRJQUxfQk9VTkRTLmhlaWdodCB9cHg7XG5cdG1heC13aWR0aDogMjgwcHg7XG5cdG1pbi13aWR0aDogJHsgSU5JVElBTF9CT1VORFMud2lkdGggfXB4O1xuXHR3aWR0aDogMTAwJTtcbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRVbml0Q29udHJvbCA9IHN0eWxlZCggVW5pdENvbnRyb2wgKWBcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5jb25zdCBleHRyYUhlbHBUZXh0TWFyZ2luID0gKCB7XG5cdGhhc0hlbHBUZXh0ID0gZmFsc2UsXG59OiBGb2NhbFBvaW50UGlja2VyQ29udHJvbHNQcm9wcyApID0+IHtcblx0cmV0dXJuIGhhc0hlbHBUZXh0XG5cdFx0PyBjc3NgXG5cdFx0XHRcdHBhZGRpbmctYm90dG9tOiAxZW07XG5cdFx0ICBgXG5cdFx0OiB1bmRlZmluZWQ7XG59O1xuXG5leHBvcnQgY29uc3QgQ29udHJvbFdyYXBwZXIgPSBzdHlsZWQoIEZsZXggKWBcblx0bWF4LXdpZHRoOiAzMjBweDtcblx0cGFkZGluZy10b3A6IDFlbTtcblxuXHQkeyBleHRyYUhlbHBUZXh0TWFyZ2luIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBHcmlkVmlldyA9IHN0eWxlZC5kaXZgXG5cdGxlZnQ6IDUwJTtcblx0b3ZlcmZsb3c6IGhpZGRlbjtcblx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiA1MCU7XG5cdHRyYW5zZm9ybTogdHJhbnNsYXRlM2QoIC01MCUsIC01MCUsIDAgKTtcblx0ei1pbmRleDogMTtcblxuXHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHR0cmFuc2l0aW9uOiBvcGFjaXR5IDEwMG1zIGxpbmVhcjtcblx0fVxuXG5cdG9wYWNpdHk6ICR7ICggeyBzaG93T3ZlcmxheSB9OiB7IHNob3dPdmVybGF5PzogYm9vbGVhbiB9ICkgPT5cblx0XHRzaG93T3ZlcmxheSA/IDEgOiAwIH07XG5gO1xuXG5leHBvcnQgY29uc3QgR3JpZExpbmUgPSBzdHlsZWQuZGl2YFxuXHRiYWNrZ3JvdW5kOiByZ2JhKCAyNTUsIDI1NSwgMjU1LCAwLjQgKTtcblx0YmFja2Ryb3AtZmlsdGVyOiBibHVyKCAxNnB4ICkgc2F0dXJhdGUoIDE4MCUgKTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVooIDAgKTtcbmA7XG5cbmV4cG9ydCBjb25zdCBHcmlkTGluZVggPSBzdHlsZWQoIEdyaWRMaW5lIClgXG5cdGhlaWdodDogMXB4O1xuXHRsZWZ0OiAxcHg7XG5cdHJpZ2h0OiAxcHg7XG5gO1xuXG5leHBvcnQgY29uc3QgR3JpZExpbmVZID0gc3R5bGVkKCBHcmlkTGluZSApYFxuXHR3aWR0aDogMXB4O1xuXHR0b3A6IDFweDtcblx0Ym90dG9tOiAxcHg7XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__32
  };
  var extraHelpTextMargin = ({
    hasHelpText = false
  }) => {
    return hasHelpText ? _ref8 : void 0;
  };
  var ControlWrapper = /* @__PURE__ */ createStyled(component_default3, false ? {
    target: "eeew7dm4"
  } : {
    target: "eeew7dm4",
    label: "ControlWrapper"
  })("max-width:320px;padding-top:1em;", extraHelpTextMargin, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvY2FsLXBvaW50LXBpY2tlci1zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE2RjRDIiwiZmlsZSI6ImZvY2FsLXBvaW50LXBpY2tlci1zdHlsZS50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgRmxleCB9IGZyb20gJy4uLy4uL2ZsZXgnO1xuaW1wb3J0IFVuaXRDb250cm9sIGZyb20gJy4uLy4uL3VuaXQtY29udHJvbCc7XG5pbXBvcnQgeyBWaWV3IH0gZnJvbSAnLi4vLi4vdmlldyc7XG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgYm94U2l6aW5nUmVzZXQsIGZvbnQgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7IEZvY2FsUG9pbnRQaWNrZXJDb250cm9sc1Byb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgSU5JVElBTF9CT1VORFMgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBDb250YWluZXIgPSBzdHlsZWQoIFZpZXcgKWBcblx0Ym9yZGVyOiAwO1xuXHRwYWRkaW5nOiAwO1xuXHRtYXJnaW46IDA7XG5cdGZvbnQtZmFtaWx5OiAkeyBmb250KCAnZGVmYXVsdC5mb250RmFtaWx5JyApIH07XG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0JHsgYm94U2l6aW5nUmVzZXQgfVxuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHdpZHRoOiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGN1cnNvcjogcG9pbnRlcjtcblx0ZGlzcGxheTogaW5saW5lLWZsZXg7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRtYXJnaW46IGF1dG87XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0aGVpZ2h0OiAxMDAlO1xuXG5cdCY6YWZ0ZXIge1xuXHRcdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdFx0Ym90dG9tOiAwO1xuXHRcdGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCByZ2JhKCAwLCAwLCAwLCAwLjEgKTtcblx0XHRjb250ZW50OiAnJztcblx0XHRsZWZ0OiAwO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRyaWdodDogMDtcblx0XHR0b3A6IDA7XG5cdH1cblxuXHRpbWcsXG5cdHZpZGVvIHtcblx0XHRib3JkZXItcmFkaXVzOiBpbmhlcml0O1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0aGVpZ2h0OiBhdXRvO1xuXHRcdG1hcmdpbjogMDtcblx0XHRtYXgtaGVpZ2h0OiAxMDAlO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0XHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0XHR1c2VyLXNlbGVjdDogbm9uZTtcblx0XHR3aWR0aDogMTAwJTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhUGxhY2Vob2xkZXIgPSBzdHlsZWQuZGl2YFxuXHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMuZ3JheVsgMTAwIF0gfTtcblx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0aGVpZ2h0OiAkeyBJTklUSUFMX0JPVU5EUy5oZWlnaHQgfXB4O1xuXHRtYXgtd2lkdGg6IDI4MHB4O1xuXHRtaW4td2lkdGg6ICR7IElOSVRJQUxfQk9VTkRTLndpZHRoIH1weDtcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkVW5pdENvbnRyb2wgPSBzdHlsZWQoIFVuaXRDb250cm9sIClgXG5cdHdpZHRoOiAxMDAlO1xuYDtcblxuY29uc3QgZXh0cmFIZWxwVGV4dE1hcmdpbiA9ICgge1xuXHRoYXNIZWxwVGV4dCA9IGZhbHNlLFxufTogRm9jYWxQb2ludFBpY2tlckNvbnRyb2xzUHJvcHMgKSA9PiB7XG5cdHJldHVybiBoYXNIZWxwVGV4dFxuXHRcdD8gY3NzYFxuXHRcdFx0XHRwYWRkaW5nLWJvdHRvbTogMWVtO1xuXHRcdCAgYFxuXHRcdDogdW5kZWZpbmVkO1xufTtcblxuZXhwb3J0IGNvbnN0IENvbnRyb2xXcmFwcGVyID0gc3R5bGVkKCBGbGV4IClgXG5cdG1heC13aWR0aDogMzIwcHg7XG5cdHBhZGRpbmctdG9wOiAxZW07XG5cblx0JHsgZXh0cmFIZWxwVGV4dE1hcmdpbiB9XG5gO1xuXG5leHBvcnQgY29uc3QgR3JpZFZpZXcgPSBzdHlsZWQuZGl2YFxuXHRsZWZ0OiA1MCU7XG5cdG92ZXJmbG93OiBoaWRkZW47XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRvcDogNTAlO1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZTNkKCAtNTAlLCAtNTAlLCAwICk7XG5cdHotaW5kZXg6IDE7XG5cblx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0dHJhbnNpdGlvbjogb3BhY2l0eSAxMDBtcyBsaW5lYXI7XG5cdH1cblxuXHRvcGFjaXR5OiAkeyAoIHsgc2hvd092ZXJsYXkgfTogeyBzaG93T3ZlcmxheT86IGJvb2xlYW4gfSApID0+XG5cdFx0c2hvd092ZXJsYXkgPyAxIDogMCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEdyaWRMaW5lID0gc3R5bGVkLmRpdmBcblx0YmFja2dyb3VuZDogcmdiYSggMjU1LCAyNTUsIDI1NSwgMC40ICk7XG5cdGJhY2tkcm9wLWZpbHRlcjogYmx1ciggMTZweCApIHNhdHVyYXRlKCAxODAlICk7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dHJhbnNmb3JtOiB0cmFuc2xhdGVaKCAwICk7XG5gO1xuXG5leHBvcnQgY29uc3QgR3JpZExpbmVYID0gc3R5bGVkKCBHcmlkTGluZSApYFxuXHRoZWlnaHQ6IDFweDtcblx0bGVmdDogMXB4O1xuXHRyaWdodDogMXB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IEdyaWRMaW5lWSA9IHN0eWxlZCggR3JpZExpbmUgKWBcblx0d2lkdGg6IDFweDtcblx0dG9wOiAxcHg7XG5cdGJvdHRvbTogMXB4O1xuYDtcbiJdfQ== */"));
  var GridView = /* @__PURE__ */ createStyled("div", false ? {
    target: "eeew7dm3"
  } : {
    target: "eeew7dm3",
    label: "GridView"
  })("left:50%;overflow:hidden;pointer-events:none;position:absolute;top:50%;transform:translate3d( -50%, -50%, 0 );z-index:1;@media not ( prefers-reduced-motion ){transition:opacity 100ms linear;}opacity:", ({
    showOverlay
  }) => showOverlay ? 1 : 0, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvY2FsLXBvaW50LXBpY2tlci1zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvR2tDIiwiZmlsZSI6ImZvY2FsLXBvaW50LXBpY2tlci1zdHlsZS50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgRmxleCB9IGZyb20gJy4uLy4uL2ZsZXgnO1xuaW1wb3J0IFVuaXRDb250cm9sIGZyb20gJy4uLy4uL3VuaXQtY29udHJvbCc7XG5pbXBvcnQgeyBWaWV3IH0gZnJvbSAnLi4vLi4vdmlldyc7XG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgYm94U2l6aW5nUmVzZXQsIGZvbnQgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7IEZvY2FsUG9pbnRQaWNrZXJDb250cm9sc1Byb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgSU5JVElBTF9CT1VORFMgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBDb250YWluZXIgPSBzdHlsZWQoIFZpZXcgKWBcblx0Ym9yZGVyOiAwO1xuXHRwYWRkaW5nOiAwO1xuXHRtYXJnaW46IDA7XG5cdGZvbnQtZmFtaWx5OiAkeyBmb250KCAnZGVmYXVsdC5mb250RmFtaWx5JyApIH07XG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0JHsgYm94U2l6aW5nUmVzZXQgfVxuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHdpZHRoOiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGN1cnNvcjogcG9pbnRlcjtcblx0ZGlzcGxheTogaW5saW5lLWZsZXg7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRtYXJnaW46IGF1dG87XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0aGVpZ2h0OiAxMDAlO1xuXG5cdCY6YWZ0ZXIge1xuXHRcdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdFx0Ym90dG9tOiAwO1xuXHRcdGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCByZ2JhKCAwLCAwLCAwLCAwLjEgKTtcblx0XHRjb250ZW50OiAnJztcblx0XHRsZWZ0OiAwO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRyaWdodDogMDtcblx0XHR0b3A6IDA7XG5cdH1cblxuXHRpbWcsXG5cdHZpZGVvIHtcblx0XHRib3JkZXItcmFkaXVzOiBpbmhlcml0O1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0aGVpZ2h0OiBhdXRvO1xuXHRcdG1hcmdpbjogMDtcblx0XHRtYXgtaGVpZ2h0OiAxMDAlO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0XHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0XHR1c2VyLXNlbGVjdDogbm9uZTtcblx0XHR3aWR0aDogMTAwJTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhUGxhY2Vob2xkZXIgPSBzdHlsZWQuZGl2YFxuXHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMuZ3JheVsgMTAwIF0gfTtcblx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0aGVpZ2h0OiAkeyBJTklUSUFMX0JPVU5EUy5oZWlnaHQgfXB4O1xuXHRtYXgtd2lkdGg6IDI4MHB4O1xuXHRtaW4td2lkdGg6ICR7IElOSVRJQUxfQk9VTkRTLndpZHRoIH1weDtcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkVW5pdENvbnRyb2wgPSBzdHlsZWQoIFVuaXRDb250cm9sIClgXG5cdHdpZHRoOiAxMDAlO1xuYDtcblxuY29uc3QgZXh0cmFIZWxwVGV4dE1hcmdpbiA9ICgge1xuXHRoYXNIZWxwVGV4dCA9IGZhbHNlLFxufTogRm9jYWxQb2ludFBpY2tlckNvbnRyb2xzUHJvcHMgKSA9PiB7XG5cdHJldHVybiBoYXNIZWxwVGV4dFxuXHRcdD8gY3NzYFxuXHRcdFx0XHRwYWRkaW5nLWJvdHRvbTogMWVtO1xuXHRcdCAgYFxuXHRcdDogdW5kZWZpbmVkO1xufTtcblxuZXhwb3J0IGNvbnN0IENvbnRyb2xXcmFwcGVyID0gc3R5bGVkKCBGbGV4IClgXG5cdG1heC13aWR0aDogMzIwcHg7XG5cdHBhZGRpbmctdG9wOiAxZW07XG5cblx0JHsgZXh0cmFIZWxwVGV4dE1hcmdpbiB9XG5gO1xuXG5leHBvcnQgY29uc3QgR3JpZFZpZXcgPSBzdHlsZWQuZGl2YFxuXHRsZWZ0OiA1MCU7XG5cdG92ZXJmbG93OiBoaWRkZW47XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRvcDogNTAlO1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZTNkKCAtNTAlLCAtNTAlLCAwICk7XG5cdHotaW5kZXg6IDE7XG5cblx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0dHJhbnNpdGlvbjogb3BhY2l0eSAxMDBtcyBsaW5lYXI7XG5cdH1cblxuXHRvcGFjaXR5OiAkeyAoIHsgc2hvd092ZXJsYXkgfTogeyBzaG93T3ZlcmxheT86IGJvb2xlYW4gfSApID0+XG5cdFx0c2hvd092ZXJsYXkgPyAxIDogMCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEdyaWRMaW5lID0gc3R5bGVkLmRpdmBcblx0YmFja2dyb3VuZDogcmdiYSggMjU1LCAyNTUsIDI1NSwgMC40ICk7XG5cdGJhY2tkcm9wLWZpbHRlcjogYmx1ciggMTZweCApIHNhdHVyYXRlKCAxODAlICk7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dHJhbnNmb3JtOiB0cmFuc2xhdGVaKCAwICk7XG5gO1xuXG5leHBvcnQgY29uc3QgR3JpZExpbmVYID0gc3R5bGVkKCBHcmlkTGluZSApYFxuXHRoZWlnaHQ6IDFweDtcblx0bGVmdDogMXB4O1xuXHRyaWdodDogMXB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IEdyaWRMaW5lWSA9IHN0eWxlZCggR3JpZExpbmUgKWBcblx0d2lkdGg6IDFweDtcblx0dG9wOiAxcHg7XG5cdGJvdHRvbTogMXB4O1xuYDtcbiJdfQ== */"));
  var GridLine = /* @__PURE__ */ createStyled("div", false ? {
    target: "eeew7dm2"
  } : {
    target: "eeew7dm2",
    label: "GridLine"
  })(false ? {
    name: "1yzbo24",
    styles: "background:rgba( 255, 255, 255, 0.4 );backdrop-filter:blur( 16px ) saturate( 180% );position:absolute;transform:translateZ( 0 )"
  } : {
    name: "1yzbo24",
    styles: "background:rgba( 255, 255, 255, 0.4 );backdrop-filter:blur( 16px ) saturate( 180% );position:absolute;transform:translateZ( 0 )/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvY2FsLXBvaW50LXBpY2tlci1zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxSGtDIiwiZmlsZSI6ImZvY2FsLXBvaW50LXBpY2tlci1zdHlsZS50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgRmxleCB9IGZyb20gJy4uLy4uL2ZsZXgnO1xuaW1wb3J0IFVuaXRDb250cm9sIGZyb20gJy4uLy4uL3VuaXQtY29udHJvbCc7XG5pbXBvcnQgeyBWaWV3IH0gZnJvbSAnLi4vLi4vdmlldyc7XG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgYm94U2l6aW5nUmVzZXQsIGZvbnQgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7IEZvY2FsUG9pbnRQaWNrZXJDb250cm9sc1Byb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgSU5JVElBTF9CT1VORFMgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBDb250YWluZXIgPSBzdHlsZWQoIFZpZXcgKWBcblx0Ym9yZGVyOiAwO1xuXHRwYWRkaW5nOiAwO1xuXHRtYXJnaW46IDA7XG5cdGZvbnQtZmFtaWx5OiAkeyBmb250KCAnZGVmYXVsdC5mb250RmFtaWx5JyApIH07XG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0JHsgYm94U2l6aW5nUmVzZXQgfVxuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHdpZHRoOiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGN1cnNvcjogcG9pbnRlcjtcblx0ZGlzcGxheTogaW5saW5lLWZsZXg7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRtYXJnaW46IGF1dG87XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0aGVpZ2h0OiAxMDAlO1xuXG5cdCY6YWZ0ZXIge1xuXHRcdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdFx0Ym90dG9tOiAwO1xuXHRcdGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCByZ2JhKCAwLCAwLCAwLCAwLjEgKTtcblx0XHRjb250ZW50OiAnJztcblx0XHRsZWZ0OiAwO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRyaWdodDogMDtcblx0XHR0b3A6IDA7XG5cdH1cblxuXHRpbWcsXG5cdHZpZGVvIHtcblx0XHRib3JkZXItcmFkaXVzOiBpbmhlcml0O1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0aGVpZ2h0OiBhdXRvO1xuXHRcdG1hcmdpbjogMDtcblx0XHRtYXgtaGVpZ2h0OiAxMDAlO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0XHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0XHR1c2VyLXNlbGVjdDogbm9uZTtcblx0XHR3aWR0aDogMTAwJTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhUGxhY2Vob2xkZXIgPSBzdHlsZWQuZGl2YFxuXHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMuZ3JheVsgMTAwIF0gfTtcblx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0aGVpZ2h0OiAkeyBJTklUSUFMX0JPVU5EUy5oZWlnaHQgfXB4O1xuXHRtYXgtd2lkdGg6IDI4MHB4O1xuXHRtaW4td2lkdGg6ICR7IElOSVRJQUxfQk9VTkRTLndpZHRoIH1weDtcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkVW5pdENvbnRyb2wgPSBzdHlsZWQoIFVuaXRDb250cm9sIClgXG5cdHdpZHRoOiAxMDAlO1xuYDtcblxuY29uc3QgZXh0cmFIZWxwVGV4dE1hcmdpbiA9ICgge1xuXHRoYXNIZWxwVGV4dCA9IGZhbHNlLFxufTogRm9jYWxQb2ludFBpY2tlckNvbnRyb2xzUHJvcHMgKSA9PiB7XG5cdHJldHVybiBoYXNIZWxwVGV4dFxuXHRcdD8gY3NzYFxuXHRcdFx0XHRwYWRkaW5nLWJvdHRvbTogMWVtO1xuXHRcdCAgYFxuXHRcdDogdW5kZWZpbmVkO1xufTtcblxuZXhwb3J0IGNvbnN0IENvbnRyb2xXcmFwcGVyID0gc3R5bGVkKCBGbGV4IClgXG5cdG1heC13aWR0aDogMzIwcHg7XG5cdHBhZGRpbmctdG9wOiAxZW07XG5cblx0JHsgZXh0cmFIZWxwVGV4dE1hcmdpbiB9XG5gO1xuXG5leHBvcnQgY29uc3QgR3JpZFZpZXcgPSBzdHlsZWQuZGl2YFxuXHRsZWZ0OiA1MCU7XG5cdG92ZXJmbG93OiBoaWRkZW47XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRvcDogNTAlO1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZTNkKCAtNTAlLCAtNTAlLCAwICk7XG5cdHotaW5kZXg6IDE7XG5cblx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0dHJhbnNpdGlvbjogb3BhY2l0eSAxMDBtcyBsaW5lYXI7XG5cdH1cblxuXHRvcGFjaXR5OiAkeyAoIHsgc2hvd092ZXJsYXkgfTogeyBzaG93T3ZlcmxheT86IGJvb2xlYW4gfSApID0+XG5cdFx0c2hvd092ZXJsYXkgPyAxIDogMCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEdyaWRMaW5lID0gc3R5bGVkLmRpdmBcblx0YmFja2dyb3VuZDogcmdiYSggMjU1LCAyNTUsIDI1NSwgMC40ICk7XG5cdGJhY2tkcm9wLWZpbHRlcjogYmx1ciggMTZweCApIHNhdHVyYXRlKCAxODAlICk7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dHJhbnNmb3JtOiB0cmFuc2xhdGVaKCAwICk7XG5gO1xuXG5leHBvcnQgY29uc3QgR3JpZExpbmVYID0gc3R5bGVkKCBHcmlkTGluZSApYFxuXHRoZWlnaHQ6IDFweDtcblx0bGVmdDogMXB4O1xuXHRyaWdodDogMXB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IEdyaWRMaW5lWSA9IHN0eWxlZCggR3JpZExpbmUgKWBcblx0d2lkdGg6IDFweDtcblx0dG9wOiAxcHg7XG5cdGJvdHRvbTogMXB4O1xuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__32
  });
  var GridLineX = /* @__PURE__ */ createStyled(GridLine, false ? {
    target: "eeew7dm1"
  } : {
    target: "eeew7dm1",
    label: "GridLineX"
  })(false ? {
    name: "1sw8ur",
    styles: "height:1px;left:1px;right:1px"
  } : {
    name: "1sw8ur",
    styles: "height:1px;left:1px;right:1px/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvY2FsLXBvaW50LXBpY2tlci1zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE0SDJDIiwiZmlsZSI6ImZvY2FsLXBvaW50LXBpY2tlci1zdHlsZS50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgRmxleCB9IGZyb20gJy4uLy4uL2ZsZXgnO1xuaW1wb3J0IFVuaXRDb250cm9sIGZyb20gJy4uLy4uL3VuaXQtY29udHJvbCc7XG5pbXBvcnQgeyBWaWV3IH0gZnJvbSAnLi4vLi4vdmlldyc7XG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgYm94U2l6aW5nUmVzZXQsIGZvbnQgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7IEZvY2FsUG9pbnRQaWNrZXJDb250cm9sc1Byb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgSU5JVElBTF9CT1VORFMgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBDb250YWluZXIgPSBzdHlsZWQoIFZpZXcgKWBcblx0Ym9yZGVyOiAwO1xuXHRwYWRkaW5nOiAwO1xuXHRtYXJnaW46IDA7XG5cdGZvbnQtZmFtaWx5OiAkeyBmb250KCAnZGVmYXVsdC5mb250RmFtaWx5JyApIH07XG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0JHsgYm94U2l6aW5nUmVzZXQgfVxuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHdpZHRoOiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGN1cnNvcjogcG9pbnRlcjtcblx0ZGlzcGxheTogaW5saW5lLWZsZXg7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRtYXJnaW46IGF1dG87XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0aGVpZ2h0OiAxMDAlO1xuXG5cdCY6YWZ0ZXIge1xuXHRcdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdFx0Ym90dG9tOiAwO1xuXHRcdGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCByZ2JhKCAwLCAwLCAwLCAwLjEgKTtcblx0XHRjb250ZW50OiAnJztcblx0XHRsZWZ0OiAwO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRyaWdodDogMDtcblx0XHR0b3A6IDA7XG5cdH1cblxuXHRpbWcsXG5cdHZpZGVvIHtcblx0XHRib3JkZXItcmFkaXVzOiBpbmhlcml0O1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0aGVpZ2h0OiBhdXRvO1xuXHRcdG1hcmdpbjogMDtcblx0XHRtYXgtaGVpZ2h0OiAxMDAlO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0XHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0XHR1c2VyLXNlbGVjdDogbm9uZTtcblx0XHR3aWR0aDogMTAwJTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhUGxhY2Vob2xkZXIgPSBzdHlsZWQuZGl2YFxuXHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMuZ3JheVsgMTAwIF0gfTtcblx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0aGVpZ2h0OiAkeyBJTklUSUFMX0JPVU5EUy5oZWlnaHQgfXB4O1xuXHRtYXgtd2lkdGg6IDI4MHB4O1xuXHRtaW4td2lkdGg6ICR7IElOSVRJQUxfQk9VTkRTLndpZHRoIH1weDtcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkVW5pdENvbnRyb2wgPSBzdHlsZWQoIFVuaXRDb250cm9sIClgXG5cdHdpZHRoOiAxMDAlO1xuYDtcblxuY29uc3QgZXh0cmFIZWxwVGV4dE1hcmdpbiA9ICgge1xuXHRoYXNIZWxwVGV4dCA9IGZhbHNlLFxufTogRm9jYWxQb2ludFBpY2tlckNvbnRyb2xzUHJvcHMgKSA9PiB7XG5cdHJldHVybiBoYXNIZWxwVGV4dFxuXHRcdD8gY3NzYFxuXHRcdFx0XHRwYWRkaW5nLWJvdHRvbTogMWVtO1xuXHRcdCAgYFxuXHRcdDogdW5kZWZpbmVkO1xufTtcblxuZXhwb3J0IGNvbnN0IENvbnRyb2xXcmFwcGVyID0gc3R5bGVkKCBGbGV4IClgXG5cdG1heC13aWR0aDogMzIwcHg7XG5cdHBhZGRpbmctdG9wOiAxZW07XG5cblx0JHsgZXh0cmFIZWxwVGV4dE1hcmdpbiB9XG5gO1xuXG5leHBvcnQgY29uc3QgR3JpZFZpZXcgPSBzdHlsZWQuZGl2YFxuXHRsZWZ0OiA1MCU7XG5cdG92ZXJmbG93OiBoaWRkZW47XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRvcDogNTAlO1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZTNkKCAtNTAlLCAtNTAlLCAwICk7XG5cdHotaW5kZXg6IDE7XG5cblx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0dHJhbnNpdGlvbjogb3BhY2l0eSAxMDBtcyBsaW5lYXI7XG5cdH1cblxuXHRvcGFjaXR5OiAkeyAoIHsgc2hvd092ZXJsYXkgfTogeyBzaG93T3ZlcmxheT86IGJvb2xlYW4gfSApID0+XG5cdFx0c2hvd092ZXJsYXkgPyAxIDogMCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEdyaWRMaW5lID0gc3R5bGVkLmRpdmBcblx0YmFja2dyb3VuZDogcmdiYSggMjU1LCAyNTUsIDI1NSwgMC40ICk7XG5cdGJhY2tkcm9wLWZpbHRlcjogYmx1ciggMTZweCApIHNhdHVyYXRlKCAxODAlICk7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dHJhbnNmb3JtOiB0cmFuc2xhdGVaKCAwICk7XG5gO1xuXG5leHBvcnQgY29uc3QgR3JpZExpbmVYID0gc3R5bGVkKCBHcmlkTGluZSApYFxuXHRoZWlnaHQ6IDFweDtcblx0bGVmdDogMXB4O1xuXHRyaWdodDogMXB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IEdyaWRMaW5lWSA9IHN0eWxlZCggR3JpZExpbmUgKWBcblx0d2lkdGg6IDFweDtcblx0dG9wOiAxcHg7XG5cdGJvdHRvbTogMXB4O1xuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__32
  });
  var GridLineY = /* @__PURE__ */ createStyled(GridLine, false ? {
    target: "eeew7dm0"
  } : {
    target: "eeew7dm0",
    label: "GridLineY"
  })(false ? {
    name: "188vg4t",
    styles: "width:1px;top:1px;bottom:1px"
  } : {
    name: "188vg4t",
    styles: "width:1px;top:1px;bottom:1px/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvY2FsLXBvaW50LXBpY2tlci1zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrSTJDIiwiZmlsZSI6ImZvY2FsLXBvaW50LXBpY2tlci1zdHlsZS50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgRmxleCB9IGZyb20gJy4uLy4uL2ZsZXgnO1xuaW1wb3J0IFVuaXRDb250cm9sIGZyb20gJy4uLy4uL3VuaXQtY29udHJvbCc7XG5pbXBvcnQgeyBWaWV3IH0gZnJvbSAnLi4vLi4vdmlldyc7XG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgYm94U2l6aW5nUmVzZXQsIGZvbnQgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7IEZvY2FsUG9pbnRQaWNrZXJDb250cm9sc1Byb3BzIH0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgSU5JVElBTF9CT1VORFMgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBDb250YWluZXIgPSBzdHlsZWQoIFZpZXcgKWBcblx0Ym9yZGVyOiAwO1xuXHRwYWRkaW5nOiAwO1xuXHRtYXJnaW46IDA7XG5cdGZvbnQtZmFtaWx5OiAkeyBmb250KCAnZGVmYXVsdC5mb250RmFtaWx5JyApIH07XG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0JHsgYm94U2l6aW5nUmVzZXQgfVxuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdHdpZHRoOiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGN1cnNvcjogcG9pbnRlcjtcblx0ZGlzcGxheTogaW5saW5lLWZsZXg7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRtYXJnaW46IGF1dG87XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0aGVpZ2h0OiAxMDAlO1xuXG5cdCY6YWZ0ZXIge1xuXHRcdGJvcmRlci1yYWRpdXM6IGluaGVyaXQ7XG5cdFx0Ym90dG9tOiAwO1xuXHRcdGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCByZ2JhKCAwLCAwLCAwLCAwLjEgKTtcblx0XHRjb250ZW50OiAnJztcblx0XHRsZWZ0OiAwO1xuXHRcdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRyaWdodDogMDtcblx0XHR0b3A6IDA7XG5cdH1cblxuXHRpbWcsXG5cdHZpZGVvIHtcblx0XHRib3JkZXItcmFkaXVzOiBpbmhlcml0O1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0aGVpZ2h0OiBhdXRvO1xuXHRcdG1hcmdpbjogMDtcblx0XHRtYXgtaGVpZ2h0OiAxMDAlO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0XHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0XHR1c2VyLXNlbGVjdDogbm9uZTtcblx0XHR3aWR0aDogMTAwJTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IE1lZGlhUGxhY2Vob2xkZXIgPSBzdHlsZWQuZGl2YFxuXHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMuZ3JheVsgMTAwIF0gfTtcblx0Ym9yZGVyLXJhZGl1czogaW5oZXJpdDtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0aGVpZ2h0OiAkeyBJTklUSUFMX0JPVU5EUy5oZWlnaHQgfXB4O1xuXHRtYXgtd2lkdGg6IDI4MHB4O1xuXHRtaW4td2lkdGg6ICR7IElOSVRJQUxfQk9VTkRTLndpZHRoIH1weDtcblx0d2lkdGg6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkVW5pdENvbnRyb2wgPSBzdHlsZWQoIFVuaXRDb250cm9sIClgXG5cdHdpZHRoOiAxMDAlO1xuYDtcblxuY29uc3QgZXh0cmFIZWxwVGV4dE1hcmdpbiA9ICgge1xuXHRoYXNIZWxwVGV4dCA9IGZhbHNlLFxufTogRm9jYWxQb2ludFBpY2tlckNvbnRyb2xzUHJvcHMgKSA9PiB7XG5cdHJldHVybiBoYXNIZWxwVGV4dFxuXHRcdD8gY3NzYFxuXHRcdFx0XHRwYWRkaW5nLWJvdHRvbTogMWVtO1xuXHRcdCAgYFxuXHRcdDogdW5kZWZpbmVkO1xufTtcblxuZXhwb3J0IGNvbnN0IENvbnRyb2xXcmFwcGVyID0gc3R5bGVkKCBGbGV4IClgXG5cdG1heC13aWR0aDogMzIwcHg7XG5cdHBhZGRpbmctdG9wOiAxZW07XG5cblx0JHsgZXh0cmFIZWxwVGV4dE1hcmdpbiB9XG5gO1xuXG5leHBvcnQgY29uc3QgR3JpZFZpZXcgPSBzdHlsZWQuZGl2YFxuXHRsZWZ0OiA1MCU7XG5cdG92ZXJmbG93OiBoaWRkZW47XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRvcDogNTAlO1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZTNkKCAtNTAlLCAtNTAlLCAwICk7XG5cdHotaW5kZXg6IDE7XG5cblx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0dHJhbnNpdGlvbjogb3BhY2l0eSAxMDBtcyBsaW5lYXI7XG5cdH1cblxuXHRvcGFjaXR5OiAkeyAoIHsgc2hvd092ZXJsYXkgfTogeyBzaG93T3ZlcmxheT86IGJvb2xlYW4gfSApID0+XG5cdFx0c2hvd092ZXJsYXkgPyAxIDogMCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEdyaWRMaW5lID0gc3R5bGVkLmRpdmBcblx0YmFja2dyb3VuZDogcmdiYSggMjU1LCAyNTUsIDI1NSwgMC40ICk7XG5cdGJhY2tkcm9wLWZpbHRlcjogYmx1ciggMTZweCApIHNhdHVyYXRlKCAxODAlICk7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dHJhbnNmb3JtOiB0cmFuc2xhdGVaKCAwICk7XG5gO1xuXG5leHBvcnQgY29uc3QgR3JpZExpbmVYID0gc3R5bGVkKCBHcmlkTGluZSApYFxuXHRoZWlnaHQ6IDFweDtcblx0bGVmdDogMXB4O1xuXHRyaWdodDogMXB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IEdyaWRMaW5lWSA9IHN0eWxlZCggR3JpZExpbmUgKWBcblx0d2lkdGg6IDFweDtcblx0dG9wOiAxcHg7XG5cdGJvdHRvbTogMXB4O1xuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__32
  });

  // packages/components/build-module/focal-point-picker/controls.mjs
  var import_jsx_runtime207 = __toESM(require_jsx_runtime(), 1);
  var TEXTCONTROL_MIN = 0;
  var TEXTCONTROL_MAX = 100;
  var noop13 = () => {
  };
  function FocalPointPickerControls({
    hasHelpText,
    onChange = noop13,
    point = {
      x: 0.5,
      y: 0.5
    }
  }) {
    const valueX = fractionToPercentage(point.x);
    const valueY = fractionToPercentage(point.y);
    const handleChange = (value, axis) => {
      if (value === void 0) {
        return;
      }
      const num = parseInt(value, 10);
      if (!isNaN(num)) {
        onChange({
          ...point,
          [axis]: num / 100
        });
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime207.jsxs)(ControlWrapper, {
      className: "focal-point-picker__controls",
      hasHelpText,
      gap: 4,
      children: [/* @__PURE__ */ (0, import_jsx_runtime207.jsx)(FocalPointUnitControl, {
        label: (0, import_i18n50.__)("Left"),
        "aria-label": (0, import_i18n50.__)("Focal point left position"),
        value: [valueX, "%"].join(""),
        onChange: (next2) => handleChange(next2, "x"),
        dragDirection: "e"
      }), /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(FocalPointUnitControl, {
        label: (0, import_i18n50.__)("Top"),
        "aria-label": (0, import_i18n50.__)("Focal point top position"),
        value: [valueY, "%"].join(""),
        onChange: (next2) => handleChange(next2, "y"),
        dragDirection: "s"
      })]
    });
  }
  function FocalPointUnitControl(props) {
    return /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(StyledUnitControl2, {
      __next40pxDefaultSize: true,
      className: "focal-point-picker__controls-position-unit-control",
      labelPosition: "top",
      max: TEXTCONTROL_MAX,
      min: TEXTCONTROL_MIN,
      units: [{
        value: "%",
        label: "%"
      }],
      ...props
    });
  }

  // packages/components/build-module/focal-point-picker/styles/focal-point-style.mjs
  var PointerCircle = /* @__PURE__ */ createStyled("div", false ? {
    target: "e19snlhg0"
  } : {
    target: "e19snlhg0",
    label: "PointerCircle"
  })("background-color:transparent;cursor:grab;height:40px;margin:-20px 0 0 -20px;position:absolute;user-select:none;width:40px;will-change:transform;z-index:10000;background:rgba( 255, 255, 255, 0.4 );border:1px solid rgba( 255, 255, 255, 0.4 );border-radius:", config_values_default.radiusRound, ";backdrop-filter:blur( 16px ) saturate( 180% );box-shadow:rgb( 0 0 0 / 10% ) 0px 0px 8px;@media not ( prefers-reduced-motion ){transition:transform 100ms linear;}", ({
    isDragging: isDragging2
  }) => isDragging2 && `
			box-shadow: rgb( 0 0 0 / 12% ) 0px 0px 10px;
			transform: scale( 1.1 );
			cursor: grabbing;
			`, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvY2FsLXBvaW50LXN0eWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVV1QyIsImZpbGUiOiJmb2NhbC1wb2ludC1zdHlsZS50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09ORklHIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuXG5leHBvcnQgY29uc3QgUG9pbnRlckNpcmNsZSA9IHN0eWxlZC5kaXZgXG5cdGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuXHRjdXJzb3I6IGdyYWI7XG5cdGhlaWdodDogNDBweDtcblx0bWFyZ2luOiAtMjBweCAwIDAgLTIwcHg7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdHdpZHRoOiA0MHB4O1xuXHR3aWxsLWNoYW5nZTogdHJhbnNmb3JtO1xuXHR6LWluZGV4OiAxMDAwMDtcblx0YmFja2dyb3VuZDogcmdiYSggMjU1LCAyNTUsIDI1NSwgMC40ICk7XG5cdGJvcmRlcjogMXB4IHNvbGlkIHJnYmEoIDI1NSwgMjU1LCAyNTUsIDAuNCApO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzUm91bmQgfTtcblx0YmFja2Ryb3AtZmlsdGVyOiBibHVyKCAxNnB4ICkgc2F0dXJhdGUoIDE4MCUgKTtcblx0Ym94LXNoYWRvdzogcmdiKCAwIDAgMCAvIDEwJSApIDBweCAwcHggOHB4O1xuXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdHRyYW5zaXRpb246IHRyYW5zZm9ybSAxMDBtcyBsaW5lYXI7XG5cdH1cblxuXHQkeyAoIHsgaXNEcmFnZ2luZyB9OiB7IGlzRHJhZ2dpbmc6IGJvb2xlYW4gfSApID0+XG5cdFx0aXNEcmFnZ2luZyAmJlxuXHRcdGBcblx0XHRcdGJveC1zaGFkb3c6IHJnYiggMCAwIDAgLyAxMiUgKSAwcHggMHB4IDEwcHg7XG5cdFx0XHR0cmFuc2Zvcm06IHNjYWxlKCAxLjEgKTtcblx0XHRcdGN1cnNvcjogZ3JhYmJpbmc7XG5cdFx0XHRgIH1cbmA7XG4iXX0= */"));

  // packages/components/build-module/focal-point-picker/focal-point.mjs
  var import_jsx_runtime208 = __toESM(require_jsx_runtime(), 1);
  function FocalPoint({
    left = "50%",
    top = "50%",
    ...props
  }) {
    const style2 = {
      left,
      top
    };
    return /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(PointerCircle, {
      ...props,
      className: "components-focal-point-picker__icon_container",
      style: style2
    });
  }

  // packages/components/build-module/focal-point-picker/grid.mjs
  var import_jsx_runtime209 = __toESM(require_jsx_runtime(), 1);
  function FocalPointPickerGrid({
    bounds,
    ...props
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)(GridView, {
      ...props,
      className: "components-focal-point-picker__grid",
      style: {
        width: bounds.width,
        height: bounds.height
      },
      children: [/* @__PURE__ */ (0, import_jsx_runtime209.jsx)(GridLineX, {
        style: {
          top: "33%"
        }
      }), /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(GridLineX, {
        style: {
          top: "66%"
        }
      }), /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(GridLineY, {
        style: {
          left: "33%"
        }
      }), /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(GridLineY, {
        style: {
          left: "66%"
        }
      })]
    });
  }

  // packages/components/build-module/focal-point-picker/media.mjs
  var import_jsx_runtime210 = __toESM(require_jsx_runtime(), 1);
  function Media2({
    alt,
    autoPlay,
    src,
    onLoad,
    mediaRef,
    // Exposing muted prop for test rendering purposes
    // https://github.com/testing-library/react-testing-library/issues/470
    muted: muted2 = true,
    ...props
  }) {
    if (!src) {
      return /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(MediaPlaceholder, {
        className: "components-focal-point-picker__media components-focal-point-picker__media--placeholder",
        ref: mediaRef,
        ...props
      });
    }
    const isVideo = isVideoType(src);
    return isVideo ? /* @__PURE__ */ (0, import_jsx_runtime210.jsx)("video", {
      ...props,
      autoPlay,
      className: "components-focal-point-picker__media components-focal-point-picker__media--video",
      loop: true,
      muted: muted2,
      onLoadedData: onLoad,
      ref: mediaRef,
      src
    }) : /* @__PURE__ */ (0, import_jsx_runtime210.jsx)("img", {
      ...props,
      alt,
      className: "components-focal-point-picker__media components-focal-point-picker__media--image",
      onLoad,
      ref: mediaRef,
      src
    });
  }

  // packages/components/build-module/focal-point-picker/index.mjs
  var import_jsx_runtime211 = __toESM(require_jsx_runtime(), 1);
  var GRID_OVERLAY_TIMEOUT = 600;
  function FocalPointPicker({
    // Prevent passing to internal component.
    __nextHasNoMarginBottom: _2,
    autoPlay = true,
    className: className2,
    help,
    hideLabelFromVision,
    label,
    onChange,
    onDrag,
    onDragEnd,
    onDragStart,
    resolvePoint,
    url,
    value: valueProp = {
      x: 0.5,
      y: 0.5
    },
    ...restProps
  }) {
    const [point, setPoint] = (0, import_element139.useState)(valueProp);
    const [showGridOverlay, setShowGridOverlay] = (0, import_element139.useState)(false);
    const {
      startDrag,
      endDrag,
      isDragging: isDragging2
    } = (0, import_compose54.__experimentalUseDragging)({
      onDragStart: (event) => {
        dragAreaRef.current?.focus();
        const value = getValueWithinDragArea(event);
        if (!value) {
          return;
        }
        onDragStart?.(value, event);
        setPoint(value);
      },
      onDragMove: (event) => {
        event.preventDefault();
        const value = getValueWithinDragArea(event);
        if (!value) {
          return;
        }
        onDrag?.(value, event);
        setPoint(value);
      },
      onDragEnd: () => {
        onDragEnd?.();
        onChange?.(point);
      }
    });
    const {
      x: x2,
      y: y3
    } = isDragging2 ? point : valueProp;
    const dragAreaRef = (0, import_element139.useRef)(null);
    const [bounds, setBounds] = (0, import_element139.useState)(INITIAL_BOUNDS);
    const refUpdateBounds = (0, import_element139.useRef)(() => {
      if (!dragAreaRef.current) {
        return;
      }
      const {
        clientWidth: width,
        clientHeight: height
      } = dragAreaRef.current;
      setBounds(width > 0 && height > 0 ? {
        width,
        height
      } : {
        ...INITIAL_BOUNDS
      });
    });
    (0, import_element139.useEffect)(() => {
      const updateBounds = refUpdateBounds.current;
      if (!dragAreaRef.current) {
        return;
      }
      const {
        defaultView
      } = dragAreaRef.current.ownerDocument;
      defaultView?.addEventListener("resize", updateBounds);
      return () => defaultView?.removeEventListener("resize", updateBounds);
    }, []);
    (0, import_compose54.useIsomorphicLayoutEffect)(() => void refUpdateBounds.current(), []);
    const getValueWithinDragArea = ({
      clientX,
      clientY,
      shiftKey
    }) => {
      if (!dragAreaRef.current) {
        return;
      }
      const {
        top,
        left
      } = dragAreaRef.current.getBoundingClientRect();
      let nextX = (clientX - left) / bounds.width;
      let nextY = (clientY - top) / bounds.height;
      if (shiftKey) {
        nextX = Math.round(nextX / 0.1) * 0.1;
        nextY = Math.round(nextY / 0.1) * 0.1;
      }
      return getFinalValue({
        x: nextX,
        y: nextY
      });
    };
    const getFinalValue = (value) => {
      const resolvedValue = resolvePoint?.(value) ?? value;
      resolvedValue.x = Math.max(0, Math.min(resolvedValue.x, 1));
      resolvedValue.y = Math.max(0, Math.min(resolvedValue.y, 1));
      const roundToTwoDecimalPlaces = (n3) => Math.round(n3 * 100) / 100;
      return {
        x: roundToTwoDecimalPlaces(resolvedValue.x),
        y: roundToTwoDecimalPlaces(resolvedValue.y)
      };
    };
    const arrowKeyStep = (event) => {
      const {
        code,
        shiftKey
      } = event;
      if (!["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(code)) {
        return;
      }
      event.preventDefault();
      const value = {
        x: x2,
        y: y3
      };
      const step = shiftKey ? 0.1 : 0.01;
      const delta = code === "ArrowUp" || code === "ArrowLeft" ? -1 * step : step;
      const axis = code === "ArrowUp" || code === "ArrowDown" ? "y" : "x";
      value[axis] = value[axis] + delta;
      onChange?.(getFinalValue(value));
    };
    const focalPointPosition = {
      left: x2 !== void 0 ? x2 * bounds.width : 0.5 * bounds.width,
      top: y3 !== void 0 ? y3 * bounds.height : 0.5 * bounds.height
    };
    const classes = clsx_default("components-focal-point-picker-control", className2);
    const Label4 = hideLabelFromVision ? component_default2 : StyledLabel;
    use_update_effect_default(() => {
      setShowGridOverlay(true);
      const timeout = window.setTimeout(() => {
        setShowGridOverlay(false);
      }, GRID_OVERLAY_TIMEOUT);
      return () => window.clearTimeout(timeout);
    }, [x2, y3]);
    return /* @__PURE__ */ (0, import_jsx_runtime211.jsxs)(Container2, {
      ...restProps,
      as: "fieldset",
      className: classes,
      children: [!!label && /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(Label4, {
        as: "legend",
        children: label
      }), /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(MediaWrapper, {
        className: "components-focal-point-picker-wrapper",
        children: /* @__PURE__ */ (0, import_jsx_runtime211.jsxs)(MediaContainer, {
          className: "components-focal-point-picker",
          onKeyDown: arrowKeyStep,
          onMouseDown: startDrag,
          onBlur: () => {
            if (isDragging2) {
              endDrag();
            }
          },
          ref: dragAreaRef,
          role: "button",
          tabIndex: -1,
          children: [/* @__PURE__ */ (0, import_jsx_runtime211.jsx)(FocalPointPickerGrid, {
            bounds,
            showOverlay: showGridOverlay
          }), /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(Media2, {
            alt: (0, import_i18n51.__)("Media preview"),
            autoPlay,
            onLoad: refUpdateBounds.current,
            src: url
          }), /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(FocalPoint, {
            ...focalPointPosition,
            isDragging: isDragging2
          })]
        })
      }), /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(FocalPointPickerControls, {
        hasHelpText: !!help,
        point: {
          x: x2,
          y: y3
        },
        onChange: (value) => {
          onChange?.(getFinalValue(value));
        }
      }), !!help && /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(StyledHelp, {
        children: help
      })]
    });
  }
  var focal_point_picker_default = FocalPointPicker;

  // packages/components/build-module/focusable-iframe/index.mjs
  var import_compose55 = __toESM(require_compose(), 1);
  var import_deprecated16 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime212 = __toESM(require_jsx_runtime(), 1);
  function FocusableIframe({
    iframeRef,
    ...props
  }) {
    const ref = (0, import_compose55.useMergeRefs)([iframeRef, (0, import_compose55.useFocusableIframe)()]);
    (0, import_deprecated16.default)("wp.components.FocusableIframe", {
      since: "5.9",
      alternative: "wp.compose.useFocusableIframe"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime212.jsx)("iframe", {
      ref,
      ...props
    });
  }

  // packages/components/build-module/font-size-picker/index.mjs
  var import_i18n55 = __toESM(require_i18n(), 1);
  var import_element141 = __toESM(require_element(), 1);
  var import_compose56 = __toESM(require_compose(), 1);

  // packages/components/build-module/font-size-picker/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__33() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var Container3 = /* @__PURE__ */ createStyled("fieldset", false ? {
    target: "e8tqeku4"
  } : {
    target: "e8tqeku4",
    label: "Container"
  })(false ? {
    name: "k2q51s",
    styles: "border:0;margin:0;padding:0;display:contents"
  } : {
    name: "k2q51s",
    styles: "border:0;margin:0;padding:0;display:contents/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFjd0MiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgQmFzZUNvbnRyb2wgZnJvbSAnLi4vYmFzZS1jb250cm9sJztcbmltcG9ydCBCdXR0b24gZnJvbSAnLi4vYnV0dG9uJztcbmltcG9ydCBDdXN0b21TZWxlY3RDb250cm9sIGZyb20gJy4uL2N1c3RvbS1zZWxlY3QtY29udHJvbCc7XG5pbXBvcnQgeyBIU3RhY2sgfSBmcm9tICcuLi9oLXN0YWNrJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuXG5leHBvcnQgY29uc3QgQ29udGFpbmVyID0gc3R5bGVkLmZpZWxkc2V0YFxuXHRib3JkZXI6IDA7XG5cdG1hcmdpbjogMDtcblx0cGFkZGluZzogMDtcblx0ZGlzcGxheTogY29udGVudHM7XG5gO1xuXG5leHBvcnQgY29uc3QgSGVhZGVyID0gc3R5bGVkKCBIU3RhY2sgKWBcblx0aGVpZ2h0OiAkeyBzcGFjZSggNCApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSGVhZGVyVG9nZ2xlID0gc3R5bGVkKCBCdXR0b24gKWBcblx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIC0xICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBIZWFkZXJMYWJlbCA9IHN0eWxlZCggQmFzZUNvbnRyb2wuVmlzdWFsTGFiZWwgKWBcblx0ZGlzcGxheTogZmxleDtcblx0Z2FwOiAkeyBzcGFjZSggMSApIH07XG5cdGp1c3RpZnktY29udGVudDogZmxleC1zdGFydDtcblx0bWFyZ2luLWJvdHRvbTogMDtcbmA7XG5cbi8vIEN1c3RvbSBzdHlsZWQgY29tcG9uZW50IHRvIGZvcmNlIGxpbmUgYnJlYWsgYmV0d2VlbiBuYW1lIGFuZCBoaW50IHdoaWxlIGtlZXBpbmcgY2hlY2ttYXJrIG9uIHRoZSByaWdodFxuZXhwb3J0IGNvbnN0IFN0eWxlZEN1c3RvbVNlbGVjdENvbnRyb2wgPSBzdHlsZWQoIEN1c3RvbVNlbGVjdENvbnRyb2wgKWBcblx0LmNvbXBvbmVudHMtY3VzdG9tLXNlbGVjdC1jb250cm9sX19pdGVtXG5cdFx0LmNvbXBvbmVudHMtY3VzdG9tLXNlbGVjdC1jb250cm9sX19pdGVtLWhpbnQge1xuXHRcdHdpZHRoOiAxMDAlO1xuXHR9XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__33
  });
  var Header2 = /* @__PURE__ */ createStyled(component_default9, false ? {
    target: "e8tqeku3"
  } : {
    target: "e8tqeku3",
    label: "Header"
  })("height:", space(4), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQnNDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IEJhc2VDb250cm9sIGZyb20gJy4uL2Jhc2UtY29udHJvbCc7XG5pbXBvcnQgQnV0dG9uIGZyb20gJy4uL2J1dHRvbic7XG5pbXBvcnQgQ3VzdG9tU2VsZWN0Q29udHJvbCBmcm9tICcuLi9jdXN0b20tc2VsZWN0LWNvbnRyb2wnO1xuaW1wb3J0IHsgSFN0YWNrIH0gZnJvbSAnLi4vaC1zdGFjayc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcblxuZXhwb3J0IGNvbnN0IENvbnRhaW5lciA9IHN0eWxlZC5maWVsZHNldGBcblx0Ym9yZGVyOiAwO1xuXHRtYXJnaW46IDA7XG5cdHBhZGRpbmc6IDA7XG5cdGRpc3BsYXk6IGNvbnRlbnRzO1xuYDtcblxuZXhwb3J0IGNvbnN0IEhlYWRlciA9IHN0eWxlZCggSFN0YWNrIClgXG5cdGhlaWdodDogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEhlYWRlclRvZ2dsZSA9IHN0eWxlZCggQnV0dG9uIClgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCAtMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSGVhZGVyTGFiZWwgPSBzdHlsZWQoIEJhc2VDb250cm9sLlZpc3VhbExhYmVsIClgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGdhcDogJHsgc3BhY2UoIDEgKSB9O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7XG5cdG1hcmdpbi1ib3R0b206IDA7XG5gO1xuXG4vLyBDdXN0b20gc3R5bGVkIGNvbXBvbmVudCB0byBmb3JjZSBsaW5lIGJyZWFrIGJldHdlZW4gbmFtZSBhbmQgaGludCB3aGlsZSBrZWVwaW5nIGNoZWNrbWFyayBvbiB0aGUgcmlnaHRcbmV4cG9ydCBjb25zdCBTdHlsZWRDdXN0b21TZWxlY3RDb250cm9sID0gc3R5bGVkKCBDdXN0b21TZWxlY3RDb250cm9sIClgXG5cdC5jb21wb25lbnRzLWN1c3RvbS1zZWxlY3QtY29udHJvbF9faXRlbVxuXHRcdC5jb21wb25lbnRzLWN1c3RvbS1zZWxlY3QtY29udHJvbF9faXRlbS1oaW50IHtcblx0XHR3aWR0aDogMTAwJTtcblx0fVxuYDtcbiJdfQ== */"));
  var HeaderToggle = /* @__PURE__ */ createStyled(button_default, false ? {
    target: "e8tqeku2"
  } : {
    target: "e8tqeku2",
    label: "HeaderToggle"
  })("margin-top:", space(-1), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF5QjRDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IEJhc2VDb250cm9sIGZyb20gJy4uL2Jhc2UtY29udHJvbCc7XG5pbXBvcnQgQnV0dG9uIGZyb20gJy4uL2J1dHRvbic7XG5pbXBvcnQgQ3VzdG9tU2VsZWN0Q29udHJvbCBmcm9tICcuLi9jdXN0b20tc2VsZWN0LWNvbnRyb2wnO1xuaW1wb3J0IHsgSFN0YWNrIH0gZnJvbSAnLi4vaC1zdGFjayc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcblxuZXhwb3J0IGNvbnN0IENvbnRhaW5lciA9IHN0eWxlZC5maWVsZHNldGBcblx0Ym9yZGVyOiAwO1xuXHRtYXJnaW46IDA7XG5cdHBhZGRpbmc6IDA7XG5cdGRpc3BsYXk6IGNvbnRlbnRzO1xuYDtcblxuZXhwb3J0IGNvbnN0IEhlYWRlciA9IHN0eWxlZCggSFN0YWNrIClgXG5cdGhlaWdodDogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEhlYWRlclRvZ2dsZSA9IHN0eWxlZCggQnV0dG9uIClgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCAtMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSGVhZGVyTGFiZWwgPSBzdHlsZWQoIEJhc2VDb250cm9sLlZpc3VhbExhYmVsIClgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGdhcDogJHsgc3BhY2UoIDEgKSB9O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7XG5cdG1hcmdpbi1ib3R0b206IDA7XG5gO1xuXG4vLyBDdXN0b20gc3R5bGVkIGNvbXBvbmVudCB0byBmb3JjZSBsaW5lIGJyZWFrIGJldHdlZW4gbmFtZSBhbmQgaGludCB3aGlsZSBrZWVwaW5nIGNoZWNrbWFyayBvbiB0aGUgcmlnaHRcbmV4cG9ydCBjb25zdCBTdHlsZWRDdXN0b21TZWxlY3RDb250cm9sID0gc3R5bGVkKCBDdXN0b21TZWxlY3RDb250cm9sIClgXG5cdC5jb21wb25lbnRzLWN1c3RvbS1zZWxlY3QtY29udHJvbF9faXRlbVxuXHRcdC5jb21wb25lbnRzLWN1c3RvbS1zZWxlY3QtY29udHJvbF9faXRlbS1oaW50IHtcblx0XHR3aWR0aDogMTAwJTtcblx0fVxuYDtcbiJdfQ== */"));
  var HeaderLabel = /* @__PURE__ */ createStyled(base_control_default.VisualLabel, false ? {
    target: "e8tqeku1"
  } : {
    target: "e8tqeku1",
    label: "HeaderLabel"
  })("display:flex;gap:", space(1), ";justify-content:flex-start;margin-bottom:0;" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE2QjREIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IEJhc2VDb250cm9sIGZyb20gJy4uL2Jhc2UtY29udHJvbCc7XG5pbXBvcnQgQnV0dG9uIGZyb20gJy4uL2J1dHRvbic7XG5pbXBvcnQgQ3VzdG9tU2VsZWN0Q29udHJvbCBmcm9tICcuLi9jdXN0b20tc2VsZWN0LWNvbnRyb2wnO1xuaW1wb3J0IHsgSFN0YWNrIH0gZnJvbSAnLi4vaC1zdGFjayc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcblxuZXhwb3J0IGNvbnN0IENvbnRhaW5lciA9IHN0eWxlZC5maWVsZHNldGBcblx0Ym9yZGVyOiAwO1xuXHRtYXJnaW46IDA7XG5cdHBhZGRpbmc6IDA7XG5cdGRpc3BsYXk6IGNvbnRlbnRzO1xuYDtcblxuZXhwb3J0IGNvbnN0IEhlYWRlciA9IHN0eWxlZCggSFN0YWNrIClgXG5cdGhlaWdodDogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEhlYWRlclRvZ2dsZSA9IHN0eWxlZCggQnV0dG9uIClgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCAtMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSGVhZGVyTGFiZWwgPSBzdHlsZWQoIEJhc2VDb250cm9sLlZpc3VhbExhYmVsIClgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGdhcDogJHsgc3BhY2UoIDEgKSB9O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7XG5cdG1hcmdpbi1ib3R0b206IDA7XG5gO1xuXG4vLyBDdXN0b20gc3R5bGVkIGNvbXBvbmVudCB0byBmb3JjZSBsaW5lIGJyZWFrIGJldHdlZW4gbmFtZSBhbmQgaGludCB3aGlsZSBrZWVwaW5nIGNoZWNrbWFyayBvbiB0aGUgcmlnaHRcbmV4cG9ydCBjb25zdCBTdHlsZWRDdXN0b21TZWxlY3RDb250cm9sID0gc3R5bGVkKCBDdXN0b21TZWxlY3RDb250cm9sIClgXG5cdC5jb21wb25lbnRzLWN1c3RvbS1zZWxlY3QtY29udHJvbF9faXRlbVxuXHRcdC5jb21wb25lbnRzLWN1c3RvbS1zZWxlY3QtY29udHJvbF9faXRlbS1oaW50IHtcblx0XHR3aWR0aDogMTAwJTtcblx0fVxuYDtcbiJdfQ== */"));
  var StyledCustomSelectControl = /* @__PURE__ */ createStyled(custom_select_control_default, false ? {
    target: "e8tqeku0"
  } : {
    target: "e8tqeku0",
    label: "StyledCustomSelectControl"
  })(false ? {
    name: "anvx77",
    styles: ".components-custom-select-control__item .components-custom-select-control__item-hint{width:100%;}"
  } : {
    name: "anvx77",
    styles: ".components-custom-select-control__item .components-custom-select-control__item-hint{width:100%;}/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQ3NFIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IEJhc2VDb250cm9sIGZyb20gJy4uL2Jhc2UtY29udHJvbCc7XG5pbXBvcnQgQnV0dG9uIGZyb20gJy4uL2J1dHRvbic7XG5pbXBvcnQgQ3VzdG9tU2VsZWN0Q29udHJvbCBmcm9tICcuLi9jdXN0b20tc2VsZWN0LWNvbnRyb2wnO1xuaW1wb3J0IHsgSFN0YWNrIH0gZnJvbSAnLi4vaC1zdGFjayc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcblxuZXhwb3J0IGNvbnN0IENvbnRhaW5lciA9IHN0eWxlZC5maWVsZHNldGBcblx0Ym9yZGVyOiAwO1xuXHRtYXJnaW46IDA7XG5cdHBhZGRpbmc6IDA7XG5cdGRpc3BsYXk6IGNvbnRlbnRzO1xuYDtcblxuZXhwb3J0IGNvbnN0IEhlYWRlciA9IHN0eWxlZCggSFN0YWNrIClgXG5cdGhlaWdodDogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEhlYWRlclRvZ2dsZSA9IHN0eWxlZCggQnV0dG9uIClgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCAtMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSGVhZGVyTGFiZWwgPSBzdHlsZWQoIEJhc2VDb250cm9sLlZpc3VhbExhYmVsIClgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGdhcDogJHsgc3BhY2UoIDEgKSB9O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7XG5cdG1hcmdpbi1ib3R0b206IDA7XG5gO1xuXG4vLyBDdXN0b20gc3R5bGVkIGNvbXBvbmVudCB0byBmb3JjZSBsaW5lIGJyZWFrIGJldHdlZW4gbmFtZSBhbmQgaGludCB3aGlsZSBrZWVwaW5nIGNoZWNrbWFyayBvbiB0aGUgcmlnaHRcbmV4cG9ydCBjb25zdCBTdHlsZWRDdXN0b21TZWxlY3RDb250cm9sID0gc3R5bGVkKCBDdXN0b21TZWxlY3RDb250cm9sIClgXG5cdC5jb21wb25lbnRzLWN1c3RvbS1zZWxlY3QtY29udHJvbF9faXRlbVxuXHRcdC5jb21wb25lbnRzLWN1c3RvbS1zZWxlY3QtY29udHJvbF9faXRlbS1oaW50IHtcblx0XHR3aWR0aDogMTAwJTtcblx0fVxuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__33
  });

  // packages/components/build-module/font-size-picker/font-size-picker-select.mjs
  var import_i18n52 = __toESM(require_i18n(), 1);
  var import_element140 = __toESM(require_element(), 1);

  // packages/components/build-module/font-size-picker/utils.mjs
  function isSimpleCssValue(value) {
    const sizeRegex = /^[\d\.]+(px|em|rem|vw|vh|%|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)?$/i;
    return sizeRegex.test(String(value));
  }
  function generateFontSizeHint(fontSize) {
    if (fontSize.hint) {
      return fontSize.hint;
    }
    if (isSimpleCssValue(fontSize.size)) {
      return String(fontSize.size);
    }
    return void 0;
  }

  // packages/components/build-module/font-size-picker/font-size-picker-select.mjs
  var import_jsx_runtime213 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_OPTION = {
    key: "default",
    name: (0, import_i18n52.__)("Default"),
    value: void 0
  };
  var FontSizePickerSelect = (props) => {
    const {
      __next40pxDefaultSize,
      fontSizes,
      value,
      size: size3,
      valueMode = "literal",
      onChange
    } = props;
    const options2 = [DEFAULT_OPTION, ...fontSizes.map((fontSize) => {
      const hint = generateFontSizeHint(fontSize);
      return {
        key: fontSize.slug,
        name: fontSize.name || fontSize.slug,
        value: fontSize.size,
        hint
      };
    })];
    const selectedOption = (0, import_element140.useMemo)(() => {
      if (value === void 0) {
        return DEFAULT_OPTION;
      }
      if (valueMode === "slug") {
        const optionBySlug = options2.find((option) => option.key === value);
        if (optionBySlug) {
          return optionBySlug;
        }
      }
      return options2.find((option) => option.value === value) ?? DEFAULT_OPTION;
    }, [value, valueMode, options2]);
    return /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(StyledCustomSelectControl, {
      __next40pxDefaultSize,
      __shouldNotWarnDeprecated36pxSize: true,
      className: "components-font-size-picker__select",
      label: (0, import_i18n52.__)("Font size"),
      hideLabelFromVision: true,
      describedBy: (0, import_i18n52.sprintf)(
        // translators: %s: Currently selected font size.
        (0, import_i18n52.__)("Currently selected font size: %s"),
        selectedOption.name
      ),
      options: options2,
      value: selectedOption,
      showSelectedHint: true,
      onChange: ({
        selectedItem
      }) => {
        const matchingFontSize = selectedItem.key === "default" ? void 0 : fontSizes.find((fontSize) => fontSize.slug === selectedItem.key);
        onChange(selectedItem.value, matchingFontSize);
      },
      size: size3
    });
  };
  var font_size_picker_select_default = FontSizePickerSelect;

  // packages/components/build-module/font-size-picker/font-size-picker-toggle-group.mjs
  var import_i18n54 = __toESM(require_i18n(), 1);

  // packages/components/build-module/font-size-picker/constants.mjs
  var import_i18n53 = __toESM(require_i18n(), 1);
  var T_SHIRT_ABBREVIATIONS = [
    /* translators: S stands for 'small' and is a size label. */
    (0, import_i18n53.__)("S"),
    /* translators: M stands for 'medium' and is a size label. */
    (0, import_i18n53.__)("M"),
    /* translators: L stands for 'large' and is a size label. */
    (0, import_i18n53.__)("L"),
    /* translators: XL stands for 'extra large' and is a size label. */
    (0, import_i18n53.__)("XL"),
    /* translators: XXL stands for 'extra extra large' and is a size label. */
    (0, import_i18n53.__)("XXL")
  ];
  var T_SHIRT_NAMES = [(0, import_i18n53.__)("Small"), (0, import_i18n53.__)("Medium"), (0, import_i18n53.__)("Large"), (0, import_i18n53.__)("Extra Large"), (0, import_i18n53.__)("Extra Extra Large")];

  // packages/components/build-module/font-size-picker/font-size-picker-toggle-group.mjs
  var import_jsx_runtime214 = __toESM(require_jsx_runtime(), 1);
  var FontSizePickerToggleGroup = (props) => {
    const {
      fontSizes,
      value,
      valueMode = "literal",
      __next40pxDefaultSize,
      size: size3,
      onChange
    } = props;
    const currentValue = (() => {
      if (!value) {
        return void 0;
      }
      if (valueMode === "slug") {
        return String(value);
      }
      const matchingFontSizes = fontSizes.filter((fontSize) => fontSize.size === value);
      if (matchingFontSizes.length > 1) {
        return void 0;
      }
      const fontSizeBySize = fontSizes.find((fontSize) => fontSize.size === value);
      return fontSizeBySize?.slug;
    })();
    return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(component_default12, {
      __next40pxDefaultSize,
      __shouldNotWarnDeprecated36pxSize: true,
      label: (0, import_i18n54.__)("Font size"),
      hideLabelFromVision: true,
      value: currentValue,
      onChange: (newSlug) => {
        if (newSlug === void 0) {
          onChange(void 0);
        } else {
          const selectedFontSize = fontSizes.find((fontSize) => fontSize.slug === String(newSlug));
          if (selectedFontSize) {
            onChange(selectedFontSize.size, selectedFontSize);
          }
        }
      },
      isBlock: true,
      size: size3,
      children: fontSizes.map((fontSize, index2) => /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(component_default14, {
        value: fontSize.slug,
        label: T_SHIRT_ABBREVIATIONS[index2],
        "aria-label": fontSize.name || T_SHIRT_NAMES[index2],
        showTooltip: true
      }, fontSize.slug))
    });
  };
  var font_size_picker_toggle_group_default = FontSizePickerToggleGroup;

  // packages/components/build-module/font-size-picker/index.mjs
  var import_jsx_runtime215 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_UNITS = ["px", "em", "rem", "vw", "vh"];
  var MAX_TOGGLE_GROUP_SIZES = 5;
  var UnforwardedFontSizePicker = (props, ref) => {
    const {
      __next40pxDefaultSize = false,
      fallbackFontSize,
      fontSizes = [],
      disableCustomFontSizes = false,
      onChange,
      size: size3 = "default",
      units: unitsProp = DEFAULT_UNITS,
      value,
      valueMode = "literal",
      withSlider = false,
      withReset = true
    } = props;
    const labelId = (0, import_compose56.useInstanceId)(UnforwardedFontSizePicker, "font-size-picker-label");
    const units = useCustomUnits({
      availableUnits: unitsProp
    });
    const selectedFontSize = (() => {
      if (!value) {
        return void 0;
      }
      if (valueMode === "slug") {
        return fontSizes.find((fontSize) => fontSize.slug === value);
      }
      return fontSizes.find((fontSize) => fontSize.size === value);
    })();
    const isCustomValue2 = !!value && !selectedFontSize;
    const [userRequestedCustom, setUserRequestedCustom] = (0, import_element141.useState)(isCustomValue2);
    const resolvedValueForControls = valueMode === "slug" ? selectedFontSize?.size : value;
    let currentPickerType;
    if (!disableCustomFontSizes && userRequestedCustom) {
      currentPickerType = "custom";
    } else {
      currentPickerType = fontSizes.length > MAX_TOGGLE_GROUP_SIZES ? "select" : "togglegroup";
    }
    if (fontSizes.length === 0 && disableCustomFontSizes) {
      return null;
    }
    const hasUnits2 = typeof resolvedValueForControls === "string" || typeof fontSizes[0]?.size === "string";
    const [valueQuantity, valueUnit] = parseQuantityAndUnitFromRawValue(resolvedValueForControls, units);
    const isValueUnitRelative = !!valueUnit && ["em", "rem", "vw", "vh"].includes(valueUnit);
    const isDisabled = value === void 0;
    maybeWarnDeprecated36pxSize({
      componentName: "FontSizePicker",
      __next40pxDefaultSize,
      size: size3
    });
    return /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)(Container3, {
      ref,
      className: "components-font-size-picker",
      "aria-labelledby": labelId,
      children: [/* @__PURE__ */ (0, import_jsx_runtime215.jsx)(component_default6, {
        children: /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)(Header2, {
          className: "components-font-size-picker__header",
          children: [/* @__PURE__ */ (0, import_jsx_runtime215.jsx)(HeaderLabel, {
            id: labelId,
            children: (0, import_i18n55.__)("Font size")
          }), !disableCustomFontSizes && /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(HeaderToggle, {
            label: currentPickerType === "custom" ? (0, import_i18n55.__)("Use size preset") : (0, import_i18n55.__)("Set custom size"),
            icon: settings_default,
            onClick: () => setUserRequestedCustom(!userRequestedCustom),
            isPressed: currentPickerType === "custom",
            size: "small"
          })]
        })
      }), /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)("div", {
        children: [currentPickerType === "select" && /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(font_size_picker_select_default, {
          __next40pxDefaultSize,
          fontSizes,
          value,
          valueMode,
          disableCustomFontSizes,
          size: size3,
          onChange: (newValue, selectedItem) => {
            if (newValue === void 0) {
              onChange?.(void 0, selectedItem);
            } else {
              onChange?.(hasUnits2 ? newValue : Number(newValue), selectedItem);
            }
          },
          onSelectCustom: () => setUserRequestedCustom(true)
        }), currentPickerType === "togglegroup" && /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(font_size_picker_toggle_group_default, {
          fontSizes,
          value,
          valueMode,
          __next40pxDefaultSize,
          size: size3,
          onChange: (newValue, selectedItem) => {
            if (newValue === void 0) {
              onChange?.(void 0, selectedItem);
            } else {
              onChange?.(hasUnits2 ? newValue : Number(newValue), selectedItem);
            }
          }
        }), currentPickerType === "custom" && /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)(component_default3, {
          className: "components-font-size-picker__custom-size-control",
          children: [/* @__PURE__ */ (0, import_jsx_runtime215.jsx)(component_default4, {
            isBlock: true,
            children: /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(unit_control_default, {
              __next40pxDefaultSize,
              __shouldNotWarnDeprecated36pxSize: true,
              label: (0, import_i18n55.__)("Font size"),
              labelPosition: "top",
              hideLabelFromVision: true,
              value: hasUnits2 ? `${valueQuantity ?? ""}${valueUnit ?? ""}` : resolvedValueForControls,
              onChange: (newValue) => {
                setUserRequestedCustom(true);
                if (newValue === void 0 || newValue === "") {
                  onChange?.(void 0);
                } else {
                  onChange?.(hasUnits2 ? newValue : parseInt(newValue, 10));
                }
              },
              size: size3,
              units: hasUnits2 ? units : [],
              min: 0
            })
          }), withSlider && /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(component_default4, {
            isBlock: true,
            children: /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(component_default6, {
              marginX: 2,
              marginBottom: 0,
              children: /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(range_control_default, {
                __next40pxDefaultSize,
                __shouldNotWarnDeprecated36pxSize: true,
                className: "components-font-size-picker__custom-input",
                label: (0, import_i18n55.__)("Font size"),
                hideLabelFromVision: true,
                value: valueQuantity,
                initialPosition: fallbackFontSize,
                withInputField: false,
                onChange: (newValue) => {
                  setUserRequestedCustom(true);
                  if (newValue === void 0) {
                    onChange?.(void 0);
                  } else if (hasUnits2) {
                    onChange?.(newValue + (valueUnit ?? "px"));
                  } else {
                    onChange?.(newValue);
                  }
                },
                min: 0,
                max: isValueUnitRelative ? 10 : 100,
                step: isValueUnitRelative ? 0.1 : 1
              })
            })
          }), withReset && /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(component_default4, {
            children: /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(Button3, {
              disabled: isDisabled,
              accessibleWhenDisabled: true,
              onClick: () => {
                onChange?.(void 0);
              },
              variant: "secondary",
              __next40pxDefaultSize: true,
              size: size3 === "__unstable-large" || props.__next40pxDefaultSize ? "default" : "small",
              children: (0, import_i18n55.__)("Reset")
            })
          })]
        })]
      })]
    });
  };
  var FontSizePicker = (0, import_element141.forwardRef)(UnforwardedFontSizePicker);
  FontSizePicker.displayName = "FontSizePicker";
  var font_size_picker_default = FontSizePicker;

  // packages/components/build-module/form-file-upload/index.mjs
  var import_element142 = __toESM(require_element(), 1);
  var import_jsx_runtime216 = __toESM(require_jsx_runtime(), 1);
  function FormFileUpload({
    accept,
    children,
    multiple = false,
    onChange,
    onClick,
    render,
    ...props
  }) {
    const ref = (0, import_element142.useRef)(null);
    const openFileDialog = () => {
      ref.current?.click();
    };
    if (!render) {
      maybeWarnDeprecated36pxSize({
        componentName: "FormFileUpload",
        __next40pxDefaultSize: props.__next40pxDefaultSize,
        // @ts-expect-error - We don't "officially" support all Button props but this likely happens.
        size: props.size
      });
    }
    const ui = render ? render({
      openFileDialog
    }) : (
      // Disable reason: the parent component already takes care of the `__next40pxDefaultSize` prop.
      // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop
      /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(button_default, {
        onClick: openFileDialog,
        ...props,
        children
      })
    );
    const compatAccept = accept?.includes("audio/*") ? `${accept}, audio/mp3, audio/x-m4a, audio/x-m4b, audio/x-m4p, audio/x-wav, audio/webm` : accept;
    return /* @__PURE__ */ (0, import_jsx_runtime216.jsxs)("div", {
      className: "components-form-file-upload",
      children: [ui, /* @__PURE__ */ (0, import_jsx_runtime216.jsx)("input", {
        type: "file",
        ref,
        multiple,
        style: {
          display: "none"
        },
        accept: compatAccept,
        onChange,
        onClick,
        "data-testid": "form-file-upload-input"
      })]
    });
  }
  var form_file_upload_default = FormFileUpload;

  // packages/components/build-module/form-toggle/index.mjs
  var import_element143 = __toESM(require_element(), 1);
  var import_jsx_runtime217 = __toESM(require_jsx_runtime(), 1);
  var noop14 = () => {
  };
  function UnforwardedFormToggle(props, ref) {
    const {
      className: className2,
      checked,
      id: id3,
      disabled,
      onChange = noop14,
      onClick,
      ...additionalProps
    } = props;
    const wrapperClasses = clsx_default("components-form-toggle", className2, {
      "is-checked": checked,
      "is-disabled": disabled
    });
    return /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)("span", {
      className: wrapperClasses,
      children: [/* @__PURE__ */ (0, import_jsx_runtime217.jsx)("input", {
        className: "components-form-toggle__input",
        id: id3,
        type: "checkbox",
        checked,
        onChange,
        disabled,
        onClick: (event) => {
          event.currentTarget.focus();
          onClick?.(event);
        },
        ...additionalProps,
        ref
      }), /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("span", {
        className: "components-form-toggle__track"
      }), /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("span", {
        className: "components-form-toggle__thumb"
      })]
    });
  }
  var FormToggle = (0, import_element143.forwardRef)(UnforwardedFormToggle);
  FormToggle.displayName = "FormToggle";
  var form_toggle_default = FormToggle;

  // packages/components/build-module/form-token-field/index.mjs
  var import_element144 = __toESM(require_element(), 1);
  var import_i18n57 = __toESM(require_i18n(), 1);
  var import_compose58 = __toESM(require_compose(), 1);
  var import_a11y6 = __toESM(require_a11y(), 1);
  var import_is_shallow_equal2 = __toESM(require_is_shallow_equal(), 1);

  // packages/components/build-module/form-token-field/token.mjs
  var import_compose57 = __toESM(require_compose(), 1);
  var import_i18n56 = __toESM(require_i18n(), 1);
  var import_jsx_runtime218 = __toESM(require_jsx_runtime(), 1);
  var noop15 = () => {
  };
  function Token({
    value,
    status,
    title,
    displayTransform,
    isBorderless = false,
    disabled = false,
    onClickRemove = noop15,
    onMouseEnter,
    onMouseLeave,
    messages,
    termPosition,
    termsCount
  }) {
    const instanceId = (0, import_compose57.useInstanceId)(Token);
    const tokenClasses = clsx_default("components-form-token-field__token", {
      "is-error": "error" === status,
      "is-success": "success" === status,
      "is-validating": "validating" === status,
      "is-borderless": isBorderless,
      "is-disabled": disabled
    });
    const onClick = () => onClickRemove({
      value
    });
    const transformedValue = displayTransform(value);
    const termPositionAndCount = (0, import_i18n56.sprintf)(
      /* translators: 1: term name, 2: term position in a set of terms, 3: total term set count. */
      (0, import_i18n56.__)("%1$s (%2$d of %3$d)"),
      transformedValue,
      termPosition,
      termsCount
    );
    return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)("span", {
      className: tokenClasses,
      onMouseEnter,
      onMouseLeave,
      title,
      children: [/* @__PURE__ */ (0, import_jsx_runtime218.jsxs)("span", {
        className: "components-form-token-field__token-text",
        id: `components-form-token-field__token-text-${instanceId}`,
        children: [/* @__PURE__ */ (0, import_jsx_runtime218.jsx)(component_default2, {
          as: "span",
          children: termPositionAndCount
        }), /* @__PURE__ */ (0, import_jsx_runtime218.jsx)("span", {
          "aria-hidden": "true",
          children: transformedValue
        })]
      }), /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(button_default, {
        className: "components-form-token-field__remove-token",
        size: "small",
        icon: close_small_default,
        onClick: !disabled ? onClick : void 0,
        disabled,
        label: messages.remove,
        "aria-describedby": `components-form-token-field__token-text-${instanceId}`
      })]
    });
  }

  // packages/components/build-module/form-token-field/styles.mjs
  var deprecatedPaddings = ({
    __next40pxDefaultSize,
    hasTokens
  }) => !__next40pxDefaultSize && /* @__PURE__ */ css("padding-top:", space(hasTokens ? 1 : 0.5), ";padding-bottom:", space(hasTokens ? 1 : 0.5), ";" + (false ? "" : ";label:deprecatedPaddings;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1QkkiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBGbGV4IH0gZnJvbSAnLi4vZmxleCc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IGJveFNpemluZ1Jlc2V0IH0gZnJvbSAnLi4vdXRpbHMnO1xuXG50eXBlIFRva2Vuc0FuZElucHV0V3JhcHBlclByb3BzID0ge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemU6IGJvb2xlYW47XG5cdGhhc1Rva2VuczogYm9vbGVhbjtcbn07XG5cbmNvbnN0IGRlcHJlY2F0ZWRQYWRkaW5ncyA9ICgge1xuXHRfX25leHQ0MHB4RGVmYXVsdFNpemUsXG5cdGhhc1Rva2Vucyxcbn06IFRva2Vuc0FuZElucHV0V3JhcHBlclByb3BzICkgPT5cblx0ISBfX25leHQ0MHB4RGVmYXVsdFNpemUgJiZcblx0Y3NzYFxuXHRcdHBhZGRpbmctdG9wOiAkeyBzcGFjZSggaGFzVG9rZW5zID8gMSA6IDAuNSApIH07XG5cdFx0cGFkZGluZy1ib3R0b206ICR7IHNwYWNlKCBoYXNUb2tlbnMgPyAxIDogMC41ICkgfTtcblx0YDtcblxuZXhwb3J0IGNvbnN0IFRva2Vuc0FuZElucHV0V3JhcHBlckZsZXggPSBzdHlsZWQoIEZsZXggKWBcblx0cGFkZGluZzogN3B4O1xuXHQkeyBib3hTaXppbmdSZXNldCB9XG5cblx0JHsgZGVwcmVjYXRlZFBhZGRpbmdzIH1cbmA7XG4iXX0= */");
  var TokensAndInputWrapperFlex = /* @__PURE__ */ createStyled(component_default3, false ? {
    target: "ehq8nmi0"
  } : {
    target: "ehq8nmi0",
    label: "TokensAndInputWrapperFlex"
  })("padding:7px;", boxSizingReset, " ", deprecatedPaddings, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE0QnVEIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgRmxleCB9IGZyb20gJy4uL2ZsZXgnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgeyBib3hTaXppbmdSZXNldCB9IGZyb20gJy4uL3V0aWxzJztcblxudHlwZSBUb2tlbnNBbmRJbnB1dFdyYXBwZXJQcm9wcyA9IHtcblx0X19uZXh0NDBweERlZmF1bHRTaXplOiBib29sZWFuO1xuXHRoYXNUb2tlbnM6IGJvb2xlYW47XG59O1xuXG5jb25zdCBkZXByZWNhdGVkUGFkZGluZ3MgPSAoIHtcblx0X19uZXh0NDBweERlZmF1bHRTaXplLFxuXHRoYXNUb2tlbnMsXG59OiBUb2tlbnNBbmRJbnB1dFdyYXBwZXJQcm9wcyApID0+XG5cdCEgX19uZXh0NDBweERlZmF1bHRTaXplICYmXG5cdGNzc2Bcblx0XHRwYWRkaW5nLXRvcDogJHsgc3BhY2UoIGhhc1Rva2VucyA/IDEgOiAwLjUgKSB9O1xuXHRcdHBhZGRpbmctYm90dG9tOiAkeyBzcGFjZSggaGFzVG9rZW5zID8gMSA6IDAuNSApIH07XG5cdGA7XG5cbmV4cG9ydCBjb25zdCBUb2tlbnNBbmRJbnB1dFdyYXBwZXJGbGV4ID0gc3R5bGVkKCBGbGV4IClgXG5cdHBhZGRpbmc6IDdweDtcblx0JHsgYm94U2l6aW5nUmVzZXQgfVxuXG5cdCR7IGRlcHJlY2F0ZWRQYWRkaW5ncyB9XG5gO1xuIl19 */"));

  // packages/components/build-module/form-token-field/index.mjs
  var import_jsx_runtime219 = __toESM(require_jsx_runtime(), 1);
  var identity3 = (value) => value;
  function FormTokenField(props) {
    const {
      autoCapitalize,
      autoComplete,
      maxLength,
      placeholder,
      label = (0, import_i18n57.__)("Add item"),
      className: className2,
      suggestions = [],
      maxSuggestions = 100,
      value = [],
      displayTransform = identity3,
      saveTransform = (token2) => token2.trim(),
      onChange = () => {
      },
      onInputChange = () => {
      },
      onFocus = void 0,
      isBorderless = false,
      disabled = false,
      tokenizeOnSpace = false,
      messages = {
        added: (0, import_i18n57.__)("Item added."),
        removed: (0, import_i18n57.__)("Item removed."),
        remove: (0, import_i18n57.__)("Remove item"),
        __experimentalInvalid: (0, import_i18n57.__)("Invalid item")
      },
      __experimentalRenderItem,
      __experimentalExpandOnFocus = false,
      __experimentalValidateInput = () => true,
      __experimentalShowHowTo = true,
      __next40pxDefaultSize = false,
      __experimentalAutoSelectFirstMatch = false,
      tokenizeOnBlur = false
    } = useDeprecated36pxDefaultSizeProp(props);
    maybeWarnDeprecated36pxSize({
      componentName: "FormTokenField",
      size: void 0,
      __next40pxDefaultSize
    });
    const instanceId = (0, import_compose58.useInstanceId)(FormTokenField);
    const [incompleteTokenValue, setIncompleteTokenValue] = (0, import_element144.useState)("");
    const [inputOffsetFromEnd, setInputOffsetFromEnd] = (0, import_element144.useState)(0);
    const [isActive, setIsActive] = (0, import_element144.useState)(false);
    const [isExpanded, setIsExpanded] = (0, import_element144.useState)(false);
    const [selectedSuggestionIndex, setSelectedSuggestionIndex] = (0, import_element144.useState)(-1);
    const [selectedSuggestionScroll, setSelectedSuggestionScroll] = (0, import_element144.useState)(false);
    const prevSuggestions = (0, import_compose58.usePrevious)(suggestions);
    const prevValue = (0, import_compose58.usePrevious)(value);
    const input = (0, import_element144.useRef)(null);
    const tokensAndInput = (0, import_element144.useRef)(null);
    const debouncedSpeak = (0, import_compose58.useDebounce)(import_a11y6.speak, 500);
    (0, import_element144.useEffect)(() => {
      if (isActive && !hasFocus2()) {
        focus4();
      }
    }, [isActive]);
    (0, import_element144.useEffect)(() => {
      const suggestionsDidUpdate = !(0, import_is_shallow_equal2.isShallowEqual)(suggestions, prevSuggestions || []);
      if (suggestionsDidUpdate || value !== prevValue) {
        updateSuggestions(suggestionsDidUpdate);
      }
    }, [suggestions, prevSuggestions, value, prevValue]);
    (0, import_element144.useEffect)(() => {
      updateSuggestions();
    }, [incompleteTokenValue]);
    (0, import_element144.useEffect)(() => {
      updateSuggestions();
    }, [__experimentalAutoSelectFirstMatch]);
    if (disabled && isActive) {
      setIsActive(false);
      setIncompleteTokenValue("");
    }
    function focus4() {
      input.current?.focus();
    }
    function hasFocus2() {
      return input.current === input.current?.ownerDocument.activeElement;
    }
    function onFocusHandler(event) {
      if (hasFocus2() || event.target === tokensAndInput.current) {
        setIsActive(true);
        setIsExpanded(__experimentalExpandOnFocus || isExpanded);
      } else {
        setIsActive(false);
      }
      if ("function" === typeof onFocus) {
        onFocus(event);
      }
    }
    function onBlur(event) {
      if (inputHasValidValue() && __experimentalValidateInput(incompleteTokenValue)) {
        setIsActive(false);
        if (tokenizeOnBlur && inputHasValidValue()) {
          addNewToken(incompleteTokenValue);
        }
      } else {
        setIncompleteTokenValue("");
        setInputOffsetFromEnd(0);
        setIsActive(false);
        if (__experimentalExpandOnFocus) {
          const hasFocusWithin2 = event.relatedTarget === tokensAndInput.current;
          setIsExpanded(hasFocusWithin2);
        } else {
          setIsExpanded(false);
        }
        setSelectedSuggestionIndex(-1);
        setSelectedSuggestionScroll(false);
      }
    }
    function onKeyDown(event) {
      let preventDefault = false;
      if (event.defaultPrevented) {
        return;
      }
      switch (event.key) {
        case "Backspace":
          preventDefault = handleDeleteKey(deleteTokenBeforeInput);
          break;
        case "Enter":
          preventDefault = addCurrentToken();
          break;
        case "ArrowLeft":
          preventDefault = handleLeftArrowKey();
          break;
        case "ArrowUp":
          preventDefault = handleUpArrowKey();
          break;
        case "ArrowRight":
          preventDefault = handleRightArrowKey();
          break;
        case "ArrowDown":
          preventDefault = handleDownArrowKey();
          break;
        case "Delete":
          preventDefault = handleDeleteKey(deleteTokenAfterInput);
          break;
        case "Space":
          if (tokenizeOnSpace) {
            preventDefault = addCurrentToken();
          }
          break;
        case "Escape":
          preventDefault = handleEscapeKey(event);
          break;
        case "Tab":
          preventDefault = handleTabKey(event);
          break;
        default:
          break;
      }
      if (preventDefault) {
        event.preventDefault();
      }
    }
    function onKeyPress(event) {
      let preventDefault = false;
      switch (event.key) {
        case ",":
          preventDefault = handleCommaKey();
          break;
        default:
          break;
      }
      if (preventDefault) {
        event.preventDefault();
      }
    }
    function onContainerTouched(event) {
      if (event.target === tokensAndInput.current && isActive) {
        event.preventDefault();
      }
    }
    function onTokenClickRemove(event) {
      deleteToken(event.value);
      focus4();
    }
    function onSuggestionHovered(suggestion) {
      const index2 = getMatchingSuggestions().indexOf(suggestion);
      if (index2 >= 0) {
        setSelectedSuggestionIndex(index2);
        setSelectedSuggestionScroll(false);
      }
    }
    function onSuggestionSelected(suggestion) {
      addNewToken(suggestion);
    }
    function onInputChangeHandler(event) {
      const text = event.value;
      const separator = tokenizeOnSpace ? /[ ,\t]+/ : /[,\t]+/;
      const items = text.split(separator);
      const tokenValue = items[items.length - 1] || "";
      if (items.length > 1) {
        addNewTokens(items.slice(0, -1));
      }
      setIncompleteTokenValue(tokenValue);
      onInputChange(tokenValue);
    }
    function handleDeleteKey(_deleteToken) {
      let preventDefault = false;
      if (hasFocus2() && isInputEmpty()) {
        _deleteToken();
        preventDefault = true;
      }
      return preventDefault;
    }
    function handleLeftArrowKey() {
      let preventDefault = false;
      if (isInputEmpty()) {
        moveInputBeforePreviousToken();
        preventDefault = true;
      }
      return preventDefault;
    }
    function handleRightArrowKey() {
      let preventDefault = false;
      if (isInputEmpty()) {
        moveInputAfterNextToken();
        preventDefault = true;
      }
      return preventDefault;
    }
    function handleUpArrowKey() {
      setSelectedSuggestionIndex((index2) => {
        return (index2 === 0 ? getMatchingSuggestions(incompleteTokenValue, suggestions, value, maxSuggestions, saveTransform).length : index2) - 1;
      });
      setSelectedSuggestionScroll(true);
      return true;
    }
    function handleDownArrowKey() {
      setSelectedSuggestionIndex((index2) => {
        return (index2 + 1) % getMatchingSuggestions(incompleteTokenValue, suggestions, value, maxSuggestions, saveTransform).length;
      });
      setSelectedSuggestionScroll(true);
      return true;
    }
    function collapseSuggestionsList(event) {
      if (event.target instanceof HTMLInputElement) {
        setIncompleteTokenValue(event.target.value);
        setIsExpanded(false);
        setSelectedSuggestionIndex(-1);
        setSelectedSuggestionScroll(false);
      }
    }
    function handleEscapeKey(event) {
      collapseSuggestionsList(event);
      return true;
    }
    function handleTabKey(event) {
      collapseSuggestionsList(event);
      return false;
    }
    function handleCommaKey() {
      if (inputHasValidValue()) {
        addNewToken(incompleteTokenValue);
      }
      return true;
    }
    function moveInputToIndex(index2) {
      setInputOffsetFromEnd(value.length - Math.max(index2, -1) - 1);
    }
    function moveInputBeforePreviousToken() {
      setInputOffsetFromEnd((prevInputOffsetFromEnd) => {
        return Math.min(prevInputOffsetFromEnd + 1, value.length);
      });
    }
    function moveInputAfterNextToken() {
      setInputOffsetFromEnd((prevInputOffsetFromEnd) => {
        return Math.max(prevInputOffsetFromEnd - 1, 0);
      });
    }
    function deleteTokenBeforeInput() {
      const index2 = getIndexOfInput() - 1;
      if (index2 > -1) {
        deleteToken(value[index2]);
      }
    }
    function deleteTokenAfterInput() {
      const index2 = getIndexOfInput();
      if (index2 < value.length) {
        deleteToken(value[index2]);
        moveInputToIndex(index2);
      }
    }
    function addCurrentToken() {
      let preventDefault = false;
      const selectedSuggestion = getSelectedSuggestion();
      if (selectedSuggestion) {
        addNewToken(selectedSuggestion);
        preventDefault = true;
      } else if (inputHasValidValue()) {
        addNewToken(incompleteTokenValue);
        preventDefault = true;
      }
      return preventDefault;
    }
    function addNewTokens(tokens) {
      const tokensToAdd = [...new Set(tokens.map(saveTransform).filter(Boolean).filter((token2) => !valueContainsToken(token2)))];
      if (tokensToAdd.length > 0) {
        const newValue = [...value];
        newValue.splice(getIndexOfInput(), 0, ...tokensToAdd);
        onChange(newValue);
      }
    }
    function addNewToken(token2) {
      if (!__experimentalValidateInput(token2)) {
        (0, import_a11y6.speak)(messages.__experimentalInvalid, "assertive");
        return;
      }
      addNewTokens([token2]);
      (0, import_a11y6.speak)(messages.added, "assertive");
      setIncompleteTokenValue("");
      setSelectedSuggestionIndex(-1);
      setSelectedSuggestionScroll(false);
      setIsExpanded(!__experimentalExpandOnFocus);
      if (isActive && !tokenizeOnBlur) {
        focus4();
      }
    }
    function deleteToken(token2) {
      const newTokens = value.filter((item2) => {
        return getTokenValue(item2) !== getTokenValue(token2);
      });
      onChange(newTokens);
      (0, import_a11y6.speak)(messages.removed, "assertive");
    }
    function getTokenValue(token2) {
      if ("object" === typeof token2) {
        return token2.value;
      }
      return token2;
    }
    function getMatchingSuggestions(searchValue = incompleteTokenValue, _suggestions = suggestions, _value = value, _maxSuggestions = maxSuggestions, _saveTransform = saveTransform) {
      let match4 = _saveTransform(searchValue);
      const startsWithMatch = [];
      const containsMatch = [];
      const normalizedValue = _value.map((item2) => {
        if (typeof item2 === "string") {
          return item2;
        }
        return item2.value;
      });
      if (match4.length === 0) {
        _suggestions = _suggestions.filter((suggestion) => !normalizedValue.includes(suggestion));
      } else {
        match4 = match4.normalize("NFKC").toLocaleLowerCase();
        _suggestions.forEach((suggestion) => {
          const index2 = suggestion.normalize("NFKC").toLocaleLowerCase().indexOf(match4);
          if (normalizedValue.indexOf(suggestion) === -1) {
            if (index2 === 0) {
              startsWithMatch.push(suggestion);
            } else if (index2 > 0) {
              containsMatch.push(suggestion);
            }
          }
        });
        _suggestions = startsWithMatch.concat(containsMatch);
      }
      return _suggestions.slice(0, _maxSuggestions);
    }
    function getSelectedSuggestion() {
      if (selectedSuggestionIndex !== -1) {
        return getMatchingSuggestions()[selectedSuggestionIndex];
      }
      return void 0;
    }
    function valueContainsToken(token2) {
      return value.some((item2) => {
        return getTokenValue(token2) === getTokenValue(item2);
      });
    }
    function getIndexOfInput() {
      return value.length - inputOffsetFromEnd;
    }
    function isInputEmpty() {
      return incompleteTokenValue.length === 0;
    }
    function inputHasValidValue() {
      return saveTransform(incompleteTokenValue).length > 0;
    }
    function updateSuggestions(resetSelectedSuggestion = true) {
      const inputHasMinimumChars = incompleteTokenValue.trim().length > 1;
      const matchingSuggestions2 = getMatchingSuggestions(incompleteTokenValue);
      const hasMatchingSuggestions = matchingSuggestions2.length > 0;
      const shouldExpandIfFocuses = hasFocus2() && __experimentalExpandOnFocus;
      setIsExpanded(shouldExpandIfFocuses || inputHasMinimumChars && hasMatchingSuggestions);
      if (resetSelectedSuggestion) {
        if (__experimentalAutoSelectFirstMatch && inputHasMinimumChars && hasMatchingSuggestions) {
          setSelectedSuggestionIndex(0);
          setSelectedSuggestionScroll(true);
        } else {
          setSelectedSuggestionIndex(-1);
          setSelectedSuggestionScroll(false);
        }
      }
      if (inputHasMinimumChars) {
        const message2 = hasMatchingSuggestions ? (0, import_i18n57.sprintf)(
          /* translators: %d: number of results. */
          (0, import_i18n57._n)("%d result found, use up and down arrow keys to navigate.", "%d results found, use up and down arrow keys to navigate.", matchingSuggestions2.length),
          matchingSuggestions2.length
        ) : (0, import_i18n57.__)("No results.");
        debouncedSpeak(message2, "assertive");
      }
    }
    function renderTokensAndInput() {
      const components = value.map(renderToken);
      components.splice(getIndexOfInput(), 0, renderInput());
      return components;
    }
    function renderToken(token2, index2, tokens) {
      const _value = getTokenValue(token2);
      const status = typeof token2 !== "string" ? token2.status : void 0;
      const termPosition = index2 + 1;
      const termsCount = tokens.length;
      return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(component_default4, {
        children: /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(Token, {
          value: _value,
          status,
          title: typeof token2 !== "string" ? token2.title : void 0,
          displayTransform,
          onClickRemove: onTokenClickRemove,
          isBorderless: typeof token2 !== "string" && token2.isBorderless || isBorderless,
          onMouseEnter: typeof token2 !== "string" ? token2.onMouseEnter : void 0,
          onMouseLeave: typeof token2 !== "string" ? token2.onMouseLeave : void 0,
          disabled: "error" !== status && disabled,
          messages,
          termsCount,
          termPosition
        })
      }, "token-" + _value);
    }
    function renderInput() {
      const inputProps = {
        instanceId,
        autoCapitalize,
        autoComplete,
        placeholder: value.length === 0 ? placeholder : "",
        disabled,
        value: incompleteTokenValue,
        onBlur,
        isExpanded,
        selectedSuggestionIndex
      };
      return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(token_input_default, {
        ...inputProps,
        onChange: !(maxLength && value.length >= maxLength) ? onInputChangeHandler : void 0,
        ref: input
      }, "input");
    }
    const classes = clsx_default(className2, "components-form-token-field__input-container", {
      "is-active": isActive,
      "is-disabled": disabled
    });
    let tokenFieldProps = {
      className: "components-form-token-field",
      tabIndex: -1
    };
    const matchingSuggestions = getMatchingSuggestions();
    if (!disabled) {
      tokenFieldProps = Object.assign({}, tokenFieldProps, {
        onKeyDown: withIgnoreIMEEvents(onKeyDown),
        onKeyPress,
        onFocus: onFocusHandler
      });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime219.jsxs)("div", {
      ...tokenFieldProps,
      children: [label && /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(StyledLabel, {
        htmlFor: `components-form-token-input-${instanceId}`,
        className: "components-form-token-field__label",
        children: label
      }), /* @__PURE__ */ (0, import_jsx_runtime219.jsxs)("div", {
        ref: tokensAndInput,
        className: classes,
        tabIndex: -1,
        onMouseDown: onContainerTouched,
        onTouchStart: onContainerTouched,
        children: [/* @__PURE__ */ (0, import_jsx_runtime219.jsx)(TokensAndInputWrapperFlex, {
          justify: "flex-start",
          align: "center",
          gap: 1,
          wrap: true,
          __next40pxDefaultSize,
          hasTokens: !!value.length,
          children: renderTokensAndInput()
        }), isExpanded && /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(suggestions_list_default, {
          instanceId,
          match: saveTransform(incompleteTokenValue),
          displayTransform,
          suggestions: matchingSuggestions,
          selectedIndex: selectedSuggestionIndex,
          scrollIntoView: selectedSuggestionScroll,
          onHover: onSuggestionHovered,
          onSelect: onSuggestionSelected,
          __experimentalRenderItem
        })]
      }), __experimentalShowHowTo && /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(StyledHelp, {
        id: `components-form-token-suggestions-howto-${instanceId}`,
        className: "components-form-token-field__help",
        children: tokenizeOnSpace ? (0, import_i18n57.__)("Separate with commas, spaces, or the Enter key.") : (0, import_i18n57.__)("Separate with commas or the Enter key.")
      })]
    });
  }
  var form_token_field_default = FormTokenField;

  // packages/components/build-module/guide/index.mjs
  var import_element145 = __toESM(require_element(), 1);
  var import_deprecated17 = __toESM(require_deprecated(), 1);
  var import_i18n59 = __toESM(require_i18n(), 1);

  // packages/components/build-module/guide/page-control.mjs
  var import_i18n58 = __toESM(require_i18n(), 1);

  // packages/components/build-module/guide/icons.mjs
  var import_primitives33 = __toESM(require_primitives(), 1);
  var import_jsx_runtime220 = __toESM(require_jsx_runtime(), 1);
  var PageControlIcon = () => /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(import_primitives33.SVG, {
    width: "8",
    height: "8",
    fill: "none",
    xmlns: "http://www.w3.org/2000/svg",
    children: /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(import_primitives33.Circle, {
      cx: "4",
      cy: "4",
      r: "4"
    })
  });

  // packages/components/build-module/guide/page-control.mjs
  var import_jsx_runtime221 = __toESM(require_jsx_runtime(), 1);
  function PageControl({
    currentPage,
    numberOfPages,
    setCurrentPage
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime221.jsx)("ul", {
      className: "components-guide__page-control",
      "aria-label": (0, import_i18n58.__)("Guide controls"),
      children: Array.from({
        length: numberOfPages
      }).map((_2, page) => /* @__PURE__ */ (0, import_jsx_runtime221.jsx)("li", {
        // Set aria-current="step" on the active page, see https://www.w3.org/TR/wai-aria-1.1/#aria-current
        "aria-current": page === currentPage ? "step" : void 0,
        children: /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(button_default, {
          size: "small",
          icon: /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(PageControlIcon, {}),
          "aria-label": (0, import_i18n58.sprintf)(
            /* translators: 1: current page number 2: total number of pages */
            (0, import_i18n58.__)("Page %1$d of %2$d"),
            page + 1,
            numberOfPages
          ),
          onClick: () => setCurrentPage(page)
        }, page)
      }, page))
    });
  }

  // packages/components/build-module/guide/index.mjs
  var import_jsx_runtime222 = __toESM(require_jsx_runtime(), 1);
  function Guide({
    children,
    className: className2,
    contentLabel,
    finishButtonText = (0, import_i18n59.__)("Finish"),
    nextButtonText = (0, import_i18n59.__)("Next"),
    previousButtonText = (0, import_i18n59.__)("Previous"),
    onFinish,
    pages = []
  }) {
    const ref = (0, import_element145.useRef)(null);
    const [currentPage, setCurrentPage] = (0, import_element145.useState)(0);
    (0, import_element145.useEffect)(() => {
      const frame2 = ref.current?.querySelector(".components-guide");
      if (frame2 instanceof HTMLElement) {
        frame2.focus();
      }
    }, [currentPage]);
    (0, import_element145.useEffect)(() => {
      if (import_element145.Children.count(children)) {
        (0, import_deprecated17.default)("Passing children to <Guide>", {
          since: "5.5",
          alternative: "the `pages` prop"
        });
      }
    }, [children]);
    if (import_element145.Children.count(children)) {
      pages = import_element145.Children.map(children, (child) => ({
        content: child
      })) ?? [];
    }
    const canGoBack = currentPage > 0;
    const canGoForward = currentPage < pages.length - 1;
    const goBack = () => {
      if (canGoBack) {
        setCurrentPage(currentPage - 1);
      }
    };
    const goForward = () => {
      if (canGoForward) {
        setCurrentPage(currentPage + 1);
      }
    };
    if (pages.length === 0) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(modal_default, {
      className: clsx_default("components-guide", className2),
      contentLabel,
      isDismissible: pages.length > 1,
      onRequestClose: onFinish,
      onKeyDown: (event) => {
        if (event.code === "ArrowLeft") {
          goBack();
          event.preventDefault();
        } else if (event.code === "ArrowRight") {
          goForward();
          event.preventDefault();
        }
      },
      ref,
      children: /* @__PURE__ */ (0, import_jsx_runtime222.jsxs)("div", {
        className: "components-guide__container",
        children: [/* @__PURE__ */ (0, import_jsx_runtime222.jsxs)("div", {
          className: "components-guide__page",
          children: [pages[currentPage].image, pages.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(PageControl, {
            currentPage,
            numberOfPages: pages.length,
            setCurrentPage
          }), pages[currentPage].content]
        }), /* @__PURE__ */ (0, import_jsx_runtime222.jsxs)("div", {
          className: "components-guide__footer",
          children: [canGoBack && /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(button_default, {
            className: "components-guide__back-button",
            variant: "tertiary",
            onClick: goBack,
            __next40pxDefaultSize: true,
            children: previousButtonText
          }), canGoForward && /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(button_default, {
            className: "components-guide__forward-button",
            variant: "primary",
            onClick: goForward,
            __next40pxDefaultSize: true,
            children: nextButtonText
          }), !canGoForward && /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(button_default, {
            className: "components-guide__finish-button",
            variant: "primary",
            onClick: onFinish,
            __next40pxDefaultSize: true,
            children: finishButtonText
          })]
        })]
      })
    });
  }
  var guide_default = Guide;

  // packages/components/build-module/guide/page.mjs
  var import_element146 = __toESM(require_element(), 1);
  var import_deprecated18 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime223 = __toESM(require_jsx_runtime(), 1);
  function GuidePage(props) {
    (0, import_element146.useEffect)(() => {
      (0, import_deprecated18.default)("<GuidePage>", {
        since: "5.5",
        alternative: "the `pages` prop in <Guide>"
      });
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime223.jsx)("div", {
      ...props
    });
  }

  // packages/components/build-module/button/deprecated.mjs
  var import_deprecated19 = __toESM(require_deprecated(), 1);
  var import_element147 = __toESM(require_element(), 1);
  var import_jsx_runtime224 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedIconButton({
    label,
    labelPosition,
    size: size3,
    tooltip,
    ...props
  }, ref) {
    (0, import_deprecated19.default)("wp.components.IconButton", {
      since: "5.4",
      alternative: "wp.components.Button",
      version: "6.2"
    });
    return (
      // Disable reason: the parent component is taking care of the __next40pxDefaultSize prop.
      // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop
      /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(button_default, {
        ...props,
        ref,
        tooltipPosition: labelPosition,
        iconSize: size3,
        showTooltip: tooltip !== void 0 ? !!tooltip : void 0,
        label: tooltip || label
      })
    );
  }
  var deprecated_default = (0, import_element147.forwardRef)(UnforwardedIconButton);

  // packages/components/build-module/keyboard-shortcuts/index.mjs
  var import_element148 = __toESM(require_element(), 1);
  var import_compose59 = __toESM(require_compose(), 1);
  var import_jsx_runtime225 = __toESM(require_jsx_runtime(), 1);
  function KeyboardShortcut({
    target,
    callback,
    shortcut,
    bindGlobal,
    eventName
  }) {
    (0, import_compose59.useKeyboardShortcut)(shortcut, callback, {
      bindGlobal,
      target,
      eventName
    });
    return null;
  }
  function KeyboardShortcuts({
    children,
    shortcuts,
    bindGlobal,
    eventName
  }) {
    const target = (0, import_element148.useRef)(null);
    const element = Object.entries(shortcuts ?? {}).map(([shortcut, callback]) => /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(KeyboardShortcut, {
      shortcut,
      callback,
      bindGlobal,
      eventName,
      target
    }, shortcut));
    if (!import_element148.Children.count(children)) {
      return /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(import_jsx_runtime225.Fragment, {
        children: element
      });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime225.jsxs)("div", {
      ref: target,
      children: [element, children]
    });
  }
  var keyboard_shortcuts_default = KeyboardShortcuts;

  // packages/components/build-module/menu-group/index.mjs
  var import_element149 = __toESM(require_element(), 1);
  var import_compose60 = __toESM(require_compose(), 1);
  var import_jsx_runtime226 = __toESM(require_jsx_runtime(), 1);
  function MenuGroup3(props) {
    const {
      children,
      className: className2 = "",
      label,
      hideSeparator
    } = props;
    const instanceId = (0, import_compose60.useInstanceId)(MenuGroup3);
    if (!import_element149.Children.count(children)) {
      return null;
    }
    const labelId = `components-menu-group-label-${instanceId}`;
    const classNames = clsx_default(className2, "components-menu-group", {
      "has-hidden-separator": hideSeparator
    });
    return /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)("div", {
      className: classNames,
      children: [label && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)("div", {
        className: "components-menu-group__label",
        id: labelId,
        "aria-hidden": "true",
        children: label
      }), /* @__PURE__ */ (0, import_jsx_runtime226.jsx)("div", {
        role: "group",
        "aria-labelledby": label ? labelId : void 0,
        children
      })]
    });
  }
  var menu_group_default = MenuGroup3;

  // packages/components/build-module/menu-item/index.mjs
  var import_element150 = __toESM(require_element(), 1);
  var import_jsx_runtime227 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedMenuItem(props, ref) {
    let {
      children,
      info,
      className: className2,
      icon,
      iconPosition = "right",
      shortcut,
      isSelected: isSelected2,
      role = "menuitem",
      suffix,
      ...buttonProps
    } = props;
    className2 = clsx_default("components-menu-item__button", className2);
    if (info) {
      children = /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)("span", {
        className: "components-menu-item__info-wrapper",
        children: [/* @__PURE__ */ (0, import_jsx_runtime227.jsx)("span", {
          className: "components-menu-item__item",
          children
        }), /* @__PURE__ */ (0, import_jsx_runtime227.jsx)("span", {
          className: "components-menu-item__info",
          children: info
        })]
      });
    }
    if (icon && typeof icon !== "string") {
      icon = (0, import_element150.cloneElement)(icon, {
        className: clsx_default("components-menu-items__item-icon", {
          "has-icon-right": iconPosition === "right"
        })
      });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(button_default, {
      size: "compact",
      ref,
      "aria-checked": role === "menuitemcheckbox" || role === "menuitemradio" ? isSelected2 : void 0,
      role,
      icon: iconPosition === "left" ? icon : void 0,
      className: className2,
      accessibleWhenDisabled: true,
      ...buttonProps,
      children: [/* @__PURE__ */ (0, import_jsx_runtime227.jsx)("span", {
        className: "components-menu-item__item",
        children
      }), !suffix && /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(shortcut_default, {
        className: "components-menu-item__shortcut",
        shortcut
      }), !suffix && icon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(icon_default3, {
        icon
      }), suffix]
    });
  }
  var MenuItem3 = (0, import_element150.forwardRef)(UnforwardedMenuItem);
  MenuItem3.displayName = "MenuItem";
  var menu_item_default = MenuItem3;

  // packages/components/build-module/menu-items-choice/index.mjs
  var import_jsx_runtime228 = __toESM(require_jsx_runtime(), 1);
  var noop16 = () => {
  };
  function MenuItemsChoice({
    choices = [],
    onHover = noop16,
    onSelect,
    value
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(import_jsx_runtime228.Fragment, {
      children: choices.map((item2) => {
        const isSelected2 = value === item2.value;
        return /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(menu_item_default, {
          role: "menuitemradio",
          disabled: item2.disabled,
          icon: isSelected2 ? check_default : null,
          info: item2.info,
          isSelected: isSelected2,
          shortcut: item2.shortcut,
          className: "components-menu-items-choice",
          onClick: () => {
            if (!isSelected2) {
              onSelect(item2.value);
            }
          },
          onMouseEnter: () => onHover(item2.value),
          onMouseLeave: () => onHover(null),
          "aria-label": item2["aria-label"],
          children: item2.label
        }, item2.value);
      })
    });
  }
  var menu_items_choice_default = MenuItemsChoice;

  // packages/components/build-module/navigation/index.mjs
  var import_deprecated20 = __toESM(require_deprecated(), 1);
  var import_element154 = __toESM(require_element(), 1);
  var import_i18n61 = __toESM(require_i18n(), 1);

  // packages/components/build-module/navigation/constants.mjs
  var ROOT_MENU = "root";
  var SEARCH_FOCUS_DELAY = 100;

  // packages/components/build-module/navigation/context.mjs
  var import_element151 = __toESM(require_element(), 1);
  var noop17 = () => {
  };
  var defaultIsEmpty = () => false;
  var defaultGetter = () => void 0;
  var NavigationContext = (0, import_element151.createContext)({
    activeItem: void 0,
    activeMenu: ROOT_MENU,
    setActiveMenu: noop17,
    navigationTree: {
      items: {},
      getItem: defaultGetter,
      addItem: noop17,
      removeItem: noop17,
      menus: {},
      getMenu: defaultGetter,
      addMenu: noop17,
      removeMenu: noop17,
      childMenu: {},
      traverseMenu: noop17,
      isMenuEmpty: defaultIsEmpty
    }
  });
  NavigationContext.displayName = "NavigationContext";
  var useNavigationContext = () => (0, import_element151.useContext)(NavigationContext);

  // packages/components/build-module/navigation/styles/navigation-styles.mjs
  var import_i18n60 = __toESM(require_i18n(), 1);
  function _EMOTION_STRINGIFIED_CSS_ERROR__34() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var NavigationUI = /* @__PURE__ */ createStyled("div", false ? {
    target: "eeiismy11"
  } : {
    target: "eeiismy11",
    label: "NavigationUI"
  })("width:100%;box-sizing:border-box;padding:0 ", space(4), ";overflow:hidden;" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5hdmlnYXRpb24tc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvQnNDIiwiZmlsZSI6Im5hdmlnYXRpb24tc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBXb3JkUHJlc3MgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGlzUlRMIH0gZnJvbSAnQHdvcmRwcmVzcy9pMThuJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTIH0gZnJvbSAnLi4vLi4vdXRpbHMvY29sb3JzLXZhbHVlcyc7XG5pbXBvcnQgQnV0dG9uIGZyb20gJy4uLy4uL2J1dHRvbic7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vdGV4dCc7XG5pbXBvcnQgeyBIZWFkaW5nIH0gZnJvbSAnLi4vLi4vaGVhZGluZyc7XG5pbXBvcnQgeyBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5leHBvcnQgY29uc3QgTmF2aWdhdGlvblVJID0gc3R5bGVkLmRpdmBcblx0d2lkdGg6IDEwMCU7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdHBhZGRpbmc6IDAgJHsgc3BhY2UoIDQgKSB9O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lbnVVSSA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCA2ICkgfTtcblx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDYgKSB9O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXHR1bCB7XG5cdFx0cGFkZGluZzogMDtcblx0XHRtYXJnaW46IDA7XG5cdFx0bGlzdC1zdHlsZTogbm9uZTtcblx0fVxuXHQuY29tcG9uZW50cy1uYXZpZ2F0aW9uX19iYWNrLWJ1dHRvbiB7XG5cdFx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5cblx0LmNvbXBvbmVudHMtbmF2aWdhdGlvbl9fZ3JvdXAgKyAuY29tcG9uZW50cy1uYXZpZ2F0aW9uX19ncm91cCB7XG5cdFx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVudUJhY2tCdXR0b25VSSA9IHN0eWxlZCggQnV0dG9uIClgXG5cdCYuaXMtdGVydGlhcnkge1xuXHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdG9wYWNpdHk6IDAuNztcblxuXHRcdCY6aG92ZXI6bm90KCA6ZGlzYWJsZWQgKSB7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdH1cblxuXHRcdCY6YWN0aXZlOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0YmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVudVRpdGxlVUkgPSBzdHlsZWQuZGl2YFxuXHRvdmVyZmxvdzogaGlkZGVuO1xuXHR3aWR0aDogMTAwJTtcbmA7XG5cbmV4cG9ydCBjb25zdCBNZW51VGl0bGVTZWFyY2hDb250cm9sV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbjogMTFweCAwOyAvLyBub24taWRlYWwgaGFyZGNvZGluZyB0byBtYWludGFpbiBzYW1lIGhlaWdodCBhcyBIZWFkaW5nLCBjb3VsZCBiZSBpbXByb3ZlZFxuXHRwYWRkaW5nOiAxcHg7IC8vIHNvIHRoZSBmb2N1cyBib3JkZXIgZG9lc24ndCBnZXQgY3V0IG9mZiBieSB0aGUgb3ZlcmZsb3cgaGlkZGVuIG9uIE1lbnVUaXRsZVVJXG5gO1xuXG5leHBvcnQgY29uc3QgTWVudVRpdGxlQWN0aW9uc1VJID0gc3R5bGVkLnNwYW5gXG5cdGhlaWdodDogJHsgc3BhY2UoIDYgKSB9OyAvLyAyNHB4LCBzYW1lIGhlaWdodCBhcyB0aGUgYnV0dG9ucyBpbnNpZGVcblxuXHQuY29tcG9uZW50cy1idXR0b24uaXMtc21hbGwge1xuXHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdG9wYWNpdHk6IDAuNztcblx0XHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAxICkgfTsgLy8gQXZvaWQgaGlkaW5nIHRoZSBmb2N1cyBvdXRsaW5lXG5cdFx0cGFkZGluZzogMDtcblxuXHRcdCY6YWN0aXZlOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0YmFja2dyb3VuZDogbm9uZTtcblx0XHRcdG9wYWNpdHk6IDE7XG5cdFx0XHRjb2xvcjogaW5oZXJpdDtcblx0XHR9XG5cdFx0Jjpob3Zlcjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdGJveC1zaGFkb3c6IG5vbmU7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgR3JvdXBUaXRsZVVJID0gc3R5bGVkKCBIZWFkaW5nIClgXG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCAxMiApIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGNvbG9yOiBpbmhlcml0O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdG1hcmdpbi1ib3R0b206ICR7IHNwYWNlKCAyICkgfTtcblx0cGFkZGluZzogJHsgKCkgPT5cblx0XHRpc1JUTCgpXG5cdFx0XHQ/IGAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDQgKSB9ICR7IHNwYWNlKCAxICkgfSAkeyBzcGFjZSggMiApIH1gXG5cdFx0XHQ6IGAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDIgKSB9ICR7IHNwYWNlKCAxICkgfSAkeyBzcGFjZShcblx0XHRcdFx0XHQ0XG5cdFx0XHQgICkgfWAgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQmFzZVVJID0gc3R5bGVkLmxpYFxuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0Y29sb3I6IGluaGVyaXQ7XG5cdG1hcmdpbi1ib3R0b206IDA7XG5cblx0PiBidXR0b24sXG5cdD4gYS5jb21wb25lbnRzLWJ1dHRvbixcblx0PiBhIHtcblx0XHR3aWR0aDogMTAwJTtcblx0XHRjb2xvcjogaW5oZXJpdDtcblx0XHRvcGFjaXR5OiAwLjc7XG5cdFx0cGFkZGluZzogJHsgc3BhY2UoIDIgKSB9ICR7IHNwYWNlKCA0ICkgfTsgLyogOHB4IDE2cHggKi9cblx0XHQkeyBydGwoIHsgdGV4dEFsaWduOiAnbGVmdCcgfSwgeyB0ZXh0QWxpZ246ICdyaWdodCcgfSApIH1cblxuXHRcdCY6aG92ZXIsXG5cdFx0Jjpmb2N1czpub3QoIFthcmlhLWRpc2FibGVkPSd0cnVlJ10gKTphY3RpdmUsXG5cdFx0JjphY3RpdmU6bm90KCBbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICk6YWN0aXZlIHtcblx0XHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHQmLmlzLWFjdGl2ZSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblxuXHRcdD4gYnV0dG9uLFxuXHRcdC5jb21wb25lbnRzLWJ1dHRvbjpob3Zlcixcblx0XHQ+IGEge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnRJbnZlcnRlZCB9O1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHQ+IHN2ZyBwYXRoIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDYwMCBdIH07XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtVUkgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRoZWlnaHQ6IGF1dG87XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdG1hcmdpbjogMDtcblx0cGFkZGluZzogJHsgc3BhY2UoIDEuNSApIH0gJHsgc3BhY2UoIDQgKSB9O1xuXHRmb250LXdlaWdodDogNDAwO1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0d2lkdGg6IDEwMCU7XG5cdGNvbG9yOiBpbmhlcml0O1xuXHRvcGFjaXR5OiAwLjc7XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbUljb25VSSA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQmFkZ2VVSSA9IHN0eWxlZC5zcGFuYFxuXHRtYXJnaW4tbGVmdDogJHsgKCkgPT4gKCBpc1JUTCgpID8gJzAnIDogc3BhY2UoIDIgKSApIH07XG5cdG1hcmdpbi1yaWdodDogJHsgKCkgPT4gKCBpc1JUTCgpID8gc3BhY2UoIDIgKSA6ICcwJyApIH07XG5cdGRpc3BsYXk6IGlubGluZS1mbGV4O1xuXHRwYWRkaW5nOiAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDMgKSB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRAa2V5ZnJhbWVzIGZhZGUtaW4ge1xuXHRcdGZyb20ge1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHR9XG5cdFx0dG8ge1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRhbmltYXRpb246IGZhZGUtaW4gMjUwbXMgZWFzZS1vdXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtVGl0bGVVSSA9IHN0eWxlZCggVGV4dCApYFxuXHQkeyAoKSA9PiAoIGlzUlRMKCkgPyAnbWFyZ2luLWxlZnQ6IGF1dG87JyA6ICdtYXJnaW4tcmlnaHQ6IGF1dG87JyApIH1cblx0Zm9udC1zaXplOiAxNHB4O1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0Y29sb3I6IGluaGVyaXQ7XG5gO1xuIl19 */"));
  var MenuUI = /* @__PURE__ */ createStyled("div", false ? {
    target: "eeiismy10"
  } : {
    target: "eeiismy10",
    label: "MenuUI"
  })("margin-top:", space(6), ";margin-bottom:", space(6), ";display:flex;flex-direction:column;ul{padding:0;margin:0;list-style:none;}.components-navigation__back-button{margin-bottom:", space(6), ";}.components-navigation__group+.components-navigation__group{margin-top:", space(6), ";}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5hdmlnYXRpb24tc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyQmdDIiwiZmlsZSI6Im5hdmlnYXRpb24tc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBXb3JkUHJlc3MgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGlzUlRMIH0gZnJvbSAnQHdvcmRwcmVzcy9pMThuJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTIH0gZnJvbSAnLi4vLi4vdXRpbHMvY29sb3JzLXZhbHVlcyc7XG5pbXBvcnQgQnV0dG9uIGZyb20gJy4uLy4uL2J1dHRvbic7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vdGV4dCc7XG5pbXBvcnQgeyBIZWFkaW5nIH0gZnJvbSAnLi4vLi4vaGVhZGluZyc7XG5pbXBvcnQgeyBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5leHBvcnQgY29uc3QgTmF2aWdhdGlvblVJID0gc3R5bGVkLmRpdmBcblx0d2lkdGg6IDEwMCU7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdHBhZGRpbmc6IDAgJHsgc3BhY2UoIDQgKSB9O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lbnVVSSA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCA2ICkgfTtcblx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDYgKSB9O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXHR1bCB7XG5cdFx0cGFkZGluZzogMDtcblx0XHRtYXJnaW46IDA7XG5cdFx0bGlzdC1zdHlsZTogbm9uZTtcblx0fVxuXHQuY29tcG9uZW50cy1uYXZpZ2F0aW9uX19iYWNrLWJ1dHRvbiB7XG5cdFx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5cblx0LmNvbXBvbmVudHMtbmF2aWdhdGlvbl9fZ3JvdXAgKyAuY29tcG9uZW50cy1uYXZpZ2F0aW9uX19ncm91cCB7XG5cdFx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVudUJhY2tCdXR0b25VSSA9IHN0eWxlZCggQnV0dG9uIClgXG5cdCYuaXMtdGVydGlhcnkge1xuXHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdG9wYWNpdHk6IDAuNztcblxuXHRcdCY6aG92ZXI6bm90KCA6ZGlzYWJsZWQgKSB7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdH1cblxuXHRcdCY6YWN0aXZlOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0YmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVudVRpdGxlVUkgPSBzdHlsZWQuZGl2YFxuXHRvdmVyZmxvdzogaGlkZGVuO1xuXHR3aWR0aDogMTAwJTtcbmA7XG5cbmV4cG9ydCBjb25zdCBNZW51VGl0bGVTZWFyY2hDb250cm9sV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbjogMTFweCAwOyAvLyBub24taWRlYWwgaGFyZGNvZGluZyB0byBtYWludGFpbiBzYW1lIGhlaWdodCBhcyBIZWFkaW5nLCBjb3VsZCBiZSBpbXByb3ZlZFxuXHRwYWRkaW5nOiAxcHg7IC8vIHNvIHRoZSBmb2N1cyBib3JkZXIgZG9lc24ndCBnZXQgY3V0IG9mZiBieSB0aGUgb3ZlcmZsb3cgaGlkZGVuIG9uIE1lbnVUaXRsZVVJXG5gO1xuXG5leHBvcnQgY29uc3QgTWVudVRpdGxlQWN0aW9uc1VJID0gc3R5bGVkLnNwYW5gXG5cdGhlaWdodDogJHsgc3BhY2UoIDYgKSB9OyAvLyAyNHB4LCBzYW1lIGhlaWdodCBhcyB0aGUgYnV0dG9ucyBpbnNpZGVcblxuXHQuY29tcG9uZW50cy1idXR0b24uaXMtc21hbGwge1xuXHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdG9wYWNpdHk6IDAuNztcblx0XHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAxICkgfTsgLy8gQXZvaWQgaGlkaW5nIHRoZSBmb2N1cyBvdXRsaW5lXG5cdFx0cGFkZGluZzogMDtcblxuXHRcdCY6YWN0aXZlOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0YmFja2dyb3VuZDogbm9uZTtcblx0XHRcdG9wYWNpdHk6IDE7XG5cdFx0XHRjb2xvcjogaW5oZXJpdDtcblx0XHR9XG5cdFx0Jjpob3Zlcjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdGJveC1zaGFkb3c6IG5vbmU7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgR3JvdXBUaXRsZVVJID0gc3R5bGVkKCBIZWFkaW5nIClgXG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCAxMiApIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGNvbG9yOiBpbmhlcml0O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdG1hcmdpbi1ib3R0b206ICR7IHNwYWNlKCAyICkgfTtcblx0cGFkZGluZzogJHsgKCkgPT5cblx0XHRpc1JUTCgpXG5cdFx0XHQ/IGAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDQgKSB9ICR7IHNwYWNlKCAxICkgfSAkeyBzcGFjZSggMiApIH1gXG5cdFx0XHQ6IGAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDIgKSB9ICR7IHNwYWNlKCAxICkgfSAkeyBzcGFjZShcblx0XHRcdFx0XHQ0XG5cdFx0XHQgICkgfWAgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQmFzZVVJID0gc3R5bGVkLmxpYFxuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0Y29sb3I6IGluaGVyaXQ7XG5cdG1hcmdpbi1ib3R0b206IDA7XG5cblx0PiBidXR0b24sXG5cdD4gYS5jb21wb25lbnRzLWJ1dHRvbixcblx0PiBhIHtcblx0XHR3aWR0aDogMTAwJTtcblx0XHRjb2xvcjogaW5oZXJpdDtcblx0XHRvcGFjaXR5OiAwLjc7XG5cdFx0cGFkZGluZzogJHsgc3BhY2UoIDIgKSB9ICR7IHNwYWNlKCA0ICkgfTsgLyogOHB4IDE2cHggKi9cblx0XHQkeyBydGwoIHsgdGV4dEFsaWduOiAnbGVmdCcgfSwgeyB0ZXh0QWxpZ246ICdyaWdodCcgfSApIH1cblxuXHRcdCY6aG92ZXIsXG5cdFx0Jjpmb2N1czpub3QoIFthcmlhLWRpc2FibGVkPSd0cnVlJ10gKTphY3RpdmUsXG5cdFx0JjphY3RpdmU6bm90KCBbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICk6YWN0aXZlIHtcblx0XHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHQmLmlzLWFjdGl2ZSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblxuXHRcdD4gYnV0dG9uLFxuXHRcdC5jb21wb25lbnRzLWJ1dHRvbjpob3Zlcixcblx0XHQ+IGEge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnRJbnZlcnRlZCB9O1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHQ+IHN2ZyBwYXRoIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDYwMCBdIH07XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtVUkgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRoZWlnaHQ6IGF1dG87XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdG1hcmdpbjogMDtcblx0cGFkZGluZzogJHsgc3BhY2UoIDEuNSApIH0gJHsgc3BhY2UoIDQgKSB9O1xuXHRmb250LXdlaWdodDogNDAwO1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0d2lkdGg6IDEwMCU7XG5cdGNvbG9yOiBpbmhlcml0O1xuXHRvcGFjaXR5OiAwLjc7XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbUljb25VSSA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQmFkZ2VVSSA9IHN0eWxlZC5zcGFuYFxuXHRtYXJnaW4tbGVmdDogJHsgKCkgPT4gKCBpc1JUTCgpID8gJzAnIDogc3BhY2UoIDIgKSApIH07XG5cdG1hcmdpbi1yaWdodDogJHsgKCkgPT4gKCBpc1JUTCgpID8gc3BhY2UoIDIgKSA6ICcwJyApIH07XG5cdGRpc3BsYXk6IGlubGluZS1mbGV4O1xuXHRwYWRkaW5nOiAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDMgKSB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRAa2V5ZnJhbWVzIGZhZGUtaW4ge1xuXHRcdGZyb20ge1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHR9XG5cdFx0dG8ge1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRhbmltYXRpb246IGZhZGUtaW4gMjUwbXMgZWFzZS1vdXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtVGl0bGVVSSA9IHN0eWxlZCggVGV4dCApYFxuXHQkeyAoKSA9PiAoIGlzUlRMKCkgPyAnbWFyZ2luLWxlZnQ6IGF1dG87JyA6ICdtYXJnaW4tcmlnaHQ6IGF1dG87JyApIH1cblx0Zm9udC1zaXplOiAxNHB4O1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0Y29sb3I6IGluaGVyaXQ7XG5gO1xuIl19 */"));
  var MenuBackButtonUI = /* @__PURE__ */ createStyled(button_default, false ? {
    target: "eeiismy9"
  } : {
    target: "eeiismy9",
    label: "MenuBackButtonUI"
  })(false ? {
    name: "26l0q2",
    styles: "&.is-tertiary{color:inherit;opacity:0.7;&:hover:not( :disabled ){opacity:1;box-shadow:none;color:inherit;}&:active:not( :disabled ){background:transparent;opacity:1;color:inherit;}}"
  } : {
    name: "26l0q2",
    styles: "&.is-tertiary{color:inherit;opacity:0.7;&:hover:not( :disabled ){opacity:1;box-shadow:none;color:inherit;}&:active:not( :disabled ){background:transparent;opacity:1;color:inherit;}}/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5hdmlnYXRpb24tc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE4Q2dEIiwiZmlsZSI6Im5hdmlnYXRpb24tc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBXb3JkUHJlc3MgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGlzUlRMIH0gZnJvbSAnQHdvcmRwcmVzcy9pMThuJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTIH0gZnJvbSAnLi4vLi4vdXRpbHMvY29sb3JzLXZhbHVlcyc7XG5pbXBvcnQgQnV0dG9uIGZyb20gJy4uLy4uL2J1dHRvbic7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vdGV4dCc7XG5pbXBvcnQgeyBIZWFkaW5nIH0gZnJvbSAnLi4vLi4vaGVhZGluZyc7XG5pbXBvcnQgeyBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5leHBvcnQgY29uc3QgTmF2aWdhdGlvblVJID0gc3R5bGVkLmRpdmBcblx0d2lkdGg6IDEwMCU7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdHBhZGRpbmc6IDAgJHsgc3BhY2UoIDQgKSB9O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lbnVVSSA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCA2ICkgfTtcblx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDYgKSB9O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXHR1bCB7XG5cdFx0cGFkZGluZzogMDtcblx0XHRtYXJnaW46IDA7XG5cdFx0bGlzdC1zdHlsZTogbm9uZTtcblx0fVxuXHQuY29tcG9uZW50cy1uYXZpZ2F0aW9uX19iYWNrLWJ1dHRvbiB7XG5cdFx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5cblx0LmNvbXBvbmVudHMtbmF2aWdhdGlvbl9fZ3JvdXAgKyAuY29tcG9uZW50cy1uYXZpZ2F0aW9uX19ncm91cCB7XG5cdFx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVudUJhY2tCdXR0b25VSSA9IHN0eWxlZCggQnV0dG9uIClgXG5cdCYuaXMtdGVydGlhcnkge1xuXHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdG9wYWNpdHk6IDAuNztcblxuXHRcdCY6aG92ZXI6bm90KCA6ZGlzYWJsZWQgKSB7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdH1cblxuXHRcdCY6YWN0aXZlOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0YmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVudVRpdGxlVUkgPSBzdHlsZWQuZGl2YFxuXHRvdmVyZmxvdzogaGlkZGVuO1xuXHR3aWR0aDogMTAwJTtcbmA7XG5cbmV4cG9ydCBjb25zdCBNZW51VGl0bGVTZWFyY2hDb250cm9sV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbjogMTFweCAwOyAvLyBub24taWRlYWwgaGFyZGNvZGluZyB0byBtYWludGFpbiBzYW1lIGhlaWdodCBhcyBIZWFkaW5nLCBjb3VsZCBiZSBpbXByb3ZlZFxuXHRwYWRkaW5nOiAxcHg7IC8vIHNvIHRoZSBmb2N1cyBib3JkZXIgZG9lc24ndCBnZXQgY3V0IG9mZiBieSB0aGUgb3ZlcmZsb3cgaGlkZGVuIG9uIE1lbnVUaXRsZVVJXG5gO1xuXG5leHBvcnQgY29uc3QgTWVudVRpdGxlQWN0aW9uc1VJID0gc3R5bGVkLnNwYW5gXG5cdGhlaWdodDogJHsgc3BhY2UoIDYgKSB9OyAvLyAyNHB4LCBzYW1lIGhlaWdodCBhcyB0aGUgYnV0dG9ucyBpbnNpZGVcblxuXHQuY29tcG9uZW50cy1idXR0b24uaXMtc21hbGwge1xuXHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdG9wYWNpdHk6IDAuNztcblx0XHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAxICkgfTsgLy8gQXZvaWQgaGlkaW5nIHRoZSBmb2N1cyBvdXRsaW5lXG5cdFx0cGFkZGluZzogMDtcblxuXHRcdCY6YWN0aXZlOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0YmFja2dyb3VuZDogbm9uZTtcblx0XHRcdG9wYWNpdHk6IDE7XG5cdFx0XHRjb2xvcjogaW5oZXJpdDtcblx0XHR9XG5cdFx0Jjpob3Zlcjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdGJveC1zaGFkb3c6IG5vbmU7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgR3JvdXBUaXRsZVVJID0gc3R5bGVkKCBIZWFkaW5nIClgXG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCAxMiApIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGNvbG9yOiBpbmhlcml0O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdG1hcmdpbi1ib3R0b206ICR7IHNwYWNlKCAyICkgfTtcblx0cGFkZGluZzogJHsgKCkgPT5cblx0XHRpc1JUTCgpXG5cdFx0XHQ/IGAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDQgKSB9ICR7IHNwYWNlKCAxICkgfSAkeyBzcGFjZSggMiApIH1gXG5cdFx0XHQ6IGAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDIgKSB9ICR7IHNwYWNlKCAxICkgfSAkeyBzcGFjZShcblx0XHRcdFx0XHQ0XG5cdFx0XHQgICkgfWAgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQmFzZVVJID0gc3R5bGVkLmxpYFxuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0Y29sb3I6IGluaGVyaXQ7XG5cdG1hcmdpbi1ib3R0b206IDA7XG5cblx0PiBidXR0b24sXG5cdD4gYS5jb21wb25lbnRzLWJ1dHRvbixcblx0PiBhIHtcblx0XHR3aWR0aDogMTAwJTtcblx0XHRjb2xvcjogaW5oZXJpdDtcblx0XHRvcGFjaXR5OiAwLjc7XG5cdFx0cGFkZGluZzogJHsgc3BhY2UoIDIgKSB9ICR7IHNwYWNlKCA0ICkgfTsgLyogOHB4IDE2cHggKi9cblx0XHQkeyBydGwoIHsgdGV4dEFsaWduOiAnbGVmdCcgfSwgeyB0ZXh0QWxpZ246ICdyaWdodCcgfSApIH1cblxuXHRcdCY6aG92ZXIsXG5cdFx0Jjpmb2N1czpub3QoIFthcmlhLWRpc2FibGVkPSd0cnVlJ10gKTphY3RpdmUsXG5cdFx0JjphY3RpdmU6bm90KCBbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICk6YWN0aXZlIHtcblx0XHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHQmLmlzLWFjdGl2ZSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblxuXHRcdD4gYnV0dG9uLFxuXHRcdC5jb21wb25lbnRzLWJ1dHRvbjpob3Zlcixcblx0XHQ+IGEge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnRJbnZlcnRlZCB9O1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHQ+IHN2ZyBwYXRoIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDYwMCBdIH07XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtVUkgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRoZWlnaHQ6IGF1dG87XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdG1hcmdpbjogMDtcblx0cGFkZGluZzogJHsgc3BhY2UoIDEuNSApIH0gJHsgc3BhY2UoIDQgKSB9O1xuXHRmb250LXdlaWdodDogNDAwO1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0d2lkdGg6IDEwMCU7XG5cdGNvbG9yOiBpbmhlcml0O1xuXHRvcGFjaXR5OiAwLjc7XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbUljb25VSSA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQmFkZ2VVSSA9IHN0eWxlZC5zcGFuYFxuXHRtYXJnaW4tbGVmdDogJHsgKCkgPT4gKCBpc1JUTCgpID8gJzAnIDogc3BhY2UoIDIgKSApIH07XG5cdG1hcmdpbi1yaWdodDogJHsgKCkgPT4gKCBpc1JUTCgpID8gc3BhY2UoIDIgKSA6ICcwJyApIH07XG5cdGRpc3BsYXk6IGlubGluZS1mbGV4O1xuXHRwYWRkaW5nOiAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDMgKSB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRAa2V5ZnJhbWVzIGZhZGUtaW4ge1xuXHRcdGZyb20ge1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHR9XG5cdFx0dG8ge1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRhbmltYXRpb246IGZhZGUtaW4gMjUwbXMgZWFzZS1vdXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtVGl0bGVVSSA9IHN0eWxlZCggVGV4dCApYFxuXHQkeyAoKSA9PiAoIGlzUlRMKCkgPyAnbWFyZ2luLWxlZnQ6IGF1dG87JyA6ICdtYXJnaW4tcmlnaHQ6IGF1dG87JyApIH1cblx0Zm9udC1zaXplOiAxNHB4O1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0Y29sb3I6IGluaGVyaXQ7XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__34
  });
  var MenuTitleUI = /* @__PURE__ */ createStyled("div", false ? {
    target: "eeiismy8"
  } : {
    target: "eeiismy8",
    label: "MenuTitleUI"
  })(false ? {
    name: "1aubja5",
    styles: "overflow:hidden;width:100%"
  } : {
    name: "1aubja5",
    styles: "overflow:hidden;width:100%/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5hdmlnYXRpb24tc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpRXFDIiwiZmlsZSI6Im5hdmlnYXRpb24tc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBXb3JkUHJlc3MgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGlzUlRMIH0gZnJvbSAnQHdvcmRwcmVzcy9pMThuJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTIH0gZnJvbSAnLi4vLi4vdXRpbHMvY29sb3JzLXZhbHVlcyc7XG5pbXBvcnQgQnV0dG9uIGZyb20gJy4uLy4uL2J1dHRvbic7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vdGV4dCc7XG5pbXBvcnQgeyBIZWFkaW5nIH0gZnJvbSAnLi4vLi4vaGVhZGluZyc7XG5pbXBvcnQgeyBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5leHBvcnQgY29uc3QgTmF2aWdhdGlvblVJID0gc3R5bGVkLmRpdmBcblx0d2lkdGg6IDEwMCU7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdHBhZGRpbmc6IDAgJHsgc3BhY2UoIDQgKSB9O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lbnVVSSA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCA2ICkgfTtcblx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDYgKSB9O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXHR1bCB7XG5cdFx0cGFkZGluZzogMDtcblx0XHRtYXJnaW46IDA7XG5cdFx0bGlzdC1zdHlsZTogbm9uZTtcblx0fVxuXHQuY29tcG9uZW50cy1uYXZpZ2F0aW9uX19iYWNrLWJ1dHRvbiB7XG5cdFx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5cblx0LmNvbXBvbmVudHMtbmF2aWdhdGlvbl9fZ3JvdXAgKyAuY29tcG9uZW50cy1uYXZpZ2F0aW9uX19ncm91cCB7XG5cdFx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVudUJhY2tCdXR0b25VSSA9IHN0eWxlZCggQnV0dG9uIClgXG5cdCYuaXMtdGVydGlhcnkge1xuXHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdG9wYWNpdHk6IDAuNztcblxuXHRcdCY6aG92ZXI6bm90KCA6ZGlzYWJsZWQgKSB7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdH1cblxuXHRcdCY6YWN0aXZlOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0YmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVudVRpdGxlVUkgPSBzdHlsZWQuZGl2YFxuXHRvdmVyZmxvdzogaGlkZGVuO1xuXHR3aWR0aDogMTAwJTtcbmA7XG5cbmV4cG9ydCBjb25zdCBNZW51VGl0bGVTZWFyY2hDb250cm9sV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbjogMTFweCAwOyAvLyBub24taWRlYWwgaGFyZGNvZGluZyB0byBtYWludGFpbiBzYW1lIGhlaWdodCBhcyBIZWFkaW5nLCBjb3VsZCBiZSBpbXByb3ZlZFxuXHRwYWRkaW5nOiAxcHg7IC8vIHNvIHRoZSBmb2N1cyBib3JkZXIgZG9lc24ndCBnZXQgY3V0IG9mZiBieSB0aGUgb3ZlcmZsb3cgaGlkZGVuIG9uIE1lbnVUaXRsZVVJXG5gO1xuXG5leHBvcnQgY29uc3QgTWVudVRpdGxlQWN0aW9uc1VJID0gc3R5bGVkLnNwYW5gXG5cdGhlaWdodDogJHsgc3BhY2UoIDYgKSB9OyAvLyAyNHB4LCBzYW1lIGhlaWdodCBhcyB0aGUgYnV0dG9ucyBpbnNpZGVcblxuXHQuY29tcG9uZW50cy1idXR0b24uaXMtc21hbGwge1xuXHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdG9wYWNpdHk6IDAuNztcblx0XHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAxICkgfTsgLy8gQXZvaWQgaGlkaW5nIHRoZSBmb2N1cyBvdXRsaW5lXG5cdFx0cGFkZGluZzogMDtcblxuXHRcdCY6YWN0aXZlOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0YmFja2dyb3VuZDogbm9uZTtcblx0XHRcdG9wYWNpdHk6IDE7XG5cdFx0XHRjb2xvcjogaW5oZXJpdDtcblx0XHR9XG5cdFx0Jjpob3Zlcjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdGJveC1zaGFkb3c6IG5vbmU7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgR3JvdXBUaXRsZVVJID0gc3R5bGVkKCBIZWFkaW5nIClgXG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCAxMiApIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGNvbG9yOiBpbmhlcml0O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdG1hcmdpbi1ib3R0b206ICR7IHNwYWNlKCAyICkgfTtcblx0cGFkZGluZzogJHsgKCkgPT5cblx0XHRpc1JUTCgpXG5cdFx0XHQ/IGAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDQgKSB9ICR7IHNwYWNlKCAxICkgfSAkeyBzcGFjZSggMiApIH1gXG5cdFx0XHQ6IGAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDIgKSB9ICR7IHNwYWNlKCAxICkgfSAkeyBzcGFjZShcblx0XHRcdFx0XHQ0XG5cdFx0XHQgICkgfWAgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQmFzZVVJID0gc3R5bGVkLmxpYFxuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0Y29sb3I6IGluaGVyaXQ7XG5cdG1hcmdpbi1ib3R0b206IDA7XG5cblx0PiBidXR0b24sXG5cdD4gYS5jb21wb25lbnRzLWJ1dHRvbixcblx0PiBhIHtcblx0XHR3aWR0aDogMTAwJTtcblx0XHRjb2xvcjogaW5oZXJpdDtcblx0XHRvcGFjaXR5OiAwLjc7XG5cdFx0cGFkZGluZzogJHsgc3BhY2UoIDIgKSB9ICR7IHNwYWNlKCA0ICkgfTsgLyogOHB4IDE2cHggKi9cblx0XHQkeyBydGwoIHsgdGV4dEFsaWduOiAnbGVmdCcgfSwgeyB0ZXh0QWxpZ246ICdyaWdodCcgfSApIH1cblxuXHRcdCY6aG92ZXIsXG5cdFx0Jjpmb2N1czpub3QoIFthcmlhLWRpc2FibGVkPSd0cnVlJ10gKTphY3RpdmUsXG5cdFx0JjphY3RpdmU6bm90KCBbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICk6YWN0aXZlIHtcblx0XHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHQmLmlzLWFjdGl2ZSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblxuXHRcdD4gYnV0dG9uLFxuXHRcdC5jb21wb25lbnRzLWJ1dHRvbjpob3Zlcixcblx0XHQ+IGEge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnRJbnZlcnRlZCB9O1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHQ+IHN2ZyBwYXRoIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDYwMCBdIH07XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtVUkgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRoZWlnaHQ6IGF1dG87XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdG1hcmdpbjogMDtcblx0cGFkZGluZzogJHsgc3BhY2UoIDEuNSApIH0gJHsgc3BhY2UoIDQgKSB9O1xuXHRmb250LXdlaWdodDogNDAwO1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0d2lkdGg6IDEwMCU7XG5cdGNvbG9yOiBpbmhlcml0O1xuXHRvcGFjaXR5OiAwLjc7XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbUljb25VSSA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQmFkZ2VVSSA9IHN0eWxlZC5zcGFuYFxuXHRtYXJnaW4tbGVmdDogJHsgKCkgPT4gKCBpc1JUTCgpID8gJzAnIDogc3BhY2UoIDIgKSApIH07XG5cdG1hcmdpbi1yaWdodDogJHsgKCkgPT4gKCBpc1JUTCgpID8gc3BhY2UoIDIgKSA6ICcwJyApIH07XG5cdGRpc3BsYXk6IGlubGluZS1mbGV4O1xuXHRwYWRkaW5nOiAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDMgKSB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRAa2V5ZnJhbWVzIGZhZGUtaW4ge1xuXHRcdGZyb20ge1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHR9XG5cdFx0dG8ge1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRhbmltYXRpb246IGZhZGUtaW4gMjUwbXMgZWFzZS1vdXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtVGl0bGVVSSA9IHN0eWxlZCggVGV4dCApYFxuXHQkeyAoKSA9PiAoIGlzUlRMKCkgPyAnbWFyZ2luLWxlZnQ6IGF1dG87JyA6ICdtYXJnaW4tcmlnaHQ6IGF1dG87JyApIH1cblx0Zm9udC1zaXplOiAxNHB4O1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0Y29sb3I6IGluaGVyaXQ7XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__34
  });
  var MenuTitleSearchControlWrapper = /* @__PURE__ */ createStyled("div", false ? {
    target: "eeiismy7"
  } : {
    target: "eeiismy7",
    label: "MenuTitleSearchControlWrapper"
  })(false ? {
    name: "rgorny",
    styles: "margin:11px 0;padding:1px"
  } : {
    name: "rgorny",
    styles: "margin:11px 0;padding:1px/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5hdmlnYXRpb24tc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzRXVEIiwiZmlsZSI6Im5hdmlnYXRpb24tc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBXb3JkUHJlc3MgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGlzUlRMIH0gZnJvbSAnQHdvcmRwcmVzcy9pMThuJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTIH0gZnJvbSAnLi4vLi4vdXRpbHMvY29sb3JzLXZhbHVlcyc7XG5pbXBvcnQgQnV0dG9uIGZyb20gJy4uLy4uL2J1dHRvbic7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vdGV4dCc7XG5pbXBvcnQgeyBIZWFkaW5nIH0gZnJvbSAnLi4vLi4vaGVhZGluZyc7XG5pbXBvcnQgeyBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5leHBvcnQgY29uc3QgTmF2aWdhdGlvblVJID0gc3R5bGVkLmRpdmBcblx0d2lkdGg6IDEwMCU7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdHBhZGRpbmc6IDAgJHsgc3BhY2UoIDQgKSB9O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lbnVVSSA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCA2ICkgfTtcblx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDYgKSB9O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXHR1bCB7XG5cdFx0cGFkZGluZzogMDtcblx0XHRtYXJnaW46IDA7XG5cdFx0bGlzdC1zdHlsZTogbm9uZTtcblx0fVxuXHQuY29tcG9uZW50cy1uYXZpZ2F0aW9uX19iYWNrLWJ1dHRvbiB7XG5cdFx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5cblx0LmNvbXBvbmVudHMtbmF2aWdhdGlvbl9fZ3JvdXAgKyAuY29tcG9uZW50cy1uYXZpZ2F0aW9uX19ncm91cCB7XG5cdFx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVudUJhY2tCdXR0b25VSSA9IHN0eWxlZCggQnV0dG9uIClgXG5cdCYuaXMtdGVydGlhcnkge1xuXHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdG9wYWNpdHk6IDAuNztcblxuXHRcdCY6aG92ZXI6bm90KCA6ZGlzYWJsZWQgKSB7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdH1cblxuXHRcdCY6YWN0aXZlOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0YmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVudVRpdGxlVUkgPSBzdHlsZWQuZGl2YFxuXHRvdmVyZmxvdzogaGlkZGVuO1xuXHR3aWR0aDogMTAwJTtcbmA7XG5cbmV4cG9ydCBjb25zdCBNZW51VGl0bGVTZWFyY2hDb250cm9sV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbjogMTFweCAwOyAvLyBub24taWRlYWwgaGFyZGNvZGluZyB0byBtYWludGFpbiBzYW1lIGhlaWdodCBhcyBIZWFkaW5nLCBjb3VsZCBiZSBpbXByb3ZlZFxuXHRwYWRkaW5nOiAxcHg7IC8vIHNvIHRoZSBmb2N1cyBib3JkZXIgZG9lc24ndCBnZXQgY3V0IG9mZiBieSB0aGUgb3ZlcmZsb3cgaGlkZGVuIG9uIE1lbnVUaXRsZVVJXG5gO1xuXG5leHBvcnQgY29uc3QgTWVudVRpdGxlQWN0aW9uc1VJID0gc3R5bGVkLnNwYW5gXG5cdGhlaWdodDogJHsgc3BhY2UoIDYgKSB9OyAvLyAyNHB4LCBzYW1lIGhlaWdodCBhcyB0aGUgYnV0dG9ucyBpbnNpZGVcblxuXHQuY29tcG9uZW50cy1idXR0b24uaXMtc21hbGwge1xuXHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdG9wYWNpdHk6IDAuNztcblx0XHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAxICkgfTsgLy8gQXZvaWQgaGlkaW5nIHRoZSBmb2N1cyBvdXRsaW5lXG5cdFx0cGFkZGluZzogMDtcblxuXHRcdCY6YWN0aXZlOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0YmFja2dyb3VuZDogbm9uZTtcblx0XHRcdG9wYWNpdHk6IDE7XG5cdFx0XHRjb2xvcjogaW5oZXJpdDtcblx0XHR9XG5cdFx0Jjpob3Zlcjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdGJveC1zaGFkb3c6IG5vbmU7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgR3JvdXBUaXRsZVVJID0gc3R5bGVkKCBIZWFkaW5nIClgXG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCAxMiApIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGNvbG9yOiBpbmhlcml0O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdG1hcmdpbi1ib3R0b206ICR7IHNwYWNlKCAyICkgfTtcblx0cGFkZGluZzogJHsgKCkgPT5cblx0XHRpc1JUTCgpXG5cdFx0XHQ/IGAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDQgKSB9ICR7IHNwYWNlKCAxICkgfSAkeyBzcGFjZSggMiApIH1gXG5cdFx0XHQ6IGAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDIgKSB9ICR7IHNwYWNlKCAxICkgfSAkeyBzcGFjZShcblx0XHRcdFx0XHQ0XG5cdFx0XHQgICkgfWAgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQmFzZVVJID0gc3R5bGVkLmxpYFxuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0Y29sb3I6IGluaGVyaXQ7XG5cdG1hcmdpbi1ib3R0b206IDA7XG5cblx0PiBidXR0b24sXG5cdD4gYS5jb21wb25lbnRzLWJ1dHRvbixcblx0PiBhIHtcblx0XHR3aWR0aDogMTAwJTtcblx0XHRjb2xvcjogaW5oZXJpdDtcblx0XHRvcGFjaXR5OiAwLjc7XG5cdFx0cGFkZGluZzogJHsgc3BhY2UoIDIgKSB9ICR7IHNwYWNlKCA0ICkgfTsgLyogOHB4IDE2cHggKi9cblx0XHQkeyBydGwoIHsgdGV4dEFsaWduOiAnbGVmdCcgfSwgeyB0ZXh0QWxpZ246ICdyaWdodCcgfSApIH1cblxuXHRcdCY6aG92ZXIsXG5cdFx0Jjpmb2N1czpub3QoIFthcmlhLWRpc2FibGVkPSd0cnVlJ10gKTphY3RpdmUsXG5cdFx0JjphY3RpdmU6bm90KCBbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICk6YWN0aXZlIHtcblx0XHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHQmLmlzLWFjdGl2ZSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblxuXHRcdD4gYnV0dG9uLFxuXHRcdC5jb21wb25lbnRzLWJ1dHRvbjpob3Zlcixcblx0XHQ+IGEge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnRJbnZlcnRlZCB9O1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHQ+IHN2ZyBwYXRoIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDYwMCBdIH07XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtVUkgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRoZWlnaHQ6IGF1dG87XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdG1hcmdpbjogMDtcblx0cGFkZGluZzogJHsgc3BhY2UoIDEuNSApIH0gJHsgc3BhY2UoIDQgKSB9O1xuXHRmb250LXdlaWdodDogNDAwO1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0d2lkdGg6IDEwMCU7XG5cdGNvbG9yOiBpbmhlcml0O1xuXHRvcGFjaXR5OiAwLjc7XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbUljb25VSSA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQmFkZ2VVSSA9IHN0eWxlZC5zcGFuYFxuXHRtYXJnaW4tbGVmdDogJHsgKCkgPT4gKCBpc1JUTCgpID8gJzAnIDogc3BhY2UoIDIgKSApIH07XG5cdG1hcmdpbi1yaWdodDogJHsgKCkgPT4gKCBpc1JUTCgpID8gc3BhY2UoIDIgKSA6ICcwJyApIH07XG5cdGRpc3BsYXk6IGlubGluZS1mbGV4O1xuXHRwYWRkaW5nOiAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDMgKSB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRAa2V5ZnJhbWVzIGZhZGUtaW4ge1xuXHRcdGZyb20ge1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHR9XG5cdFx0dG8ge1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRhbmltYXRpb246IGZhZGUtaW4gMjUwbXMgZWFzZS1vdXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtVGl0bGVVSSA9IHN0eWxlZCggVGV4dCApYFxuXHQkeyAoKSA9PiAoIGlzUlRMKCkgPyAnbWFyZ2luLWxlZnQ6IGF1dG87JyA6ICdtYXJnaW4tcmlnaHQ6IGF1dG87JyApIH1cblx0Zm9udC1zaXplOiAxNHB4O1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0Y29sb3I6IGluaGVyaXQ7XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__34
  });
  var MenuTitleActionsUI = /* @__PURE__ */ createStyled("span", false ? {
    target: "eeiismy6"
  } : {
    target: "eeiismy6",
    label: "MenuTitleActionsUI"
  })("height:", space(6), ";.components-button.is-small{color:inherit;opacity:0.7;margin-right:", space(1), ";padding:0;&:active:not( :disabled ){background:none;opacity:1;color:inherit;}&:hover:not( :disabled ){box-shadow:none;opacity:1;color:inherit;}}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5hdmlnYXRpb24tc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyRTZDIiwiZmlsZSI6Im5hdmlnYXRpb24tc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBXb3JkUHJlc3MgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGlzUlRMIH0gZnJvbSAnQHdvcmRwcmVzcy9pMThuJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTIH0gZnJvbSAnLi4vLi4vdXRpbHMvY29sb3JzLXZhbHVlcyc7XG5pbXBvcnQgQnV0dG9uIGZyb20gJy4uLy4uL2J1dHRvbic7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vdGV4dCc7XG5pbXBvcnQgeyBIZWFkaW5nIH0gZnJvbSAnLi4vLi4vaGVhZGluZyc7XG5pbXBvcnQgeyBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5leHBvcnQgY29uc3QgTmF2aWdhdGlvblVJID0gc3R5bGVkLmRpdmBcblx0d2lkdGg6IDEwMCU7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdHBhZGRpbmc6IDAgJHsgc3BhY2UoIDQgKSB9O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lbnVVSSA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCA2ICkgfTtcblx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDYgKSB9O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXHR1bCB7XG5cdFx0cGFkZGluZzogMDtcblx0XHRtYXJnaW46IDA7XG5cdFx0bGlzdC1zdHlsZTogbm9uZTtcblx0fVxuXHQuY29tcG9uZW50cy1uYXZpZ2F0aW9uX19iYWNrLWJ1dHRvbiB7XG5cdFx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5cblx0LmNvbXBvbmVudHMtbmF2aWdhdGlvbl9fZ3JvdXAgKyAuY29tcG9uZW50cy1uYXZpZ2F0aW9uX19ncm91cCB7XG5cdFx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVudUJhY2tCdXR0b25VSSA9IHN0eWxlZCggQnV0dG9uIClgXG5cdCYuaXMtdGVydGlhcnkge1xuXHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdG9wYWNpdHk6IDAuNztcblxuXHRcdCY6aG92ZXI6bm90KCA6ZGlzYWJsZWQgKSB7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdH1cblxuXHRcdCY6YWN0aXZlOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0YmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVudVRpdGxlVUkgPSBzdHlsZWQuZGl2YFxuXHRvdmVyZmxvdzogaGlkZGVuO1xuXHR3aWR0aDogMTAwJTtcbmA7XG5cbmV4cG9ydCBjb25zdCBNZW51VGl0bGVTZWFyY2hDb250cm9sV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbjogMTFweCAwOyAvLyBub24taWRlYWwgaGFyZGNvZGluZyB0byBtYWludGFpbiBzYW1lIGhlaWdodCBhcyBIZWFkaW5nLCBjb3VsZCBiZSBpbXByb3ZlZFxuXHRwYWRkaW5nOiAxcHg7IC8vIHNvIHRoZSBmb2N1cyBib3JkZXIgZG9lc24ndCBnZXQgY3V0IG9mZiBieSB0aGUgb3ZlcmZsb3cgaGlkZGVuIG9uIE1lbnVUaXRsZVVJXG5gO1xuXG5leHBvcnQgY29uc3QgTWVudVRpdGxlQWN0aW9uc1VJID0gc3R5bGVkLnNwYW5gXG5cdGhlaWdodDogJHsgc3BhY2UoIDYgKSB9OyAvLyAyNHB4LCBzYW1lIGhlaWdodCBhcyB0aGUgYnV0dG9ucyBpbnNpZGVcblxuXHQuY29tcG9uZW50cy1idXR0b24uaXMtc21hbGwge1xuXHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdG9wYWNpdHk6IDAuNztcblx0XHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAxICkgfTsgLy8gQXZvaWQgaGlkaW5nIHRoZSBmb2N1cyBvdXRsaW5lXG5cdFx0cGFkZGluZzogMDtcblxuXHRcdCY6YWN0aXZlOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0YmFja2dyb3VuZDogbm9uZTtcblx0XHRcdG9wYWNpdHk6IDE7XG5cdFx0XHRjb2xvcjogaW5oZXJpdDtcblx0XHR9XG5cdFx0Jjpob3Zlcjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdGJveC1zaGFkb3c6IG5vbmU7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgR3JvdXBUaXRsZVVJID0gc3R5bGVkKCBIZWFkaW5nIClgXG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCAxMiApIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGNvbG9yOiBpbmhlcml0O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdG1hcmdpbi1ib3R0b206ICR7IHNwYWNlKCAyICkgfTtcblx0cGFkZGluZzogJHsgKCkgPT5cblx0XHRpc1JUTCgpXG5cdFx0XHQ/IGAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDQgKSB9ICR7IHNwYWNlKCAxICkgfSAkeyBzcGFjZSggMiApIH1gXG5cdFx0XHQ6IGAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDIgKSB9ICR7IHNwYWNlKCAxICkgfSAkeyBzcGFjZShcblx0XHRcdFx0XHQ0XG5cdFx0XHQgICkgfWAgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQmFzZVVJID0gc3R5bGVkLmxpYFxuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0Y29sb3I6IGluaGVyaXQ7XG5cdG1hcmdpbi1ib3R0b206IDA7XG5cblx0PiBidXR0b24sXG5cdD4gYS5jb21wb25lbnRzLWJ1dHRvbixcblx0PiBhIHtcblx0XHR3aWR0aDogMTAwJTtcblx0XHRjb2xvcjogaW5oZXJpdDtcblx0XHRvcGFjaXR5OiAwLjc7XG5cdFx0cGFkZGluZzogJHsgc3BhY2UoIDIgKSB9ICR7IHNwYWNlKCA0ICkgfTsgLyogOHB4IDE2cHggKi9cblx0XHQkeyBydGwoIHsgdGV4dEFsaWduOiAnbGVmdCcgfSwgeyB0ZXh0QWxpZ246ICdyaWdodCcgfSApIH1cblxuXHRcdCY6aG92ZXIsXG5cdFx0Jjpmb2N1czpub3QoIFthcmlhLWRpc2FibGVkPSd0cnVlJ10gKTphY3RpdmUsXG5cdFx0JjphY3RpdmU6bm90KCBbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICk6YWN0aXZlIHtcblx0XHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHQmLmlzLWFjdGl2ZSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblxuXHRcdD4gYnV0dG9uLFxuXHRcdC5jb21wb25lbnRzLWJ1dHRvbjpob3Zlcixcblx0XHQ+IGEge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnRJbnZlcnRlZCB9O1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHQ+IHN2ZyBwYXRoIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDYwMCBdIH07XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtVUkgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRoZWlnaHQ6IGF1dG87XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdG1hcmdpbjogMDtcblx0cGFkZGluZzogJHsgc3BhY2UoIDEuNSApIH0gJHsgc3BhY2UoIDQgKSB9O1xuXHRmb250LXdlaWdodDogNDAwO1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0d2lkdGg6IDEwMCU7XG5cdGNvbG9yOiBpbmhlcml0O1xuXHRvcGFjaXR5OiAwLjc7XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbUljb25VSSA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQmFkZ2VVSSA9IHN0eWxlZC5zcGFuYFxuXHRtYXJnaW4tbGVmdDogJHsgKCkgPT4gKCBpc1JUTCgpID8gJzAnIDogc3BhY2UoIDIgKSApIH07XG5cdG1hcmdpbi1yaWdodDogJHsgKCkgPT4gKCBpc1JUTCgpID8gc3BhY2UoIDIgKSA6ICcwJyApIH07XG5cdGRpc3BsYXk6IGlubGluZS1mbGV4O1xuXHRwYWRkaW5nOiAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDMgKSB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRAa2V5ZnJhbWVzIGZhZGUtaW4ge1xuXHRcdGZyb20ge1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHR9XG5cdFx0dG8ge1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRhbmltYXRpb246IGZhZGUtaW4gMjUwbXMgZWFzZS1vdXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtVGl0bGVVSSA9IHN0eWxlZCggVGV4dCApYFxuXHQkeyAoKSA9PiAoIGlzUlRMKCkgPyAnbWFyZ2luLWxlZnQ6IGF1dG87JyA6ICdtYXJnaW4tcmlnaHQ6IGF1dG87JyApIH1cblx0Zm9udC1zaXplOiAxNHB4O1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0Y29sb3I6IGluaGVyaXQ7XG5gO1xuIl19 */"));
  var GroupTitleUI = /* @__PURE__ */ createStyled(component_default19, false ? {
    target: "eeiismy5"
  } : {
    target: "eeiismy5",
    label: "GroupTitleUI"
  })("min-height:", space(12), ";align-items:center;color:inherit;display:flex;justify-content:space-between;margin-bottom:", space(2), ";padding:", () => (0, import_i18n60.isRTL)() ? `${space(1)} ${space(4)} ${space(1)} ${space(2)}` : `${space(1)} ${space(2)} ${space(1)} ${space(4)}`, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5hdmlnYXRpb24tc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpRzZDIiwiZmlsZSI6Im5hdmlnYXRpb24tc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBXb3JkUHJlc3MgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGlzUlRMIH0gZnJvbSAnQHdvcmRwcmVzcy9pMThuJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTIH0gZnJvbSAnLi4vLi4vdXRpbHMvY29sb3JzLXZhbHVlcyc7XG5pbXBvcnQgQnV0dG9uIGZyb20gJy4uLy4uL2J1dHRvbic7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vdGV4dCc7XG5pbXBvcnQgeyBIZWFkaW5nIH0gZnJvbSAnLi4vLi4vaGVhZGluZyc7XG5pbXBvcnQgeyBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5leHBvcnQgY29uc3QgTmF2aWdhdGlvblVJID0gc3R5bGVkLmRpdmBcblx0d2lkdGg6IDEwMCU7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdHBhZGRpbmc6IDAgJHsgc3BhY2UoIDQgKSB9O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lbnVVSSA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCA2ICkgfTtcblx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDYgKSB9O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXHR1bCB7XG5cdFx0cGFkZGluZzogMDtcblx0XHRtYXJnaW46IDA7XG5cdFx0bGlzdC1zdHlsZTogbm9uZTtcblx0fVxuXHQuY29tcG9uZW50cy1uYXZpZ2F0aW9uX19iYWNrLWJ1dHRvbiB7XG5cdFx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5cblx0LmNvbXBvbmVudHMtbmF2aWdhdGlvbl9fZ3JvdXAgKyAuY29tcG9uZW50cy1uYXZpZ2F0aW9uX19ncm91cCB7XG5cdFx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVudUJhY2tCdXR0b25VSSA9IHN0eWxlZCggQnV0dG9uIClgXG5cdCYuaXMtdGVydGlhcnkge1xuXHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdG9wYWNpdHk6IDAuNztcblxuXHRcdCY6aG92ZXI6bm90KCA6ZGlzYWJsZWQgKSB7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdH1cblxuXHRcdCY6YWN0aXZlOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0YmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVudVRpdGxlVUkgPSBzdHlsZWQuZGl2YFxuXHRvdmVyZmxvdzogaGlkZGVuO1xuXHR3aWR0aDogMTAwJTtcbmA7XG5cbmV4cG9ydCBjb25zdCBNZW51VGl0bGVTZWFyY2hDb250cm9sV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbjogMTFweCAwOyAvLyBub24taWRlYWwgaGFyZGNvZGluZyB0byBtYWludGFpbiBzYW1lIGhlaWdodCBhcyBIZWFkaW5nLCBjb3VsZCBiZSBpbXByb3ZlZFxuXHRwYWRkaW5nOiAxcHg7IC8vIHNvIHRoZSBmb2N1cyBib3JkZXIgZG9lc24ndCBnZXQgY3V0IG9mZiBieSB0aGUgb3ZlcmZsb3cgaGlkZGVuIG9uIE1lbnVUaXRsZVVJXG5gO1xuXG5leHBvcnQgY29uc3QgTWVudVRpdGxlQWN0aW9uc1VJID0gc3R5bGVkLnNwYW5gXG5cdGhlaWdodDogJHsgc3BhY2UoIDYgKSB9OyAvLyAyNHB4LCBzYW1lIGhlaWdodCBhcyB0aGUgYnV0dG9ucyBpbnNpZGVcblxuXHQuY29tcG9uZW50cy1idXR0b24uaXMtc21hbGwge1xuXHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdG9wYWNpdHk6IDAuNztcblx0XHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAxICkgfTsgLy8gQXZvaWQgaGlkaW5nIHRoZSBmb2N1cyBvdXRsaW5lXG5cdFx0cGFkZGluZzogMDtcblxuXHRcdCY6YWN0aXZlOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0YmFja2dyb3VuZDogbm9uZTtcblx0XHRcdG9wYWNpdHk6IDE7XG5cdFx0XHRjb2xvcjogaW5oZXJpdDtcblx0XHR9XG5cdFx0Jjpob3Zlcjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdGJveC1zaGFkb3c6IG5vbmU7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgR3JvdXBUaXRsZVVJID0gc3R5bGVkKCBIZWFkaW5nIClgXG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCAxMiApIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGNvbG9yOiBpbmhlcml0O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdG1hcmdpbi1ib3R0b206ICR7IHNwYWNlKCAyICkgfTtcblx0cGFkZGluZzogJHsgKCkgPT5cblx0XHRpc1JUTCgpXG5cdFx0XHQ/IGAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDQgKSB9ICR7IHNwYWNlKCAxICkgfSAkeyBzcGFjZSggMiApIH1gXG5cdFx0XHQ6IGAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDIgKSB9ICR7IHNwYWNlKCAxICkgfSAkeyBzcGFjZShcblx0XHRcdFx0XHQ0XG5cdFx0XHQgICkgfWAgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQmFzZVVJID0gc3R5bGVkLmxpYFxuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0Y29sb3I6IGluaGVyaXQ7XG5cdG1hcmdpbi1ib3R0b206IDA7XG5cblx0PiBidXR0b24sXG5cdD4gYS5jb21wb25lbnRzLWJ1dHRvbixcblx0PiBhIHtcblx0XHR3aWR0aDogMTAwJTtcblx0XHRjb2xvcjogaW5oZXJpdDtcblx0XHRvcGFjaXR5OiAwLjc7XG5cdFx0cGFkZGluZzogJHsgc3BhY2UoIDIgKSB9ICR7IHNwYWNlKCA0ICkgfTsgLyogOHB4IDE2cHggKi9cblx0XHQkeyBydGwoIHsgdGV4dEFsaWduOiAnbGVmdCcgfSwgeyB0ZXh0QWxpZ246ICdyaWdodCcgfSApIH1cblxuXHRcdCY6aG92ZXIsXG5cdFx0Jjpmb2N1czpub3QoIFthcmlhLWRpc2FibGVkPSd0cnVlJ10gKTphY3RpdmUsXG5cdFx0JjphY3RpdmU6bm90KCBbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICk6YWN0aXZlIHtcblx0XHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHQmLmlzLWFjdGl2ZSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblxuXHRcdD4gYnV0dG9uLFxuXHRcdC5jb21wb25lbnRzLWJ1dHRvbjpob3Zlcixcblx0XHQ+IGEge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnRJbnZlcnRlZCB9O1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHQ+IHN2ZyBwYXRoIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDYwMCBdIH07XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtVUkgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRoZWlnaHQ6IGF1dG87XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdG1hcmdpbjogMDtcblx0cGFkZGluZzogJHsgc3BhY2UoIDEuNSApIH0gJHsgc3BhY2UoIDQgKSB9O1xuXHRmb250LXdlaWdodDogNDAwO1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0d2lkdGg6IDEwMCU7XG5cdGNvbG9yOiBpbmhlcml0O1xuXHRvcGFjaXR5OiAwLjc7XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbUljb25VSSA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQmFkZ2VVSSA9IHN0eWxlZC5zcGFuYFxuXHRtYXJnaW4tbGVmdDogJHsgKCkgPT4gKCBpc1JUTCgpID8gJzAnIDogc3BhY2UoIDIgKSApIH07XG5cdG1hcmdpbi1yaWdodDogJHsgKCkgPT4gKCBpc1JUTCgpID8gc3BhY2UoIDIgKSA6ICcwJyApIH07XG5cdGRpc3BsYXk6IGlubGluZS1mbGV4O1xuXHRwYWRkaW5nOiAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDMgKSB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRAa2V5ZnJhbWVzIGZhZGUtaW4ge1xuXHRcdGZyb20ge1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHR9XG5cdFx0dG8ge1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRhbmltYXRpb246IGZhZGUtaW4gMjUwbXMgZWFzZS1vdXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtVGl0bGVVSSA9IHN0eWxlZCggVGV4dCApYFxuXHQkeyAoKSA9PiAoIGlzUlRMKCkgPyAnbWFyZ2luLWxlZnQ6IGF1dG87JyA6ICdtYXJnaW4tcmlnaHQ6IGF1dG87JyApIH1cblx0Zm9udC1zaXplOiAxNHB4O1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0Y29sb3I6IGluaGVyaXQ7XG5gO1xuIl19 */"));
  var ItemBaseUI = /* @__PURE__ */ createStyled("li", false ? {
    target: "eeiismy4"
  } : {
    target: "eeiismy4",
    label: "ItemBaseUI"
  })("border-radius:", config_values_default.radiusSmall, ";color:inherit;margin-bottom:0;>button,>a.components-button,>a{width:100%;color:inherit;opacity:0.7;padding:", space(2), " ", space(4), ";", rtl({
    textAlign: "left"
  }, {
    textAlign: "right"
  }), " &:hover,&:focus:not( [aria-disabled='true'] ):active,&:active:not( [aria-disabled='true'] ):active{color:inherit;opacity:1;}}&.is-active{background-color:", COLORS.theme.accent, ";color:", COLORS.theme.accentInverted, ";>button,.components-button:hover,>a{color:", COLORS.theme.accentInverted, ";opacity:1;}}>svg path{color:", COLORS.gray[600], ";}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5hdmlnYXRpb24tc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnSG1DIiwiZmlsZSI6Im5hdmlnYXRpb24tc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBXb3JkUHJlc3MgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGlzUlRMIH0gZnJvbSAnQHdvcmRwcmVzcy9pMThuJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTIH0gZnJvbSAnLi4vLi4vdXRpbHMvY29sb3JzLXZhbHVlcyc7XG5pbXBvcnQgQnV0dG9uIGZyb20gJy4uLy4uL2J1dHRvbic7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vdGV4dCc7XG5pbXBvcnQgeyBIZWFkaW5nIH0gZnJvbSAnLi4vLi4vaGVhZGluZyc7XG5pbXBvcnQgeyBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5leHBvcnQgY29uc3QgTmF2aWdhdGlvblVJID0gc3R5bGVkLmRpdmBcblx0d2lkdGg6IDEwMCU7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdHBhZGRpbmc6IDAgJHsgc3BhY2UoIDQgKSB9O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lbnVVSSA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCA2ICkgfTtcblx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDYgKSB9O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXHR1bCB7XG5cdFx0cGFkZGluZzogMDtcblx0XHRtYXJnaW46IDA7XG5cdFx0bGlzdC1zdHlsZTogbm9uZTtcblx0fVxuXHQuY29tcG9uZW50cy1uYXZpZ2F0aW9uX19iYWNrLWJ1dHRvbiB7XG5cdFx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5cblx0LmNvbXBvbmVudHMtbmF2aWdhdGlvbl9fZ3JvdXAgKyAuY29tcG9uZW50cy1uYXZpZ2F0aW9uX19ncm91cCB7XG5cdFx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVudUJhY2tCdXR0b25VSSA9IHN0eWxlZCggQnV0dG9uIClgXG5cdCYuaXMtdGVydGlhcnkge1xuXHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdG9wYWNpdHk6IDAuNztcblxuXHRcdCY6aG92ZXI6bm90KCA6ZGlzYWJsZWQgKSB7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdH1cblxuXHRcdCY6YWN0aXZlOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0YmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVudVRpdGxlVUkgPSBzdHlsZWQuZGl2YFxuXHRvdmVyZmxvdzogaGlkZGVuO1xuXHR3aWR0aDogMTAwJTtcbmA7XG5cbmV4cG9ydCBjb25zdCBNZW51VGl0bGVTZWFyY2hDb250cm9sV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbjogMTFweCAwOyAvLyBub24taWRlYWwgaGFyZGNvZGluZyB0byBtYWludGFpbiBzYW1lIGhlaWdodCBhcyBIZWFkaW5nLCBjb3VsZCBiZSBpbXByb3ZlZFxuXHRwYWRkaW5nOiAxcHg7IC8vIHNvIHRoZSBmb2N1cyBib3JkZXIgZG9lc24ndCBnZXQgY3V0IG9mZiBieSB0aGUgb3ZlcmZsb3cgaGlkZGVuIG9uIE1lbnVUaXRsZVVJXG5gO1xuXG5leHBvcnQgY29uc3QgTWVudVRpdGxlQWN0aW9uc1VJID0gc3R5bGVkLnNwYW5gXG5cdGhlaWdodDogJHsgc3BhY2UoIDYgKSB9OyAvLyAyNHB4LCBzYW1lIGhlaWdodCBhcyB0aGUgYnV0dG9ucyBpbnNpZGVcblxuXHQuY29tcG9uZW50cy1idXR0b24uaXMtc21hbGwge1xuXHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdG9wYWNpdHk6IDAuNztcblx0XHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAxICkgfTsgLy8gQXZvaWQgaGlkaW5nIHRoZSBmb2N1cyBvdXRsaW5lXG5cdFx0cGFkZGluZzogMDtcblxuXHRcdCY6YWN0aXZlOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0YmFja2dyb3VuZDogbm9uZTtcblx0XHRcdG9wYWNpdHk6IDE7XG5cdFx0XHRjb2xvcjogaW5oZXJpdDtcblx0XHR9XG5cdFx0Jjpob3Zlcjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdGJveC1zaGFkb3c6IG5vbmU7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgR3JvdXBUaXRsZVVJID0gc3R5bGVkKCBIZWFkaW5nIClgXG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCAxMiApIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGNvbG9yOiBpbmhlcml0O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdG1hcmdpbi1ib3R0b206ICR7IHNwYWNlKCAyICkgfTtcblx0cGFkZGluZzogJHsgKCkgPT5cblx0XHRpc1JUTCgpXG5cdFx0XHQ/IGAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDQgKSB9ICR7IHNwYWNlKCAxICkgfSAkeyBzcGFjZSggMiApIH1gXG5cdFx0XHQ6IGAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDIgKSB9ICR7IHNwYWNlKCAxICkgfSAkeyBzcGFjZShcblx0XHRcdFx0XHQ0XG5cdFx0XHQgICkgfWAgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQmFzZVVJID0gc3R5bGVkLmxpYFxuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0Y29sb3I6IGluaGVyaXQ7XG5cdG1hcmdpbi1ib3R0b206IDA7XG5cblx0PiBidXR0b24sXG5cdD4gYS5jb21wb25lbnRzLWJ1dHRvbixcblx0PiBhIHtcblx0XHR3aWR0aDogMTAwJTtcblx0XHRjb2xvcjogaW5oZXJpdDtcblx0XHRvcGFjaXR5OiAwLjc7XG5cdFx0cGFkZGluZzogJHsgc3BhY2UoIDIgKSB9ICR7IHNwYWNlKCA0ICkgfTsgLyogOHB4IDE2cHggKi9cblx0XHQkeyBydGwoIHsgdGV4dEFsaWduOiAnbGVmdCcgfSwgeyB0ZXh0QWxpZ246ICdyaWdodCcgfSApIH1cblxuXHRcdCY6aG92ZXIsXG5cdFx0Jjpmb2N1czpub3QoIFthcmlhLWRpc2FibGVkPSd0cnVlJ10gKTphY3RpdmUsXG5cdFx0JjphY3RpdmU6bm90KCBbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICk6YWN0aXZlIHtcblx0XHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHQmLmlzLWFjdGl2ZSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblxuXHRcdD4gYnV0dG9uLFxuXHRcdC5jb21wb25lbnRzLWJ1dHRvbjpob3Zlcixcblx0XHQ+IGEge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnRJbnZlcnRlZCB9O1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHQ+IHN2ZyBwYXRoIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDYwMCBdIH07XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtVUkgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRoZWlnaHQ6IGF1dG87XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdG1hcmdpbjogMDtcblx0cGFkZGluZzogJHsgc3BhY2UoIDEuNSApIH0gJHsgc3BhY2UoIDQgKSB9O1xuXHRmb250LXdlaWdodDogNDAwO1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0d2lkdGg6IDEwMCU7XG5cdGNvbG9yOiBpbmhlcml0O1xuXHRvcGFjaXR5OiAwLjc7XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbUljb25VSSA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQmFkZ2VVSSA9IHN0eWxlZC5zcGFuYFxuXHRtYXJnaW4tbGVmdDogJHsgKCkgPT4gKCBpc1JUTCgpID8gJzAnIDogc3BhY2UoIDIgKSApIH07XG5cdG1hcmdpbi1yaWdodDogJHsgKCkgPT4gKCBpc1JUTCgpID8gc3BhY2UoIDIgKSA6ICcwJyApIH07XG5cdGRpc3BsYXk6IGlubGluZS1mbGV4O1xuXHRwYWRkaW5nOiAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDMgKSB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRAa2V5ZnJhbWVzIGZhZGUtaW4ge1xuXHRcdGZyb20ge1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHR9XG5cdFx0dG8ge1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRhbmltYXRpb246IGZhZGUtaW4gMjUwbXMgZWFzZS1vdXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtVGl0bGVVSSA9IHN0eWxlZCggVGV4dCApYFxuXHQkeyAoKSA9PiAoIGlzUlRMKCkgPyAnbWFyZ2luLWxlZnQ6IGF1dG87JyA6ICdtYXJnaW4tcmlnaHQ6IGF1dG87JyApIH1cblx0Zm9udC1zaXplOiAxNHB4O1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0Y29sb3I6IGluaGVyaXQ7XG5gO1xuIl19 */"));
  var ItemUI = /* @__PURE__ */ createStyled("div", false ? {
    target: "eeiismy3"
  } : {
    target: "eeiismy3",
    label: "ItemUI"
  })("display:flex;align-items:center;height:auto;min-height:40px;margin:0;padding:", space(1.5), " ", space(4), ";font-weight:400;line-height:20px;width:100%;color:inherit;opacity:0.7;" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5hdmlnYXRpb24tc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1SmdDIiwiZmlsZSI6Im5hdmlnYXRpb24tc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBXb3JkUHJlc3MgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGlzUlRMIH0gZnJvbSAnQHdvcmRwcmVzcy9pMThuJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTIH0gZnJvbSAnLi4vLi4vdXRpbHMvY29sb3JzLXZhbHVlcyc7XG5pbXBvcnQgQnV0dG9uIGZyb20gJy4uLy4uL2J1dHRvbic7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vdGV4dCc7XG5pbXBvcnQgeyBIZWFkaW5nIH0gZnJvbSAnLi4vLi4vaGVhZGluZyc7XG5pbXBvcnQgeyBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5leHBvcnQgY29uc3QgTmF2aWdhdGlvblVJID0gc3R5bGVkLmRpdmBcblx0d2lkdGg6IDEwMCU7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdHBhZGRpbmc6IDAgJHsgc3BhY2UoIDQgKSB9O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lbnVVSSA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCA2ICkgfTtcblx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDYgKSB9O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXHR1bCB7XG5cdFx0cGFkZGluZzogMDtcblx0XHRtYXJnaW46IDA7XG5cdFx0bGlzdC1zdHlsZTogbm9uZTtcblx0fVxuXHQuY29tcG9uZW50cy1uYXZpZ2F0aW9uX19iYWNrLWJ1dHRvbiB7XG5cdFx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5cblx0LmNvbXBvbmVudHMtbmF2aWdhdGlvbl9fZ3JvdXAgKyAuY29tcG9uZW50cy1uYXZpZ2F0aW9uX19ncm91cCB7XG5cdFx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVudUJhY2tCdXR0b25VSSA9IHN0eWxlZCggQnV0dG9uIClgXG5cdCYuaXMtdGVydGlhcnkge1xuXHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdG9wYWNpdHk6IDAuNztcblxuXHRcdCY6aG92ZXI6bm90KCA6ZGlzYWJsZWQgKSB7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdH1cblxuXHRcdCY6YWN0aXZlOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0YmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVudVRpdGxlVUkgPSBzdHlsZWQuZGl2YFxuXHRvdmVyZmxvdzogaGlkZGVuO1xuXHR3aWR0aDogMTAwJTtcbmA7XG5cbmV4cG9ydCBjb25zdCBNZW51VGl0bGVTZWFyY2hDb250cm9sV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbjogMTFweCAwOyAvLyBub24taWRlYWwgaGFyZGNvZGluZyB0byBtYWludGFpbiBzYW1lIGhlaWdodCBhcyBIZWFkaW5nLCBjb3VsZCBiZSBpbXByb3ZlZFxuXHRwYWRkaW5nOiAxcHg7IC8vIHNvIHRoZSBmb2N1cyBib3JkZXIgZG9lc24ndCBnZXQgY3V0IG9mZiBieSB0aGUgb3ZlcmZsb3cgaGlkZGVuIG9uIE1lbnVUaXRsZVVJXG5gO1xuXG5leHBvcnQgY29uc3QgTWVudVRpdGxlQWN0aW9uc1VJID0gc3R5bGVkLnNwYW5gXG5cdGhlaWdodDogJHsgc3BhY2UoIDYgKSB9OyAvLyAyNHB4LCBzYW1lIGhlaWdodCBhcyB0aGUgYnV0dG9ucyBpbnNpZGVcblxuXHQuY29tcG9uZW50cy1idXR0b24uaXMtc21hbGwge1xuXHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdG9wYWNpdHk6IDAuNztcblx0XHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAxICkgfTsgLy8gQXZvaWQgaGlkaW5nIHRoZSBmb2N1cyBvdXRsaW5lXG5cdFx0cGFkZGluZzogMDtcblxuXHRcdCY6YWN0aXZlOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0YmFja2dyb3VuZDogbm9uZTtcblx0XHRcdG9wYWNpdHk6IDE7XG5cdFx0XHRjb2xvcjogaW5oZXJpdDtcblx0XHR9XG5cdFx0Jjpob3Zlcjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdGJveC1zaGFkb3c6IG5vbmU7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgR3JvdXBUaXRsZVVJID0gc3R5bGVkKCBIZWFkaW5nIClgXG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCAxMiApIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGNvbG9yOiBpbmhlcml0O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdG1hcmdpbi1ib3R0b206ICR7IHNwYWNlKCAyICkgfTtcblx0cGFkZGluZzogJHsgKCkgPT5cblx0XHRpc1JUTCgpXG5cdFx0XHQ/IGAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDQgKSB9ICR7IHNwYWNlKCAxICkgfSAkeyBzcGFjZSggMiApIH1gXG5cdFx0XHQ6IGAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDIgKSB9ICR7IHNwYWNlKCAxICkgfSAkeyBzcGFjZShcblx0XHRcdFx0XHQ0XG5cdFx0XHQgICkgfWAgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQmFzZVVJID0gc3R5bGVkLmxpYFxuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0Y29sb3I6IGluaGVyaXQ7XG5cdG1hcmdpbi1ib3R0b206IDA7XG5cblx0PiBidXR0b24sXG5cdD4gYS5jb21wb25lbnRzLWJ1dHRvbixcblx0PiBhIHtcblx0XHR3aWR0aDogMTAwJTtcblx0XHRjb2xvcjogaW5oZXJpdDtcblx0XHRvcGFjaXR5OiAwLjc7XG5cdFx0cGFkZGluZzogJHsgc3BhY2UoIDIgKSB9ICR7IHNwYWNlKCA0ICkgfTsgLyogOHB4IDE2cHggKi9cblx0XHQkeyBydGwoIHsgdGV4dEFsaWduOiAnbGVmdCcgfSwgeyB0ZXh0QWxpZ246ICdyaWdodCcgfSApIH1cblxuXHRcdCY6aG92ZXIsXG5cdFx0Jjpmb2N1czpub3QoIFthcmlhLWRpc2FibGVkPSd0cnVlJ10gKTphY3RpdmUsXG5cdFx0JjphY3RpdmU6bm90KCBbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICk6YWN0aXZlIHtcblx0XHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHQmLmlzLWFjdGl2ZSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblxuXHRcdD4gYnV0dG9uLFxuXHRcdC5jb21wb25lbnRzLWJ1dHRvbjpob3Zlcixcblx0XHQ+IGEge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnRJbnZlcnRlZCB9O1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHQ+IHN2ZyBwYXRoIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDYwMCBdIH07XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtVUkgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRoZWlnaHQ6IGF1dG87XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdG1hcmdpbjogMDtcblx0cGFkZGluZzogJHsgc3BhY2UoIDEuNSApIH0gJHsgc3BhY2UoIDQgKSB9O1xuXHRmb250LXdlaWdodDogNDAwO1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0d2lkdGg6IDEwMCU7XG5cdGNvbG9yOiBpbmhlcml0O1xuXHRvcGFjaXR5OiAwLjc7XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbUljb25VSSA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQmFkZ2VVSSA9IHN0eWxlZC5zcGFuYFxuXHRtYXJnaW4tbGVmdDogJHsgKCkgPT4gKCBpc1JUTCgpID8gJzAnIDogc3BhY2UoIDIgKSApIH07XG5cdG1hcmdpbi1yaWdodDogJHsgKCkgPT4gKCBpc1JUTCgpID8gc3BhY2UoIDIgKSA6ICcwJyApIH07XG5cdGRpc3BsYXk6IGlubGluZS1mbGV4O1xuXHRwYWRkaW5nOiAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDMgKSB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRAa2V5ZnJhbWVzIGZhZGUtaW4ge1xuXHRcdGZyb20ge1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHR9XG5cdFx0dG8ge1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRhbmltYXRpb246IGZhZGUtaW4gMjUwbXMgZWFzZS1vdXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtVGl0bGVVSSA9IHN0eWxlZCggVGV4dCApYFxuXHQkeyAoKSA9PiAoIGlzUlRMKCkgPyAnbWFyZ2luLWxlZnQ6IGF1dG87JyA6ICdtYXJnaW4tcmlnaHQ6IGF1dG87JyApIH1cblx0Zm9udC1zaXplOiAxNHB4O1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0Y29sb3I6IGluaGVyaXQ7XG5gO1xuIl19 */"));
  var ItemIconUI = /* @__PURE__ */ createStyled("span", false ? {
    target: "eeiismy2"
  } : {
    target: "eeiismy2",
    label: "ItemIconUI"
  })("display:flex;margin-right:", space(2), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5hdmlnYXRpb24tc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxS3FDIiwiZmlsZSI6Im5hdmlnYXRpb24tc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBXb3JkUHJlc3MgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGlzUlRMIH0gZnJvbSAnQHdvcmRwcmVzcy9pMThuJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTIH0gZnJvbSAnLi4vLi4vdXRpbHMvY29sb3JzLXZhbHVlcyc7XG5pbXBvcnQgQnV0dG9uIGZyb20gJy4uLy4uL2J1dHRvbic7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vdGV4dCc7XG5pbXBvcnQgeyBIZWFkaW5nIH0gZnJvbSAnLi4vLi4vaGVhZGluZyc7XG5pbXBvcnQgeyBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5leHBvcnQgY29uc3QgTmF2aWdhdGlvblVJID0gc3R5bGVkLmRpdmBcblx0d2lkdGg6IDEwMCU7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdHBhZGRpbmc6IDAgJHsgc3BhY2UoIDQgKSB9O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lbnVVSSA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCA2ICkgfTtcblx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDYgKSB9O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXHR1bCB7XG5cdFx0cGFkZGluZzogMDtcblx0XHRtYXJnaW46IDA7XG5cdFx0bGlzdC1zdHlsZTogbm9uZTtcblx0fVxuXHQuY29tcG9uZW50cy1uYXZpZ2F0aW9uX19iYWNrLWJ1dHRvbiB7XG5cdFx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5cblx0LmNvbXBvbmVudHMtbmF2aWdhdGlvbl9fZ3JvdXAgKyAuY29tcG9uZW50cy1uYXZpZ2F0aW9uX19ncm91cCB7XG5cdFx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVudUJhY2tCdXR0b25VSSA9IHN0eWxlZCggQnV0dG9uIClgXG5cdCYuaXMtdGVydGlhcnkge1xuXHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdG9wYWNpdHk6IDAuNztcblxuXHRcdCY6aG92ZXI6bm90KCA6ZGlzYWJsZWQgKSB7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdH1cblxuXHRcdCY6YWN0aXZlOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0YmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVudVRpdGxlVUkgPSBzdHlsZWQuZGl2YFxuXHRvdmVyZmxvdzogaGlkZGVuO1xuXHR3aWR0aDogMTAwJTtcbmA7XG5cbmV4cG9ydCBjb25zdCBNZW51VGl0bGVTZWFyY2hDb250cm9sV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbjogMTFweCAwOyAvLyBub24taWRlYWwgaGFyZGNvZGluZyB0byBtYWludGFpbiBzYW1lIGhlaWdodCBhcyBIZWFkaW5nLCBjb3VsZCBiZSBpbXByb3ZlZFxuXHRwYWRkaW5nOiAxcHg7IC8vIHNvIHRoZSBmb2N1cyBib3JkZXIgZG9lc24ndCBnZXQgY3V0IG9mZiBieSB0aGUgb3ZlcmZsb3cgaGlkZGVuIG9uIE1lbnVUaXRsZVVJXG5gO1xuXG5leHBvcnQgY29uc3QgTWVudVRpdGxlQWN0aW9uc1VJID0gc3R5bGVkLnNwYW5gXG5cdGhlaWdodDogJHsgc3BhY2UoIDYgKSB9OyAvLyAyNHB4LCBzYW1lIGhlaWdodCBhcyB0aGUgYnV0dG9ucyBpbnNpZGVcblxuXHQuY29tcG9uZW50cy1idXR0b24uaXMtc21hbGwge1xuXHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdG9wYWNpdHk6IDAuNztcblx0XHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAxICkgfTsgLy8gQXZvaWQgaGlkaW5nIHRoZSBmb2N1cyBvdXRsaW5lXG5cdFx0cGFkZGluZzogMDtcblxuXHRcdCY6YWN0aXZlOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0YmFja2dyb3VuZDogbm9uZTtcblx0XHRcdG9wYWNpdHk6IDE7XG5cdFx0XHRjb2xvcjogaW5oZXJpdDtcblx0XHR9XG5cdFx0Jjpob3Zlcjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdGJveC1zaGFkb3c6IG5vbmU7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgR3JvdXBUaXRsZVVJID0gc3R5bGVkKCBIZWFkaW5nIClgXG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCAxMiApIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGNvbG9yOiBpbmhlcml0O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdG1hcmdpbi1ib3R0b206ICR7IHNwYWNlKCAyICkgfTtcblx0cGFkZGluZzogJHsgKCkgPT5cblx0XHRpc1JUTCgpXG5cdFx0XHQ/IGAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDQgKSB9ICR7IHNwYWNlKCAxICkgfSAkeyBzcGFjZSggMiApIH1gXG5cdFx0XHQ6IGAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDIgKSB9ICR7IHNwYWNlKCAxICkgfSAkeyBzcGFjZShcblx0XHRcdFx0XHQ0XG5cdFx0XHQgICkgfWAgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQmFzZVVJID0gc3R5bGVkLmxpYFxuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0Y29sb3I6IGluaGVyaXQ7XG5cdG1hcmdpbi1ib3R0b206IDA7XG5cblx0PiBidXR0b24sXG5cdD4gYS5jb21wb25lbnRzLWJ1dHRvbixcblx0PiBhIHtcblx0XHR3aWR0aDogMTAwJTtcblx0XHRjb2xvcjogaW5oZXJpdDtcblx0XHRvcGFjaXR5OiAwLjc7XG5cdFx0cGFkZGluZzogJHsgc3BhY2UoIDIgKSB9ICR7IHNwYWNlKCA0ICkgfTsgLyogOHB4IDE2cHggKi9cblx0XHQkeyBydGwoIHsgdGV4dEFsaWduOiAnbGVmdCcgfSwgeyB0ZXh0QWxpZ246ICdyaWdodCcgfSApIH1cblxuXHRcdCY6aG92ZXIsXG5cdFx0Jjpmb2N1czpub3QoIFthcmlhLWRpc2FibGVkPSd0cnVlJ10gKTphY3RpdmUsXG5cdFx0JjphY3RpdmU6bm90KCBbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICk6YWN0aXZlIHtcblx0XHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHQmLmlzLWFjdGl2ZSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblxuXHRcdD4gYnV0dG9uLFxuXHRcdC5jb21wb25lbnRzLWJ1dHRvbjpob3Zlcixcblx0XHQ+IGEge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnRJbnZlcnRlZCB9O1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHQ+IHN2ZyBwYXRoIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDYwMCBdIH07XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtVUkgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRoZWlnaHQ6IGF1dG87XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdG1hcmdpbjogMDtcblx0cGFkZGluZzogJHsgc3BhY2UoIDEuNSApIH0gJHsgc3BhY2UoIDQgKSB9O1xuXHRmb250LXdlaWdodDogNDAwO1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0d2lkdGg6IDEwMCU7XG5cdGNvbG9yOiBpbmhlcml0O1xuXHRvcGFjaXR5OiAwLjc7XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbUljb25VSSA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQmFkZ2VVSSA9IHN0eWxlZC5zcGFuYFxuXHRtYXJnaW4tbGVmdDogJHsgKCkgPT4gKCBpc1JUTCgpID8gJzAnIDogc3BhY2UoIDIgKSApIH07XG5cdG1hcmdpbi1yaWdodDogJHsgKCkgPT4gKCBpc1JUTCgpID8gc3BhY2UoIDIgKSA6ICcwJyApIH07XG5cdGRpc3BsYXk6IGlubGluZS1mbGV4O1xuXHRwYWRkaW5nOiAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDMgKSB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRAa2V5ZnJhbWVzIGZhZGUtaW4ge1xuXHRcdGZyb20ge1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHR9XG5cdFx0dG8ge1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRhbmltYXRpb246IGZhZGUtaW4gMjUwbXMgZWFzZS1vdXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtVGl0bGVVSSA9IHN0eWxlZCggVGV4dCApYFxuXHQkeyAoKSA9PiAoIGlzUlRMKCkgPyAnbWFyZ2luLWxlZnQ6IGF1dG87JyA6ICdtYXJnaW4tcmlnaHQ6IGF1dG87JyApIH1cblx0Zm9udC1zaXplOiAxNHB4O1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0Y29sb3I6IGluaGVyaXQ7XG5gO1xuIl19 */"));
  var ItemBadgeUI = /* @__PURE__ */ createStyled("span", false ? {
    target: "eeiismy1"
  } : {
    target: "eeiismy1",
    label: "ItemBadgeUI"
  })("margin-left:", () => (0, import_i18n60.isRTL)() ? "0" : space(2), ";margin-right:", () => (0, import_i18n60.isRTL)() ? space(2) : "0", ";display:inline-flex;padding:", space(1), " ", space(3), ";border-radius:", config_values_default.radiusSmall, ";@keyframes fade-in{from{opacity:0;}to{opacity:1;}}@media not ( prefers-reduced-motion ){animation:fade-in 250ms ease-out;}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5hdmlnYXRpb24tc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEwS3NDIiwiZmlsZSI6Im5hdmlnYXRpb24tc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBXb3JkUHJlc3MgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGlzUlRMIH0gZnJvbSAnQHdvcmRwcmVzcy9pMThuJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTIH0gZnJvbSAnLi4vLi4vdXRpbHMvY29sb3JzLXZhbHVlcyc7XG5pbXBvcnQgQnV0dG9uIGZyb20gJy4uLy4uL2J1dHRvbic7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vdGV4dCc7XG5pbXBvcnQgeyBIZWFkaW5nIH0gZnJvbSAnLi4vLi4vaGVhZGluZyc7XG5pbXBvcnQgeyBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5leHBvcnQgY29uc3QgTmF2aWdhdGlvblVJID0gc3R5bGVkLmRpdmBcblx0d2lkdGg6IDEwMCU7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdHBhZGRpbmc6IDAgJHsgc3BhY2UoIDQgKSB9O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lbnVVSSA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCA2ICkgfTtcblx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDYgKSB9O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXHR1bCB7XG5cdFx0cGFkZGluZzogMDtcblx0XHRtYXJnaW46IDA7XG5cdFx0bGlzdC1zdHlsZTogbm9uZTtcblx0fVxuXHQuY29tcG9uZW50cy1uYXZpZ2F0aW9uX19iYWNrLWJ1dHRvbiB7XG5cdFx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5cblx0LmNvbXBvbmVudHMtbmF2aWdhdGlvbl9fZ3JvdXAgKyAuY29tcG9uZW50cy1uYXZpZ2F0aW9uX19ncm91cCB7XG5cdFx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVudUJhY2tCdXR0b25VSSA9IHN0eWxlZCggQnV0dG9uIClgXG5cdCYuaXMtdGVydGlhcnkge1xuXHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdG9wYWNpdHk6IDAuNztcblxuXHRcdCY6aG92ZXI6bm90KCA6ZGlzYWJsZWQgKSB7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdH1cblxuXHRcdCY6YWN0aXZlOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0YmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVudVRpdGxlVUkgPSBzdHlsZWQuZGl2YFxuXHRvdmVyZmxvdzogaGlkZGVuO1xuXHR3aWR0aDogMTAwJTtcbmA7XG5cbmV4cG9ydCBjb25zdCBNZW51VGl0bGVTZWFyY2hDb250cm9sV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbjogMTFweCAwOyAvLyBub24taWRlYWwgaGFyZGNvZGluZyB0byBtYWludGFpbiBzYW1lIGhlaWdodCBhcyBIZWFkaW5nLCBjb3VsZCBiZSBpbXByb3ZlZFxuXHRwYWRkaW5nOiAxcHg7IC8vIHNvIHRoZSBmb2N1cyBib3JkZXIgZG9lc24ndCBnZXQgY3V0IG9mZiBieSB0aGUgb3ZlcmZsb3cgaGlkZGVuIG9uIE1lbnVUaXRsZVVJXG5gO1xuXG5leHBvcnQgY29uc3QgTWVudVRpdGxlQWN0aW9uc1VJID0gc3R5bGVkLnNwYW5gXG5cdGhlaWdodDogJHsgc3BhY2UoIDYgKSB9OyAvLyAyNHB4LCBzYW1lIGhlaWdodCBhcyB0aGUgYnV0dG9ucyBpbnNpZGVcblxuXHQuY29tcG9uZW50cy1idXR0b24uaXMtc21hbGwge1xuXHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdG9wYWNpdHk6IDAuNztcblx0XHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAxICkgfTsgLy8gQXZvaWQgaGlkaW5nIHRoZSBmb2N1cyBvdXRsaW5lXG5cdFx0cGFkZGluZzogMDtcblxuXHRcdCY6YWN0aXZlOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0YmFja2dyb3VuZDogbm9uZTtcblx0XHRcdG9wYWNpdHk6IDE7XG5cdFx0XHRjb2xvcjogaW5oZXJpdDtcblx0XHR9XG5cdFx0Jjpob3Zlcjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdGJveC1zaGFkb3c6IG5vbmU7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgR3JvdXBUaXRsZVVJID0gc3R5bGVkKCBIZWFkaW5nIClgXG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCAxMiApIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGNvbG9yOiBpbmhlcml0O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdG1hcmdpbi1ib3R0b206ICR7IHNwYWNlKCAyICkgfTtcblx0cGFkZGluZzogJHsgKCkgPT5cblx0XHRpc1JUTCgpXG5cdFx0XHQ/IGAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDQgKSB9ICR7IHNwYWNlKCAxICkgfSAkeyBzcGFjZSggMiApIH1gXG5cdFx0XHQ6IGAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDIgKSB9ICR7IHNwYWNlKCAxICkgfSAkeyBzcGFjZShcblx0XHRcdFx0XHQ0XG5cdFx0XHQgICkgfWAgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQmFzZVVJID0gc3R5bGVkLmxpYFxuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0Y29sb3I6IGluaGVyaXQ7XG5cdG1hcmdpbi1ib3R0b206IDA7XG5cblx0PiBidXR0b24sXG5cdD4gYS5jb21wb25lbnRzLWJ1dHRvbixcblx0PiBhIHtcblx0XHR3aWR0aDogMTAwJTtcblx0XHRjb2xvcjogaW5oZXJpdDtcblx0XHRvcGFjaXR5OiAwLjc7XG5cdFx0cGFkZGluZzogJHsgc3BhY2UoIDIgKSB9ICR7IHNwYWNlKCA0ICkgfTsgLyogOHB4IDE2cHggKi9cblx0XHQkeyBydGwoIHsgdGV4dEFsaWduOiAnbGVmdCcgfSwgeyB0ZXh0QWxpZ246ICdyaWdodCcgfSApIH1cblxuXHRcdCY6aG92ZXIsXG5cdFx0Jjpmb2N1czpub3QoIFthcmlhLWRpc2FibGVkPSd0cnVlJ10gKTphY3RpdmUsXG5cdFx0JjphY3RpdmU6bm90KCBbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICk6YWN0aXZlIHtcblx0XHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHQmLmlzLWFjdGl2ZSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblxuXHRcdD4gYnV0dG9uLFxuXHRcdC5jb21wb25lbnRzLWJ1dHRvbjpob3Zlcixcblx0XHQ+IGEge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnRJbnZlcnRlZCB9O1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHQ+IHN2ZyBwYXRoIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDYwMCBdIH07XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtVUkgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRoZWlnaHQ6IGF1dG87XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdG1hcmdpbjogMDtcblx0cGFkZGluZzogJHsgc3BhY2UoIDEuNSApIH0gJHsgc3BhY2UoIDQgKSB9O1xuXHRmb250LXdlaWdodDogNDAwO1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0d2lkdGg6IDEwMCU7XG5cdGNvbG9yOiBpbmhlcml0O1xuXHRvcGFjaXR5OiAwLjc7XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbUljb25VSSA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQmFkZ2VVSSA9IHN0eWxlZC5zcGFuYFxuXHRtYXJnaW4tbGVmdDogJHsgKCkgPT4gKCBpc1JUTCgpID8gJzAnIDogc3BhY2UoIDIgKSApIH07XG5cdG1hcmdpbi1yaWdodDogJHsgKCkgPT4gKCBpc1JUTCgpID8gc3BhY2UoIDIgKSA6ICcwJyApIH07XG5cdGRpc3BsYXk6IGlubGluZS1mbGV4O1xuXHRwYWRkaW5nOiAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDMgKSB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRAa2V5ZnJhbWVzIGZhZGUtaW4ge1xuXHRcdGZyb20ge1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHR9XG5cdFx0dG8ge1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRhbmltYXRpb246IGZhZGUtaW4gMjUwbXMgZWFzZS1vdXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtVGl0bGVVSSA9IHN0eWxlZCggVGV4dCApYFxuXHQkeyAoKSA9PiAoIGlzUlRMKCkgPyAnbWFyZ2luLWxlZnQ6IGF1dG87JyA6ICdtYXJnaW4tcmlnaHQ6IGF1dG87JyApIH1cblx0Zm9udC1zaXplOiAxNHB4O1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0Y29sb3I6IGluaGVyaXQ7XG5gO1xuIl19 */"));
  var ItemTitleUI = /* @__PURE__ */ createStyled(component_default8, false ? {
    target: "eeiismy0"
  } : {
    target: "eeiismy0",
    label: "ItemTitleUI"
  })(() => (0, import_i18n60.isRTL)() ? "margin-left: auto;" : "margin-right: auto;", " font-size:14px;line-height:20px;color:inherit;" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5hdmlnYXRpb24tc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUErTHlDIiwiZmlsZSI6Im5hdmlnYXRpb24tc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBXb3JkUHJlc3MgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGlzUlRMIH0gZnJvbSAnQHdvcmRwcmVzcy9pMThuJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTIH0gZnJvbSAnLi4vLi4vdXRpbHMvY29sb3JzLXZhbHVlcyc7XG5pbXBvcnQgQnV0dG9uIGZyb20gJy4uLy4uL2J1dHRvbic7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vdGV4dCc7XG5pbXBvcnQgeyBIZWFkaW5nIH0gZnJvbSAnLi4vLi4vaGVhZGluZyc7XG5pbXBvcnQgeyBydGwsIENPTkZJRyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5leHBvcnQgY29uc3QgTmF2aWdhdGlvblVJID0gc3R5bGVkLmRpdmBcblx0d2lkdGg6IDEwMCU7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdHBhZGRpbmc6IDAgJHsgc3BhY2UoIDQgKSB9O1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuYDtcblxuZXhwb3J0IGNvbnN0IE1lbnVVSSA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbi10b3A6ICR7IHNwYWNlKCA2ICkgfTtcblx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDYgKSB9O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXHR1bCB7XG5cdFx0cGFkZGluZzogMDtcblx0XHRtYXJnaW46IDA7XG5cdFx0bGlzdC1zdHlsZTogbm9uZTtcblx0fVxuXHQuY29tcG9uZW50cy1uYXZpZ2F0aW9uX19iYWNrLWJ1dHRvbiB7XG5cdFx0bWFyZ2luLWJvdHRvbTogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5cblx0LmNvbXBvbmVudHMtbmF2aWdhdGlvbl9fZ3JvdXAgKyAuY29tcG9uZW50cy1uYXZpZ2F0aW9uX19ncm91cCB7XG5cdFx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVudUJhY2tCdXR0b25VSSA9IHN0eWxlZCggQnV0dG9uIClgXG5cdCYuaXMtdGVydGlhcnkge1xuXHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdG9wYWNpdHk6IDAuNztcblxuXHRcdCY6aG92ZXI6bm90KCA6ZGlzYWJsZWQgKSB7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdH1cblxuXHRcdCY6YWN0aXZlOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0YmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgTWVudVRpdGxlVUkgPSBzdHlsZWQuZGl2YFxuXHRvdmVyZmxvdzogaGlkZGVuO1xuXHR3aWR0aDogMTAwJTtcbmA7XG5cbmV4cG9ydCBjb25zdCBNZW51VGl0bGVTZWFyY2hDb250cm9sV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdG1hcmdpbjogMTFweCAwOyAvLyBub24taWRlYWwgaGFyZGNvZGluZyB0byBtYWludGFpbiBzYW1lIGhlaWdodCBhcyBIZWFkaW5nLCBjb3VsZCBiZSBpbXByb3ZlZFxuXHRwYWRkaW5nOiAxcHg7IC8vIHNvIHRoZSBmb2N1cyBib3JkZXIgZG9lc24ndCBnZXQgY3V0IG9mZiBieSB0aGUgb3ZlcmZsb3cgaGlkZGVuIG9uIE1lbnVUaXRsZVVJXG5gO1xuXG5leHBvcnQgY29uc3QgTWVudVRpdGxlQWN0aW9uc1VJID0gc3R5bGVkLnNwYW5gXG5cdGhlaWdodDogJHsgc3BhY2UoIDYgKSB9OyAvLyAyNHB4LCBzYW1lIGhlaWdodCBhcyB0aGUgYnV0dG9ucyBpbnNpZGVcblxuXHQuY29tcG9uZW50cy1idXR0b24uaXMtc21hbGwge1xuXHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdG9wYWNpdHk6IDAuNztcblx0XHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAxICkgfTsgLy8gQXZvaWQgaGlkaW5nIHRoZSBmb2N1cyBvdXRsaW5lXG5cdFx0cGFkZGluZzogMDtcblxuXHRcdCY6YWN0aXZlOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0YmFja2dyb3VuZDogbm9uZTtcblx0XHRcdG9wYWNpdHk6IDE7XG5cdFx0XHRjb2xvcjogaW5oZXJpdDtcblx0XHR9XG5cdFx0Jjpob3Zlcjpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdGJveC1zaGFkb3c6IG5vbmU7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgR3JvdXBUaXRsZVVJID0gc3R5bGVkKCBIZWFkaW5nIClgXG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCAxMiApIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGNvbG9yOiBpbmhlcml0O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdG1hcmdpbi1ib3R0b206ICR7IHNwYWNlKCAyICkgfTtcblx0cGFkZGluZzogJHsgKCkgPT5cblx0XHRpc1JUTCgpXG5cdFx0XHQ/IGAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDQgKSB9ICR7IHNwYWNlKCAxICkgfSAkeyBzcGFjZSggMiApIH1gXG5cdFx0XHQ6IGAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDIgKSB9ICR7IHNwYWNlKCAxICkgfSAkeyBzcGFjZShcblx0XHRcdFx0XHQ0XG5cdFx0XHQgICkgfWAgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQmFzZVVJID0gc3R5bGVkLmxpYFxuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblx0Y29sb3I6IGluaGVyaXQ7XG5cdG1hcmdpbi1ib3R0b206IDA7XG5cblx0PiBidXR0b24sXG5cdD4gYS5jb21wb25lbnRzLWJ1dHRvbixcblx0PiBhIHtcblx0XHR3aWR0aDogMTAwJTtcblx0XHRjb2xvcjogaW5oZXJpdDtcblx0XHRvcGFjaXR5OiAwLjc7XG5cdFx0cGFkZGluZzogJHsgc3BhY2UoIDIgKSB9ICR7IHNwYWNlKCA0ICkgfTsgLyogOHB4IDE2cHggKi9cblx0XHQkeyBydGwoIHsgdGV4dEFsaWduOiAnbGVmdCcgfSwgeyB0ZXh0QWxpZ246ICdyaWdodCcgfSApIH1cblxuXHRcdCY6aG92ZXIsXG5cdFx0Jjpmb2N1czpub3QoIFthcmlhLWRpc2FibGVkPSd0cnVlJ10gKTphY3RpdmUsXG5cdFx0JjphY3RpdmU6bm90KCBbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICk6YWN0aXZlIHtcblx0XHRcdGNvbG9yOiBpbmhlcml0O1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHQmLmlzLWFjdGl2ZSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblxuXHRcdD4gYnV0dG9uLFxuXHRcdC5jb21wb25lbnRzLWJ1dHRvbjpob3Zlcixcblx0XHQ+IGEge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnRJbnZlcnRlZCB9O1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHQ+IHN2ZyBwYXRoIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDYwMCBdIH07XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtVUkgPSBzdHlsZWQuZGl2YFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRoZWlnaHQ6IGF1dG87XG5cdG1pbi1oZWlnaHQ6IDQwcHg7XG5cdG1hcmdpbjogMDtcblx0cGFkZGluZzogJHsgc3BhY2UoIDEuNSApIH0gJHsgc3BhY2UoIDQgKSB9O1xuXHRmb250LXdlaWdodDogNDAwO1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0d2lkdGg6IDEwMCU7XG5cdGNvbG9yOiBpbmhlcml0O1xuXHRvcGFjaXR5OiAwLjc7XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbUljb25VSSA9IHN0eWxlZC5zcGFuYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAyICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQmFkZ2VVSSA9IHN0eWxlZC5zcGFuYFxuXHRtYXJnaW4tbGVmdDogJHsgKCkgPT4gKCBpc1JUTCgpID8gJzAnIDogc3BhY2UoIDIgKSApIH07XG5cdG1hcmdpbi1yaWdodDogJHsgKCkgPT4gKCBpc1JUTCgpID8gc3BhY2UoIDIgKSA6ICcwJyApIH07XG5cdGRpc3BsYXk6IGlubGluZS1mbGV4O1xuXHRwYWRkaW5nOiAkeyBzcGFjZSggMSApIH0gJHsgc3BhY2UoIDMgKSB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRAa2V5ZnJhbWVzIGZhZGUtaW4ge1xuXHRcdGZyb20ge1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHR9XG5cdFx0dG8ge1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRhbmltYXRpb246IGZhZGUtaW4gMjUwbXMgZWFzZS1vdXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtVGl0bGVVSSA9IHN0eWxlZCggVGV4dCApYFxuXHQkeyAoKSA9PiAoIGlzUlRMKCkgPyAnbWFyZ2luLWxlZnQ6IGF1dG87JyA6ICdtYXJnaW4tcmlnaHQ6IGF1dG87JyApIH1cblx0Zm9udC1zaXplOiAxNHB4O1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0Y29sb3I6IGluaGVyaXQ7XG5gO1xuIl19 */"));

  // packages/components/build-module/navigation/use-create-navigation-tree.mjs
  var import_element153 = __toESM(require_element(), 1);

  // packages/components/build-module/navigation/use-navigation-tree-nodes.mjs
  var import_element152 = __toESM(require_element(), 1);
  function useNavigationTreeNodes() {
    const [nodes, setNodes] = (0, import_element152.useState)({});
    const getNode = (key) => nodes[key];
    const addNode = (key, value) => {
      const {
        children,
        ...newNode
      } = value;
      return setNodes((original) => ({
        ...original,
        [key]: newNode
      }));
    };
    const removeNode = (key) => {
      return setNodes((original) => {
        const {
          [key]: removedNode,
          ...remainingNodes
        } = original;
        return remainingNodes;
      });
    };
    return {
      nodes,
      getNode,
      addNode,
      removeNode
    };
  }

  // packages/components/build-module/navigation/use-create-navigation-tree.mjs
  var useCreateNavigationTree = () => {
    const {
      nodes: items,
      getNode: getItem,
      addNode: addItem,
      removeNode: removeItem2
    } = useNavigationTreeNodes();
    const {
      nodes: menus,
      getNode: getMenu,
      addNode: addMenu,
      removeNode: removeMenu
    } = useNavigationTreeNodes();
    const [childMenu, setChildMenu] = (0, import_element153.useState)({});
    const getChildMenu = (menu2) => childMenu[menu2] || [];
    const traverseMenu = (startMenu, callback) => {
      const visited = [];
      let queue = [startMenu];
      let current;
      while (queue.length > 0) {
        current = getMenu(queue.shift());
        if (!current || visited.includes(current.menu)) {
          continue;
        }
        visited.push(current.menu);
        queue = [...queue, ...getChildMenu(current.menu)];
        if (callback(current) === false) {
          break;
        }
      }
    };
    const isMenuEmpty = (menuToCheck) => {
      let isEmpty2 = true;
      traverseMenu(menuToCheck, (current) => {
        if (!current.isEmpty) {
          isEmpty2 = false;
          return false;
        }
        return void 0;
      });
      return isEmpty2;
    };
    return {
      items,
      getItem,
      addItem,
      removeItem: removeItem2,
      menus,
      getMenu,
      addMenu: (key, value) => {
        setChildMenu((state) => {
          const newState = {
            ...state
          };
          if (!value.parentMenu) {
            return newState;
          }
          if (!newState[value.parentMenu]) {
            newState[value.parentMenu] = [];
          }
          newState[value.parentMenu].push(key);
          return newState;
        });
        addMenu(key, value);
      },
      removeMenu,
      childMenu,
      traverseMenu,
      isMenuEmpty
    };
  };

  // packages/components/build-module/navigation/index.mjs
  var import_jsx_runtime229 = __toESM(require_jsx_runtime(), 1);
  var noop18 = () => {
  };
  function Navigation({
    activeItem,
    activeMenu = ROOT_MENU,
    children,
    className: className2,
    onActivateMenu = noop18
  }) {
    const [menu2, setMenu] = (0, import_element154.useState)(activeMenu);
    const [slideOrigin, setSlideOrigin] = (0, import_element154.useState)();
    const navigationTree = useCreateNavigationTree();
    const defaultSlideOrigin = (0, import_i18n61.isRTL)() ? "right" : "left";
    (0, import_deprecated20.default)("wp.components.Navigation (and all subcomponents)", {
      since: "6.8",
      version: "7.1",
      alternative: "wp.components.Navigator"
    });
    const setActiveMenu = (menuId, slideInOrigin = defaultSlideOrigin) => {
      if (!navigationTree.getMenu(menuId)) {
        return;
      }
      setSlideOrigin(slideInOrigin);
      setMenu(menuId);
      onActivateMenu(menuId);
    };
    const isMountedRef = (0, import_element154.useRef)(false);
    (0, import_element154.useEffect)(() => {
      if (!isMountedRef.current) {
        isMountedRef.current = true;
      }
    }, []);
    (0, import_element154.useEffect)(() => {
      if (activeMenu !== menu2) {
        setActiveMenu(activeMenu);
      }
    }, [activeMenu]);
    const context = {
      activeItem,
      activeMenu: menu2,
      setActiveMenu,
      navigationTree
    };
    const classes = clsx_default("components-navigation", className2);
    const animateClassName = getAnimateClassName({
      type: "slide-in",
      origin: slideOrigin
    });
    return /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(NavigationUI, {
      className: classes,
      children: /* @__PURE__ */ (0, import_jsx_runtime229.jsx)("div", {
        className: animateClassName ? clsx_default({
          [animateClassName]: isMountedRef.current && slideOrigin
        }) : void 0,
        children: /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(NavigationContext.Provider, {
          value: context,
          children
        })
      }, menu2)
    });
  }
  var navigation_default = Navigation;

  // packages/components/build-module/navigation/back-button/index.mjs
  var import_element155 = __toESM(require_element(), 1);
  var import_i18n62 = __toESM(require_i18n(), 1);
  var import_jsx_runtime230 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedNavigationBackButton({
    backButtonLabel,
    className: className2,
    href,
    onClick,
    parentMenu
  }, ref) {
    const {
      setActiveMenu,
      navigationTree
    } = useNavigationContext();
    const classes = clsx_default("components-navigation__back-button", className2);
    const parentMenuTitle = parentMenu !== void 0 ? navigationTree.getMenu(parentMenu)?.title : void 0;
    const handleOnClick = (event) => {
      if (typeof onClick === "function") {
        onClick(event);
      }
      const animationDirection = (0, import_i18n62.isRTL)() ? "left" : "right";
      if (parentMenu && !event.defaultPrevented) {
        setActiveMenu(parentMenu, animationDirection);
      }
    };
    const icon = (0, import_i18n62.isRTL)() ? chevron_right_default : chevron_left_default;
    return /* @__PURE__ */ (0, import_jsx_runtime230.jsxs)(MenuBackButtonUI, {
      __next40pxDefaultSize: true,
      className: classes,
      href,
      variant: "tertiary",
      ref,
      onClick: handleOnClick,
      children: [/* @__PURE__ */ (0, import_jsx_runtime230.jsx)(icon_default2, {
        icon
      }), backButtonLabel || parentMenuTitle || (0, import_i18n62.__)("Back")]
    });
  }
  var NavigationBackButton = (0, import_element155.forwardRef)(UnforwardedNavigationBackButton);
  NavigationBackButton.displayName = "NavigationBackButton";
  var back_button_default = NavigationBackButton;

  // packages/components/build-module/navigation/group/index.mjs
  var import_element157 = __toESM(require_element(), 1);

  // packages/components/build-module/navigation/group/context.mjs
  var import_element156 = __toESM(require_element(), 1);
  var NavigationGroupContext = (0, import_element156.createContext)({
    group: void 0
  });
  NavigationGroupContext.displayName = "NavigationGroupContext";
  var useNavigationGroupContext = () => (0, import_element156.useContext)(NavigationGroupContext);

  // packages/components/build-module/navigation/group/index.mjs
  var import_jsx_runtime231 = __toESM(require_jsx_runtime(), 1);
  var uniqueId = 0;
  function NavigationGroup({
    children,
    className: className2,
    title
  }) {
    const [groupId] = (0, import_element157.useState)(`group-${++uniqueId}`);
    const {
      navigationTree: {
        items
      }
    } = useNavigationContext();
    const context = {
      group: groupId
    };
    if (!Object.values(items).some((item2) => item2.group === groupId && item2._isVisible)) {
      return /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(NavigationGroupContext.Provider, {
        value: context,
        children
      });
    }
    const groupTitleId = `components-navigation__group-title-${groupId}`;
    const classes = clsx_default("components-navigation__group", className2);
    return /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(NavigationGroupContext.Provider, {
      value: context,
      children: /* @__PURE__ */ (0, import_jsx_runtime231.jsxs)("li", {
        className: classes,
        children: [title && /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(GroupTitleUI, {
          className: "components-navigation__group-title",
          id: groupTitleId,
          level: 3,
          children: title
        }), /* @__PURE__ */ (0, import_jsx_runtime231.jsx)("ul", {
          "aria-labelledby": groupTitleId,
          role: "group",
          children
        })]
      })
    });
  }
  var group_default = NavigationGroup;

  // packages/components/build-module/navigation/item/index.mjs
  var import_i18n63 = __toESM(require_i18n(), 1);

  // packages/components/build-module/navigation/item/base-content.mjs
  var import_jsx_runtime232 = __toESM(require_jsx_runtime(), 1);
  function NavigationItemBaseContent(props) {
    const {
      badge,
      title
    } = props;
    return /* @__PURE__ */ (0, import_jsx_runtime232.jsxs)(import_jsx_runtime232.Fragment, {
      children: [title && /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(ItemTitleUI, {
        className: "components-navigation__item-title",
        as: "span",
        children: title
      }), badge && /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(ItemBadgeUI, {
        className: "components-navigation__item-badge",
        children: badge
      })]
    });
  }

  // packages/components/build-module/navigation/item/base.mjs
  var import_element160 = __toESM(require_element(), 1);

  // packages/components/build-module/navigation/item/use-navigation-tree-item.mjs
  var import_element159 = __toESM(require_element(), 1);

  // packages/components/build-module/navigation/menu/context.mjs
  var import_element158 = __toESM(require_element(), 1);
  var NavigationMenuContext = (0, import_element158.createContext)({
    menu: void 0,
    search: ""
  });
  NavigationMenuContext.displayName = "NavigationMenuContext";
  var useNavigationMenuContext = () => (0, import_element158.useContext)(NavigationMenuContext);

  // packages/components/build-module/navigation/utils.mjs
  var import_remove_accents4 = __toESM(require_remove_accents(), 1);
  var normalizeInput = (input) => (0, import_remove_accents4.default)(input).replace(/^\//, "").toLowerCase();
  var normalizedSearch = (title, search) => -1 !== normalizeInput(title).indexOf(normalizeInput(search));

  // packages/components/build-module/navigation/item/use-navigation-tree-item.mjs
  var useNavigationTreeItem = (itemId, props) => {
    const {
      activeMenu,
      navigationTree: {
        addItem,
        removeItem: removeItem2
      }
    } = useNavigationContext();
    const {
      group
    } = useNavigationGroupContext();
    const {
      menu: menu2,
      search
    } = useNavigationMenuContext();
    (0, import_element159.useEffect)(() => {
      const isMenuActive = activeMenu === menu2;
      const isItemVisible = !search || props.title !== void 0 && normalizedSearch(props.title, search);
      addItem(itemId, {
        ...props,
        group,
        menu: menu2,
        _isVisible: isMenuActive && isItemVisible
      });
      return () => {
        removeItem2(itemId);
      };
    }, [activeMenu, search]);
  };

  // packages/components/build-module/navigation/item/base.mjs
  var import_jsx_runtime233 = __toESM(require_jsx_runtime(), 1);
  var uniqueId2 = 0;
  function NavigationItemBase(props) {
    const {
      children,
      className: className2,
      title,
      href,
      ...restProps
    } = props;
    const [itemId] = (0, import_element160.useState)(`item-${++uniqueId2}`);
    useNavigationTreeItem(itemId, props);
    const {
      navigationTree
    } = useNavigationContext();
    if (!navigationTree.getItem(itemId)?._isVisible) {
      return null;
    }
    const classes = clsx_default("components-navigation__item", className2);
    return /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(ItemBaseUI, {
      className: classes,
      ...restProps,
      children
    });
  }

  // packages/components/build-module/navigation/item/index.mjs
  var import_jsx_runtime234 = __toESM(require_jsx_runtime(), 1);
  var noop19 = () => {
  };
  function NavigationItem(props) {
    const {
      badge,
      children,
      className: className2,
      href,
      item: item2,
      navigateToMenu,
      onClick = noop19,
      title,
      icon,
      hideIfTargetMenuEmpty,
      isText,
      ...restProps
    } = props;
    const {
      activeItem,
      setActiveMenu,
      navigationTree: {
        isMenuEmpty
      }
    } = useNavigationContext();
    if (hideIfTargetMenuEmpty && navigateToMenu && isMenuEmpty(navigateToMenu)) {
      return null;
    }
    const isActive = item2 && activeItem === item2;
    const classes = clsx_default(className2, {
      "is-active": isActive
    });
    const onItemClick = (event) => {
      if (navigateToMenu) {
        setActiveMenu(navigateToMenu);
      }
      onClick(event);
    };
    const navigationIcon = (0, import_i18n63.isRTL)() ? chevron_left_default : chevron_right_default;
    const baseProps = children ? props : {
      ...props,
      onClick: void 0
    };
    const itemProps = isText ? restProps : {
      as: button_default,
      __next40pxDefaultSize: "as" in restProps ? restProps.as === void 0 : true,
      href,
      onClick: onItemClick,
      "aria-current": isActive ? "page" : void 0,
      ...restProps
    };
    return /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(NavigationItemBase, {
      ...baseProps,
      className: classes,
      children: children || /* @__PURE__ */ (0, import_jsx_runtime234.jsxs)(ItemUI, {
        ...itemProps,
        children: [icon && /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(ItemIconUI, {
          children: /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(icon_default2, {
            icon
          })
        }), /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(NavigationItemBaseContent, {
          title,
          badge
        }), navigateToMenu && /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(icon_default2, {
          icon: navigationIcon
        })]
      })
    });
  }
  var item_default2 = NavigationItem;

  // packages/components/build-module/navigation/menu/index.mjs
  var import_element165 = __toESM(require_element(), 1);

  // packages/components/build-module/navigation/menu/use-navigation-tree-menu.mjs
  var import_element161 = __toESM(require_element(), 1);
  var useNavigationTreeMenu = (props) => {
    const {
      navigationTree: {
        addMenu,
        removeMenu
      }
    } = useNavigationContext();
    const key = props.menu || ROOT_MENU;
    (0, import_element161.useEffect)(() => {
      addMenu(key, {
        ...props,
        menu: key
      });
      return () => {
        removeMenu(key);
      };
    }, []);
  };

  // packages/components/build-module/navigation/menu/menu-title.mjs
  var import_element164 = __toESM(require_element(), 1);
  var import_i18n66 = __toESM(require_i18n(), 1);

  // packages/components/build-module/navigation/menu/menu-title-search.mjs
  var import_element163 = __toESM(require_element(), 1);
  var import_i18n65 = __toESM(require_i18n(), 1);

  // packages/components/build-module/higher-order/with-spoken-messages/index.mjs
  var import_compose61 = __toESM(require_compose(), 1);
  var import_a11y7 = __toESM(require_a11y(), 1);
  var import_jsx_runtime235 = __toESM(require_jsx_runtime(), 1);
  var with_spoken_messages_default = (0, import_compose61.createHigherOrderComponent)((Component9) => function WithSpokenMessages(props) {
    return /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(Component9, {
      ...props,
      speak: import_a11y7.speak,
      debouncedSpeak: (0, import_compose61.useDebounce)(import_a11y7.speak, 500)
    });
  }, "withSpokenMessages");

  // packages/components/build-module/search-control/index.mjs
  var import_compose62 = __toESM(require_compose(), 1);
  var import_i18n64 = __toESM(require_i18n(), 1);
  var import_element162 = __toESM(require_element(), 1);
  var import_deprecated21 = __toESM(require_deprecated(), 1);

  // packages/components/build-module/search-control/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__35() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var StyledInputControl = /* @__PURE__ */ createStyled(input_control_default, false ? {
    target: "effl84m1"
  } : {
    target: "effl84m1",
    label: "StyledInputControl"
  })(false ? {
    name: "37btb2",
    styles: "input[type='search']{&::-webkit-search-decoration,&::-webkit-search-cancel-button,&::-webkit-search-results-button,&::-webkit-search-results-decoration{-webkit-appearance:none;}}"
  } : {
    name: "37btb2",
    styles: "input[type='search']{&::-webkit-search-decoration,&::-webkit-search-cancel-button,&::-webkit-search-results-button,&::-webkit-search-results-decoration{-webkit-appearance:none;}}/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFXd0QiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgSW5wdXRDb250cm9sIGZyb20gJy4uL2lucHV0LWNvbnRyb2wnO1xuaW1wb3J0IEljb24gZnJvbSAnLi4vaWNvbic7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRJbnB1dENvbnRyb2wgPSBzdHlsZWQoIElucHV0Q29udHJvbCApYFxuXHRpbnB1dFt0eXBlPSdzZWFyY2gnXSB7XG5cdFx0Jjo6LXdlYmtpdC1zZWFyY2gtZGVjb3JhdGlvbixcblx0XHQmOjotd2Via2l0LXNlYXJjaC1jYW5jZWwtYnV0dG9uLFxuXHRcdCY6Oi13ZWJraXQtc2VhcmNoLXJlc3VsdHMtYnV0dG9uLFxuXHRcdCY6Oi13ZWJraXQtc2VhcmNoLXJlc3VsdHMtZGVjb3JhdGlvbiB7XG5cdFx0XHQtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmU7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkSWNvbiA9IHN0eWxlZCggSWNvbiApYFxuXHQmOmRpciggbHRyICkge1xuXHRcdHRyYW5zZm9ybTogc2NhbGVYKCAtMSApO1xuXHR9XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__35
  });
  var StyledIcon = /* @__PURE__ */ createStyled(icon_default3, false ? {
    target: "effl84m0"
  } : {
    target: "effl84m0",
    label: "StyledIcon"
  })(false ? {
    name: "1i54h4p",
    styles: "&:dir( ltr ){transform:scaleX( -1 );}"
  } : {
    name: "1i54h4p",
    styles: "&:dir( ltr ){transform:scaleX( -1 );}/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQndDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IElucHV0Q29udHJvbCBmcm9tICcuLi9pbnB1dC1jb250cm9sJztcbmltcG9ydCBJY29uIGZyb20gJy4uL2ljb24nO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkSW5wdXRDb250cm9sID0gc3R5bGVkKCBJbnB1dENvbnRyb2wgKWBcblx0aW5wdXRbdHlwZT0nc2VhcmNoJ10ge1xuXHRcdCY6Oi13ZWJraXQtc2VhcmNoLWRlY29yYXRpb24sXG5cdFx0Jjo6LXdlYmtpdC1zZWFyY2gtY2FuY2VsLWJ1dHRvbixcblx0XHQmOjotd2Via2l0LXNlYXJjaC1yZXN1bHRzLWJ1dHRvbixcblx0XHQmOjotd2Via2l0LXNlYXJjaC1yZXN1bHRzLWRlY29yYXRpb24ge1xuXHRcdFx0LXdlYmtpdC1hcHBlYXJhbmNlOiBub25lO1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZEljb24gPSBzdHlsZWQoIEljb24gKWBcblx0JjpkaXIoIGx0ciApIHtcblx0XHR0cmFuc2Zvcm06IHNjYWxlWCggLTEgKTtcblx0fVxuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__35
  });

  // packages/components/build-module/search-control/index.mjs
  var import_jsx_runtime236 = __toESM(require_jsx_runtime(), 1);
  function SuffixItem({
    searchRef,
    value,
    onChange,
    onClose
  }) {
    if (!onClose && !value) {
      return null;
    }
    if (onClose) {
      (0, import_deprecated21.default)("`onClose` prop in wp.components.SearchControl", {
        since: "6.8"
      });
    }
    const onReset = () => {
      onChange("");
      searchRef.current?.focus();
    };
    return /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(InputControlSuffixWrapper, {
      variant: "control",
      children: /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(button_default, {
        size: "small",
        icon: close_small_default,
        label: onClose ? (0, import_i18n64.__)("Close search") : (0, import_i18n64.__)("Reset search"),
        onClick: onClose ?? onReset
      })
    });
  }
  function UnforwardedSearchControl({
    __nextHasNoMarginBottom: _2,
    // Prevent passing to internal component
    className: className2,
    onChange,
    value,
    label = (0, import_i18n64.__)("Search"),
    placeholder = (0, import_i18n64.__)("Search"),
    hideLabelFromVision = true,
    onClose,
    size: size3 = "default",
    ...restProps
  }, forwardedRef) {
    const {
      disabled,
      ...filteredRestProps
    } = restProps;
    const searchRef = (0, import_element162.useRef)(null);
    const instanceId = (0, import_compose62.useInstanceId)(SearchControl, "components-search-control");
    return /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(StyledInputControl, {
      __next40pxDefaultSize: true,
      id: instanceId,
      hideLabelFromVision,
      label,
      ref: (0, import_compose62.useMergeRefs)([searchRef, forwardedRef]),
      type: "search",
      size: size3,
      className: clsx_default("components-search-control", className2),
      onChange: (nextValue) => onChange(nextValue ?? ""),
      autoComplete: "off",
      placeholder,
      value: value ?? "",
      prefix: /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(InputControlPrefixWrapper, {
        variant: "icon",
        children: /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(StyledIcon, {
          icon: search_default,
          fill: "currentColor"
        })
      }),
      suffix: /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(SuffixItem, {
        searchRef,
        value,
        onChange,
        onClose
      }),
      ...filteredRestProps
    });
  }
  var SearchControl = (0, import_element162.forwardRef)(UnforwardedSearchControl);
  SearchControl.displayName = "SearchControl";
  var search_control_default = SearchControl;

  // packages/components/build-module/navigation/menu/menu-title-search.mjs
  var import_jsx_runtime237 = __toESM(require_jsx_runtime(), 1);
  function MenuTitleSearch({
    debouncedSpeak,
    onCloseSearch,
    onSearch,
    search,
    title
  }) {
    const {
      navigationTree: {
        items
      }
    } = useNavigationContext();
    const {
      menu: menu2
    } = useNavigationMenuContext();
    const inputRef = (0, import_element163.useRef)(null);
    (0, import_element163.useEffect)(() => {
      const delayedFocus = setTimeout(() => {
        inputRef.current?.focus();
      }, SEARCH_FOCUS_DELAY);
      return () => {
        clearTimeout(delayedFocus);
      };
    }, []);
    (0, import_element163.useEffect)(() => {
      if (!search) {
        return;
      }
      const count = Object.values(items).filter((item2) => item2._isVisible).length;
      const resultsFoundMessage = (0, import_i18n65.sprintf)(
        /* translators: %d: number of results. */
        (0, import_i18n65._n)("%d result found.", "%d results found.", count),
        count
      );
      debouncedSpeak(resultsFoundMessage);
    }, [items, search]);
    const onClose = () => {
      onSearch?.("");
      onCloseSearch();
    };
    const onKeyDown = (event) => {
      if (event.code === "Escape" && !event.defaultPrevented) {
        event.preventDefault();
        onClose();
      }
    };
    const inputId = `components-navigation__menu-title-search-${menu2}`;
    const placeholder = (0, import_i18n65.sprintf)(
      /* translators: placeholder for menu search box. %s: menu title */
      (0, import_i18n65.__)("Search %s"),
      title?.toLowerCase() || ""
    ).trim();
    return /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(MenuTitleSearchControlWrapper, {
      children: /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(search_control_default, {
        className: "components-navigation__menu-search-input",
        id: inputId,
        onChange: (value) => onSearch?.(value),
        onKeyDown,
        placeholder,
        onClose,
        ref: inputRef,
        value: search
      })
    });
  }
  var menu_title_search_default = with_spoken_messages_default(MenuTitleSearch);

  // packages/components/build-module/navigation/menu/menu-title.mjs
  var import_jsx_runtime238 = __toESM(require_jsx_runtime(), 1);
  function NavigationMenuTitle({
    hasSearch,
    onSearch,
    search,
    title,
    titleAction
  }) {
    const [isSearching, setIsSearching] = (0, import_element164.useState)(false);
    const {
      menu: menu2
    } = useNavigationMenuContext();
    const searchButtonRef = (0, import_element164.useRef)(null);
    if (!title) {
      return null;
    }
    const onCloseSearch = () => {
      setIsSearching(false);
      setTimeout(() => {
        searchButtonRef.current?.focus();
      }, SEARCH_FOCUS_DELAY);
    };
    const menuTitleId = `components-navigation__menu-title-${menu2}`;
    const searchButtonLabel = (0, import_i18n66.sprintf)((0, import_i18n66.__)("Search in %s"), title);
    return /* @__PURE__ */ (0, import_jsx_runtime238.jsxs)(MenuTitleUI, {
      className: "components-navigation__menu-title",
      children: [!isSearching && /* @__PURE__ */ (0, import_jsx_runtime238.jsxs)(GroupTitleUI, {
        as: "h2",
        className: "components-navigation__menu-title-heading",
        level: 3,
        children: [/* @__PURE__ */ (0, import_jsx_runtime238.jsx)("span", {
          id: menuTitleId,
          children: title
        }), (hasSearch || titleAction) && /* @__PURE__ */ (0, import_jsx_runtime238.jsxs)(MenuTitleActionsUI, {
          children: [titleAction, hasSearch && /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(button_default, {
            size: "small",
            variant: "tertiary",
            label: searchButtonLabel,
            onClick: () => setIsSearching(true),
            ref: searchButtonRef,
            children: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(icon_default2, {
              icon: search_default
            })
          })]
        })]
      }), isSearching && /* @__PURE__ */ (0, import_jsx_runtime238.jsx)("div", {
        className: getAnimateClassName({
          type: "slide-in",
          origin: "left"
        }),
        children: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(menu_title_search_default, {
          onCloseSearch,
          onSearch,
          search,
          title
        })
      })]
    });
  }

  // packages/components/build-module/navigation/menu/search-no-results-found.mjs
  var import_i18n67 = __toESM(require_i18n(), 1);
  var import_jsx_runtime239 = __toESM(require_jsx_runtime(), 1);
  function NavigationSearchNoResultsFound({
    search
  }) {
    const {
      navigationTree: {
        items
      }
    } = useNavigationContext();
    const resultsCount = Object.values(items).filter((item2) => item2._isVisible).length;
    if (!search || !!resultsCount) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(ItemBaseUI, {
      children: /* @__PURE__ */ (0, import_jsx_runtime239.jsxs)(ItemUI, {
        children: [(0, import_i18n67.__)("No results found."), " "]
      })
    });
  }

  // packages/components/build-module/navigation/menu/index.mjs
  var import_jsx_runtime240 = __toESM(require_jsx_runtime(), 1);
  function NavigationMenu(props) {
    const {
      backButtonLabel,
      children,
      className: className2,
      hasSearch,
      menu: menu2 = ROOT_MENU,
      onBackButtonClick,
      onSearch: setControlledSearch,
      parentMenu,
      search: controlledSearch,
      isSearchDebouncing,
      title,
      titleAction
    } = props;
    const [uncontrolledSearch, setUncontrolledSearch] = (0, import_element165.useState)("");
    useNavigationTreeMenu(props);
    const {
      activeMenu
    } = useNavigationContext();
    const context = {
      menu: menu2,
      search: uncontrolledSearch
    };
    if (activeMenu !== menu2) {
      return /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(NavigationMenuContext.Provider, {
        value: context,
        children
      });
    }
    const isControlledSearch = !!setControlledSearch;
    const search = isControlledSearch ? controlledSearch : uncontrolledSearch;
    const onSearch = isControlledSearch ? setControlledSearch : setUncontrolledSearch;
    const menuTitleId = `components-navigation__menu-title-${menu2}`;
    const classes = clsx_default("components-navigation__menu", className2);
    return /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(NavigationMenuContext.Provider, {
      value: context,
      children: /* @__PURE__ */ (0, import_jsx_runtime240.jsxs)(MenuUI, {
        className: classes,
        children: [(parentMenu || onBackButtonClick) && /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(back_button_default, {
          backButtonLabel,
          parentMenu,
          onClick: onBackButtonClick
        }), title && /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(NavigationMenuTitle, {
          hasSearch,
          onSearch,
          search,
          title,
          titleAction
        }), /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(menu_default2, {
          children: /* @__PURE__ */ (0, import_jsx_runtime240.jsxs)("ul", {
            "aria-labelledby": menuTitleId,
            children: [children, search && !isSearchDebouncing && /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(NavigationSearchNoResultsFound, {
              search
            })]
          })
        })]
      })
    });
  }
  var menu_default3 = NavigationMenu;

  // packages/components/build-module/navigator/navigator/component.mjs
  var import_deprecated22 = __toESM(require_deprecated(), 1);
  var import_element167 = __toESM(require_element(), 1);
  var import_is_shallow_equal3 = __toESM(require_is_shallow_equal(), 1);
  var import_warning7 = __toESM(require_warning(), 1);

  // packages/components/node_modules/path-to-regexp/dist.es2015/index.js
  function lexer(str) {
    var tokens = [];
    var i3 = 0;
    while (i3 < str.length) {
      var char2 = str[i3];
      if (char2 === "*" || char2 === "+" || char2 === "?") {
        tokens.push({ type: "MODIFIER", index: i3, value: str[i3++] });
        continue;
      }
      if (char2 === "\\") {
        tokens.push({ type: "ESCAPED_CHAR", index: i3++, value: str[i3++] });
        continue;
      }
      if (char2 === "{") {
        tokens.push({ type: "OPEN", index: i3, value: str[i3++] });
        continue;
      }
      if (char2 === "}") {
        tokens.push({ type: "CLOSE", index: i3, value: str[i3++] });
        continue;
      }
      if (char2 === ":") {
        var name = "";
        var j2 = i3 + 1;
        while (j2 < str.length) {
          var code = str.charCodeAt(j2);
          if (
            // `0-9`
            code >= 48 && code <= 57 || // `A-Z`
            code >= 65 && code <= 90 || // `a-z`
            code >= 97 && code <= 122 || // `_`
            code === 95
          ) {
            name += str[j2++];
            continue;
          }
          break;
        }
        if (!name)
          throw new TypeError("Missing parameter name at ".concat(i3));
        tokens.push({ type: "NAME", index: i3, value: name });
        i3 = j2;
        continue;
      }
      if (char2 === "(") {
        var count = 1;
        var pattern = "";
        var j2 = i3 + 1;
        if (str[j2] === "?") {
          throw new TypeError('Pattern cannot start with "?" at '.concat(j2));
        }
        while (j2 < str.length) {
          if (str[j2] === "\\") {
            pattern += str[j2++] + str[j2++];
            continue;
          }
          if (str[j2] === ")") {
            count--;
            if (count === 0) {
              j2++;
              break;
            }
          } else if (str[j2] === "(") {
            count++;
            if (str[j2 + 1] !== "?") {
              throw new TypeError("Capturing groups are not allowed at ".concat(j2));
            }
          }
          pattern += str[j2++];
        }
        if (count)
          throw new TypeError("Unbalanced pattern at ".concat(i3));
        if (!pattern)
          throw new TypeError("Missing pattern at ".concat(i3));
        tokens.push({ type: "PATTERN", index: i3, value: pattern });
        i3 = j2;
        continue;
      }
      tokens.push({ type: "CHAR", index: i3, value: str[i3++] });
    }
    tokens.push({ type: "END", index: i3, value: "" });
    return tokens;
  }
  function parse3(str, options2) {
    if (options2 === void 0) {
      options2 = {};
    }
    var tokens = lexer(str);
    var _a = options2.prefixes, prefixes = _a === void 0 ? "./" : _a, _b = options2.delimiter, delimiter2 = _b === void 0 ? "/#?" : _b;
    var result = [];
    var key = 0;
    var i3 = 0;
    var path = "";
    var tryConsume = function(type) {
      if (i3 < tokens.length && tokens[i3].type === type)
        return tokens[i3++].value;
    };
    var mustConsume = function(type) {
      var value2 = tryConsume(type);
      if (value2 !== void 0)
        return value2;
      var _a2 = tokens[i3], nextType = _a2.type, index2 = _a2.index;
      throw new TypeError("Unexpected ".concat(nextType, " at ").concat(index2, ", expected ").concat(type));
    };
    var consumeText = function() {
      var result2 = "";
      var value2;
      while (value2 = tryConsume("CHAR") || tryConsume("ESCAPED_CHAR")) {
        result2 += value2;
      }
      return result2;
    };
    var isSafe = function(value2) {
      for (var _i = 0, delimiter_1 = delimiter2; _i < delimiter_1.length; _i++) {
        var char3 = delimiter_1[_i];
        if (value2.indexOf(char3) > -1)
          return true;
      }
      return false;
    };
    var safePattern = function(prefix3) {
      var prev2 = result[result.length - 1];
      var prevText = prefix3 || (prev2 && typeof prev2 === "string" ? prev2 : "");
      if (prev2 && !prevText) {
        throw new TypeError('Must have text between two parameters, missing text after "'.concat(prev2.name, '"'));
      }
      if (!prevText || isSafe(prevText))
        return "[^".concat(escapeString(delimiter2), "]+?");
      return "(?:(?!".concat(escapeString(prevText), ")[^").concat(escapeString(delimiter2), "])+?");
    };
    while (i3 < tokens.length) {
      var char2 = tryConsume("CHAR");
      var name = tryConsume("NAME");
      var pattern = tryConsume("PATTERN");
      if (name || pattern) {
        var prefix2 = char2 || "";
        if (prefixes.indexOf(prefix2) === -1) {
          path += prefix2;
          prefix2 = "";
        }
        if (path) {
          result.push(path);
          path = "";
        }
        result.push({
          name: name || key++,
          prefix: prefix2,
          suffix: "",
          pattern: pattern || safePattern(prefix2),
          modifier: tryConsume("MODIFIER") || ""
        });
        continue;
      }
      var value = char2 || tryConsume("ESCAPED_CHAR");
      if (value) {
        path += value;
        continue;
      }
      if (path) {
        result.push(path);
        path = "";
      }
      var open = tryConsume("OPEN");
      if (open) {
        var prefix2 = consumeText();
        var name_1 = tryConsume("NAME") || "";
        var pattern_1 = tryConsume("PATTERN") || "";
        var suffix = consumeText();
        mustConsume("CLOSE");
        result.push({
          name: name_1 || (pattern_1 ? key++ : ""),
          pattern: name_1 && !pattern_1 ? safePattern(prefix2) : pattern_1,
          prefix: prefix2,
          suffix,
          modifier: tryConsume("MODIFIER") || ""
        });
        continue;
      }
      mustConsume("END");
    }
    return result;
  }
  function match2(str, options2) {
    var keys = [];
    var re4 = pathToRegexp(str, keys, options2);
    return regexpToFunction(re4, keys, options2);
  }
  function regexpToFunction(re4, keys, options2) {
    if (options2 === void 0) {
      options2 = {};
    }
    var _a = options2.decode, decode = _a === void 0 ? function(x2) {
      return x2;
    } : _a;
    return function(pathname) {
      var m3 = re4.exec(pathname);
      if (!m3)
        return false;
      var path = m3[0], index2 = m3.index;
      var params = /* @__PURE__ */ Object.create(null);
      var _loop_1 = function(i4) {
        if (m3[i4] === void 0)
          return "continue";
        var key = keys[i4 - 1];
        if (key.modifier === "*" || key.modifier === "+") {
          params[key.name] = m3[i4].split(key.prefix + key.suffix).map(function(value) {
            return decode(value, key);
          });
        } else {
          params[key.name] = decode(m3[i4], key);
        }
      };
      for (var i3 = 1; i3 < m3.length; i3++) {
        _loop_1(i3);
      }
      return { path, index: index2, params };
    };
  }
  function escapeString(str) {
    return str.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
  }
  function flags(options2) {
    return options2 && options2.sensitive ? "" : "i";
  }
  function regexpToRegexp(path, keys) {
    if (!keys)
      return path;
    var groupsRegex = /\((?:\?<(.*?)>)?(?!\?)/g;
    var index2 = 0;
    var execResult = groupsRegex.exec(path.source);
    while (execResult) {
      keys.push({
        // Use parenthesized substring match if available, index otherwise
        name: execResult[1] || index2++,
        prefix: "",
        suffix: "",
        modifier: "",
        pattern: ""
      });
      execResult = groupsRegex.exec(path.source);
    }
    return path;
  }
  function arrayToRegexp(paths, keys, options2) {
    var parts = paths.map(function(path) {
      return pathToRegexp(path, keys, options2).source;
    });
    return new RegExp("(?:".concat(parts.join("|"), ")"), flags(options2));
  }
  function stringToRegexp(path, keys, options2) {
    return tokensToRegexp(parse3(path, options2), keys, options2);
  }
  function tokensToRegexp(tokens, keys, options2) {
    if (options2 === void 0) {
      options2 = {};
    }
    var _a = options2.strict, strict = _a === void 0 ? false : _a, _b = options2.start, start = _b === void 0 ? true : _b, _c = options2.end, end = _c === void 0 ? true : _c, _d = options2.encode, encode = _d === void 0 ? function(x2) {
      return x2;
    } : _d, _e = options2.delimiter, delimiter2 = _e === void 0 ? "/#?" : _e, _f = options2.endsWith, endsWith2 = _f === void 0 ? "" : _f;
    var endsWithRe = "[".concat(escapeString(endsWith2), "]|$");
    var delimiterRe = "[".concat(escapeString(delimiter2), "]");
    var route = start ? "^" : "";
    for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {
      var token2 = tokens_1[_i];
      if (typeof token2 === "string") {
        route += escapeString(encode(token2));
      } else {
        var prefix2 = escapeString(encode(token2.prefix));
        var suffix = escapeString(encode(token2.suffix));
        if (token2.pattern) {
          if (keys)
            keys.push(token2);
          if (prefix2 || suffix) {
            if (token2.modifier === "+" || token2.modifier === "*") {
              var mod = token2.modifier === "*" ? "?" : "";
              route += "(?:".concat(prefix2, "((?:").concat(token2.pattern, ")(?:").concat(suffix).concat(prefix2, "(?:").concat(token2.pattern, "))*)").concat(suffix, ")").concat(mod);
            } else {
              route += "(?:".concat(prefix2, "(").concat(token2.pattern, ")").concat(suffix, ")").concat(token2.modifier);
            }
          } else {
            if (token2.modifier === "+" || token2.modifier === "*") {
              throw new TypeError('Can not repeat "'.concat(token2.name, '" without a prefix and suffix'));
            }
            route += "(".concat(token2.pattern, ")").concat(token2.modifier);
          }
        } else {
          route += "(?:".concat(prefix2).concat(suffix, ")").concat(token2.modifier);
        }
      }
    }
    if (end) {
      if (!strict)
        route += "".concat(delimiterRe, "?");
      route += !options2.endsWith ? "$" : "(?=".concat(endsWithRe, ")");
    } else {
      var endToken = tokens[tokens.length - 1];
      var isEndDelimited = typeof endToken === "string" ? delimiterRe.indexOf(endToken[endToken.length - 1]) > -1 : endToken === void 0;
      if (!strict) {
        route += "(?:".concat(delimiterRe, "(?=").concat(endsWithRe, "))?");
      }
      if (!isEndDelimited) {
        route += "(?=".concat(delimiterRe, "|").concat(endsWithRe, ")");
      }
    }
    return new RegExp(route, flags(options2));
  }
  function pathToRegexp(path, keys, options2) {
    if (path instanceof RegExp)
      return regexpToRegexp(path, keys);
    if (Array.isArray(path))
      return arrayToRegexp(path, keys, options2);
    return stringToRegexp(path, keys, options2);
  }

  // packages/components/build-module/navigator/utils/router.mjs
  function matchPath(path, pattern) {
    const matchingFunction = match2(pattern, {
      decode: decodeURIComponent
    });
    return matchingFunction(path);
  }
  function patternMatch(path, screens) {
    for (const screen of screens) {
      const matched = matchPath(path, screen.path);
      if (matched) {
        return {
          params: matched.params,
          id: screen.id
        };
      }
    }
    return void 0;
  }
  function findParent(path, screens) {
    if (!path.startsWith("/")) {
      return void 0;
    }
    const pathParts = path.split("/");
    let parentPath;
    while (pathParts.length > 1 && parentPath === void 0) {
      pathParts.pop();
      const potentialParentPath = pathParts.join("/") === "" ? "/" : pathParts.join("/");
      if (screens.find((screen) => {
        return matchPath(potentialParentPath, screen.path) !== false;
      })) {
        parentPath = potentialParentPath;
      }
    }
    return parentPath;
  }

  // packages/components/build-module/navigator/context.mjs
  var import_element166 = __toESM(require_element(), 1);
  var initialContextValue = {
    location: {},
    goTo: () => {
    },
    goBack: () => {
    },
    goToParent: () => {
    },
    addScreen: () => {
    },
    removeScreen: () => {
    },
    params: {}
  };
  var NavigatorContext = (0, import_element166.createContext)(initialContextValue);
  NavigatorContext.displayName = "NavigatorContext";

  // packages/components/build-module/navigator/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__36() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var navigatorWrapper = false ? {
    name: "1br0vvk",
    styles: "position:relative;overflow-x:clip;contain:layout;display:grid;grid-template-columns:1fr;grid-template-rows:1fr;align-items:start"
  } : {
    name: "il0xvu-navigatorWrapper",
    styles: "position:relative;overflow-x:clip;contain:layout;display:grid;grid-template-columns:1fr;grid-template-rows:1fr;align-items:start;label:navigatorWrapper;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLbUMiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzLCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmV4cG9ydCBjb25zdCBuYXZpZ2F0b3JXcmFwcGVyID0gY3NzYFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdC8qIFByZXZlbnRzIGhvcml6b250YWwgb3ZlcmZsb3cgd2hpbGUgYW5pbWF0aW5nIHNjcmVlbiB0cmFuc2l0aW9ucyAqL1xuXHRvdmVyZmxvdy14OiBjbGlwO1xuXHQvKlxuXHQgKiBNYXJrIHRoaXMgRE9NIHN1YnRyZWUgYXMgaXNvbGF0ZWQgd2hlbiBpdCBjb21lcyB0byBsYXlvdXQgY2FsY3VsYXRpb25zLFxuXHQgKiBwcm92aWRpbmcgcGVyZm9ybWFuY2UgYmVuZWZpdHMuXG5cdCAqL1xuXHRjb250YWluOiBsYXlvdXQ7XG5cblx0ZGlzcGxheTogZ3JpZDtcblx0Z3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiAxZnI7XG5cdGdyaWQtdGVtcGxhdGUtcm93czogMWZyO1xuXHRhbGlnbi1pdGVtczogc3RhcnQ7XG5gO1xuXG5jb25zdCBmYWRlSW4gPSBrZXlmcmFtZXMoIHtcblx0ZnJvbToge1xuXHRcdG9wYWNpdHk6IDAsXG5cdH0sXG59ICk7XG5cbmNvbnN0IGZhZGVPdXQgPSBrZXlmcmFtZXMoIHtcblx0dG86IHtcblx0XHRvcGFjaXR5OiAwLFxuXHR9LFxufSApO1xuXG5leHBvcnQgY29uc3Qgc2xpZGVGcm9tUmlnaHQgPSBrZXlmcmFtZXMoIHtcblx0ZnJvbToge1xuXHRcdHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoMTAwcHgpJyxcblx0fSxcbn0gKTtcblxuZXhwb3J0IGNvbnN0IHNsaWRlVG9MZWZ0ID0ga2V5ZnJhbWVzKCB7XG5cdHRvOiB7XG5cdFx0dHJhbnNmb3JtOiAndHJhbnNsYXRlWCgtODBweCknLFxuXHR9LFxufSApO1xuXG5leHBvcnQgY29uc3Qgc2xpZGVGcm9tTGVmdCA9IGtleWZyYW1lcygge1xuXHRmcm9tOiB7XG5cdFx0dHJhbnNmb3JtOiAndHJhbnNsYXRlWCgtMTAwcHgpJyxcblx0fSxcbn0gKTtcblxuZXhwb3J0IGNvbnN0IHNsaWRlVG9SaWdodCA9IGtleWZyYW1lcygge1xuXHR0bzoge1xuXHRcdHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoODBweCknLFxuXHR9LFxufSApO1xuXG5jb25zdCBGQURFID0ge1xuXHREVVJBVElPTjogNzAsXG5cdEVBU0lORzogJ2xpbmVhcicsXG5cdERFTEFZOiB7XG5cdFx0SU46IDcwLFxuXHRcdE9VVDogNDAsXG5cdH0sXG59O1xuY29uc3QgU0xJREUgPSB7XG5cdERVUkFUSU9OOiAzMDAsXG5cdEVBU0lORzogJ2N1YmljLWJlemllcigwLjMzLCAwLCAwLCAxKScsXG59O1xuXG5leHBvcnQgY29uc3QgVE9UQUxfQU5JTUFUSU9OX0RVUkFUSU9OID0ge1xuXHRJTjogTWF0aC5tYXgoIEZBREUuRFVSQVRJT04gKyBGQURFLkRFTEFZLklOLCBTTElERS5EVVJBVElPTiApLFxuXHRPVVQ6IE1hdGgubWF4KCBGQURFLkRVUkFUSU9OICsgRkFERS5ERUxBWS5PVVQsIFNMSURFLkRVUkFUSU9OICksXG59O1xuXG5leHBvcnQgY29uc3QgQU5JTUFUSU9OX0VORF9OQU1FUyA9IHtcblx0ZW5kOiB7XG5cdFx0aW46IHNsaWRlRnJvbVJpZ2h0Lm5hbWUsXG5cdFx0b3V0OiBzbGlkZVRvTGVmdC5uYW1lLFxuXHR9LFxuXHRzdGFydDoge1xuXHRcdGluOiBzbGlkZUZyb21MZWZ0Lm5hbWUsXG5cdFx0b3V0OiBzbGlkZVRvUmlnaHQubmFtZSxcblx0fSxcbn07XG5cbmNvbnN0IEFOSU1BVElPTiA9IHtcblx0ZW5kOiB7XG5cdFx0aW46IGNzc2Bcblx0XHRcdCR7IEZBREUuRFVSQVRJT04gfW1zICR7IEZBREUuRUFTSU5HIH0gJHsgRkFERS5ERUxBWVxuXHRcdFx0XHQuSU4gfW1zIGJvdGggJHsgZmFkZUluIH0sICR7IFNMSURFLkRVUkFUSU9OIH1tcyAkeyBTTElERS5FQVNJTkcgfSBib3RoICR7IHNsaWRlRnJvbVJpZ2h0IH1cblx0XHRgLFxuXHRcdG91dDogY3NzYFxuXHRcdFx0JHsgRkFERS5EVVJBVElPTiB9bXMgJHsgRkFERS5FQVNJTkcgfSAkeyBGQURFLkRFTEFZXG5cdFx0XHRcdC5PVVQgfW1zIGJvdGggJHsgZmFkZU91dCB9LCAkeyBTTElERS5EVVJBVElPTiB9bXMgJHsgU0xJREUuRUFTSU5HIH0gYm90aCAkeyBzbGlkZVRvTGVmdCB9XG5cdFx0YCxcblx0fSxcblx0c3RhcnQ6IHtcblx0XHRpbjogY3NzYFxuXHRcdFx0JHsgRkFERS5EVVJBVElPTiB9bXMgJHsgRkFERS5FQVNJTkcgfSAkeyBGQURFLkRFTEFZXG5cdFx0XHRcdC5JTiB9bXMgYm90aCAkeyBmYWRlSW4gfSwgJHsgU0xJREUuRFVSQVRJT04gfW1zICR7IFNMSURFLkVBU0lORyB9IGJvdGggJHsgc2xpZGVGcm9tTGVmdCB9XG5cdFx0YCxcblx0XHRvdXQ6IGNzc2Bcblx0XHRcdCR7IEZBREUuRFVSQVRJT04gfW1zICR7IEZBREUuRUFTSU5HIH0gJHsgRkFERS5ERUxBWVxuXHRcdFx0XHQuT1VUIH1tcyBib3RoICR7IGZhZGVPdXQgfSwgJHsgU0xJREUuRFVSQVRJT04gfW1zICR7IFNMSURFLkVBU0lORyB9IGJvdGggJHsgc2xpZGVUb1JpZ2h0IH1cblx0XHRgLFxuXHR9LFxufSBhcyBjb25zdDtcbmV4cG9ydCBjb25zdCBuYXZpZ2F0b3JTY3JlZW5BbmltYXRpb24gPSBjc3NgXG5cdHotaW5kZXg6IDE7XG5cblx0JltkYXRhLWFuaW1hdGlvbi10eXBlPSdvdXQnXSB7XG5cdFx0ei1pbmRleDogMDtcblx0fVxuXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdCY6bm90KCBbZGF0YS1za2lwLWFuaW1hdGlvbl0gKSB7XG5cdFx0XHQkeyAoIFsgJ3N0YXJ0JywgJ2VuZCcgXSBhcyBjb25zdCApLm1hcCggKCBkaXJlY3Rpb24gKSA9PlxuXHRcdFx0XHQoIFsgJ2luJywgJ291dCcgXSBhcyBjb25zdCApLm1hcChcblx0XHRcdFx0XHQoIHR5cGUgKSA9PiBjc3NgXG5cdFx0XHRcdFx0XHQmW2RhdGEtYW5pbWF0aW9uLWRpcmVjdGlvbj0nJHsgZGlyZWN0aW9uIH0nXVtkYXRhLWFuaW1hdGlvbi10eXBlPSckeyB0eXBlIH0nXSB7XG5cdFx0XHRcdFx0XHRcdGFuaW1hdGlvbjogJHsgQU5JTUFUSU9OWyBkaXJlY3Rpb24gXVsgdHlwZSBdIH07XG5cdFx0XHRcdFx0XHR9XG5cdFx0XHRcdFx0YFxuXHRcdFx0XHQpXG5cdFx0XHQpIH1cblx0XHR9XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBuYXZpZ2F0b3JTY3JlZW4gPSBjc3NgXG5cdC8qIEVuc3VyZXMgaG9yaXpvbnRhbCBvdmVyZmxvdyBpcyB2aXN1YWxseSBhY2Nlc3NpYmxlICovXG5cdG92ZXJmbG93LXg6IGF1dG87XG5cdC8qIEluIGNhc2UgdGhlIHJvb3QgaGFzIGEgaGVpZ2h0LCBpdCBzaG91bGQgbm90IGJlIGV4Y2VlZGVkICovXG5cdG1heC1oZWlnaHQ6IDEwMCU7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cdGdyaWQtcm93OiAxIC8gLTE7XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__36
  };
  var fadeIn2 = keyframes2({
    from: {
      opacity: 0
    }
  });
  var fadeOut = keyframes2({
    to: {
      opacity: 0
    }
  });
  var slideFromRight = keyframes2({
    from: {
      transform: "translateX(100px)"
    }
  });
  var slideToLeft = keyframes2({
    to: {
      transform: "translateX(-80px)"
    }
  });
  var slideFromLeft = keyframes2({
    from: {
      transform: "translateX(-100px)"
    }
  });
  var slideToRight = keyframes2({
    to: {
      transform: "translateX(80px)"
    }
  });
  var FADE = {
    DURATION: 70,
    EASING: "linear",
    DELAY: {
      IN: 70,
      OUT: 40
    }
  };
  var SLIDE = {
    DURATION: 300,
    EASING: "cubic-bezier(0.33, 0, 0, 1)"
  };
  var TOTAL_ANIMATION_DURATION = {
    IN: Math.max(FADE.DURATION + FADE.DELAY.IN, SLIDE.DURATION),
    OUT: Math.max(FADE.DURATION + FADE.DELAY.OUT, SLIDE.DURATION)
  };
  var ANIMATION_END_NAMES = {
    end: {
      in: slideFromRight.name,
      out: slideToLeft.name
    },
    start: {
      in: slideFromLeft.name,
      out: slideToRight.name
    }
  };
  var ANIMATION = {
    end: {
      in: /* @__PURE__ */ css(FADE.DURATION, "ms ", FADE.EASING, " ", FADE.DELAY.IN, "ms both ", fadeIn2, ",", SLIDE.DURATION, "ms ", SLIDE.EASING, " both ", slideFromRight, ";" + (false ? "" : ";label:in;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3RlMiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzLCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmV4cG9ydCBjb25zdCBuYXZpZ2F0b3JXcmFwcGVyID0gY3NzYFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdC8qIFByZXZlbnRzIGhvcml6b250YWwgb3ZlcmZsb3cgd2hpbGUgYW5pbWF0aW5nIHNjcmVlbiB0cmFuc2l0aW9ucyAqL1xuXHRvdmVyZmxvdy14OiBjbGlwO1xuXHQvKlxuXHQgKiBNYXJrIHRoaXMgRE9NIHN1YnRyZWUgYXMgaXNvbGF0ZWQgd2hlbiBpdCBjb21lcyB0byBsYXlvdXQgY2FsY3VsYXRpb25zLFxuXHQgKiBwcm92aWRpbmcgcGVyZm9ybWFuY2UgYmVuZWZpdHMuXG5cdCAqL1xuXHRjb250YWluOiBsYXlvdXQ7XG5cblx0ZGlzcGxheTogZ3JpZDtcblx0Z3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiAxZnI7XG5cdGdyaWQtdGVtcGxhdGUtcm93czogMWZyO1xuXHRhbGlnbi1pdGVtczogc3RhcnQ7XG5gO1xuXG5jb25zdCBmYWRlSW4gPSBrZXlmcmFtZXMoIHtcblx0ZnJvbToge1xuXHRcdG9wYWNpdHk6IDAsXG5cdH0sXG59ICk7XG5cbmNvbnN0IGZhZGVPdXQgPSBrZXlmcmFtZXMoIHtcblx0dG86IHtcblx0XHRvcGFjaXR5OiAwLFxuXHR9LFxufSApO1xuXG5leHBvcnQgY29uc3Qgc2xpZGVGcm9tUmlnaHQgPSBrZXlmcmFtZXMoIHtcblx0ZnJvbToge1xuXHRcdHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoMTAwcHgpJyxcblx0fSxcbn0gKTtcblxuZXhwb3J0IGNvbnN0IHNsaWRlVG9MZWZ0ID0ga2V5ZnJhbWVzKCB7XG5cdHRvOiB7XG5cdFx0dHJhbnNmb3JtOiAndHJhbnNsYXRlWCgtODBweCknLFxuXHR9LFxufSApO1xuXG5leHBvcnQgY29uc3Qgc2xpZGVGcm9tTGVmdCA9IGtleWZyYW1lcygge1xuXHRmcm9tOiB7XG5cdFx0dHJhbnNmb3JtOiAndHJhbnNsYXRlWCgtMTAwcHgpJyxcblx0fSxcbn0gKTtcblxuZXhwb3J0IGNvbnN0IHNsaWRlVG9SaWdodCA9IGtleWZyYW1lcygge1xuXHR0bzoge1xuXHRcdHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoODBweCknLFxuXHR9LFxufSApO1xuXG5jb25zdCBGQURFID0ge1xuXHREVVJBVElPTjogNzAsXG5cdEVBU0lORzogJ2xpbmVhcicsXG5cdERFTEFZOiB7XG5cdFx0SU46IDcwLFxuXHRcdE9VVDogNDAsXG5cdH0sXG59O1xuY29uc3QgU0xJREUgPSB7XG5cdERVUkFUSU9OOiAzMDAsXG5cdEVBU0lORzogJ2N1YmljLWJlemllcigwLjMzLCAwLCAwLCAxKScsXG59O1xuXG5leHBvcnQgY29uc3QgVE9UQUxfQU5JTUFUSU9OX0RVUkFUSU9OID0ge1xuXHRJTjogTWF0aC5tYXgoIEZBREUuRFVSQVRJT04gKyBGQURFLkRFTEFZLklOLCBTTElERS5EVVJBVElPTiApLFxuXHRPVVQ6IE1hdGgubWF4KCBGQURFLkRVUkFUSU9OICsgRkFERS5ERUxBWS5PVVQsIFNMSURFLkRVUkFUSU9OICksXG59O1xuXG5leHBvcnQgY29uc3QgQU5JTUFUSU9OX0VORF9OQU1FUyA9IHtcblx0ZW5kOiB7XG5cdFx0aW46IHNsaWRlRnJvbVJpZ2h0Lm5hbWUsXG5cdFx0b3V0OiBzbGlkZVRvTGVmdC5uYW1lLFxuXHR9LFxuXHRzdGFydDoge1xuXHRcdGluOiBzbGlkZUZyb21MZWZ0Lm5hbWUsXG5cdFx0b3V0OiBzbGlkZVRvUmlnaHQubmFtZSxcblx0fSxcbn07XG5cbmNvbnN0IEFOSU1BVElPTiA9IHtcblx0ZW5kOiB7XG5cdFx0aW46IGNzc2Bcblx0XHRcdCR7IEZBREUuRFVSQVRJT04gfW1zICR7IEZBREUuRUFTSU5HIH0gJHsgRkFERS5ERUxBWVxuXHRcdFx0XHQuSU4gfW1zIGJvdGggJHsgZmFkZUluIH0sICR7IFNMSURFLkRVUkFUSU9OIH1tcyAkeyBTTElERS5FQVNJTkcgfSBib3RoICR7IHNsaWRlRnJvbVJpZ2h0IH1cblx0XHRgLFxuXHRcdG91dDogY3NzYFxuXHRcdFx0JHsgRkFERS5EVVJBVElPTiB9bXMgJHsgRkFERS5FQVNJTkcgfSAkeyBGQURFLkRFTEFZXG5cdFx0XHRcdC5PVVQgfW1zIGJvdGggJHsgZmFkZU91dCB9LCAkeyBTTElERS5EVVJBVElPTiB9bXMgJHsgU0xJREUuRUFTSU5HIH0gYm90aCAkeyBzbGlkZVRvTGVmdCB9XG5cdFx0YCxcblx0fSxcblx0c3RhcnQ6IHtcblx0XHRpbjogY3NzYFxuXHRcdFx0JHsgRkFERS5EVVJBVElPTiB9bXMgJHsgRkFERS5FQVNJTkcgfSAkeyBGQURFLkRFTEFZXG5cdFx0XHRcdC5JTiB9bXMgYm90aCAkeyBmYWRlSW4gfSwgJHsgU0xJREUuRFVSQVRJT04gfW1zICR7IFNMSURFLkVBU0lORyB9IGJvdGggJHsgc2xpZGVGcm9tTGVmdCB9XG5cdFx0YCxcblx0XHRvdXQ6IGNzc2Bcblx0XHRcdCR7IEZBREUuRFVSQVRJT04gfW1zICR7IEZBREUuRUFTSU5HIH0gJHsgRkFERS5ERUxBWVxuXHRcdFx0XHQuT1VUIH1tcyBib3RoICR7IGZhZGVPdXQgfSwgJHsgU0xJREUuRFVSQVRJT04gfW1zICR7IFNMSURFLkVBU0lORyB9IGJvdGggJHsgc2xpZGVUb1JpZ2h0IH1cblx0XHRgLFxuXHR9LFxufSBhcyBjb25zdDtcbmV4cG9ydCBjb25zdCBuYXZpZ2F0b3JTY3JlZW5BbmltYXRpb24gPSBjc3NgXG5cdHotaW5kZXg6IDE7XG5cblx0JltkYXRhLWFuaW1hdGlvbi10eXBlPSdvdXQnXSB7XG5cdFx0ei1pbmRleDogMDtcblx0fVxuXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdCY6bm90KCBbZGF0YS1za2lwLWFuaW1hdGlvbl0gKSB7XG5cdFx0XHQkeyAoIFsgJ3N0YXJ0JywgJ2VuZCcgXSBhcyBjb25zdCApLm1hcCggKCBkaXJlY3Rpb24gKSA9PlxuXHRcdFx0XHQoIFsgJ2luJywgJ291dCcgXSBhcyBjb25zdCApLm1hcChcblx0XHRcdFx0XHQoIHR5cGUgKSA9PiBjc3NgXG5cdFx0XHRcdFx0XHQmW2RhdGEtYW5pbWF0aW9uLWRpcmVjdGlvbj0nJHsgZGlyZWN0aW9uIH0nXVtkYXRhLWFuaW1hdGlvbi10eXBlPSckeyB0eXBlIH0nXSB7XG5cdFx0XHRcdFx0XHRcdGFuaW1hdGlvbjogJHsgQU5JTUFUSU9OWyBkaXJlY3Rpb24gXVsgdHlwZSBdIH07XG5cdFx0XHRcdFx0XHR9XG5cdFx0XHRcdFx0YFxuXHRcdFx0XHQpXG5cdFx0XHQpIH1cblx0XHR9XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBuYXZpZ2F0b3JTY3JlZW4gPSBjc3NgXG5cdC8qIEVuc3VyZXMgaG9yaXpvbnRhbCBvdmVyZmxvdyBpcyB2aXN1YWxseSBhY2Nlc3NpYmxlICovXG5cdG92ZXJmbG93LXg6IGF1dG87XG5cdC8qIEluIGNhc2UgdGhlIHJvb3QgaGFzIGEgaGVpZ2h0LCBpdCBzaG91bGQgbm90IGJlIGV4Y2VlZGVkICovXG5cdG1heC1oZWlnaHQ6IDEwMCU7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cdGdyaWQtcm93OiAxIC8gLTE7XG5gO1xuIl19 */"),
      out: /* @__PURE__ */ css(FADE.DURATION, "ms ", FADE.EASING, " ", FADE.DELAY.OUT, "ms both ", fadeOut, ",", SLIDE.DURATION, "ms ", SLIDE.EASING, " both ", slideToLeft, ";" + (false ? "" : ";label:out;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE0RlUiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzLCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmV4cG9ydCBjb25zdCBuYXZpZ2F0b3JXcmFwcGVyID0gY3NzYFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdC8qIFByZXZlbnRzIGhvcml6b250YWwgb3ZlcmZsb3cgd2hpbGUgYW5pbWF0aW5nIHNjcmVlbiB0cmFuc2l0aW9ucyAqL1xuXHRvdmVyZmxvdy14OiBjbGlwO1xuXHQvKlxuXHQgKiBNYXJrIHRoaXMgRE9NIHN1YnRyZWUgYXMgaXNvbGF0ZWQgd2hlbiBpdCBjb21lcyB0byBsYXlvdXQgY2FsY3VsYXRpb25zLFxuXHQgKiBwcm92aWRpbmcgcGVyZm9ybWFuY2UgYmVuZWZpdHMuXG5cdCAqL1xuXHRjb250YWluOiBsYXlvdXQ7XG5cblx0ZGlzcGxheTogZ3JpZDtcblx0Z3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiAxZnI7XG5cdGdyaWQtdGVtcGxhdGUtcm93czogMWZyO1xuXHRhbGlnbi1pdGVtczogc3RhcnQ7XG5gO1xuXG5jb25zdCBmYWRlSW4gPSBrZXlmcmFtZXMoIHtcblx0ZnJvbToge1xuXHRcdG9wYWNpdHk6IDAsXG5cdH0sXG59ICk7XG5cbmNvbnN0IGZhZGVPdXQgPSBrZXlmcmFtZXMoIHtcblx0dG86IHtcblx0XHRvcGFjaXR5OiAwLFxuXHR9LFxufSApO1xuXG5leHBvcnQgY29uc3Qgc2xpZGVGcm9tUmlnaHQgPSBrZXlmcmFtZXMoIHtcblx0ZnJvbToge1xuXHRcdHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoMTAwcHgpJyxcblx0fSxcbn0gKTtcblxuZXhwb3J0IGNvbnN0IHNsaWRlVG9MZWZ0ID0ga2V5ZnJhbWVzKCB7XG5cdHRvOiB7XG5cdFx0dHJhbnNmb3JtOiAndHJhbnNsYXRlWCgtODBweCknLFxuXHR9LFxufSApO1xuXG5leHBvcnQgY29uc3Qgc2xpZGVGcm9tTGVmdCA9IGtleWZyYW1lcygge1xuXHRmcm9tOiB7XG5cdFx0dHJhbnNmb3JtOiAndHJhbnNsYXRlWCgtMTAwcHgpJyxcblx0fSxcbn0gKTtcblxuZXhwb3J0IGNvbnN0IHNsaWRlVG9SaWdodCA9IGtleWZyYW1lcygge1xuXHR0bzoge1xuXHRcdHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoODBweCknLFxuXHR9LFxufSApO1xuXG5jb25zdCBGQURFID0ge1xuXHREVVJBVElPTjogNzAsXG5cdEVBU0lORzogJ2xpbmVhcicsXG5cdERFTEFZOiB7XG5cdFx0SU46IDcwLFxuXHRcdE9VVDogNDAsXG5cdH0sXG59O1xuY29uc3QgU0xJREUgPSB7XG5cdERVUkFUSU9OOiAzMDAsXG5cdEVBU0lORzogJ2N1YmljLWJlemllcigwLjMzLCAwLCAwLCAxKScsXG59O1xuXG5leHBvcnQgY29uc3QgVE9UQUxfQU5JTUFUSU9OX0RVUkFUSU9OID0ge1xuXHRJTjogTWF0aC5tYXgoIEZBREUuRFVSQVRJT04gKyBGQURFLkRFTEFZLklOLCBTTElERS5EVVJBVElPTiApLFxuXHRPVVQ6IE1hdGgubWF4KCBGQURFLkRVUkFUSU9OICsgRkFERS5ERUxBWS5PVVQsIFNMSURFLkRVUkFUSU9OICksXG59O1xuXG5leHBvcnQgY29uc3QgQU5JTUFUSU9OX0VORF9OQU1FUyA9IHtcblx0ZW5kOiB7XG5cdFx0aW46IHNsaWRlRnJvbVJpZ2h0Lm5hbWUsXG5cdFx0b3V0OiBzbGlkZVRvTGVmdC5uYW1lLFxuXHR9LFxuXHRzdGFydDoge1xuXHRcdGluOiBzbGlkZUZyb21MZWZ0Lm5hbWUsXG5cdFx0b3V0OiBzbGlkZVRvUmlnaHQubmFtZSxcblx0fSxcbn07XG5cbmNvbnN0IEFOSU1BVElPTiA9IHtcblx0ZW5kOiB7XG5cdFx0aW46IGNzc2Bcblx0XHRcdCR7IEZBREUuRFVSQVRJT04gfW1zICR7IEZBREUuRUFTSU5HIH0gJHsgRkFERS5ERUxBWVxuXHRcdFx0XHQuSU4gfW1zIGJvdGggJHsgZmFkZUluIH0sICR7IFNMSURFLkRVUkFUSU9OIH1tcyAkeyBTTElERS5FQVNJTkcgfSBib3RoICR7IHNsaWRlRnJvbVJpZ2h0IH1cblx0XHRgLFxuXHRcdG91dDogY3NzYFxuXHRcdFx0JHsgRkFERS5EVVJBVElPTiB9bXMgJHsgRkFERS5FQVNJTkcgfSAkeyBGQURFLkRFTEFZXG5cdFx0XHRcdC5PVVQgfW1zIGJvdGggJHsgZmFkZU91dCB9LCAkeyBTTElERS5EVVJBVElPTiB9bXMgJHsgU0xJREUuRUFTSU5HIH0gYm90aCAkeyBzbGlkZVRvTGVmdCB9XG5cdFx0YCxcblx0fSxcblx0c3RhcnQ6IHtcblx0XHRpbjogY3NzYFxuXHRcdFx0JHsgRkFERS5EVVJBVElPTiB9bXMgJHsgRkFERS5FQVNJTkcgfSAkeyBGQURFLkRFTEFZXG5cdFx0XHRcdC5JTiB9bXMgYm90aCAkeyBmYWRlSW4gfSwgJHsgU0xJREUuRFVSQVRJT04gfW1zICR7IFNMSURFLkVBU0lORyB9IGJvdGggJHsgc2xpZGVGcm9tTGVmdCB9XG5cdFx0YCxcblx0XHRvdXQ6IGNzc2Bcblx0XHRcdCR7IEZBREUuRFVSQVRJT04gfW1zICR7IEZBREUuRUFTSU5HIH0gJHsgRkFERS5ERUxBWVxuXHRcdFx0XHQuT1VUIH1tcyBib3RoICR7IGZhZGVPdXQgfSwgJHsgU0xJREUuRFVSQVRJT04gfW1zICR7IFNMSURFLkVBU0lORyB9IGJvdGggJHsgc2xpZGVUb1JpZ2h0IH1cblx0XHRgLFxuXHR9LFxufSBhcyBjb25zdDtcbmV4cG9ydCBjb25zdCBuYXZpZ2F0b3JTY3JlZW5BbmltYXRpb24gPSBjc3NgXG5cdHotaW5kZXg6IDE7XG5cblx0JltkYXRhLWFuaW1hdGlvbi10eXBlPSdvdXQnXSB7XG5cdFx0ei1pbmRleDogMDtcblx0fVxuXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdCY6bm90KCBbZGF0YS1za2lwLWFuaW1hdGlvbl0gKSB7XG5cdFx0XHQkeyAoIFsgJ3N0YXJ0JywgJ2VuZCcgXSBhcyBjb25zdCApLm1hcCggKCBkaXJlY3Rpb24gKSA9PlxuXHRcdFx0XHQoIFsgJ2luJywgJ291dCcgXSBhcyBjb25zdCApLm1hcChcblx0XHRcdFx0XHQoIHR5cGUgKSA9PiBjc3NgXG5cdFx0XHRcdFx0XHQmW2RhdGEtYW5pbWF0aW9uLWRpcmVjdGlvbj0nJHsgZGlyZWN0aW9uIH0nXVtkYXRhLWFuaW1hdGlvbi10eXBlPSckeyB0eXBlIH0nXSB7XG5cdFx0XHRcdFx0XHRcdGFuaW1hdGlvbjogJHsgQU5JTUFUSU9OWyBkaXJlY3Rpb24gXVsgdHlwZSBdIH07XG5cdFx0XHRcdFx0XHR9XG5cdFx0XHRcdFx0YFxuXHRcdFx0XHQpXG5cdFx0XHQpIH1cblx0XHR9XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBuYXZpZ2F0b3JTY3JlZW4gPSBjc3NgXG5cdC8qIEVuc3VyZXMgaG9yaXpvbnRhbCBvdmVyZmxvdyBpcyB2aXN1YWxseSBhY2Nlc3NpYmxlICovXG5cdG92ZXJmbG93LXg6IGF1dG87XG5cdC8qIEluIGNhc2UgdGhlIHJvb3QgaGFzIGEgaGVpZ2h0LCBpdCBzaG91bGQgbm90IGJlIGV4Y2VlZGVkICovXG5cdG1heC1oZWlnaHQ6IDEwMCU7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cdGdyaWQtcm93OiAxIC8gLTE7XG5gO1xuIl19 */")
    },
    start: {
      in: /* @__PURE__ */ css(FADE.DURATION, "ms ", FADE.EASING, " ", FADE.DELAY.IN, "ms both ", fadeIn2, ",", SLIDE.DURATION, "ms ", SLIDE.EASING, " both ", slideFromLeft, ";" + (false ? "" : ";label:in;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrR1MiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzLCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmV4cG9ydCBjb25zdCBuYXZpZ2F0b3JXcmFwcGVyID0gY3NzYFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdC8qIFByZXZlbnRzIGhvcml6b250YWwgb3ZlcmZsb3cgd2hpbGUgYW5pbWF0aW5nIHNjcmVlbiB0cmFuc2l0aW9ucyAqL1xuXHRvdmVyZmxvdy14OiBjbGlwO1xuXHQvKlxuXHQgKiBNYXJrIHRoaXMgRE9NIHN1YnRyZWUgYXMgaXNvbGF0ZWQgd2hlbiBpdCBjb21lcyB0byBsYXlvdXQgY2FsY3VsYXRpb25zLFxuXHQgKiBwcm92aWRpbmcgcGVyZm9ybWFuY2UgYmVuZWZpdHMuXG5cdCAqL1xuXHRjb250YWluOiBsYXlvdXQ7XG5cblx0ZGlzcGxheTogZ3JpZDtcblx0Z3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiAxZnI7XG5cdGdyaWQtdGVtcGxhdGUtcm93czogMWZyO1xuXHRhbGlnbi1pdGVtczogc3RhcnQ7XG5gO1xuXG5jb25zdCBmYWRlSW4gPSBrZXlmcmFtZXMoIHtcblx0ZnJvbToge1xuXHRcdG9wYWNpdHk6IDAsXG5cdH0sXG59ICk7XG5cbmNvbnN0IGZhZGVPdXQgPSBrZXlmcmFtZXMoIHtcblx0dG86IHtcblx0XHRvcGFjaXR5OiAwLFxuXHR9LFxufSApO1xuXG5leHBvcnQgY29uc3Qgc2xpZGVGcm9tUmlnaHQgPSBrZXlmcmFtZXMoIHtcblx0ZnJvbToge1xuXHRcdHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoMTAwcHgpJyxcblx0fSxcbn0gKTtcblxuZXhwb3J0IGNvbnN0IHNsaWRlVG9MZWZ0ID0ga2V5ZnJhbWVzKCB7XG5cdHRvOiB7XG5cdFx0dHJhbnNmb3JtOiAndHJhbnNsYXRlWCgtODBweCknLFxuXHR9LFxufSApO1xuXG5leHBvcnQgY29uc3Qgc2xpZGVGcm9tTGVmdCA9IGtleWZyYW1lcygge1xuXHRmcm9tOiB7XG5cdFx0dHJhbnNmb3JtOiAndHJhbnNsYXRlWCgtMTAwcHgpJyxcblx0fSxcbn0gKTtcblxuZXhwb3J0IGNvbnN0IHNsaWRlVG9SaWdodCA9IGtleWZyYW1lcygge1xuXHR0bzoge1xuXHRcdHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoODBweCknLFxuXHR9LFxufSApO1xuXG5jb25zdCBGQURFID0ge1xuXHREVVJBVElPTjogNzAsXG5cdEVBU0lORzogJ2xpbmVhcicsXG5cdERFTEFZOiB7XG5cdFx0SU46IDcwLFxuXHRcdE9VVDogNDAsXG5cdH0sXG59O1xuY29uc3QgU0xJREUgPSB7XG5cdERVUkFUSU9OOiAzMDAsXG5cdEVBU0lORzogJ2N1YmljLWJlemllcigwLjMzLCAwLCAwLCAxKScsXG59O1xuXG5leHBvcnQgY29uc3QgVE9UQUxfQU5JTUFUSU9OX0RVUkFUSU9OID0ge1xuXHRJTjogTWF0aC5tYXgoIEZBREUuRFVSQVRJT04gKyBGQURFLkRFTEFZLklOLCBTTElERS5EVVJBVElPTiApLFxuXHRPVVQ6IE1hdGgubWF4KCBGQURFLkRVUkFUSU9OICsgRkFERS5ERUxBWS5PVVQsIFNMSURFLkRVUkFUSU9OICksXG59O1xuXG5leHBvcnQgY29uc3QgQU5JTUFUSU9OX0VORF9OQU1FUyA9IHtcblx0ZW5kOiB7XG5cdFx0aW46IHNsaWRlRnJvbVJpZ2h0Lm5hbWUsXG5cdFx0b3V0OiBzbGlkZVRvTGVmdC5uYW1lLFxuXHR9LFxuXHRzdGFydDoge1xuXHRcdGluOiBzbGlkZUZyb21MZWZ0Lm5hbWUsXG5cdFx0b3V0OiBzbGlkZVRvUmlnaHQubmFtZSxcblx0fSxcbn07XG5cbmNvbnN0IEFOSU1BVElPTiA9IHtcblx0ZW5kOiB7XG5cdFx0aW46IGNzc2Bcblx0XHRcdCR7IEZBREUuRFVSQVRJT04gfW1zICR7IEZBREUuRUFTSU5HIH0gJHsgRkFERS5ERUxBWVxuXHRcdFx0XHQuSU4gfW1zIGJvdGggJHsgZmFkZUluIH0sICR7IFNMSURFLkRVUkFUSU9OIH1tcyAkeyBTTElERS5FQVNJTkcgfSBib3RoICR7IHNsaWRlRnJvbVJpZ2h0IH1cblx0XHRgLFxuXHRcdG91dDogY3NzYFxuXHRcdFx0JHsgRkFERS5EVVJBVElPTiB9bXMgJHsgRkFERS5FQVNJTkcgfSAkeyBGQURFLkRFTEFZXG5cdFx0XHRcdC5PVVQgfW1zIGJvdGggJHsgZmFkZU91dCB9LCAkeyBTTElERS5EVVJBVElPTiB9bXMgJHsgU0xJREUuRUFTSU5HIH0gYm90aCAkeyBzbGlkZVRvTGVmdCB9XG5cdFx0YCxcblx0fSxcblx0c3RhcnQ6IHtcblx0XHRpbjogY3NzYFxuXHRcdFx0JHsgRkFERS5EVVJBVElPTiB9bXMgJHsgRkFERS5FQVNJTkcgfSAkeyBGQURFLkRFTEFZXG5cdFx0XHRcdC5JTiB9bXMgYm90aCAkeyBmYWRlSW4gfSwgJHsgU0xJREUuRFVSQVRJT04gfW1zICR7IFNMSURFLkVBU0lORyB9IGJvdGggJHsgc2xpZGVGcm9tTGVmdCB9XG5cdFx0YCxcblx0XHRvdXQ6IGNzc2Bcblx0XHRcdCR7IEZBREUuRFVSQVRJT04gfW1zICR7IEZBREUuRUFTSU5HIH0gJHsgRkFERS5ERUxBWVxuXHRcdFx0XHQuT1VUIH1tcyBib3RoICR7IGZhZGVPdXQgfSwgJHsgU0xJREUuRFVSQVRJT04gfW1zICR7IFNMSURFLkVBU0lORyB9IGJvdGggJHsgc2xpZGVUb1JpZ2h0IH1cblx0XHRgLFxuXHR9LFxufSBhcyBjb25zdDtcbmV4cG9ydCBjb25zdCBuYXZpZ2F0b3JTY3JlZW5BbmltYXRpb24gPSBjc3NgXG5cdHotaW5kZXg6IDE7XG5cblx0JltkYXRhLWFuaW1hdGlvbi10eXBlPSdvdXQnXSB7XG5cdFx0ei1pbmRleDogMDtcblx0fVxuXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdCY6bm90KCBbZGF0YS1za2lwLWFuaW1hdGlvbl0gKSB7XG5cdFx0XHQkeyAoIFsgJ3N0YXJ0JywgJ2VuZCcgXSBhcyBjb25zdCApLm1hcCggKCBkaXJlY3Rpb24gKSA9PlxuXHRcdFx0XHQoIFsgJ2luJywgJ291dCcgXSBhcyBjb25zdCApLm1hcChcblx0XHRcdFx0XHQoIHR5cGUgKSA9PiBjc3NgXG5cdFx0XHRcdFx0XHQmW2RhdGEtYW5pbWF0aW9uLWRpcmVjdGlvbj0nJHsgZGlyZWN0aW9uIH0nXVtkYXRhLWFuaW1hdGlvbi10eXBlPSckeyB0eXBlIH0nXSB7XG5cdFx0XHRcdFx0XHRcdGFuaW1hdGlvbjogJHsgQU5JTUFUSU9OWyBkaXJlY3Rpb24gXVsgdHlwZSBdIH07XG5cdFx0XHRcdFx0XHR9XG5cdFx0XHRcdFx0YFxuXHRcdFx0XHQpXG5cdFx0XHQpIH1cblx0XHR9XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBuYXZpZ2F0b3JTY3JlZW4gPSBjc3NgXG5cdC8qIEVuc3VyZXMgaG9yaXpvbnRhbCBvdmVyZmxvdyBpcyB2aXN1YWxseSBhY2Nlc3NpYmxlICovXG5cdG92ZXJmbG93LXg6IGF1dG87XG5cdC8qIEluIGNhc2UgdGhlIHJvb3QgaGFzIGEgaGVpZ2h0LCBpdCBzaG91bGQgbm90IGJlIGV4Y2VlZGVkICovXG5cdG1heC1oZWlnaHQ6IDEwMCU7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cdGdyaWQtcm93OiAxIC8gLTE7XG5gO1xuIl19 */"),
      out: /* @__PURE__ */ css(FADE.DURATION, "ms ", FADE.EASING, " ", FADE.DELAY.OUT, "ms both ", fadeOut, ",", SLIDE.DURATION, "ms ", SLIDE.EASING, " both ", slideToRight, ";" + (false ? "" : ";label:out;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzR1UiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzLCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmV4cG9ydCBjb25zdCBuYXZpZ2F0b3JXcmFwcGVyID0gY3NzYFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdC8qIFByZXZlbnRzIGhvcml6b250YWwgb3ZlcmZsb3cgd2hpbGUgYW5pbWF0aW5nIHNjcmVlbiB0cmFuc2l0aW9ucyAqL1xuXHRvdmVyZmxvdy14OiBjbGlwO1xuXHQvKlxuXHQgKiBNYXJrIHRoaXMgRE9NIHN1YnRyZWUgYXMgaXNvbGF0ZWQgd2hlbiBpdCBjb21lcyB0byBsYXlvdXQgY2FsY3VsYXRpb25zLFxuXHQgKiBwcm92aWRpbmcgcGVyZm9ybWFuY2UgYmVuZWZpdHMuXG5cdCAqL1xuXHRjb250YWluOiBsYXlvdXQ7XG5cblx0ZGlzcGxheTogZ3JpZDtcblx0Z3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiAxZnI7XG5cdGdyaWQtdGVtcGxhdGUtcm93czogMWZyO1xuXHRhbGlnbi1pdGVtczogc3RhcnQ7XG5gO1xuXG5jb25zdCBmYWRlSW4gPSBrZXlmcmFtZXMoIHtcblx0ZnJvbToge1xuXHRcdG9wYWNpdHk6IDAsXG5cdH0sXG59ICk7XG5cbmNvbnN0IGZhZGVPdXQgPSBrZXlmcmFtZXMoIHtcblx0dG86IHtcblx0XHRvcGFjaXR5OiAwLFxuXHR9LFxufSApO1xuXG5leHBvcnQgY29uc3Qgc2xpZGVGcm9tUmlnaHQgPSBrZXlmcmFtZXMoIHtcblx0ZnJvbToge1xuXHRcdHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoMTAwcHgpJyxcblx0fSxcbn0gKTtcblxuZXhwb3J0IGNvbnN0IHNsaWRlVG9MZWZ0ID0ga2V5ZnJhbWVzKCB7XG5cdHRvOiB7XG5cdFx0dHJhbnNmb3JtOiAndHJhbnNsYXRlWCgtODBweCknLFxuXHR9LFxufSApO1xuXG5leHBvcnQgY29uc3Qgc2xpZGVGcm9tTGVmdCA9IGtleWZyYW1lcygge1xuXHRmcm9tOiB7XG5cdFx0dHJhbnNmb3JtOiAndHJhbnNsYXRlWCgtMTAwcHgpJyxcblx0fSxcbn0gKTtcblxuZXhwb3J0IGNvbnN0IHNsaWRlVG9SaWdodCA9IGtleWZyYW1lcygge1xuXHR0bzoge1xuXHRcdHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoODBweCknLFxuXHR9LFxufSApO1xuXG5jb25zdCBGQURFID0ge1xuXHREVVJBVElPTjogNzAsXG5cdEVBU0lORzogJ2xpbmVhcicsXG5cdERFTEFZOiB7XG5cdFx0SU46IDcwLFxuXHRcdE9VVDogNDAsXG5cdH0sXG59O1xuY29uc3QgU0xJREUgPSB7XG5cdERVUkFUSU9OOiAzMDAsXG5cdEVBU0lORzogJ2N1YmljLWJlemllcigwLjMzLCAwLCAwLCAxKScsXG59O1xuXG5leHBvcnQgY29uc3QgVE9UQUxfQU5JTUFUSU9OX0RVUkFUSU9OID0ge1xuXHRJTjogTWF0aC5tYXgoIEZBREUuRFVSQVRJT04gKyBGQURFLkRFTEFZLklOLCBTTElERS5EVVJBVElPTiApLFxuXHRPVVQ6IE1hdGgubWF4KCBGQURFLkRVUkFUSU9OICsgRkFERS5ERUxBWS5PVVQsIFNMSURFLkRVUkFUSU9OICksXG59O1xuXG5leHBvcnQgY29uc3QgQU5JTUFUSU9OX0VORF9OQU1FUyA9IHtcblx0ZW5kOiB7XG5cdFx0aW46IHNsaWRlRnJvbVJpZ2h0Lm5hbWUsXG5cdFx0b3V0OiBzbGlkZVRvTGVmdC5uYW1lLFxuXHR9LFxuXHRzdGFydDoge1xuXHRcdGluOiBzbGlkZUZyb21MZWZ0Lm5hbWUsXG5cdFx0b3V0OiBzbGlkZVRvUmlnaHQubmFtZSxcblx0fSxcbn07XG5cbmNvbnN0IEFOSU1BVElPTiA9IHtcblx0ZW5kOiB7XG5cdFx0aW46IGNzc2Bcblx0XHRcdCR7IEZBREUuRFVSQVRJT04gfW1zICR7IEZBREUuRUFTSU5HIH0gJHsgRkFERS5ERUxBWVxuXHRcdFx0XHQuSU4gfW1zIGJvdGggJHsgZmFkZUluIH0sICR7IFNMSURFLkRVUkFUSU9OIH1tcyAkeyBTTElERS5FQVNJTkcgfSBib3RoICR7IHNsaWRlRnJvbVJpZ2h0IH1cblx0XHRgLFxuXHRcdG91dDogY3NzYFxuXHRcdFx0JHsgRkFERS5EVVJBVElPTiB9bXMgJHsgRkFERS5FQVNJTkcgfSAkeyBGQURFLkRFTEFZXG5cdFx0XHRcdC5PVVQgfW1zIGJvdGggJHsgZmFkZU91dCB9LCAkeyBTTElERS5EVVJBVElPTiB9bXMgJHsgU0xJREUuRUFTSU5HIH0gYm90aCAkeyBzbGlkZVRvTGVmdCB9XG5cdFx0YCxcblx0fSxcblx0c3RhcnQ6IHtcblx0XHRpbjogY3NzYFxuXHRcdFx0JHsgRkFERS5EVVJBVElPTiB9bXMgJHsgRkFERS5FQVNJTkcgfSAkeyBGQURFLkRFTEFZXG5cdFx0XHRcdC5JTiB9bXMgYm90aCAkeyBmYWRlSW4gfSwgJHsgU0xJREUuRFVSQVRJT04gfW1zICR7IFNMSURFLkVBU0lORyB9IGJvdGggJHsgc2xpZGVGcm9tTGVmdCB9XG5cdFx0YCxcblx0XHRvdXQ6IGNzc2Bcblx0XHRcdCR7IEZBREUuRFVSQVRJT04gfW1zICR7IEZBREUuRUFTSU5HIH0gJHsgRkFERS5ERUxBWVxuXHRcdFx0XHQuT1VUIH1tcyBib3RoICR7IGZhZGVPdXQgfSwgJHsgU0xJREUuRFVSQVRJT04gfW1zICR7IFNMSURFLkVBU0lORyB9IGJvdGggJHsgc2xpZGVUb1JpZ2h0IH1cblx0XHRgLFxuXHR9LFxufSBhcyBjb25zdDtcbmV4cG9ydCBjb25zdCBuYXZpZ2F0b3JTY3JlZW5BbmltYXRpb24gPSBjc3NgXG5cdHotaW5kZXg6IDE7XG5cblx0JltkYXRhLWFuaW1hdGlvbi10eXBlPSdvdXQnXSB7XG5cdFx0ei1pbmRleDogMDtcblx0fVxuXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdCY6bm90KCBbZGF0YS1za2lwLWFuaW1hdGlvbl0gKSB7XG5cdFx0XHQkeyAoIFsgJ3N0YXJ0JywgJ2VuZCcgXSBhcyBjb25zdCApLm1hcCggKCBkaXJlY3Rpb24gKSA9PlxuXHRcdFx0XHQoIFsgJ2luJywgJ291dCcgXSBhcyBjb25zdCApLm1hcChcblx0XHRcdFx0XHQoIHR5cGUgKSA9PiBjc3NgXG5cdFx0XHRcdFx0XHQmW2RhdGEtYW5pbWF0aW9uLWRpcmVjdGlvbj0nJHsgZGlyZWN0aW9uIH0nXVtkYXRhLWFuaW1hdGlvbi10eXBlPSckeyB0eXBlIH0nXSB7XG5cdFx0XHRcdFx0XHRcdGFuaW1hdGlvbjogJHsgQU5JTUFUSU9OWyBkaXJlY3Rpb24gXVsgdHlwZSBdIH07XG5cdFx0XHRcdFx0XHR9XG5cdFx0XHRcdFx0YFxuXHRcdFx0XHQpXG5cdFx0XHQpIH1cblx0XHR9XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBuYXZpZ2F0b3JTY3JlZW4gPSBjc3NgXG5cdC8qIEVuc3VyZXMgaG9yaXpvbnRhbCBvdmVyZmxvdyBpcyB2aXN1YWxseSBhY2Nlc3NpYmxlICovXG5cdG92ZXJmbG93LXg6IGF1dG87XG5cdC8qIEluIGNhc2UgdGhlIHJvb3QgaGFzIGEgaGVpZ2h0LCBpdCBzaG91bGQgbm90IGJlIGV4Y2VlZGVkICovXG5cdG1heC1oZWlnaHQ6IDEwMCU7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cdGdyaWQtcm93OiAxIC8gLTE7XG5gO1xuIl19 */")
    }
  };
  var navigatorScreenAnimation = /* @__PURE__ */ css("z-index:1;&[data-animation-type='out']{z-index:0;}@media not ( prefers-reduced-motion ){&:not( [data-skip-animation] ){", ["start", "end"].map((direction) => ["in", "out"].map((type) => /* @__PURE__ */ css("&[data-animation-direction='", direction, "'][data-animation-type='", type, "']{animation:", ANIMATION[direction][type], ";}" + (false ? "" : ";label:navigatorScreenAnimation;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1SG9CIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcywga2V5ZnJhbWVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5leHBvcnQgY29uc3QgbmF2aWdhdG9yV3JhcHBlciA9IGNzc2Bcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHQvKiBQcmV2ZW50cyBob3Jpem9udGFsIG92ZXJmbG93IHdoaWxlIGFuaW1hdGluZyBzY3JlZW4gdHJhbnNpdGlvbnMgKi9cblx0b3ZlcmZsb3cteDogY2xpcDtcblx0Lypcblx0ICogTWFyayB0aGlzIERPTSBzdWJ0cmVlIGFzIGlzb2xhdGVkIHdoZW4gaXQgY29tZXMgdG8gbGF5b3V0IGNhbGN1bGF0aW9ucyxcblx0ICogcHJvdmlkaW5nIHBlcmZvcm1hbmNlIGJlbmVmaXRzLlxuXHQgKi9cblx0Y29udGFpbjogbGF5b3V0O1xuXG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogMWZyO1xuXHRncmlkLXRlbXBsYXRlLXJvd3M6IDFmcjtcblx0YWxpZ24taXRlbXM6IHN0YXJ0O1xuYDtcblxuY29uc3QgZmFkZUluID0ga2V5ZnJhbWVzKCB7XG5cdGZyb206IHtcblx0XHRvcGFjaXR5OiAwLFxuXHR9LFxufSApO1xuXG5jb25zdCBmYWRlT3V0ID0ga2V5ZnJhbWVzKCB7XG5cdHRvOiB7XG5cdFx0b3BhY2l0eTogMCxcblx0fSxcbn0gKTtcblxuZXhwb3J0IGNvbnN0IHNsaWRlRnJvbVJpZ2h0ID0ga2V5ZnJhbWVzKCB7XG5cdGZyb206IHtcblx0XHR0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKDEwMHB4KScsXG5cdH0sXG59ICk7XG5cbmV4cG9ydCBjb25zdCBzbGlkZVRvTGVmdCA9IGtleWZyYW1lcygge1xuXHR0bzoge1xuXHRcdHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoLTgwcHgpJyxcblx0fSxcbn0gKTtcblxuZXhwb3J0IGNvbnN0IHNsaWRlRnJvbUxlZnQgPSBrZXlmcmFtZXMoIHtcblx0ZnJvbToge1xuXHRcdHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoLTEwMHB4KScsXG5cdH0sXG59ICk7XG5cbmV4cG9ydCBjb25zdCBzbGlkZVRvUmlnaHQgPSBrZXlmcmFtZXMoIHtcblx0dG86IHtcblx0XHR0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKDgwcHgpJyxcblx0fSxcbn0gKTtcblxuY29uc3QgRkFERSA9IHtcblx0RFVSQVRJT046IDcwLFxuXHRFQVNJTkc6ICdsaW5lYXInLFxuXHRERUxBWToge1xuXHRcdElOOiA3MCxcblx0XHRPVVQ6IDQwLFxuXHR9LFxufTtcbmNvbnN0IFNMSURFID0ge1xuXHREVVJBVElPTjogMzAwLFxuXHRFQVNJTkc6ICdjdWJpYy1iZXppZXIoMC4zMywgMCwgMCwgMSknLFxufTtcblxuZXhwb3J0IGNvbnN0IFRPVEFMX0FOSU1BVElPTl9EVVJBVElPTiA9IHtcblx0SU46IE1hdGgubWF4KCBGQURFLkRVUkFUSU9OICsgRkFERS5ERUxBWS5JTiwgU0xJREUuRFVSQVRJT04gKSxcblx0T1VUOiBNYXRoLm1heCggRkFERS5EVVJBVElPTiArIEZBREUuREVMQVkuT1VULCBTTElERS5EVVJBVElPTiApLFxufTtcblxuZXhwb3J0IGNvbnN0IEFOSU1BVElPTl9FTkRfTkFNRVMgPSB7XG5cdGVuZDoge1xuXHRcdGluOiBzbGlkZUZyb21SaWdodC5uYW1lLFxuXHRcdG91dDogc2xpZGVUb0xlZnQubmFtZSxcblx0fSxcblx0c3RhcnQ6IHtcblx0XHRpbjogc2xpZGVGcm9tTGVmdC5uYW1lLFxuXHRcdG91dDogc2xpZGVUb1JpZ2h0Lm5hbWUsXG5cdH0sXG59O1xuXG5jb25zdCBBTklNQVRJT04gPSB7XG5cdGVuZDoge1xuXHRcdGluOiBjc3NgXG5cdFx0XHQkeyBGQURFLkRVUkFUSU9OIH1tcyAkeyBGQURFLkVBU0lORyB9ICR7IEZBREUuREVMQVlcblx0XHRcdFx0LklOIH1tcyBib3RoICR7IGZhZGVJbiB9LCAkeyBTTElERS5EVVJBVElPTiB9bXMgJHsgU0xJREUuRUFTSU5HIH0gYm90aCAkeyBzbGlkZUZyb21SaWdodCB9XG5cdFx0YCxcblx0XHRvdXQ6IGNzc2Bcblx0XHRcdCR7IEZBREUuRFVSQVRJT04gfW1zICR7IEZBREUuRUFTSU5HIH0gJHsgRkFERS5ERUxBWVxuXHRcdFx0XHQuT1VUIH1tcyBib3RoICR7IGZhZGVPdXQgfSwgJHsgU0xJREUuRFVSQVRJT04gfW1zICR7IFNMSURFLkVBU0lORyB9IGJvdGggJHsgc2xpZGVUb0xlZnQgfVxuXHRcdGAsXG5cdH0sXG5cdHN0YXJ0OiB7XG5cdFx0aW46IGNzc2Bcblx0XHRcdCR7IEZBREUuRFVSQVRJT04gfW1zICR7IEZBREUuRUFTSU5HIH0gJHsgRkFERS5ERUxBWVxuXHRcdFx0XHQuSU4gfW1zIGJvdGggJHsgZmFkZUluIH0sICR7IFNMSURFLkRVUkFUSU9OIH1tcyAkeyBTTElERS5FQVNJTkcgfSBib3RoICR7IHNsaWRlRnJvbUxlZnQgfVxuXHRcdGAsXG5cdFx0b3V0OiBjc3NgXG5cdFx0XHQkeyBGQURFLkRVUkFUSU9OIH1tcyAkeyBGQURFLkVBU0lORyB9ICR7IEZBREUuREVMQVlcblx0XHRcdFx0Lk9VVCB9bXMgYm90aCAkeyBmYWRlT3V0IH0sICR7IFNMSURFLkRVUkFUSU9OIH1tcyAkeyBTTElERS5FQVNJTkcgfSBib3RoICR7IHNsaWRlVG9SaWdodCB9XG5cdFx0YCxcblx0fSxcbn0gYXMgY29uc3Q7XG5leHBvcnQgY29uc3QgbmF2aWdhdG9yU2NyZWVuQW5pbWF0aW9uID0gY3NzYFxuXHR6LWluZGV4OiAxO1xuXG5cdCZbZGF0YS1hbmltYXRpb24tdHlwZT0nb3V0J10ge1xuXHRcdHotaW5kZXg6IDA7XG5cdH1cblxuXHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHQmOm5vdCggW2RhdGEtc2tpcC1hbmltYXRpb25dICkge1xuXHRcdFx0JHsgKCBbICdzdGFydCcsICdlbmQnIF0gYXMgY29uc3QgKS5tYXAoICggZGlyZWN0aW9uICkgPT5cblx0XHRcdFx0KCBbICdpbicsICdvdXQnIF0gYXMgY29uc3QgKS5tYXAoXG5cdFx0XHRcdFx0KCB0eXBlICkgPT4gY3NzYFxuXHRcdFx0XHRcdFx0JltkYXRhLWFuaW1hdGlvbi1kaXJlY3Rpb249JyR7IGRpcmVjdGlvbiB9J11bZGF0YS1hbmltYXRpb24tdHlwZT0nJHsgdHlwZSB9J10ge1xuXHRcdFx0XHRcdFx0XHRhbmltYXRpb246ICR7IEFOSU1BVElPTlsgZGlyZWN0aW9uIF1bIHR5cGUgXSB9O1xuXHRcdFx0XHRcdFx0fVxuXHRcdFx0XHRcdGBcblx0XHRcdFx0KVxuXHRcdFx0KSB9XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgbmF2aWdhdG9yU2NyZWVuID0gY3NzYFxuXHQvKiBFbnN1cmVzIGhvcml6b250YWwgb3ZlcmZsb3cgaXMgdmlzdWFsbHkgYWNjZXNzaWJsZSAqL1xuXHRvdmVyZmxvdy14OiBhdXRvO1xuXHQvKiBJbiBjYXNlIHRoZSByb290IGhhcyBhIGhlaWdodCwgaXQgc2hvdWxkIG5vdCBiZSBleGNlZWRlZCAqL1xuXHRtYXgtaGVpZ2h0OiAxMDAlO1xuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuXHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXHRncmlkLXJvdzogMSAvIC0xO1xuYDtcbiJdfQ== */"))), ";}}" + (false ? "" : ";label:navigatorScreenAnimation;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE0RzJDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcywga2V5ZnJhbWVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5leHBvcnQgY29uc3QgbmF2aWdhdG9yV3JhcHBlciA9IGNzc2Bcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHQvKiBQcmV2ZW50cyBob3Jpem9udGFsIG92ZXJmbG93IHdoaWxlIGFuaW1hdGluZyBzY3JlZW4gdHJhbnNpdGlvbnMgKi9cblx0b3ZlcmZsb3cteDogY2xpcDtcblx0Lypcblx0ICogTWFyayB0aGlzIERPTSBzdWJ0cmVlIGFzIGlzb2xhdGVkIHdoZW4gaXQgY29tZXMgdG8gbGF5b3V0IGNhbGN1bGF0aW9ucyxcblx0ICogcHJvdmlkaW5nIHBlcmZvcm1hbmNlIGJlbmVmaXRzLlxuXHQgKi9cblx0Y29udGFpbjogbGF5b3V0O1xuXG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogMWZyO1xuXHRncmlkLXRlbXBsYXRlLXJvd3M6IDFmcjtcblx0YWxpZ24taXRlbXM6IHN0YXJ0O1xuYDtcblxuY29uc3QgZmFkZUluID0ga2V5ZnJhbWVzKCB7XG5cdGZyb206IHtcblx0XHRvcGFjaXR5OiAwLFxuXHR9LFxufSApO1xuXG5jb25zdCBmYWRlT3V0ID0ga2V5ZnJhbWVzKCB7XG5cdHRvOiB7XG5cdFx0b3BhY2l0eTogMCxcblx0fSxcbn0gKTtcblxuZXhwb3J0IGNvbnN0IHNsaWRlRnJvbVJpZ2h0ID0ga2V5ZnJhbWVzKCB7XG5cdGZyb206IHtcblx0XHR0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKDEwMHB4KScsXG5cdH0sXG59ICk7XG5cbmV4cG9ydCBjb25zdCBzbGlkZVRvTGVmdCA9IGtleWZyYW1lcygge1xuXHR0bzoge1xuXHRcdHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoLTgwcHgpJyxcblx0fSxcbn0gKTtcblxuZXhwb3J0IGNvbnN0IHNsaWRlRnJvbUxlZnQgPSBrZXlmcmFtZXMoIHtcblx0ZnJvbToge1xuXHRcdHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoLTEwMHB4KScsXG5cdH0sXG59ICk7XG5cbmV4cG9ydCBjb25zdCBzbGlkZVRvUmlnaHQgPSBrZXlmcmFtZXMoIHtcblx0dG86IHtcblx0XHR0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKDgwcHgpJyxcblx0fSxcbn0gKTtcblxuY29uc3QgRkFERSA9IHtcblx0RFVSQVRJT046IDcwLFxuXHRFQVNJTkc6ICdsaW5lYXInLFxuXHRERUxBWToge1xuXHRcdElOOiA3MCxcblx0XHRPVVQ6IDQwLFxuXHR9LFxufTtcbmNvbnN0IFNMSURFID0ge1xuXHREVVJBVElPTjogMzAwLFxuXHRFQVNJTkc6ICdjdWJpYy1iZXppZXIoMC4zMywgMCwgMCwgMSknLFxufTtcblxuZXhwb3J0IGNvbnN0IFRPVEFMX0FOSU1BVElPTl9EVVJBVElPTiA9IHtcblx0SU46IE1hdGgubWF4KCBGQURFLkRVUkFUSU9OICsgRkFERS5ERUxBWS5JTiwgU0xJREUuRFVSQVRJT04gKSxcblx0T1VUOiBNYXRoLm1heCggRkFERS5EVVJBVElPTiArIEZBREUuREVMQVkuT1VULCBTTElERS5EVVJBVElPTiApLFxufTtcblxuZXhwb3J0IGNvbnN0IEFOSU1BVElPTl9FTkRfTkFNRVMgPSB7XG5cdGVuZDoge1xuXHRcdGluOiBzbGlkZUZyb21SaWdodC5uYW1lLFxuXHRcdG91dDogc2xpZGVUb0xlZnQubmFtZSxcblx0fSxcblx0c3RhcnQ6IHtcblx0XHRpbjogc2xpZGVGcm9tTGVmdC5uYW1lLFxuXHRcdG91dDogc2xpZGVUb1JpZ2h0Lm5hbWUsXG5cdH0sXG59O1xuXG5jb25zdCBBTklNQVRJT04gPSB7XG5cdGVuZDoge1xuXHRcdGluOiBjc3NgXG5cdFx0XHQkeyBGQURFLkRVUkFUSU9OIH1tcyAkeyBGQURFLkVBU0lORyB9ICR7IEZBREUuREVMQVlcblx0XHRcdFx0LklOIH1tcyBib3RoICR7IGZhZGVJbiB9LCAkeyBTTElERS5EVVJBVElPTiB9bXMgJHsgU0xJREUuRUFTSU5HIH0gYm90aCAkeyBzbGlkZUZyb21SaWdodCB9XG5cdFx0YCxcblx0XHRvdXQ6IGNzc2Bcblx0XHRcdCR7IEZBREUuRFVSQVRJT04gfW1zICR7IEZBREUuRUFTSU5HIH0gJHsgRkFERS5ERUxBWVxuXHRcdFx0XHQuT1VUIH1tcyBib3RoICR7IGZhZGVPdXQgfSwgJHsgU0xJREUuRFVSQVRJT04gfW1zICR7IFNMSURFLkVBU0lORyB9IGJvdGggJHsgc2xpZGVUb0xlZnQgfVxuXHRcdGAsXG5cdH0sXG5cdHN0YXJ0OiB7XG5cdFx0aW46IGNzc2Bcblx0XHRcdCR7IEZBREUuRFVSQVRJT04gfW1zICR7IEZBREUuRUFTSU5HIH0gJHsgRkFERS5ERUxBWVxuXHRcdFx0XHQuSU4gfW1zIGJvdGggJHsgZmFkZUluIH0sICR7IFNMSURFLkRVUkFUSU9OIH1tcyAkeyBTTElERS5FQVNJTkcgfSBib3RoICR7IHNsaWRlRnJvbUxlZnQgfVxuXHRcdGAsXG5cdFx0b3V0OiBjc3NgXG5cdFx0XHQkeyBGQURFLkRVUkFUSU9OIH1tcyAkeyBGQURFLkVBU0lORyB9ICR7IEZBREUuREVMQVlcblx0XHRcdFx0Lk9VVCB9bXMgYm90aCAkeyBmYWRlT3V0IH0sICR7IFNMSURFLkRVUkFUSU9OIH1tcyAkeyBTTElERS5FQVNJTkcgfSBib3RoICR7IHNsaWRlVG9SaWdodCB9XG5cdFx0YCxcblx0fSxcbn0gYXMgY29uc3Q7XG5leHBvcnQgY29uc3QgbmF2aWdhdG9yU2NyZWVuQW5pbWF0aW9uID0gY3NzYFxuXHR6LWluZGV4OiAxO1xuXG5cdCZbZGF0YS1hbmltYXRpb24tdHlwZT0nb3V0J10ge1xuXHRcdHotaW5kZXg6IDA7XG5cdH1cblxuXHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHQmOm5vdCggW2RhdGEtc2tpcC1hbmltYXRpb25dICkge1xuXHRcdFx0JHsgKCBbICdzdGFydCcsICdlbmQnIF0gYXMgY29uc3QgKS5tYXAoICggZGlyZWN0aW9uICkgPT5cblx0XHRcdFx0KCBbICdpbicsICdvdXQnIF0gYXMgY29uc3QgKS5tYXAoXG5cdFx0XHRcdFx0KCB0eXBlICkgPT4gY3NzYFxuXHRcdFx0XHRcdFx0JltkYXRhLWFuaW1hdGlvbi1kaXJlY3Rpb249JyR7IGRpcmVjdGlvbiB9J11bZGF0YS1hbmltYXRpb24tdHlwZT0nJHsgdHlwZSB9J10ge1xuXHRcdFx0XHRcdFx0XHRhbmltYXRpb246ICR7IEFOSU1BVElPTlsgZGlyZWN0aW9uIF1bIHR5cGUgXSB9O1xuXHRcdFx0XHRcdFx0fVxuXHRcdFx0XHRcdGBcblx0XHRcdFx0KVxuXHRcdFx0KSB9XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgbmF2aWdhdG9yU2NyZWVuID0gY3NzYFxuXHQvKiBFbnN1cmVzIGhvcml6b250YWwgb3ZlcmZsb3cgaXMgdmlzdWFsbHkgYWNjZXNzaWJsZSAqL1xuXHRvdmVyZmxvdy14OiBhdXRvO1xuXHQvKiBJbiBjYXNlIHRoZSByb290IGhhcyBhIGhlaWdodCwgaXQgc2hvdWxkIG5vdCBiZSBleGNlZWRlZCAqL1xuXHRtYXgtaGVpZ2h0OiAxMDAlO1xuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuXHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXHRncmlkLXJvdzogMSAvIC0xO1xuYDtcbiJdfQ== */");
  var navigatorScreen = false ? {
    name: "14di7zd",
    styles: "overflow-x:auto;max-height:100%;box-sizing:border-box;position:relative;grid-column:1/-1;grid-row:1/-1"
  } : {
    name: "x0o5tf-navigatorScreen",
    styles: "overflow-x:auto;max-height:100%;box-sizing:border-box;position:relative;grid-column:1/-1;grid-row:1/-1;label:navigatorScreen;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrSWtDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcywga2V5ZnJhbWVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5leHBvcnQgY29uc3QgbmF2aWdhdG9yV3JhcHBlciA9IGNzc2Bcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHQvKiBQcmV2ZW50cyBob3Jpem9udGFsIG92ZXJmbG93IHdoaWxlIGFuaW1hdGluZyBzY3JlZW4gdHJhbnNpdGlvbnMgKi9cblx0b3ZlcmZsb3cteDogY2xpcDtcblx0Lypcblx0ICogTWFyayB0aGlzIERPTSBzdWJ0cmVlIGFzIGlzb2xhdGVkIHdoZW4gaXQgY29tZXMgdG8gbGF5b3V0IGNhbGN1bGF0aW9ucyxcblx0ICogcHJvdmlkaW5nIHBlcmZvcm1hbmNlIGJlbmVmaXRzLlxuXHQgKi9cblx0Y29udGFpbjogbGF5b3V0O1xuXG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogMWZyO1xuXHRncmlkLXRlbXBsYXRlLXJvd3M6IDFmcjtcblx0YWxpZ24taXRlbXM6IHN0YXJ0O1xuYDtcblxuY29uc3QgZmFkZUluID0ga2V5ZnJhbWVzKCB7XG5cdGZyb206IHtcblx0XHRvcGFjaXR5OiAwLFxuXHR9LFxufSApO1xuXG5jb25zdCBmYWRlT3V0ID0ga2V5ZnJhbWVzKCB7XG5cdHRvOiB7XG5cdFx0b3BhY2l0eTogMCxcblx0fSxcbn0gKTtcblxuZXhwb3J0IGNvbnN0IHNsaWRlRnJvbVJpZ2h0ID0ga2V5ZnJhbWVzKCB7XG5cdGZyb206IHtcblx0XHR0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKDEwMHB4KScsXG5cdH0sXG59ICk7XG5cbmV4cG9ydCBjb25zdCBzbGlkZVRvTGVmdCA9IGtleWZyYW1lcygge1xuXHR0bzoge1xuXHRcdHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoLTgwcHgpJyxcblx0fSxcbn0gKTtcblxuZXhwb3J0IGNvbnN0IHNsaWRlRnJvbUxlZnQgPSBrZXlmcmFtZXMoIHtcblx0ZnJvbToge1xuXHRcdHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoLTEwMHB4KScsXG5cdH0sXG59ICk7XG5cbmV4cG9ydCBjb25zdCBzbGlkZVRvUmlnaHQgPSBrZXlmcmFtZXMoIHtcblx0dG86IHtcblx0XHR0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKDgwcHgpJyxcblx0fSxcbn0gKTtcblxuY29uc3QgRkFERSA9IHtcblx0RFVSQVRJT046IDcwLFxuXHRFQVNJTkc6ICdsaW5lYXInLFxuXHRERUxBWToge1xuXHRcdElOOiA3MCxcblx0XHRPVVQ6IDQwLFxuXHR9LFxufTtcbmNvbnN0IFNMSURFID0ge1xuXHREVVJBVElPTjogMzAwLFxuXHRFQVNJTkc6ICdjdWJpYy1iZXppZXIoMC4zMywgMCwgMCwgMSknLFxufTtcblxuZXhwb3J0IGNvbnN0IFRPVEFMX0FOSU1BVElPTl9EVVJBVElPTiA9IHtcblx0SU46IE1hdGgubWF4KCBGQURFLkRVUkFUSU9OICsgRkFERS5ERUxBWS5JTiwgU0xJREUuRFVSQVRJT04gKSxcblx0T1VUOiBNYXRoLm1heCggRkFERS5EVVJBVElPTiArIEZBREUuREVMQVkuT1VULCBTTElERS5EVVJBVElPTiApLFxufTtcblxuZXhwb3J0IGNvbnN0IEFOSU1BVElPTl9FTkRfTkFNRVMgPSB7XG5cdGVuZDoge1xuXHRcdGluOiBzbGlkZUZyb21SaWdodC5uYW1lLFxuXHRcdG91dDogc2xpZGVUb0xlZnQubmFtZSxcblx0fSxcblx0c3RhcnQ6IHtcblx0XHRpbjogc2xpZGVGcm9tTGVmdC5uYW1lLFxuXHRcdG91dDogc2xpZGVUb1JpZ2h0Lm5hbWUsXG5cdH0sXG59O1xuXG5jb25zdCBBTklNQVRJT04gPSB7XG5cdGVuZDoge1xuXHRcdGluOiBjc3NgXG5cdFx0XHQkeyBGQURFLkRVUkFUSU9OIH1tcyAkeyBGQURFLkVBU0lORyB9ICR7IEZBREUuREVMQVlcblx0XHRcdFx0LklOIH1tcyBib3RoICR7IGZhZGVJbiB9LCAkeyBTTElERS5EVVJBVElPTiB9bXMgJHsgU0xJREUuRUFTSU5HIH0gYm90aCAkeyBzbGlkZUZyb21SaWdodCB9XG5cdFx0YCxcblx0XHRvdXQ6IGNzc2Bcblx0XHRcdCR7IEZBREUuRFVSQVRJT04gfW1zICR7IEZBREUuRUFTSU5HIH0gJHsgRkFERS5ERUxBWVxuXHRcdFx0XHQuT1VUIH1tcyBib3RoICR7IGZhZGVPdXQgfSwgJHsgU0xJREUuRFVSQVRJT04gfW1zICR7IFNMSURFLkVBU0lORyB9IGJvdGggJHsgc2xpZGVUb0xlZnQgfVxuXHRcdGAsXG5cdH0sXG5cdHN0YXJ0OiB7XG5cdFx0aW46IGNzc2Bcblx0XHRcdCR7IEZBREUuRFVSQVRJT04gfW1zICR7IEZBREUuRUFTSU5HIH0gJHsgRkFERS5ERUxBWVxuXHRcdFx0XHQuSU4gfW1zIGJvdGggJHsgZmFkZUluIH0sICR7IFNMSURFLkRVUkFUSU9OIH1tcyAkeyBTTElERS5FQVNJTkcgfSBib3RoICR7IHNsaWRlRnJvbUxlZnQgfVxuXHRcdGAsXG5cdFx0b3V0OiBjc3NgXG5cdFx0XHQkeyBGQURFLkRVUkFUSU9OIH1tcyAkeyBGQURFLkVBU0lORyB9ICR7IEZBREUuREVMQVlcblx0XHRcdFx0Lk9VVCB9bXMgYm90aCAkeyBmYWRlT3V0IH0sICR7IFNMSURFLkRVUkFUSU9OIH1tcyAkeyBTTElERS5FQVNJTkcgfSBib3RoICR7IHNsaWRlVG9SaWdodCB9XG5cdFx0YCxcblx0fSxcbn0gYXMgY29uc3Q7XG5leHBvcnQgY29uc3QgbmF2aWdhdG9yU2NyZWVuQW5pbWF0aW9uID0gY3NzYFxuXHR6LWluZGV4OiAxO1xuXG5cdCZbZGF0YS1hbmltYXRpb24tdHlwZT0nb3V0J10ge1xuXHRcdHotaW5kZXg6IDA7XG5cdH1cblxuXHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHQmOm5vdCggW2RhdGEtc2tpcC1hbmltYXRpb25dICkge1xuXHRcdFx0JHsgKCBbICdzdGFydCcsICdlbmQnIF0gYXMgY29uc3QgKS5tYXAoICggZGlyZWN0aW9uICkgPT5cblx0XHRcdFx0KCBbICdpbicsICdvdXQnIF0gYXMgY29uc3QgKS5tYXAoXG5cdFx0XHRcdFx0KCB0eXBlICkgPT4gY3NzYFxuXHRcdFx0XHRcdFx0JltkYXRhLWFuaW1hdGlvbi1kaXJlY3Rpb249JyR7IGRpcmVjdGlvbiB9J11bZGF0YS1hbmltYXRpb24tdHlwZT0nJHsgdHlwZSB9J10ge1xuXHRcdFx0XHRcdFx0XHRhbmltYXRpb246ICR7IEFOSU1BVElPTlsgZGlyZWN0aW9uIF1bIHR5cGUgXSB9O1xuXHRcdFx0XHRcdFx0fVxuXHRcdFx0XHRcdGBcblx0XHRcdFx0KVxuXHRcdFx0KSB9XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgbmF2aWdhdG9yU2NyZWVuID0gY3NzYFxuXHQvKiBFbnN1cmVzIGhvcml6b250YWwgb3ZlcmZsb3cgaXMgdmlzdWFsbHkgYWNjZXNzaWJsZSAqL1xuXHRvdmVyZmxvdy14OiBhdXRvO1xuXHQvKiBJbiBjYXNlIHRoZSByb290IGhhcyBhIGhlaWdodCwgaXQgc2hvdWxkIG5vdCBiZSBleGNlZWRlZCAqL1xuXHRtYXgtaGVpZ2h0OiAxMDAlO1xuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuXHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXHRncmlkLXJvdzogMSAvIC0xO1xuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__36
  };

  // packages/components/build-module/navigator/navigator/component.mjs
  var import_jsx_runtime241 = __toESM(require_jsx_runtime(), 1);
  function addScreen({
    screens
  }, screen) {
    if (screens.some((s3) => s3.path === screen.path)) {
      true ? (0, import_warning7.default)(`Navigator: a screen with path ${screen.path} already exists.
The screen with id ${screen.id} will not be added.`) : void 0;
      return screens;
    }
    return [...screens, screen];
  }
  function removeScreen({
    screens
  }, screen) {
    return screens.filter((s3) => s3.id !== screen.id);
  }
  function goTo(state, path, options2 = {}) {
    const {
      focusSelectors
    } = state;
    const currentLocation = {
      ...state.currentLocation
    };
    const {
      // Default assignments
      isBack = false,
      skipFocus = false,
      // Extract to avoid forwarding
      replace: replace3,
      focusTargetSelector,
      // Rest
      ...restOptions
    } = options2;
    if (currentLocation.path === path) {
      return {
        currentLocation,
        focusSelectors
      };
    }
    let focusSelectorsCopy;
    function getFocusSelectorsCopy() {
      focusSelectorsCopy = focusSelectorsCopy ?? new Map(state.focusSelectors);
      return focusSelectorsCopy;
    }
    if (focusTargetSelector && currentLocation.path) {
      getFocusSelectorsCopy().set(currentLocation.path, focusTargetSelector);
    }
    let currentFocusSelector;
    if (focusSelectors.get(path)) {
      if (isBack) {
        currentFocusSelector = focusSelectors.get(path);
      }
      getFocusSelectorsCopy().delete(path);
    }
    return {
      currentLocation: {
        ...restOptions,
        isInitial: false,
        path,
        isBack,
        hasRestoredFocus: false,
        focusTargetSelector: currentFocusSelector,
        skipFocus
      },
      focusSelectors: focusSelectorsCopy ?? focusSelectors
    };
  }
  function goToParent(state, options2 = {}) {
    const {
      screens,
      focusSelectors
    } = state;
    const currentLocation = {
      ...state.currentLocation
    };
    const currentPath = currentLocation.path;
    if (currentPath === void 0) {
      return {
        currentLocation,
        focusSelectors
      };
    }
    const parentPath = findParent(currentPath, screens);
    if (parentPath === void 0) {
      return {
        currentLocation,
        focusSelectors
      };
    }
    return goTo(state, parentPath, {
      ...options2,
      isBack: true
    });
  }
  function routerReducer(state, action) {
    let {
      screens,
      currentLocation,
      matchedPath,
      focusSelectors,
      ...restState
    } = state;
    switch (action.type) {
      case "add":
        screens = addScreen(state, action.screen);
        break;
      case "remove":
        screens = removeScreen(state, action.screen);
        break;
      case "goto":
        ({
          currentLocation,
          focusSelectors
        } = goTo(state, action.path, action.options));
        break;
      case "gotoparent":
        ({
          currentLocation,
          focusSelectors
        } = goToParent(state, action.options));
        break;
    }
    if (screens === state.screens && currentLocation === state.currentLocation) {
      return state;
    }
    const currentPath = currentLocation.path;
    matchedPath = currentPath !== void 0 ? patternMatch(currentPath, screens) : void 0;
    if (matchedPath && state.matchedPath && matchedPath.id === state.matchedPath.id && (0, import_is_shallow_equal3.isShallowEqual)(matchedPath.params, state.matchedPath.params)) {
      matchedPath = state.matchedPath;
    }
    return {
      ...restState,
      screens,
      currentLocation,
      matchedPath,
      focusSelectors
    };
  }
  function UnconnectedNavigator(props, forwardedRef) {
    const {
      initialPath: initialPathProp,
      children,
      className: className2,
      ...otherProps
    } = useContextSystem(props, "Navigator");
    const [routerState, dispatch] = (0, import_element167.useReducer)(routerReducer, initialPathProp, (path) => ({
      screens: [],
      currentLocation: {
        path,
        isInitial: true
      },
      matchedPath: void 0,
      focusSelectors: /* @__PURE__ */ new Map(),
      initialPath: initialPathProp
    }));
    const methods = (0, import_element167.useMemo)(() => ({
      // Note: calling goBack calls `goToParent` internally, as it was established
      // that `goBack` should behave like `goToParent`, and `goToParent` should
      // be marked as deprecated.
      goBack: (options2) => dispatch({
        type: "gotoparent",
        options: options2
      }),
      goTo: (path, options2) => dispatch({
        type: "goto",
        path,
        options: options2
      }),
      goToParent: (options2) => {
        (0, import_deprecated22.default)(`wp.components.useNavigator().goToParent`, {
          since: "6.7",
          alternative: "wp.components.useNavigator().goBack"
        });
        dispatch({
          type: "gotoparent",
          options: options2
        });
      },
      addScreen: (screen) => dispatch({
        type: "add",
        screen
      }),
      removeScreen: (screen) => dispatch({
        type: "remove",
        screen
      })
    }), []);
    const {
      currentLocation,
      matchedPath
    } = routerState;
    const navigatorContextValue = (0, import_element167.useMemo)(() => ({
      location: currentLocation,
      params: matchedPath?.params ?? {},
      match: matchedPath?.id,
      ...methods
    }), [currentLocation, matchedPath, methods]);
    const cx3 = useCx();
    const classes = (0, import_element167.useMemo)(() => cx3(navigatorWrapper, className2), [className2, cx3]);
    return /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(component_default, {
      ref: forwardedRef,
      className: classes,
      ...otherProps,
      children: /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(NavigatorContext.Provider, {
        value: navigatorContextValue,
        children
      })
    });
  }
  var Navigator2 = contextConnect(UnconnectedNavigator, "Navigator");

  // packages/components/build-module/navigator/navigator-screen/component.mjs
  var import_dom32 = __toESM(require_dom(), 1);
  var import_element169 = __toESM(require_element(), 1);
  var import_compose64 = __toESM(require_compose(), 1);
  var import_escape_html = __toESM(require_escape_html(), 1);
  var import_warning8 = __toESM(require_warning(), 1);

  // packages/components/build-module/navigator/navigator-screen/use-screen-animate-presence.mjs
  var import_element168 = __toESM(require_element(), 1);
  var import_compose63 = __toESM(require_compose(), 1);
  var import_i18n68 = __toESM(require_i18n(), 1);
  var ANIMATION_TIMEOUT_MARGIN = 1.2;
  var isEnterAnimation = (animationDirection, animationStatus, animationName) => animationStatus === "ANIMATING_IN" && animationName === ANIMATION_END_NAMES[animationDirection].in;
  var isExitAnimation = (animationDirection, animationStatus, animationName) => animationStatus === "ANIMATING_OUT" && animationName === ANIMATION_END_NAMES[animationDirection].out;
  function useScreenAnimatePresence({
    isMatch,
    skipAnimation,
    isBack,
    onAnimationEnd
  }) {
    const isRTL23 = (0, import_i18n68.isRTL)();
    const prefersReducedMotion2 = (0, import_compose63.useReducedMotion)();
    const [animationStatus, setAnimationStatus] = (0, import_element168.useState)("INITIAL");
    const becameSelected = animationStatus !== "ANIMATING_IN" && animationStatus !== "IN" && isMatch;
    const becameUnselected = animationStatus !== "ANIMATING_OUT" && animationStatus !== "OUT" && !isMatch;
    (0, import_element168.useLayoutEffect)(() => {
      if (becameSelected) {
        setAnimationStatus(skipAnimation || prefersReducedMotion2 ? "IN" : "ANIMATING_IN");
      } else if (becameUnselected) {
        setAnimationStatus(skipAnimation || prefersReducedMotion2 ? "OUT" : "ANIMATING_OUT");
      }
    }, [becameSelected, becameUnselected, skipAnimation, prefersReducedMotion2]);
    const animationDirection = isRTL23 && isBack || !isRTL23 && !isBack ? "end" : "start";
    const isAnimatingIn = animationStatus === "ANIMATING_IN";
    const isAnimatingOut = animationStatus === "ANIMATING_OUT";
    let animationType;
    if (isAnimatingIn) {
      animationType = "in";
    } else if (isAnimatingOut) {
      animationType = "out";
    }
    const onScreenAnimationEnd = (0, import_element168.useCallback)((e3) => {
      onAnimationEnd?.(e3);
      if (isExitAnimation(animationDirection, animationStatus, e3.animationName)) {
        setAnimationStatus("OUT");
      } else if (isEnterAnimation(animationDirection, animationStatus, e3.animationName)) {
        setAnimationStatus("IN");
      }
    }, [onAnimationEnd, animationStatus, animationDirection]);
    (0, import_element168.useEffect)(() => {
      let animationTimeout;
      if (isAnimatingOut) {
        animationTimeout = window.setTimeout(() => {
          setAnimationStatus("OUT");
          animationTimeout = void 0;
        }, TOTAL_ANIMATION_DURATION.OUT * ANIMATION_TIMEOUT_MARGIN);
      } else if (isAnimatingIn) {
        animationTimeout = window.setTimeout(() => {
          setAnimationStatus("IN");
          animationTimeout = void 0;
        }, TOTAL_ANIMATION_DURATION.IN * ANIMATION_TIMEOUT_MARGIN);
      }
      return () => {
        if (animationTimeout) {
          window.clearTimeout(animationTimeout);
          animationTimeout = void 0;
        }
      };
    }, [isAnimatingOut, isAnimatingIn]);
    return {
      animationStyles: navigatorScreenAnimation,
      // Render the screen's contents in the DOM not only when the screen is
      // selected, but also while it is animating out.
      shouldRenderScreen: isMatch || animationStatus === "IN" || animationStatus === "ANIMATING_OUT",
      screenProps: {
        onAnimationEnd: onScreenAnimationEnd,
        "data-animation-direction": animationDirection,
        "data-animation-type": animationType,
        "data-skip-animation": skipAnimation || void 0
      }
    };
  }

  // packages/components/build-module/navigator/navigator-screen/component.mjs
  var import_jsx_runtime242 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedNavigatorScreen(props, forwardedRef) {
    if (!/^\//.test(props.path)) {
      true ? (0, import_warning8.default)("wp.components.Navigator.Screen: the `path` should follow a URL-like scheme; it should start with and be separated by the `/` character.") : void 0;
    }
    const screenId = (0, import_element169.useId)();
    const {
      children,
      className: className2,
      path,
      onAnimationEnd: onAnimationEndProp,
      ...otherProps
    } = useContextSystem(props, "Navigator.Screen");
    const {
      location,
      match: match4,
      addScreen: addScreen2,
      removeScreen: removeScreen2
    } = (0, import_element169.useContext)(NavigatorContext);
    const {
      isInitial,
      isBack,
      focusTargetSelector,
      skipFocus
    } = location;
    const isMatch = match4 === screenId;
    const wrapperRef = (0, import_element169.useRef)(null);
    const skipAnimationAndFocusRestoration = !!isInitial && !isBack;
    (0, import_element169.useEffect)(() => {
      const screen = {
        id: screenId,
        path: (0, import_escape_html.escapeAttribute)(path)
      };
      addScreen2(screen);
      return () => removeScreen2(screen);
    }, [screenId, path, addScreen2, removeScreen2]);
    const {
      animationStyles,
      shouldRenderScreen,
      screenProps
    } = useScreenAnimatePresence({
      isMatch,
      isBack,
      onAnimationEnd: onAnimationEndProp,
      skipAnimation: skipAnimationAndFocusRestoration
    });
    const cx3 = useCx();
    const classes = (0, import_element169.useMemo)(() => cx3(navigatorScreen, animationStyles, className2), [className2, cx3, animationStyles]);
    const locationRef = (0, import_element169.useRef)(location);
    (0, import_element169.useEffect)(() => {
      locationRef.current = location;
    }, [location]);
    (0, import_element169.useEffect)(() => {
      const wrapperEl = wrapperRef.current;
      if (skipAnimationAndFocusRestoration || !isMatch || !wrapperEl || locationRef.current.hasRestoredFocus || skipFocus) {
        return;
      }
      const activeElement = wrapperEl.ownerDocument.activeElement;
      if (wrapperEl.contains(activeElement)) {
        return;
      }
      let elementToFocus = null;
      if (isBack && focusTargetSelector) {
        elementToFocus = wrapperEl.querySelector(focusTargetSelector);
      }
      if (!elementToFocus) {
        const [firstTabbable] = import_dom32.focus.tabbable.find(wrapperEl);
        elementToFocus = firstTabbable ?? wrapperEl;
      }
      locationRef.current.hasRestoredFocus = true;
      elementToFocus.focus();
    }, [skipAnimationAndFocusRestoration, isMatch, isBack, focusTargetSelector, skipFocus]);
    const mergedWrapperRef = (0, import_compose64.useMergeRefs)([forwardedRef, wrapperRef]);
    return shouldRenderScreen ? /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(component_default, {
      ref: mergedWrapperRef,
      className: classes,
      ...screenProps,
      ...otherProps,
      children
    }) : null;
  }
  var NavigatorScreen = contextConnect(UnconnectedNavigatorScreen, "Navigator.Screen");

  // packages/components/build-module/navigator/navigator-button/hook.mjs
  var import_element171 = __toESM(require_element(), 1);
  var import_escape_html2 = __toESM(require_escape_html(), 1);

  // packages/components/build-module/navigator/use-navigator.mjs
  var import_element170 = __toESM(require_element(), 1);
  function useNavigator() {
    const {
      location,
      params,
      goTo: goTo2,
      goBack,
      goToParent: goToParent2
    } = (0, import_element170.useContext)(NavigatorContext);
    return {
      location,
      goTo: goTo2,
      goBack,
      goToParent: goToParent2,
      params
    };
  }

  // packages/components/build-module/navigator/navigator-button/hook.mjs
  var cssSelectorForAttribute = (attrName, attrValue) => `[${attrName}="${attrValue}"]`;
  function useNavigatorButton(props) {
    const {
      path,
      onClick,
      as = button_default,
      attributeName = "id",
      ...otherProps
    } = useContextSystem(props, "Navigator.Button");
    const escapedPath = (0, import_escape_html2.escapeAttribute)(path);
    const {
      goTo: goTo2
    } = useNavigator();
    const handleClick = (0, import_element171.useCallback)((e3) => {
      e3.preventDefault();
      goTo2(escapedPath, {
        focusTargetSelector: cssSelectorForAttribute(attributeName, escapedPath)
      });
      onClick?.(e3);
    }, [goTo2, onClick, attributeName, escapedPath]);
    return {
      as,
      onClick: handleClick,
      ...otherProps,
      [attributeName]: escapedPath
    };
  }

  // packages/components/build-module/navigator/navigator-button/component.mjs
  var import_jsx_runtime243 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedNavigatorButton(props, forwardedRef) {
    const navigatorButtonProps = useNavigatorButton(props);
    return /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(component_default, {
      ref: forwardedRef,
      ...navigatorButtonProps
    });
  }
  var NavigatorButton = contextConnect(UnconnectedNavigatorButton, "Navigator.Button");

  // packages/components/build-module/navigator/navigator-back-button/hook.mjs
  var import_element172 = __toESM(require_element(), 1);
  function useNavigatorBackButton(props) {
    const {
      onClick,
      as = button_default,
      ...otherProps
    } = useContextSystem(props, "Navigator.BackButton");
    const {
      goBack
    } = useNavigator();
    const handleClick = (0, import_element172.useCallback)((e3) => {
      e3.preventDefault();
      goBack();
      onClick?.(e3);
    }, [goBack, onClick]);
    return {
      as,
      onClick: handleClick,
      ...otherProps
    };
  }

  // packages/components/build-module/navigator/navigator-back-button/component.mjs
  var import_jsx_runtime244 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedNavigatorBackButton(props, forwardedRef) {
    const navigatorBackButtonProps = useNavigatorBackButton(props);
    return /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(component_default, {
      ref: forwardedRef,
      ...navigatorBackButtonProps
    });
  }
  var NavigatorBackButton = contextConnect(UnconnectedNavigatorBackButton, "Navigator.BackButton");

  // packages/components/build-module/navigator/navigator-to-parent-button/component.mjs
  var import_deprecated23 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime245 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedNavigatorToParentButton(props, forwardedRef) {
    (0, import_deprecated23.default)("wp.components.NavigatorToParentButton", {
      since: "6.7",
      alternative: "wp.components.Navigator.BackButton"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(NavigatorBackButton, {
      ref: forwardedRef,
      ...props
    });
  }
  var NavigatorToParentButton = contextConnect(UnconnectedNavigatorToParentButton, "Navigator.ToParentButton");

  // packages/components/build-module/navigator/legacy.mjs
  var NavigatorProvider = Object.assign(Navigator2, {
    displayName: "NavigatorProvider"
  });
  var NavigatorScreen2 = Object.assign(NavigatorScreen, {
    displayName: "NavigatorScreen"
  });
  var NavigatorButton2 = Object.assign(NavigatorButton, {
    displayName: "NavigatorButton"
  });
  var NavigatorBackButton2 = Object.assign(NavigatorBackButton, {
    displayName: "NavigatorBackButton"
  });
  var NavigatorToParentButton2 = Object.assign(NavigatorToParentButton, {
    displayName: "NavigatorToParentButton"
  });

  // packages/components/build-module/navigator/index.mjs
  var Navigator3 = Object.assign(Navigator2, {
    /**
     * The `Navigator.Screen` component represents a single view/screen/panel and
     * should be used in combination with the `Navigator`, the `Navigator.Button`
     * and the `Navigator.BackButton` components.
     *
     * @example
     * ```jsx
     * import { Navigator } from '@wordpress/components';
     *
     * const MyNavigation = () => (
     *   <Navigator initialPath="/">
     *     <Navigator.Screen path="/">
     *       <p>This is the home screen.</p>
     *        <Navigator.Button path="/child">
     *          Navigate to child screen.
     *       </Navigator.Button>
     *     </Navigator.Screen>
     *
     *     <Navigator.Screen path="/child">
     *       <p>This is the child screen.</p>
     *       <Navigator.BackButton>
     *         Go back
     *       </Navigator.BackButton>
     *     </Navigator.Screen>
     *   </Navigator>
     * );
     * ```
     */
    Screen: Object.assign(NavigatorScreen, {
      displayName: "Navigator.Screen"
    }),
    /**
     * The `Navigator.Button` component can be used to navigate to a screen and
     * should be used in combination with the `Navigator`, the `Navigator.Screen`
     * and the `Navigator.BackButton` components.
     *
     * @example
     * ```jsx
     * import { Navigator } from '@wordpress/components';
     *
     * const MyNavigation = () => (
     *   <Navigator initialPath="/">
     *     <Navigator.Screen path="/">
     *       <p>This is the home screen.</p>
     *        <Navigator.Button path="/child">
     *          Navigate to child screen.
     *       </Navigator.Button>
     *     </Navigator.Screen>
     *
     *     <Navigator.Screen path="/child">
     *       <p>This is the child screen.</p>
     *       <Navigator.BackButton>
     *         Go back
     *       </Navigator.BackButton>
     *     </Navigator.Screen>
     *   </Navigator>
     * );
     * ```
     */
    Button: Object.assign(NavigatorButton, {
      displayName: "Navigator.Button"
    }),
    /**
     * The `Navigator.BackButton` component can be used to navigate to a screen and
     * should be used in combination with the `Navigator`, the `Navigator.Screen`
     * and the `Navigator.Button` components.
     *
     * @example
     * ```jsx
     * import { Navigator } from '@wordpress/components';
     *
     * const MyNavigation = () => (
     *   <Navigator initialPath="/">
     *     <Navigator.Screen path="/">
     *       <p>This is the home screen.</p>
     *        <Navigator.Button path="/child">
     *          Navigate to child screen.
     *       </Navigator.Button>
     *     </Navigator.Screen>
     *
     *     <Navigator.Screen path="/child">
     *       <p>This is the child screen.</p>
     *       <Navigator.BackButton>
     *         Go back
     *       </Navigator.BackButton>
     *     </Navigator.Screen>
     *   </Navigator>
     * );
     * ```
     */
    BackButton: Object.assign(NavigatorBackButton, {
      displayName: "Navigator.BackButton"
    })
  });

  // packages/components/build-module/notice/index.mjs
  var import_i18n69 = __toESM(require_i18n(), 1);
  var import_element173 = __toESM(require_element(), 1);
  var import_a11y8 = __toESM(require_a11y(), 1);
  var import_jsx_runtime246 = __toESM(require_jsx_runtime(), 1);
  var noop20 = () => {
  };
  function useSpokenMessage(message2, politeness) {
    const spokenMessage = typeof message2 === "string" ? message2 : (0, import_element173.renderToString)(message2);
    (0, import_element173.useEffect)(() => {
      if (spokenMessage) {
        (0, import_a11y8.speak)(spokenMessage, politeness);
      }
    }, [spokenMessage, politeness]);
  }
  function getDefaultPoliteness(status) {
    switch (status) {
      case "success":
      case "warning":
      case "info":
        return "polite";
      // The default will also catch the 'error' status.
      default:
        return "assertive";
    }
  }
  function getStatusLabel(status) {
    switch (status) {
      case "warning":
        return (0, import_i18n69.__)("Warning notice");
      case "info":
        return (0, import_i18n69.__)("Information notice");
      case "error":
        return (0, import_i18n69.__)("Error notice");
      // The default will also catch the 'success' status.
      default:
        return (0, import_i18n69.__)("Notice");
    }
  }
  function Notice({
    className: className2,
    status = "info",
    children,
    spokenMessage = children,
    onRemove = noop20,
    isDismissible = true,
    actions = [],
    politeness = getDefaultPoliteness(status),
    __unstableHTML,
    // onDismiss is a callback executed when the notice is dismissed.
    // It is distinct from onRemove, which _looks_ like a callback but is
    // actually the function to call to remove the notice from the UI.
    onDismiss = noop20
  }) {
    useSpokenMessage(spokenMessage, politeness);
    const classes = clsx_default(className2, "components-notice", "is-" + status, {
      "is-dismissible": isDismissible
    });
    if (__unstableHTML && typeof children === "string") {
      children = /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(import_element173.RawHTML, {
        children
      });
    }
    const onDismissNotice = () => {
      onDismiss();
      onRemove();
    };
    return /* @__PURE__ */ (0, import_jsx_runtime246.jsxs)("div", {
      className: classes,
      children: [/* @__PURE__ */ (0, import_jsx_runtime246.jsx)(component_default2, {
        children: getStatusLabel(status)
      }), /* @__PURE__ */ (0, import_jsx_runtime246.jsxs)("div", {
        className: "components-notice__content",
        children: [children, actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime246.jsx)("div", {
          className: "components-notice__actions",
          children: actions.map(({
            className: buttonCustomClasses,
            label,
            isPrimary,
            variant,
            noDefaultClasses = false,
            onClick,
            url,
            disabled
          }, index2) => {
            let computedVariant = variant;
            if (variant !== "primary" && !noDefaultClasses) {
              computedVariant = !url ? "secondary" : "link";
            }
            if (typeof computedVariant === "undefined" && isPrimary) {
              computedVariant = "primary";
            }
            return /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(button_default, {
              __next40pxDefaultSize: true,
              href: url,
              variant: computedVariant,
              onClick,
              disabled,
              accessibleWhenDisabled: true,
              className: clsx_default("components-notice__action", buttonCustomClasses),
              children: label
            }, index2);
          })
        })]
      }), isDismissible && /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(button_default, {
        size: "small",
        className: "components-notice__dismiss",
        icon: close_default,
        label: (0, import_i18n69.__)("Close"),
        onClick: onDismissNotice
      })]
    });
  }
  var notice_default = Notice;

  // packages/components/build-module/notice/list.mjs
  var import_react124 = __toESM(require_react(), 1);
  var import_jsx_runtime247 = __toESM(require_jsx_runtime(), 1);
  var noop21 = () => {
  };
  function NoticeList({
    notices,
    onRemove = noop21,
    className: className2,
    children
  }) {
    const removeNotice = (id3) => () => onRemove(id3);
    className2 = clsx_default("components-notice-list", className2);
    return /* @__PURE__ */ (0, import_jsx_runtime247.jsxs)("div", {
      className: className2,
      children: [children, [...notices].reverse().map((notice) => {
        const {
          content,
          ...restNotice
        } = notice;
        return /* @__PURE__ */ (0, import_react124.createElement)(notice_default, {
          ...restNotice,
          key: notice.id,
          onRemove: removeNotice(notice.id)
        }, notice.content);
      })]
    });
  }
  var list_default = NoticeList;

  // packages/components/build-module/panel/index.mjs
  var import_element174 = __toESM(require_element(), 1);

  // packages/components/build-module/panel/header.mjs
  var import_jsx_runtime248 = __toESM(require_jsx_runtime(), 1);
  function PanelHeader({
    label,
    children
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime248.jsxs)("div", {
      className: "components-panel__header",
      children: [label && /* @__PURE__ */ (0, import_jsx_runtime248.jsx)("h2", {
        children: label
      }), children]
    });
  }
  var header_default = PanelHeader;

  // packages/components/build-module/panel/index.mjs
  var import_jsx_runtime249 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedPanel({
    header,
    className: className2,
    children
  }, ref) {
    const classNames = clsx_default(className2, "components-panel");
    return /* @__PURE__ */ (0, import_jsx_runtime249.jsxs)("div", {
      className: classNames,
      ref,
      children: [header && /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(header_default, {
        label: header
      }), children]
    });
  }
  var Panel = (0, import_element174.forwardRef)(UnforwardedPanel);
  Panel.displayName = "Panel";
  var panel_default = Panel;

  // packages/components/build-module/panel/body.mjs
  var import_compose65 = __toESM(require_compose(), 1);
  var import_element175 = __toESM(require_element(), 1);
  var import_jsx_runtime250 = __toESM(require_jsx_runtime(), 1);
  var noop22 = () => {
  };
  function UnforwardedPanelBody(props, ref) {
    const {
      buttonProps = {},
      children,
      className: className2,
      icon,
      initialOpen,
      onToggle = noop22,
      opened,
      title,
      scrollAfterOpen = true
    } = props;
    const [isOpened, setIsOpened] = use_controlled_state_default(opened, {
      initial: initialOpen === void 0 ? true : initialOpen,
      fallback: false
    });
    const nodeRef = (0, import_element175.useRef)(null);
    const scrollBehavior = (0, import_compose65.useReducedMotion)() ? "auto" : "smooth";
    const handleOnToggle = (event) => {
      event.preventDefault();
      const next2 = !isOpened;
      setIsOpened(next2);
      onToggle(next2);
    };
    const scrollAfterOpenRef = (0, import_element175.useRef)(void 0);
    scrollAfterOpenRef.current = scrollAfterOpen;
    use_update_effect_default(() => {
      if (isOpened && scrollAfterOpenRef.current && nodeRef.current?.scrollIntoView) {
        nodeRef.current.scrollIntoView({
          inline: "nearest",
          block: "nearest",
          behavior: scrollBehavior
        });
      }
    }, [isOpened, scrollBehavior]);
    const classes = clsx_default("components-panel__body", className2, {
      "is-opened": isOpened
    });
    return /* @__PURE__ */ (0, import_jsx_runtime250.jsxs)("div", {
      className: classes,
      ref: (0, import_compose65.useMergeRefs)([nodeRef, ref]),
      children: [/* @__PURE__ */ (0, import_jsx_runtime250.jsx)(PanelBodyTitle, {
        icon,
        isOpened: Boolean(isOpened),
        onClick: handleOnToggle,
        title,
        ...buttonProps
      }), typeof children === "function" ? children({
        opened: Boolean(isOpened)
      }) : isOpened && children]
    });
  }
  var PanelBodyTitle = (0, import_element175.forwardRef)(({
    isOpened,
    icon,
    title,
    ...props
  }, ref) => {
    if (!title) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime250.jsx)("h2", {
      className: "components-panel__body-title",
      children: /* @__PURE__ */ (0, import_jsx_runtime250.jsxs)(button_default, {
        __next40pxDefaultSize: true,
        className: "components-panel__body-toggle",
        "aria-expanded": isOpened,
        ref,
        ...props,
        children: [/* @__PURE__ */ (0, import_jsx_runtime250.jsx)("span", {
          "aria-hidden": "true",
          children: /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(icon_default3, {
            className: "components-panel__arrow",
            icon: isOpened ? chevron_up_default : chevron_down_default
          })
        }), title, icon && /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(icon_default3, {
          icon,
          className: "components-panel__icon",
          size: 20
        })]
      })
    });
  });
  var PanelBody = (0, import_element175.forwardRef)(UnforwardedPanelBody);
  PanelBody.displayName = "PanelBody";
  var body_default = PanelBody;

  // packages/components/build-module/panel/row.mjs
  var import_element176 = __toESM(require_element(), 1);
  var import_jsx_runtime251 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedPanelRow({
    className: className2,
    children
  }, ref) {
    return /* @__PURE__ */ (0, import_jsx_runtime251.jsx)("div", {
      className: clsx_default("components-panel__row", className2),
      ref,
      children
    });
  }
  var PanelRow = (0, import_element176.forwardRef)(UnforwardedPanelRow);
  PanelRow.displayName = "PanelRow";
  var row_default = PanelRow;

  // packages/components/build-module/placeholder/index.mjs
  var import_compose66 = __toESM(require_compose(), 1);
  var import_primitives34 = __toESM(require_primitives(), 1);
  var import_element177 = __toESM(require_element(), 1);
  var import_a11y9 = __toESM(require_a11y(), 1);
  var import_jsx_runtime252 = __toESM(require_jsx_runtime(), 1);
  var PlaceholderIllustration = /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_primitives34.SVG, {
    className: "components-placeholder__illustration",
    fill: "none",
    xmlns: "http://www.w3.org/2000/svg",
    viewBox: "0 0 60 60",
    preserveAspectRatio: "none",
    children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_primitives34.Path, {
      vectorEffect: "non-scaling-stroke",
      d: "M60 60 0 0"
    })
  });
  function Placeholder(props) {
    const {
      icon,
      children,
      label,
      instructions,
      className: className2,
      notices,
      preview,
      isColumnLayout,
      withIllustration,
      ...additionalProps
    } = props;
    const [resizeListener, {
      width
    }] = (0, import_compose66.useResizeObserver)();
    let modifierClassNames;
    if (typeof width === "number") {
      modifierClassNames = {
        "is-large": width >= 480,
        "is-medium": width >= 160 && width < 480,
        "is-small": width < 160
      };
    }
    const classes = clsx_default("components-placeholder", className2, modifierClassNames, withIllustration ? "has-illustration" : null);
    const fieldsetClasses = clsx_default("components-placeholder__fieldset", {
      "is-column-layout": isColumnLayout
    });
    (0, import_element177.useEffect)(() => {
      if (instructions) {
        (0, import_a11y9.speak)(instructions);
      }
    }, [instructions]);
    return /* @__PURE__ */ (0, import_jsx_runtime252.jsxs)("div", {
      ...additionalProps,
      className: classes,
      children: [withIllustration ? PlaceholderIllustration : null, resizeListener, notices, preview && /* @__PURE__ */ (0, import_jsx_runtime252.jsx)("div", {
        className: "components-placeholder__preview",
        children: preview
      }), /* @__PURE__ */ (0, import_jsx_runtime252.jsxs)("div", {
        className: "components-placeholder__label",
        children: [/* @__PURE__ */ (0, import_jsx_runtime252.jsx)(icon_default3, {
          icon
        }), label]
      }), !!instructions && /* @__PURE__ */ (0, import_jsx_runtime252.jsx)("div", {
        className: "components-placeholder__instructions",
        children: instructions
      }), /* @__PURE__ */ (0, import_jsx_runtime252.jsx)("div", {
        className: fieldsetClasses,
        children
      })]
    });
  }
  var placeholder_default = Placeholder;

  // packages/components/build-module/progress-bar/index.mjs
  var import_i18n71 = __toESM(require_i18n(), 1);
  var import_element178 = __toESM(require_element(), 1);

  // packages/components/build-module/progress-bar/styles.mjs
  var import_i18n70 = __toESM(require_i18n(), 1);
  function _EMOTION_STRINGIFIED_CSS_ERROR__37() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  function animateProgressBar(isRtl = false) {
    const animationDirection = isRtl ? "right" : "left";
    return keyframes2({
      "0%": {
        [animationDirection]: "-50%"
      },
      "100%": {
        [animationDirection]: "100%"
      }
    });
  }
  var INDETERMINATE_TRACK_WIDTH = 50;
  var Track2 = /* @__PURE__ */ createStyled("div", false ? {
    target: "e15u147w2"
  } : {
    target: "e15u147w2",
    label: "Track"
  })("position:relative;overflow:hidden;height:", config_values_default.borderWidthFocus, ";background-color:color-mix(\n		in srgb,\n		", COLORS.theme.foreground, ",\n		transparent 90%\n	);border-radius:", config_values_default.radiusFull, ";outline:2px solid transparent;outline-offset:2px;:where( & ){width:160px;}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnQytCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcywga2V5ZnJhbWVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIFdvcmRQcmVzcyBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgaXNSVEwgfSBmcm9tICdAd29yZHByZXNzL2kxOG4nO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcblxuZnVuY3Rpb24gYW5pbWF0ZVByb2dyZXNzQmFyKCBpc1J0bCA9IGZhbHNlICkge1xuXHRjb25zdCBhbmltYXRpb25EaXJlY3Rpb24gPSBpc1J0bCA/ICdyaWdodCcgOiAnbGVmdCc7XG5cblx0cmV0dXJuIGtleWZyYW1lcygge1xuXHRcdCcwJSc6IHtcblx0XHRcdFsgYW5pbWF0aW9uRGlyZWN0aW9uIF06ICctNTAlJyxcblx0XHR9LFxuXHRcdCcxMDAlJzoge1xuXHRcdFx0WyBhbmltYXRpb25EaXJlY3Rpb24gXTogJzEwMCUnLFxuXHRcdH0sXG5cdH0gKTtcbn1cblxuLy8gV2lkdGggb2YgdGhlIGluZGljYXRvciBmb3IgdGhlIGluZGV0ZXJtaW5hdGUgcHJvZ3Jlc3MgYmFyXG5leHBvcnQgY29uc3QgSU5ERVRFUk1JTkFURV9UUkFDS19XSURUSCA9IDUwO1xuXG5leHBvcnQgY29uc3QgVHJhY2sgPSBzdHlsZWQuZGl2YFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdG92ZXJmbG93OiBoaWRkZW47XG5cdGhlaWdodDogJHsgQ09ORklHLmJvcmRlcldpZHRoRm9jdXMgfTtcblx0LyogVGV4dCBjb2xvciBhdCAxMCUgb3BhY2l0eSAqL1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiBjb2xvci1taXgoXG5cdFx0aW4gc3JnYixcblx0XHQkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9LFxuXHRcdHRyYW5zcGFyZW50IDkwJVxuXHQpO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXG5cdC8vIFdpbmRvd3MgaGlnaCBjb250cmFzdCBtb2RlLlxuXHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdG91dGxpbmUtb2Zmc2V0OiAycHg7XG5cblx0OndoZXJlKCAmICkge1xuXHRcdHdpZHRoOiAxNjBweDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEluZGljYXRvciA9IHN0eWxlZC5kaXY8IHtcblx0aXNJbmRldGVybWluYXRlOiBib29sZWFuO1xufSA+YFxuXHRkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHRoZWlnaHQ6IDEwMCU7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNGdWxsIH07XG5cdC8qIFRleHQgY29sb3IgYXQgOTAlIG9wYWNpdHkgKi9cblx0YmFja2dyb3VuZC1jb2xvcjogY29sb3ItbWl4KFxuXHRcdGluIHNyZ2IsXG5cdFx0JHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfSxcblx0XHR0cmFuc3BhcmVudCAxMCVcblx0KTtcblxuXHQvLyBXaW5kb3dzIGhpZ2ggY29udHJhc3QgbW9kZS5cblx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRvdXRsaW5lLW9mZnNldDogLTJweDtcblxuXHQkeyAoIHsgaXNJbmRldGVybWluYXRlIH0gKSA9PlxuXHRcdGlzSW5kZXRlcm1pbmF0ZVxuXHRcdFx0PyBjc3MoIHtcblx0XHRcdFx0XHRhbmltYXRpb25EdXJhdGlvbjogJzEuNXMnLFxuXHRcdFx0XHRcdGFuaW1hdGlvblRpbWluZ0Z1bmN0aW9uOiAnZWFzZS1pbi1vdXQnLFxuXHRcdFx0XHRcdGFuaW1hdGlvbkl0ZXJhdGlvbkNvdW50OiAnaW5maW5pdGUnLFxuXHRcdFx0XHRcdGFuaW1hdGlvbk5hbWU6IGFuaW1hdGVQcm9ncmVzc0JhciggaXNSVEwoKSApLFxuXHRcdFx0XHRcdHdpZHRoOiBgJHsgSU5ERVRFUk1JTkFURV9UUkFDS19XSURUSCB9JWAsXG5cdFx0XHQgIH0gKVxuXHRcdFx0OiBjc3MoIHtcblx0XHRcdFx0XHR3aWR0aDogJ3ZhcigtLWluZGljYXRvci13aWR0aCknLFxuXHRcdFx0XHRcdHRyYW5zaXRpb246ICd3aWR0aCAwLjRzIGVhc2UtaW4tb3V0Jyxcblx0XHRcdCAgfSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgUHJvZ3Jlc3NFbGVtZW50ID0gc3R5bGVkLnByb2dyZXNzYFxuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRvcDogMDtcblx0bGVmdDogMDtcblx0b3BhY2l0eTogMDtcblx0d2lkdGg6IDEwMCU7XG5cdGhlaWdodDogMTAwJTtcbmA7XG4iXX0= */"));
  var _ref9 = false ? {
    name: "152sa26",
    styles: "width:var(--indicator-width);transition:width 0.4s ease-in-out"
  } : {
    name: "1ox6xu8-Indicator",
    styles: "width:var(--indicator-width);transition:width 0.4s ease-in-out;label:Indicator;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpRksiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzLCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogV29yZFByZXNzIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBpc1JUTCB9IGZyb20gJ0B3b3JkcHJlc3MvaTE4bic7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IENPTE9SUywgQ09ORklHIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG5mdW5jdGlvbiBhbmltYXRlUHJvZ3Jlc3NCYXIoIGlzUnRsID0gZmFsc2UgKSB7XG5cdGNvbnN0IGFuaW1hdGlvbkRpcmVjdGlvbiA9IGlzUnRsID8gJ3JpZ2h0JyA6ICdsZWZ0JztcblxuXHRyZXR1cm4ga2V5ZnJhbWVzKCB7XG5cdFx0JzAlJzoge1xuXHRcdFx0WyBhbmltYXRpb25EaXJlY3Rpb24gXTogJy01MCUnLFxuXHRcdH0sXG5cdFx0JzEwMCUnOiB7XG5cdFx0XHRbIGFuaW1hdGlvbkRpcmVjdGlvbiBdOiAnMTAwJScsXG5cdFx0fSxcblx0fSApO1xufVxuXG4vLyBXaWR0aCBvZiB0aGUgaW5kaWNhdG9yIGZvciB0aGUgaW5kZXRlcm1pbmF0ZSBwcm9ncmVzcyBiYXJcbmV4cG9ydCBjb25zdCBJTkRFVEVSTUlOQVRFX1RSQUNLX1dJRFRIID0gNTA7XG5cbmV4cG9ydCBjb25zdCBUcmFjayA9IHN0eWxlZC5kaXZgXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0b3ZlcmZsb3c6IGhpZGRlbjtcblx0aGVpZ2h0OiAkeyBDT05GSUcuYm9yZGVyV2lkdGhGb2N1cyB9O1xuXHQvKiBUZXh0IGNvbG9yIGF0IDEwJSBvcGFjaXR5ICovXG5cdGJhY2tncm91bmQtY29sb3I6IGNvbG9yLW1peChcblx0XHRpbiBzcmdiLFxuXHRcdCR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH0sXG5cdFx0dHJhbnNwYXJlbnQgOTAlXG5cdCk7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNGdWxsIH07XG5cblx0Ly8gV2luZG93cyBoaWdoIGNvbnRyYXN0IG1vZGUuXG5cdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0b3V0bGluZS1vZmZzZXQ6IDJweDtcblxuXHQ6d2hlcmUoICYgKSB7XG5cdFx0d2lkdGg6IDE2MHB4O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yID0gc3R5bGVkLmRpdjwge1xuXHRpc0luZGV0ZXJtaW5hdGU6IGJvb2xlYW47XG59ID5gXG5cdGRpc3BsYXk6IGlubGluZS1ibG9jaztcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdGhlaWdodDogMTAwJTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0LyogVGV4dCBjb2xvciBhdCA5MCUgb3BhY2l0eSAqL1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiBjb2xvci1taXgoXG5cdFx0aW4gc3JnYixcblx0XHQkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9LFxuXHRcdHRyYW5zcGFyZW50IDEwJVxuXHQpO1xuXG5cdC8vIFdpbmRvd3MgaGlnaCBjb250cmFzdCBtb2RlLlxuXHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdG91dGxpbmUtb2Zmc2V0OiAtMnB4O1xuXG5cdCR7ICggeyBpc0luZGV0ZXJtaW5hdGUgfSApID0+XG5cdFx0aXNJbmRldGVybWluYXRlXG5cdFx0XHQ/IGNzcygge1xuXHRcdFx0XHRcdGFuaW1hdGlvbkR1cmF0aW9uOiAnMS41cycsXG5cdFx0XHRcdFx0YW5pbWF0aW9uVGltaW5nRnVuY3Rpb246ICdlYXNlLWluLW91dCcsXG5cdFx0XHRcdFx0YW5pbWF0aW9uSXRlcmF0aW9uQ291bnQ6ICdpbmZpbml0ZScsXG5cdFx0XHRcdFx0YW5pbWF0aW9uTmFtZTogYW5pbWF0ZVByb2dyZXNzQmFyKCBpc1JUTCgpICksXG5cdFx0XHRcdFx0d2lkdGg6IGAkeyBJTkRFVEVSTUlOQVRFX1RSQUNLX1dJRFRIIH0lYCxcblx0XHRcdCAgfSApXG5cdFx0XHQ6IGNzcygge1xuXHRcdFx0XHRcdHdpZHRoOiAndmFyKC0taW5kaWNhdG9yLXdpZHRoKScsXG5cdFx0XHRcdFx0dHJhbnNpdGlvbjogJ3dpZHRoIDAuNHMgZWFzZS1pbi1vdXQnLFxuXHRcdFx0ICB9ICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBQcm9ncmVzc0VsZW1lbnQgPSBzdHlsZWQucHJvZ3Jlc3NgXG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHRsZWZ0OiAwO1xuXHRvcGFjaXR5OiAwO1xuXHR3aWR0aDogMTAwJTtcblx0aGVpZ2h0OiAxMDAlO1xuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__37
  };
  var Indicator = /* @__PURE__ */ createStyled("div", false ? {
    target: "e15u147w1"
  } : {
    target: "e15u147w1",
    label: "Indicator"
  })("display:inline-block;position:absolute;top:0;height:100%;border-radius:", config_values_default.radiusFull, ";background-color:color-mix(\n		in srgb,\n		", COLORS.theme.foreground, ",\n		transparent 10%\n	);outline:2px solid transparent;outline-offset:-2px;", ({
    isIndeterminate
  }) => isIndeterminate ? /* @__PURE__ */ css({
    animationDuration: "1.5s",
    animationTimingFunction: "ease-in-out",
    animationIterationCount: "infinite",
    animationName: animateProgressBar((0, import_i18n70.isRTL)()),
    width: `${INDETERMINATE_TRACK_WIDTH}%`
  }, false ? "" : ";label:Indicator;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEwRUsiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzLCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogV29yZFByZXNzIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBpc1JUTCB9IGZyb20gJ0B3b3JkcHJlc3MvaTE4bic7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IENPTE9SUywgQ09ORklHIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG5mdW5jdGlvbiBhbmltYXRlUHJvZ3Jlc3NCYXIoIGlzUnRsID0gZmFsc2UgKSB7XG5cdGNvbnN0IGFuaW1hdGlvbkRpcmVjdGlvbiA9IGlzUnRsID8gJ3JpZ2h0JyA6ICdsZWZ0JztcblxuXHRyZXR1cm4ga2V5ZnJhbWVzKCB7XG5cdFx0JzAlJzoge1xuXHRcdFx0WyBhbmltYXRpb25EaXJlY3Rpb24gXTogJy01MCUnLFxuXHRcdH0sXG5cdFx0JzEwMCUnOiB7XG5cdFx0XHRbIGFuaW1hdGlvbkRpcmVjdGlvbiBdOiAnMTAwJScsXG5cdFx0fSxcblx0fSApO1xufVxuXG4vLyBXaWR0aCBvZiB0aGUgaW5kaWNhdG9yIGZvciB0aGUgaW5kZXRlcm1pbmF0ZSBwcm9ncmVzcyBiYXJcbmV4cG9ydCBjb25zdCBJTkRFVEVSTUlOQVRFX1RSQUNLX1dJRFRIID0gNTA7XG5cbmV4cG9ydCBjb25zdCBUcmFjayA9IHN0eWxlZC5kaXZgXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0b3ZlcmZsb3c6IGhpZGRlbjtcblx0aGVpZ2h0OiAkeyBDT05GSUcuYm9yZGVyV2lkdGhGb2N1cyB9O1xuXHQvKiBUZXh0IGNvbG9yIGF0IDEwJSBvcGFjaXR5ICovXG5cdGJhY2tncm91bmQtY29sb3I6IGNvbG9yLW1peChcblx0XHRpbiBzcmdiLFxuXHRcdCR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH0sXG5cdFx0dHJhbnNwYXJlbnQgOTAlXG5cdCk7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNGdWxsIH07XG5cblx0Ly8gV2luZG93cyBoaWdoIGNvbnRyYXN0IG1vZGUuXG5cdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0b3V0bGluZS1vZmZzZXQ6IDJweDtcblxuXHQ6d2hlcmUoICYgKSB7XG5cdFx0d2lkdGg6IDE2MHB4O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yID0gc3R5bGVkLmRpdjwge1xuXHRpc0luZGV0ZXJtaW5hdGU6IGJvb2xlYW47XG59ID5gXG5cdGRpc3BsYXk6IGlubGluZS1ibG9jaztcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdGhlaWdodDogMTAwJTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0LyogVGV4dCBjb2xvciBhdCA5MCUgb3BhY2l0eSAqL1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiBjb2xvci1taXgoXG5cdFx0aW4gc3JnYixcblx0XHQkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9LFxuXHRcdHRyYW5zcGFyZW50IDEwJVxuXHQpO1xuXG5cdC8vIFdpbmRvd3MgaGlnaCBjb250cmFzdCBtb2RlLlxuXHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdG91dGxpbmUtb2Zmc2V0OiAtMnB4O1xuXG5cdCR7ICggeyBpc0luZGV0ZXJtaW5hdGUgfSApID0+XG5cdFx0aXNJbmRldGVybWluYXRlXG5cdFx0XHQ/IGNzcygge1xuXHRcdFx0XHRcdGFuaW1hdGlvbkR1cmF0aW9uOiAnMS41cycsXG5cdFx0XHRcdFx0YW5pbWF0aW9uVGltaW5nRnVuY3Rpb246ICdlYXNlLWluLW91dCcsXG5cdFx0XHRcdFx0YW5pbWF0aW9uSXRlcmF0aW9uQ291bnQ6ICdpbmZpbml0ZScsXG5cdFx0XHRcdFx0YW5pbWF0aW9uTmFtZTogYW5pbWF0ZVByb2dyZXNzQmFyKCBpc1JUTCgpICksXG5cdFx0XHRcdFx0d2lkdGg6IGAkeyBJTkRFVEVSTUlOQVRFX1RSQUNLX1dJRFRIIH0lYCxcblx0XHRcdCAgfSApXG5cdFx0XHQ6IGNzcygge1xuXHRcdFx0XHRcdHdpZHRoOiAndmFyKC0taW5kaWNhdG9yLXdpZHRoKScsXG5cdFx0XHRcdFx0dHJhbnNpdGlvbjogJ3dpZHRoIDAuNHMgZWFzZS1pbi1vdXQnLFxuXHRcdFx0ICB9ICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBQcm9ncmVzc0VsZW1lbnQgPSBzdHlsZWQucHJvZ3Jlc3NgXG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHRsZWZ0OiAwO1xuXHRvcGFjaXR5OiAwO1xuXHR3aWR0aDogMTAwJTtcblx0aGVpZ2h0OiAxMDAlO1xuYDtcbiJdfQ== */") : _ref9, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1REciLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzLCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogV29yZFByZXNzIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBpc1JUTCB9IGZyb20gJ0B3b3JkcHJlc3MvaTE4bic7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IENPTE9SUywgQ09ORklHIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG5mdW5jdGlvbiBhbmltYXRlUHJvZ3Jlc3NCYXIoIGlzUnRsID0gZmFsc2UgKSB7XG5cdGNvbnN0IGFuaW1hdGlvbkRpcmVjdGlvbiA9IGlzUnRsID8gJ3JpZ2h0JyA6ICdsZWZ0JztcblxuXHRyZXR1cm4ga2V5ZnJhbWVzKCB7XG5cdFx0JzAlJzoge1xuXHRcdFx0WyBhbmltYXRpb25EaXJlY3Rpb24gXTogJy01MCUnLFxuXHRcdH0sXG5cdFx0JzEwMCUnOiB7XG5cdFx0XHRbIGFuaW1hdGlvbkRpcmVjdGlvbiBdOiAnMTAwJScsXG5cdFx0fSxcblx0fSApO1xufVxuXG4vLyBXaWR0aCBvZiB0aGUgaW5kaWNhdG9yIGZvciB0aGUgaW5kZXRlcm1pbmF0ZSBwcm9ncmVzcyBiYXJcbmV4cG9ydCBjb25zdCBJTkRFVEVSTUlOQVRFX1RSQUNLX1dJRFRIID0gNTA7XG5cbmV4cG9ydCBjb25zdCBUcmFjayA9IHN0eWxlZC5kaXZgXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0b3ZlcmZsb3c6IGhpZGRlbjtcblx0aGVpZ2h0OiAkeyBDT05GSUcuYm9yZGVyV2lkdGhGb2N1cyB9O1xuXHQvKiBUZXh0IGNvbG9yIGF0IDEwJSBvcGFjaXR5ICovXG5cdGJhY2tncm91bmQtY29sb3I6IGNvbG9yLW1peChcblx0XHRpbiBzcmdiLFxuXHRcdCR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH0sXG5cdFx0dHJhbnNwYXJlbnQgOTAlXG5cdCk7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNGdWxsIH07XG5cblx0Ly8gV2luZG93cyBoaWdoIGNvbnRyYXN0IG1vZGUuXG5cdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0b3V0bGluZS1vZmZzZXQ6IDJweDtcblxuXHQ6d2hlcmUoICYgKSB7XG5cdFx0d2lkdGg6IDE2MHB4O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yID0gc3R5bGVkLmRpdjwge1xuXHRpc0luZGV0ZXJtaW5hdGU6IGJvb2xlYW47XG59ID5gXG5cdGRpc3BsYXk6IGlubGluZS1ibG9jaztcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdGhlaWdodDogMTAwJTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Z1bGwgfTtcblx0LyogVGV4dCBjb2xvciBhdCA5MCUgb3BhY2l0eSAqL1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiBjb2xvci1taXgoXG5cdFx0aW4gc3JnYixcblx0XHQkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9LFxuXHRcdHRyYW5zcGFyZW50IDEwJVxuXHQpO1xuXG5cdC8vIFdpbmRvd3MgaGlnaCBjb250cmFzdCBtb2RlLlxuXHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdG91dGxpbmUtb2Zmc2V0OiAtMnB4O1xuXG5cdCR7ICggeyBpc0luZGV0ZXJtaW5hdGUgfSApID0+XG5cdFx0aXNJbmRldGVybWluYXRlXG5cdFx0XHQ/IGNzcygge1xuXHRcdFx0XHRcdGFuaW1hdGlvbkR1cmF0aW9uOiAnMS41cycsXG5cdFx0XHRcdFx0YW5pbWF0aW9uVGltaW5nRnVuY3Rpb246ICdlYXNlLWluLW91dCcsXG5cdFx0XHRcdFx0YW5pbWF0aW9uSXRlcmF0aW9uQ291bnQ6ICdpbmZpbml0ZScsXG5cdFx0XHRcdFx0YW5pbWF0aW9uTmFtZTogYW5pbWF0ZVByb2dyZXNzQmFyKCBpc1JUTCgpICksXG5cdFx0XHRcdFx0d2lkdGg6IGAkeyBJTkRFVEVSTUlOQVRFX1RSQUNLX1dJRFRIIH0lYCxcblx0XHRcdCAgfSApXG5cdFx0XHQ6IGNzcygge1xuXHRcdFx0XHRcdHdpZHRoOiAndmFyKC0taW5kaWNhdG9yLXdpZHRoKScsXG5cdFx0XHRcdFx0dHJhbnNpdGlvbjogJ3dpZHRoIDAuNHMgZWFzZS1pbi1vdXQnLFxuXHRcdFx0ICB9ICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBQcm9ncmVzc0VsZW1lbnQgPSBzdHlsZWQucHJvZ3Jlc3NgXG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHRsZWZ0OiAwO1xuXHRvcGFjaXR5OiAwO1xuXHR3aWR0aDogMTAwJTtcblx0aGVpZ2h0OiAxMDAlO1xuYDtcbiJdfQ== */"));
  var ProgressElement = /* @__PURE__ */ createStyled("progress", false ? {
    target: "e15u147w0"
  } : {
    target: "e15u147w0",
    label: "ProgressElement"
  })(false ? {
    name: "11fb690",
    styles: "position:absolute;top:0;left:0;opacity:0;width:100%;height:100%"
  } : {
    name: "11fb690",
    styles: "position:absolute;top:0;left:0;opacity:0;width:100%;height:100%/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1RjhDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcywga2V5ZnJhbWVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIFdvcmRQcmVzcyBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgaXNSVEwgfSBmcm9tICdAd29yZHByZXNzL2kxOG4nO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcblxuZnVuY3Rpb24gYW5pbWF0ZVByb2dyZXNzQmFyKCBpc1J0bCA9IGZhbHNlICkge1xuXHRjb25zdCBhbmltYXRpb25EaXJlY3Rpb24gPSBpc1J0bCA/ICdyaWdodCcgOiAnbGVmdCc7XG5cblx0cmV0dXJuIGtleWZyYW1lcygge1xuXHRcdCcwJSc6IHtcblx0XHRcdFsgYW5pbWF0aW9uRGlyZWN0aW9uIF06ICctNTAlJyxcblx0XHR9LFxuXHRcdCcxMDAlJzoge1xuXHRcdFx0WyBhbmltYXRpb25EaXJlY3Rpb24gXTogJzEwMCUnLFxuXHRcdH0sXG5cdH0gKTtcbn1cblxuLy8gV2lkdGggb2YgdGhlIGluZGljYXRvciBmb3IgdGhlIGluZGV0ZXJtaW5hdGUgcHJvZ3Jlc3MgYmFyXG5leHBvcnQgY29uc3QgSU5ERVRFUk1JTkFURV9UUkFDS19XSURUSCA9IDUwO1xuXG5leHBvcnQgY29uc3QgVHJhY2sgPSBzdHlsZWQuZGl2YFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdG92ZXJmbG93OiBoaWRkZW47XG5cdGhlaWdodDogJHsgQ09ORklHLmJvcmRlcldpZHRoRm9jdXMgfTtcblx0LyogVGV4dCBjb2xvciBhdCAxMCUgb3BhY2l0eSAqL1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiBjb2xvci1taXgoXG5cdFx0aW4gc3JnYixcblx0XHQkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9LFxuXHRcdHRyYW5zcGFyZW50IDkwJVxuXHQpO1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzRnVsbCB9O1xuXG5cdC8vIFdpbmRvd3MgaGlnaCBjb250cmFzdCBtb2RlLlxuXHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdG91dGxpbmUtb2Zmc2V0OiAycHg7XG5cblx0OndoZXJlKCAmICkge1xuXHRcdHdpZHRoOiAxNjBweDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEluZGljYXRvciA9IHN0eWxlZC5kaXY8IHtcblx0aXNJbmRldGVybWluYXRlOiBib29sZWFuO1xufSA+YFxuXHRkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHRoZWlnaHQ6IDEwMCU7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNGdWxsIH07XG5cdC8qIFRleHQgY29sb3IgYXQgOTAlIG9wYWNpdHkgKi9cblx0YmFja2dyb3VuZC1jb2xvcjogY29sb3ItbWl4KFxuXHRcdGluIHNyZ2IsXG5cdFx0JHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfSxcblx0XHR0cmFuc3BhcmVudCAxMCVcblx0KTtcblxuXHQvLyBXaW5kb3dzIGhpZ2ggY29udHJhc3QgbW9kZS5cblx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRvdXRsaW5lLW9mZnNldDogLTJweDtcblxuXHQkeyAoIHsgaXNJbmRldGVybWluYXRlIH0gKSA9PlxuXHRcdGlzSW5kZXRlcm1pbmF0ZVxuXHRcdFx0PyBjc3MoIHtcblx0XHRcdFx0XHRhbmltYXRpb25EdXJhdGlvbjogJzEuNXMnLFxuXHRcdFx0XHRcdGFuaW1hdGlvblRpbWluZ0Z1bmN0aW9uOiAnZWFzZS1pbi1vdXQnLFxuXHRcdFx0XHRcdGFuaW1hdGlvbkl0ZXJhdGlvbkNvdW50OiAnaW5maW5pdGUnLFxuXHRcdFx0XHRcdGFuaW1hdGlvbk5hbWU6IGFuaW1hdGVQcm9ncmVzc0JhciggaXNSVEwoKSApLFxuXHRcdFx0XHRcdHdpZHRoOiBgJHsgSU5ERVRFUk1JTkFURV9UUkFDS19XSURUSCB9JWAsXG5cdFx0XHQgIH0gKVxuXHRcdFx0OiBjc3MoIHtcblx0XHRcdFx0XHR3aWR0aDogJ3ZhcigtLWluZGljYXRvci13aWR0aCknLFxuXHRcdFx0XHRcdHRyYW5zaXRpb246ICd3aWR0aCAwLjRzIGVhc2UtaW4tb3V0Jyxcblx0XHRcdCAgfSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgUHJvZ3Jlc3NFbGVtZW50ID0gc3R5bGVkLnByb2dyZXNzYFxuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRvcDogMDtcblx0bGVmdDogMDtcblx0b3BhY2l0eTogMDtcblx0d2lkdGg6IDEwMCU7XG5cdGhlaWdodDogMTAwJTtcbmA7XG4iXX0= */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__37
  });

  // packages/components/build-module/progress-bar/index.mjs
  var import_jsx_runtime253 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedProgressBar(props, ref) {
    const {
      className: className2,
      value,
      ...progressProps
    } = props;
    const isIndeterminate = !Number.isFinite(value);
    return /* @__PURE__ */ (0, import_jsx_runtime253.jsxs)(Track2, {
      className: className2,
      children: [/* @__PURE__ */ (0, import_jsx_runtime253.jsx)(Indicator, {
        style: {
          "--indicator-width": !isIndeterminate ? `${value}%` : void 0
        },
        isIndeterminate
      }), /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(ProgressElement, {
        max: 100,
        value,
        "aria-label": (0, import_i18n71.__)("Loading \u2026"),
        ref,
        ...progressProps
      })]
    });
  }
  var ProgressBar = (0, import_element178.forwardRef)(UnforwardedProgressBar);
  ProgressBar.displayName = "ProgressBar";
  var progress_bar_default = ProgressBar;

  // packages/components/build-module/query-controls/index.mjs
  var import_i18n72 = __toESM(require_i18n(), 1);

  // packages/components/build-module/query-controls/terms.mjs
  var ensureParentsAreDefined = (terms) => {
    return terms.every((term) => term.parent !== null);
  };
  function buildTermsTree(flatTerms) {
    const flatTermsWithParentAndChildren = flatTerms.map((term) => ({
      children: [],
      parent: null,
      ...term,
      id: String(term.id)
    }));
    if (!ensureParentsAreDefined(flatTermsWithParentAndChildren)) {
      return flatTermsWithParentAndChildren;
    }
    const termsByParent = flatTermsWithParentAndChildren.reduce((acc, term) => {
      const {
        parent
      } = term;
      if (!acc[parent]) {
        acc[parent] = [];
      }
      acc[parent].push(term);
      return acc;
    }, {});
    const fillWithChildren = (terms) => {
      return terms.map((term) => {
        const children = termsByParent[term.id];
        return {
          ...term,
          children: children && children.length ? fillWithChildren(children) : []
        };
      });
    };
    return fillWithChildren(termsByParent["0"] || []);
  }

  // packages/components/build-module/tree-select/index.mjs
  var import_element179 = __toESM(require_element(), 1);
  var import_html_entities = __toESM(require_html_entities(), 1);
  var import_jsx_runtime254 = __toESM(require_jsx_runtime(), 1);
  function getSelectOptions(tree, level = 0) {
    return tree.flatMap((treeNode) => [{
      value: treeNode.id,
      label: "\xA0".repeat(level * 3) + (0, import_html_entities.decodeEntities)(treeNode.name)
    }, ...getSelectOptions(treeNode.children || [], level + 1)]);
  }
  function TreeSelect(props) {
    const {
      __nextHasNoMarginBottom: _2,
      // Prevent passing to internal component
      label,
      noOptionLabel,
      onChange,
      selectedId,
      tree = [],
      ...restProps
    } = useDeprecated36pxDefaultSizeProp(props);
    const options2 = (0, import_element179.useMemo)(() => {
      return [noOptionLabel && {
        value: "",
        label: noOptionLabel
      }, ...getSelectOptions(tree)].filter((option) => !!option);
    }, [noOptionLabel, tree]);
    maybeWarnDeprecated36pxSize({
      componentName: "TreeSelect",
      size: restProps.size,
      __next40pxDefaultSize: restProps.__next40pxDefaultSize
    });
    return (
      // Disable reason: the parent component already takes case of the `__next40pxDefaultSize` prop.
      // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop
      /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(SelectControl, {
        __shouldNotWarnDeprecated36pxSize: true,
        label,
        options: options2,
        onChange,
        value: selectedId,
        ...restProps
      })
    );
  }
  var tree_select_default = TreeSelect;

  // packages/components/build-module/query-controls/author-select.mjs
  var import_jsx_runtime255 = __toESM(require_jsx_runtime(), 1);
  function AuthorSelect({
    __next40pxDefaultSize,
    label,
    noOptionLabel,
    authorList,
    selectedAuthorId,
    onChange: onChangeProp
  }) {
    if (!authorList) {
      return null;
    }
    const termsTree = buildTermsTree(authorList);
    return /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(tree_select_default, {
      label,
      noOptionLabel,
      onChange: onChangeProp,
      tree: termsTree,
      selectedId: selectedAuthorId !== void 0 ? String(selectedAuthorId) : void 0,
      __next40pxDefaultSize
    });
  }

  // packages/components/build-module/query-controls/category-select.mjs
  var import_element180 = __toESM(require_element(), 1);
  var import_jsx_runtime256 = __toESM(require_jsx_runtime(), 1);
  function CategorySelect({
    __next40pxDefaultSize,
    label,
    noOptionLabel,
    categoriesList,
    selectedCategoryId,
    onChange: onChangeProp,
    ...props
  }) {
    const termsTree = (0, import_element180.useMemo)(() => {
      return buildTermsTree(categoriesList);
    }, [categoriesList]);
    return /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(tree_select_default, {
      label,
      noOptionLabel,
      onChange: onChangeProp,
      tree: termsTree,
      selectedId: selectedCategoryId !== void 0 ? String(selectedCategoryId) : void 0,
      ...props,
      __next40pxDefaultSize
    });
  }

  // packages/components/build-module/query-controls/index.mjs
  var import_jsx_runtime257 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_MIN_ITEMS = 1;
  var DEFAULT_MAX_ITEMS = 100;
  var MAX_CATEGORIES_SUGGESTIONS = 20;
  function isSingleCategorySelection(props) {
    return "categoriesList" in props;
  }
  function isMultipleCategorySelection(props) {
    return "categorySuggestions" in props;
  }
  var defaultOrderByOptions = [{
    label: (0, import_i18n72.__)("Newest to oldest"),
    value: "date/desc"
  }, {
    label: (0, import_i18n72.__)("Oldest to newest"),
    value: "date/asc"
  }, {
    /* translators: Label for ordering posts by title in ascending order. */
    label: (0, import_i18n72.__)("A \u2192 Z"),
    value: "title/asc"
  }, {
    /* translators: Label for ordering posts by title in descending order. */
    label: (0, import_i18n72.__)("Z \u2192 A"),
    value: "title/desc"
  }];
  function QueryControls({
    authorList,
    selectedAuthorId,
    numberOfItems,
    order,
    orderBy,
    orderByOptions = defaultOrderByOptions,
    maxItems = DEFAULT_MAX_ITEMS,
    minItems = DEFAULT_MIN_ITEMS,
    onAuthorChange,
    onNumberOfItemsChange,
    onOrderChange,
    onOrderByChange,
    // Props for single OR multiple category selection are not destructured here,
    // but instead are destructured inline where necessary.
    ...props
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(component_default18, {
      spacing: "4",
      className: "components-query-controls",
      children: [onOrderChange && onOrderByChange && /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(select_control_default, {
        __next40pxDefaultSize: true,
        label: (0, import_i18n72.__)("Order by"),
        value: orderBy === void 0 || order === void 0 ? void 0 : `${orderBy}/${order}`,
        options: orderByOptions,
        onChange: (value) => {
          if (typeof value !== "string") {
            return;
          }
          const [newOrderBy, newOrder] = value.split("/");
          if (newOrder !== order) {
            onOrderChange(newOrder);
          }
          if (newOrderBy !== orderBy) {
            onOrderByChange(newOrderBy);
          }
        }
      }, "query-controls-order-select"), isSingleCategorySelection(props) && props.categoriesList && props.onCategoryChange && /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(CategorySelect, {
        __next40pxDefaultSize: true,
        categoriesList: props.categoriesList,
        label: (0, import_i18n72.__)("Category"),
        noOptionLabel: (0, import_i18n72._x)("All", "categories"),
        selectedCategoryId: props.selectedCategoryId,
        onChange: props.onCategoryChange
      }, "query-controls-category-select"), isMultipleCategorySelection(props) && props.categorySuggestions && props.onCategoryChange && /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(form_token_field_default, {
        __next40pxDefaultSize: true,
        label: (0, import_i18n72.__)("Categories"),
        value: props.selectedCategories && props.selectedCategories.map((item2) => ({
          id: item2.id,
          // Keeping the fallback to `item.value` for legacy reasons,
          // even if items of `selectedCategories` should not have a
          // `value` property.
          // @ts-expect-error
          value: item2.name || item2.value
        })),
        suggestions: Object.keys(props.categorySuggestions),
        onChange: props.onCategoryChange,
        maxSuggestions: MAX_CATEGORIES_SUGGESTIONS
      }, "query-controls-categories-select"), onAuthorChange && /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(AuthorSelect, {
        __next40pxDefaultSize: true,
        authorList,
        label: (0, import_i18n72.__)("Author"),
        noOptionLabel: (0, import_i18n72._x)("All", "authors"),
        selectedAuthorId,
        onChange: onAuthorChange
      }, "query-controls-author-select"), onNumberOfItemsChange && /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(range_control_default, {
        __next40pxDefaultSize: true,
        label: (0, import_i18n72.__)("Number of items"),
        value: numberOfItems,
        onChange: onNumberOfItemsChange,
        min: minItems,
        max: maxItems,
        required: true
      }, "query-controls-range-control")]
    });
  }
  var query_controls_default = QueryControls;

  // packages/components/build-module/radio-group/radio.mjs
  var import_element182 = __toESM(require_element(), 1);

  // packages/components/build-module/radio-group/context.mjs
  var import_element181 = __toESM(require_element(), 1);
  var RadioGroupContext = (0, import_element181.createContext)({
    store: void 0,
    disabled: void 0
  });
  RadioGroupContext.displayName = "RadioGroupContext";

  // packages/components/build-module/radio-group/radio.mjs
  var import_jsx_runtime258 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedRadio({
    value,
    children,
    ...props
  }, ref) {
    const {
      store,
      disabled
    } = (0, import_element182.useContext)(RadioGroupContext);
    const selectedValue = useStoreState(store, "value");
    const isChecked = selectedValue !== void 0 && selectedValue === value;
    maybeWarnDeprecated36pxSize({
      componentName: "Radio",
      size: void 0,
      __next40pxDefaultSize: props.__next40pxDefaultSize
    });
    return /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(Radio, {
      disabled,
      store,
      ref,
      value,
      render: (
        // Disable: the parent component already takes care of the `__next40pxDefaultSize` prop.
        // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop
        /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(button_default, {
          variant: isChecked ? "primary" : "secondary",
          ...props
        })
      ),
      children: children || value
    });
  }
  var Radio22 = (0, import_element182.forwardRef)(UnforwardedRadio);
  Radio22.displayName = "Radio";
  var radio_default = Radio22;

  // packages/components/build-module/radio-group/index.mjs
  var import_deprecated24 = __toESM(require_deprecated(), 1);
  var import_element183 = __toESM(require_element(), 1);
  var import_i18n73 = __toESM(require_i18n(), 1);
  var import_jsx_runtime259 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedRadioGroup({
    label,
    checked,
    defaultChecked,
    disabled,
    onChange,
    children,
    ...props
  }, ref) {
    const radioStore = useRadioStore({
      value: checked,
      defaultValue: defaultChecked,
      setValue: (newValue) => {
        onChange?.(newValue ?? void 0);
      },
      rtl: (0, import_i18n73.isRTL)()
    });
    const contextValue = (0, import_element183.useMemo)(() => ({
      store: radioStore,
      disabled
    }), [radioStore, disabled]);
    (0, import_deprecated24.default)("wp.components.__experimentalRadioGroup", {
      alternative: "wp.components.RadioControl or wp.components.__experimentalToggleGroupControl",
      since: "6.8"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(RadioGroupContext.Provider, {
      value: contextValue,
      children: /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(RadioGroup, {
        store: radioStore,
        render: /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(button_group_default, {
          __shouldNotWarnDeprecated: true,
          children
        }),
        "aria-label": label,
        ref,
        ...props
      })
    });
  }
  var RadioGroup22 = (0, import_element183.forwardRef)(UnforwardedRadioGroup);
  RadioGroup22.displayName = "RadioGroup";
  var radio_group_default = RadioGroup22;

  // packages/components/build-module/radio-control/index.mjs
  var import_compose67 = __toESM(require_compose(), 1);
  var import_jsx_runtime260 = __toESM(require_jsx_runtime(), 1);
  function generateOptionDescriptionId(radioGroupId, index2) {
    return `${radioGroupId}-${index2}-option-description`;
  }
  function generateOptionId(radioGroupId, index2) {
    return `${radioGroupId}-${index2}`;
  }
  function generateHelpId(radioGroupId) {
    return `${radioGroupId}__help`;
  }
  function RadioControl(props) {
    const {
      label,
      className: className2,
      selected,
      help,
      onChange,
      onClick,
      hideLabelFromVision,
      options: options2 = [],
      id: preferredId,
      ...additionalProps
    } = props;
    const id3 = (0, import_compose67.useInstanceId)(RadioControl, "inspector-radio-control", preferredId);
    const onChangeValue = (event) => onChange(event.target.value);
    if (!options2?.length) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime260.jsxs)("fieldset", {
      id: id3,
      className: clsx_default(className2, "components-radio-control"),
      "aria-describedby": !!help ? generateHelpId(id3) : void 0,
      children: [hideLabelFromVision ? /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(component_default2, {
        as: "legend",
        children: label
      }) : /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(base_control_default.VisualLabel, {
        as: "legend",
        children: label
      }), /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(component_default18, {
        spacing: 3,
        className: clsx_default("components-radio-control__group-wrapper", {
          "has-help": !!help
        }),
        children: options2.map((option, index2) => /* @__PURE__ */ (0, import_jsx_runtime260.jsxs)("div", {
          className: "components-radio-control__option",
          children: [/* @__PURE__ */ (0, import_jsx_runtime260.jsx)("input", {
            id: generateOptionId(id3, index2),
            className: "components-radio-control__input",
            type: "radio",
            name: id3,
            value: option.value,
            onChange: onChangeValue,
            checked: option.value === selected,
            "aria-describedby": !!option.description ? generateOptionDescriptionId(id3, index2) : void 0,
            onClick: (event) => {
              event.currentTarget.focus();
              onClick?.(event);
            },
            ...additionalProps
          }), /* @__PURE__ */ (0, import_jsx_runtime260.jsx)("label", {
            className: "components-radio-control__label",
            htmlFor: generateOptionId(id3, index2),
            children: option.label
          }), !!option.description ? /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(StyledHelp, {
            id: generateOptionDescriptionId(id3, index2),
            className: "components-radio-control__option-description",
            children: option.description
          }) : null]
        }, generateOptionId(id3, index2)))
      }), !!help && /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(StyledHelp, {
        id: generateHelpId(id3),
        className: "components-base-control__help",
        children: help
      })]
    });
  }
  var radio_control_default = RadioControl;

  // packages/components/build-module/resizable-box/index.mjs
  var import_element187 = __toESM(require_element(), 1);

  // node_modules/re-resizable/lib/index.js
  var React13 = __toESM(require_react());

  // node_modules/re-resizable/lib/resizer.js
  var React12 = __toESM(require_react());
  var __extends = /* @__PURE__ */ (function() {
    var extendStatics = function(d3, b3) {
      extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d4, b4) {
        d4.__proto__ = b4;
      } || function(d4, b4) {
        for (var p3 in b4) if (b4.hasOwnProperty(p3)) d4[p3] = b4[p3];
      };
      return extendStatics(d3, b3);
    };
    return function(d3, b3) {
      extendStatics(d3, b3);
      function __67() {
        this.constructor = d3;
      }
      d3.prototype = b3 === null ? Object.create(b3) : (__67.prototype = b3.prototype, new __67());
    };
  })();
  var __assign2 = function() {
    __assign2 = Object.assign || function(t4) {
      for (var s3, i3 = 1, n3 = arguments.length; i3 < n3; i3++) {
        s3 = arguments[i3];
        for (var p3 in s3) if (Object.prototype.hasOwnProperty.call(s3, p3))
          t4[p3] = s3[p3];
      }
      return t4;
    };
    return __assign2.apply(this, arguments);
  };
  var styles2 = {
    top: {
      width: "100%",
      height: "10px",
      top: "-5px",
      left: "0px",
      cursor: "row-resize"
    },
    right: {
      width: "10px",
      height: "100%",
      top: "0px",
      right: "-5px",
      cursor: "col-resize"
    },
    bottom: {
      width: "100%",
      height: "10px",
      bottom: "-5px",
      left: "0px",
      cursor: "row-resize"
    },
    left: {
      width: "10px",
      height: "100%",
      top: "0px",
      left: "-5px",
      cursor: "col-resize"
    },
    topRight: {
      width: "20px",
      height: "20px",
      position: "absolute",
      right: "-10px",
      top: "-10px",
      cursor: "ne-resize"
    },
    bottomRight: {
      width: "20px",
      height: "20px",
      position: "absolute",
      right: "-10px",
      bottom: "-10px",
      cursor: "se-resize"
    },
    bottomLeft: {
      width: "20px",
      height: "20px",
      position: "absolute",
      left: "-10px",
      bottom: "-10px",
      cursor: "sw-resize"
    },
    topLeft: {
      width: "20px",
      height: "20px",
      position: "absolute",
      left: "-10px",
      top: "-10px",
      cursor: "nw-resize"
    }
  };
  var Resizer = (
    /** @class */
    (function(_super) {
      __extends(Resizer2, _super);
      function Resizer2() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.onMouseDown = function(e3) {
          _this.props.onResizeStart(e3, _this.props.direction);
        };
        _this.onTouchStart = function(e3) {
          _this.props.onResizeStart(e3, _this.props.direction);
        };
        return _this;
      }
      Resizer2.prototype.render = function() {
        return React12.createElement("div", { className: this.props.className || "", style: __assign2(__assign2({ position: "absolute", userSelect: "none" }, styles2[this.props.direction]), this.props.replaceStyles || {}), onMouseDown: this.onMouseDown, onTouchStart: this.onTouchStart }, this.props.children);
      };
      return Resizer2;
    })(React12.PureComponent)
  );

  // node_modules/re-resizable/lib/index.js
  var import_fast_memoize = __toESM(require_src());
  var __extends2 = /* @__PURE__ */ (function() {
    var extendStatics = function(d3, b3) {
      extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d4, b4) {
        d4.__proto__ = b4;
      } || function(d4, b4) {
        for (var p3 in b4) if (b4.hasOwnProperty(p3)) d4[p3] = b4[p3];
      };
      return extendStatics(d3, b3);
    };
    return function(d3, b3) {
      extendStatics(d3, b3);
      function __67() {
        this.constructor = d3;
      }
      d3.prototype = b3 === null ? Object.create(b3) : (__67.prototype = b3.prototype, new __67());
    };
  })();
  var __assign3 = function() {
    __assign3 = Object.assign || function(t4) {
      for (var s3, i3 = 1, n3 = arguments.length; i3 < n3; i3++) {
        s3 = arguments[i3];
        for (var p3 in s3) if (Object.prototype.hasOwnProperty.call(s3, p3))
          t4[p3] = s3[p3];
      }
      return t4;
    };
    return __assign3.apply(this, arguments);
  };
  var DEFAULT_SIZE = {
    width: "auto",
    height: "auto"
  };
  var clamp5 = (0, import_fast_memoize.default)(function(n3, min3, max3) {
    return Math.max(Math.min(n3, max3), min3);
  });
  var snap = (0, import_fast_memoize.default)(function(n3, size3) {
    return Math.round(n3 / size3) * size3;
  });
  var hasDirection = (0, import_fast_memoize.default)(function(dir, target) {
    return new RegExp(dir, "i").test(target);
  });
  var isTouchEvent = function(event) {
    return Boolean(event.touches && event.touches.length);
  };
  var isMouseEvent = function(event) {
    return Boolean((event.clientX || event.clientX === 0) && (event.clientY || event.clientY === 0));
  };
  var findClosestSnap = (0, import_fast_memoize.default)(function(n3, snapArray, snapGap) {
    if (snapGap === void 0) {
      snapGap = 0;
    }
    var closestGapIndex = snapArray.reduce(function(prev2, curr, index2) {
      return Math.abs(curr - n3) < Math.abs(snapArray[prev2] - n3) ? index2 : prev2;
    }, 0);
    var gap = Math.abs(snapArray[closestGapIndex] - n3);
    return snapGap === 0 || gap < snapGap ? snapArray[closestGapIndex] : n3;
  });
  var endsWith = (0, import_fast_memoize.default)(function(str, searchStr) {
    return str.substr(str.length - searchStr.length, searchStr.length) === searchStr;
  });
  var getStringSize = (0, import_fast_memoize.default)(function(n3) {
    n3 = n3.toString();
    if (n3 === "auto") {
      return n3;
    }
    if (endsWith(n3, "px")) {
      return n3;
    }
    if (endsWith(n3, "%")) {
      return n3;
    }
    if (endsWith(n3, "vh")) {
      return n3;
    }
    if (endsWith(n3, "vw")) {
      return n3;
    }
    if (endsWith(n3, "vmax")) {
      return n3;
    }
    if (endsWith(n3, "vmin")) {
      return n3;
    }
    return n3 + "px";
  });
  var getPixelSize = function(size3, parentSize, innerWidth, innerHeight) {
    if (size3 && typeof size3 === "string") {
      if (endsWith(size3, "px")) {
        return Number(size3.replace("px", ""));
      }
      if (endsWith(size3, "%")) {
        var ratio = Number(size3.replace("%", "")) / 100;
        return parentSize * ratio;
      }
      if (endsWith(size3, "vw")) {
        var ratio = Number(size3.replace("vw", "")) / 100;
        return innerWidth * ratio;
      }
      if (endsWith(size3, "vh")) {
        var ratio = Number(size3.replace("vh", "")) / 100;
        return innerHeight * ratio;
      }
    }
    return size3;
  };
  var calculateNewMax = (0, import_fast_memoize.default)(function(parentSize, innerWidth, innerHeight, maxWidth, maxHeight, minWidth, minHeight) {
    maxWidth = getPixelSize(maxWidth, parentSize.width, innerWidth, innerHeight);
    maxHeight = getPixelSize(maxHeight, parentSize.height, innerWidth, innerHeight);
    minWidth = getPixelSize(minWidth, parentSize.width, innerWidth, innerHeight);
    minHeight = getPixelSize(minHeight, parentSize.height, innerWidth, innerHeight);
    return {
      maxWidth: typeof maxWidth === "undefined" ? void 0 : Number(maxWidth),
      maxHeight: typeof maxHeight === "undefined" ? void 0 : Number(maxHeight),
      minWidth: typeof minWidth === "undefined" ? void 0 : Number(minWidth),
      minHeight: typeof minHeight === "undefined" ? void 0 : Number(minHeight)
    };
  });
  var definedProps = [
    "as",
    "style",
    "className",
    "grid",
    "snap",
    "bounds",
    "boundsByDirection",
    "size",
    "defaultSize",
    "minWidth",
    "minHeight",
    "maxWidth",
    "maxHeight",
    "lockAspectRatio",
    "lockAspectRatioExtraWidth",
    "lockAspectRatioExtraHeight",
    "enable",
    "handleStyles",
    "handleClasses",
    "handleWrapperStyle",
    "handleWrapperClass",
    "children",
    "onResizeStart",
    "onResize",
    "onResizeStop",
    "handleComponent",
    "scale",
    "resizeRatio",
    "snapGap"
  ];
  var baseClassName = "__resizable_base__";
  var Resizable = (
    /** @class */
    (function(_super) {
      __extends2(Resizable2, _super);
      function Resizable2(props) {
        var _this = _super.call(this, props) || this;
        _this.ratio = 1;
        _this.resizable = null;
        _this.parentLeft = 0;
        _this.parentTop = 0;
        _this.resizableLeft = 0;
        _this.resizableRight = 0;
        _this.resizableTop = 0;
        _this.resizableBottom = 0;
        _this.targetLeft = 0;
        _this.targetTop = 0;
        _this.appendBase = function() {
          if (!_this.resizable || !_this.window) {
            return null;
          }
          var parent = _this.parentNode;
          if (!parent) {
            return null;
          }
          var element = _this.window.document.createElement("div");
          element.style.width = "100%";
          element.style.height = "100%";
          element.style.position = "absolute";
          element.style.transform = "scale(0, 0)";
          element.style.left = "0";
          element.style.flex = "0";
          if (element.classList) {
            element.classList.add(baseClassName);
          } else {
            element.className += baseClassName;
          }
          parent.appendChild(element);
          return element;
        };
        _this.removeBase = function(base) {
          var parent = _this.parentNode;
          if (!parent) {
            return;
          }
          parent.removeChild(base);
        };
        _this.ref = function(c3) {
          if (c3) {
            _this.resizable = c3;
          }
        };
        _this.state = {
          isResizing: false,
          width: typeof (_this.propsSize && _this.propsSize.width) === "undefined" ? "auto" : _this.propsSize && _this.propsSize.width,
          height: typeof (_this.propsSize && _this.propsSize.height) === "undefined" ? "auto" : _this.propsSize && _this.propsSize.height,
          direction: "right",
          original: {
            x: 0,
            y: 0,
            width: 0,
            height: 0
          },
          backgroundStyle: {
            height: "100%",
            width: "100%",
            backgroundColor: "rgba(0,0,0,0)",
            cursor: "auto",
            opacity: 0,
            position: "fixed",
            zIndex: 9999,
            top: "0",
            left: "0",
            bottom: "0",
            right: "0"
          },
          flexBasis: void 0
        };
        _this.onResizeStart = _this.onResizeStart.bind(_this);
        _this.onMouseMove = _this.onMouseMove.bind(_this);
        _this.onMouseUp = _this.onMouseUp.bind(_this);
        return _this;
      }
      Object.defineProperty(Resizable2.prototype, "parentNode", {
        get: function() {
          if (!this.resizable) {
            return null;
          }
          return this.resizable.parentNode;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(Resizable2.prototype, "window", {
        get: function() {
          if (!this.resizable) {
            return null;
          }
          if (!this.resizable.ownerDocument) {
            return null;
          }
          return this.resizable.ownerDocument.defaultView;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(Resizable2.prototype, "propsSize", {
        get: function() {
          return this.props.size || this.props.defaultSize || DEFAULT_SIZE;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(Resizable2.prototype, "size", {
        get: function() {
          var width = 0;
          var height = 0;
          if (this.resizable && this.window) {
            var orgWidth = this.resizable.offsetWidth;
            var orgHeight = this.resizable.offsetHeight;
            var orgPosition = this.resizable.style.position;
            if (orgPosition !== "relative") {
              this.resizable.style.position = "relative";
            }
            width = this.resizable.style.width !== "auto" ? this.resizable.offsetWidth : orgWidth;
            height = this.resizable.style.height !== "auto" ? this.resizable.offsetHeight : orgHeight;
            this.resizable.style.position = orgPosition;
          }
          return { width, height };
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(Resizable2.prototype, "sizeStyle", {
        get: function() {
          var _this = this;
          var size3 = this.props.size;
          var getSize = function(key) {
            if (typeof _this.state[key] === "undefined" || _this.state[key] === "auto") {
              return "auto";
            }
            if (_this.propsSize && _this.propsSize[key] && endsWith(_this.propsSize[key].toString(), "%")) {
              if (endsWith(_this.state[key].toString(), "%")) {
                return _this.state[key].toString();
              }
              var parentSize = _this.getParentSize();
              var value = Number(_this.state[key].toString().replace("px", ""));
              var percent2 = value / parentSize[key] * 100;
              return percent2 + "%";
            }
            return getStringSize(_this.state[key]);
          };
          var width = size3 && typeof size3.width !== "undefined" && !this.state.isResizing ? getStringSize(size3.width) : getSize("width");
          var height = size3 && typeof size3.height !== "undefined" && !this.state.isResizing ? getStringSize(size3.height) : getSize("height");
          return { width, height };
        },
        enumerable: false,
        configurable: true
      });
      Resizable2.prototype.getParentSize = function() {
        if (!this.parentNode) {
          if (!this.window) {
            return { width: 0, height: 0 };
          }
          return { width: this.window.innerWidth, height: this.window.innerHeight };
        }
        var base = this.appendBase();
        if (!base) {
          return { width: 0, height: 0 };
        }
        var wrapChanged = false;
        var wrap = this.parentNode.style.flexWrap;
        if (wrap !== "wrap") {
          wrapChanged = true;
          this.parentNode.style.flexWrap = "wrap";
        }
        base.style.position = "relative";
        base.style.minWidth = "100%";
        var size3 = {
          width: base.offsetWidth,
          height: base.offsetHeight
        };
        if (wrapChanged) {
          this.parentNode.style.flexWrap = wrap;
        }
        this.removeBase(base);
        return size3;
      };
      Resizable2.prototype.bindEvents = function() {
        if (this.window) {
          this.window.addEventListener("mouseup", this.onMouseUp);
          this.window.addEventListener("mousemove", this.onMouseMove);
          this.window.addEventListener("mouseleave", this.onMouseUp);
          this.window.addEventListener("touchmove", this.onMouseMove, {
            capture: true,
            passive: false
          });
          this.window.addEventListener("touchend", this.onMouseUp);
        }
      };
      Resizable2.prototype.unbindEvents = function() {
        if (this.window) {
          this.window.removeEventListener("mouseup", this.onMouseUp);
          this.window.removeEventListener("mousemove", this.onMouseMove);
          this.window.removeEventListener("mouseleave", this.onMouseUp);
          this.window.removeEventListener("touchmove", this.onMouseMove, true);
          this.window.removeEventListener("touchend", this.onMouseUp);
        }
      };
      Resizable2.prototype.componentDidMount = function() {
        if (!this.resizable || !this.window) {
          return;
        }
        var computedStyle = this.window.getComputedStyle(this.resizable);
        this.setState({
          width: this.state.width || this.size.width,
          height: this.state.height || this.size.height,
          flexBasis: computedStyle.flexBasis !== "auto" ? computedStyle.flexBasis : void 0
        });
      };
      Resizable2.prototype.componentWillUnmount = function() {
        if (this.window) {
          this.unbindEvents();
        }
      };
      Resizable2.prototype.createSizeForCssProperty = function(newSize, kind) {
        var propsSize = this.propsSize && this.propsSize[kind];
        return this.state[kind] === "auto" && this.state.original[kind] === newSize && (typeof propsSize === "undefined" || propsSize === "auto") ? "auto" : newSize;
      };
      Resizable2.prototype.calculateNewMaxFromBoundary = function(maxWidth, maxHeight) {
        var boundsByDirection = this.props.boundsByDirection;
        var direction = this.state.direction;
        var widthByDirection = boundsByDirection && hasDirection("left", direction);
        var heightByDirection = boundsByDirection && hasDirection("top", direction);
        var boundWidth;
        var boundHeight;
        if (this.props.bounds === "parent") {
          var parent_1 = this.parentNode;
          if (parent_1) {
            boundWidth = widthByDirection ? this.resizableRight - this.parentLeft : parent_1.offsetWidth + (this.parentLeft - this.resizableLeft);
            boundHeight = heightByDirection ? this.resizableBottom - this.parentTop : parent_1.offsetHeight + (this.parentTop - this.resizableTop);
          }
        } else if (this.props.bounds === "window") {
          if (this.window) {
            boundWidth = widthByDirection ? this.resizableRight : this.window.innerWidth - this.resizableLeft;
            boundHeight = heightByDirection ? this.resizableBottom : this.window.innerHeight - this.resizableTop;
          }
        } else if (this.props.bounds) {
          boundWidth = widthByDirection ? this.resizableRight - this.targetLeft : this.props.bounds.offsetWidth + (this.targetLeft - this.resizableLeft);
          boundHeight = heightByDirection ? this.resizableBottom - this.targetTop : this.props.bounds.offsetHeight + (this.targetTop - this.resizableTop);
        }
        if (boundWidth && Number.isFinite(boundWidth)) {
          maxWidth = maxWidth && maxWidth < boundWidth ? maxWidth : boundWidth;
        }
        if (boundHeight && Number.isFinite(boundHeight)) {
          maxHeight = maxHeight && maxHeight < boundHeight ? maxHeight : boundHeight;
        }
        return { maxWidth, maxHeight };
      };
      Resizable2.prototype.calculateNewSizeFromDirection = function(clientX, clientY) {
        var scale2 = this.props.scale || 1;
        var resizeRatio = this.props.resizeRatio || 1;
        var _a = this.state, direction = _a.direction, original = _a.original;
        var _b = this.props, lockAspectRatio = _b.lockAspectRatio, lockAspectRatioExtraHeight = _b.lockAspectRatioExtraHeight, lockAspectRatioExtraWidth = _b.lockAspectRatioExtraWidth;
        var newWidth = original.width;
        var newHeight = original.height;
        var extraHeight = lockAspectRatioExtraHeight || 0;
        var extraWidth = lockAspectRatioExtraWidth || 0;
        if (hasDirection("right", direction)) {
          newWidth = original.width + (clientX - original.x) * resizeRatio / scale2;
          if (lockAspectRatio) {
            newHeight = (newWidth - extraWidth) / this.ratio + extraHeight;
          }
        }
        if (hasDirection("left", direction)) {
          newWidth = original.width - (clientX - original.x) * resizeRatio / scale2;
          if (lockAspectRatio) {
            newHeight = (newWidth - extraWidth) / this.ratio + extraHeight;
          }
        }
        if (hasDirection("bottom", direction)) {
          newHeight = original.height + (clientY - original.y) * resizeRatio / scale2;
          if (lockAspectRatio) {
            newWidth = (newHeight - extraHeight) * this.ratio + extraWidth;
          }
        }
        if (hasDirection("top", direction)) {
          newHeight = original.height - (clientY - original.y) * resizeRatio / scale2;
          if (lockAspectRatio) {
            newWidth = (newHeight - extraHeight) * this.ratio + extraWidth;
          }
        }
        return { newWidth, newHeight };
      };
      Resizable2.prototype.calculateNewSizeFromAspectRatio = function(newWidth, newHeight, max3, min3) {
        var _a = this.props, lockAspectRatio = _a.lockAspectRatio, lockAspectRatioExtraHeight = _a.lockAspectRatioExtraHeight, lockAspectRatioExtraWidth = _a.lockAspectRatioExtraWidth;
        var computedMinWidth = typeof min3.width === "undefined" ? 10 : min3.width;
        var computedMaxWidth = typeof max3.width === "undefined" || max3.width < 0 ? newWidth : max3.width;
        var computedMinHeight = typeof min3.height === "undefined" ? 10 : min3.height;
        var computedMaxHeight = typeof max3.height === "undefined" || max3.height < 0 ? newHeight : max3.height;
        var extraHeight = lockAspectRatioExtraHeight || 0;
        var extraWidth = lockAspectRatioExtraWidth || 0;
        if (lockAspectRatio) {
          var extraMinWidth = (computedMinHeight - extraHeight) * this.ratio + extraWidth;
          var extraMaxWidth = (computedMaxHeight - extraHeight) * this.ratio + extraWidth;
          var extraMinHeight = (computedMinWidth - extraWidth) / this.ratio + extraHeight;
          var extraMaxHeight = (computedMaxWidth - extraWidth) / this.ratio + extraHeight;
          var lockedMinWidth = Math.max(computedMinWidth, extraMinWidth);
          var lockedMaxWidth = Math.min(computedMaxWidth, extraMaxWidth);
          var lockedMinHeight = Math.max(computedMinHeight, extraMinHeight);
          var lockedMaxHeight = Math.min(computedMaxHeight, extraMaxHeight);
          newWidth = clamp5(newWidth, lockedMinWidth, lockedMaxWidth);
          newHeight = clamp5(newHeight, lockedMinHeight, lockedMaxHeight);
        } else {
          newWidth = clamp5(newWidth, computedMinWidth, computedMaxWidth);
          newHeight = clamp5(newHeight, computedMinHeight, computedMaxHeight);
        }
        return { newWidth, newHeight };
      };
      Resizable2.prototype.setBoundingClientRect = function() {
        if (this.props.bounds === "parent") {
          var parent_2 = this.parentNode;
          if (parent_2) {
            var parentRect = parent_2.getBoundingClientRect();
            this.parentLeft = parentRect.left;
            this.parentTop = parentRect.top;
          }
        }
        if (this.props.bounds && typeof this.props.bounds !== "string") {
          var targetRect = this.props.bounds.getBoundingClientRect();
          this.targetLeft = targetRect.left;
          this.targetTop = targetRect.top;
        }
        if (this.resizable) {
          var _a = this.resizable.getBoundingClientRect(), left = _a.left, top_1 = _a.top, right = _a.right, bottom = _a.bottom;
          this.resizableLeft = left;
          this.resizableRight = right;
          this.resizableTop = top_1;
          this.resizableBottom = bottom;
        }
      };
      Resizable2.prototype.onResizeStart = function(event, direction) {
        if (!this.resizable || !this.window) {
          return;
        }
        var clientX = 0;
        var clientY = 0;
        if (event.nativeEvent && isMouseEvent(event.nativeEvent)) {
          clientX = event.nativeEvent.clientX;
          clientY = event.nativeEvent.clientY;
          if (event.nativeEvent.which === 3) {
            return;
          }
        } else if (event.nativeEvent && isTouchEvent(event.nativeEvent)) {
          clientX = event.nativeEvent.touches[0].clientX;
          clientY = event.nativeEvent.touches[0].clientY;
        }
        if (this.props.onResizeStart) {
          if (this.resizable) {
            var startResize = this.props.onResizeStart(event, direction, this.resizable);
            if (startResize === false) {
              return;
            }
          }
        }
        if (this.props.size) {
          if (typeof this.props.size.height !== "undefined" && this.props.size.height !== this.state.height) {
            this.setState({ height: this.props.size.height });
          }
          if (typeof this.props.size.width !== "undefined" && this.props.size.width !== this.state.width) {
            this.setState({ width: this.props.size.width });
          }
        }
        this.ratio = typeof this.props.lockAspectRatio === "number" ? this.props.lockAspectRatio : this.size.width / this.size.height;
        var flexBasis;
        var computedStyle = this.window.getComputedStyle(this.resizable);
        if (computedStyle.flexBasis !== "auto") {
          var parent_3 = this.parentNode;
          if (parent_3) {
            var dir = this.window.getComputedStyle(parent_3).flexDirection;
            this.flexDir = dir.startsWith("row") ? "row" : "column";
            flexBasis = computedStyle.flexBasis;
          }
        }
        this.setBoundingClientRect();
        this.bindEvents();
        var state = {
          original: {
            x: clientX,
            y: clientY,
            width: this.size.width,
            height: this.size.height
          },
          isResizing: true,
          backgroundStyle: __assign3(__assign3({}, this.state.backgroundStyle), { cursor: this.window.getComputedStyle(event.target).cursor || "auto" }),
          direction,
          flexBasis
        };
        this.setState(state);
      };
      Resizable2.prototype.onMouseMove = function(event) {
        if (!this.state.isResizing || !this.resizable || !this.window) {
          return;
        }
        if (this.window.TouchEvent && isTouchEvent(event)) {
          try {
            event.preventDefault();
            event.stopPropagation();
          } catch (e3) {
          }
        }
        var _a = this.props, maxWidth = _a.maxWidth, maxHeight = _a.maxHeight, minWidth = _a.minWidth, minHeight = _a.minHeight;
        var clientX = isTouchEvent(event) ? event.touches[0].clientX : event.clientX;
        var clientY = isTouchEvent(event) ? event.touches[0].clientY : event.clientY;
        var _b = this.state, direction = _b.direction, original = _b.original, width = _b.width, height = _b.height;
        var parentSize = this.getParentSize();
        var max3 = calculateNewMax(parentSize, this.window.innerWidth, this.window.innerHeight, maxWidth, maxHeight, minWidth, minHeight);
        maxWidth = max3.maxWidth;
        maxHeight = max3.maxHeight;
        minWidth = max3.minWidth;
        minHeight = max3.minHeight;
        var _c = this.calculateNewSizeFromDirection(clientX, clientY), newHeight = _c.newHeight, newWidth = _c.newWidth;
        var boundaryMax = this.calculateNewMaxFromBoundary(maxWidth, maxHeight);
        var newSize = this.calculateNewSizeFromAspectRatio(newWidth, newHeight, { width: boundaryMax.maxWidth, height: boundaryMax.maxHeight }, { width: minWidth, height: minHeight });
        newWidth = newSize.newWidth;
        newHeight = newSize.newHeight;
        if (this.props.grid) {
          var newGridWidth = snap(newWidth, this.props.grid[0]);
          var newGridHeight = snap(newHeight, this.props.grid[1]);
          var gap = this.props.snapGap || 0;
          newWidth = gap === 0 || Math.abs(newGridWidth - newWidth) <= gap ? newGridWidth : newWidth;
          newHeight = gap === 0 || Math.abs(newGridHeight - newHeight) <= gap ? newGridHeight : newHeight;
        }
        if (this.props.snap && this.props.snap.x) {
          newWidth = findClosestSnap(newWidth, this.props.snap.x, this.props.snapGap);
        }
        if (this.props.snap && this.props.snap.y) {
          newHeight = findClosestSnap(newHeight, this.props.snap.y, this.props.snapGap);
        }
        var delta = {
          width: newWidth - original.width,
          height: newHeight - original.height
        };
        if (width && typeof width === "string") {
          if (endsWith(width, "%")) {
            var percent2 = newWidth / parentSize.width * 100;
            newWidth = percent2 + "%";
          } else if (endsWith(width, "vw")) {
            var vw2 = newWidth / this.window.innerWidth * 100;
            newWidth = vw2 + "vw";
          } else if (endsWith(width, "vh")) {
            var vh2 = newWidth / this.window.innerHeight * 100;
            newWidth = vh2 + "vh";
          }
        }
        if (height && typeof height === "string") {
          if (endsWith(height, "%")) {
            var percent2 = newHeight / parentSize.height * 100;
            newHeight = percent2 + "%";
          } else if (endsWith(height, "vw")) {
            var vw2 = newHeight / this.window.innerWidth * 100;
            newHeight = vw2 + "vw";
          } else if (endsWith(height, "vh")) {
            var vh2 = newHeight / this.window.innerHeight * 100;
            newHeight = vh2 + "vh";
          }
        }
        var newState = {
          width: this.createSizeForCssProperty(newWidth, "width"),
          height: this.createSizeForCssProperty(newHeight, "height")
        };
        if (this.flexDir === "row") {
          newState.flexBasis = newState.width;
        } else if (this.flexDir === "column") {
          newState.flexBasis = newState.height;
        }
        this.setState(newState);
        if (this.props.onResize) {
          this.props.onResize(event, direction, this.resizable, delta);
        }
      };
      Resizable2.prototype.onMouseUp = function(event) {
        var _a = this.state, isResizing = _a.isResizing, direction = _a.direction, original = _a.original;
        if (!isResizing || !this.resizable) {
          return;
        }
        var delta = {
          width: this.size.width - original.width,
          height: this.size.height - original.height
        };
        if (this.props.onResizeStop) {
          this.props.onResizeStop(event, direction, this.resizable, delta);
        }
        if (this.props.size) {
          this.setState(this.props.size);
        }
        this.unbindEvents();
        this.setState({
          isResizing: false,
          backgroundStyle: __assign3(__assign3({}, this.state.backgroundStyle), { cursor: "auto" })
        });
      };
      Resizable2.prototype.updateSize = function(size3) {
        this.setState({ width: size3.width, height: size3.height });
      };
      Resizable2.prototype.renderResizer = function() {
        var _this = this;
        var _a = this.props, enable = _a.enable, handleStyles = _a.handleStyles, handleClasses = _a.handleClasses, handleWrapperStyle = _a.handleWrapperStyle, handleWrapperClass = _a.handleWrapperClass, handleComponent = _a.handleComponent;
        if (!enable) {
          return null;
        }
        var resizers = Object.keys(enable).map(function(dir) {
          if (enable[dir] !== false) {
            return React13.createElement(Resizer, { key: dir, direction: dir, onResizeStart: _this.onResizeStart, replaceStyles: handleStyles && handleStyles[dir], className: handleClasses && handleClasses[dir] }, handleComponent && handleComponent[dir] ? handleComponent[dir] : null);
          }
          return null;
        });
        return React13.createElement("div", { className: handleWrapperClass, style: handleWrapperStyle }, resizers);
      };
      Resizable2.prototype.render = function() {
        var _this = this;
        var extendsProps = Object.keys(this.props).reduce(function(acc, key) {
          if (definedProps.indexOf(key) !== -1) {
            return acc;
          }
          acc[key] = _this.props[key];
          return acc;
        }, {});
        var style2 = __assign3(__assign3(__assign3({ position: "relative", userSelect: this.state.isResizing ? "none" : "auto" }, this.props.style), this.sizeStyle), { maxWidth: this.props.maxWidth, maxHeight: this.props.maxHeight, minWidth: this.props.minWidth, minHeight: this.props.minHeight, boxSizing: "border-box", flexShrink: 0 });
        if (this.state.flexBasis) {
          style2.flexBasis = this.state.flexBasis;
        }
        var Wrapper7 = this.props.as || "div";
        return React13.createElement(
          Wrapper7,
          __assign3({ ref: this.ref, style: style2, className: this.props.className }, extendsProps),
          this.state.isResizing && React13.createElement("div", { style: this.state.backgroundStyle }),
          this.props.children,
          this.renderResizer()
        );
      };
      Resizable2.defaultProps = {
        as: "div",
        onResizeStart: function() {
        },
        onResize: function() {
        },
        onResizeStop: function() {
        },
        enable: {
          top: true,
          right: true,
          bottom: true,
          left: true,
          topRight: true,
          bottomRight: true,
          bottomLeft: true,
          topLeft: true
        },
        style: {},
        grid: [1, 1],
        lockAspectRatio: false,
        lockAspectRatioExtraWidth: 0,
        lockAspectRatioExtraHeight: 0,
        scale: 1,
        resizeRatio: 1,
        snapGap: 0
      };
      return Resizable2;
    })(React13.PureComponent)
  );

  // packages/components/build-module/resizable-box/resize-tooltip/index.mjs
  var import_element186 = __toESM(require_element(), 1);

  // packages/components/build-module/resizable-box/resize-tooltip/label.mjs
  var import_element185 = __toESM(require_element(), 1);
  var import_i18n74 = __toESM(require_i18n(), 1);

  // packages/components/build-module/resizable-box/resize-tooltip/utils.mjs
  var import_element184 = __toESM(require_element(), 1);
  var import_compose68 = __toESM(require_compose(), 1);
  var noop23 = () => {
  };
  var POSITIONS = {
    bottom: "bottom",
    corner: "corner"
  };
  function useResizeLabel({
    axis,
    fadeTimeout = 180,
    onResize = noop23,
    position: position2 = POSITIONS.bottom,
    showPx = false
  }) {
    const [resizeListener, sizes] = (0, import_compose68.useResizeObserver)();
    const isAxisControlled = !!axis;
    const [moveX, setMoveX] = (0, import_element184.useState)(false);
    const [moveY, setMoveY] = (0, import_element184.useState)(false);
    const {
      width,
      height
    } = sizes;
    const heightRef = (0, import_element184.useRef)(height);
    const widthRef = (0, import_element184.useRef)(width);
    const moveTimeoutRef = (0, import_element184.useRef)(void 0);
    const debounceUnsetMoveXY = (0, import_element184.useCallback)(() => {
      const unsetMoveXY = () => {
        if (isAxisControlled) {
          return;
        }
        setMoveX(false);
        setMoveY(false);
      };
      if (moveTimeoutRef.current) {
        window.clearTimeout(moveTimeoutRef.current);
      }
      moveTimeoutRef.current = window.setTimeout(unsetMoveXY, fadeTimeout);
    }, [fadeTimeout, isAxisControlled]);
    (0, import_element184.useEffect)(() => {
      const isRendered = width !== null || height !== null;
      if (!isRendered) {
        return;
      }
      const didWidthChange = width !== widthRef.current;
      const didHeightChange = height !== heightRef.current;
      if (!didWidthChange && !didHeightChange) {
        return;
      }
      if (width && !widthRef.current && height && !heightRef.current) {
        widthRef.current = width;
        heightRef.current = height;
        return;
      }
      if (didWidthChange) {
        setMoveX(true);
        widthRef.current = width;
      }
      if (didHeightChange) {
        setMoveY(true);
        heightRef.current = height;
      }
      onResize({
        width,
        height
      });
      debounceUnsetMoveXY();
    }, [width, height, onResize, debounceUnsetMoveXY]);
    const label = getSizeLabel({
      axis,
      height,
      moveX,
      moveY,
      position: position2,
      showPx,
      width
    });
    return {
      label,
      resizeListener
    };
  }
  function getSizeLabel({
    axis,
    height,
    moveX = false,
    moveY = false,
    position: position2 = POSITIONS.bottom,
    showPx = false,
    width
  }) {
    if (!moveX && !moveY) {
      return void 0;
    }
    if (position2 === POSITIONS.corner) {
      return `${width} x ${height}`;
    }
    const labelUnit = showPx ? " px" : "";
    if (axis) {
      if (axis === "x" && moveX) {
        return `${width}${labelUnit}`;
      }
      if (axis === "y" && moveY) {
        return `${height}${labelUnit}`;
      }
    }
    if (moveX && moveY) {
      return `${width} x ${height}`;
    }
    if (moveX) {
      return `${width}${labelUnit}`;
    }
    if (moveY) {
      return `${height}${labelUnit}`;
    }
    return void 0;
  }

  // packages/components/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__38() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var Root4 = /* @__PURE__ */ createStyled("div", false ? {
    target: "e1wq7y4k3"
  } : {
    target: "e1wq7y4k3",
    label: "Root"
  })(false ? {
    name: "1cd7zoc",
    styles: "bottom:0;box-sizing:border-box;left:0;pointer-events:none;position:absolute;right:0;top:0"
  } : {
    name: "1cd7zoc",
    styles: "bottom:0;box-sizing:border-box;left:0;pointer-events:none;position:absolute;right:0;top:0/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJlc2l6ZS10b29sdGlwLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFXOEIiLCJmaWxlIjoicmVzaXplLXRvb2x0aXAuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vLi4vLi4vdGV4dCc7XG5pbXBvcnQgeyBmb250LCBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uLy4uLy4uL3V0aWxzJztcblxuZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQuZGl2YFxuXHRib3R0b206IDA7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGxlZnQ6IDA7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHJpZ2h0OiAwO1xuXHR0b3A6IDA7XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHRpcFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRkaXNwbGF5OiBpbmxpbmUtZmxleDtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cdG9wYWNpdHk6IDA7XG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuXHR0cmFuc2l0aW9uOiBvcGFjaXR5IDEyMG1zIGxpbmVhcjtcbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sdGlwID0gc3R5bGVkLmRpdmBcblx0YmFja2dyb3VuZDogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGZvbnQtZmFtaWx5OiAkeyBmb250KCAnZGVmYXVsdC5mb250RmFtaWx5JyApIH07XG5cdGZvbnQtc2l6ZTogMTJweDtcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kSW52ZXJ0ZWQgfTtcblx0cGFkZGluZzogNHB4IDhweDtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuYDtcblxuLy8gVE9ETzogUmVzb2x2ZSBuZWVkIHRvIHVzZSAmJiYgdG8gaW5jcmVhc2Ugc3BlY2lmaWNpdHlcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9Xb3JkUHJlc3MvZ3V0ZW5iZXJnL2lzc3Vlcy8xODQ4M1xuXG5leHBvcnQgY29uc3QgTGFiZWxUZXh0ID0gc3R5bGVkKCBUZXh0IClgXG5cdCYmJiB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kSW52ZXJ0ZWQgfTtcblx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRmb250LXNpemU6IDEzcHg7XG5cdFx0bGluZS1oZWlnaHQ6IDEuNDtcblx0XHR3aGl0ZS1zcGFjZTogbm93cmFwO1xuXHR9XG5gO1xuIl19 */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__38
  });
  var TooltipWrapper = /* @__PURE__ */ createStyled("div", false ? {
    target: "e1wq7y4k2"
  } : {
    target: "e1wq7y4k2",
    label: "TooltipWrapper"
  })(false ? {
    name: "ajymcs",
    styles: "align-items:center;box-sizing:border-box;display:inline-flex;justify-content:center;opacity:0;pointer-events:none;transition:opacity 120ms linear"
  } : {
    name: "ajymcs",
    styles: "align-items:center;box-sizing:border-box;display:inline-flex;justify-content:center;opacity:0;pointer-events:none;transition:opacity 120ms linear/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJlc2l6ZS10b29sdGlwLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQndDIiwiZmlsZSI6InJlc2l6ZS10b29sdGlwLnN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgVGV4dCB9IGZyb20gJy4uLy4uLy4uL3RleHQnO1xuaW1wb3J0IHsgZm9udCwgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi8uLi8uLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBSb290ID0gc3R5bGVkLmRpdmBcblx0Ym90dG9tOiAwO1xuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRsZWZ0OiAwO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRyaWdodDogMDtcblx0dG9wOiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IFRvb2x0aXBXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogaW5saW5lLWZsZXg7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRvcGFjaXR5OiAwO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0dHJhbnNpdGlvbjogb3BhY2l0eSAxMjBtcyBsaW5lYXI7XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHRpcCA9IHN0eWxlZC5kaXZgXG5cdGJhY2tncm91bmQ6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRmb250LWZhbWlseTogJHsgZm9udCggJ2RlZmF1bHQuZm9udEZhbWlseScgKSB9O1xuXHRmb250LXNpemU6IDEycHg7XG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZEludmVydGVkIH07XG5cdHBhZGRpbmc6IDRweCA4cHg7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcbmA7XG5cbi8vIFRPRE86IFJlc29sdmUgbmVlZCB0byB1c2UgJiYmIHRvIGluY3JlYXNlIHNwZWNpZmljaXR5XG4vLyBodHRwczovL2dpdGh1Yi5jb20vV29yZFByZXNzL2d1dGVuYmVyZy9pc3N1ZXMvMTg0ODNcblxuZXhwb3J0IGNvbnN0IExhYmVsVGV4dCA9IHN0eWxlZCggVGV4dCApYFxuXHQmJiYge1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZEludmVydGVkIH07XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0Zm9udC1zaXplOiAxM3B4O1xuXHRcdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cdFx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcblx0fVxuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__38
  });
  var Tooltip4 = /* @__PURE__ */ createStyled("div", false ? {
    target: "e1wq7y4k1"
  } : {
    target: "e1wq7y4k1",
    label: "Tooltip"
  })("background:", COLORS.theme.foreground, ";border-radius:", config_values_default.radiusSmall, ";box-sizing:border-box;font-family:", font("default.fontFamily"), ";font-size:12px;color:", COLORS.theme.foregroundInverted, ";padding:4px 8px;position:relative;" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJlc2l6ZS10b29sdGlwLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUErQmlDIiwiZmlsZSI6InJlc2l6ZS10b29sdGlwLnN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgVGV4dCB9IGZyb20gJy4uLy4uLy4uL3RleHQnO1xuaW1wb3J0IHsgZm9udCwgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi8uLi8uLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBSb290ID0gc3R5bGVkLmRpdmBcblx0Ym90dG9tOiAwO1xuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRsZWZ0OiAwO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRyaWdodDogMDtcblx0dG9wOiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IFRvb2x0aXBXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogaW5saW5lLWZsZXg7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRvcGFjaXR5OiAwO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0dHJhbnNpdGlvbjogb3BhY2l0eSAxMjBtcyBsaW5lYXI7XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHRpcCA9IHN0eWxlZC5kaXZgXG5cdGJhY2tncm91bmQ6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRmb250LWZhbWlseTogJHsgZm9udCggJ2RlZmF1bHQuZm9udEZhbWlseScgKSB9O1xuXHRmb250LXNpemU6IDEycHg7XG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZEludmVydGVkIH07XG5cdHBhZGRpbmc6IDRweCA4cHg7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcbmA7XG5cbi8vIFRPRE86IFJlc29sdmUgbmVlZCB0byB1c2UgJiYmIHRvIGluY3JlYXNlIHNwZWNpZmljaXR5XG4vLyBodHRwczovL2dpdGh1Yi5jb20vV29yZFByZXNzL2d1dGVuYmVyZy9pc3N1ZXMvMTg0ODNcblxuZXhwb3J0IGNvbnN0IExhYmVsVGV4dCA9IHN0eWxlZCggVGV4dCApYFxuXHQmJiYge1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZEludmVydGVkIH07XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0Zm9udC1zaXplOiAxM3B4O1xuXHRcdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cdFx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcblx0fVxuYDtcbiJdfQ== */"));
  var LabelText = /* @__PURE__ */ createStyled(component_default8, false ? {
    target: "e1wq7y4k0"
  } : {
    target: "e1wq7y4k0",
    label: "LabelText"
  })("&&&{color:", COLORS.theme.foregroundInverted, ";display:block;font-size:13px;line-height:1.4;white-space:nowrap;}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJlc2l6ZS10b29sdGlwLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE2Q3VDIiwiZmlsZSI6InJlc2l6ZS10b29sdGlwLnN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgVGV4dCB9IGZyb20gJy4uLy4uLy4uL3RleHQnO1xuaW1wb3J0IHsgZm9udCwgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi8uLi8uLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBSb290ID0gc3R5bGVkLmRpdmBcblx0Ym90dG9tOiAwO1xuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRsZWZ0OiAwO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHRyaWdodDogMDtcblx0dG9wOiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IFRvb2x0aXBXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0ZGlzcGxheTogaW5saW5lLWZsZXg7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRvcGFjaXR5OiAwO1xuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0dHJhbnNpdGlvbjogb3BhY2l0eSAxMjBtcyBsaW5lYXI7XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHRpcCA9IHN0eWxlZC5kaXZgXG5cdGJhY2tncm91bmQ6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRmb250LWZhbWlseTogJHsgZm9udCggJ2RlZmF1bHQuZm9udEZhbWlseScgKSB9O1xuXHRmb250LXNpemU6IDEycHg7XG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZEludmVydGVkIH07XG5cdHBhZGRpbmc6IDRweCA4cHg7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcbmA7XG5cbi8vIFRPRE86IFJlc29sdmUgbmVlZCB0byB1c2UgJiYmIHRvIGluY3JlYXNlIHNwZWNpZmljaXR5XG4vLyBodHRwczovL2dpdGh1Yi5jb20vV29yZFByZXNzL2d1dGVuYmVyZy9pc3N1ZXMvMTg0ODNcblxuZXhwb3J0IGNvbnN0IExhYmVsVGV4dCA9IHN0eWxlZCggVGV4dCApYFxuXHQmJiYge1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZEludmVydGVkIH07XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0Zm9udC1zaXplOiAxM3B4O1xuXHRcdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cdFx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcblx0fVxuYDtcbiJdfQ== */"));

  // packages/components/build-module/resizable-box/resize-tooltip/label.mjs
  var import_jsx_runtime261 = __toESM(require_jsx_runtime(), 1);
  var CORNER_OFFSET = 4;
  var CURSOR_OFFSET_TOP = CORNER_OFFSET * 2.5;
  function Label3({
    label,
    position: position2 = POSITIONS.corner,
    zIndex = 1e3,
    ...props
  }, ref) {
    const showLabel = !!label;
    const isBottom = position2 === POSITIONS.bottom;
    const isCorner = position2 === POSITIONS.corner;
    if (!showLabel) {
      return null;
    }
    let style2 = {
      opacity: showLabel ? 1 : void 0,
      zIndex
    };
    let labelStyle = {};
    if (isBottom) {
      style2 = {
        ...style2,
        position: "absolute",
        bottom: CURSOR_OFFSET_TOP * -1,
        left: "50%",
        transform: "translate(-50%, 0)"
      };
      labelStyle = {
        transform: `translate(0, 100%)`
      };
    }
    if (isCorner) {
      style2 = {
        ...style2,
        position: "absolute",
        top: CORNER_OFFSET,
        right: (0, import_i18n74.isRTL)() ? void 0 : CORNER_OFFSET,
        left: (0, import_i18n74.isRTL)() ? CORNER_OFFSET : void 0
      };
    }
    return /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(TooltipWrapper, {
      "aria-hidden": "true",
      className: "components-resizable-tooltip__tooltip-wrapper",
      ref,
      style: style2,
      ...props,
      children: /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(Tooltip4, {
        className: "components-resizable-tooltip__tooltip",
        style: labelStyle,
        children: /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(LabelText, {
          as: "span",
          children: label
        })
      })
    });
  }
  var ForwardedComponent3 = (0, import_element185.forwardRef)(Label3);
  var label_default = ForwardedComponent3;

  // packages/components/build-module/resizable-box/resize-tooltip/index.mjs
  var import_jsx_runtime262 = __toESM(require_jsx_runtime(), 1);
  var noop24 = () => {
  };
  function ResizeTooltip({
    axis,
    className: className2,
    fadeTimeout = 180,
    isVisible: isVisible2 = true,
    labelRef,
    onResize = noop24,
    position: position2 = POSITIONS.bottom,
    showPx = true,
    zIndex = 1e3,
    ...props
  }, ref) {
    const {
      label,
      resizeListener
    } = useResizeLabel({
      axis,
      fadeTimeout,
      onResize,
      showPx,
      position: position2
    });
    if (!isVisible2) {
      return null;
    }
    const classes = clsx_default("components-resize-tooltip", className2);
    return /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)(Root4, {
      "aria-hidden": "true",
      className: classes,
      ref,
      ...props,
      children: [resizeListener, /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(label_default, {
        "aria-hidden": props["aria-hidden"],
        label,
        position: position2,
        ref: labelRef,
        zIndex
      })]
    });
  }
  var ForwardedComponent4 = (0, import_element186.forwardRef)(ResizeTooltip);
  var resize_tooltip_default = ForwardedComponent4;

  // packages/components/build-module/resizable-box/index.mjs
  var import_jsx_runtime263 = __toESM(require_jsx_runtime(), 1);
  var HANDLE_CLASS_NAME = "components-resizable-box__handle";
  var SIDE_HANDLE_CLASS_NAME = "components-resizable-box__side-handle";
  var CORNER_HANDLE_CLASS_NAME = "components-resizable-box__corner-handle";
  var HANDLE_CLASSES = {
    top: clsx_default(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, "components-resizable-box__handle-top"),
    right: clsx_default(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, "components-resizable-box__handle-right"),
    bottom: clsx_default(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, "components-resizable-box__handle-bottom"),
    left: clsx_default(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, "components-resizable-box__handle-left"),
    topLeft: clsx_default(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, "components-resizable-box__handle-top", "components-resizable-box__handle-left"),
    topRight: clsx_default(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, "components-resizable-box__handle-top", "components-resizable-box__handle-right"),
    bottomRight: clsx_default(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, "components-resizable-box__handle-bottom", "components-resizable-box__handle-right"),
    bottomLeft: clsx_default(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, "components-resizable-box__handle-bottom", "components-resizable-box__handle-left")
  };
  var HANDLE_STYLES_OVERRIDES = {
    width: void 0,
    height: void 0,
    top: void 0,
    right: void 0,
    bottom: void 0,
    left: void 0
  };
  var HANDLE_STYLES = {
    top: HANDLE_STYLES_OVERRIDES,
    right: HANDLE_STYLES_OVERRIDES,
    bottom: HANDLE_STYLES_OVERRIDES,
    left: HANDLE_STYLES_OVERRIDES,
    topLeft: HANDLE_STYLES_OVERRIDES,
    topRight: HANDLE_STYLES_OVERRIDES,
    bottomRight: HANDLE_STYLES_OVERRIDES,
    bottomLeft: HANDLE_STYLES_OVERRIDES
  };
  function UnforwardedResizableBox({
    className: className2,
    children,
    showHandle = true,
    __experimentalShowTooltip: showTooltip = false,
    __experimentalTooltipProps: tooltipProps = {},
    ...props
  }, ref) {
    return /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(Resizable, {
      className: clsx_default("components-resizable-box__container", showHandle && "has-show-handle", className2),
      handleComponent: Object.fromEntries(Object.keys(HANDLE_CLASSES).map((key) => [key, /* @__PURE__ */ (0, import_jsx_runtime263.jsx)("div", {
        tabIndex: -1
      }, key)])),
      handleClasses: HANDLE_CLASSES,
      handleStyles: HANDLE_STYLES,
      ref,
      ...props,
      children: [children, showTooltip && /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(resize_tooltip_default, {
        ...tooltipProps
      })]
    });
  }
  var ResizableBox = (0, import_element187.forwardRef)(UnforwardedResizableBox);
  ResizableBox.displayName = "ResizableBox";
  var resizable_box_default = ResizableBox;

  // packages/components/build-module/responsive-wrapper/index.mjs
  var import_element188 = __toESM(require_element(), 1);
  var import_jsx_runtime264 = __toESM(require_jsx_runtime(), 1);
  function ResponsiveWrapper({
    naturalWidth,
    naturalHeight,
    children,
    isInline = false
  }) {
    if (import_element188.Children.count(children) !== 1) {
      return null;
    }
    const TagName59 = isInline ? "span" : "div";
    let aspectRatio2;
    if (naturalWidth && naturalHeight) {
      aspectRatio2 = `${naturalWidth} / ${naturalHeight}`;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(TagName59, {
      className: "components-responsive-wrapper",
      children: /* @__PURE__ */ (0, import_jsx_runtime264.jsx)("div", {
        children: (0, import_element188.cloneElement)(children, {
          className: clsx_default("components-responsive-wrapper__content", children.props.className),
          style: {
            ...children.props.style,
            aspectRatio: aspectRatio2
          }
        })
      })
    });
  }
  var responsive_wrapper_default = ResponsiveWrapper;

  // packages/components/build-module/sandbox/index.mjs
  var import_element189 = __toESM(require_element(), 1);
  var import_compose69 = __toESM(require_compose(), 1);
  var import_jsx_runtime265 = __toESM(require_jsx_runtime(), 1);
  var observeAndResizeJS = function() {
    const {
      MutationObserver: MutationObserver2
    } = window;
    if (!MutationObserver2 || !document.body || !window.parent) {
      return;
    }
    function sendResize() {
      const clientBoundingRect = document.body.getBoundingClientRect();
      window.parent.postMessage({
        action: "resize",
        width: clientBoundingRect.width,
        height: clientBoundingRect.height
      }, "*");
    }
    const observer = new MutationObserver2(sendResize);
    observer.observe(document.body, {
      attributes: true,
      attributeOldValue: false,
      characterData: true,
      characterDataOldValue: false,
      childList: true,
      subtree: true
    });
    window.addEventListener("load", sendResize, true);
    function removeViewportStyles(ruleOrNode) {
      if (ruleOrNode.style) {
        ["width", "height", "minHeight", "maxHeight"].forEach(function(style2) {
          if (/^\\d+(vw|vh|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)$/.test(ruleOrNode.style[style2])) {
            ruleOrNode.style[style2] = "";
          }
        });
      }
    }
    Array.prototype.forEach.call(document.querySelectorAll("[style]"), removeViewportStyles);
    Array.prototype.forEach.call(document.styleSheets, function(stylesheet) {
      Array.prototype.forEach.call(stylesheet.cssRules || stylesheet.rules, removeViewportStyles);
    });
    document.body.style.position = "absolute";
    document.body.style.width = "100%";
    document.body.setAttribute("data-resizable-iframe-connected", "");
    sendResize();
    window.addEventListener("resize", sendResize, true);
  };
  var style = `
	body {
		margin: 0;
	}
	html,
	body,
	body > div {
		width: 100%;
	}
	html.wp-has-aspect-ratio,
	body.wp-has-aspect-ratio,
	body.wp-has-aspect-ratio > div,
	body.wp-has-aspect-ratio > div iframe {
		width: 100%;
		height: 100%;
		overflow: hidden; /* If it has an aspect ratio, it shouldn't scroll. */
	}
	body > div > * {
		margin-top: 0 !important; /* Has to have !important to override inline styles. */
		margin-bottom: 0 !important;
	}
`;
  function buildSandBoxDocument({
    html,
    title,
    type,
    styles: styles3,
    scripts
  }) {
    const htmlDoc = /* @__PURE__ */ (0, import_jsx_runtime265.jsxs)("html", {
      lang: document.documentElement.lang,
      className: type,
      children: [/* @__PURE__ */ (0, import_jsx_runtime265.jsxs)("head", {
        children: [/* @__PURE__ */ (0, import_jsx_runtime265.jsx)("title", {
          children: title
        }), /* @__PURE__ */ (0, import_jsx_runtime265.jsx)("style", {
          dangerouslySetInnerHTML: {
            __html: style
          }
        }), styles3.map((rules, i3) => /* @__PURE__ */ (0, import_jsx_runtime265.jsx)("style", {
          dangerouslySetInnerHTML: {
            __html: rules
          }
        }, i3))]
      }), /* @__PURE__ */ (0, import_jsx_runtime265.jsxs)("body", {
        "data-resizable-iframe-connected": "data-resizable-iframe-connected",
        className: type,
        children: [/* @__PURE__ */ (0, import_jsx_runtime265.jsx)("div", {
          dangerouslySetInnerHTML: {
            __html: html
          }
        }), /* @__PURE__ */ (0, import_jsx_runtime265.jsx)("script", {
          type: "text/javascript",
          dangerouslySetInnerHTML: {
            __html: `(${observeAndResizeJS.toString()})();`
          }
        }), scripts.map((src) => /* @__PURE__ */ (0, import_jsx_runtime265.jsx)("script", {
          src
        }, src))]
      })]
    });
    return "<!DOCTYPE html>" + (0, import_element189.renderToString)(htmlDoc);
  }
  function IsolatedSandBox({
    html = "",
    title = "",
    type,
    styles: styles3 = [],
    scripts = [],
    onFocus,
    tabIndex
  }) {
    const ref = (0, import_element189.useRef)(null);
    const [width, setWidth] = (0, import_element189.useState)(0);
    const [height, setHeight] = (0, import_element189.useState)(0);
    const srcDoc = (0, import_element189.useMemo)(() => buildSandBoxDocument({
      html,
      title,
      type,
      styles: styles3,
      scripts
    }), [html, title, type, styles3, scripts]);
    (0, import_element189.useEffect)(() => {
      const iframe = ref.current;
      if (!iframe) {
        return;
      }
      function checkMessageForResize(event) {
        if (!iframe || iframe.contentWindow !== event.source) {
          return;
        }
        let data = event.data || {};
        if ("string" === typeof data) {
          try {
            data = JSON.parse(data);
          } catch {
          }
        }
        if ("resize" !== data.action) {
          return;
        }
        setWidth(data.width);
        setHeight(data.height);
      }
      let currentView = null;
      function syncListener() {
        const view = iframe?.ownerDocument?.defaultView ?? null;
        if (view === currentView) {
          return;
        }
        currentView?.removeEventListener("message", checkMessageForResize);
        currentView = view;
        currentView?.addEventListener("message", checkMessageForResize);
      }
      syncListener();
      iframe.addEventListener("load", syncListener);
      return () => {
        iframe.removeEventListener("load", syncListener);
        currentView?.removeEventListener("message", checkMessageForResize);
      };
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)("iframe", {
      ref: (0, import_compose69.useMergeRefs)([ref, (0, import_compose69.useFocusableIframe)()]),
      title,
      tabIndex,
      className: "components-sandbox",
      sandbox: "allow-scripts allow-presentation",
      srcDoc,
      onFocus,
      width: Math.ceil(width),
      height: Math.ceil(height)
    });
  }
  function SameOriginSandBox({
    html = "",
    title = "",
    type,
    styles: styles3 = [],
    scripts = [],
    onFocus,
    tabIndex
  }) {
    const ref = (0, import_element189.useRef)(null);
    const [width, setWidth] = (0, import_element189.useState)(0);
    const [height, setHeight] = (0, import_element189.useState)(0);
    function isFrameAccessible() {
      try {
        return !!ref.current?.contentDocument?.body;
      } catch (e3) {
        return false;
      }
    }
    function trySandBox(forceRerender = false) {
      if (!isFrameAccessible()) {
        return;
      }
      const {
        contentDocument,
        ownerDocument
      } = ref.current;
      if (!forceRerender && null !== contentDocument?.body.getAttribute("data-resizable-iframe-connected")) {
        return;
      }
      const htmlDoc = /* @__PURE__ */ (0, import_jsx_runtime265.jsxs)("html", {
        lang: ownerDocument.documentElement.lang,
        className: type,
        children: [/* @__PURE__ */ (0, import_jsx_runtime265.jsxs)("head", {
          children: [/* @__PURE__ */ (0, import_jsx_runtime265.jsx)("title", {
            children: title
          }), /* @__PURE__ */ (0, import_jsx_runtime265.jsx)("style", {
            dangerouslySetInnerHTML: {
              __html: style
            }
          }), styles3.map((rules, i3) => /* @__PURE__ */ (0, import_jsx_runtime265.jsx)("style", {
            dangerouslySetInnerHTML: {
              __html: rules
            }
          }, i3))]
        }), /* @__PURE__ */ (0, import_jsx_runtime265.jsxs)("body", {
          "data-resizable-iframe-connected": "data-resizable-iframe-connected",
          className: type,
          children: [/* @__PURE__ */ (0, import_jsx_runtime265.jsx)("div", {
            dangerouslySetInnerHTML: {
              __html: html
            }
          }), /* @__PURE__ */ (0, import_jsx_runtime265.jsx)("script", {
            type: "text/javascript",
            dangerouslySetInnerHTML: {
              __html: `(${observeAndResizeJS.toString()})();`
            }
          }), scripts.map((src) => /* @__PURE__ */ (0, import_jsx_runtime265.jsx)("script", {
            src
          }, src))]
        })]
      });
      contentDocument.open();
      contentDocument.write("<!DOCTYPE html>" + (0, import_element189.renderToString)(htmlDoc));
      contentDocument.close();
    }
    (0, import_element189.useEffect)(() => {
      trySandBox();
      function tryNoForceSandBox() {
        trySandBox(false);
      }
      function checkMessageForResize(event) {
        const iframe2 = ref.current;
        if (!iframe2 || iframe2.contentWindow !== event.source) {
          return;
        }
        let data = event.data || {};
        if ("string" === typeof data) {
          try {
            data = JSON.parse(data);
          } catch (e3) {
          }
        }
        if ("resize" !== data.action) {
          return;
        }
        setWidth(data.width);
        setHeight(data.height);
      }
      const iframe = ref.current;
      const defaultView = iframe?.ownerDocument?.defaultView;
      iframe?.addEventListener("load", tryNoForceSandBox, false);
      defaultView?.addEventListener("message", checkMessageForResize);
      return () => {
        iframe?.removeEventListener("load", tryNoForceSandBox, false);
        defaultView?.removeEventListener("message", checkMessageForResize);
      };
    }, []);
    (0, import_element189.useEffect)(() => {
      trySandBox();
    }, [title, styles3, scripts]);
    (0, import_element189.useEffect)(() => {
      trySandBox(true);
    }, [html, type]);
    return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)("iframe", {
      ref: (0, import_compose69.useMergeRefs)([ref, (0, import_compose69.useFocusableIframe)()]),
      title,
      tabIndex,
      className: "components-sandbox",
      sandbox: "allow-scripts allow-same-origin allow-presentation",
      onFocus,
      width: Math.ceil(width),
      height: Math.ceil(height)
    });
  }
  function SandBox({
    allowSameOrigin = false,
    ...contentProps
  }) {
    if (allowSameOrigin) {
      return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(SameOriginSandBox, {
        ...contentProps
      });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(IsolatedSandBox, {
      ...contentProps
    });
  }
  var sandbox_default = SandBox;

  // packages/components/build-module/snackbar/index.mjs
  var import_a11y10 = __toESM(require_a11y(), 1);
  var import_element190 = __toESM(require_element(), 1);
  var import_i18n75 = __toESM(require_i18n(), 1);
  var import_warning9 = __toESM(require_warning(), 1);
  var import_jsx_runtime266 = __toESM(require_jsx_runtime(), 1);
  var NOTICE_TIMEOUT = 6e3;
  function useSpokenMessage2(message2, politeness) {
    const spokenMessage = typeof message2 === "string" ? message2 : (0, import_element190.renderToString)(message2);
    (0, import_element190.useEffect)(() => {
      if (spokenMessage) {
        (0, import_a11y10.speak)(spokenMessage, politeness);
      }
    }, [spokenMessage, politeness]);
  }
  function UnforwardedSnackbar({
    className: className2,
    children,
    spokenMessage = children,
    politeness = "polite",
    actions = [],
    onRemove,
    icon = null,
    explicitDismiss = false,
    // onDismiss is a callback executed when the snackbar is dismissed.
    // It is distinct from onRemove, which _looks_ like a callback but is
    // actually the function to call to remove the snackbar from the UI.
    onDismiss,
    listRef
  }, ref) {
    function dismissMe(event) {
      if (event && event.preventDefault) {
        event.preventDefault();
      }
      listRef?.current?.focus();
      onDismiss?.();
      onRemove?.();
    }
    function onActionClick(event, onClick) {
      event.stopPropagation();
      onRemove?.();
      if (onClick) {
        onClick(event);
      }
    }
    useSpokenMessage2(spokenMessage, politeness);
    const callbacksRef = (0, import_element190.useRef)({
      onDismiss,
      onRemove
    });
    (0, import_element190.useLayoutEffect)(() => {
      callbacksRef.current = {
        onDismiss,
        onRemove
      };
    });
    (0, import_element190.useEffect)(() => {
      const timeoutHandle = setTimeout(() => {
        if (!explicitDismiss) {
          callbacksRef.current.onDismiss?.();
          callbacksRef.current.onRemove?.();
        }
      }, NOTICE_TIMEOUT);
      return () => clearTimeout(timeoutHandle);
    }, [explicitDismiss]);
    const classes = clsx_default(className2, "components-snackbar", {
      "components-snackbar-explicit-dismiss": !!explicitDismiss
    });
    if (actions && actions.length > 1) {
      true ? (0, import_warning9.default)("Snackbar can only have one action. Use Notice if your message requires many actions.") : void 0;
      actions = [actions[0]];
    }
    const snackbarContentClassnames = clsx_default("components-snackbar__content", {
      "components-snackbar__content-with-icon": !!icon
    });
    return /* @__PURE__ */ (0, import_jsx_runtime266.jsx)("div", {
      ref,
      className: classes,
      onClick: !explicitDismiss ? dismissMe : void 0,
      tabIndex: 0,
      role: !explicitDismiss ? "button" : void 0,
      onKeyPress: !explicitDismiss ? dismissMe : void 0,
      "aria-label": !explicitDismiss ? (0, import_i18n75.__)("Dismiss this notice") : void 0,
      "data-testid": "snackbar",
      children: /* @__PURE__ */ (0, import_jsx_runtime266.jsxs)("div", {
        className: snackbarContentClassnames,
        children: [icon && /* @__PURE__ */ (0, import_jsx_runtime266.jsx)("div", {
          className: "components-snackbar__icon",
          children: icon
        }), children, actions.map(({
          label,
          onClick,
          url,
          openInNewTab = false
        }, index2) => url !== void 0 && openInNewTab ? /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(external_link_default, {
          href: url,
          onClick: (event) => onActionClick(event, onClick),
          className: "components-snackbar__action",
          children: label
        }, index2) : /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(button_default, {
          __next40pxDefaultSize: true,
          href: url,
          variant: "link",
          onClick: (event) => onActionClick(event, onClick),
          className: "components-snackbar__action",
          children: label
        }, index2)), explicitDismiss && /* @__PURE__ */ (0, import_jsx_runtime266.jsx)("span", {
          role: "button",
          "aria-label": (0, import_i18n75.__)("Dismiss this notice"),
          tabIndex: 0,
          className: "components-snackbar__dismiss-button",
          onClick: dismissMe,
          onKeyPress: dismissMe,
          children: "\u2715"
        })]
      })
    });
  }
  var Snackbar = (0, import_element190.forwardRef)(UnforwardedSnackbar);
  Snackbar.displayName = "Snackbar";
  var snackbar_default = Snackbar;

  // packages/components/build-module/snackbar/list.mjs
  var import_compose70 = __toESM(require_compose(), 1);
  var import_element191 = __toESM(require_element(), 1);
  var import_jsx_runtime267 = __toESM(require_jsx_runtime(), 1);
  var SNACKBAR_VARIANTS = {
    init: {
      height: 0,
      opacity: 0
    },
    open: {
      height: "auto",
      opacity: 1,
      transition: {
        height: {
          type: "tween",
          duration: 0.3,
          ease: [0, 0, 0.2, 1]
        },
        opacity: {
          type: "tween",
          duration: 0.25,
          delay: 0.05,
          ease: [0, 0, 0.2, 1]
        }
      }
    },
    exit: {
      opacity: 0,
      transition: {
        type: "tween",
        duration: 0.1,
        ease: [0, 0, 0.2, 1]
      }
    }
  };
  function SnackbarList({
    notices,
    className: className2,
    children,
    onRemove
  }) {
    const listRef = (0, import_element191.useRef)(null);
    const isReducedMotion = (0, import_compose70.useReducedMotion)();
    className2 = clsx_default("components-snackbar-list", className2);
    const removeNotice = (notice) => () => onRemove?.(notice.id);
    return /* @__PURE__ */ (0, import_jsx_runtime267.jsxs)("div", {
      className: className2,
      tabIndex: -1,
      ref: listRef,
      "data-testid": "snackbar-list",
      children: [children, /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(AnimatePresence, {
        children: notices.map((notice) => {
          const {
            content,
            ...restNotice
          } = notice;
          return /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(motion.div, {
            layout: isReducedMotion ? false : "position",
            style: {
              width: "100%"
            },
            initial: "init",
            animate: "open",
            exit: "exit",
            variants: isReducedMotion ? void 0 : SNACKBAR_VARIANTS,
            children: /* @__PURE__ */ (0, import_jsx_runtime267.jsx)("div", {
              className: "components-snackbar-list__notice-container",
              children: /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(snackbar_default, {
                ...restNotice,
                onRemove: removeNotice(notice),
                listRef,
                children: notice.content
              })
            })
          }, notice.id);
        })
      })]
    });
  }
  var list_default2 = SnackbarList;

  // packages/components/build-module/tab-panel/index.mjs
  var import_element192 = __toESM(require_element(), 1);
  var import_compose71 = __toESM(require_compose(), 1);
  var import_i18n76 = __toESM(require_i18n(), 1);
  var import_jsx_runtime268 = __toESM(require_jsx_runtime(), 1);
  var extractTabName = (id3) => {
    if (typeof id3 === "undefined" || id3 === null) {
      return;
    }
    return id3.match(/^tab-panel-[0-9]*-(.*)/)?.[1];
  };
  var UnforwardedTabPanel = ({
    className: className2,
    children,
    tabs,
    selectOnMove = true,
    initialTabName,
    orientation = "horizontal",
    activeClass = "is-active",
    onSelect
  }, ref) => {
    const instanceId = (0, import_compose71.useInstanceId)(TabPanel22, "tab-panel");
    const prependInstanceId = (0, import_element192.useCallback)((tabName) => {
      if (typeof tabName === "undefined") {
        return;
      }
      return `${instanceId}-${tabName}`;
    }, [instanceId]);
    const tabStore = useTabStore({
      setSelectedId: (newTabValue) => {
        if (typeof newTabValue === "undefined" || newTabValue === null) {
          return;
        }
        const newTab = tabs.find((t4) => prependInstanceId(t4.name) === newTabValue);
        if (newTab?.disabled || newTab === selectedTab) {
          return;
        }
        const simplifiedTabName = extractTabName(newTabValue);
        if (typeof simplifiedTabName === "undefined") {
          return;
        }
        onSelect?.(simplifiedTabName);
      },
      orientation,
      selectOnMove,
      defaultSelectedId: prependInstanceId(initialTabName),
      rtl: (0, import_i18n76.isRTL)()
    });
    const selectedTabName = extractTabName(useStoreState(tabStore, "selectedId"));
    const setTabStoreSelectedId = (0, import_element192.useCallback)((tabName) => {
      tabStore.setState("selectedId", prependInstanceId(tabName));
    }, [prependInstanceId, tabStore]);
    const selectedTab = tabs.find(({
      name
    }) => name === selectedTabName);
    const previousSelectedTabName = (0, import_compose71.usePrevious)(selectedTabName);
    (0, import_element192.useEffect)(() => {
      if (previousSelectedTabName !== selectedTabName && selectedTabName === initialTabName && !!selectedTabName) {
        onSelect?.(selectedTabName);
      }
    }, [selectedTabName, initialTabName, onSelect, previousSelectedTabName]);
    (0, import_element192.useLayoutEffect)(() => {
      if (selectedTab) {
        return;
      }
      const initialTab = tabs.find((tab) => tab.name === initialTabName);
      if (initialTabName && !initialTab) {
        return;
      }
      if (initialTab && !initialTab.disabled) {
        setTabStoreSelectedId(initialTab.name);
      } else {
        const firstEnabledTab = tabs.find((tab) => !tab.disabled);
        if (firstEnabledTab) {
          setTabStoreSelectedId(firstEnabledTab.name);
        }
      }
    }, [tabs, selectedTab, initialTabName, instanceId, setTabStoreSelectedId]);
    (0, import_element192.useEffect)(() => {
      if (!selectedTab?.disabled) {
        return;
      }
      const firstEnabledTab = tabs.find((tab) => !tab.disabled);
      if (firstEnabledTab) {
        setTabStoreSelectedId(firstEnabledTab.name);
      }
    }, [tabs, selectedTab?.disabled, setTabStoreSelectedId, instanceId]);
    return /* @__PURE__ */ (0, import_jsx_runtime268.jsxs)("div", {
      className: className2,
      ref,
      children: [/* @__PURE__ */ (0, import_jsx_runtime268.jsx)(TabList, {
        store: tabStore,
        className: "components-tab-panel__tabs",
        children: tabs.map((tab) => {
          return /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(Tab, {
            id: prependInstanceId(tab.name),
            className: clsx_default("components-tab-panel__tabs-item", tab.className, {
              [activeClass]: tab.name === selectedTabName
            }),
            disabled: tab.disabled,
            "aria-controls": `${prependInstanceId(tab.name)}-view`,
            render: /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(button_default, {
              __next40pxDefaultSize: true,
              icon: tab.icon,
              label: tab.icon && tab.title,
              showTooltip: !!tab.icon
            }),
            children: !tab.icon && tab.title
          }, tab.name);
        })
      }), selectedTab && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(TabPanel, {
        id: `${prependInstanceId(selectedTab.name)}-view`,
        store: tabStore,
        tabId: prependInstanceId(selectedTab.name),
        className: "components-tab-panel__tab-content",
        children: children(selectedTab)
      })]
    });
  };
  var TabPanel22 = (0, import_element192.forwardRef)(UnforwardedTabPanel);
  TabPanel22.displayName = "TabPanel";
  var tab_panel_default = TabPanel22;

  // packages/components/build-module/text-control/index.mjs
  var import_compose72 = __toESM(require_compose(), 1);
  var import_element193 = __toESM(require_element(), 1);
  var import_jsx_runtime269 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedTextControl(props, ref) {
    const {
      // Prevent passing this to `input`.
      __nextHasNoMarginBottom: _2,
      __next40pxDefaultSize = false,
      label,
      hideLabelFromVision,
      value,
      help,
      id: idProp,
      className: className2,
      onChange,
      type = "text",
      ...additionalProps
    } = props;
    const id3 = (0, import_compose72.useInstanceId)(TextControl, "inspector-text-control", idProp);
    const onChangeValue = (event) => onChange(event.target.value);
    maybeWarnDeprecated36pxSize({
      componentName: "TextControl",
      size: void 0,
      __next40pxDefaultSize
    });
    return /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(base_control_default, {
      label,
      hideLabelFromVision,
      id: id3,
      help,
      className: className2,
      children: /* @__PURE__ */ (0, import_jsx_runtime269.jsx)("input", {
        className: clsx_default("components-text-control__input", {
          "is-next-40px-default-size": __next40pxDefaultSize
        }),
        type,
        id: id3,
        value,
        onChange: onChangeValue,
        "aria-describedby": !!help ? id3 + "__help" : void 0,
        ref,
        ...additionalProps
      })
    });
  }
  var TextControl = (0, import_element193.forwardRef)(UnforwardedTextControl);
  TextControl.displayName = "TextControl";
  var text_control_default = TextControl;

  // packages/components/build-module/textarea-control/index.mjs
  var import_compose73 = __toESM(require_compose(), 1);
  var import_element194 = __toESM(require_element(), 1);

  // packages/components/build-module/textarea-control/styles/textarea-control-styles.mjs
  var inputStyleNeutral = /* @__PURE__ */ css("box-shadow:0 0 0 transparent;border-radius:", config_values_default.radiusSmall, ";border:", config_values_default.borderWidth, " solid ", COLORS.ui.border, ";@media not ( prefers-reduced-motion ){transition:box-shadow 0.1s linear;}" + (false ? "" : ";label:inputStyleNeutral;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRleHRhcmVhLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWM2QiIsImZpbGUiOiJ0ZXh0YXJlYS1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgZm9udCB9IGZyb20gJy4uLy4uL3V0aWxzL2ZvbnQnO1xuaW1wb3J0IHsgQ09MT1JTIH0gZnJvbSAnLi4vLi4vdXRpbHMvY29sb3JzLXZhbHVlcyc7XG5pbXBvcnQgeyBDT05GSUcgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBicmVha3BvaW50IH0gZnJvbSAnLi4vLi4vdXRpbHMvYnJlYWtwb2ludCc7XG5cbmNvbnN0IGlucHV0U3R5bGVOZXV0cmFsID0gY3NzYFxuXHRib3gtc2hhZG93OiAwIDAgMCB0cmFuc3BhcmVudDtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdGJvcmRlcjogJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gc29saWQgJHsgQ09MT1JTLnVpLmJvcmRlciB9O1xuXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdHRyYW5zaXRpb246IGJveC1zaGFkb3cgMC4xcyBsaW5lYXI7XG5cdH1cbmA7XG5cbmNvbnN0IGlucHV0U3R5bGVGb2N1cyA9IGNzc2Bcblx0Ym9yZGVyLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdGJveC1zaGFkb3c6IDAgMCAwXG5cdFx0Y2FsYyggJHsgQ09ORklHLmJvcmRlcldpZHRoRm9jdXMgfSAtICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IClcblx0XHQkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cblx0Ly8gV2luZG93cyBIaWdoIENvbnRyYXN0IG1vZGUgd2lsbCBzaG93IHRoaXMgb3V0bGluZSwgYnV0IG5vdCB0aGUgYm94LXNoYWRvdy5cblx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuYDtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZFRleHRhcmVhID0gc3R5bGVkLnRleHRhcmVhYFxuXHR3aWR0aDogMTAwJTtcblx0ZGlzcGxheTogYmxvY2s7XG5cdGZvbnQtZmFtaWx5OiAkeyBmb250KCAnZGVmYXVsdC5mb250RmFtaWx5JyApIH07XG5cdGxpbmUtaGVpZ2h0OiAyMHB4O1xuXHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMudGhlbWUuYmFja2dyb3VuZCB9O1xuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0cmVzaXplOiB2ZXJ0aWNhbDtcblxuXHQvLyBWZXJ0aWNhbCBwYWRkaW5nIGlzIHRvIG1hdGNoIHRoZSBzdGFuZGFyZCA0MHB4IGNvbnRyb2wgaGVpZ2h0IHdoZW4gcm93cz0xLFxuXHQvLyBpbiBjb25qdW5jdGlvbiB3aXRoIHRoZSAyMHB4IGxpbmUtaGVpZ2h0LlxuXHQvLyBcIlN0YW5kYXJkXCIgbWV0cmljcyBhcmUgMTBweCAxMnB4LCBidXQgc3VidHJhY3RzIDFweCBlYWNoIHRvIGFjY291bnQgZm9yIHRoZSBib3JkZXIgd2lkdGguXG5cdHBhZGRpbmc6IDlweCAxMXB4O1xuXG5cdC8vIE1hdGNoaW5nIHRoZSAyMHB4IGxpbmUtaGVpZ2h0ICsgdGhlIDlweCB0b3AgYW5kIGJvdHRvbSBwYWRkaW5nLlxuXHRtaW4taGVpZ2h0OiAzOHB4O1xuXG5cdCR7IGlucHV0U3R5bGVOZXV0cmFsIH07XG5cblx0LyogRm9udHMgc21hbGxlciB0aGFuIDE2cHggY2F1c2VzIG1vYmlsZSBzYWZhcmkgdG8gem9vbS4gKi9cblx0Zm9udC1zaXplOiAkeyBmb250KCAnbW9iaWxlVGV4dE1pbkZvbnRTaXplJyApIH07XG5cblx0JHsgYnJlYWtwb2ludCggJ3NtYWxsJyApIH0ge1xuXHRcdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0fVxuXG5cdCY6Zm9jdXMge1xuXHRcdCR7IGlucHV0U3R5bGVGb2N1cyB9XG5cdH1cblxuXHQvLyBVc2Ugb3BhY2l0eSB0byB3b3JrIGluIHZhcmlvdXMgZWRpdG9yIHN0eWxlcy5cblx0Jjo6LXdlYmtpdC1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy51aS5kYXJrR3JheVBsYWNlaG9sZGVyIH07XG5cdH1cblxuXHQmOjotbW96LXBsYWNlaG9sZGVyIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0fVxuXG5cdCY6LW1zLWlucHV0LXBsYWNlaG9sZGVyIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmRhcmtHcmF5UGxhY2Vob2xkZXIgfTtcblx0fVxuXG5cdC5pcy1kYXJrLXRoZW1lICYge1xuXHRcdCY6Oi13ZWJraXQtaW5wdXQtcGxhY2Vob2xkZXIge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy51aS5saWdodEdyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblxuXHRcdCY6Oi1tb3otcGxhY2Vob2xkZXIge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy51aS5saWdodEdyYXlQbGFjZWhvbGRlciB9O1xuXHRcdH1cblxuXHRcdCY6LW1zLWlucHV0LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkubGlnaHRHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cdH1cbmA7XG4iXX0= */");
  var inputStyleFocus = /* @__PURE__ */ css("border-color:", COLORS.theme.accent, ";box-shadow:0 0 0 calc( ", config_values_default.borderWidthFocus, " - ", config_values_default.borderWidth, " ) ", COLORS.theme.accent, ";outline:2px solid transparent;" + (false ? "" : ";label:inputStyleFocus;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRleHRhcmVhLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXdCMkIiLCJmaWxlIjoidGV4dGFyZWEtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGZvbnQgfSBmcm9tICcuLi8uLi91dGlscy9mb250JztcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gJy4uLy4uL3V0aWxzL2NvbG9ycy12YWx1ZXMnO1xuaW1wb3J0IHsgQ09ORklHIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHsgYnJlYWtwb2ludCB9IGZyb20gJy4uLy4uL3V0aWxzL2JyZWFrcG9pbnQnO1xuXG5jb25zdCBpbnB1dFN0eWxlTmV1dHJhbCA9IGNzc2Bcblx0Ym94LXNoYWRvdzogMCAwIDAgdHJhbnNwYXJlbnQ7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRib3JkZXI6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy51aS5ib3JkZXIgfTtcblxuXHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHR0cmFuc2l0aW9uOiBib3gtc2hhZG93IDAuMXMgbGluZWFyO1xuXHR9XG5gO1xuXG5jb25zdCBpbnB1dFN0eWxlRm9jdXMgPSBjc3NgXG5cdGJvcmRlci1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRib3gtc2hhZG93OiAwIDAgMFxuXHRcdGNhbGMoICR7IENPTkZJRy5ib3JkZXJXaWR0aEZvY3VzIH0gLSAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSApXG5cdFx0JHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXG5cdC8vIFdpbmRvd3MgSGlnaCBDb250cmFzdCBtb2RlIHdpbGwgc2hvdyB0aGlzIG91dGxpbmUsIGJ1dCBub3QgdGhlIGJveC1zaGFkb3cuXG5cdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRUZXh0YXJlYSA9IHN0eWxlZC50ZXh0YXJlYWBcblx0d2lkdGg6IDEwMCU7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRmb250LWZhbWlseTogJHsgZm9udCggJ2RlZmF1bHQuZm9udEZhbWlseScgKSB9O1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0YmFja2dyb3VuZDogJHsgQ09MT1JTLnRoZW1lLmJhY2tncm91bmQgfTtcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdHJlc2l6ZTogdmVydGljYWw7XG5cblx0Ly8gVmVydGljYWwgcGFkZGluZyBpcyB0byBtYXRjaCB0aGUgc3RhbmRhcmQgNDBweCBjb250cm9sIGhlaWdodCB3aGVuIHJvd3M9MSxcblx0Ly8gaW4gY29uanVuY3Rpb24gd2l0aCB0aGUgMjBweCBsaW5lLWhlaWdodC5cblx0Ly8gXCJTdGFuZGFyZFwiIG1ldHJpY3MgYXJlIDEwcHggMTJweCwgYnV0IHN1YnRyYWN0cyAxcHggZWFjaCB0byBhY2NvdW50IGZvciB0aGUgYm9yZGVyIHdpZHRoLlxuXHRwYWRkaW5nOiA5cHggMTFweDtcblxuXHQvLyBNYXRjaGluZyB0aGUgMjBweCBsaW5lLWhlaWdodCArIHRoZSA5cHggdG9wIGFuZCBib3R0b20gcGFkZGluZy5cblx0bWluLWhlaWdodDogMzhweDtcblxuXHQkeyBpbnB1dFN0eWxlTmV1dHJhbCB9O1xuXG5cdC8qIEZvbnRzIHNtYWxsZXIgdGhhbiAxNnB4IGNhdXNlcyBtb2JpbGUgc2FmYXJpIHRvIHpvb20uICovXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ21vYmlsZVRleHRNaW5Gb250U2l6ZScgKSB9O1xuXG5cdCR7IGJyZWFrcG9pbnQoICdzbWFsbCcgKSB9IHtcblx0XHRmb250LXNpemU6ICR7IGZvbnQoICdkZWZhdWx0LmZvbnRTaXplJyApIH07XG5cdH1cblxuXHQmOmZvY3VzIHtcblx0XHQkeyBpbnB1dFN0eWxlRm9jdXMgfVxuXHR9XG5cblx0Ly8gVXNlIG9wYWNpdHkgdG8gd29yayBpbiB2YXJpb3VzIGVkaXRvciBzdHlsZXMuXG5cdCY6Oi13ZWJraXQtaW5wdXQtcGxhY2Vob2xkZXIge1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHR9XG5cblx0Jjo6LW1vei1wbGFjZWhvbGRlciB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy51aS5kYXJrR3JheVBsYWNlaG9sZGVyIH07XG5cdH1cblxuXHQmOi1tcy1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy51aS5kYXJrR3JheVBsYWNlaG9sZGVyIH07XG5cdH1cblxuXHQuaXMtZGFyay10aGVtZSAmIHtcblx0XHQmOjotd2Via2l0LWlucHV0LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkubGlnaHRHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOjotbW96LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkubGlnaHRHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOi1tcy1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmxpZ2h0R3JheVBsYWNlaG9sZGVyIH07XG5cdFx0fVxuXHR9XG5gO1xuIl19 */");
  var StyledTextarea = /* @__PURE__ */ createStyled("textarea", false ? {
    target: "e1w5nnrk0"
  } : {
    target: "e1w5nnrk0",
    label: "StyledTextarea"
  })("width:100%;display:block;font-family:", font("default.fontFamily"), ";line-height:20px;background:", COLORS.theme.background, ";color:", COLORS.theme.foreground, ";resize:vertical;padding:9px 11px;min-height:38px;", inputStyleNeutral, ";font-size:", font("mobileTextMinFontSize"), ";", breakpoint("small"), "{font-size:", font("default.fontSize"), ";}&:focus{", inputStyleFocus, ";}&::-webkit-input-placeholder{color:", COLORS.ui.darkGrayPlaceholder, ";}&::-moz-placeholder{color:", COLORS.ui.darkGrayPlaceholder, ";}&:-ms-input-placeholder{color:", COLORS.ui.darkGrayPlaceholder, ";}.is-dark-theme &{&::-webkit-input-placeholder{color:", COLORS.ui.lightGrayPlaceholder, ";}&::-moz-placeholder{color:", COLORS.ui.lightGrayPlaceholder, ";}&:-ms-input-placeholder{color:", COLORS.ui.lightGrayPlaceholder, ";}}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRleHRhcmVhLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWtDNkMiLCJmaWxlIjoidGV4dGFyZWEtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGZvbnQgfSBmcm9tICcuLi8uLi91dGlscy9mb250JztcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gJy4uLy4uL3V0aWxzL2NvbG9ycy12YWx1ZXMnO1xuaW1wb3J0IHsgQ09ORklHIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHsgYnJlYWtwb2ludCB9IGZyb20gJy4uLy4uL3V0aWxzL2JyZWFrcG9pbnQnO1xuXG5jb25zdCBpbnB1dFN0eWxlTmV1dHJhbCA9IGNzc2Bcblx0Ym94LXNoYWRvdzogMCAwIDAgdHJhbnNwYXJlbnQ7XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRib3JkZXI6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy51aS5ib3JkZXIgfTtcblxuXHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHR0cmFuc2l0aW9uOiBib3gtc2hhZG93IDAuMXMgbGluZWFyO1xuXHR9XG5gO1xuXG5jb25zdCBpbnB1dFN0eWxlRm9jdXMgPSBjc3NgXG5cdGJvcmRlci1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRib3gtc2hhZG93OiAwIDAgMFxuXHRcdGNhbGMoICR7IENPTkZJRy5ib3JkZXJXaWR0aEZvY3VzIH0gLSAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSApXG5cdFx0JHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXG5cdC8vIFdpbmRvd3MgSGlnaCBDb250cmFzdCBtb2RlIHdpbGwgc2hvdyB0aGlzIG91dGxpbmUsIGJ1dCBub3QgdGhlIGJveC1zaGFkb3cuXG5cdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRUZXh0YXJlYSA9IHN0eWxlZC50ZXh0YXJlYWBcblx0d2lkdGg6IDEwMCU7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRmb250LWZhbWlseTogJHsgZm9udCggJ2RlZmF1bHQuZm9udEZhbWlseScgKSB9O1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0YmFja2dyb3VuZDogJHsgQ09MT1JTLnRoZW1lLmJhY2tncm91bmQgfTtcblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdHJlc2l6ZTogdmVydGljYWw7XG5cblx0Ly8gVmVydGljYWwgcGFkZGluZyBpcyB0byBtYXRjaCB0aGUgc3RhbmRhcmQgNDBweCBjb250cm9sIGhlaWdodCB3aGVuIHJvd3M9MSxcblx0Ly8gaW4gY29uanVuY3Rpb24gd2l0aCB0aGUgMjBweCBsaW5lLWhlaWdodC5cblx0Ly8gXCJTdGFuZGFyZFwiIG1ldHJpY3MgYXJlIDEwcHggMTJweCwgYnV0IHN1YnRyYWN0cyAxcHggZWFjaCB0byBhY2NvdW50IGZvciB0aGUgYm9yZGVyIHdpZHRoLlxuXHRwYWRkaW5nOiA5cHggMTFweDtcblxuXHQvLyBNYXRjaGluZyB0aGUgMjBweCBsaW5lLWhlaWdodCArIHRoZSA5cHggdG9wIGFuZCBib3R0b20gcGFkZGluZy5cblx0bWluLWhlaWdodDogMzhweDtcblxuXHQkeyBpbnB1dFN0eWxlTmV1dHJhbCB9O1xuXG5cdC8qIEZvbnRzIHNtYWxsZXIgdGhhbiAxNnB4IGNhdXNlcyBtb2JpbGUgc2FmYXJpIHRvIHpvb20uICovXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ21vYmlsZVRleHRNaW5Gb250U2l6ZScgKSB9O1xuXG5cdCR7IGJyZWFrcG9pbnQoICdzbWFsbCcgKSB9IHtcblx0XHRmb250LXNpemU6ICR7IGZvbnQoICdkZWZhdWx0LmZvbnRTaXplJyApIH07XG5cdH1cblxuXHQmOmZvY3VzIHtcblx0XHQkeyBpbnB1dFN0eWxlRm9jdXMgfVxuXHR9XG5cblx0Ly8gVXNlIG9wYWNpdHkgdG8gd29yayBpbiB2YXJpb3VzIGVkaXRvciBzdHlsZXMuXG5cdCY6Oi13ZWJraXQtaW5wdXQtcGxhY2Vob2xkZXIge1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudWkuZGFya0dyYXlQbGFjZWhvbGRlciB9O1xuXHR9XG5cblx0Jjo6LW1vei1wbGFjZWhvbGRlciB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy51aS5kYXJrR3JheVBsYWNlaG9sZGVyIH07XG5cdH1cblxuXHQmOi1tcy1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy51aS5kYXJrR3JheVBsYWNlaG9sZGVyIH07XG5cdH1cblxuXHQuaXMtZGFyay10aGVtZSAmIHtcblx0XHQmOjotd2Via2l0LWlucHV0LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkubGlnaHRHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOjotbW96LXBsYWNlaG9sZGVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkubGlnaHRHcmF5UGxhY2Vob2xkZXIgfTtcblx0XHR9XG5cblx0XHQmOi1tcy1pbnB1dC1wbGFjZWhvbGRlciB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLmxpZ2h0R3JheVBsYWNlaG9sZGVyIH07XG5cdFx0fVxuXHR9XG5gO1xuIl19 */"));

  // packages/components/build-module/textarea-control/index.mjs
  var import_jsx_runtime270 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedTextareaControl(props, ref) {
    const {
      // Prevent passing this to `textarea`.
      __nextHasNoMarginBottom: _2,
      label,
      hideLabelFromVision,
      value,
      help,
      onChange,
      rows = 4,
      className: className2,
      ...additionalProps
    } = props;
    const instanceId = (0, import_compose73.useInstanceId)(TextareaControl);
    const id3 = `inspector-textarea-control-${instanceId}`;
    const onChangeValue = (event) => onChange(event.target.value);
    const classes = clsx_default("components-textarea-control", className2);
    return /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(base_control_default, {
      label,
      hideLabelFromVision,
      id: id3,
      help,
      className: classes,
      children: /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(StyledTextarea, {
        className: "components-textarea-control__input",
        id: id3,
        rows,
        onChange: onChangeValue,
        "aria-describedby": !!help ? id3 + "__help" : void 0,
        value,
        ref,
        ...additionalProps
      })
    });
  }
  var TextareaControl = (0, import_element194.forwardRef)(UnforwardedTextareaControl);
  TextareaControl.displayName = "TextareaControl";
  var textarea_control_default = TextareaControl;

  // packages/components/build-module/text-highlight/index.mjs
  var import_element195 = __toESM(require_element(), 1);
  var import_jsx_runtime271 = __toESM(require_jsx_runtime(), 1);
  var TextHighlight = (props) => {
    const {
      text = "",
      highlight = ""
    } = props;
    const trimmedHighlightText = highlight.trim();
    if (!trimmedHighlightText) {
      return /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(import_jsx_runtime271.Fragment, {
        children: text
      });
    }
    const regex = new RegExp(`(${escapeRegExp(trimmedHighlightText)})`, "gi");
    return (0, import_element195.createInterpolateElement)(text.replace(regex, "<mark>$&</mark>"), {
      mark: /* @__PURE__ */ (0, import_jsx_runtime271.jsx)("mark", {})
    });
  };
  TextHighlight.displayName = "TextHighlight";
  var text_highlight_default = TextHighlight;

  // packages/components/build-module/tip/index.mjs
  var import_jsx_runtime272 = __toESM(require_jsx_runtime(), 1);
  function Tip(props) {
    const {
      children
    } = props;
    return /* @__PURE__ */ (0, import_jsx_runtime272.jsxs)("div", {
      className: "components-tip",
      children: [/* @__PURE__ */ (0, import_jsx_runtime272.jsx)(icon_default2, {
        icon: tip_default
      }), /* @__PURE__ */ (0, import_jsx_runtime272.jsx)("p", {
        children
      })]
    });
  }
  var tip_default2 = Tip;

  // packages/components/build-module/toggle-control/index.mjs
  var import_element196 = __toESM(require_element(), 1);
  var import_compose74 = __toESM(require_compose(), 1);
  var import_jsx_runtime273 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedToggleControl({
    label,
    checked,
    help,
    className: className2,
    onChange,
    disabled,
    // Prevent passing to internal component.
    __nextHasNoMarginBottom: _2,
    ...additionalProps
  }, ref) {
    function onChangeToggle(event) {
      onChange(event.target.checked);
    }
    const instanceId = (0, import_compose74.useInstanceId)(ToggleControl);
    const id3 = `inspector-toggle-control-${instanceId}`;
    let describedBy, helpLabel;
    if (help) {
      if (typeof help === "function") {
        if (checked !== void 0) {
          helpLabel = help(checked);
        }
      } else {
        helpLabel = help;
      }
      if (helpLabel) {
        describedBy = id3 + "__help";
      }
    }
    return /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(base_control_default, {
      id: id3,
      help: helpLabel && /* @__PURE__ */ (0, import_jsx_runtime273.jsx)("span", {
        className: "components-toggle-control__help",
        children: helpLabel
      }),
      className: clsx_default("components-toggle-control", className2),
      children: /* @__PURE__ */ (0, import_jsx_runtime273.jsxs)(component_default9, {
        justify: "flex-start",
        spacing: 2,
        children: [/* @__PURE__ */ (0, import_jsx_runtime273.jsx)(form_toggle_default, {
          id: id3,
          checked,
          onChange: onChangeToggle,
          "aria-describedby": describedBy,
          disabled,
          ref,
          ...additionalProps
        }), /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(component_default5, {
          as: "label",
          htmlFor: id3,
          className: clsx_default("components-toggle-control__label", {
            "is-disabled": disabled
          }),
          children: label
        })]
      })
    });
  }
  var ToggleControl = (0, import_element196.forwardRef)(UnforwardedToggleControl);
  ToggleControl.displayName = "ToggleControl";
  var toggle_control_default = ToggleControl;

  // packages/components/build-module/toolbar/toolbar/index.mjs
  var import_element203 = __toESM(require_element(), 1);
  var import_deprecated25 = __toESM(require_deprecated(), 1);

  // packages/components/build-module/toolbar/toolbar-group/index.mjs
  var import_element201 = __toESM(require_element(), 1);

  // packages/components/build-module/toolbar/toolbar-button/index.mjs
  var import_element199 = __toESM(require_element(), 1);

  // packages/components/build-module/toolbar/toolbar-item/index.mjs
  var import_element198 = __toESM(require_element(), 1);
  var import_warning10 = __toESM(require_warning(), 1);

  // packages/components/build-module/toolbar/toolbar-context/index.mjs
  var import_element197 = __toESM(require_element(), 1);
  var ToolbarContext = (0, import_element197.createContext)(void 0);
  ToolbarContext.displayName = "ToolbarContext";
  var toolbar_context_default = ToolbarContext;

  // packages/components/build-module/toolbar/toolbar-item/index.mjs
  var import_jsx_runtime274 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedToolbarItem({
    children,
    as: Component9,
    ...props
  }, ref) {
    const accessibleToolbarStore = (0, import_element198.useContext)(toolbar_context_default);
    const isRenderProp = typeof children === "function";
    if (!isRenderProp && !Component9) {
      true ? (0, import_warning10.default)("`ToolbarItem` is a generic headless component. You must pass either a `children` prop as a function or an `as` prop as a component. See https://developer.wordpress.org/block-editor/components/toolbar-item/") : void 0;
      return null;
    }
    const allProps = {
      ...props,
      ref,
      "data-toolbar-item": true
    };
    if (!accessibleToolbarStore) {
      if (Component9) {
        return /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(Component9, {
          ...allProps,
          children
        });
      }
      if (!isRenderProp) {
        return null;
      }
      return children(allProps);
    }
    const render = isRenderProp ? children : Component9 && /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(Component9, {
      children
    });
    return /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(ToolbarItem, {
      accessibleWhenDisabled: true,
      ...allProps,
      store: accessibleToolbarStore,
      render
    });
  }
  var ToolbarItem22 = (0, import_element198.forwardRef)(UnforwardedToolbarItem);
  ToolbarItem22.displayName = "ToolbarItem";
  var toolbar_item_default = ToolbarItem22;

  // packages/components/build-module/toolbar/toolbar-button/toolbar-button-container.mjs
  var import_jsx_runtime275 = __toESM(require_jsx_runtime(), 1);
  var ToolbarButtonContainer = ({
    children,
    className: className2
  }) => /* @__PURE__ */ (0, import_jsx_runtime275.jsx)("div", {
    className: className2,
    children
  });
  var toolbar_button_container_default = ToolbarButtonContainer;

  // packages/components/build-module/toolbar/toolbar-button/index.mjs
  var import_jsx_runtime276 = __toESM(require_jsx_runtime(), 1);
  function useDeprecatedProps6({
    isDisabled,
    ...otherProps
  }) {
    return {
      disabled: isDisabled,
      ...otherProps
    };
  }
  function UnforwardedToolbarButton(props, ref) {
    const {
      children,
      className: className2,
      containerClassName,
      extraProps,
      isActive,
      title,
      ...restProps
    } = useDeprecatedProps6(props);
    const accessibleToolbarState = (0, import_element199.useContext)(toolbar_context_default);
    if (!accessibleToolbarState) {
      return /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(toolbar_button_container_default, {
        className: containerClassName,
        children: /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(button_default, {
          ref,
          icon: restProps.icon,
          size: "compact",
          label: title,
          shortcut: restProps.shortcut,
          "data-subscript": restProps.subscript,
          onClick: (event) => {
            event.stopPropagation();
            if (restProps.onClick) {
              restProps.onClick(event);
            }
          },
          className: clsx_default("components-toolbar__control", className2),
          isPressed: isActive,
          accessibleWhenDisabled: true,
          "data-toolbar-item": true,
          ...extraProps,
          ...restProps,
          children
        })
      });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(toolbar_item_default, {
      className: clsx_default("components-toolbar-button", className2),
      ...extraProps,
      ...restProps,
      ref,
      children: (toolbarItemProps) => /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(button_default, {
        size: "compact",
        label: title,
        isPressed: isActive,
        ...toolbarItemProps,
        children
      })
    });
  }
  var ToolbarButton = (0, import_element199.forwardRef)(UnforwardedToolbarButton);
  ToolbarButton.displayName = "ToolbarButton";
  var toolbar_button_default = ToolbarButton;

  // packages/components/build-module/toolbar/toolbar-group/toolbar-group-container.mjs
  var import_jsx_runtime277 = __toESM(require_jsx_runtime(), 1);
  var ToolbarGroupContainer = ({
    className: className2,
    children,
    ...props
  }) => /* @__PURE__ */ (0, import_jsx_runtime277.jsx)("div", {
    className: className2,
    ...props,
    children
  });
  var toolbar_group_container_default = ToolbarGroupContainer;

  // packages/components/build-module/toolbar/toolbar-group/toolbar-group-collapsed.mjs
  var import_element200 = __toESM(require_element(), 1);
  var import_jsx_runtime278 = __toESM(require_jsx_runtime(), 1);
  function ToolbarGroupCollapsed({
    controls = [],
    toggleProps,
    ...props
  }) {
    const accessibleToolbarState = (0, import_element200.useContext)(toolbar_context_default);
    const renderDropdownMenu = (internalToggleProps) => /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(dropdown_menu_default, {
      controls,
      toggleProps: {
        ...internalToggleProps,
        "data-toolbar-item": true
      },
      ...props
    });
    if (accessibleToolbarState) {
      return /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(toolbar_item_default, {
        ...toggleProps,
        children: renderDropdownMenu
      });
    }
    return renderDropdownMenu(toggleProps);
  }
  var toolbar_group_collapsed_default = ToolbarGroupCollapsed;

  // packages/components/build-module/toolbar/toolbar-group/index.mjs
  var import_jsx_runtime279 = __toESM(require_jsx_runtime(), 1);
  function isNestedArray(arr) {
    return Array.isArray(arr) && Array.isArray(arr[0]);
  }
  function ToolbarGroup({
    controls = [],
    children,
    className: className2,
    isCollapsed: isCollapsed2,
    title,
    ...props
  }) {
    const accessibleToolbarState = (0, import_element201.useContext)(toolbar_context_default);
    if ((!controls || !controls.length) && !children) {
      return null;
    }
    const finalClassName = clsx_default(
      // Unfortunately, there's legacy code referencing to `.components-toolbar`
      // So we can't get rid of it
      accessibleToolbarState ? "components-toolbar-group" : "components-toolbar",
      className2
    );
    let controlSets;
    if (isNestedArray(controls)) {
      controlSets = controls;
    } else {
      controlSets = [controls];
    }
    if (isCollapsed2) {
      return /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(toolbar_group_collapsed_default, {
        label: title,
        controls: controlSets,
        className: finalClassName,
        children,
        ...props
      });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime279.jsxs)(toolbar_group_container_default, {
      className: finalClassName,
      ...props,
      children: [controlSets?.flatMap((controlSet, indexOfSet) => controlSet.map((control, indexOfControl) => /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(toolbar_button_default, {
        containerClassName: indexOfSet > 0 && indexOfControl === 0 ? "has-left-divider" : void 0,
        ...control
      }, [indexOfSet, indexOfControl].join()))), children]
    });
  }
  var toolbar_group_default = ToolbarGroup;

  // packages/components/build-module/toolbar/toolbar/toolbar-container.mjs
  var import_element202 = __toESM(require_element(), 1);
  var import_i18n77 = __toESM(require_i18n(), 1);
  var import_jsx_runtime280 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedToolbarContainer({
    label,
    ...props
  }, ref) {
    const toolbarStore = useToolbarStore({
      focusLoop: true,
      rtl: (0, import_i18n77.isRTL)()
    });
    return (
      // This will provide state for `ToolbarButton`'s
      /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(toolbar_context_default.Provider, {
        value: toolbarStore,
        children: /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(Toolbar, {
          ref,
          "aria-label": label,
          store: toolbarStore,
          ...props
        })
      })
    );
  }
  var ToolbarContainer2 = (0, import_element202.forwardRef)(UnforwardedToolbarContainer);
  ToolbarContainer2.displayName = "ToolbarContainer";
  var toolbar_container_default = ToolbarContainer2;

  // packages/components/build-module/toolbar/toolbar/index.mjs
  var import_jsx_runtime281 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedToolbar({
    className: className2,
    label,
    variant,
    ...props
  }, ref) {
    const isVariantDefined = variant !== void 0;
    const contextSystemValue = (0, import_element203.useMemo)(() => {
      if (isVariantDefined) {
        return {};
      }
      return {
        DropdownMenu: {
          variant: "toolbar"
        },
        Dropdown: {
          variant: "toolbar"
        },
        Menu: {
          variant: "toolbar"
        }
      };
    }, [isVariantDefined]);
    if (!label) {
      (0, import_deprecated25.default)("Using Toolbar without label prop", {
        since: "5.6",
        alternative: "ToolbarGroup component",
        link: "https://developer.wordpress.org/block-editor/components/toolbar/"
      });
      const {
        title: _title,
        ...restProps
      } = props;
      return /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(toolbar_group_default, {
        isCollapsed: false,
        ...restProps,
        className: className2
      });
    }
    const finalClassName = clsx_default("components-accessible-toolbar", className2, variant && `is-${variant}`);
    return /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(ContextSystemProvider, {
      value: contextSystemValue,
      children: /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(toolbar_container_default, {
        className: finalClassName,
        label,
        ref,
        ...props
      })
    });
  }
  var Toolbar3 = (0, import_element203.forwardRef)(UnforwardedToolbar);
  Toolbar3.displayName = "Toolbar";
  var toolbar_default = Toolbar3;

  // packages/components/build-module/toolbar/toolbar-dropdown-menu/index.mjs
  var import_element204 = __toESM(require_element(), 1);
  var import_jsx_runtime282 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedToolbarDropdownMenu(props, ref) {
    const accessibleToolbarState = (0, import_element204.useContext)(toolbar_context_default);
    if (!accessibleToolbarState) {
      return /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(dropdown_menu_default, {
        ...props
      });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(toolbar_item_default, {
      ref,
      ...props.toggleProps,
      children: (toolbarItemProps) => /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(dropdown_menu_default, {
        ...props,
        popoverProps: {
          ...props.popoverProps
        },
        toggleProps: toolbarItemProps
      })
    });
  }
  var ToolbarDropdownMenu = (0, import_element204.forwardRef)(UnforwardedToolbarDropdownMenu);
  ToolbarDropdownMenu.displayName = "ToolbarDropdownMenu";
  var toolbar_dropdown_menu_default = ToolbarDropdownMenu;

  // packages/components/build-module/tools-panel/tools-panel-header/component.mjs
  var import_a11y11 = __toESM(require_a11y(), 1);
  var import_i18n78 = __toESM(require_i18n(), 1);

  // packages/components/build-module/tools-panel/tools-panel-header/hook.mjs
  var import_element206 = __toESM(require_element(), 1);

  // packages/components/build-module/tools-panel/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__39() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var toolsPanelGrid = {
    columns: (columns) => /* @__PURE__ */ css("grid-template-columns:", `repeat( ${columns}, minmax(0, 1fr) )`, ";" + (false ? "" : ";label:columns;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrQm9DIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHtcblx0U3R5bGVkRmllbGQgYXMgQmFzZUNvbnRyb2xGaWVsZCxcblx0U3R5bGVkSGVscCBhcyBCYXNlQ29udHJvbEhlbHAsXG5cdFdyYXBwZXIgYXMgQmFzZUNvbnRyb2xXcmFwcGVyLFxufSBmcm9tICcuLi9iYXNlLWNvbnRyb2wvc3R5bGVzL2Jhc2UtY29udHJvbC1zdHlsZXMnO1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuXG5jb25zdCB0b29sc1BhbmVsR3JpZCA9IHtcblx0Y29sdW1uczogKCBjb2x1bW5zOiBudW1iZXIgKSA9PiBjc3NgXG5cdFx0Z3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiAkeyBgcmVwZWF0KCAkeyBjb2x1bW5zIH0sIG1pbm1heCgwLCAxZnIpIClgIH07XG5cdGAsXG5cdHNwYWNpbmc6IGNzc2Bcblx0XHRjb2x1bW4tZ2FwOiAkeyBzcGFjZSggNCApIH07XG5cdFx0cm93LWdhcDogJHsgc3BhY2UoIDQgKSB9O1xuXHRgLFxuXHRpdGVtOiB7XG5cdFx0ZnVsbFdpZHRoOiBjc3NgXG5cdFx0XHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXHRcdGAsXG5cdH0sXG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbCA9ICggY29sdW1uczogbnVtYmVyICkgPT4gY3NzYFxuXHQkeyB0b29sc1BhbmVsR3JpZC5jb2x1bW5zKCBjb2x1bW5zICkgfVxuXHQkeyB0b29sc1BhbmVsR3JpZC5zcGFjaW5nIH1cblxuXHRib3JkZXItdG9wOiAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSBzb2xpZCAkeyBDT0xPUlMuZ3JheVsgMzAwIF0gfTtcblx0bWFyZ2luLXRvcDogLTFweDtcblx0cGFkZGluZzogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuLyoqXG4gKiBJdGVtcyBpbmplY3RlZCBpbnRvIGEgVG9vbHNQYW5lbCB2aWEgYSB2aXJ0dWFsIGJ1YmJsaW5nIHNsb3Qgd2lsbCByZXF1aXJlXG4gKiBhbiBpbm5lciBkb20gZWxlbWVudCB0byBiZSBpbmplY3RlZC4gVGhlIGZvbGxvd2luZyBydWxlIGFsbG93cyBmb3IgdGhlXG4gKiBDU1MgZ3JpZCBkaXNwbGF5IHRvIGJlIHJlLWVzdGFibGlzaGVkLlxuICovXG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsV2l0aElubmVyV3JhcHBlciA9ICggY29sdW1uczogbnVtYmVyICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdD4gZGl2Om5vdCggOmZpcnN0LW9mLXR5cGUgKSB7XG5cdFx0XHRkaXNwbGF5OiBncmlkO1xuXHRcdFx0JHsgdG9vbHNQYW5lbEdyaWQuY29sdW1ucyggY29sdW1ucyApIH1cblx0XHRcdCR7IHRvb2xzUGFuZWxHcmlkLnNwYWNpbmcgfVxuXHRcdFx0JHsgdG9vbHNQYW5lbEdyaWQuaXRlbS5mdWxsV2lkdGggfVxuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSGlkZGVuSW5uZXJXcmFwcGVyID0gY3NzYFxuXHQ+IGRpdjpub3QoIDpmaXJzdC1vZi10eXBlICkge1xuXHRcdGRpc3BsYXk6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSGVhZGVyID0gY3NzYFxuXHQkeyB0b29sc1BhbmVsR3JpZC5pdGVtLmZ1bGxXaWR0aCB9XG5cdGdhcDogJHsgc3BhY2UoIDIgKSB9O1xuXG5cdC8qKlxuXHQgKiBUaGUgdGFyZ2V0aW5nIG9mIGRyb3Bkb3duIG1lbnUgY29tcG9uZW50IGNsYXNzZXMgaGVyZSBpcyBhIHRlbXBvcmFyeVxuXHQgKiBtZWFzdXJlIG9ubHkuXG5cdCAqXG5cdCAqIFRoZSBmb2xsb3dpbmcgc3R5bGVzIHNob3VsZCBiZSByZXBsYWNlZCBvbmNlIHRoZSBEcm9wZG93bk1lbnUgaGFzIGJlZW5cblx0ICogcmVmYWN0b3JlZCBhbmQgY2FuIGJlIHRhcmdldGVkIHZpYSBjb21wb25lbnQgaW50ZXJwb2xhdGlvbi5cblx0ICovXG5cdC5jb21wb25lbnRzLWRyb3Bkb3duLW1lbnUge1xuXHRcdG1hcmdpbjogJHsgc3BhY2UoIC0xICkgfSAwO1xuXHRcdGxpbmUtaGVpZ2h0OiAwO1xuXHR9XG5cdCYmJiYgLmNvbXBvbmVudHMtZHJvcGRvd24tbWVudV9fdG9nZ2xlIHtcblx0XHRwYWRkaW5nOiAwO1xuXHRcdG1pbi13aWR0aDogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbEhlYWRpbmcgPSBjc3NgXG5cdGZvbnQtc2l6ZTogaW5oZXJpdDtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdGxpbmUtaGVpZ2h0OiBub3JtYWw7XG5cblx0LyogUmVxdWlyZWQgdG8gbWVldCBzcGVjaWZpY2l0eSByZXF1aXJlbWVudHMgdG8gZW5zdXJlIHplcm8gbWFyZ2luICovXG5cdCYmIHtcblx0XHRtYXJnaW46IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSXRlbSA9IGNzc2Bcblx0JHsgdG9vbHNQYW5lbEdyaWQuaXRlbS5mdWxsV2lkdGggfVxuXG5cdC8qIENsZWFyIHNwYWNpbmcgaW4gYW5kIGFyb3VuZCBjb250cm9scyBhZGRlZCBhcyBwYW5lbCBpdGVtcy4gKi9cblx0LyogUmVtb3ZlIHdoZW4gdGhleSBjYW4gYmUgYWRkcmVzc2VkIHZpYSBjb250ZXh0IHN5c3RlbS4gKi9cblx0JiA+IGRpdixcblx0JiA+IGZpZWxkc2V0IHtcblx0XHRwYWRkaW5nLWJvdHRvbTogMDtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0fVxuXG5cdC8qIFJlbW92ZSBCYXNlQ29udHJvbCBjb21wb25lbnRzIG1hcmdpbnMgYW5kIGxlYXZlIHNwYWNpbmcgdG8gZ3JpZCBsYXlvdXQgKi9cblx0JiYgJHsgQmFzZUNvbnRyb2xXcmFwcGVyIH0ge1xuXHRcdG1hcmdpbi1ib3R0b206IDA7XG5cblx0XHQvKipcblx0XHQgKiBUbyBtYWludGFpbiBwcm9wZXIgc3BhY2luZyB3aXRoaW4gYSBiYXNlIGNvbnRyb2wsIHRoZSBmaWVsZCdzIGJvdHRvbVxuXHRcdCAqIG1hcmdpbiBzaG91bGQgb25seSBiZSByZW1vdmVkIHdoZW4gdGhlcmUgaXMgbm8gaGVscCB0ZXh0IGluY2x1ZGVkIGFuZFxuXHRcdCAqIGl0IGlzIHRoZXJlZm9yZSB0aGUgbGFzdC1jaGlsZC5cblx0XHQgKi9cblx0XHQkeyBCYXNlQ29udHJvbEZpZWxkIH06bGFzdC1jaGlsZCB7XG5cdFx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHRcdH1cblx0fVxuXG5cdCR7IEJhc2VDb250cm9sSGVscCB9IHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbEl0ZW1QbGFjZWhvbGRlciA9IGNzc2Bcblx0ZGlzcGxheTogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBEcm9wZG93bk1lbnUgPSBjc3NgXG5cdG1pbi13aWR0aDogMjAwcHg7XG5gO1xuXG5leHBvcnQgY29uc3QgUmVzZXRMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudERhcmtlcjEwIH07XG5cdGZvbnQtc2l6ZTogMTFweDtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiBzcGFjZSggMyApIH0gKSB9XG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuXG5leHBvcnQgY29uc3QgRGVmYXVsdENvbnRyb2xzSXRlbSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA5MDAgXSB9O1xuXG5cdCYmW2FyaWEtZGlzYWJsZWQ9J3RydWUnXSB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXHRcdG9wYWNpdHk6IDE7XG5cblx0XHQmOmhvdmVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgNzAwIF0gfTtcblx0XHR9XG5cblx0XHQkeyBSZXNldExhYmVsIH0ge1xuXHRcdFx0b3BhY2l0eTogMC4zO1xuXHRcdH1cblx0fVxuYDtcbiJdfQ== */"),
    spacing: /* @__PURE__ */ css("column-gap:", space(4), ";row-gap:", space(4), ";" + (false ? "" : ";label:spacing;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQmEiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQge1xuXHRTdHlsZWRGaWVsZCBhcyBCYXNlQ29udHJvbEZpZWxkLFxuXHRTdHlsZWRIZWxwIGFzIEJhc2VDb250cm9sSGVscCxcblx0V3JhcHBlciBhcyBCYXNlQ29udHJvbFdyYXBwZXIsXG59IGZyb20gJy4uL2Jhc2UtY29udHJvbC9zdHlsZXMvYmFzZS1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5cbmNvbnN0IHRvb2xzUGFuZWxHcmlkID0ge1xuXHRjb2x1bW5zOiAoIGNvbHVtbnM6IG51bWJlciApID0+IGNzc2Bcblx0XHRncmlkLXRlbXBsYXRlLWNvbHVtbnM6ICR7IGByZXBlYXQoICR7IGNvbHVtbnMgfSwgbWlubWF4KDAsIDFmcikgKWAgfTtcblx0YCxcblx0c3BhY2luZzogY3NzYFxuXHRcdGNvbHVtbi1nYXA6ICR7IHNwYWNlKCA0ICkgfTtcblx0XHRyb3ctZ2FwOiAkeyBzcGFjZSggNCApIH07XG5cdGAsXG5cdGl0ZW06IHtcblx0XHRmdWxsV2lkdGg6IGNzc2Bcblx0XHRcdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cdFx0YCxcblx0fSxcbn07XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsID0gKCBjb2x1bW5zOiBudW1iZXIgKSA9PiBjc3NgXG5cdCR7IHRvb2xzUGFuZWxHcmlkLmNvbHVtbnMoIGNvbHVtbnMgKSB9XG5cdCR7IHRvb2xzUGFuZWxHcmlkLnNwYWNpbmcgfVxuXG5cdGJvcmRlci10b3A6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy5ncmF5WyAzMDAgXSB9O1xuXHRtYXJnaW4tdG9wOiAtMXB4O1xuXHRwYWRkaW5nOiAkeyBzcGFjZSggNCApIH07XG5gO1xuXG4vKipcbiAqIEl0ZW1zIGluamVjdGVkIGludG8gYSBUb29sc1BhbmVsIHZpYSBhIHZpcnR1YWwgYnViYmxpbmcgc2xvdCB3aWxsIHJlcXVpcmVcbiAqIGFuIGlubmVyIGRvbSBlbGVtZW50IHRvIGJlIGluamVjdGVkLiBUaGUgZm9sbG93aW5nIHJ1bGUgYWxsb3dzIGZvciB0aGVcbiAqIENTUyBncmlkIGRpc3BsYXkgdG8gYmUgcmUtZXN0YWJsaXNoZWQuXG4gKi9cblxuZXhwb3J0IGNvbnN0IFRvb2xzUGFuZWxXaXRoSW5uZXJXcmFwcGVyID0gKCBjb2x1bW5zOiBudW1iZXIgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0PiBkaXY6bm90KCA6Zmlyc3Qtb2YtdHlwZSApIHtcblx0XHRcdGRpc3BsYXk6IGdyaWQ7XG5cdFx0XHQkeyB0b29sc1BhbmVsR3JpZC5jb2x1bW5zKCBjb2x1bW5zICkgfVxuXHRcdFx0JHsgdG9vbHNQYW5lbEdyaWQuc3BhY2luZyB9XG5cdFx0XHQkeyB0b29sc1BhbmVsR3JpZC5pdGVtLmZ1bGxXaWR0aCB9XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFRvb2xzUGFuZWxIaWRkZW5Jbm5lcldyYXBwZXIgPSBjc3NgXG5cdD4gZGl2Om5vdCggOmZpcnN0LW9mLXR5cGUgKSB7XG5cdFx0ZGlzcGxheTogbm9uZTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFRvb2xzUGFuZWxIZWFkZXIgPSBjc3NgXG5cdCR7IHRvb2xzUGFuZWxHcmlkLml0ZW0uZnVsbFdpZHRoIH1cblx0Z2FwOiAkeyBzcGFjZSggMiApIH07XG5cblx0LyoqXG5cdCAqIFRoZSB0YXJnZXRpbmcgb2YgZHJvcGRvd24gbWVudSBjb21wb25lbnQgY2xhc3NlcyBoZXJlIGlzIGEgdGVtcG9yYXJ5XG5cdCAqIG1lYXN1cmUgb25seS5cblx0ICpcblx0ICogVGhlIGZvbGxvd2luZyBzdHlsZXMgc2hvdWxkIGJlIHJlcGxhY2VkIG9uY2UgdGhlIERyb3Bkb3duTWVudSBoYXMgYmVlblxuXHQgKiByZWZhY3RvcmVkIGFuZCBjYW4gYmUgdGFyZ2V0ZWQgdmlhIGNvbXBvbmVudCBpbnRlcnBvbGF0aW9uLlxuXHQgKi9cblx0LmNvbXBvbmVudHMtZHJvcGRvd24tbWVudSB7XG5cdFx0bWFyZ2luOiAkeyBzcGFjZSggLTEgKSB9IDA7XG5cdFx0bGluZS1oZWlnaHQ6IDA7XG5cdH1cblx0JiYmJiAuY29tcG9uZW50cy1kcm9wZG93bi1tZW51X190b2dnbGUge1xuXHRcdHBhZGRpbmc6IDA7XG5cdFx0bWluLXdpZHRoOiAkeyBzcGFjZSggNiApIH07XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSGVhZGluZyA9IGNzc2Bcblx0Zm9udC1zaXplOiBpbmhlcml0O1xuXHRmb250LXdlaWdodDogJHsgQ09ORklHLmZvbnRXZWlnaHRNZWRpdW0gfTtcblx0bGluZS1oZWlnaHQ6IG5vcm1hbDtcblxuXHQvKiBSZXF1aXJlZCB0byBtZWV0IHNwZWNpZmljaXR5IHJlcXVpcmVtZW50cyB0byBlbnN1cmUgemVybyBtYXJnaW4gKi9cblx0JiYge1xuXHRcdG1hcmdpbjogMDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFRvb2xzUGFuZWxJdGVtID0gY3NzYFxuXHQkeyB0b29sc1BhbmVsR3JpZC5pdGVtLmZ1bGxXaWR0aCB9XG5cblx0LyogQ2xlYXIgc3BhY2luZyBpbiBhbmQgYXJvdW5kIGNvbnRyb2xzIGFkZGVkIGFzIHBhbmVsIGl0ZW1zLiAqL1xuXHQvKiBSZW1vdmUgd2hlbiB0aGV5IGNhbiBiZSBhZGRyZXNzZWQgdmlhIGNvbnRleHQgc3lzdGVtLiAqL1xuXHQmID4gZGl2LFxuXHQmID4gZmllbGRzZXQge1xuXHRcdHBhZGRpbmctYm90dG9tOiAwO1xuXHRcdG1hcmdpbi1ib3R0b206IDA7XG5cdFx0bWF4LXdpZHRoOiAxMDAlO1xuXHR9XG5cblx0LyogUmVtb3ZlIEJhc2VDb250cm9sIGNvbXBvbmVudHMgbWFyZ2lucyBhbmQgbGVhdmUgc3BhY2luZyB0byBncmlkIGxheW91dCAqL1xuXHQmJiAkeyBCYXNlQ29udHJvbFdyYXBwZXIgfSB7XG5cdFx0bWFyZ2luLWJvdHRvbTogMDtcblxuXHRcdC8qKlxuXHRcdCAqIFRvIG1haW50YWluIHByb3BlciBzcGFjaW5nIHdpdGhpbiBhIGJhc2UgY29udHJvbCwgdGhlIGZpZWxkJ3MgYm90dG9tXG5cdFx0ICogbWFyZ2luIHNob3VsZCBvbmx5IGJlIHJlbW92ZWQgd2hlbiB0aGVyZSBpcyBubyBoZWxwIHRleHQgaW5jbHVkZWQgYW5kXG5cdFx0ICogaXQgaXMgdGhlcmVmb3JlIHRoZSBsYXN0LWNoaWxkLlxuXHRcdCAqL1xuXHRcdCR7IEJhc2VDb250cm9sRmllbGQgfTpsYXN0LWNoaWxkIHtcblx0XHRcdG1hcmdpbi1ib3R0b206IDA7XG5cdFx0fVxuXHR9XG5cblx0JHsgQmFzZUNvbnRyb2xIZWxwIH0ge1xuXHRcdG1hcmdpbi1ib3R0b206IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSXRlbVBsYWNlaG9sZGVyID0gY3NzYFxuXHRkaXNwbGF5OiBub25lO1xuYDtcblxuZXhwb3J0IGNvbnN0IERyb3Bkb3duTWVudSA9IGNzc2Bcblx0bWluLXdpZHRoOiAyMDBweDtcbmA7XG5cbmV4cG9ydCBjb25zdCBSZXNldExhYmVsID0gc3R5bGVkLnNwYW5gXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50RGFya2VyMTAgfTtcblx0Zm9udC1zaXplOiAxMXB4O1xuXHRmb250LXdlaWdodDogJHsgQ09ORklHLmZvbnRXZWlnaHRNZWRpdW0gfTtcblx0bGluZS1oZWlnaHQ6IDEuNDtcblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IHNwYWNlKCAzICkgfSApIH1cblx0dGV4dC10cmFuc2Zvcm06IHVwcGVyY2FzZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBEZWZhdWx0Q29udHJvbHNJdGVtID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDkwMCBdIH07XG5cblx0JiZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDcwMCBdIH07XG5cdFx0b3BhY2l0eTogMTtcblxuXHRcdCY6aG92ZXIge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXHRcdH1cblxuXHRcdCR7IFJlc2V0TGFiZWwgfSB7XG5cdFx0XHRvcGFjaXR5OiAwLjM7XG5cdFx0fVxuXHR9XG5gO1xuIl19 */"),
    item: {
      fullWidth: false ? {
        name: "18iuzk9",
        styles: "grid-column:1/-1"
      } : {
        name: "1nz7xr6-fullWidth",
        styles: "grid-column:1/-1;label:fullWidth;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEwQmdCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHtcblx0U3R5bGVkRmllbGQgYXMgQmFzZUNvbnRyb2xGaWVsZCxcblx0U3R5bGVkSGVscCBhcyBCYXNlQ29udHJvbEhlbHAsXG5cdFdyYXBwZXIgYXMgQmFzZUNvbnRyb2xXcmFwcGVyLFxufSBmcm9tICcuLi9iYXNlLWNvbnRyb2wvc3R5bGVzL2Jhc2UtY29udHJvbC1zdHlsZXMnO1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuXG5jb25zdCB0b29sc1BhbmVsR3JpZCA9IHtcblx0Y29sdW1uczogKCBjb2x1bW5zOiBudW1iZXIgKSA9PiBjc3NgXG5cdFx0Z3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiAkeyBgcmVwZWF0KCAkeyBjb2x1bW5zIH0sIG1pbm1heCgwLCAxZnIpIClgIH07XG5cdGAsXG5cdHNwYWNpbmc6IGNzc2Bcblx0XHRjb2x1bW4tZ2FwOiAkeyBzcGFjZSggNCApIH07XG5cdFx0cm93LWdhcDogJHsgc3BhY2UoIDQgKSB9O1xuXHRgLFxuXHRpdGVtOiB7XG5cdFx0ZnVsbFdpZHRoOiBjc3NgXG5cdFx0XHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXHRcdGAsXG5cdH0sXG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbCA9ICggY29sdW1uczogbnVtYmVyICkgPT4gY3NzYFxuXHQkeyB0b29sc1BhbmVsR3JpZC5jb2x1bW5zKCBjb2x1bW5zICkgfVxuXHQkeyB0b29sc1BhbmVsR3JpZC5zcGFjaW5nIH1cblxuXHRib3JkZXItdG9wOiAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSBzb2xpZCAkeyBDT0xPUlMuZ3JheVsgMzAwIF0gfTtcblx0bWFyZ2luLXRvcDogLTFweDtcblx0cGFkZGluZzogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuLyoqXG4gKiBJdGVtcyBpbmplY3RlZCBpbnRvIGEgVG9vbHNQYW5lbCB2aWEgYSB2aXJ0dWFsIGJ1YmJsaW5nIHNsb3Qgd2lsbCByZXF1aXJlXG4gKiBhbiBpbm5lciBkb20gZWxlbWVudCB0byBiZSBpbmplY3RlZC4gVGhlIGZvbGxvd2luZyBydWxlIGFsbG93cyBmb3IgdGhlXG4gKiBDU1MgZ3JpZCBkaXNwbGF5IHRvIGJlIHJlLWVzdGFibGlzaGVkLlxuICovXG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsV2l0aElubmVyV3JhcHBlciA9ICggY29sdW1uczogbnVtYmVyICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdD4gZGl2Om5vdCggOmZpcnN0LW9mLXR5cGUgKSB7XG5cdFx0XHRkaXNwbGF5OiBncmlkO1xuXHRcdFx0JHsgdG9vbHNQYW5lbEdyaWQuY29sdW1ucyggY29sdW1ucyApIH1cblx0XHRcdCR7IHRvb2xzUGFuZWxHcmlkLnNwYWNpbmcgfVxuXHRcdFx0JHsgdG9vbHNQYW5lbEdyaWQuaXRlbS5mdWxsV2lkdGggfVxuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSGlkZGVuSW5uZXJXcmFwcGVyID0gY3NzYFxuXHQ+IGRpdjpub3QoIDpmaXJzdC1vZi10eXBlICkge1xuXHRcdGRpc3BsYXk6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSGVhZGVyID0gY3NzYFxuXHQkeyB0b29sc1BhbmVsR3JpZC5pdGVtLmZ1bGxXaWR0aCB9XG5cdGdhcDogJHsgc3BhY2UoIDIgKSB9O1xuXG5cdC8qKlxuXHQgKiBUaGUgdGFyZ2V0aW5nIG9mIGRyb3Bkb3duIG1lbnUgY29tcG9uZW50IGNsYXNzZXMgaGVyZSBpcyBhIHRlbXBvcmFyeVxuXHQgKiBtZWFzdXJlIG9ubHkuXG5cdCAqXG5cdCAqIFRoZSBmb2xsb3dpbmcgc3R5bGVzIHNob3VsZCBiZSByZXBsYWNlZCBvbmNlIHRoZSBEcm9wZG93bk1lbnUgaGFzIGJlZW5cblx0ICogcmVmYWN0b3JlZCBhbmQgY2FuIGJlIHRhcmdldGVkIHZpYSBjb21wb25lbnQgaW50ZXJwb2xhdGlvbi5cblx0ICovXG5cdC5jb21wb25lbnRzLWRyb3Bkb3duLW1lbnUge1xuXHRcdG1hcmdpbjogJHsgc3BhY2UoIC0xICkgfSAwO1xuXHRcdGxpbmUtaGVpZ2h0OiAwO1xuXHR9XG5cdCYmJiYgLmNvbXBvbmVudHMtZHJvcGRvd24tbWVudV9fdG9nZ2xlIHtcblx0XHRwYWRkaW5nOiAwO1xuXHRcdG1pbi13aWR0aDogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbEhlYWRpbmcgPSBjc3NgXG5cdGZvbnQtc2l6ZTogaW5oZXJpdDtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdGxpbmUtaGVpZ2h0OiBub3JtYWw7XG5cblx0LyogUmVxdWlyZWQgdG8gbWVldCBzcGVjaWZpY2l0eSByZXF1aXJlbWVudHMgdG8gZW5zdXJlIHplcm8gbWFyZ2luICovXG5cdCYmIHtcblx0XHRtYXJnaW46IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSXRlbSA9IGNzc2Bcblx0JHsgdG9vbHNQYW5lbEdyaWQuaXRlbS5mdWxsV2lkdGggfVxuXG5cdC8qIENsZWFyIHNwYWNpbmcgaW4gYW5kIGFyb3VuZCBjb250cm9scyBhZGRlZCBhcyBwYW5lbCBpdGVtcy4gKi9cblx0LyogUmVtb3ZlIHdoZW4gdGhleSBjYW4gYmUgYWRkcmVzc2VkIHZpYSBjb250ZXh0IHN5c3RlbS4gKi9cblx0JiA+IGRpdixcblx0JiA+IGZpZWxkc2V0IHtcblx0XHRwYWRkaW5nLWJvdHRvbTogMDtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0fVxuXG5cdC8qIFJlbW92ZSBCYXNlQ29udHJvbCBjb21wb25lbnRzIG1hcmdpbnMgYW5kIGxlYXZlIHNwYWNpbmcgdG8gZ3JpZCBsYXlvdXQgKi9cblx0JiYgJHsgQmFzZUNvbnRyb2xXcmFwcGVyIH0ge1xuXHRcdG1hcmdpbi1ib3R0b206IDA7XG5cblx0XHQvKipcblx0XHQgKiBUbyBtYWludGFpbiBwcm9wZXIgc3BhY2luZyB3aXRoaW4gYSBiYXNlIGNvbnRyb2wsIHRoZSBmaWVsZCdzIGJvdHRvbVxuXHRcdCAqIG1hcmdpbiBzaG91bGQgb25seSBiZSByZW1vdmVkIHdoZW4gdGhlcmUgaXMgbm8gaGVscCB0ZXh0IGluY2x1ZGVkIGFuZFxuXHRcdCAqIGl0IGlzIHRoZXJlZm9yZSB0aGUgbGFzdC1jaGlsZC5cblx0XHQgKi9cblx0XHQkeyBCYXNlQ29udHJvbEZpZWxkIH06bGFzdC1jaGlsZCB7XG5cdFx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHRcdH1cblx0fVxuXG5cdCR7IEJhc2VDb250cm9sSGVscCB9IHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbEl0ZW1QbGFjZWhvbGRlciA9IGNzc2Bcblx0ZGlzcGxheTogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBEcm9wZG93bk1lbnUgPSBjc3NgXG5cdG1pbi13aWR0aDogMjAwcHg7XG5gO1xuXG5leHBvcnQgY29uc3QgUmVzZXRMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudERhcmtlcjEwIH07XG5cdGZvbnQtc2l6ZTogMTFweDtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiBzcGFjZSggMyApIH0gKSB9XG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuXG5leHBvcnQgY29uc3QgRGVmYXVsdENvbnRyb2xzSXRlbSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA5MDAgXSB9O1xuXG5cdCYmW2FyaWEtZGlzYWJsZWQ9J3RydWUnXSB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXHRcdG9wYWNpdHk6IDE7XG5cblx0XHQmOmhvdmVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgNzAwIF0gfTtcblx0XHR9XG5cblx0XHQkeyBSZXNldExhYmVsIH0ge1xuXHRcdFx0b3BhY2l0eTogMC4zO1xuXHRcdH1cblx0fVxuYDtcbiJdfQ== */",
        toString: _EMOTION_STRINGIFIED_CSS_ERROR__39
      }
    }
  };
  var ToolsPanel = (columns) => /* @__PURE__ */ css(toolsPanelGrid.columns(columns), " ", toolsPanelGrid.spacing, " border-top:", config_values_default.borderWidth, " solid ", COLORS.gray[300], ";margin-top:-1px;padding:", space(4), ";" + (false ? "" : ";label:ToolsPanel;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnQ29EIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHtcblx0U3R5bGVkRmllbGQgYXMgQmFzZUNvbnRyb2xGaWVsZCxcblx0U3R5bGVkSGVscCBhcyBCYXNlQ29udHJvbEhlbHAsXG5cdFdyYXBwZXIgYXMgQmFzZUNvbnRyb2xXcmFwcGVyLFxufSBmcm9tICcuLi9iYXNlLWNvbnRyb2wvc3R5bGVzL2Jhc2UtY29udHJvbC1zdHlsZXMnO1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuXG5jb25zdCB0b29sc1BhbmVsR3JpZCA9IHtcblx0Y29sdW1uczogKCBjb2x1bW5zOiBudW1iZXIgKSA9PiBjc3NgXG5cdFx0Z3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiAkeyBgcmVwZWF0KCAkeyBjb2x1bW5zIH0sIG1pbm1heCgwLCAxZnIpIClgIH07XG5cdGAsXG5cdHNwYWNpbmc6IGNzc2Bcblx0XHRjb2x1bW4tZ2FwOiAkeyBzcGFjZSggNCApIH07XG5cdFx0cm93LWdhcDogJHsgc3BhY2UoIDQgKSB9O1xuXHRgLFxuXHRpdGVtOiB7XG5cdFx0ZnVsbFdpZHRoOiBjc3NgXG5cdFx0XHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXHRcdGAsXG5cdH0sXG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbCA9ICggY29sdW1uczogbnVtYmVyICkgPT4gY3NzYFxuXHQkeyB0b29sc1BhbmVsR3JpZC5jb2x1bW5zKCBjb2x1bW5zICkgfVxuXHQkeyB0b29sc1BhbmVsR3JpZC5zcGFjaW5nIH1cblxuXHRib3JkZXItdG9wOiAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSBzb2xpZCAkeyBDT0xPUlMuZ3JheVsgMzAwIF0gfTtcblx0bWFyZ2luLXRvcDogLTFweDtcblx0cGFkZGluZzogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuLyoqXG4gKiBJdGVtcyBpbmplY3RlZCBpbnRvIGEgVG9vbHNQYW5lbCB2aWEgYSB2aXJ0dWFsIGJ1YmJsaW5nIHNsb3Qgd2lsbCByZXF1aXJlXG4gKiBhbiBpbm5lciBkb20gZWxlbWVudCB0byBiZSBpbmplY3RlZC4gVGhlIGZvbGxvd2luZyBydWxlIGFsbG93cyBmb3IgdGhlXG4gKiBDU1MgZ3JpZCBkaXNwbGF5IHRvIGJlIHJlLWVzdGFibGlzaGVkLlxuICovXG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsV2l0aElubmVyV3JhcHBlciA9ICggY29sdW1uczogbnVtYmVyICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdD4gZGl2Om5vdCggOmZpcnN0LW9mLXR5cGUgKSB7XG5cdFx0XHRkaXNwbGF5OiBncmlkO1xuXHRcdFx0JHsgdG9vbHNQYW5lbEdyaWQuY29sdW1ucyggY29sdW1ucyApIH1cblx0XHRcdCR7IHRvb2xzUGFuZWxHcmlkLnNwYWNpbmcgfVxuXHRcdFx0JHsgdG9vbHNQYW5lbEdyaWQuaXRlbS5mdWxsV2lkdGggfVxuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSGlkZGVuSW5uZXJXcmFwcGVyID0gY3NzYFxuXHQ+IGRpdjpub3QoIDpmaXJzdC1vZi10eXBlICkge1xuXHRcdGRpc3BsYXk6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSGVhZGVyID0gY3NzYFxuXHQkeyB0b29sc1BhbmVsR3JpZC5pdGVtLmZ1bGxXaWR0aCB9XG5cdGdhcDogJHsgc3BhY2UoIDIgKSB9O1xuXG5cdC8qKlxuXHQgKiBUaGUgdGFyZ2V0aW5nIG9mIGRyb3Bkb3duIG1lbnUgY29tcG9uZW50IGNsYXNzZXMgaGVyZSBpcyBhIHRlbXBvcmFyeVxuXHQgKiBtZWFzdXJlIG9ubHkuXG5cdCAqXG5cdCAqIFRoZSBmb2xsb3dpbmcgc3R5bGVzIHNob3VsZCBiZSByZXBsYWNlZCBvbmNlIHRoZSBEcm9wZG93bk1lbnUgaGFzIGJlZW5cblx0ICogcmVmYWN0b3JlZCBhbmQgY2FuIGJlIHRhcmdldGVkIHZpYSBjb21wb25lbnQgaW50ZXJwb2xhdGlvbi5cblx0ICovXG5cdC5jb21wb25lbnRzLWRyb3Bkb3duLW1lbnUge1xuXHRcdG1hcmdpbjogJHsgc3BhY2UoIC0xICkgfSAwO1xuXHRcdGxpbmUtaGVpZ2h0OiAwO1xuXHR9XG5cdCYmJiYgLmNvbXBvbmVudHMtZHJvcGRvd24tbWVudV9fdG9nZ2xlIHtcblx0XHRwYWRkaW5nOiAwO1xuXHRcdG1pbi13aWR0aDogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbEhlYWRpbmcgPSBjc3NgXG5cdGZvbnQtc2l6ZTogaW5oZXJpdDtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdGxpbmUtaGVpZ2h0OiBub3JtYWw7XG5cblx0LyogUmVxdWlyZWQgdG8gbWVldCBzcGVjaWZpY2l0eSByZXF1aXJlbWVudHMgdG8gZW5zdXJlIHplcm8gbWFyZ2luICovXG5cdCYmIHtcblx0XHRtYXJnaW46IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSXRlbSA9IGNzc2Bcblx0JHsgdG9vbHNQYW5lbEdyaWQuaXRlbS5mdWxsV2lkdGggfVxuXG5cdC8qIENsZWFyIHNwYWNpbmcgaW4gYW5kIGFyb3VuZCBjb250cm9scyBhZGRlZCBhcyBwYW5lbCBpdGVtcy4gKi9cblx0LyogUmVtb3ZlIHdoZW4gdGhleSBjYW4gYmUgYWRkcmVzc2VkIHZpYSBjb250ZXh0IHN5c3RlbS4gKi9cblx0JiA+IGRpdixcblx0JiA+IGZpZWxkc2V0IHtcblx0XHRwYWRkaW5nLWJvdHRvbTogMDtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0fVxuXG5cdC8qIFJlbW92ZSBCYXNlQ29udHJvbCBjb21wb25lbnRzIG1hcmdpbnMgYW5kIGxlYXZlIHNwYWNpbmcgdG8gZ3JpZCBsYXlvdXQgKi9cblx0JiYgJHsgQmFzZUNvbnRyb2xXcmFwcGVyIH0ge1xuXHRcdG1hcmdpbi1ib3R0b206IDA7XG5cblx0XHQvKipcblx0XHQgKiBUbyBtYWludGFpbiBwcm9wZXIgc3BhY2luZyB3aXRoaW4gYSBiYXNlIGNvbnRyb2wsIHRoZSBmaWVsZCdzIGJvdHRvbVxuXHRcdCAqIG1hcmdpbiBzaG91bGQgb25seSBiZSByZW1vdmVkIHdoZW4gdGhlcmUgaXMgbm8gaGVscCB0ZXh0IGluY2x1ZGVkIGFuZFxuXHRcdCAqIGl0IGlzIHRoZXJlZm9yZSB0aGUgbGFzdC1jaGlsZC5cblx0XHQgKi9cblx0XHQkeyBCYXNlQ29udHJvbEZpZWxkIH06bGFzdC1jaGlsZCB7XG5cdFx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHRcdH1cblx0fVxuXG5cdCR7IEJhc2VDb250cm9sSGVscCB9IHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbEl0ZW1QbGFjZWhvbGRlciA9IGNzc2Bcblx0ZGlzcGxheTogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBEcm9wZG93bk1lbnUgPSBjc3NgXG5cdG1pbi13aWR0aDogMjAwcHg7XG5gO1xuXG5leHBvcnQgY29uc3QgUmVzZXRMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudERhcmtlcjEwIH07XG5cdGZvbnQtc2l6ZTogMTFweDtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiBzcGFjZSggMyApIH0gKSB9XG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuXG5leHBvcnQgY29uc3QgRGVmYXVsdENvbnRyb2xzSXRlbSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA5MDAgXSB9O1xuXG5cdCYmW2FyaWEtZGlzYWJsZWQ9J3RydWUnXSB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXHRcdG9wYWNpdHk6IDE7XG5cblx0XHQmOmhvdmVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgNzAwIF0gfTtcblx0XHR9XG5cblx0XHQkeyBSZXNldExhYmVsIH0ge1xuXHRcdFx0b3BhY2l0eTogMC4zO1xuXHRcdH1cblx0fVxuYDtcbiJdfQ== */");
  var ToolsPanelWithInnerWrapper = (columns) => {
    return /* @__PURE__ */ css(">div:not( :first-of-type ){display:grid;", toolsPanelGrid.columns(columns), " ", toolsPanelGrid.spacing, " ", toolsPanelGrid.item.fullWidth, ";}" + (false ? "" : ";label:ToolsPanelWithInnerWrapper;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnRFciLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQge1xuXHRTdHlsZWRGaWVsZCBhcyBCYXNlQ29udHJvbEZpZWxkLFxuXHRTdHlsZWRIZWxwIGFzIEJhc2VDb250cm9sSGVscCxcblx0V3JhcHBlciBhcyBCYXNlQ29udHJvbFdyYXBwZXIsXG59IGZyb20gJy4uL2Jhc2UtY29udHJvbC9zdHlsZXMvYmFzZS1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5cbmNvbnN0IHRvb2xzUGFuZWxHcmlkID0ge1xuXHRjb2x1bW5zOiAoIGNvbHVtbnM6IG51bWJlciApID0+IGNzc2Bcblx0XHRncmlkLXRlbXBsYXRlLWNvbHVtbnM6ICR7IGByZXBlYXQoICR7IGNvbHVtbnMgfSwgbWlubWF4KDAsIDFmcikgKWAgfTtcblx0YCxcblx0c3BhY2luZzogY3NzYFxuXHRcdGNvbHVtbi1nYXA6ICR7IHNwYWNlKCA0ICkgfTtcblx0XHRyb3ctZ2FwOiAkeyBzcGFjZSggNCApIH07XG5cdGAsXG5cdGl0ZW06IHtcblx0XHRmdWxsV2lkdGg6IGNzc2Bcblx0XHRcdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cdFx0YCxcblx0fSxcbn07XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsID0gKCBjb2x1bW5zOiBudW1iZXIgKSA9PiBjc3NgXG5cdCR7IHRvb2xzUGFuZWxHcmlkLmNvbHVtbnMoIGNvbHVtbnMgKSB9XG5cdCR7IHRvb2xzUGFuZWxHcmlkLnNwYWNpbmcgfVxuXG5cdGJvcmRlci10b3A6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9IHNvbGlkICR7IENPTE9SUy5ncmF5WyAzMDAgXSB9O1xuXHRtYXJnaW4tdG9wOiAtMXB4O1xuXHRwYWRkaW5nOiAkeyBzcGFjZSggNCApIH07XG5gO1xuXG4vKipcbiAqIEl0ZW1zIGluamVjdGVkIGludG8gYSBUb29sc1BhbmVsIHZpYSBhIHZpcnR1YWwgYnViYmxpbmcgc2xvdCB3aWxsIHJlcXVpcmVcbiAqIGFuIGlubmVyIGRvbSBlbGVtZW50IHRvIGJlIGluamVjdGVkLiBUaGUgZm9sbG93aW5nIHJ1bGUgYWxsb3dzIGZvciB0aGVcbiAqIENTUyBncmlkIGRpc3BsYXkgdG8gYmUgcmUtZXN0YWJsaXNoZWQuXG4gKi9cblxuZXhwb3J0IGNvbnN0IFRvb2xzUGFuZWxXaXRoSW5uZXJXcmFwcGVyID0gKCBjb2x1bW5zOiBudW1iZXIgKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0PiBkaXY6bm90KCA6Zmlyc3Qtb2YtdHlwZSApIHtcblx0XHRcdGRpc3BsYXk6IGdyaWQ7XG5cdFx0XHQkeyB0b29sc1BhbmVsR3JpZC5jb2x1bW5zKCBjb2x1bW5zICkgfVxuXHRcdFx0JHsgdG9vbHNQYW5lbEdyaWQuc3BhY2luZyB9XG5cdFx0XHQkeyB0b29sc1BhbmVsR3JpZC5pdGVtLmZ1bGxXaWR0aCB9XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFRvb2xzUGFuZWxIaWRkZW5Jbm5lcldyYXBwZXIgPSBjc3NgXG5cdD4gZGl2Om5vdCggOmZpcnN0LW9mLXR5cGUgKSB7XG5cdFx0ZGlzcGxheTogbm9uZTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFRvb2xzUGFuZWxIZWFkZXIgPSBjc3NgXG5cdCR7IHRvb2xzUGFuZWxHcmlkLml0ZW0uZnVsbFdpZHRoIH1cblx0Z2FwOiAkeyBzcGFjZSggMiApIH07XG5cblx0LyoqXG5cdCAqIFRoZSB0YXJnZXRpbmcgb2YgZHJvcGRvd24gbWVudSBjb21wb25lbnQgY2xhc3NlcyBoZXJlIGlzIGEgdGVtcG9yYXJ5XG5cdCAqIG1lYXN1cmUgb25seS5cblx0ICpcblx0ICogVGhlIGZvbGxvd2luZyBzdHlsZXMgc2hvdWxkIGJlIHJlcGxhY2VkIG9uY2UgdGhlIERyb3Bkb3duTWVudSBoYXMgYmVlblxuXHQgKiByZWZhY3RvcmVkIGFuZCBjYW4gYmUgdGFyZ2V0ZWQgdmlhIGNvbXBvbmVudCBpbnRlcnBvbGF0aW9uLlxuXHQgKi9cblx0LmNvbXBvbmVudHMtZHJvcGRvd24tbWVudSB7XG5cdFx0bWFyZ2luOiAkeyBzcGFjZSggLTEgKSB9IDA7XG5cdFx0bGluZS1oZWlnaHQ6IDA7XG5cdH1cblx0JiYmJiAuY29tcG9uZW50cy1kcm9wZG93bi1tZW51X190b2dnbGUge1xuXHRcdHBhZGRpbmc6IDA7XG5cdFx0bWluLXdpZHRoOiAkeyBzcGFjZSggNiApIH07XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSGVhZGluZyA9IGNzc2Bcblx0Zm9udC1zaXplOiBpbmhlcml0O1xuXHRmb250LXdlaWdodDogJHsgQ09ORklHLmZvbnRXZWlnaHRNZWRpdW0gfTtcblx0bGluZS1oZWlnaHQ6IG5vcm1hbDtcblxuXHQvKiBSZXF1aXJlZCB0byBtZWV0IHNwZWNpZmljaXR5IHJlcXVpcmVtZW50cyB0byBlbnN1cmUgemVybyBtYXJnaW4gKi9cblx0JiYge1xuXHRcdG1hcmdpbjogMDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFRvb2xzUGFuZWxJdGVtID0gY3NzYFxuXHQkeyB0b29sc1BhbmVsR3JpZC5pdGVtLmZ1bGxXaWR0aCB9XG5cblx0LyogQ2xlYXIgc3BhY2luZyBpbiBhbmQgYXJvdW5kIGNvbnRyb2xzIGFkZGVkIGFzIHBhbmVsIGl0ZW1zLiAqL1xuXHQvKiBSZW1vdmUgd2hlbiB0aGV5IGNhbiBiZSBhZGRyZXNzZWQgdmlhIGNvbnRleHQgc3lzdGVtLiAqL1xuXHQmID4gZGl2LFxuXHQmID4gZmllbGRzZXQge1xuXHRcdHBhZGRpbmctYm90dG9tOiAwO1xuXHRcdG1hcmdpbi1ib3R0b206IDA7XG5cdFx0bWF4LXdpZHRoOiAxMDAlO1xuXHR9XG5cblx0LyogUmVtb3ZlIEJhc2VDb250cm9sIGNvbXBvbmVudHMgbWFyZ2lucyBhbmQgbGVhdmUgc3BhY2luZyB0byBncmlkIGxheW91dCAqL1xuXHQmJiAkeyBCYXNlQ29udHJvbFdyYXBwZXIgfSB7XG5cdFx0bWFyZ2luLWJvdHRvbTogMDtcblxuXHRcdC8qKlxuXHRcdCAqIFRvIG1haW50YWluIHByb3BlciBzcGFjaW5nIHdpdGhpbiBhIGJhc2UgY29udHJvbCwgdGhlIGZpZWxkJ3MgYm90dG9tXG5cdFx0ICogbWFyZ2luIHNob3VsZCBvbmx5IGJlIHJlbW92ZWQgd2hlbiB0aGVyZSBpcyBubyBoZWxwIHRleHQgaW5jbHVkZWQgYW5kXG5cdFx0ICogaXQgaXMgdGhlcmVmb3JlIHRoZSBsYXN0LWNoaWxkLlxuXHRcdCAqL1xuXHRcdCR7IEJhc2VDb250cm9sRmllbGQgfTpsYXN0LWNoaWxkIHtcblx0XHRcdG1hcmdpbi1ib3R0b206IDA7XG5cdFx0fVxuXHR9XG5cblx0JHsgQmFzZUNvbnRyb2xIZWxwIH0ge1xuXHRcdG1hcmdpbi1ib3R0b206IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSXRlbVBsYWNlaG9sZGVyID0gY3NzYFxuXHRkaXNwbGF5OiBub25lO1xuYDtcblxuZXhwb3J0IGNvbnN0IERyb3Bkb3duTWVudSA9IGNzc2Bcblx0bWluLXdpZHRoOiAyMDBweDtcbmA7XG5cbmV4cG9ydCBjb25zdCBSZXNldExhYmVsID0gc3R5bGVkLnNwYW5gXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50RGFya2VyMTAgfTtcblx0Zm9udC1zaXplOiAxMXB4O1xuXHRmb250LXdlaWdodDogJHsgQ09ORklHLmZvbnRXZWlnaHRNZWRpdW0gfTtcblx0bGluZS1oZWlnaHQ6IDEuNDtcblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6IHNwYWNlKCAzICkgfSApIH1cblx0dGV4dC10cmFuc2Zvcm06IHVwcGVyY2FzZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBEZWZhdWx0Q29udHJvbHNJdGVtID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDkwMCBdIH07XG5cblx0JiZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDcwMCBdIH07XG5cdFx0b3BhY2l0eTogMTtcblxuXHRcdCY6aG92ZXIge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXHRcdH1cblxuXHRcdCR7IFJlc2V0TGFiZWwgfSB7XG5cdFx0XHRvcGFjaXR5OiAwLjM7XG5cdFx0fVxuXHR9XG5gO1xuIl19 */");
  };
  var ToolsPanelHiddenInnerWrapper = false ? {
    name: "huufmu",
    styles: ">div:not( :first-of-type ){display:none;}"
  } : {
    name: "1vvi63i-ToolsPanelHiddenInnerWrapper",
    styles: ">div:not( :first-of-type ){display:none;};label:ToolsPanelHiddenInnerWrapper;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEwRCtDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHtcblx0U3R5bGVkRmllbGQgYXMgQmFzZUNvbnRyb2xGaWVsZCxcblx0U3R5bGVkSGVscCBhcyBCYXNlQ29udHJvbEhlbHAsXG5cdFdyYXBwZXIgYXMgQmFzZUNvbnRyb2xXcmFwcGVyLFxufSBmcm9tICcuLi9iYXNlLWNvbnRyb2wvc3R5bGVzL2Jhc2UtY29udHJvbC1zdHlsZXMnO1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuXG5jb25zdCB0b29sc1BhbmVsR3JpZCA9IHtcblx0Y29sdW1uczogKCBjb2x1bW5zOiBudW1iZXIgKSA9PiBjc3NgXG5cdFx0Z3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiAkeyBgcmVwZWF0KCAkeyBjb2x1bW5zIH0sIG1pbm1heCgwLCAxZnIpIClgIH07XG5cdGAsXG5cdHNwYWNpbmc6IGNzc2Bcblx0XHRjb2x1bW4tZ2FwOiAkeyBzcGFjZSggNCApIH07XG5cdFx0cm93LWdhcDogJHsgc3BhY2UoIDQgKSB9O1xuXHRgLFxuXHRpdGVtOiB7XG5cdFx0ZnVsbFdpZHRoOiBjc3NgXG5cdFx0XHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXHRcdGAsXG5cdH0sXG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbCA9ICggY29sdW1uczogbnVtYmVyICkgPT4gY3NzYFxuXHQkeyB0b29sc1BhbmVsR3JpZC5jb2x1bW5zKCBjb2x1bW5zICkgfVxuXHQkeyB0b29sc1BhbmVsR3JpZC5zcGFjaW5nIH1cblxuXHRib3JkZXItdG9wOiAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSBzb2xpZCAkeyBDT0xPUlMuZ3JheVsgMzAwIF0gfTtcblx0bWFyZ2luLXRvcDogLTFweDtcblx0cGFkZGluZzogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuLyoqXG4gKiBJdGVtcyBpbmplY3RlZCBpbnRvIGEgVG9vbHNQYW5lbCB2aWEgYSB2aXJ0dWFsIGJ1YmJsaW5nIHNsb3Qgd2lsbCByZXF1aXJlXG4gKiBhbiBpbm5lciBkb20gZWxlbWVudCB0byBiZSBpbmplY3RlZC4gVGhlIGZvbGxvd2luZyBydWxlIGFsbG93cyBmb3IgdGhlXG4gKiBDU1MgZ3JpZCBkaXNwbGF5IHRvIGJlIHJlLWVzdGFibGlzaGVkLlxuICovXG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsV2l0aElubmVyV3JhcHBlciA9ICggY29sdW1uczogbnVtYmVyICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdD4gZGl2Om5vdCggOmZpcnN0LW9mLXR5cGUgKSB7XG5cdFx0XHRkaXNwbGF5OiBncmlkO1xuXHRcdFx0JHsgdG9vbHNQYW5lbEdyaWQuY29sdW1ucyggY29sdW1ucyApIH1cblx0XHRcdCR7IHRvb2xzUGFuZWxHcmlkLnNwYWNpbmcgfVxuXHRcdFx0JHsgdG9vbHNQYW5lbEdyaWQuaXRlbS5mdWxsV2lkdGggfVxuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSGlkZGVuSW5uZXJXcmFwcGVyID0gY3NzYFxuXHQ+IGRpdjpub3QoIDpmaXJzdC1vZi10eXBlICkge1xuXHRcdGRpc3BsYXk6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSGVhZGVyID0gY3NzYFxuXHQkeyB0b29sc1BhbmVsR3JpZC5pdGVtLmZ1bGxXaWR0aCB9XG5cdGdhcDogJHsgc3BhY2UoIDIgKSB9O1xuXG5cdC8qKlxuXHQgKiBUaGUgdGFyZ2V0aW5nIG9mIGRyb3Bkb3duIG1lbnUgY29tcG9uZW50IGNsYXNzZXMgaGVyZSBpcyBhIHRlbXBvcmFyeVxuXHQgKiBtZWFzdXJlIG9ubHkuXG5cdCAqXG5cdCAqIFRoZSBmb2xsb3dpbmcgc3R5bGVzIHNob3VsZCBiZSByZXBsYWNlZCBvbmNlIHRoZSBEcm9wZG93bk1lbnUgaGFzIGJlZW5cblx0ICogcmVmYWN0b3JlZCBhbmQgY2FuIGJlIHRhcmdldGVkIHZpYSBjb21wb25lbnQgaW50ZXJwb2xhdGlvbi5cblx0ICovXG5cdC5jb21wb25lbnRzLWRyb3Bkb3duLW1lbnUge1xuXHRcdG1hcmdpbjogJHsgc3BhY2UoIC0xICkgfSAwO1xuXHRcdGxpbmUtaGVpZ2h0OiAwO1xuXHR9XG5cdCYmJiYgLmNvbXBvbmVudHMtZHJvcGRvd24tbWVudV9fdG9nZ2xlIHtcblx0XHRwYWRkaW5nOiAwO1xuXHRcdG1pbi13aWR0aDogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbEhlYWRpbmcgPSBjc3NgXG5cdGZvbnQtc2l6ZTogaW5oZXJpdDtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdGxpbmUtaGVpZ2h0OiBub3JtYWw7XG5cblx0LyogUmVxdWlyZWQgdG8gbWVldCBzcGVjaWZpY2l0eSByZXF1aXJlbWVudHMgdG8gZW5zdXJlIHplcm8gbWFyZ2luICovXG5cdCYmIHtcblx0XHRtYXJnaW46IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSXRlbSA9IGNzc2Bcblx0JHsgdG9vbHNQYW5lbEdyaWQuaXRlbS5mdWxsV2lkdGggfVxuXG5cdC8qIENsZWFyIHNwYWNpbmcgaW4gYW5kIGFyb3VuZCBjb250cm9scyBhZGRlZCBhcyBwYW5lbCBpdGVtcy4gKi9cblx0LyogUmVtb3ZlIHdoZW4gdGhleSBjYW4gYmUgYWRkcmVzc2VkIHZpYSBjb250ZXh0IHN5c3RlbS4gKi9cblx0JiA+IGRpdixcblx0JiA+IGZpZWxkc2V0IHtcblx0XHRwYWRkaW5nLWJvdHRvbTogMDtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0fVxuXG5cdC8qIFJlbW92ZSBCYXNlQ29udHJvbCBjb21wb25lbnRzIG1hcmdpbnMgYW5kIGxlYXZlIHNwYWNpbmcgdG8gZ3JpZCBsYXlvdXQgKi9cblx0JiYgJHsgQmFzZUNvbnRyb2xXcmFwcGVyIH0ge1xuXHRcdG1hcmdpbi1ib3R0b206IDA7XG5cblx0XHQvKipcblx0XHQgKiBUbyBtYWludGFpbiBwcm9wZXIgc3BhY2luZyB3aXRoaW4gYSBiYXNlIGNvbnRyb2wsIHRoZSBmaWVsZCdzIGJvdHRvbVxuXHRcdCAqIG1hcmdpbiBzaG91bGQgb25seSBiZSByZW1vdmVkIHdoZW4gdGhlcmUgaXMgbm8gaGVscCB0ZXh0IGluY2x1ZGVkIGFuZFxuXHRcdCAqIGl0IGlzIHRoZXJlZm9yZSB0aGUgbGFzdC1jaGlsZC5cblx0XHQgKi9cblx0XHQkeyBCYXNlQ29udHJvbEZpZWxkIH06bGFzdC1jaGlsZCB7XG5cdFx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHRcdH1cblx0fVxuXG5cdCR7IEJhc2VDb250cm9sSGVscCB9IHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbEl0ZW1QbGFjZWhvbGRlciA9IGNzc2Bcblx0ZGlzcGxheTogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBEcm9wZG93bk1lbnUgPSBjc3NgXG5cdG1pbi13aWR0aDogMjAwcHg7XG5gO1xuXG5leHBvcnQgY29uc3QgUmVzZXRMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudERhcmtlcjEwIH07XG5cdGZvbnQtc2l6ZTogMTFweDtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiBzcGFjZSggMyApIH0gKSB9XG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuXG5leHBvcnQgY29uc3QgRGVmYXVsdENvbnRyb2xzSXRlbSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA5MDAgXSB9O1xuXG5cdCYmW2FyaWEtZGlzYWJsZWQ9J3RydWUnXSB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXHRcdG9wYWNpdHk6IDE7XG5cblx0XHQmOmhvdmVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgNzAwIF0gfTtcblx0XHR9XG5cblx0XHQkeyBSZXNldExhYmVsIH0ge1xuXHRcdFx0b3BhY2l0eTogMC4zO1xuXHRcdH1cblx0fVxuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__39
  };
  var ToolsPanelHeader = /* @__PURE__ */ css(toolsPanelGrid.item.fullWidth, " gap:", space(2), ";.components-dropdown-menu{margin:", space(-1), " 0;line-height:0;}&&&& .components-dropdown-menu__toggle{padding:0;min-width:", space(6), ";}" + (false ? "" : ";label:ToolsPanelHeader;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnRW1DIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHtcblx0U3R5bGVkRmllbGQgYXMgQmFzZUNvbnRyb2xGaWVsZCxcblx0U3R5bGVkSGVscCBhcyBCYXNlQ29udHJvbEhlbHAsXG5cdFdyYXBwZXIgYXMgQmFzZUNvbnRyb2xXcmFwcGVyLFxufSBmcm9tICcuLi9iYXNlLWNvbnRyb2wvc3R5bGVzL2Jhc2UtY29udHJvbC1zdHlsZXMnO1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuXG5jb25zdCB0b29sc1BhbmVsR3JpZCA9IHtcblx0Y29sdW1uczogKCBjb2x1bW5zOiBudW1iZXIgKSA9PiBjc3NgXG5cdFx0Z3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiAkeyBgcmVwZWF0KCAkeyBjb2x1bW5zIH0sIG1pbm1heCgwLCAxZnIpIClgIH07XG5cdGAsXG5cdHNwYWNpbmc6IGNzc2Bcblx0XHRjb2x1bW4tZ2FwOiAkeyBzcGFjZSggNCApIH07XG5cdFx0cm93LWdhcDogJHsgc3BhY2UoIDQgKSB9O1xuXHRgLFxuXHRpdGVtOiB7XG5cdFx0ZnVsbFdpZHRoOiBjc3NgXG5cdFx0XHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXHRcdGAsXG5cdH0sXG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbCA9ICggY29sdW1uczogbnVtYmVyICkgPT4gY3NzYFxuXHQkeyB0b29sc1BhbmVsR3JpZC5jb2x1bW5zKCBjb2x1bW5zICkgfVxuXHQkeyB0b29sc1BhbmVsR3JpZC5zcGFjaW5nIH1cblxuXHRib3JkZXItdG9wOiAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSBzb2xpZCAkeyBDT0xPUlMuZ3JheVsgMzAwIF0gfTtcblx0bWFyZ2luLXRvcDogLTFweDtcblx0cGFkZGluZzogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuLyoqXG4gKiBJdGVtcyBpbmplY3RlZCBpbnRvIGEgVG9vbHNQYW5lbCB2aWEgYSB2aXJ0dWFsIGJ1YmJsaW5nIHNsb3Qgd2lsbCByZXF1aXJlXG4gKiBhbiBpbm5lciBkb20gZWxlbWVudCB0byBiZSBpbmplY3RlZC4gVGhlIGZvbGxvd2luZyBydWxlIGFsbG93cyBmb3IgdGhlXG4gKiBDU1MgZ3JpZCBkaXNwbGF5IHRvIGJlIHJlLWVzdGFibGlzaGVkLlxuICovXG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsV2l0aElubmVyV3JhcHBlciA9ICggY29sdW1uczogbnVtYmVyICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdD4gZGl2Om5vdCggOmZpcnN0LW9mLXR5cGUgKSB7XG5cdFx0XHRkaXNwbGF5OiBncmlkO1xuXHRcdFx0JHsgdG9vbHNQYW5lbEdyaWQuY29sdW1ucyggY29sdW1ucyApIH1cblx0XHRcdCR7IHRvb2xzUGFuZWxHcmlkLnNwYWNpbmcgfVxuXHRcdFx0JHsgdG9vbHNQYW5lbEdyaWQuaXRlbS5mdWxsV2lkdGggfVxuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSGlkZGVuSW5uZXJXcmFwcGVyID0gY3NzYFxuXHQ+IGRpdjpub3QoIDpmaXJzdC1vZi10eXBlICkge1xuXHRcdGRpc3BsYXk6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSGVhZGVyID0gY3NzYFxuXHQkeyB0b29sc1BhbmVsR3JpZC5pdGVtLmZ1bGxXaWR0aCB9XG5cdGdhcDogJHsgc3BhY2UoIDIgKSB9O1xuXG5cdC8qKlxuXHQgKiBUaGUgdGFyZ2V0aW5nIG9mIGRyb3Bkb3duIG1lbnUgY29tcG9uZW50IGNsYXNzZXMgaGVyZSBpcyBhIHRlbXBvcmFyeVxuXHQgKiBtZWFzdXJlIG9ubHkuXG5cdCAqXG5cdCAqIFRoZSBmb2xsb3dpbmcgc3R5bGVzIHNob3VsZCBiZSByZXBsYWNlZCBvbmNlIHRoZSBEcm9wZG93bk1lbnUgaGFzIGJlZW5cblx0ICogcmVmYWN0b3JlZCBhbmQgY2FuIGJlIHRhcmdldGVkIHZpYSBjb21wb25lbnQgaW50ZXJwb2xhdGlvbi5cblx0ICovXG5cdC5jb21wb25lbnRzLWRyb3Bkb3duLW1lbnUge1xuXHRcdG1hcmdpbjogJHsgc3BhY2UoIC0xICkgfSAwO1xuXHRcdGxpbmUtaGVpZ2h0OiAwO1xuXHR9XG5cdCYmJiYgLmNvbXBvbmVudHMtZHJvcGRvd24tbWVudV9fdG9nZ2xlIHtcblx0XHRwYWRkaW5nOiAwO1xuXHRcdG1pbi13aWR0aDogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbEhlYWRpbmcgPSBjc3NgXG5cdGZvbnQtc2l6ZTogaW5oZXJpdDtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdGxpbmUtaGVpZ2h0OiBub3JtYWw7XG5cblx0LyogUmVxdWlyZWQgdG8gbWVldCBzcGVjaWZpY2l0eSByZXF1aXJlbWVudHMgdG8gZW5zdXJlIHplcm8gbWFyZ2luICovXG5cdCYmIHtcblx0XHRtYXJnaW46IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSXRlbSA9IGNzc2Bcblx0JHsgdG9vbHNQYW5lbEdyaWQuaXRlbS5mdWxsV2lkdGggfVxuXG5cdC8qIENsZWFyIHNwYWNpbmcgaW4gYW5kIGFyb3VuZCBjb250cm9scyBhZGRlZCBhcyBwYW5lbCBpdGVtcy4gKi9cblx0LyogUmVtb3ZlIHdoZW4gdGhleSBjYW4gYmUgYWRkcmVzc2VkIHZpYSBjb250ZXh0IHN5c3RlbS4gKi9cblx0JiA+IGRpdixcblx0JiA+IGZpZWxkc2V0IHtcblx0XHRwYWRkaW5nLWJvdHRvbTogMDtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0fVxuXG5cdC8qIFJlbW92ZSBCYXNlQ29udHJvbCBjb21wb25lbnRzIG1hcmdpbnMgYW5kIGxlYXZlIHNwYWNpbmcgdG8gZ3JpZCBsYXlvdXQgKi9cblx0JiYgJHsgQmFzZUNvbnRyb2xXcmFwcGVyIH0ge1xuXHRcdG1hcmdpbi1ib3R0b206IDA7XG5cblx0XHQvKipcblx0XHQgKiBUbyBtYWludGFpbiBwcm9wZXIgc3BhY2luZyB3aXRoaW4gYSBiYXNlIGNvbnRyb2wsIHRoZSBmaWVsZCdzIGJvdHRvbVxuXHRcdCAqIG1hcmdpbiBzaG91bGQgb25seSBiZSByZW1vdmVkIHdoZW4gdGhlcmUgaXMgbm8gaGVscCB0ZXh0IGluY2x1ZGVkIGFuZFxuXHRcdCAqIGl0IGlzIHRoZXJlZm9yZSB0aGUgbGFzdC1jaGlsZC5cblx0XHQgKi9cblx0XHQkeyBCYXNlQ29udHJvbEZpZWxkIH06bGFzdC1jaGlsZCB7XG5cdFx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHRcdH1cblx0fVxuXG5cdCR7IEJhc2VDb250cm9sSGVscCB9IHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbEl0ZW1QbGFjZWhvbGRlciA9IGNzc2Bcblx0ZGlzcGxheTogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBEcm9wZG93bk1lbnUgPSBjc3NgXG5cdG1pbi13aWR0aDogMjAwcHg7XG5gO1xuXG5leHBvcnQgY29uc3QgUmVzZXRMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudERhcmtlcjEwIH07XG5cdGZvbnQtc2l6ZTogMTFweDtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiBzcGFjZSggMyApIH0gKSB9XG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuXG5leHBvcnQgY29uc3QgRGVmYXVsdENvbnRyb2xzSXRlbSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA5MDAgXSB9O1xuXG5cdCYmW2FyaWEtZGlzYWJsZWQ9J3RydWUnXSB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXHRcdG9wYWNpdHk6IDE7XG5cblx0XHQmOmhvdmVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgNzAwIF0gfTtcblx0XHR9XG5cblx0XHQkeyBSZXNldExhYmVsIH0ge1xuXHRcdFx0b3BhY2l0eTogMC4zO1xuXHRcdH1cblx0fVxuYDtcbiJdfQ== */");
  var ToolsPanelHeading = /* @__PURE__ */ css("font-size:inherit;font-weight:", config_values_default.fontWeightMedium, ";line-height:normal;&&{margin:0;}" + (false ? "" : ";label:ToolsPanelHeading;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxRm9DIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHtcblx0U3R5bGVkRmllbGQgYXMgQmFzZUNvbnRyb2xGaWVsZCxcblx0U3R5bGVkSGVscCBhcyBCYXNlQ29udHJvbEhlbHAsXG5cdFdyYXBwZXIgYXMgQmFzZUNvbnRyb2xXcmFwcGVyLFxufSBmcm9tICcuLi9iYXNlLWNvbnRyb2wvc3R5bGVzL2Jhc2UtY29udHJvbC1zdHlsZXMnO1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuXG5jb25zdCB0b29sc1BhbmVsR3JpZCA9IHtcblx0Y29sdW1uczogKCBjb2x1bW5zOiBudW1iZXIgKSA9PiBjc3NgXG5cdFx0Z3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiAkeyBgcmVwZWF0KCAkeyBjb2x1bW5zIH0sIG1pbm1heCgwLCAxZnIpIClgIH07XG5cdGAsXG5cdHNwYWNpbmc6IGNzc2Bcblx0XHRjb2x1bW4tZ2FwOiAkeyBzcGFjZSggNCApIH07XG5cdFx0cm93LWdhcDogJHsgc3BhY2UoIDQgKSB9O1xuXHRgLFxuXHRpdGVtOiB7XG5cdFx0ZnVsbFdpZHRoOiBjc3NgXG5cdFx0XHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXHRcdGAsXG5cdH0sXG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbCA9ICggY29sdW1uczogbnVtYmVyICkgPT4gY3NzYFxuXHQkeyB0b29sc1BhbmVsR3JpZC5jb2x1bW5zKCBjb2x1bW5zICkgfVxuXHQkeyB0b29sc1BhbmVsR3JpZC5zcGFjaW5nIH1cblxuXHRib3JkZXItdG9wOiAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSBzb2xpZCAkeyBDT0xPUlMuZ3JheVsgMzAwIF0gfTtcblx0bWFyZ2luLXRvcDogLTFweDtcblx0cGFkZGluZzogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuLyoqXG4gKiBJdGVtcyBpbmplY3RlZCBpbnRvIGEgVG9vbHNQYW5lbCB2aWEgYSB2aXJ0dWFsIGJ1YmJsaW5nIHNsb3Qgd2lsbCByZXF1aXJlXG4gKiBhbiBpbm5lciBkb20gZWxlbWVudCB0byBiZSBpbmplY3RlZC4gVGhlIGZvbGxvd2luZyBydWxlIGFsbG93cyBmb3IgdGhlXG4gKiBDU1MgZ3JpZCBkaXNwbGF5IHRvIGJlIHJlLWVzdGFibGlzaGVkLlxuICovXG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsV2l0aElubmVyV3JhcHBlciA9ICggY29sdW1uczogbnVtYmVyICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdD4gZGl2Om5vdCggOmZpcnN0LW9mLXR5cGUgKSB7XG5cdFx0XHRkaXNwbGF5OiBncmlkO1xuXHRcdFx0JHsgdG9vbHNQYW5lbEdyaWQuY29sdW1ucyggY29sdW1ucyApIH1cblx0XHRcdCR7IHRvb2xzUGFuZWxHcmlkLnNwYWNpbmcgfVxuXHRcdFx0JHsgdG9vbHNQYW5lbEdyaWQuaXRlbS5mdWxsV2lkdGggfVxuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSGlkZGVuSW5uZXJXcmFwcGVyID0gY3NzYFxuXHQ+IGRpdjpub3QoIDpmaXJzdC1vZi10eXBlICkge1xuXHRcdGRpc3BsYXk6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSGVhZGVyID0gY3NzYFxuXHQkeyB0b29sc1BhbmVsR3JpZC5pdGVtLmZ1bGxXaWR0aCB9XG5cdGdhcDogJHsgc3BhY2UoIDIgKSB9O1xuXG5cdC8qKlxuXHQgKiBUaGUgdGFyZ2V0aW5nIG9mIGRyb3Bkb3duIG1lbnUgY29tcG9uZW50IGNsYXNzZXMgaGVyZSBpcyBhIHRlbXBvcmFyeVxuXHQgKiBtZWFzdXJlIG9ubHkuXG5cdCAqXG5cdCAqIFRoZSBmb2xsb3dpbmcgc3R5bGVzIHNob3VsZCBiZSByZXBsYWNlZCBvbmNlIHRoZSBEcm9wZG93bk1lbnUgaGFzIGJlZW5cblx0ICogcmVmYWN0b3JlZCBhbmQgY2FuIGJlIHRhcmdldGVkIHZpYSBjb21wb25lbnQgaW50ZXJwb2xhdGlvbi5cblx0ICovXG5cdC5jb21wb25lbnRzLWRyb3Bkb3duLW1lbnUge1xuXHRcdG1hcmdpbjogJHsgc3BhY2UoIC0xICkgfSAwO1xuXHRcdGxpbmUtaGVpZ2h0OiAwO1xuXHR9XG5cdCYmJiYgLmNvbXBvbmVudHMtZHJvcGRvd24tbWVudV9fdG9nZ2xlIHtcblx0XHRwYWRkaW5nOiAwO1xuXHRcdG1pbi13aWR0aDogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbEhlYWRpbmcgPSBjc3NgXG5cdGZvbnQtc2l6ZTogaW5oZXJpdDtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdGxpbmUtaGVpZ2h0OiBub3JtYWw7XG5cblx0LyogUmVxdWlyZWQgdG8gbWVldCBzcGVjaWZpY2l0eSByZXF1aXJlbWVudHMgdG8gZW5zdXJlIHplcm8gbWFyZ2luICovXG5cdCYmIHtcblx0XHRtYXJnaW46IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSXRlbSA9IGNzc2Bcblx0JHsgdG9vbHNQYW5lbEdyaWQuaXRlbS5mdWxsV2lkdGggfVxuXG5cdC8qIENsZWFyIHNwYWNpbmcgaW4gYW5kIGFyb3VuZCBjb250cm9scyBhZGRlZCBhcyBwYW5lbCBpdGVtcy4gKi9cblx0LyogUmVtb3ZlIHdoZW4gdGhleSBjYW4gYmUgYWRkcmVzc2VkIHZpYSBjb250ZXh0IHN5c3RlbS4gKi9cblx0JiA+IGRpdixcblx0JiA+IGZpZWxkc2V0IHtcblx0XHRwYWRkaW5nLWJvdHRvbTogMDtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0fVxuXG5cdC8qIFJlbW92ZSBCYXNlQ29udHJvbCBjb21wb25lbnRzIG1hcmdpbnMgYW5kIGxlYXZlIHNwYWNpbmcgdG8gZ3JpZCBsYXlvdXQgKi9cblx0JiYgJHsgQmFzZUNvbnRyb2xXcmFwcGVyIH0ge1xuXHRcdG1hcmdpbi1ib3R0b206IDA7XG5cblx0XHQvKipcblx0XHQgKiBUbyBtYWludGFpbiBwcm9wZXIgc3BhY2luZyB3aXRoaW4gYSBiYXNlIGNvbnRyb2wsIHRoZSBmaWVsZCdzIGJvdHRvbVxuXHRcdCAqIG1hcmdpbiBzaG91bGQgb25seSBiZSByZW1vdmVkIHdoZW4gdGhlcmUgaXMgbm8gaGVscCB0ZXh0IGluY2x1ZGVkIGFuZFxuXHRcdCAqIGl0IGlzIHRoZXJlZm9yZSB0aGUgbGFzdC1jaGlsZC5cblx0XHQgKi9cblx0XHQkeyBCYXNlQ29udHJvbEZpZWxkIH06bGFzdC1jaGlsZCB7XG5cdFx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHRcdH1cblx0fVxuXG5cdCR7IEJhc2VDb250cm9sSGVscCB9IHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbEl0ZW1QbGFjZWhvbGRlciA9IGNzc2Bcblx0ZGlzcGxheTogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBEcm9wZG93bk1lbnUgPSBjc3NgXG5cdG1pbi13aWR0aDogMjAwcHg7XG5gO1xuXG5leHBvcnQgY29uc3QgUmVzZXRMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudERhcmtlcjEwIH07XG5cdGZvbnQtc2l6ZTogMTFweDtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiBzcGFjZSggMyApIH0gKSB9XG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuXG5leHBvcnQgY29uc3QgRGVmYXVsdENvbnRyb2xzSXRlbSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA5MDAgXSB9O1xuXG5cdCYmW2FyaWEtZGlzYWJsZWQ9J3RydWUnXSB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXHRcdG9wYWNpdHk6IDE7XG5cblx0XHQmOmhvdmVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgNzAwIF0gfTtcblx0XHR9XG5cblx0XHQkeyBSZXNldExhYmVsIH0ge1xuXHRcdFx0b3BhY2l0eTogMC4zO1xuXHRcdH1cblx0fVxuYDtcbiJdfQ== */");
  var ToolsPanelItem = /* @__PURE__ */ css(toolsPanelGrid.item.fullWidth, "&>div,&>fieldset{padding-bottom:0;margin-bottom:0;max-width:100%;}&& ", Wrapper, "{margin-bottom:0;", StyledField, ":last-child{margin-bottom:0;}}", StyledHelp, "{margin-bottom:0;}" + (false ? "" : ";label:ToolsPanelItem;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnR2lDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHtcblx0U3R5bGVkRmllbGQgYXMgQmFzZUNvbnRyb2xGaWVsZCxcblx0U3R5bGVkSGVscCBhcyBCYXNlQ29udHJvbEhlbHAsXG5cdFdyYXBwZXIgYXMgQmFzZUNvbnRyb2xXcmFwcGVyLFxufSBmcm9tICcuLi9iYXNlLWNvbnRyb2wvc3R5bGVzL2Jhc2UtY29udHJvbC1zdHlsZXMnO1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuXG5jb25zdCB0b29sc1BhbmVsR3JpZCA9IHtcblx0Y29sdW1uczogKCBjb2x1bW5zOiBudW1iZXIgKSA9PiBjc3NgXG5cdFx0Z3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiAkeyBgcmVwZWF0KCAkeyBjb2x1bW5zIH0sIG1pbm1heCgwLCAxZnIpIClgIH07XG5cdGAsXG5cdHNwYWNpbmc6IGNzc2Bcblx0XHRjb2x1bW4tZ2FwOiAkeyBzcGFjZSggNCApIH07XG5cdFx0cm93LWdhcDogJHsgc3BhY2UoIDQgKSB9O1xuXHRgLFxuXHRpdGVtOiB7XG5cdFx0ZnVsbFdpZHRoOiBjc3NgXG5cdFx0XHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXHRcdGAsXG5cdH0sXG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbCA9ICggY29sdW1uczogbnVtYmVyICkgPT4gY3NzYFxuXHQkeyB0b29sc1BhbmVsR3JpZC5jb2x1bW5zKCBjb2x1bW5zICkgfVxuXHQkeyB0b29sc1BhbmVsR3JpZC5zcGFjaW5nIH1cblxuXHRib3JkZXItdG9wOiAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSBzb2xpZCAkeyBDT0xPUlMuZ3JheVsgMzAwIF0gfTtcblx0bWFyZ2luLXRvcDogLTFweDtcblx0cGFkZGluZzogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuLyoqXG4gKiBJdGVtcyBpbmplY3RlZCBpbnRvIGEgVG9vbHNQYW5lbCB2aWEgYSB2aXJ0dWFsIGJ1YmJsaW5nIHNsb3Qgd2lsbCByZXF1aXJlXG4gKiBhbiBpbm5lciBkb20gZWxlbWVudCB0byBiZSBpbmplY3RlZC4gVGhlIGZvbGxvd2luZyBydWxlIGFsbG93cyBmb3IgdGhlXG4gKiBDU1MgZ3JpZCBkaXNwbGF5IHRvIGJlIHJlLWVzdGFibGlzaGVkLlxuICovXG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsV2l0aElubmVyV3JhcHBlciA9ICggY29sdW1uczogbnVtYmVyICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdD4gZGl2Om5vdCggOmZpcnN0LW9mLXR5cGUgKSB7XG5cdFx0XHRkaXNwbGF5OiBncmlkO1xuXHRcdFx0JHsgdG9vbHNQYW5lbEdyaWQuY29sdW1ucyggY29sdW1ucyApIH1cblx0XHRcdCR7IHRvb2xzUGFuZWxHcmlkLnNwYWNpbmcgfVxuXHRcdFx0JHsgdG9vbHNQYW5lbEdyaWQuaXRlbS5mdWxsV2lkdGggfVxuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSGlkZGVuSW5uZXJXcmFwcGVyID0gY3NzYFxuXHQ+IGRpdjpub3QoIDpmaXJzdC1vZi10eXBlICkge1xuXHRcdGRpc3BsYXk6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSGVhZGVyID0gY3NzYFxuXHQkeyB0b29sc1BhbmVsR3JpZC5pdGVtLmZ1bGxXaWR0aCB9XG5cdGdhcDogJHsgc3BhY2UoIDIgKSB9O1xuXG5cdC8qKlxuXHQgKiBUaGUgdGFyZ2V0aW5nIG9mIGRyb3Bkb3duIG1lbnUgY29tcG9uZW50IGNsYXNzZXMgaGVyZSBpcyBhIHRlbXBvcmFyeVxuXHQgKiBtZWFzdXJlIG9ubHkuXG5cdCAqXG5cdCAqIFRoZSBmb2xsb3dpbmcgc3R5bGVzIHNob3VsZCBiZSByZXBsYWNlZCBvbmNlIHRoZSBEcm9wZG93bk1lbnUgaGFzIGJlZW5cblx0ICogcmVmYWN0b3JlZCBhbmQgY2FuIGJlIHRhcmdldGVkIHZpYSBjb21wb25lbnQgaW50ZXJwb2xhdGlvbi5cblx0ICovXG5cdC5jb21wb25lbnRzLWRyb3Bkb3duLW1lbnUge1xuXHRcdG1hcmdpbjogJHsgc3BhY2UoIC0xICkgfSAwO1xuXHRcdGxpbmUtaGVpZ2h0OiAwO1xuXHR9XG5cdCYmJiYgLmNvbXBvbmVudHMtZHJvcGRvd24tbWVudV9fdG9nZ2xlIHtcblx0XHRwYWRkaW5nOiAwO1xuXHRcdG1pbi13aWR0aDogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbEhlYWRpbmcgPSBjc3NgXG5cdGZvbnQtc2l6ZTogaW5oZXJpdDtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdGxpbmUtaGVpZ2h0OiBub3JtYWw7XG5cblx0LyogUmVxdWlyZWQgdG8gbWVldCBzcGVjaWZpY2l0eSByZXF1aXJlbWVudHMgdG8gZW5zdXJlIHplcm8gbWFyZ2luICovXG5cdCYmIHtcblx0XHRtYXJnaW46IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSXRlbSA9IGNzc2Bcblx0JHsgdG9vbHNQYW5lbEdyaWQuaXRlbS5mdWxsV2lkdGggfVxuXG5cdC8qIENsZWFyIHNwYWNpbmcgaW4gYW5kIGFyb3VuZCBjb250cm9scyBhZGRlZCBhcyBwYW5lbCBpdGVtcy4gKi9cblx0LyogUmVtb3ZlIHdoZW4gdGhleSBjYW4gYmUgYWRkcmVzc2VkIHZpYSBjb250ZXh0IHN5c3RlbS4gKi9cblx0JiA+IGRpdixcblx0JiA+IGZpZWxkc2V0IHtcblx0XHRwYWRkaW5nLWJvdHRvbTogMDtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0fVxuXG5cdC8qIFJlbW92ZSBCYXNlQ29udHJvbCBjb21wb25lbnRzIG1hcmdpbnMgYW5kIGxlYXZlIHNwYWNpbmcgdG8gZ3JpZCBsYXlvdXQgKi9cblx0JiYgJHsgQmFzZUNvbnRyb2xXcmFwcGVyIH0ge1xuXHRcdG1hcmdpbi1ib3R0b206IDA7XG5cblx0XHQvKipcblx0XHQgKiBUbyBtYWludGFpbiBwcm9wZXIgc3BhY2luZyB3aXRoaW4gYSBiYXNlIGNvbnRyb2wsIHRoZSBmaWVsZCdzIGJvdHRvbVxuXHRcdCAqIG1hcmdpbiBzaG91bGQgb25seSBiZSByZW1vdmVkIHdoZW4gdGhlcmUgaXMgbm8gaGVscCB0ZXh0IGluY2x1ZGVkIGFuZFxuXHRcdCAqIGl0IGlzIHRoZXJlZm9yZSB0aGUgbGFzdC1jaGlsZC5cblx0XHQgKi9cblx0XHQkeyBCYXNlQ29udHJvbEZpZWxkIH06bGFzdC1jaGlsZCB7XG5cdFx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHRcdH1cblx0fVxuXG5cdCR7IEJhc2VDb250cm9sSGVscCB9IHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbEl0ZW1QbGFjZWhvbGRlciA9IGNzc2Bcblx0ZGlzcGxheTogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBEcm9wZG93bk1lbnUgPSBjc3NgXG5cdG1pbi13aWR0aDogMjAwcHg7XG5gO1xuXG5leHBvcnQgY29uc3QgUmVzZXRMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudERhcmtlcjEwIH07XG5cdGZvbnQtc2l6ZTogMTFweDtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiBzcGFjZSggMyApIH0gKSB9XG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuXG5leHBvcnQgY29uc3QgRGVmYXVsdENvbnRyb2xzSXRlbSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA5MDAgXSB9O1xuXG5cdCYmW2FyaWEtZGlzYWJsZWQ9J3RydWUnXSB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXHRcdG9wYWNpdHk6IDE7XG5cblx0XHQmOmhvdmVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgNzAwIF0gfTtcblx0XHR9XG5cblx0XHQkeyBSZXNldExhYmVsIH0ge1xuXHRcdFx0b3BhY2l0eTogMC4zO1xuXHRcdH1cblx0fVxuYDtcbiJdfQ== */");
  var ToolsPanelItemPlaceholder = false ? {
    name: "eivff4",
    styles: "display:none"
  } : {
    name: "16a3kc6-ToolsPanelItemPlaceholder",
    styles: "display:none;label:ToolsPanelItemPlaceholder;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUErSDRDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHtcblx0U3R5bGVkRmllbGQgYXMgQmFzZUNvbnRyb2xGaWVsZCxcblx0U3R5bGVkSGVscCBhcyBCYXNlQ29udHJvbEhlbHAsXG5cdFdyYXBwZXIgYXMgQmFzZUNvbnRyb2xXcmFwcGVyLFxufSBmcm9tICcuLi9iYXNlLWNvbnRyb2wvc3R5bGVzL2Jhc2UtY29udHJvbC1zdHlsZXMnO1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuXG5jb25zdCB0b29sc1BhbmVsR3JpZCA9IHtcblx0Y29sdW1uczogKCBjb2x1bW5zOiBudW1iZXIgKSA9PiBjc3NgXG5cdFx0Z3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiAkeyBgcmVwZWF0KCAkeyBjb2x1bW5zIH0sIG1pbm1heCgwLCAxZnIpIClgIH07XG5cdGAsXG5cdHNwYWNpbmc6IGNzc2Bcblx0XHRjb2x1bW4tZ2FwOiAkeyBzcGFjZSggNCApIH07XG5cdFx0cm93LWdhcDogJHsgc3BhY2UoIDQgKSB9O1xuXHRgLFxuXHRpdGVtOiB7XG5cdFx0ZnVsbFdpZHRoOiBjc3NgXG5cdFx0XHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXHRcdGAsXG5cdH0sXG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbCA9ICggY29sdW1uczogbnVtYmVyICkgPT4gY3NzYFxuXHQkeyB0b29sc1BhbmVsR3JpZC5jb2x1bW5zKCBjb2x1bW5zICkgfVxuXHQkeyB0b29sc1BhbmVsR3JpZC5zcGFjaW5nIH1cblxuXHRib3JkZXItdG9wOiAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSBzb2xpZCAkeyBDT0xPUlMuZ3JheVsgMzAwIF0gfTtcblx0bWFyZ2luLXRvcDogLTFweDtcblx0cGFkZGluZzogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuLyoqXG4gKiBJdGVtcyBpbmplY3RlZCBpbnRvIGEgVG9vbHNQYW5lbCB2aWEgYSB2aXJ0dWFsIGJ1YmJsaW5nIHNsb3Qgd2lsbCByZXF1aXJlXG4gKiBhbiBpbm5lciBkb20gZWxlbWVudCB0byBiZSBpbmplY3RlZC4gVGhlIGZvbGxvd2luZyBydWxlIGFsbG93cyBmb3IgdGhlXG4gKiBDU1MgZ3JpZCBkaXNwbGF5IHRvIGJlIHJlLWVzdGFibGlzaGVkLlxuICovXG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsV2l0aElubmVyV3JhcHBlciA9ICggY29sdW1uczogbnVtYmVyICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdD4gZGl2Om5vdCggOmZpcnN0LW9mLXR5cGUgKSB7XG5cdFx0XHRkaXNwbGF5OiBncmlkO1xuXHRcdFx0JHsgdG9vbHNQYW5lbEdyaWQuY29sdW1ucyggY29sdW1ucyApIH1cblx0XHRcdCR7IHRvb2xzUGFuZWxHcmlkLnNwYWNpbmcgfVxuXHRcdFx0JHsgdG9vbHNQYW5lbEdyaWQuaXRlbS5mdWxsV2lkdGggfVxuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSGlkZGVuSW5uZXJXcmFwcGVyID0gY3NzYFxuXHQ+IGRpdjpub3QoIDpmaXJzdC1vZi10eXBlICkge1xuXHRcdGRpc3BsYXk6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSGVhZGVyID0gY3NzYFxuXHQkeyB0b29sc1BhbmVsR3JpZC5pdGVtLmZ1bGxXaWR0aCB9XG5cdGdhcDogJHsgc3BhY2UoIDIgKSB9O1xuXG5cdC8qKlxuXHQgKiBUaGUgdGFyZ2V0aW5nIG9mIGRyb3Bkb3duIG1lbnUgY29tcG9uZW50IGNsYXNzZXMgaGVyZSBpcyBhIHRlbXBvcmFyeVxuXHQgKiBtZWFzdXJlIG9ubHkuXG5cdCAqXG5cdCAqIFRoZSBmb2xsb3dpbmcgc3R5bGVzIHNob3VsZCBiZSByZXBsYWNlZCBvbmNlIHRoZSBEcm9wZG93bk1lbnUgaGFzIGJlZW5cblx0ICogcmVmYWN0b3JlZCBhbmQgY2FuIGJlIHRhcmdldGVkIHZpYSBjb21wb25lbnQgaW50ZXJwb2xhdGlvbi5cblx0ICovXG5cdC5jb21wb25lbnRzLWRyb3Bkb3duLW1lbnUge1xuXHRcdG1hcmdpbjogJHsgc3BhY2UoIC0xICkgfSAwO1xuXHRcdGxpbmUtaGVpZ2h0OiAwO1xuXHR9XG5cdCYmJiYgLmNvbXBvbmVudHMtZHJvcGRvd24tbWVudV9fdG9nZ2xlIHtcblx0XHRwYWRkaW5nOiAwO1xuXHRcdG1pbi13aWR0aDogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbEhlYWRpbmcgPSBjc3NgXG5cdGZvbnQtc2l6ZTogaW5oZXJpdDtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdGxpbmUtaGVpZ2h0OiBub3JtYWw7XG5cblx0LyogUmVxdWlyZWQgdG8gbWVldCBzcGVjaWZpY2l0eSByZXF1aXJlbWVudHMgdG8gZW5zdXJlIHplcm8gbWFyZ2luICovXG5cdCYmIHtcblx0XHRtYXJnaW46IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSXRlbSA9IGNzc2Bcblx0JHsgdG9vbHNQYW5lbEdyaWQuaXRlbS5mdWxsV2lkdGggfVxuXG5cdC8qIENsZWFyIHNwYWNpbmcgaW4gYW5kIGFyb3VuZCBjb250cm9scyBhZGRlZCBhcyBwYW5lbCBpdGVtcy4gKi9cblx0LyogUmVtb3ZlIHdoZW4gdGhleSBjYW4gYmUgYWRkcmVzc2VkIHZpYSBjb250ZXh0IHN5c3RlbS4gKi9cblx0JiA+IGRpdixcblx0JiA+IGZpZWxkc2V0IHtcblx0XHRwYWRkaW5nLWJvdHRvbTogMDtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0fVxuXG5cdC8qIFJlbW92ZSBCYXNlQ29udHJvbCBjb21wb25lbnRzIG1hcmdpbnMgYW5kIGxlYXZlIHNwYWNpbmcgdG8gZ3JpZCBsYXlvdXQgKi9cblx0JiYgJHsgQmFzZUNvbnRyb2xXcmFwcGVyIH0ge1xuXHRcdG1hcmdpbi1ib3R0b206IDA7XG5cblx0XHQvKipcblx0XHQgKiBUbyBtYWludGFpbiBwcm9wZXIgc3BhY2luZyB3aXRoaW4gYSBiYXNlIGNvbnRyb2wsIHRoZSBmaWVsZCdzIGJvdHRvbVxuXHRcdCAqIG1hcmdpbiBzaG91bGQgb25seSBiZSByZW1vdmVkIHdoZW4gdGhlcmUgaXMgbm8gaGVscCB0ZXh0IGluY2x1ZGVkIGFuZFxuXHRcdCAqIGl0IGlzIHRoZXJlZm9yZSB0aGUgbGFzdC1jaGlsZC5cblx0XHQgKi9cblx0XHQkeyBCYXNlQ29udHJvbEZpZWxkIH06bGFzdC1jaGlsZCB7XG5cdFx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHRcdH1cblx0fVxuXG5cdCR7IEJhc2VDb250cm9sSGVscCB9IHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbEl0ZW1QbGFjZWhvbGRlciA9IGNzc2Bcblx0ZGlzcGxheTogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBEcm9wZG93bk1lbnUgPSBjc3NgXG5cdG1pbi13aWR0aDogMjAwcHg7XG5gO1xuXG5leHBvcnQgY29uc3QgUmVzZXRMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudERhcmtlcjEwIH07XG5cdGZvbnQtc2l6ZTogMTFweDtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiBzcGFjZSggMyApIH0gKSB9XG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuXG5leHBvcnQgY29uc3QgRGVmYXVsdENvbnRyb2xzSXRlbSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA5MDAgXSB9O1xuXG5cdCYmW2FyaWEtZGlzYWJsZWQ9J3RydWUnXSB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXHRcdG9wYWNpdHk6IDE7XG5cblx0XHQmOmhvdmVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgNzAwIF0gfTtcblx0XHR9XG5cblx0XHQkeyBSZXNldExhYmVsIH0ge1xuXHRcdFx0b3BhY2l0eTogMC4zO1xuXHRcdH1cblx0fVxuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__39
  };
  var DropdownMenu2 = false ? {
    name: "16gsvie",
    styles: "min-width:200px"
  } : {
    name: "1lfy0sm-DropdownMenu",
    styles: "min-width:200px;label:DropdownMenu;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtSStCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHtcblx0U3R5bGVkRmllbGQgYXMgQmFzZUNvbnRyb2xGaWVsZCxcblx0U3R5bGVkSGVscCBhcyBCYXNlQ29udHJvbEhlbHAsXG5cdFdyYXBwZXIgYXMgQmFzZUNvbnRyb2xXcmFwcGVyLFxufSBmcm9tICcuLi9iYXNlLWNvbnRyb2wvc3R5bGVzL2Jhc2UtY29udHJvbC1zdHlsZXMnO1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuXG5jb25zdCB0b29sc1BhbmVsR3JpZCA9IHtcblx0Y29sdW1uczogKCBjb2x1bW5zOiBudW1iZXIgKSA9PiBjc3NgXG5cdFx0Z3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiAkeyBgcmVwZWF0KCAkeyBjb2x1bW5zIH0sIG1pbm1heCgwLCAxZnIpIClgIH07XG5cdGAsXG5cdHNwYWNpbmc6IGNzc2Bcblx0XHRjb2x1bW4tZ2FwOiAkeyBzcGFjZSggNCApIH07XG5cdFx0cm93LWdhcDogJHsgc3BhY2UoIDQgKSB9O1xuXHRgLFxuXHRpdGVtOiB7XG5cdFx0ZnVsbFdpZHRoOiBjc3NgXG5cdFx0XHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXHRcdGAsXG5cdH0sXG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbCA9ICggY29sdW1uczogbnVtYmVyICkgPT4gY3NzYFxuXHQkeyB0b29sc1BhbmVsR3JpZC5jb2x1bW5zKCBjb2x1bW5zICkgfVxuXHQkeyB0b29sc1BhbmVsR3JpZC5zcGFjaW5nIH1cblxuXHRib3JkZXItdG9wOiAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSBzb2xpZCAkeyBDT0xPUlMuZ3JheVsgMzAwIF0gfTtcblx0bWFyZ2luLXRvcDogLTFweDtcblx0cGFkZGluZzogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuLyoqXG4gKiBJdGVtcyBpbmplY3RlZCBpbnRvIGEgVG9vbHNQYW5lbCB2aWEgYSB2aXJ0dWFsIGJ1YmJsaW5nIHNsb3Qgd2lsbCByZXF1aXJlXG4gKiBhbiBpbm5lciBkb20gZWxlbWVudCB0byBiZSBpbmplY3RlZC4gVGhlIGZvbGxvd2luZyBydWxlIGFsbG93cyBmb3IgdGhlXG4gKiBDU1MgZ3JpZCBkaXNwbGF5IHRvIGJlIHJlLWVzdGFibGlzaGVkLlxuICovXG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsV2l0aElubmVyV3JhcHBlciA9ICggY29sdW1uczogbnVtYmVyICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdD4gZGl2Om5vdCggOmZpcnN0LW9mLXR5cGUgKSB7XG5cdFx0XHRkaXNwbGF5OiBncmlkO1xuXHRcdFx0JHsgdG9vbHNQYW5lbEdyaWQuY29sdW1ucyggY29sdW1ucyApIH1cblx0XHRcdCR7IHRvb2xzUGFuZWxHcmlkLnNwYWNpbmcgfVxuXHRcdFx0JHsgdG9vbHNQYW5lbEdyaWQuaXRlbS5mdWxsV2lkdGggfVxuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSGlkZGVuSW5uZXJXcmFwcGVyID0gY3NzYFxuXHQ+IGRpdjpub3QoIDpmaXJzdC1vZi10eXBlICkge1xuXHRcdGRpc3BsYXk6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSGVhZGVyID0gY3NzYFxuXHQkeyB0b29sc1BhbmVsR3JpZC5pdGVtLmZ1bGxXaWR0aCB9XG5cdGdhcDogJHsgc3BhY2UoIDIgKSB9O1xuXG5cdC8qKlxuXHQgKiBUaGUgdGFyZ2V0aW5nIG9mIGRyb3Bkb3duIG1lbnUgY29tcG9uZW50IGNsYXNzZXMgaGVyZSBpcyBhIHRlbXBvcmFyeVxuXHQgKiBtZWFzdXJlIG9ubHkuXG5cdCAqXG5cdCAqIFRoZSBmb2xsb3dpbmcgc3R5bGVzIHNob3VsZCBiZSByZXBsYWNlZCBvbmNlIHRoZSBEcm9wZG93bk1lbnUgaGFzIGJlZW5cblx0ICogcmVmYWN0b3JlZCBhbmQgY2FuIGJlIHRhcmdldGVkIHZpYSBjb21wb25lbnQgaW50ZXJwb2xhdGlvbi5cblx0ICovXG5cdC5jb21wb25lbnRzLWRyb3Bkb3duLW1lbnUge1xuXHRcdG1hcmdpbjogJHsgc3BhY2UoIC0xICkgfSAwO1xuXHRcdGxpbmUtaGVpZ2h0OiAwO1xuXHR9XG5cdCYmJiYgLmNvbXBvbmVudHMtZHJvcGRvd24tbWVudV9fdG9nZ2xlIHtcblx0XHRwYWRkaW5nOiAwO1xuXHRcdG1pbi13aWR0aDogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbEhlYWRpbmcgPSBjc3NgXG5cdGZvbnQtc2l6ZTogaW5oZXJpdDtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdGxpbmUtaGVpZ2h0OiBub3JtYWw7XG5cblx0LyogUmVxdWlyZWQgdG8gbWVldCBzcGVjaWZpY2l0eSByZXF1aXJlbWVudHMgdG8gZW5zdXJlIHplcm8gbWFyZ2luICovXG5cdCYmIHtcblx0XHRtYXJnaW46IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSXRlbSA9IGNzc2Bcblx0JHsgdG9vbHNQYW5lbEdyaWQuaXRlbS5mdWxsV2lkdGggfVxuXG5cdC8qIENsZWFyIHNwYWNpbmcgaW4gYW5kIGFyb3VuZCBjb250cm9scyBhZGRlZCBhcyBwYW5lbCBpdGVtcy4gKi9cblx0LyogUmVtb3ZlIHdoZW4gdGhleSBjYW4gYmUgYWRkcmVzc2VkIHZpYSBjb250ZXh0IHN5c3RlbS4gKi9cblx0JiA+IGRpdixcblx0JiA+IGZpZWxkc2V0IHtcblx0XHRwYWRkaW5nLWJvdHRvbTogMDtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0fVxuXG5cdC8qIFJlbW92ZSBCYXNlQ29udHJvbCBjb21wb25lbnRzIG1hcmdpbnMgYW5kIGxlYXZlIHNwYWNpbmcgdG8gZ3JpZCBsYXlvdXQgKi9cblx0JiYgJHsgQmFzZUNvbnRyb2xXcmFwcGVyIH0ge1xuXHRcdG1hcmdpbi1ib3R0b206IDA7XG5cblx0XHQvKipcblx0XHQgKiBUbyBtYWludGFpbiBwcm9wZXIgc3BhY2luZyB3aXRoaW4gYSBiYXNlIGNvbnRyb2wsIHRoZSBmaWVsZCdzIGJvdHRvbVxuXHRcdCAqIG1hcmdpbiBzaG91bGQgb25seSBiZSByZW1vdmVkIHdoZW4gdGhlcmUgaXMgbm8gaGVscCB0ZXh0IGluY2x1ZGVkIGFuZFxuXHRcdCAqIGl0IGlzIHRoZXJlZm9yZSB0aGUgbGFzdC1jaGlsZC5cblx0XHQgKi9cblx0XHQkeyBCYXNlQ29udHJvbEZpZWxkIH06bGFzdC1jaGlsZCB7XG5cdFx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHRcdH1cblx0fVxuXG5cdCR7IEJhc2VDb250cm9sSGVscCB9IHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbEl0ZW1QbGFjZWhvbGRlciA9IGNzc2Bcblx0ZGlzcGxheTogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBEcm9wZG93bk1lbnUgPSBjc3NgXG5cdG1pbi13aWR0aDogMjAwcHg7XG5gO1xuXG5leHBvcnQgY29uc3QgUmVzZXRMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudERhcmtlcjEwIH07XG5cdGZvbnQtc2l6ZTogMTFweDtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiBzcGFjZSggMyApIH0gKSB9XG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuXG5leHBvcnQgY29uc3QgRGVmYXVsdENvbnRyb2xzSXRlbSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA5MDAgXSB9O1xuXG5cdCYmW2FyaWEtZGlzYWJsZWQ9J3RydWUnXSB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXHRcdG9wYWNpdHk6IDE7XG5cblx0XHQmOmhvdmVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgNzAwIF0gfTtcblx0XHR9XG5cblx0XHQkeyBSZXNldExhYmVsIH0ge1xuXHRcdFx0b3BhY2l0eTogMC4zO1xuXHRcdH1cblx0fVxuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__39
  };
  var ResetLabel = /* @__PURE__ */ createStyled("span", false ? {
    target: "ews648u0"
  } : {
    target: "ews648u0",
    label: "ResetLabel"
  })("color:", COLORS.theme.accentDarker10, ";font-size:11px;font-weight:", config_values_default.fontWeightMedium, ";line-height:1.4;", rtl({
    marginLeft: space(3)
  }), " text-transform:uppercase;" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1SXFDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHtcblx0U3R5bGVkRmllbGQgYXMgQmFzZUNvbnRyb2xGaWVsZCxcblx0U3R5bGVkSGVscCBhcyBCYXNlQ29udHJvbEhlbHAsXG5cdFdyYXBwZXIgYXMgQmFzZUNvbnRyb2xXcmFwcGVyLFxufSBmcm9tICcuLi9iYXNlLWNvbnRyb2wvc3R5bGVzL2Jhc2UtY29udHJvbC1zdHlsZXMnO1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuXG5jb25zdCB0b29sc1BhbmVsR3JpZCA9IHtcblx0Y29sdW1uczogKCBjb2x1bW5zOiBudW1iZXIgKSA9PiBjc3NgXG5cdFx0Z3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiAkeyBgcmVwZWF0KCAkeyBjb2x1bW5zIH0sIG1pbm1heCgwLCAxZnIpIClgIH07XG5cdGAsXG5cdHNwYWNpbmc6IGNzc2Bcblx0XHRjb2x1bW4tZ2FwOiAkeyBzcGFjZSggNCApIH07XG5cdFx0cm93LWdhcDogJHsgc3BhY2UoIDQgKSB9O1xuXHRgLFxuXHRpdGVtOiB7XG5cdFx0ZnVsbFdpZHRoOiBjc3NgXG5cdFx0XHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXHRcdGAsXG5cdH0sXG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbCA9ICggY29sdW1uczogbnVtYmVyICkgPT4gY3NzYFxuXHQkeyB0b29sc1BhbmVsR3JpZC5jb2x1bW5zKCBjb2x1bW5zICkgfVxuXHQkeyB0b29sc1BhbmVsR3JpZC5zcGFjaW5nIH1cblxuXHRib3JkZXItdG9wOiAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSBzb2xpZCAkeyBDT0xPUlMuZ3JheVsgMzAwIF0gfTtcblx0bWFyZ2luLXRvcDogLTFweDtcblx0cGFkZGluZzogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuLyoqXG4gKiBJdGVtcyBpbmplY3RlZCBpbnRvIGEgVG9vbHNQYW5lbCB2aWEgYSB2aXJ0dWFsIGJ1YmJsaW5nIHNsb3Qgd2lsbCByZXF1aXJlXG4gKiBhbiBpbm5lciBkb20gZWxlbWVudCB0byBiZSBpbmplY3RlZC4gVGhlIGZvbGxvd2luZyBydWxlIGFsbG93cyBmb3IgdGhlXG4gKiBDU1MgZ3JpZCBkaXNwbGF5IHRvIGJlIHJlLWVzdGFibGlzaGVkLlxuICovXG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsV2l0aElubmVyV3JhcHBlciA9ICggY29sdW1uczogbnVtYmVyICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdD4gZGl2Om5vdCggOmZpcnN0LW9mLXR5cGUgKSB7XG5cdFx0XHRkaXNwbGF5OiBncmlkO1xuXHRcdFx0JHsgdG9vbHNQYW5lbEdyaWQuY29sdW1ucyggY29sdW1ucyApIH1cblx0XHRcdCR7IHRvb2xzUGFuZWxHcmlkLnNwYWNpbmcgfVxuXHRcdFx0JHsgdG9vbHNQYW5lbEdyaWQuaXRlbS5mdWxsV2lkdGggfVxuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSGlkZGVuSW5uZXJXcmFwcGVyID0gY3NzYFxuXHQ+IGRpdjpub3QoIDpmaXJzdC1vZi10eXBlICkge1xuXHRcdGRpc3BsYXk6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSGVhZGVyID0gY3NzYFxuXHQkeyB0b29sc1BhbmVsR3JpZC5pdGVtLmZ1bGxXaWR0aCB9XG5cdGdhcDogJHsgc3BhY2UoIDIgKSB9O1xuXG5cdC8qKlxuXHQgKiBUaGUgdGFyZ2V0aW5nIG9mIGRyb3Bkb3duIG1lbnUgY29tcG9uZW50IGNsYXNzZXMgaGVyZSBpcyBhIHRlbXBvcmFyeVxuXHQgKiBtZWFzdXJlIG9ubHkuXG5cdCAqXG5cdCAqIFRoZSBmb2xsb3dpbmcgc3R5bGVzIHNob3VsZCBiZSByZXBsYWNlZCBvbmNlIHRoZSBEcm9wZG93bk1lbnUgaGFzIGJlZW5cblx0ICogcmVmYWN0b3JlZCBhbmQgY2FuIGJlIHRhcmdldGVkIHZpYSBjb21wb25lbnQgaW50ZXJwb2xhdGlvbi5cblx0ICovXG5cdC5jb21wb25lbnRzLWRyb3Bkb3duLW1lbnUge1xuXHRcdG1hcmdpbjogJHsgc3BhY2UoIC0xICkgfSAwO1xuXHRcdGxpbmUtaGVpZ2h0OiAwO1xuXHR9XG5cdCYmJiYgLmNvbXBvbmVudHMtZHJvcGRvd24tbWVudV9fdG9nZ2xlIHtcblx0XHRwYWRkaW5nOiAwO1xuXHRcdG1pbi13aWR0aDogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbEhlYWRpbmcgPSBjc3NgXG5cdGZvbnQtc2l6ZTogaW5oZXJpdDtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdGxpbmUtaGVpZ2h0OiBub3JtYWw7XG5cblx0LyogUmVxdWlyZWQgdG8gbWVldCBzcGVjaWZpY2l0eSByZXF1aXJlbWVudHMgdG8gZW5zdXJlIHplcm8gbWFyZ2luICovXG5cdCYmIHtcblx0XHRtYXJnaW46IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSXRlbSA9IGNzc2Bcblx0JHsgdG9vbHNQYW5lbEdyaWQuaXRlbS5mdWxsV2lkdGggfVxuXG5cdC8qIENsZWFyIHNwYWNpbmcgaW4gYW5kIGFyb3VuZCBjb250cm9scyBhZGRlZCBhcyBwYW5lbCBpdGVtcy4gKi9cblx0LyogUmVtb3ZlIHdoZW4gdGhleSBjYW4gYmUgYWRkcmVzc2VkIHZpYSBjb250ZXh0IHN5c3RlbS4gKi9cblx0JiA+IGRpdixcblx0JiA+IGZpZWxkc2V0IHtcblx0XHRwYWRkaW5nLWJvdHRvbTogMDtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0fVxuXG5cdC8qIFJlbW92ZSBCYXNlQ29udHJvbCBjb21wb25lbnRzIG1hcmdpbnMgYW5kIGxlYXZlIHNwYWNpbmcgdG8gZ3JpZCBsYXlvdXQgKi9cblx0JiYgJHsgQmFzZUNvbnRyb2xXcmFwcGVyIH0ge1xuXHRcdG1hcmdpbi1ib3R0b206IDA7XG5cblx0XHQvKipcblx0XHQgKiBUbyBtYWludGFpbiBwcm9wZXIgc3BhY2luZyB3aXRoaW4gYSBiYXNlIGNvbnRyb2wsIHRoZSBmaWVsZCdzIGJvdHRvbVxuXHRcdCAqIG1hcmdpbiBzaG91bGQgb25seSBiZSByZW1vdmVkIHdoZW4gdGhlcmUgaXMgbm8gaGVscCB0ZXh0IGluY2x1ZGVkIGFuZFxuXHRcdCAqIGl0IGlzIHRoZXJlZm9yZSB0aGUgbGFzdC1jaGlsZC5cblx0XHQgKi9cblx0XHQkeyBCYXNlQ29udHJvbEZpZWxkIH06bGFzdC1jaGlsZCB7XG5cdFx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHRcdH1cblx0fVxuXG5cdCR7IEJhc2VDb250cm9sSGVscCB9IHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbEl0ZW1QbGFjZWhvbGRlciA9IGNzc2Bcblx0ZGlzcGxheTogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBEcm9wZG93bk1lbnUgPSBjc3NgXG5cdG1pbi13aWR0aDogMjAwcHg7XG5gO1xuXG5leHBvcnQgY29uc3QgUmVzZXRMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudERhcmtlcjEwIH07XG5cdGZvbnQtc2l6ZTogMTFweDtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiBzcGFjZSggMyApIH0gKSB9XG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuXG5leHBvcnQgY29uc3QgRGVmYXVsdENvbnRyb2xzSXRlbSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA5MDAgXSB9O1xuXG5cdCYmW2FyaWEtZGlzYWJsZWQ9J3RydWUnXSB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXHRcdG9wYWNpdHk6IDE7XG5cblx0XHQmOmhvdmVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgNzAwIF0gfTtcblx0XHR9XG5cblx0XHQkeyBSZXNldExhYmVsIH0ge1xuXHRcdFx0b3BhY2l0eTogMC4zO1xuXHRcdH1cblx0fVxuYDtcbiJdfQ== */"));
  var DefaultControlsItem = /* @__PURE__ */ css("color:", COLORS.gray[900], ";&&[aria-disabled='true']{color:", COLORS.gray[700], ";opacity:1;&:hover{color:", COLORS.gray[700], ";}", ResetLabel, "{opacity:0.3;}}" + (false ? "" : ";label:DefaultControlsItem;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnSnNDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHtcblx0U3R5bGVkRmllbGQgYXMgQmFzZUNvbnRyb2xGaWVsZCxcblx0U3R5bGVkSGVscCBhcyBCYXNlQ29udHJvbEhlbHAsXG5cdFdyYXBwZXIgYXMgQmFzZUNvbnRyb2xXcmFwcGVyLFxufSBmcm9tICcuLi9iYXNlLWNvbnRyb2wvc3R5bGVzL2Jhc2UtY29udHJvbC1zdHlsZXMnO1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuXG5jb25zdCB0b29sc1BhbmVsR3JpZCA9IHtcblx0Y29sdW1uczogKCBjb2x1bW5zOiBudW1iZXIgKSA9PiBjc3NgXG5cdFx0Z3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiAkeyBgcmVwZWF0KCAkeyBjb2x1bW5zIH0sIG1pbm1heCgwLCAxZnIpIClgIH07XG5cdGAsXG5cdHNwYWNpbmc6IGNzc2Bcblx0XHRjb2x1bW4tZ2FwOiAkeyBzcGFjZSggNCApIH07XG5cdFx0cm93LWdhcDogJHsgc3BhY2UoIDQgKSB9O1xuXHRgLFxuXHRpdGVtOiB7XG5cdFx0ZnVsbFdpZHRoOiBjc3NgXG5cdFx0XHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXHRcdGAsXG5cdH0sXG59O1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbCA9ICggY29sdW1uczogbnVtYmVyICkgPT4gY3NzYFxuXHQkeyB0b29sc1BhbmVsR3JpZC5jb2x1bW5zKCBjb2x1bW5zICkgfVxuXHQkeyB0b29sc1BhbmVsR3JpZC5zcGFjaW5nIH1cblxuXHRib3JkZXItdG9wOiAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSBzb2xpZCAkeyBDT0xPUlMuZ3JheVsgMzAwIF0gfTtcblx0bWFyZ2luLXRvcDogLTFweDtcblx0cGFkZGluZzogJHsgc3BhY2UoIDQgKSB9O1xuYDtcblxuLyoqXG4gKiBJdGVtcyBpbmplY3RlZCBpbnRvIGEgVG9vbHNQYW5lbCB2aWEgYSB2aXJ0dWFsIGJ1YmJsaW5nIHNsb3Qgd2lsbCByZXF1aXJlXG4gKiBhbiBpbm5lciBkb20gZWxlbWVudCB0byBiZSBpbmplY3RlZC4gVGhlIGZvbGxvd2luZyBydWxlIGFsbG93cyBmb3IgdGhlXG4gKiBDU1MgZ3JpZCBkaXNwbGF5IHRvIGJlIHJlLWVzdGFibGlzaGVkLlxuICovXG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsV2l0aElubmVyV3JhcHBlciA9ICggY29sdW1uczogbnVtYmVyICkgPT4ge1xuXHRyZXR1cm4gY3NzYFxuXHRcdD4gZGl2Om5vdCggOmZpcnN0LW9mLXR5cGUgKSB7XG5cdFx0XHRkaXNwbGF5OiBncmlkO1xuXHRcdFx0JHsgdG9vbHNQYW5lbEdyaWQuY29sdW1ucyggY29sdW1ucyApIH1cblx0XHRcdCR7IHRvb2xzUGFuZWxHcmlkLnNwYWNpbmcgfVxuXHRcdFx0JHsgdG9vbHNQYW5lbEdyaWQuaXRlbS5mdWxsV2lkdGggfVxuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSGlkZGVuSW5uZXJXcmFwcGVyID0gY3NzYFxuXHQ+IGRpdjpub3QoIDpmaXJzdC1vZi10eXBlICkge1xuXHRcdGRpc3BsYXk6IG5vbmU7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSGVhZGVyID0gY3NzYFxuXHQkeyB0b29sc1BhbmVsR3JpZC5pdGVtLmZ1bGxXaWR0aCB9XG5cdGdhcDogJHsgc3BhY2UoIDIgKSB9O1xuXG5cdC8qKlxuXHQgKiBUaGUgdGFyZ2V0aW5nIG9mIGRyb3Bkb3duIG1lbnUgY29tcG9uZW50IGNsYXNzZXMgaGVyZSBpcyBhIHRlbXBvcmFyeVxuXHQgKiBtZWFzdXJlIG9ubHkuXG5cdCAqXG5cdCAqIFRoZSBmb2xsb3dpbmcgc3R5bGVzIHNob3VsZCBiZSByZXBsYWNlZCBvbmNlIHRoZSBEcm9wZG93bk1lbnUgaGFzIGJlZW5cblx0ICogcmVmYWN0b3JlZCBhbmQgY2FuIGJlIHRhcmdldGVkIHZpYSBjb21wb25lbnQgaW50ZXJwb2xhdGlvbi5cblx0ICovXG5cdC5jb21wb25lbnRzLWRyb3Bkb3duLW1lbnUge1xuXHRcdG1hcmdpbjogJHsgc3BhY2UoIC0xICkgfSAwO1xuXHRcdGxpbmUtaGVpZ2h0OiAwO1xuXHR9XG5cdCYmJiYgLmNvbXBvbmVudHMtZHJvcGRvd24tbWVudV9fdG9nZ2xlIHtcblx0XHRwYWRkaW5nOiAwO1xuXHRcdG1pbi13aWR0aDogJHsgc3BhY2UoIDYgKSB9O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbEhlYWRpbmcgPSBjc3NgXG5cdGZvbnQtc2l6ZTogaW5oZXJpdDtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdGxpbmUtaGVpZ2h0OiBub3JtYWw7XG5cblx0LyogUmVxdWlyZWQgdG8gbWVldCBzcGVjaWZpY2l0eSByZXF1aXJlbWVudHMgdG8gZW5zdXJlIHplcm8gbWFyZ2luICovXG5cdCYmIHtcblx0XHRtYXJnaW46IDA7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUb29sc1BhbmVsSXRlbSA9IGNzc2Bcblx0JHsgdG9vbHNQYW5lbEdyaWQuaXRlbS5mdWxsV2lkdGggfVxuXG5cdC8qIENsZWFyIHNwYWNpbmcgaW4gYW5kIGFyb3VuZCBjb250cm9scyBhZGRlZCBhcyBwYW5lbCBpdGVtcy4gKi9cblx0LyogUmVtb3ZlIHdoZW4gdGhleSBjYW4gYmUgYWRkcmVzc2VkIHZpYSBjb250ZXh0IHN5c3RlbS4gKi9cblx0JiA+IGRpdixcblx0JiA+IGZpZWxkc2V0IHtcblx0XHRwYWRkaW5nLWJvdHRvbTogMDtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHRcdG1heC13aWR0aDogMTAwJTtcblx0fVxuXG5cdC8qIFJlbW92ZSBCYXNlQ29udHJvbCBjb21wb25lbnRzIG1hcmdpbnMgYW5kIGxlYXZlIHNwYWNpbmcgdG8gZ3JpZCBsYXlvdXQgKi9cblx0JiYgJHsgQmFzZUNvbnRyb2xXcmFwcGVyIH0ge1xuXHRcdG1hcmdpbi1ib3R0b206IDA7XG5cblx0XHQvKipcblx0XHQgKiBUbyBtYWludGFpbiBwcm9wZXIgc3BhY2luZyB3aXRoaW4gYSBiYXNlIGNvbnRyb2wsIHRoZSBmaWVsZCdzIGJvdHRvbVxuXHRcdCAqIG1hcmdpbiBzaG91bGQgb25seSBiZSByZW1vdmVkIHdoZW4gdGhlcmUgaXMgbm8gaGVscCB0ZXh0IGluY2x1ZGVkIGFuZFxuXHRcdCAqIGl0IGlzIHRoZXJlZm9yZSB0aGUgbGFzdC1jaGlsZC5cblx0XHQgKi9cblx0XHQkeyBCYXNlQ29udHJvbEZpZWxkIH06bGFzdC1jaGlsZCB7XG5cdFx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHRcdH1cblx0fVxuXG5cdCR7IEJhc2VDb250cm9sSGVscCB9IHtcblx0XHRtYXJnaW4tYm90dG9tOiAwO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVG9vbHNQYW5lbEl0ZW1QbGFjZWhvbGRlciA9IGNzc2Bcblx0ZGlzcGxheTogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBEcm9wZG93bk1lbnUgPSBjc3NgXG5cdG1pbi13aWR0aDogMjAwcHg7XG5gO1xuXG5leHBvcnQgY29uc3QgUmVzZXRMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudERhcmtlcjEwIH07XG5cdGZvbnQtc2l6ZTogMTFweDtcblx0Zm9udC13ZWlnaHQ6ICR7IENPTkZJRy5mb250V2VpZ2h0TWVkaXVtIH07XG5cdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiBzcGFjZSggMyApIH0gKSB9XG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuXG5leHBvcnQgY29uc3QgRGVmYXVsdENvbnRyb2xzSXRlbSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA5MDAgXSB9O1xuXG5cdCYmW2FyaWEtZGlzYWJsZWQ9J3RydWUnXSB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXHRcdG9wYWNpdHk6IDE7XG5cblx0XHQmOmhvdmVyIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgNzAwIF0gfTtcblx0XHR9XG5cblx0XHQkeyBSZXNldExhYmVsIH0ge1xuXHRcdFx0b3BhY2l0eTogMC4zO1xuXHRcdH1cblx0fVxuYDtcbiJdfQ== */");

  // packages/components/build-module/tools-panel/context.mjs
  var import_element205 = __toESM(require_element(), 1);
  var noop25 = () => void 0;
  var ToolsPanelContext = (0, import_element205.createContext)({
    menuItems: {
      default: {},
      optional: {}
    },
    hasMenuItems: false,
    isResetting: false,
    shouldRenderPlaceholderItems: false,
    registerPanelItem: noop25,
    deregisterPanelItem: noop25,
    flagItemCustomization: noop25,
    registerResetAllFilter: noop25,
    deregisterResetAllFilter: noop25,
    areAllOptionalControlsHidden: true
  });
  ToolsPanelContext.displayName = "ToolsPanelContext";
  var useToolsPanelContext = () => (0, import_element205.useContext)(ToolsPanelContext);

  // packages/components/build-module/tools-panel/tools-panel-header/hook.mjs
  function useToolsPanelHeader(props) {
    const {
      className: className2,
      headingLevel = 2,
      ...otherProps
    } = useContextSystem(props, "ToolsPanelHeader");
    const cx3 = useCx();
    const classes = (0, import_element206.useMemo)(() => {
      return cx3(ToolsPanelHeader, className2);
    }, [className2, cx3]);
    const dropdownMenuClassName = (0, import_element206.useMemo)(() => {
      return cx3(DropdownMenu2);
    }, [cx3]);
    const headingClassName = (0, import_element206.useMemo)(() => {
      return cx3(ToolsPanelHeading);
    }, [cx3]);
    const defaultControlsItemClassName = (0, import_element206.useMemo)(() => {
      return cx3(DefaultControlsItem);
    }, [cx3]);
    const {
      menuItems,
      hasMenuItems,
      areAllOptionalControlsHidden
    } = useToolsPanelContext();
    return {
      ...otherProps,
      areAllOptionalControlsHidden,
      defaultControlsItemClassName,
      dropdownMenuClassName,
      hasMenuItems,
      headingClassName,
      headingLevel,
      menuItems,
      className: classes
    };
  }

  // packages/components/build-module/tools-panel/tools-panel-header/component.mjs
  var import_jsx_runtime283 = __toESM(require_jsx_runtime(), 1);
  var DefaultControlsGroup = ({
    itemClassName,
    items,
    toggleItem
  }) => {
    if (!items.length) {
      return null;
    }
    const resetSuffix = /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(ResetLabel, {
      "aria-hidden": true,
      children: (0, import_i18n78.__)("Reset")
    });
    return /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(import_jsx_runtime283.Fragment, {
      children: items.map(([label, hasValue]) => {
        if (hasValue) {
          return /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(menu_item_default, {
            className: itemClassName,
            role: "menuitem",
            label: (0, import_i18n78.sprintf)(
              // translators: %s: The name of the control being reset e.g. "Padding".
              (0, import_i18n78.__)("Reset %s"),
              label
            ),
            onClick: () => {
              toggleItem(label);
              (0, import_a11y11.speak)((0, import_i18n78.sprintf)(
                // translators: %s: The name of the control being reset e.g. "Padding".
                (0, import_i18n78.__)("%s reset to default"),
                label
              ), "assertive");
            },
            suffix: resetSuffix,
            children: label
          }, label);
        }
        return /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(menu_item_default, {
          icon: check_default,
          className: itemClassName,
          role: "menuitemcheckbox",
          isSelected: true,
          "aria-disabled": true,
          children: label
        }, label);
      })
    });
  };
  var OptionalControlsGroup = ({
    items,
    toggleItem
  }) => {
    if (!items.length) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(import_jsx_runtime283.Fragment, {
      children: items.map(([label, isSelected2]) => {
        const itemLabel = isSelected2 ? (0, import_i18n78.sprintf)(
          // translators: %s: The name of the control being hidden and reset e.g. "Padding".
          (0, import_i18n78.__)("Hide and reset %s"),
          label
        ) : (0, import_i18n78.sprintf)(
          // translators: %s: The name of the control to display e.g. "Padding".
          (0, import_i18n78._x)("Show %s", "input control"),
          label
        );
        return /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(menu_item_default, {
          icon: isSelected2 ? check_default : null,
          isSelected: isSelected2,
          label: itemLabel,
          onClick: () => {
            if (isSelected2) {
              (0, import_a11y11.speak)((0, import_i18n78.sprintf)(
                // translators: %s: The name of the control being reset e.g. "Padding".
                (0, import_i18n78.__)("%s hidden and reset to default"),
                label
              ), "assertive");
            } else {
              (0, import_a11y11.speak)((0, import_i18n78.sprintf)(
                // translators: %s: The name of the control being reset e.g. "Padding".
                (0, import_i18n78.__)("%s is now visible"),
                label
              ), "assertive");
            }
            toggleItem(label);
          },
          role: "menuitemcheckbox",
          children: label
        }, label);
      })
    });
  };
  var ToolsPanelHeader2 = (props, forwardedRef) => {
    const {
      areAllOptionalControlsHidden,
      defaultControlsItemClassName,
      dropdownMenuClassName,
      hasMenuItems,
      headingClassName,
      headingLevel = 2,
      label: labelText,
      menuItems,
      resetAll,
      toggleItem,
      dropdownMenuProps,
      ...headerProps
    } = useToolsPanelHeader(props);
    if (!labelText) {
      return null;
    }
    const defaultItems = Object.entries(menuItems?.default || {});
    const optionalItems = Object.entries(menuItems?.optional || {});
    const dropDownMenuIcon = areAllOptionalControlsHidden ? plus_default : more_vertical_default;
    const dropDownMenuLabelText = (0, import_i18n78.sprintf)(
      // translators: %s: The name of the tool e.g. "Color" or "Typography".
      (0, import_i18n78._x)("%s options", "Button label to reveal tool panel options"),
      labelText
    );
    const dropdownMenuDescriptionText = areAllOptionalControlsHidden ? (0, import_i18n78.__)("All options are currently hidden") : void 0;
    const canResetAll = [...defaultItems, ...optionalItems].some(([, isSelected2]) => isSelected2);
    return /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(component_default9, {
      ...headerProps,
      ref: forwardedRef,
      children: [/* @__PURE__ */ (0, import_jsx_runtime283.jsx)(component_default19, {
        level: headingLevel,
        className: headingClassName,
        children: labelText
      }), hasMenuItems && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(dropdown_menu_default, {
        ...dropdownMenuProps,
        icon: dropDownMenuIcon,
        label: dropDownMenuLabelText,
        menuProps: {
          className: dropdownMenuClassName
        },
        toggleProps: {
          size: "small",
          description: dropdownMenuDescriptionText
        },
        children: () => /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(import_jsx_runtime283.Fragment, {
          children: [/* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(menu_group_default, {
            label: labelText,
            children: [/* @__PURE__ */ (0, import_jsx_runtime283.jsx)(DefaultControlsGroup, {
              items: defaultItems,
              toggleItem,
              itemClassName: defaultControlsItemClassName
            }), /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(OptionalControlsGroup, {
              items: optionalItems,
              toggleItem
            })]
          }), /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(menu_group_default, {
            children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(menu_item_default, {
              "aria-disabled": !canResetAll,
              variant: "tertiary",
              onClick: () => {
                if (canResetAll) {
                  resetAll();
                  (0, import_a11y11.speak)((0, import_i18n78.__)("All options reset"), "assertive");
                }
              },
              children: (0, import_i18n78.__)("Reset all")
            })
          })]
        })
      })]
    });
  };
  var ConnectedToolsPanelHeader = contextConnect(ToolsPanelHeader2, "ToolsPanelHeader");
  var component_default38 = ConnectedToolsPanelHeader;

  // packages/components/build-module/tools-panel/tools-panel/hook.mjs
  var import_element207 = __toESM(require_element(), 1);
  var DEFAULT_COLUMNS = 2;
  function emptyMenuItems() {
    return {
      default: {},
      optional: {}
    };
  }
  function emptyState() {
    return {
      panelItems: [],
      menuItemOrder: [],
      menuItems: emptyMenuItems()
    };
  }
  var generateMenuItems = ({
    panelItems,
    shouldReset,
    currentMenuItems,
    menuItemOrder
  }) => {
    const newMenuItems = emptyMenuItems();
    const menuItems = emptyMenuItems();
    panelItems.forEach(({
      hasValue,
      isShownByDefault,
      label
    }) => {
      const group = isShownByDefault ? "default" : "optional";
      const existingItemValue = currentMenuItems?.[group]?.[label];
      const value = existingItemValue ? existingItemValue : hasValue();
      newMenuItems[group][label] = shouldReset ? false : value;
    });
    menuItemOrder.forEach((key) => {
      if (newMenuItems.default.hasOwnProperty(key)) {
        menuItems.default[key] = newMenuItems.default[key];
      }
      if (newMenuItems.optional.hasOwnProperty(key)) {
        menuItems.optional[key] = newMenuItems.optional[key];
      }
    });
    Object.keys(newMenuItems.default).forEach((key) => {
      if (!menuItems.default.hasOwnProperty(key)) {
        menuItems.default[key] = newMenuItems.default[key];
      }
    });
    Object.keys(newMenuItems.optional).forEach((key) => {
      if (!menuItems.optional.hasOwnProperty(key)) {
        menuItems.optional[key] = newMenuItems.optional[key];
      }
    });
    return menuItems;
  };
  function panelItemsReducer(panelItems, action) {
    switch (action.type) {
      case "REGISTER_PANEL": {
        const newItems = [...panelItems];
        const existingIndex = newItems.findIndex((oldItem) => oldItem.label === action.item.label);
        if (existingIndex !== -1) {
          newItems.splice(existingIndex, 1);
        }
        newItems.push(action.item);
        return newItems;
      }
      case "UNREGISTER_PANEL": {
        const index2 = panelItems.findIndex((item2) => item2.label === action.label);
        if (index2 !== -1) {
          const newItems = [...panelItems];
          newItems.splice(index2, 1);
          return newItems;
        }
        return panelItems;
      }
      default:
        return panelItems;
    }
  }
  function menuItemOrderReducer(menuItemOrder, action) {
    switch (action.type) {
      case "REGISTER_PANEL": {
        if (menuItemOrder.includes(action.item.label)) {
          return menuItemOrder;
        }
        return [...menuItemOrder, action.item.label];
      }
      default:
        return menuItemOrder;
    }
  }
  function menuItemsReducer(state, action) {
    switch (action.type) {
      case "REGISTER_PANEL":
      case "UNREGISTER_PANEL":
        return generateMenuItems({
          currentMenuItems: state.menuItems,
          panelItems: state.panelItems,
          menuItemOrder: state.menuItemOrder,
          shouldReset: false
        });
      case "RESET_ALL":
        return generateMenuItems({
          panelItems: state.panelItems,
          menuItemOrder: state.menuItemOrder,
          shouldReset: true
        });
      case "UPDATE_VALUE": {
        const oldValue = state.menuItems[action.group][action.label];
        if (action.value === oldValue) {
          return state.menuItems;
        }
        return {
          ...state.menuItems,
          [action.group]: {
            ...state.menuItems[action.group],
            [action.label]: action.value
          }
        };
      }
      case "TOGGLE_VALUE": {
        const currentItem = state.panelItems.find((item2) => item2.label === action.label);
        if (!currentItem) {
          return state.menuItems;
        }
        const menuGroup = currentItem.isShownByDefault ? "default" : "optional";
        const newMenuItems = {
          ...state.menuItems,
          [menuGroup]: {
            ...state.menuItems[menuGroup],
            [action.label]: !state.menuItems[menuGroup][action.label]
          }
        };
        return newMenuItems;
      }
      default:
        return state.menuItems;
    }
  }
  function panelReducer(state, action) {
    const panelItems = panelItemsReducer(state.panelItems, action);
    const menuItemOrder = menuItemOrderReducer(state.menuItemOrder, action);
    const menuItems = menuItemsReducer({
      panelItems,
      menuItemOrder,
      menuItems: state.menuItems
    }, action);
    return {
      panelItems,
      menuItemOrder,
      menuItems
    };
  }
  function resetAllFiltersReducer(filters, action) {
    switch (action.type) {
      case "REGISTER":
        return [...filters, action.filter];
      case "UNREGISTER":
        return filters.filter((f3) => f3 !== action.filter);
      default:
        return filters;
    }
  }
  var isMenuItemTypeEmpty = (obj) => Object.keys(obj).length === 0;
  function useToolsPanel(props) {
    const {
      className: className2,
      headingLevel = 2,
      resetAll,
      panelId,
      hasInnerWrapper = false,
      shouldRenderPlaceholderItems = false,
      __experimentalFirstVisibleItemClass,
      __experimentalLastVisibleItemClass,
      ...otherProps
    } = useContextSystem(props, "ToolsPanel");
    const isResettingRef = (0, import_element207.useRef)(false);
    const wasResetting = isResettingRef.current;
    (0, import_element207.useEffect)(() => {
      if (wasResetting) {
        isResettingRef.current = false;
      }
    }, [wasResetting]);
    const [{
      panelItems,
      menuItems
    }, panelDispatch] = (0, import_element207.useReducer)(panelReducer, void 0, emptyState);
    const [resetAllFilters, dispatchResetAllFilters] = (0, import_element207.useReducer)(resetAllFiltersReducer, []);
    const registerPanelItem = (0, import_element207.useCallback)((item2) => {
      panelDispatch({
        type: "REGISTER_PANEL",
        item: item2
      });
    }, []);
    const deregisterPanelItem = (0, import_element207.useCallback)((label) => {
      panelDispatch({
        type: "UNREGISTER_PANEL",
        label
      });
    }, []);
    const registerResetAllFilter = (0, import_element207.useCallback)((filter2) => {
      dispatchResetAllFilters({
        type: "REGISTER",
        filter: filter2
      });
    }, []);
    const deregisterResetAllFilter = (0, import_element207.useCallback)((filter2) => {
      dispatchResetAllFilters({
        type: "UNREGISTER",
        filter: filter2
      });
    }, []);
    const flagItemCustomization = (0, import_element207.useCallback)((value, label, group = "default") => {
      panelDispatch({
        type: "UPDATE_VALUE",
        group,
        label,
        value
      });
    }, []);
    const areAllOptionalControlsHidden = (0, import_element207.useMemo)(() => {
      return isMenuItemTypeEmpty(menuItems.default) && !isMenuItemTypeEmpty(menuItems.optional) && Object.values(menuItems.optional).every((isSelected2) => !isSelected2);
    }, [menuItems]);
    const cx3 = useCx();
    const classes = (0, import_element207.useMemo)(() => {
      const wrapperStyle = hasInnerWrapper && ToolsPanelWithInnerWrapper(DEFAULT_COLUMNS);
      const emptyStyle = areAllOptionalControlsHidden && ToolsPanelHiddenInnerWrapper;
      return cx3(ToolsPanel(DEFAULT_COLUMNS), wrapperStyle, emptyStyle, className2);
    }, [areAllOptionalControlsHidden, className2, cx3, hasInnerWrapper]);
    const toggleItem = (0, import_element207.useCallback)((label) => {
      panelDispatch({
        type: "TOGGLE_VALUE",
        label
      });
    }, []);
    const resetAllItems = (0, import_element207.useCallback)(() => {
      if (typeof resetAll === "function") {
        isResettingRef.current = true;
        resetAll(resetAllFilters);
      }
      panelDispatch({
        type: "RESET_ALL"
      });
    }, [resetAllFilters, resetAll]);
    const getFirstVisibleItemLabel = (items) => {
      const optionalItems = menuItems.optional || {};
      const firstItem = items.find((item2) => item2.isShownByDefault || optionalItems[item2.label]);
      return firstItem?.label;
    };
    const firstDisplayedItem = getFirstVisibleItemLabel(panelItems);
    const lastDisplayedItem = getFirstVisibleItemLabel([...panelItems].reverse());
    const hasMenuItems = panelItems.length > 0;
    const panelContext = (0, import_element207.useMemo)(() => ({
      areAllOptionalControlsHidden,
      deregisterPanelItem,
      deregisterResetAllFilter,
      firstDisplayedItem,
      flagItemCustomization,
      hasMenuItems,
      isResetting: isResettingRef.current,
      lastDisplayedItem,
      menuItems,
      panelId,
      registerPanelItem,
      registerResetAllFilter,
      shouldRenderPlaceholderItems,
      __experimentalFirstVisibleItemClass,
      __experimentalLastVisibleItemClass
    }), [areAllOptionalControlsHidden, deregisterPanelItem, deregisterResetAllFilter, firstDisplayedItem, flagItemCustomization, lastDisplayedItem, menuItems, panelId, hasMenuItems, registerResetAllFilter, registerPanelItem, shouldRenderPlaceholderItems, __experimentalFirstVisibleItemClass, __experimentalLastVisibleItemClass]);
    return {
      ...otherProps,
      headingLevel,
      panelContext,
      resetAllItems,
      toggleItem,
      className: classes
    };
  }

  // packages/components/build-module/tools-panel/tools-panel/component.mjs
  var import_jsx_runtime284 = __toESM(require_jsx_runtime(), 1);
  var UnconnectedToolsPanel = (props, forwardedRef) => {
    const {
      children,
      label,
      panelContext,
      resetAllItems,
      toggleItem,
      headingLevel,
      dropdownMenuProps,
      ...toolsPanelProps
    } = useToolsPanel(props);
    return /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(component_default22, {
      ...toolsPanelProps,
      columns: 2,
      ref: forwardedRef,
      children: /* @__PURE__ */ (0, import_jsx_runtime284.jsxs)(ToolsPanelContext.Provider, {
        value: panelContext,
        children: [/* @__PURE__ */ (0, import_jsx_runtime284.jsx)(component_default38, {
          label,
          resetAll: resetAllItems,
          toggleItem,
          headingLevel,
          dropdownMenuProps
        }), children]
      })
    });
  };
  var ToolsPanel2 = contextConnect(UnconnectedToolsPanel, "ToolsPanel");
  var component_default39 = ToolsPanel2;

  // packages/components/build-module/tools-panel/tools-panel-item/hook.mjs
  var import_compose75 = __toESM(require_compose(), 1);
  var import_element208 = __toESM(require_element(), 1);
  var noop26 = () => {
  };
  function useToolsPanelItem(props) {
    const {
      className: className2,
      hasValue,
      isShownByDefault = false,
      label,
      panelId,
      resetAllFilter = noop26,
      onDeselect,
      onSelect,
      ...otherProps
    } = useContextSystem(props, "ToolsPanelItem");
    const {
      panelId: currentPanelId,
      menuItems,
      registerResetAllFilter,
      deregisterResetAllFilter,
      registerPanelItem,
      deregisterPanelItem,
      flagItemCustomization,
      isResetting,
      shouldRenderPlaceholderItems: shouldRenderPlaceholder,
      firstDisplayedItem,
      lastDisplayedItem,
      __experimentalFirstVisibleItemClass,
      __experimentalLastVisibleItemClass
    } = useToolsPanelContext();
    const hasValueCallback = (0, import_element208.useCallback)(hasValue, [panelId]);
    const resetAllFilterCallback = (0, import_element208.useCallback)(resetAllFilter, [panelId]);
    const previousPanelId = (0, import_compose75.usePrevious)(currentPanelId);
    const hasMatchingPanel = currentPanelId === panelId || currentPanelId === null;
    (0, import_element208.useLayoutEffect)(() => {
      if (hasMatchingPanel && previousPanelId !== null) {
        registerPanelItem({
          hasValue: hasValueCallback,
          isShownByDefault,
          label,
          panelId
        });
      }
      return () => {
        if (previousPanelId === null && !!currentPanelId || currentPanelId === panelId) {
          deregisterPanelItem(label);
        }
      };
    }, [currentPanelId, hasMatchingPanel, isShownByDefault, label, hasValueCallback, panelId, previousPanelId, registerPanelItem, deregisterPanelItem]);
    (0, import_element208.useEffect)(() => {
      if (hasMatchingPanel) {
        registerResetAllFilter(resetAllFilterCallback);
      }
      return () => {
        if (hasMatchingPanel) {
          deregisterResetAllFilter(resetAllFilterCallback);
        }
      };
    }, [registerResetAllFilter, deregisterResetAllFilter, resetAllFilterCallback, hasMatchingPanel]);
    const menuGroup = isShownByDefault ? "default" : "optional";
    const isMenuItemChecked = menuItems?.[menuGroup]?.[label];
    const wasMenuItemChecked = (0, import_compose75.usePrevious)(isMenuItemChecked);
    const isRegistered = menuItems?.[menuGroup]?.[label] !== void 0;
    const isValueSet = hasValue();
    (0, import_element208.useEffect)(() => {
      if (!isShownByDefault && !isValueSet) {
        return;
      }
      flagItemCustomization(isValueSet, label, menuGroup);
    }, [isValueSet, menuGroup, label, flagItemCustomization, isShownByDefault]);
    (0, import_element208.useEffect)(() => {
      if (!isRegistered || isResetting || !hasMatchingPanel) {
        return;
      }
      if (isMenuItemChecked && !isValueSet && !wasMenuItemChecked) {
        onSelect?.();
      }
      if (!isMenuItemChecked && isValueSet && wasMenuItemChecked) {
        onDeselect?.();
      }
    }, [hasMatchingPanel, isMenuItemChecked, isRegistered, isResetting, isValueSet, wasMenuItemChecked, onSelect, onDeselect]);
    const isShown = isShownByDefault ? menuItems?.[menuGroup]?.[label] !== void 0 : isMenuItemChecked;
    const cx3 = useCx();
    const classes = (0, import_element208.useMemo)(() => {
      const shouldApplyPlaceholderStyles = shouldRenderPlaceholder && !isShown;
      const firstItemStyle = firstDisplayedItem === label && __experimentalFirstVisibleItemClass;
      const lastItemStyle = lastDisplayedItem === label && __experimentalLastVisibleItemClass;
      return cx3(ToolsPanelItem, shouldApplyPlaceholderStyles && ToolsPanelItemPlaceholder, !shouldApplyPlaceholderStyles && className2, firstItemStyle, lastItemStyle);
    }, [isShown, shouldRenderPlaceholder, className2, cx3, firstDisplayedItem, lastDisplayedItem, __experimentalFirstVisibleItemClass, __experimentalLastVisibleItemClass, label]);
    return {
      ...otherProps,
      isShown,
      shouldRenderPlaceholder,
      className: classes
    };
  }

  // packages/components/build-module/tools-panel/tools-panel-item/component.mjs
  var import_jsx_runtime285 = __toESM(require_jsx_runtime(), 1);
  var UnconnectedToolsPanelItem = (props, forwardedRef) => {
    const {
      children,
      isShown,
      shouldRenderPlaceholder,
      ...toolsPanelItemProps
    } = useToolsPanelItem(props);
    if (!isShown) {
      return shouldRenderPlaceholder ? /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(component_default, {
        ...toolsPanelItemProps,
        ref: forwardedRef
      }) : null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(component_default, {
      ...toolsPanelItemProps,
      ref: forwardedRef,
      children
    });
  };
  var ToolsPanelItem2 = contextConnect(UnconnectedToolsPanelItem, "ToolsPanelItem");
  var component_default40 = ToolsPanelItem2;

  // packages/components/build-module/tree-grid/index.mjs
  var import_dom33 = __toESM(require_dom(), 1);
  var import_element215 = __toESM(require_element(), 1);
  var import_keycodes2 = __toESM(require_keycodes(), 1);

  // packages/components/build-module/tree-grid/roving-tab-index.mjs
  var import_element210 = __toESM(require_element(), 1);

  // packages/components/build-module/tree-grid/roving-tab-index-context.mjs
  var import_element209 = __toESM(require_element(), 1);
  var RovingTabIndexContext = (0, import_element209.createContext)(void 0);
  RovingTabIndexContext.displayName = "RovingTabIndexContext";
  var useRovingTabIndexContext = () => (0, import_element209.useContext)(RovingTabIndexContext);
  var RovingTabIndexProvider = RovingTabIndexContext.Provider;

  // packages/components/build-module/tree-grid/roving-tab-index.mjs
  var import_jsx_runtime286 = __toESM(require_jsx_runtime(), 1);
  function RovingTabIndex({
    children
  }) {
    const [lastFocusedElement, setLastFocusedElement] = (0, import_element210.useState)();
    const providerValue = (0, import_element210.useMemo)(() => ({
      lastFocusedElement,
      setLastFocusedElement
    }), [lastFocusedElement]);
    return /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(RovingTabIndexProvider, {
      value: providerValue,
      children
    });
  }

  // packages/components/build-module/tree-grid/index.mjs
  var import_jsx_runtime291 = __toESM(require_jsx_runtime(), 1);

  // packages/components/build-module/tree-grid/row.mjs
  var import_element211 = __toESM(require_element(), 1);
  var import_jsx_runtime287 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedTreeGridRow({
    children,
    level,
    positionInSet,
    setSize,
    isExpanded,
    ...props
  }, ref) {
    return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)("tr", {
      ...props,
      ref,
      role: "row",
      "aria-level": level,
      "aria-posinset": positionInSet,
      "aria-setsize": setSize,
      "aria-expanded": isExpanded,
      children
    });
  }
  var TreeGridRow = (0, import_element211.forwardRef)(UnforwardedTreeGridRow);
  TreeGridRow.displayName = "TreeGridRow";
  var row_default2 = TreeGridRow;

  // packages/components/build-module/tree-grid/cell.mjs
  var import_element214 = __toESM(require_element(), 1);

  // packages/components/build-module/tree-grid/item.mjs
  var import_element213 = __toESM(require_element(), 1);

  // packages/components/build-module/tree-grid/roving-tab-index-item.mjs
  var import_element212 = __toESM(require_element(), 1);
  var import_jsx_runtime288 = __toESM(require_jsx_runtime(), 1);
  var RovingTabIndexItem = (0, import_element212.forwardRef)(function UnforwardedRovingTabIndexItem({
    children,
    as: Component9,
    ...props
  }, forwardedRef) {
    const localRef = (0, import_element212.useRef)(null);
    const ref = forwardedRef || localRef;
    const {
      lastFocusedElement,
      setLastFocusedElement
    } = useRovingTabIndexContext();
    let tabIndex;
    if (lastFocusedElement) {
      tabIndex = lastFocusedElement === // TODO: The original implementation simply used `ref.current` here, assuming
      // that a forwarded ref would always be an object, which is not necessarily true.
      // This workaround maintains the original runtime behavior in a type-safe way,
      // but should be revisited.
      ("current" in ref ? ref.current : void 0) ? 0 : -1;
    }
    const onFocus = (event) => setLastFocusedElement?.(event.target);
    const allProps = {
      ref,
      tabIndex,
      onFocus,
      ...props
    };
    if (typeof children === "function") {
      return children(allProps);
    }
    if (!Component9) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(Component9, {
      ...allProps,
      children
    });
  });
  RovingTabIndexItem.displayName = "RovingTabIndexItem";
  var roving_tab_index_item_default = RovingTabIndexItem;

  // packages/components/build-module/tree-grid/item.mjs
  var import_jsx_runtime289 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedTreeGridItem({
    children,
    ...props
  }, ref) {
    return /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(roving_tab_index_item_default, {
      ref,
      ...props,
      children
    });
  }
  var TreeGridItem = (0, import_element213.forwardRef)(UnforwardedTreeGridItem);
  TreeGridItem.displayName = "TreeGridItem";
  var item_default3 = TreeGridItem;

  // packages/components/build-module/tree-grid/cell.mjs
  var import_jsx_runtime290 = __toESM(require_jsx_runtime(), 1);
  function UnforwardedTreeGridCell({
    children,
    withoutGridItem = false,
    ...props
  }, ref) {
    return /* @__PURE__ */ (0, import_jsx_runtime290.jsx)("td", {
      ...props,
      role: "gridcell",
      children: withoutGridItem ? /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(import_jsx_runtime290.Fragment, {
        children: typeof children === "function" ? children({
          ...props,
          ref
        }) : children
      }) : /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(item_default3, {
        ref,
        children
      })
    });
  }
  var TreeGridCell = (0, import_element214.forwardRef)(UnforwardedTreeGridCell);
  TreeGridCell.displayName = "TreeGridCell";
  var cell_default = TreeGridCell;

  // packages/components/build-module/tree-grid/index.mjs
  function getRowFocusables(rowElement) {
    const focusablesInRow = import_dom33.focus.focusable.find(rowElement, {
      sequential: true
    });
    return focusablesInRow.filter((focusable) => {
      return focusable.closest('[role="row"]') === rowElement;
    });
  }
  function UnforwardedTreeGrid({
    children,
    onExpandRow = () => {
    },
    onCollapseRow = () => {
    },
    onFocusRow = () => {
    },
    applicationAriaLabel,
    ...props
  }, ref) {
    const onKeyDown = (0, import_element215.useCallback)((event) => {
      const {
        keyCode,
        metaKey,
        ctrlKey,
        altKey
      } = event;
      const hasModifierKeyPressed = metaKey || ctrlKey || altKey;
      if (hasModifierKeyPressed || ![import_keycodes2.UP, import_keycodes2.DOWN, import_keycodes2.LEFT, import_keycodes2.RIGHT, import_keycodes2.HOME, import_keycodes2.END].includes(keyCode)) {
        return;
      }
      event.stopPropagation();
      const {
        activeElement
      } = document;
      const {
        currentTarget: treeGridElement
      } = event;
      if (!activeElement || !treeGridElement.contains(activeElement)) {
        return;
      }
      const activeRow = activeElement.closest('[role="row"]');
      if (!activeRow) {
        return;
      }
      const focusablesInRow = getRowFocusables(activeRow);
      const currentColumnIndex = focusablesInRow.indexOf(activeElement);
      const canExpandCollapse = 0 === currentColumnIndex;
      const cannotFocusNextColumn = canExpandCollapse && (activeRow.getAttribute("data-expanded") === "false" || activeRow.getAttribute("aria-expanded") === "false") && keyCode === import_keycodes2.RIGHT;
      if ([import_keycodes2.LEFT, import_keycodes2.RIGHT].includes(keyCode)) {
        let nextIndex;
        if (keyCode === import_keycodes2.LEFT) {
          nextIndex = Math.max(0, currentColumnIndex - 1);
        } else {
          nextIndex = Math.min(currentColumnIndex + 1, focusablesInRow.length - 1);
        }
        if (canExpandCollapse) {
          if (keyCode === import_keycodes2.LEFT) {
            if (activeRow.getAttribute("data-expanded") === "true" || activeRow.getAttribute("aria-expanded") === "true") {
              onCollapseRow(activeRow);
              event.preventDefault();
              return;
            }
            const level = Math.max(parseInt(activeRow?.getAttribute("aria-level") ?? "1", 10) - 1, 1);
            const rows = Array.from(treeGridElement.querySelectorAll('[role="row"]'));
            let parentRow = activeRow;
            const currentRowIndex = rows.indexOf(activeRow);
            for (let i3 = currentRowIndex; i3 >= 0; i3--) {
              const ariaLevel = rows[i3].getAttribute("aria-level");
              if (ariaLevel !== null && parseInt(ariaLevel, 10) === level) {
                parentRow = rows[i3];
                break;
              }
            }
            getRowFocusables(parentRow)?.[0]?.focus();
          }
          if (keyCode === import_keycodes2.RIGHT) {
            if (activeRow.getAttribute("data-expanded") === "false" || activeRow.getAttribute("aria-expanded") === "false") {
              onExpandRow(activeRow);
              event.preventDefault();
              return;
            }
            const focusableItems = getRowFocusables(activeRow);
            if (focusableItems.length > 0) {
              focusableItems[nextIndex]?.focus();
            }
          }
          event.preventDefault();
          return;
        }
        if (cannotFocusNextColumn) {
          return;
        }
        focusablesInRow[nextIndex].focus();
        event.preventDefault();
      } else if ([import_keycodes2.UP, import_keycodes2.DOWN].includes(keyCode)) {
        const rows = Array.from(treeGridElement.querySelectorAll('[role="row"]'));
        const currentRowIndex = rows.indexOf(activeRow);
        let nextRowIndex;
        if (keyCode === import_keycodes2.UP) {
          nextRowIndex = Math.max(0, currentRowIndex - 1);
        } else {
          nextRowIndex = Math.min(currentRowIndex + 1, rows.length - 1);
        }
        if (nextRowIndex === currentRowIndex) {
          event.preventDefault();
          return;
        }
        const focusablesInNextRow = getRowFocusables(rows[nextRowIndex]);
        if (!focusablesInNextRow || !focusablesInNextRow.length) {
          event.preventDefault();
          return;
        }
        const nextIndex = Math.min(currentColumnIndex, focusablesInNextRow.length - 1);
        focusablesInNextRow[nextIndex].focus();
        onFocusRow(event, activeRow, rows[nextRowIndex]);
        event.preventDefault();
      } else if ([import_keycodes2.HOME, import_keycodes2.END].includes(keyCode)) {
        const rows = Array.from(treeGridElement.querySelectorAll('[role="row"]'));
        const currentRowIndex = rows.indexOf(activeRow);
        let nextRowIndex;
        if (keyCode === import_keycodes2.HOME) {
          nextRowIndex = 0;
        } else {
          nextRowIndex = rows.length - 1;
        }
        if (nextRowIndex === currentRowIndex) {
          event.preventDefault();
          return;
        }
        const focusablesInNextRow = getRowFocusables(rows[nextRowIndex]);
        if (!focusablesInNextRow || !focusablesInNextRow.length) {
          event.preventDefault();
          return;
        }
        const nextIndex = Math.min(currentColumnIndex, focusablesInNextRow.length - 1);
        focusablesInNextRow[nextIndex].focus();
        onFocusRow(event, activeRow, rows[nextRowIndex]);
        event.preventDefault();
      }
    }, [onExpandRow, onCollapseRow, onFocusRow]);
    return /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(RovingTabIndex, {
      children: /* @__PURE__ */ (0, import_jsx_runtime291.jsx)("div", {
        role: "application",
        "aria-label": applicationAriaLabel,
        children: /* @__PURE__ */ (0, import_jsx_runtime291.jsx)("table", {
          ...props,
          role: "treegrid",
          onKeyDown,
          ref,
          children: /* @__PURE__ */ (0, import_jsx_runtime291.jsx)("tbody", {
            children
          })
        })
      })
    });
  }
  var TreeGrid = (0, import_element215.forwardRef)(UnforwardedTreeGrid);
  TreeGrid.displayName = "TreeGrid";
  var tree_grid_default = TreeGrid;

  // packages/components/build-module/isolated-event-container/index.mjs
  var import_element216 = __toESM(require_element(), 1);
  var import_deprecated26 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime292 = __toESM(require_jsx_runtime(), 1);
  function stopPropagation(event) {
    event.stopPropagation();
  }
  var IsolatedEventContainer = (0, import_element216.forwardRef)((props, ref) => {
    (0, import_deprecated26.default)("wp.components.IsolatedEventContainer", {
      since: "5.7"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime292.jsx)("div", {
      ...props,
      ref,
      onMouseDown: stopPropagation
    });
  });
  var isolated_event_container_default = IsolatedEventContainer;

  // packages/components/build-module/z-stack/component.mjs
  var import_element217 = __toESM(require_element(), 1);

  // packages/components/build-module/z-stack/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__40() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var ZStackChildView = /* @__PURE__ */ createStyled("div", false ? {
    target: "ebn2ljm1"
  } : {
    target: "ebn2ljm1",
    label: "ZStackChildView"
  })("&:not( :first-of-type ){", ({
    offsetAmount
  }) => /* @__PURE__ */ css({
    marginInlineStart: offsetAmount
  }, false ? "" : ";label:ZStackChildView;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFZRyIsImZpbGUiOiJzdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmV4cG9ydCBjb25zdCBaU3RhY2tDaGlsZFZpZXcgPSBzdHlsZWQuZGl2PCB7XG5cdG9mZnNldEFtb3VudDogbnVtYmVyO1xuXHR6SW5kZXg6IG51bWJlcjtcbn0gPmBcblx0Jjpub3QoIDpmaXJzdC1vZi10eXBlICkge1xuXHRcdCR7ICggeyBvZmZzZXRBbW91bnQgfSApID0+XG5cdFx0XHRjc3MoIHtcblx0XHRcdFx0bWFyZ2luSW5saW5lU3RhcnQ6IG9mZnNldEFtb3VudCxcblx0XHRcdH0gKSB9O1xuXHR9XG5cblx0JHsgKCB7IHpJbmRleCB9ICkgPT4gY3NzKCB7IHpJbmRleCB9ICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBaU3RhY2tWaWV3ID0gc3R5bGVkLmRpdjwge1xuXHRpc0xheWVyZWQ6IGJvb2xlYW47XG59ID5gXG5cdGRpc3BsYXk6IGlubGluZS1ncmlkO1xuXHRncmlkLWF1dG8tZmxvdzogY29sdW1uO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cblx0JiA+ICR7IFpTdGFja0NoaWxkVmlldyB9IHtcblx0XHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdFx0anVzdGlmeS1zZWxmOiBzdGFydDtcblxuXHRcdCR7ICggeyBpc0xheWVyZWQgfSApID0+XG5cdFx0XHRpc0xheWVyZWRcblx0XHRcdFx0PyAvLyBXaGVuIGBpc0xheWVyZWRgIGlzIHRydWUsIGFsbCBpdGVtcyBvdmVybGFwIGluIHRoZSBzYW1lIGdyaWQgY2VsbFxuXHRcdFx0XHQgIGNzcyggeyBncmlkUm93U3RhcnQ6IDEsIGdyaWRDb2x1bW5TdGFydDogMSB9IClcblx0XHRcdFx0OiB1bmRlZmluZWQgfTtcblx0fVxuYDtcbiJdfQ== */"), ";}", ({
    zIndex
  }) => /* @__PURE__ */ css({
    zIndex
  }, false ? "" : ";label:ZStackChildView;", false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQnNCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuZXhwb3J0IGNvbnN0IFpTdGFja0NoaWxkVmlldyA9IHN0eWxlZC5kaXY8IHtcblx0b2Zmc2V0QW1vdW50OiBudW1iZXI7XG5cdHpJbmRleDogbnVtYmVyO1xufSA+YFxuXHQmOm5vdCggOmZpcnN0LW9mLXR5cGUgKSB7XG5cdFx0JHsgKCB7IG9mZnNldEFtb3VudCB9ICkgPT5cblx0XHRcdGNzcygge1xuXHRcdFx0XHRtYXJnaW5JbmxpbmVTdGFydDogb2Zmc2V0QW1vdW50LFxuXHRcdFx0fSApIH07XG5cdH1cblxuXHQkeyAoIHsgekluZGV4IH0gKSA9PiBjc3MoIHsgekluZGV4IH0gKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFpTdGFja1ZpZXcgPSBzdHlsZWQuZGl2PCB7XG5cdGlzTGF5ZXJlZDogYm9vbGVhbjtcbn0gPmBcblx0ZGlzcGxheTogaW5saW5lLWdyaWQ7XG5cdGdyaWQtYXV0by1mbG93OiBjb2x1bW47XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuXHQmID4gJHsgWlN0YWNrQ2hpbGRWaWV3IH0ge1xuXHRcdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0XHRqdXN0aWZ5LXNlbGY6IHN0YXJ0O1xuXG5cdFx0JHsgKCB7IGlzTGF5ZXJlZCB9ICkgPT5cblx0XHRcdGlzTGF5ZXJlZFxuXHRcdFx0XHQ/IC8vIFdoZW4gYGlzTGF5ZXJlZGAgaXMgdHJ1ZSwgYWxsIGl0ZW1zIG92ZXJsYXAgaW4gdGhlIHNhbWUgZ3JpZCBjZWxsXG5cdFx0XHRcdCAgY3NzKCB7IGdyaWRSb3dTdGFydDogMSwgZ3JpZENvbHVtblN0YXJ0OiAxIH0gKVxuXHRcdFx0XHQ6IHVuZGVmaW5lZCB9O1xuXHR9XG5gO1xuIl19 */"), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFTRyIsImZpbGUiOiJzdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmV4cG9ydCBjb25zdCBaU3RhY2tDaGlsZFZpZXcgPSBzdHlsZWQuZGl2PCB7XG5cdG9mZnNldEFtb3VudDogbnVtYmVyO1xuXHR6SW5kZXg6IG51bWJlcjtcbn0gPmBcblx0Jjpub3QoIDpmaXJzdC1vZi10eXBlICkge1xuXHRcdCR7ICggeyBvZmZzZXRBbW91bnQgfSApID0+XG5cdFx0XHRjc3MoIHtcblx0XHRcdFx0bWFyZ2luSW5saW5lU3RhcnQ6IG9mZnNldEFtb3VudCxcblx0XHRcdH0gKSB9O1xuXHR9XG5cblx0JHsgKCB7IHpJbmRleCB9ICkgPT4gY3NzKCB7IHpJbmRleCB9ICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBaU3RhY2tWaWV3ID0gc3R5bGVkLmRpdjwge1xuXHRpc0xheWVyZWQ6IGJvb2xlYW47XG59ID5gXG5cdGRpc3BsYXk6IGlubGluZS1ncmlkO1xuXHRncmlkLWF1dG8tZmxvdzogY29sdW1uO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cblx0JiA+ICR7IFpTdGFja0NoaWxkVmlldyB9IHtcblx0XHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdFx0anVzdGlmeS1zZWxmOiBzdGFydDtcblxuXHRcdCR7ICggeyBpc0xheWVyZWQgfSApID0+XG5cdFx0XHRpc0xheWVyZWRcblx0XHRcdFx0PyAvLyBXaGVuIGBpc0xheWVyZWRgIGlzIHRydWUsIGFsbCBpdGVtcyBvdmVybGFwIGluIHRoZSBzYW1lIGdyaWQgY2VsbFxuXHRcdFx0XHQgIGNzcyggeyBncmlkUm93U3RhcnQ6IDEsIGdyaWRDb2x1bW5TdGFydDogMSB9IClcblx0XHRcdFx0OiB1bmRlZmluZWQgfTtcblx0fVxuYDtcbiJdfQ== */"));
  var _ref10 = false ? {
    name: "rs0gp6",
    styles: "grid-row-start:1;grid-column-start:1"
  } : {
    name: "80o7c0-ZStackView",
    styles: "grid-row-start:1;grid-column-start:1;label:ZStackView;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrQ00iLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5leHBvcnQgY29uc3QgWlN0YWNrQ2hpbGRWaWV3ID0gc3R5bGVkLmRpdjwge1xuXHRvZmZzZXRBbW91bnQ6IG51bWJlcjtcblx0ekluZGV4OiBudW1iZXI7XG59ID5gXG5cdCY6bm90KCA6Zmlyc3Qtb2YtdHlwZSApIHtcblx0XHQkeyAoIHsgb2Zmc2V0QW1vdW50IH0gKSA9PlxuXHRcdFx0Y3NzKCB7XG5cdFx0XHRcdG1hcmdpbklubGluZVN0YXJ0OiBvZmZzZXRBbW91bnQsXG5cdFx0XHR9ICkgfTtcblx0fVxuXG5cdCR7ICggeyB6SW5kZXggfSApID0+IGNzcyggeyB6SW5kZXggfSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgWlN0YWNrVmlldyA9IHN0eWxlZC5kaXY8IHtcblx0aXNMYXllcmVkOiBib29sZWFuO1xufSA+YFxuXHRkaXNwbGF5OiBpbmxpbmUtZ3JpZDtcblx0Z3JpZC1hdXRvLWZsb3c6IGNvbHVtbjtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXG5cdCYgPiAkeyBaU3RhY2tDaGlsZFZpZXcgfSB7XG5cdFx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRcdGp1c3RpZnktc2VsZjogc3RhcnQ7XG5cblx0XHQkeyAoIHsgaXNMYXllcmVkIH0gKSA9PlxuXHRcdFx0aXNMYXllcmVkXG5cdFx0XHRcdD8gLy8gV2hlbiBgaXNMYXllcmVkYCBpcyB0cnVlLCBhbGwgaXRlbXMgb3ZlcmxhcCBpbiB0aGUgc2FtZSBncmlkIGNlbGxcblx0XHRcdFx0ICBjc3MoIHsgZ3JpZFJvd1N0YXJ0OiAxLCBncmlkQ29sdW1uU3RhcnQ6IDEgfSApXG5cdFx0XHRcdDogdW5kZWZpbmVkIH07XG5cdH1cbmA7XG4iXX0= */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__40
  };
  var ZStackView = /* @__PURE__ */ createStyled("div", false ? {
    target: "ebn2ljm0"
  } : {
    target: "ebn2ljm0",
    label: "ZStackView"
  })("display:inline-grid;grid-auto-flow:column;position:relative;&>", ZStackChildView, "{position:relative;justify-self:start;", ({
    isLayered
  }) => isLayered ? (
    // When `isLayered` is true, all items overlap in the same grid cell
    _ref10
  ) : void 0, ";}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQkciLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5leHBvcnQgY29uc3QgWlN0YWNrQ2hpbGRWaWV3ID0gc3R5bGVkLmRpdjwge1xuXHRvZmZzZXRBbW91bnQ6IG51bWJlcjtcblx0ekluZGV4OiBudW1iZXI7XG59ID5gXG5cdCY6bm90KCA6Zmlyc3Qtb2YtdHlwZSApIHtcblx0XHQkeyAoIHsgb2Zmc2V0QW1vdW50IH0gKSA9PlxuXHRcdFx0Y3NzKCB7XG5cdFx0XHRcdG1hcmdpbklubGluZVN0YXJ0OiBvZmZzZXRBbW91bnQsXG5cdFx0XHR9ICkgfTtcblx0fVxuXG5cdCR7ICggeyB6SW5kZXggfSApID0+IGNzcyggeyB6SW5kZXggfSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgWlN0YWNrVmlldyA9IHN0eWxlZC5kaXY8IHtcblx0aXNMYXllcmVkOiBib29sZWFuO1xufSA+YFxuXHRkaXNwbGF5OiBpbmxpbmUtZ3JpZDtcblx0Z3JpZC1hdXRvLWZsb3c6IGNvbHVtbjtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXG5cdCYgPiAkeyBaU3RhY2tDaGlsZFZpZXcgfSB7XG5cdFx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRcdGp1c3RpZnktc2VsZjogc3RhcnQ7XG5cblx0XHQkeyAoIHsgaXNMYXllcmVkIH0gKSA9PlxuXHRcdFx0aXNMYXllcmVkXG5cdFx0XHRcdD8gLy8gV2hlbiBgaXNMYXllcmVkYCBpcyB0cnVlLCBhbGwgaXRlbXMgb3ZlcmxhcCBpbiB0aGUgc2FtZSBncmlkIGNlbGxcblx0XHRcdFx0ICBjc3MoIHsgZ3JpZFJvd1N0YXJ0OiAxLCBncmlkQ29sdW1uU3RhcnQ6IDEgfSApXG5cdFx0XHRcdDogdW5kZWZpbmVkIH07XG5cdH1cbmA7XG4iXX0= */"));

  // packages/components/build-module/z-stack/component.mjs
  var import_jsx_runtime293 = __toESM(require_jsx_runtime(), 1);
  function UnconnectedZStack(props, forwardedRef) {
    const {
      children,
      className: className2,
      isLayered = true,
      isReversed = false,
      offset: offset3 = 0,
      ...otherProps
    } = useContextSystem(props, "ZStack");
    const validChildren = getValidChildren(children);
    const childrenLastIndex = validChildren.length - 1;
    const clonedChildren = validChildren.map((child, index2) => {
      const zIndex = isReversed ? childrenLastIndex - index2 : index2;
      const offsetAmount = isLayered ? offset3 * index2 : offset3;
      const key = (0, import_element217.isValidElement)(child) ? child.key : index2;
      return /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(ZStackChildView, {
        offsetAmount,
        zIndex,
        children: child
      }, key);
    });
    return /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(ZStackView, {
      ...otherProps,
      className: className2,
      isLayered,
      ref: forwardedRef,
      children: clonedChildren
    });
  }
  var ZStack = contextConnect(UnconnectedZStack, "ZStack");
  var component_default41 = ZStack;

  // packages/components/build-module/higher-order/navigate-regions/index.mjs
  var import_element218 = __toESM(require_element(), 1);
  var import_compose76 = __toESM(require_compose(), 1);
  var import_keycodes3 = __toESM(require_keycodes(), 1);
  var import_jsx_runtime294 = __toESM(require_jsx_runtime(), 1);
  var defaultShortcuts = {
    previous: [{
      modifier: "ctrlShift",
      character: "`"
    }, {
      modifier: "ctrlShift",
      character: "~"
    }, {
      modifier: "access",
      character: "p"
    }],
    next: [{
      modifier: "ctrl",
      character: "`"
    }, {
      modifier: "access",
      character: "n"
    }]
  };
  function useNavigateRegions(shortcuts = defaultShortcuts) {
    const ref = (0, import_element218.useRef)(null);
    const [isFocusingRegions, setIsFocusingRegions] = (0, import_element218.useState)(false);
    function focusRegion(offset3) {
      const regions = Array.from(ref.current?.querySelectorAll('[role="region"][tabindex="-1"]') ?? []);
      if (!regions.length) {
        return;
      }
      let nextRegion = regions[0];
      const wrappingRegion = ref.current?.ownerDocument?.activeElement?.closest('[role="region"][tabindex="-1"]');
      const selectedIndex = wrappingRegion ? regions.indexOf(wrappingRegion) : -1;
      if (selectedIndex !== -1) {
        let nextIndex = selectedIndex + offset3;
        nextIndex = nextIndex === -1 ? regions.length - 1 : nextIndex;
        nextIndex = nextIndex === regions.length ? 0 : nextIndex;
        nextRegion = regions[nextIndex];
      }
      nextRegion.focus();
      setIsFocusingRegions(true);
    }
    const clickRef = (0, import_compose76.useRefEffect)((element) => {
      function onClick() {
        setIsFocusingRegions(false);
      }
      element.addEventListener("click", onClick);
      return () => {
        element.removeEventListener("click", onClick);
      };
    }, [setIsFocusingRegions]);
    return {
      ref: (0, import_compose76.useMergeRefs)([ref, clickRef]),
      className: isFocusingRegions ? "is-focusing-regions" : "",
      onKeyDown(event) {
        if (shortcuts.previous.some(({
          modifier,
          character: character2
        }) => {
          return import_keycodes3.isKeyboardEvent[modifier](event, character2);
        })) {
          focusRegion(-1);
        } else if (shortcuts.next.some(({
          modifier,
          character: character2
        }) => {
          return import_keycodes3.isKeyboardEvent[modifier](event, character2);
        })) {
          focusRegion(1);
        }
      }
    };
  }
  var navigate_regions_default = (0, import_compose76.createHigherOrderComponent)((Component9) => function NavigateRegions({
    shortcuts,
    ...props
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime294.jsx)("div", {
      ...useNavigateRegions(shortcuts),
      children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(Component9, {
        ...props
      })
    });
  }, "navigateRegions");

  // packages/components/build-module/higher-order/with-constrained-tabbing/index.mjs
  var import_compose77 = __toESM(require_compose(), 1);
  var import_jsx_runtime295 = __toESM(require_jsx_runtime(), 1);
  var withConstrainedTabbing = (0, import_compose77.createHigherOrderComponent)((WrappedComponent) => function ComponentWithConstrainedTabbing(props) {
    const ref = (0, import_compose77.useConstrainedTabbing)();
    return /* @__PURE__ */ (0, import_jsx_runtime295.jsx)("div", {
      ref,
      tabIndex: -1,
      children: /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(WrappedComponent, {
        ...props
      })
    });
  }, "withConstrainedTabbing");
  var with_constrained_tabbing_default = withConstrainedTabbing;

  // packages/components/build-module/higher-order/with-fallback-styles/index.mjs
  var import_es63 = __toESM(require_es6(), 1);
  var import_element219 = __toESM(require_element(), 1);
  var import_compose78 = __toESM(require_compose(), 1);
  var import_jsx_runtime296 = __toESM(require_jsx_runtime(), 1);
  var with_fallback_styles_default = (mapNodeToProps) => (0, import_compose78.createHigherOrderComponent)((WrappedComponent) => {
    return class WithFallbackStyles extends import_element219.Component {
      constructor(props) {
        super(props);
        this.nodeRef = this.props.node;
        this.state = {
          fallbackStyles: void 0,
          grabStylesCompleted: false
        };
        this.bindRef = this.bindRef.bind(this);
      }
      bindRef(node2) {
        if (!node2) {
          return;
        }
        this.nodeRef = node2;
      }
      componentDidMount() {
        this.grabFallbackStyles();
      }
      componentDidUpdate() {
        this.grabFallbackStyles();
      }
      grabFallbackStyles() {
        const {
          grabStylesCompleted,
          fallbackStyles
        } = this.state;
        if (this.nodeRef && !grabStylesCompleted) {
          const newFallbackStyles = mapNodeToProps(this.nodeRef, this.props);
          if (!(0, import_es63.default)(newFallbackStyles, fallbackStyles)) {
            this.setState({
              fallbackStyles: newFallbackStyles,
              grabStylesCompleted: Object.values(newFallbackStyles).every(Boolean)
            });
          }
        }
      }
      render() {
        const wrappedComponent = /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(WrappedComponent, {
          ...this.props,
          ...this.state.fallbackStyles
        });
        return this.props.node ? wrappedComponent : /* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", {
          ref: this.bindRef,
          children: [" ", wrappedComponent, " "]
        });
      }
    };
  }, "withFallbackStyles");

  // packages/components/build-module/higher-order/with-filters/index.mjs
  var import_element220 = __toESM(require_element(), 1);
  var import_hooks11 = __toESM(require_hooks(), 1);
  var import_compose79 = __toESM(require_compose(), 1);
  var import_jsx_runtime297 = __toESM(require_jsx_runtime(), 1);
  var ANIMATION_FRAME_PERIOD = 16;
  function withFilters(hookName) {
    return (0, import_compose79.createHigherOrderComponent)((OriginalComponent) => {
      const namespace = "core/with-filters/" + hookName;
      let FilteredComponent;
      function ensureFilteredComponent() {
        if (FilteredComponent === void 0) {
          FilteredComponent = (0, import_hooks11.applyFilters)(hookName, OriginalComponent);
        }
      }
      class FilteredComponentRenderer extends import_element220.Component {
        constructor(props) {
          super(props);
          ensureFilteredComponent();
        }
        componentDidMount() {
          FilteredComponentRenderer.instances.push(this);
          if (FilteredComponentRenderer.instances.length === 1) {
            (0, import_hooks11.addAction)("hookRemoved", namespace, onHooksUpdated);
            (0, import_hooks11.addAction)("hookAdded", namespace, onHooksUpdated);
          }
        }
        componentWillUnmount() {
          FilteredComponentRenderer.instances = FilteredComponentRenderer.instances.filter((instance) => instance !== this);
          if (FilteredComponentRenderer.instances.length === 0) {
            (0, import_hooks11.removeAction)("hookRemoved", namespace);
            (0, import_hooks11.removeAction)("hookAdded", namespace);
          }
        }
        render() {
          return /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(FilteredComponent, {
            ...this.props
          });
        }
      }
      FilteredComponentRenderer.instances = [];
      const throttledForceUpdate = (0, import_compose79.debounce)(() => {
        FilteredComponent = (0, import_hooks11.applyFilters)(hookName, OriginalComponent);
        FilteredComponentRenderer.instances.forEach((instance) => {
          instance.forceUpdate();
        });
      }, ANIMATION_FRAME_PERIOD);
      function onHooksUpdated(updatedHookName) {
        if (updatedHookName === hookName) {
          throttledForceUpdate();
        }
      }
      return FilteredComponentRenderer;
    }, "withFilters");
  }

  // packages/components/build-module/higher-order/with-focus-return/index.mjs
  var import_element221 = __toESM(require_element(), 1);
  var import_compose80 = __toESM(require_compose(), 1);
  var import_deprecated27 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime298 = __toESM(require_jsx_runtime(), 1);
  function isComponentLike(object) {
    return object instanceof import_element221.Component || typeof object === "function";
  }
  var with_focus_return_default = (0, import_compose80.createHigherOrderComponent)(
    // @ts-expect-error TODO: Reconcile with intended `createHigherOrderComponent` types
    (options2) => {
      const HoC = ({
        onFocusReturn
      } = {}) => (WrappedComponent) => {
        const WithFocusReturn = (props) => {
          const ref = (0, import_compose80.useFocusReturn)(onFocusReturn);
          return /* @__PURE__ */ (0, import_jsx_runtime298.jsx)("div", {
            ref,
            children: /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(WrappedComponent, {
              ...props
            })
          });
        };
        return WithFocusReturn;
      };
      if (isComponentLike(options2)) {
        const WrappedComponent = options2;
        return HoC()(WrappedComponent);
      }
      return HoC(options2);
    },
    "withFocusReturn"
  );
  var Provider3 = ({
    children
  }) => {
    (0, import_deprecated27.default)("wp.components.FocusReturnProvider component", {
      since: "5.7",
      hint: "This provider is not used anymore. You can just remove it from your codebase"
    });
    return children;
  };

  // packages/components/build-module/higher-order/with-notices/index.mjs
  var import_element222 = __toESM(require_element(), 1);
  var import_compose81 = __toESM(require_compose(), 1);
  var import_jsx_runtime299 = __toESM(require_jsx_runtime(), 1);
  var with_notices_default = (0, import_compose81.createHigherOrderComponent)((OriginalComponent) => {
    function Component9(props, ref) {
      const [noticeList, setNoticeList] = (0, import_element222.useState)([]);
      const noticeOperations = (0, import_element222.useMemo)(() => {
        const createNotice = (notice) => {
          const noticeToAdd = notice.id ? notice : {
            ...notice,
            id: v4_default()
          };
          setNoticeList((current) => [...current, noticeToAdd]);
        };
        return {
          createNotice,
          createErrorNotice: (msg) => {
            createNotice({
              status: "error",
              content: msg
            });
          },
          removeNotice: (id3) => {
            setNoticeList((current) => current.filter((notice) => notice.id !== id3));
          },
          removeAllNotices: () => {
            setNoticeList([]);
          }
        };
      }, []);
      const propsOut = {
        ...props,
        noticeList,
        noticeOperations,
        noticeUI: noticeList.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(list_default, {
          className: "components-with-notices-ui",
          notices: noticeList,
          onRemove: noticeOperations.removeNotice
        })
      };
      return isForwardRef ? /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(OriginalComponent, {
        ...propsOut,
        ref
      }) : /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(OriginalComponent, {
        ...propsOut
      });
    }
    let isForwardRef;
    const {
      render
    } = OriginalComponent;
    if (typeof render === "function") {
      isForwardRef = true;
      return (0, import_element222.forwardRef)(Component9);
    }
    return Component9;
  }, "withNotices");

  // packages/components/build-module/menu/index.mjs
  var import_element235 = __toESM(require_element(), 1);
  var import_i18n79 = __toESM(require_i18n(), 1);

  // packages/components/build-module/menu/context.mjs
  var import_element223 = __toESM(require_element(), 1);
  var Context2 = (0, import_element223.createContext)(void 0);
  Context2.displayName = "MenuContext";

  // packages/components/build-module/menu/item.mjs
  var import_element224 = __toESM(require_element(), 1);

  // packages/components/build-module/menu/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__41() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var CONTENT_WRAPPER_PADDING = space(1);
  var ITEM_PADDING_BLOCK = space(1);
  var ITEM_PADDING_INLINE = space(3);
  var DEFAULT_BORDER_COLOR = COLORS.theme.gray[300];
  var DIVIDER_COLOR = COLORS.theme.gray[200];
  var LIGHTER_TEXT_COLOR = COLORS.theme.gray[700];
  var LIGHT_BACKGROUND_COLOR = COLORS.theme.gray[100];
  var TOOLBAR_VARIANT_BORDER_COLOR = COLORS.theme.foreground;
  var DEFAULT_BOX_SHADOW = `0 0 0 ${config_values_default.borderWidth} ${DEFAULT_BORDER_COLOR}, ${config_values_default.elevationMedium}`;
  var TOOLBAR_VARIANT_BOX_SHADOW = `0 0 0 ${config_values_default.borderWidth} ${TOOLBAR_VARIANT_BORDER_COLOR}`;
  var GRID_TEMPLATE_COLS = "minmax( 0, max-content ) 1fr";
  var Menu22 = /* @__PURE__ */ createStyled(Menu, false ? {
    target: "e1wg7tti13"
  } : {
    target: "e1wg7tti13",
    label: "Menu"
  })("position:relative;z-index:1000000;display:grid;grid-template-columns:", GRID_TEMPLATE_COLS, ";grid-template-rows:auto;box-sizing:border-box;min-width:160px;max-width:320px;max-height:var( --popover-available-height );padding:", CONTENT_WRAPPER_PADDING, ";overscroll-behavior:contain;overflow:auto;background-color:", COLORS.ui.background, ";border-radius:", config_values_default.radiusMedium, ";", (props) => /* @__PURE__ */ css("box-shadow:", props.variant === "toolbar" ? TOOLBAR_VARIANT_BOX_SHADOW : DEFAULT_BOX_SHADOW, ";" + (false ? "" : ";label:Menu;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3RG9CIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIGZvbnQsIHJ0bCwgQ09ORklHLCBEUk9QRE9XTl9NT1RJT05fQ1NTIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgSWNvbiBmcm9tICcuLi9pY29uJztcbmltcG9ydCB7IFRydW5jYXRlIH0gZnJvbSAnLi4vdHJ1bmNhdGUnO1xuaW1wb3J0IHR5cGUgeyBDb250ZXh0UHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuY29uc3QgQ09OVEVOVF9XUkFQUEVSX1BBRERJTkcgPSBzcGFjZSggMSApO1xuY29uc3QgSVRFTV9QQURESU5HX0JMT0NLID0gc3BhY2UoIDEgKTtcbmNvbnN0IElURU1fUEFERElOR19JTkxJTkUgPSBzcGFjZSggMyApO1xuXG4vLyBUT0RPOlxuLy8gLSBib3JkZXIgY29sb3IgYW5kIGRpdmlkZXIgY29sb3IgYXJlIGRpZmZlcmVudCBmcm9tIENPTE9SUy50aGVtZSB2YXJpYWJsZXNcbi8vIC0gbGlnaHRlciB0ZXh0IGNvbG9yIGlzIG5vdCBkZWZpbmVkIGluIENPTE9SUy50aGVtZSwgc2hvdWxkIGl0IGJlP1xuLy8gLSBsaWdodGVyIGJhY2tncm91bmQgY29sb3IgaXMgbm90IGRlZmluZWQgaW4gQ09MT1JTLnRoZW1lLCBzaG91bGQgaXQgYmU/XG5jb25zdCBERUZBVUxUX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXTtcbmNvbnN0IERJVklERVJfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgMjAwIF07XG5jb25zdCBMSUdIVEVSX1RFWFRfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF07XG5jb25zdCBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SID0gQ09MT1JTLnRoZW1lLmdyYXlbIDEwMCBdO1xuY29uc3QgVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kO1xuY29uc3QgREVGQVVMVF9CT1hfU0hBRE9XID0gYDAgMCAwICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9ICR7IERFRkFVTFRfQk9SREVSX0NPTE9SIH0sICR7IENPTkZJRy5lbGV2YXRpb25NZWRpdW0gfWA7XG5jb25zdCBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPVyA9IGAwIDAgMCAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSAkeyBUT09MQkFSX1ZBUklBTlRfQk9SREVSX0NPTE9SIH1gO1xuXG5jb25zdCBHUklEX1RFTVBMQVRFX0NPTFMgPSAnbWlubWF4KCAwLCBtYXgtY29udGVudCApIDFmcic7XG5cbmV4cG9ydCBjb25zdCBNZW51ID0gc3R5bGVkKCBBcmlha2l0Lk1lbnUgKTwgUGljazwgQ29udGV4dFByb3BzLCAndmFyaWFudCcgPiA+YFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdC8qIFNhbWUgYXMgcG9wb3ZlciBjb21wb25lbnQgKi9cblx0LyogVE9ETzogaXMgdGhlcmUgYSB3YXkgdG8gcmVhZCB0aGUgc2FzcyB2YXJpYWJsZT8gKi9cblx0ei1pbmRleDogMTAwMDAwMDtcblxuXHRkaXNwbGF5OiBncmlkO1xuXHRncmlkLXRlbXBsYXRlLWNvbHVtbnM6ICR7IEdSSURfVEVNUExBVEVfQ09MUyB9O1xuXHRncmlkLXRlbXBsYXRlLXJvd3M6IGF1dG87XG5cblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0bWluLXdpZHRoOiAxNjBweDtcblx0bWF4LXdpZHRoOiAzMjBweDtcblx0bWF4LWhlaWdodDogdmFyKCAtLXBvcG92ZXItYXZhaWxhYmxlLWhlaWdodCApO1xuXG5cdHBhZGRpbmc6ICR7IENPTlRFTlRfV1JBUFBFUl9QQURESU5HIH07XG5cblx0b3ZlcnNjcm9sbC1iZWhhdmlvcjogY29udGFpbjtcblx0b3ZlcmZsb3c6IGF1dG87XG5cblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c01lZGl1bSB9O1xuXHQkeyAoIHByb3BzICkgPT4gY3NzYFxuXHRcdGJveC1zaGFkb3c6ICR7IHByb3BzLnZhcmlhbnQgPT09ICd0b29sYmFyJ1xuXHRcdFx0PyBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPV1xuXHRcdFx0OiBERUZBVUxUX0JPWF9TSEFET1cgfTtcblx0YCB9XG5cblx0LyogT25seSB2aXNpYmxlIGluIFdpbmRvd3MgSGlnaCBDb250cmFzdCBtb2RlICovXG5cdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudCAhaW1wb3J0YW50O1xuXG5cdC8qIE9wZW4vY2xvc2UgYW5pbWF0aW9uICovXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdHRyYW5zaXRpb24tcHJvcGVydHk6IHRyYW5zZm9ybSwgb3BhY2l0eTtcblx0XHR0cmFuc2l0aW9uLWR1cmF0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RVUkFUSU9OIH0sXG5cdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLkZBREVfRFVSQVRJT04gfTtcblx0XHR0cmFuc2l0aW9uLXRpbWluZy1mdW5jdGlvbjogJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9FQVNJTkcgfSxcblx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9FQVNJTkcgfTtcblx0XHR3aWxsLWNoYW5nZTogdHJhbnNmb3JtLCBvcGFjaXR5O1xuXG5cdFx0Jjpub3QoIFtkYXRhLXN1Ym1lbnVdICkge1xuXHRcdFx0LyogUmVnYXJkbGVzcyBvZiB0aGUgc2lkZSwgZmFkZSBpbiBhbmQgb3V0LiAqL1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHRcdCZbZGF0YS1lbnRlcl0ge1xuXHRcdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0fVxuXG5cdFx0XHQvKiBTbGlkZSBpbiB0aGUgZGlyZWN0aW9uIHRoZSBtZW51IGlzIG9wZW5pbmcuICovXG5cdFx0XHQmW2RhdGEtc2lkZT0nYm90dG9tJ10ge1xuXHRcdFx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoXG5cdFx0XHRcdFx0LSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J3RvcCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVZKFxuXHRcdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J2xlZnQnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWChcblx0XHRcdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKFxuXHRcdFx0XHRcdC0keyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdib3R0b20nXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSd0b3AnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWSggMCApO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLWVudGVyXVtkYXRhLXNpZGU9J2xlZnQnXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKCAwICk7XG5cdFx0XHR9XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBiYXNlSXRlbSA9IGNzc2Bcblx0YWxsOiB1bnNldDtcblxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCA4ICkgfTtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQvKiBPY2N1cHkgdGhlIHdpZHRoIG9mIGFsbCBncmlkIGNvbHVtbnMgKGllLiBmdWxsIHdpZHRoKSAqL1xuXHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogJHsgR1JJRF9URU1QTEFURV9DT0xTIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cblx0QHN1cHBvcnRzICggZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiBzdWJncmlkICkge1xuXHRcdC8qXG5cdFx0ICogRGVmaW5lIGEgZ3JpZCBsYXlvdXQgd2hpY2ggaW5oZXJpdHMgdGhlIHNhbWUgY29sdW1ucyBjb25maWd1cmF0aW9uXG5cdFx0ICogZnJvbSB0aGUgcGFyZW50IGxheW91dCAoaWUuIHN1YmdyaWQpLiBUaGlzIGFsbG93cyB0aGUgbWVudVxuXHRcdCAqIHRvIHN5bmNocm9uaXplIHRoZSBpbmRlbnRhdGlvbiBvZiBhbGwgaXRzIGl0ZW1zLlxuXHRcdCAqL1xuXHRcdGdyaWQtdGVtcGxhdGUtY29sdW1uczogc3ViZ3JpZDtcblx0fVxuXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdGZvbnQtd2VpZ2h0OiBub3JtYWw7XG5cdGxpbmUtaGVpZ2h0OiAyMHB4O1xuXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRwYWRkaW5nLWJsb2NrOiAkeyBJVEVNX1BBRERJTkdfQkxPQ0sgfTtcblx0cGFkZGluZy1pbmxpbmU6ICR7IElURU1fUEFERElOR19JTkxJTkUgfTtcblxuXHQvKlxuXHQgKiBNYWtlIHN1cmUgdGhhdCwgd2hlbiBhbiBpdGVtIGlzIHNjcm9sbGVkIGludG8gdmlldyAoZWcuIHdoaWxlIHVzaW5nIHRoZVxuXHQgKiBrZXlib2FyZCB0byBtb3ZlIGZvY3VzKSwgdGhlIHdob2xlIGl0ZW0gY29tZXMgaW50byB2aWV3XG5cdCAqL1xuXHRzY3JvbGwtbWFyZ2luOiAkeyBDT05URU5UX1dSQVBQRVJfUEFERElORyB9O1xuXG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRvdXRsaW5lOiBub25lO1xuXG5cdCZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLnRleHREaXNhYmxlZCB9O1xuXHRcdGN1cnNvcjogbm90LWFsbG93ZWQ7XG5cdH1cblxuXHQvKiBBY3RpdmUgaXRlbSAoaW5jbHVkaW5nIGhvdmVyKSAqL1xuXHQmW2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKTpub3QoXG5cdFx0XHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddXG5cdFx0KSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblx0fVxuXG5cdC8qIEtleWJvYXJkIGZvY3VzIChmb2N1cy12aXNpYmxlKSAqL1xuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdGJveC1zaGFkb3c6IDAgMCAwIDEuNXB4ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0fVxuXG5cdC8qIEFjdGl2ZSAoaWUuIHByZXNzZWQsIG1vdXNlIGRvd24pICovXG5cdCY6YWN0aXZlLFxuXHQmW2RhdGEtYWN0aXZlXSB7XG5cdFx0LyogVE9ETzogc2hvdWxkIHRoZXJlIGJlIGEgdmlzdWFsIGFjdGl2ZSBzdGF0ZT8gKi9cblx0fVxuXG5cdC8qIFdoZW4gdGhlIGl0ZW0gaXMgdGhlIHRyaWdnZXIgb2YgYW4gb3BlbiBzdWJtZW51ICovXG5cdCR7IE1lbnUgfTpub3QoOmZvY3VzKSAmOm5vdCg6Zm9jdXMpW2FyaWEtZXhwYW5kZWQ9XCJ0cnVlXCJdIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SIH07XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdH1cblxuXHRzdmcge1xuXHRcdGZpbGw6IGN1cnJlbnRDb2xvcjtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW0gKWBcblx0JHsgYmFzZUl0ZW0gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBDaGVja2JveEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW1DaGVja2JveCApYFxuXHQkeyBiYXNlSXRlbSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFJhZGlvSXRlbSA9IHN0eWxlZCggQXJpYWtpdC5NZW51SXRlbVJhZGlvIClgXG5cdCR7IGJhc2VJdGVtIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVByZWZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0LyogQWx3YXlzIG9jY3VweSB0aGUgZmlyc3QgY29sdW1uLCBldmVuIHdoZW4gYXV0by1jb2xsYXBzaW5nICovXG5cdGdyaWQtY29sdW1uOiAxO1xuXG5cdC8qXG5cdCAqIEV2ZW4gd2hlbiB0aGUgaXRlbSBpcyBub3QgY2hlY2tlZCwgb2NjdXB5IHRoZSBzYW1lIHNjcmVlbiBzcGFjZSB0byBhdm9pZFxuXHQgKiB0aGUgc3BhY2UgY29sbGFwc2lkZSB3aGVuIG5vIGl0ZW1zIGFyZSBjaGVja2VkLlxuXHQgKi9cblx0JHsgQ2hlY2tib3hJdGVtIH0gPiAmLFxuXHQkeyBSYWRpb0l0ZW0gfSA+ICYge1xuXHRcdC8qIFNhbWUgd2lkdGggYXMgdGhlIGNoZWNrIGljb25zICovXG5cdFx0bWluLXdpZHRoOiAkeyBzcGFjZSggNiApIH07XG5cdH1cblxuXHQkeyBDaGVja2JveEl0ZW0gfSA+ICYsXG5cdCR7IFJhZGlvSXRlbSB9ID4gJixcblx0Jjpub3QoIDplbXB0eSApIHtcblx0XHRtYXJnaW4taW5saW5lLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHR9XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBhY3RpdmUsIGV4Y2VwdCB3aGVuIGl0J3MgYSBub24tZm9jdXNlZC9ob3ZlcmVkXG5cdCogc3VibWVudSB0cmlnZ2VyIChpbiB0aGF0IGNhc2UsIGNvbG9yIHNob3VsZCBub3QgYmUgaW5oZXJpdGVkKVxuXHQqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApID4gJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddID4gJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ29udGVudFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQvKlxuXHQgKiBBbHdheXMgb2NjdXB5IHRoZSBzZWNvbmQgY29sdW1uLCBzaW5jZSB0aGUgZmlyc3QgY29sdW1uXG5cdCAqIGlzIHRha2VuIGJ5IHRoZSBwcmVmaXggd3JhcHBlciAod2hlbiBkaXNwbGF5ZWQpLlxuXHQgKi9cblx0Z3JpZC1jb2x1bW46IDI7XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRnYXA6ICR7IHNwYWNlKCAzICkgfTtcblxuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ2hpbGRyZW5XcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0ZmxleDogMTtcblxuXHRkaXNwbGF5OiBpbmxpbmUtZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblx0Z2FwOiAkeyBzcGFjZSggMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVN1ZmZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZmxleDogMCAxIGZpdC1jb250ZW50O1xuXHRtaW4td2lkdGg6IDA7XG5cdHdpZHRoOiBmaXQtY29udGVudDtcblxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0Z2FwOiAkeyBzcGFjZSggMyApIH07XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCAqIFdoZW4gdGhlIHBhcmVudCBtZW51IGl0ZW0gaXMgYWN0aXZlLCBleGNlcHQgd2hlbiBpdCdzIGEgbm9uLWZvY3VzZWQvaG92ZXJlZFxuXHQgKiBzdWJtZW51IHRyaWdnZXIgKGluIHRoYXQgY2FzZSwgY29sb3Igc2hvdWxkIG5vdCBiZSBpbmhlcml0ZWQpXG5cdCAqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApICo6bm90KCR7IE1lbnUgfSkgJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICo6bm90KCR7IE1lbnUgfSkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cCA9IHN0eWxlZCggQXJpYWtpdC5NZW51R3JvdXAgKWBcblx0LyogSWdub3JlIHRoaXMgZWxlbWVudCB3aGVuIGNhbGN1bGF0aW5nIHRoZSBsYXlvdXQuIFVzZWZ1bCBmb3Igc3ViZ3JpZCAqL1xuXHRkaXNwbGF5OiBjb250ZW50cztcbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cExhYmVsID0gc3R5bGVkKCBBcmlha2l0Lk1lbnVHcm91cExhYmVsIClgXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0cGFkZGluZy1ibG9jay1zdGFydDogJHsgc3BhY2UoIDMgKSB9O1xuXHRwYWRkaW5nLWJsb2NrLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHRwYWRkaW5nLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFNlcGFyYXRvciA9IHN0eWxlZCggQXJpYWtpdC5NZW51U2VwYXJhdG9yICk8XG5cdFBpY2s8IENvbnRleHRQcm9wcywgJ3ZhcmlhbnQnID5cbj5gXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0Ym9yZGVyOiBub25lO1xuXHRoZWlnaHQ6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9O1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyAoIHByb3BzICkgPT5cblx0XHRwcm9wcy52YXJpYW50ID09PSAndG9vbGJhcidcblx0XHRcdD8gVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUlxuXHRcdFx0OiBESVZJREVSX0NPTE9SIH07XG5cdC8qIEFsaWduIHdpdGggbWVudSBpdGVtcycgY29udGVudCAqL1xuXHRtYXJnaW4tYmxvY2s6ICR7IHNwYWNlKCAyICkgfTtcblx0bWFyZ2luLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuXG5cdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VibWVudUNoZXZyb25JY29uID0gc3R5bGVkKCBJY29uIClgXG5cdHdpZHRoOiAkeyBzcGFjZSggMS41ICkgfTtcblx0JHsgcnRsKFxuXHRcdHtcblx0XHRcdHRyYW5zZm9ybTogYHNjYWxlWCgxKWAsXG5cdFx0fSxcblx0XHR7XG5cdFx0XHR0cmFuc2Zvcm06IGBzY2FsZVgoLTEpYCxcblx0XHR9XG5cdCkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtTGFiZWwgPSBzdHlsZWQoIFRydW5jYXRlIClgXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDIwcHg7XG5cdGNvbG9yOiBpbmhlcml0O1xuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW1IZWxwVGV4dCA9IHN0eWxlZCggVHJ1bmNhdGUgKWBcblx0Zm9udC1zaXplOiAkeyBmb250KCAnaGVscFRleHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDE2cHg7XG5cdGNvbG9yOiAkeyBMSUdIVEVSX1RFWFRfQ09MT1IgfTtcblx0b3ZlcmZsb3ctd3JhcDogYW55d2hlcmU7XG5cblx0W2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKSAqOm5vdCggJHsgTWVudSB9ICkgJixcblx0W2FyaWEtZGlzYWJsZWQ9J3RydWUnXSAqOm5vdCggJHsgTWVudSB9ICkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG4iXX0= */"), "outline:2px solid transparent!important;@media not ( prefers-reduced-motion ){transition-property:transform,opacity;transition-duration:", DROPDOWN_MOTION_CSS.SLIDE_DURATION, ",", DROPDOWN_MOTION_CSS.FADE_DURATION, ";transition-timing-function:", DROPDOWN_MOTION_CSS.SLIDE_EASING, ",", DROPDOWN_MOTION_CSS.FADE_EASING, ";will-change:transform,opacity;&:not( [data-submenu] ){opacity:0;&[data-enter]{opacity:1;}&[data-side='bottom']{transform:translateY(\n					-", DROPDOWN_MOTION_CSS.SLIDE_DISTANCE, "\n				);}&[data-side='top']{transform:translateY(\n					", DROPDOWN_MOTION_CSS.SLIDE_DISTANCE, "\n				);}&[data-side='left']{transform:translateX(\n					", DROPDOWN_MOTION_CSS.SLIDE_DISTANCE, "\n				);}&[data-side='right']{transform:translateX(\n					-", DROPDOWN_MOTION_CSS.SLIDE_DISTANCE, "\n				);}&[data-enter][data-side='bottom'],&[data-enter][data-side='top']{transform:translateY( 0 );}&[data-enter][data-side='left'],&[data-enter][data-side='right']{transform:translateX( 0 );}}}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrQzZFIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIGZvbnQsIHJ0bCwgQ09ORklHLCBEUk9QRE9XTl9NT1RJT05fQ1NTIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgSWNvbiBmcm9tICcuLi9pY29uJztcbmltcG9ydCB7IFRydW5jYXRlIH0gZnJvbSAnLi4vdHJ1bmNhdGUnO1xuaW1wb3J0IHR5cGUgeyBDb250ZXh0UHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuY29uc3QgQ09OVEVOVF9XUkFQUEVSX1BBRERJTkcgPSBzcGFjZSggMSApO1xuY29uc3QgSVRFTV9QQURESU5HX0JMT0NLID0gc3BhY2UoIDEgKTtcbmNvbnN0IElURU1fUEFERElOR19JTkxJTkUgPSBzcGFjZSggMyApO1xuXG4vLyBUT0RPOlxuLy8gLSBib3JkZXIgY29sb3IgYW5kIGRpdmlkZXIgY29sb3IgYXJlIGRpZmZlcmVudCBmcm9tIENPTE9SUy50aGVtZSB2YXJpYWJsZXNcbi8vIC0gbGlnaHRlciB0ZXh0IGNvbG9yIGlzIG5vdCBkZWZpbmVkIGluIENPTE9SUy50aGVtZSwgc2hvdWxkIGl0IGJlP1xuLy8gLSBsaWdodGVyIGJhY2tncm91bmQgY29sb3IgaXMgbm90IGRlZmluZWQgaW4gQ09MT1JTLnRoZW1lLCBzaG91bGQgaXQgYmU/XG5jb25zdCBERUZBVUxUX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXTtcbmNvbnN0IERJVklERVJfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgMjAwIF07XG5jb25zdCBMSUdIVEVSX1RFWFRfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF07XG5jb25zdCBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SID0gQ09MT1JTLnRoZW1lLmdyYXlbIDEwMCBdO1xuY29uc3QgVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kO1xuY29uc3QgREVGQVVMVF9CT1hfU0hBRE9XID0gYDAgMCAwICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9ICR7IERFRkFVTFRfQk9SREVSX0NPTE9SIH0sICR7IENPTkZJRy5lbGV2YXRpb25NZWRpdW0gfWA7XG5jb25zdCBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPVyA9IGAwIDAgMCAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSAkeyBUT09MQkFSX1ZBUklBTlRfQk9SREVSX0NPTE9SIH1gO1xuXG5jb25zdCBHUklEX1RFTVBMQVRFX0NPTFMgPSAnbWlubWF4KCAwLCBtYXgtY29udGVudCApIDFmcic7XG5cbmV4cG9ydCBjb25zdCBNZW51ID0gc3R5bGVkKCBBcmlha2l0Lk1lbnUgKTwgUGljazwgQ29udGV4dFByb3BzLCAndmFyaWFudCcgPiA+YFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdC8qIFNhbWUgYXMgcG9wb3ZlciBjb21wb25lbnQgKi9cblx0LyogVE9ETzogaXMgdGhlcmUgYSB3YXkgdG8gcmVhZCB0aGUgc2FzcyB2YXJpYWJsZT8gKi9cblx0ei1pbmRleDogMTAwMDAwMDtcblxuXHRkaXNwbGF5OiBncmlkO1xuXHRncmlkLXRlbXBsYXRlLWNvbHVtbnM6ICR7IEdSSURfVEVNUExBVEVfQ09MUyB9O1xuXHRncmlkLXRlbXBsYXRlLXJvd3M6IGF1dG87XG5cblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0bWluLXdpZHRoOiAxNjBweDtcblx0bWF4LXdpZHRoOiAzMjBweDtcblx0bWF4LWhlaWdodDogdmFyKCAtLXBvcG92ZXItYXZhaWxhYmxlLWhlaWdodCApO1xuXG5cdHBhZGRpbmc6ICR7IENPTlRFTlRfV1JBUFBFUl9QQURESU5HIH07XG5cblx0b3ZlcnNjcm9sbC1iZWhhdmlvcjogY29udGFpbjtcblx0b3ZlcmZsb3c6IGF1dG87XG5cblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c01lZGl1bSB9O1xuXHQkeyAoIHByb3BzICkgPT4gY3NzYFxuXHRcdGJveC1zaGFkb3c6ICR7IHByb3BzLnZhcmlhbnQgPT09ICd0b29sYmFyJ1xuXHRcdFx0PyBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPV1xuXHRcdFx0OiBERUZBVUxUX0JPWF9TSEFET1cgfTtcblx0YCB9XG5cblx0LyogT25seSB2aXNpYmxlIGluIFdpbmRvd3MgSGlnaCBDb250cmFzdCBtb2RlICovXG5cdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudCAhaW1wb3J0YW50O1xuXG5cdC8qIE9wZW4vY2xvc2UgYW5pbWF0aW9uICovXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdHRyYW5zaXRpb24tcHJvcGVydHk6IHRyYW5zZm9ybSwgb3BhY2l0eTtcblx0XHR0cmFuc2l0aW9uLWR1cmF0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RVUkFUSU9OIH0sXG5cdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLkZBREVfRFVSQVRJT04gfTtcblx0XHR0cmFuc2l0aW9uLXRpbWluZy1mdW5jdGlvbjogJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9FQVNJTkcgfSxcblx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9FQVNJTkcgfTtcblx0XHR3aWxsLWNoYW5nZTogdHJhbnNmb3JtLCBvcGFjaXR5O1xuXG5cdFx0Jjpub3QoIFtkYXRhLXN1Ym1lbnVdICkge1xuXHRcdFx0LyogUmVnYXJkbGVzcyBvZiB0aGUgc2lkZSwgZmFkZSBpbiBhbmQgb3V0LiAqL1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHRcdCZbZGF0YS1lbnRlcl0ge1xuXHRcdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0fVxuXG5cdFx0XHQvKiBTbGlkZSBpbiB0aGUgZGlyZWN0aW9uIHRoZSBtZW51IGlzIG9wZW5pbmcuICovXG5cdFx0XHQmW2RhdGEtc2lkZT0nYm90dG9tJ10ge1xuXHRcdFx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoXG5cdFx0XHRcdFx0LSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J3RvcCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVZKFxuXHRcdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J2xlZnQnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWChcblx0XHRcdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKFxuXHRcdFx0XHRcdC0keyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdib3R0b20nXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSd0b3AnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWSggMCApO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLWVudGVyXVtkYXRhLXNpZGU9J2xlZnQnXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKCAwICk7XG5cdFx0XHR9XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBiYXNlSXRlbSA9IGNzc2Bcblx0YWxsOiB1bnNldDtcblxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCA4ICkgfTtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQvKiBPY2N1cHkgdGhlIHdpZHRoIG9mIGFsbCBncmlkIGNvbHVtbnMgKGllLiBmdWxsIHdpZHRoKSAqL1xuXHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogJHsgR1JJRF9URU1QTEFURV9DT0xTIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cblx0QHN1cHBvcnRzICggZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiBzdWJncmlkICkge1xuXHRcdC8qXG5cdFx0ICogRGVmaW5lIGEgZ3JpZCBsYXlvdXQgd2hpY2ggaW5oZXJpdHMgdGhlIHNhbWUgY29sdW1ucyBjb25maWd1cmF0aW9uXG5cdFx0ICogZnJvbSB0aGUgcGFyZW50IGxheW91dCAoaWUuIHN1YmdyaWQpLiBUaGlzIGFsbG93cyB0aGUgbWVudVxuXHRcdCAqIHRvIHN5bmNocm9uaXplIHRoZSBpbmRlbnRhdGlvbiBvZiBhbGwgaXRzIGl0ZW1zLlxuXHRcdCAqL1xuXHRcdGdyaWQtdGVtcGxhdGUtY29sdW1uczogc3ViZ3JpZDtcblx0fVxuXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdGZvbnQtd2VpZ2h0OiBub3JtYWw7XG5cdGxpbmUtaGVpZ2h0OiAyMHB4O1xuXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRwYWRkaW5nLWJsb2NrOiAkeyBJVEVNX1BBRERJTkdfQkxPQ0sgfTtcblx0cGFkZGluZy1pbmxpbmU6ICR7IElURU1fUEFERElOR19JTkxJTkUgfTtcblxuXHQvKlxuXHQgKiBNYWtlIHN1cmUgdGhhdCwgd2hlbiBhbiBpdGVtIGlzIHNjcm9sbGVkIGludG8gdmlldyAoZWcuIHdoaWxlIHVzaW5nIHRoZVxuXHQgKiBrZXlib2FyZCB0byBtb3ZlIGZvY3VzKSwgdGhlIHdob2xlIGl0ZW0gY29tZXMgaW50byB2aWV3XG5cdCAqL1xuXHRzY3JvbGwtbWFyZ2luOiAkeyBDT05URU5UX1dSQVBQRVJfUEFERElORyB9O1xuXG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRvdXRsaW5lOiBub25lO1xuXG5cdCZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLnRleHREaXNhYmxlZCB9O1xuXHRcdGN1cnNvcjogbm90LWFsbG93ZWQ7XG5cdH1cblxuXHQvKiBBY3RpdmUgaXRlbSAoaW5jbHVkaW5nIGhvdmVyKSAqL1xuXHQmW2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKTpub3QoXG5cdFx0XHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddXG5cdFx0KSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblx0fVxuXG5cdC8qIEtleWJvYXJkIGZvY3VzIChmb2N1cy12aXNpYmxlKSAqL1xuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdGJveC1zaGFkb3c6IDAgMCAwIDEuNXB4ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0fVxuXG5cdC8qIEFjdGl2ZSAoaWUuIHByZXNzZWQsIG1vdXNlIGRvd24pICovXG5cdCY6YWN0aXZlLFxuXHQmW2RhdGEtYWN0aXZlXSB7XG5cdFx0LyogVE9ETzogc2hvdWxkIHRoZXJlIGJlIGEgdmlzdWFsIGFjdGl2ZSBzdGF0ZT8gKi9cblx0fVxuXG5cdC8qIFdoZW4gdGhlIGl0ZW0gaXMgdGhlIHRyaWdnZXIgb2YgYW4gb3BlbiBzdWJtZW51ICovXG5cdCR7IE1lbnUgfTpub3QoOmZvY3VzKSAmOm5vdCg6Zm9jdXMpW2FyaWEtZXhwYW5kZWQ9XCJ0cnVlXCJdIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SIH07XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdH1cblxuXHRzdmcge1xuXHRcdGZpbGw6IGN1cnJlbnRDb2xvcjtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW0gKWBcblx0JHsgYmFzZUl0ZW0gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBDaGVja2JveEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW1DaGVja2JveCApYFxuXHQkeyBiYXNlSXRlbSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFJhZGlvSXRlbSA9IHN0eWxlZCggQXJpYWtpdC5NZW51SXRlbVJhZGlvIClgXG5cdCR7IGJhc2VJdGVtIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVByZWZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0LyogQWx3YXlzIG9jY3VweSB0aGUgZmlyc3QgY29sdW1uLCBldmVuIHdoZW4gYXV0by1jb2xsYXBzaW5nICovXG5cdGdyaWQtY29sdW1uOiAxO1xuXG5cdC8qXG5cdCAqIEV2ZW4gd2hlbiB0aGUgaXRlbSBpcyBub3QgY2hlY2tlZCwgb2NjdXB5IHRoZSBzYW1lIHNjcmVlbiBzcGFjZSB0byBhdm9pZFxuXHQgKiB0aGUgc3BhY2UgY29sbGFwc2lkZSB3aGVuIG5vIGl0ZW1zIGFyZSBjaGVja2VkLlxuXHQgKi9cblx0JHsgQ2hlY2tib3hJdGVtIH0gPiAmLFxuXHQkeyBSYWRpb0l0ZW0gfSA+ICYge1xuXHRcdC8qIFNhbWUgd2lkdGggYXMgdGhlIGNoZWNrIGljb25zICovXG5cdFx0bWluLXdpZHRoOiAkeyBzcGFjZSggNiApIH07XG5cdH1cblxuXHQkeyBDaGVja2JveEl0ZW0gfSA+ICYsXG5cdCR7IFJhZGlvSXRlbSB9ID4gJixcblx0Jjpub3QoIDplbXB0eSApIHtcblx0XHRtYXJnaW4taW5saW5lLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHR9XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBhY3RpdmUsIGV4Y2VwdCB3aGVuIGl0J3MgYSBub24tZm9jdXNlZC9ob3ZlcmVkXG5cdCogc3VibWVudSB0cmlnZ2VyIChpbiB0aGF0IGNhc2UsIGNvbG9yIHNob3VsZCBub3QgYmUgaW5oZXJpdGVkKVxuXHQqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApID4gJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddID4gJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ29udGVudFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQvKlxuXHQgKiBBbHdheXMgb2NjdXB5IHRoZSBzZWNvbmQgY29sdW1uLCBzaW5jZSB0aGUgZmlyc3QgY29sdW1uXG5cdCAqIGlzIHRha2VuIGJ5IHRoZSBwcmVmaXggd3JhcHBlciAod2hlbiBkaXNwbGF5ZWQpLlxuXHQgKi9cblx0Z3JpZC1jb2x1bW46IDI7XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRnYXA6ICR7IHNwYWNlKCAzICkgfTtcblxuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ2hpbGRyZW5XcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0ZmxleDogMTtcblxuXHRkaXNwbGF5OiBpbmxpbmUtZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblx0Z2FwOiAkeyBzcGFjZSggMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVN1ZmZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZmxleDogMCAxIGZpdC1jb250ZW50O1xuXHRtaW4td2lkdGg6IDA7XG5cdHdpZHRoOiBmaXQtY29udGVudDtcblxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0Z2FwOiAkeyBzcGFjZSggMyApIH07XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCAqIFdoZW4gdGhlIHBhcmVudCBtZW51IGl0ZW0gaXMgYWN0aXZlLCBleGNlcHQgd2hlbiBpdCdzIGEgbm9uLWZvY3VzZWQvaG92ZXJlZFxuXHQgKiBzdWJtZW51IHRyaWdnZXIgKGluIHRoYXQgY2FzZSwgY29sb3Igc2hvdWxkIG5vdCBiZSBpbmhlcml0ZWQpXG5cdCAqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApICo6bm90KCR7IE1lbnUgfSkgJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICo6bm90KCR7IE1lbnUgfSkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cCA9IHN0eWxlZCggQXJpYWtpdC5NZW51R3JvdXAgKWBcblx0LyogSWdub3JlIHRoaXMgZWxlbWVudCB3aGVuIGNhbGN1bGF0aW5nIHRoZSBsYXlvdXQuIFVzZWZ1bCBmb3Igc3ViZ3JpZCAqL1xuXHRkaXNwbGF5OiBjb250ZW50cztcbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cExhYmVsID0gc3R5bGVkKCBBcmlha2l0Lk1lbnVHcm91cExhYmVsIClgXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0cGFkZGluZy1ibG9jay1zdGFydDogJHsgc3BhY2UoIDMgKSB9O1xuXHRwYWRkaW5nLWJsb2NrLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHRwYWRkaW5nLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFNlcGFyYXRvciA9IHN0eWxlZCggQXJpYWtpdC5NZW51U2VwYXJhdG9yICk8XG5cdFBpY2s8IENvbnRleHRQcm9wcywgJ3ZhcmlhbnQnID5cbj5gXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0Ym9yZGVyOiBub25lO1xuXHRoZWlnaHQ6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9O1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyAoIHByb3BzICkgPT5cblx0XHRwcm9wcy52YXJpYW50ID09PSAndG9vbGJhcidcblx0XHRcdD8gVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUlxuXHRcdFx0OiBESVZJREVSX0NPTE9SIH07XG5cdC8qIEFsaWduIHdpdGggbWVudSBpdGVtcycgY29udGVudCAqL1xuXHRtYXJnaW4tYmxvY2s6ICR7IHNwYWNlKCAyICkgfTtcblx0bWFyZ2luLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuXG5cdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VibWVudUNoZXZyb25JY29uID0gc3R5bGVkKCBJY29uIClgXG5cdHdpZHRoOiAkeyBzcGFjZSggMS41ICkgfTtcblx0JHsgcnRsKFxuXHRcdHtcblx0XHRcdHRyYW5zZm9ybTogYHNjYWxlWCgxKWAsXG5cdFx0fSxcblx0XHR7XG5cdFx0XHR0cmFuc2Zvcm06IGBzY2FsZVgoLTEpYCxcblx0XHR9XG5cdCkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtTGFiZWwgPSBzdHlsZWQoIFRydW5jYXRlIClgXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDIwcHg7XG5cdGNvbG9yOiBpbmhlcml0O1xuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW1IZWxwVGV4dCA9IHN0eWxlZCggVHJ1bmNhdGUgKWBcblx0Zm9udC1zaXplOiAkeyBmb250KCAnaGVscFRleHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDE2cHg7XG5cdGNvbG9yOiAkeyBMSUdIVEVSX1RFWFRfQ09MT1IgfTtcblx0b3ZlcmZsb3ctd3JhcDogYW55d2hlcmU7XG5cblx0W2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKSAqOm5vdCggJHsgTWVudSB9ICkgJixcblx0W2FyaWEtZGlzYWJsZWQ9J3RydWUnXSAqOm5vdCggJHsgTWVudSB9ICkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG4iXX0= */"));
  var baseItem = /* @__PURE__ */ css("all:unset;position:relative;min-height:", space(8), ";box-sizing:border-box;grid-column:1/-1;display:grid;grid-template-columns:", GRID_TEMPLATE_COLS, ";align-items:center;@supports ( grid-template-columns: subgrid ){grid-template-columns:subgrid;}font-size:", font("default.fontSize"), ";font-family:inherit;font-weight:normal;line-height:20px;color:", COLORS.theme.foreground, ";border-radius:", config_values_default.radiusSmall, ";padding-block:", ITEM_PADDING_BLOCK, ";padding-inline:", ITEM_PADDING_INLINE, ";scroll-margin:", CONTENT_WRAPPER_PADDING, ";user-select:none;outline:none;&[aria-disabled='true']{color:", COLORS.ui.textDisabled, ";cursor:not-allowed;}&[data-active-item]:not( [data-focus-visible] ):not(\n			[aria-disabled='true']\n		){background-color:", COLORS.theme.accent, ";color:", COLORS.theme.accentInverted, ";}&[data-focus-visible]{box-shadow:0 0 0 1.5px ", COLORS.theme.accent, ";outline:2px solid transparent;}&:active,&[data-active]{}", Menu22, ':not(:focus) &:not(:focus)[aria-expanded="true"]{background-color:', LIGHT_BACKGROUND_COLOR, ";color:", COLORS.theme.foreground, ";}svg{fill:currentColor;}" + (false ? "" : ";label:baseItem;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrSG9CIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIGZvbnQsIHJ0bCwgQ09ORklHLCBEUk9QRE9XTl9NT1RJT05fQ1NTIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgSWNvbiBmcm9tICcuLi9pY29uJztcbmltcG9ydCB7IFRydW5jYXRlIH0gZnJvbSAnLi4vdHJ1bmNhdGUnO1xuaW1wb3J0IHR5cGUgeyBDb250ZXh0UHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuY29uc3QgQ09OVEVOVF9XUkFQUEVSX1BBRERJTkcgPSBzcGFjZSggMSApO1xuY29uc3QgSVRFTV9QQURESU5HX0JMT0NLID0gc3BhY2UoIDEgKTtcbmNvbnN0IElURU1fUEFERElOR19JTkxJTkUgPSBzcGFjZSggMyApO1xuXG4vLyBUT0RPOlxuLy8gLSBib3JkZXIgY29sb3IgYW5kIGRpdmlkZXIgY29sb3IgYXJlIGRpZmZlcmVudCBmcm9tIENPTE9SUy50aGVtZSB2YXJpYWJsZXNcbi8vIC0gbGlnaHRlciB0ZXh0IGNvbG9yIGlzIG5vdCBkZWZpbmVkIGluIENPTE9SUy50aGVtZSwgc2hvdWxkIGl0IGJlP1xuLy8gLSBsaWdodGVyIGJhY2tncm91bmQgY29sb3IgaXMgbm90IGRlZmluZWQgaW4gQ09MT1JTLnRoZW1lLCBzaG91bGQgaXQgYmU/XG5jb25zdCBERUZBVUxUX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXTtcbmNvbnN0IERJVklERVJfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgMjAwIF07XG5jb25zdCBMSUdIVEVSX1RFWFRfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF07XG5jb25zdCBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SID0gQ09MT1JTLnRoZW1lLmdyYXlbIDEwMCBdO1xuY29uc3QgVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kO1xuY29uc3QgREVGQVVMVF9CT1hfU0hBRE9XID0gYDAgMCAwICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9ICR7IERFRkFVTFRfQk9SREVSX0NPTE9SIH0sICR7IENPTkZJRy5lbGV2YXRpb25NZWRpdW0gfWA7XG5jb25zdCBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPVyA9IGAwIDAgMCAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSAkeyBUT09MQkFSX1ZBUklBTlRfQk9SREVSX0NPTE9SIH1gO1xuXG5jb25zdCBHUklEX1RFTVBMQVRFX0NPTFMgPSAnbWlubWF4KCAwLCBtYXgtY29udGVudCApIDFmcic7XG5cbmV4cG9ydCBjb25zdCBNZW51ID0gc3R5bGVkKCBBcmlha2l0Lk1lbnUgKTwgUGljazwgQ29udGV4dFByb3BzLCAndmFyaWFudCcgPiA+YFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdC8qIFNhbWUgYXMgcG9wb3ZlciBjb21wb25lbnQgKi9cblx0LyogVE9ETzogaXMgdGhlcmUgYSB3YXkgdG8gcmVhZCB0aGUgc2FzcyB2YXJpYWJsZT8gKi9cblx0ei1pbmRleDogMTAwMDAwMDtcblxuXHRkaXNwbGF5OiBncmlkO1xuXHRncmlkLXRlbXBsYXRlLWNvbHVtbnM6ICR7IEdSSURfVEVNUExBVEVfQ09MUyB9O1xuXHRncmlkLXRlbXBsYXRlLXJvd3M6IGF1dG87XG5cblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0bWluLXdpZHRoOiAxNjBweDtcblx0bWF4LXdpZHRoOiAzMjBweDtcblx0bWF4LWhlaWdodDogdmFyKCAtLXBvcG92ZXItYXZhaWxhYmxlLWhlaWdodCApO1xuXG5cdHBhZGRpbmc6ICR7IENPTlRFTlRfV1JBUFBFUl9QQURESU5HIH07XG5cblx0b3ZlcnNjcm9sbC1iZWhhdmlvcjogY29udGFpbjtcblx0b3ZlcmZsb3c6IGF1dG87XG5cblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c01lZGl1bSB9O1xuXHQkeyAoIHByb3BzICkgPT4gY3NzYFxuXHRcdGJveC1zaGFkb3c6ICR7IHByb3BzLnZhcmlhbnQgPT09ICd0b29sYmFyJ1xuXHRcdFx0PyBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPV1xuXHRcdFx0OiBERUZBVUxUX0JPWF9TSEFET1cgfTtcblx0YCB9XG5cblx0LyogT25seSB2aXNpYmxlIGluIFdpbmRvd3MgSGlnaCBDb250cmFzdCBtb2RlICovXG5cdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudCAhaW1wb3J0YW50O1xuXG5cdC8qIE9wZW4vY2xvc2UgYW5pbWF0aW9uICovXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdHRyYW5zaXRpb24tcHJvcGVydHk6IHRyYW5zZm9ybSwgb3BhY2l0eTtcblx0XHR0cmFuc2l0aW9uLWR1cmF0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RVUkFUSU9OIH0sXG5cdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLkZBREVfRFVSQVRJT04gfTtcblx0XHR0cmFuc2l0aW9uLXRpbWluZy1mdW5jdGlvbjogJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9FQVNJTkcgfSxcblx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9FQVNJTkcgfTtcblx0XHR3aWxsLWNoYW5nZTogdHJhbnNmb3JtLCBvcGFjaXR5O1xuXG5cdFx0Jjpub3QoIFtkYXRhLXN1Ym1lbnVdICkge1xuXHRcdFx0LyogUmVnYXJkbGVzcyBvZiB0aGUgc2lkZSwgZmFkZSBpbiBhbmQgb3V0LiAqL1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHRcdCZbZGF0YS1lbnRlcl0ge1xuXHRcdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0fVxuXG5cdFx0XHQvKiBTbGlkZSBpbiB0aGUgZGlyZWN0aW9uIHRoZSBtZW51IGlzIG9wZW5pbmcuICovXG5cdFx0XHQmW2RhdGEtc2lkZT0nYm90dG9tJ10ge1xuXHRcdFx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoXG5cdFx0XHRcdFx0LSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J3RvcCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVZKFxuXHRcdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J2xlZnQnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWChcblx0XHRcdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKFxuXHRcdFx0XHRcdC0keyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdib3R0b20nXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSd0b3AnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWSggMCApO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLWVudGVyXVtkYXRhLXNpZGU9J2xlZnQnXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKCAwICk7XG5cdFx0XHR9XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBiYXNlSXRlbSA9IGNzc2Bcblx0YWxsOiB1bnNldDtcblxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCA4ICkgfTtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQvKiBPY2N1cHkgdGhlIHdpZHRoIG9mIGFsbCBncmlkIGNvbHVtbnMgKGllLiBmdWxsIHdpZHRoKSAqL1xuXHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogJHsgR1JJRF9URU1QTEFURV9DT0xTIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cblx0QHN1cHBvcnRzICggZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiBzdWJncmlkICkge1xuXHRcdC8qXG5cdFx0ICogRGVmaW5lIGEgZ3JpZCBsYXlvdXQgd2hpY2ggaW5oZXJpdHMgdGhlIHNhbWUgY29sdW1ucyBjb25maWd1cmF0aW9uXG5cdFx0ICogZnJvbSB0aGUgcGFyZW50IGxheW91dCAoaWUuIHN1YmdyaWQpLiBUaGlzIGFsbG93cyB0aGUgbWVudVxuXHRcdCAqIHRvIHN5bmNocm9uaXplIHRoZSBpbmRlbnRhdGlvbiBvZiBhbGwgaXRzIGl0ZW1zLlxuXHRcdCAqL1xuXHRcdGdyaWQtdGVtcGxhdGUtY29sdW1uczogc3ViZ3JpZDtcblx0fVxuXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdGZvbnQtd2VpZ2h0OiBub3JtYWw7XG5cdGxpbmUtaGVpZ2h0OiAyMHB4O1xuXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRwYWRkaW5nLWJsb2NrOiAkeyBJVEVNX1BBRERJTkdfQkxPQ0sgfTtcblx0cGFkZGluZy1pbmxpbmU6ICR7IElURU1fUEFERElOR19JTkxJTkUgfTtcblxuXHQvKlxuXHQgKiBNYWtlIHN1cmUgdGhhdCwgd2hlbiBhbiBpdGVtIGlzIHNjcm9sbGVkIGludG8gdmlldyAoZWcuIHdoaWxlIHVzaW5nIHRoZVxuXHQgKiBrZXlib2FyZCB0byBtb3ZlIGZvY3VzKSwgdGhlIHdob2xlIGl0ZW0gY29tZXMgaW50byB2aWV3XG5cdCAqL1xuXHRzY3JvbGwtbWFyZ2luOiAkeyBDT05URU5UX1dSQVBQRVJfUEFERElORyB9O1xuXG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRvdXRsaW5lOiBub25lO1xuXG5cdCZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLnRleHREaXNhYmxlZCB9O1xuXHRcdGN1cnNvcjogbm90LWFsbG93ZWQ7XG5cdH1cblxuXHQvKiBBY3RpdmUgaXRlbSAoaW5jbHVkaW5nIGhvdmVyKSAqL1xuXHQmW2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKTpub3QoXG5cdFx0XHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddXG5cdFx0KSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblx0fVxuXG5cdC8qIEtleWJvYXJkIGZvY3VzIChmb2N1cy12aXNpYmxlKSAqL1xuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdGJveC1zaGFkb3c6IDAgMCAwIDEuNXB4ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0fVxuXG5cdC8qIEFjdGl2ZSAoaWUuIHByZXNzZWQsIG1vdXNlIGRvd24pICovXG5cdCY6YWN0aXZlLFxuXHQmW2RhdGEtYWN0aXZlXSB7XG5cdFx0LyogVE9ETzogc2hvdWxkIHRoZXJlIGJlIGEgdmlzdWFsIGFjdGl2ZSBzdGF0ZT8gKi9cblx0fVxuXG5cdC8qIFdoZW4gdGhlIGl0ZW0gaXMgdGhlIHRyaWdnZXIgb2YgYW4gb3BlbiBzdWJtZW51ICovXG5cdCR7IE1lbnUgfTpub3QoOmZvY3VzKSAmOm5vdCg6Zm9jdXMpW2FyaWEtZXhwYW5kZWQ9XCJ0cnVlXCJdIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SIH07XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdH1cblxuXHRzdmcge1xuXHRcdGZpbGw6IGN1cnJlbnRDb2xvcjtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW0gKWBcblx0JHsgYmFzZUl0ZW0gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBDaGVja2JveEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW1DaGVja2JveCApYFxuXHQkeyBiYXNlSXRlbSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFJhZGlvSXRlbSA9IHN0eWxlZCggQXJpYWtpdC5NZW51SXRlbVJhZGlvIClgXG5cdCR7IGJhc2VJdGVtIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVByZWZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0LyogQWx3YXlzIG9jY3VweSB0aGUgZmlyc3QgY29sdW1uLCBldmVuIHdoZW4gYXV0by1jb2xsYXBzaW5nICovXG5cdGdyaWQtY29sdW1uOiAxO1xuXG5cdC8qXG5cdCAqIEV2ZW4gd2hlbiB0aGUgaXRlbSBpcyBub3QgY2hlY2tlZCwgb2NjdXB5IHRoZSBzYW1lIHNjcmVlbiBzcGFjZSB0byBhdm9pZFxuXHQgKiB0aGUgc3BhY2UgY29sbGFwc2lkZSB3aGVuIG5vIGl0ZW1zIGFyZSBjaGVja2VkLlxuXHQgKi9cblx0JHsgQ2hlY2tib3hJdGVtIH0gPiAmLFxuXHQkeyBSYWRpb0l0ZW0gfSA+ICYge1xuXHRcdC8qIFNhbWUgd2lkdGggYXMgdGhlIGNoZWNrIGljb25zICovXG5cdFx0bWluLXdpZHRoOiAkeyBzcGFjZSggNiApIH07XG5cdH1cblxuXHQkeyBDaGVja2JveEl0ZW0gfSA+ICYsXG5cdCR7IFJhZGlvSXRlbSB9ID4gJixcblx0Jjpub3QoIDplbXB0eSApIHtcblx0XHRtYXJnaW4taW5saW5lLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHR9XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBhY3RpdmUsIGV4Y2VwdCB3aGVuIGl0J3MgYSBub24tZm9jdXNlZC9ob3ZlcmVkXG5cdCogc3VibWVudSB0cmlnZ2VyIChpbiB0aGF0IGNhc2UsIGNvbG9yIHNob3VsZCBub3QgYmUgaW5oZXJpdGVkKVxuXHQqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApID4gJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddID4gJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ29udGVudFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQvKlxuXHQgKiBBbHdheXMgb2NjdXB5IHRoZSBzZWNvbmQgY29sdW1uLCBzaW5jZSB0aGUgZmlyc3QgY29sdW1uXG5cdCAqIGlzIHRha2VuIGJ5IHRoZSBwcmVmaXggd3JhcHBlciAod2hlbiBkaXNwbGF5ZWQpLlxuXHQgKi9cblx0Z3JpZC1jb2x1bW46IDI7XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRnYXA6ICR7IHNwYWNlKCAzICkgfTtcblxuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ2hpbGRyZW5XcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0ZmxleDogMTtcblxuXHRkaXNwbGF5OiBpbmxpbmUtZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblx0Z2FwOiAkeyBzcGFjZSggMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVN1ZmZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZmxleDogMCAxIGZpdC1jb250ZW50O1xuXHRtaW4td2lkdGg6IDA7XG5cdHdpZHRoOiBmaXQtY29udGVudDtcblxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0Z2FwOiAkeyBzcGFjZSggMyApIH07XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCAqIFdoZW4gdGhlIHBhcmVudCBtZW51IGl0ZW0gaXMgYWN0aXZlLCBleGNlcHQgd2hlbiBpdCdzIGEgbm9uLWZvY3VzZWQvaG92ZXJlZFxuXHQgKiBzdWJtZW51IHRyaWdnZXIgKGluIHRoYXQgY2FzZSwgY29sb3Igc2hvdWxkIG5vdCBiZSBpbmhlcml0ZWQpXG5cdCAqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApICo6bm90KCR7IE1lbnUgfSkgJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICo6bm90KCR7IE1lbnUgfSkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cCA9IHN0eWxlZCggQXJpYWtpdC5NZW51R3JvdXAgKWBcblx0LyogSWdub3JlIHRoaXMgZWxlbWVudCB3aGVuIGNhbGN1bGF0aW5nIHRoZSBsYXlvdXQuIFVzZWZ1bCBmb3Igc3ViZ3JpZCAqL1xuXHRkaXNwbGF5OiBjb250ZW50cztcbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cExhYmVsID0gc3R5bGVkKCBBcmlha2l0Lk1lbnVHcm91cExhYmVsIClgXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0cGFkZGluZy1ibG9jay1zdGFydDogJHsgc3BhY2UoIDMgKSB9O1xuXHRwYWRkaW5nLWJsb2NrLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHRwYWRkaW5nLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFNlcGFyYXRvciA9IHN0eWxlZCggQXJpYWtpdC5NZW51U2VwYXJhdG9yICk8XG5cdFBpY2s8IENvbnRleHRQcm9wcywgJ3ZhcmlhbnQnID5cbj5gXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0Ym9yZGVyOiBub25lO1xuXHRoZWlnaHQ6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9O1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyAoIHByb3BzICkgPT5cblx0XHRwcm9wcy52YXJpYW50ID09PSAndG9vbGJhcidcblx0XHRcdD8gVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUlxuXHRcdFx0OiBESVZJREVSX0NPTE9SIH07XG5cdC8qIEFsaWduIHdpdGggbWVudSBpdGVtcycgY29udGVudCAqL1xuXHRtYXJnaW4tYmxvY2s6ICR7IHNwYWNlKCAyICkgfTtcblx0bWFyZ2luLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuXG5cdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VibWVudUNoZXZyb25JY29uID0gc3R5bGVkKCBJY29uIClgXG5cdHdpZHRoOiAkeyBzcGFjZSggMS41ICkgfTtcblx0JHsgcnRsKFxuXHRcdHtcblx0XHRcdHRyYW5zZm9ybTogYHNjYWxlWCgxKWAsXG5cdFx0fSxcblx0XHR7XG5cdFx0XHR0cmFuc2Zvcm06IGBzY2FsZVgoLTEpYCxcblx0XHR9XG5cdCkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtTGFiZWwgPSBzdHlsZWQoIFRydW5jYXRlIClgXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDIwcHg7XG5cdGNvbG9yOiBpbmhlcml0O1xuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW1IZWxwVGV4dCA9IHN0eWxlZCggVHJ1bmNhdGUgKWBcblx0Zm9udC1zaXplOiAkeyBmb250KCAnaGVscFRleHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDE2cHg7XG5cdGNvbG9yOiAkeyBMSUdIVEVSX1RFWFRfQ09MT1IgfTtcblx0b3ZlcmZsb3ctd3JhcDogYW55d2hlcmU7XG5cblx0W2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKSAqOm5vdCggJHsgTWVudSB9ICkgJixcblx0W2FyaWEtZGlzYWJsZWQ9J3RydWUnXSAqOm5vdCggJHsgTWVudSB9ICkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG4iXX0= */");
  var Item3 = /* @__PURE__ */ createStyled(MenuItem, false ? {
    target: "e1wg7tti12"
  } : {
    target: "e1wg7tti12",
    label: "Item"
  })(baseItem, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtTThDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIGZvbnQsIHJ0bCwgQ09ORklHLCBEUk9QRE9XTl9NT1RJT05fQ1NTIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgSWNvbiBmcm9tICcuLi9pY29uJztcbmltcG9ydCB7IFRydW5jYXRlIH0gZnJvbSAnLi4vdHJ1bmNhdGUnO1xuaW1wb3J0IHR5cGUgeyBDb250ZXh0UHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuY29uc3QgQ09OVEVOVF9XUkFQUEVSX1BBRERJTkcgPSBzcGFjZSggMSApO1xuY29uc3QgSVRFTV9QQURESU5HX0JMT0NLID0gc3BhY2UoIDEgKTtcbmNvbnN0IElURU1fUEFERElOR19JTkxJTkUgPSBzcGFjZSggMyApO1xuXG4vLyBUT0RPOlxuLy8gLSBib3JkZXIgY29sb3IgYW5kIGRpdmlkZXIgY29sb3IgYXJlIGRpZmZlcmVudCBmcm9tIENPTE9SUy50aGVtZSB2YXJpYWJsZXNcbi8vIC0gbGlnaHRlciB0ZXh0IGNvbG9yIGlzIG5vdCBkZWZpbmVkIGluIENPTE9SUy50aGVtZSwgc2hvdWxkIGl0IGJlP1xuLy8gLSBsaWdodGVyIGJhY2tncm91bmQgY29sb3IgaXMgbm90IGRlZmluZWQgaW4gQ09MT1JTLnRoZW1lLCBzaG91bGQgaXQgYmU/XG5jb25zdCBERUZBVUxUX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXTtcbmNvbnN0IERJVklERVJfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgMjAwIF07XG5jb25zdCBMSUdIVEVSX1RFWFRfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF07XG5jb25zdCBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SID0gQ09MT1JTLnRoZW1lLmdyYXlbIDEwMCBdO1xuY29uc3QgVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kO1xuY29uc3QgREVGQVVMVF9CT1hfU0hBRE9XID0gYDAgMCAwICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9ICR7IERFRkFVTFRfQk9SREVSX0NPTE9SIH0sICR7IENPTkZJRy5lbGV2YXRpb25NZWRpdW0gfWA7XG5jb25zdCBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPVyA9IGAwIDAgMCAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSAkeyBUT09MQkFSX1ZBUklBTlRfQk9SREVSX0NPTE9SIH1gO1xuXG5jb25zdCBHUklEX1RFTVBMQVRFX0NPTFMgPSAnbWlubWF4KCAwLCBtYXgtY29udGVudCApIDFmcic7XG5cbmV4cG9ydCBjb25zdCBNZW51ID0gc3R5bGVkKCBBcmlha2l0Lk1lbnUgKTwgUGljazwgQ29udGV4dFByb3BzLCAndmFyaWFudCcgPiA+YFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdC8qIFNhbWUgYXMgcG9wb3ZlciBjb21wb25lbnQgKi9cblx0LyogVE9ETzogaXMgdGhlcmUgYSB3YXkgdG8gcmVhZCB0aGUgc2FzcyB2YXJpYWJsZT8gKi9cblx0ei1pbmRleDogMTAwMDAwMDtcblxuXHRkaXNwbGF5OiBncmlkO1xuXHRncmlkLXRlbXBsYXRlLWNvbHVtbnM6ICR7IEdSSURfVEVNUExBVEVfQ09MUyB9O1xuXHRncmlkLXRlbXBsYXRlLXJvd3M6IGF1dG87XG5cblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0bWluLXdpZHRoOiAxNjBweDtcblx0bWF4LXdpZHRoOiAzMjBweDtcblx0bWF4LWhlaWdodDogdmFyKCAtLXBvcG92ZXItYXZhaWxhYmxlLWhlaWdodCApO1xuXG5cdHBhZGRpbmc6ICR7IENPTlRFTlRfV1JBUFBFUl9QQURESU5HIH07XG5cblx0b3ZlcnNjcm9sbC1iZWhhdmlvcjogY29udGFpbjtcblx0b3ZlcmZsb3c6IGF1dG87XG5cblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c01lZGl1bSB9O1xuXHQkeyAoIHByb3BzICkgPT4gY3NzYFxuXHRcdGJveC1zaGFkb3c6ICR7IHByb3BzLnZhcmlhbnQgPT09ICd0b29sYmFyJ1xuXHRcdFx0PyBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPV1xuXHRcdFx0OiBERUZBVUxUX0JPWF9TSEFET1cgfTtcblx0YCB9XG5cblx0LyogT25seSB2aXNpYmxlIGluIFdpbmRvd3MgSGlnaCBDb250cmFzdCBtb2RlICovXG5cdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudCAhaW1wb3J0YW50O1xuXG5cdC8qIE9wZW4vY2xvc2UgYW5pbWF0aW9uICovXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdHRyYW5zaXRpb24tcHJvcGVydHk6IHRyYW5zZm9ybSwgb3BhY2l0eTtcblx0XHR0cmFuc2l0aW9uLWR1cmF0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RVUkFUSU9OIH0sXG5cdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLkZBREVfRFVSQVRJT04gfTtcblx0XHR0cmFuc2l0aW9uLXRpbWluZy1mdW5jdGlvbjogJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9FQVNJTkcgfSxcblx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9FQVNJTkcgfTtcblx0XHR3aWxsLWNoYW5nZTogdHJhbnNmb3JtLCBvcGFjaXR5O1xuXG5cdFx0Jjpub3QoIFtkYXRhLXN1Ym1lbnVdICkge1xuXHRcdFx0LyogUmVnYXJkbGVzcyBvZiB0aGUgc2lkZSwgZmFkZSBpbiBhbmQgb3V0LiAqL1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHRcdCZbZGF0YS1lbnRlcl0ge1xuXHRcdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0fVxuXG5cdFx0XHQvKiBTbGlkZSBpbiB0aGUgZGlyZWN0aW9uIHRoZSBtZW51IGlzIG9wZW5pbmcuICovXG5cdFx0XHQmW2RhdGEtc2lkZT0nYm90dG9tJ10ge1xuXHRcdFx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoXG5cdFx0XHRcdFx0LSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J3RvcCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVZKFxuXHRcdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J2xlZnQnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWChcblx0XHRcdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKFxuXHRcdFx0XHRcdC0keyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdib3R0b20nXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSd0b3AnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWSggMCApO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLWVudGVyXVtkYXRhLXNpZGU9J2xlZnQnXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKCAwICk7XG5cdFx0XHR9XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBiYXNlSXRlbSA9IGNzc2Bcblx0YWxsOiB1bnNldDtcblxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCA4ICkgfTtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQvKiBPY2N1cHkgdGhlIHdpZHRoIG9mIGFsbCBncmlkIGNvbHVtbnMgKGllLiBmdWxsIHdpZHRoKSAqL1xuXHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogJHsgR1JJRF9URU1QTEFURV9DT0xTIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cblx0QHN1cHBvcnRzICggZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiBzdWJncmlkICkge1xuXHRcdC8qXG5cdFx0ICogRGVmaW5lIGEgZ3JpZCBsYXlvdXQgd2hpY2ggaW5oZXJpdHMgdGhlIHNhbWUgY29sdW1ucyBjb25maWd1cmF0aW9uXG5cdFx0ICogZnJvbSB0aGUgcGFyZW50IGxheW91dCAoaWUuIHN1YmdyaWQpLiBUaGlzIGFsbG93cyB0aGUgbWVudVxuXHRcdCAqIHRvIHN5bmNocm9uaXplIHRoZSBpbmRlbnRhdGlvbiBvZiBhbGwgaXRzIGl0ZW1zLlxuXHRcdCAqL1xuXHRcdGdyaWQtdGVtcGxhdGUtY29sdW1uczogc3ViZ3JpZDtcblx0fVxuXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdGZvbnQtd2VpZ2h0OiBub3JtYWw7XG5cdGxpbmUtaGVpZ2h0OiAyMHB4O1xuXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRwYWRkaW5nLWJsb2NrOiAkeyBJVEVNX1BBRERJTkdfQkxPQ0sgfTtcblx0cGFkZGluZy1pbmxpbmU6ICR7IElURU1fUEFERElOR19JTkxJTkUgfTtcblxuXHQvKlxuXHQgKiBNYWtlIHN1cmUgdGhhdCwgd2hlbiBhbiBpdGVtIGlzIHNjcm9sbGVkIGludG8gdmlldyAoZWcuIHdoaWxlIHVzaW5nIHRoZVxuXHQgKiBrZXlib2FyZCB0byBtb3ZlIGZvY3VzKSwgdGhlIHdob2xlIGl0ZW0gY29tZXMgaW50byB2aWV3XG5cdCAqL1xuXHRzY3JvbGwtbWFyZ2luOiAkeyBDT05URU5UX1dSQVBQRVJfUEFERElORyB9O1xuXG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRvdXRsaW5lOiBub25lO1xuXG5cdCZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLnRleHREaXNhYmxlZCB9O1xuXHRcdGN1cnNvcjogbm90LWFsbG93ZWQ7XG5cdH1cblxuXHQvKiBBY3RpdmUgaXRlbSAoaW5jbHVkaW5nIGhvdmVyKSAqL1xuXHQmW2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKTpub3QoXG5cdFx0XHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddXG5cdFx0KSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblx0fVxuXG5cdC8qIEtleWJvYXJkIGZvY3VzIChmb2N1cy12aXNpYmxlKSAqL1xuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdGJveC1zaGFkb3c6IDAgMCAwIDEuNXB4ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0fVxuXG5cdC8qIEFjdGl2ZSAoaWUuIHByZXNzZWQsIG1vdXNlIGRvd24pICovXG5cdCY6YWN0aXZlLFxuXHQmW2RhdGEtYWN0aXZlXSB7XG5cdFx0LyogVE9ETzogc2hvdWxkIHRoZXJlIGJlIGEgdmlzdWFsIGFjdGl2ZSBzdGF0ZT8gKi9cblx0fVxuXG5cdC8qIFdoZW4gdGhlIGl0ZW0gaXMgdGhlIHRyaWdnZXIgb2YgYW4gb3BlbiBzdWJtZW51ICovXG5cdCR7IE1lbnUgfTpub3QoOmZvY3VzKSAmOm5vdCg6Zm9jdXMpW2FyaWEtZXhwYW5kZWQ9XCJ0cnVlXCJdIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SIH07XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdH1cblxuXHRzdmcge1xuXHRcdGZpbGw6IGN1cnJlbnRDb2xvcjtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW0gKWBcblx0JHsgYmFzZUl0ZW0gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBDaGVja2JveEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW1DaGVja2JveCApYFxuXHQkeyBiYXNlSXRlbSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFJhZGlvSXRlbSA9IHN0eWxlZCggQXJpYWtpdC5NZW51SXRlbVJhZGlvIClgXG5cdCR7IGJhc2VJdGVtIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVByZWZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0LyogQWx3YXlzIG9jY3VweSB0aGUgZmlyc3QgY29sdW1uLCBldmVuIHdoZW4gYXV0by1jb2xsYXBzaW5nICovXG5cdGdyaWQtY29sdW1uOiAxO1xuXG5cdC8qXG5cdCAqIEV2ZW4gd2hlbiB0aGUgaXRlbSBpcyBub3QgY2hlY2tlZCwgb2NjdXB5IHRoZSBzYW1lIHNjcmVlbiBzcGFjZSB0byBhdm9pZFxuXHQgKiB0aGUgc3BhY2UgY29sbGFwc2lkZSB3aGVuIG5vIGl0ZW1zIGFyZSBjaGVja2VkLlxuXHQgKi9cblx0JHsgQ2hlY2tib3hJdGVtIH0gPiAmLFxuXHQkeyBSYWRpb0l0ZW0gfSA+ICYge1xuXHRcdC8qIFNhbWUgd2lkdGggYXMgdGhlIGNoZWNrIGljb25zICovXG5cdFx0bWluLXdpZHRoOiAkeyBzcGFjZSggNiApIH07XG5cdH1cblxuXHQkeyBDaGVja2JveEl0ZW0gfSA+ICYsXG5cdCR7IFJhZGlvSXRlbSB9ID4gJixcblx0Jjpub3QoIDplbXB0eSApIHtcblx0XHRtYXJnaW4taW5saW5lLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHR9XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBhY3RpdmUsIGV4Y2VwdCB3aGVuIGl0J3MgYSBub24tZm9jdXNlZC9ob3ZlcmVkXG5cdCogc3VibWVudSB0cmlnZ2VyIChpbiB0aGF0IGNhc2UsIGNvbG9yIHNob3VsZCBub3QgYmUgaW5oZXJpdGVkKVxuXHQqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApID4gJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddID4gJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ29udGVudFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQvKlxuXHQgKiBBbHdheXMgb2NjdXB5IHRoZSBzZWNvbmQgY29sdW1uLCBzaW5jZSB0aGUgZmlyc3QgY29sdW1uXG5cdCAqIGlzIHRha2VuIGJ5IHRoZSBwcmVmaXggd3JhcHBlciAod2hlbiBkaXNwbGF5ZWQpLlxuXHQgKi9cblx0Z3JpZC1jb2x1bW46IDI7XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRnYXA6ICR7IHNwYWNlKCAzICkgfTtcblxuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ2hpbGRyZW5XcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0ZmxleDogMTtcblxuXHRkaXNwbGF5OiBpbmxpbmUtZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblx0Z2FwOiAkeyBzcGFjZSggMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVN1ZmZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZmxleDogMCAxIGZpdC1jb250ZW50O1xuXHRtaW4td2lkdGg6IDA7XG5cdHdpZHRoOiBmaXQtY29udGVudDtcblxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0Z2FwOiAkeyBzcGFjZSggMyApIH07XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCAqIFdoZW4gdGhlIHBhcmVudCBtZW51IGl0ZW0gaXMgYWN0aXZlLCBleGNlcHQgd2hlbiBpdCdzIGEgbm9uLWZvY3VzZWQvaG92ZXJlZFxuXHQgKiBzdWJtZW51IHRyaWdnZXIgKGluIHRoYXQgY2FzZSwgY29sb3Igc2hvdWxkIG5vdCBiZSBpbmhlcml0ZWQpXG5cdCAqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApICo6bm90KCR7IE1lbnUgfSkgJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICo6bm90KCR7IE1lbnUgfSkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cCA9IHN0eWxlZCggQXJpYWtpdC5NZW51R3JvdXAgKWBcblx0LyogSWdub3JlIHRoaXMgZWxlbWVudCB3aGVuIGNhbGN1bGF0aW5nIHRoZSBsYXlvdXQuIFVzZWZ1bCBmb3Igc3ViZ3JpZCAqL1xuXHRkaXNwbGF5OiBjb250ZW50cztcbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cExhYmVsID0gc3R5bGVkKCBBcmlha2l0Lk1lbnVHcm91cExhYmVsIClgXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0cGFkZGluZy1ibG9jay1zdGFydDogJHsgc3BhY2UoIDMgKSB9O1xuXHRwYWRkaW5nLWJsb2NrLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHRwYWRkaW5nLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFNlcGFyYXRvciA9IHN0eWxlZCggQXJpYWtpdC5NZW51U2VwYXJhdG9yICk8XG5cdFBpY2s8IENvbnRleHRQcm9wcywgJ3ZhcmlhbnQnID5cbj5gXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0Ym9yZGVyOiBub25lO1xuXHRoZWlnaHQ6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9O1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyAoIHByb3BzICkgPT5cblx0XHRwcm9wcy52YXJpYW50ID09PSAndG9vbGJhcidcblx0XHRcdD8gVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUlxuXHRcdFx0OiBESVZJREVSX0NPTE9SIH07XG5cdC8qIEFsaWduIHdpdGggbWVudSBpdGVtcycgY29udGVudCAqL1xuXHRtYXJnaW4tYmxvY2s6ICR7IHNwYWNlKCAyICkgfTtcblx0bWFyZ2luLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuXG5cdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VibWVudUNoZXZyb25JY29uID0gc3R5bGVkKCBJY29uIClgXG5cdHdpZHRoOiAkeyBzcGFjZSggMS41ICkgfTtcblx0JHsgcnRsKFxuXHRcdHtcblx0XHRcdHRyYW5zZm9ybTogYHNjYWxlWCgxKWAsXG5cdFx0fSxcblx0XHR7XG5cdFx0XHR0cmFuc2Zvcm06IGBzY2FsZVgoLTEpYCxcblx0XHR9XG5cdCkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtTGFiZWwgPSBzdHlsZWQoIFRydW5jYXRlIClgXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDIwcHg7XG5cdGNvbG9yOiBpbmhlcml0O1xuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW1IZWxwVGV4dCA9IHN0eWxlZCggVHJ1bmNhdGUgKWBcblx0Zm9udC1zaXplOiAkeyBmb250KCAnaGVscFRleHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDE2cHg7XG5cdGNvbG9yOiAkeyBMSUdIVEVSX1RFWFRfQ09MT1IgfTtcblx0b3ZlcmZsb3ctd3JhcDogYW55d2hlcmU7XG5cblx0W2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKSAqOm5vdCggJHsgTWVudSB9ICkgJixcblx0W2FyaWEtZGlzYWJsZWQ9J3RydWUnXSAqOm5vdCggJHsgTWVudSB9ICkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG4iXX0= */"));
  var CheckboxItem = /* @__PURE__ */ createStyled(MenuItemCheckbox, false ? {
    target: "e1wg7tti11"
  } : {
    target: "e1wg7tti11",
    label: "CheckboxItem"
  })(baseItem, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1TThEIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIGZvbnQsIHJ0bCwgQ09ORklHLCBEUk9QRE9XTl9NT1RJT05fQ1NTIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgSWNvbiBmcm9tICcuLi9pY29uJztcbmltcG9ydCB7IFRydW5jYXRlIH0gZnJvbSAnLi4vdHJ1bmNhdGUnO1xuaW1wb3J0IHR5cGUgeyBDb250ZXh0UHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuY29uc3QgQ09OVEVOVF9XUkFQUEVSX1BBRERJTkcgPSBzcGFjZSggMSApO1xuY29uc3QgSVRFTV9QQURESU5HX0JMT0NLID0gc3BhY2UoIDEgKTtcbmNvbnN0IElURU1fUEFERElOR19JTkxJTkUgPSBzcGFjZSggMyApO1xuXG4vLyBUT0RPOlxuLy8gLSBib3JkZXIgY29sb3IgYW5kIGRpdmlkZXIgY29sb3IgYXJlIGRpZmZlcmVudCBmcm9tIENPTE9SUy50aGVtZSB2YXJpYWJsZXNcbi8vIC0gbGlnaHRlciB0ZXh0IGNvbG9yIGlzIG5vdCBkZWZpbmVkIGluIENPTE9SUy50aGVtZSwgc2hvdWxkIGl0IGJlP1xuLy8gLSBsaWdodGVyIGJhY2tncm91bmQgY29sb3IgaXMgbm90IGRlZmluZWQgaW4gQ09MT1JTLnRoZW1lLCBzaG91bGQgaXQgYmU/XG5jb25zdCBERUZBVUxUX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXTtcbmNvbnN0IERJVklERVJfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgMjAwIF07XG5jb25zdCBMSUdIVEVSX1RFWFRfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF07XG5jb25zdCBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SID0gQ09MT1JTLnRoZW1lLmdyYXlbIDEwMCBdO1xuY29uc3QgVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kO1xuY29uc3QgREVGQVVMVF9CT1hfU0hBRE9XID0gYDAgMCAwICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9ICR7IERFRkFVTFRfQk9SREVSX0NPTE9SIH0sICR7IENPTkZJRy5lbGV2YXRpb25NZWRpdW0gfWA7XG5jb25zdCBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPVyA9IGAwIDAgMCAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSAkeyBUT09MQkFSX1ZBUklBTlRfQk9SREVSX0NPTE9SIH1gO1xuXG5jb25zdCBHUklEX1RFTVBMQVRFX0NPTFMgPSAnbWlubWF4KCAwLCBtYXgtY29udGVudCApIDFmcic7XG5cbmV4cG9ydCBjb25zdCBNZW51ID0gc3R5bGVkKCBBcmlha2l0Lk1lbnUgKTwgUGljazwgQ29udGV4dFByb3BzLCAndmFyaWFudCcgPiA+YFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdC8qIFNhbWUgYXMgcG9wb3ZlciBjb21wb25lbnQgKi9cblx0LyogVE9ETzogaXMgdGhlcmUgYSB3YXkgdG8gcmVhZCB0aGUgc2FzcyB2YXJpYWJsZT8gKi9cblx0ei1pbmRleDogMTAwMDAwMDtcblxuXHRkaXNwbGF5OiBncmlkO1xuXHRncmlkLXRlbXBsYXRlLWNvbHVtbnM6ICR7IEdSSURfVEVNUExBVEVfQ09MUyB9O1xuXHRncmlkLXRlbXBsYXRlLXJvd3M6IGF1dG87XG5cblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0bWluLXdpZHRoOiAxNjBweDtcblx0bWF4LXdpZHRoOiAzMjBweDtcblx0bWF4LWhlaWdodDogdmFyKCAtLXBvcG92ZXItYXZhaWxhYmxlLWhlaWdodCApO1xuXG5cdHBhZGRpbmc6ICR7IENPTlRFTlRfV1JBUFBFUl9QQURESU5HIH07XG5cblx0b3ZlcnNjcm9sbC1iZWhhdmlvcjogY29udGFpbjtcblx0b3ZlcmZsb3c6IGF1dG87XG5cblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c01lZGl1bSB9O1xuXHQkeyAoIHByb3BzICkgPT4gY3NzYFxuXHRcdGJveC1zaGFkb3c6ICR7IHByb3BzLnZhcmlhbnQgPT09ICd0b29sYmFyJ1xuXHRcdFx0PyBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPV1xuXHRcdFx0OiBERUZBVUxUX0JPWF9TSEFET1cgfTtcblx0YCB9XG5cblx0LyogT25seSB2aXNpYmxlIGluIFdpbmRvd3MgSGlnaCBDb250cmFzdCBtb2RlICovXG5cdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudCAhaW1wb3J0YW50O1xuXG5cdC8qIE9wZW4vY2xvc2UgYW5pbWF0aW9uICovXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdHRyYW5zaXRpb24tcHJvcGVydHk6IHRyYW5zZm9ybSwgb3BhY2l0eTtcblx0XHR0cmFuc2l0aW9uLWR1cmF0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RVUkFUSU9OIH0sXG5cdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLkZBREVfRFVSQVRJT04gfTtcblx0XHR0cmFuc2l0aW9uLXRpbWluZy1mdW5jdGlvbjogJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9FQVNJTkcgfSxcblx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9FQVNJTkcgfTtcblx0XHR3aWxsLWNoYW5nZTogdHJhbnNmb3JtLCBvcGFjaXR5O1xuXG5cdFx0Jjpub3QoIFtkYXRhLXN1Ym1lbnVdICkge1xuXHRcdFx0LyogUmVnYXJkbGVzcyBvZiB0aGUgc2lkZSwgZmFkZSBpbiBhbmQgb3V0LiAqL1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHRcdCZbZGF0YS1lbnRlcl0ge1xuXHRcdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0fVxuXG5cdFx0XHQvKiBTbGlkZSBpbiB0aGUgZGlyZWN0aW9uIHRoZSBtZW51IGlzIG9wZW5pbmcuICovXG5cdFx0XHQmW2RhdGEtc2lkZT0nYm90dG9tJ10ge1xuXHRcdFx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoXG5cdFx0XHRcdFx0LSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J3RvcCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVZKFxuXHRcdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J2xlZnQnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWChcblx0XHRcdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKFxuXHRcdFx0XHRcdC0keyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdib3R0b20nXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSd0b3AnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWSggMCApO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLWVudGVyXVtkYXRhLXNpZGU9J2xlZnQnXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKCAwICk7XG5cdFx0XHR9XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBiYXNlSXRlbSA9IGNzc2Bcblx0YWxsOiB1bnNldDtcblxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCA4ICkgfTtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQvKiBPY2N1cHkgdGhlIHdpZHRoIG9mIGFsbCBncmlkIGNvbHVtbnMgKGllLiBmdWxsIHdpZHRoKSAqL1xuXHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogJHsgR1JJRF9URU1QTEFURV9DT0xTIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cblx0QHN1cHBvcnRzICggZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiBzdWJncmlkICkge1xuXHRcdC8qXG5cdFx0ICogRGVmaW5lIGEgZ3JpZCBsYXlvdXQgd2hpY2ggaW5oZXJpdHMgdGhlIHNhbWUgY29sdW1ucyBjb25maWd1cmF0aW9uXG5cdFx0ICogZnJvbSB0aGUgcGFyZW50IGxheW91dCAoaWUuIHN1YmdyaWQpLiBUaGlzIGFsbG93cyB0aGUgbWVudVxuXHRcdCAqIHRvIHN5bmNocm9uaXplIHRoZSBpbmRlbnRhdGlvbiBvZiBhbGwgaXRzIGl0ZW1zLlxuXHRcdCAqL1xuXHRcdGdyaWQtdGVtcGxhdGUtY29sdW1uczogc3ViZ3JpZDtcblx0fVxuXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdGZvbnQtd2VpZ2h0OiBub3JtYWw7XG5cdGxpbmUtaGVpZ2h0OiAyMHB4O1xuXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRwYWRkaW5nLWJsb2NrOiAkeyBJVEVNX1BBRERJTkdfQkxPQ0sgfTtcblx0cGFkZGluZy1pbmxpbmU6ICR7IElURU1fUEFERElOR19JTkxJTkUgfTtcblxuXHQvKlxuXHQgKiBNYWtlIHN1cmUgdGhhdCwgd2hlbiBhbiBpdGVtIGlzIHNjcm9sbGVkIGludG8gdmlldyAoZWcuIHdoaWxlIHVzaW5nIHRoZVxuXHQgKiBrZXlib2FyZCB0byBtb3ZlIGZvY3VzKSwgdGhlIHdob2xlIGl0ZW0gY29tZXMgaW50byB2aWV3XG5cdCAqL1xuXHRzY3JvbGwtbWFyZ2luOiAkeyBDT05URU5UX1dSQVBQRVJfUEFERElORyB9O1xuXG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRvdXRsaW5lOiBub25lO1xuXG5cdCZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLnRleHREaXNhYmxlZCB9O1xuXHRcdGN1cnNvcjogbm90LWFsbG93ZWQ7XG5cdH1cblxuXHQvKiBBY3RpdmUgaXRlbSAoaW5jbHVkaW5nIGhvdmVyKSAqL1xuXHQmW2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKTpub3QoXG5cdFx0XHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddXG5cdFx0KSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblx0fVxuXG5cdC8qIEtleWJvYXJkIGZvY3VzIChmb2N1cy12aXNpYmxlKSAqL1xuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdGJveC1zaGFkb3c6IDAgMCAwIDEuNXB4ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0fVxuXG5cdC8qIEFjdGl2ZSAoaWUuIHByZXNzZWQsIG1vdXNlIGRvd24pICovXG5cdCY6YWN0aXZlLFxuXHQmW2RhdGEtYWN0aXZlXSB7XG5cdFx0LyogVE9ETzogc2hvdWxkIHRoZXJlIGJlIGEgdmlzdWFsIGFjdGl2ZSBzdGF0ZT8gKi9cblx0fVxuXG5cdC8qIFdoZW4gdGhlIGl0ZW0gaXMgdGhlIHRyaWdnZXIgb2YgYW4gb3BlbiBzdWJtZW51ICovXG5cdCR7IE1lbnUgfTpub3QoOmZvY3VzKSAmOm5vdCg6Zm9jdXMpW2FyaWEtZXhwYW5kZWQ9XCJ0cnVlXCJdIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SIH07XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdH1cblxuXHRzdmcge1xuXHRcdGZpbGw6IGN1cnJlbnRDb2xvcjtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW0gKWBcblx0JHsgYmFzZUl0ZW0gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBDaGVja2JveEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW1DaGVja2JveCApYFxuXHQkeyBiYXNlSXRlbSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFJhZGlvSXRlbSA9IHN0eWxlZCggQXJpYWtpdC5NZW51SXRlbVJhZGlvIClgXG5cdCR7IGJhc2VJdGVtIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVByZWZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0LyogQWx3YXlzIG9jY3VweSB0aGUgZmlyc3QgY29sdW1uLCBldmVuIHdoZW4gYXV0by1jb2xsYXBzaW5nICovXG5cdGdyaWQtY29sdW1uOiAxO1xuXG5cdC8qXG5cdCAqIEV2ZW4gd2hlbiB0aGUgaXRlbSBpcyBub3QgY2hlY2tlZCwgb2NjdXB5IHRoZSBzYW1lIHNjcmVlbiBzcGFjZSB0byBhdm9pZFxuXHQgKiB0aGUgc3BhY2UgY29sbGFwc2lkZSB3aGVuIG5vIGl0ZW1zIGFyZSBjaGVja2VkLlxuXHQgKi9cblx0JHsgQ2hlY2tib3hJdGVtIH0gPiAmLFxuXHQkeyBSYWRpb0l0ZW0gfSA+ICYge1xuXHRcdC8qIFNhbWUgd2lkdGggYXMgdGhlIGNoZWNrIGljb25zICovXG5cdFx0bWluLXdpZHRoOiAkeyBzcGFjZSggNiApIH07XG5cdH1cblxuXHQkeyBDaGVja2JveEl0ZW0gfSA+ICYsXG5cdCR7IFJhZGlvSXRlbSB9ID4gJixcblx0Jjpub3QoIDplbXB0eSApIHtcblx0XHRtYXJnaW4taW5saW5lLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHR9XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBhY3RpdmUsIGV4Y2VwdCB3aGVuIGl0J3MgYSBub24tZm9jdXNlZC9ob3ZlcmVkXG5cdCogc3VibWVudSB0cmlnZ2VyIChpbiB0aGF0IGNhc2UsIGNvbG9yIHNob3VsZCBub3QgYmUgaW5oZXJpdGVkKVxuXHQqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApID4gJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddID4gJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ29udGVudFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQvKlxuXHQgKiBBbHdheXMgb2NjdXB5IHRoZSBzZWNvbmQgY29sdW1uLCBzaW5jZSB0aGUgZmlyc3QgY29sdW1uXG5cdCAqIGlzIHRha2VuIGJ5IHRoZSBwcmVmaXggd3JhcHBlciAod2hlbiBkaXNwbGF5ZWQpLlxuXHQgKi9cblx0Z3JpZC1jb2x1bW46IDI7XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRnYXA6ICR7IHNwYWNlKCAzICkgfTtcblxuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ2hpbGRyZW5XcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0ZmxleDogMTtcblxuXHRkaXNwbGF5OiBpbmxpbmUtZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblx0Z2FwOiAkeyBzcGFjZSggMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVN1ZmZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZmxleDogMCAxIGZpdC1jb250ZW50O1xuXHRtaW4td2lkdGg6IDA7XG5cdHdpZHRoOiBmaXQtY29udGVudDtcblxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0Z2FwOiAkeyBzcGFjZSggMyApIH07XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCAqIFdoZW4gdGhlIHBhcmVudCBtZW51IGl0ZW0gaXMgYWN0aXZlLCBleGNlcHQgd2hlbiBpdCdzIGEgbm9uLWZvY3VzZWQvaG92ZXJlZFxuXHQgKiBzdWJtZW51IHRyaWdnZXIgKGluIHRoYXQgY2FzZSwgY29sb3Igc2hvdWxkIG5vdCBiZSBpbmhlcml0ZWQpXG5cdCAqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApICo6bm90KCR7IE1lbnUgfSkgJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICo6bm90KCR7IE1lbnUgfSkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cCA9IHN0eWxlZCggQXJpYWtpdC5NZW51R3JvdXAgKWBcblx0LyogSWdub3JlIHRoaXMgZWxlbWVudCB3aGVuIGNhbGN1bGF0aW5nIHRoZSBsYXlvdXQuIFVzZWZ1bCBmb3Igc3ViZ3JpZCAqL1xuXHRkaXNwbGF5OiBjb250ZW50cztcbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cExhYmVsID0gc3R5bGVkKCBBcmlha2l0Lk1lbnVHcm91cExhYmVsIClgXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0cGFkZGluZy1ibG9jay1zdGFydDogJHsgc3BhY2UoIDMgKSB9O1xuXHRwYWRkaW5nLWJsb2NrLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHRwYWRkaW5nLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFNlcGFyYXRvciA9IHN0eWxlZCggQXJpYWtpdC5NZW51U2VwYXJhdG9yICk8XG5cdFBpY2s8IENvbnRleHRQcm9wcywgJ3ZhcmlhbnQnID5cbj5gXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0Ym9yZGVyOiBub25lO1xuXHRoZWlnaHQ6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9O1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyAoIHByb3BzICkgPT5cblx0XHRwcm9wcy52YXJpYW50ID09PSAndG9vbGJhcidcblx0XHRcdD8gVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUlxuXHRcdFx0OiBESVZJREVSX0NPTE9SIH07XG5cdC8qIEFsaWduIHdpdGggbWVudSBpdGVtcycgY29udGVudCAqL1xuXHRtYXJnaW4tYmxvY2s6ICR7IHNwYWNlKCAyICkgfTtcblx0bWFyZ2luLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuXG5cdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VibWVudUNoZXZyb25JY29uID0gc3R5bGVkKCBJY29uIClgXG5cdHdpZHRoOiAkeyBzcGFjZSggMS41ICkgfTtcblx0JHsgcnRsKFxuXHRcdHtcblx0XHRcdHRyYW5zZm9ybTogYHNjYWxlWCgxKWAsXG5cdFx0fSxcblx0XHR7XG5cdFx0XHR0cmFuc2Zvcm06IGBzY2FsZVgoLTEpYCxcblx0XHR9XG5cdCkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtTGFiZWwgPSBzdHlsZWQoIFRydW5jYXRlIClgXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDIwcHg7XG5cdGNvbG9yOiBpbmhlcml0O1xuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW1IZWxwVGV4dCA9IHN0eWxlZCggVHJ1bmNhdGUgKWBcblx0Zm9udC1zaXplOiAkeyBmb250KCAnaGVscFRleHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDE2cHg7XG5cdGNvbG9yOiAkeyBMSUdIVEVSX1RFWFRfQ09MT1IgfTtcblx0b3ZlcmZsb3ctd3JhcDogYW55d2hlcmU7XG5cblx0W2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKSAqOm5vdCggJHsgTWVudSB9ICkgJixcblx0W2FyaWEtZGlzYWJsZWQ9J3RydWUnXSAqOm5vdCggJHsgTWVudSB9ICkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG4iXX0= */"));
  var RadioItem = /* @__PURE__ */ createStyled(MenuItemRadio, false ? {
    target: "e1wg7tti10"
  } : {
    target: "e1wg7tti10",
    label: "RadioItem"
  })(baseItem, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyTXdEIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIGZvbnQsIHJ0bCwgQ09ORklHLCBEUk9QRE9XTl9NT1RJT05fQ1NTIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgSWNvbiBmcm9tICcuLi9pY29uJztcbmltcG9ydCB7IFRydW5jYXRlIH0gZnJvbSAnLi4vdHJ1bmNhdGUnO1xuaW1wb3J0IHR5cGUgeyBDb250ZXh0UHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuY29uc3QgQ09OVEVOVF9XUkFQUEVSX1BBRERJTkcgPSBzcGFjZSggMSApO1xuY29uc3QgSVRFTV9QQURESU5HX0JMT0NLID0gc3BhY2UoIDEgKTtcbmNvbnN0IElURU1fUEFERElOR19JTkxJTkUgPSBzcGFjZSggMyApO1xuXG4vLyBUT0RPOlxuLy8gLSBib3JkZXIgY29sb3IgYW5kIGRpdmlkZXIgY29sb3IgYXJlIGRpZmZlcmVudCBmcm9tIENPTE9SUy50aGVtZSB2YXJpYWJsZXNcbi8vIC0gbGlnaHRlciB0ZXh0IGNvbG9yIGlzIG5vdCBkZWZpbmVkIGluIENPTE9SUy50aGVtZSwgc2hvdWxkIGl0IGJlP1xuLy8gLSBsaWdodGVyIGJhY2tncm91bmQgY29sb3IgaXMgbm90IGRlZmluZWQgaW4gQ09MT1JTLnRoZW1lLCBzaG91bGQgaXQgYmU/XG5jb25zdCBERUZBVUxUX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXTtcbmNvbnN0IERJVklERVJfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgMjAwIF07XG5jb25zdCBMSUdIVEVSX1RFWFRfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF07XG5jb25zdCBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SID0gQ09MT1JTLnRoZW1lLmdyYXlbIDEwMCBdO1xuY29uc3QgVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kO1xuY29uc3QgREVGQVVMVF9CT1hfU0hBRE9XID0gYDAgMCAwICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9ICR7IERFRkFVTFRfQk9SREVSX0NPTE9SIH0sICR7IENPTkZJRy5lbGV2YXRpb25NZWRpdW0gfWA7XG5jb25zdCBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPVyA9IGAwIDAgMCAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSAkeyBUT09MQkFSX1ZBUklBTlRfQk9SREVSX0NPTE9SIH1gO1xuXG5jb25zdCBHUklEX1RFTVBMQVRFX0NPTFMgPSAnbWlubWF4KCAwLCBtYXgtY29udGVudCApIDFmcic7XG5cbmV4cG9ydCBjb25zdCBNZW51ID0gc3R5bGVkKCBBcmlha2l0Lk1lbnUgKTwgUGljazwgQ29udGV4dFByb3BzLCAndmFyaWFudCcgPiA+YFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdC8qIFNhbWUgYXMgcG9wb3ZlciBjb21wb25lbnQgKi9cblx0LyogVE9ETzogaXMgdGhlcmUgYSB3YXkgdG8gcmVhZCB0aGUgc2FzcyB2YXJpYWJsZT8gKi9cblx0ei1pbmRleDogMTAwMDAwMDtcblxuXHRkaXNwbGF5OiBncmlkO1xuXHRncmlkLXRlbXBsYXRlLWNvbHVtbnM6ICR7IEdSSURfVEVNUExBVEVfQ09MUyB9O1xuXHRncmlkLXRlbXBsYXRlLXJvd3M6IGF1dG87XG5cblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0bWluLXdpZHRoOiAxNjBweDtcblx0bWF4LXdpZHRoOiAzMjBweDtcblx0bWF4LWhlaWdodDogdmFyKCAtLXBvcG92ZXItYXZhaWxhYmxlLWhlaWdodCApO1xuXG5cdHBhZGRpbmc6ICR7IENPTlRFTlRfV1JBUFBFUl9QQURESU5HIH07XG5cblx0b3ZlcnNjcm9sbC1iZWhhdmlvcjogY29udGFpbjtcblx0b3ZlcmZsb3c6IGF1dG87XG5cblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c01lZGl1bSB9O1xuXHQkeyAoIHByb3BzICkgPT4gY3NzYFxuXHRcdGJveC1zaGFkb3c6ICR7IHByb3BzLnZhcmlhbnQgPT09ICd0b29sYmFyJ1xuXHRcdFx0PyBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPV1xuXHRcdFx0OiBERUZBVUxUX0JPWF9TSEFET1cgfTtcblx0YCB9XG5cblx0LyogT25seSB2aXNpYmxlIGluIFdpbmRvd3MgSGlnaCBDb250cmFzdCBtb2RlICovXG5cdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudCAhaW1wb3J0YW50O1xuXG5cdC8qIE9wZW4vY2xvc2UgYW5pbWF0aW9uICovXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdHRyYW5zaXRpb24tcHJvcGVydHk6IHRyYW5zZm9ybSwgb3BhY2l0eTtcblx0XHR0cmFuc2l0aW9uLWR1cmF0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RVUkFUSU9OIH0sXG5cdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLkZBREVfRFVSQVRJT04gfTtcblx0XHR0cmFuc2l0aW9uLXRpbWluZy1mdW5jdGlvbjogJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9FQVNJTkcgfSxcblx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9FQVNJTkcgfTtcblx0XHR3aWxsLWNoYW5nZTogdHJhbnNmb3JtLCBvcGFjaXR5O1xuXG5cdFx0Jjpub3QoIFtkYXRhLXN1Ym1lbnVdICkge1xuXHRcdFx0LyogUmVnYXJkbGVzcyBvZiB0aGUgc2lkZSwgZmFkZSBpbiBhbmQgb3V0LiAqL1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHRcdCZbZGF0YS1lbnRlcl0ge1xuXHRcdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0fVxuXG5cdFx0XHQvKiBTbGlkZSBpbiB0aGUgZGlyZWN0aW9uIHRoZSBtZW51IGlzIG9wZW5pbmcuICovXG5cdFx0XHQmW2RhdGEtc2lkZT0nYm90dG9tJ10ge1xuXHRcdFx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoXG5cdFx0XHRcdFx0LSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J3RvcCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVZKFxuXHRcdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J2xlZnQnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWChcblx0XHRcdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKFxuXHRcdFx0XHRcdC0keyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdib3R0b20nXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSd0b3AnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWSggMCApO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLWVudGVyXVtkYXRhLXNpZGU9J2xlZnQnXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKCAwICk7XG5cdFx0XHR9XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBiYXNlSXRlbSA9IGNzc2Bcblx0YWxsOiB1bnNldDtcblxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCA4ICkgfTtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQvKiBPY2N1cHkgdGhlIHdpZHRoIG9mIGFsbCBncmlkIGNvbHVtbnMgKGllLiBmdWxsIHdpZHRoKSAqL1xuXHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogJHsgR1JJRF9URU1QTEFURV9DT0xTIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cblx0QHN1cHBvcnRzICggZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiBzdWJncmlkICkge1xuXHRcdC8qXG5cdFx0ICogRGVmaW5lIGEgZ3JpZCBsYXlvdXQgd2hpY2ggaW5oZXJpdHMgdGhlIHNhbWUgY29sdW1ucyBjb25maWd1cmF0aW9uXG5cdFx0ICogZnJvbSB0aGUgcGFyZW50IGxheW91dCAoaWUuIHN1YmdyaWQpLiBUaGlzIGFsbG93cyB0aGUgbWVudVxuXHRcdCAqIHRvIHN5bmNocm9uaXplIHRoZSBpbmRlbnRhdGlvbiBvZiBhbGwgaXRzIGl0ZW1zLlxuXHRcdCAqL1xuXHRcdGdyaWQtdGVtcGxhdGUtY29sdW1uczogc3ViZ3JpZDtcblx0fVxuXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdGZvbnQtd2VpZ2h0OiBub3JtYWw7XG5cdGxpbmUtaGVpZ2h0OiAyMHB4O1xuXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRwYWRkaW5nLWJsb2NrOiAkeyBJVEVNX1BBRERJTkdfQkxPQ0sgfTtcblx0cGFkZGluZy1pbmxpbmU6ICR7IElURU1fUEFERElOR19JTkxJTkUgfTtcblxuXHQvKlxuXHQgKiBNYWtlIHN1cmUgdGhhdCwgd2hlbiBhbiBpdGVtIGlzIHNjcm9sbGVkIGludG8gdmlldyAoZWcuIHdoaWxlIHVzaW5nIHRoZVxuXHQgKiBrZXlib2FyZCB0byBtb3ZlIGZvY3VzKSwgdGhlIHdob2xlIGl0ZW0gY29tZXMgaW50byB2aWV3XG5cdCAqL1xuXHRzY3JvbGwtbWFyZ2luOiAkeyBDT05URU5UX1dSQVBQRVJfUEFERElORyB9O1xuXG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRvdXRsaW5lOiBub25lO1xuXG5cdCZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLnRleHREaXNhYmxlZCB9O1xuXHRcdGN1cnNvcjogbm90LWFsbG93ZWQ7XG5cdH1cblxuXHQvKiBBY3RpdmUgaXRlbSAoaW5jbHVkaW5nIGhvdmVyKSAqL1xuXHQmW2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKTpub3QoXG5cdFx0XHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddXG5cdFx0KSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblx0fVxuXG5cdC8qIEtleWJvYXJkIGZvY3VzIChmb2N1cy12aXNpYmxlKSAqL1xuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdGJveC1zaGFkb3c6IDAgMCAwIDEuNXB4ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0fVxuXG5cdC8qIEFjdGl2ZSAoaWUuIHByZXNzZWQsIG1vdXNlIGRvd24pICovXG5cdCY6YWN0aXZlLFxuXHQmW2RhdGEtYWN0aXZlXSB7XG5cdFx0LyogVE9ETzogc2hvdWxkIHRoZXJlIGJlIGEgdmlzdWFsIGFjdGl2ZSBzdGF0ZT8gKi9cblx0fVxuXG5cdC8qIFdoZW4gdGhlIGl0ZW0gaXMgdGhlIHRyaWdnZXIgb2YgYW4gb3BlbiBzdWJtZW51ICovXG5cdCR7IE1lbnUgfTpub3QoOmZvY3VzKSAmOm5vdCg6Zm9jdXMpW2FyaWEtZXhwYW5kZWQ9XCJ0cnVlXCJdIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SIH07XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdH1cblxuXHRzdmcge1xuXHRcdGZpbGw6IGN1cnJlbnRDb2xvcjtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW0gKWBcblx0JHsgYmFzZUl0ZW0gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBDaGVja2JveEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW1DaGVja2JveCApYFxuXHQkeyBiYXNlSXRlbSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFJhZGlvSXRlbSA9IHN0eWxlZCggQXJpYWtpdC5NZW51SXRlbVJhZGlvIClgXG5cdCR7IGJhc2VJdGVtIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVByZWZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0LyogQWx3YXlzIG9jY3VweSB0aGUgZmlyc3QgY29sdW1uLCBldmVuIHdoZW4gYXV0by1jb2xsYXBzaW5nICovXG5cdGdyaWQtY29sdW1uOiAxO1xuXG5cdC8qXG5cdCAqIEV2ZW4gd2hlbiB0aGUgaXRlbSBpcyBub3QgY2hlY2tlZCwgb2NjdXB5IHRoZSBzYW1lIHNjcmVlbiBzcGFjZSB0byBhdm9pZFxuXHQgKiB0aGUgc3BhY2UgY29sbGFwc2lkZSB3aGVuIG5vIGl0ZW1zIGFyZSBjaGVja2VkLlxuXHQgKi9cblx0JHsgQ2hlY2tib3hJdGVtIH0gPiAmLFxuXHQkeyBSYWRpb0l0ZW0gfSA+ICYge1xuXHRcdC8qIFNhbWUgd2lkdGggYXMgdGhlIGNoZWNrIGljb25zICovXG5cdFx0bWluLXdpZHRoOiAkeyBzcGFjZSggNiApIH07XG5cdH1cblxuXHQkeyBDaGVja2JveEl0ZW0gfSA+ICYsXG5cdCR7IFJhZGlvSXRlbSB9ID4gJixcblx0Jjpub3QoIDplbXB0eSApIHtcblx0XHRtYXJnaW4taW5saW5lLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHR9XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBhY3RpdmUsIGV4Y2VwdCB3aGVuIGl0J3MgYSBub24tZm9jdXNlZC9ob3ZlcmVkXG5cdCogc3VibWVudSB0cmlnZ2VyIChpbiB0aGF0IGNhc2UsIGNvbG9yIHNob3VsZCBub3QgYmUgaW5oZXJpdGVkKVxuXHQqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApID4gJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddID4gJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ29udGVudFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQvKlxuXHQgKiBBbHdheXMgb2NjdXB5IHRoZSBzZWNvbmQgY29sdW1uLCBzaW5jZSB0aGUgZmlyc3QgY29sdW1uXG5cdCAqIGlzIHRha2VuIGJ5IHRoZSBwcmVmaXggd3JhcHBlciAod2hlbiBkaXNwbGF5ZWQpLlxuXHQgKi9cblx0Z3JpZC1jb2x1bW46IDI7XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRnYXA6ICR7IHNwYWNlKCAzICkgfTtcblxuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ2hpbGRyZW5XcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0ZmxleDogMTtcblxuXHRkaXNwbGF5OiBpbmxpbmUtZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblx0Z2FwOiAkeyBzcGFjZSggMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVN1ZmZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZmxleDogMCAxIGZpdC1jb250ZW50O1xuXHRtaW4td2lkdGg6IDA7XG5cdHdpZHRoOiBmaXQtY29udGVudDtcblxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0Z2FwOiAkeyBzcGFjZSggMyApIH07XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCAqIFdoZW4gdGhlIHBhcmVudCBtZW51IGl0ZW0gaXMgYWN0aXZlLCBleGNlcHQgd2hlbiBpdCdzIGEgbm9uLWZvY3VzZWQvaG92ZXJlZFxuXHQgKiBzdWJtZW51IHRyaWdnZXIgKGluIHRoYXQgY2FzZSwgY29sb3Igc2hvdWxkIG5vdCBiZSBpbmhlcml0ZWQpXG5cdCAqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApICo6bm90KCR7IE1lbnUgfSkgJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICo6bm90KCR7IE1lbnUgfSkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cCA9IHN0eWxlZCggQXJpYWtpdC5NZW51R3JvdXAgKWBcblx0LyogSWdub3JlIHRoaXMgZWxlbWVudCB3aGVuIGNhbGN1bGF0aW5nIHRoZSBsYXlvdXQuIFVzZWZ1bCBmb3Igc3ViZ3JpZCAqL1xuXHRkaXNwbGF5OiBjb250ZW50cztcbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cExhYmVsID0gc3R5bGVkKCBBcmlha2l0Lk1lbnVHcm91cExhYmVsIClgXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0cGFkZGluZy1ibG9jay1zdGFydDogJHsgc3BhY2UoIDMgKSB9O1xuXHRwYWRkaW5nLWJsb2NrLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHRwYWRkaW5nLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFNlcGFyYXRvciA9IHN0eWxlZCggQXJpYWtpdC5NZW51U2VwYXJhdG9yICk8XG5cdFBpY2s8IENvbnRleHRQcm9wcywgJ3ZhcmlhbnQnID5cbj5gXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0Ym9yZGVyOiBub25lO1xuXHRoZWlnaHQ6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9O1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyAoIHByb3BzICkgPT5cblx0XHRwcm9wcy52YXJpYW50ID09PSAndG9vbGJhcidcblx0XHRcdD8gVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUlxuXHRcdFx0OiBESVZJREVSX0NPTE9SIH07XG5cdC8qIEFsaWduIHdpdGggbWVudSBpdGVtcycgY29udGVudCAqL1xuXHRtYXJnaW4tYmxvY2s6ICR7IHNwYWNlKCAyICkgfTtcblx0bWFyZ2luLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuXG5cdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VibWVudUNoZXZyb25JY29uID0gc3R5bGVkKCBJY29uIClgXG5cdHdpZHRoOiAkeyBzcGFjZSggMS41ICkgfTtcblx0JHsgcnRsKFxuXHRcdHtcblx0XHRcdHRyYW5zZm9ybTogYHNjYWxlWCgxKWAsXG5cdFx0fSxcblx0XHR7XG5cdFx0XHR0cmFuc2Zvcm06IGBzY2FsZVgoLTEpYCxcblx0XHR9XG5cdCkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtTGFiZWwgPSBzdHlsZWQoIFRydW5jYXRlIClgXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDIwcHg7XG5cdGNvbG9yOiBpbmhlcml0O1xuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW1IZWxwVGV4dCA9IHN0eWxlZCggVHJ1bmNhdGUgKWBcblx0Zm9udC1zaXplOiAkeyBmb250KCAnaGVscFRleHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDE2cHg7XG5cdGNvbG9yOiAkeyBMSUdIVEVSX1RFWFRfQ09MT1IgfTtcblx0b3ZlcmZsb3ctd3JhcDogYW55d2hlcmU7XG5cblx0W2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKSAqOm5vdCggJHsgTWVudSB9ICkgJixcblx0W2FyaWEtZGlzYWJsZWQ9J3RydWUnXSAqOm5vdCggJHsgTWVudSB9ICkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG4iXX0= */"));
  var ItemPrefixWrapper = /* @__PURE__ */ createStyled("span", false ? {
    target: "e1wg7tti9"
  } : {
    target: "e1wg7tti9",
    label: "ItemPrefixWrapper"
  })("grid-column:1;", CheckboxItem, ">&,", RadioItem, ">&{min-width:", space(6), ";}", CheckboxItem, ">&,", RadioItem, ">&,&:not( :empty ){margin-inline-end:", space(2), ";}display:flex;align-items:center;justify-content:center;color:", LIGHTER_TEXT_COLOR, ";[data-active-item]:not( [data-focus-visible] )>&,[aria-disabled='true']>&{color:inherit;}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUErTTRDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIGZvbnQsIHJ0bCwgQ09ORklHLCBEUk9QRE9XTl9NT1RJT05fQ1NTIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgSWNvbiBmcm9tICcuLi9pY29uJztcbmltcG9ydCB7IFRydW5jYXRlIH0gZnJvbSAnLi4vdHJ1bmNhdGUnO1xuaW1wb3J0IHR5cGUgeyBDb250ZXh0UHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuY29uc3QgQ09OVEVOVF9XUkFQUEVSX1BBRERJTkcgPSBzcGFjZSggMSApO1xuY29uc3QgSVRFTV9QQURESU5HX0JMT0NLID0gc3BhY2UoIDEgKTtcbmNvbnN0IElURU1fUEFERElOR19JTkxJTkUgPSBzcGFjZSggMyApO1xuXG4vLyBUT0RPOlxuLy8gLSBib3JkZXIgY29sb3IgYW5kIGRpdmlkZXIgY29sb3IgYXJlIGRpZmZlcmVudCBmcm9tIENPTE9SUy50aGVtZSB2YXJpYWJsZXNcbi8vIC0gbGlnaHRlciB0ZXh0IGNvbG9yIGlzIG5vdCBkZWZpbmVkIGluIENPTE9SUy50aGVtZSwgc2hvdWxkIGl0IGJlP1xuLy8gLSBsaWdodGVyIGJhY2tncm91bmQgY29sb3IgaXMgbm90IGRlZmluZWQgaW4gQ09MT1JTLnRoZW1lLCBzaG91bGQgaXQgYmU/XG5jb25zdCBERUZBVUxUX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXTtcbmNvbnN0IERJVklERVJfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgMjAwIF07XG5jb25zdCBMSUdIVEVSX1RFWFRfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF07XG5jb25zdCBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SID0gQ09MT1JTLnRoZW1lLmdyYXlbIDEwMCBdO1xuY29uc3QgVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kO1xuY29uc3QgREVGQVVMVF9CT1hfU0hBRE9XID0gYDAgMCAwICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9ICR7IERFRkFVTFRfQk9SREVSX0NPTE9SIH0sICR7IENPTkZJRy5lbGV2YXRpb25NZWRpdW0gfWA7XG5jb25zdCBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPVyA9IGAwIDAgMCAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSAkeyBUT09MQkFSX1ZBUklBTlRfQk9SREVSX0NPTE9SIH1gO1xuXG5jb25zdCBHUklEX1RFTVBMQVRFX0NPTFMgPSAnbWlubWF4KCAwLCBtYXgtY29udGVudCApIDFmcic7XG5cbmV4cG9ydCBjb25zdCBNZW51ID0gc3R5bGVkKCBBcmlha2l0Lk1lbnUgKTwgUGljazwgQ29udGV4dFByb3BzLCAndmFyaWFudCcgPiA+YFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdC8qIFNhbWUgYXMgcG9wb3ZlciBjb21wb25lbnQgKi9cblx0LyogVE9ETzogaXMgdGhlcmUgYSB3YXkgdG8gcmVhZCB0aGUgc2FzcyB2YXJpYWJsZT8gKi9cblx0ei1pbmRleDogMTAwMDAwMDtcblxuXHRkaXNwbGF5OiBncmlkO1xuXHRncmlkLXRlbXBsYXRlLWNvbHVtbnM6ICR7IEdSSURfVEVNUExBVEVfQ09MUyB9O1xuXHRncmlkLXRlbXBsYXRlLXJvd3M6IGF1dG87XG5cblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0bWluLXdpZHRoOiAxNjBweDtcblx0bWF4LXdpZHRoOiAzMjBweDtcblx0bWF4LWhlaWdodDogdmFyKCAtLXBvcG92ZXItYXZhaWxhYmxlLWhlaWdodCApO1xuXG5cdHBhZGRpbmc6ICR7IENPTlRFTlRfV1JBUFBFUl9QQURESU5HIH07XG5cblx0b3ZlcnNjcm9sbC1iZWhhdmlvcjogY29udGFpbjtcblx0b3ZlcmZsb3c6IGF1dG87XG5cblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c01lZGl1bSB9O1xuXHQkeyAoIHByb3BzICkgPT4gY3NzYFxuXHRcdGJveC1zaGFkb3c6ICR7IHByb3BzLnZhcmlhbnQgPT09ICd0b29sYmFyJ1xuXHRcdFx0PyBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPV1xuXHRcdFx0OiBERUZBVUxUX0JPWF9TSEFET1cgfTtcblx0YCB9XG5cblx0LyogT25seSB2aXNpYmxlIGluIFdpbmRvd3MgSGlnaCBDb250cmFzdCBtb2RlICovXG5cdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudCAhaW1wb3J0YW50O1xuXG5cdC8qIE9wZW4vY2xvc2UgYW5pbWF0aW9uICovXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdHRyYW5zaXRpb24tcHJvcGVydHk6IHRyYW5zZm9ybSwgb3BhY2l0eTtcblx0XHR0cmFuc2l0aW9uLWR1cmF0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RVUkFUSU9OIH0sXG5cdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLkZBREVfRFVSQVRJT04gfTtcblx0XHR0cmFuc2l0aW9uLXRpbWluZy1mdW5jdGlvbjogJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9FQVNJTkcgfSxcblx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9FQVNJTkcgfTtcblx0XHR3aWxsLWNoYW5nZTogdHJhbnNmb3JtLCBvcGFjaXR5O1xuXG5cdFx0Jjpub3QoIFtkYXRhLXN1Ym1lbnVdICkge1xuXHRcdFx0LyogUmVnYXJkbGVzcyBvZiB0aGUgc2lkZSwgZmFkZSBpbiBhbmQgb3V0LiAqL1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHRcdCZbZGF0YS1lbnRlcl0ge1xuXHRcdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0fVxuXG5cdFx0XHQvKiBTbGlkZSBpbiB0aGUgZGlyZWN0aW9uIHRoZSBtZW51IGlzIG9wZW5pbmcuICovXG5cdFx0XHQmW2RhdGEtc2lkZT0nYm90dG9tJ10ge1xuXHRcdFx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoXG5cdFx0XHRcdFx0LSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J3RvcCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVZKFxuXHRcdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J2xlZnQnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWChcblx0XHRcdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKFxuXHRcdFx0XHRcdC0keyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdib3R0b20nXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSd0b3AnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWSggMCApO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLWVudGVyXVtkYXRhLXNpZGU9J2xlZnQnXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKCAwICk7XG5cdFx0XHR9XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBiYXNlSXRlbSA9IGNzc2Bcblx0YWxsOiB1bnNldDtcblxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCA4ICkgfTtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQvKiBPY2N1cHkgdGhlIHdpZHRoIG9mIGFsbCBncmlkIGNvbHVtbnMgKGllLiBmdWxsIHdpZHRoKSAqL1xuXHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogJHsgR1JJRF9URU1QTEFURV9DT0xTIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cblx0QHN1cHBvcnRzICggZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiBzdWJncmlkICkge1xuXHRcdC8qXG5cdFx0ICogRGVmaW5lIGEgZ3JpZCBsYXlvdXQgd2hpY2ggaW5oZXJpdHMgdGhlIHNhbWUgY29sdW1ucyBjb25maWd1cmF0aW9uXG5cdFx0ICogZnJvbSB0aGUgcGFyZW50IGxheW91dCAoaWUuIHN1YmdyaWQpLiBUaGlzIGFsbG93cyB0aGUgbWVudVxuXHRcdCAqIHRvIHN5bmNocm9uaXplIHRoZSBpbmRlbnRhdGlvbiBvZiBhbGwgaXRzIGl0ZW1zLlxuXHRcdCAqL1xuXHRcdGdyaWQtdGVtcGxhdGUtY29sdW1uczogc3ViZ3JpZDtcblx0fVxuXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdGZvbnQtd2VpZ2h0OiBub3JtYWw7XG5cdGxpbmUtaGVpZ2h0OiAyMHB4O1xuXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRwYWRkaW5nLWJsb2NrOiAkeyBJVEVNX1BBRERJTkdfQkxPQ0sgfTtcblx0cGFkZGluZy1pbmxpbmU6ICR7IElURU1fUEFERElOR19JTkxJTkUgfTtcblxuXHQvKlxuXHQgKiBNYWtlIHN1cmUgdGhhdCwgd2hlbiBhbiBpdGVtIGlzIHNjcm9sbGVkIGludG8gdmlldyAoZWcuIHdoaWxlIHVzaW5nIHRoZVxuXHQgKiBrZXlib2FyZCB0byBtb3ZlIGZvY3VzKSwgdGhlIHdob2xlIGl0ZW0gY29tZXMgaW50byB2aWV3XG5cdCAqL1xuXHRzY3JvbGwtbWFyZ2luOiAkeyBDT05URU5UX1dSQVBQRVJfUEFERElORyB9O1xuXG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRvdXRsaW5lOiBub25lO1xuXG5cdCZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLnRleHREaXNhYmxlZCB9O1xuXHRcdGN1cnNvcjogbm90LWFsbG93ZWQ7XG5cdH1cblxuXHQvKiBBY3RpdmUgaXRlbSAoaW5jbHVkaW5nIGhvdmVyKSAqL1xuXHQmW2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKTpub3QoXG5cdFx0XHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddXG5cdFx0KSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblx0fVxuXG5cdC8qIEtleWJvYXJkIGZvY3VzIChmb2N1cy12aXNpYmxlKSAqL1xuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdGJveC1zaGFkb3c6IDAgMCAwIDEuNXB4ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0fVxuXG5cdC8qIEFjdGl2ZSAoaWUuIHByZXNzZWQsIG1vdXNlIGRvd24pICovXG5cdCY6YWN0aXZlLFxuXHQmW2RhdGEtYWN0aXZlXSB7XG5cdFx0LyogVE9ETzogc2hvdWxkIHRoZXJlIGJlIGEgdmlzdWFsIGFjdGl2ZSBzdGF0ZT8gKi9cblx0fVxuXG5cdC8qIFdoZW4gdGhlIGl0ZW0gaXMgdGhlIHRyaWdnZXIgb2YgYW4gb3BlbiBzdWJtZW51ICovXG5cdCR7IE1lbnUgfTpub3QoOmZvY3VzKSAmOm5vdCg6Zm9jdXMpW2FyaWEtZXhwYW5kZWQ9XCJ0cnVlXCJdIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SIH07XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdH1cblxuXHRzdmcge1xuXHRcdGZpbGw6IGN1cnJlbnRDb2xvcjtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW0gKWBcblx0JHsgYmFzZUl0ZW0gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBDaGVja2JveEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW1DaGVja2JveCApYFxuXHQkeyBiYXNlSXRlbSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFJhZGlvSXRlbSA9IHN0eWxlZCggQXJpYWtpdC5NZW51SXRlbVJhZGlvIClgXG5cdCR7IGJhc2VJdGVtIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVByZWZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0LyogQWx3YXlzIG9jY3VweSB0aGUgZmlyc3QgY29sdW1uLCBldmVuIHdoZW4gYXV0by1jb2xsYXBzaW5nICovXG5cdGdyaWQtY29sdW1uOiAxO1xuXG5cdC8qXG5cdCAqIEV2ZW4gd2hlbiB0aGUgaXRlbSBpcyBub3QgY2hlY2tlZCwgb2NjdXB5IHRoZSBzYW1lIHNjcmVlbiBzcGFjZSB0byBhdm9pZFxuXHQgKiB0aGUgc3BhY2UgY29sbGFwc2lkZSB3aGVuIG5vIGl0ZW1zIGFyZSBjaGVja2VkLlxuXHQgKi9cblx0JHsgQ2hlY2tib3hJdGVtIH0gPiAmLFxuXHQkeyBSYWRpb0l0ZW0gfSA+ICYge1xuXHRcdC8qIFNhbWUgd2lkdGggYXMgdGhlIGNoZWNrIGljb25zICovXG5cdFx0bWluLXdpZHRoOiAkeyBzcGFjZSggNiApIH07XG5cdH1cblxuXHQkeyBDaGVja2JveEl0ZW0gfSA+ICYsXG5cdCR7IFJhZGlvSXRlbSB9ID4gJixcblx0Jjpub3QoIDplbXB0eSApIHtcblx0XHRtYXJnaW4taW5saW5lLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHR9XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBhY3RpdmUsIGV4Y2VwdCB3aGVuIGl0J3MgYSBub24tZm9jdXNlZC9ob3ZlcmVkXG5cdCogc3VibWVudSB0cmlnZ2VyIChpbiB0aGF0IGNhc2UsIGNvbG9yIHNob3VsZCBub3QgYmUgaW5oZXJpdGVkKVxuXHQqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApID4gJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddID4gJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ29udGVudFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQvKlxuXHQgKiBBbHdheXMgb2NjdXB5IHRoZSBzZWNvbmQgY29sdW1uLCBzaW5jZSB0aGUgZmlyc3QgY29sdW1uXG5cdCAqIGlzIHRha2VuIGJ5IHRoZSBwcmVmaXggd3JhcHBlciAod2hlbiBkaXNwbGF5ZWQpLlxuXHQgKi9cblx0Z3JpZC1jb2x1bW46IDI7XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRnYXA6ICR7IHNwYWNlKCAzICkgfTtcblxuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ2hpbGRyZW5XcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0ZmxleDogMTtcblxuXHRkaXNwbGF5OiBpbmxpbmUtZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblx0Z2FwOiAkeyBzcGFjZSggMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVN1ZmZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZmxleDogMCAxIGZpdC1jb250ZW50O1xuXHRtaW4td2lkdGg6IDA7XG5cdHdpZHRoOiBmaXQtY29udGVudDtcblxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0Z2FwOiAkeyBzcGFjZSggMyApIH07XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCAqIFdoZW4gdGhlIHBhcmVudCBtZW51IGl0ZW0gaXMgYWN0aXZlLCBleGNlcHQgd2hlbiBpdCdzIGEgbm9uLWZvY3VzZWQvaG92ZXJlZFxuXHQgKiBzdWJtZW51IHRyaWdnZXIgKGluIHRoYXQgY2FzZSwgY29sb3Igc2hvdWxkIG5vdCBiZSBpbmhlcml0ZWQpXG5cdCAqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApICo6bm90KCR7IE1lbnUgfSkgJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICo6bm90KCR7IE1lbnUgfSkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cCA9IHN0eWxlZCggQXJpYWtpdC5NZW51R3JvdXAgKWBcblx0LyogSWdub3JlIHRoaXMgZWxlbWVudCB3aGVuIGNhbGN1bGF0aW5nIHRoZSBsYXlvdXQuIFVzZWZ1bCBmb3Igc3ViZ3JpZCAqL1xuXHRkaXNwbGF5OiBjb250ZW50cztcbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cExhYmVsID0gc3R5bGVkKCBBcmlha2l0Lk1lbnVHcm91cExhYmVsIClgXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0cGFkZGluZy1ibG9jay1zdGFydDogJHsgc3BhY2UoIDMgKSB9O1xuXHRwYWRkaW5nLWJsb2NrLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHRwYWRkaW5nLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFNlcGFyYXRvciA9IHN0eWxlZCggQXJpYWtpdC5NZW51U2VwYXJhdG9yICk8XG5cdFBpY2s8IENvbnRleHRQcm9wcywgJ3ZhcmlhbnQnID5cbj5gXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0Ym9yZGVyOiBub25lO1xuXHRoZWlnaHQ6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9O1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyAoIHByb3BzICkgPT5cblx0XHRwcm9wcy52YXJpYW50ID09PSAndG9vbGJhcidcblx0XHRcdD8gVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUlxuXHRcdFx0OiBESVZJREVSX0NPTE9SIH07XG5cdC8qIEFsaWduIHdpdGggbWVudSBpdGVtcycgY29udGVudCAqL1xuXHRtYXJnaW4tYmxvY2s6ICR7IHNwYWNlKCAyICkgfTtcblx0bWFyZ2luLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuXG5cdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VibWVudUNoZXZyb25JY29uID0gc3R5bGVkKCBJY29uIClgXG5cdHdpZHRoOiAkeyBzcGFjZSggMS41ICkgfTtcblx0JHsgcnRsKFxuXHRcdHtcblx0XHRcdHRyYW5zZm9ybTogYHNjYWxlWCgxKWAsXG5cdFx0fSxcblx0XHR7XG5cdFx0XHR0cmFuc2Zvcm06IGBzY2FsZVgoLTEpYCxcblx0XHR9XG5cdCkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtTGFiZWwgPSBzdHlsZWQoIFRydW5jYXRlIClgXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDIwcHg7XG5cdGNvbG9yOiBpbmhlcml0O1xuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW1IZWxwVGV4dCA9IHN0eWxlZCggVHJ1bmNhdGUgKWBcblx0Zm9udC1zaXplOiAkeyBmb250KCAnaGVscFRleHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDE2cHg7XG5cdGNvbG9yOiAkeyBMSUdIVEVSX1RFWFRfQ09MT1IgfTtcblx0b3ZlcmZsb3ctd3JhcDogYW55d2hlcmU7XG5cblx0W2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKSAqOm5vdCggJHsgTWVudSB9ICkgJixcblx0W2FyaWEtZGlzYWJsZWQ9J3RydWUnXSAqOm5vdCggJHsgTWVudSB9ICkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG4iXX0= */"));
  var ItemContentWrapper = /* @__PURE__ */ createStyled("div", false ? {
    target: "e1wg7tti8"
  } : {
    target: "e1wg7tti8",
    label: "ItemContentWrapper"
  })("grid-column:2;display:flex;align-items:center;justify-content:space-between;gap:", space(3), ";pointer-events:none;" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvUDRDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIGZvbnQsIHJ0bCwgQ09ORklHLCBEUk9QRE9XTl9NT1RJT05fQ1NTIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgSWNvbiBmcm9tICcuLi9pY29uJztcbmltcG9ydCB7IFRydW5jYXRlIH0gZnJvbSAnLi4vdHJ1bmNhdGUnO1xuaW1wb3J0IHR5cGUgeyBDb250ZXh0UHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuY29uc3QgQ09OVEVOVF9XUkFQUEVSX1BBRERJTkcgPSBzcGFjZSggMSApO1xuY29uc3QgSVRFTV9QQURESU5HX0JMT0NLID0gc3BhY2UoIDEgKTtcbmNvbnN0IElURU1fUEFERElOR19JTkxJTkUgPSBzcGFjZSggMyApO1xuXG4vLyBUT0RPOlxuLy8gLSBib3JkZXIgY29sb3IgYW5kIGRpdmlkZXIgY29sb3IgYXJlIGRpZmZlcmVudCBmcm9tIENPTE9SUy50aGVtZSB2YXJpYWJsZXNcbi8vIC0gbGlnaHRlciB0ZXh0IGNvbG9yIGlzIG5vdCBkZWZpbmVkIGluIENPTE9SUy50aGVtZSwgc2hvdWxkIGl0IGJlP1xuLy8gLSBsaWdodGVyIGJhY2tncm91bmQgY29sb3IgaXMgbm90IGRlZmluZWQgaW4gQ09MT1JTLnRoZW1lLCBzaG91bGQgaXQgYmU/XG5jb25zdCBERUZBVUxUX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXTtcbmNvbnN0IERJVklERVJfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgMjAwIF07XG5jb25zdCBMSUdIVEVSX1RFWFRfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF07XG5jb25zdCBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SID0gQ09MT1JTLnRoZW1lLmdyYXlbIDEwMCBdO1xuY29uc3QgVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kO1xuY29uc3QgREVGQVVMVF9CT1hfU0hBRE9XID0gYDAgMCAwICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9ICR7IERFRkFVTFRfQk9SREVSX0NPTE9SIH0sICR7IENPTkZJRy5lbGV2YXRpb25NZWRpdW0gfWA7XG5jb25zdCBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPVyA9IGAwIDAgMCAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSAkeyBUT09MQkFSX1ZBUklBTlRfQk9SREVSX0NPTE9SIH1gO1xuXG5jb25zdCBHUklEX1RFTVBMQVRFX0NPTFMgPSAnbWlubWF4KCAwLCBtYXgtY29udGVudCApIDFmcic7XG5cbmV4cG9ydCBjb25zdCBNZW51ID0gc3R5bGVkKCBBcmlha2l0Lk1lbnUgKTwgUGljazwgQ29udGV4dFByb3BzLCAndmFyaWFudCcgPiA+YFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdC8qIFNhbWUgYXMgcG9wb3ZlciBjb21wb25lbnQgKi9cblx0LyogVE9ETzogaXMgdGhlcmUgYSB3YXkgdG8gcmVhZCB0aGUgc2FzcyB2YXJpYWJsZT8gKi9cblx0ei1pbmRleDogMTAwMDAwMDtcblxuXHRkaXNwbGF5OiBncmlkO1xuXHRncmlkLXRlbXBsYXRlLWNvbHVtbnM6ICR7IEdSSURfVEVNUExBVEVfQ09MUyB9O1xuXHRncmlkLXRlbXBsYXRlLXJvd3M6IGF1dG87XG5cblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0bWluLXdpZHRoOiAxNjBweDtcblx0bWF4LXdpZHRoOiAzMjBweDtcblx0bWF4LWhlaWdodDogdmFyKCAtLXBvcG92ZXItYXZhaWxhYmxlLWhlaWdodCApO1xuXG5cdHBhZGRpbmc6ICR7IENPTlRFTlRfV1JBUFBFUl9QQURESU5HIH07XG5cblx0b3ZlcnNjcm9sbC1iZWhhdmlvcjogY29udGFpbjtcblx0b3ZlcmZsb3c6IGF1dG87XG5cblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c01lZGl1bSB9O1xuXHQkeyAoIHByb3BzICkgPT4gY3NzYFxuXHRcdGJveC1zaGFkb3c6ICR7IHByb3BzLnZhcmlhbnQgPT09ICd0b29sYmFyJ1xuXHRcdFx0PyBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPV1xuXHRcdFx0OiBERUZBVUxUX0JPWF9TSEFET1cgfTtcblx0YCB9XG5cblx0LyogT25seSB2aXNpYmxlIGluIFdpbmRvd3MgSGlnaCBDb250cmFzdCBtb2RlICovXG5cdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudCAhaW1wb3J0YW50O1xuXG5cdC8qIE9wZW4vY2xvc2UgYW5pbWF0aW9uICovXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdHRyYW5zaXRpb24tcHJvcGVydHk6IHRyYW5zZm9ybSwgb3BhY2l0eTtcblx0XHR0cmFuc2l0aW9uLWR1cmF0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RVUkFUSU9OIH0sXG5cdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLkZBREVfRFVSQVRJT04gfTtcblx0XHR0cmFuc2l0aW9uLXRpbWluZy1mdW5jdGlvbjogJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9FQVNJTkcgfSxcblx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9FQVNJTkcgfTtcblx0XHR3aWxsLWNoYW5nZTogdHJhbnNmb3JtLCBvcGFjaXR5O1xuXG5cdFx0Jjpub3QoIFtkYXRhLXN1Ym1lbnVdICkge1xuXHRcdFx0LyogUmVnYXJkbGVzcyBvZiB0aGUgc2lkZSwgZmFkZSBpbiBhbmQgb3V0LiAqL1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHRcdCZbZGF0YS1lbnRlcl0ge1xuXHRcdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0fVxuXG5cdFx0XHQvKiBTbGlkZSBpbiB0aGUgZGlyZWN0aW9uIHRoZSBtZW51IGlzIG9wZW5pbmcuICovXG5cdFx0XHQmW2RhdGEtc2lkZT0nYm90dG9tJ10ge1xuXHRcdFx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoXG5cdFx0XHRcdFx0LSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J3RvcCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVZKFxuXHRcdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J2xlZnQnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWChcblx0XHRcdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKFxuXHRcdFx0XHRcdC0keyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdib3R0b20nXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSd0b3AnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWSggMCApO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLWVudGVyXVtkYXRhLXNpZGU9J2xlZnQnXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKCAwICk7XG5cdFx0XHR9XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBiYXNlSXRlbSA9IGNzc2Bcblx0YWxsOiB1bnNldDtcblxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCA4ICkgfTtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQvKiBPY2N1cHkgdGhlIHdpZHRoIG9mIGFsbCBncmlkIGNvbHVtbnMgKGllLiBmdWxsIHdpZHRoKSAqL1xuXHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogJHsgR1JJRF9URU1QTEFURV9DT0xTIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cblx0QHN1cHBvcnRzICggZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiBzdWJncmlkICkge1xuXHRcdC8qXG5cdFx0ICogRGVmaW5lIGEgZ3JpZCBsYXlvdXQgd2hpY2ggaW5oZXJpdHMgdGhlIHNhbWUgY29sdW1ucyBjb25maWd1cmF0aW9uXG5cdFx0ICogZnJvbSB0aGUgcGFyZW50IGxheW91dCAoaWUuIHN1YmdyaWQpLiBUaGlzIGFsbG93cyB0aGUgbWVudVxuXHRcdCAqIHRvIHN5bmNocm9uaXplIHRoZSBpbmRlbnRhdGlvbiBvZiBhbGwgaXRzIGl0ZW1zLlxuXHRcdCAqL1xuXHRcdGdyaWQtdGVtcGxhdGUtY29sdW1uczogc3ViZ3JpZDtcblx0fVxuXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdGZvbnQtd2VpZ2h0OiBub3JtYWw7XG5cdGxpbmUtaGVpZ2h0OiAyMHB4O1xuXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRwYWRkaW5nLWJsb2NrOiAkeyBJVEVNX1BBRERJTkdfQkxPQ0sgfTtcblx0cGFkZGluZy1pbmxpbmU6ICR7IElURU1fUEFERElOR19JTkxJTkUgfTtcblxuXHQvKlxuXHQgKiBNYWtlIHN1cmUgdGhhdCwgd2hlbiBhbiBpdGVtIGlzIHNjcm9sbGVkIGludG8gdmlldyAoZWcuIHdoaWxlIHVzaW5nIHRoZVxuXHQgKiBrZXlib2FyZCB0byBtb3ZlIGZvY3VzKSwgdGhlIHdob2xlIGl0ZW0gY29tZXMgaW50byB2aWV3XG5cdCAqL1xuXHRzY3JvbGwtbWFyZ2luOiAkeyBDT05URU5UX1dSQVBQRVJfUEFERElORyB9O1xuXG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRvdXRsaW5lOiBub25lO1xuXG5cdCZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLnRleHREaXNhYmxlZCB9O1xuXHRcdGN1cnNvcjogbm90LWFsbG93ZWQ7XG5cdH1cblxuXHQvKiBBY3RpdmUgaXRlbSAoaW5jbHVkaW5nIGhvdmVyKSAqL1xuXHQmW2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKTpub3QoXG5cdFx0XHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddXG5cdFx0KSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblx0fVxuXG5cdC8qIEtleWJvYXJkIGZvY3VzIChmb2N1cy12aXNpYmxlKSAqL1xuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdGJveC1zaGFkb3c6IDAgMCAwIDEuNXB4ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0fVxuXG5cdC8qIEFjdGl2ZSAoaWUuIHByZXNzZWQsIG1vdXNlIGRvd24pICovXG5cdCY6YWN0aXZlLFxuXHQmW2RhdGEtYWN0aXZlXSB7XG5cdFx0LyogVE9ETzogc2hvdWxkIHRoZXJlIGJlIGEgdmlzdWFsIGFjdGl2ZSBzdGF0ZT8gKi9cblx0fVxuXG5cdC8qIFdoZW4gdGhlIGl0ZW0gaXMgdGhlIHRyaWdnZXIgb2YgYW4gb3BlbiBzdWJtZW51ICovXG5cdCR7IE1lbnUgfTpub3QoOmZvY3VzKSAmOm5vdCg6Zm9jdXMpW2FyaWEtZXhwYW5kZWQ9XCJ0cnVlXCJdIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SIH07XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdH1cblxuXHRzdmcge1xuXHRcdGZpbGw6IGN1cnJlbnRDb2xvcjtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW0gKWBcblx0JHsgYmFzZUl0ZW0gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBDaGVja2JveEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW1DaGVja2JveCApYFxuXHQkeyBiYXNlSXRlbSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFJhZGlvSXRlbSA9IHN0eWxlZCggQXJpYWtpdC5NZW51SXRlbVJhZGlvIClgXG5cdCR7IGJhc2VJdGVtIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVByZWZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0LyogQWx3YXlzIG9jY3VweSB0aGUgZmlyc3QgY29sdW1uLCBldmVuIHdoZW4gYXV0by1jb2xsYXBzaW5nICovXG5cdGdyaWQtY29sdW1uOiAxO1xuXG5cdC8qXG5cdCAqIEV2ZW4gd2hlbiB0aGUgaXRlbSBpcyBub3QgY2hlY2tlZCwgb2NjdXB5IHRoZSBzYW1lIHNjcmVlbiBzcGFjZSB0byBhdm9pZFxuXHQgKiB0aGUgc3BhY2UgY29sbGFwc2lkZSB3aGVuIG5vIGl0ZW1zIGFyZSBjaGVja2VkLlxuXHQgKi9cblx0JHsgQ2hlY2tib3hJdGVtIH0gPiAmLFxuXHQkeyBSYWRpb0l0ZW0gfSA+ICYge1xuXHRcdC8qIFNhbWUgd2lkdGggYXMgdGhlIGNoZWNrIGljb25zICovXG5cdFx0bWluLXdpZHRoOiAkeyBzcGFjZSggNiApIH07XG5cdH1cblxuXHQkeyBDaGVja2JveEl0ZW0gfSA+ICYsXG5cdCR7IFJhZGlvSXRlbSB9ID4gJixcblx0Jjpub3QoIDplbXB0eSApIHtcblx0XHRtYXJnaW4taW5saW5lLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHR9XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBhY3RpdmUsIGV4Y2VwdCB3aGVuIGl0J3MgYSBub24tZm9jdXNlZC9ob3ZlcmVkXG5cdCogc3VibWVudSB0cmlnZ2VyIChpbiB0aGF0IGNhc2UsIGNvbG9yIHNob3VsZCBub3QgYmUgaW5oZXJpdGVkKVxuXHQqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApID4gJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddID4gJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ29udGVudFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQvKlxuXHQgKiBBbHdheXMgb2NjdXB5IHRoZSBzZWNvbmQgY29sdW1uLCBzaW5jZSB0aGUgZmlyc3QgY29sdW1uXG5cdCAqIGlzIHRha2VuIGJ5IHRoZSBwcmVmaXggd3JhcHBlciAod2hlbiBkaXNwbGF5ZWQpLlxuXHQgKi9cblx0Z3JpZC1jb2x1bW46IDI7XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRnYXA6ICR7IHNwYWNlKCAzICkgfTtcblxuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ2hpbGRyZW5XcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0ZmxleDogMTtcblxuXHRkaXNwbGF5OiBpbmxpbmUtZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblx0Z2FwOiAkeyBzcGFjZSggMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVN1ZmZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZmxleDogMCAxIGZpdC1jb250ZW50O1xuXHRtaW4td2lkdGg6IDA7XG5cdHdpZHRoOiBmaXQtY29udGVudDtcblxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0Z2FwOiAkeyBzcGFjZSggMyApIH07XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCAqIFdoZW4gdGhlIHBhcmVudCBtZW51IGl0ZW0gaXMgYWN0aXZlLCBleGNlcHQgd2hlbiBpdCdzIGEgbm9uLWZvY3VzZWQvaG92ZXJlZFxuXHQgKiBzdWJtZW51IHRyaWdnZXIgKGluIHRoYXQgY2FzZSwgY29sb3Igc2hvdWxkIG5vdCBiZSBpbmhlcml0ZWQpXG5cdCAqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApICo6bm90KCR7IE1lbnUgfSkgJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICo6bm90KCR7IE1lbnUgfSkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cCA9IHN0eWxlZCggQXJpYWtpdC5NZW51R3JvdXAgKWBcblx0LyogSWdub3JlIHRoaXMgZWxlbWVudCB3aGVuIGNhbGN1bGF0aW5nIHRoZSBsYXlvdXQuIFVzZWZ1bCBmb3Igc3ViZ3JpZCAqL1xuXHRkaXNwbGF5OiBjb250ZW50cztcbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cExhYmVsID0gc3R5bGVkKCBBcmlha2l0Lk1lbnVHcm91cExhYmVsIClgXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0cGFkZGluZy1ibG9jay1zdGFydDogJHsgc3BhY2UoIDMgKSB9O1xuXHRwYWRkaW5nLWJsb2NrLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHRwYWRkaW5nLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFNlcGFyYXRvciA9IHN0eWxlZCggQXJpYWtpdC5NZW51U2VwYXJhdG9yICk8XG5cdFBpY2s8IENvbnRleHRQcm9wcywgJ3ZhcmlhbnQnID5cbj5gXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0Ym9yZGVyOiBub25lO1xuXHRoZWlnaHQ6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9O1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyAoIHByb3BzICkgPT5cblx0XHRwcm9wcy52YXJpYW50ID09PSAndG9vbGJhcidcblx0XHRcdD8gVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUlxuXHRcdFx0OiBESVZJREVSX0NPTE9SIH07XG5cdC8qIEFsaWduIHdpdGggbWVudSBpdGVtcycgY29udGVudCAqL1xuXHRtYXJnaW4tYmxvY2s6ICR7IHNwYWNlKCAyICkgfTtcblx0bWFyZ2luLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuXG5cdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VibWVudUNoZXZyb25JY29uID0gc3R5bGVkKCBJY29uIClgXG5cdHdpZHRoOiAkeyBzcGFjZSggMS41ICkgfTtcblx0JHsgcnRsKFxuXHRcdHtcblx0XHRcdHRyYW5zZm9ybTogYHNjYWxlWCgxKWAsXG5cdFx0fSxcblx0XHR7XG5cdFx0XHR0cmFuc2Zvcm06IGBzY2FsZVgoLTEpYCxcblx0XHR9XG5cdCkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtTGFiZWwgPSBzdHlsZWQoIFRydW5jYXRlIClgXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDIwcHg7XG5cdGNvbG9yOiBpbmhlcml0O1xuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW1IZWxwVGV4dCA9IHN0eWxlZCggVHJ1bmNhdGUgKWBcblx0Zm9udC1zaXplOiAkeyBmb250KCAnaGVscFRleHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDE2cHg7XG5cdGNvbG9yOiAkeyBMSUdIVEVSX1RFWFRfQ09MT1IgfTtcblx0b3ZlcmZsb3ctd3JhcDogYW55d2hlcmU7XG5cblx0W2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKSAqOm5vdCggJHsgTWVudSB9ICkgJixcblx0W2FyaWEtZGlzYWJsZWQ9J3RydWUnXSAqOm5vdCggJHsgTWVudSB9ICkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG4iXX0= */"));
  var ItemChildrenWrapper = /* @__PURE__ */ createStyled("div", false ? {
    target: "e1wg7tti7"
  } : {
    target: "e1wg7tti7",
    label: "ItemChildrenWrapper"
  })("flex:1;display:inline-flex;flex-direction:column;gap:", space(1), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtUTZDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIGZvbnQsIHJ0bCwgQ09ORklHLCBEUk9QRE9XTl9NT1RJT05fQ1NTIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgSWNvbiBmcm9tICcuLi9pY29uJztcbmltcG9ydCB7IFRydW5jYXRlIH0gZnJvbSAnLi4vdHJ1bmNhdGUnO1xuaW1wb3J0IHR5cGUgeyBDb250ZXh0UHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuY29uc3QgQ09OVEVOVF9XUkFQUEVSX1BBRERJTkcgPSBzcGFjZSggMSApO1xuY29uc3QgSVRFTV9QQURESU5HX0JMT0NLID0gc3BhY2UoIDEgKTtcbmNvbnN0IElURU1fUEFERElOR19JTkxJTkUgPSBzcGFjZSggMyApO1xuXG4vLyBUT0RPOlxuLy8gLSBib3JkZXIgY29sb3IgYW5kIGRpdmlkZXIgY29sb3IgYXJlIGRpZmZlcmVudCBmcm9tIENPTE9SUy50aGVtZSB2YXJpYWJsZXNcbi8vIC0gbGlnaHRlciB0ZXh0IGNvbG9yIGlzIG5vdCBkZWZpbmVkIGluIENPTE9SUy50aGVtZSwgc2hvdWxkIGl0IGJlP1xuLy8gLSBsaWdodGVyIGJhY2tncm91bmQgY29sb3IgaXMgbm90IGRlZmluZWQgaW4gQ09MT1JTLnRoZW1lLCBzaG91bGQgaXQgYmU/XG5jb25zdCBERUZBVUxUX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXTtcbmNvbnN0IERJVklERVJfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgMjAwIF07XG5jb25zdCBMSUdIVEVSX1RFWFRfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF07XG5jb25zdCBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SID0gQ09MT1JTLnRoZW1lLmdyYXlbIDEwMCBdO1xuY29uc3QgVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kO1xuY29uc3QgREVGQVVMVF9CT1hfU0hBRE9XID0gYDAgMCAwICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9ICR7IERFRkFVTFRfQk9SREVSX0NPTE9SIH0sICR7IENPTkZJRy5lbGV2YXRpb25NZWRpdW0gfWA7XG5jb25zdCBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPVyA9IGAwIDAgMCAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSAkeyBUT09MQkFSX1ZBUklBTlRfQk9SREVSX0NPTE9SIH1gO1xuXG5jb25zdCBHUklEX1RFTVBMQVRFX0NPTFMgPSAnbWlubWF4KCAwLCBtYXgtY29udGVudCApIDFmcic7XG5cbmV4cG9ydCBjb25zdCBNZW51ID0gc3R5bGVkKCBBcmlha2l0Lk1lbnUgKTwgUGljazwgQ29udGV4dFByb3BzLCAndmFyaWFudCcgPiA+YFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdC8qIFNhbWUgYXMgcG9wb3ZlciBjb21wb25lbnQgKi9cblx0LyogVE9ETzogaXMgdGhlcmUgYSB3YXkgdG8gcmVhZCB0aGUgc2FzcyB2YXJpYWJsZT8gKi9cblx0ei1pbmRleDogMTAwMDAwMDtcblxuXHRkaXNwbGF5OiBncmlkO1xuXHRncmlkLXRlbXBsYXRlLWNvbHVtbnM6ICR7IEdSSURfVEVNUExBVEVfQ09MUyB9O1xuXHRncmlkLXRlbXBsYXRlLXJvd3M6IGF1dG87XG5cblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0bWluLXdpZHRoOiAxNjBweDtcblx0bWF4LXdpZHRoOiAzMjBweDtcblx0bWF4LWhlaWdodDogdmFyKCAtLXBvcG92ZXItYXZhaWxhYmxlLWhlaWdodCApO1xuXG5cdHBhZGRpbmc6ICR7IENPTlRFTlRfV1JBUFBFUl9QQURESU5HIH07XG5cblx0b3ZlcnNjcm9sbC1iZWhhdmlvcjogY29udGFpbjtcblx0b3ZlcmZsb3c6IGF1dG87XG5cblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c01lZGl1bSB9O1xuXHQkeyAoIHByb3BzICkgPT4gY3NzYFxuXHRcdGJveC1zaGFkb3c6ICR7IHByb3BzLnZhcmlhbnQgPT09ICd0b29sYmFyJ1xuXHRcdFx0PyBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPV1xuXHRcdFx0OiBERUZBVUxUX0JPWF9TSEFET1cgfTtcblx0YCB9XG5cblx0LyogT25seSB2aXNpYmxlIGluIFdpbmRvd3MgSGlnaCBDb250cmFzdCBtb2RlICovXG5cdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudCAhaW1wb3J0YW50O1xuXG5cdC8qIE9wZW4vY2xvc2UgYW5pbWF0aW9uICovXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdHRyYW5zaXRpb24tcHJvcGVydHk6IHRyYW5zZm9ybSwgb3BhY2l0eTtcblx0XHR0cmFuc2l0aW9uLWR1cmF0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RVUkFUSU9OIH0sXG5cdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLkZBREVfRFVSQVRJT04gfTtcblx0XHR0cmFuc2l0aW9uLXRpbWluZy1mdW5jdGlvbjogJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9FQVNJTkcgfSxcblx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9FQVNJTkcgfTtcblx0XHR3aWxsLWNoYW5nZTogdHJhbnNmb3JtLCBvcGFjaXR5O1xuXG5cdFx0Jjpub3QoIFtkYXRhLXN1Ym1lbnVdICkge1xuXHRcdFx0LyogUmVnYXJkbGVzcyBvZiB0aGUgc2lkZSwgZmFkZSBpbiBhbmQgb3V0LiAqL1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHRcdCZbZGF0YS1lbnRlcl0ge1xuXHRcdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0fVxuXG5cdFx0XHQvKiBTbGlkZSBpbiB0aGUgZGlyZWN0aW9uIHRoZSBtZW51IGlzIG9wZW5pbmcuICovXG5cdFx0XHQmW2RhdGEtc2lkZT0nYm90dG9tJ10ge1xuXHRcdFx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoXG5cdFx0XHRcdFx0LSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J3RvcCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVZKFxuXHRcdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J2xlZnQnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWChcblx0XHRcdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKFxuXHRcdFx0XHRcdC0keyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdib3R0b20nXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSd0b3AnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWSggMCApO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLWVudGVyXVtkYXRhLXNpZGU9J2xlZnQnXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKCAwICk7XG5cdFx0XHR9XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBiYXNlSXRlbSA9IGNzc2Bcblx0YWxsOiB1bnNldDtcblxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCA4ICkgfTtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQvKiBPY2N1cHkgdGhlIHdpZHRoIG9mIGFsbCBncmlkIGNvbHVtbnMgKGllLiBmdWxsIHdpZHRoKSAqL1xuXHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogJHsgR1JJRF9URU1QTEFURV9DT0xTIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cblx0QHN1cHBvcnRzICggZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiBzdWJncmlkICkge1xuXHRcdC8qXG5cdFx0ICogRGVmaW5lIGEgZ3JpZCBsYXlvdXQgd2hpY2ggaW5oZXJpdHMgdGhlIHNhbWUgY29sdW1ucyBjb25maWd1cmF0aW9uXG5cdFx0ICogZnJvbSB0aGUgcGFyZW50IGxheW91dCAoaWUuIHN1YmdyaWQpLiBUaGlzIGFsbG93cyB0aGUgbWVudVxuXHRcdCAqIHRvIHN5bmNocm9uaXplIHRoZSBpbmRlbnRhdGlvbiBvZiBhbGwgaXRzIGl0ZW1zLlxuXHRcdCAqL1xuXHRcdGdyaWQtdGVtcGxhdGUtY29sdW1uczogc3ViZ3JpZDtcblx0fVxuXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdGZvbnQtd2VpZ2h0OiBub3JtYWw7XG5cdGxpbmUtaGVpZ2h0OiAyMHB4O1xuXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRwYWRkaW5nLWJsb2NrOiAkeyBJVEVNX1BBRERJTkdfQkxPQ0sgfTtcblx0cGFkZGluZy1pbmxpbmU6ICR7IElURU1fUEFERElOR19JTkxJTkUgfTtcblxuXHQvKlxuXHQgKiBNYWtlIHN1cmUgdGhhdCwgd2hlbiBhbiBpdGVtIGlzIHNjcm9sbGVkIGludG8gdmlldyAoZWcuIHdoaWxlIHVzaW5nIHRoZVxuXHQgKiBrZXlib2FyZCB0byBtb3ZlIGZvY3VzKSwgdGhlIHdob2xlIGl0ZW0gY29tZXMgaW50byB2aWV3XG5cdCAqL1xuXHRzY3JvbGwtbWFyZ2luOiAkeyBDT05URU5UX1dSQVBQRVJfUEFERElORyB9O1xuXG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRvdXRsaW5lOiBub25lO1xuXG5cdCZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLnRleHREaXNhYmxlZCB9O1xuXHRcdGN1cnNvcjogbm90LWFsbG93ZWQ7XG5cdH1cblxuXHQvKiBBY3RpdmUgaXRlbSAoaW5jbHVkaW5nIGhvdmVyKSAqL1xuXHQmW2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKTpub3QoXG5cdFx0XHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddXG5cdFx0KSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblx0fVxuXG5cdC8qIEtleWJvYXJkIGZvY3VzIChmb2N1cy12aXNpYmxlKSAqL1xuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdGJveC1zaGFkb3c6IDAgMCAwIDEuNXB4ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0fVxuXG5cdC8qIEFjdGl2ZSAoaWUuIHByZXNzZWQsIG1vdXNlIGRvd24pICovXG5cdCY6YWN0aXZlLFxuXHQmW2RhdGEtYWN0aXZlXSB7XG5cdFx0LyogVE9ETzogc2hvdWxkIHRoZXJlIGJlIGEgdmlzdWFsIGFjdGl2ZSBzdGF0ZT8gKi9cblx0fVxuXG5cdC8qIFdoZW4gdGhlIGl0ZW0gaXMgdGhlIHRyaWdnZXIgb2YgYW4gb3BlbiBzdWJtZW51ICovXG5cdCR7IE1lbnUgfTpub3QoOmZvY3VzKSAmOm5vdCg6Zm9jdXMpW2FyaWEtZXhwYW5kZWQ9XCJ0cnVlXCJdIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SIH07XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdH1cblxuXHRzdmcge1xuXHRcdGZpbGw6IGN1cnJlbnRDb2xvcjtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW0gKWBcblx0JHsgYmFzZUl0ZW0gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBDaGVja2JveEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW1DaGVja2JveCApYFxuXHQkeyBiYXNlSXRlbSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFJhZGlvSXRlbSA9IHN0eWxlZCggQXJpYWtpdC5NZW51SXRlbVJhZGlvIClgXG5cdCR7IGJhc2VJdGVtIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVByZWZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0LyogQWx3YXlzIG9jY3VweSB0aGUgZmlyc3QgY29sdW1uLCBldmVuIHdoZW4gYXV0by1jb2xsYXBzaW5nICovXG5cdGdyaWQtY29sdW1uOiAxO1xuXG5cdC8qXG5cdCAqIEV2ZW4gd2hlbiB0aGUgaXRlbSBpcyBub3QgY2hlY2tlZCwgb2NjdXB5IHRoZSBzYW1lIHNjcmVlbiBzcGFjZSB0byBhdm9pZFxuXHQgKiB0aGUgc3BhY2UgY29sbGFwc2lkZSB3aGVuIG5vIGl0ZW1zIGFyZSBjaGVja2VkLlxuXHQgKi9cblx0JHsgQ2hlY2tib3hJdGVtIH0gPiAmLFxuXHQkeyBSYWRpb0l0ZW0gfSA+ICYge1xuXHRcdC8qIFNhbWUgd2lkdGggYXMgdGhlIGNoZWNrIGljb25zICovXG5cdFx0bWluLXdpZHRoOiAkeyBzcGFjZSggNiApIH07XG5cdH1cblxuXHQkeyBDaGVja2JveEl0ZW0gfSA+ICYsXG5cdCR7IFJhZGlvSXRlbSB9ID4gJixcblx0Jjpub3QoIDplbXB0eSApIHtcblx0XHRtYXJnaW4taW5saW5lLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHR9XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBhY3RpdmUsIGV4Y2VwdCB3aGVuIGl0J3MgYSBub24tZm9jdXNlZC9ob3ZlcmVkXG5cdCogc3VibWVudSB0cmlnZ2VyIChpbiB0aGF0IGNhc2UsIGNvbG9yIHNob3VsZCBub3QgYmUgaW5oZXJpdGVkKVxuXHQqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApID4gJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddID4gJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ29udGVudFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQvKlxuXHQgKiBBbHdheXMgb2NjdXB5IHRoZSBzZWNvbmQgY29sdW1uLCBzaW5jZSB0aGUgZmlyc3QgY29sdW1uXG5cdCAqIGlzIHRha2VuIGJ5IHRoZSBwcmVmaXggd3JhcHBlciAod2hlbiBkaXNwbGF5ZWQpLlxuXHQgKi9cblx0Z3JpZC1jb2x1bW46IDI7XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRnYXA6ICR7IHNwYWNlKCAzICkgfTtcblxuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ2hpbGRyZW5XcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0ZmxleDogMTtcblxuXHRkaXNwbGF5OiBpbmxpbmUtZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblx0Z2FwOiAkeyBzcGFjZSggMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVN1ZmZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZmxleDogMCAxIGZpdC1jb250ZW50O1xuXHRtaW4td2lkdGg6IDA7XG5cdHdpZHRoOiBmaXQtY29udGVudDtcblxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0Z2FwOiAkeyBzcGFjZSggMyApIH07XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCAqIFdoZW4gdGhlIHBhcmVudCBtZW51IGl0ZW0gaXMgYWN0aXZlLCBleGNlcHQgd2hlbiBpdCdzIGEgbm9uLWZvY3VzZWQvaG92ZXJlZFxuXHQgKiBzdWJtZW51IHRyaWdnZXIgKGluIHRoYXQgY2FzZSwgY29sb3Igc2hvdWxkIG5vdCBiZSBpbmhlcml0ZWQpXG5cdCAqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApICo6bm90KCR7IE1lbnUgfSkgJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICo6bm90KCR7IE1lbnUgfSkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cCA9IHN0eWxlZCggQXJpYWtpdC5NZW51R3JvdXAgKWBcblx0LyogSWdub3JlIHRoaXMgZWxlbWVudCB3aGVuIGNhbGN1bGF0aW5nIHRoZSBsYXlvdXQuIFVzZWZ1bCBmb3Igc3ViZ3JpZCAqL1xuXHRkaXNwbGF5OiBjb250ZW50cztcbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cExhYmVsID0gc3R5bGVkKCBBcmlha2l0Lk1lbnVHcm91cExhYmVsIClgXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0cGFkZGluZy1ibG9jay1zdGFydDogJHsgc3BhY2UoIDMgKSB9O1xuXHRwYWRkaW5nLWJsb2NrLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHRwYWRkaW5nLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFNlcGFyYXRvciA9IHN0eWxlZCggQXJpYWtpdC5NZW51U2VwYXJhdG9yICk8XG5cdFBpY2s8IENvbnRleHRQcm9wcywgJ3ZhcmlhbnQnID5cbj5gXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0Ym9yZGVyOiBub25lO1xuXHRoZWlnaHQ6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9O1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyAoIHByb3BzICkgPT5cblx0XHRwcm9wcy52YXJpYW50ID09PSAndG9vbGJhcidcblx0XHRcdD8gVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUlxuXHRcdFx0OiBESVZJREVSX0NPTE9SIH07XG5cdC8qIEFsaWduIHdpdGggbWVudSBpdGVtcycgY29udGVudCAqL1xuXHRtYXJnaW4tYmxvY2s6ICR7IHNwYWNlKCAyICkgfTtcblx0bWFyZ2luLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuXG5cdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VibWVudUNoZXZyb25JY29uID0gc3R5bGVkKCBJY29uIClgXG5cdHdpZHRoOiAkeyBzcGFjZSggMS41ICkgfTtcblx0JHsgcnRsKFxuXHRcdHtcblx0XHRcdHRyYW5zZm9ybTogYHNjYWxlWCgxKWAsXG5cdFx0fSxcblx0XHR7XG5cdFx0XHR0cmFuc2Zvcm06IGBzY2FsZVgoLTEpYCxcblx0XHR9XG5cdCkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtTGFiZWwgPSBzdHlsZWQoIFRydW5jYXRlIClgXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDIwcHg7XG5cdGNvbG9yOiBpbmhlcml0O1xuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW1IZWxwVGV4dCA9IHN0eWxlZCggVHJ1bmNhdGUgKWBcblx0Zm9udC1zaXplOiAkeyBmb250KCAnaGVscFRleHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDE2cHg7XG5cdGNvbG9yOiAkeyBMSUdIVEVSX1RFWFRfQ09MT1IgfTtcblx0b3ZlcmZsb3ctd3JhcDogYW55d2hlcmU7XG5cblx0W2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKSAqOm5vdCggJHsgTWVudSB9ICkgJixcblx0W2FyaWEtZGlzYWJsZWQ9J3RydWUnXSAqOm5vdCggJHsgTWVudSB9ICkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG4iXX0= */"));
  var ItemSuffixWrapper = /* @__PURE__ */ createStyled("span", false ? {
    target: "e1wg7tti6"
  } : {
    target: "e1wg7tti6",
    label: "ItemSuffixWrapper"
  })("flex:0 1 fit-content;min-width:0;width:fit-content;display:flex;align-items:center;justify-content:center;gap:", space(3), ";color:", LIGHTER_TEXT_COLOR, ";[data-active-item]:not( [data-focus-visible] ) *:not(", Menu22, ") &,[aria-disabled='true'] *:not(", Menu22, ") &{color:inherit;}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyUTRDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIGZvbnQsIHJ0bCwgQ09ORklHLCBEUk9QRE9XTl9NT1RJT05fQ1NTIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgSWNvbiBmcm9tICcuLi9pY29uJztcbmltcG9ydCB7IFRydW5jYXRlIH0gZnJvbSAnLi4vdHJ1bmNhdGUnO1xuaW1wb3J0IHR5cGUgeyBDb250ZXh0UHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuY29uc3QgQ09OVEVOVF9XUkFQUEVSX1BBRERJTkcgPSBzcGFjZSggMSApO1xuY29uc3QgSVRFTV9QQURESU5HX0JMT0NLID0gc3BhY2UoIDEgKTtcbmNvbnN0IElURU1fUEFERElOR19JTkxJTkUgPSBzcGFjZSggMyApO1xuXG4vLyBUT0RPOlxuLy8gLSBib3JkZXIgY29sb3IgYW5kIGRpdmlkZXIgY29sb3IgYXJlIGRpZmZlcmVudCBmcm9tIENPTE9SUy50aGVtZSB2YXJpYWJsZXNcbi8vIC0gbGlnaHRlciB0ZXh0IGNvbG9yIGlzIG5vdCBkZWZpbmVkIGluIENPTE9SUy50aGVtZSwgc2hvdWxkIGl0IGJlP1xuLy8gLSBsaWdodGVyIGJhY2tncm91bmQgY29sb3IgaXMgbm90IGRlZmluZWQgaW4gQ09MT1JTLnRoZW1lLCBzaG91bGQgaXQgYmU/XG5jb25zdCBERUZBVUxUX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXTtcbmNvbnN0IERJVklERVJfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgMjAwIF07XG5jb25zdCBMSUdIVEVSX1RFWFRfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF07XG5jb25zdCBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SID0gQ09MT1JTLnRoZW1lLmdyYXlbIDEwMCBdO1xuY29uc3QgVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kO1xuY29uc3QgREVGQVVMVF9CT1hfU0hBRE9XID0gYDAgMCAwICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9ICR7IERFRkFVTFRfQk9SREVSX0NPTE9SIH0sICR7IENPTkZJRy5lbGV2YXRpb25NZWRpdW0gfWA7XG5jb25zdCBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPVyA9IGAwIDAgMCAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSAkeyBUT09MQkFSX1ZBUklBTlRfQk9SREVSX0NPTE9SIH1gO1xuXG5jb25zdCBHUklEX1RFTVBMQVRFX0NPTFMgPSAnbWlubWF4KCAwLCBtYXgtY29udGVudCApIDFmcic7XG5cbmV4cG9ydCBjb25zdCBNZW51ID0gc3R5bGVkKCBBcmlha2l0Lk1lbnUgKTwgUGljazwgQ29udGV4dFByb3BzLCAndmFyaWFudCcgPiA+YFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdC8qIFNhbWUgYXMgcG9wb3ZlciBjb21wb25lbnQgKi9cblx0LyogVE9ETzogaXMgdGhlcmUgYSB3YXkgdG8gcmVhZCB0aGUgc2FzcyB2YXJpYWJsZT8gKi9cblx0ei1pbmRleDogMTAwMDAwMDtcblxuXHRkaXNwbGF5OiBncmlkO1xuXHRncmlkLXRlbXBsYXRlLWNvbHVtbnM6ICR7IEdSSURfVEVNUExBVEVfQ09MUyB9O1xuXHRncmlkLXRlbXBsYXRlLXJvd3M6IGF1dG87XG5cblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0bWluLXdpZHRoOiAxNjBweDtcblx0bWF4LXdpZHRoOiAzMjBweDtcblx0bWF4LWhlaWdodDogdmFyKCAtLXBvcG92ZXItYXZhaWxhYmxlLWhlaWdodCApO1xuXG5cdHBhZGRpbmc6ICR7IENPTlRFTlRfV1JBUFBFUl9QQURESU5HIH07XG5cblx0b3ZlcnNjcm9sbC1iZWhhdmlvcjogY29udGFpbjtcblx0b3ZlcmZsb3c6IGF1dG87XG5cblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c01lZGl1bSB9O1xuXHQkeyAoIHByb3BzICkgPT4gY3NzYFxuXHRcdGJveC1zaGFkb3c6ICR7IHByb3BzLnZhcmlhbnQgPT09ICd0b29sYmFyJ1xuXHRcdFx0PyBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPV1xuXHRcdFx0OiBERUZBVUxUX0JPWF9TSEFET1cgfTtcblx0YCB9XG5cblx0LyogT25seSB2aXNpYmxlIGluIFdpbmRvd3MgSGlnaCBDb250cmFzdCBtb2RlICovXG5cdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudCAhaW1wb3J0YW50O1xuXG5cdC8qIE9wZW4vY2xvc2UgYW5pbWF0aW9uICovXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdHRyYW5zaXRpb24tcHJvcGVydHk6IHRyYW5zZm9ybSwgb3BhY2l0eTtcblx0XHR0cmFuc2l0aW9uLWR1cmF0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RVUkFUSU9OIH0sXG5cdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLkZBREVfRFVSQVRJT04gfTtcblx0XHR0cmFuc2l0aW9uLXRpbWluZy1mdW5jdGlvbjogJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9FQVNJTkcgfSxcblx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9FQVNJTkcgfTtcblx0XHR3aWxsLWNoYW5nZTogdHJhbnNmb3JtLCBvcGFjaXR5O1xuXG5cdFx0Jjpub3QoIFtkYXRhLXN1Ym1lbnVdICkge1xuXHRcdFx0LyogUmVnYXJkbGVzcyBvZiB0aGUgc2lkZSwgZmFkZSBpbiBhbmQgb3V0LiAqL1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHRcdCZbZGF0YS1lbnRlcl0ge1xuXHRcdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0fVxuXG5cdFx0XHQvKiBTbGlkZSBpbiB0aGUgZGlyZWN0aW9uIHRoZSBtZW51IGlzIG9wZW5pbmcuICovXG5cdFx0XHQmW2RhdGEtc2lkZT0nYm90dG9tJ10ge1xuXHRcdFx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoXG5cdFx0XHRcdFx0LSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J3RvcCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVZKFxuXHRcdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J2xlZnQnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWChcblx0XHRcdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKFxuXHRcdFx0XHRcdC0keyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdib3R0b20nXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSd0b3AnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWSggMCApO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLWVudGVyXVtkYXRhLXNpZGU9J2xlZnQnXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKCAwICk7XG5cdFx0XHR9XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBiYXNlSXRlbSA9IGNzc2Bcblx0YWxsOiB1bnNldDtcblxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCA4ICkgfTtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQvKiBPY2N1cHkgdGhlIHdpZHRoIG9mIGFsbCBncmlkIGNvbHVtbnMgKGllLiBmdWxsIHdpZHRoKSAqL1xuXHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogJHsgR1JJRF9URU1QTEFURV9DT0xTIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cblx0QHN1cHBvcnRzICggZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiBzdWJncmlkICkge1xuXHRcdC8qXG5cdFx0ICogRGVmaW5lIGEgZ3JpZCBsYXlvdXQgd2hpY2ggaW5oZXJpdHMgdGhlIHNhbWUgY29sdW1ucyBjb25maWd1cmF0aW9uXG5cdFx0ICogZnJvbSB0aGUgcGFyZW50IGxheW91dCAoaWUuIHN1YmdyaWQpLiBUaGlzIGFsbG93cyB0aGUgbWVudVxuXHRcdCAqIHRvIHN5bmNocm9uaXplIHRoZSBpbmRlbnRhdGlvbiBvZiBhbGwgaXRzIGl0ZW1zLlxuXHRcdCAqL1xuXHRcdGdyaWQtdGVtcGxhdGUtY29sdW1uczogc3ViZ3JpZDtcblx0fVxuXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdGZvbnQtd2VpZ2h0OiBub3JtYWw7XG5cdGxpbmUtaGVpZ2h0OiAyMHB4O1xuXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRwYWRkaW5nLWJsb2NrOiAkeyBJVEVNX1BBRERJTkdfQkxPQ0sgfTtcblx0cGFkZGluZy1pbmxpbmU6ICR7IElURU1fUEFERElOR19JTkxJTkUgfTtcblxuXHQvKlxuXHQgKiBNYWtlIHN1cmUgdGhhdCwgd2hlbiBhbiBpdGVtIGlzIHNjcm9sbGVkIGludG8gdmlldyAoZWcuIHdoaWxlIHVzaW5nIHRoZVxuXHQgKiBrZXlib2FyZCB0byBtb3ZlIGZvY3VzKSwgdGhlIHdob2xlIGl0ZW0gY29tZXMgaW50byB2aWV3XG5cdCAqL1xuXHRzY3JvbGwtbWFyZ2luOiAkeyBDT05URU5UX1dSQVBQRVJfUEFERElORyB9O1xuXG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRvdXRsaW5lOiBub25lO1xuXG5cdCZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLnRleHREaXNhYmxlZCB9O1xuXHRcdGN1cnNvcjogbm90LWFsbG93ZWQ7XG5cdH1cblxuXHQvKiBBY3RpdmUgaXRlbSAoaW5jbHVkaW5nIGhvdmVyKSAqL1xuXHQmW2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKTpub3QoXG5cdFx0XHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddXG5cdFx0KSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblx0fVxuXG5cdC8qIEtleWJvYXJkIGZvY3VzIChmb2N1cy12aXNpYmxlKSAqL1xuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdGJveC1zaGFkb3c6IDAgMCAwIDEuNXB4ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0fVxuXG5cdC8qIEFjdGl2ZSAoaWUuIHByZXNzZWQsIG1vdXNlIGRvd24pICovXG5cdCY6YWN0aXZlLFxuXHQmW2RhdGEtYWN0aXZlXSB7XG5cdFx0LyogVE9ETzogc2hvdWxkIHRoZXJlIGJlIGEgdmlzdWFsIGFjdGl2ZSBzdGF0ZT8gKi9cblx0fVxuXG5cdC8qIFdoZW4gdGhlIGl0ZW0gaXMgdGhlIHRyaWdnZXIgb2YgYW4gb3BlbiBzdWJtZW51ICovXG5cdCR7IE1lbnUgfTpub3QoOmZvY3VzKSAmOm5vdCg6Zm9jdXMpW2FyaWEtZXhwYW5kZWQ9XCJ0cnVlXCJdIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SIH07XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdH1cblxuXHRzdmcge1xuXHRcdGZpbGw6IGN1cnJlbnRDb2xvcjtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW0gKWBcblx0JHsgYmFzZUl0ZW0gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBDaGVja2JveEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW1DaGVja2JveCApYFxuXHQkeyBiYXNlSXRlbSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFJhZGlvSXRlbSA9IHN0eWxlZCggQXJpYWtpdC5NZW51SXRlbVJhZGlvIClgXG5cdCR7IGJhc2VJdGVtIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVByZWZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0LyogQWx3YXlzIG9jY3VweSB0aGUgZmlyc3QgY29sdW1uLCBldmVuIHdoZW4gYXV0by1jb2xsYXBzaW5nICovXG5cdGdyaWQtY29sdW1uOiAxO1xuXG5cdC8qXG5cdCAqIEV2ZW4gd2hlbiB0aGUgaXRlbSBpcyBub3QgY2hlY2tlZCwgb2NjdXB5IHRoZSBzYW1lIHNjcmVlbiBzcGFjZSB0byBhdm9pZFxuXHQgKiB0aGUgc3BhY2UgY29sbGFwc2lkZSB3aGVuIG5vIGl0ZW1zIGFyZSBjaGVja2VkLlxuXHQgKi9cblx0JHsgQ2hlY2tib3hJdGVtIH0gPiAmLFxuXHQkeyBSYWRpb0l0ZW0gfSA+ICYge1xuXHRcdC8qIFNhbWUgd2lkdGggYXMgdGhlIGNoZWNrIGljb25zICovXG5cdFx0bWluLXdpZHRoOiAkeyBzcGFjZSggNiApIH07XG5cdH1cblxuXHQkeyBDaGVja2JveEl0ZW0gfSA+ICYsXG5cdCR7IFJhZGlvSXRlbSB9ID4gJixcblx0Jjpub3QoIDplbXB0eSApIHtcblx0XHRtYXJnaW4taW5saW5lLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHR9XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBhY3RpdmUsIGV4Y2VwdCB3aGVuIGl0J3MgYSBub24tZm9jdXNlZC9ob3ZlcmVkXG5cdCogc3VibWVudSB0cmlnZ2VyIChpbiB0aGF0IGNhc2UsIGNvbG9yIHNob3VsZCBub3QgYmUgaW5oZXJpdGVkKVxuXHQqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApID4gJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddID4gJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ29udGVudFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQvKlxuXHQgKiBBbHdheXMgb2NjdXB5IHRoZSBzZWNvbmQgY29sdW1uLCBzaW5jZSB0aGUgZmlyc3QgY29sdW1uXG5cdCAqIGlzIHRha2VuIGJ5IHRoZSBwcmVmaXggd3JhcHBlciAod2hlbiBkaXNwbGF5ZWQpLlxuXHQgKi9cblx0Z3JpZC1jb2x1bW46IDI7XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRnYXA6ICR7IHNwYWNlKCAzICkgfTtcblxuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ2hpbGRyZW5XcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0ZmxleDogMTtcblxuXHRkaXNwbGF5OiBpbmxpbmUtZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblx0Z2FwOiAkeyBzcGFjZSggMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVN1ZmZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZmxleDogMCAxIGZpdC1jb250ZW50O1xuXHRtaW4td2lkdGg6IDA7XG5cdHdpZHRoOiBmaXQtY29udGVudDtcblxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0Z2FwOiAkeyBzcGFjZSggMyApIH07XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCAqIFdoZW4gdGhlIHBhcmVudCBtZW51IGl0ZW0gaXMgYWN0aXZlLCBleGNlcHQgd2hlbiBpdCdzIGEgbm9uLWZvY3VzZWQvaG92ZXJlZFxuXHQgKiBzdWJtZW51IHRyaWdnZXIgKGluIHRoYXQgY2FzZSwgY29sb3Igc2hvdWxkIG5vdCBiZSBpbmhlcml0ZWQpXG5cdCAqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApICo6bm90KCR7IE1lbnUgfSkgJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICo6bm90KCR7IE1lbnUgfSkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cCA9IHN0eWxlZCggQXJpYWtpdC5NZW51R3JvdXAgKWBcblx0LyogSWdub3JlIHRoaXMgZWxlbWVudCB3aGVuIGNhbGN1bGF0aW5nIHRoZSBsYXlvdXQuIFVzZWZ1bCBmb3Igc3ViZ3JpZCAqL1xuXHRkaXNwbGF5OiBjb250ZW50cztcbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cExhYmVsID0gc3R5bGVkKCBBcmlha2l0Lk1lbnVHcm91cExhYmVsIClgXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0cGFkZGluZy1ibG9jay1zdGFydDogJHsgc3BhY2UoIDMgKSB9O1xuXHRwYWRkaW5nLWJsb2NrLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHRwYWRkaW5nLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFNlcGFyYXRvciA9IHN0eWxlZCggQXJpYWtpdC5NZW51U2VwYXJhdG9yICk8XG5cdFBpY2s8IENvbnRleHRQcm9wcywgJ3ZhcmlhbnQnID5cbj5gXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0Ym9yZGVyOiBub25lO1xuXHRoZWlnaHQ6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9O1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyAoIHByb3BzICkgPT5cblx0XHRwcm9wcy52YXJpYW50ID09PSAndG9vbGJhcidcblx0XHRcdD8gVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUlxuXHRcdFx0OiBESVZJREVSX0NPTE9SIH07XG5cdC8qIEFsaWduIHdpdGggbWVudSBpdGVtcycgY29udGVudCAqL1xuXHRtYXJnaW4tYmxvY2s6ICR7IHNwYWNlKCAyICkgfTtcblx0bWFyZ2luLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuXG5cdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VibWVudUNoZXZyb25JY29uID0gc3R5bGVkKCBJY29uIClgXG5cdHdpZHRoOiAkeyBzcGFjZSggMS41ICkgfTtcblx0JHsgcnRsKFxuXHRcdHtcblx0XHRcdHRyYW5zZm9ybTogYHNjYWxlWCgxKWAsXG5cdFx0fSxcblx0XHR7XG5cdFx0XHR0cmFuc2Zvcm06IGBzY2FsZVgoLTEpYCxcblx0XHR9XG5cdCkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtTGFiZWwgPSBzdHlsZWQoIFRydW5jYXRlIClgXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDIwcHg7XG5cdGNvbG9yOiBpbmhlcml0O1xuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW1IZWxwVGV4dCA9IHN0eWxlZCggVHJ1bmNhdGUgKWBcblx0Zm9udC1zaXplOiAkeyBmb250KCAnaGVscFRleHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDE2cHg7XG5cdGNvbG9yOiAkeyBMSUdIVEVSX1RFWFRfQ09MT1IgfTtcblx0b3ZlcmZsb3ctd3JhcDogYW55d2hlcmU7XG5cblx0W2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKSAqOm5vdCggJHsgTWVudSB9ICkgJixcblx0W2FyaWEtZGlzYWJsZWQ9J3RydWUnXSAqOm5vdCggJHsgTWVudSB9ICkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG4iXX0= */"));
  var Group3 = /* @__PURE__ */ createStyled(MenuGroup, false ? {
    target: "e1wg7tti5"
  } : {
    target: "e1wg7tti5",
    label: "Group"
  })(false ? {
    name: "49aokf",
    styles: "display:contents"
  } : {
    name: "49aokf",
    styles: "display:contents/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrU2dEIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIGZvbnQsIHJ0bCwgQ09ORklHLCBEUk9QRE9XTl9NT1RJT05fQ1NTIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgSWNvbiBmcm9tICcuLi9pY29uJztcbmltcG9ydCB7IFRydW5jYXRlIH0gZnJvbSAnLi4vdHJ1bmNhdGUnO1xuaW1wb3J0IHR5cGUgeyBDb250ZXh0UHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuY29uc3QgQ09OVEVOVF9XUkFQUEVSX1BBRERJTkcgPSBzcGFjZSggMSApO1xuY29uc3QgSVRFTV9QQURESU5HX0JMT0NLID0gc3BhY2UoIDEgKTtcbmNvbnN0IElURU1fUEFERElOR19JTkxJTkUgPSBzcGFjZSggMyApO1xuXG4vLyBUT0RPOlxuLy8gLSBib3JkZXIgY29sb3IgYW5kIGRpdmlkZXIgY29sb3IgYXJlIGRpZmZlcmVudCBmcm9tIENPTE9SUy50aGVtZSB2YXJpYWJsZXNcbi8vIC0gbGlnaHRlciB0ZXh0IGNvbG9yIGlzIG5vdCBkZWZpbmVkIGluIENPTE9SUy50aGVtZSwgc2hvdWxkIGl0IGJlP1xuLy8gLSBsaWdodGVyIGJhY2tncm91bmQgY29sb3IgaXMgbm90IGRlZmluZWQgaW4gQ09MT1JTLnRoZW1lLCBzaG91bGQgaXQgYmU/XG5jb25zdCBERUZBVUxUX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXTtcbmNvbnN0IERJVklERVJfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgMjAwIF07XG5jb25zdCBMSUdIVEVSX1RFWFRfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF07XG5jb25zdCBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SID0gQ09MT1JTLnRoZW1lLmdyYXlbIDEwMCBdO1xuY29uc3QgVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kO1xuY29uc3QgREVGQVVMVF9CT1hfU0hBRE9XID0gYDAgMCAwICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9ICR7IERFRkFVTFRfQk9SREVSX0NPTE9SIH0sICR7IENPTkZJRy5lbGV2YXRpb25NZWRpdW0gfWA7XG5jb25zdCBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPVyA9IGAwIDAgMCAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSAkeyBUT09MQkFSX1ZBUklBTlRfQk9SREVSX0NPTE9SIH1gO1xuXG5jb25zdCBHUklEX1RFTVBMQVRFX0NPTFMgPSAnbWlubWF4KCAwLCBtYXgtY29udGVudCApIDFmcic7XG5cbmV4cG9ydCBjb25zdCBNZW51ID0gc3R5bGVkKCBBcmlha2l0Lk1lbnUgKTwgUGljazwgQ29udGV4dFByb3BzLCAndmFyaWFudCcgPiA+YFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdC8qIFNhbWUgYXMgcG9wb3ZlciBjb21wb25lbnQgKi9cblx0LyogVE9ETzogaXMgdGhlcmUgYSB3YXkgdG8gcmVhZCB0aGUgc2FzcyB2YXJpYWJsZT8gKi9cblx0ei1pbmRleDogMTAwMDAwMDtcblxuXHRkaXNwbGF5OiBncmlkO1xuXHRncmlkLXRlbXBsYXRlLWNvbHVtbnM6ICR7IEdSSURfVEVNUExBVEVfQ09MUyB9O1xuXHRncmlkLXRlbXBsYXRlLXJvd3M6IGF1dG87XG5cblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0bWluLXdpZHRoOiAxNjBweDtcblx0bWF4LXdpZHRoOiAzMjBweDtcblx0bWF4LWhlaWdodDogdmFyKCAtLXBvcG92ZXItYXZhaWxhYmxlLWhlaWdodCApO1xuXG5cdHBhZGRpbmc6ICR7IENPTlRFTlRfV1JBUFBFUl9QQURESU5HIH07XG5cblx0b3ZlcnNjcm9sbC1iZWhhdmlvcjogY29udGFpbjtcblx0b3ZlcmZsb3c6IGF1dG87XG5cblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c01lZGl1bSB9O1xuXHQkeyAoIHByb3BzICkgPT4gY3NzYFxuXHRcdGJveC1zaGFkb3c6ICR7IHByb3BzLnZhcmlhbnQgPT09ICd0b29sYmFyJ1xuXHRcdFx0PyBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPV1xuXHRcdFx0OiBERUZBVUxUX0JPWF9TSEFET1cgfTtcblx0YCB9XG5cblx0LyogT25seSB2aXNpYmxlIGluIFdpbmRvd3MgSGlnaCBDb250cmFzdCBtb2RlICovXG5cdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudCAhaW1wb3J0YW50O1xuXG5cdC8qIE9wZW4vY2xvc2UgYW5pbWF0aW9uICovXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdHRyYW5zaXRpb24tcHJvcGVydHk6IHRyYW5zZm9ybSwgb3BhY2l0eTtcblx0XHR0cmFuc2l0aW9uLWR1cmF0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RVUkFUSU9OIH0sXG5cdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLkZBREVfRFVSQVRJT04gfTtcblx0XHR0cmFuc2l0aW9uLXRpbWluZy1mdW5jdGlvbjogJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9FQVNJTkcgfSxcblx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9FQVNJTkcgfTtcblx0XHR3aWxsLWNoYW5nZTogdHJhbnNmb3JtLCBvcGFjaXR5O1xuXG5cdFx0Jjpub3QoIFtkYXRhLXN1Ym1lbnVdICkge1xuXHRcdFx0LyogUmVnYXJkbGVzcyBvZiB0aGUgc2lkZSwgZmFkZSBpbiBhbmQgb3V0LiAqL1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHRcdCZbZGF0YS1lbnRlcl0ge1xuXHRcdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0fVxuXG5cdFx0XHQvKiBTbGlkZSBpbiB0aGUgZGlyZWN0aW9uIHRoZSBtZW51IGlzIG9wZW5pbmcuICovXG5cdFx0XHQmW2RhdGEtc2lkZT0nYm90dG9tJ10ge1xuXHRcdFx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoXG5cdFx0XHRcdFx0LSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J3RvcCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVZKFxuXHRcdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J2xlZnQnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWChcblx0XHRcdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKFxuXHRcdFx0XHRcdC0keyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdib3R0b20nXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSd0b3AnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWSggMCApO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLWVudGVyXVtkYXRhLXNpZGU9J2xlZnQnXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKCAwICk7XG5cdFx0XHR9XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBiYXNlSXRlbSA9IGNzc2Bcblx0YWxsOiB1bnNldDtcblxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCA4ICkgfTtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQvKiBPY2N1cHkgdGhlIHdpZHRoIG9mIGFsbCBncmlkIGNvbHVtbnMgKGllLiBmdWxsIHdpZHRoKSAqL1xuXHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogJHsgR1JJRF9URU1QTEFURV9DT0xTIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cblx0QHN1cHBvcnRzICggZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiBzdWJncmlkICkge1xuXHRcdC8qXG5cdFx0ICogRGVmaW5lIGEgZ3JpZCBsYXlvdXQgd2hpY2ggaW5oZXJpdHMgdGhlIHNhbWUgY29sdW1ucyBjb25maWd1cmF0aW9uXG5cdFx0ICogZnJvbSB0aGUgcGFyZW50IGxheW91dCAoaWUuIHN1YmdyaWQpLiBUaGlzIGFsbG93cyB0aGUgbWVudVxuXHRcdCAqIHRvIHN5bmNocm9uaXplIHRoZSBpbmRlbnRhdGlvbiBvZiBhbGwgaXRzIGl0ZW1zLlxuXHRcdCAqL1xuXHRcdGdyaWQtdGVtcGxhdGUtY29sdW1uczogc3ViZ3JpZDtcblx0fVxuXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdGZvbnQtd2VpZ2h0OiBub3JtYWw7XG5cdGxpbmUtaGVpZ2h0OiAyMHB4O1xuXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRwYWRkaW5nLWJsb2NrOiAkeyBJVEVNX1BBRERJTkdfQkxPQ0sgfTtcblx0cGFkZGluZy1pbmxpbmU6ICR7IElURU1fUEFERElOR19JTkxJTkUgfTtcblxuXHQvKlxuXHQgKiBNYWtlIHN1cmUgdGhhdCwgd2hlbiBhbiBpdGVtIGlzIHNjcm9sbGVkIGludG8gdmlldyAoZWcuIHdoaWxlIHVzaW5nIHRoZVxuXHQgKiBrZXlib2FyZCB0byBtb3ZlIGZvY3VzKSwgdGhlIHdob2xlIGl0ZW0gY29tZXMgaW50byB2aWV3XG5cdCAqL1xuXHRzY3JvbGwtbWFyZ2luOiAkeyBDT05URU5UX1dSQVBQRVJfUEFERElORyB9O1xuXG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRvdXRsaW5lOiBub25lO1xuXG5cdCZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLnRleHREaXNhYmxlZCB9O1xuXHRcdGN1cnNvcjogbm90LWFsbG93ZWQ7XG5cdH1cblxuXHQvKiBBY3RpdmUgaXRlbSAoaW5jbHVkaW5nIGhvdmVyKSAqL1xuXHQmW2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKTpub3QoXG5cdFx0XHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddXG5cdFx0KSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblx0fVxuXG5cdC8qIEtleWJvYXJkIGZvY3VzIChmb2N1cy12aXNpYmxlKSAqL1xuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdGJveC1zaGFkb3c6IDAgMCAwIDEuNXB4ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0fVxuXG5cdC8qIEFjdGl2ZSAoaWUuIHByZXNzZWQsIG1vdXNlIGRvd24pICovXG5cdCY6YWN0aXZlLFxuXHQmW2RhdGEtYWN0aXZlXSB7XG5cdFx0LyogVE9ETzogc2hvdWxkIHRoZXJlIGJlIGEgdmlzdWFsIGFjdGl2ZSBzdGF0ZT8gKi9cblx0fVxuXG5cdC8qIFdoZW4gdGhlIGl0ZW0gaXMgdGhlIHRyaWdnZXIgb2YgYW4gb3BlbiBzdWJtZW51ICovXG5cdCR7IE1lbnUgfTpub3QoOmZvY3VzKSAmOm5vdCg6Zm9jdXMpW2FyaWEtZXhwYW5kZWQ9XCJ0cnVlXCJdIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SIH07XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdH1cblxuXHRzdmcge1xuXHRcdGZpbGw6IGN1cnJlbnRDb2xvcjtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW0gKWBcblx0JHsgYmFzZUl0ZW0gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBDaGVja2JveEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW1DaGVja2JveCApYFxuXHQkeyBiYXNlSXRlbSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFJhZGlvSXRlbSA9IHN0eWxlZCggQXJpYWtpdC5NZW51SXRlbVJhZGlvIClgXG5cdCR7IGJhc2VJdGVtIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVByZWZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0LyogQWx3YXlzIG9jY3VweSB0aGUgZmlyc3QgY29sdW1uLCBldmVuIHdoZW4gYXV0by1jb2xsYXBzaW5nICovXG5cdGdyaWQtY29sdW1uOiAxO1xuXG5cdC8qXG5cdCAqIEV2ZW4gd2hlbiB0aGUgaXRlbSBpcyBub3QgY2hlY2tlZCwgb2NjdXB5IHRoZSBzYW1lIHNjcmVlbiBzcGFjZSB0byBhdm9pZFxuXHQgKiB0aGUgc3BhY2UgY29sbGFwc2lkZSB3aGVuIG5vIGl0ZW1zIGFyZSBjaGVja2VkLlxuXHQgKi9cblx0JHsgQ2hlY2tib3hJdGVtIH0gPiAmLFxuXHQkeyBSYWRpb0l0ZW0gfSA+ICYge1xuXHRcdC8qIFNhbWUgd2lkdGggYXMgdGhlIGNoZWNrIGljb25zICovXG5cdFx0bWluLXdpZHRoOiAkeyBzcGFjZSggNiApIH07XG5cdH1cblxuXHQkeyBDaGVja2JveEl0ZW0gfSA+ICYsXG5cdCR7IFJhZGlvSXRlbSB9ID4gJixcblx0Jjpub3QoIDplbXB0eSApIHtcblx0XHRtYXJnaW4taW5saW5lLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHR9XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBhY3RpdmUsIGV4Y2VwdCB3aGVuIGl0J3MgYSBub24tZm9jdXNlZC9ob3ZlcmVkXG5cdCogc3VibWVudSB0cmlnZ2VyIChpbiB0aGF0IGNhc2UsIGNvbG9yIHNob3VsZCBub3QgYmUgaW5oZXJpdGVkKVxuXHQqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApID4gJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddID4gJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ29udGVudFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQvKlxuXHQgKiBBbHdheXMgb2NjdXB5IHRoZSBzZWNvbmQgY29sdW1uLCBzaW5jZSB0aGUgZmlyc3QgY29sdW1uXG5cdCAqIGlzIHRha2VuIGJ5IHRoZSBwcmVmaXggd3JhcHBlciAod2hlbiBkaXNwbGF5ZWQpLlxuXHQgKi9cblx0Z3JpZC1jb2x1bW46IDI7XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRnYXA6ICR7IHNwYWNlKCAzICkgfTtcblxuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ2hpbGRyZW5XcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0ZmxleDogMTtcblxuXHRkaXNwbGF5OiBpbmxpbmUtZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblx0Z2FwOiAkeyBzcGFjZSggMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVN1ZmZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZmxleDogMCAxIGZpdC1jb250ZW50O1xuXHRtaW4td2lkdGg6IDA7XG5cdHdpZHRoOiBmaXQtY29udGVudDtcblxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0Z2FwOiAkeyBzcGFjZSggMyApIH07XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCAqIFdoZW4gdGhlIHBhcmVudCBtZW51IGl0ZW0gaXMgYWN0aXZlLCBleGNlcHQgd2hlbiBpdCdzIGEgbm9uLWZvY3VzZWQvaG92ZXJlZFxuXHQgKiBzdWJtZW51IHRyaWdnZXIgKGluIHRoYXQgY2FzZSwgY29sb3Igc2hvdWxkIG5vdCBiZSBpbmhlcml0ZWQpXG5cdCAqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApICo6bm90KCR7IE1lbnUgfSkgJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICo6bm90KCR7IE1lbnUgfSkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cCA9IHN0eWxlZCggQXJpYWtpdC5NZW51R3JvdXAgKWBcblx0LyogSWdub3JlIHRoaXMgZWxlbWVudCB3aGVuIGNhbGN1bGF0aW5nIHRoZSBsYXlvdXQuIFVzZWZ1bCBmb3Igc3ViZ3JpZCAqL1xuXHRkaXNwbGF5OiBjb250ZW50cztcbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cExhYmVsID0gc3R5bGVkKCBBcmlha2l0Lk1lbnVHcm91cExhYmVsIClgXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0cGFkZGluZy1ibG9jay1zdGFydDogJHsgc3BhY2UoIDMgKSB9O1xuXHRwYWRkaW5nLWJsb2NrLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHRwYWRkaW5nLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFNlcGFyYXRvciA9IHN0eWxlZCggQXJpYWtpdC5NZW51U2VwYXJhdG9yICk8XG5cdFBpY2s8IENvbnRleHRQcm9wcywgJ3ZhcmlhbnQnID5cbj5gXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0Ym9yZGVyOiBub25lO1xuXHRoZWlnaHQ6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9O1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyAoIHByb3BzICkgPT5cblx0XHRwcm9wcy52YXJpYW50ID09PSAndG9vbGJhcidcblx0XHRcdD8gVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUlxuXHRcdFx0OiBESVZJREVSX0NPTE9SIH07XG5cdC8qIEFsaWduIHdpdGggbWVudSBpdGVtcycgY29udGVudCAqL1xuXHRtYXJnaW4tYmxvY2s6ICR7IHNwYWNlKCAyICkgfTtcblx0bWFyZ2luLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuXG5cdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VibWVudUNoZXZyb25JY29uID0gc3R5bGVkKCBJY29uIClgXG5cdHdpZHRoOiAkeyBzcGFjZSggMS41ICkgfTtcblx0JHsgcnRsKFxuXHRcdHtcblx0XHRcdHRyYW5zZm9ybTogYHNjYWxlWCgxKWAsXG5cdFx0fSxcblx0XHR7XG5cdFx0XHR0cmFuc2Zvcm06IGBzY2FsZVgoLTEpYCxcblx0XHR9XG5cdCkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtTGFiZWwgPSBzdHlsZWQoIFRydW5jYXRlIClgXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDIwcHg7XG5cdGNvbG9yOiBpbmhlcml0O1xuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW1IZWxwVGV4dCA9IHN0eWxlZCggVHJ1bmNhdGUgKWBcblx0Zm9udC1zaXplOiAkeyBmb250KCAnaGVscFRleHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDE2cHg7XG5cdGNvbG9yOiAkeyBMSUdIVEVSX1RFWFRfQ09MT1IgfTtcblx0b3ZlcmZsb3ctd3JhcDogYW55d2hlcmU7XG5cblx0W2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKSAqOm5vdCggJHsgTWVudSB9ICkgJixcblx0W2FyaWEtZGlzYWJsZWQ9J3RydWUnXSAqOm5vdCggJHsgTWVudSB9ICkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG4iXX0= */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__41
  });
  var GroupLabel3 = /* @__PURE__ */ createStyled(MenuGroupLabel, false ? {
    target: "e1wg7tti4"
  } : {
    target: "e1wg7tti4",
    label: "GroupLabel"
  })("grid-column:1/-1;padding-block-start:", space(3), ";padding-block-end:", space(2), ";padding-inline:", ITEM_PADDING_INLINE, ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1UzBEIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIGZvbnQsIHJ0bCwgQ09ORklHLCBEUk9QRE9XTl9NT1RJT05fQ1NTIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgSWNvbiBmcm9tICcuLi9pY29uJztcbmltcG9ydCB7IFRydW5jYXRlIH0gZnJvbSAnLi4vdHJ1bmNhdGUnO1xuaW1wb3J0IHR5cGUgeyBDb250ZXh0UHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuY29uc3QgQ09OVEVOVF9XUkFQUEVSX1BBRERJTkcgPSBzcGFjZSggMSApO1xuY29uc3QgSVRFTV9QQURESU5HX0JMT0NLID0gc3BhY2UoIDEgKTtcbmNvbnN0IElURU1fUEFERElOR19JTkxJTkUgPSBzcGFjZSggMyApO1xuXG4vLyBUT0RPOlxuLy8gLSBib3JkZXIgY29sb3IgYW5kIGRpdmlkZXIgY29sb3IgYXJlIGRpZmZlcmVudCBmcm9tIENPTE9SUy50aGVtZSB2YXJpYWJsZXNcbi8vIC0gbGlnaHRlciB0ZXh0IGNvbG9yIGlzIG5vdCBkZWZpbmVkIGluIENPTE9SUy50aGVtZSwgc2hvdWxkIGl0IGJlP1xuLy8gLSBsaWdodGVyIGJhY2tncm91bmQgY29sb3IgaXMgbm90IGRlZmluZWQgaW4gQ09MT1JTLnRoZW1lLCBzaG91bGQgaXQgYmU/XG5jb25zdCBERUZBVUxUX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXTtcbmNvbnN0IERJVklERVJfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgMjAwIF07XG5jb25zdCBMSUdIVEVSX1RFWFRfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF07XG5jb25zdCBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SID0gQ09MT1JTLnRoZW1lLmdyYXlbIDEwMCBdO1xuY29uc3QgVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kO1xuY29uc3QgREVGQVVMVF9CT1hfU0hBRE9XID0gYDAgMCAwICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9ICR7IERFRkFVTFRfQk9SREVSX0NPTE9SIH0sICR7IENPTkZJRy5lbGV2YXRpb25NZWRpdW0gfWA7XG5jb25zdCBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPVyA9IGAwIDAgMCAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSAkeyBUT09MQkFSX1ZBUklBTlRfQk9SREVSX0NPTE9SIH1gO1xuXG5jb25zdCBHUklEX1RFTVBMQVRFX0NPTFMgPSAnbWlubWF4KCAwLCBtYXgtY29udGVudCApIDFmcic7XG5cbmV4cG9ydCBjb25zdCBNZW51ID0gc3R5bGVkKCBBcmlha2l0Lk1lbnUgKTwgUGljazwgQ29udGV4dFByb3BzLCAndmFyaWFudCcgPiA+YFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdC8qIFNhbWUgYXMgcG9wb3ZlciBjb21wb25lbnQgKi9cblx0LyogVE9ETzogaXMgdGhlcmUgYSB3YXkgdG8gcmVhZCB0aGUgc2FzcyB2YXJpYWJsZT8gKi9cblx0ei1pbmRleDogMTAwMDAwMDtcblxuXHRkaXNwbGF5OiBncmlkO1xuXHRncmlkLXRlbXBsYXRlLWNvbHVtbnM6ICR7IEdSSURfVEVNUExBVEVfQ09MUyB9O1xuXHRncmlkLXRlbXBsYXRlLXJvd3M6IGF1dG87XG5cblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0bWluLXdpZHRoOiAxNjBweDtcblx0bWF4LXdpZHRoOiAzMjBweDtcblx0bWF4LWhlaWdodDogdmFyKCAtLXBvcG92ZXItYXZhaWxhYmxlLWhlaWdodCApO1xuXG5cdHBhZGRpbmc6ICR7IENPTlRFTlRfV1JBUFBFUl9QQURESU5HIH07XG5cblx0b3ZlcnNjcm9sbC1iZWhhdmlvcjogY29udGFpbjtcblx0b3ZlcmZsb3c6IGF1dG87XG5cblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c01lZGl1bSB9O1xuXHQkeyAoIHByb3BzICkgPT4gY3NzYFxuXHRcdGJveC1zaGFkb3c6ICR7IHByb3BzLnZhcmlhbnQgPT09ICd0b29sYmFyJ1xuXHRcdFx0PyBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPV1xuXHRcdFx0OiBERUZBVUxUX0JPWF9TSEFET1cgfTtcblx0YCB9XG5cblx0LyogT25seSB2aXNpYmxlIGluIFdpbmRvd3MgSGlnaCBDb250cmFzdCBtb2RlICovXG5cdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudCAhaW1wb3J0YW50O1xuXG5cdC8qIE9wZW4vY2xvc2UgYW5pbWF0aW9uICovXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdHRyYW5zaXRpb24tcHJvcGVydHk6IHRyYW5zZm9ybSwgb3BhY2l0eTtcblx0XHR0cmFuc2l0aW9uLWR1cmF0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RVUkFUSU9OIH0sXG5cdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLkZBREVfRFVSQVRJT04gfTtcblx0XHR0cmFuc2l0aW9uLXRpbWluZy1mdW5jdGlvbjogJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9FQVNJTkcgfSxcblx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9FQVNJTkcgfTtcblx0XHR3aWxsLWNoYW5nZTogdHJhbnNmb3JtLCBvcGFjaXR5O1xuXG5cdFx0Jjpub3QoIFtkYXRhLXN1Ym1lbnVdICkge1xuXHRcdFx0LyogUmVnYXJkbGVzcyBvZiB0aGUgc2lkZSwgZmFkZSBpbiBhbmQgb3V0LiAqL1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHRcdCZbZGF0YS1lbnRlcl0ge1xuXHRcdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0fVxuXG5cdFx0XHQvKiBTbGlkZSBpbiB0aGUgZGlyZWN0aW9uIHRoZSBtZW51IGlzIG9wZW5pbmcuICovXG5cdFx0XHQmW2RhdGEtc2lkZT0nYm90dG9tJ10ge1xuXHRcdFx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoXG5cdFx0XHRcdFx0LSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J3RvcCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVZKFxuXHRcdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J2xlZnQnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWChcblx0XHRcdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKFxuXHRcdFx0XHRcdC0keyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdib3R0b20nXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSd0b3AnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWSggMCApO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLWVudGVyXVtkYXRhLXNpZGU9J2xlZnQnXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKCAwICk7XG5cdFx0XHR9XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBiYXNlSXRlbSA9IGNzc2Bcblx0YWxsOiB1bnNldDtcblxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCA4ICkgfTtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQvKiBPY2N1cHkgdGhlIHdpZHRoIG9mIGFsbCBncmlkIGNvbHVtbnMgKGllLiBmdWxsIHdpZHRoKSAqL1xuXHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogJHsgR1JJRF9URU1QTEFURV9DT0xTIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cblx0QHN1cHBvcnRzICggZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiBzdWJncmlkICkge1xuXHRcdC8qXG5cdFx0ICogRGVmaW5lIGEgZ3JpZCBsYXlvdXQgd2hpY2ggaW5oZXJpdHMgdGhlIHNhbWUgY29sdW1ucyBjb25maWd1cmF0aW9uXG5cdFx0ICogZnJvbSB0aGUgcGFyZW50IGxheW91dCAoaWUuIHN1YmdyaWQpLiBUaGlzIGFsbG93cyB0aGUgbWVudVxuXHRcdCAqIHRvIHN5bmNocm9uaXplIHRoZSBpbmRlbnRhdGlvbiBvZiBhbGwgaXRzIGl0ZW1zLlxuXHRcdCAqL1xuXHRcdGdyaWQtdGVtcGxhdGUtY29sdW1uczogc3ViZ3JpZDtcblx0fVxuXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdGZvbnQtd2VpZ2h0OiBub3JtYWw7XG5cdGxpbmUtaGVpZ2h0OiAyMHB4O1xuXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRwYWRkaW5nLWJsb2NrOiAkeyBJVEVNX1BBRERJTkdfQkxPQ0sgfTtcblx0cGFkZGluZy1pbmxpbmU6ICR7IElURU1fUEFERElOR19JTkxJTkUgfTtcblxuXHQvKlxuXHQgKiBNYWtlIHN1cmUgdGhhdCwgd2hlbiBhbiBpdGVtIGlzIHNjcm9sbGVkIGludG8gdmlldyAoZWcuIHdoaWxlIHVzaW5nIHRoZVxuXHQgKiBrZXlib2FyZCB0byBtb3ZlIGZvY3VzKSwgdGhlIHdob2xlIGl0ZW0gY29tZXMgaW50byB2aWV3XG5cdCAqL1xuXHRzY3JvbGwtbWFyZ2luOiAkeyBDT05URU5UX1dSQVBQRVJfUEFERElORyB9O1xuXG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRvdXRsaW5lOiBub25lO1xuXG5cdCZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLnRleHREaXNhYmxlZCB9O1xuXHRcdGN1cnNvcjogbm90LWFsbG93ZWQ7XG5cdH1cblxuXHQvKiBBY3RpdmUgaXRlbSAoaW5jbHVkaW5nIGhvdmVyKSAqL1xuXHQmW2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKTpub3QoXG5cdFx0XHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddXG5cdFx0KSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblx0fVxuXG5cdC8qIEtleWJvYXJkIGZvY3VzIChmb2N1cy12aXNpYmxlKSAqL1xuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdGJveC1zaGFkb3c6IDAgMCAwIDEuNXB4ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0fVxuXG5cdC8qIEFjdGl2ZSAoaWUuIHByZXNzZWQsIG1vdXNlIGRvd24pICovXG5cdCY6YWN0aXZlLFxuXHQmW2RhdGEtYWN0aXZlXSB7XG5cdFx0LyogVE9ETzogc2hvdWxkIHRoZXJlIGJlIGEgdmlzdWFsIGFjdGl2ZSBzdGF0ZT8gKi9cblx0fVxuXG5cdC8qIFdoZW4gdGhlIGl0ZW0gaXMgdGhlIHRyaWdnZXIgb2YgYW4gb3BlbiBzdWJtZW51ICovXG5cdCR7IE1lbnUgfTpub3QoOmZvY3VzKSAmOm5vdCg6Zm9jdXMpW2FyaWEtZXhwYW5kZWQ9XCJ0cnVlXCJdIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SIH07XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdH1cblxuXHRzdmcge1xuXHRcdGZpbGw6IGN1cnJlbnRDb2xvcjtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW0gKWBcblx0JHsgYmFzZUl0ZW0gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBDaGVja2JveEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW1DaGVja2JveCApYFxuXHQkeyBiYXNlSXRlbSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFJhZGlvSXRlbSA9IHN0eWxlZCggQXJpYWtpdC5NZW51SXRlbVJhZGlvIClgXG5cdCR7IGJhc2VJdGVtIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVByZWZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0LyogQWx3YXlzIG9jY3VweSB0aGUgZmlyc3QgY29sdW1uLCBldmVuIHdoZW4gYXV0by1jb2xsYXBzaW5nICovXG5cdGdyaWQtY29sdW1uOiAxO1xuXG5cdC8qXG5cdCAqIEV2ZW4gd2hlbiB0aGUgaXRlbSBpcyBub3QgY2hlY2tlZCwgb2NjdXB5IHRoZSBzYW1lIHNjcmVlbiBzcGFjZSB0byBhdm9pZFxuXHQgKiB0aGUgc3BhY2UgY29sbGFwc2lkZSB3aGVuIG5vIGl0ZW1zIGFyZSBjaGVja2VkLlxuXHQgKi9cblx0JHsgQ2hlY2tib3hJdGVtIH0gPiAmLFxuXHQkeyBSYWRpb0l0ZW0gfSA+ICYge1xuXHRcdC8qIFNhbWUgd2lkdGggYXMgdGhlIGNoZWNrIGljb25zICovXG5cdFx0bWluLXdpZHRoOiAkeyBzcGFjZSggNiApIH07XG5cdH1cblxuXHQkeyBDaGVja2JveEl0ZW0gfSA+ICYsXG5cdCR7IFJhZGlvSXRlbSB9ID4gJixcblx0Jjpub3QoIDplbXB0eSApIHtcblx0XHRtYXJnaW4taW5saW5lLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHR9XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBhY3RpdmUsIGV4Y2VwdCB3aGVuIGl0J3MgYSBub24tZm9jdXNlZC9ob3ZlcmVkXG5cdCogc3VibWVudSB0cmlnZ2VyIChpbiB0aGF0IGNhc2UsIGNvbG9yIHNob3VsZCBub3QgYmUgaW5oZXJpdGVkKVxuXHQqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApID4gJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddID4gJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ29udGVudFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQvKlxuXHQgKiBBbHdheXMgb2NjdXB5IHRoZSBzZWNvbmQgY29sdW1uLCBzaW5jZSB0aGUgZmlyc3QgY29sdW1uXG5cdCAqIGlzIHRha2VuIGJ5IHRoZSBwcmVmaXggd3JhcHBlciAod2hlbiBkaXNwbGF5ZWQpLlxuXHQgKi9cblx0Z3JpZC1jb2x1bW46IDI7XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRnYXA6ICR7IHNwYWNlKCAzICkgfTtcblxuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ2hpbGRyZW5XcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0ZmxleDogMTtcblxuXHRkaXNwbGF5OiBpbmxpbmUtZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblx0Z2FwOiAkeyBzcGFjZSggMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVN1ZmZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZmxleDogMCAxIGZpdC1jb250ZW50O1xuXHRtaW4td2lkdGg6IDA7XG5cdHdpZHRoOiBmaXQtY29udGVudDtcblxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0Z2FwOiAkeyBzcGFjZSggMyApIH07XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCAqIFdoZW4gdGhlIHBhcmVudCBtZW51IGl0ZW0gaXMgYWN0aXZlLCBleGNlcHQgd2hlbiBpdCdzIGEgbm9uLWZvY3VzZWQvaG92ZXJlZFxuXHQgKiBzdWJtZW51IHRyaWdnZXIgKGluIHRoYXQgY2FzZSwgY29sb3Igc2hvdWxkIG5vdCBiZSBpbmhlcml0ZWQpXG5cdCAqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApICo6bm90KCR7IE1lbnUgfSkgJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICo6bm90KCR7IE1lbnUgfSkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cCA9IHN0eWxlZCggQXJpYWtpdC5NZW51R3JvdXAgKWBcblx0LyogSWdub3JlIHRoaXMgZWxlbWVudCB3aGVuIGNhbGN1bGF0aW5nIHRoZSBsYXlvdXQuIFVzZWZ1bCBmb3Igc3ViZ3JpZCAqL1xuXHRkaXNwbGF5OiBjb250ZW50cztcbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cExhYmVsID0gc3R5bGVkKCBBcmlha2l0Lk1lbnVHcm91cExhYmVsIClgXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0cGFkZGluZy1ibG9jay1zdGFydDogJHsgc3BhY2UoIDMgKSB9O1xuXHRwYWRkaW5nLWJsb2NrLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHRwYWRkaW5nLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFNlcGFyYXRvciA9IHN0eWxlZCggQXJpYWtpdC5NZW51U2VwYXJhdG9yICk8XG5cdFBpY2s8IENvbnRleHRQcm9wcywgJ3ZhcmlhbnQnID5cbj5gXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0Ym9yZGVyOiBub25lO1xuXHRoZWlnaHQ6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9O1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyAoIHByb3BzICkgPT5cblx0XHRwcm9wcy52YXJpYW50ID09PSAndG9vbGJhcidcblx0XHRcdD8gVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUlxuXHRcdFx0OiBESVZJREVSX0NPTE9SIH07XG5cdC8qIEFsaWduIHdpdGggbWVudSBpdGVtcycgY29udGVudCAqL1xuXHRtYXJnaW4tYmxvY2s6ICR7IHNwYWNlKCAyICkgfTtcblx0bWFyZ2luLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuXG5cdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VibWVudUNoZXZyb25JY29uID0gc3R5bGVkKCBJY29uIClgXG5cdHdpZHRoOiAkeyBzcGFjZSggMS41ICkgfTtcblx0JHsgcnRsKFxuXHRcdHtcblx0XHRcdHRyYW5zZm9ybTogYHNjYWxlWCgxKWAsXG5cdFx0fSxcblx0XHR7XG5cdFx0XHR0cmFuc2Zvcm06IGBzY2FsZVgoLTEpYCxcblx0XHR9XG5cdCkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtTGFiZWwgPSBzdHlsZWQoIFRydW5jYXRlIClgXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDIwcHg7XG5cdGNvbG9yOiBpbmhlcml0O1xuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW1IZWxwVGV4dCA9IHN0eWxlZCggVHJ1bmNhdGUgKWBcblx0Zm9udC1zaXplOiAkeyBmb250KCAnaGVscFRleHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDE2cHg7XG5cdGNvbG9yOiAkeyBMSUdIVEVSX1RFWFRfQ09MT1IgfTtcblx0b3ZlcmZsb3ctd3JhcDogYW55d2hlcmU7XG5cblx0W2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKSAqOm5vdCggJHsgTWVudSB9ICkgJixcblx0W2FyaWEtZGlzYWJsZWQ9J3RydWUnXSAqOm5vdCggJHsgTWVudSB9ICkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG4iXX0= */"));
  var Separator3 = /* @__PURE__ */ createStyled(MenuSeparator, false ? {
    target: "e1wg7tti3"
  } : {
    target: "e1wg7tti3",
    label: "Separator"
  })("grid-column:1/-1;border:none;height:", config_values_default.borderWidth, ";background-color:", (props) => props.variant === "toolbar" ? TOOLBAR_VARIANT_BORDER_COLOR : DIVIDER_COLOR, ";margin-block:", space(2), ";margin-inline:", ITEM_PADDING_INLINE, ";outline:2px solid transparent;" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrVEMiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0ICogYXMgQXJpYWtpdCBmcm9tICdAYXJpYWtpdC9yZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IENPTE9SUywgZm9udCwgcnRsLCBDT05GSUcsIERST1BET1dOX01PVElPTl9DU1MgfSBmcm9tICcuLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCBJY29uIGZyb20gJy4uL2ljb24nO1xuaW1wb3J0IHsgVHJ1bmNhdGUgfSBmcm9tICcuLi90cnVuY2F0ZSc7XG5pbXBvcnQgdHlwZSB7IENvbnRleHRQcm9wcyB9IGZyb20gJy4vdHlwZXMnO1xuXG5jb25zdCBDT05URU5UX1dSQVBQRVJfUEFERElORyA9IHNwYWNlKCAxICk7XG5jb25zdCBJVEVNX1BBRERJTkdfQkxPQ0sgPSBzcGFjZSggMSApO1xuY29uc3QgSVRFTV9QQURESU5HX0lOTElORSA9IHNwYWNlKCAzICk7XG5cbi8vIFRPRE86XG4vLyAtIGJvcmRlciBjb2xvciBhbmQgZGl2aWRlciBjb2xvciBhcmUgZGlmZmVyZW50IGZyb20gQ09MT1JTLnRoZW1lIHZhcmlhYmxlc1xuLy8gLSBsaWdodGVyIHRleHQgY29sb3IgaXMgbm90IGRlZmluZWQgaW4gQ09MT1JTLnRoZW1lLCBzaG91bGQgaXQgYmU/XG4vLyAtIGxpZ2h0ZXIgYmFja2dyb3VuZCBjb2xvciBpcyBub3QgZGVmaW5lZCBpbiBDT0xPUlMudGhlbWUsIHNob3VsZCBpdCBiZT9cbmNvbnN0IERFRkFVTFRfQk9SREVSX0NPTE9SID0gQ09MT1JTLnRoZW1lLmdyYXlbIDMwMCBdO1xuY29uc3QgRElWSURFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5ncmF5WyAyMDAgXTtcbmNvbnN0IExJR0hURVJfVEVYVF9DT0xPUiA9IENPTE9SUy50aGVtZS5ncmF5WyA3MDAgXTtcbmNvbnN0IExJR0hUX0JBQ0tHUk9VTkRfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgMTAwIF07XG5jb25zdCBUT09MQkFSX1ZBUklBTlRfQk9SREVSX0NPTE9SID0gQ09MT1JTLnRoZW1lLmZvcmVncm91bmQ7XG5jb25zdCBERUZBVUxUX0JPWF9TSEFET1cgPSBgMCAwIDAgJHsgQ09ORklHLmJvcmRlcldpZHRoIH0gJHsgREVGQVVMVF9CT1JERVJfQ09MT1IgfSwgJHsgQ09ORklHLmVsZXZhdGlvbk1lZGl1bSB9YDtcbmNvbnN0IFRPT0xCQVJfVkFSSUFOVF9CT1hfU0hBRE9XID0gYDAgMCAwICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9ICR7IFRPT0xCQVJfVkFSSUFOVF9CT1JERVJfQ09MT1IgfWA7XG5cbmNvbnN0IEdSSURfVEVNUExBVEVfQ09MUyA9ICdtaW5tYXgoIDAsIG1heC1jb250ZW50ICkgMWZyJztcblxuZXhwb3J0IGNvbnN0IE1lbnUgPSBzdHlsZWQoIEFyaWFraXQuTWVudSApPCBQaWNrPCBDb250ZXh0UHJvcHMsICd2YXJpYW50JyA+ID5gXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0LyogU2FtZSBhcyBwb3BvdmVyIGNvbXBvbmVudCAqL1xuXHQvKiBUT0RPOiBpcyB0aGVyZSBhIHdheSB0byByZWFkIHRoZSBzYXNzIHZhcmlhYmxlPyAqL1xuXHR6LWluZGV4OiAxMDAwMDAwO1xuXG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogJHsgR1JJRF9URU1QTEFURV9DT0xTIH07XG5cdGdyaWQtdGVtcGxhdGUtcm93czogYXV0bztcblxuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRtaW4td2lkdGg6IDE2MHB4O1xuXHRtYXgtd2lkdGg6IDMyMHB4O1xuXHRtYXgtaGVpZ2h0OiB2YXIoIC0tcG9wb3Zlci1hdmFpbGFibGUtaGVpZ2h0ICk7XG5cblx0cGFkZGluZzogJHsgQ09OVEVOVF9XUkFQUEVSX1BBRERJTkcgfTtcblxuXHRvdmVyc2Nyb2xsLWJlaGF2aW9yOiBjb250YWluO1xuXHRvdmVyZmxvdzogYXV0bztcblxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudWkuYmFja2dyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzTWVkaXVtIH07XG5cdCR7ICggcHJvcHMgKSA9PiBjc3NgXG5cdFx0Ym94LXNoYWRvdzogJHsgcHJvcHMudmFyaWFudCA9PT0gJ3Rvb2xiYXInXG5cdFx0XHQ/IFRPT0xCQVJfVkFSSUFOVF9CT1hfU0hBRE9XXG5cdFx0XHQ6IERFRkFVTFRfQk9YX1NIQURPVyB9O1xuXHRgIH1cblxuXHQvKiBPbmx5IHZpc2libGUgaW4gV2luZG93cyBIaWdoIENvbnRyYXN0IG1vZGUgKi9cblx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50ICFpbXBvcnRhbnQ7XG5cblx0LyogT3Blbi9jbG9zZSBhbmltYXRpb24gKi9cblx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0dHJhbnNpdGlvbi1wcm9wZXJ0eTogdHJhbnNmb3JtLCBvcGFjaXR5O1xuXHRcdHRyYW5zaXRpb24tZHVyYXRpb246ICR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRFVSQVRJT04gfSxcblx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9EVVJBVElPTiB9O1xuXHRcdHRyYW5zaXRpb24tdGltaW5nLWZ1bmN0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0VBU0lORyB9LFxuXHRcdFx0JHsgRFJPUERPV05fTU9USU9OX0NTUy5GQURFX0VBU0lORyB9O1xuXHRcdHdpbGwtY2hhbmdlOiB0cmFuc2Zvcm0sIG9wYWNpdHk7XG5cblx0XHQmOm5vdCggW2RhdGEtc3VibWVudV0gKSB7XG5cdFx0XHQvKiBSZWdhcmRsZXNzIG9mIHRoZSBzaWRlLCBmYWRlIGluIGFuZCBvdXQuICovXG5cdFx0XHRvcGFjaXR5OiAwO1xuXHRcdFx0JltkYXRhLWVudGVyXSB7XG5cdFx0XHRcdG9wYWNpdHk6IDE7XG5cdFx0XHR9XG5cblx0XHRcdC8qIFNsaWRlIGluIHRoZSBkaXJlY3Rpb24gdGhlIG1lbnUgaXMgb3BlbmluZy4gKi9cblx0XHRcdCZbZGF0YS1zaWRlPSdib3R0b20nXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWShcblx0XHRcdFx0XHQtJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9ESVNUQU5DRSB9XG5cdFx0XHRcdCk7XG5cdFx0XHR9XG5cdFx0XHQmW2RhdGEtc2lkZT0ndG9wJ10ge1xuXHRcdFx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoXG5cdFx0XHRcdFx0JHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9ESVNUQU5DRSB9XG5cdFx0XHRcdCk7XG5cdFx0XHR9XG5cdFx0XHQmW2RhdGEtc2lkZT0nbGVmdCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKFxuXHRcdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J3JpZ2h0J10ge1xuXHRcdFx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoXG5cdFx0XHRcdFx0LSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLWVudGVyXVtkYXRhLXNpZGU9J2JvdHRvbSddLFxuXHRcdFx0JltkYXRhLWVudGVyXVtkYXRhLXNpZGU9J3RvcCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVZKCAwICk7XG5cdFx0XHR9XG5cdFx0XHQmW2RhdGEtZW50ZXJdW2RhdGEtc2lkZT0nbGVmdCddLFxuXHRcdFx0JltkYXRhLWVudGVyXVtkYXRhLXNpZGU9J3JpZ2h0J10ge1xuXHRcdFx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoIDAgKTtcblx0XHRcdH1cblx0XHR9XG5cdH1cbmA7XG5cbmNvbnN0IGJhc2VJdGVtID0gY3NzYFxuXHRhbGw6IHVuc2V0O1xuXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0bWluLWhlaWdodDogJHsgc3BhY2UoIDggKSB9O1xuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0ZGlzcGxheTogZ3JpZDtcblx0Z3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiAkeyBHUklEX1RFTVBMQVRFX0NPTFMgfTtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblxuXHRAc3VwcG9ydHMgKCBncmlkLXRlbXBsYXRlLWNvbHVtbnM6IHN1YmdyaWQgKSB7XG5cdFx0Lypcblx0XHQgKiBEZWZpbmUgYSBncmlkIGxheW91dCB3aGljaCBpbmhlcml0cyB0aGUgc2FtZSBjb2x1bW5zIGNvbmZpZ3VyYXRpb25cblx0XHQgKiBmcm9tIHRoZSBwYXJlbnQgbGF5b3V0IChpZS4gc3ViZ3JpZCkuIFRoaXMgYWxsb3dzIHRoZSBtZW51XG5cdFx0ICogdG8gc3luY2hyb25pemUgdGhlIGluZGVudGF0aW9uIG9mIGFsbCBpdHMgaXRlbXMuXG5cdFx0ICovXG5cdFx0Z3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiBzdWJncmlkO1xuXHR9XG5cblx0Zm9udC1zaXplOiAkeyBmb250KCAnZGVmYXVsdC5mb250U2l6ZScgKSB9O1xuXHRmb250LWZhbWlseTogaW5oZXJpdDtcblx0Zm9udC13ZWlnaHQ6IG5vcm1hbDtcblx0bGluZS1oZWlnaHQ6IDIwcHg7XG5cblx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXG5cdHBhZGRpbmctYmxvY2s6ICR7IElURU1fUEFERElOR19CTE9DSyB9O1xuXHRwYWRkaW5nLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuXG5cdC8qXG5cdCAqIE1ha2Ugc3VyZSB0aGF0LCB3aGVuIGFuIGl0ZW0gaXMgc2Nyb2xsZWQgaW50byB2aWV3IChlZy4gd2hpbGUgdXNpbmcgdGhlXG5cdCAqIGtleWJvYXJkIHRvIG1vdmUgZm9jdXMpLCB0aGUgd2hvbGUgaXRlbSBjb21lcyBpbnRvIHZpZXdcblx0ICovXG5cdHNjcm9sbC1tYXJnaW46ICR7IENPTlRFTlRfV1JBUFBFUl9QQURESU5HIH07XG5cblx0dXNlci1zZWxlY3Q6IG5vbmU7XG5cdG91dGxpbmU6IG5vbmU7XG5cblx0JlthcmlhLWRpc2FibGVkPSd0cnVlJ10ge1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudWkudGV4dERpc2FibGVkIH07XG5cdFx0Y3Vyc29yOiBub3QtYWxsb3dlZDtcblx0fVxuXG5cdC8qIEFjdGl2ZSBpdGVtIChpbmNsdWRpbmcgaG92ZXIpICovXG5cdCZbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApOm5vdChcblx0XHRcdFthcmlhLWRpc2FibGVkPSd0cnVlJ11cblx0XHQpIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnRJbnZlcnRlZCB9O1xuXHR9XG5cblx0LyogS2V5Ym9hcmQgZm9jdXMgKGZvY3VzLXZpc2libGUpICovXG5cdCZbZGF0YS1mb2N1cy12aXNpYmxlXSB7XG5cdFx0Ym94LXNoYWRvdzogMCAwIDAgMS41cHggJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXG5cdFx0LyogT25seSB2aXNpYmxlIGluIFdpbmRvd3MgSGlnaCBDb250cmFzdCBtb2RlICovXG5cdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHR9XG5cblx0LyogQWN0aXZlIChpZS4gcHJlc3NlZCwgbW91c2UgZG93bikgKi9cblx0JjphY3RpdmUsXG5cdCZbZGF0YS1hY3RpdmVdIHtcblx0XHQvKiBUT0RPOiBzaG91bGQgdGhlcmUgYmUgYSB2aXN1YWwgYWN0aXZlIHN0YXRlPyAqL1xuXHR9XG5cblx0LyogV2hlbiB0aGUgaXRlbSBpcyB0aGUgdHJpZ2dlciBvZiBhbiBvcGVuIHN1Ym1lbnUgKi9cblx0JHsgTWVudSB9Om5vdCg6Zm9jdXMpICY6bm90KDpmb2N1cylbYXJpYS1leHBhbmRlZD1cInRydWVcIl0ge1xuXHRcdGJhY2tncm91bmQtY29sb3I6ICR7IExJR0hUX0JBQ0tHUk9VTkRfQ09MT1IgfTtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0fVxuXG5cdHN2ZyB7XG5cdFx0ZmlsbDogY3VycmVudENvbG9yO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbSA9IHN0eWxlZCggQXJpYWtpdC5NZW51SXRlbSApYFxuXHQkeyBiYXNlSXRlbSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IENoZWNrYm94SXRlbSA9IHN0eWxlZCggQXJpYWtpdC5NZW51SXRlbUNoZWNrYm94IClgXG5cdCR7IGJhc2VJdGVtIH07XG5gO1xuXG5leHBvcnQgY29uc3QgUmFkaW9JdGVtID0gc3R5bGVkKCBBcmlha2l0Lk1lbnVJdGVtUmFkaW8gKWBcblx0JHsgYmFzZUl0ZW0gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtUHJlZml4V3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHQvKiBBbHdheXMgb2NjdXB5IHRoZSBmaXJzdCBjb2x1bW4sIGV2ZW4gd2hlbiBhdXRvLWNvbGxhcHNpbmcgKi9cblx0Z3JpZC1jb2x1bW46IDE7XG5cblx0Lypcblx0ICogRXZlbiB3aGVuIHRoZSBpdGVtIGlzIG5vdCBjaGVja2VkLCBvY2N1cHkgdGhlIHNhbWUgc2NyZWVuIHNwYWNlIHRvIGF2b2lkXG5cdCAqIHRoZSBzcGFjZSBjb2xsYXBzaWRlIHdoZW4gbm8gaXRlbXMgYXJlIGNoZWNrZWQuXG5cdCAqL1xuXHQkeyBDaGVja2JveEl0ZW0gfSA+ICYsXG5cdCR7IFJhZGlvSXRlbSB9ID4gJiB7XG5cdFx0LyogU2FtZSB3aWR0aCBhcyB0aGUgY2hlY2sgaWNvbnMgKi9cblx0XHRtaW4td2lkdGg6ICR7IHNwYWNlKCA2ICkgfTtcblx0fVxuXG5cdCR7IENoZWNrYm94SXRlbSB9ID4gJixcblx0JHsgUmFkaW9JdGVtIH0gPiAmLFxuXHQmOm5vdCggOmVtcHR5ICkge1xuXHRcdG1hcmdpbi1pbmxpbmUtZW5kOiAkeyBzcGFjZSggMiApIH07XG5cdH1cblxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblxuXHRjb2xvcjogJHsgTElHSFRFUl9URVhUX0NPTE9SIH07XG5cblx0Lypcblx0KiBXaGVuIHRoZSBwYXJlbnQgbWVudSBpdGVtIGlzIGFjdGl2ZSwgZXhjZXB0IHdoZW4gaXQncyBhIG5vbi1mb2N1c2VkL2hvdmVyZWRcblx0KiBzdWJtZW51IHRyaWdnZXIgKGluIHRoYXQgY2FzZSwgY29sb3Igc2hvdWxkIG5vdCBiZSBpbmhlcml0ZWQpXG5cdCovXG5cdFtkYXRhLWFjdGl2ZS1pdGVtXTpub3QoIFtkYXRhLWZvY3VzLXZpc2libGVdICkgPiAmLFxuXHQvKiBXaGVuIHRoZSBwYXJlbnQgbWVudSBpdGVtIGlzIGRpc2FibGVkICovXG5cdFthcmlhLWRpc2FibGVkPSd0cnVlJ10gPiAmIHtcblx0XHRjb2xvcjogaW5oZXJpdDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW1Db250ZW50V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdC8qXG5cdCAqIEFsd2F5cyBvY2N1cHkgdGhlIHNlY29uZCBjb2x1bW4sIHNpbmNlIHRoZSBmaXJzdCBjb2x1bW5cblx0ICogaXMgdGFrZW4gYnkgdGhlIHByZWZpeCB3cmFwcGVyICh3aGVuIGRpc3BsYXllZCkuXG5cdCAqL1xuXHRncmlkLWNvbHVtbjogMjtcblxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG5cdGdhcDogJHsgc3BhY2UoIDMgKSB9O1xuXG5cdHBvaW50ZXItZXZlbnRzOiBub25lO1xuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW1DaGlsZHJlbldyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRmbGV4OiAxO1xuXG5cdGRpc3BsYXk6IGlubGluZS1mbGV4O1xuXHRmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXHRnYXA6ICR7IHNwYWNlKCAxICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtU3VmZml4V3JhcHBlciA9IHN0eWxlZC5zcGFuYFxuXHRmbGV4OiAwIDEgZml0LWNvbnRlbnQ7XG5cdG1pbi13aWR0aDogMDtcblx0d2lkdGg6IGZpdC1jb250ZW50O1xuXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRnYXA6ICR7IHNwYWNlKCAzICkgfTtcblxuXHRjb2xvcjogJHsgTElHSFRFUl9URVhUX0NPTE9SIH07XG5cblx0Lypcblx0ICogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBhY3RpdmUsIGV4Y2VwdCB3aGVuIGl0J3MgYSBub24tZm9jdXNlZC9ob3ZlcmVkXG5cdCAqIHN1Ym1lbnUgdHJpZ2dlciAoaW4gdGhhdCBjYXNlLCBjb2xvciBzaG91bGQgbm90IGJlIGluaGVyaXRlZClcblx0ICovXG5cdFtkYXRhLWFjdGl2ZS1pdGVtXTpub3QoIFtkYXRhLWZvY3VzLXZpc2libGVdICkgKjpub3QoJHsgTWVudSB9KSAmLFxuXHQvKiBXaGVuIHRoZSBwYXJlbnQgbWVudSBpdGVtIGlzIGRpc2FibGVkICovXG5cdFthcmlhLWRpc2FibGVkPSd0cnVlJ10gKjpub3QoJHsgTWVudSB9KSAmIHtcblx0XHRjb2xvcjogaW5oZXJpdDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEdyb3VwID0gc3R5bGVkKCBBcmlha2l0Lk1lbnVHcm91cCApYFxuXHQvKiBJZ25vcmUgdGhpcyBlbGVtZW50IHdoZW4gY2FsY3VsYXRpbmcgdGhlIGxheW91dC4gVXNlZnVsIGZvciBzdWJncmlkICovXG5cdGRpc3BsYXk6IGNvbnRlbnRzO1xuYDtcblxuZXhwb3J0IGNvbnN0IEdyb3VwTGFiZWwgPSBzdHlsZWQoIEFyaWFraXQuTWVudUdyb3VwTGFiZWwgKWBcblx0LyogT2NjdXB5IHRoZSB3aWR0aCBvZiBhbGwgZ3JpZCBjb2x1bW5zIChpZS4gZnVsbCB3aWR0aCkgKi9cblx0Z3JpZC1jb2x1bW46IDEgLyAtMTtcblxuXHRwYWRkaW5nLWJsb2NrLXN0YXJ0OiAkeyBzcGFjZSggMyApIH07XG5cdHBhZGRpbmctYmxvY2stZW5kOiAkeyBzcGFjZSggMiApIH07XG5cdHBhZGRpbmctaW5saW5lOiAkeyBJVEVNX1BBRERJTkdfSU5MSU5FIH07XG5gO1xuXG5leHBvcnQgY29uc3QgU2VwYXJhdG9yID0gc3R5bGVkKCBBcmlha2l0Lk1lbnVTZXBhcmF0b3IgKTxcblx0UGljazwgQ29udGV4dFByb3BzLCAndmFyaWFudCcgPlxuPmBcblx0LyogT2NjdXB5IHRoZSB3aWR0aCBvZiBhbGwgZ3JpZCBjb2x1bW5zIChpZS4gZnVsbCB3aWR0aCkgKi9cblx0Z3JpZC1jb2x1bW46IDEgLyAtMTtcblxuXHRib3JkZXI6IG5vbmU7XG5cdGhlaWdodDogJHsgQ09ORklHLmJvcmRlcldpZHRoIH07XG5cdGJhY2tncm91bmQtY29sb3I6ICR7ICggcHJvcHMgKSA9PlxuXHRcdHByb3BzLnZhcmlhbnQgPT09ICd0b29sYmFyJ1xuXHRcdFx0PyBUT09MQkFSX1ZBUklBTlRfQk9SREVSX0NPTE9SXG5cdFx0XHQ6IERJVklERVJfQ09MT1IgfTtcblx0LyogQWxpZ24gd2l0aCBtZW51IGl0ZW1zJyBjb250ZW50ICovXG5cdG1hcmdpbi1ibG9jazogJHsgc3BhY2UoIDIgKSB9O1xuXHRtYXJnaW4taW5saW5lOiAkeyBJVEVNX1BBRERJTkdfSU5MSU5FIH07XG5cblx0LyogT25seSB2aXNpYmxlIGluIFdpbmRvd3MgSGlnaCBDb250cmFzdCBtb2RlICovXG5cdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcbmA7XG5cbmV4cG9ydCBjb25zdCBTdWJtZW51Q2hldnJvbkljb24gPSBzdHlsZWQoIEljb24gKWBcblx0d2lkdGg6ICR7IHNwYWNlKCAxLjUgKSB9O1xuXHQkeyBydGwoXG5cdFx0e1xuXHRcdFx0dHJhbnNmb3JtOiBgc2NhbGVYKDEpYCxcblx0XHR9LFxuXHRcdHtcblx0XHRcdHRyYW5zZm9ybTogYHNjYWxlWCgtMSlgLFxuXHRcdH1cblx0KSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW1MYWJlbCA9IHN0eWxlZCggVHJ1bmNhdGUgKWBcblx0Zm9udC1zaXplOiAkeyBmb250KCAnZGVmYXVsdC5mb250U2l6ZScgKSB9O1xuXHRsaW5lLWhlaWdodDogMjBweDtcblx0Y29sb3I6IGluaGVyaXQ7XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbUhlbHBUZXh0ID0gc3R5bGVkKCBUcnVuY2F0ZSApYFxuXHRmb250LXNpemU6ICR7IGZvbnQoICdoZWxwVGV4dC5mb250U2l6ZScgKSB9O1xuXHRsaW5lLWhlaWdodDogMTZweDtcblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXHRvdmVyZmxvdy13cmFwOiBhbnl3aGVyZTtcblxuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApICo6bm90KCAkeyBNZW51IH0gKSAmLFxuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICo6bm90KCAkeyBNZW51IH0gKSAmIHtcblx0XHRjb2xvcjogaW5oZXJpdDtcblx0fVxuYDtcbiJdfQ== */"));
  var SubmenuChevronIcon = /* @__PURE__ */ createStyled(icon_default3, false ? {
    target: "e1wg7tti2"
  } : {
    target: "e1wg7tti2",
    label: "SubmenuChevronIcon"
  })("width:", space(1.5), ";", rtl({
    transform: `scaleX(1)`
  }, {
    transform: `scaleX(-1)`
  }), ";" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvVWdEIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIGZvbnQsIHJ0bCwgQ09ORklHLCBEUk9QRE9XTl9NT1RJT05fQ1NTIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgSWNvbiBmcm9tICcuLi9pY29uJztcbmltcG9ydCB7IFRydW5jYXRlIH0gZnJvbSAnLi4vdHJ1bmNhdGUnO1xuaW1wb3J0IHR5cGUgeyBDb250ZXh0UHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuY29uc3QgQ09OVEVOVF9XUkFQUEVSX1BBRERJTkcgPSBzcGFjZSggMSApO1xuY29uc3QgSVRFTV9QQURESU5HX0JMT0NLID0gc3BhY2UoIDEgKTtcbmNvbnN0IElURU1fUEFERElOR19JTkxJTkUgPSBzcGFjZSggMyApO1xuXG4vLyBUT0RPOlxuLy8gLSBib3JkZXIgY29sb3IgYW5kIGRpdmlkZXIgY29sb3IgYXJlIGRpZmZlcmVudCBmcm9tIENPTE9SUy50aGVtZSB2YXJpYWJsZXNcbi8vIC0gbGlnaHRlciB0ZXh0IGNvbG9yIGlzIG5vdCBkZWZpbmVkIGluIENPTE9SUy50aGVtZSwgc2hvdWxkIGl0IGJlP1xuLy8gLSBsaWdodGVyIGJhY2tncm91bmQgY29sb3IgaXMgbm90IGRlZmluZWQgaW4gQ09MT1JTLnRoZW1lLCBzaG91bGQgaXQgYmU/XG5jb25zdCBERUZBVUxUX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXTtcbmNvbnN0IERJVklERVJfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgMjAwIF07XG5jb25zdCBMSUdIVEVSX1RFWFRfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF07XG5jb25zdCBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SID0gQ09MT1JTLnRoZW1lLmdyYXlbIDEwMCBdO1xuY29uc3QgVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kO1xuY29uc3QgREVGQVVMVF9CT1hfU0hBRE9XID0gYDAgMCAwICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9ICR7IERFRkFVTFRfQk9SREVSX0NPTE9SIH0sICR7IENPTkZJRy5lbGV2YXRpb25NZWRpdW0gfWA7XG5jb25zdCBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPVyA9IGAwIDAgMCAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSAkeyBUT09MQkFSX1ZBUklBTlRfQk9SREVSX0NPTE9SIH1gO1xuXG5jb25zdCBHUklEX1RFTVBMQVRFX0NPTFMgPSAnbWlubWF4KCAwLCBtYXgtY29udGVudCApIDFmcic7XG5cbmV4cG9ydCBjb25zdCBNZW51ID0gc3R5bGVkKCBBcmlha2l0Lk1lbnUgKTwgUGljazwgQ29udGV4dFByb3BzLCAndmFyaWFudCcgPiA+YFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdC8qIFNhbWUgYXMgcG9wb3ZlciBjb21wb25lbnQgKi9cblx0LyogVE9ETzogaXMgdGhlcmUgYSB3YXkgdG8gcmVhZCB0aGUgc2FzcyB2YXJpYWJsZT8gKi9cblx0ei1pbmRleDogMTAwMDAwMDtcblxuXHRkaXNwbGF5OiBncmlkO1xuXHRncmlkLXRlbXBsYXRlLWNvbHVtbnM6ICR7IEdSSURfVEVNUExBVEVfQ09MUyB9O1xuXHRncmlkLXRlbXBsYXRlLXJvd3M6IGF1dG87XG5cblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0bWluLXdpZHRoOiAxNjBweDtcblx0bWF4LXdpZHRoOiAzMjBweDtcblx0bWF4LWhlaWdodDogdmFyKCAtLXBvcG92ZXItYXZhaWxhYmxlLWhlaWdodCApO1xuXG5cdHBhZGRpbmc6ICR7IENPTlRFTlRfV1JBUFBFUl9QQURESU5HIH07XG5cblx0b3ZlcnNjcm9sbC1iZWhhdmlvcjogY29udGFpbjtcblx0b3ZlcmZsb3c6IGF1dG87XG5cblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c01lZGl1bSB9O1xuXHQkeyAoIHByb3BzICkgPT4gY3NzYFxuXHRcdGJveC1zaGFkb3c6ICR7IHByb3BzLnZhcmlhbnQgPT09ICd0b29sYmFyJ1xuXHRcdFx0PyBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPV1xuXHRcdFx0OiBERUZBVUxUX0JPWF9TSEFET1cgfTtcblx0YCB9XG5cblx0LyogT25seSB2aXNpYmxlIGluIFdpbmRvd3MgSGlnaCBDb250cmFzdCBtb2RlICovXG5cdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudCAhaW1wb3J0YW50O1xuXG5cdC8qIE9wZW4vY2xvc2UgYW5pbWF0aW9uICovXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdHRyYW5zaXRpb24tcHJvcGVydHk6IHRyYW5zZm9ybSwgb3BhY2l0eTtcblx0XHR0cmFuc2l0aW9uLWR1cmF0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RVUkFUSU9OIH0sXG5cdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLkZBREVfRFVSQVRJT04gfTtcblx0XHR0cmFuc2l0aW9uLXRpbWluZy1mdW5jdGlvbjogJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9FQVNJTkcgfSxcblx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9FQVNJTkcgfTtcblx0XHR3aWxsLWNoYW5nZTogdHJhbnNmb3JtLCBvcGFjaXR5O1xuXG5cdFx0Jjpub3QoIFtkYXRhLXN1Ym1lbnVdICkge1xuXHRcdFx0LyogUmVnYXJkbGVzcyBvZiB0aGUgc2lkZSwgZmFkZSBpbiBhbmQgb3V0LiAqL1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHRcdCZbZGF0YS1lbnRlcl0ge1xuXHRcdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0fVxuXG5cdFx0XHQvKiBTbGlkZSBpbiB0aGUgZGlyZWN0aW9uIHRoZSBtZW51IGlzIG9wZW5pbmcuICovXG5cdFx0XHQmW2RhdGEtc2lkZT0nYm90dG9tJ10ge1xuXHRcdFx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoXG5cdFx0XHRcdFx0LSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J3RvcCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVZKFxuXHRcdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J2xlZnQnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWChcblx0XHRcdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKFxuXHRcdFx0XHRcdC0keyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdib3R0b20nXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSd0b3AnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWSggMCApO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLWVudGVyXVtkYXRhLXNpZGU9J2xlZnQnXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKCAwICk7XG5cdFx0XHR9XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBiYXNlSXRlbSA9IGNzc2Bcblx0YWxsOiB1bnNldDtcblxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCA4ICkgfTtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQvKiBPY2N1cHkgdGhlIHdpZHRoIG9mIGFsbCBncmlkIGNvbHVtbnMgKGllLiBmdWxsIHdpZHRoKSAqL1xuXHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogJHsgR1JJRF9URU1QTEFURV9DT0xTIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cblx0QHN1cHBvcnRzICggZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiBzdWJncmlkICkge1xuXHRcdC8qXG5cdFx0ICogRGVmaW5lIGEgZ3JpZCBsYXlvdXQgd2hpY2ggaW5oZXJpdHMgdGhlIHNhbWUgY29sdW1ucyBjb25maWd1cmF0aW9uXG5cdFx0ICogZnJvbSB0aGUgcGFyZW50IGxheW91dCAoaWUuIHN1YmdyaWQpLiBUaGlzIGFsbG93cyB0aGUgbWVudVxuXHRcdCAqIHRvIHN5bmNocm9uaXplIHRoZSBpbmRlbnRhdGlvbiBvZiBhbGwgaXRzIGl0ZW1zLlxuXHRcdCAqL1xuXHRcdGdyaWQtdGVtcGxhdGUtY29sdW1uczogc3ViZ3JpZDtcblx0fVxuXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdGZvbnQtd2VpZ2h0OiBub3JtYWw7XG5cdGxpbmUtaGVpZ2h0OiAyMHB4O1xuXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRwYWRkaW5nLWJsb2NrOiAkeyBJVEVNX1BBRERJTkdfQkxPQ0sgfTtcblx0cGFkZGluZy1pbmxpbmU6ICR7IElURU1fUEFERElOR19JTkxJTkUgfTtcblxuXHQvKlxuXHQgKiBNYWtlIHN1cmUgdGhhdCwgd2hlbiBhbiBpdGVtIGlzIHNjcm9sbGVkIGludG8gdmlldyAoZWcuIHdoaWxlIHVzaW5nIHRoZVxuXHQgKiBrZXlib2FyZCB0byBtb3ZlIGZvY3VzKSwgdGhlIHdob2xlIGl0ZW0gY29tZXMgaW50byB2aWV3XG5cdCAqL1xuXHRzY3JvbGwtbWFyZ2luOiAkeyBDT05URU5UX1dSQVBQRVJfUEFERElORyB9O1xuXG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRvdXRsaW5lOiBub25lO1xuXG5cdCZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLnRleHREaXNhYmxlZCB9O1xuXHRcdGN1cnNvcjogbm90LWFsbG93ZWQ7XG5cdH1cblxuXHQvKiBBY3RpdmUgaXRlbSAoaW5jbHVkaW5nIGhvdmVyKSAqL1xuXHQmW2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKTpub3QoXG5cdFx0XHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddXG5cdFx0KSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblx0fVxuXG5cdC8qIEtleWJvYXJkIGZvY3VzIChmb2N1cy12aXNpYmxlKSAqL1xuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdGJveC1zaGFkb3c6IDAgMCAwIDEuNXB4ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0fVxuXG5cdC8qIEFjdGl2ZSAoaWUuIHByZXNzZWQsIG1vdXNlIGRvd24pICovXG5cdCY6YWN0aXZlLFxuXHQmW2RhdGEtYWN0aXZlXSB7XG5cdFx0LyogVE9ETzogc2hvdWxkIHRoZXJlIGJlIGEgdmlzdWFsIGFjdGl2ZSBzdGF0ZT8gKi9cblx0fVxuXG5cdC8qIFdoZW4gdGhlIGl0ZW0gaXMgdGhlIHRyaWdnZXIgb2YgYW4gb3BlbiBzdWJtZW51ICovXG5cdCR7IE1lbnUgfTpub3QoOmZvY3VzKSAmOm5vdCg6Zm9jdXMpW2FyaWEtZXhwYW5kZWQ9XCJ0cnVlXCJdIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SIH07XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdH1cblxuXHRzdmcge1xuXHRcdGZpbGw6IGN1cnJlbnRDb2xvcjtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW0gKWBcblx0JHsgYmFzZUl0ZW0gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBDaGVja2JveEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW1DaGVja2JveCApYFxuXHQkeyBiYXNlSXRlbSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFJhZGlvSXRlbSA9IHN0eWxlZCggQXJpYWtpdC5NZW51SXRlbVJhZGlvIClgXG5cdCR7IGJhc2VJdGVtIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVByZWZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0LyogQWx3YXlzIG9jY3VweSB0aGUgZmlyc3QgY29sdW1uLCBldmVuIHdoZW4gYXV0by1jb2xsYXBzaW5nICovXG5cdGdyaWQtY29sdW1uOiAxO1xuXG5cdC8qXG5cdCAqIEV2ZW4gd2hlbiB0aGUgaXRlbSBpcyBub3QgY2hlY2tlZCwgb2NjdXB5IHRoZSBzYW1lIHNjcmVlbiBzcGFjZSB0byBhdm9pZFxuXHQgKiB0aGUgc3BhY2UgY29sbGFwc2lkZSB3aGVuIG5vIGl0ZW1zIGFyZSBjaGVja2VkLlxuXHQgKi9cblx0JHsgQ2hlY2tib3hJdGVtIH0gPiAmLFxuXHQkeyBSYWRpb0l0ZW0gfSA+ICYge1xuXHRcdC8qIFNhbWUgd2lkdGggYXMgdGhlIGNoZWNrIGljb25zICovXG5cdFx0bWluLXdpZHRoOiAkeyBzcGFjZSggNiApIH07XG5cdH1cblxuXHQkeyBDaGVja2JveEl0ZW0gfSA+ICYsXG5cdCR7IFJhZGlvSXRlbSB9ID4gJixcblx0Jjpub3QoIDplbXB0eSApIHtcblx0XHRtYXJnaW4taW5saW5lLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHR9XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBhY3RpdmUsIGV4Y2VwdCB3aGVuIGl0J3MgYSBub24tZm9jdXNlZC9ob3ZlcmVkXG5cdCogc3VibWVudSB0cmlnZ2VyIChpbiB0aGF0IGNhc2UsIGNvbG9yIHNob3VsZCBub3QgYmUgaW5oZXJpdGVkKVxuXHQqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApID4gJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddID4gJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ29udGVudFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQvKlxuXHQgKiBBbHdheXMgb2NjdXB5IHRoZSBzZWNvbmQgY29sdW1uLCBzaW5jZSB0aGUgZmlyc3QgY29sdW1uXG5cdCAqIGlzIHRha2VuIGJ5IHRoZSBwcmVmaXggd3JhcHBlciAod2hlbiBkaXNwbGF5ZWQpLlxuXHQgKi9cblx0Z3JpZC1jb2x1bW46IDI7XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRnYXA6ICR7IHNwYWNlKCAzICkgfTtcblxuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ2hpbGRyZW5XcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0ZmxleDogMTtcblxuXHRkaXNwbGF5OiBpbmxpbmUtZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblx0Z2FwOiAkeyBzcGFjZSggMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVN1ZmZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZmxleDogMCAxIGZpdC1jb250ZW50O1xuXHRtaW4td2lkdGg6IDA7XG5cdHdpZHRoOiBmaXQtY29udGVudDtcblxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0Z2FwOiAkeyBzcGFjZSggMyApIH07XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCAqIFdoZW4gdGhlIHBhcmVudCBtZW51IGl0ZW0gaXMgYWN0aXZlLCBleGNlcHQgd2hlbiBpdCdzIGEgbm9uLWZvY3VzZWQvaG92ZXJlZFxuXHQgKiBzdWJtZW51IHRyaWdnZXIgKGluIHRoYXQgY2FzZSwgY29sb3Igc2hvdWxkIG5vdCBiZSBpbmhlcml0ZWQpXG5cdCAqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApICo6bm90KCR7IE1lbnUgfSkgJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICo6bm90KCR7IE1lbnUgfSkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cCA9IHN0eWxlZCggQXJpYWtpdC5NZW51R3JvdXAgKWBcblx0LyogSWdub3JlIHRoaXMgZWxlbWVudCB3aGVuIGNhbGN1bGF0aW5nIHRoZSBsYXlvdXQuIFVzZWZ1bCBmb3Igc3ViZ3JpZCAqL1xuXHRkaXNwbGF5OiBjb250ZW50cztcbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cExhYmVsID0gc3R5bGVkKCBBcmlha2l0Lk1lbnVHcm91cExhYmVsIClgXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0cGFkZGluZy1ibG9jay1zdGFydDogJHsgc3BhY2UoIDMgKSB9O1xuXHRwYWRkaW5nLWJsb2NrLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHRwYWRkaW5nLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFNlcGFyYXRvciA9IHN0eWxlZCggQXJpYWtpdC5NZW51U2VwYXJhdG9yICk8XG5cdFBpY2s8IENvbnRleHRQcm9wcywgJ3ZhcmlhbnQnID5cbj5gXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0Ym9yZGVyOiBub25lO1xuXHRoZWlnaHQ6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9O1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyAoIHByb3BzICkgPT5cblx0XHRwcm9wcy52YXJpYW50ID09PSAndG9vbGJhcidcblx0XHRcdD8gVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUlxuXHRcdFx0OiBESVZJREVSX0NPTE9SIH07XG5cdC8qIEFsaWduIHdpdGggbWVudSBpdGVtcycgY29udGVudCAqL1xuXHRtYXJnaW4tYmxvY2s6ICR7IHNwYWNlKCAyICkgfTtcblx0bWFyZ2luLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuXG5cdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VibWVudUNoZXZyb25JY29uID0gc3R5bGVkKCBJY29uIClgXG5cdHdpZHRoOiAkeyBzcGFjZSggMS41ICkgfTtcblx0JHsgcnRsKFxuXHRcdHtcblx0XHRcdHRyYW5zZm9ybTogYHNjYWxlWCgxKWAsXG5cdFx0fSxcblx0XHR7XG5cdFx0XHR0cmFuc2Zvcm06IGBzY2FsZVgoLTEpYCxcblx0XHR9XG5cdCkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtTGFiZWwgPSBzdHlsZWQoIFRydW5jYXRlIClgXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDIwcHg7XG5cdGNvbG9yOiBpbmhlcml0O1xuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW1IZWxwVGV4dCA9IHN0eWxlZCggVHJ1bmNhdGUgKWBcblx0Zm9udC1zaXplOiAkeyBmb250KCAnaGVscFRleHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDE2cHg7XG5cdGNvbG9yOiAkeyBMSUdIVEVSX1RFWFRfQ09MT1IgfTtcblx0b3ZlcmZsb3ctd3JhcDogYW55d2hlcmU7XG5cblx0W2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKSAqOm5vdCggJHsgTWVudSB9ICkgJixcblx0W2FyaWEtZGlzYWJsZWQ9J3RydWUnXSAqOm5vdCggJHsgTWVudSB9ICkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG4iXX0= */"));
  var ItemLabel = /* @__PURE__ */ createStyled(component_default7, false ? {
    target: "e1wg7tti1"
  } : {
    target: "e1wg7tti1",
    label: "ItemLabel"
  })("font-size:", font("default.fontSize"), ";line-height:20px;color:inherit;" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnVjJDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIGZvbnQsIHJ0bCwgQ09ORklHLCBEUk9QRE9XTl9NT1RJT05fQ1NTIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgSWNvbiBmcm9tICcuLi9pY29uJztcbmltcG9ydCB7IFRydW5jYXRlIH0gZnJvbSAnLi4vdHJ1bmNhdGUnO1xuaW1wb3J0IHR5cGUgeyBDb250ZXh0UHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuY29uc3QgQ09OVEVOVF9XUkFQUEVSX1BBRERJTkcgPSBzcGFjZSggMSApO1xuY29uc3QgSVRFTV9QQURESU5HX0JMT0NLID0gc3BhY2UoIDEgKTtcbmNvbnN0IElURU1fUEFERElOR19JTkxJTkUgPSBzcGFjZSggMyApO1xuXG4vLyBUT0RPOlxuLy8gLSBib3JkZXIgY29sb3IgYW5kIGRpdmlkZXIgY29sb3IgYXJlIGRpZmZlcmVudCBmcm9tIENPTE9SUy50aGVtZSB2YXJpYWJsZXNcbi8vIC0gbGlnaHRlciB0ZXh0IGNvbG9yIGlzIG5vdCBkZWZpbmVkIGluIENPTE9SUy50aGVtZSwgc2hvdWxkIGl0IGJlP1xuLy8gLSBsaWdodGVyIGJhY2tncm91bmQgY29sb3IgaXMgbm90IGRlZmluZWQgaW4gQ09MT1JTLnRoZW1lLCBzaG91bGQgaXQgYmU/XG5jb25zdCBERUZBVUxUX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXTtcbmNvbnN0IERJVklERVJfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgMjAwIF07XG5jb25zdCBMSUdIVEVSX1RFWFRfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF07XG5jb25zdCBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SID0gQ09MT1JTLnRoZW1lLmdyYXlbIDEwMCBdO1xuY29uc3QgVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kO1xuY29uc3QgREVGQVVMVF9CT1hfU0hBRE9XID0gYDAgMCAwICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9ICR7IERFRkFVTFRfQk9SREVSX0NPTE9SIH0sICR7IENPTkZJRy5lbGV2YXRpb25NZWRpdW0gfWA7XG5jb25zdCBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPVyA9IGAwIDAgMCAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSAkeyBUT09MQkFSX1ZBUklBTlRfQk9SREVSX0NPTE9SIH1gO1xuXG5jb25zdCBHUklEX1RFTVBMQVRFX0NPTFMgPSAnbWlubWF4KCAwLCBtYXgtY29udGVudCApIDFmcic7XG5cbmV4cG9ydCBjb25zdCBNZW51ID0gc3R5bGVkKCBBcmlha2l0Lk1lbnUgKTwgUGljazwgQ29udGV4dFByb3BzLCAndmFyaWFudCcgPiA+YFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdC8qIFNhbWUgYXMgcG9wb3ZlciBjb21wb25lbnQgKi9cblx0LyogVE9ETzogaXMgdGhlcmUgYSB3YXkgdG8gcmVhZCB0aGUgc2FzcyB2YXJpYWJsZT8gKi9cblx0ei1pbmRleDogMTAwMDAwMDtcblxuXHRkaXNwbGF5OiBncmlkO1xuXHRncmlkLXRlbXBsYXRlLWNvbHVtbnM6ICR7IEdSSURfVEVNUExBVEVfQ09MUyB9O1xuXHRncmlkLXRlbXBsYXRlLXJvd3M6IGF1dG87XG5cblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0bWluLXdpZHRoOiAxNjBweDtcblx0bWF4LXdpZHRoOiAzMjBweDtcblx0bWF4LWhlaWdodDogdmFyKCAtLXBvcG92ZXItYXZhaWxhYmxlLWhlaWdodCApO1xuXG5cdHBhZGRpbmc6ICR7IENPTlRFTlRfV1JBUFBFUl9QQURESU5HIH07XG5cblx0b3ZlcnNjcm9sbC1iZWhhdmlvcjogY29udGFpbjtcblx0b3ZlcmZsb3c6IGF1dG87XG5cblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c01lZGl1bSB9O1xuXHQkeyAoIHByb3BzICkgPT4gY3NzYFxuXHRcdGJveC1zaGFkb3c6ICR7IHByb3BzLnZhcmlhbnQgPT09ICd0b29sYmFyJ1xuXHRcdFx0PyBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPV1xuXHRcdFx0OiBERUZBVUxUX0JPWF9TSEFET1cgfTtcblx0YCB9XG5cblx0LyogT25seSB2aXNpYmxlIGluIFdpbmRvd3MgSGlnaCBDb250cmFzdCBtb2RlICovXG5cdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudCAhaW1wb3J0YW50O1xuXG5cdC8qIE9wZW4vY2xvc2UgYW5pbWF0aW9uICovXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdHRyYW5zaXRpb24tcHJvcGVydHk6IHRyYW5zZm9ybSwgb3BhY2l0eTtcblx0XHR0cmFuc2l0aW9uLWR1cmF0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RVUkFUSU9OIH0sXG5cdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLkZBREVfRFVSQVRJT04gfTtcblx0XHR0cmFuc2l0aW9uLXRpbWluZy1mdW5jdGlvbjogJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9FQVNJTkcgfSxcblx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9FQVNJTkcgfTtcblx0XHR3aWxsLWNoYW5nZTogdHJhbnNmb3JtLCBvcGFjaXR5O1xuXG5cdFx0Jjpub3QoIFtkYXRhLXN1Ym1lbnVdICkge1xuXHRcdFx0LyogUmVnYXJkbGVzcyBvZiB0aGUgc2lkZSwgZmFkZSBpbiBhbmQgb3V0LiAqL1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHRcdCZbZGF0YS1lbnRlcl0ge1xuXHRcdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0fVxuXG5cdFx0XHQvKiBTbGlkZSBpbiB0aGUgZGlyZWN0aW9uIHRoZSBtZW51IGlzIG9wZW5pbmcuICovXG5cdFx0XHQmW2RhdGEtc2lkZT0nYm90dG9tJ10ge1xuXHRcdFx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoXG5cdFx0XHRcdFx0LSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J3RvcCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVZKFxuXHRcdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J2xlZnQnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWChcblx0XHRcdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKFxuXHRcdFx0XHRcdC0keyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdib3R0b20nXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSd0b3AnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWSggMCApO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLWVudGVyXVtkYXRhLXNpZGU9J2xlZnQnXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKCAwICk7XG5cdFx0XHR9XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBiYXNlSXRlbSA9IGNzc2Bcblx0YWxsOiB1bnNldDtcblxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCA4ICkgfTtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQvKiBPY2N1cHkgdGhlIHdpZHRoIG9mIGFsbCBncmlkIGNvbHVtbnMgKGllLiBmdWxsIHdpZHRoKSAqL1xuXHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogJHsgR1JJRF9URU1QTEFURV9DT0xTIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cblx0QHN1cHBvcnRzICggZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiBzdWJncmlkICkge1xuXHRcdC8qXG5cdFx0ICogRGVmaW5lIGEgZ3JpZCBsYXlvdXQgd2hpY2ggaW5oZXJpdHMgdGhlIHNhbWUgY29sdW1ucyBjb25maWd1cmF0aW9uXG5cdFx0ICogZnJvbSB0aGUgcGFyZW50IGxheW91dCAoaWUuIHN1YmdyaWQpLiBUaGlzIGFsbG93cyB0aGUgbWVudVxuXHRcdCAqIHRvIHN5bmNocm9uaXplIHRoZSBpbmRlbnRhdGlvbiBvZiBhbGwgaXRzIGl0ZW1zLlxuXHRcdCAqL1xuXHRcdGdyaWQtdGVtcGxhdGUtY29sdW1uczogc3ViZ3JpZDtcblx0fVxuXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdGZvbnQtd2VpZ2h0OiBub3JtYWw7XG5cdGxpbmUtaGVpZ2h0OiAyMHB4O1xuXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRwYWRkaW5nLWJsb2NrOiAkeyBJVEVNX1BBRERJTkdfQkxPQ0sgfTtcblx0cGFkZGluZy1pbmxpbmU6ICR7IElURU1fUEFERElOR19JTkxJTkUgfTtcblxuXHQvKlxuXHQgKiBNYWtlIHN1cmUgdGhhdCwgd2hlbiBhbiBpdGVtIGlzIHNjcm9sbGVkIGludG8gdmlldyAoZWcuIHdoaWxlIHVzaW5nIHRoZVxuXHQgKiBrZXlib2FyZCB0byBtb3ZlIGZvY3VzKSwgdGhlIHdob2xlIGl0ZW0gY29tZXMgaW50byB2aWV3XG5cdCAqL1xuXHRzY3JvbGwtbWFyZ2luOiAkeyBDT05URU5UX1dSQVBQRVJfUEFERElORyB9O1xuXG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRvdXRsaW5lOiBub25lO1xuXG5cdCZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLnRleHREaXNhYmxlZCB9O1xuXHRcdGN1cnNvcjogbm90LWFsbG93ZWQ7XG5cdH1cblxuXHQvKiBBY3RpdmUgaXRlbSAoaW5jbHVkaW5nIGhvdmVyKSAqL1xuXHQmW2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKTpub3QoXG5cdFx0XHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddXG5cdFx0KSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblx0fVxuXG5cdC8qIEtleWJvYXJkIGZvY3VzIChmb2N1cy12aXNpYmxlKSAqL1xuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdGJveC1zaGFkb3c6IDAgMCAwIDEuNXB4ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0fVxuXG5cdC8qIEFjdGl2ZSAoaWUuIHByZXNzZWQsIG1vdXNlIGRvd24pICovXG5cdCY6YWN0aXZlLFxuXHQmW2RhdGEtYWN0aXZlXSB7XG5cdFx0LyogVE9ETzogc2hvdWxkIHRoZXJlIGJlIGEgdmlzdWFsIGFjdGl2ZSBzdGF0ZT8gKi9cblx0fVxuXG5cdC8qIFdoZW4gdGhlIGl0ZW0gaXMgdGhlIHRyaWdnZXIgb2YgYW4gb3BlbiBzdWJtZW51ICovXG5cdCR7IE1lbnUgfTpub3QoOmZvY3VzKSAmOm5vdCg6Zm9jdXMpW2FyaWEtZXhwYW5kZWQ9XCJ0cnVlXCJdIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SIH07XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdH1cblxuXHRzdmcge1xuXHRcdGZpbGw6IGN1cnJlbnRDb2xvcjtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW0gKWBcblx0JHsgYmFzZUl0ZW0gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBDaGVja2JveEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW1DaGVja2JveCApYFxuXHQkeyBiYXNlSXRlbSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFJhZGlvSXRlbSA9IHN0eWxlZCggQXJpYWtpdC5NZW51SXRlbVJhZGlvIClgXG5cdCR7IGJhc2VJdGVtIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVByZWZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0LyogQWx3YXlzIG9jY3VweSB0aGUgZmlyc3QgY29sdW1uLCBldmVuIHdoZW4gYXV0by1jb2xsYXBzaW5nICovXG5cdGdyaWQtY29sdW1uOiAxO1xuXG5cdC8qXG5cdCAqIEV2ZW4gd2hlbiB0aGUgaXRlbSBpcyBub3QgY2hlY2tlZCwgb2NjdXB5IHRoZSBzYW1lIHNjcmVlbiBzcGFjZSB0byBhdm9pZFxuXHQgKiB0aGUgc3BhY2UgY29sbGFwc2lkZSB3aGVuIG5vIGl0ZW1zIGFyZSBjaGVja2VkLlxuXHQgKi9cblx0JHsgQ2hlY2tib3hJdGVtIH0gPiAmLFxuXHQkeyBSYWRpb0l0ZW0gfSA+ICYge1xuXHRcdC8qIFNhbWUgd2lkdGggYXMgdGhlIGNoZWNrIGljb25zICovXG5cdFx0bWluLXdpZHRoOiAkeyBzcGFjZSggNiApIH07XG5cdH1cblxuXHQkeyBDaGVja2JveEl0ZW0gfSA+ICYsXG5cdCR7IFJhZGlvSXRlbSB9ID4gJixcblx0Jjpub3QoIDplbXB0eSApIHtcblx0XHRtYXJnaW4taW5saW5lLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHR9XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBhY3RpdmUsIGV4Y2VwdCB3aGVuIGl0J3MgYSBub24tZm9jdXNlZC9ob3ZlcmVkXG5cdCogc3VibWVudSB0cmlnZ2VyIChpbiB0aGF0IGNhc2UsIGNvbG9yIHNob3VsZCBub3QgYmUgaW5oZXJpdGVkKVxuXHQqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApID4gJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddID4gJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ29udGVudFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQvKlxuXHQgKiBBbHdheXMgb2NjdXB5IHRoZSBzZWNvbmQgY29sdW1uLCBzaW5jZSB0aGUgZmlyc3QgY29sdW1uXG5cdCAqIGlzIHRha2VuIGJ5IHRoZSBwcmVmaXggd3JhcHBlciAod2hlbiBkaXNwbGF5ZWQpLlxuXHQgKi9cblx0Z3JpZC1jb2x1bW46IDI7XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRnYXA6ICR7IHNwYWNlKCAzICkgfTtcblxuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ2hpbGRyZW5XcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0ZmxleDogMTtcblxuXHRkaXNwbGF5OiBpbmxpbmUtZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblx0Z2FwOiAkeyBzcGFjZSggMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVN1ZmZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZmxleDogMCAxIGZpdC1jb250ZW50O1xuXHRtaW4td2lkdGg6IDA7XG5cdHdpZHRoOiBmaXQtY29udGVudDtcblxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0Z2FwOiAkeyBzcGFjZSggMyApIH07XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCAqIFdoZW4gdGhlIHBhcmVudCBtZW51IGl0ZW0gaXMgYWN0aXZlLCBleGNlcHQgd2hlbiBpdCdzIGEgbm9uLWZvY3VzZWQvaG92ZXJlZFxuXHQgKiBzdWJtZW51IHRyaWdnZXIgKGluIHRoYXQgY2FzZSwgY29sb3Igc2hvdWxkIG5vdCBiZSBpbmhlcml0ZWQpXG5cdCAqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApICo6bm90KCR7IE1lbnUgfSkgJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICo6bm90KCR7IE1lbnUgfSkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cCA9IHN0eWxlZCggQXJpYWtpdC5NZW51R3JvdXAgKWBcblx0LyogSWdub3JlIHRoaXMgZWxlbWVudCB3aGVuIGNhbGN1bGF0aW5nIHRoZSBsYXlvdXQuIFVzZWZ1bCBmb3Igc3ViZ3JpZCAqL1xuXHRkaXNwbGF5OiBjb250ZW50cztcbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cExhYmVsID0gc3R5bGVkKCBBcmlha2l0Lk1lbnVHcm91cExhYmVsIClgXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0cGFkZGluZy1ibG9jay1zdGFydDogJHsgc3BhY2UoIDMgKSB9O1xuXHRwYWRkaW5nLWJsb2NrLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHRwYWRkaW5nLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFNlcGFyYXRvciA9IHN0eWxlZCggQXJpYWtpdC5NZW51U2VwYXJhdG9yICk8XG5cdFBpY2s8IENvbnRleHRQcm9wcywgJ3ZhcmlhbnQnID5cbj5gXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0Ym9yZGVyOiBub25lO1xuXHRoZWlnaHQ6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9O1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyAoIHByb3BzICkgPT5cblx0XHRwcm9wcy52YXJpYW50ID09PSAndG9vbGJhcidcblx0XHRcdD8gVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUlxuXHRcdFx0OiBESVZJREVSX0NPTE9SIH07XG5cdC8qIEFsaWduIHdpdGggbWVudSBpdGVtcycgY29udGVudCAqL1xuXHRtYXJnaW4tYmxvY2s6ICR7IHNwYWNlKCAyICkgfTtcblx0bWFyZ2luLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuXG5cdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VibWVudUNoZXZyb25JY29uID0gc3R5bGVkKCBJY29uIClgXG5cdHdpZHRoOiAkeyBzcGFjZSggMS41ICkgfTtcblx0JHsgcnRsKFxuXHRcdHtcblx0XHRcdHRyYW5zZm9ybTogYHNjYWxlWCgxKWAsXG5cdFx0fSxcblx0XHR7XG5cdFx0XHR0cmFuc2Zvcm06IGBzY2FsZVgoLTEpYCxcblx0XHR9XG5cdCkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtTGFiZWwgPSBzdHlsZWQoIFRydW5jYXRlIClgXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDIwcHg7XG5cdGNvbG9yOiBpbmhlcml0O1xuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW1IZWxwVGV4dCA9IHN0eWxlZCggVHJ1bmNhdGUgKWBcblx0Zm9udC1zaXplOiAkeyBmb250KCAnaGVscFRleHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDE2cHg7XG5cdGNvbG9yOiAkeyBMSUdIVEVSX1RFWFRfQ09MT1IgfTtcblx0b3ZlcmZsb3ctd3JhcDogYW55d2hlcmU7XG5cblx0W2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKSAqOm5vdCggJHsgTWVudSB9ICkgJixcblx0W2FyaWEtZGlzYWJsZWQ9J3RydWUnXSAqOm5vdCggJHsgTWVudSB9ICkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG4iXX0= */"));
  var ItemHelpText = /* @__PURE__ */ createStyled(component_default7, false ? {
    target: "e1wg7tti0"
  } : {
    target: "e1wg7tti0",
    label: "ItemHelpText"
  })("font-size:", font("helpText.fontSize"), ";line-height:16px;color:", LIGHTER_TEXT_COLOR, ";overflow-wrap:anywhere;[data-active-item]:not( [data-focus-visible] ) *:not( ", Menu22, " ) &,[aria-disabled='true'] *:not( ", Menu22, " ) &{color:inherit;}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzVjhDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIGZvbnQsIHJ0bCwgQ09ORklHLCBEUk9QRE9XTl9NT1RJT05fQ1NTIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgSWNvbiBmcm9tICcuLi9pY29uJztcbmltcG9ydCB7IFRydW5jYXRlIH0gZnJvbSAnLi4vdHJ1bmNhdGUnO1xuaW1wb3J0IHR5cGUgeyBDb250ZXh0UHJvcHMgfSBmcm9tICcuL3R5cGVzJztcblxuY29uc3QgQ09OVEVOVF9XUkFQUEVSX1BBRERJTkcgPSBzcGFjZSggMSApO1xuY29uc3QgSVRFTV9QQURESU5HX0JMT0NLID0gc3BhY2UoIDEgKTtcbmNvbnN0IElURU1fUEFERElOR19JTkxJTkUgPSBzcGFjZSggMyApO1xuXG4vLyBUT0RPOlxuLy8gLSBib3JkZXIgY29sb3IgYW5kIGRpdmlkZXIgY29sb3IgYXJlIGRpZmZlcmVudCBmcm9tIENPTE9SUy50aGVtZSB2YXJpYWJsZXNcbi8vIC0gbGlnaHRlciB0ZXh0IGNvbG9yIGlzIG5vdCBkZWZpbmVkIGluIENPTE9SUy50aGVtZSwgc2hvdWxkIGl0IGJlP1xuLy8gLSBsaWdodGVyIGJhY2tncm91bmQgY29sb3IgaXMgbm90IGRlZmluZWQgaW4gQ09MT1JTLnRoZW1lLCBzaG91bGQgaXQgYmU/XG5jb25zdCBERUZBVUxUX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5ncmF5WyAzMDAgXTtcbmNvbnN0IERJVklERVJfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgMjAwIF07XG5jb25zdCBMSUdIVEVSX1RFWFRfQ09MT1IgPSBDT0xPUlMudGhlbWUuZ3JheVsgNzAwIF07XG5jb25zdCBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SID0gQ09MT1JTLnRoZW1lLmdyYXlbIDEwMCBdO1xuY29uc3QgVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUiA9IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kO1xuY29uc3QgREVGQVVMVF9CT1hfU0hBRE9XID0gYDAgMCAwICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9ICR7IERFRkFVTFRfQk9SREVSX0NPTE9SIH0sICR7IENPTkZJRy5lbGV2YXRpb25NZWRpdW0gfWA7XG5jb25zdCBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPVyA9IGAwIDAgMCAkeyBDT05GSUcuYm9yZGVyV2lkdGggfSAkeyBUT09MQkFSX1ZBUklBTlRfQk9SREVSX0NPTE9SIH1gO1xuXG5jb25zdCBHUklEX1RFTVBMQVRFX0NPTFMgPSAnbWlubWF4KCAwLCBtYXgtY29udGVudCApIDFmcic7XG5cbmV4cG9ydCBjb25zdCBNZW51ID0gc3R5bGVkKCBBcmlha2l0Lk1lbnUgKTwgUGljazwgQ29udGV4dFByb3BzLCAndmFyaWFudCcgPiA+YFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdC8qIFNhbWUgYXMgcG9wb3ZlciBjb21wb25lbnQgKi9cblx0LyogVE9ETzogaXMgdGhlcmUgYSB3YXkgdG8gcmVhZCB0aGUgc2FzcyB2YXJpYWJsZT8gKi9cblx0ei1pbmRleDogMTAwMDAwMDtcblxuXHRkaXNwbGF5OiBncmlkO1xuXHRncmlkLXRlbXBsYXRlLWNvbHVtbnM6ICR7IEdSSURfVEVNUExBVEVfQ09MUyB9O1xuXHRncmlkLXRlbXBsYXRlLXJvd3M6IGF1dG87XG5cblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0bWluLXdpZHRoOiAxNjBweDtcblx0bWF4LXdpZHRoOiAzMjBweDtcblx0bWF4LWhlaWdodDogdmFyKCAtLXBvcG92ZXItYXZhaWxhYmxlLWhlaWdodCApO1xuXG5cdHBhZGRpbmc6ICR7IENPTlRFTlRfV1JBUFBFUl9QQURESU5HIH07XG5cblx0b3ZlcnNjcm9sbC1iZWhhdmlvcjogY29udGFpbjtcblx0b3ZlcmZsb3c6IGF1dG87XG5cblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnVpLmJhY2tncm91bmQgfTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c01lZGl1bSB9O1xuXHQkeyAoIHByb3BzICkgPT4gY3NzYFxuXHRcdGJveC1zaGFkb3c6ICR7IHByb3BzLnZhcmlhbnQgPT09ICd0b29sYmFyJ1xuXHRcdFx0PyBUT09MQkFSX1ZBUklBTlRfQk9YX1NIQURPV1xuXHRcdFx0OiBERUZBVUxUX0JPWF9TSEFET1cgfTtcblx0YCB9XG5cblx0LyogT25seSB2aXNpYmxlIGluIFdpbmRvd3MgSGlnaCBDb250cmFzdCBtb2RlICovXG5cdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudCAhaW1wb3J0YW50O1xuXG5cdC8qIE9wZW4vY2xvc2UgYW5pbWF0aW9uICovXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdHRyYW5zaXRpb24tcHJvcGVydHk6IHRyYW5zZm9ybSwgb3BhY2l0eTtcblx0XHR0cmFuc2l0aW9uLWR1cmF0aW9uOiAkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RVUkFUSU9OIH0sXG5cdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLkZBREVfRFVSQVRJT04gfTtcblx0XHR0cmFuc2l0aW9uLXRpbWluZy1mdW5jdGlvbjogJHsgRFJPUERPV05fTU9USU9OX0NTUy5TTElERV9FQVNJTkcgfSxcblx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuRkFERV9FQVNJTkcgfTtcblx0XHR3aWxsLWNoYW5nZTogdHJhbnNmb3JtLCBvcGFjaXR5O1xuXG5cdFx0Jjpub3QoIFtkYXRhLXN1Ym1lbnVdICkge1xuXHRcdFx0LyogUmVnYXJkbGVzcyBvZiB0aGUgc2lkZSwgZmFkZSBpbiBhbmQgb3V0LiAqL1xuXHRcdFx0b3BhY2l0eTogMDtcblx0XHRcdCZbZGF0YS1lbnRlcl0ge1xuXHRcdFx0XHRvcGFjaXR5OiAxO1xuXHRcdFx0fVxuXG5cdFx0XHQvKiBTbGlkZSBpbiB0aGUgZGlyZWN0aW9uIHRoZSBtZW51IGlzIG9wZW5pbmcuICovXG5cdFx0XHQmW2RhdGEtc2lkZT0nYm90dG9tJ10ge1xuXHRcdFx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoXG5cdFx0XHRcdFx0LSR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J3RvcCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVZKFxuXHRcdFx0XHRcdCR7IERST1BET1dOX01PVElPTl9DU1MuU0xJREVfRElTVEFOQ0UgfVxuXHRcdFx0XHQpO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLXNpZGU9J2xlZnQnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWChcblx0XHRcdFx0XHQkeyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKFxuXHRcdFx0XHRcdC0keyBEUk9QRE9XTl9NT1RJT05fQ1NTLlNMSURFX0RJU1RBTkNFIH1cblx0XHRcdFx0KTtcblx0XHRcdH1cblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdib3R0b20nXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSd0b3AnXSB7XG5cdFx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWSggMCApO1xuXHRcdFx0fVxuXHRcdFx0JltkYXRhLWVudGVyXVtkYXRhLXNpZGU9J2xlZnQnXSxcblx0XHRcdCZbZGF0YS1lbnRlcl1bZGF0YS1zaWRlPSdyaWdodCddIHtcblx0XHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKCAwICk7XG5cdFx0XHR9XG5cdFx0fVxuXHR9XG5gO1xuXG5jb25zdCBiYXNlSXRlbSA9IGNzc2Bcblx0YWxsOiB1bnNldDtcblxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCA4ICkgfTtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblxuXHQvKiBPY2N1cHkgdGhlIHdpZHRoIG9mIGFsbCBncmlkIGNvbHVtbnMgKGllLiBmdWxsIHdpZHRoKSAqL1xuXHRncmlkLWNvbHVtbjogMSAvIC0xO1xuXG5cdGRpc3BsYXk6IGdyaWQ7XG5cdGdyaWQtdGVtcGxhdGUtY29sdW1uczogJHsgR1JJRF9URU1QTEFURV9DT0xTIH07XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cblx0QHN1cHBvcnRzICggZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiBzdWJncmlkICkge1xuXHRcdC8qXG5cdFx0ICogRGVmaW5lIGEgZ3JpZCBsYXlvdXQgd2hpY2ggaW5oZXJpdHMgdGhlIHNhbWUgY29sdW1ucyBjb25maWd1cmF0aW9uXG5cdFx0ICogZnJvbSB0aGUgcGFyZW50IGxheW91dCAoaWUuIHN1YmdyaWQpLiBUaGlzIGFsbG93cyB0aGUgbWVudVxuXHRcdCAqIHRvIHN5bmNocm9uaXplIHRoZSBpbmRlbnRhdGlvbiBvZiBhbGwgaXRzIGl0ZW1zLlxuXHRcdCAqL1xuXHRcdGdyaWQtdGVtcGxhdGUtY29sdW1uczogc3ViZ3JpZDtcblx0fVxuXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0Zm9udC1mYW1pbHk6IGluaGVyaXQ7XG5cdGZvbnQtd2VpZ2h0OiBub3JtYWw7XG5cdGxpbmUtaGVpZ2h0OiAyMHB4O1xuXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9O1xuXHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRwYWRkaW5nLWJsb2NrOiAkeyBJVEVNX1BBRERJTkdfQkxPQ0sgfTtcblx0cGFkZGluZy1pbmxpbmU6ICR7IElURU1fUEFERElOR19JTkxJTkUgfTtcblxuXHQvKlxuXHQgKiBNYWtlIHN1cmUgdGhhdCwgd2hlbiBhbiBpdGVtIGlzIHNjcm9sbGVkIGludG8gdmlldyAoZWcuIHdoaWxlIHVzaW5nIHRoZVxuXHQgKiBrZXlib2FyZCB0byBtb3ZlIGZvY3VzKSwgdGhlIHdob2xlIGl0ZW0gY29tZXMgaW50byB2aWV3XG5cdCAqL1xuXHRzY3JvbGwtbWFyZ2luOiAkeyBDT05URU5UX1dSQVBQRVJfUEFERElORyB9O1xuXG5cdHVzZXItc2VsZWN0OiBub25lO1xuXHRvdXRsaW5lOiBub25lO1xuXG5cdCZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLnRleHREaXNhYmxlZCB9O1xuXHRcdGN1cnNvcjogbm90LWFsbG93ZWQ7XG5cdH1cblxuXHQvKiBBY3RpdmUgaXRlbSAoaW5jbHVkaW5nIGhvdmVyKSAqL1xuXHQmW2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKTpub3QoXG5cdFx0XHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddXG5cdFx0KSB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50SW52ZXJ0ZWQgfTtcblx0fVxuXG5cdC8qIEtleWJvYXJkIGZvY3VzIChmb2N1cy12aXNpYmxlKSAqL1xuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdGJveC1zaGFkb3c6IDAgMCAwIDEuNXB4ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblxuXHRcdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0fVxuXG5cdC8qIEFjdGl2ZSAoaWUuIHByZXNzZWQsIG1vdXNlIGRvd24pICovXG5cdCY6YWN0aXZlLFxuXHQmW2RhdGEtYWN0aXZlXSB7XG5cdFx0LyogVE9ETzogc2hvdWxkIHRoZXJlIGJlIGEgdmlzdWFsIGFjdGl2ZSBzdGF0ZT8gKi9cblx0fVxuXG5cdC8qIFdoZW4gdGhlIGl0ZW0gaXMgdGhlIHRyaWdnZXIgb2YgYW4gb3BlbiBzdWJtZW51ICovXG5cdCR7IE1lbnUgfTpub3QoOmZvY3VzKSAmOm5vdCg6Zm9jdXMpW2FyaWEtZXhwYW5kZWQ9XCJ0cnVlXCJdIHtcblx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBMSUdIVF9CQUNLR1JPVU5EX0NPTE9SIH07XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kIH07XG5cdH1cblxuXHRzdmcge1xuXHRcdGZpbGw6IGN1cnJlbnRDb2xvcjtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW0gKWBcblx0JHsgYmFzZUl0ZW0gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBDaGVja2JveEl0ZW0gPSBzdHlsZWQoIEFyaWFraXQuTWVudUl0ZW1DaGVja2JveCApYFxuXHQkeyBiYXNlSXRlbSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFJhZGlvSXRlbSA9IHN0eWxlZCggQXJpYWtpdC5NZW51SXRlbVJhZGlvIClgXG5cdCR7IGJhc2VJdGVtIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVByZWZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0LyogQWx3YXlzIG9jY3VweSB0aGUgZmlyc3QgY29sdW1uLCBldmVuIHdoZW4gYXV0by1jb2xsYXBzaW5nICovXG5cdGdyaWQtY29sdW1uOiAxO1xuXG5cdC8qXG5cdCAqIEV2ZW4gd2hlbiB0aGUgaXRlbSBpcyBub3QgY2hlY2tlZCwgb2NjdXB5IHRoZSBzYW1lIHNjcmVlbiBzcGFjZSB0byBhdm9pZFxuXHQgKiB0aGUgc3BhY2UgY29sbGFwc2lkZSB3aGVuIG5vIGl0ZW1zIGFyZSBjaGVja2VkLlxuXHQgKi9cblx0JHsgQ2hlY2tib3hJdGVtIH0gPiAmLFxuXHQkeyBSYWRpb0l0ZW0gfSA+ICYge1xuXHRcdC8qIFNhbWUgd2lkdGggYXMgdGhlIGNoZWNrIGljb25zICovXG5cdFx0bWluLXdpZHRoOiAkeyBzcGFjZSggNiApIH07XG5cdH1cblxuXHQkeyBDaGVja2JveEl0ZW0gfSA+ICYsXG5cdCR7IFJhZGlvSXRlbSB9ID4gJixcblx0Jjpub3QoIDplbXB0eSApIHtcblx0XHRtYXJnaW4taW5saW5lLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHR9XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBhY3RpdmUsIGV4Y2VwdCB3aGVuIGl0J3MgYSBub24tZm9jdXNlZC9ob3ZlcmVkXG5cdCogc3VibWVudSB0cmlnZ2VyIChpbiB0aGF0IGNhc2UsIGNvbG9yIHNob3VsZCBub3QgYmUgaW5oZXJpdGVkKVxuXHQqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApID4gJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddID4gJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ29udGVudFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHQvKlxuXHQgKiBBbHdheXMgb2NjdXB5IHRoZSBzZWNvbmQgY29sdW1uLCBzaW5jZSB0aGUgZmlyc3QgY29sdW1uXG5cdCAqIGlzIHRha2VuIGJ5IHRoZSBwcmVmaXggd3JhcHBlciAod2hlbiBkaXNwbGF5ZWQpLlxuXHQgKi9cblx0Z3JpZC1jb2x1bW46IDI7XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuXHRnYXA6ICR7IHNwYWNlKCAzICkgfTtcblxuXHRwb2ludGVyLWV2ZW50czogbm9uZTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtQ2hpbGRyZW5XcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0ZmxleDogMTtcblxuXHRkaXNwbGF5OiBpbmxpbmUtZmxleDtcblx0ZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblx0Z2FwOiAkeyBzcGFjZSggMSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgSXRlbVN1ZmZpeFdyYXBwZXIgPSBzdHlsZWQuc3BhbmBcblx0ZmxleDogMCAxIGZpdC1jb250ZW50O1xuXHRtaW4td2lkdGg6IDA7XG5cdHdpZHRoOiBmaXQtY29udGVudDtcblxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0Z2FwOiAkeyBzcGFjZSggMyApIH07XG5cblx0Y29sb3I6ICR7IExJR0hURVJfVEVYVF9DT0xPUiB9O1xuXG5cdC8qXG5cdCAqIFdoZW4gdGhlIHBhcmVudCBtZW51IGl0ZW0gaXMgYWN0aXZlLCBleGNlcHQgd2hlbiBpdCdzIGEgbm9uLWZvY3VzZWQvaG92ZXJlZFxuXHQgKiBzdWJtZW51IHRyaWdnZXIgKGluIHRoYXQgY2FzZSwgY29sb3Igc2hvdWxkIG5vdCBiZSBpbmhlcml0ZWQpXG5cdCAqL1xuXHRbZGF0YS1hY3RpdmUtaXRlbV06bm90KCBbZGF0YS1mb2N1cy12aXNpYmxlXSApICo6bm90KCR7IE1lbnUgfSkgJixcblx0LyogV2hlbiB0aGUgcGFyZW50IG1lbnUgaXRlbSBpcyBkaXNhYmxlZCAqL1xuXHRbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddICo6bm90KCR7IE1lbnUgfSkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cCA9IHN0eWxlZCggQXJpYWtpdC5NZW51R3JvdXAgKWBcblx0LyogSWdub3JlIHRoaXMgZWxlbWVudCB3aGVuIGNhbGN1bGF0aW5nIHRoZSBsYXlvdXQuIFVzZWZ1bCBmb3Igc3ViZ3JpZCAqL1xuXHRkaXNwbGF5OiBjb250ZW50cztcbmA7XG5cbmV4cG9ydCBjb25zdCBHcm91cExhYmVsID0gc3R5bGVkKCBBcmlha2l0Lk1lbnVHcm91cExhYmVsIClgXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0cGFkZGluZy1ibG9jay1zdGFydDogJHsgc3BhY2UoIDMgKSB9O1xuXHRwYWRkaW5nLWJsb2NrLWVuZDogJHsgc3BhY2UoIDIgKSB9O1xuXHRwYWRkaW5nLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFNlcGFyYXRvciA9IHN0eWxlZCggQXJpYWtpdC5NZW51U2VwYXJhdG9yICk8XG5cdFBpY2s8IENvbnRleHRQcm9wcywgJ3ZhcmlhbnQnID5cbj5gXG5cdC8qIE9jY3VweSB0aGUgd2lkdGggb2YgYWxsIGdyaWQgY29sdW1ucyAoaWUuIGZ1bGwgd2lkdGgpICovXG5cdGdyaWQtY29sdW1uOiAxIC8gLTE7XG5cblx0Ym9yZGVyOiBub25lO1xuXHRoZWlnaHQ6ICR7IENPTkZJRy5ib3JkZXJXaWR0aCB9O1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyAoIHByb3BzICkgPT5cblx0XHRwcm9wcy52YXJpYW50ID09PSAndG9vbGJhcidcblx0XHRcdD8gVE9PTEJBUl9WQVJJQU5UX0JPUkRFUl9DT0xPUlxuXHRcdFx0OiBESVZJREVSX0NPTE9SIH07XG5cdC8qIEFsaWduIHdpdGggbWVudSBpdGVtcycgY29udGVudCAqL1xuXHRtYXJnaW4tYmxvY2s6ICR7IHNwYWNlKCAyICkgfTtcblx0bWFyZ2luLWlubGluZTogJHsgSVRFTV9QQURESU5HX0lOTElORSB9O1xuXG5cdC8qIE9ubHkgdmlzaWJsZSBpbiBXaW5kb3dzIEhpZ2ggQ29udHJhc3QgbW9kZSAqL1xuXHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5gO1xuXG5leHBvcnQgY29uc3QgU3VibWVudUNoZXZyb25JY29uID0gc3R5bGVkKCBJY29uIClgXG5cdHdpZHRoOiAkeyBzcGFjZSggMS41ICkgfTtcblx0JHsgcnRsKFxuXHRcdHtcblx0XHRcdHRyYW5zZm9ybTogYHNjYWxlWCgxKWAsXG5cdFx0fSxcblx0XHR7XG5cdFx0XHR0cmFuc2Zvcm06IGBzY2FsZVgoLTEpYCxcblx0XHR9XG5cdCkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBJdGVtTGFiZWwgPSBzdHlsZWQoIFRydW5jYXRlIClgXG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDIwcHg7XG5cdGNvbG9yOiBpbmhlcml0O1xuYDtcblxuZXhwb3J0IGNvbnN0IEl0ZW1IZWxwVGV4dCA9IHN0eWxlZCggVHJ1bmNhdGUgKWBcblx0Zm9udC1zaXplOiAkeyBmb250KCAnaGVscFRleHQuZm9udFNpemUnICkgfTtcblx0bGluZS1oZWlnaHQ6IDE2cHg7XG5cdGNvbG9yOiAkeyBMSUdIVEVSX1RFWFRfQ09MT1IgfTtcblx0b3ZlcmZsb3ctd3JhcDogYW55d2hlcmU7XG5cblx0W2RhdGEtYWN0aXZlLWl0ZW1dOm5vdCggW2RhdGEtZm9jdXMtdmlzaWJsZV0gKSAqOm5vdCggJHsgTWVudSB9ICkgJixcblx0W2FyaWEtZGlzYWJsZWQ9J3RydWUnXSAqOm5vdCggJHsgTWVudSB9ICkgJiB7XG5cdFx0Y29sb3I6IGluaGVyaXQ7XG5cdH1cbmA7XG4iXX0= */"));

  // packages/components/build-module/menu/item.mjs
  var import_jsx_runtime300 = __toESM(require_jsx_runtime(), 1);
  var Item22 = (0, import_element224.forwardRef)(function Item32({
    prefix: prefix2,
    suffix,
    children,
    disabled = false,
    hideOnClick = true,
    store,
    ...props
  }, ref) {
    const menuContext = (0, import_element224.useContext)(Context2);
    if (!menuContext?.store) {
      throw new Error("Menu.Item can only be rendered inside a Menu component");
    }
    const computedStore = store ?? menuContext.store;
    return /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(Item3, {
      ref,
      ...props,
      accessibleWhenDisabled: true,
      disabled,
      hideOnClick,
      store: computedStore,
      children: [/* @__PURE__ */ (0, import_jsx_runtime300.jsx)(ItemPrefixWrapper, {
        children: prefix2
      }), /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(ItemContentWrapper, {
        children: [/* @__PURE__ */ (0, import_jsx_runtime300.jsx)(ItemChildrenWrapper, {
          children
        }), suffix && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(ItemSuffixWrapper, {
          children: suffix
        })]
      })]
    });
  });

  // packages/components/build-module/menu/checkbox-item.mjs
  var import_element225 = __toESM(require_element(), 1);
  var import_jsx_runtime301 = __toESM(require_jsx_runtime(), 1);
  var CheckboxItem2 = (0, import_element225.forwardRef)(function CheckboxItem3({
    suffix,
    children,
    disabled = false,
    hideOnClick = false,
    ...props
  }, ref) {
    const menuContext = (0, import_element225.useContext)(Context2);
    if (!menuContext?.store) {
      throw new Error("Menu.CheckboxItem can only be rendered inside a Menu component");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(CheckboxItem, {
      ref,
      ...props,
      accessibleWhenDisabled: true,
      disabled,
      hideOnClick,
      store: menuContext.store,
      children: [/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(MenuItemCheck, {
        store: menuContext.store,
        render: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(ItemPrefixWrapper, {}),
        style: {
          width: "auto",
          height: "auto"
        },
        children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(icon_default2, {
          icon: check_default,
          size: 24
        })
      }), /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(ItemContentWrapper, {
        children: [/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(ItemChildrenWrapper, {
          children
        }), suffix && /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(ItemSuffixWrapper, {
          children: suffix
        })]
      })]
    });
  });

  // packages/components/build-module/menu/radio-item.mjs
  var import_element226 = __toESM(require_element(), 1);
  var import_primitives35 = __toESM(require_primitives(), 1);
  var import_jsx_runtime302 = __toESM(require_jsx_runtime(), 1);
  var radioCheck = /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(import_primitives35.SVG, {
    xmlns: "http://www.w3.org/2000/svg",
    viewBox: "0 0 24 24",
    children: /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(import_primitives35.Circle, {
      cx: 12,
      cy: 12,
      r: 3
    })
  });
  var RadioItem2 = (0, import_element226.forwardRef)(function RadioItem3({
    suffix,
    children,
    disabled = false,
    hideOnClick = false,
    ...props
  }, ref) {
    const menuContext = (0, import_element226.useContext)(Context2);
    if (!menuContext?.store) {
      throw new Error("Menu.RadioItem can only be rendered inside a Menu component");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)(RadioItem, {
      ref,
      ...props,
      accessibleWhenDisabled: true,
      disabled,
      hideOnClick,
      store: menuContext.store,
      children: [/* @__PURE__ */ (0, import_jsx_runtime302.jsx)(MenuItemCheck, {
        store: menuContext.store,
        render: /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(ItemPrefixWrapper, {}),
        style: {
          width: "auto",
          height: "auto"
        },
        children: /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(icon_default2, {
          icon: radioCheck,
          size: 24
        })
      }), /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)(ItemContentWrapper, {
        children: [/* @__PURE__ */ (0, import_jsx_runtime302.jsx)(ItemChildrenWrapper, {
          children
        }), suffix && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(ItemSuffixWrapper, {
          children: suffix
        })]
      })]
    });
  });

  // packages/components/build-module/menu/group.mjs
  var import_element227 = __toESM(require_element(), 1);
  var import_jsx_runtime303 = __toESM(require_jsx_runtime(), 1);
  var Group22 = (0, import_element227.forwardRef)(function Group32(props, ref) {
    const menuContext = (0, import_element227.useContext)(Context2);
    if (!menuContext?.store) {
      throw new Error("Menu.Group can only be rendered inside a Menu component");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(Group3, {
      ref,
      ...props,
      store: menuContext.store
    });
  });

  // packages/components/build-module/menu/group-label.mjs
  var import_element228 = __toESM(require_element(), 1);
  var import_jsx_runtime304 = __toESM(require_jsx_runtime(), 1);
  var GroupLabel22 = (0, import_element228.forwardRef)(function Group4(props, ref) {
    const menuContext = (0, import_element228.useContext)(Context2);
    if (!menuContext?.store) {
      throw new Error("Menu.GroupLabel can only be rendered inside a Menu component");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(GroupLabel3, {
      ref,
      render: (
        // @ts-expect-error The `children` prop is passed
        /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(component_default8, {
          upperCase: true,
          variant: "muted",
          size: "11px",
          weight: 500,
          lineHeight: "16px"
        })
      ),
      ...props,
      store: menuContext.store
    });
  });

  // packages/components/build-module/menu/separator.mjs
  var import_element229 = __toESM(require_element(), 1);
  var import_jsx_runtime305 = __toESM(require_jsx_runtime(), 1);
  var Separator22 = (0, import_element229.forwardRef)(function Separator32(props, ref) {
    const menuContext = (0, import_element229.useContext)(Context2);
    if (!menuContext?.store) {
      throw new Error("Menu.Separator can only be rendered inside a Menu component");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(Separator3, {
      ref,
      ...props,
      store: menuContext.store,
      variant: menuContext.variant
    });
  });

  // packages/components/build-module/menu/item-label.mjs
  var import_element230 = __toESM(require_element(), 1);
  var import_jsx_runtime306 = __toESM(require_jsx_runtime(), 1);
  var ItemLabel2 = (0, import_element230.forwardRef)(function ItemLabel3(props, ref) {
    const menuContext = (0, import_element230.useContext)(Context2);
    if (!menuContext?.store) {
      throw new Error("Menu.ItemLabel can only be rendered inside a Menu component");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(ItemLabel, {
      numberOfLines: 1,
      ref,
      ...props
    });
  });

  // packages/components/build-module/menu/item-help-text.mjs
  var import_element231 = __toESM(require_element(), 1);
  var import_jsx_runtime307 = __toESM(require_jsx_runtime(), 1);
  var ItemHelpText2 = (0, import_element231.forwardRef)(function ItemHelpText3(props, ref) {
    const menuContext = (0, import_element231.useContext)(Context2);
    if (!menuContext?.store) {
      throw new Error("Menu.ItemHelpText can only be rendered inside a Menu component");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(ItemHelpText, {
      numberOfLines: 2,
      ref,
      ...props
    });
  });

  // packages/components/build-module/menu/trigger-button.mjs
  var import_element232 = __toESM(require_element(), 1);
  var import_jsx_runtime308 = __toESM(require_jsx_runtime(), 1);
  var TriggerButton = (0, import_element232.forwardRef)(function TriggerButton2({
    children,
    disabled = false,
    ...props
  }, ref) {
    const menuContext = (0, import_element232.useContext)(Context2);
    if (!menuContext?.store) {
      throw new Error("Menu.TriggerButton can only be rendered inside a Menu component");
    }
    if (menuContext.store.parent) {
      throw new Error("Menu.TriggerButton should not be rendered inside a nested Menu component. Use Menu.SubmenuTriggerItem instead.");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(MenuButton, {
      ref,
      ...props,
      disabled,
      store: menuContext.store,
      children
    });
  });

  // packages/components/build-module/menu/submenu-trigger-item.mjs
  var import_element233 = __toESM(require_element(), 1);
  var import_jsx_runtime309 = __toESM(require_jsx_runtime(), 1);
  var SubmenuTriggerItem = (0, import_element233.forwardRef)(function SubmenuTriggerItem2({
    suffix,
    ...otherProps
  }, ref) {
    const menuContext = (0, import_element233.useContext)(Context2);
    if (!menuContext?.store.parent) {
      throw new Error("Menu.SubmenuTriggerItem can only be rendered inside a nested Menu component");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(MenuButton, {
      ref,
      accessibleWhenDisabled: true,
      store: menuContext.store,
      render: /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(Item22, {
        ...otherProps,
        // The menu item needs to register and be part of the parent menu.
        // Without specifying the store explicitly, the `Item` component
        // would otherwise read the store via context and pick up the one from
        // the sub-menu `Menu` component.
        store: menuContext.store.parent,
        suffix: /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)(import_jsx_runtime309.Fragment, {
          children: [suffix, /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(SubmenuChevronIcon, {
            "aria-hidden": "true",
            icon: chevron_right_small_default,
            size: 24,
            preserveAspectRatio: "xMidYMid slice"
          })]
        })
      })
    });
  });

  // packages/components/build-module/menu/popover.mjs
  var import_element234 = __toESM(require_element(), 1);
  var import_jsx_runtime310 = __toESM(require_jsx_runtime(), 1);
  var Popover4 = (0, import_element234.forwardRef)(function Popover22({
    gutter,
    children,
    shift: shift3,
    modal = true,
    ...otherProps
  }, ref) {
    const menuContext = (0, import_element234.useContext)(Context2);
    const appliedPlacementSide = useStoreState(menuContext?.store, "currentPlacement")?.split("-")[0];
    const hideOnEscape = (0, import_element234.useCallback)((event) => {
      event.preventDefault();
      return true;
    }, []);
    const computedDirection = useStoreState(menuContext?.store, "rtl") ? "rtl" : "ltr";
    const wrapperProps = (0, import_element234.useMemo)(() => ({
      dir: computedDirection,
      style: {
        direction: computedDirection
      }
    }), [computedDirection]);
    if (!menuContext?.store) {
      throw new Error("Menu.Popover can only be rendered inside a Menu component");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(Menu22, {
      ...otherProps,
      ref,
      modal,
      store: menuContext.store,
      gutter: gutter ?? (menuContext.store.parent ? 0 : 8),
      shift: shift3 ?? (menuContext.store.parent ? -4 : 0),
      hideOnHoverOutside: false,
      "data-side": appliedPlacementSide,
      "data-submenu": !!menuContext.store.parent || void 0,
      wrapperProps,
      hideOnEscape,
      unmountOnHide: true,
      variant: menuContext.variant,
      children
    });
  });

  // packages/components/build-module/menu/index.mjs
  var import_jsx_runtime311 = __toESM(require_jsx_runtime(), 1);
  var UnconnectedMenu = (props) => {
    const {
      children,
      defaultOpen = false,
      open,
      onOpenChange,
      placement,
      // From internal components context
      variant
    } = useContextSystem(props, "Menu");
    const parentContext = (0, import_element235.useContext)(Context2);
    const rtl2 = (0, import_i18n79.isRTL)();
    let computedPlacement = placement ?? (parentContext?.store ? "right-start" : "bottom-start");
    if (rtl2) {
      if (/right/.test(computedPlacement)) {
        computedPlacement = computedPlacement.replace("right", "left");
      } else if (/left/.test(computedPlacement)) {
        computedPlacement = computedPlacement.replace("left", "right");
      }
    }
    const menuStore = useMenuStore({
      parent: parentContext?.store,
      open,
      defaultOpen,
      placement: computedPlacement,
      focusLoop: true,
      setOpen(willBeOpen) {
        onOpenChange?.(willBeOpen);
      },
      rtl: rtl2
    });
    const contextValue = (0, import_element235.useMemo)(() => ({
      store: menuStore,
      variant
    }), [menuStore, variant]);
    return /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(Context2.Provider, {
      value: contextValue,
      children
    });
  };
  var Menu3 = Object.assign(contextConnectWithoutRef(UnconnectedMenu, "Menu"), {
    Context: Object.assign(Context2, {
      displayName: "Menu.Context"
    }),
    /**
     * Renders a menu item inside the `Menu.Popover` or `Menu.Group` components.
     *
     * It can optionally contain one instance of the `Menu.ItemLabel` component
     * and one instance of the `Menu.ItemHelpText` component.
     */
    Item: Object.assign(Item22, {
      displayName: "Menu.Item"
    }),
    /**
     * Renders a radio menu item inside the `Menu.Popover` or `Menu.Group`
     * components.
     *
     * It can optionally contain one instance of the `Menu.ItemLabel` component
     * and one instance of the `Menu.ItemHelpText` component.
     */
    RadioItem: Object.assign(RadioItem2, {
      displayName: "Menu.RadioItem"
    }),
    /**
     * Renders a checkbox menu item inside the `Menu.Popover` or `Menu.Group`
     * components.
     *
     * It can optionally contain one instance of the `Menu.ItemLabel` component
     * and one instance of the `Menu.ItemHelpText` component.
     */
    CheckboxItem: Object.assign(CheckboxItem2, {
      displayName: "Menu.CheckboxItem"
    }),
    /**
     * Renders a group for menu items.
     *
     * It should contain one instance of `Menu.GroupLabel` and one or more
     * instances of `Menu.Item`, `Menu.RadioItem`, or `Menu.CheckboxItem`.
     */
    Group: Object.assign(Group22, {
      displayName: "Menu.Group"
    }),
    /**
     * Renders a label in a menu group.
     *
     * This component should be wrapped with `Menu.Group` so the
     * `aria-labelledby` is correctly set on the group element.
     */
    GroupLabel: Object.assign(GroupLabel22, {
      displayName: "Menu.GroupLabel"
    }),
    /**
     * Renders a divider between menu items or menu groups.
     */
    Separator: Object.assign(Separator22, {
      displayName: "Menu.Separator"
    }),
    /**
     * Renders a menu item's label text. It should be wrapped with `Menu.Item`,
     * `Menu.RadioItem`, or `Menu.CheckboxItem`.
     */
    ItemLabel: Object.assign(ItemLabel2, {
      displayName: "Menu.ItemLabel"
    }),
    /**
     * Renders a menu item's help text. It should be wrapped with `Menu.Item`,
     * `Menu.RadioItem`, or `Menu.CheckboxItem`.
     */
    ItemHelpText: Object.assign(ItemHelpText2, {
      displayName: "Menu.ItemHelpText"
    }),
    /**
     * Renders a dropdown menu element that's controlled by a sibling
     * `Menu.TriggerButton` component. It renders a popover and automatically
     * focuses on items when the menu is shown.
     *
     * The only valid children of `Menu.Popover` are `Menu.Item`,
     * `Menu.RadioItem`, `Menu.CheckboxItem`, `Menu.Group`, `Menu.Separator`,
     * and `Menu` (for nested dropdown menus).
     */
    Popover: Object.assign(Popover4, {
      displayName: "Menu.Popover"
    }),
    /**
     * Renders a menu button that toggles the visibility of a sibling
     * `Menu.Popover` component when clicked or when using arrow keys.
     */
    TriggerButton: Object.assign(TriggerButton, {
      displayName: "Menu.TriggerButton"
    }),
    /**
     * Renders a menu item that toggles the visibility of a sibling
     * `Menu.Popover` component when clicked or when using arrow keys.
     *
     * This component is used to create a nested dropdown menu.
     */
    SubmenuTriggerItem: Object.assign(SubmenuTriggerItem, {
      displayName: "Menu.SubmenuTriggerItem"
    })
  });

  // packages/components/build-module/theme/index.mjs
  var import_element236 = __toESM(require_element(), 1);

  // packages/components/build-module/theme/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__42() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var colorVariables = ({
    colors
  }) => {
    const shades = Object.entries(colors.gray || {}).map(([k3, v3]) => `--wp-components-color-gray-${k3}: ${v3};`).join("");
    return [/* @__PURE__ */ css("--wp-components-color-accent:", colors.accent, ";--wp-components-color-accent-darker-10:", colors.accentDarker10, ";--wp-components-color-accent-darker-20:", colors.accentDarker20, ";--wp-components-color-accent-inverted:", colors.accentInverted, ";--wp-components-color-background:", colors.background, ";--wp-components-color-foreground:", colors.foreground, ";--wp-components-color-foreground-inverted:", colors.foregroundInverted, ";", shades, ";" + (false ? "" : ";label:colorVariables;"), false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQksiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFRoZW1lT3V0cHV0VmFsdWVzIH0gZnJvbSAnLi90eXBlcyc7XG5cbmV4cG9ydCBjb25zdCBjb2xvclZhcmlhYmxlcyA9ICggeyBjb2xvcnMgfTogVGhlbWVPdXRwdXRWYWx1ZXMgKSA9PiB7XG5cdGNvbnN0IHNoYWRlcyA9IE9iamVjdC5lbnRyaWVzKCBjb2xvcnMuZ3JheSB8fCB7fSApXG5cdFx0Lm1hcCggKCBbIGssIHYgXSApID0+IGAtLXdwLWNvbXBvbmVudHMtY29sb3ItZ3JheS0keyBrIH06ICR7IHYgfTtgIClcblx0XHQuam9pbiggJycgKTtcblxuXHRyZXR1cm4gW1xuXHRcdGNzc2Bcblx0XHRcdC0td3AtY29tcG9uZW50cy1jb2xvci1hY2NlbnQ6ICR7IGNvbG9ycy5hY2NlbnQgfTtcblx0XHRcdC0td3AtY29tcG9uZW50cy1jb2xvci1hY2NlbnQtZGFya2VyLTEwOiAkeyBjb2xvcnMuYWNjZW50RGFya2VyMTAgfTtcblx0XHRcdC0td3AtY29tcG9uZW50cy1jb2xvci1hY2NlbnQtZGFya2VyLTIwOiAkeyBjb2xvcnMuYWNjZW50RGFya2VyMjAgfTtcblx0XHRcdC0td3AtY29tcG9uZW50cy1jb2xvci1hY2NlbnQtaW52ZXJ0ZWQ6ICR7IGNvbG9ycy5hY2NlbnRJbnZlcnRlZCB9O1xuXG5cdFx0XHQtLXdwLWNvbXBvbmVudHMtY29sb3ItYmFja2dyb3VuZDogJHsgY29sb3JzLmJhY2tncm91bmQgfTtcblx0XHRcdC0td3AtY29tcG9uZW50cy1jb2xvci1mb3JlZ3JvdW5kOiAkeyBjb2xvcnMuZm9yZWdyb3VuZCB9O1xuXHRcdFx0LS13cC1jb21wb25lbnRzLWNvbG9yLWZvcmVncm91bmQtaW52ZXJ0ZWQ6ICR7IGNvbG9ycy5mb3JlZ3JvdW5kSW52ZXJ0ZWQgfTtcblxuXHRcdFx0JHsgc2hhZGVzIH1cblx0XHRgLFxuXHRdO1xufTtcblxuZXhwb3J0IGNvbnN0IFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRjb2xvcjogdmFyKCAtLXdwLWNvbXBvbmVudHMtY29sb3ItZm9yZWdyb3VuZCwgY3VycmVudENvbG9yICk7XG5gO1xuIl19 */")];
  };
  var Wrapper6 = /* @__PURE__ */ createStyled("div", false ? {
    target: "e1krjpvb0"
  } : {
    target: "e1krjpvb0",
    label: "Wrapper"
  })(false ? {
    name: "1a3idx0",
    styles: "color:var( --wp-components-color-foreground, currentColor )"
  } : {
    name: "1a3idx0",
    styles: "color:var( --wp-components-color-foreground, currentColor )/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnQ2lDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBUaGVtZU91dHB1dFZhbHVlcyB9IGZyb20gJy4vdHlwZXMnO1xuXG5leHBvcnQgY29uc3QgY29sb3JWYXJpYWJsZXMgPSAoIHsgY29sb3JzIH06IFRoZW1lT3V0cHV0VmFsdWVzICkgPT4ge1xuXHRjb25zdCBzaGFkZXMgPSBPYmplY3QuZW50cmllcyggY29sb3JzLmdyYXkgfHwge30gKVxuXHRcdC5tYXAoICggWyBrLCB2IF0gKSA9PiBgLS13cC1jb21wb25lbnRzLWNvbG9yLWdyYXktJHsgayB9OiAkeyB2IH07YCApXG5cdFx0LmpvaW4oICcnICk7XG5cblx0cmV0dXJuIFtcblx0XHRjc3NgXG5cdFx0XHQtLXdwLWNvbXBvbmVudHMtY29sb3ItYWNjZW50OiAkeyBjb2xvcnMuYWNjZW50IH07XG5cdFx0XHQtLXdwLWNvbXBvbmVudHMtY29sb3ItYWNjZW50LWRhcmtlci0xMDogJHsgY29sb3JzLmFjY2VudERhcmtlcjEwIH07XG5cdFx0XHQtLXdwLWNvbXBvbmVudHMtY29sb3ItYWNjZW50LWRhcmtlci0yMDogJHsgY29sb3JzLmFjY2VudERhcmtlcjIwIH07XG5cdFx0XHQtLXdwLWNvbXBvbmVudHMtY29sb3ItYWNjZW50LWludmVydGVkOiAkeyBjb2xvcnMuYWNjZW50SW52ZXJ0ZWQgfTtcblxuXHRcdFx0LS13cC1jb21wb25lbnRzLWNvbG9yLWJhY2tncm91bmQ6ICR7IGNvbG9ycy5iYWNrZ3JvdW5kIH07XG5cdFx0XHQtLXdwLWNvbXBvbmVudHMtY29sb3ItZm9yZWdyb3VuZDogJHsgY29sb3JzLmZvcmVncm91bmQgfTtcblx0XHRcdC0td3AtY29tcG9uZW50cy1jb2xvci1mb3JlZ3JvdW5kLWludmVydGVkOiAkeyBjb2xvcnMuZm9yZWdyb3VuZEludmVydGVkIH07XG5cblx0XHRcdCR7IHNoYWRlcyB9XG5cdFx0YCxcblx0XTtcbn07XG5cbmV4cG9ydCBjb25zdCBXcmFwcGVyID0gc3R5bGVkLmRpdmBcblx0Y29sb3I6IHZhciggLS13cC1jb21wb25lbnRzLWNvbG9yLWZvcmVncm91bmQsIGN1cnJlbnRDb2xvciApO1xuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__42
  });

  // packages/components/build-module/theme/color-algorithms.mjs
  var import_warning11 = __toESM(require_warning(), 1);
  k([names_default, a11y_default]);
  function generateThemeVariables(inputs) {
    validateInputs(inputs);
    const generatedColors = {
      ...generateAccentDependentColors(inputs.accent),
      ...generateBackgroundDependentColors(inputs.background)
    };
    warnContrastIssues(checkContrasts(inputs, generatedColors));
    return {
      colors: generatedColors
    };
  }
  function validateInputs(inputs) {
    for (const [key, value] of Object.entries(inputs)) {
      if (typeof value !== "undefined" && !w(value).isValid()) {
        true ? (0, import_warning11.default)(`wp.components.Theme: "${value}" is not a valid color value for the '${key}' prop.`) : void 0;
      }
    }
  }
  function checkContrasts(inputs, outputs) {
    const background2 = inputs.background || COLORS.white;
    const accent = inputs.accent || "#3858e9";
    const foreground = outputs.foreground || COLORS.gray[900];
    const gray = outputs.gray || COLORS.gray;
    return {
      accent: w(background2).isReadable(accent) ? void 0 : `The background color ("${background2}") does not have sufficient contrast against the accent color ("${accent}").`,
      foreground: w(background2).isReadable(foreground) ? void 0 : `The background color provided ("${background2}") does not have sufficient contrast against the standard foreground colors.`,
      grays: w(background2).contrast(gray[600]) >= 3 && w(background2).contrast(gray[700]) >= 4.5 ? void 0 : `The background color provided ("${background2}") cannot generate a set of grayscale foreground colors with sufficient contrast. Try adjusting the color to be lighter or darker.`
    };
  }
  function warnContrastIssues(issues) {
    for (const error of Object.values(issues)) {
      if (error) {
        true ? (0, import_warning11.default)("wp.components.Theme: " + error) : void 0;
      }
    }
  }
  function generateAccentDependentColors(accent) {
    if (!accent) {
      return {};
    }
    return {
      accent,
      accentDarker10: w(accent).darken(0.1).toHex(),
      accentDarker20: w(accent).darken(0.2).toHex(),
      accentInverted: getForegroundForColor(accent)
    };
  }
  function generateBackgroundDependentColors(background2) {
    if (!background2) {
      return {};
    }
    const foreground = getForegroundForColor(background2);
    return {
      background: background2,
      foreground,
      foregroundInverted: getForegroundForColor(foreground),
      gray: generateShades(background2, foreground)
    };
  }
  function getForegroundForColor(color2) {
    return w(color2).isDark() ? COLORS.white : COLORS.gray[900];
  }
  function generateShades(background2, foreground) {
    const SHADES = {
      100: 0.06,
      200: 0.121,
      300: 0.132,
      400: 0.2,
      600: 0.42,
      700: 0.543,
      800: 0.821
    };
    const limit = 0.884;
    const direction = w(background2).isDark() ? "lighten" : "darken";
    const range = Math.abs(w(background2).toHsl().l - w(foreground).toHsl().l) / 100;
    const result = {};
    Object.entries(SHADES).forEach(([key, value]) => {
      result[parseInt(key)] = w(background2)[direction](value / limit * range).toHex();
    });
    return result;
  }

  // packages/components/build-module/theme/index.mjs
  var import_jsx_runtime312 = __toESM(require_jsx_runtime(), 1);
  function Theme({
    accent,
    background: background2,
    className: className2,
    ...props
  }) {
    const cx3 = useCx();
    const classes = (0, import_element236.useMemo)(() => cx3(...colorVariables(generateThemeVariables({
      accent,
      background: background2
    })), className2), [accent, background2, className2, cx3]);
    return /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(Wrapper6, {
      className: classes,
      ...props
    });
  }
  var theme_default = Theme;

  // packages/components/build-module/tabs/index.mjs
  var import_compose84 = __toESM(require_compose(), 1);
  var import_element242 = __toESM(require_element(), 1);
  var import_i18n80 = __toESM(require_i18n(), 1);

  // packages/components/build-module/tabs/context.mjs
  var import_element237 = __toESM(require_element(), 1);
  var TabsContext = (0, import_element237.createContext)(void 0);
  TabsContext.displayName = "TabsContext";
  var useTabsContext = () => (0, import_element237.useContext)(TabsContext);

  // packages/components/build-module/tabs/tab.mjs
  var import_element238 = __toESM(require_element(), 1);
  var import_warning12 = __toESM(require_warning(), 1);

  // packages/components/build-module/tabs/styles.mjs
  function _EMOTION_STRINGIFIED_CSS_ERROR__43() {
    return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
  }
  var StyledTabList = /* @__PURE__ */ createStyled(TabList, false ? {
    target: "enfox0g4"
  } : {
    target: "enfox0g4",
    label: "StyledTabList"
  })("display:flex;align-items:stretch;overflow-x:auto;&[aria-orientation='vertical']{flex-direction:column;}:where( [aria-orientation='horizontal'] ){width:fit-content;}--direction-factor:1;--direction-start:left;--direction-end:right;--selected-start:var( --selected-left, 0 );&:dir( rtl ){--direction-factor:-1;--direction-start:right;--direction-end:left;--selected-start:var( --selected-right, 0 );}@media not ( prefers-reduced-motion ){&[data-indicator-animated]::before{transition-property:transform,border-radius,border-block;transition-duration:0.2s;transition-timing-function:ease-out;}}position:relative;&::before{content:'';position:absolute;pointer-events:none;transform-origin:var( --direction-start ) top;outline:2px solid transparent;outline-offset:-1px;}--antialiasing-factor:100;&[aria-orientation='horizontal']{--fade-width:64px;--fade-gradient-base:transparent 0%,black var( --fade-width );--fade-gradient-composed:var( --fade-gradient-base ),black 60%,transparent 50%;&.is-overflowing-first{mask-image:linear-gradient(\n				to var( --direction-end ),\n				var( --fade-gradient-base )\n			);}&.is-overflowing-last{mask-image:linear-gradient(\n				to var( --direction-start ),\n				var( --fade-gradient-base )\n			);}&.is-overflowing-first.is-overflowing-last{mask-image:linear-gradient(\n					to right,\n					var( --fade-gradient-composed )\n				),linear-gradient( to left, var( --fade-gradient-composed ) );}&::before{bottom:0;height:0;width:calc( var( --antialiasing-factor ) * 1px );transform:translateX(\n					calc(\n						var( --selected-start ) * var( --direction-factor ) *\n							1px\n					)\n				) scaleX(\n					calc(\n						var( --selected-width, 0 ) /\n							var( --antialiasing-factor )\n					)\n				);border-bottom:var( --wp-admin-border-width-focus ) solid ", COLORS.theme.accent, ";}}&[aria-orientation='vertical']{&::before{border-radius:", config_values_default.radiusSmall, "/calc(\n					", config_values_default.radiusSmall, " /\n						(\n							var( --selected-height, 0 ) /\n								var( --antialiasing-factor )\n						)\n				);top:0;left:0;width:100%;height:calc( var( --antialiasing-factor ) * 1px );transform:translateY( calc( var( --selected-top, 0 ) * 1px ) ) scaleY(\n					calc(\n						var( --selected-height, 0 ) /\n							var( --antialiasing-factor )\n					)\n				);background-color:color-mix(\n				in srgb,\n				", COLORS.theme.accent, ",\n				transparent 96%\n			);}&[data-select-on-move='true']:has(\n				:is( :focus-visible, [data-focus-visible] )\n			)::before{box-sizing:border-box;border:var( --wp-admin-border-width-focus ) solid ", COLORS.theme.accent, ";border-block-width:calc(\n				var( --wp-admin-border-width-focus, 1px ) /\n					(\n						var( --selected-height, 0 ) /\n							var( --antialiasing-factor )\n					)\n			);}}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFhc0QiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0ICogYXMgQXJpYWtpdCBmcm9tICdAYXJpYWtpdC9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IENPTE9SUywgQ09ORklHLCBmb250IH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5pbXBvcnQgSWNvbiBmcm9tICcuLi9pY29uJztcblxuZXhwb3J0IGNvbnN0IFN0eWxlZFRhYkxpc3QgPSBzdHlsZWQoIEFyaWFraXQuVGFiTGlzdCApYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogc3RyZXRjaDtcblx0b3ZlcmZsb3cteDogYXV0bztcblxuXHQmW2FyaWEtb3JpZW50YXRpb249J3ZlcnRpY2FsJ10ge1xuXHRcdGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XG5cdH1cblxuXHQ6d2hlcmUoIFthcmlhLW9yaWVudGF0aW9uPSdob3Jpem9udGFsJ10gKSB7XG5cdFx0d2lkdGg6IGZpdC1jb250ZW50O1xuXHR9XG5cblx0LS1kaXJlY3Rpb24tZmFjdG9yOiAxO1xuXHQtLWRpcmVjdGlvbi1zdGFydDogbGVmdDtcblx0LS1kaXJlY3Rpb24tZW5kOiByaWdodDtcblx0LS1zZWxlY3RlZC1zdGFydDogdmFyKCAtLXNlbGVjdGVkLWxlZnQsIDAgKTtcblx0JjpkaXIoIHJ0bCApIHtcblx0XHQtLWRpcmVjdGlvbi1mYWN0b3I6IC0xO1xuXHRcdC0tZGlyZWN0aW9uLXN0YXJ0OiByaWdodDtcblx0XHQtLWRpcmVjdGlvbi1lbmQ6IGxlZnQ7XG5cdFx0LS1zZWxlY3RlZC1zdGFydDogdmFyKCAtLXNlbGVjdGVkLXJpZ2h0LCAwICk7XG5cdH1cblxuXHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHQmW2RhdGEtaW5kaWNhdG9yLWFuaW1hdGVkXTo6YmVmb3JlIHtcblx0XHRcdHRyYW5zaXRpb24tcHJvcGVydHk6IHRyYW5zZm9ybSwgYm9yZGVyLXJhZGl1cywgYm9yZGVyLWJsb2NrO1xuXHRcdFx0dHJhbnNpdGlvbi1kdXJhdGlvbjogMC4ycztcblx0XHRcdHRyYW5zaXRpb24tdGltaW5nLWZ1bmN0aW9uOiBlYXNlLW91dDtcblx0XHR9XG5cdH1cblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHQmOjpiZWZvcmUge1xuXHRcdGNvbnRlbnQ6ICcnO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHRwb2ludGVyLWV2ZW50czogbm9uZTtcblx0XHR0cmFuc2Zvcm0tb3JpZ2luOiB2YXIoIC0tZGlyZWN0aW9uLXN0YXJ0ICkgdG9wO1xuXG5cdFx0Ly8gV2luZG93cyBoaWdoIGNvbnRyYXN0IG1vZGUuXG5cdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdG91dGxpbmUtb2Zmc2V0OiAtMXB4O1xuXHR9XG5cblx0LyogVXNpbmcgYSBsYXJnZSB2YWx1ZSB0byBhdm9pZCBhbnRpYWxpYXNpbmcgcm91bmRpbmcgaXNzdWVzXG5cdFx0XHR3aGVuIHNjYWxpbmcgaW4gdGhlIHRyYW5zZm9ybSwgc2VlOiBodHRwczovL3N0YWNrb3ZlcmZsb3cuY29tL2EvNTIxNTkxMjMgKi9cblx0LS1hbnRpYWxpYXNpbmctZmFjdG9yOiAxMDA7XG5cdCZbYXJpYS1vcmllbnRhdGlvbj0naG9yaXpvbnRhbCddIHtcblx0XHQtLWZhZGUtd2lkdGg6IDY0cHg7XG5cdFx0LS1mYWRlLWdyYWRpZW50LWJhc2U6IHRyYW5zcGFyZW50IDAlLCBibGFjayB2YXIoIC0tZmFkZS13aWR0aCApO1xuXHRcdC0tZmFkZS1ncmFkaWVudC1jb21wb3NlZDogdmFyKCAtLWZhZGUtZ3JhZGllbnQtYmFzZSApLCBibGFjayA2MCUsXG5cdFx0XHR0cmFuc3BhcmVudCA1MCU7XG5cdFx0Ji5pcy1vdmVyZmxvd2luZy1maXJzdCB7XG5cdFx0XHRtYXNrLWltYWdlOiBsaW5lYXItZ3JhZGllbnQoXG5cdFx0XHRcdHRvIHZhciggLS1kaXJlY3Rpb24tZW5kICksXG5cdFx0XHRcdHZhciggLS1mYWRlLWdyYWRpZW50LWJhc2UgKVxuXHRcdFx0KTtcblx0XHR9XG5cdFx0Ji5pcy1vdmVyZmxvd2luZy1sYXN0IHtcblx0XHRcdG1hc2staW1hZ2U6IGxpbmVhci1ncmFkaWVudChcblx0XHRcdFx0dG8gdmFyKCAtLWRpcmVjdGlvbi1zdGFydCApLFxuXHRcdFx0XHR2YXIoIC0tZmFkZS1ncmFkaWVudC1iYXNlIClcblx0XHRcdCk7XG5cdFx0fVxuXHRcdCYuaXMtb3ZlcmZsb3dpbmctZmlyc3QuaXMtb3ZlcmZsb3dpbmctbGFzdCB7XG5cdFx0XHRtYXNrLWltYWdlOiBsaW5lYXItZ3JhZGllbnQoXG5cdFx0XHRcdFx0dG8gcmlnaHQsXG5cdFx0XHRcdFx0dmFyKCAtLWZhZGUtZ3JhZGllbnQtY29tcG9zZWQgKVxuXHRcdFx0XHQpLFxuXHRcdFx0XHRsaW5lYXItZ3JhZGllbnQoIHRvIGxlZnQsIHZhciggLS1mYWRlLWdyYWRpZW50LWNvbXBvc2VkICkgKTtcblx0XHR9XG5cblx0XHQmOjpiZWZvcmUge1xuXHRcdFx0Ym90dG9tOiAwO1xuXHRcdFx0aGVpZ2h0OiAwO1xuXHRcdFx0d2lkdGg6IGNhbGMoIHZhciggLS1hbnRpYWxpYXNpbmctZmFjdG9yICkgKiAxcHggKTtcblx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWChcblx0XHRcdFx0XHRjYWxjKFxuXHRcdFx0XHRcdFx0dmFyKCAtLXNlbGVjdGVkLXN0YXJ0ICkgKiB2YXIoIC0tZGlyZWN0aW9uLWZhY3RvciApICpcblx0XHRcdFx0XHRcdFx0MXB4XG5cdFx0XHRcdFx0KVxuXHRcdFx0XHQpXG5cdFx0XHRcdHNjYWxlWChcblx0XHRcdFx0XHRjYWxjKFxuXHRcdFx0XHRcdFx0dmFyKCAtLXNlbGVjdGVkLXdpZHRoLCAwICkgL1xuXHRcdFx0XHRcdFx0XHR2YXIoIC0tYW50aWFsaWFzaW5nLWZhY3RvciApXG5cdFx0XHRcdFx0KVxuXHRcdFx0XHQpO1xuXHRcdFx0Ym9yZGVyLWJvdHRvbTogdmFyKCAtLXdwLWFkbWluLWJvcmRlci13aWR0aC1mb2N1cyApIHNvbGlkXG5cdFx0XHRcdCR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHR9XG5cdH1cblx0JlthcmlhLW9yaWVudGF0aW9uPSd2ZXJ0aWNhbCddIHtcblx0XHQmOjpiZWZvcmUge1xuXHRcdFx0LyogQWRqdXN0aW5nIHRoZSBib3JkZXIgcmFkaXVzIHRvIG1hdGNoIHRoZSBzY2FsaW5nIGluIHRoZSB5IGF4aXMuICovXG5cdFx0XHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfSAvXG5cdFx0XHRcdGNhbGMoXG5cdFx0XHRcdFx0JHsgQ09ORklHLnJhZGl1c1NtYWxsIH0gL1xuXHRcdFx0XHRcdFx0KFxuXHRcdFx0XHRcdFx0XHR2YXIoIC0tc2VsZWN0ZWQtaGVpZ2h0LCAwICkgL1xuXHRcdFx0XHRcdFx0XHRcdHZhciggLS1hbnRpYWxpYXNpbmctZmFjdG9yIClcblx0XHRcdFx0XHRcdClcblx0XHRcdFx0KTtcblx0XHRcdHRvcDogMDtcblx0XHRcdGxlZnQ6IDA7XG5cdFx0XHR3aWR0aDogMTAwJTtcblx0XHRcdGhlaWdodDogY2FsYyggdmFyKCAtLWFudGlhbGlhc2luZy1mYWN0b3IgKSAqIDFweCApO1xuXHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVZKCBjYWxjKCB2YXIoIC0tc2VsZWN0ZWQtdG9wLCAwICkgKiAxcHggKSApXG5cdFx0XHRcdHNjYWxlWShcblx0XHRcdFx0XHRjYWxjKFxuXHRcdFx0XHRcdFx0dmFyKCAtLXNlbGVjdGVkLWhlaWdodCwgMCApIC9cblx0XHRcdFx0XHRcdFx0dmFyKCAtLWFudGlhbGlhc2luZy1mYWN0b3IgKVxuXHRcdFx0XHRcdClcblx0XHRcdFx0KTtcblx0XHRcdGJhY2tncm91bmQtY29sb3I6IGNvbG9yLW1peChcblx0XHRcdFx0aW4gc3JnYixcblx0XHRcdFx0JHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9LFxuXHRcdFx0XHR0cmFuc3BhcmVudCA5NiVcblx0XHRcdCk7XG5cdFx0fVxuXHRcdCZbZGF0YS1zZWxlY3Qtb24tbW92ZT0ndHJ1ZSddOmhhcyhcblx0XHRcdFx0OmlzKCA6Zm9jdXMtdmlzaWJsZSwgW2RhdGEtZm9jdXMtdmlzaWJsZV0gKVxuXHRcdFx0KTo6YmVmb3JlIHtcblx0XHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0XHRib3JkZXI6IHZhciggLS13cC1hZG1pbi1ib3JkZXItd2lkdGgtZm9jdXMgKSBzb2xpZFxuXHRcdFx0XHQkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHQvKiBBZGp1c3RpbmcgdGhlIGJvcmRlciB3aWR0aCB0byBtYXRjaCB0aGUgc2NhbGluZyBpbiB0aGUgeSBheGlzLiAqL1xuXHRcdFx0Ym9yZGVyLWJsb2NrLXdpZHRoOiBjYWxjKFxuXHRcdFx0XHR2YXIoIC0td3AtYWRtaW4tYm9yZGVyLXdpZHRoLWZvY3VzLCAxcHggKSAvXG5cdFx0XHRcdFx0KFxuXHRcdFx0XHRcdFx0dmFyKCAtLXNlbGVjdGVkLWhlaWdodCwgMCApIC9cblx0XHRcdFx0XHRcdFx0dmFyKCAtLWFudGlhbGlhc2luZy1mYWN0b3IgKVxuXHRcdFx0XHRcdClcblx0XHRcdCk7XG5cdFx0fVxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVGFiID0gc3R5bGVkKCBBcmlha2l0LlRhYiApYFxuXHQmIHtcblx0XHQvKiBSZXNldHMgKi9cblx0XHRib3JkZXItcmFkaXVzOiAwO1xuXHRcdGJhY2tncm91bmQ6IHRyYW5zcGFyZW50O1xuXHRcdGJvcmRlcjogbm9uZTtcblx0XHRib3gtc2hhZG93OiBub25lO1xuXG5cdFx0ZmxleDogMSAwIGF1dG87XG5cdFx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcblx0XHRkaXNwbGF5OiBmbGV4O1xuXHRcdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdFx0Y3Vyc29yOiBwb2ludGVyO1xuXHRcdGxpbmUtaGVpZ2h0OiAxLjI7IC8vIENoYXJhY3RlcnMgaW4gc29tZSBsYW5ndWFnZXMgKGUuZy4gSmFwYW5lc2UpIG1heSBoYXZlIGEgbmF0aXZlIGhpZ2hlciBsaW5lLWhlaWdodC5cblx0XHRmb250LWZhbWlseTogJHsgZm9udCggJ2RlZmF1bHQuZm9udEZhbWlseScgKSB9O1xuXHRcdGZvbnQtd2VpZ2h0OiA0MDA7XG5cdFx0Zm9udC1zaXplOiAkeyBmb250KCAnZGVmYXVsdC5mb250U2l6ZScgKSB9O1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9O1xuXG5cdFx0JlthcmlhLWRpc2FibGVkPSd0cnVlJ10ge1xuXHRcdFx0Y3Vyc29yOiBkZWZhdWx0O1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy51aS50ZXh0RGlzYWJsZWQgfTtcblx0XHR9XG5cblx0XHQmOm5vdCggW2FyaWEtZGlzYWJsZWQ9J3RydWUnXSApOmlzKCA6aG92ZXIsIFtkYXRhLWZvY3VzLXZpc2libGVdICkge1xuXHRcdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHR9XG5cblx0XHQmOmZvY3VzOm5vdCggOmRpc2FibGVkICkge1xuXHRcdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHRcdG91dGxpbmU6IG5vbmU7XG5cdFx0fVxuXG5cdFx0Ly8gRm9jdXMgaW5kaWNhdG9yLlxuXHRcdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0XHQmOjphZnRlciB7XG5cdFx0XHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdFx0XHRwb2ludGVyLWV2ZW50czogbm9uZTtcblxuXHRcdFx0Ly8gRHJhdyB0aGUgaW5kaWNhdG9yLlxuXHRcdFx0Ly8gT3V0bGluZSB3b3JrcyBmb3IgV2luZG93cyBoaWdoIGNvbnRyYXN0IG1vZGUgYXMgd2VsbC5cblx0XHRcdG91dGxpbmU6IHZhciggLS13cC1hZG1pbi1ib3JkZXItd2lkdGgtZm9jdXMgKSBzb2xpZFxuXHRcdFx0XHQkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHRib3JkZXItcmFkaXVzOiAkeyBDT05GSUcucmFkaXVzU21hbGwgfTtcblxuXHRcdFx0Ly8gQW5pbWF0aW9uXG5cdFx0XHRvcGFjaXR5OiAwO1xuXG5cdFx0XHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1Y2VkLW1vdGlvbiApIHtcblx0XHRcdFx0dHJhbnNpdGlvbjogb3BhY2l0eSAwLjFzIGxpbmVhcjtcblx0XHRcdH1cblx0XHR9XG5cblx0XHQmW2RhdGEtZm9jdXMtdmlzaWJsZV06OmFmdGVyIHtcblx0XHRcdG9wYWNpdHk6IDE7XG5cdFx0fVxuXHR9XG5cblx0W2FyaWEtb3JpZW50YXRpb249J2hvcml6b250YWwnXSAmIHtcblx0XHRwYWRkaW5nLWlubGluZTogJHsgc3BhY2UoIDQgKSB9O1xuXHRcdGhlaWdodDogJHsgc3BhY2UoIDEyICkgfTtcblx0XHRzY3JvbGwtbWFyZ2luOiAyNHB4O1xuXG5cdFx0Jjo6YWZ0ZXIge1xuXHRcdFx0Y29udGVudDogJyc7XG5cdFx0XHRpbnNldDogJHsgc3BhY2UoIDMgKSB9O1xuXHRcdH1cblx0fVxuXG5cdFthcmlhLW9yaWVudGF0aW9uPSd2ZXJ0aWNhbCddICYge1xuXHRcdHBhZGRpbmc6ICR7IHNwYWNlKCAyICkgfSAkeyBzcGFjZSggMyApIH07XG5cdFx0bWluLWhlaWdodDogJHsgc3BhY2UoIDEwICkgfTtcblxuXHRcdCZbYXJpYS1zZWxlY3RlZD0ndHJ1ZSddIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0XHRmaWxsOiBjdXJyZW50Q29sb3I7XG5cdFx0fVxuXHR9XG5cdFthcmlhLW9yaWVudGF0aW9uPSd2ZXJ0aWNhbCddW2RhdGEtc2VsZWN0LW9uLW1vdmU9J2ZhbHNlJ10gJjo6YWZ0ZXIge1xuXHRcdGNvbnRlbnQ6ICcnO1xuXHRcdGluc2V0OiB2YXIoIC0td3AtYWRtaW4tYm9yZGVyLXdpZHRoLWZvY3VzICk7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUYWJDaGlsZHJlbiA9IHN0eWxlZC5zcGFuYFxuXHRmbGV4LWdyb3c6IDE7XG5cblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblxuXHRbYXJpYS1vcmllbnRhdGlvbj0naG9yaXpvbnRhbCddICYge1xuXHRcdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHR9XG5cdFthcmlhLW9yaWVudGF0aW9uPSd2ZXJ0aWNhbCddICYge1xuXHRcdGp1c3RpZnktY29udGVudDogc3RhcnQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUYWJDaGV2cm9uID0gc3R5bGVkKCBJY29uIClgXG5cdGZsZXgtc2hyaW5rOiAwO1xuXHRtYXJnaW4taW5saW5lLWVuZDogJHsgc3BhY2UoIC0xICkgfTtcblx0W2FyaWEtb3JpZW50YXRpb249J2hvcml6b250YWwnXSAmIHtcblx0XHRkaXNwbGF5OiBub25lO1xuXHR9XG5cdG9wYWNpdHk6IDA7XG5cdFtyb2xlPSd0YWInXTppcyggW2FyaWEtc2VsZWN0ZWQ9J3RydWUnXSwgW2RhdGEtZm9jdXMtdmlzaWJsZV0sIDpob3ZlciApICYge1xuXHRcdG9wYWNpdHk6IDE7XG5cdH1cblx0Ly8gVGhlIGNoZXZyb24gaXMgdHJhbnNpdGlvbmVkIGludG8gZXhpc3RlbmNlIHdoZW4gc2VsZWN0T25Nb3ZlIGlzIGVuYWJsZWQsXG5cdC8vIGJlY2F1c2Ugb3RoZXJ3aXNlIGl0IGxvb2tzIGphcnJpbmcsIGFzIGl0IHNob3dzIHVwIG91dHNpZGUgb2YgdGhlIGZvY3VzXG5cdC8vIGluZGljYXRvciB0aGF0J3MgYmVpbmcgYW5pbWF0ZWQgYXQgdGhlIHNhbWUgdGltZS5cblx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0W2RhdGEtc2VsZWN0LW9uLW1vdmU9J3RydWUnXVxuXHRcdFx0W3JvbGU9J3RhYiddOmlzKCBbYXJpYS1zZWxlY3RlZD0ndHJ1ZSddLCAgKVxuXHRcdFx0JiB7XG5cdFx0XHR0cmFuc2l0aW9uOiBvcGFjaXR5IDAuMTVzIDAuMTVzIGxpbmVhcjtcblx0XHR9XG5cdH1cblx0JjpkaXIoIHJ0bCApIHtcblx0XHRyb3RhdGU6IDE4MGRlZztcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFRhYlBhbmVsID0gc3R5bGVkKCBBcmlha2l0LlRhYlBhbmVsIClgXG5cdCY6Zm9jdXMge1xuXHRcdGJveC1zaGFkb3c6IG5vbmU7XG5cdFx0b3V0bGluZTogbm9uZTtcblx0fVxuXG5cdCZbZGF0YS1mb2N1cy12aXNpYmxlXSB7XG5cdFx0Ym94LXNoYWRvdzogMCAwIDAgdmFyKCAtLXdwLWFkbWluLWJvcmRlci13aWR0aC1mb2N1cyApXG5cdFx0XHQkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0Ly8gV2luZG93cyBoaWdoIGNvbnRyYXN0IG1vZGUuXG5cdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdG91dGxpbmUtb2Zmc2V0OiAwO1xuXHR9XG5gO1xuIl19 */"));
  var Tab22 = /* @__PURE__ */ createStyled(Tab, false ? {
    target: "enfox0g3"
  } : {
    target: "enfox0g3",
    label: "Tab"
  })("&{border-radius:0;background:transparent;border:none;box-shadow:none;flex:1 0 auto;white-space:nowrap;display:flex;align-items:center;cursor:pointer;line-height:1.2;font-family:", font("default.fontFamily"), ";font-weight:400;font-size:", font("default.fontSize"), ";color:", COLORS.theme.foreground, ";position:relative;&[aria-disabled='true']{cursor:default;color:", COLORS.ui.textDisabled, ";}&:not( [aria-disabled='true'] ):is( :hover, [data-focus-visible] ){color:", COLORS.theme.accent, ";}&:focus:not( :disabled ){box-shadow:none;outline:none;}&::after{position:absolute;pointer-events:none;outline:var( --wp-admin-border-width-focus ) solid ", COLORS.theme.accent, ";border-radius:", config_values_default.radiusSmall, ";opacity:0;@media not ( prefers-reduced-motion ){transition:opacity 0.1s linear;}}&[data-focus-visible]::after{opacity:1;}}[aria-orientation='horizontal'] &{padding-inline:", space(4), ";height:", space(12), ";scroll-margin:24px;&::after{content:'';inset:", space(3), ";}}[aria-orientation='vertical'] &{padding:", space(2), " ", space(3), ";min-height:", space(10), ";&[aria-selected='true']{color:", COLORS.theme.accent, ";fill:currentColor;}}[aria-orientation='vertical'][data-select-on-move='false'] &::after{content:'';inset:var( --wp-admin-border-width-focus );}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzSndDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgZm9udCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IEljb24gZnJvbSAnLi4vaWNvbic7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRUYWJMaXN0ID0gc3R5bGVkKCBBcmlha2l0LlRhYkxpc3QgKWBcblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IHN0cmV0Y2g7XG5cdG92ZXJmbG93LXg6IGF1dG87XG5cblx0JlthcmlhLW9yaWVudGF0aW9uPSd2ZXJ0aWNhbCddIHtcblx0XHRmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXHR9XG5cblx0OndoZXJlKCBbYXJpYS1vcmllbnRhdGlvbj0naG9yaXpvbnRhbCddICkge1xuXHRcdHdpZHRoOiBmaXQtY29udGVudDtcblx0fVxuXG5cdC0tZGlyZWN0aW9uLWZhY3RvcjogMTtcblx0LS1kaXJlY3Rpb24tc3RhcnQ6IGxlZnQ7XG5cdC0tZGlyZWN0aW9uLWVuZDogcmlnaHQ7XG5cdC0tc2VsZWN0ZWQtc3RhcnQ6IHZhciggLS1zZWxlY3RlZC1sZWZ0LCAwICk7XG5cdCY6ZGlyKCBydGwgKSB7XG5cdFx0LS1kaXJlY3Rpb24tZmFjdG9yOiAtMTtcblx0XHQtLWRpcmVjdGlvbi1zdGFydDogcmlnaHQ7XG5cdFx0LS1kaXJlY3Rpb24tZW5kOiBsZWZ0O1xuXHRcdC0tc2VsZWN0ZWQtc3RhcnQ6IHZhciggLS1zZWxlY3RlZC1yaWdodCwgMCApO1xuXHR9XG5cblx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0JltkYXRhLWluZGljYXRvci1hbmltYXRlZF06OmJlZm9yZSB7XG5cdFx0XHR0cmFuc2l0aW9uLXByb3BlcnR5OiB0cmFuc2Zvcm0sIGJvcmRlci1yYWRpdXMsIGJvcmRlci1ibG9jaztcblx0XHRcdHRyYW5zaXRpb24tZHVyYXRpb246IDAuMnM7XG5cdFx0XHR0cmFuc2l0aW9uLXRpbWluZy1mdW5jdGlvbjogZWFzZS1vdXQ7XG5cdFx0fVxuXHR9XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0Jjo6YmVmb3JlIHtcblx0XHRjb250ZW50OiAnJztcblx0XHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdFx0dHJhbnNmb3JtLW9yaWdpbjogdmFyKCAtLWRpcmVjdGlvbi1zdGFydCApIHRvcDtcblxuXHRcdC8vIFdpbmRvd3MgaGlnaCBjb250cmFzdCBtb2RlLlxuXHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRvdXRsaW5lLW9mZnNldDogLTFweDtcblx0fVxuXG5cdC8qIFVzaW5nIGEgbGFyZ2UgdmFsdWUgdG8gYXZvaWQgYW50aWFsaWFzaW5nIHJvdW5kaW5nIGlzc3Vlc1xuXHRcdFx0d2hlbiBzY2FsaW5nIGluIHRoZSB0cmFuc2Zvcm0sIHNlZTogaHR0cHM6Ly9zdGFja292ZXJmbG93LmNvbS9hLzUyMTU5MTIzICovXG5cdC0tYW50aWFsaWFzaW5nLWZhY3RvcjogMTAwO1xuXHQmW2FyaWEtb3JpZW50YXRpb249J2hvcml6b250YWwnXSB7XG5cdFx0LS1mYWRlLXdpZHRoOiA2NHB4O1xuXHRcdC0tZmFkZS1ncmFkaWVudC1iYXNlOiB0cmFuc3BhcmVudCAwJSwgYmxhY2sgdmFyKCAtLWZhZGUtd2lkdGggKTtcblx0XHQtLWZhZGUtZ3JhZGllbnQtY29tcG9zZWQ6IHZhciggLS1mYWRlLWdyYWRpZW50LWJhc2UgKSwgYmxhY2sgNjAlLFxuXHRcdFx0dHJhbnNwYXJlbnQgNTAlO1xuXHRcdCYuaXMtb3ZlcmZsb3dpbmctZmlyc3Qge1xuXHRcdFx0bWFzay1pbWFnZTogbGluZWFyLWdyYWRpZW50KFxuXHRcdFx0XHR0byB2YXIoIC0tZGlyZWN0aW9uLWVuZCApLFxuXHRcdFx0XHR2YXIoIC0tZmFkZS1ncmFkaWVudC1iYXNlIClcblx0XHRcdCk7XG5cdFx0fVxuXHRcdCYuaXMtb3ZlcmZsb3dpbmctbGFzdCB7XG5cdFx0XHRtYXNrLWltYWdlOiBsaW5lYXItZ3JhZGllbnQoXG5cdFx0XHRcdHRvIHZhciggLS1kaXJlY3Rpb24tc3RhcnQgKSxcblx0XHRcdFx0dmFyKCAtLWZhZGUtZ3JhZGllbnQtYmFzZSApXG5cdFx0XHQpO1xuXHRcdH1cblx0XHQmLmlzLW92ZXJmbG93aW5nLWZpcnN0LmlzLW92ZXJmbG93aW5nLWxhc3Qge1xuXHRcdFx0bWFzay1pbWFnZTogbGluZWFyLWdyYWRpZW50KFxuXHRcdFx0XHRcdHRvIHJpZ2h0LFxuXHRcdFx0XHRcdHZhciggLS1mYWRlLWdyYWRpZW50LWNvbXBvc2VkIClcblx0XHRcdFx0KSxcblx0XHRcdFx0bGluZWFyLWdyYWRpZW50KCB0byBsZWZ0LCB2YXIoIC0tZmFkZS1ncmFkaWVudC1jb21wb3NlZCApICk7XG5cdFx0fVxuXG5cdFx0Jjo6YmVmb3JlIHtcblx0XHRcdGJvdHRvbTogMDtcblx0XHRcdGhlaWdodDogMDtcblx0XHRcdHdpZHRoOiBjYWxjKCB2YXIoIC0tYW50aWFsaWFzaW5nLWZhY3RvciApICogMXB4ICk7XG5cdFx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoXG5cdFx0XHRcdFx0Y2FsYyhcblx0XHRcdFx0XHRcdHZhciggLS1zZWxlY3RlZC1zdGFydCApICogdmFyKCAtLWRpcmVjdGlvbi1mYWN0b3IgKSAqXG5cdFx0XHRcdFx0XHRcdDFweFxuXHRcdFx0XHRcdClcblx0XHRcdFx0KVxuXHRcdFx0XHRzY2FsZVgoXG5cdFx0XHRcdFx0Y2FsYyhcblx0XHRcdFx0XHRcdHZhciggLS1zZWxlY3RlZC13aWR0aCwgMCApIC9cblx0XHRcdFx0XHRcdFx0dmFyKCAtLWFudGlhbGlhc2luZy1mYWN0b3IgKVxuXHRcdFx0XHRcdClcblx0XHRcdFx0KTtcblx0XHRcdGJvcmRlci1ib3R0b206IHZhciggLS13cC1hZG1pbi1ib3JkZXItd2lkdGgtZm9jdXMgKSBzb2xpZFxuXHRcdFx0XHQkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0fVxuXHR9XG5cdCZbYXJpYS1vcmllbnRhdGlvbj0ndmVydGljYWwnXSB7XG5cdFx0Jjo6YmVmb3JlIHtcblx0XHRcdC8qIEFkanVzdGluZyB0aGUgYm9yZGVyIHJhZGl1cyB0byBtYXRjaCB0aGUgc2NhbGluZyBpbiB0aGUgeSBheGlzLiAqL1xuXHRcdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH0gL1xuXHRcdFx0XHRjYWxjKFxuXHRcdFx0XHRcdCR7IENPTkZJRy5yYWRpdXNTbWFsbCB9IC9cblx0XHRcdFx0XHRcdChcblx0XHRcdFx0XHRcdFx0dmFyKCAtLXNlbGVjdGVkLWhlaWdodCwgMCApIC9cblx0XHRcdFx0XHRcdFx0XHR2YXIoIC0tYW50aWFsaWFzaW5nLWZhY3RvciApXG5cdFx0XHRcdFx0XHQpXG5cdFx0XHRcdCk7XG5cdFx0XHR0b3A6IDA7XG5cdFx0XHRsZWZ0OiAwO1xuXHRcdFx0d2lkdGg6IDEwMCU7XG5cdFx0XHRoZWlnaHQ6IGNhbGMoIHZhciggLS1hbnRpYWxpYXNpbmctZmFjdG9yICkgKiAxcHggKTtcblx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWSggY2FsYyggdmFyKCAtLXNlbGVjdGVkLXRvcCwgMCApICogMXB4ICkgKVxuXHRcdFx0XHRzY2FsZVkoXG5cdFx0XHRcdFx0Y2FsYyhcblx0XHRcdFx0XHRcdHZhciggLS1zZWxlY3RlZC1oZWlnaHQsIDAgKSAvXG5cdFx0XHRcdFx0XHRcdHZhciggLS1hbnRpYWxpYXNpbmctZmFjdG9yIClcblx0XHRcdFx0XHQpXG5cdFx0XHRcdCk7XG5cdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiBjb2xvci1taXgoXG5cdFx0XHRcdGluIHNyZ2IsXG5cdFx0XHRcdCR7IENPTE9SUy50aGVtZS5hY2NlbnQgfSxcblx0XHRcdFx0dHJhbnNwYXJlbnQgOTYlXG5cdFx0XHQpO1xuXHRcdH1cblx0XHQmW2RhdGEtc2VsZWN0LW9uLW1vdmU9J3RydWUnXTpoYXMoXG5cdFx0XHRcdDppcyggOmZvY3VzLXZpc2libGUsIFtkYXRhLWZvY3VzLXZpc2libGVdIClcblx0XHRcdCk6OmJlZm9yZSB7XG5cdFx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdFx0Ym9yZGVyOiB2YXIoIC0td3AtYWRtaW4tYm9yZGVyLXdpZHRoLWZvY3VzICkgc29saWRcblx0XHRcdFx0JHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdFx0LyogQWRqdXN0aW5nIHRoZSBib3JkZXIgd2lkdGggdG8gbWF0Y2ggdGhlIHNjYWxpbmcgaW4gdGhlIHkgYXhpcy4gKi9cblx0XHRcdGJvcmRlci1ibG9jay13aWR0aDogY2FsYyhcblx0XHRcdFx0dmFyKCAtLXdwLWFkbWluLWJvcmRlci13aWR0aC1mb2N1cywgMXB4ICkgL1xuXHRcdFx0XHRcdChcblx0XHRcdFx0XHRcdHZhciggLS1zZWxlY3RlZC1oZWlnaHQsIDAgKSAvXG5cdFx0XHRcdFx0XHRcdHZhciggLS1hbnRpYWxpYXNpbmctZmFjdG9yIClcblx0XHRcdFx0XHQpXG5cdFx0XHQpO1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFRhYiA9IHN0eWxlZCggQXJpYWtpdC5UYWIgKWBcblx0JiB7XG5cdFx0LyogUmVzZXRzICovXG5cdFx0Ym9yZGVyLXJhZGl1czogMDtcblx0XHRiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudDtcblx0XHRib3JkZXI6IG5vbmU7XG5cdFx0Ym94LXNoYWRvdzogbm9uZTtcblxuXHRcdGZsZXg6IDEgMCBhdXRvO1xuXHRcdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cdFx0ZGlzcGxheTogZmxleDtcblx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRcdGN1cnNvcjogcG9pbnRlcjtcblx0XHRsaW5lLWhlaWdodDogMS4yOyAvLyBDaGFyYWN0ZXJzIGluIHNvbWUgbGFuZ3VhZ2VzIChlLmcuIEphcGFuZXNlKSBtYXkgaGF2ZSBhIG5hdGl2ZSBoaWdoZXIgbGluZS1oZWlnaHQuXG5cdFx0Zm9udC1mYW1pbHk6ICR7IGZvbnQoICdkZWZhdWx0LmZvbnRGYW1pbHknICkgfTtcblx0XHRmb250LXdlaWdodDogNDAwO1xuXHRcdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblxuXHRcdCZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRcdGN1cnNvcjogZGVmYXVsdDtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkudGV4dERpc2FibGVkIH07XG5cdFx0fVxuXG5cdFx0Jjpub3QoIFthcmlhLWRpc2FibGVkPSd0cnVlJ10gKTppcyggOmhvdmVyLCBbZGF0YS1mb2N1cy12aXNpYmxlXSApIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0fVxuXG5cdFx0Jjpmb2N1czpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdGJveC1zaGFkb3c6IG5vbmU7XG5cdFx0XHRvdXRsaW5lOiBub25lO1xuXHRcdH1cblxuXHRcdC8vIEZvY3VzIGluZGljYXRvci5cblx0XHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdFx0Jjo6YWZ0ZXIge1xuXHRcdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cblx0XHRcdC8vIERyYXcgdGhlIGluZGljYXRvci5cblx0XHRcdC8vIE91dGxpbmUgd29ya3MgZm9yIFdpbmRvd3MgaGlnaCBjb250cmFzdCBtb2RlIGFzIHdlbGwuXG5cdFx0XHRvdXRsaW5lOiB2YXIoIC0td3AtYWRtaW4tYm9yZGVyLXdpZHRoLWZvY3VzICkgc29saWRcblx0XHRcdFx0JHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cblx0XHRcdC8vIEFuaW1hdGlvblxuXHRcdFx0b3BhY2l0eTogMDtcblxuXHRcdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHRcdHRyYW5zaXRpb246IG9wYWNpdHkgMC4xcyBsaW5lYXI7XG5cdFx0XHR9XG5cdFx0fVxuXG5cdFx0JltkYXRhLWZvY3VzLXZpc2libGVdOjphZnRlciB7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdH1cblx0fVxuXG5cdFthcmlhLW9yaWVudGF0aW9uPSdob3Jpem9udGFsJ10gJiB7XG5cdFx0cGFkZGluZy1pbmxpbmU6ICR7IHNwYWNlKCA0ICkgfTtcblx0XHRoZWlnaHQ6ICR7IHNwYWNlKCAxMiApIH07XG5cdFx0c2Nyb2xsLW1hcmdpbjogMjRweDtcblxuXHRcdCY6OmFmdGVyIHtcblx0XHRcdGNvbnRlbnQ6ICcnO1xuXHRcdFx0aW5zZXQ6ICR7IHNwYWNlKCAzICkgfTtcblx0XHR9XG5cdH1cblxuXHRbYXJpYS1vcmllbnRhdGlvbj0ndmVydGljYWwnXSAmIHtcblx0XHRwYWRkaW5nOiAkeyBzcGFjZSggMiApIH0gJHsgc3BhY2UoIDMgKSB9O1xuXHRcdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCAxMCApIH07XG5cblx0XHQmW2FyaWEtc2VsZWN0ZWQ9J3RydWUnXSB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdFx0ZmlsbDogY3VycmVudENvbG9yO1xuXHRcdH1cblx0fVxuXHRbYXJpYS1vcmllbnRhdGlvbj0ndmVydGljYWwnXVtkYXRhLXNlbGVjdC1vbi1tb3ZlPSdmYWxzZSddICY6OmFmdGVyIHtcblx0XHRjb250ZW50OiAnJztcblx0XHRpbnNldDogdmFyKCAtLXdwLWFkbWluLWJvcmRlci13aWR0aC1mb2N1cyApO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVGFiQ2hpbGRyZW4gPSBzdHlsZWQuc3BhbmBcblx0ZmxleC1ncm93OiAxO1xuXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cblx0W2FyaWEtb3JpZW50YXRpb249J2hvcml6b250YWwnXSAmIHtcblx0XHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0fVxuXHRbYXJpYS1vcmllbnRhdGlvbj0ndmVydGljYWwnXSAmIHtcblx0XHRqdXN0aWZ5LWNvbnRlbnQ6IHN0YXJ0O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVGFiQ2hldnJvbiA9IHN0eWxlZCggSWNvbiApYFxuXHRmbGV4LXNocmluazogMDtcblx0bWFyZ2luLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAtMSApIH07XG5cdFthcmlhLW9yaWVudGF0aW9uPSdob3Jpem9udGFsJ10gJiB7XG5cdFx0ZGlzcGxheTogbm9uZTtcblx0fVxuXHRvcGFjaXR5OiAwO1xuXHRbcm9sZT0ndGFiJ106aXMoIFthcmlhLXNlbGVjdGVkPSd0cnVlJ10sIFtkYXRhLWZvY3VzLXZpc2libGVdLCA6aG92ZXIgKSAmIHtcblx0XHRvcGFjaXR5OiAxO1xuXHR9XG5cdC8vIFRoZSBjaGV2cm9uIGlzIHRyYW5zaXRpb25lZCBpbnRvIGV4aXN0ZW5jZSB3aGVuIHNlbGVjdE9uTW92ZSBpcyBlbmFibGVkLFxuXHQvLyBiZWNhdXNlIG90aGVyd2lzZSBpdCBsb29rcyBqYXJyaW5nLCBhcyBpdCBzaG93cyB1cCBvdXRzaWRlIG9mIHRoZSBmb2N1c1xuXHQvLyBpbmRpY2F0b3IgdGhhdCdzIGJlaW5nIGFuaW1hdGVkIGF0IHRoZSBzYW1lIHRpbWUuXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFtkYXRhLXNlbGVjdC1vbi1tb3ZlPSd0cnVlJ11cblx0XHRcdFtyb2xlPSd0YWInXTppcyggW2FyaWEtc2VsZWN0ZWQ9J3RydWUnXSwgIClcblx0XHRcdCYge1xuXHRcdFx0dHJhbnNpdGlvbjogb3BhY2l0eSAwLjE1cyAwLjE1cyBsaW5lYXI7XG5cdFx0fVxuXHR9XG5cdCY6ZGlyKCBydGwgKSB7XG5cdFx0cm90YXRlOiAxODBkZWc7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUYWJQYW5lbCA9IHN0eWxlZCggQXJpYWtpdC5UYWJQYW5lbCApYFxuXHQmOmZvY3VzIHtcblx0XHRib3gtc2hhZG93OiBub25lO1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdH1cblxuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdGJveC1zaGFkb3c6IDAgMCAwIHZhciggLS13cC1hZG1pbi1ib3JkZXItd2lkdGgtZm9jdXMgKVxuXHRcdFx0JHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdC8vIFdpbmRvd3MgaGlnaCBjb250cmFzdCBtb2RlLlxuXHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRvdXRsaW5lLW9mZnNldDogMDtcblx0fVxuYDtcbiJdfQ== */"));
  var TabChildren = /* @__PURE__ */ createStyled("span", false ? {
    target: "enfox0g2"
  } : {
    target: "enfox0g2",
    label: "TabChildren"
  })(false ? {
    name: "9at4z3",
    styles: "flex-grow:1;display:flex;align-items:center;[aria-orientation='horizontal'] &{justify-content:center;}[aria-orientation='vertical'] &{justify-content:start;}"
  } : {
    name: "9at4z3",
    styles: "flex-grow:1;display:flex;align-items:center;[aria-orientation='horizontal'] &{justify-content:center;}[aria-orientation='vertical'] &{justify-content:start;}/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEwT3NDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgZm9udCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IEljb24gZnJvbSAnLi4vaWNvbic7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRUYWJMaXN0ID0gc3R5bGVkKCBBcmlha2l0LlRhYkxpc3QgKWBcblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IHN0cmV0Y2g7XG5cdG92ZXJmbG93LXg6IGF1dG87XG5cblx0JlthcmlhLW9yaWVudGF0aW9uPSd2ZXJ0aWNhbCddIHtcblx0XHRmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXHR9XG5cblx0OndoZXJlKCBbYXJpYS1vcmllbnRhdGlvbj0naG9yaXpvbnRhbCddICkge1xuXHRcdHdpZHRoOiBmaXQtY29udGVudDtcblx0fVxuXG5cdC0tZGlyZWN0aW9uLWZhY3RvcjogMTtcblx0LS1kaXJlY3Rpb24tc3RhcnQ6IGxlZnQ7XG5cdC0tZGlyZWN0aW9uLWVuZDogcmlnaHQ7XG5cdC0tc2VsZWN0ZWQtc3RhcnQ6IHZhciggLS1zZWxlY3RlZC1sZWZ0LCAwICk7XG5cdCY6ZGlyKCBydGwgKSB7XG5cdFx0LS1kaXJlY3Rpb24tZmFjdG9yOiAtMTtcblx0XHQtLWRpcmVjdGlvbi1zdGFydDogcmlnaHQ7XG5cdFx0LS1kaXJlY3Rpb24tZW5kOiBsZWZ0O1xuXHRcdC0tc2VsZWN0ZWQtc3RhcnQ6IHZhciggLS1zZWxlY3RlZC1yaWdodCwgMCApO1xuXHR9XG5cblx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0JltkYXRhLWluZGljYXRvci1hbmltYXRlZF06OmJlZm9yZSB7XG5cdFx0XHR0cmFuc2l0aW9uLXByb3BlcnR5OiB0cmFuc2Zvcm0sIGJvcmRlci1yYWRpdXMsIGJvcmRlci1ibG9jaztcblx0XHRcdHRyYW5zaXRpb24tZHVyYXRpb246IDAuMnM7XG5cdFx0XHR0cmFuc2l0aW9uLXRpbWluZy1mdW5jdGlvbjogZWFzZS1vdXQ7XG5cdFx0fVxuXHR9XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0Jjo6YmVmb3JlIHtcblx0XHRjb250ZW50OiAnJztcblx0XHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdFx0dHJhbnNmb3JtLW9yaWdpbjogdmFyKCAtLWRpcmVjdGlvbi1zdGFydCApIHRvcDtcblxuXHRcdC8vIFdpbmRvd3MgaGlnaCBjb250cmFzdCBtb2RlLlxuXHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRvdXRsaW5lLW9mZnNldDogLTFweDtcblx0fVxuXG5cdC8qIFVzaW5nIGEgbGFyZ2UgdmFsdWUgdG8gYXZvaWQgYW50aWFsaWFzaW5nIHJvdW5kaW5nIGlzc3Vlc1xuXHRcdFx0d2hlbiBzY2FsaW5nIGluIHRoZSB0cmFuc2Zvcm0sIHNlZTogaHR0cHM6Ly9zdGFja292ZXJmbG93LmNvbS9hLzUyMTU5MTIzICovXG5cdC0tYW50aWFsaWFzaW5nLWZhY3RvcjogMTAwO1xuXHQmW2FyaWEtb3JpZW50YXRpb249J2hvcml6b250YWwnXSB7XG5cdFx0LS1mYWRlLXdpZHRoOiA2NHB4O1xuXHRcdC0tZmFkZS1ncmFkaWVudC1iYXNlOiB0cmFuc3BhcmVudCAwJSwgYmxhY2sgdmFyKCAtLWZhZGUtd2lkdGggKTtcblx0XHQtLWZhZGUtZ3JhZGllbnQtY29tcG9zZWQ6IHZhciggLS1mYWRlLWdyYWRpZW50LWJhc2UgKSwgYmxhY2sgNjAlLFxuXHRcdFx0dHJhbnNwYXJlbnQgNTAlO1xuXHRcdCYuaXMtb3ZlcmZsb3dpbmctZmlyc3Qge1xuXHRcdFx0bWFzay1pbWFnZTogbGluZWFyLWdyYWRpZW50KFxuXHRcdFx0XHR0byB2YXIoIC0tZGlyZWN0aW9uLWVuZCApLFxuXHRcdFx0XHR2YXIoIC0tZmFkZS1ncmFkaWVudC1iYXNlIClcblx0XHRcdCk7XG5cdFx0fVxuXHRcdCYuaXMtb3ZlcmZsb3dpbmctbGFzdCB7XG5cdFx0XHRtYXNrLWltYWdlOiBsaW5lYXItZ3JhZGllbnQoXG5cdFx0XHRcdHRvIHZhciggLS1kaXJlY3Rpb24tc3RhcnQgKSxcblx0XHRcdFx0dmFyKCAtLWZhZGUtZ3JhZGllbnQtYmFzZSApXG5cdFx0XHQpO1xuXHRcdH1cblx0XHQmLmlzLW92ZXJmbG93aW5nLWZpcnN0LmlzLW92ZXJmbG93aW5nLWxhc3Qge1xuXHRcdFx0bWFzay1pbWFnZTogbGluZWFyLWdyYWRpZW50KFxuXHRcdFx0XHRcdHRvIHJpZ2h0LFxuXHRcdFx0XHRcdHZhciggLS1mYWRlLWdyYWRpZW50LWNvbXBvc2VkIClcblx0XHRcdFx0KSxcblx0XHRcdFx0bGluZWFyLWdyYWRpZW50KCB0byBsZWZ0LCB2YXIoIC0tZmFkZS1ncmFkaWVudC1jb21wb3NlZCApICk7XG5cdFx0fVxuXG5cdFx0Jjo6YmVmb3JlIHtcblx0XHRcdGJvdHRvbTogMDtcblx0XHRcdGhlaWdodDogMDtcblx0XHRcdHdpZHRoOiBjYWxjKCB2YXIoIC0tYW50aWFsaWFzaW5nLWZhY3RvciApICogMXB4ICk7XG5cdFx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoXG5cdFx0XHRcdFx0Y2FsYyhcblx0XHRcdFx0XHRcdHZhciggLS1zZWxlY3RlZC1zdGFydCApICogdmFyKCAtLWRpcmVjdGlvbi1mYWN0b3IgKSAqXG5cdFx0XHRcdFx0XHRcdDFweFxuXHRcdFx0XHRcdClcblx0XHRcdFx0KVxuXHRcdFx0XHRzY2FsZVgoXG5cdFx0XHRcdFx0Y2FsYyhcblx0XHRcdFx0XHRcdHZhciggLS1zZWxlY3RlZC13aWR0aCwgMCApIC9cblx0XHRcdFx0XHRcdFx0dmFyKCAtLWFudGlhbGlhc2luZy1mYWN0b3IgKVxuXHRcdFx0XHRcdClcblx0XHRcdFx0KTtcblx0XHRcdGJvcmRlci1ib3R0b206IHZhciggLS13cC1hZG1pbi1ib3JkZXItd2lkdGgtZm9jdXMgKSBzb2xpZFxuXHRcdFx0XHQkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0fVxuXHR9XG5cdCZbYXJpYS1vcmllbnRhdGlvbj0ndmVydGljYWwnXSB7XG5cdFx0Jjo6YmVmb3JlIHtcblx0XHRcdC8qIEFkanVzdGluZyB0aGUgYm9yZGVyIHJhZGl1cyB0byBtYXRjaCB0aGUgc2NhbGluZyBpbiB0aGUgeSBheGlzLiAqL1xuXHRcdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH0gL1xuXHRcdFx0XHRjYWxjKFxuXHRcdFx0XHRcdCR7IENPTkZJRy5yYWRpdXNTbWFsbCB9IC9cblx0XHRcdFx0XHRcdChcblx0XHRcdFx0XHRcdFx0dmFyKCAtLXNlbGVjdGVkLWhlaWdodCwgMCApIC9cblx0XHRcdFx0XHRcdFx0XHR2YXIoIC0tYW50aWFsaWFzaW5nLWZhY3RvciApXG5cdFx0XHRcdFx0XHQpXG5cdFx0XHRcdCk7XG5cdFx0XHR0b3A6IDA7XG5cdFx0XHRsZWZ0OiAwO1xuXHRcdFx0d2lkdGg6IDEwMCU7XG5cdFx0XHRoZWlnaHQ6IGNhbGMoIHZhciggLS1hbnRpYWxpYXNpbmctZmFjdG9yICkgKiAxcHggKTtcblx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWSggY2FsYyggdmFyKCAtLXNlbGVjdGVkLXRvcCwgMCApICogMXB4ICkgKVxuXHRcdFx0XHRzY2FsZVkoXG5cdFx0XHRcdFx0Y2FsYyhcblx0XHRcdFx0XHRcdHZhciggLS1zZWxlY3RlZC1oZWlnaHQsIDAgKSAvXG5cdFx0XHRcdFx0XHRcdHZhciggLS1hbnRpYWxpYXNpbmctZmFjdG9yIClcblx0XHRcdFx0XHQpXG5cdFx0XHRcdCk7XG5cdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiBjb2xvci1taXgoXG5cdFx0XHRcdGluIHNyZ2IsXG5cdFx0XHRcdCR7IENPTE9SUy50aGVtZS5hY2NlbnQgfSxcblx0XHRcdFx0dHJhbnNwYXJlbnQgOTYlXG5cdFx0XHQpO1xuXHRcdH1cblx0XHQmW2RhdGEtc2VsZWN0LW9uLW1vdmU9J3RydWUnXTpoYXMoXG5cdFx0XHRcdDppcyggOmZvY3VzLXZpc2libGUsIFtkYXRhLWZvY3VzLXZpc2libGVdIClcblx0XHRcdCk6OmJlZm9yZSB7XG5cdFx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdFx0Ym9yZGVyOiB2YXIoIC0td3AtYWRtaW4tYm9yZGVyLXdpZHRoLWZvY3VzICkgc29saWRcblx0XHRcdFx0JHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdFx0LyogQWRqdXN0aW5nIHRoZSBib3JkZXIgd2lkdGggdG8gbWF0Y2ggdGhlIHNjYWxpbmcgaW4gdGhlIHkgYXhpcy4gKi9cblx0XHRcdGJvcmRlci1ibG9jay13aWR0aDogY2FsYyhcblx0XHRcdFx0dmFyKCAtLXdwLWFkbWluLWJvcmRlci13aWR0aC1mb2N1cywgMXB4ICkgL1xuXHRcdFx0XHRcdChcblx0XHRcdFx0XHRcdHZhciggLS1zZWxlY3RlZC1oZWlnaHQsIDAgKSAvXG5cdFx0XHRcdFx0XHRcdHZhciggLS1hbnRpYWxpYXNpbmctZmFjdG9yIClcblx0XHRcdFx0XHQpXG5cdFx0XHQpO1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFRhYiA9IHN0eWxlZCggQXJpYWtpdC5UYWIgKWBcblx0JiB7XG5cdFx0LyogUmVzZXRzICovXG5cdFx0Ym9yZGVyLXJhZGl1czogMDtcblx0XHRiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudDtcblx0XHRib3JkZXI6IG5vbmU7XG5cdFx0Ym94LXNoYWRvdzogbm9uZTtcblxuXHRcdGZsZXg6IDEgMCBhdXRvO1xuXHRcdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cdFx0ZGlzcGxheTogZmxleDtcblx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRcdGN1cnNvcjogcG9pbnRlcjtcblx0XHRsaW5lLWhlaWdodDogMS4yOyAvLyBDaGFyYWN0ZXJzIGluIHNvbWUgbGFuZ3VhZ2VzIChlLmcuIEphcGFuZXNlKSBtYXkgaGF2ZSBhIG5hdGl2ZSBoaWdoZXIgbGluZS1oZWlnaHQuXG5cdFx0Zm9udC1mYW1pbHk6ICR7IGZvbnQoICdkZWZhdWx0LmZvbnRGYW1pbHknICkgfTtcblx0XHRmb250LXdlaWdodDogNDAwO1xuXHRcdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblxuXHRcdCZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRcdGN1cnNvcjogZGVmYXVsdDtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkudGV4dERpc2FibGVkIH07XG5cdFx0fVxuXG5cdFx0Jjpub3QoIFthcmlhLWRpc2FibGVkPSd0cnVlJ10gKTppcyggOmhvdmVyLCBbZGF0YS1mb2N1cy12aXNpYmxlXSApIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0fVxuXG5cdFx0Jjpmb2N1czpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdGJveC1zaGFkb3c6IG5vbmU7XG5cdFx0XHRvdXRsaW5lOiBub25lO1xuXHRcdH1cblxuXHRcdC8vIEZvY3VzIGluZGljYXRvci5cblx0XHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdFx0Jjo6YWZ0ZXIge1xuXHRcdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cblx0XHRcdC8vIERyYXcgdGhlIGluZGljYXRvci5cblx0XHRcdC8vIE91dGxpbmUgd29ya3MgZm9yIFdpbmRvd3MgaGlnaCBjb250cmFzdCBtb2RlIGFzIHdlbGwuXG5cdFx0XHRvdXRsaW5lOiB2YXIoIC0td3AtYWRtaW4tYm9yZGVyLXdpZHRoLWZvY3VzICkgc29saWRcblx0XHRcdFx0JHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cblx0XHRcdC8vIEFuaW1hdGlvblxuXHRcdFx0b3BhY2l0eTogMDtcblxuXHRcdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHRcdHRyYW5zaXRpb246IG9wYWNpdHkgMC4xcyBsaW5lYXI7XG5cdFx0XHR9XG5cdFx0fVxuXG5cdFx0JltkYXRhLWZvY3VzLXZpc2libGVdOjphZnRlciB7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdH1cblx0fVxuXG5cdFthcmlhLW9yaWVudGF0aW9uPSdob3Jpem9udGFsJ10gJiB7XG5cdFx0cGFkZGluZy1pbmxpbmU6ICR7IHNwYWNlKCA0ICkgfTtcblx0XHRoZWlnaHQ6ICR7IHNwYWNlKCAxMiApIH07XG5cdFx0c2Nyb2xsLW1hcmdpbjogMjRweDtcblxuXHRcdCY6OmFmdGVyIHtcblx0XHRcdGNvbnRlbnQ6ICcnO1xuXHRcdFx0aW5zZXQ6ICR7IHNwYWNlKCAzICkgfTtcblx0XHR9XG5cdH1cblxuXHRbYXJpYS1vcmllbnRhdGlvbj0ndmVydGljYWwnXSAmIHtcblx0XHRwYWRkaW5nOiAkeyBzcGFjZSggMiApIH0gJHsgc3BhY2UoIDMgKSB9O1xuXHRcdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCAxMCApIH07XG5cblx0XHQmW2FyaWEtc2VsZWN0ZWQ9J3RydWUnXSB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdFx0ZmlsbDogY3VycmVudENvbG9yO1xuXHRcdH1cblx0fVxuXHRbYXJpYS1vcmllbnRhdGlvbj0ndmVydGljYWwnXVtkYXRhLXNlbGVjdC1vbi1tb3ZlPSdmYWxzZSddICY6OmFmdGVyIHtcblx0XHRjb250ZW50OiAnJztcblx0XHRpbnNldDogdmFyKCAtLXdwLWFkbWluLWJvcmRlci13aWR0aC1mb2N1cyApO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVGFiQ2hpbGRyZW4gPSBzdHlsZWQuc3BhbmBcblx0ZmxleC1ncm93OiAxO1xuXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cblx0W2FyaWEtb3JpZW50YXRpb249J2hvcml6b250YWwnXSAmIHtcblx0XHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0fVxuXHRbYXJpYS1vcmllbnRhdGlvbj0ndmVydGljYWwnXSAmIHtcblx0XHRqdXN0aWZ5LWNvbnRlbnQ6IHN0YXJ0O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVGFiQ2hldnJvbiA9IHN0eWxlZCggSWNvbiApYFxuXHRmbGV4LXNocmluazogMDtcblx0bWFyZ2luLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAtMSApIH07XG5cdFthcmlhLW9yaWVudGF0aW9uPSdob3Jpem9udGFsJ10gJiB7XG5cdFx0ZGlzcGxheTogbm9uZTtcblx0fVxuXHRvcGFjaXR5OiAwO1xuXHRbcm9sZT0ndGFiJ106aXMoIFthcmlhLXNlbGVjdGVkPSd0cnVlJ10sIFtkYXRhLWZvY3VzLXZpc2libGVdLCA6aG92ZXIgKSAmIHtcblx0XHRvcGFjaXR5OiAxO1xuXHR9XG5cdC8vIFRoZSBjaGV2cm9uIGlzIHRyYW5zaXRpb25lZCBpbnRvIGV4aXN0ZW5jZSB3aGVuIHNlbGVjdE9uTW92ZSBpcyBlbmFibGVkLFxuXHQvLyBiZWNhdXNlIG90aGVyd2lzZSBpdCBsb29rcyBqYXJyaW5nLCBhcyBpdCBzaG93cyB1cCBvdXRzaWRlIG9mIHRoZSBmb2N1c1xuXHQvLyBpbmRpY2F0b3IgdGhhdCdzIGJlaW5nIGFuaW1hdGVkIGF0IHRoZSBzYW1lIHRpbWUuXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFtkYXRhLXNlbGVjdC1vbi1tb3ZlPSd0cnVlJ11cblx0XHRcdFtyb2xlPSd0YWInXTppcyggW2FyaWEtc2VsZWN0ZWQ9J3RydWUnXSwgIClcblx0XHRcdCYge1xuXHRcdFx0dHJhbnNpdGlvbjogb3BhY2l0eSAwLjE1cyAwLjE1cyBsaW5lYXI7XG5cdFx0fVxuXHR9XG5cdCY6ZGlyKCBydGwgKSB7XG5cdFx0cm90YXRlOiAxODBkZWc7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUYWJQYW5lbCA9IHN0eWxlZCggQXJpYWtpdC5UYWJQYW5lbCApYFxuXHQmOmZvY3VzIHtcblx0XHRib3gtc2hhZG93OiBub25lO1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdH1cblxuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdGJveC1zaGFkb3c6IDAgMCAwIHZhciggLS13cC1hZG1pbi1ib3JkZXItd2lkdGgtZm9jdXMgKVxuXHRcdFx0JHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdC8vIFdpbmRvd3MgaGlnaCBjb250cmFzdCBtb2RlLlxuXHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRvdXRsaW5lLW9mZnNldDogMDtcblx0fVxuYDtcbiJdfQ== */",
    toString: _EMOTION_STRINGIFIED_CSS_ERROR__43
  });
  var TabChevron = /* @__PURE__ */ createStyled(icon_default3, false ? {
    target: "enfox0g1"
  } : {
    target: "enfox0g1",
    label: "TabChevron"
  })("flex-shrink:0;margin-inline-end:", space(-1), ";[aria-orientation='horizontal'] &{display:none;}opacity:0;[role='tab']:is( [aria-selected='true'], [data-focus-visible], :hover ) &{opacity:1;}@media not ( prefers-reduced-motion ){[data-select-on-move='true'] [role='tab']:is( [aria-selected='true'],  ) &{transition:opacity 0.15s 0.15s linear;}}&:dir( rtl ){rotate:180deg;}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3UHdDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgZm9udCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IEljb24gZnJvbSAnLi4vaWNvbic7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRUYWJMaXN0ID0gc3R5bGVkKCBBcmlha2l0LlRhYkxpc3QgKWBcblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IHN0cmV0Y2g7XG5cdG92ZXJmbG93LXg6IGF1dG87XG5cblx0JlthcmlhLW9yaWVudGF0aW9uPSd2ZXJ0aWNhbCddIHtcblx0XHRmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXHR9XG5cblx0OndoZXJlKCBbYXJpYS1vcmllbnRhdGlvbj0naG9yaXpvbnRhbCddICkge1xuXHRcdHdpZHRoOiBmaXQtY29udGVudDtcblx0fVxuXG5cdC0tZGlyZWN0aW9uLWZhY3RvcjogMTtcblx0LS1kaXJlY3Rpb24tc3RhcnQ6IGxlZnQ7XG5cdC0tZGlyZWN0aW9uLWVuZDogcmlnaHQ7XG5cdC0tc2VsZWN0ZWQtc3RhcnQ6IHZhciggLS1zZWxlY3RlZC1sZWZ0LCAwICk7XG5cdCY6ZGlyKCBydGwgKSB7XG5cdFx0LS1kaXJlY3Rpb24tZmFjdG9yOiAtMTtcblx0XHQtLWRpcmVjdGlvbi1zdGFydDogcmlnaHQ7XG5cdFx0LS1kaXJlY3Rpb24tZW5kOiBsZWZ0O1xuXHRcdC0tc2VsZWN0ZWQtc3RhcnQ6IHZhciggLS1zZWxlY3RlZC1yaWdodCwgMCApO1xuXHR9XG5cblx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0JltkYXRhLWluZGljYXRvci1hbmltYXRlZF06OmJlZm9yZSB7XG5cdFx0XHR0cmFuc2l0aW9uLXByb3BlcnR5OiB0cmFuc2Zvcm0sIGJvcmRlci1yYWRpdXMsIGJvcmRlci1ibG9jaztcblx0XHRcdHRyYW5zaXRpb24tZHVyYXRpb246IDAuMnM7XG5cdFx0XHR0cmFuc2l0aW9uLXRpbWluZy1mdW5jdGlvbjogZWFzZS1vdXQ7XG5cdFx0fVxuXHR9XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0Jjo6YmVmb3JlIHtcblx0XHRjb250ZW50OiAnJztcblx0XHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdFx0dHJhbnNmb3JtLW9yaWdpbjogdmFyKCAtLWRpcmVjdGlvbi1zdGFydCApIHRvcDtcblxuXHRcdC8vIFdpbmRvd3MgaGlnaCBjb250cmFzdCBtb2RlLlxuXHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRvdXRsaW5lLW9mZnNldDogLTFweDtcblx0fVxuXG5cdC8qIFVzaW5nIGEgbGFyZ2UgdmFsdWUgdG8gYXZvaWQgYW50aWFsaWFzaW5nIHJvdW5kaW5nIGlzc3Vlc1xuXHRcdFx0d2hlbiBzY2FsaW5nIGluIHRoZSB0cmFuc2Zvcm0sIHNlZTogaHR0cHM6Ly9zdGFja292ZXJmbG93LmNvbS9hLzUyMTU5MTIzICovXG5cdC0tYW50aWFsaWFzaW5nLWZhY3RvcjogMTAwO1xuXHQmW2FyaWEtb3JpZW50YXRpb249J2hvcml6b250YWwnXSB7XG5cdFx0LS1mYWRlLXdpZHRoOiA2NHB4O1xuXHRcdC0tZmFkZS1ncmFkaWVudC1iYXNlOiB0cmFuc3BhcmVudCAwJSwgYmxhY2sgdmFyKCAtLWZhZGUtd2lkdGggKTtcblx0XHQtLWZhZGUtZ3JhZGllbnQtY29tcG9zZWQ6IHZhciggLS1mYWRlLWdyYWRpZW50LWJhc2UgKSwgYmxhY2sgNjAlLFxuXHRcdFx0dHJhbnNwYXJlbnQgNTAlO1xuXHRcdCYuaXMtb3ZlcmZsb3dpbmctZmlyc3Qge1xuXHRcdFx0bWFzay1pbWFnZTogbGluZWFyLWdyYWRpZW50KFxuXHRcdFx0XHR0byB2YXIoIC0tZGlyZWN0aW9uLWVuZCApLFxuXHRcdFx0XHR2YXIoIC0tZmFkZS1ncmFkaWVudC1iYXNlIClcblx0XHRcdCk7XG5cdFx0fVxuXHRcdCYuaXMtb3ZlcmZsb3dpbmctbGFzdCB7XG5cdFx0XHRtYXNrLWltYWdlOiBsaW5lYXItZ3JhZGllbnQoXG5cdFx0XHRcdHRvIHZhciggLS1kaXJlY3Rpb24tc3RhcnQgKSxcblx0XHRcdFx0dmFyKCAtLWZhZGUtZ3JhZGllbnQtYmFzZSApXG5cdFx0XHQpO1xuXHRcdH1cblx0XHQmLmlzLW92ZXJmbG93aW5nLWZpcnN0LmlzLW92ZXJmbG93aW5nLWxhc3Qge1xuXHRcdFx0bWFzay1pbWFnZTogbGluZWFyLWdyYWRpZW50KFxuXHRcdFx0XHRcdHRvIHJpZ2h0LFxuXHRcdFx0XHRcdHZhciggLS1mYWRlLWdyYWRpZW50LWNvbXBvc2VkIClcblx0XHRcdFx0KSxcblx0XHRcdFx0bGluZWFyLWdyYWRpZW50KCB0byBsZWZ0LCB2YXIoIC0tZmFkZS1ncmFkaWVudC1jb21wb3NlZCApICk7XG5cdFx0fVxuXG5cdFx0Jjo6YmVmb3JlIHtcblx0XHRcdGJvdHRvbTogMDtcblx0XHRcdGhlaWdodDogMDtcblx0XHRcdHdpZHRoOiBjYWxjKCB2YXIoIC0tYW50aWFsaWFzaW5nLWZhY3RvciApICogMXB4ICk7XG5cdFx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoXG5cdFx0XHRcdFx0Y2FsYyhcblx0XHRcdFx0XHRcdHZhciggLS1zZWxlY3RlZC1zdGFydCApICogdmFyKCAtLWRpcmVjdGlvbi1mYWN0b3IgKSAqXG5cdFx0XHRcdFx0XHRcdDFweFxuXHRcdFx0XHRcdClcblx0XHRcdFx0KVxuXHRcdFx0XHRzY2FsZVgoXG5cdFx0XHRcdFx0Y2FsYyhcblx0XHRcdFx0XHRcdHZhciggLS1zZWxlY3RlZC13aWR0aCwgMCApIC9cblx0XHRcdFx0XHRcdFx0dmFyKCAtLWFudGlhbGlhc2luZy1mYWN0b3IgKVxuXHRcdFx0XHRcdClcblx0XHRcdFx0KTtcblx0XHRcdGJvcmRlci1ib3R0b206IHZhciggLS13cC1hZG1pbi1ib3JkZXItd2lkdGgtZm9jdXMgKSBzb2xpZFxuXHRcdFx0XHQkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0fVxuXHR9XG5cdCZbYXJpYS1vcmllbnRhdGlvbj0ndmVydGljYWwnXSB7XG5cdFx0Jjo6YmVmb3JlIHtcblx0XHRcdC8qIEFkanVzdGluZyB0aGUgYm9yZGVyIHJhZGl1cyB0byBtYXRjaCB0aGUgc2NhbGluZyBpbiB0aGUgeSBheGlzLiAqL1xuXHRcdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH0gL1xuXHRcdFx0XHRjYWxjKFxuXHRcdFx0XHRcdCR7IENPTkZJRy5yYWRpdXNTbWFsbCB9IC9cblx0XHRcdFx0XHRcdChcblx0XHRcdFx0XHRcdFx0dmFyKCAtLXNlbGVjdGVkLWhlaWdodCwgMCApIC9cblx0XHRcdFx0XHRcdFx0XHR2YXIoIC0tYW50aWFsaWFzaW5nLWZhY3RvciApXG5cdFx0XHRcdFx0XHQpXG5cdFx0XHRcdCk7XG5cdFx0XHR0b3A6IDA7XG5cdFx0XHRsZWZ0OiAwO1xuXHRcdFx0d2lkdGg6IDEwMCU7XG5cdFx0XHRoZWlnaHQ6IGNhbGMoIHZhciggLS1hbnRpYWxpYXNpbmctZmFjdG9yICkgKiAxcHggKTtcblx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWSggY2FsYyggdmFyKCAtLXNlbGVjdGVkLXRvcCwgMCApICogMXB4ICkgKVxuXHRcdFx0XHRzY2FsZVkoXG5cdFx0XHRcdFx0Y2FsYyhcblx0XHRcdFx0XHRcdHZhciggLS1zZWxlY3RlZC1oZWlnaHQsIDAgKSAvXG5cdFx0XHRcdFx0XHRcdHZhciggLS1hbnRpYWxpYXNpbmctZmFjdG9yIClcblx0XHRcdFx0XHQpXG5cdFx0XHRcdCk7XG5cdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiBjb2xvci1taXgoXG5cdFx0XHRcdGluIHNyZ2IsXG5cdFx0XHRcdCR7IENPTE9SUy50aGVtZS5hY2NlbnQgfSxcblx0XHRcdFx0dHJhbnNwYXJlbnQgOTYlXG5cdFx0XHQpO1xuXHRcdH1cblx0XHQmW2RhdGEtc2VsZWN0LW9uLW1vdmU9J3RydWUnXTpoYXMoXG5cdFx0XHRcdDppcyggOmZvY3VzLXZpc2libGUsIFtkYXRhLWZvY3VzLXZpc2libGVdIClcblx0XHRcdCk6OmJlZm9yZSB7XG5cdFx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdFx0Ym9yZGVyOiB2YXIoIC0td3AtYWRtaW4tYm9yZGVyLXdpZHRoLWZvY3VzICkgc29saWRcblx0XHRcdFx0JHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdFx0LyogQWRqdXN0aW5nIHRoZSBib3JkZXIgd2lkdGggdG8gbWF0Y2ggdGhlIHNjYWxpbmcgaW4gdGhlIHkgYXhpcy4gKi9cblx0XHRcdGJvcmRlci1ibG9jay13aWR0aDogY2FsYyhcblx0XHRcdFx0dmFyKCAtLXdwLWFkbWluLWJvcmRlci13aWR0aC1mb2N1cywgMXB4ICkgL1xuXHRcdFx0XHRcdChcblx0XHRcdFx0XHRcdHZhciggLS1zZWxlY3RlZC1oZWlnaHQsIDAgKSAvXG5cdFx0XHRcdFx0XHRcdHZhciggLS1hbnRpYWxpYXNpbmctZmFjdG9yIClcblx0XHRcdFx0XHQpXG5cdFx0XHQpO1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFRhYiA9IHN0eWxlZCggQXJpYWtpdC5UYWIgKWBcblx0JiB7XG5cdFx0LyogUmVzZXRzICovXG5cdFx0Ym9yZGVyLXJhZGl1czogMDtcblx0XHRiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudDtcblx0XHRib3JkZXI6IG5vbmU7XG5cdFx0Ym94LXNoYWRvdzogbm9uZTtcblxuXHRcdGZsZXg6IDEgMCBhdXRvO1xuXHRcdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cdFx0ZGlzcGxheTogZmxleDtcblx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRcdGN1cnNvcjogcG9pbnRlcjtcblx0XHRsaW5lLWhlaWdodDogMS4yOyAvLyBDaGFyYWN0ZXJzIGluIHNvbWUgbGFuZ3VhZ2VzIChlLmcuIEphcGFuZXNlKSBtYXkgaGF2ZSBhIG5hdGl2ZSBoaWdoZXIgbGluZS1oZWlnaHQuXG5cdFx0Zm9udC1mYW1pbHk6ICR7IGZvbnQoICdkZWZhdWx0LmZvbnRGYW1pbHknICkgfTtcblx0XHRmb250LXdlaWdodDogNDAwO1xuXHRcdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblxuXHRcdCZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRcdGN1cnNvcjogZGVmYXVsdDtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkudGV4dERpc2FibGVkIH07XG5cdFx0fVxuXG5cdFx0Jjpub3QoIFthcmlhLWRpc2FibGVkPSd0cnVlJ10gKTppcyggOmhvdmVyLCBbZGF0YS1mb2N1cy12aXNpYmxlXSApIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0fVxuXG5cdFx0Jjpmb2N1czpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdGJveC1zaGFkb3c6IG5vbmU7XG5cdFx0XHRvdXRsaW5lOiBub25lO1xuXHRcdH1cblxuXHRcdC8vIEZvY3VzIGluZGljYXRvci5cblx0XHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdFx0Jjo6YWZ0ZXIge1xuXHRcdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cblx0XHRcdC8vIERyYXcgdGhlIGluZGljYXRvci5cblx0XHRcdC8vIE91dGxpbmUgd29ya3MgZm9yIFdpbmRvd3MgaGlnaCBjb250cmFzdCBtb2RlIGFzIHdlbGwuXG5cdFx0XHRvdXRsaW5lOiB2YXIoIC0td3AtYWRtaW4tYm9yZGVyLXdpZHRoLWZvY3VzICkgc29saWRcblx0XHRcdFx0JHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cblx0XHRcdC8vIEFuaW1hdGlvblxuXHRcdFx0b3BhY2l0eTogMDtcblxuXHRcdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHRcdHRyYW5zaXRpb246IG9wYWNpdHkgMC4xcyBsaW5lYXI7XG5cdFx0XHR9XG5cdFx0fVxuXG5cdFx0JltkYXRhLWZvY3VzLXZpc2libGVdOjphZnRlciB7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdH1cblx0fVxuXG5cdFthcmlhLW9yaWVudGF0aW9uPSdob3Jpem9udGFsJ10gJiB7XG5cdFx0cGFkZGluZy1pbmxpbmU6ICR7IHNwYWNlKCA0ICkgfTtcblx0XHRoZWlnaHQ6ICR7IHNwYWNlKCAxMiApIH07XG5cdFx0c2Nyb2xsLW1hcmdpbjogMjRweDtcblxuXHRcdCY6OmFmdGVyIHtcblx0XHRcdGNvbnRlbnQ6ICcnO1xuXHRcdFx0aW5zZXQ6ICR7IHNwYWNlKCAzICkgfTtcblx0XHR9XG5cdH1cblxuXHRbYXJpYS1vcmllbnRhdGlvbj0ndmVydGljYWwnXSAmIHtcblx0XHRwYWRkaW5nOiAkeyBzcGFjZSggMiApIH0gJHsgc3BhY2UoIDMgKSB9O1xuXHRcdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCAxMCApIH07XG5cblx0XHQmW2FyaWEtc2VsZWN0ZWQ9J3RydWUnXSB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdFx0ZmlsbDogY3VycmVudENvbG9yO1xuXHRcdH1cblx0fVxuXHRbYXJpYS1vcmllbnRhdGlvbj0ndmVydGljYWwnXVtkYXRhLXNlbGVjdC1vbi1tb3ZlPSdmYWxzZSddICY6OmFmdGVyIHtcblx0XHRjb250ZW50OiAnJztcblx0XHRpbnNldDogdmFyKCAtLXdwLWFkbWluLWJvcmRlci13aWR0aC1mb2N1cyApO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVGFiQ2hpbGRyZW4gPSBzdHlsZWQuc3BhbmBcblx0ZmxleC1ncm93OiAxO1xuXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cblx0W2FyaWEtb3JpZW50YXRpb249J2hvcml6b250YWwnXSAmIHtcblx0XHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0fVxuXHRbYXJpYS1vcmllbnRhdGlvbj0ndmVydGljYWwnXSAmIHtcblx0XHRqdXN0aWZ5LWNvbnRlbnQ6IHN0YXJ0O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVGFiQ2hldnJvbiA9IHN0eWxlZCggSWNvbiApYFxuXHRmbGV4LXNocmluazogMDtcblx0bWFyZ2luLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAtMSApIH07XG5cdFthcmlhLW9yaWVudGF0aW9uPSdob3Jpem9udGFsJ10gJiB7XG5cdFx0ZGlzcGxheTogbm9uZTtcblx0fVxuXHRvcGFjaXR5OiAwO1xuXHRbcm9sZT0ndGFiJ106aXMoIFthcmlhLXNlbGVjdGVkPSd0cnVlJ10sIFtkYXRhLWZvY3VzLXZpc2libGVdLCA6aG92ZXIgKSAmIHtcblx0XHRvcGFjaXR5OiAxO1xuXHR9XG5cdC8vIFRoZSBjaGV2cm9uIGlzIHRyYW5zaXRpb25lZCBpbnRvIGV4aXN0ZW5jZSB3aGVuIHNlbGVjdE9uTW92ZSBpcyBlbmFibGVkLFxuXHQvLyBiZWNhdXNlIG90aGVyd2lzZSBpdCBsb29rcyBqYXJyaW5nLCBhcyBpdCBzaG93cyB1cCBvdXRzaWRlIG9mIHRoZSBmb2N1c1xuXHQvLyBpbmRpY2F0b3IgdGhhdCdzIGJlaW5nIGFuaW1hdGVkIGF0IHRoZSBzYW1lIHRpbWUuXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFtkYXRhLXNlbGVjdC1vbi1tb3ZlPSd0cnVlJ11cblx0XHRcdFtyb2xlPSd0YWInXTppcyggW2FyaWEtc2VsZWN0ZWQ9J3RydWUnXSwgIClcblx0XHRcdCYge1xuXHRcdFx0dHJhbnNpdGlvbjogb3BhY2l0eSAwLjE1cyAwLjE1cyBsaW5lYXI7XG5cdFx0fVxuXHR9XG5cdCY6ZGlyKCBydGwgKSB7XG5cdFx0cm90YXRlOiAxODBkZWc7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUYWJQYW5lbCA9IHN0eWxlZCggQXJpYWtpdC5UYWJQYW5lbCApYFxuXHQmOmZvY3VzIHtcblx0XHRib3gtc2hhZG93OiBub25lO1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdH1cblxuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdGJveC1zaGFkb3c6IDAgMCAwIHZhciggLS13cC1hZG1pbi1ib3JkZXItd2lkdGgtZm9jdXMgKVxuXHRcdFx0JHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdC8vIFdpbmRvd3MgaGlnaCBjb250cmFzdCBtb2RlLlxuXHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRvdXRsaW5lLW9mZnNldDogMDtcblx0fVxuYDtcbiJdfQ== */"));
  var TabPanel23 = /* @__PURE__ */ createStyled(TabPanel, false ? {
    target: "enfox0g0"
  } : {
    target: "enfox0g0",
    label: "TabPanel"
  })("&:focus{box-shadow:none;outline:none;}&[data-focus-visible]{box-shadow:0 0 0 var( --wp-admin-border-width-focus ) ", COLORS.theme.accent, ";outline:2px solid transparent;outline-offset:0;}" + (false ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpUmtEIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCAqIGFzIEFyaWFraXQgZnJvbSAnQGFyaWFraXQvcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgZm9udCB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuaW1wb3J0IEljb24gZnJvbSAnLi4vaWNvbic7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRUYWJMaXN0ID0gc3R5bGVkKCBBcmlha2l0LlRhYkxpc3QgKWBcblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IHN0cmV0Y2g7XG5cdG92ZXJmbG93LXg6IGF1dG87XG5cblx0JlthcmlhLW9yaWVudGF0aW9uPSd2ZXJ0aWNhbCddIHtcblx0XHRmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXHR9XG5cblx0OndoZXJlKCBbYXJpYS1vcmllbnRhdGlvbj0naG9yaXpvbnRhbCddICkge1xuXHRcdHdpZHRoOiBmaXQtY29udGVudDtcblx0fVxuXG5cdC0tZGlyZWN0aW9uLWZhY3RvcjogMTtcblx0LS1kaXJlY3Rpb24tc3RhcnQ6IGxlZnQ7XG5cdC0tZGlyZWN0aW9uLWVuZDogcmlnaHQ7XG5cdC0tc2VsZWN0ZWQtc3RhcnQ6IHZhciggLS1zZWxlY3RlZC1sZWZ0LCAwICk7XG5cdCY6ZGlyKCBydGwgKSB7XG5cdFx0LS1kaXJlY3Rpb24tZmFjdG9yOiAtMTtcblx0XHQtLWRpcmVjdGlvbi1zdGFydDogcmlnaHQ7XG5cdFx0LS1kaXJlY3Rpb24tZW5kOiBsZWZ0O1xuXHRcdC0tc2VsZWN0ZWQtc3RhcnQ6IHZhciggLS1zZWxlY3RlZC1yaWdodCwgMCApO1xuXHR9XG5cblx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0JltkYXRhLWluZGljYXRvci1hbmltYXRlZF06OmJlZm9yZSB7XG5cdFx0XHR0cmFuc2l0aW9uLXByb3BlcnR5OiB0cmFuc2Zvcm0sIGJvcmRlci1yYWRpdXMsIGJvcmRlci1ibG9jaztcblx0XHRcdHRyYW5zaXRpb24tZHVyYXRpb246IDAuMnM7XG5cdFx0XHR0cmFuc2l0aW9uLXRpbWluZy1mdW5jdGlvbjogZWFzZS1vdXQ7XG5cdFx0fVxuXHR9XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0Jjo6YmVmb3JlIHtcblx0XHRjb250ZW50OiAnJztcblx0XHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cdFx0dHJhbnNmb3JtLW9yaWdpbjogdmFyKCAtLWRpcmVjdGlvbi1zdGFydCApIHRvcDtcblxuXHRcdC8vIFdpbmRvd3MgaGlnaCBjb250cmFzdCBtb2RlLlxuXHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRvdXRsaW5lLW9mZnNldDogLTFweDtcblx0fVxuXG5cdC8qIFVzaW5nIGEgbGFyZ2UgdmFsdWUgdG8gYXZvaWQgYW50aWFsaWFzaW5nIHJvdW5kaW5nIGlzc3Vlc1xuXHRcdFx0d2hlbiBzY2FsaW5nIGluIHRoZSB0cmFuc2Zvcm0sIHNlZTogaHR0cHM6Ly9zdGFja292ZXJmbG93LmNvbS9hLzUyMTU5MTIzICovXG5cdC0tYW50aWFsaWFzaW5nLWZhY3RvcjogMTAwO1xuXHQmW2FyaWEtb3JpZW50YXRpb249J2hvcml6b250YWwnXSB7XG5cdFx0LS1mYWRlLXdpZHRoOiA2NHB4O1xuXHRcdC0tZmFkZS1ncmFkaWVudC1iYXNlOiB0cmFuc3BhcmVudCAwJSwgYmxhY2sgdmFyKCAtLWZhZGUtd2lkdGggKTtcblx0XHQtLWZhZGUtZ3JhZGllbnQtY29tcG9zZWQ6IHZhciggLS1mYWRlLWdyYWRpZW50LWJhc2UgKSwgYmxhY2sgNjAlLFxuXHRcdFx0dHJhbnNwYXJlbnQgNTAlO1xuXHRcdCYuaXMtb3ZlcmZsb3dpbmctZmlyc3Qge1xuXHRcdFx0bWFzay1pbWFnZTogbGluZWFyLWdyYWRpZW50KFxuXHRcdFx0XHR0byB2YXIoIC0tZGlyZWN0aW9uLWVuZCApLFxuXHRcdFx0XHR2YXIoIC0tZmFkZS1ncmFkaWVudC1iYXNlIClcblx0XHRcdCk7XG5cdFx0fVxuXHRcdCYuaXMtb3ZlcmZsb3dpbmctbGFzdCB7XG5cdFx0XHRtYXNrLWltYWdlOiBsaW5lYXItZ3JhZGllbnQoXG5cdFx0XHRcdHRvIHZhciggLS1kaXJlY3Rpb24tc3RhcnQgKSxcblx0XHRcdFx0dmFyKCAtLWZhZGUtZ3JhZGllbnQtYmFzZSApXG5cdFx0XHQpO1xuXHRcdH1cblx0XHQmLmlzLW92ZXJmbG93aW5nLWZpcnN0LmlzLW92ZXJmbG93aW5nLWxhc3Qge1xuXHRcdFx0bWFzay1pbWFnZTogbGluZWFyLWdyYWRpZW50KFxuXHRcdFx0XHRcdHRvIHJpZ2h0LFxuXHRcdFx0XHRcdHZhciggLS1mYWRlLWdyYWRpZW50LWNvbXBvc2VkIClcblx0XHRcdFx0KSxcblx0XHRcdFx0bGluZWFyLWdyYWRpZW50KCB0byBsZWZ0LCB2YXIoIC0tZmFkZS1ncmFkaWVudC1jb21wb3NlZCApICk7XG5cdFx0fVxuXG5cdFx0Jjo6YmVmb3JlIHtcblx0XHRcdGJvdHRvbTogMDtcblx0XHRcdGhlaWdodDogMDtcblx0XHRcdHdpZHRoOiBjYWxjKCB2YXIoIC0tYW50aWFsaWFzaW5nLWZhY3RvciApICogMXB4ICk7XG5cdFx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoXG5cdFx0XHRcdFx0Y2FsYyhcblx0XHRcdFx0XHRcdHZhciggLS1zZWxlY3RlZC1zdGFydCApICogdmFyKCAtLWRpcmVjdGlvbi1mYWN0b3IgKSAqXG5cdFx0XHRcdFx0XHRcdDFweFxuXHRcdFx0XHRcdClcblx0XHRcdFx0KVxuXHRcdFx0XHRzY2FsZVgoXG5cdFx0XHRcdFx0Y2FsYyhcblx0XHRcdFx0XHRcdHZhciggLS1zZWxlY3RlZC13aWR0aCwgMCApIC9cblx0XHRcdFx0XHRcdFx0dmFyKCAtLWFudGlhbGlhc2luZy1mYWN0b3IgKVxuXHRcdFx0XHRcdClcblx0XHRcdFx0KTtcblx0XHRcdGJvcmRlci1ib3R0b206IHZhciggLS13cC1hZG1pbi1ib3JkZXItd2lkdGgtZm9jdXMgKSBzb2xpZFxuXHRcdFx0XHQkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0fVxuXHR9XG5cdCZbYXJpYS1vcmllbnRhdGlvbj0ndmVydGljYWwnXSB7XG5cdFx0Jjo6YmVmb3JlIHtcblx0XHRcdC8qIEFkanVzdGluZyB0aGUgYm9yZGVyIHJhZGl1cyB0byBtYXRjaCB0aGUgc2NhbGluZyBpbiB0aGUgeSBheGlzLiAqL1xuXHRcdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH0gL1xuXHRcdFx0XHRjYWxjKFxuXHRcdFx0XHRcdCR7IENPTkZJRy5yYWRpdXNTbWFsbCB9IC9cblx0XHRcdFx0XHRcdChcblx0XHRcdFx0XHRcdFx0dmFyKCAtLXNlbGVjdGVkLWhlaWdodCwgMCApIC9cblx0XHRcdFx0XHRcdFx0XHR2YXIoIC0tYW50aWFsaWFzaW5nLWZhY3RvciApXG5cdFx0XHRcdFx0XHQpXG5cdFx0XHRcdCk7XG5cdFx0XHR0b3A6IDA7XG5cdFx0XHRsZWZ0OiAwO1xuXHRcdFx0d2lkdGg6IDEwMCU7XG5cdFx0XHRoZWlnaHQ6IGNhbGMoIHZhciggLS1hbnRpYWxpYXNpbmctZmFjdG9yICkgKiAxcHggKTtcblx0XHRcdHRyYW5zZm9ybTogdHJhbnNsYXRlWSggY2FsYyggdmFyKCAtLXNlbGVjdGVkLXRvcCwgMCApICogMXB4ICkgKVxuXHRcdFx0XHRzY2FsZVkoXG5cdFx0XHRcdFx0Y2FsYyhcblx0XHRcdFx0XHRcdHZhciggLS1zZWxlY3RlZC1oZWlnaHQsIDAgKSAvXG5cdFx0XHRcdFx0XHRcdHZhciggLS1hbnRpYWxpYXNpbmctZmFjdG9yIClcblx0XHRcdFx0XHQpXG5cdFx0XHRcdCk7XG5cdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiBjb2xvci1taXgoXG5cdFx0XHRcdGluIHNyZ2IsXG5cdFx0XHRcdCR7IENPTE9SUy50aGVtZS5hY2NlbnQgfSxcblx0XHRcdFx0dHJhbnNwYXJlbnQgOTYlXG5cdFx0XHQpO1xuXHRcdH1cblx0XHQmW2RhdGEtc2VsZWN0LW9uLW1vdmU9J3RydWUnXTpoYXMoXG5cdFx0XHRcdDppcyggOmZvY3VzLXZpc2libGUsIFtkYXRhLWZvY3VzLXZpc2libGVdIClcblx0XHRcdCk6OmJlZm9yZSB7XG5cdFx0XHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRcdFx0Ym9yZGVyOiB2YXIoIC0td3AtYWRtaW4tYm9yZGVyLXdpZHRoLWZvY3VzICkgc29saWRcblx0XHRcdFx0JHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdFx0LyogQWRqdXN0aW5nIHRoZSBib3JkZXIgd2lkdGggdG8gbWF0Y2ggdGhlIHNjYWxpbmcgaW4gdGhlIHkgYXhpcy4gKi9cblx0XHRcdGJvcmRlci1ibG9jay13aWR0aDogY2FsYyhcblx0XHRcdFx0dmFyKCAtLXdwLWFkbWluLWJvcmRlci13aWR0aC1mb2N1cywgMXB4ICkgL1xuXHRcdFx0XHRcdChcblx0XHRcdFx0XHRcdHZhciggLS1zZWxlY3RlZC1oZWlnaHQsIDAgKSAvXG5cdFx0XHRcdFx0XHRcdHZhciggLS1hbnRpYWxpYXNpbmctZmFjdG9yIClcblx0XHRcdFx0XHQpXG5cdFx0XHQpO1xuXHRcdH1cblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IFRhYiA9IHN0eWxlZCggQXJpYWtpdC5UYWIgKWBcblx0JiB7XG5cdFx0LyogUmVzZXRzICovXG5cdFx0Ym9yZGVyLXJhZGl1czogMDtcblx0XHRiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudDtcblx0XHRib3JkZXI6IG5vbmU7XG5cdFx0Ym94LXNoYWRvdzogbm9uZTtcblxuXHRcdGZsZXg6IDEgMCBhdXRvO1xuXHRcdHdoaXRlLXNwYWNlOiBub3dyYXA7XG5cdFx0ZGlzcGxheTogZmxleDtcblx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRcdGN1cnNvcjogcG9pbnRlcjtcblx0XHRsaW5lLWhlaWdodDogMS4yOyAvLyBDaGFyYWN0ZXJzIGluIHNvbWUgbGFuZ3VhZ2VzIChlLmcuIEphcGFuZXNlKSBtYXkgaGF2ZSBhIG5hdGl2ZSBoaWdoZXIgbGluZS1oZWlnaHQuXG5cdFx0Zm9udC1mYW1pbHk6ICR7IGZvbnQoICdkZWZhdWx0LmZvbnRGYW1pbHknICkgfTtcblx0XHRmb250LXdlaWdodDogNDAwO1xuXHRcdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblxuXHRcdCZbYXJpYS1kaXNhYmxlZD0ndHJ1ZSddIHtcblx0XHRcdGN1cnNvcjogZGVmYXVsdDtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudWkudGV4dERpc2FibGVkIH07XG5cdFx0fVxuXG5cdFx0Jjpub3QoIFthcmlhLWRpc2FibGVkPSd0cnVlJ10gKTppcyggOmhvdmVyLCBbZGF0YS1mb2N1cy12aXNpYmxlXSApIHtcblx0XHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0fVxuXG5cdFx0Jjpmb2N1czpub3QoIDpkaXNhYmxlZCApIHtcblx0XHRcdGJveC1zaGFkb3c6IG5vbmU7XG5cdFx0XHRvdXRsaW5lOiBub25lO1xuXHRcdH1cblxuXHRcdC8vIEZvY3VzIGluZGljYXRvci5cblx0XHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdFx0Jjo6YWZ0ZXIge1xuXHRcdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdFx0cG9pbnRlci1ldmVudHM6IG5vbmU7XG5cblx0XHRcdC8vIERyYXcgdGhlIGluZGljYXRvci5cblx0XHRcdC8vIE91dGxpbmUgd29ya3MgZm9yIFdpbmRvd3MgaGlnaCBjb250cmFzdCBtb2RlIGFzIHdlbGwuXG5cdFx0XHRvdXRsaW5lOiB2YXIoIC0td3AtYWRtaW4tYm9yZGVyLXdpZHRoLWZvY3VzICkgc29saWRcblx0XHRcdFx0JHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cblx0XHRcdC8vIEFuaW1hdGlvblxuXHRcdFx0b3BhY2l0eTogMDtcblxuXHRcdFx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb24gKSB7XG5cdFx0XHRcdHRyYW5zaXRpb246IG9wYWNpdHkgMC4xcyBsaW5lYXI7XG5cdFx0XHR9XG5cdFx0fVxuXG5cdFx0JltkYXRhLWZvY3VzLXZpc2libGVdOjphZnRlciB7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdH1cblx0fVxuXG5cdFthcmlhLW9yaWVudGF0aW9uPSdob3Jpem9udGFsJ10gJiB7XG5cdFx0cGFkZGluZy1pbmxpbmU6ICR7IHNwYWNlKCA0ICkgfTtcblx0XHRoZWlnaHQ6ICR7IHNwYWNlKCAxMiApIH07XG5cdFx0c2Nyb2xsLW1hcmdpbjogMjRweDtcblxuXHRcdCY6OmFmdGVyIHtcblx0XHRcdGNvbnRlbnQ6ICcnO1xuXHRcdFx0aW5zZXQ6ICR7IHNwYWNlKCAzICkgfTtcblx0XHR9XG5cdH1cblxuXHRbYXJpYS1vcmllbnRhdGlvbj0ndmVydGljYWwnXSAmIHtcblx0XHRwYWRkaW5nOiAkeyBzcGFjZSggMiApIH0gJHsgc3BhY2UoIDMgKSB9O1xuXHRcdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKCAxMCApIH07XG5cblx0XHQmW2FyaWEtc2VsZWN0ZWQ9J3RydWUnXSB7XG5cdFx0XHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdFx0ZmlsbDogY3VycmVudENvbG9yO1xuXHRcdH1cblx0fVxuXHRbYXJpYS1vcmllbnRhdGlvbj0ndmVydGljYWwnXVtkYXRhLXNlbGVjdC1vbi1tb3ZlPSdmYWxzZSddICY6OmFmdGVyIHtcblx0XHRjb250ZW50OiAnJztcblx0XHRpbnNldDogdmFyKCAtLXdwLWFkbWluLWJvcmRlci13aWR0aC1mb2N1cyApO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVGFiQ2hpbGRyZW4gPSBzdHlsZWQuc3BhbmBcblx0ZmxleC1ncm93OiAxO1xuXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cblx0W2FyaWEtb3JpZW50YXRpb249J2hvcml6b250YWwnXSAmIHtcblx0XHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0fVxuXHRbYXJpYS1vcmllbnRhdGlvbj0ndmVydGljYWwnXSAmIHtcblx0XHRqdXN0aWZ5LWNvbnRlbnQ6IHN0YXJ0O1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVGFiQ2hldnJvbiA9IHN0eWxlZCggSWNvbiApYFxuXHRmbGV4LXNocmluazogMDtcblx0bWFyZ2luLWlubGluZS1lbmQ6ICR7IHNwYWNlKCAtMSApIH07XG5cdFthcmlhLW9yaWVudGF0aW9uPSdob3Jpem9udGFsJ10gJiB7XG5cdFx0ZGlzcGxheTogbm9uZTtcblx0fVxuXHRvcGFjaXR5OiAwO1xuXHRbcm9sZT0ndGFiJ106aXMoIFthcmlhLXNlbGVjdGVkPSd0cnVlJ10sIFtkYXRhLWZvY3VzLXZpc2libGVdLCA6aG92ZXIgKSAmIHtcblx0XHRvcGFjaXR5OiAxO1xuXHR9XG5cdC8vIFRoZSBjaGV2cm9uIGlzIHRyYW5zaXRpb25lZCBpbnRvIGV4aXN0ZW5jZSB3aGVuIHNlbGVjdE9uTW92ZSBpcyBlbmFibGVkLFxuXHQvLyBiZWNhdXNlIG90aGVyd2lzZSBpdCBsb29rcyBqYXJyaW5nLCBhcyBpdCBzaG93cyB1cCBvdXRzaWRlIG9mIHRoZSBmb2N1c1xuXHQvLyBpbmRpY2F0b3IgdGhhdCdzIGJlaW5nIGFuaW1hdGVkIGF0IHRoZSBzYW1lIHRpbWUuXG5cdEBtZWRpYSBub3QgKCBwcmVmZXJzLXJlZHVjZWQtbW90aW9uICkge1xuXHRcdFtkYXRhLXNlbGVjdC1vbi1tb3ZlPSd0cnVlJ11cblx0XHRcdFtyb2xlPSd0YWInXTppcyggW2FyaWEtc2VsZWN0ZWQ9J3RydWUnXSwgIClcblx0XHRcdCYge1xuXHRcdFx0dHJhbnNpdGlvbjogb3BhY2l0eSAwLjE1cyAwLjE1cyBsaW5lYXI7XG5cdFx0fVxuXHR9XG5cdCY6ZGlyKCBydGwgKSB7XG5cdFx0cm90YXRlOiAxODBkZWc7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUYWJQYW5lbCA9IHN0eWxlZCggQXJpYWtpdC5UYWJQYW5lbCApYFxuXHQmOmZvY3VzIHtcblx0XHRib3gtc2hhZG93OiBub25lO1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdH1cblxuXHQmW2RhdGEtZm9jdXMtdmlzaWJsZV0ge1xuXHRcdGJveC1zaGFkb3c6IDAgMCAwIHZhciggLS13cC1hZG1pbi1ib3JkZXItd2lkdGgtZm9jdXMgKVxuXHRcdFx0JHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRcdC8vIFdpbmRvd3MgaGlnaCBjb250cmFzdCBtb2RlLlxuXHRcdG91dGxpbmU6IDJweCBzb2xpZCB0cmFuc3BhcmVudDtcblx0XHRvdXRsaW5lLW9mZnNldDogMDtcblx0fVxuYDtcbiJdfQ== */"));

  // packages/components/build-module/tabs/tab.mjs
  var import_jsx_runtime313 = __toESM(require_jsx_runtime(), 1);
  var Tab3 = (0, import_element238.forwardRef)(function Tab23({
    children,
    tabId,
    disabled,
    render,
    ...otherProps
  }, ref) {
    const {
      store,
      instanceId
    } = useTabsContext() ?? {};
    if (!store) {
      true ? (0, import_warning12.default)("`Tabs.Tab` must be wrapped in a `Tabs` component.") : void 0;
      return null;
    }
    const instancedTabId = `${instanceId}-${tabId}`;
    return /* @__PURE__ */ (0, import_jsx_runtime313.jsxs)(Tab22, {
      ref,
      store,
      id: instancedTabId,
      disabled,
      render,
      ...otherProps,
      children: [/* @__PURE__ */ (0, import_jsx_runtime313.jsx)(TabChildren, {
        children
      }), /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(TabChevron, {
        icon: chevron_right_default
      })]
    });
  });

  // packages/components/build-module/tabs/tablist.mjs
  var import_warning13 = __toESM(require_warning(), 1);
  var import_element240 = __toESM(require_element(), 1);
  var import_compose83 = __toESM(require_compose(), 1);

  // packages/components/build-module/tabs/use-track-overflow.mjs
  var import_element239 = __toESM(require_element(), 1);
  var import_compose82 = __toESM(require_compose(), 1);
  function useTrackOverflow(parent, children) {
    const [first, setFirst] = (0, import_element239.useState)(false);
    const [last, setLast] = (0, import_element239.useState)(false);
    const [observer, setObserver] = (0, import_element239.useState)();
    const callback = (0, import_compose82.useEvent)((entries) => {
      for (const entry of entries) {
        if (entry.target === children.first) {
          setFirst(!entry.isIntersecting);
        }
        if (entry.target === children.last) {
          setLast(!entry.isIntersecting);
        }
      }
    });
    (0, import_element239.useEffect)(() => {
      if (!parent || !window.IntersectionObserver) {
        return;
      }
      const newObserver = new IntersectionObserver(callback, {
        root: parent,
        threshold: 0.9
      });
      setObserver(newObserver);
      return () => newObserver.disconnect();
    }, [callback, parent]);
    (0, import_element239.useEffect)(() => {
      if (!observer) {
        return;
      }
      if (children.first) {
        observer.observe(children.first);
      }
      if (children.last) {
        observer.observe(children.last);
      }
      return () => {
        if (children.first) {
          observer.unobserve(children.first);
        }
        if (children.last) {
          observer.unobserve(children.last);
        }
      };
    }, [children.first, children.last, observer]);
    return {
      first,
      last
    };
  }

  // packages/components/build-module/tabs/tablist.mjs
  var import_jsx_runtime314 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_SCROLL_MARGIN = 24;
  function useScrollRectIntoView(parent, rect, {
    margin = DEFAULT_SCROLL_MARGIN
  } = {}) {
    (0, import_element240.useLayoutEffect)(() => {
      if (!parent || !rect) {
        return;
      }
      const {
        scrollLeft: parentScroll
      } = parent;
      const parentWidth = parent.getBoundingClientRect().width;
      const {
        left: childLeft,
        width: childWidth
      } = rect;
      const parentRightEdge = parentScroll + parentWidth;
      const childRightEdge = childLeft + childWidth;
      const rightOverflow = childRightEdge + margin - parentRightEdge;
      const leftOverflow = parentScroll - (childLeft - margin);
      let scrollLeft = null;
      if (leftOverflow > 0) {
        scrollLeft = parentScroll - leftOverflow;
      } else if (rightOverflow > 0) {
        scrollLeft = parentScroll + rightOverflow;
      }
      if (scrollLeft !== null) {
        parent.scroll?.({
          left: scrollLeft
        });
      }
    }, [margin, parent, rect]);
  }
  var TabList3 = (0, import_element240.forwardRef)(function TabList22({
    children,
    ...otherProps
  }, ref) {
    const {
      store
    } = useTabsContext() ?? {};
    const selectedId = useStoreState(store, "selectedId");
    const activeId = useStoreState(store, "activeId");
    const selectOnMove = useStoreState(store, "selectOnMove");
    const items = useStoreState(store, "items");
    const [parent, setParent] = (0, import_element240.useState)();
    const refs = (0, import_compose83.useMergeRefs)([ref, setParent]);
    const selectedItem = store?.item(selectedId);
    const renderedItems = useStoreState(store, "renderedItems");
    const selectedItemIndex = renderedItems && selectedItem ? renderedItems.indexOf(selectedItem) : -1;
    const selectedRect = useTrackElementOffsetRect(selectedItem?.element, [selectedItemIndex]);
    const overflow = useTrackOverflow(parent, {
      first: items?.at(0)?.element,
      last: items?.at(-1)?.element
    });
    useAnimatedOffsetRect(parent, selectedRect, {
      prefix: "selected",
      dataAttribute: "indicator-animated",
      transitionEndFilter: (event) => event.pseudoElement === "::before",
      roundRect: true
    });
    useScrollRectIntoView(parent, selectedRect);
    const onBlur = () => {
      if (!selectOnMove) {
        return;
      }
      if (selectedId !== activeId) {
        store?.setActiveId(selectedId);
      }
    };
    if (!store) {
      true ? (0, import_warning13.default)("`Tabs.TabList` must be wrapped in a `Tabs` component.") : void 0;
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(StyledTabList, {
      ref: refs,
      store,
      render: (props) => /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", {
        ...props,
        // Fallback to -1 to prevent browsers from making the tablist
        // tabbable when it is a scrolling container.
        tabIndex: props.tabIndex ?? -1
      }),
      onBlur,
      "data-select-on-move": selectOnMove ? "true" : "false",
      ...otherProps,
      className: clsx_default(overflow.first && "is-overflowing-first", overflow.last && "is-overflowing-last", otherProps.className),
      children
    });
  });

  // packages/components/build-module/tabs/tabpanel.mjs
  var import_element241 = __toESM(require_element(), 1);
  var import_warning14 = __toESM(require_warning(), 1);
  var import_jsx_runtime315 = __toESM(require_jsx_runtime(), 1);
  var TabPanel3 = (0, import_element241.forwardRef)(function TabPanel24({
    children,
    tabId,
    focusable = true,
    ...otherProps
  }, ref) {
    const context = useTabsContext();
    const selectedId = useStoreState(context?.store, "selectedId");
    if (!context) {
      true ? (0, import_warning14.default)("`Tabs.TabPanel` must be wrapped in a `Tabs` component.") : void 0;
      return null;
    }
    const {
      store,
      instanceId
    } = context;
    const instancedTabId = `${instanceId}-${tabId}`;
    return /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(TabPanel23, {
      ref,
      store,
      id: `${instancedTabId}-view`,
      tabId: instancedTabId,
      focusable,
      ...otherProps,
      children: selectedId === instancedTabId && children
    });
  });

  // packages/components/build-module/tabs/index.mjs
  var import_jsx_runtime316 = __toESM(require_jsx_runtime(), 1);
  function externalToInternalTabId(externalId, instanceId) {
    return externalId && `${instanceId}-${externalId}`;
  }
  function internalToExternalTabId(internalId, instanceId) {
    return typeof internalId === "string" ? internalId.replace(`${instanceId}-`, "") : internalId;
  }
  var Tabs = Object.assign(function Tabs2({
    selectOnMove = true,
    defaultTabId,
    orientation = "horizontal",
    onSelect,
    children,
    selectedTabId,
    activeTabId,
    defaultActiveTabId,
    onActiveTabIdChange
  }) {
    const instanceId = (0, import_compose84.useInstanceId)(Tabs2, "tabs");
    const store = useTabStore({
      selectOnMove,
      orientation,
      defaultSelectedId: externalToInternalTabId(defaultTabId, instanceId),
      setSelectedId: (newSelectedId) => {
        onSelect?.(internalToExternalTabId(newSelectedId, instanceId));
      },
      selectedId: externalToInternalTabId(selectedTabId, instanceId),
      defaultActiveId: externalToInternalTabId(defaultActiveTabId, instanceId),
      setActiveId: (newActiveId) => {
        onActiveTabIdChange?.(internalToExternalTabId(newActiveId, instanceId));
      },
      activeId: externalToInternalTabId(activeTabId, instanceId),
      rtl: (0, import_i18n80.isRTL)()
    });
    const {
      items,
      activeId
    } = useStoreState(store);
    const {
      setActiveId
    } = store;
    (0, import_element242.useEffect)(() => {
      requestAnimationFrame(() => {
        const focusedElement = items?.[0]?.element?.ownerDocument.activeElement;
        if (!focusedElement || !items.some((item2) => focusedElement === item2.element)) {
          return;
        }
        if (activeId !== focusedElement.id) {
          setActiveId(focusedElement.id);
        }
      });
    }, [activeId, items, setActiveId]);
    const contextValue = (0, import_element242.useMemo)(() => ({
      store,
      instanceId
    }), [store, instanceId]);
    return /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(TabsContext.Provider, {
      value: contextValue,
      children
    });
  }, {
    /**
     * Renders a single tab.
     *
     * The currently active tab receives default styling that can be
     * overridden with CSS targeting `[aria-selected="true"]`.
     */
    Tab: Object.assign(Tab3, {
      displayName: "Tabs.Tab"
    }),
    /**
     * A wrapper component for the `Tab` components.
     *
     * It is responsible for rendering the list of tabs.
     */
    TabList: Object.assign(TabList3, {
      displayName: "Tabs.TabList"
    }),
    /**
     * Renders the content to display for a single tab once that tab is selected.
     */
    TabPanel: Object.assign(TabPanel3, {
      displayName: "Tabs.TabPanel"
    }),
    Context: Object.assign(TabsContext, {
      displayName: "Tabs.Context"
    })
  });

  // packages/components/build-module/lock-unlock.mjs
  var import_private_apis = __toESM(require_private_apis(), 1);
  var {
    lock,
    unlock
  } = (0, import_private_apis.__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/components");

  // packages/components/build-module/badge/index.mjs
  var import_jsx_runtime317 = __toESM(require_jsx_runtime(), 1);
  function contextBasedIcon(intent = "default") {
    switch (intent) {
      case "info":
        return info_default;
      case "success":
        return published_default;
      case "warning":
        return caution_default;
      case "error":
        return error_default;
      default:
        return null;
    }
  }
  function Badge({
    className: className2,
    intent = "default",
    children,
    ...props
  }) {
    const icon = contextBasedIcon(intent);
    const hasIcon = !!icon;
    return /* @__PURE__ */ (0, import_jsx_runtime317.jsx)("span", {
      className: clsx_default("components-badge", className2, {
        [`is-${intent}`]: intent,
        "has-icon": hasIcon
      }),
      ...props,
      children: /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)("span", {
        className: "components-badge__flex-wrapper",
        children: [hasIcon && /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(icon_default3, {
          icon,
          size: 16,
          fill: "currentColor",
          className: "components-badge__icon"
        }), /* @__PURE__ */ (0, import_jsx_runtime317.jsx)("span", {
          className: "components-badge__content",
          children
        })]
      })
    });
  }
  var badge_default = Badge;

  // node_modules/react-day-picker/dist/esm/DayPicker.js
  var import_react163 = __toESM(require_react(), 1);

  // node_modules/@date-fns/tz/tzOffset/index.js
  var offsetFormatCache = {};
  var offsetCache = {};
  function tzOffset(timeZone, date) {
    try {
      const format2 = offsetFormatCache[timeZone] ||= new Intl.DateTimeFormat("en-GB", {
        timeZone,
        hour: "numeric",
        timeZoneName: "longOffset"
      }).format;
      const offsetStr = format2(date).split("GMT")[1] || "";
      if (offsetStr in offsetCache) return offsetCache[offsetStr];
      return calcOffset(offsetStr, offsetStr.split(":"));
    } catch {
      if (timeZone in offsetCache) return offsetCache[timeZone];
      const captures = timeZone?.match(offsetRe);
      if (captures) return calcOffset(timeZone, captures.slice(1));
      return NaN;
    }
  }
  var offsetRe = /([+-]\d\d):?(\d\d)?/;
  function calcOffset(cacheStr, values) {
    const hours = +values[0];
    const minutes = +(values[1] || 0);
    return offsetCache[cacheStr] = hours > 0 ? hours * 60 + minutes : hours * 60 - minutes;
  }

  // node_modules/@date-fns/tz/date/mini.js
  var TZDateMini = class _TZDateMini extends Date {
    //#region static
    constructor(...args) {
      super();
      if (args.length > 1 && typeof args[args.length - 1] === "string") {
        this.timeZone = args.pop();
      }
      this.internal = /* @__PURE__ */ new Date();
      if (isNaN(tzOffset(this.timeZone, this))) {
        this.setTime(NaN);
      } else {
        if (!args.length) {
          this.setTime(Date.now());
        } else if (typeof args[0] === "number" && (args.length === 1 || args.length === 2 && typeof args[1] !== "number")) {
          this.setTime(args[0]);
        } else if (typeof args[0] === "string") {
          this.setTime(+new Date(args[0]));
        } else if (args[0] instanceof Date) {
          this.setTime(+args[0]);
        } else {
          this.setTime(+new Date(...args));
          adjustToSystemTZ(this, NaN);
          syncToInternal(this);
        }
      }
    }
    static tz(tz, ...args) {
      return args.length ? new _TZDateMini(...args, tz) : new _TZDateMini(Date.now(), tz);
    }
    //#endregion
    //#region time zone
    withTimeZone(timeZone) {
      return new _TZDateMini(+this, timeZone);
    }
    getTimezoneOffset() {
      return -tzOffset(this.timeZone, this);
    }
    //#endregion
    //#region time
    setTime(time2) {
      Date.prototype.setTime.apply(this, arguments);
      syncToInternal(this);
      return +this;
    }
    //#endregion
    //#region date-fns integration
    [/* @__PURE__ */ Symbol.for("constructDateFrom")](date) {
      return new _TZDateMini(+new Date(date), this.timeZone);
    }
    //#endregion
  };
  var re3 = /^(get|set)(?!UTC)/;
  Object.getOwnPropertyNames(Date.prototype).forEach((method) => {
    if (!re3.test(method)) return;
    const utcMethod = method.replace(re3, "$1UTC");
    if (!TZDateMini.prototype[utcMethod]) return;
    if (method.startsWith("get")) {
      TZDateMini.prototype[method] = function() {
        return this.internal[utcMethod]();
      };
    } else {
      TZDateMini.prototype[method] = function() {
        Date.prototype[utcMethod].apply(this.internal, arguments);
        syncFromInternal(this);
        return +this;
      };
      TZDateMini.prototype[utcMethod] = function() {
        Date.prototype[utcMethod].apply(this, arguments);
        syncToInternal(this);
        return +this;
      };
    }
  });
  function syncToInternal(date) {
    date.internal.setTime(+date);
    date.internal.setUTCMinutes(date.internal.getUTCMinutes() - date.getTimezoneOffset());
  }
  function syncFromInternal(date) {
    Date.prototype.setFullYear.call(date, date.internal.getUTCFullYear(), date.internal.getUTCMonth(), date.internal.getUTCDate());
    Date.prototype.setHours.call(date, date.internal.getUTCHours(), date.internal.getUTCMinutes(), date.internal.getUTCSeconds(), date.internal.getUTCMilliseconds());
    adjustToSystemTZ(date);
  }
  function adjustToSystemTZ(date) {
    const offset3 = tzOffset(date.timeZone, date);
    const prevHour = /* @__PURE__ */ new Date(+date);
    prevHour.setUTCHours(prevHour.getUTCHours() - 1);
    const systemOffset = -(/* @__PURE__ */ new Date(+date)).getTimezoneOffset();
    const prevHourSystemOffset = -(/* @__PURE__ */ new Date(+prevHour)).getTimezoneOffset();
    const systemDSTChange = systemOffset - prevHourSystemOffset;
    const dstShift = Date.prototype.getHours.apply(date) !== date.internal.getUTCHours();
    if (systemDSTChange && dstShift) date.internal.setUTCMinutes(date.internal.getUTCMinutes() + systemDSTChange);
    const offsetDiff = systemOffset - offset3;
    if (offsetDiff) Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetDiff);
    const postOffset = tzOffset(date.timeZone, date);
    const postSystemOffset = -(/* @__PURE__ */ new Date(+date)).getTimezoneOffset();
    const postOffsetDiff = postSystemOffset - postOffset;
    const offsetChanged = postOffset !== offset3;
    const postDiff = postOffsetDiff - offsetDiff;
    if (offsetChanged && postDiff) {
      Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + postDiff);
      const newOffset = tzOffset(date.timeZone, date);
      const offsetChange = postOffset - newOffset;
      if (offsetChange) {
        date.internal.setUTCMinutes(date.internal.getUTCMinutes() + offsetChange);
        Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetChange);
      }
    }
  }

  // node_modules/@date-fns/tz/date/index.js
  var TZDate = class _TZDate extends TZDateMini {
    //#region static
    static tz(tz, ...args) {
      return args.length ? new _TZDate(...args, tz) : new _TZDate(Date.now(), tz);
    }
    //#endregion
    //#region representation
    toISOString() {
      const [sign, hours, minutes] = this.tzComponents();
      const tz = `${sign}${hours}:${minutes}`;
      return this.internal.toISOString().slice(0, -1) + tz;
    }
    toString() {
      return `${this.toDateString()} ${this.toTimeString()}`;
    }
    toDateString() {
      const [day, date, month, year] = this.internal.toUTCString().split(" ");
      return `${day?.slice(0, -1)} ${month} ${date} ${year}`;
    }
    toTimeString() {
      const time2 = this.internal.toUTCString().split(" ")[4];
      const [sign, hours, minutes] = this.tzComponents();
      return `${time2} GMT${sign}${hours}${minutes} (${tzName(this.timeZone, this)})`;
    }
    toLocaleString(locales, options2) {
      return Date.prototype.toLocaleString.call(this, locales, {
        ...options2,
        timeZone: options2?.timeZone || this.timeZone
      });
    }
    toLocaleDateString(locales, options2) {
      return Date.prototype.toLocaleDateString.call(this, locales, {
        ...options2,
        timeZone: options2?.timeZone || this.timeZone
      });
    }
    toLocaleTimeString(locales, options2) {
      return Date.prototype.toLocaleTimeString.call(this, locales, {
        ...options2,
        timeZone: options2?.timeZone || this.timeZone
      });
    }
    //#endregion
    //#region private
    tzComponents() {
      const offset3 = this.getTimezoneOffset();
      const sign = offset3 > 0 ? "-" : "+";
      const hours = String(Math.floor(Math.abs(offset3) / 60)).padStart(2, "0");
      const minutes = String(Math.abs(offset3) % 60).padStart(2, "0");
      return [sign, hours, minutes];
    }
    //#endregion
    withTimeZone(timeZone) {
      return new _TZDate(+this, timeZone);
    }
    //#region date-fns integration
    [/* @__PURE__ */ Symbol.for("constructDateFrom")](date) {
      return new _TZDate(+new Date(date), this.timeZone);
    }
    //#endregion
  };
  function tzName(tz, date) {
    return new Intl.DateTimeFormat("en-GB", {
      timeZone: tz,
      timeZoneName: "long"
    }).format(date).slice(12);
  }

  // node_modules/react-day-picker/dist/esm/UI.js
  var UI2;
  (function(UI3) {
    UI3["Root"] = "root";
    UI3["Chevron"] = "chevron";
    UI3["Day"] = "day";
    UI3["DayButton"] = "day_button";
    UI3["CaptionLabel"] = "caption_label";
    UI3["Dropdowns"] = "dropdowns";
    UI3["Dropdown"] = "dropdown";
    UI3["DropdownRoot"] = "dropdown_root";
    UI3["Footer"] = "footer";
    UI3["MonthGrid"] = "month_grid";
    UI3["MonthCaption"] = "month_caption";
    UI3["MonthsDropdown"] = "months_dropdown";
    UI3["Month"] = "month";
    UI3["Months"] = "months";
    UI3["Nav"] = "nav";
    UI3["NextMonthButton"] = "button_next";
    UI3["PreviousMonthButton"] = "button_previous";
    UI3["Week"] = "week";
    UI3["Weeks"] = "weeks";
    UI3["Weekday"] = "weekday";
    UI3["Weekdays"] = "weekdays";
    UI3["WeekNumber"] = "week_number";
    UI3["WeekNumberHeader"] = "week_number_header";
    UI3["YearsDropdown"] = "years_dropdown";
  })(UI2 || (UI2 = {}));
  var DayFlag;
  (function(DayFlag2) {
    DayFlag2["disabled"] = "disabled";
    DayFlag2["hidden"] = "hidden";
    DayFlag2["outside"] = "outside";
    DayFlag2["focused"] = "focused";
    DayFlag2["today"] = "today";
  })(DayFlag || (DayFlag = {}));
  var SelectionState;
  (function(SelectionState2) {
    SelectionState2["range_end"] = "range_end";
    SelectionState2["range_middle"] = "range_middle";
    SelectionState2["range_start"] = "range_start";
    SelectionState2["selected"] = "selected";
  })(SelectionState || (SelectionState = {}));
  var Animation;
  (function(Animation2) {
    Animation2["weeks_before_enter"] = "weeks_before_enter";
    Animation2["weeks_before_exit"] = "weeks_before_exit";
    Animation2["weeks_after_enter"] = "weeks_after_enter";
    Animation2["weeks_after_exit"] = "weeks_after_exit";
    Animation2["caption_after_enter"] = "caption_after_enter";
    Animation2["caption_after_exit"] = "caption_after_exit";
    Animation2["caption_before_enter"] = "caption_before_enter";
    Animation2["caption_before_exit"] = "caption_before_exit";
  })(Animation || (Animation = {}));

  // node_modules/react-day-picker/node_modules/date-fns/constants.js
  var daysInYear2 = 365.2425;
  var maxTime2 = Math.pow(10, 8) * 24 * 60 * 60 * 1e3;
  var minTime2 = -maxTime2;
  var millisecondsInWeek = 6048e5;
  var millisecondsInDay2 = 864e5;
  var secondsInHour2 = 3600;
  var secondsInDay2 = secondsInHour2 * 24;
  var secondsInWeek2 = secondsInDay2 * 7;
  var secondsInYear2 = secondsInDay2 * daysInYear2;
  var secondsInMonth2 = secondsInYear2 / 12;
  var secondsInQuarter2 = secondsInMonth2 * 3;
  var constructFromSymbol = /* @__PURE__ */ Symbol.for("constructDateFrom");

  // node_modules/react-day-picker/node_modules/date-fns/constructFrom.js
  function constructFrom2(date, value) {
    if (typeof date === "function") return date(value);
    if (date && typeof date === "object" && constructFromSymbol in date)
      return date[constructFromSymbol](value);
    if (date instanceof Date) return new date.constructor(value);
    return new Date(value);
  }

  // node_modules/react-day-picker/node_modules/date-fns/toDate.js
  function toDate2(argument, context) {
    return constructFrom2(context || argument, argument);
  }

  // node_modules/react-day-picker/node_modules/date-fns/addDays.js
  function addDays2(date, amount, options2) {
    const _date = toDate2(date, options2?.in);
    if (isNaN(amount)) return constructFrom2(options2?.in || date, NaN);
    if (!amount) return _date;
    _date.setDate(_date.getDate() + amount);
    return _date;
  }

  // node_modules/react-day-picker/node_modules/date-fns/addMonths.js
  function addMonths2(date, amount, options2) {
    const _date = toDate2(date, options2?.in);
    if (isNaN(amount)) return constructFrom2(options2?.in || date, NaN);
    if (!amount) {
      return _date;
    }
    const dayOfMonth = _date.getDate();
    const endOfDesiredMonth = constructFrom2(options2?.in || date, _date.getTime());
    endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);
    const daysInMonth = endOfDesiredMonth.getDate();
    if (dayOfMonth >= daysInMonth) {
      return endOfDesiredMonth;
    } else {
      _date.setFullYear(
        endOfDesiredMonth.getFullYear(),
        endOfDesiredMonth.getMonth(),
        dayOfMonth
      );
      return _date;
    }
  }

  // node_modules/react-day-picker/node_modules/date-fns/_lib/defaultOptions.js
  var defaultOptions3 = {};
  function getDefaultOptions2() {
    return defaultOptions3;
  }

  // node_modules/react-day-picker/node_modules/date-fns/startOfWeek.js
  function startOfWeek2(date, options2) {
    const defaultOptions4 = getDefaultOptions2();
    const weekStartsOn = options2?.weekStartsOn ?? options2?.locale?.options?.weekStartsOn ?? defaultOptions4.weekStartsOn ?? defaultOptions4.locale?.options?.weekStartsOn ?? 0;
    const _date = toDate2(date, options2?.in);
    const day = _date.getDay();
    const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
    _date.setDate(_date.getDate() - diff);
    _date.setHours(0, 0, 0, 0);
    return _date;
  }

  // node_modules/react-day-picker/node_modules/date-fns/startOfISOWeek.js
  function startOfISOWeek(date, options2) {
    return startOfWeek2(date, { ...options2, weekStartsOn: 1 });
  }

  // node_modules/react-day-picker/node_modules/date-fns/getISOWeekYear.js
  function getISOWeekYear(date, options2) {
    const _date = toDate2(date, options2?.in);
    const year = _date.getFullYear();
    const fourthOfJanuaryOfNextYear = constructFrom2(_date, 0);
    fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
    fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
    const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
    const fourthOfJanuaryOfThisYear = constructFrom2(_date, 0);
    fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
    fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
    const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
    if (_date.getTime() >= startOfNextYear.getTime()) {
      return year + 1;
    } else if (_date.getTime() >= startOfThisYear.getTime()) {
      return year;
    } else {
      return year - 1;
    }
  }

  // node_modules/react-day-picker/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
  function getTimezoneOffsetInMilliseconds2(date) {
    const _date = toDate2(date);
    const utcDate = new Date(
      Date.UTC(
        _date.getFullYear(),
        _date.getMonth(),
        _date.getDate(),
        _date.getHours(),
        _date.getMinutes(),
        _date.getSeconds(),
        _date.getMilliseconds()
      )
    );
    utcDate.setUTCFullYear(_date.getFullYear());
    return +date - +utcDate;
  }

  // node_modules/react-day-picker/node_modules/date-fns/_lib/normalizeDates.js
  function normalizeDates(context, ...dates) {
    const normalize2 = constructFrom2.bind(
      null,
      context || dates.find((date) => typeof date === "object")
    );
    return dates.map(normalize2);
  }

  // node_modules/react-day-picker/node_modules/date-fns/startOfDay.js
  function startOfDay2(date, options2) {
    const _date = toDate2(date, options2?.in);
    _date.setHours(0, 0, 0, 0);
    return _date;
  }

  // node_modules/react-day-picker/node_modules/date-fns/differenceInCalendarDays.js
  function differenceInCalendarDays2(laterDate, earlierDate, options2) {
    const [laterDate_, earlierDate_] = normalizeDates(
      options2?.in,
      laterDate,
      earlierDate
    );
    const laterStartOfDay = startOfDay2(laterDate_);
    const earlierStartOfDay = startOfDay2(earlierDate_);
    const laterTimestamp = +laterStartOfDay - getTimezoneOffsetInMilliseconds2(laterStartOfDay);
    const earlierTimestamp = +earlierStartOfDay - getTimezoneOffsetInMilliseconds2(earlierStartOfDay);
    return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay2);
  }

  // node_modules/react-day-picker/node_modules/date-fns/startOfISOWeekYear.js
  function startOfISOWeekYear(date, options2) {
    const year = getISOWeekYear(date, options2);
    const fourthOfJanuary = constructFrom2(options2?.in || date, 0);
    fourthOfJanuary.setFullYear(year, 0, 4);
    fourthOfJanuary.setHours(0, 0, 0, 0);
    return startOfISOWeek(fourthOfJanuary);
  }

  // node_modules/react-day-picker/node_modules/date-fns/addWeeks.js
  function addWeeks2(date, amount, options2) {
    return addDays2(date, amount * 7, options2);
  }

  // node_modules/react-day-picker/node_modules/date-fns/addYears.js
  function addYears2(date, amount, options2) {
    return addMonths2(date, amount * 12, options2);
  }

  // node_modules/react-day-picker/node_modules/date-fns/max.js
  function max2(dates, options2) {
    let result;
    let context = options2?.in;
    dates.forEach((date) => {
      if (!context && typeof date === "object")
        context = constructFrom2.bind(null, date);
      const date_ = toDate2(date, context);
      if (!result || result < date_ || isNaN(+date_)) result = date_;
    });
    return constructFrom2(context, result || NaN);
  }

  // node_modules/react-day-picker/node_modules/date-fns/min.js
  function min2(dates, options2) {
    let result;
    let context = options2?.in;
    dates.forEach((date) => {
      if (!context && typeof date === "object")
        context = constructFrom2.bind(null, date);
      const date_ = toDate2(date, context);
      if (!result || result > date_ || isNaN(+date_)) result = date_;
    });
    return constructFrom2(context, result || NaN);
  }

  // node_modules/react-day-picker/node_modules/date-fns/isSameDay.js
  function isSameDay2(laterDate, earlierDate, options2) {
    const [dateLeft_, dateRight_] = normalizeDates(
      options2?.in,
      laterDate,
      earlierDate
    );
    return +startOfDay2(dateLeft_) === +startOfDay2(dateRight_);
  }

  // node_modules/react-day-picker/node_modules/date-fns/isDate.js
  function isDate(value) {
    return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]";
  }

  // node_modules/react-day-picker/node_modules/date-fns/isValid.js
  function isValid(date) {
    return !(!isDate(date) && typeof date !== "number" || isNaN(+toDate2(date)));
  }

  // node_modules/react-day-picker/node_modules/date-fns/differenceInCalendarMonths.js
  function differenceInCalendarMonths(laterDate, earlierDate, options2) {
    const [laterDate_, earlierDate_] = normalizeDates(
      options2?.in,
      laterDate,
      earlierDate
    );
    const yearsDiff = laterDate_.getFullYear() - earlierDate_.getFullYear();
    const monthsDiff = laterDate_.getMonth() - earlierDate_.getMonth();
    return yearsDiff * 12 + monthsDiff;
  }

  // node_modules/react-day-picker/node_modules/date-fns/endOfMonth.js
  function endOfMonth2(date, options2) {
    const _date = toDate2(date, options2?.in);
    const month = _date.getMonth();
    _date.setFullYear(_date.getFullYear(), month + 1, 0);
    _date.setHours(23, 59, 59, 999);
    return _date;
  }

  // node_modules/react-day-picker/node_modules/date-fns/_lib/normalizeInterval.js
  function normalizeInterval(context, interval) {
    const [start, end] = normalizeDates(context, interval.start, interval.end);
    return { start, end };
  }

  // node_modules/react-day-picker/node_modules/date-fns/eachMonthOfInterval.js
  function eachMonthOfInterval2(interval, options2) {
    const { start, end } = normalizeInterval(options2?.in, interval);
    let reversed = +start > +end;
    const endTime = reversed ? +start : +end;
    const date = reversed ? end : start;
    date.setHours(0, 0, 0, 0);
    date.setDate(1);
    let step = options2?.step ?? 1;
    if (!step) return [];
    if (step < 0) {
      step = -step;
      reversed = !reversed;
    }
    const dates = [];
    while (+date <= endTime) {
      dates.push(constructFrom2(start, date));
      date.setMonth(date.getMonth() + step);
    }
    return reversed ? dates.reverse() : dates;
  }

  // node_modules/react-day-picker/node_modules/date-fns/startOfMonth.js
  function startOfMonth2(date, options2) {
    const _date = toDate2(date, options2?.in);
    _date.setDate(1);
    _date.setHours(0, 0, 0, 0);
    return _date;
  }

  // node_modules/react-day-picker/node_modules/date-fns/endOfYear.js
  function endOfYear(date, options2) {
    const _date = toDate2(date, options2?.in);
    const year = _date.getFullYear();
    _date.setFullYear(year + 1, 0, 0);
    _date.setHours(23, 59, 59, 999);
    return _date;
  }

  // node_modules/react-day-picker/node_modules/date-fns/startOfYear.js
  function startOfYear(date, options2) {
    const date_ = toDate2(date, options2?.in);
    date_.setFullYear(date_.getFullYear(), 0, 1);
    date_.setHours(0, 0, 0, 0);
    return date_;
  }

  // node_modules/react-day-picker/node_modules/date-fns/endOfWeek.js
  function endOfWeek2(date, options2) {
    const defaultOptions4 = getDefaultOptions2();
    const weekStartsOn = options2?.weekStartsOn ?? options2?.locale?.options?.weekStartsOn ?? defaultOptions4.weekStartsOn ?? defaultOptions4.locale?.options?.weekStartsOn ?? 0;
    const _date = toDate2(date, options2?.in);
    const day = _date.getDay();
    const diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);
    _date.setDate(_date.getDate() + diff);
    _date.setHours(23, 59, 59, 999);
    return _date;
  }

  // node_modules/react-day-picker/node_modules/date-fns/endOfISOWeek.js
  function endOfISOWeek(date, options2) {
    return endOfWeek2(date, { ...options2, weekStartsOn: 1 });
  }

  // node_modules/react-day-picker/node_modules/date-fns/locale/en-US/_lib/formatDistance.js
  var formatDistanceLocale = {
    lessThanXSeconds: {
      one: "less than a second",
      other: "less than {{count}} seconds"
    },
    xSeconds: {
      one: "1 second",
      other: "{{count}} seconds"
    },
    halfAMinute: "half a minute",
    lessThanXMinutes: {
      one: "less than a minute",
      other: "less than {{count}} minutes"
    },
    xMinutes: {
      one: "1 minute",
      other: "{{count}} minutes"
    },
    aboutXHours: {
      one: "about 1 hour",
      other: "about {{count}} hours"
    },
    xHours: {
      one: "1 hour",
      other: "{{count}} hours"
    },
    xDays: {
      one: "1 day",
      other: "{{count}} days"
    },
    aboutXWeeks: {
      one: "about 1 week",
      other: "about {{count}} weeks"
    },
    xWeeks: {
      one: "1 week",
      other: "{{count}} weeks"
    },
    aboutXMonths: {
      one: "about 1 month",
      other: "about {{count}} months"
    },
    xMonths: {
      one: "1 month",
      other: "{{count}} months"
    },
    aboutXYears: {
      one: "about 1 year",
      other: "about {{count}} years"
    },
    xYears: {
      one: "1 year",
      other: "{{count}} years"
    },
    overXYears: {
      one: "over 1 year",
      other: "over {{count}} years"
    },
    almostXYears: {
      one: "almost 1 year",
      other: "almost {{count}} years"
    }
  };
  var formatDistance = (token2, count, options2) => {
    let result;
    const tokenValue = formatDistanceLocale[token2];
    if (typeof tokenValue === "string") {
      result = tokenValue;
    } else if (count === 1) {
      result = tokenValue.one;
    } else {
      result = tokenValue.other.replace("{{count}}", count.toString());
    }
    if (options2?.addSuffix) {
      if (options2.comparison && options2.comparison > 0) {
        return "in " + result;
      } else {
        return result + " ago";
      }
    }
    return result;
  };

  // node_modules/react-day-picker/node_modules/date-fns/locale/_lib/buildFormatLongFn.js
  function buildFormatLongFn(args) {
    return (options2 = {}) => {
      const width = options2.width ? String(options2.width) : args.defaultWidth;
      const format2 = args.formats[width] || args.formats[args.defaultWidth];
      return format2;
    };
  }

  // node_modules/react-day-picker/node_modules/date-fns/locale/en-US/_lib/formatLong.js
  var dateFormats = {
    full: "EEEE, MMMM do, y",
    long: "MMMM do, y",
    medium: "MMM d, y",
    short: "MM/dd/yyyy"
  };
  var timeFormats = {
    full: "h:mm:ss a zzzz",
    long: "h:mm:ss a z",
    medium: "h:mm:ss a",
    short: "h:mm a"
  };
  var dateTimeFormats = {
    full: "{{date}} 'at' {{time}}",
    long: "{{date}} 'at' {{time}}",
    medium: "{{date}}, {{time}}",
    short: "{{date}}, {{time}}"
  };
  var formatLong = {
    date: buildFormatLongFn({
      formats: dateFormats,
      defaultWidth: "full"
    }),
    time: buildFormatLongFn({
      formats: timeFormats,
      defaultWidth: "full"
    }),
    dateTime: buildFormatLongFn({
      formats: dateTimeFormats,
      defaultWidth: "full"
    })
  };

  // node_modules/react-day-picker/node_modules/date-fns/locale/en-US/_lib/formatRelative.js
  var formatRelativeLocale = {
    lastWeek: "'last' eeee 'at' p",
    yesterday: "'yesterday at' p",
    today: "'today at' p",
    tomorrow: "'tomorrow at' p",
    nextWeek: "eeee 'at' p",
    other: "P"
  };
  var formatRelative = (token2, _date, _baseDate, _options) => formatRelativeLocale[token2];

  // node_modules/react-day-picker/node_modules/date-fns/locale/_lib/buildLocalizeFn.js
  function buildLocalizeFn(args) {
    return (value, options2) => {
      const context = options2?.context ? String(options2.context) : "standalone";
      let valuesArray;
      if (context === "formatting" && args.formattingValues) {
        const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
        const width = options2?.width ? String(options2.width) : defaultWidth;
        valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
      } else {
        const defaultWidth = args.defaultWidth;
        const width = options2?.width ? String(options2.width) : args.defaultWidth;
        valuesArray = args.values[width] || args.values[defaultWidth];
      }
      const index2 = args.argumentCallback ? args.argumentCallback(value) : value;
      return valuesArray[index2];
    };
  }

  // node_modules/react-day-picker/node_modules/date-fns/locale/en-US/_lib/localize.js
  var eraValues = {
    narrow: ["B", "A"],
    abbreviated: ["BC", "AD"],
    wide: ["Before Christ", "Anno Domini"]
  };
  var quarterValues = {
    narrow: ["1", "2", "3", "4"],
    abbreviated: ["Q1", "Q2", "Q3", "Q4"],
    wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
  };
  var monthValues = {
    narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
    abbreviated: [
      "Jan",
      "Feb",
      "Mar",
      "Apr",
      "May",
      "Jun",
      "Jul",
      "Aug",
      "Sep",
      "Oct",
      "Nov",
      "Dec"
    ],
    wide: [
      "January",
      "February",
      "March",
      "April",
      "May",
      "June",
      "July",
      "August",
      "September",
      "October",
      "November",
      "December"
    ]
  };
  var dayValues = {
    narrow: ["S", "M", "T", "W", "T", "F", "S"],
    short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
    abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
    wide: [
      "Sunday",
      "Monday",
      "Tuesday",
      "Wednesday",
      "Thursday",
      "Friday",
      "Saturday"
    ]
  };
  var dayPeriodValues = {
    narrow: {
      am: "a",
      pm: "p",
      midnight: "mi",
      noon: "n",
      morning: "morning",
      afternoon: "afternoon",
      evening: "evening",
      night: "night"
    },
    abbreviated: {
      am: "AM",
      pm: "PM",
      midnight: "midnight",
      noon: "noon",
      morning: "morning",
      afternoon: "afternoon",
      evening: "evening",
      night: "night"
    },
    wide: {
      am: "a.m.",
      pm: "p.m.",
      midnight: "midnight",
      noon: "noon",
      morning: "morning",
      afternoon: "afternoon",
      evening: "evening",
      night: "night"
    }
  };
  var formattingDayPeriodValues = {
    narrow: {
      am: "a",
      pm: "p",
      midnight: "mi",
      noon: "n",
      morning: "in the morning",
      afternoon: "in the afternoon",
      evening: "in the evening",
      night: "at night"
    },
    abbreviated: {
      am: "AM",
      pm: "PM",
      midnight: "midnight",
      noon: "noon",
      morning: "in the morning",
      afternoon: "in the afternoon",
      evening: "in the evening",
      night: "at night"
    },
    wide: {
      am: "a.m.",
      pm: "p.m.",
      midnight: "midnight",
      noon: "noon",
      morning: "in the morning",
      afternoon: "in the afternoon",
      evening: "in the evening",
      night: "at night"
    }
  };
  var ordinalNumber = (dirtyNumber, _options) => {
    const number2 = Number(dirtyNumber);
    const rem100 = number2 % 100;
    if (rem100 > 20 || rem100 < 10) {
      switch (rem100 % 10) {
        case 1:
          return number2 + "st";
        case 2:
          return number2 + "nd";
        case 3:
          return number2 + "rd";
      }
    }
    return number2 + "th";
  };
  var localize = {
    ordinalNumber,
    era: buildLocalizeFn({
      values: eraValues,
      defaultWidth: "wide"
    }),
    quarter: buildLocalizeFn({
      values: quarterValues,
      defaultWidth: "wide",
      argumentCallback: (quarter) => quarter - 1
    }),
    month: buildLocalizeFn({
      values: monthValues,
      defaultWidth: "wide"
    }),
    day: buildLocalizeFn({
      values: dayValues,
      defaultWidth: "wide"
    }),
    dayPeriod: buildLocalizeFn({
      values: dayPeriodValues,
      defaultWidth: "wide",
      formattingValues: formattingDayPeriodValues,
      defaultFormattingWidth: "wide"
    })
  };

  // node_modules/react-day-picker/node_modules/date-fns/locale/_lib/buildMatchFn.js
  function buildMatchFn(args) {
    return (string, options2 = {}) => {
      const width = options2.width;
      const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
      const matchResult = string.match(matchPattern);
      if (!matchResult) {
        return null;
      }
      const matchedString = matchResult[0];
      const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
      const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : (
        // [TODO] -- I challenge you to fix the type
        findKey(parsePatterns, (pattern) => pattern.test(matchedString))
      );
      let value;
      value = args.valueCallback ? args.valueCallback(key) : key;
      value = options2.valueCallback ? (
        // [TODO] -- I challenge you to fix the type
        options2.valueCallback(value)
      ) : value;
      const rest = string.slice(matchedString.length);
      return { value, rest };
    };
  }
  function findKey(object, predicate) {
    for (const key in object) {
      if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
        return key;
      }
    }
    return void 0;
  }
  function findIndex(array, predicate) {
    for (let key = 0; key < array.length; key++) {
      if (predicate(array[key])) {
        return key;
      }
    }
    return void 0;
  }

  // node_modules/react-day-picker/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
  function buildMatchPatternFn(args) {
    return (string, options2 = {}) => {
      const matchResult = string.match(args.matchPattern);
      if (!matchResult) return null;
      const matchedString = matchResult[0];
      const parseResult = string.match(args.parsePattern);
      if (!parseResult) return null;
      let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
      value = options2.valueCallback ? options2.valueCallback(value) : value;
      const rest = string.slice(matchedString.length);
      return { value, rest };
    };
  }

  // node_modules/react-day-picker/node_modules/date-fns/locale/en-US/_lib/match.js
  var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
  var parseOrdinalNumberPattern = /\d+/i;
  var matchEraPatterns = {
    narrow: /^(b|a)/i,
    abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
    wide: /^(before christ|before common era|anno domini|common era)/i
  };
  var parseEraPatterns = {
    any: [/^b/i, /^(a|c)/i]
  };
  var matchQuarterPatterns = {
    narrow: /^[1234]/i,
    abbreviated: /^q[1234]/i,
    wide: /^[1234](th|st|nd|rd)? quarter/i
  };
  var parseQuarterPatterns = {
    any: [/1/i, /2/i, /3/i, /4/i]
  };
  var matchMonthPatterns = {
    narrow: /^[jfmasond]/i,
    abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
    wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
  };
  var parseMonthPatterns = {
    narrow: [
      /^j/i,
      /^f/i,
      /^m/i,
      /^a/i,
      /^m/i,
      /^j/i,
      /^j/i,
      /^a/i,
      /^s/i,
      /^o/i,
      /^n/i,
      /^d/i
    ],
    any: [
      /^ja/i,
      /^f/i,
      /^mar/i,
      /^ap/i,
      /^may/i,
      /^jun/i,
      /^jul/i,
      /^au/i,
      /^s/i,
      /^o/i,
      /^n/i,
      /^d/i
    ]
  };
  var matchDayPatterns = {
    narrow: /^[smtwf]/i,
    short: /^(su|mo|tu|we|th|fr|sa)/i,
    abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
    wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
  };
  var parseDayPatterns = {
    narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
    any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
  };
  var matchDayPeriodPatterns = {
    narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
    any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
  };
  var parseDayPeriodPatterns = {
    any: {
      am: /^a/i,
      pm: /^p/i,
      midnight: /^mi/i,
      noon: /^no/i,
      morning: /morning/i,
      afternoon: /afternoon/i,
      evening: /evening/i,
      night: /night/i
    }
  };
  var match3 = {
    ordinalNumber: buildMatchPatternFn({
      matchPattern: matchOrdinalNumberPattern,
      parsePattern: parseOrdinalNumberPattern,
      valueCallback: (value) => parseInt(value, 10)
    }),
    era: buildMatchFn({
      matchPatterns: matchEraPatterns,
      defaultMatchWidth: "wide",
      parsePatterns: parseEraPatterns,
      defaultParseWidth: "any"
    }),
    quarter: buildMatchFn({
      matchPatterns: matchQuarterPatterns,
      defaultMatchWidth: "wide",
      parsePatterns: parseQuarterPatterns,
      defaultParseWidth: "any",
      valueCallback: (index2) => index2 + 1
    }),
    month: buildMatchFn({
      matchPatterns: matchMonthPatterns,
      defaultMatchWidth: "wide",
      parsePatterns: parseMonthPatterns,
      defaultParseWidth: "any"
    }),
    day: buildMatchFn({
      matchPatterns: matchDayPatterns,
      defaultMatchWidth: "wide",
      parsePatterns: parseDayPatterns,
      defaultParseWidth: "any"
    }),
    dayPeriod: buildMatchFn({
      matchPatterns: matchDayPeriodPatterns,
      defaultMatchWidth: "any",
      parsePatterns: parseDayPeriodPatterns,
      defaultParseWidth: "any"
    })
  };

  // node_modules/react-day-picker/node_modules/date-fns/locale/en-US.js
  var enUS = {
    code: "en-US",
    formatDistance,
    formatLong,
    formatRelative,
    localize,
    match: match3,
    options: {
      weekStartsOn: 0,
      firstWeekContainsDate: 1
    }
  };

  // node_modules/react-day-picker/node_modules/date-fns/getDayOfYear.js
  function getDayOfYear(date, options2) {
    const _date = toDate2(date, options2?.in);
    const diff = differenceInCalendarDays2(_date, startOfYear(_date));
    const dayOfYear = diff + 1;
    return dayOfYear;
  }

  // node_modules/react-day-picker/node_modules/date-fns/getISOWeek.js
  function getISOWeek(date, options2) {
    const _date = toDate2(date, options2?.in);
    const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);
    return Math.round(diff / millisecondsInWeek) + 1;
  }

  // node_modules/react-day-picker/node_modules/date-fns/getWeekYear.js
  function getWeekYear(date, options2) {
    const _date = toDate2(date, options2?.in);
    const year = _date.getFullYear();
    const defaultOptions4 = getDefaultOptions2();
    const firstWeekContainsDate = options2?.firstWeekContainsDate ?? options2?.locale?.options?.firstWeekContainsDate ?? defaultOptions4.firstWeekContainsDate ?? defaultOptions4.locale?.options?.firstWeekContainsDate ?? 1;
    const firstWeekOfNextYear = constructFrom2(options2?.in || date, 0);
    firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
    firstWeekOfNextYear.setHours(0, 0, 0, 0);
    const startOfNextYear = startOfWeek2(firstWeekOfNextYear, options2);
    const firstWeekOfThisYear = constructFrom2(options2?.in || date, 0);
    firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);
    firstWeekOfThisYear.setHours(0, 0, 0, 0);
    const startOfThisYear = startOfWeek2(firstWeekOfThisYear, options2);
    if (+_date >= +startOfNextYear) {
      return year + 1;
    } else if (+_date >= +startOfThisYear) {
      return year;
    } else {
      return year - 1;
    }
  }

  // node_modules/react-day-picker/node_modules/date-fns/startOfWeekYear.js
  function startOfWeekYear(date, options2) {
    const defaultOptions4 = getDefaultOptions2();
    const firstWeekContainsDate = options2?.firstWeekContainsDate ?? options2?.locale?.options?.firstWeekContainsDate ?? defaultOptions4.firstWeekContainsDate ?? defaultOptions4.locale?.options?.firstWeekContainsDate ?? 1;
    const year = getWeekYear(date, options2);
    const firstWeek = constructFrom2(options2?.in || date, 0);
    firstWeek.setFullYear(year, 0, firstWeekContainsDate);
    firstWeek.setHours(0, 0, 0, 0);
    const _date = startOfWeek2(firstWeek, options2);
    return _date;
  }

  // node_modules/react-day-picker/node_modules/date-fns/getWeek.js
  function getWeek(date, options2) {
    const _date = toDate2(date, options2?.in);
    const diff = +startOfWeek2(_date, options2) - +startOfWeekYear(_date, options2);
    return Math.round(diff / millisecondsInWeek) + 1;
  }

  // node_modules/react-day-picker/node_modules/date-fns/_lib/addLeadingZeros.js
  function addLeadingZeros(number2, targetLength) {
    const sign = number2 < 0 ? "-" : "";
    const output = Math.abs(number2).toString().padStart(targetLength, "0");
    return sign + output;
  }

  // node_modules/react-day-picker/node_modules/date-fns/_lib/format/lightFormatters.js
  var lightFormatters = {
    // Year
    y(date, token2) {
      const signedYear = date.getFullYear();
      const year = signedYear > 0 ? signedYear : 1 - signedYear;
      return addLeadingZeros(token2 === "yy" ? year % 100 : year, token2.length);
    },
    // Month
    M(date, token2) {
      const month = date.getMonth();
      return token2 === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
    },
    // Day of the month
    d(date, token2) {
      return addLeadingZeros(date.getDate(), token2.length);
    },
    // AM or PM
    a(date, token2) {
      const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am";
      switch (token2) {
        case "a":
        case "aa":
          return dayPeriodEnumValue.toUpperCase();
        case "aaa":
          return dayPeriodEnumValue;
        case "aaaaa":
          return dayPeriodEnumValue[0];
        case "aaaa":
        default:
          return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
      }
    },
    // Hour [1-12]
    h(date, token2) {
      return addLeadingZeros(date.getHours() % 12 || 12, token2.length);
    },
    // Hour [0-23]
    H(date, token2) {
      return addLeadingZeros(date.getHours(), token2.length);
    },
    // Minute
    m(date, token2) {
      return addLeadingZeros(date.getMinutes(), token2.length);
    },
    // Second
    s(date, token2) {
      return addLeadingZeros(date.getSeconds(), token2.length);
    },
    // Fraction of second
    S(date, token2) {
      const numberOfDigits = token2.length;
      const milliseconds = date.getMilliseconds();
      const fractionalSeconds = Math.trunc(
        milliseconds * Math.pow(10, numberOfDigits - 3)
      );
      return addLeadingZeros(fractionalSeconds, token2.length);
    }
  };

  // node_modules/react-day-picker/node_modules/date-fns/_lib/format/formatters.js
  var dayPeriodEnum = {
    am: "am",
    pm: "pm",
    midnight: "midnight",
    noon: "noon",
    morning: "morning",
    afternoon: "afternoon",
    evening: "evening",
    night: "night"
  };
  var formatters = {
    // Era
    G: function(date, token2, localize2) {
      const era = date.getFullYear() > 0 ? 1 : 0;
      switch (token2) {
        // AD, BC
        case "G":
        case "GG":
        case "GGG":
          return localize2.era(era, { width: "abbreviated" });
        // A, B
        case "GGGGG":
          return localize2.era(era, { width: "narrow" });
        // Anno Domini, Before Christ
        case "GGGG":
        default:
          return localize2.era(era, { width: "wide" });
      }
    },
    // Year
    y: function(date, token2, localize2) {
      if (token2 === "yo") {
        const signedYear = date.getFullYear();
        const year = signedYear > 0 ? signedYear : 1 - signedYear;
        return localize2.ordinalNumber(year, { unit: "year" });
      }
      return lightFormatters.y(date, token2);
    },
    // Local week-numbering year
    Y: function(date, token2, localize2, options2) {
      const signedWeekYear = getWeekYear(date, options2);
      const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
      if (token2 === "YY") {
        const twoDigitYear = weekYear % 100;
        return addLeadingZeros(twoDigitYear, 2);
      }
      if (token2 === "Yo") {
        return localize2.ordinalNumber(weekYear, { unit: "year" });
      }
      return addLeadingZeros(weekYear, token2.length);
    },
    // ISO week-numbering year
    R: function(date, token2) {
      const isoWeekYear = getISOWeekYear(date);
      return addLeadingZeros(isoWeekYear, token2.length);
    },
    // Extended year. This is a single number designating the year of this calendar system.
    // The main difference between `y` and `u` localizers are B.C. years:
    // | Year | `y` | `u` |
    // |------|-----|-----|
    // | AC 1 |   1 |   1 |
    // | BC 1 |   1 |   0 |
    // | BC 2 |   2 |  -1 |
    // Also `yy` always returns the last two digits of a year,
    // while `uu` pads single digit years to 2 characters and returns other years unchanged.
    u: function(date, token2) {
      const year = date.getFullYear();
      return addLeadingZeros(year, token2.length);
    },
    // Quarter
    Q: function(date, token2, localize2) {
      const quarter = Math.ceil((date.getMonth() + 1) / 3);
      switch (token2) {
        // 1, 2, 3, 4
        case "Q":
          return String(quarter);
        // 01, 02, 03, 04
        case "QQ":
          return addLeadingZeros(quarter, 2);
        // 1st, 2nd, 3rd, 4th
        case "Qo":
          return localize2.ordinalNumber(quarter, { unit: "quarter" });
        // Q1, Q2, Q3, Q4
        case "QQQ":
          return localize2.quarter(quarter, {
            width: "abbreviated",
            context: "formatting"
          });
        // 1, 2, 3, 4 (narrow quarter; could be not numerical)
        case "QQQQQ":
          return localize2.quarter(quarter, {
            width: "narrow",
            context: "formatting"
          });
        // 1st quarter, 2nd quarter, ...
        case "QQQQ":
        default:
          return localize2.quarter(quarter, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // Stand-alone quarter
    q: function(date, token2, localize2) {
      const quarter = Math.ceil((date.getMonth() + 1) / 3);
      switch (token2) {
        // 1, 2, 3, 4
        case "q":
          return String(quarter);
        // 01, 02, 03, 04
        case "qq":
          return addLeadingZeros(quarter, 2);
        // 1st, 2nd, 3rd, 4th
        case "qo":
          return localize2.ordinalNumber(quarter, { unit: "quarter" });
        // Q1, Q2, Q3, Q4
        case "qqq":
          return localize2.quarter(quarter, {
            width: "abbreviated",
            context: "standalone"
          });
        // 1, 2, 3, 4 (narrow quarter; could be not numerical)
        case "qqqqq":
          return localize2.quarter(quarter, {
            width: "narrow",
            context: "standalone"
          });
        // 1st quarter, 2nd quarter, ...
        case "qqqq":
        default:
          return localize2.quarter(quarter, {
            width: "wide",
            context: "standalone"
          });
      }
    },
    // Month
    M: function(date, token2, localize2) {
      const month = date.getMonth();
      switch (token2) {
        case "M":
        case "MM":
          return lightFormatters.M(date, token2);
        // 1st, 2nd, ..., 12th
        case "Mo":
          return localize2.ordinalNumber(month + 1, { unit: "month" });
        // Jan, Feb, ..., Dec
        case "MMM":
          return localize2.month(month, {
            width: "abbreviated",
            context: "formatting"
          });
        // J, F, ..., D
        case "MMMMM":
          return localize2.month(month, {
            width: "narrow",
            context: "formatting"
          });
        // January, February, ..., December
        case "MMMM":
        default:
          return localize2.month(month, { width: "wide", context: "formatting" });
      }
    },
    // Stand-alone month
    L: function(date, token2, localize2) {
      const month = date.getMonth();
      switch (token2) {
        // 1, 2, ..., 12
        case "L":
          return String(month + 1);
        // 01, 02, ..., 12
        case "LL":
          return addLeadingZeros(month + 1, 2);
        // 1st, 2nd, ..., 12th
        case "Lo":
          return localize2.ordinalNumber(month + 1, { unit: "month" });
        // Jan, Feb, ..., Dec
        case "LLL":
          return localize2.month(month, {
            width: "abbreviated",
            context: "standalone"
          });
        // J, F, ..., D
        case "LLLLL":
          return localize2.month(month, {
            width: "narrow",
            context: "standalone"
          });
        // January, February, ..., December
        case "LLLL":
        default:
          return localize2.month(month, { width: "wide", context: "standalone" });
      }
    },
    // Local week of year
    w: function(date, token2, localize2, options2) {
      const week = getWeek(date, options2);
      if (token2 === "wo") {
        return localize2.ordinalNumber(week, { unit: "week" });
      }
      return addLeadingZeros(week, token2.length);
    },
    // ISO week of year
    I: function(date, token2, localize2) {
      const isoWeek = getISOWeek(date);
      if (token2 === "Io") {
        return localize2.ordinalNumber(isoWeek, { unit: "week" });
      }
      return addLeadingZeros(isoWeek, token2.length);
    },
    // Day of the month
    d: function(date, token2, localize2) {
      if (token2 === "do") {
        return localize2.ordinalNumber(date.getDate(), { unit: "date" });
      }
      return lightFormatters.d(date, token2);
    },
    // Day of year
    D: function(date, token2, localize2) {
      const dayOfYear = getDayOfYear(date);
      if (token2 === "Do") {
        return localize2.ordinalNumber(dayOfYear, { unit: "dayOfYear" });
      }
      return addLeadingZeros(dayOfYear, token2.length);
    },
    // Day of week
    E: function(date, token2, localize2) {
      const dayOfWeek = date.getDay();
      switch (token2) {
        // Tue
        case "E":
        case "EE":
        case "EEE":
          return localize2.day(dayOfWeek, {
            width: "abbreviated",
            context: "formatting"
          });
        // T
        case "EEEEE":
          return localize2.day(dayOfWeek, {
            width: "narrow",
            context: "formatting"
          });
        // Tu
        case "EEEEEE":
          return localize2.day(dayOfWeek, {
            width: "short",
            context: "formatting"
          });
        // Tuesday
        case "EEEE":
        default:
          return localize2.day(dayOfWeek, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // Local day of week
    e: function(date, token2, localize2, options2) {
      const dayOfWeek = date.getDay();
      const localDayOfWeek = (dayOfWeek - options2.weekStartsOn + 8) % 7 || 7;
      switch (token2) {
        // Numerical value (Nth day of week with current locale or weekStartsOn)
        case "e":
          return String(localDayOfWeek);
        // Padded numerical value
        case "ee":
          return addLeadingZeros(localDayOfWeek, 2);
        // 1st, 2nd, ..., 7th
        case "eo":
          return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
        case "eee":
          return localize2.day(dayOfWeek, {
            width: "abbreviated",
            context: "formatting"
          });
        // T
        case "eeeee":
          return localize2.day(dayOfWeek, {
            width: "narrow",
            context: "formatting"
          });
        // Tu
        case "eeeeee":
          return localize2.day(dayOfWeek, {
            width: "short",
            context: "formatting"
          });
        // Tuesday
        case "eeee":
        default:
          return localize2.day(dayOfWeek, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // Stand-alone local day of week
    c: function(date, token2, localize2, options2) {
      const dayOfWeek = date.getDay();
      const localDayOfWeek = (dayOfWeek - options2.weekStartsOn + 8) % 7 || 7;
      switch (token2) {
        // Numerical value (same as in `e`)
        case "c":
          return String(localDayOfWeek);
        // Padded numerical value
        case "cc":
          return addLeadingZeros(localDayOfWeek, token2.length);
        // 1st, 2nd, ..., 7th
        case "co":
          return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
        case "ccc":
          return localize2.day(dayOfWeek, {
            width: "abbreviated",
            context: "standalone"
          });
        // T
        case "ccccc":
          return localize2.day(dayOfWeek, {
            width: "narrow",
            context: "standalone"
          });
        // Tu
        case "cccccc":
          return localize2.day(dayOfWeek, {
            width: "short",
            context: "standalone"
          });
        // Tuesday
        case "cccc":
        default:
          return localize2.day(dayOfWeek, {
            width: "wide",
            context: "standalone"
          });
      }
    },
    // ISO day of week
    i: function(date, token2, localize2) {
      const dayOfWeek = date.getDay();
      const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
      switch (token2) {
        // 2
        case "i":
          return String(isoDayOfWeek);
        // 02
        case "ii":
          return addLeadingZeros(isoDayOfWeek, token2.length);
        // 2nd
        case "io":
          return localize2.ordinalNumber(isoDayOfWeek, { unit: "day" });
        // Tue
        case "iii":
          return localize2.day(dayOfWeek, {
            width: "abbreviated",
            context: "formatting"
          });
        // T
        case "iiiii":
          return localize2.day(dayOfWeek, {
            width: "narrow",
            context: "formatting"
          });
        // Tu
        case "iiiiii":
          return localize2.day(dayOfWeek, {
            width: "short",
            context: "formatting"
          });
        // Tuesday
        case "iiii":
        default:
          return localize2.day(dayOfWeek, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // AM or PM
    a: function(date, token2, localize2) {
      const hours = date.getHours();
      const dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
      switch (token2) {
        case "a":
        case "aa":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          });
        case "aaa":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          }).toLowerCase();
        case "aaaaa":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "narrow",
            context: "formatting"
          });
        case "aaaa":
        default:
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // AM, PM, midnight, noon
    b: function(date, token2, localize2) {
      const hours = date.getHours();
      let dayPeriodEnumValue;
      if (hours === 12) {
        dayPeriodEnumValue = dayPeriodEnum.noon;
      } else if (hours === 0) {
        dayPeriodEnumValue = dayPeriodEnum.midnight;
      } else {
        dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
      }
      switch (token2) {
        case "b":
        case "bb":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          });
        case "bbb":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          }).toLowerCase();
        case "bbbbb":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "narrow",
            context: "formatting"
          });
        case "bbbb":
        default:
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // in the morning, in the afternoon, in the evening, at night
    B: function(date, token2, localize2) {
      const hours = date.getHours();
      let dayPeriodEnumValue;
      if (hours >= 17) {
        dayPeriodEnumValue = dayPeriodEnum.evening;
      } else if (hours >= 12) {
        dayPeriodEnumValue = dayPeriodEnum.afternoon;
      } else if (hours >= 4) {
        dayPeriodEnumValue = dayPeriodEnum.morning;
      } else {
        dayPeriodEnumValue = dayPeriodEnum.night;
      }
      switch (token2) {
        case "B":
        case "BB":
        case "BBB":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          });
        case "BBBBB":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "narrow",
            context: "formatting"
          });
        case "BBBB":
        default:
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // Hour [1-12]
    h: function(date, token2, localize2) {
      if (token2 === "ho") {
        let hours = date.getHours() % 12;
        if (hours === 0) hours = 12;
        return localize2.ordinalNumber(hours, { unit: "hour" });
      }
      return lightFormatters.h(date, token2);
    },
    // Hour [0-23]
    H: function(date, token2, localize2) {
      if (token2 === "Ho") {
        return localize2.ordinalNumber(date.getHours(), { unit: "hour" });
      }
      return lightFormatters.H(date, token2);
    },
    // Hour [0-11]
    K: function(date, token2, localize2) {
      const hours = date.getHours() % 12;
      if (token2 === "Ko") {
        return localize2.ordinalNumber(hours, { unit: "hour" });
      }
      return addLeadingZeros(hours, token2.length);
    },
    // Hour [1-24]
    k: function(date, token2, localize2) {
      let hours = date.getHours();
      if (hours === 0) hours = 24;
      if (token2 === "ko") {
        return localize2.ordinalNumber(hours, { unit: "hour" });
      }
      return addLeadingZeros(hours, token2.length);
    },
    // Minute
    m: function(date, token2, localize2) {
      if (token2 === "mo") {
        return localize2.ordinalNumber(date.getMinutes(), { unit: "minute" });
      }
      return lightFormatters.m(date, token2);
    },
    // Second
    s: function(date, token2, localize2) {
      if (token2 === "so") {
        return localize2.ordinalNumber(date.getSeconds(), { unit: "second" });
      }
      return lightFormatters.s(date, token2);
    },
    // Fraction of second
    S: function(date, token2) {
      return lightFormatters.S(date, token2);
    },
    // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
    X: function(date, token2, _localize) {
      const timezoneOffset = date.getTimezoneOffset();
      if (timezoneOffset === 0) {
        return "Z";
      }
      switch (token2) {
        // Hours and optional minutes
        case "X":
          return formatTimezoneWithOptionalMinutes(timezoneOffset);
        // Hours, minutes and optional seconds without `:` delimiter
        // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
        // so this token always has the same output as `XX`
        case "XXXX":
        case "XX":
          return formatTimezone(timezoneOffset);
        // Hours, minutes and optional seconds with `:` delimiter
        // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
        // so this token always has the same output as `XXX`
        case "XXXXX":
        case "XXX":
        // Hours and minutes with `:` delimiter
        default:
          return formatTimezone(timezoneOffset, ":");
      }
    },
    // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
    x: function(date, token2, _localize) {
      const timezoneOffset = date.getTimezoneOffset();
      switch (token2) {
        // Hours and optional minutes
        case "x":
          return formatTimezoneWithOptionalMinutes(timezoneOffset);
        // Hours, minutes and optional seconds without `:` delimiter
        // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
        // so this token always has the same output as `xx`
        case "xxxx":
        case "xx":
          return formatTimezone(timezoneOffset);
        // Hours, minutes and optional seconds with `:` delimiter
        // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
        // so this token always has the same output as `xxx`
        case "xxxxx":
        case "xxx":
        // Hours and minutes with `:` delimiter
        default:
          return formatTimezone(timezoneOffset, ":");
      }
    },
    // Timezone (GMT)
    O: function(date, token2, _localize) {
      const timezoneOffset = date.getTimezoneOffset();
      switch (token2) {
        // Short
        case "O":
        case "OO":
        case "OOO":
          return "GMT" + formatTimezoneShort(timezoneOffset, ":");
        // Long
        case "OOOO":
        default:
          return "GMT" + formatTimezone(timezoneOffset, ":");
      }
    },
    // Timezone (specific non-location)
    z: function(date, token2, _localize) {
      const timezoneOffset = date.getTimezoneOffset();
      switch (token2) {
        // Short
        case "z":
        case "zz":
        case "zzz":
          return "GMT" + formatTimezoneShort(timezoneOffset, ":");
        // Long
        case "zzzz":
        default:
          return "GMT" + formatTimezone(timezoneOffset, ":");
      }
    },
    // Seconds timestamp
    t: function(date, token2, _localize) {
      const timestamp = Math.trunc(+date / 1e3);
      return addLeadingZeros(timestamp, token2.length);
    },
    // Milliseconds timestamp
    T: function(date, token2, _localize) {
      return addLeadingZeros(+date, token2.length);
    }
  };
  function formatTimezoneShort(offset3, delimiter2 = "") {
    const sign = offset3 > 0 ? "-" : "+";
    const absOffset = Math.abs(offset3);
    const hours = Math.trunc(absOffset / 60);
    const minutes = absOffset % 60;
    if (minutes === 0) {
      return sign + String(hours);
    }
    return sign + String(hours) + delimiter2 + addLeadingZeros(minutes, 2);
  }
  function formatTimezoneWithOptionalMinutes(offset3, delimiter2) {
    if (offset3 % 60 === 0) {
      const sign = offset3 > 0 ? "-" : "+";
      return sign + addLeadingZeros(Math.abs(offset3) / 60, 2);
    }
    return formatTimezone(offset3, delimiter2);
  }
  function formatTimezone(offset3, delimiter2 = "") {
    const sign = offset3 > 0 ? "-" : "+";
    const absOffset = Math.abs(offset3);
    const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);
    const minutes = addLeadingZeros(absOffset % 60, 2);
    return sign + hours + delimiter2 + minutes;
  }

  // node_modules/react-day-picker/node_modules/date-fns/_lib/format/longFormatters.js
  var dateLongFormatter = (pattern, formatLong2) => {
    switch (pattern) {
      case "P":
        return formatLong2.date({ width: "short" });
      case "PP":
        return formatLong2.date({ width: "medium" });
      case "PPP":
        return formatLong2.date({ width: "long" });
      case "PPPP":
      default:
        return formatLong2.date({ width: "full" });
    }
  };
  var timeLongFormatter = (pattern, formatLong2) => {
    switch (pattern) {
      case "p":
        return formatLong2.time({ width: "short" });
      case "pp":
        return formatLong2.time({ width: "medium" });
      case "ppp":
        return formatLong2.time({ width: "long" });
      case "pppp":
      default:
        return formatLong2.time({ width: "full" });
    }
  };
  var dateTimeLongFormatter = (pattern, formatLong2) => {
    const matchResult = pattern.match(/(P+)(p+)?/) || [];
    const datePattern = matchResult[1];
    const timePattern = matchResult[2];
    if (!timePattern) {
      return dateLongFormatter(pattern, formatLong2);
    }
    let dateTimeFormat;
    switch (datePattern) {
      case "P":
        dateTimeFormat = formatLong2.dateTime({ width: "short" });
        break;
      case "PP":
        dateTimeFormat = formatLong2.dateTime({ width: "medium" });
        break;
      case "PPP":
        dateTimeFormat = formatLong2.dateTime({ width: "long" });
        break;
      case "PPPP":
      default:
        dateTimeFormat = formatLong2.dateTime({ width: "full" });
        break;
    }
    return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
  };
  var longFormatters = {
    p: timeLongFormatter,
    P: dateTimeLongFormatter
  };

  // node_modules/react-day-picker/node_modules/date-fns/_lib/protectedTokens.js
  var dayOfYearTokenRE = /^D+$/;
  var weekYearTokenRE = /^Y+$/;
  var throwTokens = ["D", "DD", "YY", "YYYY"];
  function isProtectedDayOfYearToken(token2) {
    return dayOfYearTokenRE.test(token2);
  }
  function isProtectedWeekYearToken(token2) {
    return weekYearTokenRE.test(token2);
  }
  function warnOrThrowProtectedError(token2, format2, input) {
    const _message = message(token2, format2, input);
    console.warn(_message);
    if (throwTokens.includes(token2)) throw new RangeError(_message);
  }
  function message(token2, format2, input) {
    const subject = token2[0] === "Y" ? "years" : "days of the month";
    return `Use \`${token2.toLowerCase()}\` instead of \`${token2}\` (in \`${format2}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
  }

  // node_modules/react-day-picker/node_modules/date-fns/format.js
  var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
  var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
  var escapedStringRegExp = /^'([^]*?)'?$/;
  var doubleQuoteRegExp = /''/g;
  var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
  function format(date, formatStr, options2) {
    const defaultOptions4 = getDefaultOptions2();
    const locale = options2?.locale ?? defaultOptions4.locale ?? enUS;
    const firstWeekContainsDate = options2?.firstWeekContainsDate ?? options2?.locale?.options?.firstWeekContainsDate ?? defaultOptions4.firstWeekContainsDate ?? defaultOptions4.locale?.options?.firstWeekContainsDate ?? 1;
    const weekStartsOn = options2?.weekStartsOn ?? options2?.locale?.options?.weekStartsOn ?? defaultOptions4.weekStartsOn ?? defaultOptions4.locale?.options?.weekStartsOn ?? 0;
    const originalDate = toDate2(date, options2?.in);
    if (!isValid(originalDate)) {
      throw new RangeError("Invalid time value");
    }
    let parts = formatStr.match(longFormattingTokensRegExp).map((substring) => {
      const firstCharacter = substring[0];
      if (firstCharacter === "p" || firstCharacter === "P") {
        const longFormatter = longFormatters[firstCharacter];
        return longFormatter(substring, locale.formatLong);
      }
      return substring;
    }).join("").match(formattingTokensRegExp).map((substring) => {
      if (substring === "''") {
        return { isToken: false, value: "'" };
      }
      const firstCharacter = substring[0];
      if (firstCharacter === "'") {
        return { isToken: false, value: cleanEscapedString(substring) };
      }
      if (formatters[firstCharacter]) {
        return { isToken: true, value: substring };
      }
      if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
        throw new RangeError(
          "Format string contains an unescaped latin alphabet character `" + firstCharacter + "`"
        );
      }
      return { isToken: false, value: substring };
    });
    if (locale.localize.preprocessor) {
      parts = locale.localize.preprocessor(originalDate, parts);
    }
    const formatterOptions = {
      firstWeekContainsDate,
      weekStartsOn,
      locale
    };
    return parts.map((part) => {
      if (!part.isToken) return part.value;
      const token2 = part.value;
      if (!options2?.useAdditionalWeekYearTokens && isProtectedWeekYearToken(token2) || !options2?.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(token2)) {
        warnOrThrowProtectedError(token2, formatStr, String(date));
      }
      const formatter = formatters[token2[0]];
      return formatter(originalDate, token2, locale.localize, formatterOptions);
    }).join("");
  }
  function cleanEscapedString(input) {
    const matched = input.match(escapedStringRegExp);
    if (!matched) {
      return input;
    }
    return matched[1].replace(doubleQuoteRegExp, "'");
  }

  // node_modules/react-day-picker/node_modules/date-fns/getDaysInMonth.js
  function getDaysInMonth3(date, options2) {
    const _date = toDate2(date, options2?.in);
    const year = _date.getFullYear();
    const monthIndex = _date.getMonth();
    const lastDayOfMonth = constructFrom2(_date, 0);
    lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);
    lastDayOfMonth.setHours(0, 0, 0, 0);
    return lastDayOfMonth.getDate();
  }

  // node_modules/react-day-picker/node_modules/date-fns/getMonth.js
  function getMonth(date, options2) {
    return toDate2(date, options2?.in).getMonth();
  }

  // node_modules/react-day-picker/node_modules/date-fns/getYear.js
  function getYear(date, options2) {
    return toDate2(date, options2?.in).getFullYear();
  }

  // node_modules/react-day-picker/node_modules/date-fns/isAfter.js
  function isAfter2(date, dateToCompare) {
    return +toDate2(date) > +toDate2(dateToCompare);
  }

  // node_modules/react-day-picker/node_modules/date-fns/isBefore.js
  function isBefore2(date, dateToCompare) {
    return +toDate2(date) < +toDate2(dateToCompare);
  }

  // node_modules/react-day-picker/node_modules/date-fns/isSameMonth.js
  function isSameMonth2(laterDate, earlierDate, options2) {
    const [laterDate_, earlierDate_] = normalizeDates(
      options2?.in,
      laterDate,
      earlierDate
    );
    return laterDate_.getFullYear() === earlierDate_.getFullYear() && laterDate_.getMonth() === earlierDate_.getMonth();
  }

  // node_modules/react-day-picker/node_modules/date-fns/isSameYear.js
  function isSameYear(laterDate, earlierDate, options2) {
    const [laterDate_, earlierDate_] = normalizeDates(
      options2?.in,
      laterDate,
      earlierDate
    );
    return laterDate_.getFullYear() === earlierDate_.getFullYear();
  }

  // node_modules/react-day-picker/node_modules/date-fns/setMonth.js
  function setMonth2(date, month, options2) {
    const _date = toDate2(date, options2?.in);
    const year = _date.getFullYear();
    const day = _date.getDate();
    const midMonth = constructFrom2(options2?.in || date, 0);
    midMonth.setFullYear(year, month, 15);
    midMonth.setHours(0, 0, 0, 0);
    const daysInMonth = getDaysInMonth3(midMonth);
    _date.setMonth(month, Math.min(day, daysInMonth));
    return _date;
  }

  // node_modules/react-day-picker/node_modules/date-fns/setYear.js
  function setYear2(date, year, options2) {
    const date_ = toDate2(date, options2?.in);
    if (isNaN(+date_)) return constructFrom2(options2?.in || date, NaN);
    date_.setFullYear(year);
    return date_;
  }

  // node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js
  var FIVE_WEEKS = 5;
  var FOUR_WEEKS = 4;
  function getBroadcastWeeksInMonth(month, dateLib) {
    const firstDayOfMonth = dateLib.startOfMonth(month);
    const firstDayOfWeek = firstDayOfMonth.getDay() > 0 ? firstDayOfMonth.getDay() : 7;
    const broadcastStartDate = dateLib.addDays(month, -firstDayOfWeek + 1);
    const lastDateOfLastWeek = dateLib.addDays(broadcastStartDate, FIVE_WEEKS * 7 - 1);
    const numberOfWeeks = dateLib.getMonth(month) === dateLib.getMonth(lastDateOfLastWeek) ? FIVE_WEEKS : FOUR_WEEKS;
    return numberOfWeeks;
  }

  // node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js
  function startOfBroadcastWeek(date, dateLib) {
    const firstOfMonth = dateLib.startOfMonth(date);
    const dayOfWeek = firstOfMonth.getDay();
    if (dayOfWeek === 1) {
      return firstOfMonth;
    } else if (dayOfWeek === 0) {
      return dateLib.addDays(firstOfMonth, -1 * 6);
    } else {
      return dateLib.addDays(firstOfMonth, -1 * (dayOfWeek - 1));
    }
  }

  // node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js
  function endOfBroadcastWeek(date, dateLib) {
    const startDate = startOfBroadcastWeek(date, dateLib);
    const numberOfWeeks = getBroadcastWeeksInMonth(date, dateLib);
    const endDate = dateLib.addDays(startDate, numberOfWeeks * 7 - 1);
    return endDate;
  }

  // node_modules/react-day-picker/dist/esm/classes/DateLib.js
  var DateLib = class {
    /**
     * Creates an instance of `DateLib`.
     *
     * @param options Configuration options for the date library.
     * @param overrides Custom overrides for the date library functions.
     */
    constructor(options2, overrides) {
      this.Date = Date;
      this.today = () => {
        if (this.overrides?.today) {
          return this.overrides.today();
        }
        if (this.options.timeZone) {
          return TZDate.tz(this.options.timeZone);
        }
        return new this.Date();
      };
      this.newDate = (year, monthIndex, date) => {
        if (this.overrides?.newDate) {
          return this.overrides.newDate(year, monthIndex, date);
        }
        if (this.options.timeZone) {
          return new TZDate(year, monthIndex, date, this.options.timeZone);
        }
        return new Date(year, monthIndex, date);
      };
      this.addDays = (date, amount) => {
        return this.overrides?.addDays ? this.overrides.addDays(date, amount) : addDays2(date, amount);
      };
      this.addMonths = (date, amount) => {
        return this.overrides?.addMonths ? this.overrides.addMonths(date, amount) : addMonths2(date, amount);
      };
      this.addWeeks = (date, amount) => {
        return this.overrides?.addWeeks ? this.overrides.addWeeks(date, amount) : addWeeks2(date, amount);
      };
      this.addYears = (date, amount) => {
        return this.overrides?.addYears ? this.overrides.addYears(date, amount) : addYears2(date, amount);
      };
      this.differenceInCalendarDays = (dateLeft, dateRight) => {
        return this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(dateLeft, dateRight) : differenceInCalendarDays2(dateLeft, dateRight);
      };
      this.differenceInCalendarMonths = (dateLeft, dateRight) => {
        return this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(dateLeft, dateRight) : differenceInCalendarMonths(dateLeft, dateRight);
      };
      this.eachMonthOfInterval = (interval) => {
        return this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(interval) : eachMonthOfInterval2(interval);
      };
      this.endOfBroadcastWeek = (date) => {
        return this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(date) : endOfBroadcastWeek(date, this);
      };
      this.endOfISOWeek = (date) => {
        return this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(date) : endOfISOWeek(date);
      };
      this.endOfMonth = (date) => {
        return this.overrides?.endOfMonth ? this.overrides.endOfMonth(date) : endOfMonth2(date);
      };
      this.endOfWeek = (date, options3) => {
        return this.overrides?.endOfWeek ? this.overrides.endOfWeek(date, options3) : endOfWeek2(date, this.options);
      };
      this.endOfYear = (date) => {
        return this.overrides?.endOfYear ? this.overrides.endOfYear(date) : endOfYear(date);
      };
      this.format = (date, formatStr, options3) => {
        const formatted = this.overrides?.format ? this.overrides.format(date, formatStr, this.options) : format(date, formatStr, this.options);
        if (this.options.numerals && this.options.numerals !== "latn") {
          return this.replaceDigits(formatted);
        }
        return formatted;
      };
      this.getISOWeek = (date) => {
        return this.overrides?.getISOWeek ? this.overrides.getISOWeek(date) : getISOWeek(date);
      };
      this.getMonth = (date, options3) => {
        return this.overrides?.getMonth ? this.overrides.getMonth(date, this.options) : getMonth(date, this.options);
      };
      this.getYear = (date, options3) => {
        return this.overrides?.getYear ? this.overrides.getYear(date, this.options) : getYear(date, this.options);
      };
      this.getWeek = (date, options3) => {
        return this.overrides?.getWeek ? this.overrides.getWeek(date, this.options) : getWeek(date, this.options);
      };
      this.isAfter = (date, dateToCompare) => {
        return this.overrides?.isAfter ? this.overrides.isAfter(date, dateToCompare) : isAfter2(date, dateToCompare);
      };
      this.isBefore = (date, dateToCompare) => {
        return this.overrides?.isBefore ? this.overrides.isBefore(date, dateToCompare) : isBefore2(date, dateToCompare);
      };
      this.isDate = (value) => {
        return this.overrides?.isDate ? this.overrides.isDate(value) : isDate(value);
      };
      this.isSameDay = (dateLeft, dateRight) => {
        return this.overrides?.isSameDay ? this.overrides.isSameDay(dateLeft, dateRight) : isSameDay2(dateLeft, dateRight);
      };
      this.isSameMonth = (dateLeft, dateRight) => {
        return this.overrides?.isSameMonth ? this.overrides.isSameMonth(dateLeft, dateRight) : isSameMonth2(dateLeft, dateRight);
      };
      this.isSameYear = (dateLeft, dateRight) => {
        return this.overrides?.isSameYear ? this.overrides.isSameYear(dateLeft, dateRight) : isSameYear(dateLeft, dateRight);
      };
      this.max = (dates) => {
        return this.overrides?.max ? this.overrides.max(dates) : max2(dates);
      };
      this.min = (dates) => {
        return this.overrides?.min ? this.overrides.min(dates) : min2(dates);
      };
      this.setMonth = (date, month) => {
        return this.overrides?.setMonth ? this.overrides.setMonth(date, month) : setMonth2(date, month);
      };
      this.setYear = (date, year) => {
        return this.overrides?.setYear ? this.overrides.setYear(date, year) : setYear2(date, year);
      };
      this.startOfBroadcastWeek = (date, dateLib) => {
        return this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(date, this) : startOfBroadcastWeek(date, this);
      };
      this.startOfDay = (date) => {
        return this.overrides?.startOfDay ? this.overrides.startOfDay(date) : startOfDay2(date);
      };
      this.startOfISOWeek = (date) => {
        return this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(date) : startOfISOWeek(date);
      };
      this.startOfMonth = (date) => {
        return this.overrides?.startOfMonth ? this.overrides.startOfMonth(date) : startOfMonth2(date);
      };
      this.startOfWeek = (date, options3) => {
        return this.overrides?.startOfWeek ? this.overrides.startOfWeek(date, this.options) : startOfWeek2(date, this.options);
      };
      this.startOfYear = (date) => {
        return this.overrides?.startOfYear ? this.overrides.startOfYear(date) : startOfYear(date);
      };
      this.options = { locale: enUS, ...options2 };
      this.overrides = overrides;
    }
    /**
     * Generates a mapping of Arabic digits (0-9) to the target numbering system
     * digits.
     *
     * @since 9.5.0
     * @returns A record mapping Arabic digits to the target numerals.
     */
    getDigitMap() {
      const { numerals = "latn" } = this.options;
      const formatter = new Intl.NumberFormat("en-US", {
        numberingSystem: numerals
      });
      const digitMap = {};
      for (let i3 = 0; i3 < 10; i3++) {
        digitMap[i3.toString()] = formatter.format(i3);
      }
      return digitMap;
    }
    /**
     * Replaces Arabic digits in a string with the target numbering system digits.
     *
     * @since 9.5.0
     * @param input The string containing Arabic digits.
     * @returns The string with digits replaced.
     */
    replaceDigits(input) {
      const digitMap = this.getDigitMap();
      return input.replace(/\d/g, (digit) => digitMap[digit] || digit);
    }
    /**
     * Formats a number using the configured numbering system.
     *
     * @since 9.5.0
     * @param value The number to format.
     * @returns The formatted number as a string.
     */
    formatNumber(value) {
      return this.replaceDigits(value.toString());
    }
  };
  var defaultDateLib = new DateLib();

  // node_modules/react-day-picker/dist/esm/classes/CalendarDay.js
  var CalendarDay = class {
    constructor(date, displayMonth, dateLib = defaultDateLib) {
      this.date = date;
      this.displayMonth = displayMonth;
      this.outside = Boolean(displayMonth && !dateLib.isSameMonth(date, displayMonth));
      this.dateLib = dateLib;
    }
    /**
     * Checks if this day is equal to another `CalendarDay`, considering both the
     * date and the displayed month.
     *
     * @param day The `CalendarDay` to compare with.
     * @returns `true` if the days are equal, otherwise `false`.
     */
    isEqualTo(day) {
      return this.dateLib.isSameDay(day.date, this.date) && this.dateLib.isSameMonth(day.displayMonth, this.displayMonth);
    }
  };

  // node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js
  var CalendarMonth = class {
    constructor(month, weeks) {
      this.date = month;
      this.weeks = weeks;
    }
  };

  // node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js
  var CalendarWeek = class {
    constructor(weekNumber, days) {
      this.days = days;
      this.weekNumber = weekNumber;
    }
  };

  // node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js
  function rangeIncludesDate(range, date, excludeEnds = false, dateLib = defaultDateLib) {
    let { from: from2, to } = range;
    const { differenceInCalendarDays: differenceInCalendarDays3, isSameDay: isSameDay3 } = dateLib;
    if (from2 && to) {
      const isRangeInverted = differenceInCalendarDays3(to, from2) < 0;
      if (isRangeInverted) {
        [from2, to] = [to, from2];
      }
      const isInRange = differenceInCalendarDays3(date, from2) >= (excludeEnds ? 1 : 0) && differenceInCalendarDays3(to, date) >= (excludeEnds ? 1 : 0);
      return isInRange;
    }
    if (!excludeEnds && to) {
      return isSameDay3(to, date);
    }
    if (!excludeEnds && from2) {
      return isSameDay3(from2, date);
    }
    return false;
  }

  // node_modules/react-day-picker/dist/esm/utils/typeguards.js
  function isDateInterval(matcher) {
    return Boolean(matcher && typeof matcher === "object" && "before" in matcher && "after" in matcher);
  }
  function isDateRange(value) {
    return Boolean(value && typeof value === "object" && "from" in value);
  }
  function isDateAfterType(value) {
    return Boolean(value && typeof value === "object" && "after" in value);
  }
  function isDateBeforeType(value) {
    return Boolean(value && typeof value === "object" && "before" in value);
  }
  function isDayOfWeekType(value) {
    return Boolean(value && typeof value === "object" && "dayOfWeek" in value);
  }
  function isDatesArray(value, dateLib) {
    return Array.isArray(value) && value.every(dateLib.isDate);
  }

  // node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js
  function dateMatchModifiers(date, matchers, dateLib = defaultDateLib) {
    const matchersArr = !Array.isArray(matchers) ? [matchers] : matchers;
    const { isSameDay: isSameDay3, differenceInCalendarDays: differenceInCalendarDays3, isAfter: isAfter3 } = dateLib;
    return matchersArr.some((matcher) => {
      if (typeof matcher === "boolean") {
        return matcher;
      }
      if (dateLib.isDate(matcher)) {
        return isSameDay3(date, matcher);
      }
      if (isDatesArray(matcher, dateLib)) {
        return matcher.includes(date);
      }
      if (isDateRange(matcher)) {
        return rangeIncludesDate(matcher, date, false, dateLib);
      }
      if (isDayOfWeekType(matcher)) {
        if (!Array.isArray(matcher.dayOfWeek)) {
          return matcher.dayOfWeek === date.getDay();
        }
        return matcher.dayOfWeek.includes(date.getDay());
      }
      if (isDateInterval(matcher)) {
        const diffBefore = differenceInCalendarDays3(matcher.before, date);
        const diffAfter = differenceInCalendarDays3(matcher.after, date);
        const isDayBefore = diffBefore > 0;
        const isDayAfter = diffAfter < 0;
        const isClosedInterval = isAfter3(matcher.before, matcher.after);
        if (isClosedInterval) {
          return isDayAfter && isDayBefore;
        } else {
          return isDayBefore || isDayAfter;
        }
      }
      if (isDateAfterType(matcher)) {
        return differenceInCalendarDays3(date, matcher.after) > 0;
      }
      if (isDateBeforeType(matcher)) {
        return differenceInCalendarDays3(matcher.before, date) > 0;
      }
      if (typeof matcher === "function") {
        return matcher(date);
      }
      return false;
    });
  }

  // node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js
  function createGetModifiers(days, props, dateLib) {
    const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today } = props;
    const { isSameDay: isSameDay3, isSameMonth: isSameMonth3, startOfMonth: startOfMonth3, isBefore: isBefore3, endOfMonth: endOfMonth3, isAfter: isAfter3 } = dateLib;
    const startMonth = props.startMonth && startOfMonth3(props.startMonth);
    const endMonth = props.endMonth && endOfMonth3(props.endMonth);
    const internalModifiersMap = {
      [DayFlag.focused]: [],
      [DayFlag.outside]: [],
      [DayFlag.disabled]: [],
      [DayFlag.hidden]: [],
      [DayFlag.today]: []
    };
    const customModifiersMap = {};
    for (const day of days) {
      const { date, displayMonth } = day;
      const isOutside = Boolean(displayMonth && !isSameMonth3(date, displayMonth));
      const isBeforeStartMonth = Boolean(startMonth && isBefore3(date, startMonth));
      const isAfterEndMonth = Boolean(endMonth && isAfter3(date, endMonth));
      const isDisabled = Boolean(disabled && dateMatchModifiers(date, disabled, dateLib));
      const isHidden2 = Boolean(hidden && dateMatchModifiers(date, hidden, dateLib)) || isBeforeStartMonth || isAfterEndMonth || // Broadcast calendar will show outside days as default
      !broadcastCalendar && !showOutsideDays && isOutside || broadcastCalendar && showOutsideDays === false && isOutside;
      const isToday = isSameDay3(date, today ?? dateLib.today());
      if (isOutside)
        internalModifiersMap.outside.push(day);
      if (isDisabled)
        internalModifiersMap.disabled.push(day);
      if (isHidden2)
        internalModifiersMap.hidden.push(day);
      if (isToday)
        internalModifiersMap.today.push(day);
      if (modifiers) {
        Object.keys(modifiers).forEach((name) => {
          const modifierValue = modifiers?.[name];
          const isMatch = modifierValue ? dateMatchModifiers(date, modifierValue, dateLib) : false;
          if (!isMatch)
            return;
          if (customModifiersMap[name]) {
            customModifiersMap[name].push(day);
          } else {
            customModifiersMap[name] = [day];
          }
        });
      }
    }
    return (day) => {
      const dayFlags = {
        [DayFlag.focused]: false,
        [DayFlag.disabled]: false,
        [DayFlag.hidden]: false,
        [DayFlag.outside]: false,
        [DayFlag.today]: false
      };
      const customModifiers = {};
      for (const name in internalModifiersMap) {
        const days2 = internalModifiersMap[name];
        dayFlags[name] = days2.some((d3) => d3 === day);
      }
      for (const name in customModifiersMap) {
        customModifiers[name] = customModifiersMap[name].some((d3) => d3 === day);
      }
      return {
        ...dayFlags,
        // custom modifiers should override all the previous ones
        ...customModifiers
      };
    };
  }

  // node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js
  function getClassNamesForModifiers(modifiers, classNames, modifiersClassNames = {}) {
    const modifierClassNames = Object.entries(modifiers).filter(([, active]) => active === true).reduce((previousValue, [key]) => {
      if (modifiersClassNames[key]) {
        previousValue.push(modifiersClassNames[key]);
      } else if (classNames[DayFlag[key]]) {
        previousValue.push(classNames[DayFlag[key]]);
      } else if (classNames[SelectionState[key]]) {
        previousValue.push(classNames[SelectionState[key]]);
      }
      return previousValue;
    }, [classNames[UI2.Day]]);
    return modifierClassNames;
  }

  // node_modules/react-day-picker/dist/esm/components/custom-components.js
  var custom_components_exports = {};
  __export(custom_components_exports, {
    Button: () => Button4,
    CaptionLabel: () => CaptionLabel,
    Chevron: () => Chevron,
    Day: () => Day3,
    DayButton: () => DayButton2,
    Dropdown: () => Dropdown2,
    DropdownNav: () => DropdownNav,
    Footer: () => Footer2,
    Month: () => Month,
    MonthCaption: () => MonthCaption,
    MonthGrid: () => MonthGrid,
    Months: () => Months,
    MonthsDropdown: () => MonthsDropdown,
    Nav: () => Nav,
    NextMonthButton: () => NextMonthButton,
    Option: () => Option3,
    PreviousMonthButton: () => PreviousMonthButton,
    Root: () => Root5,
    Select: () => Select4,
    Week: () => Week,
    WeekNumber: () => WeekNumber,
    WeekNumberHeader: () => WeekNumberHeader,
    Weekday: () => Weekday,
    Weekdays: () => Weekdays,
    Weeks: () => Weeks,
    YearsDropdown: () => YearsDropdown
  });

  // node_modules/react-day-picker/dist/esm/components/Button.js
  var import_react132 = __toESM(require_react(), 1);
  function Button4(props) {
    return import_react132.default.createElement("button", { ...props });
  }

  // node_modules/react-day-picker/dist/esm/components/CaptionLabel.js
  var import_react133 = __toESM(require_react(), 1);
  function CaptionLabel(props) {
    return import_react133.default.createElement("span", { ...props });
  }

  // node_modules/react-day-picker/dist/esm/components/Chevron.js
  var import_react134 = __toESM(require_react(), 1);
  function Chevron(props) {
    const { size: size3 = 24, orientation = "left", className: className2 } = props;
    return import_react134.default.createElement(
      "svg",
      { className: className2, width: size3, height: size3, viewBox: "0 0 24 24" },
      orientation === "up" && import_react134.default.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
      orientation === "down" && import_react134.default.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
      orientation === "left" && import_react134.default.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
      orientation === "right" && import_react134.default.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
    );
  }

  // node_modules/react-day-picker/dist/esm/components/Day.js
  var import_react135 = __toESM(require_react(), 1);
  function Day3(props) {
    const { day, modifiers, ...tdProps } = props;
    return import_react135.default.createElement("td", { ...tdProps });
  }

  // node_modules/react-day-picker/dist/esm/components/DayButton.js
  var import_react136 = __toESM(require_react(), 1);
  function DayButton2(props) {
    const { day, modifiers, ...buttonProps } = props;
    const ref = import_react136.default.useRef(null);
    import_react136.default.useEffect(() => {
      if (modifiers.focused)
        ref.current?.focus();
    }, [modifiers.focused]);
    return import_react136.default.createElement("button", { ref, ...buttonProps });
  }

  // node_modules/react-day-picker/dist/esm/components/Dropdown.js
  var import_react137 = __toESM(require_react(), 1);
  function Dropdown2(props) {
    const { options: options2, className: className2, components, classNames, ...selectProps } = props;
    const cssClassSelect = [classNames[UI2.Dropdown], className2].join(" ");
    const selectedOption = options2?.find(({ value }) => value === selectProps.value);
    return import_react137.default.createElement(
      "span",
      { "data-disabled": selectProps.disabled, className: classNames[UI2.DropdownRoot] },
      import_react137.default.createElement(components.Select, { className: cssClassSelect, ...selectProps }, options2?.map(({ value, label, disabled }) => import_react137.default.createElement(components.Option, { key: value, value, disabled }, label))),
      import_react137.default.createElement(
        "span",
        { className: classNames[UI2.CaptionLabel], "aria-hidden": true },
        selectedOption?.label,
        import_react137.default.createElement(components.Chevron, { orientation: "down", size: 18, className: classNames[UI2.Chevron] })
      )
    );
  }

  // node_modules/react-day-picker/dist/esm/components/DropdownNav.js
  var import_react138 = __toESM(require_react(), 1);
  function DropdownNav(props) {
    return import_react138.default.createElement("div", { ...props });
  }

  // node_modules/react-day-picker/dist/esm/components/Footer.js
  var import_react139 = __toESM(require_react(), 1);
  function Footer2(props) {
    return import_react139.default.createElement("div", { ...props });
  }

  // node_modules/react-day-picker/dist/esm/components/Month.js
  var import_react140 = __toESM(require_react(), 1);
  function Month(props) {
    const { calendarMonth, displayIndex, ...divProps } = props;
    return import_react140.default.createElement("div", { ...divProps }, props.children);
  }

  // node_modules/react-day-picker/dist/esm/components/MonthCaption.js
  var import_react141 = __toESM(require_react(), 1);
  function MonthCaption(props) {
    const { calendarMonth, displayIndex, ...divProps } = props;
    return import_react141.default.createElement("div", { ...divProps });
  }

  // node_modules/react-day-picker/dist/esm/components/MonthGrid.js
  var import_react142 = __toESM(require_react(), 1);
  function MonthGrid(props) {
    return import_react142.default.createElement("table", { ...props });
  }

  // node_modules/react-day-picker/dist/esm/components/Months.js
  var import_react143 = __toESM(require_react(), 1);
  function Months(props) {
    return import_react143.default.createElement("div", { ...props });
  }

  // node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js
  var import_react145 = __toESM(require_react(), 1);

  // node_modules/react-day-picker/dist/esm/useDayPicker.js
  var import_react144 = __toESM(require_react(), 1);
  var dayPickerContext = (0, import_react144.createContext)(void 0);
  function useDayPicker() {
    const context = (0, import_react144.useContext)(dayPickerContext);
    if (context === void 0) {
      throw new Error("useDayPicker() must be used within a custom component.");
    }
    return context;
  }

  // node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js
  function MonthsDropdown(props) {
    const { components } = useDayPicker();
    return import_react145.default.createElement(components.Dropdown, { ...props });
  }

  // node_modules/react-day-picker/dist/esm/components/Nav.js
  var import_react146 = __toESM(require_react(), 1);
  function Nav(props) {
    const { onPreviousClick, onNextClick, previousMonth, nextMonth, ...navProps } = props;
    const { components, classNames, labels: { labelPrevious: labelPrevious2, labelNext: labelNext2 } } = useDayPicker();
    const handleNextClick = (0, import_react146.useCallback)((e3) => {
      if (nextMonth) {
        onNextClick?.(e3);
      }
    }, [nextMonth, onNextClick]);
    const handlePreviousClick = (0, import_react146.useCallback)((e3) => {
      if (previousMonth) {
        onPreviousClick?.(e3);
      }
    }, [previousMonth, onPreviousClick]);
    return import_react146.default.createElement(
      "nav",
      { ...navProps },
      import_react146.default.createElement(
        components.PreviousMonthButton,
        { type: "button", className: classNames[UI2.PreviousMonthButton], tabIndex: previousMonth ? void 0 : -1, "aria-disabled": previousMonth ? void 0 : true, "aria-label": labelPrevious2(previousMonth), onClick: handlePreviousClick },
        import_react146.default.createElement(components.Chevron, { disabled: previousMonth ? void 0 : true, className: classNames[UI2.Chevron], orientation: "left" })
      ),
      import_react146.default.createElement(
        components.NextMonthButton,
        { type: "button", className: classNames[UI2.NextMonthButton], tabIndex: nextMonth ? void 0 : -1, "aria-disabled": nextMonth ? void 0 : true, "aria-label": labelNext2(nextMonth), onClick: handleNextClick },
        import_react146.default.createElement(components.Chevron, { disabled: nextMonth ? void 0 : true, orientation: "right", className: classNames[UI2.Chevron] })
      )
    );
  }

  // node_modules/react-day-picker/dist/esm/components/NextMonthButton.js
  var import_react147 = __toESM(require_react(), 1);
  function NextMonthButton(props) {
    const { components } = useDayPicker();
    return import_react147.default.createElement(components.Button, { ...props });
  }

  // node_modules/react-day-picker/dist/esm/components/Option.js
  var import_react148 = __toESM(require_react(), 1);
  function Option3(props) {
    return import_react148.default.createElement("option", { ...props });
  }

  // node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js
  var import_react149 = __toESM(require_react(), 1);
  function PreviousMonthButton(props) {
    const { components } = useDayPicker();
    return import_react149.default.createElement(components.Button, { ...props });
  }

  // node_modules/react-day-picker/dist/esm/components/Root.js
  var import_react150 = __toESM(require_react(), 1);
  function Root5(props) {
    const { rootRef, ...rest } = props;
    return import_react150.default.createElement("div", { ...rest, ref: rootRef });
  }

  // node_modules/react-day-picker/dist/esm/components/Select.js
  var import_react151 = __toESM(require_react(), 1);
  function Select4(props) {
    return import_react151.default.createElement("select", { ...props });
  }

  // node_modules/react-day-picker/dist/esm/components/Week.js
  var import_react152 = __toESM(require_react(), 1);
  function Week(props) {
    const { week, ...trProps } = props;
    return import_react152.default.createElement("tr", { ...trProps });
  }

  // node_modules/react-day-picker/dist/esm/components/Weekday.js
  var import_react153 = __toESM(require_react(), 1);
  function Weekday(props) {
    return import_react153.default.createElement("th", { ...props });
  }

  // node_modules/react-day-picker/dist/esm/components/Weekdays.js
  var import_react154 = __toESM(require_react(), 1);
  function Weekdays(props) {
    return import_react154.default.createElement(
      "thead",
      { "aria-hidden": true },
      import_react154.default.createElement("tr", { ...props })
    );
  }

  // node_modules/react-day-picker/dist/esm/components/WeekNumber.js
  var import_react155 = __toESM(require_react(), 1);
  function WeekNumber(props) {
    const { week, ...thProps } = props;
    return import_react155.default.createElement("th", { ...thProps });
  }

  // node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js
  var import_react156 = __toESM(require_react(), 1);
  function WeekNumberHeader(props) {
    return import_react156.default.createElement("th", { ...props });
  }

  // node_modules/react-day-picker/dist/esm/components/Weeks.js
  var import_react157 = __toESM(require_react(), 1);
  function Weeks(props) {
    return import_react157.default.createElement("tbody", { ...props });
  }

  // node_modules/react-day-picker/dist/esm/components/YearsDropdown.js
  var import_react158 = __toESM(require_react(), 1);
  function YearsDropdown(props) {
    const { components } = useDayPicker();
    return import_react158.default.createElement(components.Dropdown, { ...props });
  }

  // node_modules/react-day-picker/dist/esm/helpers/getComponents.js
  function getComponents(customComponents) {
    return {
      ...custom_components_exports,
      ...customComponents
    };
  }

  // node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js
  function getDataAttributes(props) {
    const dataAttributes = {
      "data-mode": props.mode ?? void 0,
      "data-required": "required" in props ? props.required : void 0,
      "data-multiple-months": props.numberOfMonths && props.numberOfMonths > 1 || void 0,
      "data-week-numbers": props.showWeekNumber || void 0,
      "data-broadcast-calendar": props.broadcastCalendar || void 0,
      "data-nav-layout": props.navLayout || void 0
    };
    Object.entries(props).forEach(([key, val]) => {
      if (key.startsWith("data-")) {
        dataAttributes[key] = val;
      }
    });
    return dataAttributes;
  }

  // node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js
  function getDefaultClassNames() {
    const classNames = {};
    for (const key in UI2) {
      classNames[UI2[key]] = `rdp-${UI2[key]}`;
    }
    for (const key in DayFlag) {
      classNames[DayFlag[key]] = `rdp-${DayFlag[key]}`;
    }
    for (const key in SelectionState) {
      classNames[SelectionState[key]] = `rdp-${SelectionState[key]}`;
    }
    for (const key in Animation) {
      classNames[Animation[key]] = `rdp-${Animation[key]}`;
    }
    return classNames;
  }

  // node_modules/react-day-picker/dist/esm/formatters/index.js
  var formatters_exports = {};
  __export(formatters_exports, {
    formatCaption: () => formatCaption,
    formatDay: () => formatDay,
    formatMonthCaption: () => formatMonthCaption,
    formatMonthDropdown: () => formatMonthDropdown,
    formatWeekNumber: () => formatWeekNumber,
    formatWeekNumberHeader: () => formatWeekNumberHeader,
    formatWeekdayName: () => formatWeekdayName,
    formatYearCaption: () => formatYearCaption,
    formatYearDropdown: () => formatYearDropdown
  });

  // node_modules/react-day-picker/dist/esm/formatters/formatCaption.js
  function formatCaption(month, options2, dateLib) {
    return (dateLib ?? new DateLib(options2)).format(month, "LLLL y");
  }
  var formatMonthCaption = formatCaption;

  // node_modules/react-day-picker/dist/esm/formatters/formatDay.js
  function formatDay(date, options2, dateLib) {
    return (dateLib ?? new DateLib(options2)).format(date, "d");
  }

  // node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js
  function formatMonthDropdown(month, dateLib = defaultDateLib) {
    return dateLib.format(month, "LLLL");
  }

  // node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js
  function formatWeekNumber(weekNumber, dateLib = defaultDateLib) {
    if (weekNumber < 10) {
      return dateLib.formatNumber(`0${weekNumber.toLocaleString()}`);
    }
    return dateLib.formatNumber(`${weekNumber.toLocaleString()}`);
  }

  // node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js
  function formatWeekNumberHeader() {
    return ``;
  }

  // node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js
  function formatWeekdayName(weekday, options2, dateLib) {
    return (dateLib ?? new DateLib(options2)).format(weekday, "cccccc");
  }

  // node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js
  function formatYearDropdown(year, dateLib = defaultDateLib) {
    return dateLib.format(year, "yyyy");
  }
  var formatYearCaption = formatYearDropdown;

  // node_modules/react-day-picker/dist/esm/helpers/getFormatters.js
  function getFormatters(customFormatters) {
    if (customFormatters?.formatMonthCaption && !customFormatters.formatCaption) {
      customFormatters.formatCaption = customFormatters.formatMonthCaption;
    }
    if (customFormatters?.formatYearCaption && !customFormatters.formatYearDropdown) {
      customFormatters.formatYearDropdown = customFormatters.formatYearCaption;
    }
    return {
      ...formatters_exports,
      ...customFormatters
    };
  }

  // node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js
  function getMonthOptions(displayMonth, navStart, navEnd, formatters2, dateLib) {
    const { startOfMonth: startOfMonth3, startOfYear: startOfYear2, endOfYear: endOfYear2, eachMonthOfInterval: eachMonthOfInterval3, getMonth: getMonth2 } = dateLib;
    const months = eachMonthOfInterval3({
      start: startOfYear2(displayMonth),
      end: endOfYear2(displayMonth)
    });
    const options2 = months.map((month) => {
      const label = formatters2.formatMonthDropdown(month, dateLib);
      const value = getMonth2(month);
      const disabled = navStart && month < startOfMonth3(navStart) || navEnd && month > startOfMonth3(navEnd) || false;
      return { value, label, disabled };
    });
    return options2;
  }

  // node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js
  function getStyleForModifiers(dayModifiers, styles3 = {}, modifiersStyles = {}) {
    let style2 = { ...styles3?.[UI2.Day] };
    Object.entries(dayModifiers).filter(([, active]) => active === true).forEach(([modifier]) => {
      style2 = {
        ...style2,
        ...modifiersStyles?.[modifier]
      };
    });
    return style2;
  }

  // node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js
  function getWeekdays(dateLib, ISOWeek, broadcastCalendar) {
    const today = dateLib.today();
    const start = broadcastCalendar ? dateLib.startOfBroadcastWeek(today, dateLib) : ISOWeek ? dateLib.startOfISOWeek(today) : dateLib.startOfWeek(today);
    const days = [];
    for (let i3 = 0; i3 < 7; i3++) {
      const day = dateLib.addDays(start, i3);
      days.push(day);
    }
    return days;
  }

  // node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js
  function getYearOptions(navStart, navEnd, formatters2, dateLib) {
    if (!navStart)
      return void 0;
    if (!navEnd)
      return void 0;
    const { startOfYear: startOfYear2, endOfYear: endOfYear2, addYears: addYears3, getYear: getYear2, isBefore: isBefore3, isSameYear: isSameYear2 } = dateLib;
    const firstNavYear = startOfYear2(navStart);
    const lastNavYear = endOfYear2(navEnd);
    const years = [];
    let year = firstNavYear;
    while (isBefore3(year, lastNavYear) || isSameYear2(year, lastNavYear)) {
      years.push(year);
      year = addYears3(year, 1);
    }
    return years.map((year2) => {
      const label = formatters2.formatYearDropdown(year2, dateLib);
      return {
        value: getYear2(year2),
        label,
        disabled: false
      };
    });
  }

  // node_modules/react-day-picker/dist/esm/labels/index.js
  var labels_exports = {};
  __export(labels_exports, {
    labelCaption: () => labelCaption,
    labelDay: () => labelDay,
    labelDayButton: () => labelDayButton,
    labelGrid: () => labelGrid,
    labelGridcell: () => labelGridcell,
    labelMonthDropdown: () => labelMonthDropdown,
    labelNav: () => labelNav,
    labelNext: () => labelNext,
    labelPrevious: () => labelPrevious,
    labelWeekNumber: () => labelWeekNumber,
    labelWeekNumberHeader: () => labelWeekNumberHeader,
    labelWeekday: () => labelWeekday,
    labelYearDropdown: () => labelYearDropdown
  });

  // node_modules/react-day-picker/dist/esm/labels/labelGrid.js
  function labelGrid(date, options2, dateLib) {
    return (dateLib ?? new DateLib(options2)).format(date, "LLLL y");
  }
  var labelCaption = labelGrid;

  // node_modules/react-day-picker/dist/esm/labels/labelGridcell.js
  function labelGridcell(date, modifiers, options2, dateLib) {
    let label = (dateLib ?? new DateLib(options2)).format(date, "PPPP");
    if (modifiers?.today) {
      label = `Today, ${label}`;
    }
    return label;
  }

  // node_modules/react-day-picker/dist/esm/labels/labelDayButton.js
  function labelDayButton(date, modifiers, options2, dateLib) {
    let label = (dateLib ?? new DateLib(options2)).format(date, "PPPP");
    if (modifiers.today)
      label = `Today, ${label}`;
    if (modifiers.selected)
      label = `${label}, selected`;
    return label;
  }
  var labelDay = labelDayButton;

  // node_modules/react-day-picker/dist/esm/labels/labelNav.js
  function labelNav() {
    return "";
  }

  // node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js
  function labelMonthDropdown(options2) {
    return "Choose the Month";
  }

  // node_modules/react-day-picker/dist/esm/labels/labelNext.js
  function labelNext(month) {
    return "Go to the Next Month";
  }

  // node_modules/react-day-picker/dist/esm/labels/labelPrevious.js
  function labelPrevious(month) {
    return "Go to the Previous Month";
  }

  // node_modules/react-day-picker/dist/esm/labels/labelWeekday.js
  function labelWeekday(date, options2, dateLib) {
    return (dateLib ?? new DateLib(options2)).format(date, "cccc");
  }

  // node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js
  function labelWeekNumber(weekNumber, options2) {
    return `Week ${weekNumber}`;
  }

  // node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js
  function labelWeekNumberHeader(options2) {
    return "Week Number";
  }

  // node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js
  function labelYearDropdown(options2) {
    return "Choose the Year";
  }

  // node_modules/react-day-picker/dist/esm/useAnimation.js
  var import_react159 = __toESM(require_react(), 1);
  var asHtmlElement = (element) => {
    if (element instanceof HTMLElement)
      return element;
    return null;
  };
  var queryMonthEls = (element) => [
    ...element.querySelectorAll("[data-animated-month]") ?? []
  ];
  var queryMonthEl = (element) => asHtmlElement(element.querySelector("[data-animated-month]"));
  var queryCaptionEl = (element) => asHtmlElement(element.querySelector("[data-animated-caption]"));
  var queryWeeksEl = (element) => asHtmlElement(element.querySelector("[data-animated-weeks]"));
  var queryNavEl = (element) => asHtmlElement(element.querySelector("[data-animated-nav]"));
  var queryWeekdaysEl = (element) => asHtmlElement(element.querySelector("[data-animated-weekdays]"));
  function useAnimation(rootElRef, enabled, { classNames, months, focused, dateLib }) {
    const previousRootElSnapshotRef = (0, import_react159.useRef)(null);
    const previousMonthsRef = (0, import_react159.useRef)(months);
    const animatingRef = (0, import_react159.useRef)(false);
    (0, import_react159.useLayoutEffect)(() => {
      const previousMonths = previousMonthsRef.current;
      previousMonthsRef.current = months;
      if (!enabled || !rootElRef.current || // safety check because the ref can be set to anything by consumers
      !(rootElRef.current instanceof HTMLElement) || // validation required for the animation to work as expected
      months.length === 0 || previousMonths.length === 0 || months.length !== previousMonths.length) {
        return;
      }
      const isSameMonth3 = dateLib.isSameMonth(months[0].date, previousMonths[0].date);
      const isAfterPreviousMonth = dateLib.isAfter(months[0].date, previousMonths[0].date);
      const captionAnimationClass = isAfterPreviousMonth ? classNames[Animation.caption_after_enter] : classNames[Animation.caption_before_enter];
      const weeksAnimationClass = isAfterPreviousMonth ? classNames[Animation.weeks_after_enter] : classNames[Animation.weeks_before_enter];
      const previousRootElSnapshot = previousRootElSnapshotRef.current;
      const rootElSnapshot = rootElRef.current.cloneNode(true);
      if (rootElSnapshot instanceof HTMLElement) {
        const currentMonthElsSnapshot = queryMonthEls(rootElSnapshot);
        currentMonthElsSnapshot.forEach((currentMonthElSnapshot) => {
          if (!(currentMonthElSnapshot instanceof HTMLElement))
            return;
          const previousMonthElSnapshot = queryMonthEl(currentMonthElSnapshot);
          if (previousMonthElSnapshot && currentMonthElSnapshot.contains(previousMonthElSnapshot)) {
            currentMonthElSnapshot.removeChild(previousMonthElSnapshot);
          }
          const captionEl = queryCaptionEl(currentMonthElSnapshot);
          if (captionEl) {
            captionEl.classList.remove(captionAnimationClass);
          }
          const weeksEl = queryWeeksEl(currentMonthElSnapshot);
          if (weeksEl) {
            weeksEl.classList.remove(weeksAnimationClass);
          }
        });
        previousRootElSnapshotRef.current = rootElSnapshot;
      } else {
        previousRootElSnapshotRef.current = null;
      }
      if (animatingRef.current || isSameMonth3 || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
      focused) {
        return;
      }
      const previousMonthEls = previousRootElSnapshot instanceof HTMLElement ? queryMonthEls(previousRootElSnapshot) : [];
      const currentMonthEls = queryMonthEls(rootElRef.current);
      if (currentMonthEls && currentMonthEls.every((el) => el instanceof HTMLElement) && previousMonthEls && previousMonthEls.every((el) => el instanceof HTMLElement)) {
        animatingRef.current = true;
        const cleanUpFunctions = [];
        rootElRef.current.style.isolation = "isolate";
        const navEl = queryNavEl(rootElRef.current);
        if (navEl) {
          navEl.style.zIndex = "1";
        }
        currentMonthEls.forEach((currentMonthEl, index2) => {
          const previousMonthEl = previousMonthEls[index2];
          if (!previousMonthEl) {
            return;
          }
          currentMonthEl.style.position = "relative";
          currentMonthEl.style.overflow = "hidden";
          const captionEl = queryCaptionEl(currentMonthEl);
          if (captionEl) {
            captionEl.classList.add(captionAnimationClass);
          }
          const weeksEl = queryWeeksEl(currentMonthEl);
          if (weeksEl) {
            weeksEl.classList.add(weeksAnimationClass);
          }
          const cleanUp = () => {
            animatingRef.current = false;
            if (rootElRef.current) {
              rootElRef.current.style.isolation = "";
            }
            if (navEl) {
              navEl.style.zIndex = "";
            }
            if (captionEl) {
              captionEl.classList.remove(captionAnimationClass);
            }
            if (weeksEl) {
              weeksEl.classList.remove(weeksAnimationClass);
            }
            currentMonthEl.style.position = "";
            currentMonthEl.style.overflow = "";
            if (currentMonthEl.contains(previousMonthEl)) {
              currentMonthEl.removeChild(previousMonthEl);
            }
          };
          cleanUpFunctions.push(cleanUp);
          previousMonthEl.style.pointerEvents = "none";
          previousMonthEl.style.position = "absolute";
          previousMonthEl.style.overflow = "hidden";
          previousMonthEl.setAttribute("aria-hidden", "true");
          const previousWeekdaysEl = queryWeekdaysEl(previousMonthEl);
          if (previousWeekdaysEl) {
            previousWeekdaysEl.style.opacity = "0";
          }
          const previousCaptionEl = queryCaptionEl(previousMonthEl);
          if (previousCaptionEl) {
            previousCaptionEl.classList.add(isAfterPreviousMonth ? classNames[Animation.caption_before_exit] : classNames[Animation.caption_after_exit]);
            previousCaptionEl.addEventListener("animationend", cleanUp);
          }
          const previousWeeksEl = queryWeeksEl(previousMonthEl);
          if (previousWeeksEl) {
            previousWeeksEl.classList.add(isAfterPreviousMonth ? classNames[Animation.weeks_before_exit] : classNames[Animation.weeks_after_exit]);
          }
          currentMonthEl.insertBefore(previousMonthEl, currentMonthEl.firstChild);
        });
      }
    });
  }

  // node_modules/react-day-picker/dist/esm/useCalendar.js
  var import_react161 = __toESM(require_react(), 1);

  // node_modules/react-day-picker/dist/esm/helpers/getDates.js
  function getDates(displayMonths, maxDate, props, dateLib) {
    const firstMonth = displayMonths[0];
    const lastMonth = displayMonths[displayMonths.length - 1];
    const { ISOWeek, fixedWeeks, broadcastCalendar } = props ?? {};
    const { addDays: addDays3, differenceInCalendarDays: differenceInCalendarDays3, differenceInCalendarMonths: differenceInCalendarMonths2, endOfBroadcastWeek: endOfBroadcastWeek2, endOfISOWeek: endOfISOWeek2, endOfMonth: endOfMonth3, endOfWeek: endOfWeek3, isAfter: isAfter3, startOfBroadcastWeek: startOfBroadcastWeek2, startOfISOWeek: startOfISOWeek2, startOfWeek: startOfWeek3 } = dateLib;
    const startWeekFirstDate = broadcastCalendar ? startOfBroadcastWeek2(firstMonth, dateLib) : ISOWeek ? startOfISOWeek2(firstMonth) : startOfWeek3(firstMonth);
    const endWeekLastDate = broadcastCalendar ? endOfBroadcastWeek2(lastMonth) : ISOWeek ? endOfISOWeek2(endOfMonth3(lastMonth)) : endOfWeek3(endOfMonth3(lastMonth));
    const nOfDays = differenceInCalendarDays3(endWeekLastDate, startWeekFirstDate);
    const nOfMonths = differenceInCalendarMonths2(lastMonth, firstMonth) + 1;
    const dates = [];
    for (let i3 = 0; i3 <= nOfDays; i3++) {
      const date = addDays3(startWeekFirstDate, i3);
      if (maxDate && isAfter3(date, maxDate)) {
        break;
      }
      dates.push(date);
    }
    const nrOfDaysWithFixedWeeks = broadcastCalendar ? 35 : 42;
    const extraDates = nrOfDaysWithFixedWeeks * nOfMonths;
    if (fixedWeeks && dates.length < extraDates) {
      const daysToAdd = extraDates - dates.length;
      for (let i3 = 0; i3 < daysToAdd; i3++) {
        const date = addDays3(dates[dates.length - 1], 1);
        dates.push(date);
      }
    }
    return dates;
  }

  // node_modules/react-day-picker/dist/esm/helpers/getDays.js
  function getDays(calendarMonths) {
    const initialDays = [];
    return calendarMonths.reduce((days, month) => {
      const weekDays = month.weeks.reduce((weekDays2, week) => {
        return [...weekDays2, ...week.days];
      }, initialDays);
      return [...days, ...weekDays];
    }, initialDays);
  }

  // node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js
  function getDisplayMonths(firstDisplayedMonth, calendarEndMonth, props, dateLib) {
    const { numberOfMonths = 1 } = props;
    const months = [];
    for (let i3 = 0; i3 < numberOfMonths; i3++) {
      const month = dateLib.addMonths(firstDisplayedMonth, i3);
      if (calendarEndMonth && month > calendarEndMonth) {
        break;
      }
      months.push(month);
    }
    return months;
  }

  // node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js
  function getInitialMonth(props, dateLib) {
    const { month, defaultMonth, today = dateLib.today(), numberOfMonths = 1, endMonth, startMonth } = props;
    let initialMonth = month || defaultMonth || today;
    const { differenceInCalendarMonths: differenceInCalendarMonths2, addMonths: addMonths3, startOfMonth: startOfMonth3 } = dateLib;
    if (endMonth && differenceInCalendarMonths2(endMonth, initialMonth) < 0) {
      const offset3 = -1 * (numberOfMonths - 1);
      initialMonth = addMonths3(endMonth, offset3);
    }
    if (startMonth && differenceInCalendarMonths2(initialMonth, startMonth) < 0) {
      initialMonth = startMonth;
    }
    return startOfMonth3(initialMonth);
  }

  // node_modules/react-day-picker/dist/esm/helpers/getMonths.js
  function getMonths(displayMonths, dates, props, dateLib) {
    const { addDays: addDays3, endOfBroadcastWeek: endOfBroadcastWeek2, endOfISOWeek: endOfISOWeek2, endOfMonth: endOfMonth3, endOfWeek: endOfWeek3, getISOWeek: getISOWeek2, getWeek: getWeek2, startOfBroadcastWeek: startOfBroadcastWeek2, startOfISOWeek: startOfISOWeek2, startOfWeek: startOfWeek3 } = dateLib;
    const dayPickerMonths = displayMonths.reduce((months, month) => {
      const firstDateOfFirstWeek = props.broadcastCalendar ? startOfBroadcastWeek2(month, dateLib) : props.ISOWeek ? startOfISOWeek2(month) : startOfWeek3(month);
      const lastDateOfLastWeek = props.broadcastCalendar ? endOfBroadcastWeek2(month) : props.ISOWeek ? endOfISOWeek2(endOfMonth3(month)) : endOfWeek3(endOfMonth3(month));
      const monthDates = dates.filter((date) => {
        return date >= firstDateOfFirstWeek && date <= lastDateOfLastWeek;
      });
      const nrOfDaysWithFixedWeeks = props.broadcastCalendar ? 35 : 42;
      if (props.fixedWeeks && monthDates.length < nrOfDaysWithFixedWeeks) {
        const extraDates = dates.filter((date) => {
          const daysToAdd = nrOfDaysWithFixedWeeks - monthDates.length;
          return date > lastDateOfLastWeek && date <= addDays3(lastDateOfLastWeek, daysToAdd);
        });
        monthDates.push(...extraDates);
      }
      const weeks = monthDates.reduce((weeks2, date) => {
        const weekNumber = props.ISOWeek ? getISOWeek2(date) : getWeek2(date);
        const week = weeks2.find((week2) => week2.weekNumber === weekNumber);
        const day = new CalendarDay(date, month, dateLib);
        if (!week) {
          weeks2.push(new CalendarWeek(weekNumber, [day]));
        } else {
          week.days.push(day);
        }
        return weeks2;
      }, []);
      const dayPickerMonth = new CalendarMonth(month, weeks);
      months.push(dayPickerMonth);
      return months;
    }, []);
    if (!props.reverseMonths) {
      return dayPickerMonths;
    } else {
      return dayPickerMonths.reverse();
    }
  }

  // node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js
  function getNavMonths(props, dateLib) {
    let { startMonth, endMonth } = props;
    const { startOfYear: startOfYear2, startOfDay: startOfDay3, startOfMonth: startOfMonth3, endOfMonth: endOfMonth3, addYears: addYears3, endOfYear: endOfYear2, newDate, today } = dateLib;
    const { fromYear, toYear, fromMonth, toMonth } = props;
    if (!startMonth && fromMonth) {
      startMonth = fromMonth;
    }
    if (!startMonth && fromYear) {
      startMonth = dateLib.newDate(fromYear, 0, 1);
    }
    if (!endMonth && toMonth) {
      endMonth = toMonth;
    }
    if (!endMonth && toYear) {
      endMonth = newDate(toYear, 11, 31);
    }
    const hasYearDropdown = props.captionLayout === "dropdown" || props.captionLayout === "dropdown-years";
    if (startMonth) {
      startMonth = startOfMonth3(startMonth);
    } else if (fromYear) {
      startMonth = newDate(fromYear, 0, 1);
    } else if (!startMonth && hasYearDropdown) {
      startMonth = startOfYear2(addYears3(props.today ?? today(), -100));
    }
    if (endMonth) {
      endMonth = endOfMonth3(endMonth);
    } else if (toYear) {
      endMonth = newDate(toYear, 11, 31);
    } else if (!endMonth && hasYearDropdown) {
      endMonth = endOfYear2(props.today ?? today());
    }
    return [
      startMonth ? startOfDay3(startMonth) : startMonth,
      endMonth ? startOfDay3(endMonth) : endMonth
    ];
  }

  // node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js
  function getNextMonth(firstDisplayedMonth, calendarEndMonth, options2, dateLib) {
    if (options2.disableNavigation) {
      return void 0;
    }
    const { pagedNavigation, numberOfMonths = 1 } = options2;
    const { startOfMonth: startOfMonth3, addMonths: addMonths3, differenceInCalendarMonths: differenceInCalendarMonths2 } = dateLib;
    const offset3 = pagedNavigation ? numberOfMonths : 1;
    const month = startOfMonth3(firstDisplayedMonth);
    if (!calendarEndMonth) {
      return addMonths3(month, offset3);
    }
    const monthsDiff = differenceInCalendarMonths2(calendarEndMonth, firstDisplayedMonth);
    if (monthsDiff < numberOfMonths) {
      return void 0;
    }
    return addMonths3(month, offset3);
  }

  // node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js
  function getPreviousMonth(firstDisplayedMonth, calendarStartMonth, options2, dateLib) {
    if (options2.disableNavigation) {
      return void 0;
    }
    const { pagedNavigation, numberOfMonths } = options2;
    const { startOfMonth: startOfMonth3, addMonths: addMonths3, differenceInCalendarMonths: differenceInCalendarMonths2 } = dateLib;
    const offset3 = pagedNavigation ? numberOfMonths ?? 1 : 1;
    const month = startOfMonth3(firstDisplayedMonth);
    if (!calendarStartMonth) {
      return addMonths3(month, -offset3);
    }
    const monthsDiff = differenceInCalendarMonths2(month, calendarStartMonth);
    if (monthsDiff <= 0) {
      return void 0;
    }
    return addMonths3(month, -offset3);
  }

  // node_modules/react-day-picker/dist/esm/helpers/getWeeks.js
  function getWeeks(months) {
    const initialWeeks = [];
    return months.reduce((weeks, month) => {
      return [...weeks, ...month.weeks];
    }, initialWeeks);
  }

  // node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js
  var import_react160 = __toESM(require_react(), 1);
  function useControlledValue2(defaultValue2, controlledValue) {
    const [uncontrolledValue, setValue] = (0, import_react160.useState)(defaultValue2);
    const value = controlledValue === void 0 ? uncontrolledValue : controlledValue;
    return [value, setValue];
  }

  // node_modules/react-day-picker/dist/esm/useCalendar.js
  function useCalendar(props, dateLib) {
    const [navStart, navEnd] = getNavMonths(props, dateLib);
    const { startOfMonth: startOfMonth3, endOfMonth: endOfMonth3 } = dateLib;
    const initialMonth = getInitialMonth(props, dateLib);
    const [firstMonth, setFirstMonth] = useControlledValue2(
      initialMonth,
      // initialMonth is always computed from props.month if provided
      props.month ? initialMonth : void 0
    );
    (0, import_react161.useEffect)(() => {
      const newInitialMonth = getInitialMonth(props, dateLib);
      setFirstMonth(newInitialMonth);
    }, [props.timeZone]);
    const displayMonths = getDisplayMonths(firstMonth, navEnd, props, dateLib);
    const dates = getDates(displayMonths, props.endMonth ? endOfMonth3(props.endMonth) : void 0, props, dateLib);
    const months = getMonths(displayMonths, dates, props, dateLib);
    const weeks = getWeeks(months);
    const days = getDays(months);
    const previousMonth = getPreviousMonth(firstMonth, navStart, props, dateLib);
    const nextMonth = getNextMonth(firstMonth, navEnd, props, dateLib);
    const { disableNavigation, onMonthChange } = props;
    const isDayInCalendar = (day) => weeks.some((week) => week.days.some((d3) => d3.isEqualTo(day)));
    const goToMonth = (date) => {
      if (disableNavigation) {
        return;
      }
      let newMonth = startOfMonth3(date);
      if (navStart && newMonth < startOfMonth3(navStart)) {
        newMonth = startOfMonth3(navStart);
      }
      if (navEnd && newMonth > startOfMonth3(navEnd)) {
        newMonth = startOfMonth3(navEnd);
      }
      setFirstMonth(newMonth);
      onMonthChange?.(newMonth);
    };
    const goToDay = (day) => {
      if (isDayInCalendar(day)) {
        return;
      }
      goToMonth(day.date);
    };
    const calendar = {
      months,
      weeks,
      days,
      navStart,
      navEnd,
      previousMonth,
      nextMonth,
      goToMonth,
      goToDay
    };
    return calendar;
  }

  // node_modules/react-day-picker/dist/esm/useFocus.js
  var import_react162 = __toESM(require_react(), 1);

  // node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js
  var FocusTargetPriority;
  (function(FocusTargetPriority2) {
    FocusTargetPriority2[FocusTargetPriority2["Today"] = 0] = "Today";
    FocusTargetPriority2[FocusTargetPriority2["Selected"] = 1] = "Selected";
    FocusTargetPriority2[FocusTargetPriority2["LastFocused"] = 2] = "LastFocused";
    FocusTargetPriority2[FocusTargetPriority2["FocusedModifier"] = 3] = "FocusedModifier";
  })(FocusTargetPriority || (FocusTargetPriority = {}));
  function isFocusableDay(modifiers) {
    return !modifiers[DayFlag.disabled] && !modifiers[DayFlag.hidden] && !modifiers[DayFlag.outside];
  }
  function calculateFocusTarget(days, getModifiers, isSelected2, lastFocused) {
    let focusTarget;
    let foundFocusTargetPriority = -1;
    for (const day of days) {
      const modifiers = getModifiers(day);
      if (isFocusableDay(modifiers)) {
        if (modifiers[DayFlag.focused] && foundFocusTargetPriority < FocusTargetPriority.FocusedModifier) {
          focusTarget = day;
          foundFocusTargetPriority = FocusTargetPriority.FocusedModifier;
        } else if (lastFocused?.isEqualTo(day) && foundFocusTargetPriority < FocusTargetPriority.LastFocused) {
          focusTarget = day;
          foundFocusTargetPriority = FocusTargetPriority.LastFocused;
        } else if (isSelected2(day.date) && foundFocusTargetPriority < FocusTargetPriority.Selected) {
          focusTarget = day;
          foundFocusTargetPriority = FocusTargetPriority.Selected;
        } else if (modifiers[DayFlag.today] && foundFocusTargetPriority < FocusTargetPriority.Today) {
          focusTarget = day;
          foundFocusTargetPriority = FocusTargetPriority.Today;
        }
      }
    }
    if (!focusTarget) {
      focusTarget = days.find((day) => isFocusableDay(getModifiers(day)));
    }
    return focusTarget;
  }

  // node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js
  function getFocusableDate(moveBy, moveDir, refDate, navStart, navEnd, props, dateLib) {
    const { ISOWeek, broadcastCalendar } = props;
    const { addDays: addDays3, addMonths: addMonths3, addWeeks: addWeeks3, addYears: addYears3, endOfBroadcastWeek: endOfBroadcastWeek2, endOfISOWeek: endOfISOWeek2, endOfWeek: endOfWeek3, max: max3, min: min3, startOfBroadcastWeek: startOfBroadcastWeek2, startOfISOWeek: startOfISOWeek2, startOfWeek: startOfWeek3 } = dateLib;
    const moveFns = {
      day: addDays3,
      week: addWeeks3,
      month: addMonths3,
      year: addYears3,
      startOfWeek: (date) => broadcastCalendar ? startOfBroadcastWeek2(date, dateLib) : ISOWeek ? startOfISOWeek2(date) : startOfWeek3(date),
      endOfWeek: (date) => broadcastCalendar ? endOfBroadcastWeek2(date) : ISOWeek ? endOfISOWeek2(date) : endOfWeek3(date)
    };
    let focusableDate = moveFns[moveBy](refDate, moveDir === "after" ? 1 : -1);
    if (moveDir === "before" && navStart) {
      focusableDate = max3([navStart, focusableDate]);
    } else if (moveDir === "after" && navEnd) {
      focusableDate = min3([navEnd, focusableDate]);
    }
    return focusableDate;
  }

  // node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js
  function getNextFocus(moveBy, moveDir, refDay, calendarStartMonth, calendarEndMonth, props, dateLib, attempt = 0) {
    if (attempt > 365) {
      return void 0;
    }
    const focusableDate = getFocusableDate(moveBy, moveDir, refDay.date, calendarStartMonth, calendarEndMonth, props, dateLib);
    const isDisabled = Boolean(props.disabled && dateMatchModifiers(focusableDate, props.disabled, dateLib));
    const isHidden2 = Boolean(props.hidden && dateMatchModifiers(focusableDate, props.hidden, dateLib));
    const targetMonth = focusableDate;
    const focusDay = new CalendarDay(focusableDate, targetMonth, dateLib);
    if (!isDisabled && !isHidden2) {
      return focusDay;
    }
    return getNextFocus(moveBy, moveDir, focusDay, calendarStartMonth, calendarEndMonth, props, dateLib, attempt + 1);
  }

  // node_modules/react-day-picker/dist/esm/useFocus.js
  function useFocus(props, calendar, getModifiers, isSelected2, dateLib) {
    const { autoFocus } = props;
    const [lastFocused, setLastFocused] = (0, import_react162.useState)();
    const focusTarget = calculateFocusTarget(calendar.days, getModifiers, isSelected2 || (() => false), lastFocused);
    const [focusedDay, setFocused] = (0, import_react162.useState)(autoFocus ? focusTarget : void 0);
    const blur = () => {
      setLastFocused(focusedDay);
      setFocused(void 0);
    };
    const moveFocus = (moveBy, moveDir) => {
      if (!focusedDay)
        return;
      const nextFocus = getNextFocus(moveBy, moveDir, focusedDay, calendar.navStart, calendar.navEnd, props, dateLib);
      if (!nextFocus)
        return;
      calendar.goToDay(nextFocus);
      setFocused(nextFocus);
    };
    const isFocusTarget = (day) => {
      return Boolean(focusTarget?.isEqualTo(day));
    };
    const useFocus2 = {
      isFocusTarget,
      setFocused,
      focused: focusedDay,
      blur,
      moveFocus
    };
    return useFocus2;
  }

  // node_modules/react-day-picker/dist/esm/selection/useMulti.js
  function useMulti(props, dateLib) {
    const { selected: initiallySelected, required, onSelect } = props;
    const [internallySelected, setSelected] = useControlledValue2(initiallySelected, onSelect ? initiallySelected : void 0);
    const selected = !onSelect ? internallySelected : initiallySelected;
    const { isSameDay: isSameDay3 } = dateLib;
    const isSelected2 = (date) => {
      return selected?.some((d3) => isSameDay3(d3, date)) ?? false;
    };
    const { min: min3, max: max3 } = props;
    const select = (triggerDate, modifiers, e3) => {
      let newDates = [...selected ?? []];
      if (isSelected2(triggerDate)) {
        if (selected?.length === min3) {
          return;
        }
        if (required && selected?.length === 1) {
          return;
        }
        newDates = selected?.filter((d3) => !isSameDay3(d3, triggerDate));
      } else {
        if (selected?.length === max3) {
          newDates = [triggerDate];
        } else {
          newDates = [...newDates, triggerDate];
        }
      }
      if (!onSelect) {
        setSelected(newDates);
      }
      onSelect?.(newDates, triggerDate, modifiers, e3);
      return newDates;
    };
    return {
      selected,
      select,
      isSelected: isSelected2
    };
  }

  // node_modules/react-day-picker/dist/esm/utils/addToRange.js
  function addToRange(date, initialRange, min3 = 0, max3 = 0, required = false, dateLib = defaultDateLib) {
    const { from: from2, to } = initialRange || {};
    const { isSameDay: isSameDay3, isAfter: isAfter3, isBefore: isBefore3 } = dateLib;
    let range;
    if (!from2 && !to) {
      range = { from: date, to: min3 > 0 ? void 0 : date };
    } else if (from2 && !to) {
      if (isSameDay3(from2, date)) {
        if (required) {
          range = { from: from2, to: void 0 };
        } else {
          range = void 0;
        }
      } else if (isBefore3(date, from2)) {
        range = { from: date, to: from2 };
      } else {
        range = { from: from2, to: date };
      }
    } else if (from2 && to) {
      if (isSameDay3(from2, date) && isSameDay3(to, date)) {
        if (required) {
          range = { from: from2, to };
        } else {
          range = void 0;
        }
      } else if (isSameDay3(from2, date)) {
        range = { from: from2, to: min3 > 0 ? void 0 : date };
      } else if (isSameDay3(to, date)) {
        range = { from: date, to: min3 > 0 ? void 0 : date };
      } else if (isBefore3(date, from2)) {
        range = { from: date, to };
      } else if (isAfter3(date, from2)) {
        range = { from: from2, to: date };
      } else if (isAfter3(date, to)) {
        range = { from: from2, to: date };
      } else {
        throw new Error("Invalid range");
      }
    }
    if (range?.from && range?.to) {
      const diff = dateLib.differenceInCalendarDays(range.to, range.from);
      if (max3 > 0 && diff > max3) {
        range = { from: date, to: void 0 };
      } else if (min3 > 1 && diff < min3) {
        range = { from: date, to: void 0 };
      }
    }
    return range;
  }

  // node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js
  function rangeContainsDayOfWeek(range, dayOfWeek, dateLib = defaultDateLib) {
    const dayOfWeekArr = !Array.isArray(dayOfWeek) ? [dayOfWeek] : dayOfWeek;
    let date = range.from;
    const totalDays = dateLib.differenceInCalendarDays(range.to, range.from);
    const totalDaysLimit = Math.min(totalDays, 6);
    for (let i3 = 0; i3 <= totalDaysLimit; i3++) {
      if (dayOfWeekArr.includes(date.getDay())) {
        return true;
      }
      date = dateLib.addDays(date, 1);
    }
    return false;
  }

  // node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js
  function rangeOverlaps(rangeLeft, rangeRight, dateLib = defaultDateLib) {
    return rangeIncludesDate(rangeLeft, rangeRight.from, false, dateLib) || rangeIncludesDate(rangeLeft, rangeRight.to, false, dateLib) || rangeIncludesDate(rangeRight, rangeLeft.from, false, dateLib) || rangeIncludesDate(rangeRight, rangeLeft.to, false, dateLib);
  }

  // node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js
  function rangeContainsModifiers(range, modifiers, dateLib = defaultDateLib) {
    const matchers = Array.isArray(modifiers) ? modifiers : [modifiers];
    const nonFunctionMatchers = matchers.filter((matcher) => typeof matcher !== "function");
    const nonFunctionMatchersResult = nonFunctionMatchers.some((matcher) => {
      if (typeof matcher === "boolean")
        return matcher;
      if (dateLib.isDate(matcher)) {
        return rangeIncludesDate(range, matcher, false, dateLib);
      }
      if (isDatesArray(matcher, dateLib)) {
        return matcher.some((date) => rangeIncludesDate(range, date, false, dateLib));
      }
      if (isDateRange(matcher)) {
        if (matcher.from && matcher.to) {
          return rangeOverlaps(range, { from: matcher.from, to: matcher.to }, dateLib);
        }
        return false;
      }
      if (isDayOfWeekType(matcher)) {
        return rangeContainsDayOfWeek(range, matcher.dayOfWeek, dateLib);
      }
      if (isDateInterval(matcher)) {
        const isClosedInterval = dateLib.isAfter(matcher.before, matcher.after);
        if (isClosedInterval) {
          return rangeOverlaps(range, {
            from: dateLib.addDays(matcher.after, 1),
            to: dateLib.addDays(matcher.before, -1)
          }, dateLib);
        }
        return dateMatchModifiers(range.from, matcher, dateLib) || dateMatchModifiers(range.to, matcher, dateLib);
      }
      if (isDateAfterType(matcher) || isDateBeforeType(matcher)) {
        return dateMatchModifiers(range.from, matcher, dateLib) || dateMatchModifiers(range.to, matcher, dateLib);
      }
      return false;
    });
    if (nonFunctionMatchersResult) {
      return true;
    }
    const functionMatchers = matchers.filter((matcher) => typeof matcher === "function");
    if (functionMatchers.length) {
      let date = range.from;
      const totalDays = dateLib.differenceInCalendarDays(range.to, range.from);
      for (let i3 = 0; i3 <= totalDays; i3++) {
        if (functionMatchers.some((matcher) => matcher(date))) {
          return true;
        }
        date = dateLib.addDays(date, 1);
      }
    }
    return false;
  }

  // node_modules/react-day-picker/dist/esm/selection/useRange.js
  function useRange(props, dateLib) {
    const { disabled, excludeDisabled, selected: initiallySelected, required, onSelect } = props;
    const [internallySelected, setSelected] = useControlledValue2(initiallySelected, onSelect ? initiallySelected : void 0);
    const selected = !onSelect ? internallySelected : initiallySelected;
    const isSelected2 = (date) => selected && rangeIncludesDate(selected, date, false, dateLib);
    const select = (triggerDate, modifiers, e3) => {
      const { min: min3, max: max3 } = props;
      const newRange = triggerDate ? addToRange(triggerDate, selected, min3, max3, required, dateLib) : void 0;
      if (excludeDisabled && disabled && newRange?.from && newRange.to) {
        if (rangeContainsModifiers({ from: newRange.from, to: newRange.to }, disabled, dateLib)) {
          newRange.from = triggerDate;
          newRange.to = void 0;
        }
      }
      if (!onSelect) {
        setSelected(newRange);
      }
      onSelect?.(newRange, triggerDate, modifiers, e3);
      return newRange;
    };
    return {
      selected,
      select,
      isSelected: isSelected2
    };
  }

  // node_modules/react-day-picker/dist/esm/selection/useSingle.js
  function useSingle(props, dateLib) {
    const { selected: initiallySelected, required, onSelect } = props;
    const [internallySelected, setSelected] = useControlledValue2(initiallySelected, onSelect ? initiallySelected : void 0);
    const selected = !onSelect ? internallySelected : initiallySelected;
    const { isSameDay: isSameDay3 } = dateLib;
    const isSelected2 = (compareDate) => {
      return selected ? isSameDay3(selected, compareDate) : false;
    };
    const select = (triggerDate, modifiers, e3) => {
      let newDate = triggerDate;
      if (!required && selected && selected && isSameDay3(triggerDate, selected)) {
        newDate = void 0;
      }
      if (!onSelect) {
        setSelected(newDate);
      }
      if (required) {
        onSelect?.(newDate, triggerDate, modifiers, e3);
      } else {
        onSelect?.(newDate, triggerDate, modifiers, e3);
      }
      return newDate;
    };
    return {
      selected,
      select,
      isSelected: isSelected2
    };
  }

  // node_modules/react-day-picker/dist/esm/useSelection.js
  function useSelection(props, dateLib) {
    const single = useSingle(props, dateLib);
    const multi = useMulti(props, dateLib);
    const range = useRange(props, dateLib);
    switch (props.mode) {
      case "single":
        return single;
      case "multiple":
        return multi;
      case "range":
        return range;
      default:
        return void 0;
    }
  }

  // node_modules/react-day-picker/dist/esm/DayPicker.js
  function DayPicker(initialProps) {
    let props = initialProps;
    if (props.timeZone) {
      props = {
        ...initialProps
      };
      if (props.today) {
        props.today = new TZDate(props.today, props.timeZone);
      }
      if (props.month) {
        props.month = new TZDate(props.month, props.timeZone);
      }
      if (props.defaultMonth) {
        props.defaultMonth = new TZDate(props.defaultMonth, props.timeZone);
      }
      if (props.startMonth) {
        props.startMonth = new TZDate(props.startMonth, props.timeZone);
      }
      if (props.endMonth) {
        props.endMonth = new TZDate(props.endMonth, props.timeZone);
      }
      if (props.mode === "single" && props.selected) {
        props.selected = new TZDate(props.selected, props.timeZone);
      } else if (props.mode === "multiple" && props.selected) {
        props.selected = props.selected?.map((date) => new TZDate(date, props.timeZone));
      } else if (props.mode === "range" && props.selected) {
        props.selected = {
          from: props.selected.from ? new TZDate(props.selected.from, props.timeZone) : void 0,
          to: props.selected.to ? new TZDate(props.selected.to, props.timeZone) : void 0
        };
      }
    }
    const { components, formatters: formatters2, labels, dateLib, locale, classNames } = (0, import_react163.useMemo)(() => {
      const locale2 = { ...enUS, ...props.locale };
      const dateLib2 = new DateLib({
        locale: locale2,
        weekStartsOn: props.broadcastCalendar ? 1 : props.weekStartsOn,
        firstWeekContainsDate: props.firstWeekContainsDate,
        useAdditionalWeekYearTokens: props.useAdditionalWeekYearTokens,
        useAdditionalDayOfYearTokens: props.useAdditionalDayOfYearTokens,
        timeZone: props.timeZone,
        numerals: props.numerals
      }, props.dateLib);
      return {
        dateLib: dateLib2,
        components: getComponents(props.components),
        formatters: getFormatters(props.formatters),
        labels: { ...labels_exports, ...props.labels },
        locale: locale2,
        classNames: { ...getDefaultClassNames(), ...props.classNames }
      };
    }, [
      props.locale,
      props.broadcastCalendar,
      props.weekStartsOn,
      props.firstWeekContainsDate,
      props.useAdditionalWeekYearTokens,
      props.useAdditionalDayOfYearTokens,
      props.timeZone,
      props.numerals,
      props.dateLib,
      props.components,
      props.formatters,
      props.labels,
      props.classNames
    ]);
    const { captionLayout, mode: mode2, navLayout, numberOfMonths = 1, onDayBlur, onDayClick, onDayFocus, onDayKeyDown, onDayMouseEnter, onDayMouseLeave, onNextClick, onPrevClick, showWeekNumber, styles: styles3 } = props;
    const { formatCaption: formatCaption2, formatDay: formatDay2, formatMonthDropdown: formatMonthDropdown2, formatWeekNumber: formatWeekNumber2, formatWeekNumberHeader: formatWeekNumberHeader2, formatWeekdayName: formatWeekdayName2, formatYearDropdown: formatYearDropdown2 } = formatters2;
    const calendar = useCalendar(props, dateLib);
    const { days, months, navStart, navEnd, previousMonth, nextMonth, goToMonth } = calendar;
    const getModifiers = createGetModifiers(days, props, dateLib);
    const { isSelected: isSelected2, select, selected: selectedValue } = useSelection(props, dateLib) ?? {};
    const { blur, focused, isFocusTarget, moveFocus, setFocused } = useFocus(props, calendar, getModifiers, isSelected2 ?? (() => false), dateLib);
    const { labelDayButton: labelDayButton2, labelGridcell: labelGridcell2, labelGrid: labelGrid2, labelMonthDropdown: labelMonthDropdown2, labelNav: labelNav2, labelPrevious: labelPrevious2, labelNext: labelNext2, labelWeekday: labelWeekday2, labelWeekNumber: labelWeekNumber2, labelWeekNumberHeader: labelWeekNumberHeader2, labelYearDropdown: labelYearDropdown2 } = labels;
    const weekdays = (0, import_react163.useMemo)(() => getWeekdays(dateLib, props.ISOWeek), [dateLib, props.ISOWeek]);
    const isInteractive = mode2 !== void 0 || onDayClick !== void 0;
    const handlePreviousClick = (0, import_react163.useCallback)(() => {
      if (!previousMonth)
        return;
      goToMonth(previousMonth);
      onPrevClick?.(previousMonth);
    }, [previousMonth, goToMonth, onPrevClick]);
    const handleNextClick = (0, import_react163.useCallback)(() => {
      if (!nextMonth)
        return;
      goToMonth(nextMonth);
      onNextClick?.(nextMonth);
    }, [goToMonth, nextMonth, onNextClick]);
    const handleDayClick = (0, import_react163.useCallback)((day, m3) => (e3) => {
      e3.preventDefault();
      e3.stopPropagation();
      setFocused(day);
      select?.(day.date, m3, e3);
      onDayClick?.(day.date, m3, e3);
    }, [select, onDayClick, setFocused]);
    const handleDayFocus = (0, import_react163.useCallback)((day, m3) => (e3) => {
      setFocused(day);
      onDayFocus?.(day.date, m3, e3);
    }, [onDayFocus, setFocused]);
    const handleDayBlur = (0, import_react163.useCallback)((day, m3) => (e3) => {
      blur();
      onDayBlur?.(day.date, m3, e3);
    }, [blur, onDayBlur]);
    const handleDayKeyDown = (0, import_react163.useCallback)((day, modifiers) => (e3) => {
      const keyMap = {
        ArrowLeft: ["day", props.dir === "rtl" ? "after" : "before"],
        ArrowRight: ["day", props.dir === "rtl" ? "before" : "after"],
        ArrowDown: ["week", "after"],
        ArrowUp: ["week", "before"],
        PageUp: [e3.shiftKey ? "year" : "month", "before"],
        PageDown: [e3.shiftKey ? "year" : "month", "after"],
        Home: ["startOfWeek", "before"],
        End: ["endOfWeek", "after"]
      };
      if (keyMap[e3.key]) {
        e3.preventDefault();
        e3.stopPropagation();
        const [moveBy, moveDir] = keyMap[e3.key];
        moveFocus(moveBy, moveDir);
      }
      onDayKeyDown?.(day.date, modifiers, e3);
    }, [moveFocus, onDayKeyDown, props.dir]);
    const handleDayMouseEnter = (0, import_react163.useCallback)((day, modifiers) => (e3) => {
      onDayMouseEnter?.(day.date, modifiers, e3);
    }, [onDayMouseEnter]);
    const handleDayMouseLeave = (0, import_react163.useCallback)((day, modifiers) => (e3) => {
      onDayMouseLeave?.(day.date, modifiers, e3);
    }, [onDayMouseLeave]);
    const handleMonthChange = (0, import_react163.useCallback)((date) => (e3) => {
      const selectedMonth = Number(e3.target.value);
      const month = dateLib.setMonth(dateLib.startOfMonth(date), selectedMonth);
      goToMonth(month);
    }, [dateLib, goToMonth]);
    const handleYearChange = (0, import_react163.useCallback)((date) => (e3) => {
      const selectedYear = Number(e3.target.value);
      const month = dateLib.setYear(dateLib.startOfMonth(date), selectedYear);
      goToMonth(month);
    }, [dateLib, goToMonth]);
    const { className: className2, style: style2 } = (0, import_react163.useMemo)(() => ({
      className: [classNames[UI2.Root], props.className].filter(Boolean).join(" "),
      style: { ...styles3?.[UI2.Root], ...props.style }
    }), [classNames, props.className, props.style, styles3]);
    const dataAttributes = getDataAttributes(props);
    const rootElRef = (0, import_react163.useRef)(null);
    useAnimation(rootElRef, Boolean(props.animate), {
      classNames,
      months,
      focused,
      dateLib
    });
    const contextValue = {
      dayPickerProps: props,
      selected: selectedValue,
      select,
      isSelected: isSelected2,
      months,
      nextMonth,
      previousMonth,
      goToMonth,
      getModifiers,
      components,
      classNames,
      styles: styles3,
      labels,
      formatters: formatters2
    };
    return import_react163.default.createElement(
      dayPickerContext.Provider,
      { value: contextValue },
      import_react163.default.createElement(
        components.Root,
        { rootRef: props.animate ? rootElRef : void 0, className: className2, style: style2, dir: props.dir, id: props.id, lang: props.lang, nonce: props.nonce, title: props.title, role: props.role, "aria-label": props["aria-label"], ...dataAttributes },
        import_react163.default.createElement(
          components.Months,
          { className: classNames[UI2.Months], style: styles3?.[UI2.Months] },
          !props.hideNavigation && !navLayout && import_react163.default.createElement(components.Nav, { "data-animated-nav": props.animate ? "true" : void 0, className: classNames[UI2.Nav], style: styles3?.[UI2.Nav], "aria-label": labelNav2(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth, nextMonth }),
          months.map((calendarMonth, displayIndex) => {
            const dropdownMonths = getMonthOptions(calendarMonth.date, navStart, navEnd, formatters2, dateLib);
            const dropdownYears = getYearOptions(navStart, navEnd, formatters2, dateLib);
            return import_react163.default.createElement(
              components.Month,
              { "data-animated-month": props.animate ? "true" : void 0, className: classNames[UI2.Month], style: styles3?.[UI2.Month], key: displayIndex, displayIndex, calendarMonth },
              navLayout === "around" && !props.hideNavigation && displayIndex === 0 && import_react163.default.createElement(
                components.PreviousMonthButton,
                { type: "button", className: classNames[UI2.PreviousMonthButton], tabIndex: previousMonth ? void 0 : -1, "aria-disabled": previousMonth ? void 0 : true, "aria-label": labelPrevious2(previousMonth), onClick: handlePreviousClick, "data-animated-button": props.animate ? "true" : void 0 },
                import_react163.default.createElement(components.Chevron, { disabled: previousMonth ? void 0 : true, className: classNames[UI2.Chevron], orientation: props.dir === "rtl" ? "right" : "left" })
              ),
              import_react163.default.createElement(components.MonthCaption, { "data-animated-caption": props.animate ? "true" : void 0, className: classNames[UI2.MonthCaption], style: styles3?.[UI2.MonthCaption], calendarMonth, displayIndex }, captionLayout?.startsWith("dropdown") ? import_react163.default.createElement(
                components.DropdownNav,
                { className: classNames[UI2.Dropdowns], style: styles3?.[UI2.Dropdowns] },
                captionLayout === "dropdown" || captionLayout === "dropdown-months" ? import_react163.default.createElement(components.MonthsDropdown, { className: classNames[UI2.MonthsDropdown], "aria-label": labelMonthDropdown2(), classNames, components, disabled: Boolean(props.disableNavigation), onChange: handleMonthChange(calendarMonth.date), options: dropdownMonths, style: styles3?.[UI2.Dropdown], value: dateLib.getMonth(calendarMonth.date) }) : import_react163.default.createElement("span", null, formatMonthDropdown2(calendarMonth.date, dateLib)),
                captionLayout === "dropdown" || captionLayout === "dropdown-years" ? import_react163.default.createElement(components.YearsDropdown, { className: classNames[UI2.YearsDropdown], "aria-label": labelYearDropdown2(dateLib.options), classNames, components, disabled: Boolean(props.disableNavigation), onChange: handleYearChange(calendarMonth.date), options: dropdownYears, style: styles3?.[UI2.Dropdown], value: dateLib.getYear(calendarMonth.date) }) : import_react163.default.createElement("span", null, formatYearDropdown2(calendarMonth.date, dateLib)),
                import_react163.default.createElement("span", { role: "status", "aria-live": "polite", style: {
                  border: 0,
                  clip: "rect(0 0 0 0)",
                  height: "1px",
                  margin: "-1px",
                  overflow: "hidden",
                  padding: 0,
                  position: "absolute",
                  width: "1px",
                  whiteSpace: "nowrap",
                  wordWrap: "normal"
                } }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
              ) : import_react163.default.createElement(components.CaptionLabel, { className: classNames[UI2.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))),
              navLayout === "around" && !props.hideNavigation && displayIndex === numberOfMonths - 1 && import_react163.default.createElement(
                components.NextMonthButton,
                { type: "button", className: classNames[UI2.NextMonthButton], tabIndex: nextMonth ? void 0 : -1, "aria-disabled": nextMonth ? void 0 : true, "aria-label": labelNext2(nextMonth), onClick: handleNextClick, "data-animated-button": props.animate ? "true" : void 0 },
                import_react163.default.createElement(components.Chevron, { disabled: nextMonth ? void 0 : true, className: classNames[UI2.Chevron], orientation: props.dir === "rtl" ? "left" : "right" })
              ),
              displayIndex === numberOfMonths - 1 && navLayout === "after" && !props.hideNavigation && import_react163.default.createElement(components.Nav, { "data-animated-nav": props.animate ? "true" : void 0, className: classNames[UI2.Nav], style: styles3?.[UI2.Nav], "aria-label": labelNav2(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth, nextMonth }),
              import_react163.default.createElement(
                components.MonthGrid,
                { role: "grid", "aria-multiselectable": mode2 === "multiple" || mode2 === "range", "aria-label": labelGrid2(calendarMonth.date, dateLib.options, dateLib) || void 0, className: classNames[UI2.MonthGrid], style: styles3?.[UI2.MonthGrid] },
                !props.hideWeekdays && import_react163.default.createElement(
                  components.Weekdays,
                  { "data-animated-weekdays": props.animate ? "true" : void 0, className: classNames[UI2.Weekdays], style: styles3?.[UI2.Weekdays] },
                  showWeekNumber && import_react163.default.createElement(components.WeekNumberHeader, { "aria-label": labelWeekNumberHeader2(dateLib.options), className: classNames[UI2.WeekNumberHeader], style: styles3?.[UI2.WeekNumberHeader], scope: "col" }, formatWeekNumberHeader2()),
                  weekdays.map((weekday, i3) => import_react163.default.createElement(components.Weekday, { "aria-label": labelWeekday2(weekday, dateLib.options, dateLib), className: classNames[UI2.Weekday], key: i3, style: styles3?.[UI2.Weekday], scope: "col" }, formatWeekdayName2(weekday, dateLib.options, dateLib)))
                ),
                import_react163.default.createElement(components.Weeks, { "data-animated-weeks": props.animate ? "true" : void 0, className: classNames[UI2.Weeks], style: styles3?.[UI2.Weeks] }, calendarMonth.weeks.map((week, weekIndex) => {
                  return import_react163.default.createElement(
                    components.Week,
                    { className: classNames[UI2.Week], key: week.weekNumber, style: styles3?.[UI2.Week], week },
                    showWeekNumber && import_react163.default.createElement(components.WeekNumber, { week, style: styles3?.[UI2.WeekNumber], "aria-label": labelWeekNumber2(week.weekNumber, {
                      locale
                    }), className: classNames[UI2.WeekNumber], scope: "row", role: "rowheader" }, formatWeekNumber2(week.weekNumber, dateLib)),
                    week.days.map((day) => {
                      const { date } = day;
                      const modifiers = getModifiers(day);
                      modifiers[DayFlag.focused] = !modifiers.hidden && Boolean(focused?.isEqualTo(day));
                      modifiers[SelectionState.selected] = isSelected2?.(date) || modifiers.selected;
                      if (isDateRange(selectedValue)) {
                        const { from: from2, to } = selectedValue;
                        modifiers[SelectionState.range_start] = Boolean(from2 && to && dateLib.isSameDay(date, from2));
                        modifiers[SelectionState.range_end] = Boolean(from2 && to && dateLib.isSameDay(date, to));
                        modifiers[SelectionState.range_middle] = rangeIncludesDate(selectedValue, date, true, dateLib);
                      }
                      const style3 = getStyleForModifiers(modifiers, styles3, props.modifiersStyles);
                      const className3 = getClassNamesForModifiers(modifiers, classNames, props.modifiersClassNames);
                      const ariaLabel = !isInteractive && !modifiers.hidden ? labelGridcell2(date, modifiers, dateLib.options, dateLib) : void 0;
                      return import_react163.default.createElement(components.Day, { key: `${dateLib.format(date, "yyyy-MM-dd")}_${dateLib.format(day.displayMonth, "yyyy-MM")}`, day, modifiers, className: className3.join(" "), style: style3, role: "gridcell", "aria-selected": modifiers.selected || void 0, "aria-label": ariaLabel, "data-day": dateLib.format(date, "yyyy-MM-dd"), "data-month": day.outside ? dateLib.format(date, "yyyy-MM") : void 0, "data-selected": modifiers.selected || void 0, "data-disabled": modifiers.disabled || void 0, "data-hidden": modifiers.hidden || void 0, "data-outside": day.outside || void 0, "data-focused": modifiers.focused || void 0, "data-today": modifiers.today || void 0 }, !modifiers.hidden && isInteractive ? import_react163.default.createElement(components.DayButton, { className: classNames[UI2.DayButton], style: styles3?.[UI2.DayButton], type: "button", day, modifiers, disabled: modifiers.disabled || void 0, tabIndex: isFocusTarget(day) ? 0 : -1, "aria-label": labelDayButton2(date, modifiers, dateLib.options, dateLib), onClick: handleDayClick(day, modifiers), onBlur: handleDayBlur(day, modifiers), onFocus: handleDayFocus(day, modifiers), onKeyDown: handleDayKeyDown(day, modifiers), onMouseEnter: handleDayMouseEnter(day, modifiers), onMouseLeave: handleDayMouseLeave(day, modifiers) }, formatDay2(date, dateLib.options, dateLib)) : !modifiers.hidden && formatDay2(day.date, dateLib.options, dateLib));
                    })
                  );
                }))
              )
            );
          })
        ),
        props.footer && import_react163.default.createElement(components.Footer, { className: classNames[UI2.Footer], style: styles3?.[UI2.Footer], role: "status", "aria-live": "polite" }, props.footer)
      )
    );
  }

  // packages/components/build-module/calendar/date-calendar/index.mjs
  var import_element244 = __toESM(require_element(), 1);

  // packages/components/build-module/calendar/utils/day-cell.mjs
  var import_jsx_runtime318 = __toESM(require_jsx_runtime(), 1);
  var PreviewDashStartAndEnd = () => {
    return /* @__PURE__ */ (0, import_jsx_runtime318.jsx)("svg", {
      viewBox: "0 0 32 32",
      xmlns: "http://www.w3.org/2000/svg",
      fill: "none",
      stroke: "currentColor",
      strokeDasharray: "3.7677",
      strokeDashoffset: "3.2",
      strokeWidth: "1",
      children: /* @__PURE__ */ (0, import_jsx_runtime318.jsx)("path", {
        d: "M29.5,0.5 h-27 a2,2 0 0 0 -2,2 v27 a2,2 0 0 0 2,2 h27 a2,2 0 0 0 2,-2 v-27 a2,2 0 0 0 -2,-2"
      })
    });
  };
  var PreviewDashStart = () => {
    return /* @__PURE__ */ (0, import_jsx_runtime318.jsx)("svg", {
      viewBox: "0 0 32 32",
      xmlns: "http://www.w3.org/2000/svg",
      fill: "none",
      stroke: "currentColor",
      strokeDasharray: "3.84516",
      strokeDashoffset: "1.9226",
      strokeWidth: "1",
      children: /* @__PURE__ */ (0, import_jsx_runtime318.jsx)("path", {
        d: "M32,0.5 h-29.5 a2,2 0 0 0 -2,2 v27 a2,2 0 0 0 2,2 h30"
      })
    });
  };
  var PreviewDashMiddle = () => {
    return /* @__PURE__ */ (0, import_jsx_runtime318.jsxs)("svg", {
      viewBox: "0 0 32 32",
      xmlns: "http://www.w3.org/2000/svg",
      fill: "none",
      stroke: "currentColor",
      strokeDasharray: "3.9 4",
      strokeDashoffset: "2",
      strokeWidth: "1",
      children: [/* @__PURE__ */ (0, import_jsx_runtime318.jsx)("line", {
        x1: "0",
        y1: "0.5",
        x2: "100",
        y2: "0.5"
      }), /* @__PURE__ */ (0, import_jsx_runtime318.jsx)("line", {
        x1: "0",
        y1: "31.5",
        x2: "100",
        y2: "31.5"
      })]
    });
  };
  var PreviewDashEnd = () => {
    return /* @__PURE__ */ (0, import_jsx_runtime318.jsx)("svg", {
      viewBox: "0 0 32 32",
      xmlns: "http://www.w3.org/2000/svg",
      fill: "none",
      stroke: "currentColor",
      strokeDasharray: "3.84516",
      strokeDashoffset: "1.9226",
      strokeWidth: "1",
      children: /* @__PURE__ */ (0, import_jsx_runtime318.jsx)("path", {
        d: "M0,0.5 h29.5 a2,2 0 0 1 2,2 v27 a2,2 0 0 1 -2,2 h-29.5"
      })
    });
  };
  function Day4(props) {
    const {
      day,
      modifiers,
      children,
      ...tdProps
    } = props;
    let PreviewDash;
    if (modifiers.preview_start && modifiers.preview_end) {
      PreviewDash = PreviewDashStartAndEnd;
    } else if (modifiers.preview_start) {
      PreviewDash = PreviewDashStart;
    } else if (modifiers.preview_end) {
      PreviewDash = PreviewDashEnd;
    } else if (modifiers.preview) {
      PreviewDash = PreviewDashMiddle;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime318.jsxs)("td", {
      ...tdProps,
      children: [PreviewDash && /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(PreviewDash, {}), children]
    });
  }

  // packages/components/build-module/calendar/utils/constants.mjs
  var CLASSNAMES = {
    root: "components-calendar",
    day: "components-calendar__day",
    day_button: "components-calendar__day-button",
    caption_label: "components-calendar__caption-label",
    button_next: "components-calendar__button-next",
    button_previous: "components-calendar__button-previous",
    chevron: "components-calendar__chevron",
    nav: "components-calendar__nav",
    month_caption: "components-calendar__month-caption",
    months: "components-calendar__months",
    month_grid: "components-calendar__month-grid",
    weekday: "components-calendar__weekday",
    today: "components-calendar__day--today",
    selected: "components-calendar__day--selected",
    disabled: "components-calendar__day--disabled",
    hidden: "components-calendar__day--hidden",
    range_start: "components-calendar__range-start",
    range_end: "components-calendar__range-end",
    range_middle: "components-calendar__range-middle",
    weeks_before_enter: "components-calendar__weeks-before-enter",
    weeks_before_exit: "components-calendar__weeks-before-exit",
    weeks_after_enter: "components-calendar__weeks-after-enter",
    weeks_after_exit: "components-calendar__weeks-after-exit",
    caption_after_enter: "components-calendar__caption-after-enter",
    caption_after_exit: "components-calendar__caption-after-exit",
    caption_before_enter: "components-calendar__caption-before-enter",
    caption_before_exit: "components-calendar__caption-before-exit"
  };
  var MODIFIER_CLASSNAMES = {
    preview: "components-calendar__day--preview",
    preview_start: "components-calendar__day--preview-start",
    preview_end: "components-calendar__day--preview-end"
  };
  var COMMON_PROPS = {
    animate: true,
    // Only show days in the current month
    showOutsideDays: false,
    // Hide week number column
    showWeekNumber: false,
    // Show weekdays row
    hideWeekdays: false,
    // Month and year caption are not interactive
    captionLayout: "label",
    // Show a variable number of weeks depending on the month
    fixedWeeks: false,
    // Show navigation buttons
    hideNavigation: false,
    // Class names
    classNames: CLASSNAMES,
    // Default role
    role: "application",
    components: {
      Day: Day4
    }
  };

  // packages/components/build-module/calendar/utils/misc.mjs
  function clampNumberOfMonths(numberOfMonths) {
    return Math.min(3, Math.max(1, numberOfMonths));
  }

  // packages/components/build-module/calendar/utils/use-localization-props.mjs
  var import_i18n81 = __toESM(require_i18n(), 1);
  var import_element243 = __toESM(require_element(), 1);
  function isLocaleRTL(localeCode) {
    const localeObj = new Intl.Locale(localeCode);
    if ("getTextInfo" in localeObj) {
      return localeObj.getTextInfo().direction === "rtl";
    }
    return [
      "ar",
      // Arabic
      "he",
      // Hebrew
      "fa",
      // Persian (Farsi)
      "ur",
      // Urdu
      "ps",
      // Pashto
      "syr",
      // Syriac
      "dv",
      // Divehi
      "ku",
      // Kurdish (Sorani)
      "yi"
      // Yiddish
    ].includes(localeObj.language);
  }
  var useLocalizationProps = ({
    locale,
    timeZone,
    mode: mode2
  }) => {
    return (0, import_element243.useMemo)(() => {
      const monthNameFormatter = new Intl.DateTimeFormat(locale.code, {
        year: "numeric",
        month: "long",
        timeZone
      });
      const weekdayNarrowFormatter = new Intl.DateTimeFormat(locale.code, {
        weekday: "narrow",
        timeZone
      });
      const weekdayLongFormatter = new Intl.DateTimeFormat(locale.code, {
        weekday: "long",
        timeZone
      });
      const fullDateFormatter = new Intl.DateTimeFormat(locale.code, {
        weekday: "long",
        year: "numeric",
        month: "long",
        day: "numeric",
        timeZone
      });
      return {
        "aria-label": mode2 === "single" ? (0, import_i18n81.__)("Date calendar") : (0, import_i18n81.__)("Date range calendar"),
        labels: {
          /**
           * The label for the month grid.
           * @param date
           */
          labelGrid: (date) => monthNameFormatter.format(date),
          /**
           * The label for the gridcell, when the calendar is not interactive.
           * @param date
           * @param modifiers
           */
          labelGridcell: (date, modifiers) => {
            const formattedDate = fullDateFormatter.format(date);
            let label = formattedDate;
            if (modifiers?.today) {
              label = (0, import_i18n81.sprintf)(
                // translators: %s is the full date (e.g. "Monday, April 29, 2025")
                (0, import_i18n81.__)("Today, %s"),
                formattedDate
              );
            }
            return label;
          },
          /** The label for the "next month" button. */
          labelNext: () => (0, import_i18n81.__)("Go to the Next Month"),
          /** The label for the "previous month" button. */
          labelPrevious: () => (0, import_i18n81.__)("Go to the Previous Month"),
          /**
           * The label for the day button.
           * @param date
           * @param modifiers
           */
          labelDayButton: (date, modifiers) => {
            const formattedDate = fullDateFormatter.format(date);
            let label = formattedDate;
            if (modifiers?.today) {
              label = (0, import_i18n81.sprintf)(
                // translators: %s is the full date (e.g. "Monday, April 29, 2025")
                (0, import_i18n81.__)("Today, %s"),
                formattedDate
              );
            }
            if (modifiers?.selected) {
              label = (0, import_i18n81.sprintf)(
                // translators: %s is the full date (e.g. "Monday, April 29, 2025")
                (0, import_i18n81.__)("%s, selected"),
                formattedDate
              );
            }
            return label;
          },
          /**
           * The label for the weekday.
           * @param date
           */
          labelWeekday: (date) => weekdayLongFormatter.format(date)
        },
        locale,
        dir: isLocaleRTL(locale.code) ? "rtl" : "ltr",
        formatters: {
          formatWeekdayName: (date) => {
            return weekdayNarrowFormatter.format(date);
          },
          formatCaption: (date) => {
            return monthNameFormatter.format(date);
          }
        },
        timeZone
      };
    }, [locale, timeZone, mode2]);
  };

  // packages/components/build-module/calendar/date-calendar/index.mjs
  var import_jsx_runtime319 = __toESM(require_jsx_runtime(), 1);
  var DateCalendar = ({
    defaultSelected,
    selected: selectedProp,
    onSelect,
    numberOfMonths = 1,
    locale = enUS,
    timeZone,
    ...props
  }) => {
    const localizationProps = useLocalizationProps({
      locale,
      timeZone,
      mode: "single"
    });
    const onChange = (0, import_element244.useCallback)((selected2, triggerDate, modifiers, e3) => {
      onSelect?.(selected2 ?? void 0, triggerDate, modifiers, e3);
    }, [onSelect]);
    const [selected, setSelected] = useControlledValue({
      defaultValue: defaultSelected,
      value: selectedProp,
      onChange
    });
    return /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(DayPicker, {
      ...COMMON_PROPS,
      ...localizationProps,
      ...props,
      mode: "single",
      numberOfMonths: clampNumberOfMonths(numberOfMonths),
      selected: selected ?? void 0,
      onSelect: setSelected
    });
  };

  // packages/components/build-module/calendar/date-range-calendar/index.mjs
  var import_element245 = __toESM(require_element(), 1);
  var import_jsx_runtime320 = __toESM(require_jsx_runtime(), 1);
  function usePreviewRange({
    selected,
    hoveredDate,
    excludeDisabled,
    min: min3,
    max: max3,
    disabled
  }) {
    return (0, import_element245.useMemo)(() => {
      if (!hoveredDate || !selected?.from) {
        return;
      }
      let previewHighlight;
      let potentialNewRange;
      if (hoveredDate < selected.from) {
        previewHighlight = {
          from: hoveredDate,
          to: selected.from
        };
        potentialNewRange = {
          from: hoveredDate,
          to: selected.to ?? selected.from
        };
      } else if (selected.to && hoveredDate > selected.from && hoveredDate < selected.to) {
        previewHighlight = {
          from: selected.from,
          to: hoveredDate
        };
        potentialNewRange = {
          from: selected.from,
          to: hoveredDate
        };
      } else if (hoveredDate > selected.from) {
        previewHighlight = {
          from: selected.to ?? selected.from,
          to: hoveredDate
        };
        potentialNewRange = {
          from: selected.from,
          to: hoveredDate
        };
      }
      if (min3 !== void 0 && min3 > 0 && potentialNewRange && differenceInCalendarDays(potentialNewRange.to, potentialNewRange.from) < min3) {
        previewHighlight = {
          from: hoveredDate,
          to: hoveredDate
        };
      }
      if (max3 !== void 0 && max3 > 0 && potentialNewRange && differenceInCalendarDays(potentialNewRange.to, potentialNewRange.from) > max3) {
        previewHighlight = {
          from: hoveredDate,
          to: hoveredDate
        };
      }
      if (excludeDisabled && disabled && potentialNewRange && rangeContainsModifiers(potentialNewRange, disabled)) {
        previewHighlight = {
          from: hoveredDate,
          to: hoveredDate
        };
      }
      return previewHighlight;
    }, [selected, hoveredDate, excludeDisabled, min3, max3, disabled]);
  }
  var DateRangeCalendar = ({
    defaultSelected,
    selected: selectedProp,
    onSelect,
    numberOfMonths = 1,
    excludeDisabled,
    min: min3,
    max: max3,
    disabled,
    locale = enUS,
    timeZone,
    ...props
  }) => {
    const localizationProps = useLocalizationProps({
      locale,
      timeZone,
      mode: "range"
    });
    const onChange = (0, import_element245.useCallback)((selected2, triggerDate, modifiers2, e3) => {
      onSelect?.(selected2 ?? void 0, triggerDate, modifiers2, e3);
    }, [onSelect]);
    const [selected, setSelected] = useControlledValue({
      defaultValue: defaultSelected,
      value: selectedProp,
      onChange
    });
    const [hoveredDate, setHoveredDate] = (0, import_element245.useState)(void 0);
    const previewRange = usePreviewRange({
      selected,
      hoveredDate,
      excludeDisabled,
      min: min3,
      max: max3,
      disabled
    });
    const modifiers = (0, import_element245.useMemo)(() => {
      return {
        preview: previewRange,
        preview_start: previewRange?.from,
        preview_end: previewRange?.to
      };
    }, [previewRange]);
    return /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(DayPicker, {
      ...COMMON_PROPS,
      ...localizationProps,
      ...props,
      mode: "range",
      numberOfMonths: clampNumberOfMonths(numberOfMonths),
      disabled,
      excludeDisabled,
      min: min3,
      max: max3,
      selected: selected ?? void 0,
      onSelect: setSelected,
      onDayMouseEnter: (date) => setHoveredDate(date),
      onDayMouseLeave: () => setHoveredDate(void 0),
      modifiers,
      modifiersClassNames: MODIFIER_CLASSNAMES
    });
  };

  // packages/components/build-module/validated-form-controls/components/checkbox-control.mjs
  var import_compose85 = __toESM(require_compose(), 1);
  var import_element247 = __toESM(require_element(), 1);

  // packages/components/build-module/validated-form-controls/control-with-error.mjs
  var import_i18n82 = __toESM(require_i18n(), 1);
  var import_element246 = __toESM(require_element(), 1);

  // packages/components/build-module/validated-form-controls/validity-indicator.mjs
  var import_jsx_runtime321 = __toESM(require_jsx_runtime(), 1);
  function ValidityIndicator({
    id: id3,
    type,
    message: message2
  }) {
    const ICON = {
      valid: published_default,
      invalid: error_default
    };
    return /* @__PURE__ */ (0, import_jsx_runtime321.jsxs)("p", {
      id: id3,
      className: clsx_default("components-validated-control__indicator", `is-${type}`),
      children: [type === "validating" ? /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(spinner_default, {
        className: "components-validated-control__indicator-spinner"
      }) : /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(icon_default3, {
        className: "components-validated-control__indicator-icon",
        icon: ICON[type],
        size: 16,
        fill: "currentColor"
      }), message2]
    });
  }

  // packages/components/build-module/validated-form-controls/control-with-error.mjs
  var import_jsx_runtime322 = __toESM(require_jsx_runtime(), 1);
  function appendRequiredIndicator(label, required, markWhenOptional) {
    if (required && !markWhenOptional) {
      return /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)(import_jsx_runtime322.Fragment, {
        children: [label, " ", `(${(0, import_i18n82.__)("Required")})`]
      });
    }
    if (!required && markWhenOptional) {
      return /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)(import_jsx_runtime322.Fragment, {
        children: [label, " ", `(${(0, import_i18n82.__)("Optional")})`]
      });
    }
    return label;
  }
  var VALIDITY_VISIBLE_ATTRIBUTE = "data-validity-visible";
  var className = "components-validated-control";
  function UnforwardedControlWithError({
    required,
    markWhenOptional,
    customValidity,
    getValidityTarget,
    children
  }, forwardedRef) {
    const [errorMessage, setErrorMessage] = (0, import_element246.useState)();
    const [statusMessage, setStatusMessage] = (0, import_element246.useState)();
    const [showMessage, setShowMessage] = (0, import_element246.useState)(false);
    const [isTouched, setIsTouched] = (0, import_element246.useState)(false);
    (0, import_element246.useEffect)(() => {
      const validityTarget = getValidityTarget();
      const handler = () => {
        setShowMessage(true);
        validityTarget?.setAttribute(VALIDITY_VISIBLE_ATTRIBUTE, "");
      };
      validityTarget?.addEventListener("invalid", handler);
      return () => validityTarget?.removeEventListener("invalid", handler);
    }, [getValidityTarget]);
    (0, import_element246.useEffect)(() => {
      const validityTarget = getValidityTarget();
      const suppressNativePopover = (event) => {
        event.preventDefault();
        const target = event.target;
        const firstErrorInForm = Array.from(target.form?.elements ?? []).find((el) => !el.validity.valid);
        if (!target.form || firstErrorInForm === target) {
          target.focus();
        }
      };
      const radioSibilings = validityTarget?.type === "radio" && validityTarget?.name ? Array.from(validityTarget?.closest(`.${className}`)?.querySelectorAll(`input[type="radio"][name="${validityTarget?.name}"]`) ?? []).filter((sibling) => sibling !== validityTarget) : [];
      validityTarget?.addEventListener("invalid", suppressNativePopover);
      radioSibilings.forEach((sibling) => sibling.addEventListener("invalid", suppressNativePopover));
      return () => {
        validityTarget?.removeEventListener("invalid", suppressNativePopover);
        radioSibilings.forEach((sibling) => sibling.removeEventListener("invalid", suppressNativePopover));
      };
    }, [getValidityTarget]);
    (0, import_element246.useEffect)(() => {
      const validityTarget = getValidityTarget();
      if (!customValidity?.type) {
        validityTarget?.setCustomValidity("");
        setErrorMessage(validityTarget?.validationMessage);
        setStatusMessage(void 0);
        return;
      }
      switch (customValidity.type) {
        case "validating": {
          validityTarget?.setCustomValidity("");
          setErrorMessage(void 0);
          setStatusMessage({
            type: "validating",
            message: customValidity.message
          });
          break;
        }
        case "valid": {
          validityTarget?.setCustomValidity("");
          setErrorMessage(validityTarget?.validationMessage);
          setStatusMessage({
            type: "valid",
            message: customValidity.message
          });
          break;
        }
        case "invalid": {
          validityTarget?.setCustomValidity(customValidity.message ?? "");
          setErrorMessage(validityTarget?.validationMessage);
          setStatusMessage(void 0);
          break;
        }
      }
    }, [customValidity, getValidityTarget]);
    (0, import_element246.useEffect)(() => {
      if (!isTouched || showMessage) {
        return;
      }
      if (customValidity?.type === "validating") {
        const timer = setTimeout(() => {
          setShowMessage(true);
        }, 1e3);
        return () => clearTimeout(timer);
      }
      setShowMessage(true);
    }, [isTouched, customValidity?.type, showMessage]);
    const onBlur = (event) => {
      if (isTouched) {
        return;
      }
      if (!event.relatedTarget || !event.currentTarget.contains(event.relatedTarget)) {
        setIsTouched(true);
        getValidityTarget()?.setAttribute(VALIDITY_VISIBLE_ATTRIBUTE, "");
      }
    };
    const messageId = (0, import_element246.useId)();
    const message2 = (() => {
      if (errorMessage) {
        return /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(ValidityIndicator, {
          id: messageId,
          type: "invalid",
          message: errorMessage
        });
      }
      if (statusMessage?.type) {
        return /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(ValidityIndicator, {
          id: messageId,
          type: statusMessage.type,
          message: statusMessage.message
        });
      }
      return null;
    })();
    const visibleMessage = showMessage ? message2 : null;
    (0, import_element246.useEffect)(() => {
      const target = getValidityTarget();
      if (!target) {
        return;
      }
      function setDescribedBy(el, shouldAdd) {
        const ids = (el.getAttribute("aria-describedby") ?? "").split(" ").filter((id3) => id3 && id3 !== messageId);
        if (shouldAdd) {
          ids.push(messageId);
        }
        if (ids.length) {
          el.setAttribute("aria-describedby", ids.join(" "));
        } else {
          el.removeAttribute("aria-describedby");
        }
      }
      setDescribedBy(target, !!visibleMessage);
      return () => setDescribedBy(target, false);
    }, [visibleMessage, messageId, getValidityTarget]);
    return /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)("div", {
      className,
      ref: forwardedRef,
      onBlur,
      children: [(0, import_element246.cloneElement)(children, {
        label: appendRequiredIndicator(children.props.label, required, markWhenOptional),
        required
      }), /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("div", {
        "aria-live": "polite",
        children: visibleMessage
      })]
    });
  }
  var ControlWithError = (0, import_element246.forwardRef)(UnforwardedControlWithError);
  ControlWithError.displayName = "ControlWithError";

  // packages/components/build-module/validated-form-controls/components/checkbox-control.mjs
  var import_jsx_runtime323 = __toESM(require_jsx_runtime(), 1);
  var UnforwardedValidatedCheckboxControl = ({
    required,
    customValidity,
    markWhenOptional,
    ...restProps
  }, forwardedRef) => {
    const validityTargetRef = (0, import_element247.useRef)(null);
    const mergedRefs = (0, import_compose85.useMergeRefs)([forwardedRef, validityTargetRef]);
    return /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(ControlWithError, {
      required,
      markWhenOptional,
      ref: mergedRefs,
      customValidity,
      getValidityTarget: () => validityTargetRef.current?.querySelector('input[type="checkbox"]'),
      children: /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
        checkbox_control_default,
        {
          ...restProps
        }
      )
    });
  };
  var ValidatedCheckboxControl = (0, import_element247.forwardRef)(UnforwardedValidatedCheckboxControl);
  ValidatedCheckboxControl.displayName = "ValidatedCheckboxControl";

  // packages/components/build-module/validated-form-controls/components/combobox-control.mjs
  var import_compose86 = __toESM(require_compose(), 1);
  var import_element248 = __toESM(require_element(), 1);
  var import_jsx_runtime324 = __toESM(require_jsx_runtime(), 1);
  var UnforwardedValidatedComboboxControl = ({
    required,
    customValidity,
    markWhenOptional,
    ...restProps
  }, forwardedRef) => {
    const validityTargetRef = (0, import_element248.useRef)(null);
    const mergedRefs = (0, import_compose86.useMergeRefs)([forwardedRef, validityTargetRef]);
    (0, import_element248.useEffect)(() => {
      const input = validityTargetRef.current?.querySelector('input[role="combobox"]');
      if (input) {
        input.required = required ?? false;
      }
    }, [required]);
    return (
      // TODO: Bug - Missing value error is not cleared immediately on change, waits for blur.
      /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(ControlWithError, {
        required,
        markWhenOptional,
        ref: mergedRefs,
        customValidity,
        getValidityTarget: () => validityTargetRef.current?.querySelector('input[role="combobox"]'),
        children: /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(combobox_control_default, {
          __next40pxDefaultSize: true,
          ...restProps
        })
      })
    );
  };
  var ValidatedComboboxControl = (0, import_element248.forwardRef)(UnforwardedValidatedComboboxControl);
  ValidatedComboboxControl.displayName = "ValidatedComboboxControl";

  // packages/components/build-module/validated-form-controls/components/form-token-field.mjs
  var import_element249 = __toESM(require_element(), 1);
  var import_jsx_runtime325 = __toESM(require_jsx_runtime(), 1);
  var UnforwardedValidatedFormTokenField = ({
    required,
    customValidity,
    markWhenOptional,
    ...restProps
  }, forwardedRef) => {
    const validityTargetRef = (0, import_element249.useRef)(null);
    return /* @__PURE__ */ (0, import_jsx_runtime325.jsxs)("div", {
      className: "components-validated-control__wrapper-with-error-delegate",
      ref: forwardedRef,
      children: [/* @__PURE__ */ (0, import_jsx_runtime325.jsx)(ControlWithError, {
        required,
        markWhenOptional,
        customValidity,
        getValidityTarget: () => validityTargetRef.current,
        children: /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(FormTokenField, {
          __next40pxDefaultSize: true,
          ...restProps
        })
      }), /* @__PURE__ */ (0, import_jsx_runtime325.jsx)("input", {
        className: "components-validated-control__error-delegate",
        type: "text",
        ref: validityTargetRef,
        required,
        value: restProps.value && restProps.value.length > 0 ? "hasvalue" : "",
        tabIndex: -1,
        onChange: () => {
        },
        onFocus: (e3) => {
          e3.target.previousElementSibling?.querySelector('input[type="text"]')?.focus();
        }
      })]
    });
  };
  var ValidatedFormTokenField = (0, import_element249.forwardRef)(UnforwardedValidatedFormTokenField);
  ValidatedFormTokenField.displayName = "ValidatedFormTokenField";

  // packages/components/build-module/validated-form-controls/components/input-control.mjs
  var import_element250 = __toESM(require_element(), 1);
  var import_compose87 = __toESM(require_compose(), 1);
  var import_jsx_runtime326 = __toESM(require_jsx_runtime(), 1);
  var UnforwardedValidatedInputControl = ({
    required,
    customValidity,
    markWhenOptional,
    ...restProps
  }, forwardedRef) => {
    const validityTargetRef = (0, import_element250.useRef)(null);
    const mergedRefs = (0, import_compose87.useMergeRefs)([forwardedRef, validityTargetRef]);
    return /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(ControlWithError, {
      required,
      markWhenOptional,
      customValidity,
      getValidityTarget: () => validityTargetRef.current,
      children: /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(input_control_default, {
        __next40pxDefaultSize: true,
        ref: mergedRefs,
        ...restProps
      })
    });
  };
  var ValidatedInputControl = (0, import_element250.forwardRef)(UnforwardedValidatedInputControl);
  ValidatedInputControl.displayName = "ValidatedInputControl";

  // packages/components/build-module/validated-form-controls/components/number-control.mjs
  var import_element251 = __toESM(require_element(), 1);
  var import_compose88 = __toESM(require_compose(), 1);
  var import_jsx_runtime327 = __toESM(require_jsx_runtime(), 1);
  var UnforwardedValidatedNumberControl = ({
    required,
    customValidity,
    markWhenOptional,
    ...restProps
  }, forwardedRef) => {
    const validityTargetRef = (0, import_element251.useRef)(null);
    const mergedRefs = (0, import_compose88.useMergeRefs)([forwardedRef, validityTargetRef]);
    return /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(ControlWithError, {
      required,
      markWhenOptional,
      customValidity,
      getValidityTarget: () => validityTargetRef.current,
      children: /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(number_control_default, {
        __next40pxDefaultSize: true,
        ref: mergedRefs,
        ...restProps
      })
    });
  };
  var ValidatedNumberControl = (0, import_element251.forwardRef)(UnforwardedValidatedNumberControl);
  ValidatedNumberControl.displayName = "ValidatedNumberControl";

  // packages/components/build-module/validated-form-controls/components/radio-control.mjs
  var import_compose89 = __toESM(require_compose(), 1);
  var import_element252 = __toESM(require_element(), 1);
  var import_jsx_runtime328 = __toESM(require_jsx_runtime(), 1);
  var UnforwardedValidatedRadioControl = ({
    required,
    customValidity,
    markWhenOptional,
    ...restProps
  }, forwardedRef) => {
    const validityTargetRef = (0, import_element252.useRef)(null);
    const mergedRefs = (0, import_compose89.useMergeRefs)([forwardedRef, validityTargetRef]);
    return /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(ControlWithError, {
      required,
      markWhenOptional,
      ref: mergedRefs,
      customValidity,
      getValidityTarget: () => validityTargetRef.current?.querySelector('input[type="radio"]'),
      children: /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(radio_control_default, {
        ...restProps
      })
    });
  };
  var ValidatedRadioControl = (0, import_element252.forwardRef)(UnforwardedValidatedRadioControl);
  ValidatedRadioControl.displayName = "ValidatedRadioControl";

  // packages/components/build-module/validated-form-controls/components/select-control.mjs
  var import_element253 = __toESM(require_element(), 1);
  var import_compose90 = __toESM(require_compose(), 1);
  var import_jsx_runtime329 = __toESM(require_jsx_runtime(), 1);
  var UnforwardedValidatedSelectControl = ({
    required,
    customValidity,
    markWhenOptional,
    ...restProps
  }, forwardedRef) => {
    const validityTargetRef = (0, import_element253.useRef)(null);
    const mergedRefs = (0, import_compose90.useMergeRefs)([forwardedRef, validityTargetRef]);
    return /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(ControlWithError, {
      required,
      markWhenOptional,
      customValidity,
      getValidityTarget: () => validityTargetRef.current,
      children: /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(select_control_default, {
        __next40pxDefaultSize: true,
        ref: mergedRefs,
        ...restProps
      })
    });
  };
  var ValidatedSelectControl = (0, import_element253.forwardRef)(UnforwardedValidatedSelectControl);
  ValidatedSelectControl.displayName = "ValidatedSelectControl";

  // packages/components/build-module/validated-form-controls/components/text-control.mjs
  var import_compose91 = __toESM(require_compose(), 1);
  var import_element254 = __toESM(require_element(), 1);
  var import_jsx_runtime330 = __toESM(require_jsx_runtime(), 1);
  var UnforwardedValidatedTextControl = ({
    required,
    customValidity,
    markWhenOptional,
    ...restProps
  }, forwardedRef) => {
    const validityTargetRef = (0, import_element254.useRef)(null);
    const mergedRefs = (0, import_compose91.useMergeRefs)([forwardedRef, validityTargetRef]);
    return /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(ControlWithError, {
      required,
      markWhenOptional,
      customValidity,
      getValidityTarget: () => validityTargetRef.current,
      children: /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(text_control_default, {
        __next40pxDefaultSize: true,
        ref: mergedRefs,
        ...restProps
      })
    });
  };
  var ValidatedTextControl = (0, import_element254.forwardRef)(UnforwardedValidatedTextControl);
  ValidatedTextControl.displayName = "ValidatedTextControl";

  // packages/components/build-module/validated-form-controls/components/textarea-control.mjs
  var import_element255 = __toESM(require_element(), 1);
  var import_compose92 = __toESM(require_compose(), 1);
  var import_jsx_runtime331 = __toESM(require_jsx_runtime(), 1);
  var UnforwardedValidatedTextareaControl = ({
    required,
    customValidity,
    markWhenOptional,
    ...restProps
  }, forwardedRef) => {
    const validityTargetRef = (0, import_element255.useRef)(null);
    const mergedRefs = (0, import_compose92.useMergeRefs)([forwardedRef, validityTargetRef]);
    return /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(ControlWithError, {
      required,
      markWhenOptional,
      customValidity,
      getValidityTarget: () => validityTargetRef.current,
      children: /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(textarea_control_default, {
        ref: mergedRefs,
        ...restProps
      })
    });
  };
  var ValidatedTextareaControl = (0, import_element255.forwardRef)(UnforwardedValidatedTextareaControl);
  ValidatedTextareaControl.displayName = "ValidatedTextareaControl";

  // packages/components/build-module/validated-form-controls/components/toggle-control.mjs
  var import_element256 = __toESM(require_element(), 1);
  var import_compose93 = __toESM(require_compose(), 1);
  var import_jsx_runtime332 = __toESM(require_jsx_runtime(), 1);
  var UnforwardedValidatedToggleControl = ({
    required,
    customValidity,
    markWhenOptional,
    ...restProps
  }, forwardedRef) => {
    const validityTargetRef = (0, import_element256.useRef)(null);
    const mergedRefs = (0, import_compose93.useMergeRefs)([forwardedRef, validityTargetRef]);
    return /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(ControlWithError, {
      required,
      markWhenOptional,
      customValidity,
      getValidityTarget: () => validityTargetRef.current,
      children: /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(toggle_control_default, {
        ref: mergedRefs,
        required,
        ...restProps
      })
    });
  };
  var ValidatedToggleControl = (0, import_element256.forwardRef)(UnforwardedValidatedToggleControl);
  ValidatedToggleControl.displayName = "ValidatedToggleControl";

  // packages/components/build-module/validated-form-controls/components/toggle-group-control.mjs
  var import_element257 = __toESM(require_element(), 1);
  var import_jsx_runtime333 = __toESM(require_jsx_runtime(), 1);
  var UnforwardedValidatedToggleGroupControl = ({
    required,
    customValidity,
    markWhenOptional,
    ...restProps
  }, forwardedRef) => {
    const validityTargetRef = (0, import_element257.useRef)(null);
    const nameAttr = (0, import_element257.useId)();
    return /* @__PURE__ */ (0, import_jsx_runtime333.jsxs)("div", {
      className: "components-validated-control__wrapper-with-error-delegate",
      children: [/* @__PURE__ */ (0, import_jsx_runtime333.jsx)(ControlWithError, {
        required,
        markWhenOptional,
        customValidity,
        getValidityTarget: () => validityTargetRef.current,
        children: /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(component_default12, {
          __next40pxDefaultSize: true,
          ref: forwardedRef,
          ...restProps
        })
      }), /* @__PURE__ */ (0, import_jsx_runtime333.jsx)("input", {
        className: "components-validated-control__error-delegate",
        type: "radio",
        ref: validityTargetRef,
        required,
        checked: restProps.value !== void 0,
        tabIndex: -1,
        name: nameAttr,
        onChange: () => {
        },
        onFocus: (e3) => {
          e3.target.previousElementSibling?.querySelector('[data-active-item="true"]')?.focus();
        }
      })]
    });
  };
  var ValidatedToggleGroupControl = (0, import_element257.forwardRef)(UnforwardedValidatedToggleGroupControl);
  ValidatedToggleGroupControl.displayName = "ValidatedToggleGroupControl";

  // packages/components/build-module/private-apis.mjs
  var privateApis = {};
  lock(privateApis, {
    __experimentalPopoverLegacyPositionToPlacement: positionToPlacement,
    ComponentsContext,
    Tabs,
    Theme: theme_default,
    Menu: Menu3,
    kebabCase,
    withIgnoreIMEEvents,
    Badge: badge_default,
    normalizeTextString,
    DateCalendar,
    DateRangeCalendar,
    TZDate,
    useDrag,
    ValidatedInputControl,
    ValidatedCheckboxControl,
    ValidatedComboboxControl,
    ValidatedNumberControl,
    ValidatedSelectControl,
    ValidatedRadioControl,
    ValidatedTextControl,
    ValidatedTextareaControl,
    ValidatedToggleControl,
    ValidatedToggleGroupControl,
    ValidatedFormTokenField
  });
  return __toCommonJS(index_exports);
})();
/*! Bundled license information:

use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
  (**
   * @license React
   * use-sync-external-store-shim.development.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

react-is/cjs/react-is.development.js:
  (** @license React v16.13.1
   * react-is.development.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

is-plain-object/dist/is-plain-object.mjs:
  (*!
   * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
   *
   * Copyright (c) 2014-2017, Jon Schlinkert.
   * Released under the MIT License.
   *)
*/
                                                                                                                                                                                                        dist/components.min.js                                                                              0000644                 00003044371 15212563774 0011044 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).components=(()=>{var _cc=Object.create;var ig=Object.defineProperty;var qcc=Object.getOwnPropertyDescriptor;var $cc=Object.getOwnPropertyNames;var clc=Object.getPrototypeOf,llc=Object.prototype.hasOwnProperty;var y9=(c,l)=>()=>(c&&(l=c(c=0)),l);var dl=(c,l)=>()=>(l||c((l={exports:{}}).exports,l),l.exports),qG=(c,l)=>{for(var t in l)ig(c,t,{get:l[t],enumerable:!0})},V9=(c,l,t,e)=>{if(l&&typeof l=="object"||typeof l=="function")for(let d of $cc(l))!llc.call(c,d)&&d!==t&&ig(c,d,{get:()=>l[d],enumerable:!(e=qcc(l,d))||e.enumerable});return c};var u=(c,l,t)=>(t=c!=null?_cc(clc(c)):{},V9(l||!c||!c.__esModule?ig(t,"default",{value:c,enumerable:!0}):t,c)),C9=c=>V9(ig({},"__esModule",{value:!0}),c);var kc=dl((oIc,J9)=>{J9.exports=window.wp.primitives});var nc=dl((GIc,Y9)=>{Y9.exports=window.wp.i18n});var dc=dl((XIc,F9)=>{F9.exports=window.wp.compose});var Y=dl((iIc,v9)=>{v9.exports=window.wp.element});var E=dl((RIc,N9)=>{N9.exports=window.React});var V=dl((OIc,j9)=>{j9.exports=window.ReactJSXRuntime});var HF=dl(ZF=>{"use strict";var oa=E();function Ylc(c,l){return c===l&&(c!==0||1/c===1/l)||c!==c&&l!==l}var Flc=typeof Object.is=="function"?Object.is:Ylc,vlc=oa.useState,Nlc=oa.useEffect,flc=oa.useLayoutEffect,Slc=oa.useDebugValue;function klc(c,l){var t=l(),e=vlc({inst:{value:t,getSnapshot:l}}),d=e[0].inst,b=e[1];return flc(function(){d.value=t,d.getSnapshot=l,Yy(d)&&b({inst:d})},[c,t,l]),Nlc(function(){return Yy(d)&&b({inst:d}),c(function(){Yy(d)&&b({inst:d})})},[c]),Slc(t),t}function Yy(c){var l=c.getSnapshot;c=c.value;try{var t=l();return!Flc(c,t)}catch{return!0}}function zlc(c,l){return l()}var Alc=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?zlc:klc;ZF.useSyncExternalStore=oa.useSyncExternalStore!==void 0?oa.useSyncExternalStore:Alc});var IF=dl((AWc,RF)=>{"use strict";RF.exports=HF()});var ua=dl((zpc,kF)=>{kF.exports=window.ReactDOM});var ml=dl((VNc,Cf)=>{Cf.exports=window.wp.deprecated});function MH(c){var l=Object.create(null);return function(t){return l[t]===void 0&&(l[t]=c(t)),l[t]}}var PH=y9(()=>{});var Sk={};qG(Sk,{default:()=>BV});var rnc,BV,yV=y9(()=>{PH();rnc=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,BV=MH(function(c){return rnc.test(c)||c.charCodeAt(0)===111&&c.charCodeAt(1)===110&&c.charCodeAt(2)<91})});var Bz=dl(il=>{"use strict";var xt=typeof Symbol=="function"&&Symbol.for,NV=xt?Symbol.for("react.element"):60103,fV=xt?Symbol.for("react.portal"):60106,iR=xt?Symbol.for("react.fragment"):60107,aR=xt?Symbol.for("react.strict_mode"):60108,uR=xt?Symbol.for("react.profiler"):60114,mR=xt?Symbol.for("react.provider"):60109,xR=xt?Symbol.for("react.context"):60110,SV=xt?Symbol.for("react.async_mode"):60111,sR=xt?Symbol.for("react.concurrent_mode"):60111,rR=xt?Symbol.for("react.forward_ref"):60112,gR=xt?Symbol.for("react.suspense"):60113,Snc=xt?Symbol.for("react.suspense_list"):60120,ZR=xt?Symbol.for("react.memo"):60115,HR=xt?Symbol.for("react.lazy"):60116,knc=xt?Symbol.for("react.block"):60121,znc=xt?Symbol.for("react.fundamental"):60117,Anc=xt?Symbol.for("react.responder"):60118,Onc=xt?Symbol.for("react.scope"):60119;function _e(c){if(typeof c=="object"&&c!==null){var l=c.$$typeof;switch(l){case NV:switch(c=c.type,c){case SV:case sR:case iR:case uR:case aR:case gR:return c;default:switch(c=c&&c.$$typeof,c){case xR:case rR:case HR:case ZR:case mR:return c;default:return l}}case fV:return l}}}function pz(c){return _e(c)===sR}il.AsyncMode=SV;il.ConcurrentMode=sR;il.ContextConsumer=xR;il.ContextProvider=mR;il.Element=NV;il.ForwardRef=rR;il.Fragment=iR;il.Lazy=HR;il.Memo=ZR;il.Portal=fV;il.Profiler=uR;il.StrictMode=aR;il.Suspense=gR;il.isAsyncMode=function(c){return pz(c)||_e(c)===SV};il.isConcurrentMode=pz;il.isContextConsumer=function(c){return _e(c)===xR};il.isContextProvider=function(c){return _e(c)===mR};il.isElement=function(c){return typeof c=="object"&&c!==null&&c.$$typeof===NV};il.isForwardRef=function(c){return _e(c)===rR};il.isFragment=function(c){return _e(c)===iR};il.isLazy=function(c){return _e(c)===HR};il.isMemo=function(c){return _e(c)===ZR};il.isPortal=function(c){return _e(c)===fV};il.isProfiler=function(c){return _e(c)===uR};il.isStrictMode=function(c){return _e(c)===aR};il.isSuspense=function(c){return _e(c)===gR};il.isValidElementType=function(c){return typeof c=="string"||typeof c=="function"||c===iR||c===sR||c===uR||c===aR||c===gR||c===Snc||typeof c=="object"&&c!==null&&(c.$$typeof===HR||c.$$typeof===ZR||c.$$typeof===mR||c.$$typeof===xR||c.$$typeof===rR||c.$$typeof===znc||c.$$typeof===Anc||c.$$typeof===Onc||c.$$typeof===knc)};il.typeOf=_e});var Vz=dl((tMc,yz)=>{"use strict";yz.exports=Bz()});var Nz=dl((eMc,vz)=>{"use strict";var kV=Vz(),Qnc={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},wnc={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Tnc={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Yz={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},zV={};zV[kV.ForwardRef]=Tnc;zV[kV.Memo]=Yz;function Cz(c){return kV.isMemo(c)?Yz:zV[c.$$typeof]||Qnc}var Dnc=Object.defineProperty,Lnc=Object.getOwnPropertyNames,Jz=Object.getOwnPropertySymbols,Unc=Object.getOwnPropertyDescriptor,jnc=Object.getPrototypeOf,hz=Object.prototype;function Fz(c,l,t){if(typeof l!="string"){if(hz){var e=jnc(l);e&&e!==hz&&Fz(c,e,t)}var d=Lnc(l);Jz&&(d=d.concat(Jz(l)));for(var b=Cz(c),o=Cz(l),n=0;n<d.length;++n){var G=d[n];if(!wnc[G]&&!(t&&t[G])&&!(o&&o[G])&&!(b&&b[G])){var X=Unc(l,G);try{Dnc(c,G,X)}catch{}}}}return c}vz.exports=Fz});var yA=dl((E7c,BA)=>{"use strict";var JGc=function(l){return hGc(l)&&!YGc(l)};function hGc(c){return!!c&&typeof c=="object"}function YGc(c){var l=Object.prototype.toString.call(c);return l==="[object RegExp]"||l==="[object Date]"||NGc(c)}var FGc=typeof Symbol=="function"&&Symbol.for,vGc=FGc?Symbol.for("react.element"):60103;function NGc(c){return c.$$typeof===vGc}function fGc(c){return Array.isArray(c)?[]:{}}function rs(c,l){return l.clone!==!1&&l.isMergeableObject(c)?vu(fGc(c),c,l):c}function SGc(c,l,t){return c.concat(l).map(function(e){return rs(e,t)})}function kGc(c,l){if(!l.customMerge)return vu;var t=l.customMerge(c);return typeof t=="function"?t:vu}function zGc(c){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(c).filter(function(l){return Object.propertyIsEnumerable.call(c,l)}):[]}function WA(c){return Object.keys(c).concat(zGc(c))}function pA(c,l){try{return l in c}catch{return!1}}function AGc(c,l){return pA(c,l)&&!(Object.hasOwnProperty.call(c,l)&&Object.propertyIsEnumerable.call(c,l))}function OGc(c,l,t){var e={};return t.isMergeableObject(c)&&WA(c).forEach(function(d){e[d]=rs(c[d],t)}),WA(l).forEach(function(d){AGc(c,d)||(pA(c,d)&&t.isMergeableObject(l[d])?e[d]=kGc(d,t)(c[d],l[d],t):e[d]=rs(l[d],t))}),e}function vu(c,l,t){t=t||{},t.arrayMerge=t.arrayMerge||SGc,t.isMergeableObject=t.isMergeableObject||JGc,t.cloneUnlessOtherwiseSpecified=rs;var e=Array.isArray(l),d=Array.isArray(c),b=e===d;return b?e?t.arrayMerge(c,l,t):OGc(c,l,t):rs(l,t)}vu.all=function(l,t){if(!Array.isArray(l))throw new Error("first argument should be an array");return l.reduce(function(e,d){return vu(e,d,t)},{})};var QGc=vu;BA.exports=QGc});var VR=dl((M7c,VA)=>{"use strict";VA.exports=function c(l,t){if(l===t)return!0;if(l&&t&&typeof l=="object"&&typeof t=="object"){if(l.constructor!==t.constructor)return!1;var e,d,b;if(Array.isArray(l)){if(e=l.length,e!=t.length)return!1;for(d=e;d--!==0;)if(!c(l[d],t[d]))return!1;return!0}if(l instanceof Map&&t instanceof Map){if(l.size!==t.size)return!1;for(d of l.entries())if(!t.has(d[0]))return!1;for(d of l.entries())if(!c(d[1],t.get(d[0])))return!1;return!0}if(l instanceof Set&&t instanceof Set){if(l.size!==t.size)return!1;for(d of l.entries())if(!t.has(d[0]))return!1;return!0}if(ArrayBuffer.isView(l)&&ArrayBuffer.isView(t)){if(e=l.length,e!=t.length)return!1;for(d=e;d--!==0;)if(l[d]!==t[d])return!1;return!0}if(l.constructor===RegExp)return l.source===t.source&&l.flags===t.flags;if(l.valueOf!==Object.prototype.valueOf)return l.valueOf()===t.valueOf();if(l.toString!==Object.prototype.toString)return l.toString()===t.toString();if(b=Object.keys(l),e=b.length,e!==Object.keys(t).length)return!1;for(d=e;d--!==0;)if(!Object.prototype.hasOwnProperty.call(t,b[d]))return!1;for(d=e;d--!==0;){var o=b[d];if(!c(l[o],t[o]))return!1}return!0}return l!==l&&t!==t}});var Ge=dl((K7c,hA)=>{hA.exports=window.wp.warning});var yO=dl((DKc,BO)=>{BO.exports=(function(c){var l={};function t(e){if(l[e])return l[e].exports;var d=l[e]={exports:{},id:e,loaded:!1};return c[e].call(d.exports,d,d.exports,t),d.loaded=!0,d.exports}return t.m=c,t.c=l,t.p="",t(0)})([(function(c,l,t){c.exports=t(1)}),(function(c,l,t){"use strict";Object.defineProperty(l,"__esModule",{value:!0});var e=t(2);Object.defineProperty(l,"combineChunks",{enumerable:!0,get:function(){return e.combineChunks}}),Object.defineProperty(l,"fillInChunks",{enumerable:!0,get:function(){return e.fillInChunks}}),Object.defineProperty(l,"findAll",{enumerable:!0,get:function(){return e.findAll}}),Object.defineProperty(l,"findChunks",{enumerable:!0,get:function(){return e.findChunks}})}),(function(c,l){"use strict";Object.defineProperty(l,"__esModule",{value:!0});var t=l.findAll=function(X){var i=X.autoEscape,a=X.caseSensitive,m=a===void 0?!1:a,x=X.findChunks,s=x===void 0?d:x,r=X.sanitize,g=X.searchWords,Z=X.textToHighlight;return b({chunksToHighlight:e({chunks:s({autoEscape:i,caseSensitive:m,sanitize:r,searchWords:g,textToHighlight:Z})}),totalLength:Z?Z.length:0})},e=l.combineChunks=function(X){var i=X.chunks;return i=i.sort(function(a,m){return a.start-m.start}).reduce(function(a,m){if(a.length===0)return[m];var x=a.pop();if(m.start<=x.end){var s=Math.max(x.end,m.end);a.push({highlight:!1,start:x.start,end:s})}else a.push(x,m);return a},[]),i},d=function(X){var i=X.autoEscape,a=X.caseSensitive,m=X.sanitize,x=m===void 0?o:m,s=X.searchWords,r=X.textToHighlight;return r=x(r),s.filter(function(g){return g}).reduce(function(g,Z){Z=x(Z),i&&(Z=n(Z));for(var H=new RegExp(Z,a?"g":"gi"),R=void 0;R=H.exec(r);){var W=R.index,I=H.lastIndex;I>W&&g.push({highlight:!1,start:W,end:I}),R.index===H.lastIndex&&H.lastIndex++}return g},[])};l.findChunks=d;var b=l.fillInChunks=function(X){var i=X.chunksToHighlight,a=X.totalLength,m=[],x=function(g,Z,H){Z-g>0&&m.push({start:g,end:Z,highlight:H})};if(i.length===0)x(0,a,!1);else{var s=0;i.forEach(function(r){x(s,r.start,!1),x(r.start,r.end,!0),s=r.end}),x(s,a,!1)}return m};function o(G){return G}function n(G){return G.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}})])});var js=dl((Sqc,AI)=>{var EQ={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u1EA4:"A",\u1EAE:"A",\u1EB2:"A",\u1EB4:"A",\u1EB6:"A",\u00C6:"AE",\u1EA6:"A",\u1EB0:"A",\u0202:"A",\u1EA2:"A",\u1EA0:"A",\u1EA8:"A",\u1EAA:"A",\u1EAC:"A",\u00C7:"C",\u1E08:"C",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u1EBE:"E",\u1E16:"E",\u1EC0:"E",\u1E14:"E",\u1E1C:"E",\u0206:"E",\u1EBA:"E",\u1EBC:"E",\u1EB8:"E",\u1EC2:"E",\u1EC4:"E",\u1EC6:"E",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u1E2E:"I",\u020A:"I",\u1EC8:"I",\u1ECA:"I",\u00D0:"D",\u00D1:"N",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u1ED0:"O",\u1E4C:"O",\u1E52:"O",\u020E:"O",\u1ECE:"O",\u1ECC:"O",\u1ED4:"O",\u1ED6:"O",\u1ED8:"O",\u1EDC:"O",\u1EDE:"O",\u1EE0:"O",\u1EDA:"O",\u1EE2:"O",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u1EE6:"U",\u1EE4:"U",\u1EEC:"U",\u1EEE:"U",\u1EF0:"U",\u00DD:"Y",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u1EA5:"a",\u1EAF:"a",\u1EB3:"a",\u1EB5:"a",\u1EB7:"a",\u00E6:"ae",\u1EA7:"a",\u1EB1:"a",\u0203:"a",\u1EA3:"a",\u1EA1:"a",\u1EA9:"a",\u1EAB:"a",\u1EAD:"a",\u00E7:"c",\u1E09:"c",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u1EBF:"e",\u1E17:"e",\u1EC1:"e",\u1E15:"e",\u1E1D:"e",\u0207:"e",\u1EBB:"e",\u1EBD:"e",\u1EB9:"e",\u1EC3:"e",\u1EC5:"e",\u1EC7:"e",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u1E2F:"i",\u020B:"i",\u1EC9:"i",\u1ECB:"i",\u00F0:"d",\u00F1:"n",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u1ED1:"o",\u1E4D:"o",\u1E53:"o",\u020F:"o",\u1ECF:"o",\u1ECD:"o",\u1ED5:"o",\u1ED7:"o",\u1ED9:"o",\u1EDD:"o",\u1EDF:"o",\u1EE1:"o",\u1EDB:"o",\u1EE3:"o",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u1EE7:"u",\u1EE5:"u",\u1EED:"u",\u1EEF:"u",\u1EF1:"u",\u00FD:"y",\u00FF:"y",\u0100:"A",\u0101:"a",\u0102:"A",\u0103:"a",\u0104:"A",\u0105:"a",\u0106:"C",\u0107:"c",\u0108:"C",\u0109:"c",\u010A:"C",\u010B:"c",\u010C:"C",\u010D:"c",C\u0306:"C",c\u0306:"c",\u010E:"D",\u010F:"d",\u0110:"D",\u0111:"d",\u0112:"E",\u0113:"e",\u0114:"E",\u0115:"e",\u0116:"E",\u0117:"e",\u0118:"E",\u0119:"e",\u011A:"E",\u011B:"e",\u011C:"G",\u01F4:"G",\u011D:"g",\u01F5:"g",\u011E:"G",\u011F:"g",\u0120:"G",\u0121:"g",\u0122:"G",\u0123:"g",\u0124:"H",\u0125:"h",\u0126:"H",\u0127:"h",\u1E2A:"H",\u1E2B:"h",\u0128:"I",\u0129:"i",\u012A:"I",\u012B:"i",\u012C:"I",\u012D:"i",\u012E:"I",\u012F:"i",\u0130:"I",\u0131:"i",\u0132:"IJ",\u0133:"ij",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u1E30:"K",\u1E31:"k",K\u0306:"K",k\u0306:"k",\u0139:"L",\u013A:"l",\u013B:"L",\u013C:"l",\u013D:"L",\u013E:"l",\u013F:"L",\u0140:"l",\u0141:"l",\u0142:"l",\u1E3E:"M",\u1E3F:"m",M\u0306:"M",m\u0306:"m",\u0143:"N",\u0144:"n",\u0145:"N",\u0146:"n",\u0147:"N",\u0148:"n",\u0149:"n",N\u0306:"N",n\u0306:"n",\u014C:"O",\u014D:"o",\u014E:"O",\u014F:"o",\u0150:"O",\u0151:"o",\u0152:"OE",\u0153:"oe",P\u0306:"P",p\u0306:"p",\u0154:"R",\u0155:"r",\u0156:"R",\u0157:"r",\u0158:"R",\u0159:"r",R\u0306:"R",r\u0306:"r",\u0212:"R",\u0213:"r",\u015A:"S",\u015B:"s",\u015C:"S",\u015D:"s",\u015E:"S",\u0218:"S",\u0219:"s",\u015F:"s",\u0160:"S",\u0161:"s",\u0162:"T",\u0163:"t",\u021B:"t",\u021A:"T",\u0164:"T",\u0165:"t",\u0166:"T",\u0167:"t",T\u0306:"T",t\u0306:"t",\u0168:"U",\u0169:"u",\u016A:"U",\u016B:"u",\u016C:"U",\u016D:"u",\u016E:"U",\u016F:"u",\u0170:"U",\u0171:"u",\u0172:"U",\u0173:"u",\u0216:"U",\u0217:"u",V\u0306:"V",v\u0306:"v",\u0174:"W",\u0175:"w",\u1E82:"W",\u1E83:"w",X\u0306:"X",x\u0306:"x",\u0176:"Y",\u0177:"y",\u0178:"Y",Y\u0306:"Y",y\u0306:"y",\u0179:"Z",\u017A:"z",\u017B:"Z",\u017C:"z",\u017D:"Z",\u017E:"z",\u017F:"s",\u0192:"f",\u01A0:"O",\u01A1:"o",\u01AF:"U",\u01B0:"u",\u01CD:"A",\u01CE:"a",\u01CF:"I",\u01D0:"i",\u01D1:"O",\u01D2:"o",\u01D3:"U",\u01D4:"u",\u01D5:"U",\u01D6:"u",\u01D7:"U",\u01D8:"u",\u01D9:"U",\u01DA:"u",\u01DB:"U",\u01DC:"u",\u1EE8:"U",\u1EE9:"u",\u1E78:"U",\u1E79:"u",\u01FA:"A",\u01FB:"a",\u01FC:"AE",\u01FD:"ae",\u01FE:"O",\u01FF:"o",\u00DE:"TH",\u00FE:"th",\u1E54:"P",\u1E55:"p",\u1E64:"S",\u1E65:"s",X\u0301:"X",x\u0301:"x",\u0403:"\u0413",\u0453:"\u0433",\u040C:"\u041A",\u045C:"\u043A",A\u030B:"A",a\u030B:"a",E\u030B:"E",e\u030B:"e",I\u030B:"I",i\u030B:"i",\u01F8:"N",\u01F9:"n",\u1ED2:"O",\u1ED3:"o",\u1E50:"O",\u1E51:"o",\u1EEA:"U",\u1EEB:"u",\u1E80:"W",\u1E81:"w",\u1EF2:"Y",\u1EF3:"y",\u0200:"A",\u0201:"a",\u0204:"E",\u0205:"e",\u0208:"I",\u0209:"i",\u020C:"O",\u020D:"o",\u0210:"R",\u0211:"r",\u0214:"U",\u0215:"u",B\u030C:"B",b\u030C:"b",\u010C\u0323:"C",\u010D\u0323:"c",\u00CA\u030C:"E",\u00EA\u030C:"e",F\u030C:"F",f\u030C:"f",\u01E6:"G",\u01E7:"g",\u021E:"H",\u021F:"h",J\u030C:"J",\u01F0:"j",\u01E8:"K",\u01E9:"k",M\u030C:"M",m\u030C:"m",P\u030C:"P",p\u030C:"p",Q\u030C:"Q",q\u030C:"q",\u0158\u0329:"R",\u0159\u0329:"r",\u1E66:"S",\u1E67:"s",V\u030C:"V",v\u030C:"v",W\u030C:"W",w\u030C:"w",X\u030C:"X",x\u030C:"x",Y\u030C:"Y",y\u030C:"y",A\u0327:"A",a\u0327:"a",B\u0327:"B",b\u0327:"b",\u1E10:"D",\u1E11:"d",\u0228:"E",\u0229:"e",\u0190\u0327:"E",\u025B\u0327:"e",\u1E28:"H",\u1E29:"h",I\u0327:"I",i\u0327:"i",\u0197\u0327:"I",\u0268\u0327:"i",M\u0327:"M",m\u0327:"m",O\u0327:"O",o\u0327:"o",Q\u0327:"Q",q\u0327:"q",U\u0327:"U",u\u0327:"u",X\u0327:"X",x\u0327:"x",Z\u0327:"Z",z\u0327:"z",\u0439:"\u0438",\u0419:"\u0418",\u0451:"\u0435",\u0401:"\u0415"},MQ=Object.keys(EQ).join("|"),eac=new RegExp(MQ,"g"),dac=new RegExp(MQ,"");function bac(c){return EQ[c]}var PQ=function(c){return c.replace(eac,bac)},oac=function(c){return!!c.match(dac)};AI.exports=PQ;AI.exports.has=oac;AI.exports.remove=PQ});var WC=dl((kqc,KQ)=>{KQ.exports=window.wp.richText});var eo=dl((zqc,_Q)=>{_Q.exports=window.wp.a11y});var OI=dl((Aqc,qQ)=>{qQ.exports=window.wp.keycodes});var PI=dl((H$c,Bw)=>{Bw.exports=window.wp.isShallowEqual});var qj=dl(TJ=>{var Ri=Ri||{};Ri.stringify=(function(){var c={"visit_linear-gradient":function(l){return c.visit_gradient(l)},"visit_repeating-linear-gradient":function(l){return c.visit_gradient(l)},"visit_radial-gradient":function(l){return c.visit_gradient(l)},"visit_repeating-radial-gradient":function(l){return c.visit_gradient(l)},visit_gradient:function(l){var t=c.visit(l.orientation);return t&&(t+=", "),l.type+"("+t+c.visit(l.colorStops)+")"},visit_shape:function(l){var t=l.value,e=c.visit(l.at),d=c.visit(l.style);return d&&(t+=" "+d),e&&(t+=" at "+e),t},"visit_default-radial":function(l){var t="",e=c.visit(l.at);return e&&(t+=e),t},"visit_extent-keyword":function(l){var t=l.value,e=c.visit(l.at);return e&&(t+=" at "+e),t},"visit_position-keyword":function(l){return l.value},visit_position:function(l){return c.visit(l.value.x)+" "+c.visit(l.value.y)},"visit_%":function(l){return l.value+"%"},visit_em:function(l){return l.value+"em"},visit_px:function(l){return l.value+"px"},visit_calc:function(l){return"calc("+l.value+")"},visit_literal:function(l){return c.visit_color(l.value,l)},visit_hex:function(l){return c.visit_color("#"+l.value,l)},visit_rgb:function(l){return c.visit_color("rgb("+l.value.join(", ")+")",l)},visit_rgba:function(l){return c.visit_color("rgba("+l.value.join(", ")+")",l)},visit_hsl:function(l){return c.visit_color("hsl("+l.value[0]+", "+l.value[1]+"%, "+l.value[2]+"%)",l)},visit_hsla:function(l){return c.visit_color("hsla("+l.value[0]+", "+l.value[1]+"%, "+l.value[2]+"%, "+l.value[3]+")",l)},visit_var:function(l){return c.visit_color("var("+l.value+")",l)},visit_color:function(l,t){var e=l,d=c.visit(t.length);return d&&(e+=" "+d),e},visit_angular:function(l){return l.value+"deg"},visit_directional:function(l){return"to "+l.value},visit_array:function(l){var t="",e=l.length;return l.forEach(function(d,b){t+=c.visit(d),b<e-1&&(t+=", ")}),t},visit_object:function(l){return l.width&&l.height?c.visit(l.width)+" "+c.visit(l.height):""},visit:function(l){if(!l)return"";var t="";if(l instanceof Array)return c.visit_array(l);if(typeof l=="object"&&!l.type)return c.visit_object(l);if(l.type){var e=c["visit_"+l.type];if(e)return e(l);throw Error("Missing visitor visit_"+l.type)}else throw Error("Invalid node.")}};return function(l){return c.visit(l)}})();var Ri=Ri||{};Ri.parse=(function(){var c={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,radianValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))rad/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,varColor:/^var/i,calcValue:/^calc/i,variableName:/^(--[a-zA-Z0-9-,\s\#]+)/,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/,hslColor:/^hsl/i,hslaColor:/^hsla/i},l="";function t(j){var ec=new Error(l+": "+j);throw ec.source=l,ec}function e(){var j=d();return l.length>0&&t("Invalid input not EOF"),j}function d(){return R(b)}function b(){return o("linear-gradient",c.linearGradient,G)||o("repeating-linear-gradient",c.repeatingLinearGradient,G)||o("radial-gradient",c.radialGradient,a)||o("repeating-radial-gradient",c.repeatingRadialGradient,a)}function o(j,ec,M){return n(ec,function(oc){var Hc=M();return Hc&&(P(c.comma)||t("Missing comma before color stops")),{type:j,orientation:Hc,colorStops:R(W)}})}function n(j,ec){var M=P(j);if(M){P(c.startCall)||t("Missing (");var oc=ec(M);return P(c.endCall)||t("Missing )"),oc}}function G(){var j=X();if(j)return j;var ec=U("position-keyword",c.positionKeywords,1);return ec?{type:"directional",value:ec.value}:i()}function X(){return U("directional",c.sideOrCorner,1)}function i(){return U("angular",c.angleValue,1)||U("angular",c.radianValue,1)}function a(){var j,ec=m(),M;return ec&&(j=[],j.push(ec),M=l,P(c.comma)&&(ec=m(),ec?j.push(ec):l=M)),j}function m(){var j=x()||s();if(j)j.at=g();else{var ec=r();if(ec){j=ec;var M=g();M&&(j.at=M)}else{var oc=g();if(oc)j={type:"default-radial",at:oc};else{var Hc=Z();Hc&&(j={type:"default-radial",at:Hc})}}}return j}function x(){var j=U("shape",/^(circle)/i,0);return j&&(j.style=S()||r()),j}function s(){var j=U("shape",/^(ellipse)/i,0);return j&&(j.style=Z()||L()||r()),j}function r(){return U("extent-keyword",c.extentKeywords,1)}function g(){if(U("position",/^at/,0)){var j=Z();return j||t("Missing positioning value"),j}}function Z(){var j=H();if(j.x||j.y)return{type:"position",value:j}}function H(){return{x:L(),y:L()}}function R(j){var ec=j(),M=[];if(ec)for(M.push(ec);P(c.comma);)ec=j(),ec?M.push(ec):t("One extra comma");return M}function W(){var j=I();return j||t("Expected color definition"),j.length=L(),j}function I(){return p()||f()||J()||h()||y()||C()||B()}function B(){return U("literal",c.literalColor,0)}function p(){return U("hex",c.hexColor,1)}function y(){return n(c.rgbColor,function(){return{type:"rgb",value:R(T)}})}function h(){return n(c.rgbaColor,function(){return{type:"rgba",value:R(T)}})}function C(){return n(c.varColor,function(){return{type:"var",value:F()}})}function J(){return n(c.hslColor,function(){var j=P(c.percentageValue);j&&t("HSL hue value must be a number in degrees (0-360) or normalized (-360 to 360), not a percentage");var ec=T();P(c.comma);var M=P(c.percentageValue),oc=M?M[1]:null;P(c.comma),M=P(c.percentageValue);var Hc=M?M[1]:null;return(!oc||!Hc)&&t("Expected percentage value for saturation and lightness in HSL"),{type:"hsl",value:[ec,oc,Hc]}})}function f(){return n(c.hslaColor,function(){var j=T();P(c.comma);var ec=P(c.percentageValue),M=ec?ec[1]:null;P(c.comma),ec=P(c.percentageValue);var oc=ec?ec[1]:null;P(c.comma);var Hc=T();return(!M||!oc)&&t("Expected percentage value for saturation and lightness in HSLA"),{type:"hsla",value:[j,M,oc,Hc]}})}function k(){var j=P(c.percentageValue);return j?j[1]:null}function F(){return P(c.variableName)[1]}function T(){return P(c.number)[1]}function L(){return U("%",c.percentageValue,1)||v()||A()||S()}function v(){return U("position-keyword",c.positionKeywords,1)}function A(){return n(c.calcValue,function(){for(var j=1,ec=0;j>0&&ec<l.length;){var M=l.charAt(ec);M==="("?j++:M===")"&&j--,ec++}j>0&&t("Missing closing parenthesis in calc() expression");var oc=l.substring(0,ec-1);return bc(ec-1),{type:"calc",value:oc}})}function S(){return U("px",c.pixelValue,1)||U("em",c.emValue,1)}function U(j,ec,M){var oc=P(ec);if(oc)return{type:j,value:oc[M]}}function P(j){var ec,M;return M=/^[\n\r\t\s]+/.exec(l),M&&bc(M[0].length),ec=j.exec(l),ec&&bc(ec[0].length),ec}function bc(j){l=l.substr(j)}return function(j){return l=j.toString().trim(),l.endsWith(";")&&(l=l.slice(0,-1)),e()}})();TJ.parse=Ri.parse;TJ.stringify=Ri.stringify});var R0=dl((fal,uE)=>{uE.exports=window.wp.dom});var Rr=dl((Bxl,vM)=>{vM.exports=window.wp.date});var Eh=dl((kRl,lP)=>{lP.exports=window.wp.escapeHtml});var $P=dl(($Il,qP)=>{qP.exports=window.wp.htmlEntities});var BK=dl((vWl,_h)=>{function igc(c,l){var t=l&&l.cache?l.cache:rgc,e=l&&l.serializer?l.serializer:sgc,d=l&&l.strategy?l.strategy:ugc;return d(c,{cache:t,serializer:e})}function agc(c){return c==null||typeof c=="number"||typeof c=="boolean"}function WK(c,l,t,e){var d=agc(e)?e:t(e),b=l.get(d);return typeof b>"u"&&(b=c.call(this,e),l.set(d,b)),b}function pK(c,l,t){var e=Array.prototype.slice.call(arguments,3),d=t(e),b=l.get(d);return typeof b>"u"&&(b=c.apply(this,e),l.set(d,b)),b}function Kh(c,l,t,e,d){return t.bind(l,c,e,d)}function ugc(c,l){var t=c.length===1?WK:pK;return Kh(c,this,t,l.cache.create(),l.serializer)}function mgc(c,l){var t=pK;return Kh(c,this,t,l.cache.create(),l.serializer)}function xgc(c,l){var t=WK;return Kh(c,this,t,l.cache.create(),l.serializer)}function sgc(){return JSON.stringify(arguments)}function CB(){this.cache=Object.create(null)}CB.prototype.has=function(c){return c in this.cache};CB.prototype.get=function(c){return this.cache[c]};CB.prototype.set=function(c,l){this.cache[c]=l};var rgc={create:function(){return new CB}};_h.exports=igc;_h.exports.strategies={variadic:mgc,monadic:xgc}});var W8=dl((M5l,I8)=>{I8.exports=window.wp.hooks});var fq=dl((w1l,Nq)=>{Nq.exports=window.wp.privateApis});var dIc={};qG(dIc,{AlignmentMatrixControl:()=>c2,AnglePickerControl:()=>zI,Animate:()=>oO,Autocomplete:()=>jw,BaseControl:()=>Dc,BlockQuotation:()=>Bt.BlockQuotation,BorderBoxControl:()=>NW,BorderControl:()=>ib,BoxControl:()=>WJ,Button:()=>lc,ButtonGroup:()=>OW,Card:()=>DW,CardBody:()=>UW,CardDivider:()=>jW,CardFooter:()=>EW,CardHeader:()=>MW,CardMedia:()=>PW,CheckboxControl:()=>_W,Circle:()=>Bt.Circle,ClipboardButton:()=>Yj,ColorIndicator:()=>oo,ColorPalette:()=>IG,ColorPicker:()=>io,ComboboxControl:()=>Hp,Composite:()=>Qt,CustomGradientPicker:()=>H0,CustomSelectControl:()=>pp,Dashicon:()=>Ls,DatePicker:()=>pr,DateTimePicker:()=>n7,Disabled:()=>a7,Draggable:()=>r7,DropZone:()=>H7,DropZoneProvider:()=>I7,Dropdown:()=>no,DropdownMenu:()=>mb,DuotonePicker:()=>hh,DuotoneSwatch:()=>Fh,ExternalLink:()=>vp,Fill:()=>ju,Flex:()=>Il,FlexBlock:()=>Xe,FlexItem:()=>Ut,FocalPointPicker:()=>$7,FocusReturnProvider:()=>h8,FocusableIframe:()=>t4,FontSizePicker:()=>H4,FormFileUpload:()=>I4,FormToggle:()=>zp,FormTokenField:()=>Qp,G:()=>Bt.G,GradientPicker:()=>Xp,Guide:()=>Y4,GuidePage:()=>f4,HorizontalRule:()=>Bt.HorizontalRule,Icon:()=>cl,IconButton:()=>A4,IsolatedEventContainer:()=>u8,KeyboardShortcuts:()=>Q4,Line:()=>Bt.Line,MenuGroup:()=>fr,MenuItem:()=>Wn,MenuItemsChoice:()=>U4,Modal:()=>B0,NavigableMenu:()=>rn,Navigator:()=>VP,Notice:()=>mB,NoticeList:()=>xB,Panel:()=>NP,PanelBody:()=>SP,PanelHeader:()=>rB,PanelRow:()=>OP,Path:()=>Bt.Path,Placeholder:()=>DP,Polygon:()=>Bt.Polygon,Popover:()=>sG,ProgressBar:()=>_P,QueryControls:()=>XK,RadioControl:()=>BB,RangeControl:()=>vd,Rect:()=>Bt.Rect,ResizableBox:()=>TK,ResponsiveWrapper:()=>DK,SVG:()=>Bt.SVG,SandBox:()=>jK,ScrollLock:()=>jI,SearchControl:()=>oB,SelectControl:()=>Fd,Slot:()=>Eu,SlotFillProvider:()=>FC,Snackbar:()=>zB,SnackbarList:()=>_K,Spinner:()=>W0,TabPanel:()=>c_,TabbableContainer:()=>EJ,TextControl:()=>OB,TextHighlight:()=>G_,TextareaControl:()=>QB,TimePicker:()=>yr,Tip:()=>X_,ToggleControl:()=>wB,Toolbar:()=>iY,ToolbarButton:()=>Mr,ToolbarDropdownMenu:()=>aY,ToolbarGroup:()=>Kr,ToolbarItem:()=>Vn,Tooltip:()=>Ne,TreeSelect:()=>L0,VisuallyHidden:()=>Qc,__experimentalAlignmentMatrixControl:()=>c2,__experimentalApplyValueToSides:()=>gJ,__experimentalBorderBoxControl:()=>NW,__experimentalBorderControl:()=>ib,__experimentalBoxControl:()=>WJ,__experimentalConfirmDialog:()=>Gh,__experimentalDivider:()=>xr,__experimentalDropdownContentWrapper:()=>an,__experimentalElevation:()=>a0,__experimentalGrid:()=>mn,__experimentalHStack:()=>Uc,__experimentalHasSplitBorders:()=>ri,__experimentalHeading:()=>td,__experimentalInputControl:()=>lo,__experimentalInputControlPrefixWrapper:()=>mG,__experimentalInputControlSuffixWrapper:()=>Tu,__experimentalIsDefinedBorder:()=>xJ,__experimentalIsEmptyBorder:()=>xo,__experimentalItem:()=>r0,__experimentalItemGroup:()=>g0,__experimentalNavigation:()=>n6,__experimentalNavigationBackButton:()=>$p,__experimentalNavigationGroup:()=>u6,__experimentalNavigationItem:()=>p6,__experimentalNavigationMenu:()=>S6,__experimentalNavigatorBackButton:()=>BP,__experimentalNavigatorButton:()=>pP,__experimentalNavigatorProvider:()=>IP,__experimentalNavigatorScreen:()=>WP,__experimentalNavigatorToParentButton:()=>yP,__experimentalNumberControl:()=>Yt,__experimentalPaletteEdit:()=>YE,__experimentalParseQuantityAndUnitFromRawValue:()=>ql,__experimentalRadio:()=>uK,__experimentalRadioGroup:()=>rK,__experimentalScrollable:()=>mr,__experimentalSpacer:()=>rt,__experimentalStyleProvider:()=>Uu,__experimentalSurface:()=>pJ,__experimentalText:()=>Jt,__experimentalToggleGroupControl:()=>hd,__experimentalToggleGroupControlOption:()=>on,__experimentalToggleGroupControlOptionIcon:()=>l0,__experimentalToolbarContext:()=>Ze,__experimentalToolsPanel:()=>_B,__experimentalToolsPanelContext:()=>Di,__experimentalToolsPanelItem:()=>qB,__experimentalTreeGrid:()=>G8,__experimentalTreeGridCell:()=>RY,__experimentalTreeGridItem:()=>lg,__experimentalTreeGridRow:()=>HY,__experimentalTruncate:()=>cn,__experimentalUnitControl:()=>mo,__experimentalUseCustomUnits:()=>or,__experimentalUseNavigator:()=>AG,__experimentalUseSlot:()=>Ms,__experimentalUseSlotFills:()=>YC,__experimentalVStack:()=>al,__experimentalView:()=>ic,__experimentalZStack:()=>pY,__unstableAnimatePresence:()=>gu,__unstableComposite:()=>dh,__unstableCompositeGroup:()=>jE,__unstableCompositeItem:()=>EE,__unstableDisclosureContent:()=>Vh,__unstableGetAnimateClassName:()=>EX,__unstableMotion:()=>tG,__unstableUseAutocompleteProps:()=>Uw,__unstableUseCompositeState:()=>ME,__unstableUseNavigateRegions:()=>VY,createSlotFill:()=>Fw,navigateRegions:()=>s8,privateApis:()=>I9,useBaseControlProps:()=>uC,useNavigator:()=>AG,withConstrainedTabbing:()=>r8,withFallbackStyles:()=>R8,withFilters:()=>y8,withFocusOutside:()=>gp,withFocusReturn:()=>J8,withNotices:()=>F8,withSpokenMessages:()=>eB});var Bt=u(kc(),1);function h9(c){var l,t,e="";if(typeof c=="string"||typeof c=="number")e+=c;else if(typeof c=="object")if(Array.isArray(c)){var d=c.length;for(l=0;l<d;l++)c[l]&&(t=h9(c[l]))&&(e&&(e+=" "),e+=t)}else for(t in c)c[t]&&(e&&(e+=" "),e+=t);return e}function tlc(){for(var c,l,t=0,e="",d=arguments.length;t<d;t++)(c=arguments[t])&&(l=h9(c))&&(e&&(e+=" "),e+=l);return e}var Q=tlc;var NR=u(nc(),1),eO=u(dc(),1),dO=u(Y(),1);function $G(...c){}function ay(c,l){if(c===l)return!0;if(!c||!l||typeof c!="object"||typeof l!="object")return!1;let t=Object.keys(c),e=Object.keys(l),{length:d}=t;if(e.length!==d)return!1;for(let b of t)if(c[b]!==l[b])return!1;return!0}function gm(c,l){if(elc(c)){let t=dlc(l)?l():l;return c(t)}return c}function elc(c){return typeof c=="function"}function dlc(c){return typeof c=="function"}function Ie(c,l){return typeof Object.hasOwn=="function"?Object.hasOwn(c,l):Object.prototype.hasOwnProperty.call(c,l)}function ul(...c){return(...l)=>{for(let t of c)typeof t=="function"&&t(...l)}}function uy(c){return c.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function my(c,l){let t={...c};for(let e of l)Ie(t,e)&&delete t[e];return t}function xy(c,l){let t={};for(let e of l)Ie(c,e)&&(t[e]=c[e]);return t}function Zm(c){return c}function sc(c,l){if(!c)throw typeof l!="string"?new Error("Invariant failed"):new Error(l)}function sy(c){return Object.keys(c)}function Yb(c,...l){let t=typeof c=="function"?c(...l):c;return t==null?!1:!t}function bt(c){return c.disabled||c["aria-disabled"]===!0||c["aria-disabled"]==="true"}function Gl(c){let l={};for(let t in c)c[t]!==void 0&&(l[t]=c[t]);return l}function ac(...c){for(let l of c)if(l!==void 0)return l}var f9=u(E(),1);function Hm(c,l){typeof c=="function"?c(l):c&&(c.current=l)}function blc(c){return!c||!(0,f9.isValidElement)(c)?!1:"ref"in c.props||"ref"in c}function S9(c){return blc(c)?{...c.props}.ref||c.ref:null}function k9(c,l){let t={...c};for(let e in l){if(!Ie(l,e))continue;if(e==="className"){let b="className";t[b]=c[b]?`${c[b]} ${l[b]}`:l[b];continue}if(e==="style"){let b="style";t[b]=c[b]?{...c[b],...l[b]}:l[b];continue}let d=l[e];if(typeof d=="function"&&e.startsWith("on")){let b=c[e];if(typeof b=="function"){t[e]=(...o)=>{d(...o),b(...o)};continue}}t[e]=d}return t}var No=olc();function olc(){var c;return typeof window<"u"&&!!((c=window.document)!=null&&c.createElement)}function Ac(c){return c?"self"in c?c.document:c.ownerDocument||document:document}function Rm(c){return c?"self"in c?c.self:Ac(c).defaultView||window:self}function Te(c,l=!1){var t;let{activeElement:e}=Ac(c);if(!e?.nodeName)return null;if(Im(e)&&((t=e.contentDocument)!=null&&t.body))return Te(e.contentDocument.body,l);if(l){let d=e.getAttribute("aria-activedescendant");if(d){let b=Ac(e).getElementById(d);if(b)return b}}return e}function _c(c,l){return c===l||c.contains(l)}function Im(c){return c.tagName==="IFRAME"}function We(c){let l=c.tagName.toLowerCase();return l==="button"?!0:l==="input"&&c.type?nlc.indexOf(c.type)!==-1:!1}var nlc=["button","color","file","image","reset","submit"];function Wm(c){if(typeof c.checkVisibility=="function")return c.checkVisibility();let l=c;return l.offsetWidth>0||l.offsetHeight>0||c.getClientRects().length>0}function qt(c){try{let l=c instanceof HTMLInputElement&&c.selectionStart!==null,t=c.tagName==="TEXTAREA";return l||t||!1}catch{return!1}}function pm(c){return c.isContentEditable||qt(c)}function ry(c){if(qt(c))return c.value;if(c.isContentEditable){let l=Ac(c).createRange();return l.selectNodeContents(c),l.toString()}return""}function gy(c){let l=0,t=0;if(qt(c))l=c.selectionStart||0,t=c.selectionEnd||0;else if(c.isContentEditable){let e=Ac(c).getSelection();if(e?.rangeCount&&e.anchorNode&&_c(c,e.anchorNode)&&e.focusNode&&_c(c,e.focusNode)){let d=e.getRangeAt(0),b=d.cloneRange();b.selectNodeContents(c),b.setEnd(d.startContainer,d.startOffset),l=b.toString().length,b.setEnd(d.endContainer,d.endOffset),t=b.toString().length}}return{start:l,end:t}}function fn(c,l){let t=["dialog","menu","listbox","tree","grid"],e=c?.getAttribute("role");return e&&t.indexOf(e)!==-1?e:l}function cX(c,l){var t;let e={menu:"menuitem",listbox:"option",tree:"treeitem"},d=fn(c);return d&&(t=e[d])!=null?t:l}function ag(c){if(!c)return null;let l=t=>t==="auto"||t==="scroll";if(c.clientHeight&&c.scrollHeight>c.clientHeight){let{overflowY:t}=getComputedStyle(c);if(l(t))return c}else if(c.clientWidth&&c.scrollWidth>c.clientWidth){let{overflowX:t}=getComputedStyle(c);if(l(t))return c}return ag(c.parentElement)||document.scrollingElement||document.body}function Bm(c,l){let t=c.map((d,b)=>[b,d]),e=!1;return t.sort(([d,b],[o,n])=>{let G=l(b),X=l(n);return G===X||!G||!X?0:Glc(G,X)?(d>o&&(e=!0),-1):(d<o&&(e=!0),1)}),e?t.map(([d,b])=>b):c}function Glc(c,l){return!!(l.compareDocumentPosition(c)&Node.DOCUMENT_POSITION_PRECEDING)}function z9(){return No&&!!navigator.maxTouchPoints}function qi(){return No?/mac|iphone|ipad|ipod/i.test(navigator.platform):!1}function lX(){return No&&qi()&&/apple/i.test(navigator.vendor)}function Zy(){return No&&/firefox\//i.test(navigator.userAgent)}function Hy(){return No&&navigator.platform.startsWith("Mac")&&!z9()}function ug(c){return!!(c.currentTarget&&!_c(c.currentTarget,c.target))}function jl(c){return c.target===c.currentTarget}function mg(c){let l=c.currentTarget;if(!l)return!1;let t=qi();if(t&&!c.metaKey||!t&&!c.ctrlKey)return!1;let e=l.tagName.toLowerCase();return e==="a"||e==="button"&&l.type==="submit"||e==="input"&&l.type==="submit"}function xg(c){let l=c.currentTarget;if(!l)return!1;let t=l.tagName.toLowerCase();return c.altKey?t==="a"||t==="button"&&l.type==="submit"||t==="input"&&l.type==="submit":!1}function A9(c,l,t){let e=new Event(l,t);return c.dispatchEvent(e)}function tX(c,l){let t=new FocusEvent("blur",l),e=c.dispatchEvent(t),d={...l,bubbles:!0};return c.dispatchEvent(new FocusEvent("focusout",d)),e}function O9(c,l,t){let e=new KeyboardEvent(l,t);return c.dispatchEvent(e)}function Ry(c,l){let t=new MouseEvent("click",l);return c.dispatchEvent(t)}function Sn(c,l){let t=l||c.currentTarget,e=c.relatedTarget;return!e||!_c(t,e)}function Fb(c,l,t,e){let b=(n=>{if(e){let X=setTimeout(n,e);return()=>clearTimeout(X)}let G=requestAnimationFrame(n);return()=>cancelAnimationFrame(G)})(()=>{c.removeEventListener(l,o,!0),t()}),o=()=>{b(),t()};return c.addEventListener(l,o,{once:!0,capture:!0}),b}function Yl(c,l,t,e=window){let d=[];try{e.document.addEventListener(c,l,t);for(let o of Array.from(e.frames))d.push(Yl(c,l,t,o))}catch{}return()=>{try{e.document.removeEventListener(c,l,t)}catch{}for(let o of d)o()}}var Xlc=u(E(),1),rl=u(E(),1),Iy={...Xlc},Q9=Iy.useId,zIc=Iy.useDeferredValue,w9=Iy.useInsertionEffect,Sc=No?rl.useLayoutEffect:rl.useEffect;function ym(c){let[l]=(0,rl.useState)(c);return l}function rg(c){let l=(0,rl.useRef)(c);return Sc(()=>{l.current=c}),l}function Gc(c){let l=(0,rl.useRef)(()=>{throw new Error("Cannot call an event handler while rendering.")});return w9?w9(()=>{l.current=c}):l.current=c,(0,rl.useCallback)((...t)=>{var e;return(e=l.current)==null?void 0:e.call(l,...t)},[])}function gg(c){let[l,t]=(0,rl.useState)(null);return Sc(()=>{if(l==null||!c)return;let e=null;return c(d=>(e=d,l)),()=>{c(e)}},[l,c]),[l,t]}function yc(...c){return(0,rl.useMemo)(()=>{if(c.some(Boolean))return l=>{for(let t of c)Hm(t,l)}},c)}function bl(c){if(Q9){let e=Q9();return c||e}let[l,t]=(0,rl.useState)(c);return Sc(()=>{if(c||l)return;let e=Math.random().toString(36).slice(2,8);t(`id-${e}`)},[c,l]),c||l}function kn(c,l){let t=b=>{if(typeof b=="string")return b},[e,d]=(0,rl.useState)(()=>t(l));return Sc(()=>{let b=c&&"current"in c?c.current:c;d(b?.tagName.toLowerCase()||t(l))},[c,l]),e}function U9(c,l,t){let e=ym(t),[d,b]=(0,rl.useState)(e);return(0,rl.useEffect)(()=>{let o=c&&"current"in c?c.current:c;if(!o)return;let n=()=>{let X=o.getAttribute(l);b(X??e)},G=new MutationObserver(n);return G.observe(o,{attributeFilter:[l]}),n(),()=>G.disconnect()},[c,l,e]),d}function $t(c,l){let t=(0,rl.useRef)(!1);(0,rl.useEffect)(()=>{if(t.current)return c();t.current=!0},l),(0,rl.useEffect)(()=>()=>{t.current=!1},[])}function $i(){return(0,rl.useReducer)(()=>[],[])}function qc(c){return Gc(typeof c=="function"?c:()=>c)}function Wc(c,l,t=[]){let e=(0,rl.useCallback)(d=>(c.wrapElement&&(d=c.wrapElement(d)),l(d)),[...t,c.wrapElement]);return{...c,wrapElement:e}}function ca(c=!1,l){let[t,e]=(0,rl.useState)(null);return{portalRef:yc(e,l),portalNode:t,domReady:!c||t}}function Zg(c,l,t){let e=c.onLoadedMetadataCapture,d=(0,rl.useMemo)(()=>Object.assign(()=>{},{...e,[l]:t}),[e,l,t]);return[e?.[l],{onLoadedMetadataCapture:d}]}var T9=!1;function la(){return(0,rl.useEffect)(()=>{T9||(Yl("mousemove",alc,!0),Yl("mousedown",sg,!0),Yl("mouseup",sg,!0),Yl("keydown",sg,!0),Yl("scroll",sg,!0),T9=!0)},[]),Gc(()=>Wy)}var Wy=!1,D9=0,L9=0;function ilc(c){let l=c.movementX||c.screenX-D9,t=c.movementY||c.screenY-L9;return D9=c.screenX,L9=c.screenY,l||t||!1}function alc(c){ilc(c)&&(Wy=!0)}function sg(){Wy=!1}var ce=u(E(),1),eX=u(V(),1);function K(c){let l=ce.forwardRef((t,e)=>c({...t,ref:e}));return l.displayName=c.displayName||c.name,l}function El(c,l){return ce.memo(c,l)}function _(c,l){let{wrapElement:t,render:e,...d}=l,b=yc(l.ref,S9(e)),o;if(ce.isValidElement(e)){let n={...e.props,ref:b};o=ce.cloneElement(e,k9(d,n))}else e?o=e(d):o=(0,eX.jsx)(c,{...d});return t?t(o):o}function q(c){let l=(t={})=>c(t);return l.displayName=c.name,l}function ol(c=[],l=[]){let t=ce.createContext(void 0),e=ce.createContext(void 0),d=()=>ce.useContext(t),b=(X=!1)=>{let i=ce.useContext(e),a=d();return X?i:i||a},o=()=>{let X=ce.useContext(e),i=d();if(!(X&&X===i))return i},n=X=>c.reduceRight((i,a)=>(0,eX.jsx)(a,{...X,children:i}),(0,eX.jsx)(t.Provider,{...X}));return{context:t,scopedContext:e,useContext:d,useScopedContext:b,useProviderContext:o,ContextProvider:n,ScopedContextProvider:X=>(0,eX.jsx)(n,{...X,children:l.reduceRight((i,a)=>(0,eX.jsx)(a,{...X,children:i}),(0,eX.jsx)(e.Provider,{...X}))})}}var Vm=ol(),E9=Vm.useContext,LIc=Vm.useScopedContext,UIc=Vm.useProviderContext,M9=Vm.ContextProvider,P9=Vm.ScopedContextProvider;var py=u(E(),1),Cm=ol([M9],[P9]),Ld=Cm.useContext,PIc=Cm.useScopedContext,K9=Cm.useProviderContext,At=Cm.ContextProvider,pe=Cm.ScopedContextProvider,_9=(0,py.createContext)(void 0),Hg=(0,py.createContext)(void 0);var Jm=ol([At],[pe]),ulc=Jm.useContext,q9=Jm.useScopedContext,Rg=Jm.useProviderContext,$Ic=Jm.ContextProvider,Ig=Jm.ScopedContextProvider;var mlc={id:null};function $9(c,l,t=!1){let e=c.findIndex(d=>d.id===l);return[...c.slice(e+1),...t?[mlc]:[],...c.slice(0,e)]}function cF(c,l){return c.find(t=>l?!t.disabled&&t.id!==l:!t.disabled)}function vb(c,l){return l&&c.item(l)||null}function lF(c){let l=[];for(let t of c){let e=l.find(d=>{var b;return((b=d[0])==null?void 0:b.rowId)===t.rowId});e?e.push(t):l.push([t])}return l}function tF(c,l=!1){if(qt(c))c.setSelectionRange(l?c.value.length:0,c.value.length);else if(c.isContentEditable){let t=Ac(c).getSelection();t?.selectAllChildren(c),l&&t?.collapseToEnd()}}var By=Symbol("FOCUS_SILENTLY");function eF(c){c[By]=!0,c.focus({preventScroll:!0})}function dF(c){let l=c[By];return delete c[By],l}function dX(c,l,t){if(!l||l===t)return!1;let e=c.item(l.id);return!(!e||t&&e.element===t)}var Wg=u(E(),1),xlc="div",hm=q(function({store:l,shouldRegisterItem:t=!0,getItem:e=Zm,element:d,...b}){let o=E9();l=l||o;let n=bl(b.id),G=(0,Wg.useRef)(d);return(0,Wg.useEffect)(()=>{let X=G.current;if(!n||!X||!t)return;let i=e({id:n,element:X});return l?.renderItem(i)},[n,t,e,l]),b={...b,ref:yc(G,b.ref)},Gl(b)}),nWc=K(function(l){let t=hm(l);return _(xlc,t)});var bF=u(E(),1),pg=(0,bF.createContext)(!0);var Bg="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function slc(c){return Number.parseInt(c.getAttribute("tabindex")||"0",10)<0}function De(c){return!(!c.matches(Bg)||!Wm(c)||c.closest("[inert]"))}function ta(c){if(!De(c)||slc(c))return!1;if(!("form"in c)||!c.form||c.checked||c.type!=="radio")return!0;let l=c.form.elements.namedItem(c.name);if(!l||!("length"in l))return!0;let t=Te(c);return!t||t===c||!("form"in t)||t.form!==c.form||t.name!==c.name}function yy(c,l){let t=Array.from(c.querySelectorAll(Bg));l&&t.unshift(c);let e=t.filter(De);return e.forEach((d,b)=>{var o;if(!Im(d))return;let n=(o=d.contentDocument)==null?void 0:o.body;n&&e.splice(b,1,...yy(n))}),e}function bX(c,l,t){let e=Array.from(c.querySelectorAll(Bg)),d=e.filter(ta);return l&&ta(c)&&d.unshift(c),d.forEach((b,o)=>{var n;if(!Im(b))return;let G=(n=b.contentDocument)==null?void 0:n.body;if(!G)return;let X=bX(G,!1,t);d.splice(o,1,...X)}),!d.length&&t?e:d}function oF(c,l,t){let[e]=bX(c,l,t);return e||null}function rlc(c,l,t,e){let d=Te(c),b=yy(c,l),o=b.indexOf(d),n=b.slice(o+1);return n.find(ta)||(t?b.find(ta):null)||(e?n[0]:null)||null}function yg(c,l){return rlc(document.body,!1,c,l)}function glc(c,l,t,e){let d=Te(c),b=yy(c,l).reverse(),o=b.indexOf(d),n=b.slice(o+1);return n.find(ta)||(t?b.find(ta):null)||(e?n[0]:null)||null}function Vy(c,l){return glc(document.body,!1,c,l)}function nF(c){for(;c&&!De(c);)c=c.closest(Bg);return c||null}function oX(c){let l=Te(c);if(!l)return!1;if(l===c)return!0;let t=l.getAttribute("aria-activedescendant");return t?t===c.id:!1}function ud(c){let l=Te(c);if(!l)return!1;if(_c(c,l))return!0;let t=l.getAttribute("aria-activedescendant");return!t||!("id"in c)?!1:t===c.id?!0:!!c.querySelector(`#${CSS.escape(t)}`)}function Vg(c){!ud(c)&&De(c)&&c.focus()}function Zlc(c){var l;let t=(l=c.getAttribute("tabindex"))!=null?l:"";c.setAttribute("data-tabindex",t),c.setAttribute("tabindex","-1")}function GF(c,l){let t=bX(c,l);for(let e of t)Zlc(e)}function XF(c){let l=c.querySelectorAll("[data-tabindex]"),t=e=>{let d=e.getAttribute("data-tabindex");e.removeAttribute("data-tabindex"),d?e.setAttribute("tabindex",d):e.removeAttribute("tabindex")};c.hasAttribute("data-tabindex")&&t(c);for(let e of l)t(e)}function iF(c,l){"scrollIntoView"in c?(c.focus({preventScroll:!0}),c.scrollIntoView({block:"nearest",inline:"nearest",...l})):c.focus()}var Le=u(E(),1),Hlc="div",aF=lX(),Rlc=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"],sF=Symbol("safariFocusAncestor");function rF(c){return c?!!c[sF]:!1}function uF(c,l){c&&(c[sF]=l)}function Ilc(c){let{tagName:l,readOnly:t,type:e}=c;return l==="TEXTAREA"&&!t||l==="SELECT"&&!t?!0:l==="INPUT"&&!t?Rlc.includes(e):!!(c.isContentEditable||c.getAttribute("role")==="combobox"&&c.dataset.name)}function Wlc(c){return"labels"in c?c.labels:null}function mF(c){return c.tagName.toLowerCase()==="input"&&c.type?c.type==="radio"||c.type==="checkbox":!1}function plc(c){return c?c==="button"||c==="summary"||c==="input"||c==="select"||c==="textarea"||c==="a":!0}function Blc(c){return c?c==="button"||c==="input"||c==="select"||c==="textarea":!0}function ylc(c,l,t,e,d){return c?l?t&&!e?-1:void 0:t?d:d||0:d}function Cy(c,l){return Gc(t=>{c?.(t),!t.defaultPrevented&&l&&(t.stopPropagation(),t.preventDefault())})}var xF=!1,Jy=!0;function Vlc(c){let l=c.target;l&&"hasAttribute"in l&&(l.hasAttribute("data-focus-visible")||(Jy=!1))}function Clc(c){c.metaKey||c.ctrlKey||c.altKey||(Jy=!0)}var Ud=q(function({focusable:l=!0,accessibleWhenDisabled:t,autoFocus:e,onFocusVisible:d,...b}){let o=(0,Le.useRef)(null);(0,Le.useEffect)(()=>{l&&(xF||(Yl("mousedown",Vlc,!0),Yl("keydown",Clc,!0),xF=!0))},[l]),aF&&(0,Le.useEffect)(()=>{if(!l)return;let F=o.current;if(!F||!mF(F))return;let T=Wlc(F);if(!T)return;let L=()=>queueMicrotask(()=>F.focus());for(let v of T)v.addEventListener("mouseup",L);return()=>{for(let v of T)v.removeEventListener("mouseup",L)}},[l]);let n=l&&bt(b),G=!!n&&!t,[X,i]=(0,Le.useState)(!1);(0,Le.useEffect)(()=>{l&&G&&X&&i(!1)},[l,G,X]),(0,Le.useEffect)(()=>{if(!l||!X)return;let F=o.current;if(!F||typeof IntersectionObserver>"u")return;let T=new IntersectionObserver(()=>{De(F)||i(!1)});return T.observe(F),()=>T.disconnect()},[l,X]);let a=Cy(b.onKeyPressCapture,n),m=Cy(b.onMouseDownCapture,n),x=Cy(b.onClickCapture,n),s=b.onMouseDown,r=Gc(F=>{if(s?.(F),F.defaultPrevented||!l)return;let T=F.currentTarget;if(!aF||ug(F)||!We(T)&&!mF(T))return;let L=!1,v=()=>{L=!0},A={capture:!0,once:!0};T.addEventListener("focusin",v,A);let S=nF(T.parentElement);uF(S,!0),Fb(T,"mouseup",()=>{T.removeEventListener("focusin",v,!0),uF(S,!1),!L&&Vg(T)})}),g=(F,T)=>{if(T&&(F.currentTarget=T),!l)return;let L=F.currentTarget;L&&oX(L)&&(d?.(F),!F.defaultPrevented&&(L.dataset.focusVisible="true",i(!0)))},Z=b.onKeyDownCapture,H=Gc(F=>{if(Z?.(F),F.defaultPrevented||!l||X||F.metaKey||F.altKey||F.ctrlKey||!jl(F))return;let T=F.currentTarget;Fb(T,"focusout",()=>g(F,T))}),R=b.onFocusCapture,W=Gc(F=>{if(R?.(F),F.defaultPrevented||!l)return;if(!jl(F)){i(!1);return}let T=F.currentTarget,L=()=>g(F,T);Jy||Ilc(F.target)?Fb(F.target,"focusout",L):i(!1)}),I=b.onBlur,B=Gc(F=>{I?.(F),l&&Sn(F)&&(F.currentTarget.removeAttribute("data-focus-visible"),i(!1))}),p=(0,Le.useContext)(pg),y=Gc(F=>{l&&e&&F&&p&&queueMicrotask(()=>{oX(F)||De(F)&&F.focus()})}),h=kn(o),C=l&&plc(h),J=l&&Blc(h),f=b.style,k=(0,Le.useMemo)(()=>G?{pointerEvents:"none",...f}:f,[G,f]);return b={"data-focus-visible":l&&X||void 0,"data-autofocus":e||void 0,"aria-disabled":n||void 0,...b,ref:yc(o,y,b.ref),style:k,tabIndex:ylc(l,G,C,J,b.tabIndex),disabled:J&&G?!0:void 0,contentEditable:n?void 0:b.contentEditable,onKeyPressCapture:a,onClickCapture:x,onMouseDownCapture:m,onMouseDown:r,onKeyDownCapture:H,onFocusCapture:W,onBlur:B},Gl(b)}),WWc=K(function(l){let t=Ud(l);return _(Hlc,t)});var zn=u(E(),1),Jlc="button";function gF(c){if(!c.isTrusted)return!1;let l=c.currentTarget;return c.key==="Enter"?We(l)||l.tagName==="SUMMARY"||l.tagName==="A":c.key===" "?We(l)||l.tagName==="SUMMARY"||l.tagName==="INPUT"||l.tagName==="SELECT":!1}var hlc=Symbol("command"),nX=q(function({clickOnEnter:l=!0,clickOnSpace:t=!0,...e}){let d=(0,zn.useRef)(null),[b,o]=(0,zn.useState)(!1);(0,zn.useEffect)(()=>{d.current&&o(We(d.current))},[]);let[n,G]=(0,zn.useState)(!1),X=(0,zn.useRef)(!1),i=bt(e),[a,m]=Zg(e,hlc,!0),x=e.onKeyDown,s=Gc(Z=>{x?.(Z);let H=Z.currentTarget;if(Z.defaultPrevented||a||i||!jl(Z)||qt(H)||H.isContentEditable)return;let R=l&&Z.key==="Enter",W=t&&Z.key===" ",I=Z.key==="Enter"&&!l,B=Z.key===" "&&!t;if(I||B){Z.preventDefault();return}if(R||W){let p=gF(Z);if(R){if(!p){Z.preventDefault();let{view:y,...h}=Z,C=()=>Ry(H,h);Zy()?Fb(H,"keyup",C):queueMicrotask(C)}}else W&&(X.current=!0,p||(Z.preventDefault(),G(!0)))}}),r=e.onKeyUp,g=Gc(Z=>{if(r?.(Z),Z.defaultPrevented||a||i||Z.metaKey)return;let H=t&&Z.key===" ";if(X.current&&H&&(X.current=!1,!gF(Z))){Z.preventDefault(),G(!1);let R=Z.currentTarget,{view:W,...I}=Z;queueMicrotask(()=>Ry(R,I))}});return e={"data-active":n||void 0,type:b?"button":void 0,...m,...e,ref:yc(d,e.ref),onKeyDown:s,onKeyUp:g},e=Ud(e),e}),FWc=K(function(l){let t=nX(l);return _(Jlc,t)});function GX(c,l){let t=c.__unstableInternals;return sc(t,"Invalid store"),t[l]}function Xl(c,...l){let t=c,e=t,d=Symbol(),b=$G,o=new Set,n=new Set,G=new Set,X=new Set,i=new Set,a=new WeakMap,m=new WeakMap,x=y=>(G.add(y),()=>G.delete(y)),s=()=>{let y=o.size,h=Symbol();o.add(h);let C=()=>{o.delete(h),!o.size&&b()};if(y)return C;let J=sy(t).map(F=>ul(...l.map(T=>{var L;let v=(L=T?.getState)==null?void 0:L.call(T);if(v&&Ie(v,F))return Mc(T,[F],A=>{B(F,A[F],!0)})}))),f=[];for(let F of G)f.push(F());let k=l.map(ea);return b=ul(...J,...f,...k),C},r=(y,h,C=X)=>(C.add(h),m.set(h,y),()=>{var J;(J=a.get(h))==null||J(),a.delete(h),m.delete(h),C.delete(h)}),g=(y,h)=>r(y,h),Z=(y,h)=>(a.set(h,h(t,t)),r(y,h)),H=(y,h)=>(a.set(h,h(t,e)),r(y,h,i)),R=y=>Xl(xy(t,y),p),W=y=>Xl(my(t,y),p),I=()=>t,B=(y,h,C=!1)=>{var J;if(!Ie(t,y))return;let f=gm(h,t[y]);if(f===t[y])return;if(!C)for(let L of l)(J=L?.setState)==null||J.call(L,y,f);let k=t;t={...t,[y]:f};let F=Symbol();d=F,n.add(y);let T=(L,v,A)=>{var S;let U=m.get(L),P=bc=>A?A.has(bc):bc===y;(!U||U.some(P))&&((S=a.get(L))==null||S(),a.set(L,L(t,v)))};for(let L of X)T(L,k);queueMicrotask(()=>{if(d!==F)return;let L=t;for(let v of i)T(v,e,n);e=L,n.clear()})},p={getState:I,setState:B,__unstableInternals:{setup:x,init:s,subscribe:g,sync:Z,batch:H,pick:R,omit:W}};return p}function pl(c,...l){if(c)return GX(c,"setup")(...l)}function ea(c,...l){if(c)return GX(c,"init")(...l)}function da(c,...l){if(c)return GX(c,"subscribe")(...l)}function Mc(c,...l){if(c)return GX(c,"sync")(...l)}function Nb(c,...l){if(c)return GX(c,"batch")(...l)}function md(c,...l){if(c)return GX(c,"omit")(...l)}function hy(c,...l){if(c)return GX(c,"pick")(...l)}function jd(...c){var l;let t={};for(let d of c){let b=(l=d?.getState)==null?void 0:l.call(d);b&&Object.assign(t,b)}let e=Xl(t,...c);return Object.assign({},...c,e)}var fb=u(E(),1),WF=u(IF(),1),{useSyncExternalStore:pF}=WF.default,BF=()=>()=>{};function xc(c,l=Zm){let t=fb.useCallback(d=>c?da(c,null,d):BF(),[c]),e=()=>{let d=typeof l=="string"?l:null,b=typeof l=="function"?l:null,o=c?.getState();if(b)return b(o);if(o&&d&&Ie(o,d))return o[d]};return pF(t,e,e)}function Ym(c,l){let t=fb.useRef({}),e=fb.useCallback(b=>c?da(c,null,b):BF(),[c]),d=()=>{let b=c?.getState(),o=!1,n=t.current;for(let G in l){let X=l[G];if(typeof X=="function"){let i=X(b);i!==n[G]&&(n[G]=i,o=!0)}if(typeof X=="string"){if(!b||!Ie(b,X))continue;let i=b[X];i!==n[G]&&(n[G]=i,o=!0)}}return o&&(t.current={...n}),t.current};return pF(e,d,d)}function zc(c,l,t,e){let d=Ie(l,t)?l[t]:void 0,b=e?l[e]:void 0,o=rg({value:d,setValue:b});Sc(()=>Mc(c,[t],(n,G)=>{let{value:X,setValue:i}=o.current;i&&n[t]!==G[t]&&n[t]!==X&&i(n[t])}),[c,t]),Sc(()=>{if(d!==void 0)return c.setState(t,d),Nb(c,[t],()=>{d!==void 0&&c.setState(t,d)})})}function Bl(c,l){let[t,e]=fb.useState(()=>c(l));Sc(()=>ea(t),[t]);let d=fb.useCallback(n=>xc(t,n),[t]),b=fb.useMemo(()=>({...t,useState:d}),[t,d]),o=Gc(()=>{e(n=>c({...l,...n.getState()}))});return[b,o]}var fo=u(E(),1),VF=u(V(),1),Olc="button";function Qlc(c){return pm(c)?!0:c.tagName==="INPUT"&&!We(c)}function wlc(c,l=!1){let t=c.clientHeight,{top:e}=c.getBoundingClientRect(),d=Math.max(t*.875,t-40)*1.5,b=l?t-d+e:d+e;return c.tagName==="HTML"?b+c.scrollTop:b}function Tlc(c,l=!1){let{top:t}=c.getBoundingClientRect();return l?t+c.clientHeight:t}function yF(c,l,t,e=!1){var d;if(!l||!t)return;let{renderedItems:b}=l.getState(),o=ag(c);if(!o)return;let n=wlc(o,e),G,X;for(let i=0;i<b.length;i+=1){let a=G;if(G=t(i),!G)break;if(G===a)continue;let m=(d=vb(l,G))==null?void 0:d.element;if(!m)continue;let s=Tlc(m,e)-n,r=Math.abs(s);if(e&&s<=0||!e&&s>=0){X!==void 0&&X<r&&(G=a);break}X=r}return G}function Dlc(c,l){return jl(c)?!1:dX(l,c.target)}var xd=q(function({store:l,rowId:t,preventScrollOnKeyDown:e=!1,moveOnKeyPress:d=!0,tabbable:b=!1,getItem:o,"aria-setsize":n,"aria-posinset":G,...X}){let i=Ld();l=l||i;let a=bl(X.id),m=(0,fo.useRef)(null),x=(0,fo.useContext)(Hg),r=bt(X)&&!X.accessibleWhenDisabled,{rowId:g,baseElement:Z,isActiveItem:H,ariaSetSize:R,ariaPosInSet:W,isTabbable:I}=Ym(l,{rowId(v){if(t)return t;if(v&&x?.baseElement&&x.baseElement===v.baseElement)return x.id},baseElement(v){return v?.baseElement||void 0},isActiveItem(v){return!!v&&v.activeId===a},ariaSetSize(v){if(n!=null)return n;if(v&&x?.ariaSetSize&&x.baseElement===v.baseElement)return x.ariaSetSize},ariaPosInSet(v){if(G!=null)return G;if(!v||!x?.ariaPosInSet||x.baseElement!==v.baseElement)return;let A=v.renderedItems.filter(S=>S.rowId===g);return x.ariaPosInSet+A.findIndex(S=>S.id===a)},isTabbable(v){if(!v?.renderedItems.length)return!0;if(v.virtualFocus)return!1;if(b)return!0;if(v.activeId===null)return!1;let A=l?.item(v.activeId);return A?.disabled||!A?.element?!0:v.activeId===a}}),B=(0,fo.useCallback)(v=>{var A;let S={...v,id:a||v.id,rowId:g,disabled:!!r,children:(A=v.element)==null?void 0:A.textContent};return o?o(S):S},[a,g,r,o]),p=X.onFocus,y=(0,fo.useRef)(!1),h=Gc(v=>{if(p?.(v),v.defaultPrevented||ug(v)||!a||!l||Dlc(v,l))return;let{virtualFocus:A,baseElement:S}=l.getState();if(l.setActiveId(a),pm(v.currentTarget)&&tF(v.currentTarget),!A||!jl(v)||Qlc(v.currentTarget)||!S?.isConnected)return;lX()&&v.currentTarget.hasAttribute("data-autofocus")&&v.currentTarget.scrollIntoView({block:"nearest",inline:"nearest"}),y.current=!0,v.relatedTarget===S||dX(l,v.relatedTarget)?eF(S):S.focus()}),C=X.onBlurCapture,J=Gc(v=>{if(C?.(v),v.defaultPrevented)return;let A=l?.getState();A?.virtualFocus&&y.current&&(y.current=!1,v.preventDefault(),v.stopPropagation())}),f=X.onKeyDown,k=qc(e),F=qc(d),T=Gc(v=>{if(f?.(v),v.defaultPrevented||!jl(v)||!l)return;let{currentTarget:A}=v,S=l.getState(),U=l.item(a),P=!!U?.rowId,bc=S.orientation!=="horizontal",j=S.orientation!=="vertical",ec=()=>!!(P||j||!S.baseElement||!qt(S.baseElement)),oc={ArrowUp:(P||bc)&&l.up,ArrowRight:(P||j)&&l.next,ArrowDown:(P||bc)&&l.down,ArrowLeft:(P||j)&&l.previous,Home:()=>{if(ec())return!P||v.ctrlKey?l?.first():l?.previous(-1)},End:()=>{if(ec())return!P||v.ctrlKey?l?.last():l?.next(-1)},PageUp:()=>yF(A,l,l?.up,!0),PageDown:()=>yF(A,l,l?.down)}[v.key];if(oc){if(pm(A)){let Bc=gy(A),wc=j&&v.key==="ArrowLeft",Wl=j&&v.key==="ArrowRight",sl=bc&&v.key==="ArrowUp",tl=bc&&v.key==="ArrowDown";if(Wl||tl){let{length:gc}=ry(A);if(Bc.end!==gc)return}else if((wc||sl)&&Bc.start!==0)return}let Hc=oc();if(k(v)||Hc!==void 0){if(!F(v))return;v.preventDefault(),l.move(Hc)}}}),L=(0,fo.useMemo)(()=>({id:a,baseElement:Z}),[a,Z]);return X=Wc(X,v=>(0,VF.jsx)(_9.Provider,{value:L,children:v}),[L]),X={id:a,"data-active-item":H||void 0,...X,ref:yc(m,X.ref),tabIndex:I?X.tabIndex:-1,onFocus:h,onBlurCapture:J,onKeyDown:T},X=nX(X),X=hm({store:l,...X,getItem:B,shouldRegisterItem:a?X.shouldRegisterItem:!1}),Gl({...X,"aria-setsize":R,"aria-posinset":W})}),An=El(K(function(l){let t=xd(l);return _(Olc,t)}));var CF=u(E(),1),Fy=u(V(),1),Llc="button",Ulc=q(function({store:l,getItem:t,...e}){var d;let b=q9();l=l||b,sc(l,!1);let o=bl(),n=e.id||o,G=bt(e),X=(0,CF.useCallback)(W=>{let I={...W,dimmed:G};return t?t(I):I},[G,t]),i=e.onClick,a=Gc(W=>{i?.(W),!W.defaultPrevented&&l?.setSelectedId(n)}),m=l.panels.useState(W=>{var I;return(I=W.items.find(B=>B.tabId===n))==null?void 0:I.id}),x=o?e.shouldRegisterItem:!1,s=l.useState(W=>!!n&&W.activeId===n),r=l.useState(W=>!!n&&W.selectedId===n),g=l.useState(W=>!!l.item(W.activeId)),Z=s||r&&!g,H=r||((d=e.accessibleWhenDisabled)!=null?d:!0);if(xc(l.combobox||l.composite,"virtualFocus")&&(e={...e,tabIndex:-1}),e={id:n,role:"tab","aria-selected":r,"aria-controls":m||void 0,...e,onClick:a},l.composite){let W={id:n,accessibleWhenDisabled:H,store:l.composite,shouldRegisterItem:Z&&x,rowId:e.rowId,render:e.render};e={...e,render:(0,Fy.jsx)(An,{...W,render:l.combobox&&l.composite!==l.combobox?(0,Fy.jsx)(An,{...W,store:l.combobox}):W.render})}}return e=xd({store:l,...e,accessibleWhenDisabled:H,getItem:X,shouldRegisterItem:x}),e}),na=El(K(function(l){let t=Ulc(l);return _(Llc,t)}));function Fm(c){return Array.isArray(c)?c:typeof c<"u"?[c]:[]}function vm(c){let l=[];for(let t of c)l.push(...t);return l}function Ga(c){return c.slice().reverse()}var Sb=u(E(),1),hF=u(V(),1),jlc="div";function Elc(c){return c.some(l=>!!l.rowId)}function Mlc(c){let l=c.target;return l&&!qt(l)?!1:c.key.length===1&&!c.ctrlKey&&!c.metaKey}function Plc(c){return c.key==="Shift"||c.key==="Control"||c.key==="Alt"||c.key==="Meta"}function JF(c,l,t){return Gc(e=>{var d;if(l?.(e),e.defaultPrevented||e.isPropagationStopped()||!jl(e)||Plc(e)||Mlc(e))return;let b=c.getState(),o=(d=vb(c,b.activeId))==null?void 0:d.element;if(!o)return;let{view:n,...G}=e,X=t?.current;o!==X&&o.focus(),O9(o,e.type,G)||e.preventDefault(),e.currentTarget.contains(o)&&e.stopPropagation()})}function Klc(c){return cF(vm(Ga(lF(c))))}function _lc(c){let[l,t]=(0,Sb.useState)(!1),e=(0,Sb.useCallback)(()=>t(!0),[]),d=c.useState(b=>vb(c,b.activeId));return(0,Sb.useEffect)(()=>{let b=d?.element;l&&b&&(t(!1),b.focus({preventScroll:!0}))},[d,l]),e}var sd=q(function({store:l,composite:t=!0,focusOnMove:e=t,moveOnKeyPress:d=!0,...b}){let o=K9();l=l||o,sc(l,!1);let n=(0,Sb.useRef)(null),G=(0,Sb.useRef)(null),X=_lc(l),i=l.useState("moves"),[,a]=gg(t?l.setBaseElement:null);(0,Sb.useEffect)(()=>{var J;if(!l||!i||!t||!e)return;let{activeId:f}=l.getState(),k=(J=vb(l,f))==null?void 0:J.element;k&&iF(k)},[l,i,t,e]),Sc(()=>{if(!l||!i||!t)return;let{baseElement:J,activeId:f}=l.getState();if(!(f===null)||!J)return;let F=G.current;G.current=null,F&&tX(F,{relatedTarget:J}),oX(J)||J.focus()},[l,i,t]);let m=l.useState("activeId"),x=l.useState("virtualFocus");Sc(()=>{var J;if(!l||!t||!x)return;let f=G.current;if(G.current=null,!f)return;let F=((J=vb(l,m))==null?void 0:J.element)||Te(f);F!==f&&tX(f,{relatedTarget:F})},[l,m,x,t]);let s=JF(l,b.onKeyDownCapture,G),r=JF(l,b.onKeyUpCapture,G),g=b.onFocusCapture,Z=Gc(J=>{if(g?.(J),J.defaultPrevented||!l)return;let{virtualFocus:f}=l.getState();if(!f)return;let k=J.relatedTarget,F=dF(J.currentTarget);jl(J)&&F&&(J.stopPropagation(),G.current=k)}),H=b.onFocus,R=Gc(J=>{if(H?.(J),J.defaultPrevented||!t||!l)return;let{relatedTarget:f}=J,{virtualFocus:k}=l.getState();k?jl(J)&&!dX(l,f)&&queueMicrotask(X):jl(J)&&l.setActiveId(null)}),W=b.onBlurCapture,I=Gc(J=>{var f;if(W?.(J),J.defaultPrevented||!l)return;let{virtualFocus:k,activeId:F}=l.getState();if(!k)return;let T=(f=vb(l,F))==null?void 0:f.element,L=J.relatedTarget,v=dX(l,L),A=G.current;G.current=null,jl(J)&&v?(L===T?A&&A!==L&&tX(A,J):T?tX(T,J):A&&tX(A,J),J.stopPropagation()):!dX(l,J.target)&&T&&tX(T,J)}),B=b.onKeyDown,p=qc(d),y=Gc(J=>{var f;if(B?.(J),J.nativeEvent.isComposing||J.defaultPrevented||!l||!jl(J))return;let{orientation:k,renderedItems:F,activeId:T}=l.getState(),L=vb(l,T);if((f=L?.element)!=null&&f.isConnected)return;let v=k!=="horizontal",A=k!=="vertical",S=Elc(F);if((J.key==="ArrowLeft"||J.key==="ArrowRight"||J.key==="Home"||J.key==="End")&&qt(J.currentTarget))return;let j={ArrowUp:(S||v)&&(()=>{if(S){let ec=Klc(F);return ec?.id}return l?.last()}),ArrowRight:(S||A)&&l.first,ArrowDown:(S||v)&&l.first,ArrowLeft:(S||A)&&l.last,Home:l.first,End:l.last,PageUp:l.first,PageDown:l.last}[J.key];if(j){let ec=j();if(ec!==void 0){if(!p(J))return;J.preventDefault(),l.move(ec)}}});b=Wc(b,J=>(0,hF.jsx)(At,{value:l,children:J}),[l]),b={"aria-activedescendant":l.useState(J=>{var f;if(l&&t&&J.virtualFocus)return(f=vb(l,J.activeId))==null?void 0:f.id}),...b,ref:yc(n,a,b.ref),onKeyDownCapture:s,onKeyUpCapture:r,onFocusCapture:Z,onFocus:R,onBlurCapture:I,onKeyDown:y};let C=l.useState(J=>t&&(J.virtualFocus||J.activeId===null));return b=Ud({focusable:C,...b}),b}),Nm=K(function(l){let t=sd(l);return _(jlc,t)});var YF=u(V(),1),qlc="div",$lc=q(function({store:l,...t}){let e=Rg();l=l||e,sc(l,!1);let d=l.useState(b=>b.orientation==="both"?void 0:b.orientation);return t=Wc(t,b=>(0,YF.jsx)(Ig,{value:l,children:b}),[l]),l.composite&&(t={focusable:!1,...t}),t={role:"tablist","aria-orientation":d,...t},t=sd({store:l,...t}),t}),Xa=K(function(l){let t=$lc(l);return _(qlc,t)});var fm=ol(),ctc=fm.useContext,Ypc=fm.useScopedContext,Sm=fm.useProviderContext,FF=fm.ContextProvider,vF=fm.ScopedContextProvider;var vy=u(E(),1),km=ol([FF],[vF]),fpc=km.useContext,Spc=km.useScopedContext,ia=km.useProviderContext,NF=km.ContextProvider,aa=km.ScopedContextProvider,fF=(0,vy.createContext)(void 0),SF=(0,vy.createContext)(void 0);var ma=u(E(),1),OF=u(ua(),1),Ny=u(V(),1),ltc="div";function zF(c,l){let t=setTimeout(l,c);return()=>clearTimeout(t)}function ttc(c){let l=requestAnimationFrame(()=>{l=requestAnimationFrame(c)});return()=>cancelAnimationFrame(l)}function AF(...c){return c.join(", ").split(", ").reduce((l,t)=>{let e=t.endsWith("ms")?1:1e3,d=Number.parseFloat(t||"0s")*e;return d>l?d:l},0)}function On(c,l,t){return!t&&l!==!1&&(!c||!!l)}var Qn=q(function({store:l,alwaysVisible:t,...e}){let d=Sm();l=l||d,sc(l,!1);let b=(0,ma.useRef)(null),o=bl(e.id),[n,G]=(0,ma.useState)(null),X=l.useState("open"),i=l.useState("mounted"),a=l.useState("animated"),m=l.useState("contentElement"),x=xc(l.disclosure,"contentElement");Sc(()=>{b.current&&l?.setContentElement(b.current)},[l]),Sc(()=>{let Z;return l?.setState("animated",H=>(Z=H,!0)),()=>{Z!==void 0&&l?.setState("animated",Z)}},[l]),Sc(()=>{if(a){if(!m?.isConnected){G(null);return}return ttc(()=>{G(X?"enter":i?"leave":null)})}},[a,m,X,i]),Sc(()=>{if(!l||!a||!n||!m)return;let Z=()=>l?.setState("animating",!1),H=()=>(0,OF.flushSync)(Z);if(n==="leave"&&X||n==="enter"&&!X)return;if(typeof a=="number")return zF(a,H);let{transitionDuration:R,animationDuration:W,transitionDelay:I,animationDelay:B}=getComputedStyle(m),{transitionDuration:p="0",animationDuration:y="0",transitionDelay:h="0",animationDelay:C="0"}=x?getComputedStyle(x):{},J=AF(I,B,h,C),f=AF(R,W,p,y),k=J+f;if(!k){n==="enter"&&l.setState("animated",!1),Z();return}let F=1e3/60,T=Math.max(k-F,0);return zF(T,H)},[l,a,m,x,X,n]),e=Wc(e,Z=>(0,Ny.jsx)(aa,{value:l,children:Z}),[l]);let s=On(i,e.hidden,t),r=e.style,g=(0,ma.useMemo)(()=>s?{...r,display:"none"}:r,[s,r]);return e={id:o,"data-open":X||void 0,"data-enter":n==="enter"||void 0,"data-leave":n==="leave"||void 0,hidden:s,...e,ref:yc(o?l.setContentElement:null,b,e.ref),style:g},Gl(e)}),etc=K(function(l){let t=Qn(l);return _(ltc,t)}),zm=K(function({unmountOnHide:l,...t}){let e=Sm(),d=t.store||e;return xc(d,o=>!l||o?.mounted)===!1?null:(0,Ny.jsx)(etc,{...t})});function Am(c={}){let l=jd(c.store,md(c.disclosure,["contentElement","disclosureElement"]));let t=l?.getState(),e=ac(c.open,t?.open,c.defaultOpen,!1),d=ac(c.animated,t?.animated,!1),b={open:e,animated:d,animating:!!d&&e,mounted:e,contentElement:ac(t?.contentElement,null),disclosureElement:ac(t?.disclosureElement,null)},o=Xl(b,l);return pl(o,()=>Mc(o,["animated","animating"],n=>{n.animated||o.setState("animating",!1)})),pl(o,()=>da(o,["open"],()=>{o.getState().animated&&o.setState("animating",!0)})),pl(o,()=>Mc(o,["open","animating"],n=>{o.setState("mounted",n.open||n.animating)})),{...o,disclosure:c.disclosure,setOpen:n=>o.setState("open",n),show:()=>o.setState("open",!0),hide:()=>o.setState("open",!1),toggle:()=>o.setState("open",n=>!n),stopAnimation:()=>o.setState("animating",!1),setContentElement:n=>o.setState("contentElement",n),setDisclosureElement:n=>o.setState("disclosureElement",n)}}function Cg(c,l,t){return $t(l,[t.store,t.disclosure]),zc(c,t,"open","setOpen"),zc(c,t,"mounted","setMounted"),zc(c,t,"animated"),Object.assign(c,{disclosure:t.disclosure})}function So(c={}){let[l,t]=Bl(Am,c);return Cg(l,t,c)}var kb=u(E(),1),QF=u(V(),1),btc="div",otc=q(function({store:l,unmountOnHide:t,tabId:e,getItem:d,scrollRestoration:b,scrollElement:o,...n}){let G=Rg();l=l||G,sc(l,!1);let X=(0,kb.useRef)(null),i=bl(n.id),a=xc(l.panels,()=>{var B;return e||((B=l?.panels.item(i))==null?void 0:B.tabId)}),m=xc(l,B=>!!a&&B.selectedId===a),x=So({open:m}),s=xc(x,"mounted"),r=(0,kb.useRef)(new Map),g=Gc(()=>{let B=X.current;return B?o?typeof o=="function"?o(B):"current"in o?o.current:o:B:null});(0,kb.useEffect)(()=>{var B,p;if(!b||!s)return;let y=g();if(!y)return;if(b==="reset"){y.scroll(0,0);return}if(!a)return;let h=r.current.get(a);y.scroll((B=h?.x)!=null?B:0,(p=h?.y)!=null?p:0);let C=()=>{r.current.set(a,{x:y.scrollLeft,y:y.scrollTop})};return y.addEventListener("scroll",C),()=>{y.removeEventListener("scroll",C)}},[b,s,a,g,l]);let[Z,H]=(0,kb.useState)(!1);(0,kb.useEffect)(()=>{let B=X.current;if(!B)return;let p=bX(B);H(!!p.length)},[]);let R=(0,kb.useCallback)(B=>{let p={...B,id:i||B.id,tabId:e};return d?d(p):p},[i,e,d]),W=n.onKeyDown,I=Gc(B=>{if(W?.(B),B.defaultPrevented||!l?.composite)return;let y={ArrowLeft:l.previous,ArrowRight:l.next,Home:l.first,End:l.last}[B.key];if(!y)return;let{selectedId:h}=l.getState(),C=y({activeId:h});C&&(B.preventDefault(),l.move(C))});return n=Wc(n,B=>(0,QF.jsx)(Ig,{value:l,children:B}),[l]),n={id:i,role:"tabpanel","aria-labelledby":a||void 0,...n,children:t&&!s?null:n.children,ref:yc(X,n.ref),onKeyDown:I},n=Ud({focusable:!l.composite&&!Z,...n}),n=Qn({store:x,...n}),n=hm({store:l.panels,...n,getItem:R}),n}),xa=K(function(l){let t=otc(l);return _(btc,t)});var Om=ol([NF],[aa]),wF=Om.useContext,aBc=Om.useScopedContext,XX=Om.useProviderContext,sa=Om.ContextProvider,zb=Om.ScopedContextProvider;var fy=u(E(),1),Qm=ol([sa,At],[zb,pe]),iX=Qm.useContext,TF=Qm.useScopedContext,aX=Qm.useProviderContext,rBc=Qm.ContextProvider,Jg=Qm.ScopedContextProvider,hg=(0,fy.createContext)(!1),Sy=(0,fy.createContext)(null);function ntc(c){var l;let t=c.find(b=>!!b.element),e=[...c].reverse().find(b=>!!b.element),d=(l=t?.element)==null?void 0:l.parentElement;for(;d&&e?.element;){if(e&&d.contains(e.element))return d;d=d.parentElement}return Ac(d).body}function Gtc(c){return c?.__unstablePrivateStore}function Yg(c={}){var l;c.store;let t=(l=c.store)==null?void 0:l.getState(),e=ac(c.items,t?.items,c.defaultItems,[]),d=new Map(e.map(m=>[m.id,m])),b={items:e,renderedItems:ac(t?.renderedItems,[])},o=Gtc(c.store),n=Xl({items:e,renderedItems:b.renderedItems},o),G=Xl(b,c.store),X=m=>{let x=Bm(m,s=>s.element);n.setState("renderedItems",x),G.setState("renderedItems",x)};pl(G,()=>ea(n)),pl(n,()=>Nb(n,["items"],m=>{G.setState("items",m.items)})),pl(n,()=>Nb(n,["renderedItems"],m=>{let x=!0,s=requestAnimationFrame(()=>{let{renderedItems:H}=G.getState();m.renderedItems!==H&&X(m.renderedItems)});if(typeof IntersectionObserver!="function")return()=>cancelAnimationFrame(s);let r=()=>{if(x){x=!1;return}cancelAnimationFrame(s),s=requestAnimationFrame(()=>X(m.renderedItems))},g=ntc(m.renderedItems),Z=new IntersectionObserver(r,{root:g});for(let H of m.renderedItems)H.element&&Z.observe(H.element);return()=>{cancelAnimationFrame(s),Z.disconnect()}}));let i=(m,x,s=!1)=>{let r;return x(Z=>{let H=Z.findIndex(({id:W})=>W===m.id),R=Z.slice();if(H!==-1){r=Z[H];let W={...r,...m};R[H]=W,d.set(m.id,W)}else R.push(m),d.set(m.id,m);return R}),()=>{x(Z=>{if(!r)return s&&d.delete(m.id),Z.filter(({id:W})=>W!==m.id);let H=Z.findIndex(({id:W})=>W===m.id);if(H===-1)return Z;let R=Z.slice();return R[H]=r,d.set(m.id,r),R})}},a=m=>i(m,x=>n.setState("items",x),!0);return{...G,registerItem:a,renderItem:m=>ul(a(m),i(m,x=>n.setState("renderedItems",x))),item:m=>{if(!m)return null;let x=d.get(m);if(!x){let{items:s}=n.getState();x=s.find(r=>r.id===m),x&&d.set(m,x)}return x||null},__unstablePrivateStore:n}}function DF(c,l,t){return $t(l,[t.store]),zc(c,t,"items","setItems"),c}var Xtc={id:null};function ko(c,l){return c.find(t=>l?!t.disabled&&t.id!==l:!t.disabled)}function itc(c,l){return c.filter(t=>l?!t.disabled&&t.id!==l:!t.disabled)}function LF(c,l){return c.filter(t=>t.rowId===l)}function atc(c,l,t=!1){let e=c.findIndex(d=>d.id===l);return[...c.slice(e+1),...t?[Xtc]:[],...c.slice(0,e)]}function UF(c){let l=[];for(let t of c){let e=l.find(d=>{var b;return((b=d[0])==null?void 0:b.rowId)===t.rowId});e?e.push(t):l.push([t])}return l}function jF(c){let l=0;for(let{length:t}of c)t>l&&(l=t);return l}function utc(c){return{id:"__EMPTY_ITEM__",disabled:!0,rowId:c}}function mtc(c,l,t){let e=jF(c);for(let d of c)for(let b=0;b<e;b+=1){let o=d[b];if(!o||t&&o.disabled){let G=b===0&&t?ko(d):d[b-1];d[b]=G&&l!==G.id&&t?G:utc(G?.rowId)}}return c}function xtc(c){let l=UF(c),t=jF(l),e=[];for(let d=0;d<t;d+=1)for(let b of l){let o=b[d];o&&e.push({...o,rowId:o.rowId?`${d}`:void 0})}return e}function Ue(c={}){var l;let t=(l=c.store)==null?void 0:l.getState(),e=Yg(c),d=ac(c.activeId,t?.activeId,c.defaultActiveId),b={...e.getState(),id:ac(c.id,t?.id,`id-${Math.random().toString(36).slice(2,8)}`),activeId:d,baseElement:ac(t?.baseElement,null),includesBaseElement:ac(c.includesBaseElement,t?.includesBaseElement,d===null),moves:ac(t?.moves,0),orientation:ac(c.orientation,t?.orientation,"both"),rtl:ac(c.rtl,t?.rtl,!1),virtualFocus:ac(c.virtualFocus,t?.virtualFocus,!1),focusLoop:ac(c.focusLoop,t?.focusLoop,!1),focusWrap:ac(c.focusWrap,t?.focusWrap,!1),focusShift:ac(c.focusShift,t?.focusShift,!1)},o=Xl(b,e,c.store);pl(o,()=>Mc(o,["renderedItems","activeId"],G=>{o.setState("activeId",X=>{var i;return X!==void 0?X:(i=ko(G.renderedItems))==null?void 0:i.id})}));let n=(G="next",X={})=>{var i,a;let m=o.getState(),{skip:x=0,activeId:s=m.activeId,focusShift:r=m.focusShift,focusLoop:g=m.focusLoop,focusWrap:Z=m.focusWrap,includesBaseElement:H=m.includesBaseElement,renderedItems:R=m.renderedItems,rtl:W=m.rtl}=X,I=G==="up"||G==="down",B=G==="next"||G==="down",p=B?W&&!I:!W||I,y=r&&!x,h=I?vm(mtc(UF(R),s,y)):R;if(h=p?Ga(h):h,h=I?xtc(h):h,s==null)return(i=ko(h))==null?void 0:i.id;let C=h.find(S=>S.id===s);if(!C)return(a=ko(h))==null?void 0:a.id;let J=h.some(S=>S.rowId),f=h.indexOf(C),k=h.slice(f+1),F=LF(k,C.rowId);if(x){let S=itc(F,s),U=S.slice(x)[0]||S[S.length-1];return U?.id}let T=g&&(I?g!=="horizontal":g!=="vertical"),L=J&&Z&&(I?Z!=="horizontal":Z!=="vertical"),v=B?(!J||I)&&T&&H:I?H:!1;if(T){let S=L&&!v?h:LF(h,C.rowId),U=atc(S,s,v),P=ko(U,s);return P?.id}if(L){let S=ko(v?F:k,s);return v?S?.id||null:S?.id}let A=ko(F,s);return!A&&v?null:A?.id};return{...e,...o,setBaseElement:G=>o.setState("baseElement",G),setActiveId:G=>o.setState("activeId",G),move:G=>{G!==void 0&&(o.setState("activeId",G),o.setState("moves",X=>X+1))},first:()=>{var G;return(G=ko(o.getState().renderedItems))==null?void 0:G.id},last:()=>{var G;return(G=ko(Ga(o.getState().renderedItems)))==null?void 0:G.id},next:G=>(G!==void 0&&typeof G=="number"&&(G={skip:G}),n("next",G)),previous:G=>(G!==void 0&&typeof G=="number"&&(G={skip:G}),n("previous",G)),down:G=>(G!==void 0&&typeof G=="number"&&(G={skip:G}),n("down",G)),up:G=>(G!==void 0&&typeof G=="number"&&(G={skip:G}),n("up",G))}}function Fg(c){return{id:bl(c.id),...c}}function rd(c,l,t){return c=DF(c,l,t),zc(c,t,"activeId","setActiveId"),zc(c,t,"includesBaseElement"),zc(c,t,"virtualFocus"),zc(c,t,"orientation"),zc(c,t,"rtl"),zc(c,t,"focusLoop"),zc(c,t,"focusWrap"),zc(c,t,"focusShift"),c}function uX(c={}){c=Fg(c);let[l,t]=Bl(Ue,c);return rd(l,t,c)}var vg=u(E(),1),ABc=(0,vg.createContext)(void 0),wm=ol([sa,At],[zb,pe]),EF=wm.useContext,OBc=wm.useScopedContext,Ng=wm.useProviderContext,QBc=wm.ContextProvider,wBc=wm.ScopedContextProvider,TBc=(0,vg.createContext)(void 0),DBc=(0,vg.createContext)(!1);function MF({composite:c,combobox:l,...t}={}){let e=["items","renderedItems","moves","orientation","virtualFocus","includesBaseElement","baseElement","focusLoop","focusShift","focusWrap"],d=jd(t.store,md(c,e),md(l,e)),b=d?.getState(),o=Ue({...t,store:d,includesBaseElement:ac(t.includesBaseElement,b?.includesBaseElement,!1),orientation:ac(t.orientation,b?.orientation,"horizontal"),focusLoop:ac(t.focusLoop,b?.focusLoop,!0)}),n=Yg(),G={...o.getState(),selectedId:ac(t.selectedId,b?.selectedId,t.defaultSelectedId),selectOnMove:ac(t.selectOnMove,b?.selectOnMove,!0)},X=Xl(G,o,d);pl(X,()=>Mc(X,["moves"],()=>{let{activeId:m,selectOnMove:x}=X.getState();if(!x||!m)return;let s=o.item(m);s&&(s.dimmed||s.disabled||X.setState("selectedId",s.id))}));let i=!0;pl(X,()=>Nb(X,["selectedId"],(m,x)=>{if(!i){i=!0;return}c&&m.selectedId===x.selectedId||X.setState("activeId",m.selectedId)})),pl(X,()=>Mc(X,["selectedId","renderedItems"],m=>{if(m.selectedId!==void 0)return;let{activeId:x,renderedItems:s}=X.getState(),r=o.item(x);if(r&&!r.disabled&&!r.dimmed)X.setState("selectedId",r.id);else{let g=s.find(Z=>!Z.disabled&&!Z.dimmed);X.setState("selectedId",g?.id)}})),pl(X,()=>Mc(X,["renderedItems"],m=>{let x=m.renderedItems;if(x.length)return Mc(n,["renderedItems"],s=>{let r=s.renderedItems;r.some(Z=>!Z.tabId)&&r.forEach((Z,H)=>{if(Z.tabId)return;let R=x[H];R&&n.renderItem({...Z,tabId:R.id})})})}));let a=null;return pl(X,()=>{let m=()=>{a=X.getState().selectedId},x=()=>{i=!1,X.setState("selectedId",a)};if(c&&"setSelectElement"in c)return ul(Mc(c,["value"],m),Mc(c,["mounted"],x));if(l)return ul(Mc(l,["selectedValue"],m),Mc(l,["mounted"],x))}),{...o,...X,panels:n,setSelectedId:m=>X.setState("selectedId",m),select:m=>{X.setState("selectedId",m),o.move(m)}}}var PF=u(E(),1);function KF(c,l,t){$t(l,[t.composite,t.combobox]),c=rd(c,l,t),zc(c,t,"selectedId","setSelectedId"),zc(c,t,"selectOnMove");let[e,d]=Bl(()=>c.panels,{});return $t(d,[c,d]),Object.assign((0,PF.useMemo)(()=>({...c,panels:e}),[c,e]),{composite:t.composite,combobox:t.combobox})}function mX(c={}){let l=EF(),t=iX()||l;c={...c,composite:c.composite!==void 0?c.composite:t,combobox:c.combobox!==void 0?c.combobox:l};let[e,d]=Bl(MF,c);return KF(e,d,c)}function _F(c={}){var l;let t=(l=c.store)==null?void 0:l.getState();return Ue({...c,orientation:ac(c.orientation,t?.orientation,"horizontal"),focusLoop:ac(c.focusLoop,t?.focusLoop,!0)})}function qF(c,l,t){return rd(c,l,t)}function xX(c={}){let[l,t]=Bl(_F,c);return qF(l,t,c)}var Tm=ol([At],[pe]),ky=Tm.useContext,s5c=Tm.useScopedContext,$F=Tm.useProviderContext,r5c=Tm.ContextProvider,cv=Tm.ScopedContextProvider;var lv=u(V(),1),Ztc="div",Htc=q(function({store:l,orientation:t,virtualFocus:e,focusLoop:d,rtl:b,...o}){let n=$F();l=l||n;let G=xX({store:l,orientation:t,virtualFocus:e,focusLoop:d,rtl:b}),X=G.useState(i=>i.orientation==="both"?void 0:i.orientation);return o=Wc(o,i=>(0,lv.jsx)(cv,{value:G,children:i}),[G]),o={role:"toolbar","aria-orientation":X,...o},o=sd({store:G,...o}),o}),fg=K(function(l){let t=Htc(l);return _(Ztc,t)});var Rtc="button",tv=q(function({store:l,...t}){let e=ky();return l=l||e,t=xd({store:l,...t}),t}),Dm=El(K(function(l){let t=tv(l);return _(Rtc,t)}));var Itc="hr",Sg=q(function({orientation:l="horizontal",...t}){return t={role:"separator","aria-orientation":l,...t},t}),Lm=K(function(l){let t=Sg(l);return _(Itc,t)});var Wtc="hr",zy=q(function({store:l,...t}){let e=Ld();l=l||e,sc(l,!1);let d=l.useState(b=>b.orientation==="horizontal"?"vertical":"horizontal");return t=Sg({...t,orientation:d}),t}),ptc=K(function(l){let t=zy(l);return _(Wtc,t)});var Um=ol([sa],[zb]),U5c=Um.useContext,j5c=Um.useScopedContext,jm=Um.useProviderContext,kg=Um.ContextProvider,ra=Um.ScopedContextProvider;var Em=ol([kg],[ra]),Btc=Em.useContext,K5c=Em.useScopedContext,Mm=Em.useProviderContext,_5c=Em.ContextProvider,ev=Em.ScopedContextProvider;function zg(c){return[c.clientX,c.clientY]}function Ay(c,l){let[t,e]=c,d=!1,b=l.length;for(let o=b,n=0,G=o-1;n<o;G=n++){let[X,i]=l[n],[a,m]=l[G],[,x]=l[G===0?o-1:G-1]||[0,0],s=(i-m)*(t-X)-(X-a)*(e-i);if(m<i){if(e>=m&&e<i){if(s===0)return!0;s>0&&(e===m?e>x&&(d=!d):d=!d)}}else if(i<m){if(e>i&&e<=m){if(s===0)return!0;s<0&&(e===m?e<x&&(d=!d):d=!d)}}else if(e===i&&(t>=a&&t<=X||t>=X&&t<=a))return!0}return d}function ytc(c,l){let{top:t,right:e,bottom:d,left:b}=l,[o,n]=c,G=o<b?"left":o>e?"right":null,X=n<t?"top":n>d?"bottom":null;return[G,X]}function Oy(c,l){let t=c.getBoundingClientRect(),{top:e,right:d,bottom:b,left:o}=t,[n,G]=ytc(l,t),X=[l];return n?(G!=="top"&&X.push([n==="left"?o:d,e]),X.push([n==="left"?d:o,e]),X.push([n==="left"?d:o,b]),G!=="bottom"&&X.push([n==="left"?o:d,b])):G==="top"?(X.push([o,e]),X.push([o,b]),X.push([d,b]),X.push([d,e])):(X.push([o,b]),X.push([o,e]),X.push([d,e]),X.push([d,b])),X}var dv=u(E(),1),Qy=(0,dv.createContext)(null);var Vtc="span",wy=q(function(l){return l={...l,style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px",...l.style}},l}),tyc=K(function(l){let t=wy(l);return _(Vtc,t)});var Ctc="span",Jtc=q(function(l){return l={"data-focus-trap":"",tabIndex:0,"aria-hidden":!0,...l,style:{position:"fixed",top:0,left:0,...l.style}},l=wy(l),l}),Pm=K(function(l){let t=Jtc(l);return _(Ctc,t)});var je=u(E(),1),Ty=u(ua(),1),Ot=u(V(),1),htc="div";function Ytc(c){return Ac(c).body}function Ftc(c,l){return l?typeof l=="function"?l(c):l:Ac(c).createElement("div")}function vtc(c="id"){return`${c?`${c}-`:""}${Math.random().toString(36).slice(2,8)}`}function wn(c){queueMicrotask(()=>{c?.focus()})}var Dy=q(function({preserveTabOrder:l,preserveTabOrderAnchor:t,portalElement:e,portalRef:d,portal:b=!0,...o}){let n=(0,je.useRef)(null),G=yc(n,o.ref),X=(0,je.useContext)(Qy),[i,a]=(0,je.useState)(null),[m,x]=(0,je.useState)(null),s=(0,je.useRef)(null),r=(0,je.useRef)(null),g=(0,je.useRef)(null),Z=(0,je.useRef)(null);return Sc(()=>{let H=n.current;if(!H||!b){a(null);return}let R=Ftc(H,e);if(!R){a(null);return}let W=R.isConnected;if(W||(X||Ytc(H)).appendChild(R),R.id||(R.id=H.id?`portal/${H.id}`:vtc()),a(R),Hm(d,R),!W)return()=>{R.remove(),Hm(d,null)}},[b,e,X,d]),Sc(()=>{if(!b||!l||!t)return;let R=Ac(t).createElement("span");return R.style.position="fixed",t.insertAdjacentElement("afterend",R),x(R),()=>{R.remove(),x(null)}},[b,l,t]),(0,je.useEffect)(()=>{if(!i||!l)return;let H=0,R=W=>{if(!Sn(W))return;let I=W.type==="focusin";if(cancelAnimationFrame(H),I)return XF(i);H=requestAnimationFrame(()=>{GF(i,!0)})};return i.addEventListener("focusin",R,!0),i.addEventListener("focusout",R,!0),()=>{cancelAnimationFrame(H),i.removeEventListener("focusin",R,!0),i.removeEventListener("focusout",R,!0)}},[i,l]),o=Wc(o,H=>{if(H=(0,Ot.jsx)(Qy.Provider,{value:i||X,children:H}),!b)return H;if(!i)return(0,Ot.jsx)("span",{ref:G,id:o.id,style:{position:"fixed"},hidden:!0});H=(0,Ot.jsxs)(Ot.Fragment,{children:[l&&i&&(0,Ot.jsx)(Pm,{ref:r,"data-focus-trap":o.id,className:"__focus-trap-inner-before",onFocus:W=>{Sn(W,i)?wn(yg()):wn(s.current)}}),H,l&&i&&(0,Ot.jsx)(Pm,{ref:g,"data-focus-trap":o.id,className:"__focus-trap-inner-after",onFocus:W=>{Sn(W,i)?wn(Vy()):wn(Z.current)}})]}),i&&(H=(0,Ty.createPortal)(H,i));let R=(0,Ot.jsxs)(Ot.Fragment,{children:[l&&i&&(0,Ot.jsx)(Pm,{ref:s,"data-focus-trap":o.id,className:"__focus-trap-outer-before",onFocus:W=>{!(W.relatedTarget===Z.current)&&Sn(W,i)?wn(r.current):wn(Vy())}}),l&&(0,Ot.jsx)("span",{"aria-owns":i?.id,style:{position:"fixed"}}),l&&i&&(0,Ot.jsx)(Pm,{ref:Z,"data-focus-trap":o.id,className:"__focus-trap-outer-after",onFocus:W=>{if(Sn(W,i))wn(g.current);else{let I=yg();if(I===r.current){requestAnimationFrame(()=>{var B;return(B=yg())==null?void 0:B.focus()});return}wn(I)}}})]});return m&&l&&(R=(0,Ty.createPortal)(R,m)),(0,Ot.jsxs)(Ot.Fragment,{children:[R,H]})},[i,X,b,o.id,l,m]),o={...o,ref:G},o}),syc=K(function(l){let t=Dy(l);return _(htc,t)});var bv=u(E(),1),Ly=(0,bv.createContext)(0);var ov=u(E(),1),nv=u(V(),1);function Gv({level:c,children:l}){let t=(0,ov.useContext)(Ly),e=Math.max(Math.min(c||t+1,6),1);return(0,nv.jsx)(Ly.Provider,{value:e,children:l})}var Xv=u(V(),1),Ntc="div",Uy=q(function({autoFocusOnShow:l=!0,...t}){return t=Wc(t,e=>(0,Xv.jsx)(pg.Provider,{value:l,children:e}),[l]),t}),pyc=K(function(l){let t=Uy(l);return _(Ntc,t)});function iv(c,l){let e=Ac(c).createElement("button");return e.type="button",e.tabIndex=-1,e.textContent="Dismiss popup",Object.assign(e.style,{border:"0px",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute",whiteSpace:"nowrap",width:"1px"}),e.addEventListener("click",l),c.prepend(e),()=>{e.removeEventListener("click",l),e.remove()}}var Ag=u(E(),1);function av(c){let l=(0,Ag.useRef)(null);return(0,Ag.useEffect)(()=>{if(!c){l.current=null;return}return Yl("mousedown",e=>{l.current=e.target},!0)},[c]),l}var jy=new WeakMap;function ga(c,l,t){jy.has(c)||jy.set(c,new Map);let e=jy.get(c),d=e.get(l);if(!d)return e.set(l,t()),()=>{var n;(n=e.get(l))==null||n(),e.delete(l)};let b=t(),o=()=>{b(),d(),e.delete(l)};return e.set(l,o),()=>{e.get(l)===o&&(b(),e.set(l,d))}}function Km(c,l,t){return ga(c,l,()=>{let d=c.getAttribute(l);return c.setAttribute(l,t),()=>{d==null?c.removeAttribute(l):c.setAttribute(l,d)}})}function Ab(c,l,t){return ga(c,l,()=>{let d=l in c,b=c[l];return c[l]=t,()=>{d?c[l]=b:delete c[l]}})}function _m(c,l){return c?ga(c,"style",()=>{let e=c.style.cssText;return Object.assign(c.style,l),()=>{c.style.cssText=e}}):()=>{}}function uv(c,l,t){return c?ga(c,l,()=>{let d=c.style.getPropertyValue(l);return c.style.setProperty(l,t),()=>{d?c.style.setProperty(l,d):c.style.removeProperty(l)}}):()=>{}}var ftc=["SCRIPT","STYLE"];function Ey(c){return`__ariakit-dialog-snapshot-${c}`}function Stc(c,l){let t=Ac(l),e=Ey(c);if(!t.body[e])return!0;do{if(l===t.body)return!1;if(l[e])return!0;if(!l.parentElement)return!1;l=l.parentElement}while(!0)}function ktc(c,l,t){return ftc.includes(l.tagName)||!Stc(c,l)?!1:!t.some(e=>e&&_c(l,e))}function qm(c,l,t,e){for(let d of l){if(!d?.isConnected)continue;let b=l.some(G=>!G||G===d?!1:G.contains(d)),o=Ac(d),n=d;for(;d.parentElement&&d!==o.body;){if(e?.(d.parentElement,n),!b)for(let G of d.parentElement.children)ktc(c,G,l)&&t(G,n);d=d.parentElement}}}function mv(c,l){let{body:t}=Ac(l[0]),e=[];return qm(c,l,b=>{e.push(Ab(b,Ey(c),!0))}),ul(Ab(t,Ey(c),!0),()=>{for(let b of e)b()})}function Og(c,...l){if(!c)return!1;let t=c.getAttribute("data-backdrop");return t==null?!1:t===""||t==="true"||!l.length?!0:l.some(e=>t===e)}function Za(c="",l=!1){return`__ariakit-dialog-${l?"ancestor":"outside"}${c?`-${c}`:""}`}function ztc(c,l=""){return ul(Ab(c,Za(),!0),Ab(c,Za(l),!0))}function My(c,l=""){return ul(Ab(c,Za("",!0),!0),Ab(c,Za(l,!0),!0))}function $m(c,l){let t=Za(l,!0);if(c[t])return!0;let e=Za(l);do{if(c[e])return!0;if(!c.parentElement)return!1;c=c.parentElement}while(!0)}function Py(c,l){let t=[],e=l.map(b=>b?.id);return qm(c,l,b=>{Og(b,...e)||t.unshift(ztc(b,c))},(b,o)=>{o.hasAttribute("data-dialog")&&o.id!==c||t.unshift(My(b,c))}),()=>{for(let b of t)b()}}var Qg=u(E(),1);function Atc(c){return c.tagName==="HTML"?!0:_c(Ac(c).body,c)}function Otc(c,l){if(!c)return!1;if(_c(c,l))return!0;let t=l.getAttribute("aria-activedescendant");if(t){let e=Ac(c).getElementById(t);if(e)return _c(c,e)}return!1}function Qtc(c,l){if(!("clientY"in c))return!1;let t=l.getBoundingClientRect();return t.width===0||t.height===0?!1:t.top<=c.clientY&&c.clientY<=t.top+t.height&&t.left<=c.clientX&&c.clientX<=t.left+t.width}function Ky({store:c,type:l,listener:t,capture:e,domReady:d}){let b=Gc(t),o=xc(c,"open"),n=(0,Qg.useRef)(!1);Sc(()=>{if(!o||!d)return;let{contentElement:G}=c.getState();if(!G)return;let X=()=>{n.current=!0};return G.addEventListener("focusin",X,!0),()=>G.removeEventListener("focusin",X,!0)},[c,o,d]),(0,Qg.useEffect)(()=>o?Yl(l,X=>{let{contentElement:i,disclosureElement:a}=c.getState(),m=X.target;!i||!m||!Atc(m)||_c(i,m)||Otc(a,m)||m.hasAttribute("data-focus-trap")||Qtc(X,i)||n.current&&!$m(m,i.id)||rF(m)||b(X)},e):void 0,[o,e])}function _y(c,l){return typeof c=="function"?c(l):!!c}function xv(c,l,t){let e=xc(c,"open"),d=av(e),b={store:c,domReady:t,capture:!0};Ky({...b,type:"click",listener:o=>{let{contentElement:n}=c.getState(),G=d.current;G&&Wm(G)&&$m(G,n?.id)&&_y(l,o)&&c.hide()}}),Ky({...b,type:"focusin",listener:o=>{let{contentElement:n}=c.getState();n&&o.target!==Ac(n)&&_y(l,o)&&c.hide()}}),Ky({...b,type:"contextmenu",listener:o=>{_y(l,o)&&c.hide()}})}var Ed=u(E(),1),rv=u(V(),1),sv=(0,Ed.createContext)({});function gv(c){let l=(0,Ed.useContext)(sv),[t,e]=(0,Ed.useState)([]),d=(0,Ed.useCallback)(n=>{var G;return e(X=>[...X,n]),ul((G=l.add)==null?void 0:G.call(l,n),()=>{e(X=>X.filter(i=>i!==n))})},[l]);Sc(()=>Mc(c,["open","contentElement"],n=>{var G;if(n.open&&n.contentElement)return(G=l.add)==null?void 0:G.call(l,c)}),[c,l]);let b=(0,Ed.useMemo)(()=>({store:c,add:d}),[c,d]);return{wrapElement:(0,Ed.useCallback)(n=>(0,rv.jsx)(sv.Provider,{value:b,children:n}),[b]),nestedDialogs:t}}var wg=u(E(),1),Zv=u(ua(),1);function Hv({attribute:c,contentId:l,contentElement:t,enabled:e}){let[d,b]=$i(),o=(0,wg.useCallback)(()=>{if(!e||!t)return!1;let{body:n}=Ac(t),G=n.getAttribute(c);return!G||G===l},[d,e,t,c,l]);return(0,wg.useEffect)(()=>{if(!e||!l||!t)return;let{body:n}=Ac(t);if(o())return n.setAttribute(c,l),()=>n.removeAttribute(c);let G=new MutationObserver(()=>(0,Zv.flushSync)(b));return G.observe(n,{attributeFilter:[c]}),()=>G.disconnect()},[d,e,l,t,o,c]),o}var Rv=u(E(),1);function wtc(c){let l=c.getBoundingClientRect().left;return Math.round(l)+c.scrollLeft?"paddingLeft":"paddingRight"}function Iv(c,l,t){let e=Hv({attribute:"data-dialog-prevent-body-scroll",contentElement:c,contentId:l,enabled:t});(0,Rv.useEffect)(()=>{if(!e()||!c)return;let d=Ac(c),b=Rm(c),{documentElement:o,body:n}=d,G=o.style.getPropertyValue("--scrollbar-width"),X=G?Number.parseInt(G,10):b.innerWidth-o.clientWidth,i=()=>uv(o,"--scrollbar-width",`${X}px`),a=wtc(o),m=()=>_m(n,{overflow:"hidden",[a]:`${X}px`}),x=()=>{var r,g;let{scrollX:Z,scrollY:H,visualViewport:R}=b,W=(r=R?.offsetLeft)!=null?r:0,I=(g=R?.offsetTop)!=null?g:0,B=_m(n,{position:"fixed",overflow:"hidden",top:`${-(H-Math.floor(I))}px`,left:`${-(Z-Math.floor(W))}px`,right:"0",[a]:`${X}px`});return()=>{B(),b.scrollTo({left:Z,top:H,behavior:"instant"})}},s=qi()&&!Hy();return ul(i(),s?x():m())},[e,c])}function Wv(c,...l){if(!c)return!1;let t=c.getAttribute("data-focus-trap");return t==null?!1:l.length?t===""?!1:l.some(e=>t===e):!0}function Tg(){return"inert"in HTMLElement.prototype}function pv(c){return Km(c,"aria-hidden","true")}function qy(c,l){if(!("style"in c))return $G;if(Tg())return Ab(c,"inert",!0);let e=bX(c,!0).map(d=>{if(l?.some(o=>o&&_c(o,d)))return $G;let b=ga(d,"focus",()=>(d.focus=$G,()=>{delete d.focus}));return ul(Km(d,"tabindex","-1"),b)});return ul(...e,pv(c),_m(c,{pointerEvents:"none",userSelect:"none",cursor:"default"}))}function Bv(c,l){let t=[],e=l.map(b=>b?.id);return qm(c,l,b=>{Og(b,...e)||Wv(b,...e)||t.unshift(qy(b,l))},b=>{b.hasAttribute("role")&&(l.some(o=>o&&_c(o,b))||t.unshift(Km(b,"role","none")))}),()=>{for(let b of t)b()}}var Ttc="div",Dtc=["a","button","details","dialog","div","form","h1","h2","h3","h4","h5","h6","header","img","input","label","li","nav","ol","p","section","select","span","summary","textarea","ul","svg"],Ltc=q(function(l){return l}),Md=K(function(l){return _(Ttc,l)});Object.assign(Md,Dtc.reduce((c,l)=>(c[l]=K(function(e){return _(l,e)}),c),{}));var Ha=u(E(),1),Dg=u(V(),1);function yv({store:c,backdrop:l,alwaysVisible:t,hidden:e}){let d=(0,Ha.useRef)(null),b=So({disclosure:c}),o=xc(c,"contentElement");(0,Ha.useEffect)(()=>{let X=d.current,i=o;X&&i&&(X.style.zIndex=getComputedStyle(i).zIndex)},[o]),Sc(()=>{let X=o?.id;if(!X)return;let i=d.current;if(i)return My(i,X)},[o]);let n=Qn({ref:d,store:b,role:"presentation","data-backdrop":o?.id||"",alwaysVisible:t,hidden:e??void 0,style:{position:"fixed",top:0,right:0,bottom:0,left:0}});return l?(0,Ha.isValidElement)(l)?(0,Dg.jsx)(Md,{...n,render:l}):(0,Dg.jsx)(Md,{...n,render:(0,Dg.jsx)(typeof l!="boolean"?l:"div",{})}):null}function cx(c={}){return Am(c)}function $y(c,l,t){return Cg(c,l,t)}function Vv(c={}){let[l,t]=Bl(cx,c);return $y(l,t,c)}var ut=u(E(),1),Pd=u(V(),1),jtc="div",Cv=lX();function Etc(c){let l=Te();return!l||c&&_c(c,l)?!1:!!De(l)}function Jv(c,l=!1){if(!c)return null;let t="current"in c?c.current:c;return t?l?De(t)?t:null:t:null}var c1=q(function({store:l,open:t,onClose:e,focusable:d=!0,modal:b=!0,portal:o=!!b,backdrop:n=!!b,hideOnEscape:G=!0,hideOnInteractOutside:X=!0,getPersistentElements:i,preventBodyScroll:a=!!b,autoFocusOnShow:m=!0,autoFocusOnHide:x=!0,initialFocus:s,finalFocus:r,unmountOnHide:g,unstable_treeSnapshotKey:Z,...H}){let R=ia(),W=(0,ut.useRef)(null),I=Vv({store:l||R,open:t,setOpen(uc){if(uc)return;let vc=W.current;if(!vc)return;let hl=new Event("close",{bubbles:!1,cancelable:!0});e&&vc.addEventListener("close",e,{once:!0}),vc.dispatchEvent(hl),hl.defaultPrevented&&I.setOpen(!0)}}),{portalRef:B,domReady:p}=ca(o,H.portalRef),y=H.preserveTabOrder,h=xc(I,uc=>y&&!b&&uc.mounted),C=bl(H.id),J=xc(I,"open"),f=xc(I,"mounted"),k=xc(I,"contentElement"),F=On(f,H.hidden,H.alwaysVisible);Iv(k,C,a&&!F),xv(I,X,p);let{wrapElement:T,nestedDialogs:L}=gv(I);H=Wc(H,T,[T]),Sc(()=>{if(!J)return;let uc=W.current,vc=Te(uc,!0);vc&&vc.tagName!=="BODY"&&(uc&&_c(uc,vc)||I.setDisclosureElement(vc))},[I,J]),Cv&&(0,ut.useEffect)(()=>{if(!f)return;let{disclosureElement:uc}=I.getState();if(!uc||!We(uc))return;let vc=()=>{let hl=!1,Yc=()=>{hl=!0},Al={capture:!0,once:!0};uc.addEventListener("focusin",Yc,Al),Fb(uc,"mouseup",()=>{uc.removeEventListener("focusin",Yc,!0),!hl&&Vg(uc)})};return uc.addEventListener("mousedown",vc),()=>{uc.removeEventListener("mousedown",vc)}},[I,f]),(0,ut.useEffect)(()=>{if(!f||!p)return;let uc=W.current;if(!uc)return;let vc=Rm(uc),hl=vc.visualViewport||vc,Yc=()=>{var Al,it;let Re=(it=(Al=vc.visualViewport)==null?void 0:Al.height)!=null?it:vc.innerHeight;uc.style.setProperty("--dialog-viewport-height",`${Re}px`)};return Yc(),hl.addEventListener("resize",Yc),()=>{hl.removeEventListener("resize",Yc)}},[f,p]),(0,ut.useEffect)(()=>{if(!b||!f||!p)return;let uc=W.current;if(!(!uc||uc.querySelector("[data-dialog-dismiss]")))return iv(uc,I.hide)},[I,b,f,p]),Sc(()=>{if(!Tg()||J||!f||!p)return;let uc=W.current;if(uc)return qy(uc)},[J,f,p]);let v=J&&p;Sc(()=>{if(!C||!v)return;let uc=W.current;return mv(C,[uc])},[C,v,Z]);let A=Gc(i);Sc(()=>{if(!C||!v)return;let{disclosureElement:uc}=I.getState(),vc=W.current,hl=A()||[],Yc=[vc,...hl,...L.map(Al=>Al.getState().contentElement)];return b?ul(Py(C,Yc),Bv(C,Yc)):Py(C,[uc,...Yc])},[C,I,v,A,L,b,Z]);let S=!!m,U=qc(m),[P,bc]=(0,ut.useState)(!1);(0,ut.useEffect)(()=>{if(!J||!S||!p||!k?.isConnected)return;let uc=Jv(s,!0)||k.querySelector("[data-autofocus=true],[autofocus]")||oF(k,!0,o&&h)||k,vc=De(uc);U(vc?uc:null)&&(bc(!0),queueMicrotask(()=>{uc.focus(),Cv&&vc&&uc.scrollIntoView({block:"nearest",inline:"nearest"})}))},[J,S,p,k,s,o,h,U]);let j=!!x,ec=qc(x),[M,oc]=(0,ut.useState)(!1);(0,ut.useEffect)(()=>{if(J)return oc(!0),()=>oc(!1)},[J]);let Hc=(0,ut.useCallback)((uc,vc=!0)=>{let{disclosureElement:hl}=I.getState();if(Etc(uc))return;let Yc=Jv(r)||hl;if(Yc?.id){let it=Ac(Yc),Re=`[aria-activedescendant="${Yc.id}"]`,Kt=it.querySelector(Re);Kt&&(Yc=Kt)}if(Yc&&!De(Yc)){let it=Yc.closest("[data-dialog]");if(it?.id){let Re=Ac(it),Kt=`[aria-controls~="${it.id}"]`,Qe=Re.querySelector(Kt);Qe&&(Yc=Qe)}}let Al=Yc&&De(Yc);if(!Al&&vc){requestAnimationFrame(()=>Hc(uc,!1));return}ec(Al?Yc:null)&&Al&&Yc?.focus({preventScroll:!0})},[I,r,ec]),Bc=(0,ut.useRef)(!1);Sc(()=>{if(J||!M||!j)return;let uc=W.current;Bc.current=!0,Hc(uc)},[J,M,p,j,Hc]),(0,ut.useEffect)(()=>{if(!M||!j)return;let uc=W.current;return()=>{if(Bc.current){Bc.current=!1;return}Hc(uc)}},[M,j,Hc]);let wc=qc(G);(0,ut.useEffect)(()=>!p||!f?void 0:Yl("keydown",vc=>{if(vc.key!=="Escape"||vc.defaultPrevented)return;let hl=W.current;if(!hl||$m(hl))return;let Yc=vc.target;if(!Yc)return;let{disclosureElement:Al}=I.getState();(Yc.tagName==="BODY"||_c(hl,Yc)||!Al||_c(Al,Yc))&&wc(vc)&&I.hide()},!0),[I,p,f,wc]),H=Wc(H,uc=>(0,Pd.jsx)(Gv,{level:b?1:void 0,children:uc}),[b]);let Wl=H.hidden,sl=H.alwaysVisible;H=Wc(H,uc=>n?(0,Pd.jsxs)(Pd.Fragment,{children:[(0,Pd.jsx)(yv,{store:I,backdrop:n,hidden:Wl,alwaysVisible:sl}),uc]}):uc,[I,n,Wl,sl]);let[tl,gc]=(0,ut.useState)(),[Zl,zl]=(0,ut.useState)();return H=Wc(H,uc=>(0,Pd.jsx)(aa,{value:I,children:(0,Pd.jsx)(fF.Provider,{value:gc,children:(0,Pd.jsx)(SF.Provider,{value:zl,children:uc})})}),[I]),H={id:C,"data-dialog":"",role:"dialog",tabIndex:d?-1:void 0,"aria-labelledby":tl,"aria-describedby":Zl,...H,ref:yc(W,H.ref)},H=Uy({...H,autoFocusOnShow:P}),H=Qn({store:I,...H}),H=Ud({...H,focusable:d}),H=Dy({portal:o,...H,portalRef:B,preserveTabOrder:h}),H});function Kd(c,l=ia){return K(function(e){let d=l(),b=e.store||d;return xc(b,n=>!e.unmountOnHide||n?.mounted||!!e.open)?(0,Pd.jsx)(c,{...e}):null})}var oVc=Kd(K(function(l){let t=c1(l);return _(jtc,t)}),ia);var Ob=Math.min,le=Math.max,tx=Math.round,ex=Math.floor,_d=c=>({x:c,y:c}),Mtc={left:"right",right:"left",bottom:"top",top:"bottom"},Ptc={start:"end",end:"start"};function Ug(c,l,t){return le(c,Ob(l,t))}function zo(c,l){return typeof c=="function"?c(l):c}function Qb(c){return c.split("-")[0]}function sX(c){return c.split("-")[1]}function jg(c){return c==="x"?"y":"x"}function Eg(c){return c==="y"?"height":"width"}var Ktc=new Set(["top","bottom"]);function qd(c){return Ktc.has(Qb(c))?"y":"x"}function Mg(c){return jg(qd(c))}function Fv(c,l,t){t===void 0&&(t=!1);let e=sX(c),d=Mg(c),b=Eg(d),o=d==="x"?e===(t?"end":"start")?"right":"left":e==="start"?"bottom":"top";return l.reference[b]>l.floating[b]&&(o=lx(o)),[o,lx(o)]}function vv(c){let l=lx(c);return[Lg(c),l,Lg(l)]}function Lg(c){return c.replace(/start|end/g,l=>Ptc[l])}var hv=["left","right"],Yv=["right","left"],_tc=["top","bottom"],qtc=["bottom","top"];function $tc(c,l,t){switch(c){case"top":case"bottom":return t?l?Yv:hv:l?hv:Yv;case"left":case"right":return l?_tc:qtc;default:return[]}}function Nv(c,l,t,e){let d=sX(c),b=$tc(Qb(c),t==="start",e);return d&&(b=b.map(o=>o+"-"+d),l&&(b=b.concat(b.map(Lg)))),b}function lx(c){return c.replace(/left|right|bottom|top/g,l=>Mtc[l])}function cec(c){return{top:0,right:0,bottom:0,left:0,...c}}function l1(c){return typeof c!="number"?cec(c):{top:c,right:c,bottom:c,left:c}}function rX(c){let{x:l,y:t,width:e,height:d}=c;return{width:e,height:d,top:t,left:l,right:l+e,bottom:t+d,x:l,y:t}}function fv(c,l,t){let{reference:e,floating:d}=c,b=qd(l),o=Mg(l),n=Eg(o),G=Qb(l),X=b==="y",i=e.x+e.width/2-d.width/2,a=e.y+e.height/2-d.height/2,m=e[n]/2-d[n]/2,x;switch(G){case"top":x={x:i,y:e.y-d.height};break;case"bottom":x={x:i,y:e.y+e.height};break;case"right":x={x:e.x+e.width,y:a};break;case"left":x={x:e.x-d.width,y:a};break;default:x={x:e.x,y:e.y}}switch(sX(l)){case"start":x[o]-=m*(t&&X?-1:1);break;case"end":x[o]+=m*(t&&X?-1:1);break}return x}var Sv=async(c,l,t)=>{let{placement:e="bottom",strategy:d="absolute",middleware:b=[],platform:o}=t,n=b.filter(Boolean),G=await(o.isRTL==null?void 0:o.isRTL(l)),X=await o.getElementRects({reference:c,floating:l,strategy:d}),{x:i,y:a}=fv(X,e,G),m=e,x={},s=0;for(let r=0;r<n.length;r++){let{name:g,fn:Z}=n[r],{x:H,y:R,data:W,reset:I}=await Z({x:i,y:a,initialPlacement:e,placement:m,strategy:d,middlewareData:x,rects:X,platform:o,elements:{reference:c,floating:l}});i=H??i,a=R??a,x={...x,[g]:{...x[g],...W}},I&&s<=50&&(s++,typeof I=="object"&&(I.placement&&(m=I.placement),I.rects&&(X=I.rects===!0?await o.getElementRects({reference:c,floating:l,strategy:d}):I.rects),{x:i,y:a}=fv(X,m,G)),r=-1)}return{x:i,y:a,placement:m,strategy:d,middlewareData:x}};async function Pg(c,l){var t;l===void 0&&(l={});let{x:e,y:d,platform:b,rects:o,elements:n,strategy:G}=c,{boundary:X="clippingAncestors",rootBoundary:i="viewport",elementContext:a="floating",altBoundary:m=!1,padding:x=0}=zo(l,c),s=l1(x),g=n[m?a==="floating"?"reference":"floating":a],Z=rX(await b.getClippingRect({element:(t=await(b.isElement==null?void 0:b.isElement(g)))==null||t?g:g.contextElement||await(b.getDocumentElement==null?void 0:b.getDocumentElement(n.floating)),boundary:X,rootBoundary:i,strategy:G})),H=a==="floating"?{x:e,y:d,width:o.floating.width,height:o.floating.height}:o.reference,R=await(b.getOffsetParent==null?void 0:b.getOffsetParent(n.floating)),W=await(b.isElement==null?void 0:b.isElement(R))?await(b.getScale==null?void 0:b.getScale(R))||{x:1,y:1}:{x:1,y:1},I=rX(b.convertOffsetParentRelativeRectToViewportRelativeRect?await b.convertOffsetParentRelativeRectToViewportRelativeRect({elements:n,rect:H,offsetParent:R,strategy:G}):H);return{top:(Z.top-I.top+s.top)/W.y,bottom:(I.bottom-Z.bottom+s.bottom)/W.y,left:(Z.left-I.left+s.left)/W.x,right:(I.right-Z.right+s.right)/W.x}}var kv=c=>({name:"arrow",options:c,async fn(l){let{x:t,y:e,placement:d,rects:b,platform:o,elements:n,middlewareData:G}=l,{element:X,padding:i=0}=zo(c,l)||{};if(X==null)return{};let a=l1(i),m={x:t,y:e},x=Mg(d),s=Eg(x),r=await o.getDimensions(X),g=x==="y",Z=g?"top":"left",H=g?"bottom":"right",R=g?"clientHeight":"clientWidth",W=b.reference[s]+b.reference[x]-m[x]-b.floating[s],I=m[x]-b.reference[x],B=await(o.getOffsetParent==null?void 0:o.getOffsetParent(X)),p=B?B[R]:0;(!p||!await(o.isElement==null?void 0:o.isElement(B)))&&(p=n.floating[R]||b.floating[s]);let y=W/2-I/2,h=p/2-r[s]/2-1,C=Ob(a[Z],h),J=Ob(a[H],h),f=C,k=p-r[s]-J,F=p/2-r[s]/2+y,T=Ug(f,F,k),L=!G.arrow&&sX(d)!=null&&F!==T&&b.reference[s]/2-(F<f?C:J)-r[s]/2<0,v=L?F<f?F-f:F-k:0;return{[x]:m[x]+v,data:{[x]:T,centerOffset:F-T-v,...L&&{alignmentOffset:v}},reset:L}}});var zv=function(c){return c===void 0&&(c={}),{name:"flip",options:c,async fn(l){var t,e;let{placement:d,middlewareData:b,rects:o,initialPlacement:n,platform:G,elements:X}=l,{mainAxis:i=!0,crossAxis:a=!0,fallbackPlacements:m,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:s="none",flipAlignment:r=!0,...g}=zo(c,l);if((t=b.arrow)!=null&&t.alignmentOffset)return{};let Z=Qb(d),H=qd(n),R=Qb(n)===n,W=await(G.isRTL==null?void 0:G.isRTL(X.floating)),I=m||(R||!r?[lx(n)]:vv(n)),B=s!=="none";!m&&B&&I.push(...Nv(n,r,s,W));let p=[n,...I],y=await Pg(l,g),h=[],C=((e=b.flip)==null?void 0:e.overflows)||[];if(i&&h.push(y[Z]),a){let F=Fv(d,o,W);h.push(y[F[0]],y[F[1]])}if(C=[...C,{placement:d,overflows:h}],!h.every(F=>F<=0)){var J,f;let F=(((J=b.flip)==null?void 0:J.index)||0)+1,T=p[F];if(T&&(!(a==="alignment"?H!==qd(T):!1)||C.every(A=>qd(A.placement)===H?A.overflows[0]>0:!0)))return{data:{index:F,overflows:C},reset:{placement:T}};let L=(f=C.filter(v=>v.overflows[0]<=0).sort((v,A)=>v.overflows[1]-A.overflows[1])[0])==null?void 0:f.placement;if(!L)switch(x){case"bestFit":{var k;let v=(k=C.filter(A=>{if(B){let S=qd(A.placement);return S===H||S==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(S=>S>0).reduce((S,U)=>S+U,0)]).sort((A,S)=>A[1]-S[1])[0])==null?void 0:k[0];v&&(L=v);break}case"initialPlacement":L=n;break}if(d!==L)return{reset:{placement:L}}}return{}}}};var Av=new Set(["left","top"]);async function lec(c,l){let{placement:t,platform:e,elements:d}=c,b=await(e.isRTL==null?void 0:e.isRTL(d.floating)),o=Qb(t),n=sX(t),G=qd(t)==="y",X=Av.has(o)?-1:1,i=b&&G?-1:1,a=zo(l,c),{mainAxis:m,crossAxis:x,alignmentAxis:s}=typeof a=="number"?{mainAxis:a,crossAxis:0,alignmentAxis:null}:{mainAxis:a.mainAxis||0,crossAxis:a.crossAxis||0,alignmentAxis:a.alignmentAxis};return n&&typeof s=="number"&&(x=n==="end"?s*-1:s),G?{x:x*i,y:m*X}:{x:m*X,y:x*i}}var Ov=function(c){return c===void 0&&(c=0),{name:"offset",options:c,async fn(l){var t,e;let{x:d,y:b,placement:o,middlewareData:n}=l,G=await lec(l,c);return o===((t=n.offset)==null?void 0:t.placement)&&(e=n.arrow)!=null&&e.alignmentOffset?{}:{x:d+G.x,y:b+G.y,data:{...G,placement:o}}}}},Qv=function(c){return c===void 0&&(c={}),{name:"shift",options:c,async fn(l){let{x:t,y:e,placement:d}=l,{mainAxis:b=!0,crossAxis:o=!1,limiter:n={fn:g=>{let{x:Z,y:H}=g;return{x:Z,y:H}}},...G}=zo(c,l),X={x:t,y:e},i=await Pg(l,G),a=qd(Qb(d)),m=jg(a),x=X[m],s=X[a];if(b){let g=m==="y"?"top":"left",Z=m==="y"?"bottom":"right",H=x+i[g],R=x-i[Z];x=Ug(H,x,R)}if(o){let g=a==="y"?"top":"left",Z=a==="y"?"bottom":"right",H=s+i[g],R=s-i[Z];s=Ug(H,s,R)}let r=n.fn({...l,[m]:x,[a]:s});return{...r,data:{x:r.x-t,y:r.y-e,enabled:{[m]:b,[a]:o}}}}}},wv=function(c){return c===void 0&&(c={}),{options:c,fn(l){let{x:t,y:e,placement:d,rects:b,middlewareData:o}=l,{offset:n=0,mainAxis:G=!0,crossAxis:X=!0}=zo(c,l),i={x:t,y:e},a=qd(d),m=jg(a),x=i[m],s=i[a],r=zo(n,l),g=typeof r=="number"?{mainAxis:r,crossAxis:0}:{mainAxis:0,crossAxis:0,...r};if(G){let R=m==="y"?"height":"width",W=b.reference[m]-b.floating[R]+g.mainAxis,I=b.reference[m]+b.reference[R]-g.mainAxis;x<W?x=W:x>I&&(x=I)}if(X){var Z,H;let R=m==="y"?"width":"height",W=Av.has(Qb(d)),I=b.reference[a]-b.floating[R]+(W&&((Z=o.offset)==null?void 0:Z[a])||0)+(W?0:g.crossAxis),B=b.reference[a]+b.reference[R]+(W?0:((H=o.offset)==null?void 0:H[a])||0)-(W?g.crossAxis:0);s<I?s=I:s>B&&(s=B)}return{[m]:x,[a]:s}}}},Tv=function(c){return c===void 0&&(c={}),{name:"size",options:c,async fn(l){var t,e;let{placement:d,rects:b,platform:o,elements:n}=l,{apply:G=()=>{},...X}=zo(c,l),i=await Pg(l,X),a=Qb(d),m=sX(d),x=qd(d)==="y",{width:s,height:r}=b.floating,g,Z;a==="top"||a==="bottom"?(g=a,Z=m===(await(o.isRTL==null?void 0:o.isRTL(n.floating))?"start":"end")?"left":"right"):(Z=a,g=m==="end"?"top":"bottom");let H=r-i.top-i.bottom,R=s-i.left-i.right,W=Ob(r-i[g],H),I=Ob(s-i[Z],R),B=!l.middlewareData.shift,p=W,y=I;if((t=l.middlewareData.shift)!=null&&t.enabled.x&&(y=R),(e=l.middlewareData.shift)!=null&&e.enabled.y&&(p=H),B&&!m){let C=le(i.left,0),J=le(i.right,0),f=le(i.top,0),k=le(i.bottom,0);x?y=s-2*(C!==0||J!==0?C+J:le(i.left,i.right)):p=r-2*(f!==0||k!==0?f+k:le(i.top,i.bottom))}await G({...l,availableWidth:y,availableHeight:p});let h=await o.getDimensions(n.floating);return s!==h.width||r!==h.height?{reset:{rects:!0}}:{}}}};function Kg(){return typeof window<"u"}function ZX(c){return Lv(c)?(c.nodeName||"").toLowerCase():"#document"}function Be(c){var l;return(c==null||(l=c.ownerDocument)==null?void 0:l.defaultView)||window}function $d(c){var l;return(l=(Lv(c)?c.ownerDocument:c.document)||window.document)==null?void 0:l.documentElement}function Lv(c){return Kg()?c instanceof Node||c instanceof Be(c).Node:!1}function gd(c){return Kg()?c instanceof Element||c instanceof Be(c).Element:!1}function cb(c){return Kg()?c instanceof HTMLElement||c instanceof Be(c).HTMLElement:!1}function Dv(c){return!Kg()||typeof ShadowRoot>"u"?!1:c instanceof ShadowRoot||c instanceof Be(c).ShadowRoot}var tec=new Set(["inline","contents"]);function Ra(c){let{overflow:l,overflowX:t,overflowY:e,display:d}=Zd(c);return/auto|scroll|overlay|hidden|clip/.test(l+e+t)&&!tec.has(d)}var eec=new Set(["table","td","th"]);function Uv(c){return eec.has(ZX(c))}var dec=[":popover-open",":modal"];function dx(c){return dec.some(l=>{try{return c.matches(l)}catch{return!1}})}var bec=["transform","translate","scale","rotate","perspective"],oec=["transform","translate","scale","rotate","perspective","filter"],nec=["paint","layout","strict","content"];function _g(c){let l=qg(),t=gd(c)?Zd(c):c;return bec.some(e=>t[e]?t[e]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!l&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!l&&(t.filter?t.filter!=="none":!1)||oec.some(e=>(t.willChange||"").includes(e))||nec.some(e=>(t.contain||"").includes(e))}function jv(c){let l=Ao(c);for(;cb(l)&&!HX(l);){if(_g(l))return l;if(dx(l))return null;l=Ao(l)}return null}function qg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var Gec=new Set(["html","body","#document"]);function HX(c){return Gec.has(ZX(c))}function Zd(c){return Be(c).getComputedStyle(c)}function bx(c){return gd(c)?{scrollLeft:c.scrollLeft,scrollTop:c.scrollTop}:{scrollLeft:c.scrollX,scrollTop:c.scrollY}}function Ao(c){if(ZX(c)==="html")return c;let l=c.assignedSlot||c.parentNode||Dv(c)&&c.host||$d(c);return Dv(l)?l.host:l}function Ev(c){let l=Ao(c);return HX(l)?c.ownerDocument?c.ownerDocument.body:c.body:cb(l)&&Ra(l)?l:Ev(l)}function gX(c,l,t){var e;l===void 0&&(l=[]),t===void 0&&(t=!0);let d=Ev(c),b=d===((e=c.ownerDocument)==null?void 0:e.body),o=Be(d);if(b){let n=$g(o);return l.concat(o,o.visualViewport||[],Ra(d)?d:[],n&&t?gX(n):[])}return l.concat(d,gX(d,[],t))}function $g(c){return c.parent&&Object.getPrototypeOf(c.parent)?c.frameElement:null}function _v(c){let l=Zd(c),t=parseFloat(l.width)||0,e=parseFloat(l.height)||0,d=cb(c),b=d?c.offsetWidth:t,o=d?c.offsetHeight:e,n=tx(t)!==b||tx(e)!==o;return n&&(t=b,e=o),{width:t,height:e,$:n}}function e1(c){return gd(c)?c:c.contextElement}function Ia(c){let l=e1(c);if(!cb(l))return _d(1);let t=l.getBoundingClientRect(),{width:e,height:d,$:b}=_v(l),o=(b?tx(t.width):t.width)/e,n=(b?tx(t.height):t.height)/d;return(!o||!Number.isFinite(o))&&(o=1),(!n||!Number.isFinite(n))&&(n=1),{x:o,y:n}}var Xec=_d(0);function qv(c){let l=Be(c);return!qg()||!l.visualViewport?Xec:{x:l.visualViewport.offsetLeft,y:l.visualViewport.offsetTop}}function iec(c,l,t){return l===void 0&&(l=!1),!t||l&&t!==Be(c)?!1:l}function RX(c,l,t,e){l===void 0&&(l=!1),t===void 0&&(t=!1);let d=c.getBoundingClientRect(),b=e1(c),o=_d(1);l&&(e?gd(e)&&(o=Ia(e)):o=Ia(c));let n=iec(b,t,e)?qv(b):_d(0),G=(d.left+n.x)/o.x,X=(d.top+n.y)/o.y,i=d.width/o.x,a=d.height/o.y;if(b){let m=Be(b),x=e&&gd(e)?Be(e):e,s=m,r=$g(s);for(;r&&e&&x!==s;){let g=Ia(r),Z=r.getBoundingClientRect(),H=Zd(r),R=Z.left+(r.clientLeft+parseFloat(H.paddingLeft))*g.x,W=Z.top+(r.clientTop+parseFloat(H.paddingTop))*g.y;G*=g.x,X*=g.y,i*=g.x,a*=g.y,G+=R,X+=W,s=Be(r),r=$g(s)}}return rX({width:i,height:a,x:G,y:X})}function cZ(c,l){let t=bx(c).scrollLeft;return l?l.left+t:RX($d(c)).left+t}function $v(c,l){let t=c.getBoundingClientRect(),e=t.left+l.scrollLeft-cZ(c,t),d=t.top+l.scrollTop;return{x:e,y:d}}function aec(c){let{elements:l,rect:t,offsetParent:e,strategy:d}=c,b=d==="fixed",o=$d(e),n=l?dx(l.floating):!1;if(e===o||n&&b)return t;let G={scrollLeft:0,scrollTop:0},X=_d(1),i=_d(0),a=cb(e);if((a||!a&&!b)&&((ZX(e)!=="body"||Ra(o))&&(G=bx(e)),cb(e))){let x=RX(e);X=Ia(e),i.x=x.x+e.clientLeft,i.y=x.y+e.clientTop}let m=o&&!a&&!b?$v(o,G):_d(0);return{width:t.width*X.x,height:t.height*X.y,x:t.x*X.x-G.scrollLeft*X.x+i.x+m.x,y:t.y*X.y-G.scrollTop*X.y+i.y+m.y}}function uec(c){return Array.from(c.getClientRects())}function mec(c){let l=$d(c),t=bx(c),e=c.ownerDocument.body,d=le(l.scrollWidth,l.clientWidth,e.scrollWidth,e.clientWidth),b=le(l.scrollHeight,l.clientHeight,e.scrollHeight,e.clientHeight),o=-t.scrollLeft+cZ(c),n=-t.scrollTop;return Zd(e).direction==="rtl"&&(o+=le(l.clientWidth,e.clientWidth)-d),{width:d,height:b,x:o,y:n}}var Mv=25;function xec(c,l){let t=Be(c),e=$d(c),d=t.visualViewport,b=e.clientWidth,o=e.clientHeight,n=0,G=0;if(d){b=d.width,o=d.height;let i=qg();(!i||i&&l==="fixed")&&(n=d.offsetLeft,G=d.offsetTop)}let X=cZ(e);if(X<=0){let i=e.ownerDocument,a=i.body,m=getComputedStyle(a),x=i.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,s=Math.abs(e.clientWidth-a.clientWidth-x);s<=Mv&&(b-=s)}else X<=Mv&&(b+=X);return{width:b,height:o,x:n,y:G}}var sec=new Set(["absolute","fixed"]);function rec(c,l){let t=RX(c,!0,l==="fixed"),e=t.top+c.clientTop,d=t.left+c.clientLeft,b=cb(c)?Ia(c):_d(1),o=c.clientWidth*b.x,n=c.clientHeight*b.y,G=d*b.x,X=e*b.y;return{width:o,height:n,x:G,y:X}}function Pv(c,l,t){let e;if(l==="viewport")e=xec(c,t);else if(l==="document")e=mec($d(c));else if(gd(l))e=rec(l,t);else{let d=qv(c);e={x:l.x-d.x,y:l.y-d.y,width:l.width,height:l.height}}return rX(e)}function cN(c,l){let t=Ao(c);return t===l||!gd(t)||HX(t)?!1:Zd(t).position==="fixed"||cN(t,l)}function gec(c,l){let t=l.get(c);if(t)return t;let e=gX(c,[],!1).filter(n=>gd(n)&&ZX(n)!=="body"),d=null,b=Zd(c).position==="fixed",o=b?Ao(c):c;for(;gd(o)&&!HX(o);){let n=Zd(o),G=_g(o);!G&&n.position==="fixed"&&(d=null),(b?!G&&!d:!G&&n.position==="static"&&!!d&&sec.has(d.position)||Ra(o)&&!G&&cN(c,o))?e=e.filter(i=>i!==o):d=n,o=Ao(o)}return l.set(c,e),e}function Zec(c){let{element:l,boundary:t,rootBoundary:e,strategy:d}=c,o=[...t==="clippingAncestors"?dx(l)?[]:gec(l,this._c):[].concat(t),e],n=o[0],G=o.reduce((X,i)=>{let a=Pv(l,i,d);return X.top=le(a.top,X.top),X.right=Ob(a.right,X.right),X.bottom=Ob(a.bottom,X.bottom),X.left=le(a.left,X.left),X},Pv(l,n,d));return{width:G.right-G.left,height:G.bottom-G.top,x:G.left,y:G.top}}function Hec(c){let{width:l,height:t}=_v(c);return{width:l,height:t}}function Rec(c,l,t){let e=cb(l),d=$d(l),b=t==="fixed",o=RX(c,!0,b,l),n={scrollLeft:0,scrollTop:0},G=_d(0);function X(){G.x=cZ(d)}if(e||!e&&!b)if((ZX(l)!=="body"||Ra(d))&&(n=bx(l)),e){let x=RX(l,!0,b,l);G.x=x.x+l.clientLeft,G.y=x.y+l.clientTop}else d&&X();b&&!e&&d&&X();let i=d&&!e&&!b?$v(d,n):_d(0),a=o.left+n.scrollLeft-G.x-i.x,m=o.top+n.scrollTop-G.y-i.y;return{x:a,y:m,width:o.width,height:o.height}}function t1(c){return Zd(c).position==="static"}function Kv(c,l){if(!cb(c)||Zd(c).position==="fixed")return null;if(l)return l(c);let t=c.offsetParent;return $d(c)===t&&(t=t.ownerDocument.body),t}function lN(c,l){let t=Be(c);if(dx(c))return t;if(!cb(c)){let d=Ao(c);for(;d&&!HX(d);){if(gd(d)&&!t1(d))return d;d=Ao(d)}return t}let e=Kv(c,l);for(;e&&Uv(e)&&t1(e);)e=Kv(e,l);return e&&HX(e)&&t1(e)&&!_g(e)?t:e||jv(c)||t}var Iec=async function(c){let l=this.getOffsetParent||lN,t=this.getDimensions,e=await t(c.floating);return{reference:Rec(c.reference,await l(c.floating),c.strategy),floating:{x:0,y:0,width:e.width,height:e.height}}};function Wec(c){return Zd(c).direction==="rtl"}var tN={convertOffsetParentRelativeRectToViewportRelativeRect:aec,getDocumentElement:$d,getClippingRect:Zec,getOffsetParent:lN,getElementRects:Iec,getClientRects:uec,getDimensions:Hec,getScale:Ia,isElement:gd,isRTL:Wec};function eN(c,l){return c.x===l.x&&c.y===l.y&&c.width===l.width&&c.height===l.height}function pec(c,l){let t=null,e,d=$d(c);function b(){var n;clearTimeout(e),(n=t)==null||n.disconnect(),t=null}function o(n,G){n===void 0&&(n=!1),G===void 0&&(G=1),b();let X=c.getBoundingClientRect(),{left:i,top:a,width:m,height:x}=X;if(n||l(),!m||!x)return;let s=ex(a),r=ex(d.clientWidth-(i+m)),g=ex(d.clientHeight-(a+x)),Z=ex(i),R={rootMargin:-s+"px "+-r+"px "+-g+"px "+-Z+"px",threshold:le(0,Ob(1,G))||1},W=!0;function I(B){let p=B[0].intersectionRatio;if(p!==G){if(!W)return o();p?o(!1,p):e=setTimeout(()=>{o(!1,1e-7)},1e3)}p===1&&!eN(X,c.getBoundingClientRect())&&o(),W=!1}try{t=new IntersectionObserver(I,{...R,root:d.ownerDocument})}catch{t=new IntersectionObserver(I,R)}t.observe(c)}return o(!0),b}function ox(c,l,t,e){e===void 0&&(e={});let{ancestorScroll:d=!0,ancestorResize:b=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:n=typeof IntersectionObserver=="function",animationFrame:G=!1}=e,X=e1(c),i=d||b?[...X?gX(X):[],...gX(l)]:[];i.forEach(Z=>{d&&Z.addEventListener("scroll",t,{passive:!0}),b&&Z.addEventListener("resize",t)});let a=X&&n?pec(X,t):null,m=-1,x=null;o&&(x=new ResizeObserver(Z=>{let[H]=Z;H&&H.target===X&&x&&(x.unobserve(l),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var R;(R=x)==null||R.observe(l)})),t()}),X&&!G&&x.observe(X),x.observe(l));let s,r=G?RX(c):null;G&&g();function g(){let Z=RX(c);r&&!eN(r,Z)&&t(),r=Z,s=requestAnimationFrame(g)}return t(),()=>{var Z;i.forEach(H=>{d&&H.removeEventListener("scroll",t),b&&H.removeEventListener("resize",t)}),a?.(),(Z=x)==null||Z.disconnect(),x=null,G&&cancelAnimationFrame(s)}}var nx=Ov;var Gx=Qv,Xx=zv,IX=Tv;var ix=kv;var ax=wv,ux=(c,l,t)=>{let e=new Map,d={platform:tN,...t},b={...d.platform,_c:e};return Sv(c,l,{...d,platform:b})};var lZ=u(E(),1),d1=u(V(),1),Bec="div";function dN(c=0,l=0,t=0,e=0){if(typeof DOMRect=="function")return new DOMRect(c,l,t,e);let d={x:c,y:l,width:t,height:e,top:l,right:c+t,bottom:l+e,left:c};return{...d,toJSON:()=>d}}function yec(c){if(!c)return dN();let{x:l,y:t,width:e,height:d}=c;return dN(l,t,e,d)}function Vec(c,l){return{contextElement:c||void 0,getBoundingClientRect:()=>{let e=c,d=l?.(e);return d||!e?yec(d):e.getBoundingClientRect()}}}function Cec(c){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(c)}function bN(c){let l=window.devicePixelRatio||1;return Math.round(c*l)/l}function Jec(c,l){return nx(({placement:t})=>{var e;let d=(c?.clientHeight||0)/2,b=typeof l.gutter=="number"?l.gutter+d:(e=l.gutter)!=null?e:d;return{crossAxis:!!t.split("-")[1]?void 0:l.shift,mainAxis:b,alignmentAxis:l.shift}})}function hec(c){if(c.flip===!1)return;let l=typeof c.flip=="string"?c.flip.split(" "):void 0;return sc(!l||l.every(Cec),!1),Xx({padding:c.overflowPadding,fallbackPlacements:l})}function Yec(c){if(!(!c.slide&&!c.overlap))return Gx({mainAxis:c.slide,crossAxis:c.overlap,padding:c.overflowPadding,limiter:ax()})}function Fec(c){return IX({padding:c.overflowPadding,apply({elements:l,availableWidth:t,availableHeight:e,rects:d}){let b=l.floating,o=Math.round(d.reference.width);t=Math.floor(t),e=Math.floor(e),b.style.setProperty("--popover-anchor-width",`${o}px`),b.style.setProperty("--popover-available-width",`${t}px`),b.style.setProperty("--popover-available-height",`${e}px`),c.sameWidth&&(b.style.width=`${o}px`),c.fitViewport&&(b.style.maxWidth=`${t}px`,b.style.maxHeight=`${e}px`)}})}function vec(c,l){if(c)return ix({element:c,padding:l.arrowPadding})}var mx=q(function({store:l,modal:t=!1,portal:e=!!t,preserveTabOrder:d=!0,autoFocusOnShow:b=!0,wrapperProps:o,fixed:n=!1,flip:G=!0,shift:X=0,slide:i=!0,overlap:a=!1,sameWidth:m=!1,fitViewport:x=!1,gutter:s,arrowPadding:r=4,overflowPadding:g=8,getAnchorRect:Z,updatePosition:H,...R}){let W=XX();l=l||W,sc(l,!1);let I=l.useState("arrowElement"),B=l.useState("anchorElement"),p=l.useState("disclosureElement"),y=l.useState("popoverElement"),h=l.useState("contentElement"),C=l.useState("placement"),J=l.useState("mounted"),f=l.useState("rendered"),k=(0,lZ.useRef)(null),[F,T]=(0,lZ.useState)(!1),{portalRef:L,domReady:v}=ca(e,R.portalRef),A=Gc(Z),S=Gc(H),U=!!H;Sc(()=>{if(!y?.isConnected)return;y.style.setProperty("--popover-overflow-padding",`${g}px`);let bc=Vec(B,A),j=async()=>{if(!J)return;I||(k.current=k.current||document.createElement("div"));let oc=I||k.current,Hc=[Jec(oc,{gutter:s,shift:X}),hec({flip:G,overflowPadding:g}),Yec({slide:i,shift:X,overlap:a,overflowPadding:g}),vec(oc,{arrowPadding:r}),Fec({sameWidth:m,fitViewport:x,overflowPadding:g})],Bc=await ux(bc,y,{placement:C,strategy:n?"fixed":"absolute",middleware:Hc});l?.setState("currentPlacement",Bc.placement),T(!0);let wc=bN(Bc.x),Wl=bN(Bc.y);if(Object.assign(y.style,{top:"0",left:"0",transform:`translate3d(${wc}px,${Wl}px,0)`}),oc&&Bc.middlewareData.arrow){let{x:sl,y:tl}=Bc.middlewareData.arrow,gc=Bc.placement.split("-")[0],Zl=oc.clientWidth/2,zl=oc.clientHeight/2,uc=sl!=null?sl+Zl:-Zl,vc=tl!=null?tl+zl:-zl;y.style.setProperty("--popover-transform-origin",{top:`${uc}px calc(100% + ${zl}px)`,bottom:`${uc}px ${-zl}px`,left:`calc(100% + ${Zl}px) ${vc}px`,right:`${-Zl}px ${vc}px`}[gc]),Object.assign(oc.style,{left:sl!=null?`${sl}px`:"",top:tl!=null?`${tl}px`:"",[gc]:"100%"})}},M=ox(bc,y,async()=>{U?(await S({updatePosition:j}),T(!0)):await j()},{elementResize:typeof ResizeObserver=="function"});return()=>{T(!1),M()}},[l,f,y,I,B,y,C,J,v,n,G,X,i,a,m,x,s,r,g,A,U,S]),Sc(()=>{if(!J||!v||!y?.isConnected||!h?.isConnected)return;let bc=()=>{y.style.zIndex=getComputedStyle(h).zIndex};bc();let j=requestAnimationFrame(()=>{j=requestAnimationFrame(bc)});return()=>cancelAnimationFrame(j)},[J,v,y,h]);let P=n?"fixed":"absolute";return R=Wc(R,bc=>(0,d1.jsx)("div",{...o,style:{position:P,top:0,left:0,width:"max-content",...o?.style},ref:l?.setPopoverElement,children:bc}),[l,P,o]),R=Wc(R,bc=>(0,d1.jsx)(zb,{value:l,children:bc}),[l]),R={"data-placing":!F||void 0,...R,style:{position:"relative",...R.style}},R=c1({store:l,modal:t,portal:e,preserveTabOrder:d,preserveTabOrderAnchor:p||B,autoFocusOnShow:F&&b,...R,portalRef:L}),R}),JVc=Kd(K(function(l){let t=mx(l);return _(Bec,t)}),XX);var Ql=u(E(),1),b1=u(V(),1),Nec="div";function nN(c,l,t,e){return ud(l)?!0:c?!!(_c(l,c)||t&&_c(t,c)||e?.some(d=>nN(c,d,t))):!1}function fec({store:c,...l}){let[t,e]=(0,Ql.useState)(!1),d=c.useState("mounted");(0,Ql.useEffect)(()=>{d||e(!1)},[d]);let b=l.onFocus,o=Gc(G=>{b?.(G),!G.defaultPrevented&&e(!0)}),n=(0,Ql.useRef)(null);return(0,Ql.useEffect)(()=>Mc(c,["anchorElement"],G=>{n.current=G.anchorElement}),[]),l={autoFocusOnHide:t,finalFocus:n,...l,onFocus:o},l}var oN=(0,Ql.createContext)(null),xx=q(function({store:l,modal:t=!1,portal:e=!!t,hideOnEscape:d=!0,hideOnHoverOutside:b=!0,disablePointerEventsOnApproach:o=!!b,...n}){let G=jm();l=l||G,sc(l,!1);let X=(0,Ql.useRef)(null),[i,a]=(0,Ql.useState)([]),m=(0,Ql.useRef)(0),x=(0,Ql.useRef)(null),{portalRef:s,domReady:r}=ca(e,n.portalRef),g=la(),Z=!!b,H=qc(b),R=!!o,W=qc(o),I=l.useState("open"),B=l.useState("mounted");(0,Ql.useEffect)(()=>{if(!r||!B||!Z&&!R)return;let J=X.current;return J?ul(Yl("mousemove",k=>{if(!l||!g())return;let{anchorElement:F,hideTimeout:T,timeout:L}=l.getState(),v=x.current,[A]=k.composedPath(),S=F;if(nN(A,J,S,i)){x.current=A&&S&&_c(S,A)?zg(k):null,window.clearTimeout(m.current),m.current=0;return}if(!m.current){if(v){let U=zg(k),P=Oy(J,v);if(Ay(U,P)){if(x.current=U,!W(k))return;k.preventDefault(),k.stopPropagation();return}}H(k)&&(m.current=window.setTimeout(()=>{m.current=0,l?.hide()},T??L))}},!0),()=>clearTimeout(m.current)):void 0},[l,g,r,B,Z,R,i,W,H]),(0,Ql.useEffect)(()=>{if(!r||!B||!R)return;let J=f=>{let k=X.current;if(!k)return;let F=x.current;if(!F)return;let T=Oy(k,F);if(Ay(zg(f),T)){if(!W(f))return;f.preventDefault(),f.stopPropagation()}};return ul(Yl("mouseenter",J,!0),Yl("mouseover",J,!0),Yl("mouseout",J,!0),Yl("mouseleave",J,!0))},[r,B,R,W]),(0,Ql.useEffect)(()=>{r&&(I||l?.setAutoFocusOnShow(!1))},[l,r,I]);let p=rg(I);(0,Ql.useEffect)(()=>{if(r)return()=>{p.current||l?.setAutoFocusOnShow(!1)}},[l,r]);let y=(0,Ql.useContext)(oN);Sc(()=>{if(t||!e||!B||!r)return;let J=X.current;if(J)return y?.(J)},[t,e,B,r]);let h=(0,Ql.useCallback)(J=>{a(k=>[...k,J]);let f=y?.(J);return()=>{a(k=>k.filter(F=>F!==J)),f?.()}},[y]);n=Wc(n,J=>(0,b1.jsx)(ra,{value:l,children:(0,b1.jsx)(oN.Provider,{value:h,children:J})}),[l,h]),n={...n,ref:yc(X,n.ref)},n=fec({store:l,...n});let C=l.useState(J=>t||J.autoFocusOnShow);return n=mx({store:l,modal:t,portal:e,autoFocusOnShow:C,...n,portalRef:s,hideOnEscape(J){return Yb(d,J)?!1:(requestAnimationFrame(()=>{requestAnimationFrame(()=>{l?.hide()})}),!0)}}),n}),wVc=Kd(K(function(l){let t=xx(l);return _(Nec,t)}),jm);var GN=u(V(),1),Sec="div",kec=q(function({store:l,portal:t=!0,gutter:e=8,preserveTabOrder:d=!1,hideOnHoverOutside:b=!0,hideOnInteractOutside:o=!0,...n}){let G=Mm();return l=l||G,sc(l,!1),n=Wc(n,i=>(0,GN.jsx)(ev,{value:l,children:i}),[l]),n={role:l.useState(i=>i.type==="description"?"tooltip":"none"),...n},n=xx({...n,store:l,portal:t,gutter:e,preserveTabOrder:d,hideOnHoverOutside(i){if(Yb(b,i))return!1;let a=l?.getState().anchorElement;return a?!("focusVisible"in a.dataset):!0},hideOnInteractOutside:i=>{if(Yb(o,i))return!1;let a=l?.getState().anchorElement;return a?!_c(a,i.target):!0}}),n}),tZ=Kd(K(function(l){let t=kec(l);return _(Sec,t)}),Mm);var WX=u(E(),1),zec="a",sx=q(function({store:l,showOnHover:t=!0,...e}){let d=jm();l=l||d,sc(l,!1);let b=bt(e),o=(0,WX.useRef)(0);(0,WX.useEffect)(()=>()=>window.clearTimeout(o.current),[]),(0,WX.useEffect)(()=>Yl("mouseleave",r=>{if(!l)return;let{anchorElement:g}=l.getState();g&&r.target===g&&(window.clearTimeout(o.current),o.current=0)},!0),[l]);let n=e.onMouseMove,G=qc(t),X=la(),i=Gc(s=>{if(n?.(s),b||!l||s.defaultPrevented||o.current||!X()||!G(s))return;let r=s.currentTarget;l.setAnchorElement(r),l.setDisclosureElement(r);let{showTimeout:g,timeout:Z}=l.getState(),H=()=>{o.current=0,X()&&(l?.setAnchorElement(r),l?.show(),queueMicrotask(()=>{l?.setDisclosureElement(r)}))},R=g??Z;R===0?H():o.current=window.setTimeout(H,R)}),a=e.onClick,m=Gc(s=>{a?.(s),l&&(window.clearTimeout(o.current),o.current=0)}),x=(0,WX.useCallback)(s=>{if(!l)return;let{anchorElement:r}=l.getState();r?.isConnected||l.setAnchorElement(s)},[l]);return e={...e,ref:yc(x,e.ref),onMouseMove:i,onClick:m},e=Ud(e),e}),e2c=K(function(l){let t=sx(l);return _(zec,t)});var rx=u(E(),1),Aec="div",pX=Xl({activeStore:null});function XN(c){return()=>{let{activeStore:l}=pX.getState();l===c&&pX.setState("activeStore",null)}}var Oec=q(function({store:l,showOnHover:t=!0,...e}){let d=Mm();l=l||d,sc(l,!1);let b=(0,rx.useRef)(!1);(0,rx.useEffect)(()=>Mc(l,["mounted"],s=>{s.mounted||(b.current=!1)}),[l]),(0,rx.useEffect)(()=>{if(l)return ul(XN(l),Mc(l,["mounted","skipTimeout"],s=>{if(!l)return;if(s.mounted){let{activeStore:g}=pX.getState();return g!==l&&g?.hide(),pX.setState("activeStore",l)}let r=setTimeout(XN(l),s.skipTimeout);return()=>clearTimeout(r)}))},[l]);let o=e.onMouseEnter,n=Gc(s=>{o?.(s),b.current=!0}),G=e.onFocusVisible,X=Gc(s=>{G?.(s),!s.defaultPrevented&&(l?.setAnchorElement(s.currentTarget),l?.show())}),i=e.onBlur,a=Gc(s=>{if(i?.(s),s.defaultPrevented)return;let{activeStore:r}=pX.getState();b.current=!1,r===l&&pX.setState("activeStore",null)}),m=l.useState("type"),x=l.useState(s=>{var r;return(r=s.contentElement)==null?void 0:r.id});return e={"aria-labelledby":m==="label"?x:void 0,...e,onMouseEnter:n,onFocusVisible:X,onBlur:a},e=sx({store:l,showOnHover(s){if(!b.current||Yb(t,s))return!1;let{activeStore:r}=pX.getState();return r?(l?.show(),!1):!0},...e}),e}),eZ=K(function(l){let t=Oec(l);return _(Aec,t)});function dZ({popover:c,...l}={}){let t=jd(l.store,md(c,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"]));let e=t?.getState(),d=cx({...l,store:t}),b=ac(l.placement,e?.placement,"bottom"),o={...d.getState(),placement:b,currentPlacement:b,anchorElement:ac(e?.anchorElement,null),popoverElement:ac(e?.popoverElement,null),arrowElement:ac(e?.arrowElement,null),rendered:Symbol("rendered")},n=Xl(o,d,t);return{...d,...n,setAnchorElement:G=>n.setState("anchorElement",G),setPopoverElement:G=>n.setState("popoverElement",G),setArrowElement:G=>n.setState("arrowElement",G),render:()=>n.setState("rendered",Symbol("rendered"))}}function bZ(c,l,t){return $t(l,[t.popover]),zc(c,t,"placement"),$y(c,l,t)}function oZ(c={}){var l;let t=(l=c.store)==null?void 0:l.getState(),e=dZ({...c,placement:ac(c.placement,t?.placement,"bottom")}),d=ac(c.timeout,t?.timeout,500),b={...e.getState(),timeout:d,showTimeout:ac(c.showTimeout,t?.showTimeout),hideTimeout:ac(c.hideTimeout,t?.hideTimeout),autoFocusOnShow:ac(t?.autoFocusOnShow,!1)},o=Xl(b,e,c.store);return{...e,...o,setAutoFocusOnShow:n=>o.setState("autoFocusOnShow",n)}}function nZ(c,l,t){return zc(c,t,"timeout"),zc(c,t,"showTimeout"),zc(c,t,"hideTimeout"),bZ(c,l,t)}function iN(c={}){var l;let t=(l=c.store)==null?void 0:l.getState(),e=oZ({...c,placement:ac(c.placement,t?.placement,"top"),hideTimeout:ac(c.hideTimeout,t?.hideTimeout,0)}),d={...e.getState(),type:ac(c.type,t?.type,"description"),skipTimeout:ac(c.skipTimeout,t?.skipTimeout,300)},b=Xl(d,e,c.store);return{...e,...b}}function aN(c,l,t){return zc(c,t,"type"),zc(c,t,"skipTimeout"),nZ(c,l,t)}function gx(c={}){let[l,t]=Bl(iN,c);return aN(l,t,c)}var uN=u(E(),1),Zx=ol([At],[pe]),mN=Zx.useContext,xN=Zx.useScopedContext,w2c=Zx.useProviderContext,T2c=Zx.ContextProvider,D2c=Zx.ScopedContextProvider,L2c=(0,uN.createContext)(void 0);var wec="div",o1=q(function({store:l,...t}){let e=XX();return l=l||e,t={...t,ref:yc(l?.setAnchorElement,t.ref)},t}),P2c=K(function(l){let t=o1(l);return _(wec,t)});var Wa=u(E(),1),sN="button",n1=q(function(l){let t=(0,Wa.useRef)(null),e=kn(t,sN),[d,b]=(0,Wa.useState)(()=>!!e&&We({tagName:e,type:l.type}));return(0,Wa.useEffect)(()=>{t.current&&b(We(t.current))},[]),l={role:!d&&e!=="a"?"button":void 0,...l,ref:yc(t,l.ref)},l=nX(l),l}),lCc=K(function(l){let t=n1(l);return _(sN,t)});var pa=u(E(),1),Tec="button",Dec=Symbol("disclosure"),G1=q(function({store:l,toggleOnClick:t=!0,...e}){let d=Sm();l=l||d,sc(l,!1);let b=(0,pa.useRef)(null),[o,n]=(0,pa.useState)(!1),G=l.useState("disclosureElement"),X=l.useState("open");(0,pa.useEffect)(()=>{let g=G===b.current;G?.isConnected||(l?.setDisclosureElement(b.current),g=!0),n(X&&g)},[G,l,X]);let i=e.onClick,a=qc(t),[m,x]=Zg(e,Dec,!0),s=Gc(g=>{i?.(g),!g.defaultPrevented&&(m||a(g)&&(l?.setDisclosureElement(g.currentTarget),l?.toggle()))}),r=l.useState("contentElement");return e={"aria-expanded":o,"aria-controls":r?.id,...x,...e,ref:yc(b,e.ref),onClick:s},e=n1(e),e}),Lec=K(function(l){let t=G1(l);return _(Tec,t)});var Uec="button",X1=q(function({store:l,...t}){let e=ia();l=l||e,sc(l,!1);let d=l.useState("contentElement");return t={"aria-haspopup":fn(d,"dialog"),...t},t=G1({store:l,...t}),t}),xCc=K(function(l){let t=X1(l);return _(Uec,t)});var rN=u(V(),1),jec="button",Hx=q(function({store:l,...t}){let e=XX();l=l||e,sc(l,!1);let d=t.onClick,b=Gc(o=>{l?.setAnchorElement(o.currentTarget),d?.(o)});return t=Wc(t,o=>(0,rN.jsx)(zb,{value:l,children:o}),[l]),t={...t,onClick:b},t=o1({store:l,...t}),t=X1({store:l,...t}),t}),WCc=K(function(l){let t=Hx(l);return _(jec,t)});var gN=u(E(),1),i1=u(V(),1),Eec="span",Mec={top:"4,10 8,6 12,10",right:"6,4 10,8 6,12",bottom:"4,6 8,10 12,6",left:"10,4 6,8 10,12"},a1=q(function({store:l,placement:t,...e}){let d=wF();l=l||d,sc(l,!1);let o=l.useState(X=>t||X.placement).split("-")[0],n=Mec[o];return e={children:(0,gN.useMemo)(()=>(0,i1.jsx)("svg",{display:"block",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,viewBox:"0 0 16 16",height:"1em",width:"1em",children:(0,i1.jsx)("polyline",{points:n})}),[n]),"aria-hidden":!0,...e,style:{width:"1em",height:"1em",pointerEvents:"none",...e.style}},Gl(e)}),CCc=K(function(l){let t=a1(l);return _(Eec,t)});var Rx=ol([At],[pe]),u1=Rx.useContext,FCc=Rx.useScopedContext,ZN=Rx.useProviderContext,vCc=Rx.ContextProvider,HN=Rx.ScopedContextProvider;var Ix=u(E(),1),RN="input";function Pec(c,l){if(l!==void 0)return c!=null&&l!=null?l===c:!!l}function Kec(c,l){return c==="input"&&(!l||l==="radio")}var GZ=q(function({store:l,name:t,value:e,checked:d,...b}){let o=u1();l=l||o;let n=bl(b.id),G=(0,Ix.useRef)(null),X=xc(l,I=>d??Pec(e,I?.value));(0,Ix.useEffect)(()=>{!n||!X||l?.getState().activeId===n||l?.setActiveId(n)},[l,X,n]);let i=b.onChange,a=kn(G,RN),m=Kec(a,b.type),x=bt(b),[s,r]=$i();(0,Ix.useEffect)(()=>{let I=G.current;I&&(m||(X!==void 0&&(I.checked=X),t!==void 0&&(I.name=t),e!==void 0&&(I.value=`${e}`)))},[s,m,X,t,e]);let g=Gc(I=>{if(x){I.preventDefault(),I.stopPropagation();return}l?.getState().value!==e&&(m||(I.currentTarget.checked=!0,r()),i?.(I),!I.defaultPrevented&&l?.setValue(e))}),Z=b.onClick,H=Gc(I=>{Z?.(I),!I.defaultPrevented&&(m||g(I))}),R=b.onFocus,W=Gc(I=>{if(R?.(I),I.defaultPrevented||!m||!l)return;let{moves:B,activeId:p}=l.getState();B&&(n&&p!==n||g(I))});return b={id:n,role:m?void 0:"radio",type:m?"radio":void 0,"aria-checked":X,...b,ref:yc(G,b.ref),onChange:g,onClick:H,onFocus:W},b=xd({store:l,clickOnEnter:!m,...b}),Gl({name:m?t:void 0,value:m?e:void 0,checked:X,...b})}),BX=El(K(function(l){let t=GZ(l);return _(RN,t)}));var IN=u(V(),1),_ec="div",qec=q(function({store:l,...t}){let e=ZN();return l=l||e,sc(l,!1),t=Wc(t,d=>(0,IN.jsx)(HN,{value:l,children:d}),[l]),t={role:"radiogroup",...t},t=sd({store:l,...t}),t}),Ba=K(function(l){let t=qec(l);return _(_ec,t)});function WN({...c}={}){var l;let t=(l=c.store)==null?void 0:l.getState(),e=Ue({...c,focusLoop:ac(c.focusLoop,t?.focusLoop,!0)}),d={...e.getState(),value:ac(c.value,t?.value,c.defaultValue,null)},b=Xl(d,e,c.store);return{...e,...b,setValue:o=>b.setState("value",o)}}function pN(c,l,t){return c=rd(c,l,t),zc(c,t,"value","setValue"),c}function yX(c={}){let[l,t]=Bl(WN,c);return pN(l,t,c)}var cdc="span",ldc=q(function({store:l,...t}){let e=iX();return l=l||e,t=a1({store:l,...t}),t}),m1=K(function(l){let t=ldc(l);return _(cdc,t)});var BN=u(E(),1),tdc="div",Oo="";function x1(){Oo=""}function edc(c){let l=c.target;return l&&qt(l)?!1:c.key===" "&&Oo.length?!0:c.key.length===1&&!c.ctrlKey&&!c.altKey&&!c.metaKey&&/^[\p{Letter}\p{Number}]$/u.test(c.key)}function ddc(c,l){if(jl(c))return!0;let t=c.target;return t?l.some(d=>d.element===t):!1}function bdc(c){return c.filter(l=>!l.disabled)}function XZ(c,l){var t;let e=((t=c.element)==null?void 0:t.textContent)||c.children||"value"in c&&c.value;return e?uy(e).trim().toLowerCase().startsWith(l.toLowerCase()):!1}function odc(c,l,t){if(!t)return c;let e=c.find(d=>d.id===t);return!e||!XZ(e,l)||Oo!==l&&XZ(e,Oo)?c:(Oo=l,$9(c.filter(d=>XZ(d,Oo)),t).filter(d=>d.id!==t))}var wb=q(function({store:l,typeahead:t=!0,...e}){let d=Ld();l=l||d,sc(l,!1);let b=e.onKeyDownCapture,o=(0,BN.useRef)(0),n=Gc(G=>{if(b?.(G),G.defaultPrevented||!t||!l)return;if(!edc(G))return x1();let{renderedItems:X,items:i,activeId:a,id:m}=l.getState(),x=bdc(i.length>X.length?i:X),s=Ac(G.currentTarget),r=`[data-offscreen-id="${m}"]`,g=s.querySelectorAll(r);for(let R of g){let W=R.ariaDisabled==="true"||"disabled"in R&&!!R.disabled;x.push({id:R.id,element:R,disabled:W})}if(g.length&&(x=Bm(x,R=>R.element)),!ddc(G,x))return x1();G.preventDefault(),window.clearTimeout(o.current),o.current=window.setTimeout(()=>{Oo=""},500);let Z=G.key.toLowerCase();Oo+=Z,x=odc(x,Z,a);let H=x.find(R=>XZ(R,Oo));H?l.move(H.id):x1()});return e={...e,onKeyDownCapture:n},Gl(e)}),Wx=K(function(l){let t=wb(l);return _(tdc,t)});var Tn=u(E(),1),Hd=u(V(),1),ndc="button";function Gdc(c){return Array.from(c.selectedOptions).map(l=>l.value)}function iZ(c,l){return()=>{let t=l();if(!t)return;let e=0,d=c.item(t),b=d;for(;d&&d.value==null;){let o=l(++e);if(!o)return;if(d=c.item(o),d===b)break}return d?.id}}var Xdc=q(function({store:l,name:t,form:e,required:d,showOnKeyDown:b=!0,moveOnKeyDown:o=!0,toggleOnPress:n=!0,toggleOnClick:G=n,...X}){let i=aX();l=l||i,sc(l,!1);let a=X.onKeyDown,m=qc(b),x=qc(o),r=l.useState("placement").split("-")[0],g=l.useState("value"),Z=Array.isArray(g),H=Gc(k=>{var F;if(a?.(k),k.defaultPrevented||!l)return;let{orientation:T,items:L,activeId:v}=l.getState(),A=T!=="horizontal",S=T!=="vertical",U=!!((F=L.find(Bc=>!Bc.disabled&&Bc.value!=null))!=null&&F.rowId),bc={ArrowUp:(U||A)&&iZ(l,l.up),ArrowRight:(U||S)&&iZ(l,l.next),ArrowDown:(U||A)&&iZ(l,l.down),ArrowLeft:(U||S)&&iZ(l,l.previous)}[k.key];bc&&x(k)&&(k.preventDefault(),l.move(bc()));let j=r==="top"||r==="bottom";({ArrowDown:j,ArrowUp:j,ArrowLeft:r==="left",ArrowRight:r==="right"})[k.key]&&m(k)&&(k.preventDefault(),l.move(v),Fb(k.currentTarget,"keyup",l.show))});X=Wc(X,k=>(0,Hd.jsx)(Jg,{value:l,children:k}),[l]);let[R,W]=(0,Tn.useState)(!1),I=(0,Tn.useRef)(!1);(0,Tn.useEffect)(()=>{let k=I.current;I.current=!1,!k&&W(!1)},[g]);let B=l.useState(k=>{var F;return(F=k.labelElement)==null?void 0:F.id}),p=X["aria-label"],y=X["aria-labelledby"]||B,h=l.useState(k=>{if(t)return k.items}),C=(0,Tn.useMemo)(()=>[...new Set(h?.map(k=>k.value).filter(k=>k!=null))],[h]);X=Wc(X,k=>t?(0,Hd.jsxs)(Hd.Fragment,{children:[(0,Hd.jsxs)("select",{style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},tabIndex:-1,"aria-hidden":!0,"aria-label":p,"aria-labelledby":y,name:t,form:e,required:d,disabled:X.disabled,value:g,multiple:Z,onFocus:()=>{var F;return(F=l?.getState().selectElement)==null?void 0:F.focus()},onChange:F=>{I.current=!0,W(!0),l?.setValue(Z?Gdc(F.target):F.target.value)},children:[Fm(g).map(F=>F==null||C.includes(F)?null:(0,Hd.jsx)("option",{value:F,children:F},F)),C.map(F=>(0,Hd.jsx)("option",{value:F,children:F},F))]}),k]}):k,[l,p,y,t,e,d,g,Z,C,X.disabled]);let J=(0,Hd.jsxs)(Hd.Fragment,{children:[g,(0,Hd.jsx)(m1,{})]}),f=l.useState("contentElement");return X={role:"combobox","aria-autocomplete":"none","aria-labelledby":B,"aria-haspopup":fn(f,"listbox"),"data-autofill":R||void 0,"data-name":t,children:J,...X,ref:yc(l.setSelectElement,X.ref),onKeyDown:H},X=Hx({store:l,toggleOnClick:G,...X}),X=wb({store:l,...X}),X}),aZ=K(function(l){let t=Xdc(l);return _(ndc,t)});var yN=u(E(),1),uZ=(0,yN.createContext)(void 0);var VN=u(E(),1),CN=u(V(),1),idc="div",s1=q(function(l){let[t,e]=(0,VN.useState)();return l=Wc(l,d=>(0,CN.jsx)(uZ.Provider,{value:e,children:d}),[]),l={role:"group","aria-labelledby":t,...l},Gl(l)}),OJc=K(function(l){let t=s1(l);return _(idc,t)});var adc="div",mZ=q(function({store:l,...t}){return t=s1(t),t}),px=K(function(l){let t=mZ(l);return _(adc,t)});var JN=u(E(),1),udc="div",r1=q(function(l){let t=(0,JN.useContext)(uZ),e=bl(l.id);return Sc(()=>(t?.(e),()=>t?.(void 0)),[t,e]),l={id:e,"aria-hidden":!0,...l},Gl(l)}),MJc=K(function(l){let t=r1(l);return _(udc,t)});var mdc="div",xZ=q(function({store:l,...t}){return t=r1(t),t}),Bx=K(function(l){let t=xZ(l);return _(mdc,t)});var hN=u(E(),1),xdc="div";function YN(c){let l=c.relatedTarget;return l?.nodeType===Node.ELEMENT_NODE?l:null}function sdc(c){let l=YN(c);return l?_c(c.currentTarget,l):!1}var g1=Symbol("composite-hover");function rdc(c){let l=YN(c);if(!l)return!1;do{if(Ie(l,g1)&&l[g1])return!0;l=l.parentElement}while(l);return!1}var ya=q(function({store:l,focusOnHover:t=!0,blurOnHoverEnd:e=!!t,...d}){let b=Ld();l=l||b,sc(l,!1);let o=la(),n=d.onMouseMove,G=qc(t),X=Gc(s=>{if(n?.(s),!s.defaultPrevented&&o()&&G(s)){if(!ud(s.currentTarget)){let r=l?.getState().baseElement;r&&!oX(r)&&r.focus()}l?.setActiveId(s.currentTarget.id)}}),i=d.onMouseLeave,a=qc(e),m=Gc(s=>{var r;i?.(s),!s.defaultPrevented&&o()&&(sdc(s)||rdc(s)||G(s)&&a(s)&&(l?.setActiveId(null),(r=l?.getState().baseElement)==null||r.focus()))}),x=(0,hN.useCallback)(s=>{s&&(s[g1]=!0)},[]);return d={...d,ref:yc(x,d.ref),onMouseMove:X,onMouseLeave:m},Gl(d)}),yx=El(K(function(l){let t=ya(l);return _(xdc,t)}));var FN=u(E(),1),vN=u(V(),1),gdc="div";function Zdc(c,l){if(l!=null)return c==null?!1:Array.isArray(c)?c.includes(l):c===l}var NN=q(function({store:l,value:t,getItem:e,hideOnClick:d,setValueOnClick:b=t!=null,preventScrollOnKeyDown:o=!0,focusOnHover:n=!0,...G}){var X;let i=TF();l=l||i,sc(l,!1);let a=bl(G.id),m=bt(G),{listElement:x,multiSelectable:s,selected:r,autoFocus:g}=Ym(l,{listElement:"listElement",multiSelectable(p){return Array.isArray(p.value)},selected(p){return Zdc(p.value,t)},autoFocus(p){return t==null||p.value==null||p.activeId!==a&&l?.item(p.activeId)?!1:Array.isArray(p.value)?p.value[p.value.length-1]===t:p.value===t}}),Z=(0,FN.useCallback)(p=>{let y={...p,value:m?void 0:t,children:t};return e?e(y):y},[m,t,e]);d=d??(t!=null&&!s);let H=G.onClick,R=qc(b),W=qc(d),I=Gc(p=>{H?.(p),!p.defaultPrevented&&(xg(p)||mg(p)||(R(p)&&t!=null&&l?.setValue(y=>Array.isArray(y)?y.includes(t)?y.filter(h=>h!==t):[...y,t]:t),W(p)&&l?.hide()))});G=Wc(G,p=>(0,vN.jsx)(hg.Provider,{value:r??!1,children:p}),[r]),G={id:a,role:cX(x),"aria-selected":r,children:t,...G,autoFocus:(X=G.autoFocus)!=null?X:g,onClick:I},G=xd({store:l,getItem:Z,preventScrollOnKeyDown:o,...G});let B=qc(n);return G=ya({store:l,...G,focusOnHover(p){if(!B(p))return!1;let y=l?.getState();return!!y?.open}}),G}),Vx=El(K(function(l){let t=NN(l);return _(gdc,t)}));var fN=u(E(),1),sZ=(0,fN.createContext)(!1);var SN=u(E(),1),Z1=u(V(),1),Hdc="span",Rdc=(0,Z1.jsx)("svg",{display:"block",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,viewBox:"0 0 16 16",height:"1em",width:"1em",children:(0,Z1.jsx)("polyline",{points:"4,8 7,12 12,4"})});function Idc(c){return c.checked?c.children||Rdc:typeof c.children=="function"?c.children:null}var Cx=q(function({store:l,checked:t,...e}){let d=(0,SN.useContext)(sZ);t=t??d;let b=Idc({checked:t,children:e.children});return e={"aria-hidden":!0,...e,children:b,style:{width:"1em",height:"1em",pointerEvents:"none",...e.style}},Gl(e)}),Whc=K(function(l){let t=Cx(l);return _(Hdc,t)});var kN=u(E(),1),Wdc="span",pdc=q(function({store:l,checked:t,...e}){let d=(0,kN.useContext)(hg);return t=t??d,e=Cx({...e,checked:t}),e}),rZ=K(function(l){let t=pdc(l);return _(Wdc,t)});var Bdc="div",ydc=q(function({store:l,...t}){let e=aX();l=l||e,sc(l,!1);let d=bl(t.id),b=t.onClick,o=Gc(n=>{b?.(n),!n.defaultPrevented&&queueMicrotask(()=>{let G=l?.getState().selectElement;G?.focus()})});return t={id:d,...t,ref:yc(l.setLabelElement,t.ref),onClick:o,style:{cursor:"default",...t.style}},Gl(t)}),gZ=El(K(function(l){let t=ydc(l);return _(Bdc,t)}));var ye=u(E(),1),ZZ=u(V(),1),Vdc="div",zN=(0,ye.createContext)(null),H1=q(function({store:l,resetOnEscape:t=!0,hideOnEnter:e=!0,focusOnMove:d=!0,composite:b,alwaysVisible:o,...n}){let G=iX();l=l||G,sc(l,!1);let X=bl(n.id),i=l.useState("value"),a=Array.isArray(i),[m,x]=(0,ye.useState)(i),s=l.useState("mounted");(0,ye.useEffect)(()=>{s||x(i)},[s,i]),t=t&&!a;let r=n.onKeyDown,g=qc(t),Z=qc(e),H=Gc(U=>{r?.(U),!U.defaultPrevented&&(U.key==="Escape"&&g(U)&&l?.setValue(m),(U.key===" "||U.key==="Enter")&&jl(U)&&Z(U)&&(U.preventDefault(),l?.hide()))}),R=(0,ye.useContext)(Sy),W=(0,ye.useState)(),[I,B]=R||W,p=(0,ye.useMemo)(()=>[I,B],[I]),[y,h]=(0,ye.useState)(null),C=(0,ye.useContext)(zN);(0,ye.useEffect)(()=>{if(C)return C(l),()=>C(null)},[C,l]),n=Wc(n,U=>(0,ZZ.jsx)(Jg,{value:l,children:(0,ZZ.jsx)(zN.Provider,{value:h,children:(0,ZZ.jsx)(Sy.Provider,{value:p,children:U})})}),[l,p]);let J=!!l.combobox;b=b??(!J&&y!==l);let[f,k]=gg(b?l.setListElement:null),F=U9(f,"role",n.role),L=(b||(F==="listbox"||F==="menu"||F==="tree"||F==="grid"))&&a||void 0,v=On(s,n.hidden,o),A=v?{...n.style,display:"none"}:n.style;b&&(n={role:"listbox","aria-multiselectable":L,...n});let S=l.useState(U=>{var P;return I||((P=U.labelElement)==null?void 0:P.id)});return n={id:X,"aria-labelledby":S,hidden:v,...n,ref:yc(k,n.ref),style:A,onKeyDown:H},n=sd({store:l,...n,composite:b}),n=wb({store:l,typeahead:!J,...n}),n}),Cdc=K(function(l){let t=H1(l);return _(Vdc,t)});var Jdc="div",hdc=q(function({store:l,alwaysVisible:t,...e}){let d=aX();return l=l||d,e=H1({store:l,alwaysVisible:t,...e}),e=mx({store:l,alwaysVisible:t,...e}),e}),HZ=Kd(K(function(l){let t=hdc(l);return _(Jdc,t)}),aX);function AN({combobox:c,...l}={}){let t=jd(l.store,md(c,["value","items","renderedItems","baseElement","arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"]));let e=t.getState(),d=Ue({...l,store:t,virtualFocus:ac(l.virtualFocus,e.virtualFocus,!0),includesBaseElement:ac(l.includesBaseElement,e.includesBaseElement,!1),activeId:ac(l.activeId,e.activeId,l.defaultActiveId,null),orientation:ac(l.orientation,e.orientation,"vertical")}),b=dZ({...l,store:t,placement:ac(l.placement,e.placement,"bottom-start")}),o=new String(""),n={...d.getState(),...b.getState(),value:ac(l.value,e.value,l.defaultValue,o),setValueOnMove:ac(l.setValueOnMove,e.setValueOnMove,!1),labelElement:ac(e.labelElement,null),selectElement:ac(e.selectElement,null),listElement:ac(e.listElement,null)},G=Xl(n,d,b,t);return pl(G,()=>Mc(G,["value","items"],X=>{if(X.value!==o||!X.items.length)return;let i=X.items.find(a=>!a.disabled&&a.value!=null);i?.value!=null&&G.setState("value",i.value)})),pl(G,()=>Mc(G,["mounted"],X=>{X.mounted||G.setState("activeId",n.activeId)})),pl(G,()=>Mc(G,["mounted","items","value"],X=>{if(c||X.mounted)return;let i=Fm(X.value),a=i[i.length-1];if(a==null)return;let m=X.items.find(x=>!x.disabled&&x.value===a);m&&G.setState("activeId",m.id)})),pl(G,()=>Nb(G,["setValueOnMove","moves"],X=>{let{mounted:i,value:a,activeId:m}=G.getState();if(!X.setValueOnMove&&i||Array.isArray(a)||!X.moves||!m)return;let x=d.item(m);!x||x.disabled||x.value==null||G.setState("value",x.value)})),{...d,...b,...G,combobox:c,setValue:X=>G.setState("value",X),setLabelElement:X=>G.setState("labelElement",X),setSelectElement:X=>G.setState("selectElement",X),setListElement:X=>G.setState("listElement",X)}}function ON(c){let l=Ng();return c={...c,combobox:c.combobox!==void 0?c.combobox:l},Fg(c)}function QN(c,l,t){return $t(l,[t.combobox]),zc(c,t,"value","setValue"),zc(c,t,"setValueOnMove"),Object.assign(bZ(rd(c,l,t),l,t),{combobox:t.combobox})}function Jx(c={}){c=ON(c);let[l,t]=Bl(AN,c);return QN(l,t,c)}var wN=u(E(),1),TN=u(V(),1),Fdc="div",DN=q(function({store:l,"aria-setsize":t,"aria-posinset":e,...d}){let b=Ld();l=l||b,sc(l,!1);let o=bl(d.id),n=l.useState(X=>X.baseElement||void 0),G=(0,wN.useMemo)(()=>({id:o,baseElement:n,ariaSetSize:t,ariaPosInSet:e}),[o,n,t,e]);return d=Wc(d,X=>(0,TN.jsx)(Hg.Provider,{value:G,children:X}),[G]),d={id:o,...d},Gl(d)}),hx=K(function(l){let t=DN(l);return _(Fdc,t)});function LN(c={}){var l;c.store;let t=(l=c.store)==null?void 0:l.getState(),e={value:ac(c.value,t?.value,c.defaultValue,!1)},d=Xl(e,c.store);return{...d,setValue:b=>d.setState("value",b)}}function Ndc(c,l,t){return $t(l,[t.store]),zc(c,t,"value","setValue"),c}function UN(c={}){let[l,t]=Bl(LN,c);return Ndc(l,t,c)}var Yx=ol(),jN=Yx.useContext,NYc=Yx.useScopedContext,fYc=Yx.useProviderContext,SYc=Yx.ContextProvider,kYc=Yx.ScopedContextProvider;var Va=u(E(),1),PN=u(V(),1),KN="input";function EN(c,l){l?c.indeterminate=!0:c.indeterminate&&(c.indeterminate=!1)}function fdc(c,l){return c==="input"&&(!l||l==="checkbox")}function MN(c){return Array.isArray(c)?c.toString():c}var R1=q(function({store:l,name:t,value:e,checked:d,defaultChecked:b,...o}){let n=jN();l=l||n;let[G,X]=(0,Va.useState)(b??!1),i=xc(l,p=>{if(d!==void 0)return d;if(p?.value===void 0)return G;if(e!=null){if(Array.isArray(p.value)){let y=MN(e);return p.value.includes(y)}return p.value===e}return Array.isArray(p.value)?!1:typeof p.value=="boolean"?p.value:!1}),a=(0,Va.useRef)(null),m=kn(a,KN),x=fdc(m,o.type),s=i?i==="mixed":void 0,r=i==="mixed"?!1:i,g=bt(o),[Z,H]=$i();(0,Va.useEffect)(()=>{let p=a.current;p&&(EN(p,s),!x&&(p.checked=r,t!==void 0&&(p.name=t),e!==void 0&&(p.value=`${e}`)))},[Z,s,x,r,t,e]);let R=o.onChange,W=Gc(p=>{if(g){p.stopPropagation(),p.preventDefault();return}if(EN(p.currentTarget,s),x||(p.currentTarget.checked=!p.currentTarget.checked,H()),R?.(p),p.defaultPrevented)return;let y=p.currentTarget.checked;X(y),l?.setValue(h=>{if(e==null)return y;let C=MN(e);return Array.isArray(h)?y?h.includes(C)?h:[...h,C]:h.filter(J=>J!==C):h===C?!1:C})}),I=o.onClick,B=Gc(p=>{I?.(p),!p.defaultPrevented&&(x||W(p))});return o=Wc(o,p=>(0,PN.jsx)(sZ.Provider,{value:r,children:p}),[r]),o={role:x?void 0:"checkbox",type:x?"checkbox":void 0,"aria-checked":i,...o,ref:yc(a,o.ref),onChange:W,onClick:B},o=nX({clickOnEnter:!x,...o}),Gl({name:x?t:void 0,value:x?e:void 0,checked:r,...o})}),UYc=K(function(l){let t=R1(l);return _(KN,t)});var _N=u(E(),1),Fx=ol([At,kg],[pe,ra]),vx=Fx.useContext,Ca=Fx.useScopedContext,VX=Fx.useProviderContext,qN=Fx.ContextProvider,$N=Fx.ScopedContextProvider;var RZ=(0,_N.createContext)(void 0);var IZ=u(E(),1),cf=u(V(),1),Sdc="div";function kdc({store:c,...l}){let[t,e]=(0,IZ.useState)(void 0),d=l["aria-label"],b=xc(c,"disclosureElement"),o=xc(c,"contentElement");return(0,IZ.useEffect)(()=>{let n=b;if(!n)return;let G=o;if(!G)return;d||G.hasAttribute("aria-label")?e(void 0):n.id&&e(n.id)},[d,b,o]),t}var I1=q(function({store:l,alwaysVisible:t,composite:e,...d}){let b=VX();l=l||b,sc(l,!1);let o=l.parent,n=l.menubar,G=!!o,X=bl(d.id),i=d.onKeyDown,a=l.useState(I=>I.placement.split("-")[0]),m=l.useState(I=>I.orientation==="both"?void 0:I.orientation),x=m!=="vertical",s=xc(n,I=>!!I&&I.orientation!=="vertical"),r=Gc(I=>{if(i?.(I),!I.defaultPrevented){if(G||n&&!x){let p={ArrowRight:()=>a==="left"&&!x,ArrowLeft:()=>a==="right"&&!x,ArrowUp:()=>a==="bottom"&&x,ArrowDown:()=>a==="top"&&x}[I.key];if(p?.())return I.stopPropagation(),I.preventDefault(),l?.hide()}if(n){let p={ArrowRight:()=>{if(s)return n.next()},ArrowLeft:()=>{if(s)return n.previous()},ArrowDown:()=>{if(!s)return n.next()},ArrowUp:()=>{if(!s)return n.previous()}}[I.key],y=p?.();y!==void 0&&(I.stopPropagation(),I.preventDefault(),n.move(y))}}});d=Wc(d,I=>(0,cf.jsx)($N,{value:l,children:I}),[l]);let g=kdc({store:l,...d}),Z=l.useState("mounted"),H=On(Z,d.hidden,t),R=H?{...d.style,display:"none"}:d.style;d={id:X,"aria-labelledby":g,hidden:H,...d,ref:yc(X?l.setContentElement:null,d.ref),style:R,onKeyDown:r};let W=!!l.combobox;return e=e??!W,e&&(d={role:"menu","aria-orientation":m,...d}),d=sd({store:l,composite:e,...d}),d=wb({store:l,typeahead:!W,...d}),d}),zdc=K(function(l){let t=I1(l);return _(Sdc,t)});var Tb=u(E(),1),Adc="div",Odc=q(function({store:l,modal:t=!1,portal:e=!!t,hideOnEscape:d=!0,autoFocusOnShow:b=!0,hideOnHoverOutside:o,alwaysVisible:n,...G}){let X=VX();l=l||X,sc(l,!1);let i=(0,Tb.useRef)(null),a=l.parent,m=l.menubar,x=!!a,s=!!m&&!x;G={...G,ref:yc(i,G.ref)};let{"aria-labelledby":r,...g}=I1({store:l,alwaysVisible:n,...G});G=g;let[Z,H]=(0,Tb.useState)(),R=l.useState("autoFocusOnShow"),W=l.useState("initialFocus"),I=l.useState("baseElement"),B=l.useState("renderedItems");(0,Tb.useEffect)(()=>{let k=!1;return H(F=>{var T,L,v;if(k||!R)return;if((T=F?.current)!=null&&T.isConnected)return F;let A=(0,Tb.createRef)();switch(W){case"first":A.current=((L=B.find(S=>!S.disabled&&S.element))==null?void 0:L.element)||null;break;case"last":A.current=((v=[...B].reverse().find(S=>!S.disabled&&S.element))==null?void 0:v.element)||null;break;default:A.current=I}return A}),()=>{k=!0}},[l,R,W,B,I]);let p=x?!1:t,y=!!b,h=!!Z||!!G.initialFocus||!!p,C=xc(l.combobox||l,"contentElement"),J=xc(a?.combobox||a,"contentElement"),f=(0,Tb.useMemo)(()=>{if(!J||!C)return;let k=C.getAttribute("role"),F=J.getAttribute("role");if(!((F==="menu"||F==="menubar")&&k==="menu"))return J},[C,J]);return f!==void 0&&(G={preserveTabOrderAnchor:f,...G}),G=xx({store:l,alwaysVisible:n,initialFocus:Z,autoFocusOnShow:y?h&&b:R||!!p,...G,hideOnEscape(k){return Yb(d,k)?!1:(l?.hideAll(),!0)},hideOnHoverOutside(k){let F=l?.getState().disclosureElement;return(typeof o=="function"?o(k):o??(x?!0:s?F?!ud(F):!0:!1))?k.defaultPrevented||!x||!F||(A9(F,"mouseout",k),!ud(F))?!0:(requestAnimationFrame(()=>{ud(F)||l?.hide()}),!1):!1},modal:p,portal:e,backdrop:x?!1:G.backdrop}),G={"aria-labelledby":r,...G},G}),WZ=Kd(K(function(l){let t=Odc(l);return _(Adc,t)}),VX);var tf=u(E(),1),W1=u(V(),1),Qdc="button";function wdc(c,l){return{ArrowDown:l==="bottom"||l==="top"?"first":!1,ArrowUp:l==="bottom"||l==="top"?"last":!1,ArrowRight:l==="right"?"first":!1,ArrowLeft:l==="left"?"first":!1}[c.key]}function lf(c,l){return!!c?.some(t=>!t.element||t.element===l?!1:t.element.getAttribute("aria-expanded")==="true")}var Tdc=q(function({store:l,focusable:t,accessibleWhenDisabled:e,showOnHover:d,...b}){let o=VX();l=l||o,sc(l,!1);let n=(0,tf.useRef)(null),G=l.parent,X=l.menubar,i=!!G,a=!!X&&!i,m=bt(b),x=()=>{let h=n.current;h&&(l?.setDisclosureElement(h),l?.setAnchorElement(h),l?.show())},s=b.onFocus,r=Gc(h=>{if(s?.(h),m||h.defaultPrevented||(l?.setAutoFocusOnShow(!1),l?.setActiveId(null),!X)||!a)return;let{items:C}=X.getState();lf(C,h.currentTarget)&&x()}),g=xc(l,h=>h.placement.split("-")[0]),Z=b.onKeyDown,H=Gc(h=>{if(Z?.(h),m||h.defaultPrevented)return;let C=wdc(h,g);C&&(h.preventDefault(),x(),l?.setAutoFocusOnShow(!0),l?.setInitialFocus(C))}),R=b.onClick,W=Gc(h=>{if(R?.(h),h.defaultPrevented||!l)return;let C=!h.detail,{open:J}=l.getState();(!J||C)&&((!i||C)&&l.setAutoFocusOnShow(!0),l.setInitialFocus(C?"first":"container")),i&&x()});b=Wc(b,h=>(0,W1.jsx)(qN,{value:l,children:h}),[l]),i&&(b={...b,render:(0,W1.jsx)(Md.div,{render:b.render})});let I=bl(b.id),B=xc(G?.combobox||G,"contentElement"),p=i||a?cX(B,"menuitem"):void 0,y=l.useState("contentElement");return b={id:I,role:p,"aria-haspopup":fn(y,"menu"),...b,ref:yc(n,b.ref),onFocus:r,onKeyDown:H,onClick:W},b=sx({store:l,focusable:t,accessibleWhenDisabled:e,...b,showOnHover:h=>{if(!(()=>{if(typeof d=="function")return d(h);if(d!=null)return d;if(i)return!0;if(!X)return!1;let{items:k}=X.getState();return a&&lf(k)})())return!1;let f=a?X:G;return f&&f.setActiveId(h.currentTarget.id),!0}}),b=Hx({store:l,toggleOnClick:!i,focusable:t,accessibleWhenDisabled:e,...b}),b=wb({store:l,typeahead:a,...b}),b}),Ja=K(function(l){let t=Tdc(l);return _(Qdc,t)});var Ddc="div",Ldc=q(function(l){return l=mZ(l),l}),pZ=K(function(l){let t=Ldc(l);return _(Ddc,t)});var Udc="div",jdc=q(function(l){return l=xZ(l),l}),BZ=K(function(l){let t=jdc(l);return _(Udc,t)});var Edc="div";function Mdc(c,l,t){var e;if(!c)return!1;if(ud(c))return!0;let d=l?.find(G=>{var X;return G.element===t?!1:((X=G.element)==null?void 0:X.getAttribute("aria-expanded"))==="true"}),b=(e=d?.element)==null?void 0:e.getAttribute("aria-controls");if(!b)return!1;let n=Ac(c).getElementById(b);return n?ud(n)?!0:!!n.querySelector("[role=menuitem][aria-expanded=true]"):!1}var ha=q(function({store:l,hideOnClick:t=!0,preventScrollOnKeyDown:e=!0,focusOnHover:d,blurOnHoverEnd:b,...o}){let n=Ca(!0),G=xN();l=l||n||G,sc(l,!1);let X=o.onClick,i=qc(t),a="hideAll"in l?l.hideAll:void 0,m=!!a,x=Gc(g=>{X?.(g),!(g.defaultPrevented||xg(g)||mg(g)||!a||g.currentTarget.getAttribute("aria-haspopup")==="menu")&&i(g)&&a()}),s=xc(l,g=>"contentElement"in g?g.contentElement:null);return o={role:cX(s,"menuitem"),...o,onClick:x},o=xd({store:l,preventScrollOnKeyDown:e,...o}),o=ya({store:l,...o,focusOnHover(g){let Z=()=>typeof d=="function"?d(g):d??!0;if(!l||!Z())return!1;let{baseElement:H,items:R}=l.getState();return m?(g.currentTarget.hasAttribute("aria-expanded")&&g.currentTarget.focus(),!0):Mdc(H,R,g.currentTarget)?(g.currentTarget.focus(),!0):!1},blurOnHoverEnd(g){return typeof b=="function"?b(g):b??m}}),o}),Nx=El(K(function(l){let t=ha(l);return _(Edc,t)}));var ef=u(E(),1),Pdc="span",Kdc=q(function({store:l,checked:t,...e}){let d=(0,ef.useContext)(RZ);return t=t??d,e=Cx({...e,checked:t}),e}),Ya=K(function(l){let t=Kdc(l);return _(Pdc,t)});var B1=u(E(),1),_dc="div";function qdc(c){return Array.isArray(c)?c.toString():c}function p1(c,l,t){if(l===void 0)return Array.isArray(c)?c:!!t;let e=qdc(l);return Array.isArray(c)?t?c.includes(e)?c:[...c,e]:c.filter(d=>d!==e):t?e:c===e?!1:c}var $dc=q(function({store:l,name:t,value:e,checked:d,defaultChecked:b,hideOnClick:o=!1,...n}){let G=Ca();l=l||G,sc(l,!1);let X=ym(b);(0,B1.useEffect)(()=>{l?.setValue(t,(a=[])=>X?p1(a,e,!0):a)},[l,t,e,X]),(0,B1.useEffect)(()=>{d!==void 0&&l?.setValue(t,a=>p1(a,e,d))},[l,t,e,d]);let i=UN({value:l.useState(a=>a.values[t]),setValue(a){l?.setValue(t,()=>{if(d===void 0)return a;let m=p1(a,e,d);return!Array.isArray(m)||!Array.isArray(a)?m:ay(a,m)?a:m})}});return n={role:"menuitemcheckbox",...n},n=R1({store:i,name:t,value:e,checked:d,...n}),n=ha({store:l,hideOnClick:o,...n}),n}),yZ=El(K(function(l){let t=$dc(l);return _(_dc,t)}));var V1=u(E(),1),df=u(V(),1),cbc="div";function y1(c,l,t){return t===void 0?c:t?l:c}var lbc=q(function({store:l,name:t,value:e,checked:d,onChange:b,hideOnClick:o=!1,...n}){let G=Ca();l=l||G,sc(l,!1);let X=ym(n.defaultChecked);(0,V1.useEffect)(()=>{l?.setValue(t,(a=!1)=>y1(a,e,X))},[l,t,e,X]),(0,V1.useEffect)(()=>{d!==void 0&&l?.setValue(t,a=>y1(a,e,d))},[l,t,e,d]);let i=l.useState(a=>a.values[t]===e);return n=Wc(n,a=>(0,df.jsx)(RZ.Provider,{value:!!i,children:a}),[i]),n={role:"menuitemradio",...n},n=GZ({name:t,value:e,checked:i,onChange(a){if(b?.(a),a.defaultPrevented)return;let m=a.currentTarget;l?.setValue(t,x=>y1(x,e,d??m.checked))},...n}),n=ha({store:l,hideOnClick:o,...n}),n}),VZ=El(K(function(l){let t=lbc(l);return _(cbc,t)}));function bf({combobox:c,parent:l,menubar:t,...e}={}){let d=!!t&&!l,b=jd(e.store,hy(l,["values"]),md(c,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"]));let o=b.getState(),n=Ue({...e,store:b,orientation:ac(e.orientation,o.orientation,"vertical")}),G=oZ({...e,store:b,placement:ac(e.placement,o.placement,"bottom-start"),timeout:ac(e.timeout,o.timeout,d?0:150),hideTimeout:ac(e.hideTimeout,o.hideTimeout,0)}),X={...n.getState(),...G.getState(),initialFocus:ac(o.initialFocus,"container"),values:ac(e.values,o.values,e.defaultValues,{})},i=Xl(X,n,G,b);return pl(i,()=>Mc(i,["mounted"],a=>{a.mounted||i.setState("activeId",null)})),pl(i,()=>Mc(l,["orientation"],a=>{i.setState("placement",a.orientation==="vertical"?"right-start":"bottom-start")})),{...n,...G,...i,combobox:c,parent:l,menubar:t,hideAll:()=>{G.hide(),l?.hideAll()},setInitialFocus:a=>i.setState("initialFocus",a),setValues:a=>i.setState("values",a),setValue:(a,m)=>{a!=="__proto__"&&a!=="constructor"&&(Array.isArray(a)||i.setState("values",x=>{let s=x[a],r=gm(m,s);return r===s?x:{...x,[a]:r!==void 0&&r}}))}}}function of(c,l,t){return $t(l,[t.combobox,t.parent,t.menubar]),zc(c,t,"values","setValues"),Object.assign(nZ(rd(c,l,t),l,t),{combobox:t.combobox,parent:t.parent,menubar:t.menubar})}function fx(c={}){let l=vx(),t=mN(),e=Ng();c={...c,parent:c.parent!==void 0?c.parent:l,menubar:c.menubar!==void 0?c.menubar:t,combobox:c.combobox!==void 0?c.combobox:e};let[d,b]=Bl(bf,c);return of(d,b,c)}var ebc="hr",dbc=q(function({store:l,...t}){let e=vx();return l=l||e,t=zy({store:l,...t}),t}),CZ=K(function(l){let t=dbc(l);return _(ebc,t)});var Vf=u(nc(),1),hZ=u(Y(),1);var JZ=u(Y(),1),Sx=(0,JZ.createContext)({});Sx.displayName="CompositeContext";var Rd=()=>(0,JZ.useContext)(Sx);var nf=u(Y(),1);var Gf=u(V(),1),Xf=(0,nf.forwardRef)(function(l,t){let e=Rd(),d=l.store??e.store;return(0,Gf.jsx)(px,{store:d,...l,ref:t})});var af=u(Y(),1);var uf=u(V(),1),mf=(0,af.forwardRef)(function(l,t){let e=Rd(),d=l.store??e.store;return(0,uf.jsx)(Bx,{store:d,...l,ref:t})});var xf=u(Y(),1);var sf=u(V(),1),rf=(0,xf.forwardRef)(function(l,t){let e=Rd(),d=l.store??e.store;return(0,sf.jsx)(yx,{store:d,...l,ref:t})});var gf=u(Y(),1);var Zf=u(V(),1),Hf=(0,gf.forwardRef)(function(l,t){let e=Rd(),d=l.store??e.store;return(0,Zf.jsx)(An,{store:d,...l,ref:t})});var Rf=u(Y(),1);var If=u(V(),1),Wf=(0,Rf.forwardRef)(function(l,t){let e=Rd(),d=l.store??e.store;return(0,If.jsx)(hx,{store:d,...l,ref:t})});var pf=u(Y(),1);var Bf=u(V(),1),yf=(0,pf.forwardRef)(function(l,t){let e=Rd(),d=l.store??e.store;return(0,Bf.jsx)(Wx,{store:d,...l,ref:t})});var C1=u(V(),1),Qt=Object.assign((0,hZ.forwardRef)(function({activeId:l,defaultActiveId:t,setActiveId:e,focusLoop:d=!1,focusWrap:b=!1,focusShift:o=!1,virtualFocus:n=!1,orientation:G="both",rtl:X=(0,Vf.isRTL)(),children:i,disabled:a=!1,...m},x){let s=m.store,r=uX({activeId:l,defaultActiveId:t,setActiveId:e,focusLoop:d,focusWrap:b,focusShift:o,virtualFocus:n,orientation:G,rtl:X}),g=s??r,Z=(0,hZ.useMemo)(()=>({store:g}),[g]);return(0,C1.jsx)(Nm,{disabled:a,store:g,...m,ref:x,children:(0,C1.jsx)(Sx.Provider,{value:Z,children:i})})}),{Group:Object.assign(Xf,{displayName:"Composite.Group"}),GroupLabel:Object.assign(mf,{displayName:"Composite.GroupLabel"}),Item:Object.assign(Hf,{displayName:"Composite.Item"}),Row:Object.assign(Wf,{displayName:"Composite.Row"}),Hover:Object.assign(rf,{displayName:"Composite.Hover"}),Typeahead:Object.assign(yf,{displayName:"Composite.Typeahead"}),Context:Object.assign(Sx,{displayName:"Composite.Context"})});var HA=u(dc(),1),nG=u(Y(),1),RA=u(ml(),1);var Jf=u(V(),1);function bbc(c){let{shortcut:l,className:t}=c;if(!l)return null;let e,d;return typeof l=="string"&&(e=l),l!==null&&typeof l=="object"&&(e=l.display,d=l.ariaLabel),(0,Jf.jsx)("span",{className:t,"aria-label":d,children:e})}var YZ=bbc;function hf(c){if(typeof Proxy>"u")return c;let l=new Map,t=(...e)=>c(...e);return new Proxy(t,{get:(e,d)=>d==="create"?c:(l.has(d)||l.set(d,c(d)),l.get(d))})}function Dn(c){return c!==null&&typeof c=="object"&&typeof c.start=="function"}var kx=c=>Array.isArray(c);function J1(c,l){if(!Array.isArray(l))return!1;let t=l.length;if(t!==c.length)return!1;for(let e=0;e<t;e++)if(l[e]!==c[e])return!1;return!0}function Qo(c){return typeof c=="string"||Array.isArray(c)}function Yf(c){let l=[{},{}];return c?.values.forEach((t,e)=>{l[0][e]=t.get(),l[1][e]=t.getVelocity()}),l}function Fa(c,l,t,e){if(typeof l=="function"){let[d,b]=Yf(e);l=l(t!==void 0?t:c.custom,d,b)}if(typeof l=="string"&&(l=c.variants&&c.variants[l]),typeof l=="function"){let[d,b]=Yf(e);l=l(t!==void 0?t:c.custom,d,b)}return l}function Ln(c,l,t){let e=c.getProps();return Fa(e,l,t!==void 0?t:e.custom,c)}var FZ=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],zx=["initial",...FZ];var Un=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ve=new Set(Un);var wt=c=>c*1e3,Ce=c=>c/1e3;var obc={type:"spring",stiffness:500,damping:25,restSpeed:10},nbc=c=>({type:"spring",stiffness:550,damping:c===0?2*Math.sqrt(550):30,restSpeed:10}),Gbc={type:"keyframes",duration:.8},Xbc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ff=(c,{keyframes:l})=>l.length>2?Gbc:Ve.has(c)?c.startsWith("scale")?nbc(l[1]):obc:Xbc;function va(c,l){return c?c[l]||c.default||c:void 0}var Na={skipAnimations:!1,useManualTiming:!1};var vZ={current:!1};var ibc=c=>c!==null;function jn(c,{repeat:l,repeatType:t="loop"},e){let d=c.filter(ibc),b=l&&t!=="loop"&&l%2===1?0:d.length-1;return!b||e===void 0?d[b]:e}var Hl=c=>c;var wo=Hl,Ee=Hl;function vf(c){let l=new Set,t=new Set,e=!1,d=!1,b=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function n(X){b.has(X)&&(G.schedule(X),c()),X(o)}let G={schedule:(X,i=!1,a=!1)=>{let x=a&&e?l:t;return i&&b.add(X),x.has(X)||x.add(X),X},cancel:X=>{t.delete(X),b.delete(X)},process:X=>{if(o=X,e){d=!0;return}e=!0,[l,t]=[t,l],l.forEach(n),l.clear(),e=!1,d&&(d=!1,G.process(X))}};return G}var NZ=["read","resolveKeyframes","update","preRender","render","postRender"],abc=40;function fZ(c,l){let t=!1,e=!0,d={delta:0,timestamp:0,isProcessing:!1},b=()=>t=!0,o=NZ.reduce((Z,H)=>(Z[H]=vf(b),Z),{}),{read:n,resolveKeyframes:G,update:X,preRender:i,render:a,postRender:m}=o,x=()=>{let Z=Na.useManualTiming?d.timestamp:performance.now();t=!1,d.delta=e?1e3/60:Math.max(Math.min(Z-d.timestamp,abc),1),d.timestamp=Z,d.isProcessing=!0,n.process(d),G.process(d),X.process(d),i.process(d),a.process(d),m.process(d),d.isProcessing=!1,t&&l&&(e=!1,c(x))},s=()=>{t=!0,e=!0,d.isProcessing||c(x)};return{schedule:NZ.reduce((Z,H)=>{let R=o[H];return Z[H]=(W,I=!1,B=!1)=>(t||s(),R.schedule(W,I,B)),Z},{}),cancel:Z=>{for(let H=0;H<NZ.length;H++)o[NZ[H]].cancel(Z)},state:d,steps:o}}var{schedule:Nc,cancel:Me,state:wl,steps:SZ}=fZ(typeof requestAnimationFrame<"u"?requestAnimationFrame:Hl,!0);var Nf=(c,l,t)=>(((1-3*t+3*l)*c+(3*t-6*l))*c+3*l)*c,ubc=1e-7,mbc=12;function xbc(c,l,t,e,d){let b,o,n=0;do o=l+(t-l)/2,b=Nf(o,e,d)-c,b>0?t=o:l=o;while(Math.abs(b)>ubc&&++n<mbc);return o}function lb(c,l,t,e){if(c===l&&t===e)return Hl;let d=b=>xbc(b,0,1,c,t);return b=>b===0||b===1?b:Nf(d(b),l,e)}var kZ=c=>l=>l<=.5?c(2*l)/2:(2-c(2*(1-l)))/2;var zZ=c=>l=>1-c(1-l);var h1=lb(.33,1.53,.69,.99),Ax=zZ(h1),AZ=kZ(Ax);var OZ=c=>(c*=2)<1?.5*Ax(c):.5*(2-Math.pow(2,-10*(c-1)));var QZ=c=>1-Math.sin(Math.acos(c)),wZ=zZ(QZ),TZ=kZ(QZ);var DZ=c=>/^0[^.\s]+$/u.test(c);function ff(c){return typeof c=="number"?c===0:c!==null?c==="none"||c==="0"||DZ(c):!0}var LZ=c=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(c);var Sf=c=>l=>typeof l=="string"&&l.startsWith(c),UZ=Sf("--"),sbc=Sf("var(--"),fa=c=>sbc(c)?rbc.test(c.split("/*")[0].trim()):!1,rbc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var gbc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Zbc(c){let l=gbc.exec(c);if(!l)return[,];let[,t,e,d]=l;return[`--${t??e}`,d]}var Hbc=4;function Y1(c,l,t=1){Ee(t<=Hbc,`Max CSS variable fallback depth detected in property "${c}". This may indicate a circular fallback dependency.`);let[e,d]=Zbc(c);if(!e)return;let b=window.getComputedStyle(l).getPropertyValue(e);if(b){let o=b.trim();return LZ(o)?parseFloat(o):o}return fa(d)?Y1(d,l,t+1):d}var yt=(c,l,t)=>t>l?l:t<c?c:t;var Db={test:c=>typeof c=="number",parse:parseFloat,transform:c=>c},To={...Db,transform:c=>yt(0,1,c)},Ox={...Db,default:1};var Qx=c=>({test:l=>typeof l=="string"&&l.endsWith(c)&&l.split(" ").length===1,parse:parseFloat,transform:l=>`${l}${c}`}),Lb=Qx("deg"),te=Qx("%"),Zc=Qx("px"),kf=Qx("vh"),zf=Qx("vw"),F1={...te,parse:c=>te.parse(c)/100,transform:c=>te.transform(c*100)};var Qf=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),v1=c=>c===Db||c===Zc,Af=(c,l)=>parseFloat(c.split(", ")[l]),Of=(c,l)=>(t,{transform:e})=>{if(e==="none"||!e)return 0;let d=e.match(/^matrix3d\((.+)\)$/u);if(d)return Af(d[1],l);{let b=e.match(/^matrix\((.+)\)$/u);return b?Af(b[1],c):0}},Rbc=new Set(["x","y","z"]),Ibc=Un.filter(c=>!Rbc.has(c));function wf(c){let l=[];return Ibc.forEach(t=>{let e=c.getValue(t);e!==void 0&&(l.push([t,e.get()]),e.set(t.startsWith("scale")?1:0))}),l}var CX={width:({x:c},{paddingLeft:l="0",paddingRight:t="0"})=>c.max-c.min-parseFloat(l)-parseFloat(t),height:({y:c},{paddingTop:l="0",paddingBottom:t="0"})=>c.max-c.min-parseFloat(l)-parseFloat(t),top:(c,{top:l})=>parseFloat(l),left:(c,{left:l})=>parseFloat(l),bottom:({y:c},{top:l})=>parseFloat(l)+(c.max-c.min),right:({x:c},{left:l})=>parseFloat(l)+(c.max-c.min),x:Of(4,13),y:Of(5,14)};CX.translateX=CX.x;CX.translateY=CX.y;var jZ=c=>l=>l.test(c);var Tf={test:c=>c==="auto",parse:c=>c};var N1=[Db,Zc,te,Lb,zf,kf,Tf],f1=c=>N1.find(jZ(c));var JX=new Set,S1=!1,k1=!1;function Df(){if(k1){let c=Array.from(JX).filter(e=>e.needsMeasurement),l=new Set(c.map(e=>e.element)),t=new Map;l.forEach(e=>{let d=wf(e);d.length&&(t.set(e,d),e.render())}),c.forEach(e=>e.measureInitialState()),l.forEach(e=>{e.render();let d=t.get(e);d&&d.forEach(([b,o])=>{var n;(n=e.getValue(b))===null||n===void 0||n.set(o)})}),c.forEach(e=>e.measureEndState()),c.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}k1=!1,S1=!1,JX.forEach(c=>c.complete()),JX.clear()}function Lf(){JX.forEach(c=>{c.readKeyframes(),c.needsMeasurement&&(k1=!0)})}function Uf(){Lf(),Df()}var En=class{constructor(l,t,e,d,b,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...l],this.onComplete=t,this.name=e,this.motionValue=d,this.element=b,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(JX.add(this),S1||(S1=!0,Nc.read(Lf),Nc.resolveKeyframes(Df))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:l,name:t,element:e,motionValue:d}=this;for(let b=0;b<l.length;b++)if(l[b]===null)if(b===0){let o=d?.get(),n=l[l.length-1];if(o!==void 0)l[0]=o;else if(e&&t){let G=e.readValue(t,n);G!=null&&(l[0]=G)}l[0]===void 0&&(l[0]=n),d&&o===void 0&&d.set(l[0])}else l[b]=l[b-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),JX.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,JX.delete(this))}resume(){this.isComplete||this.scheduleResolve()}};var Mn=c=>Math.round(c*1e5)/1e5;var Sa=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function jf(c){return c==null}var Ef=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var ka=(c,l)=>t=>!!(typeof t=="string"&&Ef.test(t)&&t.startsWith(c)||l&&!jf(t)&&Object.prototype.hasOwnProperty.call(t,l)),EZ=(c,l,t)=>e=>{if(typeof e!="string")return e;let[d,b,o,n]=e.match(Sa);return{[c]:parseFloat(d),[l]:parseFloat(b),[t]:parseFloat(o),alpha:n!==void 0?parseFloat(n):1}};var Wbc=c=>yt(0,255,c),z1={...Db,transform:c=>Math.round(Wbc(c))},Ub={test:ka("rgb","red"),parse:EZ("red","green","blue"),transform:({red:c,green:l,blue:t,alpha:e=1})=>"rgba("+z1.transform(c)+", "+z1.transform(l)+", "+z1.transform(t)+", "+Mn(To.transform(e))+")"};function pbc(c){let l="",t="",e="",d="";return c.length>5?(l=c.substring(1,3),t=c.substring(3,5),e=c.substring(5,7),d=c.substring(7,9)):(l=c.substring(1,2),t=c.substring(2,3),e=c.substring(3,4),d=c.substring(4,5),l+=l,t+=t,e+=e,d+=d),{red:parseInt(l,16),green:parseInt(t,16),blue:parseInt(e,16),alpha:d?parseInt(d,16)/255:1}}var wx={test:ka("#"),parse:pbc,transform:Ub.transform};var Pn={test:ka("hsl","hue"),parse:EZ("hue","saturation","lightness"),transform:({hue:c,saturation:l,lightness:t,alpha:e=1})=>"hsla("+Math.round(c)+", "+te.transform(Mn(l))+", "+te.transform(Mn(t))+", "+Mn(To.transform(e))+")"};var Ml={test:c=>Ub.test(c)||wx.test(c)||Pn.test(c),parse:c=>Ub.test(c)?Ub.parse(c):Pn.test(c)?Pn.parse(c):wx.parse(c),transform:c=>typeof c=="string"?c:c.hasOwnProperty("red")?Ub.transform(c):Pn.transform(c)};var Mf=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Bbc(c){var l,t;return isNaN(c)&&typeof c=="string"&&(((l=c.match(Sa))===null||l===void 0?void 0:l.length)||0)+(((t=c.match(Mf))===null||t===void 0?void 0:t.length)||0)>0}var Kf="number",_f="color",ybc="var",Vbc="var(",Pf="${}",Cbc=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function hX(c){let l=c.toString(),t=[],e={color:[],number:[],var:[]},d=[],b=0,n=l.replace(Cbc,G=>(Ml.test(G)?(e.color.push(b),d.push(_f),t.push(Ml.parse(G))):G.startsWith(Vbc)?(e.var.push(b),d.push(ybc),t.push(G)):(e.number.push(b),d.push(Kf),t.push(parseFloat(G))),++b,Pf)).split(Pf);return{values:t,split:n,indexes:e,types:d}}function qf(c){return hX(c).values}function $f(c){let{split:l,types:t}=hX(c),e=l.length;return d=>{let b="";for(let o=0;o<e;o++)if(b+=l[o],d[o]!==void 0){let n=t[o];n===Kf?b+=Mn(d[o]):n===_f?b+=Ml.transform(d[o]):b+=d[o]}return b}}var Jbc=c=>typeof c=="number"?0:c;function hbc(c){let l=qf(c);return $f(c)(l.map(Jbc))}var ee={test:Bbc,parse:qf,createTransformer:$f,getAnimatableNone:hbc};var Ybc=new Set(["brightness","contrast","saturate","opacity"]);function Fbc(c){let[l,t]=c.slice(0,-1).split("(");if(l==="drop-shadow")return c;let[e]=t.match(Sa)||[];if(!e)return c;let d=t.replace(e,""),b=Ybc.has(l)?1:0;return e!==t&&(b*=100),l+"("+b+d+")"}var vbc=/\b([a-z-]*)\(.*?\)/gu,Tx={...ee,getAnimatableNone:c=>{let l=c.match(vbc);return l?l.map(Fbc).join(" "):c}};var c3={borderWidth:Zc,borderTopWidth:Zc,borderRightWidth:Zc,borderBottomWidth:Zc,borderLeftWidth:Zc,borderRadius:Zc,radius:Zc,borderTopLeftRadius:Zc,borderTopRightRadius:Zc,borderBottomRightRadius:Zc,borderBottomLeftRadius:Zc,width:Zc,maxWidth:Zc,height:Zc,maxHeight:Zc,top:Zc,right:Zc,bottom:Zc,left:Zc,padding:Zc,paddingTop:Zc,paddingRight:Zc,paddingBottom:Zc,paddingLeft:Zc,margin:Zc,marginTop:Zc,marginRight:Zc,marginBottom:Zc,marginLeft:Zc,backgroundPositionX:Zc,backgroundPositionY:Zc};var l3={rotate:Lb,rotateX:Lb,rotateY:Lb,rotateZ:Lb,scale:Ox,scaleX:Ox,scaleY:Ox,scaleZ:Ox,skew:Lb,skewX:Lb,skewY:Lb,distance:Zc,translateX:Zc,translateY:Zc,translateZ:Zc,x:Zc,y:Zc,z:Zc,perspective:Zc,transformPerspective:Zc,opacity:To,originX:F1,originY:F1,originZ:Zc};var A1={...Db,transform:Math.round};var za={...c3,...l3,zIndex:A1,size:Zc,fillOpacity:To,strokeOpacity:To,numOctaves:A1};var Nbc={...za,color:Ml,backgroundColor:Ml,outlineColor:Ml,fill:Ml,stroke:Ml,borderColor:Ml,borderTopColor:Ml,borderRightColor:Ml,borderBottomColor:Ml,borderLeftColor:Ml,filter:Tx,WebkitFilter:Tx},Aa=c=>Nbc[c];function MZ(c,l){let t=Aa(c);return t!==Tx&&(t=ee),t.getAnimatableNone?t.getAnimatableNone(l):void 0}var fbc=new Set(["auto","none","0"]);function t3(c,l,t){let e=0,d;for(;e<c.length&&!d;){let b=c[e];typeof b=="string"&&!fbc.has(b)&&hX(b).values.length&&(d=c[e]),e++}if(d&&t)for(let b of l)c[b]=MZ(t,d)}var Oa=class extends En{constructor(l,t,e,d,b){super(l,t,e,d,b,!0)}readKeyframes(){let{unresolvedKeyframes:l,element:t,name:e}=this;if(!t||!t.current)return;super.readKeyframes();for(let G=0;G<l.length;G++){let X=l[G];if(typeof X=="string"&&(X=X.trim(),fa(X))){let i=Y1(X,t.current);i!==void 0&&(l[G]=i),G===l.length-1&&(this.finalKeyframe=X)}}if(this.resolveNoneKeyframes(),!Qf.has(e)||l.length!==2)return;let[d,b]=l,o=f1(d),n=f1(b);if(o!==n)if(v1(o)&&v1(n))for(let G=0;G<l.length;G++){let X=l[G];typeof X=="string"&&(l[G]=parseFloat(X))}else this.needsMeasurement=!0}resolveNoneKeyframes(){let{unresolvedKeyframes:l,name:t}=this,e=[];for(let d=0;d<l.length;d++)ff(l[d])&&e.push(d);e.length&&t3(l,e,t)}measureInitialState(){let{element:l,unresolvedKeyframes:t,name:e}=this;if(!l||!l.current)return;e==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=CX[e](l.measureViewportBox(),window.getComputedStyle(l.current)),t[0]=this.measuredOrigin;let d=t[t.length-1];d!==void 0&&l.getValue(e,d).jump(d,!1)}measureEndState(){var l;let{element:t,name:e,unresolvedKeyframes:d}=this;if(!t||!t.current)return;let b=t.getValue(e);b&&b.jump(this.measuredOrigin,!1);let o=d.length-1,n=d[o];d[o]=CX[e](t.measureViewportBox(),window.getComputedStyle(t.current)),n!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=n),!((l=this.removedTransforms)===null||l===void 0)&&l.length&&this.removedTransforms.forEach(([G,X])=>{t.getValue(G).set(X)}),this.resolveNoneKeyframes()}};function Qa(c){return typeof c=="function"}var PZ;function Sbc(){PZ=void 0}var Tt={now:()=>(PZ===void 0&&Tt.set(wl.isProcessing||Na.useManualTiming?wl.timestamp:performance.now()),PZ),set:c=>{PZ=c,queueMicrotask(Sbc)}};var O1=(c,l)=>l==="zIndex"?!1:!!(typeof c=="number"||Array.isArray(c)||typeof c=="string"&&(ee.test(c)||c==="0")&&!c.startsWith("url("));function kbc(c){let l=c[0];if(c.length===1)return!0;for(let t=0;t<c.length;t++)if(c[t]!==l)return!0}function e3(c,l,t,e){let d=c[0];if(d===null)return!1;if(l==="display"||l==="visibility")return!0;let b=c[c.length-1],o=O1(d,l),n=O1(b,l);return wo(o===n,`You are trying to animate ${l} from "${d}" to "${b}". ${d} is not an animatable value - to enable this animation set ${d} to a value animatable to ${b} via the \`style\` property.`),!o||!n?!1:kbc(c)||(t==="spring"||Qa(t))&&e}var zbc=40,wa=class{constructor({autoplay:l=!0,delay:t=0,type:e="keyframes",repeat:d=0,repeatDelay:b=0,repeatType:o="loop",...n}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Tt.now(),this.options={autoplay:l,delay:t,type:e,repeat:d,repeatDelay:b,repeatType:o,...n},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>zbc?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Uf(),this._resolved}onKeyframesResolved(l,t){this.resolvedAt=Tt.now(),this.hasAttemptedResolve=!0;let{name:e,type:d,velocity:b,delay:o,onComplete:n,onUpdate:G,isGenerator:X}=this.options;if(!X&&!e3(l,e,d,b))if(vZ.current||!o){G?.(jn(l,this.options,t)),n?.(),this.resolveFinishedPromise();return}else this.options.duration=0;let i=this.initPlayback(l,t);i!==!1&&(this._resolved={keyframes:l,finalKeyframe:t,...i},this.onPostResolved())}onPostResolved(){}then(l,t){return this.currentFinishedPromise.then(l,t)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(l=>{this.resolveFinishedPromise=l})}};var tb=(c,l,t)=>{let e=l-c;return e===0?1:(t-c)/e};var KZ=(c,l,t=10)=>{let e="",d=Math.max(Math.round(l/t),2);for(let b=0;b<d;b++)e+=c(tb(0,d-1,b))+", ";return`linear(${e.substring(0,e.length-2)})`};function _Z(c,l){return l?c*(1e3/l):0}var Abc=5;function qZ(c,l,t){let e=Math.max(l-Abc,0);return _Z(t-c(e),l-e)}var yl={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};var Q1=.001;function d3({duration:c=yl.duration,bounce:l=yl.bounce,velocity:t=yl.velocity,mass:e=yl.mass}){let d,b;wo(c<=wt(yl.maxDuration),"Spring duration must be 10 seconds or less");let o=1-l;o=yt(yl.minDamping,yl.maxDamping,o),c=yt(yl.minDuration,yl.maxDuration,Ce(c)),o<1?(d=X=>{let i=X*o,a=i*c,m=i-t,x=$Z(X,o),s=Math.exp(-a);return Q1-m/x*s},b=X=>{let a=X*o*c,m=a*t+t,x=Math.pow(o,2)*Math.pow(X,2)*c,s=Math.exp(-a),r=$Z(Math.pow(X,2),o);return(-d(X)+Q1>0?-1:1)*((m-x)*s)/r}):(d=X=>{let i=Math.exp(-X*c),a=(X-t)*c+1;return-Q1+i*a},b=X=>{let i=Math.exp(-X*c),a=(t-X)*(c*c);return i*a});let n=5/c,G=Qbc(d,b,n);if(c=wt(c),isNaN(G))return{stiffness:yl.stiffness,damping:yl.damping,duration:c};{let X=Math.pow(G,2)*e;return{stiffness:X,damping:o*2*Math.sqrt(e*X),duration:c}}}var Obc=12;function Qbc(c,l,t){let e=t;for(let d=1;d<Obc;d++)e=e-c(e)/l(e);return e}function $Z(c,l){return c*Math.sqrt(1-l*l)}function cH(c){let l=0,t=50,e=c.next(l);for(;!e.done&&l<2e4;)l+=t,e=c.next(l);return l>=2e4?1/0:l}var Tbc=["duration","bounce"],Dbc=["stiffness","damping","mass"];function b3(c,l){return l.some(t=>c[t]!==void 0)}function Lbc(c){let l={velocity:yl.velocity,stiffness:yl.stiffness,damping:yl.damping,mass:yl.mass,isResolvedFromDuration:!1,...c};if(!b3(c,Dbc)&&b3(c,Tbc))if(c.visualDuration){let t=c.visualDuration,e=2*Math.PI/(t*1.2),d=e*e,b=2*yt(.05,1,1-c.bounce)*Math.sqrt(d);l={...l,mass:yl.mass,stiffness:d,damping:b}}else{let t=d3(c);l={...l,...t,mass:yl.mass},l.isResolvedFromDuration=!0}return l}function lH(c=yl.visualDuration,l=yl.bounce){let t=typeof c!="object"?{visualDuration:c,keyframes:[0,1],bounce:l}:c,{restSpeed:e,restDelta:d}=t,b=t.keyframes[0],o=t.keyframes[t.keyframes.length-1],n={done:!1,value:b},{stiffness:G,damping:X,mass:i,duration:a,velocity:m,isResolvedFromDuration:x}=Lbc({...t,velocity:-Ce(t.velocity||0)}),s=m||0,r=X/(2*Math.sqrt(G*i)),g=o-b,Z=Ce(Math.sqrt(G/i)),H=Math.abs(g)<5;e||(e=H?yl.restSpeed.granular:yl.restSpeed.default),d||(d=H?yl.restDelta.granular:yl.restDelta.default);let R;if(r<1){let I=$Z(Z,r);R=B=>{let p=Math.exp(-r*Z*B);return o-p*((s+r*Z*g)/I*Math.sin(I*B)+g*Math.cos(I*B))}}else if(r===1)R=I=>o-Math.exp(-Z*I)*(g+(s+Z*g)*I);else{let I=Z*Math.sqrt(r*r-1);R=B=>{let p=Math.exp(-r*Z*B),y=Math.min(I*B,300);return o-p*((s+r*Z*g)*Math.sinh(y)+I*g*Math.cosh(y))/I}}let W={calculatedDuration:x&&a||null,next:I=>{let B=R(I);if(x)n.done=I>=a;else{let p=0;r<1&&(p=I===0?wt(s):qZ(R,I,B));let y=Math.abs(p)<=e,h=Math.abs(o-B)<=d;n.done=y&&h}return n.value=n.done?o:B,n},toString:()=>{let I=Math.min(cH(W),2e4),B=KZ(p=>W.next(I*p).value,I,30);return I+"ms "+B}};return W}function w1({keyframes:c,velocity:l=0,power:t=.8,timeConstant:e=325,bounceDamping:d=10,bounceStiffness:b=500,modifyTarget:o,min:n,max:G,restDelta:X=.5,restSpeed:i}){let a=c[0],m={done:!1,value:a},x=y=>n!==void 0&&y<n||G!==void 0&&y>G,s=y=>n===void 0?G:G===void 0||Math.abs(n-y)<Math.abs(G-y)?n:G,r=t*l,g=a+r,Z=o===void 0?g:o(g);Z!==g&&(r=Z-a);let H=y=>-r*Math.exp(-y/e),R=y=>Z+H(y),W=y=>{let h=H(y),C=R(y);m.done=Math.abs(h)<=X,m.value=m.done?Z:C},I,B,p=y=>{x(m.value)&&(I=y,B=lH({keyframes:[m.value,s(m.value)],velocity:qZ(R,y,m.value),damping:d,stiffness:b,restDelta:X,restSpeed:i}))};return p(0),{calculatedDuration:null,next:y=>{let h=!1;return!B&&I===void 0&&(h=!0,W(y),p(y)),I!==void 0&&y>=I?B.next(y-I):(!h&&W(y),m)}}}var o3=lb(.42,0,1,1),n3=lb(0,0,.58,1),tH=lb(.42,0,.58,1);var G3=c=>Array.isArray(c)&&typeof c[0]!="number";var Dx=c=>Array.isArray(c)&&typeof c[0]=="number";var X3={linear:Hl,easeIn:o3,easeInOut:tH,easeOut:n3,circIn:QZ,circInOut:TZ,circOut:wZ,backIn:Ax,backInOut:AZ,backOut:h1,anticipate:OZ},T1=c=>{if(Dx(c)){Ee(c.length===4,"Cubic bezier arrays must contain four numerical values.");let[l,t,e,d]=c;return lb(l,t,e,d)}else if(typeof c=="string")return Ee(X3[c]!==void 0,`Invalid easing type '${c}'`),X3[c];return c};var Ubc=(c,l)=>t=>l(c(t)),jb=(...c)=>c.reduce(Ubc);var Oc=(c,l,t)=>c+(l-c)*t;function D1(c,l,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?c+(l-c)*6*t:t<1/2?l:t<2/3?c+(l-c)*(2/3-t)*6:c}function i3({hue:c,saturation:l,lightness:t,alpha:e}){c/=360,l/=100,t/=100;let d=0,b=0,o=0;if(!l)d=b=o=t;else{let n=t<.5?t*(1+l):t+l-t*l,G=2*t-n;d=D1(G,n,c+1/3),b=D1(G,n,c),o=D1(G,n,c-1/3)}return{red:Math.round(d*255),green:Math.round(b*255),blue:Math.round(o*255),alpha:e}}function Ta(c,l){return t=>t>0?l:c}var L1=(c,l,t)=>{let e=c*c,d=t*(l*l-e)+e;return d<0?0:Math.sqrt(d)},jbc=[wx,Ub,Pn],Ebc=c=>jbc.find(l=>l.test(c));function a3(c){let l=Ebc(c);if(wo(!!l,`'${c}' is not an animatable color. Use the equivalent color code instead.`),!l)return!1;let t=l.parse(c);return l===Pn&&(t=i3(t)),t}var U1=(c,l)=>{let t=a3(c),e=a3(l);if(!t||!e)return Ta(c,l);let d={...t};return b=>(d.red=L1(t.red,e.red,b),d.green=L1(t.green,e.green,b),d.blue=L1(t.blue,e.blue,b),d.alpha=Oc(t.alpha,e.alpha,b),Ub.transform(d))};var eH=new Set(["none","hidden"]);function u3(c,l){return eH.has(c)?t=>t<=0?c:l:t=>t>=1?l:c}function Mbc(c,l){return t=>Oc(c,l,t)}function dH(c){return typeof c=="number"?Mbc:typeof c=="string"?fa(c)?Ta:Ml.test(c)?U1:_bc:Array.isArray(c)?m3:typeof c=="object"?Ml.test(c)?U1:Pbc:Ta}function m3(c,l){let t=[...c],e=t.length,d=c.map((b,o)=>dH(b)(b,l[o]));return b=>{for(let o=0;o<e;o++)t[o]=d[o](b);return t}}function Pbc(c,l){let t={...c,...l},e={};for(let d in t)c[d]!==void 0&&l[d]!==void 0&&(e[d]=dH(c[d])(c[d],l[d]));return d=>{for(let b in e)t[b]=e[b](d);return t}}function Kbc(c,l){var t;let e=[],d={color:0,var:0,number:0};for(let b=0;b<l.values.length;b++){let o=l.types[b],n=c.indexes[o][d[o]],G=(t=c.values[n])!==null&&t!==void 0?t:0;e[b]=G,d[o]++}return e}var _bc=(c,l)=>{let t=ee.createTransformer(l),e=hX(c),d=hX(l);return e.indexes.var.length===d.indexes.var.length&&e.indexes.color.length===d.indexes.color.length&&e.indexes.number.length>=d.indexes.number.length?eH.has(c)&&!d.values.length||eH.has(l)&&!e.values.length?u3(c,l):jb(m3(Kbc(e,d),d.values),t):(wo(!0,`Complex values '${c}' and '${l}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Ta(c,l))};function bH(c,l,t){return typeof c=="number"&&typeof l=="number"&&typeof t=="number"?Oc(c,l,t):dH(c)(c,l)}function qbc(c,l,t){let e=[],d=t||bH,b=c.length-1;for(let o=0;o<b;o++){let n=d(c[o],c[o+1]);if(l){let G=Array.isArray(l)?l[o]||Hl:l;n=jb(G,n)}e.push(n)}return e}function x3(c,l,{clamp:t=!0,ease:e,mixer:d}={}){let b=c.length;if(Ee(b===l.length,"Both input and output ranges must be the same length"),b===1)return()=>l[0];if(b===2&&c[0]===c[1])return()=>l[1];c[0]>c[b-1]&&(c=[...c].reverse(),l=[...l].reverse());let o=qbc(l,e,d),n=o.length,G=X=>{let i=0;if(n>1)for(;i<c.length-2&&!(X<c[i+1]);i++);let a=tb(c[i],c[i+1],X);return o[i](a)};return t?X=>G(yt(c[0],c[b-1],X)):G}function s3(c,l){let t=c[c.length-1];for(let e=1;e<=l;e++){let d=tb(0,l,e);c.push(Oc(t,1,d))}}function r3(c){let l=[0];return s3(l,c.length-1),l}function g3(c,l){return c.map(t=>t*l)}function $bc(c,l){return c.map(()=>l||tH).splice(0,c.length-1)}function Lx({duration:c=300,keyframes:l,times:t,ease:e="easeInOut"}){let d=G3(e)?e.map(T1):T1(e),b={done:!1,value:l[0]},o=g3(t&&t.length===l.length?t:r3(l),c),n=x3(o,l,{ease:Array.isArray(d)?d:$bc(l,d)});return{calculatedDuration:c,next:G=>(b.value=n(G),b.done=G>=c,b)}}var Z3=c=>{let l=({timestamp:t})=>c(t);return{start:()=>Nc.update(l,!0),stop:()=>Me(l),now:()=>wl.isProcessing?wl.timestamp:Tt.now()}};var coc={decay:w1,inertia:w1,tween:Lx,keyframes:Lx,spring:lH},loc=c=>c/100,YX=class extends wa{constructor(l){super(l),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();let{onStop:G}=this.options;G&&G()};let{name:t,motionValue:e,element:d,keyframes:b}=this.options,o=d?.KeyframeResolver||En,n=(G,X)=>this.onKeyframesResolved(G,X);this.resolver=new o(b,n,t,e,d),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(l){let{type:t="keyframes",repeat:e=0,repeatDelay:d=0,repeatType:b,velocity:o=0}=this.options,n=Qa(t)?t:coc[t]||Lx,G,X;n!==Lx&&typeof l[0]!="number"&&(G=jb(loc,bH(l[0],l[1])),l=[0,100]);let i=n({...this.options,keyframes:l});b==="mirror"&&(X=n({...this.options,keyframes:[...l].reverse(),velocity:-o})),i.calculatedDuration===null&&(i.calculatedDuration=cH(i));let{calculatedDuration:a}=i,m=a+d,x=m*(e+1)-d;return{generator:i,mirroredGenerator:X,mapPercentToKeyframes:G,calculatedDuration:a,resolvedDuration:m,totalDuration:x}}onPostResolved(){let{autoplay:l=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!l?this.pause():this.state=this.pendingPlayState}tick(l,t=!1){let{resolved:e}=this;if(!e){let{keyframes:y}=this.options;return{done:!0,value:y[y.length-1]}}let{finalKeyframe:d,generator:b,mirroredGenerator:o,mapPercentToKeyframes:n,keyframes:G,calculatedDuration:X,totalDuration:i,resolvedDuration:a}=e;if(this.startTime===null)return b.next(0);let{delay:m,repeat:x,repeatType:s,repeatDelay:r,onUpdate:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,l):this.speed<0&&(this.startTime=Math.min(l-i/this.speed,this.startTime)),t?this.currentTime=l:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(l-this.startTime)*this.speed;let Z=this.currentTime-m*(this.speed>=0?1:-1),H=this.speed>=0?Z<0:Z>i;this.currentTime=Math.max(Z,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let R=this.currentTime,W=b;if(x){let y=Math.min(this.currentTime,i)/a,h=Math.floor(y),C=y%1;!C&&y>=1&&(C=1),C===1&&h--,h=Math.min(h,x+1),h%2&&(s==="reverse"?(C=1-C,r&&(C-=r/a)):s==="mirror"&&(W=o)),R=yt(0,1,C)*a}let I=H?{done:!1,value:G[0]}:W.next(R);n&&(I.value=n(I.value));let{done:B}=I;!H&&X!==null&&(B=this.speed>=0?this.currentTime>=i:this.currentTime<=0);let p=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&B);return p&&d!==void 0&&(I.value=jn(G,this.options,d)),g&&g(I.value),p&&this.finish(),I}get duration(){let{resolved:l}=this;return l?Ce(l.calculatedDuration):0}get time(){return Ce(this.currentTime)}set time(l){l=wt(l),this.currentTime=l,this.holdTime!==null||this.speed===0?this.holdTime=l:this.driver&&(this.startTime=this.driver.now()-l/this.speed)}get speed(){return this.playbackSpeed}set speed(l){let t=this.playbackSpeed!==l;this.playbackSpeed=l,t&&(this.time=Ce(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;let{driver:l=Z3,onPlay:t,startTime:e}=this.options;this.driver||(this.driver=l(b=>this.tick(b))),t&&t();let d=this.driver.now();this.holdTime!==null?this.startTime=d-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=d):this.startTime=e??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var l;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(l=this.currentTime)!==null&&l!==void 0?l:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";let{onComplete:l}=this.options;l&&l()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(l){return this.startTime=0,this.tick(l,!0)}};var H3=new Set(["opacity","clipPath","filter","transform"]);function Da(c){let l;return()=>(l===void 0&&(l=c()),l)}var R3={linearEasing:void 0};function I3(c,l){let t=Da(c);return()=>{var e;return(e=R3[l])!==null&&e!==void 0?e:t()}}var La=I3(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function E1(c){return!!(typeof c=="function"&&La()||!c||typeof c=="string"&&(c in j1||La())||Dx(c)||Array.isArray(c)&&c.every(E1))}var Ux=([c,l,t,e])=>`cubic-bezier(${c}, ${l}, ${t}, ${e})`,j1={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ux([0,.65,.55,1]),circOut:Ux([.55,0,1,.45]),backIn:Ux([.31,.01,.66,-.59]),backOut:Ux([.33,1.53,.69,.99])};function M1(c,l){if(c)return typeof c=="function"&&La()?KZ(c,l):Dx(c)?Ux(c):Array.isArray(c)?c.map(t=>M1(t,l)||j1.easeOut):j1[c]}function W3(c,l,t,{delay:e=0,duration:d=300,repeat:b=0,repeatType:o="loop",ease:n="easeInOut",times:G}={}){let X={[l]:t};G&&(X.offset=G);let i=M1(n,d);return Array.isArray(i)&&(X.easing=i),c.animate(X,{delay:e,duration:d,easing:Array.isArray(i)?"linear":i,fill:"both",iterations:b+1,direction:o==="reverse"?"alternate":"normal"})}function P1(c,l){c.timeline=l,c.onfinish=null}var p3=Da(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));var oH=10,toc=2e4;function eoc(c){return Qa(c.type)||c.type==="spring"||!E1(c.ease)}function doc(c,l){let t=new YX({...l,keyframes:c,repeat:0,delay:0,isGenerator:!0}),e={done:!1,value:c[0]},d=[],b=0;for(;!e.done&&b<toc;)e=t.sample(b),d.push(e.value),b+=oH;return{times:void 0,keyframes:d,duration:b-oH,ease:"linear"}}var B3={anticipate:OZ,backInOut:AZ,circInOut:TZ};function boc(c){return c in B3}var jx=class extends wa{constructor(l){super(l);let{name:t,motionValue:e,element:d,keyframes:b}=this.options;this.resolver=new Oa(b,(o,n)=>this.onKeyframesResolved(o,n),t,e,d),this.resolver.scheduleResolve()}initPlayback(l,t){var e;let{duration:d=300,times:b,ease:o,type:n,motionValue:G,name:X,startTime:i}=this.options;if(!(!((e=G.owner)===null||e===void 0)&&e.current))return!1;if(typeof o=="string"&&La()&&boc(o)&&(o=B3[o]),eoc(this.options)){let{onComplete:m,onUpdate:x,motionValue:s,element:r,...g}=this.options,Z=doc(l,g);l=Z.keyframes,l.length===1&&(l[1]=l[0]),d=Z.duration,b=Z.times,o=Z.ease,n="keyframes"}let a=W3(G.owner.current,X,l,{...this.options,duration:d,times:b,ease:o});return a.startTime=i??this.calcStartTime(),this.pendingTimeline?(P1(a,this.pendingTimeline),this.pendingTimeline=void 0):a.onfinish=()=>{let{onComplete:m}=this.options;G.set(jn(l,this.options,t)),m&&m(),this.cancel(),this.resolveFinishedPromise()},{animation:a,duration:d,times:b,type:n,ease:o,keyframes:l}}get duration(){let{resolved:l}=this;if(!l)return 0;let{duration:t}=l;return Ce(t)}get time(){let{resolved:l}=this;if(!l)return 0;let{animation:t}=l;return Ce(t.currentTime||0)}set time(l){let{resolved:t}=this;if(!t)return;let{animation:e}=t;e.currentTime=wt(l)}get speed(){let{resolved:l}=this;if(!l)return 1;let{animation:t}=l;return t.playbackRate}set speed(l){let{resolved:t}=this;if(!t)return;let{animation:e}=t;e.playbackRate=l}get state(){let{resolved:l}=this;if(!l)return"idle";let{animation:t}=l;return t.playState}get startTime(){let{resolved:l}=this;if(!l)return null;let{animation:t}=l;return t.startTime}attachTimeline(l){if(!this._resolved)this.pendingTimeline=l;else{let{resolved:t}=this;if(!t)return Hl;let{animation:e}=t;P1(e,l)}return Hl}play(){if(this.isStopped)return;let{resolved:l}=this;if(!l)return;let{animation:t}=l;t.playState==="finished"&&this.updateFinishedPromise(),t.play()}pause(){let{resolved:l}=this;if(!l)return;let{animation:t}=l;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();let{resolved:l}=this;if(!l)return;let{animation:t,keyframes:e,duration:d,type:b,ease:o,times:n}=l;if(t.playState==="idle"||t.playState==="finished")return;if(this.time){let{motionValue:X,onUpdate:i,onComplete:a,element:m,...x}=this.options,s=new YX({...x,keyframes:e,duration:d,type:b,ease:o,times:n,isGenerator:!0}),r=wt(this.time);X.setWithVelocity(s.sample(r-oH).value,s.sample(r).value,oH)}let{onStop:G}=this.options;G&&G(),this.cancel()}complete(){let{resolved:l}=this;l&&l.animation.finish()}cancel(){let{resolved:l}=this;l&&l.animation.cancel()}static supports(l){let{motionValue:t,name:e,repeatDelay:d,repeatType:b,damping:o,type:n}=l;return p3()&&e&&H3.has(e)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!d&&b!=="mirror"&&o!==0&&n!=="inertia"}};var y3=Da(()=>window.ScrollTimeline!==void 0);var nH=class{constructor(l){this.stop=()=>this.runAll("stop"),this.animations=l.filter(Boolean)}then(l,t){return Promise.all(this.animations).then(l).catch(t)}getAll(l){return this.animations[0][l]}setAll(l,t){for(let e=0;e<this.animations.length;e++)this.animations[e][l]=t}attachTimeline(l,t){let e=this.animations.map(d=>y3()&&d.attachTimeline?d.attachTimeline(l):t(d));return()=>{e.forEach((d,b)=>{d&&d(),this.animations[b].stop()})}}get time(){return this.getAll("time")}set time(l){this.setAll("time",l)}get speed(){return this.getAll("speed")}set speed(l){this.setAll("speed",l)}get startTime(){return this.getAll("startTime")}get duration(){let l=0;for(let t=0;t<this.animations.length;t++)l=Math.max(l,this.animations[t].duration);return l}runAll(l){this.animations.forEach(t=>t[l]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};function V3({when:c,delay:l,delayChildren:t,staggerChildren:e,staggerDirection:d,repeat:b,repeatType:o,repeatDelay:n,from:G,elapsed:X,...i}){return!!Object.keys(i).length}var Ua=(c,l,t,e={},d,b)=>o=>{let n=va(e,c)||{},G=n.delay||e.delay||0,{elapsed:X=0}=e;X=X-wt(G);let i={keyframes:Array.isArray(t)?t:[null,t],ease:"easeOut",velocity:l.getVelocity(),...n,delay:-X,onUpdate:m=>{l.set(m),n.onUpdate&&n.onUpdate(m)},onComplete:()=>{o(),n.onComplete&&n.onComplete()},name:c,motionValue:l,element:b?void 0:d};V3(n)||(i={...i,...Ff(c,i)}),i.duration&&(i.duration=wt(i.duration)),i.repeatDelay&&(i.repeatDelay=wt(i.repeatDelay)),i.from!==void 0&&(i.keyframes[0]=i.from);let a=!1;if((i.type===!1||i.duration===0&&!i.repeatDelay)&&(i.duration=0,i.delay===0&&(a=!0)),(vZ.current||Na.skipAnimations)&&(a=!0,i.duration=0,i.delay=0),a&&!b&&l.get()!==void 0){let m=jn(i.keyframes,n);if(m!==void 0)return Nc.update(()=>{i.onUpdate(m),i.onComplete()}),new nH([])}return!b&&jx.supports(i)?new jx(i):new YX(i)};var C3=c=>!!(c&&typeof c=="object"&&c.mix&&c.toValue),J3=c=>kx(c)?c[c.length-1]||0:c;function ja(c,l){c.indexOf(l)===-1&&c.push(l)}function Ea(c,l){let t=c.indexOf(l);t>-1&&c.splice(t,1)}var Kn=class{constructor(){this.subscriptions=[]}add(l){return ja(this.subscriptions,l),()=>Ea(this.subscriptions,l)}notify(l,t,e){let d=this.subscriptions.length;if(d)if(d===1)this.subscriptions[0](l,t,e);else for(let b=0;b<d;b++){let o=this.subscriptions[b];o&&o(l,t,e)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var h3=30,ooc=c=>!isNaN(parseFloat(c)),Y3={current:void 0},K1=class{constructor(l,t={}){this.version="11.15.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,d=!0)=>{let b=Tt.now();this.updatedAt!==b&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),d&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(l),this.owner=t.owner}setCurrent(l){this.current=l,this.updatedAt=Tt.now(),this.canTrackVelocity===null&&l!==void 0&&(this.canTrackVelocity=ooc(this.current))}setPrevFrameValue(l=this.current){this.prevFrameValue=l,this.prevUpdatedAt=this.updatedAt}onChange(l){return this.on("change",l)}on(l,t){this.events[l]||(this.events[l]=new Kn);let e=this.events[l].add(t);return l==="change"?()=>{e(),Nc.read(()=>{this.events.change.getSize()||this.stop()})}:e}clearListeners(){for(let l in this.events)this.events[l].clear()}attach(l,t){this.passiveEffect=l,this.stopPassiveEffect=t}set(l,t=!0){!t||!this.passiveEffect?this.updateAndNotify(l,t):this.passiveEffect(l,this.updateAndNotify)}setWithVelocity(l,t,e){this.set(t),this.prev=void 0,this.prevFrameValue=l,this.prevUpdatedAt=this.updatedAt-e}jump(l,t=!0){this.updateAndNotify(l),this.prev=l,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Y3.current&&Y3.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let l=Tt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||l-this.updatedAt>h3)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,h3);return _Z(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(l){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=l(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Do(c,l){return new K1(c,l)}function noc(c,l,t){c.hasValue(l)?c.getValue(l).set(t):c.addValue(l,Do(t))}function F3(c,l){let t=Ln(c,l),{transitionEnd:e={},transition:d={},...b}=t||{};b={...b,...e};for(let o in b){let n=J3(b[o]);noc(c,o,n)}}var Ma=c=>c.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var Goc="framerAppearId",GH="data-"+Ma(Goc);function XH(c){return c.props[GH]}var Rl=c=>!!(c&&c.getVelocity);function v3(c){return!!(Rl(c)&&c.add)}function Ex(c,l){let t=c.getValue("willChange");if(v3(t))return t.add(l)}function Xoc({protectedKeys:c,needsAnimating:l},t){let e=c.hasOwnProperty(t)&&l[t]!==!0;return l[t]=!1,e}function iH(c,l,{delay:t=0,transitionOverride:e,type:d}={}){var b;let{transition:o=c.getDefaultTransition(),transitionEnd:n,...G}=l;e&&(o=e);let X=[],i=d&&c.animationState&&c.animationState.getState()[d];for(let a in G){let m=c.getValue(a,(b=c.latestValues[a])!==null&&b!==void 0?b:null),x=G[a];if(x===void 0||i&&Xoc(i,a))continue;let s={delay:t,...va(o||{},a)},r=!1;if(window.MotionHandoffAnimation){let Z=XH(c);if(Z){let H=window.MotionHandoffAnimation(Z,a,Nc);H!==null&&(s.startTime=H,r=!0)}}Ex(c,a),m.start(Ua(a,m,x,c.shouldReduceMotion&&Ve.has(a)?{type:!1}:s,c,r));let g=m.animation;g&&X.push(g)}return n&&Promise.all(X).then(()=>{Nc.update(()=>{n&&F3(c,n)})}),X}function aH(c,l,t={}){var e;let d=Ln(c,l,t.type==="exit"?(e=c.presenceContext)===null||e===void 0?void 0:e.custom:void 0),{transition:b=c.getDefaultTransition()||{}}=d||{};t.transitionOverride&&(b=t.transitionOverride);let o=d?()=>Promise.all(iH(c,d,t)):()=>Promise.resolve(),n=c.variantChildren&&c.variantChildren.size?(X=0)=>{let{delayChildren:i=0,staggerChildren:a,staggerDirection:m}=b;return ioc(c,l,i+X,a,m,t)}:()=>Promise.resolve(),{when:G}=b;if(G){let[X,i]=G==="beforeChildren"?[o,n]:[n,o];return X().then(()=>i())}else return Promise.all([o(),n(t.delay)])}function ioc(c,l,t=0,e=0,d=1,b){let o=[],n=(c.variantChildren.size-1)*e,G=d===1?(X=0)=>X*e:(X=0)=>n-X*e;return Array.from(c.variantChildren).sort(aoc).forEach((X,i)=>{X.notify("AnimationStart",l),o.push(aH(X,l,{...b,delay:t+G(i)}).then(()=>X.notify("AnimationComplete",l)))}),Promise.all(o)}function aoc(c,l){return c.sortNodePosition(l)}function N3(c,l,t={}){c.notify("AnimationStart",l);let e;if(Array.isArray(l)){let d=l.map(b=>aH(c,b,t));e=Promise.all(d)}else if(typeof l=="string")e=aH(c,l,t);else{let d=typeof l=="function"?Ln(c,l,t.custom):l;e=Promise.all(iH(c,d,t))}return e.then(()=>{c.notify("AnimationComplete",l)})}var uoc=zx.length;function _1(c){if(!c)return;if(!c.isControllingVariants){let t=c.parent?_1(c.parent)||{}:{};return c.props.initial!==void 0&&(t.initial=c.props.initial),t}let l={};for(let t=0;t<uoc;t++){let e=zx[t],d=c.props[e];(Qo(d)||d===!1)&&(l[e]=d)}return l}var moc=[...FZ].reverse(),xoc=FZ.length;function soc(c){return l=>Promise.all(l.map(({animation:t,options:e})=>N3(c,t,e)))}function S3(c){let l=soc(c),t=f3(),e=!0,d=G=>(X,i)=>{var a;let m=Ln(c,i,G==="exit"?(a=c.presenceContext)===null||a===void 0?void 0:a.custom:void 0);if(m){let{transition:x,transitionEnd:s,...r}=m;X={...X,...r,...s}}return X};function b(G){l=G(c)}function o(G){let{props:X}=c,i=_1(c.parent)||{},a=[],m=new Set,x={},s=1/0;for(let g=0;g<xoc;g++){let Z=moc[g],H=t[Z],R=X[Z]!==void 0?X[Z]:i[Z],W=Qo(R),I=Z===G?H.isActive:null;I===!1&&(s=g);let B=R===i[Z]&&R!==X[Z]&&W;if(B&&e&&c.manuallyAnimateOnMount&&(B=!1),H.protectedKeys={...x},!H.isActive&&I===null||!R&&!H.prevProp||Dn(R)||typeof R=="boolean")continue;let p=roc(H.prevProp,R),y=p||Z===G&&H.isActive&&!B&&W||g>s&&W,h=!1,C=Array.isArray(R)?R:[R],J=C.reduce(d(Z),{});I===!1&&(J={});let{prevResolvedValues:f={}}=H,k={...f,...J},F=v=>{y=!0,m.has(v)&&(h=!0,m.delete(v)),H.needsAnimating[v]=!0;let A=c.getValue(v);A&&(A.liveStyle=!1)};for(let v in k){let A=J[v],S=f[v];if(x.hasOwnProperty(v))continue;let U=!1;kx(A)&&kx(S)?U=!J1(A,S):U=A!==S,U?A!=null?F(v):m.add(v):A!==void 0&&m.has(v)?F(v):H.protectedKeys[v]=!0}H.prevProp=R,H.prevResolvedValues=J,H.isActive&&(x={...x,...J}),e&&c.blockInitialAnimation&&(y=!1),y&&(!(B&&p)||h)&&a.push(...C.map(v=>({animation:v,options:{type:Z}})))}if(m.size){let g={};m.forEach(Z=>{let H=c.getBaseTarget(Z),R=c.getValue(Z);R&&(R.liveStyle=!0),g[Z]=H??null}),a.push({animation:g})}let r=!!a.length;return e&&(X.initial===!1||X.initial===X.animate)&&!c.manuallyAnimateOnMount&&(r=!1),e=!1,r?l(a):Promise.resolve()}function n(G,X){var i;if(t[G].isActive===X)return Promise.resolve();(i=c.variantChildren)===null||i===void 0||i.forEach(m=>{var x;return(x=m.animationState)===null||x===void 0?void 0:x.setActive(G,X)}),t[G].isActive=X;let a=o(G);for(let m in t)t[m].protectedKeys={};return a}return{animateChanges:o,setActive:n,setAnimateFunction:b,getState:()=>t,reset:()=>{t=f3(),e=!0}}}function roc(c,l){return typeof l=="string"?l!==c:Array.isArray(l)?!J1(l,c):!1}function FX(c=!1){return{isActive:c,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function f3(){return{animate:FX(!0),whileInView:FX(),whileHover:FX(),whileTap:FX(),whileDrag:FX(),whileFocus:FX(),exit:FX()}}var mt=class{constructor(l){this.isMounted=!1,this.node=l}update(){}};var uH=class extends mt{constructor(l){super(l),l.animationState||(l.animationState=S3(l))}updateAnimationControlsSubscription(){let{animate:l}=this.node.getProps();Dn(l)&&(this.unmountControls=l.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:l}=this.node.getProps(),{animate:t}=this.node.prevProps||{};l!==t&&this.updateAnimationControlsSubscription()}unmount(){var l;this.node.animationState.reset(),(l=this.unmountControls)===null||l===void 0||l.call(this)}};var goc=0,mH=class extends mt{constructor(){super(...arguments),this.id=goc++}update(){if(!this.node.presenceContext)return;let{isPresent:l,onExitComplete:t}=this.node.presenceContext,{isPresent:e}=this.node.prevPresenceContext||{};if(!this.node.animationState||l===e)return;let d=this.node.animationState.setActive("exit",!l);t&&!l&&d.then(()=>t(this.id))}mount(){let{register:l}=this.node.presenceContext||{};l&&(this.unmount=l(this.id))}unmount(){}};var k3={animation:{Feature:uH},exit:{Feature:mH}};var Pe={x:!1,y:!1};function Pa(){return Pe.x||Pe.y}function q1(c,l,t){var e;if(c instanceof Element)return[c];if(typeof c=="string"){let d=document;l&&(d=l.current);let b=(e=t?.[c])!==null&&e!==void 0?e:d.querySelectorAll(c);return b?Array.from(b):[]}return Array.from(c)}function xH(c,l){let t=q1(c),e=new AbortController,d={passive:!0,...l,signal:e.signal};return[t,d,()=>e.abort()]}function z3(c){return l=>{l.pointerType==="touch"||Pa()||c(l)}}function $1(c,l,t={}){let[e,d,b]=xH(c,t),o=z3(n=>{let{target:G}=n,X=l(n);if(!X||!G)return;let i=z3(a=>{X(a),G.removeEventListener("pointerleave",i)});G.addEventListener("pointerleave",i,d)});return e.forEach(n=>{n.addEventListener("pointerenter",o,d)}),b}var vX=c=>c.pointerType==="mouse"?typeof c.button!="number"||c.button<=0:c.isPrimary!==!1;var NX=new WeakSet;function A3(c){return l=>{l.key==="Enter"&&c(l)}}function cV(c,l){c.dispatchEvent(new PointerEvent("pointer"+l,{isPrimary:!0,bubbles:!0}))}var O3=(c,l)=>{let t=c.currentTarget;if(!t)return;let e=A3(()=>{if(NX.has(t))return;cV(t,"down");let d=A3(()=>{cV(t,"up")}),b=()=>cV(t,"cancel");t.addEventListener("keyup",d,l),t.addEventListener("blur",b,l)});t.addEventListener("keydown",e,l),t.addEventListener("blur",()=>t.removeEventListener("keydown",e),l)};var Zoc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Q3(c){return Zoc.has(c.tagName)||c.tabIndex!==-1}var sH=(c,l)=>l?c===l?!0:sH(c,l.parentElement):!1;function w3(c){return vX(c)&&!Pa()}function lV(c,l,t={}){let[e,d,b]=xH(c,t),o=n=>{let G=n.currentTarget;if(!w3(n)||NX.has(G))return;NX.add(G);let X=l(n),i=(x,s)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",m),!(!w3(x)||!NX.has(G))&&(NX.delete(G),X&&X(x,{success:s}))},a=x=>{i(x,t.useGlobalTarget||sH(G,x.target))},m=x=>{i(x,!1)};window.addEventListener("pointerup",a,d),window.addEventListener("pointercancel",m,d)};return e.forEach(n=>{Q3(n)||(n.tabIndex=0),(t.useGlobalTarget?window:n).addEventListener("pointerdown",o,d),n.addEventListener("focus",X=>O3(X,d),d)}),b}function tV(c){return c==="x"||c==="y"?Pe[c]?null:(Pe[c]=!0,()=>{Pe[c]=!1}):Pe.x||Pe.y?null:(Pe.x=Pe.y=!0,()=>{Pe.x=Pe.y=!1})}function Lo(c){return{point:{x:c.pageX,y:c.pageY}}}var T3=c=>l=>vX(l)&&c(l,Lo(l));function Uo(c,l,t,e={passive:!0}){return c.addEventListener(l,t,e),()=>c.removeEventListener(l,t)}function _n(c,l,t,e){return Uo(c,l,T3(t),e)}var D3=(c,l)=>Math.abs(c-l);function L3(c,l){let t=D3(c.x,l.x),e=D3(c.y,l.y);return Math.sqrt(t**2+e**2)}var Ka=class{constructor(l,t,{transformPagePoint:e,contextWindow:d,dragSnapToOrigin:b=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=dV(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,x=L3(a.offset,{x:0,y:0})>=3;if(!m&&!x)return;let{point:s}=a,{timestamp:r}=wl;this.history.push({...s,timestamp:r});let{onStart:g,onMove:Z}=this.handlers;m||(g&&g(this.lastMoveEvent,a),this.startEvent=this.lastMoveEvent),Z&&Z(this.lastMoveEvent,a)},this.handlePointerMove=(a,m)=>{this.lastMoveEvent=a,this.lastMoveEventInfo=eV(m,this.transformPagePoint),Nc.update(this.updatePoint,!0)},this.handlePointerUp=(a,m)=>{this.end();let{onEnd:x,onSessionEnd:s,resumeAnimation:r}=this.handlers;if(this.dragSnapToOrigin&&r&&r(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let g=dV(a.type==="pointercancel"?this.lastMoveEventInfo:eV(m,this.transformPagePoint),this.history);this.startEvent&&x&&x(a,g),s&&s(a,g)},!vX(l))return;this.dragSnapToOrigin=b,this.handlers=t,this.transformPagePoint=e,this.contextWindow=d||window;let o=Lo(l),n=eV(o,this.transformPagePoint),{point:G}=n,{timestamp:X}=wl;this.history=[{...G,timestamp:X}];let{onSessionStart:i}=t;i&&i(l,dV(n,this.history)),this.removeListeners=jb(_n(this.contextWindow,"pointermove",this.handlePointerMove),_n(this.contextWindow,"pointerup",this.handlePointerUp),_n(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(l){this.handlers=l}end(){this.removeListeners&&this.removeListeners(),Me(this.updatePoint)}};function eV(c,l){return l?{point:l(c.point)}:c}function U3(c,l){return{x:c.x-l.x,y:c.y-l.y}}function dV({point:c},l){return{point:c,delta:U3(c,j3(l)),offset:U3(c,Hoc(l)),velocity:Roc(l,.1)}}function Hoc(c){return c[0]}function j3(c){return c[c.length-1]}function Roc(c,l){if(c.length<2)return{x:0,y:0};let t=c.length-1,e=null,d=j3(c);for(;t>=0&&(e=c[t],!(d.timestamp-e.timestamp>wt(l)));)t--;if(!e)return{x:0,y:0};let b=Ce(d.timestamp-e.timestamp);if(b===0)return{x:0,y:0};let o={x:(d.x-e.x)/b,y:(d.y-e.y)/b};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function jo(c){return c&&typeof c=="object"&&Object.prototype.hasOwnProperty.call(c,"current")}var K3=1e-4,Ioc=1-K3,Woc=1+K3,_3=.01,poc=0-_3,Boc=0+_3;function Vt(c){return c.max-c.min}function q3(c,l,t){return Math.abs(c-l)<=t}function E3(c,l,t,e=.5){c.origin=e,c.originPoint=Oc(l.min,l.max,c.origin),c.scale=Vt(t)/Vt(l),c.translate=Oc(t.min,t.max,c.origin)-c.originPoint,(c.scale>=Ioc&&c.scale<=Woc||isNaN(c.scale))&&(c.scale=1),(c.translate>=poc&&c.translate<=Boc||isNaN(c.translate))&&(c.translate=0)}function _a(c,l,t,e){E3(c.x,l.x,t.x,e?e.originX:void 0),E3(c.y,l.y,t.y,e?e.originY:void 0)}function M3(c,l,t){c.min=t.min+l.min,c.max=c.min+Vt(l)}function $3(c,l,t){M3(c.x,l.x,t.x),M3(c.y,l.y,t.y)}function P3(c,l,t){c.min=l.min-t.min,c.max=c.min+Vt(l)}function qa(c,l,t){P3(c.x,l.x,t.x),P3(c.y,l.y,t.y)}function dS(c,{min:l,max:t},e){return l!==void 0&&c<l?c=e?Oc(l,c,e.min):Math.max(c,l):t!==void 0&&c>t&&(c=e?Oc(t,c,e.max):Math.min(c,t)),c}function cS(c,l,t){return{min:l!==void 0?c.min+l:void 0,max:t!==void 0?c.max+t-(c.max-c.min):void 0}}function bS(c,{top:l,left:t,bottom:e,right:d}){return{x:cS(c.x,t,d),y:cS(c.y,l,e)}}function lS(c,l){let t=l.min-c.min,e=l.max-c.max;return l.max-l.min<c.max-c.min&&([t,e]=[e,t]),{min:t,max:e}}function oS(c,l){return{x:lS(c.x,l.x),y:lS(c.y,l.y)}}function nS(c,l){let t=.5,e=Vt(c),d=Vt(l);return d>e?t=tb(l.min,l.max-e,c.min):e>d&&(t=tb(c.min,c.max-d,l.min)),yt(0,1,t)}function GS(c,l){let t={};return l.min!==void 0&&(t.min=l.min-c.min),l.max!==void 0&&(t.max=l.max-c.min),t}var rH=.35;function XS(c=rH){return c===!1?c=0:c===!0&&(c=rH),{x:tS(c,"left","right"),y:tS(c,"top","bottom")}}function tS(c,l,t){return{min:eS(c,l),max:eS(c,t)}}function eS(c,l){return typeof c=="number"?c:c[l]||0}var iS=()=>({translate:0,scale:1,origin:0,originPoint:0}),fX=()=>({x:iS(),y:iS()}),aS=()=>({min:0,max:0}),Vl=()=>({x:aS(),y:aS()});function Je(c){return[c("x"),c("y")]}function gH({top:c,left:l,right:t,bottom:e}){return{x:{min:l,max:t},y:{min:c,max:e}}}function uS({x:c,y:l}){return{top:l.min,right:c.max,bottom:l.max,left:c.min}}function mS(c,l){if(!l)return c;let t=l({x:c.left,y:c.top}),e=l({x:c.right,y:c.bottom});return{top:t.y,left:t.x,bottom:e.y,right:e.x}}function bV(c){return c===void 0||c===1}function ZH({scale:c,scaleX:l,scaleY:t}){return!bV(c)||!bV(l)||!bV(t)}function Eo(c){return ZH(c)||oV(c)||c.z||c.rotate||c.rotateX||c.rotateY||c.skewX||c.skewY}function oV(c){return xS(c.x)||xS(c.y)}function xS(c){return c&&c!=="0%"}function Mx(c,l,t){let e=c-t,d=l*e;return t+d}function sS(c,l,t,e,d){return d!==void 0&&(c=Mx(c,d,e)),Mx(c,t,e)+l}function nV(c,l=0,t=1,e,d){c.min=sS(c.min,l,t,e,d),c.max=sS(c.max,l,t,e,d)}function GV(c,{x:l,y:t}){nV(c.x,l.translate,l.scale,l.originPoint),nV(c.y,t.translate,t.scale,t.originPoint)}var rS=.999999999999,gS=1.0000000000001;function HS(c,l,t,e=!1){let d=t.length;if(!d)return;l.x=l.y=1;let b,o;for(let n=0;n<d;n++){b=t[n],o=b.projectionDelta;let{visualElement:G}=b.options;G&&G.props.style&&G.props.style.display==="contents"||(e&&b.options.layoutScroll&&b.scroll&&b!==b.root&&SX(c,{x:-b.scroll.offset.x,y:-b.scroll.offset.y}),o&&(l.x*=o.x.scale,l.y*=o.y.scale,GV(c,o)),e&&Eo(b.latestValues)&&SX(c,b.latestValues))}l.x<gS&&l.x>rS&&(l.x=1),l.y<gS&&l.y>rS&&(l.y=1)}function qn(c,l){c.min=c.min+l,c.max=c.max+l}function ZS(c,l,t,e,d=.5){let b=Oc(c.min,c.max,d);nV(c,l,t,b,e)}function SX(c,l){ZS(c.x,l.x,l.scaleX,l.scale,l.originX),ZS(c.y,l.y,l.scaleY,l.scale,l.originY)}function XV(c,l){return gH(mS(c.getBoundingClientRect(),l))}function RS(c,l,t){let e=XV(c,t),{scroll:d}=l;return d&&(qn(e.x,d.offset.x),qn(e.y,d.offset.y)),e}var HH=({current:c})=>c?c.ownerDocument.defaultView:null;var yoc=new WeakMap,IH=class{constructor(l){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Vl(),this.visualElement=l}start(l,{snapToCursor:t=!1}={}){let{presenceContext:e}=this.visualElement;if(e&&e.isPresent===!1)return;let d=i=>{let{dragSnapToOrigin:a}=this.getProps();a?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Lo(i).point)},b=(i,a)=>{let{drag:m,dragPropagation:x,onDragStart:s}=this.getProps();if(m&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=tV(m),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Je(g=>{let Z=this.getAxisMotionValue(g).get()||0;if(te.test(Z)){let{projection:H}=this.visualElement;if(H&&H.layout){let R=H.layout.layoutBox[g];R&&(Z=Vt(R)*(parseFloat(Z)/100))}}this.originPoint[g]=Z}),s&&Nc.postRender(()=>s(i,a)),Ex(this.visualElement,"transform");let{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},o=(i,a)=>{let{dragPropagation:m,dragDirectionLock:x,onDirectionLock:s,onDrag:r}=this.getProps();if(!m&&!this.openDragLock)return;let{offset:g}=a;if(x&&this.currentDirection===null){this.currentDirection=Voc(g),this.currentDirection!==null&&s&&s(this.currentDirection);return}this.updateAxis("x",a.point,g),this.updateAxis("y",a.point,g),this.visualElement.render(),r&&r(i,a)},n=(i,a)=>this.stop(i,a),G=()=>Je(i=>{var a;return this.getAnimationState(i)==="paused"&&((a=this.getAxisMotionValue(i).animation)===null||a===void 0?void 0:a.play())}),{dragSnapToOrigin:X}=this.getProps();this.panSession=new Ka(l,{onSessionStart:d,onStart:b,onMove:o,onSessionEnd:n,resumeAnimation:G},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:X,contextWindow:HH(this.visualElement)})}stop(l,t){let e=this.isDragging;if(this.cancel(),!e)return;let{velocity:d}=t;this.startAnimation(d);let{onDragEnd:b}=this.getProps();b&&Nc.postRender(()=>b(l,t))}cancel(){this.isDragging=!1;let{projection:l,animationState:t}=this.visualElement;l&&(l.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:e}=this.getProps();!e&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(l,t,e){let{drag:d}=this.getProps();if(!e||!RH(l,d,this.currentDirection))return;let b=this.getAxisMotionValue(l),o=this.originPoint[l]+e[l];this.constraints&&this.constraints[l]&&(o=dS(o,this.constraints[l],this.elastic[l])),b.set(o)}resolveConstraints(){var l;let{dragConstraints:t,dragElastic:e}=this.getProps(),d=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(l=this.visualElement.projection)===null||l===void 0?void 0:l.layout,b=this.constraints;t&&jo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&d?this.constraints=bS(d.layoutBox,t):this.constraints=!1,this.elastic=XS(e),b!==this.constraints&&d&&this.constraints&&!this.hasMutatedConstraints&&Je(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=GS(d.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){let{dragConstraints:l,onMeasureDragConstraints:t}=this.getProps();if(!l||!jo(l))return!1;let e=l.current;Ee(e!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:d}=this.visualElement;if(!d||!d.layout)return!1;let b=RS(e,d.root,this.visualElement.getTransformPagePoint()),o=oS(d.layout.layoutBox,b);if(t){let n=t(uS(o));this.hasMutatedConstraints=!!n,n&&(o=gH(n))}return o}startAnimation(l){let{drag:t,dragMomentum:e,dragElastic:d,dragTransition:b,dragSnapToOrigin:o,onDragTransitionEnd:n}=this.getProps(),G=this.constraints||{},X=Je(i=>{if(!RH(i,t,this.currentDirection))return;let a=G&&G[i]||{};o&&(a={min:0,max:0});let m=d?200:1e6,x=d?40:1e7,s={type:"inertia",velocity:e?l[i]:0,bounceStiffness:m,bounceDamping:x,timeConstant:750,restDelta:1,restSpeed:10,...b,...a};return this.startAxisValueAnimation(i,s)});return Promise.all(X).then(n)}startAxisValueAnimation(l,t){let e=this.getAxisMotionValue(l);return Ex(this.visualElement,l),e.start(Ua(l,e,0,t,this.visualElement,!1))}stopAnimation(){Je(l=>this.getAxisMotionValue(l).stop())}pauseAnimation(){Je(l=>{var t;return(t=this.getAxisMotionValue(l).animation)===null||t===void 0?void 0:t.pause()})}getAnimationState(l){var t;return(t=this.getAxisMotionValue(l).animation)===null||t===void 0?void 0:t.state}getAxisMotionValue(l){let t=`_drag${l.toUpperCase()}`,e=this.visualElement.getProps(),d=e[t];return d||this.visualElement.getValue(l,(e.initial?e.initial[l]:void 0)||0)}snapToCursor(l){Je(t=>{let{drag:e}=this.getProps();if(!RH(t,e,this.currentDirection))return;let{projection:d}=this.visualElement,b=this.getAxisMotionValue(t);if(d&&d.layout){let{min:o,max:n}=d.layout.layoutBox[t];b.set(l[t]-Oc(o,n,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:l,dragConstraints:t}=this.getProps(),{projection:e}=this.visualElement;if(!jo(t)||!e||!this.constraints)return;this.stopAnimation();let d={x:0,y:0};Je(o=>{let n=this.getAxisMotionValue(o);if(n&&this.constraints!==!1){let G=n.get();d[o]=nS({min:G,max:G},this.constraints[o])}});let{transformTemplate:b}=this.visualElement.getProps();this.visualElement.current.style.transform=b?b({},""):"none",e.root&&e.root.updateScroll(),e.updateLayout(),this.resolveConstraints(),Je(o=>{if(!RH(o,l,null))return;let n=this.getAxisMotionValue(o),{min:G,max:X}=this.constraints[o];n.set(Oc(G,X,d[o]))})}addListeners(){if(!this.visualElement.current)return;yoc.set(this.visualElement,this);let l=this.visualElement.current,t=_n(l,"pointerdown",G=>{let{drag:X,dragListener:i=!0}=this.getProps();X&&i&&this.start(G)}),e=()=>{let{dragConstraints:G}=this.getProps();jo(G)&&G.current&&(this.constraints=this.resolveRefConstraints())},{projection:d}=this.visualElement,b=d.addEventListener("measure",e);d&&!d.layout&&(d.root&&d.root.updateScroll(),d.updateLayout()),Nc.read(e);let o=Uo(window,"resize",()=>this.scalePositionWithinConstraints()),n=d.addEventListener("didUpdate",(({delta:G,hasLayoutChanged:X})=>{this.isDragging&&X&&(Je(i=>{let a=this.getAxisMotionValue(i);a&&(this.originPoint[i]+=G[i].translate,a.set(a.get()+G[i].translate))}),this.visualElement.render())}));return()=>{o(),t(),b(),n&&n()}}getProps(){let l=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:e=!1,dragPropagation:d=!1,dragConstraints:b=!1,dragElastic:o=rH,dragMomentum:n=!0}=l;return{...l,drag:t,dragDirectionLock:e,dragPropagation:d,dragConstraints:b,dragElastic:o,dragMomentum:n}}};function RH(c,l,t){return(l===!0||l===c)&&(t===null||t===c)}function Voc(c,l=10){let t=null;return Math.abs(c.y)>l?t="y":Math.abs(c.x)>l&&(t="x"),t}var WH=class extends mt{constructor(l){super(l),this.removeGroupControls=Hl,this.removeListeners=Hl,this.controls=new IH(l)}mount(){let{dragControls:l}=this.node.getProps();l&&(this.removeGroupControls=l.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Hl}unmount(){this.removeGroupControls(),this.removeListeners()}};var IS=c=>(l,t)=>{c&&Nc.postRender(()=>c(l,t))},pH=class extends mt{constructor(){super(...arguments),this.removePointerDownListener=Hl}onPointerDown(l){this.session=new Ka(l,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:HH(this.node)})}createPanHandlers(){let{onPanSessionStart:l,onPanStart:t,onPan:e,onPanEnd:d}=this.node.getProps();return{onSessionStart:IS(l),onStart:IS(t),onMove:e,onEnd:(b,o)=>{delete this.session,d&&Nc.postRender(()=>d(b,o))}}}mount(){this.removePointerDownListener=_n(this.node.current,"pointerdown",l=>this.onPointerDown(l))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};var hS=u(V(),1),Px=u(E(),1);var cG=u(E(),1);var WS=u(E(),1),$n=(0,WS.createContext)(null);function pS(){let c=(0,cG.useContext)($n);if(c===null)return[!0,null];let{isPresent:l,onExitComplete:t,register:e}=c,d=(0,cG.useId)();(0,cG.useEffect)(()=>e(d),[]);let b=(0,cG.useCallback)(()=>t&&t(d),[d,t]);return!l&&t?[!1,b]:[!0]}var BS=u(E(),1),$a=(0,BS.createContext)({});var yS=u(E(),1),BH=(0,yS.createContext)({});var cu={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function VS(c,l){return l.max===l.min?0:c/(l.max-l.min)*100}var lu={correct:(c,l)=>{if(!l.target)return c;if(typeof c=="string")if(Zc.test(c))c=parseFloat(c);else return c;let t=VS(c,l.target.x),e=VS(c,l.target.y);return`${t}% ${e}%`}};var CS={correct:(c,{treeScale:l,projectionDelta:t})=>{let e=c,d=ee.parse(c);if(d.length>5)return e;let b=ee.createTransformer(c),o=typeof d[0]!="number"?1:0,n=t.x.scale*l.x,G=t.y.scale*l.y;d[0+o]/=n,d[1+o]/=G;let X=Oc(n,G,.5);return typeof d[2+o]=="number"&&(d[2+o]/=X),typeof d[3+o]=="number"&&(d[3+o]/=X),b(d)}};var tu={};function JS(c){Object.assign(tu,c)}var{schedule:eu,cancel:swc}=fZ(queueMicrotask,!1);var iV=class extends Px.Component{componentDidMount(){let{visualElement:l,layoutGroup:t,switchLayoutGroup:e,layoutId:d}=this.props,{projection:b}=l;JS(Coc),b&&(t.group&&t.group.add(b),e&&e.register&&d&&e.register(b),b.root.didUpdate(),b.addEventListener("animationComplete",()=>{this.safeToRemove()}),b.setOptions({...b.options,onExitComplete:()=>this.safeToRemove()})),cu.hasEverUpdated=!0}getSnapshotBeforeUpdate(l){let{layoutDependency:t,visualElement:e,drag:d,isPresent:b}=this.props,o=e.projection;return o&&(o.isPresent=b,d||l.layoutDependency!==t||t===void 0?o.willUpdate():this.safeToRemove(),l.isPresent!==b&&(b?o.promote():o.relegate()||Nc.postRender(()=>{let n=o.getStack();(!n||!n.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{projection:l}=this.props.visualElement;l&&(l.root.didUpdate(),eu.postRender(()=>{!l.currentAnimation&&l.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:l,layoutGroup:t,switchLayoutGroup:e}=this.props,{projection:d}=l;d&&(d.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(d),e&&e.deregister&&e.deregister(d))}safeToRemove(){let{safeToRemove:l}=this.props;l&&l()}render(){return null}};function yH(c){let[l,t]=pS(),e=(0,Px.useContext)($a);return(0,hS.jsx)(iV,{...c,layoutGroup:e,switchLayoutGroup:(0,Px.useContext)(BH),isPresent:l,safeToRemove:t})}var Coc={borderRadius:{...lu,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:lu,borderTopRightRadius:lu,borderBottomLeftRadius:lu,borderBottomRightRadius:lu,boxShadow:CS};var NS=["TopLeft","TopRight","BottomLeft","BottomRight"],Joc=NS.length,YS=c=>typeof c=="string"?parseFloat(c):c,FS=c=>typeof c=="number"||Zc.test(c);function fS(c,l,t,e,d,b){d?(c.opacity=Oc(0,t.opacity!==void 0?t.opacity:1,hoc(e)),c.opacityExit=Oc(l.opacity!==void 0?l.opacity:1,0,Yoc(e))):b&&(c.opacity=Oc(l.opacity!==void 0?l.opacity:1,t.opacity!==void 0?t.opacity:1,e));for(let o=0;o<Joc;o++){let n=`border${NS[o]}Radius`,G=vS(l,n),X=vS(t,n);if(G===void 0&&X===void 0)continue;G||(G=0),X||(X=0),G===0||X===0||FS(G)===FS(X)?(c[n]=Math.max(Oc(YS(G),YS(X),e),0),(te.test(X)||te.test(G))&&(c[n]+="%")):c[n]=X}(l.rotate||t.rotate)&&(c.rotate=Oc(l.rotate||0,t.rotate||0,e))}function vS(c,l){return c[l]!==void 0?c[l]:c.borderRadius}var hoc=SS(0,.5,wZ),Yoc=SS(.5,.95,Hl);function SS(c,l,t){return e=>e<c?0:e>l?1:t(tb(c,l,e))}function kS(c,l){c.min=l.min,c.max=l.max}function Ke(c,l){kS(c.x,l.x),kS(c.y,l.y)}function aV(c,l){c.translate=l.translate,c.scale=l.scale,c.originPoint=l.originPoint,c.origin=l.origin}function zS(c,l,t,e,d){return c-=l,c=Mx(c,1/t,e),d!==void 0&&(c=Mx(c,1/d,e)),c}function Foc(c,l=0,t=1,e=.5,d,b=c,o=c){if(te.test(l)&&(l=parseFloat(l),l=Oc(o.min,o.max,l/100)-o.min),typeof l!="number")return;let n=Oc(b.min,b.max,e);c===b&&(n-=l),c.min=zS(c.min,l,t,n,d),c.max=zS(c.max,l,t,n,d)}function AS(c,l,[t,e,d],b,o){Foc(c,l[t],l[e],l[d],l.scale,b,o)}var voc=["x","scaleX","originX"],Noc=["y","scaleY","originY"];function uV(c,l,t,e){AS(c.x,l,voc,t?t.x:void 0,e?e.x:void 0),AS(c.y,l,Noc,t?t.y:void 0,e?e.y:void 0)}function OS(c){return c.translate===0&&c.scale===1}function mV(c){return OS(c.x)&&OS(c.y)}function QS(c,l){return c.min===l.min&&c.max===l.max}function TS(c,l){return QS(c.x,l.x)&&QS(c.y,l.y)}function wS(c,l){return Math.round(c.min)===Math.round(l.min)&&Math.round(c.max)===Math.round(l.max)}function xV(c,l){return wS(c.x,l.x)&&wS(c.y,l.y)}function sV(c){return Vt(c.x)/Vt(c.y)}function rV(c,l){return c.translate===l.translate&&c.scale===l.scale&&c.originPoint===l.originPoint}var VH=class{constructor(){this.members=[]}add(l){ja(this.members,l),l.scheduleRender()}remove(l){if(Ea(this.members,l),l===this.prevLead&&(this.prevLead=void 0),l===this.lead){let t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(l){let t=this.members.findIndex(d=>l===d);if(t===0)return!1;let e;for(let d=t;d>=0;d--){let b=this.members[d];if(b.isPresent!==!1){e=b;break}}return e?(this.promote(e),!0):!1}promote(l,t){let e=this.lead;if(l!==e&&(this.prevLead=e,this.lead=l,l.show(),e)){e.instance&&e.scheduleRender(),l.scheduleRender(),l.resumeFrom=e,t&&(l.resumeFrom.preserveOpacity=!0),e.snapshot&&(l.snapshot=e.snapshot,l.snapshot.latestValues=e.animationValues||e.latestValues),l.root&&l.root.isUpdating&&(l.isLayoutDirty=!0);let{crossfade:d}=l.options;d===!1&&e.hide()}}exitAnimationComplete(){this.members.forEach(l=>{let{options:t,resumingFrom:e}=l;t.onExitComplete&&t.onExitComplete(),e&&e.options.onExitComplete&&e.options.onExitComplete()})}scheduleRender(){this.members.forEach(l=>{l.instance&&l.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function DS(c,l,t){let e="",d=c.x.translate/l.x,b=c.y.translate/l.y,o=t?.z||0;if((d||b||o)&&(e=`translate3d(${d}px, ${b}px, ${o}px) `),(l.x!==1||l.y!==1)&&(e+=`scale(${1/l.x}, ${1/l.y}) `),t){let{transformPerspective:X,rotate:i,rotateX:a,rotateY:m,skewX:x,skewY:s}=t;X&&(e=`perspective(${X}px) ${e}`),i&&(e+=`rotate(${i}deg) `),a&&(e+=`rotateX(${a}deg) `),m&&(e+=`rotateY(${m}deg) `),x&&(e+=`skewX(${x}deg) `),s&&(e+=`skewY(${s}deg) `)}let n=c.x.scale*l.x,G=c.y.scale*l.y;return(n!==1||G!==1)&&(e+=`scale(${n}, ${G})`),e||"none"}var LS=(c,l)=>c.depth-l.depth;var CH=class{constructor(){this.children=[],this.isDirty=!1}add(l){ja(this.children,l),this.isDirty=!0}remove(l){Ea(this.children,l),this.isDirty=!0}forEach(l){this.isDirty&&this.children.sort(LS),this.isDirty=!1,this.children.forEach(l)}};function du(c){let l=Rl(c)?c.get():c;return C3(l)?l.toValue():l}function US(c,l){let t=Tt.now(),e=({timestamp:d})=>{let b=d-t;b>=l&&(Me(e),c(b-l))};return Nc.read(e,!0),()=>Me(e)}function jS(c){return c instanceof SVGElement&&c.tagName!=="svg"}function ES(c,l,t){let e=Rl(c)?c:Do(c);return e.start(Ua("",e,l,t)),e.animation}var kX={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Kx=typeof window<"u"&&window.MotionDebug!==void 0,gV=["","X","Y","Z"],foc={visibility:"hidden"},MS=1e3,Soc=0;function ZV(c,l,t,e){let{latestValues:d}=l;d[c]&&(t[c]=d[c],l.setStaticValue(c,0),e&&(e[c]=0))}function tk(c){if(c.hasCheckedOptimisedAppear=!0,c.root===c)return;let{visualElement:l}=c.options;if(!l)return;let t=XH(l);if(window.MotionHasOptimisedAnimation(t,"transform")){let{layout:d,layoutId:b}=c.options;window.MotionCancelOptimisedAnimation(t,"transform",Nc,!(d||b))}let{parent:e}=c;e&&!e.hasCheckedOptimisedAppear&&tk(e)}function JH({attachResizeListener:c,defaultParent:l,measureScroll:t,checkIsScrollRoot:e,resetTransform:d}){return class{constructor(o={},n=l?.()){this.id=Soc++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Kx&&(kX.totalNodes=kX.resolvedTargetDeltas=kX.recalculatedProjection=0),this.nodes.forEach(Aoc),this.nodes.forEach(Doc),this.nodes.forEach(Loc),this.nodes.forEach(Ooc),Kx&&window.MotionDebug.record(kX)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let G=0;G<this.path.length;G++)this.path[G].shouldResetTransform=!0;this.root===this&&(this.nodes=new CH)}addEventListener(o,n){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Kn),this.eventHandlers.get(o).add(n)}notifyListeners(o,...n){let G=this.eventHandlers.get(o);G&&G.notify(...n)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=jS(o),this.instance=o;let{layoutId:G,layout:X,visualElement:i}=this.options;if(i&&!i.current&&i.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(X||G)&&(this.isLayoutDirty=!0),c){let a,m=()=>this.root.updateBlockedByResize=!1;c(o,()=>{this.root.updateBlockedByResize=!0,a&&a(),a=US(m,250),cu.hasAnimatedSinceResize&&(cu.hasAnimatedSinceResize=!1,this.nodes.forEach(KS))})}G&&this.root.registerSharedNode(G,this),this.options.animate!==!1&&i&&(G||X)&&this.addEventListener("didUpdate",({delta:a,hasLayoutChanged:m,hasRelativeTargetChanged:x,layout:s})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let r=this.options.transition||i.getDefaultTransition()||Poc,{onLayoutAnimationStart:g,onLayoutAnimationComplete:Z}=i.getProps(),H=!this.targetLayout||!xV(this.targetLayout,s)||x,R=!m&&x;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||R||m&&(H||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(a,R);let W={...va(r,"layout"),onPlay:g,onComplete:Z};(i.shouldReduceMotion||this.options.layoutRoot)&&(W.delay=0,W.type=!1),this.startAnimation(W)}else m||KS(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=s})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Me(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Uoc),this.animationId++)}getTransformTemplate(){let{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&tk(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let i=0;i<this.path.length;i++){let a=this.path[i];a.shouldResetTransform=!0,a.updateScroll("snapshot"),a.options.layoutRoot&&a.willUpdate(!1)}let{layoutId:n,layout:G}=this.options;if(n===void 0&&!G)return;let X=this.getTransformTemplate();this.prevTransformTemplateValue=X?X(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(PS);return}this.isUpdating||this.nodes.forEach(woc),this.isUpdating=!1,this.nodes.forEach(Toc),this.nodes.forEach(koc),this.nodes.forEach(zoc),this.clearAllSnapshots();let n=Tt.now();wl.delta=yt(0,1e3/60,n-wl.timestamp),wl.timestamp=n,wl.isProcessing=!0,SZ.update.process(wl),SZ.preRender.process(wl),SZ.render.process(wl),wl.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,eu.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Qoc),this.sharedNodes.forEach(joc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Nc.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Nc.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let G=0;G<this.path.length;G++)this.path[G].updateScroll();let o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Vl(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:n}=this.options;n&&n.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let n=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(n=!1),n){let G=e(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:G,offset:t(this.instance),wasRoot:this.scroll?this.scroll.isRoot:G}}}resetTransform(){if(!d)return;let o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,n=this.projectionDelta&&!mV(this.projectionDelta),G=this.getTransformTemplate(),X=G?G(this.latestValues,""):void 0,i=X!==this.prevTransformTemplateValue;o&&(n||Eo(this.latestValues)||i)&&(d(this.instance,X),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){let n=this.measurePageBox(),G=this.removeElementScroll(n);return o&&(G=this.removeTransform(G)),Koc(G),{animationId:this.root.animationId,measuredBox:n,layoutBox:G,latestValues:{},source:this.id}}measurePageBox(){var o;let{visualElement:n}=this.options;if(!n)return Vl();let G=n.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(_oc))){let{scroll:i}=this.root;i&&(qn(G.x,i.offset.x),qn(G.y,i.offset.y))}return G}removeElementScroll(o){var n;let G=Vl();if(Ke(G,o),!((n=this.scroll)===null||n===void 0)&&n.wasRoot)return G;for(let X=0;X<this.path.length;X++){let i=this.path[X],{scroll:a,options:m}=i;i!==this.root&&a&&m.layoutScroll&&(a.wasRoot&&Ke(G,o),qn(G.x,a.offset.x),qn(G.y,a.offset.y))}return G}applyTransform(o,n=!1){let G=Vl();Ke(G,o);for(let X=0;X<this.path.length;X++){let i=this.path[X];!n&&i.options.layoutScroll&&i.scroll&&i!==i.root&&SX(G,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),Eo(i.latestValues)&&SX(G,i.latestValues)}return Eo(this.latestValues)&&SX(G,this.latestValues),G}removeTransform(o){let n=Vl();Ke(n,o);for(let G=0;G<this.path.length;G++){let X=this.path[G];if(!X.instance||!Eo(X.latestValues))continue;ZH(X.latestValues)&&X.updateSnapshot();let i=Vl(),a=X.measurePageBox();Ke(i,a),uV(n,X.latestValues,X.snapshot?X.snapshot.layoutBox:void 0,i)}return Eo(this.latestValues)&&uV(n,this.latestValues),n}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==wl.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var n;let G=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=G.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=G.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=G.isSharedProjectionDirty);let X=!!this.resumingFrom||this!==G;if(!(o||X&&this.isSharedProjectionDirty||this.isProjectionDirty||!((n=this.parent)===null||n===void 0)&&n.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:a,layoutId:m}=this.options;if(!(!this.layout||!(a||m))){if(this.resolvedRelativeTargetAt=wl.timestamp,!this.targetDelta&&!this.relativeTarget){let x=this.getClosestProjectingParent();x&&x.layout&&this.animationProgress!==1?(this.relativeParent=x,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Vl(),this.relativeTargetOrigin=Vl(),qa(this.relativeTargetOrigin,this.layout.layoutBox,x.layout.layoutBox),Ke(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Vl(),this.targetWithTransforms=Vl()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),$3(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ke(this.target,this.layout.layoutBox),GV(this.target,this.targetDelta)):Ke(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let x=this.getClosestProjectingParent();x&&!!x.resumingFrom==!!this.resumingFrom&&!x.options.layoutScroll&&x.target&&this.animationProgress!==1?(this.relativeParent=x,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Vl(),this.relativeTargetOrigin=Vl(),qa(this.relativeTargetOrigin,this.target,x.target),Ke(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Kx&&kX.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||ZH(this.parent.latestValues)||oV(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;let n=this.getLead(),G=!!this.resumingFrom||this!==n,X=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(X=!1),G&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(X=!1),this.resolvedRelativeTargetAt===wl.timestamp&&(X=!1),X)return;let{layout:i,layoutId:a}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(i||a))return;Ke(this.layoutCorrected,this.layout.layoutBox);let m=this.treeScale.x,x=this.treeScale.y;HS(this.layoutCorrected,this.treeScale,this.path,G),n.layout&&!n.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(n.target=n.layout.layoutBox,n.targetWithTransforms=Vl());let{target:s}=n;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(aV(this.prevProjectionDelta.x,this.projectionDelta.x),aV(this.prevProjectionDelta.y,this.projectionDelta.y)),_a(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==m||this.treeScale.y!==x||!rV(this.projectionDelta.x,this.prevProjectionDelta.x)||!rV(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s)),Kx&&kX.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var n;if((n=this.options.visualElement)===null||n===void 0||n.scheduleRender(),o){let G=this.getStack();G&&G.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=fX(),this.projectionDelta=fX(),this.projectionDeltaWithTransform=fX()}setAnimationOrigin(o,n=!1){let G=this.snapshot,X=G?G.latestValues:{},i={...this.latestValues},a=fX();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!n;let m=Vl(),x=G?G.source:void 0,s=this.layout?this.layout.source:void 0,r=x!==s,g=this.getStack(),Z=!g||g.members.length<=1,H=!!(r&&!Z&&this.options.crossfade===!0&&!this.path.some(Moc));this.animationProgress=0;let R;this.mixTargetDelta=W=>{let I=W/1e3;_S(a.x,o.x,I),_S(a.y,o.y,I),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(qa(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Eoc(this.relativeTarget,this.relativeTargetOrigin,m,I),R&&TS(this.relativeTarget,R)&&(this.isProjectionDirty=!1),R||(R=Vl()),Ke(R,this.relativeTarget)),r&&(this.animationValues=i,fS(i,X,this.latestValues,I,H,Z)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=I},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Me(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Nc.update(()=>{cu.hasAnimatedSinceResize=!0,this.currentAnimation=ES(0,MS,{...o,onUpdate:n=>{this.mixTargetDelta(n),o.onUpdate&&o.onUpdate(n)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(MS),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let o=this.getLead(),{targetWithTransforms:n,target:G,layout:X,latestValues:i}=o;if(!(!n||!G||!X)){if(this!==o&&this.layout&&X&&ek(this.options.animationType,this.layout.layoutBox,X.layoutBox)){G=this.target||Vl();let a=Vt(this.layout.layoutBox.x);G.x.min=o.target.x.min,G.x.max=G.x.min+a;let m=Vt(this.layout.layoutBox.y);G.y.min=o.target.y.min,G.y.max=G.y.min+m}Ke(n,G),SX(n,i),_a(this.projectionDeltaWithTransform,this.layoutCorrected,n,i)}}registerSharedNode(o,n){this.sharedNodes.has(o)||this.sharedNodes.set(o,new VH),this.sharedNodes.get(o).add(n);let X=n.options.initialPromotionConfig;n.promote({transition:X?X.transition:void 0,preserveFollowOpacity:X&&X.shouldPreserveFollowOpacity?X.shouldPreserveFollowOpacity(n):void 0})}isLead(){let o=this.getStack();return o?o.lead===this:!0}getLead(){var o;let{layoutId:n}=this.options;return n?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;let{layoutId:n}=this.options;return n?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){let{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:n,preserveFollowOpacity:G}={}){let X=this.getStack();X&&X.promote(this,G),o&&(this.projectionDelta=void 0,this.needsReset=!0),n&&this.setOptions({transition:n})}relegate(){let o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){let{visualElement:o}=this.options;if(!o)return;let n=!1,{latestValues:G}=o;if((G.z||G.rotate||G.rotateX||G.rotateY||G.rotateZ||G.skewX||G.skewY)&&(n=!0),!n)return;let X={};G.z&&ZV("z",o,X,this.animationValues);for(let i=0;i<gV.length;i++)ZV(`rotate${gV[i]}`,o,X,this.animationValues),ZV(`skew${gV[i]}`,o,X,this.animationValues);o.render();for(let i in X)o.setStaticValue(i,X[i]),this.animationValues&&(this.animationValues[i]=X[i]);o.scheduleRender()}getProjectionStyles(o){var n,G;if(!this.instance||this.isSVG)return;if(!this.isVisible)return foc;let X={visibility:""},i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,X.opacity="",X.pointerEvents=du(o?.pointerEvents)||"",X.transform=i?i(this.latestValues,""):"none",X;let a=this.getLead();if(!this.projectionDelta||!this.layout||!a.target){let r={};return this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=du(o?.pointerEvents)||""),this.hasProjected&&!Eo(this.latestValues)&&(r.transform=i?i({},""):"none",this.hasProjected=!1),r}let m=a.animationValues||a.latestValues;this.applyTransformsToTarget(),X.transform=DS(this.projectionDeltaWithTransform,this.treeScale,m),i&&(X.transform=i(m,X.transform));let{x,y:s}=this.projectionDelta;X.transformOrigin=`${x.origin*100}% ${s.origin*100}% 0`,a.animationValues?X.opacity=a===this?(G=(n=m.opacity)!==null&&n!==void 0?n:this.latestValues.opacity)!==null&&G!==void 0?G:1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:X.opacity=a===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(let r in tu){if(m[r]===void 0)continue;let{correct:g,applyTo:Z}=tu[r],H=X.transform==="none"?m[r]:g(m[r],a);if(Z){let R=Z.length;for(let W=0;W<R;W++)X[Z[W]]=H}else X[r]=H}return this.options.layoutId&&(X.pointerEvents=a===this?du(o?.pointerEvents)||"":"none"),X}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var n;return(n=o.currentAnimation)===null||n===void 0?void 0:n.stop()}),this.root.nodes.forEach(PS),this.root.sharedNodes.clear()}}}function koc(c){c.updateLayout()}function zoc(c){var l;let t=((l=c.resumeFrom)===null||l===void 0?void 0:l.snapshot)||c.snapshot;if(c.isLead()&&c.layout&&t&&c.hasListeners("didUpdate")){let{layoutBox:e,measuredBox:d}=c.layout,{animationType:b}=c.options,o=t.source!==c.layout.source;b==="size"?Je(a=>{let m=o?t.measuredBox[a]:t.layoutBox[a],x=Vt(m);m.min=e[a].min,m.max=m.min+x}):ek(b,t.layoutBox,e)&&Je(a=>{let m=o?t.measuredBox[a]:t.layoutBox[a],x=Vt(e[a]);m.max=m.min+x,c.relativeTarget&&!c.currentAnimation&&(c.isProjectionDirty=!0,c.relativeTarget[a].max=c.relativeTarget[a].min+x)});let n=fX();_a(n,e,t.layoutBox);let G=fX();o?_a(G,c.applyTransform(d,!0),t.measuredBox):_a(G,e,t.layoutBox);let X=!mV(n),i=!1;if(!c.resumeFrom){let a=c.getClosestProjectingParent();if(a&&!a.resumeFrom){let{snapshot:m,layout:x}=a;if(m&&x){let s=Vl();qa(s,t.layoutBox,m.layoutBox);let r=Vl();qa(r,e,x.layoutBox),xV(s,r)||(i=!0),a.options.layoutRoot&&(c.relativeTarget=r,c.relativeTargetOrigin=s,c.relativeParent=a)}}}c.notifyListeners("didUpdate",{layout:e,snapshot:t,delta:G,layoutDelta:n,hasLayoutChanged:X,hasRelativeTargetChanged:i})}else if(c.isLead()){let{onExitComplete:e}=c.options;e&&e()}c.options.transition=void 0}function Aoc(c){Kx&&kX.totalNodes++,c.parent&&(c.isProjecting()||(c.isProjectionDirty=c.parent.isProjectionDirty),c.isSharedProjectionDirty||(c.isSharedProjectionDirty=!!(c.isProjectionDirty||c.parent.isProjectionDirty||c.parent.isSharedProjectionDirty)),c.isTransformDirty||(c.isTransformDirty=c.parent.isTransformDirty))}function Ooc(c){c.isProjectionDirty=c.isSharedProjectionDirty=c.isTransformDirty=!1}function Qoc(c){c.clearSnapshot()}function PS(c){c.clearMeasurements()}function woc(c){c.isLayoutDirty=!1}function Toc(c){let{visualElement:l}=c.options;l&&l.getProps().onBeforeLayoutMeasure&&l.notify("BeforeLayoutMeasure"),c.resetTransform()}function KS(c){c.finishAnimation(),c.targetDelta=c.relativeTarget=c.target=void 0,c.isProjectionDirty=!0}function Doc(c){c.resolveTargetDelta()}function Loc(c){c.calcProjection()}function Uoc(c){c.resetSkewAndRotation()}function joc(c){c.removeLeadSnapshot()}function _S(c,l,t){c.translate=Oc(l.translate,0,t),c.scale=Oc(l.scale,1,t),c.origin=l.origin,c.originPoint=l.originPoint}function qS(c,l,t,e){c.min=Oc(l.min,t.min,e),c.max=Oc(l.max,t.max,e)}function Eoc(c,l,t,e){qS(c.x,l.x,t.x,e),qS(c.y,l.y,t.y,e)}function Moc(c){return c.animationValues&&c.animationValues.opacityExit!==void 0}var Poc={duration:.45,ease:[.4,0,.1,1]},$S=c=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(c),ck=$S("applewebkit/")&&!$S("chrome/")?Math.round:Hl;function lk(c){c.min=ck(c.min),c.max=ck(c.max)}function Koc(c){lk(c.x),lk(c.y)}function ek(c,l,t){return c==="position"||c==="preserve-aspect"&&!q3(sV(l),sV(t),.2)}function _oc(c){var l;return c!==c.root&&((l=c.scroll)===null||l===void 0?void 0:l.wasRoot)}var dk=JH({attachResizeListener:(c,l)=>Uo(c,"resize",l),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var HV={current:void 0},hH=JH({measureScroll:c=>({x:c.scrollLeft,y:c.scrollTop}),defaultParent:()=>{if(!HV.current){let c=new dk({});c.mount(window),c.setOptions({layoutScroll:!0}),HV.current=c}return HV.current},resetTransform:(c,l)=>{c.style.transform=l!==void 0?l:"none"},checkIsScrollRoot:c=>window.getComputedStyle(c).position==="fixed"});var bk={pan:{Feature:pH},drag:{Feature:WH,ProjectionNode:hH,MeasureLayout:yH}};function ok(c,l,t){let{props:e}=c;c.animationState&&e.whileHover&&c.animationState.setActive("whileHover",t==="Start");let d="onHover"+t,b=e[d];b&&Nc.postRender(()=>b(l,Lo(l)))}var YH=class extends mt{mount(){let{current:l}=this.node;l&&(this.unmount=$1(l,t=>(ok(this.node,t,"Start"),e=>ok(this.node,e,"End"))))}unmount(){}};var FH=class extends mt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let l=!1;try{l=this.node.current.matches(":focus-visible")}catch{l=!0}!l||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=jb(Uo(this.node.current,"focus",()=>this.onFocus()),Uo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function nk(c,l,t){let{props:e}=c;c.animationState&&e.whileTap&&c.animationState.setActive("whileTap",t==="Start");let d="onTap"+(t==="End"?"":t),b=e[d];b&&Nc.postRender(()=>b(l,Lo(l)))}var vH=class extends mt{mount(){let{current:l}=this.node;l&&(this.unmount=lV(l,t=>(nk(this.node,t,"Start"),(e,{success:d})=>nk(this.node,e,d?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var IV=new WeakMap,RV=new WeakMap,qoc=c=>{let l=IV.get(c.target);l&&l(c)},$oc=c=>{c.forEach(qoc)};function cnc({root:c,...l}){let t=c||document;RV.has(t)||RV.set(t,{});let e=RV.get(t),d=JSON.stringify(l);return e[d]||(e[d]=new IntersectionObserver($oc,{root:c,...l})),e[d]}function Gk(c,l,t){let e=cnc(l);return IV.set(c,t),e.observe(c),()=>{IV.delete(c),e.unobserve(c)}}var lnc={some:0,all:1},NH=class extends mt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:l={}}=this.node.getProps(),{root:t,margin:e,amount:d="some",once:b}=l,o={root:t?t.current:void 0,rootMargin:e,threshold:typeof d=="number"?d:lnc[d]},n=G=>{let{isIntersecting:X}=G;if(this.isInView===X||(this.isInView=X,b&&!X&&this.hasEnteredView))return;X&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",X);let{onViewportEnter:i,onViewportLeave:a}=this.node.getProps(),m=X?i:a;m&&m(G)};return Gk(this.node.current,o,n)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:l,prevProps:t}=this.node;["amount","margin","root"].some(tnc(l,t))&&this.startObserver()}unmount(){}};function tnc({viewport:c={}},{viewport:l={}}={}){return t=>c[t]!==l[t]}var Xk={inView:{Feature:NH},tap:{Feature:vH},focus:{Feature:FH},hover:{Feature:YH}};var ik={layout:{ProjectionNode:hH,MeasureLayout:yH}};var OH=u(V(),1),nu=u(E(),1);var ak=u(E(),1),bu=(0,ak.createContext)({transformPagePoint:c=>c,isStatic:!1,reducedMotion:"never"});var uk=u(E(),1),lG=(0,uk.createContext)({});var he=u(E(),1);var fH=u(E(),1);var ou=typeof window<"u";var SH=ou?fH.useLayoutEffect:fH.useEffect;var mk=u(E(),1),kH=(0,mk.createContext)({strict:!1});function xk(c,l,t,e,d){var b,o;let{visualElement:n}=(0,he.useContext)(lG),G=(0,he.useContext)(kH),X=(0,he.useContext)($n),i=(0,he.useContext)(bu).reducedMotion,a=(0,he.useRef)(null);e=e||G.renderer,!a.current&&e&&(a.current=e(c,{visualState:l,parent:n,props:t,presenceContext:X,blockInitialAnimation:X?X.initial===!1:!1,reducedMotionConfig:i}));let m=a.current,x=(0,he.useContext)(BH);m&&!m.projection&&d&&(m.type==="html"||m.type==="svg")&&enc(a.current,t,d,x);let s=(0,he.useRef)(!1);(0,he.useInsertionEffect)(()=>{m&&s.current&&m.update(t,X)});let r=t[GH],g=(0,he.useRef)(!!r&&!(!((b=window.MotionHandoffIsComplete)===null||b===void 0)&&b.call(window,r))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,r)));return SH(()=>{m&&(s.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),eu.render(m.render),g.current&&m.animationState&&m.animationState.animateChanges())}),(0,he.useEffect)(()=>{m&&(!g.current&&m.animationState&&m.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var Z;(Z=window.MotionHandoffMarkAsComplete)===null||Z===void 0||Z.call(window,r)}),g.current=!1))}),m}function enc(c,l,t,e){let{layoutId:d,layout:b,drag:o,dragConstraints:n,layoutScroll:G,layoutRoot:X}=l;c.projection=new t(c.latestValues,l["data-framer-portal-id"]?void 0:sk(c.parent)),c.projection.setOptions({layoutId:d,layout:b,alwaysMeasureLayout:!!o||n&&jo(n),visualElement:c,animationType:typeof b=="string"?b:"both",initialPromotionConfig:e,layoutScroll:G,layoutRoot:X})}function sk(c){if(c)return c.options.allowProjection!==!1?c.projection:sk(c.parent)}var rk=u(E(),1);function gk(c,l,t){return(0,rk.useCallback)(e=>{e&&c.mount&&c.mount(e),l&&(e?l.mount(e):l.unmount()),t&&(typeof t=="function"?t(e):jo(t)&&(t.current=e))},[l])}var AH=u(E(),1);function zX(c){return Dn(c.animate)||zx.some(l=>Qo(c[l]))}function zH(c){return!!(zX(c)||c.variants)}function Zk(c,l){if(zX(c)){let{initial:t,animate:e}=c;return{initial:t===!1||Qo(t)?t:void 0,animate:Qo(e)?e:void 0}}return c.inherit!==!1?l:{}}function Rk(c){let{initial:l,animate:t}=Zk(c,(0,AH.useContext)(lG));return(0,AH.useMemo)(()=>({initial:l,animate:t}),[Hk(l),Hk(t)])}function Hk(c){return Array.isArray(c)?c.join(" "):c}var Ik={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Mo={};for(let c in Ik)Mo[c]={isEnabled:l=>Ik[c].some(t=>!!l[t])};function Wk(c){for(let l in c)Mo[l]={...Mo[l],...c[l]}}var pk=Symbol.for("motionComponentSymbol");function Bk({preloadedFeatures:c,createVisualElement:l,useRender:t,useVisualState:e,Component:d}){c&&Wk(c);function b(n,G){let X,i={...(0,nu.useContext)(bu),...n,layoutId:dnc(n)},{isStatic:a}=i,m=Rk(n),x=e(n,a);if(!a&&ou){bnc(i,c);let s=onc(i);X=s.MeasureLayout,m.visualElement=xk(d,x,i,l,s.ProjectionNode)}return(0,OH.jsxs)(lG.Provider,{value:m,children:[X&&m.visualElement?(0,OH.jsx)(X,{visualElement:m.visualElement,...i}):null,t(d,n,gk(x,m.visualElement,G),x,a,m.visualElement)]})}let o=(0,nu.forwardRef)(b);return o[pk]=d,o}function dnc({layoutId:c}){let l=(0,nu.useContext)($a).id;return l&&c!==void 0?l+"-"+c:c}function bnc(c,l){let t=(0,nu.useContext)(kH).strict}function onc(c){let{drag:l,layout:t}=Mo;if(!l&&!t)return{};let e={...l,...t};return{MeasureLayout:l?.isEnabled(c)||t?.isEnabled(c)?e.MeasureLayout:void 0,ProjectionNode:e.ProjectionNode}}var yk=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Gu(c){return typeof c!="string"||c.includes("-")?!1:!!(yk.indexOf(c)>-1||/[A-Z]/u.test(c))}function QH(c,{style:l,vars:t},e,d){Object.assign(c.style,l,d&&d.getProjectionStyles(e));for(let b in t)c.style.setProperty(b,t[b])}var wH=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function TH(c,l,t,e){QH(c,l,void 0,e);for(let d in l.attrs)c.setAttribute(wH.has(d)?d:Ma(d),l.attrs[d])}function DH(c,{layout:l,layoutId:t}){return Ve.has(c)||c.startsWith("origin")||(l||t!==void 0)&&(!!tu[c]||c==="opacity")}function Xu(c,l,t){var e;let{style:d}=c,b={};for(let o in d)(Rl(d[o])||l.style&&Rl(l.style[o])||DH(o,c)||((e=t?.getValue(o))===null||e===void 0?void 0:e.liveStyle)!==void 0)&&(b[o]=d[o]);return b}function LH(c,l,t){let e=Xu(c,l,t);for(let d in c)if(Rl(c[d])||Rl(l[d])){let b=Un.indexOf(d)!==-1?"attr"+d.charAt(0).toUpperCase()+d.substring(1):d;e[b]=c[d]}return e}var WV=u(E(),1);var Vk=u(E(),1);function iu(c){let l=(0,Vk.useRef)(null);return l.current===null&&(l.current=c()),l.current}function nnc({scrapeMotionValuesFromProps:c,createRenderState:l,onMount:t},e,d,b){let o={latestValues:Gnc(e,d,b,c),renderState:l()};return t&&(o.mount=n=>t(e,n,o)),o}var UH=c=>(l,t)=>{let e=(0,WV.useContext)(lG),d=(0,WV.useContext)($n),b=()=>nnc(c,l,e,d);return t?b():iu(b)};function Gnc(c,l,t,e){let d={},b=e(c,{});for(let m in b)d[m]=du(b[m]);let{initial:o,animate:n}=c,G=zX(c),X=zH(c);l&&X&&!G&&c.inherit!==!1&&(o===void 0&&(o=l.initial),n===void 0&&(n=l.animate));let i=t?t.initial===!1:!1;i=i||o===!1;let a=i?n:o;if(a&&typeof a!="boolean"&&!Dn(a)){let m=Array.isArray(a)?a:[a];for(let x=0;x<m.length;x++){let s=Fa(c,m[x]);if(s){let{transitionEnd:r,transition:g,...Z}=s;for(let H in Z){let R=Z[H];if(Array.isArray(R)){let W=i?R.length-1:0;R=R[W]}R!==null&&(d[H]=R)}for(let H in r)d[H]=r[H]}}}return d}var au=()=>({style:{},transform:{},transformOrigin:{},vars:{}});var jH=()=>({...au(),attrs:{}});var EH=(c,l)=>l&&typeof c=="number"?l.transform(c):c;var Xnc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},inc=Un.length;function Ck(c,l,t){let e="",d=!0;for(let b=0;b<inc;b++){let o=Un[b],n=c[o];if(n===void 0)continue;let G=!0;if(typeof n=="number"?G=n===(o.startsWith("scale")?1:0):G=parseFloat(n)===0,!G||t){let X=EH(n,za[o]);if(!G){d=!1;let i=Xnc[o]||o;e+=`${i}(${X}) `}t&&(l[o]=X)}}return e=e.trim(),t?e=t(l,d?"":e):d&&(e="none"),e}function uu(c,l,t){let{style:e,vars:d,transformOrigin:b}=c,o=!1,n=!1;for(let G in l){let X=l[G];if(Ve.has(G)){o=!0;continue}else if(UZ(G)){d[G]=X;continue}else{let i=EH(X,za[G]);G.startsWith("origin")?(n=!0,b[G]=i):e[G]=i}}if(l.transform||(o||t?e.transform=Ck(l,c.transform,t):e.transform&&(e.transform="none")),n){let{originX:G="50%",originY:X="50%",originZ:i=0}=b;e.transformOrigin=`${G} ${X} ${i}`}}function Jk(c,l,t){return typeof c=="string"?c:Zc.transform(l+t*c)}function hk(c,l,t){let e=Jk(l,c.x,c.width),d=Jk(t,c.y,c.height);return`${e} ${d}`}var anc={offset:"stroke-dashoffset",array:"stroke-dasharray"},unc={offset:"strokeDashoffset",array:"strokeDasharray"};function Yk(c,l,t=1,e=0,d=!0){c.pathLength=1;let b=d?anc:unc;c[b.offset]=Zc.transform(-e);let o=Zc.transform(l),n=Zc.transform(t);c[b.array]=`${o} ${n}`}function mu(c,{attrX:l,attrY:t,attrScale:e,originX:d,originY:b,pathLength:o,pathSpacing:n=1,pathOffset:G=0,...X},i,a){if(uu(c,X,a),i){c.style.viewBox&&(c.attrs.viewBox=c.style.viewBox);return}c.attrs=c.style,c.style={};let{attrs:m,style:x,dimensions:s}=c;m.transform&&(s&&(x.transform=m.transform),delete m.transform),s&&(d!==void 0||b!==void 0||x.transform)&&(x.transformOrigin=hk(s,d!==void 0?d:.5,b!==void 0?b:.5)),l!==void 0&&(m.x=l),t!==void 0&&(m.y=t),e!==void 0&&(m.scale=e),o!==void 0&&Yk(m,o,n,G,!1)}var xu=c=>typeof c=="string"&&c.toLowerCase()==="svg";var Fk={useVisualState:UH({scrapeMotionValuesFromProps:LH,createRenderState:jH,onMount:(c,l,{renderState:t,latestValues:e})=>{Nc.read(()=>{try{t.dimensions=typeof l.getBBox=="function"?l.getBBox():l.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}),Nc.render(()=>{mu(t,e,xu(l.tagName),c.transformTemplate),TH(l,t)})}})};var vk={useVisualState:UH({scrapeMotionValuesFromProps:Xu,createRenderState:au})};var su=u(E(),1);var Nk=u(E(),1);function pV(c,l,t){for(let e in l)!Rl(l[e])&&!DH(e,t)&&(c[e]=l[e])}function mnc({transformTemplate:c},l){return(0,Nk.useMemo)(()=>{let t=au();return uu(t,l,c),Object.assign({},t.vars,t.style)},[l])}function xnc(c,l){let t=c.style||{},e={};return pV(e,t,c),Object.assign(e,mnc(c,l)),e}function fk(c,l){let t={},e=xnc(c,l);return c.drag&&c.dragListener!==!1&&(t.draggable=!1,e.userSelect=e.WebkitUserSelect=e.WebkitTouchCallout="none",e.touchAction=c.drag===!0?"none":`pan-${c.drag==="x"?"y":"x"}`),c.tabIndex===void 0&&(c.onTap||c.onTapStart||c.whileTap)&&(t.tabIndex=0),t.style=e,t}var snc=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function _x(c){return c.startsWith("while")||c.startsWith("drag")&&c!=="draggable"||c.startsWith("layout")||c.startsWith("onTap")||c.startsWith("onPan")||c.startsWith("onLayout")||snc.has(c)}var kk=c=>!_x(c);function gnc(c){c&&(kk=l=>l.startsWith("on")?!_x(l):c(l))}try{gnc((yV(),C9(Sk)).default)}catch{}function zk(c,l,t){let e={};for(let d in c)d==="values"&&typeof c.values=="object"||(kk(d)||t===!0&&_x(d)||!l&&!_x(d)||c.draggable&&d.startsWith("onDrag"))&&(e[d]=c[d]);return e}var Ak=u(E(),1);function Ok(c,l,t,e){let d=(0,Ak.useMemo)(()=>{let b=jH();return mu(b,l,xu(e),c.transformTemplate),{...b.attrs,style:{...b.style}}},[l]);if(c.style){let b={};pV(b,c.style,c),d.style={...b,...d.style}}return d}function Qk(c=!1){return(t,e,d,{latestValues:b},o)=>{let G=(Gu(t)?Ok:fk)(e,b,o,t),X=zk(e,typeof t=="string",c),i=t!==su.Fragment?{...X,...G,ref:d}:{},{children:a}=e,m=(0,su.useMemo)(()=>Rl(a)?a.get():a,[a]);return(0,su.createElement)(t,{...i,children:m})}}function wk(c,l){return function(e,{forwardMotionProps:d}={forwardMotionProps:!1}){let o={...Gu(e)?Fk:vk,preloadedFeatures:c,useRender:Qk(d),createVisualElement:l,Component:e};return Bk(o)}}var jk=u(E(),1);var qx={current:null},KH={current:!1};function Tk(){if(KH.current=!0,!!ou)if(window.matchMedia){let c=window.matchMedia("(prefers-reduced-motion)"),l=()=>qx.current=c.matches;c.addListener(l),l()}else qx.current=!1}function Dk(c,l,t){for(let e in l){let d=l[e],b=t[e];if(Rl(d))c.addValue(e,d);else if(Rl(b))c.addValue(e,Do(d,{owner:c}));else if(b!==d)if(c.hasValue(e)){let o=c.getValue(e);o.liveStyle===!0?o.jump(d):o.hasAnimated||o.set(d)}else{let o=c.getStaticValue(e);c.addValue(e,Do(o!==void 0?o:d,{owner:c}))}}for(let e in t)l[e]===void 0&&c.removeValue(e);return l}var VV=new WeakMap;var Znc=[...N1,Ml,ee],Lk=c=>Znc.find(jZ(c));var Uk=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],_H=class{scrapeMotionValuesFromProps(l,t,e){return{}}constructor({parent:l,props:t,presenceContext:e,reducedMotionConfig:d,blockInitialAnimation:b,visualState:o},n={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=En,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let m=Tt.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Nc.render(this.render,!1,!0))};let{latestValues:G,renderState:X}=o;this.latestValues=G,this.baseTarget={...G},this.initialValues=t.initial?{...G}:{},this.renderState=X,this.parent=l,this.props=t,this.presenceContext=e,this.depth=l?l.depth+1:0,this.reducedMotionConfig=d,this.options=n,this.blockInitialAnimation=!!b,this.isControllingVariants=zX(t),this.isVariantNode=zH(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(l&&l.current);let{willChange:i,...a}=this.scrapeMotionValuesFromProps(t,{},this);for(let m in a){let x=a[m];G[m]!==void 0&&Rl(x)&&x.set(G[m],!1)}}mount(l){this.current=l,VV.set(l,this),this.projection&&!this.projection.instance&&this.projection.mount(l),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),KH.current||Tk(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:qx.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){VV.delete(this.current),this.projection&&this.projection.unmount(),Me(this.notifyUpdate),Me(this.render),this.valueSubscriptions.forEach(l=>l()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(let l in this.events)this.events[l].clear();for(let l in this.features){let t=this.features[l];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(l,t){this.valueSubscriptions.has(l)&&this.valueSubscriptions.get(l)();let e=Ve.has(l),d=t.on("change",n=>{this.latestValues[l]=n,this.props.onUpdate&&Nc.preRender(this.notifyUpdate),e&&this.projection&&(this.projection.isTransformDirty=!0)}),b=t.on("renderRequest",this.scheduleRender),o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,l,t)),this.valueSubscriptions.set(l,()=>{d(),b(),o&&o(),t.owner&&t.stop()})}sortNodePosition(l){return!this.current||!this.sortInstanceNodePosition||this.type!==l.type?0:this.sortInstanceNodePosition(this.current,l.current)}updateFeatures(){let l="animation";for(l in Mo){let t=Mo[l];if(!t)continue;let{isEnabled:e,Feature:d}=t;if(!this.features[l]&&d&&e(this.props)&&(this.features[l]=new d(this)),this.features[l]){let b=this.features[l];b.isMounted?b.update():(b.mount(),b.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Vl()}getStaticValue(l){return this.latestValues[l]}setStaticValue(l,t){this.latestValues[l]=t}update(l,t){(l.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=l,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let e=0;e<Uk.length;e++){let d=Uk[e];this.propEventSubscriptions[d]&&(this.propEventSubscriptions[d](),delete this.propEventSubscriptions[d]);let b="on"+d,o=l[b];o&&(this.propEventSubscriptions[d]=this.on(d,o))}this.prevMotionValues=Dk(this,this.scrapeMotionValuesFromProps(l,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(l){return this.props.variants?this.props.variants[l]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(l){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(l),()=>t.variantChildren.delete(l)}addValue(l,t){let e=this.values.get(l);t!==e&&(e&&this.removeValue(l),this.bindToMotionValue(l,t),this.values.set(l,t),this.latestValues[l]=t.get())}removeValue(l){this.values.delete(l);let t=this.valueSubscriptions.get(l);t&&(t(),this.valueSubscriptions.delete(l)),delete this.latestValues[l],this.removeValueFromRenderState(l,this.renderState)}hasValue(l){return this.values.has(l)}getValue(l,t){if(this.props.values&&this.props.values[l])return this.props.values[l];let e=this.values.get(l);return e===void 0&&t!==void 0&&(e=Do(t===null?void 0:t,{owner:this}),this.addValue(l,e)),e}readValue(l,t){var e;let d=this.latestValues[l]!==void 0||!this.current?this.latestValues[l]:(e=this.getBaseTargetFromProps(this.props,l))!==null&&e!==void 0?e:this.readValueFromInstance(this.current,l,this.options);return d!=null&&(typeof d=="string"&&(LZ(d)||DZ(d))?d=parseFloat(d):!Lk(d)&&ee.test(t)&&(d=MZ(l,t)),this.setBaseTarget(l,Rl(d)?d.get():d)),Rl(d)?d.get():d}setBaseTarget(l,t){this.baseTarget[l]=t}getBaseTarget(l){var t;let{initial:e}=this.props,d;if(typeof e=="string"||typeof e=="object"){let o=Fa(this.props,e,(t=this.presenceContext)===null||t===void 0?void 0:t.custom);o&&(d=o[l])}if(e&&d!==void 0)return d;let b=this.getBaseTargetFromProps(this.props,l);return b!==void 0&&!Rl(b)?b:this.initialValues[l]!==void 0&&d===void 0?void 0:this.baseTarget[l]}on(l,t){return this.events[l]||(this.events[l]=new Kn),this.events[l].add(t)}notify(l,...t){this.events[l]&&this.events[l].notify(...t)}};var ru=class extends _H{constructor(){super(...arguments),this.KeyframeResolver=Oa}sortInstanceNodePosition(l,t){return l.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(l,t){return l.style?l.style[t]:void 0}removeValueFromRenderState(l,{vars:t,style:e}){delete t[l],delete e[l]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:l}=this.props;Rl(l)&&(this.childSubscription=l.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}};function Hnc(c){return window.getComputedStyle(c)}var qH=class extends ru{constructor(){super(...arguments),this.type="html",this.renderInstance=QH}readValueFromInstance(l,t){if(Ve.has(t)){let e=Aa(t);return e&&e.default||0}else{let e=Hnc(l),d=(UZ(t)?e.getPropertyValue(t):e[t])||0;return typeof d=="string"?d.trim():d}}measureInstanceViewportBox(l,{transformPagePoint:t}){return XV(l,t)}build(l,t,e){uu(l,t,e.transformTemplate)}scrapeMotionValuesFromProps(l,t,e){return Xu(l,t,e)}};var $H=class extends ru{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Vl}getBaseTargetFromProps(l,t){return l[t]}readValueFromInstance(l,t){if(Ve.has(t)){let e=Aa(t);return e&&e.default||0}return t=wH.has(t)?t:Ma(t),l.getAttribute(t)}scrapeMotionValuesFromProps(l,t,e){return LH(l,t,e)}build(l,t,e){mu(l,t,this.isSVGTag,e.transformTemplate)}renderInstance(l,t,e,d){TH(l,t,e,d)}mount(l){this.isSVGTag=xu(l.tagName),super.mount(l)}};var Ek=(c,l)=>Gu(c)?new $H(l):new qH(l,{allowProjection:c!==jk.Fragment});var Mk=wk({...k3,...Xk,...bk,...ik},Ek);var tG=hf(Mk);var cs=u(V(),1),Eb=u(E(),1);var JV=u(V(),1),_k=u(E(),1),AX=u(E(),1);var Pk=u(V(),1),cR=u(E(),1),Po=u(E(),1);var CV=class extends cR.Component{getSnapshotBeforeUpdate(l){let t=this.props.childRef.current;if(t&&l.isPresent&&!this.props.isPresent){let e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}};function Kk({children:c,isPresent:l}){let t=(0,Po.useId)(),e=(0,Po.useRef)(null),d=(0,Po.useRef)({width:0,height:0,top:0,left:0}),{nonce:b}=(0,Po.useContext)(bu);return(0,Po.useInsertionEffect)(()=>{let{width:o,height:n,top:G,left:X}=d.current;if(l||!e.current||!o||!n)return;e.current.dataset.motionPopId=t;let i=document.createElement("style");return b&&(i.nonce=b),document.head.appendChild(i),i.sheet&&i.sheet.insertRule(`
          [data-motion-pop-id="${t}"] {
            position: absolute !important;
            width: ${o}px !important;
            height: ${n}px !important;
            top: ${G}px !important;
            left: ${X}px !important;
          }
        `),()=>{document.head.removeChild(i)}},[l]),(0,Pk.jsx)(CV,{isPresent:l,childRef:e,sizeRef:d,children:cR.cloneElement(c,{ref:e})})}var qk=({children:c,initial:l,isPresent:t,onExitComplete:e,custom:d,presenceAffectsLayout:b,mode:o})=>{let n=iu(Rnc),G=(0,AX.useId)(),X=(0,AX.useCallback)(a=>{n.set(a,!0);for(let m of n.values())if(!m)return;e&&e()},[n,e]),i=(0,AX.useMemo)(()=>({id:G,initial:l,isPresent:t,custom:d,onExitComplete:X,register:a=>(n.set(a,!1),()=>n.delete(a))}),b?[Math.random(),X]:[t,X]);return(0,AX.useMemo)(()=>{n.forEach((a,m)=>n.set(m,!1))},[t]),_k.useEffect(()=>{!t&&!n.size&&e&&e()},[t]),o==="popLayout"&&(c=(0,JV.jsx)(Kk,{isPresent:t,children:c})),(0,JV.jsx)($n.Provider,{value:i,children:c})};function Rnc(){return new Map}var lR=u(E(),1),$x=c=>c.key||"";function hV(c){let l=[];return lR.Children.forEach(c,t=>{(0,lR.isValidElement)(t)&&l.push(t)}),l}var gu=({children:c,exitBeforeEnter:l,custom:t,initial:e=!0,onExitComplete:d,presenceAffectsLayout:b=!0,mode:o="sync"})=>{Ee(!l,"Replace exitBeforeEnter with mode='wait'");let n=(0,Eb.useMemo)(()=>hV(c),[c]),G=n.map($x),X=(0,Eb.useRef)(!0),i=(0,Eb.useRef)(n),a=iu(()=>new Map),[m,x]=(0,Eb.useState)(n),[s,r]=(0,Eb.useState)(n);SH(()=>{X.current=!1,i.current=n;for(let H=0;H<s.length;H++){let R=$x(s[H]);G.includes(R)?a.delete(R):a.get(R)!==!0&&a.set(R,!1)}},[s,G.length,G.join("-")]);let g=[];if(n!==m){let H=[...n];for(let R=0;R<s.length;R++){let W=s[R],I=$x(W);G.includes(I)||(H.splice(R,0,W),g.push(W))}o==="wait"&&g.length&&(H=g),r(hV(H)),x(n);return}let{forceRender:Z}=(0,Eb.useContext)($a);return(0,cs.jsx)(cs.Fragment,{children:s.map(H=>{let R=$x(H),W=n===s||G.includes(R),I=()=>{if(a.has(R))a.set(R,!0);else return;let B=!0;a.forEach(p=>{p||(B=!1)}),B&&(Z?.(),r(i.current),d&&d())};return(0,cs.jsx)(qk,{isPresent:W,initial:!X.current||e?void 0:!1,custom:W?void 0:t,presenceAffectsLayout:b,mode:o,onExitComplete:W?void 0:I,children:H},R)})})};var Zu=u(Y(),1);function Dt(c){return c!=null}function $k(c){let l=c==="";return!Dt(c)||l}function cz(c=[],l){return c.find(Dt)??l}var Inc=c=>parseFloat(c),ls=c=>typeof c=="string"?Inc(c):c;var lz={initial:void 0,fallback:""};function Wnc(c,l=lz){let{initial:t,fallback:e}={...lz,...l},[d,b]=(0,Zu.useState)(c),o=Dt(c);(0,Zu.useEffect)(()=>{o&&d&&b(void 0)},[o,d]);let n=cz([c,d,t],e),G=(0,Zu.useCallback)(X=>{o||b(X)},[o]);return[n,G]}var Ko=Wnc;var ts=u(Y(),1);function pnc(c,l){let t=(0,ts.useRef)(!1);(0,ts.useEffect)(()=>{if(t.current)return c();t.current=!0},l),(0,ts.useEffect)(()=>()=>{t.current=!1},[])}var OX=pnc;var tR=u(Y(),1);function de({defaultValue:c,onChange:l,value:t}){let e=typeof t<"u",d=e?t:c,[b,o]=(0,tR.useState)(d),n=e?t:b,G=(0,tR.useCallback)((i,...a)=>{o(i),l?.(i,...a)},[l]),X;return e&&typeof l=="function"?X=l:!e&&typeof l=="function"?X=G:X=o,[n,X]}var Wd=u(E()),is=u(E());var Bnc=!1;function ync(c){if(c.sheet)return c.sheet;for(var l=0;l<document.styleSheets.length;l++)if(document.styleSheets[l].ownerNode===c)return document.styleSheets[l]}function Vnc(c){var l=document.createElement("style");return l.setAttribute("data-emotion",c.key),c.nonce!==void 0&&l.setAttribute("nonce",c.nonce),l.appendChild(document.createTextNode("")),l.setAttribute("data-s",""),l}var tz=(function(){function c(t){var e=this;this._insertTag=function(d){var b;e.tags.length===0?e.insertionPoint?b=e.insertionPoint.nextSibling:e.prepend?b=e.container.firstChild:b=e.before:b=e.tags[e.tags.length-1].nextSibling,e.container.insertBefore(d,b),e.tags.push(d)},this.isSpeedy=t.speedy===void 0?!Bnc:t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var l=c.prototype;return l.hydrate=function(e){e.forEach(this._insertTag)},l.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Vnc(this));var d=this.tags[this.tags.length-1];if(this.isSpeedy){var b=ync(d);try{b.insertRule(e,b.cssRules.length)}catch{}}else d.appendChild(document.createTextNode(e));this.ctr++},l.flush=function(){this.tags.forEach(function(e){var d;return(d=e.parentNode)==null?void 0:d.removeChild(e)}),this.tags=[],this.ctr=0},c})();var Ct="-ms-",es="-moz-",Pc="-webkit-",eR="comm",Hu="rule",Ru="decl";var ez="@import";var dR="@keyframes";var dz="@layer";var bz=Math.abs,QX=String.fromCharCode,oz=Object.assign;function nz(c,l){return Tl(c,0)^45?(((l<<2^Tl(c,0))<<2^Tl(c,1))<<2^Tl(c,2))<<2^Tl(c,3):0}function bR(c){return c.trim()}function YV(c,l){return(c=l.exec(c))?c[0]:c}function Tc(c,l,t){return c.replace(l,t)}function ds(c,l){return c.indexOf(l)}function Tl(c,l){return c.charCodeAt(l)|0}function eG(c,l,t){return c.slice(l,t)}function be(c){return c.length}function Iu(c){return c.length}function Wu(c,l){return l.push(c),c}function FV(c,l){return c.map(l).join("")}var oR=1,pu=1,Gz=0,oe=0,Pl=0,yu="";function bs(c,l,t,e,d,b,o){return{value:c,root:l,parent:t,type:e,props:d,children:b,line:oR,column:pu,length:o,return:""}}function Vu(c,l){return oz(bs("",null,null,"",null,null,0),c,{length:-c.length},l)}function Xz(){return Pl}function iz(){return Pl=oe>0?Tl(yu,--oe):0,pu--,Pl===10&&(pu=1,oR--),Pl}function ne(){return Pl=oe<Gz?Tl(yu,oe++):0,pu++,Pl===10&&(pu=1,oR++),Pl}function Id(){return Tl(yu,oe)}function os(){return oe}function Cu(c,l){return eG(yu,c,l)}function Bu(c){switch(c){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function nR(c){return oR=pu=1,Gz=be(yu=c),oe=0,[]}function GR(c){return yu="",c}function Ju(c){return bR(Cu(oe-1,vV(c===91?c+2:c===40?c+1:c)))}function az(c){for(;(Pl=Id())&&Pl<33;)ne();return Bu(c)>2||Bu(Pl)>3?"":" "}function uz(c,l){for(;--l&&ne()&&!(Pl<48||Pl>102||Pl>57&&Pl<65||Pl>70&&Pl<97););return Cu(c,os()+(l<6&&Id()==32&&ne()==32))}function vV(c){for(;ne();)switch(Pl){case c:return oe;case 34:case 39:c!==34&&c!==39&&vV(Pl);break;case 40:c===41&&vV(c);break;case 92:ne();break}return oe}function mz(c,l){for(;ne()&&c+Pl!==57;)if(c+Pl===84&&Id()===47)break;return"/*"+Cu(l,oe-1)+"*"+QX(c===47?c:ne())}function xz(c){for(;!Bu(Id());)ne();return Cu(c,oe)}function gz(c){return GR(XR("",null,null,null,[""],c=nR(c),0,[0],c))}function XR(c,l,t,e,d,b,o,n,G){for(var X=0,i=0,a=o,m=0,x=0,s=0,r=1,g=1,Z=1,H=0,R="",W=d,I=b,B=e,p=R;g;)switch(s=H,H=ne()){case 40:if(s!=108&&Tl(p,a-1)==58){ds(p+=Tc(Ju(H),"&","&\f"),"&\f")!=-1&&(Z=-1);break}case 34:case 39:case 91:p+=Ju(H);break;case 9:case 10:case 13:case 32:p+=az(s);break;case 92:p+=uz(os()-1,7);continue;case 47:switch(Id()){case 42:case 47:Wu(Cnc(mz(ne(),os()),l,t),G);break;default:p+="/"}break;case 123*r:n[X++]=be(p)*Z;case 125*r:case 59:case 0:switch(H){case 0:case 125:g=0;case 59+i:Z==-1&&(p=Tc(p,/\f/g,"")),x>0&&be(p)-a&&Wu(x>32?rz(p+";",e,t,a-1):rz(Tc(p," ","")+";",e,t,a-2),G);break;case 59:p+=";";default:if(Wu(B=sz(p,l,t,X,i,d,n,R,W=[],I=[],a),b),H===123)if(i===0)XR(p,l,B,B,W,b,a,n,I);else switch(m===99&&Tl(p,3)===110?100:m){case 100:case 108:case 109:case 115:XR(c,B,B,e&&Wu(sz(c,B,B,0,0,d,n,R,d,W=[],a),I),d,I,a,n,e?W:I);break;default:XR(p,B,B,B,[""],I,0,n,I)}}X=i=x=0,r=Z=1,R=p="",a=o;break;case 58:a=1+be(p),x=s;default:if(r<1){if(H==123)--r;else if(H==125&&r++==0&&iz()==125)continue}switch(p+=QX(H),H*r){case 38:Z=i>0?1:(p+="\f",-1);break;case 44:n[X++]=(be(p)-1)*Z,Z=1;break;case 64:Id()===45&&(p+=Ju(ne())),m=Id(),i=a=be(R=p+=xz(os())),H++;break;case 45:s===45&&be(p)==2&&(r=0)}}return b}function sz(c,l,t,e,d,b,o,n,G,X,i){for(var a=d-1,m=d===0?b:[""],x=Iu(m),s=0,r=0,g=0;s<e;++s)for(var Z=0,H=eG(c,a+1,a=bz(r=o[s])),R=c;Z<x;++Z)(R=bR(r>0?m[Z]+" "+H:Tc(H,/&\f/g,m[Z])))&&(G[g++]=R);return bs(c,l,t,d===0?Hu:n,G,X,i)}function Cnc(c,l,t){return bs(c,l,t,eR,QX(Xz()),eG(c,2,-2),0)}function rz(c,l,t,e){return bs(c,l,t,Ru,eG(c,0,e),eG(c,e+1,-1),e)}function wX(c,l){for(var t="",e=Iu(c),d=0;d<e;d++)t+=l(c[d],d,c,l)||"";return t}function Zz(c,l,t,e){switch(c.type){case dz:if(c.children.length)break;case ez:case Ru:return c.return=c.return||c.value;case eR:return"";case dR:return c.return=c.value+"{"+wX(c.children,e)+"}";case Hu:c.value=c.props.join(",")}return be(t=wX(c.children,e))?c.return=c.value+"{"+t+"}":""}function Hz(c){var l=Iu(c);return function(t,e,d,b){for(var o="",n=0;n<l;n++)o+=c[n](t,e,d,b)||"";return o}}function Rz(c){return function(l){l.root||(l=l.return)&&c(l)}}PH();var Jnc=function(l,t,e){for(var d=0,b=0;d=b,b=Id(),d===38&&b===12&&(t[e]=1),!Bu(b);)ne();return Cu(l,oe)},hnc=function(l,t){var e=-1,d=44;do switch(Bu(d)){case 0:d===38&&Id()===12&&(t[e]=1),l[e]+=Jnc(oe-1,t,e);break;case 2:l[e]+=Ju(d);break;case 4:if(d===44){l[++e]=Id()===58?"&\f":"",t[e]=l[e].length;break}default:l[e]+=QX(d)}while(d=ne());return l},Ync=function(l,t){return GR(hnc(nR(l),t))},Iz=new WeakMap,Fnc=function(l){if(!(l.type!=="rule"||!l.parent||l.length<1)){for(var t=l.value,e=l.parent,d=l.column===e.column&&l.line===e.line;e.type!=="rule";)if(e=e.parent,!e)return;if(!(l.props.length===1&&t.charCodeAt(0)!==58&&!Iz.get(e))&&!d){Iz.set(l,!0);for(var b=[],o=Ync(t,b),n=e.props,G=0,X=0;G<o.length;G++)for(var i=0;i<n.length;i++,X++)l.props[X]=b[G]?o[G].replace(/&\f/g,n[i]):n[i]+" "+o[G]}}},vnc=function(l){if(l.type==="decl"){var t=l.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(l.return="",l.value="")}};function Wz(c,l){switch(nz(c,l)){case 5103:return Pc+"print-"+c+c;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Pc+c+c;case 5349:case 4246:case 4810:case 6968:case 2756:return Pc+c+es+c+Ct+c+c;case 6828:case 4268:return Pc+c+Ct+c+c;case 6165:return Pc+c+Ct+"flex-"+c+c;case 5187:return Pc+c+Tc(c,/(\w+).+(:[^]+)/,Pc+"box-$1$2"+Ct+"flex-$1$2")+c;case 5443:return Pc+c+Ct+"flex-item-"+Tc(c,/flex-|-self/,"")+c;case 4675:return Pc+c+Ct+"flex-line-pack"+Tc(c,/align-content|flex-|-self/,"")+c;case 5548:return Pc+c+Ct+Tc(c,"shrink","negative")+c;case 5292:return Pc+c+Ct+Tc(c,"basis","preferred-size")+c;case 6060:return Pc+"box-"+Tc(c,"-grow","")+Pc+c+Ct+Tc(c,"grow","positive")+c;case 4554:return Pc+Tc(c,/([^-])(transform)/g,"$1"+Pc+"$2")+c;case 6187:return Tc(Tc(Tc(c,/(zoom-|grab)/,Pc+"$1"),/(image-set)/,Pc+"$1"),c,"")+c;case 5495:case 3959:return Tc(c,/(image-set\([^]*)/,Pc+"$1$`$1");case 4968:return Tc(Tc(c,/(.+:)(flex-)?(.*)/,Pc+"box-pack:$3"+Ct+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Pc+c+c;case 4095:case 3583:case 4068:case 2532:return Tc(c,/(.+)-inline(.+)/,Pc+"$1$2")+c;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(be(c)-1-l>6)switch(Tl(c,l+1)){case 109:if(Tl(c,l+4)!==45)break;case 102:return Tc(c,/(.+:)(.+)-([^]+)/,"$1"+Pc+"$2-$3$1"+es+(Tl(c,l+3)==108?"$3":"$2-$3"))+c;case 115:return~ds(c,"stretch")?Wz(Tc(c,"stretch","fill-available"),l)+c:c}break;case 4949:if(Tl(c,l+1)!==115)break;case 6444:switch(Tl(c,be(c)-3-(~ds(c,"!important")&&10))){case 107:return Tc(c,":",":"+Pc)+c;case 101:return Tc(c,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Pc+(Tl(c,14)===45?"inline-":"")+"box$3$1"+Pc+"$2$3$1"+Ct+"$2box$3")+c}break;case 5936:switch(Tl(c,l+11)){case 114:return Pc+c+Ct+Tc(c,/[svh]\w+-[tblr]{2}/,"tb")+c;case 108:return Pc+c+Ct+Tc(c,/[svh]\w+-[tblr]{2}/,"tb-rl")+c;case 45:return Pc+c+Ct+Tc(c,/[svh]\w+-[tblr]{2}/,"lr")+c}return Pc+c+Ct+c+c}return c}var Nnc=function(l,t,e,d){if(l.length>-1&&!l.return)switch(l.type){case Ru:l.return=Wz(l.value,l.length);break;case dR:return wX([Vu(l,{value:Tc(l.value,"@","@"+Pc)})],d);case Hu:if(l.length)return FV(l.props,function(b){switch(YV(b,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return wX([Vu(l,{props:[Tc(b,/:(read-\w+)/,":"+es+"$1")]})],d);case"::placeholder":return wX([Vu(l,{props:[Tc(b,/:(plac\w+)/,":"+Pc+"input-$1")]}),Vu(l,{props:[Tc(b,/:(plac\w+)/,":"+es+"$1")]}),Vu(l,{props:[Tc(b,/:(plac\w+)/,Ct+"input-$1")]})],d)}return""})}},fnc=[Nnc],hu=function(l){var t=l.key;if(t==="css"){var e=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(e,function(r){var g=r.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(r),r.setAttribute("data-s",""))})}var d=l.stylisPlugins||fnc,b={},o,n=[];o=l.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(r){for(var g=r.getAttribute("data-emotion").split(" "),Z=1;Z<g.length;Z++)b[g[Z]]=!0;n.push(r)});var G,X=[Fnc,vnc];{var i,a=[Zz,Rz(function(r){i.insert(r)})],m=Hz(X.concat(d,a)),x=function(g){return wX(gz(g),m)};G=function(g,Z,H,R){i=H,x(g?g+"{"+Z.styles+"}":Z.styles),R&&(s.inserted[Z.name]=!0)}}var s={key:t,sheet:new tz({key:t,container:o,nonce:l.nonce,speedy:l.speedy,prepend:l.prepend,insertionPoint:l.insertionPoint}),nonce:l.nonce,inserted:b,registered:{},insert:G};return s.sheet.hydrate(n),s};function ns(){return ns=Object.assign?Object.assign.bind():function(c){for(var l=1;l<arguments.length;l++){var t=arguments[l];for(var e in t)({}).hasOwnProperty.call(t,e)&&(c[e]=t[e])}return c},ns.apply(null,arguments)}var Enc=!0;function dG(c,l,t){var e="";return t.split(" ").forEach(function(d){c[d]!==void 0?l.push(c[d]+";"):d&&(e+=d+" ")}),e}var Yu=function(l,t,e){var d=l.key+"-"+t.name;(e===!1||Enc===!1)&&l.registered[d]===void 0&&(l.registered[d]=t.styles)},_o=function(l,t,e){Yu(l,t,e);var d=l.key+"-"+t.name;if(l.inserted[t.name]===void 0){var b=t;do l.insert(t===b?"."+d:"",b,l.sheet,!0),b=b.next;while(b!==void 0)}};function fz(c){for(var l=0,t,e=0,d=c.length;d>=4;++e,d-=4)t=c.charCodeAt(e)&255|(c.charCodeAt(++e)&255)<<8|(c.charCodeAt(++e)&255)<<16|(c.charCodeAt(++e)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,l=(t&65535)*1540483477+((t>>>16)*59797<<16)^(l&65535)*1540483477+((l>>>16)*59797<<16);switch(d){case 3:l^=(c.charCodeAt(e+2)&255)<<16;case 2:l^=(c.charCodeAt(e+1)&255)<<8;case 1:l^=c.charCodeAt(e)&255,l=(l&65535)*1540483477+((l>>>16)*59797<<16)}return l^=l>>>13,l=(l&65535)*1540483477+((l>>>16)*59797<<16),((l^l>>>15)>>>0).toString(36)}var Sz={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};PH();var Mnc=!1,Pnc=/[A-Z]|^ms/g,Knc=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Oz=function(l){return l.charCodeAt(1)===45},kz=function(l){return l!=null&&typeof l!="boolean"},AV=MH(function(c){return Oz(c)?c:c.replace(Pnc,"-$&").toLowerCase()}),zz=function(l,t){switch(l){case"animation":case"animationName":if(typeof t=="string")return t.replace(Knc,function(e,d,b){return Mb={name:d,styles:b,next:Mb},d})}return Sz[l]!==1&&!Oz(l)&&typeof t=="number"&&t!==0?t+"px":t},_nc="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Gs(c,l,t){if(t==null)return"";var e=t;if(e.__emotion_styles!==void 0)return e;switch(typeof t){case"boolean":return"";case"object":{var d=t;if(d.anim===1)return Mb={name:d.name,styles:d.styles,next:Mb},d.name;var b=t;if(b.styles!==void 0){var o=b.next;if(o!==void 0)for(;o!==void 0;)Mb={name:o.name,styles:o.styles,next:Mb},o=o.next;var n=b.styles+";";return n}return qnc(c,l,t)}case"function":{if(c!==void 0){var G=Mb,X=t(c);return Mb=G,Gs(c,l,X)}break}}var i=t;if(l==null)return i;var a=l[i];return a!==void 0?a:i}function qnc(c,l,t){var e="";if(Array.isArray(t))for(var d=0;d<t.length;d++)e+=Gs(c,l,t[d])+";";else for(var b in t){var o=t[b];if(typeof o!="object"){var n=o;l!=null&&l[n]!==void 0?e+=b+"{"+l[n]+"}":kz(n)&&(e+=AV(b)+":"+zz(b,n)+";")}else{if(b==="NO_COMPONENT_SELECTOR"&&Mnc)throw new Error(_nc);if(Array.isArray(o)&&typeof o[0]=="string"&&(l==null||l[o[0]]===void 0))for(var G=0;G<o.length;G++)kz(o[G])&&(e+=AV(b)+":"+zz(b,o[G])+";");else{var X=Gs(c,l,o);switch(b){case"animation":case"animationName":{e+=AV(b)+":"+X+";";break}default:e+=b+"{"+X+"}"}}}}return e}var Az=/label:\s*([^\s;{]+)\s*(;|$)/g,Mb;function Pb(c,l,t){if(c.length===1&&typeof c[0]=="object"&&c[0]!==null&&c[0].styles!==void 0)return c[0];var e=!0,d="";Mb=void 0;var b=c[0];if(b==null||b.raw===void 0)e=!1,d+=Gs(t,l,b);else{var o=b;d+=o[0]}for(var n=1;n<c.length;n++)if(d+=Gs(t,l,c[n]),e){var G=b;d+=G[n]}Az.lastIndex=0;for(var X="",i;(i=Az.exec(d))!==null;)X+="-"+i[1];var a=fz(d)+X;return{name:a,styles:d,next:Mb}}var RR=u(E()),$nc=function(l){return l()},cGc=RR.useInsertionEffect?RR.useInsertionEffect:!1,Xs=cGc||$nc;var Qz=!1,QV=Wd.createContext(typeof HTMLElement<"u"?hu({key:"css"}):null),wV=QV.Provider,TV=function(){return(0,is.useContext)(QV)},as=function(l){return(0,is.forwardRef)(function(t,e){var d=(0,is.useContext)(QV);return l(t,d,e)})},us=Wd.createContext({});var IR={}.hasOwnProperty,OV="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",wz=function(l,t){var e={};for(var d in t)IR.call(t,d)&&(e[d]=t[d]);return e[OV]=l,e},lGc=function(l){var t=l.cache,e=l.serialized,d=l.isStringTag;return Yu(t,e,d),Xs(function(){return _o(t,e,d)}),null},tGc=as(function(c,l,t){var e=c.css;typeof e=="string"&&l.registered[e]!==void 0&&(e=l.registered[e]);var d=c[OV],b=[e],o="";typeof c.className=="string"?o=dG(l.registered,b,c.className):c.className!=null&&(o=c.className+" ");var n=Pb(b,void 0,Wd.useContext(us));o+=l.key+"-"+n.name;var G={};for(var X in c)IR.call(c,X)&&X!=="css"&&X!==OV&&!Qz&&(G[X]=c[X]);return G.className=o,t&&(G.ref=t),Wd.createElement(Wd.Fragment,null,Wd.createElement(lGc,{cache:l,serialized:n,isStringTag:typeof d=="string"}),Wd.createElement(d,G))}),Tz=tGc;var Fu=u(E());var FMc=u(Nz()),Dz=function(l,t){var e=arguments;if(t==null||!IR.call(t,"css"))return Fu.createElement.apply(void 0,e);var d=e.length,b=new Array(d);b[0]=Tz,b[1]=wz(l,t);for(var o=2;o<d;o++)b[o]=e[o];return Fu.createElement.apply(null,b)};(function(c){var l;l||(l=c.JSX||(c.JSX={}))})(Dz||(Dz={}));function O(){for(var c=arguments.length,l=new Array(c),t=0;t<c;t++)l[t]=arguments[t];return Pb(l)}function Ye(){var c=O.apply(void 0,arguments),l="animation-"+c.name;return{name:l,styles:"@keyframes "+l+"{"+c.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}function Lz(c,l){if(c.inserted[l.name]===void 0)return c.insert("",l,c.sheet,!0)}function Uz(c,l,t){var e=[],d=dG(c,e,t);return e.length<2?t:d+l(e)}var jz=function(l){var t=hu(l);t.sheet.speedy=function(n){this.isSpeedy=n},t.compat=!0;var e=function(){for(var G=arguments.length,X=new Array(G),i=0;i<G;i++)X[i]=arguments[i];var a=Pb(X,t.registered,void 0);return _o(t,a,!1),t.key+"-"+a.name},d=function(){for(var G=arguments.length,X=new Array(G),i=0;i<G;i++)X[i]=arguments[i];var a=Pb(X,t.registered),m="animation-"+a.name;return Lz(t,{name:a.name,styles:"@keyframes "+m+"{"+a.styles+"}"}),m},b=function(){for(var G=arguments.length,X=new Array(G),i=0;i<G;i++)X[i]=arguments[i];var a=Pb(X,t.registered);Lz(t,a)},o=function(){for(var G=arguments.length,X=new Array(G),i=0;i<G;i++)X[i]=arguments[i];return Uz(t.registered,e,eGc(X))};return{css:e,cx:o,injectGlobal:b,keyframes:d,hydrate:function(G){G.forEach(function(X){t.inserted[X]=!0})},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:dG.bind(null,t.registered),merge:Uz.bind(null,t.registered,e)}},eGc=function c(l){for(var t="",e=0;e<l.length;e++){var d=l[e];if(d!=null){var b=void 0;switch(typeof d){case"boolean":break;case"object":{if(Array.isArray(d))b=c(d);else{b="";for(var o in d)d[o]&&o&&(b&&(b+=" "),b+=o)}break}default:b=d}b&&(t&&(t+=" "),t+=b)}}return t};var Kb=jz({key:"css"}),TMc=Kb.flush,DMc=Kb.hydrate,Ez=Kb.cx,LMc=Kb.merge,UMc=Kb.getRegisteredStyles,jMc=Kb.injectGlobal,EMc=Kb.keyframes,MMc=Kb.css,PMc=Kb.sheet,KMc=Kb.cache;var Mz=u(Y(),1),dGc=c=>typeof c<"u"&&c!==null&&["name","styles"].every(l=>typeof c[l]<"u"),Xc=()=>{let c=TV();return(0,Mz.useCallback)((...t)=>{if(c===null)throw new Error("The `useCx` hook should be only used within a valid Emotion Cache Context");return Ez(...t.map(e=>dGc(e)?(_o(c,e,!1),`${c.key}-${e.name}`):e))},[c])};var qe={name:"kv6lnz",styles:"box-sizing:border-box;*,*::before,*::after{box-sizing:inherit;}"};function bG(c,l){var t=0,e,d;l=l||{};function b(){var o=e,n=arguments.length,G,X;c:for(;o;){if(o.args.length!==arguments.length){o=o.next;continue}for(X=0;X<n;X++)if(o.args[X]!==arguments[X]){o=o.next;continue c}return o!==e&&(o===d&&(d=o.prev),o.prev.next=o.next,o.next&&(o.next.prev=o.prev),o.next=e,o.prev=null,e.prev=o,e=o),o.val}for(G=new Array(n),X=0;X<n;X++)G[X]=arguments[X];return o={args:G,val:c.apply(null,G)},e?(e.prev=o,o.next=e):d=o,t===l.maxSize?(d=d.prev,d.next=null):t++,e=o,o.val}return b.clear=function(){e=null,d=null,t=0},b}var bGc={grad:.9,turn:360,rad:360/(2*Math.PI)},qo=function(c){return typeof c=="string"?c.length>0:typeof c=="number"},st=function(c,l,t){return l===void 0&&(l=0),t===void 0&&(t=Math.pow(10,l)),Math.round(t*c)/t+0},pd=function(c,l,t){return l===void 0&&(l=0),t===void 0&&(t=1),c>t?t:c>l?c:l},tA=function(c){return(c=isFinite(c)?c%360:0)>0?c:c+360},Pz=function(c){return{r:pd(c.r,0,255),g:pd(c.g,0,255),b:pd(c.b,0,255),a:pd(c.a)}},DV=function(c){return{r:st(c.r),g:st(c.g),b:st(c.b),a:st(c.a,3)}},oGc=/^#([0-9a-f]{3,8})$/i,WR=function(c){var l=c.toString(16);return l.length<2?"0"+l:l},eA=function(c){var l=c.r,t=c.g,e=c.b,d=c.a,b=Math.max(l,t,e),o=b-Math.min(l,t,e),n=o?b===l?(t-e)/o:b===t?2+(e-l)/o:4+(l-t)/o:0;return{h:60*(n<0?n+6:n),s:b?o/b*100:0,v:b/255*100,a:d}},dA=function(c){var l=c.h,t=c.s,e=c.v,d=c.a;l=l/360*6,t/=100,e/=100;var b=Math.floor(l),o=e*(1-t),n=e*(1-(l-b)*t),G=e*(1-(1-l+b)*t),X=b%6;return{r:255*[e,n,o,o,G,e][X],g:255*[G,e,e,n,o,o][X],b:255*[o,o,G,e,e,n][X],a:d}},Kz=function(c){return{h:tA(c.h),s:pd(c.s,0,100),l:pd(c.l,0,100),a:pd(c.a)}},_z=function(c){return{h:st(c.h),s:st(c.s),l:st(c.l),a:st(c.a,3)}},qz=function(c){return dA((t=(l=c).s,{h:l.h,s:(t*=((e=l.l)<50?e:100-e)/100)>0?2*t/(e+t)*100:0,v:e+t,a:l.a}));var l,t,e},ms=function(c){return{h:(l=eA(c)).h,s:(d=(200-(t=l.s))*(e=l.v)/100)>0&&d<200?t*e/100/(d<=100?d:200-d)*100:0,l:d/2,a:l.a};var l,t,e,d},nGc=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,GGc=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,XGc=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,iGc=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,jV={string:[[function(c){var l=oGc.exec(c);return l?(c=l[1]).length<=4?{r:parseInt(c[0]+c[0],16),g:parseInt(c[1]+c[1],16),b:parseInt(c[2]+c[2],16),a:c.length===4?st(parseInt(c[3]+c[3],16)/255,2):1}:c.length===6||c.length===8?{r:parseInt(c.substr(0,2),16),g:parseInt(c.substr(2,2),16),b:parseInt(c.substr(4,2),16),a:c.length===8?st(parseInt(c.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(c){var l=XGc.exec(c)||iGc.exec(c);return l?l[2]!==l[4]||l[4]!==l[6]?null:Pz({r:Number(l[1])/(l[2]?100/255:1),g:Number(l[3])/(l[4]?100/255:1),b:Number(l[5])/(l[6]?100/255:1),a:l[7]===void 0?1:Number(l[7])/(l[8]?100:1)}):null},"rgb"],[function(c){var l=nGc.exec(c)||GGc.exec(c);if(!l)return null;var t,e,d=Kz({h:(t=l[1],e=l[2],e===void 0&&(e="deg"),Number(t)*(bGc[e]||1)),s:Number(l[3]),l:Number(l[4]),a:l[5]===void 0?1:Number(l[5])/(l[6]?100:1)});return qz(d)},"hsl"]],object:[[function(c){var l=c.r,t=c.g,e=c.b,d=c.a,b=d===void 0?1:d;return qo(l)&&qo(t)&&qo(e)?Pz({r:Number(l),g:Number(t),b:Number(e),a:Number(b)}):null},"rgb"],[function(c){var l=c.h,t=c.s,e=c.l,d=c.a,b=d===void 0?1:d;if(!qo(l)||!qo(t)||!qo(e))return null;var o=Kz({h:Number(l),s:Number(t),l:Number(e),a:Number(b)});return qz(o)},"hsl"],[function(c){var l=c.h,t=c.s,e=c.v,d=c.a,b=d===void 0?1:d;if(!qo(l)||!qo(t)||!qo(e))return null;var o=(function(n){return{h:tA(n.h),s:pd(n.s,0,100),v:pd(n.v,0,100),a:pd(n.a)}})({h:Number(l),s:Number(t),v:Number(e),a:Number(b)});return dA(o)},"hsv"]]},$z=function(c,l){for(var t=0;t<l.length;t++){var e=l[t][0](c);if(e)return[e,l[t][1]]}return[null,void 0]},bA=function(c){return typeof c=="string"?$z(c.trim(),jV.string):typeof c=="object"&&c!==null?$z(c,jV.object):[null,void 0]},oA=function(c){return bA(c)[1]},LV=function(c,l){var t=ms(c);return{h:t.h,s:pd(t.s+100*l,0,100),l:t.l,a:t.a}},UV=function(c){return(299*c.r+587*c.g+114*c.b)/1e3/255},cA=function(c,l){var t=ms(c);return{h:t.h,s:t.s,l:pd(t.l+100*l,0,100),a:t.a}},EV=(function(){function c(l){this.parsed=bA(l)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return c.prototype.isValid=function(){return this.parsed!==null},c.prototype.brightness=function(){return st(UV(this.rgba),2)},c.prototype.isDark=function(){return UV(this.rgba)<.5},c.prototype.isLight=function(){return UV(this.rgba)>=.5},c.prototype.toHex=function(){return l=DV(this.rgba),t=l.r,e=l.g,d=l.b,o=(b=l.a)<1?WR(st(255*b)):"","#"+WR(t)+WR(e)+WR(d)+o;var l,t,e,d,b,o},c.prototype.toRgb=function(){return DV(this.rgba)},c.prototype.toRgbString=function(){return l=DV(this.rgba),t=l.r,e=l.g,d=l.b,(b=l.a)<1?"rgba("+t+", "+e+", "+d+", "+b+")":"rgb("+t+", "+e+", "+d+")";var l,t,e,d,b},c.prototype.toHsl=function(){return _z(ms(this.rgba))},c.prototype.toHslString=function(){return l=_z(ms(this.rgba)),t=l.h,e=l.s,d=l.l,(b=l.a)<1?"hsla("+t+", "+e+"%, "+d+"%, "+b+")":"hsl("+t+", "+e+"%, "+d+"%)";var l,t,e,d,b},c.prototype.toHsv=function(){return l=eA(this.rgba),{h:st(l.h),s:st(l.s),v:st(l.v),a:st(l.a,3)};var l},c.prototype.invert=function(){return Rc({r:255-(l=this.rgba).r,g:255-l.g,b:255-l.b,a:l.a});var l},c.prototype.saturate=function(l){return l===void 0&&(l=.1),Rc(LV(this.rgba,l))},c.prototype.desaturate=function(l){return l===void 0&&(l=.1),Rc(LV(this.rgba,-l))},c.prototype.grayscale=function(){return Rc(LV(this.rgba,-1))},c.prototype.lighten=function(l){return l===void 0&&(l=.1),Rc(cA(this.rgba,l))},c.prototype.darken=function(l){return l===void 0&&(l=.1),Rc(cA(this.rgba,-l))},c.prototype.rotate=function(l){return l===void 0&&(l=15),this.hue(this.hue()+l)},c.prototype.alpha=function(l){return typeof l=="number"?Rc({r:(t=this.rgba).r,g:t.g,b:t.b,a:l}):st(this.rgba.a,3);var t},c.prototype.hue=function(l){var t=ms(this.rgba);return typeof l=="number"?Rc({h:l,s:t.s,l:t.l,a:t.a}):st(t.h)},c.prototype.isEqual=function(l){return this.toHex()===Rc(l).toHex()},c})(),Rc=function(c){return c instanceof EV?c:new EV(c)},lA=[],Fe=function(c){c.forEach(function(l){lA.indexOf(l)<0&&(l(EV,jV),lA.push(l))})};function ve(c,l){var t={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},e={};for(var d in t)e[t[d]]=d;var b={};c.prototype.toName=function(o){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var n,G,X=e[this.toHex()];if(X)return X;if(o?.closest){var i=this.toRgb(),a=1/0,m="black";if(!b.length)for(var x in t)b[x]=new c(t[x]).toRgb();for(var s in t){var r=(n=i,G=b[s],Math.pow(n.r-G.r,2)+Math.pow(n.g-G.g,2)+Math.pow(n.b-G.b,2));r<a&&(a=r,m=s)}return m}},l.string.push([function(o){var n=o.toLowerCase(),G=n==="transparent"?"#0000":t[n];return G?new c(G).toRgb():null},"name"])}var MV;Fe([ve]);function aGc(){if(!(typeof document>"u")){if(!MV){let c=document.createElement("div");c.setAttribute("data-g2-color-computation-node",""),document.body.appendChild(c),MV=c}return MV}}function uGc(c){return typeof c!="string"?!1:Rc(c).isValid()}function mGc(c){if(typeof c!="string")return"";if(uGc(c))return c;if(!c.includes("var(")||typeof document>"u")return"";let l=aGc();if(!l)return"";l.style.background=c;let t=window?.getComputedStyle(l).background;return l.style.background="",t||""}var xGc=bG(mGc);function sGc(c){let l=xGc(c);return Rc(l).isLight()?"#000000":"#ffffff"}function nA(c){return sGc(c)==="#000000"?"dark":"light"}var pR=u(nc(),1),GA=new RegExp(/-left/g),XA=new RegExp(/-right/g),iA=new RegExp(/Left/g),aA=new RegExp(/Right/g);function rGc(c){return c==="left"?"right":c==="right"?"left":GA.test(c)?c.replace(GA,"-right"):XA.test(c)?c.replace(XA,"-left"):iA.test(c)?c.replace(iA,"Right"):aA.test(c)?c.replace(aA,"Left"):c}var gGc=(c={})=>Object.fromEntries(Object.entries(c).map(([l,t])=>[rGc(l),t]));function Fc(c={},l){return()=>l?(0,pR.isRTL)()?O(l,"",""):O(c,"",""):(0,pR.isRTL)()?O(gGc(c),"",""):O(c,"","")}Fc.watch=()=>(0,pR.isRTL)();var uA={"default.fontFamily":"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif","default.fontSize":"13px","helpText.fontSize":"12px",mobileTextMinFontSize:"16px"};function fl(c){return uA[c]??""}var mA={huge:"1440px",wide:"1280px","x-large":"1080px",large:"960px",medium:"782px",small:"600px",mobile:"480px","zoomed-in":"280px"};var xA=c=>`@media (min-width: ${mA[c]})`;var BR="#fff",_b={900:"#1e1e1e",800:"#2f2f2f",700:"#757575",600:"#949494",400:"#ccc",300:"#ddd",200:"#e0e0e0",100:"#f0f0f0"},ZGc={yellow:"#f0b849",red:"#d94f4f",green:"#4ab866"},qb={accent:"var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9))",accentDarker10:"var(--wp-components-color-accent-darker-10, var(--wp-admin-theme-color-darker-10, #2145e6))",accentDarker20:"var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6))",accentInverted:`var(--wp-components-color-accent-inverted, ${BR})`,background:`var(--wp-components-color-background, ${BR})`,foreground:`var(--wp-components-color-foreground, ${_b[900]})`,foregroundInverted:`var(--wp-components-color-foreground-inverted, ${BR})`,gray:{900:`var(--wp-components-color-foreground, ${_b[900]})`,800:`var(--wp-components-color-gray-800, ${_b[800]})`,700:`var(--wp-components-color-gray-700, ${_b[700]})`,600:`var(--wp-components-color-gray-600, ${_b[600]})`,400:`var(--wp-components-color-gray-400, ${_b[400]})`,300:`var(--wp-components-color-gray-300, ${_b[300]})`,200:`var(--wp-components-color-gray-200, ${_b[200]})`,100:`var(--wp-components-color-gray-100, ${_b[100]})`}},HGc={background:qb.background,backgroundDisabled:qb.gray[100],border:qb.gray[600],borderHover:qb.gray[700],borderFocus:qb.accent,borderDisabled:qb.gray[400],textDisabled:qb.gray[600],darkGrayPlaceholder:`color-mix(in srgb, ${qb.foreground}, transparent 38%)`,lightGrayPlaceholder:`color-mix(in srgb, ${qb.background}, transparent 35%)`},D=Object.freeze({gray:_b,white:BR,alert:ZGc,theme:qb,ui:HGc});var xs="36px",RGc={controlPaddingX:12,controlPaddingXSmall:8,controlPaddingXLarge:12*1.3334,controlBoxShadowFocus:`0 0 0 0.5px ${D.theme.accent}`,controlHeight:xs,controlHeightXSmall:`calc( ${xs} * 0.6 )`,controlHeightSmall:`calc( ${xs} * 0.8 )`,controlHeightLarge:`calc( ${xs} * 1.2 )`,controlHeightXLarge:`calc( ${xs} * 1.4 )`},w=Object.assign({},RGc,{colorDivider:"rgba(0, 0, 0, 0.1)",colorScrollbarThumb:"rgba(0, 0, 0, 0.2)",colorScrollbarThumbHover:"rgba(0, 0, 0, 0.5)",colorScrollbarTrack:"rgba(0, 0, 0, 0.04)",elevationIntensity:1,radiusXSmall:"1px",radiusSmall:"2px",radiusMedium:"4px",radiusLarge:"8px",radiusFull:"9999px",radiusRound:"50%",borderWidth:"1px",borderWidthFocus:"1.5px",borderWidthTab:"4px",spinnerSize:16,fontSize:"13px",fontSizeH1:"calc(2.44 * 13px)",fontSizeH2:"calc(1.95 * 13px)",fontSizeH3:"calc(1.56 * 13px)",fontSizeH4:"calc(1.25 * 13px)",fontSizeH5:"13px",fontSizeH6:"calc(0.8 * 13px)",fontSizeInputMobile:"16px",fontSizeMobile:"15px",fontSizeSmall:"calc(0.92 * 13px)",fontSizeXSmall:"calc(0.75 * 13px)",fontLineHeightBase:"1.4",fontWeight:"normal",fontWeightMedium:"499",fontWeightHeading:"600",gridBase:"4px",elevationXSmall:"0 1px 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 3px rgba(0, 0, 0, 0.02), 0 4px 4px rgba(0, 0, 0, 0.01)",elevationSmall:"0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 3px rgba(0, 0, 0, 0.04), 0 6px 6px rgba(0, 0, 0, 0.03), 0 8px 8px rgba(0, 0, 0, 0.02)",elevationMedium:"0 2px 3px rgba(0, 0, 0, 0.05), 0 4px 5px rgba(0, 0, 0, 0.04), 0 12px 12px rgba(0, 0, 0, 0.03), 0 16px 16px rgba(0, 0, 0, 0.02)",elevationLarge:"0 5px 15px rgba(0, 0, 0, 0.08), 0 15px 27px rgba(0, 0, 0, 0.07), 0 30px 36px rgba(0, 0, 0, 0.04), 0 50px 43px rgba(0, 0, 0, 0.02)",surfaceBackgroundColor:D.white,surfaceBackgroundSubtleColor:"#F3F3F3",surfaceBackgroundTintColor:"#F5F5F5",surfaceBorderColor:"rgba(0, 0, 0, 0.1)",surfaceBorderBoldColor:"rgba(0, 0, 0, 0.15)",surfaceBorderSubtleColor:"rgba(0, 0, 0, 0.05)",surfaceBackgroundTertiaryColor:D.white,surfaceColor:D.white,transitionDuration:"200ms",transitionDurationFast:"160ms",transitionDurationFaster:"120ms",transitionDurationFastest:"100ms",transitionTimingFunction:"cubic-bezier(0.08, 0.52, 0.52, 1)",transitionTimingFunctionControl:"cubic-bezier(0.12, 0.8, 0.32, 1)"});var ss=O("font-size:11px;font-weight:",w.fontWeightMedium,";line-height:1.4;text-transform:uppercase;","");var Bd=Object.freeze({SLIDE_DISTANCE:4,SLIDE_DURATION:200,SLIDE_EASING:{function:"cubic-bezier",args:[0,0,0,1]},FADE_DURATION:80,FADE_EASING:{function:"linear"}}),sA=c=>c.args?.length?`${c.function}(${c.args.join(",")})`:c.function,Lt=Object.freeze({SLIDE_DISTANCE:`${Bd.SLIDE_DISTANCE}px`,SLIDE_DURATION:`${Bd.SLIDE_DURATION}ms`,SLIDE_EASING:sA(Bd.SLIDE_EASING),FADE_DURATION:`${Bd.FADE_DURATION}ms`,FADE_EASING:sA(Bd.FADE_EASING)});var IGc={bottom:"bottom",top:"top","middle left":"left","middle right":"right","bottom left":"bottom-end","bottom center":"bottom","bottom right":"bottom-start","top left":"top-end","top center":"top","top right":"top-start","middle left left":"left","middle left right":"left","middle left bottom":"left-end","middle left top":"left-start","middle right left":"right","middle right right":"right","middle right bottom":"right-end","middle right top":"right-start","bottom left left":"bottom-end","bottom left right":"bottom-end","bottom left bottom":"bottom-end","bottom left top":"bottom-end","bottom center left":"bottom","bottom center right":"bottom","bottom center bottom":"bottom","bottom center top":"bottom","bottom right left":"bottom-start","bottom right right":"bottom-start","bottom right bottom":"bottom-start","bottom right top":"bottom-start","top left left":"top-end","top left right":"top-end","top left bottom":"top-end","top left top":"top-end","top center left":"top","top center right":"top","top center bottom":"top","top center top":"top","top right left":"top-start","top right right":"top-start","top right bottom":"top-start","top right top":"top-start",middle:"bottom","middle center":"bottom","middle center bottom":"bottom","middle center left":"bottom","middle center right":"bottom","middle center top":"bottom"},oG=c=>IGc[c]??"bottom",WGc={top:{originX:.5,originY:1},"top-start":{originX:0,originY:1},"top-end":{originX:1,originY:1},right:{originX:0,originY:.5},"right-start":{originX:0,originY:0},"right-end":{originX:0,originY:1},bottom:{originX:.5,originY:0},"bottom-start":{originX:0,originY:0},"bottom-end":{originX:1,originY:0},left:{originX:1,originY:.5},"left-start":{originX:1,originY:0},"left-end":{originX:1,originY:1},overlay:{originX:.5,originY:.5}},rA=c=>{let l=c.startsWith("top")||c.startsWith("bottom")?"translateY":"translateX",t=c.startsWith("top")||c.startsWith("left")?1:-1;return{style:WGc[c],initial:{opacity:0,[l]:`${Bd.SLIDE_DISTANCE*t}px`},animate:{opacity:1,[l]:0},transition:{opacity:{duration:Bd.FADE_DURATION/1e3,ease:Bd.FADE_EASING.function},[l]:{duration:Bd.SLIDE_DURATION/1e3,ease:lb(...Bd.SLIDE_EASING.args)}}}};function pGc(c){return!!c?.top}function BGc(c){return!!c?.current}var gA=({anchor:c,anchorRef:l,anchorRect:t,getAnchorRect:e,fallbackReferenceElement:d})=>{let b=null;return c?b=c:pGc(l)?b={getBoundingClientRect(){let o=l.top.getBoundingClientRect(),n=l.bottom.getBoundingClientRect();return new window.DOMRect(o.x,o.y,o.width,n.bottom-o.top)}}:BGc(l)?b=l.current:l?b=l:t?b={getBoundingClientRect(){return t}}:e?b={getBoundingClientRect(){let o=e(d);return new window.DOMRect(o.x??o.left,o.y??o.top,o.width??o.right-o.left,o.height??o.bottom-o.top)}}:d&&(b=d.parentElement),b??null},PV=c=>c===null||Number.isNaN(c)?void 0:Math.round(c);var ZA=u(Y(),1),yR=(0,ZA.createContext)({isNestedInTooltip:!1});yR.displayName="TooltipInternalContext";var TX=u(V(),1),yGc=700,VGc={isNestedInTooltip:!0};function CGc(c,l){let{children:t,className:e,delay:d=yGc,hideOnClick:b=!0,placement:o,position:n,shortcut:G,text:X,...i}=c,{isNestedInTooltip:a}=(0,nG.useContext)(yR),m=(0,HA.useInstanceId)(IA,"tooltip"),x=X||G?m:void 0,s=nG.Children.count(t)===1,r;o!==void 0?r=o:n!==void 0&&(r=oG(n),(0,RA.default)("`position` prop in wp.components.tooltip",{since:"6.4",alternative:"`placement` prop"})),r=r||"bottom";let g=gx({placement:r,showTimeout:d}),Z=xc(g,"mounted");if(a)return s?(0,TX.jsx)(Md,{...i,render:t}):t;function H(R){return x&&Z&&R.props["aria-describedby"]===void 0&&R.props["aria-label"]!==X?(0,nG.cloneElement)(R,{"aria-describedby":x}):R}return(0,TX.jsxs)(yR.Provider,{value:VGc,children:[(0,TX.jsx)(eZ,{onClick:b?g.hide:void 0,store:g,render:s?H(t):void 0,ref:l,children:s?void 0:t}),s&&(X||G)&&(0,TX.jsxs)(tZ,{...i,className:Q("components-tooltip",e),unmountOnHide:!0,gutter:4,id:x,overflowPadding:.5,store:g,children:[X,G&&(0,TX.jsx)(YZ,{className:X?"components-tooltip__shortcut":"",shortcut:G})]})]})}var IA=(0,nG.forwardRef)(CGc),Ne=IA;var YA=u(yA(),1),FA=u(VR(),1);function CA(c){return Object.prototype.toString.call(c)==="[object Object]"}function JA(c){var l,t;return CA(c)===!1?!1:(l=c.constructor,l===void 0?!0:(t=l.prototype,!(CA(t)===!1||t.hasOwnProperty("isPrototypeOf")===!1)))}var $b=u(Y(),1),q7c=u(Ge(),1);var vA=u(V(),1),gs=(0,$b.createContext)({});gs.displayName="ComponentsContext";var CR=()=>(0,$b.useContext)(gs);function wGc({value:c}){let l=CR(),t=(0,$b.useRef)(c);return OX(()=>{(0,FA.default)(t.current,c)&&t.current},[c]),(0,$b.useMemo)(()=>(0,YA.default)(l??{},c??{},{isMergeableObject:JA}),[l,c])}var TGc=({children:c,value:l})=>{let t=wGc({value:l});return(0,vA.jsx)(gs.Provider,{value:t,children:c})},DX=(0,$b.memo)(TGc);var OA=u(Y(),1),r4c=u(Ge(),1);var NA="data-wp-component",fA="data-wp-c16t",LX="__contextSystemKey__";var Nu=function(){return Nu=Object.assign||function(l){for(var t,e=1,d=arguments.length;e<d;e++){t=arguments[e];for(var b in t)Object.prototype.hasOwnProperty.call(t,b)&&(l[b]=t[b])}return l},Nu.apply(this,arguments)};function SA(c){return c.toLowerCase()}var DGc=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],LGc=/[^A-Z0-9]+/gi;function zA(c,l){l===void 0&&(l={});for(var t=l.splitRegexp,e=t===void 0?DGc:t,d=l.stripRegexp,b=d===void 0?LGc:d,o=l.transform,n=o===void 0?SA:o,G=l.delimiter,X=G===void 0?" ":G,i=kA(kA(c,e,"$1\0$2"),b,"\0"),a=0,m=i.length;i.charAt(a)==="\0";)a++;for(;i.charAt(m-1)==="\0";)m--;return i.slice(a,m).split("\0").map(n).join(X)}function kA(c,l,t){return l instanceof RegExp?c.replace(l,t):l.reduce(function(e,d){return e.replace(d,t)},c)}function AA(c,l){return l===void 0&&(l={}),zA(c,Nu({delimiter:"."},l))}function JR(c,l){return l===void 0&&(l={}),AA(c,Nu({delimiter:"-"},l))}function UGc(c){return`components-${JR(c)}`}var hR=bG(UGc);function tc(c,l){return QA(c,l,{forwardsRef:!0})}function UX(c,l){return QA(c,l)}function QA(c,l,t){let e=t?.forwardsRef?(0,OA.forwardRef)(c):c,d=e[LX]||[l];return Array.isArray(l)&&(d=[...d,...l]),typeof l=="string"&&(d=[...d,l]),Object.assign(e,{[LX]:[...new Set(d)],displayName:l,selector:`.${hR(l)}`})}function KV(c){if(!c)return[];let l=[];return c[LX]&&(l=c[LX]),c.type&&c.type[LX]&&(l=c.type[LX]),l}function Zs(c,l){return c?typeof l=="string"?KV(c).includes(l):Array.isArray(l)?l.some(t=>KV(c).includes(t)):!1:!1}var p4c=u(Ge(),1);function wA(c){return{[NA]:c}}function TA(){return{[fA]:!0}}function cc(c,l){let e=CR()?.[l]||{},d={...TA(),...wA(l)},{_overrides:b,...o}=e,n=Object.entries(o).length?Object.assign({},o,c):c,X=Xc()(hR(l),c.className),i=typeof n.renderChildren=="function"?n.renderChildren(n):n.children;for(let a in n)d[a]=n[a];for(let a in b)d[a]=b[a];return i!==void 0&&(d.children=i),d.className=X,d}var DA={border:0,clip:"rect(1px, 1px, 1px, 1px)",WebkitClipPath:"inset( 50% )",clipPath:"inset( 50% )",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",wordWrap:"normal"};var GG=u(E());yV();var jGc=!1,EGc=BV,MGc=function(l){return l!=="theme"},LA=function(l){return typeof l=="string"&&l.charCodeAt(0)>96?EGc:MGc},UA=function(l,t,e){var d;if(t){var b=t.shouldForwardProp;d=l.__emotion_forwardProp&&b?function(o){return l.__emotion_forwardProp(o)&&b(o)}:b}return typeof d!="function"&&e&&(d=l.__emotion_forwardProp),d},PGc=function(l){var t=l.cache,e=l.serialized,d=l.isStringTag;return Yu(t,e,d),Xs(function(){return _o(t,e,d)}),null},N=function c(l,t){var e=l.__emotion_real===l,d=e&&l.__emotion_base||l,b,o;t!==void 0&&(b=t.label,o=t.target);var n=UA(l,t,e),G=n||LA(d),X=!G("as");return function(){var i=arguments,a=e&&l.__emotion_styles!==void 0?l.__emotion_styles.slice(0):[];if(b!==void 0&&a.push("label:"+b+";"),i[0]==null||i[0].raw===void 0)a.push.apply(a,i);else{var m=i[0];a.push(m[0]);for(var x=i.length,s=1;s<x;s++)a.push(i[s],m[s])}var r=as(function(g,Z,H){var R=X&&g.as||d,W="",I=[],B=g;if(g.theme==null){B={};for(var p in g)B[p]=g[p];B.theme=GG.useContext(us)}typeof g.className=="string"?W=dG(Z.registered,I,g.className):g.className!=null&&(W=g.className+" ");var y=Pb(a.concat(I),Z.registered,B);W+=Z.key+"-"+y.name,o!==void 0&&(W+=" "+o);var h=X&&n===void 0?LA(R):G,C={};for(var J in g)X&&J==="as"||h(J)&&(C[J]=g[J]);return C.className=W,H&&(C.ref=H),GG.createElement(GG.Fragment,null,GG.createElement(PGc,{cache:Z,serialized:y,isStringTag:typeof R=="string"}),GG.createElement(R,C))});return r.displayName=b!==void 0?b:"Styled("+(typeof d=="string"?d:d.displayName||d.name||"Component")+")",r.defaultProps=l.defaultProps,r.__emotion_real=r,r.__emotion_base=d,r.__emotion_styles=a,r.__emotion_forwardProp=n,Object.defineProperty(r,"toString",{value:function(){return o===void 0&&jGc?"NO_COMPONENT_SELECTOR":"."+o}}),r.withComponent=function(g,Z){var H=c(g,ns({},t,Z,{shouldForwardProp:UA(r,Z,!0)}));return H.apply(void 0,a)},r}};var jA=u(Y(),1),EA=u(V(),1),KGc=N("div",{target:"e19lxcc00"})("");function _Gc({as:c,...l},t){return(0,EA.jsx)(KGc,{as:c,ref:t,...l})}var qGc=Object.assign((0,jA.forwardRef)(_Gc),{selector:".components-view"}),ic=qGc;var MA=u(V(),1);function $Gc(c,l){let{style:t,...e}=cc(c,"VisuallyHidden");return(0,MA.jsx)(ic,{ref:l,...e,style:{...DA,...t||{}}})}var cXc=tc($Gc,"VisuallyHidden"),Qc=cXc;var eb=u(nc(),1),_V=[["top left","top center","top right"],["center left","center center","center right"],["bottom left","bottom center","bottom right"]],PA={"top left":(0,eb.__)("Top Left"),"top center":(0,eb.__)("Top Center"),"top right":(0,eb.__)("Top Right"),"center left":(0,eb.__)("Center Left"),"center center":(0,eb.__)("Center"),center:(0,eb.__)("Center"),"center right":(0,eb.__)("Center Right"),"bottom left":(0,eb.__)("Bottom Left"),"bottom center":(0,eb.__)("Bottom Center"),"bottom right":(0,eb.__)("Bottom Right")},YR=_V.flat();function qV(c){let t=(c==="center"?"center center":c)?.replace("-"," ");return YR.includes(t)?t:void 0}function FR(c,l){let t=qV(l);if(!t)return;let e=t.replace(" ","-");return`${c}-${e}`}function KA(c,l){let t=l?.replace(c+"-","");return qV(t)}function _A(c="center"){let l=qV(c);if(!l)return;let t=YR.indexOf(l);return t>-1?t:void 0}var jX=u(V(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='4c2e860238']")){let c=document.createElement("style");c.setAttribute("data-wp-hash","4c2e860238"),c.appendChild(document.createTextNode("._02e2af5803bf5bda__grid-container{aspect-ratio:1;border:1px solid #0000;border-radius:4px;box-sizing:border-box;cursor:pointer;direction:ltr;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);outline:none}.c421f8ed08c23077__grid-row{box-sizing:border-box;display:grid;grid-column:1/-1;grid-template-columns:repeat(3,1fr)}._3af769f755097fdb__cell{align-items:center;appearance:none;border:none;box-sizing:border-box;display:flex;justify-content:center;margin:0;outline:none;padding:0;position:relative}._37ef12d4fb6d6131__point{aspect-ratio:1;border:3px solid;box-sizing:border-box;color:var(--wp-components-color-gray-400,#ccc);contain:strict;display:block;margin:auto;width:6px}._3af769f755097fdb__cell[data-active-item] ._37ef12d4fb6d6131__point{color:var(--wp-components-color-foreground,#1e1e1e);transform:scale(1.6666666667)}._3af769f755097fdb__cell:not([data-active-item]):hover ._37ef12d4fb6d6131__point{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}._3af769f755097fdb__cell[data-focus-visible] ._37ef12d4fb6d6131__point{outline:1px solid var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));outline-offset:1px}@media not (prefers-reduced-motion){._37ef12d4fb6d6131__point{transition-duration:.12s;transition-property:color,transform;transition-timing-function:linear}}")),document.head.appendChild(c)}var qA={"grid-container":"_02e2af5803bf5bda__grid-container","grid-row":"c421f8ed08c23077__grid-row",cell:"_3af769f755097fdb__cell",point:"_37ef12d4fb6d6131__point"};function $A({id:c,value:l,...t}){return(0,jX.jsx)(Ne,{text:PA[l],children:(0,jX.jsxs)(Qt.Item,{id:c,render:(0,jX.jsx)("span",{...t,className:Q(qA.cell,t.className),role:"gridcell"}),children:[(0,jX.jsx)(Qc,{children:l}),(0,jX.jsx)("span",{className:qA.point,role:"presentation"})]})})}var vR=u(kc(),1);var $V=u(V(),1),Hs=24,Rs=7,cO=(Hs-3*Rs)/2,lXc=2,tXc=4;function eXc({className:c,disablePointerEvents:l=!0,size:t,width:e,height:d,style:b={},value:o="center",...n}){return(0,$V.jsx)(vR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${Hs} ${Hs}`,width:t??e??Hs,height:t??d??Hs,role:"presentation",className:Q("component-alignment-matrix-control-icon",c),style:{pointerEvents:l?"none":void 0,...b},...n,children:YR.map((G,X)=>{let i=_A(o)===X?tXc:lXc;return(0,$V.jsx)(vR.Rect,{x:cO+X%3*Rs+(Rs-i)/2,y:cO+Math.floor(X/3)*Rs+(Rs-i)/2,width:i,height:i,fill:"currentColor"},G)})})}var lO=eXc;var fu=u(V(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='4c2e860238']")){let c=document.createElement("style");c.setAttribute("data-wp-hash","4c2e860238"),c.appendChild(document.createTextNode("._02e2af5803bf5bda__grid-container{aspect-ratio:1;border:1px solid #0000;border-radius:4px;box-sizing:border-box;cursor:pointer;direction:ltr;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);outline:none}.c421f8ed08c23077__grid-row{box-sizing:border-box;display:grid;grid-column:1/-1;grid-template-columns:repeat(3,1fr)}._3af769f755097fdb__cell{align-items:center;appearance:none;border:none;box-sizing:border-box;display:flex;justify-content:center;margin:0;outline:none;padding:0;position:relative}._37ef12d4fb6d6131__point{aspect-ratio:1;border:3px solid;box-sizing:border-box;color:var(--wp-components-color-gray-400,#ccc);contain:strict;display:block;margin:auto;width:6px}._3af769f755097fdb__cell[data-active-item] ._37ef12d4fb6d6131__point{color:var(--wp-components-color-foreground,#1e1e1e);transform:scale(1.6666666667)}._3af769f755097fdb__cell:not([data-active-item]):hover ._37ef12d4fb6d6131__point{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}._3af769f755097fdb__cell[data-focus-visible] ._37ef12d4fb6d6131__point{outline:1px solid var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));outline-offset:1px}@media not (prefers-reduced-motion){._37ef12d4fb6d6131__point{transition-duration:.12s;transition-property:color,transform;transition-timing-function:linear}}")),document.head.appendChild(c)}var tO={"grid-container":"_02e2af5803bf5bda__grid-container","grid-row":"c421f8ed08c23077__grid-row",cell:"_3af769f755097fdb__cell",point:"_37ef12d4fb6d6131__point"};function bO({className:c,id:l,label:t=(0,NR.__)("Alignment Matrix Control"),defaultValue:e="center center",value:d,onChange:b,width:o=92,...n}){let G=(0,eO.useInstanceId)(bO,"alignment-matrix-control",l),X=(0,dO.useCallback)(a=>{let m=KA(G,a);m&&b?.(m)},[G,b]),i=Q("component-alignment-matrix-control",tO["grid-container"],c);return(0,fu.jsx)(Qt,{defaultActiveId:FR(G,e),activeId:FR(G,d),setActiveId:X,rtl:(0,NR.isRTL)(),render:(0,fu.jsx)("div",{...n,className:i,"aria-label":t,id:G,role:"grid",style:{width:`${o}px`}}),children:_V.map((a,m)=>(0,fu.jsx)(Qt.Row,{render:(0,fu.jsx)("div",{className:tO["grid-row"],role:"row"}),children:a.map(x=>(0,fu.jsx)($A,{id:FR(G,x),value:x},x))},m))})}var dXc=Object.assign(bO,{Icon:Object.assign(lO,{displayName:"AlignmentMatrixControl.Icon"})}),c2=dXc;function bXc(c){return c==="appear"?"top":"left"}function EX(c){if(c.type==="loading")return"components-animate__loading";let{type:l,origin:t=bXc(l)}=c;if(l==="appear"){let[e,d="center"]=t.split(" ");return Q("components-animate__appear",{["is-from-"+d]:d!=="center",["is-from-"+e]:e!=="middle"})}if(l==="slide-in")return Q("components-animate__slide-in","is-from-"+t)}function oXc({type:c,options:l={},children:t}){return t({className:EX({type:c,...l})})}var oO=oXc;var UQ=u(Y(),1),kI=u(nc(),1);var mO=u(Y(),1),xO=u(ml(),1);var fR=u(Y(),1),l2=["40em","52em","64em"],nXc=(c={})=>{let{defaultIndex:l=0}=c;if(typeof l!="number")throw new TypeError(`Default breakpoint index should be a number. Got: ${l}, ${typeof l}`);if(l<0||l>l2.length-1)throw new RangeError(`Default breakpoint index out of range. Theme has ${l2.length} breakpoints, got index ${l}`);let[t,e]=(0,fR.useState)(l);return(0,fR.useEffect)(()=>{let d=()=>l2.filter(o=>typeof window<"u"?window.matchMedia(`screen and (min-width: ${o})`).matches:!1).length,b=()=>{let o=d();t!==o&&e(o)};return b(),typeof window<"u"&&window.addEventListener("resize",b),()=>{typeof window<"u"&&window.removeEventListener("resize",b)}},[t]),t};function Is(c,l={}){let t=nXc(l);if(!Array.isArray(c)&&typeof c!="function")return c;let e=c||[];return e[t>=e.length?e.length-1:t]}var GXc="4px";function z(c){if(typeof c>"u")return;if(!c)return"0";let l=typeof c=="number"?c:Number(c);return typeof window<"u"&&window.CSS?.supports?.("margin",c.toString())||Number.isNaN(l)?c.toString():`calc(${GXc} * ${c})`}var nO={name:"zjik7",styles:"display:flex"},GO={name:"qgaee5",styles:"display:block;max-height:100%;max-width:100%;min-height:0;min-width:0"},XO={name:"82a6rk",styles:"flex:1"},iO={name:"13nosa1",styles:">*{min-height:0;}"},aO={name:"1pwxzk4",styles:">*{min-width:0;}"};function XXc(c){let{isReversed:l,...t}=c;return typeof l<"u"?((0,xO.default)("Flex isReversed",{alternative:'Flex direction="row-reverse" or "column-reverse"',since:"5.9"}),{...t,direction:l?"row-reverse":"row"}):t}function Su(c){let{align:l,className:t,direction:e="row",expanded:d=!0,gap:b=2,justify:o="space-between",wrap:n=!1,...G}=cc(XXc(c),"Flex"),X=Array.isArray(e)?e:[e],i=Is(X),a=typeof i=="string"&&!!i.includes("column"),m=Xc(),x=(0,mO.useMemo)(()=>{let s=O({alignItems:l??(a?"normal":"center"),flexDirection:i,flexWrap:n?"wrap":void 0,gap:z(b),justifyContent:o,height:a&&d?"100%":void 0,width:!a&&d?"100%":void 0},"","");return m(nO,s,a?iO:aO,t)},[l,t,m,i,d,b,a,o,n]);return{...G,className:x,isColumn:a}}var SR=u(Y(),1),t2=(0,SR.createContext)({flexItemDisplay:void 0}),sO=()=>(0,SR.useContext)(t2);var e2=u(V(),1);function iXc(c,l){let{children:t,isColumn:e,...d}=Su(c);return(0,e2.jsx)(t2.Provider,{value:{flexItemDisplay:e?"block":void 0},children:(0,e2.jsx)(ic,{...d,ref:l,children:t})})}var aXc=tc(iXc,"Flex"),Il=aXc;function ku(c){let{className:l,display:t,isBlock:e=!1,...d}=cc(c,"FlexItem"),b={},o=sO().flexItemDisplay;b.Base=O({display:t||o},"","");let G=Xc()(GO,b.Base,e&&XO,l);return{...d,className:G}}var rO=u(V(),1);function uXc(c,l){let t=ku(c);return(0,rO.jsx)(ic,{...t,ref:l})}var mXc=tc(uXc,"FlexItem"),Ut=mXc;function d2(c){let l=cc(c,"FlexBlock");return ku({isBlock:!0,...l})}var gO=u(V(),1);function xXc(c,l){let t=d2(c);return(0,gO.jsx)(ic,{...t,ref:l})}var sXc=tc(xXc,"FlexBlock"),Xe=sXc;function fe(c){return typeof c<"u"&&c!==null}function ZO(c){let{className:l,margin:t,marginBottom:e=2,marginLeft:d,marginRight:b,marginTop:o,marginX:n,marginY:G,padding:X,paddingBottom:i,paddingLeft:a,paddingRight:m,paddingTop:x,paddingX:s,paddingY:r,...g}=cc(c,"Spacer"),H=Xc()(fe(t)&&O("margin:",z(t),";",""),fe(G)&&O("margin-bottom:",z(G),";margin-top:",z(G),";",""),fe(n)&&O("margin-left:",z(n),";margin-right:",z(n),";",""),fe(o)&&O("margin-top:",z(o),";",""),fe(e)&&O("margin-bottom:",z(e),";",""),fe(d)&&Fc({marginLeft:z(d)})(),fe(b)&&Fc({marginRight:z(b)})(),fe(X)&&O("padding:",z(X),";",""),fe(r)&&O("padding-bottom:",z(r),";padding-top:",z(r),";",""),fe(s)&&O("padding-left:",z(s),";padding-right:",z(s),";",""),fe(x)&&O("padding-top:",z(x),";",""),fe(i)&&O("padding-bottom:",z(i),";",""),fe(a)&&Fc({paddingLeft:z(a)})(),fe(m)&&Fc({paddingRight:z(m)})(),l);return{...g,className:H}}var HO=u(V(),1);function rXc(c,l){let t=ZO(c);return(0,HO.jsx)(ic,{...t,ref:l})}var gXc=tc(rXc,"Spacer"),rt=gXc;var fI=u(Y(),1),wu=u(nc(),1);var kR=u(Y(),1),Cl=(0,kR.forwardRef)(({icon:c,size:l=24,...t},e)=>(0,kR.cloneElement)(c,{width:l,height:l,...t,ref:e}));var zR=u(kc(),1),b2=u(V(),1),AR=(0,b2.jsx)(zR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,b2.jsx)(zR.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var OR=u(kc(),1),o2=u(V(),1),QR=(0,o2.jsx)(OR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o2.jsx)(OR.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})});var wR=u(kc(),1),n2=u(V(),1),G2=(0,n2.jsx)(wR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n2.jsx)(wR.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-.75 12v-1.5h1.5V16h-1.5Zm0-8v5h1.5V8h-1.5Z"})});var TR=u(kc(),1),X2=u(V(),1),jt=(0,X2.jsx)(TR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,X2.jsx)(TR.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var DR=u(kc(),1),i2=u(V(),1),Ws=(0,i2.jsx)(DR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i2.jsx)(DR.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var LR=u(kc(),1),a2=u(V(),1),ps=(0,a2.jsx)(LR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a2.jsx)(LR.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var UR=u(kc(),1),u2=u(V(),1),m2=(0,u2.jsx)(UR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,u2.jsx)(UR.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})});var jR=u(kc(),1),x2=u(V(),1),MX=(0,x2.jsx)(jR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,x2.jsx)(jR.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var ER=u(kc(),1),s2=u(V(),1),r2=(0,s2.jsx)(ER.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s2.jsx)(ER.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var MR=u(kc(),1),g2=u(V(),1),PX=(0,g2.jsx)(MR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,g2.jsx)(MR.Path,{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"})});var PR=u(kc(),1),Z2=u(V(),1),KX=(0,Z2.jsx)(PR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Z2.jsx)(PR.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})});var KR=u(kc(),1),H2=u(V(),1),R2=(0,H2.jsx)(KR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,H2.jsx)(KR.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"})});var _R=u(kc(),1),I2=u(V(),1),Bs=(0,I2.jsx)(_R.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,I2.jsx)(_R.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z"})});var qR=u(kc(),1),W2=u(V(),1),p2=(0,W2.jsx)(qR.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,W2.jsx)(qR.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})});var $R=u(kc(),1),B2=u(V(),1),y2=(0,B2.jsx)($R.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,B2.jsx)($R.Path,{fillRule:"evenodd",d:"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z",clipRule:"evenodd"})});var cI=u(kc(),1),V2=u(V(),1),C2=(0,V2.jsx)(cI.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,V2.jsx)(cI.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.25 11.25h1.5v1.5h-1.5v-1.5zm3 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5zm1.5 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5z"})});var lI=u(kc(),1),J2=u(V(),1),ys=(0,J2.jsx)(lI.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,J2.jsx)(lI.Path,{d:"M5 11.25h14v1.5H5z"})});var tI=u(kc(),1),h2=u(V(),1),Vs=(0,h2.jsx)(tI.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,h2.jsx)(tI.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})});var eI=u(kc(),1),Y2=u(V(),1),Cs=(0,Y2.jsx)(eI.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Y2.jsx)(eI.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});var dI=u(kc(),1),F2=u(V(),1),v2=(0,F2.jsx)(dI.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,F2.jsx)(dI.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"})});var bI=u(kc(),1),N2=u(V(),1),Js=(0,N2.jsx)(bI.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,N2.jsx)(bI.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var oI=u(kc(),1),f2=u(V(),1),$o=(0,f2.jsx)(oI.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f2.jsx)(oI.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var nI=u(kc(),1),S2=u(V(),1),hs=(0,S2.jsx)(nI.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,S2.jsx)(nI.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var GI=u(kc(),1),k2=u(V(),1),Ys=(0,k2.jsx)(GI.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,k2.jsx)(GI.Path,{d:"M7 11.5h10V13H7z"})});var XI=u(kc(),1),z2=u(V(),1),Fs=(0,z2.jsx)(XI.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,z2.jsx)(XI.Path,{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"})});var vs=u(kc(),1),Ns=u(V(),1),fs=(0,Ns.jsxs)(vs.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Ns.jsx)(vs.Path,{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"}),(0,Ns.jsx)(vs.Path,{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"})]});var iI=u(kc(),1),A2=u(V(),1),Ss=(0,A2.jsx)(iI.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,A2.jsx)(iI.Path,{d:"M7.1 5.7 8 6.9c.4-.3.9-.6 1.5-.8l-.6-1.4c-.7.3-1.3.6-1.8 1ZM4.6 8.9l1.4.6c.2-.5.5-1 .8-1.5l-1.2-.9c-.4.6-.8 1.2-1 1.8Zm14.8 0c-.3-.7-.6-1.3-1-1.8l-1.2.9c.3.4.6.9.8 1.5l1.4-.6ZM7.1 18.3c.6.4 1.2.8 1.8 1l.6-1.4c-.5-.2-1-.5-1.5-.8l-.9 1.2ZM5.5 12v-.9h-.7l-.7-.2v2l1.5-.2v-.9Zm-.7 3h-.2c.3.7.6 1.3 1 1.9l1.2-.9c-.3-.4-.6-.9-.8-1.5l-1.2.5Zm9.7 3 .5 1.2v.2c.7-.3 1.3-.6 1.9-1l-.9-1.2c-.4.3-.9.6-1.5.8Zm-2.5.5h-.9l-.2 1.3v.2h2l-.2-1.5h-.9Zm7.9-7.5-1.5.2V13h.7l.7.2v-2ZM18 14.5c-.2.5-.5 1-.8 1.5l1.2.9c.4-.6.8-1.2 1-1.8h-.2l-1.2-.6ZM11 4.1l.2 1.5H13V4.2h-1.9ZM14.5 6c.5.2 1 .5 1.5.8l.9-1.2c-.6-.4-1.2-.8-1.8-1L14.5 6Z"})});var aI=u(kc(),1),O2=u(V(),1),Q2=(0,O2.jsx)(aI.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,O2.jsx)(aI.Path,{d:"M12 15.8c-3.7 0-6.8-3-6.8-6.8s3-6.8 6.8-6.8c3.7 0 6.8 3 6.8 6.8s-3.1 6.8-6.8 6.8zm0-12C9.1 3.8 6.8 6.1 6.8 9s2.4 5.2 5.2 5.2c2.9 0 5.2-2.4 5.2-5.2S14.9 3.8 12 3.8zM8 17.5h8V19H8zM10 20.5h4V22h-4z"})});var uI=u(kc(),1),w2=u(V(),1),T2=(0,w2.jsx)(uI.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,w2.jsx)(uI.Path,{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"})});var AQ=u(dc(),1),OQ=u(ml(),1);var BQ=u(dc(),1),yQ=u(Y(),1);var wO=u(dc(),1),TO=u(Y(),1);var zO=u(Y(),1);var zu=u(Y(),1);var WO=u(Y(),1);var RO={name:"hdknak",styles:"display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"};var mI="\u2026",XG={auto:"auto",head:"head",middle:"middle",tail:"tail",none:"none"},HXc={ellipsis:mI,ellipsizeMode:XG.auto,limit:0,numberOfLines:0};function RXc(c,l,t,e){if(typeof c!="string")return"";let d=c.length,b=~~l,o=~~t,n=Dt(e)?e:mI;return b===0&&o===0||b>=d||o>=d||b+o>=d?c:o===0?c.slice(0,b)+n:c.slice(0,b)+n+c.slice(d-o)}function IO(c="",l){let t={...HXc,...l},{ellipsis:e,ellipsizeMode:d,limit:b}=t;if(d===XG.none)return c;let o,n;switch(d){case XG.head:o=0,n=b;break;case XG.middle:o=Math.floor(b/2),n=Math.floor(b/2);break;default:o=b,n=0}return d!==XG.auto?RXc(c,o,n,e):c}function ks(c){let{className:l,children:t,ellipsis:e=mI,ellipsizeMode:d=XG.auto,limit:b=0,numberOfLines:o=0,...n}=cc(c,"Truncate"),G=Xc(),X;typeof t=="string"?X=t:typeof t=="number"&&(X=t.toString());let i=X?IO(X,{ellipsis:e,ellipsizeMode:d,limit:b,numberOfLines:o}):t,a=!!X&&d===XG.auto,m=(0,WO.useMemo)(()=>G(a&&!o&&RO,a&&!!o&&O(o===1?"word-break: break-all;":""," -webkit-box-orient:vertical;-webkit-line-clamp:",o,";display:-webkit-box;overflow:hidden;",""),l),[l,G,o,a]);return{...n,className:m,children:i}}var pO=u(V(),1);function IXc(c,l){let t=ks(c);return(0,pO.jsx)(ic,{as:"span",...t,ref:l})}var WXc=tc(IXc,"Truncate"),cn=WXc;var M2={};qG(M2,{Text:()=>D2,block:()=>L2,destructive:()=>U2,highlighterText:()=>E2,muted:()=>j2,positive:()=>pXc,upperCase:()=>BXc});var D2=O("color:",D.theme.foreground,";line-height:",w.fontLineHeightBase,";margin:0;text-wrap:pretty;",""),L2={name:"4zleql",styles:"display:block"},pXc=O("color:",D.alert.green,";",""),U2=O("color:",D.alert.red,";",""),j2=O("color:",D.gray[700],";",""),E2=O("mark{background:",D.alert.yellow,";border-radius:",w.radiusSmall,";box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.05 ) inset,0 -1px 0 rgba( 0, 0, 0, 0.1 ) inset;}",""),BXc={name:"50zrmy",styles:"text-transform:uppercase"};var VO=u(yO(),1),P2=u(Y(),1),yXc=c=>{let l={};for(let t in c)l[t.toLowerCase()]=c[t];return l},VXc=bG(yXc);function CO({activeClassName:c="",activeIndex:l=-1,activeStyle:t,autoEscape:e,caseSensitive:d=!1,children:b,findChunks:o,highlightClassName:n="",highlightStyle:G={},highlightTag:X="mark",sanitize:i,searchWords:a=[],unhighlightClassName:m="",unhighlightStyle:x}){if(!b)return null;if(typeof b!="string")return b;let s=b,r=(0,VO.findAll)({autoEscape:e,caseSensitive:d,findChunks:o,sanitize:i,searchWords:a,textToHighlight:s}),g=X,Z=-1,H="",R;return r.map((I,B)=>{let p=s.substr(I.start,I.end-I.start);if(I.highlight){Z++;let y;typeof n=="object"?d?y=n[p]:(n=VXc(n),y=n[p.toLowerCase()]):y=n;let h=Z===+l;H=`${y} ${h?c:""}`,R=h===!0&&t!==null?Object.assign({},G,t):G;let C={children:p,className:H,key:B,style:R};return typeof g!="string"&&(C.highlightIndex=Z),(0,P2.createElement)(g,C)}return(0,P2.createElement)("span",{children:p,className:m,key:B,style:x})})}var K2=13,JO={body:K2,caption:10,footnote:11,largeTitle:28,subheadline:12,title:20},CXc=[1,2,3,4,5,6].flatMap(c=>[c,c.toString()]);function xI(c=K2){if(c in JO)return xI(JO[c]);if(typeof c!="number"){let t=parseFloat(c);if(Number.isNaN(t))return c;c=t}return`calc(${`(${c} / ${K2})`} * ${w.fontSize})`}function hO(c=3){if(!CXc.includes(c))return xI(c);let l=`fontSizeH${c}`;return w[l]}function YO(c,l){if(l)return l;if(!c)return;let t=`calc(${w.controlHeight} + ${z(2)})`;switch(c){case"large":t=`calc(${w.controlHeightLarge} + ${z(2)})`;break;case"small":t=`calc(${w.controlHeightSmall} + ${z(2)})`;break;case"xSmall":t=`calc(${w.controlHeightXSmall} + ${z(2)})`;break;default:break}return t}var JXc={name:"50zrmy",styles:"text-transform:uppercase"};function zs(c){let{adjustLineHeightForInnerControls:l,align:t,children:e,className:d,color:b,ellipsizeMode:o,isDestructive:n=!1,display:G,highlightEscape:X=!1,highlightCaseSensitive:i=!1,highlightWords:a,highlightSanitize:m,isBlock:x=!1,letterSpacing:s,lineHeight:r,optimizeReadabilityFor:g,size:Z,truncate:H=!1,upperCase:R=!1,variant:W,weight:I=w.fontWeight,...B}=cc(c,"Text"),p=e,y=Array.isArray(a),h=Z==="caption";if(y){if(typeof e!="string")throw new TypeError("`children` of `Text` must only be `string` types when `highlightWords` is defined");p=CO({autoEscape:X,children:e,caseSensitive:i,searchWords:a,sanitize:m})}let C=Xc(),J=(0,zu.useMemo)(()=>{let T={},L=YO(l,r);if(T.Base=O({color:b,display:G,fontSize:xI(Z),fontWeight:I,lineHeight:L,letterSpacing:s,textAlign:t},"",""),T.upperCase=JXc,T.optimalTextColor=null,g){let v=nA(g)==="dark";T.optimalTextColor=v?O({color:D.gray[900]},"",""):O({color:D.white},"","")}return C(D2,T.Base,T.optimalTextColor,n&&U2,!!y&&E2,x&&L2,h&&j2,W&&M2[W],R&&T.upperCase,d)},[l,t,d,b,C,G,x,h,n,y,s,r,g,Z,R,W,I]),f;H===!0&&(f="auto"),H===!1&&(f="none");let k={...B,className:J,children:e,ellipsizeMode:o||f},F=ks(k);return!H&&Array.isArray(e)&&(p=zu.Children.map(e,T=>typeof T!="object"||T===null||!("props"in T)?T:Zs(T,["Link"])?(0,zu.cloneElement)(T,{size:T.props.size||"inherit"}):T)),{...F,children:H?F.children:p}}var FO=u(V(),1);function hXc(c,l){let t=zs(c);return(0,FO.jsx)(ic,{as:"span",...t,ref:l})}var YXc=tc(hXc,"Text"),Jt=YXc;var vO=u(V(),1);var _2=N("span",{target:"em5sgkm8"})({name:"pvvbxf",styles:"box-sizing:border-box;display:block"}),q2=N("span",{target:"em5sgkm7"})({name:"jgf79h",styles:"align-items:center;align-self:stretch;box-sizing:border-box;display:flex"}),FXc=({disabled:c,isBorderless:l})=>l?"transparent":c?D.ui.borderDisabled:D.ui.border,yd=N("div",{target:"em5sgkm6"})("&&&{box-sizing:border-box;border-color:",FXc,";border-radius:inherit;border-style:solid;border-width:1px;bottom:0;left:0;margin:0;padding:0;pointer-events:none;position:absolute;right:0;top:0;",Fc({paddingLeft:2}),";}"),NO=N(Il,{target:"em5sgkm5"})("box-sizing:border-box;position:relative;border-radius:",w.radiusSmall,";padding-top:0;&:focus-within:not( :has( :is( ",_2,", ",q2," ):focus-within ) ){",yd,"{border-color:",D.ui.borderFocus,";box-shadow:",w.controlBoxShadowFocus,";outline:2px solid transparent;outline-offset:-2px;}}"),vXc=({disabled:c})=>{let l=c?D.ui.backgroundDisabled:D.ui.background;return O({backgroundColor:l},"","")},NXc={name:"1d3w5wq",styles:"width:100%"},fXc=({__unstableInputWidth:c,labelPosition:l})=>c?l==="side"?"":l==="edge"?O({flex:`0 0 ${c}`},"",""):O({width:c},"",""):NXc,sI=N("div",{target:"em5sgkm4"})("align-items:center;box-sizing:border-box;border-radius:inherit;display:flex;flex:1;position:relative;",vXc," ",fXc,";"),SXc=({disabled:c})=>c?O({color:D.ui.textDisabled},"",""):"",As=({inputSize:c})=>{let l={default:"13px",small:"11px",compact:"13px","__unstable-large":"13px"},t=l[c]||l.default,e="16px";return t?O("font-size:",e,";@media ( min-width: 600px ){font-size:",t,";}",""):""},fO=({inputSize:c,__next40pxDefaultSize:l})=>{let t={default:{height:40,lineHeight:1,minHeight:40,paddingLeft:w.controlPaddingX,paddingRight:w.controlPaddingX},small:{height:24,lineHeight:1,minHeight:24,paddingLeft:w.controlPaddingXSmall,paddingRight:w.controlPaddingXSmall},compact:{height:32,lineHeight:1,minHeight:32,paddingLeft:w.controlPaddingXSmall,paddingRight:w.controlPaddingXSmall},"__unstable-large":{height:40,lineHeight:1,minHeight:40,paddingLeft:w.controlPaddingX,paddingRight:w.controlPaddingX}};return l||(t.default=t.compact),t[c]||t.default},kXc=c=>O(fO(c),"",""),zXc=({paddingInlineStart:c,paddingInlineEnd:l})=>O({paddingInlineStart:c,paddingInlineEnd:l},"",""),AXc=({isDragging:c,dragCursor:l})=>{let t,e;return c&&(t=O("cursor:",l,";user-select:none;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}","")),c&&l&&(e=O("&:active{cursor:",l,";}","")),O(t," ",e,";","")},db=N("input",{target:"em5sgkm3"})("&&&{background-color:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",D.theme.foreground,";display:block;font-family:inherit;margin:0;outline:none;width:100%;",AXc," ",SXc," ",As," ",kXc," ",zXc," &::-webkit-input-placeholder{color:",D.ui.darkGrayPlaceholder,";}&::-moz-placeholder{color:",D.ui.darkGrayPlaceholder,";}&:-ms-input-placeholder{color:",D.ui.darkGrayPlaceholder,";}&[type='email'],&[type='url']{direction:ltr;}}"),OXc=N(Jt,{target:"em5sgkm2"})("&&&{",ss,";box-sizing:border-box;display:block;padding-top:0;padding-bottom:0;max-width:100%;z-index:1;}"),SO=c=>(0,vO.jsx)(OXc,{...c,as:"label"}),kO=N(Ut,{target:"em5sgkm1"})({name:"1b6uupn",styles:"max-width:calc( 100% - 10px )"}),QXc=({variant:c="default",size:l,__next40pxDefaultSize:t,isPrefix:e})=>{let{paddingLeft:d}=fO({inputSize:l,__next40pxDefaultSize:t}),b=e?"paddingInlineStart":"paddingInlineEnd";return c==="default"?O({[b]:d},"",""):O({display:"flex",[b]:d-4},"","")},rI=N("div",{target:"em5sgkm0"})(QXc,";");var AO=u(V(),1);function wXc({disabled:c=!1,isBorderless:l=!1}){return(0,AO.jsx)(yd,{"aria-hidden":"true",className:"components-input-control__backdrop",disabled:c,isBorderless:l})}var TXc=(0,zO.memo)(wXc),OO=TXc;var gI=u(V(),1);function QO({children:c,hideLabelFromVision:l,htmlFor:t,...e}){return c?l?(0,gI.jsx)(Qc,{as:"label",htmlFor:t,children:c}):(0,gI.jsx)(kO,{children:(0,gI.jsx)(SO,{htmlFor:t,...e,children:c})}):null}function Et(c){let{__next36pxDefaultSize:l,__next40pxDefaultSize:t,...e}=c;return{...e,__next40pxDefaultSize:t??l}}var ln=u(V(),1);function DXc(c){let t=`input-base-control-${(0,wO.useInstanceId)(DO)}`;return c||t}function LXc(c){let l={};switch(c){case"top":l.direction="column",l.expanded=!1,l.gap=0;break;case"bottom":l.direction="column-reverse",l.expanded=!1,l.gap=0;break;case"edge":l.justify="space-between";break}return l}function DO(c,l){let{__next40pxDefaultSize:t,__unstableInputWidth:e,children:d,className:b,disabled:o=!1,hideLabelFromVision:n=!1,labelPosition:G,id:X,isBorderless:i=!1,label:a,prefix:m,size:x="default",suffix:s,...r}=Et(cc(c,"InputBase")),g=DXc(X),Z=n||!a,H=(0,TO.useMemo)(()=>({InputControlPrefixWrapper:{__next40pxDefaultSize:t,size:x},InputControlSuffixWrapper:{__next40pxDefaultSize:t,size:x}}),[t,x]);return(0,ln.jsxs)(NO,{...r,...LXc(G),className:b,gap:2,ref:l,children:[(0,ln.jsx)(QO,{className:"components-input-control__label",hideLabelFromVision:n,labelPosition:G,htmlFor:g,children:a}),(0,ln.jsxs)(sI,{__unstableInputWidth:e,className:"components-input-control__container",disabled:o,hideLabel:Z,labelPosition:G,children:[(0,ln.jsxs)(DX,{value:H,children:[m&&(0,ln.jsx)(_2,{className:"components-input-control__prefix",children:m}),d,s&&(0,ln.jsx)(q2,{className:"components-input-control__suffix",children:s})]}),(0,ln.jsx)(OO,{disabled:o,isBorderless:i})]})]})}var Au=tc(DO,"InputBase");function UXc(c,l,t){return Math.max(l,Math.min(c,t))}var ht={toVector(c,l){return c===void 0&&(c=l),Array.isArray(c)?c:[c,c]},add(c,l){return[c[0]+l[0],c[1]+l[1]]},sub(c,l){return[c[0]-l[0],c[1]-l[1]]},addTo(c,l){c[0]+=l[0],c[1]+=l[1]},subTo(c,l){c[0]-=l[0],c[1]-=l[1]}};function LO(c,l,t){return l===0||Math.abs(l)===1/0?Math.pow(c,t*5):c*l*t/(l+t*c)}function UO(c,l,t,e=.15){return e===0?UXc(c,l,t):c<l?-LO(l-c,t-l,e)+l:c>t?+LO(c-t,t-l,e)+t:c}function jO(c,[l,t],[e,d]){let[[b,o],[n,G]]=c;return[UO(l,b,o,e),UO(t,n,G,d)]}function jXc(c,l){if(typeof c!="object"||c===null)return c;var t=c[Symbol.toPrimitive];if(t!==void 0){var e=t.call(c,l||"default");if(typeof e!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(c)}function EXc(c){var l=jXc(c,"string");return typeof l=="symbol"?l:String(l)}function ie(c,l,t){return l=EXc(l),l in c?Object.defineProperty(c,l,{value:t,enumerable:!0,configurable:!0,writable:!0}):c[l]=t,c}function EO(c,l){var t=Object.keys(c);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(c);l&&(e=e.filter(function(d){return Object.getOwnPropertyDescriptor(c,d).enumerable})),t.push.apply(t,e)}return t}function Fl(c){for(var l=1;l<arguments.length;l++){var t=arguments[l]!=null?arguments[l]:{};l%2?EO(Object(t),!0).forEach(function(e){ie(c,e,t[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(t)):EO(Object(t)).forEach(function(e){Object.defineProperty(c,e,Object.getOwnPropertyDescriptor(t,e))})}return c}var cQ={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function MO(c){return c?c[0].toUpperCase()+c.slice(1):""}var MXc=["enter","leave"];function PXc(c=!1,l){return c&&!MXc.includes(l)}function lQ(c,l="",t=!1){let e=cQ[c],d=e&&e[l]||l;return"on"+MO(c)+MO(d)+(PXc(t,d)?"Capture":"")}var KXc=["gotpointercapture","lostpointercapture"];function tQ(c){let l=c.substring(2).toLowerCase(),t=!!~l.indexOf("passive");t&&(l=l.replace("passive",""));let e=KXc.includes(l)?"capturecapture":"capture",d=!!~l.indexOf(e);return d&&(l=l.replace("capture","")),{device:l,capture:d,passive:t}}function eQ(c,l=""){let t=cQ[c],e=t&&t[l]||l;return c+e}function Os(c){return"touches"in c}function dQ(c){return Os(c)?"touch":"pointerType"in c?c.pointerType:"mouse"}function _Xc(c){return Array.from(c.touches).filter(l=>{var t,e;return l.target===c.currentTarget||((t=c.currentTarget)===null||t===void 0||(e=t.contains)===null||e===void 0?void 0:e.call(t,l.target))})}function qXc(c){return c.type==="touchend"||c.type==="touchcancel"?c.changedTouches:c.targetTouches}function bQ(c){return Os(c)?qXc(c)[0]:c}function oQ(c){return _Xc(c).map(l=>l.identifier)}function $2(c){let l=bQ(c);return Os(c)?l.identifier:l.pointerId}function PO(c){let l=bQ(c);return[l.clientX,l.clientY]}function $Xc(c){let l={};if("buttons"in c&&(l.buttons=c.buttons),"shiftKey"in c){let{shiftKey:t,altKey:e,metaKey:d,ctrlKey:b}=c;Object.assign(l,{shiftKey:t,altKey:e,metaKey:d,ctrlKey:b})}return l}function ZI(c,...l){return typeof c=="function"?c(...l):c}function cic(){}function nQ(...c){return c.length===0?cic:c.length===1?c[0]:function(){let l;for(let t of c)l=t.apply(this,arguments)||l;return l}}function KO(c,l){return Object.assign({},l,c||{})}var lic=32,cC=class{constructor(l,t,e){this.ctrl=l,this.args=t,this.key=e,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(l){this.ctrl.state[this.key]=l}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){let{state:l,shared:t,ingKey:e,args:d}=this;t[e]=l._active=l.active=l._blocked=l._force=!1,l._step=[!1,!1],l.intentional=!1,l._movement=[0,0],l._distance=[0,0],l._direction=[0,0],l._delta=[0,0],l._bounds=[[-1/0,1/0],[-1/0,1/0]],l.args=d,l.axis=void 0,l.memo=void 0,l.elapsedTime=l.timeDelta=0,l.direction=[0,0],l.distance=[0,0],l.overflow=[0,0],l._movementBound=[!1,!1],l.velocity=[0,0],l.movement=[0,0],l.delta=[0,0],l.timeStamp=0}start(l){let t=this.state,e=this.config;t._active||(this.reset(),this.computeInitial(),t._active=!0,t.target=l.target,t.currentTarget=l.currentTarget,t.lastOffset=e.from?ZI(e.from,t):t.offset,t.offset=t.lastOffset,t.startTime=t.timeStamp=l.timeStamp)}computeValues(l){let t=this.state;t._values=l,t.values=this.config.transform(l)}computeInitial(){let l=this.state;l._initial=l._values,l.initial=l.values}compute(l){let{state:t,config:e,shared:d}=this;t.args=this.args;let b=0;if(l&&(t.event=l,e.preventDefault&&l.cancelable&&t.event.preventDefault(),t.type=l.type,d.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,d.locked=!!document.pointerLockElement,Object.assign(d,$Xc(l)),d.down=d.pressed=d.buttons%2===1||d.touches>0,b=l.timeStamp-t.timeStamp,t.timeStamp=l.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){let B=t._delta.map(Math.abs);ht.addTo(t._distance,B)}this.axisIntent&&this.axisIntent(l);let[o,n]=t._movement,[G,X]=e.threshold,{_step:i,values:a}=t;if(e.hasCustomTransform?(i[0]===!1&&(i[0]=Math.abs(o)>=G&&a[0]),i[1]===!1&&(i[1]=Math.abs(n)>=X&&a[1])):(i[0]===!1&&(i[0]=Math.abs(o)>=G&&Math.sign(o)*G),i[1]===!1&&(i[1]=Math.abs(n)>=X&&Math.sign(n)*X)),t.intentional=i[0]!==!1||i[1]!==!1,!t.intentional)return;let m=[0,0];if(e.hasCustomTransform){let[B,p]=a;m[0]=i[0]!==!1?B-i[0]:0,m[1]=i[1]!==!1?p-i[1]:0}else m[0]=i[0]!==!1?o-i[0]:0,m[1]=i[1]!==!1?n-i[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(m);let x=t.offset,s=t._active&&!t._blocked||t.active;s&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=d[this.ingKey]=t._active,l&&(t.first&&("bounds"in e&&(t._bounds=ZI(e.bounds,t)),this.setup&&this.setup()),t.movement=m,this.computeOffset()));let[r,g]=t.offset,[[Z,H],[R,W]]=t._bounds;t.overflow=[r<Z?-1:r>H?1:0,g<R?-1:g>W?1:0],t._movementBound[0]=t.overflow[0]?t._movementBound[0]===!1?t._movement[0]:t._movementBound[0]:!1,t._movementBound[1]=t.overflow[1]?t._movementBound[1]===!1?t._movement[1]:t._movementBound[1]:!1;let I=t._active?e.rubberband||[0,0]:[0,0];if(t.offset=jO(t._bounds,t.offset,I),t.delta=ht.sub(t.offset,x),this.computeMovement(),s&&(!t.last||b>lic)){t.delta=ht.sub(t.offset,x);let B=t.delta.map(Math.abs);ht.addTo(t.distance,B),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&b>0&&(t.velocity=[B[0]/b,B[1]/b],t.timeDelta=b)}}emit(){let l=this.state,t=this.shared,e=this.config;if(l._active||this.clean(),(l._blocked||!l.intentional)&&!l._force&&!e.triggerAllEvents)return;let d=this.handler(Fl(Fl(Fl({},t),l),{},{[this.aliasKey]:l.values}));d!==void 0&&(l.memo=d)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}};function tic([c,l],t){let e=Math.abs(c),d=Math.abs(l);if(e>d&&e>t)return"x";if(d>e&&d>t)return"y"}var lC=class extends cC{constructor(...l){super(...l),ie(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=ht.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=ht.sub(this.state.offset,this.state.lastOffset)}axisIntent(l){let t=this.state,e=this.config;if(!t.axis&&l){let d=typeof e.axisThreshold=="object"?e.axisThreshold[dQ(l)]:e.axisThreshold;t.axis=tic(t._movement,d)}t._blocked=(e.lockDirection||!!e.axis)&&!t.axis||!!e.axis&&e.axis!==t.axis}restrictToAxis(l){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":l[1]=0;break;case"y":l[0]=0;break}}},eic=c=>c,_O=.15,GQ={enabled(c=!0){return c},eventOptions(c,l,t){return Fl(Fl({},t.shared.eventOptions),c)},preventDefault(c=!1){return c},triggerAllEvents(c=!1){return c},rubberband(c=0){switch(c){case!0:return[_O,_O];case!1:return[0,0];default:return ht.toVector(c)}},from(c){if(typeof c=="function")return c;if(c!=null)return ht.toVector(c)},transform(c,l,t){let e=c||t.shared.transform;return this.hasCustomTransform=!!e,e||eic},threshold(c){return ht.toVector(c,0)}},dic=0,Qs=Fl(Fl({},GQ),{},{axis(c,l,{axis:t}){if(this.lockDirection=t==="lock",!this.lockDirection)return t},axisThreshold(c=dic){return c},bounds(c={}){if(typeof c=="function")return b=>Qs.bounds(c(b));if("current"in c)return()=>c.current;if(typeof HTMLElement=="function"&&c instanceof HTMLElement)return c;let{left:l=-1/0,right:t=1/0,top:e=-1/0,bottom:d=1/0}=c;return[[l,t],[e,d]]}}),qO={ArrowRight:(c,l=1)=>[c*l,0],ArrowLeft:(c,l=1)=>[-1*c*l,0],ArrowUp:(c,l=1)=>[0,-1*c*l],ArrowDown:(c,l=1)=>[0,c*l]},tC=class extends lC{constructor(...l){super(...l),ie(this,"ingKey","dragging")}reset(){super.reset();let l=this.state;l._pointerId=void 0,l._pointerActive=!1,l._keyboardActive=!1,l._preventScroll=!1,l._delayed=!1,l.swipe=[0,0],l.tap=!1,l.canceled=!1,l.cancel=this.cancel.bind(this)}setup(){let l=this.state;if(l._bounds instanceof HTMLElement){let t=l._bounds.getBoundingClientRect(),e=l.currentTarget.getBoundingClientRect(),d={left:t.left-e.left+l.offset[0],right:t.right-e.right+l.offset[0],top:t.top-e.top+l.offset[1],bottom:t.bottom-e.bottom+l.offset[1]};l._bounds=Qs.bounds(d)}}cancel(){let l=this.state;l.canceled||(l.canceled=!0,l._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(l){let t=this.config,e=this.state;if(l.buttons!=null&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(l.buttons):t.pointerButtons!==-1&&t.pointerButtons!==l.buttons))return;let d=this.ctrl.setEventIds(l);t.pointerCapture&&l.target.setPointerCapture(l.pointerId),!(d&&d.size>1&&e._pointerActive)&&(this.start(l),this.setupPointer(l),e._pointerId=$2(l),e._pointerActive=!0,this.computeValues(PO(l)),this.computeInitial(),t.preventScrollAxis&&dQ(l)!=="mouse"?(e._active=!1,this.setupScrollPrevention(l)):t.delay>0?(this.setupDelayTrigger(l),t.triggerAllEvents&&(this.compute(l),this.emit())):this.startPointerDrag(l))}startPointerDrag(l){let t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(l),this.emit()}pointerMove(l){let t=this.state,e=this.config;if(!t._pointerActive)return;let d=$2(l);if(t._pointerId!==void 0&&d!==t._pointerId)return;let b=PO(l);if(document.pointerLockElement===l.target?t._delta=[l.movementX,l.movementY]:(t._delta=ht.sub(b,t._values),this.computeValues(b)),ht.addTo(t._movement,t._delta),this.compute(l),t._delayed&&t.intentional){this.timeoutStore.remove("dragDelay"),t.active=!1,this.startPointerDrag(l);return}if(e.preventScrollAxis&&!t._preventScroll)if(t.axis)if(t.axis===e.preventScrollAxis||e.preventScrollAxis==="xy"){t._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(l);return}else return;this.emit()}pointerUp(l){this.ctrl.setEventIds(l);try{this.config.pointerCapture&&l.target.hasPointerCapture(l.pointerId)&&l.target.releasePointerCapture(l.pointerId)}catch{}let t=this.state,e=this.config;if(!t._active||!t._pointerActive)return;let d=$2(l);if(t._pointerId!==void 0&&d!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(l);let[b,o]=t._distance;if(t.tap=b<=e.tapsThreshold&&o<=e.tapsThreshold,t.tap&&e.filterTaps)t._force=!0;else{let[n,G]=t._delta,[X,i]=t._movement,[a,m]=e.swipe.velocity,[x,s]=e.swipe.distance,r=e.swipe.duration;if(t.elapsedTime<r){let g=Math.abs(n/t.timeDelta),Z=Math.abs(G/t.timeDelta);g>a&&Math.abs(X)>x&&(t.swipe[0]=Math.sign(n)),Z>m&&Math.abs(i)>s&&(t.swipe[1]=Math.sign(G))}}this.emit()}pointerClick(l){!this.state.tap&&l.detail>0&&(l.preventDefault(),l.stopPropagation())}setupPointer(l){let t=this.config,e=t.device;t.pointerLock&&l.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,e,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,e,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,e,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(l){this.state._preventScroll&&l.cancelable&&l.preventDefault()}setupScrollPrevention(l){this.state._preventScroll=!1,bic(l);let t=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",t),this.eventStore.add(this.sharedConfig.window,"touch","cancel",t),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,l)}setupDelayTrigger(l){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(l)},this.config.delay)}keyDown(l){let t=qO[l.key];if(t){let e=this.state,d=l.shiftKey?10:l.altKey?.1:1;this.start(l),e._delta=t(this.config.keyboardDisplacement,d),e._keyboardActive=!0,ht.addTo(e._movement,e._delta),this.compute(l),this.emit()}}keyUp(l){l.key in qO&&(this.state._keyboardActive=!1,this.setActive(),this.compute(l),this.emit())}bind(l){let t=this.config.device;l(t,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(l(t,"change",this.pointerMove.bind(this)),l(t,"end",this.pointerUp.bind(this)),l(t,"cancel",this.pointerUp.bind(this)),l("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(l("key","down",this.keyDown.bind(this)),l("key","up",this.keyUp.bind(this))),this.config.filterTaps&&l("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}};function bic(c){"persist"in c&&typeof c.persist=="function"&&c.persist()}var ws=typeof window<"u"&&window.document&&window.document.createElement;function XQ(){return ws&&"ontouchstart"in window}function oic(){return XQ()||ws&&window.navigator.maxTouchPoints>1}function nic(){return ws&&"onpointerdown"in window}function Gic(){return ws&&"exitPointerLock"in window.document}function Xic(){try{return"constructor"in GestureEvent}catch{return!1}}var $e={isBrowser:ws,gesture:Xic(),touch:XQ(),touchscreen:oic(),pointer:nic(),pointerLock:Gic()},iic=250,aic=180,uic=.5,mic=50,xic=250,sic=10,$O={mouse:0,touch:0,pen:8},ric=Fl(Fl({},Qs),{},{device(c,l,{pointer:{touch:t=!1,lock:e=!1,mouse:d=!1}={}}){return this.pointerLock=e&&$e.pointerLock,$e.touch&&t?"touch":this.pointerLock?"mouse":$e.pointer&&!d?"pointer":$e.touch?"touch":"mouse"},preventScrollAxis(c,l,{preventScroll:t}){if(this.preventScrollDelay=typeof t=="number"?t:t||t===void 0&&c?iic:void 0,!(!$e.touchscreen||t===!1))return c||(t!==void 0?"y":void 0)},pointerCapture(c,l,{pointer:{capture:t=!0,buttons:e=1,keys:d=!0}={}}){return this.pointerButtons=e,this.keys=d,!this.pointerLock&&this.device==="pointer"&&t},threshold(c,l,{filterTaps:t=!1,tapsThreshold:e=3,axis:d=void 0}){let b=ht.toVector(c,t?e:d?1:0);return this.filterTaps=t,this.tapsThreshold=e,b},swipe({velocity:c=uic,distance:l=mic,duration:t=xic}={}){return{velocity:this.transform(ht.toVector(c)),distance:this.transform(ht.toVector(l)),duration:t}},delay(c=0){switch(c){case!0:return aic;case!1:return 0;default:return c}},axisThreshold(c){return c?Fl(Fl({},$O),c):$O},keyboardDisplacement(c=sic){return c}});var f_c=Fl(Fl({},GQ),{},{device(c,l,{shared:t,pointer:{touch:e=!1}={}}){if(t.target&&!$e.touch&&$e.gesture)return"gesture";if($e.touch&&e)return"touch";if($e.touchscreen){if($e.pointer)return"pointer";if($e.touch)return"touch"}},bounds(c,l,{scaleBounds:t={},angleBounds:e={}}){let d=o=>{let n=KO(ZI(t,o),{min:-1/0,max:1/0});return[n.min,n.max]},b=o=>{let n=KO(ZI(e,o),{min:-1/0,max:1/0});return[n.min,n.max]};return typeof t!="function"&&typeof e!="function"?[d(),b()]:o=>[d(o),b(o)]},threshold(c,l,t){return this.lockDirection=t.axis==="lock",ht.toVector(c,this.lockDirection?[.1,3]:0)},modifierKey(c){return c===void 0?"ctrlKey":c},pinchOnWheel(c=!0){return c}});var S_c=Fl(Fl({},Qs),{},{mouseOnly:(c=!0)=>c});var k_c=Fl(Fl({},Qs),{},{mouseOnly:(c=!0)=>c}),HI=new Map,Ts=new Map;function eC(c){HI.set(c.key,c.engine),Ts.set(c.key,c.resolver)}var dC={key:"drag",engine:tC,resolver:ric};var pI=u(E());function Wic(c,l){if(c==null)return{};var t={},e=Object.keys(c),d,b;for(b=0;b<e.length;b++)d=e[b],!(l.indexOf(d)>=0)&&(t[d]=c[d]);return t}function pic(c,l){if(c==null)return{};var t=Wic(c,l),e,d;if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(c);for(d=0;d<b.length;d++)e=b[d],!(l.indexOf(e)>=0)&&Object.prototype.propertyIsEnumerable.call(c,e)&&(t[e]=c[e])}return t}var Bic={target(c){if(c)return()=>"current"in c?c.current:c},enabled(c=!0){return c},window(c=$e.isBrowser?window:void 0){return c},eventOptions({passive:c=!0,capture:l=!1}={}){return{passive:c,capture:l}},transform(c){return c}},yic=["target","eventOptions","window","enabled","transform"];function RI(c={},l){let t={};for(let[e,d]of Object.entries(l))switch(typeof d){case"function":t[e]=d.call(t,c[e],e,c);break;case"object":t[e]=RI(c[e],d);break;case"boolean":d&&(t[e]=c[e]);break}return t}function Vic(c,l,t={}){let e=c,{target:d,eventOptions:b,window:o,enabled:n,transform:G}=e,X=pic(e,yic);if(t.shared=RI({target:d,eventOptions:b,window:o,enabled:n,transform:G},Bic),l){let i=Ts.get(l);t[l]=RI(Fl({shared:t.shared},X),i)}else for(let i in X){let a=Ts.get(i);a&&(t[i]=RI(Fl({shared:t.shared},X[i]),a))}return t}var II=class{constructor(l,t){ie(this,"_listeners",new Set),this._ctrl=l,this._gestureKey=t}add(l,t,e,d,b){let o=this._listeners,n=eQ(t,e),G=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},X=Fl(Fl({},G),b);l.addEventListener(n,d,X);let i=()=>{l.removeEventListener(n,d,X),o.delete(i)};return o.add(i),i}clean(){this._listeners.forEach(l=>l()),this._listeners.clear()}},bC=class{constructor(){ie(this,"_timeouts",new Map)}add(l,t,e=140,...d){this.remove(l),this._timeouts.set(l,window.setTimeout(t,e,...d))}remove(l){let t=this._timeouts.get(l);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach(l=>{window.clearTimeout(l)}),this._timeouts.clear()}},WI=class{constructor(l){ie(this,"gestures",new Set),ie(this,"_targetEventStore",new II(this)),ie(this,"gestureEventStores",{}),ie(this,"gestureTimeoutStores",{}),ie(this,"handlers",{}),ie(this,"config",{}),ie(this,"pointerIds",new Set),ie(this,"touchIds",new Set),ie(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),Cic(this,l)}setEventIds(l){if(Os(l))return this.touchIds=new Set(oQ(l)),this.touchIds;if("pointerId"in l)return l.type==="pointerup"||l.type==="pointercancel"?this.pointerIds.delete(l.pointerId):l.type==="pointerdown"&&this.pointerIds.add(l.pointerId),this.pointerIds}applyHandlers(l,t){this.handlers=l,this.nativeHandlers=t}applyConfig(l,t){this.config=Vic(l,t,this.config)}clean(){this._targetEventStore.clean();for(let l of this.gestures)this.gestureEventStores[l].clean(),this.gestureTimeoutStores[l].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...l){let t=this.config.shared,e={},d;if(!(t.target&&(d=t.target(),!d))){if(t.enabled){for(let o of this.gestures){let n=this.config[o],G=iQ(e,n.eventOptions,!!d);if(n.enabled){let X=HI.get(o);new X(this,l,o).bind(G)}}let b=iQ(e,t.eventOptions,!!d);for(let o in this.nativeHandlers)b(o,"",n=>this.nativeHandlers[o](Fl(Fl({},this.state.shared),{},{event:n,args:l})),void 0,!0)}for(let b in e)e[b]=nQ(...e[b]);if(!d)return e;for(let b in e){let{device:o,capture:n,passive:G}=tQ(b);this._targetEventStore.add(d,o,"",e[b],{capture:n,passive:G})}}}};function Ou(c,l){c.gestures.add(l),c.gestureEventStores[l]=new II(c,l),c.gestureTimeoutStores[l]=new bC}function Cic(c,l){l.drag&&Ou(c,"drag"),l.wheel&&Ou(c,"wheel"),l.scroll&&Ou(c,"scroll"),l.move&&Ou(c,"move"),l.pinch&&Ou(c,"pinch"),l.hover&&Ou(c,"hover")}var iQ=(c,l,t)=>(e,d,b,o={},n=!1)=>{var G,X;let i=(G=o.capture)!==null&&G!==void 0?G:l.capture,a=(X=o.passive)!==null&&X!==void 0?X:l.passive,m=n?e:lQ(e,d,i);t&&a&&(m+="Passive"),c[m]=c[m]||[],c[m].push(b)};function Jic(c,l={},t,e){let d=pI.default.useMemo(()=>new WI(c),[]);if(d.applyHandlers(c,e),d.applyConfig(l,t),pI.default.useEffect(d.effect.bind(d)),pI.default.useEffect(()=>d.clean.bind(d),[]),l.target===void 0)return d.bind.bind(d)}function BI(c,l){return eC(dC),Jic({drag:c},l||{},"drag")}var JI=u(Y(),1);var iG=u(Y(),1);function hic(c){let l="ns-resize";switch(c){case"n":case"s":l="ns-resize";break;case"e":case"w":l="ew-resize";break}return l}function aQ(c,l){let t=hic(l);return(0,iG.useEffect)(()=>{c?document.documentElement.style.cursor=t:document.documentElement.style.cursor=null},[c,t]),t}function uQ(c){let l=(0,iG.useRef)(c.value),[t,e]=(0,iG.useState)({}),d=t.value!==void 0?t.value:c.value;return(0,iG.useLayoutEffect)(()=>{let{current:n}=l;l.current=c.value,t.value!==void 0&&!t.isStale?e({...t,isStale:!0}):t.isStale&&c.value!==n&&e({})},[c.value,t]),{value:d,onBlur:n=>{e({}),c.onBlur?.(n)},onChange:(n,G)=>{e(X=>Object.assign(X,{value:n,isStale:!1})),c.onChange(n,G)}}}var tn=u(Y(),1);var mQ=c=>c,yI={error:null,initialValue:"",isDirty:!1,isDragEnabled:!1,isDragging:!1,isPressEnterToChange:!1,value:""};var oC="CHANGE",_X="COMMIT",nC="CONTROL",GC="DRAG_END",XC="DRAG_START",VI="DRAG",iC="INVALIDATE",qX="PRESS_DOWN",CI="PRESS_ENTER",aG="PRESS_UP",aC="RESET";function Yic(c=yI){let{value:l}=c;return{...yI,...c,initialValue:l}}function Fic(c){return(l,t)=>{let e={...l};switch(t.type){case nC:return e.value=t.payload.value,e.isDirty=!1,e._event=void 0,e;case aG:e.isDirty=!1;break;case qX:e.isDirty=!1;break;case XC:e.isDragging=!0;break;case GC:e.isDragging=!1;break;case oC:e.error=null,e.value=t.payload.value,l.isPressEnterToChange&&(e.isDirty=!0);break;case _X:e.value=t.payload.value,e.isDirty=!1;break;case aC:e.error=null,e.isDirty=!1,e.value=t.payload.value||l.initialValue;break;case iC:e.error=t.payload.error;break}return e._event=t.payload.event,c(e,t)}}function sQ(c=mQ,l=yI,t){let[e,d]=(0,tn.useReducer)(Fic(c),Yic(l)),b=W=>(I,B)=>{d({type:W,payload:{value:I,event:B}})},o=W=>I=>{d({type:W,payload:{event:I}})},n=W=>I=>{d({type:W,payload:I})},G=b(oC),X=(W,I)=>d({type:iC,payload:{error:W,event:I}}),i=b(aC),a=b(_X),m=n(XC),x=n(VI),s=n(GC),r=o(aG),g=o(qX),Z=o(CI),H=(0,tn.useRef)(e),R=(0,tn.useRef)({value:l.value,onChangeHandler:t});return(0,tn.useLayoutEffect)(()=>{H.current=e,R.current={value:l.value,onChangeHandler:t}}),(0,tn.useLayoutEffect)(()=>{H.current._event!==void 0&&e.value!==R.current.value&&!e.isDirty&&R.current.onChangeHandler(e.value??"",{event:H.current._event})},[e.value,e.isDirty]),(0,tn.useLayoutEffect)(()=>{l.value!==H.current.value&&!H.current.isDirty&&d({type:nC,payload:{value:l.value??""}})},[l.value]),{change:G,commit:a,dispatch:d,drag:x,dragEnd:s,dragStart:m,invalidate:X,pressDown:g,pressEnter:Z,pressUp:r,reset:i,state:e}}function Vd(c){return l=>{let{isComposing:t}="nativeEvent"in l?l.nativeEvent:l;t||l.keyCode===229||c(l)}}var rQ=u(V(),1),$X=()=>{};function vic({disabled:c=!1,dragDirection:l="n",dragThreshold:t=10,id:e,isDragEnabled:d=!1,isPressEnterToChange:b=!1,onBlur:o=$X,onChange:n=$X,onDrag:G=$X,onDragEnd:X=$X,onDragStart:i=$X,onKeyDown:a=$X,onValidate:m=$X,size:x="default",stateReducer:s=R=>R,value:r,type:g,...Z},H){let{state:R,change:W,commit:I,drag:B,dragEnd:p,dragStart:y,invalidate:h,pressDown:C,pressEnter:J,pressUp:f,reset:k}=sQ(s,{isDragEnabled:d,value:r,isPressEnterToChange:b},n),{value:F,isDragging:T,isDirty:L}=R,v=(0,JI.useRef)(!1),A=aQ(T,l),S=M=>{o(M),(L||!M.target.validity.valid)&&(v.current=!0,P(M))},U=M=>{let oc=M.target.value;W(oc,M)},P=M=>{let oc=M.currentTarget.value;try{m(oc),I(oc,M)}catch(Hc){h(Hc,M)}},bc=M=>{let{key:oc}=M;switch(a(M),oc){case"ArrowUp":f(M);break;case"ArrowDown":C(M);break;case"Enter":J(M),b&&(M.preventDefault(),P(M));break;case"Escape":b&&L&&(M.preventDefault(),k(r,M));break}},j=BI(M=>{let{distance:oc,dragging:Hc,event:Bc,target:wc}=M;if(M.event={...M.event,target:wc},!!oc){if(Bc.stopPropagation(),!Hc){X(M),p(M);return}G(M),B(M),T||(i(M),y(M))}},{axis:l==="e"||l==="w"?"x":"y",threshold:t,enabled:d,pointer:{capture:!1}}),ec=d?j():{};return(0,rQ.jsx)(db,{...Z,...ec,className:"components-input-control__input",disabled:c,dragCursor:A,isDragging:T,id:e,onBlur:S,onChange:U,onKeyDown:Vd(bc),ref:H,inputSize:x,value:F??"",type:g})}var Nic=(0,JI.forwardRef)(vic),gQ=Nic;var IQ=u(Y(),1);var hI=N("div",{target:"ej5x27r4"})("font-family:",fl("default.fontFamily"),";font-size:",fl("default.fontSize"),";",qe,";"),YI=N("div",{target:"ej5x27r3"})({name:"1chyuqs",styles:".components-panel__row &{margin-bottom:inherit;}"}),ZQ=O(ss,";display:block;margin-bottom:",z(2),";padding:0;",""),cd=N("label",{target:"ej5x27r2"})(ZQ,";"),bb=N("p",{target:"ej5x27r1"})("margin-top:",z(2),";margin-bottom:0;font-size:",fl("helpText.fontSize"),";font-style:normal;color:",D.gray[700],";"),HQ=N("span",{target:"ej5x27r0"})(ZQ,";");var co=u(V(),1);var RQ=u(dc(),1);function uC(c){let{help:l,id:t,...e}=c,d=(0,RQ.useInstanceId)(Dc,"wp-components-base-control",t);return{baseControlProps:{id:d,help:l,...e},controlProps:{id:d,...l?{"aria-describedby":`${d}__help`}:{}}}}var fic=c=>{let{id:l,label:t,hideLabelFromVision:e=!1,help:d,className:b,children:o}=cc(c,"BaseControl");return(0,co.jsxs)(hI,{className:b,children:[(0,co.jsxs)(YI,{className:"components-base-control__field",children:[t&&l&&(e?(0,co.jsx)(Qc,{as:"label",htmlFor:l,children:t}):(0,co.jsx)(cd,{className:"components-base-control__label",htmlFor:l,children:t})),t&&!l&&(e?(0,co.jsx)(Qc,{as:"label",children:t}):(0,co.jsx)(WQ,{children:t})),o]}),!!d&&(0,co.jsx)(bb,{id:l?l+"__help":void 0,className:"components-base-control__help",children:d})]})},Sic=(c,l)=>{let{className:t,children:e,...d}=c;return(0,co.jsx)(HQ,{ref:l,...d,className:Q("components-base-control__label",t),children:e})},WQ=(0,IQ.forwardRef)(Sic),mC=Object.assign(UX(fic,"BaseControl"),{VisualLabel:WQ}),Dc=mC;var pQ=u(ml(),1);function Lc({componentName:c,__next40pxDefaultSize:l,size:t,__shouldNotWarnDeprecated36pxSize:e}){e||l||t!==void 0&&t!=="default"||(0,pQ.default)(`36px default size for wp.components.${c}`,{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."})}var FI=u(V(),1),xC=()=>{};function kic(c){let t=`inspector-input-control-${(0,BQ.useInstanceId)(Ds)}`;return c||t}function zic(c,l){let{__next40pxDefaultSize:t,__shouldNotWarnDeprecated36pxSize:e,__unstableStateReducer:d=J=>J,__unstableInputWidth:b,className:o,disabled:n=!1,help:G,hideLabelFromVision:X=!1,id:i,isPressEnterToChange:a=!1,label:m,labelPosition:x="top",onChange:s=xC,onValidate:r=xC,onKeyDown:g=xC,prefix:Z,size:H="default",style:R,suffix:W,value:I,...B}=Et(c),p=kic(i),y=Q("components-input-control",o),h=uQ({value:I,onBlur:B.onBlur,onChange:s}),C=G?{"aria-describedby":`${p}__help`}:{};return Lc({componentName:"InputControl",__next40pxDefaultSize:t,size:H,__shouldNotWarnDeprecated36pxSize:e}),(0,FI.jsx)(Dc,{className:y,help:G,id:p,children:(0,FI.jsx)(Au,{__next40pxDefaultSize:t,__unstableInputWidth:b,disabled:n,gap:3,hideLabelFromVision:X,id:p,justify:"left",label:m,labelPosition:x,prefix:Z,size:H,style:R,suffix:W,children:(0,FI.jsx)(gQ,{...B,...C,__next40pxDefaultSize:t,className:"components-input-control__input",disabled:n,id:p,isPressEnterToChange:a,onKeyDown:g,onValidate:r,paddingInlineStart:Z?z(1):void 0,paddingInlineEnd:W?z(1):void 0,ref:l,size:H,stateReducer:d,...h})})})}var Ds=(0,yQ.forwardRef)(zic);Ds.displayName="InputControl";var lo=Ds;var CQ=u(ml(),1),JQ=u(Y(),1),hQ=u(dc(),1);var uG=u(Y(),1),sC=u(kc(),1);var VQ=u(V(),1);function Aic({icon:c,className:l,size:t=20,style:e={},...d}){let b=["dashicon","dashicons","dashicons-"+c,l].filter(Boolean).join(" "),n={...t!=20?{fontSize:`${t}px`,width:`${t}px`,height:`${t}px`}:{},...e};return(0,VQ.jsx)("span",{className:b,style:n,...d})}var Ls=Aic;var rC=u(V(),1);function Oic({icon:c=null,size:l=typeof c=="string"?20:24,...t}){if(typeof c=="string")return(0,rC.jsx)(Ls,{icon:c,size:l,...t});if((0,uG.isValidElement)(c)&&Ls===c.type)return(0,uG.cloneElement)(c,{...t});if(typeof c=="function")return(0,uG.createElement)(c,{size:l,...t});if(c&&(c.type==="svg"||c.type===sC.SVG)){let e={...c.props,width:l,height:l,...t};return(0,rC.jsx)(sC.SVG,{...e})}return(0,uG.isValidElement)(c)?(0,uG.cloneElement)(c,{size:l,width:l,height:l,...t}):c}var cl=Oic;var Mt=u(V(),1),Qic=["onMouseDown","onClick"];function wic({__experimentalIsFocusable:c,isDefault:l,isPrimary:t,isSecondary:e,isTertiary:d,isLink:b,isPressed:o,isSmall:n,size:G,variant:X,describedBy:i,...a}){let m=G,x=X,s={accessibleWhenDisabled:c,"aria-pressed":o,description:i};return n&&(m??="small"),t&&(x??="primary"),d&&(x??="tertiary"),e&&(x??="secondary"),l&&((0,CQ.default)("wp.components.Button `isDefault` prop",{since:"5.4",alternative:'variant="secondary"'}),x??="secondary"),b&&(x??="link"),{...s,...a,size:m,variant:x}}function Tic(c,l){let{__next40pxDefaultSize:t,accessibleWhenDisabled:e,isBusy:d,isDestructive:b,className:o,disabled:n,icon:G,iconPosition:X="left",iconSize:i,showTooltip:a,tooltipPosition:m,shortcut:x,label:s,children:r,size:g="default",text:Z,variant:H,description:R,...W}=wic(c),{href:I,target:B,"aria-checked":p,"aria-pressed":y,"aria-selected":h,...C}="href"in W?W:{href:void 0,target:void 0,...W},J=(0,hQ.useInstanceId)(ci,"components-button__description"),f=typeof r=="string"&&!!r||Array.isArray(r)&&r?.[0]&&r[0]!==null&&r?.[0]?.props?.className!=="components-tooltip",F=Q("components-button",o,{"is-next-40px-default-size":t,"is-secondary":H==="secondary","is-primary":H==="primary","is-small":g==="small","is-compact":g==="compact","is-tertiary":H==="tertiary","is-pressed":[!0,"true","mixed"].includes(y),"is-pressed-mixed":y==="mixed","is-busy":d,"is-link":H==="link","is-destructive":b,"has-text":!!G&&(f||Z),"has-icon":!!G,"has-icon-right":X==="right"}),T=n&&!e,L=I!==void 0&&!n?"a":"button",v=L==="button"?{type:"button",disabled:T,"aria-checked":p,"aria-pressed":y,"aria-selected":h}:{},A=L==="a"?{href:I,target:B}:{},S={};if(n&&e){v["aria-disabled"]=!0,A["aria-disabled"]=!0;for(let Hc of Qic)S[Hc]=Bc=>{Bc&&(Bc.stopPropagation(),Bc.preventDefault())}}let U=!T&&(a&&!!s||!!x||!!s&&!r?.length&&a!==!1),P=R?J:void 0,bc=C["aria-describedby"]||P,j={className:F,"aria-label":C["aria-label"]||s,"aria-describedby":bc,ref:l},ec=(0,Mt.jsxs)(Mt.Fragment,{children:[G&&X==="left"&&(0,Mt.jsx)(cl,{icon:G,size:i}),Z&&(0,Mt.jsx)(Mt.Fragment,{children:Z}),r,G&&X==="right"&&(0,Mt.jsx)(cl,{icon:G,size:i})]}),M=L==="a"?(0,Mt.jsx)("a",{...A,...C,...S,...j,children:ec}):(0,Mt.jsx)("button",{...v,...C,...S,...j,children:ec}),oc=U?{text:r?.length&&R?R:s,shortcut:x,placement:m&&oG(m)}:{};return(0,Mt.jsxs)(Mt.Fragment,{children:[(0,Mt.jsx)(Ne,{...oc,children:M}),R&&(0,Mt.jsx)(Qc,{children:(0,Mt.jsx)("span",{id:P,children:R})})]})}var ci=(0,JQ.forwardRef)(Tic);ci.displayName="Button";var lc=ci;var Dic={name:"euqsgg",styles:"input[type='number']::-webkit-outer-spin-button,input[type='number']::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}input[type='number']{-moz-appearance:textfield;}"},Lic=({hideHTMLArrows:c})=>c?Dic:"",YQ=N(lo,{target:"ep09it41"})(Lic,";"),gC=N(lc,{target:"ep09it40"})("&&&&&{color:",D.theme.accent,";}"),Uic=O("width:",z(5),";min-width:",z(5),";height:",z(5),";",""),FQ={smallSpinButtons:Uic};function li(c){let l=Number(c);return isNaN(l)?0:l}function ZC(...c){return c.reduce((l,t)=>l+li(t),0)}function NQ(...c){return c.reduce((l,t,e)=>{let d=li(t);return e===0?d:l-d},0)}function vQ(c){let l=(c+"").split(".");return l[1]!==void 0?l[1].length:0}function Qu(c,l,t){let e=li(c);return Math.max(l,Math.min(e,t))}function fQ(c,l,t){let e=li(c),d=li(l),b=li(t),o=Math.max(vQ(t),vQ(l)),n=d%b?d:0,X=Math.round((e-n)/b)*b+n;return o?li(X.toFixed(o)):X}var jic={bottom:{align:"flex-end",justify:"center"},bottomLeft:{align:"flex-end",justify:"flex-start"},bottomRight:{align:"flex-end",justify:"flex-end"},center:{align:"center",justify:"center"},edge:{align:"center",justify:"space-between"},left:{align:"center",justify:"flex-start"},right:{align:"center",justify:"flex-end"},stretch:{align:"stretch"},top:{align:"flex-start",justify:"center"},topLeft:{align:"flex-start",justify:"flex-start"},topRight:{align:"flex-start",justify:"flex-end"}},Eic={bottom:{justify:"flex-end",align:"center"},bottomLeft:{justify:"flex-end",align:"flex-start"},bottomRight:{justify:"flex-end",align:"flex-end"},center:{justify:"center",align:"center"},edge:{justify:"space-between",align:"center"},left:{justify:"center",align:"flex-start"},right:{justify:"center",align:"flex-end"},stretch:{align:"stretch"},top:{justify:"flex-start",align:"center"},topLeft:{justify:"flex-start",align:"flex-start"},topRight:{justify:"flex-start",align:"flex-end"}};function SQ(c,l="row"){if(!Dt(c))return{};let e=l==="column"?Eic:jic;return c in e?e[c]:{align:c}}var vI=u(Y(),1);function NI(c){return typeof c=="string"?[c]:vI.Children.toArray(c).filter(l=>(0,vI.isValidElement)(l))}var kQ=u(V(),1);function Us(c){let{alignment:l="edge",children:t,direction:e,spacing:d=2,...b}=cc(c,"HStack"),o=SQ(l,e),X={children:NI(t).map((m,x)=>{if(Zs(m,["Spacer"])){let r=m,g=r.key||`hstack-${x}`;return(0,kQ.jsx)(Ut,{isBlock:!0,...r.props},g)}return m}),direction:e,justify:"center",...o,...b,gap:d},{isColumn:i,...a}=Su(X);return a}var zQ=u(V(),1);function Mic(c,l){let t=Us(c);return(0,zQ.jsx)(ic,{...t,ref:l})}var Pic=tc(Mic,"HStack"),Uc=Pic;var to=u(V(),1),Kic=()=>{};function _ic(c,l){let{__unstableStateReducer:t,className:e,dragDirection:d="n",hideHTMLArrows:b=!1,spinControls:o=b?"none":"native",isDragEnabled:n=!0,isShiftStepEnabled:G=!0,label:X,max:i=1/0,min:a=-1/0,required:m=!1,shiftStep:x=10,step:s=1,spinFactor:r=1,type:g="number",value:Z,size:H="default",suffix:R,onChange:W=Kic,__shouldNotWarnDeprecated36pxSize:I,...B}=Et(c);Lc({componentName:"NumberControl",size:H,__next40pxDefaultSize:B.__next40pxDefaultSize,__shouldNotWarnDeprecated36pxSize:I}),b&&(0,OQ.default)("wp.components.NumberControl hideHTMLArrows prop ",{alternative:'spinControls="none"',since:"6.2",version:"6.3"});let p=(0,fI.useRef)(null),y=(0,AQ.useMergeRefs)([p,l]),h=s==="any",C=h?1:ls(s),J=ls(r)*C,f=(P,bc)=>(h||(P=fQ(P,a,bc??C)),`${Qu(P,a,i)}`),k=f(0),F=g==="number"?"off":void 0,T=Q("components-number-control",e),v=Xc()(H==="small"&&FQ.smallSpinButtons),A=(P,bc,j)=>{j?.preventDefault();let ec=j?.shiftKey&&G,M=ec?ls(x)*J:J,oc=$k(P)?k:P;return bc==="up"?oc=ZC(oc,M):bc==="down"&&(oc=NQ(oc,M)),f(oc,ec?M:void 0)},S=(P,bc)=>{let j={...P},{type:ec,payload:M}=bc,oc=M.event,Hc=j.value;if((ec===aG||ec===qX)&&(j.value=A(Hc,ec===aG?"up":"down",oc)),ec===VI&&n){let[Bc,wc]=M.delta,Wl=M.shiftKey&&G,sl=Wl?ls(x)*J:J,tl,gc;switch(d){case"n":gc=wc,tl=-1;break;case"e":gc=Bc,tl=(0,wu.isRTL)()?-1:1;break;case"s":gc=wc,tl=1;break;case"w":gc=Bc,tl=(0,wu.isRTL)()?1:-1;break}if(gc!==0){gc=Math.ceil(Math.abs(gc))*Math.sign(gc);let Zl=gc*sl*tl;j.value=f(ZC(Hc,Zl),Wl?sl:void 0)}}if(ec===CI||ec===_X){let Bc=m===!1&&Hc==="";j.value=Bc?Hc:f(Hc)}return j},U=P=>bc=>W(String(A(Z,P,bc)),{event:{...bc,target:p.current}});return(0,to.jsx)(YQ,{autoComplete:F,inputMode:"numeric",...B,className:T,dragDirection:d,hideHTMLArrows:o!=="native",isDragEnabled:n,label:X,max:i===1/0?void 0:i,min:a===-1/0?void 0:a,ref:y,required:m,step:s,type:g,value:Z,__unstableStateReducer:(P,bc)=>{let j=S(P,bc);return t?.(j,bc)??j},size:H,__shouldNotWarnDeprecated36pxSize:!0,suffix:o==="custom"?(0,to.jsxs)(to.Fragment,{children:[R,(0,to.jsx)(rt,{marginBottom:0,marginRight:2,children:(0,to.jsxs)(Uc,{spacing:1,children:[(0,to.jsx)(gC,{className:v,icon:$o,size:"small",label:(0,wu.__)("Increment"),onClick:U("up")}),(0,to.jsx)(gC,{className:v,icon:Ys,size:"small",label:(0,wu.__)("Decrement"),onClick:U("down")})]})})]}):R,onChange:W})}var QQ=(0,fI.forwardRef)(_ic);QQ.displayName="NumberControl";var Yt=QQ;var wQ=u(V(),1);function qic(c,l){let t=cc(c,"InputControlPrefixWrapper");return(0,wQ.jsx)(rI,{...t,isPrefix:!0,ref:l})}var HC=tc(qic,"InputControlPrefixWrapper"),mG=HC;var TQ=u(V(),1);function $ic(c,l){let t=cc(c,"InputControlSuffixWrapper");return(0,TQ.jsx)(rI,{...t,ref:l})}var RC=tc($ic,"InputControlSuffixWrapper"),Tu=RC;var Du=u(Y(),1),DQ=u(dc(),1),SI=u(V(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='f35cc94692']")){let c=document.createElement("style");c.setAttribute("data-wp-hash","f35cc94692"),c.appendChild(document.createTextNode("._8f57b8d483c51fbe__circle-root{border:1px solid var(--wp-components-color-gray-600,#949494);border-radius:50%;box-sizing:border-box;cursor:grab;height:32px;overflow:hidden;width:32px}._8f57b8d483c51fbe__circle-root:active{cursor:grabbing}.b1bae984ac10fcc3__circle-indicator-wrapper{box-sizing:border-box;height:100%;position:relative;width:100%}.b1bae984ac10fcc3__circle-indicator-wrapper:focus-visible{outline:none}._6d2fe0a2cbb31bf0__circle-indicator{background:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));border-radius:50%;box-sizing:border-box;display:block;height:6px;left:50%;position:absolute;top:4px;transform:translateX(-50%);width:6px}")),document.head.appendChild(c)}var IC={"circle-root":"_8f57b8d483c51fbe__circle-root","circle-indicator-wrapper":"b1bae984ac10fcc3__circle-indicator-wrapper","circle-indicator":"_6d2fe0a2cbb31bf0__circle-indicator"};function cac({value:c,onChange:l,className:t,...e}){let d=(0,Du.useRef)(null),b=(0,Du.useRef)(void 0),o=(0,Du.useRef)(void 0),n=()=>{if(d.current===null)return;let a=d.current.getBoundingClientRect();b.current={x:a.x+a.width/2,y:a.y+a.height/2}},G=a=>{if(a!==void 0&&(a.preventDefault(),a.target?.focus(),b.current!==void 0&&l!==void 0)){let{x:m,y:x}=b.current;l(lac(m,x,a.clientX,a.clientY))}},{startDrag:X,isDragging:i}=(0,DQ.__experimentalUseDragging)({onDragStart:a=>{n(),G(a)},onDragMove:G,onDragEnd:G});return(0,Du.useEffect)(()=>{i?(o.current===void 0&&(o.current=document.body.style.cursor),document.body.style.cursor="grabbing"):(document.body.style.cursor=o.current||"",o.current=void 0)},[i]),(0,SI.jsx)("div",{ref:d,onMouseDown:X,className:Q("components-angle-picker-control__angle-circle",IC["circle-root"],t),...e,children:(0,SI.jsx)("div",{style:c?{transform:`rotate(${c}deg)`}:void 0,className:Q("components-angle-picker-control__angle-circle-indicator-wrapper",IC["circle-indicator-wrapper"]),tabIndex:-1,children:(0,SI.jsx)("div",{className:Q("components-angle-picker-control__angle-circle-indicator",IC["circle-indicator"])})})})}function lac(c,l,t,e){let d=e-l,b=t-c,o=Math.atan2(d,b),n=Math.round(o*(180/Math.PI))+90;return n<0?360+n:n}var LQ=cac;var en=u(V(),1);function tac(c,l){let{className:t,label:e=(0,kI.__)("Angle"),onChange:d,value:b,...o}=c,n=i=>{if(d===void 0)return;let a=i!==void 0&&i!==""?parseInt(i,10):0;d(a)},G=Q("components-angle-picker-control",t),X=(0,kI.isRTL)()?{prefix:(0,en.jsx)(mG,{children:"\xB0"})}:{suffix:(0,en.jsx)(Tu,{children:"\xB0"})};return(0,en.jsxs)(Il,{...o,ref:l,className:G,gap:2,children:[(0,en.jsx)(Xe,{children:(0,en.jsx)(Yt,{__next40pxDefaultSize:!0,label:e,className:"components-angle-picker-control__input-field",max:360,min:0,onChange:n,step:"1",value:b,spinControls:"none",...X})}),(0,en.jsx)(rt,{marginBottom:"1",marginTop:"auto",children:(0,en.jsx)(LQ,{"aria-hidden":"true",value:b,onChange:d})})]})}var jQ=(0,UQ.forwardRef)(tac);jQ.displayName="AnglePickerControl";var zI=jQ;var Dw=u(js(),1),vt=u(Y(),1),Ku=u(dc(),1),ld=u(WC(),1),fC=u(eo(),1),SC=u(OI(),1);var Aw=u(ua(),1),gG=u(Y(),1),Ow=u(WC(),1),Pu=u(dc(),1),Qw=u(eo(),1),rG=u(nc(),1);var cw=u(js(),1),lw=u(dc(),1),wI=u(Y(),1);var $Q=u(js(),1);var nac=new RegExp(/[\u007e\u00ad\u2053\u207b\u208b\u2212\p{Pd}]/gu),Es=c=>(0,$Q.default)(c).normalize("NFKC").toLocaleLowerCase().replace(nac,"-");function QI(c){let l=c?.toString?.()??"";return l=l.replace(/['\u2019]/,""),JR(l,{splitRegexp:[/(?!(?:1ST|2ND|3RD|[4-9]TH)(?![a-z]))([a-z0-9])([A-Z])/g,/(?!(?:1st|2nd|3rd|[4-9]th)(?![a-z]))([0-9])([a-z])/g,/([A-Za-z])([0-9])/g,/([A-Z])([A-Z][a-z])/g]})}function dn(c){return c.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")}function Gac(c,l=[],t=10){let e=[];for(let d=0;d<l.length;d++){let b=l[d],{keywords:o=[]}=b;if(typeof b.label=="string"&&(o=[...o,b.label]),!!o.some(G=>c.test((0,cw.default)(G)))&&(e.push(b),e.length===t))break}return e}function tw(c){return l=>{let[t,e]=(0,wI.useState)([]);return(0,wI.useLayoutEffect)(()=>{let{options:d,isDebounced:b}=c,o=(0,lw.debounce)(()=>{let G=Promise.resolve(typeof d=="function"?d(l):d).then(X=>{if(G.canceled)return;let i=X.map((m,x)=>({key:`${c.name}-${x}`,value:m,label:c.getOptionLabel(m),keywords:c.getOptionKeywords?c.getOptionKeywords(m):[],isDisabled:c.isOptionDisabled?c.isOptionDisabled(m):!1})),a=new RegExp("(?:\\b|\\s|^)"+dn(l),"i");e(Gac(a,i))});return G},b?250:0),n=o();return()=>{o.cancel(),n&&(n.canceled=!0)}},[l]),[t]}}var Kl=u(E(),1),LI=u(E(),1),bw=u(ua(),1),ow=c=>{function l(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:c,fn(t){let{element:e,padding:d}=typeof c=="function"?c(t):c;return e&&l(e)?e.current!=null?ix({element:e.current,padding:d}).fn(t):{}:e?ix({element:e,padding:d}).fn(t):{}}}},TI=typeof document<"u"?LI.useLayoutEffect:LI.useEffect;function DI(c,l){if(c===l)return!0;if(typeof c!=typeof l)return!1;if(typeof c=="function"&&c.toString()===l.toString())return!0;let t,e,d;if(c&&l&&typeof c=="object"){if(Array.isArray(c)){if(t=c.length,t!==l.length)return!1;for(e=t;e--!==0;)if(!DI(c[e],l[e]))return!1;return!0}if(d=Object.keys(c),t=d.length,t!==Object.keys(l).length)return!1;for(e=t;e--!==0;)if(!{}.hasOwnProperty.call(l,d[e]))return!1;for(e=t;e--!==0;){let b=d[e];if(!(b==="_owner"&&c.$$typeof)&&!DI(c[b],l[b]))return!1}return!0}return c!==c&&l!==l}function nw(c){return typeof window>"u"?1:(c.ownerDocument.defaultView||window).devicePixelRatio||1}function ew(c,l){let t=nw(c);return Math.round(l*t)/t}function dw(c){let l=Kl.useRef(c);return TI(()=>{l.current=c}),l}function Gw(c){c===void 0&&(c={});let{placement:l="bottom",strategy:t="absolute",middleware:e=[],platform:d,elements:{reference:b,floating:o}={},transform:n=!0,whileElementsMounted:G,open:X}=c,[i,a]=Kl.useState({x:0,y:0,strategy:t,placement:l,middlewareData:{},isPositioned:!1}),[m,x]=Kl.useState(e);DI(m,e)||x(e);let[s,r]=Kl.useState(null),[g,Z]=Kl.useState(null),H=Kl.useCallback(v=>{v!==B.current&&(B.current=v,r(v))},[]),R=Kl.useCallback(v=>{v!==p.current&&(p.current=v,Z(v))},[]),W=b||s,I=o||g,B=Kl.useRef(null),p=Kl.useRef(null),y=Kl.useRef(i),h=G!=null,C=dw(G),J=dw(d),f=Kl.useCallback(()=>{if(!B.current||!p.current)return;let v={placement:l,strategy:t,middleware:m};J.current&&(v.platform=J.current),ux(B.current,p.current,v).then(A=>{let S={...A,isPositioned:!0};k.current&&!DI(y.current,S)&&(y.current=S,bw.flushSync(()=>{a(S)}))})},[m,l,t,J]);TI(()=>{X===!1&&y.current.isPositioned&&(y.current.isPositioned=!1,a(v=>({...v,isPositioned:!1})))},[X]);let k=Kl.useRef(!1);TI(()=>(k.current=!0,()=>{k.current=!1}),[]),TI(()=>{if(W&&(B.current=W),I&&(p.current=I),W&&I){if(C.current)return C.current(W,I,f);f()}},[W,I,f,C,h]);let F=Kl.useMemo(()=>({reference:B,floating:p,setReference:H,setFloating:R}),[H,R]),T=Kl.useMemo(()=>({reference:W,floating:I}),[W,I]),L=Kl.useMemo(()=>{let v={position:t,left:0,top:0};if(!T.floating)return v;let A=ew(T.floating,i.x),S=ew(T.floating,i.y);return n?{...v,transform:"translate("+A+"px, "+S+"px)",...nw(T.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:A,top:S}},[t,n,T.floating,i.x,i.y]);return Kl.useMemo(()=>({...i,update:f,refs:F,elements:T,floatingStyles:L}),[i,f,F,T,L])}var gt=u(Y(),1),xG=u(dc(),1);var Mu=u(ml(),1),Ks=u(kc(),1),Sw=u(nc(),1);var aw=u(Y(),1),Xw=0;function iw(c){let l=document.scrollingElement||document.body;c&&(Xw=l.scrollTop);let t=c?"add":"remove";l.classList[t]("lockscroll"),document.documentElement.classList[t]("lockscroll"),c||(l.scrollTop=Xw)}var UI=0;function Xac(){return(0,aw.useEffect)(()=>(UI===0&&iw(!0),++UI,()=>{UI===1&&iw(!1),--UI}),[]),null}var jI=Xac;var Ps=u(Y(),1);var gw=u(dc(),1),ob=u(Y(),1);var pC=u(dc(),1),uw=u(Y(),1),_qc=u(Ge(),1),iac={slots:(0,pC.observableMap)(),fills:(0,pC.observableMap)(),registerSlot:()=>{},unregisterSlot:()=>{},updateSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},updateFill:()=>{},isDefault:!0},mw=(0,uw.createContext)(iac);mw.displayName="SlotFillContext";var Se=mw;var EI,aac=new Uint8Array(16);function BC(){if(!EI&&(EI=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!EI))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return EI(aac)}var Ft=[];for(let c=0;c<256;++c)Ft.push((c+256).toString(16).slice(1));function xw(c,l=0){return Ft[c[l+0]]+Ft[c[l+1]]+Ft[c[l+2]]+Ft[c[l+3]]+"-"+Ft[c[l+4]]+Ft[c[l+5]]+"-"+Ft[c[l+6]]+Ft[c[l+7]]+"-"+Ft[c[l+8]]+Ft[c[l+9]]+"-"+Ft[c[l+10]]+Ft[c[l+11]]+Ft[c[l+12]]+Ft[c[l+13]]+Ft[c[l+14]]+Ft[c[l+15]]}var uac=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),yC={randomUUID:uac};function mac(c,l,t){if(yC.randomUUID&&!l&&!c)return yC.randomUUID();c=c||{};let e=c.random||(c.rng||BC)();if(e[6]=e[6]&15|64,e[8]=e[8]&63|128,l){t=t||0;for(let d=0;d<16;++d)l[t+d]=e[d];return l}return xw(e)}var Lu=mac;var rw=u(V(),1),sw=new Set,VC=new WeakMap,sac=c=>{if(VC.has(c))return VC.get(c);let l=Lu().replace(/[0-9]/g,"");for(;sw.has(l);)l=Lu().replace(/[0-9]/g,"");sw.add(l);let t=hu({container:c,key:l});return VC.set(c,t),t};function CC(c){let{children:l,document:t}=c;if(!t)return null;let e=sac(t.head);return(0,rw.jsx)(wV,{value:e,children:l})}var Uu=CC;var Zw=u(V(),1);function ju({name:c,children:l}){let t=(0,ob.useContext)(Se),e=(0,ob.useRef)({}),d=(0,ob.useRef)(l);(0,ob.useLayoutEffect)(()=>{d.current=l},[l]),(0,ob.useLayoutEffect)(()=>{let G=e.current;return t.registerFill(c,{instance:G,children:d.current}),()=>t.unregisterFill(c,G)},[t,c]),(0,ob.useLayoutEffect)(()=>{t.updateFill(c,{instance:e.current,children:d.current})});let b=(0,gw.useObservableValue)(t.slots,c);if(!b||b.type==="children")return null;let o=b.ref.current;if(!o)return null;let n=typeof l=="function"?l(b.fillProps??{}):l;return(0,ob.createPortal)((0,Zw.jsx)(Uu,{document:o.ownerDocument,children:n}),o)}var JC=u(dc(),1),Cd=u(Y(),1);var MI=u(V(),1);function Hw(c){return typeof c=="function"}function rac(c){return Cd.Children.map(c,(l,t)=>{if(!l||typeof l=="string")return l;let e=t;return typeof l=="object"&&"key"in l&&l?.key&&(e=l.key),(0,Cd.cloneElement)(l,{key:e})})}function gac(c){let{name:l,children:t,fillProps:e={}}=c,d=(0,Cd.useContext)(Se),b=(0,Cd.useRef)({});(0,Cd.useLayoutEffect)(()=>{let X=b.current;return d.registerSlot(l,{type:"children",instance:X}),()=>d.unregisterSlot(l,X)},[d,l]);let o=(0,JC.useObservableValue)(d.fills,l)??[],n=(0,JC.useObservableValue)(d.slots,l);(!n||n.instance!==b.current)&&(o=[]);let G=o.map(X=>{let i=Hw(X.children)?X.children(e):X.children;return rac(i)}).filter(X=>!(0,Cd.isEmptyElement)(X));return(0,MI.jsx)(MI.Fragment,{children:Hw(t)?t(G):G})}var Rw=gac;var Jd=u(Y(),1),Iw=u(dc(),1);var Ww=u(V(),1);function Zac(c,l){let{name:t,fillProps:e={},as:d,children:b,...o}=c,n=(0,Jd.useContext)(Se),G=(0,Jd.useRef)({}),X=(0,Jd.useRef)(null),i=(0,Jd.useRef)(e);return(0,Jd.useLayoutEffect)(()=>{i.current=e},[e]),(0,Jd.useLayoutEffect)(()=>{let a=G.current;return n.registerSlot(t,{type:"portal",instance:a,ref:X,fillProps:i.current}),()=>n.unregisterSlot(t,a)},[n,t]),(0,Jd.useLayoutEffect)(()=>{n.updateSlot(t,{type:"portal",instance:G.current,ref:X,fillProps:i.current})}),(0,Ww.jsx)(ic,{as:d,ref:(0,Iw.useMergeRefs)([l,X]),...o})}var pw=(0,Jd.forwardRef)(Zac);var hC=u(dc(),1),yw=u(Y(),1),Vw=u(PI(),1);var Cw=u(V(),1);function Hac(){let c=(0,hC.observableMap)(),l=(0,hC.observableMap)();function t(G,X){c.set(G,X)}function e(G,X){let i=c.get(G);!i||i.instance!==X||c.delete(G)}function d(G,X){if(X.type!=="portal")return;let i=c.get(G);i&&i.type==="portal"&&i.instance===X.instance&&((0,Vw.isShallowEqual)(i.fillProps,X.fillProps)||c.set(G,X))}function b(G,X){l.set(G,[...l.get(G)||[],X])}function o(G,X){let i=l.get(G);i&&l.set(G,i.filter(a=>a.instance!==X))}function n(G,X){let i=l.get(G);if(!i)return;let a=i.find(m=>m.instance===X.instance);a&&a.children!==X.children&&l.set(G,i.map(m=>m.instance===X.instance?X:m))}return{slots:c,fills:l,registerSlot:t,unregisterSlot:e,updateSlot:d,registerFill:b,unregisterFill:o,updateFill:n}}function Rac({children:c}){let[l]=(0,yw.useState)(Hac);return(0,Cw.jsx)(Se.Provider,{value:l,children:c})}var Jw=Rac;var bn=u(V(),1);var hw=u(Y(),1),Yw=u(dc(),1);function Ms(c){let l=(0,hw.useContext)(Se),t=(0,Yw.useObservableValue)(l.slots,c),e;return t&&t.type==="portal"&&(e=t.ref),{ref:e}}var ti=u(Y(),1);function Iac(c,l,t){let e=(0,ti.useMemo)(()=>b=>c.subscribe(l,b),[c,l]),d=()=>t(c.get(l));return(0,ti.useSyncExternalStore)(e,d,d)}function Wac(c){return c?.length}function YC(c){let l=(0,ti.useContext)(Se),t=Iac(l.fills,c,Wac);return(0,ti.useMemo)(()=>t!==void 0?Array.from({length:t}):void 0,[t])}var Eu=(0,Ps.forwardRef)((c,l)=>{let{bubblesVirtually:t,...e}=c;return t?(0,bn.jsx)(pw,{...e,ref:l}):(0,bn.jsx)(Rw,{...e})});Eu.displayName="Slot";function FC({children:c,passthrough:l=!1}){return!(0,Ps.useContext)(Se).isDefault&&l?(0,bn.jsx)(bn.Fragment,{children:c}):(0,bn.jsx)(Jw,{children:c})}FC.displayName="SlotFillProvider";function Fw(c){let l=typeof c=="symbol"?c.description:c,t=d=>(0,bn.jsx)(ju,{name:c,...d});t.displayName=`${l}Fill`;let e=(0,Ps.forwardRef)((d,b)=>(0,bn.jsx)(Eu,{name:c,ref:b,...d}));return e.displayName=`${l}Slot`,e.__unstableName=c,{name:c,Fill:t,Slot:e}}function vw(){return[{name:"overlay",fn({rects:c}){return c.reference}},IX({apply({rects:c,elements:l}){let{firstElementChild:t}=l.floating??{};t instanceof HTMLElement&&Object.assign(t.style,{width:`${c.reference.width}px`,height:`${c.reference.height}px`})}})]}var Nw=u(Y(),1),KI=(0,Nw.createContext)(void 0);KI.displayName="__unstableSlotNameContext";var _l=u(V(),1),kw="Popover",pac=8,Bac=()=>(0,_l.jsxs)(Ks.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",className:"components-popover__triangle",role:"presentation",children:[(0,_l.jsx)(Ks.Path,{className:"components-popover__triangle-bg",d:"M 0 0 L 50 50 L 100 0"}),(0,_l.jsx)(Ks.Path,{className:"components-popover__triangle-border",d:"M 0 0 L 50 50 L 100 0",vectorEffect:"non-scaling-stroke"})]}),fw="components-popover__fallback-container",yac=()=>{let c=document.body.querySelector("."+fw);return c||(c=document.createElement("div"),c.className=fw,document.body.append(c)),c},Vac=(c,l)=>{let{animate:t=!0,headerTitle:e,constrainTabbing:d,onClose:b,children:o,className:n,noArrow:G=!0,position:X,placement:i="bottom-start",offset:a=0,focusOnMount:m="firstElement",anchor:x,expandOnMobile:s,onFocusOutside:r,__unstableSlotName:g=kw,flip:Z=!0,resize:H=!0,shift:R=!1,inline:W=!1,variant:I,style:B,__unstableForcePosition:p,anchorRef:y,anchorRect:h,getAnchorRect:C,isAlternate:J,...f}=cc(c,"Popover"),k=Z,F=H;p!==void 0&&((0,Mu.default)("`__unstableForcePosition` prop in wp.components.Popover",{since:"6.1",version:"6.3",alternative:"`flip={ false }` and  `resize={ false }`"}),k=!p,F=!p),y!==void 0&&(0,Mu.default)("`anchorRef` prop in wp.components.Popover",{since:"6.1",alternative:"`anchor` prop"}),h!==void 0&&(0,Mu.default)("`anchorRect` prop in wp.components.Popover",{since:"6.1",alternative:"`anchor` prop"}),C!==void 0&&(0,Mu.default)("`getAnchorRect` prop in wp.components.Popover",{since:"6.1",alternative:"`anchor` prop"});let T=J?"toolbar":I;J!==void 0&&(0,Mu.default)("`isAlternate` prop in wp.components.Popover",{since:"6.2",alternative:"`variant` prop with the `'toolbar'` value"});let L=(0,gt.useRef)(null),[v,A]=(0,gt.useState)(null),S=(0,gt.useCallback)(dt=>{A(dt)},[]),U=(0,xG.useViewportMatch)("medium","<"),P=s&&U,bc=!P&&!G,j=X?oG(X):i,ec=[...i==="overlay"?vw():[],nx(a),k&&Xx(),F&&IX({padding:pac,apply(dt){let{firstElementChild:St}=tl.floating.current??{};St instanceof HTMLElement&&Object.assign(St.style,{maxHeight:`${Math.max(0,dt.availableHeight)}px`,overflow:"auto"})}}),R&&Gx({crossAxis:!0,limiter:ax(),padding:1}),ow({element:L})],M=(0,gt.useContext)(KI)||g,oc=Ms(M),Hc;(b||r)&&(Hc=(dt,St)=>{if(dt==="focus-outside"){let id=St?.target,Vc=tl.reference.current,nl=tl.floating.current,el=Vc&&"contains"in Vc&&Vc.contains(id)||nl?.contains(id),kt=nl?.ownerDocument;if(!el&&!("relatedTarget"in St&&St.relatedTarget)&&kt?.activeElement===kt?.body)return;r?r(St):b&&b()}else b&&b()});let[Bc,wc]=(0,xG.__experimentalUseDialog)({constrainTabbing:d,focusOnMount:m,__unstableOnClose:Hc,onClose:Hc}),{x:Wl,y:sl,refs:tl,strategy:gc,update:Zl,placement:zl,middlewareData:{arrow:uc}}=Gw({placement:j==="overlay"?void 0:j,middleware:ec,whileElementsMounted:(dt,St,id)=>ox(dt,St,id,{layoutShift:!1,animationFrame:!0})}),vc=(0,gt.useCallback)(dt=>{L.current=dt,Zl()},[Zl]),hl=y?.top,Yc=y?.bottom,Al=y?.startContainer,it=y?.current;(0,gt.useLayoutEffect)(()=>{let dt=gA({anchor:x,anchorRef:y,anchorRect:h,getAnchorRect:C,fallbackReferenceElement:v});tl.setReference(dt)},[x,y,hl,Yc,Al,it,h,C,v,tl]);let Re=(0,xG.useMergeRefs)([tl.setFloating,Bc,l]),Kt=P?void 0:{position:gc,top:0,left:0,x:PV(Wl),y:PV(sl)},Qe=(0,xG.useReducedMotion)(),Yo=t&&!P&&!Qe,[MG,PG]=(0,gt.useState)(!1),{style:KG,..._G}=(0,gt.useMemo)(()=>rA(zl),[zl]),vn=Yo?{style:{...B,...KG,...Kt},onAnimationComplete:()=>PG(!0),..._G}:{animate:!1,style:{...B,...Kt}},at=(!Yo||MG)&&Wl!==null&&sl!==null,Ol=(0,_l.jsxs)(tG.div,{className:Q(n,{"is-expanded":P,"is-positioned":at,[`is-${T==="toolbar"?"alternate":T}`]:T}),...vn,...f,ref:Re,...wc,tabIndex:-1,children:[P&&(0,_l.jsx)(jI,{}),P&&(0,_l.jsxs)("div",{className:"components-popover__header",children:[(0,_l.jsx)("span",{className:"components-popover__header-title",children:e}),(0,_l.jsx)(lc,{className:"components-popover__close",size:"small",icon:KX,onClick:b,label:(0,Sw.__)("Close")})]}),(0,_l.jsx)("div",{className:"components-popover__content",children:o}),bc&&(0,_l.jsx)("div",{ref:vc,className:["components-popover__arrow",`is-${zl.split("-")[0]}`].join(" "),style:{left:typeof uc?.x<"u"&&Number.isFinite(uc.x)?`${uc.x}px`:"",top:typeof uc?.y<"u"&&Number.isFinite(uc.y)?`${uc.y}px`:""},children:(0,_l.jsx)(Bac,{})})]}),Ki=oc.ref&&!W,_i=y||h||x;return Ki?Ol=(0,_l.jsx)(ju,{name:M,children:Ol}):W||(Ol=(0,gt.createPortal)((0,_l.jsx)(CC,{document,children:Ol}),yac())),_i?Ol:(0,_l.jsxs)(_l.Fragment,{children:[(0,_l.jsx)("span",{ref:S}),Ol]})},Cac=(0,gt.forwardRef)(({name:c=kw},l)=>(0,_l.jsx)(Eu,{bubblesVirtually:!0,name:c,className:"popover-slot",ref:l})),Jac=Object.assign(tc(Vac,"Popover"),{Slot:Object.assign(Cac,{displayName:"Popover.Slot"}),__unstableSlotNameProvider:Object.assign(KI.Provider,{displayName:"Popover.__unstableSlotNameProvider"})}),sG=Jac;var bo=u(V(),1);function zw({items:c,onSelect:l,selectedIndex:t,instanceId:e,listBoxId:d,className:b,Component:o="div"}){return(0,bo.jsx)(o,{id:d,role:"listbox",className:"components-autocomplete__results",children:c.map((n,G)=>(0,bo.jsx)(lc,{id:`components-autocomplete-item-${e}-${n.key}`,role:"option",__next40pxDefaultSize:!0,"aria-selected":G===t,accessibleWhenDisabled:!0,disabled:n.isDisabled,className:Q("components-autocomplete__result",b,{"is-selected":G===t}),variant:G===t?"primary":void 0,onClick:()=>l(n),children:n.label},n.key))})}function ww(c){let l=c.useItems??tw(c);function t({filterValue:e,instanceId:d,listBoxId:b,className:o,selectedIndex:n,onChangeOptions:G,onSelect:X,onReset:i,reset:a,contentRef:m}){let[x]=l(e),s=(0,Ow.useAnchor)({editableContentElement:m.current}),[r,g]=(0,gG.useState)(!1),Z=(0,gG.useRef)(null),H=(0,Pu.useMergeRefs)([Z,(0,Pu.useRefEffect)(I=>{m.current&&g(I.ownerDocument!==m.current.ownerDocument)},[m])]);hac(Z,a);let R=(0,Pu.useDebounce)(Qw.speak,500);function W(I){R&&(I.length?R(e?(0,rG.sprintf)((0,rG._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",I.length),I.length):(0,rG.sprintf)((0,rG._n)("Initial %d result loaded. Type to filter all available results. Use up and down arrow keys to navigate.","Initial %d results loaded. Type to filter all available results. Use up and down arrow keys to navigate.",I.length),I.length),"assertive"):R((0,rG.__)("No results."),"assertive"))}return(0,gG.useLayoutEffect)(()=>{G(x),W(x)},[x]),x.length===0?null:(0,bo.jsxs)(bo.Fragment,{children:[(0,bo.jsx)(sG,{offset:8,focusOnMount:!1,onClose:i,placement:"top-start",className:"components-autocomplete__popover",anchor:s,ref:H,children:(0,bo.jsx)(zw,{items:x,onSelect:X,selectedIndex:n,instanceId:d,listBoxId:b,className:o})}),m.current&&r&&(0,Aw.createPortal)((0,bo.jsx)(zw,{items:x,onSelect:X,selectedIndex:n,instanceId:d,listBoxId:b,className:o,Component:Qc}),m.current.ownerDocument.body)]})}return t}function hac(c,l){(0,gG.useEffect)(()=>{let t=e=>{!c.current||c.current.contains(e.target)||l(e)};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[l,c])}var vC=c=>{if(c===null)return"";switch(typeof c){case"string":case"number":return c.toString();case"object":return c instanceof Array?c.map(vC).join(""):"props"in c?vC(c.props.children):"";default:return""}},NC=vC;var _u=u(V(),1),Tw=[],Yac={};function Lw({record:c,onChange:l,onReplace:t,completers:e,contentRef:d}){let b=(0,Ku.useInstanceId)(Yac),[o,n]=(0,vt.useState)(0),[G,X]=(0,vt.useState)(Tw),[i,a]=(0,vt.useState)(""),[m,x]=(0,vt.useState)(null),[s,r]=(0,vt.useState)(null),g=(0,vt.useRef)(!1);function Z(F){if(m===null)return;let T=c.start,L=T-m.triggerPrefix.length-i.length,v=(0,ld.create)({html:(0,vt.renderToString)(F)});l((0,ld.insert)(c,v,L,T))}function H(F){let{getOptionCompletion:T}=m||{};if(!F.isDisabled){if(T){let L=T(F.value,i),A=(S=>S!==null&&typeof S=="object"&&"action"in S&&S.action!==void 0&&"value"in S&&S.value!==void 0)(L)?L:{action:"insert-at-caret",value:L};if(A.action==="replace"){t([A.value]);return}else A.action==="insert-at-caret"&&Z(A.value)}R(),d.current?.focus()}}function R(){n(0),X(Tw),a(""),x(null),r(null)}function W(F){n(F.length===G.length?o:0),X(F)}function I(F){if(g.current=F.key==="Backspace",!!m&&G.length!==0&&!F.defaultPrevented){switch(F.key){case"ArrowUp":{let T=(o===0?G.length:o)-1;n(T),(0,SC.isAppleOS)()&&(0,fC.speak)(NC(G[T].label),"assertive");break}case"ArrowDown":{let T=(o+1)%G.length;n(T),(0,SC.isAppleOS)()&&(0,fC.speak)(NC(G[T].label),"assertive");break}case"Escape":x(null),r(null),F.preventDefault();break;case"Enter":H(G[o]);break;case"ArrowLeft":case"ArrowRight":R();return;default:return}F.preventDefault()}}let B=(0,vt.useMemo)(()=>(0,ld.isCollapsed)(c)?(0,ld.getTextContent)((0,ld.slice)(c,0)):"",[c]);(0,vt.useEffect)(()=>{if(!B){m&&R();return}let F=e.reduce((wc,Wl)=>{let sl=B.lastIndexOf(Wl.triggerPrefix),tl=wc!==null?B.lastIndexOf(wc.triggerPrefix):-1;return sl>tl?Wl:wc},null);if(!F){m&&R();return}let{allowContext:T,triggerPrefix:L}=F,v=B.lastIndexOf(L),A=B.slice(v+L.length);if(A.length>50)return;let U=G.length===0,P=A.split(/\s/),bc=P.length===1,j=g.current&&P.length<=3;if(U&&!(j||bc)){m&&R();return}let ec=(0,ld.getTextContent)((0,ld.slice)(c,void 0,(0,ld.getTextContent)(c).length));if(T&&!T(B.slice(0,v),ec)){m&&R();return}if(/^\s/.test(A)||/\s\s+$/.test(A)){m&&R();return}if(!/[\u0000-\uFFFF]*$/.test(A)){m&&R();return}let M=dn(F.triggerPrefix),oc=(0,Dw.default)(B),Hc=oc.slice(oc.lastIndexOf(F.triggerPrefix)).match(new RegExp(`${M}([\0-\uFFFF]*)$`)),Bc=Hc&&Hc[1];x(F),r(()=>F!==m?ww(F):s),a(Bc===null?"":Bc)},[B]);let{key:p=""}=G[o]||{},{className:y}=m||{},h=!!m&&G.length>0,C=h?`components-autocomplete-listbox-${b}`:void 0,J=h?`components-autocomplete-item-${b}-${p}`:null,f=c.start!==void 0,k=!!B&&f&&!!s;return{listBoxId:C,activeId:J,onKeyDown:Vd(I),popover:k&&(0,_u.jsx)(s,{className:y,filterValue:i,instanceId:b,listBoxId:C,selectedIndex:o,onChangeOptions:W,onSelect:H,value:c,contentRef:d,reset:R})}}function Fac(c,l){return c.text===l.text&&c.start===l.start&&c.end===l.end}function vac(c){let l=(0,vt.useRef)([]),t=l.current[l.current.length-1];return(!t||!Fac(c,t))&&l.current.push(c),l.current.length>2&&l.current.shift(),l.current[0]}function Uw(c){let l=(0,vt.useRef)(null),t=(0,vt.useRef)(void 0),{record:e}=c,d=vac(e),{popover:b,listBoxId:o,activeId:n,onKeyDown:G}=Lw({...c,contentRef:l});t.current=G;let X=(0,Ku.useMergeRefs)([l,(0,Ku.useRefEffect)(a=>{function m(x){t.current?.(x)}return a.addEventListener("keydown",m),()=>{a.removeEventListener("keydown",m)}},[])]);return e.text!==d?.text?{ref:X,children:b,"aria-autocomplete":o?"list":void 0,"aria-owns":o,"aria-activedescendant":n}:{ref:X}}function jw({children:c,isSelected:l,...t}){let{popover:e,...d}=Lw(t);return(0,_u.jsxs)(_u.Fragment,{children:[c(d),l&&e]})}var eU=u(nc(),1),vW=u(Y(),1),dU=u(dc(),1);var kC=u(nc(),1);var lT=u(Y(),1);var Ew=O("",""),Mw=()=>O("flex:1;",Fc({marginRight:"24px"})(),";",""),Pw={name:"bjn8wh",styles:"position:relative"},Kw=c=>O("position:absolute;top:",c==="__unstable-large"?"8px":"3px",";",Fc({right:0})()," line-height:0;",""),_I=c=>{let{color:l=D.gray[200],style:t="solid",width:e=w.borderWidth}=c||{},d=e!==w.borderWidth?`clamp(1px, ${e}, 10px)`:e;return`${l} ${!!e&&e!=="0"||!!l?t||"solid":t} ${d}`},_w=(c,l)=>O("position:absolute;top:",l==="__unstable-large"?"20px":"15px",";right:",l==="__unstable-large"?"39px":"29px",";bottom:",l==="__unstable-large"?"20px":"15px",";left:",l==="__unstable-large"?"39px":"29px",";border-top:",_I(c?.top),";border-bottom:",_I(c?.bottom),";",Fc({borderLeft:_I(c?.left)})()," ",Fc({borderRight:_I(c?.right)})(),";",""),qw=c=>O("position:relative;flex:1;width:",c==="__unstable-large"?void 0:"80%",";",""),$w={name:"1nwbfnf",styles:"grid-column:span 2;margin:0 auto"},cT=()=>O(Fc({marginLeft:"auto"})(),";","");function tT(c){let{className:l,size:t="default",...e}=cc(c,"BorderBoxControlLinkedButton"),d=Xc(),b=(0,lT.useMemo)(()=>d(Kw(t),l),[l,d,t]);return{...e,className:b}}var eT=u(V(),1),Nac=(c,l)=>{let{className:t,isLinked:e,...d}=tT(c),b=e?(0,kC.__)("Unlink sides"):(0,kC.__)("Link sides");return(0,eT.jsx)(lc,{...d,size:"small",icon:e?Cs:Vs,iconSize:24,label:b,ref:l,className:t})},fac=tc(Nac,"BorderBoxControlLinkedButton"),zC=fac;var nr=u(nc(),1),hW=u(Y(),1),PL=u(dc(),1);var dT=u(Y(),1);function bT(c){let{className:l,value:t,size:e="default",...d}=cc(c,"BorderBoxControlVisualizer"),b=Xc(),o=(0,dT.useMemo)(()=>b(_w(t,e),l),[b,l,t,e]);return{...d,className:o,value:t}}var oT=u(V(),1),Sac=(c,l)=>{let{value:t,...e}=bT(c);return(0,oT.jsx)(ic,{...e,ref:l})},kac=tc(Sac,"BorderBoxControlVisualizer"),AC=kac;var uJ=u(nc(),1);var ot=u(nc(),1);var iW=u(nc(),1);var _s=u(Y(),1),ZT=u(dc(),1);var nT=({isBlock:c,isDeselectable:l,size:t})=>O("background:",D.ui.background,";border:1px solid transparent;border-radius:",w.radiusSmall,";display:inline-flex;min-width:0;position:relative;",Qac(t)," ",!l&&zac(c),"@media not ( prefers-reduced-motion ){&[data-indicator-animated]::before{transition-property:transform,border-radius;transition-duration:0.2s;transition-timing-function:ease-out;}}&::before{content:'';position:absolute;pointer-events:none;background:",D.theme.gray[100],";border:1px solid ",D.theme.gray[700],";outline:2px solid transparent;outline-offset:-3px;border-radius:",w.radiusSmall,`;top:-1px;left:-2px;width:calc( calc( var( --selected-width, 0 ) * 1px ) + 2px );height:calc( calc( var( --selected-height, 0 ) * 1px ) + 2px );transform:translateX( calc( var( --selected-left, 0 ) * 1px ) );opacity:min(
			1,
			max( 0, var( --selected-width, 0 ), var( --selected-height, 0 ) )
		);}`,""),zac=c=>{let l=O("border-color:",D.gray[300],";","");return O(c&&l," &:hover{border-color:",D.gray[400],";}&:focus-within{z-index:1;outline:",w.borderWidthFocus," solid ",D.ui.borderFocus,";outline-offset:1px;}","")},Aac={name:"1k18kha",styles:"height:40px"},Oac={name:"j4fzus",styles:"height:36px"},Qac=c=>({default:Oac,"__unstable-large":Aac})[c],GT={name:"7whenc",styles:"display:flex;width:100%"},XT=N("div",{target:"eakva830"})({name:"zjik7",styles:"display:flex"});var uT=u(dc(),1),$u=u(Y(),1),mT=u(nc(),1);var $I=u(Y(),1),OC=(0,$I.createContext)({});OC.displayName="ToggleGroupControlContext";var iT=()=>(0,$I.useContext)(OC),cW=OC;var aT=u(dc(),1),qu=u(Y(),1);function lW(c){let l=(0,qu.useRef)(!0),t=(0,aT.usePrevious)(c),e=(0,qu.useRef)(!1);(0,qu.useEffect)(()=>{l.current&&(l.current=!1)},[]);let d=e.current||!l.current&&t!==c;return(0,qu.useEffect)(()=>{e.current=d},[d]),d?{value:c??"",defaultValue:void 0}:{value:void 0,defaultValue:c}}var tW=u(V(),1);function Tac({children:c,isAdaptiveWidth:l,label:t,onChange:e,size:d,value:b,id:o,setSelectedElement:n,...G},X){let i=(0,uT.useInstanceId)(eW,"toggle-group-control-as-radio-group"),a=o||i,{value:m,defaultValue:x}=lW(b),r=yX({defaultValue:x,value:m,setValue:e?R=>{e(R??void 0)}:void 0,rtl:(0,mT.isRTL)()}),g=xc(r,"value"),Z=r.setValue;(0,$u.useEffect)(()=>{g===""&&r.setActiveId(void 0)},[r,g]);let H=(0,$u.useMemo)(()=>({activeItemIsNotFirstItem:()=>r.getState().activeId!==r.first(),baseId:a,isBlock:!l,size:d,value:g,setValue:Z,setSelectedElement:n}),[a,l,r,g,n,Z,d]);return(0,tW.jsx)(cW.Provider,{value:H,children:(0,tW.jsx)(Ba,{store:r,"aria-label":t,render:(0,tW.jsx)(ic,{}),...G,id:a,ref:X,children:c})})}var eW=(0,$u.forwardRef)(Tac);eW.displayName="ToggleGroupControlAsRadioGroup";var xT=u(dc(),1),dW=u(Y(),1);var QC=u(V(),1);function Dac({children:c,isAdaptiveWidth:l,label:t,onChange:e,size:d,value:b,id:o,setSelectedElement:n,...G},X){let i=(0,xT.useInstanceId)(bW,"toggle-group-control-as-button-group"),a=o||i,{value:m,defaultValue:x}=lW(b),[s,r]=de({defaultValue:x,value:m,onChange:e}),g=(0,dW.useMemo)(()=>({baseId:a,value:s,setValue:r,isBlock:!l,isDeselectable:!0,size:d,setSelectedElement:n}),[a,s,r,l,d,n]);return(0,QC.jsx)(cW.Provider,{value:g,children:(0,QC.jsx)(ic,{"aria-label":t,...G,ref:X,role:"group",children:c})})}var bW=(0,dW.forwardRef)(Dac);bW.displayName="ToggleGroupControlAsButtonGroup";var ei=u(Y(),1),oW=u(dc(),1),wC={element:void 0,top:0,right:0,bottom:0,left:0,width:0,height:0};function Lac(c){let l=c.getBoundingClientRect();if(l.width===0||l.height===0)return;let t=c.offsetParent,e=t?.getBoundingClientRect()??wC,d=t?.scrollLeft??0,b=t?.scrollTop??0,o=parseFloat(getComputedStyle(c).width),n=parseFloat(getComputedStyle(c).height),G=o/l.width,X=n/l.height;return{element:c,top:(l.top-e?.top)*X+b,right:(e?.right-l.right)*G-d,bottom:(e?.bottom-l.bottom)*X-b,left:(l.left-e?.left)*G+d,width:o,height:n}}var Uac=100;function nW(c,l=[]){let[t,e]=(0,ei.useState)(wC),d=(0,ei.useRef)(void 0),b=(0,oW.useEvent)(()=>{if(c&&c.isConnected){let n=Lac(c);if(n)return e(n),clearInterval(d.current),!0}else clearInterval(d.current);return!1}),o=(0,oW.useResizeObserver)(()=>{b()||requestAnimationFrame(()=>{b()||(d.current=setInterval(b,Uac))})});return(0,ei.useLayoutEffect)(()=>{o(c),c||e(wC)},[o,c]),(0,ei.useLayoutEffect)(()=>{b()},l),t}var gT=u(dc(),1),TC=u(Y(),1);var sT=u(dc(),1),GW=u(Y(),1);function rT(c,l){let t=(0,GW.useRef)(c),e=(0,sT.useEvent)(l);(0,GW.useLayoutEffect)(()=>{t.current!==c&&(e({previousValue:t.current}),t.current=c)},[e,c])}function XW(c,l,{prefix:t="subelement",dataAttribute:e=`${t}-animated`,transitionEndFilter:d=()=>!0,roundRect:b=!1}={}){let o=(0,gT.useEvent)(()=>{Object.keys(l).forEach(n=>n!=="element"&&c?.style.setProperty(`--${t}-${n}`,String(b?Math.floor(l[n]):l[n])))});(0,TC.useLayoutEffect)(()=>{o()},[l,o]),rT(l.element,({previousValue:n})=>{l.element&&n&&c?.setAttribute(`data-${e}`,"")}),(0,TC.useLayoutEffect)(()=>{function n(G){d(G)&&c?.removeAttribute(`data-${e}`)}return c?.addEventListener("transitionend",n),()=>c?.removeEventListener("transitionend",n)},[e,c,d])}var c0=u(V(),1);function jac(c,l){let{__nextHasNoMarginBottom:t,__next40pxDefaultSize:e=!1,__shouldNotWarnDeprecated36pxSize:d,className:b,isAdaptiveWidth:o=!1,isBlock:n=!1,isDeselectable:G=!1,label:X,hideLabelFromVision:i=!1,help:a,onChange:m,size:x="default",value:s,children:r,...g}=cc(c,"ToggleGroupControl"),Z=e&&x==="default"?"__unstable-large":x,[H,R]=(0,_s.useState)(),[W,I]=(0,_s.useState)(),B=(0,ZT.useMergeRefs)([I,l]),p=nW(s!=null?H:void 0);XW(W,p,{prefix:"selected",dataAttribute:"indicator-animated",transitionEndFilter:J=>J.pseudoElement==="::before",roundRect:!1});let y=Xc(),h=(0,_s.useMemo)(()=>y(nT({isBlock:n,isDeselectable:G,size:Z}),n&&GT,b),[b,y,n,G,Z]),C=G?bW:eW;return Lc({componentName:"ToggleGroupControl",size:x,__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:d}),(0,c0.jsxs)(Dc,{help:a,children:[!i&&(0,c0.jsx)(XT,{children:(0,c0.jsx)(Dc.VisualLabel,{children:X})}),(0,c0.jsx)(C,{...g,setSelectedElement:R,className:h,isAdaptiveWidth:o,label:X,onChange:m,ref:B,size:Z,value:s,children:r})]})}var Eac=tc(jac,"ToggleGroupControl"),hd=Eac;var WT=u(Y(),1);var RT=u(dc(),1),di=u(Y(),1);var UC={};qG(UC,{ButtonContentView:()=>_ac,LabelView:()=>Mac,buttonView:()=>LC,labelBlock:()=>DC});var Mac=N("div",{target:"et6ln9s1"})({name:"sln1fl",styles:"display:inline-flex;max-width:100%;min-width:0;position:relative"}),DC={name:"82a6rk",styles:"flex:1"},LC=({isDeselectable:c,isIcon:l,isPressed:t,size:e})=>O("align-items:center;appearance:none;background:transparent;border:none;border-radius:",w.radiusXSmall,";color:",D.theme.gray[700],";fill:currentColor;cursor:pointer;display:flex;font-family:inherit;height:100%;justify-content:center;line-height:100%;outline:none;padding:0 12px;position:relative;text-align:center;@media not ( prefers-reduced-motion ){transition:color ",w.transitionDurationFast," linear,font-weight 60ms linear;}user-select:none;width:100%;z-index:2;&::-moz-focus-inner{border:0;}&[disabled],&[aria-disabled='true']{opacity:0.4;cursor:default;}&:hover:not( [disabled] ):not( [aria-disabled='true'] ){color:",D.theme.foreground,";}",c&&Kac," ",l&&qac({size:e})," ",t&&Pac,";",""),Pac=O("color:",D.theme.foreground,";font-weight:",w.fontWeightMedium,";",""),Kac=O("&:focus{outline:",w.borderWidthFocus," solid ",D.ui.borderFocus,";outline-offset:2px;&[aria-pressed='false']{background:",D.ui.background,";box-shadow:0 0 0 2px ",D.ui.background,";}}",""),_ac=N("div",{target:"et6ln9s0"})("display:flex;font-size:",w.fontSize,";line-height:1;"),qac=({size:c="default"})=>O("height:",{default:"34px","__unstable-large":"38px"}[c],";aspect-ratio:1;padding-left:0;padding-right:0;","");var Yd=u(V(),1),{ButtonContentView:HT,LabelView:$ac}=UC,cuc=({showTooltip:c,text:l,children:t})=>c&&l?(0,Yd.jsx)(Ne,{text:l,placement:"top",children:t}):(0,Yd.jsx)(Yd.Fragment,{children:t});function IT(c,l){let t=iT(),e=(0,RT.useInstanceId)(IT,t.baseId||"toggle-group-control-option-base"),d=cc({...c,id:e},"ToggleGroupControlOptionBase"),{isBlock:b=!1,isDeselectable:o=!1,size:n="default"}=t,{className:G,isIcon:X=!1,value:i,children:a,showTooltip:m=!1,disabled:x,...s}=d,r=t.value===i,g=Xc(),Z=(0,di.useMemo)(()=>g(b&&DC),[g,b]),H=(0,di.useMemo)(()=>g(LC({isDeselectable:o,isIcon:X,isPressed:r,size:n}),G),[g,o,X,r,n,G]),R=()=>{o&&r?t.setValue(void 0):t.setValue(i)},W={...s,className:H,"data-value":i,ref:l},I=(0,di.useRef)(null);return(0,di.useLayoutEffect)(()=>{r&&I.current&&t.setSelectedElement(I.current)},[r,t]),(0,Yd.jsx)($ac,{ref:I,className:Z,children:(0,Yd.jsx)(cuc,{showTooltip:m,text:s["aria-label"],children:o?(0,Yd.jsx)("button",{...W,disabled:x,"aria-pressed":r,type:"button",onClick:R,children:(0,Yd.jsx)(HT,{children:a})}):(0,Yd.jsx)(BX,{disabled:x,onFocusVisible:()=>{(!(t.value===null||t.value==="")||t.activeItemIsNotFirstItem?.())&&t.setValue(i)},render:(0,Yd.jsx)("button",{type:"button",...W}),value:i,children:(0,Yd.jsx)(HT,{children:a})})})})}var luc=tc(IT,"ToggleGroupControlOptionBase"),qs=luc;var pT=u(V(),1);function tuc(c,l){let{label:t,...e}=c,d=e["aria-label"]||t;return(0,pT.jsx)(qs,{...e,"aria-label":d,ref:l,children:t})}var BT=(0,WT.forwardRef)(tuc);BT.displayName="ToggleGroupControlOption";var on=BT;var yT=u(Y(),1);var jC=u(V(),1);function euc(c,l){let{icon:t,label:e,...d}=c;return(0,jC.jsx)(qs,{...d,isIcon:!0,"aria-label":e,showTooltip:!0,ref:l,children:(0,jC.jsx)(cl,{icon:t})})}var VT=(0,yT.forwardRef)(euc);VT.displayName="ToggleGroupControlOptionIcon";var l0=VT;var EC=u(V(),1),duc=[{label:(0,iW.__)("Solid"),icon:ys,value:"solid"},{label:(0,iW.__)("Dashed"),icon:y2,value:"dashed"},{label:(0,iW.__)("Dotted"),icon:C2,value:"dotted"}];function buc({onChange:c,...l},t){return(0,EC.jsx)(hd,{__next40pxDefaultSize:!0,ref:t,isDeselectable:!0,onChange:e=>{c?.(e)},...l,children:duc.map(e=>(0,EC.jsx)(l0,{value:e.value,icon:e.icon,label:e.label},e.value))})}var ouc=tc(buc,"BorderControlStylePicker"),MC=ouc;var CT=u(Y(),1),JT=u(V(),1);function nuc(c,l){let{className:t,colorValue:e,...d}=c;return(0,JT.jsx)("span",{className:Q("component-color-indicator",t),style:{background:e},ref:l,...d})}var hT=(0,CT.forwardRef)(nuc);hT.displayName="ColorIndicator";var oo=hT;var PC=function(c){var l=c/255;return l<.04045?l/12.92:Math.pow((l+.055)/1.055,2.4)},KC=function(c){return .2126*PC(c.r)+.7152*PC(c.g)+.0722*PC(c.b)};function t0(c){c.prototype.luminance=function(){return l=KC(this.rgba),(t=2)===void 0&&(t=0),e===void 0&&(e=Math.pow(10,t)),Math.round(e*l)/e+0;var l,t,e},c.prototype.contrast=function(l){l===void 0&&(l="#FFF");var t,e,d,b,o,n,G,X=l instanceof c?l:new c(l);return b=this.rgba,o=X.toRgb(),n=KC(b),G=KC(o),t=n>G?(n+.05)/(G+.05):(G+.05)/(n+.05),(e=2)===void 0&&(e=0),d===void 0&&(d=Math.pow(10,e)),Math.floor(d*t)/d+0},c.prototype.isReadable=function(l,t){return l===void 0&&(l="#FFF"),t===void 0&&(t={}),this.contrast(l)>=(n=(o=(e=t).size)===void 0?"normal":o,(b=(d=e.level)===void 0?"AA":d)==="AAA"&&n==="normal"?7:b==="AA"&&n==="large"?3:4.5);var e,d,b,o,n}}var sL=u(dc(),1),un=u(nc(),1),nb=u(Y(),1);var aW=u(Y(),1),YT=u(dc(),1),FT=u(ml(),1);var uW=u(V(),1),Guc=(c,l)=>{let{renderContent:t,renderToggle:e,className:d,contentClassName:b,expandOnMobile:o,headerTitle:n,focusOnMount:G,popoverProps:X,onClose:i,onToggle:a,style:m,open:x,defaultOpen:s,position:r,variant:g}=cc(c,"Dropdown");r!==void 0&&(0,FT.default)("`position` prop in wp.components.Dropdown",{since:"6.2",alternative:"`popoverProps.placement` prop",hint:"Note that the `position` prop will override any values passed through the `popoverProps.placement` prop."});let[Z,H]=(0,aW.useState)(null),R=(0,aW.useRef)(null),[W,I]=de({defaultValue:s,value:x,onChange:a});function B(){if(!R.current)return;let{ownerDocument:C}=R.current,J=C?.activeElement?.closest('[role="dialog"]');!R.current.contains(C.activeElement)&&(!J||J.contains(R.current))&&p()}function p(){i?.(),I(!1)}let y={isOpen:!!W,onToggle:()=>I(!W),onClose:p},h=!!X?.anchor||!!X?.anchorRef||!!X?.getAnchorRect||!!X?.anchorRect;return(0,uW.jsxs)("div",{className:d,ref:(0,YT.useMergeRefs)([R,l,H]),tabIndex:-1,style:m,children:[e(y),W&&(0,uW.jsx)(sG,{position:r,onClose:p,onFocusOutside:B,expandOnMobile:o,headerTitle:n,focusOnMount:G,offset:13,anchor:h?void 0:Z,variant:g,...X,className:Q("components-dropdown__content",X?.className,b),children:t(y)})]})},Xuc=tc(Guc,"Dropdown"),no=Xuc;var ai=u(Y(),1),DD=u(dc(),1),LD=u(nc(),1);var kT=u(dc(),1),zT=u(Y(),1);var iuc=({disabled:c})=>c?O("color:",D.ui.textDisabled,";cursor:default;",""):"",auc={name:"1lv1yo7",styles:"display:inline-flex"},uuc=({variant:c})=>c==="minimal"?auc:"",vT=N(Au,{target:"e1mv6sxx3"})("color:",D.theme.foreground,";cursor:pointer;",iuc," ",uuc,";"),muc=({__next40pxDefaultSize:c,multiple:l,selectSize:t="default"})=>{if(l)return;let e={default:{height:40,minHeight:40,paddingTop:0,paddingBottom:0},small:{height:24,minHeight:24,paddingTop:0,paddingBottom:0},compact:{height:32,minHeight:32,paddingTop:0,paddingBottom:0},"__unstable-large":{height:40,minHeight:40,paddingTop:0,paddingBottom:0}};c||(e.default=e.compact);let d=e[t]||e.default;return O(d,"","")},bi=18,xuc=({__next40pxDefaultSize:c,multiple:l,selectSize:t="default"})=>{let e={default:w.controlPaddingX,small:w.controlPaddingXSmall,compact:w.controlPaddingXSmall,"__unstable-large":w.controlPaddingX};c||(e.default=e.compact);let d=e[t]||e.default;return Fc({paddingLeft:d,paddingRight:d+bi,...l?{paddingTop:d,paddingBottom:d}:{}})},suc=({multiple:c})=>({overflow:c?"auto":"hidden"}),ruc={name:"n1jncc",styles:"field-sizing:content"},guc=({variant:c})=>c==="minimal"?ruc:"",NT=N("select",{target:"e1mv6sxx2"})("&&&{appearance:none;background:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:currentColor;cursor:inherit;display:block;font-family:inherit;line-height:1.3;margin:0;width:100%;max-width:none;white-space:nowrap;text-overflow:ellipsis;",As,";",muc,";",xuc,";",suc," ",guc,";}"),fT=N("div",{target:"e1mv6sxx1"})("margin-inline-end:",z(-1),";line-height:0;path{fill:currentColor;}"),ST=N(Tu,{target:"e1mv6sxx0"})("position:absolute;pointer-events:none;",Fc({right:0}),";");var mW=u(V(),1),Zuc=()=>(0,mW.jsx)(ST,{children:(0,mW.jsx)(fT,{children:(0,mW.jsx)(Cl,{icon:Ws,size:bi})})}),xW=Zuc;var oi=u(V(),1);function Huc(c){let t=`inspector-select-control-${(0,kT.useInstanceId)($s)}`;return c||t}function Ruc({options:c}){return c.map(({id:l,label:t,value:e,...d},b)=>{let o=l||`${t}-${e}-${b}`;return(0,oi.jsx)("option",{value:e,...d,children:t},o)})}function Iuc(c,l){let{className:t,disabled:e=!1,help:d,hideLabelFromVision:b,id:o,label:n,multiple:G=!1,onChange:X,options:i=[],size:a="default",value:m,labelPosition:x="top",children:s,prefix:r,suffix:g,variant:Z="default",__next40pxDefaultSize:H=!1,__nextHasNoMarginBottom:R,__shouldNotWarnDeprecated36pxSize:W,...I}=Et(c),B=Huc(o),p=d?`${B}__help`:void 0;if(!i?.length&&!s)return null;let y=C=>{if(c.multiple){let f=Array.from(C.target.options).filter(({selected:k})=>k).map(({value:k})=>k);c.onChange?.(f,{event:C});return}c.onChange?.(C.target.value,{event:C})},h=Q("components-select-control",t);return Lc({componentName:"SelectControl",__next40pxDefaultSize:H,size:a,__shouldNotWarnDeprecated36pxSize:W}),(0,oi.jsx)(Dc,{help:d,id:B,className:h,children:(0,oi.jsx)(vT,{disabled:e,hideLabelFromVision:b,id:B,isBorderless:Z==="minimal",label:n,size:a,suffix:g||!G&&(0,oi.jsx)(xW,{}),prefix:r,labelPosition:x,__unstableInputWidth:Z==="minimal"?"auto":void 0,variant:Z,__next40pxDefaultSize:H,children:(0,oi.jsx)(NT,{...I,__next40pxDefaultSize:H,"aria-describedby":p,className:"components-select-control__input",disabled:e,id:B,multiple:G,onChange:y,ref:l,selectSize:a,value:m,variant:Z,children:s||(0,oi.jsx)(Ruc,{options:i})})})})}var $s=(0,zT.forwardRef)(Iuc);$s.displayName="SelectControl";var Fd=$s;var sW=u(nc(),1),HG=u(Y(),1),rW=u(dc(),1);var AT=u(Y(),1);function cr(c,l,t){return typeof c!="number"?null:parseFloat(`${Qu(c,l,t)}`)}function OT(c){let{min:l,max:t,value:e,initial:d}=c,[b,o]=Ko(cr(e,l,t),{initial:cr(d??null,l,t),fallback:null}),n=(0,AT.useCallback)(G=>{o(G===null?null:cr(G,l,t))},[l,t,o]);return[b,n]}var tD=u(Y(),1);var e0=30,d0=4,_C=()=>O({height:e0,minHeight:e0},"",""),ni=12,Wuc=({__next40pxDefaultSize:c})=>!c&&O({minHeight:e0},"",""),QT=N("div",{target:"e1epgpqk14"})("-webkit-tap-highlight-color:transparent;align-items:center;display:flex;justify-content:flex-start;padding:0;position:relative;touch-action:none;width:100%;min-height:40px;",Wuc,";"),puc=({color:c=D.ui.borderFocus})=>O({color:c},"",""),wT=N("div",{shouldForwardProp:c=>!["color","marks"].includes(c),target:"e1epgpqk13"})("display:block;flex:1;position:relative;width:100%;",puc,";",_C,";"),TT=N("span",{target:"e1epgpqk12"})("display:flex;margin-top:",d0,"px;",Fc({marginRight:6}),";"),DT=N("span",{target:"e1epgpqk11"})("display:flex;margin-top:",d0,"px;",Fc({marginLeft:6}),";"),Buc=({disabled:c,railColor:l})=>O("background:",c?D.ui.backgroundDisabled:l||D.theme.gray[300],";@media ( forced-colors: active ){background:GrayText;}",""),LT=N("span",{target:"e1epgpqk10"})("left:0;pointer-events:none;right:0;display:block;height:",d0,"px;position:absolute;margin-top:",(e0-d0)/2,"px;top:0;border-radius:",w.radiusFull,";",Buc,";"),yuc=({disabled:c,trackColor:l})=>O("background:",c?D.theme.gray[400]:l||"currentColor",";@media ( forced-colors: active ){background:",c?"GrayText":"CanvasText",";}",""),UT=N("span",{target:"e1epgpqk9"})("border-radius:",w.radiusFull,";height:",d0,"px;pointer-events:none;display:block;position:absolute;margin-top:",(e0-d0)/2,"px;top:0;.is-marked &{@media not ( prefers-reduced-motion ){transition:width ease 0.1s;}}",yuc,";"),jT=N("span",{target:"e1epgpqk8"})({name:"g5kg28",styles:"display:block;pointer-events:none;position:relative;width:100%;user-select:none;margin-top:17px"}),ET=N("span",{target:"e1epgpqk7"})("position:absolute;left:0;top:-4px;height:4px;width:2px;transform:translateX( -50% );background-color:",D.ui.background,";z-index:1;"),Vuc=({isFilled:c})=>O({color:c?D.theme.gray[700]:D.theme.gray[300]},"",""),MT=N("span",{target:"e1epgpqk6"})("color:",D.theme.gray[300],";font-size:11px;position:absolute;top:8px;white-space:nowrap;",Fc({left:0}),";",Fc({transform:"translateX( -50% )"},{transform:"translateX( 50% )"}),";",Vuc,";"),PT=({disabled:c})=>O("background:",c?D.theme.gray[400]:D.theme.accent,";@media ( forced-colors: active ){background:",c?"GrayText":"CanvasText",";}",""),KT=N("span",{target:"e1epgpqk5"})("align-items:center;display:flex;height:",ni,"px;justify-content:center;margin-top:",(e0-ni)/2,"px;outline:0;pointer-events:none;position:absolute;top:0;user-select:none;width:",ni,"px;border-radius:",w.radiusRound,";z-index:3;.is-marked &{@media not ( prefers-reduced-motion ){transition:left ease 0.1s;}}",PT,";",Fc({marginLeft:-10}),";",Fc({transform:"translateX( 4.5px )"},{transform:"translateX( -4.5px )"}),";"),Cuc=({isFocused:c})=>c?O("&::before{content:' ';position:absolute;background-color:",D.theme.accent,";opacity:0.4;border-radius:",w.radiusRound,";height:",ni+8,"px;width:",ni+8,"px;top:-4px;left:-4px;@media ( forced-colors: active ){background:GrayText;}}",""):"",_T=N("span",{target:"e1epgpqk4"})("align-items:center;border-radius:",w.radiusRound,";height:100%;outline:0;position:absolute;user-select:none;width:100%;box-shadow:",w.elevationXSmall,";",PT,";",Cuc,";"),qT=N("input",{target:"e1epgpqk3"})("box-sizing:border-box;cursor:pointer;display:block;height:100%;left:0;margin:0 -",ni/2,"px;opacity:0;outline:none;position:absolute;right:0;top:0;width:calc( 100% + ",ni,"px );"),Juc=({show:c})=>O("display:",c?"inline-block":"none",";opacity:",c?1:0,";@media not ( prefers-reduced-motion ){transition:opacity 120ms ease,display 120ms ease allow-discrete;}@starting-style{opacity:0;}",""),huc={name:"1cypxip",styles:"top:-80%"},Yuc={name:"1lr98c4",styles:"bottom:-80%"},Fuc=({placement:c})=>c==="bottom"?Yuc:huc,$T=N("span",{target:"e1epgpqk2"})("background:rgba( 0, 0, 0, 0.8 );border-radius:",w.radiusSmall,";color:white;font-size:12px;min-width:32px;padding:4px 8px;pointer-events:none;position:absolute;text-align:center;user-select:none;line-height:1.4;",Juc,";",Fuc,";",Fc({transform:"translateX(-50%)"},{transform:"translateX(50%)"}),";"),cD=N(Yt,{target:"e1epgpqk1"})("display:inline-block;font-size:13px;margin-top:0;input[type='number']&{",_C,";}",Fc({marginLeft:`${z(4)} !important`}),";"),lD=N("span",{target:"e1epgpqk0"})("display:block;margin-top:0;button,button.is-small{margin-left:0;",_C,";}",Fc({marginLeft:8}),";");var eD=u(V(),1);function vuc(c,l){let{describedBy:t,label:e,value:d,...b}=c;return(0,eD.jsx)(qT,{...b,"aria-describedby":t,"aria-label":e,"aria-hidden":!1,ref:l,tabIndex:0,type:"range",value:d})}var Nuc=(0,tD.forwardRef)(vuc),dD=Nuc;var oD=u(nc(),1);var Gi=u(V(),1);function bD(c){let{className:l,isFilled:t=!1,label:e,style:d={},...b}=c,o=Q("components-range-control__mark",t&&"is-filled",l),n=Q("components-range-control__mark-label",t&&"is-filled");return(0,Gi.jsxs)(Gi.Fragment,{children:[(0,Gi.jsx)(ET,{...b,"aria-hidden":"true",className:o,style:d}),e&&(0,Gi.jsx)(MT,{"aria-hidden":"true",className:n,isFilled:t,style:d,children:e})]})}var ZG=u(V(),1),nD=u(E(),1);function GD(c){let{disabled:l=!1,marks:t=!1,min:e=0,max:d=100,step:b=1,value:o=0,...n}=c;return(0,ZG.jsxs)(ZG.Fragment,{children:[(0,ZG.jsx)(LT,{disabled:l,...n}),t&&(0,ZG.jsx)(fuc,{disabled:l,marks:t,min:e,max:d,step:b,value:o})]})}function fuc(c){let{disabled:l=!1,marks:t=!1,min:e=0,max:d=100,step:b=1,value:o=0}=c,G=Suc({marks:t,min:e,max:d,step:b==="any"?1:b,value:o});return(0,ZG.jsx)(jT,{"aria-hidden":"true",className:"components-range-control__marks",children:G.map(X=>(0,nD.createElement)(bD,{...X,key:X.key,"aria-hidden":"true",disabled:l}))})}function Suc({marks:c,min:l=0,max:t=100,step:e=1,value:d=0}){if(!c)return[];let b=t-l;if(!Array.isArray(c)){c=[];let n=1+Math.round(b/e);for(;n>c.push({value:e*c.length+l}););}let o=[];return c.forEach((n,G)=>{if(n.value<l||n.value>t)return;let X=`mark-${G}`,i=n.value<=d,a=`${(n.value-l)/b*100}%`,m={[(0,oD.isRTL)()?"right":"left"]:a};o.push({...n,isFilled:i,key:X,style:m})}),o}var Xi=u(Y(),1);var XD=u(V(),1);function iD(c){let{className:l,inputRef:t,tooltipPlacement:e,show:d=!1,style:b={},value:o=0,renderTooltipContent:n=x=>x,zIndex:G=100,...X}=c,i=kuc({inputRef:t,tooltipPlacement:e}),a=Q("components-simple-tooltip",l),m={...b,zIndex:G};return(0,XD.jsx)($T,{...X,"aria-hidden":"false",className:a,placement:i,show:d,role:"tooltip",style:m,children:n(o)})}function kuc({inputRef:c,tooltipPlacement:l}){let[t,e]=(0,Xi.useState)(),d=(0,Xi.useCallback)(()=>{c&&c.current&&e(l)},[l,c]);return(0,Xi.useEffect)(()=>{d()},[d]),(0,Xi.useEffect)(()=>(window.addEventListener("resize",d),()=>{window.removeEventListener("resize",d)})),t}var Zt=u(V(),1),lr=()=>{};function zuc({resetFallbackValue:c,initialPosition:l}){return c!==void 0?Number.isNaN(c)?null:c:l!==void 0?Number.isNaN(l)?null:l:null}function aD(c,l){let{__nextHasNoMarginBottom:t,afterIcon:e,allowReset:d=!1,beforeIcon:b,className:o,color:n=D.theme.accent,currentInput:G,disabled:X=!1,help:i,hideLabelFromVision:a=!1,initialPosition:m,isShiftStepEnabled:x=!0,label:s,marks:r=!1,max:g=100,min:Z=0,onBlur:H=lr,onChange:R=lr,onFocus:W=lr,onMouseLeave:I=lr,onMouseMove:B=lr,railColor:p,renderTooltipContent:y=at=>at,resetFallbackValue:h,__next40pxDefaultSize:C=!1,shiftStep:J=10,showTooltip:f,step:k=1,trackColor:F,value:T,withInputField:L=!0,__shouldNotWarnDeprecated36pxSize:v,...A}=c,[S,U]=OT({min:Z,max:g,value:T??null,initial:m}),P=(0,HG.useRef)(!1),bc=f,j=L;k==="any"&&(bc=!1,j=!1);let[ec,M]=(0,HG.useState)(bc),[oc,Hc]=(0,HG.useState)(!1),Bc=(0,HG.useRef)(null),wc=Bc.current?.matches(":focus"),Wl=!X&&oc,sl=S===null,gc=sl?"":S!==void 0?S:G,Zl=sl?(g-Z)/2+Z:S,zl=sl?50:(S-Z)/(g-Z)*100,uc=`${Qu(zl,0,100)}%`,vc=Q("components-range-control",o),hl=Q("components-range-control__wrapper",!!r&&"is-marked"),Yc=(0,rW.useInstanceId)(aD,"inspector-range-control"),Al=i?`${Yc}__help`:void 0,it=bc!==!1&&Number.isFinite(S),Re=at=>{let Ol=parseFloat(at.target.value);U(Ol),R(Ol)},Kt=at=>{let Ol=parseFloat(at);U(Ol),isNaN(Ol)?d&&(P.current=!0):((Ol<Z||Ol>g)&&(Ol=cr(Ol,Z,g)),R(Ol),P.current=!1)},Qe=()=>{P.current&&(Yo(),P.current=!1)},Yo=()=>{let at=Number.isNaN(h)?null:h??null;U(at),R(at??void 0)},MG=()=>M(!0),PG=()=>M(!1),KG=at=>{H(at),Hc(!1),PG()},_G=at=>{W(at),Hc(!0),MG()},vn={[(0,sW.isRTL)()?"right":"left"]:uc};return Lc({componentName:"RangeControl",__next40pxDefaultSize:C,size:void 0,__shouldNotWarnDeprecated36pxSize:v}),(0,Zt.jsx)(Dc,{className:vc,label:s,hideLabelFromVision:a,id:`${Yc}`,help:i,children:(0,Zt.jsxs)(QT,{className:"components-range-control__root",__next40pxDefaultSize:C,children:[b&&(0,Zt.jsx)(TT,{children:(0,Zt.jsx)(cl,{icon:b})}),(0,Zt.jsxs)(wT,{className:hl,color:n,marks:!!r,children:[(0,Zt.jsx)(dD,{...A,className:"components-range-control__slider",describedBy:Al,disabled:X,id:`${Yc}`,label:s,max:g,min:Z,onBlur:KG,onChange:Re,onFocus:_G,onMouseMove:B,onMouseLeave:I,ref:(0,rW.useMergeRefs)([Bc,l]),step:k,value:gc??void 0}),(0,Zt.jsx)(GD,{"aria-hidden":!0,disabled:X,marks:r,max:g,min:Z,railColor:p,step:k,value:Zl}),(0,Zt.jsx)(UT,{"aria-hidden":!0,className:"components-range-control__track",disabled:X,style:{width:uc},trackColor:F}),(0,Zt.jsx)(KT,{className:"components-range-control__thumb-wrapper",style:vn,disabled:X,children:(0,Zt.jsx)(_T,{"aria-hidden":!0,isFocused:Wl,disabled:X})}),it&&(0,Zt.jsx)(iD,{className:"components-range-control__tooltip",inputRef:Bc,tooltipPlacement:"bottom",renderTooltipContent:y,show:wc||ec,style:vn,value:S})]}),e&&(0,Zt.jsx)(DT,{children:(0,Zt.jsx)(cl,{icon:e})}),j&&(0,Zt.jsx)(cD,{"aria-label":s,className:"components-range-control__number",disabled:X,inputMode:"decimal",isShiftStepEnabled:x,max:g,min:Z,onBlur:Qe,onChange:Kt,shiftStep:J,size:C?"__unstable-large":"default",__unstableInputWidth:C?z(20):z(16),step:k,value:gc,__shouldNotWarnDeprecated36pxSize:!0}),d&&(0,Zt.jsx)(lD,{children:(0,Zt.jsx)(lc,{className:"components-range-control__reset",accessibleWhenDisabled:!X,disabled:X||S===zuc({resetFallbackValue:h,initialPosition:m}),variant:"secondary",size:"small",onClick:Yo,children:(0,sW.__)("Reset")})})]})})}var uD=(0,HG.forwardRef)(aD);uD.displayName="RangeControl";var vd=uD;var mD=N(Yt,{target:"ez9hsf46"})("width:",z(24),";"),xD=N(Fd,{target:"ez9hsf45"})("margin-left:",z(-2),";"),sD=N(vd,{target:"ez9hsf44"})("flex:1;margin-right:",z(2),";"),Auc=`
.react-colorful__interactive {
	width: calc( 100% - ${z(2)} );
	margin-left: ${z(1)};
}`,rD=N("div",{target:"ez9hsf43"})("padding-top:",z(2),";padding-right:0;padding-left:0;padding-bottom:0;"),gD=N(Uc,{target:"ez9hsf42"})("padding-left:",z(4),";padding-right:",z(4),";"),ZD=N(Il,{target:"ez9hsf41"})("padding-top:",z(4),";padding-left:",z(4),";padding-right:",z(3),";padding-bottom:",z(5),";"),HD=N("div",{target:"ez9hsf40"})(qe,";width:216px;.react-colorful{display:flex;flex-direction:column;align-items:center;width:216px;height:auto;}.react-colorful__saturation{width:100%;border-radius:0;height:216px;margin-bottom:",z(4),";border-bottom:none;}.react-colorful__hue,.react-colorful__alpha{width:184px;height:16px;border-radius:",w.radiusFull,";margin-bottom:",z(2),";}.react-colorful__pointer{height:16px;width:16px;border:none;box-shadow:0 0 2px 0 rgba( 0, 0, 0, 0.25 );outline:2px solid transparent;@media not ( prefers-reduced-motion ){transition:transform ",w.transitionDurationFast," ease-in-out;}}.react-colorful__interactive:focus .react-colorful__pointer{box-shadow:0 0 0 ",w.borderWidthFocus," ",w.surfaceColor,";border:",w.borderWidthFocus," solid black;transform:translate( -50%, -50% ) scale( 1.5 );}.react-colorful__pointer-fill{box-shadow:inset 0 0 0 ",w.borderWidthFocus," #fff;}",Auc,";");var RD=u(dc(),1),b0=u(Y(),1);var qC=u(nc(),1);var $C=u(V(),1),ID=c=>{let{color:l,colorType:t}=c,[e,d]=(0,b0.useState)(null),b=(0,b0.useRef)(void 0),o=(0,RD.useCopyToClipboard)(()=>{switch(t){case"hsl":return l.toHslString();case"rgb":return l.toRgbString();default:case"hex":return l.toHex()}},()=>{b.current&&clearTimeout(b.current),d(l.toHex()),b.current=setTimeout(()=>{d(null),b.current=void 0},3e3)});(0,b0.useEffect)(()=>()=>{b.current&&clearTimeout(b.current)},[]);let n=e===l.toHex(),G=n?(0,qC.__)("Copied!"):(0,qC.__)("Copy");return(0,$C.jsx)(Ne,{delay:0,hideOnClick:!1,text:G,children:(0,$C.jsx)(ci,{size:"compact","aria-label":G,ref:o,icon:n?jt:R2,showTooltip:!1})})};var ii=u(V(),1),Go=({min:c,max:l,label:t,abbreviation:e,onChange:d,value:b})=>(0,ii.jsxs)(Uc,{spacing:4,children:[(0,ii.jsx)(mD,{__next40pxDefaultSize:!0,min:c,max:l,label:t,hideLabelFromVision:!0,value:b,onChange:n=>{if(!n){d(0);return}if(typeof n=="string"){d(parseInt(n,10));return}d(n)},prefix:(0,ii.jsx)(mG,{children:(0,ii.jsx)(Jt,{color:D.theme.accent,lineHeight:1,children:e})}),spinControls:"none"}),(0,ii.jsx)(sD,{__next40pxDefaultSize:!0,label:t,hideLabelFromVision:!0,min:c,max:l,value:b,onChange:d,withInputField:!1})]});var nn=u(V(),1),WD=({color:c,onChange:l,enableAlpha:t})=>{let{r:e,g:d,b,a:o}=c.toRgb();return(0,nn.jsxs)(nn.Fragment,{children:[(0,nn.jsx)(Go,{min:0,max:255,label:"Red",abbreviation:"R",value:e,onChange:n=>l(Rc({r:n,g:d,b,a:o}))}),(0,nn.jsx)(Go,{min:0,max:255,label:"Green",abbreviation:"G",value:d,onChange:n=>l(Rc({r:e,g:n,b,a:o}))}),(0,nn.jsx)(Go,{min:0,max:255,label:"Blue",abbreviation:"B",value:b,onChange:n=>l(Rc({r:e,g:d,b:n,a:o}))}),t&&(0,nn.jsx)(Go,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(o*100),onChange:n=>l(Rc({r:e,g:d,b,a:n/100}))})]})};var o0=u(Y(),1);var Gn=u(V(),1),pD=({color:c,onChange:l,enableAlpha:t})=>{let e=(0,o0.useMemo)(()=>c.toHsl(),[c]),[d,b]=(0,o0.useState)({...e}),o=c.isEqual(Rc(d));(0,o0.useEffect)(()=>{o||b(e)},[e,o]);let n=o?d:e,G=X=>{let i=Rc({...n,...X});c.isEqual(i)?b(a=>({...a,...X})):l(i)};return(0,Gn.jsxs)(Gn.Fragment,{children:[(0,Gn.jsx)(Go,{min:0,max:359,label:"Hue",abbreviation:"H",value:n.h,onChange:X=>{G({h:X})}}),(0,Gn.jsx)(Go,{min:0,max:100,label:"Saturation",abbreviation:"S",value:n.s,onChange:X=>{G({s:X})}}),(0,Gn.jsx)(Go,{min:0,max:100,label:"Lightness",abbreviation:"L",value:n.l,onChange:X=>{G({l:X})}}),t&&(0,Gn.jsx)(Go,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*n.a),onChange:X=>{G({a:X/100})}})]})};var BD=u(nc(),1);var gW=u(V(),1),yD=({color:c,onChange:l,enableAlpha:t})=>{let e=b=>{if(!b)return;let o=b.startsWith("#")?b:"#"+b;l(Rc(o))},d=(b,o)=>{if(o.payload?.event?.nativeEvent?.inputType!=="insertFromPaste")return{...b};let G=b.value?.startsWith("#")?b.value.slice(1).toUpperCase():b.value?.toUpperCase();return{...b,value:G}};return(0,gW.jsx)(Ds,{prefix:(0,gW.jsx)(mG,{children:(0,gW.jsx)(Jt,{color:D.theme.accent,lineHeight:1,children:"#"})}),value:c.toHex().slice(1).toUpperCase(),onChange:e,maxLength:t?9:7,label:(0,BD.__)("Hex color"),hideLabelFromVision:!0,size:"__unstable-large",__unstableStateReducer:d,__unstableInputWidth:"9em"})};var ZW=u(V(),1),VD=({colorType:c,color:l,onChange:t,enableAlpha:e})=>{let d={color:l,onChange:t,enableAlpha:e};switch(c){case"hsl":return(0,ZW.jsx)(pD,{...d});case"rgb":return(0,ZW.jsx)(WD,{...d});default:case"hex":return(0,ZW.jsx)(yD,{...d})}};var Cc=u(E(),1);function G0(){return(G0=Object.assign||function(c){for(var l=1;l<arguments.length;l++){var t=arguments[l];for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(c[e]=t[e])}return c}).apply(this,arguments)}function dJ(c,l){if(c==null)return{};var t,e,d={},b=Object.keys(c);for(e=0;e<b.length;e++)l.indexOf(t=b[e])>=0||(d[t]=c[t]);return d}function lJ(c){var l=(0,Cc.useRef)(c),t=(0,Cc.useRef)(function(e){l.current&&l.current(e)});return l.current=c,t.current}var n0=function(c,l,t){return l===void 0&&(l=0),t===void 0&&(t=1),c>t?t:c<l?l:c},tr=function(c){return"touches"in c},tJ=function(c){return c&&c.ownerDocument.defaultView||self},CD=function(c,l,t){var e=c.getBoundingClientRect(),d=tr(l)?(function(b,o){for(var n=0;n<b.length;n++)if(b[n].identifier===o)return b[n];return b[0]})(l.touches,t):l;return{left:n0((d.pageX-(e.left+tJ(c).pageXOffset))/e.width),top:n0((d.pageY-(e.top+tJ(c).pageYOffset))/e.height)}},JD=function(c){!tr(c)&&c.preventDefault()},bJ=Cc.default.memo(function(c){var l=c.onMove,t=c.onKey,e=dJ(c,["onMove","onKey"]),d=(0,Cc.useRef)(null),b=lJ(l),o=lJ(t),n=(0,Cc.useRef)(null),G=(0,Cc.useRef)(!1),X=(0,Cc.useMemo)(function(){var x=function(g){JD(g),(tr(g)?g.touches.length>0:g.buttons>0)&&d.current?b(CD(d.current,g,n.current)):r(!1)},s=function(){return r(!1)};function r(g){var Z=G.current,H=tJ(d.current),R=g?H.addEventListener:H.removeEventListener;R(Z?"touchmove":"mousemove",x),R(Z?"touchend":"mouseup",s)}return[function(g){var Z=g.nativeEvent,H=d.current;if(H&&(JD(Z),!(function(W,I){return I&&!tr(W)})(Z,G.current)&&H)){if(tr(Z)){G.current=!0;var R=Z.changedTouches||[];R.length&&(n.current=R[0].identifier)}H.focus(),b(CD(H,Z,n.current)),r(!0)}},function(g){var Z=g.which||g.keyCode;Z<37||Z>40||(g.preventDefault(),o({left:Z===39?.05:Z===37?-.05:0,top:Z===40?.05:Z===38?-.05:0}))},r]},[o,b]),i=X[0],a=X[1],m=X[2];return(0,Cc.useEffect)(function(){return m},[m]),Cc.default.createElement("div",G0({},e,{onTouchStart:i,onMouseDown:i,className:"react-colorful__interactive",ref:d,onKeyDown:a,tabIndex:0,role:"slider"}))}),er=function(c){return c.filter(Boolean).join(" ")},oJ=function(c){var l=c.color,t=c.left,e=c.top,d=e===void 0?.5:e,b=er(["react-colorful__pointer",c.className]);return Cc.default.createElement("div",{className:b,style:{top:100*d+"%",left:100*t+"%"}},Cc.default.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:l}}))},ae=function(c,l,t){return l===void 0&&(l=0),t===void 0&&(t=Math.pow(10,l)),Math.round(t*c)/t},Wel={grad:.9,turn:360,rad:360/(2*Math.PI)};var YD=function(c){var l=c.s,t=c.v,e=c.a,d=(200-l)*t/100;return{h:ae(c.h),s:ae(d>0&&d<200?l*t/100/(d<=100?d:200-d)*100:0),l:ae(d/2),a:ae(e,2)}},eJ=function(c){var l=YD(c);return"hsl("+l.h+", "+l.s+"%, "+l.l+"%)"},cJ=function(c){var l=YD(c);return"hsla("+l.h+", "+l.s+"%, "+l.l+"%, "+l.a+")"},FD=function(c){var l=c.h,t=c.s,e=c.v,d=c.a;l=l/360*6,t/=100,e/=100;var b=Math.floor(l),o=e*(1-t),n=e*(1-(l-b)*t),G=e*(1-(1-l+b)*t),X=b%6;return{r:ae(255*[e,n,o,o,G,e][X]),g:ae(255*[G,e,e,n,o,o][X]),b:ae(255*[o,o,G,e,e,n][X]),a:ae(d,2)}};var vD=function(c){var l=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(c);return l?Quc({r:Number(l[1])/(l[2]?100/255:1),g:Number(l[3])/(l[4]?100/255:1),b:Number(l[5])/(l[6]?100/255:1),a:l[7]===void 0?1:Number(l[7])/(l[8]?100:1)}):{h:0,s:0,v:0,a:1}},Ouc=vD;var Quc=function(c){var l=c.r,t=c.g,e=c.b,d=c.a,b=Math.max(l,t,e),o=b-Math.min(l,t,e),n=o?b===l?(t-e)/o:b===t?2+(e-l)/o:4+(l-t)/o:0;return{h:ae(60*(n<0?n+6:n)),s:ae(b?o/b*100:0),v:ae(b/255*100),a:d}};var ND=Cc.default.memo(function(c){var l=c.hue,t=c.onChange,e=er(["react-colorful__hue",c.className]);return Cc.default.createElement("div",{className:e},Cc.default.createElement(bJ,{onMove:function(d){t({h:360*d.left})},onKey:function(d){t({h:n0(l+360*d.left,0,360)})},"aria-label":"Hue","aria-valuenow":ae(l),"aria-valuemax":"360","aria-valuemin":"0"},Cc.default.createElement(oJ,{className:"react-colorful__hue-pointer",left:l/360,color:eJ({h:l,s:100,v:100,a:1})})))}),fD=Cc.default.memo(function(c){var l=c.hsva,t=c.onChange,e={backgroundColor:eJ({h:l.h,s:100,v:100,a:1})};return Cc.default.createElement("div",{className:"react-colorful__saturation",style:e},Cc.default.createElement(bJ,{onMove:function(d){t({s:100*d.left,v:100-100*d.top})},onKey:function(d){t({s:n0(l.s+100*d.left,0,100),v:n0(l.v-100*d.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+ae(l.s)+"%, Brightness "+ae(l.v)+"%"},Cc.default.createElement(oJ,{className:"react-colorful__saturation-pointer",top:1-l.v/100,left:l.s/100,color:eJ(l)})))}),wuc=function(c,l){if(c===l)return!0;for(var t in c)if(c[t]!==l[t])return!1;return!0},SD=function(c,l){return c.replace(/\s/g,"")===l.replace(/\s/g,"")};function kD(c,l,t){var e=lJ(t),d=(0,Cc.useState)(function(){return c.toHsva(l)}),b=d[0],o=d[1],n=(0,Cc.useRef)({color:l,hsva:b});(0,Cc.useEffect)(function(){if(!c.equal(l,n.current.color)){var X=c.toHsva(l);n.current={hsva:X,color:l},o(X)}},[l,c]),(0,Cc.useEffect)(function(){var X;wuc(b,n.current.hsva)||c.equal(X=c.fromHsva(b),n.current.color)||(n.current={hsva:b,color:X},e(X))},[b,c,e]);var G=(0,Cc.useCallback)(function(X){o(function(i){return Object.assign({},i,X)})},[]);return[b,G]}var Tuc,Duc=typeof window<"u"?Cc.useLayoutEffect:Cc.useEffect,Luc=function(){return Tuc||(typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0)};var hD=new Map,zD=function(c){Duc(function(){var l=c.current?c.current.ownerDocument:document;if(l!==void 0&&!hD.has(l)){var t=l.createElement("style");t.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,hD.set(l,t);var e=Luc();e&&t.setAttribute("nonce",e),l.head.appendChild(t)}},[])},Uuc=function(c){var l=c.className,t=c.colorModel,e=c.color,d=e===void 0?t.defaultColor:e,b=c.onChange,o=dJ(c,["className","colorModel","color","onChange"]),n=(0,Cc.useRef)(null);zD(n);var G=kD(t,d,b),X=G[0],i=G[1],a=er(["react-colorful",l]);return Cc.default.createElement("div",G0({},o,{ref:n,className:a}),Cc.default.createElement(fD,{hsva:X,onChange:i}),Cc.default.createElement(ND,{hue:X.h,onChange:i,className:"react-colorful__last-control"}))};var juc=function(c){var l=c.className,t=c.hsva,e=c.onChange,d={backgroundImage:"linear-gradient(90deg, "+cJ(Object.assign({},t,{a:0}))+", "+cJ(Object.assign({},t,{a:1}))+")"},b=er(["react-colorful__alpha",l]),o=ae(100*t.a);return Cc.default.createElement("div",{className:b},Cc.default.createElement("div",{className:"react-colorful__alpha-gradient",style:d}),Cc.default.createElement(bJ,{onMove:function(n){e({a:n.left})},onKey:function(n){e({a:n0(t.a+n.left)})},"aria-label":"Alpha","aria-valuetext":o+"%","aria-valuenow":o,"aria-valuemin":"0","aria-valuemax":"100"},Cc.default.createElement(oJ,{className:"react-colorful__alpha-pointer",left:t.a,color:cJ(t)})))},Euc=function(c){var l=c.className,t=c.colorModel,e=c.color,d=e===void 0?t.defaultColor:e,b=c.onChange,o=dJ(c,["className","colorModel","color","onChange"]),n=(0,Cc.useRef)(null);zD(n);var G=kD(t,d,b),X=G[0],i=G[1],a=er(["react-colorful",l]);return Cc.default.createElement("div",G0({},o,{ref:n,className:a}),Cc.default.createElement(fD,{hsva:X,onChange:i}),Cc.default.createElement(ND,{hue:X.h,onChange:i}),Cc.default.createElement(juc,{hsva:X,onChange:i,className:"react-colorful__last-control"}))};var Muc={defaultColor:"rgba(0, 0, 0, 1)",toHsva:vD,fromHsva:function(c){var l=FD(c);return"rgba("+l.r+", "+l.g+", "+l.b+", "+l.a+")"},equal:SD},AD=function(c){return Cc.default.createElement(Euc,G0({},c,{colorModel:Muc}))};var Puc={defaultColor:"rgb(0, 0, 0)",toHsva:Ouc,fromHsva:function(c){var l=FD(c);return"rgb("+l.r+", "+l.g+", "+l.b+")"},equal:SD},OD=function(c){return Cc.default.createElement(Uuc,G0({},c,{colorModel:Puc}))};var QD=u(Y(),1),wD=u(V(),1),TD=({color:c,enableAlpha:l,onChange:t})=>{let e=l?AD:OD,d=(0,QD.useMemo)(()=>c.toRgbString(),[c]);return(0,wD.jsx)(e,{color:d,onChange:b=>{t(Rc(b))},onPointerDown:({currentTarget:b,pointerId:o})=>{b.setPointerCapture(o)},onPointerUp:({currentTarget:b,pointerId:o})=>{b.releasePointerCapture(o)}})};var Xo=u(V(),1);Fe([ve]);var Kuc=[{label:"RGB",value:"rgb"},{label:"HSL",value:"hsl"},{label:"Hex",value:"hex"}],_uc=(c,l)=>{let{enableAlpha:t=!1,color:e,onChange:d,defaultValue:b="#fff",copyFormat:o,...n}=cc(c,"ColorPicker"),[G,X]=de({onChange:d,value:e,defaultValue:b}),i=(0,ai.useMemo)(()=>Rc(G||""),[G]),a=(0,DD.useDebounce)(X),m=(0,ai.useCallback)(g=>{a(g.toHex())},[a]),[x,s]=(0,ai.useState)(o||"hex"),r=(0,ai.useCallback)(g=>{let Z=g.clipboardData?.getData("text")?.trim();if(!Z)return;let H=Rc(Z);if(!H.isValid())return;m(H);let R={hex:"hex",rgb:"rgb",hsl:"hsl"},W=String(oA(Z)),I=R[W];I&&s(I),g.stopPropagation(),g.preventDefault()},[m,s]);return(0,Xo.jsxs)(HD,{ref:l,...n,onPasteCapture:r,children:[(0,Xo.jsx)(TD,{onChange:m,color:i,enableAlpha:t}),(0,Xo.jsxs)(rD,{children:[(0,Xo.jsxs)(gD,{justify:"space-between",children:[(0,Xo.jsx)(xD,{size:"compact",options:Kuc,value:x,onChange:g=>s(g),label:(0,LD.__)("Color format"),hideLabelFromVision:!0,variant:"minimal"}),(0,Xo.jsx)(ID,{color:i,colorType:o||x})]}),(0,Xo.jsx)(ZD,{direction:"column",gap:2,children:(0,Xo.jsx)(VD,{colorType:x,color:i,onChange:m,enableAlpha:t})})]})]})},quc=tc(_uc,"ColorPicker"),UD=quc;var jD=u(Y(),1);function $uc(c){return typeof c.onChangeComplete<"u"||typeof c.disableAlpha<"u"||typeof c.color?.hex=="string"}function c0c(c){if(c!==void 0){if(typeof c=="string")return c;if(c.hex)return c.hex}}var l0c=bG(c=>{let l=Rc(c),t=l.toHex(),e=l.toRgb(),d=l.toHsv(),b=l.toHsl();return{hex:t,rgb:e,hsv:d,hsl:b,source:"hex",oldHue:b.h}});function ED(c){let{onChangeComplete:l}=c,t=(0,jD.useCallback)(e=>{l(l0c(e))},[l]);return $uc(c)?{color:c0c(c.color),enableAlpha:!c.disableAlpha,onChange:t}:{...c,color:c.color,enableAlpha:c.enableAlpha,onChange:c.onChange}}var MD=u(V(),1),io=c=>(0,MD.jsx)(UD,{...ED(c)});var lL=u(dc(),1),tL=u(nc(),1),dr=u(Y(),1);var PD=u(Y(),1),ui=(0,PD.createContext)({});ui.displayName="CircularOptionPickerContext";var KD=u(dc(),1),RG=u(Y(),1);var Xn=u(V(),1);function t0c(c,l){let{isPressed:t,label:e,...d}=c;return(0,Xn.jsx)(lc,{__next40pxDefaultSize:!0,...d,"aria-pressed":t,ref:l,label:e})}var e0c=(0,RG.forwardRef)(t0c);function d0c(c,l){let{id:t,isSelected:e,label:d,...b}=c,{setActiveId:o,activeId:n}=(0,RG.useContext)(ui);return(0,RG.useEffect)(()=>{e&&!n&&window.setTimeout(()=>o?.(t),0)},[e,o,n,t]),(0,Xn.jsx)(Qt.Item,{render:(0,Xn.jsx)(lc,{__next40pxDefaultSize:!0,...b,role:"option","aria-selected":!!e,ref:l,label:d}),id:t})}var b0c=(0,RG.forwardRef)(d0c);function nJ({className:c,isSelected:l,selectedIconProps:t={},tooltipText:e,...d}){let{baseId:b,setActiveId:o}=(0,RG.useContext)(ui),G={id:(0,KD.useInstanceId)(nJ,b||"components-circular-option-picker__option"),className:"components-circular-option-picker__option",...d},i=o!==void 0?(0,Xn.jsx)(b0c,{...G,label:e,isSelected:l}):(0,Xn.jsx)(e0c,{...G,label:e,isPressed:l});return(0,Xn.jsxs)("div",{className:Q(c,"components-circular-option-picker__option-wrapper"),children:[i,l&&(0,Xn.jsx)(Cl,{icon:jt,...t})]})}var _D=u(V(),1);function qD({className:c,options:l,...t}){let e="aria-label"in t||"aria-labelledby"in t?"group":void 0;return(0,_D.jsx)("div",{...t,role:e,className:Q("components-circular-option-picker__option-group","components-circular-option-picker__swatches",c),children:l})}var HW=u(V(),1);function $D({buttonProps:c,className:l,dropdownProps:t,linkText:e}){return(0,HW.jsx)(no,{className:Q("components-circular-option-picker__dropdown-link-action",l),renderToggle:({isOpen:d,onToggle:b})=>(0,HW.jsx)(lc,{"aria-expanded":d,"aria-haspopup":"true",onClick:b,variant:"link",...c,children:e}),...t})}function cL({className:c,children:l,...t}){return(0,HW.jsx)(lc,{__next40pxDefaultSize:!0,className:Q("components-circular-option-picker__clear",c),variant:"tertiary",...t,children:l})}var ao=u(V(),1);function o0c(c){let{actions:l,options:t,baseId:e,className:d,loop:b=!0,children:o,...n}=c,[G,X]=(0,dr.useState)(void 0),i=(0,dr.useMemo)(()=>({baseId:e,activeId:G,setActiveId:X}),[e,G,X]);return(0,ao.jsx)("div",{className:d,children:(0,ao.jsxs)(ui.Provider,{value:i,children:[(0,ao.jsx)(Qt,{...n,id:e,focusLoop:b,rtl:(0,tL.isRTL)(),role:"listbox",activeId:G,setActiveId:X,children:t}),o,l]})})}function n0c(c){let{actions:l,options:t,children:e,baseId:d,...b}=c,o=(0,dr.useMemo)(()=>({baseId:d}),[d]);return(0,ao.jsx)("div",{...b,role:"group",id:d,children:(0,ao.jsxs)(ui.Provider,{value:o,children:[t,e,l]})})}function mi(c){let{asButtons:l,actions:t,options:e,children:d,className:b,...o}=c,n=(0,lL.useInstanceId)(mi,"components-circular-option-picker",o.id),G=l?n0c:o0c,X=t?(0,ao.jsx)("div",{className:"components-circular-option-picker__custom-clear-wrapper",children:t}):void 0,i=(0,ao.jsx)("div",{className:"components-circular-option-picker__swatches",children:e});return(0,ao.jsx)(G,{...o,baseId:n,className:Q("components-circular-option-picker",b),actions:X,options:i,children:d})}mi.Option=nJ;mi.OptionGroup=qD;mi.ButtonAction=cL;mi.DropdownLinkAction=$D;mi.displayName="CircularOptionPicker";var eL=mi;var dL=u(nc(),1);function xi(c,l,t,e){let d=c?{asButtons:!0}:{asButtons:!1,loop:l},b={"aria-labelledby":e,"aria-label":e?void 0:t||(0,dL.__)("Custom color picker")};return{metaProps:d,labelProps:b}}var ue=eL;function bL(c){let{expanded:l=!1,alignment:t="stretch",...e}=cc(c,"VStack");return Us({direction:"column",expanded:l,alignment:t,...e})}var oL=u(V(),1);function G0c(c,l){let t=bL(c);return(0,oL.jsx)(ic,{...t,ref:l})}var X0c=tc(G0c,"VStack"),al=X0c;function nL(c){let{as:l,level:t=2,color:e=D.theme.foreground,isBlock:d=!0,weight:b=w.fontWeightHeading,...o}=cc(c,"Heading"),n=l||`h${t}`,G={};return typeof n=="string"&&n[0]!=="h"&&(G.role="heading",G["aria-level"]=typeof t=="string"?parseInt(t):t),{...zs({color:e,isBlock:d,weight:b,size:hO(t),...o}),...G,as:n}}var GL=u(V(),1);function i0c(c,l){let t=nL(c);return(0,GL.jsx)(ic,{...t,ref:l})}var a0c=tc(i0c,"Heading"),td=a0c;var RW=N(td,{target:"ev9wop70"})("text-transform:uppercase;line-height:24px;font-weight:",w.fontWeightMedium,";&&&{font-size:11px;margin-bottom:0;}");var u0c=({paddingSize:c="small"})=>{if(c==="none")return;let l={small:z(2),medium:z(4)};return O("padding:",l[c]||l.small,";","")},XL=N("div",{target:"eovvns30"})("margin-left:",z(-2),";margin-right:",z(-2),";&:first-of-type{margin-top:",z(-2),";}&:last-of-type{margin-bottom:",z(-2),";}",u0c,";");var iL=u(V(),1);function m0c(c,l){let{paddingSize:t="small",...e}=cc(c,"DropdownContentWrapper");return(0,iL.jsx)(XL,{...e,paddingSize:t,ref:l})}var x0c=tc(m0c,"DropdownContentWrapper"),an=x0c;var aL=u(nc(),1);Fe([ve,t0]);var uL=c=>{let l=/var\(/.test(c??""),t=/color-mix\(/.test(c??"");return!l&&!t},mL=(c,l=[],t=!1)=>{if(!c)return"";let e=c?uL(c):!1,d=e?Rc(c).toHex():c,b=t?l:[{colors:l}];for(let{colors:o}of b)for(let{name:n,color:G}of o){let X=e?Rc(G).toHex():G;if(d===X)return n}return(0,aL.__)("Custom")},s0c=c=>Array.isArray(c.colors)&&!("color"in c),IW=c=>c.length>0&&c.every(l=>s0c(l)),xL=(c,l)=>{if(!c||!l||uL(c))return c;let{ownerDocument:t}=l,{defaultView:e}=t,d=e?.getComputedStyle(l).backgroundColor;return d?Rc(d).toHex():c};var kl=u(V(),1);Fe([ve,t0]);function rL({className:c,clearColor:l,colors:t,onChange:e,value:d,...b}){let o=(0,nb.useMemo)(()=>t.map(({color:n,name:G},X)=>{let i=Rc(n),a=d===n;return(0,kl.jsx)(ue.Option,{isSelected:a,selectedIconProps:a?{fill:i.contrast()>i.contrast("#000")?"#fff":"#000"}:{},tooltipText:G||(0,un.sprintf)((0,un.__)("Color code: %s"),n),style:{backgroundColor:n,color:n},onClick:a?l:()=>e(n,X)},`${n}-${X}`)}),[t,d,e,l]);return(0,kl.jsx)(ue.OptionGroup,{className:c,options:o,...b})}function gL({className:c,clearColor:l,colors:t,onChange:e,value:d,headingLevel:b}){let o=(0,sL.useInstanceId)(gL,"color-palette");return t.length===0?null:(0,kl.jsx)(al,{spacing:3,className:c,children:t.map(({name:n,colors:G},X)=>{let i=`${o}-${X}`;return(0,kl.jsxs)(al,{spacing:2,children:[(0,kl.jsx)(RW,{id:i,level:b,children:n}),(0,kl.jsx)(rL,{clearColor:l,colors:G,onChange:a=>e(a,X),value:d,"aria-labelledby":i})]},X)})})}function GJ({isRenderedInSidebar:c,popoverProps:l,...t}){let e=(0,nb.useMemo)(()=>({shift:!0,resize:!1,...c?{placement:"left-start",offset:34}:{placement:"bottom",offset:8},...l}),[c,l]);return(0,kl.jsx)(no,{contentClassName:"components-color-palette__custom-color-dropdown-content",popoverProps:e,...t})}function r0c(c,l){let{asButtons:t,loop:e,clearable:d=!0,colors:b=[],disableCustomColors:o=!1,enableAlpha:n=!1,onChange:G,value:X,__experimentalIsRenderedInSidebar:i=!1,headingLevel:a=2,"aria-label":m,"aria-labelledby":x,...s}=c,[r,g]=(0,nb.useState)(X),Z=(0,nb.useCallback)(()=>G(void 0),[G]),H=(0,nb.useCallback)(k=>{g(xL(X,k))},[X]),R=IW(b),W=(0,nb.useMemo)(()=>mL(X,b,R),[X,b,R]),I=()=>(0,kl.jsx)(an,{paddingSize:"none",children:(0,kl.jsx)(io,{color:r,onChange:k=>G(k),enableAlpha:n})}),B=X?.startsWith("#"),p=X?.replace(/^var\((.+)\)$/,"$1"),y=p?(0,un.sprintf)((0,un.__)('Custom color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'),W,p):(0,un.__)("Custom color picker"),h={clearColor:Z,onChange:G,value:X},C=!!d&&(0,kl.jsx)(ue.ButtonAction,{onClick:Z,accessibleWhenDisabled:!0,disabled:!X,children:(0,un.__)("Clear")}),{metaProps:J,labelProps:f}=xi(t,e,m,x);return(0,kl.jsxs)(al,{spacing:3,ref:l,...s,children:[!o&&(0,kl.jsx)(GJ,{isRenderedInSidebar:i,renderContent:I,renderToggle:({isOpen:k,onToggle:F})=>(0,kl.jsxs)(al,{className:"components-color-palette__custom-color-wrapper",spacing:0,children:[(0,kl.jsx)("button",{ref:H,className:"components-color-palette__custom-color-button","aria-expanded":k,"aria-haspopup":"true",onClick:F,"aria-label":y,style:{background:X},type:"button"}),(0,kl.jsxs)(al,{className:"components-color-palette__custom-color-text-wrapper",spacing:.5,children:[(0,kl.jsx)(cn,{className:"components-color-palette__custom-color-name",children:X?W:(0,un.__)("No color selected")}),(0,kl.jsx)(cn,{className:Q("components-color-palette__custom-color-value",{"components-color-palette__custom-color-value--is-hex":B}),children:p})]})]})}),(b.length>0||C)&&(0,kl.jsx)(ue,{...J,...f,actions:C,options:R?(0,kl.jsx)(gL,{...h,headingLevel:a,colors:b,value:X}):(0,kl.jsx)(rL,{...h,colors:b,value:X})})]})}var ZL=(0,nb.forwardRef)(r0c);ZL.displayName="ColorPalette";var IG=ZL;var si=u(Y(),1);var br=N(Yt,{target:"e1bagdl32"})("&&&{input{display:block;width:100%;}",yd,"{transition:box-shadow 0.1s linear;}}"),HL=({selectSize:c})=>({small:O("box-sizing:border-box;padding:2px 1px;width:20px;font-size:8px;line-height:1;letter-spacing:-0.5px;text-transform:uppercase;text-align-last:center;&:not( :disabled ){color:",D.gray[800],";}",""),default:O("box-sizing:border-box;min-width:24px;max-width:48px;height:24px;margin-inline-end:",z(2),";padding:",z(1),";font-size:13px;line-height:1;text-align-last:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;field-sizing:content;&:not( :disabled ){color:",D.theme.accent,";}","")})[c],RL=N("div",{target:"e1bagdl31"})("&&&{pointer-events:none;",HL,";color:",D.gray[900],";}"),g0c=({selectSize:c="default"})=>({small:O("height:100%;border:1px solid transparent;transition:box-shadow 0.1s linear,border 0.1s linear;",Fc({borderTopLeftRadius:0,borderBottomLeftRadius:0})()," &:not(:disabled):hover{background-color:",D.gray[100],";}&:focus{border:1px solid ",D.ui.borderFocus,";box-shadow:inset 0 0 0 ",w.borderWidth+" "+D.ui.borderFocus,";outline-offset:0;outline:2px solid transparent;z-index:1;}",""),default:O("display:flex;justify-content:center;align-items:center;&:where( :not( :disabled ) ):hover{box-shadow:0 0 0 ",w.borderWidth+" "+D.ui.borderFocus,";outline:",w.borderWidth," solid transparent;}&:focus{box-shadow:0 0 0 ",w.borderWidthFocus+" "+D.ui.borderFocus,";outline:",w.borderWidthFocus," solid transparent;}","")})[c],WW=N("select",{target:"e1bagdl30"})("&&&{appearance:none;background:transparent;border-radius:",w.radiusXSmall,";border:none;display:block;outline:none;margin:0;min-height:auto;font-family:inherit;",HL,";",g0c,";&:not( :disabled ){cursor:pointer;}}");var Z0c=O("box-shadow:inset ",w.controlBoxShadowFocus,";",""),IL=O("border:0;padding:0;margin:0;",qe,";",""),WL=()=>O(br,"{flex:1 1 40%;}&& ",WW,"{min-height:0;}",""),pL=O(br,"{flex:0 0 auto;}",""),BL=c=>O("height:",c==="__unstable-large"?"40px":"30px",";",""),yL=O("background:#fff;&&>button{aspect-ratio:1;padding:0;display:flex;align-items:center;justify-content:center;",Fc({borderRadius:"2px 0 0 2px"},{borderRadius:"0 2px 2px 0"})()," border:",w.borderWidth," solid ",D.ui.border,";&:focus,&:hover:not( :disabled ){",Z0c," border-color:",D.ui.borderFocus,";z-index:1;position:relative;}}",""),H0c=c=>{let{color:l,style:t}=c||{},e=t&&t!=="none"?D.gray[300]:void 0;return O("border-style:",t==="none"?"solid":t,";border-color:",l||e,";","")},VL=(c,l)=>{let{style:t}=c||{};return O("border-radius:",w.radiusFull,";border:2px solid transparent;",t?H0c(c):void 0," width:",l==="__unstable-large"?"24px":"22px",";height:",l==="__unstable-large"?"24px":"22px",";padding:",l==="__unstable-large"?"2px":"1px",";&>span{height:",z(4),";width:",z(4),`;background:linear-gradient(
				-45deg,
				transparent 48%,
				rgb( 0 0 0 / 20% ) 48%,
				rgb( 0 0 0 / 20% ) 52%,
				transparent 52%
			);}`,"")},R0c=28,I0c=12,CL=O("width:",R0c*6+I0c*5,"px;>div:first-of-type>",cd,"{margin-bottom:0;}&& ",cd,"+button:not( .has-text ){min-width:24px;padding:0;}",""),JL=O("",""),hL=O("",""),YL={name:"1ghe26v",styles:"display:flex;justify-content:flex-end;margin-top:12px"},FL=()=>O("flex:1 1 60%;",Fc({marginRight:z(3)})(),";","");var mc=u(nc(),1),NL=u(Y(),1),jc=NL.Platform.OS==="web",uo={px:{value:"px",label:jc?"px":(0,mc.__)("Pixels (px)"),a11yLabel:(0,mc.__)("Pixels (px)"),step:1},"%":{value:"%",label:jc?"%":(0,mc.__)("Percentage (%)"),a11yLabel:(0,mc.__)("Percent (%)"),step:.1},em:{value:"em",label:jc?"em":(0,mc.__)("Relative to parent font size (em)"),a11yLabel:(0,mc._x)("ems","Relative to parent font size (em)"),step:.01},rem:{value:"rem",label:jc?"rem":(0,mc.__)("Relative to root font size (rem)"),a11yLabel:(0,mc._x)("rems","Relative to root font size (rem)"),step:.01},vw:{value:"vw",label:jc?"vw":(0,mc.__)("Viewport width (vw)"),a11yLabel:(0,mc.__)("Viewport width (vw)"),step:.1},vh:{value:"vh",label:jc?"vh":(0,mc.__)("Viewport height (vh)"),a11yLabel:(0,mc.__)("Viewport height (vh)"),step:.1},vmin:{value:"vmin",label:jc?"vmin":(0,mc.__)("Viewport smallest dimension (vmin)"),a11yLabel:(0,mc.__)("Viewport smallest dimension (vmin)"),step:.1},vmax:{value:"vmax",label:jc?"vmax":(0,mc.__)("Viewport largest dimension (vmax)"),a11yLabel:(0,mc.__)("Viewport largest dimension (vmax)"),step:.1},ch:{value:"ch",label:jc?"ch":(0,mc.__)("Width of the zero (0) character (ch)"),a11yLabel:(0,mc.__)("Width of the zero (0) character (ch)"),step:.01},ex:{value:"ex",label:jc?"ex":(0,mc.__)("x-height of the font (ex)"),a11yLabel:(0,mc.__)("x-height of the font (ex)"),step:.01},cm:{value:"cm",label:jc?"cm":(0,mc.__)("Centimeters (cm)"),a11yLabel:(0,mc.__)("Centimeters (cm)"),step:.001},mm:{value:"mm",label:jc?"mm":(0,mc.__)("Millimeters (mm)"),a11yLabel:(0,mc.__)("Millimeters (mm)"),step:.1},in:{value:"in",label:jc?"in":(0,mc.__)("Inches (in)"),a11yLabel:(0,mc.__)("Inches (in)"),step:.001},pc:{value:"pc",label:jc?"pc":(0,mc.__)("Picas (pc)"),a11yLabel:(0,mc.__)("Picas (pc)"),step:1},pt:{value:"pt",label:jc?"pt":(0,mc.__)("Points (pt)"),a11yLabel:(0,mc.__)("Points (pt)"),step:1},svw:{value:"svw",label:jc?"svw":(0,mc.__)("Small viewport width (svw)"),a11yLabel:(0,mc.__)("Small viewport width (svw)"),step:.1},svh:{value:"svh",label:jc?"svh":(0,mc.__)("Small viewport height (svh)"),a11yLabel:(0,mc.__)("Small viewport height (svh)"),step:.1},svi:{value:"svi",label:jc?"svi":(0,mc.__)("Viewport smallest size in the inline direction (svi)"),a11yLabel:(0,mc.__)("Small viewport width or height (svi)"),step:.1},svb:{value:"svb",label:jc?"svb":(0,mc.__)("Viewport smallest size in the block direction (svb)"),a11yLabel:(0,mc.__)("Small viewport width or height (svb)"),step:.1},svmin:{value:"svmin",label:jc?"svmin":(0,mc.__)("Small viewport smallest dimension (svmin)"),a11yLabel:(0,mc.__)("Small viewport smallest dimension (svmin)"),step:.1},lvw:{value:"lvw",label:jc?"lvw":(0,mc.__)("Large viewport width (lvw)"),a11yLabel:(0,mc.__)("Large viewport width (lvw)"),step:.1},lvh:{value:"lvh",label:jc?"lvh":(0,mc.__)("Large viewport height (lvh)"),a11yLabel:(0,mc.__)("Large viewport height (lvh)"),step:.1},lvi:{value:"lvi",label:jc?"lvi":(0,mc.__)("Large viewport width or height (lvi)"),a11yLabel:(0,mc.__)("Large viewport width or height (lvi)"),step:.1},lvb:{value:"lvb",label:jc?"lvb":(0,mc.__)("Large viewport width or height (lvb)"),a11yLabel:(0,mc.__)("Large viewport width or height (lvb)"),step:.1},lvmin:{value:"lvmin",label:jc?"lvmin":(0,mc.__)("Large viewport smallest dimension (lvmin)"),a11yLabel:(0,mc.__)("Large viewport smallest dimension (lvmin)"),step:.1},dvw:{value:"dvw",label:jc?"dvw":(0,mc.__)("Dynamic viewport width (dvw)"),a11yLabel:(0,mc.__)("Dynamic viewport width (dvw)"),step:.1},dvh:{value:"dvh",label:jc?"dvh":(0,mc.__)("Dynamic viewport height (dvh)"),a11yLabel:(0,mc.__)("Dynamic viewport height (dvh)"),step:.1},dvi:{value:"dvi",label:jc?"dvi":(0,mc.__)("Dynamic viewport width or height (dvi)"),a11yLabel:(0,mc.__)("Dynamic viewport width or height (dvi)"),step:.1},dvb:{value:"dvb",label:jc?"dvb":(0,mc.__)("Dynamic viewport width or height (dvb)"),a11yLabel:(0,mc.__)("Dynamic viewport width or height (dvb)"),step:.1},dvmin:{value:"dvmin",label:jc?"dvmin":(0,mc.__)("Dynamic viewport smallest dimension (dvmin)"),a11yLabel:(0,mc.__)("Dynamic viewport smallest dimension (dvmin)"),step:.1},dvmax:{value:"dvmax",label:jc?"dvmax":(0,mc.__)("Dynamic viewport largest dimension (dvmax)"),a11yLabel:(0,mc.__)("Dynamic viewport largest dimension (dvmax)"),step:.1},svmax:{value:"svmax",label:jc?"svmax":(0,mc.__)("Small viewport largest dimension (svmax)"),a11yLabel:(0,mc.__)("Small viewport largest dimension (svmax)"),step:.1},lvmax:{value:"lvmax",label:jc?"lvmax":(0,mc.__)("Large viewport largest dimension (lvmax)"),a11yLabel:(0,mc.__)("Large viewport largest dimension (lvmax)"),step:.1}},pW=Object.values(uo),BW=[uo.px,uo["%"],uo.em,uo.rem,uo.vw,uo.vh],W0c=uo.px;function XJ(c,l,t){let e=l?`${c??""}${l}`:c;return ql(e,t)}function yW(c){return Array.isArray(c)&&!!c.length}function ql(c,l=pW){let t,e;if(typeof c<"u"||c===null){t=`${c}`.trim();let n=parseFloat(t);e=isFinite(n)?n:void 0}let b=t?.match(/[\d.\-\+]*\s*(.*)/)?.[1]?.toLowerCase(),o;return yW(l)?o=l.find(G=>G.value===b)?.value:o=W0c.value,[e,o]}function fL(c,l,t,e){let[d,b]=ql(c,l),o=d??t,n=b||e;return!n&&yW(l)&&(n=l[0].value),[o,n]}function p0c(c=[],l){return Array.isArray(l)?l.filter(t=>c.includes(t.value)):[]}var or=({units:c=pW,availableUnits:l=[],defaultValues:t})=>{let e=p0c(l,c);return t?e.map(d=>{let[b]=t[d.value]?ql(t[d.value]):[];return{...d,default:b}}):e};function SL(c,l,t=pW){let e=Array.isArray(t)?[...t]:[],[,d]=XJ(c,l,pW);return d&&!e.some(b=>b.value===d)&&uo[d]&&e.unshift(uo[d]),e}function kL(c){let{border:l,className:t,colors:e=[],enableAlpha:d=!1,enableStyle:b=!0,onChange:o,previousStyleSelection:n,size:G="default",__experimentalIsRenderedInSidebar:X=!1,...i}=cc(c,"BorderControlDropdown"),[a]=ql(l?.width),m=a===0,x=p=>{let y=l?.style==="none"?n:l?.style,h=m&&p?"1px":l?.width;o({color:p,style:y,width:h})},s=p=>{let y=m&&p?"1px":l?.width;o({...l,style:p,width:y})},r=()=>{o({...l,color:void 0,style:void 0})},g=Xc(),Z=(0,si.useMemo)(()=>g(yL,t),[t,g]),H=(0,si.useMemo)(()=>g(hL),[g]),R=(0,si.useMemo)(()=>g(VL(l,G)),[l,g,G]),W=(0,si.useMemo)(()=>g(CL),[g]),I=(0,si.useMemo)(()=>g(JL),[g]),B=(0,si.useMemo)(()=>g(YL),[g]);return{...i,border:l,className:Z,colors:e,enableAlpha:d,enableStyle:b,indicatorClassName:H,indicatorWrapperClassName:R,onColorChange:x,onStyleChange:s,onReset:r,popoverContentClassName:I,popoverControlsClassName:W,resetButtonWrapperClassName:B,size:G,__experimentalIsRenderedInSidebar:X}}var me=u(V(),1),VW=c=>c.replace(/^var\((.+)\)$/,"$1"),B0c=(c,l)=>{if(!(!c||!l)){if(IW(l)){let t;return l.some(e=>e.colors.some(d=>d.color===c?(t=d,!0):!1)),t}return l.find(t=>t.color===c)}},y0c=(c,l,t,e)=>{if(e){if(l){let d=VW(l.color);return t?(0,ot.sprintf)((0,ot.__)('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s". The currently selected style is "%3$s".'),l.name,d,t):(0,ot.sprintf)((0,ot.__)('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s".'),l.name,d)}if(c){let d=VW(c);return t?(0,ot.sprintf)((0,ot.__)('Border color and style picker. The currently selected color has a value of "%1$s". The currently selected style is "%2$s".'),d,t):(0,ot.sprintf)((0,ot.__)('Border color and style picker. The currently selected color has a value of "%s".'),d)}return(0,ot.__)("Border color and style picker.")}return l?(0,ot.sprintf)((0,ot.__)('Border color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'),l.name,VW(l.color)):c?(0,ot.sprintf)((0,ot.__)('Border color picker. The currently selected color has a value of "%s".'),VW(c)):(0,ot.__)("Border color picker.")},V0c=(c,l)=>{let{__experimentalIsRenderedInSidebar:t,border:e,colors:d,disableCustomColors:b,enableAlpha:o,enableStyle:n,indicatorClassName:G,indicatorWrapperClassName:X,isStyleSettable:i,onReset:a,onColorChange:m,onStyleChange:x,popoverContentClassName:s,popoverControlsClassName:r,resetButtonWrapperClassName:g,size:Z,__unstablePopoverProps:H,...R}=kL(c),{color:W,style:I}=e||{},B=B0c(W,d),p=y0c(W,B,I,n),y=W||I&&I!=="none",h=t?"bottom left":void 0;return(0,me.jsx)(no,{renderToggle:({onToggle:f})=>(0,me.jsx)(lc,{onClick:f,variant:"tertiary","aria-label":p,tooltipPosition:h,label:(0,ot.__)("Border color and style picker"),showTooltip:!0,__next40pxDefaultSize:Z==="__unstable-large",children:(0,me.jsx)("span",{className:X,children:(0,me.jsx)(oo,{className:G,colorValue:W})})}),renderContent:()=>(0,me.jsx)(me.Fragment,{children:(0,me.jsxs)(an,{paddingSize:"medium",children:[(0,me.jsxs)(al,{className:r,spacing:6,children:[(0,me.jsx)(IG,{className:s,value:W,onChange:m,colors:d,disableCustomColors:b,__experimentalIsRenderedInSidebar:t,clearable:!1,enableAlpha:o}),n&&i&&(0,me.jsx)(MC,{label:(0,ot.__)("Style"),value:I,onChange:x})]}),(0,me.jsx)("div",{className:g,children:(0,me.jsx)(lc,{variant:"tertiary",onClick:()=>{a()},disabled:!y,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,ot.__)("Reset")})})]})}),popoverProps:{...H},...R,ref:l})},C0c=tc(V0c,"BorderControlDropdown"),iJ=C0c;var OL=u(ml(),1),WG=u(Y(),1),QL=u(nc(),1);var zL=u(Y(),1);var CW=u(V(),1);function J0c({className:c,isUnitSelectTabbable:l=!0,onChange:t,size:e="default",unit:d="px",units:b=BW,...o},n){if(!yW(b)||b?.length===1)return(0,CW.jsx)(RL,{className:"components-unit-control__unit-label",selectSize:e,children:d});let G=i=>{let{value:a}=i.target,m=b.find(x=>x.value===a);t?.(a,{event:i,data:m})},X=Q("components-unit-control__select",c);return(0,CW.jsx)(WW,{ref:n,className:X,onChange:G,selectSize:e,tabIndex:l?void 0:-1,value:d,...o,children:b.map(i=>(0,CW.jsx)("option",{value:i.value,children:i.label},i.value))})}var AL=(0,zL.forwardRef)(J0c);var aJ=u(V(),1);function h0c(c,l){let{__unstableStateReducer:t,autoComplete:e="off",children:d,className:b,disabled:o=!1,disableUnits:n=!1,isPressEnterToChange:G=!1,isResetValueOnUnitChange:X=!1,isUnitSelectTabbable:i=!0,label:a,onChange:m,onUnitChange:x,size:s="default",unit:r,units:g=BW,value:Z,onFocus:H,__shouldNotWarnDeprecated36pxSize:R,...W}=Et(c);Lc({componentName:"UnitControl",__next40pxDefaultSize:W.__next40pxDefaultSize,size:s,__shouldNotWarnDeprecated36pxSize:R}),"unit"in c&&(0,OL.default)("UnitControl unit prop",{since:"5.6",hint:"The unit should be provided within the `value` prop.",version:"6.2"});let I=Z??void 0,[B,p]=(0,WG.useMemo)(()=>{let S=SL(I,r,g),[{value:U=""}={},...P]=S,bc=P.reduce((j,{value:ec})=>{let M=dn(ec?.substring(0,1)||"");return j.includes(M)?j:`${j}|${M}`},dn(U.substring(0,1)));return[S,new RegExp(`^(?:${bc})$`,"i")]},[I,r,g]),[y,h]=XJ(I,r,B),[C,J]=Ko(B.length===1?B[0].value:r,{initial:h,fallback:""});(0,WG.useEffect)(()=>{h!==void 0&&J(h)},[h,J]);let f=Q("components-unit-control","components-unit-control-wrapper",b),k=(S,U)=>{if(S===""||typeof S>"u"||S===null){m?.("",U);return}let P=fL(S,B,y,C).join("");m?.(P,U)},F=(S,U)=>{let{data:P}=U,bc=`${y??""}${S}`;X&&P?.default!==void 0&&(bc=`${P.default}${S}`),m?.(bc,U),x?.(S,U),J(S)},T;!n&&i&&B.length&&(T=S=>{W.onKeyDown?.(S),!S.metaKey&&!S.ctrlKey&&p.test(S.key)&&L.current?.focus()});let L=(0,WG.useRef)(null),v=n?null:(0,aJ.jsx)(AL,{ref:L,"aria-label":(0,QL.__)("Select unit"),disabled:o,isUnitSelectTabbable:i,onChange:F,size:["small","compact"].includes(s)||s==="default"&&!W.__next40pxDefaultSize?"small":"default",unit:C,units:B,onFocus:H,onBlur:c.onBlur}),A=W.step;return!A&&B&&(A=B.find(U=>U.value===C)?.step??1),(0,aJ.jsx)(br,{...W,__shouldNotWarnDeprecated36pxSize:!0,autoComplete:e,className:f,disabled:o,spinControls:"none",isPressEnterToChange:G,label:a,onKeyDown:T,onChange:k,ref:l,size:s,suffix:v,type:G?"text":"number",value:y??"",step:A,onFocus:H,__unstableStateReducer:t})}var wL=(0,WG.forwardRef)(h0c);wL.displayName="UnitControl";var mo=wL;var Gb=u(Y(),1);var TL=c=>{let l=c?.width!==void 0&&c.width!=="",t=c?.color!==void 0;return l||t};function DL(c){let{className:l,colors:t=[],isCompact:e,onChange:d,enableAlpha:b=!0,enableStyle:o=!0,shouldSanitizeBorder:n=!0,size:G="default",value:X,width:i,__experimentalIsRenderedInSidebar:a=!1,__next40pxDefaultSize:m,__shouldNotWarnDeprecated36pxSize:x,...s}=cc(c,"BorderControl");Lc({componentName:"BorderControl",__next40pxDefaultSize:m,size:G,__shouldNotWarnDeprecated36pxSize:x});let r=G==="default"&&m?"__unstable-large":G,[g,Z]=ql(X?.width),H=Z||"px",R=g===0,[W,I]=(0,Gb.useState)(),[B,p]=(0,Gb.useState)(),y=n?TL(X):!0,h=(0,Gb.useCallback)(v=>{if(n&&!TL(v)){d(void 0);return}d(v)},[d,n]),C=(0,Gb.useCallback)(v=>{let A=v===""?void 0:v,[S]=ql(v),U=S===0,P={...X,width:A};U&&!R&&(I(X?.color),p(X?.style),P.color=void 0,P.style="none"),!U&&R&&(P.color===void 0&&(P.color=W),P.style==="none"&&(P.style=B)),h(P)},[X,R,W,B,h]),J=(0,Gb.useCallback)(v=>{C(`${v}${H}`)},[C,H]),f=Xc(),k=(0,Gb.useMemo)(()=>f(IL,l),[l,f]),F=i;e&&(F=G==="__unstable-large"?"116px":"90px");let T=(0,Gb.useMemo)(()=>{let v=!!F&&pL,A=BL(r);return f(WL(),v,A)},[F,f,r]),L=(0,Gb.useMemo)(()=>f(FL()),[f]);return{...s,className:k,colors:t,enableAlpha:b,enableStyle:o,innerWrapperClassName:T,inputWidth:F,isStyleSettable:y,onBorderChange:h,onSliderChange:J,onWidthChange:C,previousStyleSelection:B,sliderClassName:L,value:X,widthUnit:H,widthValue:g,size:r,__experimentalIsRenderedInSidebar:a,__next40pxDefaultSize:m}}var Xb=u(V(),1),Y0c=c=>{let{label:l,hideLabelFromVision:t}=c;return l?t?(0,Xb.jsx)(Qc,{as:"legend",children:l}):(0,Xb.jsx)(cd,{as:"legend",children:l}):null},F0c=(c,l)=>{let{__next40pxDefaultSize:t=!1,colors:e,disableCustomColors:d,disableUnits:b,enableAlpha:o,enableStyle:n,hideLabelFromVision:G,innerWrapperClassName:X,inputWidth:i,isStyleSettable:a,label:m,onBorderChange:x,onSliderChange:s,onWidthChange:r,placeholder:g,__unstablePopoverProps:Z,previousStyleSelection:H,showDropdownHeader:R,size:W,sliderClassName:I,value:B,widthUnit:p,widthValue:y,withSlider:h,__experimentalIsRenderedInSidebar:C,...J}=DL(c);return(0,Xb.jsxs)(ic,{as:"fieldset",...J,ref:l,children:[(0,Xb.jsx)(Y0c,{label:m,hideLabelFromVision:G}),(0,Xb.jsxs)(Uc,{spacing:4,className:X,children:[(0,Xb.jsx)(mo,{__next40pxDefaultSize:t,__shouldNotWarnDeprecated36pxSize:!0,prefix:(0,Xb.jsx)(rt,{marginRight:1,marginBottom:0,children:(0,Xb.jsx)(iJ,{border:B,colors:e,__unstablePopoverProps:Z,disableCustomColors:d,enableAlpha:o,enableStyle:n,isStyleSettable:a,onChange:x,previousStyleSelection:H,__experimentalIsRenderedInSidebar:C,size:W})}),label:(0,uJ.__)("Border width"),hideLabelFromVision:!0,min:0,onChange:r,value:B?.width||"",placeholder:g,disableUnits:b,__unstableInputWidth:i,size:W}),h&&(0,Xb.jsx)(vd,{label:(0,uJ.__)("Border width"),hideLabelFromVision:!0,className:I,initialPosition:0,max:100,min:0,onChange:s,step:["px","%"].includes(p)?1:.1,value:y||void 0,withInputField:!1,__next40pxDefaultSize:t,__shouldNotWarnDeprecated36pxSize:!0})]})]})},v0c=tc(F0c,"BorderControl"),ib=v0c;var UL=u(Y(),1);var N0c={bottom:{alignItems:"flex-end",justifyContent:"center"},bottomLeft:{alignItems:"flex-start",justifyContent:"flex-end"},bottomRight:{alignItems:"flex-end",justifyContent:"flex-end"},center:{alignItems:"center",justifyContent:"center"},spaced:{alignItems:"center",justifyContent:"space-between"},left:{alignItems:"center",justifyContent:"flex-start"},right:{alignItems:"center",justifyContent:"flex-end"},stretch:{alignItems:"stretch"},top:{alignItems:"flex-start",justifyContent:"center"},topLeft:{alignItems:"flex-start",justifyContent:"flex-start"},topRight:{alignItems:"flex-start",justifyContent:"flex-end"}};function LL(c){return c?N0c[c]:{}}function jL(c){let{align:l,alignment:t,className:e,columnGap:d,columns:b=2,gap:o=3,isInline:n=!1,justify:G,rowGap:X,rows:i,templateColumns:a,templateRows:m,...x}=cc(c,"Grid"),s=Array.isArray(b)?b:[b],r=Is(s),g=Array.isArray(i)?i:[i],Z=Is(g),H=a||!!b&&`repeat( ${r}, 1fr )`,R=m||!!i&&`repeat( ${Z}, 1fr )`,W=Xc(),I=(0,UL.useMemo)(()=>{let B=LL(t),p=O({alignItems:l,display:n?"inline-grid":"grid",gap:`calc( ${w.gridBase} * ${o} )`,gridTemplateColumns:H||void 0,gridTemplateRows:R||void 0,gridRowGap:X,gridColumnGap:d,justifyContent:G,verticalAlign:n?"middle":void 0,...B},"","");return W(p,e)},[l,t,e,d,W,o,H,R,n,G,X]);return{...x,className:I}}var EL=u(V(),1);function f0c(c,l){let t=jL(c);return(0,EL.jsx)(ic,{...t,ref:l})}var S0c=tc(f0c,"Grid"),mn=S0c;var JW=u(Y(),1);function ML(c){let{className:l,colors:t=[],enableAlpha:e=!1,enableStyle:d=!0,size:b="default",__experimentalIsRenderedInSidebar:o=!1,...n}=cc(c,"BorderBoxControlSplitControls"),G=Xc(),X=(0,JW.useMemo)(()=>G(qw(b),l),[G,l,b]),i=(0,JW.useMemo)(()=>G($w,l),[G,l]),a=(0,JW.useMemo)(()=>G(cT(),l),[G,l]);return{...n,centeredClassName:i,className:X,colors:t,enableAlpha:e,enableStyle:d,rightAlignedClassName:a,size:b,__experimentalIsRenderedInSidebar:o}}var pG=u(V(),1),k0c=(c,l)=>{let{centeredClassName:t,colors:e,disableCustomColors:d,enableAlpha:b,enableStyle:o,onChange:n,popoverPlacement:G,popoverOffset:X,rightAlignedClassName:i,size:a="default",value:m,__experimentalIsRenderedInSidebar:x,...s}=ML(c),[r,g]=(0,hW.useState)(null),Z=(0,hW.useMemo)(()=>G?{placement:G,offset:X,anchor:r,shift:!0}:void 0,[G,X,r]),H={colors:e,disableCustomColors:d,enableAlpha:b,enableStyle:o,isCompact:!0,__experimentalIsRenderedInSidebar:x,size:a,__shouldNotWarnDeprecated36pxSize:!0},R=(0,PL.useMergeRefs)([g,l]);return(0,pG.jsxs)(mn,{...s,ref:R,gap:3,children:[(0,pG.jsx)(AC,{value:m,size:a}),(0,pG.jsx)(ib,{className:t,hideLabelFromVision:!0,label:(0,nr.__)("Top border"),onChange:W=>n(W,"top"),__unstablePopoverProps:Z,value:m?.top,...H}),(0,pG.jsx)(ib,{hideLabelFromVision:!0,label:(0,nr.__)("Left border"),onChange:W=>n(W,"left"),__unstablePopoverProps:Z,value:m?.left,...H}),(0,pG.jsx)(ib,{className:i,hideLabelFromVision:!0,label:(0,nr.__)("Right border"),onChange:W=>n(W,"right"),__unstablePopoverProps:Z,value:m?.right,...H}),(0,pG.jsx)(ib,{className:t,hideLabelFromVision:!0,label:(0,nr.__)("Bottom border"),onChange:W=>n(W,"bottom"),__unstablePopoverProps:Z,value:m?.bottom,...H})]})},z0c=tc(k0c,"BorderBoxControlSplitControls"),mJ=z0c;var X0=u(Y(),1);var A0c=/^([\d.\-+]*)\s*(fr|cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|vw|vh|vmin|vmax|%|cap|ic|rlh|vi|vb|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx|svw|lvw|dvw|svh|lvh|dvh|svi|lvi|dvi|svb|lvb|dvb|svmin|lvmin|dvmin|svmax|lvmax|dvmax)?$/;function KL(c){let t=c.trim().match(A0c);if(!t)return[void 0,void 0];let[,e,d]=t,b=parseFloat(e);return b=Number.isNaN(b)?void 0:b,[b,d]}var YW=["top","right","bottom","left"],_L=["color","style","width"],xo=c=>c?!_L.some(l=>c[l]!==void 0):!0,xJ=c=>c?ri(c)?!YW.every(t=>xo(c[t])):!xo(c):!1,qL=c=>c?_L.every(l=>c[l]!==void 0):!1,ri=(c={})=>Object.keys(c).some(l=>YW.indexOf(l)!==-1),FW=c=>{if(!ri(c))return!1;let l=YW.map(t=>O0c(c?.[t]));return!l.every(t=>t===l[0])},$L=c=>{if(!(!c||xo(c)))return{top:c,right:c,bottom:c,left:c}},cU=(c,l)=>{let t={};return c.color!==l.color&&(t.color=l.color),c.style!==l.style&&(t.style=l.style),c.width!==l.width&&(t.width=l.width),t},lU=c=>{if(!c)return;let l=[],t=[],e=[];YW.forEach(n=>{l.push(c[n]?.color),t.push(c[n]?.style),e.push(c[n]?.width)});let d=l.every(n=>n===l[0]),b=t.every(n=>n===t[0]),o=e.every(n=>n===e[0]);return{color:d?l[0]:void 0,style:b?t[0]:void 0,width:o?e[0]:Q0c(e)}},O0c=(c,l)=>{if(xo(c))return l;let{color:t,style:e,width:d}=l||{},{color:b=t,style:o=e,width:n=d}=c;return[n,!!n&&n!=="0"||!!b?o||"solid":o,b].filter(Boolean).join(" ")},Q0c=c=>{let t=c.map(e=>e===void 0?void 0:KL(`${e}`)[1]).filter(e=>e!==void 0);return w0c(t)};function w0c(c){if(c.length===0)return;let l={},t=0,e;return c.forEach(d=>{l[d]=l[d]===void 0?1:l[d]+1,l[d]>t&&(e=d,t=l[d])}),e}function tU(c){let{className:l,colors:t=[],onChange:e,enableAlpha:d=!1,enableStyle:b=!0,size:o="default",value:n,__experimentalIsRenderedInSidebar:G=!1,__next40pxDefaultSize:X,...i}=cc(c,"BorderBoxControl");Lc({componentName:"BorderBoxControl",__next40pxDefaultSize:X,size:o});let a=o==="default"&&X?"__unstable-large":o,m=FW(n),x=ri(n),s=x?lU(n):n,r=x?n:$L(n),g=!isNaN(parseFloat(`${s?.width}`)),[Z,H]=(0,X0.useState)(!m),R=()=>H(!Z),W=C=>{if(!C)return e(void 0);if(!m||qL(C))return e(xo(C)?void 0:C);let J=cU(s,C),f={top:{...n?.top,...J},right:{...n?.right,...J},bottom:{...n?.bottom,...J},left:{...n?.left,...J}};if(FW(f))return e(f);let k=xo(f.top)?void 0:f.top;e(k)},I=(C,J)=>{let f={...r,[J]:C};FW(f)?e(f):e(C)},B=Xc(),p=(0,X0.useMemo)(()=>B(Ew,l),[B,l]),y=(0,X0.useMemo)(()=>B(Mw()),[B]),h=(0,X0.useMemo)(()=>B(Pw),[B]);return{...i,className:p,colors:t,disableUnits:m&&!g,enableAlpha:d,enableStyle:b,hasMixedBorders:m,isLinked:Z,linkedControlClassName:y,onLinkedChange:W,onSplitChange:I,toggleLinked:R,linkedValue:s,size:a,splitValue:r,wrapperClassName:h,__experimentalIsRenderedInSidebar:G}}var so=u(V(),1),T0c=c=>{let{label:l,hideLabelFromVision:t}=c;return l?t?(0,so.jsx)(Qc,{as:"label",children:l}):(0,so.jsx)(cd,{children:l}):null},D0c=(c,l)=>{let{className:t,colors:e,disableCustomColors:d,disableUnits:b,enableAlpha:o,enableStyle:n,hasMixedBorders:G,hideLabelFromVision:X,isLinked:i,label:a,linkedControlClassName:m,linkedValue:x,onLinkedChange:s,onSplitChange:r,popoverPlacement:g,popoverOffset:Z,size:H,splitValue:R,toggleLinked:W,wrapperClassName:I,__experimentalIsRenderedInSidebar:B,...p}=tU(c),[y,h]=(0,vW.useState)(null),C=(0,vW.useMemo)(()=>g?{placement:g,offset:Z,anchor:y,shift:!0}:void 0,[g,Z,y]),J=(0,dU.useMergeRefs)([h,l]);return(0,so.jsxs)(ic,{className:t,...p,ref:J,children:[(0,so.jsx)(T0c,{label:a,hideLabelFromVision:X}),(0,so.jsxs)(ic,{className:I,children:[i?(0,so.jsx)(ib,{className:m,colors:e,disableUnits:b,disableCustomColors:d,enableAlpha:o,enableStyle:n,onChange:s,placeholder:G?(0,eU.__)("Mixed"):void 0,__unstablePopoverProps:C,shouldSanitizeBorder:!1,value:x,withSlider:!0,width:H==="__unstable-large"?"116px":"110px",__experimentalIsRenderedInSidebar:B,__shouldNotWarnDeprecated36pxSize:!0,size:H}):(0,so.jsx)(mJ,{colors:e,disableCustomColors:d,enableAlpha:o,enableStyle:n,onChange:r,popoverPlacement:g,popoverOffset:Z,value:R,__experimentalIsRenderedInSidebar:B,size:H}),(0,so.jsx)(zC,{onClick:W,isLinked:i,size:H})]})]})},L0c=tc(D0c,"BorderBoxControl"),NW=L0c;var YU=u(dc(),1),ar=u(Y(),1),IJ=u(nc(),1),Fnl=u(Ge(),1);var VU=u(dc(),1),Xr=u(nc(),1),CU=u(Y(),1);var BG=u(nc(),1),bU=u(ml(),1),sJ={px:{max:300,step:1},"%":{max:100,step:1},vw:{max:100,step:1},vh:{max:100,step:1},em:{max:10,step:.1},rm:{max:10,step:.1},svw:{max:100,step:1},lvw:{max:100,step:1},dvw:{max:100,step:1},svh:{max:100,step:1},lvh:{max:100,step:1},dvh:{max:100,step:1},vi:{max:100,step:1},svi:{max:100,step:1},lvi:{max:100,step:1},dvi:{max:100,step:1},vb:{max:100,step:1},svb:{max:100,step:1},lvb:{max:100,step:1},dvb:{max:100,step:1},vmin:{max:100,step:1},svmin:{max:100,step:1},lvmin:{max:100,step:1},dvmin:{max:100,step:1},vmax:{max:100,step:1},svmax:{max:100,step:1},lvmax:{max:100,step:1},dvmax:{max:100,step:1}},Gr={all:(0,BG.__)("All sides"),top:(0,BG.__)("Top side"),bottom:(0,BG.__)("Bottom side"),left:(0,BG.__)("Left side"),right:(0,BG.__)("Right side"),vertical:(0,BG.__)("Top and bottom sides"),horizontal:(0,BG.__)("Left and right sides")},fW={top:void 0,right:void 0,bottom:void 0,left:void 0},i0=["top","right","bottom","left"];function oU(c={},l=i0){let t=nU(l);if(t.every(e=>c[e]===c[t[0]]))return c[t[0]]}function SW(c={},l=i0){let t=nU(l);return t.some(e=>c[e]!==c[t[0]])}function kW(c){return c&&Object.values(c).filter(l=>!!l&&/\d/.test(l)).length>0}function rJ(c,l){let t="all";return c||(t=l?"vertical":"top"),t}function nU(c){let l=[];if(!c?.length)return i0;if(c.includes("vertical"))l.push("top","bottom");else if(c.includes("horizontal"))l.push("left","right");else{let t=i0.filter(e=>c.includes(e));l.push(...t)}return l}function gJ(c,l,t){(0,bU.default)("applyValueToSides",{since:"6.8",version:"7.0"});let e={...c};return t?.length?t.forEach(d=>{d==="vertical"?(e.top=l,e.bottom=l):d==="horizontal"?(e.left=l,e.right=l):e[d]=l}):i0.forEach(d=>e[d]=l),e}function zW(c){let l=new Set(c?[]:i0);return c?.forEach(t=>{t==="vertical"?(l.add("top"),l.add("bottom")):t==="horizontal"?(l.add("right"),l.add("left")):l.add(t)}),l}function ZJ(c,l){return c.startsWith(`var:preset|${l}|`)}function GU(c,l,t){if(!ZJ(c,l))return;let e=c.match(new RegExp(`^var:preset\\|${l}\\|(.+)$`));if(!e)return;let d=e[1],b=t.findIndex(o=>o.slug===d);return b!==-1?b:void 0}function XU(c,l,t){let e=t[c];return`var:preset|${l}|${e.slug}`}var iU=N("span",{target:"e1j5nr4z8"})({name:"1w884gc",styles:"box-sizing:border-box;display:block;width:24px;height:24px;position:relative;padding:4px"}),aU=N("span",{target:"e1j5nr4z7"})({name:"i6vjox",styles:"box-sizing:border-box;display:block;position:relative;width:100%;height:100%"}),U0c=({isFocused:c})=>O({backgroundColor:"currentColor",opacity:c?1:.3},"",""),uU=N("span",{target:"e1j5nr4z6"})("box-sizing:border-box;display:block;pointer-events:none;position:absolute;",U0c,";"),mU=N(uU,{target:"e1j5nr4z5"})({name:"1k2w39q",styles:"bottom:3px;top:3px;width:2px"}),xU=N(uU,{target:"e1j5nr4z4"})({name:"1q9b07k",styles:"height:2px;left:3px;right:3px"}),sU=N(xU,{target:"e1j5nr4z3"})({name:"abcix4",styles:"top:0"}),rU=N(mU,{target:"e1j5nr4z2"})({name:"1wf8jf",styles:"right:0"}),gU=N(xU,{target:"e1j5nr4z1"})({name:"8tapst",styles:"bottom:0"}),ZU=N(mU,{target:"e1j5nr4z0"})({name:"1ode3cm",styles:"left:0"});var yG=u(V(),1),j0c=24;function HU({size:c=24,side:l="all",sides:t,...e}){let d=a=>t?.length&&!t.includes(a),b=a=>d(a)?!1:l==="all"||l===a,o=b("top")||b("vertical"),n=b("right")||b("horizontal"),G=b("bottom")||b("vertical"),X=b("left")||b("horizontal"),i=c/j0c;return(0,yG.jsx)(iU,{style:{transform:`scale(${i})`},...e,children:(0,yG.jsxs)(aU,{children:[(0,yG.jsx)(sU,{isFocused:o}),(0,yG.jsx)(rU,{isFocused:n}),(0,yG.jsx)(gU,{isFocused:G}),(0,yG.jsx)(ZU,{isFocused:X})]})})}var RU=N(mo,{target:"e1jovhle5"})({name:"1ejyr19",styles:"max-width:90px"}),AW=N(Uc,{target:"e1jovhle4"})({name:"1j1lmoi",styles:"grid-column:1/span 3"}),IU=N(lc,{target:"e1jovhle3"})({name:"tkya7b",styles:"grid-area:1/2;justify-self:end"}),WU=N("div",{target:"e1jovhle2"})({name:"1dfa8al",styles:"grid-area:1/3;justify-self:end"}),pU=N(HU,{target:"e1jovhle1"})({name:"ou8xsw",styles:"flex:0 0 auto"}),HJ=N(vd,{target:"e1jovhle0"})("width:100%;margin-inline-end:",z(2),";");var Nd=u(V(),1),BU=()=>{};function yU(c,l,t){let e=zW(l),d=[];switch(c){case"all":d=["top","bottom","left","right"];break;case"horizontal":d=["left","right"];break;case"vertical":d=["top","bottom"];break;default:d=[c]}if(t)switch(c){case"top":d.push("bottom");break;case"bottom":d.push("top");break;case"left":d.push("left");break;case"right":d.push("right");break}return d.filter(b=>e.has(b))}function ir({__next40pxDefaultSize:c,onChange:l=BU,onFocus:t=BU,values:e,selectedUnits:d,setSelectedUnits:b,sides:o,side:n,min:G=0,presets:X,presetKey:i,...a}){let m=yU(n,o),x=S=>{t(S,{side:n})},s=S=>{l(S)},r=S=>{let U={...e};m.forEach(P=>{U[P]=S}),s(U)},g=(S,U)=>{let P={...e},j=S!==void 0&&!isNaN(parseFloat(S))?S:void 0;yU(n,o,!!U?.event.altKey).forEach(M=>{P[M]=j}),s(P)},Z=S=>{let U={...d};m.forEach(P=>{U[P]=S}),b(U)},H=oU(e,m),R=kW(e),W=R&&m.length>1&&SW(e,m),[I,B]=ql(H),p=R?B:d[m[0]],h=[(0,VU.useInstanceId)(ir,"box-control-input"),n].join("-"),C=m.length>1&&H===void 0&&m.some(S=>d[S]!==p),J=H===void 0&&p?p:H,f=W||C?(0,Xr.__)("Mixed"):void 0,k=X&&X.length>0&&i,F=k&&H!==void 0&&!W&&ZJ(H,i),[T,L]=(0,CU.useState)(!k||!F&&!W&&H!==void 0),v=F?GU(H,i,X):void 0,A=k?[{value:0,label:"",tooltip:(0,Xr.__)("None")},...X.map((S,U)=>({value:U+1,label:"",tooltip:S.name??S.slug}))]:[];return(0,Nd.jsxs)(AW,{expanded:!0,children:[(0,Nd.jsx)(pU,{side:n,sides:o}),T&&(0,Nd.jsxs)(Nd.Fragment,{children:[(0,Nd.jsx)(Ne,{placement:"top-end",text:Gr[n],children:(0,Nd.jsx)(RU,{...a,min:G,__shouldNotWarnDeprecated36pxSize:!0,__next40pxDefaultSize:c,className:"component-box-control__unit-control",id:h,isPressEnterToChange:!0,disableUnits:W||C,value:J,onChange:g,onUnitChange:Z,onFocus:x,label:Gr[n],placeholder:f,hideLabelFromVision:!0})}),(0,Nd.jsx)(HJ,{__next40pxDefaultSize:c,__shouldNotWarnDeprecated36pxSize:!0,"aria-controls":h,label:Gr[n],hideLabelFromVision:!0,onChange:S=>{g(S!==void 0?[S,p].join(""):void 0)},min:isFinite(G)?G:0,max:sJ[p??"px"]?.max??10,step:sJ[p??"px"]?.step??.1,value:I??0,withInputField:!1})]}),k&&!T&&(0,Nd.jsx)(HJ,{__next40pxDefaultSize:!0,className:"spacing-sizes-control__range-control",value:v!==void 0?v+1:0,onChange:S=>{let U=S===0||S===void 0?void 0:XU(S-1,i,X);r(U)},withInputField:!1,"aria-valuenow":v!==void 0?v+1:0,"aria-valuetext":A[v!==void 0?v+1:0].tooltip,renderTooltipContent:S=>A[S||0].tooltip,min:0,max:A.length-1,marks:A,label:Gr[n],hideLabelFromVision:!0}),k&&(0,Nd.jsx)(lc,{label:T?(0,Xr.__)("Use size preset"):(0,Xr.__)("Set custom size"),icon:fs,onClick:()=>{L(!T)},isPressed:T,size:"small",iconSize:24})]},`box-control-${n}`)}var RJ=u(nc(),1);var JU=u(V(),1);function hU({isLinked:c,...l}){let t=c?(0,RJ.__)("Unlink sides"):(0,RJ.__)("Link sides");return(0,JU.jsx)(lc,{...l,className:"component-box-control__linked-button",size:"small",icon:c?Cs:Vs,iconSize:24,label:t})}var ab=u(V(),1);var E0c={min:0},M0c=()=>{};function P0c(c){let l=(0,YU.useInstanceId)(FU,"inspector-box-control");return c||l}function FU({__next40pxDefaultSize:c=!1,id:l,inputProps:t=E0c,onChange:e=M0c,label:d=(0,IJ.__)("Box Control"),values:b,units:o,sides:n,splitOnAxis:G=!1,allowReset:X=!0,resetValues:i=fW,presets:a,presetKey:m,onMouseOver:x,onMouseOut:s}){let[r,g]=Ko(b,{fallback:fW}),Z=r||fW,H=kW(b),R=n?.length===1,[W,I]=(0,ar.useState)(H),[B,p]=(0,ar.useState)(!H||!SW(Z)||R),[y,h]=(0,ar.useState)(rJ(B,G)),[C,J]=(0,ar.useState)({top:ql(b?.top)[1],right:ql(b?.right)[1],bottom:ql(b?.bottom)[1],left:ql(b?.left)[1]}),f=P0c(l),k=`${f}-heading`,F=()=>{p(!B),h(rJ(!B,G))},T=(U,{side:P})=>{h(P)},L=U=>{e(U),g(U),I(!0)},v=()=>{e(i),g(i),J(i),I(!1)},A={onMouseOver:x,onMouseOut:s,...t,onChange:L,onFocus:T,isLinked:B,units:o,selectedUnits:C,setSelectedUnits:J,sides:n,values:Z,__next40pxDefaultSize:c,presets:a,presetKey:m};Lc({componentName:"BoxControl",__next40pxDefaultSize:c,size:void 0});let S=zW(n);if(a&&!m||!a&&m){let U=a?"presets":"presetKey",P=a?"presetKey":"presets"}return(0,ab.jsxs)(mn,{id:f,columns:3,templateColumns:"1fr min-content min-content",role:"group","aria-labelledby":k,children:[(0,ab.jsx)(mC.VisualLabel,{id:k,children:d}),B&&(0,ab.jsx)(AW,{children:(0,ab.jsx)(ir,{side:"all",...A})}),!R&&(0,ab.jsx)(WU,{children:(0,ab.jsx)(hU,{onClick:F,isLinked:B})}),!B&&G&&["vertical","horizontal"].map(U=>(0,ab.jsx)(ir,{side:U,...A},U)),!B&&!G&&Array.from(S).map(U=>(0,ab.jsx)(ir,{side:U,...A},U)),X&&(0,ab.jsx)(IU,{className:"component-box-control__reset-button",variant:"secondary",size:"small",onClick:v,disabled:!W,children:(0,IJ.__)("Reset")})]})}var WJ=FU;var vU=u(Y(),1),NU=u(ml(),1),fU=u(V(),1);function K0c(c,l){let{className:t,__shouldNotWarnDeprecated:e,...d}=c,b=Q("components-button-group",t);return e||(0,NU.default)("wp.components.ButtonGroup",{since:"6.8",alternative:"wp.components.__experimentalToggleGroupControl"}),(0,fU.jsx)("div",{ref:l,role:"group",className:b,...d})}var SU=(0,vU.forwardRef)(K0c);SU.displayName="ButtonGroup";var OW=SU;var yJ=u(Y(),1);var zU=u(Y(),1);var kU={name:"12ip69d",styles:"background:transparent;display:block;margin:0!important;pointer-events:none;position:absolute;will-change:box-shadow"};function QW(c){let l=`rgba(0, 0, 0, ${c/20})`;return`0 ${c}px ${c*2}px 0
	${l}`}function AU(c){let{active:l,borderRadius:t="inherit",className:e,focus:d,hover:b,isInteractive:o=!1,offset:n=0,value:G=0,...X}=cc(c,"Elevation"),i=Xc(),a=(0,zU.useMemo)(()=>{let m=Dt(b)?b:G*2,x=Dt(l)?l:G/2;o||(m=Dt(b)?b:void 0,x=Dt(l)?l:void 0);let s=`box-shadow ${w.transitionDuration} ${w.transitionTimingFunction}`,r={};return r.Base=O({borderRadius:t,bottom:n,boxShadow:QW(G),opacity:w.elevationIntensity,left:n,right:n,top:n},O("@media not ( prefers-reduced-motion ){transition:",s,";}",""),"",""),Dt(m)&&(r.hover=O("*:hover>&{box-shadow:",QW(m),";}","")),Dt(x)&&(r.active=O("*:active>&{box-shadow:",QW(x),";}","")),Dt(d)&&(r.focus=O("*:focus>&{box-shadow:",QW(d),";}","")),i(kU,r.Base,r.hover,r.focus,r.active,e)},[l,t,e,i,d,b,o,n,G]);return{...X,className:a,"aria-hidden":!0}}var OU=u(V(),1);function q0c(c,l){let t=AU(c);return(0,OU.jsx)(ic,{...t,ref:l})}var $0c=tc(q0c,"Elevation"),a0=$0c;var ur=`calc(${w.radiusLarge} - 1px)`,QU=O("box-shadow:0 0 0 1px ",w.surfaceBorderColor,";outline:none;",""),wU={name:"1showjb",styles:"border-bottom:1px solid;box-sizing:border-box;&:last-child{border-bottom:none;}"},TU={name:"14n5oej",styles:"border-top:1px solid;box-sizing:border-box;&:first-of-type{border-top:none;}"},DU={name:"13udsys",styles:"height:100%"},LU={name:"6ywzd",styles:"box-sizing:border-box;height:auto;max-height:100%"},UU={name:"dq805e",styles:"box-sizing:border-box;overflow:hidden;&>img,&>iframe{display:block;height:auto;max-width:100%;width:100%;}"},jU={name:"c990dr",styles:"box-sizing:border-box;display:block;width:100%"},VG=O("&:first-of-type{border-top-left-radius:",ur,";border-top-right-radius:",ur,";}&:last-of-type{border-bottom-left-radius:",ur,";border-bottom-right-radius:",ur,";}",""),u0=O("border-color:",w.colorDivider,";",""),EU={name:"1t90u8d",styles:"box-shadow:none"},wW={name:"1e1ncky",styles:"border:none"},MU=O("border-radius:",ur,";",""),m0=O("background-color:",D.ui.backgroundDisabled,";","");var lj=u(ml(),1),tj=u(Y(),1);var $U=u(Y(),1);var PU=O("background-color:",w.surfaceColor,";color:",D.gray[900],";position:relative;",""),XGl=O("background-color:",w.surfaceBackgroundColor,";","");function KU({borderBottom:c,borderLeft:l,borderRight:t,borderTop:e}){let d=`1px solid ${w.surfaceBorderColor}`;return O({borderBottom:c?d:void 0,borderLeft:l?d:void 0,borderRight:t?d:void 0,borderTop:e?d:void 0},"","")}var cmc=O("",""),lmc=O("background:",w.surfaceBackgroundTintColor,";",""),tmc=O("background:",w.surfaceBackgroundTertiaryColor,";",""),_U=c=>[c,c].join(" "),emc=c=>["90deg",[w.surfaceBackgroundColor,c].join(" "),"transparent 1%"].join(","),dmc=c=>[[w.surfaceBackgroundColor,c].join(" "),"transparent 1%"].join(","),bmc=c=>[`linear-gradient( ${emc(c)} ) center`,`linear-gradient( ${dmc(c)} ) center`,w.surfaceBorderBoldColor].join(","),omc=(c,l)=>O("background:",bmc(l),";background-size:",_U(c),";",""),nmc=[`${w.surfaceBorderSubtleColor} 1px`,"transparent 1px"].join(","),Gmc=["90deg",`${w.surfaceBorderSubtleColor} 1px`,"transparent 1px"].join(","),Xmc=[`linear-gradient( ${nmc} )`,`linear-gradient( ${Gmc} )`].join(","),imc=c=>O("background:",w.surfaceBackgroundColor,";background-image:",Xmc,";background-size:",_U(c),";",""),qU=(c,l,t)=>{switch(c){case"dotted":return omc(l,t);case"grid":return imc(l);case"primary":return cmc;case"secondary":return lmc;case"tertiary":return tmc}};function TW(c){let{backgroundSize:l=12,borderBottom:t=!1,borderLeft:e=!1,borderRight:d=!1,borderTop:b=!1,className:o,variant:n="primary",...G}=cc(c,"Surface"),X=Xc(),i=(0,$U.useMemo)(()=>{let a={borders:KU({borderBottom:t,borderLeft:e,borderRight:d,borderTop:b})};return X(PU,a.borders,qU(n,`${l}px`,`${l-1}px`),o)},[l,t,e,d,b,o,X,n]);return{...G,className:i}}var cj=u(V(),1);function umc(c,l){let t=TW(c);return(0,cj.jsx)(ic,{...t,ref:l})}var mmc=tc(umc,"Surface"),pJ=mmc;function xmc({elevation:c,isElevated:l,...t}){let e={...t},d=c;return l&&((0,lj.default)("Card isElevated prop",{since:"5.9",alternative:"elevation"}),d??=2),typeof d<"u"&&(e.elevation=d),e}function BJ(c){let{className:l,elevation:t=0,isBorderless:e=!1,isRounded:d=!0,size:b="medium",...o}=cc(xmc(c),"Card"),n=Xc(),G=(0,tj.useMemo)(()=>n(QU,e&&EU,d&&MU,l),[l,n,e,d]);return{...TW({...o,className:G}),elevation:t,isBorderless:e,isRounded:d,size:b}}var Zi=u(V(),1);function smc(c,l){let{children:t,elevation:e,isBorderless:d,isRounded:b,size:o,...n}=BJ(c),G=b?w.radiusLarge:0,X=Xc(),i=(0,yJ.useMemo)(()=>X(O({borderRadius:G},"","")),[X,G]),a=(0,yJ.useMemo)(()=>{let m={size:o,isBorderless:d};return{CardBody:m,CardHeader:m,CardFooter:m}},[d,o]);return(0,Zi.jsx)(DX,{value:a,children:(0,Zi.jsxs)(ic,{...n,ref:l,children:[(0,Zi.jsx)(ic,{className:X(DU),children:t}),(0,Zi.jsx)(a0,{className:i,isInteractive:!1,value:e?1:0}),(0,Zi.jsx)(a0,{className:i,isInteractive:!1,value:e})]})})}var rmc=tc(smc,"Card"),DW=rmc;var Xj=u(Y(),1);var ej=O("@media only screen and ( min-device-width: 40em ){&::-webkit-scrollbar{height:12px;width:12px;}&::-webkit-scrollbar-track{background-color:transparent;}&::-webkit-scrollbar-track{background:",w.colorScrollbarTrack,";border-radius:8px;}&::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:",w.colorScrollbarThumb,";border:2px solid rgba( 0, 0, 0, 0 );border-radius:7px;}&:hover::-webkit-scrollbar-thumb{background-color:",w.colorScrollbarThumbHover,";}}",""),dj={name:"13udsys",styles:"height:100%"};var bj={name:"7zq9w",styles:"scroll-behavior:smooth"},oj={name:"q33xhg",styles:"overflow-x:auto;overflow-y:hidden"},nj={name:"103x71s",styles:"overflow-x:hidden;overflow-y:auto"},Gj={name:"umwchj",styles:"overflow-y:auto"};function ij(c){let{className:l,scrollDirection:t="y",smoothScroll:e=!1,...d}=cc(c,"Scrollable"),b=Xc(),o=(0,Xj.useMemo)(()=>b(dj,ej,e&&bj,t==="x"&&oj,t==="y"&&nj,t==="auto"&&Gj,l),[l,b,t,e]);return{...d,className:o}}var aj=u(V(),1);function Zmc(c,l){let t=ij(c);return(0,aj.jsx)(ic,{...t,ref:l})}var Hmc=tc(Zmc,"Scrollable"),mr=Hmc;var xj=u(Y(),1);var uj=O("padding:",z(2),";",""),mj={none:{name:"1hcx8jb",styles:"padding:0"},large:O("padding:",z(6)," ",z(8),";",""),medium:O("padding:",z(4)," ",z(6),";",""),small:O("padding:",z(4),";",""),xSmall:uj,extraSmall:uj},LW=c=>{switch(c){case"xSmall":return z(2);case"small":return z(4);case"medium":return z(6);case"large":return z(8);case"none":return"0";default:return z(6)}},x0=c=>{if(typeof c=="string")return mj[c];if(c){let{blockStart:l,blockEnd:t,inlineStart:e,inlineEnd:d}=c;return O("padding-block-start:",LW(l),";padding-block-end:",LW(t),";padding-inline-start:",LW(e),";padding-inline-end:",LW(d),";","")}return mj.medium};function VJ(c){let{className:l,isScrollable:t=!1,isShady:e=!1,size:d="medium",...b}=cc(c,"CardBody"),o=Xc(),n=(0,xj.useMemo)(()=>o(LU,VG,x0(d),e&&m0,"components-card__body",l),[l,o,e,d]);return{...b,className:n,isScrollable:t}}var CJ=u(V(),1);function Rmc(c,l){let{isScrollable:t,...e}=VJ(c);return t?(0,CJ.jsx)(mr,{...e,ref:l}):(0,CJ.jsx)(ic,{...e,ref:l})}var Imc=tc(Rmc,"CardBody"),UW=Imc;var sj={vertical:{start:"marginLeft",end:"marginRight"},horizontal:{start:"marginTop",end:"marginBottom"}},Wmc=({"aria-orientation":c="horizontal",margin:l,marginStart:t,marginEnd:e})=>O(Fc({[sj[c].start]:z(t??l),[sj[c].end]:z(e??l)})(),"",""),pmc={name:"1u4hpl4",styles:"display:inline"},Bmc=({"aria-orientation":c="horizontal"})=>c==="vertical"?pmc:void 0,ymc=({"aria-orientation":c="horizontal"})=>O({[c==="vertical"?"borderRight":"borderBottom"]:"1px solid currentColor"},"",""),Vmc=({"aria-orientation":c="horizontal"})=>O({height:c==="vertical"?"auto":0,width:c==="vertical"?0:"auto"},"",""),rj=N("hr",{target:"e19on6iw0"})("border:0;margin:0;",Bmc," ",ymc," ",Vmc," ",Wmc,";");var JJ=u(V(),1);function Cmc(c,l){let t=cc(c,"Divider");return(0,JJ.jsx)(Lm,{render:(0,JJ.jsx)(rj,{}),...t,ref:l})}var Jmc=tc(Cmc,"Divider"),xr=Jmc;var gj=u(Y(),1);function hJ(c){let{className:l,...t}=cc(c,"CardDivider"),e=Xc(),d=(0,gj.useMemo)(()=>e(jU,u0,"components-card__divider",l),[l,e]);return{...t,className:d}}var Zj=u(V(),1);function hmc(c,l){let t=hJ(c);return(0,Zj.jsx)(xr,{...t,ref:l})}var Ymc=tc(hmc,"CardDivider"),jW=Ymc;var Hj=u(Y(),1);function YJ(c){let{className:l,justify:t,isBorderless:e=!1,isShady:d=!1,size:b="medium",...o}=cc(c,"CardFooter"),n=Xc(),G=(0,Hj.useMemo)(()=>n(TU,VG,u0,x0(b),e&&wW,d&&m0,"components-card__footer",l),[l,n,e,d,b]);return{...o,className:G,justify:t}}var Rj=u(V(),1);function Fmc(c,l){let t=YJ(c);return(0,Rj.jsx)(Il,{...t,ref:l})}var vmc=tc(Fmc,"CardFooter"),EW=vmc;var Ij=u(Y(),1);function FJ(c){let{className:l,isBorderless:t=!1,isShady:e=!1,size:d="medium",...b}=cc(c,"CardHeader"),o=Xc(),n=(0,Ij.useMemo)(()=>o(wU,VG,u0,x0(d),t&&wW,e&&m0,"components-card__header",l),[l,o,t,e,d]);return{...b,className:n}}var Wj=u(V(),1);function Nmc(c,l){let t=FJ(c);return(0,Wj.jsx)(Il,{...t,ref:l})}var fmc=tc(Nmc,"CardHeader"),MW=fmc;var pj=u(Y(),1);function vJ(c){let{className:l,...t}=cc(c,"CardMedia"),e=Xc(),d=(0,pj.useMemo)(()=>e(UU,VG,"components-card__media",l),[l,e]);return{...t,className:d}}var Bj=u(V(),1);function Smc(c,l){let t=vJ(c);return(0,Bj.jsx)(ic,{...t,ref:l})}var kmc=tc(Smc,"CardMedia"),PW=kmc;var NJ=u(Y(),1),KW=u(dc(),1),yj=u(ml(),1);var ro=u(V(),1);function Vj(c){let{__nextHasNoMarginBottom:l,label:t,className:e,heading:d,checked:b,indeterminate:o,help:n,id:G,onChange:X,onClick:i,...a}=c;d&&(0,yj.default)("`heading` prop in `CheckboxControl`",{alternative:"a separate element to implement a heading",since:"5.8"});let[m,x]=(0,NJ.useState)(!1),[s,r]=(0,NJ.useState)(!1),g=(0,KW.useRefEffect)(R=>{R&&(R.indeterminate=!!o,x(R.matches(":checked")),r(R.matches(":indeterminate")))},[b,o]),Z=(0,KW.useInstanceId)(Vj,"inspector-checkbox-control",G),H=R=>X(R.target.checked);return(0,ro.jsx)(Dc,{label:d,id:Z,help:n&&(0,ro.jsx)("span",{className:"components-checkbox-control__help",children:n}),className:Q("components-checkbox-control",e),children:(0,ro.jsxs)(Uc,{spacing:0,justify:"start",alignment:"top",children:[(0,ro.jsxs)("span",{className:"components-checkbox-control__input-container",children:[(0,ro.jsx)("input",{ref:g,id:Z,className:"components-checkbox-control__input",type:"checkbox",value:"1",onChange:H,checked:b,"aria-describedby":n?Z+"__help":void 0,onClick:R=>{R.currentTarget.focus(),i?.(R)},...a}),s?(0,ro.jsx)(Cl,{icon:Ys,className:"components-checkbox-control__indeterminate",role:"presentation"}):null,m?(0,ro.jsx)(Cl,{icon:jt,className:"components-checkbox-control__checked",role:"presentation"}):null]}),t&&(0,ro.jsx)("label",{className:"components-checkbox-control__label",htmlFor:Z,children:t})]})})}var _W=Vj;var qW=u(Y(),1),Cj=u(dc(),1),Jj=u(ml(),1);var hj=u(V(),1),zmc=4e3;function Yj({className:c,children:l,onCopy:t,onFinishCopy:e,text:d,...b}){(0,Jj.default)("wp.components.ClipboardButton",{since:"5.8",alternative:"wp.compose.useCopyToClipboard"});let o=(0,qW.useRef)(void 0),n=(0,Cj.useCopyToClipboard)(d,()=>{t(),o.current&&clearTimeout(o.current),e&&(o.current=setTimeout(()=>e(),zmc))});(0,qW.useEffect)(()=>()=>{o.current&&clearTimeout(o.current)},[]);let G=Q("components-clipboard-button",c);return(0,hj.jsx)(lc,{...b,className:G,ref:n,onCopy:i=>{i.target.focus()},children:l})}var se=u(Y(),1),ct=u(nc(),1);var KJ=u(dc(),1);var Oj=u(Y(),1);var Fj=c=>O("font-size:",fl("default.fontSize"),";font-family:inherit;appearance:none;border:1px solid transparent;cursor:pointer;background:none;text-align:start;text-decoration:",c==="a"?"none":void 0,";svg,path{fill:currentColor;}&:hover{color:",D.theme.accent,";}&:focus{box-shadow:none;outline:none;}&:focus-visible{box-shadow:0 0 0 var( --wp-admin-border-width-focus ) ",D.theme.accent,";outline:2px solid transparent;outline-offset:0;}",""),vj={name:"1bcj5ek",styles:"width:100%;display:block"},Nj={name:"150ruhm",styles:"box-sizing:border-box;width:100%;display:block;margin:0;color:inherit"},fj=O("border:1px solid ",w.surfaceBorderColor,";",""),Sj=O(">*:not( marquee )>*{border-bottom:1px solid ",w.surfaceBorderColor,";}>*:last-of-type>*{border-bottom-color:transparent;}",""),s0=w.radiusSmall,kj=O("border-radius:",s0,";",""),zj=O("border-radius:",s0,";>*:first-of-type>*{border-top-left-radius:",s0,";border-top-right-radius:",s0,";}>*:last-of-type>*{border-bottom-left-radius:",s0,";border-bottom-right-radius:",s0,";}",""),fJ=`calc(${w.fontSize} * ${w.fontLineHeightBase})`,Amc=`calc((${w.controlHeight} - ${fJ} - 2px) / 2)`,Omc=`calc((${w.controlHeightSmall} - ${fJ} - 2px) / 2)`,Qmc=`calc((${w.controlHeightLarge} - ${fJ} - 2px) / 2)`,SJ={small:O("padding:",Omc," ",w.controlPaddingXSmall,"px;",""),medium:O("padding:",Amc," ",w.controlPaddingX,"px;",""),large:O("padding:",Qmc," ",w.controlPaddingXLarge,"px;","")};var $W=u(Y(),1),cp=(0,$W.createContext)({size:"medium"});cp.displayName="ItemGroupContext";var lp=()=>(0,$W.useContext)(cp);function Qj(c){let{as:l,className:t,onClick:e,role:d="listitem",size:b,...o}=cc(c,"Item"),{spacedAround:n,size:G}=lp(),X=b||G,i=l||(typeof e<"u"?"button":"div"),a=Xc(),m=(0,Oj.useMemo)(()=>a((i==="button"||i==="a")&&Fj(i),SJ[X]||SJ.medium,Nj,n&&kj,t),[i,t,a,X,n]),x=a(vj);return{as:i,className:m,onClick:e,wrapperClassName:x,role:d,...o}}var kJ=u(V(),1);function wmc(c,l){let{role:t,wrapperClassName:e,...d}=Qj(c);return(0,kJ.jsx)("div",{role:t,className:e,children:(0,kJ.jsx)(ic,{...d,ref:l})})}var Tmc=tc(wmc,"Item"),r0=Tmc;function wj(c){let{className:l,isBordered:t=!1,isRounded:e=!0,isSeparated:d=!1,role:b="list",...o}=cc(c,"ItemGroup"),G=Xc()(t&&fj,d&&Sj,e&&zj,l);return{isBordered:t,className:G,role:b,isSeparated:d,...o}}var zJ=u(V(),1);function Dmc(c,l){let{isBordered:t,isSeparated:e,size:d,...b}=wj(c),{size:o}=lp(),X={spacedAround:!t&&!e,size:d||o};return(0,zJ.jsx)(cp.Provider,{value:X,children:(0,zJ.jsx)(ic,{...b,ref:l})})}var Lmc=tc(Dmc,"ItemGroup"),g0=Lmc;var sn=u(nc(),1),XE=u(dc(),1),Gp=u(Y(),1);var GE=u(nc(),1);var bp=u(Y(),1);var Mj=u(dc(),1),xn=u(Y(),1),Z0=u(nc(),1);var Umc=16,jmc=16,AJ=10,Tj=0,Dj=5,OJ=AJ,wil=(jmc+Umc)/2;function tp(c){return Math.max(0,Math.min(100,c))}function Emc(c,l,t,e=Tj){let d=c[l].position,b=Math.min(d,t),o=Math.max(d,t);return c.some(({position:n},G)=>G!==l&&(Math.abs(n-t)<e||b<n&&n<o))}function Lj(c,l,t){let e=c.findIndex(o=>o.position>l),d={color:t,position:l},b=c.slice();return b.splice(e-1,0,d),b}function Uj(c,l){return c.filter((t,e)=>e!==l)}function jj(c,l,t){let e=c.slice();return e[l]=t,e}function ep(c,l,t){if(Emc(c,l,t))return c;let e={...c[l],position:t};return jj(c,l,e)}function QJ(c,l,t){let e={...c[l],color:t};return jj(c,l,e)}function Ej(c,l,t){let e=c.findIndex(d=>d.position===l);return QJ(c,e,t)}function dp(c,l){if(!l)return;let{x:t,width:e}=l.getBoundingClientRect(),d=c-t;return Math.round(tp(d*100/e))}var $l=u(V(),1);function Pj({isOpen:c,position:l,color:t,...e}){let b=`components-custom-gradient-picker__control-point-button-description-${(0,Mj.useInstanceId)(Pj)}`;return(0,$l.jsxs)($l.Fragment,{children:[(0,$l.jsx)(lc,{"aria-label":(0,Z0.sprintf)((0,Z0.__)("Gradient control point at position %1$d%% with color code %2$s."),l,t),"aria-describedby":b,"aria-haspopup":"true","aria-expanded":c,__next40pxDefaultSize:!0,className:Q("components-custom-gradient-picker__control-point-button",{"is-active":c}),...e}),(0,$l.jsx)(Qc,{id:b,children:(0,Z0.__)("Use your left or right arrow keys or drag and drop with the mouse to change the gradient position. Press the button to change the color or remove the control point.")})]})}function Kj({isRenderedInSidebar:c,className:l,...t}){let e=(0,xn.useMemo)(()=>({placement:"bottom",offset:8,resize:!1}),[]),d=Q("components-custom-gradient-picker__control-point-dropdown",l);return(0,$l.jsx)(GJ,{isRenderedInSidebar:c,popoverProps:e,className:d,...t})}function _j({disableRemove:c,disableAlpha:l,gradientPickerDomRef:t,ignoreMarkerPosition:e,value:d,onChange:b,onStartControlPointChange:o,onStopControlPointChange:n,__experimentalIsRenderedInSidebar:G}){let X=(0,xn.useRef)(void 0),i=x=>{if(X.current===void 0||t.current===null)return;let s=dp(x.clientX,t.current),{initialPosition:r,index:g,significantMoveHappened:Z}=X.current;!Z&&Math.abs(r-s)>=Dj&&(X.current.significantMoveHappened=!0),b(ep(d,g,s))},a=()=>{window&&window.removeEventListener&&X.current&&X.current.listenersActivated&&(window.removeEventListener("mousemove",i),window.removeEventListener("mouseup",a),n(),X.current.listenersActivated=!1)},m=(0,xn.useRef)(void 0);return m.current=a,(0,xn.useEffect)(()=>()=>{m.current?.()},[]),(0,$l.jsx)($l.Fragment,{children:d.map((x,s)=>{let r=x?.position;return e!==r&&(0,$l.jsx)(Kj,{isRenderedInSidebar:G,onClose:n,renderToggle:({isOpen:g,onToggle:Z})=>(0,$l.jsx)(Pj,{onClick:()=>{X.current&&X.current.significantMoveHappened||(g?n():o(),Z())},onMouseDown:()=>{window&&window.addEventListener&&(X.current={initialPosition:r,index:s,significantMoveHappened:!1,listenersActivated:!0},o(),window.addEventListener("mousemove",i),window.addEventListener("mouseup",a))},onKeyDown:H=>{H.code==="ArrowLeft"?(H.stopPropagation(),b(ep(d,s,tp(x.position-OJ)))):H.code==="ArrowRight"&&(H.stopPropagation(),b(ep(d,s,tp(x.position+OJ))))},isOpen:g,position:x.position,color:x.color},s),renderContent:({onClose:g})=>(0,$l.jsxs)(an,{paddingSize:"none",children:[(0,$l.jsx)(io,{enableAlpha:!l,color:x.color,onChange:Z=>{b(QJ(d,s,Rc(Z).toRgbString()))}}),!c&&d.length>2&&(0,$l.jsx)(Uc,{className:"components-custom-gradient-picker__remove-control-point-wrapper",alignment:"center",children:(0,$l.jsx)(lc,{onClick:()=>{b(Uj(d,s)),g()},variant:"link",children:(0,Z0.__)("Remove Control Point")})})]}),style:{left:`${x.position}%`,transform:"translateX( -50% )"}},s)})})}function Mmc({value:c,onChange:l,onOpenInserter:t,onCloseInserter:e,insertPosition:d,disableAlpha:b,__experimentalIsRenderedInSidebar:o}){let[n,G]=(0,xn.useState)(!1);return(0,$l.jsx)(Kj,{isRenderedInSidebar:o,className:"components-custom-gradient-picker__inserter",onClose:()=>{e()},renderToggle:({isOpen:X,onToggle:i})=>(0,$l.jsx)(lc,{__next40pxDefaultSize:!0,"aria-expanded":X,"aria-haspopup":"true",onClick:()=>{X?e():(G(!1),t()),i()},className:"components-custom-gradient-picker__insert-point-dropdown",icon:$o}),renderContent:()=>(0,$l.jsx)(an,{paddingSize:"none",children:(0,$l.jsx)(io,{enableAlpha:!b,onChange:X=>{n?l(Ej(c,d,Rc(X).toRgbString())):(l(Lj(c,d,Rc(X).toRgbString())),G(!0))}})}),style:d!==null?{left:`${d}%`,transform:"translateX( -50% )"}:void 0})}_j.InsertPoint=Mmc;var wJ=_j;var Hi=u(V(),1),Pmc=(c,l)=>{switch(l.type){case"MOVE_INSERTER":if(c.id==="IDLE"||c.id==="MOVING_INSERTER")return{id:"MOVING_INSERTER",insertPosition:l.insertPosition};break;case"STOP_INSERTER_MOVE":if(c.id==="MOVING_INSERTER")return{id:"IDLE"};break;case"OPEN_INSERTER":if(c.id==="MOVING_INSERTER")return{id:"INSERTING_CONTROL_POINT",insertPosition:c.insertPosition};break;case"CLOSE_INSERTER":if(c.id==="INSERTING_CONTROL_POINT")return{id:"IDLE"};break;case"START_CONTROL_CHANGE":if(c.id==="IDLE")return{id:"MOVING_CONTROL_POINT"};break;case"STOP_CONTROL_CHANGE":if(c.id==="MOVING_CONTROL_POINT")return{id:"IDLE"};break}return c},Kmc={id:"IDLE"};function op({background:c,hasGradient:l,value:t,onChange:e,disableInserter:d=!1,disableAlpha:b=!1,__experimentalIsRenderedInSidebar:o=!1}){let n=(0,bp.useRef)(null),[G,X]=(0,bp.useReducer)(Pmc,Kmc),i=s=>{if(!n.current)return;let r=dp(s.clientX,n.current);if(t.some(({position:g})=>Math.abs(r-g)<AJ)){G.id==="MOVING_INSERTER"&&X({type:"STOP_INSERTER_MOVE"});return}X({type:"MOVE_INSERTER",insertPosition:r})},a=()=>{X({type:"STOP_INSERTER_MOVE"})},m=G.id==="MOVING_INSERTER",x=G.id==="INSERTING_CONTROL_POINT";return(0,Hi.jsxs)("div",{className:Q("components-custom-gradient-picker__gradient-bar",{"has-gradient":l}),onMouseEnter:i,onMouseMove:i,onMouseLeave:a,children:[(0,Hi.jsx)("div",{className:"components-custom-gradient-picker__gradient-bar-background",style:{background:c,opacity:l?1:.4}}),(0,Hi.jsxs)("div",{ref:n,className:"components-custom-gradient-picker__markers-container",children:[!d&&(m||x)&&(0,Hi.jsx)(wJ.InsertPoint,{__experimentalIsRenderedInSidebar:o,disableAlpha:b,insertPosition:G.insertPosition,value:t,onChange:e,onOpenInserter:()=>{X({type:"OPEN_INSERTER"})},onCloseInserter:()=>{X({type:"CLOSE_INSERTER"})}}),(0,Hi.jsx)(wJ,{__experimentalIsRenderedInSidebar:o,disableAlpha:b,disableRemove:d,gradientPickerDomRef:n,ignoreMarkerPosition:x?G.insertPosition:void 0,value:t,onChange:e,onStartControlPointChange:()=>{X({type:"START_CONTROL_CHANGE"})},onStopControlPointChange:()=>{X({type:"STOP_CONTROL_CHANGE"})}})]})]})}var LJ=u(qj(),1);var DJ=u(nc(),1),sr="linear-gradient(135deg, rgba(6, 147, 227, 1) 0%, rgb(155, 81, 224) 100%)",$j=180,np={type:"angular",value:"90"},cE=[{value:"linear-gradient",label:(0,DJ.__)("Linear")},{value:"radial-gradient",label:(0,DJ.__)("Radial")}],lE={top:0,"top right":45,"right top":45,right:90,"right bottom":135,"bottom right":135,bottom:180,"bottom left":225,"left bottom":225,left:270,"top left":315,"left top":315};function _mc({type:c,value:l}){if(c==="literal")return l;if(c==="hex")return`#${l}`;if(c==="var")return`var(${l})`;if(c==="hsl"){let[t,e,d]=l;return`hsl(${t},${e}%,${d}%)`}if(c==="hsla"){let[t,e,d,b]=l;return`hsla(${t},${e}%,${d}%,${b})`}return`${c}(${l.join(",")})`}function qmc(c){if(!c)return"";let{value:l,type:t}=c;return t==="calc"?`calc(${l})`:`${l}${t}`}function $mc({type:c,value:l,length:t}){return`${_mc({type:c,value:l})} ${qmc(t)}`}function cxc(c){if(!(Array.isArray(c)||!c||c.type!=="angular"))return`${c.value}deg`}function Ii({type:c,orientation:l,colorStops:t}){let e=cxc(l),d=t.sort((b,o)=>{let n=G=>G?.length?.value===void 0?0:parseInt(G.length.value);return n(b)-n(o)}).map($mc);return`${c}(${[e,...d].filter(Boolean).join(",")})`}Fe([ve]);function tE(c){return Ii({type:"linear-gradient",orientation:np,colorStops:c.colorStops})}function lxc(c){return c.length===void 0||c.length.type!=="%"}function eE(c){let l,t=!!c,e=c??sr;try{l=LJ.default.parse(e)[0]}catch(d){console.warn("wp.components.CustomGradientPicker failed to parse the gradient with error",d),l=LJ.default.parse(sr)[0],t=!1}if(!Array.isArray(l.orientation)&&l.orientation?.type==="directional"&&(l.orientation={type:"angular",value:lE[l.orientation.value].toString()}),l.colorStops.some(lxc)){let{colorStops:d}=l,b=100/(d.length-1);d.forEach((o,n)=>{o.length={value:`${b*n}`,type:"%"}})}return{gradientAST:l,hasGradient:t}}function dE(c,l){return{...c,colorStops:l.map(({position:t,color:e})=>{let{r:d,g:b,b:o,a:n}=Rc(e).toRgb();return{length:{type:"%",value:t?.toString()},type:n<1?"rgba":"rgb",value:n<1?[`${d}`,`${b}`,`${o}`,`${n}`]:[`${d}`,`${b}`,`${o}`]}})}}function bE(c){switch(c.type){case"hex":return`#${c.value}`;case"literal":return c.value;case"var":return`${c.type}(${c.value})`;case"rgb":case"rgba":return`${c.type}(${c.value.join(",")})`;case"hsl":{let[l,t,e]=c.value;return`hsl(${l},${t}%,${e}%)`}case"hsla":{let[l,t,e,d]=c.value;return`hsla(${l},${t}%,${e}%,${d})`}default:return"transparent"}}var oE=N(Xe,{target:"e10bzpgi1"})({name:"1gvx10y",styles:"flex-grow:5"}),nE=N(Xe,{target:"e10bzpgi0"})({name:"1gvx10y",styles:"flex-grow:5"});var ub=u(V(),1),txc=({gradientAST:c,hasGradient:l,onChange:t})=>{let e=c?.orientation?.value??$j;return(0,ub.jsx)(zI,{onChange:b=>{t(Ii({...c,orientation:{type:"angular",value:`${b}`}}))},value:l?e:""})},exc=({gradientAST:c,hasGradient:l,onChange:t})=>{let{type:e}=c,d=()=>{t(Ii({...c,orientation:c.orientation?void 0:np,type:"linear-gradient"}))},b=()=>{let{orientation:n,...G}=c;t(Ii({...G,type:"radial-gradient"}))},o=n=>{n==="linear-gradient"&&d(),n==="radial-gradient"&&b()};return(0,ub.jsx)(Fd,{className:"components-custom-gradient-picker__type-picker",label:(0,GE.__)("Type"),labelPosition:"top",onChange:o,options:cE,size:"__unstable-large",value:l?e:void 0})};function dxc({value:c,onChange:l,enableAlpha:t=!0,__experimentalIsRenderedInSidebar:e=!1}){let{gradientAST:d,hasGradient:b}=eE(c),o=tE(d),n=d.colorStops.map(G=>({color:bE(G),position:parseInt(G.length.value)}));return(0,ub.jsxs)(al,{spacing:4,className:"components-custom-gradient-picker",children:[(0,ub.jsx)(op,{__experimentalIsRenderedInSidebar:e,disableAlpha:!t,background:o,hasGradient:b,value:n,onChange:G=>{l(Ii(dE(d,G)))}}),(0,ub.jsxs)(Il,{gap:3,className:"components-custom-gradient-picker__ui-line",children:[(0,ub.jsx)(oE,{children:(0,ub.jsx)(exc,{gradientAST:d,hasGradient:b,onChange:l})}),(0,ub.jsx)(nE,{children:d.type==="linear-gradient"&&(0,ub.jsx)(txc,{gradientAST:d,hasGradient:b,onChange:l})})]})]})}var H0=dxc;var xe=u(V(),1),bxc=c=>Array.isArray(c.gradients)&&!("gradient"in c),oxc=c=>c.length>0&&c.every(l=>bxc(l));function iE({className:c,clearGradient:l,gradients:t,onChange:e,value:d,...b}){let o=(0,Gp.useMemo)(()=>t.map(({gradient:n,name:G,slug:X},i)=>(0,xe.jsx)(ue.Option,{value:n,isSelected:d===n,tooltipText:G||(0,sn.sprintf)((0,sn.__)("Gradient code: %s"),n),style:{color:"rgba( 0,0,0,0 )",background:n},onClick:d===n?l:()=>e(n,i),"aria-label":G?(0,sn.sprintf)((0,sn.__)("Gradient: %s"),G):(0,sn.sprintf)((0,sn.__)("Gradient code: %s"),n)},X)),[t,d,e,l]);return(0,xe.jsx)(ue.OptionGroup,{className:c,options:o,...b})}function aE({className:c,clearGradient:l,gradients:t,onChange:e,value:d,headingLevel:b}){let o=(0,XE.useInstanceId)(aE);return(0,xe.jsx)(al,{spacing:3,className:c,children:t.map(({name:n,gradients:G},X)=>{let i=`color-palette-${o}-${X}`;return(0,xe.jsxs)(al,{spacing:2,children:[(0,xe.jsx)(RW,{level:b,id:i,children:n}),(0,xe.jsx)(iE,{clearGradient:l,gradients:G,onChange:a=>e(a,X),value:d,"aria-labelledby":i})]},X)})})}function nxc(c){let{asButtons:l,loop:t,actions:e,headingLevel:d,"aria-label":b,"aria-labelledby":o,...n}=c,G=oxc(c.gradients)?(0,xe.jsx)(aE,{headingLevel:d,...n}):(0,xe.jsx)(iE,{...n}),{metaProps:X,labelProps:i}=xi(l,t,b,o);return(0,xe.jsx)(ue,{...X,...i,actions:e,options:G})}function Gxc({className:c,gradients:l=[],onChange:t,value:e,clearable:d=!0,enableAlpha:b=!0,disableCustomGradients:o=!1,__experimentalIsRenderedInSidebar:n,headingLevel:G=2,...X}){let i=(0,Gp.useCallback)(()=>t(void 0),[t]);return(0,xe.jsxs)(al,{spacing:l.length?4:0,children:[!o&&(0,xe.jsx)(H0,{__experimentalIsRenderedInSidebar:n,enableAlpha:b,value:e,onChange:t}),(l.length>0||d)&&(0,xe.jsx)(nxc,{...X,className:c,clearGradient:i,gradients:l,onChange:t,value:e,actions:d&&!o&&(0,xe.jsx)(ue.ButtonAction,{onClick:i,accessibleWhenDisabled:!0,disabled:!e,children:(0,sn.__)("Clear")}),headingLevel:G})]})}var Xp=Gxc;var xE=u(Y(),1);var ip=u(Y(),1),UJ=u(R0(),1),jJ=u(V(),1),Xxc=()=>{},ixc=["menuitem","menuitemradio","menuitemcheckbox"];function axc(c,l,t){let e=c+t;return e<0?l+e:e>=l?e-l:e}var uxc=class extends ip.Component{constructor(c){super(c),this.onKeyDown=this.onKeyDown.bind(this),this.bindContainer=this.bindContainer.bind(this),this.getFocusableContext=this.getFocusableContext.bind(this),this.getFocusableIndex=this.getFocusableIndex.bind(this)}componentDidMount(){this.container&&this.container.addEventListener("keydown",this.onKeyDown)}componentWillUnmount(){this.container&&this.container.removeEventListener("keydown",this.onKeyDown)}bindContainer(c){let{forwardedRef:l}=this.props;this.container=c,typeof l=="function"?l(c):l&&"current"in l&&(l.current=c)}getFocusableContext(c){if(!this.container)return null;let{onlyBrowserTabstops:l}=this.props,e=(l?UJ.focus.tabbable:UJ.focus.focusable).find(this.container),d=this.getFocusableIndex(e,c);return d>-1&&c?{index:d,target:c,focusables:e}:null}getFocusableIndex(c,l){return c.indexOf(l)}onKeyDown(c){this.props.onKeyDown&&this.props.onKeyDown(c);let{getFocusableContext:l}=this,{cycle:t=!0,eventToOffset:e,onNavigate:d=Xxc,stopNavigationEvents:b}=this.props,o=e(c);if(o!==void 0&&b){c.stopImmediatePropagation();let m=c.target?.getAttribute("role");m&&ixc.includes(m)&&c.preventDefault()}if(!o)return;let n=c.target?.ownerDocument?.activeElement;if(!n)return;let G=l(n);if(!G)return;let{index:X,focusables:i}=G,a=t?axc(X,i.length,o):X+o;a>=0&&a<i.length&&(i[a].focus(),d(a,i[a]),c.code==="Tab"&&c.preventDefault())}render(){let{children:c,stopNavigationEvents:l,eventToOffset:t,onNavigate:e,onKeyDown:d,cycle:b,onlyBrowserTabstops:o,forwardedRef:n,...G}=this.props;return(0,jJ.jsx)("div",{ref:this.bindContainer,...G,children:c})}},mE=(c,l)=>(0,jJ.jsx)(uxc,{...c,forwardedRef:l});mE.displayName="NavigableContainer";var ap=(0,ip.forwardRef)(mE);var sE=u(V(),1);function mxc({role:c="menu",orientation:l="vertical",...t},e){return(0,sE.jsx)(ap,{ref:e,stopNavigationEvents:!0,onlyBrowserTabstops:!1,role:c,"aria-orientation":c!=="presentation"&&(l==="vertical"||l==="horizontal")?l:void 0,eventToOffset:b=>{let{code:o}=b,n=["ArrowDown"],G=["ArrowUp"];if(l==="horizontal"&&(n=["ArrowRight"],G=["ArrowLeft"]),l==="both"&&(n=["ArrowRight","ArrowDown"],G=["ArrowLeft","ArrowUp"]),n.includes(o))return 1;if(G.includes(o))return-1;if(["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(o))return 0},...t})}var rE=(0,xE.forwardRef)(mxc);rE.displayName="NavigableMenu";var rn=rE;var gE=u(Y(),1);var ZE=u(V(),1);function xxc({eventToOffset:c,...l},t){return(0,ZE.jsx)(ap,{ref:t,stopNavigationEvents:!0,onlyBrowserTabstops:!0,eventToOffset:d=>{let{code:b,shiftKey:o}=d;if(b==="Tab")return o?-1:1;if(c)return c(d)},...l})}var HE=(0,gE.forwardRef)(xxc);HE.displayName="TabbableContainer";var EJ=HE;var I0=u(V(),1);function MJ(c={},l={}){let t={...c,...l};return l.className&&c.className&&(t.className=Q(l.className,c.className)),t}function RE(c){return typeof c=="function"}function sxc(c){let{children:l,className:t,controls:e,icon:d=v2,label:b,popoverProps:o,toggleProps:n,menuProps:G,disableOpenOnArrowDown:X=!1,text:i,noIcons:a,open:m,defaultOpen:x,onToggle:s,variant:r}=cc(c,"DropdownMenu");if(!e?.length&&!RE(l))return null;let g;e?.length&&(g=e,Array.isArray(g[0])||(g=[e]));let Z=MJ({className:"components-dropdown-menu__popover",variant:r},o);return(0,I0.jsx)(no,{className:t,popoverProps:Z,renderToggle:({isOpen:H,onToggle:R})=>{let W=y=>{X||!H&&y.code==="ArrowDown"&&(y.preventDefault(),R())},{as:I=lc,...B}=n??{},p=MJ({className:Q("components-dropdown-menu__toggle",{"is-opened":H})},B);return(0,I0.jsx)(I,{...p,icon:d,onClick:y=>{R(),p.onClick&&p.onClick(y)},onKeyDown:y=>{W(y),p.onKeyDown&&p.onKeyDown(y)},"aria-haspopup":"true","aria-expanded":H,label:b,text:i,showTooltip:n?.showTooltip??!0,children:p.children})},renderContent:H=>{let R=MJ({"aria-label":b,className:Q("components-dropdown-menu__menu",{"no-icons":a})},G);return(0,I0.jsxs)(rn,{...R,role:"menu",children:[RE(l)?l(H):null,g?.flatMap((W,I)=>W.map((B,p)=>(0,I0.jsx)(lc,{size:"compact",onClick:y=>{y.stopPropagation(),H.onClose(),B.onClick&&B.onClick()},className:Q("components-dropdown-menu__menu-item",{"has-separator":I>0&&p===0,"is-active":B.isActive,"is-icon-only":!B.title}),icon:B.icon,label:B.label,"aria-checked":B.role==="menuitemcheckbox"||B.role==="menuitemradio"?B.isActive:void 0,role:B.role==="menuitemcheckbox"||B.role==="menuitemradio"?B.role:"menuitem",accessibleWhenDisabled:!0,disabled:B.isDisabled,children:B.title},[I,p].join())))]})},open:m,defaultOpen:x,onToggle:s})}var rxc=UX(sxc,"DropdownMenu"),mb=rxc;var IE=N(oo,{target:"e1lpqc908"})("&&{flex-shrink:0;width:",z(6),";height:",z(6),";}"),WE=N(lo,{target:"e1lpqc907"})(sI,"{background:",D.gray[100],";border-radius:",w.radiusXSmall,";",db,db,db,db,"{height:",z(8),";}",yd,yd,yd,"{border-color:transparent;box-shadow:none;}}"),pE=N("div",{target:"e1lpqc906"})("line-height:",z(8),";margin-left:",z(2),";margin-right:",z(2),";white-space:nowrap;overflow:hidden;"),BE=N(td,{target:"e1lpqc905"})("text-transform:uppercase;line-height:",z(6),";font-weight:",w.fontWeightMedium,";&&&{font-size:11px;margin-bottom:0;}"),yE=N(ic,{target:"e1lpqc904"})("height:",z(6),";display:flex;"),PJ=N(ic,{target:"e1lpqc903"})("margin-top:",z(2),";"),VE=N(ic,{target:"e1lpqc902"})({name:"u6wnko",styles:"&&&{.components-button.has-icon{min-width:0;padding:0;}}"}),CE=N(lc,{target:"e1lpqc901"})("&&{color:",D.theme.accent,";}"),JE=N(lc,{target:"e1lpqc900"})("&&{margin-top:",z(1),";}");var fc=u(V(),1),gxc="#000";function Zxc({value:c,onChange:l,label:t}){return(0,fc.jsx)(WE,{size:"compact",label:t,hideLabelFromVision:!0,value:c,onChange:l})}function Hxc(c){let l={};return c.map(t=>{let e,{slug:d}=t;return l[d]=(l[d]||0)+1,l[d]>1&&(e=`${d}-${l[d]-1}`),{...t,slug:e??d}})}function Rxc(c,l){let t=new RegExp(`^${l}color-([\\d]+)$`),e=c.reduce((d,b)=>{if(typeof b?.slug=="string"){let o=b?.slug.match(t);if(o){let n=parseInt(o[1],10);if(n>=d)return n+1}}return d},1);return{name:(0,ct.sprintf)((0,ct.__)("Color %d"),e),slug:`${l}color-${e}`}}function hE({isGradient:c,element:l,onChange:t,popoverProps:e,onClose:d=()=>{}}){let b=(0,se.useMemo)(()=>({shift:!0,offset:20,resize:!1,placement:"left-start",...e,className:Q("components-palette-edit__popover",e?.className)}),[e]);return(0,fc.jsxs)(sG,{...b,onClose:d,children:[!c&&(0,fc.jsx)(io,{color:l.color,enableAlpha:!0,onChange:o=>{t({...l,color:o})}}),c&&(0,fc.jsx)("div",{className:"components-palette-edit__popover-gradient-picker",children:(0,fc.jsx)(H0,{__experimentalIsRenderedInSidebar:!0,value:l.gradient,onChange:o=>{t({...l,gradient:o})}})})]})}function Ixc({canOnlyChangeValues:c,element:l,onChange:t,onRemove:e,popoverProps:d,slugPrefix:b,isGradient:o}){let n=o?l.gradient:l.color,[G,X]=(0,se.useState)(!1),[i,a]=(0,se.useState)(null),m=(0,se.useMemo)(()=>({...d,anchor:i}),[i,d]);return(0,fc.jsxs)(r0,{ref:a,size:"small",children:[(0,fc.jsxs)(Uc,{justify:"flex-start",children:[(0,fc.jsx)(lc,{size:"small",onClick:()=>{X(!0)},"aria-label":(0,ct.sprintf)((0,ct.__)("Edit: %s"),l.name.trim().length?l.name:n||""),style:{padding:0},children:(0,fc.jsx)(IE,{colorValue:n})}),(0,fc.jsx)(Xe,{children:c?(0,fc.jsx)(pE,{children:l.name.trim().length?l.name:"\xA0"}):(0,fc.jsx)(Zxc,{label:o?(0,ct.__)("Gradient name"):(0,ct.__)("Color name"),value:l.name,onChange:x=>t({...l,name:x,slug:b+QI(x??"")})})}),!c&&(0,fc.jsx)(Ut,{children:(0,fc.jsx)(JE,{size:"small",icon:ys,label:(0,ct.sprintf)((0,ct.__)("Remove color: %s"),l.name.trim().length?l.name:n||""),onClick:e})})]}),G&&(0,fc.jsx)(hE,{isGradient:o,onChange:t,element:l,popoverProps:m,onClose:()=>X(!1)})]})}function Wxc({elements:c,onChange:l,canOnlyChangeValues:t,slugPrefix:e,isGradient:d,popoverProps:b,addColorRef:o}){let n=(0,se.useRef)(void 0);(0,se.useEffect)(()=>{n.current=c},[c]);let G=(0,KJ.useDebounce)(X=>l(Hxc(X)),100);return(0,fc.jsx)(al,{spacing:3,children:(0,fc.jsx)(g0,{isRounded:!0,isBordered:!0,isSeparated:!0,children:c.map((X,i)=>(0,fc.jsx)(Ixc,{isGradient:d,canOnlyChangeValues:t,element:X,onChange:a=>{G(c.map((m,x)=>x===i?a:m))},onRemove:()=>{let a=c.filter((m,x)=>x!==i);l(a.length?a:void 0),o.current?.focus()},slugPrefix:e,popoverProps:b},i))})})}var pxc=[];function Bxc({gradients:c,colors:l=pxc,onChange:t,paletteLabel:e,paletteLabelHeadingLevel:d=2,emptyMessage:b,canOnlyChangeValues:o,canReset:n,slugPrefix:G="",popoverProps:X}){let i=!!c,a=i?c:l,[m,x]=(0,se.useState)(!1),[s,r]=(0,se.useState)(null),g=m&&!!s&&a[s]&&!a[s].slug,H=a.length>0,R=(0,KJ.useDebounce)(t,100),W=(0,se.useCallback)((B,p)=>{let y=p===void 0?void 0:a[p];y&&y[i?"gradient":"color"]===B?r(p):x(!0)},[i,a]),I=(0,se.useRef)(null);return(0,fc.jsxs)(VE,{children:[(0,fc.jsxs)(Uc,{children:[(0,fc.jsx)(BE,{level:d,children:e}),(0,fc.jsxs)(yE,{children:[H&&m&&(0,fc.jsx)(CE,{size:"small",onClick:()=>{x(!1),r(null)},children:(0,ct.__)("Done")}),!o&&(0,fc.jsx)(lc,{ref:I,size:"small",isPressed:g,icon:$o,label:i?(0,ct.__)("Add gradient"):(0,ct.__)("Add color"),onClick:()=>{let{name:B,slug:p}=Rxc(a,G);t(c?[...c,{gradient:sr,name:B,slug:p}]:[...l,{color:gxc,name:B,slug:p}]),x(!0),r(a.length)}}),H&&(!m||!o||n)&&(0,fc.jsx)(mb,{icon:Js,label:i?(0,ct.__)("Gradient options"):(0,ct.__)("Color options"),toggleProps:{size:"small"},children:({onClose:B})=>(0,fc.jsx)(fc.Fragment,{children:(0,fc.jsxs)(rn,{role:"menu",children:[!m&&(0,fc.jsx)(lc,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{x(!0),B()},className:"components-palette-edit__menu-button",children:(0,ct.__)("Show details")}),!o&&(0,fc.jsx)(lc,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{r(null),x(!1),t(),B()},className:"components-palette-edit__menu-button",children:i?(0,ct.__)("Remove all gradients"):(0,ct.__)("Remove all colors")}),n&&(0,fc.jsx)(lc,{__next40pxDefaultSize:!0,className:"components-palette-edit__menu-button",variant:"tertiary",onClick:()=>{r(null),t(),B()},children:i?(0,ct.__)("Reset gradient"):(0,ct.__)("Reset colors")})]})})})]})]}),H&&(0,fc.jsxs)(PJ,{children:[m&&(0,fc.jsx)(Wxc,{canOnlyChangeValues:o,elements:a,onChange:t,slugPrefix:G,isGradient:i,popoverProps:X,addColorRef:I}),!m&&s!==null&&(0,fc.jsx)(hE,{isGradient:i,onClose:()=>r(null),onChange:B=>{R(a.map((p,y)=>y===s?B:p))},element:a[s??-1],popoverProps:X}),!m&&(i?(0,fc.jsx)(Xp,{gradients:c,onChange:W,clearable:!1,disableCustomGradients:!0}):(0,fc.jsx)(IG,{colors:l,onChange:W,clearable:!1,disableCustomColors:!0}))]}),!H&&b&&(0,fc.jsx)(PJ,{children:b})]})}var YE=Bxc;var CG=u(nc(),1),ke=u(Y(),1),TE=u(dc(),1),qJ=u(eo(),1);var yxc=({__next40pxDefaultSize:c})=>!c&&O("height:28px;padding-left:",z(1),";padding-right:",z(1),";",""),FE=N(Il,{target:"evuatpg0"})("height:38px;padding-left:",z(2),";padding-right:",z(2),";",yxc,";");var up=u(Y(),1),vE=u(V(),1);function Vxc(c,l){let{value:t,isExpanded:e,instanceId:d,selectedSuggestionIndex:b,className:o,onChange:n,onFocus:G,onBlur:X,...i}=c,[a,m]=(0,up.useState)(!1),x=t?t.length+1:0,s=Z=>{n&&n({value:Z.target.value})},r=Z=>{m(!0),G?.(Z)},g=Z=>{m(!1),X?.(Z)};return(0,vE.jsx)("input",{ref:l,id:`components-form-token-input-${d}`,type:"text",...i,value:t||"",onChange:s,onFocus:r,onBlur:g,size:x,className:Q(o,"components-form-token-field__input"),autoComplete:"off",role:"combobox","aria-expanded":e,"aria-autocomplete":"list","aria-owns":e?`components-form-token-suggestions-${d}`:void 0,"aria-activedescendant":a&&b!==-1&&e?`components-form-token-suggestions-${d}-${b}`:void 0,"aria-describedby":`components-form-token-suggestions-howto-${d}`})}var NE=(0,up.forwardRef)(Vxc);NE.displayName="TokenInput";var mp=NE;var fE=u(dc(),1),SE=u(nc(),1),Wi=u(V(),1),Cxc=c=>{c.preventDefault()};function Jxc({selectedIndex:c,scrollIntoView:l,match:t,onHover:e,onSelect:d,suggestions:b=[],displayTransform:o,instanceId:n,__experimentalRenderItem:G}){let X=(0,fE.useRefEffect)(x=>{c>-1&&l&&x.children[c]&&x.children[c].scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"})},[c,l]),i=x=>()=>{e?.(x)},a=x=>()=>{d?.(x)},m=x=>{let s=o(t).normalize("NFKC").toLocaleLowerCase();if(s.length===0)return null;let r=o(x),g=r.normalize("NFKC").toLocaleLowerCase().indexOf(s);return{suggestionBeforeMatch:r.substring(0,g),suggestionMatch:r.substring(g,g+s.length),suggestionAfterMatch:r.substring(g+s.length)}};return(0,Wi.jsxs)("ul",{ref:X,className:"components-form-token-field__suggestions-list",id:`components-form-token-suggestions-${n}`,role:"listbox",children:[b.map((x,s)=>{let r=m(x),g=s===c,Z=typeof x=="object"&&x?.disabled,H=typeof x=="object"&&"value"in x?x?.value:o(x),R=Q("components-form-token-field__suggestion",{"is-selected":g}),W;return typeof G=="function"?W=G({item:x}):r?W=(0,Wi.jsxs)("span",{"aria-label":o(x),children:[r.suggestionBeforeMatch,(0,Wi.jsx)("strong",{className:"components-form-token-field__suggestion-match",children:r.suggestionMatch}),r.suggestionAfterMatch]}):W=o(x),(0,Wi.jsx)("li",{id:`components-form-token-suggestions-${n}-${s}`,role:"option",className:R,onMouseDown:Cxc,onClick:a(x),onMouseEnter:i(x),"aria-selected":s===c,"aria-disabled":Z,children:W},H)}),b.length===0&&(0,Wi.jsx)("li",{className:"components-form-token-field__suggestion is-empty",children:(0,SE.__)("No items found")})]})}var xp=Jxc;var sp=u(Y(),1),rp=u(dc(),1),_J=u(V(),1),gp=(0,rp.createHigherOrderComponent)(c=>function(t){let[e,d]=(0,sp.useState)(void 0),b=(0,sp.useCallback)(o=>d(()=>o?.handleFocusOutside?o.handleFocusOutside.bind(o):void 0),[]);return(0,_J.jsx)("div",{...(0,rp.__experimentalUseFocusOutside)(e),children:(0,_J.jsx)(c,{ref:b,...t})})},"withFocusOutside");var hxc=Ye`
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
 `,kE=N("svg",{target:"ea4tfvq2"})("width:",w.spinnerSize,"px;height:",w.spinnerSize,"px;display:inline-block;margin:5px 11px 0;position:relative;color:",D.theme.accent,";overflow:visible;opacity:1;background-color:transparent;"),zE={name:"9s4963",styles:"fill:transparent;stroke-width:1.5px"},AE=N("circle",{target:"ea4tfvq1"})(zE,";stroke:",D.gray[300],";"),OE=N("path",{target:"ea4tfvq0"})(zE,";stroke:currentColor;stroke-linecap:round;transform-origin:50% 50%;animation:1.4s linear infinite both ",hxc,";");var QE=u(Y(),1),rr=u(V(),1);function Yxc({className:c,...l},t){return(0,rr.jsxs)(kE,{className:Q("components-spinner",c),viewBox:"0 0 100 100",width:"16",height:"16",xmlns:"http://www.w3.org/2000/svg",role:"presentation",focusable:"false",...l,ref:t,children:[(0,rr.jsx)(AE,{cx:"50",cy:"50",r:"50",vectorEffect:"non-scaling-stroke"}),(0,rr.jsx)(OE,{d:"m 50 0 a 50 50 0 0 1 50 50",vectorEffect:"non-scaling-stroke"})]})}var wE=(0,QE.forwardRef)(Yxc);wE.displayName="Spinner";var W0=wE;var xb=u(V(),1),Fxc=()=>{},vxc=gp(class extends ke.Component{handleFocusOutside(l){this.props.onFocusOutside(l)}render(){return this.props.children}}),Zp=(c,l)=>c===null?-1:l.indexOf(c);function DE(c){let{__next40pxDefaultSize:l=!1,value:t,label:e,options:d,onChange:b,onFilterValueChange:o=Fxc,hideLabelFromVision:n,help:G,allowReset:X=!0,className:i,isLoading:a=!1,messages:m={selected:(0,CG.__)("Item selected.")},__experimentalRenderItem:x,expandOnFocus:s=!0,placeholder:r}=Et(c),[g,Z]=de({value:t,onChange:b}),H=d.find(M=>M.value===g),R=H?.label??"",W=(0,TE.useInstanceId)(DE,"combobox-control"),[I,B]=(0,ke.useState)(H||null),[p,y]=(0,ke.useState)(!1),[h,C]=(0,ke.useState)(!1),[J,f]=(0,ke.useState)(""),k=(0,ke.useRef)(null),F=(0,ke.useMemo)(()=>{let M=[],oc=[],Hc=Es(J);return d.forEach(Bc=>{let wc=Es(Bc.label).indexOf(Hc);wc===0?M.push(Bc):wc>0&&oc.push(Bc)}),M.concat(oc)},[J,d]),T=M=>{M.disabled||(Z(M.value),(0,qJ.speak)(m.selected,"assertive"),B(M),f(""),y(!1))},L=(M=1)=>{let Hc=Zp(I,F)+M;Hc<0?Hc=F.length-1:Hc>=F.length&&(Hc=0),B(F[Hc]),y(!0)},v=Vd(M=>{let oc=!1;if(!M.defaultPrevented){switch(M.code){case"Enter":I&&(T(I),oc=!0);break;case"ArrowUp":L(-1),oc=!0;break;case"ArrowDown":L(1),oc=!0;break;case"Escape":y(!1),B(null),oc=!0;break;default:break}oc&&M.preventDefault()}}),A=()=>{C(!1)},S=()=>{C(!0),s&&y(!0),o(""),f("")},U=()=>{y(!0)},P=()=>{y(!1)},bc=M=>{let oc=M.value;f(oc),o(oc),h&&y(!0)},j=()=>{Z(null),k.current?.focus()},ec=M=>{M.stopPropagation()};return(0,ke.useEffect)(()=>{let M=F.length>0,oc=Zp(I,F)>0;M&&!oc&&B(F[0])},[F,I]),(0,ke.useEffect)(()=>{let M=F.length>0;if(p){let oc=M?(0,CG.sprintf)((0,CG._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",F.length),F.length):(0,CG.__)("No results.");(0,qJ.speak)(oc,"polite")}},[F,p]),Lc({componentName:"ComboboxControl",__next40pxDefaultSize:l,size:void 0}),(0,xb.jsx)(vxc,{onFocusOutside:P,children:(0,xb.jsx)(Dc,{className:Q(i,"components-combobox-control"),label:e,id:`components-form-token-input-${W}`,hideLabelFromVision:n,help:G,children:(0,xb.jsxs)("div",{className:"components-combobox-control__suggestions-container",tabIndex:-1,onKeyDown:v,children:[(0,xb.jsxs)(FE,{__next40pxDefaultSize:l,children:[(0,xb.jsx)(Xe,{children:(0,xb.jsx)(mp,{className:"components-combobox-control__input",instanceId:W,ref:k,placeholder:r,value:p?J:R,onFocus:S,onBlur:A,onClick:U,isExpanded:p,selectedSuggestionIndex:Zp(I,F),onChange:bc})}),a&&(0,xb.jsx)(W0,{}),X&&!!g&&!p&&(0,xb.jsx)(lc,{size:"small",icon:PX,onClick:j,onKeyDown:ec,label:(0,CG.__)("Reset")})]}),p&&!a&&(0,xb.jsx)(xp,{instanceId:W,match:{label:J,value:""},displayTransform:M=>M.label,suggestions:F,selectedIndex:Zp(I,F),onHover:B,onSelect:T,scrollIntoView:!0,__experimentalRenderItem:x})]})})})}var Hp=DE;var LE=u(Y(),1),ch=u(dc(),1),lh=u(ml(),1);var th=u(V(),1);function UE(c){if(c.state){let{state:l,...t}=c,{store:e,...d}=UE(l);return{...t,...d,store:e}}return c}var $J={__unstableComposite:"Composite",__unstableCompositeGroup:"Composite.Group or Composite.Row",__unstableCompositeItem:"Composite.Item",__unstableUseCompositeState:"Composite"};function eh(c,l={}){let t=c.displayName??"",e=d=>{(0,lh.default)(`wp.components.${t}`,{since:"6.7",alternative:$J.hasOwnProperty(t)?$J[t]:void 0});let{store:b,...o}=UE(d),n=o;return n={...n,id:(0,ch.useInstanceId)(b,n.baseId,n.id)},Object.entries(l).forEach(([G,X])=>{n.hasOwnProperty(G)&&(Object.assign(n,{[X]:n[G]}),delete n[G])}),delete n.baseId,(0,th.jsx)(c,{...n,store:b})};return e.displayName=t,e}var Nxc=(0,LE.forwardRef)(({role:c,...l},t)=>{let e=c==="row"?Qt.Row:Qt.Group;return(0,th.jsx)(e,{ref:t,role:c,...l})}),dh=eh(Object.assign(Qt,{displayName:"__unstableComposite"}),{baseId:"id"}),jE=eh(Object.assign(Nxc,{displayName:"__unstableCompositeGroup"})),EE=eh(Object.assign(Qt.Item,{displayName:"__unstableCompositeItem"}),{focusable:"accessibleWhenDisabled"});function ME(c={}){(0,lh.default)("wp.components.__unstableUseCompositeState",{since:"6.7",alternative:$J.__unstableUseCompositeState});let{baseId:l,currentId:t,orientation:e,rtl:d=!1,loop:b=!1,wrap:o=!1,shift:n=!1,unstable_virtual:G}=c;return{baseId:(0,ch.useInstanceId)(dh,"composite",l),store:uX({defaultActiveId:t,rtl:d,orientation:e,focusLoop:b,focusShift:n,focusWrap:o,virtualFocus:G})}}var nh=u(nc(),1),rb=u(Y(),1);var Jl=u(Y(),1),fd=u(dc(),1),bh=u(nc(),1);var lM=u(R0(),1);var fxc=new Set(["alert","status","log","marquee","timer"]),PE=[];function KE(c){let l=Array.from(document.body.children),t=[];PE.push(t);for(let e of l)e!==c&&Sxc(e)&&(e.setAttribute("aria-hidden","true"),t.push(e))}function Sxc(c){let l=c.getAttribute("role");return!(c.tagName==="SCRIPT"||c.hasAttribute("hidden")||c.hasAttribute("aria-hidden")||c.hasAttribute("aria-live")||l&&fxc.has(l))}function _E(){let c=PE.pop();if(c)for(let l of c)l.removeAttribute("aria-hidden")}var qE=u(dc(),1),p0=u(Y(),1),G0l=u(Ge(),1);var zxc=w.transitionDuration,Axc=Number.parseInt(w.transitionDuration),Oxc="components-modal__disappear-animation";function $E(){let c=(0,p0.useRef)(null),[l,t]=(0,p0.useState)(!1),e=(0,qE.useReducedMotion)(),d=(0,p0.useCallback)(()=>new Promise(b=>{let o=c.current;if(e){b();return}if(!o){b();return}let n,G=()=>new Promise(i=>{n=a=>{a.animationName===Oxc&&i()},o.addEventListener("animationend",n),t(!0)}),X=()=>new Promise(i=>{setTimeout(()=>i(),Axc*1.2)});Promise.race([G(),X()]).then(()=>{n&&o.removeEventListener("animationend",n),t(!1),b()})}),[e]);return{overlayClassname:l?"is-animating-out":void 0,frameRef:c,frameStyle:{"--modal-frame-animation-duration":`${zxc}`},closeModal:d}}var cM=u(Y(),1),Rp=(0,cM.createContext)(new Set);Rp.displayName="ModalContext";var Nt=u(V(),1),gr=new Map;function Qxc(c,l){let{bodyOpenClassName:t="modal-open",role:e="dialog",title:d=null,focusOnMount:b=!0,shouldCloseOnEsc:o=!0,shouldCloseOnClickOutside:n=!0,isDismissible:G=!0,aria:X={labelledby:void 0,describedby:void 0},onRequestClose:i,icon:a,closeButtonLabel:m,children:x,style:s,overlayClassName:r,className:g,contentLabel:Z,onKeyDown:H,isFullScreen:R=!1,size:W,headerActions:I=null,__experimentalHideHeader:B=!1}=c,p=(0,Jl.useRef)(null),y=(0,fd.useInstanceId)(oh),h=d?`components-modal-header-${y}`:X.labelledby,C=(0,fd.useFocusOnMount)(b==="firstContentElement"?"firstElement":b),J=(0,fd.useConstrainedTabbing)(),f=(0,fd.useFocusReturn)(),k=(0,Jl.useRef)(null),F=(0,Jl.useRef)(null),[T,L]=(0,Jl.useState)(!1),[v,A]=(0,Jl.useState)(!1),S;R||W==="fill"?S="is-full-screen":W&&(S=`has-size-${W}`);let U=(0,Jl.useCallback)(()=>{if(!k.current)return;let gc=(0,lM.getScrollContainer)(k.current);k.current===gc?A(!0):A(!1)},[k]);(0,Jl.useEffect)(()=>(KE(p.current),()=>_E()),[]);let P=(0,Jl.useRef)(void 0);(0,Jl.useEffect)(()=>{P.current=i},[i]);let bc=(0,Jl.useContext)(Rp),[j]=(0,Jl.useState)(()=>new Set);(0,Jl.useEffect)(()=>{bc.add(P);for(let gc of bc)gc!==P&&gc.current?.();return()=>{for(let gc of j)gc.current?.();bc.delete(P)}},[bc,j]),(0,Jl.useEffect)(()=>{let gc=t,Zl=1+(gr.get(gc)??0);return gr.set(gc,Zl),document.body.classList.add(t),()=>{let zl=gr.get(gc)-1;zl===0?(document.body.classList.remove(gc),gr.delete(gc)):gr.set(gc,zl)}},[t]);let{closeModal:ec,frameRef:M,frameStyle:oc,overlayClassname:Hc}=$E();(0,Jl.useLayoutEffect)(()=>{if(!window.ResizeObserver||!F.current)return;let gc=new ResizeObserver(U);return gc.observe(F.current),U(),()=>{gc.disconnect()}},[U,F]);function Bc(gc){o&&(gc.code==="Escape"||gc.key==="Escape")&&!gc.defaultPrevented&&(gc.preventDefault(),ec().then(()=>i(gc)))}let wc=(0,Jl.useCallback)(gc=>{let Zl=gc?.currentTarget?.scrollTop??-1;!T&&Zl>0?L(!0):T&&Zl<=0&&L(!1)},[T]),Wl=null,sl={onPointerDown:gc=>{gc.target===gc.currentTarget&&(Wl=gc.target,gc.preventDefault())},onPointerUp:({target:gc,button:Zl})=>{let zl=gc===Wl;Wl=null,Zl===0&&zl&&ec().then(()=>i())}},tl=(0,Nt.jsx)("div",{ref:(0,fd.useMergeRefs)([p,l]),className:Q("components-modal__screen-overlay",Hc,r),onKeyDown:Vd(Bc),...n?sl:{},children:(0,Nt.jsx)(Uu,{document,children:(0,Nt.jsx)("div",{className:Q("components-modal__frame",S,g),style:{...oc,...s},ref:(0,fd.useMergeRefs)([M,J,f,b!=="firstContentElement"?C:null]),role:e,"aria-label":Z,"aria-labelledby":Z?void 0:h,"aria-describedby":X.describedby,tabIndex:-1,onKeyDown:H,children:(0,Nt.jsxs)("div",{className:Q("components-modal__content",{"hide-header":B,"is-scrollable":v,"has-scrolled-content":T}),role:"document",onScroll:wc,ref:k,"aria-label":v?(0,bh.__)("Scrollable section"):void 0,tabIndex:v?0:void 0,children:[!B&&(0,Nt.jsxs)("div",{className:"components-modal__header",children:[(0,Nt.jsxs)("div",{className:"components-modal__header-heading-container",children:[a&&(0,Nt.jsx)("span",{className:"components-modal__icon-container","aria-hidden":!0,children:a}),d&&(0,Nt.jsx)("h1",{id:h,className:"components-modal__header-heading",children:d})]}),I,G&&(0,Nt.jsxs)(Nt.Fragment,{children:[(0,Nt.jsx)(rt,{marginBottom:0,marginLeft:2}),(0,Nt.jsx)(lc,{size:"compact",onClick:gc=>ec().then(()=>i(gc)),icon:KX,label:m||(0,bh.__)("Close")})]})]}),(0,Nt.jsx)("div",{ref:(0,fd.useMergeRefs)([F,b==="firstContentElement"?C:null]),className:"components-modal__children-container",children:x})]})})})});return(0,Jl.createPortal)((0,Nt.jsx)(Rp.Provider,{value:j,children:tl}),document.body)}var oh=(0,Jl.forwardRef)(Qxc);oh.displayName="Modal";var B0=oh;var tM={name:"7g5ii0",styles:"&&{z-index:1000001;}"};var sb=u(V(),1),Txc=(c,l)=>{let{isOpen:t,onConfirm:e,onCancel:d,children:b,confirmButtonText:o,cancelButtonText:n,isBusy:G,...X}=cc(c,"ConfirmDialog"),a=Xc()(tM),m=(0,rb.useRef)(null),x=(0,rb.useRef)(null),[s,r]=(0,rb.useState)(),[g,Z]=(0,rb.useState)();(0,rb.useEffect)(()=>{let B=typeof t<"u";r(B?t:!0),Z(!B)},[t]);let H=(0,rb.useCallback)(B=>p=>{B?.(p),g&&r(!1)},[g,r]),R=(0,rb.useCallback)(B=>{!(B.target===m.current||B.target===x.current)&&B.key==="Enter"&&H(e)(B)},[H,e]),W=n??(0,nh.__)("Cancel"),I=o??(0,nh.__)("OK");return(0,sb.jsx)(sb.Fragment,{children:s&&(0,sb.jsx)(B0,{onRequestClose:H(d),onKeyDown:R,closeButtonLabel:W,isDismissible:!0,ref:l,overlayClassName:a,__experimentalHideHeader:!0,...X,children:(0,sb.jsxs)(al,{spacing:8,children:[(0,sb.jsx)(Jt,{children:b}),(0,sb.jsxs)(Il,{direction:"row",justify:"flex-end",children:[(0,sb.jsx)(lc,{__next40pxDefaultSize:!0,ref:m,variant:"tertiary",onClick:H(d),accessibleWhenDisabled:!0,disabled:G,children:W}),(0,sb.jsx)(lc,{__next40pxDefaultSize:!0,ref:x,variant:"primary",onClick:H(e),accessibleWhenDisabled:!0,disabled:G,isBusy:G,children:I})]})]})})})},Dxc=tc(Txc,"ConfirmDialog"),Gh=Dxc;var rM=u(dc(),1),Wp=u(nc(),1);var pi=u(Y(),1),y0=u(nc(),1);var Sd={compact:w.controlPaddingXSmall,small:w.controlPaddingXSmall,default:w.controlPaddingX},Lxc=(c,l)=>{let t={compact:{[l]:32,paddingInlineStart:Sd.compact,paddingInlineEnd:Sd.compact+bi},default:{[l]:40,paddingInlineStart:Sd.default,paddingInlineEnd:Sd.default+bi},small:{[l]:24,paddingInlineStart:Sd.small,paddingInlineEnd:Sd.small+bi}};return t[c]||t.default},Uxc=c=>{let t={compact:{paddingInlineStart:Sd.compact,paddingInlineEnd:Sd.compact-6},default:{paddingInlineStart:Sd.default,paddingInlineEnd:Sd.default-6},small:{paddingInlineStart:Sd.small,paddingInlineEnd:Sd.small-6}};return t[c]||t.default},eM=N(aZ,{shouldForwardProp:c=>c!=="hasCustomRenderProp",target:"e1p3eej77"})(({size:c,hasCustomRenderProp:l})=>O("display:block;background-color:",D.theme.background,";border:none;color:",D.theme.foreground,";cursor:pointer;font-family:inherit;text-align:start;user-select:none;width:100%;&[data-focus-visible]{outline:none;}",Lxc(c,l?"minHeight":"height")," ",!l&&oM," ",As({inputSize:c}),";",""),""),jxc=Ye({"0%":{transform:`translateY(-${Lt.SLIDE_DISTANCE})`},"100%":{transform:"translateY(0)"}}),Exc=Ye({"0%":{opacity:0},"100%":{opacity:1}}),dM=N(HZ,{target:"e1p3eej76"})("display:flex;flex-direction:column;background-color:",D.theme.background,";border-radius:",w.radiusSmall,";border:1px solid ",D.theme.foreground,";box-shadow:",w.elevationMedium,";z-index:1000000;max-height:min( var( --popover-available-height, 400px ), 400px );overflow:auto;overscroll-behavior:contain;min-width:min-content;&[data-open]{@media not ( prefers-reduced-motion ){animation-name:",jxc,",",Exc,";animation-duration:",Lt.SLIDE_DURATION,",",Lt.FADE_DURATION,";animation-timing-function:",Lt.SLIDE_EASING,",",Lt.FADE_EASING,";will-change:transform,opacity;}}&[data-focus-visible]{outline:none;}"),bM=N(Vx,{target:"e1p3eej75"})(({size:c})=>O("cursor:default;display:flex;align-items:center;justify-content:space-between;font-size:",w.fontSize,";line-height:28px;padding-block:",z(2),";scroll-margin:",z(1),";user-select:none;&[aria-disabled='true']{cursor:not-allowed;}&[data-active-item]{background-color:",D.theme.gray[300],";}",Uxc(c),";",""),""),oM={name:"1h52dri",styles:"overflow:hidden;text-overflow:ellipsis;white-space:nowrap"},nM=N("div",{target:"e1p3eej74"})(oM,";"),GM=N("span",{target:"e1p3eej73"})("color:",D.theme.gray[600],";margin-inline-start:",z(2),";"),Xh=N("div",{target:"e1p3eej72"})("display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;flex:1;column-gap:",z(4),";"),XM=N("span",{target:"e1p3eej71"})("color:",D.theme.gray[600],";text-align:initial;line-height:",w.fontLineHeightBase,";padding-inline-end:",z(1),";margin-block:",z(1),";"),iM=N(rZ,{target:"e1p3eej70"})("display:flex;align-items:center;margin-inline-start:",z(2),";fill:currentColor;align-self:start;margin-block-start:2px;font-size:0;",Xh,"~&,&:not(:empty){font-size:24px;}");var kd=u(V(),1),Ip=(0,pi.createContext)(void 0);Ip.displayName="CustomSelectContext";function Mxc(c){return(Array.isArray(c)?c.length===0:c==null)?(0,y0.__)("Select an item"):Array.isArray(c)?c.length===1?c[0]:(0,y0.sprintf)((0,y0._n)("%d item selected","%d items selected",c.length),c.length):c}var Pxc=({renderSelectedValue:c,size:l="default",store:t,...e})=>{let{value:d}=xc(t),b=(0,pi.useMemo)(()=>c??Mxc,[c]);return(0,kd.jsx)(eM,{...e,size:l,hasCustomRenderProp:!!c,store:t,children:b(d)})};function Kxc(c){let{children:l,hideLabelFromVision:t=!1,label:e,size:d,store:b,className:o,isLegacy:n=!1,...G}=c,X=(0,pi.useCallback)(a=>{n&&a.stopPropagation()},[n]),i=(0,pi.useMemo)(()=>({store:b,size:d}),[b,d]);return(0,kd.jsxs)("div",{className:o,children:[(0,kd.jsx)(gZ,{store:b,render:t?(0,kd.jsx)(Qc,{}):(0,kd.jsx)(Dc.VisualLabel,{as:"div"}),children:e}),(0,kd.jsxs)(Au,{__next40pxDefaultSize:!0,size:d,suffix:(0,kd.jsx)(xW,{}),children:[(0,kd.jsx)(Pxc,{...G,size:d,store:b,showOnKeyDown:!n}),(0,kd.jsx)(dM,{gutter:12,store:b,sameWidth:!0,slide:!1,onKeyDown:X,flip:!n,children:(0,kd.jsx)(Ip.Provider,{value:i,children:l})})]})]})}var aM=Kxc;var uM=u(Y(),1);var Zr=u(V(),1);function mM({children:c,...l}){let t=(0,uM.useContext)(Ip);return(0,Zr.jsxs)(bM,{store:t?.store,size:t?.size??"default",...l,children:[c??l.value,(0,Zr.jsx)(iM,{children:(0,Zr.jsx)(Cl,{icon:jt})})]})}mM.displayName="CustomSelectControlV2.Item";var xM=mM;var ze=u(V(),1);function _xc({__experimentalShowSelectedHint:c,...l}){return{showSelectedHint:c,...l}}function sM({__experimentalHint:c,...l}){return{hint:c,...l}}function qxc(c,l){return l||(0,Wp.sprintf)((0,Wp.__)("Currently selected: %s"),c)}function gM(c){let{__next40pxDefaultSize:l=!1,__shouldNotWarnDeprecated36pxSize:t,describedBy:e,options:d,onChange:b,size:o="default",value:n,className:G,showSelectedHint:X=!1,...i}=_xc(c);Lc({componentName:"CustomSelectControl",__next40pxDefaultSize:l,size:o,__shouldNotWarnDeprecated36pxSize:t});let a=(0,rM.useInstanceId)(gM,"custom-select-control__description"),m=Jx({async setValue(H){let R=d.find(B=>B.key===H);if(!b||!R)return;await Promise.resolve();let W=m.getState(),I={highlightedIndex:W.renderedItems.findIndex(B=>B.value===H),inputValue:"",isOpen:W.open,selectedItem:R,type:""};b(I)},value:n?.key,defaultValue:d[0]?.key}),x=d.map(sM).map(({name:H,key:R,hint:W,style:I,className:B})=>(0,ze.jsx)(xM,{value:R,children:W?(0,ze.jsxs)(Xh,{children:[(0,ze.jsx)("span",{children:H}),(0,ze.jsx)(XM,{className:"components-custom-select-control__item-hint",children:W})]}):H,style:I,className:Q(B,"components-custom-select-control__item",{"has-hint":W})},R)),s=xc(m,"value"),r=d?.map(sM)?.find(({key:H})=>s===H)??d[0];return(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsx)(aM,{"aria-describedby":a,renderSelectedValue:()=>!X||!r.hint?r?.name:(0,ze.jsxs)(nM,{children:[r?.name,(0,ze.jsx)(GM,{className:"components-custom-select-control__hint",children:r?.hint})]}),size:l&&o==="default"||o==="__unstable-large"?"default":!l&&o==="default"?"compact":o,store:m,className:Q("components-custom-select-control",G),isLegacy:!0,...i,children:x}),(0,ze.jsx)(Qc,{children:(0,ze.jsx)("span",{id:a,children:qxc(r?.name,e)})})]})}var pp=gM;function pc(c){let l=Object.prototype.toString.call(c);return c instanceof Date||typeof c=="object"&&l==="[object Date]"?new c.constructor(+c):typeof c=="number"||l==="[object Number]"||typeof c=="string"||l==="[object String]"?new Date(c):new Date(NaN)}function ed(c,l){return c instanceof Date?new c.constructor(l):new Date(l)}function JG(c,l){let t=pc(c);return isNaN(l)?ed(c,NaN):(l&&t.setDate(t.getDate()+l),t)}function gb(c,l){let t=pc(c);if(isNaN(l))return ed(c,NaN);if(!l)return t;let e=t.getDate(),d=ed(c,t.getTime());d.setMonth(t.getMonth()+l+1,0);let b=d.getDate();return e>=b?d:(t.setFullYear(d.getFullYear(),d.getMonth(),e),t)}var $xc=Math.pow(10,8)*24*60*60*1e3,nml=-$xc;var ZM=864e5;var csc=3600;var HM=csc*24,Gml=HM*7,lsc=HM*365.2425,tsc=lsc/12,Xml=tsc*3;var esc={};function Bp(){return esc}function Bi(c,l){let t=Bp(),e=l?.weekStartsOn??l?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,d=pc(c),b=d.getDay(),o=(b<e?7:0)+b-e;return d.setDate(d.getDate()-o),d.setHours(0,0,0,0),d}function hG(c){let l=pc(c);return l.setHours(0,0,0,0),l}function ah(c){let l=pc(c),t=new Date(Date.UTC(l.getFullYear(),l.getMonth(),l.getDate(),l.getHours(),l.getMinutes(),l.getSeconds(),l.getMilliseconds()));return t.setUTCFullYear(l.getFullYear()),+c-+t}function uh(c,l){let t=hG(c),e=hG(l),d=+t-ah(t),b=+e-ah(e);return Math.round((d-b)/ZM)}function V0(c,l){let t=l*7;return JG(c,t)}function yp(c,l){return gb(c,l*12)}function mh(c,l){let t=hG(c),e=hG(l);return+t==+e}function xh(c){let l=pc(c),t=l.getMonth();return l.setFullYear(l.getFullYear(),t+1,0),l.setHours(23,59,59,999),l}function Hr(c,l){let t=pc(c.start),e=pc(c.end),d=+t>+e,b=d?+t:+e,o=d?e:t;o.setHours(0,0,0,0);let n=l?.step??1;if(!n)return[];n<0&&(n=-n,d=!d);let G=[];for(;+o<=b;)G.push(pc(o)),o.setDate(o.getDate()+n),o.setHours(0,0,0,0);return d?G.reverse():G}function sh(c){let l=pc(c);return l.setSeconds(0,0),l}function RM(c,l){let t=pc(c.start),e=pc(c.end),d=+t>+e,b=d?+t:+e,o=d?e:t;o.setHours(0,0,0,0),o.setDate(1);let n=l?.step??1;if(!n)return[];n<0&&(n=-n,d=!d);let G=[];for(;+o<=b;)G.push(pc(o)),o.setMonth(o.getMonth()+n);return d?G.reverse():G}function IM(c,l){let t=pc(c.start),e=pc(c.end),d=+t>+e,b=d?Bi(e,l):Bi(t,l),o=d?Bi(t,l):Bi(e,l);b.setHours(15),o.setHours(15);let n=+o.getTime(),G=b,X=l?.step??1;if(!X)return[];X<0&&(X=-X,d=!d);let i=[];for(;+G<=n;)G.setHours(0),i.push(pc(G)),G=V0(G,X),G.setHours(15);return d?i.reverse():i}function rh(c){let l=pc(c);return l.setDate(1),l.setHours(0,0,0,0),l}function WM(c,l){let t=Bp(),e=l?.weekStartsOn??l?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,d=pc(c),b=d.getDay(),o=(b<e?-7:0)+6-(b-e);return d.setDate(d.getDate()+o),d.setHours(23,59,59,999),d}function pM(c){let l=pc(c),t=l.getFullYear(),e=l.getMonth(),d=ed(c,0);return d.setFullYear(t,e+1,0),d.setHours(0,0,0,0),d.getDate()}function BM(c,l){let t=pc(c),e=pc(l);return t.getTime()>e.getTime()}function yM(c,l){let t=pc(c),e=pc(l);return+t<+e}function yi(c,l){let t=pc(c),e=pc(l);return+t==+e}function gh(c,l){let t=pc(c),e=pc(l);return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()}function VM(c,l){return JG(c,-l)}function Vp(c,l){let t=pc(c),e=t.getFullYear(),d=t.getDate(),b=ed(c,0);b.setFullYear(e,l,15),b.setHours(0,0,0,0);let o=pM(b);return t.setMonth(l,Math.min(d,o)),t}function CM(c,l){let t=pc(c);return isNaN(+t)?ed(c,NaN):(l.year!=null&&t.setFullYear(l.year),l.month!=null&&(t=Vp(t,l.month)),l.date!=null&&t.setDate(l.date),l.hours!=null&&t.setHours(l.hours),l.minutes!=null&&t.setMinutes(l.minutes),l.seconds!=null&&t.setSeconds(l.seconds),l.milliseconds!=null&&t.setMilliseconds(l.milliseconds),t)}function JM(c,l){let t=pc(c);return isNaN(+t)?ed(c,NaN):(t.setFullYear(l),t)}function hM(){return hG(Date.now())}function C0(c,l){return gb(c,-l)}function YM(c,l){return V0(c,-l)}function FM(c,l){return yp(c,-l)}var re=u(nc(),1);var bd=u(Rr(),1),FG=u(Y(),1);var nt=u(Y(),1);var dsc=(function(c){return c[c.SUNDAY=0]="SUNDAY",c[c.MONDAY=1]="MONDAY",c[c.TUESDAY=2]="TUESDAY",c[c.WEDNESDAY=3]="WEDNESDAY",c[c.THURSDAY=4]="THURSDAY",c[c.FRIDAY=5]="FRIDAY",c[c.SATURDAY=6]="SATURDAY",c})({}),bsc=(c,l,t)=>(yi(c,l)||BM(c,l))&&(yi(c,t)||yM(c,t)),NM=c=>CM(c,{hours:0,minutes:0,seconds:0,milliseconds:0}),fM=({weekStartsOn:c=dsc.SUNDAY,viewing:l=new Date,selected:t=[],numberOfMonths:e=1}={})=>{let[d,b]=(0,nt.useState)(l),o=(0,nt.useCallback)(()=>b(hM()),[b]),n=(0,nt.useCallback)(p=>b(y=>Vp(y,p)),[]),G=(0,nt.useCallback)(()=>b(p=>C0(p,1)),[]),X=(0,nt.useCallback)(()=>b(p=>gb(p,1)),[]),i=(0,nt.useCallback)(p=>b(y=>JM(y,p)),[]),a=(0,nt.useCallback)(()=>b(p=>FM(p,1)),[]),m=(0,nt.useCallback)(()=>b(p=>yp(p,1)),[]),[x,s]=(0,nt.useState)(t.map(NM)),r=()=>s([]),g=(0,nt.useCallback)(p=>x.findIndex(y=>yi(y,p))>-1,[x]),Z=(0,nt.useCallback)((p,y)=>{s(y?Array.isArray(p)?p:[p]:h=>h.concat(Array.isArray(p)?p:[p]))},[]),H=(0,nt.useCallback)(p=>s(y=>Array.isArray(p)?y.filter(h=>!p.map(C=>C.getTime()).includes(h.getTime())):y.filter(h=>!yi(h,p))),[]),R=(0,nt.useCallback)((p,y)=>g(p)?H(p):Z(p,y),[H,g,Z]),W=(0,nt.useCallback)((p,y,h)=>{s(h?Hr({start:p,end:y}):C=>C.concat(Hr({start:p,end:y})))},[]),I=(0,nt.useCallback)((p,y)=>{s(h=>h.filter(C=>!Hr({start:p,end:y}).map(J=>J.getTime()).includes(C.getTime())))},[]),B=(0,nt.useMemo)(()=>RM({start:rh(d),end:xh(gb(d,e-1))}).map(p=>IM({start:rh(p),end:xh(p)},{weekStartsOn:c}).map(y=>Hr({start:Bi(y,{weekStartsOn:c}),end:WM(y,{weekStartsOn:c})}))),[d,c,e]);return{clearTime:NM,inRange:bsc,viewing:d,setViewing:b,viewToday:o,viewMonth:n,viewPreviousMonth:G,viewNextMonth:X,viewYear:i,viewPreviousYear:a,viewNextYear:m,selected:x,setSelected:s,clearSelected:r,isSelected:g,select:Z,deselect:H,toggle:R,selectRange:W,deselectRange:I,calendar:B}};var SM=N("div",{target:"e105ri6r7"})(qe,";"),kM=N(Uc,{target:"e105ri6r6"})("column-gap:",z(2),";display:grid;grid-template-columns:0.5fr repeat( 5, 1fr ) 0.5fr;justify-items:center;margin-bottom:",z(4),";"),zM=N(lc,{target:"e105ri6r5"})({name:"sarfoe",styles:"grid-column:1/2"}),AM=N(lc,{target:"e105ri6r4"})({name:"1v98r3z",styles:"grid-column:7/8"}),OM=N(td,{target:"e105ri6r3"})("font-size:",w.fontSize,";font-weight:",w.fontWeight,";grid-column:2/7;strong{font-weight:",w.fontWeightHeading,";}"),QM=N("div",{target:"e105ri6r2"})("column-gap:",z(2),";display:grid;grid-template-columns:0.5fr repeat( 5, 1fr ) 0.5fr;justify-items:center;row-gap:",z(2),";"),wM=N("div",{target:"e105ri6r1"})("color:",D.theme.gray[700],";font-size:",w.fontSize,";line-height:",w.fontLineHeightBase,";"),TM=N(lc,{shouldForwardProp:c=>!["column","isSelected","isToday","hasEvents"].includes(c),target:"e105ri6r0"})("grid-column:",c=>c.column,";position:relative;justify-content:center;",c=>c.disabled&&`
		pointer-events: none;
		`," &&&{border-radius:",w.radiusRound,";height:",z(7),";width:",z(7),";font-weight:400;",c=>c.isSelected&&`
				background: ${D.theme.accent};

				&,
				&:hover:not(:disabled, [aria-disabled=true]) {
					color: ${D.theme.accentInverted};
				}

				&:focus:not(:disabled),
				&:focus:not(:disabled) {
					border: ${w.borderWidthFocus} solid currentColor;
				}

				/* Highlight the selected day for high-contrast mode */
				&::after {
					content: '';
					position: absolute;
					pointer-events: none;
					inset: 0;
					border-radius: inherit;
					border: 1px solid transparent;
				}
			`," ",c=>!c.isSelected&&c.isToday&&`
			background: ${D.theme.gray[200]};
			`,";}",c=>c.hasEvents&&`
		::before {
			border: 2px solid ${c.isSelected?D.theme.accentInverted:D.theme.accent};
			border-radius: ${w.radiusRound};
			content: " ";
			left: 50%;
			position: absolute;
			transform: translate(-50%, 9px);
		}
		`,";");var gn=class extends Date{constructor(){super(),this.setTime(arguments.length===0?Date.now():arguments.length===1?typeof arguments[0]=="string"?+new Date(arguments[0]):arguments[0]:Date.UTC(...arguments))}getTimezoneOffset(){return 0}},DM=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(c=>{if(DM.test(c)){let l=Date.prototype[c.replace(DM,"$1UTC")];l&&(gn.prototype[c]=l)}});var kxl=new Intl.DateTimeFormat("en-US",{weekday:"short",timeZone:"UTC"}),zxl=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",timeZone:"UTC"}),Axl=new Intl.DateTimeFormat("en-GB",{hour12:!1,hour:"numeric",minute:"numeric",second:"numeric",timeZone:"UTC"});var dd=u(Rr(),1);function Ir(c){if(typeof c=="string")return/Z|[+-]\d{2}(:?\d{2})?$/.test(c)?new gn(new Date(c)):new gn((0,dd.getDate)(c).getTime());let l=c instanceof Date?c.getTime():c;return new gn(l)}function YG(c){let l=Number((0,dd.date)("Y",c)),t=Number((0,dd.date)("n",c))-1,e=Number((0,dd.date)("j",c));return new Date(l,t,e,0,0,0,0)}function Zh(c,l){return l?(c%12+12)%24:c%12}function LM(c){return c%12||12}function Wr(c){return(l,t)=>{let e={...l};return(t.type===_X||t.type===aG||t.type===qX)&&e.value!==void 0&&(e.value=e.value.toString().padStart(c,"0")),e}}var Hh=(c,l)=>new Date(c,l+1,0).getDate();function J0(c,l){let t={year:Number((0,dd.date)("Y",c)),month:Number((0,dd.date)("n",c))-1,date:Number((0,dd.date)("j",c)),hours:Number((0,dd.date)("H",c)),minutes:Number((0,dd.date)("i",c)),seconds:Number((0,dd.date)("s",c)),...l},e=Hh(t.year,t.month);t.date=Math.min(t.date,e);let d=String(t.year).padStart(4,"0"),b=String(t.month+1).padStart(2,"0"),o=String(t.date).padStart(2,"0"),n=String(t.hours).padStart(2,"0"),G=String(t.minutes).padStart(2,"0"),X=String(t.seconds).padStart(2,"0"),i=`${d}-${b}-${o}T${n}:${G}:${X}`;return new gn((0,dd.getDate)(i).getTime())}function Cp(c){let l=c.target?.ownerDocument.defaultView?.HTMLInputElement??HTMLInputElement;return c.target instanceof l?c.target.validity.valid:!1}var Zn="Y-m-d\\TH:i:s";var zd=u(V(),1);function osc({currentDate:c,onChange:l,events:t=[],isInvalidDate:e,onMonthPreviewed:d,startOfWeek:b=0}){let o=Ir(c??new Date),{calendar:n,viewing:G,setSelected:X,setViewing:i,isSelected:a,viewPreviousMonth:m,viewNextMonth:x}=fM({selected:[YG(o)],viewing:YG(o),weekStartsOn:b}),[s,r]=(0,FG.useState)(YG(o)),[g,Z]=(0,FG.useState)(!1),[H,R]=(0,FG.useState)(c);return c!==H&&(R(c),X([YG(o)]),i(YG(o)),r(YG(o))),(0,zd.jsxs)(SM,{className:"components-datetime__date",role:"application","aria-label":(0,re.__)("Calendar"),children:[(0,zd.jsxs)(kM,{children:[(0,zd.jsx)(zM,{icon:(0,re.isRTL)()?QR:AR,variant:"tertiary","aria-label":(0,re.__)("View previous month"),onClick:()=>{m(),r(C0(s,1));let W=C0(G,1);d?.((0,bd.dateI18n)(Zn,W,-W.getTimezoneOffset()))},size:"compact"}),(0,zd.jsxs)(OM,{level:3,children:[(0,zd.jsx)("strong",{children:(0,bd.dateI18n)("F",G,-G.getTimezoneOffset())})," ",(0,bd.dateI18n)("Y",G,-G.getTimezoneOffset())]}),(0,zd.jsx)(AM,{icon:(0,re.isRTL)()?AR:QR,variant:"tertiary","aria-label":(0,re.__)("View next month"),onClick:()=>{x(),r(gb(s,1));let W=gb(G,1);d?.((0,bd.dateI18n)(Zn,W,-W.getTimezoneOffset()))},size:"compact"})]}),(0,zd.jsxs)(QM,{onFocus:()=>Z(!0),onBlur:()=>Z(!1),children:[n[0][0].map(W=>(0,zd.jsx)(wM,{children:(0,bd.dateI18n)("D",W,-W.getTimezoneOffset())},W.toString())),n[0].map(W=>W.map((I,B)=>gh(I,G)?(0,zd.jsx)(nsc,{day:I,column:B+1,isSelected:a(I),isFocusable:yi(I,s),isFocusAllowed:g,isToday:mh(I,YG(new Date)),isInvalid:e?e(I):!1,numEvents:t.filter(p=>mh(p.date,I)).length,onClick:()=>{X([I]),r(I);let p=J0(o,{year:I.getFullYear(),month:I.getMonth(),date:I.getDate()});l?.((0,bd.date)(Zn,p))},onKeyDown:p=>{let y;if(p.key==="ArrowLeft"&&(y=JG(I,(0,re.isRTL)()?1:-1)),p.key==="ArrowRight"&&(y=JG(I,(0,re.isRTL)()?-1:1)),p.key==="ArrowUp"&&(y=YM(I,1)),p.key==="ArrowDown"&&(y=V0(I,1)),p.key==="PageUp"&&(y=C0(I,1)),p.key==="PageDown"&&(y=gb(I,1)),p.key==="Home"){let C=(I.getDay()-b+7)%7;y=VM(I,C)}if(p.key==="End"){let h=I.getDay(),C=(b+6-h)%7;y=JG(I,C)}y&&(p.preventDefault(),r(y),gh(y,G)||(i(y),d?.((0,bd.dateI18n)(Zn,y,-y.getTimezoneOffset()))))}},I.toString()):null))]})]})}function nsc({day:c,column:l,isSelected:t,isFocusable:e,isFocusAllowed:d,isToday:b,isInvalid:o,numEvents:n,onClick:G,onKeyDown:X}){let i=(0,FG.useRef)(null);return(0,FG.useEffect)(()=>{i.current&&e&&d&&i.current.focus()},[e]),(0,zd.jsx)(TM,{__next40pxDefaultSize:!0,ref:i,className:"components-datetime__date__day",disabled:o,tabIndex:e?0:-1,"aria-label":Gsc(c,t,b,n),column:l,isSelected:t,isToday:b,hasEvents:n>0,onClick:G,onKeyDown:X,children:(0,bd.dateI18n)("j",c,-c.getTimezoneOffset())})}function Gsc(c,l,t,e){let{formats:d}=(0,bd.getSettings)(),o=[(0,bd.dateI18n)(d.date,c,-c.getTimezoneOffset())];return l&&o.push((0,re.__)("Selected")),t&&o.push((0,re.__)("Today")),e>0&&o.push((0,re.sprintf)((0,re._n)("There is %d event","There are %d events",e),e)),o.join(". ")}var pr=osc;var Y0=u(Y(),1),lt=u(nc(),1),Hn=u(Rr(),1);var $M=u(nc(),1),c7=u(Rr(),1);var UM=N("div",{target:"evcr2319"})("box-sizing:border-box;font-size:",w.fontSize,";"),Br=N("fieldset",{target:"evcr2318"})("border:0;margin:0 0 ",z(4)," 0;padding:0;&:last-child{margin-bottom:0;}"),jM=N("div",{target:"evcr2317"})({name:"pd0mhc",styles:"direction:ltr;display:flex"}),Jp=O("&&& ",db,"{padding-left:",z(2),";padding-right:",z(2),";text-align:center;}",""),EM=N(Yt,{target:"evcr2316"})(Jp," width:",z(9),";&&& ",db,"{padding-right:0;}&&& ",yd,"{border-right:0;border-top-right-radius:0;border-bottom-right-radius:0;}"),MM=N("span",{target:"evcr2315"})("border-top:",w.borderWidth," solid ",D.gray[700],";border-bottom:",w.borderWidth," solid ",D.gray[700],";font-size:",w.fontSize,`;line-height:calc(
		`,w.controlHeight," - ",w.borderWidth,` * 2
	);display:inline-block;`),PM=N(Yt,{target:"evcr2314"})(Jp," width:",z(9),";&&& ",db,"{padding-left:0;}&&& ",yd,"{border-left:0;border-top-left-radius:0;border-bottom-left-radius:0;}"),KM=N("div",{target:"evcr2313"})({name:"1ff36h2",styles:"flex-grow:1"}),_M=N(Yt,{target:"evcr2312"})(Jp," width:",z(9),";"),qM=N(Yt,{target:"evcr2311"})(Jp," width:",z(14),";"),Rh=N("div",{target:"evcr2310"})({name:"ebu3jh",styles:"text-decoration:underline dotted"});var hp=u(V(),1),Xsc=()=>{let{timezone:c}=(0,c7.getSettings)(),l=-1*(new Date().getTimezoneOffset()/60);if(Number(c.offset)===l)return null;let t=Number(c.offset)>=0?"+":"",e=c.abbr!==""&&isNaN(Number(c.abbr))?c.abbr:`UTC${t}${c.offsetFormatted}`,d=c.string.replace("_"," "),b=c.string==="UTC"?(0,$M.__)("Coordinated Universal Time"):`(${e}) ${d}`;return d.trim().length===0?(0,hp.jsx)(Rh,{className:"components-datetime__timezone",children:e}):(0,hp.jsx)(Ne,{placement:"top",text:b,children:(0,hp.jsx)(Rh,{className:"components-datetime__timezone",children:e})})},l7=Xsc;var h0=u(nc(),1),t7=u(Y(),1);var Ad=u(V(),1);function Ih({value:c,defaultValue:l,is12Hour:t,label:e,minutesProps:d,onChange:b}){let[o={hours:new Date().getHours(),minutes:new Date().getMinutes()},n]=de({value:c,onChange:b,defaultValue:l}),G=m(o.hours),X=LM(o.hours),i=s=>(r,{event:g})=>{if(!Cp(g))return;let Z=Number(r);n({...o,[s]:s==="hours"&&t?Zh(Z,G==="PM"):Z})},a=s=>()=>{G!==s&&n({...o,hours:Zh(X,s==="PM")})};function m(s){return s<12?"AM":"PM"}return(0,Ad.jsxs)(e?Br:t7.Fragment,{children:[e&&(0,Ad.jsx)(Dc.VisualLabel,{as:"legend",children:e}),(0,Ad.jsxs)(Uc,{alignment:"left",expanded:!1,children:[(0,Ad.jsxs)(jM,{className:"components-datetime__time-field components-datetime__time-field-time",children:[(0,Ad.jsx)(EM,{className:"components-datetime__time-field-hours-input",label:(0,h0.__)("Hours"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:String(t?X:o.hours).padStart(2,"0"),step:1,min:t?1:0,max:t?12:23,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:i("hours"),__unstableStateReducer:Wr(2)}),(0,Ad.jsx)(MM,{className:"components-datetime__time-separator","aria-hidden":"true",children:":"}),(0,Ad.jsx)(PM,{className:Q("components-datetime__time-field-minutes-input",d?.className),label:(0,h0.__)("Minutes"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:String(o.minutes).padStart(2,"0"),step:1,min:0,max:59,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:(...s)=>{i("minutes")(...s),d?.onChange?.(...s)},__unstableStateReducer:Wr(2),...d})]}),t&&(0,Ad.jsxs)(hd,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,h0.__)("Select AM or PM"),hideLabelFromVision:!0,value:G,onChange:s=>{a(s)()},children:[(0,Ad.jsx)(on,{value:"AM",label:(0,h0.__)("AM")}),(0,Ad.jsx)(on,{value:"PM",label:(0,h0.__)("PM")})]})]})]})}var Ht=u(V(),1),isc=["dmy","mdy","ymd"];function Wh({is12Hour:c,currentTime:l,onChange:t,dateOrder:e,hideLabelFromVision:d=!1}){let[b,o]=(0,Y0.useState)(()=>sh(Ir(l??new Date)));(0,Y0.useEffect)(()=>{o(sh(Ir(l??new Date)))},[l]);let n=[{value:"01",label:(0,lt.__)("January")},{value:"02",label:(0,lt.__)("February")},{value:"03",label:(0,lt.__)("March")},{value:"04",label:(0,lt.__)("April")},{value:"05",label:(0,lt.__)("May")},{value:"06",label:(0,lt.__)("June")},{value:"07",label:(0,lt.__)("July")},{value:"08",label:(0,lt.__)("August")},{value:"09",label:(0,lt.__)("September")},{value:"10",label:(0,lt.__)("October")},{value:"11",label:(0,lt.__)("November")},{value:"12",label:(0,lt.__)("December")}],{day:G,month:X,year:i,minutes:a,hours:m}=(0,Y0.useMemo)(()=>({day:(0,Hn.date)("d",b),month:(0,Hn.date)("m",b),year:(0,Hn.date)("Y",b),minutes:(0,Hn.date)("i",b),hours:(0,Hn.date)("H",b)}),[b]),x=I=>(p,{event:y})=>{if(!Cp(y))return;let h=Number(p),C=J0(b,{[I]:h});o(C),t?.((0,Hn.date)(Zn,C))},s=({hours:I,minutes:B})=>{let p=J0(b,{hours:I,minutes:B});o(p),t?.((0,Hn.date)(Zn,p))},r=(0,Ht.jsx)(_M,{className:"components-datetime__time-field components-datetime__time-field-day",label:(0,lt.__)("Day"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:G,step:1,min:1,max:Hh(Number(i),Number(X)-1),required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:x("date")},"day"),g=(0,Ht.jsx)(KM,{children:(0,Ht.jsx)(Fd,{className:"components-datetime__time-field components-datetime__time-field-month",label:(0,lt.__)("Month"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:X,options:n,onChange:I=>{let B=J0(b,{month:Number(I)-1});o(B),t?.((0,Hn.date)(Zn,B))}})},"month"),Z=(0,Ht.jsx)(qM,{className:"components-datetime__time-field components-datetime__time-field-year",label:(0,lt.__)("Year"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:i,step:1,min:1,max:9999,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:x("year"),__unstableStateReducer:Wr(4)},"year"),H=c?"mdy":"dmy",W=(e&&isc.includes(e)?e:H).split("").map(I=>{switch(I){case"d":return r;case"m":return g;case"y":return Z;default:return null}});return(0,Ht.jsxs)(UM,{className:"components-datetime__time",children:[(0,Ht.jsxs)(Br,{children:[d?(0,Ht.jsx)(Qc,{as:"legend",children:(0,lt.__)("Time")}):(0,Ht.jsx)(Dc.VisualLabel,{as:"legend",className:"components-datetime__time-legend",children:(0,lt.__)("Time")}),(0,Ht.jsxs)(Uc,{className:"components-datetime__time-wrapper",children:[(0,Ht.jsx)(Ih,{value:{hours:Number(m),minutes:Number(a)},is12Hour:c,onChange:s}),(0,Ht.jsx)(rt,{}),(0,Ht.jsx)(l7,{})]})]}),(0,Ht.jsxs)(Br,{children:[d?(0,Ht.jsx)(Qc,{as:"legend",children:(0,lt.__)("Date")}):(0,Ht.jsx)(Dc.VisualLabel,{as:"legend",className:"components-datetime__time-legend",children:(0,lt.__)("Date")}),(0,Ht.jsx)(Uc,{className:"components-datetime__time-wrapper",children:W})]})]})}Wh.TimeInput=Ih;Object.assign(Wh.TimeInput,{displayName:"TimePicker.TimeInput"});var yr=Wh;var d7=u(Y(),1);var e7=N(al,{target:"e1p5onf00"})({name:"1khn195",styles:"box-sizing:border-box"});var vG=u(V(),1),asc=()=>{};function usc({currentDate:c,is12Hour:l,dateOrder:t,isInvalidDate:e,onMonthPreviewed:d=asc,onChange:b,events:o,startOfWeek:n},G){return(0,vG.jsx)(e7,{ref:G,className:"components-datetime",spacing:4,children:(0,vG.jsxs)(vG.Fragment,{children:[(0,vG.jsx)(yr,{currentTime:c,onChange:b,is12Hour:l,dateOrder:t}),(0,vG.jsx)(pr,{currentDate:c,onChange:b,isInvalidDate:e,events:o,onMonthPreviewed:d,startOfWeek:n})]})})}var b7=(0,d7.forwardRef)(usc);b7.displayName="DateTimePicker";var o7=b7;var n7=o7;var G7={name:"u2jump",styles:"position:relative;pointer-events:none;&::after{content:'';position:absolute;top:0;right:0;bottom:0;left:0;}*{pointer-events:none;}"};var X7=u(Y(),1),i7=(0,X7.createContext)(!1);i7.displayName="DisabledContext";var ph=i7;var Bh=u(V(),1),{Consumer:msc,Provider:xsc}=ph;function yh({className:c,children:l,isDisabled:t=!0,...e}){let d=Xc();return(0,Bh.jsx)(xsc,{value:t,children:(0,Bh.jsx)("div",{inert:t?"true":void 0,className:t?d(G7,c,"components-disabled"):void 0,...e,children:l})})}yh.Context=ph;yh.Consumer=msc;var a7=yh;var u7=u(Y(),1),m7=u(V(),1),ssc=({visible:c,children:l,...t},e)=>{let d=So({open:c});return(0,m7.jsx)(zm,{store:d,ref:e,...t,children:l})},Vh=(0,u7.forwardRef)(ssc);Vh.displayName="DisclosureContent";var s7=u(dc(),1),Vr=u(Y(),1),F0=u(V(),1),rsc="components-draggable__invisible-drag-image",gsc="components-draggable__clone",Ch=0,x7="is-dragging-components-draggable";function Zsc({children:c,onDragStart:l,onDragOver:t,onDragEnd:e,appendToOwnerDocument:d=!1,cloneClassname:b,elementId:o,transferData:n,__experimentalTransferDataType:G="text",__experimentalDragComponent:X}){let i=(0,Vr.useRef)(null),a=(0,Vr.useRef)(()=>{});function m(s){s.preventDefault(),a.current(),e&&e(s)}function x(s){let{ownerDocument:r}=s.target;s.dataTransfer.setData(G,JSON.stringify(n));let g=r.createElement("div");g.style.top="0",g.style.left="0";let Z=r.createElement("div");typeof s.dataTransfer.setDragImage=="function"&&(Z.classList.add(rsc),r.body.appendChild(Z),s.dataTransfer.setDragImage(Z,0,0)),g.classList.add(gsc),b&&g.classList.add(b);let H=0,R=0;if(i.current){H=s.clientX,R=s.clientY,g.style.transform=`translate( ${H}px, ${R}px )`;let y=r.createElement("div");y.innerHTML=i.current.innerHTML,g.appendChild(y),r.body.appendChild(g)}else{let y=r.getElementById(o),h=y.getBoundingClientRect(),C=y.parentNode,J=h.top,f=h.left;g.style.width=`${h.width+Ch*2}px`;let k=y.cloneNode(!0);k.id=`clone-${o}`,H=f-Ch,R=J-Ch,g.style.transform=`translate( ${H}px, ${R}px )`,Array.from(k.querySelectorAll("iframe")).forEach(F=>F.parentNode?.removeChild(F)),g.appendChild(k),d?r.body.appendChild(g):C?.appendChild(g)}let W=s.clientX,I=s.clientY;function B(y){if(W===y.clientX&&I===y.clientY)return;let h=H+y.clientX-W,C=R+y.clientY-I;g.style.transform=`translate( ${h}px, ${C}px )`,W=y.clientX,I=y.clientY,H=h,R=C,t&&t(y)}let p=(0,s7.throttle)(B,16);r.addEventListener("dragover",p),r.body.classList.add(x7),l&&l(s),a.current=()=>{g&&g.parentNode&&g.parentNode.removeChild(g),Z&&Z.parentNode&&Z.parentNode.removeChild(Z),r.body.classList.remove(x7),r.removeEventListener("dragover",p)}}return(0,Vr.useEffect)(()=>()=>{a.current()},[]),(0,F0.jsxs)(F0.Fragment,{children:[c({onDraggableStart:x,onDraggableEnd:m}),X&&(0,F0.jsx)("div",{className:"components-draggable-drag-component-root",style:{display:"none"},ref:i,children:X})]})}var r7=Zsc;var g7=u(nc(),1),Yp=u(Y(),1);var Jh=u(R0(),1),Z7=u(dc(),1),Vi=u(V(),1);function Hsc({className:c,icon:l=T2,label:t,onFilesDrop:e,onHTMLDrop:d,onDrop:b,isEligible:o=()=>!0,...n}){let[G,X]=(0,Yp.useState)(),[i,a]=(0,Yp.useState)(),[m,x]=(0,Yp.useState)(),s=(0,Z7.__experimentalUseDropZone)({onDrop(g){if(!g.dataTransfer)return;let Z=(0,Jh.getFilesFromDataTransfer)(g.dataTransfer),H=g.dataTransfer.getData("text/html");H&&d?d(H):Z.length&&e?e(Z):b&&b(g)},onDragStart(g){X(!0),g.dataTransfer&&(g.dataTransfer.types.includes("text/html")?x(!!d):g.dataTransfer.types.includes("Files")||(0,Jh.getFilesFromDataTransfer)(g.dataTransfer).length>0?x(!!e):x(!!b&&o(g.dataTransfer)))},onDragEnd(){a(!1),X(!1),x(void 0)},onDragEnter(){a(!0)},onDragLeave(){a(!1)}}),r=Q("components-drop-zone",c,{"is-active":m,"is-dragging-over-document":G,"is-dragging-over-element":i});return(0,Vi.jsx)("div",{...n,ref:s,className:r,children:(0,Vi.jsx)("div",{className:"components-drop-zone__content",children:(0,Vi.jsxs)("div",{className:"components-drop-zone__content-inner",children:[(0,Vi.jsx)(Cl,{icon:l,className:"components-drop-zone__content-icon"}),(0,Vi.jsx)("span",{className:"components-drop-zone__content-text",children:t||(0,g7.__)("Drop files to upload")})]})})})}var H7=Hsc;var R7=u(ml(),1);function I7({children:c}){return(0,R7.default)("wp.components.DropZoneProvider",{since:"5.8",hint:"wp.component.DropZone no longer needs a provider. wp.components.DropZoneProvider is safe to remove from your code."}),c}var v7=u(VR(),1),N7=u(Y(),1),Zo=u(nc(),1);var W7=u(Y(),1);var p7=u(nc(),1);var B7=u(dc(),1),Od=u(V(),1);function y7({label:c,value:l,colors:t,disableCustomColors:e,enableAlpha:d,onChange:b}){let[o,n]=(0,W7.useState)(!1),G=(0,B7.useInstanceId)(y7,"color-list-picker-option"),X=`${G}__label`,i=`${G}__content`;return(0,Od.jsxs)(Od.Fragment,{children:[(0,Od.jsx)(lc,{__next40pxDefaultSize:!0,className:"components-color-list-picker__swatch-button",id:X,onClick:()=>n(a=>!a),"aria-expanded":o,"aria-controls":i,icon:l?(0,Od.jsx)(oo,{colorValue:l,className:"components-color-list-picker__swatch-color"}):(0,Od.jsx)(cl,{icon:Ss}),text:c}),(0,Od.jsx)("div",{role:"group",id:i,"aria-labelledby":X,"aria-hidden":!o,children:o&&(0,Od.jsx)(IG,{"aria-label":(0,p7.__)("Color options"),className:"components-color-list-picker__color-picker",colors:t,value:l,clearable:!1,onChange:b,disableCustomColors:e,enableAlpha:d})})]})}function Rsc({colors:c,labels:l,value:t=[],disableCustomColors:e,enableAlpha:d,onChange:b}){return(0,Od.jsx)("div",{className:"components-color-list-picker",children:l.map((o,n)=>(0,Od.jsx)(y7,{label:o,value:t[n],colors:c,disableCustomColors:e,enableAlpha:d,onChange:G=>{let X=t.slice();X[n]=G,b(X)}},n))})}var V7=Rsc;Fe([ve]);function C7(c){return!c||c.length<2?["#000","#fff"]:c.map(({color:l})=>({color:l,brightness:Rc(l).brightness()})).reduce(([l,t],e)=>[e.brightness<=l.brightness?e:l,e.brightness>=t.brightness?e:t],[{brightness:1,color:""},{brightness:0,color:""}]).map(({color:l})=>l)}function v0(c=[],l="90deg"){let t=100/c.length,e=c.map((d,b)=>`${d} ${b*t}%, ${d} ${(b+1)*t}%`).join(", ");return`linear-gradient( ${l}, ${e} )`}function J7(c){return c.map((l,t)=>({position:t*100/(c.length-1),color:l}))}function h7(c=[]){return c.map(({color:l})=>l)}var Y7=u(V(),1),Isc=["#333","#CCC"];function F7({value:c,onChange:l}){let t=!!c,e=t?c:Isc,d=v0(e),b=J7(e);return(0,Y7.jsx)(op,{disableInserter:!0,background:d,hasGradient:t,value:b,onChange:o=>{let n=h7(o);l(n)}})}var go=u(V(),1);function Wsc({asButtons:c,loop:l,clearable:t=!0,unsetable:e=!0,colorPalette:d,duotonePalette:b,disableCustomColors:o,disableCustomDuotone:n,value:G,onChange:X,"aria-label":i,"aria-labelledby":a,...m}){let[x,s]=(0,N7.useMemo)(()=>C7(d),[d]),r=G==="unset",g=(0,Zo.__)("Unset"),Z=(0,go.jsx)(ue.Option,{value:"unset",isSelected:r,tooltipText:g,"aria-label":g,className:"components-duotone-picker__color-indicator",onClick:()=>{X(r?void 0:"unset")}},"unset"),H=b.map(({colors:B,slug:p,name:y})=>{let h={background:v0(B,"135deg"),color:"transparent"},C=y??(0,Zo.sprintf)((0,Zo.__)("Duotone code: %s"),p),J=y?(0,Zo.sprintf)((0,Zo.__)("Duotone: %s"),y):C,f=(0,v7.default)(B,G);return(0,go.jsx)(ue.Option,{value:B,isSelected:f,"aria-label":J,tooltipText:C,style:h,onClick:()=>{X(f?void 0:B)}},p)}),{metaProps:R,labelProps:W}=xi(c,l,i,a),I=e?[Z,...H]:H;return(0,go.jsx)(ue,{...m,...R,...W,options:I,actions:!!t&&(0,go.jsx)(ue.ButtonAction,{onClick:()=>X(void 0),accessibleWhenDisabled:!0,disabled:!G,children:(0,Zo.__)("Clear")}),children:(0,go.jsx)(rt,{paddingTop:I.length===0?0:4,children:(0,go.jsxs)(al,{spacing:3,children:[!o&&!n&&(0,go.jsx)(F7,{value:r?void 0:G,onChange:X}),!n&&(0,go.jsx)(V7,{labels:[(0,Zo.__)("Shadows"),(0,Zo.__)("Highlights")],colors:d,value:r?void 0:G,disableCustomColors:o,enableAlpha:!0,onChange:B=>{B[0]||(B[0]=x),B[1]||(B[1]=s);let p=B.length>=2?B:void 0;X(p)}})]})})})}var hh=Wsc;var Yh=u(V(),1);function psc({values:c}){return c?(0,Yh.jsx)(oo,{colorValue:v0(c,"135deg")}):(0,Yh.jsx)(cl,{icon:Ss})}var Fh=psc;var Fp=u(nc(),1),f7=u(Y(),1),Cr=u(V(),1);function Bsc(c,l){let{href:t,children:e,className:d,rel:b="",...o}=c,n=[...new Set([...b.split(" "),"external","noreferrer","noopener"].filter(Boolean))].join(" "),G=Q("components-external-link",d),X=!!t?.startsWith("#");return(0,Cr.jsxs)("a",{...o,className:G,href:t,onClick:a=>{X&&a.preventDefault(),c.onClick&&c.onClick(a)},target:"_blank",rel:n,ref:l,children:[(0,Cr.jsx)("span",{className:"components-external-link__contents",children:e}),(0,Cr.jsx)("span",{className:Q("components-external-link__icon","wp-exclude-emoji"),"aria-label":(0,Fp.__)("(opens in a new tab)"),children:(0,Fp.isRTL)()?"\u2196":"\u2197"})]})}var S7=(0,f7.forwardRef)(Bsc);S7.displayName="ExternalLink";var vp=S7;var q7=u(nc(),1),Rn=u(Y(),1),fp=u(dc(),1);var Jr=u(nc(),1);var N0={width:200,height:170},ysc=["avi","mpg","mpeg","mov","mp4","m4v","ogg","ogv","webm","wmv"];function Vsc(c=""){let l=c.split(".");return l[l.length-1]}function k7(c=""){return c?c.startsWith("data:video/")||ysc.includes(Vsc(c)):!1}function vh(c){return Math.round(c*100)}var z7=N(ic,{target:"eeew7dm9"})("border:0;padding:0;margin:0;font-family:",fl("default.fontFamily"),";font-size:",fl("default.fontSize"),";",qe,";"),A7=N("div",{target:"eeew7dm8"})({name:"jqnsxy",styles:"background-color:transparent;display:flex;text-align:center;width:100%"}),O7=N("div",{target:"eeew7dm7"})("align-items:center;border-radius:",w.radiusSmall,";cursor:pointer;display:inline-flex;justify-content:center;margin:auto;position:relative;height:100%;&:after{border-radius:inherit;bottom:0;box-shadow:inset 0 0 0 1px rgba( 0, 0, 0, 0.1 );content:'';left:0;pointer-events:none;position:absolute;right:0;top:0;}img,video{border-radius:inherit;box-sizing:border-box;display:block;height:auto;margin:0;max-height:100%;max-width:100%;pointer-events:none;user-select:none;width:100%;}"),Q7=N("div",{target:"eeew7dm6"})("background:",D.gray[100],";border-radius:inherit;box-sizing:border-box;height:",N0.height,"px;max-width:280px;min-width:",N0.width,"px;width:100%;"),w7=N(mo,{target:"eeew7dm5"})({name:"1d3w5wq",styles:"width:100%"}),Csc={name:"1mn7kwb",styles:"padding-bottom:1em"},Jsc=({hasHelpText:c=!1})=>c?Csc:void 0,T7=N(Il,{target:"eeew7dm4"})("max-width:320px;padding-top:1em;",Jsc,";"),D7=N("div",{target:"eeew7dm3"})("left:50%;overflow:hidden;pointer-events:none;position:absolute;top:50%;transform:translate3d( -50%, -50%, 0 );z-index:1;@media not ( prefers-reduced-motion ){transition:opacity 100ms linear;}opacity:",({showOverlay:c})=>c?1:0,";"),L7=N("div",{target:"eeew7dm2"})({name:"1yzbo24",styles:"background:rgba( 255, 255, 255, 0.4 );backdrop-filter:blur( 16px ) saturate( 180% );position:absolute;transform:translateZ( 0 )"}),Nh=N(L7,{target:"eeew7dm1"})({name:"1sw8ur",styles:"height:1px;left:1px;right:1px"}),fh=N(L7,{target:"eeew7dm0"})({name:"188vg4t",styles:"width:1px;top:1px;bottom:1px"});var f0=u(V(),1),hsc=0,Ysc=100,Fsc=()=>{};function j7({hasHelpText:c,onChange:l=Fsc,point:t={x:.5,y:.5}}){let e=vh(t.x),d=vh(t.y),b=(o,n)=>{if(o===void 0)return;let G=parseInt(o,10);isNaN(G)||l({...t,[n]:G/100})};return(0,f0.jsxs)(T7,{className:"focal-point-picker__controls",hasHelpText:c,gap:4,children:[(0,f0.jsx)(U7,{label:(0,Jr.__)("Left"),"aria-label":(0,Jr.__)("Focal point left position"),value:[e,"%"].join(""),onChange:o=>b(o,"x"),dragDirection:"e"}),(0,f0.jsx)(U7,{label:(0,Jr.__)("Top"),"aria-label":(0,Jr.__)("Focal point top position"),value:[d,"%"].join(""),onChange:o=>b(o,"y"),dragDirection:"s"})]})}function U7(c){return(0,f0.jsx)(w7,{__next40pxDefaultSize:!0,className:"focal-point-picker__controls-position-unit-control",labelPosition:"top",max:Ysc,min:hsc,units:[{value:"%",label:"%"}],...c})}var E7=N("div",{target:"e19snlhg0"})("background-color:transparent;cursor:grab;height:40px;margin:-20px 0 0 -20px;position:absolute;user-select:none;width:40px;will-change:transform;z-index:10000;background:rgba( 255, 255, 255, 0.4 );border:1px solid rgba( 255, 255, 255, 0.4 );border-radius:",w.radiusRound,";backdrop-filter:blur( 16px ) saturate( 180% );box-shadow:rgb( 0 0 0 / 10% ) 0px 0px 8px;@media not ( prefers-reduced-motion ){transition:transform 100ms linear;}",({isDragging:c})=>c&&`
			box-shadow: rgb( 0 0 0 / 12% ) 0px 0px 10px;
			transform: scale( 1.1 );
			cursor: grabbing;
			`,";");var M7=u(V(),1);function P7({left:c="50%",top:l="50%",...t}){return(0,M7.jsx)(E7,{...t,className:"components-focal-point-picker__icon_container",style:{left:c,top:l}})}var Ci=u(V(),1);function K7({bounds:c,...l}){return(0,Ci.jsxs)(D7,{...l,className:"components-focal-point-picker__grid",style:{width:c.width,height:c.height},children:[(0,Ci.jsx)(Nh,{style:{top:"33%"}}),(0,Ci.jsx)(Nh,{style:{top:"66%"}}),(0,Ci.jsx)(fh,{style:{left:"33%"}}),(0,Ci.jsx)(fh,{style:{left:"66%"}})]})}var Np=u(V(),1);function _7({alt:c,autoPlay:l,src:t,onLoad:e,mediaRef:d,muted:b=!0,...o}){return t?k7(t)?(0,Np.jsx)("video",{...o,autoPlay:l,className:"components-focal-point-picker__media components-focal-point-picker__media--video",loop:!0,muted:b,onLoadedData:e,ref:d,src:t}):(0,Np.jsx)("img",{...o,alt:c,className:"components-focal-point-picker__media components-focal-point-picker__media--image",onLoad:e,ref:d,src:t}):(0,Np.jsx)(Q7,{className:"components-focal-point-picker__media components-focal-point-picker__media--placeholder",ref:d,...o})}var Zb=u(V(),1),vsc=600;function Nsc({__nextHasNoMarginBottom:c,autoPlay:l=!0,className:t,help:e,hideLabelFromVision:d,label:b,onChange:o,onDrag:n,onDragEnd:G,onDragStart:X,resolvePoint:i,url:a,value:m={x:.5,y:.5},...x}){let[s,r]=(0,Rn.useState)(m),[g,Z]=(0,Rn.useState)(!1),{startDrag:H,endDrag:R,isDragging:W}=(0,fp.__experimentalUseDragging)({onDragStart:v=>{p.current?.focus();let A=J(v);A&&(X?.(A,v),r(A))},onDragMove:v=>{v.preventDefault();let A=J(v);A&&(n?.(A,v),r(A))},onDragEnd:()=>{G?.(),o?.(s)}}),{x:I,y:B}=W?s:m,p=(0,Rn.useRef)(null),[y,h]=(0,Rn.useState)(N0),C=(0,Rn.useRef)(()=>{if(!p.current)return;let{clientWidth:v,clientHeight:A}=p.current;h(v>0&&A>0?{width:v,height:A}:{...N0})});(0,Rn.useEffect)(()=>{let v=C.current;if(!p.current)return;let{defaultView:A}=p.current.ownerDocument;return A?.addEventListener("resize",v),()=>A?.removeEventListener("resize",v)},[]),(0,fp.useIsomorphicLayoutEffect)(()=>{C.current()},[]);let J=({clientX:v,clientY:A,shiftKey:S})=>{if(!p.current)return;let{top:U,left:P}=p.current.getBoundingClientRect(),bc=(v-P)/y.width,j=(A-U)/y.height;return S&&(bc=Math.round(bc/.1)*.1,j=Math.round(j/.1)*.1),f({x:bc,y:j})},f=v=>{let A=i?.(v)??v;A.x=Math.max(0,Math.min(A.x,1)),A.y=Math.max(0,Math.min(A.y,1));let S=U=>Math.round(U*100)/100;return{x:S(A.x),y:S(A.y)}},k=v=>{let{code:A,shiftKey:S}=v;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(A))return;v.preventDefault();let U={x:I,y:B},P=S?.1:.01,bc=A==="ArrowUp"||A==="ArrowLeft"?-1*P:P,j=A==="ArrowUp"||A==="ArrowDown"?"y":"x";U[j]=U[j]+bc,o?.(f(U))},F={left:I!==void 0?I*y.width:.5*y.width,top:B!==void 0?B*y.height:.5*y.height},T=Q("components-focal-point-picker-control",t),L=d?Qc:cd;return OX(()=>{Z(!0);let v=window.setTimeout(()=>{Z(!1)},vsc);return()=>window.clearTimeout(v)},[I,B]),(0,Zb.jsxs)(z7,{...x,as:"fieldset",className:T,children:[!!b&&(0,Zb.jsx)(L,{as:"legend",children:b}),(0,Zb.jsx)(A7,{className:"components-focal-point-picker-wrapper",children:(0,Zb.jsxs)(O7,{className:"components-focal-point-picker",onKeyDown:k,onMouseDown:H,onBlur:()=>{W&&R()},ref:p,role:"button",tabIndex:-1,children:[(0,Zb.jsx)(K7,{bounds:y,showOverlay:g}),(0,Zb.jsx)(_7,{alt:(0,q7.__)("Media preview"),autoPlay:l,onLoad:C.current,src:a}),(0,Zb.jsx)(P7,{...F,isDragging:W})]})}),(0,Zb.jsx)(j7,{hasHelpText:!!e,point:{x:I,y:B},onChange:v=>{o?.(f(v))}}),!!e&&(0,Zb.jsx)(bb,{children:e})]})}var $7=Nsc;var Sp=u(dc(),1),c4=u(ml(),1),l4=u(V(),1);function t4({iframeRef:c,...l}){let t=(0,Sp.useMergeRefs)([c,(0,Sp.useFocusableIframe)()]);return(0,c4.default)("wp.components.FocusableIframe",{since:"5.9",alternative:"wp.compose.useFocusableIframe"}),(0,l4.jsx)("iframe",{ref:t,...l})}var Ji=u(nc(),1);var kp=u(Y(),1),r4=u(dc(),1);var e4=N("fieldset",{target:"e8tqeku4"})({name:"k2q51s",styles:"border:0;margin:0;padding:0;display:contents"}),d4=N(Uc,{target:"e8tqeku3"})("height:",z(4),";"),b4=N(lc,{target:"e8tqeku2"})("margin-top:",z(-1),";"),o4=N(Dc.VisualLabel,{target:"e8tqeku1"})("display:flex;gap:",z(1),";justify-content:flex-start;margin-bottom:0;"),n4=N(pp,{target:"e8tqeku0"})({name:"anvx77",styles:".components-custom-select-control__item .components-custom-select-control__item-hint{width:100%;}"});var S0=u(nc(),1),X4=u(Y(),1);function fsc(c){return/^[\d\.]+(px|em|rem|vw|vh|%|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)?$/i.test(String(c))}function G4(c){if(c.hint)return c.hint;if(fsc(c.size))return String(c.size)}var i4=u(V(),1),Sh={key:"default",name:(0,S0.__)("Default"),value:void 0},Ssc=c=>{let{__next40pxDefaultSize:l,fontSizes:t,value:e,size:d,valueMode:b="literal",onChange:o}=c,n=[Sh,...t.map(X=>{let i=G4(X);return{key:X.slug,name:X.name||X.slug,value:X.size,hint:i}})],G=(0,X4.useMemo)(()=>{if(e===void 0)return Sh;if(b==="slug"){let X=n.find(i=>i.key===e);if(X)return X}return n.find(X=>X.value===e)??Sh},[e,b,n]);return(0,i4.jsx)(n4,{__next40pxDefaultSize:l,__shouldNotWarnDeprecated36pxSize:!0,className:"components-font-size-picker__select",label:(0,S0.__)("Font size"),hideLabelFromVision:!0,describedBy:(0,S0.sprintf)((0,S0.__)("Currently selected font size: %s"),G.name),options:n,value:G,showSelectedHint:!0,onChange:({selectedItem:X})=>{let i=X.key==="default"?void 0:t.find(a=>a.slug===X.key);o(X.value,i)},size:d})},a4=Ssc;var x4=u(nc(),1);var Hb=u(nc(),1),u4=[(0,Hb.__)("S"),(0,Hb.__)("M"),(0,Hb.__)("L"),(0,Hb.__)("XL"),(0,Hb.__)("XXL")],m4=[(0,Hb.__)("Small"),(0,Hb.__)("Medium"),(0,Hb.__)("Large"),(0,Hb.__)("Extra Large"),(0,Hb.__)("Extra Extra Large")];var kh=u(V(),1),ksc=c=>{let{fontSizes:l,value:t,valueMode:e="literal",__next40pxDefaultSize:d,size:b,onChange:o}=c,n=t?e==="slug"?String(t):l.filter(i=>i.size===t).length>1?void 0:l.find(i=>i.size===t)?.slug:void 0;return(0,kh.jsx)(hd,{__next40pxDefaultSize:d,__shouldNotWarnDeprecated36pxSize:!0,label:(0,x4.__)("Font size"),hideLabelFromVision:!0,value:n,onChange:G=>{if(G===void 0)o(void 0);else{let X=l.find(i=>i.slug===String(G));X&&o(X.size,X)}},isBlock:!0,size:b,children:l.map((G,X)=>(0,kh.jsx)(on,{value:G.slug,label:u4[X],"aria-label":G.name||m4[X],showTooltip:!0},G.slug))})},s4=ksc;var Rt=u(V(),1),zsc=["px","em","rem","vw","vh"],Asc=5,g4=(c,l)=>{let{__next40pxDefaultSize:t=!1,fallbackFontSize:e,fontSizes:d=[],disableCustomFontSizes:b=!1,onChange:o,size:n="default",units:G=zsc,value:X,valueMode:i="literal",withSlider:a=!1,withReset:m=!0}=c,x=(0,r4.useInstanceId)(g4,"font-size-picker-label"),s=or({availableUnits:G}),r=(()=>{if(X)return i==="slug"?d.find(C=>C.slug===X):d.find(C=>C.size===X)})(),g=!!X&&!r,[Z,H]=(0,kp.useState)(g),R=i==="slug"?r?.size:X,W;if(!b&&Z?W="custom":W=d.length>Asc?"select":"togglegroup",d.length===0&&b)return null;let I=typeof R=="string"||typeof d[0]?.size=="string",[B,p]=ql(R,s),y=!!p&&["em","rem","vw","vh"].includes(p),h=X===void 0;return Lc({componentName:"FontSizePicker",__next40pxDefaultSize:t,size:n}),(0,Rt.jsxs)(e4,{ref:l,className:"components-font-size-picker","aria-labelledby":x,children:[(0,Rt.jsx)(rt,{children:(0,Rt.jsxs)(d4,{className:"components-font-size-picker__header",children:[(0,Rt.jsx)(o4,{id:x,children:(0,Ji.__)("Font size")}),!b&&(0,Rt.jsx)(b4,{label:W==="custom"?(0,Ji.__)("Use size preset"):(0,Ji.__)("Set custom size"),icon:fs,onClick:()=>H(!Z),isPressed:W==="custom",size:"small"})]})}),(0,Rt.jsxs)("div",{children:[W==="select"&&(0,Rt.jsx)(a4,{__next40pxDefaultSize:t,fontSizes:d,value:X,valueMode:i,disableCustomFontSizes:b,size:n,onChange:(C,J)=>{o?.(C===void 0?void 0:I?C:Number(C),J)},onSelectCustom:()=>H(!0)}),W==="togglegroup"&&(0,Rt.jsx)(s4,{fontSizes:d,value:X,valueMode:i,__next40pxDefaultSize:t,size:n,onChange:(C,J)=>{o?.(C===void 0?void 0:I?C:Number(C),J)}}),W==="custom"&&(0,Rt.jsxs)(Il,{className:"components-font-size-picker__custom-size-control",children:[(0,Rt.jsx)(Ut,{isBlock:!0,children:(0,Rt.jsx)(mo,{__next40pxDefaultSize:t,__shouldNotWarnDeprecated36pxSize:!0,label:(0,Ji.__)("Font size"),labelPosition:"top",hideLabelFromVision:!0,value:I?`${B??""}${p??""}`:R,onChange:C=>{H(!0),o?.(C===void 0||C===""?void 0:I?C:parseInt(C,10))},size:n,units:I?s:[],min:0})}),a&&(0,Rt.jsx)(Ut,{isBlock:!0,children:(0,Rt.jsx)(rt,{marginX:2,marginBottom:0,children:(0,Rt.jsx)(vd,{__next40pxDefaultSize:t,__shouldNotWarnDeprecated36pxSize:!0,className:"components-font-size-picker__custom-input",label:(0,Ji.__)("Font size"),hideLabelFromVision:!0,value:B,initialPosition:e,withInputField:!1,onChange:C=>{H(!0),o?.(C===void 0?void 0:I?C+(p??"px"):C)},min:0,max:y?10:100,step:y?.1:1})})}),m&&(0,Rt.jsx)(Ut,{children:(0,Rt.jsx)(ci,{disabled:h,accessibleWhenDisabled:!0,onClick:()=>{o?.(void 0)},variant:"secondary",__next40pxDefaultSize:!0,size:n==="__unstable-large"||c.__next40pxDefaultSize?"default":"small",children:(0,Ji.__)("Reset")})})]})]})]})},Z4=(0,kp.forwardRef)(g4);Z4.displayName="FontSizePicker";var H4=Z4;var R4=u(Y(),1);var hr=u(V(),1);function Osc({accept:c,children:l,multiple:t=!1,onChange:e,onClick:d,render:b,...o}){let n=(0,R4.useRef)(null),G=()=>{n.current?.click()};b||Lc({componentName:"FormFileUpload",__next40pxDefaultSize:o.__next40pxDefaultSize,size:o.size});let X=b?b({openFileDialog:G}):(0,hr.jsx)(lc,{onClick:G,...o,children:l}),i=c?.includes("audio/*")?`${c}, audio/mp3, audio/x-m4a, audio/x-m4b, audio/x-m4p, audio/x-wav, audio/webm`:c;return(0,hr.jsxs)("div",{className:"components-form-file-upload",children:[X,(0,hr.jsx)("input",{type:"file",ref:n,multiple:t,style:{display:"none"},accept:i,onChange:e,onClick:d,"data-testid":"form-file-upload-input"})]})}var I4=Osc;var W4=u(Y(),1),k0=u(V(),1),Qsc=()=>{};function wsc(c,l){let{className:t,checked:e,id:d,disabled:b,onChange:o=Qsc,onClick:n,...G}=c,X=Q("components-form-toggle",t,{"is-checked":e,"is-disabled":b});return(0,k0.jsxs)("span",{className:X,children:[(0,k0.jsx)("input",{className:"components-form-toggle__input",id:d,type:"checkbox",checked:e,onChange:o,disabled:b,onClick:i=>{i.currentTarget.focus(),n?.(i)},...G,ref:l}),(0,k0.jsx)("span",{className:"components-form-toggle__track"}),(0,k0.jsx)("span",{className:"components-form-toggle__thumb"})]})}var p4=(0,W4.forwardRef)(wsc);p4.displayName="FormToggle";var zp=p4;var ge=u(Y(),1),od=u(nc(),1),Yi=u(dc(),1),Yr=u(eo(),1),V4=u(PI(),1);var B4=u(dc(),1),Ap=u(nc(),1);var hi=u(V(),1),Tsc=()=>{};function zh({value:c,status:l,title:t,displayTransform:e,isBorderless:d=!1,disabled:b=!1,onClickRemove:o=Tsc,onMouseEnter:n,onMouseLeave:G,messages:X,termPosition:i,termsCount:a}){let m=(0,B4.useInstanceId)(zh),x=Q("components-form-token-field__token",{"is-error":l==="error","is-success":l==="success","is-validating":l==="validating","is-borderless":d,"is-disabled":b}),s=()=>o({value:c}),r=e(c),g=(0,Ap.sprintf)((0,Ap.__)("%1$s (%2$d of %3$d)"),r,i,a);return(0,hi.jsxs)("span",{className:x,onMouseEnter:n,onMouseLeave:G,title:t,children:[(0,hi.jsxs)("span",{className:"components-form-token-field__token-text",id:`components-form-token-field__token-text-${m}`,children:[(0,hi.jsx)(Qc,{as:"span",children:g}),(0,hi.jsx)("span",{"aria-hidden":"true",children:r})]}),(0,hi.jsx)(lc,{className:"components-form-token-field__remove-token",size:"small",icon:PX,onClick:b?void 0:s,disabled:b,label:X.remove,"aria-describedby":`components-form-token-field__token-text-${m}`})]})}var Dsc=({__next40pxDefaultSize:c,hasTokens:l})=>!c&&O("padding-top:",z(l?1:.5),";padding-bottom:",z(l?1:.5),";",""),y4=N(Il,{target:"ehq8nmi0"})("padding:7px;",qe," ",Dsc,";");var Rb=u(V(),1),Lsc=c=>c;function Op(c){let{autoCapitalize:l,autoComplete:t,maxLength:e,placeholder:d,label:b=(0,od.__)("Add item"),className:o,suggestions:n=[],maxSuggestions:G=100,value:X=[],displayTransform:i=Lsc,saveTransform:a=$=>$.trim(),onChange:m=()=>{},onInputChange:x=()=>{},onFocus:s=void 0,isBorderless:r=!1,disabled:g=!1,tokenizeOnSpace:Z=!1,messages:H={added:(0,od.__)("Item added."),removed:(0,od.__)("Item removed."),remove:(0,od.__)("Remove item"),__experimentalInvalid:(0,od.__)("Invalid item")},__experimentalRenderItem:R,__experimentalExpandOnFocus:W=!1,__experimentalValidateInput:I=()=>!0,__experimentalShowHowTo:B=!0,__next40pxDefaultSize:p=!1,__experimentalAutoSelectFirstMatch:y=!1,tokenizeOnBlur:h=!1}=Et(c);Lc({componentName:"FormTokenField",size:void 0,__next40pxDefaultSize:p});let C=(0,Yi.useInstanceId)(Op),[J,f]=(0,ge.useState)(""),[k,F]=(0,ge.useState)(0),[T,L]=(0,ge.useState)(!1),[v,A]=(0,ge.useState)(!1),[S,U]=(0,ge.useState)(-1),[P,bc]=(0,ge.useState)(!1),j=(0,Yi.usePrevious)(n),ec=(0,Yi.usePrevious)(X),M=(0,ge.useRef)(null),oc=(0,ge.useRef)(null),Hc=(0,Yi.useDebounce)(Yr.speak,500);(0,ge.useEffect)(()=>{T&&!wc()&&Bc()},[T]),(0,ge.useEffect)(()=>{let $=!(0,V4.isShallowEqual)(n,j||[]);($||X!==ec)&&Ul($)},[n,j,X,ec]),(0,ge.useEffect)(()=>{Ul()},[J]),(0,ge.useEffect)(()=>{Ul()},[y]),g&&T&&(L(!1),f(""));function Bc(){M.current?.focus()}function wc(){return M.current===M.current?.ownerDocument.activeElement}function Wl($){wc()||$.target===oc.current?(L(!0),A(W||v)):L(!1),typeof s=="function"&&s($)}function sl($){if(Fo()&&I(J))L(!1),h&&Fo()&&dt(J);else{if(f(""),F(0),L(!1),W){let Jc=$.relatedTarget===oc.current;A(Jc)}else A(!1);U(-1),bc(!1)}}function tl($){let Jc=!1;if(!$.defaultPrevented){switch($.key){case"Backspace":Jc=Yc(at);break;case"Enter":Jc=Ki();break;case"ArrowLeft":Jc=Al();break;case"ArrowUp":Jc=Re();break;case"ArrowRight":Jc=it();break;case"ArrowDown":Jc=Kt();break;case"Delete":Jc=Yc(Ol);break;case"Space":Z&&(Jc=Ki());break;case"Escape":Jc=Yo($);break;case"Tab":Jc=MG($);break;default:break}Jc&&$.preventDefault()}}function gc($){let Jc=!1;$.key===","&&(Jc=PG()),Jc&&$.preventDefault()}function Zl($){$.target===oc.current&&T&&$.preventDefault()}function zl($){St($.value),Bc()}function uc($){let Jc=Vc().indexOf($);Jc>=0&&(U(Jc),bc(!1))}function vc($){dt($)}function hl($){let Jc=$.value,zt=Z?/[ ,\t]+/:/[,\t]+/,we=Jc.split(zt),vo=we[we.length-1]||"";we.length>1&&_i(we.slice(0,-1)),f(vo),x(vo)}function Yc($){let Jc=!1;return wc()&&_t()&&($(),Jc=!0),Jc}function Al(){let $=!1;return _t()&&(_G(),$=!0),$}function it(){let $=!1;return _t()&&(vn(),$=!0),$}function Re(){return U($=>($===0?Vc(J,n,X,G,a).length:$)-1),bc(!0),!0}function Kt(){return U($=>($+1)%Vc(J,n,X,G,a).length),bc(!0),!0}function Qe($){$.target instanceof HTMLInputElement&&(f($.target.value),A(!1),U(-1),bc(!1))}function Yo($){return Qe($),!0}function MG($){return Qe($),!1}function PG(){return Fo()&&dt(J),!0}function KG($){F(X.length-Math.max($,-1)-1)}function _G(){F($=>Math.min($+1,X.length))}function vn(){F($=>Math.max($-1,0))}function at(){let $=kt()-1;$>-1&&St(X[$])}function Ol(){let $=kt();$<X.length&&(St(X[$]),KG($))}function Ki(){let $=!1,Jc=nl();return Jc?(dt(Jc),$=!0):Fo()&&(dt(J),$=!0),$}function _i($){let Jc=[...new Set($.map(a).filter(Boolean).filter(zt=>!el(zt)))];if(Jc.length>0){let zt=[...X];zt.splice(kt(),0,...Jc),m(zt)}}function dt($){if(!I($)){(0,Yr.speak)(H.__experimentalInvalid,"assertive");return}_i([$]),(0,Yr.speak)(H.added,"assertive"),f(""),U(-1),bc(!1),A(!W),T&&!h&&Bc()}function St($){let Jc=X.filter(zt=>id(zt)!==id($));m(Jc),(0,Yr.speak)(H.removed,"assertive")}function id($){return typeof $=="object"?$.value:$}function Vc($=J,Jc=n,zt=X,we=G,vo=a){let Nn=vo($),Xg=[],W9=[],p9=zt.map(hb=>typeof hb=="string"?hb:hb.value);return Nn.length===0?Jc=Jc.filter(hb=>!p9.includes(hb)):(Nn=Nn.normalize("NFKC").toLocaleLowerCase(),Jc.forEach(hb=>{let B9=hb.normalize("NFKC").toLocaleLowerCase().indexOf(Nn);p9.indexOf(hb)===-1&&(B9===0?Xg.push(hb):B9>0&&W9.push(hb))}),Jc=Xg.concat(W9)),Jc.slice(0,we)}function nl(){if(S!==-1)return Vc()[S]}function el($){return X.some(Jc=>id($)===id(Jc))}function kt(){return X.length-k}function _t(){return J.length===0}function Fo(){return a(J).length>0}function Ul($=!0){let Jc=J.trim().length>1,zt=Vc(J),we=zt.length>0,vo=wc()&&W;if(A(vo||Jc&&we),$&&(y&&Jc&&we?(U(0),bc(!0)):(U(-1),bc(!1))),Jc){let Nn=we?(0,od.sprintf)((0,od._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",zt.length),zt.length):(0,od.__)("No results.");Hc(Nn,"assertive")}}function ad(){let $=X.map(Kc);return $.splice(kt(),0,Xy()),$}function Kc($,Jc,zt){let we=id($),vo=typeof $!="string"?$.status:void 0,Nn=Jc+1,Xg=zt.length;return(0,Rb.jsx)(Ut,{children:(0,Rb.jsx)(zh,{value:we,status:vo,title:typeof $!="string"?$.title:void 0,displayTransform:i,onClickRemove:zl,isBorderless:typeof $!="string"&&$.isBorderless||r,onMouseEnter:typeof $!="string"?$.onMouseEnter:void 0,onMouseLeave:typeof $!="string"?$.onMouseLeave:void 0,disabled:vo!=="error"&&g,messages:H,termsCount:Xg,termPosition:Nn})},"token-"+we)}function Xy(){let $={instanceId:C,autoCapitalize:l,autoComplete:t,placeholder:X.length===0?d:"",disabled:g,value:J,onBlur:sl,isExpanded:v,selectedSuggestionIndex:S};return(0,Rb.jsx)(mp,{...$,onChange:e&&X.length>=e?void 0:hl,ref:M},"input")}let iy=Q(o,"components-form-token-field__input-container",{"is-active":T,"is-disabled":g}),sm={className:"components-form-token-field",tabIndex:-1},rm=Vc();return g||(sm=Object.assign({},sm,{onKeyDown:Vd(tl),onKeyPress:gc,onFocus:Wl})),(0,Rb.jsxs)("div",{...sm,children:[b&&(0,Rb.jsx)(cd,{htmlFor:`components-form-token-input-${C}`,className:"components-form-token-field__label",children:b}),(0,Rb.jsxs)("div",{ref:oc,className:iy,tabIndex:-1,onMouseDown:Zl,onTouchStart:Zl,children:[(0,Rb.jsx)(y4,{justify:"flex-start",align:"center",gap:1,wrap:!0,__next40pxDefaultSize:p,hasTokens:!!X.length,children:ad()}),v&&(0,Rb.jsx)(xp,{instanceId:C,match:a(J),displayTransform:i,suggestions:rm,selectedIndex:S,scrollIntoView:P,onHover:uc,onSelect:vc,__experimentalRenderItem:R})]}),B&&(0,Rb.jsx)(bb,{id:`components-form-token-suggestions-howto-${C}`,className:"components-form-token-field__help",children:Z?(0,od.__)("Separate with commas, spaces, or the Enter key."):(0,od.__)("Separate with commas or the Enter key.")})]})}var Qp=Op;var Ib=u(Y(),1),h4=u(ml(),1),Tp=u(nc(),1);var vr=u(nc(),1);var wp=u(kc(),1),Ah=u(V(),1),C4=()=>(0,Ah.jsx)(wp.SVG,{width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Ah.jsx)(wp.Circle,{cx:"4",cy:"4",r:"4"})});var Fr=u(V(),1);function J4({currentPage:c,numberOfPages:l,setCurrentPage:t}){return(0,Fr.jsx)("ul",{className:"components-guide__page-control","aria-label":(0,vr.__)("Guide controls"),children:Array.from({length:l}).map((e,d)=>(0,Fr.jsx)("li",{"aria-current":d===c?"step":void 0,children:(0,Fr.jsx)(lc,{size:"small",icon:(0,Fr.jsx)(C4,{}),"aria-label":(0,vr.sprintf)((0,vr.__)("Page %1$d of %2$d"),d+1,l),onClick:()=>t(d)},d)},d))})}var Ho=u(V(),1);function Usc({children:c,className:l,contentLabel:t,finishButtonText:e=(0,Tp.__)("Finish"),nextButtonText:d=(0,Tp.__)("Next"),previousButtonText:b=(0,Tp.__)("Previous"),onFinish:o,pages:n=[]}){let G=(0,Ib.useRef)(null),[X,i]=(0,Ib.useState)(0);(0,Ib.useEffect)(()=>{let r=G.current?.querySelector(".components-guide");r instanceof HTMLElement&&r.focus()},[X]),(0,Ib.useEffect)(()=>{Ib.Children.count(c)&&(0,h4.default)("Passing children to <Guide>",{since:"5.5",alternative:"the `pages` prop"})},[c]),Ib.Children.count(c)&&(n=Ib.Children.map(c,r=>({content:r}))??[]);let a=X>0,m=X<n.length-1,x=()=>{a&&i(X-1)},s=()=>{m&&i(X+1)};return n.length===0?null:(0,Ho.jsx)(B0,{className:Q("components-guide",l),contentLabel:t,isDismissible:n.length>1,onRequestClose:o,onKeyDown:r=>{r.code==="ArrowLeft"?(x(),r.preventDefault()):r.code==="ArrowRight"&&(s(),r.preventDefault())},ref:G,children:(0,Ho.jsxs)("div",{className:"components-guide__container",children:[(0,Ho.jsxs)("div",{className:"components-guide__page",children:[n[X].image,n.length>1&&(0,Ho.jsx)(J4,{currentPage:X,numberOfPages:n.length,setCurrentPage:i}),n[X].content]}),(0,Ho.jsxs)("div",{className:"components-guide__footer",children:[a&&(0,Ho.jsx)(lc,{className:"components-guide__back-button",variant:"tertiary",onClick:x,__next40pxDefaultSize:!0,children:b}),m&&(0,Ho.jsx)(lc,{className:"components-guide__forward-button",variant:"primary",onClick:s,__next40pxDefaultSize:!0,children:d}),!m&&(0,Ho.jsx)(lc,{className:"components-guide__finish-button",variant:"primary",onClick:o,__next40pxDefaultSize:!0,children:e})]})]})})}var Y4=Usc;var F4=u(Y(),1),v4=u(ml(),1),N4=u(V(),1);function f4(c){return(0,F4.useEffect)(()=>{(0,v4.default)("<GuidePage>",{since:"5.5",alternative:"the `pages` prop in <Guide>"})},[]),(0,N4.jsx)("div",{...c})}var S4=u(ml(),1),k4=u(Y(),1);var z4=u(V(),1);function jsc({label:c,labelPosition:l,size:t,tooltip:e,...d},b){return(0,S4.default)("wp.components.IconButton",{since:"5.4",alternative:"wp.components.Button",version:"6.2"}),(0,z4.jsx)(lc,{...d,ref:b,tooltipPosition:l,iconSize:t,showTooltip:e!==void 0?!!e:void 0,label:e||c})}var A4=(0,k4.forwardRef)(jsc);var Dp=u(Y(),1),O4=u(dc(),1),Fi=u(V(),1);function Esc({target:c,callback:l,shortcut:t,bindGlobal:e,eventName:d}){return(0,O4.useKeyboardShortcut)(t,l,{bindGlobal:e,target:c,eventName:d}),null}function Msc({children:c,shortcuts:l,bindGlobal:t,eventName:e}){let d=(0,Dp.useRef)(null),b=Object.entries(l??{}).map(([o,n])=>(0,Fi.jsx)(Esc,{shortcut:o,callback:n,bindGlobal:t,eventName:e,target:d},o));return Dp.Children.count(c)?(0,Fi.jsxs)("div",{ref:d,children:[b,c]}):(0,Fi.jsx)(Fi.Fragment,{children:b})}var Q4=Msc;var w4=u(Y(),1),T4=u(dc(),1),Nr=u(V(),1);function D4(c){let{children:l,className:t="",label:e,hideSeparator:d}=c,b=(0,T4.useInstanceId)(D4);if(!w4.Children.count(l))return null;let o=`components-menu-group-label-${b}`,n=Q(t,"components-menu-group",{"has-hidden-separator":d});return(0,Nr.jsxs)("div",{className:n,children:[e&&(0,Nr.jsx)("div",{className:"components-menu-group__label",id:o,"aria-hidden":"true",children:e}),(0,Nr.jsx)("div",{role:"group","aria-labelledby":e?o:void 0,children:l})]})}var fr=D4;var Lp=u(Y(),1);var In=u(V(),1);function Psc(c,l){let{children:t,info:e,className:d,icon:b,iconPosition:o="right",shortcut:n,isSelected:G,role:X="menuitem",suffix:i,...a}=c;return d=Q("components-menu-item__button",d),e&&(t=(0,In.jsxs)("span",{className:"components-menu-item__info-wrapper",children:[(0,In.jsx)("span",{className:"components-menu-item__item",children:t}),(0,In.jsx)("span",{className:"components-menu-item__info",children:e})]})),b&&typeof b!="string"&&(b=(0,Lp.cloneElement)(b,{className:Q("components-menu-items__item-icon",{"has-icon-right":o==="right"})})),(0,In.jsxs)(lc,{size:"compact",ref:l,"aria-checked":X==="menuitemcheckbox"||X==="menuitemradio"?G:void 0,role:X,icon:o==="left"?b:void 0,className:d,accessibleWhenDisabled:!0,...a,children:[(0,In.jsx)("span",{className:"components-menu-item__item",children:t}),!i&&(0,In.jsx)(YZ,{className:"components-menu-item__shortcut",shortcut:n}),!i&&b&&o==="right"&&(0,In.jsx)(cl,{icon:b}),i]})}var L4=(0,Lp.forwardRef)(Psc);L4.displayName="MenuItem";var Wn=L4;var Sr=u(V(),1),Ksc=()=>{};function _sc({choices:c=[],onHover:l=Ksc,onSelect:t,value:e}){return(0,Sr.jsx)(Sr.Fragment,{children:c.map(d=>{let b=e===d.value;return(0,Sr.jsx)(Wn,{role:"menuitemradio",disabled:d.disabled,icon:b?jt:null,info:d.info,isSelected:b,shortcut:d.shortcut,className:"components-menu-items-choice",onClick:()=>{b||t(d.value)},onMouseEnter:()=>l(d.value),onMouseLeave:()=>l(null),"aria-label":d["aria-label"],children:d.label},d.value)})})}var U4=_sc;var b6=u(ml(),1),fG=u(Y(),1),o6=u(nc(),1);var NG="root",Up=100;var jp=u(Y(),1);var z0=()=>{},qsc=()=>!1,j4=()=>{},Ep=(0,jp.createContext)({activeItem:void 0,activeMenu:NG,setActiveMenu:z0,navigationTree:{items:{},getItem:j4,addItem:z0,removeItem:z0,menus:{},getMenu:j4,addMenu:z0,removeMenu:z0,childMenu:{},traverseMenu:z0,isMenuEmpty:qsc}});Ep.displayName="NavigationContext";var It=()=>(0,jp.useContext)(Ep);var kr=u(nc(),1);var E4=N("div",{target:"eeiismy11"})("width:100%;box-sizing:border-box;padding:0 ",z(4),";overflow:hidden;"),M4=N("div",{target:"eeiismy10"})("margin-top:",z(6),";margin-bottom:",z(6),";display:flex;flex-direction:column;ul{padding:0;margin:0;list-style:none;}.components-navigation__back-button{margin-bottom:",z(6),";}.components-navigation__group+.components-navigation__group{margin-top:",z(6),";}"),P4=N(lc,{target:"eeiismy9"})({name:"26l0q2",styles:"&.is-tertiary{color:inherit;opacity:0.7;&:hover:not( :disabled ){opacity:1;box-shadow:none;color:inherit;}&:active:not( :disabled ){background:transparent;opacity:1;color:inherit;}}"}),K4=N("div",{target:"eeiismy8"})({name:"1aubja5",styles:"overflow:hidden;width:100%"}),_4=N("div",{target:"eeiismy7"})({name:"rgorny",styles:"margin:11px 0;padding:1px"}),q4=N("span",{target:"eeiismy6"})("height:",z(6),";.components-button.is-small{color:inherit;opacity:0.7;margin-right:",z(1),";padding:0;&:active:not( :disabled ){background:none;opacity:1;color:inherit;}&:hover:not( :disabled ){box-shadow:none;opacity:1;color:inherit;}}"),Mp=N(td,{target:"eeiismy5"})("min-height:",z(12),";align-items:center;color:inherit;display:flex;justify-content:space-between;margin-bottom:",z(2),";padding:",()=>(0,kr.isRTL)()?`${z(1)} ${z(4)} ${z(1)} ${z(2)}`:`${z(1)} ${z(2)} ${z(1)} ${z(4)}`,";"),Pp=N("li",{target:"eeiismy4"})("border-radius:",w.radiusSmall,";color:inherit;margin-bottom:0;>button,>a.components-button,>a{width:100%;color:inherit;opacity:0.7;padding:",z(2)," ",z(4),";",Fc({textAlign:"left"},{textAlign:"right"})," &:hover,&:focus:not( [aria-disabled='true'] ):active,&:active:not( [aria-disabled='true'] ):active{color:inherit;opacity:1;}}&.is-active{background-color:",D.theme.accent,";color:",D.theme.accentInverted,";>button,.components-button:hover,>a{color:",D.theme.accentInverted,";opacity:1;}}>svg path{color:",D.gray[600],";}"),Kp=N("div",{target:"eeiismy3"})("display:flex;align-items:center;height:auto;min-height:40px;margin:0;padding:",z(1.5)," ",z(4),";font-weight:400;line-height:20px;width:100%;color:inherit;opacity:0.7;"),$4=N("span",{target:"eeiismy2"})("display:flex;margin-right:",z(2),";"),c6=N("span",{target:"eeiismy1"})("margin-left:",()=>(0,kr.isRTL)()?"0":z(2),";margin-right:",()=>(0,kr.isRTL)()?z(2):"0",";display:inline-flex;padding:",z(1)," ",z(3),";border-radius:",w.radiusSmall,";@keyframes fade-in{from{opacity:0;}to{opacity:1;}}@media not ( prefers-reduced-motion ){animation:fade-in 250ms ease-out;}"),l6=N(Jt,{target:"eeiismy0"})(()=>(0,kr.isRTL)()?"margin-left: auto;":"margin-right: auto;"," font-size:14px;line-height:20px;color:inherit;");var e6=u(Y(),1);var t6=u(Y(),1);function Oh(){let[c,l]=(0,t6.useState)({});return{nodes:c,getNode:b=>c[b],addNode:(b,o)=>{let{children:n,...G}=o;return l(X=>({...X,[b]:G}))},removeNode:b=>l(o=>{let{[b]:n,...G}=o;return G})}}var d6=()=>{let{nodes:c,getNode:l,addNode:t,removeNode:e}=Oh(),{nodes:d,getNode:b,addNode:o,removeNode:n}=Oh(),[G,X]=(0,e6.useState)({}),i=x=>G[x]||[],a=(x,s)=>{let r=[],g=[x],Z;for(;g.length>0&&(Z=b(g.shift()),!(!(!Z||r.includes(Z.menu))&&(r.push(Z.menu),g=[...g,...i(Z.menu)],s(Z)===!1))););};return{items:c,getItem:l,addItem:t,removeItem:e,menus:d,getMenu:b,addMenu:(x,s)=>{X(r=>{let g={...r};return s.parentMenu&&(g[s.parentMenu]||(g[s.parentMenu]=[]),g[s.parentMenu].push(x)),g}),o(x,s)},removeMenu:n,childMenu:G,traverseMenu:a,isMenuEmpty:x=>{let s=!0;return a(x,r=>{if(!r.isEmpty)return s=!1,!1}),s}}};var _p=u(V(),1),$sc=()=>{};function crc({activeItem:c,activeMenu:l=NG,children:t,className:e,onActivateMenu:d=$sc}){let[b,o]=(0,fG.useState)(l),[n,G]=(0,fG.useState)(),X=d6(),i=(0,o6.isRTL)()?"right":"left";(0,b6.default)("wp.components.Navigation (and all subcomponents)",{since:"6.8",version:"7.1",alternative:"wp.components.Navigator"});let a=(g,Z=i)=>{X.getMenu(g)&&(G(Z),o(g),d(g))},m=(0,fG.useRef)(!1);(0,fG.useEffect)(()=>{m.current||(m.current=!0)},[]),(0,fG.useEffect)(()=>{l!==b&&a(l)},[l]);let x={activeItem:c,activeMenu:b,setActiveMenu:a,navigationTree:X},s=Q("components-navigation",e),r=EX({type:"slide-in",origin:n});return(0,_p.jsx)(E4,{className:s,children:(0,_p.jsx)("div",{className:r?Q({[r]:m.current&&n}):void 0,children:(0,_p.jsx)(Ep.Provider,{value:x,children:t})},b)})}var n6=crc;var G6=u(Y(),1),zr=u(nc(),1);var qp=u(V(),1);function lrc({backButtonLabel:c,className:l,href:t,onClick:e,parentMenu:d},b){let{setActiveMenu:o,navigationTree:n}=It(),G=Q("components-navigation__back-button",l),X=d!==void 0?n.getMenu(d)?.title:void 0,i=m=>{typeof e=="function"&&e(m);let x=(0,zr.isRTL)()?"left":"right";d&&!m.defaultPrevented&&o(d,x)},a=(0,zr.isRTL)()?MX:ps;return(0,qp.jsxs)(P4,{__next40pxDefaultSize:!0,className:G,href:t,variant:"tertiary",ref:b,onClick:i,children:[(0,qp.jsx)(Cl,{icon:a}),c||X||(0,zr.__)("Back")]})}var X6=(0,G6.forwardRef)(lrc);X6.displayName="NavigationBackButton";var $p=X6;var a6=u(Y(),1);var cB=u(Y(),1),Ar=(0,cB.createContext)({group:void 0});Ar.displayName="NavigationGroupContext";var i6=()=>(0,cB.useContext)(Ar);var vi=u(V(),1),trc=0;function erc({children:c,className:l,title:t}){let[e]=(0,a6.useState)(`group-${++trc}`),{navigationTree:{items:d}}=It(),b={group:e};if(!Object.values(d).some(G=>G.group===e&&G._isVisible))return(0,vi.jsx)(Ar.Provider,{value:b,children:c});let o=`components-navigation__group-title-${e}`,n=Q("components-navigation__group",l);return(0,vi.jsx)(Ar.Provider,{value:b,children:(0,vi.jsxs)("li",{className:n,children:[t&&(0,vi.jsx)(Mp,{className:"components-navigation__group-title",id:o,level:3,children:t}),(0,vi.jsx)("ul",{"aria-labelledby":o,role:"group",children:c})]})})}var u6=erc;var W6=u(nc(),1);var Ni=u(V(),1);function m6(c){let{badge:l,title:t}=c;return(0,Ni.jsxs)(Ni.Fragment,{children:[t&&(0,Ni.jsx)(l6,{className:"components-navigation__item-title",as:"span",children:t}),l&&(0,Ni.jsx)(c6,{className:"components-navigation__item-badge",children:l})]})}var H6=u(Y(),1);var g6=u(Y(),1);var lB=u(Y(),1),Or=(0,lB.createContext)({menu:void 0,search:""});Or.displayName="NavigationMenuContext";var A0=()=>(0,lB.useContext)(Or);var s6=u(js(),1),x6=c=>(0,s6.default)(c).replace(/^\//,"").toLowerCase(),r6=(c,l)=>x6(c).indexOf(x6(l))!==-1;var Z6=(c,l)=>{let{activeMenu:t,navigationTree:{addItem:e,removeItem:d}}=It(),{group:b}=i6(),{menu:o,search:n}=A0();(0,g6.useEffect)(()=>{let G=t===o,X=!n||l.title!==void 0&&r6(l.title,n);return e(c,{...l,group:b,menu:o,_isVisible:G&&X}),()=>{d(c)}},[t,n])};var R6=u(V(),1),drc=0;function I6(c){let{children:l,className:t,title:e,href:d,...b}=c,[o]=(0,H6.useState)(`item-${++drc}`);Z6(o,c);let{navigationTree:n}=It();if(!n.getItem(o)?._isVisible)return null;let G=Q("components-navigation__item",t);return(0,R6.jsx)(Pp,{className:G,...b,children:l})}var SG=u(V(),1),brc=()=>{};function orc(c){let{badge:l,children:t,className:e,href:d,item:b,navigateToMenu:o,onClick:n=brc,title:G,icon:X,hideIfTargetMenuEmpty:i,isText:a,...m}=c,{activeItem:x,setActiveMenu:s,navigationTree:{isMenuEmpty:r}}=It();if(i&&o&&r(o))return null;let g=b&&x===b,Z=Q(e,{"is-active":g}),H=B=>{o&&s(o),n(B)},R=(0,W6.isRTL)()?ps:MX,W=t?c:{...c,onClick:void 0},I=a?m:{as:lc,__next40pxDefaultSize:"as"in m?m.as===void 0:!0,href:d,onClick:H,"aria-current":g?"page":void 0,...m};return(0,SG.jsx)(I6,{...W,className:Z,children:t||(0,SG.jsxs)(Kp,{...I,children:[X&&(0,SG.jsx)($4,{children:(0,SG.jsx)(Cl,{icon:X})}),(0,SG.jsx)(m6,{title:G,badge:l}),o&&(0,SG.jsx)(Cl,{icon:R})]})})}var p6=orc;var f6=u(Y(),1);var B6=u(Y(),1);var y6=c=>{let{navigationTree:{addMenu:l,removeMenu:t}}=It(),e=c.menu||NG;(0,B6.useEffect)(()=>(l(e,{...c,menu:e}),()=>{t(e)}),[])};var nB=u(Y(),1),GB=u(nc(),1);var wr=u(Y(),1),Si=u(nc(),1);var tB=u(dc(),1),Qh=u(eo(),1),V6=u(V(),1),eB=(0,tB.createHigherOrderComponent)(c=>function(t){return(0,V6.jsx)(c,{...t,speak:Qh.speak,debouncedSpeak:(0,tB.useDebounce)(Qh.speak,500)})},"withSpokenMessages");var dB=u(dc(),1),Qr=u(nc(),1);var bB=u(Y(),1),h6=u(ml(),1);var C6=N(lo,{target:"effl84m1"})({name:"37btb2",styles:"input[type='search']{&::-webkit-search-decoration,&::-webkit-search-cancel-button,&::-webkit-search-results-button,&::-webkit-search-results-decoration{-webkit-appearance:none;}}"}),J6=N(cl,{target:"effl84m0"})({name:"1i54h4p",styles:"&:dir( ltr ){transform:scaleX( -1 );}"});var fi=u(V(),1);function nrc({searchRef:c,value:l,onChange:t,onClose:e}){if(!e&&!l)return null;e&&(0,h6.default)("`onClose` prop in wp.components.SearchControl",{since:"6.8"});let d=()=>{t(""),c.current?.focus()};return(0,fi.jsx)(RC,{variant:"control",children:(0,fi.jsx)(lc,{size:"small",icon:PX,label:e?(0,Qr.__)("Close search"):(0,Qr.__)("Reset search"),onClick:e??d})})}function Grc({__nextHasNoMarginBottom:c,className:l,onChange:t,value:e,label:d=(0,Qr.__)("Search"),placeholder:b=(0,Qr.__)("Search"),hideLabelFromVision:o=!0,onClose:n,size:G="default",...X},i){let{disabled:a,...m}=X,x=(0,bB.useRef)(null),s=(0,dB.useInstanceId)(wh,"components-search-control");return(0,fi.jsx)(C6,{__next40pxDefaultSize:!0,id:s,hideLabelFromVision:o,label:d,ref:(0,dB.useMergeRefs)([x,i]),type:"search",size:G,className:Q("components-search-control",l),onChange:r=>t(r??""),autoComplete:"off",placeholder:b,value:e??"",prefix:(0,fi.jsx)(HC,{variant:"icon",children:(0,fi.jsx)(J6,{icon:Fs,fill:"currentColor"})}),suffix:(0,fi.jsx)(nrc,{searchRef:x,value:e,onChange:t,onClose:n}),...m})}var wh=(0,bB.forwardRef)(Grc);wh.displayName="SearchControl";var oB=wh;var Th=u(V(),1);function Xrc({debouncedSpeak:c,onCloseSearch:l,onSearch:t,search:e,title:d}){let{navigationTree:{items:b}}=It(),{menu:o}=A0(),n=(0,wr.useRef)(null);(0,wr.useEffect)(()=>{let m=setTimeout(()=>{n.current?.focus()},Up);return()=>{clearTimeout(m)}},[]),(0,wr.useEffect)(()=>{if(!e)return;let m=Object.values(b).filter(s=>s._isVisible).length,x=(0,Si.sprintf)((0,Si._n)("%d result found.","%d results found.",m),m);c(x)},[b,e]);let G=()=>{t?.(""),l()},X=m=>{m.code==="Escape"&&!m.defaultPrevented&&(m.preventDefault(),G())},i=`components-navigation__menu-title-search-${o}`,a=(0,Si.sprintf)((0,Si.__)("Search %s"),d?.toLowerCase()||"").trim();return(0,Th.jsx)(_4,{children:(0,Th.jsx)(oB,{className:"components-navigation__menu-search-input",id:i,onChange:m=>t?.(m),onKeyDown:X,placeholder:a,onClose:G,ref:n,value:e})})}var Y6=eB(Xrc);var Ro=u(V(),1);function F6({hasSearch:c,onSearch:l,search:t,title:e,titleAction:d}){let[b,o]=(0,nB.useState)(!1),{menu:n}=A0(),G=(0,nB.useRef)(null);if(!e)return null;let X=()=>{o(!1),setTimeout(()=>{G.current?.focus()},Up)},i=`components-navigation__menu-title-${n}`,a=(0,GB.sprintf)((0,GB.__)("Search in %s"),e);return(0,Ro.jsxs)(K4,{className:"components-navigation__menu-title",children:[!b&&(0,Ro.jsxs)(Mp,{as:"h2",className:"components-navigation__menu-title-heading",level:3,children:[(0,Ro.jsx)("span",{id:i,children:e}),(c||d)&&(0,Ro.jsxs)(q4,{children:[d,c&&(0,Ro.jsx)(lc,{size:"small",variant:"tertiary",label:a,onClick:()=>o(!0),ref:G,children:(0,Ro.jsx)(Cl,{icon:Fs})})]})]}),b&&(0,Ro.jsx)("div",{className:EX({type:"slide-in",origin:"left"}),children:(0,Ro.jsx)(Y6,{onCloseSearch:X,onSearch:l,search:t,title:e})})]})}var v6=u(nc(),1);var XB=u(V(),1);function N6({search:c}){let{navigationTree:{items:l}}=It(),t=Object.values(l).filter(e=>e._isVisible).length;return!c||t?null:(0,XB.jsx)(Pp,{children:(0,XB.jsxs)(Kp,{children:[(0,v6.__)("No results found.")," "]})})}var Io=u(V(),1);function irc(c){let{backButtonLabel:l,children:t,className:e,hasSearch:d,menu:b=NG,onBackButtonClick:o,onSearch:n,parentMenu:G,search:X,isSearchDebouncing:i,title:a,titleAction:m}=c,[x,s]=(0,f6.useState)("");y6(c);let{activeMenu:r}=It(),g={menu:b,search:x};if(r!==b)return(0,Io.jsx)(Or.Provider,{value:g,children:t});let Z=!!n,H=Z?X:x,R=Z?n:s,W=`components-navigation__menu-title-${b}`,I=Q("components-navigation__menu",e);return(0,Io.jsx)(Or.Provider,{value:g,children:(0,Io.jsxs)(M4,{className:I,children:[(G||o)&&(0,Io.jsx)($p,{backButtonLabel:l,parentMenu:G,onClick:o}),a&&(0,Io.jsx)(F6,{hasSearch:d,onSearch:R,search:H,title:a,titleAction:m}),(0,Io.jsx)(rn,{children:(0,Io.jsxs)("ul",{"aria-labelledby":W,children:[t,H&&!i&&(0,Io.jsx)(N6,{search:H})]})})]})})}var S6=irc;var q6=u(ml(),1),O0=u(Y(),1),$6=u(PI(),1),JRl=u(Ge(),1);function arc(c){for(var l=[],t=0;t<c.length;){var e=c[t];if(e==="*"||e==="+"||e==="?"){l.push({type:"MODIFIER",index:t,value:c[t++]});continue}if(e==="\\"){l.push({type:"ESCAPED_CHAR",index:t++,value:c[t++]});continue}if(e==="{"){l.push({type:"OPEN",index:t,value:c[t++]});continue}if(e==="}"){l.push({type:"CLOSE",index:t,value:c[t++]});continue}if(e===":"){for(var d="",b=t+1;b<c.length;){var o=c.charCodeAt(b);if(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122||o===95){d+=c[b++];continue}break}if(!d)throw new TypeError("Missing parameter name at ".concat(t));l.push({type:"NAME",index:t,value:d}),t=b;continue}if(e==="("){var n=1,G="",b=t+1;if(c[b]==="?")throw new TypeError('Pattern cannot start with "?" at '.concat(b));for(;b<c.length;){if(c[b]==="\\"){G+=c[b++]+c[b++];continue}if(c[b]===")"){if(n--,n===0){b++;break}}else if(c[b]==="("&&(n++,c[b+1]!=="?"))throw new TypeError("Capturing groups are not allowed at ".concat(b));G+=c[b++]}if(n)throw new TypeError("Unbalanced pattern at ".concat(t));if(!G)throw new TypeError("Missing pattern at ".concat(t));l.push({type:"PATTERN",index:t,value:G}),t=b;continue}l.push({type:"CHAR",index:t,value:c[t++]})}return l.push({type:"END",index:t,value:""}),l}function urc(c,l){l===void 0&&(l={});for(var t=arc(c),e=l.prefixes,d=e===void 0?"./":e,b=l.delimiter,o=b===void 0?"/#?":b,n=[],G=0,X=0,i="",a=function(h){if(X<t.length&&t[X].type===h)return t[X++].value},m=function(h){var C=a(h);if(C!==void 0)return C;var J=t[X],f=J.type,k=J.index;throw new TypeError("Unexpected ".concat(f," at ").concat(k,", expected ").concat(h))},x=function(){for(var h="",C;C=a("CHAR")||a("ESCAPED_CHAR");)h+=C;return h},s=function(h){for(var C=0,J=o;C<J.length;C++){var f=J[C];if(h.indexOf(f)>-1)return!0}return!1},r=function(h){var C=n[n.length-1],J=h||(C&&typeof C=="string"?C:"");if(C&&!J)throw new TypeError('Must have text between two parameters, missing text after "'.concat(C.name,'"'));return!J||s(J)?"[^".concat(kG(o),"]+?"):"(?:(?!".concat(kG(J),")[^").concat(kG(o),"])+?")};X<t.length;){var g=a("CHAR"),Z=a("NAME"),H=a("PATTERN");if(Z||H){var R=g||"";d.indexOf(R)===-1&&(i+=R,R=""),i&&(n.push(i),i=""),n.push({name:Z||G++,prefix:R,suffix:"",pattern:H||r(R),modifier:a("MODIFIER")||""});continue}var W=g||a("ESCAPED_CHAR");if(W){i+=W;continue}i&&(n.push(i),i="");var I=a("OPEN");if(I){var R=x(),B=a("NAME")||"",p=a("PATTERN")||"",y=x();m("CLOSE"),n.push({name:B||(p?G++:""),pattern:B&&!p?r(R):p,prefix:R,suffix:y,modifier:a("MODIFIER")||""});continue}m("END")}return n}function k6(c,l){var t=[],e=A6(c,t,l);return mrc(e,t,l)}function mrc(c,l,t){t===void 0&&(t={});var e=t.decode,d=e===void 0?function(b){return b}:e;return function(b){var o=c.exec(b);if(!o)return!1;for(var n=o[0],G=o.index,X=Object.create(null),i=function(m){if(o[m]===void 0)return"continue";var x=l[m-1];x.modifier==="*"||x.modifier==="+"?X[x.name]=o[m].split(x.prefix+x.suffix).map(function(s){return d(s,x)}):X[x.name]=d(o[m],x)},a=1;a<o.length;a++)i(a);return{path:n,index:G,params:X}}}function kG(c){return c.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function z6(c){return c&&c.sensitive?"":"i"}function xrc(c,l){if(!l)return c;for(var t=/\((?:\?<(.*?)>)?(?!\?)/g,e=0,d=t.exec(c.source);d;)l.push({name:d[1]||e++,prefix:"",suffix:"",modifier:"",pattern:""}),d=t.exec(c.source);return c}function src(c,l,t){var e=c.map(function(d){return A6(d,l,t).source});return new RegExp("(?:".concat(e.join("|"),")"),z6(t))}function rrc(c,l,t){return grc(urc(c,t),l,t)}function grc(c,l,t){t===void 0&&(t={});for(var e=t.strict,d=e===void 0?!1:e,b=t.start,o=b===void 0?!0:b,n=t.end,G=n===void 0?!0:n,X=t.encode,i=X===void 0?function(C){return C}:X,a=t.delimiter,m=a===void 0?"/#?":a,x=t.endsWith,s=x===void 0?"":x,r="[".concat(kG(s),"]|$"),g="[".concat(kG(m),"]"),Z=o?"^":"",H=0,R=c;H<R.length;H++){var W=R[H];if(typeof W=="string")Z+=kG(i(W));else{var I=kG(i(W.prefix)),B=kG(i(W.suffix));if(W.pattern)if(l&&l.push(W),I||B)if(W.modifier==="+"||W.modifier==="*"){var p=W.modifier==="*"?"?":"";Z+="(?:".concat(I,"((?:").concat(W.pattern,")(?:").concat(B).concat(I,"(?:").concat(W.pattern,"))*)").concat(B,")").concat(p)}else Z+="(?:".concat(I,"(").concat(W.pattern,")").concat(B,")").concat(W.modifier);else{if(W.modifier==="+"||W.modifier==="*")throw new TypeError('Can not repeat "'.concat(W.name,'" without a prefix and suffix'));Z+="(".concat(W.pattern,")").concat(W.modifier)}else Z+="(?:".concat(I).concat(B,")").concat(W.modifier)}}if(G)d||(Z+="".concat(g,"?")),Z+=t.endsWith?"(?=".concat(r,")"):"$";else{var y=c[c.length-1],h=typeof y=="string"?g.indexOf(y[y.length-1])>-1:y===void 0;d||(Z+="(?:".concat(g,"(?=").concat(r,"))?")),h||(Z+="(?=".concat(g,"|").concat(r,")"))}return new RegExp(Z,z6(t))}function A6(c,l,t){return c instanceof RegExp?xrc(c,l):Array.isArray(c)?src(c,l,t):rrc(c,l,t)}function O6(c,l){return k6(l,{decode:decodeURIComponent})(c)}function Q6(c,l){for(let t of l){let e=O6(c,t.path);if(e)return{params:e.params,id:t.id}}}function w6(c,l){if(!c.startsWith("/"))return;let t=c.split("/"),e;for(;t.length>1&&e===void 0;){t.pop();let d=t.join("/")===""?"/":t.join("/");l.find(b=>O6(d,b.path)!==!1)&&(e=d)}return e}var T6=u(Y(),1),Zrc={location:{},goTo:()=>{},goBack:()=>{},goToParent:()=>{},addScreen:()=>{},removeScreen:()=>{},params:{}},ki=(0,T6.createContext)(Zrc);ki.displayName="NavigatorContext";var U6={name:"1br0vvk",styles:"position:relative;overflow-x:clip;contain:layout;display:grid;grid-template-columns:1fr;grid-template-rows:1fr;align-items:start"},D6=Ye({from:{opacity:0}}),L6=Ye({to:{opacity:0}}),j6=Ye({from:{transform:"translateX(100px)"}}),E6=Ye({to:{transform:"translateX(-80px)"}}),M6=Ye({from:{transform:"translateX(-100px)"}}),P6=Ye({to:{transform:"translateX(80px)"}}),Pt={DURATION:70,EASING:"linear",DELAY:{IN:70,OUT:40}},Wo={DURATION:300,EASING:"cubic-bezier(0.33, 0, 0, 1)"},Dh={IN:Math.max(Pt.DURATION+Pt.DELAY.IN,Wo.DURATION),OUT:Math.max(Pt.DURATION+Pt.DELAY.OUT,Wo.DURATION)},Lh={end:{in:j6.name,out:E6.name},start:{in:M6.name,out:P6.name}},Hrc={end:{in:O(Pt.DURATION,"ms ",Pt.EASING," ",Pt.DELAY.IN,"ms both ",D6,",",Wo.DURATION,"ms ",Wo.EASING," both ",j6,";",""),out:O(Pt.DURATION,"ms ",Pt.EASING," ",Pt.DELAY.OUT,"ms both ",L6,",",Wo.DURATION,"ms ",Wo.EASING," both ",E6,";","")},start:{in:O(Pt.DURATION,"ms ",Pt.EASING," ",Pt.DELAY.IN,"ms both ",D6,",",Wo.DURATION,"ms ",Wo.EASING," both ",M6,";",""),out:O(Pt.DURATION,"ms ",Pt.EASING," ",Pt.DELAY.OUT,"ms both ",L6,",",Wo.DURATION,"ms ",Wo.EASING," both ",P6,";","")}},K6=O("z-index:1;&[data-animation-type='out']{z-index:0;}@media not ( prefers-reduced-motion ){&:not( [data-skip-animation] ){",["start","end"].map(c=>["in","out"].map(l=>O("&[data-animation-direction='",c,"'][data-animation-type='",l,"']{animation:",Hrc[c][l],";}",""))),";}}",""),_6={name:"14di7zd",styles:"overflow-x:auto;max-height:100%;box-sizing:border-box;position:relative;grid-column:1/-1;grid-row:1/-1"};var jh=u(V(),1);function Rrc({screens:c},l){return c.some(t=>t.path===l.path)?c:[...c,l]}function Irc({screens:c},l){return c.filter(t=>t.id!==l.id)}function cP(c,l,t={}){let{focusSelectors:e}=c,d={...c.currentLocation},{isBack:b=!1,skipFocus:o=!1,replace:n,focusTargetSelector:G,...X}=t;if(d.path===l)return{currentLocation:d,focusSelectors:e};let i;function a(){return i=i??new Map(c.focusSelectors),i}G&&d.path&&a().set(d.path,G);let m;return e.get(l)&&(b&&(m=e.get(l)),a().delete(l)),{currentLocation:{...X,isInitial:!1,path:l,isBack:b,hasRestoredFocus:!1,focusTargetSelector:m,skipFocus:o},focusSelectors:i??e}}function Wrc(c,l={}){let{screens:t,focusSelectors:e}=c,d={...c.currentLocation},b=d.path;if(b===void 0)return{currentLocation:d,focusSelectors:e};let o=w6(b,t);return o===void 0?{currentLocation:d,focusSelectors:e}:cP(c,o,{...l,isBack:!0})}function prc(c,l){let{screens:t,currentLocation:e,matchedPath:d,focusSelectors:b,...o}=c;switch(l.type){case"add":t=Rrc(c,l.screen);break;case"remove":t=Irc(c,l.screen);break;case"goto":({currentLocation:e,focusSelectors:b}=cP(c,l.path,l.options));break;case"gotoparent":({currentLocation:e,focusSelectors:b}=Wrc(c,l.options));break}if(t===c.screens&&e===c.currentLocation)return c;let n=e.path;return d=n!==void 0?Q6(n,t):void 0,d&&c.matchedPath&&d.id===c.matchedPath.id&&(0,$6.isShallowEqual)(d.params,c.matchedPath.params)&&(d=c.matchedPath),{...o,screens:t,currentLocation:e,matchedPath:d,focusSelectors:b}}function Brc(c,l){let{initialPath:t,children:e,className:d,...b}=cc(c,"Navigator"),[o,n]=(0,O0.useReducer)(prc,t,s=>({screens:[],currentLocation:{path:s,isInitial:!0},matchedPath:void 0,focusSelectors:new Map,initialPath:t})),G=(0,O0.useMemo)(()=>({goBack:s=>n({type:"gotoparent",options:s}),goTo:(s,r)=>n({type:"goto",path:s,options:r}),goToParent:s=>{(0,q6.default)("wp.components.useNavigator().goToParent",{since:"6.7",alternative:"wp.components.useNavigator().goBack"}),n({type:"gotoparent",options:s})},addScreen:s=>n({type:"add",screen:s}),removeScreen:s=>n({type:"remove",screen:s})}),[]),{currentLocation:X,matchedPath:i}=o,a=(0,O0.useMemo)(()=>({location:X,params:i?.params??{},match:i?.id,...G}),[X,i,G]),m=Xc(),x=(0,O0.useMemo)(()=>m(U6,d),[d,m]);return(0,jh.jsx)(ic,{ref:l,className:x,...b,children:(0,jh.jsx)(ki.Provider,{value:a,children:e})})}var iB=tc(Brc,"Navigator");var oP=u(R0(),1),nd=u(Y(),1),nP=u(dc(),1),GP=u(Eh(),1),ARl=u(Ge(),1);var zG=u(Y(),1),eP=u(dc(),1),dP=u(nc(),1);var tP=1.2,yrc=(c,l,t)=>l==="ANIMATING_IN"&&t===Lh[c].in,Vrc=(c,l,t)=>l==="ANIMATING_OUT"&&t===Lh[c].out;function bP({isMatch:c,skipAnimation:l,isBack:t,onAnimationEnd:e}){let d=(0,dP.isRTL)(),b=(0,eP.useReducedMotion)(),[o,n]=(0,zG.useState)("INITIAL"),G=o!=="ANIMATING_IN"&&o!=="IN"&&c,X=o!=="ANIMATING_OUT"&&o!=="OUT"&&!c;(0,zG.useLayoutEffect)(()=>{G?n(l||b?"IN":"ANIMATING_IN"):X&&n(l||b?"OUT":"ANIMATING_OUT")},[G,X,l,b]);let i=d&&t||!d&&!t?"end":"start",a=o==="ANIMATING_IN",m=o==="ANIMATING_OUT",x;a?x="in":m&&(x="out");let s=(0,zG.useCallback)(r=>{e?.(r),Vrc(i,o,r.animationName)?n("OUT"):yrc(i,o,r.animationName)&&n("IN")},[e,o,i]);return(0,zG.useEffect)(()=>{let r;return m?r=window.setTimeout(()=>{n("OUT"),r=void 0},Dh.OUT*tP):a&&(r=window.setTimeout(()=>{n("IN"),r=void 0},Dh.IN*tP)),()=>{r&&(window.clearTimeout(r),r=void 0)}},[m,a]),{animationStyles:K6,shouldRenderScreen:c||o==="IN"||o==="ANIMATING_OUT",screenProps:{onAnimationEnd:s,"data-animation-direction":i,"data-animation-type":x,"data-skip-animation":l||void 0}}}var XP=u(V(),1);function Crc(c,l){/^\//.test(c.path);let t=(0,nd.useId)(),{children:e,className:d,path:b,onAnimationEnd:o,...n}=cc(c,"Navigator.Screen"),{location:G,match:X,addScreen:i,removeScreen:a}=(0,nd.useContext)(ki),{isInitial:m,isBack:x,focusTargetSelector:s,skipFocus:r}=G,g=X===t,Z=(0,nd.useRef)(null),H=!!m&&!x;(0,nd.useEffect)(()=>{let C={id:t,path:(0,GP.escapeAttribute)(b)};return i(C),()=>a(C)},[t,b,i,a]);let{animationStyles:R,shouldRenderScreen:W,screenProps:I}=bP({isMatch:g,isBack:x,onAnimationEnd:o,skipAnimation:H}),B=Xc(),p=(0,nd.useMemo)(()=>B(_6,R,d),[d,B,R]),y=(0,nd.useRef)(G);(0,nd.useEffect)(()=>{y.current=G},[G]),(0,nd.useEffect)(()=>{let C=Z.current;if(H||!g||!C||y.current.hasRestoredFocus||r)return;let J=C.ownerDocument.activeElement;if(C.contains(J))return;let f=null;if(x&&s&&(f=C.querySelector(s)),!f){let[k]=oP.focus.tabbable.find(C);f=k??C}y.current.hasRestoredFocus=!0,f.focus()},[H,g,x,s,r]);let h=(0,nP.useMergeRefs)([l,Z]);return W?(0,XP.jsx)(ic,{ref:h,className:p,...I,...n,children:e}):null}var aB=tc(Crc,"Navigator.Screen");var aP=u(Y(),1),uP=u(Eh(),1);var iP=u(Y(),1);function AG(){let{location:c,params:l,goTo:t,goBack:e,goToParent:d}=(0,iP.useContext)(ki);return{location:c,goTo:t,goBack:e,goToParent:d,params:l}}var Jrc=(c,l)=>`[${c}="${l}"]`;function mP(c){let{path:l,onClick:t,as:e=lc,attributeName:d="id",...b}=cc(c,"Navigator.Button"),o=(0,uP.escapeAttribute)(l),{goTo:n}=AG(),G=(0,aP.useCallback)(X=>{X.preventDefault(),n(o,{focusTargetSelector:Jrc(d,o)}),t?.(X)},[n,t,d,o]);return{as:e,onClick:G,...b,[d]:o}}var xP=u(V(),1);function hrc(c,l){let t=mP(c);return(0,xP.jsx)(ic,{ref:l,...t})}var uB=tc(hrc,"Navigator.Button");var sP=u(Y(),1);function rP(c){let{onClick:l,as:t=lc,...e}=cc(c,"Navigator.BackButton"),{goBack:d}=AG(),b=(0,sP.useCallback)(o=>{o.preventDefault(),d(),l?.(o)},[d,l]);return{as:t,onClick:b,...e}}var gP=u(V(),1);function Yrc(c,l){let t=rP(c);return(0,gP.jsx)(ic,{ref:l,...t})}var Q0=tc(Yrc,"Navigator.BackButton");var ZP=u(ml(),1);var HP=u(V(),1);function Frc(c,l){return(0,ZP.default)("wp.components.NavigatorToParentButton",{since:"6.7",alternative:"wp.components.Navigator.BackButton"}),(0,HP.jsx)(Q0,{ref:l,...c})}var RP=tc(Frc,"Navigator.ToParentButton");var IP=Object.assign(iB,{displayName:"NavigatorProvider"}),WP=Object.assign(aB,{displayName:"NavigatorScreen"}),pP=Object.assign(uB,{displayName:"NavigatorButton"}),BP=Object.assign(Q0,{displayName:"NavigatorBackButton"}),yP=Object.assign(RP,{displayName:"NavigatorToParentButton"});var VP=Object.assign(iB,{Screen:Object.assign(aB,{displayName:"Navigator.Screen"}),Button:Object.assign(uB,{displayName:"Navigator.Button"}),BackButton:Object.assign(Q0,{displayName:"Navigator.BackButton"})});var w0=u(nc(),1),T0=u(Y(),1),JP=u(eo(),1);var pn=u(V(),1),CP=()=>{};function vrc(c,l){let t=typeof c=="string"?c:(0,T0.renderToString)(c);(0,T0.useEffect)(()=>{t&&(0,JP.speak)(t,l)},[t,l])}function Nrc(c){switch(c){case"success":case"warning":case"info":return"polite";default:return"assertive"}}function frc(c){switch(c){case"warning":return(0,w0.__)("Warning notice");case"info":return(0,w0.__)("Information notice");case"error":return(0,w0.__)("Error notice");default:return(0,w0.__)("Notice")}}function Src({className:c,status:l="info",children:t,spokenMessage:e=t,onRemove:d=CP,isDismissible:b=!0,actions:o=[],politeness:n=Nrc(l),__unstableHTML:G,onDismiss:X=CP}){vrc(e,n);let i=Q(c,"components-notice","is-"+l,{"is-dismissible":b});G&&typeof t=="string"&&(t=(0,pn.jsx)(T0.RawHTML,{children:t}));let a=()=>{X(),d()};return(0,pn.jsxs)("div",{className:i,children:[(0,pn.jsx)(Qc,{children:frc(l)}),(0,pn.jsxs)("div",{className:"components-notice__content",children:[t,o.length>0&&(0,pn.jsx)("div",{className:"components-notice__actions",children:o.map(({className:m,label:x,isPrimary:s,variant:r,noDefaultClasses:g=!1,onClick:Z,url:H,disabled:R},W)=>{let I=r;return r!=="primary"&&!g&&(I=H?"link":"secondary"),typeof I>"u"&&s&&(I="primary"),(0,pn.jsx)(lc,{__next40pxDefaultSize:!0,href:H,variant:I,onClick:Z,disabled:R,accessibleWhenDisabled:!0,className:Q("components-notice__action",m),children:x},W)})})]}),b&&(0,pn.jsx)(lc,{size:"small",className:"components-notice__dismiss",icon:KX,label:(0,w0.__)("Close"),onClick:a})]})}var mB=Src;var hP=u(E(),1),YP=u(V(),1),krc=()=>{};function zrc({notices:c,onRemove:l=krc,className:t,children:e}){let d=b=>()=>l(b);return t=Q("components-notice-list",t),(0,YP.jsxs)("div",{className:t,children:[e,[...c].reverse().map(b=>{let{content:o,...n}=b;return(0,hP.createElement)(mB,{...n,key:b.id,onRemove:d(b.id)},b.content)})]})}var xB=zrc;var FP=u(Y(),1);var sB=u(V(),1);function Arc({label:c,children:l}){return(0,sB.jsxs)("div",{className:"components-panel__header",children:[c&&(0,sB.jsx)("h2",{children:c}),l]})}var rB=Arc;var gB=u(V(),1);function Orc({header:c,className:l,children:t},e){let d=Q(l,"components-panel");return(0,gB.jsxs)("div",{className:d,ref:e,children:[c&&(0,gB.jsx)(rB,{label:c}),t]})}var vP=(0,FP.forwardRef)(Orc);vP.displayName="Panel";var NP=vP;var ZB=u(dc(),1),D0=u(Y(),1);var Bn=u(V(),1),Qrc=()=>{};function wrc(c,l){let{buttonProps:t={},children:e,className:d,icon:b,initialOpen:o,onToggle:n=Qrc,opened:G,title:X,scrollAfterOpen:i=!0}=c,[a,m]=Ko(G,{initial:o===void 0?!0:o,fallback:!1}),x=(0,D0.useRef)(null),s=(0,ZB.useReducedMotion)()?"auto":"smooth",r=H=>{H.preventDefault();let R=!a;m(R),n(R)},g=(0,D0.useRef)(void 0);g.current=i,OX(()=>{a&&g.current&&x.current?.scrollIntoView&&x.current.scrollIntoView({inline:"nearest",block:"nearest",behavior:s})},[a,s]);let Z=Q("components-panel__body",d,{"is-opened":a});return(0,Bn.jsxs)("div",{className:Z,ref:(0,ZB.useMergeRefs)([x,l]),children:[(0,Bn.jsx)(Trc,{icon:b,isOpened:!!a,onClick:r,title:X,...t}),typeof e=="function"?e({opened:!!a}):a&&e]})}var Trc=(0,D0.forwardRef)(({isOpened:c,icon:l,title:t,...e},d)=>t?(0,Bn.jsx)("h2",{className:"components-panel__body-title",children:(0,Bn.jsxs)(lc,{__next40pxDefaultSize:!0,className:"components-panel__body-toggle","aria-expanded":c,ref:d,...e,children:[(0,Bn.jsx)("span",{"aria-hidden":"true",children:(0,Bn.jsx)(cl,{className:"components-panel__arrow",icon:c?r2:Ws})}),t,l&&(0,Bn.jsx)(cl,{icon:l,className:"components-panel__icon",size:20})]})}):null),fP=(0,D0.forwardRef)(wrc);fP.displayName="PanelBody";var SP=fP;var kP=u(Y(),1),zP=u(V(),1);function Drc({className:c,children:l},t){return(0,zP.jsx)("div",{className:Q("components-panel__row",c),ref:t,children:l})}var AP=(0,kP.forwardRef)(Drc);AP.displayName="PanelRow";var OP=AP;var QP=u(dc(),1),HB=u(kc(),1),wP=u(Y(),1),TP=u(eo(),1);var po=u(V(),1),Lrc=(0,po.jsx)(HB.SVG,{className:"components-placeholder__illustration",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 60 60",preserveAspectRatio:"none",children:(0,po.jsx)(HB.Path,{vectorEffect:"non-scaling-stroke",d:"M60 60 0 0"})});function Urc(c){let{icon:l,children:t,label:e,instructions:d,className:b,notices:o,preview:n,isColumnLayout:G,withIllustration:X,...i}=c,[a,{width:m}]=(0,QP.useResizeObserver)(),x;typeof m=="number"&&(x={"is-large":m>=480,"is-medium":m>=160&&m<480,"is-small":m<160});let s=Q("components-placeholder",b,x,X?"has-illustration":null),r=Q("components-placeholder__fieldset",{"is-column-layout":G});return(0,wP.useEffect)(()=>{d&&(0,TP.speak)(d)},[d]),(0,po.jsxs)("div",{...i,className:s,children:[X?Lrc:null,a,o,n&&(0,po.jsx)("div",{className:"components-placeholder__preview",children:n}),(0,po.jsxs)("div",{className:"components-placeholder__label",children:[(0,po.jsx)(cl,{icon:l}),e]}),!!d&&(0,po.jsx)("div",{className:"components-placeholder__instructions",children:d}),(0,po.jsx)("div",{className:r,children:t})]})}var DP=Urc;var MP=u(nc(),1),PP=u(Y(),1);var LP=u(nc(),1);function jrc(c=!1){let l=c?"right":"left";return Ye({"0%":{[l]:"-50%"},"100%":{[l]:"100%"}})}var Erc=50,UP=N("div",{target:"e15u147w2"})("position:relative;overflow:hidden;height:",w.borderWidthFocus,`;background-color:color-mix(
		in srgb,
		`,D.theme.foreground,`,
		transparent 90%
	);border-radius:`,w.radiusFull,";outline:2px solid transparent;outline-offset:2px;:where( & ){width:160px;}"),Mrc={name:"152sa26",styles:"width:var(--indicator-width);transition:width 0.4s ease-in-out"},jP=N("div",{target:"e15u147w1"})("display:inline-block;position:absolute;top:0;height:100%;border-radius:",w.radiusFull,`;background-color:color-mix(
		in srgb,
		`,D.theme.foreground,`,
		transparent 10%
	);outline:2px solid transparent;outline-offset:-2px;`,({isIndeterminate:c})=>c?O({animationDuration:"1.5s",animationTimingFunction:"ease-in-out",animationIterationCount:"infinite",animationName:jrc((0,LP.isRTL)()),width:`${Erc}%`},"",""):Mrc,";"),EP=N("progress",{target:"e15u147w0"})({name:"11fb690",styles:"position:absolute;top:0;left:0;opacity:0;width:100%;height:100%"});var Tr=u(V(),1);function Krc(c,l){let{className:t,value:e,...d}=c,b=!Number.isFinite(e);return(0,Tr.jsxs)(UP,{className:t,children:[(0,Tr.jsx)(jP,{style:{"--indicator-width":b?void 0:`${e}%`},isIndeterminate:b}),(0,Tr.jsx)(EP,{max:100,value:e,"aria-label":(0,MP.__)("Loading \u2026"),ref:l,...d})]})}var KP=(0,PP.forwardRef)(Krc);KP.displayName="ProgressBar";var _P=KP;var Gd=u(nc(),1);var _rc=c=>c.every(l=>l.parent!==null);function RB(c){let l=c.map(d=>({children:[],parent:null,...d,id:String(d.id)}));if(!_rc(l))return l;let t=l.reduce((d,b)=>{let{parent:o}=b;return d[o]||(d[o]=[]),d[o].push(b),d},{}),e=d=>d.map(b=>{let o=t[b.id];return{...b,children:o&&o.length?e(o):[]}});return e(t[0]||[])}var cK=u(Y(),1),lK=u($P(),1);var tK=u(V(),1);function eK(c,l=0){return c.flatMap(t=>[{value:t.id,label:"\xA0".repeat(l*3)+(0,lK.decodeEntities)(t.name)},...eK(t.children||[],l+1)])}function qrc(c){let{__nextHasNoMarginBottom:l,label:t,noOptionLabel:e,onChange:d,selectedId:b,tree:o=[],...n}=Et(c),G=(0,cK.useMemo)(()=>[e&&{value:"",label:e},...eK(o)].filter(X=>!!X),[e,o]);return Lc({componentName:"TreeSelect",size:n.size,__next40pxDefaultSize:n.__next40pxDefaultSize}),(0,tK.jsx)($s,{__shouldNotWarnDeprecated36pxSize:!0,label:t,options:G,onChange:d,value:b,...n})}var L0=qrc;var dK=u(V(),1);function bK({__next40pxDefaultSize:c,label:l,noOptionLabel:t,authorList:e,selectedAuthorId:d,onChange:b}){if(!e)return null;let o=RB(e);return(0,dK.jsx)(L0,{label:l,noOptionLabel:t,onChange:b,tree:o,selectedId:d!==void 0?String(d):void 0,__next40pxDefaultSize:c})}var oK=u(Y(),1);var nK=u(V(),1);function GK({__next40pxDefaultSize:c,label:l,noOptionLabel:t,categoriesList:e,selectedCategoryId:d,onChange:b,...o}){let n=(0,oK.useMemo)(()=>RB(e),[e]);return(0,nK.jsx)(L0,{label:l,noOptionLabel:t,onChange:b,tree:n,selectedId:d!==void 0?String(d):void 0,...o,__next40pxDefaultSize:c})}var zi=u(V(),1),$rc=1,cgc=100,lgc=20;function tgc(c){return"categoriesList"in c}function egc(c){return"categorySuggestions"in c}var dgc=[{label:(0,Gd.__)("Newest to oldest"),value:"date/desc"},{label:(0,Gd.__)("Oldest to newest"),value:"date/asc"},{label:(0,Gd.__)("A \u2192 Z"),value:"title/asc"},{label:(0,Gd.__)("Z \u2192 A"),value:"title/desc"}];function bgc({authorList:c,selectedAuthorId:l,numberOfItems:t,order:e,orderBy:d,orderByOptions:b=dgc,maxItems:o=cgc,minItems:n=$rc,onAuthorChange:G,onNumberOfItemsChange:X,onOrderChange:i,onOrderByChange:a,...m}){return(0,zi.jsx)(al,{spacing:"4",className:"components-query-controls",children:[i&&a&&(0,zi.jsx)(Fd,{__next40pxDefaultSize:!0,label:(0,Gd.__)("Order by"),value:d===void 0||e===void 0?void 0:`${d}/${e}`,options:b,onChange:x=>{if(typeof x!="string")return;let[s,r]=x.split("/");r!==e&&i(r),s!==d&&a(s)}},"query-controls-order-select"),tgc(m)&&m.categoriesList&&m.onCategoryChange&&(0,zi.jsx)(GK,{__next40pxDefaultSize:!0,categoriesList:m.categoriesList,label:(0,Gd.__)("Category"),noOptionLabel:(0,Gd._x)("All","categories"),selectedCategoryId:m.selectedCategoryId,onChange:m.onCategoryChange},"query-controls-category-select"),egc(m)&&m.categorySuggestions&&m.onCategoryChange&&(0,zi.jsx)(Qp,{__next40pxDefaultSize:!0,label:(0,Gd.__)("Categories"),value:m.selectedCategories&&m.selectedCategories.map(x=>({id:x.id,value:x.name||x.value})),suggestions:Object.keys(m.categorySuggestions),onChange:m.onCategoryChange,maxSuggestions:lgc},"query-controls-categories-select"),G&&(0,zi.jsx)(bK,{__next40pxDefaultSize:!0,authorList:c,label:(0,Gd.__)("Author"),noOptionLabel:(0,Gd._x)("All","authors"),selectedAuthorId:l,onChange:G},"query-controls-author-select"),X&&(0,zi.jsx)(vd,{__next40pxDefaultSize:!0,label:(0,Gd.__)("Number of items"),value:t,onChange:X,min:n,max:o,required:!0},"query-controls-range-control")]})}var XK=bgc;var IB=u(Y(),1);var iK=u(Y(),1),Dr=(0,iK.createContext)({store:void 0,disabled:void 0});Dr.displayName="RadioGroupContext";var Mh=u(V(),1);function ogc({value:c,children:l,...t},e){let{store:d,disabled:b}=(0,IB.useContext)(Dr),o=xc(d,"value"),n=o!==void 0&&o===c;return Lc({componentName:"Radio",size:void 0,__next40pxDefaultSize:t.__next40pxDefaultSize}),(0,Mh.jsx)(BX,{disabled:b,store:d,ref:e,value:c,render:(0,Mh.jsx)(lc,{variant:n?"primary":"secondary",...t}),children:l||c})}var aK=(0,IB.forwardRef)(ogc);aK.displayName="Radio";var uK=aK;var mK=u(ml(),1),pB=u(Y(),1),xK=u(nc(),1);var WB=u(V(),1);function ngc({label:c,checked:l,defaultChecked:t,disabled:e,onChange:d,children:b,...o},n){let G=yX({value:l,defaultValue:t,setValue:i=>{d?.(i??void 0)},rtl:(0,xK.isRTL)()}),X=(0,pB.useMemo)(()=>({store:G,disabled:e}),[G,e]);return(0,mK.default)("wp.components.__experimentalRadioGroup",{alternative:"wp.components.RadioControl or wp.components.__experimentalToggleGroupControl",since:"6.8"}),(0,WB.jsx)(Dr.Provider,{value:X,children:(0,WB.jsx)(Ba,{store:G,render:(0,WB.jsx)(OW,{__shouldNotWarnDeprecated:!0,children:b}),"aria-label":c,ref:n,...o})})}var sK=(0,pB.forwardRef)(ngc);sK.displayName="RadioGroup";var rK=sK;var HK=u(dc(),1);var Wb=u(V(),1);function gK(c,l){return`${c}-${l}-option-description`}function Ph(c,l){return`${c}-${l}`}function ZK(c){return`${c}__help`}function RK(c){let{label:l,className:t,selected:e,help:d,onChange:b,onClick:o,hideLabelFromVision:n,options:G=[],id:X,...i}=c,a=(0,HK.useInstanceId)(RK,"inspector-radio-control",X),m=x=>b(x.target.value);return G?.length?(0,Wb.jsxs)("fieldset",{id:a,className:Q(t,"components-radio-control"),"aria-describedby":d?ZK(a):void 0,children:[n?(0,Wb.jsx)(Qc,{as:"legend",children:l}):(0,Wb.jsx)(Dc.VisualLabel,{as:"legend",children:l}),(0,Wb.jsx)(al,{spacing:3,className:Q("components-radio-control__group-wrapper",{"has-help":!!d}),children:G.map((x,s)=>(0,Wb.jsxs)("div",{className:"components-radio-control__option",children:[(0,Wb.jsx)("input",{id:Ph(a,s),className:"components-radio-control__input",type:"radio",name:a,value:x.value,onChange:m,checked:x.value===e,"aria-describedby":x.description?gK(a,s):void 0,onClick:r=>{r.currentTarget.focus(),o?.(r)},...i}),(0,Wb.jsx)("label",{className:"components-radio-control__label",htmlFor:Ph(a,s),children:x.label}),x.description?(0,Wb.jsx)(bb,{id:gK(a,s),className:"components-radio-control__option-description",children:x.description}):null]},Ph(a,s)))}),!!d&&(0,Wb.jsx)(bb,{id:ZK(a),className:"components-base-control__help",children:d})]}):null}var BB=RK;var QK=u(Y(),1);var Ai=u(E());var VB=u(E()),Ggc=(function(){var c=function(l,t){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,d){e.__proto__=d}||function(e,d){for(var b in d)d.hasOwnProperty(b)&&(e[b]=d[b])},c(l,t)};return function(l,t){c(l,t);function e(){this.constructor=l}l.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}})(),yB=function(){return yB=Object.assign||function(c){for(var l,t=1,e=arguments.length;t<e;t++){l=arguments[t];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(c[d]=l[d])}return c},yB.apply(this,arguments)},Xgc={top:{width:"100%",height:"10px",top:"-5px",left:"0px",cursor:"row-resize"},right:{width:"10px",height:"100%",top:"0px",right:"-5px",cursor:"col-resize"},bottom:{width:"100%",height:"10px",bottom:"-5px",left:"0px",cursor:"row-resize"},left:{width:"10px",height:"100%",top:"0px",left:"-5px",cursor:"col-resize"},topRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",top:"-10px",cursor:"ne-resize"},bottomRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",bottom:"-10px",cursor:"se-resize"},bottomLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",bottom:"-10px",cursor:"sw-resize"},topLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",top:"-10px",cursor:"nw-resize"}},IK=(function(c){Ggc(l,c);function l(){var t=c!==null&&c.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return l.prototype.render=function(){return VB.createElement("div",{className:this.props.className||"",style:yB(yB({position:"absolute",userSelect:"none"},Xgc[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},l})(VB.PureComponent);var OG=u(BK()),ggc=(function(){var c=function(l,t){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,d){e.__proto__=d}||function(e,d){for(var b in d)d.hasOwnProperty(b)&&(e[b]=d[b])},c(l,t)};return function(l,t){c(l,t);function e(){this.constructor=l}l.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}})(),Bo=function(){return Bo=Object.assign||function(c){for(var l,t=1,e=arguments.length;t<e;t++){l=arguments[t];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(c[d]=l[d])}return c},Bo.apply(this,arguments)},Zgc={width:"auto",height:"auto"},JB=(0,OG.default)(function(c,l,t){return Math.max(Math.min(c,t),l)}),yK=(0,OG.default)(function(c,l){return Math.round(c/l)*l}),U0=(0,OG.default)(function(c,l){return new RegExp(c,"i").test(l)}),hB=function(c){return!!(c.touches&&c.touches.length)},Hgc=function(c){return!!((c.clientX||c.clientX===0)&&(c.clientY||c.clientY===0))},VK=(0,OG.default)(function(c,l,t){t===void 0&&(t=0);var e=l.reduce(function(b,o,n){return Math.abs(o-c)<Math.abs(l[b]-c)?n:b},0),d=Math.abs(l[e]-c);return t===0||d<t?l[e]:c}),Wt=(0,OG.default)(function(c,l){return c.substr(c.length-l.length,l.length)===l}),qh=(0,OG.default)(function(c){return c=c.toString(),c==="auto"||Wt(c,"px")||Wt(c,"%")||Wt(c,"vh")||Wt(c,"vw")||Wt(c,"vmax")||Wt(c,"vmin")?c:c+"px"}),YB=function(c,l,t,e){if(c&&typeof c=="string"){if(Wt(c,"px"))return Number(c.replace("px",""));if(Wt(c,"%")){var d=Number(c.replace("%",""))/100;return l*d}if(Wt(c,"vw")){var d=Number(c.replace("vw",""))/100;return t*d}if(Wt(c,"vh")){var d=Number(c.replace("vh",""))/100;return e*d}}return c},Rgc=(0,OG.default)(function(c,l,t,e,d,b,o){return e=YB(e,c.width,l,t),d=YB(d,c.height,l,t),b=YB(b,c.width,l,t),o=YB(o,c.height,l,t),{maxWidth:typeof e>"u"?void 0:Number(e),maxHeight:typeof d>"u"?void 0:Number(d),minWidth:typeof b>"u"?void 0:Number(b),minHeight:typeof o>"u"?void 0:Number(o)}}),Igc=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],CK="__resizable_base__",JK=(function(c){ggc(l,c);function l(t){var e=c.call(this,t)||this;return e.ratio=1,e.resizable=null,e.parentLeft=0,e.parentTop=0,e.resizableLeft=0,e.resizableRight=0,e.resizableTop=0,e.resizableBottom=0,e.targetLeft=0,e.targetTop=0,e.appendBase=function(){if(!e.resizable||!e.window)return null;var d=e.parentNode;if(!d)return null;var b=e.window.document.createElement("div");return b.style.width="100%",b.style.height="100%",b.style.position="absolute",b.style.transform="scale(0, 0)",b.style.left="0",b.style.flex="0",b.classList?b.classList.add(CK):b.className+=CK,d.appendChild(b),b},e.removeBase=function(d){var b=e.parentNode;b&&b.removeChild(d)},e.ref=function(d){d&&(e.resizable=d)},e.state={isResizing:!1,width:typeof(e.propsSize&&e.propsSize.width)>"u"?"auto":e.propsSize&&e.propsSize.width,height:typeof(e.propsSize&&e.propsSize.height)>"u"?"auto":e.propsSize&&e.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},e.onResizeStart=e.onResizeStart.bind(e),e.onMouseMove=e.onMouseMove.bind(e),e.onMouseUp=e.onMouseUp.bind(e),e}return Object.defineProperty(l.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||Zgc},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"size",{get:function(){var t=0,e=0;if(this.resizable&&this.window){var d=this.resizable.offsetWidth,b=this.resizable.offsetHeight,o=this.resizable.style.position;o!=="relative"&&(this.resizable.style.position="relative"),t=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:d,e=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:b,this.resizable.style.position=o}return{width:t,height:e}},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"sizeStyle",{get:function(){var t=this,e=this.props.size,d=function(n){if(typeof t.state[n]>"u"||t.state[n]==="auto")return"auto";if(t.propsSize&&t.propsSize[n]&&Wt(t.propsSize[n].toString(),"%")){if(Wt(t.state[n].toString(),"%"))return t.state[n].toString();var G=t.getParentSize(),X=Number(t.state[n].toString().replace("px","")),i=X/G[n]*100;return i+"%"}return qh(t.state[n])},b=e&&typeof e.width<"u"&&!this.state.isResizing?qh(e.width):d("width"),o=e&&typeof e.height<"u"&&!this.state.isResizing?qh(e.height):d("height");return{width:b,height:o}},enumerable:!1,configurable:!0}),l.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var t=this.appendBase();if(!t)return{width:0,height:0};var e=!1,d=this.parentNode.style.flexWrap;d!=="wrap"&&(e=!0,this.parentNode.style.flexWrap="wrap"),t.style.position="relative",t.style.minWidth="100%";var b={width:t.offsetWidth,height:t.offsetHeight};return e&&(this.parentNode.style.flexWrap=d),this.removeBase(t),b},l.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},l.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},l.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var t=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:t.flexBasis!=="auto"?t.flexBasis:void 0})}},l.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},l.prototype.createSizeForCssProperty=function(t,e){var d=this.propsSize&&this.propsSize[e];return this.state[e]==="auto"&&this.state.original[e]===t&&(typeof d>"u"||d==="auto")?"auto":t},l.prototype.calculateNewMaxFromBoundary=function(t,e){var d=this.props.boundsByDirection,b=this.state.direction,o=d&&U0("left",b),n=d&&U0("top",b),G,X;if(this.props.bounds==="parent"){var i=this.parentNode;i&&(G=o?this.resizableRight-this.parentLeft:i.offsetWidth+(this.parentLeft-this.resizableLeft),X=n?this.resizableBottom-this.parentTop:i.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(G=o?this.resizableRight:this.window.innerWidth-this.resizableLeft,X=n?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(G=o?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),X=n?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return G&&Number.isFinite(G)&&(t=t&&t<G?t:G),X&&Number.isFinite(X)&&(e=e&&e<X?e:X),{maxWidth:t,maxHeight:e}},l.prototype.calculateNewSizeFromDirection=function(t,e){var d=this.props.scale||1,b=this.props.resizeRatio||1,o=this.state,n=o.direction,G=o.original,X=this.props,i=X.lockAspectRatio,a=X.lockAspectRatioExtraHeight,m=X.lockAspectRatioExtraWidth,x=G.width,s=G.height,r=a||0,g=m||0;return U0("right",n)&&(x=G.width+(t-G.x)*b/d,i&&(s=(x-g)/this.ratio+r)),U0("left",n)&&(x=G.width-(t-G.x)*b/d,i&&(s=(x-g)/this.ratio+r)),U0("bottom",n)&&(s=G.height+(e-G.y)*b/d,i&&(x=(s-r)*this.ratio+g)),U0("top",n)&&(s=G.height-(e-G.y)*b/d,i&&(x=(s-r)*this.ratio+g)),{newWidth:x,newHeight:s}},l.prototype.calculateNewSizeFromAspectRatio=function(t,e,d,b){var o=this.props,n=o.lockAspectRatio,G=o.lockAspectRatioExtraHeight,X=o.lockAspectRatioExtraWidth,i=typeof b.width>"u"?10:b.width,a=typeof d.width>"u"||d.width<0?t:d.width,m=typeof b.height>"u"?10:b.height,x=typeof d.height>"u"||d.height<0?e:d.height,s=G||0,r=X||0;if(n){var g=(m-s)*this.ratio+r,Z=(x-s)*this.ratio+r,H=(i-r)/this.ratio+s,R=(a-r)/this.ratio+s,W=Math.max(i,g),I=Math.min(a,Z),B=Math.max(m,H),p=Math.min(x,R);t=JB(t,W,I),e=JB(e,B,p)}else t=JB(t,i,a),e=JB(e,m,x);return{newWidth:t,newHeight:e}},l.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var t=this.parentNode;if(t){var e=t.getBoundingClientRect();this.parentLeft=e.left,this.parentTop=e.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var d=this.props.bounds.getBoundingClientRect();this.targetLeft=d.left,this.targetTop=d.top}if(this.resizable){var b=this.resizable.getBoundingClientRect(),o=b.left,n=b.top,G=b.right,X=b.bottom;this.resizableLeft=o,this.resizableRight=G,this.resizableTop=n,this.resizableBottom=X}},l.prototype.onResizeStart=function(t,e){if(!(!this.resizable||!this.window)){var d=0,b=0;if(t.nativeEvent&&Hgc(t.nativeEvent)){if(d=t.nativeEvent.clientX,b=t.nativeEvent.clientY,t.nativeEvent.which===3)return}else t.nativeEvent&&hB(t.nativeEvent)&&(d=t.nativeEvent.touches[0].clientX,b=t.nativeEvent.touches[0].clientY);if(this.props.onResizeStart&&this.resizable){var o=this.props.onResizeStart(t,e,this.resizable);if(o===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var n,G=this.window.getComputedStyle(this.resizable);if(G.flexBasis!=="auto"){var X=this.parentNode;if(X){var i=this.window.getComputedStyle(X).flexDirection;this.flexDir=i.startsWith("row")?"row":"column",n=G.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var a={original:{x:d,y:b,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Bo(Bo({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(t.target).cursor||"auto"}),direction:e,flexBasis:n};this.setState(a)}},l.prototype.onMouseMove=function(t){if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&hB(t))try{t.preventDefault(),t.stopPropagation()}catch{}var e=this.props,d=e.maxWidth,b=e.maxHeight,o=e.minWidth,n=e.minHeight,G=hB(t)?t.touches[0].clientX:t.clientX,X=hB(t)?t.touches[0].clientY:t.clientY,i=this.state,a=i.direction,m=i.original,x=i.width,s=i.height,r=this.getParentSize(),g=Rgc(r,this.window.innerWidth,this.window.innerHeight,d,b,o,n);d=g.maxWidth,b=g.maxHeight,o=g.minWidth,n=g.minHeight;var Z=this.calculateNewSizeFromDirection(G,X),H=Z.newHeight,R=Z.newWidth,W=this.calculateNewMaxFromBoundary(d,b),I=this.calculateNewSizeFromAspectRatio(R,H,{width:W.maxWidth,height:W.maxHeight},{width:o,height:n});if(R=I.newWidth,H=I.newHeight,this.props.grid){var B=yK(R,this.props.grid[0]),p=yK(H,this.props.grid[1]),y=this.props.snapGap||0;R=y===0||Math.abs(B-R)<=y?B:R,H=y===0||Math.abs(p-H)<=y?p:H}this.props.snap&&this.props.snap.x&&(R=VK(R,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(H=VK(H,this.props.snap.y,this.props.snapGap));var h={width:R-m.width,height:H-m.height};if(x&&typeof x=="string"){if(Wt(x,"%")){var C=R/r.width*100;R=C+"%"}else if(Wt(x,"vw")){var J=R/this.window.innerWidth*100;R=J+"vw"}else if(Wt(x,"vh")){var f=R/this.window.innerHeight*100;R=f+"vh"}}if(s&&typeof s=="string"){if(Wt(s,"%")){var C=H/r.height*100;H=C+"%"}else if(Wt(s,"vw")){var J=H/this.window.innerWidth*100;H=J+"vw"}else if(Wt(s,"vh")){var f=H/this.window.innerHeight*100;H=f+"vh"}}var k={width:this.createSizeForCssProperty(R,"width"),height:this.createSizeForCssProperty(H,"height")};this.flexDir==="row"?k.flexBasis=k.width:this.flexDir==="column"&&(k.flexBasis=k.height),this.setState(k),this.props.onResize&&this.props.onResize(t,a,this.resizable,h)}},l.prototype.onMouseUp=function(t){var e=this.state,d=e.isResizing,b=e.direction,o=e.original;if(!(!d||!this.resizable)){var n={width:this.size.width-o.width,height:this.size.height-o.height};this.props.onResizeStop&&this.props.onResizeStop(t,b,this.resizable,n),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Bo(Bo({},this.state.backgroundStyle),{cursor:"auto"})})}},l.prototype.updateSize=function(t){this.setState({width:t.width,height:t.height})},l.prototype.renderResizer=function(){var t=this,e=this.props,d=e.enable,b=e.handleStyles,o=e.handleClasses,n=e.handleWrapperStyle,G=e.handleWrapperClass,X=e.handleComponent;if(!d)return null;var i=Object.keys(d).map(function(a){return d[a]!==!1?Ai.createElement(IK,{key:a,direction:a,onResizeStart:t.onResizeStart,replaceStyles:b&&b[a],className:o&&o[a]},X&&X[a]?X[a]:null):null});return Ai.createElement("div",{className:G,style:n},i)},l.prototype.render=function(){var t=this,e=Object.keys(this.props).reduce(function(o,n){return Igc.indexOf(n)!==-1||(o[n]=t.props[n]),o},{}),d=Bo(Bo(Bo({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(d.flexBasis=this.state.flexBasis);var b=this.props.as||"div";return Ai.createElement(b,Bo({ref:this.ref,style:d,className:this.props.className},e),this.state.isResizing&&Ai.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},l.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},l})(Ai.PureComponent);var zK=u(Y(),1);var SK=u(Y(),1),$h=u(nc(),1);var pb=u(Y(),1),hK=u(dc(),1),Wgc=()=>{},yn={bottom:"bottom",corner:"corner"};function YK({axis:c,fadeTimeout:l=180,onResize:t=Wgc,position:e=yn.bottom,showPx:d=!1}){let[b,o]=(0,hK.useResizeObserver)(),n=!!c,[G,X]=(0,pb.useState)(!1),[i,a]=(0,pb.useState)(!1),{width:m,height:x}=o,s=(0,pb.useRef)(x),r=(0,pb.useRef)(m),g=(0,pb.useRef)(void 0),Z=(0,pb.useCallback)(()=>{let R=()=>{n||(X(!1),a(!1))};g.current&&window.clearTimeout(g.current),g.current=window.setTimeout(R,l)},[l,n]);return(0,pb.useEffect)(()=>{if(!(m!==null||x!==null))return;let W=m!==r.current,I=x!==s.current;if(!(!W&&!I)){if(m&&!r.current&&x&&!s.current){r.current=m,s.current=x;return}W&&(X(!0),r.current=m),I&&(a(!0),s.current=x),t({width:m,height:x}),Z()}},[m,x,t,Z]),{label:pgc({axis:c,height:x,moveX:G,moveY:i,position:e,showPx:d,width:m}),resizeListener:b}}function pgc({axis:c,height:l,moveX:t=!1,moveY:e=!1,position:d=yn.bottom,showPx:b=!1,width:o}){if(!t&&!e)return;if(d===yn.corner)return`${o} x ${l}`;let n=b?" px":"";if(c){if(c==="x"&&t)return`${o}${n}`;if(c==="y"&&e)return`${l}${n}`}if(t&&e)return`${o} x ${l}`;if(t)return`${o}${n}`;if(e)return`${l}${n}`}var FK=N("div",{target:"e1wq7y4k3"})({name:"1cd7zoc",styles:"bottom:0;box-sizing:border-box;left:0;pointer-events:none;position:absolute;right:0;top:0"}),vK=N("div",{target:"e1wq7y4k2"})({name:"ajymcs",styles:"align-items:center;box-sizing:border-box;display:inline-flex;justify-content:center;opacity:0;pointer-events:none;transition:opacity 120ms linear"}),NK=N("div",{target:"e1wq7y4k1"})("background:",D.theme.foreground,";border-radius:",w.radiusSmall,";box-sizing:border-box;font-family:",fl("default.fontFamily"),";font-size:12px;color:",D.theme.foregroundInverted,";padding:4px 8px;position:relative;"),fK=N(Jt,{target:"e1wq7y4k0"})("&&&{color:",D.theme.foregroundInverted,";display:block;font-size:13px;line-height:1.4;white-space:nowrap;}");var FB=u(V(),1),vB=4,Bgc=vB*2.5;function ygc({label:c,position:l=yn.corner,zIndex:t=1e3,...e},d){let b=!!c,o=l===yn.bottom,n=l===yn.corner;if(!b)return null;let G={opacity:b?1:void 0,zIndex:t},X={};return o&&(G={...G,position:"absolute",bottom:Bgc*-1,left:"50%",transform:"translate(-50%, 0)"},X={transform:"translate(0, 100%)"}),n&&(G={...G,position:"absolute",top:vB,right:(0,$h.isRTL)()?void 0:vB,left:(0,$h.isRTL)()?vB:void 0}),(0,FB.jsx)(vK,{"aria-hidden":"true",className:"components-resizable-tooltip__tooltip-wrapper",ref:d,style:G,...e,children:(0,FB.jsx)(NK,{className:"components-resizable-tooltip__tooltip",style:X,children:(0,FB.jsx)(fK,{as:"span",children:c})})})}var Vgc=(0,SK.forwardRef)(ygc),kK=Vgc;var NB=u(V(),1),Cgc=()=>{};function Jgc({axis:c,className:l,fadeTimeout:t=180,isVisible:e=!0,labelRef:d,onResize:b=Cgc,position:o=yn.bottom,showPx:n=!0,zIndex:G=1e3,...X},i){let{label:a,resizeListener:m}=YK({axis:c,fadeTimeout:t,onResize:b,showPx:n,position:o});if(!e)return null;let x=Q("components-resize-tooltip",l);return(0,NB.jsxs)(FK,{"aria-hidden":"true",className:x,ref:i,...X,children:[m,(0,NB.jsx)(kK,{"aria-hidden":X["aria-hidden"],label:a,position:o,ref:d,zIndex:G})]})}var hgc=(0,zK.forwardRef)(Jgc),AK=hgc;var Lr=u(V(),1),QG="components-resizable-box__handle",fB="components-resizable-box__side-handle",SB="components-resizable-box__corner-handle",OK={top:Q(QG,fB,"components-resizable-box__handle-top"),right:Q(QG,fB,"components-resizable-box__handle-right"),bottom:Q(QG,fB,"components-resizable-box__handle-bottom"),left:Q(QG,fB,"components-resizable-box__handle-left"),topLeft:Q(QG,SB,"components-resizable-box__handle-top","components-resizable-box__handle-left"),topRight:Q(QG,SB,"components-resizable-box__handle-top","components-resizable-box__handle-right"),bottomRight:Q(QG,SB,"components-resizable-box__handle-bottom","components-resizable-box__handle-right"),bottomLeft:Q(QG,SB,"components-resizable-box__handle-bottom","components-resizable-box__handle-left")},wG={width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0},Ygc={top:wG,right:wG,bottom:wG,left:wG,topLeft:wG,topRight:wG,bottomRight:wG,bottomLeft:wG};function Fgc({className:c,children:l,showHandle:t=!0,__experimentalShowTooltip:e=!1,__experimentalTooltipProps:d={},...b},o){return(0,Lr.jsxs)(JK,{className:Q("components-resizable-box__container",t&&"has-show-handle",c),handleComponent:Object.fromEntries(Object.keys(OK).map(n=>[n,(0,Lr.jsx)("div",{tabIndex:-1},n)])),handleClasses:OK,handleStyles:Ygc,ref:o,...b,children:[l,e&&(0,Lr.jsx)(AK,{...d})]})}var wK=(0,QK.forwardRef)(Fgc);wK.displayName="ResizableBox";var TK=wK;var kB=u(Y(),1),cY=u(V(),1);function vgc({naturalWidth:c,naturalHeight:l,children:t,isInline:e=!1}){if(kB.Children.count(t)!==1)return null;let d=e?"span":"div",b;return c&&l&&(b=`${c} / ${l}`),(0,cY.jsx)(d,{className:"components-responsive-wrapper",children:(0,cY.jsx)("div",{children:(0,kB.cloneElement)(t,{className:Q("components-responsive-wrapper__content",t.props.className),style:{...t.props.style,aspectRatio:b}})})})}var DK=vgc;var pt=u(Y(),1),j0=u(dc(),1),vl=u(V(),1),LK=function(){let{MutationObserver:c}=window;if(!c||!document.body||!window.parent)return;function l(){let d=document.body.getBoundingClientRect();window.parent.postMessage({action:"resize",width:d.width,height:d.height},"*")}new c(l).observe(document.body,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}),window.addEventListener("load",l,!0);function e(d){d.style&&["width","height","minHeight","maxHeight"].forEach(function(b){/^\\d+(vw|vh|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)$/.test(d.style[b])&&(d.style[b]="")})}Array.prototype.forEach.call(document.querySelectorAll("[style]"),e),Array.prototype.forEach.call(document.styleSheets,function(d){Array.prototype.forEach.call(d.cssRules||d.rules,e)}),document.body.style.position="absolute",document.body.style.width="100%",document.body.setAttribute("data-resizable-iframe-connected",""),l(),window.addEventListener("resize",l,!0)},UK=`
	body {
		margin: 0;
	}
	html,
	body,
	body > div {
		width: 100%;
	}
	html.wp-has-aspect-ratio,
	body.wp-has-aspect-ratio,
	body.wp-has-aspect-ratio > div,
	body.wp-has-aspect-ratio > div iframe {
		width: 100%;
		height: 100%;
		overflow: hidden; /* If it has an aspect ratio, it shouldn't scroll. */
	}
	body > div > * {
		margin-top: 0 !important; /* Has to have !important to override inline styles. */
		margin-bottom: 0 !important;
	}
`;function Ngc({html:c,title:l,type:t,styles:e,scripts:d}){let b=(0,vl.jsxs)("html",{lang:document.documentElement.lang,className:t,children:[(0,vl.jsxs)("head",{children:[(0,vl.jsx)("title",{children:l}),(0,vl.jsx)("style",{dangerouslySetInnerHTML:{__html:UK}}),e.map((o,n)=>(0,vl.jsx)("style",{dangerouslySetInnerHTML:{__html:o}},n))]}),(0,vl.jsxs)("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:t,children:[(0,vl.jsx)("div",{dangerouslySetInnerHTML:{__html:c}}),(0,vl.jsx)("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:`(${LK.toString()})();`}}),d.map(o=>(0,vl.jsx)("script",{src:o},o))]})]});return"<!DOCTYPE html>"+(0,pt.renderToString)(b)}function fgc({html:c="",title:l="",type:t,styles:e=[],scripts:d=[],onFocus:b,tabIndex:o}){let n=(0,pt.useRef)(null),[G,X]=(0,pt.useState)(0),[i,a]=(0,pt.useState)(0),m=(0,pt.useMemo)(()=>Ngc({html:c,title:l,type:t,styles:e,scripts:d}),[c,l,t,e,d]);return(0,pt.useEffect)(()=>{let x=n.current;if(!x)return;function s(Z){if(!x||x.contentWindow!==Z.source)return;let H=Z.data||{};if(typeof H=="string")try{H=JSON.parse(H)}catch{}H.action==="resize"&&(X(H.width),a(H.height))}let r=null;function g(){let Z=x?.ownerDocument?.defaultView??null;Z!==r&&(r?.removeEventListener("message",s),r=Z,r?.addEventListener("message",s))}return g(),x.addEventListener("load",g),()=>{x.removeEventListener("load",g),r?.removeEventListener("message",s)}},[]),(0,vl.jsx)("iframe",{ref:(0,j0.useMergeRefs)([n,(0,j0.useFocusableIframe)()]),title:l,tabIndex:o,className:"components-sandbox",sandbox:"allow-scripts allow-presentation",srcDoc:m,onFocus:b,width:Math.ceil(G),height:Math.ceil(i)})}function Sgc({html:c="",title:l="",type:t,styles:e=[],scripts:d=[],onFocus:b,tabIndex:o}){let n=(0,pt.useRef)(null),[G,X]=(0,pt.useState)(0),[i,a]=(0,pt.useState)(0);function m(){try{return!!n.current?.contentDocument?.body}catch{return!1}}function x(s=!1){if(!m())return;let{contentDocument:r,ownerDocument:g}=n.current;if(!s&&r?.body.getAttribute("data-resizable-iframe-connected")!==null)return;let Z=(0,vl.jsxs)("html",{lang:g.documentElement.lang,className:t,children:[(0,vl.jsxs)("head",{children:[(0,vl.jsx)("title",{children:l}),(0,vl.jsx)("style",{dangerouslySetInnerHTML:{__html:UK}}),e.map((H,R)=>(0,vl.jsx)("style",{dangerouslySetInnerHTML:{__html:H}},R))]}),(0,vl.jsxs)("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:t,children:[(0,vl.jsx)("div",{dangerouslySetInnerHTML:{__html:c}}),(0,vl.jsx)("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:`(${LK.toString()})();`}}),d.map(H=>(0,vl.jsx)("script",{src:H},H))]})]});r.open(),r.write("<!DOCTYPE html>"+(0,pt.renderToString)(Z)),r.close()}return(0,pt.useEffect)(()=>{x();function s(){x(!1)}function r(H){let R=n.current;if(!R||R.contentWindow!==H.source)return;let W=H.data||{};if(typeof W=="string")try{W=JSON.parse(W)}catch{}W.action==="resize"&&(X(W.width),a(W.height))}let g=n.current,Z=g?.ownerDocument?.defaultView;return g?.addEventListener("load",s,!1),Z?.addEventListener("message",r),()=>{g?.removeEventListener("load",s,!1),Z?.removeEventListener("message",r)}},[]),(0,pt.useEffect)(()=>{x()},[l,e,d]),(0,pt.useEffect)(()=>{x(!0)},[c,t]),(0,vl.jsx)("iframe",{ref:(0,j0.useMergeRefs)([n,(0,j0.useFocusableIframe)()]),title:l,tabIndex:o,className:"components-sandbox",sandbox:"allow-scripts allow-same-origin allow-presentation",onFocus:b,width:Math.ceil(G),height:Math.ceil(i)})}function kgc({allowSameOrigin:c=!1,...l}){return c?(0,vl.jsx)(Sgc,{...l}):(0,vl.jsx)(fgc,{...l})}var jK=kgc;var EK=u(eo(),1),Bb=u(Y(),1),lY=u(nc(),1),tpl=u(Ge(),1);var TG=u(V(),1),zgc=6e3;function Agc(c,l){let t=typeof c=="string"?c:(0,Bb.renderToString)(c);(0,Bb.useEffect)(()=>{t&&(0,EK.speak)(t,l)},[t,l])}function Ogc({className:c,children:l,spokenMessage:t=l,politeness:e="polite",actions:d=[],onRemove:b,icon:o=null,explicitDismiss:n=!1,onDismiss:G,listRef:X},i){function a(g){g&&g.preventDefault&&g.preventDefault(),X?.current?.focus(),G?.(),b?.()}function m(g,Z){g.stopPropagation(),b?.(),Z&&Z(g)}Agc(t,e);let x=(0,Bb.useRef)({onDismiss:G,onRemove:b});(0,Bb.useLayoutEffect)(()=>{x.current={onDismiss:G,onRemove:b}}),(0,Bb.useEffect)(()=>{let g=setTimeout(()=>{n||(x.current.onDismiss?.(),x.current.onRemove?.())},zgc);return()=>clearTimeout(g)},[n]);let s=Q(c,"components-snackbar",{"components-snackbar-explicit-dismiss":!!n});d&&d.length>1&&(d=[d[0]]);let r=Q("components-snackbar__content",{"components-snackbar__content-with-icon":!!o});return(0,TG.jsx)("div",{ref:i,className:s,onClick:n?void 0:a,tabIndex:0,role:n?void 0:"button",onKeyPress:n?void 0:a,"aria-label":n?void 0:(0,lY.__)("Dismiss this notice"),"data-testid":"snackbar",children:(0,TG.jsxs)("div",{className:r,children:[o&&(0,TG.jsx)("div",{className:"components-snackbar__icon",children:o}),l,d.map(({label:g,onClick:Z,url:H,openInNewTab:R=!1},W)=>H!==void 0&&R?(0,TG.jsx)(vp,{href:H,onClick:I=>m(I,Z),className:"components-snackbar__action",children:g},W):(0,TG.jsx)(lc,{__next40pxDefaultSize:!0,href:H,variant:"link",onClick:I=>m(I,Z),className:"components-snackbar__action",children:g},W)),n&&(0,TG.jsx)("span",{role:"button","aria-label":(0,lY.__)("Dismiss this notice"),tabIndex:0,className:"components-snackbar__dismiss-button",onClick:a,onKeyPress:a,children:"\u2715"})]})})}var MK=(0,Bb.forwardRef)(Ogc);MK.displayName="Snackbar";var zB=MK;var PK=u(dc(),1),KK=u(Y(),1);var Oi=u(V(),1),Qgc={init:{height:0,opacity:0},open:{height:"auto",opacity:1,transition:{height:{type:"tween",duration:.3,ease:[0,0,.2,1]},opacity:{type:"tween",duration:.25,delay:.05,ease:[0,0,.2,1]}}},exit:{opacity:0,transition:{type:"tween",duration:.1,ease:[0,0,.2,1]}}};function wgc({notices:c,className:l,children:t,onRemove:e}){let d=(0,KK.useRef)(null),b=(0,PK.useReducedMotion)();l=Q("components-snackbar-list",l);let o=n=>()=>e?.(n.id);return(0,Oi.jsxs)("div",{className:l,tabIndex:-1,ref:d,"data-testid":"snackbar-list",children:[t,(0,Oi.jsx)(gu,{children:c.map(n=>{let{content:G,...X}=n;return(0,Oi.jsx)(tG.div,{layout:b?!1:"position",style:{width:"100%"},initial:"init",animate:"open",exit:"exit",variants:b?void 0:Qgc,children:(0,Oi.jsx)("div",{className:"components-snackbar-list__notice-container",children:(0,Oi.jsx)(zB,{...X,onRemove:o(n),listRef:d,children:n.content})})},n.id)})})]})}var _K=wgc;var yo=u(Y(),1),AB=u(dc(),1),$K=u(nc(),1);var Qi=u(V(),1),qK=c=>{if(!(typeof c>"u"||c===null))return c.match(/^tab-panel-[0-9]*-(.*)/)?.[1]},Tgc=({className:c,children:l,tabs:t,selectOnMove:e=!0,initialTabName:d,orientation:b="horizontal",activeClass:o="is-active",onSelect:n},G)=>{let X=(0,AB.useInstanceId)(tY,"tab-panel"),i=(0,yo.useCallback)(g=>{if(!(typeof g>"u"))return`${X}-${g}`},[X]),a=mX({setSelectedId:g=>{if(typeof g>"u"||g===null)return;let Z=t.find(R=>i(R.name)===g);if(Z?.disabled||Z===s)return;let H=qK(g);typeof H>"u"||n?.(H)},orientation:b,selectOnMove:e,defaultSelectedId:i(d),rtl:(0,$K.isRTL)()}),m=qK(xc(a,"selectedId")),x=(0,yo.useCallback)(g=>{a.setState("selectedId",i(g))},[i,a]),s=t.find(({name:g})=>g===m),r=(0,AB.usePrevious)(m);return(0,yo.useEffect)(()=>{r!==m&&m===d&&m&&n?.(m)},[m,d,n,r]),(0,yo.useLayoutEffect)(()=>{if(s)return;let g=t.find(Z=>Z.name===d);if(!(d&&!g))if(g&&!g.disabled)x(g.name);else{let Z=t.find(H=>!H.disabled);Z&&x(Z.name)}},[t,s,d,X,x]),(0,yo.useEffect)(()=>{if(!s?.disabled)return;let g=t.find(Z=>!Z.disabled);g&&x(g.name)},[t,s?.disabled,x,X]),(0,Qi.jsxs)("div",{className:c,ref:G,children:[(0,Qi.jsx)(Xa,{store:a,className:"components-tab-panel__tabs",children:t.map(g=>(0,Qi.jsx)(na,{id:i(g.name),className:Q("components-tab-panel__tabs-item",g.className,{[o]:g.name===m}),disabled:g.disabled,"aria-controls":`${i(g.name)}-view`,render:(0,Qi.jsx)(lc,{__next40pxDefaultSize:!0,icon:g.icon,label:g.icon&&g.title,showTooltip:!!g.icon}),children:!g.icon&&g.title},g.name))}),s&&(0,Qi.jsx)(xa,{id:`${i(s.name)}-view`,store:a,tabId:i(s.name),className:"components-tab-panel__tab-content",children:l(s)})]})},tY=(0,yo.forwardRef)(Tgc);tY.displayName="TabPanel";var c_=tY;var l_=u(dc(),1),t_=u(Y(),1);var eY=u(V(),1);function Dgc(c,l){let{__nextHasNoMarginBottom:t,__next40pxDefaultSize:e=!1,label:d,hideLabelFromVision:b,value:o,help:n,id:G,className:X,onChange:i,type:a="text",...m}=c,x=(0,l_.useInstanceId)(dY,"inspector-text-control",G),s=r=>i(r.target.value);return Lc({componentName:"TextControl",size:void 0,__next40pxDefaultSize:e}),(0,eY.jsx)(Dc,{label:d,hideLabelFromVision:b,id:x,help:n,className:X,children:(0,eY.jsx)("input",{className:Q("components-text-control__input",{"is-next-40px-default-size":e}),type:a,id:x,value:o,onChange:s,"aria-describedby":n?x+"__help":void 0,ref:l,...m})})}var dY=(0,t_.forwardRef)(Dgc);dY.displayName="TextControl";var OB=dY;var d_=u(dc(),1),b_=u(Y(),1);var Lgc=O("box-shadow:0 0 0 transparent;border-radius:",w.radiusSmall,";border:",w.borderWidth," solid ",D.ui.border,";@media not ( prefers-reduced-motion ){transition:box-shadow 0.1s linear;}",""),Ugc=O("border-color:",D.theme.accent,";box-shadow:0 0 0 calc( ",w.borderWidthFocus," - ",w.borderWidth," ) ",D.theme.accent,";outline:2px solid transparent;",""),e_=N("textarea",{target:"e1w5nnrk0"})("width:100%;display:block;font-family:",fl("default.fontFamily"),";line-height:20px;background:",D.theme.background,";color:",D.theme.foreground,";resize:vertical;padding:9px 11px;min-height:38px;",Lgc,";font-size:",fl("mobileTextMinFontSize"),";",xA("small"),"{font-size:",fl("default.fontSize"),";}&:focus{",Ugc,";}&::-webkit-input-placeholder{color:",D.ui.darkGrayPlaceholder,";}&::-moz-placeholder{color:",D.ui.darkGrayPlaceholder,";}&:-ms-input-placeholder{color:",D.ui.darkGrayPlaceholder,";}.is-dark-theme &{&::-webkit-input-placeholder{color:",D.ui.lightGrayPlaceholder,";}&::-moz-placeholder{color:",D.ui.lightGrayPlaceholder,";}&:-ms-input-placeholder{color:",D.ui.lightGrayPlaceholder,";}}");var bY=u(V(),1);function jgc(c,l){let{__nextHasNoMarginBottom:t,label:e,hideLabelFromVision:d,value:b,help:o,onChange:n,rows:G=4,className:X,...i}=c,m=`inspector-textarea-control-${(0,d_.useInstanceId)(oY)}`,x=r=>n(r.target.value),s=Q("components-textarea-control",X);return(0,bY.jsx)(Dc,{label:e,hideLabelFromVision:d,id:m,help:o,className:s,children:(0,bY.jsx)(e_,{className:"components-textarea-control__input",id:m,rows:G,onChange:x,"aria-describedby":o?m+"__help":void 0,value:b,ref:l,...i})})}var oY=(0,b_.forwardRef)(jgc);oY.displayName="TextareaControl";var QB=oY;var o_=u(Y(),1);var Ur=u(V(),1),n_=c=>{let{text:l="",highlight:t=""}=c,e=t.trim();if(!e)return(0,Ur.jsx)(Ur.Fragment,{children:l});let d=new RegExp(`(${dn(e)})`,"gi");return(0,o_.createInterpolateElement)(l.replace(d,"<mark>$&</mark>"),{mark:(0,Ur.jsx)("mark",{})})};n_.displayName="TextHighlight";var G_=n_;var jr=u(V(),1);function Egc(c){let{children:l}=c;return(0,jr.jsxs)("div",{className:"components-tip",children:[(0,jr.jsx)(Cl,{icon:Q2}),(0,jr.jsx)("p",{children:l})]})}var X_=Egc;var i_=u(Y(),1),a_=u(dc(),1);var wi=u(V(),1);function Mgc({label:c,checked:l,help:t,className:e,onChange:d,disabled:b,__nextHasNoMarginBottom:o,...n},G){function X(s){d(s.target.checked)}let a=`inspector-toggle-control-${(0,a_.useInstanceId)(nY)}`,m,x;return t&&(typeof t=="function"?l!==void 0&&(x=t(l)):x=t,x&&(m=a+"__help")),(0,wi.jsx)(Dc,{id:a,help:x&&(0,wi.jsx)("span",{className:"components-toggle-control__help",children:x}),className:Q("components-toggle-control",e),children:(0,wi.jsxs)(Uc,{justify:"flex-start",spacing:2,children:[(0,wi.jsx)(zp,{id:a,checked:l,onChange:X,"aria-describedby":m,disabled:b,ref:G,...n}),(0,wi.jsx)(Xe,{as:"label",htmlFor:a,className:Q("components-toggle-control__label",{"is-disabled":b}),children:c})]})})}var nY=(0,i_.forwardRef)(Mgc);nY.displayName="ToggleControl";var wB=nY;var jB=u(Y(),1),C_=u(ml(),1);var W_=u(Y(),1);var LB=u(Y(),1);var DB=u(Y(),1),Qpl=u(Ge(),1);var u_=u(Y(),1),m_=(0,u_.createContext)(void 0);m_.displayName="ToolbarContext";var Ze=m_;var TB=u(V(),1);function Pgc({children:c,as:l,...t},e){let d=(0,DB.useContext)(Ze),b=typeof c=="function";if(!b&&!l)return null;let o={...t,ref:e,"data-toolbar-item":!0};return d?(0,TB.jsx)(Dm,{accessibleWhenDisabled:!0,...o,store:d,render:b?c:l&&(0,TB.jsx)(l,{children:c})}):l?(0,TB.jsx)(l,{...o,children:c}):b?c(o):null}var x_=(0,DB.forwardRef)(Pgc);x_.displayName="ToolbarItem";var Vn=x_;var s_=u(V(),1),Kgc=({children:c,className:l})=>(0,s_.jsx)("div",{className:l,children:c}),r_=Kgc;var Er=u(V(),1);function _gc({isDisabled:c,...l}){return{disabled:c,...l}}function qgc(c,l){let{children:t,className:e,containerClassName:d,extraProps:b,isActive:o,title:n,...G}=_gc(c);return(0,LB.useContext)(Ze)?(0,Er.jsx)(Vn,{className:Q("components-toolbar-button",e),...b,...G,ref:l,children:i=>(0,Er.jsx)(lc,{size:"compact",label:n,isPressed:o,...i,children:t})}):(0,Er.jsx)(r_,{className:d,children:(0,Er.jsx)(lc,{ref:l,icon:G.icon,size:"compact",label:n,shortcut:G.shortcut,"data-subscript":G.subscript,onClick:i=>{i.stopPropagation(),G.onClick&&G.onClick(i)},className:Q("components-toolbar__control",e),isPressed:o,accessibleWhenDisabled:!0,"data-toolbar-item":!0,...b,...G,children:t})})}var g_=(0,LB.forwardRef)(qgc);g_.displayName="ToolbarButton";var Mr=g_;var Z_=u(V(),1),$gc=({className:c,children:l,...t})=>(0,Z_.jsx)("div",{className:c,...t,children:l}),H_=$gc;var R_=u(Y(),1);var GY=u(V(),1);function cZc({controls:c=[],toggleProps:l,...t}){let e=(0,R_.useContext)(Ze),d=b=>(0,GY.jsx)(mb,{controls:c,toggleProps:{...b,"data-toolbar-item":!0},...t});return e?(0,GY.jsx)(Vn,{...l,children:d}):d(l)}var I_=cZc;var Pr=u(V(),1);function lZc(c){return Array.isArray(c)&&Array.isArray(c[0])}function tZc({controls:c=[],children:l,className:t,isCollapsed:e,title:d,...b}){let o=(0,W_.useContext)(Ze);if((!c||!c.length)&&!l)return null;let n=Q(o?"components-toolbar-group":"components-toolbar",t),G;return lZc(c)?G=c:G=[c],e?(0,Pr.jsx)(I_,{label:d,controls:G,className:n,children:l,...b}):(0,Pr.jsxs)(H_,{className:n,...b,children:[G?.flatMap((X,i)=>X.map((a,m)=>(0,Pr.jsx)(Mr,{containerClassName:i>0&&m===0?"has-left-divider":void 0,...a},[i,m].join()))),l]})}var Kr=tZc;var p_=u(Y(),1),B_=u(nc(),1);var XY=u(V(),1);function eZc({label:c,...l},t){let e=xX({focusLoop:!0,rtl:(0,B_.isRTL)()});return(0,XY.jsx)(Ze.Provider,{value:e,children:(0,XY.jsx)(fg,{ref:t,"aria-label":c,store:e,...l})})}var y_=(0,p_.forwardRef)(eZc);y_.displayName="ToolbarContainer";var V_=y_;var UB=u(V(),1);function dZc({className:c,label:l,variant:t,...e},d){let b=t!==void 0,o=(0,jB.useMemo)(()=>b?{}:{DropdownMenu:{variant:"toolbar"},Dropdown:{variant:"toolbar"},Menu:{variant:"toolbar"}},[b]);if(!l){(0,C_.default)("Using Toolbar without label prop",{since:"5.6",alternative:"ToolbarGroup component",link:"https://developer.wordpress.org/block-editor/components/toolbar/"});let{title:G,...X}=e;return(0,UB.jsx)(Kr,{isCollapsed:!1,...X,className:c})}let n=Q("components-accessible-toolbar",c,t&&`is-${t}`);return(0,UB.jsx)(DX,{value:o,children:(0,UB.jsx)(V_,{className:n,label:l,ref:d,...e})})}var J_=(0,jB.forwardRef)(dZc);J_.displayName="Toolbar";var iY=J_;var MB=u(Y(),1);var EB=u(V(),1);function bZc(c,l){return(0,MB.useContext)(Ze)?(0,EB.jsx)(Vn,{ref:l,...c.toggleProps,children:e=>(0,EB.jsx)(mb,{...c,popoverProps:{...c.popoverProps},toggleProps:e})}):(0,EB.jsx)(mb,{...c})}var h_=(0,MB.forwardRef)(bZc);h_.displayName="ToolbarDropdownMenu";var aY=h_;var $r=u(eo(),1);var Ll=u(nc(),1);var qr=u(Y(),1);var Ti={columns:c=>O("grid-template-columns:",`repeat( ${c}, minmax(0, 1fr) )`,";",""),spacing:O("column-gap:",z(4),";row-gap:",z(4),";",""),item:{fullWidth:{name:"18iuzk9",styles:"grid-column:1/-1"}}},Y_=c=>O(Ti.columns(c)," ",Ti.spacing," border-top:",w.borderWidth," solid ",D.gray[300],";margin-top:-1px;padding:",z(4),";",""),F_=c=>O(">div:not( :first-of-type ){display:grid;",Ti.columns(c)," ",Ti.spacing," ",Ti.item.fullWidth,";}",""),v_={name:"huufmu",styles:">div:not( :first-of-type ){display:none;}"},N_=O(Ti.item.fullWidth," gap:",z(2),";.components-dropdown-menu{margin:",z(-1)," 0;line-height:0;}&&&& .components-dropdown-menu__toggle{padding:0;min-width:",z(6),";}",""),f_=O("font-size:inherit;font-weight:",w.fontWeightMedium,";line-height:normal;&&{margin:0;}",""),S_=O(Ti.item.fullWidth,"&>div,&>fieldset{padding-bottom:0;margin-bottom:0;max-width:100%;}&& ",hI,"{margin-bottom:0;",YI,":last-child{margin-bottom:0;}}",bb,"{margin-bottom:0;}",""),k_={name:"eivff4",styles:"display:none"},z_={name:"16gsvie",styles:"min-width:200px"},uY=N("span",{target:"ews648u0"})("color:",D.theme.accentDarker10,";font-size:11px;font-weight:",w.fontWeightMedium,";line-height:1.4;",Fc({marginLeft:z(3)})," text-transform:uppercase;"),A_=O("color:",D.gray[900],";&&[aria-disabled='true']{color:",D.gray[700],";opacity:1;&:hover{color:",D.gray[700],";}",uY,"{opacity:0.3;}}","");var PB=u(Y(),1),_r=()=>{},Di=(0,PB.createContext)({menuItems:{default:{},optional:{}},hasMenuItems:!1,isResetting:!1,shouldRenderPlaceholderItems:!1,registerPanelItem:_r,deregisterPanelItem:_r,flagItemCustomization:_r,registerResetAllFilter:_r,deregisterResetAllFilter:_r,areAllOptionalControlsHidden:!0});Di.displayName="ToolsPanelContext";var KB=()=>(0,PB.useContext)(Di);function O_(c){let{className:l,headingLevel:t=2,...e}=cc(c,"ToolsPanelHeader"),d=Xc(),b=(0,qr.useMemo)(()=>d(N_,l),[l,d]),o=(0,qr.useMemo)(()=>d(z_),[d]),n=(0,qr.useMemo)(()=>d(f_),[d]),G=(0,qr.useMemo)(()=>d(A_),[d]),{menuItems:X,hasMenuItems:i,areAllOptionalControlsHidden:a}=KB();return{...e,areAllOptionalControlsHidden:a,defaultControlsItemClassName:G,dropdownMenuClassName:o,hasMenuItems:i,headingClassName:n,headingLevel:t,menuItems:X,className:b}}var Dl=u(V(),1),oZc=({itemClassName:c,items:l,toggleItem:t})=>{if(!l.length)return null;let e=(0,Dl.jsx)(uY,{"aria-hidden":!0,children:(0,Ll.__)("Reset")});return(0,Dl.jsx)(Dl.Fragment,{children:l.map(([d,b])=>b?(0,Dl.jsx)(Wn,{className:c,role:"menuitem",label:(0,Ll.sprintf)((0,Ll.__)("Reset %s"),d),onClick:()=>{t(d),(0,$r.speak)((0,Ll.sprintf)((0,Ll.__)("%s reset to default"),d),"assertive")},suffix:e,children:d},d):(0,Dl.jsx)(Wn,{icon:jt,className:c,role:"menuitemcheckbox",isSelected:!0,"aria-disabled":!0,children:d},d))})},nZc=({items:c,toggleItem:l})=>c.length?(0,Dl.jsx)(Dl.Fragment,{children:c.map(([t,e])=>{let d=e?(0,Ll.sprintf)((0,Ll.__)("Hide and reset %s"),t):(0,Ll.sprintf)((0,Ll._x)("Show %s","input control"),t);return(0,Dl.jsx)(Wn,{icon:e?jt:null,isSelected:e,label:d,onClick:()=>{e?(0,$r.speak)((0,Ll.sprintf)((0,Ll.__)("%s hidden and reset to default"),t),"assertive"):(0,$r.speak)((0,Ll.sprintf)((0,Ll.__)("%s is now visible"),t),"assertive"),l(t)},role:"menuitemcheckbox",children:t},t)})}):null,GZc=(c,l)=>{let{areAllOptionalControlsHidden:t,defaultControlsItemClassName:e,dropdownMenuClassName:d,hasMenuItems:b,headingClassName:o,headingLevel:n=2,label:G,menuItems:X,resetAll:i,toggleItem:a,dropdownMenuProps:m,...x}=O_(c);if(!G)return null;let s=Object.entries(X?.default||{}),r=Object.entries(X?.optional||{}),g=t?$o:Js,Z=(0,Ll.sprintf)((0,Ll._x)("%s options","Button label to reveal tool panel options"),G),H=t?(0,Ll.__)("All options are currently hidden"):void 0,R=[...s,...r].some(([,W])=>W);return(0,Dl.jsxs)(Uc,{...x,ref:l,children:[(0,Dl.jsx)(td,{level:n,className:o,children:G}),b&&(0,Dl.jsx)(mb,{...m,icon:g,label:Z,menuProps:{className:d},toggleProps:{size:"small",description:H},children:()=>(0,Dl.jsxs)(Dl.Fragment,{children:[(0,Dl.jsxs)(fr,{label:G,children:[(0,Dl.jsx)(oZc,{items:s,toggleItem:a,itemClassName:e}),(0,Dl.jsx)(nZc,{items:r,toggleItem:a})]}),(0,Dl.jsx)(fr,{children:(0,Dl.jsx)(Wn,{"aria-disabled":!R,variant:"tertiary",onClick:()=>{R&&(i(),(0,$r.speak)((0,Ll.__)("All options reset"),"assertive"))},children:(0,Ll.__)("Reset all")})})]})})]})},XZc=tc(GZc,"ToolsPanelHeader"),xY=XZc;var Gt=u(Y(),1);var Q_=2;function sY(){return{default:{},optional:{}}}function iZc(){return{panelItems:[],menuItemOrder:[],menuItems:sY()}}var w_=({panelItems:c,shouldReset:l,currentMenuItems:t,menuItemOrder:e})=>{let d=sY(),b=sY();return c.forEach(({hasValue:o,isShownByDefault:n,label:G})=>{let X=n?"default":"optional",i=t?.[X]?.[G],a=i||o();d[X][G]=l?!1:a}),e.forEach(o=>{d.default.hasOwnProperty(o)&&(b.default[o]=d.default[o]),d.optional.hasOwnProperty(o)&&(b.optional[o]=d.optional[o])}),Object.keys(d.default).forEach(o=>{b.default.hasOwnProperty(o)||(b.default[o]=d.default[o])}),Object.keys(d.optional).forEach(o=>{b.optional.hasOwnProperty(o)||(b.optional[o]=d.optional[o])}),b};function aZc(c,l){switch(l.type){case"REGISTER_PANEL":{let t=[...c],e=t.findIndex(d=>d.label===l.item.label);return e!==-1&&t.splice(e,1),t.push(l.item),t}case"UNREGISTER_PANEL":{let t=c.findIndex(e=>e.label===l.label);if(t!==-1){let e=[...c];return e.splice(t,1),e}return c}default:return c}}function uZc(c,l){return l.type==="REGISTER_PANEL"?c.includes(l.item.label)?c:[...c,l.item.label]:c}function mZc(c,l){switch(l.type){case"REGISTER_PANEL":case"UNREGISTER_PANEL":return w_({currentMenuItems:c.menuItems,panelItems:c.panelItems,menuItemOrder:c.menuItemOrder,shouldReset:!1});case"RESET_ALL":return w_({panelItems:c.panelItems,menuItemOrder:c.menuItemOrder,shouldReset:!0});case"UPDATE_VALUE":{let t=c.menuItems[l.group][l.label];return l.value===t?c.menuItems:{...c.menuItems,[l.group]:{...c.menuItems[l.group],[l.label]:l.value}}}case"TOGGLE_VALUE":{let t=c.panelItems.find(b=>b.label===l.label);if(!t)return c.menuItems;let e=t.isShownByDefault?"default":"optional";return{...c.menuItems,[e]:{...c.menuItems[e],[l.label]:!c.menuItems[e][l.label]}}}default:return c.menuItems}}function xZc(c,l){let t=aZc(c.panelItems,l),e=uZc(c.menuItemOrder,l),d=mZc({panelItems:t,menuItemOrder:e,menuItems:c.menuItems},l);return{panelItems:t,menuItemOrder:e,menuItems:d}}function sZc(c,l){switch(l.type){case"REGISTER":return[...c,l.filter];case"UNREGISTER":return c.filter(t=>t!==l.filter);default:return c}}var T_=c=>Object.keys(c).length===0;function D_(c){let{className:l,headingLevel:t=2,resetAll:e,panelId:d,hasInnerWrapper:b=!1,shouldRenderPlaceholderItems:o=!1,__experimentalFirstVisibleItemClass:n,__experimentalLastVisibleItemClass:G,...X}=cc(c,"ToolsPanel"),i=(0,Gt.useRef)(!1),a=i.current;(0,Gt.useEffect)(()=>{a&&(i.current=!1)},[a]);let[{panelItems:m,menuItems:x},s]=(0,Gt.useReducer)(xZc,void 0,iZc),[r,g]=(0,Gt.useReducer)(sZc,[]),Z=(0,Gt.useCallback)(L=>{s({type:"REGISTER_PANEL",item:L})},[]),H=(0,Gt.useCallback)(L=>{s({type:"UNREGISTER_PANEL",label:L})},[]),R=(0,Gt.useCallback)(L=>{g({type:"REGISTER",filter:L})},[]),W=(0,Gt.useCallback)(L=>{g({type:"UNREGISTER",filter:L})},[]),I=(0,Gt.useCallback)((L,v,A="default")=>{s({type:"UPDATE_VALUE",group:A,label:v,value:L})},[]),B=(0,Gt.useMemo)(()=>T_(x.default)&&!T_(x.optional)&&Object.values(x.optional).every(L=>!L),[x]),p=Xc(),y=(0,Gt.useMemo)(()=>{let L=b&&F_(Q_),v=B&&v_;return p(Y_(Q_),L,v,l)},[B,l,p,b]),h=(0,Gt.useCallback)(L=>{s({type:"TOGGLE_VALUE",label:L})},[]),C=(0,Gt.useCallback)(()=>{typeof e=="function"&&(i.current=!0,e(r)),s({type:"RESET_ALL"})},[r,e]),J=L=>{let v=x.optional||{};return L.find(S=>S.isShownByDefault||v[S.label])?.label},f=J(m),k=J([...m].reverse()),F=m.length>0,T=(0,Gt.useMemo)(()=>({areAllOptionalControlsHidden:B,deregisterPanelItem:H,deregisterResetAllFilter:W,firstDisplayedItem:f,flagItemCustomization:I,hasMenuItems:F,isResetting:i.current,lastDisplayedItem:k,menuItems:x,panelId:d,registerPanelItem:Z,registerResetAllFilter:R,shouldRenderPlaceholderItems:o,__experimentalFirstVisibleItemClass:n,__experimentalLastVisibleItemClass:G}),[B,H,W,f,I,k,x,d,F,R,Z,o,n,G]);return{...X,headingLevel:t,panelContext:T,resetAllItems:C,toggleItem:h,className:y}}var cg=u(V(),1),rZc=(c,l)=>{let{children:t,label:e,panelContext:d,resetAllItems:b,toggleItem:o,headingLevel:n,dropdownMenuProps:G,...X}=D_(c);return(0,cg.jsx)(mn,{...X,columns:2,ref:l,children:(0,cg.jsxs)(Di.Provider,{value:d,children:[(0,cg.jsx)(xY,{label:e,resetAll:b,toggleItem:o,headingLevel:n,dropdownMenuProps:G}),t]})})},gZc=tc(rZc,"ToolsPanel"),_B=gZc;var rY=u(dc(),1),yb=u(Y(),1);var ZZc=()=>{};function L_(c){let{className:l,hasValue:t,isShownByDefault:e=!1,label:d,panelId:b,resetAllFilter:o=ZZc,onDeselect:n,onSelect:G,...X}=cc(c,"ToolsPanelItem"),{panelId:i,menuItems:a,registerResetAllFilter:m,deregisterResetAllFilter:x,registerPanelItem:s,deregisterPanelItem:r,flagItemCustomization:g,isResetting:Z,shouldRenderPlaceholderItems:H,firstDisplayedItem:R,lastDisplayedItem:W,__experimentalFirstVisibleItemClass:I,__experimentalLastVisibleItemClass:B}=KB(),p=(0,yb.useCallback)(t,[b]),y=(0,yb.useCallback)(o,[b]),h=(0,rY.usePrevious)(i),C=i===b||i===null;(0,yb.useLayoutEffect)(()=>(C&&h!==null&&s({hasValue:p,isShownByDefault:e,label:d,panelId:b}),()=>{(h===null&&i||i===b)&&r(d)}),[i,C,e,d,p,b,h,s,r]),(0,yb.useEffect)(()=>(C&&m(y),()=>{C&&x(y)}),[m,x,y,C]);let J=e?"default":"optional",f=a?.[J]?.[d],k=(0,rY.usePrevious)(f),F=a?.[J]?.[d]!==void 0,T=t();(0,yb.useEffect)(()=>{!e&&!T||g(T,d,J)},[T,J,d,g,e]),(0,yb.useEffect)(()=>{!F||Z||!C||(f&&!T&&!k&&G?.(),!f&&T&&k&&n?.())},[C,f,F,Z,T,k,G,n]);let L=e?a?.[J]?.[d]!==void 0:f,v=Xc(),A=(0,yb.useMemo)(()=>{let S=H&&!L;return v(S_,S&&k_,!S&&l,R===d&&I,W===d&&B)},[L,H,l,v,R,W,I,B,d]);return{...X,isShown:L,shouldRenderPlaceholder:H,className:A}}var gY=u(V(),1),HZc=(c,l)=>{let{children:t,isShown:e,shouldRenderPlaceholder:d,...b}=L_(c);return e?(0,gY.jsx)(ic,{...b,ref:l,children:t}):d?(0,gY.jsx)(ic,{...b,ref:l}):null},RZc=tc(HZc,"ToolsPanelItem"),qB=RZc;var o8=u(R0(),1),t5=u(Y(),1),Nl=u(OI(),1);var c5=u(Y(),1);var $B=u(Y(),1),ZY=(0,$B.createContext)(void 0);ZY.displayName="RovingTabIndexContext";var U_=()=>(0,$B.useContext)(ZY),j_=ZY.Provider;var E_=u(V(),1);function M_({children:c}){let[l,t]=(0,c5.useState)(),e=(0,c5.useMemo)(()=>({lastFocusedElement:l,setLastFocusedElement:t}),[l]);return(0,E_.jsx)(j_,{value:e,children:c})}var eg=u(V(),1);var P_=u(Y(),1),K_=u(V(),1);function IZc({children:c,level:l,positionInSet:t,setSize:e,isExpanded:d,...b},o){return(0,K_.jsx)("tr",{...b,ref:o,role:"row","aria-level":l,"aria-posinset":t,"aria-setsize":e,"aria-expanded":d,children:c})}var __=(0,P_.forwardRef)(IZc);__.displayName="TreeGridRow";var HY=__;var d8=u(Y(),1);var l8=u(Y(),1);var l5=u(Y(),1);var q_=u(V(),1),$_=(0,l5.forwardRef)(function({children:l,as:t,...e},d){let b=(0,l5.useRef)(null),o=d||b,{lastFocusedElement:n,setLastFocusedElement:G}=U_(),X;n&&(X=n===("current"in o?o.current:void 0)?0:-1);let a={ref:o,tabIndex:X,onFocus:m=>G?.(m.target),...e};return typeof l=="function"?l(a):t?(0,q_.jsx)(t,{...a,children:l}):null});$_.displayName="RovingTabIndexItem";var c8=$_;var t8=u(V(),1);function WZc({children:c,...l},t){return(0,t8.jsx)(c8,{ref:t,...l,children:c})}var e8=(0,l8.forwardRef)(WZc);e8.displayName="TreeGridItem";var lg=e8;var E0=u(V(),1);function pZc({children:c,withoutGridItem:l=!1,...t},e){return(0,E0.jsx)("td",{...t,role:"gridcell",children:l?(0,E0.jsx)(E0.Fragment,{children:typeof c=="function"?c({...t,ref:e}):c}):(0,E0.jsx)(lg,{ref:e,children:c})})}var b8=(0,d8.forwardRef)(pZc);b8.displayName="TreeGridCell";var RY=b8;function tg(c){return o8.focus.focusable.find(c,{sequential:!0}).filter(t=>t.closest('[role="row"]')===c)}function BZc({children:c,onExpandRow:l=()=>{},onCollapseRow:t=()=>{},onFocusRow:e=()=>{},applicationAriaLabel:d,...b},o){let n=(0,t5.useCallback)(G=>{let{keyCode:X,metaKey:i,ctrlKey:a,altKey:m}=G;if(i||a||m||![Nl.UP,Nl.DOWN,Nl.LEFT,Nl.RIGHT,Nl.HOME,Nl.END].includes(X))return;G.stopPropagation();let{activeElement:s}=document,{currentTarget:r}=G;if(!s||!r.contains(s))return;let g=s.closest('[role="row"]');if(!g)return;let Z=tg(g),H=Z.indexOf(s),R=H===0,W=R&&(g.getAttribute("data-expanded")==="false"||g.getAttribute("aria-expanded")==="false")&&X===Nl.RIGHT;if([Nl.LEFT,Nl.RIGHT].includes(X)){let I;if(X===Nl.LEFT?I=Math.max(0,H-1):I=Math.min(H+1,Z.length-1),R){if(X===Nl.LEFT){if(g.getAttribute("data-expanded")==="true"||g.getAttribute("aria-expanded")==="true"){t(g),G.preventDefault();return}let B=Math.max(parseInt(g?.getAttribute("aria-level")??"1",10)-1,1),p=Array.from(r.querySelectorAll('[role="row"]')),y=g,h=p.indexOf(g);for(let C=h;C>=0;C--){let J=p[C].getAttribute("aria-level");if(J!==null&&parseInt(J,10)===B){y=p[C];break}}tg(y)?.[0]?.focus()}if(X===Nl.RIGHT){if(g.getAttribute("data-expanded")==="false"||g.getAttribute("aria-expanded")==="false"){l(g),G.preventDefault();return}let B=tg(g);B.length>0&&B[I]?.focus()}G.preventDefault();return}if(W)return;Z[I].focus(),G.preventDefault()}else if([Nl.UP,Nl.DOWN].includes(X)){let I=Array.from(r.querySelectorAll('[role="row"]')),B=I.indexOf(g),p;if(X===Nl.UP?p=Math.max(0,B-1):p=Math.min(B+1,I.length-1),p===B){G.preventDefault();return}let y=tg(I[p]);if(!y||!y.length){G.preventDefault();return}let h=Math.min(H,y.length-1);y[h].focus(),e(G,g,I[p]),G.preventDefault()}else if([Nl.HOME,Nl.END].includes(X)){let I=Array.from(r.querySelectorAll('[role="row"]')),B=I.indexOf(g),p;if(X===Nl.HOME?p=0:p=I.length-1,p===B){G.preventDefault();return}let y=tg(I[p]);if(!y||!y.length){G.preventDefault();return}let h=Math.min(H,y.length-1);y[h].focus(),e(G,g,I[p]),G.preventDefault()}},[l,t,e]);return(0,eg.jsx)(M_,{children:(0,eg.jsx)("div",{role:"application","aria-label":d,children:(0,eg.jsx)("table",{...b,role:"treegrid",onKeyDown:n,ref:o,children:(0,eg.jsx)("tbody",{children:c})})})})}var n8=(0,t5.forwardRef)(BZc);n8.displayName="TreeGrid";var G8=n8;var X8=u(Y(),1),i8=u(ml(),1),a8=u(V(),1);function yZc(c){c.stopPropagation()}var VZc=(0,X8.forwardRef)((c,l)=>((0,i8.default)("wp.components.IsolatedEventContainer",{since:"5.7"}),(0,a8.jsx)("div",{...c,ref:l,onMouseDown:yZc}))),u8=VZc;var x8=u(Y(),1);var IY=N("div",{target:"ebn2ljm1"})("&:not( :first-of-type ){",({offsetAmount:c})=>O({marginInlineStart:c},"",""),";}",({zIndex:c})=>O({zIndex:c},"",""),";"),CZc={name:"rs0gp6",styles:"grid-row-start:1;grid-column-start:1"},m8=N("div",{target:"ebn2ljm0"})("display:inline-grid;grid-auto-flow:column;position:relative;&>",IY,"{position:relative;justify-self:start;",({isLayered:c})=>c?CZc:void 0,";}");var WY=u(V(),1);function JZc(c,l){let{children:t,className:e,isLayered:d=!0,isReversed:b=!1,offset:o=0,...n}=cc(c,"ZStack"),G=NI(t),X=G.length-1,i=G.map((a,m)=>{let x=b?X-m:m,s=d?o*m:o,r=(0,x8.isValidElement)(a)?a.key:m;return(0,WY.jsx)(IY,{offsetAmount:s,zIndex:x,children:a},r)});return(0,WY.jsx)(m8,{...n,className:e,isLayered:d,ref:l,children:i})}var hZc=tc(JZc,"ZStack"),pY=hZc;var e5=u(Y(),1),M0=u(dc(),1),BY=u(OI(),1),yY=u(V(),1),YZc={previous:[{modifier:"ctrlShift",character:"`"},{modifier:"ctrlShift",character:"~"},{modifier:"access",character:"p"}],next:[{modifier:"ctrl",character:"`"},{modifier:"access",character:"n"}]};function VY(c=YZc){let l=(0,e5.useRef)(null),[t,e]=(0,e5.useState)(!1);function d(o){let n=Array.from(l.current?.querySelectorAll('[role="region"][tabindex="-1"]')??[]);if(!n.length)return;let G=n[0],X=l.current?.ownerDocument?.activeElement?.closest('[role="region"][tabindex="-1"]'),i=X?n.indexOf(X):-1;if(i!==-1){let a=i+o;a=a===-1?n.length-1:a,a=a===n.length?0:a,G=n[a]}G.focus(),e(!0)}let b=(0,M0.useRefEffect)(o=>{function n(){e(!1)}return o.addEventListener("click",n),()=>{o.removeEventListener("click",n)}},[e]);return{ref:(0,M0.useMergeRefs)([l,b]),className:t?"is-focusing-regions":"",onKeyDown(o){c.previous.some(({modifier:n,character:G})=>BY.isKeyboardEvent[n](o,G))?d(-1):c.next.some(({modifier:n,character:G})=>BY.isKeyboardEvent[n](o,G))&&d(1)}}}var s8=(0,M0.createHigherOrderComponent)(c=>function({shortcuts:t,...e}){return(0,yY.jsx)("div",{...VY(t),children:(0,yY.jsx)(c,{...e})})},"navigateRegions");var d5=u(dc(),1),CY=u(V(),1),FZc=(0,d5.createHigherOrderComponent)(c=>function(t){let e=(0,d5.useConstrainedTabbing)();return(0,CY.jsx)("div",{ref:e,tabIndex:-1,children:(0,CY.jsx)(c,{...t})})},"withConstrainedTabbing"),r8=FZc;var g8=u(VR(),1),Z8=u(Y(),1),H8=u(dc(),1),b5=u(V(),1),R8=c=>(0,H8.createHigherOrderComponent)(l=>class extends Z8.Component{constructor(e){super(e),this.nodeRef=this.props.node,this.state={fallbackStyles:void 0,grabStylesCompleted:!1},this.bindRef=this.bindRef.bind(this)}bindRef(e){e&&(this.nodeRef=e)}componentDidMount(){this.grabFallbackStyles()}componentDidUpdate(){this.grabFallbackStyles()}grabFallbackStyles(){let{grabStylesCompleted:e,fallbackStyles:d}=this.state;if(this.nodeRef&&!e){let b=c(this.nodeRef,this.props);(0,g8.default)(b,d)||this.setState({fallbackStyles:b,grabStylesCompleted:Object.values(b).every(Boolean)})}}render(){let e=(0,b5.jsx)(l,{...this.props,...this.state.fallbackStyles});return this.props.node?e:(0,b5.jsxs)("div",{ref:this.bindRef,children:[" ",e," "]})}},"withFallbackStyles");var p8=u(Y(),1),Cn=u(W8(),1),o5=u(dc(),1),B8=u(V(),1),vZc=16;function y8(c){return(0,o5.createHigherOrderComponent)(l=>{let t="core/with-filters/"+c,e;function d(){e===void 0&&(e=(0,Cn.applyFilters)(c,l))}class b extends p8.Component{constructor(X){super(X),d()}componentDidMount(){b.instances.push(this),b.instances.length===1&&((0,Cn.addAction)("hookRemoved",t,n),(0,Cn.addAction)("hookAdded",t,n))}componentWillUnmount(){b.instances=b.instances.filter(X=>X!==this),b.instances.length===0&&((0,Cn.removeAction)("hookRemoved",t),(0,Cn.removeAction)("hookAdded",t))}render(){return(0,B8.jsx)(e,{...this.props})}}b.instances=[];let o=(0,o5.debounce)(()=>{e=(0,Cn.applyFilters)(c,l),b.instances.forEach(G=>{G.forceUpdate()})},vZc);function n(G){G===c&&o()}return b},"withFilters")}var V8=u(Y(),1),n5=u(dc(),1),C8=u(ml(),1),JY=u(V(),1);function NZc(c){return c instanceof V8.Component||typeof c=="function"}var J8=(0,n5.createHigherOrderComponent)(c=>{let l=({onFocusReturn:t}={})=>e=>b=>{let o=(0,n5.useFocusReturn)(t);return(0,JY.jsx)("div",{ref:o,children:(0,JY.jsx)(e,{...b})})};if(NZc(c)){let t=c;return l()(t)}return l(c)},"withFocusReturn"),h8=({children:c})=>((0,C8.default)("wp.components.FocusReturnProvider component",{since:"5.7",hint:"This provider is not used anymore. You can just remove it from your codebase"}),c);var P0=u(Y(),1),Y8=u(dc(),1);var G5=u(V(),1),F8=(0,Y8.createHigherOrderComponent)(c=>{function l(d,b){let[o,n]=(0,P0.useState)([]),G=(0,P0.useMemo)(()=>{let i=a=>{let m=a.id?a:{...a,id:Lu()};n(x=>[...x,m])};return{createNotice:i,createErrorNotice:a=>{i({status:"error",content:a})},removeNotice:a=>{n(m=>m.filter(x=>x.id!==a))},removeAllNotices:()=>{n([])}}},[]),X={...d,noticeList:o,noticeOperations:G,noticeUI:o.length>0&&(0,G5.jsx)(xB,{className:"components-with-notices-ui",notices:o,onRemove:G.removeNotice})};return t?(0,G5.jsx)(c,{...X,ref:b}):(0,G5.jsx)(c,{...X})}let t,{render:e}=c;return typeof e=="function"?(t=!0,(0,P0.forwardRef)(l)):l},"withNotices");var p5=u(Y(),1),bq=u(nc(),1);var v8=u(Y(),1),gl=(0,v8.createContext)(void 0);gl.displayName="MenuContext";var a5=u(Y(),1);var N8=z(1),fZc=z(1),hY=z(3),SZc=D.theme.gray[300],kZc=D.theme.gray[200],YY=D.theme.gray[700],zZc=D.theme.gray[100],f8=D.theme.foreground,AZc=`0 0 0 ${w.borderWidth} ${SZc}, ${w.elevationMedium}`,OZc=`0 0 0 ${w.borderWidth} ${f8}`,S8="minmax( 0, max-content ) 1fr",Li=N(WZ,{target:"e1wg7tti13"})("position:relative;z-index:1000000;display:grid;grid-template-columns:",S8,";grid-template-rows:auto;box-sizing:border-box;min-width:160px;max-width:320px;max-height:var( --popover-available-height );padding:",N8,";overscroll-behavior:contain;overflow:auto;background-color:",D.ui.background,";border-radius:",w.radiusMedium,";",c=>O("box-shadow:",c.variant==="toolbar"?OZc:AZc,";",""),"outline:2px solid transparent!important;@media not ( prefers-reduced-motion ){transition-property:transform,opacity;transition-duration:",Lt.SLIDE_DURATION,",",Lt.FADE_DURATION,";transition-timing-function:",Lt.SLIDE_EASING,",",Lt.FADE_EASING,`;will-change:transform,opacity;&:not( [data-submenu] ){opacity:0;&[data-enter]{opacity:1;}&[data-side='bottom']{transform:translateY(
					-`,Lt.SLIDE_DISTANCE,`
				);}&[data-side='top']{transform:translateY(
					`,Lt.SLIDE_DISTANCE,`
				);}&[data-side='left']{transform:translateX(
					`,Lt.SLIDE_DISTANCE,`
				);}&[data-side='right']{transform:translateX(
					-`,Lt.SLIDE_DISTANCE,`
				);}&[data-enter][data-side='bottom'],&[data-enter][data-side='top']{transform:translateY( 0 );}&[data-enter][data-side='left'],&[data-enter][data-side='right']{transform:translateX( 0 );}}}`),FY=O("all:unset;position:relative;min-height:",z(8),";box-sizing:border-box;grid-column:1/-1;display:grid;grid-template-columns:",S8,";align-items:center;@supports ( grid-template-columns: subgrid ){grid-template-columns:subgrid;}font-size:",fl("default.fontSize"),";font-family:inherit;font-weight:normal;line-height:20px;color:",D.theme.foreground,";border-radius:",w.radiusSmall,";padding-block:",fZc,";padding-inline:",hY,";scroll-margin:",N8,";user-select:none;outline:none;&[aria-disabled='true']{color:",D.ui.textDisabled,`;cursor:not-allowed;}&[data-active-item]:not( [data-focus-visible] ):not(
			[aria-disabled='true']
		){background-color:`,D.theme.accent,";color:",D.theme.accentInverted,";}&[data-focus-visible]{box-shadow:0 0 0 1.5px ",D.theme.accent,";outline:2px solid transparent;}&:active,&[data-active]{}",Li,':not(:focus) &:not(:focus)[aria-expanded="true"]{background-color:',zZc,";color:",D.theme.foreground,";}svg{fill:currentColor;}",""),k8=N(Nx,{target:"e1wg7tti12"})(FY,";"),X5=N(yZ,{target:"e1wg7tti11"})(FY,";"),i5=N(VZ,{target:"e1wg7tti10"})(FY,";"),K0=N("span",{target:"e1wg7tti9"})("grid-column:1;",X5,">&,",i5,">&{min-width:",z(6),";}",X5,">&,",i5,">&,&:not( :empty ){margin-inline-end:",z(2),";}display:flex;align-items:center;justify-content:center;color:",YY,";[data-active-item]:not( [data-focus-visible] )>&,[aria-disabled='true']>&{color:inherit;}"),_0=N("div",{target:"e1wg7tti8"})("grid-column:2;display:flex;align-items:center;justify-content:space-between;gap:",z(3),";pointer-events:none;"),q0=N("div",{target:"e1wg7tti7"})("flex:1;display:inline-flex;flex-direction:column;gap:",z(1),";"),$0=N("span",{target:"e1wg7tti6"})("flex:0 1 fit-content;min-width:0;width:fit-content;display:flex;align-items:center;justify-content:center;gap:",z(3),";color:",YY,";[data-active-item]:not( [data-focus-visible] ) *:not(",Li,") &,[aria-disabled='true'] *:not(",Li,") &{color:inherit;}"),z8=N(pZ,{target:"e1wg7tti5"})({name:"49aokf",styles:"display:contents"}),A8=N(BZ,{target:"e1wg7tti4"})("grid-column:1/-1;padding-block-start:",z(3),";padding-block-end:",z(2),";padding-inline:",hY,";"),O8=N(CZ,{target:"e1wg7tti3"})("grid-column:1/-1;border:none;height:",w.borderWidth,";background-color:",c=>c.variant==="toolbar"?f8:kZc,";margin-block:",z(2),";margin-inline:",hY,";outline:2px solid transparent;"),Q8=N(cl,{target:"e1wg7tti2"})("width:",z(1.5),";",Fc({transform:"scaleX(1)"},{transform:"scaleX(-1)"}),";"),w8=N(cn,{target:"e1wg7tti1"})("font-size:",fl("default.fontSize"),";line-height:20px;color:inherit;"),T8=N(cn,{target:"e1wg7tti0"})("font-size:",fl("helpText.fontSize"),";line-height:16px;color:",YY,";overflow-wrap:anywhere;[data-active-item]:not( [data-focus-visible] ) *:not( ",Li," ) &,[aria-disabled='true'] *:not( ",Li," ) &{color:inherit;}");var Ui=u(V(),1),u5=(0,a5.forwardRef)(function({prefix:l,suffix:t,children:e,disabled:d=!1,hideOnClick:b=!0,store:o,...n},G){let X=(0,a5.useContext)(gl);if(!X?.store)throw new Error("Menu.Item can only be rendered inside a Menu component");let i=o??X.store;return(0,Ui.jsxs)(k8,{ref:G,...n,accessibleWhenDisabled:!0,disabled:d,hideOnClick:b,store:i,children:[(0,Ui.jsx)(K0,{children:l}),(0,Ui.jsxs)(_0,{children:[(0,Ui.jsx)(q0,{children:e}),t&&(0,Ui.jsx)($0,{children:t})]})]})});var m5=u(Y(),1);var Jn=u(V(),1),D8=(0,m5.forwardRef)(function({suffix:l,children:t,disabled:e=!1,hideOnClick:d=!1,...b},o){let n=(0,m5.useContext)(gl);if(!n?.store)throw new Error("Menu.CheckboxItem can only be rendered inside a Menu component");return(0,Jn.jsxs)(X5,{ref:o,...b,accessibleWhenDisabled:!0,disabled:e,hideOnClick:d,store:n.store,children:[(0,Jn.jsx)(Ya,{store:n.store,render:(0,Jn.jsx)(K0,{}),style:{width:"auto",height:"auto"},children:(0,Jn.jsx)(Cl,{icon:jt,size:24})}),(0,Jn.jsxs)(_0,{children:[(0,Jn.jsx)(q0,{children:t}),l&&(0,Jn.jsx)($0,{children:l})]})]})});var x5=u(Y(),1);var s5=u(kc(),1),Vb=u(V(),1),QZc=(0,Vb.jsx)(s5.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Vb.jsx)(s5.Circle,{cx:12,cy:12,r:3})}),L8=(0,x5.forwardRef)(function({suffix:l,children:t,disabled:e=!1,hideOnClick:d=!1,...b},o){let n=(0,x5.useContext)(gl);if(!n?.store)throw new Error("Menu.RadioItem can only be rendered inside a Menu component");return(0,Vb.jsxs)(i5,{ref:o,...b,accessibleWhenDisabled:!0,disabled:e,hideOnClick:d,store:n.store,children:[(0,Vb.jsx)(Ya,{store:n.store,render:(0,Vb.jsx)(K0,{}),style:{width:"auto",height:"auto"},children:(0,Vb.jsx)(Cl,{icon:QZc,size:24})}),(0,Vb.jsxs)(_0,{children:[(0,Vb.jsx)(q0,{children:t}),l&&(0,Vb.jsx)($0,{children:l})]})]})});var r5=u(Y(),1);var U8=u(V(),1),j8=(0,r5.forwardRef)(function(l,t){let e=(0,r5.useContext)(gl);if(!e?.store)throw new Error("Menu.Group can only be rendered inside a Menu component");return(0,U8.jsx)(z8,{ref:t,...l,store:e.store})});var g5=u(Y(),1);var vY=u(V(),1),E8=(0,g5.forwardRef)(function(l,t){let e=(0,g5.useContext)(gl);if(!e?.store)throw new Error("Menu.GroupLabel can only be rendered inside a Menu component");return(0,vY.jsx)(A8,{ref:t,render:(0,vY.jsx)(Jt,{upperCase:!0,variant:"muted",size:"11px",weight:500,lineHeight:"16px"}),...l,store:e.store})});var Z5=u(Y(),1);var M8=u(V(),1),P8=(0,Z5.forwardRef)(function(l,t){let e=(0,Z5.useContext)(gl);if(!e?.store)throw new Error("Menu.Separator can only be rendered inside a Menu component");return(0,M8.jsx)(O8,{ref:t,...l,store:e.store,variant:e.variant})});var H5=u(Y(),1);var K8=u(V(),1),_8=(0,H5.forwardRef)(function(l,t){if(!(0,H5.useContext)(gl)?.store)throw new Error("Menu.ItemLabel can only be rendered inside a Menu component");return(0,K8.jsx)(w8,{numberOfLines:1,ref:t,...l})});var R5=u(Y(),1);var q8=u(V(),1),$8=(0,R5.forwardRef)(function(l,t){if(!(0,R5.useContext)(gl)?.store)throw new Error("Menu.ItemHelpText can only be rendered inside a Menu component");return(0,q8.jsx)(T8,{numberOfLines:2,ref:t,...l})});var I5=u(Y(),1);var cq=u(V(),1),lq=(0,I5.forwardRef)(function({children:l,disabled:t=!1,...e},d){let b=(0,I5.useContext)(gl);if(!b?.store)throw new Error("Menu.TriggerButton can only be rendered inside a Menu component");if(b.store.parent)throw new Error("Menu.TriggerButton should not be rendered inside a nested Menu component. Use Menu.SubmenuTriggerItem instead.");return(0,cq.jsx)(Ja,{ref:d,...e,disabled:t,store:b.store,children:l})});var W5=u(Y(),1);var DG=u(V(),1),tq=(0,W5.forwardRef)(function({suffix:l,...t},e){let d=(0,W5.useContext)(gl);if(!d?.store.parent)throw new Error("Menu.SubmenuTriggerItem can only be rendered inside a nested Menu component");return(0,DG.jsx)(Ja,{ref:e,accessibleWhenDisabled:!0,store:d.store,render:(0,DG.jsx)(u5,{...t,store:d.store.parent,suffix:(0,DG.jsxs)(DG.Fragment,{children:[l,(0,DG.jsx)(Q8,{"aria-hidden":"true",icon:m2,size:24,preserveAspectRatio:"xMidYMid slice"})]})})})});var LG=u(Y(),1);var eq=u(V(),1),dq=(0,LG.forwardRef)(function({gutter:l,children:t,shift:e,modal:d=!0,...b},o){let n=(0,LG.useContext)(gl),G=xc(n?.store,"currentPlacement")?.split("-")[0],X=(0,LG.useCallback)(m=>(m.preventDefault(),!0),[]),i=xc(n?.store,"rtl")?"rtl":"ltr",a=(0,LG.useMemo)(()=>({dir:i,style:{direction:i}}),[i]);if(!n?.store)throw new Error("Menu.Popover can only be rendered inside a Menu component");return(0,eq.jsx)(Li,{...b,ref:o,modal:d,store:n.store,gutter:l??(n.store.parent?0:8),shift:e??(n.store.parent?-4:0),hideOnHoverOutside:!1,"data-side":G,"data-submenu":!!n.store.parent||void 0,wrapperProps:a,hideOnEscape:X,unmountOnHide:!0,variant:n.variant,children:t})});var oq=u(V(),1),wZc=c=>{let{children:l,defaultOpen:t=!1,open:e,onOpenChange:d,placement:b,variant:o}=cc(c,"Menu"),n=(0,p5.useContext)(gl),G=(0,bq.isRTL)(),X=b??(n?.store?"right-start":"bottom-start");G&&(/right/.test(X)?X=X.replace("right","left"):/left/.test(X)&&(X=X.replace("left","right")));let i=fx({parent:n?.store,open:e,defaultOpen:t,placement:X,focusLoop:!0,setOpen(m){d?.(m)},rtl:G}),a=(0,p5.useMemo)(()=>({store:i,variant:o}),[i,o]);return(0,oq.jsx)(gl.Provider,{value:a,children:l})},nq=Object.assign(UX(wZc,"Menu"),{Context:Object.assign(gl,{displayName:"Menu.Context"}),Item:Object.assign(u5,{displayName:"Menu.Item"}),RadioItem:Object.assign(L8,{displayName:"Menu.RadioItem"}),CheckboxItem:Object.assign(D8,{displayName:"Menu.CheckboxItem"}),Group:Object.assign(j8,{displayName:"Menu.Group"}),GroupLabel:Object.assign(E8,{displayName:"Menu.GroupLabel"}),Separator:Object.assign(P8,{displayName:"Menu.Separator"}),ItemLabel:Object.assign(_8,{displayName:"Menu.ItemLabel"}),ItemHelpText:Object.assign($8,{displayName:"Menu.ItemHelpText"}),Popover:Object.assign(dq,{displayName:"Menu.Popover"}),TriggerButton:Object.assign(lq,{displayName:"Menu.TriggerButton"}),SubmenuTriggerItem:Object.assign(tq,{displayName:"Menu.SubmenuTriggerItem"})});var aq=u(Y(),1);var Gq=({colors:c})=>{let l=Object.entries(c.gray||{}).map(([t,e])=>`--wp-components-color-gray-${t}: ${e};`).join("");return[O("--wp-components-color-accent:",c.accent,";--wp-components-color-accent-darker-10:",c.accentDarker10,";--wp-components-color-accent-darker-20:",c.accentDarker20,";--wp-components-color-accent-inverted:",c.accentInverted,";--wp-components-color-background:",c.background,";--wp-components-color-foreground:",c.foreground,";--wp-components-color-foreground-inverted:",c.foregroundInverted,";",l,";","")]},Xq=N("div",{target:"e1krjpvb0"})({name:"1a3idx0",styles:"color:var( --wp-components-color-foreground, currentColor )"});var c1l=u(Ge(),1);Fe([ve,t0]);function iq(c){TZc(c);let l={...UZc(c.accent),...jZc(c.background)};return LZc(DZc(c,l)),{colors:l}}function TZc(c){for(let[l,t]of Object.entries(c))typeof t<"u"&&Rc(t).isValid()}function DZc(c,l){let t=c.background||D.white,e=c.accent||"#3858e9",d=l.foreground||D.gray[900],b=l.gray||D.gray;return{accent:Rc(t).isReadable(e)?void 0:`The background color ("${t}") does not have sufficient contrast against the accent color ("${e}").`,foreground:Rc(t).isReadable(d)?void 0:`The background color provided ("${t}") does not have sufficient contrast against the standard foreground colors.`,grays:Rc(t).contrast(b[600])>=3&&Rc(t).contrast(b[700])>=4.5?void 0:`The background color provided ("${t}") cannot generate a set of grayscale foreground colors with sufficient contrast. Try adjusting the color to be lighter or darker.`}}function LZc(c){for(let l of Object.values(c));}function UZc(c){return c?{accent:c,accentDarker10:Rc(c).darken(.1).toHex(),accentDarker20:Rc(c).darken(.2).toHex(),accentInverted:NY(c)}:{}}function jZc(c){if(!c)return{};let l=NY(c);return{background:c,foreground:l,foregroundInverted:NY(l),gray:EZc(c,l)}}function NY(c){return Rc(c).isDark()?D.white:D.gray[900]}function EZc(c,l){let t={100:.06,200:.121,300:.132,400:.2,600:.42,700:.543,800:.821},e=.884,d=Rc(c).isDark()?"lighten":"darken",b=Math.abs(Rc(c).toHsl().l-Rc(l).toHsl().l)/100,o={};return Object.entries(t).forEach(([n,G])=>{o[parseInt(n)]=Rc(c)[d](G/e*b).toHex()}),o}var uq=u(V(),1);function MZc({accent:c,background:l,className:t,...e}){let d=Xc(),b=(0,aq.useMemo)(()=>d(...Gq(iq({accent:c,background:l})),t),[c,l,t,d]);return(0,uq.jsx)(Xq,{className:b,...e})}var mq=MZc;var hq=u(dc(),1),V5=u(Y(),1),Yq=u(nc(),1);var B5=u(Y(),1),dg=(0,B5.createContext)(void 0);dg.displayName="TabsContext";var cm=()=>(0,B5.useContext)(dg);var Hq=u(Y(),1),x1l=u(Ge(),1);var xq=N(Xa,{target:"enfox0g4"})(`display:flex;align-items:stretch;overflow-x:auto;&[aria-orientation='vertical']{flex-direction:column;}:where( [aria-orientation='horizontal'] ){width:fit-content;}--direction-factor:1;--direction-start:left;--direction-end:right;--selected-start:var( --selected-left, 0 );&:dir( rtl ){--direction-factor:-1;--direction-start:right;--direction-end:left;--selected-start:var( --selected-right, 0 );}@media not ( prefers-reduced-motion ){&[data-indicator-animated]::before{transition-property:transform,border-radius,border-block;transition-duration:0.2s;transition-timing-function:ease-out;}}position:relative;&::before{content:'';position:absolute;pointer-events:none;transform-origin:var( --direction-start ) top;outline:2px solid transparent;outline-offset:-1px;}--antialiasing-factor:100;&[aria-orientation='horizontal']{--fade-width:64px;--fade-gradient-base:transparent 0%,black var( --fade-width );--fade-gradient-composed:var( --fade-gradient-base ),black 60%,transparent 50%;&.is-overflowing-first{mask-image:linear-gradient(
				to var( --direction-end ),
				var( --fade-gradient-base )
			);}&.is-overflowing-last{mask-image:linear-gradient(
				to var( --direction-start ),
				var( --fade-gradient-base )
			);}&.is-overflowing-first.is-overflowing-last{mask-image:linear-gradient(
					to right,
					var( --fade-gradient-composed )
				),linear-gradient( to left, var( --fade-gradient-composed ) );}&::before{bottom:0;height:0;width:calc( var( --antialiasing-factor ) * 1px );transform:translateX(
					calc(
						var( --selected-start ) * var( --direction-factor ) *
							1px
					)
				) scaleX(
					calc(
						var( --selected-width, 0 ) /
							var( --antialiasing-factor )
					)
				);border-bottom:var( --wp-admin-border-width-focus ) solid `,D.theme.accent,";}}&[aria-orientation='vertical']{&::before{border-radius:",w.radiusSmall,`/calc(
					`,w.radiusSmall,` /
						(
							var( --selected-height, 0 ) /
								var( --antialiasing-factor )
						)
				);top:0;left:0;width:100%;height:calc( var( --antialiasing-factor ) * 1px );transform:translateY( calc( var( --selected-top, 0 ) * 1px ) ) scaleY(
					calc(
						var( --selected-height, 0 ) /
							var( --antialiasing-factor )
					)
				);background-color:color-mix(
				in srgb,
				`,D.theme.accent,`,
				transparent 96%
			);}&[data-select-on-move='true']:has(
				:is( :focus-visible, [data-focus-visible] )
			)::before{box-sizing:border-box;border:var( --wp-admin-border-width-focus ) solid `,D.theme.accent,`;border-block-width:calc(
				var( --wp-admin-border-width-focus, 1px ) /
					(
						var( --selected-height, 0 ) /
							var( --antialiasing-factor )
					)
			);}}`),sq=N(na,{target:"enfox0g3"})("&{border-radius:0;background:transparent;border:none;box-shadow:none;flex:1 0 auto;white-space:nowrap;display:flex;align-items:center;cursor:pointer;line-height:1.2;font-family:",fl("default.fontFamily"),";font-weight:400;font-size:",fl("default.fontSize"),";color:",D.theme.foreground,";position:relative;&[aria-disabled='true']{cursor:default;color:",D.ui.textDisabled,";}&:not( [aria-disabled='true'] ):is( :hover, [data-focus-visible] ){color:",D.theme.accent,";}&:focus:not( :disabled ){box-shadow:none;outline:none;}&::after{position:absolute;pointer-events:none;outline:var( --wp-admin-border-width-focus ) solid ",D.theme.accent,";border-radius:",w.radiusSmall,";opacity:0;@media not ( prefers-reduced-motion ){transition:opacity 0.1s linear;}}&[data-focus-visible]::after{opacity:1;}}[aria-orientation='horizontal'] &{padding-inline:",z(4),";height:",z(12),";scroll-margin:24px;&::after{content:'';inset:",z(3),";}}[aria-orientation='vertical'] &{padding:",z(2)," ",z(3),";min-height:",z(10),";&[aria-selected='true']{color:",D.theme.accent,";fill:currentColor;}}[aria-orientation='vertical'][data-select-on-move='false'] &::after{content:'';inset:var( --wp-admin-border-width-focus );}"),rq=N("span",{target:"enfox0g2"})({name:"9at4z3",styles:"flex-grow:1;display:flex;align-items:center;[aria-orientation='horizontal'] &{justify-content:center;}[aria-orientation='vertical'] &{justify-content:start;}"}),gq=N(cl,{target:"enfox0g1"})("flex-shrink:0;margin-inline-end:",z(-1),";[aria-orientation='horizontal'] &{display:none;}opacity:0;[role='tab']:is( [aria-selected='true'], [data-focus-visible], :hover ) &{opacity:1;}@media not ( prefers-reduced-motion ){[data-select-on-move='true'] [role='tab']:is( [aria-selected='true'],  ) &{transition:opacity 0.15s 0.15s linear;}}&:dir( rtl ){rotate:180deg;}"),Zq=N(xa,{target:"enfox0g0"})("&:focus{box-shadow:none;outline:none;}&[data-focus-visible]{box-shadow:0 0 0 var( --wp-admin-border-width-focus ) ",D.theme.accent,";outline:2px solid transparent;outline-offset:0;}");var bg=u(V(),1),Rq=(0,Hq.forwardRef)(function({children:l,tabId:t,disabled:e,render:d,...b},o){let{store:n,instanceId:G}=cm()??{};if(!n)return null;let X=`${G}-${t}`;return(0,bg.jsxs)(sq,{ref:o,store:n,id:X,disabled:e,render:d,...b,children:[(0,bg.jsx)(rq,{children:l}),(0,bg.jsx)(gq,{icon:MX})]})});var W1l=u(Ge(),1),lm=u(Y(),1),pq=u(dc(),1);var ji=u(Y(),1),Iq=u(dc(),1);function Wq(c,l){let[t,e]=(0,ji.useState)(!1),[d,b]=(0,ji.useState)(!1),[o,n]=(0,ji.useState)(),G=(0,Iq.useEvent)(X=>{for(let i of X)i.target===l.first&&e(!i.isIntersecting),i.target===l.last&&b(!i.isIntersecting)});return(0,ji.useEffect)(()=>{if(!c||!window.IntersectionObserver)return;let X=new IntersectionObserver(G,{root:c,threshold:.9});return n(X),()=>X.disconnect()},[G,c]),(0,ji.useEffect)(()=>{if(o)return l.first&&o.observe(l.first),l.last&&o.observe(l.last),()=>{l.first&&o.unobserve(l.first),l.last&&o.unobserve(l.last)}},[l.first,l.last,o]),{first:t,last:d}}var fY=u(V(),1),PZc=24;function KZc(c,l,{margin:t=PZc}={}){(0,lm.useLayoutEffect)(()=>{if(!c||!l)return;let{scrollLeft:e}=c,d=c.getBoundingClientRect().width,{left:b,width:o}=l,n=e+d,X=b+o+t-n,i=e-(b-t),a=null;i>0?a=e-i:X>0&&(a=e+X),a!==null&&c.scroll?.({left:a})},[t,c,l])}var Bq=(0,lm.forwardRef)(function({children:l,...t},e){let{store:d}=cm()??{},b=xc(d,"selectedId"),o=xc(d,"activeId"),n=xc(d,"selectOnMove"),G=xc(d,"items"),[X,i]=(0,lm.useState)(),a=(0,pq.useMergeRefs)([e,i]),m=d?.item(b),x=xc(d,"renderedItems"),s=x&&m?x.indexOf(m):-1,r=nW(m?.element,[s]),g=Wq(X,{first:G?.at(0)?.element,last:G?.at(-1)?.element});XW(X,r,{prefix:"selected",dataAttribute:"indicator-animated",transitionEndFilter:H=>H.pseudoElement==="::before",roundRect:!0}),KZc(X,r);let Z=()=>{n&&b!==o&&d?.setActiveId(b)};return d?(0,fY.jsx)(xq,{ref:a,store:d,render:H=>(0,fY.jsx)("div",{...H,tabIndex:H.tabIndex??-1}),onBlur:Z,"data-select-on-move":n?"true":"false",...t,className:Q(g.first&&"is-overflowing-first",g.last&&"is-overflowing-last",t.className),children:l}):null});var yq=u(Y(),1);var v1l=u(Ge(),1);var Vq=u(V(),1),Cq=(0,yq.forwardRef)(function({children:l,tabId:t,focusable:e=!0,...d},b){let o=cm(),n=xc(o?.store,"selectedId");if(!o)return null;let{store:G,instanceId:X}=o,i=`${X}-${t}`;return(0,Vq.jsx)(Zq,{ref:b,store:G,id:`${i}-view`,tabId:i,focusable:e,...d,children:n===i&&l})});var Fq=u(V(),1);function y5(c,l){return c&&`${l}-${c}`}function Jq(c,l){return typeof c=="string"?c.replace(`${l}-`,""):c}var vq=Object.assign(function c({selectOnMove:l=!0,defaultTabId:t,orientation:e="horizontal",onSelect:d,children:b,selectedTabId:o,activeTabId:n,defaultActiveTabId:G,onActiveTabIdChange:X}){let i=(0,hq.useInstanceId)(c,"tabs"),a=mX({selectOnMove:l,orientation:e,defaultSelectedId:y5(t,i),setSelectedId:g=>{d?.(Jq(g,i))},selectedId:y5(o,i),defaultActiveId:y5(G,i),setActiveId:g=>{X?.(Jq(g,i))},activeId:y5(n,i),rtl:(0,Yq.isRTL)()}),{items:m,activeId:x}=xc(a),{setActiveId:s}=a;(0,V5.useEffect)(()=>{requestAnimationFrame(()=>{let g=m?.[0]?.element?.ownerDocument.activeElement;!g||!m.some(Z=>g===Z.element)||x!==g.id&&s(g.id)})},[x,m,s]);let r=(0,V5.useMemo)(()=>({store:a,instanceId:i}),[a,i]);return(0,Fq.jsx)(dg.Provider,{value:r,children:b})},{Tab:Object.assign(Rq,{displayName:"Tabs.Tab"}),TabList:Object.assign(Bq,{displayName:"Tabs.TabList"}),TabPanel:Object.assign(Cq,{displayName:"Tabs.TabPanel"}),Context:Object.assign(dg,{displayName:"Tabs.Context"})});var Sq=u(fq(),1),{lock:kq,unlock:T1l}=(0,Sq.__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/components");var tm=u(V(),1);function _Zc(c="default"){switch(c){case"info":return p2;case"success":return hs;case"warning":return G2;case"error":return Bs;default:return null}}function qZc({className:c,intent:l="default",children:t,...e}){let d=_Zc(l),b=!!d;return(0,tm.jsx)("span",{className:Q("components-badge",c,{[`is-${l}`]:l,"has-icon":b}),...e,children:(0,tm.jsxs)("span",{className:"components-badge__flex-wrapper",children:[b&&(0,tm.jsx)(cl,{icon:d,size:16,fill:"currentColor",className:"components-badge__icon"}),(0,tm.jsx)("span",{className:"components-badge__content",children:t})]})})}var zq=qZc;var hc=u(E(),1);var $Zc={},og={};function Ei(c,l){try{let e=($Zc[c]||=new Intl.DateTimeFormat("en-GB",{timeZone:c,hour:"numeric",timeZoneName:"longOffset"}).format)(l).split("GMT")[1]||"";return e in og?og[e]:Aq(e,e.split(":"))}catch{if(c in og)return og[c];let t=c?.match(cHc);return t?Aq(c,t.slice(1)):NaN}}var cHc=/([+-]\d\d):?(\d\d)?/;function Aq(c,l){let t=+l[0],e=+(l[1]||0);return og[c]=t>0?t*60+e:t*60-e}var UG=class c extends Date{constructor(...l){super(),l.length>1&&typeof l[l.length-1]=="string"&&(this.timeZone=l.pop()),this.internal=new Date,isNaN(Ei(this.timeZone,this))?this.setTime(NaN):l.length?typeof l[0]=="number"&&(l.length===1||l.length===2&&typeof l[1]!="number")?this.setTime(l[0]):typeof l[0]=="string"?this.setTime(+new Date(l[0])):l[0]instanceof Date?this.setTime(+l[0]):(this.setTime(+new Date(...l)),Qq(this,NaN),SY(this)):this.setTime(Date.now())}static tz(l,...t){return t.length?new c(...t,l):new c(Date.now(),l)}withTimeZone(l){return new c(+this,l)}getTimezoneOffset(){return-Ei(this.timeZone,this)}setTime(l){return Date.prototype.setTime.apply(this,arguments),SY(this),+this}[Symbol.for("constructDateFrom")](l){return new c(+new Date(l),this.timeZone)}},Oq=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(c=>{if(!Oq.test(c))return;let l=c.replace(Oq,"$1UTC");UG.prototype[l]&&(c.startsWith("get")?UG.prototype[c]=function(){return this.internal[l]()}:(UG.prototype[c]=function(){return Date.prototype[l].apply(this.internal,arguments),lHc(this),+this},UG.prototype[l]=function(){return Date.prototype[l].apply(this,arguments),SY(this),+this}))});function SY(c){c.internal.setTime(+c),c.internal.setUTCMinutes(c.internal.getUTCMinutes()-c.getTimezoneOffset())}function lHc(c){Date.prototype.setFullYear.call(c,c.internal.getUTCFullYear(),c.internal.getUTCMonth(),c.internal.getUTCDate()),Date.prototype.setHours.call(c,c.internal.getUTCHours(),c.internal.getUTCMinutes(),c.internal.getUTCSeconds(),c.internal.getUTCMilliseconds()),Qq(c)}function Qq(c){let l=Ei(c.timeZone,c),t=new Date(+c);t.setUTCHours(t.getUTCHours()-1);let e=-new Date(+c).getTimezoneOffset(),d=-new Date(+t).getTimezoneOffset(),b=e-d,o=Date.prototype.getHours.apply(c)!==c.internal.getUTCHours();b&&o&&c.internal.setUTCMinutes(c.internal.getUTCMinutes()+b);let n=e-l;n&&Date.prototype.setUTCMinutes.call(c,Date.prototype.getUTCMinutes.call(c)+n);let G=Ei(c.timeZone,c),i=-new Date(+c).getTimezoneOffset()-G,a=G!==l,m=i-n;if(a&&m){Date.prototype.setUTCMinutes.call(c,Date.prototype.getUTCMinutes.call(c)+m);let x=Ei(c.timeZone,c),s=G-x;s&&(c.internal.setUTCMinutes(c.internal.getUTCMinutes()+s),Date.prototype.setUTCMinutes.call(c,Date.prototype.getUTCMinutes.call(c)+s))}}var tt=class c extends UG{static tz(l,...t){return t.length?new c(...t,l):new c(Date.now(),l)}toISOString(){let[l,t,e]=this.tzComponents(),d=`${l}${t}:${e}`;return this.internal.toISOString().slice(0,-1)+d}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){let[l,t,e,d]=this.internal.toUTCString().split(" ");return`${l?.slice(0,-1)} ${e} ${t} ${d}`}toTimeString(){let l=this.internal.toUTCString().split(" ")[4],[t,e,d]=this.tzComponents();return`${l} GMT${t}${e}${d} (${tHc(this.timeZone,this)})`}toLocaleString(l,t){return Date.prototype.toLocaleString.call(this,l,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(l,t){return Date.prototype.toLocaleDateString.call(this,l,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(l,t){return Date.prototype.toLocaleTimeString.call(this,l,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){let l=this.getTimezoneOffset(),t=l>0?"-":"+",e=String(Math.floor(Math.abs(l)/60)).padStart(2,"0"),d=String(Math.abs(l)%60).padStart(2,"0");return[t,e,d]}withTimeZone(l){return new c(+this,l)}[Symbol.for("constructDateFrom")](l){return new c(+new Date(l),this.timeZone)}};function tHc(c,l){return new Intl.DateTimeFormat("en-GB",{timeZone:c,timeZoneName:"long"}).format(l).slice(12)}var rc;(function(c){c.Root="root",c.Chevron="chevron",c.Day="day",c.DayButton="day_button",c.CaptionLabel="caption_label",c.Dropdowns="dropdowns",c.Dropdown="dropdown",c.DropdownRoot="dropdown_root",c.Footer="footer",c.MonthGrid="month_grid",c.MonthCaption="month_caption",c.MonthsDropdown="months_dropdown",c.Month="month",c.Months="months",c.Nav="nav",c.NextMonthButton="button_next",c.PreviousMonthButton="button_previous",c.Week="week",c.Weeks="weeks",c.Weekday="weekday",c.Weekdays="weekdays",c.WeekNumber="week_number",c.WeekNumberHeader="week_number_header",c.YearsDropdown="years_dropdown"})(rc||(rc={}));var xl;(function(c){c.disabled="disabled",c.hidden="hidden",c.outside="outside",c.focused="focused",c.today="today"})(xl||(xl={}));var Ae;(function(c){c.range_end="range_end",c.range_middle="range_middle",c.range_start="range_start",c.selected="selected"})(Ae||(Ae={}));var He;(function(c){c.weeks_before_enter="weeks_before_enter",c.weeks_before_exit="weeks_before_exit",c.weeks_after_enter="weeks_after_enter",c.weeks_after_exit="weeks_after_exit",c.caption_after_enter="caption_after_enter",c.caption_after_exit="caption_after_exit",c.caption_before_enter="caption_before_enter",c.caption_before_exit="caption_before_exit"})(He||(He={}));var eHc=Math.pow(10,8)*24*60*60*1e3,uVl=-eHc,C5=6048e5,wq=864e5;var dHc=3600;var Tq=dHc*24,mVl=Tq*7,bHc=Tq*365.2425,oHc=bHc/12,xVl=oHc*3,kY=Symbol.for("constructDateFrom");function Ec(c,l){return typeof c=="function"?c(l):c&&typeof c=="object"&&kY in c?c[kY](l):c instanceof Date?new c.constructor(l):new Date(l)}function Ic(c,l){return Ec(l||c,c)}function J5(c,l,t){let e=Ic(c,t?.in);return isNaN(l)?Ec(t?.in||c,NaN):(l&&e.setDate(e.getDate()+l),e)}function h5(c,l,t){let e=Ic(c,t?.in);if(isNaN(l))return Ec(t?.in||c,NaN);if(!l)return e;let d=e.getDate(),b=Ec(t?.in||c,e.getTime());b.setMonth(e.getMonth()+l+1,0);let o=b.getDate();return d>=o?b:(e.setFullYear(b.getFullYear(),b.getMonth(),d),e)}var nHc={};function Co(){return nHc}function Cb(c,l){let t=Co(),e=l?.weekStartsOn??l?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,d=Ic(c,l?.in),b=d.getDay(),o=(b<e?7:0)+b-e;return d.setDate(d.getDate()-o),d.setHours(0,0,0,0),d}function hn(c,l){return Cb(c,{...l,weekStartsOn:1})}function Y5(c,l){let t=Ic(c,l?.in),e=t.getFullYear(),d=Ec(t,0);d.setFullYear(e+1,0,4),d.setHours(0,0,0,0);let b=hn(d),o=Ec(t,0);o.setFullYear(e,0,4),o.setHours(0,0,0,0);let n=hn(o);return t.getTime()>=b.getTime()?e+1:t.getTime()>=n.getTime()?e:e-1}function zY(c){let l=Ic(c),t=new Date(Date.UTC(l.getFullYear(),l.getMonth(),l.getDate(),l.getHours(),l.getMinutes(),l.getSeconds(),l.getMilliseconds()));return t.setUTCFullYear(l.getFullYear()),+c-+t}function Qd(c,...l){let t=Ec.bind(null,c||l.find(e=>typeof e=="object"));return l.map(t)}function jG(c,l){let t=Ic(c,l?.in);return t.setHours(0,0,0,0),t}function F5(c,l,t){let[e,d]=Qd(t?.in,c,l),b=jG(e),o=jG(d),n=+b-zY(b),G=+o-zY(o);return Math.round((n-G)/wq)}function Dq(c,l){let t=Y5(c,l),e=Ec(l?.in||c,0);return e.setFullYear(t,0,4),e.setHours(0,0,0,0),hn(e)}function Lq(c,l,t){return J5(c,l*7,t)}function Uq(c,l,t){return h5(c,l*12,t)}function jq(c,l){let t,e=l?.in;return c.forEach(d=>{!e&&typeof d=="object"&&(e=Ec.bind(null,d));let b=Ic(d,e);(!t||t<b||isNaN(+b))&&(t=b)}),Ec(e,t||NaN)}function Eq(c,l){let t,e=l?.in;return c.forEach(d=>{!e&&typeof d=="object"&&(e=Ec.bind(null,d));let b=Ic(d,e);(!t||t>b||isNaN(+b))&&(t=b)}),Ec(e,t||NaN)}function Mq(c,l,t){let[e,d]=Qd(t?.in,c,l);return+jG(e)==+jG(d)}function v5(c){return c instanceof Date||typeof c=="object"&&Object.prototype.toString.call(c)==="[object Date]"}function Pq(c){return!(!v5(c)&&typeof c!="number"||isNaN(+Ic(c)))}function Kq(c,l,t){let[e,d]=Qd(t?.in,c,l),b=e.getFullYear()-d.getFullYear(),o=e.getMonth()-d.getMonth();return b*12+o}function _q(c,l){let t=Ic(c,l?.in),e=t.getMonth();return t.setFullYear(t.getFullYear(),e+1,0),t.setHours(23,59,59,999),t}function qq(c,l){let[t,e]=Qd(c,l.start,l.end);return{start:t,end:e}}function $q(c,l){let{start:t,end:e}=qq(l?.in,c),d=+t>+e,b=d?+t:+e,o=d?e:t;o.setHours(0,0,0,0),o.setDate(1);let n=l?.step??1;if(!n)return[];n<0&&(n=-n,d=!d);let G=[];for(;+o<=b;)G.push(Ec(t,o)),o.setMonth(o.getMonth()+n);return d?G.reverse():G}function c$(c,l){let t=Ic(c,l?.in);return t.setDate(1),t.setHours(0,0,0,0),t}function l$(c,l){let t=Ic(c,l?.in),e=t.getFullYear();return t.setFullYear(e+1,0,0),t.setHours(23,59,59,999),t}function N5(c,l){let t=Ic(c,l?.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}function f5(c,l){let t=Co(),e=l?.weekStartsOn??l?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,d=Ic(c,l?.in),b=d.getDay(),o=(b<e?-7:0)+6-(b-e);return d.setDate(d.getDate()+o),d.setHours(23,59,59,999),d}function t$(c,l){return f5(c,{...l,weekStartsOn:1})}var GHc={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},e$=(c,l,t)=>{let e,d=GHc[c];return typeof d=="string"?e=d:l===1?e=d.one:e=d.other.replace("{{count}}",l.toString()),t?.addSuffix?t.comparison&&t.comparison>0?"in "+e:e+" ago":e};function S5(c){return(l={})=>{let t=l.width?String(l.width):c.defaultWidth;return c.formats[t]||c.formats[c.defaultWidth]}}var XHc={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},iHc={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},aHc={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},d$={date:S5({formats:XHc,defaultWidth:"full"}),time:S5({formats:iHc,defaultWidth:"full"}),dateTime:S5({formats:aHc,defaultWidth:"full"})};var uHc={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},b$=(c,l,t,e)=>uHc[c];function em(c){return(l,t)=>{let e=t?.context?String(t.context):"standalone",d;if(e==="formatting"&&c.formattingValues){let o=c.defaultFormattingWidth||c.defaultWidth,n=t?.width?String(t.width):o;d=c.formattingValues[n]||c.formattingValues[o]}else{let o=c.defaultWidth,n=t?.width?String(t.width):c.defaultWidth;d=c.values[n]||c.values[o]}let b=c.argumentCallback?c.argumentCallback(l):l;return d[b]}}var mHc={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xHc={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},sHc={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},rHc={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},gHc={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ZHc={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},HHc=(c,l)=>{let t=Number(c),e=t%100;if(e>20||e<10)switch(e%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},o$={ordinalNumber:HHc,era:em({values:mHc,defaultWidth:"wide"}),quarter:em({values:xHc,defaultWidth:"wide",argumentCallback:c=>c-1}),month:em({values:sHc,defaultWidth:"wide"}),day:em({values:rHc,defaultWidth:"wide"}),dayPeriod:em({values:gHc,defaultWidth:"wide",formattingValues:ZHc,defaultFormattingWidth:"wide"})};function dm(c){return(l,t={})=>{let e=t.width,d=e&&c.matchPatterns[e]||c.matchPatterns[c.defaultMatchWidth],b=l.match(d);if(!b)return null;let o=b[0],n=e&&c.parsePatterns[e]||c.parsePatterns[c.defaultParseWidth],G=Array.isArray(n)?IHc(n,a=>a.test(o)):RHc(n,a=>a.test(o)),X;X=c.valueCallback?c.valueCallback(G):G,X=t.valueCallback?t.valueCallback(X):X;let i=l.slice(o.length);return{value:X,rest:i}}}function RHc(c,l){for(let t in c)if(Object.prototype.hasOwnProperty.call(c,t)&&l(c[t]))return t}function IHc(c,l){for(let t=0;t<c.length;t++)if(l(c[t]))return t}function n$(c){return(l,t={})=>{let e=l.match(c.matchPattern);if(!e)return null;let d=e[0],b=l.match(c.parsePattern);if(!b)return null;let o=c.valueCallback?c.valueCallback(b[0]):b[0];o=t.valueCallback?t.valueCallback(o):o;let n=l.slice(d.length);return{value:o,rest:n}}}var WHc=/^(\d+)(th|st|nd|rd)?/i,pHc=/\d+/i,BHc={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},yHc={any:[/^b/i,/^(a|c)/i]},VHc={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},CHc={any:[/1/i,/2/i,/3/i,/4/i]},JHc={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},hHc={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},YHc={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},FHc={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},vHc={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},NHc={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},G$={ordinalNumber:n$({matchPattern:WHc,parsePattern:pHc,valueCallback:c=>parseInt(c,10)}),era:dm({matchPatterns:BHc,defaultMatchWidth:"wide",parsePatterns:yHc,defaultParseWidth:"any"}),quarter:dm({matchPatterns:VHc,defaultMatchWidth:"wide",parsePatterns:CHc,defaultParseWidth:"any",valueCallback:c=>c+1}),month:dm({matchPatterns:JHc,defaultMatchWidth:"wide",parsePatterns:hHc,defaultParseWidth:"any"}),day:dm({matchPatterns:YHc,defaultMatchWidth:"wide",parsePatterns:FHc,defaultParseWidth:"any"}),dayPeriod:dm({matchPatterns:vHc,defaultMatchWidth:"any",parsePatterns:NHc,defaultParseWidth:"any"})};var wd={code:"en-US",formatDistance:e$,formatLong:d$,formatRelative:b$,localize:o$,match:G$,options:{weekStartsOn:0,firstWeekContainsDate:1}};function X$(c,l){let t=Ic(c,l?.in);return F5(t,N5(t))+1}function k5(c,l){let t=Ic(c,l?.in),e=+hn(t)-+Dq(t);return Math.round(e/C5)+1}function z5(c,l){let t=Ic(c,l?.in),e=t.getFullYear(),d=Co(),b=l?.firstWeekContainsDate??l?.locale?.options?.firstWeekContainsDate??d.firstWeekContainsDate??d.locale?.options?.firstWeekContainsDate??1,o=Ec(l?.in||c,0);o.setFullYear(e+1,0,b),o.setHours(0,0,0,0);let n=Cb(o,l),G=Ec(l?.in||c,0);G.setFullYear(e,0,b),G.setHours(0,0,0,0);let X=Cb(G,l);return+t>=+n?e+1:+t>=+X?e:e-1}function i$(c,l){let t=Co(),e=l?.firstWeekContainsDate??l?.locale?.options?.firstWeekContainsDate??t.firstWeekContainsDate??t.locale?.options?.firstWeekContainsDate??1,d=z5(c,l),b=Ec(l?.in||c,0);return b.setFullYear(d,0,e),b.setHours(0,0,0,0),Cb(b,l)}function A5(c,l){let t=Ic(c,l?.in),e=+Cb(t,l)-+i$(t,l);return Math.round(e/C5)+1}function ll(c,l){let t=c<0?"-":"",e=Math.abs(c).toString().padStart(l,"0");return t+e}var Yn={y(c,l){let t=c.getFullYear(),e=t>0?t:1-t;return ll(l==="yy"?e%100:e,l.length)},M(c,l){let t=c.getMonth();return l==="M"?String(t+1):ll(t+1,2)},d(c,l){return ll(c.getDate(),l.length)},a(c,l){let t=c.getHours()/12>=1?"pm":"am";switch(l){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];default:return t==="am"?"a.m.":"p.m."}},h(c,l){return ll(c.getHours()%12||12,l.length)},H(c,l){return ll(c.getHours(),l.length)},m(c,l){return ll(c.getMinutes(),l.length)},s(c,l){return ll(c.getSeconds(),l.length)},S(c,l){let t=l.length,e=c.getMilliseconds(),d=Math.trunc(e*Math.pow(10,t-3));return ll(d,l.length)}};var bm={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},AY={G:function(c,l,t){let e=c.getFullYear()>0?1:0;switch(l){case"G":case"GG":case"GGG":return t.era(e,{width:"abbreviated"});case"GGGGG":return t.era(e,{width:"narrow"});default:return t.era(e,{width:"wide"})}},y:function(c,l,t){if(l==="yo"){let e=c.getFullYear(),d=e>0?e:1-e;return t.ordinalNumber(d,{unit:"year"})}return Yn.y(c,l)},Y:function(c,l,t,e){let d=z5(c,e),b=d>0?d:1-d;if(l==="YY"){let o=b%100;return ll(o,2)}return l==="Yo"?t.ordinalNumber(b,{unit:"year"}):ll(b,l.length)},R:function(c,l){let t=Y5(c);return ll(t,l.length)},u:function(c,l){let t=c.getFullYear();return ll(t,l.length)},Q:function(c,l,t){let e=Math.ceil((c.getMonth()+1)/3);switch(l){case"Q":return String(e);case"QQ":return ll(e,2);case"Qo":return t.ordinalNumber(e,{unit:"quarter"});case"QQQ":return t.quarter(e,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(e,{width:"narrow",context:"formatting"});default:return t.quarter(e,{width:"wide",context:"formatting"})}},q:function(c,l,t){let e=Math.ceil((c.getMonth()+1)/3);switch(l){case"q":return String(e);case"qq":return ll(e,2);case"qo":return t.ordinalNumber(e,{unit:"quarter"});case"qqq":return t.quarter(e,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(e,{width:"narrow",context:"standalone"});default:return t.quarter(e,{width:"wide",context:"standalone"})}},M:function(c,l,t){let e=c.getMonth();switch(l){case"M":case"MM":return Yn.M(c,l);case"Mo":return t.ordinalNumber(e+1,{unit:"month"});case"MMM":return t.month(e,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(e,{width:"narrow",context:"formatting"});default:return t.month(e,{width:"wide",context:"formatting"})}},L:function(c,l,t){let e=c.getMonth();switch(l){case"L":return String(e+1);case"LL":return ll(e+1,2);case"Lo":return t.ordinalNumber(e+1,{unit:"month"});case"LLL":return t.month(e,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(e,{width:"narrow",context:"standalone"});default:return t.month(e,{width:"wide",context:"standalone"})}},w:function(c,l,t,e){let d=A5(c,e);return l==="wo"?t.ordinalNumber(d,{unit:"week"}):ll(d,l.length)},I:function(c,l,t){let e=k5(c);return l==="Io"?t.ordinalNumber(e,{unit:"week"}):ll(e,l.length)},d:function(c,l,t){return l==="do"?t.ordinalNumber(c.getDate(),{unit:"date"}):Yn.d(c,l)},D:function(c,l,t){let e=X$(c);return l==="Do"?t.ordinalNumber(e,{unit:"dayOfYear"}):ll(e,l.length)},E:function(c,l,t){let e=c.getDay();switch(l){case"E":case"EE":case"EEE":return t.day(e,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(e,{width:"short",context:"formatting"});default:return t.day(e,{width:"wide",context:"formatting"})}},e:function(c,l,t,e){let d=c.getDay(),b=(d-e.weekStartsOn+8)%7||7;switch(l){case"e":return String(b);case"ee":return ll(b,2);case"eo":return t.ordinalNumber(b,{unit:"day"});case"eee":return t.day(d,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(d,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(d,{width:"short",context:"formatting"});default:return t.day(d,{width:"wide",context:"formatting"})}},c:function(c,l,t,e){let d=c.getDay(),b=(d-e.weekStartsOn+8)%7||7;switch(l){case"c":return String(b);case"cc":return ll(b,l.length);case"co":return t.ordinalNumber(b,{unit:"day"});case"ccc":return t.day(d,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(d,{width:"narrow",context:"standalone"});case"cccccc":return t.day(d,{width:"short",context:"standalone"});default:return t.day(d,{width:"wide",context:"standalone"})}},i:function(c,l,t){let e=c.getDay(),d=e===0?7:e;switch(l){case"i":return String(d);case"ii":return ll(d,l.length);case"io":return t.ordinalNumber(d,{unit:"day"});case"iii":return t.day(e,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(e,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(e,{width:"short",context:"formatting"});default:return t.day(e,{width:"wide",context:"formatting"})}},a:function(c,l,t){let d=c.getHours()/12>=1?"pm":"am";switch(l){case"a":case"aa":return t.dayPeriod(d,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(d,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(d,{width:"narrow",context:"formatting"});default:return t.dayPeriod(d,{width:"wide",context:"formatting"})}},b:function(c,l,t){let e=c.getHours(),d;switch(e===12?d=bm.noon:e===0?d=bm.midnight:d=e/12>=1?"pm":"am",l){case"b":case"bb":return t.dayPeriod(d,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(d,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(d,{width:"narrow",context:"formatting"});default:return t.dayPeriod(d,{width:"wide",context:"formatting"})}},B:function(c,l,t){let e=c.getHours(),d;switch(e>=17?d=bm.evening:e>=12?d=bm.afternoon:e>=4?d=bm.morning:d=bm.night,l){case"B":case"BB":case"BBB":return t.dayPeriod(d,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(d,{width:"narrow",context:"formatting"});default:return t.dayPeriod(d,{width:"wide",context:"formatting"})}},h:function(c,l,t){if(l==="ho"){let e=c.getHours()%12;return e===0&&(e=12),t.ordinalNumber(e,{unit:"hour"})}return Yn.h(c,l)},H:function(c,l,t){return l==="Ho"?t.ordinalNumber(c.getHours(),{unit:"hour"}):Yn.H(c,l)},K:function(c,l,t){let e=c.getHours()%12;return l==="Ko"?t.ordinalNumber(e,{unit:"hour"}):ll(e,l.length)},k:function(c,l,t){let e=c.getHours();return e===0&&(e=24),l==="ko"?t.ordinalNumber(e,{unit:"hour"}):ll(e,l.length)},m:function(c,l,t){return l==="mo"?t.ordinalNumber(c.getMinutes(),{unit:"minute"}):Yn.m(c,l)},s:function(c,l,t){return l==="so"?t.ordinalNumber(c.getSeconds(),{unit:"second"}):Yn.s(c,l)},S:function(c,l){return Yn.S(c,l)},X:function(c,l,t){let e=c.getTimezoneOffset();if(e===0)return"Z";switch(l){case"X":return u$(e);case"XXXX":case"XX":return Mi(e);default:return Mi(e,":")}},x:function(c,l,t){let e=c.getTimezoneOffset();switch(l){case"x":return u$(e);case"xxxx":case"xx":return Mi(e);default:return Mi(e,":")}},O:function(c,l,t){let e=c.getTimezoneOffset();switch(l){case"O":case"OO":case"OOO":return"GMT"+a$(e,":");default:return"GMT"+Mi(e,":")}},z:function(c,l,t){let e=c.getTimezoneOffset();switch(l){case"z":case"zz":case"zzz":return"GMT"+a$(e,":");default:return"GMT"+Mi(e,":")}},t:function(c,l,t){let e=Math.trunc(+c/1e3);return ll(e,l.length)},T:function(c,l,t){return ll(+c,l.length)}};function a$(c,l=""){let t=c>0?"-":"+",e=Math.abs(c),d=Math.trunc(e/60),b=e%60;return b===0?t+String(d):t+String(d)+l+ll(b,2)}function u$(c,l){return c%60===0?(c>0?"-":"+")+ll(Math.abs(c)/60,2):Mi(c,l)}function Mi(c,l=""){let t=c>0?"-":"+",e=Math.abs(c),d=ll(Math.trunc(e/60),2),b=ll(e%60,2);return t+d+l+b}var m$=(c,l)=>{switch(c){case"P":return l.date({width:"short"});case"PP":return l.date({width:"medium"});case"PPP":return l.date({width:"long"});default:return l.date({width:"full"})}},x$=(c,l)=>{switch(c){case"p":return l.time({width:"short"});case"pp":return l.time({width:"medium"});case"ppp":return l.time({width:"long"});default:return l.time({width:"full"})}},fHc=(c,l)=>{let t=c.match(/(P+)(p+)?/)||[],e=t[1],d=t[2];if(!d)return m$(c,l);let b;switch(e){case"P":b=l.dateTime({width:"short"});break;case"PP":b=l.dateTime({width:"medium"});break;case"PPP":b=l.dateTime({width:"long"});break;default:b=l.dateTime({width:"full"});break}return b.replace("{{date}}",m$(e,l)).replace("{{time}}",x$(d,l))},s$={p:x$,P:fHc};var SHc=/^D+$/,kHc=/^Y+$/,zHc=["D","DD","YY","YYYY"];function r$(c){return SHc.test(c)}function g$(c){return kHc.test(c)}function Z$(c,l,t){let e=AHc(c,l,t);if(console.warn(e),zHc.includes(c))throw new RangeError(e)}function AHc(c,l,t){let e=c[0]==="Y"?"years":"days of the month";return`Use \`${c.toLowerCase()}\` instead of \`${c}\` (in \`${l}\`) for formatting ${e} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var OHc=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,QHc=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wHc=/^'([^]*?)'?$/,THc=/''/g,DHc=/[a-zA-Z]/;function H$(c,l,t){let e=Co(),d=t?.locale??e.locale??wd,b=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??e.firstWeekContainsDate??e.locale?.options?.firstWeekContainsDate??1,o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??e.weekStartsOn??e.locale?.options?.weekStartsOn??0,n=Ic(c,t?.in);if(!Pq(n))throw new RangeError("Invalid time value");let G=l.match(QHc).map(i=>{let a=i[0];if(a==="p"||a==="P"){let m=s$[a];return m(i,d.formatLong)}return i}).join("").match(OHc).map(i=>{if(i==="''")return{isToken:!1,value:"'"};let a=i[0];if(a==="'")return{isToken:!1,value:LHc(i)};if(AY[a])return{isToken:!0,value:i};if(a.match(DHc))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return{isToken:!1,value:i}});d.localize.preprocessor&&(G=d.localize.preprocessor(n,G));let X={firstWeekContainsDate:b,weekStartsOn:o,locale:d};return G.map(i=>{if(!i.isToken)return i.value;let a=i.value;(!t?.useAdditionalWeekYearTokens&&g$(a)||!t?.useAdditionalDayOfYearTokens&&r$(a))&&Z$(a,l,String(c));let m=AY[a[0]];return m(n,a,d.localize,X)}).join("")}function LHc(c){let l=c.match(wHc);return l?l[1].replace(THc,"'"):c}function R$(c,l){let t=Ic(c,l?.in),e=t.getFullYear(),d=t.getMonth(),b=Ec(t,0);return b.setFullYear(e,d+1,0),b.setHours(0,0,0,0),b.getDate()}function I$(c,l){return Ic(c,l?.in).getMonth()}function W$(c,l){return Ic(c,l?.in).getFullYear()}function p$(c,l){return+Ic(c)>+Ic(l)}function B$(c,l){return+Ic(c)<+Ic(l)}function y$(c,l,t){let[e,d]=Qd(t?.in,c,l);return e.getFullYear()===d.getFullYear()&&e.getMonth()===d.getMonth()}function V$(c,l,t){let[e,d]=Qd(t?.in,c,l);return e.getFullYear()===d.getFullYear()}function C$(c,l,t){let e=Ic(c,t?.in),d=e.getFullYear(),b=e.getDate(),o=Ec(t?.in||c,0);o.setFullYear(d,l,15),o.setHours(0,0,0,0);let n=R$(o);return e.setMonth(l,Math.min(b,n)),e}function J$(c,l,t){let e=Ic(c,t?.in);return isNaN(+e)?Ec(t?.in||c,NaN):(e.setFullYear(l),e)}function h$(c,l){let t=l.startOfMonth(c),e=t.getDay()>0?t.getDay():7,d=l.addDays(c,-e+1),b=l.addDays(d,34);return l.getMonth(c)===l.getMonth(b)?5:4}function O5(c,l){let t=l.startOfMonth(c),e=t.getDay();return e===1?t:e===0?l.addDays(t,-6):l.addDays(t,-1*(e-1))}function Y$(c,l){let t=O5(c,l),e=h$(c,l);return l.addDays(t,e*7-1)}var Xt=class{constructor(l,t){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?tt.tz(this.options.timeZone):new this.Date,this.newDate=(e,d,b)=>this.overrides?.newDate?this.overrides.newDate(e,d,b):this.options.timeZone?new tt(e,d,b,this.options.timeZone):new Date(e,d,b),this.addDays=(e,d)=>this.overrides?.addDays?this.overrides.addDays(e,d):J5(e,d),this.addMonths=(e,d)=>this.overrides?.addMonths?this.overrides.addMonths(e,d):h5(e,d),this.addWeeks=(e,d)=>this.overrides?.addWeeks?this.overrides.addWeeks(e,d):Lq(e,d),this.addYears=(e,d)=>this.overrides?.addYears?this.overrides.addYears(e,d):Uq(e,d),this.differenceInCalendarDays=(e,d)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,d):F5(e,d),this.differenceInCalendarMonths=(e,d)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,d):Kq(e,d),this.eachMonthOfInterval=e=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(e):$q(e),this.endOfBroadcastWeek=e=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(e):Y$(e,this),this.endOfISOWeek=e=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(e):t$(e),this.endOfMonth=e=>this.overrides?.endOfMonth?this.overrides.endOfMonth(e):_q(e),this.endOfWeek=(e,d)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(e,d):f5(e,this.options),this.endOfYear=e=>this.overrides?.endOfYear?this.overrides.endOfYear(e):l$(e),this.format=(e,d,b)=>{let o=this.overrides?.format?this.overrides.format(e,d,this.options):H$(e,d,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(o):o},this.getISOWeek=e=>this.overrides?.getISOWeek?this.overrides.getISOWeek(e):k5(e),this.getMonth=(e,d)=>this.overrides?.getMonth?this.overrides.getMonth(e,this.options):I$(e,this.options),this.getYear=(e,d)=>this.overrides?.getYear?this.overrides.getYear(e,this.options):W$(e,this.options),this.getWeek=(e,d)=>this.overrides?.getWeek?this.overrides.getWeek(e,this.options):A5(e,this.options),this.isAfter=(e,d)=>this.overrides?.isAfter?this.overrides.isAfter(e,d):p$(e,d),this.isBefore=(e,d)=>this.overrides?.isBefore?this.overrides.isBefore(e,d):B$(e,d),this.isDate=e=>this.overrides?.isDate?this.overrides.isDate(e):v5(e),this.isSameDay=(e,d)=>this.overrides?.isSameDay?this.overrides.isSameDay(e,d):Mq(e,d),this.isSameMonth=(e,d)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(e,d):y$(e,d),this.isSameYear=(e,d)=>this.overrides?.isSameYear?this.overrides.isSameYear(e,d):V$(e,d),this.max=e=>this.overrides?.max?this.overrides.max(e):jq(e),this.min=e=>this.overrides?.min?this.overrides.min(e):Eq(e),this.setMonth=(e,d)=>this.overrides?.setMonth?this.overrides.setMonth(e,d):C$(e,d),this.setYear=(e,d)=>this.overrides?.setYear?this.overrides.setYear(e,d):J$(e,d),this.startOfBroadcastWeek=(e,d)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(e,this):O5(e,this),this.startOfDay=e=>this.overrides?.startOfDay?this.overrides.startOfDay(e):jG(e),this.startOfISOWeek=e=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(e):hn(e),this.startOfMonth=e=>this.overrides?.startOfMonth?this.overrides.startOfMonth(e):c$(e),this.startOfWeek=(e,d)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(e,this.options):Cb(e,this.options),this.startOfYear=e=>this.overrides?.startOfYear?this.overrides.startOfYear(e):N5(e),this.options={locale:wd,...l},this.overrides=t}getDigitMap(){let{numerals:l="latn"}=this.options,t=new Intl.NumberFormat("en-US",{numberingSystem:l}),e={};for(let d=0;d<10;d++)e[d.toString()]=t.format(d);return e}replaceDigits(l){let t=this.getDigitMap();return l.replace(/\d/g,e=>t[e]||e)}formatNumber(l){return this.replaceDigits(l.toString())}},et=new Xt;var om=class{constructor(l,t,e=et){this.date=l,this.displayMonth=t,this.outside=!!(t&&!e.isSameMonth(l,t)),this.dateLib=e}isEqualTo(l){return this.dateLib.isSameDay(l.date,this.date)&&this.dateLib.isSameMonth(l.displayMonth,this.displayMonth)}};var Q5=class{constructor(l,t){this.date=l,this.weeks=t}};var w5=class{constructor(l,t){this.days=t,this.weekNumber=l}};function Oe(c,l,t=!1,e=et){let{from:d,to:b}=c,{differenceInCalendarDays:o,isSameDay:n}=e;return d&&b?(o(b,d)<0&&([d,b]=[b,d]),o(l,d)>=(t?1:0)&&o(b,l)>=(t?1:0)):!t&&b?n(b,l):!t&&d?n(d,l):!1}function T5(c){return!!(c&&typeof c=="object"&&"before"in c&&"after"in c)}function nm(c){return!!(c&&typeof c=="object"&&"from"in c)}function D5(c){return!!(c&&typeof c=="object"&&"after"in c)}function L5(c){return!!(c&&typeof c=="object"&&"before"in c)}function U5(c){return!!(c&&typeof c=="object"&&"dayOfWeek"in c)}function j5(c,l){return Array.isArray(c)&&c.every(l.isDate)}function Td(c,l,t=et){let e=Array.isArray(l)?l:[l],{isSameDay:d,differenceInCalendarDays:b,isAfter:o}=t;return e.some(n=>{if(typeof n=="boolean")return n;if(t.isDate(n))return d(c,n);if(j5(n,t))return n.includes(c);if(nm(n))return Oe(n,c,!1,t);if(U5(n))return Array.isArray(n.dayOfWeek)?n.dayOfWeek.includes(c.getDay()):n.dayOfWeek===c.getDay();if(T5(n)){let G=b(n.before,c),X=b(n.after,c),i=G>0,a=X<0;return o(n.before,n.after)?a&&i:i||a}return D5(n)?b(c,n.after)>0:L5(n)?b(n.before,c)>0:typeof n=="function"?n(c):!1})}function F$(c,l,t){let{disabled:e,hidden:d,modifiers:b,showOutsideDays:o,broadcastCalendar:n,today:G}=l,{isSameDay:X,isSameMonth:i,startOfMonth:a,isBefore:m,endOfMonth:x,isAfter:s}=t,r=l.startMonth&&a(l.startMonth),g=l.endMonth&&x(l.endMonth),Z={[xl.focused]:[],[xl.outside]:[],[xl.disabled]:[],[xl.hidden]:[],[xl.today]:[]},H={};for(let R of c){let{date:W,displayMonth:I}=R,B=!!(I&&!i(W,I)),p=!!(r&&m(W,r)),y=!!(g&&s(W,g)),h=!!(e&&Td(W,e,t)),C=!!(d&&Td(W,d,t))||p||y||!n&&!o&&B||n&&o===!1&&B,J=X(W,G??t.today());B&&Z.outside.push(R),h&&Z.disabled.push(R),C&&Z.hidden.push(R),J&&Z.today.push(R),b&&Object.keys(b).forEach(f=>{let k=b?.[f];k&&Td(W,k,t)&&(H[f]?H[f].push(R):H[f]=[R])})}return R=>{let W={[xl.focused]:!1,[xl.disabled]:!1,[xl.hidden]:!1,[xl.outside]:!1,[xl.today]:!1},I={};for(let B in Z){let p=Z[B];W[B]=p.some(y=>y===R)}for(let B in H)I[B]=H[B].some(p=>p===R);return{...W,...I}}}function v$(c,l,t={}){return Object.entries(c).filter(([,d])=>d===!0).reduce((d,[b])=>(t[b]?d.push(t[b]):l[xl[b]]?d.push(l[xl[b]]):l[Ae[b]]&&d.push(l[Ae[b]]),d),[l[rc.Day]])}var wY={};qG(wY,{Button:()=>UHc,CaptionLabel:()=>jHc,Chevron:()=>EHc,Day:()=>MHc,DayButton:()=>PHc,Dropdown:()=>KHc,DropdownNav:()=>_Hc,Footer:()=>qHc,Month:()=>$Hc,MonthCaption:()=>cRc,MonthGrid:()=>lRc,Months:()=>tRc,MonthsDropdown:()=>eRc,Nav:()=>dRc,NextMonthButton:()=>bRc,Option:()=>oRc,PreviousMonthButton:()=>nRc,Root:()=>GRc,Select:()=>XRc,Week:()=>iRc,WeekNumber:()=>mRc,WeekNumberHeader:()=>xRc,Weekday:()=>aRc,Weekdays:()=>uRc,Weeks:()=>sRc,YearsDropdown:()=>rRc});var N$=u(E(),1);function UHc(c){return N$.default.createElement("button",{...c})}var f$=u(E(),1);function jHc(c){return f$.default.createElement("span",{...c})}var Gm=u(E(),1);function EHc(c){let{size:l=24,orientation:t="left",className:e}=c;return Gm.default.createElement("svg",{className:e,width:l,height:l,viewBox:"0 0 24 24"},t==="up"&&Gm.default.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),t==="down"&&Gm.default.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),t==="left"&&Gm.default.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),t==="right"&&Gm.default.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}var S$=u(E(),1);function MHc(c){let{day:l,modifiers:t,...e}=c;return S$.default.createElement("td",{...e})}var E5=u(E(),1);function PHc(c){let{day:l,modifiers:t,...e}=c,d=E5.default.useRef(null);return E5.default.useEffect(()=>{t.focused&&d.current?.focus()},[t.focused]),E5.default.createElement("button",{ref:d,...e})}var Xm=u(E(),1);function KHc(c){let{options:l,className:t,components:e,classNames:d,...b}=c,o=[d[rc.Dropdown],t].join(" "),n=l?.find(({value:G})=>G===b.value);return Xm.default.createElement("span",{"data-disabled":b.disabled,className:d[rc.DropdownRoot]},Xm.default.createElement(e.Select,{className:o,...b},l?.map(({value:G,label:X,disabled:i})=>Xm.default.createElement(e.Option,{key:G,value:G,disabled:i},X))),Xm.default.createElement("span",{className:d[rc.CaptionLabel],"aria-hidden":!0},n?.label,Xm.default.createElement(e.Chevron,{orientation:"down",size:18,className:d[rc.Chevron]})))}var k$=u(E(),1);function _Hc(c){return k$.default.createElement("div",{...c})}var z$=u(E(),1);function qHc(c){return z$.default.createElement("div",{...c})}var A$=u(E(),1);function $Hc(c){let{calendarMonth:l,displayIndex:t,...e}=c;return A$.default.createElement("div",{...e},c.children)}var O$=u(E(),1);function cRc(c){let{calendarMonth:l,displayIndex:t,...e}=c;return O$.default.createElement("div",{...e})}var Q$=u(E(),1);function lRc(c){return Q$.default.createElement("table",{...c})}var w$=u(E(),1);function tRc(c){return w$.default.createElement("div",{...c})}var T$=u(E(),1);var M5=u(E(),1),OY=(0,M5.createContext)(void 0);function Jo(){let c=(0,M5.useContext)(OY);if(c===void 0)throw new Error("useDayPicker() must be used within a custom component.");return c}function eRc(c){let{components:l}=Jo();return T$.default.createElement(l.Dropdown,{...c})}var Fn=u(E(),1);function dRc(c){let{onPreviousClick:l,onNextClick:t,previousMonth:e,nextMonth:d,...b}=c,{components:o,classNames:n,labels:{labelPrevious:G,labelNext:X}}=Jo(),i=(0,Fn.useCallback)(m=>{d&&t?.(m)},[d,t]),a=(0,Fn.useCallback)(m=>{e&&l?.(m)},[e,l]);return Fn.default.createElement("nav",{...b},Fn.default.createElement(o.PreviousMonthButton,{type:"button",className:n[rc.PreviousMonthButton],tabIndex:e?void 0:-1,"aria-disabled":e?void 0:!0,"aria-label":G(e),onClick:a},Fn.default.createElement(o.Chevron,{disabled:e?void 0:!0,className:n[rc.Chevron],orientation:"left"})),Fn.default.createElement(o.NextMonthButton,{type:"button",className:n[rc.NextMonthButton],tabIndex:d?void 0:-1,"aria-disabled":d?void 0:!0,"aria-label":X(d),onClick:i},Fn.default.createElement(o.Chevron,{disabled:d?void 0:!0,orientation:"right",className:n[rc.Chevron]})))}var D$=u(E(),1);function bRc(c){let{components:l}=Jo();return D$.default.createElement(l.Button,{...c})}var L$=u(E(),1);function oRc(c){return L$.default.createElement("option",{...c})}var U$=u(E(),1);function nRc(c){let{components:l}=Jo();return U$.default.createElement(l.Button,{...c})}var j$=u(E(),1);function GRc(c){let{rootRef:l,...t}=c;return j$.default.createElement("div",{...t,ref:l})}var E$=u(E(),1);function XRc(c){return E$.default.createElement("select",{...c})}var M$=u(E(),1);function iRc(c){let{week:l,...t}=c;return M$.default.createElement("tr",{...t})}var P$=u(E(),1);function aRc(c){return P$.default.createElement("th",{...c})}var QY=u(E(),1);function uRc(c){return QY.default.createElement("thead",{"aria-hidden":!0},QY.default.createElement("tr",{...c}))}var K$=u(E(),1);function mRc(c){let{week:l,...t}=c;return K$.default.createElement("th",{...t})}var _$=u(E(),1);function xRc(c){return _$.default.createElement("th",{...c})}var q$=u(E(),1);function sRc(c){return q$.default.createElement("tbody",{...c})}var $$=u(E(),1);function rRc(c){let{components:l}=Jo();return $$.default.createElement(l.Dropdown,{...c})}function ccc(c){return{...wY,...c}}function lcc(c){let l={"data-mode":c.mode??void 0,"data-required":"required"in c?c.required:void 0,"data-multiple-months":c.numberOfMonths&&c.numberOfMonths>1||void 0,"data-week-numbers":c.showWeekNumber||void 0,"data-broadcast-calendar":c.broadcastCalendar||void 0,"data-nav-layout":c.navLayout||void 0};return Object.entries(c).forEach(([t,e])=>{t.startsWith("data-")&&(l[t]=e)}),l}function tcc(){let c={};for(let l in rc)c[rc[l]]=`rdp-${rc[l]}`;for(let l in xl)c[xl[l]]=`rdp-${xl[l]}`;for(let l in Ae)c[Ae[l]]=`rdp-${Ae[l]}`;for(let l in He)c[He[l]]=`rdp-${He[l]}`;return c}var TY={};qG(TY,{formatCaption:()=>ecc,formatDay:()=>ZRc,formatMonthCaption:()=>gRc,formatMonthDropdown:()=>HRc,formatWeekNumber:()=>RRc,formatWeekNumberHeader:()=>IRc,formatWeekdayName:()=>WRc,formatYearCaption:()=>pRc,formatYearDropdown:()=>dcc});function ecc(c,l,t){return(t??new Xt(l)).format(c,"LLLL y")}var gRc=ecc;function ZRc(c,l,t){return(t??new Xt(l)).format(c,"d")}function HRc(c,l=et){return l.format(c,"LLLL")}function RRc(c,l=et){return c<10?l.formatNumber(`0${c.toLocaleString()}`):l.formatNumber(`${c.toLocaleString()}`)}function IRc(){return""}function WRc(c,l,t){return(t??new Xt(l)).format(c,"cccccc")}function dcc(c,l=et){return l.format(c,"yyyy")}var pRc=dcc;function bcc(c){return c?.formatMonthCaption&&!c.formatCaption&&(c.formatCaption=c.formatMonthCaption),c?.formatYearCaption&&!c.formatYearDropdown&&(c.formatYearDropdown=c.formatYearCaption),{...TY,...c}}function occ(c,l,t,e,d){let{startOfMonth:b,startOfYear:o,endOfYear:n,eachMonthOfInterval:G,getMonth:X}=d;return G({start:o(c),end:n(c)}).map(m=>{let x=e.formatMonthDropdown(m,d),s=X(m),r=l&&m<b(l)||t&&m>b(t)||!1;return{value:s,label:x,disabled:r}})}function ncc(c,l={},t={}){let e={...l?.[rc.Day]};return Object.entries(c).filter(([,d])=>d===!0).forEach(([d])=>{e={...e,...t?.[d]}}),e}function Gcc(c,l,t){let e=c.today(),d=t?c.startOfBroadcastWeek(e,c):l?c.startOfISOWeek(e):c.startOfWeek(e),b=[];for(let o=0;o<7;o++){let n=c.addDays(d,o);b.push(n)}return b}function Xcc(c,l,t,e){if(!c||!l)return;let{startOfYear:d,endOfYear:b,addYears:o,getYear:n,isBefore:G,isSameYear:X}=e,i=d(c),a=b(l),m=[],x=i;for(;G(x,a)||X(x,a);)m.push(x),x=o(x,1);return m.map(s=>{let r=t.formatYearDropdown(s,e);return{value:n(s),label:r,disabled:!1}})}var DY={};qG(DY,{labelCaption:()=>BRc,labelDay:()=>VRc,labelDayButton:()=>acc,labelGrid:()=>icc,labelGridcell:()=>yRc,labelMonthDropdown:()=>JRc,labelNav:()=>CRc,labelNext:()=>hRc,labelPrevious:()=>YRc,labelWeekNumber:()=>vRc,labelWeekNumberHeader:()=>NRc,labelWeekday:()=>FRc,labelYearDropdown:()=>fRc});function icc(c,l,t){return(t??new Xt(l)).format(c,"LLLL y")}var BRc=icc;function yRc(c,l,t,e){let d=(e??new Xt(t)).format(c,"PPPP");return l?.today&&(d=`Today, ${d}`),d}function acc(c,l,t,e){let d=(e??new Xt(t)).format(c,"PPPP");return l.today&&(d=`Today, ${d}`),l.selected&&(d=`${d}, selected`),d}var VRc=acc;function CRc(){return""}function JRc(c){return"Choose the Month"}function hRc(c){return"Go to the Next Month"}function YRc(c){return"Go to the Previous Month"}function FRc(c,l,t){return(t??new Xt(l)).format(c,"cccc")}function vRc(c,l){return`Week ${c}`}function NRc(c){return"Week Number"}function fRc(c){return"Choose the Year"}var im=u(E(),1);var ng=c=>c instanceof HTMLElement?c:null,LY=c=>[...c.querySelectorAll("[data-animated-month]")??[]],SRc=c=>ng(c.querySelector("[data-animated-month]")),UY=c=>ng(c.querySelector("[data-animated-caption]")),jY=c=>ng(c.querySelector("[data-animated-weeks]")),kRc=c=>ng(c.querySelector("[data-animated-nav]")),zRc=c=>ng(c.querySelector("[data-animated-weekdays]"));function ucc(c,l,{classNames:t,months:e,focused:d,dateLib:b}){let o=(0,im.useRef)(null),n=(0,im.useRef)(e),G=(0,im.useRef)(!1);(0,im.useLayoutEffect)(()=>{let X=n.current;if(n.current=e,!l||!c.current||!(c.current instanceof HTMLElement)||e.length===0||X.length===0||e.length!==X.length)return;let i=b.isSameMonth(e[0].date,X[0].date),a=b.isAfter(e[0].date,X[0].date),m=a?t[He.caption_after_enter]:t[He.caption_before_enter],x=a?t[He.weeks_after_enter]:t[He.weeks_before_enter],s=o.current,r=c.current.cloneNode(!0);if(r instanceof HTMLElement?(LY(r).forEach(R=>{if(!(R instanceof HTMLElement))return;let W=SRc(R);W&&R.contains(W)&&R.removeChild(W);let I=UY(R);I&&I.classList.remove(m);let B=jY(R);B&&B.classList.remove(x)}),o.current=r):o.current=null,G.current||i||d)return;let g=s instanceof HTMLElement?LY(s):[],Z=LY(c.current);if(Z&&Z.every(H=>H instanceof HTMLElement)&&g&&g.every(H=>H instanceof HTMLElement)){G.current=!0;let H=[];c.current.style.isolation="isolate";let R=kRc(c.current);R&&(R.style.zIndex="1"),Z.forEach((W,I)=>{let B=g[I];if(!B)return;W.style.position="relative",W.style.overflow="hidden";let p=UY(W);p&&p.classList.add(m);let y=jY(W);y&&y.classList.add(x);let h=()=>{G.current=!1,c.current&&(c.current.style.isolation=""),R&&(R.style.zIndex=""),p&&p.classList.remove(m),y&&y.classList.remove(x),W.style.position="",W.style.overflow="",W.contains(B)&&W.removeChild(B)};H.push(h),B.style.pointerEvents="none",B.style.position="absolute",B.style.overflow="hidden",B.setAttribute("aria-hidden","true");let C=zRc(B);C&&(C.style.opacity="0");let J=UY(B);J&&(J.classList.add(a?t[He.caption_before_exit]:t[He.caption_after_exit]),J.addEventListener("animationend",h));let f=jY(B);f&&f.classList.add(a?t[He.weeks_before_exit]:t[He.weeks_after_exit]),W.insertBefore(B,W.firstChild)})}})}var Wcc=u(E(),1);function mcc(c,l,t,e){let d=c[0],b=c[c.length-1],{ISOWeek:o,fixedWeeks:n,broadcastCalendar:G}=t??{},{addDays:X,differenceInCalendarDays:i,differenceInCalendarMonths:a,endOfBroadcastWeek:m,endOfISOWeek:x,endOfMonth:s,endOfWeek:r,isAfter:g,startOfBroadcastWeek:Z,startOfISOWeek:H,startOfWeek:R}=e,W=G?Z(d,e):o?H(d):R(d),I=G?m(b):o?x(s(b)):r(s(b)),B=i(I,W),p=a(b,d)+1,y=[];for(let J=0;J<=B;J++){let f=X(W,J);if(l&&g(f,l))break;y.push(f)}let C=(G?35:42)*p;if(n&&y.length<C){let J=C-y.length;for(let f=0;f<J;f++){let k=X(y[y.length-1],1);y.push(k)}}return y}function xcc(c){let l=[];return c.reduce((t,e)=>{let d=e.weeks.reduce((b,o)=>[...b,...o.days],l);return[...t,...d]},l)}function scc(c,l,t,e){let{numberOfMonths:d=1}=t,b=[];for(let o=0;o<d;o++){let n=e.addMonths(c,o);if(l&&n>l)break;b.push(n)}return b}function EY(c,l){let{month:t,defaultMonth:e,today:d=l.today(),numberOfMonths:b=1,endMonth:o,startMonth:n}=c,G=t||e||d,{differenceInCalendarMonths:X,addMonths:i,startOfMonth:a}=l;if(o&&X(o,G)<0){let m=-1*(b-1);G=i(o,m)}return n&&X(G,n)<0&&(G=n),a(G)}function rcc(c,l,t,e){let{addDays:d,endOfBroadcastWeek:b,endOfISOWeek:o,endOfMonth:n,endOfWeek:G,getISOWeek:X,getWeek:i,startOfBroadcastWeek:a,startOfISOWeek:m,startOfWeek:x}=e,s=c.reduce((r,g)=>{let Z=t.broadcastCalendar?a(g,e):t.ISOWeek?m(g):x(g),H=t.broadcastCalendar?b(g):t.ISOWeek?o(n(g)):G(n(g)),R=l.filter(p=>p>=Z&&p<=H),W=t.broadcastCalendar?35:42;if(t.fixedWeeks&&R.length<W){let p=l.filter(y=>{let h=W-R.length;return y>H&&y<=d(H,h)});R.push(...p)}let I=R.reduce((p,y)=>{let h=t.ISOWeek?X(y):i(y),C=p.find(f=>f.weekNumber===h),J=new om(y,g,e);return C?C.days.push(J):p.push(new w5(h,[J])),p},[]),B=new Q5(g,I);return r.push(B),r},[]);return t.reverseMonths?s.reverse():s}function gcc(c,l){let{startMonth:t,endMonth:e}=c,{startOfYear:d,startOfDay:b,startOfMonth:o,endOfMonth:n,addYears:G,endOfYear:X,newDate:i,today:a}=l,{fromYear:m,toYear:x,fromMonth:s,toMonth:r}=c;!t&&s&&(t=s),!t&&m&&(t=l.newDate(m,0,1)),!e&&r&&(e=r),!e&&x&&(e=i(x,11,31));let g=c.captionLayout==="dropdown"||c.captionLayout==="dropdown-years";return t?t=o(t):m?t=i(m,0,1):!t&&g&&(t=d(G(c.today??a(),-100))),e?e=n(e):x?e=i(x,11,31):!e&&g&&(e=X(c.today??a())),[t&&b(t),e&&b(e)]}function Zcc(c,l,t,e){if(t.disableNavigation)return;let{pagedNavigation:d,numberOfMonths:b=1}=t,{startOfMonth:o,addMonths:n,differenceInCalendarMonths:G}=e,X=d?b:1,i=o(c);if(!l)return n(i,X);if(!(G(l,c)<b))return n(i,X)}function Hcc(c,l,t,e){if(t.disableNavigation)return;let{pagedNavigation:d,numberOfMonths:b}=t,{startOfMonth:o,addMonths:n,differenceInCalendarMonths:G}=e,X=d?b??1:1,i=o(c);if(!l)return n(i,-X);if(!(G(i,l)<=0))return n(i,-X)}function Rcc(c){let l=[];return c.reduce((t,e)=>[...t,...e.weeks],l)}var Icc=u(E(),1);function EG(c,l){let[t,e]=(0,Icc.useState)(c);return[l===void 0?t:l,e]}function pcc(c,l){let[t,e]=gcc(c,l),{startOfMonth:d,endOfMonth:b}=l,o=EY(c,l),[n,G]=EG(o,c.month?o:void 0);(0,Wcc.useEffect)(()=>{let B=EY(c,l);G(B)},[c.timeZone]);let X=scc(n,e,c,l),i=mcc(X,c.endMonth?b(c.endMonth):void 0,c,l),a=rcc(X,i,c,l),m=Rcc(a),x=xcc(a),s=Hcc(n,t,c,l),r=Zcc(n,e,c,l),{disableNavigation:g,onMonthChange:Z}=c,H=B=>m.some(p=>p.days.some(y=>y.isEqualTo(B))),R=B=>{if(g)return;let p=d(B);t&&p<d(t)&&(p=d(t)),e&&p>d(e)&&(p=d(e)),G(p),Z?.(p)};return{months:a,weeks:m,days:x,navStart:t,navEnd:e,previousMonth:s,nextMonth:r,goToMonth:R,goToDay:B=>{H(B)||R(B.date)}}}var PY=u(E(),1);var ho;(function(c){c[c.Today=0]="Today",c[c.Selected=1]="Selected",c[c.LastFocused=2]="LastFocused",c[c.FocusedModifier=3]="FocusedModifier"})(ho||(ho={}));function Bcc(c){return!c[xl.disabled]&&!c[xl.hidden]&&!c[xl.outside]}function ycc(c,l,t,e){let d,b=-1;for(let o of c){let n=l(o);Bcc(n)&&(n[xl.focused]&&b<ho.FocusedModifier?(d=o,b=ho.FocusedModifier):e?.isEqualTo(o)&&b<ho.LastFocused?(d=o,b=ho.LastFocused):t(o.date)&&b<ho.Selected?(d=o,b=ho.Selected):n[xl.today]&&b<ho.Today&&(d=o,b=ho.Today))}return d||(d=c.find(o=>Bcc(l(o)))),d}function Vcc(c,l,t,e,d,b,o){let{ISOWeek:n,broadcastCalendar:G}=b,{addDays:X,addMonths:i,addWeeks:a,addYears:m,endOfBroadcastWeek:x,endOfISOWeek:s,endOfWeek:r,max:g,min:Z,startOfBroadcastWeek:H,startOfISOWeek:R,startOfWeek:W}=o,B={day:X,week:a,month:i,year:m,startOfWeek:p=>G?H(p,o):n?R(p):W(p),endOfWeek:p=>G?x(p):n?s(p):r(p)}[c](t,l==="after"?1:-1);return l==="before"&&e?B=g([e,B]):l==="after"&&d&&(B=Z([d,B])),B}function MY(c,l,t,e,d,b,o,n=0){if(n>365)return;let G=Vcc(c,l,t.date,e,d,b,o),X=!!(b.disabled&&Td(G,b.disabled,o)),i=!!(b.hidden&&Td(G,b.hidden,o)),a=G,m=new om(G,a,o);return!X&&!i?m:MY(c,l,m,e,d,b,o,n+1)}function Ccc(c,l,t,e,d){let{autoFocus:b}=c,[o,n]=(0,PY.useState)(),G=ycc(l.days,t,e||(()=>!1),o),[X,i]=(0,PY.useState)(b?G:void 0);return{isFocusTarget:r=>!!G?.isEqualTo(r),setFocused:i,focused:X,blur:()=>{n(X),i(void 0)},moveFocus:(r,g)=>{if(!X)return;let Z=MY(r,g,X,l.navStart,l.navEnd,c,d);Z&&(l.goToDay(Z),i(Z))}}}function Jcc(c,l){let{selected:t,required:e,onSelect:d}=c,[b,o]=EG(t,d?t:void 0),n=d?t:b,{isSameDay:G}=l,X=x=>n?.some(s=>G(s,x))??!1,{min:i,max:a}=c;return{selected:n,select:(x,s,r)=>{let g=[...n??[]];if(X(x)){if(n?.length===i||e&&n?.length===1)return;g=n?.filter(Z=>!G(Z,x))}else n?.length===a?g=[x]:g=[...g,x];return d||o(g),d?.(g,x,s,r),g},isSelected:X}}function hcc(c,l,t=0,e=0,d=!1,b=et){let{from:o,to:n}=l||{},{isSameDay:G,isAfter:X,isBefore:i}=b,a;if(!o&&!n)a={from:c,to:t>0?void 0:c};else if(o&&!n)G(o,c)?d?a={from:o,to:void 0}:a=void 0:i(c,o)?a={from:c,to:o}:a={from:o,to:c};else if(o&&n)if(G(o,c)&&G(n,c))d?a={from:o,to:n}:a=void 0;else if(G(o,c))a={from:o,to:t>0?void 0:c};else if(G(n,c))a={from:c,to:t>0?void 0:c};else if(i(c,o))a={from:c,to:n};else if(X(c,o))a={from:o,to:c};else if(X(c,n))a={from:o,to:c};else throw new Error("Invalid range");if(a?.from&&a?.to){let m=b.differenceInCalendarDays(a.to,a.from);e>0&&m>e?a={from:c,to:void 0}:t>1&&m<t&&(a={from:c,to:void 0})}return a}function Ycc(c,l,t=et){let e=Array.isArray(l)?l:[l],d=c.from,b=t.differenceInCalendarDays(c.to,c.from),o=Math.min(b,6);for(let n=0;n<=o;n++){if(e.includes(d.getDay()))return!0;d=t.addDays(d,1)}return!1}function KY(c,l,t=et){return Oe(c,l.from,!1,t)||Oe(c,l.to,!1,t)||Oe(l,c.from,!1,t)||Oe(l,c.to,!1,t)}function P5(c,l,t=et){let e=Array.isArray(l)?l:[l];if(e.filter(n=>typeof n!="function").some(n=>typeof n=="boolean"?n:t.isDate(n)?Oe(c,n,!1,t):j5(n,t)?n.some(G=>Oe(c,G,!1,t)):nm(n)?n.from&&n.to?KY(c,{from:n.from,to:n.to},t):!1:U5(n)?Ycc(c,n.dayOfWeek,t):T5(n)?t.isAfter(n.before,n.after)?KY(c,{from:t.addDays(n.after,1),to:t.addDays(n.before,-1)},t):Td(c.from,n,t)||Td(c.to,n,t):D5(n)||L5(n)?Td(c.from,n,t)||Td(c.to,n,t):!1))return!0;let o=e.filter(n=>typeof n=="function");if(o.length){let n=c.from,G=t.differenceInCalendarDays(c.to,c.from);for(let X=0;X<=G;X++){if(o.some(i=>i(n)))return!0;n=t.addDays(n,1)}}return!1}function Fcc(c,l){let{disabled:t,excludeDisabled:e,selected:d,required:b,onSelect:o}=c,[n,G]=EG(d,o?d:void 0),X=o?d:n;return{selected:X,select:(m,x,s)=>{let{min:r,max:g}=c,Z=m?hcc(m,X,r,g,b,l):void 0;return e&&t&&Z?.from&&Z.to&&P5({from:Z.from,to:Z.to},t,l)&&(Z.from=m,Z.to=void 0),o||G(Z),o?.(Z,m,x,s),Z},isSelected:m=>X&&Oe(X,m,!1,l)}}function vcc(c,l){let{selected:t,required:e,onSelect:d}=c,[b,o]=EG(t,d?t:void 0),n=d?t:b,{isSameDay:G}=l;return{selected:n,select:(a,m,x)=>{let s=a;return!e&&n&&n&&G(a,n)&&(s=void 0),d||o(s),d?.(s,a,m,x),s},isSelected:a=>n?G(n,a):!1}}function Ncc(c,l){let t=vcc(c,l),e=Jcc(c,l),d=Fcc(c,l);switch(c.mode){case"single":return t;case"multiple":return e;case"range":return d;default:return}}function K5(c){let l=c;l.timeZone&&(l={...c},l.today&&(l.today=new tt(l.today,l.timeZone)),l.month&&(l.month=new tt(l.month,l.timeZone)),l.defaultMonth&&(l.defaultMonth=new tt(l.defaultMonth,l.timeZone)),l.startMonth&&(l.startMonth=new tt(l.startMonth,l.timeZone)),l.endMonth&&(l.endMonth=new tt(l.endMonth,l.timeZone)),l.mode==="single"&&l.selected?l.selected=new tt(l.selected,l.timeZone):l.mode==="multiple"&&l.selected?l.selected=l.selected?.map(Vc=>new tt(Vc,l.timeZone)):l.mode==="range"&&l.selected&&(l.selected={from:l.selected.from?new tt(l.selected.from,l.timeZone):void 0,to:l.selected.to?new tt(l.selected.to,l.timeZone):void 0}));let{components:t,formatters:e,labels:d,dateLib:b,locale:o,classNames:n}=(0,hc.useMemo)(()=>{let Vc={...wd,...l.locale};return{dateLib:new Xt({locale:Vc,weekStartsOn:l.broadcastCalendar?1:l.weekStartsOn,firstWeekContainsDate:l.firstWeekContainsDate,useAdditionalWeekYearTokens:l.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:l.useAdditionalDayOfYearTokens,timeZone:l.timeZone,numerals:l.numerals},l.dateLib),components:ccc(l.components),formatters:bcc(l.formatters),labels:{...DY,...l.labels},locale:Vc,classNames:{...tcc(),...l.classNames}}},[l.locale,l.broadcastCalendar,l.weekStartsOn,l.firstWeekContainsDate,l.useAdditionalWeekYearTokens,l.useAdditionalDayOfYearTokens,l.timeZone,l.numerals,l.dateLib,l.components,l.formatters,l.labels,l.classNames]),{captionLayout:G,mode:X,navLayout:i,numberOfMonths:a=1,onDayBlur:m,onDayClick:x,onDayFocus:s,onDayKeyDown:r,onDayMouseEnter:g,onDayMouseLeave:Z,onNextClick:H,onPrevClick:R,showWeekNumber:W,styles:I}=l,{formatCaption:B,formatDay:p,formatMonthDropdown:y,formatWeekNumber:h,formatWeekNumberHeader:C,formatWeekdayName:J,formatYearDropdown:f}=e,k=pcc(l,b),{days:F,months:T,navStart:L,navEnd:v,previousMonth:A,nextMonth:S,goToMonth:U}=k,P=F$(F,l,b),{isSelected:bc,select:j,selected:ec}=Ncc(l,b)??{},{blur:M,focused:oc,isFocusTarget:Hc,moveFocus:Bc,setFocused:wc}=Ccc(l,k,P,bc??(()=>!1),b),{labelDayButton:Wl,labelGridcell:sl,labelGrid:tl,labelMonthDropdown:gc,labelNav:Zl,labelPrevious:zl,labelNext:uc,labelWeekday:vc,labelWeekNumber:hl,labelWeekNumberHeader:Yc,labelYearDropdown:Al}=d,it=(0,hc.useMemo)(()=>Gcc(b,l.ISOWeek),[b,l.ISOWeek]),Re=X!==void 0||x!==void 0,Kt=(0,hc.useCallback)(()=>{A&&(U(A),R?.(A))},[A,U,R]),Qe=(0,hc.useCallback)(()=>{S&&(U(S),H?.(S))},[U,S,H]),Yo=(0,hc.useCallback)((Vc,nl)=>el=>{el.preventDefault(),el.stopPropagation(),wc(Vc),j?.(Vc.date,nl,el),x?.(Vc.date,nl,el)},[j,x,wc]),MG=(0,hc.useCallback)((Vc,nl)=>el=>{wc(Vc),s?.(Vc.date,nl,el)},[s,wc]),PG=(0,hc.useCallback)((Vc,nl)=>el=>{M(),m?.(Vc.date,nl,el)},[M,m]),KG=(0,hc.useCallback)((Vc,nl)=>el=>{let kt={ArrowLeft:["day",l.dir==="rtl"?"after":"before"],ArrowRight:["day",l.dir==="rtl"?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[el.shiftKey?"year":"month","before"],PageDown:[el.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(kt[el.key]){el.preventDefault(),el.stopPropagation();let[_t,Fo]=kt[el.key];Bc(_t,Fo)}r?.(Vc.date,nl,el)},[Bc,r,l.dir]),_G=(0,hc.useCallback)((Vc,nl)=>el=>{g?.(Vc.date,nl,el)},[g]),vn=(0,hc.useCallback)((Vc,nl)=>el=>{Z?.(Vc.date,nl,el)},[Z]),at=(0,hc.useCallback)(Vc=>nl=>{let el=Number(nl.target.value),kt=b.setMonth(b.startOfMonth(Vc),el);U(kt)},[b,U]),Ol=(0,hc.useCallback)(Vc=>nl=>{let el=Number(nl.target.value),kt=b.setYear(b.startOfMonth(Vc),el);U(kt)},[b,U]),{className:Ki,style:_i}=(0,hc.useMemo)(()=>({className:[n[rc.Root],l.className].filter(Boolean).join(" "),style:{...I?.[rc.Root],...l.style}}),[n,l.className,l.style,I]),dt=lcc(l),St=(0,hc.useRef)(null);ucc(St,!!l.animate,{classNames:n,months:T,focused:oc,dateLib:b});let id={dayPickerProps:l,selected:ec,select:j,isSelected:bc,months:T,nextMonth:S,previousMonth:A,goToMonth:U,getModifiers:P,components:t,classNames:n,styles:I,labels:d,formatters:e};return hc.default.createElement(OY.Provider,{value:id},hc.default.createElement(t.Root,{rootRef:l.animate?St:void 0,className:Ki,style:_i,dir:l.dir,id:l.id,lang:l.lang,nonce:l.nonce,title:l.title,role:l.role,"aria-label":l["aria-label"],...dt},hc.default.createElement(t.Months,{className:n[rc.Months],style:I?.[rc.Months]},!l.hideNavigation&&!i&&hc.default.createElement(t.Nav,{"data-animated-nav":l.animate?"true":void 0,className:n[rc.Nav],style:I?.[rc.Nav],"aria-label":Zl(),onPreviousClick:Kt,onNextClick:Qe,previousMonth:A,nextMonth:S}),T.map((Vc,nl)=>{let el=occ(Vc.date,L,v,e,b),kt=Xcc(L,v,e,b);return hc.default.createElement(t.Month,{"data-animated-month":l.animate?"true":void 0,className:n[rc.Month],style:I?.[rc.Month],key:nl,displayIndex:nl,calendarMonth:Vc},i==="around"&&!l.hideNavigation&&nl===0&&hc.default.createElement(t.PreviousMonthButton,{type:"button",className:n[rc.PreviousMonthButton],tabIndex:A?void 0:-1,"aria-disabled":A?void 0:!0,"aria-label":zl(A),onClick:Kt,"data-animated-button":l.animate?"true":void 0},hc.default.createElement(t.Chevron,{disabled:A?void 0:!0,className:n[rc.Chevron],orientation:l.dir==="rtl"?"right":"left"})),hc.default.createElement(t.MonthCaption,{"data-animated-caption":l.animate?"true":void 0,className:n[rc.MonthCaption],style:I?.[rc.MonthCaption],calendarMonth:Vc,displayIndex:nl},G?.startsWith("dropdown")?hc.default.createElement(t.DropdownNav,{className:n[rc.Dropdowns],style:I?.[rc.Dropdowns]},G==="dropdown"||G==="dropdown-months"?hc.default.createElement(t.MonthsDropdown,{className:n[rc.MonthsDropdown],"aria-label":gc(),classNames:n,components:t,disabled:!!l.disableNavigation,onChange:at(Vc.date),options:el,style:I?.[rc.Dropdown],value:b.getMonth(Vc.date)}):hc.default.createElement("span",null,y(Vc.date,b)),G==="dropdown"||G==="dropdown-years"?hc.default.createElement(t.YearsDropdown,{className:n[rc.YearsDropdown],"aria-label":Al(b.options),classNames:n,components:t,disabled:!!l.disableNavigation,onChange:Ol(Vc.date),options:kt,style:I?.[rc.Dropdown],value:b.getYear(Vc.date)}):hc.default.createElement("span",null,f(Vc.date,b)),hc.default.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},B(Vc.date,b.options,b))):hc.default.createElement(t.CaptionLabel,{className:n[rc.CaptionLabel],role:"status","aria-live":"polite"},B(Vc.date,b.options,b))),i==="around"&&!l.hideNavigation&&nl===a-1&&hc.default.createElement(t.NextMonthButton,{type:"button",className:n[rc.NextMonthButton],tabIndex:S?void 0:-1,"aria-disabled":S?void 0:!0,"aria-label":uc(S),onClick:Qe,"data-animated-button":l.animate?"true":void 0},hc.default.createElement(t.Chevron,{disabled:S?void 0:!0,className:n[rc.Chevron],orientation:l.dir==="rtl"?"left":"right"})),nl===a-1&&i==="after"&&!l.hideNavigation&&hc.default.createElement(t.Nav,{"data-animated-nav":l.animate?"true":void 0,className:n[rc.Nav],style:I?.[rc.Nav],"aria-label":Zl(),onPreviousClick:Kt,onNextClick:Qe,previousMonth:A,nextMonth:S}),hc.default.createElement(t.MonthGrid,{role:"grid","aria-multiselectable":X==="multiple"||X==="range","aria-label":tl(Vc.date,b.options,b)||void 0,className:n[rc.MonthGrid],style:I?.[rc.MonthGrid]},!l.hideWeekdays&&hc.default.createElement(t.Weekdays,{"data-animated-weekdays":l.animate?"true":void 0,className:n[rc.Weekdays],style:I?.[rc.Weekdays]},W&&hc.default.createElement(t.WeekNumberHeader,{"aria-label":Yc(b.options),className:n[rc.WeekNumberHeader],style:I?.[rc.WeekNumberHeader],scope:"col"},C()),it.map((_t,Fo)=>hc.default.createElement(t.Weekday,{"aria-label":vc(_t,b.options,b),className:n[rc.Weekday],key:Fo,style:I?.[rc.Weekday],scope:"col"},J(_t,b.options,b)))),hc.default.createElement(t.Weeks,{"data-animated-weeks":l.animate?"true":void 0,className:n[rc.Weeks],style:I?.[rc.Weeks]},Vc.weeks.map((_t,Fo)=>hc.default.createElement(t.Week,{className:n[rc.Week],key:_t.weekNumber,style:I?.[rc.Week],week:_t},W&&hc.default.createElement(t.WeekNumber,{week:_t,style:I?.[rc.WeekNumber],"aria-label":hl(_t.weekNumber,{locale:o}),className:n[rc.WeekNumber],scope:"row",role:"rowheader"},h(_t.weekNumber,b)),_t.days.map(Ul=>{let{date:ad}=Ul,Kc=P(Ul);if(Kc[xl.focused]=!Kc.hidden&&!!oc?.isEqualTo(Ul),Kc[Ae.selected]=bc?.(ad)||Kc.selected,nm(ec)){let{from:rm,to:$}=ec;Kc[Ae.range_start]=!!(rm&&$&&b.isSameDay(ad,rm)),Kc[Ae.range_end]=!!(rm&&$&&b.isSameDay(ad,$)),Kc[Ae.range_middle]=Oe(ec,ad,!0,b)}let Xy=ncc(Kc,I,l.modifiersStyles),iy=v$(Kc,n,l.modifiersClassNames),sm=!Re&&!Kc.hidden?sl(ad,Kc,b.options,b):void 0;return hc.default.createElement(t.Day,{key:`${b.format(ad,"yyyy-MM-dd")}_${b.format(Ul.displayMonth,"yyyy-MM")}`,day:Ul,modifiers:Kc,className:iy.join(" "),style:Xy,role:"gridcell","aria-selected":Kc.selected||void 0,"aria-label":sm,"data-day":b.format(ad,"yyyy-MM-dd"),"data-month":Ul.outside?b.format(ad,"yyyy-MM"):void 0,"data-selected":Kc.selected||void 0,"data-disabled":Kc.disabled||void 0,"data-hidden":Kc.hidden||void 0,"data-outside":Ul.outside||void 0,"data-focused":Kc.focused||void 0,"data-today":Kc.today||void 0},!Kc.hidden&&Re?hc.default.createElement(t.DayButton,{className:n[rc.DayButton],style:I?.[rc.DayButton],type:"button",day:Ul,modifiers:Kc,disabled:Kc.disabled||void 0,tabIndex:Hc(Ul)?0:-1,"aria-label":Wl(ad,Kc,b.options,b),onClick:Yo(Ul,Kc),onBlur:PG(Ul,Kc),onFocus:MG(Ul,Kc),onKeyDown:KG(Ul,Kc),onMouseEnter:_G(Ul,Kc),onMouseLeave:vn(Ul,Kc)},p(ad,b.options,b)):!Kc.hidden&&p(Ul.date,b.options,b))}))))))})),l.footer&&hc.default.createElement(t.Footer,{className:n[rc.Footer],style:I?.[rc.Footer],role:"status","aria-live":"polite"},l.footer)))}var zcc=u(Y(),1);var Xd=u(V(),1),ARc=()=>(0,Xd.jsx)("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeDasharray:"3.7677",strokeDashoffset:"3.2",strokeWidth:"1",children:(0,Xd.jsx)("path",{d:"M29.5,0.5 h-27 a2,2 0 0 0 -2,2 v27 a2,2 0 0 0 2,2 h27 a2,2 0 0 0 2,-2 v-27 a2,2 0 0 0 -2,-2"})}),ORc=()=>(0,Xd.jsx)("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeDasharray:"3.84516",strokeDashoffset:"1.9226",strokeWidth:"1",children:(0,Xd.jsx)("path",{d:"M32,0.5 h-29.5 a2,2 0 0 0 -2,2 v27 a2,2 0 0 0 2,2 h30"})}),QRc=()=>(0,Xd.jsxs)("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeDasharray:"3.9 4",strokeDashoffset:"2",strokeWidth:"1",children:[(0,Xd.jsx)("line",{x1:"0",y1:"0.5",x2:"100",y2:"0.5"}),(0,Xd.jsx)("line",{x1:"0",y1:"31.5",x2:"100",y2:"31.5"})]}),wRc=()=>(0,Xd.jsx)("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeDasharray:"3.84516",strokeDashoffset:"1.9226",strokeWidth:"1",children:(0,Xd.jsx)("path",{d:"M0,0.5 h29.5 a2,2 0 0 1 2,2 v27 a2,2 0 0 1 -2,2 h-29.5"})});function fcc(c){let{day:l,modifiers:t,children:e,...d}=c,b;return t.preview_start&&t.preview_end?b=ARc:t.preview_start?b=ORc:t.preview_end?b=wRc:t.preview&&(b=QRc),(0,Xd.jsxs)("td",{...d,children:[b&&(0,Xd.jsx)(b,{}),e]})}var TRc={root:"components-calendar",day:"components-calendar__day",day_button:"components-calendar__day-button",caption_label:"components-calendar__caption-label",button_next:"components-calendar__button-next",button_previous:"components-calendar__button-previous",chevron:"components-calendar__chevron",nav:"components-calendar__nav",month_caption:"components-calendar__month-caption",months:"components-calendar__months",month_grid:"components-calendar__month-grid",weekday:"components-calendar__weekday",today:"components-calendar__day--today",selected:"components-calendar__day--selected",disabled:"components-calendar__day--disabled",hidden:"components-calendar__day--hidden",range_start:"components-calendar__range-start",range_end:"components-calendar__range-end",range_middle:"components-calendar__range-middle",weeks_before_enter:"components-calendar__weeks-before-enter",weeks_before_exit:"components-calendar__weeks-before-exit",weeks_after_enter:"components-calendar__weeks-after-enter",weeks_after_exit:"components-calendar__weeks-after-exit",caption_after_enter:"components-calendar__caption-after-enter",caption_after_exit:"components-calendar__caption-after-exit",caption_before_enter:"components-calendar__caption-before-enter",caption_before_exit:"components-calendar__caption-before-exit"},Scc={preview:"components-calendar__day--preview",preview_start:"components-calendar__day--preview-start",preview_end:"components-calendar__day--preview-end"},_5={animate:!0,showOutsideDays:!1,showWeekNumber:!1,hideWeekdays:!1,captionLayout:"label",fixedWeeks:!1,hideNavigation:!1,classNames:TRc,role:"application",components:{Day:fcc}};function q5(c){return Math.min(3,Math.max(1,c))}var Dd=u(nc(),1),kcc=u(Y(),1);function DRc(c){let l=new Intl.Locale(c);return"getTextInfo"in l?l.getTextInfo().direction==="rtl":["ar","he","fa","ur","ps","syr","dv","ku","yi"].includes(l.language)}var $5=({locale:c,timeZone:l,mode:t})=>(0,kcc.useMemo)(()=>{let e=new Intl.DateTimeFormat(c.code,{year:"numeric",month:"long",timeZone:l}),d=new Intl.DateTimeFormat(c.code,{weekday:"narrow",timeZone:l}),b=new Intl.DateTimeFormat(c.code,{weekday:"long",timeZone:l}),o=new Intl.DateTimeFormat(c.code,{weekday:"long",year:"numeric",month:"long",day:"numeric",timeZone:l});return{"aria-label":t==="single"?(0,Dd.__)("Date calendar"):(0,Dd.__)("Date range calendar"),labels:{labelGrid:n=>e.format(n),labelGridcell:(n,G)=>{let X=o.format(n),i=X;return G?.today&&(i=(0,Dd.sprintf)((0,Dd.__)("Today, %s"),X)),i},labelNext:()=>(0,Dd.__)("Go to the Next Month"),labelPrevious:()=>(0,Dd.__)("Go to the Previous Month"),labelDayButton:(n,G)=>{let X=o.format(n),i=X;return G?.today&&(i=(0,Dd.sprintf)((0,Dd.__)("Today, %s"),X)),G?.selected&&(i=(0,Dd.sprintf)((0,Dd.__)("%s, selected"),X)),i},labelWeekday:n=>b.format(n)},locale:c,dir:DRc(c.code)?"rtl":"ltr",formatters:{formatWeekdayName:n=>d.format(n),formatCaption:n=>e.format(n)},timeZone:l}},[c,l,t]);var Acc=u(V(),1),_Y=({defaultSelected:c,selected:l,onSelect:t,numberOfMonths:e=1,locale:d=wd,timeZone:b,...o})=>{let n=$5({locale:d,timeZone:b,mode:"single"}),G=(0,zcc.useCallback)((a,m,x,s)=>{t?.(a??void 0,m,x,s)},[t]),[X,i]=de({defaultValue:c,value:l,onChange:G});return(0,Acc.jsx)(K5,{..._5,...n,...o,mode:"single",numberOfMonths:q5(e),selected:X??void 0,onSelect:i})};var Pi=u(Y(),1);var Occ=u(V(),1);function LRc({selected:c,hoveredDate:l,excludeDisabled:t,min:e,max:d,disabled:b}){return(0,Pi.useMemo)(()=>{if(!l||!c?.from)return;let o,n;return l<c.from?(o={from:l,to:c.from},n={from:l,to:c.to??c.from}):c.to&&l>c.from&&l<c.to?(o={from:c.from,to:l},n={from:c.from,to:l}):l>c.from&&(o={from:c.to??c.from,to:l},n={from:c.from,to:l}),e!==void 0&&e>0&&n&&uh(n.to,n.from)<e&&(o={from:l,to:l}),d!==void 0&&d>0&&n&&uh(n.to,n.from)>d&&(o={from:l,to:l}),t&&b&&n&&P5(n,b)&&(o={from:l,to:l}),o},[c,l,t,e,d,b])}var qY=({defaultSelected:c,selected:l,onSelect:t,numberOfMonths:e=1,excludeDisabled:d,min:b,max:o,disabled:n,locale:G=wd,timeZone:X,...i})=>{let a=$5({locale:G,timeZone:X,mode:"range"}),m=(0,Pi.useCallback)((R,W,I,B)=>{t?.(R??void 0,W,I,B)},[t]),[x,s]=de({defaultValue:c,value:l,onChange:m}),[r,g]=(0,Pi.useState)(void 0),Z=LRc({selected:x,hoveredDate:r,excludeDisabled:d,min:b,max:o,disabled:n}),H=(0,Pi.useMemo)(()=>({preview:Z,preview_start:Z?.from,preview_end:Z?.to}),[Z]);return(0,Occ.jsx)(K5,{..._5,...a,...i,mode:"range",numberOfMonths:q5(e),disabled:n,excludeDisabled:d,min:b,max:o,selected:x??void 0,onSelect:s,onDayMouseEnter:R=>g(R),onDayMouseLeave:()=>g(void 0),modifiers:H,modifiersClassNames:Scc})};var Tcc=u(dc(),1),cy=u(Y(),1);var c9=u(nc(),1),ft=u(Y(),1);var Gg=u(V(),1);function $Y({id:c,type:l,message:t}){let e={valid:hs,invalid:Bs};return(0,Gg.jsxs)("p",{id:c,className:Q("components-validated-control__indicator",`is-${l}`),children:[l==="validating"?(0,Gg.jsx)(W0,{className:"components-validated-control__indicator-spinner"}):(0,Gg.jsx)(cl,{className:"components-validated-control__indicator-icon",icon:e[l],size:16,fill:"currentColor"}),t]})}var Jb=u(V(),1);function URc(c,l,t){return l&&!t?(0,Jb.jsxs)(Jb.Fragment,{children:[c," ",`(${(0,c9.__)("Required")})`]}):!l&&t?(0,Jb.jsxs)(Jb.Fragment,{children:[c," ",`(${(0,c9.__)("Optional")})`]}):c}var Qcc="data-validity-visible",wcc="components-validated-control";function jRc({required:c,markWhenOptional:l,customValidity:t,getValidityTarget:e,children:d},b){let[o,n]=(0,ft.useState)(),[G,X]=(0,ft.useState)(),[i,a]=(0,ft.useState)(!1),[m,x]=(0,ft.useState)(!1);(0,ft.useEffect)(()=>{let H=e(),R=()=>{a(!0),H?.setAttribute(Qcc,"")};return H?.addEventListener("invalid",R),()=>H?.removeEventListener("invalid",R)},[e]),(0,ft.useEffect)(()=>{let H=e(),R=I=>{I.preventDefault();let B=I.target,p=Array.from(B.form?.elements??[]).find(y=>!y.validity.valid);(!B.form||p===B)&&B.focus()},W=H?.type==="radio"&&H?.name?Array.from(H?.closest(`.${wcc}`)?.querySelectorAll(`input[type="radio"][name="${H?.name}"]`)??[]).filter(I=>I!==H):[];return H?.addEventListener("invalid",R),W.forEach(I=>I.addEventListener("invalid",R)),()=>{H?.removeEventListener("invalid",R),W.forEach(I=>I.removeEventListener("invalid",R))}},[e]),(0,ft.useEffect)(()=>{let H=e();if(!t?.type){H?.setCustomValidity(""),n(H?.validationMessage),X(void 0);return}switch(t.type){case"validating":{H?.setCustomValidity(""),n(void 0),X({type:"validating",message:t.message});break}case"valid":{H?.setCustomValidity(""),n(H?.validationMessage),X({type:"valid",message:t.message});break}case"invalid":{H?.setCustomValidity(t.message??""),n(H?.validationMessage),X(void 0);break}}},[t,e]),(0,ft.useEffect)(()=>{if(!(!m||i)){if(t?.type==="validating"){let H=setTimeout(()=>{a(!0)},1e3);return()=>clearTimeout(H)}a(!0)}},[m,t?.type,i]);let s=H=>{m||(!H.relatedTarget||!H.currentTarget.contains(H.relatedTarget))&&(x(!0),e()?.setAttribute(Qcc,""))},r=(0,ft.useId)(),g=o?(0,Jb.jsx)($Y,{id:r,type:"invalid",message:o}):G?.type?(0,Jb.jsx)($Y,{id:r,type:G.type,message:G.message}):null,Z=i?g:null;return(0,ft.useEffect)(()=>{let H=e();if(!H)return;function R(W,I){let B=(W.getAttribute("aria-describedby")??"").split(" ").filter(p=>p&&p!==r);I&&B.push(r),B.length?W.setAttribute("aria-describedby",B.join(" ")):W.removeAttribute("aria-describedby")}return R(H,!!Z),()=>R(H,!1)},[Z,r,e]),(0,Jb.jsxs)("div",{className:wcc,ref:b,onBlur:s,children:[(0,ft.cloneElement)(d,{label:URc(d.props.label,c,l),required:c}),(0,Jb.jsx)("div",{"aria-live":"polite",children:Z})]})}var Sl=(0,ft.forwardRef)(jRc);Sl.displayName="ControlWithError";var l9=u(V(),1),ERc=({required:c,customValidity:l,markWhenOptional:t,...e},d)=>{let b=(0,cy.useRef)(null),o=(0,Tcc.useMergeRefs)([d,b]);return(0,l9.jsx)(Sl,{required:c,markWhenOptional:t,ref:o,customValidity:l,getValidityTarget:()=>b.current?.querySelector('input[type="checkbox"]'),children:(0,l9.jsx)(_W,{...e})})},t9=(0,cy.forwardRef)(ERc);t9.displayName="ValidatedCheckboxControl";var Dcc=u(dc(),1),am=u(Y(),1);var e9=u(V(),1),MRc=({required:c,customValidity:l,markWhenOptional:t,...e},d)=>{let b=(0,am.useRef)(null),o=(0,Dcc.useMergeRefs)([d,b]);return(0,am.useEffect)(()=>{let n=b.current?.querySelector('input[role="combobox"]');n&&(n.required=c??!1)},[c]),(0,e9.jsx)(Sl,{required:c,markWhenOptional:t,ref:o,customValidity:l,getValidityTarget:()=>b.current?.querySelector('input[role="combobox"]'),children:(0,e9.jsx)(Hp,{__next40pxDefaultSize:!0,...e})})},d9=(0,am.forwardRef)(MRc);d9.displayName="ValidatedComboboxControl";var ly=u(Y(),1);var um=u(V(),1),PRc=({required:c,customValidity:l,markWhenOptional:t,...e},d)=>{let b=(0,ly.useRef)(null);return(0,um.jsxs)("div",{className:"components-validated-control__wrapper-with-error-delegate",ref:d,children:[(0,um.jsx)(Sl,{required:c,markWhenOptional:t,customValidity:l,getValidityTarget:()=>b.current,children:(0,um.jsx)(Op,{__next40pxDefaultSize:!0,...e})}),(0,um.jsx)("input",{className:"components-validated-control__error-delegate",type:"text",ref:b,required:c,value:e.value&&e.value.length>0?"hasvalue":"",tabIndex:-1,onChange:()=>{},onFocus:o=>{o.target.previousElementSibling?.querySelector('input[type="text"]')?.focus()}})]})},b9=(0,ly.forwardRef)(PRc);b9.displayName="ValidatedFormTokenField";var ty=u(Y(),1),Lcc=u(dc(),1);var o9=u(V(),1),KRc=({required:c,customValidity:l,markWhenOptional:t,...e},d)=>{let b=(0,ty.useRef)(null),o=(0,Lcc.useMergeRefs)([d,b]);return(0,o9.jsx)(Sl,{required:c,markWhenOptional:t,customValidity:l,getValidityTarget:()=>b.current,children:(0,o9.jsx)(lo,{__next40pxDefaultSize:!0,ref:o,...e})})},n9=(0,ty.forwardRef)(KRc);n9.displayName="ValidatedInputControl";var ey=u(Y(),1),Ucc=u(dc(),1);var G9=u(V(),1),_Rc=({required:c,customValidity:l,markWhenOptional:t,...e},d)=>{let b=(0,ey.useRef)(null),o=(0,Ucc.useMergeRefs)([d,b]);return(0,G9.jsx)(Sl,{required:c,markWhenOptional:t,customValidity:l,getValidityTarget:()=>b.current,children:(0,G9.jsx)(Yt,{__next40pxDefaultSize:!0,ref:o,...e})})},X9=(0,ey.forwardRef)(_Rc);X9.displayName="ValidatedNumberControl";var jcc=u(dc(),1),dy=u(Y(),1);var i9=u(V(),1),qRc=({required:c,customValidity:l,markWhenOptional:t,...e},d)=>{let b=(0,dy.useRef)(null),o=(0,jcc.useMergeRefs)([d,b]);return(0,i9.jsx)(Sl,{required:c,markWhenOptional:t,ref:o,customValidity:l,getValidityTarget:()=>b.current?.querySelector('input[type="radio"]'),children:(0,i9.jsx)(BB,{...e})})},a9=(0,dy.forwardRef)(qRc);a9.displayName="ValidatedRadioControl";var by=u(Y(),1),Ecc=u(dc(),1);var u9=u(V(),1),$Rc=({required:c,customValidity:l,markWhenOptional:t,...e},d)=>{let b=(0,by.useRef)(null),o=(0,Ecc.useMergeRefs)([d,b]);return(0,u9.jsx)(Sl,{required:c,markWhenOptional:t,customValidity:l,getValidityTarget:()=>b.current,children:(0,u9.jsx)(Fd,{__next40pxDefaultSize:!0,ref:o,...e})})},m9=(0,by.forwardRef)($Rc);m9.displayName="ValidatedSelectControl";var Mcc=u(dc(),1),oy=u(Y(),1);var x9=u(V(),1),cIc=({required:c,customValidity:l,markWhenOptional:t,...e},d)=>{let b=(0,oy.useRef)(null),o=(0,Mcc.useMergeRefs)([d,b]);return(0,x9.jsx)(Sl,{required:c,markWhenOptional:t,customValidity:l,getValidityTarget:()=>b.current,children:(0,x9.jsx)(OB,{__next40pxDefaultSize:!0,ref:o,...e})})},s9=(0,oy.forwardRef)(cIc);s9.displayName="ValidatedTextControl";var ny=u(Y(),1),Pcc=u(dc(),1);var r9=u(V(),1),lIc=({required:c,customValidity:l,markWhenOptional:t,...e},d)=>{let b=(0,ny.useRef)(null),o=(0,Pcc.useMergeRefs)([d,b]);return(0,r9.jsx)(Sl,{required:c,markWhenOptional:t,customValidity:l,getValidityTarget:()=>b.current,children:(0,r9.jsx)(QB,{ref:o,...e})})},g9=(0,ny.forwardRef)(lIc);g9.displayName="ValidatedTextareaControl";var Gy=u(Y(),1),Kcc=u(dc(),1);var Z9=u(V(),1),tIc=({required:c,customValidity:l,markWhenOptional:t,...e},d)=>{let b=(0,Gy.useRef)(null),o=(0,Kcc.useMergeRefs)([d,b]);return(0,Z9.jsx)(Sl,{required:c,markWhenOptional:t,customValidity:l,getValidityTarget:()=>b.current,children:(0,Z9.jsx)(wB,{ref:o,required:c,...e})})},H9=(0,Gy.forwardRef)(tIc);H9.displayName="ValidatedToggleControl";var xm=u(Y(),1);var mm=u(V(),1),eIc=({required:c,customValidity:l,markWhenOptional:t,...e},d)=>{let b=(0,xm.useRef)(null),o=(0,xm.useId)();return(0,mm.jsxs)("div",{className:"components-validated-control__wrapper-with-error-delegate",children:[(0,mm.jsx)(Sl,{required:c,markWhenOptional:t,customValidity:l,getValidityTarget:()=>b.current,children:(0,mm.jsx)(hd,{__next40pxDefaultSize:!0,ref:d,...e})}),(0,mm.jsx)("input",{className:"components-validated-control__error-delegate",type:"radio",ref:b,required:c,checked:e.value!==void 0,tabIndex:-1,name:o,onChange:()=>{},onFocus:n=>{n.target.previousElementSibling?.querySelector('[data-active-item="true"]')?.focus()}})]})},R9=(0,xm.forwardRef)(eIc);R9.displayName="ValidatedToggleGroupControl";var I9={};kq(I9,{__experimentalPopoverLegacyPositionToPlacement:oG,ComponentsContext:gs,Tabs:vq,Theme:mq,Menu:nq,kebabCase:QI,withIgnoreIMEEvents:Vd,Badge:zq,normalizeTextString:Es,DateCalendar:_Y,DateRangeCalendar:qY,TZDate:tt,useDrag:BI,ValidatedInputControl:n9,ValidatedCheckboxControl:t9,ValidatedComboboxControl:d9,ValidatedNumberControl:X9,ValidatedSelectControl:m9,ValidatedRadioControl:a9,ValidatedTextControl:s9,ValidatedTextareaControl:g9,ValidatedToggleControl:H9,ValidatedToggleGroupControl:R9,ValidatedFormTokenField:b9});return C9(dIc);})();
/*! Bundled license information:

use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
  (**
   * @license React
   * use-sync-external-store-shim.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

react-is/cjs/react-is.production.min.js:
  (** @license React v16.13.1
   * react-is.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

is-plain-object/dist/is-plain-object.mjs:
  (*!
   * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
   *
   * Copyright (c) 2014-2017, Jon Schlinkert.
   * Released under the MIT License.
   *)
*/
                                                                                                                                                                                                                                                                       dist/compose.js                                                                                     0000644                 00000241536 15212563776 0007543 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).compose = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // package-external:@wordpress/is-shallow-equal
  var require_is_shallow_equal = __commonJS({
    "package-external:@wordpress/is-shallow-equal"(exports, module) {
      module.exports = window.wp.isShallowEqual;
    }
  });

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/deprecated
  var require_deprecated = __commonJS({
    "package-external:@wordpress/deprecated"(exports, module) {
      module.exports = window.wp.deprecated;
    }
  });

  // package-external:@wordpress/dom
  var require_dom = __commonJS({
    "package-external:@wordpress/dom"(exports, module) {
      module.exports = window.wp.dom;
    }
  });

  // package-external:@wordpress/keycodes
  var require_keycodes = __commonJS({
    "package-external:@wordpress/keycodes"(exports, module) {
      module.exports = window.wp.keycodes;
    }
  });

  // node_modules/mousetrap/mousetrap.js
  var require_mousetrap = __commonJS({
    "node_modules/mousetrap/mousetrap.js"(exports, module) {
      (function(window2, document2, undefined2) {
        if (!window2) {
          return;
        }
        var _MAP = {
          8: "backspace",
          9: "tab",
          13: "enter",
          16: "shift",
          17: "ctrl",
          18: "alt",
          20: "capslock",
          27: "esc",
          32: "space",
          33: "pageup",
          34: "pagedown",
          35: "end",
          36: "home",
          37: "left",
          38: "up",
          39: "right",
          40: "down",
          45: "ins",
          46: "del",
          91: "meta",
          93: "meta",
          224: "meta"
        };
        var _KEYCODE_MAP = {
          106: "*",
          107: "+",
          109: "-",
          110: ".",
          111: "/",
          186: ";",
          187: "=",
          188: ",",
          189: "-",
          190: ".",
          191: "/",
          192: "`",
          219: "[",
          220: "\\",
          221: "]",
          222: "'"
        };
        var _SHIFT_MAP = {
          "~": "`",
          "!": "1",
          "@": "2",
          "#": "3",
          "$": "4",
          "%": "5",
          "^": "6",
          "&": "7",
          "*": "8",
          "(": "9",
          ")": "0",
          "_": "-",
          "+": "=",
          ":": ";",
          '"': "'",
          "<": ",",
          ">": ".",
          "?": "/",
          "|": "\\"
        };
        var _SPECIAL_ALIASES = {
          "option": "alt",
          "command": "meta",
          "return": "enter",
          "escape": "esc",
          "plus": "+",
          "mod": /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? "meta" : "ctrl"
        };
        var _REVERSE_MAP;
        for (var i = 1; i < 20; ++i) {
          _MAP[111 + i] = "f" + i;
        }
        for (i = 0; i <= 9; ++i) {
          _MAP[i + 96] = i.toString();
        }
        function _addEvent(object, type, callback) {
          if (object.addEventListener) {
            object.addEventListener(type, callback, false);
            return;
          }
          object.attachEvent("on" + type, callback);
        }
        function _characterFromEvent(e) {
          if (e.type == "keypress") {
            var character = String.fromCharCode(e.which);
            if (!e.shiftKey) {
              character = character.toLowerCase();
            }
            return character;
          }
          if (_MAP[e.which]) {
            return _MAP[e.which];
          }
          if (_KEYCODE_MAP[e.which]) {
            return _KEYCODE_MAP[e.which];
          }
          return String.fromCharCode(e.which).toLowerCase();
        }
        function _modifiersMatch(modifiers1, modifiers2) {
          return modifiers1.sort().join(",") === modifiers2.sort().join(",");
        }
        function _eventModifiers(e) {
          var modifiers = [];
          if (e.shiftKey) {
            modifiers.push("shift");
          }
          if (e.altKey) {
            modifiers.push("alt");
          }
          if (e.ctrlKey) {
            modifiers.push("ctrl");
          }
          if (e.metaKey) {
            modifiers.push("meta");
          }
          return modifiers;
        }
        function _preventDefault(e) {
          if (e.preventDefault) {
            e.preventDefault();
            return;
          }
          e.returnValue = false;
        }
        function _stopPropagation(e) {
          if (e.stopPropagation) {
            e.stopPropagation();
            return;
          }
          e.cancelBubble = true;
        }
        function _isModifier(key) {
          return key == "shift" || key == "ctrl" || key == "alt" || key == "meta";
        }
        function _getReverseMap() {
          if (!_REVERSE_MAP) {
            _REVERSE_MAP = {};
            for (var key in _MAP) {
              if (key > 95 && key < 112) {
                continue;
              }
              if (_MAP.hasOwnProperty(key)) {
                _REVERSE_MAP[_MAP[key]] = key;
              }
            }
          }
          return _REVERSE_MAP;
        }
        function _pickBestAction(key, modifiers, action) {
          if (!action) {
            action = _getReverseMap()[key] ? "keydown" : "keypress";
          }
          if (action == "keypress" && modifiers.length) {
            action = "keydown";
          }
          return action;
        }
        function _keysFromString(combination) {
          if (combination === "+") {
            return ["+"];
          }
          combination = combination.replace(/\+{2}/g, "+plus");
          return combination.split("+");
        }
        function _getKeyInfo(combination, action) {
          var keys;
          var key;
          var i2;
          var modifiers = [];
          keys = _keysFromString(combination);
          for (i2 = 0; i2 < keys.length; ++i2) {
            key = keys[i2];
            if (_SPECIAL_ALIASES[key]) {
              key = _SPECIAL_ALIASES[key];
            }
            if (action && action != "keypress" && _SHIFT_MAP[key]) {
              key = _SHIFT_MAP[key];
              modifiers.push("shift");
            }
            if (_isModifier(key)) {
              modifiers.push(key);
            }
          }
          action = _pickBestAction(key, modifiers, action);
          return {
            key,
            modifiers,
            action
          };
        }
        function _belongsTo(element, ancestor) {
          if (element === null || element === document2) {
            return false;
          }
          if (element === ancestor) {
            return true;
          }
          return _belongsTo(element.parentNode, ancestor);
        }
        function Mousetrap3(targetElement) {
          var self = this;
          targetElement = targetElement || document2;
          if (!(self instanceof Mousetrap3)) {
            return new Mousetrap3(targetElement);
          }
          self.target = targetElement;
          self._callbacks = {};
          self._directMap = {};
          var _sequenceLevels = {};
          var _resetTimer;
          var _ignoreNextKeyup = false;
          var _ignoreNextKeypress = false;
          var _nextExpectedAction = false;
          function _resetSequences(doNotReset) {
            doNotReset = doNotReset || {};
            var activeSequences = false, key;
            for (key in _sequenceLevels) {
              if (doNotReset[key]) {
                activeSequences = true;
                continue;
              }
              _sequenceLevels[key] = 0;
            }
            if (!activeSequences) {
              _nextExpectedAction = false;
            }
          }
          function _getMatches(character, modifiers, e, sequenceName, combination, level) {
            var i2;
            var callback;
            var matches = [];
            var action = e.type;
            if (!self._callbacks[character]) {
              return [];
            }
            if (action == "keyup" && _isModifier(character)) {
              modifiers = [character];
            }
            for (i2 = 0; i2 < self._callbacks[character].length; ++i2) {
              callback = self._callbacks[character][i2];
              if (!sequenceName && callback.seq && _sequenceLevels[callback.seq] != callback.level) {
                continue;
              }
              if (action != callback.action) {
                continue;
              }
              if (action == "keypress" && !e.metaKey && !e.ctrlKey || _modifiersMatch(modifiers, callback.modifiers)) {
                var deleteCombo = !sequenceName && callback.combo == combination;
                var deleteSequence = sequenceName && callback.seq == sequenceName && callback.level == level;
                if (deleteCombo || deleteSequence) {
                  self._callbacks[character].splice(i2, 1);
                }
                matches.push(callback);
              }
            }
            return matches;
          }
          function _fireCallback(callback, e, combo, sequence) {
            if (self.stopCallback(e, e.target || e.srcElement, combo, sequence)) {
              return;
            }
            if (callback(e, combo) === false) {
              _preventDefault(e);
              _stopPropagation(e);
            }
          }
          self._handleKey = function(character, modifiers, e) {
            var callbacks = _getMatches(character, modifiers, e);
            var i2;
            var doNotReset = {};
            var maxLevel = 0;
            var processedSequenceCallback = false;
            for (i2 = 0; i2 < callbacks.length; ++i2) {
              if (callbacks[i2].seq) {
                maxLevel = Math.max(maxLevel, callbacks[i2].level);
              }
            }
            for (i2 = 0; i2 < callbacks.length; ++i2) {
              if (callbacks[i2].seq) {
                if (callbacks[i2].level != maxLevel) {
                  continue;
                }
                processedSequenceCallback = true;
                doNotReset[callbacks[i2].seq] = 1;
                _fireCallback(callbacks[i2].callback, e, callbacks[i2].combo, callbacks[i2].seq);
                continue;
              }
              if (!processedSequenceCallback) {
                _fireCallback(callbacks[i2].callback, e, callbacks[i2].combo);
              }
            }
            var ignoreThisKeypress = e.type == "keypress" && _ignoreNextKeypress;
            if (e.type == _nextExpectedAction && !_isModifier(character) && !ignoreThisKeypress) {
              _resetSequences(doNotReset);
            }
            _ignoreNextKeypress = processedSequenceCallback && e.type == "keydown";
          };
          function _handleKeyEvent(e) {
            if (typeof e.which !== "number") {
              e.which = e.keyCode;
            }
            var character = _characterFromEvent(e);
            if (!character) {
              return;
            }
            if (e.type == "keyup" && _ignoreNextKeyup === character) {
              _ignoreNextKeyup = false;
              return;
            }
            self.handleKey(character, _eventModifiers(e), e);
          }
          function _resetSequenceTimer() {
            clearTimeout(_resetTimer);
            _resetTimer = setTimeout(_resetSequences, 1e3);
          }
          function _bindSequence(combo, keys, callback, action) {
            _sequenceLevels[combo] = 0;
            function _increaseSequence(nextAction) {
              return function() {
                _nextExpectedAction = nextAction;
                ++_sequenceLevels[combo];
                _resetSequenceTimer();
              };
            }
            function _callbackAndReset(e) {
              _fireCallback(callback, e, combo);
              if (action !== "keyup") {
                _ignoreNextKeyup = _characterFromEvent(e);
              }
              setTimeout(_resetSequences, 10);
            }
            for (var i2 = 0; i2 < keys.length; ++i2) {
              var isFinal = i2 + 1 === keys.length;
              var wrappedCallback = isFinal ? _callbackAndReset : _increaseSequence(action || _getKeyInfo(keys[i2 + 1]).action);
              _bindSingle(keys[i2], wrappedCallback, action, combo, i2);
            }
          }
          function _bindSingle(combination, callback, action, sequenceName, level) {
            self._directMap[combination + ":" + action] = callback;
            combination = combination.replace(/\s+/g, " ");
            var sequence = combination.split(" ");
            var info;
            if (sequence.length > 1) {
              _bindSequence(combination, sequence, callback, action);
              return;
            }
            info = _getKeyInfo(combination, action);
            self._callbacks[info.key] = self._callbacks[info.key] || [];
            _getMatches(info.key, info.modifiers, { type: info.action }, sequenceName, combination, level);
            self._callbacks[info.key][sequenceName ? "unshift" : "push"]({
              callback,
              modifiers: info.modifiers,
              action: info.action,
              seq: sequenceName,
              level,
              combo: combination
            });
          }
          self._bindMultiple = function(combinations, callback, action) {
            for (var i2 = 0; i2 < combinations.length; ++i2) {
              _bindSingle(combinations[i2], callback, action);
            }
          };
          _addEvent(targetElement, "keypress", _handleKeyEvent);
          _addEvent(targetElement, "keydown", _handleKeyEvent);
          _addEvent(targetElement, "keyup", _handleKeyEvent);
        }
        Mousetrap3.prototype.bind = function(keys, callback, action) {
          var self = this;
          keys = keys instanceof Array ? keys : [keys];
          self._bindMultiple.call(self, keys, callback, action);
          return self;
        };
        Mousetrap3.prototype.unbind = function(keys, action) {
          var self = this;
          return self.bind.call(self, keys, function() {
          }, action);
        };
        Mousetrap3.prototype.trigger = function(keys, action) {
          var self = this;
          if (self._directMap[keys + ":" + action]) {
            self._directMap[keys + ":" + action]({}, keys);
          }
          return self;
        };
        Mousetrap3.prototype.reset = function() {
          var self = this;
          self._callbacks = {};
          self._directMap = {};
          return self;
        };
        Mousetrap3.prototype.stopCallback = function(e, element) {
          var self = this;
          if ((" " + element.className + " ").indexOf(" mousetrap ") > -1) {
            return false;
          }
          if (_belongsTo(element, self.target)) {
            return false;
          }
          if ("composedPath" in e && typeof e.composedPath === "function") {
            var initialEventTarget = e.composedPath()[0];
            if (initialEventTarget !== e.target) {
              element = initialEventTarget;
            }
          }
          return element.tagName == "INPUT" || element.tagName == "SELECT" || element.tagName == "TEXTAREA" || element.isContentEditable;
        };
        Mousetrap3.prototype.handleKey = function() {
          var self = this;
          return self._handleKey.apply(self, arguments);
        };
        Mousetrap3.addKeycodes = function(object) {
          for (var key in object) {
            if (object.hasOwnProperty(key)) {
              _MAP[key] = object[key];
            }
          }
          _REVERSE_MAP = null;
        };
        Mousetrap3.init = function() {
          var documentMousetrap = Mousetrap3(document2);
          for (var method in documentMousetrap) {
            if (method.charAt(0) !== "_") {
              Mousetrap3[method] = /* @__PURE__ */ (function(method2) {
                return function() {
                  return documentMousetrap[method2].apply(documentMousetrap, arguments);
                };
              })(method);
            }
          }
        };
        Mousetrap3.init();
        window2.Mousetrap = Mousetrap3;
        if (typeof module !== "undefined" && module.exports) {
          module.exports = Mousetrap3;
        }
        if (typeof define === "function" && define.amd) {
          define(function() {
            return Mousetrap3;
          });
        }
      })(typeof window !== "undefined" ? window : null, typeof window !== "undefined" ? document : null);
    }
  });

  // package-external:@wordpress/undo-manager
  var require_undo_manager = __commonJS({
    "package-external:@wordpress/undo-manager"(exports, module) {
      module.exports = window.wp.undoManager;
    }
  });

  // package-external:@wordpress/priority-queue
  var require_priority_queue = __commonJS({
    "package-external:@wordpress/priority-queue"(exports, module) {
      module.exports = window.wp.priorityQueue;
    }
  });

  // vendor-external:react
  var require_react = __commonJS({
    "vendor-external:react"(exports, module) {
      module.exports = window.React;
    }
  });

  // packages/compose/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    __experimentalUseDialog: () => use_dialog_default,
    __experimentalUseDragging: () => useDragging,
    __experimentalUseDropZone: () => useDropZone,
    __experimentalUseFixedWindowList: () => useFixedWindowList,
    __experimentalUseFocusOutside: () => useFocusOutside,
    compose: () => compose_default,
    createHigherOrderComponent: () => createHigherOrderComponent,
    debounce: () => debounce,
    ifCondition: () => if_condition_default,
    observableMap: () => observableMap,
    pipe: () => pipe_default,
    pure: () => pure_default,
    throttle: () => throttle,
    useAsyncList: () => use_async_list_default,
    useConstrainedTabbing: () => use_constrained_tabbing_default,
    useCopyOnClick: () => useCopyOnClick,
    useCopyToClipboard: () => useCopyToClipboard,
    useDebounce: () => useDebounce,
    useDebouncedInput: () => useDebouncedInput,
    useDisabled: () => useDisabled,
    useEvent: () => useEvent,
    useFocusOnMount: () => useFocusOnMount,
    useFocusReturn: () => use_focus_return_default,
    useFocusableIframe: () => useFocusableIframe,
    useInstanceId: () => use_instance_id_default,
    useIsomorphicLayoutEffect: () => use_isomorphic_layout_effect_default,
    useKeyboardShortcut: () => use_keyboard_shortcut_default,
    useMediaQuery: () => useMediaQuery,
    useMergeRefs: () => useMergeRefs,
    useObservableValue: () => useObservableValue,
    usePrevious: () => usePrevious,
    useReducedMotion: () => use_reduced_motion_default,
    useRefEffect: () => useRefEffect,
    useResizeObserver: () => useResizeObserver2,
    useStateWithHistory: () => useStateWithHistory,
    useThrottle: () => useThrottle,
    useViewportMatch: () => use_viewport_match_default,
    useWarnOnChange: () => use_warn_on_change_default,
    withGlobalEvents: () => withGlobalEvents,
    withInstanceId: () => with_instance_id_default,
    withSafeTimeout: () => with_safe_timeout_default,
    withState: () => withState
  });

  // node_modules/tslib/tslib.es6.mjs
  var __assign = function() {
    __assign = Object.assign || function __assign2(t) {
      for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
      }
      return t;
    };
    return __assign.apply(this, arguments);
  };

  // node_modules/lower-case/dist.es2015/index.js
  function lowerCase(str) {
    return str.toLowerCase();
  }

  // node_modules/no-case/dist.es2015/index.js
  var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
  var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
  function noCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    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;
    var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
    var start = 0;
    var end = result.length;
    while (result.charAt(start) === "\0")
      start++;
    while (result.charAt(end - 1) === "\0")
      end--;
    return result.slice(start, end).split("\0").map(transform).join(delimiter);
  }
  function replace(input, re, value) {
    if (re instanceof RegExp)
      return input.replace(re, value);
    return re.reduce(function(input2, re2) {
      return input2.replace(re2, value);
    }, input);
  }

  // node_modules/pascal-case/dist.es2015/index.js
  function pascalCaseTransform(input, index) {
    var firstChar = input.charAt(0);
    var lowerChars = input.substr(1).toLowerCase();
    if (index > 0 && firstChar >= "0" && firstChar <= "9") {
      return "_" + firstChar + lowerChars;
    }
    return "" + firstChar.toUpperCase() + lowerChars;
  }
  function pascalCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    return noCase(input, __assign({ delimiter: "", transform: pascalCaseTransform }, options));
  }

  // packages/compose/build-module/utils/create-higher-order-component/index.mjs
  function createHigherOrderComponent(mapComponent, modifierName) {
    return (Inner) => {
      const Outer = mapComponent(Inner);
      Outer.displayName = hocName(modifierName, Inner);
      return Outer;
    };
  }
  var hocName = (name, Inner) => {
    const inner = Inner.displayName || Inner.name || "Component";
    const outer = pascalCase(name ?? "");
    return `${outer}(${inner})`;
  };

  // packages/compose/build-module/utils/debounce/index.mjs
  var debounce = (func, wait, options) => {
    let lastArgs;
    let lastThis;
    let maxWait = 0;
    let result;
    let timerId;
    let lastCallTime;
    let lastInvokeTime = 0;
    let leading = false;
    let maxing = false;
    let trailing = true;
    if (options) {
      leading = !!options.leading;
      maxing = "maxWait" in options;
      if (options.maxWait !== void 0) {
        maxWait = Math.max(options.maxWait, wait);
      }
      trailing = "trailing" in options ? !!options.trailing : trailing;
    }
    function invokeFunc(time) {
      const args = lastArgs;
      const thisArg = lastThis;
      lastArgs = void 0;
      lastThis = void 0;
      lastInvokeTime = time;
      result = func.apply(thisArg, args);
      return result;
    }
    function startTimer(pendingFunc, waitTime) {
      timerId = setTimeout(pendingFunc, waitTime);
    }
    function cancelTimer() {
      if (timerId !== void 0) {
        clearTimeout(timerId);
      }
    }
    function leadingEdge(time) {
      lastInvokeTime = time;
      startTimer(timerExpired, wait);
      return leading ? invokeFunc(time) : result;
    }
    function getTimeSinceLastCall(time) {
      return time - (lastCallTime || 0);
    }
    function remainingWait(time) {
      const timeSinceLastCall = getTimeSinceLastCall(time);
      const timeSinceLastInvoke = time - lastInvokeTime;
      const timeWaiting = wait - timeSinceLastCall;
      return maxing ? Math.min(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
    }
    function shouldInvoke(time) {
      const timeSinceLastCall = getTimeSinceLastCall(time);
      const timeSinceLastInvoke = time - lastInvokeTime;
      return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
    }
    function timerExpired() {
      const time = Date.now();
      if (shouldInvoke(time)) {
        return trailingEdge(time);
      }
      startTimer(timerExpired, remainingWait(time));
      return void 0;
    }
    function clearTimer() {
      timerId = void 0;
    }
    function trailingEdge(time) {
      clearTimer();
      if (trailing && lastArgs) {
        return invokeFunc(time);
      }
      lastArgs = lastThis = void 0;
      return result;
    }
    function cancel() {
      cancelTimer();
      lastInvokeTime = 0;
      clearTimer();
      lastArgs = lastCallTime = lastThis = void 0;
    }
    function flush() {
      return pending() ? trailingEdge(Date.now()) : result;
    }
    function pending() {
      return timerId !== void 0;
    }
    function debounced(...args) {
      const time = Date.now();
      const isInvoking = shouldInvoke(time);
      lastArgs = args;
      lastThis = this;
      lastCallTime = time;
      if (isInvoking) {
        if (!pending()) {
          return leadingEdge(lastCallTime);
        }
        if (maxing) {
          startTimer(timerExpired, wait);
          return invokeFunc(lastCallTime);
        }
      }
      if (!pending()) {
        startTimer(timerExpired, wait);
      }
      return result;
    }
    debounced.cancel = cancel;
    debounced.flush = flush;
    debounced.pending = pending;
    return debounced;
  };

  // packages/compose/build-module/utils/throttle/index.mjs
  var throttle = (func, wait, options) => {
    let leading = true;
    let trailing = true;
    if (options) {
      leading = "leading" in options ? !!options.leading : leading;
      trailing = "trailing" in options ? !!options.trailing : trailing;
    }
    return debounce(func, wait, {
      leading,
      trailing,
      maxWait: wait
    });
  };

  // packages/compose/build-module/utils/observable-map/index.mjs
  function observableMap() {
    const map = /* @__PURE__ */ new Map();
    const listeners = /* @__PURE__ */ new Map();
    function callListeners(name) {
      const list = listeners.get(name);
      if (!list) {
        return;
      }
      for (const listener2 of list) {
        listener2();
      }
    }
    return {
      get(name) {
        return map.get(name);
      },
      set(name, value) {
        map.set(name, value);
        callListeners(name);
      },
      delete(name) {
        map.delete(name);
        callListeners(name);
      },
      subscribe(name, listener2) {
        let list = listeners.get(name);
        if (!list) {
          list = /* @__PURE__ */ new Set();
          listeners.set(name, list);
        }
        list.add(listener2);
        return () => {
          list.delete(listener2);
          if (list.size === 0) {
            listeners.delete(name);
          }
        };
      }
    };
  }

  // packages/compose/build-module/higher-order/pipe.mjs
  var basePipe = (reverse = false) => (...funcs) => (...args) => {
    const functions = funcs.flat();
    if (reverse) {
      functions.reverse();
    }
    return functions.reduce(
      (prev, func) => [func(...prev)],
      args
    )[0];
  };
  var pipe = basePipe();
  var pipe_default = pipe;

  // packages/compose/build-module/higher-order/compose.mjs
  var compose = basePipe(true);
  var compose_default = compose;

  // packages/compose/build-module/higher-order/if-condition/index.mjs
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  function ifCondition(predicate) {
    return createHigherOrderComponent(
      (WrappedComponent) => (props) => {
        if (!predicate(props)) {
          return null;
        }
        return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(WrappedComponent, { ...props });
      },
      "ifCondition"
    );
  }
  var if_condition_default = ifCondition;

  // packages/compose/build-module/higher-order/pure/index.mjs
  var import_is_shallow_equal = __toESM(require_is_shallow_equal(), 1);
  var import_element = __toESM(require_element(), 1);
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  var pure = createHigherOrderComponent(function(WrappedComponent) {
    if (WrappedComponent.prototype instanceof import_element.Component) {
      return class extends WrappedComponent {
        shouldComponentUpdate(nextProps, nextState) {
          return !(0, import_is_shallow_equal.isShallowEqual)(nextProps, this.props) || !(0, import_is_shallow_equal.isShallowEqual)(nextState, this.state);
        }
      };
    }
    return class extends import_element.Component {
      shouldComponentUpdate(nextProps) {
        return !(0, import_is_shallow_equal.isShallowEqual)(nextProps, this.props);
      }
      render() {
        return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(WrappedComponent, { ...this.props });
      }
    };
  }, "pure");
  var pure_default = pure;

  // packages/compose/build-module/higher-order/with-global-events/index.mjs
  var import_element2 = __toESM(require_element(), 1);
  var import_deprecated = __toESM(require_deprecated(), 1);

  // packages/compose/build-module/higher-order/with-global-events/listener.mjs
  var Listener = class {
    constructor() {
      this.listeners = {};
      this.handleEvent = this.handleEvent.bind(this);
    }
    add(eventType, instance) {
      if (!this.listeners[eventType]) {
        window.addEventListener(eventType, this.handleEvent);
        this.listeners[eventType] = [];
      }
      this.listeners[eventType].push(instance);
    }
    remove(eventType, instance) {
      if (!this.listeners[eventType]) {
        return;
      }
      this.listeners[eventType] = this.listeners[eventType].filter(
        (listener2) => listener2 !== instance
      );
      if (!this.listeners[eventType].length) {
        window.removeEventListener(eventType, this.handleEvent);
        delete this.listeners[eventType];
      }
    }
    handleEvent(event) {
      this.listeners[event.type]?.forEach(
        (instance) => {
          instance.handleEvent(event);
        }
      );
    }
  };
  var listener_default = Listener;

  // packages/compose/build-module/higher-order/with-global-events/index.mjs
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
  var listener = new listener_default();
  function withGlobalEvents(eventTypesToHandlers) {
    (0, import_deprecated.default)("wp.compose.withGlobalEvents", {
      since: "5.7",
      alternative: "useEffect"
    });
    return createHigherOrderComponent((WrappedComponent) => {
      class Wrapper extends import_element2.Component {
        constructor(props) {
          super(props);
          this.handleEvent = this.handleEvent.bind(this);
          this.handleRef = this.handleRef.bind(this);
        }
        componentDidMount() {
          Object.keys(eventTypesToHandlers).forEach((eventType) => {
            listener.add(eventType, this);
          });
        }
        componentWillUnmount() {
          Object.keys(eventTypesToHandlers).forEach((eventType) => {
            listener.remove(eventType, this);
          });
        }
        handleEvent(event) {
          const handler = eventTypesToHandlers[
            /** @type {keyof GlobalEventHandlersEventMap} */
            event.type
          ];
          if (typeof this.wrappedRef[handler] === "function") {
            this.wrappedRef[handler](event);
          }
        }
        handleRef(el) {
          this.wrappedRef = el;
          if (this.props.forwardedRef) {
            this.props.forwardedRef(el);
          }
        }
        render() {
          return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
            WrappedComponent,
            {
              ...this.props.ownProps,
              ref: this.handleRef
            }
          );
        }
      }
      return (0, import_element2.forwardRef)((props, ref) => {
        return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Wrapper, { ownProps: props, forwardedRef: ref });
      });
    }, "withGlobalEvents");
  }

  // packages/compose/build-module/hooks/use-instance-id/index.mjs
  var import_element3 = __toESM(require_element(), 1);
  var instanceMap = /* @__PURE__ */ new WeakMap();
  function createId(object) {
    const instances = instanceMap.get(object) || 0;
    instanceMap.set(object, instances + 1);
    return instances;
  }
  function useInstanceId(object, prefix, preferredId) {
    return (0, import_element3.useMemo)(() => {
      if (preferredId) {
        return preferredId;
      }
      const id = createId(object);
      return prefix ? `${prefix}-${id}` : id;
    }, [object, preferredId, prefix]);
  }
  var use_instance_id_default = useInstanceId;

  // packages/compose/build-module/higher-order/with-instance-id/index.mjs
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
  var withInstanceId = createHigherOrderComponent(
    (WrappedComponent) => {
      return (props) => {
        const instanceId = use_instance_id_default(WrappedComponent);
        return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(WrappedComponent, { ...props, instanceId });
      };
    },
    "instanceId"
  );
  var with_instance_id_default = withInstanceId;

  // packages/compose/build-module/higher-order/with-safe-timeout/index.mjs
  var import_element4 = __toESM(require_element(), 1);
  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
  var withSafeTimeout = createHigherOrderComponent(
    (OriginalComponent) => {
      return class WrappedComponent extends import_element4.Component {
        timeouts;
        constructor(props) {
          super(props);
          this.timeouts = [];
          this.setTimeout = this.setTimeout.bind(this);
          this.clearTimeout = this.clearTimeout.bind(this);
        }
        componentWillUnmount() {
          this.timeouts.forEach(clearTimeout);
        }
        setTimeout(fn, delay) {
          const id = setTimeout(() => {
            fn();
            this.clearTimeout(id);
          }, delay);
          this.timeouts.push(id);
          return id;
        }
        clearTimeout(id) {
          clearTimeout(id);
          this.timeouts = this.timeouts.filter(
            (timeoutId) => timeoutId !== id
          );
        }
        render() {
          return (
            // @ts-ignore
            /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
              OriginalComponent,
              {
                ...this.props,
                setTimeout: this.setTimeout,
                clearTimeout: this.clearTimeout
              }
            )
          );
        }
      };
    },
    "withSafeTimeout"
  );
  var with_safe_timeout_default = withSafeTimeout;

  // packages/compose/build-module/higher-order/with-state/index.mjs
  var import_element5 = __toESM(require_element(), 1);
  var import_deprecated2 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
  function withState(initialState = {}) {
    (0, import_deprecated2.default)("wp.compose.withState", {
      since: "5.8",
      alternative: "wp.element.useState"
    });
    return createHigherOrderComponent((OriginalComponent) => {
      return class WrappedComponent extends import_element5.Component {
        constructor(props) {
          super(props);
          this.setState = this.setState.bind(this);
          this.state = initialState;
        }
        render() {
          return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
            OriginalComponent,
            {
              ...this.props,
              ...this.state,
              setState: this.setState
            }
          );
        }
      };
    }, "withState");
  }

  // packages/compose/build-module/hooks/use-constrained-tabbing/index.mjs
  var import_dom = __toESM(require_dom(), 1);

  // packages/compose/build-module/hooks/use-ref-effect/index.mjs
  var import_element6 = __toESM(require_element(), 1);
  function useRefEffect(callback, dependencies) {
    const cleanupRef = (0, import_element6.useRef)(void 0);
    return (0, import_element6.useCallback)((node) => {
      if (node) {
        cleanupRef.current = callback(node);
      } else if (cleanupRef.current) {
        cleanupRef.current();
      }
    }, dependencies);
  }

  // packages/compose/build-module/hooks/use-constrained-tabbing/index.mjs
  function useConstrainedTabbing() {
    return useRefEffect((node) => {
      function onKeyDown(event) {
        const { key, shiftKey, target } = event;
        if (key !== "Tab") {
          return;
        }
        const action = shiftKey ? "findPrevious" : "findNext";
        const nextElement = import_dom.focus.tabbable[action](
          /** @type {HTMLElement} */
          target
        ) || null;
        if (
          /** @type {HTMLElement} */
          target.contains(nextElement)
        ) {
          event.preventDefault();
          nextElement?.focus();
          return;
        }
        if (node.contains(nextElement)) {
          return;
        }
        const domAction = shiftKey ? "append" : "prepend";
        const { ownerDocument } = node;
        const trap = ownerDocument.createElement("div");
        trap.tabIndex = -1;
        node[domAction](trap);
        trap.addEventListener("blur", () => node.removeChild(trap));
        trap.focus();
      }
      node.addEventListener("keydown", onKeyDown);
      return () => {
        node.removeEventListener("keydown", onKeyDown);
      };
    }, []);
  }
  var use_constrained_tabbing_default = useConstrainedTabbing;

  // packages/compose/build-module/hooks/use-copy-on-click/index.mjs
  var import_element8 = __toESM(require_element(), 1);
  var import_deprecated3 = __toESM(require_deprecated(), 1);

  // packages/compose/build-module/hooks/use-copy-to-clipboard/index.mjs
  var import_element7 = __toESM(require_element(), 1);
  async function copyToClipboard(text, trigger) {
    if (!trigger) {
      return false;
    }
    const { ownerDocument } = trigger;
    if (!ownerDocument) {
      return false;
    }
    const { defaultView } = ownerDocument;
    try {
      if (defaultView?.navigator?.clipboard?.writeText) {
        await defaultView.navigator.clipboard.writeText(text);
        return true;
      }
      const textarea = ownerDocument.createElement("textarea");
      textarea.value = text;
      textarea.setAttribute("readonly", "");
      textarea.style.position = "fixed";
      textarea.style.left = "-9999px";
      textarea.style.top = "-9999px";
      ownerDocument.body.appendChild(textarea);
      textarea.select();
      const success = ownerDocument.execCommand("copy");
      textarea.remove();
      return success;
    } catch {
      return false;
    }
  }
  function clearSelection(trigger) {
    if ("focus" in trigger && typeof trigger.focus === "function") {
      trigger.focus();
    }
    trigger.ownerDocument?.defaultView?.getSelection()?.removeAllRanges();
  }
  function useUpdatedRef(value) {
    const ref = (0, import_element7.useRef)(value);
    (0, import_element7.useLayoutEffect)(() => {
      ref.current = value;
    }, [value]);
    return ref;
  }
  function useCopyToClipboard(text, onSuccess) {
    const textRef = useUpdatedRef(text);
    const onSuccessRef = useUpdatedRef(onSuccess);
    return useRefEffect((node) => {
      let isActive = true;
      const handleClick = async () => {
        const textToCopy = typeof textRef.current === "function" ? textRef.current() : textRef.current || "";
        const success = await copyToClipboard(textToCopy, node);
        if (!isActive) {
          return;
        }
        if (success) {
          clearSelection(node);
          if (onSuccessRef.current) {
            onSuccessRef.current();
          }
        }
      };
      node.addEventListener("click", handleClick);
      return () => {
        isActive = false;
        node.removeEventListener("click", handleClick);
      };
    }, []);
  }

  // packages/compose/build-module/hooks/use-copy-on-click/index.mjs
  function useCopyOnClick(ref, text, timeout = 4e3) {
    (0, import_deprecated3.default)("wp.compose.useCopyOnClick", {
      since: "5.8",
      alternative: "wp.compose.useCopyToClipboard"
    });
    const [hasCopied, setHasCopied] = (0, import_element8.useState)(false);
    (0, import_element8.useEffect)(() => {
      let isActive = true;
      let timeoutId;
      if (!ref.current) {
        return;
      }
      let targets;
      if (typeof ref.current === "string") {
        targets = typeof document !== "undefined" ? Array.from(document.querySelectorAll(ref.current)) : [];
      } else if ("length" in ref.current && typeof ref.current.length === "number") {
        targets = Array.from(ref.current);
      } else {
        targets = [ref.current];
      }
      if (targets.length === 0) {
        return;
      }
      const handleClick = async (event) => {
        const trigger = event.currentTarget;
        if (!trigger) {
          return;
        }
        const success = await copyToClipboard(
          typeof text === "function" ? text() : text || "",
          trigger
        );
        if (!isActive) {
          return;
        }
        if (success) {
          clearSelection(trigger);
          if (timeout) {
            setHasCopied(true);
            clearTimeout(timeoutId);
            timeoutId = setTimeout(
              () => setHasCopied(false),
              timeout
            );
          }
        }
      };
      for (const target of targets) {
        target.addEventListener("click", handleClick);
      }
      return () => {
        isActive = false;
        for (const target of targets) {
          target.removeEventListener("click", handleClick);
        }
        clearTimeout(timeoutId);
      };
    }, [ref, text, timeout]);
    return hasCopied;
  }

  // packages/compose/build-module/hooks/use-dialog/index.mjs
  var import_element13 = __toESM(require_element(), 1);
  var import_keycodes = __toESM(require_keycodes(), 1);

  // packages/compose/build-module/hooks/use-focus-on-mount/index.mjs
  var import_element9 = __toESM(require_element(), 1);
  var import_dom2 = __toESM(require_dom(), 1);
  function useFocusOnMount(focusOnMount = "firstElement") {
    const focusOnMountRef = (0, import_element9.useRef)(focusOnMount);
    const setFocus = (target) => {
      target.focus({
        // When focusing newly mounted dialogs,
        // the position of the popover is often not right on the first render
        // This prevents the layout shifts when focusing the dialogs.
        preventScroll: true
      });
    };
    const timerIdRef = (0, import_element9.useRef)(void 0);
    (0, import_element9.useEffect)(() => {
      focusOnMountRef.current = focusOnMount;
    }, [focusOnMount]);
    return useRefEffect((node) => {
      if (!node || focusOnMountRef.current === false) {
        return;
      }
      if (node.contains(node.ownerDocument?.activeElement ?? null)) {
        return;
      }
      if (focusOnMountRef.current !== "firstElement" && focusOnMountRef.current !== "firstInputElement") {
        setFocus(node);
        return;
      }
      timerIdRef.current = setTimeout(() => {
        if (focusOnMountRef.current === "firstInputElement") {
          let formInput = null;
          if (typeof window !== "undefined" && node instanceof window.Element) {
            formInput = node.querySelector(
              'input:not([type="hidden"]):not([disabled]), select:not([disabled]), textarea:not([disabled])'
            );
          }
          if (formInput) {
            setFocus(formInput);
            return;
          }
        }
        const firstTabbable = import_dom2.focus.tabbable.find(node)[0];
        if (firstTabbable) {
          setFocus(firstTabbable);
        }
      }, 0);
      return () => {
        if (timerIdRef.current) {
          clearTimeout(timerIdRef.current);
        }
      };
    }, []);
  }

  // packages/compose/build-module/hooks/use-focus-return/index.mjs
  var import_element10 = __toESM(require_element(), 1);
  var origin = null;
  function useFocusReturn(onFocusReturn) {
    const ref = (0, import_element10.useRef)(null);
    const focusedBeforeMount = (0, import_element10.useRef)(null);
    const onFocusReturnRef = (0, import_element10.useRef)(onFocusReturn);
    (0, import_element10.useEffect)(() => {
      onFocusReturnRef.current = onFocusReturn;
    }, [onFocusReturn]);
    return (0, import_element10.useCallback)((node) => {
      if (node) {
        ref.current = node;
        if (focusedBeforeMount.current) {
          return;
        }
        const activeDocument = node.ownerDocument.activeElement instanceof window.HTMLIFrameElement ? node.ownerDocument.activeElement.contentDocument : node.ownerDocument;
        focusedBeforeMount.current = activeDocument?.activeElement ?? null;
      } else if (focusedBeforeMount.current) {
        const isFocused = ref.current?.contains(
          ref.current?.ownerDocument.activeElement
        );
        if (ref.current?.isConnected && !isFocused) {
          origin ??= focusedBeforeMount.current;
          return;
        }
        if (onFocusReturnRef.current) {
          onFocusReturnRef.current();
        } else {
          (!focusedBeforeMount.current.isConnected ? origin : focusedBeforeMount.current)?.focus();
        }
        origin = null;
      }
    }, []);
  }
  var use_focus_return_default = useFocusReturn;

  // packages/compose/build-module/hooks/use-focus-outside/index.mjs
  var import_element11 = __toESM(require_element(), 1);
  var INPUT_BUTTON_TYPES = ["button", "submit"];
  function isFocusNormalizedButton(eventTarget) {
    if (!(eventTarget instanceof window.HTMLElement)) {
      return false;
    }
    switch (eventTarget.nodeName) {
      case "A":
      case "BUTTON":
        return true;
      case "INPUT":
        return INPUT_BUTTON_TYPES.includes(
          eventTarget.type
        );
    }
    return false;
  }
  function useFocusOutside(onFocusOutside) {
    const currentOnFocusOutsideRef = (0, import_element11.useRef)(onFocusOutside);
    (0, import_element11.useEffect)(() => {
      currentOnFocusOutsideRef.current = onFocusOutside;
    }, [onFocusOutside]);
    const preventBlurCheckRef = (0, import_element11.useRef)(false);
    const blurCheckTimeoutIdRef = (0, import_element11.useRef)(void 0);
    const cancelBlurCheck = (0, import_element11.useCallback)(() => {
      clearTimeout(blurCheckTimeoutIdRef.current);
    }, []);
    (0, import_element11.useEffect)(() => {
      if (!onFocusOutside) {
        cancelBlurCheck();
      }
    }, [onFocusOutside, cancelBlurCheck]);
    const normalizeButtonFocus = (0, import_element11.useCallback)((event) => {
      const { type, target } = event;
      const isInteractionEnd = ["mouseup", "touchend"].includes(type);
      if (isInteractionEnd) {
        preventBlurCheckRef.current = false;
      } else if (isFocusNormalizedButton(target)) {
        preventBlurCheckRef.current = true;
      }
    }, []);
    const queueBlurCheck = (0, import_element11.useCallback)((event) => {
      event.persist();
      if (preventBlurCheckRef.current) {
        return;
      }
      const ignoreForRelatedTarget = event.target.getAttribute(
        "data-unstable-ignore-focus-outside-for-relatedtarget"
      );
      if (ignoreForRelatedTarget && event.relatedTarget?.closest(ignoreForRelatedTarget)) {
        return;
      }
      blurCheckTimeoutIdRef.current = setTimeout(() => {
        if (!document.hasFocus()) {
          event.preventDefault();
          return;
        }
        if ("function" === typeof currentOnFocusOutsideRef.current) {
          currentOnFocusOutsideRef.current(event);
        }
      }, 0);
    }, []);
    return {
      onFocus: cancelBlurCheck,
      onMouseDown: normalizeButtonFocus,
      onMouseUp: normalizeButtonFocus,
      onTouchStart: normalizeButtonFocus,
      onTouchEnd: normalizeButtonFocus,
      onBlur: queueBlurCheck
    };
  }

  // packages/compose/build-module/hooks/use-merge-refs/index.mjs
  var import_element12 = __toESM(require_element(), 1);
  function assignRef(ref, value) {
    if (typeof ref === "function") {
      ref(value);
    } else if (ref && ref.hasOwnProperty("current")) {
      ref.current = value;
    }
  }
  function useMergeRefs(refs) {
    const element = (0, import_element12.useRef)(null);
    const isAttachedRef = (0, import_element12.useRef)(false);
    const didElementChangeRef = (0, import_element12.useRef)(false);
    const previousRefsRef = (0, import_element12.useRef)([]);
    const currentRefsRef = (0, import_element12.useRef)(refs);
    currentRefsRef.current = refs;
    (0, import_element12.useLayoutEffect)(() => {
      if (didElementChangeRef.current === false && isAttachedRef.current === true) {
        refs.forEach((ref, index) => {
          const previousRef = previousRefsRef.current[index];
          if (ref !== previousRef) {
            assignRef(previousRef, null);
            assignRef(ref, element.current);
          }
        });
      }
      previousRefsRef.current = refs;
    }, refs);
    (0, import_element12.useLayoutEffect)(() => {
      didElementChangeRef.current = false;
    });
    return (0, import_element12.useCallback)((value) => {
      assignRef(element, value);
      didElementChangeRef.current = true;
      isAttachedRef.current = value !== null;
      const refsToAssign = value ? currentRefsRef.current : previousRefsRef.current;
      for (const ref of refsToAssign) {
        assignRef(ref, value);
      }
    }, []);
  }

  // packages/compose/build-module/hooks/use-dialog/index.mjs
  function useDialog(options) {
    const currentOptions = (0, import_element13.useRef)(void 0);
    const { constrainTabbing = options.focusOnMount !== false } = options;
    (0, import_element13.useEffect)(() => {
      currentOptions.current = options;
    }, Object.values(options));
    const constrainedTabbingRef = use_constrained_tabbing_default();
    const focusOnMountRef = useFocusOnMount(options.focusOnMount);
    const focusReturnRef = use_focus_return_default();
    const focusOutsideProps = useFocusOutside((event) => {
      if (currentOptions.current?.__unstableOnClose) {
        currentOptions.current.__unstableOnClose("focus-outside", event);
      } else if (currentOptions.current?.onClose) {
        currentOptions.current.onClose();
      }
    });
    const closeOnEscapeRef = (0, import_element13.useCallback)((node) => {
      if (!node) {
        return;
      }
      node.addEventListener("keydown", (event) => {
        if (event.keyCode === import_keycodes.ESCAPE && !event.defaultPrevented && currentOptions.current?.onClose) {
          event.preventDefault();
          currentOptions.current.onClose();
        }
      });
    }, []);
    return [
      useMergeRefs([
        constrainTabbing ? constrainedTabbingRef : null,
        options.focusOnMount !== false ? focusReturnRef : null,
        options.focusOnMount !== false ? focusOnMountRef : null,
        closeOnEscapeRef
      ]),
      {
        ...focusOutsideProps,
        tabIndex: -1
      }
    ];
  }
  var use_dialog_default = useDialog;

  // packages/compose/build-module/hooks/use-disabled/index.mjs
  function useDisabled({
    isDisabled: isDisabledProp = false
  } = {}) {
    return useRefEffect(
      (node) => {
        if (isDisabledProp) {
          return;
        }
        const defaultView = node?.ownerDocument?.defaultView;
        if (!defaultView) {
          return;
        }
        const updates = [];
        const disable = () => {
          node.childNodes.forEach((child) => {
            if (!(child instanceof defaultView.HTMLElement)) {
              return;
            }
            if (!child.getAttribute("inert")) {
              child.setAttribute("inert", "true");
              updates.push(() => {
                child.removeAttribute("inert");
              });
            }
          });
        };
        const debouncedDisable = debounce(disable, 0, {
          leading: true
        });
        disable();
        const observer = new window.MutationObserver(debouncedDisable);
        observer.observe(node, {
          childList: true
        });
        return () => {
          if (observer) {
            observer.disconnect();
          }
          debouncedDisable.cancel();
          updates.forEach((update) => update());
        };
      },
      [isDisabledProp]
    );
  }

  // packages/compose/build-module/hooks/use-event/index.mjs
  var import_element14 = __toESM(require_element(), 1);
  function useEvent(callback) {
    const ref = (0, import_element14.useRef)(() => {
      throw new Error(
        "Callbacks created with `useEvent` cannot be called during rendering."
      );
    });
    (0, import_element14.useInsertionEffect)(() => {
      ref.current = callback;
    });
    return (0, import_element14.useCallback)(
      (...args) => ref.current?.(...args),
      []
    );
  }

  // packages/compose/build-module/hooks/use-dragging/index.mjs
  var import_element16 = __toESM(require_element(), 1);

  // packages/compose/build-module/hooks/use-isomorphic-layout-effect/index.mjs
  var import_element15 = __toESM(require_element(), 1);
  var useIsomorphicLayoutEffect = typeof window !== "undefined" ? import_element15.useLayoutEffect : import_element15.useEffect;
  var use_isomorphic_layout_effect_default = useIsomorphicLayoutEffect;

  // packages/compose/build-module/hooks/use-dragging/index.mjs
  function useDragging({ onDragStart, onDragMove, onDragEnd }) {
    const [isDragging, setIsDragging] = (0, import_element16.useState)(false);
    const eventsRef = (0, import_element16.useRef)({
      onDragStart,
      onDragMove,
      onDragEnd
    });
    use_isomorphic_layout_effect_default(() => {
      eventsRef.current.onDragStart = onDragStart;
      eventsRef.current.onDragMove = onDragMove;
      eventsRef.current.onDragEnd = onDragEnd;
    }, [onDragStart, onDragMove, onDragEnd]);
    const onMouseMove = (0, import_element16.useCallback)(
      (event) => eventsRef.current.onDragMove && eventsRef.current.onDragMove(event),
      []
    );
    const endDrag = (0, import_element16.useCallback)((event) => {
      if (eventsRef.current.onDragEnd) {
        eventsRef.current.onDragEnd(event);
      }
      document.removeEventListener("mousemove", onMouseMove);
      document.removeEventListener("mouseup", endDrag);
      setIsDragging(false);
    }, []);
    const startDrag = (0, import_element16.useCallback)((event) => {
      if (eventsRef.current.onDragStart) {
        eventsRef.current.onDragStart(event);
      }
      document.addEventListener("mousemove", onMouseMove);
      document.addEventListener("mouseup", endDrag);
      setIsDragging(true);
    }, []);
    (0, import_element16.useEffect)(() => {
      return () => {
        if (isDragging) {
          document.removeEventListener("mousemove", onMouseMove);
          document.removeEventListener("mouseup", endDrag);
        }
      };
    }, [isDragging]);
    return {
      startDrag,
      endDrag,
      isDragging
    };
  }

  // packages/compose/build-module/hooks/use-keyboard-shortcut/index.mjs
  var import_mousetrap = __toESM(require_mousetrap(), 1);

  // node_modules/mousetrap/plugins/global-bind/mousetrap-global-bind.js
  (function(Mousetrap3) {
    if (!Mousetrap3) {
      return;
    }
    var _globalCallbacks = {};
    var _originalStopCallback = Mousetrap3.prototype.stopCallback;
    Mousetrap3.prototype.stopCallback = function(e, element, combo, sequence) {
      var self = this;
      if (self.paused) {
        return true;
      }
      if (_globalCallbacks[combo] || _globalCallbacks[sequence]) {
        return false;
      }
      return _originalStopCallback.call(self, e, element, combo);
    };
    Mousetrap3.prototype.bindGlobal = function(keys, callback, action) {
      var self = this;
      self.bind(keys, callback, action);
      if (keys instanceof Array) {
        for (var i = 0; i < keys.length; i++) {
          _globalCallbacks[keys[i]] = true;
        }
        return;
      }
      _globalCallbacks[keys] = true;
    };
    Mousetrap3.init();
  })(typeof Mousetrap !== "undefined" ? Mousetrap : void 0);

  // packages/compose/build-module/hooks/use-keyboard-shortcut/index.mjs
  var import_element17 = __toESM(require_element(), 1);
  var import_keycodes2 = __toESM(require_keycodes(), 1);
  function useKeyboardShortcut(shortcuts, callback, {
    bindGlobal = false,
    eventName = "keydown",
    isDisabled = false,
    // This is important for performance considerations.
    target
  } = {}) {
    const currentCallbackRef = (0, import_element17.useRef)(callback);
    (0, import_element17.useEffect)(() => {
      currentCallbackRef.current = callback;
    }, [callback]);
    (0, import_element17.useEffect)(() => {
      if (isDisabled) {
        return;
      }
      const mousetrap = new import_mousetrap.default(
        target && target.current ? target.current : (
          // We were passing `document` here previously, so to successfully cast it to Element we must cast it first to `unknown`.
          // Not sure if this is a mistake but it was the behavior previous to the addition of types so we're just doing what's
          // necessary to maintain the existing behavior.
          /** @type {Element} */
          /** @type {unknown} */
          document
        )
      );
      const shortcutsArray = Array.isArray(shortcuts) ? shortcuts : [shortcuts];
      shortcutsArray.forEach((shortcut) => {
        const keys = shortcut.split("+");
        const modifiers = new Set(
          keys.filter((value) => value.length > 1)
        );
        const hasAlt = modifiers.has("alt");
        const hasShift = modifiers.has("shift");
        if ((0, import_keycodes2.isAppleOS)() && (modifiers.size === 1 && hasAlt || modifiers.size === 2 && hasAlt && hasShift)) {
          throw new Error(
            `Cannot bind ${shortcut}. Alt and Shift+Alt modifiers are reserved for character input.`
          );
        }
        const bindFn = bindGlobal ? "bindGlobal" : "bind";
        mousetrap[bindFn](
          shortcut,
          (...args) => currentCallbackRef.current(...args),
          eventName
        );
      });
      return () => {
        mousetrap.reset();
      };
    }, [shortcuts, bindGlobal, eventName, target, isDisabled]);
  }
  var use_keyboard_shortcut_default = useKeyboardShortcut;

  // packages/compose/build-module/hooks/use-media-query/index.mjs
  var import_element18 = __toESM(require_element(), 1);
  var perWindowCache = /* @__PURE__ */ new WeakMap();
  function getMediaQueryList(view, query) {
    if (!query) {
      return null;
    }
    const matchMediaCache = perWindowCache.get(view) ?? /* @__PURE__ */ new Map();
    if (!perWindowCache.has(view)) {
      perWindowCache.set(view, matchMediaCache);
    }
    let match = matchMediaCache.get(query);
    if (match) {
      return match;
    }
    if (typeof view?.matchMedia === "function") {
      match = view.matchMedia(query);
      matchMediaCache.set(query, match);
      return match;
    }
    return null;
  }
  function useMediaQuery(query, view = window) {
    const source = (0, import_element18.useMemo)(() => {
      const mediaQueryList = getMediaQueryList(view, query);
      return {
        subscribe(onStoreChange) {
          if (!mediaQueryList) {
            return () => {
            };
          }
          mediaQueryList.addEventListener?.("change", onStoreChange);
          return () => {
            mediaQueryList.removeEventListener?.(
              "change",
              onStoreChange
            );
          };
        },
        getValue() {
          return mediaQueryList?.matches ?? false;
        }
      };
    }, [view, query]);
    return (0, import_element18.useSyncExternalStore)(
      source.subscribe,
      source.getValue,
      () => false
    );
  }

  // packages/compose/build-module/hooks/use-previous/index.mjs
  var import_element19 = __toESM(require_element(), 1);
  function usePrevious(value) {
    const ref = (0, import_element19.useRef)(void 0);
    (0, import_element19.useEffect)(() => {
      ref.current = value;
    }, [value]);
    return ref.current;
  }

  // packages/compose/build-module/hooks/use-reduced-motion/index.mjs
  var useReducedMotion = () => useMediaQuery("(prefers-reduced-motion: reduce)");
  var use_reduced_motion_default = useReducedMotion;

  // packages/compose/build-module/hooks/use-state-with-history/index.mjs
  var import_undo_manager = __toESM(require_undo_manager(), 1);
  var import_element20 = __toESM(require_element(), 1);
  function undoRedoReducer(state, action) {
    switch (action.type) {
      case "UNDO": {
        const undoRecord = state.manager.undo();
        if (undoRecord) {
          return {
            ...state,
            value: undoRecord[0].changes.prop.from
          };
        }
        return state;
      }
      case "REDO": {
        const redoRecord = state.manager.redo();
        if (redoRecord) {
          return {
            ...state,
            value: redoRecord[0].changes.prop.to
          };
        }
        return state;
      }
      case "RECORD": {
        state.manager.addRecord(
          [
            {
              id: "object",
              changes: {
                prop: { from: state.value, to: action.value }
              }
            }
          ],
          action.isStaged
        );
        return {
          ...state,
          value: action.value
        };
      }
    }
    return state;
  }
  function initReducer(value) {
    return {
      manager: (0, import_undo_manager.createUndoManager)(),
      value
    };
  }
  function useStateWithHistory(initialValue) {
    const [state, dispatch] = (0, import_element20.useReducer)(
      undoRedoReducer,
      initialValue,
      initReducer
    );
    return {
      value: state.value,
      setValue: (0, import_element20.useCallback)((newValue, isStaged) => {
        dispatch({
          type: "RECORD",
          value: newValue,
          isStaged
        });
      }, []),
      hasUndo: state.manager.hasUndo(),
      hasRedo: state.manager.hasRedo(),
      undo: (0, import_element20.useCallback)(() => {
        dispatch({ type: "UNDO" });
      }, []),
      redo: (0, import_element20.useCallback)(() => {
        dispatch({ type: "REDO" });
      }, [])
    };
  }

  // packages/compose/build-module/hooks/use-viewport-match/index.mjs
  var import_element21 = __toESM(require_element(), 1);
  var BREAKPOINTS = {
    xhuge: 1920,
    huge: 1440,
    wide: 1280,
    xlarge: 1080,
    large: 960,
    medium: 782,
    small: 600,
    mobile: 480
  };
  var CONDITIONS = {
    ">=": "min-width",
    "<": "max-width"
  };
  var OPERATOR_EVALUATORS = {
    ">=": (breakpointValue, width) => width >= breakpointValue,
    "<": (breakpointValue, width) => width < breakpointValue
  };
  var ViewportMatchWidthContext = (0, import_element21.createContext)(
    /** @type {null | number} */
    null
  );
  ViewportMatchWidthContext.displayName = "ViewportMatchWidthContext";
  var useViewportMatch = (breakpoint, operator = ">=", view = window) => {
    const simulatedWidth = (0, import_element21.useContext)(ViewportMatchWidthContext);
    const mediaQuery = !simulatedWidth && `(${CONDITIONS[operator]}: ${BREAKPOINTS[breakpoint]}px)`;
    const mediaQueryResult = useMediaQuery(mediaQuery || void 0, view);
    if (simulatedWidth) {
      return OPERATOR_EVALUATORS[operator](
        BREAKPOINTS[breakpoint],
        simulatedWidth
      );
    }
    return mediaQueryResult;
  };
  useViewportMatch.__experimentalWidthProvider = ViewportMatchWidthContext.Provider;
  var use_viewport_match_default = useViewportMatch;

  // packages/compose/build-module/hooks/use-resize-observer/use-resize-observer.mjs
  var import_element22 = __toESM(require_element(), 1);
  function useResizeObserver(callback, resizeObserverOptions = {}) {
    const callbackEvent = useEvent(callback);
    const observedElementRef = (0, import_element22.useRef)(null);
    const resizeObserverRef = (0, import_element22.useRef)(void 0);
    return useEvent((element) => {
      if (element === observedElementRef.current) {
        return;
      }
      resizeObserverRef.current ??= new ResizeObserver(callbackEvent);
      const { current: resizeObserver } = resizeObserverRef;
      if (observedElementRef.current) {
        resizeObserver.unobserve(observedElementRef.current);
      }
      observedElementRef.current = element ?? null;
      if (element) {
        resizeObserver.observe(element, resizeObserverOptions);
      }
    });
  }

  // packages/compose/build-module/hooks/use-resize-observer/legacy/index.mjs
  var import_element23 = __toESM(require_element(), 1);
  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
  var extractSize = (entry) => {
    let entrySize;
    if (!entry.contentBoxSize) {
      entrySize = [entry.contentRect.width, entry.contentRect.height];
    } else if (entry.contentBoxSize[0]) {
      const contentBoxSize = entry.contentBoxSize[0];
      entrySize = [contentBoxSize.inlineSize, contentBoxSize.blockSize];
    } else {
      const contentBoxSize = entry.contentBoxSize;
      entrySize = [contentBoxSize.inlineSize, contentBoxSize.blockSize];
    }
    const [width, height] = entrySize.map((d) => Math.round(d));
    return { width, height };
  };
  var RESIZE_ELEMENT_STYLES = {
    position: "absolute",
    top: 0,
    left: 0,
    right: 0,
    bottom: 0,
    pointerEvents: "none",
    opacity: 0,
    overflow: "hidden",
    zIndex: -1
  };
  function ResizeElement({ onResize }) {
    const resizeElementRef = useResizeObserver((entries) => {
      const newSize = extractSize(entries.at(-1));
      onResize(newSize);
    });
    return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
      "div",
      {
        ref: resizeElementRef,
        style: RESIZE_ELEMENT_STYLES,
        "aria-hidden": "true"
      }
    );
  }
  function sizeEquals(a, b) {
    return a.width === b.width && a.height === b.height;
  }
  var NULL_SIZE = { width: null, height: null };
  function useLegacyResizeObserver() {
    const [size, setSize] = (0, import_element23.useState)(NULL_SIZE);
    const previousSizeRef = (0, import_element23.useRef)(NULL_SIZE);
    const handleResize = (0, import_element23.useCallback)((newSize) => {
      if (!sizeEquals(previousSizeRef.current, newSize)) {
        previousSizeRef.current = newSize;
        setSize(newSize);
      }
    }, []);
    const resizeElement = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ResizeElement, { onResize: handleResize });
    return [resizeElement, size];
  }

  // packages/compose/build-module/hooks/use-resize-observer/index.mjs
  function useResizeObserver2(callback, options = {}) {
    return callback ? useResizeObserver(callback, options) : useLegacyResizeObserver();
  }

  // packages/compose/build-module/hooks/use-async-list/index.mjs
  var import_element24 = __toESM(require_element(), 1);
  var import_priority_queue = __toESM(require_priority_queue(), 1);
  function getFirstItemsPresentInState(list, state) {
    const firstItems = [];
    for (let i = 0; i < list.length; i++) {
      const item = list[i];
      if (!state.includes(item)) {
        break;
      }
      firstItems.push(item);
    }
    return firstItems;
  }
  function useAsyncList(list, config = { step: 1 }) {
    const { step = 1 } = config;
    const [current, setCurrent] = (0, import_element24.useState)([]);
    (0, import_element24.useEffect)(() => {
      let firstItems = getFirstItemsPresentInState(list, current);
      if (firstItems.length < step) {
        firstItems = firstItems.concat(
          list.slice(firstItems.length, step)
        );
      }
      setCurrent(firstItems);
      const asyncQueue = (0, import_priority_queue.createQueue)();
      for (let i = firstItems.length; i < list.length; i += step) {
        asyncQueue.add({}, () => {
          (0, import_element24.flushSync)(() => {
            setCurrent((state) => [
              ...state,
              ...list.slice(i, i + step)
            ]);
          });
        });
      }
      return () => asyncQueue.reset();
    }, [list]);
    return current;
  }
  var use_async_list_default = useAsyncList;

  // packages/compose/build-module/hooks/use-warn-on-change/index.mjs
  function useWarnOnChange(object, prefix = "Change detection") {
    const previousValues = usePrevious(object);
    Object.entries(previousValues ?? []).forEach(([key, value]) => {
      if (value !== object[
        /** @type {keyof typeof object} */
        key
      ]) {
        console.warn(
          `${prefix}: ${key} key changed:`,
          value,
          object[
            /** @type {keyof typeof object} */
            key
          ]
          /* eslint-enable jsdoc/check-types */
        );
      }
    });
  }
  var use_warn_on_change_default = useWarnOnChange;

  // node_modules/use-memo-one/dist/use-memo-one.esm.js
  var import_react = __toESM(require_react());
  function areInputsEqual(newInputs, lastInputs) {
    if (newInputs.length !== lastInputs.length) {
      return false;
    }
    for (var i = 0; i < newInputs.length; i++) {
      if (newInputs[i] !== lastInputs[i]) {
        return false;
      }
    }
    return true;
  }
  function useMemoOne(getResult, inputs) {
    var initial = (0, import_react.useState)(function() {
      return {
        inputs,
        result: getResult()
      };
    })[0];
    var committed = (0, import_react.useRef)(initial);
    var isInputMatch = Boolean(inputs && committed.current.inputs && areInputsEqual(inputs, committed.current.inputs));
    var cache = isInputMatch ? committed.current : {
      inputs,
      result: getResult()
    };
    (0, import_react.useEffect)(function() {
      committed.current = cache;
    }, [cache]);
    return cache.result;
  }

  // packages/compose/build-module/hooks/use-debounce/index.mjs
  var import_element25 = __toESM(require_element(), 1);
  function useDebounce(fn, wait, options) {
    const debounced = useMemoOne(
      () => debounce(fn, wait ?? 0, options),
      [fn, wait, options?.leading, options?.trailing, options?.maxWait]
    );
    (0, import_element25.useEffect)(() => () => debounced.cancel(), [debounced]);
    return debounced;
  }

  // packages/compose/build-module/hooks/use-debounced-input/index.mjs
  var import_element26 = __toESM(require_element(), 1);
  function useDebouncedInput(defaultValue = "") {
    const [input, setInput] = (0, import_element26.useState)(defaultValue);
    const [debouncedInput, setDebouncedState] = (0, import_element26.useState)(defaultValue);
    const setDebouncedInput = useDebounce(setDebouncedState, 250);
    (0, import_element26.useEffect)(() => {
      setDebouncedInput(input);
    }, [input, setDebouncedInput]);
    return [input, setInput, debouncedInput];
  }

  // packages/compose/build-module/hooks/use-throttle/index.mjs
  var import_element27 = __toESM(require_element(), 1);
  function useThrottle(fn, wait, options) {
    const throttled = useMemoOne(
      () => throttle(fn, wait ?? 0, options),
      [fn, wait, options]
    );
    (0, import_element27.useEffect)(() => () => throttled.cancel(), [throttled]);
    return throttled;
  }

  // packages/compose/build-module/hooks/use-drop-zone/index.mjs
  function useDropZone({
    dropZoneElement,
    isDisabled,
    onDrop: _onDrop,
    onDragStart: _onDragStart,
    onDragEnter: _onDragEnter,
    onDragLeave: _onDragLeave,
    onDragEnd: _onDragEnd,
    onDragOver: _onDragOver
  }) {
    const onDropEvent = useEvent(_onDrop);
    const onDragStartEvent = useEvent(_onDragStart);
    const onDragEnterEvent = useEvent(_onDragEnter);
    const onDragLeaveEvent = useEvent(_onDragLeave);
    const onDragEndEvent = useEvent(_onDragEnd);
    const onDragOverEvent = useEvent(_onDragOver);
    return useRefEffect(
      (elem) => {
        if (isDisabled) {
          return;
        }
        const element = dropZoneElement ?? elem;
        let isDragging = false;
        const { ownerDocument } = element;
        function isElementInZone(targetToCheck) {
          const { defaultView } = ownerDocument;
          if (!targetToCheck || !defaultView || !(targetToCheck instanceof defaultView.HTMLElement) || !element.contains(targetToCheck)) {
            return false;
          }
          let elementToCheck = targetToCheck;
          do {
            if (elementToCheck.dataset.isDropZone) {
              return elementToCheck === element;
            }
          } while (elementToCheck = elementToCheck.parentElement);
          return false;
        }
        function maybeDragStart(event) {
          if (isDragging) {
            return;
          }
          isDragging = true;
          ownerDocument.addEventListener("dragend", maybeDragEnd);
          ownerDocument.addEventListener("mousemove", maybeDragEnd);
          if (_onDragStart) {
            onDragStartEvent(event);
          }
        }
        function onDragEnter(event) {
          event.preventDefault();
          if (element.contains(
            /** @type {Node} */
            event.relatedTarget
          )) {
            return;
          }
          if (_onDragEnter) {
            onDragEnterEvent(event);
          }
        }
        function onDragOver(event) {
          if (!event.defaultPrevented && _onDragOver) {
            onDragOverEvent(event);
          }
          event.preventDefault();
        }
        function onDragLeave(event) {
          if (isElementInZone(event.relatedTarget)) {
            return;
          }
          if (_onDragLeave) {
            onDragLeaveEvent(event);
          }
        }
        function onDrop(event) {
          if (event.defaultPrevented) {
            return;
          }
          event.preventDefault();
          event.dataTransfer && event.dataTransfer.files.length;
          if (_onDrop) {
            onDropEvent(event);
          }
          maybeDragEnd(event);
        }
        function maybeDragEnd(event) {
          if (!isDragging) {
            return;
          }
          isDragging = false;
          ownerDocument.removeEventListener("dragend", maybeDragEnd);
          ownerDocument.removeEventListener("mousemove", maybeDragEnd);
          if (_onDragEnd) {
            onDragEndEvent(event);
          }
        }
        element.setAttribute("data-is-drop-zone", "true");
        element.addEventListener("drop", onDrop);
        element.addEventListener("dragenter", onDragEnter);
        element.addEventListener("dragover", onDragOver);
        element.addEventListener("dragleave", onDragLeave);
        ownerDocument.addEventListener("dragenter", maybeDragStart);
        return () => {
          element.removeAttribute("data-is-drop-zone");
          element.removeEventListener("drop", onDrop);
          element.removeEventListener("dragenter", onDragEnter);
          element.removeEventListener("dragover", onDragOver);
          element.removeEventListener("dragleave", onDragLeave);
          ownerDocument.removeEventListener("dragend", maybeDragEnd);
          ownerDocument.removeEventListener("mousemove", maybeDragEnd);
          ownerDocument.removeEventListener(
            "dragenter",
            maybeDragStart
          );
        };
      },
      [isDisabled, dropZoneElement]
      // Refresh when the passed in dropZoneElement changes.
    );
  }

  // packages/compose/build-module/hooks/use-focusable-iframe/index.mjs
  function useFocusableIframe() {
    return useRefEffect((element) => {
      const { ownerDocument } = element;
      if (!ownerDocument) {
        return;
      }
      const { defaultView } = ownerDocument;
      if (!defaultView) {
        return;
      }
      function checkFocus() {
        if (ownerDocument && ownerDocument.activeElement === element) {
          element.focus();
        }
      }
      defaultView.addEventListener("blur", checkFocus);
      return () => {
        defaultView.removeEventListener("blur", checkFocus);
      };
    }, []);
  }

  // packages/compose/build-module/hooks/use-fixed-window-list/index.mjs
  var import_element28 = __toESM(require_element(), 1);
  var import_dom3 = __toESM(require_dom(), 1);
  var import_keycodes3 = __toESM(require_keycodes(), 1);
  var DEFAULT_INIT_WINDOW_SIZE = 30;
  function useFixedWindowList(elementRef, itemHeight, totalItems, options) {
    const initWindowSize = options?.initWindowSize ?? DEFAULT_INIT_WINDOW_SIZE;
    const useWindowing = options?.useWindowing ?? true;
    const [fixedListWindow, setFixedListWindow] = (0, import_element28.useState)({
      visibleItems: initWindowSize,
      start: 0,
      end: initWindowSize,
      itemInView: (index) => {
        return index >= 0 && index <= initWindowSize;
      }
    });
    (0, import_element28.useLayoutEffect)(() => {
      if (!useWindowing) {
        return;
      }
      const scrollContainer = (0, import_dom3.getScrollContainer)(elementRef.current);
      const measureWindow = (initRender) => {
        if (!scrollContainer) {
          return;
        }
        const visibleItems = Math.ceil(
          scrollContainer.clientHeight / itemHeight
        );
        const windowOverscan = initRender ? visibleItems : options?.windowOverscan ?? visibleItems;
        const firstViewableIndex = Math.floor(
          scrollContainer.scrollTop / itemHeight
        );
        const start = Math.max(0, firstViewableIndex - windowOverscan);
        const end = Math.min(
          totalItems - 1,
          firstViewableIndex + visibleItems + windowOverscan
        );
        setFixedListWindow((lastWindow) => {
          const nextWindow = {
            visibleItems,
            start,
            end,
            itemInView: (index) => {
              return start <= index && index <= end;
            }
          };
          if (lastWindow.start !== nextWindow.start || lastWindow.end !== nextWindow.end || lastWindow.visibleItems !== nextWindow.visibleItems) {
            return nextWindow;
          }
          return lastWindow;
        });
      };
      measureWindow(true);
      const debounceMeasureList = debounce(() => {
        measureWindow();
      }, 16);
      scrollContainer?.addEventListener("scroll", debounceMeasureList);
      scrollContainer?.ownerDocument?.defaultView?.addEventListener(
        "resize",
        debounceMeasureList
      );
      scrollContainer?.ownerDocument?.defaultView?.addEventListener(
        "resize",
        debounceMeasureList
      );
      return () => {
        scrollContainer?.removeEventListener(
          "scroll",
          debounceMeasureList
        );
        scrollContainer?.ownerDocument?.defaultView?.removeEventListener(
          "resize",
          debounceMeasureList
        );
      };
    }, [
      itemHeight,
      elementRef,
      totalItems,
      options?.expandedState,
      options?.windowOverscan,
      useWindowing
    ]);
    (0, import_element28.useLayoutEffect)(() => {
      if (!useWindowing) {
        return;
      }
      const scrollContainer = (0, import_dom3.getScrollContainer)(elementRef.current);
      const handleKeyDown = (event) => {
        switch (event.keyCode) {
          case import_keycodes3.HOME: {
            return scrollContainer?.scrollTo({ top: 0 });
          }
          case import_keycodes3.END: {
            return scrollContainer?.scrollTo({
              top: totalItems * itemHeight
            });
          }
          case import_keycodes3.PAGEUP: {
            return scrollContainer?.scrollTo({
              top: scrollContainer.scrollTop - fixedListWindow.visibleItems * itemHeight
            });
          }
          case import_keycodes3.PAGEDOWN: {
            return scrollContainer?.scrollTo({
              top: scrollContainer.scrollTop + fixedListWindow.visibleItems * itemHeight
            });
          }
        }
      };
      scrollContainer?.ownerDocument?.defaultView?.addEventListener(
        "keydown",
        handleKeyDown
      );
      return () => {
        scrollContainer?.ownerDocument?.defaultView?.removeEventListener(
          "keydown",
          handleKeyDown
        );
      };
    }, [
      totalItems,
      itemHeight,
      elementRef,
      fixedListWindow.visibleItems,
      useWindowing,
      options?.expandedState
    ]);
    return [fixedListWindow, setFixedListWindow];
  }

  // packages/compose/build-module/hooks/use-observable-value/index.mjs
  var import_element29 = __toESM(require_element(), 1);
  function useObservableValue(map, name) {
    const [subscribe, getValue] = (0, import_element29.useMemo)(
      () => [
        (listener2) => map.subscribe(name, listener2),
        () => map.get(name)
      ],
      [map, name]
    );
    return (0, import_element29.useSyncExternalStore)(subscribe, getValue, getValue);
  }
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                  dist/compose.min.js                                                                                 0000644                 00000070331 15212563776 0010316 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).compose=(()=>{var xr=Object.create;var le=Object.defineProperty;var Sr=Object.getOwnPropertyDescriptor;var Cr=Object.getOwnPropertyNames;var Rr=Object.getPrototypeOf,Or=Object.prototype.hasOwnProperty;var B=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Tr=(e,t)=>{for(var r in t)le(e,r,{get:t[r],enumerable:!0})},et=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Cr(t))!Or.call(e,o)&&o!==r&&le(e,o,{get:()=>t[o],enumerable:!(n=Sr(t,o))||n.enumerable});return e};var d=(e,t,r)=>(r=e!=null?xr(Rr(e)):{},et(t||!e||!e.__esModule?le(r,"default",{value:e,enumerable:!0}):r,e)),Lr=e=>et(le({},"__esModule",{value:!0}),e);var Z=B((Mn,st)=>{st.exports=window.ReactJSXRuntime});var lt=B((An,ct)=>{ct.exports=window.wp.isShallowEqual});var b=B((kn,dt)=>{dt.exports=window.wp.element});var me=B((Un,ht)=>{ht.exports=window.wp.deprecated});var ye=B((ro,Mt)=>{Mt.exports=window.wp.dom});var _e=B((co,zt)=>{zt.exports=window.wp.keycodes});var Nt=B((Do,De)=>{(function(e,t,r){if(!e)return;for(var n={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},o={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},i={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},c={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},s,f=1;f<20;++f)n[111+f]="f"+f;for(f=0;f<=9;++f)n[f+96]=f.toString();function p(u,a,m){if(u.addEventListener){u.addEventListener(a,m,!1);return}u.attachEvent("on"+a,m)}function y(u){if(u.type=="keypress"){var a=String.fromCharCode(u.which);return u.shiftKey||(a=a.toLowerCase()),a}return n[u.which]?n[u.which]:o[u.which]?o[u.which]:String.fromCharCode(u.which).toLowerCase()}function R(u,a){return u.sort().join(",")===a.sort().join(",")}function O(u){var a=[];return u.shiftKey&&a.push("shift"),u.altKey&&a.push("alt"),u.ctrlKey&&a.push("ctrl"),u.metaKey&&a.push("meta"),a}function A(u){if(u.preventDefault){u.preventDefault();return}u.returnValue=!1}function k(u){if(u.stopPropagation){u.stopPropagation();return}u.cancelBubble=!0}function E(u){return u=="shift"||u=="ctrl"||u=="alt"||u=="meta"}function z(){if(!s){s={};for(var u in n)u>95&&u<112||n.hasOwnProperty(u)&&(s[n[u]]=u)}return s}function T(u,a,m){return m||(m=z()[u]?"keydown":"keypress"),m=="keypress"&&a.length&&(m="keydown"),m}function K(u){return u==="+"?["+"]:(u=u.replace(/\+{2}/g,"+plus"),u.split("+"))}function F(u,a){var m,l,L,v=[];for(m=K(u),L=0;L<m.length;++L)l=m[L],c[l]&&(l=c[l]),a&&a!="keypress"&&i[l]&&(l=i[l],v.push("shift")),E(l)&&v.push(l);return a=T(l,v,a),{key:l,modifiers:v,action:a}}function N(u,a){return u===null||u===t?!1:u===a?!0:N(u.parentNode,a)}function C(u){var a=this;if(u=u||t,!(a instanceof C))return new C(u);a.target=u,a._callbacks={},a._directMap={};var m={},l,L=!1,v=!1,M=!1;function W(h){h=h||{};var g=!1,x;for(x in m){if(h[x]){g=!0;continue}m[x]=0}g||(M=!1)}function ue(h,g,x,w,S,$){var _,D,Y=[],Q=x.type;if(!a._callbacks[h])return[];for(Q=="keyup"&&E(h)&&(g=[h]),_=0;_<a._callbacks[h].length;++_)if(D=a._callbacks[h][_],!(!w&&D.seq&&m[D.seq]!=D.level)&&Q==D.action&&(Q=="keypress"&&!x.metaKey&&!x.ctrlKey||R(g,D.modifiers))){var Er=!w&&D.combo==S,_r=w&&D.seq==w&&D.level==$;(Er||_r)&&a._callbacks[h].splice(_,1),Y.push(D)}return Y}function We(h,g,x,w){a.stopCallback(g,g.target||g.srcElement,x,w)||h(g,x)===!1&&(A(g),k(g))}a._handleKey=function(h,g,x){var w=ue(h,g,x),S,$={},_=0,D=!1;for(S=0;S<w.length;++S)w[S].seq&&(_=Math.max(_,w[S].level));for(S=0;S<w.length;++S){if(w[S].seq){if(w[S].level!=_)continue;D=!0,$[w[S].seq]=1,We(w[S].callback,x,w[S].combo,w[S].seq);continue}D||We(w[S].callback,x,w[S].combo)}var Y=x.type=="keypress"&&v;x.type==M&&!E(h)&&!Y&&W($),v=D&&x.type=="keydown"};function Ue(h){typeof h.which!="number"&&(h.which=h.keyCode);var g=y(h);if(g){if(h.type=="keyup"&&L===g){L=!1;return}a.handleKey(g,O(h),h)}}function br(){clearTimeout(l),l=setTimeout(W,1e3)}function gr(h,g,x,w){m[h]=0;function S(Q){return function(){M=Q,++m[h],br()}}function $(Q){We(x,Q,h),w!=="keyup"&&(L=y(Q)),setTimeout(W,10)}for(var _=0;_<g.length;++_){var D=_+1===g.length,Y=D?$:S(w||F(g[_+1]).action);Je(g[_],Y,w,h,_)}}function Je(h,g,x,w,S){a._directMap[h+":"+x]=g,h=h.replace(/\s+/g," ");var $=h.split(" "),_;if($.length>1){gr(h,$,g,x);return}_=F(h,x),a._callbacks[_.key]=a._callbacks[_.key]||[],ue(_.key,_.modifiers,{type:_.action},w,h,S),a._callbacks[_.key][w?"unshift":"push"]({callback:g,modifiers:_.modifiers,action:_.action,seq:w,level:S,combo:h})}a._bindMultiple=function(h,g,x){for(var w=0;w<h.length;++w)Je(h[w],g,x)},p(u,"keypress",Ue),p(u,"keydown",Ue),p(u,"keyup",Ue)}C.prototype.bind=function(u,a,m){var l=this;return u=u instanceof Array?u:[u],l._bindMultiple.call(l,u,a,m),l},C.prototype.unbind=function(u,a){var m=this;return m.bind.call(m,u,function(){},a)},C.prototype.trigger=function(u,a){var m=this;return m._directMap[u+":"+a]&&m._directMap[u+":"+a]({},u),m},C.prototype.reset=function(){var u=this;return u._callbacks={},u._directMap={},u},C.prototype.stopCallback=function(u,a){var m=this;if((" "+a.className+" ").indexOf(" mousetrap ")>-1||N(a,m.target))return!1;if("composedPath"in u&&typeof u.composedPath=="function"){var l=u.composedPath()[0];l!==u.target&&(a=l)}return a.tagName=="INPUT"||a.tagName=="SELECT"||a.tagName=="TEXTAREA"||a.isContentEditable},C.prototype.handleKey=function(){var u=this;return u._handleKey.apply(u,arguments)},C.addKeycodes=function(u){for(var a in u)u.hasOwnProperty(a)&&(n[a]=u[a]);s=null},C.init=function(){var u=C(t);for(var a in u)a.charAt(0)!=="_"&&(C[a]=(function(m){return function(){return u[m].apply(u,arguments)}})(a))},C.init(),e.Mousetrap=C,typeof De<"u"&&De.exports&&(De.exports=C),typeof define=="function"&&define.amd&&define(function(){return C})})(typeof window<"u"?window:null,typeof window<"u"?document:null)});var Zt=B((zo,Qt)=>{Qt.exports=window.wp.undoManager});var ir=B((Qo,or)=>{or.exports=window.wp.priorityQueue});var cr=B((Yo,fr)=>{fr.exports=window.React});var pn={};Tr(pn,{__experimentalUseDialog:()=>Ut,__experimentalUseDragging:()=>Kt,__experimentalUseDropZone:()=>hr,__experimentalUseFixedWindowList:()=>yr,__experimentalUseFocusOutside:()=>Ce,compose:()=>ut,createHigherOrderComponent:()=>P,debounce:()=>G,ifCondition:()=>ft,observableMap:()=>Ar,pipe:()=>it,pure:()=>mt,throttle:()=>Ve,useAsyncList:()=>sr,useConstrainedTabbing:()=>be,useCopyOnClick:()=>jt,useCopyToClipboard:()=>At,useDebounce:()=>ze,useDebouncedInput:()=>dr,useDisabled:()=>Vt,useEvent:()=>j,useFocusOnMount:()=>xe,useFocusReturn:()=>Se,useFocusableIframe:()=>vr,useInstanceId:()=>ve,useIsomorphicLayoutEffect:()=>Le,useKeyboardShortcut:()=>$t,useMediaQuery:()=>te,useMergeRefs:()=>Oe,useObservableValue:()=>wr,usePrevious:()=>Pe,useReducedMotion:()=>Gt,useRefEffect:()=>I,useResizeObserver:()=>nr,useStateWithHistory:()=>Xt,useThrottle:()=>mr,useViewportMatch:()=>er,useWarnOnChange:()=>ar,withGlobalEvents:()=>bt,withInstanceId:()=>xt,withSafeTimeout:()=>Rt,withState:()=>Dt});var de=function(){return de=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},de.apply(this,arguments)};function tt(e){return e.toLowerCase()}var Dr=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Mr=/[^A-Z0-9]+/gi;function nt(e,t){t===void 0&&(t={});for(var r=t.splitRegexp,n=r===void 0?Dr:r,o=t.stripRegexp,i=o===void 0?Mr:o,c=t.transform,s=c===void 0?tt:c,f=t.delimiter,p=f===void 0?" ":f,y=rt(rt(e,n,"$1\0$2"),i,"\0"),R=0,O=y.length;y.charAt(R)==="\0";)R++;for(;y.charAt(O-1)==="\0";)O--;return y.slice(R,O).split("\0").map(s).join(p)}function rt(e,t,r){return t instanceof RegExp?e.replace(t,r):t.reduce(function(n,o){return n.replace(o,r)},e)}function Ir(e,t){var r=e.charAt(0),n=e.substr(1).toLowerCase();return t>0&&r>="0"&&r<="9"?"_"+r+n:""+r.toUpperCase()+n}function ot(e,t){return t===void 0&&(t={}),nt(e,de({delimiter:"",transform:Ir},t))}function P(e,t){return r=>{let n=e(r);return n.displayName=Pr(t,r),n}}var Pr=(e,t)=>{let r=t.displayName||t.name||"Component";return`${ot(e??"")}(${r})`};var G=(e,t,r)=>{let n,o,i=0,c,s,f,p=0,y=!1,R=!1,O=!0;r&&(y=!!r.leading,R="maxWait"in r,r.maxWait!==void 0&&(i=Math.max(r.maxWait,t)),O="trailing"in r?!!r.trailing:O);function A(v){let M=n,W=o;return n=void 0,o=void 0,p=v,c=e.apply(W,M),c}function k(v,M){s=setTimeout(v,M)}function E(){s!==void 0&&clearTimeout(s)}function z(v){return p=v,k(N,t),y?A(v):c}function T(v){return v-(f||0)}function K(v){let M=T(v),W=v-p,ue=t-M;return R?Math.min(ue,i-W):ue}function F(v){let M=T(v),W=v-p;return f===void 0||M>=t||M<0||R&&W>=i}function N(){let v=Date.now();if(F(v))return u(v);k(N,K(v))}function C(){s=void 0}function u(v){return C(),O&&n?A(v):(n=o=void 0,c)}function a(){E(),p=0,C(),n=f=o=void 0}function m(){return l()?u(Date.now()):c}function l(){return s!==void 0}function L(...v){let M=Date.now(),W=F(M);if(n=v,o=this,f=M,W){if(!l())return z(f);if(R)return k(N,t),A(f)}return l()||k(N,t),c}return L.cancel=a,L.flush=m,L.pending=l,L};var Ve=(e,t,r)=>{let n=!0,o=!0;return r&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),G(e,t,{leading:n,trailing:o,maxWait:t})};function Ar(){let e=new Map,t=new Map;function r(n){let o=t.get(n);if(o)for(let i of o)i()}return{get(n){return e.get(n)},set(n,o){e.set(n,o),r(n)},delete(n){e.delete(n),r(n)},subscribe(n,o){let i=t.get(n);return i||(i=new Set,t.set(n,i)),i.add(o),()=>{i.delete(o),i.size===0&&t.delete(n)}}}}var Ke=(e=!1)=>(...t)=>(...r)=>{let n=t.flat();return e&&n.reverse(),n.reduce((o,i)=>[i(...o)],r)[0]},kr=Ke(),it=kr;var jr=Ke(!0),ut=jr;var at=d(Z(),1);function zr(e){return P(t=>r=>e(r)?(0,at.jsx)(t,{...r}):null,"ifCondition")}var ft=zr;var pe=d(lt(),1),Ne=d(b(),1);var pt=d(Z(),1),Fr=P(function(e){return e.prototype instanceof Ne.Component?class extends e{shouldComponentUpdate(t,r){return!(0,pe.isShallowEqual)(t,this.props)||!(0,pe.isShallowEqual)(r,this.state)}}:class extends Ne.Component{shouldComponentUpdate(t){return!(0,pe.isShallowEqual)(t,this.props)}render(){return(0,pt.jsx)(e,{...this.props})}}},"pure"),mt=Fr;var he=d(b(),1),wt=d(me(),1);var Wr=class{constructor(){this.listeners={},this.handleEvent=this.handleEvent.bind(this)}add(e,t){this.listeners[e]||(window.addEventListener(e,this.handleEvent),this.listeners[e]=[]),this.listeners[e].push(t)}remove(e,t){this.listeners[e]&&(this.listeners[e]=this.listeners[e].filter(r=>r!==t),this.listeners[e].length||(window.removeEventListener(e,this.handleEvent),delete this.listeners[e]))}handleEvent(e){this.listeners[e.type]?.forEach(t=>{t.handleEvent(e)})}},vt=Wr;var Be=d(Z(),1),yt=new vt;function bt(e){return(0,wt.default)("wp.compose.withGlobalEvents",{since:"5.7",alternative:"useEffect"}),P(t=>{class r extends he.Component{constructor(o){super(o),this.handleEvent=this.handleEvent.bind(this),this.handleRef=this.handleRef.bind(this)}componentDidMount(){Object.keys(e).forEach(o=>{yt.add(o,this)})}componentWillUnmount(){Object.keys(e).forEach(o=>{yt.remove(o,this)})}handleEvent(o){let i=e[o.type];typeof this.wrappedRef[i]=="function"&&this.wrappedRef[i](o)}handleRef(o){this.wrappedRef=o,this.props.forwardedRef&&this.props.forwardedRef(o)}render(){return(0,Be.jsx)(t,{...this.props.ownProps,ref:this.handleRef})}}return(0,he.forwardRef)((n,o)=>(0,Be.jsx)(r,{ownProps:n,forwardedRef:o}))},"withGlobalEvents")}var Et=d(b(),1),gt=new WeakMap;function Ur(e){let t=gt.get(e)||0;return gt.set(e,t+1),t}function Vr(e,t,r){return(0,Et.useMemo)(()=>{if(r)return r;let n=Ur(e);return t?`${t}-${n}`:n},[e,r,t])}var ve=Vr;var _t=d(Z(),1),Kr=P(e=>t=>{let r=ve(e);return(0,_t.jsx)(e,{...t,instanceId:r})},"instanceId"),xt=Kr;var St=d(b(),1);var Ct=d(Z(),1),Nr=P(e=>class extends St.Component{timeouts;constructor(r){super(r),this.timeouts=[],this.setTimeout=this.setTimeout.bind(this),this.clearTimeout=this.clearTimeout.bind(this)}componentWillUnmount(){this.timeouts.forEach(clearTimeout)}setTimeout(r,n){let o=setTimeout(()=>{r(),this.clearTimeout(o)},n);return this.timeouts.push(o),o}clearTimeout(r){clearTimeout(r),this.timeouts=this.timeouts.filter(n=>n!==r)}render(){return(0,Ct.jsx)(e,{...this.props,setTimeout:this.setTimeout,clearTimeout:this.clearTimeout})}},"withSafeTimeout"),Rt=Nr;var Ot=d(b(),1),Tt=d(me(),1);var Lt=d(Z(),1);function Dt(e={}){return(0,Tt.default)("wp.compose.withState",{since:"5.8",alternative:"wp.element.useState"}),P(t=>class extends Ot.Component{constructor(n){super(n),this.setState=this.setState.bind(this),this.state=e}render(){return(0,Lt.jsx)(t,{...this.props,...this.state,setState:this.setState})}},"withState")}var It=d(ye(),1);var we=d(b(),1);function I(e,t){let r=(0,we.useRef)(void 0);return(0,we.useCallback)(n=>{n?r.current=e(n):r.current&&r.current()},t)}function Br(){return I(e=>{function t(r){let{key:n,shiftKey:o,target:i}=r;if(n!=="Tab")return;let c=o?"findPrevious":"findNext",s=It.focus.tabbable[c](i)||null;if(i.contains(s)){r.preventDefault(),s?.focus();return}if(e.contains(s))return;let f=o?"append":"prepend",{ownerDocument:p}=e,y=p.createElement("div");y.tabIndex=-1,e[f](y),y.addEventListener("blur",()=>e.removeChild(y)),y.focus()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}},[])}var be=Br;var Ee=d(b(),1),kt=d(me(),1);var ge=d(b(),1);async function qe(e,t){if(!t)return!1;let{ownerDocument:r}=t;if(!r)return!1;let{defaultView:n}=r;try{if(n?.navigator?.clipboard?.writeText)return await n.navigator.clipboard.writeText(e),!0;let o=r.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style.position="fixed",o.style.left="-9999px",o.style.top="-9999px",r.body.appendChild(o),o.select();let i=r.execCommand("copy");return o.remove(),i}catch{return!1}}function $e(e){"focus"in e&&typeof e.focus=="function"&&e.focus(),e.ownerDocument?.defaultView?.getSelection()?.removeAllRanges()}function Pt(e){let t=(0,ge.useRef)(e);return(0,ge.useLayoutEffect)(()=>{t.current=e},[e]),t}function At(e,t){let r=Pt(e),n=Pt(t);return I(o=>{let i=!0,c=async()=>{let s=typeof r.current=="function"?r.current():r.current||"",f=await qe(s,o);i&&f&&($e(o),n.current&&n.current())};return o.addEventListener("click",c),()=>{i=!1,o.removeEventListener("click",c)}},[])}function jt(e,t,r=4e3){(0,kt.default)("wp.compose.useCopyOnClick",{since:"5.8",alternative:"wp.compose.useCopyToClipboard"});let[n,o]=(0,Ee.useState)(!1);return(0,Ee.useEffect)(()=>{let i=!0,c;if(!e.current)return;let s;if(typeof e.current=="string"?s=typeof document<"u"?Array.from(document.querySelectorAll(e.current)):[]:"length"in e.current&&typeof e.current.length=="number"?s=Array.from(e.current):s=[e.current],s.length===0)return;let f=async p=>{let y=p.currentTarget;if(!y)return;let R=await qe(typeof t=="function"?t():t||"",y);i&&R&&($e(y),r&&(o(!0),clearTimeout(c),c=setTimeout(()=>o(!1),r)))};for(let p of s)p.addEventListener("click",f);return()=>{i=!1;for(let p of s)p.removeEventListener("click",f);clearTimeout(c)}},[e,t,r]),n}var J=d(b(),1),Wt=d(_e(),1);var se=d(b(),1),Ft=d(ye(),1);function xe(e="firstElement"){let t=(0,se.useRef)(e),r=o=>{o.focus({preventScroll:!0})},n=(0,se.useRef)(void 0);return(0,se.useEffect)(()=>{t.current=e},[e]),I(o=>{if(!(!o||t.current===!1)&&!o.contains(o.ownerDocument?.activeElement??null)){if(t.current!=="firstElement"&&t.current!=="firstInputElement"){r(o);return}return n.current=setTimeout(()=>{if(t.current==="firstInputElement"){let c=null;if(typeof window<"u"&&o instanceof window.Element&&(c=o.querySelector('input:not([type="hidden"]):not([disabled]), select:not([disabled]), textarea:not([disabled])')),c){r(c);return}}let i=Ft.focus.tabbable.find(o)[0];i&&r(i)},0),()=>{n.current&&clearTimeout(n.current)}}},[])}var H=d(b(),1),Ge=null;function qr(e){let t=(0,H.useRef)(null),r=(0,H.useRef)(null),n=(0,H.useRef)(e);return(0,H.useEffect)(()=>{n.current=e},[e]),(0,H.useCallback)(o=>{if(o){if(t.current=o,r.current)return;let i=o.ownerDocument.activeElement instanceof window.HTMLIFrameElement?o.ownerDocument.activeElement.contentDocument:o.ownerDocument;r.current=i?.activeElement??null}else if(r.current){let i=t.current?.contains(t.current?.ownerDocument.activeElement);if(t.current?.isConnected&&!i){Ge??=r.current;return}n.current?n.current():(r.current.isConnected?r.current:Ge)?.focus(),Ge=null}},[])}var Se=qr;var U=d(b(),1),$r=["button","submit"];function Gr(e){if(!(e instanceof window.HTMLElement))return!1;switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return $r.includes(e.type)}return!1}function Ce(e){let t=(0,U.useRef)(e);(0,U.useEffect)(()=>{t.current=e},[e]);let r=(0,U.useRef)(!1),n=(0,U.useRef)(void 0),o=(0,U.useCallback)(()=>{clearTimeout(n.current)},[]);(0,U.useEffect)(()=>{e||o()},[e,o]);let i=(0,U.useCallback)(s=>{let{type:f,target:p}=s;["mouseup","touchend"].includes(f)?r.current=!1:Gr(p)&&(r.current=!0)},[]),c=(0,U.useCallback)(s=>{if(s.persist(),r.current)return;let f=s.target.getAttribute("data-unstable-ignore-focus-outside-for-relatedtarget");f&&s.relatedTarget?.closest(f)||(n.current=setTimeout(()=>{if(!document.hasFocus()){s.preventDefault();return}typeof t.current=="function"&&t.current(s)},0))},[]);return{onFocus:o,onMouseDown:i,onMouseUp:i,onTouchStart:i,onTouchEnd:i,onBlur:c}}var V=d(b(),1);function Re(e,t){typeof e=="function"?e(t):e&&e.hasOwnProperty("current")&&(e.current=t)}function Oe(e){let t=(0,V.useRef)(null),r=(0,V.useRef)(!1),n=(0,V.useRef)(!1),o=(0,V.useRef)([]),i=(0,V.useRef)(e);return i.current=e,(0,V.useLayoutEffect)(()=>{n.current===!1&&r.current===!0&&e.forEach((c,s)=>{let f=o.current[s];c!==f&&(Re(f,null),Re(c,t.current))}),o.current=e},e),(0,V.useLayoutEffect)(()=>{n.current=!1}),(0,V.useCallback)(c=>{Re(t,c),n.current=!0,r.current=c!==null;let s=c?i.current:o.current;for(let f of s)Re(f,c)},[])}function Qr(e){let t=(0,J.useRef)(void 0),{constrainTabbing:r=e.focusOnMount!==!1}=e;(0,J.useEffect)(()=>{t.current=e},Object.values(e));let n=be(),o=xe(e.focusOnMount),i=Se(),c=Ce(f=>{t.current?.__unstableOnClose?t.current.__unstableOnClose("focus-outside",f):t.current?.onClose&&t.current.onClose()}),s=(0,J.useCallback)(f=>{f&&f.addEventListener("keydown",p=>{p.keyCode===Wt.ESCAPE&&!p.defaultPrevented&&t.current?.onClose&&(p.preventDefault(),t.current.onClose())})},[]);return[Oe([r?n:null,e.focusOnMount!==!1?i:null,e.focusOnMount!==!1?o:null,s]),{...c,tabIndex:-1}]}var Ut=Qr;function Vt({isDisabled:e=!1}={}){return I(t=>{if(e)return;let r=t?.ownerDocument?.defaultView;if(!r)return;let n=[],o=()=>{t.childNodes.forEach(s=>{s instanceof r.HTMLElement&&(s.getAttribute("inert")||(s.setAttribute("inert","true"),n.push(()=>{s.removeAttribute("inert")})))})},i=G(o,0,{leading:!0});o();let c=new window.MutationObserver(i);return c.observe(t,{childList:!0}),()=>{c&&c.disconnect(),i.cancel(),n.forEach(s=>s())}},[e])}var ee=d(b(),1);function j(e){let t=(0,ee.useRef)(()=>{throw new Error("Callbacks created with `useEvent` cannot be called during rendering.")});return(0,ee.useInsertionEffect)(()=>{t.current=e}),(0,ee.useCallback)((...r)=>t.current?.(...r),[])}var q=d(b(),1);var Te=d(b(),1),Zr=typeof window<"u"?Te.useLayoutEffect:Te.useEffect,Le=Zr;function Kt({onDragStart:e,onDragMove:t,onDragEnd:r}){let[n,o]=(0,q.useState)(!1),i=(0,q.useRef)({onDragStart:e,onDragMove:t,onDragEnd:r});Le(()=>{i.current.onDragStart=e,i.current.onDragMove=t,i.current.onDragEnd=r},[e,t,r]);let c=(0,q.useCallback)(p=>i.current.onDragMove&&i.current.onDragMove(p),[]),s=(0,q.useCallback)(p=>{i.current.onDragEnd&&i.current.onDragEnd(p),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",s),o(!1)},[]),f=(0,q.useCallback)(p=>{i.current.onDragStart&&i.current.onDragStart(p),document.addEventListener("mousemove",c),document.addEventListener("mouseup",s),o(!0)},[]);return(0,q.useEffect)(()=>()=>{n&&(document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",s))},[n]),{startDrag:f,endDrag:s,isDragging:n}}var Bt=d(Nt(),1);(function(e){if(e){var t={},r=e.prototype.stopCallback;e.prototype.stopCallback=function(n,o,i,c){var s=this;return s.paused?!0:t[i]||t[c]?!1:r.call(s,n,o,i)},e.prototype.bindGlobal=function(n,o,i){var c=this;if(c.bind(n,o,i),n instanceof Array){for(var s=0;s<n.length;s++)t[n[s]]=!0;return}t[n]=!0},e.init()}})(typeof Mousetrap<"u"?Mousetrap:void 0);var ae=d(b(),1),qt=d(_e(),1);function Hr(e,t,{bindGlobal:r=!1,eventName:n="keydown",isDisabled:o=!1,target:i}={}){let c=(0,ae.useRef)(t);(0,ae.useEffect)(()=>{c.current=t},[t]),(0,ae.useEffect)(()=>{if(o)return;let s=new Bt.default(i&&i.current?i.current:document);return(Array.isArray(e)?e:[e]).forEach(p=>{let y=p.split("+"),R=new Set(y.filter(E=>E.length>1)),O=R.has("alt"),A=R.has("shift");if((0,qt.isAppleOS)()&&(R.size===1&&O||R.size===2&&O&&A))throw new Error(`Cannot bind ${p}. Alt and Shift+Alt modifiers are reserved for character input.`);s[r?"bindGlobal":"bind"](p,(...E)=>c.current(...E),n)}),()=>{s.reset()}},[e,r,n,i,o])}var $t=Hr;var Me=d(b(),1),Qe=new WeakMap;function Xr(e,t){if(!t)return null;let r=Qe.get(e)??new Map;Qe.has(e)||Qe.set(e,r);let n=r.get(t);return n||(typeof e?.matchMedia=="function"?(n=e.matchMedia(t),r.set(t,n),n):null)}function te(e,t=window){let r=(0,Me.useMemo)(()=>{let n=Xr(t,e);return{subscribe(o){return n?(n.addEventListener?.("change",o),()=>{n.removeEventListener?.("change",o)}):()=>{}},getValue(){return n?.matches??!1}}},[t,e]);return(0,Me.useSyncExternalStore)(r.subscribe,r.getValue,()=>!1)}var Ie=d(b(),1);function Pe(e){let t=(0,Ie.useRef)(void 0);return(0,Ie.useEffect)(()=>{t.current=e},[e]),t.current}var Yr=()=>te("(prefers-reduced-motion: reduce)"),Gt=Yr;var Ht=d(Zt(),1),re=d(b(),1);function Jr(e,t){switch(t.type){case"UNDO":{let r=e.manager.undo();return r?{...e,value:r[0].changes.prop.from}:e}case"REDO":{let r=e.manager.redo();return r?{...e,value:r[0].changes.prop.to}:e}case"RECORD":return e.manager.addRecord([{id:"object",changes:{prop:{from:e.value,to:t.value}}}],t.isStaged),{...e,value:t.value}}return e}function en(e){return{manager:(0,Ht.createUndoManager)(),value:e}}function Xt(e){let[t,r]=(0,re.useReducer)(Jr,e,en);return{value:t.value,setValue:(0,re.useCallback)((n,o)=>{r({type:"RECORD",value:n,isStaged:o})},[]),hasUndo:t.manager.hasUndo(),hasRedo:t.manager.hasRedo(),undo:(0,re.useCallback)(()=>{r({type:"UNDO"})},[]),redo:(0,re.useCallback)(()=>{r({type:"REDO"})},[])}}var Ae=d(b(),1);var Yt={xhuge:1920,huge:1440,wide:1280,xlarge:1080,large:960,medium:782,small:600,mobile:480},tn={">=":"min-width","<":"max-width"},rn={">=":(e,t)=>t>=e,"<":(e,t)=>t<e},Ze=(0,Ae.createContext)(null);Ze.displayName="ViewportMatchWidthContext";var Jt=(e,t=">=",r=window)=>{let n=(0,Ae.useContext)(Ze),o=!n&&`(${tn[t]}: ${Yt[e]}px)`,i=te(o||void 0,r);return n?rn[t](Yt[e],n):i};Jt.__experimentalWidthProvider=Ze.Provider;var er=Jt;var He=d(b(),1);function ke(e,t={}){let r=j(e),n=(0,He.useRef)(null),o=(0,He.useRef)(void 0);return j(i=>{if(i===n.current)return;o.current??=new ResizeObserver(r);let{current:c}=o;n.current&&c.unobserve(n.current),n.current=i??null,i&&c.observe(i,t)})}var ne=d(b(),1);var Xe=d(Z(),1),nn=e=>{let t;if(!e.contentBoxSize)t=[e.contentRect.width,e.contentRect.height];else if(e.contentBoxSize[0]){let o=e.contentBoxSize[0];t=[o.inlineSize,o.blockSize]}else{let o=e.contentBoxSize;t=[o.inlineSize,o.blockSize]}let[r,n]=t.map(o=>Math.round(o));return{width:r,height:n}},on={position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",opacity:0,overflow:"hidden",zIndex:-1};function un({onResize:e}){let t=ke(r=>{let n=nn(r.at(-1));e(n)});return(0,Xe.jsx)("div",{ref:t,style:on,"aria-hidden":"true"})}function sn(e,t){return e.width===t.width&&e.height===t.height}var tr={width:null,height:null};function rr(){let[e,t]=(0,ne.useState)(tr),r=(0,ne.useRef)(tr),n=(0,ne.useCallback)(i=>{sn(r.current,i)||(r.current=i,t(i))},[]);return[(0,Xe.jsx)(un,{onResize:n}),e]}function nr(e,t={}){return e?ke(e,t):rr()}var oe=d(b(),1),ur=d(ir(),1);function an(e,t){let r=[];for(let n=0;n<e.length;n++){let o=e[n];if(!t.includes(o))break;r.push(o)}return r}function fn(e,t={step:1}){let{step:r=1}=t,[n,o]=(0,oe.useState)([]);return(0,oe.useEffect)(()=>{let i=an(e,n);i.length<r&&(i=i.concat(e.slice(i.length,r))),o(i);let c=(0,ur.createQueue)();for(let s=i.length;s<e.length;s+=r)c.add({},()=>{(0,oe.flushSync)(()=>{o(f=>[...f,...e.slice(s,s+r)])})});return()=>c.reset()},[e]),n}var sr=fn;function cn(e,t="Change detection"){let r=Pe(e);Object.entries(r??[]).forEach(([n,o])=>{o!==e[n]&&console.warn(`${t}: ${n} key changed:`,o,e[n])})}var ar=cn;var ie=d(cr());function ln(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function je(e,t){var r=(0,ie.useState)(function(){return{inputs:t,result:e()}})[0],n=(0,ie.useRef)(r),o=!!(t&&n.current.inputs&&ln(t,n.current.inputs)),i=o?n.current:{inputs:t,result:e()};return(0,ie.useEffect)(function(){n.current=i},[i]),i.result}var lr=d(b(),1);function ze(e,t,r){let n=je(()=>G(e,t??0,r),[e,t,r?.leading,r?.trailing,r?.maxWait]);return(0,lr.useEffect)(()=>()=>n.cancel(),[n]),n}var fe=d(b(),1);function dr(e=""){let[t,r]=(0,fe.useState)(e),[n,o]=(0,fe.useState)(e),i=ze(o,250);return(0,fe.useEffect)(()=>{i(t)},[t,i]),[t,r,n]}var pr=d(b(),1);function mr(e,t,r){let n=je(()=>Ve(e,t??0,r),[e,t,r]);return(0,pr.useEffect)(()=>()=>n.cancel(),[n]),n}function hr({dropZoneElement:e,isDisabled:t,onDrop:r,onDragStart:n,onDragEnter:o,onDragLeave:i,onDragEnd:c,onDragOver:s}){let f=j(r),p=j(n),y=j(o),R=j(i),O=j(c),A=j(s);return I(k=>{if(t)return;let E=e??k,z=!1,{ownerDocument:T}=E;function K(l){let{defaultView:L}=T;if(!l||!L||!(l instanceof L.HTMLElement)||!E.contains(l))return!1;let v=l;do if(v.dataset.isDropZone)return v===E;while(v=v.parentElement);return!1}function F(l){z||(z=!0,T.addEventListener("dragend",m),T.addEventListener("mousemove",m),n&&p(l))}function N(l){l.preventDefault(),!E.contains(l.relatedTarget)&&o&&y(l)}function C(l){!l.defaultPrevented&&s&&A(l),l.preventDefault()}function u(l){K(l.relatedTarget)||i&&R(l)}function a(l){l.defaultPrevented||(l.preventDefault(),l.dataTransfer&&l.dataTransfer.files.length,r&&f(l),m(l))}function m(l){z&&(z=!1,T.removeEventListener("dragend",m),T.removeEventListener("mousemove",m),c&&O(l))}return E.setAttribute("data-is-drop-zone","true"),E.addEventListener("drop",a),E.addEventListener("dragenter",N),E.addEventListener("dragover",C),E.addEventListener("dragleave",u),T.addEventListener("dragenter",F),()=>{E.removeAttribute("data-is-drop-zone"),E.removeEventListener("drop",a),E.removeEventListener("dragenter",N),E.removeEventListener("dragover",C),E.removeEventListener("dragleave",u),T.removeEventListener("dragend",m),T.removeEventListener("mousemove",m),T.removeEventListener("dragenter",F)}},[t,e])}function vr(){return I(e=>{let{ownerDocument:t}=e;if(!t)return;let{defaultView:r}=t;if(!r)return;function n(){t&&t.activeElement===e&&e.focus()}return r.addEventListener("blur",n),()=>{r.removeEventListener("blur",n)}},[])}var ce=d(b(),1),Ye=d(ye(),1),X=d(_e(),1);var dn=30;function yr(e,t,r,n){let o=n?.initWindowSize??dn,i=n?.useWindowing??!0,[c,s]=(0,ce.useState)({visibleItems:o,start:0,end:o,itemInView:f=>f>=0&&f<=o});return(0,ce.useLayoutEffect)(()=>{if(!i)return;let f=(0,Ye.getScrollContainer)(e.current),p=R=>{if(!f)return;let O=Math.ceil(f.clientHeight/t),A=R?O:n?.windowOverscan??O,k=Math.floor(f.scrollTop/t),E=Math.max(0,k-A),z=Math.min(r-1,k+O+A);s(T=>{let K={visibleItems:O,start:E,end:z,itemInView:F=>E<=F&&F<=z};return T.start!==K.start||T.end!==K.end||T.visibleItems!==K.visibleItems?K:T})};p(!0);let y=G(()=>{p()},16);return f?.addEventListener("scroll",y),f?.ownerDocument?.defaultView?.addEventListener("resize",y),f?.ownerDocument?.defaultView?.addEventListener("resize",y),()=>{f?.removeEventListener("scroll",y),f?.ownerDocument?.defaultView?.removeEventListener("resize",y)}},[t,e,r,n?.expandedState,n?.windowOverscan,i]),(0,ce.useLayoutEffect)(()=>{if(!i)return;let f=(0,Ye.getScrollContainer)(e.current),p=y=>{switch(y.keyCode){case X.HOME:return f?.scrollTo({top:0});case X.END:return f?.scrollTo({top:r*t});case X.PAGEUP:return f?.scrollTo({top:f.scrollTop-c.visibleItems*t});case X.PAGEDOWN:return f?.scrollTo({top:f.scrollTop+c.visibleItems*t})}};return f?.ownerDocument?.defaultView?.addEventListener("keydown",p),()=>{f?.ownerDocument?.defaultView?.removeEventListener("keydown",p)}},[r,t,e,c.visibleItems,i,n?.expandedState]),[c,s]}var Fe=d(b(),1);function wr(e,t){let[r,n]=(0,Fe.useMemo)(()=>[o=>e.subscribe(t,o),()=>e.get(t)],[e,t]);return(0,Fe.useSyncExternalStore)(r,n,n)}return Lr(pn);})();
                                                                                                                                                                                                                                                                                                       dist/core-commands.js                                                                               0000644                 00000071267 15212563776 0010627 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;
(wp ||= {}).coreCommands = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/router
  var require_router = __commonJS({
    "package-external:@wordpress/router"(exports, module) {
      module.exports = window.wp.router;
    }
  });

  // package-external:@wordpress/commands
  var require_commands = __commonJS({
    "package-external:@wordpress/commands"(exports, module) {
      module.exports = window.wp.commands;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // package-external:@wordpress/primitives
  var require_primitives = __commonJS({
    "package-external:@wordpress/primitives"(exports, module) {
      module.exports = window.wp.primitives;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // package-external:@wordpress/core-data
  var require_core_data = __commonJS({
    "package-external:@wordpress/core-data"(exports, module) {
      module.exports = window.wp.coreData;
    }
  });

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/url
  var require_url = __commonJS({
    "package-external:@wordpress/url"(exports, module) {
      module.exports = window.wp.url;
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // package-external:@wordpress/html-entities
  var require_html_entities = __commonJS({
    "package-external:@wordpress/html-entities"(exports, module) {
      module.exports = window.wp.htmlEntities;
    }
  });

  // package-external:@wordpress/private-apis
  var require_private_apis = __commonJS({
    "package-external:@wordpress/private-apis"(exports, module) {
      module.exports = window.wp.privateApis;
    }
  });

  // packages/core-commands/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    initializeCommandPalette: () => initializeCommandPalette,
    privateApis: () => privateApis
  });
  var import_element3 = __toESM(require_element(), 1);
  var import_router2 = __toESM(require_router(), 1);
  var import_commands3 = __toESM(require_commands(), 1);

  // packages/core-commands/build-module/admin-navigation-commands.mjs
  var import_commands = __toESM(require_commands(), 1);
  var import_i18n = __toESM(require_i18n(), 1);

  // packages/icons/build-module/library/brush.mjs
  var import_primitives = __toESM(require_primitives(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  var brush_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { 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" }) });

  // packages/icons/build-module/library/external.mjs
  var import_primitives2 = __toESM(require_primitives(), 1);
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  var external_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.Path, { 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" }) });

  // packages/icons/build-module/library/layout.mjs
  var import_primitives3 = __toESM(require_primitives(), 1);
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
  var layout_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.Path, { 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" }) });

  // packages/icons/build-module/library/navigation.mjs
  var import_primitives4 = __toESM(require_primitives(), 1);
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
  var navigation_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.Path, { 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" }) });

  // packages/icons/build-module/library/page.mjs
  var import_primitives5 = __toESM(require_primitives(), 1);
  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
  var page_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.Path, { d: "M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z" }),
    /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.Path, { 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" })
  ] });

  // packages/icons/build-module/library/post.mjs
  var import_primitives6 = __toESM(require_primitives(), 1);
  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
  var post_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.Path, { 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" }) });

  // packages/icons/build-module/library/styles.mjs
  var import_primitives7 = __toESM(require_primitives(), 1);
  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
  var styles_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z" }) });

  // packages/icons/build-module/library/symbol-filled.mjs
  var import_primitives8 = __toESM(require_primitives(), 1);
  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
  var symbol_filled_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.Path, { 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" }) });

  // packages/icons/build-module/library/symbol.mjs
  var import_primitives9 = __toESM(require_primitives(), 1);
  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
  var symbol_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.Path, { 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" }) });

  // packages/core-commands/build-module/admin-navigation-commands.mjs
  var import_element = __toESM(require_element(), 1);
  var import_core_data = __toESM(require_core_data(), 1);
  var import_data = __toESM(require_data(), 1);
  var getViewSiteCommand = () => function useViewSiteCommand() {
    const homeUrl = (0, import_data.useSelect)((select) => {
      return select(import_core_data.store).getEntityRecord(
        "root",
        "__unstableBase"
      )?.home;
    }, []);
    const commands = (0, import_element.useMemo)(() => {
      if (!homeUrl) {
        return [];
      }
      return [
        {
          name: "core/view-site",
          label: (0, import_i18n.__)("View site"),
          icon: external_default,
          category: "view",
          callback: ({ close }) => {
            close();
            window.open(homeUrl, "_blank");
          }
        }
      ];
    }, [homeUrl]);
    return {
      isLoading: false,
      commands
    };
  };
  function useAdminNavigationCommands(menuCommands) {
    const commands = (0, import_element.useMemo)(() => {
      return (menuCommands ?? []).map((menuCommand) => {
        const label = (0, import_i18n.sprintf)(
          /* translators: %s: menu label */
          (0, import_i18n.__)("Go to: %s"),
          menuCommand.label
        );
        return {
          name: menuCommand.name,
          label,
          searchLabel: label,
          category: "view",
          callback: ({ close }) => {
            document.location = menuCommand.url;
            close();
          }
        };
      });
    }, [menuCommands]);
    (0, import_commands.useCommands)(commands);
    (0, import_commands.useCommandLoader)({
      name: "core/view-site",
      hook: getViewSiteCommand()
    });
  }

  // packages/core-commands/build-module/site-editor-navigation-commands.mjs
  var import_commands2 = __toESM(require_commands(), 1);
  var import_i18n2 = __toESM(require_i18n(), 1);
  var import_element2 = __toESM(require_element(), 1);
  var import_data2 = __toESM(require_data(), 1);
  var import_core_data2 = __toESM(require_core_data(), 1);
  var import_router = __toESM(require_router(), 1);
  var import_url = __toESM(require_url(), 1);
  var import_compose = __toESM(require_compose(), 1);
  var import_html_entities = __toESM(require_html_entities(), 1);

  // packages/core-commands/build-module/lock-unlock.mjs
  var import_private_apis = __toESM(require_private_apis(), 1);
  var { lock, unlock } = (0, import_private_apis.__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/core-commands"
  );

  // packages/core-commands/build-module/utils/order-entity-records-by-search.mjs
  function orderEntityRecordsBySearch(records = [], search = "") {
    if (!Array.isArray(records) || !records.length) {
      return [];
    }
    if (!search) {
      return records;
    }
    const priority = [];
    const nonPriority = [];
    for (let i = 0; i < records.length; i++) {
      const record = records[i];
      if (record?.title?.raw?.toLowerCase()?.includes(search?.toLowerCase())) {
        priority.push(record);
      } else {
        nonPriority.push(record);
      }
    }
    return priority.concat(nonPriority);
  }

  // packages/core-commands/build-module/site-editor-navigation-commands.mjs
  var { useHistory } = unlock(import_router.privateApis);
  var icons = {
    post: post_default,
    page: page_default,
    wp_template: layout_default,
    wp_template_part: symbol_filled_default
  };
  function useDebouncedValue(value) {
    const [debouncedValue, setDebouncedValue] = (0, import_element2.useState)("");
    const debounced = (0, import_compose.useDebounce)(setDebouncedValue, 250);
    (0, import_element2.useEffect)(() => {
      debounced(value);
      return () => debounced.cancel();
    }, [debounced, value]);
    return debouncedValue;
  }
  var ROUTE_MAPPING = {
    "/template": "/templates",
    "/pattern": "/patterns"
  };
  function getSiteEditorPage() {
    return window.__experimentalExtensibleSiteEditor ? "admin.php?page=site-editor-v2" : "site-editor.php";
  }
  function mapRoute(path) {
    if (!window.__experimentalExtensibleSiteEditor) {
      return path;
    }
    for (const [oldPath, newPath] of Object.entries(ROUTE_MAPPING)) {
      if (path === oldPath || path.startsWith(oldPath + "?")) {
        if (path.includes("postType=wp_template_part")) {
          return "/template-parts";
        }
        return path.replace(oldPath, newPath);
      }
    }
    return path;
  }
  function isInSiteEditor() {
    const path = (0, import_url.getPath)(window.location.href);
    return path?.includes("site-editor.php") || path?.includes("page=site-editor-v2");
  }
  var getNavigationCommandLoaderPerPostType = (postType) => function useNavigationCommandLoader({ search }) {
    const history = useHistory();
    const { isBlockBasedTheme, canCreateTemplate } = (0, import_data2.useSelect)(
      (select) => {
        return {
          isBlockBasedTheme: select(import_core_data2.store).getCurrentTheme()?.is_block_theme,
          canCreateTemplate: select(import_core_data2.store).canUser("create", {
            kind: "postType",
            name: "wp_template"
          })
        };
      },
      []
    );
    const delayedSearch = useDebouncedValue(search);
    const { records, isLoading } = (0, import_data2.useSelect)(
      (select) => {
        if (!delayedSearch) {
          return {
            isLoading: false
          };
        }
        const query = {
          search: delayedSearch,
          per_page: 10,
          orderby: "relevance",
          status: [
            "publish",
            "future",
            "draft",
            "pending",
            "private"
          ]
        };
        return {
          records: select(import_core_data2.store).getEntityRecords(
            "postType",
            postType,
            query
          ),
          isLoading: !select(import_core_data2.store).hasFinishedResolution(
            "getEntityRecords",
            ["postType", postType, query]
          )
        };
      },
      [delayedSearch]
    );
    const commands = (0, import_element2.useMemo)(() => {
      return (records ?? []).map((record) => {
        const command = {
          name: postType + "-" + record.id,
          searchLabel: record.title?.rendered + " " + record.id,
          label: record.title?.rendered ? (0, import_html_entities.decodeEntities)(record.title?.rendered) : (0, import_i18n2.__)("(no title)"),
          icon: icons[postType],
          category: "edit"
        };
        if (!canCreateTemplate || postType === "post" || postType === "page" && !isBlockBasedTheme) {
          return {
            ...command,
            callback: ({ close }) => {
              const args = {
                post: record.id,
                action: "edit"
              };
              const targetUrl = (0, import_url.addQueryArgs)("post.php", args);
              document.location = targetUrl;
              close();
            }
          };
        }
        const isSiteEditor = isInSiteEditor();
        return {
          ...command,
          callback: ({ close }) => {
            if (isSiteEditor) {
              history.navigate(
                `/${postType}/${record.id}?canvas=edit`
              );
            } else {
              document.location = (0, import_url.addQueryArgs)(
                getSiteEditorPage(),
                {
                  p: `/${postType}/${record.id}`,
                  canvas: "edit"
                }
              );
            }
            close();
          }
        };
      });
    }, [canCreateTemplate, records, isBlockBasedTheme, history]);
    return {
      commands,
      isLoading
    };
  };
  var getNavigationCommandLoaderPerTemplate = (templateType) => function useNavigationCommandLoader({ search }) {
    const history = useHistory();
    const { isBlockBasedTheme, canCreateTemplate } = (0, import_data2.useSelect)(
      (select) => {
        return {
          isBlockBasedTheme: select(import_core_data2.store).getCurrentTheme()?.is_block_theme,
          canCreateTemplate: select(import_core_data2.store).canUser("create", {
            kind: "postType",
            name: templateType
          })
        };
      },
      []
    );
    const { records, isLoading } = (0, import_data2.useSelect)((select) => {
      const { getEntityRecords } = select(import_core_data2.store);
      const query = { per_page: -1 };
      return {
        records: getEntityRecords("postType", templateType, query),
        isLoading: !select(import_core_data2.store).hasFinishedResolution(
          "getEntityRecords",
          ["postType", templateType, query]
        )
      };
    }, []);
    const orderedRecords = (0, import_element2.useMemo)(() => {
      return orderEntityRecordsBySearch(records, search).slice(0, 10);
    }, [records, search]);
    const commands = (0, import_element2.useMemo)(() => {
      if (!canCreateTemplate || !isBlockBasedTheme && !templateType === "wp_template_part") {
        return [];
      }
      const isSiteEditor = (0, import_url.getPath)(window.location.href)?.includes(
        "site-editor.php"
      );
      const result = [];
      result.push(
        ...orderedRecords.map((record) => {
          return {
            name: templateType + "-" + record.id,
            searchLabel: record.title?.rendered + " " + record.id,
            label: record.title?.rendered ? record.title?.rendered : (0, import_i18n2.__)("(no title)"),
            icon: icons[templateType],
            category: "edit",
            callback: ({ close }) => {
              if (isSiteEditor) {
                history.navigate(
                  `/${templateType}/${record.id}?canvas=edit`
                );
              } else {
                document.location = (0, import_url.addQueryArgs)(
                  getSiteEditorPage(),
                  {
                    p: `/${templateType}/${record.id}`,
                    canvas: "edit"
                  }
                );
              }
              close();
            }
          };
        })
      );
      if (orderedRecords?.length > 0 && templateType === "wp_template_part") {
        result.push({
          name: "core/edit-site/open-template-parts",
          label: (0, import_i18n2.__)("Go to: Template parts"),
          icon: symbol_filled_default,
          category: "view",
          callback: ({ close }) => {
            if (isSiteEditor) {
              history.navigate(
                mapRoute(
                  "/pattern?postType=wp_template_part&categoryId=all-parts"
                )
              );
            } else {
              document.location = (0, import_url.addQueryArgs)(
                getSiteEditorPage(),
                {
                  p: mapRoute("/pattern"),
                  postType: "wp_template_part",
                  categoryId: "all-parts"
                }
              );
            }
            close();
          }
        });
      }
      return result;
    }, [canCreateTemplate, isBlockBasedTheme, orderedRecords, history]);
    return {
      commands,
      isLoading
    };
  };
  var getSiteEditorBasicNavigationCommands = () => function useSiteEditorBasicNavigationCommands() {
    const history = useHistory();
    const isSiteEditor = isInSiteEditor();
    const { isBlockBasedTheme, canCreateTemplate, canCreatePatterns } = (0, import_data2.useSelect)((select) => {
      return {
        isBlockBasedTheme: select(import_core_data2.store).getCurrentTheme()?.is_block_theme,
        canCreateTemplate: select(import_core_data2.store).canUser("create", {
          kind: "postType",
          name: "wp_template"
        }),
        canCreatePatterns: select(import_core_data2.store).canUser("create", {
          kind: "postType",
          name: "wp_block"
        })
      };
    }, []);
    const commands = (0, import_element2.useMemo)(() => {
      const result = [];
      if (canCreateTemplate && isBlockBasedTheme) {
        result.push({
          name: "core/edit-site/open-styles",
          label: (0, import_i18n2.__)("Go to: Styles"),
          icon: styles_default,
          category: "view",
          callback: ({ close }) => {
            if (isSiteEditor) {
              history.navigate("/styles");
            } else {
              document.location = (0, import_url.addQueryArgs)(
                getSiteEditorPage(),
                {
                  p: "/styles"
                }
              );
            }
            close();
          }
        });
        result.push({
          name: "core/edit-site/open-navigation",
          label: (0, import_i18n2.__)("Go to: Navigation"),
          icon: navigation_default,
          category: "view",
          callback: ({ close }) => {
            if (isSiteEditor) {
              history.navigate("/navigation");
            } else {
              document.location = (0, import_url.addQueryArgs)(
                getSiteEditorPage(),
                {
                  p: "/navigation"
                }
              );
            }
            close();
          }
        });
        result.push({
          name: "core/edit-site/open-templates",
          label: (0, import_i18n2.__)("Go to: Templates"),
          icon: layout_default,
          category: "view",
          callback: ({ close }) => {
            if (isSiteEditor) {
              history.navigate(mapRoute("/template"));
            } else {
              document.location = (0, import_url.addQueryArgs)(
                getSiteEditorPage(),
                {
                  p: mapRoute("/template")
                }
              );
            }
            close();
          }
        });
      }
      if (canCreatePatterns) {
        result.push({
          name: "core/edit-site/open-patterns",
          label: (0, import_i18n2.__)("Go to: Patterns"),
          icon: symbol_default,
          category: "view",
          callback: ({ close }) => {
            if (canCreateTemplate) {
              if (isSiteEditor) {
                history.navigate(mapRoute("/pattern"));
              } else {
                document.location = (0, import_url.addQueryArgs)(
                  getSiteEditorPage(),
                  {
                    p: mapRoute("/pattern")
                  }
                );
              }
              close();
            } else {
              document.location.href = "edit.php?post_type=wp_block";
            }
          }
        });
      }
      return result;
    }, [
      history,
      isSiteEditor,
      canCreateTemplate,
      canCreatePatterns,
      isBlockBasedTheme
    ]);
    return {
      commands,
      isLoading: false
    };
  };
  var getGlobalStylesOpenCssCommands = () => function useGlobalStylesOpenCssCommands() {
    const history = useHistory();
    const isSiteEditor = isInSiteEditor();
    const { canEditCSS } = (0, import_data2.useSelect)((select) => {
      const { getEntityRecord, __experimentalGetCurrentGlobalStylesId } = select(import_core_data2.store);
      const globalStylesId = __experimentalGetCurrentGlobalStylesId();
      const globalStyles = globalStylesId ? getEntityRecord("root", "globalStyles", globalStylesId) : void 0;
      return {
        canEditCSS: !!globalStyles?._links?.["wp:action-edit-css"]
      };
    }, []);
    const commands = (0, import_element2.useMemo)(() => {
      if (!canEditCSS) {
        return [];
      }
      return [
        {
          name: "core/open-styles-css",
          label: (0, import_i18n2.__)("Open custom CSS"),
          icon: brush_default,
          category: "view",
          callback: ({ close }) => {
            close();
            if (isSiteEditor) {
              history.navigate("/styles?section=/css");
            } else {
              document.location = (0, import_url.addQueryArgs)(
                getSiteEditorPage(),
                {
                  p: "/styles",
                  section: "/css"
                }
              );
            }
          }
        }
      ];
    }, [history, canEditCSS, isSiteEditor]);
    return {
      isLoading: false,
      commands
    };
  };
  function useSiteEditorNavigationCommands(isNetworkAdmin) {
    (0, import_commands2.useCommandLoader)({
      name: "core/edit-site/navigate-pages",
      hook: getNavigationCommandLoaderPerPostType("page"),
      disabled: isNetworkAdmin
    });
    (0, import_commands2.useCommandLoader)({
      name: "core/edit-site/navigate-posts",
      hook: getNavigationCommandLoaderPerPostType("post"),
      disabled: isNetworkAdmin
    });
    (0, import_commands2.useCommandLoader)({
      name: "core/edit-site/navigate-templates",
      hook: getNavigationCommandLoaderPerTemplate("wp_template"),
      disabled: isNetworkAdmin
    });
    (0, import_commands2.useCommandLoader)({
      name: "core/edit-site/navigate-template-parts",
      hook: getNavigationCommandLoaderPerTemplate("wp_template_part"),
      disabled: isNetworkAdmin
    });
    (0, import_commands2.useCommandLoader)({
      name: "core/edit-site/basic-navigation",
      hook: getSiteEditorBasicNavigationCommands(),
      context: "site-editor",
      disabled: isNetworkAdmin
    });
    (0, import_commands2.useCommandLoader)({
      name: "core/edit-site/global-styles-css",
      hook: getGlobalStylesOpenCssCommands(),
      disabled: isNetworkAdmin
    });
  }

  // packages/core-commands/build-module/private-apis.mjs
  function useCommands2() {
    useAdminNavigationCommands();
    useSiteEditorNavigationCommands();
  }
  var privateApis = {};
  lock(privateApis, {
    useCommands: useCommands2
  });

  // packages/core-commands/build-module/index.mjs
  var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
  var { RouterProvider } = unlock(import_router2.privateApis);
  function CommandPalette({ settings }) {
    const { menu_commands: menuCommands, is_network_admin: isNetworkAdmin } = settings;
    useAdminNavigationCommands(menuCommands);
    useSiteEditorNavigationCommands(isNetworkAdmin);
    return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(RouterProvider, { pathArg: "p", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_commands3.CommandMenu, {}) });
  }
  function initializeCommandPalette(settings) {
    const root = document.createElement("div");
    document.body.appendChild(root);
    (0, import_element3.createRoot)(root).render(
      /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_element3.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CommandPalette, { settings }) })
    );
  }
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                                         dist/core-commands.min.js                                                                           0000644                 00000027526 15212563776 0011410 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;(wp||={}).coreCommands=(()=>{var Ja=Object.create;var V=Object.defineProperty;var Qa=Object.getOwnPropertyDescriptor;var Xa=Object.getOwnPropertyNames;var Ka=Object.getPrototypeOf,Ya=Object.prototype.hasOwnProperty;var n=(a,t)=>()=>(t||a((t={exports:{}}).exports,t),t.exports),at=(a,t)=>{for(var o in t)V(a,o,{get:t[o],enumerable:!0})},wa=(a,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let f of Xa(t))!Ya.call(a,f)&&f!==o&&V(a,f,{get:()=>t[f],enumerable:!(r=Qa(t,f))||r.enumerable});return a};var e=(a,t,o)=>(o=a!=null?Ja(Ka(a)):{},wa(t||!a||!a.__esModule?V(o,"default",{value:a,enumerable:!0}):o,a)),tt=a=>wa(V({},"__esModule",{value:!0}),a);var P=n((nt,va)=>{va.exports=window.wp.element});var W=n((ct,ba)=>{ba.exports=window.wp.router});var E=n((ht,ya)=>{ya.exports=window.wp.commands});var J=n((gt,xa)=>{xa.exports=window.wp.i18n});var g=n((wt,Ca)=>{Ca.exports=window.wp.primitives});var h=n((vt,Sa)=>{Sa.exports=window.ReactJSXRuntime});var ua=n((Ut,La)=>{La.exports=window.wp.coreData});var pa=n((Gt,ka)=>{ka.exports=window.wp.data});var Va=n((It,Ba)=>{Ba.exports=window.wp.url});var Ea=n((Ft,Pa)=>{Pa.exports=window.wp.compose});var za=n((Ot,Ta)=>{Ta.exports=window.wp.htmlEntities});var Aa=n((qt,Ma)=>{Ma.exports=window.wp.privateApis});var ut={};at(ut,{initializeCommandPalette:()=>it,privateApis:()=>ha});var $=e(P(),1),qa=e(W(),1),Za=e(E(),1);var I=e(E(),1),R=e(J(),1);var T=e(g(),1),Q=e(h(),1),X=(0,Q.jsx)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Q.jsx)(T.Path,{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"})});var z=e(g(),1),K=e(h(),1),Y=(0,K.jsx)(z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,K.jsx)(z.Path,{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"})});var M=e(g(),1),aa=e(h(),1),A=(0,aa.jsx)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aa.jsx)(M.Path,{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"})});var j=e(g(),1),ta=e(h(),1),ea=(0,ta.jsx)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ta.jsx)(j.Path,{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"})});var k=e(g(),1),_=e(h(),1),oa=(0,_.jsxs)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,_.jsx)(k.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,_.jsx)(k.Path,{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"})]});var D=e(g(),1),ra=e(h(),1),sa=(0,ra.jsx)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ra.jsx)(D.Path,{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"})});var U=e(g(),1),fa=e(h(),1),la=(0,fa.jsx)(U.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fa.jsx)(U.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z"})});var G=e(g(),1),ma=e(h(),1),H=(0,ma.jsx)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ma.jsx)(G.Path,{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"})});var N=e(g(),1),da=e(h(),1),ia=(0,da.jsx)(N.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,da.jsx)(N.Path,{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"})});var na=e(P(),1),_a=e(ua(),1),Ra=e(pa(),1),et=()=>function(){let t=(0,Ra.useSelect)(r=>r(_a.store).getEntityRecord("root","__unstableBase")?.home,[]);return{isLoading:!1,commands:(0,na.useMemo)(()=>t?[{name:"core/view-site",label:(0,R.__)("View site"),icon:Y,category:"view",callback:({close:r})=>{r(),window.open(t,"_blank")}}]:[],[t])}};function F(a){let t=(0,na.useMemo)(()=>(a??[]).map(o=>{let r=(0,R.sprintf)((0,R.__)("Go to: %s"),o.label);return{name:o.name,label:r,searchLabel:r,category:"view",callback:({close:f})=>{document.location=o.url,f()}}}),[a]);(0,I.useCommands)(t),(0,I.useCommandLoader)({name:"core/view-site",hook:et()})}var x=e(E(),1),b=e(J(),1),w=e(P(),1),C=e(pa(),1),u=e(ua(),1);var Na=e(W(),1),p=e(Va(),1),Ia=e(Ea(),1),Fa=e(za(),1);var ja=e(Aa(),1),{lock:Da,unlock:O}=(0,ja.__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/core-commands");function Ua(a=[],t=""){if(!Array.isArray(a)||!a.length)return[];if(!t)return a;let o=[],r=[];for(let f=0;f<a.length;f++){let l=a[f];l?.title?.raw?.toLowerCase()?.includes(t?.toLowerCase())?o.push(l):r.push(l)}return o.concat(r)}var{useHistory:q}=O(Na.privateApis),Oa={post:sa,page:oa,wp_template:A,wp_template_part:H};function ot(a){let[t,o]=(0,w.useState)(""),r=(0,Ia.useDebounce)(o,250);return(0,w.useEffect)(()=>(r(a),()=>r.cancel()),[r,a]),t}var rt={"/template":"/templates","/pattern":"/patterns"};function y(){return window.__experimentalExtensibleSiteEditor?"admin.php?page=site-editor-v2":"site-editor.php"}function S(a){if(!window.__experimentalExtensibleSiteEditor)return a;for(let[t,o]of Object.entries(rt))if(a===t||a.startsWith(t+"?"))return a.includes("postType=wp_template_part")?"/template-parts":a.replace(t,o);return a}function ca(){let a=(0,p.getPath)(window.location.href);return a?.includes("site-editor.php")||a?.includes("page=site-editor-v2")}var Ga=a=>function({search:o}){let r=q(),{isBlockBasedTheme:f,canCreateTemplate:l}=(0,C.useSelect)(s=>({isBlockBasedTheme:s(u.store).getCurrentTheme()?.is_block_theme,canCreateTemplate:s(u.store).canUser("create",{kind:"postType",name:"wp_template"})}),[]),v=ot(o),{records:m,isLoading:d}=(0,C.useSelect)(s=>{if(!v)return{isLoading:!1};let c={search:v,per_page:10,orderby:"relevance",status:["publish","future","draft","pending","private"]};return{records:s(u.store).getEntityRecords("postType",a,c),isLoading:!s(u.store).hasFinishedResolution("getEntityRecords",["postType",a,c])}},[v]);return{commands:(0,w.useMemo)(()=>(m??[]).map(s=>{let c={name:a+"-"+s.id,searchLabel:s.title?.rendered+" "+s.id,label:s.title?.rendered?(0,Fa.decodeEntities)(s.title?.rendered):(0,b.__)("(no title)"),icon:Oa[a],category:"edit"};if(!l||a==="post"||a==="page"&&!f)return{...c,callback:({close:L})=>{let $a={post:s.id,action:"edit"},Wa=(0,p.addQueryArgs)("post.php",$a);document.location=Wa,L()}};let i=ca();return{...c,callback:({close:L})=>{i?r.navigate(`/${a}/${s.id}?canvas=edit`):document.location=(0,p.addQueryArgs)(y(),{p:`/${a}/${s.id}`,canvas:"edit"}),L()}}}),[l,m,f,r]),isLoading:d}},Ha=a=>function({search:o}){let r=q(),{isBlockBasedTheme:f,canCreateTemplate:l}=(0,C.useSelect)(s=>({isBlockBasedTheme:s(u.store).getCurrentTheme()?.is_block_theme,canCreateTemplate:s(u.store).canUser("create",{kind:"postType",name:a})}),[]),{records:v,isLoading:m}=(0,C.useSelect)(s=>{let{getEntityRecords:c}=s(u.store),i={per_page:-1};return{records:c("postType",a,i),isLoading:!s(u.store).hasFinishedResolution("getEntityRecords",["postType",a,i])}},[]),d=(0,w.useMemo)(()=>Ua(v,o).slice(0,10),[v,o]);return{commands:(0,w.useMemo)(()=>{if(!l||!f&&!a==="wp_template_part")return[];let s=(0,p.getPath)(window.location.href)?.includes("site-editor.php"),c=[];return c.push(...d.map(i=>({name:a+"-"+i.id,searchLabel:i.title?.rendered+" "+i.id,label:i.title?.rendered?i.title?.rendered:(0,b.__)("(no title)"),icon:Oa[a],category:"edit",callback:({close:L})=>{s?r.navigate(`/${a}/${i.id}?canvas=edit`):document.location=(0,p.addQueryArgs)(y(),{p:`/${a}/${i.id}`,canvas:"edit"}),L()}}))),d?.length>0&&a==="wp_template_part"&&c.push({name:"core/edit-site/open-template-parts",label:(0,b.__)("Go to: Template parts"),icon:H,category:"view",callback:({close:i})=>{s?r.navigate(S("/pattern?postType=wp_template_part&categoryId=all-parts")):document.location=(0,p.addQueryArgs)(y(),{p:S("/pattern"),postType:"wp_template_part",categoryId:"all-parts"}),i()}}),c},[l,f,d,r]),isLoading:m}},st=()=>function(){let t=q(),o=ca(),{isBlockBasedTheme:r,canCreateTemplate:f,canCreatePatterns:l}=(0,C.useSelect)(m=>({isBlockBasedTheme:m(u.store).getCurrentTheme()?.is_block_theme,canCreateTemplate:m(u.store).canUser("create",{kind:"postType",name:"wp_template"}),canCreatePatterns:m(u.store).canUser("create",{kind:"postType",name:"wp_block"})}),[]);return{commands:(0,w.useMemo)(()=>{let m=[];return f&&r&&(m.push({name:"core/edit-site/open-styles",label:(0,b.__)("Go to: Styles"),icon:la,category:"view",callback:({close:d})=>{o?t.navigate("/styles"):document.location=(0,p.addQueryArgs)(y(),{p:"/styles"}),d()}}),m.push({name:"core/edit-site/open-navigation",label:(0,b.__)("Go to: Navigation"),icon:ea,category:"view",callback:({close:d})=>{o?t.navigate("/navigation"):document.location=(0,p.addQueryArgs)(y(),{p:"/navigation"}),d()}}),m.push({name:"core/edit-site/open-templates",label:(0,b.__)("Go to: Templates"),icon:A,category:"view",callback:({close:d})=>{o?t.navigate(S("/template")):document.location=(0,p.addQueryArgs)(y(),{p:S("/template")}),d()}})),l&&m.push({name:"core/edit-site/open-patterns",label:(0,b.__)("Go to: Patterns"),icon:ia,category:"view",callback:({close:d})=>{f?(o?t.navigate(S("/pattern")):document.location=(0,p.addQueryArgs)(y(),{p:S("/pattern")}),d()):document.location.href="edit.php?post_type=wp_block"}}),m},[t,o,f,l,r]),isLoading:!1}},ft=()=>function(){let t=q(),o=ca(),{canEditCSS:r}=(0,C.useSelect)(l=>{let{getEntityRecord:v,__experimentalGetCurrentGlobalStylesId:m}=l(u.store),d=m();return{canEditCSS:!!(d?v("root","globalStyles",d):void 0)?._links?.["wp:action-edit-css"]}},[]);return{isLoading:!1,commands:(0,w.useMemo)(()=>r?[{name:"core/open-styles-css",label:(0,b.__)("Open custom CSS"),icon:X,category:"view",callback:({close:l})=>{l(),o?t.navigate("/styles?section=/css"):document.location=(0,p.addQueryArgs)(y(),{p:"/styles",section:"/css"})}}]:[],[t,r,o])}};function Z(a){(0,x.useCommandLoader)({name:"core/edit-site/navigate-pages",hook:Ga("page"),disabled:a}),(0,x.useCommandLoader)({name:"core/edit-site/navigate-posts",hook:Ga("post"),disabled:a}),(0,x.useCommandLoader)({name:"core/edit-site/navigate-templates",hook:Ha("wp_template"),disabled:a}),(0,x.useCommandLoader)({name:"core/edit-site/navigate-template-parts",hook:Ha("wp_template_part"),disabled:a}),(0,x.useCommandLoader)({name:"core/edit-site/basic-navigation",hook:st(),context:"site-editor",disabled:a}),(0,x.useCommandLoader)({name:"core/edit-site/global-styles-css",hook:ft(),disabled:a})}function lt(){F(),Z()}var ha={};Da(ha,{useCommands:lt});var B=e(h(),1),{RouterProvider:mt}=O(qa.privateApis);function dt({settings:a}){let{menu_commands:t,is_network_admin:o}=a;return F(t),Z(o),(0,B.jsx)(mt,{pathArg:"p",children:(0,B.jsx)(Za.CommandMenu,{})})}function it(a){let t=document.createElement("div");document.body.appendChild(t),(0,$.createRoot)(t).render((0,B.jsx)($.StrictMode,{children:(0,B.jsx)(dt,{settings:a})}))}return tt(ut);})();
                                                                                                                                                                          dist/core-data.js                                                                                   0000644                 00002310036 15212563776 0007727 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).coreData = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all2) => {
    for (var name in all2)
      __defProp(target, name, { get: all2[name], enumerable: true });
  };
  var __copyProps = (to, from2, except, desc) => {
    if (from2 && typeof from2 === "object" || typeof from2 === "function") {
      for (let key of __getOwnPropNames(from2))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // node_modules/fast-deep-equal/es6/index.js
  var require_es6 = __commonJS({
    "node_modules/fast-deep-equal/es6/index.js"(exports, module) {
      "use strict";
      module.exports = function equal(a, b) {
        if (a === b) return true;
        if (a && b && typeof a == "object" && typeof b == "object") {
          if (a.constructor !== b.constructor) return false;
          var length3, i, keys2;
          if (Array.isArray(a)) {
            length3 = a.length;
            if (length3 != b.length) return false;
            for (i = length3; i-- !== 0; )
              if (!equal(a[i], b[i])) return false;
            return true;
          }
          if (a instanceof Map && b instanceof Map) {
            if (a.size !== b.size) return false;
            for (i of a.entries())
              if (!b.has(i[0])) return false;
            for (i of a.entries())
              if (!equal(i[1], b.get(i[0]))) return false;
            return true;
          }
          if (a instanceof Set && b instanceof Set) {
            if (a.size !== b.size) return false;
            for (i of a.entries())
              if (!b.has(i[0])) return false;
            return true;
          }
          if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
            length3 = a.length;
            if (length3 != b.length) return false;
            for (i = length3; i-- !== 0; )
              if (a[i] !== b[i]) return false;
            return true;
          }
          if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
          if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
          if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
          keys2 = Object.keys(a);
          length3 = keys2.length;
          if (length3 !== Object.keys(b).length) return false;
          for (i = length3; i-- !== 0; )
            if (!Object.prototype.hasOwnProperty.call(b, keys2[i])) return false;
          for (i = length3; i-- !== 0; ) {
            var key = keys2[i];
            if (!equal(a[key], b[key])) return false;
          }
          return true;
        }
        return a !== a && b !== b;
      };
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // package-external:@wordpress/undo-manager
  var require_undo_manager = __commonJS({
    "package-external:@wordpress/undo-manager"(exports, module) {
      module.exports = window.wp.undoManager;
    }
  });

  // node_modules/equivalent-key-map/equivalent-key-map.js
  var require_equivalent_key_map = __commonJS({
    "node_modules/equivalent-key-map/equivalent-key-map.js"(exports, module) {
      "use strict";
      function _typeof(obj) {
        if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
          _typeof = function(obj2) {
            return typeof obj2;
          };
        } else {
          _typeof = function(obj2) {
            return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
          };
        }
        return _typeof(obj);
      }
      function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
          throw new TypeError("Cannot call a class as a function");
        }
      }
      function _defineProperties(target, props) {
        for (var i = 0; i < props.length; i++) {
          var descriptor = props[i];
          descriptor.enumerable = descriptor.enumerable || false;
          descriptor.configurable = true;
          if ("value" in descriptor) descriptor.writable = true;
          Object.defineProperty(target, descriptor.key, descriptor);
        }
      }
      function _createClass(Constructor, protoProps, staticProps) {
        if (protoProps) _defineProperties(Constructor.prototype, protoProps);
        if (staticProps) _defineProperties(Constructor, staticProps);
        return Constructor;
      }
      function getValuePair(instance, key) {
        var _map = instance._map, _arrayTreeMap = instance._arrayTreeMap, _objectTreeMap = instance._objectTreeMap;
        if (_map.has(key)) {
          return _map.get(key);
        }
        var properties = Object.keys(key).sort();
        var map2 = Array.isArray(key) ? _arrayTreeMap : _objectTreeMap;
        for (var i = 0; i < properties.length; i++) {
          var property = properties[i];
          map2 = map2.get(property);
          if (map2 === void 0) {
            return;
          }
          var propertyValue = key[property];
          map2 = map2.get(propertyValue);
          if (map2 === void 0) {
            return;
          }
        }
        var valuePair = map2.get("_ekm_value");
        if (!valuePair) {
          return;
        }
        _map.delete(valuePair[0]);
        valuePair[0] = key;
        map2.set("_ekm_value", valuePair);
        _map.set(key, valuePair);
        return valuePair;
      }
      var EquivalentKeyMap2 = /* @__PURE__ */ (function() {
        function EquivalentKeyMap3(iterable) {
          _classCallCheck(this, EquivalentKeyMap3);
          this.clear();
          if (iterable instanceof EquivalentKeyMap3) {
            var iterablePairs = [];
            iterable.forEach(function(value, key) {
              iterablePairs.push([key, value]);
            });
            iterable = iterablePairs;
          }
          if (iterable != null) {
            for (var i = 0; i < iterable.length; i++) {
              this.set(iterable[i][0], iterable[i][1]);
            }
          }
        }
        _createClass(EquivalentKeyMap3, [{
          key: "set",
          /**
           * Add or update an element with a specified key and value.
           *
           * @param {*} key   The key of the element to add.
           * @param {*} value The value of the element to add.
           *
           * @return {EquivalentKeyMap} Map instance.
           */
          value: function set(key, value) {
            if (key === null || _typeof(key) !== "object") {
              this._map.set(key, value);
              return this;
            }
            var properties = Object.keys(key).sort();
            var valuePair = [key, value];
            var map2 = Array.isArray(key) ? this._arrayTreeMap : this._objectTreeMap;
            for (var i = 0; i < properties.length; i++) {
              var property = properties[i];
              if (!map2.has(property)) {
                map2.set(property, new EquivalentKeyMap3());
              }
              map2 = map2.get(property);
              var propertyValue = key[property];
              if (!map2.has(propertyValue)) {
                map2.set(propertyValue, new EquivalentKeyMap3());
              }
              map2 = map2.get(propertyValue);
            }
            var previousValuePair = map2.get("_ekm_value");
            if (previousValuePair) {
              this._map.delete(previousValuePair[0]);
            }
            map2.set("_ekm_value", valuePair);
            this._map.set(key, valuePair);
            return this;
          }
          /**
           * Returns a specified element.
           *
           * @param {*} key The key of the element to return.
           *
           * @return {?*} The element associated with the specified key or undefined
           *              if the key can't be found.
           */
        }, {
          key: "get",
          value: function get(key) {
            if (key === null || _typeof(key) !== "object") {
              return this._map.get(key);
            }
            var valuePair = getValuePair(this, key);
            if (valuePair) {
              return valuePair[1];
            }
          }
          /**
           * Returns a boolean indicating whether an element with the specified key
           * exists or not.
           *
           * @param {*} key The key of the element to test for presence.
           *
           * @return {boolean} Whether an element with the specified key exists.
           */
        }, {
          key: "has",
          value: function has(key) {
            if (key === null || _typeof(key) !== "object") {
              return this._map.has(key);
            }
            return getValuePair(this, key) !== void 0;
          }
          /**
           * Removes the specified element.
           *
           * @param {*} key The key of the element to remove.
           *
           * @return {boolean} Returns true if an element existed and has been
           *                   removed, or false if the element does not exist.
           */
        }, {
          key: "delete",
          value: function _delete(key) {
            if (!this.has(key)) {
              return false;
            }
            this.set(key, void 0);
            return true;
          }
          /**
           * Executes a provided function once per each key/value pair, in insertion
           * order.
           *
           * @param {Function} callback Function to execute for each element.
           * @param {*}        thisArg  Value to use as `this` when executing
           *                            `callback`.
           */
        }, {
          key: "forEach",
          value: function forEach2(callback) {
            var _this = this;
            var thisArg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this;
            this._map.forEach(function(value, key) {
              if (key !== null && _typeof(key) === "object") {
                value = value[1];
              }
              callback.call(thisArg, value, key, _this);
            });
          }
          /**
           * Removes all elements.
           */
        }, {
          key: "clear",
          value: function clear() {
            this._map = /* @__PURE__ */ new Map();
            this._arrayTreeMap = /* @__PURE__ */ new Map();
            this._objectTreeMap = /* @__PURE__ */ new Map();
          }
        }, {
          key: "size",
          get: function get() {
            return this._map.size;
          }
        }]);
        return EquivalentKeyMap3;
      })();
      module.exports = EquivalentKeyMap2;
    }
  });

  // package-external:@wordpress/url
  var require_url = __commonJS({
    "package-external:@wordpress/url"(exports, module) {
      module.exports = window.wp.url;
    }
  });

  // package-external:@wordpress/api-fetch
  var require_api_fetch = __commonJS({
    "package-external:@wordpress/api-fetch"(exports, module) {
      module.exports = window.wp.apiFetch;
    }
  });

  // package-external:@wordpress/blocks
  var require_blocks = __commonJS({
    "package-external:@wordpress/blocks"(exports, module) {
      module.exports = window.wp.blocks;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // package-external:@wordpress/private-apis
  var require_private_apis = __commonJS({
    "package-external:@wordpress/private-apis"(exports, module) {
      module.exports = window.wp.privateApis;
    }
  });

  // package-external:@wordpress/hooks
  var require_hooks = __commonJS({
    "package-external:@wordpress/hooks"(exports, module) {
      module.exports = window.wp.hooks;
    }
  });

  // package-external:@wordpress/block-editor
  var require_block_editor = __commonJS({
    "package-external:@wordpress/block-editor"(exports, module) {
      module.exports = window.wp.blockEditor;
    }
  });

  // package-external:@wordpress/rich-text
  var require_rich_text = __commonJS({
    "package-external:@wordpress/rich-text"(exports, module) {
      module.exports = window.wp.richText;
    }
  });

  // package-external:@wordpress/deprecated
  var require_deprecated = __commonJS({
    "package-external:@wordpress/deprecated"(exports, module) {
      module.exports = window.wp.deprecated;
    }
  });

  // package-external:@wordpress/html-entities
  var require_html_entities = __commonJS({
    "package-external:@wordpress/html-entities"(exports, module) {
      module.exports = window.wp.htmlEntities;
    }
  });

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // package-external:@wordpress/warning
  var require_warning = __commonJS({
    "package-external:@wordpress/warning"(exports, module) {
      module.exports = window.wp.warning;
    }
  });

  // packages/core-data/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    EntityProvider: () => EntityProvider,
    __experimentalFetchLinkSuggestions: () => fetchLinkSuggestions,
    __experimentalFetchUrlData: () => experimental_fetch_url_data_default,
    __experimentalUseEntityRecord: () => __experimentalUseEntityRecord,
    __experimentalUseEntityRecords: () => __experimentalUseEntityRecords,
    __experimentalUseResourcePermissions: () => __experimentalUseResourcePermissions,
    fetchBlockPatterns: () => fetchBlockPatterns,
    privateApis: () => privateApis2,
    store: () => store,
    useEntityBlockEditor: () => useEntityBlockEditor,
    useEntityId: () => useEntityId,
    useEntityProp: () => useEntityProp,
    useEntityRecord: () => useEntityRecord,
    useEntityRecords: () => useEntityRecords,
    useResourcePermissions: () => use_resource_permissions_default
  });
  var import_data16 = __toESM(require_data(), 1);

  // packages/core-data/build-module/reducer.mjs
  var import_es66 = __toESM(require_es6(), 1);
  var import_compose2 = __toESM(require_compose(), 1);
  var import_data8 = __toESM(require_data(), 1);
  var import_undo_manager2 = __toESM(require_undo_manager(), 1);

  // packages/core-data/build-module/utils/conservative-map-item.mjs
  var import_es6 = __toESM(require_es6(), 1);
  function conservativeMapItem(item, nextItem) {
    if (!item) {
      return nextItem;
    }
    let hasChanges = false;
    const result = {};
    for (const key in nextItem) {
      if ((0, import_es6.default)(item[key], nextItem[key])) {
        result[key] = item[key];
      } else {
        hasChanges = true;
        result[key] = nextItem[key];
      }
    }
    if (!hasChanges) {
      return item;
    }
    for (const key in item) {
      if (!result.hasOwnProperty(key)) {
        result[key] = item[key];
      }
    }
    return result;
  }

  // packages/core-data/build-module/utils/get-normalized-comma-separable.mjs
  function getNormalizedCommaSeparable(value) {
    if (typeof value === "string") {
      return value.split(",");
    } else if (Array.isArray(value)) {
      return value;
    }
    return null;
  }
  var get_normalized_comma_separable_default = getNormalizedCommaSeparable;

  // packages/core-data/build-module/utils/if-matching-action.mjs
  var ifMatchingAction = (isMatch) => (reducer) => (state, action) => {
    if (state === void 0 || isMatch(action)) {
      return reducer(state, action);
    }
    return state;
  };
  var if_matching_action_default = ifMatchingAction;

  // packages/core-data/build-module/utils/forward-resolver.mjs
  var forwardResolver = (resolverName) => (...args2) => async ({ resolveSelect: resolveSelect2 }) => {
    await resolveSelect2[resolverName](...args2);
  };
  var forward_resolver_default = forwardResolver;

  // packages/core-data/build-module/utils/on-sub-key.mjs
  var onSubKey = (actionProperty) => (reducer) => (state = {}, action) => {
    const key = action[actionProperty];
    if (key === void 0) {
      return state;
    }
    const nextKeyState = reducer(state[key], action);
    if (nextKeyState === state[key]) {
      return state;
    }
    return {
      ...state,
      [key]: nextKeyState
    };
  };
  var on_sub_key_default = onSubKey;

  // packages/core-data/build-module/utils/replace-action.mjs
  var replaceAction = (replacer) => (reducer) => (state, action) => {
    return reducer(state, replacer(action));
  };
  var replace_action_default = replaceAction;

  // packages/core-data/build-module/utils/with-weak-map-cache.mjs
  function withWeakMapCache(fn) {
    const cache3 = /* @__PURE__ */ new WeakMap();
    return (key) => {
      let value;
      if (cache3.has(key)) {
        value = cache3.get(key);
      } else {
        value = fn(key);
        if (key !== null && typeof key === "object") {
          cache3.set(key, value);
        }
      }
      return value;
    };
  }
  var with_weak_map_cache_default = withWeakMapCache;

  // packages/core-data/build-module/utils/is-raw-attribute.mjs
  function isRawAttribute(entity2, attribute) {
    return (entity2.rawAttributes || []).includes(attribute);
  }

  // packages/core-data/build-module/utils/set-nested-value.mjs
  function setNestedValue(object, path, value) {
    if (!object || typeof object !== "object") {
      return object;
    }
    const normalizedPath = Array.isArray(path) ? path : path.split(".");
    normalizedPath.reduce((acc, key, idx) => {
      if (acc[key] === void 0) {
        if (Number.isInteger(normalizedPath[idx + 1])) {
          acc[key] = [];
        } else {
          acc[key] = {};
        }
      }
      if (idx === normalizedPath.length - 1) {
        acc[key] = value;
      }
      return acc[key];
    }, object);
    return object;
  }

  // packages/core-data/build-module/utils/get-nested-value.mjs
  function getNestedValue(object, path, defaultValue) {
    if (!object || typeof object !== "object" || typeof path !== "string" && !Array.isArray(path)) {
      return object;
    }
    const normalizedPath = Array.isArray(path) ? path : path.split(".");
    let value = object;
    normalizedPath.forEach((fieldName) => {
      value = value?.[fieldName];
    });
    return value !== void 0 ? value : defaultValue;
  }

  // packages/core-data/build-module/utils/is-numeric-id.mjs
  function isNumericID(id2) {
    return /^\s*\d+\s*$/.test(id2);
  }

  // packages/core-data/build-module/utils/user-permissions.mjs
  var ALLOWED_RESOURCE_ACTIONS = [
    "create",
    "read",
    "update",
    "delete"
  ];
  function getUserPermissionsFromAllowHeader(allowedMethods) {
    const permissions = {};
    if (!allowedMethods) {
      return permissions;
    }
    const methods = {
      create: "POST",
      read: "GET",
      update: "PUT",
      delete: "DELETE"
    };
    for (const [actionName, methodName] of Object.entries(methods)) {
      permissions[actionName] = allowedMethods.includes(methodName);
    }
    return permissions;
  }
  function getUserPermissionCacheKey(action, resource, id2) {
    const key = (typeof resource === "object" ? [action, resource.kind, resource.name, resource.id] : [action, resource, id2]).filter(Boolean).join("/");
    return key;
  }

  // packages/core-data/build-module/utils/receive-intermediate-results.mjs
  var RECEIVE_INTERMEDIATE_RESULTS = /* @__PURE__ */ Symbol(
    "RECEIVE_INTERMEDIATE_RESULTS"
  );

  // packages/core-data/build-module/queried-data/actions.mjs
  function receiveItems(items2, edits, meta) {
    return {
      type: "RECEIVE_ITEMS",
      items: items2,
      persistedEdits: edits,
      meta
    };
  }
  function removeItems(kind, name, records, invalidateCache = false) {
    return {
      type: "REMOVE_ITEMS",
      itemIds: Array.isArray(records) ? records : [records],
      kind,
      name,
      invalidateCache
    };
  }
  function receiveQueriedItems(items2, query = {}, edits, meta) {
    return {
      ...receiveItems(items2, edits, meta),
      query
    };
  }

  // packages/core-data/build-module/queried-data/selectors.mjs
  var import_equivalent_key_map = __toESM(require_equivalent_key_map(), 1);
  var import_data = __toESM(require_data(), 1);

  // packages/core-data/build-module/queried-data/get-query-parts.mjs
  var import_url = __toESM(require_url(), 1);
  function getQueryParts(query) {
    const parts = {
      stableKey: "",
      page: 1,
      perPage: 10,
      fields: null,
      include: null,
      context: "default"
    };
    const keys2 = Object.keys(query).sort();
    for (let i = 0; i < keys2.length; i++) {
      const key = keys2[i];
      let value = query[key];
      switch (key) {
        case "page":
          parts[key] = Number(value);
          break;
        case "per_page":
          parts.perPage = Number(value);
          break;
        case "context":
          parts.context = value;
          break;
        default:
          if (key === "_fields") {
            parts.fields = get_normalized_comma_separable_default(value) ?? [];
            value = parts.fields.join();
          }
          if (key === "include") {
            if (typeof value === "number") {
              value = value.toString();
            }
            parts.include = (get_normalized_comma_separable_default(value) ?? []).map(Number);
            value = parts.include.join();
          }
          parts.stableKey += (parts.stableKey ? "&" : "") + (0, import_url.addQueryArgs)("", { [key]: value }).slice(1);
      }
    }
    return parts;
  }
  var get_query_parts_default = with_weak_map_cache_default(getQueryParts);

  // packages/core-data/build-module/queried-data/selectors.mjs
  var queriedItemsCacheByState = /* @__PURE__ */ new WeakMap();
  function getQueriedItemsUncached(state, query) {
    const { stableKey, page, perPage, include, fields, context } = get_query_parts_default(query);
    let itemIds;
    if (state.queries?.[context]?.[stableKey]) {
      itemIds = state.queries[context][stableKey].itemIds;
    }
    if (!itemIds) {
      return null;
    }
    const startOffset = perPage === -1 ? 0 : (page - 1) * perPage;
    const endOffset = perPage === -1 ? itemIds.length : Math.min(startOffset + perPage, itemIds.length);
    const items2 = [];
    for (let i = startOffset; i < endOffset; i++) {
      const itemId = itemIds[i];
      if (Array.isArray(include) && !include.includes(itemId)) {
        continue;
      }
      if (itemId === void 0) {
        continue;
      }
      if (!state.items[context]?.hasOwnProperty(itemId)) {
        return null;
      }
      const item = state.items[context][itemId];
      let filteredItem;
      if (Array.isArray(fields)) {
        filteredItem = {};
        for (let f = 0; f < fields.length; f++) {
          const field = fields[f].split(".");
          let value = item;
          field.forEach((fieldName) => {
            value = value?.[fieldName];
          });
          setNestedValue(filteredItem, field, value);
        }
      } else {
        if (!state.itemIsComplete[context]?.[itemId]) {
          return null;
        }
        filteredItem = item;
      }
      items2.push(filteredItem);
    }
    return items2;
  }
  var getQueriedItems = (0, import_data.createSelector)((state, query = {}) => {
    let queriedItemsCache = queriedItemsCacheByState.get(state);
    if (queriedItemsCache) {
      const queriedItems = queriedItemsCache.get(query);
      if (queriedItems !== void 0) {
        return queriedItems;
      }
    } else {
      queriedItemsCache = new import_equivalent_key_map.default();
      queriedItemsCacheByState.set(state, queriedItemsCache);
    }
    const items2 = getQueriedItemsUncached(state, query);
    queriedItemsCache.set(query, items2);
    return items2;
  });
  function getQueriedTotalItems(state, query = {}) {
    const { stableKey, context } = get_query_parts_default(query);
    return state.queries?.[context]?.[stableKey]?.meta?.totalItems ?? null;
  }
  function getQueriedTotalPages(state, query = {}) {
    const { stableKey, context } = get_query_parts_default(query);
    return state.queries?.[context]?.[stableKey]?.meta?.totalPages ?? null;
  }

  // packages/core-data/build-module/queried-data/reducer.mjs
  var import_data7 = __toESM(require_data(), 1);
  var import_compose = __toESM(require_compose(), 1);

  // node_modules/tslib/tslib.es6.mjs
  var __assign = function() {
    __assign = Object.assign || function __assign2(t) {
      for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
      }
      return t;
    };
    return __assign.apply(this, arguments);
  };

  // node_modules/lower-case/dist.es2015/index.js
  function lowerCase(str) {
    return str.toLowerCase();
  }

  // node_modules/no-case/dist.es2015/index.js
  var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
  var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
  function noCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    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;
    var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
    var start = 0;
    var end = result.length;
    while (result.charAt(start) === "\0")
      start++;
    while (result.charAt(end - 1) === "\0")
      end--;
    return result.slice(start, end).split("\0").map(transform).join(delimiter);
  }
  function replace(input, re, value) {
    if (re instanceof RegExp)
      return input.replace(re, value);
    return re.reduce(function(input2, re2) {
      return input2.replace(re2, value);
    }, input);
  }

  // node_modules/pascal-case/dist.es2015/index.js
  function pascalCaseTransform(input, index) {
    var firstChar = input.charAt(0);
    var lowerChars = input.substr(1).toLowerCase();
    if (index > 0 && firstChar >= "0" && firstChar <= "9") {
      return "_" + firstChar + lowerChars;
    }
    return "" + firstChar.toUpperCase() + lowerChars;
  }
  function pascalCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    return noCase(input, __assign({ delimiter: "", transform: pascalCaseTransform }, options));
  }

  // node_modules/camel-case/dist.es2015/index.js
  function camelCaseTransform(input, index) {
    if (index === 0)
      return input.toLowerCase();
    return pascalCaseTransform(input, index);
  }
  function camelCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    return pascalCase(input, __assign({ transform: camelCaseTransform }, options));
  }

  // node_modules/upper-case-first/dist.es2015/index.js
  function upperCaseFirst(input) {
    return input.charAt(0).toUpperCase() + input.substr(1);
  }

  // node_modules/capital-case/dist.es2015/index.js
  function capitalCaseTransform(input) {
    return upperCaseFirst(input.toLowerCase());
  }
  function capitalCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    return noCase(input, __assign({ delimiter: " ", transform: capitalCaseTransform }, options));
  }

  // packages/core-data/build-module/entities.mjs
  var import_api_fetch2 = __toESM(require_api_fetch(), 1);
  var import_blocks4 = __toESM(require_blocks(), 1);
  var import_i18n = __toESM(require_i18n(), 1);

  // packages/core-data/build-module/awareness/post-editor-awareness.mjs
  var import_data5 = __toESM(require_data(), 1);

  // node_modules/yjs/dist/yjs.mjs
  var yjs_exports = {};
  __export(yjs_exports, {
    AbsolutePosition: () => AbsolutePosition,
    AbstractConnector: () => AbstractConnector,
    AbstractStruct: () => AbstractStruct,
    AbstractType: () => AbstractType,
    Array: () => YArray,
    ContentAny: () => ContentAny,
    ContentBinary: () => ContentBinary,
    ContentDeleted: () => ContentDeleted,
    ContentDoc: () => ContentDoc,
    ContentEmbed: () => ContentEmbed,
    ContentFormat: () => ContentFormat,
    ContentJSON: () => ContentJSON,
    ContentString: () => ContentString,
    ContentType: () => ContentType,
    Doc: () => Doc,
    GC: () => GC,
    ID: () => ID,
    Item: () => Item,
    Map: () => YMap,
    PermanentUserData: () => PermanentUserData,
    RelativePosition: () => RelativePosition,
    Skip: () => Skip,
    Snapshot: () => Snapshot,
    Text: () => YText,
    Transaction: () => Transaction,
    UndoManager: () => UndoManager,
    UpdateDecoderV1: () => UpdateDecoderV1,
    UpdateDecoderV2: () => UpdateDecoderV2,
    UpdateEncoderV1: () => UpdateEncoderV1,
    UpdateEncoderV2: () => UpdateEncoderV2,
    XmlElement: () => YXmlElement,
    XmlFragment: () => YXmlFragment,
    XmlHook: () => YXmlHook,
    XmlText: () => YXmlText,
    YArrayEvent: () => YArrayEvent,
    YEvent: () => YEvent,
    YMapEvent: () => YMapEvent,
    YTextEvent: () => YTextEvent,
    YXmlEvent: () => YXmlEvent,
    applyUpdate: () => applyUpdate,
    applyUpdateV2: () => applyUpdateV2,
    cleanupYTextFormatting: () => cleanupYTextFormatting,
    compareIDs: () => compareIDs,
    compareRelativePositions: () => compareRelativePositions,
    convertUpdateFormatV1ToV2: () => convertUpdateFormatV1ToV2,
    convertUpdateFormatV2ToV1: () => convertUpdateFormatV2ToV1,
    createAbsolutePositionFromRelativePosition: () => createAbsolutePositionFromRelativePosition,
    createDeleteSet: () => createDeleteSet,
    createDeleteSetFromStructStore: () => createDeleteSetFromStructStore,
    createDocFromSnapshot: () => createDocFromSnapshot,
    createID: () => createID,
    createRelativePositionFromJSON: () => createRelativePositionFromJSON,
    createRelativePositionFromTypeIndex: () => createRelativePositionFromTypeIndex,
    createSnapshot: () => createSnapshot,
    decodeRelativePosition: () => decodeRelativePosition,
    decodeSnapshot: () => decodeSnapshot,
    decodeSnapshotV2: () => decodeSnapshotV2,
    decodeStateVector: () => decodeStateVector,
    decodeUpdate: () => decodeUpdate,
    decodeUpdateV2: () => decodeUpdateV2,
    diffUpdate: () => diffUpdate,
    diffUpdateV2: () => diffUpdateV2,
    emptySnapshot: () => emptySnapshot,
    encodeRelativePosition: () => encodeRelativePosition,
    encodeSnapshot: () => encodeSnapshot,
    encodeSnapshotV2: () => encodeSnapshotV2,
    encodeStateAsUpdate: () => encodeStateAsUpdate,
    encodeStateAsUpdateV2: () => encodeStateAsUpdateV2,
    encodeStateVector: () => encodeStateVector,
    encodeStateVectorFromUpdate: () => encodeStateVectorFromUpdate,
    encodeStateVectorFromUpdateV2: () => encodeStateVectorFromUpdateV2,
    equalDeleteSets: () => equalDeleteSets,
    equalSnapshots: () => equalSnapshots,
    findIndexSS: () => findIndexSS,
    findRootTypeKey: () => findRootTypeKey,
    getItem: () => getItem,
    getItemCleanEnd: () => getItemCleanEnd,
    getItemCleanStart: () => getItemCleanStart,
    getState: () => getState,
    getTypeChildren: () => getTypeChildren,
    isDeleted: () => isDeleted,
    isParentOf: () => isParentOf,
    iterateDeletedStructs: () => iterateDeletedStructs,
    logType: () => logType,
    logUpdate: () => logUpdate,
    logUpdateV2: () => logUpdateV2,
    mergeDeleteSets: () => mergeDeleteSets,
    mergeUpdates: () => mergeUpdates,
    mergeUpdatesV2: () => mergeUpdatesV2,
    obfuscateUpdate: () => obfuscateUpdate,
    obfuscateUpdateV2: () => obfuscateUpdateV2,
    parseUpdateMeta: () => parseUpdateMeta,
    parseUpdateMetaV2: () => parseUpdateMetaV2,
    readUpdate: () => readUpdate,
    readUpdateV2: () => readUpdateV2,
    relativePositionToJSON: () => relativePositionToJSON,
    snapshot: () => snapshot,
    snapshotContainsUpdate: () => snapshotContainsUpdate,
    transact: () => transact,
    tryGc: () => tryGc,
    typeListToArraySnapshot: () => typeListToArraySnapshot,
    typeMapGetAllSnapshot: () => typeMapGetAllSnapshot,
    typeMapGetSnapshot: () => typeMapGetSnapshot
  });

  // node_modules/lib0/map.js
  var create = () => /* @__PURE__ */ new Map();
  var copy = (m) => {
    const r = create();
    m.forEach((v, k) => {
      r.set(k, v);
    });
    return r;
  };
  var setIfUndefined = (map2, key, createT) => {
    let set = map2.get(key);
    if (set === void 0) {
      map2.set(key, set = createT());
    }
    return set;
  };
  var map = (m, f) => {
    const res = [];
    for (const [key, value] of m) {
      res.push(f(value, key));
    }
    return res;
  };
  var any = (m, f) => {
    for (const [key, value] of m) {
      if (f(value, key)) {
        return true;
      }
    }
    return false;
  };

  // node_modules/lib0/set.js
  var create2 = () => /* @__PURE__ */ new Set();

  // node_modules/lib0/array.js
  var last = (arr) => arr[arr.length - 1];
  var appendTo = (dest, src) => {
    for (let i = 0; i < src.length; i++) {
      dest.push(src[i]);
    }
  };
  var from = Array.from;
  var some = (arr, f) => {
    for (let i = 0; i < arr.length; i++) {
      if (f(arr[i], i, arr)) {
        return true;
      }
    }
    return false;
  };
  var unfold = (len, f) => {
    const array = new Array(len);
    for (let i = 0; i < len; i++) {
      array[i] = f(i, array);
    }
    return array;
  };
  var isArray = Array.isArray;

  // node_modules/lib0/observable.js
  var ObservableV2 = class {
    constructor() {
      this._observers = create();
    }
    /**
     * @template {keyof EVENTS & string} NAME
     * @param {NAME} name
     * @param {EVENTS[NAME]} f
     */
    on(name, f) {
      setIfUndefined(
        this._observers,
        /** @type {string} */
        name,
        create2
      ).add(f);
      return f;
    }
    /**
     * @template {keyof EVENTS & string} NAME
     * @param {NAME} name
     * @param {EVENTS[NAME]} f
     */
    once(name, f) {
      const _f = (...args2) => {
        this.off(
          name,
          /** @type {any} */
          _f
        );
        f(...args2);
      };
      this.on(
        name,
        /** @type {any} */
        _f
      );
    }
    /**
     * @template {keyof EVENTS & string} NAME
     * @param {NAME} name
     * @param {EVENTS[NAME]} f
     */
    off(name, f) {
      const observers = this._observers.get(name);
      if (observers !== void 0) {
        observers.delete(f);
        if (observers.size === 0) {
          this._observers.delete(name);
        }
      }
    }
    /**
     * Emit a named event. All registered event listeners that listen to the
     * specified name will receive the event.
     *
     * @todo This should catch exceptions
     *
     * @template {keyof EVENTS & string} NAME
     * @param {NAME} name The event name.
     * @param {Parameters<EVENTS[NAME]>} args The arguments that are applied to the event listener.
     */
    emit(name, args2) {
      return from((this._observers.get(name) || create()).values()).forEach((f) => f(...args2));
    }
    destroy() {
      this._observers = create();
    }
  };
  var Observable = class {
    constructor() {
      this._observers = create();
    }
    /**
     * @param {N} name
     * @param {function} f
     */
    on(name, f) {
      setIfUndefined(this._observers, name, create2).add(f);
    }
    /**
     * @param {N} name
     * @param {function} f
     */
    once(name, f) {
      const _f = (...args2) => {
        this.off(name, _f);
        f(...args2);
      };
      this.on(name, _f);
    }
    /**
     * @param {N} name
     * @param {function} f
     */
    off(name, f) {
      const observers = this._observers.get(name);
      if (observers !== void 0) {
        observers.delete(f);
        if (observers.size === 0) {
          this._observers.delete(name);
        }
      }
    }
    /**
     * Emit a named event. All registered event listeners that listen to the
     * specified name will receive the event.
     *
     * @todo This should catch exceptions
     *
     * @param {N} name The event name.
     * @param {Array<any>} args The arguments that are applied to the event listener.
     */
    emit(name, args2) {
      return from((this._observers.get(name) || create()).values()).forEach((f) => f(...args2));
    }
    destroy() {
      this._observers = create();
    }
  };

  // node_modules/lib0/math.js
  var floor = Math.floor;
  var abs = Math.abs;
  var min = (a, b) => a < b ? a : b;
  var max = (a, b) => a > b ? a : b;
  var isNaN2 = Number.isNaN;
  var isNegativeZero = (n) => n !== 0 ? n < 0 : 1 / n < 0;

  // node_modules/lib0/binary.js
  var BIT1 = 1;
  var BIT2 = 2;
  var BIT3 = 4;
  var BIT4 = 8;
  var BIT6 = 32;
  var BIT7 = 64;
  var BIT8 = 128;
  var BIT18 = 1 << 17;
  var BIT19 = 1 << 18;
  var BIT20 = 1 << 19;
  var BIT21 = 1 << 20;
  var BIT22 = 1 << 21;
  var BIT23 = 1 << 22;
  var BIT24 = 1 << 23;
  var BIT25 = 1 << 24;
  var BIT26 = 1 << 25;
  var BIT27 = 1 << 26;
  var BIT28 = 1 << 27;
  var BIT29 = 1 << 28;
  var BIT30 = 1 << 29;
  var BIT31 = 1 << 30;
  var BIT32 = 1 << 31;
  var BITS5 = 31;
  var BITS6 = 63;
  var BITS7 = 127;
  var BITS17 = BIT18 - 1;
  var BITS18 = BIT19 - 1;
  var BITS19 = BIT20 - 1;
  var BITS20 = BIT21 - 1;
  var BITS21 = BIT22 - 1;
  var BITS22 = BIT23 - 1;
  var BITS23 = BIT24 - 1;
  var BITS24 = BIT25 - 1;
  var BITS25 = BIT26 - 1;
  var BITS26 = BIT27 - 1;
  var BITS27 = BIT28 - 1;
  var BITS28 = BIT29 - 1;
  var BITS29 = BIT30 - 1;
  var BITS30 = BIT31 - 1;
  var BITS31 = 2147483647;

  // node_modules/lib0/number.js
  var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER;
  var MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER;
  var LOWEST_INT32 = 1 << 31;
  var isInteger = Number.isInteger || ((num) => typeof num === "number" && isFinite(num) && floor(num) === num);
  var isNaN3 = Number.isNaN;
  var parseInt2 = Number.parseInt;

  // node_modules/lib0/string.js
  var fromCharCode = String.fromCharCode;
  var fromCodePoint = String.fromCodePoint;
  var MAX_UTF16_CHARACTER = fromCharCode(65535);
  var toLowerCase = (s) => s.toLowerCase();
  var trimLeftRegex = /^\s*/g;
  var trimLeft = (s) => s.replace(trimLeftRegex, "");
  var fromCamelCaseRegex = /([A-Z])/g;
  var fromCamelCase = (s, separator) => trimLeft(s.replace(fromCamelCaseRegex, (match) => `${separator}${toLowerCase(match)}`));
  var _encodeUtf8Polyfill = (str) => {
    const encodedString = unescape(encodeURIComponent(str));
    const len = encodedString.length;
    const buf = new Uint8Array(len);
    for (let i = 0; i < len; i++) {
      buf[i] = /** @type {number} */
      encodedString.codePointAt(i);
    }
    return buf;
  };
  var utf8TextEncoder = (
    /** @type {TextEncoder} */
    typeof TextEncoder !== "undefined" ? new TextEncoder() : null
  );
  var _encodeUtf8Native = (str) => utf8TextEncoder.encode(str);
  var encodeUtf8 = utf8TextEncoder ? _encodeUtf8Native : _encodeUtf8Polyfill;
  var utf8TextDecoder = typeof TextDecoder === "undefined" ? null : new TextDecoder("utf-8", { fatal: true, ignoreBOM: true });
  if (utf8TextDecoder && utf8TextDecoder.decode(new Uint8Array()).length === 1) {
    utf8TextDecoder = null;
  }
  var repeat = (source, n) => unfold(n, () => source).join("");

  // node_modules/lib0/encoding.js
  var Encoder = class {
    constructor() {
      this.cpos = 0;
      this.cbuf = new Uint8Array(100);
      this.bufs = [];
    }
  };
  var createEncoder = () => new Encoder();
  var length = (encoder) => {
    let len = encoder.cpos;
    for (let i = 0; i < encoder.bufs.length; i++) {
      len += encoder.bufs[i].length;
    }
    return len;
  };
  var toUint8Array = (encoder) => {
    const uint8arr = new Uint8Array(length(encoder));
    let curPos = 0;
    for (let i = 0; i < encoder.bufs.length; i++) {
      const d = encoder.bufs[i];
      uint8arr.set(d, curPos);
      curPos += d.length;
    }
    uint8arr.set(new Uint8Array(encoder.cbuf.buffer, 0, encoder.cpos), curPos);
    return uint8arr;
  };
  var verifyLen = (encoder, len) => {
    const bufferLen = encoder.cbuf.length;
    if (bufferLen - encoder.cpos < len) {
      encoder.bufs.push(new Uint8Array(encoder.cbuf.buffer, 0, encoder.cpos));
      encoder.cbuf = new Uint8Array(max(bufferLen, len) * 2);
      encoder.cpos = 0;
    }
  };
  var write = (encoder, num) => {
    const bufferLen = encoder.cbuf.length;
    if (encoder.cpos === bufferLen) {
      encoder.bufs.push(encoder.cbuf);
      encoder.cbuf = new Uint8Array(bufferLen * 2);
      encoder.cpos = 0;
    }
    encoder.cbuf[encoder.cpos++] = num;
  };
  var writeUint8 = write;
  var writeVarUint = (encoder, num) => {
    while (num > BITS7) {
      write(encoder, BIT8 | BITS7 & num);
      num = floor(num / 128);
    }
    write(encoder, BITS7 & num);
  };
  var writeVarInt = (encoder, num) => {
    const isNegative = isNegativeZero(num);
    if (isNegative) {
      num = -num;
    }
    write(encoder, (num > BITS6 ? BIT8 : 0) | (isNegative ? BIT7 : 0) | BITS6 & num);
    num = floor(num / 64);
    while (num > 0) {
      write(encoder, (num > BITS7 ? BIT8 : 0) | BITS7 & num);
      num = floor(num / 128);
    }
  };
  var _strBuffer = new Uint8Array(3e4);
  var _maxStrBSize = _strBuffer.length / 3;
  var _writeVarStringNative = (encoder, str) => {
    if (str.length < _maxStrBSize) {
      const written = utf8TextEncoder.encodeInto(str, _strBuffer).written || 0;
      writeVarUint(encoder, written);
      for (let i = 0; i < written; i++) {
        write(encoder, _strBuffer[i]);
      }
    } else {
      writeVarUint8Array(encoder, encodeUtf8(str));
    }
  };
  var _writeVarStringPolyfill = (encoder, str) => {
    const encodedString = unescape(encodeURIComponent(str));
    const len = encodedString.length;
    writeVarUint(encoder, len);
    for (let i = 0; i < len; i++) {
      write(
        encoder,
        /** @type {number} */
        encodedString.codePointAt(i)
      );
    }
  };
  var writeVarString = utf8TextEncoder && /** @type {any} */
  utf8TextEncoder.encodeInto ? _writeVarStringNative : _writeVarStringPolyfill;
  var writeBinaryEncoder = (encoder, append2) => writeUint8Array(encoder, toUint8Array(append2));
  var writeUint8Array = (encoder, uint8Array) => {
    const bufferLen = encoder.cbuf.length;
    const cpos = encoder.cpos;
    const leftCopyLen = min(bufferLen - cpos, uint8Array.length);
    const rightCopyLen = uint8Array.length - leftCopyLen;
    encoder.cbuf.set(uint8Array.subarray(0, leftCopyLen), cpos);
    encoder.cpos += leftCopyLen;
    if (rightCopyLen > 0) {
      encoder.bufs.push(encoder.cbuf);
      encoder.cbuf = new Uint8Array(max(bufferLen * 2, rightCopyLen));
      encoder.cbuf.set(uint8Array.subarray(leftCopyLen));
      encoder.cpos = rightCopyLen;
    }
  };
  var writeVarUint8Array = (encoder, uint8Array) => {
    writeVarUint(encoder, uint8Array.byteLength);
    writeUint8Array(encoder, uint8Array);
  };
  var writeOnDataView = (encoder, len) => {
    verifyLen(encoder, len);
    const dview = new DataView(encoder.cbuf.buffer, encoder.cpos, len);
    encoder.cpos += len;
    return dview;
  };
  var writeFloat32 = (encoder, num) => writeOnDataView(encoder, 4).setFloat32(0, num, false);
  var writeFloat64 = (encoder, num) => writeOnDataView(encoder, 8).setFloat64(0, num, false);
  var writeBigInt64 = (encoder, num) => (
    /** @type {any} */
    writeOnDataView(encoder, 8).setBigInt64(0, num, false)
  );
  var floatTestBed = new DataView(new ArrayBuffer(4));
  var isFloat32 = (num) => {
    floatTestBed.setFloat32(0, num);
    return floatTestBed.getFloat32(0) === num;
  };
  var writeAny = (encoder, data) => {
    switch (typeof data) {
      case "string":
        write(encoder, 119);
        writeVarString(encoder, data);
        break;
      case "number":
        if (isInteger(data) && abs(data) <= BITS31) {
          write(encoder, 125);
          writeVarInt(encoder, data);
        } else if (isFloat32(data)) {
          write(encoder, 124);
          writeFloat32(encoder, data);
        } else {
          write(encoder, 123);
          writeFloat64(encoder, data);
        }
        break;
      case "bigint":
        write(encoder, 122);
        writeBigInt64(encoder, data);
        break;
      case "object":
        if (data === null) {
          write(encoder, 126);
        } else if (isArray(data)) {
          write(encoder, 117);
          writeVarUint(encoder, data.length);
          for (let i = 0; i < data.length; i++) {
            writeAny(encoder, data[i]);
          }
        } else if (data instanceof Uint8Array) {
          write(encoder, 116);
          writeVarUint8Array(encoder, data);
        } else {
          write(encoder, 118);
          const keys2 = Object.keys(data);
          writeVarUint(encoder, keys2.length);
          for (let i = 0; i < keys2.length; i++) {
            const key = keys2[i];
            writeVarString(encoder, key);
            writeAny(encoder, data[key]);
          }
        }
        break;
      case "boolean":
        write(encoder, data ? 120 : 121);
        break;
      default:
        write(encoder, 127);
    }
  };
  var RleEncoder = class extends Encoder {
    /**
     * @param {function(Encoder, T):void} writer
     */
    constructor(writer) {
      super();
      this.w = writer;
      this.s = null;
      this.count = 0;
    }
    /**
     * @param {T} v
     */
    write(v) {
      if (this.s === v) {
        this.count++;
      } else {
        if (this.count > 0) {
          writeVarUint(this, this.count - 1);
        }
        this.count = 1;
        this.w(this, v);
        this.s = v;
      }
    }
  };
  var flushUintOptRleEncoder = (encoder) => {
    if (encoder.count > 0) {
      writeVarInt(encoder.encoder, encoder.count === 1 ? encoder.s : -encoder.s);
      if (encoder.count > 1) {
        writeVarUint(encoder.encoder, encoder.count - 2);
      }
    }
  };
  var UintOptRleEncoder = class {
    constructor() {
      this.encoder = new Encoder();
      this.s = 0;
      this.count = 0;
    }
    /**
     * @param {number} v
     */
    write(v) {
      if (this.s === v) {
        this.count++;
      } else {
        flushUintOptRleEncoder(this);
        this.count = 1;
        this.s = v;
      }
    }
    /**
     * Flush the encoded state and transform this to a Uint8Array.
     *
     * Note that this should only be called once.
     */
    toUint8Array() {
      flushUintOptRleEncoder(this);
      return toUint8Array(this.encoder);
    }
  };
  var flushIntDiffOptRleEncoder = (encoder) => {
    if (encoder.count > 0) {
      const encodedDiff = encoder.diff * 2 + (encoder.count === 1 ? 0 : 1);
      writeVarInt(encoder.encoder, encodedDiff);
      if (encoder.count > 1) {
        writeVarUint(encoder.encoder, encoder.count - 2);
      }
    }
  };
  var IntDiffOptRleEncoder = class {
    constructor() {
      this.encoder = new Encoder();
      this.s = 0;
      this.count = 0;
      this.diff = 0;
    }
    /**
     * @param {number} v
     */
    write(v) {
      if (this.diff === v - this.s) {
        this.s = v;
        this.count++;
      } else {
        flushIntDiffOptRleEncoder(this);
        this.count = 1;
        this.diff = v - this.s;
        this.s = v;
      }
    }
    /**
     * Flush the encoded state and transform this to a Uint8Array.
     *
     * Note that this should only be called once.
     */
    toUint8Array() {
      flushIntDiffOptRleEncoder(this);
      return toUint8Array(this.encoder);
    }
  };
  var StringEncoder = class {
    constructor() {
      this.sarr = [];
      this.s = "";
      this.lensE = new UintOptRleEncoder();
    }
    /**
     * @param {string} string
     */
    write(string) {
      this.s += string;
      if (this.s.length > 19) {
        this.sarr.push(this.s);
        this.s = "";
      }
      this.lensE.write(string.length);
    }
    toUint8Array() {
      const encoder = new Encoder();
      this.sarr.push(this.s);
      this.s = "";
      writeVarString(encoder, this.sarr.join(""));
      writeUint8Array(encoder, this.lensE.toUint8Array());
      return toUint8Array(encoder);
    }
  };

  // node_modules/lib0/error.js
  var create3 = (s) => new Error(s);
  var methodUnimplemented = () => {
    throw create3("Method unimplemented");
  };
  var unexpectedCase = () => {
    throw create3("Unexpected case");
  };

  // node_modules/lib0/decoding.js
  var errorUnexpectedEndOfArray = create3("Unexpected end of array");
  var errorIntegerOutOfRange = create3("Integer out of Range");
  var Decoder = class {
    /**
     * @param {Uint8Array} uint8Array Binary data to decode
     */
    constructor(uint8Array) {
      this.arr = uint8Array;
      this.pos = 0;
    }
  };
  var createDecoder = (uint8Array) => new Decoder(uint8Array);
  var hasContent = (decoder) => decoder.pos !== decoder.arr.length;
  var readUint8Array = (decoder, len) => {
    const view = new Uint8Array(decoder.arr.buffer, decoder.pos + decoder.arr.byteOffset, len);
    decoder.pos += len;
    return view;
  };
  var readVarUint8Array = (decoder) => readUint8Array(decoder, readVarUint(decoder));
  var readUint8 = (decoder) => decoder.arr[decoder.pos++];
  var readVarUint = (decoder) => {
    let num = 0;
    let mult = 1;
    const len = decoder.arr.length;
    while (decoder.pos < len) {
      const r = decoder.arr[decoder.pos++];
      num = num + (r & BITS7) * mult;
      mult *= 128;
      if (r < BIT8) {
        return num;
      }
      if (num > MAX_SAFE_INTEGER) {
        throw errorIntegerOutOfRange;
      }
    }
    throw errorUnexpectedEndOfArray;
  };
  var readVarInt = (decoder) => {
    let r = decoder.arr[decoder.pos++];
    let num = r & BITS6;
    let mult = 64;
    const sign = (r & BIT7) > 0 ? -1 : 1;
    if ((r & BIT8) === 0) {
      return sign * num;
    }
    const len = decoder.arr.length;
    while (decoder.pos < len) {
      r = decoder.arr[decoder.pos++];
      num = num + (r & BITS7) * mult;
      mult *= 128;
      if (r < BIT8) {
        return sign * num;
      }
      if (num > MAX_SAFE_INTEGER) {
        throw errorIntegerOutOfRange;
      }
    }
    throw errorUnexpectedEndOfArray;
  };
  var _readVarStringPolyfill = (decoder) => {
    let remainingLen = readVarUint(decoder);
    if (remainingLen === 0) {
      return "";
    } else {
      let encodedString = String.fromCodePoint(readUint8(decoder));
      if (--remainingLen < 100) {
        while (remainingLen--) {
          encodedString += String.fromCodePoint(readUint8(decoder));
        }
      } else {
        while (remainingLen > 0) {
          const nextLen = remainingLen < 1e4 ? remainingLen : 1e4;
          const bytes = decoder.arr.subarray(decoder.pos, decoder.pos + nextLen);
          decoder.pos += nextLen;
          encodedString += String.fromCodePoint.apply(
            null,
            /** @type {any} */
            bytes
          );
          remainingLen -= nextLen;
        }
      }
      return decodeURIComponent(escape(encodedString));
    }
  };
  var _readVarStringNative = (decoder) => (
    /** @type any */
    utf8TextDecoder.decode(readVarUint8Array(decoder))
  );
  var readVarString = utf8TextDecoder ? _readVarStringNative : _readVarStringPolyfill;
  var readFromDataView = (decoder, len) => {
    const dv = new DataView(decoder.arr.buffer, decoder.arr.byteOffset + decoder.pos, len);
    decoder.pos += len;
    return dv;
  };
  var readFloat32 = (decoder) => readFromDataView(decoder, 4).getFloat32(0, false);
  var readFloat64 = (decoder) => readFromDataView(decoder, 8).getFloat64(0, false);
  var readBigInt64 = (decoder) => (
    /** @type {any} */
    readFromDataView(decoder, 8).getBigInt64(0, false)
  );
  var readAnyLookupTable = [
    (decoder) => void 0,
    // CASE 127: undefined
    (decoder) => null,
    // CASE 126: null
    readVarInt,
    // CASE 125: integer
    readFloat32,
    // CASE 124: float32
    readFloat64,
    // CASE 123: float64
    readBigInt64,
    // CASE 122: bigint
    (decoder) => false,
    // CASE 121: boolean (false)
    (decoder) => true,
    // CASE 120: boolean (true)
    readVarString,
    // CASE 119: string
    (decoder) => {
      const len = readVarUint(decoder);
      const obj = {};
      for (let i = 0; i < len; i++) {
        const key = readVarString(decoder);
        obj[key] = readAny(decoder);
      }
      return obj;
    },
    (decoder) => {
      const len = readVarUint(decoder);
      const arr = [];
      for (let i = 0; i < len; i++) {
        arr.push(readAny(decoder));
      }
      return arr;
    },
    readVarUint8Array
    // CASE 116: Uint8Array
  ];
  var readAny = (decoder) => readAnyLookupTable[127 - readUint8(decoder)](decoder);
  var RleDecoder = class extends Decoder {
    /**
     * @param {Uint8Array} uint8Array
     * @param {function(Decoder):T} reader
     */
    constructor(uint8Array, reader) {
      super(uint8Array);
      this.reader = reader;
      this.s = null;
      this.count = 0;
    }
    read() {
      if (this.count === 0) {
        this.s = this.reader(this);
        if (hasContent(this)) {
          this.count = readVarUint(this) + 1;
        } else {
          this.count = -1;
        }
      }
      this.count--;
      return (
        /** @type {T} */
        this.s
      );
    }
  };
  var UintOptRleDecoder = class extends Decoder {
    /**
     * @param {Uint8Array} uint8Array
     */
    constructor(uint8Array) {
      super(uint8Array);
      this.s = 0;
      this.count = 0;
    }
    read() {
      if (this.count === 0) {
        this.s = readVarInt(this);
        const isNegative = isNegativeZero(this.s);
        this.count = 1;
        if (isNegative) {
          this.s = -this.s;
          this.count = readVarUint(this) + 2;
        }
      }
      this.count--;
      return (
        /** @type {number} */
        this.s
      );
    }
  };
  var IntDiffOptRleDecoder = class extends Decoder {
    /**
     * @param {Uint8Array} uint8Array
     */
    constructor(uint8Array) {
      super(uint8Array);
      this.s = 0;
      this.count = 0;
      this.diff = 0;
    }
    /**
     * @return {number}
     */
    read() {
      if (this.count === 0) {
        const diff = readVarInt(this);
        const hasCount = diff & 1;
        this.diff = floor(diff / 2);
        this.count = 1;
        if (hasCount) {
          this.count = readVarUint(this) + 2;
        }
      }
      this.s += this.diff;
      this.count--;
      return this.s;
    }
  };
  var StringDecoder = class {
    /**
     * @param {Uint8Array} uint8Array
     */
    constructor(uint8Array) {
      this.decoder = new UintOptRleDecoder(uint8Array);
      this.str = readVarString(this.decoder);
      this.spos = 0;
    }
    /**
     * @return {string}
     */
    read() {
      const end = this.spos + this.decoder.read();
      const res = this.str.slice(this.spos, end);
      this.spos = end;
      return res;
    }
  };

  // node_modules/lib0/webcrypto.js
  var subtle = crypto.subtle;
  var getRandomValues = crypto.getRandomValues.bind(crypto);

  // node_modules/lib0/random.js
  var uint32 = () => getRandomValues(new Uint32Array(1))[0];
  var uuidv4Template = "10000000-1000-4000-8000" + -1e11;
  var uuidv4 = () => uuidv4Template.replace(
    /[018]/g,
    /** @param {number} c */
    (c) => (c ^ uint32() & 15 >> c / 4).toString(16)
  );

  // node_modules/lib0/time.js
  var getUnixTime = Date.now;

  // node_modules/lib0/promise.js
  var create4 = (f) => (
    /** @type {Promise<T>} */
    new Promise(f)
  );
  var all = Promise.all.bind(Promise);

  // node_modules/lib0/conditions.js
  var undefinedToNull = (v) => v === void 0 ? null : v;

  // node_modules/lib0/storage.js
  var VarStoragePolyfill = class {
    constructor() {
      this.map = /* @__PURE__ */ new Map();
    }
    /**
     * @param {string} key
     * @param {any} newValue
     */
    setItem(key, newValue) {
      this.map.set(key, newValue);
    }
    /**
     * @param {string} key
     */
    getItem(key) {
      return this.map.get(key);
    }
  };
  var _localStorage = new VarStoragePolyfill();
  var usePolyfill = true;
  try {
    if (typeof localStorage !== "undefined" && localStorage) {
      _localStorage = localStorage;
      usePolyfill = false;
    }
  } catch (e) {
  }
  var varStorage = _localStorage;

  // node_modules/lib0/object.js
  var assign = Object.assign;
  var keys = Object.keys;
  var forEach = (obj, f) => {
    for (const key in obj) {
      f(obj[key], key);
    }
  };
  var length2 = (obj) => keys(obj).length;
  var size = (obj) => keys(obj).length;
  var isEmpty = (obj) => {
    for (const _k in obj) {
      return false;
    }
    return true;
  };
  var every = (obj, f) => {
    for (const key in obj) {
      if (!f(obj[key], key)) {
        return false;
      }
    }
    return true;
  };
  var hasProperty = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key);
  var equalFlat = (a, b) => a === b || size(a) === size(b) && every(a, (val, key) => (val !== void 0 || hasProperty(b, key)) && b[key] === val);
  var freeze = Object.freeze;
  var deepFreeze = (o) => {
    for (const key in o) {
      const c = o[key];
      if (typeof c === "object" || typeof c === "function") {
        deepFreeze(o[key]);
      }
    }
    return freeze(o);
  };

  // node_modules/lib0/function.js
  var callAll = (fs, args2, i = 0) => {
    try {
      for (; i < fs.length; i++) {
        fs[i](...args2);
      }
    } finally {
      if (i < fs.length) {
        callAll(fs, args2, i + 1);
      }
    }
  };
  var id = (a) => a;
  var equalityStrict = (a, b) => a === b;
  var equalityDeep = (a, b) => {
    if (a == null || b == null) {
      return equalityStrict(a, b);
    }
    if (a.constructor !== b.constructor) {
      return false;
    }
    if (a === b) {
      return true;
    }
    switch (a.constructor) {
      case ArrayBuffer:
        a = new Uint8Array(a);
        b = new Uint8Array(b);
      // eslint-disable-next-line no-fallthrough
      case Uint8Array: {
        if (a.byteLength !== b.byteLength) {
          return false;
        }
        for (let i = 0; i < a.length; i++) {
          if (a[i] !== b[i]) {
            return false;
          }
        }
        break;
      }
      case Set: {
        if (a.size !== b.size) {
          return false;
        }
        for (const value of a) {
          if (!b.has(value)) {
            return false;
          }
        }
        break;
      }
      case Map: {
        if (a.size !== b.size) {
          return false;
        }
        for (const key of a.keys()) {
          if (!b.has(key) || !equalityDeep(a.get(key), b.get(key))) {
            return false;
          }
        }
        break;
      }
      case Object:
        if (length2(a) !== length2(b)) {
          return false;
        }
        for (const key in a) {
          if (!hasProperty(a, key) || !equalityDeep(a[key], b[key])) {
            return false;
          }
        }
        break;
      case Array:
        if (a.length !== b.length) {
          return false;
        }
        for (let i = 0; i < a.length; i++) {
          if (!equalityDeep(a[i], b[i])) {
            return false;
          }
        }
        break;
      default:
        return false;
    }
    return true;
  };
  var isOneOf = (value, options) => options.includes(value);

  // node_modules/lib0/environment.js
  var isNode = typeof process !== "undefined" && process.release && /node|io\.js/.test(process.release.name) && Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]";
  var isBrowser = typeof window !== "undefined" && typeof document !== "undefined" && !isNode;
  var isMac = typeof navigator !== "undefined" ? /Mac/.test(navigator.platform) : false;
  var params;
  var args = [];
  var computeParams = () => {
    if (params === void 0) {
      if (isNode) {
        params = create();
        const pargs = process.argv;
        let currParamName = null;
        for (let i = 0; i < pargs.length; i++) {
          const parg = pargs[i];
          if (parg[0] === "-") {
            if (currParamName !== null) {
              params.set(currParamName, "");
            }
            currParamName = parg;
          } else {
            if (currParamName !== null) {
              params.set(currParamName, parg);
              currParamName = null;
            } else {
              args.push(parg);
            }
          }
        }
        if (currParamName !== null) {
          params.set(currParamName, "");
        }
      } else if (typeof location === "object") {
        params = create();
        (location.search || "?").slice(1).split("&").forEach((kv) => {
          if (kv.length !== 0) {
            const [key, value] = kv.split("=");
            params.set(`--${fromCamelCase(key, "-")}`, value);
            params.set(`-${fromCamelCase(key, "-")}`, value);
          }
        });
      } else {
        params = create();
      }
    }
    return params;
  };
  var hasParam = (name) => computeParams().has(name);
  var getVariable = (name) => isNode ? undefinedToNull(process.env[name.toUpperCase().replaceAll("-", "_")]) : undefinedToNull(varStorage.getItem(name));
  var hasConf = (name) => hasParam("--" + name) || getVariable(name) !== null;
  var production = hasConf("production");
  var forceColor = isNode && isOneOf(process.env.FORCE_COLOR, ["true", "1", "2"]);
  var supportsColor = forceColor || !hasParam("--no-colors") && // @todo deprecate --no-colors
  !hasConf("no-color") && (!isNode || process.stdout.isTTY) && (!isNode || hasParam("--color") || getVariable("COLORTERM") !== null || (getVariable("TERM") || "").includes("color"));

  // node_modules/lib0/buffer.js
  var createUint8ArrayFromLen = (len) => new Uint8Array(len);
  var createUint8ArrayViewFromArrayBuffer = (buffer, byteOffset, length3) => new Uint8Array(buffer, byteOffset, length3);
  var toBase64Browser = (bytes) => {
    let s = "";
    for (let i = 0; i < bytes.byteLength; i++) {
      s += fromCharCode(bytes[i]);
    }
    return btoa(s);
  };
  var toBase64Node = (bytes) => Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength).toString("base64");
  var fromBase64Browser = (s) => {
    const a = atob(s);
    const bytes = createUint8ArrayFromLen(a.length);
    for (let i = 0; i < a.length; i++) {
      bytes[i] = a.charCodeAt(i);
    }
    return bytes;
  };
  var fromBase64Node = (s) => {
    const buf = Buffer.from(s, "base64");
    return createUint8ArrayViewFromArrayBuffer(buf.buffer, buf.byteOffset, buf.byteLength);
  };
  var toBase64 = isBrowser ? toBase64Browser : toBase64Node;
  var fromBase64 = isBrowser ? fromBase64Browser : fromBase64Node;
  var copyUint8Array = (uint8Array) => {
    const newBuf = createUint8ArrayFromLen(uint8Array.byteLength);
    newBuf.set(uint8Array);
    return newBuf;
  };

  // node_modules/lib0/pair.js
  var Pair = class {
    /**
     * @param {L} left
     * @param {R} right
     */
    constructor(left, right) {
      this.left = left;
      this.right = right;
    }
  };
  var create5 = (left, right) => new Pair(left, right);

  // node_modules/lib0/dom.js
  var doc = (
    /** @type {Document} */
    typeof document !== "undefined" ? document : {}
  );
  var domParser = (
    /** @type {DOMParser} */
    typeof DOMParser !== "undefined" ? new DOMParser() : null
  );
  var mapToStyleString = (m) => map(m, (value, key) => `${key}:${value};`).join("");
  var ELEMENT_NODE = doc.ELEMENT_NODE;
  var TEXT_NODE = doc.TEXT_NODE;
  var CDATA_SECTION_NODE = doc.CDATA_SECTION_NODE;
  var COMMENT_NODE = doc.COMMENT_NODE;
  var DOCUMENT_NODE = doc.DOCUMENT_NODE;
  var DOCUMENT_TYPE_NODE = doc.DOCUMENT_TYPE_NODE;
  var DOCUMENT_FRAGMENT_NODE = doc.DOCUMENT_FRAGMENT_NODE;

  // node_modules/lib0/symbol.js
  var create6 = Symbol;

  // node_modules/lib0/logging.common.js
  var BOLD = create6();
  var UNBOLD = create6();
  var BLUE = create6();
  var GREY = create6();
  var GREEN = create6();
  var RED = create6();
  var PURPLE = create6();
  var ORANGE = create6();
  var UNCOLOR = create6();
  var computeNoColorLoggingArgs = (args2) => {
    if (args2.length === 1 && args2[0]?.constructor === Function) {
      args2 = /** @type {Array<string|Symbol|Object|number>} */
      /** @type {[function]} */
      args2[0]();
    }
    const strBuilder = [];
    const logArgs = [];
    let i = 0;
    for (; i < args2.length; i++) {
      const arg = args2[i];
      if (arg === void 0) {
        break;
      } else if (arg.constructor === String || arg.constructor === Number) {
        strBuilder.push(arg);
      } else if (arg.constructor === Object) {
        break;
      }
    }
    if (i > 0) {
      logArgs.push(strBuilder.join(""));
    }
    for (; i < args2.length; i++) {
      const arg = args2[i];
      if (!(arg instanceof Symbol)) {
        logArgs.push(arg);
      }
    }
    return logArgs;
  };
  var lastLoggingTime = getUnixTime();

  // node_modules/lib0/logging.js
  var _browserStyleMap = {
    [BOLD]: create5("font-weight", "bold"),
    [UNBOLD]: create5("font-weight", "normal"),
    [BLUE]: create5("color", "blue"),
    [GREEN]: create5("color", "green"),
    [GREY]: create5("color", "grey"),
    [RED]: create5("color", "red"),
    [PURPLE]: create5("color", "purple"),
    [ORANGE]: create5("color", "orange"),
    // not well supported in chrome when debugging node with inspector - TODO: deprecate
    [UNCOLOR]: create5("color", "black")
  };
  var computeBrowserLoggingArgs = (args2) => {
    if (args2.length === 1 && args2[0]?.constructor === Function) {
      args2 = /** @type {Array<string|Symbol|Object|number>} */
      /** @type {[function]} */
      args2[0]();
    }
    const strBuilder = [];
    const styles = [];
    const currentStyle = create();
    let logArgs = [];
    let i = 0;
    for (; i < args2.length; i++) {
      const arg = args2[i];
      const style = _browserStyleMap[arg];
      if (style !== void 0) {
        currentStyle.set(style.left, style.right);
      } else {
        if (arg === void 0) {
          break;
        }
        if (arg.constructor === String || arg.constructor === Number) {
          const style2 = mapToStyleString(currentStyle);
          if (i > 0 || style2.length > 0) {
            strBuilder.push("%c" + arg);
            styles.push(style2);
          } else {
            strBuilder.push(arg);
          }
        } else {
          break;
        }
      }
    }
    if (i > 0) {
      logArgs = styles;
      logArgs.unshift(strBuilder.join(""));
    }
    for (; i < args2.length; i++) {
      const arg = args2[i];
      if (!(arg instanceof Symbol)) {
        logArgs.push(arg);
      }
    }
    return logArgs;
  };
  var computeLoggingArgs = supportsColor ? computeBrowserLoggingArgs : computeNoColorLoggingArgs;
  var print = (...args2) => {
    console.log(...computeLoggingArgs(args2));
    vconsoles.forEach((vc) => vc.print(args2));
  };
  var warn = (...args2) => {
    console.warn(...computeLoggingArgs(args2));
    args2.unshift(ORANGE);
    vconsoles.forEach((vc) => vc.print(args2));
  };
  var vconsoles = create2();

  // node_modules/lib0/iterator.js
  var createIterator = (next) => ({
    /**
     * @return {IterableIterator<T>}
     */
    [Symbol.iterator]() {
      return this;
    },
    // @ts-ignore
    next
  });
  var iteratorFilter = (iterator, filter) => createIterator(() => {
    let res;
    do {
      res = iterator.next();
    } while (!res.done && !filter(res.value));
    return res;
  });
  var iteratorMap = (iterator, fmap) => createIterator(() => {
    const { done, value } = iterator.next();
    return { done, value: done ? void 0 : fmap(value) };
  });

  // node_modules/yjs/dist/yjs.mjs
  var AbstractConnector = class extends ObservableV2 {
    /**
     * @param {Doc} ydoc
     * @param {any} awareness
     */
    constructor(ydoc, awareness) {
      super();
      this.doc = ydoc;
      this.awareness = awareness;
    }
  };
  var DeleteItem = class {
    /**
     * @param {number} clock
     * @param {number} len
     */
    constructor(clock, len) {
      this.clock = clock;
      this.len = len;
    }
  };
  var DeleteSet = class {
    constructor() {
      this.clients = /* @__PURE__ */ new Map();
    }
  };
  var iterateDeletedStructs = (transaction, ds, f) => ds.clients.forEach((deletes, clientid) => {
    const structs = (
      /** @type {Array<GC|Item>} */
      transaction.doc.store.clients.get(clientid)
    );
    if (structs != null) {
      const lastStruct = structs[structs.length - 1];
      const clockState = lastStruct.id.clock + lastStruct.length;
      for (let i = 0, del = deletes[i]; i < deletes.length && del.clock < clockState; del = deletes[++i]) {
        iterateStructs(transaction, structs, del.clock, del.len, f);
      }
    }
  });
  var findIndexDS = (dis, clock) => {
    let left = 0;
    let right = dis.length - 1;
    while (left <= right) {
      const midindex = floor((left + right) / 2);
      const mid = dis[midindex];
      const midclock = mid.clock;
      if (midclock <= clock) {
        if (clock < midclock + mid.len) {
          return midindex;
        }
        left = midindex + 1;
      } else {
        right = midindex - 1;
      }
    }
    return null;
  };
  var isDeleted = (ds, id2) => {
    const dis = ds.clients.get(id2.client);
    return dis !== void 0 && findIndexDS(dis, id2.clock) !== null;
  };
  var sortAndMergeDeleteSet = (ds) => {
    ds.clients.forEach((dels) => {
      dels.sort((a, b) => a.clock - b.clock);
      let i, j;
      for (i = 1, j = 1; i < dels.length; i++) {
        const left = dels[j - 1];
        const right = dels[i];
        if (left.clock + left.len >= right.clock) {
          left.len = max(left.len, right.clock + right.len - left.clock);
        } else {
          if (j < i) {
            dels[j] = right;
          }
          j++;
        }
      }
      dels.length = j;
    });
  };
  var mergeDeleteSets = (dss) => {
    const merged = new DeleteSet();
    for (let dssI = 0; dssI < dss.length; dssI++) {
      dss[dssI].clients.forEach((delsLeft, client) => {
        if (!merged.clients.has(client)) {
          const dels = delsLeft.slice();
          for (let i = dssI + 1; i < dss.length; i++) {
            appendTo(dels, dss[i].clients.get(client) || []);
          }
          merged.clients.set(client, dels);
        }
      });
    }
    sortAndMergeDeleteSet(merged);
    return merged;
  };
  var addToDeleteSet = (ds, client, clock, length3) => {
    setIfUndefined(ds.clients, client, () => (
      /** @type {Array<DeleteItem>} */
      []
    )).push(new DeleteItem(clock, length3));
  };
  var createDeleteSet = () => new DeleteSet();
  var createDeleteSetFromStructStore = (ss) => {
    const ds = createDeleteSet();
    ss.clients.forEach((structs, client) => {
      const dsitems = [];
      for (let i = 0; i < structs.length; i++) {
        const struct = structs[i];
        if (struct.deleted) {
          const clock = struct.id.clock;
          let len = struct.length;
          if (i + 1 < structs.length) {
            for (let next = structs[i + 1]; i + 1 < structs.length && next.deleted; next = structs[++i + 1]) {
              len += next.length;
            }
          }
          dsitems.push(new DeleteItem(clock, len));
        }
      }
      if (dsitems.length > 0) {
        ds.clients.set(client, dsitems);
      }
    });
    return ds;
  };
  var writeDeleteSet = (encoder, ds) => {
    writeVarUint(encoder.restEncoder, ds.clients.size);
    from(ds.clients.entries()).sort((a, b) => b[0] - a[0]).forEach(([client, dsitems]) => {
      encoder.resetDsCurVal();
      writeVarUint(encoder.restEncoder, client);
      const len = dsitems.length;
      writeVarUint(encoder.restEncoder, len);
      for (let i = 0; i < len; i++) {
        const item = dsitems[i];
        encoder.writeDsClock(item.clock);
        encoder.writeDsLen(item.len);
      }
    });
  };
  var readDeleteSet = (decoder) => {
    const ds = new DeleteSet();
    const numClients = readVarUint(decoder.restDecoder);
    for (let i = 0; i < numClients; i++) {
      decoder.resetDsCurVal();
      const client = readVarUint(decoder.restDecoder);
      const numberOfDeletes = readVarUint(decoder.restDecoder);
      if (numberOfDeletes > 0) {
        const dsField = setIfUndefined(ds.clients, client, () => (
          /** @type {Array<DeleteItem>} */
          []
        ));
        for (let i2 = 0; i2 < numberOfDeletes; i2++) {
          dsField.push(new DeleteItem(decoder.readDsClock(), decoder.readDsLen()));
        }
      }
    }
    return ds;
  };
  var readAndApplyDeleteSet = (decoder, transaction, store2) => {
    const unappliedDS = new DeleteSet();
    const numClients = readVarUint(decoder.restDecoder);
    for (let i = 0; i < numClients; i++) {
      decoder.resetDsCurVal();
      const client = readVarUint(decoder.restDecoder);
      const numberOfDeletes = readVarUint(decoder.restDecoder);
      const structs = store2.clients.get(client) || [];
      const state = getState(store2, client);
      for (let i2 = 0; i2 < numberOfDeletes; i2++) {
        const clock = decoder.readDsClock();
        const clockEnd = clock + decoder.readDsLen();
        if (clock < state) {
          if (state < clockEnd) {
            addToDeleteSet(unappliedDS, client, state, clockEnd - state);
          }
          let index = findIndexSS(structs, clock);
          let struct = structs[index];
          if (!struct.deleted && struct.id.clock < clock) {
            structs.splice(index + 1, 0, splitItem(transaction, struct, clock - struct.id.clock));
            index++;
          }
          while (index < structs.length) {
            struct = structs[index++];
            if (struct.id.clock < clockEnd) {
              if (!struct.deleted) {
                if (clockEnd < struct.id.clock + struct.length) {
                  structs.splice(index, 0, splitItem(transaction, struct, clockEnd - struct.id.clock));
                }
                struct.delete(transaction);
              }
            } else {
              break;
            }
          }
        } else {
          addToDeleteSet(unappliedDS, client, clock, clockEnd - clock);
        }
      }
    }
    if (unappliedDS.clients.size > 0) {
      const ds = new UpdateEncoderV2();
      writeVarUint(ds.restEncoder, 0);
      writeDeleteSet(ds, unappliedDS);
      return ds.toUint8Array();
    }
    return null;
  };
  var equalDeleteSets = (ds1, ds2) => {
    if (ds1.clients.size !== ds2.clients.size) return false;
    for (const [client, deleteItems1] of ds1.clients.entries()) {
      const deleteItems2 = (
        /** @type {Array<import('../internals.js').DeleteItem>} */
        ds2.clients.get(client)
      );
      if (deleteItems2 === void 0 || deleteItems1.length !== deleteItems2.length) return false;
      for (let i = 0; i < deleteItems1.length; i++) {
        const di1 = deleteItems1[i];
        const di2 = deleteItems2[i];
        if (di1.clock !== di2.clock || di1.len !== di2.len) {
          return false;
        }
      }
    }
    return true;
  };
  var generateNewClientId = uint32;
  var Doc = class _Doc extends ObservableV2 {
    /**
     * @param {DocOpts} opts configuration
     */
    constructor({ guid = uuidv4(), collectionid = null, gc = true, gcFilter = () => true, meta = null, autoLoad = false, shouldLoad = true } = {}) {
      super();
      this.gc = gc;
      this.gcFilter = gcFilter;
      this.clientID = generateNewClientId();
      this.guid = guid;
      this.collectionid = collectionid;
      this.share = /* @__PURE__ */ new Map();
      this.store = new StructStore();
      this._transaction = null;
      this._transactionCleanups = [];
      this.subdocs = /* @__PURE__ */ new Set();
      this._item = null;
      this.shouldLoad = shouldLoad;
      this.autoLoad = autoLoad;
      this.meta = meta;
      this.isLoaded = false;
      this.isSynced = false;
      this.isDestroyed = false;
      this.whenLoaded = create4((resolve) => {
        this.on("load", () => {
          this.isLoaded = true;
          resolve(this);
        });
      });
      const provideSyncedPromise = () => create4((resolve) => {
        const eventHandler = (isSynced) => {
          if (isSynced === void 0 || isSynced === true) {
            this.off("sync", eventHandler);
            resolve();
          }
        };
        this.on("sync", eventHandler);
      });
      this.on("sync", (isSynced) => {
        if (isSynced === false && this.isSynced) {
          this.whenSynced = provideSyncedPromise();
        }
        this.isSynced = isSynced === void 0 || isSynced === true;
        if (this.isSynced && !this.isLoaded) {
          this.emit("load", [this]);
        }
      });
      this.whenSynced = provideSyncedPromise();
    }
    /**
     * Notify the parent document that you request to load data into this subdocument (if it is a subdocument).
     *
     * `load()` might be used in the future to request any provider to load the most current data.
     *
     * It is safe to call `load()` multiple times.
     */
    load() {
      const item = this._item;
      if (item !== null && !this.shouldLoad) {
        transact(
          /** @type {any} */
          item.parent.doc,
          (transaction) => {
            transaction.subdocsLoaded.add(this);
          },
          null,
          true
        );
      }
      this.shouldLoad = true;
    }
    getSubdocs() {
      return this.subdocs;
    }
    getSubdocGuids() {
      return new Set(from(this.subdocs).map((doc2) => doc2.guid));
    }
    /**
     * Changes that happen inside of a transaction are bundled. This means that
     * the observer fires _after_ the transaction is finished and that all changes
     * that happened inside of the transaction are sent as one message to the
     * other peers.
     *
     * @template T
     * @param {function(Transaction):T} f The function that should be executed as a transaction
     * @param {any} [origin] Origin of who started the transaction. Will be stored on transaction.origin
     * @return T
     *
     * @public
     */
    transact(f, origin2 = null) {
      return transact(this, f, origin2);
    }
    /**
     * Define a shared data type.
     *
     * Multiple calls of `ydoc.get(name, TypeConstructor)` yield the same result
     * and do not overwrite each other. I.e.
     * `ydoc.get(name, Y.Array) === ydoc.get(name, Y.Array)`
     *
     * After this method is called, the type is also available on `ydoc.share.get(name)`.
     *
     * *Best Practices:*
     * Define all types right after the Y.Doc instance is created and store them in a separate object.
     * Also use the typed methods `getText(name)`, `getArray(name)`, ..
     *
     * @template {typeof AbstractType<any>} Type
     * @example
     *   const ydoc = new Y.Doc(..)
     *   const appState = {
     *     document: ydoc.getText('document')
     *     comments: ydoc.getArray('comments')
     *   }
     *
     * @param {string} name
     * @param {Type} TypeConstructor The constructor of the type definition. E.g. Y.Text, Y.Array, Y.Map, ...
     * @return {InstanceType<Type>} The created type. Constructed with TypeConstructor
     *
     * @public
     */
    get(name, TypeConstructor = (
      /** @type {any} */
      AbstractType
    )) {
      const type = setIfUndefined(this.share, name, () => {
        const t = new TypeConstructor();
        t._integrate(this, null);
        return t;
      });
      const Constr = type.constructor;
      if (TypeConstructor !== AbstractType && Constr !== TypeConstructor) {
        if (Constr === AbstractType) {
          const t = new TypeConstructor();
          t._map = type._map;
          type._map.forEach(
            /** @param {Item?} n */
            (n) => {
              for (; n !== null; n = n.left) {
                n.parent = t;
              }
            }
          );
          t._start = type._start;
          for (let n = t._start; n !== null; n = n.right) {
            n.parent = t;
          }
          t._length = type._length;
          this.share.set(name, t);
          t._integrate(this, null);
          return (
            /** @type {InstanceType<Type>} */
            t
          );
        } else {
          throw new Error(`Type with the name ${name} has already been defined with a different constructor`);
        }
      }
      return (
        /** @type {InstanceType<Type>} */
        type
      );
    }
    /**
     * @template T
     * @param {string} [name]
     * @return {YArray<T>}
     *
     * @public
     */
    getArray(name = "") {
      return (
        /** @type {YArray<T>} */
        this.get(name, YArray)
      );
    }
    /**
     * @param {string} [name]
     * @return {YText}
     *
     * @public
     */
    getText(name = "") {
      return this.get(name, YText);
    }
    /**
     * @template T
     * @param {string} [name]
     * @return {YMap<T>}
     *
     * @public
     */
    getMap(name = "") {
      return (
        /** @type {YMap<T>} */
        this.get(name, YMap)
      );
    }
    /**
     * @param {string} [name]
     * @return {YXmlElement}
     *
     * @public
     */
    getXmlElement(name = "") {
      return (
        /** @type {YXmlElement<{[key:string]:string}>} */
        this.get(name, YXmlElement)
      );
    }
    /**
     * @param {string} [name]
     * @return {YXmlFragment}
     *
     * @public
     */
    getXmlFragment(name = "") {
      return this.get(name, YXmlFragment);
    }
    /**
     * Converts the entire document into a js object, recursively traversing each yjs type
     * Doesn't log types that have not been defined (using ydoc.getType(..)).
     *
     * @deprecated Do not use this method and rather call toJSON directly on the shared types.
     *
     * @return {Object<string, any>}
     */
    toJSON() {
      const doc2 = {};
      this.share.forEach((value, key) => {
        doc2[key] = value.toJSON();
      });
      return doc2;
    }
    /**
     * Emit `destroy` event and unregister all event handlers.
     */
    destroy() {
      this.isDestroyed = true;
      from(this.subdocs).forEach((subdoc) => subdoc.destroy());
      const item = this._item;
      if (item !== null) {
        this._item = null;
        const content = (
          /** @type {ContentDoc} */
          item.content
        );
        content.doc = new _Doc({ guid: this.guid, ...content.opts, shouldLoad: false });
        content.doc._item = item;
        transact(
          /** @type {any} */
          item.parent.doc,
          (transaction) => {
            const doc2 = content.doc;
            if (!item.deleted) {
              transaction.subdocsAdded.add(doc2);
            }
            transaction.subdocsRemoved.add(this);
          },
          null,
          true
        );
      }
      this.emit("destroyed", [true]);
      this.emit("destroy", [this]);
      super.destroy();
    }
  };
  var DSDecoderV1 = class {
    /**
     * @param {decoding.Decoder} decoder
     */
    constructor(decoder) {
      this.restDecoder = decoder;
    }
    resetDsCurVal() {
    }
    /**
     * @return {number}
     */
    readDsClock() {
      return readVarUint(this.restDecoder);
    }
    /**
     * @return {number}
     */
    readDsLen() {
      return readVarUint(this.restDecoder);
    }
  };
  var UpdateDecoderV1 = class extends DSDecoderV1 {
    /**
     * @return {ID}
     */
    readLeftID() {
      return createID(readVarUint(this.restDecoder), readVarUint(this.restDecoder));
    }
    /**
     * @return {ID}
     */
    readRightID() {
      return createID(readVarUint(this.restDecoder), readVarUint(this.restDecoder));
    }
    /**
     * Read the next client id.
     * Use this in favor of readID whenever possible to reduce the number of objects created.
     */
    readClient() {
      return readVarUint(this.restDecoder);
    }
    /**
     * @return {number} info An unsigned 8-bit integer
     */
    readInfo() {
      return readUint8(this.restDecoder);
    }
    /**
     * @return {string}
     */
    readString() {
      return readVarString(this.restDecoder);
    }
    /**
     * @return {boolean} isKey
     */
    readParentInfo() {
      return readVarUint(this.restDecoder) === 1;
    }
    /**
     * @return {number} info An unsigned 8-bit integer
     */
    readTypeRef() {
      return readVarUint(this.restDecoder);
    }
    /**
     * Write len of a struct - well suited for Opt RLE encoder.
     *
     * @return {number} len
     */
    readLen() {
      return readVarUint(this.restDecoder);
    }
    /**
     * @return {any}
     */
    readAny() {
      return readAny(this.restDecoder);
    }
    /**
     * @return {Uint8Array}
     */
    readBuf() {
      return copyUint8Array(readVarUint8Array(this.restDecoder));
    }
    /**
     * Legacy implementation uses JSON parse. We use any-decoding in v2.
     *
     * @return {any}
     */
    readJSON() {
      return JSON.parse(readVarString(this.restDecoder));
    }
    /**
     * @return {string}
     */
    readKey() {
      return readVarString(this.restDecoder);
    }
  };
  var DSDecoderV2 = class {
    /**
     * @param {decoding.Decoder} decoder
     */
    constructor(decoder) {
      this.dsCurrVal = 0;
      this.restDecoder = decoder;
    }
    resetDsCurVal() {
      this.dsCurrVal = 0;
    }
    /**
     * @return {number}
     */
    readDsClock() {
      this.dsCurrVal += readVarUint(this.restDecoder);
      return this.dsCurrVal;
    }
    /**
     * @return {number}
     */
    readDsLen() {
      const diff = readVarUint(this.restDecoder) + 1;
      this.dsCurrVal += diff;
      return diff;
    }
  };
  var UpdateDecoderV2 = class extends DSDecoderV2 {
    /**
     * @param {decoding.Decoder} decoder
     */
    constructor(decoder) {
      super(decoder);
      this.keys = [];
      readVarUint(decoder);
      this.keyClockDecoder = new IntDiffOptRleDecoder(readVarUint8Array(decoder));
      this.clientDecoder = new UintOptRleDecoder(readVarUint8Array(decoder));
      this.leftClockDecoder = new IntDiffOptRleDecoder(readVarUint8Array(decoder));
      this.rightClockDecoder = new IntDiffOptRleDecoder(readVarUint8Array(decoder));
      this.infoDecoder = new RleDecoder(readVarUint8Array(decoder), readUint8);
      this.stringDecoder = new StringDecoder(readVarUint8Array(decoder));
      this.parentInfoDecoder = new RleDecoder(readVarUint8Array(decoder), readUint8);
      this.typeRefDecoder = new UintOptRleDecoder(readVarUint8Array(decoder));
      this.lenDecoder = new UintOptRleDecoder(readVarUint8Array(decoder));
    }
    /**
     * @return {ID}
     */
    readLeftID() {
      return new ID(this.clientDecoder.read(), this.leftClockDecoder.read());
    }
    /**
     * @return {ID}
     */
    readRightID() {
      return new ID(this.clientDecoder.read(), this.rightClockDecoder.read());
    }
    /**
     * Read the next client id.
     * Use this in favor of readID whenever possible to reduce the number of objects created.
     */
    readClient() {
      return this.clientDecoder.read();
    }
    /**
     * @return {number} info An unsigned 8-bit integer
     */
    readInfo() {
      return (
        /** @type {number} */
        this.infoDecoder.read()
      );
    }
    /**
     * @return {string}
     */
    readString() {
      return this.stringDecoder.read();
    }
    /**
     * @return {boolean}
     */
    readParentInfo() {
      return this.parentInfoDecoder.read() === 1;
    }
    /**
     * @return {number} An unsigned 8-bit integer
     */
    readTypeRef() {
      return this.typeRefDecoder.read();
    }
    /**
     * Write len of a struct - well suited for Opt RLE encoder.
     *
     * @return {number}
     */
    readLen() {
      return this.lenDecoder.read();
    }
    /**
     * @return {any}
     */
    readAny() {
      return readAny(this.restDecoder);
    }
    /**
     * @return {Uint8Array}
     */
    readBuf() {
      return readVarUint8Array(this.restDecoder);
    }
    /**
     * This is mainly here for legacy purposes.
     *
     * Initial we incoded objects using JSON. Now we use the much faster lib0/any-encoder. This method mainly exists for legacy purposes for the v1 encoder.
     *
     * @return {any}
     */
    readJSON() {
      return readAny(this.restDecoder);
    }
    /**
     * @return {string}
     */
    readKey() {
      const keyClock = this.keyClockDecoder.read();
      if (keyClock < this.keys.length) {
        return this.keys[keyClock];
      } else {
        const key = this.stringDecoder.read();
        this.keys.push(key);
        return key;
      }
    }
  };
  var DSEncoderV1 = class {
    constructor() {
      this.restEncoder = createEncoder();
    }
    toUint8Array() {
      return toUint8Array(this.restEncoder);
    }
    resetDsCurVal() {
    }
    /**
     * @param {number} clock
     */
    writeDsClock(clock) {
      writeVarUint(this.restEncoder, clock);
    }
    /**
     * @param {number} len
     */
    writeDsLen(len) {
      writeVarUint(this.restEncoder, len);
    }
  };
  var UpdateEncoderV1 = class extends DSEncoderV1 {
    /**
     * @param {ID} id
     */
    writeLeftID(id2) {
      writeVarUint(this.restEncoder, id2.client);
      writeVarUint(this.restEncoder, id2.clock);
    }
    /**
     * @param {ID} id
     */
    writeRightID(id2) {
      writeVarUint(this.restEncoder, id2.client);
      writeVarUint(this.restEncoder, id2.clock);
    }
    /**
     * Use writeClient and writeClock instead of writeID if possible.
     * @param {number} client
     */
    writeClient(client) {
      writeVarUint(this.restEncoder, client);
    }
    /**
     * @param {number} info An unsigned 8-bit integer
     */
    writeInfo(info) {
      writeUint8(this.restEncoder, info);
    }
    /**
     * @param {string} s
     */
    writeString(s) {
      writeVarString(this.restEncoder, s);
    }
    /**
     * @param {boolean} isYKey
     */
    writeParentInfo(isYKey) {
      writeVarUint(this.restEncoder, isYKey ? 1 : 0);
    }
    /**
     * @param {number} info An unsigned 8-bit integer
     */
    writeTypeRef(info) {
      writeVarUint(this.restEncoder, info);
    }
    /**
     * Write len of a struct - well suited for Opt RLE encoder.
     *
     * @param {number} len
     */
    writeLen(len) {
      writeVarUint(this.restEncoder, len);
    }
    /**
     * @param {any} any
     */
    writeAny(any2) {
      writeAny(this.restEncoder, any2);
    }
    /**
     * @param {Uint8Array} buf
     */
    writeBuf(buf) {
      writeVarUint8Array(this.restEncoder, buf);
    }
    /**
     * @param {any} embed
     */
    writeJSON(embed) {
      writeVarString(this.restEncoder, JSON.stringify(embed));
    }
    /**
     * @param {string} key
     */
    writeKey(key) {
      writeVarString(this.restEncoder, key);
    }
  };
  var DSEncoderV2 = class {
    constructor() {
      this.restEncoder = createEncoder();
      this.dsCurrVal = 0;
    }
    toUint8Array() {
      return toUint8Array(this.restEncoder);
    }
    resetDsCurVal() {
      this.dsCurrVal = 0;
    }
    /**
     * @param {number} clock
     */
    writeDsClock(clock) {
      const diff = clock - this.dsCurrVal;
      this.dsCurrVal = clock;
      writeVarUint(this.restEncoder, diff);
    }
    /**
     * @param {number} len
     */
    writeDsLen(len) {
      if (len === 0) {
        unexpectedCase();
      }
      writeVarUint(this.restEncoder, len - 1);
      this.dsCurrVal += len;
    }
  };
  var UpdateEncoderV2 = class extends DSEncoderV2 {
    constructor() {
      super();
      this.keyMap = /* @__PURE__ */ new Map();
      this.keyClock = 0;
      this.keyClockEncoder = new IntDiffOptRleEncoder();
      this.clientEncoder = new UintOptRleEncoder();
      this.leftClockEncoder = new IntDiffOptRleEncoder();
      this.rightClockEncoder = new IntDiffOptRleEncoder();
      this.infoEncoder = new RleEncoder(writeUint8);
      this.stringEncoder = new StringEncoder();
      this.parentInfoEncoder = new RleEncoder(writeUint8);
      this.typeRefEncoder = new UintOptRleEncoder();
      this.lenEncoder = new UintOptRleEncoder();
    }
    toUint8Array() {
      const encoder = createEncoder();
      writeVarUint(encoder, 0);
      writeVarUint8Array(encoder, this.keyClockEncoder.toUint8Array());
      writeVarUint8Array(encoder, this.clientEncoder.toUint8Array());
      writeVarUint8Array(encoder, this.leftClockEncoder.toUint8Array());
      writeVarUint8Array(encoder, this.rightClockEncoder.toUint8Array());
      writeVarUint8Array(encoder, toUint8Array(this.infoEncoder));
      writeVarUint8Array(encoder, this.stringEncoder.toUint8Array());
      writeVarUint8Array(encoder, toUint8Array(this.parentInfoEncoder));
      writeVarUint8Array(encoder, this.typeRefEncoder.toUint8Array());
      writeVarUint8Array(encoder, this.lenEncoder.toUint8Array());
      writeUint8Array(encoder, toUint8Array(this.restEncoder));
      return toUint8Array(encoder);
    }
    /**
     * @param {ID} id
     */
    writeLeftID(id2) {
      this.clientEncoder.write(id2.client);
      this.leftClockEncoder.write(id2.clock);
    }
    /**
     * @param {ID} id
     */
    writeRightID(id2) {
      this.clientEncoder.write(id2.client);
      this.rightClockEncoder.write(id2.clock);
    }
    /**
     * @param {number} client
     */
    writeClient(client) {
      this.clientEncoder.write(client);
    }
    /**
     * @param {number} info An unsigned 8-bit integer
     */
    writeInfo(info) {
      this.infoEncoder.write(info);
    }
    /**
     * @param {string} s
     */
    writeString(s) {
      this.stringEncoder.write(s);
    }
    /**
     * @param {boolean} isYKey
     */
    writeParentInfo(isYKey) {
      this.parentInfoEncoder.write(isYKey ? 1 : 0);
    }
    /**
     * @param {number} info An unsigned 8-bit integer
     */
    writeTypeRef(info) {
      this.typeRefEncoder.write(info);
    }
    /**
     * Write len of a struct - well suited for Opt RLE encoder.
     *
     * @param {number} len
     */
    writeLen(len) {
      this.lenEncoder.write(len);
    }
    /**
     * @param {any} any
     */
    writeAny(any2) {
      writeAny(this.restEncoder, any2);
    }
    /**
     * @param {Uint8Array} buf
     */
    writeBuf(buf) {
      writeVarUint8Array(this.restEncoder, buf);
    }
    /**
     * This is mainly here for legacy purposes.
     *
     * Initial we incoded objects using JSON. Now we use the much faster lib0/any-encoder. This method mainly exists for legacy purposes for the v1 encoder.
     *
     * @param {any} embed
     */
    writeJSON(embed) {
      writeAny(this.restEncoder, embed);
    }
    /**
     * Property keys are often reused. For example, in y-prosemirror the key `bold` might
     * occur very often. For a 3d application, the key `position` might occur very often.
     *
     * We cache these keys in a Map and refer to them via a unique number.
     *
     * @param {string} key
     */
    writeKey(key) {
      const clock = this.keyMap.get(key);
      if (clock === void 0) {
        this.keyClockEncoder.write(this.keyClock++);
        this.stringEncoder.write(key);
      } else {
        this.keyClockEncoder.write(clock);
      }
    }
  };
  var writeStructs = (encoder, structs, client, clock) => {
    clock = max(clock, structs[0].id.clock);
    const startNewStructs = findIndexSS(structs, clock);
    writeVarUint(encoder.restEncoder, structs.length - startNewStructs);
    encoder.writeClient(client);
    writeVarUint(encoder.restEncoder, clock);
    const firstStruct = structs[startNewStructs];
    firstStruct.write(encoder, clock - firstStruct.id.clock);
    for (let i = startNewStructs + 1; i < structs.length; i++) {
      structs[i].write(encoder, 0);
    }
  };
  var writeClientsStructs = (encoder, store2, _sm) => {
    const sm = /* @__PURE__ */ new Map();
    _sm.forEach((clock, client) => {
      if (getState(store2, client) > clock) {
        sm.set(client, clock);
      }
    });
    getStateVector(store2).forEach((_clock, client) => {
      if (!_sm.has(client)) {
        sm.set(client, 0);
      }
    });
    writeVarUint(encoder.restEncoder, sm.size);
    from(sm.entries()).sort((a, b) => b[0] - a[0]).forEach(([client, clock]) => {
      writeStructs(
        encoder,
        /** @type {Array<GC|Item>} */
        store2.clients.get(client),
        client,
        clock
      );
    });
  };
  var readClientsStructRefs = (decoder, doc2) => {
    const clientRefs = create();
    const numOfStateUpdates = readVarUint(decoder.restDecoder);
    for (let i = 0; i < numOfStateUpdates; i++) {
      const numberOfStructs = readVarUint(decoder.restDecoder);
      const refs = new Array(numberOfStructs);
      const client = decoder.readClient();
      let clock = readVarUint(decoder.restDecoder);
      clientRefs.set(client, { i: 0, refs });
      for (let i2 = 0; i2 < numberOfStructs; i2++) {
        const info = decoder.readInfo();
        switch (BITS5 & info) {
          case 0: {
            const len = decoder.readLen();
            refs[i2] = new GC(createID(client, clock), len);
            clock += len;
            break;
          }
          case 10: {
            const len = readVarUint(decoder.restDecoder);
            refs[i2] = new Skip(createID(client, clock), len);
            clock += len;
            break;
          }
          default: {
            const cantCopyParentInfo = (info & (BIT7 | BIT8)) === 0;
            const struct = new Item(
              createID(client, clock),
              null,
              // left
              (info & BIT8) === BIT8 ? decoder.readLeftID() : null,
              // origin
              null,
              // right
              (info & BIT7) === BIT7 ? decoder.readRightID() : null,
              // right origin
              cantCopyParentInfo ? decoder.readParentInfo() ? doc2.get(decoder.readString()) : decoder.readLeftID() : null,
              // parent
              cantCopyParentInfo && (info & BIT6) === BIT6 ? decoder.readString() : null,
              // parentSub
              readItemContent(decoder, info)
              // item content
            );
            refs[i2] = struct;
            clock += struct.length;
          }
        }
      }
    }
    return clientRefs;
  };
  var integrateStructs = (transaction, store2, clientsStructRefs) => {
    const stack = [];
    let clientsStructRefsIds = from(clientsStructRefs.keys()).sort((a, b) => a - b);
    if (clientsStructRefsIds.length === 0) {
      return null;
    }
    const getNextStructTarget = () => {
      if (clientsStructRefsIds.length === 0) {
        return null;
      }
      let nextStructsTarget = (
        /** @type {{i:number,refs:Array<GC|Item>}} */
        clientsStructRefs.get(clientsStructRefsIds[clientsStructRefsIds.length - 1])
      );
      while (nextStructsTarget.refs.length === nextStructsTarget.i) {
        clientsStructRefsIds.pop();
        if (clientsStructRefsIds.length > 0) {
          nextStructsTarget = /** @type {{i:number,refs:Array<GC|Item>}} */
          clientsStructRefs.get(clientsStructRefsIds[clientsStructRefsIds.length - 1]);
        } else {
          return null;
        }
      }
      return nextStructsTarget;
    };
    let curStructsTarget = getNextStructTarget();
    if (curStructsTarget === null) {
      return null;
    }
    const restStructs = new StructStore();
    const missingSV = /* @__PURE__ */ new Map();
    const updateMissingSv = (client, clock) => {
      const mclock = missingSV.get(client);
      if (mclock == null || mclock > clock) {
        missingSV.set(client, clock);
      }
    };
    let stackHead = (
      /** @type {any} */
      curStructsTarget.refs[
        /** @type {any} */
        curStructsTarget.i++
      ]
    );
    const state = /* @__PURE__ */ new Map();
    const addStackToRestSS = () => {
      for (const item of stack) {
        const client = item.id.client;
        const inapplicableItems = clientsStructRefs.get(client);
        if (inapplicableItems) {
          inapplicableItems.i--;
          restStructs.clients.set(client, inapplicableItems.refs.slice(inapplicableItems.i));
          clientsStructRefs.delete(client);
          inapplicableItems.i = 0;
          inapplicableItems.refs = [];
        } else {
          restStructs.clients.set(client, [item]);
        }
        clientsStructRefsIds = clientsStructRefsIds.filter((c) => c !== client);
      }
      stack.length = 0;
    };
    while (true) {
      if (stackHead.constructor !== Skip) {
        const localClock = setIfUndefined(state, stackHead.id.client, () => getState(store2, stackHead.id.client));
        const offset = localClock - stackHead.id.clock;
        if (offset < 0) {
          stack.push(stackHead);
          updateMissingSv(stackHead.id.client, stackHead.id.clock - 1);
          addStackToRestSS();
        } else {
          const missing = stackHead.getMissing(transaction, store2);
          if (missing !== null) {
            stack.push(stackHead);
            const structRefs = clientsStructRefs.get(
              /** @type {number} */
              missing
            ) || { refs: [], i: 0 };
            if (structRefs.refs.length === structRefs.i) {
              updateMissingSv(
                /** @type {number} */
                missing,
                getState(store2, missing)
              );
              addStackToRestSS();
            } else {
              stackHead = structRefs.refs[structRefs.i++];
              continue;
            }
          } else if (offset === 0 || offset < stackHead.length) {
            stackHead.integrate(transaction, offset);
            state.set(stackHead.id.client, stackHead.id.clock + stackHead.length);
          }
        }
      }
      if (stack.length > 0) {
        stackHead = /** @type {GC|Item} */
        stack.pop();
      } else if (curStructsTarget !== null && curStructsTarget.i < curStructsTarget.refs.length) {
        stackHead = /** @type {GC|Item} */
        curStructsTarget.refs[curStructsTarget.i++];
      } else {
        curStructsTarget = getNextStructTarget();
        if (curStructsTarget === null) {
          break;
        } else {
          stackHead = /** @type {GC|Item} */
          curStructsTarget.refs[curStructsTarget.i++];
        }
      }
    }
    if (restStructs.clients.size > 0) {
      const encoder = new UpdateEncoderV2();
      writeClientsStructs(encoder, restStructs, /* @__PURE__ */ new Map());
      writeVarUint(encoder.restEncoder, 0);
      return { missing: missingSV, update: encoder.toUint8Array() };
    }
    return null;
  };
  var writeStructsFromTransaction = (encoder, transaction) => writeClientsStructs(encoder, transaction.doc.store, transaction.beforeState);
  var readUpdateV2 = (decoder, ydoc, transactionOrigin, structDecoder = new UpdateDecoderV2(decoder)) => transact(ydoc, (transaction) => {
    transaction.local = false;
    let retry = false;
    const doc2 = transaction.doc;
    const store2 = doc2.store;
    const ss = readClientsStructRefs(structDecoder, doc2);
    const restStructs = integrateStructs(transaction, store2, ss);
    const pending = store2.pendingStructs;
    if (pending) {
      for (const [client, clock] of pending.missing) {
        if (clock < getState(store2, client)) {
          retry = true;
          break;
        }
      }
      if (restStructs) {
        for (const [client, clock] of restStructs.missing) {
          const mclock = pending.missing.get(client);
          if (mclock == null || mclock > clock) {
            pending.missing.set(client, clock);
          }
        }
        pending.update = mergeUpdatesV2([pending.update, restStructs.update]);
      }
    } else {
      store2.pendingStructs = restStructs;
    }
    const dsRest = readAndApplyDeleteSet(structDecoder, transaction, store2);
    if (store2.pendingDs) {
      const pendingDSUpdate = new UpdateDecoderV2(createDecoder(store2.pendingDs));
      readVarUint(pendingDSUpdate.restDecoder);
      const dsRest2 = readAndApplyDeleteSet(pendingDSUpdate, transaction, store2);
      if (dsRest && dsRest2) {
        store2.pendingDs = mergeUpdatesV2([dsRest, dsRest2]);
      } else {
        store2.pendingDs = dsRest || dsRest2;
      }
    } else {
      store2.pendingDs = dsRest;
    }
    if (retry) {
      const update = (
        /** @type {{update: Uint8Array}} */
        store2.pendingStructs.update
      );
      store2.pendingStructs = null;
      applyUpdateV2(transaction.doc, update);
    }
  }, transactionOrigin, false);
  var readUpdate = (decoder, ydoc, transactionOrigin) => readUpdateV2(decoder, ydoc, transactionOrigin, new UpdateDecoderV1(decoder));
  var applyUpdateV2 = (ydoc, update, transactionOrigin, YDecoder = UpdateDecoderV2) => {
    const decoder = createDecoder(update);
    readUpdateV2(decoder, ydoc, transactionOrigin, new YDecoder(decoder));
  };
  var applyUpdate = (ydoc, update, transactionOrigin) => applyUpdateV2(ydoc, update, transactionOrigin, UpdateDecoderV1);
  var writeStateAsUpdate = (encoder, doc2, targetStateVector = /* @__PURE__ */ new Map()) => {
    writeClientsStructs(encoder, doc2.store, targetStateVector);
    writeDeleteSet(encoder, createDeleteSetFromStructStore(doc2.store));
  };
  var encodeStateAsUpdateV2 = (doc2, encodedTargetStateVector = new Uint8Array([0]), encoder = new UpdateEncoderV2()) => {
    const targetStateVector = decodeStateVector(encodedTargetStateVector);
    writeStateAsUpdate(encoder, doc2, targetStateVector);
    const updates = [encoder.toUint8Array()];
    if (doc2.store.pendingDs) {
      updates.push(doc2.store.pendingDs);
    }
    if (doc2.store.pendingStructs) {
      updates.push(diffUpdateV2(doc2.store.pendingStructs.update, encodedTargetStateVector));
    }
    if (updates.length > 1) {
      if (encoder.constructor === UpdateEncoderV1) {
        return mergeUpdates(updates.map((update, i) => i === 0 ? update : convertUpdateFormatV2ToV1(update)));
      } else if (encoder.constructor === UpdateEncoderV2) {
        return mergeUpdatesV2(updates);
      }
    }
    return updates[0];
  };
  var encodeStateAsUpdate = (doc2, encodedTargetStateVector) => encodeStateAsUpdateV2(doc2, encodedTargetStateVector, new UpdateEncoderV1());
  var readStateVector = (decoder) => {
    const ss = /* @__PURE__ */ new Map();
    const ssLength = readVarUint(decoder.restDecoder);
    for (let i = 0; i < ssLength; i++) {
      const client = readVarUint(decoder.restDecoder);
      const clock = readVarUint(decoder.restDecoder);
      ss.set(client, clock);
    }
    return ss;
  };
  var decodeStateVector = (decodedState) => readStateVector(new DSDecoderV1(createDecoder(decodedState)));
  var writeStateVector = (encoder, sv) => {
    writeVarUint(encoder.restEncoder, sv.size);
    from(sv.entries()).sort((a, b) => b[0] - a[0]).forEach(([client, clock]) => {
      writeVarUint(encoder.restEncoder, client);
      writeVarUint(encoder.restEncoder, clock);
    });
    return encoder;
  };
  var writeDocumentStateVector = (encoder, doc2) => writeStateVector(encoder, getStateVector(doc2.store));
  var encodeStateVectorV2 = (doc2, encoder = new DSEncoderV2()) => {
    if (doc2 instanceof Map) {
      writeStateVector(encoder, doc2);
    } else {
      writeDocumentStateVector(encoder, doc2);
    }
    return encoder.toUint8Array();
  };
  var encodeStateVector = (doc2) => encodeStateVectorV2(doc2, new DSEncoderV1());
  var EventHandler = class {
    constructor() {
      this.l = [];
    }
  };
  var createEventHandler = () => new EventHandler();
  var addEventHandlerListener = (eventHandler, f) => eventHandler.l.push(f);
  var removeEventHandlerListener = (eventHandler, f) => {
    const l = eventHandler.l;
    const len = l.length;
    eventHandler.l = l.filter((g) => f !== g);
    if (len === eventHandler.l.length) {
      console.error("[yjs] Tried to remove event handler that doesn't exist.");
    }
  };
  var callEventHandlerListeners = (eventHandler, arg0, arg1) => callAll(eventHandler.l, [arg0, arg1]);
  var ID = class {
    /**
     * @param {number} client client id
     * @param {number} clock unique per client id, continuous number
     */
    constructor(client, clock) {
      this.client = client;
      this.clock = clock;
    }
  };
  var compareIDs = (a, b) => a === b || a !== null && b !== null && a.client === b.client && a.clock === b.clock;
  var createID = (client, clock) => new ID(client, clock);
  var writeID = (encoder, id2) => {
    writeVarUint(encoder, id2.client);
    writeVarUint(encoder, id2.clock);
  };
  var readID = (decoder) => createID(readVarUint(decoder), readVarUint(decoder));
  var findRootTypeKey = (type) => {
    for (const [key, value] of type.doc.share.entries()) {
      if (value === type) {
        return key;
      }
    }
    throw unexpectedCase();
  };
  var isParentOf = (parent, child) => {
    while (child !== null) {
      if (child.parent === parent) {
        return true;
      }
      child = /** @type {AbstractType<any>} */
      child.parent._item;
    }
    return false;
  };
  var logType = (type) => {
    const res = [];
    let n = type._start;
    while (n) {
      res.push(n);
      n = n.right;
    }
    console.log("Children: ", res);
    console.log("Children content: ", res.filter((m) => !m.deleted).map((m) => m.content));
  };
  var PermanentUserData = class {
    /**
     * @param {Doc} doc
     * @param {YMap<any>} [storeType]
     */
    constructor(doc2, storeType = doc2.getMap("users")) {
      const dss = /* @__PURE__ */ new Map();
      this.yusers = storeType;
      this.doc = doc2;
      this.clients = /* @__PURE__ */ new Map();
      this.dss = dss;
      const initUser = (user, userDescription) => {
        const ds = user.get("ds");
        const ids = user.get("ids");
        const addClientId = (
          /** @param {number} clientid */
          (clientid) => this.clients.set(clientid, userDescription)
        );
        ds.observe(
          /** @param {YArrayEvent<any>} event */
          (event) => {
            event.changes.added.forEach((item) => {
              item.content.getContent().forEach((encodedDs) => {
                if (encodedDs instanceof Uint8Array) {
                  this.dss.set(userDescription, mergeDeleteSets([this.dss.get(userDescription) || createDeleteSet(), readDeleteSet(new DSDecoderV1(createDecoder(encodedDs)))]));
                }
              });
            });
          }
        );
        this.dss.set(userDescription, mergeDeleteSets(ds.map((encodedDs) => readDeleteSet(new DSDecoderV1(createDecoder(encodedDs))))));
        ids.observe(
          /** @param {YArrayEvent<any>} event */
          (event) => event.changes.added.forEach((item) => item.content.getContent().forEach(addClientId))
        );
        ids.forEach(addClientId);
      };
      storeType.observe((event) => {
        event.keysChanged.forEach(
          (userDescription) => initUser(storeType.get(userDescription), userDescription)
        );
      });
      storeType.forEach(initUser);
    }
    /**
     * @param {Doc} doc
     * @param {number} clientid
     * @param {string} userDescription
     * @param {Object} conf
     * @param {function(Transaction, DeleteSet):boolean} [conf.filter]
     */
    setUserMapping(doc2, clientid, userDescription, { filter = () => true } = {}) {
      const users2 = this.yusers;
      let user = users2.get(userDescription);
      if (!user) {
        user = new YMap();
        user.set("ids", new YArray());
        user.set("ds", new YArray());
        users2.set(userDescription, user);
      }
      user.get("ids").push([clientid]);
      users2.observe((_event) => {
        setTimeout(() => {
          const userOverwrite = users2.get(userDescription);
          if (userOverwrite !== user) {
            user = userOverwrite;
            this.clients.forEach((_userDescription, clientid2) => {
              if (userDescription === _userDescription) {
                user.get("ids").push([clientid2]);
              }
            });
            const encoder = new DSEncoderV1();
            const ds = this.dss.get(userDescription);
            if (ds) {
              writeDeleteSet(encoder, ds);
              user.get("ds").push([encoder.toUint8Array()]);
            }
          }
        }, 0);
      });
      doc2.on(
        "afterTransaction",
        /** @param {Transaction} transaction */
        (transaction) => {
          setTimeout(() => {
            const yds = user.get("ds");
            const ds = transaction.deleteSet;
            if (transaction.local && ds.clients.size > 0 && filter(transaction, ds)) {
              const encoder = new DSEncoderV1();
              writeDeleteSet(encoder, ds);
              yds.push([encoder.toUint8Array()]);
            }
          });
        }
      );
    }
    /**
     * @param {number} clientid
     * @return {any}
     */
    getUserByClientId(clientid) {
      return this.clients.get(clientid) || null;
    }
    /**
     * @param {ID} id
     * @return {string | null}
     */
    getUserByDeletedId(id2) {
      for (const [userDescription, ds] of this.dss.entries()) {
        if (isDeleted(ds, id2)) {
          return userDescription;
        }
      }
      return null;
    }
  };
  var RelativePosition = class {
    /**
     * @param {ID|null} type
     * @param {string|null} tname
     * @param {ID|null} item
     * @param {number} assoc
     */
    constructor(type, tname, item, assoc = 0) {
      this.type = type;
      this.tname = tname;
      this.item = item;
      this.assoc = assoc;
    }
  };
  var relativePositionToJSON = (rpos) => {
    const json = {};
    if (rpos.type) {
      json.type = rpos.type;
    }
    if (rpos.tname) {
      json.tname = rpos.tname;
    }
    if (rpos.item) {
      json.item = rpos.item;
    }
    if (rpos.assoc != null) {
      json.assoc = rpos.assoc;
    }
    return json;
  };
  var createRelativePositionFromJSON = (json) => new RelativePosition(json.type == null ? null : createID(json.type.client, json.type.clock), json.tname ?? null, json.item == null ? null : createID(json.item.client, json.item.clock), json.assoc == null ? 0 : json.assoc);
  var AbsolutePosition = class {
    /**
     * @param {AbstractType<any>} type
     * @param {number} index
     * @param {number} [assoc]
     */
    constructor(type, index, assoc = 0) {
      this.type = type;
      this.index = index;
      this.assoc = assoc;
    }
  };
  var createAbsolutePosition = (type, index, assoc = 0) => new AbsolutePosition(type, index, assoc);
  var createRelativePosition = (type, item, assoc) => {
    let typeid = null;
    let tname = null;
    if (type._item === null) {
      tname = findRootTypeKey(type);
    } else {
      typeid = createID(type._item.id.client, type._item.id.clock);
    }
    return new RelativePosition(typeid, tname, item, assoc);
  };
  var createRelativePositionFromTypeIndex = (type, index, assoc = 0) => {
    let t = type._start;
    if (assoc < 0) {
      if (index === 0) {
        return createRelativePosition(type, null, assoc);
      }
      index--;
    }
    while (t !== null) {
      if (!t.deleted && t.countable) {
        if (t.length > index) {
          return createRelativePosition(type, createID(t.id.client, t.id.clock + index), assoc);
        }
        index -= t.length;
      }
      if (t.right === null && assoc < 0) {
        return createRelativePosition(type, t.lastId, assoc);
      }
      t = t.right;
    }
    return createRelativePosition(type, null, assoc);
  };
  var writeRelativePosition = (encoder, rpos) => {
    const { type, tname, item, assoc } = rpos;
    if (item !== null) {
      writeVarUint(encoder, 0);
      writeID(encoder, item);
    } else if (tname !== null) {
      writeUint8(encoder, 1);
      writeVarString(encoder, tname);
    } else if (type !== null) {
      writeUint8(encoder, 2);
      writeID(encoder, type);
    } else {
      throw unexpectedCase();
    }
    writeVarInt(encoder, assoc);
    return encoder;
  };
  var encodeRelativePosition = (rpos) => {
    const encoder = createEncoder();
    writeRelativePosition(encoder, rpos);
    return toUint8Array(encoder);
  };
  var readRelativePosition = (decoder) => {
    let type = null;
    let tname = null;
    let itemID = null;
    switch (readVarUint(decoder)) {
      case 0:
        itemID = readID(decoder);
        break;
      case 1:
        tname = readVarString(decoder);
        break;
      case 2: {
        type = readID(decoder);
      }
    }
    const assoc = hasContent(decoder) ? readVarInt(decoder) : 0;
    return new RelativePosition(type, tname, itemID, assoc);
  };
  var decodeRelativePosition = (uint8Array) => readRelativePosition(createDecoder(uint8Array));
  var getItemWithOffset = (store2, id2) => {
    const item = getItem(store2, id2);
    const diff = id2.clock - item.id.clock;
    return {
      item,
      diff
    };
  };
  var createAbsolutePositionFromRelativePosition = (rpos, doc2, followUndoneDeletions = true) => {
    const store2 = doc2.store;
    const rightID = rpos.item;
    const typeID = rpos.type;
    const tname = rpos.tname;
    const assoc = rpos.assoc;
    let type = null;
    let index = 0;
    if (rightID !== null) {
      if (getState(store2, rightID.client) <= rightID.clock) {
        return null;
      }
      const res = followUndoneDeletions ? followRedone(store2, rightID) : getItemWithOffset(store2, rightID);
      const right = res.item;
      if (!(right instanceof Item)) {
        return null;
      }
      type = /** @type {AbstractType<any>} */
      right.parent;
      if (type._item === null || !type._item.deleted) {
        index = right.deleted || !right.countable ? 0 : res.diff + (assoc >= 0 ? 0 : 1);
        let n = right.left;
        while (n !== null) {
          if (!n.deleted && n.countable) {
            index += n.length;
          }
          n = n.left;
        }
      }
    } else {
      if (tname !== null) {
        type = doc2.get(tname);
      } else if (typeID !== null) {
        if (getState(store2, typeID.client) <= typeID.clock) {
          return null;
        }
        const { item } = followUndoneDeletions ? followRedone(store2, typeID) : { item: getItem(store2, typeID) };
        if (item instanceof Item && item.content instanceof ContentType) {
          type = item.content.type;
        } else {
          return null;
        }
      } else {
        throw unexpectedCase();
      }
      if (assoc >= 0) {
        index = type._length;
      } else {
        index = 0;
      }
    }
    return createAbsolutePosition(type, index, rpos.assoc);
  };
  var compareRelativePositions = (a, b) => a === b || a !== null && b !== null && a.tname === b.tname && compareIDs(a.item, b.item) && compareIDs(a.type, b.type) && a.assoc === b.assoc;
  var Snapshot = class {
    /**
     * @param {DeleteSet} ds
     * @param {Map<number,number>} sv state map
     */
    constructor(ds, sv) {
      this.ds = ds;
      this.sv = sv;
    }
  };
  var equalSnapshots = (snap1, snap2) => {
    const ds1 = snap1.ds.clients;
    const ds2 = snap2.ds.clients;
    const sv1 = snap1.sv;
    const sv2 = snap2.sv;
    if (sv1.size !== sv2.size || ds1.size !== ds2.size) {
      return false;
    }
    for (const [key, value] of sv1.entries()) {
      if (sv2.get(key) !== value) {
        return false;
      }
    }
    for (const [client, dsitems1] of ds1.entries()) {
      const dsitems2 = ds2.get(client) || [];
      if (dsitems1.length !== dsitems2.length) {
        return false;
      }
      for (let i = 0; i < dsitems1.length; i++) {
        const dsitem1 = dsitems1[i];
        const dsitem2 = dsitems2[i];
        if (dsitem1.clock !== dsitem2.clock || dsitem1.len !== dsitem2.len) {
          return false;
        }
      }
    }
    return true;
  };
  var encodeSnapshotV2 = (snapshot2, encoder = new DSEncoderV2()) => {
    writeDeleteSet(encoder, snapshot2.ds);
    writeStateVector(encoder, snapshot2.sv);
    return encoder.toUint8Array();
  };
  var encodeSnapshot = (snapshot2) => encodeSnapshotV2(snapshot2, new DSEncoderV1());
  var decodeSnapshotV2 = (buf, decoder = new DSDecoderV2(createDecoder(buf))) => {
    return new Snapshot(readDeleteSet(decoder), readStateVector(decoder));
  };
  var decodeSnapshot = (buf) => decodeSnapshotV2(buf, new DSDecoderV1(createDecoder(buf)));
  var createSnapshot = (ds, sm) => new Snapshot(ds, sm);
  var emptySnapshot = createSnapshot(createDeleteSet(), /* @__PURE__ */ new Map());
  var snapshot = (doc2) => createSnapshot(createDeleteSetFromStructStore(doc2.store), getStateVector(doc2.store));
  var isVisible = (item, snapshot2) => snapshot2 === void 0 ? !item.deleted : snapshot2.sv.has(item.id.client) && (snapshot2.sv.get(item.id.client) || 0) > item.id.clock && !isDeleted(snapshot2.ds, item.id);
  var splitSnapshotAffectedStructs = (transaction, snapshot2) => {
    const meta = setIfUndefined(transaction.meta, splitSnapshotAffectedStructs, create2);
    const store2 = transaction.doc.store;
    if (!meta.has(snapshot2)) {
      snapshot2.sv.forEach((clock, client) => {
        if (clock < getState(store2, client)) {
          getItemCleanStart(transaction, createID(client, clock));
        }
      });
      iterateDeletedStructs(transaction, snapshot2.ds, (_item) => {
      });
      meta.add(snapshot2);
    }
  };
  var createDocFromSnapshot = (originDoc, snapshot2, newDoc = new Doc()) => {
    if (originDoc.gc) {
      throw new Error("Garbage-collection must be disabled in `originDoc`!");
    }
    const { sv, ds } = snapshot2;
    const encoder = new UpdateEncoderV2();
    originDoc.transact((transaction) => {
      let size2 = 0;
      sv.forEach((clock) => {
        if (clock > 0) {
          size2++;
        }
      });
      writeVarUint(encoder.restEncoder, size2);
      for (const [client, clock] of sv) {
        if (clock === 0) {
          continue;
        }
        if (clock < getState(originDoc.store, client)) {
          getItemCleanStart(transaction, createID(client, clock));
        }
        const structs = originDoc.store.clients.get(client) || [];
        const lastStructIndex = findIndexSS(structs, clock - 1);
        writeVarUint(encoder.restEncoder, lastStructIndex + 1);
        encoder.writeClient(client);
        writeVarUint(encoder.restEncoder, 0);
        for (let i = 0; i <= lastStructIndex; i++) {
          structs[i].write(encoder, 0);
        }
      }
      writeDeleteSet(encoder, ds);
    });
    applyUpdateV2(newDoc, encoder.toUint8Array(), "snapshot");
    return newDoc;
  };
  var snapshotContainsUpdateV2 = (snapshot2, update, YDecoder = UpdateDecoderV2) => {
    const updateDecoder = new YDecoder(createDecoder(update));
    const lazyDecoder = new LazyStructReader(updateDecoder, false);
    for (let curr = lazyDecoder.curr; curr !== null; curr = lazyDecoder.next()) {
      if ((snapshot2.sv.get(curr.id.client) || 0) < curr.id.clock + curr.length) {
        return false;
      }
    }
    const mergedDS = mergeDeleteSets([snapshot2.ds, readDeleteSet(updateDecoder)]);
    return equalDeleteSets(snapshot2.ds, mergedDS);
  };
  var snapshotContainsUpdate = (snapshot2, update) => snapshotContainsUpdateV2(snapshot2, update, UpdateDecoderV1);
  var StructStore = class {
    constructor() {
      this.clients = /* @__PURE__ */ new Map();
      this.pendingStructs = null;
      this.pendingDs = null;
    }
  };
  var getStateVector = (store2) => {
    const sm = /* @__PURE__ */ new Map();
    store2.clients.forEach((structs, client) => {
      const struct = structs[structs.length - 1];
      sm.set(client, struct.id.clock + struct.length);
    });
    return sm;
  };
  var getState = (store2, client) => {
    const structs = store2.clients.get(client);
    if (structs === void 0) {
      return 0;
    }
    const lastStruct = structs[structs.length - 1];
    return lastStruct.id.clock + lastStruct.length;
  };
  var addStruct = (store2, struct) => {
    let structs = store2.clients.get(struct.id.client);
    if (structs === void 0) {
      structs = [];
      store2.clients.set(struct.id.client, structs);
    } else {
      const lastStruct = structs[structs.length - 1];
      if (lastStruct.id.clock + lastStruct.length !== struct.id.clock) {
        throw unexpectedCase();
      }
    }
    structs.push(struct);
  };
  var findIndexSS = (structs, clock) => {
    let left = 0;
    let right = structs.length - 1;
    let mid = structs[right];
    let midclock = mid.id.clock;
    if (midclock === clock) {
      return right;
    }
    let midindex = floor(clock / (midclock + mid.length - 1) * right);
    while (left <= right) {
      mid = structs[midindex];
      midclock = mid.id.clock;
      if (midclock <= clock) {
        if (clock < midclock + mid.length) {
          return midindex;
        }
        left = midindex + 1;
      } else {
        right = midindex - 1;
      }
      midindex = floor((left + right) / 2);
    }
    throw unexpectedCase();
  };
  var find = (store2, id2) => {
    const structs = store2.clients.get(id2.client);
    return structs[findIndexSS(structs, id2.clock)];
  };
  var getItem = (
    /** @type {function(StructStore,ID):Item} */
    find
  );
  var findIndexCleanStart = (transaction, structs, clock) => {
    const index = findIndexSS(structs, clock);
    const struct = structs[index];
    if (struct.id.clock < clock && struct instanceof Item) {
      structs.splice(index + 1, 0, splitItem(transaction, struct, clock - struct.id.clock));
      return index + 1;
    }
    return index;
  };
  var getItemCleanStart = (transaction, id2) => {
    const structs = (
      /** @type {Array<Item>} */
      transaction.doc.store.clients.get(id2.client)
    );
    return structs[findIndexCleanStart(transaction, structs, id2.clock)];
  };
  var getItemCleanEnd = (transaction, store2, id2) => {
    const structs = store2.clients.get(id2.client);
    const index = findIndexSS(structs, id2.clock);
    const struct = structs[index];
    if (id2.clock !== struct.id.clock + struct.length - 1 && struct.constructor !== GC) {
      structs.splice(index + 1, 0, splitItem(transaction, struct, id2.clock - struct.id.clock + 1));
    }
    return struct;
  };
  var replaceStruct = (store2, struct, newStruct) => {
    const structs = (
      /** @type {Array<GC|Item>} */
      store2.clients.get(struct.id.client)
    );
    structs[findIndexSS(structs, struct.id.clock)] = newStruct;
  };
  var iterateStructs = (transaction, structs, clockStart, len, f) => {
    if (len === 0) {
      return;
    }
    const clockEnd = clockStart + len;
    let index = findIndexCleanStart(transaction, structs, clockStart);
    let struct;
    do {
      struct = structs[index++];
      if (clockEnd < struct.id.clock + struct.length) {
        findIndexCleanStart(transaction, structs, clockEnd);
      }
      f(struct);
    } while (index < structs.length && structs[index].id.clock < clockEnd);
  };
  var Transaction = class {
    /**
     * @param {Doc} doc
     * @param {any} origin
     * @param {boolean} local
     */
    constructor(doc2, origin2, local) {
      this.doc = doc2;
      this.deleteSet = new DeleteSet();
      this.beforeState = getStateVector(doc2.store);
      this.afterState = /* @__PURE__ */ new Map();
      this.changed = /* @__PURE__ */ new Map();
      this.changedParentTypes = /* @__PURE__ */ new Map();
      this._mergeStructs = [];
      this.origin = origin2;
      this.meta = /* @__PURE__ */ new Map();
      this.local = local;
      this.subdocsAdded = /* @__PURE__ */ new Set();
      this.subdocsRemoved = /* @__PURE__ */ new Set();
      this.subdocsLoaded = /* @__PURE__ */ new Set();
      this._needFormattingCleanup = false;
    }
  };
  var writeUpdateMessageFromTransaction = (encoder, transaction) => {
    if (transaction.deleteSet.clients.size === 0 && !any(transaction.afterState, (clock, client) => transaction.beforeState.get(client) !== clock)) {
      return false;
    }
    sortAndMergeDeleteSet(transaction.deleteSet);
    writeStructsFromTransaction(encoder, transaction);
    writeDeleteSet(encoder, transaction.deleteSet);
    return true;
  };
  var addChangedTypeToTransaction = (transaction, type, parentSub) => {
    const item = type._item;
    if (item === null || item.id.clock < (transaction.beforeState.get(item.id.client) || 0) && !item.deleted) {
      setIfUndefined(transaction.changed, type, create2).add(parentSub);
    }
  };
  var tryToMergeWithLefts = (structs, pos) => {
    let right = structs[pos];
    let left = structs[pos - 1];
    let i = pos;
    for (; i > 0; right = left, left = structs[--i - 1]) {
      if (left.deleted === right.deleted && left.constructor === right.constructor) {
        if (left.mergeWith(right)) {
          if (right instanceof Item && right.parentSub !== null && /** @type {AbstractType<any>} */
          right.parent._map.get(right.parentSub) === right) {
            right.parent._map.set(
              right.parentSub,
              /** @type {Item} */
              left
            );
          }
          continue;
        }
      }
      break;
    }
    const merged = pos - i;
    if (merged) {
      structs.splice(pos + 1 - merged, merged);
    }
    return merged;
  };
  var tryGcDeleteSet = (ds, store2, gcFilter) => {
    for (const [client, deleteItems] of ds.clients.entries()) {
      const structs = (
        /** @type {Array<GC|Item>} */
        store2.clients.get(client)
      );
      for (let di = deleteItems.length - 1; di >= 0; di--) {
        const deleteItem = deleteItems[di];
        const endDeleteItemClock = deleteItem.clock + deleteItem.len;
        for (let si = findIndexSS(structs, deleteItem.clock), struct = structs[si]; si < structs.length && struct.id.clock < endDeleteItemClock; struct = structs[++si]) {
          const struct2 = structs[si];
          if (deleteItem.clock + deleteItem.len <= struct2.id.clock) {
            break;
          }
          if (struct2 instanceof Item && struct2.deleted && !struct2.keep && gcFilter(struct2)) {
            struct2.gc(store2, false);
          }
        }
      }
    }
  };
  var tryMergeDeleteSet = (ds, store2) => {
    ds.clients.forEach((deleteItems, client) => {
      const structs = (
        /** @type {Array<GC|Item>} */
        store2.clients.get(client)
      );
      for (let di = deleteItems.length - 1; di >= 0; di--) {
        const deleteItem = deleteItems[di];
        const mostRightIndexToCheck = min(structs.length - 1, 1 + findIndexSS(structs, deleteItem.clock + deleteItem.len - 1));
        for (let si = mostRightIndexToCheck, struct = structs[si]; si > 0 && struct.id.clock >= deleteItem.clock; struct = structs[si]) {
          si -= 1 + tryToMergeWithLefts(structs, si);
        }
      }
    });
  };
  var tryGc = (ds, store2, gcFilter) => {
    tryGcDeleteSet(ds, store2, gcFilter);
    tryMergeDeleteSet(ds, store2);
  };
  var cleanupTransactions = (transactionCleanups, i) => {
    if (i < transactionCleanups.length) {
      const transaction = transactionCleanups[i];
      const doc2 = transaction.doc;
      const store2 = doc2.store;
      const ds = transaction.deleteSet;
      const mergeStructs = transaction._mergeStructs;
      try {
        sortAndMergeDeleteSet(ds);
        transaction.afterState = getStateVector(transaction.doc.store);
        doc2.emit("beforeObserverCalls", [transaction, doc2]);
        const fs = [];
        transaction.changed.forEach(
          (subs, itemtype) => fs.push(() => {
            if (itemtype._item === null || !itemtype._item.deleted) {
              itemtype._callObserver(transaction, subs);
            }
          })
        );
        fs.push(() => {
          transaction.changedParentTypes.forEach((events, type) => {
            if (type._dEH.l.length > 0 && (type._item === null || !type._item.deleted)) {
              events = events.filter(
                (event) => event.target._item === null || !event.target._item.deleted
              );
              events.forEach((event) => {
                event.currentTarget = type;
                event._path = null;
              });
              events.sort((event1, event2) => event1.path.length - event2.path.length);
              fs.push(() => {
                callEventHandlerListeners(type._dEH, events, transaction);
              });
            }
          });
          fs.push(() => doc2.emit("afterTransaction", [transaction, doc2]));
          fs.push(() => {
            if (transaction._needFormattingCleanup) {
              cleanupYTextAfterTransaction(transaction);
            }
          });
        });
        callAll(fs, []);
      } finally {
        if (doc2.gc) {
          tryGcDeleteSet(ds, store2, doc2.gcFilter);
        }
        tryMergeDeleteSet(ds, store2);
        transaction.afterState.forEach((clock, client) => {
          const beforeClock = transaction.beforeState.get(client) || 0;
          if (beforeClock !== clock) {
            const structs = (
              /** @type {Array<GC|Item>} */
              store2.clients.get(client)
            );
            const firstChangePos = max(findIndexSS(structs, beforeClock), 1);
            for (let i2 = structs.length - 1; i2 >= firstChangePos; ) {
              i2 -= 1 + tryToMergeWithLefts(structs, i2);
            }
          }
        });
        for (let i2 = mergeStructs.length - 1; i2 >= 0; i2--) {
          const { client, clock } = mergeStructs[i2].id;
          const structs = (
            /** @type {Array<GC|Item>} */
            store2.clients.get(client)
          );
          const replacedStructPos = findIndexSS(structs, clock);
          if (replacedStructPos + 1 < structs.length) {
            if (tryToMergeWithLefts(structs, replacedStructPos + 1) > 1) {
              continue;
            }
          }
          if (replacedStructPos > 0) {
            tryToMergeWithLefts(structs, replacedStructPos);
          }
        }
        if (!transaction.local && transaction.afterState.get(doc2.clientID) !== transaction.beforeState.get(doc2.clientID)) {
          print(ORANGE, BOLD, "[yjs] ", UNBOLD, RED, "Changed the client-id because another client seems to be using it.");
          doc2.clientID = generateNewClientId();
        }
        doc2.emit("afterTransactionCleanup", [transaction, doc2]);
        if (doc2._observers.has("update")) {
          const encoder = new UpdateEncoderV1();
          const hasContent2 = writeUpdateMessageFromTransaction(encoder, transaction);
          if (hasContent2) {
            doc2.emit("update", [encoder.toUint8Array(), transaction.origin, doc2, transaction]);
          }
        }
        if (doc2._observers.has("updateV2")) {
          const encoder = new UpdateEncoderV2();
          const hasContent2 = writeUpdateMessageFromTransaction(encoder, transaction);
          if (hasContent2) {
            doc2.emit("updateV2", [encoder.toUint8Array(), transaction.origin, doc2, transaction]);
          }
        }
        const { subdocsAdded, subdocsLoaded, subdocsRemoved } = transaction;
        if (subdocsAdded.size > 0 || subdocsRemoved.size > 0 || subdocsLoaded.size > 0) {
          subdocsAdded.forEach((subdoc) => {
            subdoc.clientID = doc2.clientID;
            if (subdoc.collectionid == null) {
              subdoc.collectionid = doc2.collectionid;
            }
            doc2.subdocs.add(subdoc);
          });
          subdocsRemoved.forEach((subdoc) => doc2.subdocs.delete(subdoc));
          doc2.emit("subdocs", [{ loaded: subdocsLoaded, added: subdocsAdded, removed: subdocsRemoved }, doc2, transaction]);
          subdocsRemoved.forEach((subdoc) => subdoc.destroy());
        }
        if (transactionCleanups.length <= i + 1) {
          doc2._transactionCleanups = [];
          doc2.emit("afterAllTransactions", [doc2, transactionCleanups]);
        } else {
          cleanupTransactions(transactionCleanups, i + 1);
        }
      }
    }
  };
  var transact = (doc2, f, origin2 = null, local = true) => {
    const transactionCleanups = doc2._transactionCleanups;
    let initialCall = false;
    let result = null;
    if (doc2._transaction === null) {
      initialCall = true;
      doc2._transaction = new Transaction(doc2, origin2, local);
      transactionCleanups.push(doc2._transaction);
      if (transactionCleanups.length === 1) {
        doc2.emit("beforeAllTransactions", [doc2]);
      }
      doc2.emit("beforeTransaction", [doc2._transaction, doc2]);
    }
    try {
      result = f(doc2._transaction);
    } finally {
      if (initialCall) {
        const finishCleanup = doc2._transaction === transactionCleanups[0];
        doc2._transaction = null;
        if (finishCleanup) {
          cleanupTransactions(transactionCleanups, 0);
        }
      }
    }
    return result;
  };
  var StackItem = class {
    /**
     * @param {DeleteSet} deletions
     * @param {DeleteSet} insertions
     */
    constructor(deletions, insertions) {
      this.insertions = insertions;
      this.deletions = deletions;
      this.meta = /* @__PURE__ */ new Map();
    }
  };
  var clearUndoManagerStackItem = (tr, um, stackItem) => {
    iterateDeletedStructs(tr, stackItem.deletions, (item) => {
      if (item instanceof Item && um.scope.some((type) => type === tr.doc || isParentOf(
        /** @type {AbstractType<any>} */
        type,
        item
      ))) {
        keepItem(item, false);
      }
    });
  };
  var popStackItem = (undoManager2, stack, eventType) => {
    let _tr = null;
    const doc2 = undoManager2.doc;
    const scope = undoManager2.scope;
    transact(doc2, (transaction) => {
      while (stack.length > 0 && undoManager2.currStackItem === null) {
        const store2 = doc2.store;
        const stackItem = (
          /** @type {StackItem} */
          stack.pop()
        );
        const itemsToRedo = /* @__PURE__ */ new Set();
        const itemsToDelete = [];
        let performedChange = false;
        iterateDeletedStructs(transaction, stackItem.insertions, (struct) => {
          if (struct instanceof Item) {
            if (struct.redone !== null) {
              let { item, diff } = followRedone(store2, struct.id);
              if (diff > 0) {
                item = getItemCleanStart(transaction, createID(item.id.client, item.id.clock + diff));
              }
              struct = item;
            }
            if (!struct.deleted && scope.some((type) => type === transaction.doc || isParentOf(
              /** @type {AbstractType<any>} */
              type,
              /** @type {Item} */
              struct
            ))) {
              itemsToDelete.push(struct);
            }
          }
        });
        iterateDeletedStructs(transaction, stackItem.deletions, (struct) => {
          if (struct instanceof Item && scope.some((type) => type === transaction.doc || isParentOf(
            /** @type {AbstractType<any>} */
            type,
            struct
          )) && // Never redo structs in stackItem.insertions because they were created and deleted in the same capture interval.
          !isDeleted(stackItem.insertions, struct.id)) {
            itemsToRedo.add(struct);
          }
        });
        itemsToRedo.forEach((struct) => {
          performedChange = redoItem(transaction, struct, itemsToRedo, stackItem.insertions, undoManager2.ignoreRemoteMapChanges, undoManager2) !== null || performedChange;
        });
        for (let i = itemsToDelete.length - 1; i >= 0; i--) {
          const item = itemsToDelete[i];
          if (undoManager2.deleteFilter(item)) {
            item.delete(transaction);
            performedChange = true;
          }
        }
        undoManager2.currStackItem = performedChange ? stackItem : null;
      }
      transaction.changed.forEach((subProps, type) => {
        if (subProps.has(null) && type._searchMarker) {
          type._searchMarker.length = 0;
        }
      });
      _tr = transaction;
    }, undoManager2);
    const res = undoManager2.currStackItem;
    if (res != null) {
      const changedParentTypes = _tr.changedParentTypes;
      undoManager2.emit("stack-item-popped", [{ stackItem: res, type: eventType, changedParentTypes, origin: undoManager2 }, undoManager2]);
      undoManager2.currStackItem = null;
    }
    return res;
  };
  var UndoManager = class extends ObservableV2 {
    /**
     * @param {Doc|AbstractType<any>|Array<AbstractType<any>>} typeScope Limits the scope of the UndoManager. If this is set to a ydoc instance, all changes on that ydoc will be undone. If set to a specific type, only changes on that type or its children will be undone. Also accepts an array of types.
     * @param {UndoManagerOptions} options
     */
    constructor(typeScope, {
      captureTimeout = 500,
      captureTransaction = (_tr) => true,
      deleteFilter = () => true,
      trackedOrigins = /* @__PURE__ */ new Set([null]),
      ignoreRemoteMapChanges = false,
      doc: doc2 = (
        /** @type {Doc} */
        isArray(typeScope) ? typeScope[0].doc : typeScope instanceof Doc ? typeScope : typeScope.doc
      )
    } = {}) {
      super();
      this.scope = [];
      this.doc = doc2;
      this.addToScope(typeScope);
      this.deleteFilter = deleteFilter;
      trackedOrigins.add(this);
      this.trackedOrigins = trackedOrigins;
      this.captureTransaction = captureTransaction;
      this.undoStack = [];
      this.redoStack = [];
      this.undoing = false;
      this.redoing = false;
      this.currStackItem = null;
      this.lastChange = 0;
      this.ignoreRemoteMapChanges = ignoreRemoteMapChanges;
      this.captureTimeout = captureTimeout;
      this.afterTransactionHandler = (transaction) => {
        if (!this.captureTransaction(transaction) || !this.scope.some((type) => transaction.changedParentTypes.has(
          /** @type {AbstractType<any>} */
          type
        ) || type === this.doc) || !this.trackedOrigins.has(transaction.origin) && (!transaction.origin || !this.trackedOrigins.has(transaction.origin.constructor))) {
          return;
        }
        const undoing = this.undoing;
        const redoing = this.redoing;
        const stack = undoing ? this.redoStack : this.undoStack;
        if (undoing) {
          this.stopCapturing();
        } else if (!redoing) {
          this.clear(false, true);
        }
        const insertions = new DeleteSet();
        transaction.afterState.forEach((endClock, client) => {
          const startClock = transaction.beforeState.get(client) || 0;
          const len = endClock - startClock;
          if (len > 0) {
            addToDeleteSet(insertions, client, startClock, len);
          }
        });
        const now = getUnixTime();
        let didAdd = false;
        if (this.lastChange > 0 && now - this.lastChange < this.captureTimeout && stack.length > 0 && !undoing && !redoing) {
          const lastOp = stack[stack.length - 1];
          lastOp.deletions = mergeDeleteSets([lastOp.deletions, transaction.deleteSet]);
          lastOp.insertions = mergeDeleteSets([lastOp.insertions, insertions]);
        } else {
          stack.push(new StackItem(transaction.deleteSet, insertions));
          didAdd = true;
        }
        if (!undoing && !redoing) {
          this.lastChange = now;
        }
        iterateDeletedStructs(
          transaction,
          transaction.deleteSet,
          /** @param {Item|GC} item */
          (item) => {
            if (item instanceof Item && this.scope.some((type) => type === transaction.doc || isParentOf(
              /** @type {AbstractType<any>} */
              type,
              item
            ))) {
              keepItem(item, true);
            }
          }
        );
        const changeEvent = [{ stackItem: stack[stack.length - 1], origin: transaction.origin, type: undoing ? "redo" : "undo", changedParentTypes: transaction.changedParentTypes }, this];
        if (didAdd) {
          this.emit("stack-item-added", changeEvent);
        } else {
          this.emit("stack-item-updated", changeEvent);
        }
      };
      this.doc.on("afterTransaction", this.afterTransactionHandler);
      this.doc.on("destroy", () => {
        this.destroy();
      });
    }
    /**
     * Extend the scope.
     *
     * @param {Array<AbstractType<any> | Doc> | AbstractType<any> | Doc} ytypes
     */
    addToScope(ytypes) {
      const tmpSet = new Set(this.scope);
      ytypes = isArray(ytypes) ? ytypes : [ytypes];
      ytypes.forEach((ytype) => {
        if (!tmpSet.has(ytype)) {
          tmpSet.add(ytype);
          if (ytype instanceof AbstractType ? ytype.doc !== this.doc : ytype !== this.doc) warn("[yjs#509] Not same Y.Doc");
          this.scope.push(ytype);
        }
      });
    }
    /**
     * @param {any} origin
     */
    addTrackedOrigin(origin2) {
      this.trackedOrigins.add(origin2);
    }
    /**
     * @param {any} origin
     */
    removeTrackedOrigin(origin2) {
      this.trackedOrigins.delete(origin2);
    }
    clear(clearUndoStack = true, clearRedoStack = true) {
      if (clearUndoStack && this.canUndo() || clearRedoStack && this.canRedo()) {
        this.doc.transact((tr) => {
          if (clearUndoStack) {
            this.undoStack.forEach((item) => clearUndoManagerStackItem(tr, this, item));
            this.undoStack = [];
          }
          if (clearRedoStack) {
            this.redoStack.forEach((item) => clearUndoManagerStackItem(tr, this, item));
            this.redoStack = [];
          }
          this.emit("stack-cleared", [{ undoStackCleared: clearUndoStack, redoStackCleared: clearRedoStack }]);
        });
      }
    }
    /**
     * UndoManager merges Undo-StackItem if they are created within time-gap
     * smaller than `options.captureTimeout`. Call `um.stopCapturing()` so that the next
     * StackItem won't be merged.
     *
     *
     * @example
     *     // without stopCapturing
     *     ytext.insert(0, 'a')
     *     ytext.insert(1, 'b')
     *     um.undo()
     *     ytext.toString() // => '' (note that 'ab' was removed)
     *     // with stopCapturing
     *     ytext.insert(0, 'a')
     *     um.stopCapturing()
     *     ytext.insert(0, 'b')
     *     um.undo()
     *     ytext.toString() // => 'a' (note that only 'b' was removed)
     *
     */
    stopCapturing() {
      this.lastChange = 0;
    }
    /**
     * Undo last changes on type.
     *
     * @return {StackItem?} Returns StackItem if a change was applied
     */
    undo() {
      this.undoing = true;
      let res;
      try {
        res = popStackItem(this, this.undoStack, "undo");
      } finally {
        this.undoing = false;
      }
      return res;
    }
    /**
     * Redo last undo operation.
     *
     * @return {StackItem?} Returns StackItem if a change was applied
     */
    redo() {
      this.redoing = true;
      let res;
      try {
        res = popStackItem(this, this.redoStack, "redo");
      } finally {
        this.redoing = false;
      }
      return res;
    }
    /**
     * Are undo steps available?
     *
     * @return {boolean} `true` if undo is possible
     */
    canUndo() {
      return this.undoStack.length > 0;
    }
    /**
     * Are redo steps available?
     *
     * @return {boolean} `true` if redo is possible
     */
    canRedo() {
      return this.redoStack.length > 0;
    }
    destroy() {
      this.trackedOrigins.delete(this);
      this.doc.off("afterTransaction", this.afterTransactionHandler);
      super.destroy();
    }
  };
  function* lazyStructReaderGenerator(decoder) {
    const numOfStateUpdates = readVarUint(decoder.restDecoder);
    for (let i = 0; i < numOfStateUpdates; i++) {
      const numberOfStructs = readVarUint(decoder.restDecoder);
      const client = decoder.readClient();
      let clock = readVarUint(decoder.restDecoder);
      for (let i2 = 0; i2 < numberOfStructs; i2++) {
        const info = decoder.readInfo();
        if (info === 10) {
          const len = readVarUint(decoder.restDecoder);
          yield new Skip(createID(client, clock), len);
          clock += len;
        } else if ((BITS5 & info) !== 0) {
          const cantCopyParentInfo = (info & (BIT7 | BIT8)) === 0;
          const struct = new Item(
            createID(client, clock),
            null,
            // left
            (info & BIT8) === BIT8 ? decoder.readLeftID() : null,
            // origin
            null,
            // right
            (info & BIT7) === BIT7 ? decoder.readRightID() : null,
            // right origin
            // @ts-ignore Force writing a string here.
            cantCopyParentInfo ? decoder.readParentInfo() ? decoder.readString() : decoder.readLeftID() : null,
            // parent
            cantCopyParentInfo && (info & BIT6) === BIT6 ? decoder.readString() : null,
            // parentSub
            readItemContent(decoder, info)
            // item content
          );
          yield struct;
          clock += struct.length;
        } else {
          const len = decoder.readLen();
          yield new GC(createID(client, clock), len);
          clock += len;
        }
      }
    }
  }
  var LazyStructReader = class {
    /**
     * @param {UpdateDecoderV1 | UpdateDecoderV2} decoder
     * @param {boolean} filterSkips
     */
    constructor(decoder, filterSkips) {
      this.gen = lazyStructReaderGenerator(decoder);
      this.curr = null;
      this.done = false;
      this.filterSkips = filterSkips;
      this.next();
    }
    /**
     * @return {Item | GC | Skip |null}
     */
    next() {
      do {
        this.curr = this.gen.next().value || null;
      } while (this.filterSkips && this.curr !== null && this.curr.constructor === Skip);
      return this.curr;
    }
  };
  var logUpdate = (update) => logUpdateV2(update, UpdateDecoderV1);
  var logUpdateV2 = (update, YDecoder = UpdateDecoderV2) => {
    const structs = [];
    const updateDecoder = new YDecoder(createDecoder(update));
    const lazyDecoder = new LazyStructReader(updateDecoder, false);
    for (let curr = lazyDecoder.curr; curr !== null; curr = lazyDecoder.next()) {
      structs.push(curr);
    }
    print("Structs: ", structs);
    const ds = readDeleteSet(updateDecoder);
    print("DeleteSet: ", ds);
  };
  var decodeUpdate = (update) => decodeUpdateV2(update, UpdateDecoderV1);
  var decodeUpdateV2 = (update, YDecoder = UpdateDecoderV2) => {
    const structs = [];
    const updateDecoder = new YDecoder(createDecoder(update));
    const lazyDecoder = new LazyStructReader(updateDecoder, false);
    for (let curr = lazyDecoder.curr; curr !== null; curr = lazyDecoder.next()) {
      structs.push(curr);
    }
    return {
      structs,
      ds: readDeleteSet(updateDecoder)
    };
  };
  var LazyStructWriter = class {
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     */
    constructor(encoder) {
      this.currClient = 0;
      this.startClock = 0;
      this.written = 0;
      this.encoder = encoder;
      this.clientStructs = [];
    }
  };
  var mergeUpdates = (updates) => mergeUpdatesV2(updates, UpdateDecoderV1, UpdateEncoderV1);
  var encodeStateVectorFromUpdateV2 = (update, YEncoder = DSEncoderV2, YDecoder = UpdateDecoderV2) => {
    const encoder = new YEncoder();
    const updateDecoder = new LazyStructReader(new YDecoder(createDecoder(update)), false);
    let curr = updateDecoder.curr;
    if (curr !== null) {
      let size2 = 0;
      let currClient = curr.id.client;
      let stopCounting = curr.id.clock !== 0;
      let currClock = stopCounting ? 0 : curr.id.clock + curr.length;
      for (; curr !== null; curr = updateDecoder.next()) {
        if (currClient !== curr.id.client) {
          if (currClock !== 0) {
            size2++;
            writeVarUint(encoder.restEncoder, currClient);
            writeVarUint(encoder.restEncoder, currClock);
          }
          currClient = curr.id.client;
          currClock = 0;
          stopCounting = curr.id.clock !== 0;
        }
        if (curr.constructor === Skip) {
          stopCounting = true;
        }
        if (!stopCounting) {
          currClock = curr.id.clock + curr.length;
        }
      }
      if (currClock !== 0) {
        size2++;
        writeVarUint(encoder.restEncoder, currClient);
        writeVarUint(encoder.restEncoder, currClock);
      }
      const enc = createEncoder();
      writeVarUint(enc, size2);
      writeBinaryEncoder(enc, encoder.restEncoder);
      encoder.restEncoder = enc;
      return encoder.toUint8Array();
    } else {
      writeVarUint(encoder.restEncoder, 0);
      return encoder.toUint8Array();
    }
  };
  var encodeStateVectorFromUpdate = (update) => encodeStateVectorFromUpdateV2(update, DSEncoderV1, UpdateDecoderV1);
  var parseUpdateMetaV2 = (update, YDecoder = UpdateDecoderV2) => {
    const from2 = /* @__PURE__ */ new Map();
    const to = /* @__PURE__ */ new Map();
    const updateDecoder = new LazyStructReader(new YDecoder(createDecoder(update)), false);
    let curr = updateDecoder.curr;
    if (curr !== null) {
      let currClient = curr.id.client;
      let currClock = curr.id.clock;
      from2.set(currClient, currClock);
      for (; curr !== null; curr = updateDecoder.next()) {
        if (currClient !== curr.id.client) {
          to.set(currClient, currClock);
          from2.set(curr.id.client, curr.id.clock);
          currClient = curr.id.client;
        }
        currClock = curr.id.clock + curr.length;
      }
      to.set(currClient, currClock);
    }
    return { from: from2, to };
  };
  var parseUpdateMeta = (update) => parseUpdateMetaV2(update, UpdateDecoderV1);
  var sliceStruct = (left, diff) => {
    if (left.constructor === GC) {
      const { client, clock } = left.id;
      return new GC(createID(client, clock + diff), left.length - diff);
    } else if (left.constructor === Skip) {
      const { client, clock } = left.id;
      return new Skip(createID(client, clock + diff), left.length - diff);
    } else {
      const leftItem = (
        /** @type {Item} */
        left
      );
      const { client, clock } = leftItem.id;
      return new Item(
        createID(client, clock + diff),
        null,
        createID(client, clock + diff - 1),
        null,
        leftItem.rightOrigin,
        leftItem.parent,
        leftItem.parentSub,
        leftItem.content.splice(diff)
      );
    }
  };
  var mergeUpdatesV2 = (updates, YDecoder = UpdateDecoderV2, YEncoder = UpdateEncoderV2) => {
    if (updates.length === 1) {
      return updates[0];
    }
    const updateDecoders = updates.map((update) => new YDecoder(createDecoder(update)));
    let lazyStructDecoders = updateDecoders.map((decoder) => new LazyStructReader(decoder, true));
    let currWrite = null;
    const updateEncoder = new YEncoder();
    const lazyStructEncoder = new LazyStructWriter(updateEncoder);
    while (true) {
      lazyStructDecoders = lazyStructDecoders.filter((dec) => dec.curr !== null);
      lazyStructDecoders.sort(
        /** @type {function(any,any):number} */
        (dec1, dec2) => {
          if (dec1.curr.id.client === dec2.curr.id.client) {
            const clockDiff = dec1.curr.id.clock - dec2.curr.id.clock;
            if (clockDiff === 0) {
              return dec1.curr.constructor === dec2.curr.constructor ? 0 : dec1.curr.constructor === Skip ? 1 : -1;
            } else {
              return clockDiff;
            }
          } else {
            return dec2.curr.id.client - dec1.curr.id.client;
          }
        }
      );
      if (lazyStructDecoders.length === 0) {
        break;
      }
      const currDecoder = lazyStructDecoders[0];
      const firstClient = (
        /** @type {Item | GC} */
        currDecoder.curr.id.client
      );
      if (currWrite !== null) {
        let curr = (
          /** @type {Item | GC | null} */
          currDecoder.curr
        );
        let iterated = false;
        while (curr !== null && curr.id.clock + curr.length <= currWrite.struct.id.clock + currWrite.struct.length && curr.id.client >= currWrite.struct.id.client) {
          curr = currDecoder.next();
          iterated = true;
        }
        if (curr === null || // current decoder is empty
        curr.id.client !== firstClient || // check whether there is another decoder that has has updates from `firstClient`
        iterated && curr.id.clock > currWrite.struct.id.clock + currWrite.struct.length) {
          continue;
        }
        if (firstClient !== currWrite.struct.id.client) {
          writeStructToLazyStructWriter(lazyStructEncoder, currWrite.struct, currWrite.offset);
          currWrite = { struct: curr, offset: 0 };
          currDecoder.next();
        } else {
          if (currWrite.struct.id.clock + currWrite.struct.length < curr.id.clock) {
            if (currWrite.struct.constructor === Skip) {
              currWrite.struct.length = curr.id.clock + curr.length - currWrite.struct.id.clock;
            } else {
              writeStructToLazyStructWriter(lazyStructEncoder, currWrite.struct, currWrite.offset);
              const diff = curr.id.clock - currWrite.struct.id.clock - currWrite.struct.length;
              const struct = new Skip(createID(firstClient, currWrite.struct.id.clock + currWrite.struct.length), diff);
              currWrite = { struct, offset: 0 };
            }
          } else {
            const diff = currWrite.struct.id.clock + currWrite.struct.length - curr.id.clock;
            if (diff > 0) {
              if (currWrite.struct.constructor === Skip) {
                currWrite.struct.length -= diff;
              } else {
                curr = sliceStruct(curr, diff);
              }
            }
            if (!currWrite.struct.mergeWith(
              /** @type {any} */
              curr
            )) {
              writeStructToLazyStructWriter(lazyStructEncoder, currWrite.struct, currWrite.offset);
              currWrite = { struct: curr, offset: 0 };
              currDecoder.next();
            }
          }
        }
      } else {
        currWrite = { struct: (
          /** @type {Item | GC} */
          currDecoder.curr
        ), offset: 0 };
        currDecoder.next();
      }
      for (let next = currDecoder.curr; next !== null && next.id.client === firstClient && next.id.clock === currWrite.struct.id.clock + currWrite.struct.length && next.constructor !== Skip; next = currDecoder.next()) {
        writeStructToLazyStructWriter(lazyStructEncoder, currWrite.struct, currWrite.offset);
        currWrite = { struct: next, offset: 0 };
      }
    }
    if (currWrite !== null) {
      writeStructToLazyStructWriter(lazyStructEncoder, currWrite.struct, currWrite.offset);
      currWrite = null;
    }
    finishLazyStructWriting(lazyStructEncoder);
    const dss = updateDecoders.map((decoder) => readDeleteSet(decoder));
    const ds = mergeDeleteSets(dss);
    writeDeleteSet(updateEncoder, ds);
    return updateEncoder.toUint8Array();
  };
  var diffUpdateV2 = (update, sv, YDecoder = UpdateDecoderV2, YEncoder = UpdateEncoderV2) => {
    const state = decodeStateVector(sv);
    const encoder = new YEncoder();
    const lazyStructWriter = new LazyStructWriter(encoder);
    const decoder = new YDecoder(createDecoder(update));
    const reader = new LazyStructReader(decoder, false);
    while (reader.curr) {
      const curr = reader.curr;
      const currClient = curr.id.client;
      const svClock = state.get(currClient) || 0;
      if (reader.curr.constructor === Skip) {
        reader.next();
        continue;
      }
      if (curr.id.clock + curr.length > svClock) {
        writeStructToLazyStructWriter(lazyStructWriter, curr, max(svClock - curr.id.clock, 0));
        reader.next();
        while (reader.curr && reader.curr.id.client === currClient) {
          writeStructToLazyStructWriter(lazyStructWriter, reader.curr, 0);
          reader.next();
        }
      } else {
        while (reader.curr && reader.curr.id.client === currClient && reader.curr.id.clock + reader.curr.length <= svClock) {
          reader.next();
        }
      }
    }
    finishLazyStructWriting(lazyStructWriter);
    const ds = readDeleteSet(decoder);
    writeDeleteSet(encoder, ds);
    return encoder.toUint8Array();
  };
  var diffUpdate = (update, sv) => diffUpdateV2(update, sv, UpdateDecoderV1, UpdateEncoderV1);
  var flushLazyStructWriter = (lazyWriter) => {
    if (lazyWriter.written > 0) {
      lazyWriter.clientStructs.push({ written: lazyWriter.written, restEncoder: toUint8Array(lazyWriter.encoder.restEncoder) });
      lazyWriter.encoder.restEncoder = createEncoder();
      lazyWriter.written = 0;
    }
  };
  var writeStructToLazyStructWriter = (lazyWriter, struct, offset) => {
    if (lazyWriter.written > 0 && lazyWriter.currClient !== struct.id.client) {
      flushLazyStructWriter(lazyWriter);
    }
    if (lazyWriter.written === 0) {
      lazyWriter.currClient = struct.id.client;
      lazyWriter.encoder.writeClient(struct.id.client);
      writeVarUint(lazyWriter.encoder.restEncoder, struct.id.clock + offset);
    }
    struct.write(lazyWriter.encoder, offset);
    lazyWriter.written++;
  };
  var finishLazyStructWriting = (lazyWriter) => {
    flushLazyStructWriter(lazyWriter);
    const restEncoder = lazyWriter.encoder.restEncoder;
    writeVarUint(restEncoder, lazyWriter.clientStructs.length);
    for (let i = 0; i < lazyWriter.clientStructs.length; i++) {
      const partStructs = lazyWriter.clientStructs[i];
      writeVarUint(restEncoder, partStructs.written);
      writeUint8Array(restEncoder, partStructs.restEncoder);
    }
  };
  var convertUpdateFormat = (update, blockTransformer, YDecoder, YEncoder) => {
    const updateDecoder = new YDecoder(createDecoder(update));
    const lazyDecoder = new LazyStructReader(updateDecoder, false);
    const updateEncoder = new YEncoder();
    const lazyWriter = new LazyStructWriter(updateEncoder);
    for (let curr = lazyDecoder.curr; curr !== null; curr = lazyDecoder.next()) {
      writeStructToLazyStructWriter(lazyWriter, blockTransformer(curr), 0);
    }
    finishLazyStructWriting(lazyWriter);
    const ds = readDeleteSet(updateDecoder);
    writeDeleteSet(updateEncoder, ds);
    return updateEncoder.toUint8Array();
  };
  var createObfuscator = ({ formatting = true, subdocs = true, yxml = true } = {}) => {
    let i = 0;
    const mapKeyCache = create();
    const nodeNameCache = create();
    const formattingKeyCache = create();
    const formattingValueCache = create();
    formattingValueCache.set(null, null);
    return (block) => {
      switch (block.constructor) {
        case GC:
        case Skip:
          return block;
        case Item: {
          const item = (
            /** @type {Item} */
            block
          );
          const content = item.content;
          switch (content.constructor) {
            case ContentDeleted:
              break;
            case ContentType: {
              if (yxml) {
                const type = (
                  /** @type {ContentType} */
                  content.type
                );
                if (type instanceof YXmlElement) {
                  type.nodeName = setIfUndefined(nodeNameCache, type.nodeName, () => "node-" + i);
                }
                if (type instanceof YXmlHook) {
                  type.hookName = setIfUndefined(nodeNameCache, type.hookName, () => "hook-" + i);
                }
              }
              break;
            }
            case ContentAny: {
              const c = (
                /** @type {ContentAny} */
                content
              );
              c.arr = c.arr.map(() => i);
              break;
            }
            case ContentBinary: {
              const c = (
                /** @type {ContentBinary} */
                content
              );
              c.content = new Uint8Array([i]);
              break;
            }
            case ContentDoc: {
              const c = (
                /** @type {ContentDoc} */
                content
              );
              if (subdocs) {
                c.opts = {};
                c.doc.guid = i + "";
              }
              break;
            }
            case ContentEmbed: {
              const c = (
                /** @type {ContentEmbed} */
                content
              );
              c.embed = {};
              break;
            }
            case ContentFormat: {
              const c = (
                /** @type {ContentFormat} */
                content
              );
              if (formatting) {
                c.key = setIfUndefined(formattingKeyCache, c.key, () => i + "");
                c.value = setIfUndefined(formattingValueCache, c.value, () => ({ i }));
              }
              break;
            }
            case ContentJSON: {
              const c = (
                /** @type {ContentJSON} */
                content
              );
              c.arr = c.arr.map(() => i);
              break;
            }
            case ContentString: {
              const c = (
                /** @type {ContentString} */
                content
              );
              c.str = repeat(i % 10 + "", c.str.length);
              break;
            }
            default:
              unexpectedCase();
          }
          if (item.parentSub) {
            item.parentSub = setIfUndefined(mapKeyCache, item.parentSub, () => i + "");
          }
          i++;
          return block;
        }
        default:
          unexpectedCase();
      }
    };
  };
  var obfuscateUpdate = (update, opts) => convertUpdateFormat(update, createObfuscator(opts), UpdateDecoderV1, UpdateEncoderV1);
  var obfuscateUpdateV2 = (update, opts) => convertUpdateFormat(update, createObfuscator(opts), UpdateDecoderV2, UpdateEncoderV2);
  var convertUpdateFormatV1ToV2 = (update) => convertUpdateFormat(update, id, UpdateDecoderV1, UpdateEncoderV2);
  var convertUpdateFormatV2ToV1 = (update) => convertUpdateFormat(update, id, UpdateDecoderV2, UpdateEncoderV1);
  var errorComputeChanges = "You must not compute changes after the event-handler fired.";
  var YEvent = class {
    /**
     * @param {T} target The changed type.
     * @param {Transaction} transaction
     */
    constructor(target, transaction) {
      this.target = target;
      this.currentTarget = target;
      this.transaction = transaction;
      this._changes = null;
      this._keys = null;
      this._delta = null;
      this._path = null;
    }
    /**
     * Computes the path from `y` to the changed type.
     *
     * @todo v14 should standardize on path: Array<{parent, index}> because that is easier to work with.
     *
     * The following property holds:
     * @example
     *   let type = y
     *   event.path.forEach(dir => {
     *     type = type.get(dir)
     *   })
     *   type === event.target // => true
     */
    get path() {
      return this._path || (this._path = getPathTo(this.currentTarget, this.target));
    }
    /**
     * Check if a struct is deleted by this event.
     *
     * In contrast to change.deleted, this method also returns true if the struct was added and then deleted.
     *
     * @param {AbstractStruct} struct
     * @return {boolean}
     */
    deletes(struct) {
      return isDeleted(this.transaction.deleteSet, struct.id);
    }
    /**
     * @type {Map<string, { action: 'add' | 'update' | 'delete', oldValue: any }>}
     */
    get keys() {
      if (this._keys === null) {
        if (this.transaction.doc._transactionCleanups.length === 0) {
          throw create3(errorComputeChanges);
        }
        const keys2 = /* @__PURE__ */ new Map();
        const target = this.target;
        const changed = (
          /** @type Set<string|null> */
          this.transaction.changed.get(target)
        );
        changed.forEach((key) => {
          if (key !== null) {
            const item = (
              /** @type {Item} */
              target._map.get(key)
            );
            let action;
            let oldValue;
            if (this.adds(item)) {
              let prev = item.left;
              while (prev !== null && this.adds(prev)) {
                prev = prev.left;
              }
              if (this.deletes(item)) {
                if (prev !== null && this.deletes(prev)) {
                  action = "delete";
                  oldValue = last(prev.content.getContent());
                } else {
                  return;
                }
              } else {
                if (prev !== null && this.deletes(prev)) {
                  action = "update";
                  oldValue = last(prev.content.getContent());
                } else {
                  action = "add";
                  oldValue = void 0;
                }
              }
            } else {
              if (this.deletes(item)) {
                action = "delete";
                oldValue = last(
                  /** @type {Item} */
                  item.content.getContent()
                );
              } else {
                return;
              }
            }
            keys2.set(key, { action, oldValue });
          }
        });
        this._keys = keys2;
      }
      return this._keys;
    }
    /**
     * This is a computed property. Note that this can only be safely computed during the
     * event call. Computing this property after other changes happened might result in
     * unexpected behavior (incorrect computation of deltas). A safe way to collect changes
     * is to store the `changes` or the `delta` object. Avoid storing the `transaction` object.
     *
     * @type {Array<{insert?: string | Array<any> | object | AbstractType<any>, retain?: number, delete?: number, attributes?: Object<string, any>}>}
     */
    get delta() {
      return this.changes.delta;
    }
    /**
     * Check if a struct is added by this event.
     *
     * In contrast to change.deleted, this method also returns true if the struct was added and then deleted.
     *
     * @param {AbstractStruct} struct
     * @return {boolean}
     */
    adds(struct) {
      return struct.id.clock >= (this.transaction.beforeState.get(struct.id.client) || 0);
    }
    /**
     * This is a computed property. Note that this can only be safely computed during the
     * event call. Computing this property after other changes happened might result in
     * unexpected behavior (incorrect computation of deltas). A safe way to collect changes
     * is to store the `changes` or the `delta` object. Avoid storing the `transaction` object.
     *
     * @type {{added:Set<Item>,deleted:Set<Item>,keys:Map<string,{action:'add'|'update'|'delete',oldValue:any}>,delta:Array<{insert?:Array<any>|string, delete?:number, retain?:number}>}}
     */
    get changes() {
      let changes = this._changes;
      if (changes === null) {
        if (this.transaction.doc._transactionCleanups.length === 0) {
          throw create3(errorComputeChanges);
        }
        const target = this.target;
        const added = create2();
        const deleted = create2();
        const delta = [];
        changes = {
          added,
          deleted,
          delta,
          keys: this.keys
        };
        const changed = (
          /** @type Set<string|null> */
          this.transaction.changed.get(target)
        );
        if (changed.has(null)) {
          let lastOp = null;
          const packOp = () => {
            if (lastOp) {
              delta.push(lastOp);
            }
          };
          for (let item = target._start; item !== null; item = item.right) {
            if (item.deleted) {
              if (this.deletes(item) && !this.adds(item)) {
                if (lastOp === null || lastOp.delete === void 0) {
                  packOp();
                  lastOp = { delete: 0 };
                }
                lastOp.delete += item.length;
                deleted.add(item);
              }
            } else {
              if (this.adds(item)) {
                if (lastOp === null || lastOp.insert === void 0) {
                  packOp();
                  lastOp = { insert: [] };
                }
                lastOp.insert = lastOp.insert.concat(item.content.getContent());
                added.add(item);
              } else {
                if (lastOp === null || lastOp.retain === void 0) {
                  packOp();
                  lastOp = { retain: 0 };
                }
                lastOp.retain += item.length;
              }
            }
          }
          if (lastOp !== null && lastOp.retain === void 0) {
            packOp();
          }
        }
        this._changes = changes;
      }
      return (
        /** @type {any} */
        changes
      );
    }
  };
  var getPathTo = (parent, child) => {
    const path = [];
    while (child._item !== null && child !== parent) {
      if (child._item.parentSub !== null) {
        path.unshift(child._item.parentSub);
      } else {
        let i = 0;
        let c = (
          /** @type {AbstractType<any>} */
          child._item.parent._start
        );
        while (c !== child._item && c !== null) {
          if (!c.deleted && c.countable) {
            i += c.length;
          }
          c = c.right;
        }
        path.unshift(i);
      }
      child = /** @type {AbstractType<any>} */
      child._item.parent;
    }
    return path;
  };
  var warnPrematureAccess = () => {
    warn("Invalid access: Add Yjs type to a document before reading data.");
  };
  var maxSearchMarker = 80;
  var globalSearchMarkerTimestamp = 0;
  var ArraySearchMarker = class {
    /**
     * @param {Item} p
     * @param {number} index
     */
    constructor(p, index) {
      p.marker = true;
      this.p = p;
      this.index = index;
      this.timestamp = globalSearchMarkerTimestamp++;
    }
  };
  var refreshMarkerTimestamp = (marker) => {
    marker.timestamp = globalSearchMarkerTimestamp++;
  };
  var overwriteMarker = (marker, p, index) => {
    marker.p.marker = false;
    marker.p = p;
    p.marker = true;
    marker.index = index;
    marker.timestamp = globalSearchMarkerTimestamp++;
  };
  var markPosition = (searchMarker, p, index) => {
    if (searchMarker.length >= maxSearchMarker) {
      const marker = searchMarker.reduce((a, b) => a.timestamp < b.timestamp ? a : b);
      overwriteMarker(marker, p, index);
      return marker;
    } else {
      const pm = new ArraySearchMarker(p, index);
      searchMarker.push(pm);
      return pm;
    }
  };
  var findMarker = (yarray, index) => {
    if (yarray._start === null || index === 0 || yarray._searchMarker === null) {
      return null;
    }
    const marker = yarray._searchMarker.length === 0 ? null : yarray._searchMarker.reduce((a, b) => abs(index - a.index) < abs(index - b.index) ? a : b);
    let p = yarray._start;
    let pindex = 0;
    if (marker !== null) {
      p = marker.p;
      pindex = marker.index;
      refreshMarkerTimestamp(marker);
    }
    while (p.right !== null && pindex < index) {
      if (!p.deleted && p.countable) {
        if (index < pindex + p.length) {
          break;
        }
        pindex += p.length;
      }
      p = p.right;
    }
    while (p.left !== null && pindex > index) {
      p = p.left;
      if (!p.deleted && p.countable) {
        pindex -= p.length;
      }
    }
    while (p.left !== null && p.left.id.client === p.id.client && p.left.id.clock + p.left.length === p.id.clock) {
      p = p.left;
      if (!p.deleted && p.countable) {
        pindex -= p.length;
      }
    }
    if (marker !== null && abs(marker.index - pindex) < /** @type {YText|YArray<any>} */
    p.parent.length / maxSearchMarker) {
      overwriteMarker(marker, p, pindex);
      return marker;
    } else {
      return markPosition(yarray._searchMarker, p, pindex);
    }
  };
  var updateMarkerChanges = (searchMarker, index, len) => {
    for (let i = searchMarker.length - 1; i >= 0; i--) {
      const m = searchMarker[i];
      if (len > 0) {
        let p = m.p;
        p.marker = false;
        while (p && (p.deleted || !p.countable)) {
          p = p.left;
          if (p && !p.deleted && p.countable) {
            m.index -= p.length;
          }
        }
        if (p === null || p.marker === true) {
          searchMarker.splice(i, 1);
          continue;
        }
        m.p = p;
        p.marker = true;
      }
      if (index < m.index || len > 0 && index === m.index) {
        m.index = max(index, m.index + len);
      }
    }
  };
  var getTypeChildren = (t) => {
    t.doc ?? warnPrematureAccess();
    let s = t._start;
    const arr = [];
    while (s) {
      arr.push(s);
      s = s.right;
    }
    return arr;
  };
  var callTypeObservers = (type, transaction, event) => {
    const changedType = type;
    const changedParentTypes = transaction.changedParentTypes;
    while (true) {
      setIfUndefined(changedParentTypes, type, () => []).push(event);
      if (type._item === null) {
        break;
      }
      type = /** @type {AbstractType<any>} */
      type._item.parent;
    }
    callEventHandlerListeners(changedType._eH, event, transaction);
  };
  var AbstractType = class {
    constructor() {
      this._item = null;
      this._map = /* @__PURE__ */ new Map();
      this._start = null;
      this.doc = null;
      this._length = 0;
      this._eH = createEventHandler();
      this._dEH = createEventHandler();
      this._searchMarker = null;
    }
    /**
     * @return {AbstractType<any>|null}
     */
    get parent() {
      return this._item ? (
        /** @type {AbstractType<any>} */
        this._item.parent
      ) : null;
    }
    /**
     * Integrate this type into the Yjs instance.
     *
     * * Save this struct in the os
     * * This type is sent to other client
     * * Observer functions are fired
     *
     * @param {Doc} y The Yjs instance
     * @param {Item|null} item
     */
    _integrate(y, item) {
      this.doc = y;
      this._item = item;
    }
    /**
     * @return {AbstractType<EventType>}
     */
    _copy() {
      throw methodUnimplemented();
    }
    /**
     * Makes a copy of this data type that can be included somewhere else.
     *
     * Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
     *
     * @return {AbstractType<EventType>}
     */
    clone() {
      throw methodUnimplemented();
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} _encoder
     */
    _write(_encoder) {
    }
    /**
     * The first non-deleted item
     */
    get _first() {
      let n = this._start;
      while (n !== null && n.deleted) {
        n = n.right;
      }
      return n;
    }
    /**
     * Creates YEvent and calls all type observers.
     * Must be implemented by each type.
     *
     * @param {Transaction} transaction
     * @param {Set<null|string>} _parentSubs Keys changed on this type. `null` if list was modified.
     */
    _callObserver(transaction, _parentSubs) {
      if (!transaction.local && this._searchMarker) {
        this._searchMarker.length = 0;
      }
    }
    /**
     * Observe all events that are created on this type.
     *
     * @param {function(EventType, Transaction):void} f Observer function
     */
    observe(f) {
      addEventHandlerListener(this._eH, f);
    }
    /**
     * Observe all events that are created by this type and its children.
     *
     * @param {function(Array<YEvent<any>>,Transaction):void} f Observer function
     */
    observeDeep(f) {
      addEventHandlerListener(this._dEH, f);
    }
    /**
     * Unregister an observer function.
     *
     * @param {function(EventType,Transaction):void} f Observer function
     */
    unobserve(f) {
      removeEventHandlerListener(this._eH, f);
    }
    /**
     * Unregister an observer function.
     *
     * @param {function(Array<YEvent<any>>,Transaction):void} f Observer function
     */
    unobserveDeep(f) {
      removeEventHandlerListener(this._dEH, f);
    }
    /**
     * @abstract
     * @return {any}
     */
    toJSON() {
    }
  };
  var typeListSlice = (type, start, end) => {
    type.doc ?? warnPrematureAccess();
    if (start < 0) {
      start = type._length + start;
    }
    if (end < 0) {
      end = type._length + end;
    }
    let len = end - start;
    const cs = [];
    let n = type._start;
    while (n !== null && len > 0) {
      if (n.countable && !n.deleted) {
        const c = n.content.getContent();
        if (c.length <= start) {
          start -= c.length;
        } else {
          for (let i = start; i < c.length && len > 0; i++) {
            cs.push(c[i]);
            len--;
          }
          start = 0;
        }
      }
      n = n.right;
    }
    return cs;
  };
  var typeListToArray = (type) => {
    type.doc ?? warnPrematureAccess();
    const cs = [];
    let n = type._start;
    while (n !== null) {
      if (n.countable && !n.deleted) {
        const c = n.content.getContent();
        for (let i = 0; i < c.length; i++) {
          cs.push(c[i]);
        }
      }
      n = n.right;
    }
    return cs;
  };
  var typeListToArraySnapshot = (type, snapshot2) => {
    const cs = [];
    let n = type._start;
    while (n !== null) {
      if (n.countable && isVisible(n, snapshot2)) {
        const c = n.content.getContent();
        for (let i = 0; i < c.length; i++) {
          cs.push(c[i]);
        }
      }
      n = n.right;
    }
    return cs;
  };
  var typeListForEach = (type, f) => {
    let index = 0;
    let n = type._start;
    type.doc ?? warnPrematureAccess();
    while (n !== null) {
      if (n.countable && !n.deleted) {
        const c = n.content.getContent();
        for (let i = 0; i < c.length; i++) {
          f(c[i], index++, type);
        }
      }
      n = n.right;
    }
  };
  var typeListMap = (type, f) => {
    const result = [];
    typeListForEach(type, (c, i) => {
      result.push(f(c, i, type));
    });
    return result;
  };
  var typeListCreateIterator = (type) => {
    let n = type._start;
    let currentContent = null;
    let currentContentIndex = 0;
    return {
      [Symbol.iterator]() {
        return this;
      },
      next: () => {
        if (currentContent === null) {
          while (n !== null && n.deleted) {
            n = n.right;
          }
          if (n === null) {
            return {
              done: true,
              value: void 0
            };
          }
          currentContent = n.content.getContent();
          currentContentIndex = 0;
          n = n.right;
        }
        const value = currentContent[currentContentIndex++];
        if (currentContent.length <= currentContentIndex) {
          currentContent = null;
        }
        return {
          done: false,
          value
        };
      }
    };
  };
  var typeListGet = (type, index) => {
    type.doc ?? warnPrematureAccess();
    const marker = findMarker(type, index);
    let n = type._start;
    if (marker !== null) {
      n = marker.p;
      index -= marker.index;
    }
    for (; n !== null; n = n.right) {
      if (!n.deleted && n.countable) {
        if (index < n.length) {
          return n.content.getContent()[index];
        }
        index -= n.length;
      }
    }
  };
  var typeListInsertGenericsAfter = (transaction, parent, referenceItem, content) => {
    let left = referenceItem;
    const doc2 = transaction.doc;
    const ownClientId = doc2.clientID;
    const store2 = doc2.store;
    const right = referenceItem === null ? parent._start : referenceItem.right;
    let jsonContent = [];
    const packJsonContent = () => {
      if (jsonContent.length > 0) {
        left = new Item(createID(ownClientId, getState(store2, ownClientId)), left, left && left.lastId, right, right && right.id, parent, null, new ContentAny(jsonContent));
        left.integrate(transaction, 0);
        jsonContent = [];
      }
    };
    content.forEach((c) => {
      if (c === null) {
        jsonContent.push(c);
      } else {
        switch (c.constructor) {
          case Number:
          case Object:
          case Boolean:
          case Array:
          case String:
            jsonContent.push(c);
            break;
          default:
            packJsonContent();
            switch (c.constructor) {
              case Uint8Array:
              case ArrayBuffer:
                left = new Item(createID(ownClientId, getState(store2, ownClientId)), left, left && left.lastId, right, right && right.id, parent, null, new ContentBinary(new Uint8Array(
                  /** @type {Uint8Array} */
                  c
                )));
                left.integrate(transaction, 0);
                break;
              case Doc:
                left = new Item(createID(ownClientId, getState(store2, ownClientId)), left, left && left.lastId, right, right && right.id, parent, null, new ContentDoc(
                  /** @type {Doc} */
                  c
                ));
                left.integrate(transaction, 0);
                break;
              default:
                if (c instanceof AbstractType) {
                  left = new Item(createID(ownClientId, getState(store2, ownClientId)), left, left && left.lastId, right, right && right.id, parent, null, new ContentType(c));
                  left.integrate(transaction, 0);
                } else {
                  throw new Error("Unexpected content type in insert operation");
                }
            }
        }
      }
    });
    packJsonContent();
  };
  var lengthExceeded = () => create3("Length exceeded!");
  var typeListInsertGenerics = (transaction, parent, index, content) => {
    if (index > parent._length) {
      throw lengthExceeded();
    }
    if (index === 0) {
      if (parent._searchMarker) {
        updateMarkerChanges(parent._searchMarker, index, content.length);
      }
      return typeListInsertGenericsAfter(transaction, parent, null, content);
    }
    const startIndex = index;
    const marker = findMarker(parent, index);
    let n = parent._start;
    if (marker !== null) {
      n = marker.p;
      index -= marker.index;
      if (index === 0) {
        n = n.prev;
        index += n && n.countable && !n.deleted ? n.length : 0;
      }
    }
    for (; n !== null; n = n.right) {
      if (!n.deleted && n.countable) {
        if (index <= n.length) {
          if (index < n.length) {
            getItemCleanStart(transaction, createID(n.id.client, n.id.clock + index));
          }
          break;
        }
        index -= n.length;
      }
    }
    if (parent._searchMarker) {
      updateMarkerChanges(parent._searchMarker, startIndex, content.length);
    }
    return typeListInsertGenericsAfter(transaction, parent, n, content);
  };
  var typeListPushGenerics = (transaction, parent, content) => {
    const marker = (parent._searchMarker || []).reduce((maxMarker, currMarker) => currMarker.index > maxMarker.index ? currMarker : maxMarker, { index: 0, p: parent._start });
    let n = marker.p;
    if (n) {
      while (n.right) {
        n = n.right;
      }
    }
    return typeListInsertGenericsAfter(transaction, parent, n, content);
  };
  var typeListDelete = (transaction, parent, index, length3) => {
    if (length3 === 0) {
      return;
    }
    const startIndex = index;
    const startLength = length3;
    const marker = findMarker(parent, index);
    let n = parent._start;
    if (marker !== null) {
      n = marker.p;
      index -= marker.index;
    }
    for (; n !== null && index > 0; n = n.right) {
      if (!n.deleted && n.countable) {
        if (index < n.length) {
          getItemCleanStart(transaction, createID(n.id.client, n.id.clock + index));
        }
        index -= n.length;
      }
    }
    while (length3 > 0 && n !== null) {
      if (!n.deleted) {
        if (length3 < n.length) {
          getItemCleanStart(transaction, createID(n.id.client, n.id.clock + length3));
        }
        n.delete(transaction);
        length3 -= n.length;
      }
      n = n.right;
    }
    if (length3 > 0) {
      throw lengthExceeded();
    }
    if (parent._searchMarker) {
      updateMarkerChanges(
        parent._searchMarker,
        startIndex,
        -startLength + length3
        /* in case we remove the above exception */
      );
    }
  };
  var typeMapDelete = (transaction, parent, key) => {
    const c = parent._map.get(key);
    if (c !== void 0) {
      c.delete(transaction);
    }
  };
  var typeMapSet = (transaction, parent, key, value) => {
    const left = parent._map.get(key) || null;
    const doc2 = transaction.doc;
    const ownClientId = doc2.clientID;
    let content;
    if (value == null) {
      content = new ContentAny([value]);
    } else {
      switch (value.constructor) {
        case Number:
        case Object:
        case Boolean:
        case Array:
        case String:
        case Date:
        case BigInt:
          content = new ContentAny([value]);
          break;
        case Uint8Array:
          content = new ContentBinary(
            /** @type {Uint8Array} */
            value
          );
          break;
        case Doc:
          content = new ContentDoc(
            /** @type {Doc} */
            value
          );
          break;
        default:
          if (value instanceof AbstractType) {
            content = new ContentType(value);
          } else {
            throw new Error("Unexpected content type");
          }
      }
    }
    new Item(createID(ownClientId, getState(doc2.store, ownClientId)), left, left && left.lastId, null, null, parent, key, content).integrate(transaction, 0);
  };
  var typeMapGet = (parent, key) => {
    parent.doc ?? warnPrematureAccess();
    const val = parent._map.get(key);
    return val !== void 0 && !val.deleted ? val.content.getContent()[val.length - 1] : void 0;
  };
  var typeMapGetAll = (parent) => {
    const res = {};
    parent.doc ?? warnPrematureAccess();
    parent._map.forEach((value, key) => {
      if (!value.deleted) {
        res[key] = value.content.getContent()[value.length - 1];
      }
    });
    return res;
  };
  var typeMapHas = (parent, key) => {
    parent.doc ?? warnPrematureAccess();
    const val = parent._map.get(key);
    return val !== void 0 && !val.deleted;
  };
  var typeMapGetSnapshot = (parent, key, snapshot2) => {
    let v = parent._map.get(key) || null;
    while (v !== null && (!snapshot2.sv.has(v.id.client) || v.id.clock >= (snapshot2.sv.get(v.id.client) || 0))) {
      v = v.left;
    }
    return v !== null && isVisible(v, snapshot2) ? v.content.getContent()[v.length - 1] : void 0;
  };
  var typeMapGetAllSnapshot = (parent, snapshot2) => {
    const res = {};
    parent._map.forEach((value, key) => {
      let v = value;
      while (v !== null && (!snapshot2.sv.has(v.id.client) || v.id.clock >= (snapshot2.sv.get(v.id.client) || 0))) {
        v = v.left;
      }
      if (v !== null && isVisible(v, snapshot2)) {
        res[key] = v.content.getContent()[v.length - 1];
      }
    });
    return res;
  };
  var createMapIterator = (type) => {
    type.doc ?? warnPrematureAccess();
    return iteratorFilter(
      type._map.entries(),
      /** @param {any} entry */
      (entry) => !entry[1].deleted
    );
  };
  var YArrayEvent = class extends YEvent {
  };
  var YArray = class _YArray extends AbstractType {
    constructor() {
      super();
      this._prelimContent = [];
      this._searchMarker = [];
    }
    /**
     * Construct a new YArray containing the specified items.
     * @template {Object<string,any>|Array<any>|number|null|string|Uint8Array} T
     * @param {Array<T>} items
     * @return {YArray<T>}
     */
    static from(items2) {
      const a = new _YArray();
      a.push(items2);
      return a;
    }
    /**
     * Integrate this type into the Yjs instance.
     *
     * * Save this struct in the os
     * * This type is sent to other client
     * * Observer functions are fired
     *
     * @param {Doc} y The Yjs instance
     * @param {Item} item
     */
    _integrate(y, item) {
      super._integrate(y, item);
      this.insert(
        0,
        /** @type {Array<any>} */
        this._prelimContent
      );
      this._prelimContent = null;
    }
    /**
     * @return {YArray<T>}
     */
    _copy() {
      return new _YArray();
    }
    /**
     * Makes a copy of this data type that can be included somewhere else.
     *
     * Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
     *
     * @return {YArray<T>}
     */
    clone() {
      const arr = new _YArray();
      arr.insert(0, this.toArray().map(
        (el) => el instanceof AbstractType ? (
          /** @type {typeof el} */
          el.clone()
        ) : el
      ));
      return arr;
    }
    get length() {
      this.doc ?? warnPrematureAccess();
      return this._length;
    }
    /**
     * Creates YArrayEvent and calls observers.
     *
     * @param {Transaction} transaction
     * @param {Set<null|string>} parentSubs Keys changed on this type. `null` if list was modified.
     */
    _callObserver(transaction, parentSubs) {
      super._callObserver(transaction, parentSubs);
      callTypeObservers(this, transaction, new YArrayEvent(this, transaction));
    }
    /**
     * Inserts new content at an index.
     *
     * Important: This function expects an array of content. Not just a content
     * object. The reason for this "weirdness" is that inserting several elements
     * is very efficient when it is done as a single operation.
     *
     * @example
     *  // Insert character 'a' at position 0
     *  yarray.insert(0, ['a'])
     *  // Insert numbers 1, 2 at position 1
     *  yarray.insert(1, [1, 2])
     *
     * @param {number} index The index to insert content at.
     * @param {Array<T>} content The array of content
     */
    insert(index, content) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          typeListInsertGenerics(
            transaction,
            this,
            index,
            /** @type {any} */
            content
          );
        });
      } else {
        this._prelimContent.splice(index, 0, ...content);
      }
    }
    /**
     * Appends content to this YArray.
     *
     * @param {Array<T>} content Array of content to append.
     *
     * @todo Use the following implementation in all types.
     */
    push(content) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          typeListPushGenerics(
            transaction,
            this,
            /** @type {any} */
            content
          );
        });
      } else {
        this._prelimContent.push(...content);
      }
    }
    /**
     * Prepends content to this YArray.
     *
     * @param {Array<T>} content Array of content to prepend.
     */
    unshift(content) {
      this.insert(0, content);
    }
    /**
     * Deletes elements starting from an index.
     *
     * @param {number} index Index at which to start deleting elements
     * @param {number} length The number of elements to remove. Defaults to 1.
     */
    delete(index, length3 = 1) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          typeListDelete(transaction, this, index, length3);
        });
      } else {
        this._prelimContent.splice(index, length3);
      }
    }
    /**
     * Returns the i-th element from a YArray.
     *
     * @param {number} index The index of the element to return from the YArray
     * @return {T}
     */
    get(index) {
      return typeListGet(this, index);
    }
    /**
     * Transforms this YArray to a JavaScript Array.
     *
     * @return {Array<T>}
     */
    toArray() {
      return typeListToArray(this);
    }
    /**
     * Returns a portion of this YArray into a JavaScript Array selected
     * from start to end (end not included).
     *
     * @param {number} [start]
     * @param {number} [end]
     * @return {Array<T>}
     */
    slice(start = 0, end = this.length) {
      return typeListSlice(this, start, end);
    }
    /**
     * Transforms this Shared Type to a JSON object.
     *
     * @return {Array<any>}
     */
    toJSON() {
      return this.map((c) => c instanceof AbstractType ? c.toJSON() : c);
    }
    /**
     * Returns an Array with the result of calling a provided function on every
     * element of this YArray.
     *
     * @template M
     * @param {function(T,number,YArray<T>):M} f Function that produces an element of the new Array
     * @return {Array<M>} A new array with each element being the result of the
     *                 callback function
     */
    map(f) {
      return typeListMap(
        this,
        /** @type {any} */
        f
      );
    }
    /**
     * Executes a provided function once on every element of this YArray.
     *
     * @param {function(T,number,YArray<T>):void} f A function to execute on every element of this YArray.
     */
    forEach(f) {
      typeListForEach(this, f);
    }
    /**
     * @return {IterableIterator<T>}
     */
    [Symbol.iterator]() {
      return typeListCreateIterator(this);
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     */
    _write(encoder) {
      encoder.writeTypeRef(YArrayRefID);
    }
  };
  var readYArray = (_decoder) => new YArray();
  var YMapEvent = class extends YEvent {
    /**
     * @param {YMap<T>} ymap The YArray that changed.
     * @param {Transaction} transaction
     * @param {Set<any>} subs The keys that changed.
     */
    constructor(ymap, transaction, subs) {
      super(ymap, transaction);
      this.keysChanged = subs;
    }
  };
  var YMap = class _YMap extends AbstractType {
    /**
     *
     * @param {Iterable<readonly [string, any]>=} entries - an optional iterable to initialize the YMap
     */
    constructor(entries) {
      super();
      this._prelimContent = null;
      if (entries === void 0) {
        this._prelimContent = /* @__PURE__ */ new Map();
      } else {
        this._prelimContent = new Map(entries);
      }
    }
    /**
     * Integrate this type into the Yjs instance.
     *
     * * Save this struct in the os
     * * This type is sent to other client
     * * Observer functions are fired
     *
     * @param {Doc} y The Yjs instance
     * @param {Item} item
     */
    _integrate(y, item) {
      super._integrate(y, item);
      this._prelimContent.forEach((value, key) => {
        this.set(key, value);
      });
      this._prelimContent = null;
    }
    /**
     * @return {YMap<MapType>}
     */
    _copy() {
      return new _YMap();
    }
    /**
     * Makes a copy of this data type that can be included somewhere else.
     *
     * Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
     *
     * @return {YMap<MapType>}
     */
    clone() {
      const map2 = new _YMap();
      this.forEach((value, key) => {
        map2.set(key, value instanceof AbstractType ? (
          /** @type {typeof value} */
          value.clone()
        ) : value);
      });
      return map2;
    }
    /**
     * Creates YMapEvent and calls observers.
     *
     * @param {Transaction} transaction
     * @param {Set<null|string>} parentSubs Keys changed on this type. `null` if list was modified.
     */
    _callObserver(transaction, parentSubs) {
      callTypeObservers(this, transaction, new YMapEvent(this, transaction, parentSubs));
    }
    /**
     * Transforms this Shared Type to a JSON object.
     *
     * @return {Object<string,any>}
     */
    toJSON() {
      this.doc ?? warnPrematureAccess();
      const map2 = {};
      this._map.forEach((item, key) => {
        if (!item.deleted) {
          const v = item.content.getContent()[item.length - 1];
          map2[key] = v instanceof AbstractType ? v.toJSON() : v;
        }
      });
      return map2;
    }
    /**
     * Returns the size of the YMap (count of key/value pairs)
     *
     * @return {number}
     */
    get size() {
      return [...createMapIterator(this)].length;
    }
    /**
     * Returns the keys for each element in the YMap Type.
     *
     * @return {IterableIterator<string>}
     */
    keys() {
      return iteratorMap(
        createMapIterator(this),
        /** @param {any} v */
        (v) => v[0]
      );
    }
    /**
     * Returns the values for each element in the YMap Type.
     *
     * @return {IterableIterator<MapType>}
     */
    values() {
      return iteratorMap(
        createMapIterator(this),
        /** @param {any} v */
        (v) => v[1].content.getContent()[v[1].length - 1]
      );
    }
    /**
     * Returns an Iterator of [key, value] pairs
     *
     * @return {IterableIterator<[string, MapType]>}
     */
    entries() {
      return iteratorMap(
        createMapIterator(this),
        /** @param {any} v */
        (v) => (
          /** @type {any} */
          [v[0], v[1].content.getContent()[v[1].length - 1]]
        )
      );
    }
    /**
     * Executes a provided function on once on every key-value pair.
     *
     * @param {function(MapType,string,YMap<MapType>):void} f A function to execute on every element of this YArray.
     */
    forEach(f) {
      this.doc ?? warnPrematureAccess();
      this._map.forEach((item, key) => {
        if (!item.deleted) {
          f(item.content.getContent()[item.length - 1], key, this);
        }
      });
    }
    /**
     * Returns an Iterator of [key, value] pairs
     *
     * @return {IterableIterator<[string, MapType]>}
     */
    [Symbol.iterator]() {
      return this.entries();
    }
    /**
     * Remove a specified element from this YMap.
     *
     * @param {string} key The key of the element to remove.
     */
    delete(key) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          typeMapDelete(transaction, this, key);
        });
      } else {
        this._prelimContent.delete(key);
      }
    }
    /**
     * Adds or updates an element with a specified key and value.
     * @template {MapType} VAL
     *
     * @param {string} key The key of the element to add to this YMap
     * @param {VAL} value The value of the element to add
     * @return {VAL}
     */
    set(key, value) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          typeMapSet(
            transaction,
            this,
            key,
            /** @type {any} */
            value
          );
        });
      } else {
        this._prelimContent.set(key, value);
      }
      return value;
    }
    /**
     * Returns a specified element from this YMap.
     *
     * @param {string} key
     * @return {MapType|undefined}
     */
    get(key) {
      return (
        /** @type {any} */
        typeMapGet(this, key)
      );
    }
    /**
     * Returns a boolean indicating whether the specified key exists or not.
     *
     * @param {string} key The key to test.
     * @return {boolean}
     */
    has(key) {
      return typeMapHas(this, key);
    }
    /**
     * Removes all elements from this YMap.
     */
    clear() {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          this.forEach(function(_value, key, map2) {
            typeMapDelete(transaction, map2, key);
          });
        });
      } else {
        this._prelimContent.clear();
      }
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     */
    _write(encoder) {
      encoder.writeTypeRef(YMapRefID);
    }
  };
  var readYMap = (_decoder) => new YMap();
  var equalAttrs = (a, b) => a === b || typeof a === "object" && typeof b === "object" && a && b && equalFlat(a, b);
  var ItemTextListPosition = class {
    /**
     * @param {Item|null} left
     * @param {Item|null} right
     * @param {number} index
     * @param {Map<string,any>} currentAttributes
     */
    constructor(left, right, index, currentAttributes) {
      this.left = left;
      this.right = right;
      this.index = index;
      this.currentAttributes = currentAttributes;
    }
    /**
     * Only call this if you know that this.right is defined
     */
    forward() {
      if (this.right === null) {
        unexpectedCase();
      }
      switch (this.right.content.constructor) {
        case ContentFormat:
          if (!this.right.deleted) {
            updateCurrentAttributes(
              this.currentAttributes,
              /** @type {ContentFormat} */
              this.right.content
            );
          }
          break;
        default:
          if (!this.right.deleted) {
            this.index += this.right.length;
          }
          break;
      }
      this.left = this.right;
      this.right = this.right.right;
    }
  };
  var findNextPosition = (transaction, pos, count) => {
    while (pos.right !== null && count > 0) {
      switch (pos.right.content.constructor) {
        case ContentFormat:
          if (!pos.right.deleted) {
            updateCurrentAttributes(
              pos.currentAttributes,
              /** @type {ContentFormat} */
              pos.right.content
            );
          }
          break;
        default:
          if (!pos.right.deleted) {
            if (count < pos.right.length) {
              getItemCleanStart(transaction, createID(pos.right.id.client, pos.right.id.clock + count));
            }
            pos.index += pos.right.length;
            count -= pos.right.length;
          }
          break;
      }
      pos.left = pos.right;
      pos.right = pos.right.right;
    }
    return pos;
  };
  var findPosition = (transaction, parent, index, useSearchMarker) => {
    const currentAttributes = /* @__PURE__ */ new Map();
    const marker = useSearchMarker ? findMarker(parent, index) : null;
    if (marker) {
      const pos = new ItemTextListPosition(marker.p.left, marker.p, marker.index, currentAttributes);
      return findNextPosition(transaction, pos, index - marker.index);
    } else {
      const pos = new ItemTextListPosition(null, parent._start, 0, currentAttributes);
      return findNextPosition(transaction, pos, index);
    }
  };
  var insertNegatedAttributes = (transaction, parent, currPos, negatedAttributes) => {
    while (currPos.right !== null && (currPos.right.deleted === true || currPos.right.content.constructor === ContentFormat && equalAttrs(
      negatedAttributes.get(
        /** @type {ContentFormat} */
        currPos.right.content.key
      ),
      /** @type {ContentFormat} */
      currPos.right.content.value
    ))) {
      if (!currPos.right.deleted) {
        negatedAttributes.delete(
          /** @type {ContentFormat} */
          currPos.right.content.key
        );
      }
      currPos.forward();
    }
    const doc2 = transaction.doc;
    const ownClientId = doc2.clientID;
    negatedAttributes.forEach((val, key) => {
      const left = currPos.left;
      const right = currPos.right;
      const nextFormat = new Item(createID(ownClientId, getState(doc2.store, ownClientId)), left, left && left.lastId, right, right && right.id, parent, null, new ContentFormat(key, val));
      nextFormat.integrate(transaction, 0);
      currPos.right = nextFormat;
      currPos.forward();
    });
  };
  var updateCurrentAttributes = (currentAttributes, format) => {
    const { key, value } = format;
    if (value === null) {
      currentAttributes.delete(key);
    } else {
      currentAttributes.set(key, value);
    }
  };
  var minimizeAttributeChanges = (currPos, attributes) => {
    while (true) {
      if (currPos.right === null) {
        break;
      } else if (currPos.right.deleted || currPos.right.content.constructor === ContentFormat && equalAttrs(
        attributes[
          /** @type {ContentFormat} */
          currPos.right.content.key
        ] ?? null,
        /** @type {ContentFormat} */
        currPos.right.content.value
      )) ;
      else {
        break;
      }
      currPos.forward();
    }
  };
  var insertAttributes = (transaction, parent, currPos, attributes) => {
    const doc2 = transaction.doc;
    const ownClientId = doc2.clientID;
    const negatedAttributes = /* @__PURE__ */ new Map();
    for (const key in attributes) {
      const val = attributes[key];
      const currentVal = currPos.currentAttributes.get(key) ?? null;
      if (!equalAttrs(currentVal, val)) {
        negatedAttributes.set(key, currentVal);
        const { left, right } = currPos;
        currPos.right = new Item(createID(ownClientId, getState(doc2.store, ownClientId)), left, left && left.lastId, right, right && right.id, parent, null, new ContentFormat(key, val));
        currPos.right.integrate(transaction, 0);
        currPos.forward();
      }
    }
    return negatedAttributes;
  };
  var insertText = (transaction, parent, currPos, text2, attributes) => {
    currPos.currentAttributes.forEach((_val, key) => {
      if (attributes[key] === void 0) {
        attributes[key] = null;
      }
    });
    const doc2 = transaction.doc;
    const ownClientId = doc2.clientID;
    minimizeAttributeChanges(currPos, attributes);
    const negatedAttributes = insertAttributes(transaction, parent, currPos, attributes);
    const content = text2.constructor === String ? new ContentString(
      /** @type {string} */
      text2
    ) : text2 instanceof AbstractType ? new ContentType(text2) : new ContentEmbed(text2);
    let { left, right, index } = currPos;
    if (parent._searchMarker) {
      updateMarkerChanges(parent._searchMarker, currPos.index, content.getLength());
    }
    right = new Item(createID(ownClientId, getState(doc2.store, ownClientId)), left, left && left.lastId, right, right && right.id, parent, null, content);
    right.integrate(transaction, 0);
    currPos.right = right;
    currPos.index = index;
    currPos.forward();
    insertNegatedAttributes(transaction, parent, currPos, negatedAttributes);
  };
  var formatText = (transaction, parent, currPos, length3, attributes) => {
    const doc2 = transaction.doc;
    const ownClientId = doc2.clientID;
    minimizeAttributeChanges(currPos, attributes);
    const negatedAttributes = insertAttributes(transaction, parent, currPos, attributes);
    iterationLoop: while (currPos.right !== null && (length3 > 0 || negatedAttributes.size > 0 && (currPos.right.deleted || currPos.right.content.constructor === ContentFormat))) {
      if (!currPos.right.deleted) {
        switch (currPos.right.content.constructor) {
          case ContentFormat: {
            const { key, value } = (
              /** @type {ContentFormat} */
              currPos.right.content
            );
            const attr = attributes[key];
            if (attr !== void 0) {
              if (equalAttrs(attr, value)) {
                negatedAttributes.delete(key);
              } else {
                if (length3 === 0) {
                  break iterationLoop;
                }
                negatedAttributes.set(key, value);
              }
              currPos.right.delete(transaction);
            } else {
              currPos.currentAttributes.set(key, value);
            }
            break;
          }
          default:
            if (length3 < currPos.right.length) {
              getItemCleanStart(transaction, createID(currPos.right.id.client, currPos.right.id.clock + length3));
            }
            length3 -= currPos.right.length;
            break;
        }
      }
      currPos.forward();
    }
    if (length3 > 0) {
      let newlines = "";
      for (; length3 > 0; length3--) {
        newlines += "\n";
      }
      currPos.right = new Item(createID(ownClientId, getState(doc2.store, ownClientId)), currPos.left, currPos.left && currPos.left.lastId, currPos.right, currPos.right && currPos.right.id, parent, null, new ContentString(newlines));
      currPos.right.integrate(transaction, 0);
      currPos.forward();
    }
    insertNegatedAttributes(transaction, parent, currPos, negatedAttributes);
  };
  var cleanupFormattingGap = (transaction, start, curr, startAttributes, currAttributes) => {
    let end = start;
    const endFormats = create();
    while (end && (!end.countable || end.deleted)) {
      if (!end.deleted && end.content.constructor === ContentFormat) {
        const cf = (
          /** @type {ContentFormat} */
          end.content
        );
        endFormats.set(cf.key, cf);
      }
      end = end.right;
    }
    let cleanups = 0;
    let reachedCurr = false;
    while (start !== end) {
      if (curr === start) {
        reachedCurr = true;
      }
      if (!start.deleted) {
        const content = start.content;
        switch (content.constructor) {
          case ContentFormat: {
            const { key, value } = (
              /** @type {ContentFormat} */
              content
            );
            const startAttrValue = startAttributes.get(key) ?? null;
            if (endFormats.get(key) !== content || startAttrValue === value) {
              start.delete(transaction);
              cleanups++;
              if (!reachedCurr && (currAttributes.get(key) ?? null) === value && startAttrValue !== value) {
                if (startAttrValue === null) {
                  currAttributes.delete(key);
                } else {
                  currAttributes.set(key, startAttrValue);
                }
              }
            }
            if (!reachedCurr && !start.deleted) {
              updateCurrentAttributes(
                currAttributes,
                /** @type {ContentFormat} */
                content
              );
            }
            break;
          }
        }
      }
      start = /** @type {Item} */
      start.right;
    }
    return cleanups;
  };
  var cleanupContextlessFormattingGap = (transaction, item) => {
    while (item && item.right && (item.right.deleted || !item.right.countable)) {
      item = item.right;
    }
    const attrs = /* @__PURE__ */ new Set();
    while (item && (item.deleted || !item.countable)) {
      if (!item.deleted && item.content.constructor === ContentFormat) {
        const key = (
          /** @type {ContentFormat} */
          item.content.key
        );
        if (attrs.has(key)) {
          item.delete(transaction);
        } else {
          attrs.add(key);
        }
      }
      item = item.left;
    }
  };
  var cleanupYTextFormatting = (type) => {
    let res = 0;
    transact(
      /** @type {Doc} */
      type.doc,
      (transaction) => {
        let start = (
          /** @type {Item} */
          type._start
        );
        let end = type._start;
        let startAttributes = create();
        const currentAttributes = copy(startAttributes);
        while (end) {
          if (end.deleted === false) {
            switch (end.content.constructor) {
              case ContentFormat:
                updateCurrentAttributes(
                  currentAttributes,
                  /** @type {ContentFormat} */
                  end.content
                );
                break;
              default:
                res += cleanupFormattingGap(transaction, start, end, startAttributes, currentAttributes);
                startAttributes = copy(currentAttributes);
                start = end;
                break;
            }
          }
          end = end.right;
        }
      }
    );
    return res;
  };
  var cleanupYTextAfterTransaction = (transaction) => {
    const needFullCleanup = /* @__PURE__ */ new Set();
    const doc2 = transaction.doc;
    for (const [client, afterClock] of transaction.afterState.entries()) {
      const clock = transaction.beforeState.get(client) || 0;
      if (afterClock === clock) {
        continue;
      }
      iterateStructs(
        transaction,
        /** @type {Array<Item|GC>} */
        doc2.store.clients.get(client),
        clock,
        afterClock,
        (item) => {
          if (!item.deleted && /** @type {Item} */
          item.content.constructor === ContentFormat && item.constructor !== GC) {
            needFullCleanup.add(
              /** @type {any} */
              item.parent
            );
          }
        }
      );
    }
    transact(doc2, (t) => {
      iterateDeletedStructs(transaction, transaction.deleteSet, (item) => {
        if (item instanceof GC || !/** @type {YText} */
        item.parent._hasFormatting || needFullCleanup.has(
          /** @type {YText} */
          item.parent
        )) {
          return;
        }
        const parent = (
          /** @type {YText} */
          item.parent
        );
        if (item.content.constructor === ContentFormat) {
          needFullCleanup.add(parent);
        } else {
          cleanupContextlessFormattingGap(t, item);
        }
      });
      for (const yText of needFullCleanup) {
        cleanupYTextFormatting(yText);
      }
    });
  };
  var deleteText = (transaction, currPos, length3) => {
    const startLength = length3;
    const startAttrs = copy(currPos.currentAttributes);
    const start = currPos.right;
    while (length3 > 0 && currPos.right !== null) {
      if (currPos.right.deleted === false) {
        switch (currPos.right.content.constructor) {
          case ContentType:
          case ContentEmbed:
          case ContentString:
            if (length3 < currPos.right.length) {
              getItemCleanStart(transaction, createID(currPos.right.id.client, currPos.right.id.clock + length3));
            }
            length3 -= currPos.right.length;
            currPos.right.delete(transaction);
            break;
        }
      }
      currPos.forward();
    }
    if (start) {
      cleanupFormattingGap(transaction, start, currPos.right, startAttrs, currPos.currentAttributes);
    }
    const parent = (
      /** @type {AbstractType<any>} */
      /** @type {Item} */
      (currPos.left || currPos.right).parent
    );
    if (parent._searchMarker) {
      updateMarkerChanges(parent._searchMarker, currPos.index, -startLength + length3);
    }
    return currPos;
  };
  var YTextEvent = class extends YEvent {
    /**
     * @param {YText} ytext
     * @param {Transaction} transaction
     * @param {Set<any>} subs The keys that changed
     */
    constructor(ytext, transaction, subs) {
      super(ytext, transaction);
      this.childListChanged = false;
      this.keysChanged = /* @__PURE__ */ new Set();
      subs.forEach((sub) => {
        if (sub === null) {
          this.childListChanged = true;
        } else {
          this.keysChanged.add(sub);
        }
      });
    }
    /**
     * @type {{added:Set<Item>,deleted:Set<Item>,keys:Map<string,{action:'add'|'update'|'delete',oldValue:any}>,delta:Array<{insert?:Array<any>|string, delete?:number, retain?:number}>}}
     */
    get changes() {
      if (this._changes === null) {
        const changes = {
          keys: this.keys,
          delta: this.delta,
          added: /* @__PURE__ */ new Set(),
          deleted: /* @__PURE__ */ new Set()
        };
        this._changes = changes;
      }
      return (
        /** @type {any} */
        this._changes
      );
    }
    /**
     * Compute the changes in the delta format.
     * A {@link https://quilljs.com/docs/delta/|Quill Delta}) that represents the changes on the document.
     *
     * @type {Array<{insert?:string|object|AbstractType<any>, delete?:number, retain?:number, attributes?: Object<string,any>}>}
     *
     * @public
     */
    get delta() {
      if (this._delta === null) {
        const y = (
          /** @type {Doc} */
          this.target.doc
        );
        const delta = [];
        transact(y, (transaction) => {
          const currentAttributes = /* @__PURE__ */ new Map();
          const oldAttributes = /* @__PURE__ */ new Map();
          let item = this.target._start;
          let action = null;
          const attributes = {};
          let insert2 = "";
          let retain = 0;
          let deleteLen = 0;
          const addOp = () => {
            if (action !== null) {
              let op = null;
              switch (action) {
                case "delete":
                  if (deleteLen > 0) {
                    op = { delete: deleteLen };
                  }
                  deleteLen = 0;
                  break;
                case "insert":
                  if (typeof insert2 === "object" || insert2.length > 0) {
                    op = { insert: insert2 };
                    if (currentAttributes.size > 0) {
                      op.attributes = {};
                      currentAttributes.forEach((value, key) => {
                        if (value !== null) {
                          op.attributes[key] = value;
                        }
                      });
                    }
                  }
                  insert2 = "";
                  break;
                case "retain":
                  if (retain > 0) {
                    op = { retain };
                    if (!isEmpty(attributes)) {
                      op.attributes = assign({}, attributes);
                    }
                  }
                  retain = 0;
                  break;
              }
              if (op) delta.push(op);
              action = null;
            }
          };
          while (item !== null) {
            switch (item.content.constructor) {
              case ContentType:
              case ContentEmbed:
                if (this.adds(item)) {
                  if (!this.deletes(item)) {
                    addOp();
                    action = "insert";
                    insert2 = item.content.getContent()[0];
                    addOp();
                  }
                } else if (this.deletes(item)) {
                  if (action !== "delete") {
                    addOp();
                    action = "delete";
                  }
                  deleteLen += 1;
                } else if (!item.deleted) {
                  if (action !== "retain") {
                    addOp();
                    action = "retain";
                  }
                  retain += 1;
                }
                break;
              case ContentString:
                if (this.adds(item)) {
                  if (!this.deletes(item)) {
                    if (action !== "insert") {
                      addOp();
                      action = "insert";
                    }
                    insert2 += /** @type {ContentString} */
                    item.content.str;
                  }
                } else if (this.deletes(item)) {
                  if (action !== "delete") {
                    addOp();
                    action = "delete";
                  }
                  deleteLen += item.length;
                } else if (!item.deleted) {
                  if (action !== "retain") {
                    addOp();
                    action = "retain";
                  }
                  retain += item.length;
                }
                break;
              case ContentFormat: {
                const { key, value } = (
                  /** @type {ContentFormat} */
                  item.content
                );
                if (this.adds(item)) {
                  if (!this.deletes(item)) {
                    const curVal = currentAttributes.get(key) ?? null;
                    if (!equalAttrs(curVal, value)) {
                      if (action === "retain") {
                        addOp();
                      }
                      if (equalAttrs(value, oldAttributes.get(key) ?? null)) {
                        delete attributes[key];
                      } else {
                        attributes[key] = value;
                      }
                    } else if (value !== null) {
                      item.delete(transaction);
                    }
                  }
                } else if (this.deletes(item)) {
                  oldAttributes.set(key, value);
                  const curVal = currentAttributes.get(key) ?? null;
                  if (!equalAttrs(curVal, value)) {
                    if (action === "retain") {
                      addOp();
                    }
                    attributes[key] = curVal;
                  }
                } else if (!item.deleted) {
                  oldAttributes.set(key, value);
                  const attr = attributes[key];
                  if (attr !== void 0) {
                    if (!equalAttrs(attr, value)) {
                      if (action === "retain") {
                        addOp();
                      }
                      if (value === null) {
                        delete attributes[key];
                      } else {
                        attributes[key] = value;
                      }
                    } else if (attr !== null) {
                      item.delete(transaction);
                    }
                  }
                }
                if (!item.deleted) {
                  if (action === "insert") {
                    addOp();
                  }
                  updateCurrentAttributes(
                    currentAttributes,
                    /** @type {ContentFormat} */
                    item.content
                  );
                }
                break;
              }
            }
            item = item.right;
          }
          addOp();
          while (delta.length > 0) {
            const lastOp = delta[delta.length - 1];
            if (lastOp.retain !== void 0 && lastOp.attributes === void 0) {
              delta.pop();
            } else {
              break;
            }
          }
        });
        this._delta = delta;
      }
      return (
        /** @type {any} */
        this._delta
      );
    }
  };
  var YText = class _YText extends AbstractType {
    /**
     * @param {String} [string] The initial value of the YText.
     */
    constructor(string) {
      super();
      this._pending = string !== void 0 ? [() => this.insert(0, string)] : [];
      this._searchMarker = [];
      this._hasFormatting = false;
    }
    /**
     * Number of characters of this text type.
     *
     * @type {number}
     */
    get length() {
      this.doc ?? warnPrematureAccess();
      return this._length;
    }
    /**
     * @param {Doc} y
     * @param {Item} item
     */
    _integrate(y, item) {
      super._integrate(y, item);
      try {
        this._pending.forEach((f) => f());
      } catch (e) {
        console.error(e);
      }
      this._pending = null;
    }
    _copy() {
      return new _YText();
    }
    /**
     * Makes a copy of this data type that can be included somewhere else.
     *
     * Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
     *
     * @return {YText}
     */
    clone() {
      const text2 = new _YText();
      text2.applyDelta(this.toDelta());
      return text2;
    }
    /**
     * Creates YTextEvent and calls observers.
     *
     * @param {Transaction} transaction
     * @param {Set<null|string>} parentSubs Keys changed on this type. `null` if list was modified.
     */
    _callObserver(transaction, parentSubs) {
      super._callObserver(transaction, parentSubs);
      const event = new YTextEvent(this, transaction, parentSubs);
      callTypeObservers(this, transaction, event);
      if (!transaction.local && this._hasFormatting) {
        transaction._needFormattingCleanup = true;
      }
    }
    /**
     * Returns the unformatted string representation of this YText type.
     *
     * @public
     */
    toString() {
      this.doc ?? warnPrematureAccess();
      let str = "";
      let n = this._start;
      while (n !== null) {
        if (!n.deleted && n.countable && n.content.constructor === ContentString) {
          str += /** @type {ContentString} */
          n.content.str;
        }
        n = n.right;
      }
      return str;
    }
    /**
     * Returns the unformatted string representation of this YText type.
     *
     * @return {string}
     * @public
     */
    toJSON() {
      return this.toString();
    }
    /**
     * Apply a {@link Delta} on this shared YText type.
     *
     * @param {Array<any>} delta The changes to apply on this element.
     * @param {object}  opts
     * @param {boolean} [opts.sanitize] Sanitize input delta. Removes ending newlines if set to true.
     *
     *
     * @public
     */
    applyDelta(delta, { sanitize = true } = {}) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          const currPos = new ItemTextListPosition(null, this._start, 0, /* @__PURE__ */ new Map());
          for (let i = 0; i < delta.length; i++) {
            const op = delta[i];
            if (op.insert !== void 0) {
              const ins = !sanitize && typeof op.insert === "string" && i === delta.length - 1 && currPos.right === null && op.insert.slice(-1) === "\n" ? op.insert.slice(0, -1) : op.insert;
              if (typeof ins !== "string" || ins.length > 0) {
                insertText(transaction, this, currPos, ins, op.attributes || {});
              }
            } else if (op.retain !== void 0) {
              formatText(transaction, this, currPos, op.retain, op.attributes || {});
            } else if (op.delete !== void 0) {
              deleteText(transaction, currPos, op.delete);
            }
          }
        });
      } else {
        this._pending.push(() => this.applyDelta(delta));
      }
    }
    /**
     * Returns the Delta representation of this YText type.
     *
     * @param {Snapshot} [snapshot]
     * @param {Snapshot} [prevSnapshot]
     * @param {function('removed' | 'added', ID):any} [computeYChange]
     * @return {any} The Delta representation of this type.
     *
     * @public
     */
    toDelta(snapshot2, prevSnapshot, computeYChange) {
      this.doc ?? warnPrematureAccess();
      const ops = [];
      const currentAttributes = /* @__PURE__ */ new Map();
      const doc2 = (
        /** @type {Doc} */
        this.doc
      );
      let str = "";
      let n = this._start;
      function packStr() {
        if (str.length > 0) {
          const attributes = {};
          let addAttributes = false;
          currentAttributes.forEach((value, key) => {
            addAttributes = true;
            attributes[key] = value;
          });
          const op = { insert: str };
          if (addAttributes) {
            op.attributes = attributes;
          }
          ops.push(op);
          str = "";
        }
      }
      const computeDelta = () => {
        while (n !== null) {
          if (isVisible(n, snapshot2) || prevSnapshot !== void 0 && isVisible(n, prevSnapshot)) {
            switch (n.content.constructor) {
              case ContentString: {
                const cur = currentAttributes.get("ychange");
                if (snapshot2 !== void 0 && !isVisible(n, snapshot2)) {
                  if (cur === void 0 || cur.user !== n.id.client || cur.type !== "removed") {
                    packStr();
                    currentAttributes.set("ychange", computeYChange ? computeYChange("removed", n.id) : { type: "removed" });
                  }
                } else if (prevSnapshot !== void 0 && !isVisible(n, prevSnapshot)) {
                  if (cur === void 0 || cur.user !== n.id.client || cur.type !== "added") {
                    packStr();
                    currentAttributes.set("ychange", computeYChange ? computeYChange("added", n.id) : { type: "added" });
                  }
                } else if (cur !== void 0) {
                  packStr();
                  currentAttributes.delete("ychange");
                }
                str += /** @type {ContentString} */
                n.content.str;
                break;
              }
              case ContentType:
              case ContentEmbed: {
                packStr();
                const op = {
                  insert: n.content.getContent()[0]
                };
                if (currentAttributes.size > 0) {
                  const attrs = (
                    /** @type {Object<string,any>} */
                    {}
                  );
                  op.attributes = attrs;
                  currentAttributes.forEach((value, key) => {
                    attrs[key] = value;
                  });
                }
                ops.push(op);
                break;
              }
              case ContentFormat:
                if (isVisible(n, snapshot2)) {
                  packStr();
                  updateCurrentAttributes(
                    currentAttributes,
                    /** @type {ContentFormat} */
                    n.content
                  );
                }
                break;
            }
          }
          n = n.right;
        }
        packStr();
      };
      if (snapshot2 || prevSnapshot) {
        transact(doc2, (transaction) => {
          if (snapshot2) {
            splitSnapshotAffectedStructs(transaction, snapshot2);
          }
          if (prevSnapshot) {
            splitSnapshotAffectedStructs(transaction, prevSnapshot);
          }
          computeDelta();
        }, "cleanup");
      } else {
        computeDelta();
      }
      return ops;
    }
    /**
     * Insert text at a given index.
     *
     * @param {number} index The index at which to start inserting.
     * @param {String} text The text to insert at the specified position.
     * @param {TextAttributes} [attributes] Optionally define some formatting
     *                                    information to apply on the inserted
     *                                    Text.
     * @public
     */
    insert(index, text2, attributes) {
      if (text2.length <= 0) {
        return;
      }
      const y = this.doc;
      if (y !== null) {
        transact(y, (transaction) => {
          const pos = findPosition(transaction, this, index, !attributes);
          if (!attributes) {
            attributes = {};
            pos.currentAttributes.forEach((v, k) => {
              attributes[k] = v;
            });
          }
          insertText(transaction, this, pos, text2, attributes);
        });
      } else {
        this._pending.push(() => this.insert(index, text2, attributes));
      }
    }
    /**
     * Inserts an embed at a index.
     *
     * @param {number} index The index to insert the embed at.
     * @param {Object | AbstractType<any>} embed The Object that represents the embed.
     * @param {TextAttributes} [attributes] Attribute information to apply on the
     *                                    embed
     *
     * @public
     */
    insertEmbed(index, embed, attributes) {
      const y = this.doc;
      if (y !== null) {
        transact(y, (transaction) => {
          const pos = findPosition(transaction, this, index, !attributes);
          insertText(transaction, this, pos, embed, attributes || {});
        });
      } else {
        this._pending.push(() => this.insertEmbed(index, embed, attributes || {}));
      }
    }
    /**
     * Deletes text starting from an index.
     *
     * @param {number} index Index at which to start deleting.
     * @param {number} length The number of characters to remove. Defaults to 1.
     *
     * @public
     */
    delete(index, length3) {
      if (length3 === 0) {
        return;
      }
      const y = this.doc;
      if (y !== null) {
        transact(y, (transaction) => {
          deleteText(transaction, findPosition(transaction, this, index, true), length3);
        });
      } else {
        this._pending.push(() => this.delete(index, length3));
      }
    }
    /**
     * Assigns properties to a range of text.
     *
     * @param {number} index The position where to start formatting.
     * @param {number} length The amount of characters to assign properties to.
     * @param {TextAttributes} attributes Attribute information to apply on the
     *                                    text.
     *
     * @public
     */
    format(index, length3, attributes) {
      if (length3 === 0) {
        return;
      }
      const y = this.doc;
      if (y !== null) {
        transact(y, (transaction) => {
          const pos = findPosition(transaction, this, index, false);
          if (pos.right === null) {
            return;
          }
          formatText(transaction, this, pos, length3, attributes);
        });
      } else {
        this._pending.push(() => this.format(index, length3, attributes));
      }
    }
    /**
     * Removes an attribute.
     *
     * @note Xml-Text nodes don't have attributes. You can use this feature to assign properties to complete text-blocks.
     *
     * @param {String} attributeName The attribute name that is to be removed.
     *
     * @public
     */
    removeAttribute(attributeName) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          typeMapDelete(transaction, this, attributeName);
        });
      } else {
        this._pending.push(() => this.removeAttribute(attributeName));
      }
    }
    /**
     * Sets or updates an attribute.
     *
     * @note Xml-Text nodes don't have attributes. You can use this feature to assign properties to complete text-blocks.
     *
     * @param {String} attributeName The attribute name that is to be set.
     * @param {any} attributeValue The attribute value that is to be set.
     *
     * @public
     */
    setAttribute(attributeName, attributeValue) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          typeMapSet(transaction, this, attributeName, attributeValue);
        });
      } else {
        this._pending.push(() => this.setAttribute(attributeName, attributeValue));
      }
    }
    /**
     * Returns an attribute value that belongs to the attribute name.
     *
     * @note Xml-Text nodes don't have attributes. You can use this feature to assign properties to complete text-blocks.
     *
     * @param {String} attributeName The attribute name that identifies the
     *                               queried value.
     * @return {any} The queried attribute value.
     *
     * @public
     */
    getAttribute(attributeName) {
      return (
        /** @type {any} */
        typeMapGet(this, attributeName)
      );
    }
    /**
     * Returns all attribute name/value pairs in a JSON Object.
     *
     * @note Xml-Text nodes don't have attributes. You can use this feature to assign properties to complete text-blocks.
     *
     * @return {Object<string, any>} A JSON Object that describes the attributes.
     *
     * @public
     */
    getAttributes() {
      return typeMapGetAll(this);
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     */
    _write(encoder) {
      encoder.writeTypeRef(YTextRefID);
    }
  };
  var readYText = (_decoder) => new YText();
  var YXmlTreeWalker = class {
    /**
     * @param {YXmlFragment | YXmlElement} root
     * @param {function(AbstractType<any>):boolean} [f]
     */
    constructor(root, f = () => true) {
      this._filter = f;
      this._root = root;
      this._currentNode = /** @type {Item} */
      root._start;
      this._firstCall = true;
      root.doc ?? warnPrematureAccess();
    }
    [Symbol.iterator]() {
      return this;
    }
    /**
     * Get the next node.
     *
     * @return {IteratorResult<YXmlElement|YXmlText|YXmlHook>} The next node.
     *
     * @public
     */
    next() {
      let n = this._currentNode;
      let type = n && n.content && /** @type {any} */
      n.content.type;
      if (n !== null && (!this._firstCall || n.deleted || !this._filter(type))) {
        do {
          type = /** @type {any} */
          n.content.type;
          if (!n.deleted && (type.constructor === YXmlElement || type.constructor === YXmlFragment) && type._start !== null) {
            n = type._start;
          } else {
            while (n !== null) {
              const nxt = n.next;
              if (nxt !== null) {
                n = nxt;
                break;
              } else if (n.parent === this._root) {
                n = null;
              } else {
                n = /** @type {AbstractType<any>} */
                n.parent._item;
              }
            }
          }
        } while (n !== null && (n.deleted || !this._filter(
          /** @type {ContentType} */
          n.content.type
        )));
      }
      this._firstCall = false;
      if (n === null) {
        return { value: void 0, done: true };
      }
      this._currentNode = n;
      return { value: (
        /** @type {any} */
        n.content.type
      ), done: false };
    }
  };
  var YXmlFragment = class _YXmlFragment extends AbstractType {
    constructor() {
      super();
      this._prelimContent = [];
    }
    /**
     * @type {YXmlElement|YXmlText|null}
     */
    get firstChild() {
      const first = this._first;
      return first ? first.content.getContent()[0] : null;
    }
    /**
     * Integrate this type into the Yjs instance.
     *
     * * Save this struct in the os
     * * This type is sent to other client
     * * Observer functions are fired
     *
     * @param {Doc} y The Yjs instance
     * @param {Item} item
     */
    _integrate(y, item) {
      super._integrate(y, item);
      this.insert(
        0,
        /** @type {Array<any>} */
        this._prelimContent
      );
      this._prelimContent = null;
    }
    _copy() {
      return new _YXmlFragment();
    }
    /**
     * Makes a copy of this data type that can be included somewhere else.
     *
     * Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
     *
     * @return {YXmlFragment}
     */
    clone() {
      const el = new _YXmlFragment();
      el.insert(0, this.toArray().map((item) => item instanceof AbstractType ? item.clone() : item));
      return el;
    }
    get length() {
      this.doc ?? warnPrematureAccess();
      return this._prelimContent === null ? this._length : this._prelimContent.length;
    }
    /**
     * Create a subtree of childNodes.
     *
     * @example
     * const walker = elem.createTreeWalker(dom => dom.nodeName === 'div')
     * for (let node in walker) {
     *   // `node` is a div node
     *   nop(node)
     * }
     *
     * @param {function(AbstractType<any>):boolean} filter Function that is called on each child element and
     *                          returns a Boolean indicating whether the child
     *                          is to be included in the subtree.
     * @return {YXmlTreeWalker} A subtree and a position within it.
     *
     * @public
     */
    createTreeWalker(filter) {
      return new YXmlTreeWalker(this, filter);
    }
    /**
     * Returns the first YXmlElement that matches the query.
     * Similar to DOM's {@link querySelector}.
     *
     * Query support:
     *   - tagname
     * TODO:
     *   - id
     *   - attribute
     *
     * @param {CSS_Selector} query The query on the children.
     * @return {YXmlElement|YXmlText|YXmlHook|null} The first element that matches the query or null.
     *
     * @public
     */
    querySelector(query) {
      query = query.toUpperCase();
      const iterator = new YXmlTreeWalker(this, (element2) => element2.nodeName && element2.nodeName.toUpperCase() === query);
      const next = iterator.next();
      if (next.done) {
        return null;
      } else {
        return next.value;
      }
    }
    /**
     * Returns all YXmlElements that match the query.
     * Similar to Dom's {@link querySelectorAll}.
     *
     * @todo Does not yet support all queries. Currently only query by tagName.
     *
     * @param {CSS_Selector} query The query on the children
     * @return {Array<YXmlElement|YXmlText|YXmlHook|null>} The elements that match this query.
     *
     * @public
     */
    querySelectorAll(query) {
      query = query.toUpperCase();
      return from(new YXmlTreeWalker(this, (element2) => element2.nodeName && element2.nodeName.toUpperCase() === query));
    }
    /**
     * Creates YXmlEvent and calls observers.
     *
     * @param {Transaction} transaction
     * @param {Set<null|string>} parentSubs Keys changed on this type. `null` if list was modified.
     */
    _callObserver(transaction, parentSubs) {
      callTypeObservers(this, transaction, new YXmlEvent(this, parentSubs, transaction));
    }
    /**
     * Get the string representation of all the children of this YXmlFragment.
     *
     * @return {string} The string representation of all children.
     */
    toString() {
      return typeListMap(this, (xml) => xml.toString()).join("");
    }
    /**
     * @return {string}
     */
    toJSON() {
      return this.toString();
    }
    /**
     * Creates a Dom Element that mirrors this YXmlElement.
     *
     * @param {Document} [_document=document] The document object (you must define
     *                                        this when calling this method in
     *                                        nodejs)
     * @param {Object<string, any>} [hooks={}] Optional property to customize how hooks
     *                                             are presented in the DOM
     * @param {any} [binding] You should not set this property. This is
     *                               used if DomBinding wants to create a
     *                               association to the created DOM type.
     * @return {Node} The {@link https://developer.mozilla.org/en-US/docs/Web/API/Element|Dom Element}
     *
     * @public
     */
    toDOM(_document = document, hooks = {}, binding) {
      const fragment = _document.createDocumentFragment();
      if (binding !== void 0) {
        binding._createAssociation(fragment, this);
      }
      typeListForEach(this, (xmlType) => {
        fragment.insertBefore(xmlType.toDOM(_document, hooks, binding), null);
      });
      return fragment;
    }
    /**
     * Inserts new content at an index.
     *
     * @example
     *  // Insert character 'a' at position 0
     *  xml.insert(0, [new Y.XmlText('text')])
     *
     * @param {number} index The index to insert content at
     * @param {Array<YXmlElement|YXmlText>} content The array of content
     */
    insert(index, content) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          typeListInsertGenerics(transaction, this, index, content);
        });
      } else {
        this._prelimContent.splice(index, 0, ...content);
      }
    }
    /**
     * Inserts new content at an index.
     *
     * @example
     *  // Insert character 'a' at position 0
     *  xml.insert(0, [new Y.XmlText('text')])
     *
     * @param {null|Item|YXmlElement|YXmlText} ref The index to insert content at
     * @param {Array<YXmlElement|YXmlText>} content The array of content
     */
    insertAfter(ref, content) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          const refItem = ref && ref instanceof AbstractType ? ref._item : ref;
          typeListInsertGenericsAfter(transaction, this, refItem, content);
        });
      } else {
        const pc = (
          /** @type {Array<any>} */
          this._prelimContent
        );
        const index = ref === null ? 0 : pc.findIndex((el) => el === ref) + 1;
        if (index === 0 && ref !== null) {
          throw create3("Reference item not found");
        }
        pc.splice(index, 0, ...content);
      }
    }
    /**
     * Deletes elements starting from an index.
     *
     * @param {number} index Index at which to start deleting elements
     * @param {number} [length=1] The number of elements to remove. Defaults to 1.
     */
    delete(index, length3 = 1) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          typeListDelete(transaction, this, index, length3);
        });
      } else {
        this._prelimContent.splice(index, length3);
      }
    }
    /**
     * Transforms this YArray to a JavaScript Array.
     *
     * @return {Array<YXmlElement|YXmlText|YXmlHook>}
     */
    toArray() {
      return typeListToArray(this);
    }
    /**
     * Appends content to this YArray.
     *
     * @param {Array<YXmlElement|YXmlText>} content Array of content to append.
     */
    push(content) {
      this.insert(this.length, content);
    }
    /**
     * Prepends content to this YArray.
     *
     * @param {Array<YXmlElement|YXmlText>} content Array of content to prepend.
     */
    unshift(content) {
      this.insert(0, content);
    }
    /**
     * Returns the i-th element from a YArray.
     *
     * @param {number} index The index of the element to return from the YArray
     * @return {YXmlElement|YXmlText}
     */
    get(index) {
      return typeListGet(this, index);
    }
    /**
     * Returns a portion of this YXmlFragment into a JavaScript Array selected
     * from start to end (end not included).
     *
     * @param {number} [start]
     * @param {number} [end]
     * @return {Array<YXmlElement|YXmlText>}
     */
    slice(start = 0, end = this.length) {
      return typeListSlice(this, start, end);
    }
    /**
     * Executes a provided function on once on every child element.
     *
     * @param {function(YXmlElement|YXmlText,number, typeof self):void} f A function to execute on every element of this YArray.
     */
    forEach(f) {
      typeListForEach(this, f);
    }
    /**
     * Transform the properties of this type to binary and write it to an
     * BinaryEncoder.
     *
     * This is called when this Item is sent to a remote peer.
     *
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder The encoder to write data to.
     */
    _write(encoder) {
      encoder.writeTypeRef(YXmlFragmentRefID);
    }
  };
  var readYXmlFragment = (_decoder) => new YXmlFragment();
  var YXmlElement = class _YXmlElement extends YXmlFragment {
    constructor(nodeName = "UNDEFINED") {
      super();
      this.nodeName = nodeName;
      this._prelimAttrs = /* @__PURE__ */ new Map();
    }
    /**
     * @type {YXmlElement|YXmlText|null}
     */
    get nextSibling() {
      const n = this._item ? this._item.next : null;
      return n ? (
        /** @type {YXmlElement|YXmlText} */
        /** @type {ContentType} */
        n.content.type
      ) : null;
    }
    /**
     * @type {YXmlElement|YXmlText|null}
     */
    get prevSibling() {
      const n = this._item ? this._item.prev : null;
      return n ? (
        /** @type {YXmlElement|YXmlText} */
        /** @type {ContentType} */
        n.content.type
      ) : null;
    }
    /**
     * Integrate this type into the Yjs instance.
     *
     * * Save this struct in the os
     * * This type is sent to other client
     * * Observer functions are fired
     *
     * @param {Doc} y The Yjs instance
     * @param {Item} item
     */
    _integrate(y, item) {
      super._integrate(y, item);
      /** @type {Map<string, any>} */
      this._prelimAttrs.forEach((value, key) => {
        this.setAttribute(key, value);
      });
      this._prelimAttrs = null;
    }
    /**
     * Creates an Item with the same effect as this Item (without position effect)
     *
     * @return {YXmlElement}
     */
    _copy() {
      return new _YXmlElement(this.nodeName);
    }
    /**
     * Makes a copy of this data type that can be included somewhere else.
     *
     * Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
     *
     * @return {YXmlElement<KV>}
     */
    clone() {
      const el = new _YXmlElement(this.nodeName);
      const attrs = this.getAttributes();
      forEach(attrs, (value, key) => {
        el.setAttribute(
          key,
          /** @type {any} */
          value
        );
      });
      el.insert(0, this.toArray().map((v) => v instanceof AbstractType ? v.clone() : v));
      return el;
    }
    /**
     * Returns the XML serialization of this YXmlElement.
     * The attributes are ordered by attribute-name, so you can easily use this
     * method to compare YXmlElements
     *
     * @return {string} The string representation of this type.
     *
     * @public
     */
    toString() {
      const attrs = this.getAttributes();
      const stringBuilder = [];
      const keys2 = [];
      for (const key in attrs) {
        keys2.push(key);
      }
      keys2.sort();
      const keysLen = keys2.length;
      for (let i = 0; i < keysLen; i++) {
        const key = keys2[i];
        stringBuilder.push(key + '="' + attrs[key] + '"');
      }
      const nodeName = this.nodeName.toLocaleLowerCase();
      const attrsString = stringBuilder.length > 0 ? " " + stringBuilder.join(" ") : "";
      return `<${nodeName}${attrsString}>${super.toString()}</${nodeName}>`;
    }
    /**
     * Removes an attribute from this YXmlElement.
     *
     * @param {string} attributeName The attribute name that is to be removed.
     *
     * @public
     */
    removeAttribute(attributeName) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          typeMapDelete(transaction, this, attributeName);
        });
      } else {
        this._prelimAttrs.delete(attributeName);
      }
    }
    /**
     * Sets or updates an attribute.
     *
     * @template {keyof KV & string} KEY
     *
     * @param {KEY} attributeName The attribute name that is to be set.
     * @param {KV[KEY]} attributeValue The attribute value that is to be set.
     *
     * @public
     */
    setAttribute(attributeName, attributeValue) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          typeMapSet(transaction, this, attributeName, attributeValue);
        });
      } else {
        this._prelimAttrs.set(attributeName, attributeValue);
      }
    }
    /**
     * Returns an attribute value that belongs to the attribute name.
     *
     * @template {keyof KV & string} KEY
     *
     * @param {KEY} attributeName The attribute name that identifies the
     *                               queried value.
     * @return {KV[KEY]|undefined} The queried attribute value.
     *
     * @public
     */
    getAttribute(attributeName) {
      return (
        /** @type {any} */
        typeMapGet(this, attributeName)
      );
    }
    /**
     * Returns whether an attribute exists
     *
     * @param {string} attributeName The attribute name to check for existence.
     * @return {boolean} whether the attribute exists.
     *
     * @public
     */
    hasAttribute(attributeName) {
      return (
        /** @type {any} */
        typeMapHas(this, attributeName)
      );
    }
    /**
     * Returns all attribute name/value pairs in a JSON Object.
     *
     * @param {Snapshot} [snapshot]
     * @return {{ [Key in Extract<keyof KV,string>]?: KV[Key]}} A JSON Object that describes the attributes.
     *
     * @public
     */
    getAttributes(snapshot2) {
      return (
        /** @type {any} */
        snapshot2 ? typeMapGetAllSnapshot(this, snapshot2) : typeMapGetAll(this)
      );
    }
    /**
     * Creates a Dom Element that mirrors this YXmlElement.
     *
     * @param {Document} [_document=document] The document object (you must define
     *                                        this when calling this method in
     *                                        nodejs)
     * @param {Object<string, any>} [hooks={}] Optional property to customize how hooks
     *                                             are presented in the DOM
     * @param {any} [binding] You should not set this property. This is
     *                               used if DomBinding wants to create a
     *                               association to the created DOM type.
     * @return {Node} The {@link https://developer.mozilla.org/en-US/docs/Web/API/Element|Dom Element}
     *
     * @public
     */
    toDOM(_document = document, hooks = {}, binding) {
      const dom = _document.createElement(this.nodeName);
      const attrs = this.getAttributes();
      for (const key in attrs) {
        const value = attrs[key];
        if (typeof value === "string") {
          dom.setAttribute(key, value);
        }
      }
      typeListForEach(this, (yxml) => {
        dom.appendChild(yxml.toDOM(_document, hooks, binding));
      });
      if (binding !== void 0) {
        binding._createAssociation(dom, this);
      }
      return dom;
    }
    /**
     * Transform the properties of this type to binary and write it to an
     * BinaryEncoder.
     *
     * This is called when this Item is sent to a remote peer.
     *
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder The encoder to write data to.
     */
    _write(encoder) {
      encoder.writeTypeRef(YXmlElementRefID);
      encoder.writeKey(this.nodeName);
    }
  };
  var readYXmlElement = (decoder) => new YXmlElement(decoder.readKey());
  var YXmlEvent = class extends YEvent {
    /**
     * @param {YXmlElement|YXmlText|YXmlFragment} target The target on which the event is created.
     * @param {Set<string|null>} subs The set of changed attributes. `null` is included if the
     *                   child list changed.
     * @param {Transaction} transaction The transaction instance with which the
     *                                  change was created.
     */
    constructor(target, subs, transaction) {
      super(target, transaction);
      this.childListChanged = false;
      this.attributesChanged = /* @__PURE__ */ new Set();
      subs.forEach((sub) => {
        if (sub === null) {
          this.childListChanged = true;
        } else {
          this.attributesChanged.add(sub);
        }
      });
    }
  };
  var YXmlHook = class _YXmlHook extends YMap {
    /**
     * @param {string} hookName nodeName of the Dom Node.
     */
    constructor(hookName) {
      super();
      this.hookName = hookName;
    }
    /**
     * Creates an Item with the same effect as this Item (without position effect)
     */
    _copy() {
      return new _YXmlHook(this.hookName);
    }
    /**
     * Makes a copy of this data type that can be included somewhere else.
     *
     * Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
     *
     * @return {YXmlHook}
     */
    clone() {
      const el = new _YXmlHook(this.hookName);
      this.forEach((value, key) => {
        el.set(key, value);
      });
      return el;
    }
    /**
     * Creates a Dom Element that mirrors this YXmlElement.
     *
     * @param {Document} [_document=document] The document object (you must define
     *                                        this when calling this method in
     *                                        nodejs)
     * @param {Object.<string, any>} [hooks] Optional property to customize how hooks
     *                                             are presented in the DOM
     * @param {any} [binding] You should not set this property. This is
     *                               used if DomBinding wants to create a
     *                               association to the created DOM type
     * @return {Element} The {@link https://developer.mozilla.org/en-US/docs/Web/API/Element|Dom Element}
     *
     * @public
     */
    toDOM(_document = document, hooks = {}, binding) {
      const hook = hooks[this.hookName];
      let dom;
      if (hook !== void 0) {
        dom = hook.createDom(this);
      } else {
        dom = document.createElement(this.hookName);
      }
      dom.setAttribute("data-yjs-hook", this.hookName);
      if (binding !== void 0) {
        binding._createAssociation(dom, this);
      }
      return dom;
    }
    /**
     * Transform the properties of this type to binary and write it to an
     * BinaryEncoder.
     *
     * This is called when this Item is sent to a remote peer.
     *
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder The encoder to write data to.
     */
    _write(encoder) {
      encoder.writeTypeRef(YXmlHookRefID);
      encoder.writeKey(this.hookName);
    }
  };
  var readYXmlHook = (decoder) => new YXmlHook(decoder.readKey());
  var YXmlText = class _YXmlText extends YText {
    /**
     * @type {YXmlElement|YXmlText|null}
     */
    get nextSibling() {
      const n = this._item ? this._item.next : null;
      return n ? (
        /** @type {YXmlElement|YXmlText} */
        /** @type {ContentType} */
        n.content.type
      ) : null;
    }
    /**
     * @type {YXmlElement|YXmlText|null}
     */
    get prevSibling() {
      const n = this._item ? this._item.prev : null;
      return n ? (
        /** @type {YXmlElement|YXmlText} */
        /** @type {ContentType} */
        n.content.type
      ) : null;
    }
    _copy() {
      return new _YXmlText();
    }
    /**
     * Makes a copy of this data type that can be included somewhere else.
     *
     * Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
     *
     * @return {YXmlText}
     */
    clone() {
      const text2 = new _YXmlText();
      text2.applyDelta(this.toDelta());
      return text2;
    }
    /**
     * Creates a Dom Element that mirrors this YXmlText.
     *
     * @param {Document} [_document=document] The document object (you must define
     *                                        this when calling this method in
     *                                        nodejs)
     * @param {Object<string, any>} [hooks] Optional property to customize how hooks
     *                                             are presented in the DOM
     * @param {any} [binding] You should not set this property. This is
     *                               used if DomBinding wants to create a
     *                               association to the created DOM type.
     * @return {Text} The {@link https://developer.mozilla.org/en-US/docs/Web/API/Element|Dom Element}
     *
     * @public
     */
    toDOM(_document = document, hooks, binding) {
      const dom = _document.createTextNode(this.toString());
      if (binding !== void 0) {
        binding._createAssociation(dom, this);
      }
      return dom;
    }
    toString() {
      return this.toDelta().map((delta) => {
        const nestedNodes = [];
        for (const nodeName in delta.attributes) {
          const attrs = [];
          for (const key in delta.attributes[nodeName]) {
            attrs.push({ key, value: delta.attributes[nodeName][key] });
          }
          attrs.sort((a, b) => a.key < b.key ? -1 : 1);
          nestedNodes.push({ nodeName, attrs });
        }
        nestedNodes.sort((a, b) => a.nodeName < b.nodeName ? -1 : 1);
        let str = "";
        for (let i = 0; i < nestedNodes.length; i++) {
          const node = nestedNodes[i];
          str += `<${node.nodeName}`;
          for (let j = 0; j < node.attrs.length; j++) {
            const attr = node.attrs[j];
            str += ` ${attr.key}="${attr.value}"`;
          }
          str += ">";
        }
        str += delta.insert;
        for (let i = nestedNodes.length - 1; i >= 0; i--) {
          str += `</${nestedNodes[i].nodeName}>`;
        }
        return str;
      }).join("");
    }
    /**
     * @return {string}
     */
    toJSON() {
      return this.toString();
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     */
    _write(encoder) {
      encoder.writeTypeRef(YXmlTextRefID);
    }
  };
  var readYXmlText = (decoder) => new YXmlText();
  var AbstractStruct = class {
    /**
     * @param {ID} id
     * @param {number} length
     */
    constructor(id2, length3) {
      this.id = id2;
      this.length = length3;
    }
    /**
     * @type {boolean}
     */
    get deleted() {
      throw methodUnimplemented();
    }
    /**
     * Merge this struct with the item to the right.
     * This method is already assuming that `this.id.clock + this.length === this.id.clock`.
     * Also this method does *not* remove right from StructStore!
     * @param {AbstractStruct} right
     * @return {boolean} whether this merged with right
     */
    mergeWith(right) {
      return false;
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder The encoder to write data to.
     * @param {number} offset
     * @param {number} encodingRef
     */
    write(encoder, offset, encodingRef) {
      throw methodUnimplemented();
    }
    /**
     * @param {Transaction} transaction
     * @param {number} offset
     */
    integrate(transaction, offset) {
      throw methodUnimplemented();
    }
  };
  var structGCRefNumber = 0;
  var GC = class extends AbstractStruct {
    get deleted() {
      return true;
    }
    delete() {
    }
    /**
     * @param {GC} right
     * @return {boolean}
     */
    mergeWith(right) {
      if (this.constructor !== right.constructor) {
        return false;
      }
      this.length += right.length;
      return true;
    }
    /**
     * @param {Transaction} transaction
     * @param {number} offset
     */
    integrate(transaction, offset) {
      if (offset > 0) {
        this.id.clock += offset;
        this.length -= offset;
      }
      addStruct(transaction.doc.store, this);
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     * @param {number} offset
     */
    write(encoder, offset) {
      encoder.writeInfo(structGCRefNumber);
      encoder.writeLen(this.length - offset);
    }
    /**
     * @param {Transaction} transaction
     * @param {StructStore} store
     * @return {null | number}
     */
    getMissing(transaction, store2) {
      return null;
    }
  };
  var ContentBinary = class _ContentBinary {
    /**
     * @param {Uint8Array} content
     */
    constructor(content) {
      this.content = content;
    }
    /**
     * @return {number}
     */
    getLength() {
      return 1;
    }
    /**
     * @return {Array<any>}
     */
    getContent() {
      return [this.content];
    }
    /**
     * @return {boolean}
     */
    isCountable() {
      return true;
    }
    /**
     * @return {ContentBinary}
     */
    copy() {
      return new _ContentBinary(this.content);
    }
    /**
     * @param {number} offset
     * @return {ContentBinary}
     */
    splice(offset) {
      throw methodUnimplemented();
    }
    /**
     * @param {ContentBinary} right
     * @return {boolean}
     */
    mergeWith(right) {
      return false;
    }
    /**
     * @param {Transaction} transaction
     * @param {Item} item
     */
    integrate(transaction, item) {
    }
    /**
     * @param {Transaction} transaction
     */
    delete(transaction) {
    }
    /**
     * @param {StructStore} store
     */
    gc(store2) {
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     * @param {number} offset
     */
    write(encoder, offset) {
      encoder.writeBuf(this.content);
    }
    /**
     * @return {number}
     */
    getRef() {
      return 3;
    }
  };
  var readContentBinary = (decoder) => new ContentBinary(decoder.readBuf());
  var ContentDeleted = class _ContentDeleted {
    /**
     * @param {number} len
     */
    constructor(len) {
      this.len = len;
    }
    /**
     * @return {number}
     */
    getLength() {
      return this.len;
    }
    /**
     * @return {Array<any>}
     */
    getContent() {
      return [];
    }
    /**
     * @return {boolean}
     */
    isCountable() {
      return false;
    }
    /**
     * @return {ContentDeleted}
     */
    copy() {
      return new _ContentDeleted(this.len);
    }
    /**
     * @param {number} offset
     * @return {ContentDeleted}
     */
    splice(offset) {
      const right = new _ContentDeleted(this.len - offset);
      this.len = offset;
      return right;
    }
    /**
     * @param {ContentDeleted} right
     * @return {boolean}
     */
    mergeWith(right) {
      this.len += right.len;
      return true;
    }
    /**
     * @param {Transaction} transaction
     * @param {Item} item
     */
    integrate(transaction, item) {
      addToDeleteSet(transaction.deleteSet, item.id.client, item.id.clock, this.len);
      item.markDeleted();
    }
    /**
     * @param {Transaction} transaction
     */
    delete(transaction) {
    }
    /**
     * @param {StructStore} store
     */
    gc(store2) {
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     * @param {number} offset
     */
    write(encoder, offset) {
      encoder.writeLen(this.len - offset);
    }
    /**
     * @return {number}
     */
    getRef() {
      return 1;
    }
  };
  var readContentDeleted = (decoder) => new ContentDeleted(decoder.readLen());
  var createDocFromOpts = (guid, opts) => new Doc({ guid, ...opts, shouldLoad: opts.shouldLoad || opts.autoLoad || false });
  var ContentDoc = class _ContentDoc {
    /**
     * @param {Doc} doc
     */
    constructor(doc2) {
      if (doc2._item) {
        console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid.");
      }
      this.doc = doc2;
      const opts = {};
      this.opts = opts;
      if (!doc2.gc) {
        opts.gc = false;
      }
      if (doc2.autoLoad) {
        opts.autoLoad = true;
      }
      if (doc2.meta !== null) {
        opts.meta = doc2.meta;
      }
    }
    /**
     * @return {number}
     */
    getLength() {
      return 1;
    }
    /**
     * @return {Array<any>}
     */
    getContent() {
      return [this.doc];
    }
    /**
     * @return {boolean}
     */
    isCountable() {
      return true;
    }
    /**
     * @return {ContentDoc}
     */
    copy() {
      return new _ContentDoc(createDocFromOpts(this.doc.guid, this.opts));
    }
    /**
     * @param {number} offset
     * @return {ContentDoc}
     */
    splice(offset) {
      throw methodUnimplemented();
    }
    /**
     * @param {ContentDoc} right
     * @return {boolean}
     */
    mergeWith(right) {
      return false;
    }
    /**
     * @param {Transaction} transaction
     * @param {Item} item
     */
    integrate(transaction, item) {
      this.doc._item = item;
      transaction.subdocsAdded.add(this.doc);
      if (this.doc.shouldLoad) {
        transaction.subdocsLoaded.add(this.doc);
      }
    }
    /**
     * @param {Transaction} transaction
     */
    delete(transaction) {
      if (transaction.subdocsAdded.has(this.doc)) {
        transaction.subdocsAdded.delete(this.doc);
      } else {
        transaction.subdocsRemoved.add(this.doc);
      }
    }
    /**
     * @param {StructStore} store
     */
    gc(store2) {
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     * @param {number} offset
     */
    write(encoder, offset) {
      encoder.writeString(this.doc.guid);
      encoder.writeAny(this.opts);
    }
    /**
     * @return {number}
     */
    getRef() {
      return 9;
    }
  };
  var readContentDoc = (decoder) => new ContentDoc(createDocFromOpts(decoder.readString(), decoder.readAny()));
  var ContentEmbed = class _ContentEmbed {
    /**
     * @param {Object} embed
     */
    constructor(embed) {
      this.embed = embed;
    }
    /**
     * @return {number}
     */
    getLength() {
      return 1;
    }
    /**
     * @return {Array<any>}
     */
    getContent() {
      return [this.embed];
    }
    /**
     * @return {boolean}
     */
    isCountable() {
      return true;
    }
    /**
     * @return {ContentEmbed}
     */
    copy() {
      return new _ContentEmbed(this.embed);
    }
    /**
     * @param {number} offset
     * @return {ContentEmbed}
     */
    splice(offset) {
      throw methodUnimplemented();
    }
    /**
     * @param {ContentEmbed} right
     * @return {boolean}
     */
    mergeWith(right) {
      return false;
    }
    /**
     * @param {Transaction} transaction
     * @param {Item} item
     */
    integrate(transaction, item) {
    }
    /**
     * @param {Transaction} transaction
     */
    delete(transaction) {
    }
    /**
     * @param {StructStore} store
     */
    gc(store2) {
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     * @param {number} offset
     */
    write(encoder, offset) {
      encoder.writeJSON(this.embed);
    }
    /**
     * @return {number}
     */
    getRef() {
      return 5;
    }
  };
  var readContentEmbed = (decoder) => new ContentEmbed(decoder.readJSON());
  var ContentFormat = class _ContentFormat {
    /**
     * @param {string} key
     * @param {Object} value
     */
    constructor(key, value) {
      this.key = key;
      this.value = value;
    }
    /**
     * @return {number}
     */
    getLength() {
      return 1;
    }
    /**
     * @return {Array<any>}
     */
    getContent() {
      return [];
    }
    /**
     * @return {boolean}
     */
    isCountable() {
      return false;
    }
    /**
     * @return {ContentFormat}
     */
    copy() {
      return new _ContentFormat(this.key, this.value);
    }
    /**
     * @param {number} _offset
     * @return {ContentFormat}
     */
    splice(_offset) {
      throw methodUnimplemented();
    }
    /**
     * @param {ContentFormat} _right
     * @return {boolean}
     */
    mergeWith(_right) {
      return false;
    }
    /**
     * @param {Transaction} _transaction
     * @param {Item} item
     */
    integrate(_transaction, item) {
      const p = (
        /** @type {YText} */
        item.parent
      );
      p._searchMarker = null;
      p._hasFormatting = true;
    }
    /**
     * @param {Transaction} transaction
     */
    delete(transaction) {
    }
    /**
     * @param {StructStore} store
     */
    gc(store2) {
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     * @param {number} offset
     */
    write(encoder, offset) {
      encoder.writeKey(this.key);
      encoder.writeJSON(this.value);
    }
    /**
     * @return {number}
     */
    getRef() {
      return 6;
    }
  };
  var readContentFormat = (decoder) => new ContentFormat(decoder.readKey(), decoder.readJSON());
  var ContentJSON = class _ContentJSON {
    /**
     * @param {Array<any>} arr
     */
    constructor(arr) {
      this.arr = arr;
    }
    /**
     * @return {number}
     */
    getLength() {
      return this.arr.length;
    }
    /**
     * @return {Array<any>}
     */
    getContent() {
      return this.arr;
    }
    /**
     * @return {boolean}
     */
    isCountable() {
      return true;
    }
    /**
     * @return {ContentJSON}
     */
    copy() {
      return new _ContentJSON(this.arr);
    }
    /**
     * @param {number} offset
     * @return {ContentJSON}
     */
    splice(offset) {
      const right = new _ContentJSON(this.arr.slice(offset));
      this.arr = this.arr.slice(0, offset);
      return right;
    }
    /**
     * @param {ContentJSON} right
     * @return {boolean}
     */
    mergeWith(right) {
      this.arr = this.arr.concat(right.arr);
      return true;
    }
    /**
     * @param {Transaction} transaction
     * @param {Item} item
     */
    integrate(transaction, item) {
    }
    /**
     * @param {Transaction} transaction
     */
    delete(transaction) {
    }
    /**
     * @param {StructStore} store
     */
    gc(store2) {
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     * @param {number} offset
     */
    write(encoder, offset) {
      const len = this.arr.length;
      encoder.writeLen(len - offset);
      for (let i = offset; i < len; i++) {
        const c = this.arr[i];
        encoder.writeString(c === void 0 ? "undefined" : JSON.stringify(c));
      }
    }
    /**
     * @return {number}
     */
    getRef() {
      return 2;
    }
  };
  var readContentJSON = (decoder) => {
    const len = decoder.readLen();
    const cs = [];
    for (let i = 0; i < len; i++) {
      const c = decoder.readString();
      if (c === "undefined") {
        cs.push(void 0);
      } else {
        cs.push(JSON.parse(c));
      }
    }
    return new ContentJSON(cs);
  };
  var isDevMode = getVariable("node_env") === "development";
  var ContentAny = class _ContentAny {
    /**
     * @param {Array<any>} arr
     */
    constructor(arr) {
      this.arr = arr;
      isDevMode && deepFreeze(arr);
    }
    /**
     * @return {number}
     */
    getLength() {
      return this.arr.length;
    }
    /**
     * @return {Array<any>}
     */
    getContent() {
      return this.arr;
    }
    /**
     * @return {boolean}
     */
    isCountable() {
      return true;
    }
    /**
     * @return {ContentAny}
     */
    copy() {
      return new _ContentAny(this.arr);
    }
    /**
     * @param {number} offset
     * @return {ContentAny}
     */
    splice(offset) {
      const right = new _ContentAny(this.arr.slice(offset));
      this.arr = this.arr.slice(0, offset);
      return right;
    }
    /**
     * @param {ContentAny} right
     * @return {boolean}
     */
    mergeWith(right) {
      this.arr = this.arr.concat(right.arr);
      return true;
    }
    /**
     * @param {Transaction} transaction
     * @param {Item} item
     */
    integrate(transaction, item) {
    }
    /**
     * @param {Transaction} transaction
     */
    delete(transaction) {
    }
    /**
     * @param {StructStore} store
     */
    gc(store2) {
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     * @param {number} offset
     */
    write(encoder, offset) {
      const len = this.arr.length;
      encoder.writeLen(len - offset);
      for (let i = offset; i < len; i++) {
        const c = this.arr[i];
        encoder.writeAny(c);
      }
    }
    /**
     * @return {number}
     */
    getRef() {
      return 8;
    }
  };
  var readContentAny = (decoder) => {
    const len = decoder.readLen();
    const cs = [];
    for (let i = 0; i < len; i++) {
      cs.push(decoder.readAny());
    }
    return new ContentAny(cs);
  };
  var ContentString = class _ContentString {
    /**
     * @param {string} str
     */
    constructor(str) {
      this.str = str;
    }
    /**
     * @return {number}
     */
    getLength() {
      return this.str.length;
    }
    /**
     * @return {Array<any>}
     */
    getContent() {
      return this.str.split("");
    }
    /**
     * @return {boolean}
     */
    isCountable() {
      return true;
    }
    /**
     * @return {ContentString}
     */
    copy() {
      return new _ContentString(this.str);
    }
    /**
     * @param {number} offset
     * @return {ContentString}
     */
    splice(offset) {
      const right = new _ContentString(this.str.slice(offset));
      this.str = this.str.slice(0, offset);
      const firstCharCode = this.str.charCodeAt(offset - 1);
      if (firstCharCode >= 55296 && firstCharCode <= 56319) {
        this.str = this.str.slice(0, offset - 1) + "\uFFFD";
        right.str = "\uFFFD" + right.str.slice(1);
      }
      return right;
    }
    /**
     * @param {ContentString} right
     * @return {boolean}
     */
    mergeWith(right) {
      this.str += right.str;
      return true;
    }
    /**
     * @param {Transaction} transaction
     * @param {Item} item
     */
    integrate(transaction, item) {
    }
    /**
     * @param {Transaction} transaction
     */
    delete(transaction) {
    }
    /**
     * @param {StructStore} store
     */
    gc(store2) {
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     * @param {number} offset
     */
    write(encoder, offset) {
      encoder.writeString(offset === 0 ? this.str : this.str.slice(offset));
    }
    /**
     * @return {number}
     */
    getRef() {
      return 4;
    }
  };
  var readContentString = (decoder) => new ContentString(decoder.readString());
  var typeRefs = [
    readYArray,
    readYMap,
    readYText,
    readYXmlElement,
    readYXmlFragment,
    readYXmlHook,
    readYXmlText
  ];
  var YArrayRefID = 0;
  var YMapRefID = 1;
  var YTextRefID = 2;
  var YXmlElementRefID = 3;
  var YXmlFragmentRefID = 4;
  var YXmlHookRefID = 5;
  var YXmlTextRefID = 6;
  var ContentType = class _ContentType {
    /**
     * @param {AbstractType<any>} type
     */
    constructor(type) {
      this.type = type;
    }
    /**
     * @return {number}
     */
    getLength() {
      return 1;
    }
    /**
     * @return {Array<any>}
     */
    getContent() {
      return [this.type];
    }
    /**
     * @return {boolean}
     */
    isCountable() {
      return true;
    }
    /**
     * @return {ContentType}
     */
    copy() {
      return new _ContentType(this.type._copy());
    }
    /**
     * @param {number} offset
     * @return {ContentType}
     */
    splice(offset) {
      throw methodUnimplemented();
    }
    /**
     * @param {ContentType} right
     * @return {boolean}
     */
    mergeWith(right) {
      return false;
    }
    /**
     * @param {Transaction} transaction
     * @param {Item} item
     */
    integrate(transaction, item) {
      this.type._integrate(transaction.doc, item);
    }
    /**
     * @param {Transaction} transaction
     */
    delete(transaction) {
      let item = this.type._start;
      while (item !== null) {
        if (!item.deleted) {
          item.delete(transaction);
        } else if (item.id.clock < (transaction.beforeState.get(item.id.client) || 0)) {
          transaction._mergeStructs.push(item);
        }
        item = item.right;
      }
      this.type._map.forEach((item2) => {
        if (!item2.deleted) {
          item2.delete(transaction);
        } else if (item2.id.clock < (transaction.beforeState.get(item2.id.client) || 0)) {
          transaction._mergeStructs.push(item2);
        }
      });
      transaction.changed.delete(this.type);
    }
    /**
     * @param {StructStore} store
     */
    gc(store2) {
      let item = this.type._start;
      while (item !== null) {
        item.gc(store2, true);
        item = item.right;
      }
      this.type._start = null;
      this.type._map.forEach(
        /** @param {Item | null} item */
        (item2) => {
          while (item2 !== null) {
            item2.gc(store2, true);
            item2 = item2.left;
          }
        }
      );
      this.type._map = /* @__PURE__ */ new Map();
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     * @param {number} offset
     */
    write(encoder, offset) {
      this.type._write(encoder);
    }
    /**
     * @return {number}
     */
    getRef() {
      return 7;
    }
  };
  var readContentType = (decoder) => new ContentType(typeRefs[decoder.readTypeRef()](decoder));
  var followRedone = (store2, id2) => {
    let nextID = id2;
    let diff = 0;
    let item;
    do {
      if (diff > 0) {
        nextID = createID(nextID.client, nextID.clock + diff);
      }
      item = getItem(store2, nextID);
      diff = nextID.clock - item.id.clock;
      nextID = item.redone;
    } while (nextID !== null && item instanceof Item);
    return {
      item,
      diff
    };
  };
  var keepItem = (item, keep) => {
    while (item !== null && item.keep !== keep) {
      item.keep = keep;
      item = /** @type {AbstractType<any>} */
      item.parent._item;
    }
  };
  var splitItem = (transaction, leftItem, diff) => {
    const { client, clock } = leftItem.id;
    const rightItem = new Item(
      createID(client, clock + diff),
      leftItem,
      createID(client, clock + diff - 1),
      leftItem.right,
      leftItem.rightOrigin,
      leftItem.parent,
      leftItem.parentSub,
      leftItem.content.splice(diff)
    );
    if (leftItem.deleted) {
      rightItem.markDeleted();
    }
    if (leftItem.keep) {
      rightItem.keep = true;
    }
    if (leftItem.redone !== null) {
      rightItem.redone = createID(leftItem.redone.client, leftItem.redone.clock + diff);
    }
    leftItem.right = rightItem;
    if (rightItem.right !== null) {
      rightItem.right.left = rightItem;
    }
    transaction._mergeStructs.push(rightItem);
    if (rightItem.parentSub !== null && rightItem.right === null) {
      rightItem.parent._map.set(rightItem.parentSub, rightItem);
    }
    leftItem.length = diff;
    return rightItem;
  };
  var isDeletedByUndoStack = (stack, id2) => some(
    stack,
    /** @param {StackItem} s */
    (s) => isDeleted(s.deletions, id2)
  );
  var redoItem = (transaction, item, redoitems, itemsToDelete, ignoreRemoteMapChanges, um) => {
    const doc2 = transaction.doc;
    const store2 = doc2.store;
    const ownClientID = doc2.clientID;
    const redone = item.redone;
    if (redone !== null) {
      return getItemCleanStart(transaction, redone);
    }
    let parentItem = (
      /** @type {AbstractType<any>} */
      item.parent._item
    );
    let left = null;
    let right;
    if (parentItem !== null && parentItem.deleted === true) {
      if (parentItem.redone === null && (!redoitems.has(parentItem) || redoItem(transaction, parentItem, redoitems, itemsToDelete, ignoreRemoteMapChanges, um) === null)) {
        return null;
      }
      while (parentItem.redone !== null) {
        parentItem = getItemCleanStart(transaction, parentItem.redone);
      }
    }
    const parentType = parentItem === null ? (
      /** @type {AbstractType<any>} */
      item.parent
    ) : (
      /** @type {ContentType} */
      parentItem.content.type
    );
    if (item.parentSub === null) {
      left = item.left;
      right = item;
      while (left !== null) {
        let leftTrace = left;
        while (leftTrace !== null && /** @type {AbstractType<any>} */
        leftTrace.parent._item !== parentItem) {
          leftTrace = leftTrace.redone === null ? null : getItemCleanStart(transaction, leftTrace.redone);
        }
        if (leftTrace !== null && /** @type {AbstractType<any>} */
        leftTrace.parent._item === parentItem) {
          left = leftTrace;
          break;
        }
        left = left.left;
      }
      while (right !== null) {
        let rightTrace = right;
        while (rightTrace !== null && /** @type {AbstractType<any>} */
        rightTrace.parent._item !== parentItem) {
          rightTrace = rightTrace.redone === null ? null : getItemCleanStart(transaction, rightTrace.redone);
        }
        if (rightTrace !== null && /** @type {AbstractType<any>} */
        rightTrace.parent._item === parentItem) {
          right = rightTrace;
          break;
        }
        right = right.right;
      }
    } else {
      right = null;
      if (item.right && !ignoreRemoteMapChanges) {
        left = item;
        while (left !== null && left.right !== null && (left.right.redone || isDeleted(itemsToDelete, left.right.id) || isDeletedByUndoStack(um.undoStack, left.right.id) || isDeletedByUndoStack(um.redoStack, left.right.id))) {
          left = left.right;
          while (left.redone) left = getItemCleanStart(transaction, left.redone);
        }
        if (left && left.right !== null) {
          return null;
        }
      } else {
        left = parentType._map.get(item.parentSub) || null;
      }
    }
    const nextClock = getState(store2, ownClientID);
    const nextId = createID(ownClientID, nextClock);
    const redoneItem = new Item(
      nextId,
      left,
      left && left.lastId,
      right,
      right && right.id,
      parentType,
      item.parentSub,
      item.content.copy()
    );
    item.redone = nextId;
    keepItem(redoneItem, true);
    redoneItem.integrate(transaction, 0);
    return redoneItem;
  };
  var Item = class _Item extends AbstractStruct {
    /**
     * @param {ID} id
     * @param {Item | null} left
     * @param {ID | null} origin
     * @param {Item | null} right
     * @param {ID | null} rightOrigin
     * @param {AbstractType<any>|ID|null} parent Is a type if integrated, is null if it is possible to copy parent from left or right, is ID before integration to search for it.
     * @param {string | null} parentSub
     * @param {AbstractContent} content
     */
    constructor(id2, left, origin2, right, rightOrigin, parent, parentSub, content) {
      super(id2, content.getLength());
      this.origin = origin2;
      this.left = left;
      this.right = right;
      this.rightOrigin = rightOrigin;
      this.parent = parent;
      this.parentSub = parentSub;
      this.redone = null;
      this.content = content;
      this.info = this.content.isCountable() ? BIT2 : 0;
    }
    /**
     * This is used to mark the item as an indexed fast-search marker
     *
     * @type {boolean}
     */
    set marker(isMarked) {
      if ((this.info & BIT4) > 0 !== isMarked) {
        this.info ^= BIT4;
      }
    }
    get marker() {
      return (this.info & BIT4) > 0;
    }
    /**
     * If true, do not garbage collect this Item.
     */
    get keep() {
      return (this.info & BIT1) > 0;
    }
    set keep(doKeep) {
      if (this.keep !== doKeep) {
        this.info ^= BIT1;
      }
    }
    get countable() {
      return (this.info & BIT2) > 0;
    }
    /**
     * Whether this item was deleted or not.
     * @type {Boolean}
     */
    get deleted() {
      return (this.info & BIT3) > 0;
    }
    set deleted(doDelete) {
      if (this.deleted !== doDelete) {
        this.info ^= BIT3;
      }
    }
    markDeleted() {
      this.info |= BIT3;
    }
    /**
     * Return the creator clientID of the missing op or define missing items and return null.
     *
     * @param {Transaction} transaction
     * @param {StructStore} store
     * @return {null | number}
     */
    getMissing(transaction, store2) {
      if (this.origin && this.origin.client !== this.id.client && this.origin.clock >= getState(store2, this.origin.client)) {
        return this.origin.client;
      }
      if (this.rightOrigin && this.rightOrigin.client !== this.id.client && this.rightOrigin.clock >= getState(store2, this.rightOrigin.client)) {
        return this.rightOrigin.client;
      }
      if (this.parent && this.parent.constructor === ID && this.id.client !== this.parent.client && this.parent.clock >= getState(store2, this.parent.client)) {
        return this.parent.client;
      }
      if (this.origin) {
        this.left = getItemCleanEnd(transaction, store2, this.origin);
        this.origin = this.left.lastId;
      }
      if (this.rightOrigin) {
        this.right = getItemCleanStart(transaction, this.rightOrigin);
        this.rightOrigin = this.right.id;
      }
      if (this.left && this.left.constructor === GC || this.right && this.right.constructor === GC) {
        this.parent = null;
      } else if (!this.parent) {
        if (this.left && this.left.constructor === _Item) {
          this.parent = this.left.parent;
          this.parentSub = this.left.parentSub;
        } else if (this.right && this.right.constructor === _Item) {
          this.parent = this.right.parent;
          this.parentSub = this.right.parentSub;
        }
      } else if (this.parent.constructor === ID) {
        const parentItem = getItem(store2, this.parent);
        if (parentItem.constructor === GC) {
          this.parent = null;
        } else {
          this.parent = /** @type {ContentType} */
          parentItem.content.type;
        }
      }
      return null;
    }
    /**
     * @param {Transaction} transaction
     * @param {number} offset
     */
    integrate(transaction, offset) {
      if (offset > 0) {
        this.id.clock += offset;
        this.left = getItemCleanEnd(transaction, transaction.doc.store, createID(this.id.client, this.id.clock - 1));
        this.origin = this.left.lastId;
        this.content = this.content.splice(offset);
        this.length -= offset;
      }
      if (this.parent) {
        if (!this.left && (!this.right || this.right.left !== null) || this.left && this.left.right !== this.right) {
          let left = this.left;
          let o;
          if (left !== null) {
            o = left.right;
          } else if (this.parentSub !== null) {
            o = /** @type {AbstractType<any>} */
            this.parent._map.get(this.parentSub) || null;
            while (o !== null && o.left !== null) {
              o = o.left;
            }
          } else {
            o = /** @type {AbstractType<any>} */
            this.parent._start;
          }
          const conflictingItems = /* @__PURE__ */ new Set();
          const itemsBeforeOrigin = /* @__PURE__ */ new Set();
          while (o !== null && o !== this.right) {
            itemsBeforeOrigin.add(o);
            conflictingItems.add(o);
            if (compareIDs(this.origin, o.origin)) {
              if (o.id.client < this.id.client) {
                left = o;
                conflictingItems.clear();
              } else if (compareIDs(this.rightOrigin, o.rightOrigin)) {
                break;
              }
            } else if (o.origin !== null && itemsBeforeOrigin.has(getItem(transaction.doc.store, o.origin))) {
              if (!conflictingItems.has(getItem(transaction.doc.store, o.origin))) {
                left = o;
                conflictingItems.clear();
              }
            } else {
              break;
            }
            o = o.right;
          }
          this.left = left;
        }
        if (this.left !== null) {
          const right = this.left.right;
          this.right = right;
          this.left.right = this;
        } else {
          let r;
          if (this.parentSub !== null) {
            r = /** @type {AbstractType<any>} */
            this.parent._map.get(this.parentSub) || null;
            while (r !== null && r.left !== null) {
              r = r.left;
            }
          } else {
            r = /** @type {AbstractType<any>} */
            this.parent._start;
            this.parent._start = this;
          }
          this.right = r;
        }
        if (this.right !== null) {
          this.right.left = this;
        } else if (this.parentSub !== null) {
          this.parent._map.set(this.parentSub, this);
          if (this.left !== null) {
            this.left.delete(transaction);
          }
        }
        if (this.parentSub === null && this.countable && !this.deleted) {
          this.parent._length += this.length;
        }
        addStruct(transaction.doc.store, this);
        this.content.integrate(transaction, this);
        addChangedTypeToTransaction(
          transaction,
          /** @type {AbstractType<any>} */
          this.parent,
          this.parentSub
        );
        if (
          /** @type {AbstractType<any>} */
          this.parent._item !== null && /** @type {AbstractType<any>} */
          this.parent._item.deleted || this.parentSub !== null && this.right !== null
        ) {
          this.delete(transaction);
        }
      } else {
        new GC(this.id, this.length).integrate(transaction, 0);
      }
    }
    /**
     * Returns the next non-deleted item
     */
    get next() {
      let n = this.right;
      while (n !== null && n.deleted) {
        n = n.right;
      }
      return n;
    }
    /**
     * Returns the previous non-deleted item
     */
    get prev() {
      let n = this.left;
      while (n !== null && n.deleted) {
        n = n.left;
      }
      return n;
    }
    /**
     * Computes the last content address of this Item.
     */
    get lastId() {
      return this.length === 1 ? this.id : createID(this.id.client, this.id.clock + this.length - 1);
    }
    /**
     * Try to merge two items
     *
     * @param {Item} right
     * @return {boolean}
     */
    mergeWith(right) {
      if (this.constructor === right.constructor && compareIDs(right.origin, this.lastId) && this.right === right && compareIDs(this.rightOrigin, right.rightOrigin) && this.id.client === right.id.client && this.id.clock + this.length === right.id.clock && this.deleted === right.deleted && this.redone === null && right.redone === null && this.content.constructor === right.content.constructor && this.content.mergeWith(right.content)) {
        const searchMarker = (
          /** @type {AbstractType<any>} */
          this.parent._searchMarker
        );
        if (searchMarker) {
          searchMarker.forEach((marker) => {
            if (marker.p === right) {
              marker.p = this;
              if (!this.deleted && this.countable) {
                marker.index -= this.length;
              }
            }
          });
        }
        if (right.keep) {
          this.keep = true;
        }
        this.right = right.right;
        if (this.right !== null) {
          this.right.left = this;
        }
        this.length += right.length;
        return true;
      }
      return false;
    }
    /**
     * Mark this Item as deleted.
     *
     * @param {Transaction} transaction
     */
    delete(transaction) {
      if (!this.deleted) {
        const parent = (
          /** @type {AbstractType<any>} */
          this.parent
        );
        if (this.countable && this.parentSub === null) {
          parent._length -= this.length;
        }
        this.markDeleted();
        addToDeleteSet(transaction.deleteSet, this.id.client, this.id.clock, this.length);
        addChangedTypeToTransaction(transaction, parent, this.parentSub);
        this.content.delete(transaction);
      }
    }
    /**
     * @param {StructStore} store
     * @param {boolean} parentGCd
     */
    gc(store2, parentGCd) {
      if (!this.deleted) {
        throw unexpectedCase();
      }
      this.content.gc(store2);
      if (parentGCd) {
        replaceStruct(store2, this, new GC(this.id, this.length));
      } else {
        this.content = new ContentDeleted(this.length);
      }
    }
    /**
     * Transform the properties of this type to binary and write it to an
     * BinaryEncoder.
     *
     * This is called when this Item is sent to a remote peer.
     *
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder The encoder to write data to.
     * @param {number} offset
     */
    write(encoder, offset) {
      const origin2 = offset > 0 ? createID(this.id.client, this.id.clock + offset - 1) : this.origin;
      const rightOrigin = this.rightOrigin;
      const parentSub = this.parentSub;
      const info = this.content.getRef() & BITS5 | (origin2 === null ? 0 : BIT8) | // origin is defined
      (rightOrigin === null ? 0 : BIT7) | // right origin is defined
      (parentSub === null ? 0 : BIT6);
      encoder.writeInfo(info);
      if (origin2 !== null) {
        encoder.writeLeftID(origin2);
      }
      if (rightOrigin !== null) {
        encoder.writeRightID(rightOrigin);
      }
      if (origin2 === null && rightOrigin === null) {
        const parent = (
          /** @type {AbstractType<any>} */
          this.parent
        );
        if (parent._item !== void 0) {
          const parentItem = parent._item;
          if (parentItem === null) {
            const ykey = findRootTypeKey(parent);
            encoder.writeParentInfo(true);
            encoder.writeString(ykey);
          } else {
            encoder.writeParentInfo(false);
            encoder.writeLeftID(parentItem.id);
          }
        } else if (parent.constructor === String) {
          encoder.writeParentInfo(true);
          encoder.writeString(parent);
        } else if (parent.constructor === ID) {
          encoder.writeParentInfo(false);
          encoder.writeLeftID(parent);
        } else {
          unexpectedCase();
        }
        if (parentSub !== null) {
          encoder.writeString(parentSub);
        }
      }
      this.content.write(encoder, offset);
    }
  };
  var readItemContent = (decoder, info) => contentRefs[info & BITS5](decoder);
  var contentRefs = [
    () => {
      unexpectedCase();
    },
    // GC is not ItemContent
    readContentDeleted,
    // 1
    readContentJSON,
    // 2
    readContentBinary,
    // 3
    readContentString,
    // 4
    readContentEmbed,
    // 5
    readContentFormat,
    // 6
    readContentType,
    // 7
    readContentAny,
    // 8
    readContentDoc,
    // 9
    () => {
      unexpectedCase();
    }
    // 10 - Skip is not ItemContent
  ];
  var structSkipRefNumber = 10;
  var Skip = class extends AbstractStruct {
    get deleted() {
      return true;
    }
    delete() {
    }
    /**
     * @param {Skip} right
     * @return {boolean}
     */
    mergeWith(right) {
      if (this.constructor !== right.constructor) {
        return false;
      }
      this.length += right.length;
      return true;
    }
    /**
     * @param {Transaction} transaction
     * @param {number} offset
     */
    integrate(transaction, offset) {
      unexpectedCase();
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     * @param {number} offset
     */
    write(encoder, offset) {
      encoder.writeInfo(structSkipRefNumber);
      writeVarUint(encoder.restEncoder, this.length - offset);
    }
    /**
     * @param {Transaction} transaction
     * @param {StructStore} store
     * @return {null | number}
     */
    getMissing(transaction, store2) {
      return null;
    }
  };
  var glo = (
    /** @type {any} */
    typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}
  );
  var importIdentifier = "__ $YJS$ __";
  if (glo[importIdentifier] === true) {
    console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");
  }
  glo[importIdentifier] = true;

  // packages/sync/node_modules/y-protocols/awareness.js
  var outdatedTimeout = 3e4;
  var Awareness = class extends Observable {
    /**
     * @param {Y.Doc} doc
     */
    constructor(doc2) {
      super();
      this.doc = doc2;
      this.clientID = doc2.clientID;
      this.states = /* @__PURE__ */ new Map();
      this.meta = /* @__PURE__ */ new Map();
      this._checkInterval = /** @type {any} */
      setInterval(() => {
        const now = getUnixTime();
        if (this.getLocalState() !== null && outdatedTimeout / 2 <= now - /** @type {{lastUpdated:number}} */
        this.meta.get(this.clientID).lastUpdated) {
          this.setLocalState(this.getLocalState());
        }
        const remove = [];
        this.meta.forEach((meta, clientid) => {
          if (clientid !== this.clientID && outdatedTimeout <= now - meta.lastUpdated && this.states.has(clientid)) {
            remove.push(clientid);
          }
        });
        if (remove.length > 0) {
          removeAwarenessStates(this, remove, "timeout");
        }
      }, floor(outdatedTimeout / 10));
      doc2.on("destroy", () => {
        this.destroy();
      });
      this.setLocalState({});
    }
    destroy() {
      this.emit("destroy", [this]);
      this.setLocalState(null);
      super.destroy();
      clearInterval(this._checkInterval);
    }
    /**
     * @return {Object<string,any>|null}
     */
    getLocalState() {
      return this.states.get(this.clientID) || null;
    }
    /**
     * @param {Object<string,any>|null} state
     */
    setLocalState(state) {
      const clientID = this.clientID;
      const currLocalMeta = this.meta.get(clientID);
      const clock = currLocalMeta === void 0 ? 0 : currLocalMeta.clock + 1;
      const prevState = this.states.get(clientID);
      if (state === null) {
        this.states.delete(clientID);
      } else {
        this.states.set(clientID, state);
      }
      this.meta.set(clientID, {
        clock,
        lastUpdated: getUnixTime()
      });
      const added = [];
      const updated = [];
      const filteredUpdated = [];
      const removed = [];
      if (state === null) {
        removed.push(clientID);
      } else if (prevState == null) {
        if (state != null) {
          added.push(clientID);
        }
      } else {
        updated.push(clientID);
        if (!equalityDeep(prevState, state)) {
          filteredUpdated.push(clientID);
        }
      }
      if (added.length > 0 || filteredUpdated.length > 0 || removed.length > 0) {
        this.emit("change", [{ added, updated: filteredUpdated, removed }, "local"]);
      }
      this.emit("update", [{ added, updated, removed }, "local"]);
    }
    /**
     * @param {string} field
     * @param {any} value
     */
    setLocalStateField(field, value) {
      const state = this.getLocalState();
      if (state !== null) {
        this.setLocalState({
          ...state,
          [field]: value
        });
      }
    }
    /**
     * @return {Map<number,Object<string,any>>}
     */
    getStates() {
      return this.states;
    }
  };
  var removeAwarenessStates = (awareness, clients, origin2) => {
    const removed = [];
    for (let i = 0; i < clients.length; i++) {
      const clientID = clients[i];
      if (awareness.states.has(clientID)) {
        awareness.states.delete(clientID);
        if (clientID === awareness.clientID) {
          const curMeta = (
            /** @type {MetaClientState} */
            awareness.meta.get(clientID)
          );
          awareness.meta.set(clientID, {
            clock: curMeta.clock + 1,
            lastUpdated: getUnixTime()
          });
        }
        removed.push(clientID);
      }
    }
    if (removed.length > 0) {
      awareness.emit("change", [{ added: [], updated: [], removed }, origin2]);
      awareness.emit("update", [{ added: [], updated: [], removed }, origin2]);
    }
  };

  // packages/sync/build-module/config.mjs
  var CRDT_DOC_VERSION = 1;
  var CRDT_DOC_META_PERSISTENCE_KEY = "fromPersistence";
  var CRDT_RECORD_MAP_KEY = "document";
  var CRDT_STATE_MAP_KEY = "state";
  var CRDT_STATE_MAP_SAVED_AT_KEY = "savedAt";
  var CRDT_STATE_MAP_SAVED_BY_KEY = "savedBy";
  var CRDT_STATE_MAP_VERSION_KEY = "version";
  var LOCAL_EDITOR_ORIGIN = "gutenberg";
  var LOCAL_SYNC_MANAGER_ORIGIN = "syncManager";
  var LOCAL_UNDO_IGNORED_ORIGIN = "gutenberg-undo-ignored";

  // packages/sync/build-module/errors.mjs
  var ConnectionErrorCode = /* @__PURE__ */ ((ConnectionErrorCode22) => {
    ConnectionErrorCode22["AUTHENTICATION_FAILED"] = "authentication-failed";
    ConnectionErrorCode22["CONNECTION_EXPIRED"] = "connection-expired";
    ConnectionErrorCode22["CONNECTION_LIMIT_EXCEEDED"] = "connection-limit-exceeded";
    ConnectionErrorCode22["DOCUMENT_SIZE_LIMIT_EXCEEDED"] = "document-size-limit-exceeded";
    ConnectionErrorCode22["UNKNOWN_ERROR"] = "unknown-error";
    return ConnectionErrorCode22;
  })(ConnectionErrorCode || {});
  var ConnectionError = class extends Error {
    constructor(code = "unknown-error", message) {
      super(message);
      this.code = code;
      this.name = "ConnectionError";
    }
  };

  // packages/sync/build-module/lock-unlock.mjs
  var import_private_apis = __toESM(require_private_apis(), 1);
  var { lock, unlock } = (0, import_private_apis.__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/sync"
  );

  // packages/sync/build-module/performance.mjs
  function logPerformanceTiming(fn) {
    return function(...args2) {
      const start = performance.now();
      const result = fn.apply(this, args2);
      const end = performance.now();
      console.log(
        `[SyncManager][performance]: ${fn.name} took ${(end - start).toFixed(2)} ms`
      );
      return result;
    };
  }
  function passThru(fn) {
    return ((...args2) => fn(...args2));
  }
  function yieldToEventLoop(fn) {
    return function(...args2) {
      setTimeout(() => {
        fn.apply(this, args2);
      }, 0);
    };
  }

  // packages/sync/build-module/providers/index.mjs
  var import_hooks3 = __toESM(require_hooks(), 1);

  // packages/sync/build-module/providers/http-polling/polling-manager.mjs
  var import_hooks2 = __toESM(require_hooks(), 1);

  // packages/sync/node_modules/y-protocols/sync.js
  var messageYjsSyncStep1 = 0;
  var messageYjsSyncStep2 = 1;
  var messageYjsUpdate = 2;
  var writeSyncStep1 = (encoder, doc2) => {
    writeVarUint(encoder, messageYjsSyncStep1);
    const sv = encodeStateVector(doc2);
    writeVarUint8Array(encoder, sv);
  };
  var writeSyncStep2 = (encoder, doc2, encodedStateVector) => {
    writeVarUint(encoder, messageYjsSyncStep2);
    writeVarUint8Array(encoder, encodeStateAsUpdate(doc2, encodedStateVector));
  };
  var readSyncStep1 = (decoder, encoder, doc2) => writeSyncStep2(encoder, doc2, readVarUint8Array(decoder));
  var readSyncStep2 = (decoder, doc2, transactionOrigin, errorHandler) => {
    try {
      applyUpdate(doc2, readVarUint8Array(decoder), transactionOrigin);
    } catch (error) {
      if (errorHandler != null) errorHandler(
        /** @type {Error} */
        error
      );
      console.error("Caught error while handling a Yjs update", error);
    }
  };
  var readUpdate2 = readSyncStep2;
  var readSyncMessage = (decoder, encoder, doc2, transactionOrigin, errorHandler) => {
    const messageType = readVarUint(decoder);
    switch (messageType) {
      case messageYjsSyncStep1:
        readSyncStep1(decoder, encoder, doc2);
        break;
      case messageYjsSyncStep2:
        readSyncStep2(decoder, doc2, transactionOrigin, errorHandler);
        break;
      case messageYjsUpdate:
        readUpdate2(decoder, doc2, transactionOrigin, errorHandler);
        break;
      default:
        throw new Error("Unknown message type");
    }
    return messageType;
  };

  // packages/sync/build-module/providers/http-polling/config.mjs
  var import_hooks = __toESM(require_hooks(), 1);
  var DEFAULT_CLIENT_LIMIT_PER_ROOM = 3;
  var ERROR_RETRY_DELAYS_SOLO_MS = [
    2e3,
    4e3,
    8e3,
    12e3
    // Solo: 26s total retry time solo before dialog
  ];
  var ERROR_RETRY_DELAYS_WITH_COLLABORATORS_MS = [
    1e3,
    2e3,
    4e3,
    8e3
    // With collaborators: 15s total retry time before dialog
  ];
  var DISCONNECT_DIALOG_RETRY_MS = 3e4;
  var MANUAL_RETRY_INTERVAL_MS = 15e3;
  var MAX_UPDATE_SIZE_IN_BYTES = 1 * 1024 * 1024;
  var MAX_ROOMS_PER_REQUEST = 50;
  var POLLING_INTERVAL_IN_MS = (0, import_hooks.applyFilters)(
    "sync.pollingManager.pollingInterval",
    4e3
    // 4 seconds
  );
  var POLLING_INTERVAL_WITH_COLLABORATORS_IN_MS = (0, import_hooks.applyFilters)(
    "sync.pollingManager.pollingIntervalWithCollaborators",
    1e3
    // 1 second
  );
  var POLLING_INTERVAL_BACKGROUND_TAB_IN_MS = 25 * 1e3;

  // packages/sync/build-module/providers/http-polling/types.mjs
  var SyncUpdateType = /* @__PURE__ */ ((SyncUpdateType2) => {
    SyncUpdateType2["COMPACTION"] = "compaction";
    SyncUpdateType2["SYNC_STEP_1"] = "sync_step1";
    SyncUpdateType2["SYNC_STEP_2"] = "sync_step2";
    SyncUpdateType2["UPDATE"] = "update";
    return SyncUpdateType2;
  })(SyncUpdateType || {});

  // packages/sync/build-module/providers/http-polling/utils.mjs
  var import_api_fetch = __toESM(require_api_fetch(), 1);
  var SYNC_API_PATH = "/wp-sync/v1/updates";
  function uint8ArrayToBase64(data) {
    let binary = "";
    const len = data.byteLength;
    for (let i = 0; i < len; i++) {
      binary += String.fromCharCode(data[i]);
    }
    return globalThis.btoa(binary);
  }
  function base64ToUint8Array(base64) {
    const binaryString = globalThis.atob(base64);
    const len = binaryString.length;
    const bytes = new Uint8Array(len);
    for (let i = 0; i < len; i++) {
      bytes[i] = binaryString.charCodeAt(i);
    }
    return bytes;
  }
  function createSyncUpdate(data, type) {
    return {
      data: uint8ArrayToBase64(data),
      type
    };
  }
  function createUpdateQueue(initial = [], paused = true) {
    let isPaused = paused;
    const updates = [...initial];
    return {
      add(update) {
        updates.push(update);
      },
      addBulk(bulkUpdates) {
        if (0 === bulkUpdates.length) {
          return;
        }
        updates.push(...bulkUpdates);
      },
      clear() {
        updates.splice(0, updates.length);
      },
      get() {
        if (isPaused) {
          return [];
        }
        return updates.splice(0, updates.length);
      },
      pause() {
        isPaused = true;
      },
      restore(restoredUpdates) {
        const filtered = restoredUpdates.filter(
          (u) => u.type !== SyncUpdateType.COMPACTION
        );
        if (0 === filtered.length) {
          return;
        }
        updates.unshift(...filtered);
      },
      resume() {
        isPaused = false;
      },
      size() {
        return updates.length;
      }
    };
  }
  async function postSyncUpdate(payload) {
    const response = await (0, import_api_fetch.default)({
      body: JSON.stringify(payload),
      headers: {
        "Content-Type": "application/json"
      },
      method: "POST",
      parse: false,
      path: SYNC_API_PATH
    });
    if (!response.ok) {
      throw new Error(
        `Sync update failed with status ${response.status}`
      );
    }
    return await response.json();
  }
  function postSyncUpdateNonBlocking(payload) {
    if (payload.rooms.length === 0) {
      return;
    }
    (0, import_api_fetch.default)({
      body: JSON.stringify(payload),
      headers: { "Content-Type": "application/json" },
      keepalive: true,
      method: "POST",
      parse: false,
      path: SYNC_API_PATH
    }).catch(() => {
    });
  }
  function intValueOrDefault(value, defaultValue) {
    const intValue = parseInt(String(value), 10);
    return isNaN(intValue) ? defaultValue : intValue;
  }
  function rotateWindow(items2, offset, size2) {
    if (items2.length === 0) {
      return { window: [], nextOffset: 0 };
    }
    const start = (offset % items2.length + items2.length) % items2.length;
    const wrapped = [...items2.slice(start), ...items2.slice(0, start)];
    return {
      window: wrapped.slice(0, Math.max(0, size2)),
      nextOffset: (start + Math.max(0, size2)) % items2.length
    };
  }

  // packages/sync/build-module/providers/http-polling/polling-manager.mjs
  var POLLING_MANAGER_ORIGIN = "polling-manager";
  function isForbiddenError(error) {
    return error?.data?.status === 403;
  }
  function identifyForbiddenRoom(error, rooms) {
    const message = typeof error.message === "string" ? error.message : "";
    const sortedRooms = [...rooms].sort((a, b) => b.length - a.length);
    for (const room of sortedRooms) {
      if (message.includes(room)) {
        return room;
      }
    }
    return null;
  }
  function handleForbiddenError(error, requestedRooms) {
    const forbiddenRoom = identifyForbiddenRoom(
      error,
      requestedRooms.map((r) => r.room)
    );
    if (forbiddenRoom) {
      const state = roomStates.get(forbiddenRoom);
      if (state) {
        state.log(
          "Permission denied, unregistering room",
          { error },
          "error",
          true
          // force
        );
        unregisterRoom(forbiddenRoom, { sendDisconnectSignal: false });
      }
      for (const room of requestedRooms) {
        if (room.room === forbiddenRoom || !roomStates.has(room.room)) {
          continue;
        }
        const remainingState = roomStates.get(room.room);
        if (room.updates.length > 0) {
          remainingState.updateQueue.restore(room.updates);
        }
      }
    } else {
      const rooms = [...roomStates.keys()];
      for (const room of rooms) {
        const state = roomStates.get(room);
        if (state) {
          state.log(
            "Permission denied, unregistering room",
            { error },
            "error",
            true
            // force
          );
          unregisterRoom(room, { sendDisconnectSignal: false });
        }
      }
    }
  }
  var roomStates = /* @__PURE__ */ new Map();
  function createDeprecatedCompactionUpdate(updates) {
    const mergeable = updates.filter(
      (u) => [SyncUpdateType.COMPACTION, SyncUpdateType.UPDATE].includes(
        u.type
      )
    ).map((u) => base64ToUint8Array(u.data));
    return createSyncUpdate(
      mergeUpdatesV2(mergeable),
      SyncUpdateType.COMPACTION
    );
  }
  function createSyncStep1Update(doc2) {
    const encoder = createEncoder();
    writeSyncStep1(encoder, doc2);
    return createSyncUpdate(
      toUint8Array(encoder),
      SyncUpdateType.SYNC_STEP_1
    );
  }
  function createSyncStep2Update(doc2, step1) {
    const decoder = createDecoder(step1);
    const encoder = createEncoder();
    readSyncMessage(
      decoder,
      encoder,
      doc2,
      POLLING_MANAGER_ORIGIN
    );
    return createSyncUpdate(
      toUint8Array(encoder),
      SyncUpdateType.SYNC_STEP_2
    );
  }
  function processAwarenessUpdate(state, awareness) {
    const currentStates = awareness.getStates();
    const added = /* @__PURE__ */ new Set();
    const updated = /* @__PURE__ */ new Set();
    const removed = new Set(
      Array.from(currentStates.keys()).filter(
        (clientId) => !state[clientId]
      )
    );
    Object.entries(state).forEach(([clientIdString, awarenessState]) => {
      const clientId = Number(clientIdString);
      if (clientId === awareness.clientID) {
        return;
      }
      if (null === awarenessState) {
        currentStates.delete(clientId);
        removed.add(clientId);
        return;
      }
      if (!currentStates.has(clientId)) {
        currentStates.set(clientId, awarenessState);
        added.add(clientId);
        return;
      }
      const currentState = currentStates.get(clientId);
      if (JSON.stringify(currentState) !== JSON.stringify(awarenessState)) {
        currentStates.set(clientId, awarenessState);
        updated.add(clientId);
      }
    });
    if (added.size + updated.size > 0) {
      awareness.emit("change", [
        {
          added: Array.from(added),
          updated: Array.from(updated),
          // Left blank on purpose, as the removal of clients is handled in the if condition below.
          removed: []
        }
      ]);
    }
    if (removed.size > 0) {
      removeAwarenessStates(
        awareness,
        Array.from(removed),
        POLLING_MANAGER_ORIGIN
      );
    }
  }
  function processDocUpdate(update, doc2, onSync) {
    const data = base64ToUint8Array(update.data);
    switch (update.type) {
      case SyncUpdateType.SYNC_STEP_1: {
        return createSyncStep2Update(doc2, data);
      }
      case SyncUpdateType.SYNC_STEP_2: {
        const decoder = createDecoder(data);
        const encoder = createEncoder();
        readSyncMessage(
          decoder,
          encoder,
          doc2,
          POLLING_MANAGER_ORIGIN
        );
        onSync();
        return;
      }
      case SyncUpdateType.COMPACTION:
      case SyncUpdateType.UPDATE: {
        applyUpdateV2(doc2, data, POLLING_MANAGER_ORIGIN);
      }
    }
  }
  function checkConnectionLimit(awareness, roomState) {
    if (!roomState.isPrimaryRoom || hasCheckedConnectionLimit) {
      return false;
    }
    hasCheckedConnectionLimit = true;
    const maxClientsPerRoom = (0, import_hooks2.applyFilters)(
      "sync.pollingProvider.maxClientsPerRoom",
      DEFAULT_CLIENT_LIMIT_PER_ROOM,
      roomState.room
    );
    const clientCount = Object.keys(awareness).length;
    const validatedLimit = intValueOrDefault(
      maxClientsPerRoom,
      DEFAULT_CLIENT_LIMIT_PER_ROOM
    );
    if (clientCount > validatedLimit) {
      roomState.log("Connection limit exceeded", {
        clientCount,
        maxClientsPerRoom: validatedLimit,
        room: roomState.room
      });
      return true;
    }
    return false;
  }
  var areListenersRegistered = false;
  var consecutiveFailures = 0;
  var hasCheckedConnectionLimit = false;
  var isManualRetry = false;
  var hasCollaborators = false;
  var isActiveBrowser = "visible" === document.visibilityState;
  var isPolling = false;
  var isUnloadPending = false;
  var pollInterval = POLLING_INTERVAL_IN_MS;
  var pollingTimeoutId = null;
  var roomOverflowOffset = 0;
  function handleBeforeUnload() {
    isUnloadPending = true;
  }
  function handlePageHide() {
    const rooms = Array.from(roomStates.entries()).map(
      ([room, state]) => ({
        after: 0,
        awareness: null,
        client_id: state.clientId,
        room,
        updates: []
      })
    );
    for (let i = 0; i < rooms.length; i += MAX_ROOMS_PER_REQUEST) {
      postSyncUpdateNonBlocking({
        rooms: rooms.slice(i, i + MAX_ROOMS_PER_REQUEST)
      });
    }
  }
  function handleVisibilityChange() {
    const wasActive = isActiveBrowser;
    isActiveBrowser = document.visibilityState === "visible";
    if (isActiveBrowser && !wasActive) {
      if (pollingTimeoutId) {
        clearTimeout(pollingTimeoutId);
        pollingTimeoutId = null;
        poll();
      }
    }
  }
  function selectRoomsForRequest() {
    const allRooms = Array.from(roomStates.values());
    if (allRooms.length <= MAX_ROOMS_PER_REQUEST) {
      return allRooms;
    }
    const primaryRoom = allRooms.find((state) => state.isPrimaryRoom);
    const overflowRooms = allRooms.filter((state) => state !== primaryRoom);
    const overflowSlotsPerRequest = MAX_ROOMS_PER_REQUEST - (primaryRoom ? 1 : 0);
    const { window: overflowSlice, nextOffset } = rotateWindow(
      overflowRooms,
      roomOverflowOffset,
      overflowSlotsPerRequest
    );
    roomOverflowOffset = nextOffset;
    if (primaryRoom) {
      return [primaryRoom, ...overflowSlice];
    }
    return overflowSlice;
  }
  function poll() {
    isPolling = true;
    pollingTimeoutId = null;
    async function start() {
      if (0 === roomStates.size) {
        isPolling = false;
        return;
      }
      isUnloadPending = false;
      const roomsInRequest = selectRoomsForRequest();
      const payload = {
        rooms: roomsInRequest.map((state) => ({
          after: state.endCursor ?? 0,
          awareness: state.localAwarenessState,
          client_id: state.clientId,
          room: state.room,
          updates: state.updateQueue.get()
        }))
      };
      roomsInRequest.forEach((state) => {
        state.onStatusChange({ status: "connecting" });
      });
      try {
        const { rooms } = await postSyncUpdate(payload);
        consecutiveFailures = 0;
        isManualRetry = false;
        roomsInRequest.forEach((state) => {
          if (roomStates.get(state.room) !== state) {
            return;
          }
          state.onStatusChange({ status: "connected" });
        });
        hasCollaborators = false;
        rooms.forEach((room) => {
          if (!roomStates.has(room.room)) {
            return;
          }
          const roomState = roomStates.get(room.room);
          roomState.endCursor = room.end_cursor;
          if (checkConnectionLimit(room.awareness, roomState)) {
            roomState.onStatusChange({
              status: "disconnected",
              error: new ConnectionError(
                ConnectionErrorCode.CONNECTION_LIMIT_EXCEEDED,
                "Connection limit exceeded"
              )
            });
            unregisterRoom(room.room);
            return;
          }
          roomState.processAwarenessUpdate(room.awareness);
          if (roomState.isPrimaryRoom && Object.keys(room.awareness).length > 1) {
            hasCollaborators = true;
            roomStates.forEach((state) => {
              state.updateQueue.resume();
            });
          }
          const responseUpdates = [];
          for (const update of room.updates) {
            try {
              const response = roomState.processDocUpdate(update);
              if (response) {
                responseUpdates.push(response);
              }
            } catch (error) {
              roomState.log(
                "Failed to apply sync update",
                { error, update },
                "error",
                true
                // force
              );
            }
          }
          roomState.updateQueue.addBulk(responseUpdates);
          if (room.should_compact) {
            roomState.log("Server requested compaction update");
            roomState.updateQueue.clear();
            roomState.updateQueue.add(
              roomState.createCompactionUpdate()
            );
          } else if (room.compaction_request) {
            roomState.log("Server requested (old) compaction update");
            roomState.updateQueue.add(
              createDeprecatedCompactionUpdate(
                room.compaction_request
              )
            );
          }
        });
        if (isActiveBrowser && hasCollaborators) {
          pollInterval = POLLING_INTERVAL_WITH_COLLABORATORS_IN_MS;
        } else if (isActiveBrowser) {
          pollInterval = POLLING_INTERVAL_IN_MS;
        } else {
          pollInterval = POLLING_INTERVAL_BACKGROUND_TAB_IN_MS;
        }
      } catch (error) {
        if (isForbiddenError(error)) {
          handleForbiddenError(error, payload.rooms);
          if (roomStates.size === 0) {
            isPolling = false;
            return;
          }
        } else {
          consecutiveFailures++;
          const retrySchedule = hasCollaborators ? ERROR_RETRY_DELAYS_WITH_COLLABORATORS_MS : ERROR_RETRY_DELAYS_SOLO_MS;
          if (consecutiveFailures <= retrySchedule.length) {
            pollInterval = retrySchedule[consecutiveFailures - 1];
          } else {
            pollInterval = DISCONNECT_DIALOG_RETRY_MS;
          }
          if (isManualRetry) {
            pollInterval = MANUAL_RETRY_INTERVAL_MS;
            isManualRetry = false;
          }
          for (const room of payload.rooms) {
            if (!roomStates.has(room.room)) {
              continue;
            }
            const state = roomStates.get(room.room);
            if (room.updates.length > 0 && state.endCursor > 0) {
              state.updateQueue.clear();
              state.updateQueue.add(state.createCompactionUpdate());
            } else if (room.updates.length > 0) {
              state.updateQueue.restore(room.updates);
            }
            state.log(
              "Error posting sync update, will retry with backoff",
              { error, nextPoll: pollInterval },
              "error",
              true
              // force
            );
          }
          if (!isUnloadPending) {
            const backgroundRetriesFailed = consecutiveFailures > retrySchedule.length;
            roomsInRequest.forEach((state) => {
              if (roomStates.get(state.room) !== state) {
                return;
              }
              state.onStatusChange({
                status: "disconnected",
                canManuallyRetry: true,
                consecutiveFailures,
                backgroundRetriesFailed,
                willAutoRetryInMs: pollInterval
              });
            });
          }
        }
      }
      pollingTimeoutId = setTimeout(poll, pollInterval);
    }
    void start();
  }
  function registerRoom({
    room,
    doc: doc2,
    awareness,
    log,
    onSync,
    onStatusChange
  }) {
    if (roomStates.has(room)) {
      return;
    }
    const updateQueue = createUpdateQueue([createSyncStep1Update(doc2)]);
    const isPrimaryRoom = 0 === roomStates.size;
    function onAwarenessUpdate() {
      roomState.localAwarenessState = awareness.getLocalState() ?? {};
    }
    function onDocUpdate(update, origin2) {
      if (POLLING_MANAGER_ORIGIN === origin2) {
        return;
      }
      if (update.byteLength > MAX_UPDATE_SIZE_IN_BYTES) {
        const state = roomStates.get(room);
        if (!state) {
          return;
        }
        state.log("Document size limit exceeded", {
          maxUpdateSizeInBytes: MAX_UPDATE_SIZE_IN_BYTES,
          updateSizeInBytes: update.byteLength
        });
        state.onStatusChange({
          status: "disconnected",
          error: new ConnectionError(
            ConnectionErrorCode.DOCUMENT_SIZE_LIMIT_EXCEEDED,
            "Document size limit exceeded"
          )
        });
        unregisterRoom(room);
      }
      updateQueue.add(createSyncUpdate(update, SyncUpdateType.UPDATE));
    }
    function unregister() {
      doc2.off("updateV2", onDocUpdate);
      awareness.off("change", onAwarenessUpdate);
      updateQueue.clear();
    }
    const roomState = {
      clientId: doc2.clientID,
      createCompactionUpdate: () => createSyncUpdate(
        encodeStateAsUpdateV2(doc2),
        SyncUpdateType.COMPACTION
      ),
      endCursor: 0,
      isPrimaryRoom,
      localAwarenessState: awareness.getLocalState() ?? {},
      log,
      onStatusChange,
      processAwarenessUpdate: (state) => processAwarenessUpdate(state, awareness),
      processDocUpdate: (update) => processDocUpdate(update, doc2, onSync),
      room,
      unregister,
      updateQueue
    };
    doc2.on("updateV2", onDocUpdate);
    awareness.on("change", onAwarenessUpdate);
    roomStates.set(room, roomState);
    if (!areListenersRegistered) {
      window.addEventListener("beforeunload", handleBeforeUnload);
      window.addEventListener("pagehide", handlePageHide);
      document.addEventListener("visibilitychange", handleVisibilityChange);
      areListenersRegistered = true;
    }
    if (!isPolling) {
      poll();
    }
  }
  function unregisterRoom(room, { sendDisconnectSignal = true } = {}) {
    const state = roomStates.get(room);
    if (state) {
      if (sendDisconnectSignal) {
        const rooms = [
          {
            after: 0,
            awareness: null,
            client_id: state.clientId,
            room,
            updates: []
          }
        ];
        postSyncUpdateNonBlocking({ rooms });
      }
      state.unregister();
      roomStates.delete(room);
    }
    if (0 === roomStates.size && areListenersRegistered) {
      window.removeEventListener("beforeunload", handleBeforeUnload);
      window.removeEventListener("pagehide", handlePageHide);
      document.removeEventListener(
        "visibilitychange",
        handleVisibilityChange
      );
      areListenersRegistered = false;
      hasCheckedConnectionLimit = false;
      consecutiveFailures = 0;
      roomOverflowOffset = 0;
    }
  }
  function retryNow() {
    isManualRetry = true;
    if (pollingTimeoutId) {
      clearTimeout(pollingTimeoutId);
      pollingTimeoutId = null;
      poll();
    }
  }
  var pollingManager = {
    registerRoom,
    retryNow,
    unregisterRoom
  };

  // packages/sync/build-module/providers/http-polling/http-polling-provider.mjs
  var HttpPollingProvider = class extends ObservableV2 {
    constructor(options) {
      super();
      this.options = options;
      this.log("Initializing", { room: options.room });
      this.awareness = options.awareness ?? new Awareness(options.ydoc);
      this.connect();
    }
    awareness;
    status = "disconnected";
    synced = false;
    /**
     * Connect to the endpoint and initialize sync.
     */
    connect() {
      this.log("Connecting");
      pollingManager.registerRoom({
        room: this.options.room,
        doc: this.options.ydoc,
        awareness: this.awareness,
        log: this.log,
        onStatusChange: this.emitStatus,
        onSync: this.onSync
      });
    }
    /**
     * Destroy the provider and cleanup resources.
     */
    destroy() {
      this.disconnect();
      super.destroy();
    }
    /**
     * Disconnect the provider and allow reconnection later.
     */
    disconnect() {
      this.log("Disconnecting");
      pollingManager.unregisterRoom(this.options.room);
      this.emitStatus({ status: "disconnected" });
    }
    /**
     * Emit connection status, passing the full object through so that
     * additional fields (e.g. `willAutoRetryInMs`) are preserved for consumers.
     *
     * @param connectionStatus The connection status object
     */
    emitStatus = (connectionStatus) => {
      const { status } = connectionStatus;
      const error = status === "disconnected" ? connectionStatus.error : void 0;
      if (this.status === status && !error) {
        return;
      }
      if (status === "connecting" && this.status !== "disconnected") {
        return;
      }
      this.log("Status change", { status, error });
      this.status = status;
      this.emit("status", [connectionStatus]);
    };
    /**
     * Log debug messages if debugging is enabled.
     *
     * @param message    The debug message
     * @param debug      Additional debug information
     * @param errorLevel The console method to use for logging
     * @param force      Whether to force logging regardless of debug setting
     */
    log = (message, debug = {}, errorLevel = "log", force = false) => {
      if (!this.options.debug && !force) {
        return;
      }
      const logFn = console[errorLevel] || console.log;
      logFn(`[${this.constructor.name}]: ${message}`, {
        room: this.options.room,
        ...debug
      });
    };
    /**
     * Handle synchronization events from the polling manager.
     */
    onSync = () => {
      if (!this.synced) {
        this.synced = true;
        this.log("Synced");
      }
    };
  };
  function createHttpPollingProvider() {
    return async ({
      awareness,
      objectType,
      objectId,
      ydoc
    }) => {
      const room = objectId ? `${objectType}:${objectId}` : objectType;
      const provider = new HttpPollingProvider({
        awareness,
        // debug: true,
        room,
        ydoc
      });
      return {
        destroy: () => provider.destroy(),
        // Adapter: ObservableV2.on is compatible with ProviderOn
        // The callback receives data as the first parameter
        on: (event, callback) => {
          provider.on(event, callback);
        }
      };
    };
  }

  // packages/sync/build-module/providers/index.mjs
  var providerCreators = null;
  function getDefaultProviderCreators() {
    return [createHttpPollingProvider()];
  }
  function isProviderCreator(creator) {
    return "function" === typeof creator;
  }
  function getProviderCreators() {
    if (providerCreators) {
      return providerCreators;
    }
    if (!window._wpCollaborationEnabled) {
      return [];
    }
    const filteredProviderCreators = (0, import_hooks3.applyFilters)(
      "sync.providers",
      getDefaultProviderCreators()
    );
    if (!Array.isArray(filteredProviderCreators)) {
      providerCreators = [];
      return providerCreators;
    }
    providerCreators = filteredProviderCreators.filter(isProviderCreator);
    return providerCreators;
  }

  // packages/sync/build-module/y-utilities/y-multidoc-undomanager.mjs
  var popStackItem2 = (mum, type) => {
    const stack = type === "undo" ? mum.undoStack : mum.redoStack;
    while (stack.length > 0) {
      const um = (
        /** @type {Y.UndoManager} */
        stack.pop()
      );
      const prevUmStack = type === "undo" ? um.undoStack : um.redoStack;
      const stackItem = (
        /** @type {any} */
        prevUmStack.pop()
      );
      let actionPerformed = false;
      if (type === "undo") {
        um.undoStack = [stackItem];
        actionPerformed = um.undo() !== null;
        um.undoStack = prevUmStack;
      } else {
        um.redoStack = [stackItem];
        actionPerformed = um.redo() !== null;
        um.redoStack = prevUmStack;
      }
      if (actionPerformed) {
        return stackItem;
      }
    }
    return null;
  };
  var YMultiDocUndoManager = class extends Observable {
    /**
     * @param {Y.AbstractType<any>|Array<Y.AbstractType<any>>} typeScope Accepts either a single type, or an array of types
     * @param {ConstructorParameters<typeof Y.UndoManager>[1]} opts
     */
    constructor(typeScope = [], opts = {}) {
      super();
      this.docs = /* @__PURE__ */ new Map();
      this.trackedOrigins = opts.trackedOrigins || /* @__PURE__ */ new Set([null]);
      opts.trackedOrigins = this.trackedOrigins;
      this._defaultOpts = opts;
      this.undoStack = [];
      this.redoStack = [];
      this.addToScope(typeScope);
    }
    /**
     * @param {Array<Y.AbstractType<any>> | Y.AbstractType<any>} ytypes
     */
    addToScope(ytypes) {
      ytypes = isArray(ytypes) ? ytypes : [ytypes];
      ytypes.forEach((ytype) => {
        const ydoc = (
          /** @type {Y.Doc} */
          ytype.doc
        );
        const um = setIfUndefined(this.docs, ydoc, () => {
          const um2 = new UndoManager([ytype], this._defaultOpts);
          um2.on(
            "stack-cleared",
            /** @param {any} opts */
            ({
              undoStackCleared,
              redoStackCleared
            }) => {
              this.clear(undoStackCleared, redoStackCleared);
            }
          );
          ydoc.on("destroy", () => {
            this.docs.delete(ydoc);
            this.undoStack = this.undoStack.filter(
              (um3) => um3.doc !== ydoc
            );
            this.redoStack = this.redoStack.filter(
              (um3) => um3.doc !== ydoc
            );
          });
          um2.on(
            "stack-item-added",
            /** @param {any} change */
            (change) => {
              const stack = change.type === "undo" ? this.undoStack : this.redoStack;
              stack.push(um2);
              this.emit("stack-item-added", [
                { ...change, ydoc },
                this
              ]);
            }
          );
          um2.on(
            "stack-item-updated",
            /** @param {any} change */
            (change) => {
              this.emit("stack-item-updated", [
                { ...change, ydoc },
                this
              ]);
            }
          );
          um2.on(
            "stack-item-popped",
            /** @param {any} change */
            (change) => {
              this.emit("stack-item-popped", [
                { ...change, ydoc },
                this
              ]);
            }
          );
          return um2;
        });
        if (um.scope.every((yt) => yt !== ytype)) {
          um.scope.push(ytype);
        }
      });
    }
    /**
     * @param {any} origin
     */
    /* c8 ignore next 3 */
    addTrackedOrigin(origin2) {
      this.trackedOrigins.add(origin2);
    }
    /**
     * @param {any} origin
     */
    /* c8 ignore next 3 */
    removeTrackedOrigin(origin2) {
      this.trackedOrigins.delete(origin2);
    }
    /**
     * Undo last changes on type.
     *
     * @return {any?} Returns StackItem if a change was applied
     */
    undo() {
      return popStackItem2(this, "undo");
    }
    /**
     * Redo last undo operation.
     *
     * @return {any?} Returns StackItem if a change was applied
     */
    redo() {
      return popStackItem2(this, "redo");
    }
    clear(clearUndoStack = true, clearRedoStack = true) {
      if (clearUndoStack && this.canUndo() || clearRedoStack && this.canRedo()) {
        this.docs.forEach((um) => {
          clearUndoStack && (this.undoStack = []);
          clearRedoStack && (this.redoStack = []);
          um.clear(clearUndoStack, clearRedoStack);
        });
        this.emit("stack-cleared", [
          {
            undoStackCleared: clearUndoStack,
            redoStackCleared: clearRedoStack
          }
        ]);
      }
    }
    /* c8 ignore next 5 */
    stopCapturing() {
      this.docs.forEach((um) => {
        um.stopCapturing();
      });
    }
    /**
     * Are undo steps available?
     *
     * @return {boolean} `true` if undo is possible
     */
    canUndo() {
      return this.undoStack.length > 0;
    }
    /**
     * Are redo steps available?
     *
     * @return {boolean} `true` if redo is possible
     */
    canRedo() {
      return this.redoStack.length > 0;
    }
    destroy() {
      this.docs.forEach((um) => um.destroy());
      super.destroy();
    }
  };

  // packages/sync/build-module/undo-manager.mjs
  function createUndoManager() {
    const yUndoManager = new YMultiDocUndoManager([], {
      // Throttle undo/redo captures after 500ms of inactivity.
      // 500 was selected from subjective local UX testing, shorter timeouts
      // may cause mid-word undo stack items.
      captureTimeout: 500,
      // Ensure that we only scope the undo/redo to the current editor.
      // The yjs document's clientID is added once it's available.
      trackedOrigins: /* @__PURE__ */ new Set([LOCAL_EDITOR_ORIGIN])
    });
    return {
      /**
       * Record changes into the history.
       * Since Yjs automatically tracks changes, this method translates the WordPress
       * HistoryRecord format into Yjs operations.
       *
       * @param _record   A record of changes to record.
       * @param _isStaged Whether to immediately create an undo point or not.
       */
      addRecord(_record, _isStaged = false) {
      },
      /**
       * Add a Yjs map to the scope of the undo manager.
       *
       * @param {Y.Map< any >} ymap                     The Yjs map to add to the scope.
       * @param                handlers
       * @param                handlers.addUndoMeta
       * @param                handlers.restoreUndoMeta
       */
      addToScope(ymap, handlers) {
        if (ymap.doc === null) {
          return;
        }
        const ydoc = ymap.doc;
        yUndoManager.addToScope(ymap);
        const { addUndoMeta, restoreUndoMeta } = handlers;
        yUndoManager.on("stack-item-added", (event) => {
          addUndoMeta(ydoc, event.stackItem.meta);
        });
        yUndoManager.on("stack-item-popped", (event) => {
          restoreUndoMeta(ydoc, event.stackItem.meta);
        });
      },
      /**
       * Undo the last recorded changes.
       *
       */
      undo() {
        if (!yUndoManager.canUndo()) {
          return;
        }
        yUndoManager.undo();
        return [];
      },
      /**
       * Redo the last undone changes.
       */
      redo() {
        if (!yUndoManager.canRedo()) {
          return;
        }
        yUndoManager.redo();
        return [];
      },
      /**
       * Check if there are changes that can be undone.
       *
       * @return {boolean} Whether there are changes to undo.
       */
      hasUndo() {
        return yUndoManager.canUndo();
      },
      /**
       * Check if there are changes that can be redone.
       *
       * @return {boolean} Whether there are changes to redo.
       */
      hasRedo() {
        return yUndoManager.canRedo();
      },
      /**
       * Stop capturing changes into the current undo item.
       * The next change will create a new undo item.
       */
      stopCapturing() {
        yUndoManager.stopCapturing();
      }
    };
  }

  // packages/sync/build-module/utils.mjs
  function createYjsDoc(documentMeta = {}) {
    const metaMap = new Map(
      Object.entries(documentMeta)
    );
    return new Doc({ meta: metaMap });
  }
  function initializeYjsDoc(ydoc) {
    const stateMap = ydoc.getMap(CRDT_STATE_MAP_KEY);
    stateMap.set(CRDT_STATE_MAP_VERSION_KEY, CRDT_DOC_VERSION);
  }
  function markEntityAsSaved(ydoc) {
    const recordMeta = ydoc.getMap(CRDT_STATE_MAP_KEY);
    recordMeta.set(CRDT_STATE_MAP_SAVED_AT_KEY, Date.now());
    recordMeta.set(CRDT_STATE_MAP_SAVED_BY_KEY, ydoc.clientID);
  }
  function pseudoRandomID() {
    return Math.floor(Math.random() * 1e9);
  }
  function serializeCrdtDoc(crdtDoc) {
    return JSON.stringify({
      document: toBase64(encodeStateAsUpdateV2(crdtDoc)),
      updateId: pseudoRandomID()
      // helps with debugging
    });
  }
  function deserializeCrdtDoc(serializedCrdtDoc) {
    try {
      const { document: document2 } = JSON.parse(serializedCrdtDoc);
      const docMeta = {
        [CRDT_DOC_META_PERSISTENCE_KEY]: true
      };
      const ydoc = createYjsDoc(docMeta);
      const yupdate = fromBase64(document2);
      applyUpdateV2(ydoc, yupdate);
      ydoc.clientID = pseudoRandomID();
      return ydoc;
    } catch (e) {
      return null;
    }
  }

  // packages/sync/build-module/manager.mjs
  function getEntityId(objectType, objectId) {
    return `${objectType}_${objectId}`;
  }
  function createSyncManager(debug = false) {
    const debugWrap = debug ? logPerformanceTiming : passThru;
    const collectionStates = /* @__PURE__ */ new Map();
    const entityStates = /* @__PURE__ */ new Map();
    let undoManager2;
    function log(component, message, entityId, context = {}) {
      if (!debug) {
        return;
      }
      console.log(`[SyncManager][${component}]: ${message}`, {
        ...context,
        entityId
      });
    }
    async function loadEntity(syncConfig, objectType, objectId, record, handlers) {
      const providerCreators2 = getProviderCreators();
      const entityId = getEntityId(objectType, objectId);
      if (0 === providerCreators2.length) {
        log("loadEntity", "no providers, skipping", entityId);
        return;
      }
      if (entityStates.has(entityId)) {
        log("loadEntity", "already loaded", entityId);
        return;
      }
      if (false === syncConfig.shouldSync?.(objectType, objectId)) {
        log("loadEntity", "shouldSync false, skipping", entityId);
        return;
      }
      log("loadEntity", "loading", entityId);
      handlers = {
        addUndoMeta: debugWrap(handlers.addUndoMeta),
        editRecord: debugWrap(handlers.editRecord),
        getEditedRecord: debugWrap(handlers.getEditedRecord),
        onStatusChange: debugWrap(handlers.onStatusChange),
        persistCRDTDoc: debugWrap(handlers.persistCRDTDoc),
        refetchRecord: debugWrap(handlers.refetchRecord),
        restoreUndoMeta: debugWrap(handlers.restoreUndoMeta)
      };
      const ydoc = createYjsDoc({ objectType });
      const recordMap = ydoc.getMap(CRDT_RECORD_MAP_KEY);
      const stateMap = ydoc.getMap(CRDT_STATE_MAP_KEY);
      const now = Date.now();
      const unload = () => {
        log("loadEntity", "unloading", entityId);
        providerResults.forEach((result) => result.destroy());
        handlers.onStatusChange(null);
        recordMap.unobserveDeep(onRecordUpdate);
        stateMap.unobserve(onStateMapUpdate);
        ydoc.destroy();
        entityStates.delete(entityId);
      };
      const awareness = syncConfig.createAwareness?.(ydoc, objectId);
      const onRecordUpdate = (_events, transaction) => {
        if (transaction.local && !(transaction.origin instanceof UndoManager)) {
          return;
        }
        void internal.updateEntityRecord(objectType, objectId);
      };
      const onStateMapUpdate = (event, transaction) => {
        if (transaction.local) {
          return;
        }
        event.keysChanged.forEach((key) => {
          switch (key) {
            case CRDT_STATE_MAP_SAVED_AT_KEY:
              const newValue = stateMap.get(CRDT_STATE_MAP_SAVED_AT_KEY);
              if ("number" === typeof newValue && newValue > now) {
                log("loadEntity", "refetching record", entityId);
                void handlers.refetchRecord().catch(() => {
                });
              }
              break;
          }
        });
      };
      if (!undoManager2) {
        undoManager2 = createUndoManager();
      }
      const { addUndoMeta, restoreUndoMeta } = handlers;
      undoManager2.addToScope(recordMap, {
        addUndoMeta,
        restoreUndoMeta
      });
      const entityState = {
        awareness,
        handlers,
        objectId,
        objectType,
        syncConfig,
        unload,
        ydoc
      };
      entityStates.set(entityId, entityState);
      log("loadEntity", "connecting", entityId);
      const providerResults = await Promise.all(
        providerCreators2.map(async (create9) => {
          const provider = await create9({
            objectType,
            objectId,
            ydoc,
            awareness
          });
          provider.on("status", handlers.onStatusChange);
          return provider;
        })
      );
      recordMap.observeDeep(onRecordUpdate);
      stateMap.observe(onStateMapUpdate);
      initializeYjsDoc(ydoc);
      internal.applyPersistedCrdtDoc(objectType, objectId, record);
    }
    async function loadCollection(syncConfig, objectType, handlers) {
      const providerCreators2 = getProviderCreators();
      const entityId = getEntityId(objectType, null);
      if (0 === providerCreators2.length) {
        log("loadCollection", "no providers, skipping", entityId);
        return;
      }
      if (collectionStates.has(objectType)) {
        log("loadCollection", "already loaded", entityId);
        return;
      }
      if (false === syncConfig.shouldSync?.(objectType, null)) {
        log("loadCollection", "shouldSync false, skipping", entityId);
        return;
      }
      log("loadCollection", "loading", entityId);
      const ydoc = createYjsDoc({ collection: true, objectType });
      const stateMap = ydoc.getMap(CRDT_STATE_MAP_KEY);
      const now = Date.now();
      const unload = () => {
        log("loadCollection", "unloading", entityId);
        providerResults.forEach((result) => result.destroy());
        handlers.onStatusChange(null);
        stateMap.unobserve(onStateMapUpdate);
        ydoc.destroy();
        collectionStates.delete(objectType);
      };
      const onStateMapUpdate = (event, transaction) => {
        if (transaction.local) {
          return;
        }
        event.keysChanged.forEach((key) => {
          switch (key) {
            case CRDT_STATE_MAP_SAVED_AT_KEY:
              const newValue = stateMap.get(CRDT_STATE_MAP_SAVED_AT_KEY);
              if ("number" === typeof newValue && newValue > now) {
                void handlers.refetchRecords().catch(() => {
                });
              }
              break;
          }
        });
      };
      const awareness = syncConfig.createAwareness?.(ydoc);
      const collectionState = {
        awareness,
        handlers,
        syncConfig,
        unload,
        ydoc
      };
      collectionStates.set(objectType, collectionState);
      log("loadCollection", "connecting", entityId);
      const providerResults = await Promise.all(
        providerCreators2.map(async (create9) => {
          const provider = await create9({
            awareness,
            objectType,
            objectId: null,
            ydoc
          });
          provider.on("status", handlers.onStatusChange);
          return provider;
        })
      );
      stateMap.observe(onStateMapUpdate);
      initializeYjsDoc(ydoc);
    }
    function unloadEntity(objectType, objectId) {
      const entityId = getEntityId(objectType, objectId);
      log("unloadEntity", "unloading", entityId);
      entityStates.get(entityId)?.unload();
      updateCRDTDoc(objectType, null, {}, origin, { isSave: true });
    }
    function getAwareness(objectType, objectId) {
      const entityId = getEntityId(objectType, objectId);
      const entityState = entityStates.get(entityId);
      if (!entityState || !entityState.awareness) {
        return void 0;
      }
      return entityState.awareness;
    }
    function _applyPersistedCrdtDoc(objectType, objectId, record) {
      const entityId = getEntityId(objectType, objectId);
      const entityState = entityStates.get(entityId);
      if (!entityState) {
        log("applyPersistedCrdtDoc", "no entity state", entityId);
        return;
      }
      const {
        handlers,
        syncConfig: {
          applyChangesToCRDTDoc,
          getChangesFromCRDTDoc,
          getPersistedCRDTDoc
        },
        ydoc: targetDoc
      } = entityState;
      const serialized = getPersistedCRDTDoc?.(record);
      const tempDoc = serialized ? deserializeCrdtDoc(serialized) : null;
      if (!tempDoc) {
        log("applyPersistedCrdtDoc", "no persisted doc", entityId);
        targetDoc.transact(() => {
          applyChangesToCRDTDoc(targetDoc, record);
          handlers.persistCRDTDoc();
        }, LOCAL_SYNC_MANAGER_ORIGIN);
        return;
      }
      const update = encodeStateAsUpdateV2(tempDoc);
      applyUpdateV2(targetDoc, update);
      const invalidations = getChangesFromCRDTDoc(tempDoc, record);
      const invalidatedKeys = Object.keys(invalidations);
      tempDoc.destroy();
      if (0 === invalidatedKeys.length) {
        log("applyPersistedCrdtDoc", "valid persisted doc", entityId);
        return;
      }
      log("applyPersistedCrdtDoc", "invalidated keys", entityId, {
        invalidatedKeys
      });
      const changes = invalidatedKeys.reduce(
        (acc, key) => Object.assign(acc, {
          [key]: record[key]
        }),
        {}
      );
      targetDoc.transact(() => {
        applyChangesToCRDTDoc(targetDoc, changes);
        handlers.persistCRDTDoc();
      }, LOCAL_SYNC_MANAGER_ORIGIN);
    }
    function updateCRDTDoc(objectType, objectId, changes, origin2, options = {}) {
      const { isSave = false, isNewUndoLevel = false } = options;
      const entityId = getEntityId(objectType, objectId);
      const entityState = entityStates.get(entityId);
      const collectionState = collectionStates.get(objectType);
      if (entityState) {
        const { syncConfig, ydoc } = entityState;
        if (isNewUndoLevel && undoManager2) {
          undoManager2.stopCapturing?.();
        }
        ydoc.transact(() => {
          log("updateCRDTDoc", "applying changes", entityId, {
            changedKeys: Object.keys(changes)
          });
          syncConfig.applyChangesToCRDTDoc(ydoc, changes);
          if (isSave) {
            markEntityAsSaved(ydoc);
          }
        }, origin2);
      }
      if (collectionState && isSave) {
        collectionState.ydoc.transact(() => {
          markEntityAsSaved(collectionState.ydoc);
        }, origin2);
      }
    }
    async function _updateEntityRecord(objectType, objectId) {
      const entityId = getEntityId(objectType, objectId);
      const entityState = entityStates.get(entityId);
      if (!entityState) {
        log("updateEntityRecord", "no entity state", entityId);
        return;
      }
      const { handlers, syncConfig, ydoc } = entityState;
      const changes = syncConfig.getChangesFromCRDTDoc(
        ydoc,
        await handlers.getEditedRecord()
      );
      const changedKeys = Object.keys(changes);
      if (0 === changedKeys.length) {
        return;
      }
      log("updateEntityRecord", "changes", entityId, {
        changedKeys
      });
      handlers.editRecord(changes);
    }
    async function createPersistedCRDTDoc(objectType, objectId) {
      const entityId = getEntityId(objectType, objectId);
      const entityState = entityStates.get(entityId);
      if (!entityState?.ydoc) {
        return null;
      }
      await new Promise((resolve) => setTimeout(resolve, 0));
      return serializeCrdtDoc(entityState.ydoc);
    }
    const internal = {
      applyPersistedCrdtDoc: debugWrap(_applyPersistedCrdtDoc),
      updateEntityRecord: debugWrap(_updateEntityRecord)
    };
    return {
      createPersistedCRDTDoc: debugWrap(createPersistedCRDTDoc),
      getAwareness,
      load: debugWrap(loadEntity),
      loadCollection: debugWrap(loadCollection),
      // Use getter to ensure we always return the current value of `undoManager`.
      get undoManager() {
        return undoManager2;
      },
      unload: debugWrap(unloadEntity),
      update: debugWrap(yieldToEventLoop(updateCRDTDoc))
    };
  }

  // packages/sync/node_modules/diff/libesm/diff/base.js
  var Diff = class {
    diff(oldStr, newStr, options = {}) {
      let callback;
      if (typeof options === "function") {
        callback = options;
        options = {};
      } else if ("callback" in options) {
        callback = options.callback;
      }
      const oldString = this.castInput(oldStr, options);
      const newString = this.castInput(newStr, options);
      const oldTokens = this.removeEmpty(this.tokenize(oldString, options));
      const newTokens = this.removeEmpty(this.tokenize(newString, options));
      return this.diffWithOptionsObj(oldTokens, newTokens, options, callback);
    }
    diffWithOptionsObj(oldTokens, newTokens, options, callback) {
      var _a;
      const done = (value) => {
        value = this.postProcess(value, options);
        if (callback) {
          setTimeout(function() {
            callback(value);
          }, 0);
          return void 0;
        } else {
          return value;
        }
      };
      const newLen = newTokens.length, oldLen = oldTokens.length;
      let editLength = 1;
      let maxEditLength = newLen + oldLen;
      if (options.maxEditLength != null) {
        maxEditLength = Math.min(maxEditLength, options.maxEditLength);
      }
      const maxExecutionTime = (_a = options.timeout) !== null && _a !== void 0 ? _a : Infinity;
      const abortAfterTimestamp = Date.now() + maxExecutionTime;
      const bestPath = [{ oldPos: -1, lastComponent: void 0 }];
      let newPos = this.extractCommon(bestPath[0], newTokens, oldTokens, 0, options);
      if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) {
        return done(this.buildValues(bestPath[0].lastComponent, newTokens, oldTokens));
      }
      let minDiagonalToConsider = -Infinity, maxDiagonalToConsider = Infinity;
      const execEditLength = () => {
        for (let diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) {
          let basePath;
          const removePath = bestPath[diagonalPath - 1], addPath = bestPath[diagonalPath + 1];
          if (removePath) {
            bestPath[diagonalPath - 1] = void 0;
          }
          let canAdd = false;
          if (addPath) {
            const addPathNewPos = addPath.oldPos - diagonalPath;
            canAdd = addPath && 0 <= addPathNewPos && addPathNewPos < newLen;
          }
          const canRemove = removePath && removePath.oldPos + 1 < oldLen;
          if (!canAdd && !canRemove) {
            bestPath[diagonalPath] = void 0;
            continue;
          }
          if (!canRemove || canAdd && removePath.oldPos < addPath.oldPos) {
            basePath = this.addToPath(addPath, true, false, 0, options);
          } else {
            basePath = this.addToPath(removePath, false, true, 1, options);
          }
          newPos = this.extractCommon(basePath, newTokens, oldTokens, diagonalPath, options);
          if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) {
            return done(this.buildValues(basePath.lastComponent, newTokens, oldTokens)) || true;
          } else {
            bestPath[diagonalPath] = basePath;
            if (basePath.oldPos + 1 >= oldLen) {
              maxDiagonalToConsider = Math.min(maxDiagonalToConsider, diagonalPath - 1);
            }
            if (newPos + 1 >= newLen) {
              minDiagonalToConsider = Math.max(minDiagonalToConsider, diagonalPath + 1);
            }
          }
        }
        editLength++;
      };
      if (callback) {
        (function exec() {
          setTimeout(function() {
            if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) {
              return callback(void 0);
            }
            if (!execEditLength()) {
              exec();
            }
          }, 0);
        })();
      } else {
        while (editLength <= maxEditLength && Date.now() <= abortAfterTimestamp) {
          const ret = execEditLength();
          if (ret) {
            return ret;
          }
        }
      }
    }
    addToPath(path, added, removed, oldPosInc, options) {
      const last2 = path.lastComponent;
      if (last2 && !options.oneChangePerToken && last2.added === added && last2.removed === removed) {
        return {
          oldPos: path.oldPos + oldPosInc,
          lastComponent: { count: last2.count + 1, added, removed, previousComponent: last2.previousComponent }
        };
      } else {
        return {
          oldPos: path.oldPos + oldPosInc,
          lastComponent: { count: 1, added, removed, previousComponent: last2 }
        };
      }
    }
    extractCommon(basePath, newTokens, oldTokens, diagonalPath, options) {
      const newLen = newTokens.length, oldLen = oldTokens.length;
      let oldPos = basePath.oldPos, newPos = oldPos - diagonalPath, commonCount = 0;
      while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(oldTokens[oldPos + 1], newTokens[newPos + 1], options)) {
        newPos++;
        oldPos++;
        commonCount++;
        if (options.oneChangePerToken) {
          basePath.lastComponent = { count: 1, previousComponent: basePath.lastComponent, added: false, removed: false };
        }
      }
      if (commonCount && !options.oneChangePerToken) {
        basePath.lastComponent = { count: commonCount, previousComponent: basePath.lastComponent, added: false, removed: false };
      }
      basePath.oldPos = oldPos;
      return newPos;
    }
    equals(left, right, options) {
      if (options.comparator) {
        return options.comparator(left, right);
      } else {
        return left === right || !!options.ignoreCase && left.toLowerCase() === right.toLowerCase();
      }
    }
    removeEmpty(array) {
      const ret = [];
      for (let i = 0; i < array.length; i++) {
        if (array[i]) {
          ret.push(array[i]);
        }
      }
      return ret;
    }
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
    castInput(value, options) {
      return value;
    }
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
    tokenize(value, options) {
      return Array.from(value);
    }
    join(chars) {
      return chars.join("");
    }
    postProcess(changeObjects, options) {
      return changeObjects;
    }
    get useLongestToken() {
      return false;
    }
    buildValues(lastComponent, newTokens, oldTokens) {
      const components = [];
      let nextComponent;
      while (lastComponent) {
        components.push(lastComponent);
        nextComponent = lastComponent.previousComponent;
        delete lastComponent.previousComponent;
        lastComponent = nextComponent;
      }
      components.reverse();
      const componentLen = components.length;
      let componentPos = 0, newPos = 0, oldPos = 0;
      for (; componentPos < componentLen; componentPos++) {
        const component = components[componentPos];
        if (!component.removed) {
          if (!component.added && this.useLongestToken) {
            let value = newTokens.slice(newPos, newPos + component.count);
            value = value.map(function(value2, i) {
              const oldValue = oldTokens[oldPos + i];
              return oldValue.length > value2.length ? oldValue : value2;
            });
            component.value = this.join(value);
          } else {
            component.value = this.join(newTokens.slice(newPos, newPos + component.count));
          }
          newPos += component.count;
          if (!component.added) {
            oldPos += component.count;
          }
        } else {
          component.value = this.join(oldTokens.slice(oldPos, oldPos + component.count));
          oldPos += component.count;
        }
      }
      return components;
    }
  };

  // packages/sync/node_modules/diff/libesm/diff/character.js
  var CharacterDiff = class extends Diff {
  };
  var characterDiff = new CharacterDiff();
  function diffChars(oldStr, newStr, options) {
    return characterDiff.diff(oldStr, newStr, options);
  }

  // packages/sync/node_modules/diff/libesm/diff/line.js
  var LineDiff = class extends Diff {
    constructor() {
      super(...arguments);
      this.tokenize = tokenize;
    }
    equals(left, right, options) {
      if (options.ignoreWhitespace) {
        if (!options.newlineIsToken || !left.includes("\n")) {
          left = left.trim();
        }
        if (!options.newlineIsToken || !right.includes("\n")) {
          right = right.trim();
        }
      } else if (options.ignoreNewlineAtEof && !options.newlineIsToken) {
        if (left.endsWith("\n")) {
          left = left.slice(0, -1);
        }
        if (right.endsWith("\n")) {
          right = right.slice(0, -1);
        }
      }
      return super.equals(left, right, options);
    }
  };
  var lineDiff = new LineDiff();
  function diffLines(oldStr, newStr, options) {
    return lineDiff.diff(oldStr, newStr, options);
  }
  function tokenize(value, options) {
    if (options.stripTrailingCr) {
      value = value.replace(/\r\n/g, "\n");
    }
    const retLines = [], linesAndNewlines = value.split(/(\n|\r\n)/);
    if (!linesAndNewlines[linesAndNewlines.length - 1]) {
      linesAndNewlines.pop();
    }
    for (let i = 0; i < linesAndNewlines.length; i++) {
      const line = linesAndNewlines[i];
      if (i % 2 && !options.newlineIsToken) {
        retLines[retLines.length - 1] += line;
      } else {
        retLines.push(line);
      }
    }
    return retLines;
  }

  // packages/sync/build-module/quill-delta/Delta.mjs
  var import_es63 = __toESM(require_es6(), 1);

  // packages/sync/build-module/quill-delta/AttributeMap.mjs
  var import_es62 = __toESM(require_es6(), 1);
  function cloneDeep(value) {
    return JSON.parse(JSON.stringify(value));
  }
  var AttributeMap;
  ((AttributeMap2) => {
    function compose3(a = {}, b = {}, keepNull = false) {
      if (typeof a !== "object") {
        a = {};
      }
      if (typeof b !== "object") {
        b = {};
      }
      let attributes = cloneDeep(b);
      if (!keepNull) {
        attributes = Object.keys(attributes).reduce(
          (copy2, key) => {
            if (attributes[key] !== null || attributes[key] !== void 0) {
              copy2[key] = attributes[key];
            }
            return copy2;
          },
          {}
        );
      }
      for (const key in a) {
        if (a[key] !== void 0 && b[key] === void 0) {
          attributes[key] = a[key];
        }
      }
      return Object.keys(attributes).length > 0 ? attributes : void 0;
    }
    AttributeMap2.compose = compose3;
    function diff(a = {}, b = {}) {
      if (typeof a !== "object") {
        a = {};
      }
      if (typeof b !== "object") {
        b = {};
      }
      const attributes = Object.keys(a).concat(Object.keys(b)).reduce((attrs, key) => {
        if (!(0, import_es62.default)(a[key], b[key])) {
          attrs[key] = b[key] === void 0 ? null : b[key];
        }
        return attrs;
      }, {});
      return Object.keys(attributes).length > 0 ? attributes : void 0;
    }
    AttributeMap2.diff = diff;
    function invert(attr = {}, base = {}) {
      attr = attr || {};
      const baseInverted = Object.keys(base).reduce(
        (memo, key) => {
          if (base[key] !== attr[key] && attr[key] !== void 0) {
            memo[key] = base[key];
          }
          return memo;
        },
        {}
      );
      return Object.keys(attr).reduce((memo, key) => {
        if (attr[key] !== base[key] && base[key] === void 0) {
          memo[key] = null;
        }
        return memo;
      }, baseInverted);
    }
    AttributeMap2.invert = invert;
    function transform(a, b, priority = false) {
      if (typeof a !== "object") {
        return b;
      }
      if (typeof b !== "object") {
        return void 0;
      }
      if (!priority) {
        return b;
      }
      const attributes = Object.keys(b).reduce(
        (attrs, key) => {
          if (a[key] === void 0) {
            attrs[key] = b[key];
          }
          return attrs;
        },
        {}
      );
      return Object.keys(attributes).length > 0 ? attributes : void 0;
    }
    AttributeMap2.transform = transform;
  })(AttributeMap || (AttributeMap = {}));
  var AttributeMap_default = AttributeMap;

  // packages/sync/build-module/quill-delta/Op.mjs
  var Op;
  ((Op2) => {
    function length3(op) {
      if (typeof op.delete === "number") {
        return op.delete;
      } else if (typeof op.retain === "number") {
        return op.retain;
      } else if (typeof op.retain === "object" && op.retain !== null) {
        return 1;
      }
      return typeof op.insert === "string" ? op.insert.length : 1;
    }
    Op2.length = length3;
  })(Op || (Op = {}));
  var Op_default = Op;

  // packages/sync/build-module/quill-delta/OpIterator.mjs
  var Iterator2 = class {
    ops;
    index;
    offset;
    constructor(ops) {
      this.ops = ops;
      this.index = 0;
      this.offset = 0;
    }
    hasNext() {
      return this.peekLength() < Infinity;
    }
    next(length3) {
      if (!length3) {
        length3 = Infinity;
      }
      const nextOp = this.ops[this.index];
      if (nextOp) {
        const offset = this.offset;
        const opLength = Op_default.length(nextOp);
        if (length3 >= opLength - offset) {
          length3 = opLength - offset;
          this.index += 1;
          this.offset = 0;
        } else {
          this.offset += length3;
        }
        if (typeof nextOp.delete === "number") {
          return { delete: length3 };
        }
        const retOp = {};
        if (nextOp.attributes) {
          retOp.attributes = nextOp.attributes;
        }
        if (typeof nextOp.retain === "number") {
          retOp.retain = length3;
        } else if (typeof nextOp.retain === "object" && nextOp.retain !== null) {
          retOp.retain = nextOp.retain;
        } else if (typeof nextOp.insert === "string") {
          retOp.insert = nextOp.insert.substr(offset, length3);
        } else {
          retOp.insert = nextOp.insert;
        }
        return retOp;
      }
      return { retain: Infinity };
    }
    peek() {
      return this.ops[this.index];
    }
    peekLength() {
      if (this.ops[this.index]) {
        return Op_default.length(this.ops[this.index]) - this.offset;
      }
      return Infinity;
    }
    peekType() {
      const op = this.ops[this.index];
      if (op) {
        if (typeof op.delete === "number") {
          return "delete";
        } else if (typeof op.retain === "number" || typeof op.retain === "object" && op.retain !== null) {
          return "retain";
        }
        return "insert";
      }
      return "retain";
    }
    rest() {
      if (!this.hasNext()) {
        return [];
      } else if (this.offset === 0) {
        return this.ops.slice(this.index);
      }
      const offset = this.offset;
      const index = this.index;
      const next = this.next();
      const rest = this.ops.slice(this.index);
      this.offset = offset;
      this.index = index;
      return [next].concat(rest);
    }
  };

  // packages/sync/build-module/quill-delta/Delta.mjs
  function cloneDeep2(value) {
    return JSON.parse(JSON.stringify(value));
  }
  var NULL_CHARACTER = String.fromCharCode(0);
  var STRING_TOO_LARGE_THRESHOLD = 1e4;
  function normalizeChangeCounts(changes) {
    return changes.map((change) => ({
      ...change,
      count: change.value.length
    }));
  }
  var getEmbedTypeAndData = (a, b) => {
    if (typeof a !== "object" || a === null) {
      throw new Error(`cannot retain a ${typeof a}`);
    }
    if (typeof b !== "object" || b === null) {
      throw new Error(`cannot retain a ${typeof b}`);
    }
    const embedType = Object.keys(a)[0];
    if (!embedType || embedType !== Object.keys(b)[0]) {
      throw new Error(
        `embed types not matched: ${embedType} != ${Object.keys(b)[0]}`
      );
    }
    return [embedType, a[embedType], b[embedType]];
  };
  var Delta = class _Delta {
    static Op = Op_default;
    static OpIterator = Iterator2;
    static AttributeMap = AttributeMap_default;
    static handlers = {};
    static registerEmbed(embedType, handler) {
      this.handlers[embedType] = handler;
    }
    static unregisterEmbed(embedType) {
      delete this.handlers[embedType];
    }
    static getHandler(embedType) {
      const handler = this.handlers[embedType];
      if (!handler) {
        throw new Error(`no handlers for embed type "${embedType}"`);
      }
      return handler;
    }
    ops;
    constructor(ops) {
      if (Array.isArray(ops)) {
        this.ops = ops;
      } else if (ops !== null && ops !== void 0 && Array.isArray(ops.ops)) {
        this.ops = ops.ops;
      } else {
        this.ops = [];
      }
    }
    insert(arg, attributes) {
      const newOp = {};
      if (typeof arg === "string" && arg.length === 0) {
        return this;
      }
      newOp.insert = arg;
      if (attributes !== null && attributes !== void 0 && typeof attributes === "object" && Object.keys(attributes).length > 0) {
        newOp.attributes = attributes;
      }
      return this.push(newOp);
    }
    delete(length3) {
      if (length3 <= 0) {
        return this;
      }
      return this.push({ delete: length3 });
    }
    retain(length3, attributes) {
      if (typeof length3 === "number" && length3 <= 0) {
        return this;
      }
      const newOp = { retain: length3 };
      if (attributes !== null && attributes !== void 0 && typeof attributes === "object" && Object.keys(attributes).length > 0) {
        newOp.attributes = attributes;
      }
      return this.push(newOp);
    }
    push(newOp) {
      let index = this.ops.length;
      let lastOp = this.ops[index - 1];
      newOp = cloneDeep2(newOp);
      if (typeof lastOp === "object") {
        if (typeof newOp.delete === "number" && typeof lastOp.delete === "number") {
          this.ops[index - 1] = {
            delete: lastOp.delete + newOp.delete
          };
          return this;
        }
        if (typeof lastOp.delete === "number" && newOp.insert !== null && newOp.insert !== void 0) {
          index -= 1;
          lastOp = this.ops[index - 1];
          if (typeof lastOp !== "object") {
            this.ops.unshift(newOp);
            return this;
          }
        }
        if ((0, import_es63.default)(newOp.attributes, lastOp.attributes)) {
          if (typeof newOp.insert === "string" && typeof lastOp.insert === "string") {
            this.ops[index - 1] = {
              insert: lastOp.insert + newOp.insert
            };
            if (typeof newOp.attributes === "object") {
              this.ops[index - 1].attributes = newOp.attributes;
            }
            return this;
          } else if (typeof newOp.retain === "number" && typeof lastOp.retain === "number") {
            this.ops[index - 1] = {
              retain: lastOp.retain + newOp.retain
            };
            if (typeof newOp.attributes === "object") {
              this.ops[index - 1].attributes = newOp.attributes;
            }
            return this;
          }
        }
      }
      if (index === this.ops.length) {
        this.ops.push(newOp);
      } else {
        this.ops.splice(index, 0, newOp);
      }
      return this;
    }
    chop() {
      const lastOp = this.ops[this.ops.length - 1];
      if (lastOp && typeof lastOp.retain === "number" && !lastOp.attributes) {
        this.ops.pop();
      }
      return this;
    }
    filter(predicate) {
      return this.ops.filter(predicate);
    }
    forEach(predicate) {
      this.ops.forEach(predicate);
    }
    map(predicate) {
      return this.ops.map(predicate);
    }
    partition(predicate) {
      const passed = [];
      const failed = [];
      this.forEach((op) => {
        const target = predicate(op) ? passed : failed;
        target.push(op);
      });
      return [passed, failed];
    }
    reduce(predicate, initialValue) {
      return this.ops.reduce(predicate, initialValue);
    }
    changeLength() {
      return this.reduce((length3, elem) => {
        if (elem.insert) {
          return length3 + Op_default.length(elem);
        } else if (elem.delete) {
          return length3 - elem.delete;
        }
        return length3;
      }, 0);
    }
    length() {
      return this.reduce((length3, elem) => {
        return length3 + Op_default.length(elem);
      }, 0);
    }
    slice(start = 0, end = Infinity) {
      const ops = [];
      const iter = new Iterator2(this.ops);
      let index = 0;
      while (index < end && iter.hasNext()) {
        let nextOp;
        if (index < start) {
          nextOp = iter.next(start - index);
        } else {
          nextOp = iter.next(end - index);
          ops.push(nextOp);
        }
        index += Op_default.length(nextOp);
      }
      return new _Delta(ops);
    }
    compose(other) {
      const thisIter = new Iterator2(this.ops);
      const otherIter = new Iterator2(other.ops);
      const ops = [];
      const firstOther = otherIter.peek();
      if (firstOther !== null && firstOther !== void 0 && typeof firstOther.retain === "number" && (firstOther.attributes === null || firstOther.attributes === void 0)) {
        let firstLeft = firstOther.retain;
        while (thisIter.peekType() === "insert" && thisIter.peekLength() <= firstLeft) {
          firstLeft -= thisIter.peekLength();
          ops.push(thisIter.next());
        }
        if (firstOther.retain - firstLeft > 0) {
          otherIter.next(firstOther.retain - firstLeft);
        }
      }
      const delta = new _Delta(ops);
      while (thisIter.hasNext() || otherIter.hasNext()) {
        if (otherIter.peekType() === "insert") {
          delta.push(otherIter.next());
        } else if (thisIter.peekType() === "delete") {
          delta.push(thisIter.next());
        } else {
          const length3 = Math.min(
            thisIter.peekLength(),
            otherIter.peekLength()
          );
          const thisOp = thisIter.next(length3);
          const otherOp = otherIter.next(length3);
          if (otherOp.retain) {
            const newOp = {};
            if (typeof thisOp.retain === "number") {
              newOp.retain = typeof otherOp.retain === "number" ? length3 : otherOp.retain;
            } else if (typeof otherOp.retain === "number") {
              if (thisOp.retain === null || thisOp.retain === void 0) {
                newOp.insert = thisOp.insert;
              } else {
                newOp.retain = thisOp.retain;
              }
            } else {
              const action = thisOp.retain === null || thisOp.retain === void 0 ? "insert" : "retain";
              const [embedType, thisData, otherData] = getEmbedTypeAndData(
                thisOp[action],
                otherOp.retain
              );
              const handler = _Delta.getHandler(embedType);
              newOp[action] = {
                [embedType]: handler.compose(
                  thisData,
                  otherData,
                  action === "retain"
                )
              };
            }
            const attributes = AttributeMap_default.compose(
              thisOp.attributes,
              otherOp.attributes,
              typeof thisOp.retain === "number"
            );
            if (attributes) {
              newOp.attributes = attributes;
            }
            delta.push(newOp);
            if (!otherIter.hasNext() && (0, import_es63.default)(delta.ops[delta.ops.length - 1], newOp)) {
              const rest = new _Delta(thisIter.rest());
              return delta.concat(rest).chop();
            }
          } else if (typeof otherOp.delete === "number" && (typeof thisOp.retain === "number" || typeof thisOp.retain === "object" && thisOp.retain !== null)) {
            delta.push(otherOp);
          }
        }
      }
      return delta.chop();
    }
    concat(other) {
      const delta = new _Delta(this.ops.slice());
      if (other.ops.length > 0) {
        delta.push(other.ops[0]);
        delta.ops = delta.ops.concat(other.ops.slice(1));
      }
      return delta;
    }
    diff(other) {
      if (this.ops === other.ops) {
        return new _Delta();
      }
      const strings = this.deltasToStrings(other);
      const diffResult = normalizeChangeCounts(
        diffChars(strings[0], strings[1])
      );
      const thisIter = new Iterator2(this.ops);
      const otherIter = new Iterator2(other.ops);
      const retDelta = this.convertChangesToDelta(
        diffResult,
        thisIter,
        otherIter
      );
      return retDelta.chop();
    }
    eachLine(predicate, newline = "\n") {
      const iter = new Iterator2(this.ops);
      let line = new _Delta();
      let i = 0;
      while (iter.hasNext()) {
        if (iter.peekType() !== "insert") {
          return;
        }
        const thisOp = iter.peek();
        const start = Op_default.length(thisOp) - iter.peekLength();
        const index = typeof thisOp.insert === "string" ? thisOp.insert.indexOf(newline, start) - start : -1;
        if (index < 0) {
          line.push(iter.next());
        } else if (index > 0) {
          line.push(iter.next(index));
        } else {
          if (predicate(line, iter.next(1).attributes || {}, i) === false) {
            return;
          }
          i += 1;
          line = new _Delta();
        }
      }
      if (line.length() > 0) {
        predicate(line, {}, i);
      }
    }
    invert(base) {
      const inverted = new _Delta();
      this.reduce((baseIndex, op) => {
        if (op.insert) {
          inverted.delete(Op_default.length(op));
        } else if (typeof op.retain === "number" && (op.attributes === null || op.attributes === void 0)) {
          inverted.retain(op.retain);
          return baseIndex + op.retain;
        } else if (op.delete || typeof op.retain === "number") {
          const length3 = op.delete || op.retain;
          const slice = base.slice(baseIndex, baseIndex + length3);
          slice.forEach((baseOp) => {
            if (op.delete) {
              inverted.push(baseOp);
            } else if (op.retain && op.attributes) {
              inverted.retain(
                Op_default.length(baseOp),
                AttributeMap_default.invert(
                  op.attributes,
                  baseOp.attributes
                )
              );
            }
          });
          return baseIndex + length3;
        } else if (typeof op.retain === "object" && op.retain !== null) {
          const slice = base.slice(baseIndex, baseIndex + 1);
          const baseOp = new Iterator2(slice.ops).next();
          const [embedType, opData, baseOpData] = getEmbedTypeAndData(
            op.retain,
            baseOp.insert
          );
          const handler = _Delta.getHandler(embedType);
          inverted.retain(
            { [embedType]: handler.invert(opData, baseOpData) },
            AttributeMap_default.invert(op.attributes, baseOp.attributes)
          );
          return baseIndex + 1;
        }
        return baseIndex;
      }, 0);
      return inverted.chop();
    }
    transform(arg, priority = false) {
      priority = !!priority;
      if (typeof arg === "number") {
        return this.transformPosition(arg, priority);
      }
      const other = arg;
      const thisIter = new Iterator2(this.ops);
      const otherIter = new Iterator2(other.ops);
      const delta = new _Delta();
      while (thisIter.hasNext() || otherIter.hasNext()) {
        if (thisIter.peekType() === "insert" && (priority || otherIter.peekType() !== "insert")) {
          delta.retain(Op_default.length(thisIter.next()));
        } else if (otherIter.peekType() === "insert") {
          delta.push(otherIter.next());
        } else {
          const length3 = Math.min(
            thisIter.peekLength(),
            otherIter.peekLength()
          );
          const thisOp = thisIter.next(length3);
          const otherOp = otherIter.next(length3);
          if (thisOp.delete) {
            continue;
          } else if (otherOp.delete) {
            delta.push(otherOp);
          } else {
            const thisData = thisOp.retain;
            const otherData = otherOp.retain;
            let transformedData = typeof otherData === "object" && otherData !== null ? otherData : length3;
            if (typeof thisData === "object" && thisData !== null && typeof otherData === "object" && otherData !== null) {
              const embedType = Object.keys(thisData)[0];
              if (embedType === Object.keys(otherData)[0]) {
                const handler = _Delta.getHandler(embedType);
                if (handler) {
                  transformedData = {
                    [embedType]: handler.transform(
                      thisData[embedType],
                      otherData[embedType],
                      priority
                    )
                  };
                }
              }
            }
            delta.retain(
              transformedData,
              AttributeMap_default.transform(
                thisOp.attributes,
                otherOp.attributes,
                priority
              )
            );
          }
        }
      }
      return delta.chop();
    }
    transformPosition(index, priority = false) {
      priority = !!priority;
      const thisIter = new Iterator2(this.ops);
      let offset = 0;
      while (thisIter.hasNext() && offset <= index) {
        const length3 = thisIter.peekLength();
        const nextType = thisIter.peekType();
        thisIter.next();
        if (nextType === "delete") {
          index -= Math.min(length3, index - offset);
          continue;
        } else if (nextType === "insert" && (offset < index || !priority)) {
          index += length3;
        }
        offset += length3;
      }
      return index;
    }
    /**
     * Given a Delta and a cursor position, do a diff and attempt to adjust
     * the diff to place insertions or deletions at the cursor position.
     *
     * @param other             - The other Delta to diff against.
     * @param cursorAfterChange - The cursor position index after the change.
     * @return A Delta that attempts to place insertions or deletions at the cursor position.
     */
    diffWithCursor(other, cursorAfterChange) {
      if (this.ops === other.ops) {
        return new _Delta();
      }
      const strings = this.deltasToStrings(other);
      const maxStringLength = Math.max(
        ...strings.map((str) => str.length)
      );
      if (maxStringLength > STRING_TOO_LARGE_THRESHOLD) {
        const diffResult = normalizeChangeCounts(
          diffLines(strings[0], strings[1])
        );
        const thisIterLarge = new Iterator2(this.ops);
        const otherIterLarge = new Iterator2(other.ops);
        return this.convertChangesToDelta(
          diffResult,
          thisIterLarge,
          otherIterLarge
        ).chop();
      } else if (cursorAfterChange === null) {
        return this.diff(other);
      }
      let diffs = normalizeChangeCounts(
        diffChars(strings[0], strings[1])
      );
      let lastDiffPosition = 0;
      const adjustedDiffs = [];
      for (let i = 0; i < diffs.length; i++) {
        const diff = diffs[i];
        const segmentStart = lastDiffPosition;
        const segmentEnd = lastDiffPosition + (diff.count ?? 0);
        const isCursorInSegment = cursorAfterChange > segmentStart && cursorAfterChange <= segmentEnd;
        const isUnchangedSegment = !diff.added && !diff.removed;
        const isRemovalSegment = diff.removed && !diff.added;
        const nextDiff = diffs[i + 1];
        const isNextDiffAnInsert = nextDiff && nextDiff.added && !nextDiff.removed;
        if (isUnchangedSegment && isCursorInSegment && isNextDiffAnInsert) {
          const movedSegments = this.tryMoveInsertionToCursor(
            diff,
            nextDiff,
            cursorAfterChange,
            segmentStart
          );
          if (movedSegments) {
            adjustedDiffs.push(...movedSegments);
            i++;
            lastDiffPosition = segmentEnd;
            continue;
          }
        }
        if (isRemovalSegment) {
          const movedSegments = this.tryMoveDeletionToCursor(
            diff,
            adjustedDiffs,
            cursorAfterChange,
            lastDiffPosition
          );
          if (movedSegments) {
            adjustedDiffs.pop();
            adjustedDiffs.push(...movedSegments);
            lastDiffPosition += diff.count ?? 0;
            continue;
          }
        }
        adjustedDiffs.push(diff);
        if (!diff.added) {
          lastDiffPosition += diff.count ?? 0;
        }
      }
      diffs = adjustedDiffs;
      const thisIter = new Iterator2(this.ops);
      const otherIter = new Iterator2(other.ops);
      const retDelta = this.convertChangesToDelta(
        diffs,
        thisIter,
        otherIter
      );
      return retDelta.chop();
    }
    /**
     * Try to move an insertion operation from after an unchanged segment to the cursor position within it.
     * This is a "look-ahead" strategy.
     *
     * @param diff              - The current unchanged diff segment.
     * @param nextDiff          - The next diff segment (expected to be an insertion).
     * @param cursorAfterChange - The cursor position after the change.
     * @param segmentStart      - The start position of the current segment.
     * @return An array of adjusted diff segments if the insertion was successfully moved, null otherwise.
     */
    tryMoveInsertionToCursor(diff, nextDiff, cursorAfterChange, segmentStart) {
      const nextDiffInsert = nextDiff.value;
      const insertLength = nextDiffInsert.length;
      const insertOffset = cursorAfterChange - segmentStart - insertLength;
      const textAtCursor = diff.value.substring(
        insertOffset,
        insertOffset + nextDiffInsert.length
      );
      const isInsertMoveable = textAtCursor === nextDiffInsert;
      if (!isInsertMoveable) {
        return null;
      }
      const beforeCursor = diff.value.substring(0, insertOffset);
      const afterCursor = diff.value.substring(insertOffset);
      const result = [];
      if (beforeCursor.length > 0) {
        result.push({
          value: beforeCursor,
          count: beforeCursor.length,
          added: false,
          removed: false
        });
      }
      result.push(nextDiff);
      if (afterCursor.length > 0) {
        result.push({
          value: afterCursor,
          count: afterCursor.length,
          added: false,
          removed: false
        });
      }
      return result;
    }
    /**
     * Try to move a deletion operation to the cursor position by looking back at the previous unchanged segment.
     * This is a "look-back" strategy.
     *
     * @param diff              - The current deletion diff segment.
     * @param adjustedDiffs     - The array of previously processed diff segments.
     * @param cursorAfterChange - The cursor position after the change.
     * @param lastDiffPosition  - The position in the document up to (but not including) the current diff.
     * @return An array of adjusted diff segments if the deletion was successfully moved, null otherwise.
     */
    tryMoveDeletionToCursor(diff, adjustedDiffs, cursorAfterChange, lastDiffPosition) {
      const prevDiff = adjustedDiffs[adjustedDiffs.length - 1];
      if (!prevDiff || prevDiff.added || prevDiff.removed) {
        return null;
      }
      const prevSegmentStart = lastDiffPosition - (prevDiff.count ?? 0);
      const prevSegmentEnd = lastDiffPosition;
      if (cursorAfterChange < prevSegmentStart || cursorAfterChange >= prevSegmentEnd) {
        return null;
      }
      const deletedChars = diff.value;
      const deleteOffset = cursorAfterChange - prevSegmentStart;
      const textAtCursor = prevDiff.value.substring(
        deleteOffset,
        deleteOffset + deletedChars.length
      );
      const canBePlacedHere = textAtCursor === deletedChars;
      if (!canBePlacedHere) {
        return null;
      }
      const beforeCursor = prevDiff.value.substring(0, deleteOffset);
      const atAndAfterCursor = prevDiff.value.substring(deleteOffset);
      const deletionLength = diff.count ?? 0;
      const afterDeletion = atAndAfterCursor.substring(deletionLength);
      const result = [];
      if (beforeCursor.length > 0) {
        result.push({
          value: beforeCursor,
          count: beforeCursor.length,
          added: false,
          removed: false
        });
      }
      result.push(diff);
      if (afterDeletion.length > 0) {
        result.push({
          value: afterDeletion,
          count: afterDeletion.length,
          added: false,
          removed: false
        });
      }
      return result;
    }
    /**
     * Convert two Deltas to string representations for diffing.
     *
     * @param other - The other Delta to convert.
     * @return A tuple of [thisString, otherString].
     */
    deltasToStrings(other) {
      return [this, other].map((delta) => {
        return delta.map((op) => {
          if (op.insert !== null || op.insert !== void 0) {
            return typeof op.insert === "string" ? op.insert : NULL_CHARACTER;
          }
          const prep = delta === other ? "on" : "with";
          throw new Error(
            "diff() called " + prep + " non-document"
          );
        }).join("");
      });
    }
    /**
     * Process diff changes and convert them to Delta operations.
     *
     * @param changes   - The array of changes from the diff algorithm.
     * @param thisIter  - Iterator for this Delta's operations.
     * @param otherIter - Iterator for the other Delta's operations.
     * @return A Delta containing the processed diff operations.
     */
    convertChangesToDelta(changes, thisIter, otherIter) {
      const retDelta = new _Delta();
      changes.forEach((component) => {
        let length3 = component.count ?? 0;
        while (length3 > 0) {
          let opLength = 0;
          if (component.added) {
            opLength = Math.min(otherIter.peekLength(), length3);
            retDelta.push(otherIter.next(opLength));
          } else if (component.removed) {
            opLength = Math.min(length3, thisIter.peekLength());
            thisIter.next(opLength);
            retDelta.delete(opLength);
          } else {
            opLength = Math.min(
              thisIter.peekLength(),
              otherIter.peekLength(),
              length3
            );
            const thisOp = thisIter.next(opLength);
            const otherOp = otherIter.next(opLength);
            if ((0, import_es63.default)(thisOp.insert, otherOp.insert)) {
              retDelta.retain(
                opLength,
                AttributeMap_default.diff(
                  thisOp.attributes,
                  otherOp.attributes
                )
              );
            } else {
              retDelta.push(otherOp).delete(opLength);
            }
          }
          length3 -= opLength;
        }
      });
      return retDelta;
    }
  };
  var Delta_default = Delta;

  // packages/sync/build-module/private-apis.mjs
  var privateApis = {};
  lock(privateApis, {
    ConnectionErrorCode,
    createSyncManager,
    Delta: Delta_default,
    CRDT_DOC_META_PERSISTENCE_KEY,
    CRDT_RECORD_MAP_KEY,
    LOCAL_EDITOR_ORIGIN,
    LOCAL_UNDO_IGNORED_ORIGIN,
    retrySyncConnection: () => pollingManager.retryNow()
  });

  // packages/core-data/build-module/awareness/post-editor-awareness.mjs
  var import_block_editor3 = __toESM(require_block_editor(), 1);

  // packages/core-data/build-module/awareness/base-awareness.mjs
  var import_data2 = __toESM(require_data(), 1);

  // packages/core-data/build-module/awareness/config.mjs
  var AWARENESS_CURSOR_UPDATE_THROTTLE_IN_MS = 100;
  var LOCAL_CURSOR_UPDATE_DEBOUNCE_IN_MS = 5;
  var REMOVAL_DELAY_IN_MS = 5e3;

  // packages/core-data/build-module/awareness/utils.mjs
  function getBrowserName() {
    const userAgent = window.navigator.userAgent;
    let browserName = "Unknown";
    if (userAgent.includes("Firefox")) {
      browserName = "Firefox";
    } else if (userAgent.includes("Edg")) {
      browserName = "Microsoft Edge";
    } else if (userAgent.includes("Chrome") && !userAgent.includes("Edg")) {
      browserName = "Chrome";
    } else if (userAgent.includes("Safari") && !userAgent.includes("Chrome")) {
      browserName = "Safari";
    } else if (userAgent.includes("MSIE") || userAgent.includes("Trident")) {
      browserName = "Internet Explorer";
    } else if (userAgent.includes("Opera") || userAgent.includes("OPR")) {
      browserName = "Opera";
    }
    return browserName;
  }
  function areMapsEqual(map1, map2, comparatorFn) {
    if (map1.size !== map2.size) {
      return false;
    }
    for (const [key, value1] of map1.entries()) {
      if (!map2.has(key)) {
        return false;
      }
      if (!comparatorFn(value1, map2.get(key))) {
        return false;
      }
    }
    return true;
  }
  function areCollaboratorInfosEqual(collaboratorInfo1, collaboratorInfo2) {
    if (!collaboratorInfo1 || !collaboratorInfo2) {
      return collaboratorInfo1 === collaboratorInfo2;
    }
    if (Object.keys(collaboratorInfo1).length !== Object.keys(collaboratorInfo2).length) {
      return false;
    }
    return Object.entries(collaboratorInfo1).every(([key, value]) => {
      return value === collaboratorInfo2[key];
    });
  }
  function generateCollaboratorInfo(currentCollaborator) {
    const { avatar_urls, id: id2, name, slug } = currentCollaborator;
    return {
      avatar_urls,
      // eslint-disable-line camelcase
      browserType: getBrowserName(),
      enteredAt: Date.now(),
      id: id2,
      name,
      slug
    };
  }
  function getRecordValue(obj, key) {
    if ("object" === typeof obj && null !== obj && key in obj) {
      return obj[key];
    }
    return null;
  }
  function getTypedKeys(obj) {
    return Object.keys(obj);
  }

  // packages/core-data/build-module/awareness/typed-awareness.mjs
  var TypedAwareness = class extends Awareness {
    /**
     * Get the states from an awareness document.
     */
    getStates() {
      return super.getStates();
    }
    /**
     * Get a local state field from an awareness document.
     * @param field
     */
    getLocalStateField(field) {
      const state = this.getLocalState();
      return getRecordValue(state, field);
    }
    /**
     * Set a local state field on an awareness document.
     * @param field
     * @param value
     */
    setLocalStateField(field, value) {
      super.setLocalStateField(field, value);
    }
  };

  // packages/core-data/build-module/awareness/awareness-state.mjs
  var AwarenessWithEqualityChecks = class extends TypedAwareness {
    /** OVERRIDDEN METHODS */
    /**
     * Set a local state field on an awareness document. Calling this method may
     * trigger rerenders of any subscribed components.
     *
     * Equality checks are provided by the abstract `equalityFieldChecks` property.
     * @param field - The field to set.
     * @param value - The value to set.
     */
    setLocalStateField(field, value) {
      if (this.isFieldEqual(
        field,
        value,
        this.getLocalStateField(field) ?? void 0
      )) {
        return;
      }
      super.setLocalStateField(field, value);
    }
    /** CUSTOM METHODS */
    /**
     * Determine if a field value has changed using the provided equality checks.
     * @param field  - The field to check.
     * @param value1 - The first value to compare.
     * @param value2 - The second value to compare.
     */
    isFieldEqual(field, value1, value2) {
      if (["clientId", "isConnected", "isMe"].includes(field)) {
        return value1 === value2;
      }
      if (field in this.equalityFieldChecks) {
        const fn = this.equalityFieldChecks[field];
        return fn(value1, value2);
      }
      throw new Error(
        `No equality check implemented for awareness state field "${field.toString()}".`
      );
    }
    /**
     * Determine if two states are equal by comparing each field using the
     * provided equality checks.
     * @param state1 - The first state to compare.
     * @param state2 - The second state to compare.
     */
    isStateEqual(state1, state2) {
      return [
        .../* @__PURE__ */ new Set([
          ...getTypedKeys(state1),
          ...getTypedKeys(state2)
        ])
      ].every((field) => {
        const value1 = state1[field];
        const value2 = state2[field];
        return this.isFieldEqual(field, value1, value2);
      });
    }
  };
  var AwarenessState = class extends AwarenessWithEqualityChecks {
    /** CUSTOM PROPERTIES */
    /**
     * Whether the setUp method has been called, to avoid running it multiple
     * times.
     */
    hasSetupRun = false;
    /**
     * We keep track of all seen states during the current session for two reasons:
     *
     * 1. So that we can represent recently disconnected collaborators in our UI, even
     *    after they have been removed from the awareness document.
     * 2. So that we can provide debug information about all collaborators seen during
     *    the session.
     */
    disconnectedCollaborators = /* @__PURE__ */ new Set();
    seenStates = /* @__PURE__ */ new Map();
    /**
     * Hold a snapshot of the previous awareness state allows us to compare the
     * state values and avoid unnecessary updates to subscribers.
     */
    previousSnapshot = /* @__PURE__ */ new Map();
    stateSubscriptions = [];
    /**
     * In some cases, we may want to throttle setting local state fields to avoid
     * overwhelming the awareness document with rapid updates. At the same time, we
     * want to ensure that when we read our own state locally, we get the latest
     * value -- even if it hasn't yet been set on the awareness instance.
     */
    myThrottledState = {};
    throttleTimeouts = /* @__PURE__ */ new Map();
    /** CUSTOM METHODS */
    /**
     * Set up the awareness state. This method is idempotent and will only run
     * once. Subclasses should override `onSetUp()` instead of this method to
     * add their own setup logic.
     *
     * This is defined as a readonly arrow function property to prevent
     * subclasses from overriding it.
     */
    setUp = () => {
      if (this.hasSetupRun) {
        return;
      }
      this.hasSetupRun = true;
      this.onSetUp();
      this.on(
        "change",
        ({ added, removed, updated }) => {
          [...added, ...updated].forEach((id2) => {
            this.disconnectedCollaborators.delete(id2);
          });
          removed.forEach((id2) => {
            this.disconnectedCollaborators.add(id2);
            setTimeout(() => {
              this.disconnectedCollaborators.delete(id2);
              this.updateSubscribers(
                true
                /* force update */
              );
            }, REMOVAL_DELAY_IN_MS);
          });
          this.updateSubscribers();
        }
      );
    };
    /**
     * Get the most recent state from the last processed change event.
     *
     * @return An array of EnhancedState< State >.
     */
    getCurrentState() {
      return Array.from(this.previousSnapshot.values());
    }
    /**
     * Get all seen states in this session to enable debug reporting.
     */
    getSeenStates() {
      return this.seenStates;
    }
    /**
     * Allow external code to subscribe to awareness state changes.
     * @param callback - The callback to subscribe to.
     */
    onStateChange(callback) {
      this.stateSubscriptions.push(callback);
      return () => {
        this.stateSubscriptions = this.stateSubscriptions.filter(
          (cb) => cb !== callback
        );
      };
    }
    /**
     * Set a local state field on an awareness document with throttle. See caveats
     * of this.setLocalStateField.
     * @param field - The field to set.
     * @param value - The value to set.
     * @param wait  - The wait time in milliseconds.
     */
    setThrottledLocalStateField(field, value, wait) {
      this.setLocalStateField(field, value);
      this.throttleTimeouts.set(
        field,
        setTimeout(() => {
          this.throttleTimeouts.delete(field);
          if (this.myThrottledState[field]) {
            this.setLocalStateField(
              field,
              this.myThrottledState[field]
            );
            delete this.myThrottledState[field];
          }
        }, wait)
      );
    }
    /**
     * Set the current collaborator's connection status as awareness state.
     * @param isConnected - The connection status.
     */
    setConnectionStatus(isConnected) {
      if (isConnected) {
        this.disconnectedCollaborators.delete(this.clientID);
      } else {
        this.disconnectedCollaborators.add(this.clientID);
      }
      this.updateSubscribers(
        true
        /* force update */
      );
    }
    /**
     * Update all subscribed listeners with the latest awareness state.
     * @param forceUpdate - Whether to force an update.
     */
    updateSubscribers(forceUpdate = false) {
      if (!this.stateSubscriptions.length) {
        return;
      }
      const states = this.getStates();
      this.seenStates = new Map([
        ...this.seenStates.entries(),
        ...states.entries()
      ]);
      const updatedStates = new Map(
        [...this.disconnectedCollaborators, ...states.keys()].filter((clientId) => {
          return Object.keys(this.seenStates.get(clientId) ?? {}).length > 0;
        }).map((clientId) => {
          const rawState = this.seenStates.get(clientId);
          const isConnected = !this.disconnectedCollaborators.has(clientId);
          const isMe = clientId === this.clientID;
          const myState = isMe ? this.myThrottledState : {};
          const state = {
            ...rawState,
            ...myState,
            clientId,
            isConnected,
            isMe
          };
          return [clientId, state];
        })
      );
      if (!forceUpdate) {
        if (areMapsEqual(
          this.previousSnapshot,
          updatedStates,
          this.isStateEqual.bind(this)
        )) {
          return;
        }
      }
      this.previousSnapshot = updatedStates;
      this.stateSubscriptions.forEach((callback) => {
        callback(Array.from(updatedStates.values()));
      });
    }
  };

  // packages/core-data/build-module/name.mjs
  var STORE_NAME = "core";

  // packages/core-data/build-module/awareness/base-awareness.mjs
  var BaseAwarenessState = class extends AwarenessState {
    onSetUp() {
      void this.setCurrentCollaboratorInfo();
    }
    /**
     * Set the current collaborator info in the local state.
     */
    async setCurrentCollaboratorInfo() {
      const currentUser2 = await (0, import_data2.resolveSelect)(STORE_NAME).getCurrentUser();
      const collaboratorInfo = generateCollaboratorInfo(currentUser2);
      this.setLocalStateField("collaboratorInfo", collaboratorInfo);
    }
  };
  var baseEqualityFieldChecks = {
    collaboratorInfo: areCollaboratorInfosEqual
  };
  var BaseAwareness = class extends BaseAwarenessState {
    equalityFieldChecks = baseEqualityFieldChecks;
  };

  // packages/core-data/build-module/awareness/block-lookup.mjs
  var import_data3 = __toESM(require_data(), 1);
  var import_block_editor = __toESM(require_block_editor(), 1);
  function getBlockPathInYdoc(yType) {
    const path = [];
    let current = yType;
    while (current) {
      const parentArray = current.parent;
      if (!parentArray || !(parentArray instanceof yjs_exports.Array)) {
        return null;
      }
      let index = -1;
      for (let i = 0; i < parentArray.length; i++) {
        if (parentArray.get(i) === current) {
          index = i;
          break;
        }
      }
      if (index === -1) {
        return null;
      }
      path.unshift(index);
      const grandparent = parentArray.parent;
      if (grandparent instanceof yjs_exports.Map && grandparent.get("clientId") !== void 0) {
        current = grandparent;
      } else {
        break;
      }
    }
    return path;
  }
  function resolveBlockClientIdByPath(path) {
    if (path.length === 0) {
      return null;
    }
    const { getBlocks } = (0, import_data3.select)(import_block_editor.store);
    const postContentBlocks = getPostContentBlocks(getBlocks(), getBlocks);
    let blocks = postContentBlocks;
    for (let i = 0; i < path.length; i++) {
      const block = blocks[path[i]];
      if (!block) {
        return null;
      }
      if (i === path.length - 1) {
        return block.clientId;
      }
      blocks = block.innerBlocks;
    }
    return null;
  }
  function getPostContentBlocks(rootBlocks, getBlocks) {
    const postContentBlock = findBlockByName(rootBlocks, "core/post-content");
    if (postContentBlock) {
      return getBlocks(postContentBlock.clientId);
    }
    return rootBlocks;
  }
  function findBlockByName(blocks, name) {
    for (const block of blocks) {
      if (block.name === name) {
        return block;
      }
      if (block.innerBlocks?.length) {
        const found = findBlockByName(block.innerBlocks, name);
        if (found) {
          return found;
        }
      }
    }
    return null;
  }

  // packages/core-data/build-module/utils/crdt-utils.mjs
  var import_rich_text = __toESM(require_rich_text(), 1);

  // packages/core-data/build-module/lock-unlock.mjs
  var import_private_apis3 = __toESM(require_private_apis(), 1);
  var { lock: lock2, unlock: unlock2 } = (0, import_private_apis3.__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/core-data"
  );

  // packages/core-data/build-module/sync.mjs
  var {
    ConnectionErrorCode: ConnectionErrorCode2,
    createSyncManager: createSyncManager2,
    Delta: Delta2,
    CRDT_DOC_META_PERSISTENCE_KEY: CRDT_DOC_META_PERSISTENCE_KEY2,
    CRDT_RECORD_MAP_KEY: CRDT_RECORD_MAP_KEY2,
    LOCAL_EDITOR_ORIGIN: LOCAL_EDITOR_ORIGIN2,
    LOCAL_UNDO_IGNORED_ORIGIN: LOCAL_UNDO_IGNORED_ORIGIN2,
    retrySyncConnection
  } = unlock2(privateApis);
  var syncManager;
  function getSyncManager() {
    if (syncManager) {
      return syncManager;
    }
    syncManager = createSyncManager2();
    return syncManager;
  }

  // packages/core-data/build-module/utils/crdt-utils.mjs
  function getRootMap(doc2, key) {
    return doc2.getMap(key);
  }
  function createYMap(partial = {}) {
    return new yjs_exports.Map(Object.entries(partial));
  }
  function isYMap(value) {
    return value instanceof yjs_exports.Map;
  }
  function findBlockByClientIdInDoc(blockId, ydoc) {
    const ymap = getRootMap(ydoc, CRDT_RECORD_MAP_KEY2);
    const blocks = ymap.get("blocks");
    if (!(blocks instanceof yjs_exports.Array)) {
      return null;
    }
    return findBlockByClientIdInBlocks(blockId, blocks);
  }
  var MARKER_START = 57344;
  function pickMarker(text2) {
    const tryCount = 16;
    for (let code = MARKER_START; code < MARKER_START + tryCount; code++) {
      const candidate = String.fromCharCode(code);
      if (!text2.includes(candidate)) {
        return candidate;
      }
    }
    return null;
  }
  function htmlIndexToRichTextOffset(html, htmlIndex) {
    if (!html.includes("<") && !html.includes("&")) {
      return htmlIndex;
    }
    const marker = pickMarker(html);
    if (!marker) {
      return htmlIndex;
    }
    const withMarker = html.slice(0, htmlIndex) + marker + html.slice(htmlIndex);
    const value = (0, import_rich_text.create)({ html: withMarker });
    const markerPos = value.text.indexOf(marker);
    return markerPos === -1 ? htmlIndex : markerPos;
  }
  function richTextOffsetToHtmlIndex(html, richTextOffset) {
    if (!html.includes("<") && !html.includes("&")) {
      return richTextOffset;
    }
    const marker = pickMarker(html);
    if (!marker) {
      return richTextOffset;
    }
    const value = (0, import_rich_text.create)({ html });
    const markerValue = (0, import_rich_text.create)({ text: marker });
    if (value.formats[richTextOffset]) {
      markerValue.formats[0] = value.formats[richTextOffset];
    }
    const withMarker = (0, import_rich_text.insert)(
      value,
      markerValue,
      richTextOffset,
      richTextOffset
    );
    const htmlWithMarker = (0, import_rich_text.toHTMLString)({ value: withMarker });
    const markerIndex = htmlWithMarker.indexOf(marker);
    return markerIndex === -1 ? richTextOffset : markerIndex;
  }
  function findBlockByClientIdInBlocks(blockId, blocks) {
    for (const block of blocks) {
      if (block.get("clientId") === blockId) {
        return block;
      }
      const innerBlocks = block.get("innerBlocks");
      if (innerBlocks && innerBlocks.length > 0) {
        const innerBlock = findBlockByClientIdInBlocks(
          blockId,
          innerBlocks
        );
        if (innerBlock) {
          return innerBlock;
        }
      }
    }
    return null;
  }

  // packages/core-data/build-module/utils/crdt-user-selections.mjs
  var import_data4 = __toESM(require_data(), 1);
  var import_block_editor2 = __toESM(require_block_editor(), 1);
  var SelectionType = /* @__PURE__ */ ((SelectionType2) => {
    SelectionType2["None"] = "none";
    SelectionType2["Cursor"] = "cursor";
    SelectionType2["SelectionInOneBlock"] = "selection-in-one-block";
    SelectionType2["SelectionInMultipleBlocks"] = "selection-in-multiple-blocks";
    SelectionType2["WholeBlock"] = "whole-block";
    return SelectionType2;
  })(SelectionType || {});
  var SelectionDirection = /* @__PURE__ */ ((SelectionDirection2) => {
    SelectionDirection2["Forward"] = "f";
    SelectionDirection2["Backward"] = "b";
    return SelectionDirection2;
  })(SelectionDirection || {});
  function getSelectionState(selectionStart, selectionEnd, yDoc, options) {
    const { selectionDirection } = options ?? {};
    const ymap = getRootMap(yDoc, CRDT_RECORD_MAP_KEY2);
    const yBlocks = ymap.get("blocks");
    const isSelectionEmpty = Object.keys(selectionStart).length === 0;
    const noSelection = {
      type: "none"
      /* None */
    };
    if (isSelectionEmpty || !yBlocks) {
      return noSelection;
    }
    const isSelectionInOneBlock = selectionStart.clientId === selectionEnd.clientId;
    const isCursorOnly = isSelectionInOneBlock && selectionStart.offset === selectionEnd.offset;
    const isSelectionAWholeBlock = isSelectionInOneBlock && selectionStart.offset === void 0 && selectionEnd.offset === void 0;
    if (isSelectionAWholeBlock) {
      const path = getBlockPathForLocalClientId(selectionStart.clientId);
      const blockPosition = path ? createRelativePositionForBlockPath(path, yBlocks) : null;
      if (!blockPosition) {
        return noSelection;
      }
      return {
        type: "whole-block",
        blockPosition
      };
    } else if (isCursorOnly) {
      const cursorPosition = getCursorPosition(selectionStart, yBlocks);
      if (!cursorPosition) {
        return noSelection;
      }
      return {
        type: "cursor",
        cursorPosition
      };
    } else if (isSelectionInOneBlock) {
      const cursorStartPosition2 = getCursorPosition(
        selectionStart,
        yBlocks
      );
      const cursorEndPosition2 = getCursorPosition(selectionEnd, yBlocks);
      if (!cursorStartPosition2 || !cursorEndPosition2) {
        return noSelection;
      }
      return {
        type: "selection-in-one-block",
        cursorStartPosition: cursorStartPosition2,
        cursorEndPosition: cursorEndPosition2,
        selectionDirection
      };
    }
    const cursorStartPosition = getCursorPosition(selectionStart, yBlocks);
    const cursorEndPosition = getCursorPosition(selectionEnd, yBlocks);
    if (!cursorStartPosition || !cursorEndPosition) {
      return noSelection;
    }
    return {
      type: "selection-in-multiple-blocks",
      cursorStartPosition,
      cursorEndPosition,
      selectionDirection
    };
  }
  function getCursorPosition(selection, blocks) {
    const path = getBlockPathForLocalClientId(selection.clientId);
    const block = path ? findBlockByPath(path, blocks) : null;
    if (!block || !selection.attributeKey || void 0 === selection.offset) {
      return null;
    }
    const attributes = block.get("attributes");
    const currentYText = attributes?.get(selection.attributeKey);
    if (!(currentYText instanceof yjs_exports.Text)) {
      return null;
    }
    const relativePosition = yjs_exports.createRelativePositionFromTypeIndex(
      currentYText,
      richTextOffsetToHtmlIndex(currentYText.toString(), selection.offset)
    );
    return {
      relativePosition,
      absoluteOffset: selection.offset
    };
  }
  function getBlockPathForLocalClientId(clientId) {
    const { getBlockIndex, getBlockRootClientId, getBlockName } = (0, import_data4.select)(import_block_editor2.store);
    const path = [];
    let current = clientId;
    while (current) {
      const index = getBlockIndex(current);
      if (index === -1) {
        return null;
      }
      path.unshift(index);
      const parent = getBlockRootClientId(current);
      if (!parent) {
        break;
      }
      const parentName = getBlockName(parent);
      if (parentName === "core/post-content") {
        break;
      }
      current = parent;
    }
    return path.length > 0 ? path : null;
  }
  function findBlockByPath(path, blocks) {
    let currentBlocks = blocks;
    for (let i = 0; i < path.length; i++) {
      if (path[i] >= currentBlocks.length) {
        return null;
      }
      const block = currentBlocks.get(path[i]);
      if (!block) {
        return null;
      }
      if (i === path.length - 1) {
        return block;
      }
      currentBlocks = block.get("innerBlocks") ?? new yjs_exports.Array();
    }
    return null;
  }
  function createRelativePositionForBlockPath(path, blocks) {
    let currentBlocks = blocks;
    for (let i = 0; i < path.length; i++) {
      if (path[i] >= currentBlocks.length) {
        return null;
      }
      if (i === path.length - 1) {
        return yjs_exports.createRelativePositionFromTypeIndex(
          currentBlocks,
          path[i]
        );
      }
      const block = currentBlocks.get(path[i]);
      currentBlocks = block?.get("innerBlocks") ?? new yjs_exports.Array();
    }
    return null;
  }
  function areSelectionsStatesEqual(selection1, selection2) {
    if (selection1.type !== selection2.type) {
      return false;
    }
    switch (selection1.type) {
      case "none":
        return true;
      case "cursor":
        return areCursorPositionsEqual(
          selection1.cursorPosition,
          selection2.cursorPosition
        );
      case "selection-in-one-block":
        return areCursorPositionsEqual(
          selection1.cursorStartPosition,
          selection2.cursorStartPosition
        ) && areCursorPositionsEqual(
          selection1.cursorEndPosition,
          selection2.cursorEndPosition
        ) && selection1.selectionDirection === selection2.selectionDirection;
      case "selection-in-multiple-blocks":
        return areCursorPositionsEqual(
          selection1.cursorStartPosition,
          selection2.cursorStartPosition
        ) && areCursorPositionsEqual(
          selection1.cursorEndPosition,
          selection2.cursorEndPosition
        ) && selection1.selectionDirection === selection2.selectionDirection;
      case "whole-block":
        return yjs_exports.compareRelativePositions(
          selection1.blockPosition,
          selection2.blockPosition
        );
      default:
        return false;
    }
  }
  function areCursorPositionsEqual(cursorPosition1, cursorPosition2) {
    const isRelativePositionEqual = yjs_exports.compareRelativePositions(
      cursorPosition1.relativePosition,
      cursorPosition2.relativePosition
    );
    const isAbsoluteOffsetEqual = cursorPosition1.absoluteOffset === cursorPosition2.absoluteOffset;
    return isRelativePositionEqual && isAbsoluteOffsetEqual;
  }

  // packages/core-data/build-module/awareness/post-editor-awareness.mjs
  var PostEditorAwareness = class extends BaseAwarenessState {
    constructor(doc2, kind, name, postId) {
      super(doc2);
      this.kind = kind;
      this.name = name;
      this.postId = postId;
    }
    equalityFieldChecks = {
      ...baseEqualityFieldChecks,
      editorState: this.areEditorStatesEqual
    };
    onSetUp() {
      super.onSetUp();
      this.subscribeToCollaboratorSelectionChanges();
    }
    /**
     * Subscribe to collaborator selection changes and update the selection state.
     */
    subscribeToCollaboratorSelectionChanges() {
      const {
        getSelectionStart,
        getSelectionEnd,
        getSelectedBlocksInitialCaretPosition
      } = (0, import_data5.select)(import_block_editor3.store);
      let selectionStart = getSelectionStart();
      let selectionEnd = getSelectionEnd();
      let localCursorTimeout = null;
      let selectionBeforeDebounce = null;
      (0, import_data5.subscribe)(() => {
        const newSelectionStart = getSelectionStart();
        const newSelectionEnd = getSelectionEnd();
        if (newSelectionStart === selectionStart && newSelectionEnd === selectionEnd) {
          return;
        }
        if (!selectionBeforeDebounce) {
          selectionBeforeDebounce = {
            start: selectionStart,
            end: selectionEnd
          };
        }
        selectionStart = newSelectionStart;
        selectionEnd = newSelectionEnd;
        const initialPosition = getSelectedBlocksInitialCaretPosition();
        void this.updateSelectionInEntityRecord(
          selectionStart,
          selectionEnd,
          initialPosition
        );
        if (localCursorTimeout) {
          clearTimeout(localCursorTimeout);
        }
        localCursorTimeout = setTimeout(() => {
          const selectionStateOptions = {};
          if (selectionBeforeDebounce) {
            selectionStateOptions.selectionDirection = detectSelectionDirection(
              selectionBeforeDebounce.start,
              selectionBeforeDebounce.end,
              selectionStart,
              selectionEnd
            );
            selectionBeforeDebounce = null;
          }
          const selectionState = getSelectionState(
            selectionStart,
            selectionEnd,
            this.doc,
            selectionStateOptions
          );
          this.setThrottledLocalStateField(
            "editorState",
            { selection: selectionState },
            AWARENESS_CURSOR_UPDATE_THROTTLE_IN_MS
          );
        }, LOCAL_CURSOR_UPDATE_DEBOUNCE_IN_MS);
      });
    }
    /**
     * Update the entity record with the current collaborator's selection.
     *
     * @param selectionStart  - The start position of the selection.
     * @param selectionEnd    - The end position of the selection.
     * @param initialPosition - The initial position of the selection.
     */
    async updateSelectionInEntityRecord(selectionStart, selectionEnd, initialPosition) {
      const edits = {
        selection: { selectionStart, selectionEnd, initialPosition }
      };
      const options = {
        undoIgnore: true
      };
      (0, import_data5.dispatch)(STORE_NAME).editEntityRecord(
        this.kind,
        this.name,
        this.postId,
        edits,
        options
      );
    }
    /**
     * Check if two editor states are equal.
     *
     * @param state1 - The first editor state.
     * @param state2 - The second editor state.
     * @return True if the editor states are equal, false otherwise.
     */
    areEditorStatesEqual(state1, state2) {
      if (!state1 || !state2) {
        return state1 === state2;
      }
      if (!state1.selection || !state2.selection) {
        return state1.selection === state2.selection;
      }
      return areSelectionsStatesEqual(state1.selection, state2.selection);
    }
    /**
     * Resolve a selection state to a text index and block client ID.
     *
     * For text-based selections, navigates up from the resolved Y.Text via
     * AbstractType.parent to find the containing block, then resolves the
     * local clientId via the block's tree path.
     * For WholeBlock selections, resolves the block's relative position and
     * then finds the local clientId via tree path.
     *
     * Tree-path resolution is used instead of reading the clientId directly
     * from the Yjs block because the local block-editor store may use different
     * clientIds (e.g. in "Show Template" mode where blocks are cloned).
     *
     * @param selection - The selection state.
     * @return The rich-text offset and block client ID, or nulls if not resolvable.
     */
    convertSelectionStateToAbsolute(selection) {
      if (selection.type === SelectionType.None) {
        return { richTextOffset: null, localClientId: null };
      }
      if (selection.type === SelectionType.WholeBlock) {
        const absolutePos = yjs_exports.createAbsolutePositionFromRelativePosition(
          selection.blockPosition,
          this.doc
        );
        let localClientId2 = null;
        if (absolutePos && absolutePos.type instanceof yjs_exports.Array) {
          const parentArray = absolutePos.type;
          const block = parentArray.get(absolutePos.index);
          if (block instanceof yjs_exports.Map) {
            const path2 = getBlockPathInYdoc(block);
            localClientId2 = path2 ? resolveBlockClientIdByPath(path2) : null;
          }
        }
        return { richTextOffset: null, localClientId: localClientId2 };
      }
      const cursorPos = "cursorPosition" in selection ? selection.cursorPosition : selection.cursorStartPosition;
      const absolutePosition = yjs_exports.createAbsolutePositionFromRelativePosition(
        cursorPos.relativePosition,
        this.doc
      );
      if (!absolutePosition) {
        return { richTextOffset: null, localClientId: null };
      }
      const yType = absolutePosition.type.parent?.parent;
      const path = yType instanceof yjs_exports.Map ? getBlockPathInYdoc(yType) : null;
      const localClientId = path ? resolveBlockClientIdByPath(path) : null;
      return {
        richTextOffset: htmlIndexToRichTextOffset(
          absolutePosition.type.toString(),
          absolutePosition.index
        ),
        localClientId
      };
    }
    /**
     * Type guard to check if a struct is a Y.Item (not Y.GC)
     * @param struct - The struct to check.
     * @return True if the struct is a Y.Item, false otherwise.
     */
    isYItem(struct) {
      return "content" in struct;
    }
    /**
     * Get data for debugging, using the awareness state.
     *
     * @return {YDocDebugData} The debug data.
     */
    getDebugData() {
      const ydoc = this.doc;
      const docData = Object.fromEntries(
        Array.from(ydoc.share, ([key, value]) => [
          key,
          value.toJSON()
        ])
      );
      const collaboratorMapData = new Map(
        Array.from(this.getSeenStates().entries()).map(
          ([clientId, collaboratorState]) => [
            String(clientId),
            {
              name: collaboratorState.collaboratorInfo.name,
              wpUserId: collaboratorState.collaboratorInfo.id
            }
          ]
        )
      );
      const serializableClientItems = {};
      ydoc.store.clients.forEach((structs, clientId) => {
        const items2 = structs.filter(this.isYItem);
        serializableClientItems[clientId] = items2.map((item) => {
          const { left, right, ...rest } = item;
          return {
            ...rest,
            left: left ? {
              id: left.id,
              length: left.length,
              origin: left.origin,
              content: left.content
            } : null,
            right: right ? {
              id: right.id,
              length: right.length,
              origin: right.origin,
              content: right.content
            } : null
          };
        });
      });
      return {
        doc: docData,
        clients: serializableClientItems,
        collaboratorMap: Object.fromEntries(collaboratorMapData)
      };
    }
  };
  function detectSelectionDirection(prevStart, prevEnd, newStart, newEnd) {
    const startMoved = !areBlockSelectionsEqual(prevStart, newStart);
    const endMoved = !areBlockSelectionsEqual(prevEnd, newEnd);
    if (startMoved && !endMoved) {
      return SelectionDirection.Backward;
    }
    return SelectionDirection.Forward;
  }
  function areBlockSelectionsEqual(a, b) {
    return a.clientId === b.clientId && a.attributeKey === b.attributeKey && a.offset === b.offset;
  }

  // packages/core-data/build-module/utils/crdt.mjs
  var import_es65 = __toESM(require_es6(), 1);
  var import_blocks3 = __toESM(require_blocks(), 1);

  // node_modules/uuid/dist/esm-browser/rng.js
  var getRandomValues2;
  var rnds8 = new Uint8Array(16);
  function rng() {
    if (!getRandomValues2) {
      getRandomValues2 = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
      if (!getRandomValues2) {
        throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
      }
    }
    return getRandomValues2(rnds8);
  }

  // node_modules/uuid/dist/esm-browser/stringify.js
  var byteToHex = [];
  for (let i = 0; i < 256; ++i) {
    byteToHex.push((i + 256).toString(16).slice(1));
  }
  function unsafeStringify(arr, offset = 0) {
    return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
  }

  // node_modules/uuid/dist/esm-browser/native.js
  var randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
  var native_default = {
    randomUUID
  };

  // node_modules/uuid/dist/esm-browser/v4.js
  function v4(options, buf, offset) {
    if (native_default.randomUUID && !buf && !options) {
      return native_default.randomUUID();
    }
    options = options || {};
    const rnds = options.random || (options.rng || rng)();
    rnds[6] = rnds[6] & 15 | 64;
    rnds[8] = rnds[8] & 63 | 128;
    if (buf) {
      offset = offset || 0;
      for (let i = 0; i < 16; ++i) {
        buf[offset + i] = rnds[i];
      }
      return buf;
    }
    return unsafeStringify(rnds);
  }
  var v4_default = v4;

  // packages/core-data/build-module/utils/crdt-blocks.mjs
  var import_es64 = __toESM(require_es6(), 1);
  var import_blocks = __toESM(require_blocks(), 1);
  var import_rich_text3 = __toESM(require_rich_text(), 1);

  // packages/core-data/build-module/utils/crdt-text.mjs
  var import_rich_text2 = __toESM(require_rich_text(), 1);
  var RICH_TEXT_CACHE_MAX_SIZE = 500;
  function createRichTextDataCache(maxSize) {
    const cache3 = /* @__PURE__ */ new Map();
    return function(value) {
      const cached = cache3.get(value);
      if (cached) {
        return cached;
      }
      const result = import_rich_text2.RichTextData.fromHTMLString(value);
      if (cache3.size >= maxSize) {
        cache3.delete(cache3.keys().next().value);
      }
      cache3.set(value, result);
      return result;
    };
  }
  var getCachedRichTextData = createRichTextDataCache(
    RICH_TEXT_CACHE_MAX_SIZE
  );

  // packages/core-data/build-module/utils/crdt-blocks.mjs
  var serializableBlocksCache = /* @__PURE__ */ new WeakMap();
  function serializeAttributeValue(value) {
    if (value instanceof import_rich_text3.RichTextData) {
      return value.valueOf();
    }
    if (Array.isArray(value)) {
      return value.map(serializeAttributeValue);
    }
    if (value && typeof value === "object") {
      const result = {};
      for (const [k, v] of Object.entries(value)) {
        result[k] = serializeAttributeValue(v);
      }
      return result;
    }
    return value;
  }
  function makeBlockAttributesSerializable(blockName, attributes) {
    const newAttributes = { ...attributes };
    for (const [key, value] of Object.entries(attributes)) {
      if (isLocalAttribute(blockName, key)) {
        delete newAttributes[key];
        continue;
      }
      newAttributes[key] = serializeAttributeValue(value);
    }
    return newAttributes;
  }
  function makeBlocksSerializable(blocks) {
    return blocks.map((block) => {
      const { name, innerBlocks, attributes, ...rest } = block;
      delete rest.validationIssues;
      return {
        ...rest,
        name,
        attributes: makeBlockAttributesSerializable(name, attributes),
        innerBlocks: makeBlocksSerializable(innerBlocks)
      };
    });
  }
  function deserializeAttributeValue(schema, value) {
    if (schema?.type === "rich-text" && typeof value === "string") {
      return getCachedRichTextData(value);
    }
    if (Array.isArray(value)) {
      return value.map(
        (item) => deserializeAttributeValue(schema, item)
      );
    }
    if (value && typeof value === "object") {
      const result = {};
      for (const [key, innerValue] of Object.entries(
        value
      )) {
        result[key] = deserializeAttributeValue(
          schema?.query?.[key],
          innerValue
        );
      }
      return result;
    }
    return value;
  }
  function deserializeBlockAttributes(blocks) {
    return blocks.map((block) => {
      const { name, innerBlocks, attributes, ...rest } = block;
      const newAttributes = { ...attributes };
      for (const [key, value] of Object.entries(attributes)) {
        const schema = getBlockAttributeType(name, key);
        if (schema) {
          newAttributes[key] = deserializeAttributeValue(
            schema,
            value
          );
        }
      }
      return {
        ...rest,
        name,
        attributes: newAttributes,
        innerBlocks: deserializeBlockAttributes(innerBlocks ?? [])
      };
    });
  }
  function areBlocksEqual(gblock, yblock) {
    const yblockAsJson = yblock.toJSON();
    const overwrites = {
      innerBlocks: null,
      clientId: null
    };
    const res = (0, import_es64.default)(
      Object.assign({}, gblock, overwrites),
      Object.assign({}, yblockAsJson, overwrites)
    );
    const inners = gblock.innerBlocks || [];
    const yinners = yblock.get("innerBlocks");
    return res && inners.length === yinners?.length && inners.every(
      (block, i) => areBlocksEqual(block, yinners.get(i))
    );
  }
  function createNewYAttributeMap(blockName, attributes) {
    return new yjs_exports.Map(
      Object.entries(attributes).map(
        ([attributeName, attributeValue]) => {
          return [
            attributeName,
            createNewYAttributeValue(
              blockName,
              attributeName,
              attributeValue
            )
          ];
        }
      )
    );
  }
  function createNewYAttributeValue(blockName, attributeName, attributeValue) {
    const isRichText = isRichTextAttribute(blockName, attributeName);
    if (isRichText) {
      return new yjs_exports.Text(attributeValue?.toString() ?? "");
    }
    return attributeValue;
  }
  function createNewYBlock(block) {
    return createYMap(
      Object.fromEntries(
        Object.entries(block).map(([key, value]) => {
          switch (key) {
            case "attributes": {
              return [
                key,
                createNewYAttributeMap(block.name, value)
              ];
            }
            case "innerBlocks": {
              const innerBlocks = new yjs_exports.Array();
              if (!Array.isArray(value)) {
                return [key, innerBlocks];
              }
              innerBlocks.insert(
                0,
                value.map(
                  (innerBlock) => createNewYBlock(innerBlock)
                )
              );
              return [key, innerBlocks];
            }
            default:
              return [key, value];
          }
        })
      )
    );
  }
  function mergeCrdtBlocks(yblocks, incomingBlocks, cursorPosition) {
    if (!serializableBlocksCache.has(incomingBlocks)) {
      serializableBlocksCache.set(
        incomingBlocks,
        makeBlocksSerializable(incomingBlocks)
      );
    }
    const blocksToSync = serializableBlocksCache.get(incomingBlocks) ?? [];
    const numOfCommonEntries = Math.min(
      blocksToSync.length ?? 0,
      yblocks.length
    );
    let left = 0;
    let right = 0;
    for (; left < numOfCommonEntries && areBlocksEqual(blocksToSync[left], yblocks.get(left)); left++) {
    }
    for (; right < numOfCommonEntries - left && areBlocksEqual(
      blocksToSync[blocksToSync.length - right - 1],
      yblocks.get(yblocks.length - right - 1)
    ); right++) {
    }
    const numOfUpdatesNeeded = numOfCommonEntries - left - right;
    const numOfInsertionsNeeded = Math.max(
      0,
      blocksToSync.length - yblocks.length
    );
    const numOfDeletionsNeeded = Math.max(
      0,
      yblocks.length - blocksToSync.length
    );
    for (let i = 0; i < numOfUpdatesNeeded; i++, left++) {
      const block = blocksToSync[left];
      const yblock = yblocks.get(left);
      Object.entries(block).forEach(([key, value]) => {
        switch (key) {
          case "attributes": {
            const currentAttributes = yblock.get(key);
            if (!currentAttributes) {
              yblock.set(
                key,
                createNewYAttributeMap(block.name, value)
              );
              break;
            }
            Object.entries(value).forEach(
              ([attributeName, attributeValue]) => {
                const currentAttribute = currentAttributes?.get(attributeName);
                const isExpectedType = isExpectedAttributeType(
                  block.name,
                  attributeName,
                  currentAttribute
                );
                const isAttributeChanged = !isExpectedType || !(0, import_es64.default)(
                  currentAttribute,
                  attributeValue
                );
                if (isAttributeChanged) {
                  updateYBlockAttribute(
                    block.name,
                    attributeName,
                    attributeValue,
                    currentAttributes,
                    cursorPosition
                  );
                }
              }
            );
            currentAttributes.forEach(
              (_attrValue, attrName) => {
                if (!value.hasOwnProperty(attrName)) {
                  currentAttributes.delete(attrName);
                }
              }
            );
            break;
          }
          case "innerBlocks": {
            let yInnerBlocks = yblock.get(key);
            if (!(yInnerBlocks instanceof yjs_exports.Array)) {
              yInnerBlocks = new yjs_exports.Array();
              yblock.set(key, yInnerBlocks);
            }
            mergeCrdtBlocks(
              yInnerBlocks,
              value ?? [],
              cursorPosition
            );
            break;
          }
          default:
            if (!(0, import_es64.default)(block[key], yblock.get(key))) {
              yblock.set(key, value);
            }
        }
      });
      yblock.forEach((_v, k) => {
        if (!block.hasOwnProperty(k)) {
          yblock.delete(k);
        }
      });
    }
    yblocks.delete(left, numOfDeletionsNeeded);
    for (let i = 0; i < numOfInsertionsNeeded; i++, left++) {
      const newBlock = [createNewYBlock(blocksToSync[left])];
      yblocks.insert(left, newBlock);
    }
    const knownClientIds = /* @__PURE__ */ new Set();
    for (let j = 0; j < yblocks.length; j++) {
      const yblock = yblocks.get(j);
      let clientId = yblock.get("clientId");
      if (!clientId) {
        continue;
      }
      if (knownClientIds.has(clientId)) {
        clientId = v4_default();
        yblock.set("clientId", clientId);
      }
      knownClientIds.add(clientId);
    }
  }
  function updateYBlockAttribute(blockName, attributeName, attributeValue, currentAttributes, cursorPosition) {
    const isRichText = isRichTextAttribute(blockName, attributeName);
    const currentAttribute = currentAttributes.get(attributeName);
    if (isRichText && "string" === typeof attributeValue && currentAttributes.has(attributeName) && currentAttribute instanceof yjs_exports.Text) {
      mergeRichTextUpdate(currentAttribute, attributeValue, cursorPosition);
    } else {
      currentAttributes.set(
        attributeName,
        createNewYAttributeValue(blockName, attributeName, attributeValue)
      );
    }
  }
  var cachedBlockAttributeTypes;
  function getBlockAttributeType(blockName, attributeName) {
    if (!cachedBlockAttributeTypes) {
      cachedBlockAttributeTypes = /* @__PURE__ */ new Map();
      for (const blockType of (0, import_blocks.getBlockTypes)()) {
        cachedBlockAttributeTypes.set(
          blockType.name,
          new Map(
            Object.entries(blockType.attributes ?? {}).map(
              ([name, definition]) => {
                const { role, type, query } = definition;
                return [name, { role, type, query }];
              }
            )
          )
        );
      }
    }
    return cachedBlockAttributeTypes.get(blockName)?.get(attributeName);
  }
  function isExpectedAttributeType(blockName, attributeName, attributeValue) {
    const expectedAttributeType = getBlockAttributeType(
      blockName,
      attributeName
    )?.type;
    if (expectedAttributeType === "rich-text") {
      return attributeValue instanceof yjs_exports.Text;
    }
    if (expectedAttributeType === "string") {
      return typeof attributeValue === "string";
    }
    return true;
  }
  function isLocalAttribute(blockName, attributeName) {
    return "local" === getBlockAttributeType(blockName, attributeName)?.role;
  }
  function isRichTextAttribute(blockName, attributeName) {
    return "rich-text" === getBlockAttributeType(blockName, attributeName)?.type;
  }
  var localDoc;
  function mergeRichTextUpdate(blockYText, updatedValue, cursorPosition = null) {
    if (!localDoc) {
      localDoc = new yjs_exports.Doc();
    }
    const localYText = localDoc.getText("temporary-text");
    localYText.delete(0, localYText.length);
    localYText.insert(0, updatedValue);
    const currentValueAsDelta = new Delta2(blockYText.toDelta());
    const updatedValueAsDelta = new Delta2(localYText.toDelta());
    const deltaDiff = currentValueAsDelta.diffWithCursor(
      updatedValueAsDelta,
      cursorPosition
    );
    blockYText.applyDelta(deltaDiff.ops);
  }

  // packages/core-data/build-module/utils/crdt-selection.mjs
  var import_data6 = __toESM(require_data(), 1);
  var import_block_editor4 = __toESM(require_block_editor(), 1);
  var import_blocks2 = __toESM(require_blocks(), 1);

  // packages/core-data/build-module/utils/block-selection-history.mjs
  var SELECTION_HISTORY_DEFAULT_SIZE = 5;
  var YSelectionType = /* @__PURE__ */ ((YSelectionType2) => {
    YSelectionType2["RelativeSelection"] = "RelativeSelection";
    YSelectionType2["BlockSelection"] = "BlockSelection";
    return YSelectionType2;
  })(YSelectionType || {});
  function createBlockSelectionHistory(ydoc, historySize = SELECTION_HISTORY_DEFAULT_SIZE) {
    let history = [];
    const getSelectionHistory2 = () => {
      return history.slice(0);
    };
    const updateSelection = (newSelection) => {
      if (!newSelection?.selectionStart?.clientId || !newSelection?.selectionEnd?.clientId) {
        return;
      }
      const { selectionStart, selectionEnd } = newSelection;
      const start = convertWPBlockSelectionToSelection(
        selectionStart,
        ydoc
      );
      const end = convertWPBlockSelectionToSelection(selectionEnd, ydoc);
      addToHistory({ start, end });
    };
    const addToHistory = (yFullSelection) => {
      const startClientId = yFullSelection.start.clientId;
      const endClientId = yFullSelection.end.clientId;
      history = history.filter((entry) => {
        const isSameBlockCombination = entry.start.clientId === startClientId && entry.end.clientId === endClientId;
        return !isSameBlockCombination;
      });
      history.unshift(yFullSelection);
      if (history.length > historySize + 1) {
        history = history.slice(0, historySize + 1);
      }
    };
    return {
      getSelectionHistory: getSelectionHistory2,
      updateSelection
    };
  }
  function convertWPBlockSelectionToSelection(selection, ydoc) {
    const clientId = selection.clientId;
    const block = findBlockByClientIdInDoc(clientId, ydoc);
    const attributes = block?.get("attributes");
    const attributeKey = selection.attributeKey;
    const changedYText = attributeKey ? attributes?.get(attributeKey) : void 0;
    const isYText = changedYText instanceof yjs_exports.Text;
    const isFullyDefinedSelection = attributeKey && clientId;
    if (!isYText || !isFullyDefinedSelection) {
      return {
        type: "BlockSelection",
        clientId
      };
    }
    const offset = selection.offset ?? 0;
    const relativePosition = yjs_exports.createRelativePositionFromTypeIndex(
      changedYText,
      richTextOffsetToHtmlIndex(changedYText.toString(), offset)
    );
    return {
      type: "RelativeSelection",
      attributeKey,
      relativePosition,
      clientId,
      offset
    };
  }

  // packages/core-data/build-module/utils/crdt-selection.mjs
  var selectionHistoryMap = /* @__PURE__ */ new WeakMap();
  function getBlockSelectionHistory(ydoc) {
    let history = selectionHistoryMap.get(ydoc);
    if (!history) {
      history = createBlockSelectionHistory(ydoc);
      selectionHistoryMap.set(ydoc, history);
    }
    return history;
  }
  function getSelectionHistory(ydoc) {
    return getBlockSelectionHistory(ydoc).getSelectionHistory();
  }
  function updateSelectionHistory(ydoc, wpSelection) {
    return getBlockSelectionHistory(ydoc).updateSelection(wpSelection);
  }
  function convertYSelectionToBlockSelection(ySelection, ydoc) {
    if (ySelection.type === YSelectionType.RelativeSelection) {
      const { relativePosition, attributeKey, clientId } = ySelection;
      const absolutePosition = yjs_exports.createAbsolutePositionFromRelativePosition(
        relativePosition,
        ydoc
      );
      if (absolutePosition) {
        return {
          clientId,
          attributeKey,
          offset: htmlIndexToRichTextOffset(
            absolutePosition.type.toString(),
            absolutePosition.index
          )
        };
      }
    } else if (ySelection.type === YSelectionType.BlockSelection) {
      return {
        clientId: ySelection.clientId,
        attributeKey: void 0,
        offset: void 0
      };
    }
    return null;
  }
  function convertYFullSelectionToWPSelection(yFullSelection, ydoc) {
    const { start, end } = yFullSelection;
    const startBlock = findBlockByClientIdInDoc(start.clientId, ydoc);
    const endBlock = findBlockByClientIdInDoc(end.clientId, ydoc);
    if (!startBlock || !endBlock) {
      return null;
    }
    const startBlockSelection = convertYSelectionToBlockSelection(
      start,
      ydoc
    );
    const endBlockSelection = convertYSelectionToBlockSelection(end, ydoc);
    if (startBlockSelection === null || endBlockSelection === null) {
      return null;
    }
    return {
      selectionStart: startBlockSelection,
      selectionEnd: endBlockSelection
    };
  }
  function findSelectionFromHistory(ydoc, selectionHistory) {
    for (const positionToTry of selectionHistory) {
      const result = convertYFullSelectionToWPSelection(
        positionToTry,
        ydoc
      );
      if (result !== null) {
        return result;
      }
    }
    return null;
  }
  function restoreSelection(selectionHistory, ydoc) {
    const selectionToRestore = findSelectionFromHistory(
      ydoc,
      selectionHistory
    );
    if (selectionToRestore === null) {
      return;
    }
    const { getBlock } = (0, import_data6.select)(import_block_editor4.store);
    const { resetSelection } = (0, import_data6.dispatch)(import_block_editor4.store);
    const { selectionStart, selectionEnd } = selectionToRestore;
    const isSelectionInSameBlock = selectionStart.clientId === selectionEnd.clientId;
    if (isSelectionInSameBlock) {
      const block = getBlock(selectionStart.clientId);
      const isBlockEmpty = block && (0, import_blocks2.isUnmodifiedBlock)(block);
      const isBeginningOfEmptyBlock = 0 === selectionStart.offset && 0 === selectionEnd.offset && isBlockEmpty && !selectionStart.attributeKey && !selectionEnd.attributeKey;
      if (isBeginningOfEmptyBlock) {
        const selectionStartWithoutOffset = {
          clientId: selectionStart.clientId
        };
        const selectionEndWithoutOffset = {
          clientId: selectionEnd.clientId
        };
        resetSelection(
          selectionStartWithoutOffset,
          selectionEndWithoutOffset,
          0
        );
      } else {
        resetSelection(selectionStart, selectionEnd, 0);
      }
    } else {
      resetSelection(selectionEnd, selectionEnd, 0);
    }
  }
  function getShiftedSelection(ydoc, selectionHistory) {
    if (selectionHistory.length === 0) {
      return null;
    }
    const { start, end } = selectionHistory[0];
    if (start.type === YSelectionType.BlockSelection || end.type === YSelectionType.BlockSelection) {
      return null;
    }
    const selectionStart = convertYSelectionToBlockSelection(start, ydoc);
    const selectionEnd = convertYSelectionToBlockSelection(end, ydoc);
    if (!selectionStart || !selectionEnd) {
      return null;
    }
    const startShifted = selectionStart.offset !== start.offset;
    const endShifted = selectionEnd.offset !== end.offset;
    if (!startShifted && !endShifted) {
      return null;
    }
    return { selectionStart, selectionEnd };
  }

  // packages/core-data/build-module/utils/crdt.mjs
  var POST_META_KEY_FOR_CRDT_DOC_PERSISTENCE = "_crdt_document";
  var disallowedPostMetaKeys = /* @__PURE__ */ new Set([
    POST_META_KEY_FOR_CRDT_DOC_PERSISTENCE
  ]);
  function defaultApplyChangesToCRDTDoc(ydoc, changes) {
    const ymap = getRootMap(ydoc, CRDT_RECORD_MAP_KEY2);
    Object.entries(changes).forEach(([key, newValue]) => {
      if ("function" === typeof newValue) {
        return;
      }
      switch (key) {
        // Add support for additional data types here.
        default: {
          const currentValue = ymap.get(key);
          updateMapValue(ymap, key, currentValue, newValue);
        }
      }
    });
  }
  function applyPostChangesToCRDTDoc(ydoc, changes, syncedProperties) {
    const ymap = getRootMap(ydoc, CRDT_RECORD_MAP_KEY2);
    Object.keys(changes).forEach((key) => {
      if (!syncedProperties.has(key)) {
        return;
      }
      const newValue = changes[key];
      if ("function" === typeof newValue) {
        return;
      }
      switch (key) {
        case "blocks": {
          if (!newValue) {
            ymap.set(key, void 0);
            break;
          }
          let currentBlocks = ymap.get(key);
          if (!(currentBlocks instanceof yjs_exports.Array)) {
            currentBlocks = new yjs_exports.Array();
            ymap.set(key, currentBlocks);
          }
          const cursorPosition = changes.selection?.selectionStart?.offset ?? null;
          mergeCrdtBlocks(currentBlocks, newValue, cursorPosition);
          break;
        }
        case "content":
        case "excerpt":
        case "title": {
          const currentValue = ymap.get(key);
          let rawValue = getRawValue(newValue);
          if (key === "title" && !currentValue?.toString() && "Auto Draft" === rawValue) {
            rawValue = "";
          }
          if (currentValue instanceof yjs_exports.Text) {
            mergeRichTextUpdate(currentValue, rawValue ?? "");
          } else {
            const newYText = new yjs_exports.Text(rawValue ?? "");
            ymap.set(key, newYText);
          }
          break;
        }
        // "Meta" is overloaded term; here, it refers to post meta.
        case "meta": {
          let metaMap = ymap.get("meta");
          if (!isYMap(metaMap)) {
            metaMap = createYMap();
            ymap.set("meta", metaMap);
          }
          Object.entries(newValue ?? {}).forEach(
            ([metaKey, metaValue]) => {
              if (disallowedPostMetaKeys.has(metaKey)) {
                return;
              }
              updateMapValue(
                metaMap,
                metaKey,
                metaMap.get(metaKey),
                // current value in CRDT
                metaValue
                // new value from changes
              );
            }
          );
          break;
        }
        case "slug": {
          if (!newValue) {
            break;
          }
          const currentValue = ymap.get(key);
          updateMapValue(ymap, key, currentValue, newValue);
          break;
        }
        // Add support for additional properties here.
        default: {
          const currentValue = ymap.get(key);
          updateMapValue(ymap, key, currentValue, newValue);
        }
      }
    });
    if (changes.selection) {
      const selection = changes.selection;
      setTimeout(() => {
        updateSelectionHistory(ydoc, selection);
      }, 0);
    }
  }
  function defaultGetChangesFromCRDTDoc(crdtDoc) {
    return getRootMap(crdtDoc, CRDT_RECORD_MAP_KEY2).toJSON();
  }
  function getPostChangesFromCRDTDoc(ydoc, editedRecord, syncedProperties) {
    const ymap = getRootMap(ydoc, CRDT_RECORD_MAP_KEY2);
    let allowedMetaChanges = {};
    const changes = Object.fromEntries(
      Object.entries(ymap.toJSON()).filter(([key, newValue]) => {
        if (!syncedProperties.has(key)) {
          return false;
        }
        const currentValue = editedRecord[key];
        switch (key) {
          case "blocks": {
            if (ydoc.meta?.get(CRDT_DOC_META_PERSISTENCE_KEY2) && editedRecord.content) {
              const blocksJson = ymap.get("blocks")?.toJSON() ?? [];
              return (0, import_blocks3.__unstableSerializeAndClean)(blocksJson).trim() !== getRawValue(editedRecord.content);
            }
            return true;
          }
          case "date": {
            const currentDateIsFloating = null === currentValue || editedRecord.modified === currentValue;
            if (currentDateIsFloating) {
              return false;
            }
            return haveValuesChanged(currentValue, newValue);
          }
          case "meta": {
            const currentMeta = currentValue ?? {};
            allowedMetaChanges = Object.fromEntries(
              Object.entries(newValue ?? {}).filter(
                ([metaKey]) => {
                  if (disallowedPostMetaKeys.has(metaKey)) {
                    return false;
                  }
                  return metaKey in currentMeta;
                }
              )
            );
            const mergedValue = {
              ...currentMeta,
              ...allowedMetaChanges
            };
            return haveValuesChanged(currentValue, mergedValue);
          }
          case "status": {
            if ("auto-draft" === newValue) {
              return false;
            }
            return haveValuesChanged(currentValue, newValue);
          }
          case "content":
          case "excerpt":
          case "title": {
            return haveValuesChanged(
              getRawValue(currentValue),
              newValue
            );
          }
          // Add support for additional data types here.
          default: {
            return haveValuesChanged(currentValue, newValue);
          }
        }
      })
    );
    if (changes.blocks) {
      changes.blocks = deserializeBlockAttributes(
        changes.blocks
      );
    }
    if ("object" === typeof changes.meta) {
      changes.meta = {
        ...editedRecord.meta,
        ...allowedMetaChanges
      };
    }
    const selectionHistory = getSelectionHistory(ydoc);
    const shiftedSelection = getShiftedSelection(ydoc, selectionHistory);
    if (shiftedSelection) {
      changes.selection = {
        ...shiftedSelection,
        initialPosition: 0
      };
    }
    return changes;
  }
  var defaultSyncConfig = {
    applyChangesToCRDTDoc: defaultApplyChangesToCRDTDoc,
    createAwareness: (ydoc) => new BaseAwareness(ydoc),
    getChangesFromCRDTDoc: defaultGetChangesFromCRDTDoc
  };
  var defaultCollectionSyncConfig = {
    applyChangesToCRDTDoc: () => {
    },
    getChangesFromCRDTDoc: () => ({}),
    shouldSync: (_, objectId) => null === objectId
  };
  function getRawValue(value) {
    if ("string" === typeof value) {
      return value;
    }
    if (value && "object" === typeof value && "raw" in value && "string" === typeof value.raw) {
      return value.raw;
    }
    return void 0;
  }
  function haveValuesChanged(currentValue, newValue) {
    return !(0, import_es65.default)(currentValue, newValue);
  }
  function updateMapValue(map2, key, currentValue, newValue) {
    if (void 0 === newValue) {
      map2.delete(key);
      return;
    }
    if (haveValuesChanged(currentValue, newValue)) {
      map2.set(key, newValue);
    }
  }

  // packages/core-data/build-module/entities.mjs
  var DEFAULT_ENTITY_KEY = "id";
  var POST_RAW_ATTRIBUTES = ["title", "excerpt", "content"];
  var blocksTransientEdits = {
    blocks: {
      read: (record) => (0, import_blocks4.parse)(record.content?.raw ?? ""),
      write: (record) => ({
        content: (0, import_blocks4.__unstableSerializeAndClean)(record.blocks)
      })
    }
  };
  var rootEntitiesConfig = [
    {
      label: (0, import_i18n.__)("Base"),
      kind: "root",
      key: false,
      name: "__unstableBase",
      baseURL: "/",
      baseURLParams: {
        // Please also change the preload path when changing this.
        // @see lib/compat/wordpress-7.0/preload.php
        _fields: [
          "description",
          "gmt_offset",
          "home",
          "image_sizes",
          "image_size_threshold",
          "image_output_formats",
          "jpeg_interlaced",
          "png_interlaced",
          "gif_interlaced",
          "name",
          "site_icon",
          "site_icon_url",
          "site_logo",
          "timezone_string",
          "url",
          "page_for_posts",
          "page_on_front",
          "show_on_front"
        ].join(",")
      },
      // The entity doesn't support selecting multiple records.
      // The property is maintained for backward compatibility.
      plural: "__unstableBases"
    },
    {
      label: (0, import_i18n.__)("Post Type"),
      name: "postType",
      kind: "root",
      key: "slug",
      baseURL: "/wp/v2/types",
      baseURLParams: { context: "edit" },
      plural: "postTypes"
    },
    {
      name: "media",
      kind: "root",
      baseURL: "/wp/v2/media",
      baseURLParams: { context: "edit" },
      plural: "mediaItems",
      label: (0, import_i18n.__)("Media"),
      rawAttributes: ["caption", "title", "description"],
      supportsPagination: true
    },
    {
      name: "taxonomy",
      kind: "root",
      key: "slug",
      baseURL: "/wp/v2/taxonomies",
      baseURLParams: { context: "edit" },
      plural: "taxonomies",
      label: (0, import_i18n.__)("Taxonomy")
    },
    {
      name: "sidebar",
      kind: "root",
      baseURL: "/wp/v2/sidebars",
      baseURLParams: { context: "edit" },
      plural: "sidebars",
      transientEdits: { blocks: true },
      label: (0, import_i18n.__)("Widget areas")
    },
    {
      name: "widget",
      kind: "root",
      baseURL: "/wp/v2/widgets",
      baseURLParams: { context: "edit" },
      plural: "widgets",
      transientEdits: { blocks: true },
      label: (0, import_i18n.__)("Widgets")
    },
    {
      name: "widgetType",
      kind: "root",
      baseURL: "/wp/v2/widget-types",
      baseURLParams: { context: "edit" },
      plural: "widgetTypes",
      label: (0, import_i18n.__)("Widget types")
    },
    {
      label: (0, import_i18n.__)("User"),
      name: "user",
      kind: "root",
      baseURL: "/wp/v2/users",
      getTitle: (record) => record?.name || record?.slug,
      baseURLParams: { context: "edit" },
      plural: "users",
      supportsPagination: true
    },
    {
      name: "comment",
      kind: "root",
      baseURL: "/wp/v2/comments",
      baseURLParams: { context: "edit" },
      plural: "comments",
      label: (0, import_i18n.__)("Comment"),
      supportsPagination: true,
      syncConfig: defaultCollectionSyncConfig
    },
    {
      name: "menu",
      kind: "root",
      baseURL: "/wp/v2/menus",
      baseURLParams: { context: "edit" },
      plural: "menus",
      label: (0, import_i18n.__)("Menu"),
      supportsPagination: true
    },
    {
      name: "menuItem",
      kind: "root",
      baseURL: "/wp/v2/menu-items",
      baseURLParams: { context: "edit" },
      plural: "menuItems",
      label: (0, import_i18n.__)("Menu Item"),
      rawAttributes: ["title"],
      supportsPagination: true
    },
    {
      name: "menuLocation",
      kind: "root",
      baseURL: "/wp/v2/menu-locations",
      baseURLParams: { context: "edit" },
      plural: "menuLocations",
      label: (0, import_i18n.__)("Menu Location"),
      key: "name"
    },
    {
      label: (0, import_i18n.__)("Global Styles"),
      name: "globalStyles",
      kind: "root",
      baseURL: "/wp/v2/global-styles",
      baseURLParams: { context: "edit" },
      plural: "globalStylesVariations",
      // Should be different from name.
      getTitle: () => (0, import_i18n.__)("Custom Styles"),
      getRevisionsUrl: (parentId, revisionId) => `/wp/v2/global-styles/${parentId}/revisions${revisionId ? "/" + revisionId : ""}`,
      supportsPagination: true
    },
    {
      label: (0, import_i18n.__)("Themes"),
      name: "theme",
      kind: "root",
      baseURL: "/wp/v2/themes",
      baseURLParams: { context: "edit" },
      plural: "themes",
      key: "stylesheet"
    },
    {
      label: (0, import_i18n.__)("Plugins"),
      name: "plugin",
      kind: "root",
      baseURL: "/wp/v2/plugins",
      baseURLParams: { context: "edit" },
      plural: "plugins",
      key: "plugin"
    },
    {
      label: (0, import_i18n.__)("Status"),
      name: "status",
      kind: "root",
      baseURL: "/wp/v2/statuses",
      baseURLParams: { context: "edit" },
      plural: "statuses",
      key: "slug"
    },
    {
      label: (0, import_i18n.__)("Registered Templates"),
      name: "registeredTemplate",
      kind: "root",
      baseURL: "/wp/v2/registered-templates",
      key: "id"
    },
    {
      label: (0, import_i18n.__)("Font Collections"),
      name: "fontCollection",
      kind: "root",
      baseURL: "/wp/v2/font-collections",
      baseURLParams: { context: "view" },
      plural: "fontCollections",
      key: "slug"
    },
    {
      label: (0, import_i18n.__)("Icons"),
      name: "icon",
      kind: "root",
      baseURL: "/wp/v2/icons",
      baseURLParams: { context: "view" },
      plural: "icons",
      key: "name"
    }
  ];
  var deprecatedEntities = {
    root: {
      media: {
        since: "6.9",
        alternative: {
          kind: "postType",
          name: "attachment"
        }
      }
    }
  };
  var additionalEntityConfigLoaders = [
    { kind: "postType", loadEntities: loadPostTypeEntities },
    { kind: "taxonomy", loadEntities: loadTaxonomyEntities },
    {
      kind: "root",
      name: "site",
      plural: "sites",
      loadEntities: loadSiteEntity
    }
  ];
  var prePersistPostType = async (persistedRecord, edits, name, isTemplate) => {
    const newEdits = {};
    if (!isTemplate && persistedRecord?.status === "auto-draft") {
      if (!edits.status && !newEdits.status) {
        newEdits.status = "draft";
      }
      if ((!edits.title || edits.title === "Auto Draft") && !newEdits.title && (!persistedRecord?.title || persistedRecord?.title === "Auto Draft")) {
        newEdits.title = "";
      }
    }
    if (persistedRecord) {
      const objectType = `postType/${name}`;
      const objectId = persistedRecord.id;
      const serializedDoc = await getSyncManager()?.createPersistedCRDTDoc(
        objectType,
        objectId
      );
      if (serializedDoc) {
        newEdits.meta = {
          ...edits.meta,
          [POST_META_KEY_FOR_CRDT_DOC_PERSISTENCE]: serializedDoc
        };
      }
    }
    return newEdits;
  };
  async function loadPostTypeEntities() {
    const postTypesPromise = (0, import_api_fetch2.default)({ path: "/wp/v2/types?context=view" });
    const taxonomiesPromise = window._wpCollaborationEnabled ? (0, import_api_fetch2.default)({ path: "/wp/v2/taxonomies?context=view" }) : Promise.resolve({});
    const [postTypes, taxonomies] = await Promise.all([
      postTypesPromise,
      taxonomiesPromise
    ]);
    return Object.entries(postTypes ?? {}).map(([name, postType]) => {
      const isTemplate = ["wp_template", "wp_template_part"].includes(
        name
      );
      const namespace = postType?.rest_namespace ?? "wp/v2";
      const syncedProperties = /* @__PURE__ */ new Set([
        "author",
        "blocks",
        "content",
        "comment_status",
        "date",
        "excerpt",
        "featured_media",
        "format",
        "meta",
        "ping_status",
        "slug",
        "status",
        "sticky",
        "template",
        "title",
        ...postType.taxonomies?.map((taxonomy) => taxonomies?.[taxonomy]?.rest_base)?.filter(Boolean) ?? []
      ]);
      const entity2 = {
        kind: "postType",
        baseURL: `/${namespace}/${postType.rest_base}`,
        baseURLParams: { context: "edit" },
        name,
        label: postType.name,
        transientEdits: {
          ...blocksTransientEdits,
          selection: true
        },
        mergedEdits: { meta: true },
        rawAttributes: POST_RAW_ATTRIBUTES,
        getTitle: (record) => record?.title?.rendered || record?.title || (isTemplate ? capitalCase(record.slug ?? "") : String(record.id)),
        __unstablePrePersist: (persistedRecord, edits) => prePersistPostType(persistedRecord, edits, name, isTemplate),
        __unstable_rest_base: postType.rest_base,
        supportsPagination: true,
        getRevisionsUrl: (parentId, revisionId) => `/${namespace}/${postType.rest_base}/${parentId}/revisions${revisionId ? "/" + revisionId : ""}`,
        revisionKey: isTemplate && !window?.__experimentalTemplateActivate ? "wp_id" : DEFAULT_ENTITY_KEY
      };
      entity2.syncConfig = {
        /**
         * Apply changes from the local editor to the local CRDT document so
         * that those changes can be synced to other peers (via the provider).
         *
         * @param {import('@wordpress/sync').CRDTDoc}               crdtDoc
         * @param {Partial< import('@wordpress/sync').ObjectData >} changes
         * @return {void}
         */
        applyChangesToCRDTDoc: (crdtDoc, changes) => applyPostChangesToCRDTDoc(crdtDoc, changes, syncedProperties),
        /**
         * Create the awareness instance for the entity's CRDT document.
         *
         * @param {import('@wordpress/sync').CRDTDoc}  ydoc
         * @param {import('@wordpress/sync').ObjectID} objectId
         * @return {import('@wordpress/sync').Awareness} Awareness instance
         */
        createAwareness: (ydoc, objectId) => {
          const kind = "postType";
          const id2 = parseInt(objectId, 10);
          return new PostEditorAwareness(ydoc, kind, name, id2);
        },
        /**
         * Extract changes from a CRDT document that can be used to update the
         * local editor state.
         *
         * @param {import('@wordpress/sync').CRDTDoc}    crdtDoc
         * @param {import('@wordpress/sync').ObjectData} editedRecord
         * @return {Partial< import('@wordpress/sync').ObjectData >} Changes to record
         */
        getChangesFromCRDTDoc: (crdtDoc, editedRecord) => getPostChangesFromCRDTDoc(
          crdtDoc,
          editedRecord,
          syncedProperties
        ),
        /**
         * Extract changes from a CRDT document that can be used to update the
         * local editor state.
         *
         * @param {import('@wordpress/sync').ObjectData} record
         * @return {Partial< import('@wordpress/sync').ObjectData >} Changes to record
         */
        getPersistedCRDTDoc: (record) => {
          return record?.meta?.[POST_META_KEY_FOR_CRDT_DOC_PERSISTENCE] || null;
        }
      };
      return entity2;
    });
  }
  async function loadTaxonomyEntities() {
    const taxonomies = await (0, import_api_fetch2.default)({
      path: "/wp/v2/taxonomies?context=view"
    });
    return Object.entries(taxonomies ?? {}).map(([name, taxonomy]) => {
      const namespace = taxonomy?.rest_namespace ?? "wp/v2";
      const entity2 = {
        kind: "taxonomy",
        baseURL: `/${namespace}/${taxonomy.rest_base}`,
        baseURLParams: { context: "edit" },
        name,
        label: taxonomy.name,
        getTitle: (record) => record?.name,
        supportsPagination: true
      };
      entity2.syncConfig = defaultSyncConfig;
      return entity2;
    });
  }
  async function loadSiteEntity() {
    const entity2 = {
      label: (0, import_i18n.__)("Site"),
      name: "site",
      kind: "root",
      key: false,
      baseURL: "/wp/v2/settings",
      meta: {}
    };
    const site = await (0, import_api_fetch2.default)({
      path: entity2.baseURL,
      method: "OPTIONS"
    });
    const labels = {};
    Object.entries(site?.schema?.properties ?? {}).forEach(
      ([key, value]) => {
        if (typeof value === "object" && value.title) {
          labels[key] = value.title;
        }
      }
    );
    return [{ ...entity2, meta: { labels } }];
  }
  var getMethodName = (kind, name, prefix = "get") => {
    const kindPrefix = kind === "root" ? "" : pascalCase(kind);
    const suffix = pascalCase(name);
    return `${prefix}${kindPrefix}${suffix}`;
  };

  // packages/core-data/build-module/queried-data/reducer.mjs
  function getContextFromAction(action) {
    const { query } = action;
    if (!query) {
      return "default";
    }
    const queryParts = get_query_parts_default(query);
    return queryParts.context;
  }
  function getMergedItemIds(itemIds, nextItemIds, page, perPage) {
    const receivedAllIds = page === 1 && perPage === -1;
    if (receivedAllIds) {
      return nextItemIds;
    }
    const nextItemIdsStartIndex = (page - 1) * perPage;
    const size2 = Math.max(
      itemIds?.length ?? 0,
      nextItemIdsStartIndex + nextItemIds.length
    );
    const mergedItemIds = new Array(size2);
    for (let i = 0; i < size2; i++) {
      const isInNextItemsRange = i >= nextItemIdsStartIndex && i < nextItemIdsStartIndex + perPage;
      mergedItemIds[i] = isInNextItemsRange ? nextItemIds[i - nextItemIdsStartIndex] : itemIds?.[i];
    }
    return mergedItemIds;
  }
  function removeEntitiesById(entities2, ids) {
    return Object.fromEntries(
      Object.entries(entities2).filter(
        ([id2]) => !ids.some((itemId) => {
          if (Number.isInteger(itemId)) {
            return itemId === +id2;
          }
          return itemId === id2;
        })
      )
    );
  }
  function items(state = {}, action) {
    switch (action.type) {
      case "RECEIVE_ITEMS": {
        const context = getContextFromAction(action);
        const key = action.key || DEFAULT_ENTITY_KEY;
        const itemsList = Array.isArray(action.items) ? action.items : [action.items];
        return {
          ...state,
          [context]: {
            ...state[context],
            ...Object.fromEntries(
              itemsList.map((item) => [
                item?.[key],
                conservativeMapItem(
                  state?.[context]?.[item?.[key]],
                  item
                )
              ])
            )
          }
        };
      }
      case "REMOVE_ITEMS":
        return Object.fromEntries(
          Object.entries(state).map(([itemId, contextState]) => [
            itemId,
            removeEntitiesById(contextState, action.itemIds)
          ])
        );
    }
    return state;
  }
  function itemIsComplete(state = {}, action) {
    switch (action.type) {
      case "RECEIVE_ITEMS": {
        const context = getContextFromAction(action);
        const { query, key = DEFAULT_ENTITY_KEY } = action;
        const itemsList = Array.isArray(action.items) ? action.items : [action.items];
        const queryParts = query ? get_query_parts_default(query) : {};
        const isCompleteQuery = !query || !Array.isArray(queryParts.fields);
        return {
          ...state,
          [context]: {
            ...state[context],
            ...itemsList.reduce((result, item) => {
              const itemId = item?.[key];
              result[itemId] = state?.[context]?.[itemId] || isCompleteQuery;
              return result;
            }, {})
          }
        };
      }
      case "REMOVE_ITEMS":
        return Object.fromEntries(
          Object.entries(state).map(([itemId, contextState]) => [
            itemId,
            removeEntitiesById(contextState, action.itemIds)
          ])
        );
    }
    return state;
  }
  var receiveQueries = (0, import_compose.compose)([
    // Limit to matching action type so we don't attempt to replace action on
    // an unhandled action.
    if_matching_action_default((action) => "query" in action),
    // Inject query parts into action for use both in `onSubKey` and reducer.
    replace_action_default((action) => {
      if (action.query) {
        return {
          ...action,
          ...get_query_parts_default(action.query)
        };
      }
      return action;
    }),
    on_sub_key_default("context"),
    // Queries shape is shared, but keyed by query `stableKey` part. Original
    // reducer tracks only a single query object.
    on_sub_key_default("stableKey")
  ])((state = {}, action) => {
    if (action.type !== "RECEIVE_ITEMS") {
      return state;
    }
    if (!Array.isArray(action.items)) {
      return state;
    }
    const key = action.key ?? DEFAULT_ENTITY_KEY;
    return {
      itemIds: getMergedItemIds(
        state?.itemIds || [],
        action.items.map((item) => item?.[key]).filter(Boolean),
        action.page,
        action.perPage
      ),
      meta: action.meta
    };
  });
  var queries = (state = {}, action) => {
    switch (action.type) {
      case "RECEIVE_ITEMS":
        return receiveQueries(state, action);
      case "REMOVE_ITEMS":
        const removedItems = action.itemIds.reduce((result, itemId) => {
          result[itemId] = true;
          return result;
        }, {});
        return Object.fromEntries(
          Object.entries(state).map(
            ([queryGroup, contextQueries]) => [
              queryGroup,
              Object.fromEntries(
                Object.entries(contextQueries).map(
                  ([query, queryItems]) => [
                    query,
                    {
                      ...queryItems,
                      itemIds: queryItems.itemIds.filter(
                        (queryId) => !removedItems[queryId]
                      )
                    }
                  ]
                )
              )
            ]
          )
        );
      default:
        return state;
    }
  };
  var reducer_default = (0, import_data7.combineReducers)({
    items,
    itemIsComplete,
    queries
  });

  // packages/core-data/build-module/reducer.mjs
  function users(state = { byId: {}, queries: {} }, action) {
    switch (action.type) {
      case "RECEIVE_USER_QUERY":
        return {
          byId: {
            ...state.byId,
            // Key users by their ID.
            ...action.users.reduce(
              (newUsers, user) => ({
                ...newUsers,
                [user.id]: user
              }),
              {}
            )
          },
          queries: {
            ...state.queries,
            [action.queryID]: action.users.map((user) => user.id)
          }
        };
    }
    return state;
  }
  function currentUser(state = {}, action) {
    switch (action.type) {
      case "RECEIVE_CURRENT_USER":
        return action.currentUser;
    }
    return state;
  }
  function currentTheme(state = void 0, action) {
    switch (action.type) {
      case "RECEIVE_CURRENT_THEME":
        return action.currentTheme.stylesheet;
    }
    return state;
  }
  function currentGlobalStylesId(state = void 0, action) {
    switch (action.type) {
      case "RECEIVE_CURRENT_GLOBAL_STYLES_ID":
        return action.id;
    }
    return state;
  }
  function themeBaseGlobalStyles(state = {}, action) {
    switch (action.type) {
      case "RECEIVE_THEME_GLOBAL_STYLES":
        return {
          ...state,
          [action.stylesheet]: action.globalStyles
        };
    }
    return state;
  }
  function themeGlobalStyleVariations(state = {}, action) {
    switch (action.type) {
      case "RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS":
        return {
          ...state,
          [action.stylesheet]: action.variations
        };
    }
    return state;
  }
  var withMultiEntityRecordEdits = (reducer) => (state, action) => {
    if (action.type === "UNDO" || action.type === "REDO") {
      const { record } = action;
      let newState = state;
      record.forEach(({ id: { kind, name, recordId }, changes }) => {
        newState = reducer(newState, {
          type: "EDIT_ENTITY_RECORD",
          kind,
          name,
          recordId,
          edits: Object.entries(changes).reduce(
            (acc, [key, value]) => {
              acc[key] = action.type === "UNDO" ? value.from : value.to;
              return acc;
            },
            {}
          )
        });
      });
      return newState;
    }
    return reducer(state, action);
  };
  function entity(entityConfig) {
    return (0, import_compose2.compose)([
      withMultiEntityRecordEdits,
      // Limit to matching action type so we don't attempt to replace action on
      // an unhandled action.
      if_matching_action_default(
        (action) => action.name && action.kind && action.name === entityConfig.name && action.kind === entityConfig.kind
      ),
      // Inject the entity config into the action.
      replace_action_default((action) => {
        return {
          key: entityConfig.key || DEFAULT_ENTITY_KEY,
          ...action
        };
      })
    ])(
      (0, import_data8.combineReducers)({
        queriedData: reducer_default,
        edits: (state = {}, action) => {
          switch (action.type) {
            case "RECEIVE_ITEMS":
              const context = action?.query?.context ?? "default";
              if (context !== "default") {
                return state;
              }
              const nextState = { ...state };
              const itemsList = Array.isArray(action.items) ? action.items : [action.items];
              for (const record of itemsList) {
                const recordId = record?.[action.key];
                const edits = nextState[recordId];
                if (!edits) {
                  continue;
                }
                const nextEdits2 = Object.keys(edits).reduce(
                  (acc, key) => {
                    if (
                      // Edits are the "raw" attribute values, but records may have
                      // objects with more properties, so we use `get` here for the
                      // comparison.
                      !(0, import_es66.default)(
                        edits[key],
                        record[key]?.raw ?? record[key]
                      ) && // Sometimes the server alters the sent value which means
                      // we need to also remove the edits before the api request.
                      (!action.persistedEdits || !(0, import_es66.default)(
                        edits[key],
                        action.persistedEdits[key]
                      ))
                    ) {
                      acc[key] = edits[key];
                    }
                    return acc;
                  },
                  {}
                );
                if (Object.keys(nextEdits2).length) {
                  nextState[recordId] = nextEdits2;
                } else {
                  delete nextState[recordId];
                }
              }
              return nextState;
            case "EDIT_ENTITY_RECORD":
              const nextEdits = {
                ...state[action.recordId],
                ...action.edits
              };
              Object.keys(nextEdits).forEach((key) => {
                if (nextEdits[key] === void 0) {
                  delete nextEdits[key];
                }
              });
              return {
                ...state,
                [action.recordId]: nextEdits
              };
          }
          return state;
        },
        saving: (state = {}, action) => {
          switch (action.type) {
            case "SAVE_ENTITY_RECORD_START":
            case "SAVE_ENTITY_RECORD_FINISH":
              return {
                ...state,
                [action.recordId]: {
                  pending: action.type === "SAVE_ENTITY_RECORD_START",
                  error: action.error,
                  isAutosave: action.isAutosave
                }
              };
          }
          return state;
        },
        deleting: (state = {}, action) => {
          switch (action.type) {
            case "DELETE_ENTITY_RECORD_START":
            case "DELETE_ENTITY_RECORD_FINISH":
              return {
                ...state,
                [action.recordId]: {
                  pending: action.type === "DELETE_ENTITY_RECORD_START",
                  error: action.error
                }
              };
          }
          return state;
        },
        revisions: (state = {}, action) => {
          if (action.type === "RECEIVE_ITEM_REVISIONS") {
            const recordKey = action.recordKey;
            delete action.recordKey;
            const newState = reducer_default(state[recordKey], {
              ...action,
              type: "RECEIVE_ITEMS"
            });
            return {
              ...state,
              [recordKey]: newState
            };
          }
          if (action.type === "REMOVE_ITEMS") {
            return Object.fromEntries(
              Object.entries(state).filter(
                ([id2]) => !action.itemIds.some((itemId) => {
                  if (Number.isInteger(itemId)) {
                    return itemId === +id2;
                  }
                  return itemId === id2;
                })
              )
            );
          }
          return state;
        }
      })
    );
  }
  function entitiesConfig(state = rootEntitiesConfig, action) {
    switch (action.type) {
      case "ADD_ENTITIES":
        return [...state, ...action.entities];
    }
    return state;
  }
  var entities = (state = {}, action) => {
    const newConfig = entitiesConfig(state.config, action);
    let entitiesDataReducer = state.reducer;
    if (!entitiesDataReducer || newConfig !== state.config) {
      const entitiesByKind = newConfig.reduce((acc, record) => {
        const { kind } = record;
        if (!acc[kind]) {
          acc[kind] = [];
        }
        acc[kind].push(record);
        return acc;
      }, {});
      entitiesDataReducer = (0, import_data8.combineReducers)(
        Object.fromEntries(
          Object.entries(entitiesByKind).map(
            ([kind, subEntities]) => {
              const kindReducer = (0, import_data8.combineReducers)(
                Object.fromEntries(
                  subEntities.map((entityConfig) => [
                    entityConfig.name,
                    entity(entityConfig)
                  ])
                )
              );
              return [kind, kindReducer];
            }
          )
        )
      );
    }
    const newData = entitiesDataReducer(state.records, action);
    if (newData === state.records && newConfig === state.config && entitiesDataReducer === state.reducer) {
      return state;
    }
    return {
      reducer: entitiesDataReducer,
      records: newData,
      config: newConfig
    };
  };
  function undoManager(state = (0, import_undo_manager2.createUndoManager)()) {
    return state;
  }
  function editsReference(state = {}, action) {
    switch (action.type) {
      case "EDIT_ENTITY_RECORD":
      case "UNDO":
      case "REDO":
        return {};
    }
    return state;
  }
  function embedPreviews(state = {}, action) {
    switch (action.type) {
      case "RECEIVE_EMBED_PREVIEW":
        const { url, preview } = action;
        return {
          ...state,
          [url]: preview
        };
    }
    return state;
  }
  function userPermissions(state = {}, action) {
    switch (action.type) {
      case "RECEIVE_USER_PERMISSION":
        return {
          ...state,
          [action.key]: action.isAllowed
        };
      case "RECEIVE_USER_PERMISSIONS":
        return {
          ...state,
          ...action.permissions
        };
    }
    return state;
  }
  function autosaves(state = {}, action) {
    switch (action.type) {
      case "RECEIVE_AUTOSAVES":
        const { postId, autosaves: autosavesData } = action;
        return {
          ...state,
          [postId]: autosavesData
        };
    }
    return state;
  }
  function blockPatterns(state = [], action) {
    switch (action.type) {
      case "RECEIVE_BLOCK_PATTERNS":
        return action.patterns;
    }
    return state;
  }
  function blockPatternCategories(state = [], action) {
    switch (action.type) {
      case "RECEIVE_BLOCK_PATTERN_CATEGORIES":
        return action.categories;
    }
    return state;
  }
  function userPatternCategories(state = [], action) {
    switch (action.type) {
      case "RECEIVE_USER_PATTERN_CATEGORIES":
        return action.patternCategories;
    }
    return state;
  }
  function navigationFallbackId(state = null, action) {
    switch (action.type) {
      case "RECEIVE_NAVIGATION_FALLBACK_ID":
        return action.fallbackId;
    }
    return state;
  }
  function themeGlobalStyleRevisions(state = {}, action) {
    switch (action.type) {
      case "RECEIVE_THEME_GLOBAL_STYLE_REVISIONS":
        return {
          ...state,
          [action.currentId]: action.revisions
        };
    }
    return state;
  }
  function defaultTemplates(state = {}, action) {
    switch (action.type) {
      case "RECEIVE_DEFAULT_TEMPLATE":
        return {
          ...state,
          [JSON.stringify(action.query)]: action.templateId
        };
    }
    return state;
  }
  function registeredPostMeta(state = {}, action) {
    switch (action.type) {
      case "RECEIVE_REGISTERED_POST_META":
        return {
          ...state,
          [action.postType]: action.registeredPostMeta
        };
    }
    return state;
  }
  function editorSettings(state = null, action) {
    switch (action.type) {
      case "RECEIVE_EDITOR_SETTINGS":
        return action.settings;
    }
    return state;
  }
  function editorAssets(state = null, action) {
    switch (action.type) {
      case "RECEIVE_EDITOR_ASSETS":
        return action.assets;
    }
    return state;
  }
  function syncConnectionStatuses(state = {}, action) {
    switch (action.type) {
      case "SET_SYNC_CONNECTION_STATUS": {
        const key = `${action.kind}/${action.name}:${action.key}`;
        return {
          ...state,
          [key]: action.status
        };
      }
      case "CLEAR_SYNC_CONNECTION_STATUS": {
        const key = `${action.kind}/${action.name}:${action.key}`;
        const { [key]: _, ...rest } = state;
        return rest;
      }
    }
    return state;
  }
  function collaborationSupported(state = true, action) {
    switch (action.type) {
      case "SET_COLLABORATION_SUPPORTED":
        return action.supported;
      case "SET_SYNC_CONNECTION_STATUS":
        if (ConnectionErrorCode2.DOCUMENT_SIZE_LIMIT_EXCEEDED === action.status?.error?.code) {
          return false;
        }
        return state;
    }
    return state;
  }
  var reducer_default2 = (0, import_data8.combineReducers)({
    users,
    currentTheme,
    currentGlobalStylesId,
    currentUser,
    themeGlobalStyleVariations,
    themeBaseGlobalStyles,
    themeGlobalStyleRevisions,
    entities,
    editsReference,
    undoManager,
    embedPreviews,
    userPermissions,
    autosaves,
    blockPatterns,
    blockPatternCategories,
    userPatternCategories,
    navigationFallbackId,
    defaultTemplates,
    registeredPostMeta,
    editorSettings,
    editorAssets,
    syncConnectionStatuses,
    collaborationSupported
  });

  // packages/core-data/build-module/selectors.mjs
  var selectors_exports = {};
  __export(selectors_exports, {
    __experimentalGetCurrentGlobalStylesId: () => __experimentalGetCurrentGlobalStylesId,
    __experimentalGetCurrentThemeBaseGlobalStyles: () => __experimentalGetCurrentThemeBaseGlobalStyles,
    __experimentalGetCurrentThemeGlobalStylesVariations: () => __experimentalGetCurrentThemeGlobalStylesVariations,
    __experimentalGetDirtyEntityRecords: () => __experimentalGetDirtyEntityRecords,
    __experimentalGetEntitiesBeingSaved: () => __experimentalGetEntitiesBeingSaved,
    __experimentalGetEntityRecordNoResolver: () => __experimentalGetEntityRecordNoResolver,
    canUser: () => canUser,
    canUserEditEntityRecord: () => canUserEditEntityRecord,
    getAuthors: () => getAuthors,
    getAutosave: () => getAutosave,
    getAutosaves: () => getAutosaves,
    getBlockPatternCategories: () => getBlockPatternCategories,
    getBlockPatterns: () => getBlockPatterns,
    getCurrentTheme: () => getCurrentTheme,
    getCurrentThemeGlobalStylesRevisions: () => getCurrentThemeGlobalStylesRevisions,
    getCurrentUser: () => getCurrentUser,
    getDefaultTemplateId: () => getDefaultTemplateId,
    getEditedEntityRecord: () => getEditedEntityRecord,
    getEmbedPreview: () => getEmbedPreview,
    getEntitiesByKind: () => getEntitiesByKind,
    getEntitiesConfig: () => getEntitiesConfig,
    getEntity: () => getEntity,
    getEntityConfig: () => getEntityConfig,
    getEntityRecord: () => getEntityRecord,
    getEntityRecordEdits: () => getEntityRecordEdits,
    getEntityRecordNonTransientEdits: () => getEntityRecordNonTransientEdits,
    getEntityRecords: () => getEntityRecords,
    getEntityRecordsTotalItems: () => getEntityRecordsTotalItems,
    getEntityRecordsTotalPages: () => getEntityRecordsTotalPages,
    getLastEntityDeleteError: () => getLastEntityDeleteError,
    getLastEntitySaveError: () => getLastEntitySaveError,
    getRawEntityRecord: () => getRawEntityRecord,
    getRedoEdit: () => getRedoEdit,
    getReferenceByDistinctEdits: () => getReferenceByDistinctEdits,
    getRevision: () => getRevision,
    getRevisions: () => getRevisions,
    getThemeSupports: () => getThemeSupports,
    getUndoEdit: () => getUndoEdit,
    getUserPatternCategories: () => getUserPatternCategories,
    getUserQueryResults: () => getUserQueryResults,
    hasEditsForEntityRecord: () => hasEditsForEntityRecord,
    hasEntityRecord: () => hasEntityRecord,
    hasEntityRecords: () => hasEntityRecords,
    hasFetchedAutosaves: () => hasFetchedAutosaves,
    hasRedo: () => hasRedo,
    hasUndo: () => hasUndo,
    isAutosavingEntityRecord: () => isAutosavingEntityRecord,
    isDeletingEntityRecord: () => isDeletingEntityRecord,
    isPreviewEmbedFallback: () => isPreviewEmbedFallback,
    isRequestingEmbedPreview: () => isRequestingEmbedPreview,
    isSavingEntityRecord: () => isSavingEntityRecord
  });
  var import_data10 = __toESM(require_data(), 1);
  var import_url2 = __toESM(require_url(), 1);
  var import_deprecated2 = __toESM(require_deprecated(), 1);

  // packages/core-data/build-module/private-selectors.mjs
  var private_selectors_exports = {};
  __export(private_selectors_exports, {
    getBlockPatternsForPostType: () => getBlockPatternsForPostType,
    getEditorAssets: () => getEditorAssets,
    getEditorSettings: () => getEditorSettings,
    getEntityRecordPermissions: () => getEntityRecordPermissions,
    getEntityRecordsPermissions: () => getEntityRecordsPermissions,
    getHomePage: () => getHomePage,
    getNavigationFallbackId: () => getNavigationFallbackId,
    getPostsPageId: () => getPostsPageId,
    getRegisteredPostMeta: () => getRegisteredPostMeta,
    getSyncConnectionStatus: () => getSyncConnectionStatus,
    getTemplateId: () => getTemplateId,
    getUndoManager: () => getUndoManager,
    isCollaborationSupported: () => isCollaborationSupported
  });
  var import_data9 = __toESM(require_data(), 1);

  // packages/core-data/build-module/utils/log-entity-deprecation.mjs
  var import_deprecated = __toESM(require_deprecated(), 1);
  var loggedAlready = false;
  function logEntityDeprecation(kind, name, functionName, {
    alternativeFunctionName,
    isShorthandSelector = false
  } = {}) {
    const deprecation = deprecatedEntities[kind]?.[name];
    if (!deprecation) {
      return;
    }
    if (!loggedAlready) {
      const { alternative } = deprecation;
      const message = isShorthandSelector ? `'${functionName}'` : `The '${kind}', '${name}' entity (used via '${functionName}')`;
      let alternativeMessage = `the '${alternative.kind}', '${alternative.name}' entity`;
      if (alternativeFunctionName) {
        alternativeMessage += ` via the '${alternativeFunctionName}' function`;
      }
      (0, import_deprecated.default)(message, {
        ...deprecation,
        alternative: alternativeMessage
      });
    }
    loggedAlready = true;
    setTimeout(() => {
      loggedAlready = false;
    }, 0);
  }

  // packages/core-data/build-module/private-selectors.mjs
  function getUndoManager(state) {
    return getSyncManager()?.undoManager ?? state.undoManager;
  }
  function getNavigationFallbackId(state) {
    return state.navigationFallbackId;
  }
  var getBlockPatternsForPostType = (0, import_data9.createRegistrySelector)(
    (select5) => (0, import_data9.createSelector)(
      (state, postType) => select5(STORE_NAME).getBlockPatterns().filter(
        ({ postTypes }) => !postTypes || Array.isArray(postTypes) && postTypes.includes(postType)
      ),
      () => [select5(STORE_NAME).getBlockPatterns()]
    )
  );
  var getEntityRecordsPermissions = (0, import_data9.createRegistrySelector)(
    (select5) => (0, import_data9.createSelector)(
      (state, kind, name, ids) => {
        const normalizedIds = Array.isArray(ids) ? ids : [ids];
        return normalizedIds.map((id2) => ({
          delete: select5(STORE_NAME).canUser("delete", {
            kind,
            name,
            id: id2
          }),
          update: select5(STORE_NAME).canUser("update", {
            kind,
            name,
            id: id2
          })
        }));
      },
      (state) => [state.userPermissions]
    )
  );
  function getEntityRecordPermissions(state, kind, name, id2) {
    logEntityDeprecation(kind, name, "getEntityRecordPermissions");
    return getEntityRecordsPermissions(state, kind, name, id2)[0];
  }
  function getRegisteredPostMeta(state, postType) {
    return state.registeredPostMeta?.[postType] ?? {};
  }
  function normalizePageId(value) {
    if (!value || !["number", "string"].includes(typeof value)) {
      return null;
    }
    if (Number(value) === 0) {
      return null;
    }
    return value.toString();
  }
  var getHomePage = (0, import_data9.createRegistrySelector)(
    (select5) => (0, import_data9.createSelector)(
      () => {
        const siteData = select5(STORE_NAME).getEntityRecord(
          "root",
          "__unstableBase"
        );
        if (!siteData) {
          return null;
        }
        const homepageId = siteData?.show_on_front === "page" ? normalizePageId(siteData.page_on_front) : null;
        if (homepageId) {
          return { postType: "page", postId: homepageId };
        }
        const frontPageTemplateId = select5(
          STORE_NAME
        ).getDefaultTemplateId({
          slug: "front-page"
        });
        if (!frontPageTemplateId) {
          return null;
        }
        return { postType: "wp_template", postId: frontPageTemplateId };
      },
      (state) => [
        // Even though getDefaultTemplateId.shouldInvalidate returns true when root/site changes,
        // it doesn't seem to invalidate this cache, I'm not sure why.
        getEntityRecord(state, "root", "site"),
        getEntityRecord(state, "root", "__unstableBase"),
        getDefaultTemplateId(state, {
          slug: "front-page"
        })
      ]
    )
  );
  var getPostsPageId = (0, import_data9.createRegistrySelector)((select5) => () => {
    const siteData = select5(STORE_NAME).getEntityRecord(
      "root",
      "__unstableBase"
    );
    return siteData?.show_on_front === "page" ? normalizePageId(siteData.page_for_posts) : null;
  });
  var getTemplateId = (0, import_data9.createRegistrySelector)(
    (select5) => (state, postType, postId) => {
      const homepage = unlock2(select5(STORE_NAME)).getHomePage();
      if (!homepage) {
        return;
      }
      if (postType === "page" && postType === homepage?.postType && postId.toString() === homepage?.postId) {
        const templates = select5(STORE_NAME).getEntityRecords(
          "postType",
          "wp_template",
          {
            per_page: -1
          }
        );
        if (!templates) {
          return;
        }
        const id2 = templates.find(({ slug }) => slug === "front-page")?.id;
        if (id2) {
          return id2;
        }
      }
      const editedEntity = select5(STORE_NAME).getEditedEntityRecord(
        "postType",
        postType,
        postId
      );
      if (!editedEntity) {
        return;
      }
      const postsPageId = unlock2(select5(STORE_NAME)).getPostsPageId();
      if (postType === "page" && postsPageId === postId.toString()) {
        return select5(STORE_NAME).getDefaultTemplateId({
          slug: "home"
        });
      }
      const currentTemplateSlug = editedEntity.template;
      if (currentTemplateSlug) {
        const currentTemplate = select5(STORE_NAME).getEntityRecords("postType", "wp_template", {
          per_page: -1
        })?.find(({ slug }) => slug === currentTemplateSlug);
        if (currentTemplate) {
          return currentTemplate.id;
        }
      }
      let slugToCheck;
      if (editedEntity.slug) {
        slugToCheck = postType === "page" ? `${postType}-${editedEntity.slug}` : `single-${postType}-${editedEntity.slug}`;
      } else {
        slugToCheck = postType === "page" ? "page" : `single-${postType}`;
      }
      return select5(STORE_NAME).getDefaultTemplateId({
        slug: slugToCheck
      });
    }
  );
  function getEditorSettings(state) {
    return state.editorSettings;
  }
  function getEditorAssets(state) {
    return state.editorAssets;
  }
  function isCollaborationSupported(state) {
    return state.collaborationSupported;
  }
  function getSyncConnectionStatus(state) {
    if (!state.syncConnectionStatuses) {
      return void 0;
    }
    const PRIORITIZED_STATUSES = ["disconnected", "connecting", "connected"];
    let coalesced;
    for (const status of Object.values(state.syncConnectionStatuses)) {
      if (!coalesced || PRIORITIZED_STATUSES.indexOf(status.status) < PRIORITIZED_STATUSES.indexOf(coalesced.status)) {
        coalesced = status;
      }
    }
    return coalesced;
  }

  // packages/core-data/build-module/selectors.mjs
  var EMPTY_OBJECT = {};
  var isRequestingEmbedPreview = (0, import_data10.createRegistrySelector)(
    (select5) => (state, url) => {
      return select5(STORE_NAME).isResolving("getEmbedPreview", [
        url
      ]);
    }
  );
  function getAuthors(state, query) {
    (0, import_deprecated2.default)("select( 'core' ).getAuthors()", {
      since: "5.9",
      alternative: "select( 'core' ).getUsers({ who: 'authors' })"
    });
    const path = (0, import_url2.addQueryArgs)(
      "/wp/v2/users/?who=authors&per_page=100",
      query
    );
    return getUserQueryResults(state, path);
  }
  function getCurrentUser(state) {
    return state.currentUser;
  }
  var getUserQueryResults = (0, import_data10.createSelector)(
    (state, queryID) => {
      const queryResults = state.users.queries[queryID] ?? [];
      return queryResults.map((id2) => state.users.byId[id2]);
    },
    (state, queryID) => [
      state.users.queries[queryID],
      state.users.byId
    ]
  );
  function getEntitiesByKind(state, kind) {
    (0, import_deprecated2.default)("wp.data.select( 'core' ).getEntitiesByKind()", {
      since: "6.0",
      alternative: "wp.data.select( 'core' ).getEntitiesConfig()"
    });
    return getEntitiesConfig(state, kind);
  }
  var getEntitiesConfig = (0, import_data10.createSelector)(
    (state, kind) => state.entities.config.filter((entity2) => entity2.kind === kind),
    /* eslint-disable @typescript-eslint/no-unused-vars */
    (state, kind) => state.entities.config
    /* eslint-enable @typescript-eslint/no-unused-vars */
  );
  function getEntity(state, kind, name) {
    (0, import_deprecated2.default)("wp.data.select( 'core' ).getEntity()", {
      since: "6.0",
      alternative: "wp.data.select( 'core' ).getEntityConfig()"
    });
    return getEntityConfig(state, kind, name);
  }
  function getEntityConfig(state, kind, name) {
    logEntityDeprecation(kind, name, "getEntityConfig");
    return state.entities.config?.find(
      (config) => config.kind === kind && config.name === name
    );
  }
  var getEntityRecord = (0, import_data10.createSelector)(
    ((state, kind, name, key, query) => {
      logEntityDeprecation(kind, name, "getEntityRecord");
      const queriedState = state.entities.records?.[kind]?.[name]?.queriedData;
      if (!queriedState) {
        return void 0;
      }
      const context = query?.context ?? "default";
      if (!query || !query._fields) {
        if (!queriedState.itemIsComplete[context]?.[key]) {
          return void 0;
        }
        return queriedState.items[context][key];
      }
      const item = queriedState.items[context]?.[key];
      if (!item) {
        return item;
      }
      const filteredItem = {};
      const fields = get_normalized_comma_separable_default(query._fields) ?? [];
      for (let f = 0; f < fields.length; f++) {
        const field = fields[f].split(".");
        let value = item;
        field.forEach((fieldName) => {
          value = value?.[fieldName];
        });
        setNestedValue(filteredItem, field, value);
      }
      return filteredItem;
    }),
    (state, kind, name, recordId, query) => {
      const context = query?.context ?? "default";
      const queriedState = state.entities.records?.[kind]?.[name]?.queriedData;
      return [
        queriedState?.items[context]?.[recordId],
        queriedState?.itemIsComplete[context]?.[recordId]
      ];
    }
  );
  getEntityRecord.__unstableNormalizeArgs = (args2) => {
    const newArgs = [...args2];
    const recordKey = newArgs?.[2];
    newArgs[2] = isNumericID(recordKey) ? Number(recordKey) : recordKey;
    return newArgs;
  };
  function hasEntityRecord(state, kind, name, key, query) {
    const queriedState = state.entities.records?.[kind]?.[name]?.queriedData;
    if (!queriedState) {
      return false;
    }
    const context = query?.context ?? "default";
    if (!query || !query._fields) {
      return !!queriedState.itemIsComplete[context]?.[key];
    }
    const item = queriedState.items[context]?.[key];
    if (!item) {
      return false;
    }
    const fields = get_normalized_comma_separable_default(query._fields) ?? [];
    for (let i = 0; i < fields.length; i++) {
      const path = fields[i].split(".");
      let value = item;
      for (let p = 0; p < path.length; p++) {
        const part = path[p];
        if (!value || !Object.hasOwn(value, part)) {
          return false;
        }
        value = value[part];
      }
    }
    return true;
  }
  function __experimentalGetEntityRecordNoResolver(state, kind, name, key) {
    return getEntityRecord(state, kind, name, key);
  }
  var getRawEntityRecord = (0, import_data10.createSelector)(
    (state, kind, name, key) => {
      logEntityDeprecation(kind, name, "getRawEntityRecord");
      const record = getEntityRecord(
        state,
        kind,
        name,
        key
      );
      return record && Object.keys(record).reduce((accumulator, _key) => {
        if (isRawAttribute(getEntityConfig(state, kind, name), _key)) {
          accumulator[_key] = record[_key]?.raw !== void 0 ? record[_key]?.raw : record[_key];
        } else {
          accumulator[_key] = record[_key];
        }
        return accumulator;
      }, {});
    },
    (state, kind, name, recordId, query) => {
      const context = query?.context ?? "default";
      return [
        state.entities.config,
        state.entities.records?.[kind]?.[name]?.queriedData?.items[context]?.[recordId],
        state.entities.records?.[kind]?.[name]?.queriedData?.itemIsComplete[context]?.[recordId]
      ];
    }
  );
  function hasEntityRecords(state, kind, name, query) {
    logEntityDeprecation(kind, name, "hasEntityRecords");
    return Array.isArray(getEntityRecords(state, kind, name, query));
  }
  var getEntityRecords = ((state, kind, name, query) => {
    logEntityDeprecation(kind, name, "getEntityRecords");
    const queriedState = state.entities.records?.[kind]?.[name]?.queriedData;
    if (!queriedState) {
      return null;
    }
    return getQueriedItems(queriedState, query);
  });
  var getEntityRecordsTotalItems = (state, kind, name, query) => {
    logEntityDeprecation(kind, name, "getEntityRecordsTotalItems");
    const queriedState = state.entities.records?.[kind]?.[name]?.queriedData;
    if (!queriedState) {
      return null;
    }
    return getQueriedTotalItems(queriedState, query);
  };
  var getEntityRecordsTotalPages = (state, kind, name, query) => {
    logEntityDeprecation(kind, name, "getEntityRecordsTotalPages");
    const queriedState = state.entities.records?.[kind]?.[name]?.queriedData;
    if (!queriedState) {
      return null;
    }
    if (query?.per_page === -1) {
      return 1;
    }
    const totalItems = getQueriedTotalItems(queriedState, query);
    if (!totalItems) {
      return totalItems;
    }
    if (!query?.per_page) {
      return getQueriedTotalPages(queriedState, query);
    }
    return Math.ceil(totalItems / query.per_page);
  };
  var __experimentalGetDirtyEntityRecords = (0, import_data10.createSelector)(
    (state) => {
      const {
        entities: { records }
      } = state;
      const dirtyRecords = [];
      Object.keys(records).forEach((kind) => {
        Object.keys(records[kind]).forEach((name) => {
          const primaryKeys = Object.keys(records[kind][name].edits).filter(
            (primaryKey) => (
              // The entity record must exist (not be deleted),
              // and it must have edits.
              getEntityRecord(state, kind, name, primaryKey) && hasEditsForEntityRecord(state, kind, name, primaryKey)
            )
          );
          if (primaryKeys.length) {
            const entityConfig = getEntityConfig(state, kind, name);
            primaryKeys.forEach((primaryKey) => {
              const entityRecord = getEditedEntityRecord(
                state,
                kind,
                name,
                primaryKey
              );
              dirtyRecords.push({
                // We avoid using primaryKey because it's transformed into a string
                // when it's used as an object key.
                key: entityRecord ? entityRecord[entityConfig.key || DEFAULT_ENTITY_KEY] : void 0,
                title: entityConfig?.getTitle?.(entityRecord) || "",
                name,
                kind
              });
            });
          }
        });
      });
      return dirtyRecords;
    },
    (state) => [state.entities.records]
  );
  var __experimentalGetEntitiesBeingSaved = (0, import_data10.createSelector)(
    (state) => {
      const {
        entities: { records }
      } = state;
      const recordsBeingSaved = [];
      Object.keys(records).forEach((kind) => {
        Object.keys(records[kind]).forEach((name) => {
          const primaryKeys = Object.keys(records[kind][name].saving).filter(
            (primaryKey) => isSavingEntityRecord(state, kind, name, primaryKey)
          );
          if (primaryKeys.length) {
            const entityConfig = getEntityConfig(state, kind, name);
            primaryKeys.forEach((primaryKey) => {
              const entityRecord = getEditedEntityRecord(
                state,
                kind,
                name,
                primaryKey
              );
              recordsBeingSaved.push({
                // We avoid using primaryKey because it's transformed into a string
                // when it's used as an object key.
                key: entityRecord ? entityRecord[entityConfig.key || DEFAULT_ENTITY_KEY] : void 0,
                title: entityConfig?.getTitle?.(entityRecord) || "",
                name,
                kind
              });
            });
          }
        });
      });
      return recordsBeingSaved;
    },
    (state) => [state.entities.records]
  );
  function getEntityRecordEdits(state, kind, name, recordId) {
    logEntityDeprecation(kind, name, "getEntityRecordEdits");
    return state.entities.records?.[kind]?.[name]?.edits?.[recordId];
  }
  var getEntityRecordNonTransientEdits = (0, import_data10.createSelector)(
    (state, kind, name, recordId) => {
      logEntityDeprecation(kind, name, "getEntityRecordNonTransientEdits");
      const { transientEdits } = getEntityConfig(state, kind, name) || {};
      const edits = getEntityRecordEdits(state, kind, name, recordId) || {};
      if (!transientEdits) {
        return edits;
      }
      return Object.keys(edits).reduce((acc, key) => {
        if (!transientEdits[key]) {
          acc[key] = edits[key];
        }
        return acc;
      }, {});
    },
    (state, kind, name, recordId) => [
      state.entities.config,
      state.entities.records?.[kind]?.[name]?.edits?.[recordId]
    ]
  );
  function hasEditsForEntityRecord(state, kind, name, recordId) {
    logEntityDeprecation(kind, name, "hasEditsForEntityRecord");
    return isSavingEntityRecord(state, kind, name, recordId) || Object.keys(
      getEntityRecordNonTransientEdits(state, kind, name, recordId)
    ).length > 0;
  }
  var getEditedEntityRecord = (0, import_data10.createSelector)(
    (state, kind, name, recordId) => {
      logEntityDeprecation(kind, name, "getEditedEntityRecord");
      const raw = getRawEntityRecord(state, kind, name, recordId);
      const edited = getEntityRecordEdits(state, kind, name, recordId);
      if (!raw && !edited) {
        return false;
      }
      return {
        ...raw,
        ...edited
      };
    },
    (state, kind, name, recordId, query) => {
      const context = query?.context ?? "default";
      return [
        state.entities.config,
        state.entities.records?.[kind]?.[name]?.queriedData.items[context]?.[recordId],
        state.entities.records?.[kind]?.[name]?.queriedData.itemIsComplete[context]?.[recordId],
        state.entities.records?.[kind]?.[name]?.edits?.[recordId]
      ];
    }
  );
  function isAutosavingEntityRecord(state, kind, name, recordId) {
    logEntityDeprecation(kind, name, "isAutosavingEntityRecord");
    const { pending, isAutosave } = state.entities.records?.[kind]?.[name]?.saving?.[recordId] ?? {};
    return Boolean(pending && isAutosave);
  }
  function isSavingEntityRecord(state, kind, name, recordId) {
    logEntityDeprecation(kind, name, "isSavingEntityRecord");
    return state.entities.records?.[kind]?.[name]?.saving?.[recordId]?.pending ?? false;
  }
  function isDeletingEntityRecord(state, kind, name, recordId) {
    logEntityDeprecation(kind, name, "isDeletingEntityRecord");
    return state.entities.records?.[kind]?.[name]?.deleting?.[recordId]?.pending ?? false;
  }
  function getLastEntitySaveError(state, kind, name, recordId) {
    logEntityDeprecation(kind, name, "getLastEntitySaveError");
    return state.entities.records?.[kind]?.[name]?.saving?.[recordId]?.error;
  }
  function getLastEntityDeleteError(state, kind, name, recordId) {
    logEntityDeprecation(kind, name, "getLastEntityDeleteError");
    return state.entities.records?.[kind]?.[name]?.deleting?.[recordId]?.error;
  }
  function getUndoEdit(state) {
    (0, import_deprecated2.default)("select( 'core' ).getUndoEdit()", {
      since: "6.3"
    });
    return void 0;
  }
  function getRedoEdit(state) {
    (0, import_deprecated2.default)("select( 'core' ).getRedoEdit()", {
      since: "6.3"
    });
    return void 0;
  }
  function hasUndo(state) {
    return getUndoManager(state).hasUndo();
  }
  function hasRedo(state) {
    return getUndoManager(state).hasRedo();
  }
  function getCurrentTheme(state) {
    if (!state.currentTheme) {
      return null;
    }
    return getEntityRecord(state, "root", "theme", state.currentTheme);
  }
  function __experimentalGetCurrentGlobalStylesId(state) {
    return state.currentGlobalStylesId;
  }
  function getThemeSupports(state) {
    return getCurrentTheme(state)?.theme_supports ?? EMPTY_OBJECT;
  }
  function getEmbedPreview(state, url) {
    return state.embedPreviews[url];
  }
  function isPreviewEmbedFallback(state, url) {
    const preview = state.embedPreviews[url];
    const oEmbedLinkCheck = '<a href="' + url + '">' + url + "</a>";
    if (!preview) {
      return false;
    }
    return preview.html === oEmbedLinkCheck;
  }
  function canUser(state, action, resource, id2) {
    const isEntity = typeof resource === "object";
    if (isEntity && (!resource.kind || !resource.name)) {
      return false;
    }
    if (isEntity) {
      logEntityDeprecation(resource.kind, resource.name, "canUser");
    }
    const key = getUserPermissionCacheKey(action, resource, id2);
    return state.userPermissions[key];
  }
  function canUserEditEntityRecord(state, kind, name, recordId) {
    (0, import_deprecated2.default)(`wp.data.select( 'core' ).canUserEditEntityRecord()`, {
      since: "6.7",
      alternative: `wp.data.select( 'core' ).canUser( 'update', { kind, name, id } )`
    });
    return canUser(state, "update", { kind, name, id: recordId });
  }
  function getAutosaves(state, postType, postId) {
    return state.autosaves[postId];
  }
  function getAutosave(state, postType, postId, authorId) {
    if (authorId === void 0) {
      return;
    }
    const autosaves2 = state.autosaves[postId];
    return autosaves2?.find(
      (autosave) => autosave.author === authorId
    );
  }
  var hasFetchedAutosaves = (0, import_data10.createRegistrySelector)(
    (select5) => (state, postType, postId) => {
      return select5(STORE_NAME).hasFinishedResolution("getAutosaves", [
        postType,
        postId
      ]);
    }
  );
  function getReferenceByDistinctEdits(state) {
    return state.editsReference;
  }
  function __experimentalGetCurrentThemeBaseGlobalStyles(state) {
    const currentTheme2 = getCurrentTheme(state);
    if (!currentTheme2) {
      return null;
    }
    return state.themeBaseGlobalStyles[currentTheme2.stylesheet];
  }
  function __experimentalGetCurrentThemeGlobalStylesVariations(state) {
    const currentTheme2 = getCurrentTheme(state);
    if (!currentTheme2) {
      return null;
    }
    return state.themeGlobalStyleVariations[currentTheme2.stylesheet];
  }
  function getBlockPatterns(state) {
    return state.blockPatterns;
  }
  function getBlockPatternCategories(state) {
    return state.blockPatternCategories;
  }
  function getUserPatternCategories(state) {
    return state.userPatternCategories;
  }
  function getCurrentThemeGlobalStylesRevisions(state) {
    (0, import_deprecated2.default)("select( 'core' ).getCurrentThemeGlobalStylesRevisions()", {
      since: "6.5.0",
      alternative: "select( 'core' ).getRevisions( 'root', 'globalStyles', ${ recordKey } )"
    });
    const currentGlobalStylesId2 = __experimentalGetCurrentGlobalStylesId(state);
    if (!currentGlobalStylesId2) {
      return null;
    }
    return state.themeGlobalStyleRevisions[currentGlobalStylesId2];
  }
  function getDefaultTemplateId(state, query) {
    return state.defaultTemplates[JSON.stringify(query)];
  }
  var getRevisions = (state, kind, name, recordKey, query) => {
    logEntityDeprecation(kind, name, "getRevisions");
    const queriedStateRevisions = state.entities.records?.[kind]?.[name]?.revisions?.[recordKey];
    if (!queriedStateRevisions) {
      return null;
    }
    return getQueriedItems(queriedStateRevisions, query);
  };
  var getRevision = (0, import_data10.createSelector)(
    (state, kind, name, recordKey, revisionKey, query) => {
      logEntityDeprecation(kind, name, "getRevision");
      const queriedState = state.entities.records?.[kind]?.[name]?.revisions?.[recordKey];
      if (!queriedState) {
        return void 0;
      }
      const context = query?.context ?? "default";
      if (!query || !query._fields) {
        if (!queriedState.itemIsComplete[context]?.[revisionKey]) {
          return void 0;
        }
        return queriedState.items[context][revisionKey];
      }
      const item = queriedState.items[context]?.[revisionKey];
      if (!item) {
        return item;
      }
      const filteredItem = {};
      const fields = get_normalized_comma_separable_default(query._fields) ?? [];
      for (let f = 0; f < fields.length; f++) {
        const field = fields[f].split(".");
        let value = item;
        field.forEach((fieldName) => {
          value = value?.[fieldName];
        });
        setNestedValue(filteredItem, field, value);
      }
      return filteredItem;
    },
    (state, kind, name, recordKey, revisionKey, query) => {
      const context = query?.context ?? "default";
      const queriedState = state.entities.records?.[kind]?.[name]?.revisions?.[recordKey];
      return [
        queriedState?.items?.[context]?.[revisionKey],
        queriedState?.itemIsComplete?.[context]?.[revisionKey]
      ];
    }
  );

  // packages/core-data/build-module/actions.mjs
  var actions_exports = {};
  __export(actions_exports, {
    __experimentalBatch: () => __experimentalBatch,
    __experimentalReceiveCurrentGlobalStylesId: () => __experimentalReceiveCurrentGlobalStylesId,
    __experimentalReceiveThemeBaseGlobalStyles: () => __experimentalReceiveThemeBaseGlobalStyles,
    __experimentalReceiveThemeGlobalStyleVariations: () => __experimentalReceiveThemeGlobalStyleVariations,
    __experimentalSaveSpecifiedEntityEdits: () => __experimentalSaveSpecifiedEntityEdits,
    __unstableCreateUndoLevel: () => __unstableCreateUndoLevel,
    addEntities: () => addEntities,
    clearEntityRecordEdits: () => clearEntityRecordEdits,
    deleteEntityRecord: () => deleteEntityRecord,
    editEntityRecord: () => editEntityRecord,
    receiveAutosaves: () => receiveAutosaves,
    receiveCurrentTheme: () => receiveCurrentTheme,
    receiveCurrentUser: () => receiveCurrentUser,
    receiveDefaultTemplateId: () => receiveDefaultTemplateId,
    receiveEmbedPreview: () => receiveEmbedPreview,
    receiveEntityRecords: () => receiveEntityRecords,
    receiveNavigationFallbackId: () => receiveNavigationFallbackId,
    receiveRevisions: () => receiveRevisions,
    receiveThemeGlobalStyleRevisions: () => receiveThemeGlobalStyleRevisions,
    receiveThemeSupports: () => receiveThemeSupports,
    receiveUploadPermissions: () => receiveUploadPermissions,
    receiveUserPermission: () => receiveUserPermission,
    receiveUserPermissions: () => receiveUserPermissions,
    receiveUserQuery: () => receiveUserQuery,
    redo: () => redo,
    saveEditedEntityRecord: () => saveEditedEntityRecord,
    saveEntityRecord: () => saveEntityRecord,
    undo: () => undo
  });
  var import_es67 = __toESM(require_es6(), 1);
  var import_api_fetch4 = __toESM(require_api_fetch(), 1);
  var import_url3 = __toESM(require_url(), 1);
  var import_deprecated3 = __toESM(require_deprecated(), 1);

  // packages/core-data/build-module/batch/default-processor.mjs
  var import_api_fetch3 = __toESM(require_api_fetch(), 1);
  var maxItems = null;
  function chunk(arr, chunkSize) {
    const tmp = [...arr];
    const cache3 = [];
    while (tmp.length) {
      cache3.push(tmp.splice(0, chunkSize));
    }
    return cache3;
  }
  async function defaultProcessor(requests) {
    if (maxItems === null) {
      const preflightResponse = await (0, import_api_fetch3.default)({
        path: "/batch/v1",
        method: "OPTIONS"
      });
      maxItems = preflightResponse.endpoints[0].args.requests.maxItems;
    }
    const results = [];
    for (const batchRequests of chunk(requests, maxItems)) {
      const batchResponse = await (0, import_api_fetch3.default)({
        path: "/batch/v1",
        method: "POST",
        data: {
          validation: "require-all-validate",
          requests: batchRequests.map((request) => ({
            path: request.path,
            body: request.data,
            // Rename 'data' to 'body'.
            method: request.method,
            headers: request.headers
          }))
        }
      });
      let batchResults;
      if (batchResponse.failed) {
        batchResults = batchResponse.responses.map((response) => ({
          error: response?.body
        }));
      } else {
        batchResults = batchResponse.responses.map((response) => {
          const result = {};
          if (response.status >= 200 && response.status < 300) {
            result.output = response.body;
          } else {
            result.error = response.body;
          }
          return result;
        });
      }
      results.push(...batchResults);
    }
    return results;
  }

  // packages/core-data/build-module/batch/create-batch.mjs
  function createBatch(processor = defaultProcessor) {
    let lastId = 0;
    let queue = [];
    const pending = new ObservableSet();
    return {
      /**
       * Adds an input to the batch and returns a promise that is resolved or
       * rejected when the input is processed by `batch.run()`.
       *
       * You may also pass a thunk which allows inputs to be added
       * asynchronously.
       *
       * ```
       * // Both are allowed:
       * batch.add( { path: '/v1/books', ... } );
       * batch.add( ( add ) => add( { path: '/v1/books', ... } ) );
       * ```
       *
       * If a thunk is passed, `batch.run()` will pause until either:
       *
       * - The thunk calls its `add` argument, or;
       * - The thunk returns a promise and that promise resolves, or;
       * - The thunk returns a non-promise.
       *
       * @param {any|Function} inputOrThunk Input to add or thunk to execute.
       *
       * @return {Promise|any} If given an input, returns a promise that
       *                       is resolved or rejected when the batch is
       *                       processed. If given a thunk, returns the return
       *                       value of that thunk.
       */
      add(inputOrThunk) {
        const id2 = ++lastId;
        pending.add(id2);
        const add = (input) => new Promise((resolve, reject) => {
          queue.push({
            input,
            resolve,
            reject
          });
          pending.delete(id2);
        });
        if (typeof inputOrThunk === "function") {
          return Promise.resolve(inputOrThunk(add)).finally(() => {
            pending.delete(id2);
          });
        }
        return add(inputOrThunk);
      },
      /**
       * Runs the batch. This calls `batchProcessor` and resolves or rejects
       * all promises returned by `add()`.
       *
       * @return {Promise<boolean>} A promise that resolves to a boolean that is true
       *                   if the processor returned no errors.
       */
      async run() {
        if (pending.size) {
          await new Promise((resolve) => {
            const unsubscribe = pending.subscribe(() => {
              if (!pending.size) {
                unsubscribe();
                resolve(void 0);
              }
            });
          });
        }
        let results;
        try {
          results = await processor(
            queue.map(({ input }) => input)
          );
          if (results.length !== queue.length) {
            throw new Error(
              "run: Array returned by processor must be same size as input array."
            );
          }
        } catch (error) {
          for (const { reject } of queue) {
            reject(error);
          }
          throw error;
        }
        let isSuccess = true;
        results.forEach((result, key) => {
          const queueItem = queue[key];
          if (result?.error) {
            queueItem?.reject(result.error);
            isSuccess = false;
          } else {
            queueItem?.resolve(result?.output ?? result);
          }
        });
        queue = [];
        return isSuccess;
      }
    };
  }
  var ObservableSet = class {
    constructor(...args2) {
      this.set = new Set(...args2);
      this.subscribers = /* @__PURE__ */ new Set();
    }
    get size() {
      return this.set.size;
    }
    add(value) {
      this.set.add(value);
      this.subscribers.forEach((subscriber) => subscriber());
      return this;
    }
    delete(value) {
      const isSuccess = this.set.delete(value);
      this.subscribers.forEach((subscriber) => subscriber());
      return isSuccess;
    }
    subscribe(subscriber) {
      this.subscribers.add(subscriber);
      return () => {
        this.subscribers.delete(subscriber);
      };
    }
  };

  // packages/core-data/build-module/actions.mjs
  function addTitleToAutoDraft(record) {
    return record.status === "auto-draft" ? { ...record, title: "" } : record;
  }
  function receiveUserQuery(queryID, users2) {
    return {
      type: "RECEIVE_USER_QUERY",
      users: Array.isArray(users2) ? users2 : [users2],
      queryID
    };
  }
  function receiveCurrentUser(currentUser2) {
    return {
      type: "RECEIVE_CURRENT_USER",
      currentUser: currentUser2
    };
  }
  function addEntities(entities2) {
    return {
      type: "ADD_ENTITIES",
      entities: entities2
    };
  }
  function receiveEntityRecords(kind, name, records, query = void 0, invalidateCache = false, edits = void 0, meta = void 0) {
    if (kind === "postType") {
      records = Array.isArray(records) ? records.map(addTitleToAutoDraft) : addTitleToAutoDraft(records);
    }
    let action;
    if (query) {
      action = receiveQueriedItems(records, query, edits, meta);
    } else {
      action = receiveItems(records, edits, meta);
    }
    return {
      ...action,
      kind,
      name,
      invalidateCache
    };
  }
  function receiveCurrentTheme(currentTheme2) {
    return {
      type: "RECEIVE_CURRENT_THEME",
      currentTheme: currentTheme2
    };
  }
  function __experimentalReceiveCurrentGlobalStylesId(currentGlobalStylesId2) {
    return {
      type: "RECEIVE_CURRENT_GLOBAL_STYLES_ID",
      id: currentGlobalStylesId2
    };
  }
  function __experimentalReceiveThemeBaseGlobalStyles(stylesheet, globalStyles) {
    return {
      type: "RECEIVE_THEME_GLOBAL_STYLES",
      stylesheet,
      globalStyles
    };
  }
  function __experimentalReceiveThemeGlobalStyleVariations(stylesheet, variations) {
    return {
      type: "RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS",
      stylesheet,
      variations
    };
  }
  function receiveThemeSupports() {
    (0, import_deprecated3.default)("wp.data.dispatch( 'core' ).receiveThemeSupports", {
      since: "5.9"
    });
    return {
      type: "DO_NOTHING"
    };
  }
  function receiveThemeGlobalStyleRevisions(currentId, revisions) {
    (0, import_deprecated3.default)(
      "wp.data.dispatch( 'core' ).receiveThemeGlobalStyleRevisions()",
      {
        since: "6.5.0",
        alternative: "wp.data.dispatch( 'core' ).receiveRevisions"
      }
    );
    return {
      type: "RECEIVE_THEME_GLOBAL_STYLE_REVISIONS",
      currentId,
      revisions
    };
  }
  function receiveEmbedPreview(url, preview) {
    return {
      type: "RECEIVE_EMBED_PREVIEW",
      url,
      preview
    };
  }
  var deleteEntityRecord = (kind, name, recordId, query, { __unstableFetch = import_api_fetch4.default, throwOnError = false } = {}) => async ({ dispatch: dispatch3, resolveSelect: resolveSelect2 }) => {
    logEntityDeprecation(kind, name, "deleteEntityRecord");
    const configs = await resolveSelect2.getEntitiesConfig(kind);
    const entityConfig = configs.find(
      (config) => config.kind === kind && config.name === name
    );
    let error;
    let deletedRecord = false;
    if (!entityConfig) {
      return;
    }
    const lock3 = await dispatch3.__unstableAcquireStoreLock(
      STORE_NAME,
      ["entities", "records", kind, name, recordId],
      { exclusive: true }
    );
    try {
      dispatch3({
        type: "DELETE_ENTITY_RECORD_START",
        kind,
        name,
        recordId
      });
      let hasError = false;
      let { baseURL } = entityConfig;
      if (kind === "postType" && name === "wp_template" && (recordId && typeof recordId === "string" && !/^\d+$/.test(recordId) || !window?.__experimentalTemplateActivate)) {
        baseURL = baseURL.slice(0, baseURL.lastIndexOf("/")) + "/templates";
      }
      try {
        let path = `${baseURL}/${recordId}`;
        if (query) {
          path = (0, import_url3.addQueryArgs)(path, query);
        }
        deletedRecord = await __unstableFetch({
          path,
          method: "DELETE"
        });
        await dispatch3(removeItems(kind, name, recordId, true));
        if (entityConfig.syncConfig) {
          const objectType = `${kind}/${name}`;
          const objectId = recordId;
          getSyncManager()?.unload(objectType, objectId);
        }
      } catch (_error) {
        hasError = true;
        error = _error;
      }
      dispatch3({
        type: "DELETE_ENTITY_RECORD_FINISH",
        kind,
        name,
        recordId,
        error
      });
      if (hasError && throwOnError) {
        throw error;
      }
      return deletedRecord;
    } finally {
      dispatch3.__unstableReleaseStoreLock(lock3);
    }
  };
  var editEntityRecord = (kind, name, recordId, edits, options = {}) => ({ select: select5, dispatch: dispatch3 }) => {
    logEntityDeprecation(kind, name, "editEntityRecord");
    const entityConfig = select5.getEntityConfig(kind, name);
    if (!entityConfig) {
      throw new Error(
        `The entity being edited (${kind}, ${name}) does not have a loaded config.`
      );
    }
    const { mergedEdits = {} } = entityConfig;
    const record = select5.getRawEntityRecord(kind, name, recordId);
    const editedRecord = select5.getEditedEntityRecord(
      kind,
      name,
      recordId
    );
    const editsWithMerges = Object.keys(edits).reduce((acc, key) => {
      acc[key] = mergedEdits[key] ? { ...editedRecord[key], ...edits[key] } : edits[key];
      return acc;
    }, {});
    const edit = {
      kind,
      name,
      recordId,
      // Clear edits when they are equal to their persisted counterparts
      // so that the property is not considered dirty.
      edits: Object.keys(edits).reduce((acc, key) => {
        const recordValue = record[key];
        const value = editsWithMerges[key];
        acc[key] = (0, import_es67.default)(recordValue, value) ? void 0 : value;
        return acc;
      }, {})
    };
    if (entityConfig.syncConfig) {
      const objectType = `${kind}/${name}`;
      const objectId = recordId;
      const isNewUndoLevel = options.undoIgnore ? false : !options.isCached;
      const origin2 = options.undoIgnore ? LOCAL_UNDO_IGNORED_ORIGIN2 : LOCAL_EDITOR_ORIGIN2;
      getSyncManager()?.update(
        objectType,
        objectId,
        editsWithMerges,
        origin2,
        { isNewUndoLevel }
      );
    }
    if (!options.undoIgnore) {
      select5.getUndoManager().addRecord(
        [
          {
            id: { kind, name, recordId },
            changes: Object.keys(edits).reduce((acc, key) => {
              acc[key] = {
                from: editedRecord[key],
                to: edits[key]
              };
              return acc;
            }, {})
          }
        ],
        options.isCached
      );
    }
    dispatch3({
      type: "EDIT_ENTITY_RECORD",
      ...edit
    });
  };
  var clearEntityRecordEdits = (kind, name, recordId) => ({ select: select5, dispatch: dispatch3 }) => {
    const entityConfig = select5.getEntityConfig(kind, name);
    logEntityDeprecation(kind, name, "clearEntityRecordEdits");
    if (!entityConfig) {
      throw new Error(
        `The entity being edited (${kind}, ${name}) does not have a loaded config.`
      );
    }
    const currentEdits = select5.getEntityRecordEdits(
      kind,
      name,
      recordId
    );
    if (!currentEdits) {
      return;
    }
    const clearedEdits = Object.keys(currentEdits).reduce(
      (acc, key) => {
        acc[key] = void 0;
        return acc;
      },
      {}
    );
    dispatch3({
      type: "EDIT_ENTITY_RECORD",
      kind,
      name,
      recordId,
      edits: clearedEdits
    });
  };
  var undo = () => ({ select: select5, dispatch: dispatch3 }) => {
    const undoRecord = select5.getUndoManager().undo();
    if (!undoRecord) {
      return;
    }
    dispatch3({
      type: "UNDO",
      record: undoRecord
    });
  };
  var redo = () => ({ select: select5, dispatch: dispatch3 }) => {
    const redoRecord = select5.getUndoManager().redo();
    if (!redoRecord) {
      return;
    }
    dispatch3({
      type: "REDO",
      record: redoRecord
    });
  };
  var __unstableCreateUndoLevel = () => ({ select: select5 }) => {
    select5.getUndoManager().addRecord();
  };
  var saveEntityRecord = (kind, name, record, {
    isAutosave = false,
    __unstableFetch = import_api_fetch4.default,
    throwOnError = false
  } = {}) => async ({ select: select5, resolveSelect: resolveSelect2, dispatch: dispatch3 }) => {
    logEntityDeprecation(kind, name, "saveEntityRecord");
    const configs = await resolveSelect2.getEntitiesConfig(kind);
    const entityConfig = configs.find(
      (config) => config.kind === kind && config.name === name
    );
    if (!entityConfig) {
      return;
    }
    const entityIdKey = entityConfig.key ?? DEFAULT_ENTITY_KEY;
    const recordId = record[entityIdKey];
    const isNewRecord = !!entityIdKey && !recordId;
    const lock3 = await dispatch3.__unstableAcquireStoreLock(
      STORE_NAME,
      ["entities", "records", kind, name, recordId || v4_default()],
      { exclusive: true }
    );
    try {
      for (const [key, value] of Object.entries(record)) {
        if (typeof value === "function") {
          const evaluatedValue = value(
            select5.getEditedEntityRecord(kind, name, recordId)
          );
          dispatch3.editEntityRecord(
            kind,
            name,
            recordId,
            {
              [key]: evaluatedValue
            },
            { undoIgnore: true }
          );
          record[key] = evaluatedValue;
        }
      }
      dispatch3({
        type: "SAVE_ENTITY_RECORD_START",
        kind,
        name,
        recordId,
        isAutosave
      });
      let updatedRecord;
      let error;
      let hasError = false;
      let { baseURL } = entityConfig;
      if (kind === "postType" && name === "wp_template" && (recordId && typeof recordId === "string" && !/^\d+$/.test(recordId) || !window?.__experimentalTemplateActivate)) {
        baseURL = baseURL.slice(0, baseURL.lastIndexOf("/")) + "/templates";
      }
      try {
        const path = `${baseURL}${recordId ? "/" + recordId : ""}`;
        const persistedRecord = !isNewRecord ? select5.getRawEntityRecord(kind, name, recordId) : {};
        if (isAutosave) {
          const currentUser2 = select5.getCurrentUser();
          const currentUserId = currentUser2 ? currentUser2.id : void 0;
          const autosavePost = await resolveSelect2.getAutosave(
            persistedRecord.type,
            persistedRecord.id,
            currentUserId
          );
          let data = {
            ...persistedRecord,
            ...autosavePost,
            ...record
          };
          data = Object.keys(data).reduce(
            (acc, key) => {
              if ([
                "title",
                "excerpt",
                "content",
                "meta"
              ].includes(key)) {
                acc[key] = data[key];
              }
              return acc;
            },
            {
              // Do not update the `status` if we have edited it when auto saving.
              // It's very important to let the user explicitly save this change,
              // because it can lead to unexpected results. An example would be to
              // have a draft post and change the status to publish.
              status: data.status === "auto-draft" ? "draft" : void 0
            }
          );
          updatedRecord = await __unstableFetch({
            path: `${path}/autosaves`,
            method: "POST",
            data
          });
          if (persistedRecord.id === updatedRecord.id) {
            let newRecord = {
              ...persistedRecord,
              ...data,
              ...updatedRecord
            };
            newRecord = Object.keys(newRecord).reduce(
              (acc, key) => {
                if (["title", "excerpt", "content"].includes(
                  key
                )) {
                  acc[key] = newRecord[key];
                } else if (key === "status") {
                  acc[key] = persistedRecord.status === "auto-draft" && newRecord.status === "draft" ? newRecord.status : persistedRecord.status;
                } else {
                  acc[key] = persistedRecord[key];
                }
                return acc;
              },
              {}
            );
            dispatch3.receiveEntityRecords(
              kind,
              name,
              newRecord,
              void 0,
              true
            );
          } else {
            dispatch3.receiveAutosaves(
              persistedRecord.id,
              updatedRecord
            );
          }
        } else {
          let edits = record;
          if (entityConfig.__unstablePrePersist) {
            edits = {
              ...edits,
              ...await entityConfig.__unstablePrePersist(
                persistedRecord,
                edits
              )
            };
          }
          updatedRecord = await __unstableFetch({
            path,
            method: recordId ? "PUT" : "POST",
            data: edits
          });
          dispatch3.receiveEntityRecords(
            kind,
            name,
            updatedRecord,
            void 0,
            true,
            edits
          );
          if (entityConfig.syncConfig) {
            getSyncManager()?.update(
              `${kind}/${name}`,
              recordId,
              updatedRecord,
              LOCAL_UNDO_IGNORED_ORIGIN2,
              { isSave: true }
            );
          }
        }
      } catch (_error) {
        hasError = true;
        error = _error;
      }
      dispatch3({
        type: "SAVE_ENTITY_RECORD_FINISH",
        kind,
        name,
        recordId,
        error,
        isAutosave
      });
      if (hasError && throwOnError) {
        throw error;
      }
      return updatedRecord;
    } finally {
      dispatch3.__unstableReleaseStoreLock(lock3);
    }
  };
  var __experimentalBatch = (requests) => async ({ dispatch: dispatch3 }) => {
    const batch = createBatch();
    const api = {
      saveEntityRecord(kind, name, record, options) {
        return batch.add(
          (add) => dispatch3.saveEntityRecord(kind, name, record, {
            ...options,
            __unstableFetch: add
          })
        );
      },
      saveEditedEntityRecord(kind, name, recordId, options) {
        return batch.add(
          (add) => dispatch3.saveEditedEntityRecord(kind, name, recordId, {
            ...options,
            __unstableFetch: add
          })
        );
      },
      deleteEntityRecord(kind, name, recordId, query, options) {
        return batch.add(
          (add) => dispatch3.deleteEntityRecord(kind, name, recordId, query, {
            ...options,
            __unstableFetch: add
          })
        );
      }
    };
    const resultPromises = requests.map((request) => request(api));
    const [, ...results] = await Promise.all([
      batch.run(),
      ...resultPromises
    ]);
    return results;
  };
  var saveEditedEntityRecord = (kind, name, recordId, options) => async ({ select: select5, dispatch: dispatch3, resolveSelect: resolveSelect2 }) => {
    logEntityDeprecation(kind, name, "saveEditedEntityRecord");
    if (!select5.hasEditsForEntityRecord(kind, name, recordId)) {
      return;
    }
    const configs = await resolveSelect2.getEntitiesConfig(kind);
    const entityConfig = configs.find(
      (config) => config.kind === kind && config.name === name
    );
    if (!entityConfig) {
      return;
    }
    const entityIdKey = entityConfig.key || DEFAULT_ENTITY_KEY;
    const edits = select5.getEntityRecordNonTransientEdits(
      kind,
      name,
      recordId
    );
    const record = { [entityIdKey]: recordId, ...edits };
    return await dispatch3.saveEntityRecord(kind, name, record, options);
  };
  var __experimentalSaveSpecifiedEntityEdits = (kind, name, recordId, itemsToSave, options) => async ({ select: select5, dispatch: dispatch3, resolveSelect: resolveSelect2 }) => {
    logEntityDeprecation(
      kind,
      name,
      "__experimentalSaveSpecifiedEntityEdits"
    );
    if (!select5.hasEditsForEntityRecord(kind, name, recordId)) {
      return;
    }
    const edits = select5.getEntityRecordNonTransientEdits(
      kind,
      name,
      recordId
    );
    const editsToSave = {};
    for (const item of itemsToSave) {
      setNestedValue(editsToSave, item, getNestedValue(edits, item));
    }
    const configs = await resolveSelect2.getEntitiesConfig(kind);
    const entityConfig = configs.find(
      (config) => config.kind === kind && config.name === name
    );
    const entityIdKey = entityConfig?.key || DEFAULT_ENTITY_KEY;
    if (recordId) {
      editsToSave[entityIdKey] = recordId;
    }
    return await dispatch3.saveEntityRecord(
      kind,
      name,
      editsToSave,
      options
    );
  };
  function receiveUploadPermissions(hasUploadPermissions) {
    (0, import_deprecated3.default)("wp.data.dispatch( 'core' ).receiveUploadPermissions", {
      since: "5.9",
      alternative: "receiveUserPermission"
    });
    return receiveUserPermission("create/media", hasUploadPermissions);
  }
  function receiveUserPermission(key, isAllowed) {
    return {
      type: "RECEIVE_USER_PERMISSION",
      key,
      isAllowed
    };
  }
  function receiveUserPermissions(permissions) {
    return {
      type: "RECEIVE_USER_PERMISSIONS",
      permissions
    };
  }
  function receiveAutosaves(postId, autosaves2) {
    return {
      type: "RECEIVE_AUTOSAVES",
      postId,
      autosaves: Array.isArray(autosaves2) ? autosaves2 : [autosaves2]
    };
  }
  function receiveNavigationFallbackId(fallbackId) {
    return {
      type: "RECEIVE_NAVIGATION_FALLBACK_ID",
      fallbackId
    };
  }
  function receiveDefaultTemplateId(query, templateId) {
    return {
      type: "RECEIVE_DEFAULT_TEMPLATE",
      query,
      templateId
    };
  }
  var receiveRevisions = (kind, name, recordKey, records, query, invalidateCache = false, meta) => async ({ dispatch: dispatch3, resolveSelect: resolveSelect2 }) => {
    logEntityDeprecation(kind, name, "receiveRevisions");
    const configs = await resolveSelect2.getEntitiesConfig(kind);
    const entityConfig = configs.find(
      (config) => config.kind === kind && config.name === name
    );
    const key = entityConfig && entityConfig?.revisionKey ? entityConfig.revisionKey : DEFAULT_ENTITY_KEY;
    dispatch3({
      type: "RECEIVE_ITEM_REVISIONS",
      key,
      items: records,
      recordKey,
      meta,
      query,
      kind,
      name,
      invalidateCache
    });
  };

  // packages/core-data/build-module/private-actions.mjs
  var private_actions_exports = {};
  __export(private_actions_exports, {
    editMediaEntity: () => editMediaEntity,
    receiveEditorAssets: () => receiveEditorAssets,
    receiveEditorSettings: () => receiveEditorSettings,
    receiveRegisteredPostMeta: () => receiveRegisteredPostMeta,
    setCollaborationSupported: () => setCollaborationSupported,
    setSyncConnectionStatus: () => setSyncConnectionStatus
  });
  var import_api_fetch5 = __toESM(require_api_fetch(), 1);
  function receiveRegisteredPostMeta(postType, registeredPostMeta2) {
    return {
      type: "RECEIVE_REGISTERED_POST_META",
      postType,
      registeredPostMeta: registeredPostMeta2
    };
  }
  var editMediaEntity = (recordId, edits = {}, { __unstableFetch = import_api_fetch5.default, throwOnError = false } = {}) => async ({ dispatch: dispatch3, resolveSelect: resolveSelect2 }) => {
    if (!recordId) {
      return;
    }
    const kind = "postType";
    const name = "attachment";
    const configs = await resolveSelect2.getEntitiesConfig(kind);
    const entityConfig = configs.find(
      (config) => config.kind === kind && config.name === name
    );
    if (!entityConfig) {
      return;
    }
    const lock3 = await dispatch3.__unstableAcquireStoreLock(
      STORE_NAME,
      ["entities", "records", kind, name, recordId],
      { exclusive: true }
    );
    let updatedRecord;
    let error;
    let hasError = false;
    try {
      dispatch3({
        type: "SAVE_ENTITY_RECORD_START",
        kind,
        name,
        recordId
      });
      try {
        const path = `${entityConfig.baseURL}/${recordId}/edit`;
        const newRecord = await __unstableFetch({
          path,
          method: "POST",
          data: {
            ...edits
          }
        });
        if (newRecord) {
          dispatch3.receiveEntityRecords(
            kind,
            name,
            newRecord,
            void 0,
            true,
            void 0,
            void 0
          );
          updatedRecord = newRecord;
        }
      } catch (e) {
        error = e;
        hasError = true;
      }
      dispatch3({
        type: "SAVE_ENTITY_RECORD_FINISH",
        kind,
        name,
        recordId,
        error
      });
      if (hasError && throwOnError) {
        throw error;
      }
      return updatedRecord;
    } finally {
      dispatch3.__unstableReleaseStoreLock(lock3);
    }
  };
  function receiveEditorSettings(settings) {
    return {
      type: "RECEIVE_EDITOR_SETTINGS",
      settings
    };
  }
  function receiveEditorAssets(assets) {
    return {
      type: "RECEIVE_EDITOR_ASSETS",
      assets
    };
  }
  var setCollaborationSupported = (supported) => ({ dispatch: dispatch3 }) => {
    dispatch3({ type: "SET_COLLABORATION_SUPPORTED", supported });
  };
  function setSyncConnectionStatus(kind, name, key, status) {
    if (!status) {
      return {
        type: "CLEAR_SYNC_CONNECTION_STATUS",
        kind,
        name,
        key
      };
    }
    return {
      type: "SET_SYNC_CONNECTION_STATUS",
      kind,
      name,
      key,
      status
    };
  }

  // packages/core-data/build-module/resolvers.mjs
  var resolvers_exports = {};
  __export(resolvers_exports, {
    __experimentalGetCurrentGlobalStylesId: () => __experimentalGetCurrentGlobalStylesId2,
    __experimentalGetCurrentThemeBaseGlobalStyles: () => __experimentalGetCurrentThemeBaseGlobalStyles2,
    __experimentalGetCurrentThemeGlobalStylesVariations: () => __experimentalGetCurrentThemeGlobalStylesVariations2,
    canUser: () => canUser2,
    canUserEditEntityRecord: () => canUserEditEntityRecord2,
    getAuthors: () => getAuthors2,
    getAutosave: () => getAutosave2,
    getAutosaves: () => getAutosaves2,
    getBlockPatternCategories: () => getBlockPatternCategories2,
    getBlockPatterns: () => getBlockPatterns2,
    getCurrentTheme: () => getCurrentTheme2,
    getCurrentThemeGlobalStylesRevisions: () => getCurrentThemeGlobalStylesRevisions2,
    getCurrentUser: () => getCurrentUser2,
    getDefaultTemplateId: () => getDefaultTemplateId2,
    getEditedEntityRecord: () => getEditedEntityRecord2,
    getEditorAssets: () => getEditorAssets2,
    getEditorSettings: () => getEditorSettings2,
    getEmbedPreview: () => getEmbedPreview2,
    getEntitiesConfig: () => getEntitiesConfig2,
    getEntityRecord: () => getEntityRecord2,
    getEntityRecords: () => getEntityRecords2,
    getEntityRecordsTotalItems: () => getEntityRecordsTotalItems2,
    getEntityRecordsTotalPages: () => getEntityRecordsTotalPages2,
    getNavigationFallbackId: () => getNavigationFallbackId2,
    getRawEntityRecord: () => getRawEntityRecord2,
    getRegisteredPostMeta: () => getRegisteredPostMeta2,
    getRevision: () => getRevision2,
    getRevisions: () => getRevisions2,
    getThemeSupports: () => getThemeSupports2,
    getUserPatternCategories: () => getUserPatternCategories2
  });
  var import_url6 = __toESM(require_url(), 1);
  var import_html_entities2 = __toESM(require_html_entities(), 1);
  var import_api_fetch9 = __toESM(require_api_fetch(), 1);

  // packages/core-data/build-module/fetch/index.mjs
  var import_api_fetch8 = __toESM(require_api_fetch(), 1);

  // packages/core-data/build-module/fetch/__experimental-fetch-link-suggestions.mjs
  var import_api_fetch6 = __toESM(require_api_fetch(), 1);
  var import_url4 = __toESM(require_url(), 1);
  var import_html_entities = __toESM(require_html_entities(), 1);
  var import_i18n2 = __toESM(require_i18n(), 1);
  async function fetchLinkSuggestions(search, searchOptions = {}, editorSettings2 = {}) {
    const searchOptionsToUse = searchOptions.isInitialSuggestions && searchOptions.initialSuggestionsSearchOptions ? {
      ...searchOptions,
      ...searchOptions.initialSuggestionsSearchOptions
    } : searchOptions;
    const {
      type,
      subtype,
      page,
      perPage = searchOptions.isInitialSuggestions ? 3 : 20
    } = searchOptionsToUse;
    const { disablePostFormats = false } = editorSettings2;
    const queries2 = [];
    if (!type || type === "post") {
      queries2.push(
        (0, import_api_fetch6.default)({
          path: (0, import_url4.addQueryArgs)("/wp/v2/search", {
            search,
            page,
            per_page: perPage,
            type: "post",
            subtype
          })
        }).then((results2) => {
          return results2.map((result) => {
            return {
              id: result.id,
              url: result.url,
              title: (0, import_html_entities.decodeEntities)(result.title || "") || (0, import_i18n2.__)("(no title)"),
              type: result.subtype || result.type,
              kind: "post-type"
            };
          });
        }).catch(() => [])
        // Fail by returning no results.
      );
    }
    if (!type || type === "term") {
      queries2.push(
        (0, import_api_fetch6.default)({
          path: (0, import_url4.addQueryArgs)("/wp/v2/search", {
            search,
            page,
            per_page: perPage,
            type: "term",
            subtype
          })
        }).then((results2) => {
          return results2.map((result) => {
            return {
              id: result.id,
              url: result.url,
              title: (0, import_html_entities.decodeEntities)(result.title || "") || (0, import_i18n2.__)("(no title)"),
              type: result.subtype || result.type,
              kind: "taxonomy"
            };
          });
        }).catch(() => [])
        // Fail by returning no results.
      );
    }
    if (!disablePostFormats && (!type || type === "post-format")) {
      queries2.push(
        (0, import_api_fetch6.default)({
          path: (0, import_url4.addQueryArgs)("/wp/v2/search", {
            search,
            page,
            per_page: perPage,
            type: "post-format",
            subtype
          })
        }).then((results2) => {
          return results2.map((result) => {
            return {
              id: result.id,
              url: result.url,
              title: (0, import_html_entities.decodeEntities)(result.title || "") || (0, import_i18n2.__)("(no title)"),
              type: result.subtype || result.type,
              kind: "taxonomy"
            };
          });
        }).catch(() => [])
        // Fail by returning no results.
      );
    }
    if (!type || type === "attachment") {
      queries2.push(
        (0, import_api_fetch6.default)({
          path: (0, import_url4.addQueryArgs)("/wp/v2/media", {
            search,
            page,
            per_page: perPage
          })
        }).then((results2) => {
          return results2.map((result) => {
            return {
              id: result.id,
              url: result.source_url,
              title: (0, import_html_entities.decodeEntities)(result.title.rendered || "") || (0, import_i18n2.__)("(no title)"),
              type: result.type,
              kind: "media"
            };
          });
        }).catch(() => [])
        // Fail by returning no results.
      );
    }
    const responses = await Promise.all(queries2);
    let results = responses.flat();
    results = results.filter((result) => !!result.id);
    results = sortResults(results, search);
    results = results.slice(0, perPage);
    return results;
  }
  function sortResults(results, search) {
    const searchTokens = tokenize2(search);
    const scores = {};
    for (const result of results) {
      if (result.title) {
        const titleTokens = tokenize2(result.title);
        const exactMatchingTokens = titleTokens.filter(
          (titleToken) => searchTokens.some(
            (searchToken) => titleToken === searchToken
          )
        );
        const subMatchingTokens = titleTokens.filter(
          (titleToken) => searchTokens.some(
            (searchToken) => titleToken !== searchToken && titleToken.includes(searchToken)
          )
        );
        const exactMatchScore = exactMatchingTokens.length / titleTokens.length * 10;
        const subMatchScore = subMatchingTokens.length / titleTokens.length;
        scores[result.id] = exactMatchScore + subMatchScore;
      } else {
        scores[result.id] = 0;
      }
    }
    return results.sort((a, b) => scores[b.id] - scores[a.id]);
  }
  function tokenize2(text2) {
    return text2.toLowerCase().match(/[\p{L}\p{N}]+/gu) || [];
  }

  // packages/core-data/build-module/fetch/__experimental-fetch-url-data.mjs
  var import_api_fetch7 = __toESM(require_api_fetch(), 1);
  var import_url5 = __toESM(require_url(), 1);
  var CACHE = /* @__PURE__ */ new Map();
  var fetchUrlData = async (url, options = {}) => {
    const endpoint = "/wp-block-editor/v1/url-details";
    const args2 = {
      url: (0, import_url5.prependHTTP)(url)
    };
    if (!(0, import_url5.isURL)(url)) {
      return Promise.reject(`${url} is not a valid URL.`);
    }
    const protocol = (0, import_url5.getProtocol)(url);
    if (!protocol || !(0, import_url5.isValidProtocol)(protocol) || !protocol.startsWith("http") || !/^https?:\/\/[^\/\s]/i.test(url)) {
      return Promise.reject(
        `${url} does not have a valid protocol. URLs must be "http" based`
      );
    }
    if (CACHE.has(url)) {
      return CACHE.get(url);
    }
    return (0, import_api_fetch7.default)({
      path: (0, import_url5.addQueryArgs)(endpoint, args2),
      ...options
    }).then((res) => {
      CACHE.set(url, res);
      return res;
    });
  };
  var experimental_fetch_url_data_default = fetchUrlData;

  // packages/core-data/build-module/fetch/index.mjs
  async function fetchBlockPatterns() {
    const restPatterns = await (0, import_api_fetch8.default)({
      path: "/wp/v2/block-patterns/patterns"
    });
    if (!restPatterns) {
      return [];
    }
    return restPatterns.map(
      (pattern) => Object.fromEntries(
        Object.entries(pattern).map(([key, value]) => [
          camelCase(key),
          value
        ])
      )
    );
  }

  // packages/core-data/build-module/resolvers.mjs
  var getAuthors2 = (query) => async ({ dispatch: dispatch3 }) => {
    const path = (0, import_url6.addQueryArgs)(
      "/wp/v2/users/?who=authors&per_page=100",
      query
    );
    const users2 = await (0, import_api_fetch9.default)({ path });
    dispatch3.receiveUserQuery(path, users2);
  };
  var getCurrentUser2 = () => async ({ dispatch: dispatch3 }) => {
    const currentUser2 = await (0, import_api_fetch9.default)({ path: "/wp/v2/users/me" });
    dispatch3.receiveCurrentUser(currentUser2);
  };
  var getEntityRecord2 = (kind, name, key = "", query) => async ({ select: select5, dispatch: dispatch3, registry, resolveSelect: resolveSelect2 }) => {
    const configs = await resolveSelect2.getEntitiesConfig(kind);
    const entityConfig = configs.find(
      (config) => config.name === name && config.kind === kind
    );
    if (!entityConfig) {
      return;
    }
    const lock3 = await dispatch3.__unstableAcquireStoreLock(
      STORE_NAME,
      ["entities", "records", kind, name, key],
      { exclusive: false }
    );
    try {
      if (query !== void 0 && query._fields) {
        query = {
          ...query,
          _fields: [
            .../* @__PURE__ */ new Set([
              ...get_normalized_comma_separable_default(query._fields) || [],
              entityConfig.key || DEFAULT_ENTITY_KEY
            ])
          ].join()
        };
      }
      if (query !== void 0 && query._fields) {
        const hasRecord = select5.hasEntityRecord(
          kind,
          name,
          key,
          query
        );
        if (hasRecord) {
          return;
        }
      }
      let { baseURL } = entityConfig;
      if (kind === "postType" && name === "wp_template" && (key && typeof key === "string" && !/^\d+$/.test(key) || !window?.__experimentalTemplateActivate)) {
        baseURL = baseURL.slice(0, baseURL.lastIndexOf("/")) + "/templates";
      }
      const path = (0, import_url6.addQueryArgs)(baseURL + (key ? "/" + key : ""), {
        ...entityConfig.baseURLParams,
        ...query
      });
      const response = await (0, import_api_fetch9.default)({ path, parse: false });
      const record = await response.json();
      const permissions = getUserPermissionsFromAllowHeader(
        response.headers?.get("allow")
      );
      const canUserResolutionsArgs = [];
      const receiveUserPermissionArgs = {};
      for (const action of ALLOWED_RESOURCE_ACTIONS) {
        receiveUserPermissionArgs[getUserPermissionCacheKey(action, {
          kind,
          name,
          id: key
        })] = permissions[action];
        canUserResolutionsArgs.push([
          action,
          { kind, name, id: key }
        ]);
      }
      if (entityConfig.syncConfig && isNumericID(key) && !query) {
        const objectType = `${kind}/${name}`;
        const objectId = key;
        const recordWithTransients = { ...record };
        Object.entries(entityConfig.transientEdits ?? {}).filter(
          ([propName, transientConfig]) => void 0 === recordWithTransients[propName] && transientConfig && "object" === typeof transientConfig && "read" in transientConfig && "function" === typeof transientConfig.read
        ).forEach(([propName, transientConfig]) => {
          recordWithTransients[propName] = transientConfig.read(recordWithTransients);
        });
        void getSyncManager()?.load(
          entityConfig.syncConfig,
          objectType,
          objectId,
          recordWithTransients,
          {
            // Handle edits sourced from the sync manager.
            editRecord: (edits, options = {}) => {
              if (!Object.keys(edits).length) {
                return;
              }
              dispatch3({
                type: "EDIT_ENTITY_RECORD",
                kind,
                name,
                recordId: key,
                edits,
                meta: {
                  undo: void 0
                },
                options
              });
            },
            // Get the current entity record (with edits)
            getEditedRecord: async () => await resolveSelect2.getEditedEntityRecord(
              kind,
              name,
              key
            ),
            // Handle sync connection status changes.
            onStatusChange: (status) => {
              dispatch3.setSyncConnectionStatus(
                kind,
                name,
                key,
                status
              );
            },
            // Refetch the current entity record from the database.
            refetchRecord: async () => {
              dispatch3.receiveEntityRecords(
                kind,
                name,
                await (0, import_api_fetch9.default)({ path, parse: true }),
                query
              );
            },
            // Persist the CRDT document.
            //
            // TODO: Currently, persisted CRDT documents are stored in post meta.
            // This effectively means that only post entities support CRDT
            // persistence. As we add support for syncing additional entity,
            // we'll need to revisit where persisted CRDT documents are stored.
            persistCRDTDoc: () => {
              resolveSelect2.getEditedEntityRecord(kind, name, key).then((editedRecord) => {
                const { meta, status } = editedRecord;
                if ("auto-draft" === status || !meta) {
                  return;
                }
                dispatch3.saveEntityRecord(
                  kind,
                  name,
                  editedRecord
                );
              });
            },
            addUndoMeta: (ydoc, meta) => {
              const selectionHistory = getSelectionHistory(ydoc);
              if (selectionHistory) {
                meta.set(
                  "selectionHistory",
                  selectionHistory
                );
              }
            },
            restoreUndoMeta: (ydoc, meta) => {
              const selectionHistory = meta.get("selectionHistory");
              if (selectionHistory) {
                setTimeout(() => {
                  restoreSelection(selectionHistory, ydoc);
                }, 0);
              }
            }
          }
        );
      }
      registry.batch(() => {
        dispatch3.receiveEntityRecords(kind, name, record, query);
        dispatch3.receiveUserPermissions(receiveUserPermissionArgs);
        dispatch3.finishResolutions("canUser", canUserResolutionsArgs);
      });
    } finally {
      dispatch3.__unstableReleaseStoreLock(lock3);
    }
  };
  getEntityRecord2.shouldInvalidate = (action, kind, name) => {
    return kind === "root" && name === "site" && (action.type === "RECEIVE_ITEMS" && // Making sure persistedEdits is set seems to be the only way of
    // knowing whether it's an update or fetch. Only an update would
    // have persistedEdits.
    action.persistedEdits && action.persistedEdits.status !== "auto-draft" || action.type === "REMOVE_ITEMS") && action.kind === "postType" && action.name === "wp_template";
  };
  var getRawEntityRecord2 = forward_resolver_default("getEntityRecord");
  var getEditedEntityRecord2 = forward_resolver_default("getEntityRecord");
  var getEntityRecords2 = (kind, name, query = {}) => async ({ dispatch: dispatch3, registry, resolveSelect: resolveSelect2 }) => {
    const configs = await resolveSelect2.getEntitiesConfig(kind);
    const entityConfig = configs.find(
      (config) => config.name === name && config.kind === kind
    );
    if (!entityConfig) {
      return;
    }
    const lock3 = await dispatch3.__unstableAcquireStoreLock(
      STORE_NAME,
      ["entities", "records", kind, name],
      { exclusive: false }
    );
    const rawQuery = { ...query };
    const key = entityConfig.key || DEFAULT_ENTITY_KEY;
    function getResolutionsArgs(records, recordsQuery) {
      const queryArgs = Object.fromEntries(
        Object.entries(recordsQuery).filter(([k, v]) => {
          return ["context", "_fields"].includes(k) && !!v;
        })
      );
      return records.filter((record) => record?.[key]).map((record) => [
        kind,
        name,
        record[key],
        Object.keys(queryArgs).length > 0 ? queryArgs : void 0
      ]);
    }
    try {
      if (query._fields) {
        query = {
          ...query,
          _fields: [
            .../* @__PURE__ */ new Set([
              ...get_normalized_comma_separable_default(query._fields) || [],
              key
            ])
          ].join()
        };
      }
      let { baseURL } = entityConfig;
      const { combinedTemplates = true } = query;
      if (kind === "postType" && name === "wp_template" && combinedTemplates) {
        baseURL = baseURL.slice(0, baseURL.lastIndexOf("/")) + "/templates";
      }
      const path = (0, import_url6.addQueryArgs)(baseURL, {
        ...entityConfig.baseURLParams,
        ...query
      });
      let records = [], meta;
      if (entityConfig.supportsPagination && query.per_page !== -1) {
        const response = await (0, import_api_fetch9.default)({ path, parse: false });
        records = Object.values(await response.json());
        meta = {
          totalItems: parseInt(
            response.headers.get("X-WP-Total")
          ),
          totalPages: parseInt(
            response.headers.get("X-WP-TotalPages")
          )
        };
      } else if (query.per_page === -1 && query[RECEIVE_INTERMEDIATE_RESULTS] === true) {
        let page = 1;
        let totalPages;
        do {
          const response = await (0, import_api_fetch9.default)({
            path: (0, import_url6.addQueryArgs)(path, { page, per_page: 100 }),
            parse: false
          });
          const pageRecords = Object.values(await response.json());
          totalPages = parseInt(
            response.headers.get("X-WP-TotalPages")
          );
          if (!meta) {
            meta = {
              totalItems: parseInt(
                response.headers.get("X-WP-Total")
              ),
              totalPages: 1
            };
          }
          records.push(...pageRecords);
          registry.batch(() => {
            dispatch3.receiveEntityRecords(
              kind,
              name,
              records,
              query,
              false,
              void 0,
              meta
            );
            dispatch3.finishResolutions(
              "getEntityRecord",
              getResolutionsArgs(pageRecords, rawQuery)
            );
          });
          page++;
        } while (page <= totalPages);
      } else {
        records = Object.values(await (0, import_api_fetch9.default)({ path }));
        meta = {
          totalItems: records.length,
          totalPages: 1
        };
      }
      if (entityConfig.syncConfig && -1 === query.per_page) {
        const objectType = `${kind}/${name}`;
        getSyncManager()?.loadCollection(
          entityConfig.syncConfig,
          objectType,
          {
            onStatusChange: (status) => {
              dispatch3.setSyncConnectionStatus(
                kind,
                name,
                null,
                status
              );
            },
            refetchRecords: async () => {
              dispatch3.receiveEntityRecords(
                kind,
                name,
                await (0, import_api_fetch9.default)({ path, parse: true }),
                query
              );
            }
          }
        );
      }
      if (query._fields) {
        records = records.map((record) => {
          query._fields.split(",").forEach((field) => {
            if (!record.hasOwnProperty(field)) {
              record[field] = void 0;
            }
          });
          return record;
        });
      }
      registry.batch(() => {
        dispatch3.receiveEntityRecords(
          kind,
          name,
          records,
          query,
          false,
          void 0,
          meta
        );
        const targetHints = records.filter(
          (record) => !!record?.[key] && !!record?._links?.self?.[0]?.targetHints?.allow
        ).map((record) => ({
          id: record[key],
          permissions: getUserPermissionsFromAllowHeader(
            record._links.self[0].targetHints.allow
          )
        }));
        const canUserResolutionsArgs = [];
        const receiveUserPermissionArgs = {};
        for (const targetHint of targetHints) {
          for (const action of ALLOWED_RESOURCE_ACTIONS) {
            canUserResolutionsArgs.push([
              action,
              { kind, name, id: targetHint.id }
            ]);
            receiveUserPermissionArgs[getUserPermissionCacheKey(action, {
              kind,
              name,
              id: targetHint.id
            })] = targetHint.permissions[action];
          }
        }
        if (targetHints.length > 0) {
          dispatch3.receiveUserPermissions(
            receiveUserPermissionArgs
          );
          dispatch3.finishResolutions(
            "canUser",
            canUserResolutionsArgs
          );
        }
        dispatch3.finishResolutions(
          "getEntityRecord",
          getResolutionsArgs(records, rawQuery)
        );
        dispatch3.__unstableReleaseStoreLock(lock3);
      });
    } catch (e) {
      dispatch3.__unstableReleaseStoreLock(lock3);
    }
  };
  getEntityRecords2.shouldInvalidate = (action, kind, name) => {
    return (action.type === "RECEIVE_ITEMS" || action.type === "REMOVE_ITEMS") && action.invalidateCache && kind === action.kind && name === action.name;
  };
  var getEntityRecordsTotalItems2 = forward_resolver_default("getEntityRecords");
  var getEntityRecordsTotalPages2 = forward_resolver_default("getEntityRecords");
  var getCurrentTheme2 = () => async ({ dispatch: dispatch3, resolveSelect: resolveSelect2 }) => {
    const activeThemes = await resolveSelect2.getEntityRecords(
      "root",
      "theme",
      { status: "active" }
    );
    dispatch3.receiveCurrentTheme(activeThemes[0]);
  };
  var getThemeSupports2 = forward_resolver_default("getCurrentTheme");
  var getEmbedPreview2 = (url) => async ({ dispatch: dispatch3 }) => {
    try {
      const embedProxyResponse = await (0, import_api_fetch9.default)({
        path: (0, import_url6.addQueryArgs)("/oembed/1.0/proxy", { url })
      });
      dispatch3.receiveEmbedPreview(url, embedProxyResponse);
    } catch (error) {
      dispatch3.receiveEmbedPreview(url, false);
    }
  };
  var canUser2 = (requestedAction, resource, id2) => async ({ dispatch: dispatch3, registry, resolveSelect: resolveSelect2 }) => {
    if (!ALLOWED_RESOURCE_ACTIONS.includes(requestedAction)) {
      throw new Error(`'${requestedAction}' is not a valid action.`);
    }
    const { hasStartedResolution } = registry.select(STORE_NAME);
    for (const relatedAction of ALLOWED_RESOURCE_ACTIONS) {
      if (relatedAction === requestedAction) {
        continue;
      }
      const isAlreadyResolving = hasStartedResolution("canUser", [
        relatedAction,
        resource,
        id2
      ]);
      if (isAlreadyResolving) {
        return;
      }
    }
    let resourcePath = null;
    if (typeof resource === "object") {
      if (!resource.kind || !resource.name) {
        throw new Error("The entity resource object is not valid.");
      }
      const configs = await resolveSelect2.getEntitiesConfig(
        resource.kind
      );
      const entityConfig = configs.find(
        (config) => config.name === resource.name && config.kind === resource.kind
      );
      if (!entityConfig) {
        return;
      }
      resourcePath = entityConfig.baseURL + (resource.id ? "/" + resource.id : "");
    } else {
      resourcePath = `/wp/v2/${resource}` + (id2 ? "/" + id2 : "");
    }
    let response;
    try {
      response = await (0, import_api_fetch9.default)({
        path: resourcePath,
        method: "OPTIONS",
        parse: false
      });
    } catch (error) {
      return;
    }
    const permissions = getUserPermissionsFromAllowHeader(
      response.headers?.get("allow")
    );
    registry.batch(() => {
      for (const action of ALLOWED_RESOURCE_ACTIONS) {
        const key = getUserPermissionCacheKey(action, resource, id2);
        dispatch3.receiveUserPermission(key, permissions[action]);
        if (action !== requestedAction) {
          dispatch3.finishResolution("canUser", [
            action,
            resource,
            id2
          ]);
        }
      }
    });
  };
  var canUserEditEntityRecord2 = (kind, name, recordId) => async ({ dispatch: dispatch3 }) => {
    await dispatch3(canUser2("update", { kind, name, id: recordId }));
  };
  var getAutosaves2 = (postType, postId) => async ({ dispatch: dispatch3, resolveSelect: resolveSelect2 }) => {
    const {
      rest_base: restBase,
      rest_namespace: restNamespace = "wp/v2",
      supports
    } = await resolveSelect2.getPostType(postType);
    if (!supports?.autosave) {
      return;
    }
    const autosaves2 = await (0, import_api_fetch9.default)({
      path: `/${restNamespace}/${restBase}/${postId}/autosaves?context=edit`
    });
    if (autosaves2 && autosaves2.length) {
      dispatch3.receiveAutosaves(postId, autosaves2);
    }
  };
  var getAutosave2 = (postType, postId) => async ({ resolveSelect: resolveSelect2 }) => {
    await resolveSelect2.getAutosaves(postType, postId);
  };
  var __experimentalGetCurrentGlobalStylesId2 = () => async ({ dispatch: dispatch3, resolveSelect: resolveSelect2 }) => {
    const activeThemes = await resolveSelect2.getEntityRecords(
      "root",
      "theme",
      { status: "active" }
    );
    const globalStylesURL = activeThemes?.[0]?._links?.["wp:user-global-styles"]?.[0]?.href;
    if (!globalStylesURL) {
      return;
    }
    const matches = globalStylesURL.match(/\/(\d+)(?:\?|$)/);
    const id2 = matches ? Number(matches[1]) : null;
    if (id2) {
      dispatch3.__experimentalReceiveCurrentGlobalStylesId(id2);
    }
  };
  var __experimentalGetCurrentThemeBaseGlobalStyles2 = () => async ({ resolveSelect: resolveSelect2, dispatch: dispatch3 }) => {
    const currentTheme2 = await resolveSelect2.getCurrentTheme();
    const themeGlobalStyles = await (0, import_api_fetch9.default)({
      path: `/wp/v2/global-styles/themes/${currentTheme2.stylesheet}?context=view`
    });
    dispatch3.__experimentalReceiveThemeBaseGlobalStyles(
      currentTheme2.stylesheet,
      themeGlobalStyles
    );
  };
  var __experimentalGetCurrentThemeGlobalStylesVariations2 = () => async ({ resolveSelect: resolveSelect2, dispatch: dispatch3 }) => {
    const currentTheme2 = await resolveSelect2.getCurrentTheme();
    const variations = await (0, import_api_fetch9.default)({
      path: `/wp/v2/global-styles/themes/${currentTheme2.stylesheet}/variations?context=view`
    });
    dispatch3.__experimentalReceiveThemeGlobalStyleVariations(
      currentTheme2.stylesheet,
      variations
    );
  };
  var getCurrentThemeGlobalStylesRevisions2 = () => async ({ resolveSelect: resolveSelect2, dispatch: dispatch3 }) => {
    const globalStylesId = await resolveSelect2.__experimentalGetCurrentGlobalStylesId();
    const record = globalStylesId ? await resolveSelect2.getEntityRecord(
      "root",
      "globalStyles",
      globalStylesId
    ) : void 0;
    const revisionsURL = record?._links?.["version-history"]?.[0]?.href;
    if (revisionsURL) {
      const resetRevisions = await (0, import_api_fetch9.default)({
        url: revisionsURL
      });
      const revisions = resetRevisions?.map(
        (revision) => Object.fromEntries(
          Object.entries(revision).map(([key, value]) => [
            camelCase(key),
            value
          ])
        )
      );
      dispatch3.receiveThemeGlobalStyleRevisions(
        globalStylesId,
        revisions
      );
    }
  };
  getCurrentThemeGlobalStylesRevisions2.shouldInvalidate = (action) => {
    return action.type === "SAVE_ENTITY_RECORD_FINISH" && action.kind === "root" && !action.error && action.name === "globalStyles";
  };
  var getBlockPatterns2 = () => async ({ dispatch: dispatch3 }) => {
    const patterns = await fetchBlockPatterns();
    dispatch3({ type: "RECEIVE_BLOCK_PATTERNS", patterns });
  };
  var getBlockPatternCategories2 = () => async ({ dispatch: dispatch3 }) => {
    const categories = await (0, import_api_fetch9.default)({
      path: "/wp/v2/block-patterns/categories"
    });
    dispatch3({ type: "RECEIVE_BLOCK_PATTERN_CATEGORIES", categories });
  };
  var getUserPatternCategories2 = () => async ({ dispatch: dispatch3, resolveSelect: resolveSelect2 }) => {
    const patternCategories = await resolveSelect2.getEntityRecords(
      "taxonomy",
      "wp_pattern_category",
      {
        per_page: -1,
        _fields: "id,name,description,slug",
        context: "view"
      }
    );
    const mappedPatternCategories = patternCategories?.map((userCategory) => ({
      ...userCategory,
      label: (0, import_html_entities2.decodeEntities)(userCategory.name),
      name: userCategory.slug
    })) || [];
    dispatch3({
      type: "RECEIVE_USER_PATTERN_CATEGORIES",
      patternCategories: mappedPatternCategories
    });
  };
  var getNavigationFallbackId2 = () => async ({ dispatch: dispatch3, select: select5, registry }) => {
    const fallback = await (0, import_api_fetch9.default)({
      path: (0, import_url6.addQueryArgs)("/wp-block-editor/v1/navigation-fallback", {
        _embed: true
      })
    });
    const record = fallback?._embedded?.self;
    registry.batch(() => {
      dispatch3.receiveNavigationFallbackId(fallback?.id);
      if (!record) {
        return;
      }
      const existingFallbackEntityRecord = select5.getEntityRecord(
        "postType",
        "wp_navigation",
        fallback.id
      );
      const invalidateNavigationQueries = !existingFallbackEntityRecord;
      dispatch3.receiveEntityRecords(
        "postType",
        "wp_navigation",
        record,
        void 0,
        invalidateNavigationQueries
      );
      dispatch3.finishResolution("getEntityRecord", [
        "postType",
        "wp_navigation",
        fallback.id
      ]);
    });
  };
  var getDefaultTemplateId2 = (query) => async ({ dispatch: dispatch3, registry, resolveSelect: resolveSelect2 }) => {
    const template = await (0, import_api_fetch9.default)({
      path: (0, import_url6.addQueryArgs)("/wp/v2/templates/lookup", query)
    });
    await resolveSelect2.getEntitiesConfig("postType");
    const id2 = window?.__experimentalTemplateActivate ? template?.wp_id || template?.id : template?.id;
    if (id2) {
      template.id = id2;
      registry.batch(() => {
        dispatch3.receiveDefaultTemplateId(query, id2);
        dispatch3.receiveEntityRecords(
          "postType",
          template.type,
          template
        );
        dispatch3.finishResolution("getEntityRecord", [
          "postType",
          template.type,
          id2
        ]);
      });
    }
  };
  getDefaultTemplateId2.shouldInvalidate = (action) => {
    return action.type === "RECEIVE_ITEMS" && action.kind === "root" && action.name === "site";
  };
  var getRevisions2 = (kind, name, recordKey, query = {}) => async ({ dispatch: dispatch3, registry, resolveSelect: resolveSelect2 }) => {
    const configs = await resolveSelect2.getEntitiesConfig(kind);
    const entityConfig = configs.find(
      (config) => config.name === name && config.kind === kind
    );
    if (!entityConfig) {
      return;
    }
    if (query._fields) {
      query = {
        ...query,
        _fields: [
          .../* @__PURE__ */ new Set([
            ...get_normalized_comma_separable_default(query._fields) || [],
            entityConfig.revisionKey || DEFAULT_ENTITY_KEY
          ])
        ].join()
      };
    }
    const path = (0, import_url6.addQueryArgs)(
      entityConfig.getRevisionsUrl(recordKey),
      query
    );
    let records, response;
    const meta = {};
    const isPaginated = entityConfig.supportsPagination && query.per_page !== -1;
    try {
      response = await (0, import_api_fetch9.default)({ path, parse: !isPaginated });
    } catch (error) {
      return;
    }
    if (response) {
      if (isPaginated) {
        records = Object.values(await response.json());
        meta.totalItems = parseInt(
          response.headers.get("X-WP-Total")
        );
      } else {
        records = Object.values(response);
      }
      if (query._fields) {
        records = records.map((record) => {
          query._fields.split(",").forEach((field) => {
            if (!record.hasOwnProperty(field)) {
              record[field] = void 0;
            }
          });
          return record;
        });
      }
      registry.batch(() => {
        dispatch3.receiveRevisions(
          kind,
          name,
          recordKey,
          records,
          query,
          false,
          meta
        );
        if (!query?._fields && !query.context) {
          const key = entityConfig.revisionKey || DEFAULT_ENTITY_KEY;
          const resolutionsArgs = records.filter((record) => record[key]).map((record) => [
            kind,
            name,
            recordKey,
            record[key]
          ]);
          dispatch3.finishResolutions(
            "getRevision",
            resolutionsArgs
          );
        }
      });
    }
  };
  getRevisions2.shouldInvalidate = (action, kind, name, recordKey) => action.type === "SAVE_ENTITY_RECORD_FINISH" && name === action.name && kind === action.kind && !action.error && recordKey === action.recordId;
  var getRevision2 = (kind, name, recordKey, revisionKey, query) => async ({ dispatch: dispatch3, resolveSelect: resolveSelect2 }) => {
    const configs = await resolveSelect2.getEntitiesConfig(kind);
    const entityConfig = configs.find(
      (config) => config.name === name && config.kind === kind
    );
    if (!entityConfig) {
      return;
    }
    if (query !== void 0 && query._fields) {
      query = {
        ...query,
        _fields: [
          .../* @__PURE__ */ new Set([
            ...get_normalized_comma_separable_default(query._fields) || [],
            entityConfig.revisionKey || DEFAULT_ENTITY_KEY
          ])
        ].join()
      };
    }
    const path = (0, import_url6.addQueryArgs)(
      entityConfig.getRevisionsUrl(recordKey, revisionKey),
      query
    );
    let record;
    try {
      record = await (0, import_api_fetch9.default)({ path });
    } catch (error) {
      return;
    }
    if (record) {
      dispatch3.receiveRevisions(kind, name, recordKey, record, query);
    }
  };
  var getRegisteredPostMeta2 = (postType) => async ({ dispatch: dispatch3, resolveSelect: resolveSelect2 }) => {
    let options;
    try {
      const {
        rest_namespace: restNamespace = "wp/v2",
        rest_base: restBase
      } = await resolveSelect2.getPostType(postType) || {};
      options = await (0, import_api_fetch9.default)({
        path: `${restNamespace}/${restBase}/?context=edit`,
        method: "OPTIONS"
      });
    } catch (error) {
      return;
    }
    if (options) {
      dispatch3.receiveRegisteredPostMeta(
        postType,
        options?.schema?.properties?.meta?.properties
      );
    }
  };
  var getEntitiesConfig2 = (kind) => async ({ dispatch: dispatch3 }) => {
    const loader = additionalEntityConfigLoaders.find(
      (l) => l.kind === kind
    );
    if (!loader) {
      return;
    }
    try {
      const configs = await loader.loadEntities();
      if (!configs.length) {
        return;
      }
      dispatch3.addEntities(configs);
    } catch {
    }
  };
  var getEditorSettings2 = () => async ({ dispatch: dispatch3 }) => {
    const settings = await (0, import_api_fetch9.default)({
      path: "/wp-block-editor/v1/settings"
    });
    dispatch3.receiveEditorSettings(settings);
  };
  var getEditorAssets2 = () => async ({ dispatch: dispatch3 }) => {
    const assets = await (0, import_api_fetch9.default)({
      path: "/wp-block-editor/v1/assets"
    });
    dispatch3.receiveEditorAssets(assets);
  };

  // packages/core-data/build-module/locks/utils.mjs
  function deepCopyLocksTreePath(tree, path) {
    const newTree = { ...tree };
    let currentNode = newTree;
    for (const branchName of path) {
      currentNode.children = {
        ...currentNode.children,
        [branchName]: {
          locks: [],
          children: {},
          ...currentNode.children[branchName]
        }
      };
      currentNode = currentNode.children[branchName];
    }
    return newTree;
  }
  function getNode(tree, path) {
    let currentNode = tree;
    for (const branchName of path) {
      const nextNode = currentNode.children[branchName];
      if (!nextNode) {
        return null;
      }
      currentNode = nextNode;
    }
    return currentNode;
  }
  function* iteratePath(tree, path) {
    let currentNode = tree;
    yield currentNode;
    for (const branchName of path) {
      const nextNode = currentNode.children[branchName];
      if (!nextNode) {
        break;
      }
      yield nextNode;
      currentNode = nextNode;
    }
  }
  function* iterateDescendants(node) {
    const stack = Object.values(node.children);
    while (stack.length) {
      const childNode = stack.pop();
      yield childNode;
      stack.push(...Object.values(childNode.children));
    }
  }
  function hasConflictingLock({ exclusive }, locks2) {
    if (exclusive && locks2.length) {
      return true;
    }
    if (!exclusive && locks2.filter((lock3) => lock3.exclusive).length) {
      return true;
    }
    return false;
  }

  // packages/core-data/build-module/locks/reducer.mjs
  var DEFAULT_STATE = {
    requests: [],
    tree: {
      locks: [],
      children: {}
    }
  };
  function locks(state = DEFAULT_STATE, action) {
    switch (action.type) {
      case "ENQUEUE_LOCK_REQUEST": {
        const { request } = action;
        return {
          ...state,
          requests: [request, ...state.requests]
        };
      }
      case "GRANT_LOCK_REQUEST": {
        const { lock: lock3, request } = action;
        const { store: store2, path } = request;
        const storePath = [store2, ...path];
        const newTree = deepCopyLocksTreePath(state.tree, storePath);
        const node = getNode(newTree, storePath);
        node.locks = [...node.locks, lock3];
        return {
          ...state,
          requests: state.requests.filter((r) => r !== request),
          tree: newTree
        };
      }
      case "RELEASE_LOCK": {
        const { lock: lock3 } = action;
        const storePath = [lock3.store, ...lock3.path];
        const newTree = deepCopyLocksTreePath(state.tree, storePath);
        const node = getNode(newTree, storePath);
        node.locks = node.locks.filter((l) => l !== lock3);
        return {
          ...state,
          tree: newTree
        };
      }
    }
    return state;
  }

  // packages/core-data/build-module/locks/selectors.mjs
  function getPendingLockRequests(state) {
    return state.requests;
  }
  function isLockAvailable(state, store2, path, { exclusive }) {
    const storePath = [store2, ...path];
    const locks2 = state.tree;
    for (const node2 of iteratePath(locks2, storePath)) {
      if (hasConflictingLock({ exclusive }, node2.locks)) {
        return false;
      }
    }
    const node = getNode(locks2, storePath);
    if (!node) {
      return true;
    }
    for (const descendant of iterateDescendants(node)) {
      if (hasConflictingLock({ exclusive }, descendant.locks)) {
        return false;
      }
    }
    return true;
  }

  // packages/core-data/build-module/locks/engine.mjs
  function createLocks() {
    let state = locks(void 0, { type: "@@INIT" });
    function processPendingLockRequests() {
      for (const request of getPendingLockRequests(state)) {
        const { store: store2, path, exclusive, notifyAcquired } = request;
        if (isLockAvailable(state, store2, path, { exclusive })) {
          const lock3 = { store: store2, path, exclusive };
          state = locks(state, {
            type: "GRANT_LOCK_REQUEST",
            lock: lock3,
            request
          });
          notifyAcquired(lock3);
        }
      }
    }
    function acquire(store2, path, exclusive) {
      return new Promise((resolve) => {
        state = locks(state, {
          type: "ENQUEUE_LOCK_REQUEST",
          request: { store: store2, path, exclusive, notifyAcquired: resolve }
        });
        processPendingLockRequests();
      });
    }
    function release(lock3) {
      state = locks(state, {
        type: "RELEASE_LOCK",
        lock: lock3
      });
      processPendingLockRequests();
    }
    return { acquire, release };
  }

  // packages/core-data/build-module/locks/actions.mjs
  function createLocksActions() {
    const locks2 = createLocks();
    function __unstableAcquireStoreLock(store2, path, { exclusive }) {
      return () => locks2.acquire(store2, path, exclusive);
    }
    function __unstableReleaseStoreLock(lock3) {
      return () => locks2.release(lock3);
    }
    return { __unstableAcquireStoreLock, __unstableReleaseStoreLock };
  }

  // packages/core-data/build-module/dynamic-entities.mjs
  var dynamicActions;
  var dynamicSelectors;

  // packages/core-data/build-module/entity-provider.mjs
  var import_element2 = __toESM(require_element(), 1);

  // packages/core-data/build-module/entity-context.mjs
  var import_element = __toESM(require_element(), 1);
  var EntityContext = (0, import_element.createContext)({});
  EntityContext.displayName = "EntityContext";

  // packages/core-data/build-module/entity-provider.mjs
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  function EntityProvider({
    kind,
    type: name,
    id: id2,
    revisionId,
    children
  }) {
    const parent = (0, import_element2.useContext)(EntityContext);
    const childContext = (0, import_element2.useMemo)(
      () => ({
        ...parent,
        ...kind && {
          [kind]: {
            ...parent?.[kind],
            [name]: id2
          }
        },
        ...revisionId !== void 0 && { revisionId }
      }),
      [parent, kind, name, id2, revisionId]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EntityContext.Provider, { value: childContext, children });
  }

  // packages/core-data/build-module/hooks/use-entity-record.mjs
  var import_data12 = __toESM(require_data(), 1);
  var import_deprecated4 = __toESM(require_deprecated(), 1);
  var import_element3 = __toESM(require_element(), 1);

  // packages/core-data/build-module/hooks/use-query-select.mjs
  var import_data11 = __toESM(require_data(), 1);

  // node_modules/memize/dist/index.js
  function memize(fn, options) {
    var size2 = 0;
    var head;
    var tail;
    options = options || {};
    function memoized() {
      var node = head, len = arguments.length, args2, i;
      searchCache: while (node) {
        if (node.args.length !== arguments.length) {
          node = node.next;
          continue;
        }
        for (i = 0; i < len; i++) {
          if (node.args[i] !== arguments[i]) {
            node = node.next;
            continue searchCache;
          }
        }
        if (node !== head) {
          if (node === tail) {
            tail = node.prev;
          }
          node.prev.next = node.next;
          if (node.next) {
            node.next.prev = node.prev;
          }
          node.next = head;
          node.prev = null;
          head.prev = node;
          head = node;
        }
        return node.val;
      }
      args2 = new Array(len);
      for (i = 0; i < len; i++) {
        args2[i] = arguments[i];
      }
      node = {
        args: args2,
        // Generate the result from original function
        val: fn.apply(null, args2)
      };
      if (head) {
        head.prev = node;
        node.next = head;
      } else {
        tail = node;
      }
      if (size2 === /** @type {MemizeOptions} */
      options.maxSize) {
        tail = /** @type {MemizeCacheNode} */
        tail.prev;
        tail.next = null;
      } else {
        size2++;
      }
      head = node;
      return node.val;
    }
    memoized.clear = function() {
      head = null;
      tail = null;
      size2 = 0;
    };
    return memoized;
  }

  // packages/core-data/build-module/hooks/memoize.mjs
  var memoize_default = memize;

  // packages/core-data/build-module/hooks/constants.mjs
  var Status = /* @__PURE__ */ ((Status2) => {
    Status2["Idle"] = "IDLE";
    Status2["Resolving"] = "RESOLVING";
    Status2["Error"] = "ERROR";
    Status2["Success"] = "SUCCESS";
    return Status2;
  })(Status || {});

  // packages/core-data/build-module/hooks/use-query-select.mjs
  var META_SELECTORS = [
    "getIsResolving",
    "hasStartedResolution",
    "hasFinishedResolution",
    "isResolving",
    "getCachedResolvers"
  ];
  function useQuerySelect(mapQuerySelect, deps) {
    return (0, import_data11.useSelect)((select5, registry) => {
      const resolve = (store2) => enrichSelectors(select5(store2));
      return mapQuerySelect(resolve, registry);
    }, deps);
  }
  var enrichSelectors = memoize_default(((selectors) => {
    const resolvers = {};
    for (const selectorName in selectors) {
      if (META_SELECTORS.includes(selectorName)) {
        continue;
      }
      Object.defineProperty(resolvers, selectorName, {
        get: () => (...args2) => {
          const data = selectors[selectorName](...args2);
          const resolutionStatus = selectors.getResolutionState(
            selectorName,
            args2
          )?.status;
          let status;
          switch (resolutionStatus) {
            case "resolving":
              status = Status.Resolving;
              break;
            case "finished":
              status = Status.Success;
              break;
            case "error":
              status = Status.Error;
              break;
            case void 0:
              status = Status.Idle;
              break;
          }
          return {
            data,
            status,
            isResolving: status === Status.Resolving,
            hasStarted: status !== Status.Idle,
            hasResolved: status === Status.Success || status === Status.Error
          };
        }
      });
    }
    return resolvers;
  }));

  // packages/core-data/build-module/hooks/use-entity-record.mjs
  var EMPTY_OBJECT2 = {};
  function useEntityRecord(kind, name, recordId, options = { enabled: true }) {
    const { editEntityRecord: editEntityRecord2, saveEditedEntityRecord: saveEditedEntityRecord2 } = (0, import_data12.useDispatch)(store);
    const mutations = (0, import_element3.useMemo)(
      () => ({
        edit: (record2, editOptions = {}) => editEntityRecord2(kind, name, recordId, record2, editOptions),
        save: (saveOptions = {}) => saveEditedEntityRecord2(kind, name, recordId, {
          throwOnError: true,
          ...saveOptions
        })
      }),
      [editEntityRecord2, kind, name, recordId, saveEditedEntityRecord2]
    );
    const { editedRecord, hasEdits, edits } = (0, import_data12.useSelect)(
      (select5) => {
        if (!options.enabled) {
          return {
            editedRecord: EMPTY_OBJECT2,
            hasEdits: false,
            edits: EMPTY_OBJECT2
          };
        }
        return {
          editedRecord: select5(store).getEditedEntityRecord(
            kind,
            name,
            recordId
          ),
          hasEdits: select5(store).hasEditsForEntityRecord(
            kind,
            name,
            recordId
          ),
          edits: select5(store).getEntityRecordNonTransientEdits(
            kind,
            name,
            recordId
          )
        };
      },
      [kind, name, recordId, options.enabled]
    );
    const { data: record, ...querySelectRest } = useQuerySelect(
      (query) => {
        if (!options.enabled) {
          return {
            data: null
          };
        }
        return query(store).getEntityRecord(kind, name, recordId);
      },
      [kind, name, recordId, options.enabled]
    );
    return {
      record,
      editedRecord,
      hasEdits,
      edits,
      ...querySelectRest,
      ...mutations
    };
  }
  function __experimentalUseEntityRecord(kind, name, recordId, options) {
    (0, import_deprecated4.default)(`wp.data.__experimentalUseEntityRecord`, {
      alternative: "wp.data.useEntityRecord",
      since: "6.1"
    });
    return useEntityRecord(kind, name, recordId, options);
  }

  // packages/core-data/build-module/hooks/use-entity-records.mjs
  var import_url7 = __toESM(require_url(), 1);
  var import_deprecated5 = __toESM(require_deprecated(), 1);
  var import_data13 = __toESM(require_data(), 1);
  var import_element4 = __toESM(require_element(), 1);
  var EMPTY_ARRAY = [];
  function useEntityRecords(kind, name, queryArgs = {}, options = { enabled: true }) {
    const queryAsString = (0, import_url7.addQueryArgs)("", queryArgs);
    const { data: records, ...rest } = useQuerySelect(
      (query) => {
        if (!options.enabled) {
          return {
            // Avoiding returning a new reference on every execution.
            data: EMPTY_ARRAY
          };
        }
        return query(store).getEntityRecords(kind, name, queryArgs);
      },
      [kind, name, queryAsString, options.enabled]
    );
    const { totalItems, totalPages } = (0, import_data13.useSelect)(
      (select5) => {
        if (!options.enabled) {
          return {
            totalItems: null,
            totalPages: null
          };
        }
        return {
          totalItems: select5(store).getEntityRecordsTotalItems(
            kind,
            name,
            queryArgs
          ),
          totalPages: select5(store).getEntityRecordsTotalPages(
            kind,
            name,
            queryArgs
          )
        };
      },
      [kind, name, queryAsString, options.enabled]
    );
    return {
      records,
      totalItems,
      totalPages,
      ...rest
    };
  }
  function __experimentalUseEntityRecords(kind, name, queryArgs, options) {
    (0, import_deprecated5.default)(`wp.data.__experimentalUseEntityRecords`, {
      alternative: "wp.data.useEntityRecords",
      since: "6.1"
    });
    return useEntityRecords(kind, name, queryArgs, options);
  }
  function useEntityRecordsWithPermissions(kind, name, queryArgs = {}, options = { enabled: true }) {
    const entityConfig = (0, import_data13.useSelect)(
      (select5) => select5(store).getEntityConfig(kind, name),
      [kind, name]
    );
    const { records: data, ...ret } = useEntityRecords(
      kind,
      name,
      {
        ...queryArgs,
        // If _fields is provided, we need to include _links in the request for permission caching to work.
        ...queryArgs._fields ? {
          _fields: [
            .../* @__PURE__ */ new Set([
              ...get_normalized_comma_separable_default(
                queryArgs._fields
              ) || [],
              "_links"
            ])
          ].join()
        } : {}
      },
      options
    );
    const ids = (0, import_element4.useMemo)(
      () => data?.map(
        // @ts-ignore
        (record) => record[entityConfig?.key ?? "id"]
      ) ?? [],
      [data, entityConfig?.key]
    );
    const permissions = (0, import_data13.useSelect)(
      (select5) => {
        const { getEntityRecordsPermissions: getEntityRecordsPermissions2 } = unlock2(
          select5(store)
        );
        return getEntityRecordsPermissions2(kind, name, ids);
      },
      [ids, kind, name]
    );
    const dataWithPermissions = (0, import_element4.useMemo)(
      () => data?.map((record, index) => ({
        // @ts-ignore
        ...record,
        permissions: permissions[index]
      })) ?? [],
      [data, permissions]
    );
    return { records: dataWithPermissions, ...ret };
  }

  // packages/core-data/build-module/hooks/use-resource-permissions.mjs
  var import_deprecated6 = __toESM(require_deprecated(), 1);
  var import_warning = __toESM(require_warning(), 1);
  function useResourcePermissions(resource, id2) {
    const isEntity = typeof resource === "object";
    const resourceAsString = isEntity ? JSON.stringify(resource) : resource;
    if (isEntity && typeof id2 !== "undefined") {
      (0, import_warning.default)(
        `When 'resource' is an entity object, passing 'id' as a separate argument isn't supported.`
      );
    }
    return useQuerySelect(
      (resolve) => {
        const hasId = isEntity ? !!resource.id : !!id2;
        const { canUser: canUser3 } = resolve(store);
        const create9 = canUser3(
          "create",
          isEntity ? { kind: resource.kind, name: resource.name } : resource
        );
        if (!hasId) {
          const read2 = canUser3("read", resource);
          const isResolving2 = create9.isResolving || read2.isResolving;
          const hasResolved2 = create9.hasResolved && read2.hasResolved;
          let status2 = Status.Idle;
          if (isResolving2) {
            status2 = Status.Resolving;
          } else if (hasResolved2) {
            status2 = Status.Success;
          }
          return {
            status: status2,
            isResolving: isResolving2,
            hasResolved: hasResolved2,
            canCreate: create9.hasResolved && create9.data,
            canRead: read2.hasResolved && read2.data
          };
        }
        const read = canUser3("read", resource, id2);
        const update = canUser3("update", resource, id2);
        const _delete = canUser3("delete", resource, id2);
        const isResolving = read.isResolving || create9.isResolving || update.isResolving || _delete.isResolving;
        const hasResolved = read.hasResolved && create9.hasResolved && update.hasResolved && _delete.hasResolved;
        let status = Status.Idle;
        if (isResolving) {
          status = Status.Resolving;
        } else if (hasResolved) {
          status = Status.Success;
        }
        return {
          status,
          isResolving,
          hasResolved,
          canRead: hasResolved && read.data,
          canCreate: hasResolved && create9.data,
          canUpdate: hasResolved && update.data,
          canDelete: hasResolved && _delete.data
        };
      },
      [resourceAsString, id2]
    );
  }
  var use_resource_permissions_default = useResourcePermissions;
  function __experimentalUseResourcePermissions(resource, id2) {
    (0, import_deprecated6.default)(`wp.data.__experimentalUseResourcePermissions`, {
      alternative: "wp.data.useResourcePermissions",
      since: "6.1"
    });
    return useResourcePermissions(resource, id2);
  }

  // packages/core-data/build-module/hooks/use-entity-block-editor.mjs
  var import_element6 = __toESM(require_element(), 1);
  var import_data14 = __toESM(require_data(), 1);
  var import_blocks5 = __toESM(require_blocks(), 1);

  // packages/core-data/build-module/hooks/use-entity-id.mjs
  var import_element5 = __toESM(require_element(), 1);
  function useEntityId(kind, name) {
    const context = (0, import_element5.useContext)(EntityContext);
    return context?.[kind]?.[name];
  }

  // packages/core-data/build-module/footnotes/index.mjs
  var import_rich_text4 = __toESM(require_rich_text(), 1);

  // packages/core-data/build-module/footnotes/get-rich-text-values-cached.mjs
  var import_block_editor5 = __toESM(require_block_editor(), 1);
  var unlockedApis;
  var cache = /* @__PURE__ */ new WeakMap();
  function getRichTextValuesCached(block) {
    if (!unlockedApis) {
      unlockedApis = unlock2(import_block_editor5.privateApis);
    }
    if (!cache.has(block)) {
      const values = unlockedApis.getRichTextValues([block]);
      cache.set(block, values);
    }
    return cache.get(block);
  }

  // packages/core-data/build-module/footnotes/get-footnotes-order.mjs
  var cache2 = /* @__PURE__ */ new WeakMap();
  function getBlockFootnotesOrder(block) {
    if (!cache2.has(block)) {
      const order = [];
      for (const value of getRichTextValuesCached(block)) {
        if (!value) {
          continue;
        }
        value.replacements.forEach(({ type, attributes }) => {
          if (type === "core/footnote") {
            order.push(attributes["data-fn"]);
          }
        });
      }
      cache2.set(block, order);
    }
    return cache2.get(block);
  }
  function getFootnotesOrder(blocks) {
    return blocks.flatMap(getBlockFootnotesOrder);
  }

  // packages/core-data/build-module/footnotes/index.mjs
  var oldFootnotes = {};
  function updateFootnotesFromMeta(blocks, meta) {
    const output = { blocks };
    if (!meta) {
      return output;
    }
    if (meta.footnotes === void 0) {
      return output;
    }
    const newOrder = getFootnotesOrder(blocks);
    const footnotes = meta.footnotes ? JSON.parse(meta.footnotes) : [];
    const currentOrder = footnotes.map((fn) => fn.id);
    if (currentOrder.join("") === newOrder.join("")) {
      return output;
    }
    const newFootnotes = newOrder.map(
      (fnId) => footnotes.find((fn) => fn.id === fnId) || oldFootnotes[fnId] || {
        id: fnId,
        content: ""
      }
    );
    function updateAttributes(attributes) {
      if (!attributes || Array.isArray(attributes) || typeof attributes !== "object") {
        return attributes;
      }
      attributes = { ...attributes };
      for (const key in attributes) {
        const value = attributes[key];
        if (Array.isArray(value)) {
          attributes[key] = value.map(updateAttributes);
          continue;
        }
        if (typeof value !== "string" && !(value instanceof import_rich_text4.RichTextData)) {
          continue;
        }
        const richTextValue = typeof value === "string" ? import_rich_text4.RichTextData.fromHTMLString(value) : new import_rich_text4.RichTextData(value);
        let hasFootnotes = false;
        richTextValue.replacements.forEach((replacement) => {
          if (replacement.type === "core/footnote") {
            const id2 = replacement.attributes["data-fn"];
            const index = newOrder.indexOf(id2);
            const countValue = (0, import_rich_text4.create)({
              html: replacement.innerHTML
            });
            countValue.text = String(index + 1);
            countValue.formats = Array.from(
              { length: countValue.text.length },
              () => countValue.formats[0]
            );
            countValue.replacements = Array.from(
              { length: countValue.text.length },
              () => countValue.replacements[0]
            );
            replacement.innerHTML = (0, import_rich_text4.toHTMLString)({
              value: countValue
            });
            hasFootnotes = true;
          }
        });
        if (hasFootnotes) {
          attributes[key] = typeof value === "string" ? richTextValue.toHTMLString() : richTextValue;
        }
      }
      return attributes;
    }
    function updateBlocksAttributes(__blocks) {
      return __blocks.map((block) => {
        return {
          ...block,
          attributes: updateAttributes(block.attributes),
          innerBlocks: updateBlocksAttributes(block.innerBlocks)
        };
      });
    }
    const newBlocks = updateBlocksAttributes(blocks);
    oldFootnotes = {
      ...oldFootnotes,
      ...footnotes.reduce((acc, fn) => {
        if (!newOrder.includes(fn.id)) {
          acc[fn.id] = fn;
        }
        return acc;
      }, {})
    };
    return {
      meta: {
        ...meta,
        footnotes: JSON.stringify(newFootnotes)
      },
      blocks: newBlocks
    };
  }

  // packages/core-data/build-module/hooks/use-entity-block-editor.mjs
  var EMPTY_ARRAY2 = [];
  var parsedBlocksCache = /* @__PURE__ */ new Map();
  function useEntityBlockEditor(kind, name, { id: _id } = {}) {
    const providerId = useEntityId(kind, name);
    const id2 = _id ?? providerId;
    const { content, editedBlocks, meta } = (0, import_data14.useSelect)(
      (select5) => {
        if (!id2) {
          return {};
        }
        const { getEditedEntityRecord: getEditedEntityRecord3 } = select5(STORE_NAME);
        const editedRecord = getEditedEntityRecord3(kind, name, id2);
        return {
          editedBlocks: editedRecord.blocks,
          content: editedRecord.content,
          meta: editedRecord.meta
        };
      },
      [kind, name, id2]
    );
    const { __unstableCreateUndoLevel: __unstableCreateUndoLevel2, editEntityRecord: editEntityRecord2 } = (0, import_data14.useDispatch)(STORE_NAME);
    const blocks = (0, import_element6.useMemo)(() => {
      if (!id2) {
        return void 0;
      }
      if (editedBlocks) {
        return editedBlocks;
      }
      if (!content || typeof content !== "string") {
        return EMPTY_ARRAY2;
      }
      const cacheKey = `${kind}:${name}:${id2}`;
      const cached = parsedBlocksCache.get(cacheKey);
      let _blocks;
      if (cached && cached.content === content) {
        _blocks = cached.blocks;
      } else {
        _blocks = (0, import_blocks5.parse)(content);
        parsedBlocksCache.set(cacheKey, { content, blocks: _blocks });
      }
      return _blocks;
    }, [kind, name, id2, editedBlocks, content]);
    const onChange = (0, import_element6.useCallback)(
      (newBlocks, options) => {
        const noChange = blocks === newBlocks;
        if (noChange) {
          return __unstableCreateUndoLevel2(kind, name, id2);
        }
        const { selection, ...rest } = options;
        const edits = {
          selection,
          content: ({ blocks: blocksForSerialization = [] }) => (0, import_blocks5.__unstableSerializeAndClean)(blocksForSerialization),
          ...updateFootnotesFromMeta(newBlocks, meta)
        };
        editEntityRecord2(kind, name, id2, edits, {
          isCached: false,
          ...rest
        });
      },
      [
        kind,
        name,
        id2,
        blocks,
        meta,
        __unstableCreateUndoLevel2,
        editEntityRecord2
      ]
    );
    const onInput = (0, import_element6.useCallback)(
      (newBlocks, options) => {
        const { selection, ...rest } = options;
        const edits = {
          selection,
          ...updateFootnotesFromMeta(newBlocks, meta)
        };
        editEntityRecord2(kind, name, id2, edits, {
          isCached: true,
          ...rest
        });
      },
      [kind, name, id2, meta, editEntityRecord2]
    );
    return [blocks, onInput, onChange];
  }

  // packages/core-data/build-module/hooks/use-entity-prop.mjs
  var import_element7 = __toESM(require_element(), 1);
  var import_data15 = __toESM(require_data(), 1);
  function useEntityProp(kind, name, prop, _id) {
    const providerId = useEntityId(kind, name);
    const id2 = _id ?? providerId;
    const context = (0, import_element7.useContext)(EntityContext);
    const revisionId = context?.revisionId;
    const { value, fullValue } = (0, import_data15.useSelect)(
      (select5) => {
        if (revisionId) {
          const revisions = select5(STORE_NAME).getRevisions(
            kind,
            name,
            id2,
            {
              per_page: -1,
              context: "edit",
              _fields: "id,date,author,meta,title.raw,excerpt.raw,content.raw"
            }
          );
          const entityConfig = select5(STORE_NAME).getEntityConfig(
            kind,
            name
          );
          const revKey = entityConfig?.revisionKey || DEFAULT_ENTITY_KEY;
          const revision = revisions?.find(
            (r) => r[revKey] === revisionId
          );
          return revision ? {
            value: revision[prop]?.raw ?? revision[prop],
            fullValue: revision[prop]
          } : {};
        }
        const { getEntityRecord: getEntityRecord3, getEditedEntityRecord: getEditedEntityRecord3 } = select5(STORE_NAME);
        const record = getEntityRecord3(kind, name, id2);
        const editedRecord = getEditedEntityRecord3(kind, name, id2);
        return record && editedRecord ? {
          value: editedRecord[prop],
          fullValue: record[prop]
        } : {};
      },
      [kind, name, id2, prop, revisionId]
    );
    const { editEntityRecord: editEntityRecord2 } = (0, import_data15.useDispatch)(STORE_NAME);
    const setValue = (0, import_element7.useCallback)(
      (newValue) => {
        if (revisionId) {
          return;
        }
        editEntityRecord2(kind, name, id2, {
          [prop]: newValue
        });
      },
      [editEntityRecord2, kind, name, id2, prop, revisionId]
    );
    return [value, setValue, fullValue];
  }

  // packages/core-data/build-module/hooks/use-post-editor-awareness-state.mjs
  var import_compose3 = __toESM(require_compose(), 1);
  var import_element8 = __toESM(require_element(), 1);
  var defaultResolvedSelection = {
    richTextOffset: null,
    localClientId: null
  };
  var defaultState = {
    activeCollaborators: [],
    resolveSelection: () => defaultResolvedSelection,
    getDebugData: () => ({
      doc: {},
      clients: {},
      collaboratorMap: {}
    }),
    isCurrentCollaboratorDisconnected: false
  };
  function getAwarenessState(awareness, newState) {
    const activeCollaborators = newState ?? awareness.getCurrentState();
    return {
      activeCollaborators,
      resolveSelection: (selection) => awareness.convertSelectionStateToAbsolute(selection),
      getDebugData: () => awareness.getDebugData(),
      isCurrentCollaboratorDisconnected: activeCollaborators.find((collaborator) => collaborator.isMe)?.isConnected === false
    };
  }
  function usePostEditorAwarenessState(postId, postType) {
    const [state, setState] = (0, import_element8.useState)(defaultState);
    (0, import_element8.useEffect)(() => {
      if (null === postId || null === postType) {
        setState(defaultState);
        return;
      }
      const objectType = `postType/${postType}`;
      const objectId = postId.toString();
      const awareness = getSyncManager()?.getAwareness(
        objectType,
        objectId
      );
      if (!awareness) {
        setState(defaultState);
        return;
      }
      awareness.setUp();
      setState(getAwarenessState(awareness));
      const unsubscribe = awareness?.onStateChange(
        (newState) => {
          setState(getAwarenessState(awareness, newState));
        }
      );
      return unsubscribe;
    }, [postId, postType]);
    return state;
  }
  function useActiveCollaborators(postId, postType) {
    return usePostEditorAwarenessState(postId, postType).activeCollaborators;
  }
  function useResolvedSelection(postId, postType) {
    return usePostEditorAwarenessState(postId, postType).resolveSelection;
  }
  function useLastPostSave(postId, postType) {
    const [lastSave, setLastSave] = (0, import_element8.useState)(null);
    (0, import_element8.useEffect)(() => {
      if (null === postId || null === postType) {
        setLastSave(null);
        return;
      }
      const awareness = getSyncManager()?.getAwareness(
        `postType/${postType}`,
        postId.toString()
      );
      if (!awareness) {
        setLastSave(null);
        return;
      }
      awareness.setUp();
      const stateMap = awareness.doc.getMap("state");
      const recordMap = awareness.doc.getMap("document");
      const setupTime = Date.now();
      const observer = (event) => {
        if (event.keysChanged.has("savedAt")) {
          const savedAt = stateMap.get("savedAt");
          const savedByClientId = stateMap.get("savedBy");
          if (typeof savedAt === "number" && typeof savedByClientId === "number" && savedAt > setupTime) {
            const postStatus = recordMap.get("status");
            setLastSave({ savedAt, savedByClientId, postStatus });
          }
        }
      };
      stateMap.observe(observer);
      return () => {
        stateMap.unobserve(observer);
      };
    }, [postId, postType]);
    return lastSave;
  }
  function useOnCollaboratorJoin(postId, postType, callback) {
    const { activeCollaborators } = usePostEditorAwarenessState(
      postId,
      postType
    );
    const prevCollaborators = (0, import_compose3.usePrevious)(activeCollaborators);
    (0, import_element8.useEffect)(() => {
      if (!prevCollaborators || prevCollaborators.length === 0) {
        return;
      }
      const prevMap = new Map(
        prevCollaborators.map((collaborator) => [
          collaborator.clientId,
          collaborator
        ])
      );
      const me = activeCollaborators.find(
        (collaborator) => collaborator.isMe
      );
      for (const collaborator of activeCollaborators) {
        if (!prevMap.has(collaborator.clientId) && !collaborator.isMe) {
          callback(collaborator, me);
        }
      }
    }, [activeCollaborators, prevCollaborators, callback]);
  }
  function useOnCollaboratorLeave(postId, postType, callback) {
    const { activeCollaborators } = usePostEditorAwarenessState(
      postId,
      postType
    );
    const prevCollaborators = (0, import_compose3.usePrevious)(activeCollaborators);
    (0, import_element8.useEffect)(() => {
      if (!prevCollaborators || prevCollaborators.length === 0) {
        return;
      }
      const newMap = new Map(
        activeCollaborators.map((collaborator) => [
          collaborator.clientId,
          collaborator
        ])
      );
      for (const prevCollab of prevCollaborators) {
        if (prevCollab.isMe || !prevCollab.isConnected) {
          continue;
        }
        const newCollab = newMap.get(prevCollab.clientId);
        if (!newCollab?.isConnected) {
          callback(prevCollab);
        }
      }
    }, [activeCollaborators, prevCollaborators, callback]);
  }
  function useOnPostSave(postId, postType, callback) {
    const { activeCollaborators } = usePostEditorAwarenessState(
      postId,
      postType
    );
    const lastPostSave = useLastPostSave(postId, postType);
    const prevPostSave = (0, import_compose3.usePrevious)(lastPostSave);
    (0, import_element8.useEffect)(() => {
      if (!lastPostSave) {
        return;
      }
      if (prevPostSave && lastPostSave.savedAt === prevPostSave.savedAt) {
        return;
      }
      const saver = activeCollaborators.find(
        (collaborator) => collaborator.clientId === lastPostSave.savedByClientId && !collaborator.isMe
      );
      if (!saver) {
        return;
      }
      callback(lastPostSave, saver, prevPostSave ?? null);
    }, [lastPostSave, prevPostSave, activeCollaborators, callback]);
  }

  // packages/core-data/build-module/private-apis.mjs
  var lockedApis = {
    useEntityRecordsWithPermissions,
    RECEIVE_INTERMEDIATE_RESULTS,
    retrySyncConnection,
    useActiveCollaborators,
    useResolvedSelection,
    useOnCollaboratorJoin,
    useOnCollaboratorLeave,
    useOnPostSave,
    SelectionType,
    SelectionDirection
  };
  var privateApis2 = {};
  lock2(privateApis2, lockedApis);

  // packages/core-data/build-module/index.mjs
  var entitiesConfig2 = [
    ...rootEntitiesConfig,
    ...additionalEntityConfigLoaders.filter((config) => !!config.name)
  ];
  var entitySelectors = entitiesConfig2.reduce((result, entity2) => {
    const { kind, name, plural } = entity2;
    const getEntityRecordMethodName = getMethodName(kind, name);
    result[getEntityRecordMethodName] = (state, key, query) => {
      logEntityDeprecation(kind, name, getEntityRecordMethodName, {
        isShorthandSelector: true,
        alternativeFunctionName: "getEntityRecord"
      });
      return getEntityRecord(state, kind, name, key, query);
    };
    if (plural) {
      const getEntityRecordsMethodName = getMethodName(kind, plural, "get");
      result[getEntityRecordsMethodName] = (state, query) => {
        logEntityDeprecation(kind, name, getEntityRecordsMethodName, {
          isShorthandSelector: true,
          alternativeFunctionName: "getEntityRecords"
        });
        return getEntityRecords(state, kind, name, query);
      };
    }
    return result;
  }, {});
  var entityResolvers = entitiesConfig2.reduce((result, entity2) => {
    const { kind, name, plural } = entity2;
    const getEntityRecordMethodName = getMethodName(kind, name);
    result[getEntityRecordMethodName] = (key, query) => {
      logEntityDeprecation(kind, name, getEntityRecordMethodName, {
        isShorthandSelector: true,
        alternativeFunctionName: "getEntityRecord"
      });
      return getEntityRecord2(kind, name, key, query);
    };
    if (plural) {
      const getEntityRecordsMethodName = getMethodName(kind, plural, "get");
      result[getEntityRecordsMethodName] = (...args2) => {
        logEntityDeprecation(kind, plural, getEntityRecordsMethodName, {
          isShorthandSelector: true,
          alternativeFunctionName: "getEntityRecords"
        });
        return getEntityRecords2(kind, name, ...args2);
      };
      result[getEntityRecordsMethodName].shouldInvalidate = (action) => getEntityRecords2.shouldInvalidate(action, kind, name);
    }
    return result;
  }, {});
  var entityActions = entitiesConfig2.reduce((result, entity2) => {
    const { kind, name } = entity2;
    const saveEntityRecordMethodName = getMethodName(kind, name, "save");
    result[saveEntityRecordMethodName] = (record, options) => {
      logEntityDeprecation(kind, name, saveEntityRecordMethodName, {
        isShorthandSelector: true,
        alternativeFunctionName: "saveEntityRecord"
      });
      return saveEntityRecord(kind, name, record, options);
    };
    const deleteEntityRecordMethodName = getMethodName(kind, name, "delete");
    result[deleteEntityRecordMethodName] = (key, query, options) => {
      logEntityDeprecation(kind, name, deleteEntityRecordMethodName, {
        isShorthandSelector: true,
        alternativeFunctionName: "deleteEntityRecord"
      });
      return deleteEntityRecord(kind, name, key, query, options);
    };
    return result;
  }, {});
  var storeConfig = () => ({
    reducer: reducer_default2,
    actions: {
      ...dynamicActions,
      ...actions_exports,
      ...entityActions,
      ...createLocksActions()
    },
    selectors: {
      ...dynamicSelectors,
      ...selectors_exports,
      ...entitySelectors
    },
    resolvers: { ...resolvers_exports, ...entityResolvers }
  });
  var store = (0, import_data16.createReduxStore)(STORE_NAME, storeConfig());
  unlock2(store).registerPrivateSelectors(private_selectors_exports);
  unlock2(store).registerPrivateActions(private_actions_exports);
  (0, import_data16.register)(store);
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  dist/core-data.min.js                                                                               0000644                 00000644671 15212563776 0010526 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).coreData=(()=>{var Nh=Object.create;var Bn=Object.defineProperty;var Vh=Object.getOwnPropertyDescriptor;var Bh=Object.getOwnPropertyNames;var jh=Object.getPrototypeOf,Fh=Object.prototype.hasOwnProperty;var z=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),bt=(t,e)=>{for(var r in e)Bn(t,r,{get:e[r],enumerable:!0})},Hc=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Bh(e))!Fh.call(t,o)&&o!==r&&Bn(t,o,{get:()=>e[o],enumerable:!(n=Vh(e,o))||n.enumerable});return t};var w=(t,e,r)=>(r=t!=null?Nh(jh(t)):{},Hc(e||!t||!t.__esModule?Bn(r,"default",{value:t,enumerable:!0}):r,t)),Yh=t=>Hc(Bn({},"__esModule",{value:!0}),t);var W=z((m_,qc)=>{qc.exports=window.wp.data});var Qe=z((y_,Wc)=>{"use strict";Wc.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,o,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!t(e[o],r[o]))return!1;return!0}if(e instanceof Map&&r instanceof Map){if(e.size!==r.size)return!1;for(o of e.entries())if(!r.has(o[0]))return!1;for(o of e.entries())if(!t(o[1],r.get(o[0])))return!1;return!0}if(e instanceof Set&&r instanceof Set){if(e.size!==r.size)return!1;for(o of e.entries())if(!r.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(r)){if(n=e.length,n!=r.length)return!1;for(o=n;o--!==0;)if(e[o]!==r[o])return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;o--!==0;){var i=s[o];if(!t(e[i],r[i]))return!1}return!0}return e!==e&&r!==r}});var jn=z((E_,Jc)=>{Jc.exports=window.wp.compose});var Xc=z((w_,Qc)=>{Qc.exports=window.wp.undoManager});var sa=z((q_,oa)=>{"use strict";function Tt(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Tt=function(e){return typeof e}:Tt=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tt(t)}function Wh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ra(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Jh(t,e,r){return e&&ra(t.prototype,e),r&&ra(t,r),t}function na(t,e){var r=t._map,n=t._arrayTreeMap,o=t._objectTreeMap;if(r.has(e))return r.get(e);for(var s=Object.keys(e).sort(),i=Array.isArray(e)?n:o,c=0;c<s.length;c++){var a=s[c];if(i=i.get(a),i===void 0)return;var u=e[a];if(i=i.get(u),i===void 0)return}var l=i.get("_ekm_value");if(l)return r.delete(l[0]),l[0]=e,i.set("_ekm_value",l),r.set(e,l),l}var Qh=(function(){function t(e){if(Wh(this,t),this.clear(),e instanceof t){var r=[];e.forEach(function(o,s){r.push([s,o])}),e=r}if(e!=null)for(var n=0;n<e.length;n++)this.set(e[n][0],e[n][1])}return Jh(t,[{key:"set",value:function(r,n){if(r===null||Tt(r)!=="object")return this._map.set(r,n),this;for(var o=Object.keys(r).sort(),s=[r,n],i=Array.isArray(r)?this._arrayTreeMap:this._objectTreeMap,c=0;c<o.length;c++){var a=o[c];i.has(a)||i.set(a,new t),i=i.get(a);var u=r[a];i.has(u)||i.set(u,new t),i=i.get(u)}var l=i.get("_ekm_value");return l&&this._map.delete(l[0]),i.set("_ekm_value",s),this._map.set(r,s),this}},{key:"get",value:function(r){if(r===null||Tt(r)!=="object")return this._map.get(r);var n=na(this,r);if(n)return n[1]}},{key:"has",value:function(r){return r===null||Tt(r)!=="object"?this._map.has(r):na(this,r)!==void 0}},{key:"delete",value:function(r){return this.has(r)?(this.set(r,void 0),!0):!1}},{key:"forEach",value:function(r){var n=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this;this._map.forEach(function(s,i){i!==null&&Tt(i)==="object"&&(s=s[1]),r.call(o,s,i,n)})}},{key:"clear",value:function(){this._map=new Map,this._arrayTreeMap=new Map,this._objectTreeMap=new Map}},{key:"size",get:function(){return this._map.size}}]),t})();oa.exports=Qh});var Ze=z((W_,ia)=>{ia.exports=window.wp.url});var Ae=z((yS,ma)=>{ma.exports=window.wp.apiFetch});var nr=z((ES,ya)=>{ya.exports=window.wp.blocks});var _s=z((wS,Ea)=>{Ea.exports=window.wp.i18n});var Ai=z((ob,pu)=>{pu.exports=window.wp.privateApis});var Co=z((ab,_u)=>{_u.exports=window.wp.hooks});var Ar=z((gv,ed)=>{ed.exports=window.wp.blockEditor});var bn=z((Nv,gd)=>{gd.exports=window.wp.richText});var er=z((XC,pf)=>{pf.exports=window.wp.deprecated});var kc=z((xR,Of)=>{Of.exports=window.wp.htmlEntities});var We=z((XR,Qf)=>{Qf.exports=window.wp.element});var eh=z((eT,Zf)=>{Zf.exports=window.ReactJSXRuntime});var gh=z((ET,ph)=>{ph.exports=window.wp.warning});var p_={};bt(p_,{EntityProvider:()=>rh,__experimentalFetchLinkSuggestions:()=>Lf,__experimentalFetchUrlData:()=>Mf,__experimentalUseEntityRecord:()=>lh,__experimentalUseEntityRecords:()=>fh,__experimentalUseResourcePermissions:()=>_h,fetchBlockPatterns:()=>Uc,privateApis:()=>Lh,store:()=>q,useEntityBlockEditor:()=>Th,useEntityId:()=>Nr,useEntityProp:()=>xh,useEntityRecord:()=>Nc,useEntityRecords:()=>ss,useResourcePermissions:()=>wh});var ds=w(W(),1);var gc=w(Qe(),1),df=w(jn(),1),In=w(W(),1),ff=w(Xc(),1);var Zc=w(Qe(),1);function fs(t,e){if(!t)return e;let r=!1,n={};for(let o in e)(0,Zc.default)(t[o],e[o])?n[o]=t[o]:(r=!0,n[o]=e[o]);if(!r)return t;for(let o in t)n.hasOwnProperty(o)||(n[o]=t[o]);return n}function Gh(t){return typeof t=="string"?t.split(","):Array.isArray(t)?t:null}var ie=Gh;var $h=t=>e=>(r,n)=>r===void 0||t(n)?e(r,n):r,Br=$h;var zh=t=>(...e)=>async({resolveSelect:r})=>{await r[t](...e)},vt=zh;var Kh=t=>e=>(r={},n)=>{let o=n[t];if(o===void 0)return r;let s=e(r[o],n);return s===r[o]?r:{...r,[o]:s}},Fn=Kh;var Hh=t=>e=>(r,n)=>e(r,t(n)),jr=Hh;function qh(t){let e=new WeakMap;return r=>{let n;return e.has(r)?n=e.get(r):(n=t(r),r!==null&&typeof r=="object"&&e.set(r,n)),n}}var hs=qh;function ps(t,e){return(t.rawAttributes||[]).includes(e)}function Xe(t,e,r){if(!t||typeof t!="object")return t;let n=Array.isArray(e)?e:e.split(".");return n.reduce((o,s,i)=>(o[s]===void 0&&(Number.isInteger(n[i+1])?o[s]=[]:o[s]={}),i===n.length-1&&(o[s]=r),o[s]),t),t}function gs(t,e,r){if(!t||typeof t!="object"||typeof e!="string"&&!Array.isArray(e))return t;let n=Array.isArray(e)?e:e.split("."),o=t;return n.forEach(s=>{o=o?.[s]}),o!==void 0?o:r}function Fr(t){return/^\s*\d+\s*$/.test(t)}var Ct=["create","read","update","delete"];function Yr(t){let e={};if(!t)return e;let r={create:"POST",read:"GET",update:"PUT",delete:"DELETE"};for(let[n,o]of Object.entries(r))e[n]=t.includes(o);return e}function Rt(t,e,r){return(typeof e=="object"?[t,e.kind,e.name,e.id]:[t,e,r]).filter(Boolean).join("/")}var Gr=Symbol("RECEIVE_INTERMEDIATE_RESULTS");function ms(t,e,r){return{type:"RECEIVE_ITEMS",items:t,persistedEdits:e,meta:r}}function ea(t,e,r,n=!1){return{type:"REMOVE_ITEMS",itemIds:Array.isArray(r)?r:[r],kind:t,name:e,invalidateCache:n}}function ta(t,e={},r,n){return{...ms(t,r,n),query:e}}var la=w(sa(),1),ua=w(W(),1);var ca=w(Ze(),1);function Xh(t){let e={stableKey:"",page:1,perPage:10,fields:null,include:null,context:"default"},r=Object.keys(t).sort();for(let n=0;n<r.length;n++){let o=r[n],s=t[o];switch(o){case"page":e[o]=Number(s);break;case"per_page":e.perPage=Number(s);break;case"context":e.context=s;break;default:o==="_fields"&&(e.fields=ie(s)??[],s=e.fields.join()),o==="include"&&(typeof s=="number"&&(s=s.toString()),e.include=(ie(s)??[]).map(Number),s=e.include.join()),e.stableKey+=(e.stableKey?"&":"")+(0,ca.addQueryArgs)("",{[o]:s}).slice(1)}}return e}var et=hs(Xh);var aa=new WeakMap;function Zh(t,e){let{stableKey:r,page:n,perPage:o,include:s,fields:i,context:c}=et(e),a;if(t.queries?.[c]?.[r]&&(a=t.queries[c][r].itemIds),!a)return null;let u=o===-1?0:(n-1)*o,l=o===-1?a.length:Math.min(u+o,a.length),d=[];for(let f=u;f<l;f++){let h=a[f];if(Array.isArray(s)&&!s.includes(h)||h===void 0)continue;if(!t.items[c]?.hasOwnProperty(h))return null;let p=t.items[c][h],g;if(Array.isArray(i)){g={};for(let m=0;m<i.length;m++){let y=i[m].split("."),E=p;y.forEach(_=>{E=E?.[_]}),Xe(g,y,E)}}else{if(!t.itemIsComplete[c]?.[h])return null;g=p}d.push(g)}return d}var ys=(0,ua.createSelector)((t,e={})=>{let r=aa.get(t);if(r){let o=r.get(e);if(o!==void 0)return o}else r=new la.default,aa.set(t,r);let n=Zh(t,e);return r.set(e,n),n});function Es(t,e={}){let{stableKey:r,context:n}=et(e);return t.queries?.[n]?.[r]?.meta?.totalItems??null}function da(t,e={}){let{stableKey:r,context:n}=et(e);return t.queries?.[n]?.[r]?.meta?.totalPages??null}var cf=w(W(),1),af=w(jn(),1);var tt=function(){return tt=Object.assign||function(e){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},tt.apply(this,arguments)};function fa(t){return t.toLowerCase()}var ep=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],tp=/[^A-Z0-9]+/gi;function Yn(t,e){e===void 0&&(e={});for(var r=e.splitRegexp,n=r===void 0?ep:r,o=e.stripRegexp,s=o===void 0?tp:o,i=e.transform,c=i===void 0?fa:i,a=e.delimiter,u=a===void 0?" ":a,l=ha(ha(t,n,"$1\0$2"),s,"\0"),d=0,f=l.length;l.charAt(d)==="\0";)d++;for(;l.charAt(f-1)==="\0";)f--;return l.slice(d,f).split("\0").map(c).join(u)}function ha(t,e,r){return e instanceof RegExp?t.replace(e,r):e.reduce(function(n,o){return n.replace(o,r)},t)}function ws(t,e){var r=t.charAt(0),n=t.substr(1).toLowerCase();return e>0&&r>="0"&&r<="9"?"_"+r+n:""+r.toUpperCase()+n}function $r(t,e){return e===void 0&&(e={}),Yn(t,tt({delimiter:"",transform:ws},e))}function rp(t,e){return e===0?t.toLowerCase():ws(t,e)}function Gn(t,e){return e===void 0&&(e={}),$r(t,tt({transform:rp},e))}function pa(t){return t.charAt(0).toUpperCase()+t.substr(1)}function np(t){return pa(t.toLowerCase())}function ga(t,e){return e===void 0&&(e={}),Yn(t,tt({delimiter:" ",transform:np},e))}var xn=w(Ae(),1),Ho=w(nr(),1),B=w(_s(),1);var Or=w(W(),1);var C={};bt(C,{AbsolutePosition:()=>so,AbstractConnector:()=>Xs,AbstractStruct:()=>br,AbstractType:()=>F,Array:()=>Ft,ContentAny:()=>ft,ContentBinary:()=>zt,ContentDeleted:()=>vr,ContentDoc:()=>Kt,ContentEmbed:()=>Ke,ContentFormat:()=>Y,ContentJSON:()=>gn,ContentString:()=>Te,ContentType:()=>we,Doc:()=>Me,GC:()=>oe,ID:()=>$e,Item:()=>k,Map:()=>Yt,PermanentUserData:()=>ei,RelativePosition:()=>_r,Skip:()=>X,Snapshot:()=>ln,Text:()=>Sr,Transaction:()=>co,UndoManager:()=>Vt,UpdateDecoderV1:()=>he,UpdateDecoderV2:()=>ae,UpdateEncoderV1:()=>Ne,UpdateEncoderV2:()=>ge,XmlElement:()=>$t,XmlFragment:()=>Gt,XmlHook:()=>pn,XmlText:()=>go,YArrayEvent:()=>uo,YEvent:()=>jt,YMapEvent:()=>fo,YTextEvent:()=>ho,YXmlEvent:()=>po,applyUpdate:()=>fi,applyUpdateV2:()=>Be,cleanupYTextFormatting:()=>ou,compareIDs:()=>Ut,compareRelativePositions:()=>wg,convertUpdateFormatV1ToV2:()=>jg,convertUpdateFormatV2ToV1:()=>Fl,createAbsolutePositionFromRelativePosition:()=>Eg,createDeleteSet:()=>yo,createDeleteSetFromStructStore:()=>li,createDocFromSnapshot:()=>Rg,createID:()=>R,createRelativePositionFromJSON:()=>ug,createRelativePositionFromTypeIndex:()=>fg,createSnapshot:()=>Ei,decodeRelativePosition:()=>mg,decodeSnapshot:()=>bg,decodeSnapshotV2:()=>Il,decodeStateVector:()=>pi,decodeUpdate:()=>Ug,decodeUpdateV2:()=>Pl,diffUpdate:()=>Ng,diffUpdateV2:()=>wi,emptySnapshot:()=>vg,encodeRelativePosition:()=>pg,encodeSnapshot:()=>Sg,encodeSnapshotV2:()=>xl,encodeStateAsUpdate:()=>hi,encodeStateAsUpdateV2:()=>ht,encodeStateVector:()=>mi,encodeStateVectorFromUpdate:()=>Lg,encodeStateVectorFromUpdateV2:()=>Nl,equalDeleteSets:()=>vl,equalSnapshots:()=>_g,findIndexSS:()=>Ee,findRootTypeKey:()=>yi,getItem:()=>Lt,getItemCleanEnd:()=>ni,getItemCleanStart:()=>ne,getState:()=>L,getTypeChildren:()=>$g,isDeleted:()=>Ht,isParentOf:()=>an,iterateDeletedStructs:()=>Pt,logType:()=>ag,logUpdate:()=>Og,logUpdateV2:()=>Ll,mergeDeleteSets:()=>Mt,mergeUpdates:()=>Ml,mergeUpdatesV2:()=>Bt,obfuscateUpdate:()=>Vg,obfuscateUpdateV2:()=>Bg,parseUpdateMeta:()=>Pg,parseUpdateMetaV2:()=>Vl,readUpdate:()=>og,readUpdateV2:()=>di,relativePositionToJSON:()=>lg,snapshot:()=>Cg,snapshotContainsUpdate:()=>xg,transact:()=>D,tryGc:()=>Dg,typeListToArraySnapshot:()=>zg,typeMapGetAllSnapshot:()=>Zl,typeMapGetSnapshot:()=>qg});var V=()=>new Map,$n=t=>{let e=V();return t.forEach((r,n)=>{e.set(n,r)}),e},K=(t,e,r)=>{let n=t.get(e);return n===void 0&&t.set(e,n=r()),n},wa=(t,e)=>{let r=[];for(let[n,o]of t)r.push(e(o,n));return r},_a=(t,e)=>{for(let[r,n]of t)if(e(n,r))return!0;return!1};var De=()=>new Set;var zn=t=>t[t.length-1];var Sa=(t,e)=>{for(let r=0;r<e.length;r++)t.push(e[r])},ve=Array.from;var ba=(t,e)=>{for(let r=0;r<t.length;r++)if(e(t[r],r,t))return!0;return!1};var va=(t,e)=>{let r=new Array(t);for(let n=0;n<t;n++)r[n]=e(n,r);return r};var xt=Array.isArray;var rt=class{constructor(){this._observers=V()}on(e,r){return K(this._observers,e,De).add(r),r}once(e,r){let n=(...o)=>{this.off(e,n),r(...o)};this.on(e,n)}off(e,r){let n=this._observers.get(e);n!==void 0&&(n.delete(r),n.size===0&&this._observers.delete(e))}emit(e,r){return ve((this._observers.get(e)||V()).values()).forEach(n=>n(...r))}destroy(){this._observers=V()}},sr=class{constructor(){this._observers=V()}on(e,r){K(this._observers,e,De).add(r)}once(e,r){let n=(...o)=>{this.off(e,n),r(...o)};this.on(e,n)}off(e,r){let n=this._observers.get(e);n!==void 0&&(n.delete(r),n.size===0&&this._observers.delete(e))}emit(e,r){return ve((this._observers.get(e)||V()).values()).forEach(n=>n(...r))}destroy(){this._observers=V()}};var fe=Math.floor;var ir=Math.abs;var Kn=(t,e)=>t<e?t:e,Ge=(t,e)=>t>e?t:e,SS=Number.isNaN;var Hn=t=>t!==0?t<0:1/t<0;var bs=Number.MAX_SAFE_INTEGER,bS=Number.MIN_SAFE_INTEGER,vS=1<<31;var Ca=Number.isInteger||(t=>typeof t=="number"&&isFinite(t)&&fe(t)===t),CS=Number.isNaN,RS=Number.parseInt;var vs=String.fromCharCode,TS=String.fromCodePoint,xS=vs(65535),op=t=>t.toLowerCase(),sp=/^\s*/g,ip=t=>t.replace(sp,""),cp=/([A-Z])/g,Cs=(t,e)=>ip(t.replace(cp,r=>`${e}${op(r)}`));var ap=t=>{let e=unescape(encodeURIComponent(t)),r=e.length,n=new Uint8Array(r);for(let o=0;o<r;o++)n[o]=e.codePointAt(o);return n},ar=typeof TextEncoder<"u"?new TextEncoder:null,lp=t=>ar.encode(t),Ta=ar?lp:ap;var cr=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});cr&&cr.decode(new Uint8Array).length===1&&(cr=null);var xa=(t,e)=>va(e,()=>t).join("");var It=class{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}},Ce=()=>new It;var up=t=>{let e=t.cpos;for(let r=0;r<t.bufs.length;r++)e+=t.bufs[r].length;return e};var re=t=>{let e=new Uint8Array(up(t)),r=0;for(let n=0;n<t.bufs.length;n++){let o=t.bufs[n];e.set(o,r),r+=o.length}return e.set(new Uint8Array(t.cbuf.buffer,0,t.cpos),r),e},dp=(t,e)=>{let r=t.cbuf.length;r-t.cpos<e&&(t.bufs.push(new Uint8Array(t.cbuf.buffer,0,t.cpos)),t.cbuf=new Uint8Array(Ge(r,e)*2),t.cpos=0)},H=(t,e)=>{let r=t.cbuf.length;t.cpos===r&&(t.bufs.push(t.cbuf),t.cbuf=new Uint8Array(r*2),t.cpos=0),t.cbuf[t.cpos++]=e};var fr=H;var v=(t,e)=>{for(;e>127;)H(t,128|127&e),e=fe(e/128);H(t,127&e)},Wr=(t,e)=>{let r=Hn(e);for(r&&(e=-e),H(t,(e>63?128:0)|(r?64:0)|63&e),e=fe(e/64);e>0;)H(t,(e>127?128:0)|127&e),e=fe(e/128)},Rs=new Uint8Array(3e4),fp=Rs.length/3,hp=(t,e)=>{if(e.length<fp){let r=ar.encodeInto(e,Rs).written||0;v(t,r);for(let n=0;n<r;n++)H(t,Rs[n])}else J(t,Ta(e))},pp=(t,e)=>{let r=unescape(encodeURIComponent(e)),n=r.length;v(t,n);for(let o=0;o<n;o++)H(t,r.codePointAt(o))},nt=ar&&ar.encodeInto?hp:pp;var Oa=(t,e)=>hr(t,re(e)),hr=(t,e)=>{let r=t.cbuf.length,n=t.cpos,o=Kn(r-n,e.length),s=e.length-o;t.cbuf.set(e.subarray(0,o),n),t.cpos+=o,s>0&&(t.bufs.push(t.cbuf),t.cbuf=new Uint8Array(Ge(r*2,s)),t.cbuf.set(e.subarray(o)),t.cpos=s)},J=(t,e)=>{v(t,e.byteLength),hr(t,e)},Ts=(t,e)=>{dp(t,e);let r=new DataView(t.cbuf.buffer,t.cpos,e);return t.cpos+=e,r},gp=(t,e)=>Ts(t,4).setFloat32(0,e,!1),mp=(t,e)=>Ts(t,8).setFloat64(0,e,!1),yp=(t,e)=>Ts(t,8).setBigInt64(0,e,!1);var Aa=new DataView(new ArrayBuffer(4)),Ep=t=>(Aa.setFloat32(0,t),Aa.getFloat32(0)===t),ur=(t,e)=>{switch(typeof e){case"string":H(t,119),nt(t,e);break;case"number":Ca(e)&&ir(e)<=2147483647?(H(t,125),Wr(t,e)):Ep(e)?(H(t,124),gp(t,e)):(H(t,123),mp(t,e));break;case"bigint":H(t,122),yp(t,e);break;case"object":if(e===null)H(t,126);else if(xt(e)){H(t,117),v(t,e.length);for(let r=0;r<e.length;r++)ur(t,e[r])}else if(e instanceof Uint8Array)H(t,116),J(t,e);else{H(t,118);let r=Object.keys(e);v(t,r.length);for(let n=0;n<r.length;n++){let o=r[n];nt(t,o),ur(t,e[o])}}break;case"boolean":H(t,e?120:121);break;default:H(t,127)}},qr=class extends It{constructor(e){super(),this.w=e,this.s=null,this.count=0}write(e){this.s===e?this.count++:(this.count>0&&v(this,this.count-1),this.count=1,this.w(this,e),this.s=e)}};var Da=t=>{t.count>0&&(Wr(t.encoder,t.count===1?t.s:-t.s),t.count>1&&v(t.encoder,t.count-2))},At=class{constructor(){this.encoder=new It,this.s=0,this.count=0}write(e){this.s===e?this.count++:(Da(this),this.count=1,this.s=e)}toUint8Array(){return Da(this),re(this.encoder)}};var ka=t=>{if(t.count>0){let e=t.diff*2+(t.count===1?0:1);Wr(t.encoder,e),t.count>1&&v(t.encoder,t.count-2)}},dr=class{constructor(){this.encoder=new It,this.s=0,this.count=0,this.diff=0}write(e){this.diff===e-this.s?(this.s=e,this.count++):(ka(this),this.count=1,this.diff=e-this.s,this.s=e)}toUint8Array(){return ka(this),re(this.encoder)}},qn=class{constructor(){this.sarr=[],this.s="",this.lensE=new At}write(e){this.s+=e,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(e.length)}toUint8Array(){let e=new It;return this.sarr.push(this.s),this.s="",nt(e,this.sarr.join("")),hr(e,this.lensE.toUint8Array()),re(e)}};var ke=t=>new Error(t),Re=()=>{throw ke("Method unimplemented")},ce=()=>{throw ke("Unexpected case")};var La=ke("Unexpected end of array"),Pa=ke("Integer out of Range"),pr=class{constructor(e){this.arr=e,this.pos=0}},G=t=>new pr(t),Is=t=>t.pos!==t.arr.length;var wp=(t,e)=>{let r=new Uint8Array(t.arr.buffer,t.pos+t.arr.byteOffset,e);return t.pos+=e,r},Q=t=>wp(t,T(t));var Dt=t=>t.arr[t.pos++];var T=t=>{let e=0,r=1,n=t.arr.length;for(;t.pos<n;){let o=t.arr[t.pos++];if(e=e+(o&127)*r,r*=128,o<128)return e;if(e>bs)throw Pa}throw La},Qr=t=>{let e=t.arr[t.pos++],r=e&63,n=64,o=(e&64)>0?-1:1;if((e&128)===0)return o*r;let s=t.arr.length;for(;t.pos<s;){if(e=t.arr[t.pos++],r=r+(e&127)*n,n*=128,e<128)return o*r;if(r>bs)throw Pa}throw La};var _p=t=>{let e=T(t);if(e===0)return"";{let r=String.fromCodePoint(Dt(t));if(--e<100)for(;e--;)r+=String.fromCodePoint(Dt(t));else for(;e>0;){let n=e<1e4?e:1e4,o=t.arr.subarray(t.pos,t.pos+n);t.pos+=n,r+=String.fromCodePoint.apply(null,o),e-=n}return decodeURIComponent(escape(r))}},Sp=t=>cr.decode(Q(t)),st=cr?Sp:_p;var As=(t,e)=>{let r=new DataView(t.arr.buffer,t.arr.byteOffset+t.pos,e);return t.pos+=e,r},bp=t=>As(t,4).getFloat32(0,!1),vp=t=>As(t,8).getFloat64(0,!1),Cp=t=>As(t,8).getBigInt64(0,!1);var Rp=[t=>{},t=>null,Qr,bp,vp,Cp,t=>!1,t=>!0,st,t=>{let e=T(t),r={};for(let n=0;n<e;n++){let o=st(t);r[o]=gr(t)}return r},t=>{let e=T(t),r=[];for(let n=0;n<e;n++)r.push(gr(t));return r},Q],gr=t=>Rp[127-Dt(t)](t),Jr=class extends pr{constructor(e,r){super(e),this.reader=r,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),Is(this)?this.count=T(this)+1:this.count=-1),this.count--,this.s}};var kt=class extends pr{constructor(e){super(e),this.s=0,this.count=0}read(){if(this.count===0){this.s=Qr(this);let e=Hn(this.s);this.count=1,e&&(this.s=-this.s,this.count=T(this)+2)}return this.count--,this.s}};var mr=class extends pr{constructor(e){super(e),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){let e=Qr(this),r=e&1;this.diff=fe(e/2),this.count=1,r&&(this.count=T(this)+2)}return this.s+=this.diff,this.count--,this.s}},Wn=class{constructor(e){this.decoder=new kt(e),this.str=st(this.decoder),this.spos=0}read(){let e=this.spos+this.decoder.read(),r=this.str.slice(this.spos,e);return this.spos=e,r}};var DS=crypto.subtle,Ma=crypto.getRandomValues.bind(crypto);var ks=()=>Ma(new Uint32Array(1))[0];var Tp="10000000-1000-4000-8000"+-1e11,Na=()=>Tp.replace(/[018]/g,t=>(t^ks()&15>>t/4).toString(16));var it=Date.now;var Us=t=>new Promise(t);var US=Promise.all.bind(Promise);var Ls=t=>t===void 0?null:t;var Ps=class{constructor(){this.map=new Map}setItem(e,r){this.map.set(e,r)}getItem(e){return this.map.get(e)}},Va=new Ps,Dp=!0;try{typeof localStorage<"u"&&localStorage&&(Va=localStorage,Dp=!1)}catch{}var Ba=Va;var Fa=Object.assign,Ya=Object.keys,Ga=(t,e)=>{for(let r in t)e(t[r],r)};var Ms=t=>Ya(t).length,ja=t=>Ya(t).length;var $a=t=>{for(let e in t)return!1;return!0},Op=(t,e)=>{for(let r in t)if(!e(t[r],r))return!1;return!0},Ns=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Vs=(t,e)=>t===e||ja(t)===ja(e)&&Op(t,(r,n)=>(r!==void 0||Ns(e,n))&&e[n]===r),Up=Object.freeze,Bs=t=>{for(let e in t){let r=t[e];(typeof r=="object"||typeof r=="function")&&Bs(t[e])}return Up(t)};var Zr=(t,e,r=0)=>{try{for(;r<t.length;r++)t[r](...e)}finally{r<t.length&&Zr(t,e,r+1)}};var js=t=>t,Lp=(t,e)=>t===e;var Xr=(t,e)=>{if(t==null||e==null)return Lp(t,e);if(t.constructor!==e.constructor)return!1;if(t===e)return!0;switch(t.constructor){case ArrayBuffer:t=new Uint8Array(t),e=new Uint8Array(e);case Uint8Array:{if(t.byteLength!==e.byteLength)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;break}case Set:{if(t.size!==e.size)return!1;for(let r of t)if(!e.has(r))return!1;break}case Map:{if(t.size!==e.size)return!1;for(let r of t.keys())if(!e.has(r)||!Xr(t.get(r),e.get(r)))return!1;break}case Object:if(Ms(t)!==Ms(e))return!1;for(let r in t)if(!Ns(t,r)||!Xr(t[r],e[r]))return!1;break;case Array:if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(!Xr(t[r],e[r]))return!1;break;default:return!1}return!0},Ka=(t,e)=>e.includes(t);var yr=typeof process<"u"&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]",Jn=typeof window<"u"&&typeof document<"u"&&!yr,LS=typeof navigator<"u"?/Mac/.test(navigator.platform):!1,Oe,Pp=[],Mp=()=>{if(Oe===void 0)if(yr){Oe=V();let t=process.argv,e=null;for(let r=0;r<t.length;r++){let n=t[r];n[0]==="-"?(e!==null&&Oe.set(e,""),e=n):e!==null?(Oe.set(e,n),e=null):Pp.push(n)}e!==null&&Oe.set(e,"")}else typeof location=="object"?(Oe=V(),(location.search||"?").slice(1).split("&").forEach(t=>{if(t.length!==0){let[e,r]=t.split("=");Oe.set(`--${Cs(e,"-")}`,r),Oe.set(`-${Cs(e,"-")}`,r)}})):Oe=V();return Oe},Ys=t=>Mp().has(t);var en=t=>yr?Ls(process.env[t.toUpperCase().replaceAll("-","_")]):Ls(Ba.getItem(t));var Ha=t=>Ys("--"+t)||en(t)!==null,PS=Ha("production"),Np=yr&&Ka(process.env.FORCE_COLOR,["true","1","2"]),qa=Np||!Ys("--no-colors")&&!Ha("no-color")&&(!yr||process.stdout.isTTY)&&(!yr||Ys("--color")||en("COLORTERM")!==null||(en("TERM")||"").includes("color"));var Wa=t=>new Uint8Array(t),Vp=(t,e,r)=>new Uint8Array(t,e,r);var Bp=t=>{let e="";for(let r=0;r<t.byteLength;r++)e+=vs(t[r]);return btoa(e)},jp=t=>Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("base64"),Fp=t=>{let e=atob(t),r=Wa(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r},Yp=t=>{let e=Buffer.from(t,"base64");return Vp(e.buffer,e.byteOffset,e.byteLength)},Ja=Jn?Bp:jp,Qa=Jn?Fp:Yp;var Xa=t=>{let e=Wa(t.byteLength);return e.set(t),e};var $s=class{constructor(e,r){this.left=e,this.right=r}},Ue=(t,e)=>new $s(t,e);var Ot=typeof document<"u"?document:{};var MS=typeof DOMParser<"u"?new DOMParser:null;var el=t=>wa(t,(e,r)=>`${r}:${e};`).join("");var NS=Ot.ELEMENT_NODE,VS=Ot.TEXT_NODE,BS=Ot.CDATA_SECTION_NODE,jS=Ot.COMMENT_NODE,FS=Ot.DOCUMENT_NODE,YS=Ot.DOCUMENT_TYPE_NODE,GS=Ot.DOCUMENT_FRAGMENT_NODE;var Le=Symbol;var tn=Le(),rn=Le(),zs=Le(),Ks=Le(),Hs=Le(),nn=Le(),qs=Le(),Er=Le(),Ws=Le(),tl=t=>{t.length===1&&t[0]?.constructor===Function&&(t=t[0]());let e=[],r=[],n=0;for(;n<t.length;n++){let o=t[n];if(o===void 0)break;if(o.constructor===String||o.constructor===Number)e.push(o);else if(o.constructor===Object)break}for(n>0&&r.push(e.join(""));n<t.length;n++){let o=t[n];o instanceof Symbol||r.push(o)}return r};var $S=it();var Hp={[tn]:Ue("font-weight","bold"),[rn]:Ue("font-weight","normal"),[zs]:Ue("color","blue"),[Hs]:Ue("color","green"),[Ks]:Ue("color","grey"),[nn]:Ue("color","red"),[qs]:Ue("color","purple"),[Er]:Ue("color","orange"),[Ws]:Ue("color","black")},qp=t=>{t.length===1&&t[0]?.constructor===Function&&(t=t[0]());let e=[],r=[],n=V(),o=[],s=0;for(;s<t.length;s++){let i=t[s],c=Hp[i];if(c!==void 0)n.set(c.left,c.right);else{if(i===void 0)break;if(i.constructor===String||i.constructor===Number){let a=el(n);s>0||a.length>0?(e.push("%c"+i),r.push(a)):e.push(i)}else break}}for(s>0&&(o=r,o.unshift(e.join("")));s<t.length;s++){let i=t[s];i instanceof Symbol||o.push(i)}return o},rl=qa?qp:tl,Qn=(...t)=>{console.log(...rl(t)),nl.forEach(e=>e.print(t))},Js=(...t)=>{console.warn(...rl(t)),t.unshift(Er),nl.forEach(e=>e.print(t))};var nl=De();var ol=t=>({[Symbol.iterator](){return this},next:t}),sl=(t,e)=>ol(()=>{let r;do r=t.next();while(!r.done&&!e(r.value));return r}),Xn=(t,e)=>ol(()=>{let{done:r,value:n}=t.next();return{done:r,value:r?void 0:e(n)}});var Xs=class extends rt{constructor(e,r){super(),this.doc=e,this.awareness=r}},sn=class{constructor(e,r){this.clock=e,this.len=r}},ut=class{constructor(){this.clients=new Map}},Pt=(t,e,r)=>e.clients.forEach((n,o)=>{let s=t.doc.store.clients.get(o);if(s!=null){let i=s[s.length-1],c=i.id.clock+i.length;for(let a=0,u=n[a];a<n.length&&u.clock<c;u=n[++a])Dl(t,s,u.clock,u.len,r)}}),Zp=(t,e)=>{let r=0,n=t.length-1;for(;r<=n;){let o=fe((r+n)/2),s=t[o],i=s.clock;if(i<=e){if(e<i+s.len)return o;r=o+1}else n=o-1}return null},Ht=(t,e)=>{let r=t.clients.get(e.client);return r!==void 0&&Zp(r,e.clock)!==null},ai=t=>{t.clients.forEach(e=>{e.sort((o,s)=>o.clock-s.clock);let r,n;for(r=1,n=1;r<e.length;r++){let o=e[n-1],s=e[r];o.clock+o.len>=s.clock?o.len=Ge(o.len,s.clock+s.len-o.clock):(n<r&&(e[n]=s),n++)}e.length=n})},Mt=t=>{let e=new ut;for(let r=0;r<t.length;r++)t[r].clients.forEach((n,o)=>{if(!e.clients.has(o)){let s=n.slice();for(let i=r+1;i<t.length;i++)Sa(s,t[i].clients.get(o)||[]);e.clients.set(o,s)}});return ai(e),e},cn=(t,e,r,n)=>{K(t.clients,e,()=>[]).push(new sn(r,n))},yo=()=>new ut,li=t=>{let e=yo();return t.clients.forEach((r,n)=>{let o=[];for(let s=0;s<r.length;s++){let i=r[s];if(i.deleted){let c=i.id.clock,a=i.length;if(s+1<r.length)for(let u=r[s+1];s+1<r.length&&u.deleted;u=r[++s+1])a+=u.length;o.push(new sn(c,a))}}o.length>0&&e.clients.set(n,o)}),e},Pe=(t,e)=>{v(t.restEncoder,e.clients.size),ve(e.clients.entries()).sort((r,n)=>n[0]-r[0]).forEach(([r,n])=>{t.resetDsCurVal(),v(t.restEncoder,r);let o=n.length;v(t.restEncoder,o);for(let s=0;s<o;s++){let i=n[s];t.writeDsClock(i.clock),t.writeDsLen(i.len)}})},ze=t=>{let e=new ut,r=T(t.restDecoder);for(let n=0;n<r;n++){t.resetDsCurVal();let o=T(t.restDecoder),s=T(t.restDecoder);if(s>0){let i=K(e.clients,o,()=>[]);for(let c=0;c<s;c++)i.push(new sn(t.readDsClock(),t.readDsLen()))}}return e},al=(t,e,r)=>{let n=new ut,o=T(t.restDecoder);for(let s=0;s<o;s++){t.resetDsCurVal();let i=T(t.restDecoder),c=T(t.restDecoder),a=r.clients.get(i)||[],u=L(r,i);for(let l=0;l<c;l++){let d=t.readDsClock(),f=d+t.readDsLen();if(d<u){u<f&&cn(n,i,u,f-u);let h=Ee(a,d),p=a[h];for(!p.deleted&&p.id.clock<d&&(a.splice(h+1,0,mo(e,p,d-p.id.clock)),h++);h<a.length&&(p=a[h++],p.id.clock<f);)p.deleted||(f<p.id.clock+p.length&&a.splice(h,0,mo(e,p,f-p.id.clock)),p.delete(e))}else cn(n,i,d,f-d)}}if(n.clients.size>0){let s=new ge;return v(s.restEncoder,0),Pe(s,n),s.toUint8Array()}return null},vl=(t,e)=>{if(t.clients.size!==e.clients.size)return!1;for(let[r,n]of t.clients.entries()){let o=e.clients.get(r);if(o===void 0||n.length!==o.length)return!1;for(let s=0;s<n.length;s++){let i=n[s],c=o[s];if(i.clock!==c.clock||i.len!==c.len)return!1}}return!0},Cl=ks,Me=class t extends rt{constructor({guid:e=Na(),collectionid:r=null,gc:n=!0,gcFilter:o=()=>!0,meta:s=null,autoLoad:i=!1,shouldLoad:c=!0}={}){super(),this.gc=n,this.gcFilter=o,this.clientID=Cl(),this.guid=e,this.collectionid=r,this.share=new Map,this.store=new io,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=c,this.autoLoad=i,this.meta=s,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=Us(u=>{this.on("load",()=>{this.isLoaded=!0,u(this)})});let a=()=>Us(u=>{let l=d=>{(d===void 0||d===!0)&&(this.off("sync",l),u())};this.on("sync",l)});this.on("sync",u=>{u===!1&&this.isSynced&&(this.whenSynced=a()),this.isSynced=u===void 0||u===!0,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=a()}load(){let e=this._item;e!==null&&!this.shouldLoad&&D(e.parent.doc,r=>{r.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(ve(this.subdocs).map(e=>e.guid))}transact(e,r=null){return D(this,e,r)}get(e,r=F){let n=K(this.share,e,()=>{let s=new r;return s._integrate(this,null),s}),o=n.constructor;if(r!==F&&o!==r)if(o===F){let s=new r;s._map=n._map,n._map.forEach(i=>{for(;i!==null;i=i.left)i.parent=s}),s._start=n._start;for(let i=s._start;i!==null;i=i.right)i.parent=s;return s._length=n._length,this.share.set(e,s),s._integrate(this,null),s}else throw new Error(`Type with the name ${e} has already been defined with a different constructor`);return n}getArray(e=""){return this.get(e,Ft)}getText(e=""){return this.get(e,Sr)}getMap(e=""){return this.get(e,Yt)}getXmlElement(e=""){return this.get(e,$t)}getXmlFragment(e=""){return this.get(e,Gt)}toJSON(){let e={};return this.share.forEach((r,n)=>{e[n]=r.toJSON()}),e}destroy(){this.isDestroyed=!0,ve(this.subdocs).forEach(r=>r.destroy());let e=this._item;if(e!==null){this._item=null;let r=e.content;r.doc=new t({guid:this.guid,...r.opts,shouldLoad:!1}),r.doc._item=e,D(e.parent.doc,n=>{let o=r.doc;e.deleted||n.subdocsAdded.add(o),n.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}},Nt=class{constructor(e){this.restDecoder=e}resetDsCurVal(){}readDsClock(){return T(this.restDecoder)}readDsLen(){return T(this.restDecoder)}},he=class extends Nt{readLeftID(){return R(T(this.restDecoder),T(this.restDecoder))}readRightID(){return R(T(this.restDecoder),T(this.restDecoder))}readClient(){return T(this.restDecoder)}readInfo(){return Dt(this.restDecoder)}readString(){return st(this.restDecoder)}readParentInfo(){return T(this.restDecoder)===1}readTypeRef(){return T(this.restDecoder)}readLen(){return T(this.restDecoder)}readAny(){return gr(this.restDecoder)}readBuf(){return Xa(Q(this.restDecoder))}readJSON(){return JSON.parse(st(this.restDecoder))}readKey(){return st(this.restDecoder)}},oo=class{constructor(e){this.dsCurrVal=0,this.restDecoder=e}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=T(this.restDecoder),this.dsCurrVal}readDsLen(){let e=T(this.restDecoder)+1;return this.dsCurrVal+=e,e}},ae=class extends oo{constructor(e){super(e),this.keys=[],T(e),this.keyClockDecoder=new mr(Q(e)),this.clientDecoder=new kt(Q(e)),this.leftClockDecoder=new mr(Q(e)),this.rightClockDecoder=new mr(Q(e)),this.infoDecoder=new Jr(Q(e),Dt),this.stringDecoder=new Wn(Q(e)),this.parentInfoDecoder=new Jr(Q(e),Dt),this.typeRefDecoder=new kt(Q(e)),this.lenDecoder=new kt(Q(e))}readLeftID(){return new $e(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new $e(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return gr(this.restDecoder)}readBuf(){return Q(this.restDecoder)}readJSON(){return gr(this.restDecoder)}readKey(){let e=this.keyClockDecoder.read();if(e<this.keys.length)return this.keys[e];{let r=this.stringDecoder.read();return this.keys.push(r),r}}},dt=class{constructor(){this.restEncoder=Ce()}toUint8Array(){return re(this.restEncoder)}resetDsCurVal(){}writeDsClock(e){v(this.restEncoder,e)}writeDsLen(e){v(this.restEncoder,e)}},Ne=class extends dt{writeLeftID(e){v(this.restEncoder,e.client),v(this.restEncoder,e.clock)}writeRightID(e){v(this.restEncoder,e.client),v(this.restEncoder,e.clock)}writeClient(e){v(this.restEncoder,e)}writeInfo(e){fr(this.restEncoder,e)}writeString(e){nt(this.restEncoder,e)}writeParentInfo(e){v(this.restEncoder,e?1:0)}writeTypeRef(e){v(this.restEncoder,e)}writeLen(e){v(this.restEncoder,e)}writeAny(e){ur(this.restEncoder,e)}writeBuf(e){J(this.restEncoder,e)}writeJSON(e){nt(this.restEncoder,JSON.stringify(e))}writeKey(e){nt(this.restEncoder,e)}},wr=class{constructor(){this.restEncoder=Ce(),this.dsCurrVal=0}toUint8Array(){return re(this.restEncoder)}resetDsCurVal(){this.dsCurrVal=0}writeDsClock(e){let r=e-this.dsCurrVal;this.dsCurrVal=e,v(this.restEncoder,r)}writeDsLen(e){e===0&&ce(),v(this.restEncoder,e-1),this.dsCurrVal+=e}},ge=class extends wr{constructor(){super(),this.keyMap=new Map,this.keyClock=0,this.keyClockEncoder=new dr,this.clientEncoder=new At,this.leftClockEncoder=new dr,this.rightClockEncoder=new dr,this.infoEncoder=new qr(fr),this.stringEncoder=new qn,this.parentInfoEncoder=new qr(fr),this.typeRefEncoder=new At,this.lenEncoder=new At}toUint8Array(){let e=Ce();return v(e,0),J(e,this.keyClockEncoder.toUint8Array()),J(e,this.clientEncoder.toUint8Array()),J(e,this.leftClockEncoder.toUint8Array()),J(e,this.rightClockEncoder.toUint8Array()),J(e,re(this.infoEncoder)),J(e,this.stringEncoder.toUint8Array()),J(e,re(this.parentInfoEncoder)),J(e,this.typeRefEncoder.toUint8Array()),J(e,this.lenEncoder.toUint8Array()),hr(e,re(this.restEncoder)),re(e)}writeLeftID(e){this.clientEncoder.write(e.client),this.leftClockEncoder.write(e.clock)}writeRightID(e){this.clientEncoder.write(e.client),this.rightClockEncoder.write(e.clock)}writeClient(e){this.clientEncoder.write(e)}writeInfo(e){this.infoEncoder.write(e)}writeString(e){this.stringEncoder.write(e)}writeParentInfo(e){this.parentInfoEncoder.write(e?1:0)}writeTypeRef(e){this.typeRefEncoder.write(e)}writeLen(e){this.lenEncoder.write(e)}writeAny(e){ur(this.restEncoder,e)}writeBuf(e){J(this.restEncoder,e)}writeJSON(e){ur(this.restEncoder,e)}writeKey(e){let r=this.keyMap.get(e);r===void 0?(this.keyClockEncoder.write(this.keyClock++),this.stringEncoder.write(e)):this.keyClockEncoder.write(r)}},eg=(t,e,r,n)=>{n=Ge(n,e[0].id.clock);let o=Ee(e,n);v(t.restEncoder,e.length-o),t.writeClient(r),v(t.restEncoder,n);let s=e[o];s.write(t,n-s.id.clock);for(let i=o+1;i<e.length;i++)e[i].write(t,0)},ui=(t,e,r)=>{let n=new Map;r.forEach((o,s)=>{L(e,s)>o&&n.set(s,o)}),mn(e).forEach((o,s)=>{r.has(s)||n.set(s,0)}),v(t.restEncoder,n.size),ve(n.entries()).sort((o,s)=>s[0]-o[0]).forEach(([o,s])=>{eg(t,e.clients.get(o),o,s)})},tg=(t,e)=>{let r=V(),n=T(t.restDecoder);for(let o=0;o<n;o++){let s=T(t.restDecoder),i=new Array(s),c=t.readClient(),a=T(t.restDecoder);r.set(c,{i:0,refs:i});for(let u=0;u<s;u++){let l=t.readInfo();switch(31&l){case 0:{let d=t.readLen();i[u]=new oe(R(c,a),d),a+=d;break}case 10:{let d=T(t.restDecoder);i[u]=new X(R(c,a),d),a+=d;break}default:{let d=(l&192)===0,f=new k(R(c,a),null,(l&128)===128?t.readLeftID():null,null,(l&64)===64?t.readRightID():null,d?t.readParentInfo()?e.get(t.readString()):t.readLeftID():null,d&&(l&32)===32?t.readString():null,cu(t,l));i[u]=f,a+=f.length}}}}return r},rg=(t,e,r)=>{let n=[],o=ve(r.keys()).sort((h,p)=>h-p);if(o.length===0)return null;let s=()=>{if(o.length===0)return null;let h=r.get(o[o.length-1]);for(;h.refs.length===h.i;)if(o.pop(),o.length>0)h=r.get(o[o.length-1]);else return null;return h},i=s();if(i===null)return null;let c=new io,a=new Map,u=(h,p)=>{let g=a.get(h);(g==null||g>p)&&a.set(h,p)},l=i.refs[i.i++],d=new Map,f=()=>{for(let h of n){let p=h.id.client,g=r.get(p);g?(g.i--,c.clients.set(p,g.refs.slice(g.i)),r.delete(p),g.i=0,g.refs=[]):c.clients.set(p,[h]),o=o.filter(m=>m!==p)}n.length=0};for(;;){if(l.constructor!==X){let p=K(d,l.id.client,()=>L(e,l.id.client))-l.id.clock;if(p<0)n.push(l),u(l.id.client,l.id.clock-1),f();else{let g=l.getMissing(t,e);if(g!==null){n.push(l);let m=r.get(g)||{refs:[],i:0};if(m.refs.length===m.i)u(g,L(e,g)),f();else{l=m.refs[m.i++];continue}}else(p===0||p<l.length)&&(l.integrate(t,p),d.set(l.id.client,l.id.clock+l.length))}}if(n.length>0)l=n.pop();else if(i!==null&&i.i<i.refs.length)l=i.refs[i.i++];else{if(i=s(),i===null)break;l=i.refs[i.i++]}}if(c.clients.size>0){let h=new ge;return ui(h,c,new Map),v(h.restEncoder,0),{missing:a,update:h.toUint8Array()}}return null},ng=(t,e)=>ui(t,e.doc.store,e.beforeState),di=(t,e,r,n=new ae(t))=>D(e,o=>{o.local=!1;let s=!1,i=o.doc,c=i.store,a=tg(n,i),u=rg(o,c,a),l=c.pendingStructs;if(l){for(let[f,h]of l.missing)if(h<L(c,f)){s=!0;break}if(u){for(let[f,h]of u.missing){let p=l.missing.get(f);(p==null||p>h)&&l.missing.set(f,h)}l.update=Bt([l.update,u.update])}}else c.pendingStructs=u;let d=al(n,o,c);if(c.pendingDs){let f=new ae(G(c.pendingDs));T(f.restDecoder);let h=al(f,o,c);d&&h?c.pendingDs=Bt([d,h]):c.pendingDs=d||h}else c.pendingDs=d;if(s){let f=c.pendingStructs.update;c.pendingStructs=null,Be(o.doc,f)}},r,!1),og=(t,e,r)=>di(t,e,r,new he(t)),Be=(t,e,r,n=ae)=>{let o=G(e);di(o,t,r,new n(o))},fi=(t,e,r)=>Be(t,e,r,he),sg=(t,e,r=new Map)=>{ui(t,e.store,r),Pe(t,li(e.store))},ht=(t,e=new Uint8Array([0]),r=new ge)=>{let n=pi(e);sg(r,t,n);let o=[r.toUint8Array()];if(t.store.pendingDs&&o.push(t.store.pendingDs),t.store.pendingStructs&&o.push(wi(t.store.pendingStructs.update,e)),o.length>1){if(r.constructor===Ne)return Ml(o.map((s,i)=>i===0?s:Fl(s)));if(r.constructor===ge)return Bt(o)}return o[0]},hi=(t,e)=>ht(t,e,new Ne),Rl=t=>{let e=new Map,r=T(t.restDecoder);for(let n=0;n<r;n++){let o=T(t.restDecoder),s=T(t.restDecoder);e.set(o,s)}return e},pi=t=>Rl(new Nt(G(t))),gi=(t,e)=>(v(t.restEncoder,e.size),ve(e.entries()).sort((r,n)=>n[0]-r[0]).forEach(([r,n])=>{v(t.restEncoder,r),v(t.restEncoder,n)}),t),ig=(t,e)=>gi(t,mn(e.store)),cg=(t,e=new wr)=>(t instanceof Map?gi(e,t):ig(e,t),e.toUint8Array()),mi=t=>cg(t,new dt),Zs=class{constructor(){this.l=[]}},ll=()=>new Zs,ul=(t,e)=>t.l.push(e),dl=(t,e)=>{let r=t.l,n=r.length;t.l=r.filter(o=>e!==o),n===t.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},Tl=(t,e,r)=>Zr(t.l,[e,r]),$e=class{constructor(e,r){this.client=e,this.clock=r}},Ut=(t,e)=>t===e||t!==null&&e!==null&&t.client===e.client&&t.clock===e.clock,R=(t,e)=>new $e(t,e),fl=(t,e)=>{v(t,e.client),v(t,e.clock)},hl=t=>R(T(t),T(t)),yi=t=>{for(let[e,r]of t.doc.share.entries())if(r===t)return e;throw ce()},an=(t,e)=>{for(;e!==null;){if(e.parent===t)return!0;e=e.parent._item}return!1},ag=t=>{let e=[],r=t._start;for(;r;)e.push(r),r=r.right;console.log("Children: ",e),console.log("Children content: ",e.filter(n=>!n.deleted).map(n=>n.content))},ei=class{constructor(e,r=e.getMap("users")){let n=new Map;this.yusers=r,this.doc=e,this.clients=new Map,this.dss=n;let o=(s,i)=>{let c=s.get("ds"),a=s.get("ids"),u=l=>this.clients.set(l,i);c.observe(l=>{l.changes.added.forEach(d=>{d.content.getContent().forEach(f=>{f instanceof Uint8Array&&this.dss.set(i,Mt([this.dss.get(i)||yo(),ze(new Nt(G(f)))]))})})}),this.dss.set(i,Mt(c.map(l=>ze(new Nt(G(l)))))),a.observe(l=>l.changes.added.forEach(d=>d.content.getContent().forEach(u))),a.forEach(u)};r.observe(s=>{s.keysChanged.forEach(i=>o(r.get(i),i))}),r.forEach(o)}setUserMapping(e,r,n,{filter:o=()=>!0}={}){let s=this.yusers,i=s.get(n);i||(i=new Yt,i.set("ids",new Ft),i.set("ds",new Ft),s.set(n,i)),i.get("ids").push([r]),s.observe(c=>{setTimeout(()=>{let a=s.get(n);if(a!==i){i=a,this.clients.forEach((d,f)=>{n===d&&i.get("ids").push([f])});let u=new dt,l=this.dss.get(n);l&&(Pe(u,l),i.get("ds").push([u.toUint8Array()]))}},0)}),e.on("afterTransaction",c=>{setTimeout(()=>{let a=i.get("ds"),u=c.deleteSet;if(c.local&&u.clients.size>0&&o(c,u)){let l=new dt;Pe(l,u),a.push([l.toUint8Array()])}})})}getUserByClientId(e){return this.clients.get(e)||null}getUserByDeletedId(e){for(let[r,n]of this.dss.entries())if(Ht(n,e))return r;return null}},_r=class{constructor(e,r,n,o=0){this.type=e,this.tname=r,this.item=n,this.assoc=o}},lg=t=>{let e={};return t.type&&(e.type=t.type),t.tname&&(e.tname=t.tname),t.item&&(e.item=t.item),t.assoc!=null&&(e.assoc=t.assoc),e},ug=t=>new _r(t.type==null?null:R(t.type.client,t.type.clock),t.tname??null,t.item==null?null:R(t.item.client,t.item.clock),t.assoc==null?0:t.assoc),so=class{constructor(e,r,n=0){this.type=e,this.index=r,this.assoc=n}},dg=(t,e,r=0)=>new so(t,e,r),Zn=(t,e,r)=>{let n=null,o=null;return t._item===null?o=yi(t):n=R(t._item.id.client,t._item.id.clock),new _r(n,o,e,r)},fg=(t,e,r=0)=>{let n=t._start;if(r<0){if(e===0)return Zn(t,null,r);e--}for(;n!==null;){if(!n.deleted&&n.countable){if(n.length>e)return Zn(t,R(n.id.client,n.id.clock+e),r);e-=n.length}if(n.right===null&&r<0)return Zn(t,n.lastId,r);n=n.right}return Zn(t,null,r)},hg=(t,e)=>{let{type:r,tname:n,item:o,assoc:s}=e;if(o!==null)v(t,0),fl(t,o);else if(n!==null)fr(t,1),nt(t,n);else if(r!==null)fr(t,2),fl(t,r);else throw ce();return Wr(t,s),t},pg=t=>{let e=Ce();return hg(e,t),re(e)},gg=t=>{let e=null,r=null,n=null;switch(T(t)){case 0:n=hl(t);break;case 1:r=st(t);break;case 2:e=hl(t)}let o=Is(t)?Qr(t):0;return new _r(e,r,n,o)},mg=t=>gg(G(t)),yg=(t,e)=>{let r=Lt(t,e),n=e.clock-r.id.clock;return{item:r,diff:n}},Eg=(t,e,r=!0)=>{let n=e.store,o=t.item,s=t.type,i=t.tname,c=t.assoc,a=null,u=0;if(o!==null){if(L(n,o.client)<=o.clock)return null;let l=r?ii(n,o):yg(n,o),d=l.item;if(!(d instanceof k))return null;if(a=d.parent,a._item===null||!a._item.deleted){u=d.deleted||!d.countable?0:l.diff+(c>=0?0:1);let f=d.left;for(;f!==null;)!f.deleted&&f.countable&&(u+=f.length),f=f.left}}else{if(i!==null)a=e.get(i);else if(s!==null){if(L(n,s.client)<=s.clock)return null;let{item:l}=r?ii(n,s):{item:Lt(n,s)};if(l instanceof k&&l.content instanceof we)a=l.content.type;else return null}else throw ce();c>=0?u=a._length:u=0}return dg(a,u,t.assoc)},wg=(t,e)=>t===e||t!==null&&e!==null&&t.tname===e.tname&&Ut(t.item,e.item)&&Ut(t.type,e.type)&&t.assoc===e.assoc,ln=class{constructor(e,r){this.ds=e,this.sv=r}},_g=(t,e)=>{let r=t.ds.clients,n=e.ds.clients,o=t.sv,s=e.sv;if(o.size!==s.size||r.size!==n.size)return!1;for(let[i,c]of o.entries())if(s.get(i)!==c)return!1;for(let[i,c]of r.entries()){let a=n.get(i)||[];if(c.length!==a.length)return!1;for(let u=0;u<c.length;u++){let l=c[u],d=a[u];if(l.clock!==d.clock||l.len!==d.len)return!1}}return!0},xl=(t,e=new wr)=>(Pe(e,t.ds),gi(e,t.sv),e.toUint8Array()),Sg=t=>xl(t,new dt),Il=(t,e=new oo(G(t)))=>new ln(ze(e),Rl(e)),bg=t=>Il(t,new Nt(G(t))),Ei=(t,e)=>new ln(t,e),vg=Ei(yo(),new Map),Cg=t=>Ei(li(t.store),mn(t.store)),ct=(t,e)=>e===void 0?!t.deleted:e.sv.has(t.id.client)&&(e.sv.get(t.id.client)||0)>t.id.clock&&!Ht(e.ds,t.id),ti=(t,e)=>{let r=K(t.meta,ti,De),n=t.doc.store;r.has(e)||(e.sv.forEach((o,s)=>{o<L(n,s)&&ne(t,R(s,o))}),Pt(t,e.ds,o=>{}),r.add(e))},Rg=(t,e,r=new Me)=>{if(t.gc)throw new Error("Garbage-collection must be disabled in `originDoc`!");let{sv:n,ds:o}=e,s=new ge;return t.transact(i=>{let c=0;n.forEach(a=>{a>0&&c++}),v(s.restEncoder,c);for(let[a,u]of n){if(u===0)continue;u<L(t.store,a)&&ne(i,R(a,u));let l=t.store.clients.get(a)||[],d=Ee(l,u-1);v(s.restEncoder,d+1),s.writeClient(a),v(s.restEncoder,0);for(let f=0;f<=d;f++)l[f].write(s,0)}Pe(s,o)}),Be(r,s.toUint8Array(),"snapshot"),r},Tg=(t,e,r=ae)=>{let n=new r(G(e)),o=new Ve(n,!1);for(let i=o.curr;i!==null;i=o.next())if((t.sv.get(i.id.client)||0)<i.id.clock+i.length)return!1;let s=Mt([t.ds,ze(n)]);return vl(t.ds,s)},xg=(t,e)=>Tg(t,e,he),io=class{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}},mn=t=>{let e=new Map;return t.clients.forEach((r,n)=>{let o=r[r.length-1];e.set(n,o.id.clock+o.length)}),e},L=(t,e)=>{let r=t.clients.get(e);if(r===void 0)return 0;let n=r[r.length-1];return n.id.clock+n.length},Al=(t,e)=>{let r=t.clients.get(e.id.client);if(r===void 0)r=[],t.clients.set(e.id.client,r);else{let n=r[r.length-1];if(n.id.clock+n.length!==e.id.clock)throw ce()}r.push(e)},Ee=(t,e)=>{let r=0,n=t.length-1,o=t[n],s=o.id.clock;if(s===e)return n;let i=fe(e/(s+o.length-1)*n);for(;r<=n;){if(o=t[i],s=o.id.clock,s<=e){if(e<s+o.length)return i;r=i+1}else n=i-1;i=fe((r+n)/2)}throw ce()},Ig=(t,e)=>{let r=t.clients.get(e.client);return r[Ee(r,e.clock)]},Lt=Ig,ri=(t,e,r)=>{let n=Ee(e,r),o=e[n];return o.id.clock<r&&o instanceof k?(e.splice(n+1,0,mo(t,o,r-o.id.clock)),n+1):n},ne=(t,e)=>{let r=t.doc.store.clients.get(e.client);return r[ri(t,r,e.clock)]},ni=(t,e,r)=>{let n=e.clients.get(r.client),o=Ee(n,r.clock),s=n[o];return r.clock!==s.id.clock+s.length-1&&s.constructor!==oe&&n.splice(o+1,0,mo(t,s,r.clock-s.id.clock+1)),s},Ag=(t,e,r)=>{let n=t.clients.get(e.id.client);n[Ee(n,e.id.clock)]=r},Dl=(t,e,r,n,o)=>{if(n===0)return;let s=r+n,i=ri(t,e,r),c;do c=e[i++],s<c.id.clock+c.length&&ri(t,e,s),o(c);while(i<e.length&&e[i].id.clock<s)},co=class{constructor(e,r,n){this.doc=e,this.deleteSet=new ut,this.beforeState=mn(e.store),this.afterState=new Map,this.changed=new Map,this.changedParentTypes=new Map,this._mergeStructs=[],this.origin=r,this.meta=new Map,this.local=n,this.subdocsAdded=new Set,this.subdocsRemoved=new Set,this.subdocsLoaded=new Set,this._needFormattingCleanup=!1}},pl=(t,e)=>e.deleteSet.clients.size===0&&!_a(e.afterState,(r,n)=>e.beforeState.get(n)!==r)?!1:(ai(e.deleteSet),ng(t,e),Pe(t,e.deleteSet),!0),gl=(t,e,r)=>{let n=e._item;(n===null||n.id.clock<(t.beforeState.get(n.id.client)||0)&&!n.deleted)&&K(t.changed,e,De).add(r)},ro=(t,e)=>{let r=t[e],n=t[e-1],o=e;for(;o>0;r=n,n=t[--o-1]){if(n.deleted===r.deleted&&n.constructor===r.constructor&&n.mergeWith(r)){r instanceof k&&r.parentSub!==null&&r.parent._map.get(r.parentSub)===r&&r.parent._map.set(r.parentSub,n);continue}break}let s=e-o;return s&&t.splice(e+1-s,s),s},kl=(t,e,r)=>{for(let[n,o]of t.clients.entries()){let s=e.clients.get(n);for(let i=o.length-1;i>=0;i--){let c=o[i],a=c.clock+c.len;for(let u=Ee(s,c.clock),l=s[u];u<s.length&&l.id.clock<a;l=s[++u]){let d=s[u];if(c.clock+c.len<=d.id.clock)break;d instanceof k&&d.deleted&&!d.keep&&r(d)&&d.gc(e,!1)}}}},Ol=(t,e)=>{t.clients.forEach((r,n)=>{let o=e.clients.get(n);for(let s=r.length-1;s>=0;s--){let i=r[s],c=Kn(o.length-1,1+Ee(o,i.clock+i.len-1));for(let a=c,u=o[a];a>0&&u.id.clock>=i.clock;u=o[a])a-=1+ro(o,a)}})},Dg=(t,e,r)=>{kl(t,e,r),Ol(t,e)},Ul=(t,e)=>{if(e<t.length){let r=t[e],n=r.doc,o=n.store,s=r.deleteSet,i=r._mergeStructs;try{ai(s),r.afterState=mn(r.doc.store),n.emit("beforeObserverCalls",[r,n]);let c=[];r.changed.forEach((a,u)=>c.push(()=>{(u._item===null||!u._item.deleted)&&u._callObserver(r,a)})),c.push(()=>{r.changedParentTypes.forEach((a,u)=>{u._dEH.l.length>0&&(u._item===null||!u._item.deleted)&&(a=a.filter(l=>l.target._item===null||!l.target._item.deleted),a.forEach(l=>{l.currentTarget=u,l._path=null}),a.sort((l,d)=>l.path.length-d.path.length),c.push(()=>{Tl(u._dEH,a,r)}))}),c.push(()=>n.emit("afterTransaction",[r,n])),c.push(()=>{r._needFormattingCleanup&&Xg(r)})}),Zr(c,[])}finally{n.gc&&kl(s,o,n.gcFilter),Ol(s,o),r.afterState.forEach((l,d)=>{let f=r.beforeState.get(d)||0;if(f!==l){let h=o.clients.get(d),p=Ge(Ee(h,f),1);for(let g=h.length-1;g>=p;)g-=1+ro(h,g)}});for(let l=i.length-1;l>=0;l--){let{client:d,clock:f}=i[l].id,h=o.clients.get(d),p=Ee(h,f);p+1<h.length&&ro(h,p+1)>1||p>0&&ro(h,p)}if(!r.local&&r.afterState.get(n.clientID)!==r.beforeState.get(n.clientID)&&(Qn(Er,tn,"[yjs] ",rn,nn,"Changed the client-id because another client seems to be using it."),n.clientID=Cl()),n.emit("afterTransactionCleanup",[r,n]),n._observers.has("update")){let l=new Ne;pl(l,r)&&n.emit("update",[l.toUint8Array(),r.origin,n,r])}if(n._observers.has("updateV2")){let l=new ge;pl(l,r)&&n.emit("updateV2",[l.toUint8Array(),r.origin,n,r])}let{subdocsAdded:c,subdocsLoaded:a,subdocsRemoved:u}=r;(c.size>0||u.size>0||a.size>0)&&(c.forEach(l=>{l.clientID=n.clientID,l.collectionid==null&&(l.collectionid=n.collectionid),n.subdocs.add(l)}),u.forEach(l=>n.subdocs.delete(l)),n.emit("subdocs",[{loaded:a,added:c,removed:u},n,r]),u.forEach(l=>l.destroy())),t.length<=e+1?(n._transactionCleanups=[],n.emit("afterAllTransactions",[n,t])):Ul(t,e+1)}}},D=(t,e,r=null,n=!0)=>{let o=t._transactionCleanups,s=!1,i=null;t._transaction===null&&(s=!0,t._transaction=new co(t,r,n),o.push(t._transaction),o.length===1&&t.emit("beforeAllTransactions",[t]),t.emit("beforeTransaction",[t._transaction,t]));try{i=e(t._transaction)}finally{if(s){let c=t._transaction===o[0];t._transaction=null,c&&Ul(o,0)}}return i},oi=class{constructor(e,r){this.insertions=r,this.deletions=e,this.meta=new Map}},ml=(t,e,r)=>{Pt(t,r.deletions,n=>{n instanceof k&&e.scope.some(o=>o===t.doc||an(o,n))&&Ci(n,!1)})},yl=(t,e,r)=>{let n=null,o=t.doc,s=t.scope;D(o,c=>{for(;e.length>0&&t.currStackItem===null;){let a=o.store,u=e.pop(),l=new Set,d=[],f=!1;Pt(c,u.insertions,h=>{if(h instanceof k){if(h.redone!==null){let{item:p,diff:g}=ii(a,h.id);g>0&&(p=ne(c,R(p.id.client,p.id.clock+g))),h=p}!h.deleted&&s.some(p=>p===c.doc||an(p,h))&&d.push(h)}}),Pt(c,u.deletions,h=>{h instanceof k&&s.some(p=>p===c.doc||an(p,h))&&!Ht(u.insertions,h.id)&&l.add(h)}),l.forEach(h=>{f=iu(c,h,l,u.insertions,t.ignoreRemoteMapChanges,t)!==null||f});for(let h=d.length-1;h>=0;h--){let p=d[h];t.deleteFilter(p)&&(p.delete(c),f=!0)}t.currStackItem=f?u:null}c.changed.forEach((a,u)=>{a.has(null)&&u._searchMarker&&(u._searchMarker.length=0)}),n=c},t);let i=t.currStackItem;if(i!=null){let c=n.changedParentTypes;t.emit("stack-item-popped",[{stackItem:i,type:r,changedParentTypes:c,origin:t},t]),t.currStackItem=null}return i},Vt=class extends rt{constructor(e,{captureTimeout:r=500,captureTransaction:n=a=>!0,deleteFilter:o=()=>!0,trackedOrigins:s=new Set([null]),ignoreRemoteMapChanges:i=!1,doc:c=xt(e)?e[0].doc:e instanceof Me?e:e.doc}={}){super(),this.scope=[],this.doc=c,this.addToScope(e),this.deleteFilter=o,s.add(this),this.trackedOrigins=s,this.captureTransaction=n,this.undoStack=[],this.redoStack=[],this.undoing=!1,this.redoing=!1,this.currStackItem=null,this.lastChange=0,this.ignoreRemoteMapChanges=i,this.captureTimeout=r,this.afterTransactionHandler=a=>{if(!this.captureTransaction(a)||!this.scope.some(m=>a.changedParentTypes.has(m)||m===this.doc)||!this.trackedOrigins.has(a.origin)&&(!a.origin||!this.trackedOrigins.has(a.origin.constructor)))return;let u=this.undoing,l=this.redoing,d=u?this.redoStack:this.undoStack;u?this.stopCapturing():l||this.clear(!1,!0);let f=new ut;a.afterState.forEach((m,y)=>{let E=a.beforeState.get(y)||0,_=m-E;_>0&&cn(f,y,E,_)});let h=it(),p=!1;if(this.lastChange>0&&h-this.lastChange<this.captureTimeout&&d.length>0&&!u&&!l){let m=d[d.length-1];m.deletions=Mt([m.deletions,a.deleteSet]),m.insertions=Mt([m.insertions,f])}else d.push(new oi(a.deleteSet,f)),p=!0;!u&&!l&&(this.lastChange=h),Pt(a,a.deleteSet,m=>{m instanceof k&&this.scope.some(y=>y===a.doc||an(y,m))&&Ci(m,!0)});let g=[{stackItem:d[d.length-1],origin:a.origin,type:u?"redo":"undo",changedParentTypes:a.changedParentTypes},this];p?this.emit("stack-item-added",g):this.emit("stack-item-updated",g)},this.doc.on("afterTransaction",this.afterTransactionHandler),this.doc.on("destroy",()=>{this.destroy()})}addToScope(e){let r=new Set(this.scope);e=xt(e)?e:[e],e.forEach(n=>{r.has(n)||(r.add(n),(n instanceof F?n.doc!==this.doc:n!==this.doc)&&Js("[yjs#509] Not same Y.Doc"),this.scope.push(n))})}addTrackedOrigin(e){this.trackedOrigins.add(e)}removeTrackedOrigin(e){this.trackedOrigins.delete(e)}clear(e=!0,r=!0){(e&&this.canUndo()||r&&this.canRedo())&&this.doc.transact(n=>{e&&(this.undoStack.forEach(o=>ml(n,this,o)),this.undoStack=[]),r&&(this.redoStack.forEach(o=>ml(n,this,o)),this.redoStack=[]),this.emit("stack-cleared",[{undoStackCleared:e,redoStackCleared:r}])})}stopCapturing(){this.lastChange=0}undo(){this.undoing=!0;let e;try{e=yl(this,this.undoStack,"undo")}finally{this.undoing=!1}return e}redo(){this.redoing=!0;let e;try{e=yl(this,this.redoStack,"redo")}finally{this.redoing=!1}return e}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}destroy(){this.trackedOrigins.delete(this),this.doc.off("afterTransaction",this.afterTransactionHandler),super.destroy()}};function*kg(t){let e=T(t.restDecoder);for(let r=0;r<e;r++){let n=T(t.restDecoder),o=t.readClient(),s=T(t.restDecoder);for(let i=0;i<n;i++){let c=t.readInfo();if(c===10){let a=T(t.restDecoder);yield new X(R(o,s),a),s+=a}else if((31&c)!==0){let a=(c&192)===0,u=new k(R(o,s),null,(c&128)===128?t.readLeftID():null,null,(c&64)===64?t.readRightID():null,a?t.readParentInfo()?t.readString():t.readLeftID():null,a&&(c&32)===32?t.readString():null,cu(t,c));yield u,s+=u.length}else{let a=t.readLen();yield new oe(R(o,s),a),s+=a}}}}var Ve=class{constructor(e,r){this.gen=kg(e),this.curr=null,this.done=!1,this.filterSkips=r,this.next()}next(){do this.curr=this.gen.next().value||null;while(this.filterSkips&&this.curr!==null&&this.curr.constructor===X);return this.curr}},Og=t=>Ll(t,he),Ll=(t,e=ae)=>{let r=[],n=new e(G(t)),o=new Ve(n,!1);for(let i=o.curr;i!==null;i=o.next())r.push(i);Qn("Structs: ",r);let s=ze(n);Qn("DeleteSet: ",s)},Ug=t=>Pl(t,he),Pl=(t,e=ae)=>{let r=[],n=new e(G(t)),o=new Ve(n,!1);for(let s=o.curr;s!==null;s=o.next())r.push(s);return{structs:r,ds:ze(n)}},un=class{constructor(e){this.currClient=0,this.startClock=0,this.written=0,this.encoder=e,this.clientStructs=[]}},Ml=t=>Bt(t,he,Ne),Nl=(t,e=wr,r=ae)=>{let n=new e,o=new Ve(new r(G(t)),!1),s=o.curr;if(s!==null){let i=0,c=s.id.client,a=s.id.clock!==0,u=a?0:s.id.clock+s.length;for(;s!==null;s=o.next())c!==s.id.client&&(u!==0&&(i++,v(n.restEncoder,c),v(n.restEncoder,u)),c=s.id.client,u=0,a=s.id.clock!==0),s.constructor===X&&(a=!0),a||(u=s.id.clock+s.length);u!==0&&(i++,v(n.restEncoder,c),v(n.restEncoder,u));let l=Ce();return v(l,i),Oa(l,n.restEncoder),n.restEncoder=l,n.toUint8Array()}else return v(n.restEncoder,0),n.toUint8Array()},Lg=t=>Nl(t,dt,he),Vl=(t,e=ae)=>{let r=new Map,n=new Map,o=new Ve(new e(G(t)),!1),s=o.curr;if(s!==null){let i=s.id.client,c=s.id.clock;for(r.set(i,c);s!==null;s=o.next())i!==s.id.client&&(n.set(i,c),r.set(s.id.client,s.id.clock),i=s.id.client),c=s.id.clock+s.length;n.set(i,c)}return{from:r,to:n}},Pg=t=>Vl(t,he),Mg=(t,e)=>{if(t.constructor===oe){let{client:r,clock:n}=t.id;return new oe(R(r,n+e),t.length-e)}else if(t.constructor===X){let{client:r,clock:n}=t.id;return new X(R(r,n+e),t.length-e)}else{let r=t,{client:n,clock:o}=r.id;return new k(R(n,o+e),null,R(n,o+e-1),null,r.rightOrigin,r.parent,r.parentSub,r.content.splice(e))}},Bt=(t,e=ae,r=ge)=>{if(t.length===1)return t[0];let n=t.map(l=>new e(G(l))),o=n.map(l=>new Ve(l,!0)),s=null,i=new r,c=new un(i);for(;o=o.filter(f=>f.curr!==null),o.sort((f,h)=>{if(f.curr.id.client===h.curr.id.client){let p=f.curr.id.clock-h.curr.id.clock;return p===0?f.curr.constructor===h.curr.constructor?0:f.curr.constructor===X?1:-1:p}else return h.curr.id.client-f.curr.id.client}),o.length!==0;){let l=o[0],d=l.curr.id.client;if(s!==null){let f=l.curr,h=!1;for(;f!==null&&f.id.clock+f.length<=s.struct.id.clock+s.struct.length&&f.id.client>=s.struct.id.client;)f=l.next(),h=!0;if(f===null||f.id.client!==d||h&&f.id.clock>s.struct.id.clock+s.struct.length)continue;if(d!==s.struct.id.client)at(c,s.struct,s.offset),s={struct:f,offset:0},l.next();else if(s.struct.id.clock+s.struct.length<f.id.clock)if(s.struct.constructor===X)s.struct.length=f.id.clock+f.length-s.struct.id.clock;else{at(c,s.struct,s.offset);let p=f.id.clock-s.struct.id.clock-s.struct.length;s={struct:new X(R(d,s.struct.id.clock+s.struct.length),p),offset:0}}else{let p=s.struct.id.clock+s.struct.length-f.id.clock;p>0&&(s.struct.constructor===X?s.struct.length-=p:f=Mg(f,p)),s.struct.mergeWith(f)||(at(c,s.struct,s.offset),s={struct:f,offset:0},l.next())}}else s={struct:l.curr,offset:0},l.next();for(let f=l.curr;f!==null&&f.id.client===d&&f.id.clock===s.struct.id.clock+s.struct.length&&f.constructor!==X;f=l.next())at(c,s.struct,s.offset),s={struct:f,offset:0}}s!==null&&(at(c,s.struct,s.offset),s=null),_i(c);let a=n.map(l=>ze(l)),u=Mt(a);return Pe(i,u),i.toUint8Array()},wi=(t,e,r=ae,n=ge)=>{let o=pi(e),s=new n,i=new un(s),c=new r(G(t)),a=new Ve(c,!1);for(;a.curr;){let l=a.curr,d=l.id.client,f=o.get(d)||0;if(a.curr.constructor===X){a.next();continue}if(l.id.clock+l.length>f)for(at(i,l,Ge(f-l.id.clock,0)),a.next();a.curr&&a.curr.id.client===d;)at(i,a.curr,0),a.next();else for(;a.curr&&a.curr.id.client===d&&a.curr.id.clock+a.curr.length<=f;)a.next()}_i(i);let u=ze(c);return Pe(s,u),s.toUint8Array()},Ng=(t,e)=>wi(t,e,he,Ne),Bl=t=>{t.written>0&&(t.clientStructs.push({written:t.written,restEncoder:re(t.encoder.restEncoder)}),t.encoder.restEncoder=Ce(),t.written=0)},at=(t,e,r)=>{t.written>0&&t.currClient!==e.id.client&&Bl(t),t.written===0&&(t.currClient=e.id.client,t.encoder.writeClient(e.id.client),v(t.encoder.restEncoder,e.id.clock+r)),e.write(t.encoder,r),t.written++},_i=t=>{Bl(t);let e=t.encoder.restEncoder;v(e,t.clientStructs.length);for(let r=0;r<t.clientStructs.length;r++){let n=t.clientStructs[r];v(e,n.written),hr(e,n.restEncoder)}},Eo=(t,e,r,n)=>{let o=new r(G(t)),s=new Ve(o,!1),i=new n,c=new un(i);for(let u=s.curr;u!==null;u=s.next())at(c,e(u),0);_i(c);let a=ze(o);return Pe(i,a),i.toUint8Array()},jl=({formatting:t=!0,subdocs:e=!0,yxml:r=!0}={})=>{let n=0,o=V(),s=V(),i=V(),c=V();return c.set(null,null),a=>{switch(a.constructor){case oe:case X:return a;case k:{let u=a,l=u.content;switch(l.constructor){case vr:break;case we:{if(r){let d=l.type;d instanceof $t&&(d.nodeName=K(s,d.nodeName,()=>"node-"+n)),d instanceof pn&&(d.hookName=K(s,d.hookName,()=>"hook-"+n))}break}case ft:{let d=l;d.arr=d.arr.map(()=>n);break}case zt:{let d=l;d.content=new Uint8Array([n]);break}case Kt:{let d=l;e&&(d.opts={},d.doc.guid=n+"");break}case Ke:{let d=l;d.embed={};break}case Y:{let d=l;t&&(d.key=K(i,d.key,()=>n+""),d.value=K(c,d.value,()=>({i:n})));break}case gn:{let d=l;d.arr=d.arr.map(()=>n);break}case Te:{let d=l;d.str=xa(n%10+"",d.str.length);break}default:ce()}return u.parentSub&&(u.parentSub=K(o,u.parentSub,()=>n+"")),n++,a}default:ce()}}},Vg=(t,e)=>Eo(t,jl(e),he,Ne),Bg=(t,e)=>Eo(t,jl(e),ae,ge),jg=t=>Eo(t,js,he,ge),Fl=t=>Eo(t,js,ae,Ne),El="You must not compute changes after the event-handler fired.",jt=class{constructor(e,r){this.target=e,this.currentTarget=e,this.transaction=r,this._changes=null,this._keys=null,this._delta=null,this._path=null}get path(){return this._path||(this._path=Fg(this.currentTarget,this.target))}deletes(e){return Ht(this.transaction.deleteSet,e.id)}get keys(){if(this._keys===null){if(this.transaction.doc._transactionCleanups.length===0)throw ke(El);let e=new Map,r=this.target;this.transaction.changed.get(r).forEach(o=>{if(o!==null){let s=r._map.get(o),i,c;if(this.adds(s)){let a=s.left;for(;a!==null&&this.adds(a);)a=a.left;if(this.deletes(s))if(a!==null&&this.deletes(a))i="delete",c=zn(a.content.getContent());else return;else a!==null&&this.deletes(a)?(i="update",c=zn(a.content.getContent())):(i="add",c=void 0)}else if(this.deletes(s))i="delete",c=zn(s.content.getContent());else return;e.set(o,{action:i,oldValue:c})}}),this._keys=e}return this._keys}get delta(){return this.changes.delta}adds(e){return e.id.clock>=(this.transaction.beforeState.get(e.id.client)||0)}get changes(){let e=this._changes;if(e===null){if(this.transaction.doc._transactionCleanups.length===0)throw ke(El);let r=this.target,n=De(),o=De(),s=[];if(e={added:n,deleted:o,delta:s,keys:this.keys},this.transaction.changed.get(r).has(null)){let c=null,a=()=>{c&&s.push(c)};for(let u=r._start;u!==null;u=u.right)u.deleted?this.deletes(u)&&!this.adds(u)&&((c===null||c.delete===void 0)&&(a(),c={delete:0}),c.delete+=u.length,o.add(u)):this.adds(u)?((c===null||c.insert===void 0)&&(a(),c={insert:[]}),c.insert=c.insert.concat(u.content.getContent()),n.add(u)):((c===null||c.retain===void 0)&&(a(),c={retain:0}),c.retain+=u.length);c!==null&&c.retain===void 0&&a()}this._changes=e}return e}},Fg=(t,e)=>{let r=[];for(;e._item!==null&&e!==t;){if(e._item.parentSub!==null)r.unshift(e._item.parentSub);else{let n=0,o=e._item.parent._start;for(;o!==e._item&&o!==null;)!o.deleted&&o.countable&&(n+=o.length),o=o.right;r.unshift(n)}e=e._item.parent}return r},Z=()=>{Js("Invalid access: Add Yjs type to a document before reading data.")},Yl=80,Si=0,si=class{constructor(e,r){e.marker=!0,this.p=e,this.index=r,this.timestamp=Si++}},Yg=t=>{t.timestamp=Si++},Gl=(t,e,r)=>{t.p.marker=!1,t.p=e,e.marker=!0,t.index=r,t.timestamp=Si++},Gg=(t,e,r)=>{if(t.length>=Yl){let n=t.reduce((o,s)=>o.timestamp<s.timestamp?o:s);return Gl(n,e,r),n}else{let n=new si(e,r);return t.push(n),n}},wo=(t,e)=>{if(t._start===null||e===0||t._searchMarker===null)return null;let r=t._searchMarker.length===0?null:t._searchMarker.reduce((s,i)=>ir(e-s.index)<ir(e-i.index)?s:i),n=t._start,o=0;for(r!==null&&(n=r.p,o=r.index,Yg(r));n.right!==null&&o<e;){if(!n.deleted&&n.countable){if(e<o+n.length)break;o+=n.length}n=n.right}for(;n.left!==null&&o>e;)n=n.left,!n.deleted&&n.countable&&(o-=n.length);for(;n.left!==null&&n.left.id.client===n.id.client&&n.left.id.clock+n.left.length===n.id.clock;)n=n.left,!n.deleted&&n.countable&&(o-=n.length);return r!==null&&ir(r.index-o)<n.parent.length/Yl?(Gl(r,n,o),r):Gg(t._searchMarker,n,o)},dn=(t,e,r)=>{for(let n=t.length-1;n>=0;n--){let o=t[n];if(r>0){let s=o.p;for(s.marker=!1;s&&(s.deleted||!s.countable);)s=s.left,s&&!s.deleted&&s.countable&&(o.index-=s.length);if(s===null||s.marker===!0){t.splice(n,1);continue}o.p=s,s.marker=!0}(e<o.index||r>0&&e===o.index)&&(o.index=Ge(e,o.index+r))}},$g=t=>{t.doc??Z();let e=t._start,r=[];for(;e;)r.push(e),e=e.right;return r},_o=(t,e,r)=>{let n=t,o=e.changedParentTypes;for(;K(o,t,()=>[]).push(r),t._item!==null;)t=t._item.parent;Tl(n._eH,r,e)},F=class{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=ll(),this._dEH=ll(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(e,r){this.doc=e,this._item=r}_copy(){throw Re()}clone(){throw Re()}_write(e){}get _first(){let e=this._start;for(;e!==null&&e.deleted;)e=e.right;return e}_callObserver(e,r){!e.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(e){ul(this._eH,e)}observeDeep(e){ul(this._dEH,e)}unobserve(e){dl(this._eH,e)}unobserveDeep(e){dl(this._dEH,e)}toJSON(){}},$l=(t,e,r)=>{t.doc??Z(),e<0&&(e=t._length+e),r<0&&(r=t._length+r);let n=r-e,o=[],s=t._start;for(;s!==null&&n>0;){if(s.countable&&!s.deleted){let i=s.content.getContent();if(i.length<=e)e-=i.length;else{for(let c=e;c<i.length&&n>0;c++)o.push(i[c]),n--;e=0}}s=s.right}return o},zl=t=>{t.doc??Z();let e=[],r=t._start;for(;r!==null;){if(r.countable&&!r.deleted){let n=r.content.getContent();for(let o=0;o<n.length;o++)e.push(n[o])}r=r.right}return e},zg=(t,e)=>{let r=[],n=t._start;for(;n!==null;){if(n.countable&&ct(n,e)){let o=n.content.getContent();for(let s=0;s<o.length;s++)r.push(o[s])}n=n.right}return r},fn=(t,e)=>{let r=0,n=t._start;for(t.doc??Z();n!==null;){if(n.countable&&!n.deleted){let o=n.content.getContent();for(let s=0;s<o.length;s++)e(o[s],r++,t)}n=n.right}},Kl=(t,e)=>{let r=[];return fn(t,(n,o)=>{r.push(e(n,o,t))}),r},Kg=t=>{let e=t._start,r=null,n=0;return{[Symbol.iterator](){return this},next:()=>{if(r===null){for(;e!==null&&e.deleted;)e=e.right;if(e===null)return{done:!0,value:void 0};r=e.content.getContent(),n=0,e=e.right}let o=r[n++];return r.length<=n&&(r=null),{done:!1,value:o}}}},Hl=(t,e)=>{t.doc??Z();let r=wo(t,e),n=t._start;for(r!==null&&(n=r.p,e-=r.index);n!==null;n=n.right)if(!n.deleted&&n.countable){if(e<n.length)return n.content.getContent()[e];e-=n.length}},ao=(t,e,r,n)=>{let o=r,s=t.doc,i=s.clientID,c=s.store,a=r===null?e._start:r.right,u=[],l=()=>{u.length>0&&(o=new k(R(i,L(c,i)),o,o&&o.lastId,a,a&&a.id,e,null,new ft(u)),o.integrate(t,0),u=[])};n.forEach(d=>{if(d===null)u.push(d);else switch(d.constructor){case Number:case Object:case Boolean:case Array:case String:u.push(d);break;default:switch(l(),d.constructor){case Uint8Array:case ArrayBuffer:o=new k(R(i,L(c,i)),o,o&&o.lastId,a,a&&a.id,e,null,new zt(new Uint8Array(d))),o.integrate(t,0);break;case Me:o=new k(R(i,L(c,i)),o,o&&o.lastId,a,a&&a.id,e,null,new Kt(d)),o.integrate(t,0);break;default:if(d instanceof F)o=new k(R(i,L(c,i)),o,o&&o.lastId,a,a&&a.id,e,null,new we(d)),o.integrate(t,0);else throw new Error("Unexpected content type in insert operation")}}}),l()},ql=()=>ke("Length exceeded!"),Wl=(t,e,r,n)=>{if(r>e._length)throw ql();if(r===0)return e._searchMarker&&dn(e._searchMarker,r,n.length),ao(t,e,null,n);let o=r,s=wo(e,r),i=e._start;for(s!==null&&(i=s.p,r-=s.index,r===0&&(i=i.prev,r+=i&&i.countable&&!i.deleted?i.length:0));i!==null;i=i.right)if(!i.deleted&&i.countable){if(r<=i.length){r<i.length&&ne(t,R(i.id.client,i.id.clock+r));break}r-=i.length}return e._searchMarker&&dn(e._searchMarker,o,n.length),ao(t,e,i,n)},Hg=(t,e,r)=>{let o=(e._searchMarker||[]).reduce((s,i)=>i.index>s.index?i:s,{index:0,p:e._start}).p;if(o)for(;o.right;)o=o.right;return ao(t,e,o,r)},Jl=(t,e,r,n)=>{if(n===0)return;let o=r,s=n,i=wo(e,r),c=e._start;for(i!==null&&(c=i.p,r-=i.index);c!==null&&r>0;c=c.right)!c.deleted&&c.countable&&(r<c.length&&ne(t,R(c.id.client,c.id.clock+r)),r-=c.length);for(;n>0&&c!==null;)c.deleted||(n<c.length&&ne(t,R(c.id.client,c.id.clock+n)),c.delete(t),n-=c.length),c=c.right;if(n>0)throw ql();e._searchMarker&&dn(e._searchMarker,o,-s+n)},lo=(t,e,r)=>{let n=e._map.get(r);n!==void 0&&n.delete(t)},bi=(t,e,r,n)=>{let o=e._map.get(r)||null,s=t.doc,i=s.clientID,c;if(n==null)c=new ft([n]);else switch(n.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:c=new ft([n]);break;case Uint8Array:c=new zt(n);break;case Me:c=new Kt(n);break;default:if(n instanceof F)c=new we(n);else throw new Error("Unexpected content type")}new k(R(i,L(s.store,i)),o,o&&o.lastId,null,null,e,r,c).integrate(t,0)},vi=(t,e)=>{t.doc??Z();let r=t._map.get(e);return r!==void 0&&!r.deleted?r.content.getContent()[r.length-1]:void 0},Ql=t=>{let e={};return t.doc??Z(),t._map.forEach((r,n)=>{r.deleted||(e[n]=r.content.getContent()[r.length-1])}),e},Xl=(t,e)=>{t.doc??Z();let r=t._map.get(e);return r!==void 0&&!r.deleted},qg=(t,e,r)=>{let n=t._map.get(e)||null;for(;n!==null&&(!r.sv.has(n.id.client)||n.id.clock>=(r.sv.get(n.id.client)||0));)n=n.left;return n!==null&&ct(n,r)?n.content.getContent()[n.length-1]:void 0},Zl=(t,e)=>{let r={};return t._map.forEach((n,o)=>{let s=n;for(;s!==null&&(!e.sv.has(s.id.client)||s.id.clock>=(e.sv.get(s.id.client)||0));)s=s.left;s!==null&&ct(s,e)&&(r[o]=s.content.getContent()[s.length-1])}),r},eo=t=>(t.doc??Z(),sl(t._map.entries(),e=>!e[1].deleted)),uo=class extends jt{},Ft=class t extends F{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(e){let r=new t;return r.push(e),r}_integrate(e,r){super._integrate(e,r),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new t}clone(){let e=new t;return e.insert(0,this.toArray().map(r=>r instanceof F?r.clone():r)),e}get length(){return this.doc??Z(),this._length}_callObserver(e,r){super._callObserver(e,r),_o(this,e,new uo(this,e))}insert(e,r){this.doc!==null?D(this.doc,n=>{Wl(n,this,e,r)}):this._prelimContent.splice(e,0,...r)}push(e){this.doc!==null?D(this.doc,r=>{Hg(r,this,e)}):this._prelimContent.push(...e)}unshift(e){this.insert(0,e)}delete(e,r=1){this.doc!==null?D(this.doc,n=>{Jl(n,this,e,r)}):this._prelimContent.splice(e,r)}get(e){return Hl(this,e)}toArray(){return zl(this)}slice(e=0,r=this.length){return $l(this,e,r)}toJSON(){return this.map(e=>e instanceof F?e.toJSON():e)}map(e){return Kl(this,e)}forEach(e){fn(this,e)}[Symbol.iterator](){return Kg(this)}_write(e){e.writeTypeRef(gm)}},Wg=t=>new Ft,fo=class extends jt{constructor(e,r,n){super(e,r),this.keysChanged=n}},Yt=class t extends F{constructor(e){super(),this._prelimContent=null,e===void 0?this._prelimContent=new Map:this._prelimContent=new Map(e)}_integrate(e,r){super._integrate(e,r),this._prelimContent.forEach((n,o)=>{this.set(o,n)}),this._prelimContent=null}_copy(){return new t}clone(){let e=new t;return this.forEach((r,n)=>{e.set(n,r instanceof F?r.clone():r)}),e}_callObserver(e,r){_o(this,e,new fo(this,e,r))}toJSON(){this.doc??Z();let e={};return this._map.forEach((r,n)=>{if(!r.deleted){let o=r.content.getContent()[r.length-1];e[n]=o instanceof F?o.toJSON():o}}),e}get size(){return[...eo(this)].length}keys(){return Xn(eo(this),e=>e[0])}values(){return Xn(eo(this),e=>e[1].content.getContent()[e[1].length-1])}entries(){return Xn(eo(this),e=>[e[0],e[1].content.getContent()[e[1].length-1]])}forEach(e){this.doc??Z(),this._map.forEach((r,n)=>{r.deleted||e(r.content.getContent()[r.length-1],n,this)})}[Symbol.iterator](){return this.entries()}delete(e){this.doc!==null?D(this.doc,r=>{lo(r,this,e)}):this._prelimContent.delete(e)}set(e,r){return this.doc!==null?D(this.doc,n=>{bi(n,this,e,r)}):this._prelimContent.set(e,r),r}get(e){return vi(this,e)}has(e){return Xl(this,e)}clear(){this.doc!==null?D(this.doc,e=>{this.forEach(function(r,n,o){lo(e,o,n)})}):this._prelimContent.clear()}_write(e){e.writeTypeRef(mm)}},Jg=t=>new Yt,lt=(t,e)=>t===e||typeof t=="object"&&typeof e=="object"&&t&&e&&Vs(t,e),hn=class{constructor(e,r,n,o){this.left=e,this.right=r,this.index=n,this.currentAttributes=o}forward(){this.right===null&&ce(),this.right.content.constructor===Y?this.right.deleted||Cr(this.currentAttributes,this.right.content):this.right.deleted||(this.index+=this.right.length),this.left=this.right,this.right=this.right.right}},wl=(t,e,r)=>{for(;e.right!==null&&r>0;)e.right.content.constructor===Y?e.right.deleted||Cr(e.currentAttributes,e.right.content):e.right.deleted||(r<e.right.length&&ne(t,R(e.right.id.client,e.right.id.clock+r)),e.index+=e.right.length,r-=e.right.length),e.left=e.right,e.right=e.right.right;return e},to=(t,e,r,n)=>{let o=new Map,s=n?wo(e,r):null;if(s){let i=new hn(s.p.left,s.p,s.index,o);return wl(t,i,r-s.index)}else{let i=new hn(null,e._start,0,o);return wl(t,i,r)}},eu=(t,e,r,n)=>{for(;r.right!==null&&(r.right.deleted===!0||r.right.content.constructor===Y&&lt(n.get(r.right.content.key),r.right.content.value));)r.right.deleted||n.delete(r.right.content.key),r.forward();let o=t.doc,s=o.clientID;n.forEach((i,c)=>{let a=r.left,u=r.right,l=new k(R(s,L(o.store,s)),a,a&&a.lastId,u,u&&u.id,e,null,new Y(c,i));l.integrate(t,0),r.right=l,r.forward()})},Cr=(t,e)=>{let{key:r,value:n}=e;n===null?t.delete(r):t.set(r,n)},tu=(t,e)=>{for(;t.right!==null;){if(!(t.right.deleted||t.right.content.constructor===Y&&lt(e[t.right.content.key]??null,t.right.content.value)))break;t.forward()}},ru=(t,e,r,n)=>{let o=t.doc,s=o.clientID,i=new Map;for(let c in n){let a=n[c],u=r.currentAttributes.get(c)??null;if(!lt(u,a)){i.set(c,u);let{left:l,right:d}=r;r.right=new k(R(s,L(o.store,s)),l,l&&l.lastId,d,d&&d.id,e,null,new Y(c,a)),r.right.integrate(t,0),r.forward()}}return i},Qs=(t,e,r,n,o)=>{r.currentAttributes.forEach((f,h)=>{o[h]===void 0&&(o[h]=null)});let s=t.doc,i=s.clientID;tu(r,o);let c=ru(t,e,r,o),a=n.constructor===String?new Te(n):n instanceof F?new we(n):new Ke(n),{left:u,right:l,index:d}=r;e._searchMarker&&dn(e._searchMarker,r.index,a.getLength()),l=new k(R(i,L(s.store,i)),u,u&&u.lastId,l,l&&l.id,e,null,a),l.integrate(t,0),r.right=l,r.index=d,r.forward(),eu(t,e,r,c)},_l=(t,e,r,n,o)=>{let s=t.doc,i=s.clientID;tu(r,o);let c=ru(t,e,r,o);e:for(;r.right!==null&&(n>0||c.size>0&&(r.right.deleted||r.right.content.constructor===Y));){if(!r.right.deleted)switch(r.right.content.constructor){case Y:{let{key:a,value:u}=r.right.content,l=o[a];if(l!==void 0){if(lt(l,u))c.delete(a);else{if(n===0)break e;c.set(a,u)}r.right.delete(t)}else r.currentAttributes.set(a,u);break}default:n<r.right.length&&ne(t,R(r.right.id.client,r.right.id.clock+n)),n-=r.right.length;break}r.forward()}if(n>0){let a="";for(;n>0;n--)a+=`
`;r.right=new k(R(i,L(s.store,i)),r.left,r.left&&r.left.lastId,r.right,r.right&&r.right.id,e,null,new Te(a)),r.right.integrate(t,0),r.forward()}eu(t,e,r,c)},nu=(t,e,r,n,o)=>{let s=e,i=V();for(;s&&(!s.countable||s.deleted);){if(!s.deleted&&s.content.constructor===Y){let u=s.content;i.set(u.key,u)}s=s.right}let c=0,a=!1;for(;e!==s;){if(r===e&&(a=!0),!e.deleted){let u=e.content;if(u.constructor===Y){let{key:l,value:d}=u,f=n.get(l)??null;(i.get(l)!==u||f===d)&&(e.delete(t),c++,!a&&(o.get(l)??null)===d&&f!==d&&(f===null?o.delete(l):o.set(l,f))),!a&&!e.deleted&&Cr(o,u)}}e=e.right}return c},Qg=(t,e)=>{for(;e&&e.right&&(e.right.deleted||!e.right.countable);)e=e.right;let r=new Set;for(;e&&(e.deleted||!e.countable);){if(!e.deleted&&e.content.constructor===Y){let n=e.content.key;r.has(n)?e.delete(t):r.add(n)}e=e.left}},ou=t=>{let e=0;return D(t.doc,r=>{let n=t._start,o=t._start,s=V(),i=$n(s);for(;o;)o.deleted===!1&&(o.content.constructor===Y?Cr(i,o.content):(e+=nu(r,n,o,s,i),s=$n(i),n=o)),o=o.right}),e},Xg=t=>{let e=new Set,r=t.doc;for(let[n,o]of t.afterState.entries()){let s=t.beforeState.get(n)||0;o!==s&&Dl(t,r.store.clients.get(n),s,o,i=>{!i.deleted&&i.content.constructor===Y&&i.constructor!==oe&&e.add(i.parent)})}D(r,n=>{Pt(t,t.deleteSet,o=>{if(o instanceof oe||!o.parent._hasFormatting||e.has(o.parent))return;let s=o.parent;o.content.constructor===Y?e.add(s):Qg(n,o)});for(let o of e)ou(o)})},Sl=(t,e,r)=>{let n=r,o=$n(e.currentAttributes),s=e.right;for(;r>0&&e.right!==null;){if(e.right.deleted===!1)switch(e.right.content.constructor){case we:case Ke:case Te:r<e.right.length&&ne(t,R(e.right.id.client,e.right.id.clock+r)),r-=e.right.length,e.right.delete(t);break}e.forward()}s&&nu(t,s,e.right,o,e.currentAttributes);let i=(e.left||e.right).parent;return i._searchMarker&&dn(i._searchMarker,e.index,-n+r),e},ho=class extends jt{constructor(e,r,n){super(e,r),this.childListChanged=!1,this.keysChanged=new Set,n.forEach(o=>{o===null?this.childListChanged=!0:this.keysChanged.add(o)})}get changes(){if(this._changes===null){let e={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=e}return this._changes}get delta(){if(this._delta===null){let e=this.target.doc,r=[];D(e,n=>{let o=new Map,s=new Map,i=this.target._start,c=null,a={},u="",l=0,d=0,f=()=>{if(c!==null){let h=null;switch(c){case"delete":d>0&&(h={delete:d}),d=0;break;case"insert":(typeof u=="object"||u.length>0)&&(h={insert:u},o.size>0&&(h.attributes={},o.forEach((p,g)=>{p!==null&&(h.attributes[g]=p)}))),u="";break;case"retain":l>0&&(h={retain:l},$a(a)||(h.attributes=Fa({},a))),l=0;break}h&&r.push(h),c=null}};for(;i!==null;){switch(i.content.constructor){case we:case Ke:this.adds(i)?this.deletes(i)||(f(),c="insert",u=i.content.getContent()[0],f()):this.deletes(i)?(c!=="delete"&&(f(),c="delete"),d+=1):i.deleted||(c!=="retain"&&(f(),c="retain"),l+=1);break;case Te:this.adds(i)?this.deletes(i)||(c!=="insert"&&(f(),c="insert"),u+=i.content.str):this.deletes(i)?(c!=="delete"&&(f(),c="delete"),d+=i.length):i.deleted||(c!=="retain"&&(f(),c="retain"),l+=i.length);break;case Y:{let{key:h,value:p}=i.content;if(this.adds(i)){if(!this.deletes(i)){let g=o.get(h)??null;lt(g,p)?p!==null&&i.delete(n):(c==="retain"&&f(),lt(p,s.get(h)??null)?delete a[h]:a[h]=p)}}else if(this.deletes(i)){s.set(h,p);let g=o.get(h)??null;lt(g,p)||(c==="retain"&&f(),a[h]=g)}else if(!i.deleted){s.set(h,p);let g=a[h];g!==void 0&&(lt(g,p)?g!==null&&i.delete(n):(c==="retain"&&f(),p===null?delete a[h]:a[h]=p))}i.deleted||(c==="insert"&&f(),Cr(o,i.content));break}}i=i.right}for(f();r.length>0;){let h=r[r.length-1];if(h.retain!==void 0&&h.attributes===void 0)r.pop();else break}}),this._delta=r}return this._delta}},Sr=class t extends F{constructor(e){super(),this._pending=e!==void 0?[()=>this.insert(0,e)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??Z(),this._length}_integrate(e,r){super._integrate(e,r);try{this._pending.forEach(n=>n())}catch(n){console.error(n)}this._pending=null}_copy(){return new t}clone(){let e=new t;return e.applyDelta(this.toDelta()),e}_callObserver(e,r){super._callObserver(e,r);let n=new ho(this,e,r);_o(this,e,n),!e.local&&this._hasFormatting&&(e._needFormattingCleanup=!0)}toString(){this.doc??Z();let e="",r=this._start;for(;r!==null;)!r.deleted&&r.countable&&r.content.constructor===Te&&(e+=r.content.str),r=r.right;return e}toJSON(){return this.toString()}applyDelta(e,{sanitize:r=!0}={}){this.doc!==null?D(this.doc,n=>{let o=new hn(null,this._start,0,new Map);for(let s=0;s<e.length;s++){let i=e[s];if(i.insert!==void 0){let c=!r&&typeof i.insert=="string"&&s===e.length-1&&o.right===null&&i.insert.slice(-1)===`
`?i.insert.slice(0,-1):i.insert;(typeof c!="string"||c.length>0)&&Qs(n,this,o,c,i.attributes||{})}else i.retain!==void 0?_l(n,this,o,i.retain,i.attributes||{}):i.delete!==void 0&&Sl(n,o,i.delete)}}):this._pending.push(()=>this.applyDelta(e))}toDelta(e,r,n){this.doc??Z();let o=[],s=new Map,i=this.doc,c="",a=this._start;function u(){if(c.length>0){let d={},f=!1;s.forEach((p,g)=>{f=!0,d[g]=p});let h={insert:c};f&&(h.attributes=d),o.push(h),c=""}}let l=()=>{for(;a!==null;){if(ct(a,e)||r!==void 0&&ct(a,r))switch(a.content.constructor){case Te:{let d=s.get("ychange");e!==void 0&&!ct(a,e)?(d===void 0||d.user!==a.id.client||d.type!=="removed")&&(u(),s.set("ychange",n?n("removed",a.id):{type:"removed"})):r!==void 0&&!ct(a,r)?(d===void 0||d.user!==a.id.client||d.type!=="added")&&(u(),s.set("ychange",n?n("added",a.id):{type:"added"})):d!==void 0&&(u(),s.delete("ychange")),c+=a.content.str;break}case we:case Ke:{u();let d={insert:a.content.getContent()[0]};if(s.size>0){let f={};d.attributes=f,s.forEach((h,p)=>{f[p]=h})}o.push(d);break}case Y:ct(a,e)&&(u(),Cr(s,a.content));break}a=a.right}u()};return e||r?D(i,d=>{e&&ti(d,e),r&&ti(d,r),l()},"cleanup"):l(),o}insert(e,r,n){if(r.length<=0)return;let o=this.doc;o!==null?D(o,s=>{let i=to(s,this,e,!n);n||(n={},i.currentAttributes.forEach((c,a)=>{n[a]=c})),Qs(s,this,i,r,n)}):this._pending.push(()=>this.insert(e,r,n))}insertEmbed(e,r,n){let o=this.doc;o!==null?D(o,s=>{let i=to(s,this,e,!n);Qs(s,this,i,r,n||{})}):this._pending.push(()=>this.insertEmbed(e,r,n||{}))}delete(e,r){if(r===0)return;let n=this.doc;n!==null?D(n,o=>{Sl(o,to(o,this,e,!0),r)}):this._pending.push(()=>this.delete(e,r))}format(e,r,n){if(r===0)return;let o=this.doc;o!==null?D(o,s=>{let i=to(s,this,e,!1);i.right!==null&&_l(s,this,i,r,n)}):this._pending.push(()=>this.format(e,r,n))}removeAttribute(e){this.doc!==null?D(this.doc,r=>{lo(r,this,e)}):this._pending.push(()=>this.removeAttribute(e))}setAttribute(e,r){this.doc!==null?D(this.doc,n=>{bi(n,this,e,r)}):this._pending.push(()=>this.setAttribute(e,r))}getAttribute(e){return vi(this,e)}getAttributes(){return Ql(this)}_write(e){e.writeTypeRef(ym)}},Zg=t=>new Sr,on=class{constructor(e,r=()=>!0){this._filter=r,this._root=e,this._currentNode=e._start,this._firstCall=!0,e.doc??Z()}[Symbol.iterator](){return this}next(){let e=this._currentNode,r=e&&e.content&&e.content.type;if(e!==null&&(!this._firstCall||e.deleted||!this._filter(r)))do if(r=e.content.type,!e.deleted&&(r.constructor===$t||r.constructor===Gt)&&r._start!==null)e=r._start;else for(;e!==null;){let n=e.next;if(n!==null){e=n;break}else e.parent===this._root?e=null:e=e.parent._item}while(e!==null&&(e.deleted||!this._filter(e.content.type)));return this._firstCall=!1,e===null?{value:void 0,done:!0}:(this._currentNode=e,{value:e.content.type,done:!1})}},Gt=class t extends F{constructor(){super(),this._prelimContent=[]}get firstChild(){let e=this._first;return e?e.content.getContent()[0]:null}_integrate(e,r){super._integrate(e,r),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new t}clone(){let e=new t;return e.insert(0,this.toArray().map(r=>r instanceof F?r.clone():r)),e}get length(){return this.doc??Z(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(e){return new on(this,e)}querySelector(e){e=e.toUpperCase();let n=new on(this,o=>o.nodeName&&o.nodeName.toUpperCase()===e).next();return n.done?null:n.value}querySelectorAll(e){return e=e.toUpperCase(),ve(new on(this,r=>r.nodeName&&r.nodeName.toUpperCase()===e))}_callObserver(e,r){_o(this,e,new po(this,r,e))}toString(){return Kl(this,e=>e.toString()).join("")}toJSON(){return this.toString()}toDOM(e=document,r={},n){let o=e.createDocumentFragment();return n!==void 0&&n._createAssociation(o,this),fn(this,s=>{o.insertBefore(s.toDOM(e,r,n),null)}),o}insert(e,r){this.doc!==null?D(this.doc,n=>{Wl(n,this,e,r)}):this._prelimContent.splice(e,0,...r)}insertAfter(e,r){if(this.doc!==null)D(this.doc,n=>{let o=e&&e instanceof F?e._item:e;ao(n,this,o,r)});else{let n=this._prelimContent,o=e===null?0:n.findIndex(s=>s===e)+1;if(o===0&&e!==null)throw ke("Reference item not found");n.splice(o,0,...r)}}delete(e,r=1){this.doc!==null?D(this.doc,n=>{Jl(n,this,e,r)}):this._prelimContent.splice(e,r)}toArray(){return zl(this)}push(e){this.insert(this.length,e)}unshift(e){this.insert(0,e)}get(e){return Hl(this,e)}slice(e=0,r=this.length){return $l(this,e,r)}forEach(e){fn(this,e)}_write(e){e.writeTypeRef(wm)}},em=t=>new Gt,$t=class t extends Gt{constructor(e="UNDEFINED"){super(),this.nodeName=e,this._prelimAttrs=new Map}get nextSibling(){let e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){let e=this._item?this._item.prev:null;return e?e.content.type:null}_integrate(e,r){super._integrate(e,r),this._prelimAttrs.forEach((n,o)=>{this.setAttribute(o,n)}),this._prelimAttrs=null}_copy(){return new t(this.nodeName)}clone(){let e=new t(this.nodeName),r=this.getAttributes();return Ga(r,(n,o)=>{e.setAttribute(o,n)}),e.insert(0,this.toArray().map(n=>n instanceof F?n.clone():n)),e}toString(){let e=this.getAttributes(),r=[],n=[];for(let c in e)n.push(c);n.sort();let o=n.length;for(let c=0;c<o;c++){let a=n[c];r.push(a+'="'+e[a]+'"')}let s=this.nodeName.toLocaleLowerCase(),i=r.length>0?" "+r.join(" "):"";return`<${s}${i}>${super.toString()}</${s}>`}removeAttribute(e){this.doc!==null?D(this.doc,r=>{lo(r,this,e)}):this._prelimAttrs.delete(e)}setAttribute(e,r){this.doc!==null?D(this.doc,n=>{bi(n,this,e,r)}):this._prelimAttrs.set(e,r)}getAttribute(e){return vi(this,e)}hasAttribute(e){return Xl(this,e)}getAttributes(e){return e?Zl(this,e):Ql(this)}toDOM(e=document,r={},n){let o=e.createElement(this.nodeName),s=this.getAttributes();for(let i in s){let c=s[i];typeof c=="string"&&o.setAttribute(i,c)}return fn(this,i=>{o.appendChild(i.toDOM(e,r,n))}),n!==void 0&&n._createAssociation(o,this),o}_write(e){e.writeTypeRef(Em),e.writeKey(this.nodeName)}},tm=t=>new $t(t.readKey()),po=class extends jt{constructor(e,r,n){super(e,n),this.childListChanged=!1,this.attributesChanged=new Set,r.forEach(o=>{o===null?this.childListChanged=!0:this.attributesChanged.add(o)})}},pn=class t extends Yt{constructor(e){super(),this.hookName=e}_copy(){return new t(this.hookName)}clone(){let e=new t(this.hookName);return this.forEach((r,n)=>{e.set(n,r)}),e}toDOM(e=document,r={},n){let o=r[this.hookName],s;return o!==void 0?s=o.createDom(this):s=document.createElement(this.hookName),s.setAttribute("data-yjs-hook",this.hookName),n!==void 0&&n._createAssociation(s,this),s}_write(e){e.writeTypeRef(_m),e.writeKey(this.hookName)}},rm=t=>new pn(t.readKey()),go=class t extends Sr{get nextSibling(){let e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){let e=this._item?this._item.prev:null;return e?e.content.type:null}_copy(){return new t}clone(){let e=new t;return e.applyDelta(this.toDelta()),e}toDOM(e=document,r,n){let o=e.createTextNode(this.toString());return n!==void 0&&n._createAssociation(o,this),o}toString(){return this.toDelta().map(e=>{let r=[];for(let o in e.attributes){let s=[];for(let i in e.attributes[o])s.push({key:i,value:e.attributes[o][i]});s.sort((i,c)=>i.key<c.key?-1:1),r.push({nodeName:o,attrs:s})}r.sort((o,s)=>o.nodeName<s.nodeName?-1:1);let n="";for(let o=0;o<r.length;o++){let s=r[o];n+=`<${s.nodeName}`;for(let i=0;i<s.attrs.length;i++){let c=s.attrs[i];n+=` ${c.key}="${c.value}"`}n+=">"}n+=e.insert;for(let o=r.length-1;o>=0;o--)n+=`</${r[o].nodeName}>`;return n}).join("")}toJSON(){return this.toString()}_write(e){e.writeTypeRef(Sm)}},nm=t=>new go,br=class{constructor(e,r){this.id=e,this.length=r}get deleted(){throw Re()}mergeWith(e){return!1}write(e,r,n){throw Re()}integrate(e,r){throw Re()}},om=0,oe=class extends br{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor!==e.constructor?!1:(this.length+=e.length,!0)}integrate(e,r){r>0&&(this.id.clock+=r,this.length-=r),Al(e.doc.store,this)}write(e,r){e.writeInfo(om),e.writeLen(this.length-r)}getMissing(e,r){return null}},zt=class t{constructor(e){this.content=e}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new t(this.content)}splice(e){throw Re()}mergeWith(e){return!1}integrate(e,r){}delete(e){}gc(e){}write(e,r){e.writeBuf(this.content)}getRef(){return 3}},sm=t=>new zt(t.readBuf()),vr=class t{constructor(e){this.len=e}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new t(this.len)}splice(e){let r=new t(this.len-e);return this.len=e,r}mergeWith(e){return this.len+=e.len,!0}integrate(e,r){cn(e.deleteSet,r.id.client,r.id.clock,this.len),r.markDeleted()}delete(e){}gc(e){}write(e,r){e.writeLen(this.len-r)}getRef(){return 1}},im=t=>new vr(t.readLen()),su=(t,e)=>new Me({guid:t,...e,shouldLoad:e.shouldLoad||e.autoLoad||!1}),Kt=class t{constructor(e){e._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=e;let r={};this.opts=r,e.gc||(r.gc=!1),e.autoLoad&&(r.autoLoad=!0),e.meta!==null&&(r.meta=e.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new t(su(this.doc.guid,this.opts))}splice(e){throw Re()}mergeWith(e){return!1}integrate(e,r){this.doc._item=r,e.subdocsAdded.add(this.doc),this.doc.shouldLoad&&e.subdocsLoaded.add(this.doc)}delete(e){e.subdocsAdded.has(this.doc)?e.subdocsAdded.delete(this.doc):e.subdocsRemoved.add(this.doc)}gc(e){}write(e,r){e.writeString(this.doc.guid),e.writeAny(this.opts)}getRef(){return 9}},cm=t=>new Kt(su(t.readString(),t.readAny())),Ke=class t{constructor(e){this.embed=e}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new t(this.embed)}splice(e){throw Re()}mergeWith(e){return!1}integrate(e,r){}delete(e){}gc(e){}write(e,r){e.writeJSON(this.embed)}getRef(){return 5}},am=t=>new Ke(t.readJSON()),Y=class t{constructor(e,r){this.key=e,this.value=r}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new t(this.key,this.value)}splice(e){throw Re()}mergeWith(e){return!1}integrate(e,r){let n=r.parent;n._searchMarker=null,n._hasFormatting=!0}delete(e){}gc(e){}write(e,r){e.writeKey(this.key),e.writeJSON(this.value)}getRef(){return 6}},lm=t=>new Y(t.readKey(),t.readJSON()),gn=class t{constructor(e){this.arr=e}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new t(this.arr)}splice(e){let r=new t(this.arr.slice(e));return this.arr=this.arr.slice(0,e),r}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,r){}delete(e){}gc(e){}write(e,r){let n=this.arr.length;e.writeLen(n-r);for(let o=r;o<n;o++){let s=this.arr[o];e.writeString(s===void 0?"undefined":JSON.stringify(s))}}getRef(){return 2}},um=t=>{let e=t.readLen(),r=[];for(let n=0;n<e;n++){let o=t.readString();o==="undefined"?r.push(void 0):r.push(JSON.parse(o))}return new gn(r)},dm=en("node_env")==="development",ft=class t{constructor(e){this.arr=e,dm&&Bs(e)}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new t(this.arr)}splice(e){let r=new t(this.arr.slice(e));return this.arr=this.arr.slice(0,e),r}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,r){}delete(e){}gc(e){}write(e,r){let n=this.arr.length;e.writeLen(n-r);for(let o=r;o<n;o++){let s=this.arr[o];e.writeAny(s)}}getRef(){return 8}},fm=t=>{let e=t.readLen(),r=[];for(let n=0;n<e;n++)r.push(t.readAny());return new ft(r)},Te=class t{constructor(e){this.str=e}getLength(){return this.str.length}getContent(){return this.str.split("")}isCountable(){return!0}copy(){return new t(this.str)}splice(e){let r=new t(this.str.slice(e));this.str=this.str.slice(0,e);let n=this.str.charCodeAt(e-1);return n>=55296&&n<=56319&&(this.str=this.str.slice(0,e-1)+"\uFFFD",r.str="\uFFFD"+r.str.slice(1)),r}mergeWith(e){return this.str+=e.str,!0}integrate(e,r){}delete(e){}gc(e){}write(e,r){e.writeString(r===0?this.str:this.str.slice(r))}getRef(){return 4}},hm=t=>new Te(t.readString()),pm=[Wg,Jg,Zg,tm,em,rm,nm],gm=0,mm=1,ym=2,Em=3,wm=4,_m=5,Sm=6,we=class t{constructor(e){this.type=e}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new t(this.type._copy())}splice(e){throw Re()}mergeWith(e){return!1}integrate(e,r){this.type._integrate(e.doc,r)}delete(e){let r=this.type._start;for(;r!==null;)r.deleted?r.id.clock<(e.beforeState.get(r.id.client)||0)&&e._mergeStructs.push(r):r.delete(e),r=r.right;this.type._map.forEach(n=>{n.deleted?n.id.clock<(e.beforeState.get(n.id.client)||0)&&e._mergeStructs.push(n):n.delete(e)}),e.changed.delete(this.type)}gc(e){let r=this.type._start;for(;r!==null;)r.gc(e,!0),r=r.right;this.type._start=null,this.type._map.forEach(n=>{for(;n!==null;)n.gc(e,!0),n=n.left}),this.type._map=new Map}write(e,r){this.type._write(e)}getRef(){return 7}},bm=t=>new we(pm[t.readTypeRef()](t)),ii=(t,e)=>{let r=e,n=0,o;do n>0&&(r=R(r.client,r.clock+n)),o=Lt(t,r),n=r.clock-o.id.clock,r=o.redone;while(r!==null&&o instanceof k);return{item:o,diff:n}},Ci=(t,e)=>{for(;t!==null&&t.keep!==e;)t.keep=e,t=t.parent._item},mo=(t,e,r)=>{let{client:n,clock:o}=e.id,s=new k(R(n,o+r),e,R(n,o+r-1),e.right,e.rightOrigin,e.parent,e.parentSub,e.content.splice(r));return e.deleted&&s.markDeleted(),e.keep&&(s.keep=!0),e.redone!==null&&(s.redone=R(e.redone.client,e.redone.clock+r)),e.right=s,s.right!==null&&(s.right.left=s),t._mergeStructs.push(s),s.parentSub!==null&&s.right===null&&s.parent._map.set(s.parentSub,s),e.length=r,s},bl=(t,e)=>ba(t,r=>Ht(r.deletions,e)),iu=(t,e,r,n,o,s)=>{let i=t.doc,c=i.store,a=i.clientID,u=e.redone;if(u!==null)return ne(t,u);let l=e.parent._item,d=null,f;if(l!==null&&l.deleted===!0){if(l.redone===null&&(!r.has(l)||iu(t,l,r,n,o,s)===null))return null;for(;l.redone!==null;)l=ne(t,l.redone)}let h=l===null?e.parent:l.content.type;if(e.parentSub===null){for(d=e.left,f=e;d!==null;){let y=d;for(;y!==null&&y.parent._item!==l;)y=y.redone===null?null:ne(t,y.redone);if(y!==null&&y.parent._item===l){d=y;break}d=d.left}for(;f!==null;){let y=f;for(;y!==null&&y.parent._item!==l;)y=y.redone===null?null:ne(t,y.redone);if(y!==null&&y.parent._item===l){f=y;break}f=f.right}}else if(f=null,e.right&&!o){for(d=e;d!==null&&d.right!==null&&(d.right.redone||Ht(n,d.right.id)||bl(s.undoStack,d.right.id)||bl(s.redoStack,d.right.id));)for(d=d.right;d.redone;)d=ne(t,d.redone);if(d&&d.right!==null)return null}else d=h._map.get(e.parentSub)||null;let p=L(c,a),g=R(a,p),m=new k(g,d,d&&d.lastId,f,f&&f.id,h,e.parentSub,e.content.copy());return e.redone=g,Ci(m,!0),m.integrate(t,0),m},k=class t extends br{constructor(e,r,n,o,s,i,c,a){super(e,a.getLength()),this.origin=n,this.left=r,this.right=o,this.rightOrigin=s,this.parent=i,this.parentSub=c,this.redone=null,this.content=a,this.info=this.content.isCountable()?2:0}set marker(e){(this.info&8)>0!==e&&(this.info^=8)}get marker(){return(this.info&8)>0}get keep(){return(this.info&1)>0}set keep(e){this.keep!==e&&(this.info^=1)}get countable(){return(this.info&2)>0}get deleted(){return(this.info&4)>0}set deleted(e){this.deleted!==e&&(this.info^=4)}markDeleted(){this.info|=4}getMissing(e,r){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=L(r,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=L(r,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===$e&&this.id.client!==this.parent.client&&this.parent.clock>=L(r,this.parent.client))return this.parent.client;if(this.origin&&(this.left=ni(e,r,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=ne(e,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===oe||this.right&&this.right.constructor===oe)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===t?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===t&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===$e){let n=Lt(r,this.parent);n.constructor===oe?this.parent=null:this.parent=n.content.type}return null}integrate(e,r){if(r>0&&(this.id.clock+=r,this.left=ni(e,e.doc.store,R(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(r),this.length-=r),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let n=this.left,o;if(n!==null)o=n.right;else if(this.parentSub!==null)for(o=this.parent._map.get(this.parentSub)||null;o!==null&&o.left!==null;)o=o.left;else o=this.parent._start;let s=new Set,i=new Set;for(;o!==null&&o!==this.right;){if(i.add(o),s.add(o),Ut(this.origin,o.origin)){if(o.id.client<this.id.client)n=o,s.clear();else if(Ut(this.rightOrigin,o.rightOrigin))break}else if(o.origin!==null&&i.has(Lt(e.doc.store,o.origin)))s.has(Lt(e.doc.store,o.origin))||(n=o,s.clear());else break;o=o.right}this.left=n}if(this.left!==null){let n=this.left.right;this.right=n,this.left.right=this}else{let n;if(this.parentSub!==null)for(n=this.parent._map.get(this.parentSub)||null;n!==null&&n.left!==null;)n=n.left;else n=this.parent._start,this.parent._start=this;this.right=n}this.right!==null?this.right.left=this:this.parentSub!==null&&(this.parent._map.set(this.parentSub,this),this.left!==null&&this.left.delete(e)),this.parentSub===null&&this.countable&&!this.deleted&&(this.parent._length+=this.length),Al(e.doc.store,this),this.content.integrate(e,this),gl(e,this.parent,this.parentSub),(this.parent._item!==null&&this.parent._item.deleted||this.parentSub!==null&&this.right!==null)&&this.delete(e)}else new oe(this.id,this.length).integrate(e,0)}get next(){let e=this.right;for(;e!==null&&e.deleted;)e=e.right;return e}get prev(){let e=this.left;for(;e!==null&&e.deleted;)e=e.left;return e}get lastId(){return this.length===1?this.id:R(this.id.client,this.id.clock+this.length-1)}mergeWith(e){if(this.constructor===e.constructor&&Ut(e.origin,this.lastId)&&this.right===e&&Ut(this.rightOrigin,e.rightOrigin)&&this.id.client===e.id.client&&this.id.clock+this.length===e.id.clock&&this.deleted===e.deleted&&this.redone===null&&e.redone===null&&this.content.constructor===e.content.constructor&&this.content.mergeWith(e.content)){let r=this.parent._searchMarker;return r&&r.forEach(n=>{n.p===e&&(n.p=this,!this.deleted&&this.countable&&(n.index-=this.length))}),e.keep&&(this.keep=!0),this.right=e.right,this.right!==null&&(this.right.left=this),this.length+=e.length,!0}return!1}delete(e){if(!this.deleted){let r=this.parent;this.countable&&this.parentSub===null&&(r._length-=this.length),this.markDeleted(),cn(e.deleteSet,this.id.client,this.id.clock,this.length),gl(e,r,this.parentSub),this.content.delete(e)}}gc(e,r){if(!this.deleted)throw ce();this.content.gc(e),r?Ag(e,this,new oe(this.id,this.length)):this.content=new vr(this.length)}write(e,r){let n=r>0?R(this.id.client,this.id.clock+r-1):this.origin,o=this.rightOrigin,s=this.parentSub,i=this.content.getRef()&31|(n===null?0:128)|(o===null?0:64)|(s===null?0:32);if(e.writeInfo(i),n!==null&&e.writeLeftID(n),o!==null&&e.writeRightID(o),n===null&&o===null){let c=this.parent;if(c._item!==void 0){let a=c._item;if(a===null){let u=yi(c);e.writeParentInfo(!0),e.writeString(u)}else e.writeParentInfo(!1),e.writeLeftID(a.id)}else c.constructor===String?(e.writeParentInfo(!0),e.writeString(c)):c.constructor===$e?(e.writeParentInfo(!1),e.writeLeftID(c)):ce();s!==null&&e.writeString(s)}this.content.write(e,r)}},cu=(t,e)=>vm[e&31](t),vm=[()=>{ce()},im,um,sm,hm,am,lm,bm,fm,cm,()=>{ce()}],Cm=10,X=class extends br{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor!==e.constructor?!1:(this.length+=e.length,!0)}integrate(e,r){ce()}write(e,r){e.writeInfo(Cm),v(e.restEncoder,this.length-r)}getMissing(e,r){return null}},au=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{},lu="__ $YJS$ __";au[lu]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");au[lu]=!0;var Ri=3e4,qt=class extends sr{constructor(e){super(),this.doc=e,this.clientID=e.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{let r=it();this.getLocalState()!==null&&Ri/2<=r-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());let n=[];this.meta.forEach((o,s)=>{s!==this.clientID&&Ri<=r-o.lastUpdated&&this.states.has(s)&&n.push(s)}),n.length>0&&Ti(this,n,"timeout")},fe(Ri/10)),e.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(e){let r=this.clientID,n=this.meta.get(r),o=n===void 0?0:n.clock+1,s=this.states.get(r);e===null?this.states.delete(r):this.states.set(r,e),this.meta.set(r,{clock:o,lastUpdated:it()});let i=[],c=[],a=[],u=[];e===null?u.push(r):s==null?e!=null&&i.push(r):(c.push(r),Xr(s,e)||a.push(r)),(i.length>0||a.length>0||u.length>0)&&this.emit("change",[{added:i,updated:a,removed:u},"local"]),this.emit("update",[{added:i,updated:c,removed:u},"local"])}setLocalStateField(e,r){let n=this.getLocalState();n!==null&&this.setLocalState({...n,[e]:r})}getStates(){return this.states}},Ti=(t,e,r)=>{let n=[];for(let o=0;o<e.length;o++){let s=e[o];if(t.states.has(s)){if(t.states.delete(s),s===t.clientID){let i=t.meta.get(s);t.meta.set(s,{clock:i.clock+1,lastUpdated:it()})}n.push(s)}}n.length>0&&(t.emit("change",[{added:[],updated:[],removed:n},r]),t.emit("update",[{added:[],updated:[],removed:n},r]))};var uu=1,So="fromPersistence",bo="document",Rr="state",Wt="savedAt",du="savedBy",fu="version",vo="gutenberg",xi="syncManager",hu="gutenberg-undo-ignored";var Tr=(t=>(t.AUTHENTICATION_FAILED="authentication-failed",t.CONNECTION_EXPIRED="connection-expired",t.CONNECTION_LIMIT_EXCEEDED="connection-limit-exceeded",t.DOCUMENT_SIZE_LIMIT_EXCEEDED="document-size-limit-exceeded",t.UNKNOWN_ERROR="unknown-error",t))(Tr||{}),Ii=class extends Error{constructor(t="unknown-error",e){super(e),this.code=t,this.name="ConnectionError"}};var gu=w(Ai(),1),{lock:mu,unlock:sb}=(0,gu.__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/sync");function yu(t){return function(...e){let r=performance.now(),n=t.apply(this,e),o=performance.now();return console.log(`[SyncManager][performance]: ${t.name} took ${(o-r).toFixed(2)} ms`),n}}function Eu(t){return((...e)=>t(...e))}function wu(t){return function(...e){setTimeout(()=>{t.apply(this,e)},0)}}var Fu=w(Co(),1);var Mu=w(Co(),1);var Su=0,bu=1,Rm=2,vu=(t,e)=>{v(t,Su);let r=mi(e);J(t,r)},Tm=(t,e,r)=>{v(t,bu),J(t,hi(e,r))},xm=(t,e,r)=>Tm(e,r,Q(t)),Cu=(t,e,r,n)=>{try{fi(e,Q(t),r)}catch(o){n?.(o),console.error("Caught error while handling a Yjs update",o)}};var Im=Cu,Di=(t,e,r,n,o)=>{let s=T(t);switch(s){case Su:xm(t,e,r);break;case bu:Cu(t,r,n,o);break;case Rm:Im(t,r,n,o);break;default:throw new Error("Unknown message type")}return s};var ki=w(Co(),1),Oi=3,Ru=[2e3,4e3,8e3,12e3],Tu=[1e3,2e3,4e3,8e3],xu=3e4,Iu=15e3,Ui=1*1024*1024,yn=50,Li=(0,ki.applyFilters)("sync.pollingManager.pollingInterval",4e3),Au=(0,ki.applyFilters)("sync.pollingManager.pollingIntervalWithCollaborators",1e3),Du=25*1e3;var le=(t=>(t.COMPACTION="compaction",t.SYNC_STEP_1="sync_step1",t.SYNC_STEP_2="sync_step2",t.UPDATE="update",t))(le||{});var Pi=w(Ae(),1);var ku="/wp-sync/v1/updates";function Dm(t){let e="",r=t.byteLength;for(let n=0;n<r;n++)e+=String.fromCharCode(t[n]);return globalThis.btoa(e)}function Mi(t){let e=globalThis.atob(t),r=e.length,n=new Uint8Array(r);for(let o=0;o<r;o++)n[o]=e.charCodeAt(o);return n}function xr(t,e){return{data:Dm(t),type:e}}function Ou(t=[],e=!0){let r=e,n=[...t];return{add(o){n.push(o)},addBulk(o){o.length!==0&&n.push(...o)},clear(){n.splice(0,n.length)},get(){return r?[]:n.splice(0,n.length)},pause(){r=!0},restore(o){let s=o.filter(i=>i.type!==le.COMPACTION);s.length!==0&&n.unshift(...s)},resume(){r=!1},size(){return n.length}}}async function Uu(t){let e=await(0,Pi.default)({body:JSON.stringify(t),headers:{"Content-Type":"application/json"},method:"POST",parse:!1,path:ku});if(!e.ok)throw new Error(`Sync update failed with status ${e.status}`);return await e.json()}function Ni(t){t.rooms.length!==0&&(0,Pi.default)({body:JSON.stringify(t),headers:{"Content-Type":"application/json"},keepalive:!0,method:"POST",parse:!1,path:ku}).catch(()=>{})}function Lu(t,e){let r=parseInt(String(t),10);return isNaN(r)?e:r}function Pu(t,e,r){if(t.length===0)return{window:[],nextOffset:0};let n=(e%t.length+t.length)%t.length;return{window:[...t.slice(n),...t.slice(0,n)].slice(0,Math.max(0,r)),nextOffset:(n+Math.max(0,r))%t.length}}var wn="polling-manager";function km(t){return t?.data?.status===403}function Om(t,e){let r=typeof t.message=="string"?t.message:"",n=[...e].sort((o,s)=>s.length-o.length);for(let o of n)if(r.includes(o))return o;return null}function Um(t,e){let r=Om(t,e.map(n=>n.room));if(r){let n=P.get(r);n&&(n.log("Permission denied, unregistering room",{error:t},"error",!0),_n(r,{sendDisconnectSignal:!1}));for(let o of e){if(o.room===r||!P.has(o.room))continue;let s=P.get(o.room);o.updates.length>0&&s.updateQueue.restore(o.updates)}}else{let n=[...P.keys()];for(let o of n){let s=P.get(o);s&&(s.log("Permission denied, unregistering room",{error:t},"error",!0),_n(o,{sendDisconnectSignal:!1}))}}}var P=new Map;function Lm(t){let e=t.filter(r=>[le.COMPACTION,le.UPDATE].includes(r.type)).map(r=>Mi(r.data));return xr(Bt(e),le.COMPACTION)}function Pm(t){let e=Ce();return vu(e,t),xr(re(e),le.SYNC_STEP_1)}function Mm(t,e){let r=G(e),n=Ce();return Di(r,n,t,wn),xr(re(n),le.SYNC_STEP_2)}function Nm(t,e){let r=e.getStates(),n=new Set,o=new Set,s=new Set(Array.from(r.keys()).filter(i=>!t[i]));Object.entries(t).forEach(([i,c])=>{let a=Number(i);if(a===e.clientID)return;if(c===null){r.delete(a),s.add(a);return}if(!r.has(a)){r.set(a,c),n.add(a);return}let u=r.get(a);JSON.stringify(u)!==JSON.stringify(c)&&(r.set(a,c),o.add(a))}),n.size+o.size>0&&e.emit("change",[{added:Array.from(n),updated:Array.from(o),removed:[]}]),s.size>0&&Ti(e,Array.from(s),wn)}function Vm(t,e,r){let n=Mi(t.data);switch(t.type){case le.SYNC_STEP_1:return Mm(e,n);case le.SYNC_STEP_2:{let o=G(n),s=Ce();Di(o,s,e,wn),r();return}case le.COMPACTION:case le.UPDATE:Be(e,n,wn)}}function Bm(t,e){if(!e.isPrimaryRoom||Vi)return!1;Vi=!0;let r=(0,Mu.applyFilters)("sync.pollingProvider.maxClientsPerRoom",Oi,e.room),n=Object.keys(t).length,o=Lu(r,Oi);return n>o?(e.log("Connection limit exceeded",{clientCount:n,maxClientsPerRoom:o,room:e.room}),!0):!1}var Io=!1,Jt=0,Vi=!1,To=!1,Ro=!1,En=document.visibilityState==="visible",xo=!1,Bi=!1,He=Li,pt=null,ji=0;function Nu(){Bi=!0}function Vu(){let t=Array.from(P.entries()).map(([e,r])=>({after:0,awareness:null,client_id:r.clientId,room:e,updates:[]}));for(let e=0;e<t.length;e+=yn)Ni({rooms:t.slice(e,e+yn)})}function Bu(){let t=En;En=document.visibilityState==="visible",En&&!t&&pt&&(clearTimeout(pt),pt=null,Ao())}function jm(){let t=Array.from(P.values());if(t.length<=yn)return t;let e=t.find(i=>i.isPrimaryRoom),r=t.filter(i=>i!==e),n=yn-(e?1:0),{window:o,nextOffset:s}=Pu(r,ji,n);return ji=s,e?[e,...o]:o}function Ao(){xo=!0,pt=null;async function t(){if(P.size===0){xo=!1;return}Bi=!1;let e=jm(),r={rooms:e.map(n=>({after:n.endCursor??0,awareness:n.localAwarenessState,client_id:n.clientId,room:n.room,updates:n.updateQueue.get()}))};e.forEach(n=>{n.onStatusChange({status:"connecting"})});try{let{rooms:n}=await Uu(r);Jt=0,To=!1,e.forEach(o=>{P.get(o.room)===o&&o.onStatusChange({status:"connected"})}),Ro=!1,n.forEach(o=>{if(!P.has(o.room))return;let s=P.get(o.room);if(s.endCursor=o.end_cursor,Bm(o.awareness,s)){s.onStatusChange({status:"disconnected",error:new Ii(Tr.CONNECTION_LIMIT_EXCEEDED,"Connection limit exceeded")}),_n(o.room);return}s.processAwarenessUpdate(o.awareness),s.isPrimaryRoom&&Object.keys(o.awareness).length>1&&(Ro=!0,P.forEach(c=>{c.updateQueue.resume()}));let i=[];for(let c of o.updates)try{let a=s.processDocUpdate(c);a&&i.push(a)}catch(a){s.log("Failed to apply sync update",{error:a,update:c},"error",!0)}s.updateQueue.addBulk(i),o.should_compact?(s.log("Server requested compaction update"),s.updateQueue.clear(),s.updateQueue.add(s.createCompactionUpdate())):o.compaction_request&&(s.log("Server requested (old) compaction update"),s.updateQueue.add(Lm(o.compaction_request)))}),En&&Ro?He=Au:En?He=Li:He=Du}catch(n){if(km(n)){if(Um(n,r.rooms),P.size===0){xo=!1;return}}else{Jt++;let o=Ro?Tu:Ru;Jt<=o.length?He=o[Jt-1]:He=xu,To&&(He=Iu,To=!1);for(let s of r.rooms){if(!P.has(s.room))continue;let i=P.get(s.room);s.updates.length>0&&i.endCursor>0?(i.updateQueue.clear(),i.updateQueue.add(i.createCompactionUpdate())):s.updates.length>0&&i.updateQueue.restore(s.updates),i.log("Error posting sync update, will retry with backoff",{error:n,nextPoll:He},"error",!0)}if(!Bi){let s=Jt>o.length;e.forEach(i=>{P.get(i.room)===i&&i.onStatusChange({status:"disconnected",canManuallyRetry:!0,consecutiveFailures:Jt,backgroundRetriesFailed:s,willAutoRetryInMs:He})})}}}pt=setTimeout(Ao,He)}t()}function Fm({room:t,doc:e,awareness:r,log:n,onSync:o,onStatusChange:s}){if(P.has(t))return;let i=Ou([Pm(e)]),c=P.size===0;function a(){d.localAwarenessState=r.getLocalState()??{}}function u(f,h){if(wn!==h){if(f.byteLength>Ui){let p=P.get(t);if(!p)return;p.log("Document size limit exceeded",{maxUpdateSizeInBytes:Ui,updateSizeInBytes:f.byteLength}),p.onStatusChange({status:"disconnected",error:new Ii(Tr.DOCUMENT_SIZE_LIMIT_EXCEEDED,"Document size limit exceeded")}),_n(t)}i.add(xr(f,le.UPDATE))}}function l(){e.off("updateV2",u),r.off("change",a),i.clear()}let d={clientId:e.clientID,createCompactionUpdate:()=>xr(ht(e),le.COMPACTION),endCursor:0,isPrimaryRoom:c,localAwarenessState:r.getLocalState()??{},log:n,onStatusChange:s,processAwarenessUpdate:f=>Nm(f,r),processDocUpdate:f=>Vm(f,e,o),room:t,unregister:l,updateQueue:i};e.on("updateV2",u),r.on("change",a),P.set(t,d),Io||(window.addEventListener("beforeunload",Nu),window.addEventListener("pagehide",Vu),document.addEventListener("visibilitychange",Bu),Io=!0),xo||Ao()}function _n(t,{sendDisconnectSignal:e=!0}={}){let r=P.get(t);if(r){if(e){let n=[{after:0,awareness:null,client_id:r.clientId,room:t,updates:[]}];Ni({rooms:n})}r.unregister(),P.delete(t)}P.size===0&&Io&&(window.removeEventListener("beforeunload",Nu),window.removeEventListener("pagehide",Vu),document.removeEventListener("visibilitychange",Bu),Io=!1,Vi=!1,Jt=0,ji=0)}function Ym(){To=!0,pt&&(clearTimeout(pt),pt=null,Ao())}var Sn={registerRoom:Fm,retryNow:Ym,unregisterRoom:_n};var Gm=class extends rt{constructor(t){super(),this.options=t,this.log("Initializing",{room:t.room}),this.awareness=t.awareness??new qt(t.ydoc),this.connect()}awareness;status="disconnected";synced=!1;connect(){this.log("Connecting"),Sn.registerRoom({room:this.options.room,doc:this.options.ydoc,awareness:this.awareness,log:this.log,onStatusChange:this.emitStatus,onSync:this.onSync})}destroy(){this.disconnect(),super.destroy()}disconnect(){this.log("Disconnecting"),Sn.unregisterRoom(this.options.room),this.emitStatus({status:"disconnected"})}emitStatus=t=>{let{status:e}=t,r=e==="disconnected"?t.error:void 0;this.status===e&&!r||e==="connecting"&&this.status!=="disconnected"||(this.log("Status change",{status:e,error:r}),this.status=e,this.emit("status",[t]))};log=(t,e={},r="log",n=!1)=>{if(!this.options.debug&&!n)return;(console[r]||console.log)(`[${this.constructor.name}]: ${t}`,{room:this.options.room,...e})};onSync=()=>{this.synced||(this.synced=!0,this.log("Synced"))}};function ju(){return async({awareness:t,objectType:e,objectId:r,ydoc:n})=>{let o=r?`${e}:${r}`:e,s=new Gm({awareness:t,room:o,ydoc:n});return{destroy:()=>s.destroy(),on:(i,c)=>{s.on(i,c)}}}}var Ir=null;function $m(){return[ju()]}function zm(t){return typeof t=="function"}function Fi(){if(Ir)return Ir;if(!window._wpCollaborationEnabled)return[];let t=(0,Fu.applyFilters)("sync.providers",$m());return Array.isArray(t)?(Ir=t.filter(zm),Ir):(Ir=[],Ir)}var Yu=(t,e)=>{let r=e==="undo"?t.undoStack:t.redoStack;for(;r.length>0;){let n=r.pop(),o=e==="undo"?n.undoStack:n.redoStack,s=o.pop(),i=!1;if(e==="undo"?(n.undoStack=[s],i=n.undo()!==null,n.undoStack=o):(n.redoStack=[s],i=n.redo()!==null,n.redoStack=o),i)return s}return null},Gu=class extends sr{constructor(t=[],e={}){super(),this.docs=new Map,this.trackedOrigins=e.trackedOrigins||new Set([null]),e.trackedOrigins=this.trackedOrigins,this._defaultOpts=e,this.undoStack=[],this.redoStack=[],this.addToScope(t)}addToScope(t){t=xt(t)?t:[t],t.forEach(e=>{let r=e.doc,n=K(this.docs,r,()=>{let o=new Vt([e],this._defaultOpts);return o.on("stack-cleared",({undoStackCleared:s,redoStackCleared:i})=>{this.clear(s,i)}),r.on("destroy",()=>{this.docs.delete(r),this.undoStack=this.undoStack.filter(s=>s.doc!==r),this.redoStack=this.redoStack.filter(s=>s.doc!==r)}),o.on("stack-item-added",s=>{(s.type==="undo"?this.undoStack:this.redoStack).push(o),this.emit("stack-item-added",[{...s,ydoc:r},this])}),o.on("stack-item-updated",s=>{this.emit("stack-item-updated",[{...s,ydoc:r},this])}),o.on("stack-item-popped",s=>{this.emit("stack-item-popped",[{...s,ydoc:r},this])}),o});n.scope.every(o=>o!==e)&&n.scope.push(e)})}addTrackedOrigin(t){this.trackedOrigins.add(t)}removeTrackedOrigin(t){this.trackedOrigins.delete(t)}undo(){return Yu(this,"undo")}redo(){return Yu(this,"redo")}clear(t=!0,e=!0){(t&&this.canUndo()||e&&this.canRedo())&&(this.docs.forEach(r=>{t&&(this.undoStack=[]),e&&(this.redoStack=[]),r.clear(t,e)}),this.emit("stack-cleared",[{undoStackCleared:t,redoStackCleared:e}]))}stopCapturing(){this.docs.forEach(t=>{t.stopCapturing()})}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}destroy(){this.docs.forEach(t=>t.destroy()),super.destroy()}};function $u(){let t=new Gu([],{captureTimeout:500,trackedOrigins:new Set([vo])});return{addRecord(e,r=!1){},addToScope(e,r){if(e.doc===null)return;let n=e.doc;t.addToScope(e);let{addUndoMeta:o,restoreUndoMeta:s}=r;t.on("stack-item-added",i=>{o(n,i.stackItem.meta)}),t.on("stack-item-popped",i=>{s(n,i.stackItem.meta)})},undo(){if(t.canUndo())return t.undo(),[]},redo(){if(t.canRedo())return t.redo(),[]},hasUndo(){return t.canUndo()},hasRedo(){return t.canRedo()},stopCapturing(){t.stopCapturing()}}}function Do(t={}){let e=new Map(Object.entries(t));return new Me({meta:e})}function Yi(t){t.getMap(Rr).set(fu,uu)}function Gi(t){let e=t.getMap(Rr);e.set(Wt,Date.now()),e.set(du,t.clientID)}function zu(){return Math.floor(Math.random()*1e9)}function Ku(t){return JSON.stringify({document:Ja(ht(t)),updateId:zu()})}function Hu(t){try{let{document:e}=JSON.parse(t),r={[So]:!0},n=Do(r),o=Qa(e);return Be(n,o),n.clientID=zu(),n}catch{return null}}function gt(t,e){return`${t}_${e}`}function qu(t=!1){let e=t?yu:Eu,r=new Map,n=new Map,o;function s(g,m,y,E={}){t&&console.log(`[SyncManager][${g}]: ${m}`,{...E,entityId:y})}async function i(g,m,y,E,_){let S=Fi(),b=gt(m,y);if(S.length===0){s("loadEntity","no providers, skipping",b);return}if(n.has(b)){s("loadEntity","already loaded",b);return}if(g.shouldSync?.(m,y)===!1){s("loadEntity","shouldSync false, skipping",b);return}s("loadEntity","loading",b),_={addUndoMeta:e(_.addUndoMeta),editRecord:e(_.editRecord),getEditedRecord:e(_.getEditedRecord),onStatusChange:e(_.onStatusChange),persistCRDTDoc:e(_.persistCRDTDoc),refetchRecord:e(_.refetchRecord),restoreUndoMeta:e(_.restoreUndoMeta)};let I=Do({objectType:m}),O=I.getMap(bo),U=I.getMap(Rr),$=Date.now(),j=()=>{s("loadEntity","unloading",b),Ph.forEach(rr=>rr.destroy()),_.onStatusChange(null),O.unobserveDeep(Ie),U.unobserve(be),I.destroy(),n.delete(b)},de=g.createAwareness?.(I,y),Ie=(rr,St)=>{St.local&&!(St.origin instanceof Vt)||p.updateEntityRecord(m,y)},be=(rr,St)=>{St.local||rr.keysChanged.forEach(Mh=>{if(Mh===Wt){let Kc=U.get(Wt);typeof Kc=="number"&&Kc>$&&(s("loadEntity","refetching record",b),_.refetchRecord().catch(()=>{}))}})};o||(o=$u());let{addUndoMeta:Vr,restoreUndoMeta:tr}=_;o.addToScope(O,{addUndoMeta:Vr,restoreUndoMeta:tr});let Vn={awareness:de,handlers:_,objectId:y,objectType:m,syncConfig:g,unload:j,ydoc:I};n.set(b,Vn),s("loadEntity","connecting",b);let Ph=await Promise.all(S.map(async rr=>{let St=await rr({objectType:m,objectId:y,ydoc:I,awareness:de});return St.on("status",_.onStatusChange),St}));O.observeDeep(Ie),U.observe(be),Yi(I),p.applyPersistedCrdtDoc(m,y,E)}async function c(g,m,y){let E=Fi(),_=gt(m,null);if(E.length===0){s("loadCollection","no providers, skipping",_);return}if(r.has(m)){s("loadCollection","already loaded",_);return}if(g.shouldSync?.(m,null)===!1){s("loadCollection","shouldSync false, skipping",_);return}s("loadCollection","loading",_);let S=Do({collection:!0,objectType:m}),b=S.getMap(Rr),I=Date.now(),O=()=>{s("loadCollection","unloading",_),de.forEach(Ie=>Ie.destroy()),y.onStatusChange(null),b.unobserve(U),S.destroy(),r.delete(m)},U=(Ie,be)=>{be.local||Ie.keysChanged.forEach(Vr=>{if(Vr===Wt){let tr=b.get(Wt);typeof tr=="number"&&tr>I&&y.refetchRecords().catch(()=>{})}})},$=g.createAwareness?.(S),j={awareness:$,handlers:y,syncConfig:g,unload:O,ydoc:S};r.set(m,j),s("loadCollection","connecting",_);let de=await Promise.all(E.map(async Ie=>{let be=await Ie({awareness:$,objectType:m,objectId:null,ydoc:S});return be.on("status",y.onStatusChange),be}));b.observe(U),Yi(S)}function a(g,m){let y=gt(g,m);s("unloadEntity","unloading",y),n.get(y)?.unload(),d(g,null,{},origin,{isSave:!0})}function u(g,m){let y=gt(g,m),E=n.get(y);if(!(!E||!E.awareness))return E.awareness}function l(g,m,y){let E=gt(g,m),_=n.get(E);if(!_){s("applyPersistedCrdtDoc","no entity state",E);return}let{handlers:S,syncConfig:{applyChangesToCRDTDoc:b,getChangesFromCRDTDoc:I,getPersistedCRDTDoc:O},ydoc:U}=_,$=O?.(y),j=$?Hu($):null;if(!j){s("applyPersistedCrdtDoc","no persisted doc",E),U.transact(()=>{b(U,y),S.persistCRDTDoc()},xi);return}let de=ht(j);Be(U,de);let Ie=I(j,y),be=Object.keys(Ie);if(j.destroy(),be.length===0){s("applyPersistedCrdtDoc","valid persisted doc",E);return}s("applyPersistedCrdtDoc","invalidated keys",E,{invalidatedKeys:be});let Vr=be.reduce((tr,Vn)=>Object.assign(tr,{[Vn]:y[Vn]}),{});U.transact(()=>{b(U,Vr),S.persistCRDTDoc()},xi)}function d(g,m,y,E,_={}){let{isSave:S=!1,isNewUndoLevel:b=!1}=_,I=gt(g,m),O=n.get(I),U=r.get(g);if(O){let{syncConfig:$,ydoc:j}=O;b&&o&&o.stopCapturing?.(),j.transact(()=>{s("updateCRDTDoc","applying changes",I,{changedKeys:Object.keys(y)}),$.applyChangesToCRDTDoc(j,y),S&&Gi(j)},E)}U&&S&&U.ydoc.transact(()=>{Gi(U.ydoc)},E)}async function f(g,m){let y=gt(g,m),E=n.get(y);if(!E){s("updateEntityRecord","no entity state",y);return}let{handlers:_,syncConfig:S,ydoc:b}=E,I=S.getChangesFromCRDTDoc(b,await _.getEditedRecord()),O=Object.keys(I);O.length!==0&&(s("updateEntityRecord","changes",y,{changedKeys:O}),_.editRecord(I))}async function h(g,m){let y=gt(g,m),E=n.get(y);return E?.ydoc?(await new Promise(_=>setTimeout(_,0)),Ku(E.ydoc)):null}let p={applyPersistedCrdtDoc:e(l),updateEntityRecord:e(f)};return{createPersistedCRDTDoc:e(h),getAwareness:u,load:e(i),loadCollection:e(c),get undoManager(){return o},unload:e(a),update:e(wu(d))}}var Qt=class{diff(e,r,n={}){let o;typeof n=="function"?(o=n,n={}):"callback"in n&&(o=n.callback);let s=this.castInput(e,n),i=this.castInput(r,n),c=this.removeEmpty(this.tokenize(s,n)),a=this.removeEmpty(this.tokenize(i,n));return this.diffWithOptionsObj(c,a,n,o)}diffWithOptionsObj(e,r,n,o){var s;let i=E=>{if(E=this.postProcess(E,n),o){setTimeout(function(){o(E)},0);return}else return E},c=r.length,a=e.length,u=1,l=c+a;n.maxEditLength!=null&&(l=Math.min(l,n.maxEditLength));let d=(s=n.timeout)!==null&&s!==void 0?s:1/0,f=Date.now()+d,h=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(h[0],r,e,0,n);if(h[0].oldPos+1>=a&&p+1>=c)return i(this.buildValues(h[0].lastComponent,r,e));let g=-1/0,m=1/0,y=()=>{for(let E=Math.max(g,-u);E<=Math.min(m,u);E+=2){let _,S=h[E-1],b=h[E+1];S&&(h[E-1]=void 0);let I=!1;if(b){let U=b.oldPos-E;I=b&&0<=U&&U<c}let O=S&&S.oldPos+1<a;if(!I&&!O){h[E]=void 0;continue}if(!O||I&&S.oldPos<b.oldPos?_=this.addToPath(b,!0,!1,0,n):_=this.addToPath(S,!1,!0,1,n),p=this.extractCommon(_,r,e,E,n),_.oldPos+1>=a&&p+1>=c)return i(this.buildValues(_.lastComponent,r,e))||!0;h[E]=_,_.oldPos+1>=a&&(m=Math.min(m,E-1)),p+1>=c&&(g=Math.max(g,E+1))}u++};if(o)(function E(){setTimeout(function(){if(u>l||Date.now()>f)return o(void 0);y()||E()},0)})();else for(;u<=l&&Date.now()<=f;){let E=y();if(E)return E}}addToPath(e,r,n,o,s){let i=e.lastComponent;return i&&!s.oneChangePerToken&&i.added===r&&i.removed===n?{oldPos:e.oldPos+o,lastComponent:{count:i.count+1,added:r,removed:n,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+o,lastComponent:{count:1,added:r,removed:n,previousComponent:i}}}extractCommon(e,r,n,o,s){let i=r.length,c=n.length,a=e.oldPos,u=a-o,l=0;for(;u+1<i&&a+1<c&&this.equals(n[a+1],r[u+1],s);)u++,a++,l++,s.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!s.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=a,u}equals(e,r,n){return n.comparator?n.comparator(e,r):e===r||!!n.ignoreCase&&e.toLowerCase()===r.toLowerCase()}removeEmpty(e){let r=[];for(let n=0;n<e.length;n++)e[n]&&r.push(e[n]);return r}castInput(e,r){return e}tokenize(e,r){return Array.from(e)}join(e){return e.join("")}postProcess(e,r){return e}get useLongestToken(){return!1}buildValues(e,r,n){let o=[],s;for(;e;)o.push(e),s=e.previousComponent,delete e.previousComponent,e=s;o.reverse();let i=o.length,c=0,a=0,u=0;for(;c<i;c++){let l=o[c];if(l.removed)l.value=this.join(n.slice(u,u+l.count)),u+=l.count;else{if(!l.added&&this.useLongestToken){let d=r.slice(a,a+l.count);d=d.map(function(f,h){let p=n[u+h];return p.length>f.length?p:f}),l.value=this.join(d)}else l.value=this.join(r.slice(a,a+l.count));a+=l.count,l.added||(u+=l.count)}}return o}};var $i=class extends Qt{},Wu=new $i;function ko(t,e,r){return Wu.diff(t,e,r)}var zi=class extends Qt{constructor(){super(...arguments),this.tokenize=Km}equals(e,r,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
`))&&(e=e.trim()),(!n.newlineIsToken||!r.includes(`
`))&&(r=r.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
`)&&(e=e.slice(0,-1)),r.endsWith(`
`)&&(r=r.slice(0,-1))),super.equals(e,r,n)}},Ju=new zi;function Ki(t,e,r){return Ju.diff(t,e,r)}function Km(t,e){e.stripTrailingCr&&(t=t.replace(/\r\n/g,`
`));let r=[],n=t.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(let o=0;o<n.length;o++){let s=n[o];o%2&&!e.newlineIsToken?r[r.length-1]+=s:r.push(s)}return r}var Oo=w(Qe(),1);var Qu=w(Qe(),1);function Hm(t){return JSON.parse(JSON.stringify(t))}var Hi;(t=>{function e(s={},i={},c=!1){typeof s!="object"&&(s={}),typeof i!="object"&&(i={});let a=Hm(i);c||(a=Object.keys(a).reduce((u,l)=>((a[l]!==null||a[l]!==void 0)&&(u[l]=a[l]),u),{}));for(let u in s)s[u]!==void 0&&i[u]===void 0&&(a[u]=s[u]);return Object.keys(a).length>0?a:void 0}t.compose=e;function r(s={},i={}){typeof s!="object"&&(s={}),typeof i!="object"&&(i={});let c=Object.keys(s).concat(Object.keys(i)).reduce((a,u)=>((0,Qu.default)(s[u],i[u])||(a[u]=i[u]===void 0?null:i[u]),a),{});return Object.keys(c).length>0?c:void 0}t.diff=r;function n(s={},i={}){s=s||{};let c=Object.keys(i).reduce((a,u)=>(i[u]!==s[u]&&s[u]!==void 0&&(a[u]=i[u]),a),{});return Object.keys(s).reduce((a,u)=>(s[u]!==i[u]&&i[u]===void 0&&(a[u]=null),a),c)}t.invert=n;function o(s,i,c=!1){if(typeof s!="object")return i;if(typeof i!="object")return;if(!c)return i;let a=Object.keys(i).reduce((u,l)=>(s[l]===void 0&&(u[l]=i[l]),u),{});return Object.keys(a).length>0?a:void 0}t.transform=o})(Hi||(Hi={}));var Xt=Hi;var qi;(t=>{function e(r){return typeof r.delete=="number"?r.delete:typeof r.retain=="number"?r.retain:typeof r.retain=="object"&&r.retain!==null?1:typeof r.insert=="string"?r.insert.length:1}t.length=e})(qi||(qi={}));var _e=qi;var se=class{ops;index;offset;constructor(t){this.ops=t,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(t){t||(t=1/0);let e=this.ops[this.index];if(e){let r=this.offset,n=_e.length(e);if(t>=n-r?(t=n-r,this.index+=1,this.offset=0):this.offset+=t,typeof e.delete=="number")return{delete:t};let o={};return e.attributes&&(o.attributes=e.attributes),typeof e.retain=="number"?o.retain=t:typeof e.retain=="object"&&e.retain!==null?o.retain=e.retain:typeof e.insert=="string"?o.insert=e.insert.substr(r,t):o.insert=e.insert,o}return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?_e.length(this.ops[this.index])-this.offset:1/0}peekType(){let t=this.ops[this.index];return t?typeof t.delete=="number"?"delete":typeof t.retain=="number"||typeof t.retain=="object"&&t.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index)}else return[];let t=this.offset,e=this.index,r=this.next(),n=this.ops.slice(this.index);return this.offset=t,this.index=e,[r].concat(n)}};function qm(t){return JSON.parse(JSON.stringify(t))}var Wm="\0",Jm=1e4;function Wi(t){return t.map(e=>({...e,count:e.value.length}))}var Xu=(t,e)=>{if(typeof t!="object"||t===null)throw new Error(`cannot retain a ${typeof t}`);if(typeof e!="object"||e===null)throw new Error(`cannot retain a ${typeof e}`);let r=Object.keys(t)[0];if(!r||r!==Object.keys(e)[0])throw new Error(`embed types not matched: ${r} != ${Object.keys(e)[0]}`);return[r,t[r],e[r]]},Qm=class ue{static Op=_e;static OpIterator=se;static AttributeMap=Xt;static handlers={};static registerEmbed(e,r){this.handlers[e]=r}static unregisterEmbed(e){delete this.handlers[e]}static getHandler(e){let r=this.handlers[e];if(!r)throw new Error(`no handlers for embed type "${e}"`);return r}ops;constructor(e){Array.isArray(e)?this.ops=e:e!=null&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]}insert(e,r){let n={};return typeof e=="string"&&e.length===0?this:(n.insert=e,r!=null&&typeof r=="object"&&Object.keys(r).length>0&&(n.attributes=r),this.push(n))}delete(e){return e<=0?this:this.push({delete:e})}retain(e,r){if(typeof e=="number"&&e<=0)return this;let n={retain:e};return r!=null&&typeof r=="object"&&Object.keys(r).length>0&&(n.attributes=r),this.push(n)}push(e){let r=this.ops.length,n=this.ops[r-1];if(e=qm(e),typeof n=="object"){if(typeof e.delete=="number"&&typeof n.delete=="number")return this.ops[r-1]={delete:n.delete+e.delete},this;if(typeof n.delete=="number"&&e.insert!==null&&e.insert!==void 0&&(r-=1,n=this.ops[r-1],typeof n!="object"))return this.ops.unshift(e),this;if((0,Oo.default)(e.attributes,n.attributes)){if(typeof e.insert=="string"&&typeof n.insert=="string")return this.ops[r-1]={insert:n.insert+e.insert},typeof e.attributes=="object"&&(this.ops[r-1].attributes=e.attributes),this;if(typeof e.retain=="number"&&typeof n.retain=="number")return this.ops[r-1]={retain:n.retain+e.retain},typeof e.attributes=="object"&&(this.ops[r-1].attributes=e.attributes),this}}return r===this.ops.length?this.ops.push(e):this.ops.splice(r,0,e),this}chop(){let e=this.ops[this.ops.length-1];return e&&typeof e.retain=="number"&&!e.attributes&&this.ops.pop(),this}filter(e){return this.ops.filter(e)}forEach(e){this.ops.forEach(e)}map(e){return this.ops.map(e)}partition(e){let r=[],n=[];return this.forEach(o=>{(e(o)?r:n).push(o)}),[r,n]}reduce(e,r){return this.ops.reduce(e,r)}changeLength(){return this.reduce((e,r)=>r.insert?e+_e.length(r):r.delete?e-r.delete:e,0)}length(){return this.reduce((e,r)=>e+_e.length(r),0)}slice(e=0,r=1/0){let n=[],o=new se(this.ops),s=0;for(;s<r&&o.hasNext();){let i;s<e?i=o.next(e-s):(i=o.next(r-s),n.push(i)),s+=_e.length(i)}return new ue(n)}compose(e){let r=new se(this.ops),n=new se(e.ops),o=[],s=n.peek();if(s!=null&&typeof s.retain=="number"&&(s.attributes===null||s.attributes===void 0)){let c=s.retain;for(;r.peekType()==="insert"&&r.peekLength()<=c;)c-=r.peekLength(),o.push(r.next());s.retain-c>0&&n.next(s.retain-c)}let i=new ue(o);for(;r.hasNext()||n.hasNext();)if(n.peekType()==="insert")i.push(n.next());else if(r.peekType()==="delete")i.push(r.next());else{let c=Math.min(r.peekLength(),n.peekLength()),a=r.next(c),u=n.next(c);if(u.retain){let l={};if(typeof a.retain=="number")l.retain=typeof u.retain=="number"?c:u.retain;else if(typeof u.retain=="number")a.retain===null||a.retain===void 0?l.insert=a.insert:l.retain=a.retain;else{let f=a.retain===null||a.retain===void 0?"insert":"retain",[h,p,g]=Xu(a[f],u.retain),m=ue.getHandler(h);l[f]={[h]:m.compose(p,g,f==="retain")}}let d=Xt.compose(a.attributes,u.attributes,typeof a.retain=="number");if(d&&(l.attributes=d),i.push(l),!n.hasNext()&&(0,Oo.default)(i.ops[i.ops.length-1],l)){let f=new ue(r.rest());return i.concat(f).chop()}}else typeof u.delete=="number"&&(typeof a.retain=="number"||typeof a.retain=="object"&&a.retain!==null)&&i.push(u)}return i.chop()}concat(e){let r=new ue(this.ops.slice());return e.ops.length>0&&(r.push(e.ops[0]),r.ops=r.ops.concat(e.ops.slice(1))),r}diff(e){if(this.ops===e.ops)return new ue;let r=this.deltasToStrings(e),n=Wi(ko(r[0],r[1])),o=new se(this.ops),s=new se(e.ops);return this.convertChangesToDelta(n,o,s).chop()}eachLine(e,r=`
`){let n=new se(this.ops),o=new ue,s=0;for(;n.hasNext();){if(n.peekType()!=="insert")return;let i=n.peek(),c=_e.length(i)-n.peekLength(),a=typeof i.insert=="string"?i.insert.indexOf(r,c)-c:-1;if(a<0)o.push(n.next());else if(a>0)o.push(n.next(a));else{if(e(o,n.next(1).attributes||{},s)===!1)return;s+=1,o=new ue}}o.length()>0&&e(o,{},s)}invert(e){let r=new ue;return this.reduce((n,o)=>{if(o.insert)r.delete(_e.length(o));else{if(typeof o.retain=="number"&&(o.attributes===null||o.attributes===void 0))return r.retain(o.retain),n+o.retain;if(o.delete||typeof o.retain=="number"){let s=o.delete||o.retain;return e.slice(n,n+s).forEach(c=>{o.delete?r.push(c):o.retain&&o.attributes&&r.retain(_e.length(c),Xt.invert(o.attributes,c.attributes))}),n+s}else if(typeof o.retain=="object"&&o.retain!==null){let s=e.slice(n,n+1),i=new se(s.ops).next(),[c,a,u]=Xu(o.retain,i.insert),l=ue.getHandler(c);return r.retain({[c]:l.invert(a,u)},Xt.invert(o.attributes,i.attributes)),n+1}}return n},0),r.chop()}transform(e,r=!1){if(r=!!r,typeof e=="number")return this.transformPosition(e,r);let n=e,o=new se(this.ops),s=new se(n.ops),i=new ue;for(;o.hasNext()||s.hasNext();)if(o.peekType()==="insert"&&(r||s.peekType()!=="insert"))i.retain(_e.length(o.next()));else if(s.peekType()==="insert")i.push(s.next());else{let c=Math.min(o.peekLength(),s.peekLength()),a=o.next(c),u=s.next(c);if(a.delete)continue;if(u.delete)i.push(u);else{let l=a.retain,d=u.retain,f=typeof d=="object"&&d!==null?d:c;if(typeof l=="object"&&l!==null&&typeof d=="object"&&d!==null){let h=Object.keys(l)[0];if(h===Object.keys(d)[0]){let p=ue.getHandler(h);p&&(f={[h]:p.transform(l[h],d[h],r)})}}i.retain(f,Xt.transform(a.attributes,u.attributes,r))}}return i.chop()}transformPosition(e,r=!1){r=!!r;let n=new se(this.ops),o=0;for(;n.hasNext()&&o<=e;){let s=n.peekLength(),i=n.peekType();if(n.next(),i==="delete"){e-=Math.min(s,e-o);continue}else i==="insert"&&(o<e||!r)&&(e+=s);o+=s}return e}diffWithCursor(e,r){if(this.ops===e.ops)return new ue;let n=this.deltasToStrings(e);if(Math.max(...n.map(d=>d.length))>Jm){let d=Wi(Ki(n[0],n[1])),f=new se(this.ops),h=new se(e.ops);return this.convertChangesToDelta(d,f,h).chop()}else if(r===null)return this.diff(e);let s=Wi(ko(n[0],n[1])),i=0,c=[];for(let d=0;d<s.length;d++){let f=s[d],h=i,p=i+(f.count??0),g=r>h&&r<=p,m=!f.added&&!f.removed,y=f.removed&&!f.added,E=s[d+1],_=E&&E.added&&!E.removed;if(m&&g&&_){let S=this.tryMoveInsertionToCursor(f,E,r,h);if(S){c.push(...S),d++,i=p;continue}}if(y){let S=this.tryMoveDeletionToCursor(f,c,r,i);if(S){c.pop(),c.push(...S),i+=f.count??0;continue}}c.push(f),f.added||(i+=f.count??0)}s=c;let a=new se(this.ops),u=new se(e.ops);return this.convertChangesToDelta(s,a,u).chop()}tryMoveInsertionToCursor(e,r,n,o){let s=r.value,i=s.length,c=n-o-i;if(!(e.value.substring(c,c+s.length)===s))return null;let l=e.value.substring(0,c),d=e.value.substring(c),f=[];return l.length>0&&f.push({value:l,count:l.length,added:!1,removed:!1}),f.push(r),d.length>0&&f.push({value:d,count:d.length,added:!1,removed:!1}),f}tryMoveDeletionToCursor(e,r,n,o){let s=r[r.length-1];if(!s||s.added||s.removed)return null;let i=o-(s.count??0),c=o;if(n<i||n>=c)return null;let a=e.value,u=n-i;if(!(s.value.substring(u,u+a.length)===a))return null;let f=s.value.substring(0,u),h=s.value.substring(u),p=e.count??0,g=h.substring(p),m=[];return f.length>0&&m.push({value:f,count:f.length,added:!1,removed:!1}),m.push(e),g.length>0&&m.push({value:g,count:g.length,added:!1,removed:!1}),m}deltasToStrings(e){return[this,e].map(r=>r.map(n=>{if(n.insert!==null||n.insert!==void 0)return typeof n.insert=="string"?n.insert:Wm;let o=r===e?"on":"with";throw new Error("diff() called "+o+" non-document")}).join(""))}convertChangesToDelta(e,r,n){let o=new ue;return e.forEach(s=>{let i=s.count??0;for(;i>0;){let c=0;if(s.added)c=Math.min(n.peekLength(),i),o.push(n.next(c));else if(s.removed)c=Math.min(i,r.peekLength()),r.next(c),o.delete(c);else{c=Math.min(r.peekLength(),n.peekLength(),i);let a=r.next(c),u=n.next(c);(0,Oo.default)(a.insert,u.insert)?o.retain(c,Xt.diff(a.attributes,u.attributes)):o.push(u).delete(c)}i-=c}}),o}},Zu=Qm;var Uo={};mu(Uo,{ConnectionErrorCode:Tr,createSyncManager:qu,Delta:Zu,CRDT_DOC_META_PERSISTENCE_KEY:So,CRDT_RECORD_MAP_KEY:bo,LOCAL_EDITOR_ORIGIN:vo,LOCAL_UNDO_IGNORED_ORIGIN:hu,retrySyncConnection:()=>Sn.retryNow()});var Od=w(Ar(),1);var ud=w(W(),1);var td=100,rd=5,nd=5e3;function Xm(){let t=window.navigator.userAgent,e="Unknown";return t.includes("Firefox")?e="Firefox":t.includes("Edg")?e="Microsoft Edge":t.includes("Chrome")&&!t.includes("Edg")?e="Chrome":t.includes("Safari")&&!t.includes("Chrome")?e="Safari":t.includes("MSIE")||t.includes("Trident")?e="Internet Explorer":(t.includes("Opera")||t.includes("OPR"))&&(e="Opera"),e}function od(t,e,r){if(t.size!==e.size)return!1;for(let[n,o]of t.entries())if(!e.has(n)||!r(o,e.get(n)))return!1;return!0}function sd(t,e){return!t||!e?t===e:Object.keys(t).length!==Object.keys(e).length?!1:Object.entries(t).every(([r,n])=>n===e[r])}function id(t){let{avatar_urls:e,id:r,name:n,slug:o}=t;return{avatar_urls:e,browserType:Xm(),enteredAt:Date.now(),id:r,name:n,slug:o}}function cd(t,e){return typeof t=="object"&&t!==null&&e in t?t[e]:null}function Ji(t){return Object.keys(t)}var ad=class extends qt{getStates(){return super.getStates()}getLocalStateField(t){let e=this.getLocalState();return cd(e,t)}setLocalStateField(t,e){super.setLocalStateField(t,e)}};var Zm=class extends ad{setLocalStateField(t,e){this.isFieldEqual(t,e,this.getLocalStateField(t)??void 0)||super.setLocalStateField(t,e)}isFieldEqual(t,e,r){if(["clientId","isConnected","isMe"].includes(t))return e===r;if(t in this.equalityFieldChecks){let n=this.equalityFieldChecks[t];return n(e,r)}throw new Error(`No equality check implemented for awareness state field "${t.toString()}".`)}isStateEqual(t,e){return[...new Set([...Ji(t),...Ji(e)])].every(r=>{let n=t[r],o=e[r];return this.isFieldEqual(r,n,o)})}},ld=class extends Zm{hasSetupRun=!1;disconnectedCollaborators=new Set;seenStates=new Map;previousSnapshot=new Map;stateSubscriptions=[];myThrottledState={};throttleTimeouts=new Map;setUp=()=>{this.hasSetupRun||(this.hasSetupRun=!0,this.onSetUp(),this.on("change",({added:t,removed:e,updated:r})=>{[...t,...r].forEach(n=>{this.disconnectedCollaborators.delete(n)}),e.forEach(n=>{this.disconnectedCollaborators.add(n),setTimeout(()=>{this.disconnectedCollaborators.delete(n),this.updateSubscribers(!0)},nd)}),this.updateSubscribers()}))};getCurrentState(){return Array.from(this.previousSnapshot.values())}getSeenStates(){return this.seenStates}onStateChange(t){return this.stateSubscriptions.push(t),()=>{this.stateSubscriptions=this.stateSubscriptions.filter(e=>e!==t)}}setThrottledLocalStateField(t,e,r){this.setLocalStateField(t,e),this.throttleTimeouts.set(t,setTimeout(()=>{this.throttleTimeouts.delete(t),this.myThrottledState[t]&&(this.setLocalStateField(t,this.myThrottledState[t]),delete this.myThrottledState[t])},r))}setConnectionStatus(t){t?this.disconnectedCollaborators.delete(this.clientID):this.disconnectedCollaborators.add(this.clientID),this.updateSubscribers(!0)}updateSubscribers(t=!1){if(!this.stateSubscriptions.length)return;let e=this.getStates();this.seenStates=new Map([...this.seenStates.entries(),...e.entries()]);let r=new Map([...this.disconnectedCollaborators,...e.keys()].filter(n=>Object.keys(this.seenStates.get(n)??{}).length>0).map(n=>{let o=this.seenStates.get(n),s=!this.disconnectedCollaborators.has(n),i=n===this.clientID,c=i?this.myThrottledState:{},a={...o,...c,clientId:n,isConnected:s,isMe:i};return[n,a]}));!t&&od(this.previousSnapshot,r,this.isStateEqual.bind(this))||(this.previousSnapshot=r,this.stateSubscriptions.forEach(n=>{n(Array.from(r.values()))}))}};var x="core";var Qi=class extends ld{onSetUp(){this.setCurrentCollaboratorInfo()}async setCurrentCollaboratorInfo(){let t=await(0,ud.resolveSelect)(x).getCurrentUser(),e=id(t);this.setLocalStateField("collaboratorInfo",e)}},Xi={collaboratorInfo:sd},dd=class extends Qi{equalityFieldChecks=Xi};var fd=w(W(),1);var hd=w(Ar(),1);function Zi(t){let e=[],r=t;for(;r;){let n=r.parent;if(!n||!(n instanceof C.Array))return null;let o=-1;for(let i=0;i<n.length;i++)if(n.get(i)===r){o=i;break}if(o===-1)return null;e.unshift(o);let s=n.parent;if(s instanceof C.Map&&s.get("clientId")!==void 0)r=s;else break}return e}function ec(t){if(t.length===0)return null;let{getBlocks:e}=(0,fd.select)(hd.store),n=ey(e(),e);for(let o=0;o<t.length;o++){let s=n[t[o]];if(!s)return null;if(o===t.length-1)return s.clientId;n=s.innerBlocks}return null}function ey(t,e){let r=pd(t,"core/post-content");return r?e(r.clientId):t}function pd(t,e){for(let r of t){if(r.name===e)return r;if(r.innerBlocks?.length){let n=pd(r.innerBlocks,e);if(n)return n}}return null}var mt=w(bn(),1);var md=w(Ai(),1),{lock:yd,unlock:Se}=(0,md.__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/core-data");var{ConnectionErrorCode:Ed,createSyncManager:ty,Delta:tc,CRDT_DOC_META_PERSISTENCE_KEY:wd,CRDT_RECORD_MAP_KEY:qe,LOCAL_EDITOR_ORIGIN:_d,LOCAL_UNDO_IGNORED_ORIGIN:rc,retrySyncConnection:Sd}=Se(Uo),Lo;function pe(){return Lo||(Lo=ty(),Lo)}function yt(t,e){return t.getMap(e)}function Po(t={}){return new C.Map(Object.entries(t))}function vd(t){return t instanceof C.Map}function vn(t,e){let n=yt(e,qe).get("blocks");return n instanceof C.Array?Rd(t,n):null}var bd=57344;function Cd(t){for(let r=bd;r<bd+16;r++){let n=String.fromCharCode(r);if(!t.includes(n))return n}return null}function Mo(t,e){if(!t.includes("<")&&!t.includes("&"))return e;let r=Cd(t);if(!r)return e;let n=t.slice(0,e)+r+t.slice(e),s=(0,mt.create)({html:n}).text.indexOf(r);return s===-1?e:s}function No(t,e){if(!t.includes("<")&&!t.includes("&"))return e;let r=Cd(t);if(!r)return e;let n=(0,mt.create)({html:t}),o=(0,mt.create)({text:r});n.formats[e]&&(o.formats[0]=n.formats[e]);let s=(0,mt.insert)(n,o,e,e),c=(0,mt.toHTMLString)({value:s}).indexOf(r);return c===-1?e:c}function Rd(t,e){for(let r of e){if(r.get("clientId")===t)return r;let n=r.get("innerBlocks");if(n&&n.length>0){let o=Rd(t,n);if(o)return o}}return null}var Td=w(W(),1);var xd=w(Ar(),1);var Dr=(t=>(t.None="none",t.Cursor="cursor",t.SelectionInOneBlock="selection-in-one-block",t.SelectionInMultipleBlocks="selection-in-multiple-blocks",t.WholeBlock="whole-block",t))(Dr||{}),kr=(t=>(t.Forward="f",t.Backward="b",t))(kr||{});function Id(t,e,r,n){let{selectionDirection:o}=n??{},i=yt(r,qe).get("blocks"),c=Object.keys(t).length===0,a={type:"none"};if(c||!i)return a;let u=t.clientId===e.clientId,l=u&&t.offset===e.offset;if(u&&t.offset===void 0&&e.offset===void 0){let p=Ad(t.clientId),g=p?ny(p,i):null;return g?{type:"whole-block",blockPosition:g}:a}else if(l){let p=Cn(t,i);return p?{type:"cursor",cursorPosition:p}:a}else if(u){let p=Cn(t,i),g=Cn(e,i);return!p||!g?a:{type:"selection-in-one-block",cursorStartPosition:p,cursorEndPosition:g,selectionDirection:o}}let f=Cn(t,i),h=Cn(e,i);return!f||!h?a:{type:"selection-in-multiple-blocks",cursorStartPosition:f,cursorEndPosition:h,selectionDirection:o}}function Cn(t,e){let r=Ad(t.clientId),n=r?ry(r,e):null;if(!n||!t.attributeKey||t.offset===void 0)return null;let s=n.get("attributes")?.get(t.attributeKey);return s instanceof C.Text?{relativePosition:C.createRelativePositionFromTypeIndex(s,No(s.toString(),t.offset)),absoluteOffset:t.offset}:null}function Ad(t){let{getBlockIndex:e,getBlockRootClientId:r,getBlockName:n}=(0,Td.select)(xd.store),o=[],s=t;for(;s;){let i=e(s);if(i===-1)return null;o.unshift(i);let c=r(s);if(!c||n(c)==="core/post-content")break;s=c}return o.length>0?o:null}function ry(t,e){let r=e;for(let n=0;n<t.length;n++){if(t[n]>=r.length)return null;let o=r.get(t[n]);if(!o)return null;if(n===t.length-1)return o;r=o.get("innerBlocks")??new C.Array}return null}function ny(t,e){let r=e;for(let n=0;n<t.length;n++){if(t[n]>=r.length)return null;if(n===t.length-1)return C.createRelativePositionFromTypeIndex(r,t[n]);r=r.get(t[n])?.get("innerBlocks")??new C.Array}return null}function Dd(t,e){if(t.type!==e.type)return!1;switch(t.type){case"none":return!0;case"cursor":return Rn(t.cursorPosition,e.cursorPosition);case"selection-in-one-block":return Rn(t.cursorStartPosition,e.cursorStartPosition)&&Rn(t.cursorEndPosition,e.cursorEndPosition)&&t.selectionDirection===e.selectionDirection;case"selection-in-multiple-blocks":return Rn(t.cursorStartPosition,e.cursorStartPosition)&&Rn(t.cursorEndPosition,e.cursorEndPosition)&&t.selectionDirection===e.selectionDirection;case"whole-block":return C.compareRelativePositions(t.blockPosition,e.blockPosition);default:return!1}}function Rn(t,e){let r=C.compareRelativePositions(t.relativePosition,e.relativePosition),n=t.absoluteOffset===e.absoluteOffset;return r&&n}var Ud=class extends Qi{constructor(t,e,r,n){super(t),this.kind=e,this.name=r,this.postId=n}equalityFieldChecks={...Xi,editorState:this.areEditorStatesEqual};onSetUp(){super.onSetUp(),this.subscribeToCollaboratorSelectionChanges()}subscribeToCollaboratorSelectionChanges(){let{getSelectionStart:t,getSelectionEnd:e,getSelectedBlocksInitialCaretPosition:r}=(0,Or.select)(Od.store),n=t(),o=e(),s=null,i=null;(0,Or.subscribe)(()=>{let c=t(),a=e();if(c===n&&a===o)return;i||(i={start:n,end:o}),n=c,o=a;let u=r();this.updateSelectionInEntityRecord(n,o,u),s&&clearTimeout(s),s=setTimeout(()=>{let l={};i&&(l.selectionDirection=oy(i.start,i.end,n,o),i=null);let d=Id(n,o,this.doc,l);this.setThrottledLocalStateField("editorState",{selection:d},td)},rd)})}async updateSelectionInEntityRecord(t,e,r){let n={selection:{selectionStart:t,selectionEnd:e,initialPosition:r}},o={undoIgnore:!0};(0,Or.dispatch)(x).editEntityRecord(this.kind,this.name,this.postId,n,o)}areEditorStatesEqual(t,e){return!t||!e?t===e:!t.selection||!e.selection?t.selection===e.selection:Dd(t.selection,e.selection)}convertSelectionStateToAbsolute(t){if(t.type===Dr.None)return{richTextOffset:null,localClientId:null};if(t.type===Dr.WholeBlock){let i=C.createAbsolutePositionFromRelativePosition(t.blockPosition,this.doc),c=null;if(i&&i.type instanceof C.Array){let u=i.type.get(i.index);if(u instanceof C.Map){let l=Zi(u);c=l?ec(l):null}}return{richTextOffset:null,localClientId:c}}let e="cursorPosition"in t?t.cursorPosition:t.cursorStartPosition,r=C.createAbsolutePositionFromRelativePosition(e.relativePosition,this.doc);if(!r)return{richTextOffset:null,localClientId:null};let n=r.type.parent?.parent,o=n instanceof C.Map?Zi(n):null,s=o?ec(o):null;return{richTextOffset:Mo(r.type.toString(),r.index),localClientId:s}}isYItem(t){return"content"in t}getDebugData(){let t=this.doc,e=Object.fromEntries(Array.from(t.share,([o,s])=>[o,s.toJSON()])),r=new Map(Array.from(this.getSeenStates().entries()).map(([o,s])=>[String(o),{name:s.collaboratorInfo.name,wpUserId:s.collaboratorInfo.id}])),n={};return t.store.clients.forEach((o,s)=>{let i=o.filter(this.isYItem);n[s]=i.map(c=>{let{left:a,right:u,...l}=c;return{...l,left:a?{id:a.id,length:a.length,origin:a.origin,content:a.content}:null,right:u?{id:u.id,length:u.length,origin:u.origin,content:u.content}:null}})}),{doc:e,clients:n,collaboratorMap:Object.fromEntries(r)}}};function oy(t,e,r,n){let o=!kd(t,r),s=!kd(e,n);return o&&!s?kr.Backward:kr.Forward}function kd(t,e){return t.clientId===e.clientId&&t.attributeKey===e.attributeKey&&t.offset===e.offset}var Xd=w(Qe(),1),Zd=w(nr(),1);var Vo,sy=new Uint8Array(16);function nc(){if(!Vo&&(Vo=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Vo))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Vo(sy)}var ee=[];for(let t=0;t<256;++t)ee.push((t+256).toString(16).slice(1));function Ld(t,e=0){return ee[t[e+0]]+ee[t[e+1]]+ee[t[e+2]]+ee[t[e+3]]+"-"+ee[t[e+4]]+ee[t[e+5]]+"-"+ee[t[e+6]]+ee[t[e+7]]+"-"+ee[t[e+8]]+ee[t[e+9]]+"-"+ee[t[e+10]]+ee[t[e+11]]+ee[t[e+12]]+ee[t[e+13]]+ee[t[e+14]]+ee[t[e+15]]}var iy=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),oc={randomUUID:iy};function cy(t,e,r){if(oc.randomUUID&&!e&&!t)return oc.randomUUID();t=t||{};let n=t.random||(t.rng||nc)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let o=0;o<16;++o)e[r+o]=n[o];return e}return Ld(n)}var Tn=cy;var jo=w(Qe(),1),Nd=w(nr(),1),Vd=w(bn(),1);var Pd=w(bn(),1),ay=500;function ly(t){let e=new Map;return function(r){let n=e.get(r);if(n)return n;let o=Pd.RichTextData.fromHTMLString(r);return e.size>=t&&e.delete(e.keys().next().value),e.set(r,o),o}}var Md=ly(ay);var sc=new WeakMap;function cc(t){if(t instanceof Vd.RichTextData)return t.valueOf();if(Array.isArray(t))return t.map(cc);if(t&&typeof t=="object"){let e={};for(let[r,n]of Object.entries(t))e[r]=cc(n);return e}return t}function uy(t,e){let r={...e};for(let[n,o]of Object.entries(e)){if(hy(t,n)){delete r[n];continue}r[n]=cc(o)}return r}function Bd(t){return t.map(e=>{let{name:r,innerBlocks:n,attributes:o,...s}=e;return delete s.validationIssues,{...s,name:r,attributes:uy(r,o),innerBlocks:Bd(n)}})}function ac(t,e){if(t?.type==="rich-text"&&typeof e=="string")return Md(e);if(Array.isArray(e))return e.map(r=>ac(t,r));if(e&&typeof e=="object"){let r={};for(let[n,o]of Object.entries(e))r[n]=ac(t?.query?.[n],o);return r}return e}function uc(t){return t.map(e=>{let{name:r,innerBlocks:n,attributes:o,...s}=e,i={...o};for(let[c,a]of Object.entries(o)){let u=Fo(r,c);u&&(i[c]=ac(u,a))}return{...s,name:r,attributes:i,innerBlocks:uc(n??[])}})}function lc(t,e){let r=e.toJSON(),n={innerBlocks:null,clientId:null},o=(0,jo.default)(Object.assign({},t,n),Object.assign({},r,n)),s=t.innerBlocks||[],i=e.get("innerBlocks");return o&&s.length===i?.length&&s.every((c,a)=>lc(c,i.get(a)))}function jd(t,e){return new C.Map(Object.entries(e).map(([r,n])=>[r,Fd(t,r,n)]))}function Fd(t,e,r){return Gd(t,e)?new C.Text(r?.toString()??""):r}function Yd(t){return Po(Object.fromEntries(Object.entries(t).map(([e,r])=>{switch(e){case"attributes":return[e,jd(t.name,r)];case"innerBlocks":{let n=new C.Array;return Array.isArray(r)?(n.insert(0,r.map(o=>Yd(o))),[e,n]):[e,n]}default:return[e,r]}})))}function dc(t,e,r){sc.has(e)||sc.set(e,Bd(e));let n=sc.get(e)??[],o=Math.min(n.length??0,t.length),s=0,i=0;for(;s<o&&lc(n[s],t.get(s));s++);for(;i<o-s&&lc(n[n.length-i-1],t.get(t.length-i-1));i++);let c=o-s-i,a=Math.max(0,n.length-t.length),u=Math.max(0,t.length-n.length);for(let d=0;d<c;d++,s++){let f=n[s],h=t.get(s);Object.entries(f).forEach(([p,g])=>{switch(p){case"attributes":{let m=h.get(p);if(!m){h.set(p,jd(f.name,g));break}Object.entries(g).forEach(([y,E])=>{let _=m?.get(y);(!fy(f.name,y,_)||!(0,jo.default)(_,E))&&dy(f.name,y,E,m,r)}),m.forEach((y,E)=>{g.hasOwnProperty(E)||m.delete(E)});break}case"innerBlocks":{let m=h.get(p);m instanceof C.Array||(m=new C.Array,h.set(p,m)),dc(m,g??[],r);break}default:(0,jo.default)(f[p],h.get(p))||h.set(p,g)}}),h.forEach((p,g)=>{f.hasOwnProperty(g)||h.delete(g)})}t.delete(s,u);for(let d=0;d<a;d++,s++){let f=[Yd(n[s])];t.insert(s,f)}let l=new Set;for(let d=0;d<t.length;d++){let f=t.get(d),h=f.get("clientId");h&&(l.has(h)&&(h=Tn(),f.set("clientId",h)),l.add(h))}}function dy(t,e,r,n,o){let s=Gd(t,e),i=n.get(e);s&&typeof r=="string"&&n.has(e)&&i instanceof C.Text?fc(i,r,o):n.set(e,Fd(t,e,r))}var Bo;function Fo(t,e){if(!Bo){Bo=new Map;for(let r of(0,Nd.getBlockTypes)())Bo.set(r.name,new Map(Object.entries(r.attributes??{}).map(([n,o])=>{let{role:s,type:i,query:c}=o;return[n,{role:s,type:i,query:c}]})))}return Bo.get(t)?.get(e)}function fy(t,e,r){let n=Fo(t,e)?.type;return n==="rich-text"?r instanceof C.Text:n==="string"?typeof r=="string":!0}function hy(t,e){return Fo(t,e)?.role==="local"}function Gd(t,e){return Fo(t,e)?.type==="rich-text"}var ic;function fc(t,e,r=null){ic||(ic=new C.Doc);let n=ic.getText("temporary-text");n.delete(0,n.length),n.insert(0,e);let o=new tc(t.toDelta()),s=new tc(n.toDelta()),i=o.diffWithCursor(s,r);t.applyDelta(i.ops)}var Go=w(W(),1),hc=w(Ar(),1),Hd=w(nr(),1);var py=5,Ur=(t=>(t.RelativeSelection="RelativeSelection",t.BlockSelection="BlockSelection",t))(Ur||{});function zd(t,e=py){let r=[],n=()=>r.slice(0),o=i=>{if(!i?.selectionStart?.clientId||!i?.selectionEnd?.clientId)return;let{selectionStart:c,selectionEnd:a}=i,u=$d(c,t),l=$d(a,t);s({start:u,end:l})},s=i=>{let c=i.start.clientId,a=i.end.clientId;r=r.filter(u=>!(u.start.clientId===c&&u.end.clientId===a)),r.unshift(i),r.length>e+1&&(r=r.slice(0,e+1))};return{getSelectionHistory:n,updateSelection:o}}function $d(t,e){let r=t.clientId,o=vn(r,e)?.get("attributes"),s=t.attributeKey,i=s?o?.get(s):void 0;if(!(i instanceof C.Text)||!(s&&r))return{type:"BlockSelection",clientId:r};let u=t.offset??0,l=C.createRelativePositionFromTypeIndex(i,No(i.toString(),u));return{type:"RelativeSelection",attributeKey:s,relativePosition:l,clientId:r,offset:u}}var Kd=new WeakMap;function qd(t){let e=Kd.get(t);return e||(e=zd(t),Kd.set(t,e)),e}function $o(t){return qd(t).getSelectionHistory()}function Wd(t,e){return qd(t).updateSelection(e)}function Yo(t,e){if(t.type===Ur.RelativeSelection){let{relativePosition:r,attributeKey:n,clientId:o}=t,s=C.createAbsolutePositionFromRelativePosition(r,e);if(s)return{clientId:o,attributeKey:n,offset:Mo(s.type.toString(),s.index)}}else if(t.type===Ur.BlockSelection)return{clientId:t.clientId,attributeKey:void 0,offset:void 0};return null}function gy(t,e){let{start:r,end:n}=t,o=vn(r.clientId,e),s=vn(n.clientId,e);if(!o||!s)return null;let i=Yo(r,e),c=Yo(n,e);return i===null||c===null?null:{selectionStart:i,selectionEnd:c}}function my(t,e){for(let r of e){let n=gy(r,t);if(n!==null)return n}return null}function Jd(t,e){let r=my(e,t);if(r===null)return;let{getBlock:n}=(0,Go.select)(hc.store),{resetSelection:o}=(0,Go.dispatch)(hc.store),{selectionStart:s,selectionEnd:i}=r;if(s.clientId===i.clientId){let a=n(s.clientId),u=a&&(0,Hd.isUnmodifiedBlock)(a);if(s.offset===0&&i.offset===0&&u&&!s.attributeKey&&!i.attributeKey){let d={clientId:s.clientId},f={clientId:i.clientId};o(d,f,0)}else o(s,i,0)}else o(i,i,0)}function Qd(t,e){if(e.length===0)return null;let{start:r,end:n}=e[0];if(r.type===Ur.BlockSelection||n.type===Ur.BlockSelection)return null;let o=Yo(r,t),s=Yo(n,t);if(!o||!s)return null;let i=o.offset!==r.offset,c=s.offset!==n.offset;return!i&&!c?null:{selectionStart:o,selectionEnd:s}}var Ko="_crdt_document",ef=new Set([Ko]);function yy(t,e){let r=yt(t,qe);Object.entries(e).forEach(([n,o])=>{if(typeof o!="function"){let s=r.get(n);zo(r,n,s,o)}})}function tf(t,e,r){let n=yt(t,qe);if(Object.keys(e).forEach(o=>{if(!r.has(o))return;let s=e[o];if(typeof s!="function")switch(o){case"blocks":{if(!s){n.set(o,void 0);break}let i=n.get(o);i instanceof C.Array||(i=new C.Array,n.set(o,i));let c=e.selection?.selectionStart?.offset??null;dc(i,s,c);break}case"content":case"excerpt":case"title":{let i=n.get(o),c=pc(s);if(o==="title"&&!i?.toString()&&c==="Auto Draft"&&(c=""),i instanceof C.Text)fc(i,c??"");else{let a=new C.Text(c??"");n.set(o,a)}break}case"meta":{let i=n.get("meta");vd(i)||(i=Po(),n.set("meta",i)),Object.entries(s??{}).forEach(([c,a])=>{ef.has(c)||zo(i,c,i.get(c),a)});break}case"slug":{if(!s)break;let i=n.get(o);zo(n,o,i,s);break}default:{let i=n.get(o);zo(n,o,i,s)}}}),e.selection){let o=e.selection;setTimeout(()=>{Wd(t,o)},0)}}function Ey(t){return yt(t,qe).toJSON()}function rf(t,e,r){let n=yt(t,qe),o={},s=Object.fromEntries(Object.entries(n.toJSON()).filter(([a,u])=>{if(!r.has(a))return!1;let l=e[a];switch(a){case"blocks":{if(t.meta?.get(wd)&&e.content){let d=n.get("blocks")?.toJSON()??[];return(0,Zd.__unstableSerializeAndClean)(d).trim()!==pc(e.content)}return!0}case"date":return l===null||e.modified===l?!1:Lr(l,u);case"meta":{let d=l??{};o=Object.fromEntries(Object.entries(u??{}).filter(([h])=>ef.has(h)?!1:h in d));let f={...d,...o};return Lr(l,f)}case"status":return u==="auto-draft"?!1:Lr(l,u);case"content":case"excerpt":case"title":return Lr(pc(l),u);default:return Lr(l,u)}}));s.blocks&&(s.blocks=uc(s.blocks)),typeof s.meta=="object"&&(s.meta={...e.meta,...o});let i=$o(t),c=Qd(t,i);return c&&(s.selection={...c,initialPosition:0}),s}var nf={applyChangesToCRDTDoc:yy,createAwareness:t=>new dd(t),getChangesFromCRDTDoc:Ey},of={applyChangesToCRDTDoc:()=>{},getChangesFromCRDTDoc:()=>({}),shouldSync:(t,e)=>e===null};function pc(t){if(typeof t=="string")return t;if(t&&typeof t=="object"&&"raw"in t&&typeof t.raw=="string")return t.raw}function Lr(t,e){return!(0,Xd.default)(t,e)}function zo(t,e,r,n){if(n===void 0){t.delete(e);return}Lr(r,n)&&t.set(e,n)}var M="id",wy=["title","excerpt","content"],_y={blocks:{read:t=>(0,Ho.parse)(t.content?.raw??""),write:t=>({content:(0,Ho.__unstableSerializeAndClean)(t.blocks)})}},qo=[{label:(0,B.__)("Base"),kind:"root",key:!1,name:"__unstableBase",baseURL:"/",baseURLParams:{_fields:["description","gmt_offset","home","image_sizes","image_size_threshold","image_output_formats","jpeg_interlaced","png_interlaced","gif_interlaced","name","site_icon","site_icon_url","site_logo","timezone_string","url","page_for_posts","page_on_front","show_on_front"].join(",")},plural:"__unstableBases"},{label:(0,B.__)("Post Type"),name:"postType",kind:"root",key:"slug",baseURL:"/wp/v2/types",baseURLParams:{context:"edit"},plural:"postTypes"},{name:"media",kind:"root",baseURL:"/wp/v2/media",baseURLParams:{context:"edit"},plural:"mediaItems",label:(0,B.__)("Media"),rawAttributes:["caption","title","description"],supportsPagination:!0},{name:"taxonomy",kind:"root",key:"slug",baseURL:"/wp/v2/taxonomies",baseURLParams:{context:"edit"},plural:"taxonomies",label:(0,B.__)("Taxonomy")},{name:"sidebar",kind:"root",baseURL:"/wp/v2/sidebars",baseURLParams:{context:"edit"},plural:"sidebars",transientEdits:{blocks:!0},label:(0,B.__)("Widget areas")},{name:"widget",kind:"root",baseURL:"/wp/v2/widgets",baseURLParams:{context:"edit"},plural:"widgets",transientEdits:{blocks:!0},label:(0,B.__)("Widgets")},{name:"widgetType",kind:"root",baseURL:"/wp/v2/widget-types",baseURLParams:{context:"edit"},plural:"widgetTypes",label:(0,B.__)("Widget types")},{label:(0,B.__)("User"),name:"user",kind:"root",baseURL:"/wp/v2/users",getTitle:t=>t?.name||t?.slug,baseURLParams:{context:"edit"},plural:"users",supportsPagination:!0},{name:"comment",kind:"root",baseURL:"/wp/v2/comments",baseURLParams:{context:"edit"},plural:"comments",label:(0,B.__)("Comment"),supportsPagination:!0,syncConfig:of},{name:"menu",kind:"root",baseURL:"/wp/v2/menus",baseURLParams:{context:"edit"},plural:"menus",label:(0,B.__)("Menu"),supportsPagination:!0},{name:"menuItem",kind:"root",baseURL:"/wp/v2/menu-items",baseURLParams:{context:"edit"},plural:"menuItems",label:(0,B.__)("Menu Item"),rawAttributes:["title"],supportsPagination:!0},{name:"menuLocation",kind:"root",baseURL:"/wp/v2/menu-locations",baseURLParams:{context:"edit"},plural:"menuLocations",label:(0,B.__)("Menu Location"),key:"name"},{label:(0,B.__)("Global Styles"),name:"globalStyles",kind:"root",baseURL:"/wp/v2/global-styles",baseURLParams:{context:"edit"},plural:"globalStylesVariations",getTitle:()=>(0,B.__)("Custom Styles"),getRevisionsUrl:(t,e)=>`/wp/v2/global-styles/${t}/revisions${e?"/"+e:""}`,supportsPagination:!0},{label:(0,B.__)("Themes"),name:"theme",kind:"root",baseURL:"/wp/v2/themes",baseURLParams:{context:"edit"},plural:"themes",key:"stylesheet"},{label:(0,B.__)("Plugins"),name:"plugin",kind:"root",baseURL:"/wp/v2/plugins",baseURLParams:{context:"edit"},plural:"plugins",key:"plugin"},{label:(0,B.__)("Status"),name:"status",kind:"root",baseURL:"/wp/v2/statuses",baseURLParams:{context:"edit"},plural:"statuses",key:"slug"},{label:(0,B.__)("Registered Templates"),name:"registeredTemplate",kind:"root",baseURL:"/wp/v2/registered-templates",key:"id"},{label:(0,B.__)("Font Collections"),name:"fontCollection",kind:"root",baseURL:"/wp/v2/font-collections",baseURLParams:{context:"view"},plural:"fontCollections",key:"slug"},{label:(0,B.__)("Icons"),name:"icon",kind:"root",baseURL:"/wp/v2/icons",baseURLParams:{context:"view"},plural:"icons",key:"name"}],sf={root:{media:{since:"6.9",alternative:{kind:"postType",name:"attachment"}}}},Wo=[{kind:"postType",loadEntities:by},{kind:"taxonomy",loadEntities:vy},{kind:"root",name:"site",plural:"sites",loadEntities:Cy}],Sy=async(t,e,r,n)=>{let o={};if(!n&&t?.status==="auto-draft"&&(!e.status&&!o.status&&(o.status="draft"),(!e.title||e.title==="Auto Draft")&&!o.title&&(!t?.title||t?.title==="Auto Draft")&&(o.title="")),t){let s=`postType/${r}`,i=t.id,c=await pe()?.createPersistedCRDTDoc(s,i);c&&(o.meta={...e.meta,[Ko]:c})}return o};async function by(){let t=(0,xn.default)({path:"/wp/v2/types?context=view"}),e=window._wpCollaborationEnabled?(0,xn.default)({path:"/wp/v2/taxonomies?context=view"}):Promise.resolve({}),[r,n]=await Promise.all([t,e]);return Object.entries(r??{}).map(([o,s])=>{let i=["wp_template","wp_template_part"].includes(o),c=s?.rest_namespace??"wp/v2",a=new Set(["author","blocks","content","comment_status","date","excerpt","featured_media","format","meta","ping_status","slug","status","sticky","template","title",...s.taxonomies?.map(l=>n?.[l]?.rest_base)?.filter(Boolean)??[]]),u={kind:"postType",baseURL:`/${c}/${s.rest_base}`,baseURLParams:{context:"edit"},name:o,label:s.name,transientEdits:{..._y,selection:!0},mergedEdits:{meta:!0},rawAttributes:wy,getTitle:l=>l?.title?.rendered||l?.title||(i?ga(l.slug??""):String(l.id)),__unstablePrePersist:(l,d)=>Sy(l,d,o,i),__unstable_rest_base:s.rest_base,supportsPagination:!0,getRevisionsUrl:(l,d)=>`/${c}/${s.rest_base}/${l}/revisions${d?"/"+d:""}`,revisionKey:i&&!window?.__experimentalTemplateActivate?"wp_id":M};return u.syncConfig={applyChangesToCRDTDoc:(l,d)=>tf(l,d,a),createAwareness:(l,d)=>{let f="postType",h=parseInt(d,10);return new Ud(l,f,o,h)},getChangesFromCRDTDoc:(l,d)=>rf(l,d,a),getPersistedCRDTDoc:l=>l?.meta?.[Ko]||null},u})}async function vy(){let t=await(0,xn.default)({path:"/wp/v2/taxonomies?context=view"});return Object.entries(t??{}).map(([e,r])=>{let o={kind:"taxonomy",baseURL:`/${r?.rest_namespace??"wp/v2"}/${r.rest_base}`,baseURLParams:{context:"edit"},name:e,label:r.name,getTitle:s=>s?.name,supportsPagination:!0};return o.syncConfig=nf,o})}async function Cy(){let t={label:(0,B.__)("Site"),name:"site",kind:"root",key:!1,baseURL:"/wp/v2/settings",meta:{}},e=await(0,xn.default)({path:t.baseURL,method:"OPTIONS"}),r={};return Object.entries(e?.schema?.properties??{}).forEach(([n,o])=>{typeof o=="object"&&o.title&&(r[n]=o.title)}),[{...t,meta:{labels:r}}]}var Zt=(t,e,r="get")=>{let n=t==="root"?"":$r(t),o=$r(e);return`${r}${n}${o}`};function lf(t){let{query:e}=t;return e?et(e).context:"default"}function Ry(t,e,r,n){if(r===1&&n===-1)return e;let s=(r-1)*n,i=Math.max(t?.length??0,s+e.length),c=new Array(i);for(let a=0;a<i;a++){let u=a>=s&&a<s+n;c[a]=u?e[a-s]:t?.[a]}return c}function uf(t,e){return Object.fromEntries(Object.entries(t).filter(([r])=>!e.some(n=>Number.isInteger(n)?n===+r:n===r)))}function Ty(t={},e){switch(e.type){case"RECEIVE_ITEMS":{let r=lf(e),n=e.key||M,o=Array.isArray(e.items)?e.items:[e.items];return{...t,[r]:{...t[r],...Object.fromEntries(o.map(s=>[s?.[n],fs(t?.[r]?.[s?.[n]],s)]))}}}case"REMOVE_ITEMS":return Object.fromEntries(Object.entries(t).map(([r,n])=>[r,uf(n,e.itemIds)]))}return t}function xy(t={},e){switch(e.type){case"RECEIVE_ITEMS":{let r=lf(e),{query:n,key:o=M}=e,s=Array.isArray(e.items)?e.items:[e.items],i=n?et(n):{},c=!n||!Array.isArray(i.fields);return{...t,[r]:{...t[r],...s.reduce((a,u)=>{let l=u?.[o];return a[l]=t?.[r]?.[l]||c,a},{})}}}case"REMOVE_ITEMS":return Object.fromEntries(Object.entries(t).map(([r,n])=>[r,uf(n,e.itemIds)]))}return t}var Iy=(0,af.compose)([Br(t=>"query"in t),jr(t=>t.query?{...t,...et(t.query)}:t),Fn("context"),Fn("stableKey")])((t={},e)=>{if(e.type!=="RECEIVE_ITEMS"||!Array.isArray(e.items))return t;let r=e.key??M;return{itemIds:Ry(t?.itemIds||[],e.items.map(n=>n?.[r]).filter(Boolean),e.page,e.perPage),meta:e.meta}}),Ay=(t={},e)=>{switch(e.type){case"RECEIVE_ITEMS":return Iy(t,e);case"REMOVE_ITEMS":let r=e.itemIds.reduce((n,o)=>(n[o]=!0,n),{});return Object.fromEntries(Object.entries(t).map(([n,o])=>[n,Object.fromEntries(Object.entries(o).map(([s,i])=>[s,{...i,itemIds:i.itemIds.filter(c=>!r[c])}]))]));default:return t}},Jo=(0,cf.combineReducers)({items:Ty,itemIsComplete:xy,queries:Ay});function Dy(t={byId:{},queries:{}},e){return e.type==="RECEIVE_USER_QUERY"?{byId:{...t.byId,...e.users.reduce((r,n)=>({...r,[n.id]:n}),{})},queries:{...t.queries,[e.queryID]:e.users.map(r=>r.id)}}:t}function ky(t={},e){return e.type==="RECEIVE_CURRENT_USER"?e.currentUser:t}function Oy(t=void 0,e){return e.type==="RECEIVE_CURRENT_THEME"?e.currentTheme.stylesheet:t}function Uy(t=void 0,e){return e.type==="RECEIVE_CURRENT_GLOBAL_STYLES_ID"?e.id:t}function Ly(t={},e){return e.type==="RECEIVE_THEME_GLOBAL_STYLES"?{...t,[e.stylesheet]:e.globalStyles}:t}function Py(t={},e){return e.type==="RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS"?{...t,[e.stylesheet]:e.variations}:t}var My=t=>(e,r)=>{if(r.type==="UNDO"||r.type==="REDO"){let{record:n}=r,o=e;return n.forEach(({id:{kind:s,name:i,recordId:c},changes:a})=>{o=t(o,{type:"EDIT_ENTITY_RECORD",kind:s,name:i,recordId:c,edits:Object.entries(a).reduce((u,[l,d])=>(u[l]=r.type==="UNDO"?d.from:d.to,u),{})})}),o}return t(e,r)};function Ny(t){return(0,df.compose)([My,Br(e=>e.name&&e.kind&&e.name===t.name&&e.kind===t.kind),jr(e=>({key:t.key||M,...e}))])((0,In.combineReducers)({queriedData:Jo,edits:(e={},r)=>{switch(r.type){case"RECEIVE_ITEMS":if((r?.query?.context??"default")!=="default")return e;let o={...e},s=Array.isArray(r.items)?r.items:[r.items];for(let c of s){let a=c?.[r.key],u=o[a];if(!u)continue;let l=Object.keys(u).reduce((d,f)=>(!(0,gc.default)(u[f],c[f]?.raw??c[f])&&(!r.persistedEdits||!(0,gc.default)(u[f],r.persistedEdits[f]))&&(d[f]=u[f]),d),{});Object.keys(l).length?o[a]=l:delete o[a]}return o;case"EDIT_ENTITY_RECORD":let i={...e[r.recordId],...r.edits};return Object.keys(i).forEach(c=>{i[c]===void 0&&delete i[c]}),{...e,[r.recordId]:i}}return e},saving:(e={},r)=>{switch(r.type){case"SAVE_ENTITY_RECORD_START":case"SAVE_ENTITY_RECORD_FINISH":return{...e,[r.recordId]:{pending:r.type==="SAVE_ENTITY_RECORD_START",error:r.error,isAutosave:r.isAutosave}}}return e},deleting:(e={},r)=>{switch(r.type){case"DELETE_ENTITY_RECORD_START":case"DELETE_ENTITY_RECORD_FINISH":return{...e,[r.recordId]:{pending:r.type==="DELETE_ENTITY_RECORD_START",error:r.error}}}return e},revisions:(e={},r)=>{if(r.type==="RECEIVE_ITEM_REVISIONS"){let n=r.recordKey;delete r.recordKey;let o=Jo(e[n],{...r,type:"RECEIVE_ITEMS"});return{...e,[n]:o}}return r.type==="REMOVE_ITEMS"?Object.fromEntries(Object.entries(e).filter(([n])=>!r.itemIds.some(o=>Number.isInteger(o)?o===+n:o===n))):e}}))}function Vy(t=qo,e){return e.type==="ADD_ENTITIES"?[...t,...e.entities]:t}var By=(t={},e)=>{let r=Vy(t.config,e),n=t.reducer;if(!n||r!==t.config){let s=r.reduce((i,c)=>{let{kind:a}=c;return i[a]||(i[a]=[]),i[a].push(c),i},{});n=(0,In.combineReducers)(Object.fromEntries(Object.entries(s).map(([i,c])=>{let a=(0,In.combineReducers)(Object.fromEntries(c.map(u=>[u.name,Ny(u)])));return[i,a]})))}let o=n(t.records,e);return o===t.records&&r===t.config&&n===t.reducer?t:{reducer:n,records:o,config:r}};function jy(t=(0,ff.createUndoManager)()){return t}function Fy(t={},e){switch(e.type){case"EDIT_ENTITY_RECORD":case"UNDO":case"REDO":return{}}return t}function Yy(t={},e){if(e.type==="RECEIVE_EMBED_PREVIEW"){let{url:r,preview:n}=e;return{...t,[r]:n}}return t}function Gy(t={},e){switch(e.type){case"RECEIVE_USER_PERMISSION":return{...t,[e.key]:e.isAllowed};case"RECEIVE_USER_PERMISSIONS":return{...t,...e.permissions}}return t}function $y(t={},e){if(e.type==="RECEIVE_AUTOSAVES"){let{postId:r,autosaves:n}=e;return{...t,[r]:n}}return t}function zy(t=[],e){return e.type==="RECEIVE_BLOCK_PATTERNS"?e.patterns:t}function Ky(t=[],e){return e.type==="RECEIVE_BLOCK_PATTERN_CATEGORIES"?e.categories:t}function Hy(t=[],e){return e.type==="RECEIVE_USER_PATTERN_CATEGORIES"?e.patternCategories:t}function qy(t=null,e){return e.type==="RECEIVE_NAVIGATION_FALLBACK_ID"?e.fallbackId:t}function Wy(t={},e){return e.type==="RECEIVE_THEME_GLOBAL_STYLE_REVISIONS"?{...t,[e.currentId]:e.revisions}:t}function Jy(t={},e){return e.type==="RECEIVE_DEFAULT_TEMPLATE"?{...t,[JSON.stringify(e.query)]:e.templateId}:t}function Qy(t={},e){return e.type==="RECEIVE_REGISTERED_POST_META"?{...t,[e.postType]:e.registeredPostMeta}:t}function Xy(t=null,e){return e.type==="RECEIVE_EDITOR_SETTINGS"?e.settings:t}function Zy(t=null,e){return e.type==="RECEIVE_EDITOR_ASSETS"?e.assets:t}function eE(t={},e){switch(e.type){case"SET_SYNC_CONNECTION_STATUS":{let r=`${e.kind}/${e.name}:${e.key}`;return{...t,[r]:e.status}}case"CLEAR_SYNC_CONNECTION_STATUS":{let r=`${e.kind}/${e.name}:${e.key}`,{[r]:n,...o}=t;return o}}return t}function tE(t=!0,e){switch(e.type){case"SET_COLLABORATION_SUPPORTED":return e.supported;case"SET_SYNC_CONNECTION_STATUS":return Ed.DOCUMENT_SIZE_LIMIT_EXCEEDED===e.status?.error?.code?!1:t}return t}var hf=(0,In.combineReducers)({users:Dy,currentTheme:Oy,currentGlobalStylesId:Uy,currentUser:ky,themeGlobalStyleVariations:Py,themeBaseGlobalStyles:Ly,themeGlobalStyleRevisions:Wy,entities:By,editsReference:Fy,undoManager:jy,embedPreviews:Yy,userPermissions:Gy,autosaves:$y,blockPatterns:zy,blockPatternCategories:Ky,userPatternCategories:Hy,navigationFallbackId:qy,defaultTemplates:Jy,registeredPostMeta:Qy,editorSettings:Xy,editorAssets:Zy,syncConnectionStatuses:eE,collaborationSupported:tE});var bc={};bt(bc,{__experimentalGetCurrentGlobalStylesId:()=>Cf,__experimentalGetCurrentThemeBaseGlobalStyles:()=>YE,__experimentalGetCurrentThemeGlobalStylesVariations:()=>GE,__experimentalGetDirtyEntityRecords:()=>CE,__experimentalGetEntitiesBeingSaved:()=>RE,__experimentalGetEntityRecordNoResolver:()=>_E,canUser:()=>Rf,canUserEditEntityRecord:()=>NE,getAuthors:()=>gE,getAutosave:()=>BE,getAutosaves:()=>VE,getBlockPatternCategories:()=>zE,getBlockPatterns:()=>$E,getCurrentTheme:()=>Zo,getCurrentThemeGlobalStylesRevisions:()=>HE,getCurrentUser:()=>mE,getDefaultTemplateId:()=>Ec,getEditedEntityRecord:()=>_c,getEmbedPreview:()=>PE,getEntitiesByKind:()=>yE,getEntitiesConfig:()=>_f,getEntity:()=>EE,getEntityConfig:()=>Pr,getEntityRecord:()=>xe,getEntityRecordEdits:()=>wc,getEntityRecordNonTransientEdits:()=>bf,getEntityRecords:()=>Xo,getEntityRecordsTotalItems:()=>bE,getEntityRecordsTotalPages:()=>vE,getLastEntityDeleteError:()=>AE,getLastEntitySaveError:()=>IE,getRawEntityRecord:()=>Sf,getRedoEdit:()=>kE,getReferenceByDistinctEdits:()=>FE,getRevision:()=>WE,getRevisions:()=>qE,getThemeSupports:()=>LE,getUndoEdit:()=>DE,getUserPatternCategories:()=>KE,getUserQueryResults:()=>wf,hasEditsForEntityRecord:()=>vf,hasEntityRecord:()=>wE,hasEntityRecords:()=>SE,hasFetchedAutosaves:()=>jE,hasRedo:()=>UE,hasUndo:()=>OE,isAutosavingEntityRecord:()=>TE,isDeletingEntityRecord:()=>xE,isPreviewEmbedFallback:()=>ME,isRequestingEmbedPreview:()=>pE,isSavingEntityRecord:()=>Sc});var me=w(W(),1),Ef=w(Ze(),1),Et=w(er(),1);var yc={};bt(yc,{getBlockPatternsForPostType:()=>nE,getEditorAssets:()=>uE,getEditorSettings:()=>lE,getEntityRecordPermissions:()=>oE,getEntityRecordsPermissions:()=>mf,getHomePage:()=>iE,getNavigationFallbackId:()=>rE,getPostsPageId:()=>cE,getRegisteredPostMeta:()=>sE,getSyncConnectionStatus:()=>fE,getTemplateId:()=>aE,getUndoManager:()=>Qo,isCollaborationSupported:()=>dE});var je=w(W(),1);var gf=w(er(),1);var mc=!1;function A(t,e,r,{alternativeFunctionName:n,isShorthandSelector:o=!1}={}){let s=sf[t]?.[e];if(s){if(!mc){let{alternative:i}=s,c=o?`'${r}'`:`The '${t}', '${e}' entity (used via '${r}')`,a=`the '${i.kind}', '${i.name}' entity`;n&&(a+=` via the '${n}' function`),(0,gf.default)(c,{...s,alternative:a})}mc=!0,setTimeout(()=>{mc=!1},0)}}function Qo(t){return pe()?.undoManager??t.undoManager}function rE(t){return t.navigationFallbackId}var nE=(0,je.createRegistrySelector)(t=>(0,je.createSelector)((e,r)=>t(x).getBlockPatterns().filter(({postTypes:n})=>!n||Array.isArray(n)&&n.includes(r)),()=>[t(x).getBlockPatterns()])),mf=(0,je.createRegistrySelector)(t=>(0,je.createSelector)((e,r,n,o)=>(Array.isArray(o)?o:[o]).map(i=>({delete:t(x).canUser("delete",{kind:r,name:n,id:i}),update:t(x).canUser("update",{kind:r,name:n,id:i})})),e=>[e.userPermissions]));function oE(t,e,r,n){return A(e,r,"getEntityRecordPermissions"),mf(t,e,r,n)[0]}function sE(t,e){return t.registeredPostMeta?.[e]??{}}function yf(t){return!t||!["number","string"].includes(typeof t)||Number(t)===0?null:t.toString()}var iE=(0,je.createRegistrySelector)(t=>(0,je.createSelector)(()=>{let e=t(x).getEntityRecord("root","__unstableBase");if(!e)return null;let r=e?.show_on_front==="page"?yf(e.page_on_front):null;if(r)return{postType:"page",postId:r};let n=t(x).getDefaultTemplateId({slug:"front-page"});return n?{postType:"wp_template",postId:n}:null},e=>[xe(e,"root","site"),xe(e,"root","__unstableBase"),Ec(e,{slug:"front-page"})])),cE=(0,je.createRegistrySelector)(t=>()=>{let e=t(x).getEntityRecord("root","__unstableBase");return e?.show_on_front==="page"?yf(e.page_for_posts):null}),aE=(0,je.createRegistrySelector)(t=>(e,r,n)=>{let o=Se(t(x)).getHomePage();if(!o)return;if(r==="page"&&r===o?.postType&&n.toString()===o?.postId){let u=t(x).getEntityRecords("postType","wp_template",{per_page:-1});if(!u)return;let l=u.find(({slug:d})=>d==="front-page")?.id;if(l)return l}let s=t(x).getEditedEntityRecord("postType",r,n);if(!s)return;let i=Se(t(x)).getPostsPageId();if(r==="page"&&i===n.toString())return t(x).getDefaultTemplateId({slug:"home"});let c=s.template;if(c){let u=t(x).getEntityRecords("postType","wp_template",{per_page:-1})?.find(({slug:l})=>l===c);if(u)return u.id}let a;return s.slug?a=r==="page"?`${r}-${s.slug}`:`single-${r}-${s.slug}`:a=r==="page"?"page":`single-${r}`,t(x).getDefaultTemplateId({slug:a})});function lE(t){return t.editorSettings}function uE(t){return t.editorAssets}function dE(t){return t.collaborationSupported}function fE(t){if(!t.syncConnectionStatuses)return;let e=["disconnected","connecting","connected"],r;for(let n of Object.values(t.syncConnectionStatuses))(!r||e.indexOf(n.status)<e.indexOf(r.status))&&(r=n);return r}var hE={},pE=(0,me.createRegistrySelector)(t=>(e,r)=>t(x).isResolving("getEmbedPreview",[r]));function gE(t,e){(0,Et.default)("select( 'core' ).getAuthors()",{since:"5.9",alternative:"select( 'core' ).getUsers({ who: 'authors' })"});let r=(0,Ef.addQueryArgs)("/wp/v2/users/?who=authors&per_page=100",e);return wf(t,r)}function mE(t){return t.currentUser}var wf=(0,me.createSelector)((t,e)=>(t.users.queries[e]??[]).map(n=>t.users.byId[n]),(t,e)=>[t.users.queries[e],t.users.byId]);function yE(t,e){return(0,Et.default)("wp.data.select( 'core' ).getEntitiesByKind()",{since:"6.0",alternative:"wp.data.select( 'core' ).getEntitiesConfig()"}),_f(t,e)}var _f=(0,me.createSelector)((t,e)=>t.entities.config.filter(r=>r.kind===e),(t,e)=>t.entities.config);function EE(t,e,r){return(0,Et.default)("wp.data.select( 'core' ).getEntity()",{since:"6.0",alternative:"wp.data.select( 'core' ).getEntityConfig()"}),Pr(t,e,r)}function Pr(t,e,r){return A(e,r,"getEntityConfig"),t.entities.config?.find(n=>n.kind===e&&n.name===r)}var xe=(0,me.createSelector)(((t,e,r,n,o)=>{A(e,r,"getEntityRecord");let s=t.entities.records?.[e]?.[r]?.queriedData;if(!s)return;let i=o?.context??"default";if(!o||!o._fields)return s.itemIsComplete[i]?.[n]?s.items[i][n]:void 0;let c=s.items[i]?.[n];if(!c)return c;let a={},u=ie(o._fields)??[];for(let l=0;l<u.length;l++){let d=u[l].split("."),f=c;d.forEach(h=>{f=f?.[h]}),Xe(a,d,f)}return a}),(t,e,r,n,o)=>{let s=o?.context??"default",i=t.entities.records?.[e]?.[r]?.queriedData;return[i?.items[s]?.[n],i?.itemIsComplete[s]?.[n]]});xe.__unstableNormalizeArgs=t=>{let e=[...t],r=e?.[2];return e[2]=Fr(r)?Number(r):r,e};function wE(t,e,r,n,o){let s=t.entities.records?.[e]?.[r]?.queriedData;if(!s)return!1;let i=o?.context??"default";if(!o||!o._fields)return!!s.itemIsComplete[i]?.[n];let c=s.items[i]?.[n];if(!c)return!1;let a=ie(o._fields)??[];for(let u=0;u<a.length;u++){let l=a[u].split("."),d=c;for(let f=0;f<l.length;f++){let h=l[f];if(!d||!Object.hasOwn(d,h))return!1;d=d[h]}}return!0}function _E(t,e,r,n){return xe(t,e,r,n)}var Sf=(0,me.createSelector)((t,e,r,n)=>{A(e,r,"getRawEntityRecord");let o=xe(t,e,r,n);return o&&Object.keys(o).reduce((s,i)=>(ps(Pr(t,e,r),i)?s[i]=o[i]?.raw!==void 0?o[i]?.raw:o[i]:s[i]=o[i],s),{})},(t,e,r,n,o)=>{let s=o?.context??"default";return[t.entities.config,t.entities.records?.[e]?.[r]?.queriedData?.items[s]?.[n],t.entities.records?.[e]?.[r]?.queriedData?.itemIsComplete[s]?.[n]]});function SE(t,e,r,n){return A(e,r,"hasEntityRecords"),Array.isArray(Xo(t,e,r,n))}var Xo=((t,e,r,n)=>{A(e,r,"getEntityRecords");let o=t.entities.records?.[e]?.[r]?.queriedData;return o?ys(o,n):null}),bE=(t,e,r,n)=>{A(e,r,"getEntityRecordsTotalItems");let o=t.entities.records?.[e]?.[r]?.queriedData;return o?Es(o,n):null},vE=(t,e,r,n)=>{A(e,r,"getEntityRecordsTotalPages");let o=t.entities.records?.[e]?.[r]?.queriedData;if(!o)return null;if(n?.per_page===-1)return 1;let s=Es(o,n);return s&&(n?.per_page?Math.ceil(s/n.per_page):da(o,n))},CE=(0,me.createSelector)(t=>{let{entities:{records:e}}=t,r=[];return Object.keys(e).forEach(n=>{Object.keys(e[n]).forEach(o=>{let s=Object.keys(e[n][o].edits).filter(i=>xe(t,n,o,i)&&vf(t,n,o,i));if(s.length){let i=Pr(t,n,o);s.forEach(c=>{let a=_c(t,n,o,c);r.push({key:a?a[i.key||M]:void 0,title:i?.getTitle?.(a)||"",name:o,kind:n})})}})}),r},t=>[t.entities.records]),RE=(0,me.createSelector)(t=>{let{entities:{records:e}}=t,r=[];return Object.keys(e).forEach(n=>{Object.keys(e[n]).forEach(o=>{let s=Object.keys(e[n][o].saving).filter(i=>Sc(t,n,o,i));if(s.length){let i=Pr(t,n,o);s.forEach(c=>{let a=_c(t,n,o,c);r.push({key:a?a[i.key||M]:void 0,title:i?.getTitle?.(a)||"",name:o,kind:n})})}})}),r},t=>[t.entities.records]);function wc(t,e,r,n){return A(e,r,"getEntityRecordEdits"),t.entities.records?.[e]?.[r]?.edits?.[n]}var bf=(0,me.createSelector)((t,e,r,n)=>{A(e,r,"getEntityRecordNonTransientEdits");let{transientEdits:o}=Pr(t,e,r)||{},s=wc(t,e,r,n)||{};return o?Object.keys(s).reduce((i,c)=>(o[c]||(i[c]=s[c]),i),{}):s},(t,e,r,n)=>[t.entities.config,t.entities.records?.[e]?.[r]?.edits?.[n]]);function vf(t,e,r,n){return A(e,r,"hasEditsForEntityRecord"),Sc(t,e,r,n)||Object.keys(bf(t,e,r,n)).length>0}var _c=(0,me.createSelector)((t,e,r,n)=>{A(e,r,"getEditedEntityRecord");let o=Sf(t,e,r,n),s=wc(t,e,r,n);return!o&&!s?!1:{...o,...s}},(t,e,r,n,o)=>{let s=o?.context??"default";return[t.entities.config,t.entities.records?.[e]?.[r]?.queriedData.items[s]?.[n],t.entities.records?.[e]?.[r]?.queriedData.itemIsComplete[s]?.[n],t.entities.records?.[e]?.[r]?.edits?.[n]]});function TE(t,e,r,n){A(e,r,"isAutosavingEntityRecord");let{pending:o,isAutosave:s}=t.entities.records?.[e]?.[r]?.saving?.[n]??{};return!!(o&&s)}function Sc(t,e,r,n){return A(e,r,"isSavingEntityRecord"),t.entities.records?.[e]?.[r]?.saving?.[n]?.pending??!1}function xE(t,e,r,n){return A(e,r,"isDeletingEntityRecord"),t.entities.records?.[e]?.[r]?.deleting?.[n]?.pending??!1}function IE(t,e,r,n){return A(e,r,"getLastEntitySaveError"),t.entities.records?.[e]?.[r]?.saving?.[n]?.error}function AE(t,e,r,n){return A(e,r,"getLastEntityDeleteError"),t.entities.records?.[e]?.[r]?.deleting?.[n]?.error}function DE(t){(0,Et.default)("select( 'core' ).getUndoEdit()",{since:"6.3"})}function kE(t){(0,Et.default)("select( 'core' ).getRedoEdit()",{since:"6.3"})}function OE(t){return Qo(t).hasUndo()}function UE(t){return Qo(t).hasRedo()}function Zo(t){return t.currentTheme?xe(t,"root","theme",t.currentTheme):null}function Cf(t){return t.currentGlobalStylesId}function LE(t){return Zo(t)?.theme_supports??hE}function PE(t,e){return t.embedPreviews[e]}function ME(t,e){let r=t.embedPreviews[e],n='<a href="'+e+'">'+e+"</a>";return r?r.html===n:!1}function Rf(t,e,r,n){let o=typeof r=="object";if(o&&(!r.kind||!r.name))return!1;o&&A(r.kind,r.name,"canUser");let s=Rt(e,r,n);return t.userPermissions[s]}function NE(t,e,r,n){return(0,Et.default)("wp.data.select( 'core' ).canUserEditEntityRecord()",{since:"6.7",alternative:"wp.data.select( 'core' ).canUser( 'update', { kind, name, id } )"}),Rf(t,"update",{kind:e,name:r,id:n})}function VE(t,e,r){return t.autosaves[r]}function BE(t,e,r,n){return n===void 0?void 0:t.autosaves[r]?.find(s=>s.author===n)}var jE=(0,me.createRegistrySelector)(t=>(e,r,n)=>t(x).hasFinishedResolution("getAutosaves",[r,n]));function FE(t){return t.editsReference}function YE(t){let e=Zo(t);return e?t.themeBaseGlobalStyles[e.stylesheet]:null}function GE(t){let e=Zo(t);return e?t.themeGlobalStyleVariations[e.stylesheet]:null}function $E(t){return t.blockPatterns}function zE(t){return t.blockPatternCategories}function KE(t){return t.userPatternCategories}function HE(t){(0,Et.default)("select( 'core' ).getCurrentThemeGlobalStylesRevisions()",{since:"6.5.0",alternative:"select( 'core' ).getRevisions( 'root', 'globalStyles', ${ recordKey } )"});let e=Cf(t);return e?t.themeGlobalStyleRevisions[e]:null}function Ec(t,e){return t.defaultTemplates[JSON.stringify(e)]}var qE=(t,e,r,n,o)=>{A(e,r,"getRevisions");let s=t.entities.records?.[e]?.[r]?.revisions?.[n];return s?ys(s,o):null},WE=(0,me.createSelector)((t,e,r,n,o,s)=>{A(e,r,"getRevision");let i=t.entities.records?.[e]?.[r]?.revisions?.[n];if(!i)return;let c=s?.context??"default";if(!s||!s._fields)return i.itemIsComplete[c]?.[o]?i.items[c][o]:void 0;let a=i.items[c]?.[o];if(!a)return a;let u={},l=ie(s._fields)??[];for(let d=0;d<l.length;d++){let f=l[d].split("."),h=a;f.forEach(p=>{h=h?.[p]}),Xe(u,f,h)}return u},(t,e,r,n,o,s)=>{let i=s?.context??"default",c=t.entities.records?.[e]?.[r]?.revisions?.[n];return[c?.items?.[i]?.[o],c?.itemIsComplete?.[i]?.[o]]});var Ac={};bt(Ac,{__experimentalBatch:()=>pw,__experimentalReceiveCurrentGlobalStylesId:()=>nw,__experimentalReceiveThemeBaseGlobalStyles:()=>ow,__experimentalReceiveThemeGlobalStyleVariations:()=>sw,__experimentalSaveSpecifiedEntityEdits:()=>mw,__unstableCreateUndoLevel:()=>hw,addEntities:()=>ew,clearEntityRecordEdits:()=>uw,deleteEntityRecord:()=>xc,editEntityRecord:()=>lw,receiveAutosaves:()=>ww,receiveCurrentTheme:()=>rw,receiveCurrentUser:()=>ZE,receiveDefaultTemplateId:()=>Sw,receiveEmbedPreview:()=>aw,receiveEntityRecords:()=>tw,receiveNavigationFallbackId:()=>_w,receiveRevisions:()=>bw,receiveThemeGlobalStyleRevisions:()=>cw,receiveThemeSupports:()=>iw,receiveUploadPermissions:()=>yw,receiveUserPermission:()=>Df,receiveUserPermissions:()=>Ew,receiveUserQuery:()=>XE,redo:()=>fw,saveEditedEntityRecord:()=>gw,saveEntityRecord:()=>Ic,undo:()=>dw});var If=w(Qe(),1);var Tc=w(Ae(),1),Af=w(Ze(),1),es=w(er(),1);var Cc=w(Ae(),1),vc=null;function JE(t,e){let r=[...t],n=[];for(;r.length;)n.push(r.splice(0,e));return n}async function Tf(t){vc===null&&(vc=(await(0,Cc.default)({path:"/batch/v1",method:"OPTIONS"})).endpoints[0].args.requests.maxItems);let e=[];for(let r of JE(t,vc)){let n=await(0,Cc.default)({path:"/batch/v1",method:"POST",data:{validation:"require-all-validate",requests:r.map(s=>({path:s.path,body:s.data,method:s.method,headers:s.headers}))}}),o;n.failed?o=n.responses.map(s=>({error:s?.body})):o=n.responses.map(s=>{let i={};return s.status>=200&&s.status<300?i.output=s.body:i.error=s.body,i}),e.push(...o)}return e}function Rc(t=Tf){let e=0,r=[],n=new QE;return{add(o){let s=++e;n.add(s);let i=c=>new Promise((a,u)=>{r.push({input:c,resolve:a,reject:u}),n.delete(s)});return typeof o=="function"?Promise.resolve(o(i)).finally(()=>{n.delete(s)}):i(o)},async run(){n.size&&await new Promise(i=>{let c=n.subscribe(()=>{n.size||(c(),i(void 0))})});let o;try{if(o=await t(r.map(({input:i})=>i)),o.length!==r.length)throw new Error("run: Array returned by processor must be same size as input array.")}catch(i){for(let{reject:c}of r)c(i);throw i}let s=!0;return o.forEach((i,c)=>{let a=r[c];i?.error?(a?.reject(i.error),s=!1):a?.resolve(i?.output??i)}),r=[],s}}}var QE=class{constructor(...t){this.set=new Set(...t),this.subscribers=new Set}get size(){return this.set.size}add(t){return this.set.add(t),this.subscribers.forEach(e=>e()),this}delete(t){let e=this.set.delete(t);return this.subscribers.forEach(r=>r()),e}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}};function xf(t){return t.status==="auto-draft"?{...t,title:""}:t}function XE(t,e){return{type:"RECEIVE_USER_QUERY",users:Array.isArray(e)?e:[e],queryID:t}}function ZE(t){return{type:"RECEIVE_CURRENT_USER",currentUser:t}}function ew(t){return{type:"ADD_ENTITIES",entities:t}}function tw(t,e,r,n=void 0,o=!1,s=void 0,i=void 0){t==="postType"&&(r=Array.isArray(r)?r.map(xf):xf(r));let c;return n?c=ta(r,n,s,i):c=ms(r,s,i),{...c,kind:t,name:e,invalidateCache:o}}function rw(t){return{type:"RECEIVE_CURRENT_THEME",currentTheme:t}}function nw(t){return{type:"RECEIVE_CURRENT_GLOBAL_STYLES_ID",id:t}}function ow(t,e){return{type:"RECEIVE_THEME_GLOBAL_STYLES",stylesheet:t,globalStyles:e}}function sw(t,e){return{type:"RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS",stylesheet:t,variations:e}}function iw(){return(0,es.default)("wp.data.dispatch( 'core' ).receiveThemeSupports",{since:"5.9"}),{type:"DO_NOTHING"}}function cw(t,e){return(0,es.default)("wp.data.dispatch( 'core' ).receiveThemeGlobalStyleRevisions()",{since:"6.5.0",alternative:"wp.data.dispatch( 'core' ).receiveRevisions"}),{type:"RECEIVE_THEME_GLOBAL_STYLE_REVISIONS",currentId:t,revisions:e}}function aw(t,e){return{type:"RECEIVE_EMBED_PREVIEW",url:t,preview:e}}var xc=(t,e,r,n,{__unstableFetch:o=Tc.default,throwOnError:s=!1}={})=>async({dispatch:i,resolveSelect:c})=>{A(t,e,"deleteEntityRecord");let u=(await c.getEntitiesConfig(t)).find(h=>h.kind===t&&h.name===e),l,d=!1;if(!u)return;let f=await i.__unstableAcquireStoreLock(x,["entities","records",t,e,r],{exclusive:!0});try{i({type:"DELETE_ENTITY_RECORD_START",kind:t,name:e,recordId:r});let h=!1,{baseURL:p}=u;t==="postType"&&e==="wp_template"&&(r&&typeof r=="string"&&!/^\d+$/.test(r)||!window?.__experimentalTemplateActivate)&&(p=p.slice(0,p.lastIndexOf("/"))+"/templates");try{let g=`${p}/${r}`;if(n&&(g=(0,Af.addQueryArgs)(g,n)),d=await o({path:g,method:"DELETE"}),await i(ea(t,e,r,!0)),u.syncConfig){let m=`${t}/${e}`,y=r;pe()?.unload(m,y)}}catch(g){h=!0,l=g}if(i({type:"DELETE_ENTITY_RECORD_FINISH",kind:t,name:e,recordId:r,error:l}),h&&s)throw l;return d}finally{i.__unstableReleaseStoreLock(f)}},lw=(t,e,r,n,o={})=>({select:s,dispatch:i})=>{A(t,e,"editEntityRecord");let c=s.getEntityConfig(t,e);if(!c)throw new Error(`The entity being edited (${t}, ${e}) does not have a loaded config.`);let{mergedEdits:a={}}=c,u=s.getRawEntityRecord(t,e,r),l=s.getEditedEntityRecord(t,e,r),d=Object.keys(n).reduce((h,p)=>(h[p]=a[p]?{...l[p],...n[p]}:n[p],h),{}),f={kind:t,name:e,recordId:r,edits:Object.keys(n).reduce((h,p)=>{let g=u[p],m=d[p];return h[p]=(0,If.default)(g,m)?void 0:m,h},{})};if(c.syncConfig){let h=`${t}/${e}`,p=r,g=o.undoIgnore?!1:!o.isCached,m=o.undoIgnore?rc:_d;pe()?.update(h,p,d,m,{isNewUndoLevel:g})}o.undoIgnore||s.getUndoManager().addRecord([{id:{kind:t,name:e,recordId:r},changes:Object.keys(n).reduce((h,p)=>(h[p]={from:l[p],to:n[p]},h),{})}],o.isCached),i({type:"EDIT_ENTITY_RECORD",...f})},uw=(t,e,r)=>({select:n,dispatch:o})=>{let s=n.getEntityConfig(t,e);if(A(t,e,"clearEntityRecordEdits"),!s)throw new Error(`The entity being edited (${t}, ${e}) does not have a loaded config.`);let i=n.getEntityRecordEdits(t,e,r);if(!i)return;let c=Object.keys(i).reduce((a,u)=>(a[u]=void 0,a),{});o({type:"EDIT_ENTITY_RECORD",kind:t,name:e,recordId:r,edits:c})},dw=()=>({select:t,dispatch:e})=>{let r=t.getUndoManager().undo();r&&e({type:"UNDO",record:r})},fw=()=>({select:t,dispatch:e})=>{let r=t.getUndoManager().redo();r&&e({type:"REDO",record:r})},hw=()=>({select:t})=>{t.getUndoManager().addRecord()},Ic=(t,e,r,{isAutosave:n=!1,__unstableFetch:o=Tc.default,throwOnError:s=!1}={})=>async({select:i,resolveSelect:c,dispatch:a})=>{A(t,e,"saveEntityRecord");let l=(await c.getEntitiesConfig(t)).find(g=>g.kind===t&&g.name===e);if(!l)return;let d=l.key??M,f=r[d],h=!!d&&!f,p=await a.__unstableAcquireStoreLock(x,["entities","records",t,e,f||Tn()],{exclusive:!0});try{for(let[_,S]of Object.entries(r))if(typeof S=="function"){let b=S(i.getEditedEntityRecord(t,e,f));a.editEntityRecord(t,e,f,{[_]:b},{undoIgnore:!0}),r[_]=b}a({type:"SAVE_ENTITY_RECORD_START",kind:t,name:e,recordId:f,isAutosave:n});let g,m,y=!1,{baseURL:E}=l;t==="postType"&&e==="wp_template"&&(f&&typeof f=="string"&&!/^\d+$/.test(f)||!window?.__experimentalTemplateActivate)&&(E=E.slice(0,E.lastIndexOf("/"))+"/templates");try{let _=`${E}${f?"/"+f:""}`,S=h?{}:i.getRawEntityRecord(t,e,f);if(n){let b=i.getCurrentUser(),I=b?b.id:void 0,O=await c.getAutosave(S.type,S.id,I),U={...S,...O,...r};if(U=Object.keys(U).reduce(($,j)=>(["title","excerpt","content","meta"].includes(j)&&($[j]=U[j]),$),{status:U.status==="auto-draft"?"draft":void 0}),g=await o({path:`${_}/autosaves`,method:"POST",data:U}),S.id===g.id){let $={...S,...U,...g};$=Object.keys($).reduce((j,de)=>(["title","excerpt","content"].includes(de)?j[de]=$[de]:de==="status"?j[de]=S.status==="auto-draft"&&$.status==="draft"?$.status:S.status:j[de]=S[de],j),{}),a.receiveEntityRecords(t,e,$,void 0,!0)}else a.receiveAutosaves(S.id,g)}else{let b=r;l.__unstablePrePersist&&(b={...b,...await l.__unstablePrePersist(S,b)}),g=await o({path:_,method:f?"PUT":"POST",data:b}),a.receiveEntityRecords(t,e,g,void 0,!0,b),l.syncConfig&&pe()?.update(`${t}/${e}`,f,g,rc,{isSave:!0})}}catch(_){y=!0,m=_}if(a({type:"SAVE_ENTITY_RECORD_FINISH",kind:t,name:e,recordId:f,error:m,isAutosave:n}),y&&s)throw m;return g}finally{a.__unstableReleaseStoreLock(p)}},pw=t=>async({dispatch:e})=>{let r=Rc(),n={saveEntityRecord(i,c,a,u){return r.add(l=>e.saveEntityRecord(i,c,a,{...u,__unstableFetch:l}))},saveEditedEntityRecord(i,c,a,u){return r.add(l=>e.saveEditedEntityRecord(i,c,a,{...u,__unstableFetch:l}))},deleteEntityRecord(i,c,a,u,l){return r.add(d=>e.deleteEntityRecord(i,c,a,u,{...l,__unstableFetch:d}))}},o=t.map(i=>i(n)),[,...s]=await Promise.all([r.run(),...o]);return s},gw=(t,e,r,n)=>async({select:o,dispatch:s,resolveSelect:i})=>{if(A(t,e,"saveEditedEntityRecord"),!o.hasEditsForEntityRecord(t,e,r))return;let a=(await i.getEntitiesConfig(t)).find(f=>f.kind===t&&f.name===e);if(!a)return;let u=a.key||M,l=o.getEntityRecordNonTransientEdits(t,e,r),d={[u]:r,...l};return await s.saveEntityRecord(t,e,d,n)},mw=(t,e,r,n,o)=>async({select:s,dispatch:i,resolveSelect:c})=>{if(A(t,e,"__experimentalSaveSpecifiedEntityEdits"),!s.hasEditsForEntityRecord(t,e,r))return;let a=s.getEntityRecordNonTransientEdits(t,e,r),u={};for(let h of n)Xe(u,h,gs(a,h));let f=(await c.getEntitiesConfig(t)).find(h=>h.kind===t&&h.name===e)?.key||M;return r&&(u[f]=r),await i.saveEntityRecord(t,e,u,o)};function yw(t){return(0,es.default)("wp.data.dispatch( 'core' ).receiveUploadPermissions",{since:"5.9",alternative:"receiveUserPermission"}),Df("create/media",t)}function Df(t,e){return{type:"RECEIVE_USER_PERMISSION",key:t,isAllowed:e}}function Ew(t){return{type:"RECEIVE_USER_PERMISSIONS",permissions:t}}function ww(t,e){return{type:"RECEIVE_AUTOSAVES",postId:t,autosaves:Array.isArray(e)?e:[e]}}function _w(t){return{type:"RECEIVE_NAVIGATION_FALLBACK_ID",fallbackId:t}}function Sw(t,e){return{type:"RECEIVE_DEFAULT_TEMPLATE",query:t,templateId:e}}var bw=(t,e,r,n,o,s=!1,i)=>async({dispatch:c,resolveSelect:a})=>{A(t,e,"receiveRevisions");let l=(await a.getEntitiesConfig(t)).find(f=>f.kind===t&&f.name===e),d=l&&l?.revisionKey?l.revisionKey:M;c({type:"RECEIVE_ITEM_REVISIONS",key:d,items:n,recordKey:r,meta:i,query:o,kind:t,name:e,invalidateCache:s})};var Dc={};bt(Dc,{editMediaEntity:()=>Cw,receiveEditorAssets:()=>Tw,receiveEditorSettings:()=>Rw,receiveRegisteredPostMeta:()=>vw,setCollaborationSupported:()=>xw,setSyncConnectionStatus:()=>Iw});var kf=w(Ae(),1);function vw(t,e){return{type:"RECEIVE_REGISTERED_POST_META",postType:t,registeredPostMeta:e}}var Cw=(t,e={},{__unstableFetch:r=kf.default,throwOnError:n=!1}={})=>async({dispatch:o,resolveSelect:s})=>{if(!t)return;let i="postType",c="attachment",u=(await s.getEntitiesConfig(i)).find(p=>p.kind===i&&p.name===c);if(!u)return;let l=await o.__unstableAcquireStoreLock(x,["entities","records",i,c,t],{exclusive:!0}),d,f,h=!1;try{o({type:"SAVE_ENTITY_RECORD_START",kind:i,name:c,recordId:t});try{let p=`${u.baseURL}/${t}/edit`,g=await r({path:p,method:"POST",data:{...e}});g&&(o.receiveEntityRecords(i,c,g,void 0,!0,void 0,void 0),d=g)}catch(p){f=p,h=!0}if(o({type:"SAVE_ENTITY_RECORD_FINISH",kind:i,name:c,recordId:t,error:f}),h&&n)throw f;return d}finally{o.__unstableReleaseStoreLock(l)}};function Rw(t){return{type:"RECEIVE_EDITOR_SETTINGS",settings:t}}function Tw(t){return{type:"RECEIVE_EDITOR_ASSETS",assets:t}}var xw=t=>({dispatch:e})=>{e({type:"SET_COLLABORATION_SUPPORTED",supported:t})};function Iw(t,e,r,n){return n?{type:"SET_SYNC_CONNECTION_STATUS",kind:t,name:e,key:r,status:n}:{type:"CLEAR_SYNC_CONNECTION_STATUS",kind:t,name:e,key:r}}var Lc={};bt(Lc,{__experimentalGetCurrentGlobalStylesId:()=>Gw,__experimentalGetCurrentThemeBaseGlobalStyles:()=>$w,__experimentalGetCurrentThemeGlobalStylesVariations:()=>zw,canUser:()=>Bf,canUserEditEntityRecord:()=>jw,getAuthors:()=>kw,getAutosave:()=>Yw,getAutosaves:()=>Fw,getBlockPatternCategories:()=>Hw,getBlockPatterns:()=>Kw,getCurrentTheme:()=>Nw,getCurrentThemeGlobalStylesRevisions:()=>jf,getCurrentUser:()=>Ow,getDefaultTemplateId:()=>Ff,getEditedEntityRecord:()=>Lw,getEditorAssets:()=>e_,getEditorSettings:()=>Zw,getEmbedPreview:()=>Bw,getEntitiesConfig:()=>Xw,getEntityRecord:()=>ts,getEntityRecords:()=>Un,getEntityRecordsTotalItems:()=>Pw,getEntityRecordsTotalPages:()=>Mw,getNavigationFallbackId:()=>Ww,getRawEntityRecord:()=>Uw,getRegisteredPostMeta:()=>Qw,getRevision:()=>Jw,getRevisions:()=>Yf,getThemeSupports:()=>Vw,getUserPatternCategories:()=>qw});var Ye=w(Ze(),1),Vf=w(kc(),1),N=w(Ae(),1);var Nf=w(Ae(),1);var An=w(Ae(),1),Dn=w(Ze(),1),kn=w(kc(),1),On=w(_s(),1);async function Lf(t,e={},r={}){let n=e.isInitialSuggestions&&e.initialSuggestionsSearchOptions?{...e,...e.initialSuggestionsSearchOptions}:e,{type:o,subtype:s,page:i,perPage:c=e.isInitialSuggestions?3:20}=n,{disablePostFormats:a=!1}=r,u=[];(!o||o==="post")&&u.push((0,An.default)({path:(0,Dn.addQueryArgs)("/wp/v2/search",{search:t,page:i,per_page:c,type:"post",subtype:s})}).then(f=>f.map(h=>({id:h.id,url:h.url,title:(0,kn.decodeEntities)(h.title||"")||(0,On.__)("(no title)"),type:h.subtype||h.type,kind:"post-type"}))).catch(()=>[])),(!o||o==="term")&&u.push((0,An.default)({path:(0,Dn.addQueryArgs)("/wp/v2/search",{search:t,page:i,per_page:c,type:"term",subtype:s})}).then(f=>f.map(h=>({id:h.id,url:h.url,title:(0,kn.decodeEntities)(h.title||"")||(0,On.__)("(no title)"),type:h.subtype||h.type,kind:"taxonomy"}))).catch(()=>[])),!a&&(!o||o==="post-format")&&u.push((0,An.default)({path:(0,Dn.addQueryArgs)("/wp/v2/search",{search:t,page:i,per_page:c,type:"post-format",subtype:s})}).then(f=>f.map(h=>({id:h.id,url:h.url,title:(0,kn.decodeEntities)(h.title||"")||(0,On.__)("(no title)"),type:h.subtype||h.type,kind:"taxonomy"}))).catch(()=>[])),(!o||o==="attachment")&&u.push((0,An.default)({path:(0,Dn.addQueryArgs)("/wp/v2/media",{search:t,page:i,per_page:c})}).then(f=>f.map(h=>({id:h.id,url:h.source_url,title:(0,kn.decodeEntities)(h.title.rendered||"")||(0,On.__)("(no title)"),type:h.type,kind:"media"}))).catch(()=>[]));let d=(await Promise.all(u)).flat();return d=d.filter(f=>!!f.id),d=Aw(d,t),d=d.slice(0,c),d}function Aw(t,e){let r=Uf(e),n={};for(let o of t)if(o.title){let s=Uf(o.title),i=s.filter(l=>r.some(d=>l===d)),c=s.filter(l=>r.some(d=>l!==d&&l.includes(d))),a=i.length/s.length*10,u=c.length/s.length;n[o.id]=a+u}else n[o.id]=0;return t.sort((o,s)=>n[s.id]-n[o.id])}function Uf(t){return t.toLowerCase().match(/[\p{L}\p{N}]+/gu)||[]}var Pf=w(Ae(),1),Fe=w(Ze(),1),Oc=new Map,Dw=async(t,e={})=>{let r="/wp-block-editor/v1/url-details",n={url:(0,Fe.prependHTTP)(t)};if(!(0,Fe.isURL)(t))return Promise.reject(`${t} is not a valid URL.`);let o=(0,Fe.getProtocol)(t);return!o||!(0,Fe.isValidProtocol)(o)||!o.startsWith("http")||!/^https?:\/\/[^\/\s]/i.test(t)?Promise.reject(`${t} does not have a valid protocol. URLs must be "http" based`):Oc.has(t)?Oc.get(t):(0,Pf.default)({path:(0,Fe.addQueryArgs)(r,n),...e}).then(s=>(Oc.set(t,s),s))},Mf=Dw;async function Uc(){let t=await(0,Nf.default)({path:"/wp/v2/block-patterns/patterns"});return t?t.map(e=>Object.fromEntries(Object.entries(e).map(([r,n])=>[Gn(r),n]))):[]}var kw=t=>async({dispatch:e})=>{let r=(0,Ye.addQueryArgs)("/wp/v2/users/?who=authors&per_page=100",t),n=await(0,N.default)({path:r});e.receiveUserQuery(r,n)},Ow=()=>async({dispatch:t})=>{let e=await(0,N.default)({path:"/wp/v2/users/me"});t.receiveCurrentUser(e)},ts=(t,e,r="",n)=>async({select:o,dispatch:s,registry:i,resolveSelect:c})=>{let u=(await c.getEntitiesConfig(t)).find(d=>d.name===e&&d.kind===t);if(!u)return;let l=await s.__unstableAcquireStoreLock(x,["entities","records",t,e,r],{exclusive:!1});try{if(n!==void 0&&n._fields&&(n={...n,_fields:[...new Set([...ie(n._fields)||[],u.key||M])].join()}),n!==void 0&&n._fields&&o.hasEntityRecord(t,e,r,n))return;let{baseURL:d}=u;t==="postType"&&e==="wp_template"&&(r&&typeof r=="string"&&!/^\d+$/.test(r)||!window?.__experimentalTemplateActivate)&&(d=d.slice(0,d.lastIndexOf("/"))+"/templates");let f=(0,Ye.addQueryArgs)(d+(r?"/"+r:""),{...u.baseURLParams,...n}),h=await(0,N.default)({path:f,parse:!1}),p=await h.json(),g=Yr(h.headers?.get("allow")),m=[],y={};for(let E of Ct)y[Rt(E,{kind:t,name:e,id:r})]=g[E],m.push([E,{kind:t,name:e,id:r}]);if(u.syncConfig&&Fr(r)&&!n){let E=`${t}/${e}`,_=r,S={...p};Object.entries(u.transientEdits??{}).filter(([b,I])=>S[b]===void 0&&I&&typeof I=="object"&&"read"in I&&typeof I.read=="function").forEach(([b,I])=>{S[b]=I.read(S)}),pe()?.load(u.syncConfig,E,_,S,{editRecord:(b,I={})=>{Object.keys(b).length&&s({type:"EDIT_ENTITY_RECORD",kind:t,name:e,recordId:r,edits:b,meta:{undo:void 0},options:I})},getEditedRecord:async()=>await c.getEditedEntityRecord(t,e,r),onStatusChange:b=>{s.setSyncConnectionStatus(t,e,r,b)},refetchRecord:async()=>{s.receiveEntityRecords(t,e,await(0,N.default)({path:f,parse:!0}),n)},persistCRDTDoc:()=>{c.getEditedEntityRecord(t,e,r).then(b=>{let{meta:I,status:O}=b;O==="auto-draft"||!I||s.saveEntityRecord(t,e,b)})},addUndoMeta:(b,I)=>{let O=$o(b);O&&I.set("selectionHistory",O)},restoreUndoMeta:(b,I)=>{let O=I.get("selectionHistory");O&&setTimeout(()=>{Jd(O,b)},0)}})}i.batch(()=>{s.receiveEntityRecords(t,e,p,n),s.receiveUserPermissions(y),s.finishResolutions("canUser",m)})}finally{s.__unstableReleaseStoreLock(l)}};ts.shouldInvalidate=(t,e,r)=>e==="root"&&r==="site"&&(t.type==="RECEIVE_ITEMS"&&t.persistedEdits&&t.persistedEdits.status!=="auto-draft"||t.type==="REMOVE_ITEMS")&&t.kind==="postType"&&t.name==="wp_template";var Uw=vt("getEntityRecord"),Lw=vt("getEntityRecord"),Un=(t,e,r={})=>async({dispatch:n,registry:o,resolveSelect:s})=>{let c=(await s.getEntitiesConfig(t)).find(f=>f.name===e&&f.kind===t);if(!c)return;let a=await n.__unstableAcquireStoreLock(x,["entities","records",t,e],{exclusive:!1}),u={...r},l=c.key||M;function d(f,h){let p=Object.fromEntries(Object.entries(h).filter(([g,m])=>["context","_fields"].includes(g)&&!!m));return f.filter(g=>g?.[l]).map(g=>[t,e,g[l],Object.keys(p).length>0?p:void 0])}try{r._fields&&(r={...r,_fields:[...new Set([...ie(r._fields)||[],l])].join()});let{baseURL:f}=c,{combinedTemplates:h=!0}=r;t==="postType"&&e==="wp_template"&&h&&(f=f.slice(0,f.lastIndexOf("/"))+"/templates");let p=(0,Ye.addQueryArgs)(f,{...c.baseURLParams,...r}),g=[],m;if(c.supportsPagination&&r.per_page!==-1){let y=await(0,N.default)({path:p,parse:!1});g=Object.values(await y.json()),m={totalItems:parseInt(y.headers.get("X-WP-Total")),totalPages:parseInt(y.headers.get("X-WP-TotalPages"))}}else if(r.per_page===-1&&r[Gr]===!0){let y=1,E;do{let _=await(0,N.default)({path:(0,Ye.addQueryArgs)(p,{page:y,per_page:100}),parse:!1}),S=Object.values(await _.json());E=parseInt(_.headers.get("X-WP-TotalPages")),m||(m={totalItems:parseInt(_.headers.get("X-WP-Total")),totalPages:1}),g.push(...S),o.batch(()=>{n.receiveEntityRecords(t,e,g,r,!1,void 0,m),n.finishResolutions("getEntityRecord",d(S,u))}),y++}while(y<=E)}else g=Object.values(await(0,N.default)({path:p})),m={totalItems:g.length,totalPages:1};if(c.syncConfig&&r.per_page===-1){let y=`${t}/${e}`;pe()?.loadCollection(c.syncConfig,y,{onStatusChange:E=>{n.setSyncConnectionStatus(t,e,null,E)},refetchRecords:async()=>{n.receiveEntityRecords(t,e,await(0,N.default)({path:p,parse:!0}),r)}})}r._fields&&(g=g.map(y=>(r._fields.split(",").forEach(E=>{y.hasOwnProperty(E)||(y[E]=void 0)}),y))),o.batch(()=>{n.receiveEntityRecords(t,e,g,r,!1,void 0,m);let y=g.filter(S=>!!S?.[l]&&!!S?._links?.self?.[0]?.targetHints?.allow).map(S=>({id:S[l],permissions:Yr(S._links.self[0].targetHints.allow)})),E=[],_={};for(let S of y)for(let b of Ct)E.push([b,{kind:t,name:e,id:S.id}]),_[Rt(b,{kind:t,name:e,id:S.id})]=S.permissions[b];y.length>0&&(n.receiveUserPermissions(_),n.finishResolutions("canUser",E)),n.finishResolutions("getEntityRecord",d(g,u)),n.__unstableReleaseStoreLock(a)})}catch{n.__unstableReleaseStoreLock(a)}};Un.shouldInvalidate=(t,e,r)=>(t.type==="RECEIVE_ITEMS"||t.type==="REMOVE_ITEMS")&&t.invalidateCache&&e===t.kind&&r===t.name;var Pw=vt("getEntityRecords"),Mw=vt("getEntityRecords"),Nw=()=>async({dispatch:t,resolveSelect:e})=>{let r=await e.getEntityRecords("root","theme",{status:"active"});t.receiveCurrentTheme(r[0])},Vw=vt("getCurrentTheme"),Bw=t=>async({dispatch:e})=>{try{let r=await(0,N.default)({path:(0,Ye.addQueryArgs)("/oembed/1.0/proxy",{url:t})});e.receiveEmbedPreview(t,r)}catch{e.receiveEmbedPreview(t,!1)}},Bf=(t,e,r)=>async({dispatch:n,registry:o,resolveSelect:s})=>{if(!Ct.includes(t))throw new Error(`'${t}' is not a valid action.`);let{hasStartedResolution:i}=o.select(x);for(let l of Ct){if(l===t)continue;if(i("canUser",[l,e,r]))return}let c=null;if(typeof e=="object"){if(!e.kind||!e.name)throw new Error("The entity resource object is not valid.");let d=(await s.getEntitiesConfig(e.kind)).find(f=>f.name===e.name&&f.kind===e.kind);if(!d)return;c=d.baseURL+(e.id?"/"+e.id:"")}else c=`/wp/v2/${e}`+(r?"/"+r:"");let a;try{a=await(0,N.default)({path:c,method:"OPTIONS",parse:!1})}catch{return}let u=Yr(a.headers?.get("allow"));o.batch(()=>{for(let l of Ct){let d=Rt(l,e,r);n.receiveUserPermission(d,u[l]),l!==t&&n.finishResolution("canUser",[l,e,r])}})},jw=(t,e,r)=>async({dispatch:n})=>{await n(Bf("update",{kind:t,name:e,id:r}))},Fw=(t,e)=>async({dispatch:r,resolveSelect:n})=>{let{rest_base:o,rest_namespace:s="wp/v2",supports:i}=await n.getPostType(t);if(!i?.autosave)return;let c=await(0,N.default)({path:`/${s}/${o}/${e}/autosaves?context=edit`});c&&c.length&&r.receiveAutosaves(e,c)},Yw=(t,e)=>async({resolveSelect:r})=>{await r.getAutosaves(t,e)},Gw=()=>async({dispatch:t,resolveSelect:e})=>{let n=(await e.getEntityRecords("root","theme",{status:"active"}))?.[0]?._links?.["wp:user-global-styles"]?.[0]?.href;if(!n)return;let o=n.match(/\/(\d+)(?:\?|$)/),s=o?Number(o[1]):null;s&&t.__experimentalReceiveCurrentGlobalStylesId(s)},$w=()=>async({resolveSelect:t,dispatch:e})=>{let r=await t.getCurrentTheme(),n=await(0,N.default)({path:`/wp/v2/global-styles/themes/${r.stylesheet}?context=view`});e.__experimentalReceiveThemeBaseGlobalStyles(r.stylesheet,n)},zw=()=>async({resolveSelect:t,dispatch:e})=>{let r=await t.getCurrentTheme(),n=await(0,N.default)({path:`/wp/v2/global-styles/themes/${r.stylesheet}/variations?context=view`});e.__experimentalReceiveThemeGlobalStyleVariations(r.stylesheet,n)},jf=()=>async({resolveSelect:t,dispatch:e})=>{let r=await t.__experimentalGetCurrentGlobalStylesId(),o=(r?await t.getEntityRecord("root","globalStyles",r):void 0)?._links?.["version-history"]?.[0]?.href;if(o){let i=(await(0,N.default)({url:o}))?.map(c=>Object.fromEntries(Object.entries(c).map(([a,u])=>[Gn(a),u])));e.receiveThemeGlobalStyleRevisions(r,i)}};jf.shouldInvalidate=t=>t.type==="SAVE_ENTITY_RECORD_FINISH"&&t.kind==="root"&&!t.error&&t.name==="globalStyles";var Kw=()=>async({dispatch:t})=>{let e=await Uc();t({type:"RECEIVE_BLOCK_PATTERNS",patterns:e})},Hw=()=>async({dispatch:t})=>{let e=await(0,N.default)({path:"/wp/v2/block-patterns/categories"});t({type:"RECEIVE_BLOCK_PATTERN_CATEGORIES",categories:e})},qw=()=>async({dispatch:t,resolveSelect:e})=>{let n=(await e.getEntityRecords("taxonomy","wp_pattern_category",{per_page:-1,_fields:"id,name,description,slug",context:"view"}))?.map(o=>({...o,label:(0,Vf.decodeEntities)(o.name),name:o.slug}))||[];t({type:"RECEIVE_USER_PATTERN_CATEGORIES",patternCategories:n})},Ww=()=>async({dispatch:t,select:e,registry:r})=>{let n=await(0,N.default)({path:(0,Ye.addQueryArgs)("/wp-block-editor/v1/navigation-fallback",{_embed:!0})}),o=n?._embedded?.self;r.batch(()=>{if(t.receiveNavigationFallbackId(n?.id),!o)return;let i=!e.getEntityRecord("postType","wp_navigation",n.id);t.receiveEntityRecords("postType","wp_navigation",o,void 0,i),t.finishResolution("getEntityRecord",["postType","wp_navigation",n.id])})},Ff=t=>async({dispatch:e,registry:r,resolveSelect:n})=>{let o=await(0,N.default)({path:(0,Ye.addQueryArgs)("/wp/v2/templates/lookup",t)});await n.getEntitiesConfig("postType");let s=window?.__experimentalTemplateActivate&&o?.wp_id||o?.id;s&&(o.id=s,r.batch(()=>{e.receiveDefaultTemplateId(t,s),e.receiveEntityRecords("postType",o.type,o),e.finishResolution("getEntityRecord",["postType",o.type,s])}))};Ff.shouldInvalidate=t=>t.type==="RECEIVE_ITEMS"&&t.kind==="root"&&t.name==="site";var Yf=(t,e,r,n={})=>async({dispatch:o,registry:s,resolveSelect:i})=>{let a=(await i.getEntitiesConfig(t)).find(p=>p.name===e&&p.kind===t);if(!a)return;n._fields&&(n={...n,_fields:[...new Set([...ie(n._fields)||[],a.revisionKey||M])].join()});let u=(0,Ye.addQueryArgs)(a.getRevisionsUrl(r),n),l,d,f={},h=a.supportsPagination&&n.per_page!==-1;try{d=await(0,N.default)({path:u,parse:!h})}catch{return}d&&(h?(l=Object.values(await d.json()),f.totalItems=parseInt(d.headers.get("X-WP-Total"))):l=Object.values(d),n._fields&&(l=l.map(p=>(n._fields.split(",").forEach(g=>{p.hasOwnProperty(g)||(p[g]=void 0)}),p))),s.batch(()=>{if(o.receiveRevisions(t,e,r,l,n,!1,f),!n?._fields&&!n.context){let p=a.revisionKey||M,g=l.filter(m=>m[p]).map(m=>[t,e,r,m[p]]);o.finishResolutions("getRevision",g)}}))};Yf.shouldInvalidate=(t,e,r,n)=>t.type==="SAVE_ENTITY_RECORD_FINISH"&&r===t.name&&e===t.kind&&!t.error&&n===t.recordId;var Jw=(t,e,r,n,o)=>async({dispatch:s,resolveSelect:i})=>{let a=(await i.getEntitiesConfig(t)).find(d=>d.name===e&&d.kind===t);if(!a)return;o!==void 0&&o._fields&&(o={...o,_fields:[...new Set([...ie(o._fields)||[],a.revisionKey||M])].join()});let u=(0,Ye.addQueryArgs)(a.getRevisionsUrl(r,n),o),l;try{l=await(0,N.default)({path:u})}catch{return}l&&s.receiveRevisions(t,e,r,l,o)},Qw=t=>async({dispatch:e,resolveSelect:r})=>{let n;try{let{rest_namespace:o="wp/v2",rest_base:s}=await r.getPostType(t)||{};n=await(0,N.default)({path:`${o}/${s}/?context=edit`,method:"OPTIONS"})}catch{return}n&&e.receiveRegisteredPostMeta(t,n?.schema?.properties?.meta?.properties)},Xw=t=>async({dispatch:e})=>{let r=Wo.find(n=>n.kind===t);if(r)try{let n=await r.loadEntities();if(!n.length)return;e.addEntities(n)}catch{}},Zw=()=>async({dispatch:t})=>{let e=await(0,N.default)({path:"/wp-block-editor/v1/settings"});t.receiveEditorSettings(e)},e_=()=>async({dispatch:t})=>{let e=await(0,N.default)({path:"/wp-block-editor/v1/assets"});t.receiveEditorAssets(e)};function Pc(t,e){let r={...t},n=r;for(let o of e)n.children={...n.children,[o]:{locks:[],children:{},...n.children[o]}},n=n.children[o];return r}function Ln(t,e){let r=t;for(let n of e){let o=r.children[n];if(!o)return null;r=o}return r}function*Gf(t,e){let r=t;yield r;for(let n of e){let o=r.children[n];if(!o)break;yield o,r=o}}function*$f(t){let e=Object.values(t.children);for(;e.length;){let r=e.pop();yield r,e.push(...Object.values(r.children))}}function Mc({exclusive:t},e){return!!(t&&e.length||!t&&e.filter(r=>r.exclusive).length)}var t_={requests:[],tree:{locks:[],children:{}}};function Pn(t=t_,e){switch(e.type){case"ENQUEUE_LOCK_REQUEST":{let{request:r}=e;return{...t,requests:[r,...t.requests]}}case"GRANT_LOCK_REQUEST":{let{lock:r,request:n}=e,{store:o,path:s}=n,i=[o,...s],c=Pc(t.tree,i),a=Ln(c,i);return a.locks=[...a.locks,r],{...t,requests:t.requests.filter(u=>u!==n),tree:c}}case"RELEASE_LOCK":{let{lock:r}=e,n=[r.store,...r.path],o=Pc(t.tree,n),s=Ln(o,n);return s.locks=s.locks.filter(i=>i!==r),{...t,tree:o}}}return t}function zf(t){return t.requests}function Kf(t,e,r,{exclusive:n}){let o=[e,...r],s=t.tree;for(let c of Gf(s,o))if(Mc({exclusive:n},c.locks))return!1;let i=Ln(s,o);if(!i)return!0;for(let c of $f(i))if(Mc({exclusive:n},c.locks))return!1;return!0}function Hf(){let t=Pn(void 0,{type:"@@INIT"});function e(){for(let o of zf(t)){let{store:s,path:i,exclusive:c,notifyAcquired:a}=o;if(Kf(t,s,i,{exclusive:c})){let u={store:s,path:i,exclusive:c};t=Pn(t,{type:"GRANT_LOCK_REQUEST",lock:u,request:o}),a(u)}}}function r(o,s,i){return new Promise(c=>{t=Pn(t,{type:"ENQUEUE_LOCK_REQUEST",request:{store:o,path:s,exclusive:i,notifyAcquired:c}}),e()})}function n(o){t=Pn(t,{type:"RELEASE_LOCK",lock:o}),e()}return{acquire:r,release:n}}function qf(){let t=Hf();function e(n,o,{exclusive:s}){return()=>t.acquire(n,o,s)}function r(n){return()=>t.release(n)}return{__unstableAcquireStoreLock:e,__unstableReleaseStoreLock:r}}var Wf,Jf;var rs=w(We(),1);var Xf=w(We(),1),wt=(0,Xf.createContext)({});wt.displayName="EntityContext";var th=w(eh(),1);function rh({kind:t,type:e,id:r,revisionId:n,children:o}){let s=(0,rs.useContext)(wt),i=(0,rs.useMemo)(()=>({...s,...t&&{[t]:{...s?.[t],[e]:r}},...n!==void 0&&{revisionId:n}}),[s,t,e,r,n]);return(0,th.jsx)(wt.Provider,{value:i,children:o})}var ns=w(W(),1),ch=w(er(),1),ah=w(We(),1);var sh=w(W(),1);function nh(t,e){var r=0,n,o;e=e||{};function s(){var i=n,c=arguments.length,a,u;e:for(;i;){if(i.args.length!==arguments.length){i=i.next;continue}for(u=0;u<c;u++)if(i.args[u]!==arguments[u]){i=i.next;continue e}return i!==n&&(i===o&&(o=i.prev),i.prev.next=i.next,i.next&&(i.next.prev=i.prev),i.next=n,i.prev=null,n.prev=i,n=i),i.val}for(a=new Array(c),u=0;u<c;u++)a[u]=arguments[u];return i={args:a,val:t.apply(null,a)},n?(n.prev=i,i.next=n):o=i,r===e.maxSize?(o=o.prev,o.next=null):r++,n=i,i.val}return s.clear=function(){n=null,o=null,r=0},s}var oh=nh;var te=(t=>(t.Idle="IDLE",t.Resolving="RESOLVING",t.Error="ERROR",t.Success="SUCCESS",t))(te||{});var r_=["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"];function Mr(t,e){return(0,sh.useSelect)((r,n)=>t(s=>n_(r(s)),n),e)}var n_=oh((t=>{let e={};for(let r in t)r_.includes(r)||Object.defineProperty(e,r,{get:()=>(...n)=>{let o=t[r](...n),s=t.getResolutionState(r,n)?.status,i;switch(s){case"resolving":i=te.Resolving;break;case"finished":i=te.Success;break;case"error":i=te.Error;break;case void 0:i=te.Idle;break}return{data:o,status:i,isResolving:i===te.Resolving,hasStarted:i!==te.Idle,hasResolved:i===te.Success||i===te.Error}}});return e}));var ih={};function Nc(t,e,r,n={enabled:!0}){let{editEntityRecord:o,saveEditedEntityRecord:s}=(0,ns.useDispatch)(q),i=(0,ah.useMemo)(()=>({edit:(f,h={})=>o(t,e,r,f,h),save:(f={})=>s(t,e,r,{throwOnError:!0,...f})}),[o,t,e,r,s]),{editedRecord:c,hasEdits:a,edits:u}=(0,ns.useSelect)(f=>n.enabled?{editedRecord:f(q).getEditedEntityRecord(t,e,r),hasEdits:f(q).hasEditsForEntityRecord(t,e,r),edits:f(q).getEntityRecordNonTransientEdits(t,e,r)}:{editedRecord:ih,hasEdits:!1,edits:ih},[t,e,r,n.enabled]),{data:l,...d}=Mr(f=>n.enabled?f(q).getEntityRecord(t,e,r):{data:null},[t,e,r,n.enabled]);return{record:l,editedRecord:c,hasEdits:a,edits:u,...d,...i}}function lh(t,e,r,n){return(0,ch.default)("wp.data.__experimentalUseEntityRecord",{alternative:"wp.data.useEntityRecord",since:"6.1"}),Nc(t,e,r,n)}var uh=w(Ze(),1),dh=w(er(),1),os=w(W(),1),Vc=w(We(),1);var o_=[];function ss(t,e,r={},n={enabled:!0}){let o=(0,uh.addQueryArgs)("",r),{data:s,...i}=Mr(u=>n.enabled?u(q).getEntityRecords(t,e,r):{data:o_},[t,e,o,n.enabled]),{totalItems:c,totalPages:a}=(0,os.useSelect)(u=>n.enabled?{totalItems:u(q).getEntityRecordsTotalItems(t,e,r),totalPages:u(q).getEntityRecordsTotalPages(t,e,r)}:{totalItems:null,totalPages:null},[t,e,o,n.enabled]);return{records:s,totalItems:c,totalPages:a,...i}}function fh(t,e,r,n){return(0,dh.default)("wp.data.__experimentalUseEntityRecords",{alternative:"wp.data.useEntityRecords",since:"6.1"}),ss(t,e,r,n)}function hh(t,e,r={},n={enabled:!0}){let o=(0,os.useSelect)(l=>l(q).getEntityConfig(t,e),[t,e]),{records:s,...i}=ss(t,e,{...r,...r._fields?{_fields:[...new Set([...ie(r._fields)||[],"_links"])].join()}:{}},n),c=(0,Vc.useMemo)(()=>s?.map(l=>l[o?.key??"id"])??[],[s,o?.key]),a=(0,os.useSelect)(l=>{let{getEntityRecordsPermissions:d}=Se(l(q));return d(t,e,c)},[c,t,e]);return{records:(0,Vc.useMemo)(()=>s?.map((l,d)=>({...l,permissions:a[d]}))??[],[s,a]),...i}}var mh=w(er(),1),yh=w(gh(),1);function Eh(t,e){let r=typeof t=="object",n=r?JSON.stringify(t):t;return r&&typeof e<"u"&&(0,yh.default)("When 'resource' is an entity object, passing 'id' as a separate argument isn't supported."),Mr(o=>{let s=r?!!t.id:!!e,{canUser:i}=o(q),c=i("create",r?{kind:t.kind,name:t.name}:t);if(!s){let p=i("read",t),g=c.isResolving||p.isResolving,m=c.hasResolved&&p.hasResolved,y=te.Idle;return g?y=te.Resolving:m&&(y=te.Success),{status:y,isResolving:g,hasResolved:m,canCreate:c.hasResolved&&c.data,canRead:p.hasResolved&&p.data}}let a=i("read",t,e),u=i("update",t,e),l=i("delete",t,e),d=a.isResolving||c.isResolving||u.isResolving||l.isResolving,f=a.hasResolved&&c.hasResolved&&u.hasResolved&&l.hasResolved,h=te.Idle;return d?h=te.Resolving:f&&(h=te.Success),{status:h,isResolving:d,hasResolved:f,canRead:f&&a.data,canCreate:f&&c.data,canUpdate:f&&u.data,canDelete:f&&l.data}},[n,e])}var wh=Eh;function _h(t,e){return(0,mh.default)("wp.data.__experimentalUseResourcePermissions",{alternative:"wp.data.useResourcePermissions",since:"6.1"}),Eh(t,e)}var Mn=w(We(),1),is=w(W(),1),cs=w(nr(),1);var Sh=w(We(),1);function Nr(t,e){return(0,Sh.useContext)(wt)?.[t]?.[e]}var _t=w(bn(),1);var bh=w(Ar(),1);var Bc,jc=new WeakMap;function vh(t){if(Bc||(Bc=Se(bh.privateApis)),!jc.has(t)){let e=Bc.getRichTextValues([t]);jc.set(t,e)}return jc.get(t)}var Fc=new WeakMap;function s_(t){if(!Fc.has(t)){let e=[];for(let r of vh(t))r&&r.replacements.forEach(({type:n,attributes:o})=>{n==="core/footnote"&&e.push(o["data-fn"])});Fc.set(t,e)}return Fc.get(t)}function Ch(t){return t.flatMap(s_)}var Yc={};function Gc(t,e){let r={blocks:t};if(!e||e.footnotes===void 0)return r;let n=Ch(t),o=e.footnotes?JSON.parse(e.footnotes):[];if(o.map(l=>l.id).join("")===n.join(""))return r;let i=n.map(l=>o.find(d=>d.id===l)||Yc[l]||{id:l,content:""});function c(l){if(!l||Array.isArray(l)||typeof l!="object")return l;l={...l};for(let d in l){let f=l[d];if(Array.isArray(f)){l[d]=f.map(c);continue}if(typeof f!="string"&&!(f instanceof _t.RichTextData))continue;let h=typeof f=="string"?_t.RichTextData.fromHTMLString(f):new _t.RichTextData(f),p=!1;h.replacements.forEach(g=>{if(g.type==="core/footnote"){let m=g.attributes["data-fn"],y=n.indexOf(m),E=(0,_t.create)({html:g.innerHTML});E.text=String(y+1),E.formats=Array.from({length:E.text.length},()=>E.formats[0]),E.replacements=Array.from({length:E.text.length},()=>E.replacements[0]),g.innerHTML=(0,_t.toHTMLString)({value:E}),p=!0}}),p&&(l[d]=typeof f=="string"?h.toHTMLString():h)}return l}function a(l){return l.map(d=>({...d,attributes:c(d.attributes),innerBlocks:a(d.innerBlocks)}))}let u=a(t);return Yc={...Yc,...o.reduce((l,d)=>(n.includes(d.id)||(l[d.id]=d),l),{})},{meta:{...e,footnotes:JSON.stringify(i)},blocks:u}}var i_=[],Rh=new Map;function Th(t,e,{id:r}={}){let n=Nr(t,e),o=r??n,{content:s,editedBlocks:i,meta:c}=(0,is.useSelect)(h=>{if(!o)return{};let{getEditedEntityRecord:p}=h(x),g=p(t,e,o);return{editedBlocks:g.blocks,content:g.content,meta:g.meta}},[t,e,o]),{__unstableCreateUndoLevel:a,editEntityRecord:u}=(0,is.useDispatch)(x),l=(0,Mn.useMemo)(()=>{if(!o)return;if(i)return i;if(!s||typeof s!="string")return i_;let h=`${t}:${e}:${o}`,p=Rh.get(h),g;return p&&p.content===s?g=p.blocks:(g=(0,cs.parse)(s),Rh.set(h,{content:s,blocks:g})),g},[t,e,o,i,s]),d=(0,Mn.useCallback)((h,p)=>{if(l===h)return a(t,e,o);let{selection:m,...y}=p,E={selection:m,content:({blocks:_=[]})=>(0,cs.__unstableSerializeAndClean)(_),...Gc(h,c)};u(t,e,o,E,{isCached:!1,...y})},[t,e,o,l,c,a,u]),f=(0,Mn.useCallback)((h,p)=>{let{selection:g,...m}=p,y={selection:g,...Gc(h,c)};u(t,e,o,y,{isCached:!0,...m})},[t,e,o,c,u]);return[l,f,d]}var as=w(We(),1),ls=w(W(),1);function xh(t,e,r,n){let o=Nr(t,e),s=n??o,c=(0,as.useContext)(wt)?.revisionId,{value:a,fullValue:u}=(0,ls.useSelect)(f=>{if(c){let y=f(x).getRevisions(t,e,s,{per_page:-1,context:"edit",_fields:"id,date,author,meta,title.raw,excerpt.raw,content.raw"}),_=f(x).getEntityConfig(t,e)?.revisionKey||M,S=y?.find(b=>b[_]===c);return S?{value:S[r]?.raw??S[r],fullValue:S[r]}:{}}let{getEntityRecord:h,getEditedEntityRecord:p}=f(x),g=h(t,e,s),m=p(t,e,s);return g&&m?{value:m[r],fullValue:g[r]}:{}},[t,e,s,r,c]),{editEntityRecord:l}=(0,ls.useDispatch)(x),d=(0,as.useCallback)(f=>{c||l(t,e,s,{[r]:f})},[l,t,e,s,r,c]);return[a,d,u]}var us=w(jn(),1),Je=w(We(),1);var c_={richTextOffset:null,localClientId:null},$c={activeCollaborators:[],resolveSelection:()=>c_,getDebugData:()=>({doc:{},clients:{},collaboratorMap:{}}),isCurrentCollaboratorDisconnected:!1};function Ih(t,e){let r=e??t.getCurrentState();return{activeCollaborators:r,resolveSelection:n=>t.convertSelectionStateToAbsolute(n),getDebugData:()=>t.getDebugData(),isCurrentCollaboratorDisconnected:r.find(n=>n.isMe)?.isConnected===!1}}function Nn(t,e){let[r,n]=(0,Je.useState)($c);return(0,Je.useEffect)(()=>{if(t===null||e===null){n($c);return}let o=`postType/${e}`,s=t.toString(),i=pe()?.getAwareness(o,s);if(!i){n($c);return}return i.setUp(),n(Ih(i)),i?.onStateChange(a=>{n(Ih(i,a))})},[t,e]),r}function Ah(t,e){return Nn(t,e).activeCollaborators}function Dh(t,e){return Nn(t,e).resolveSelection}function a_(t,e){let[r,n]=(0,Je.useState)(null);return(0,Je.useEffect)(()=>{if(t===null||e===null){n(null);return}let o=pe()?.getAwareness(`postType/${e}`,t.toString());if(!o){n(null);return}o.setUp();let s=o.doc.getMap("state"),i=o.doc.getMap("document"),c=Date.now(),a=u=>{if(u.keysChanged.has("savedAt")){let l=s.get("savedAt"),d=s.get("savedBy");if(typeof l=="number"&&typeof d=="number"&&l>c){let f=i.get("status");n({savedAt:l,savedByClientId:d,postStatus:f})}}};return s.observe(a),()=>{s.unobserve(a)}},[t,e]),r}function kh(t,e,r){let{activeCollaborators:n}=Nn(t,e),o=(0,us.usePrevious)(n);(0,Je.useEffect)(()=>{if(!o||o.length===0)return;let s=new Map(o.map(c=>[c.clientId,c])),i=n.find(c=>c.isMe);for(let c of n)!s.has(c.clientId)&&!c.isMe&&r(c,i)},[n,o,r])}function Oh(t,e,r){let{activeCollaborators:n}=Nn(t,e),o=(0,us.usePrevious)(n);(0,Je.useEffect)(()=>{if(!o||o.length===0)return;let s=new Map(n.map(i=>[i.clientId,i]));for(let i of o){if(i.isMe||!i.isConnected)continue;s.get(i.clientId)?.isConnected||r(i)}},[n,o,r])}function Uh(t,e,r){let{activeCollaborators:n}=Nn(t,e),o=a_(t,e),s=(0,us.usePrevious)(o);(0,Je.useEffect)(()=>{if(!o||s&&o.savedAt===s.savedAt)return;let i=n.find(c=>c.clientId===o.savedByClientId&&!c.isMe);i&&r(o,i,s??null)},[o,s,n,r])}var l_={useEntityRecordsWithPermissions:hh,RECEIVE_INTERMEDIATE_RESULTS:Gr,retrySyncConnection:Sd,useActiveCollaborators:Ah,useResolvedSelection:Dh,useOnCollaboratorJoin:kh,useOnCollaboratorLeave:Oh,useOnPostSave:Uh,SelectionType:Dr,SelectionDirection:kr},Lh={};yd(Lh,l_);var zc=[...qo,...Wo.filter(t=>!!t.name)],u_=zc.reduce((t,e)=>{let{kind:r,name:n,plural:o}=e,s=Zt(r,n);if(t[s]=(i,c,a)=>(A(r,n,s,{isShorthandSelector:!0,alternativeFunctionName:"getEntityRecord"}),xe(i,r,n,c,a)),o){let i=Zt(r,o,"get");t[i]=(c,a)=>(A(r,n,i,{isShorthandSelector:!0,alternativeFunctionName:"getEntityRecords"}),Xo(c,r,n,a))}return t},{}),d_=zc.reduce((t,e)=>{let{kind:r,name:n,plural:o}=e,s=Zt(r,n);if(t[s]=(i,c)=>(A(r,n,s,{isShorthandSelector:!0,alternativeFunctionName:"getEntityRecord"}),ts(r,n,i,c)),o){let i=Zt(r,o,"get");t[i]=(...c)=>(A(r,o,i,{isShorthandSelector:!0,alternativeFunctionName:"getEntityRecords"}),Un(r,n,...c)),t[i].shouldInvalidate=c=>Un.shouldInvalidate(c,r,n)}return t},{}),f_=zc.reduce((t,e)=>{let{kind:r,name:n}=e,o=Zt(r,n,"save");t[o]=(i,c)=>(A(r,n,o,{isShorthandSelector:!0,alternativeFunctionName:"saveEntityRecord"}),Ic(r,n,i,c));let s=Zt(r,n,"delete");return t[s]=(i,c,a)=>(A(r,n,s,{isShorthandSelector:!0,alternativeFunctionName:"deleteEntityRecord"}),xc(r,n,i,c,a)),t},{}),h_=()=>({reducer:hf,actions:{...Wf,...Ac,...f_,...qf()},selectors:{...Jf,...bc,...u_},resolvers:{...Lc,...d_}}),q=(0,ds.createReduxStore)(x,h_());Se(q).registerPrivateSelectors(yc);Se(q).registerPrivateActions(Dc);(0,ds.register)(q);return Yh(p_);})();
                                                                       dist/customize-widgets.js                                                                           0000644                 00000267112 15212563776 0011562 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;
(wp ||= {}).customizeWidgets = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/block-library
  var require_block_library = __commonJS({
    "package-external:@wordpress/block-library"(exports, module) {
      module.exports = window.wp.blockLibrary;
    }
  });

  // package-external:@wordpress/widgets
  var require_widgets = __commonJS({
    "package-external:@wordpress/widgets"(exports, module) {
      module.exports = window.wp.widgets;
    }
  });

  // package-external:@wordpress/blocks
  var require_blocks = __commonJS({
    "package-external:@wordpress/blocks"(exports, module) {
      module.exports = window.wp.blocks;
    }
  });

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/preferences
  var require_preferences = __commonJS({
    "package-external:@wordpress/preferences"(exports, module) {
      module.exports = window.wp.preferences;
    }
  });

  // package-external:@wordpress/components
  var require_components = __commonJS({
    "package-external:@wordpress/components"(exports, module) {
      module.exports = window.wp.components;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // package-external:@wordpress/block-editor
  var require_block_editor = __commonJS({
    "package-external:@wordpress/block-editor"(exports, module) {
      module.exports = window.wp.blockEditor;
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // package-external:@wordpress/hooks
  var require_hooks = __commonJS({
    "package-external:@wordpress/hooks"(exports, module) {
      module.exports = window.wp.hooks;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // package-external:@wordpress/core-data
  var require_core_data = __commonJS({
    "package-external:@wordpress/core-data"(exports, module) {
      module.exports = window.wp.coreData;
    }
  });

  // package-external:@wordpress/media-utils
  var require_media_utils = __commonJS({
    "package-external:@wordpress/media-utils"(exports, module) {
      module.exports = window.wp.mediaUtils;
    }
  });

  // package-external:@wordpress/keycodes
  var require_keycodes = __commonJS({
    "package-external:@wordpress/keycodes"(exports, module) {
      module.exports = window.wp.keycodes;
    }
  });

  // package-external:@wordpress/primitives
  var require_primitives = __commonJS({
    "package-external:@wordpress/primitives"(exports, module) {
      module.exports = window.wp.primitives;
    }
  });

  // package-external:@wordpress/keyboard-shortcuts
  var require_keyboard_shortcuts = __commonJS({
    "package-external:@wordpress/keyboard-shortcuts"(exports, module) {
      module.exports = window.wp.keyboardShortcuts;
    }
  });

  // node_modules/fast-deep-equal/es6/index.js
  var require_es6 = __commonJS({
    "node_modules/fast-deep-equal/es6/index.js"(exports, module) {
      "use strict";
      module.exports = function equal(a, b) {
        if (a === b) return true;
        if (a && b && typeof a == "object" && typeof b == "object") {
          if (a.constructor !== b.constructor) return false;
          var length, i, keys;
          if (Array.isArray(a)) {
            length = a.length;
            if (length != b.length) return false;
            for (i = length; i-- !== 0; )
              if (!equal(a[i], b[i])) return false;
            return true;
          }
          if (a instanceof Map && b instanceof Map) {
            if (a.size !== b.size) return false;
            for (i of a.entries())
              if (!b.has(i[0])) return false;
            for (i of a.entries())
              if (!equal(i[1], b.get(i[0]))) return false;
            return true;
          }
          if (a instanceof Set && b instanceof Set) {
            if (a.size !== b.size) return false;
            for (i of a.entries())
              if (!b.has(i[0])) return false;
            return true;
          }
          if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
            length = a.length;
            if (length != b.length) return false;
            for (i = length; i-- !== 0; )
              if (a[i] !== b[i]) return false;
            return true;
          }
          if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
          if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
          if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
          keys = Object.keys(a);
          length = keys.length;
          if (length !== Object.keys(b).length) return false;
          for (i = length; i-- !== 0; )
            if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
          for (i = length; i-- !== 0; ) {
            var key = keys[i];
            if (!equal(a[key], b[key])) return false;
          }
          return true;
        }
        return a !== a && b !== b;
      };
    }
  });

  // package-external:@wordpress/is-shallow-equal
  var require_is_shallow_equal = __commonJS({
    "package-external:@wordpress/is-shallow-equal"(exports, module) {
      module.exports = window.wp.isShallowEqual;
    }
  });

  // package-external:@wordpress/private-apis
  var require_private_apis = __commonJS({
    "package-external:@wordpress/private-apis"(exports, module) {
      module.exports = window.wp.privateApis;
    }
  });

  // package-external:@wordpress/dom
  var require_dom = __commonJS({
    "package-external:@wordpress/dom"(exports, module) {
      module.exports = window.wp.dom;
    }
  });

  // packages/customize-widgets/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    initialize: () => initialize,
    store: () => store
  });
  var import_element17 = __toESM(require_element(), 1);
  var import_block_library2 = __toESM(require_block_library(), 1);
  var import_widgets5 = __toESM(require_widgets(), 1);
  var import_blocks2 = __toESM(require_blocks(), 1);
  var import_data17 = __toESM(require_data(), 1);
  var import_preferences4 = __toESM(require_preferences(), 1);

  // packages/customize-widgets/build-module/components/customize-widgets/index.mjs
  var import_element16 = __toESM(require_element(), 1);
  var import_components8 = __toESM(require_components(), 1);

  // packages/customize-widgets/build-module/components/error-boundary/index.mjs
  var import_element = __toESM(require_element(), 1);
  var import_i18n = __toESM(require_i18n(), 1);
  var import_components = __toESM(require_components(), 1);
  var import_block_editor = __toESM(require_block_editor(), 1);
  var import_compose = __toESM(require_compose(), 1);
  var import_hooks = __toESM(require_hooks(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  function CopyButton({ text, children }) {
    const ref = (0, import_compose.useCopyToClipboard)(text);
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.Button, { size: "compact", variant: "secondary", ref, children });
  }
  var ErrorBoundary = class extends import_element.Component {
    constructor() {
      super(...arguments);
      this.state = {
        error: null
      };
    }
    componentDidCatch(error) {
      this.setState({ error });
      (0, import_hooks.doAction)("editor.ErrorBoundary.errorLogged", error);
    }
    render() {
      const { error } = this.state;
      if (!error) {
        return this.props.children;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
        import_block_editor.Warning,
        {
          className: "customize-widgets-error-boundary",
          actions: [
            /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CopyButton, { text: error.stack, children: (0, import_i18n.__)("Copy Error") }, "copy-error")
          ],
          children: (0, import_i18n.__)("The editor has encountered an unexpected error.")
        }
      );
    }
  };

  // packages/customize-widgets/build-module/components/sidebar-block-editor/index.mjs
  var import_compose3 = __toESM(require_compose(), 1);
  var import_core_data = __toESM(require_core_data(), 1);
  var import_data12 = __toESM(require_data(), 1);
  var import_element13 = __toESM(require_element(), 1);
  var import_block_editor8 = __toESM(require_block_editor(), 1);
  var import_media_utils = __toESM(require_media_utils(), 1);
  var import_preferences3 = __toESM(require_preferences(), 1);
  var import_block_library = __toESM(require_block_library(), 1);

  // packages/customize-widgets/build-module/components/block-inspector-button/index.mjs
  var import_element2 = __toESM(require_element(), 1);
  var import_i18n2 = __toESM(require_i18n(), 1);
  var import_components2 = __toESM(require_components(), 1);
  var import_data = __toESM(require_data(), 1);
  var import_block_editor2 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  function BlockInspectorButton({ inspector, closeMenu, ...props }) {
    const selectedBlockClientId = (0, import_data.useSelect)(
      (select) => select(import_block_editor2.store).getSelectedBlockClientId(),
      []
    );
    const selectedBlock = (0, import_element2.useMemo)(
      () => document.getElementById(`block-${selectedBlockClientId}`),
      [selectedBlockClientId]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
      import_components2.MenuItem,
      {
        onClick: () => {
          inspector.open({
            returnFocusWhenClose: selectedBlock
          });
          closeMenu();
        },
        ...props,
        children: (0, import_i18n2.__)("Show more settings")
      }
    );
  }
  var block_inspector_button_default = BlockInspectorButton;

  // node_modules/clsx/dist/clsx.mjs
  function 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 = 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 = r(e)) && (n && (n += " "), n += t);
    return n;
  }
  var clsx_default = clsx;

  // packages/customize-widgets/build-module/components/header/index.mjs
  var import_components6 = __toESM(require_components(), 1);
  var import_block_editor4 = __toESM(require_block_editor(), 1);
  var import_element6 = __toESM(require_element(), 1);
  var import_keycodes3 = __toESM(require_keycodes(), 1);
  var import_i18n7 = __toESM(require_i18n(), 1);

  // packages/icons/build-module/library/close-small.mjs
  var import_primitives = __toESM(require_primitives(), 1);
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
  var close_small_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives.Path, { 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" }) });

  // packages/icons/build-module/library/external.mjs
  var import_primitives2 = __toESM(require_primitives(), 1);
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
  var external_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives2.Path, { 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" }) });

  // packages/icons/build-module/library/more-vertical.mjs
  var import_primitives3 = __toESM(require_primitives(), 1);
  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
  var more_vertical_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives3.Path, { d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" }) });

  // packages/icons/build-module/library/plus.mjs
  var import_primitives4 = __toESM(require_primitives(), 1);
  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
  var plus_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives4.Path, { d: "M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z" }) });

  // packages/icons/build-module/library/redo.mjs
  var import_primitives5 = __toESM(require_primitives(), 1);
  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
  var redo_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives5.Path, { 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" }) });

  // packages/icons/build-module/library/undo.mjs
  var import_primitives6 = __toESM(require_primitives(), 1);
  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
  var undo_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives6.Path, { 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" }) });

  // packages/customize-widgets/build-module/components/inserter/index.mjs
  var import_i18n3 = __toESM(require_i18n(), 1);
  var import_block_editor3 = __toESM(require_block_editor(), 1);
  var import_components3 = __toESM(require_components(), 1);
  var import_compose2 = __toESM(require_compose(), 1);
  var import_data4 = __toESM(require_data(), 1);

  // packages/customize-widgets/build-module/store/index.mjs
  var import_data3 = __toESM(require_data(), 1);

  // packages/customize-widgets/build-module/store/reducer.mjs
  var import_data2 = __toESM(require_data(), 1);
  function blockInserterPanel(state = false, action) {
    switch (action.type) {
      case "SET_IS_INSERTER_OPENED":
        return action.value;
    }
    return state;
  }
  var reducer_default = (0, import_data2.combineReducers)({
    blockInserterPanel
  });

  // packages/customize-widgets/build-module/store/selectors.mjs
  var selectors_exports = {};
  __export(selectors_exports, {
    __experimentalGetInsertionPoint: () => __experimentalGetInsertionPoint,
    isInserterOpened: () => isInserterOpened
  });
  var EMPTY_INSERTION_POINT = {
    rootClientId: void 0,
    insertionIndex: void 0
  };
  function isInserterOpened(state) {
    return !!state.blockInserterPanel;
  }
  function __experimentalGetInsertionPoint(state) {
    if (typeof state.blockInserterPanel === "boolean") {
      return EMPTY_INSERTION_POINT;
    }
    return state.blockInserterPanel;
  }

  // packages/customize-widgets/build-module/store/actions.mjs
  var actions_exports = {};
  __export(actions_exports, {
    setIsInserterOpened: () => setIsInserterOpened
  });
  function setIsInserterOpened(value) {
    return {
      type: "SET_IS_INSERTER_OPENED",
      value
    };
  }

  // packages/customize-widgets/build-module/store/constants.mjs
  var STORE_NAME = "core/customize-widgets";

  // packages/customize-widgets/build-module/store/index.mjs
  var storeConfig = {
    reducer: reducer_default,
    selectors: selectors_exports,
    actions: actions_exports
  };
  var store = (0, import_data3.createReduxStore)(STORE_NAME, storeConfig);
  (0, import_data3.register)(store);

  // packages/customize-widgets/build-module/components/inserter/index.mjs
  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
  function Inserter({ setIsOpened }) {
    const inserterTitleId = (0, import_compose2.useInstanceId)(
      Inserter,
      "customize-widget-layout__inserter-panel-title"
    );
    const insertionPoint = (0, import_data4.useSelect)(
      (select) => select(store).__experimentalGetInsertionPoint(),
      []
    );
    return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
      "div",
      {
        className: "customize-widgets-layout__inserter-panel",
        "aria-labelledby": inserterTitleId,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "customize-widgets-layout__inserter-panel-header", children: [
            /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
              "h2",
              {
                id: inserterTitleId,
                className: "customize-widgets-layout__inserter-panel-header-title",
                children: (0, import_i18n3.__)("Add a block")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
              import_components3.Button,
              {
                size: "small",
                icon: close_small_default,
                onClick: () => setIsOpened(false),
                "aria-label": (0, import_i18n3.__)("Close inserter")
              }
            )
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "customize-widgets-layout__inserter-panel-content", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
            import_block_editor3.__experimentalLibrary,
            {
              rootClientId: insertionPoint.rootClientId,
              __experimentalInsertionIndex: insertionPoint.insertionIndex,
              showInserterHelpPanel: true,
              onSelect: () => setIsOpened(false)
            }
          ) })
        ]
      }
    );
  }
  var inserter_default = Inserter;

  // packages/customize-widgets/build-module/components/more-menu/index.mjs
  var import_components5 = __toESM(require_components(), 1);
  var import_element5 = __toESM(require_element(), 1);
  var import_i18n6 = __toESM(require_i18n(), 1);
  var import_keycodes2 = __toESM(require_keycodes(), 1);
  var import_keyboard_shortcuts3 = __toESM(require_keyboard_shortcuts(), 1);
  var import_preferences = __toESM(require_preferences(), 1);

  // packages/customize-widgets/build-module/components/keyboard-shortcut-help-modal/index.mjs
  var import_components4 = __toESM(require_components(), 1);
  var import_i18n5 = __toESM(require_i18n(), 1);
  var import_keyboard_shortcuts2 = __toESM(require_keyboard_shortcuts(), 1);
  var import_data6 = __toESM(require_data(), 1);
  var import_element4 = __toESM(require_element(), 1);

  // packages/customize-widgets/build-module/components/keyboard-shortcut-help-modal/config.mjs
  var import_i18n4 = __toESM(require_i18n(), 1);
  var textFormattingShortcuts = [
    {
      keyCombination: { modifier: "primary", character: "b" },
      description: (0, import_i18n4.__)("Make the selected text bold.")
    },
    {
      keyCombination: { modifier: "primary", character: "i" },
      description: (0, import_i18n4.__)("Make the selected text italic.")
    },
    {
      keyCombination: { modifier: "primary", character: "k" },
      description: (0, import_i18n4.__)("Convert the selected text into a link.")
    },
    {
      keyCombination: { modifier: "primaryShift", character: "k" },
      description: (0, import_i18n4.__)("Remove a link.")
    },
    {
      keyCombination: { character: "[[" },
      description: (0, import_i18n4.__)("Insert a link to a post or page.")
    },
    {
      keyCombination: { modifier: "primary", character: "u" },
      description: (0, import_i18n4.__)("Underline the selected text.")
    },
    {
      keyCombination: { modifier: "access", character: "d" },
      description: (0, import_i18n4.__)("Strikethrough the selected text.")
    },
    {
      keyCombination: { modifier: "access", character: "x" },
      description: (0, import_i18n4.__)("Make the selected text inline code.")
    },
    {
      keyCombination: {
        modifier: "access",
        character: "0"
      },
      aliases: [
        {
          modifier: "access",
          character: "7"
        }
      ],
      description: (0, import_i18n4.__)("Convert the current heading to a paragraph.")
    },
    {
      keyCombination: { modifier: "access", character: "1-6" },
      description: (0, import_i18n4.__)(
        "Convert the current paragraph or heading to a heading of level 1 to 6."
      )
    },
    {
      keyCombination: { modifier: "primaryShift", character: "SPACE" },
      description: (0, import_i18n4.__)("Add non breaking space.")
    }
  ];

  // packages/customize-widgets/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs
  var import_element3 = __toESM(require_element(), 1);
  var import_keycodes = __toESM(require_keycodes(), 1);
  var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
  function KeyCombination({ keyCombination, forceAriaLabel }) {
    const shortcut = keyCombination.modifier ? import_keycodes.displayShortcutList[keyCombination.modifier](
      keyCombination.character
    ) : keyCombination.character;
    const ariaLabel = keyCombination.modifier ? import_keycodes.shortcutAriaLabel[keyCombination.modifier](
      keyCombination.character
    ) : keyCombination.character;
    return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
      "kbd",
      {
        className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-key-combination",
        "aria-label": forceAriaLabel || ariaLabel,
        children: (Array.isArray(shortcut) ? shortcut : [shortcut]).map(
          (character, index) => {
            if (character === "+") {
              return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_element3.Fragment, { children: character }, index);
            }
            return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
              "kbd",
              {
                className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-key",
                children: character
              },
              index
            );
          }
        )
      }
    );
  }
  function Shortcut({ description, keyCombination, aliases = [], ariaLabel }) {
    return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-description", children: description }),
      /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-term", children: [
        /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
          KeyCombination,
          {
            keyCombination,
            forceAriaLabel: ariaLabel
          }
        ),
        aliases.map((alias, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
          KeyCombination,
          {
            keyCombination: alias,
            forceAriaLabel: ariaLabel
          },
          index
        ))
      ] })
    ] });
  }
  var shortcut_default = Shortcut;

  // packages/customize-widgets/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.mjs
  var import_data5 = __toESM(require_data(), 1);
  var import_keyboard_shortcuts = __toESM(require_keyboard_shortcuts(), 1);
  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
  function DynamicShortcut({ name }) {
    const { keyCombination, description, aliases } = (0, import_data5.useSelect)(
      (select) => {
        const {
          getShortcutKeyCombination,
          getShortcutDescription,
          getShortcutAliases
        } = select(import_keyboard_shortcuts.store);
        return {
          keyCombination: getShortcutKeyCombination(name),
          aliases: getShortcutAliases(name),
          description: getShortcutDescription(name)
        };
      },
      [name]
    );
    if (!keyCombination) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
      shortcut_default,
      {
        keyCombination,
        description,
        aliases
      }
    );
  }
  var dynamic_shortcut_default = DynamicShortcut;

  // packages/customize-widgets/build-module/components/keyboard-shortcut-help-modal/index.mjs
  var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
  var ShortcutList = ({ shortcuts }) => (
    /*
     * Disable reason: The `list` ARIA role is redundant but
     * Safari+VoiceOver won't announce the list otherwise.
     */
    /* eslint-disable jsx-a11y/no-redundant-roles */
    /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
      "ul",
      {
        className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-list",
        role: "list",
        children: shortcuts.map((shortcut, index) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
          "li",
          {
            className: "customize-widgets-keyboard-shortcut-help-modal__shortcut",
            children: typeof shortcut === "string" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(dynamic_shortcut_default, { name: shortcut }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(shortcut_default, { ...shortcut })
          },
          index
        ))
      }
    )
  );
  var ShortcutSection = ({ title, shortcuts, className }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
    "section",
    {
      className: clsx_default(
        "customize-widgets-keyboard-shortcut-help-modal__section",
        className
      ),
      children: [
        !!title && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h2", { className: "customize-widgets-keyboard-shortcut-help-modal__section-title", children: title }),
        /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ShortcutList, { shortcuts })
      ]
    }
  );
  var ShortcutCategorySection = ({
    title,
    categoryName,
    additionalShortcuts = []
  }) => {
    const categoryShortcuts = (0, import_data6.useSelect)(
      (select) => {
        return select(import_keyboard_shortcuts2.store).getCategoryShortcuts(
          categoryName
        );
      },
      [categoryName]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
      ShortcutSection,
      {
        title,
        shortcuts: categoryShortcuts.concat(additionalShortcuts)
      }
    );
  };
  function KeyboardShortcutHelpModal({
    isModalActive,
    toggleModal
  }) {
    const { registerShortcut } = (0, import_data6.useDispatch)(import_keyboard_shortcuts2.store);
    (0, import_element4.useEffect)(() => {
      registerShortcut({
        name: "core/customize-widgets/keyboard-shortcuts",
        category: "main",
        description: (0, import_i18n5.__)("Display these keyboard shortcuts."),
        keyCombination: {
          modifier: "access",
          character: "h"
        }
      });
    }, [registerShortcut]);
    (0, import_keyboard_shortcuts2.useShortcut)("core/customize-widgets/keyboard-shortcuts", toggleModal);
    if (!isModalActive) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
      import_components4.Modal,
      {
        className: "customize-widgets-keyboard-shortcut-help-modal",
        title: (0, import_i18n5.__)("Keyboard shortcuts"),
        onRequestClose: toggleModal,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
            ShortcutSection,
            {
              className: "customize-widgets-keyboard-shortcut-help-modal__main-shortcuts",
              shortcuts: ["core/customize-widgets/keyboard-shortcuts"]
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
            ShortcutCategorySection,
            {
              title: (0, import_i18n5.__)("Global shortcuts"),
              categoryName: "global"
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
            ShortcutCategorySection,
            {
              title: (0, import_i18n5.__)("Selection shortcuts"),
              categoryName: "selection"
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
            ShortcutCategorySection,
            {
              title: (0, import_i18n5.__)("Block shortcuts"),
              categoryName: "block",
              additionalShortcuts: [
                {
                  keyCombination: { character: "/" },
                  description: (0, import_i18n5.__)(
                    "Change the block type after adding a new paragraph."
                  ),
                  /* translators: The forward-slash character. e.g. '/'. */
                  ariaLabel: (0, import_i18n5.__)("Forward-slash")
                }
              ]
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
            ShortcutSection,
            {
              title: (0, import_i18n5.__)("Text formatting"),
              shortcuts: textFormattingShortcuts
            }
          )
        ]
      }
    );
  }

  // packages/customize-widgets/build-module/components/more-menu/index.mjs
  var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
  function MoreMenu() {
    const [
      isKeyboardShortcutsModalActive,
      setIsKeyboardShortcutsModalVisible
    ] = (0, import_element5.useState)(false);
    const toggleKeyboardShortcutsModal = () => setIsKeyboardShortcutsModalVisible(!isKeyboardShortcutsModalActive);
    (0, import_keyboard_shortcuts3.useShortcut)(
      "core/customize-widgets/keyboard-shortcuts",
      toggleKeyboardShortcutsModal
    );
    return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
        import_components5.ToolbarDropdownMenu,
        {
          icon: more_vertical_default,
          label: (0, import_i18n6.__)("Options"),
          popoverProps: {
            placement: "bottom-end",
            className: "more-menu-dropdown__content"
          },
          toggleProps: {
            tooltipPosition: "bottom",
            size: "compact"
          },
          children: () => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_components5.MenuGroup, { label: (0, import_i18n6._x)("View", "noun"), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
              import_preferences.PreferenceToggleMenuItem,
              {
                scope: "core/customize-widgets",
                name: "fixedToolbar",
                label: (0, import_i18n6.__)("Top toolbar"),
                info: (0, import_i18n6.__)(
                  "Access all block and document tools in a single place"
                ),
                messageActivated: (0, import_i18n6.__)(
                  "Top toolbar activated"
                ),
                messageDeactivated: (0, import_i18n6.__)(
                  "Top toolbar deactivated"
                )
              }
            ) }),
            /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_components5.MenuGroup, { label: (0, import_i18n6.__)("Tools"), children: [
              /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
                import_components5.MenuItem,
                {
                  onClick: () => {
                    setIsKeyboardShortcutsModalVisible(true);
                  },
                  shortcut: import_keycodes2.displayShortcut.access("h"),
                  children: (0, import_i18n6.__)("Keyboard shortcuts")
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
                import_preferences.PreferenceToggleMenuItem,
                {
                  scope: "core/customize-widgets",
                  name: "welcomeGuide",
                  label: (0, import_i18n6.__)("Welcome Guide")
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
                import_components5.MenuItem,
                {
                  role: "menuitem",
                  icon: external_default,
                  href: (0, import_i18n6.__)(
                    "https://wordpress.org/documentation/article/block-based-widgets-editor/"
                  ),
                  target: "_blank",
                  rel: "noopener noreferrer",
                  children: [
                    (0, import_i18n6.__)("Help"),
                    /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_components5.VisuallyHidden, {
                      as: "span",
                      /* translators: accessibility text */
                      children: (0, import_i18n6.__)("(opens in a new tab)")
                    })
                  ]
                }
              )
            ] }),
            /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_components5.MenuGroup, { label: (0, import_i18n6.__)("Preferences"), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
              import_preferences.PreferenceToggleMenuItem,
              {
                scope: "core/customize-widgets",
                name: "keepCaretInsideBlock",
                label: (0, import_i18n6.__)(
                  "Contain text cursor inside block"
                ),
                info: (0, import_i18n6.__)(
                  "Aids screen readers by stopping text caret from leaving blocks."
                ),
                messageActivated: (0, import_i18n6.__)(
                  "Contain text cursor inside block activated"
                ),
                messageDeactivated: (0, import_i18n6.__)(
                  "Contain text cursor inside block deactivated"
                )
              }
            ) })
          ] })
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
        KeyboardShortcutHelpModal,
        {
          isModalActive: isKeyboardShortcutsModalActive,
          toggleModal: toggleKeyboardShortcutsModal
        }
      )
    ] });
  }

  // packages/customize-widgets/build-module/components/header/index.mjs
  var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
  function Header({
    sidebar,
    inserter,
    isInserterOpened: isInserterOpened2,
    setIsInserterOpened: setIsInserterOpened2,
    isFixedToolbarActive
  }) {
    const [[hasUndo, hasRedo], setUndoRedo] = (0, import_element6.useState)([
      sidebar.hasUndo(),
      sidebar.hasRedo()
    ]);
    const shortcut = (0, import_keycodes3.isAppleOS)() ? import_keycodes3.displayShortcut.primaryShift("z") : import_keycodes3.displayShortcut.primary("y");
    (0, import_element6.useEffect)(() => {
      return sidebar.subscribeHistory(() => {
        setUndoRedo([sidebar.hasUndo(), sidebar.hasRedo()]);
      });
    }, [sidebar]);
    return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
        "div",
        {
          className: clsx_default("customize-widgets-header", {
            "is-fixed-toolbar-active": isFixedToolbarActive
          }),
          children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
            import_block_editor4.NavigableToolbar,
            {
              className: "customize-widgets-header-toolbar",
              "aria-label": (0, import_i18n7.__)("Document tools"),
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
                  import_components6.ToolbarButton,
                  {
                    icon: !(0, import_i18n7.isRTL)() ? undo_default : redo_default,
                    label: (0, import_i18n7.__)("Undo"),
                    shortcut: import_keycodes3.displayShortcut.primary("z"),
                    disabled: !hasUndo,
                    onClick: sidebar.undo,
                    className: "customize-widgets-editor-history-button undo-button"
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
                  import_components6.ToolbarButton,
                  {
                    icon: !(0, import_i18n7.isRTL)() ? redo_default : undo_default,
                    label: (0, import_i18n7.__)("Redo"),
                    shortcut,
                    disabled: !hasRedo,
                    onClick: sidebar.redo,
                    className: "customize-widgets-editor-history-button redo-button"
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
                  import_components6.ToolbarButton,
                  {
                    className: "customize-widgets-header-toolbar__inserter-toggle",
                    isPressed: isInserterOpened2,
                    variant: "primary",
                    icon: plus_default,
                    label: (0, import_i18n7._x)(
                      "Add block",
                      "Generic label for block inserter button"
                    ),
                    onClick: () => {
                      setIsInserterOpened2((isOpen) => !isOpen);
                    }
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MoreMenu, {})
              ]
            }
          )
        }
      ),
      (0, import_element6.createPortal)(
        /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(inserter_default, { setIsOpened: setIsInserterOpened2 }),
        inserter.contentContainer[0]
      )
    ] });
  }
  var header_default = Header;

  // packages/customize-widgets/build-module/components/inserter/use-inserter.mjs
  var import_element7 = __toESM(require_element(), 1);
  var import_data7 = __toESM(require_data(), 1);
  function useInserter(inserter) {
    const isInserterOpened2 = (0, import_data7.useSelect)(
      (select) => select(store).isInserterOpened(),
      []
    );
    const { setIsInserterOpened: setIsInserterOpened2 } = (0, import_data7.useDispatch)(store);
    (0, import_element7.useEffect)(() => {
      if (isInserterOpened2) {
        inserter.open();
      } else {
        inserter.close();
      }
    }, [inserter, isInserterOpened2]);
    return [
      isInserterOpened2,
      (0, import_element7.useCallback)(
        (updater) => {
          let isOpen = updater;
          if (typeof updater === "function") {
            isOpen = updater(
              (0, import_data7.select)(store).isInserterOpened()
            );
          }
          setIsInserterOpened2(isOpen);
        },
        [setIsInserterOpened2]
      )
    ];
  }

  // packages/customize-widgets/build-module/components/sidebar-block-editor/sidebar-editor-provider.mjs
  var import_block_editor6 = __toESM(require_block_editor(), 1);

  // packages/customize-widgets/build-module/components/sidebar-block-editor/use-sidebar-block-editor.mjs
  var import_es6 = __toESM(require_es6(), 1);
  var import_element8 = __toESM(require_element(), 1);
  var import_is_shallow_equal = __toESM(require_is_shallow_equal(), 1);
  var import_widgets2 = __toESM(require_widgets(), 1);

  // packages/customize-widgets/build-module/utils.mjs
  var import_blocks = __toESM(require_blocks(), 1);
  var import_widgets = __toESM(require_widgets(), 1);
  function settingIdToWidgetId(settingId) {
    const matches = settingId.match(/^widget_(.+)(?:\[(\d+)\])$/);
    if (matches) {
      const idBase = matches[1];
      const number = parseInt(matches[2], 10);
      return `${idBase}-${number}`;
    }
    return settingId;
  }
  function blockToWidget(block, existingWidget = null) {
    let widget;
    const isValidLegacyWidgetBlock = block.name === "core/legacy-widget" && (block.attributes.id || block.attributes.instance);
    if (isValidLegacyWidgetBlock) {
      if (block.attributes.id) {
        widget = {
          id: block.attributes.id
        };
      } else {
        const { encoded, hash, raw, ...rest } = block.attributes.instance;
        widget = {
          idBase: block.attributes.idBase,
          instance: {
            ...existingWidget?.instance,
            // Required only for the customizer.
            is_widget_customizer_js_value: true,
            encoded_serialized_instance: encoded,
            instance_hash_key: hash,
            raw_instance: raw,
            ...rest
          }
        };
      }
    } else {
      const instance = {
        content: (0, import_blocks.serialize)(block)
      };
      widget = {
        idBase: "block",
        widgetClass: "WP_Widget_Block",
        instance: {
          raw_instance: instance
        }
      };
    }
    const { form, rendered, ...restExistingWidget } = existingWidget || {};
    return {
      ...restExistingWidget,
      ...widget
    };
  }
  function widgetToBlock({ id, idBase, number, instance }) {
    let block;
    const {
      encoded_serialized_instance: encoded,
      instance_hash_key: hash,
      raw_instance: raw,
      ...rest
    } = instance;
    if (idBase === "block") {
      const parsedBlocks = (0, import_blocks.parse)(raw.content ?? "", {
        __unstableSkipAutop: true
      });
      block = parsedBlocks.length ? parsedBlocks[0] : (0, import_blocks.createBlock)("core/paragraph", {});
    } else if (number) {
      block = (0, import_blocks.createBlock)("core/legacy-widget", {
        idBase,
        instance: {
          encoded,
          hash,
          raw,
          ...rest
        }
      });
    } else {
      block = (0, import_blocks.createBlock)("core/legacy-widget", {
        id
      });
    }
    return (0, import_widgets.addWidgetIdToBlock)(block, id);
  }

  // packages/customize-widgets/build-module/components/sidebar-block-editor/use-sidebar-block-editor.mjs
  function widgetsToBlocks(widgets) {
    return widgets.map((widget) => widgetToBlock(widget));
  }
  function useSidebarBlockEditor(sidebar) {
    const [blocks, setBlocks] = (0, import_element8.useState)(
      () => widgetsToBlocks(sidebar.getWidgets())
    );
    (0, import_element8.useEffect)(() => {
      return sidebar.subscribe((prevWidgets, nextWidgets) => {
        setBlocks((prevBlocks) => {
          const prevWidgetsMap = new Map(
            prevWidgets.map((widget) => [widget.id, widget])
          );
          const prevBlocksMap = new Map(
            prevBlocks.map((block) => [
              (0, import_widgets2.getWidgetIdFromBlock)(block),
              block
            ])
          );
          const nextBlocks = nextWidgets.map((nextWidget) => {
            const prevWidget = prevWidgetsMap.get(nextWidget.id);
            if (prevWidget && prevWidget === nextWidget) {
              return prevBlocksMap.get(nextWidget.id);
            }
            return widgetToBlock(nextWidget);
          });
          if ((0, import_is_shallow_equal.isShallowEqual)(prevBlocks, nextBlocks)) {
            return prevBlocks;
          }
          return nextBlocks;
        });
      });
    }, [sidebar]);
    const onChangeBlocks = (0, import_element8.useCallback)(
      (nextBlocks) => {
        setBlocks((prevBlocks) => {
          if ((0, import_is_shallow_equal.isShallowEqual)(prevBlocks, nextBlocks)) {
            return prevBlocks;
          }
          const prevBlocksMap = new Map(
            prevBlocks.map((block) => [
              (0, import_widgets2.getWidgetIdFromBlock)(block),
              block
            ])
          );
          const nextWidgets = nextBlocks.map((nextBlock) => {
            const widgetId = (0, import_widgets2.getWidgetIdFromBlock)(nextBlock);
            if (widgetId && prevBlocksMap.has(widgetId)) {
              const prevBlock = prevBlocksMap.get(widgetId);
              const prevWidget = sidebar.getWidget(widgetId);
              if ((0, import_es6.default)(nextBlock, prevBlock) && prevWidget) {
                return prevWidget;
              }
              return blockToWidget(nextBlock, prevWidget);
            }
            return blockToWidget(nextBlock);
          });
          if ((0, import_is_shallow_equal.isShallowEqual)(sidebar.getWidgets(), nextWidgets)) {
            return prevBlocks;
          }
          const addedWidgetIds = sidebar.setWidgets(nextWidgets);
          return nextBlocks.reduce(
            (updatedNextBlocks, nextBlock, index) => {
              const addedWidgetId = addedWidgetIds[index];
              if (addedWidgetId !== null) {
                if (updatedNextBlocks === nextBlocks) {
                  updatedNextBlocks = nextBlocks.slice();
                }
                updatedNextBlocks[index] = (0, import_widgets2.addWidgetIdToBlock)(
                  nextBlock,
                  addedWidgetId
                );
              }
              return updatedNextBlocks;
            },
            nextBlocks
          );
        });
      },
      [sidebar]
    );
    return [blocks, onChangeBlocks, onChangeBlocks];
  }

  // packages/customize-widgets/build-module/components/focus-control/use-blocks-focus-control.mjs
  var import_element10 = __toESM(require_element(), 1);
  var import_data8 = __toESM(require_data(), 1);
  var import_block_editor5 = __toESM(require_block_editor(), 1);
  var import_widgets3 = __toESM(require_widgets(), 1);

  // packages/customize-widgets/build-module/components/focus-control/index.mjs
  var import_element9 = __toESM(require_element(), 1);
  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
  var FocusControlContext = (0, import_element9.createContext)();
  FocusControlContext.displayName = "FocusControlContext";
  function FocusControl({ api, sidebarControls, children }) {
    const [focusedWidgetIdRef, setFocusedWidgetIdRef] = (0, import_element9.useState)({
      current: null
    });
    const focusWidget = (0, import_element9.useCallback)(
      (widgetId) => {
        for (const sidebarControl of sidebarControls) {
          const widgets = sidebarControl.setting.get();
          if (widgets.includes(widgetId)) {
            sidebarControl.sectionInstance.expand({
              // Schedule it after the complete callback so that
              // it won't be overridden by the "Back" button focus.
              completeCallback() {
                setFocusedWidgetIdRef({ current: widgetId });
              }
            });
            break;
          }
        }
      },
      [sidebarControls]
    );
    (0, import_element9.useEffect)(() => {
      function handleFocus(settingId) {
        const widgetId = settingIdToWidgetId(settingId);
        focusWidget(widgetId);
      }
      let previewBound = false;
      function handleReady() {
        api.previewer.preview.bind(
          "focus-control-for-setting",
          handleFocus
        );
        previewBound = true;
      }
      api.previewer.bind("ready", handleReady);
      return () => {
        api.previewer.unbind("ready", handleReady);
        if (previewBound) {
          api.previewer.preview.unbind(
            "focus-control-for-setting",
            handleFocus
          );
        }
      };
    }, [api, focusWidget]);
    const context = (0, import_element9.useMemo)(
      () => [focusedWidgetIdRef, focusWidget],
      [focusedWidgetIdRef, focusWidget]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FocusControlContext.Provider, { value: context, children });
  }
  var useFocusControl = () => (0, import_element9.useContext)(FocusControlContext);

  // packages/customize-widgets/build-module/components/focus-control/use-blocks-focus-control.mjs
  function useBlocksFocusControl(blocks) {
    const { selectBlock } = (0, import_data8.useDispatch)(import_block_editor5.store);
    const [focusedWidgetIdRef] = useFocusControl();
    const blocksRef = (0, import_element10.useRef)(blocks);
    (0, import_element10.useEffect)(() => {
      blocksRef.current = blocks;
    }, [blocks]);
    (0, import_element10.useEffect)(() => {
      if (focusedWidgetIdRef.current) {
        const focusedBlock = blocksRef.current.find(
          (block) => (0, import_widgets3.getWidgetIdFromBlock)(block) === focusedWidgetIdRef.current
        );
        if (focusedBlock) {
          selectBlock(focusedBlock.clientId);
          const blockNode = document.querySelector(
            `[data-block="${focusedBlock.clientId}"]`
          );
          blockNode?.focus();
        }
      }
    }, [focusedWidgetIdRef, selectBlock]);
  }

  // packages/customize-widgets/build-module/lock-unlock.mjs
  var import_private_apis = __toESM(require_private_apis(), 1);
  var { lock, unlock } = (0, import_private_apis.__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/customize-widgets"
  );

  // packages/customize-widgets/build-module/components/sidebar-block-editor/sidebar-editor-provider.mjs
  var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
  var { ExperimentalBlockEditorProvider } = unlock(import_block_editor6.privateApis);
  function SidebarEditorProvider({
    sidebar,
    settings,
    children
  }) {
    const [blocks, onInput, onChange] = useSidebarBlockEditor(sidebar);
    useBlocksFocusControl(blocks);
    return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
      ExperimentalBlockEditorProvider,
      {
        value: blocks,
        onInput,
        onChange,
        settings,
        useSubRegistry: false,
        children
      }
    );
  }

  // packages/customize-widgets/build-module/components/welcome-guide/index.mjs
  var import_i18n8 = __toESM(require_i18n(), 1);
  var import_components7 = __toESM(require_components(), 1);
  var import_data9 = __toESM(require_data(), 1);
  var import_preferences2 = __toESM(require_preferences(), 1);
  var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
  function WelcomeGuide({ sidebar }) {
    const { toggle } = (0, import_data9.useDispatch)(import_preferences2.store);
    const isEntirelyBlockWidgets = sidebar.getWidgets().every((widget) => widget.id.startsWith("block-"));
    return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "customize-widgets-welcome-guide", children: [
      /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "customize-widgets-welcome-guide__image__wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("picture", { children: [
        /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
          "source",
          {
            srcSet: "https://s.w.org/images/block-editor/welcome-editor.svg",
            media: "(prefers-reduced-motion: reduce)"
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
          "img",
          {
            className: "customize-widgets-welcome-guide__image",
            src: "https://s.w.org/images/block-editor/welcome-editor.gif",
            width: "312",
            height: "240",
            alt: ""
          }
        )
      ] }) }),
      /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h1", { className: "customize-widgets-welcome-guide__heading", children: (0, import_i18n8.__)("Welcome to block Widgets") }),
      /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "customize-widgets-welcome-guide__text", children: isEntirelyBlockWidgets ? (0, import_i18n8.__)(
        "Your theme provides different \u201Cblock\u201D areas for you to add and edit content.\xA0Try adding a search bar, social icons, or other types of blocks here and see how they\u2019ll look on your site."
      ) : (0, import_i18n8.__)(
        "You can now add any block to your site\u2019s widget areas. Don\u2019t worry, all of your favorite widgets still work flawlessly."
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
        import_components7.Button,
        {
          size: "compact",
          variant: "primary",
          onClick: () => toggle("core/customize-widgets", "welcomeGuide"),
          children: (0, import_i18n8.__)("Got it")
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("hr", { className: "customize-widgets-welcome-guide__separator" }),
      !isEntirelyBlockWidgets && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { className: "customize-widgets-welcome-guide__more-info", children: [
        (0, import_i18n8.__)("Want to stick with the old widgets?"),
        /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("br", {}),
        /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
          import_components7.ExternalLink,
          {
            href: (0, import_i18n8.__)(
              "https://wordpress.org/plugins/classic-widgets/"
            ),
            children: (0, import_i18n8.__)("Get the Classic Widgets plugin.")
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { className: "customize-widgets-welcome-guide__more-info", children: [
        (0, import_i18n8.__)("New to the block editor?"),
        /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("br", {}),
        /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
          import_components7.ExternalLink,
          {
            href: (0, import_i18n8.__)(
              "https://wordpress.org/documentation/article/wordpress-block-editor/"
            ),
            children: (0, import_i18n8.__)("Here's a detailed guide.")
          }
        )
      ] })
    ] });
  }

  // packages/customize-widgets/build-module/components/keyboard-shortcuts/index.mjs
  var import_element11 = __toESM(require_element(), 1);
  var import_keyboard_shortcuts4 = __toESM(require_keyboard_shortcuts(), 1);
  var import_keycodes4 = __toESM(require_keycodes(), 1);
  var import_data10 = __toESM(require_data(), 1);
  var import_i18n9 = __toESM(require_i18n(), 1);
  function KeyboardShortcuts({ undo, redo, save }) {
    (0, import_keyboard_shortcuts4.useShortcut)("core/customize-widgets/undo", (event) => {
      undo();
      event.preventDefault();
    });
    (0, import_keyboard_shortcuts4.useShortcut)("core/customize-widgets/redo", (event) => {
      redo();
      event.preventDefault();
    });
    (0, import_keyboard_shortcuts4.useShortcut)("core/customize-widgets/save", (event) => {
      event.preventDefault();
      save();
    });
    return null;
  }
  function KeyboardShortcutsRegister() {
    const { registerShortcut, unregisterShortcut } = (0, import_data10.useDispatch)(
      import_keyboard_shortcuts4.store
    );
    (0, import_element11.useEffect)(() => {
      registerShortcut({
        name: "core/customize-widgets/undo",
        category: "global",
        description: (0, import_i18n9.__)("Undo your last changes."),
        keyCombination: {
          modifier: "primary",
          character: "z"
        }
      });
      registerShortcut({
        name: "core/customize-widgets/redo",
        category: "global",
        description: (0, import_i18n9.__)("Redo your last undo."),
        keyCombination: {
          modifier: "primaryShift",
          character: "z"
        },
        // Disable on Apple OS because it conflicts with the browser's
        // history shortcut. It's a fine alias for both Windows and Linux.
        // Since there's no conflict for Ctrl+Shift+Z on both Windows and
        // Linux, we keep it as the default for consistency.
        aliases: (0, import_keycodes4.isAppleOS)() ? [] : [
          {
            modifier: "primary",
            character: "y"
          }
        ]
      });
      registerShortcut({
        name: "core/customize-widgets/save",
        category: "global",
        description: (0, import_i18n9.__)("Save your changes."),
        keyCombination: {
          modifier: "primary",
          character: "s"
        }
      });
      return () => {
        unregisterShortcut("core/customize-widgets/undo");
        unregisterShortcut("core/customize-widgets/redo");
        unregisterShortcut("core/customize-widgets/save");
      };
    }, [registerShortcut]);
    return null;
  }
  KeyboardShortcuts.Register = KeyboardShortcutsRegister;
  var keyboard_shortcuts_default = KeyboardShortcuts;

  // packages/customize-widgets/build-module/components/block-appender/index.mjs
  var import_element12 = __toESM(require_element(), 1);
  var import_block_editor7 = __toESM(require_block_editor(), 1);
  var import_data11 = __toESM(require_data(), 1);
  var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
  function BlockAppender(props) {
    const ref = (0, import_element12.useRef)();
    const isBlocksListEmpty = (0, import_data11.useSelect)(
      (select) => select(import_block_editor7.store).getBlockCount() === 0
    );
    (0, import_element12.useEffect)(() => {
      if (isBlocksListEmpty && ref.current) {
        const { ownerDocument } = ref.current;
        if (!ownerDocument.activeElement || ownerDocument.activeElement === ownerDocument.body) {
          ref.current.focus();
        }
      }
    }, [isBlocksListEmpty]);
    return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_block_editor7.ButtonBlockAppender, { ...props, ref });
  }

  // packages/customize-widgets/build-module/components/sidebar-block-editor/index.mjs
  var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
  var { ExperimentalBlockCanvas: BlockCanvas } = unlock(
    import_block_editor8.privateApis
  );
  var { BlockKeyboardShortcuts } = unlock(import_block_library.privateApis);
  function SidebarBlockEditor({
    blockEditorSettings,
    sidebar,
    inserter,
    inspector
  }) {
    const [isInserterOpened2, setIsInserterOpened2] = useInserter(inserter);
    const isMediumViewport = (0, import_compose3.useViewportMatch)("small");
    const {
      hasUploadPermissions,
      isFixedToolbarActive,
      keepCaretInsideBlock,
      isWelcomeGuideActive
    } = (0, import_data12.useSelect)((select) => {
      const { get } = select(import_preferences3.store);
      return {
        hasUploadPermissions: select(import_core_data.store).canUser("create", {
          kind: "postType",
          name: "attachment"
        }) ?? true,
        isFixedToolbarActive: !!get(
          "core/customize-widgets",
          "fixedToolbar"
        ),
        keepCaretInsideBlock: !!get(
          "core/customize-widgets",
          "keepCaretInsideBlock"
        ),
        isWelcomeGuideActive: !!get(
          "core/customize-widgets",
          "welcomeGuide"
        )
      };
    }, []);
    const settings = (0, import_element13.useMemo)(() => {
      let mediaUploadBlockEditor;
      if (hasUploadPermissions) {
        mediaUploadBlockEditor = ({ onError, ...argumentsObject }) => {
          (0, import_media_utils.uploadMedia)({
            wpAllowedMimeTypes: blockEditorSettings.allowedMimeTypes,
            onError: ({ message }) => onError(message),
            ...argumentsObject
          });
        };
      }
      return {
        ...blockEditorSettings,
        __experimentalSetIsInserterOpened: setIsInserterOpened2,
        mediaUpload: mediaUploadBlockEditor,
        hasFixedToolbar: isFixedToolbarActive || !isMediumViewport,
        keepCaretInsideBlock,
        editorTool: "edit",
        __unstableHasCustomAppender: true
      };
    }, [
      hasUploadPermissions,
      blockEditorSettings,
      isFixedToolbarActive,
      isMediumViewport,
      keepCaretInsideBlock,
      setIsInserterOpened2
    ]);
    if (isWelcomeGuideActive) {
      return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(WelcomeGuide, { sidebar });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(keyboard_shortcuts_default.Register, {}),
      /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(BlockKeyboardShortcuts, {}),
      /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(SidebarEditorProvider, { sidebar, settings, children: [
        /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
          keyboard_shortcuts_default,
          {
            undo: sidebar.undo,
            redo: sidebar.redo,
            save: sidebar.save
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
          header_default,
          {
            sidebar,
            inserter,
            isInserterOpened: isInserterOpened2,
            setIsInserterOpened: setIsInserterOpened2,
            isFixedToolbarActive: isFixedToolbarActive || !isMediumViewport
          }
        ),
        (isFixedToolbarActive || !isMediumViewport) && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_block_editor8.BlockToolbar, { hideDragHandle: true }),
        /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
          BlockCanvas,
          {
            shouldIframe: false,
            styles: settings.defaultEditorStyles,
            height: "100%",
            children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_block_editor8.BlockList, { renderAppender: BlockAppender })
          }
        ),
        (0, import_element13.createPortal)(
          // This is a temporary hack to prevent button component inside <BlockInspector>
          // from submitting form when type="button" is not specified.
          /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("form", { onSubmit: (event) => event.preventDefault(), children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_block_editor8.BlockInspector, {}) }),
          inspector.contentContainer[0]
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_block_editor8.__unstableBlockSettingsMenuFirstItem, { children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
        block_inspector_button_default,
        {
          inspector,
          closeMenu: onClose
        }
      ) })
    ] });
  }

  // packages/customize-widgets/build-module/components/sidebar-controls/index.mjs
  var import_element14 = __toESM(require_element(), 1);
  var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
  var SidebarControlsContext = (0, import_element14.createContext)();
  SidebarControlsContext.displayName = "SidebarControlsContext";
  function SidebarControls({
    sidebarControls,
    activeSidebarControl,
    children
  }) {
    const context = (0, import_element14.useMemo)(
      () => ({
        sidebarControls,
        activeSidebarControl
      }),
      [sidebarControls, activeSidebarControl]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SidebarControlsContext.Provider, { value: context, children });
  }
  function useSidebarControls() {
    const { sidebarControls } = (0, import_element14.useContext)(SidebarControlsContext);
    return sidebarControls;
  }
  function useActiveSidebarControl() {
    const { activeSidebarControl } = (0, import_element14.useContext)(SidebarControlsContext);
    return activeSidebarControl;
  }

  // packages/customize-widgets/build-module/components/customize-widgets/use-clear-selected-block.mjs
  var import_element15 = __toESM(require_element(), 1);
  var import_data13 = __toESM(require_data(), 1);
  var import_block_editor9 = __toESM(require_block_editor(), 1);
  function useClearSelectedBlock(sidebarControl, popoverRef) {
    const { hasSelectedBlock, hasMultiSelection } = (0, import_data13.useSelect)(import_block_editor9.store);
    const { clearSelectedBlock } = (0, import_data13.useDispatch)(import_block_editor9.store);
    (0, import_element15.useEffect)(() => {
      if (popoverRef.current && sidebarControl) {
        let handleClearSelectedBlock = function(element) {
          if (
            // 1. Make sure there are blocks being selected.
            (hasSelectedBlock() || hasMultiSelection()) && // 2. The element should exist in the DOM (not deleted).
            element && ownerDocument.contains(element) && // 3. It should also not exist in the container, the popover, nor the dialog.
            !container.contains(element) && !popoverRef.current.contains(element) && !element.closest('[role="dialog"]') && // 4. The inspector should not be opened.
            !inspector.expanded()
          ) {
            clearSelectedBlock();
          }
        }, handleMouseDown = function(event) {
          handleClearSelectedBlock(event.target);
        }, handleBlur = function() {
          handleClearSelectedBlock(ownerDocument.activeElement);
        };
        const inspector = sidebarControl.inspector;
        const container = sidebarControl.container[0];
        const ownerDocument = container.ownerDocument;
        const ownerWindow = ownerDocument.defaultView;
        ownerDocument.addEventListener("mousedown", handleMouseDown);
        ownerWindow.addEventListener("blur", handleBlur);
        return () => {
          ownerDocument.removeEventListener(
            "mousedown",
            handleMouseDown
          );
          ownerWindow.removeEventListener("blur", handleBlur);
        };
      }
    }, [
      popoverRef,
      sidebarControl,
      hasSelectedBlock,
      hasMultiSelection,
      clearSelectedBlock
    ]);
  }

  // packages/customize-widgets/build-module/components/customize-widgets/index.mjs
  var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
  function CustomizeWidgets({
    api,
    sidebarControls,
    blockEditorSettings
  }) {
    const [activeSidebarControl, setActiveSidebarControl] = (0, import_element16.useState)(null);
    const parentContainer = document.getElementById(
      "customize-theme-controls"
    );
    const popoverRef = (0, import_element16.useRef)();
    useClearSelectedBlock(activeSidebarControl, popoverRef);
    (0, import_element16.useEffect)(() => {
      const unsubscribers = sidebarControls.map(
        (sidebarControl) => sidebarControl.subscribe((expanded) => {
          if (expanded) {
            setActiveSidebarControl(sidebarControl);
          }
        })
      );
      return () => {
        unsubscribers.forEach((unsubscriber) => unsubscriber());
      };
    }, [sidebarControls]);
    const activeSidebar = activeSidebarControl && (0, import_element16.createPortal)(
      /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ErrorBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
        SidebarBlockEditor,
        {
          blockEditorSettings,
          sidebar: activeSidebarControl.sidebarAdapter,
          inserter: activeSidebarControl.inserter,
          inspector: activeSidebarControl.inspector
        },
        activeSidebarControl.id
      ) }),
      activeSidebarControl.container[0]
    );
    const popover = parentContainer && (0, import_element16.createPortal)(
      /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "customize-widgets-popover", ref: popoverRef, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components8.Popover.Slot, {}) }),
      parentContainer
    );
    return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components8.SlotFillProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
      SidebarControls,
      {
        sidebarControls,
        activeSidebarControl,
        children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(FocusControl, { api, sidebarControls, children: [
          activeSidebar,
          popover
        ] })
      }
    ) });
  }

  // packages/customize-widgets/build-module/controls/sidebar-section.mjs
  var import_i18n10 = __toESM(require_i18n(), 1);

  // packages/customize-widgets/build-module/controls/inspector-section.mjs
  function getInspectorSection() {
    const {
      wp: { customize }
    } = window;
    return class InspectorSection extends customize.Section {
      constructor(id, options) {
        super(id, options);
        this.parentSection = options.parentSection;
        this.returnFocusWhenClose = null;
        this._isOpen = false;
      }
      get isOpen() {
        return this._isOpen;
      }
      set isOpen(value) {
        this._isOpen = value;
        this.triggerActiveCallbacks();
      }
      ready() {
        this.contentContainer[0].classList.add(
          "customize-widgets-layout__inspector"
        );
      }
      isContextuallyActive() {
        return this.isOpen;
      }
      onChangeExpanded(expanded, args) {
        super.onChangeExpanded(expanded, args);
        if (this.parentSection && !args.unchanged) {
          if (expanded) {
            this.parentSection.collapse({
              manualTransition: true
            });
          } else {
            this.parentSection.expand({
              manualTransition: true,
              completeCallback: () => {
                if (this.returnFocusWhenClose && !this.contentContainer[0].contains(
                  this.returnFocusWhenClose
                )) {
                  this.returnFocusWhenClose.focus();
                }
              }
            });
          }
        }
      }
      open({ returnFocusWhenClose } = {}) {
        this.isOpen = true;
        this.returnFocusWhenClose = returnFocusWhenClose;
        this.expand({
          allowMultiple: true
        });
      }
      close() {
        this.collapse({
          allowMultiple: true
        });
      }
      collapse(options) {
        this.isOpen = false;
        super.collapse(options);
      }
      triggerActiveCallbacks() {
        this.active.callbacks.fireWith(this.active, [false, true]);
      }
    };
  }

  // packages/customize-widgets/build-module/controls/sidebar-section.mjs
  var getInspectorSectionId = (sidebarId) => `widgets-inspector-${sidebarId}`;
  function getSidebarSection() {
    const {
      wp: { customize }
    } = window;
    const reduceMotionMediaQuery = window.matchMedia(
      "(prefers-reduced-motion: reduce)"
    );
    let isReducedMotion = reduceMotionMediaQuery.matches;
    reduceMotionMediaQuery.addEventListener("change", (event) => {
      isReducedMotion = event.matches;
    });
    return class SidebarSection extends customize.Section {
      ready() {
        const InspectorSection = getInspectorSection();
        this.inspector = new InspectorSection(
          getInspectorSectionId(this.id),
          {
            title: (0, import_i18n10.__)("Block Settings"),
            parentSection: this,
            customizeAction: [
              (0, import_i18n10.__)("Customizing"),
              (0, import_i18n10.__)("Widgets"),
              this.params.title
            ].join(" \u25B8 ")
          }
        );
        customize.section.add(this.inspector);
        this.contentContainer[0].classList.add(
          "customize-widgets__sidebar-section"
        );
      }
      hasSubSectionOpened() {
        return this.inspector.expanded();
      }
      onChangeExpanded(expanded, _args) {
        const controls = this.controls();
        const args = {
          ..._args,
          completeCallback() {
            controls.forEach((control) => {
              control.onChangeSectionExpanded?.(expanded, args);
            });
            _args.completeCallback?.();
          }
        };
        if (args.manualTransition) {
          if (expanded) {
            this.contentContainer.addClass(["busy", "open"]);
            this.contentContainer.removeClass("is-sub-section-open");
            this.contentContainer.closest(".wp-full-overlay").addClass("section-open");
          } else {
            this.contentContainer.addClass([
              "busy",
              "is-sub-section-open"
            ]);
            this.contentContainer.closest(".wp-full-overlay").addClass("section-open");
            this.contentContainer.removeClass("open");
          }
          const handleTransitionEnd = () => {
            this.contentContainer.removeClass("busy");
            args.completeCallback();
          };
          if (isReducedMotion) {
            handleTransitionEnd();
          } else {
            this.contentContainer.one(
              "transitionend",
              handleTransitionEnd
            );
          }
        } else {
          super.onChangeExpanded(expanded, args);
        }
      }
    };
  }

  // packages/customize-widgets/build-module/controls/sidebar-control.mjs
  var import_data15 = __toESM(require_data(), 1);

  // packages/customize-widgets/build-module/components/sidebar-block-editor/sidebar-adapter.mjs
  var { wp } = window;
  function parseWidgetId(widgetId) {
    const matches = widgetId.match(/^(.+)-(\d+)$/);
    if (matches) {
      return {
        idBase: matches[1],
        number: parseInt(matches[2], 10)
      };
    }
    return { idBase: widgetId };
  }
  function widgetIdToSettingId(widgetId) {
    const { idBase, number } = parseWidgetId(widgetId);
    if (number) {
      return `widget_${idBase}[${number}]`;
    }
    return `widget_${idBase}`;
  }
  function debounce(leading, callback, timeout) {
    let isLeading = false;
    let timerID;
    function debounced(...args) {
      const result = (isLeading ? callback : leading).apply(this, args);
      isLeading = true;
      clearTimeout(timerID);
      timerID = setTimeout(() => {
        isLeading = false;
      }, timeout);
      return result;
    }
    debounced.cancel = () => {
      isLeading = false;
      clearTimeout(timerID);
    };
    return debounced;
  }
  var SidebarAdapter = class {
    constructor(setting, api) {
      this.setting = setting;
      this.api = api;
      this.locked = false;
      this.widgetsCache = /* @__PURE__ */ new WeakMap();
      this.subscribers = /* @__PURE__ */ new Set();
      this.history = [
        this._getWidgetIds().map(
          (widgetId) => this.getWidget(widgetId)
        )
      ];
      this.historyIndex = 0;
      this.historySubscribers = /* @__PURE__ */ new Set();
      this._debounceSetHistory = debounce(
        this._pushHistory,
        this._replaceHistory,
        1e3
      );
      this.setting.bind(this._handleSettingChange.bind(this));
      this.api.bind("change", this._handleAllSettingsChange.bind(this));
      this.undo = this.undo.bind(this);
      this.redo = this.redo.bind(this);
      this.save = this.save.bind(this);
    }
    subscribe(callback) {
      this.subscribers.add(callback);
      return () => {
        this.subscribers.delete(callback);
      };
    }
    getWidgets() {
      return this.history[this.historyIndex];
    }
    _emit(...args) {
      for (const callback of this.subscribers) {
        callback(...args);
      }
    }
    _getWidgetIds() {
      return this.setting.get();
    }
    _pushHistory() {
      this.history = [
        ...this.history.slice(0, this.historyIndex + 1),
        this._getWidgetIds().map(
          (widgetId) => this.getWidget(widgetId)
        )
      ];
      this.historyIndex += 1;
      this.historySubscribers.forEach((listener) => listener());
    }
    _replaceHistory() {
      this.history[this.historyIndex] = this._getWidgetIds().map(
        (widgetId) => this.getWidget(widgetId)
      );
    }
    _handleSettingChange() {
      if (this.locked) {
        return;
      }
      const prevWidgets = this.getWidgets();
      this._pushHistory();
      this._emit(prevWidgets, this.getWidgets());
    }
    _handleAllSettingsChange(setting) {
      if (this.locked) {
        return;
      }
      if (!setting.id.startsWith("widget_")) {
        return;
      }
      const widgetId = settingIdToWidgetId(setting.id);
      if (!this.setting.get().includes(widgetId)) {
        return;
      }
      const prevWidgets = this.getWidgets();
      this._pushHistory();
      this._emit(prevWidgets, this.getWidgets());
    }
    _createWidget(widget) {
      const widgetModel = wp.customize.Widgets.availableWidgets.findWhere({
        id_base: widget.idBase
      });
      let number = widget.number;
      if (widgetModel.get("is_multi") && !number) {
        widgetModel.set(
          "multi_number",
          widgetModel.get("multi_number") + 1
        );
        number = widgetModel.get("multi_number");
      }
      const settingId = number ? `widget_${widget.idBase}[${number}]` : `widget_${widget.idBase}`;
      const settingArgs = {
        transport: wp.customize.Widgets.data.selectiveRefreshableWidgets[widgetModel.get("id_base")] ? "postMessage" : "refresh",
        previewer: this.setting.previewer
      };
      const setting = this.api.create(
        settingId,
        settingId,
        "",
        settingArgs
      );
      setting.set(widget.instance);
      const widgetId = settingIdToWidgetId(settingId);
      return widgetId;
    }
    _removeWidget(widget) {
      const settingId = widgetIdToSettingId(widget.id);
      const setting = this.api(settingId);
      if (setting) {
        const instance = setting.get();
        this.widgetsCache.delete(instance);
      }
      this.api.remove(settingId);
    }
    _updateWidget(widget) {
      const prevWidget = this.getWidget(widget.id);
      if (prevWidget === widget) {
        return widget.id;
      }
      if (prevWidget.idBase && widget.idBase && prevWidget.idBase === widget.idBase) {
        const settingId = widgetIdToSettingId(widget.id);
        this.api(settingId).set(widget.instance);
        return widget.id;
      }
      this._removeWidget(widget);
      return this._createWidget(widget);
    }
    getWidget(widgetId) {
      if (!widgetId) {
        return null;
      }
      const { idBase, number } = parseWidgetId(widgetId);
      const settingId = widgetIdToSettingId(widgetId);
      const setting = this.api(settingId);
      if (!setting) {
        return null;
      }
      const instance = setting.get();
      if (this.widgetsCache.has(instance)) {
        return this.widgetsCache.get(instance);
      }
      const widget = {
        id: widgetId,
        idBase,
        number,
        instance
      };
      this.widgetsCache.set(instance, widget);
      return widget;
    }
    _updateWidgets(nextWidgets) {
      this.locked = true;
      const addedWidgetIds = [];
      const nextWidgetIds = nextWidgets.map((nextWidget) => {
        if (nextWidget.id && this.getWidget(nextWidget.id)) {
          addedWidgetIds.push(null);
          return this._updateWidget(nextWidget);
        }
        const widgetId = this._createWidget(nextWidget);
        addedWidgetIds.push(widgetId);
        return widgetId;
      });
      const deletedWidgets = this.getWidgets().filter(
        (widget) => !nextWidgetIds.includes(widget.id)
      );
      deletedWidgets.forEach((widget) => this._removeWidget(widget));
      this.setting.set(nextWidgetIds);
      this.locked = false;
      return addedWidgetIds;
    }
    setWidgets(nextWidgets) {
      const addedWidgetIds = this._updateWidgets(nextWidgets);
      this._debounceSetHistory();
      return addedWidgetIds;
    }
    /**
     * Undo/Redo related features
     */
    hasUndo() {
      return this.historyIndex > 0;
    }
    hasRedo() {
      return this.historyIndex < this.history.length - 1;
    }
    _seek(historyIndex) {
      const currentWidgets = this.getWidgets();
      this.historyIndex = historyIndex;
      const widgets = this.history[this.historyIndex];
      this._updateWidgets(widgets);
      this._emit(currentWidgets, this.getWidgets());
      this.historySubscribers.forEach((listener) => listener());
      this._debounceSetHistory.cancel();
    }
    undo() {
      if (!this.hasUndo()) {
        return;
      }
      this._seek(this.historyIndex - 1);
    }
    redo() {
      if (!this.hasRedo()) {
        return;
      }
      this._seek(this.historyIndex + 1);
    }
    subscribeHistory(listener) {
      this.historySubscribers.add(listener);
      return () => {
        this.historySubscribers.delete(listener);
      };
    }
    save() {
      this.api.previewer.save();
    }
  };

  // packages/customize-widgets/build-module/controls/inserter-outer-section.mjs
  var import_keycodes5 = __toESM(require_keycodes(), 1);
  var import_dom = __toESM(require_dom(), 1);
  var import_data14 = __toESM(require_data(), 1);
  function getInserterOuterSection() {
    const {
      wp: { customize }
    } = window;
    const OuterSection = customize.OuterSection;
    customize.OuterSection = class extends OuterSection {
      onChangeExpanded(expanded, args) {
        if (expanded) {
          customize.section.each((section) => {
            if (section.params.type === "outer" && section.id !== this.id) {
              if (section.expanded()) {
                section.collapse();
              }
            }
          });
        }
        return super.onChangeExpanded(expanded, args);
      }
    };
    customize.sectionConstructor.outer = customize.OuterSection;
    return class InserterOuterSection extends customize.OuterSection {
      constructor(...args) {
        super(...args);
        this.params.type = "outer";
        this.activeElementBeforeExpanded = null;
        const ownerWindow = this.contentContainer[0].ownerDocument.defaultView;
        ownerWindow.addEventListener(
          "keydown",
          (event) => {
            if (this.expanded() && (event.keyCode === import_keycodes5.ESCAPE || event.code === "Escape") && !event.defaultPrevented) {
              event.preventDefault();
              event.stopPropagation();
              (0, import_data14.dispatch)(store).setIsInserterOpened(
                false
              );
            }
          },
          // Use capture mode to make this run before other event listeners.
          true
        );
        this.contentContainer.addClass("widgets-inserter");
        this.isFromInternalAction = false;
        this.expanded.bind(() => {
          if (!this.isFromInternalAction) {
            (0, import_data14.dispatch)(store).setIsInserterOpened(
              this.expanded()
            );
          }
          this.isFromInternalAction = false;
        });
      }
      open() {
        if (!this.expanded()) {
          const contentContainer = this.contentContainer[0];
          this.activeElementBeforeExpanded = contentContainer.ownerDocument.activeElement;
          this.isFromInternalAction = true;
          this.expand({
            completeCallback() {
              const searchBox = import_dom.focus.tabbable.find(contentContainer)[1];
              if (searchBox) {
                searchBox.focus();
              }
            }
          });
        }
      }
      close() {
        if (this.expanded()) {
          const contentContainer = this.contentContainer[0];
          const activeElement = contentContainer.ownerDocument.activeElement;
          this.isFromInternalAction = true;
          this.collapse({
            completeCallback() {
              if (contentContainer.contains(activeElement)) {
                if (this.activeElementBeforeExpanded) {
                  this.activeElementBeforeExpanded.focus();
                }
              }
            }
          });
        }
      }
    };
  }

  // packages/customize-widgets/build-module/controls/sidebar-control.mjs
  var getInserterId = (controlId) => `widgets-inserter-${controlId}`;
  function getSidebarControl() {
    const {
      wp: { customize }
    } = window;
    return class SidebarControl extends customize.Control {
      constructor(...args) {
        super(...args);
        this.subscribers = /* @__PURE__ */ new Set();
      }
      ready() {
        const InserterOuterSection = getInserterOuterSection();
        this.inserter = new InserterOuterSection(
          getInserterId(this.id),
          {}
        );
        customize.section.add(this.inserter);
        this.sectionInstance = customize.section(this.section());
        this.inspector = this.sectionInstance.inspector;
        this.sidebarAdapter = new SidebarAdapter(this.setting, customize);
      }
      subscribe(callback) {
        this.subscribers.add(callback);
        return () => {
          this.subscribers.delete(callback);
        };
      }
      onChangeSectionExpanded(expanded, args) {
        if (!args.unchanged) {
          if (!expanded) {
            (0, import_data15.dispatch)(store).setIsInserterOpened(
              false
            );
          }
          this.subscribers.forEach(
            (subscriber) => subscriber(expanded, args)
          );
        }
      }
    };
  }

  // packages/customize-widgets/build-module/filters/move-to-sidebar.mjs
  var import_block_editor10 = __toESM(require_block_editor(), 1);
  var import_compose4 = __toESM(require_compose(), 1);
  var import_data16 = __toESM(require_data(), 1);
  var import_hooks2 = __toESM(require_hooks(), 1);
  var import_widgets4 = __toESM(require_widgets(), 1);
  var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
  var withMoveToSidebarToolbarItem = (0, import_compose4.createHigherOrderComponent)(
    (BlockEdit) => (props) => {
      let widgetId = (0, import_widgets4.getWidgetIdFromBlock)(props);
      const sidebarControls = useSidebarControls();
      const activeSidebarControl = useActiveSidebarControl();
      const hasMultipleSidebars = sidebarControls?.length > 1;
      const blockName = props.name;
      const clientId = props.clientId;
      const canInsertBlockInSidebar = (0, import_data16.useSelect)(
        (select) => {
          return select(import_block_editor10.store).canInsertBlockType(
            blockName,
            ""
          );
        },
        [blockName]
      );
      const block = (0, import_data16.useSelect)(
        (select) => select(import_block_editor10.store).getBlock(clientId),
        [clientId]
      );
      const { removeBlock } = (0, import_data16.useDispatch)(import_block_editor10.store);
      const [, focusWidget] = useFocusControl();
      function moveToSidebar(sidebarControlId) {
        const newSidebarControl = sidebarControls.find(
          (sidebarControl) => sidebarControl.id === sidebarControlId
        );
        if (widgetId) {
          const oldSetting = activeSidebarControl.setting;
          const newSetting = newSidebarControl.setting;
          oldSetting(oldSetting().filter((id) => id !== widgetId));
          newSetting([...newSetting(), widgetId]);
        } else {
          const sidebarAdapter = newSidebarControl.sidebarAdapter;
          removeBlock(clientId);
          const addedWidgetIds = sidebarAdapter.setWidgets([
            ...sidebarAdapter.getWidgets(),
            blockToWidget(block)
          ]);
          widgetId = addedWidgetIds.reverse().find((id) => !!id);
        }
        focusWidget(widgetId);
      }
      return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(BlockEdit, { ...props }, "edit"),
        hasMultipleSidebars && canInsertBlockInSidebar && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_block_editor10.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
          import_widgets4.MoveToWidgetArea,
          {
            widgetAreas: sidebarControls.map(
              (sidebarControl) => ({
                id: sidebarControl.id,
                name: sidebarControl.params.label,
                description: sidebarControl.params.description
              })
            ),
            currentWidgetAreaId: activeSidebarControl?.id,
            onSelect: moveToSidebar
          }
        ) })
      ] });
    },
    "withMoveToSidebarToolbarItem"
  );
  (0, import_hooks2.addFilter)(
    "editor.BlockEdit",
    "core/customize-widgets/block-edit",
    withMoveToSidebarToolbarItem
  );

  // packages/customize-widgets/build-module/filters/replace-media-upload.mjs
  var import_hooks3 = __toESM(require_hooks(), 1);
  var import_media_utils2 = __toESM(require_media_utils(), 1);
  var replaceMediaUpload = () => import_media_utils2.MediaUpload;
  (0, import_hooks3.addFilter)(
    "editor.MediaUpload",
    "core/edit-widgets/replace-media-upload",
    replaceMediaUpload
  );

  // packages/customize-widgets/build-module/filters/wide-widget-display.mjs
  var import_compose5 = __toESM(require_compose(), 1);
  var import_hooks4 = __toESM(require_hooks(), 1);
  var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
  var { wp: wp2 } = window;
  var withWideWidgetDisplay = (0, import_compose5.createHigherOrderComponent)(
    (BlockEdit) => (props) => {
      const { idBase } = props.attributes;
      const isWide = wp2.customize.Widgets.data.availableWidgets.find(
        (widget) => widget.id_base === idBase
      )?.is_wide ?? false;
      return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(BlockEdit, { ...props, isWide }, "edit");
    },
    "withWideWidgetDisplay"
  );
  (0, import_hooks4.addFilter)(
    "editor.BlockEdit",
    "core/customize-widgets/wide-widget-display",
    withWideWidgetDisplay
  );

  // packages/customize-widgets/build-module/index.mjs
  var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
  var { wp: wp3 } = window;
  var DISABLED_BLOCKS = [
    "core/more",
    "core/block",
    "core/freeform",
    "core/template-part"
  ];
  function initialize(editorName, blockEditorSettings) {
    (0, import_data17.dispatch)(import_preferences4.store).setDefaults("core/customize-widgets", {
      fixedToolbar: false,
      welcomeGuide: true
    });
    (0, import_data17.dispatch)(import_blocks2.store).reapplyBlockTypeFilters();
    const coreBlocks = (0, import_block_library2.__experimentalGetCoreBlocks)().filter((block) => {
      return !(DISABLED_BLOCKS.includes(block.name) || block.name.startsWith("core/post") || block.name.startsWith("core/query") || block.name.startsWith("core/site") || block.name.startsWith("core/navigation") || block.name.startsWith("core/term"));
    });
    (0, import_block_library2.registerCoreBlocks)(coreBlocks);
    (0, import_widgets5.registerLegacyWidgetBlock)();
    if (false) {
      (0, import_block_library2.__experimentalRegisterExperimentalCoreBlocks)({
        enableFSEBlocks: ENABLE_EXPERIMENTAL_FSE_BLOCKS
      });
    }
    (0, import_widgets5.registerLegacyWidgetVariations)(blockEditorSettings);
    (0, import_widgets5.registerWidgetGroupBlock)();
    (0, import_blocks2.setFreeformContentHandlerName)("core/html");
    const SidebarControl = getSidebarControl(blockEditorSettings);
    wp3.customize.sectionConstructor.sidebar = getSidebarSection();
    wp3.customize.controlConstructor.sidebar_block_editor = SidebarControl;
    const container = document.createElement("div");
    document.body.appendChild(container);
    wp3.customize.bind("ready", () => {
      const sidebarControls = [];
      wp3.customize.control.each((control) => {
        if (control instanceof SidebarControl) {
          sidebarControls.push(control);
        }
      });
      (0, import_element17.createRoot)(container).render(
        /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_element17.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
          CustomizeWidgets,
          {
            api: wp3.customize,
            sidebarControls,
            blockEditorSettings
          }
        ) })
      );
    });
  }
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                                                                                                                                                      dist/customize-widgets.min.js                                                                       0000644                 00000111123 15212563776 0012332 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;(wp||={}).customizeWidgets=(()=>{var No=Object.create;var pt=Object.defineProperty;var Fo=Object.getOwnPropertyDescriptor;var Do=Object.getOwnPropertyNames;var Po=Object.getPrototypeOf,jo=Object.prototype.hasOwnProperty;var p=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),$t=(t,e)=>{for(var r in e)pt(t,r,{get:e[r],enumerable:!0})},ke=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Do(e))!jo.call(t,s)&&s!==r&&pt(t,s,{get:()=>e[s],enumerable:!(o=Fo(e,s))||o.enumerable});return t};var a=(t,e,r)=>(r=t!=null?No(Po(t)):{},ke(e||!t||!t.__esModule?pt(r,"default",{value:t,enumerable:!0}):r,t)),Ho=t=>ke(pt({},"__esModule",{value:!0}),t);var w=p((ba,_e)=>{_e.exports=window.wp.element});var Xt=p((ya,xe)=>{xe.exports=window.wp.blockLibrary});var G=p((va,Ce)=>{Ce.exports=window.wp.widgets});var Yt=p((Sa,Ie)=>{Ie.exports=window.wp.blocks});var b=p((ka,Be)=>{Be.exports=window.wp.data});var rt=p((_a,We)=>{We.exports=window.wp.preferences});var R=p((xa,Ee)=>{Ee.exports=window.wp.components});var E=p((Ca,ze)=>{ze.exports=window.wp.i18n});var z=p((Ia,Ae)=>{Ae.exports=window.wp.blockEditor});var K=p((Ba,Te)=>{Te.exports=window.wp.compose});var ot=p((Wa,Le)=>{Le.exports=window.wp.hooks});var c=p((Ea,Me)=>{Me.exports=window.ReactJSXRuntime});var He=p((Ta,je)=>{je.exports=window.wp.coreData});var Jt=p((La,Ve)=>{Ve.exports=window.wp.mediaUtils});var q=p((Oa,Je)=>{Je.exports=window.wp.keycodes});var V=p((Na,Qe)=>{Qe.exports=window.wp.primitives});var at=p((ss,nr)=>{nr.exports=window.wp.keyboardShortcuts});var Wr=p((Cs,Br)=>{"use strict";Br.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var o,s,i;if(Array.isArray(e)){if(o=e.length,o!=r.length)return!1;for(s=o;s--!==0;)if(!t(e[s],r[s]))return!1;return!0}if(e instanceof Map&&r instanceof Map){if(e.size!==r.size)return!1;for(s of e.entries())if(!r.has(s[0]))return!1;for(s of e.entries())if(!t(s[1],r.get(s[0])))return!1;return!0}if(e instanceof Set&&r instanceof Set){if(e.size!==r.size)return!1;for(s of e.entries())if(!r.has(s[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(r)){if(o=e.length,o!=r.length)return!1;for(s=o;s--!==0;)if(e[s]!==r[s])return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(i=Object.keys(e),o=i.length,o!==Object.keys(r).length)return!1;for(s=o;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=o;s--!==0;){var d=i[s];if(!t(e[d],r[d]))return!1}return!0}return e!==e&&r!==r}});var zr=p((Is,Er)=>{Er.exports=window.wp.isShallowEqual});var jr=p((Ms,Pr)=>{Pr.exports=window.wp.privateApis});var _o=p((hi,ko)=>{ko.exports=window.wp.dom});var ga={};$t(ga,{initialize:()=>ha,store:()=>x});var Vt=a(w(),1),Ut=a(Xt(),1),et=a(G(),1),Gt=a(Yt(),1),ve=a(b(),1),Oo=a(rt(),1);var D=a(w(),1),Pt=a(R(),1);var Re=a(w(),1),Zt=a(E(),1),Oe=a(R(),1),Ne=a(z(),1),Fe=a(K(),1),De=a(ot(),1),ht=a(c(),1);function Vo({text:t,children:e}){let r=(0,Fe.useCopyToClipboard)(t);return(0,ht.jsx)(Oe.Button,{size:"compact",variant:"secondary",ref:r,children:e})}var Pe=class extends Re.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(t){this.setState({error:t}),(0,De.doAction)("editor.ErrorBoundary.errorLogged",t)}render(){let{error:t}=this.state;return t?(0,ht.jsx)(Ne.Warning,{className:"customize-widgets-error-boundary",actions:[(0,ht.jsx)(Vo,{text:t.stack,children:(0,Zt.__)("Copy Error")},"copy-error")],children:(0,Zt.__)("The editor has encountered an unexpected error.")}):this.props.children}};var ro=a(K(),1),oo=a(He(),1),ao=a(b(),1),Nt=a(w(),1),L=a(z(),1),so=a(Jt(),1),io=a(rt(),1),lo=a(Xt(),1);var Ue=a(w(),1),Ge=a(E(),1),Ke=a(R(),1),qe=a(b(),1),$e=a(z(),1),Xe=a(c(),1);function Uo({inspector:t,closeMenu:e,...r}){let o=(0,qe.useSelect)(i=>i($e.store).getSelectedBlockClientId(),[]),s=(0,Ue.useMemo)(()=>document.getElementById(`block-${o}`),[o]);return(0,Xe.jsx)(Ke.MenuItem,{onClick:()=>{t.open({returnFocusWhenClose:s}),e()},...r,children:(0,Ge.__)("Show more settings")})}var Ye=Uo;function Ze(t){var e,r,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(r=Ze(t[e]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}function Go(){for(var t,e,r=0,o="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=Ze(t))&&(o&&(o+=" "),o+=e);return o}var gt=Go;var zt=a(R(),1),xr=a(z(),1),X=a(w(),1),$=a(q(),1),N=a(E(),1);var wt=a(V(),1),Qt=a(c(),1),te=(0,Qt.jsx)(wt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Qt.jsx)(wt.Path,{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"})});var bt=a(V(),1),ee=a(c(),1),re=(0,ee.jsx)(bt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ee.jsx)(bt.Path,{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"})});var yt=a(V(),1),oe=a(c(),1),ae=(0,oe.jsx)(yt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(yt.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var vt=a(V(),1),se=a(c(),1),ie=(0,se.jsx)(vt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,se.jsx)(vt.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var St=a(V(),1),de=a(c(),1),kt=(0,de.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,de.jsx)(St.Path,{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"})});var _t=a(V(),1),le=a(c(),1),xt=(0,le.jsx)(_t.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,le.jsx)(_t.Path,{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"})});var ue=a(E(),1),or=a(z(),1),ar=a(R(),1),sr=a(K(),1),ir=a(b(),1);var Ct=a(b(),1);var tr=a(b(),1);function Ko(t=!1,e){return e.type==="SET_IS_INSERTER_OPENED"?e.value:t}var er=(0,tr.combineReducers)({blockInserterPanel:Ko});var ne={};$t(ne,{__experimentalGetInsertionPoint:()=>Xo,isInserterOpened:()=>$o});var qo={rootClientId:void 0,insertionIndex:void 0};function $o(t){return!!t.blockInserterPanel}function Xo(t){return typeof t.blockInserterPanel=="boolean"?qo:t.blockInserterPanel}var fe={};$t(fe,{setIsInserterOpened:()=>Yo});function Yo(t){return{type:"SET_IS_INSERTER_OPENED",value:t}}var rr="core/customize-widgets";var Zo={reducer:er,selectors:ne,actions:fe},x=(0,Ct.createReduxStore)(rr,Zo);(0,Ct.register)(x);var P=a(c(),1);function dr({setIsOpened:t}){let e=(0,sr.useInstanceId)(dr,"customize-widget-layout__inserter-panel-title"),r=(0,ir.useSelect)(o=>o(x).__experimentalGetInsertionPoint(),[]);return(0,P.jsxs)("div",{className:"customize-widgets-layout__inserter-panel","aria-labelledby":e,children:[(0,P.jsxs)("div",{className:"customize-widgets-layout__inserter-panel-header",children:[(0,P.jsx)("h2",{id:e,className:"customize-widgets-layout__inserter-panel-header-title",children:(0,ue.__)("Add a block")}),(0,P.jsx)(ar.Button,{size:"small",icon:te,onClick:()=>t(!1),"aria-label":(0,ue.__)("Close inserter")})]}),(0,P.jsx)("div",{className:"customize-widgets-layout__inserter-panel-content",children:(0,P.jsx)(or.__experimentalLibrary,{rootClientId:r.rootClientId,__experimentalInsertionIndex:r.insertionIndex,showInserterHelpPanel:!0,onSelect:()=>t(!1)})})]})}var lr=dr;var A=a(R(),1),vr=a(w(),1),g=a(E(),1);var Sr=a(q(),1),kr=a(at(),1),Et=a(rt(),1);var wr=a(R(),1),O=a(E(),1),st=a(at(),1),Wt=a(b(),1),br=a(w(),1);var C=a(E(),1),fr=[{keyCombination:{modifier:"primary",character:"b"},description:(0,C.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:(0,C.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:(0,C.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:(0,C.__)("Remove a link.")},{keyCombination:{character:"[["},description:(0,C.__)("Insert a link to a post or page.")},{keyCombination:{modifier:"primary",character:"u"},description:(0,C.__)("Underline the selected text.")},{keyCombination:{modifier:"access",character:"d"},description:(0,C.__)("Strikethrough the selected text.")},{keyCombination:{modifier:"access",character:"x"},description:(0,C.__)("Make the selected text inline code.")},{keyCombination:{modifier:"access",character:"0"},aliases:[{modifier:"access",character:"7"}],description:(0,C.__)("Convert the current heading to a paragraph.")},{keyCombination:{modifier:"access",character:"1-6"},description:(0,C.__)("Convert the current paragraph or heading to a heading of level 1 to 6.")},{keyCombination:{modifier:"primaryShift",character:"SPACE"},description:(0,C.__)("Add non breaking space.")}];var mr=a(w(),1),It=a(q(),1),I=a(c(),1);function ur({keyCombination:t,forceAriaLabel:e}){let r=t.modifier?It.displayShortcutList[t.modifier](t.character):t.character,o=t.modifier?It.shortcutAriaLabel[t.modifier](t.character):t.character;return(0,I.jsx)("kbd",{className:"customize-widgets-keyboard-shortcut-help-modal__shortcut-key-combination","aria-label":e||o,children:(Array.isArray(r)?r:[r]).map((s,i)=>s==="+"?(0,I.jsx)(mr.Fragment,{children:s},i):(0,I.jsx)("kbd",{className:"customize-widgets-keyboard-shortcut-help-modal__shortcut-key",children:s},i))})}function Jo({description:t,keyCombination:e,aliases:r=[],ariaLabel:o}){return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)("div",{className:"customize-widgets-keyboard-shortcut-help-modal__shortcut-description",children:t}),(0,I.jsxs)("div",{className:"customize-widgets-keyboard-shortcut-help-modal__shortcut-term",children:[(0,I.jsx)(ur,{keyCombination:e,forceAriaLabel:o}),r.map((s,i)=>(0,I.jsx)(ur,{keyCombination:s,forceAriaLabel:o},i))]})]})}var Bt=Jo;var cr=a(b(),1),pr=a(at(),1);var hr=a(c(),1);function Qo({name:t}){let{keyCombination:e,description:r,aliases:o}=(0,cr.useSelect)(s=>{let{getShortcutKeyCombination:i,getShortcutDescription:d,getShortcutAliases:l}=s(pr.store);return{keyCombination:i(t),aliases:l(t),description:d(t)}},[t]);return e?(0,hr.jsx)(Bt,{keyCombination:e,description:r,aliases:o}):null}var gr=Qo;var k=a(c(),1),ta=({shortcuts:t})=>(0,k.jsx)("ul",{className:"customize-widgets-keyboard-shortcut-help-modal__shortcut-list",role:"list",children:t.map((e,r)=>(0,k.jsx)("li",{className:"customize-widgets-keyboard-shortcut-help-modal__shortcut",children:typeof e=="string"?(0,k.jsx)(gr,{name:e}):(0,k.jsx)(Bt,{...e})},r))}),ce=({title:t,shortcuts:e,className:r})=>(0,k.jsxs)("section",{className:gt("customize-widgets-keyboard-shortcut-help-modal__section",r),children:[!!t&&(0,k.jsx)("h2",{className:"customize-widgets-keyboard-shortcut-help-modal__section-title",children:t}),(0,k.jsx)(ta,{shortcuts:e})]}),me=({title:t,categoryName:e,additionalShortcuts:r=[]})=>{let o=(0,Wt.useSelect)(s=>s(st.store).getCategoryShortcuts(e),[e]);return(0,k.jsx)(ce,{title:t,shortcuts:o.concat(r)})};function yr({isModalActive:t,toggleModal:e}){let{registerShortcut:r}=(0,Wt.useDispatch)(st.store);return(0,br.useEffect)(()=>{r({name:"core/customize-widgets/keyboard-shortcuts",category:"main",description:(0,O.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}})},[r]),(0,st.useShortcut)("core/customize-widgets/keyboard-shortcuts",e),t?(0,k.jsxs)(wr.Modal,{className:"customize-widgets-keyboard-shortcut-help-modal",title:(0,O.__)("Keyboard shortcuts"),onRequestClose:e,children:[(0,k.jsx)(ce,{className:"customize-widgets-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/customize-widgets/keyboard-shortcuts"]}),(0,k.jsx)(me,{title:(0,O.__)("Global shortcuts"),categoryName:"global"}),(0,k.jsx)(me,{title:(0,O.__)("Selection shortcuts"),categoryName:"selection"}),(0,k.jsx)(me,{title:(0,O.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:(0,O.__)("Change the block type after adding a new paragraph."),ariaLabel:(0,O.__)("Forward-slash")}]}),(0,k.jsx)(ce,{title:(0,O.__)("Text formatting"),shortcuts:fr})]}):null}var y=a(c(),1);function _r(){let[t,e]=(0,vr.useState)(!1),r=()=>e(!t);return(0,kr.useShortcut)("core/customize-widgets/keyboard-shortcuts",r),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(A.ToolbarDropdownMenu,{icon:ae,label:(0,g.__)("Options"),popoverProps:{placement:"bottom-end",className:"more-menu-dropdown__content"},toggleProps:{tooltipPosition:"bottom",size:"compact"},children:()=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(A.MenuGroup,{label:(0,g._x)("View","noun"),children:(0,y.jsx)(Et.PreferenceToggleMenuItem,{scope:"core/customize-widgets",name:"fixedToolbar",label:(0,g.__)("Top toolbar"),info:(0,g.__)("Access all block and document tools in a single place"),messageActivated:(0,g.__)("Top toolbar activated"),messageDeactivated:(0,g.__)("Top toolbar deactivated")})}),(0,y.jsxs)(A.MenuGroup,{label:(0,g.__)("Tools"),children:[(0,y.jsx)(A.MenuItem,{onClick:()=>{e(!0)},shortcut:Sr.displayShortcut.access("h"),children:(0,g.__)("Keyboard shortcuts")}),(0,y.jsx)(Et.PreferenceToggleMenuItem,{scope:"core/customize-widgets",name:"welcomeGuide",label:(0,g.__)("Welcome Guide")}),(0,y.jsxs)(A.MenuItem,{role:"menuitem",icon:re,href:(0,g.__)("https://wordpress.org/documentation/article/block-based-widgets-editor/"),target:"_blank",rel:"noopener noreferrer",children:[(0,g.__)("Help"),(0,y.jsx)(A.VisuallyHidden,{as:"span",children:(0,g.__)("(opens in a new tab)")})]})]}),(0,y.jsx)(A.MenuGroup,{label:(0,g.__)("Preferences"),children:(0,y.jsx)(Et.PreferenceToggleMenuItem,{scope:"core/customize-widgets",name:"keepCaretInsideBlock",label:(0,g.__)("Contain text cursor inside block"),info:(0,g.__)("Aids screen readers by stopping text caret from leaving blocks."),messageActivated:(0,g.__)("Contain text cursor inside block activated"),messageDeactivated:(0,g.__)("Contain text cursor inside block deactivated")})})]})}),(0,y.jsx)(yr,{isModalActive:t,toggleModal:r})]})}var B=a(c(),1);function ea({sidebar:t,inserter:e,isInserterOpened:r,setIsInserterOpened:o,isFixedToolbarActive:s}){let[[i,d],l]=(0,X.useState)([t.hasUndo(),t.hasRedo()]),u=(0,$.isAppleOS)()?$.displayShortcut.primaryShift("z"):$.displayShortcut.primary("y");return(0,X.useEffect)(()=>t.subscribeHistory(()=>{l([t.hasUndo(),t.hasRedo()])}),[t]),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("div",{className:gt("customize-widgets-header",{"is-fixed-toolbar-active":s}),children:(0,B.jsxs)(xr.NavigableToolbar,{className:"customize-widgets-header-toolbar","aria-label":(0,N.__)("Document tools"),children:[(0,B.jsx)(zt.ToolbarButton,{icon:(0,N.isRTL)()?kt:xt,label:(0,N.__)("Undo"),shortcut:$.displayShortcut.primary("z"),disabled:!i,onClick:t.undo,className:"customize-widgets-editor-history-button undo-button"}),(0,B.jsx)(zt.ToolbarButton,{icon:(0,N.isRTL)()?xt:kt,label:(0,N.__)("Redo"),shortcut:u,disabled:!d,onClick:t.redo,className:"customize-widgets-editor-history-button redo-button"}),(0,B.jsx)(zt.ToolbarButton,{className:"customize-widgets-header-toolbar__inserter-toggle",isPressed:r,variant:"primary",icon:ie,label:(0,N._x)("Add block","Generic label for block inserter button"),onClick:()=>{o(n=>!n)}}),(0,B.jsx)(_r,{})]})}),(0,X.createPortal)((0,B.jsx)(lr,{setIsOpened:o}),e.contentContainer[0])]})}var Cr=ea;var At=a(w(),1),Y=a(b(),1);function Ir(t){let e=(0,Y.useSelect)(o=>o(x).isInserterOpened(),[]),{setIsInserterOpened:r}=(0,Y.useDispatch)(x);return(0,At.useEffect)(()=>{e?t.open():t.close()},[t,e]),[e,(0,At.useCallback)(o=>{let s=o;typeof o=="function"&&(s=o((0,Y.select)(x).isInserterOpened())),r(s)},[r])]}var Vr=a(z(),1);var Tr=a(Wr(),1),J=a(w(),1),Tt=a(zr(),1),Z=a(G(),1);var j=a(Yt(),1),Ar=a(G(),1);function it(t){let e=t.match(/^widget_(.+)(?:\[(\d+)\])$/);if(e){let r=e[1],o=parseInt(e[2],10);return`${r}-${o}`}return t}function dt(t,e=null){let r;if(t.name==="core/legacy-widget"&&(t.attributes.id||t.attributes.instance))if(t.attributes.id)r={id:t.attributes.id};else{let{encoded:l,hash:u,raw:n,...f}=t.attributes.instance;r={idBase:t.attributes.idBase,instance:{...e?.instance,is_widget_customizer_js_value:!0,encoded_serialized_instance:l,instance_hash_key:u,raw_instance:n,...f}}}else r={idBase:"block",widgetClass:"WP_Widget_Block",instance:{raw_instance:{content:(0,j.serialize)(t)}}};let{form:s,rendered:i,...d}=e||{};return{...d,...r}}function pe({id:t,idBase:e,number:r,instance:o}){let s,{encoded_serialized_instance:i,instance_hash_key:d,raw_instance:l,...u}=o;if(e==="block"){let n=(0,j.parse)(l.content??"",{__unstableSkipAutop:!0});s=n.length?n[0]:(0,j.createBlock)("core/paragraph",{})}else r?s=(0,j.createBlock)("core/legacy-widget",{idBase:e,instance:{encoded:i,hash:d,raw:l,...u}}):s=(0,j.createBlock)("core/legacy-widget",{id:t});return(0,Ar.addWidgetIdToBlock)(s,t)}function ra(t){return t.map(e=>pe(e))}function Lr(t){let[e,r]=(0,J.useState)(()=>ra(t.getWidgets()));(0,J.useEffect)(()=>t.subscribe((s,i)=>{r(d=>{let l=new Map(s.map(f=>[f.id,f])),u=new Map(d.map(f=>[(0,Z.getWidgetIdFromBlock)(f),f])),n=i.map(f=>{let h=l.get(f.id);return h&&h===f?u.get(f.id):pe(f)});return(0,Tt.isShallowEqual)(d,n)?d:n})}),[t]);let o=(0,J.useCallback)(s=>{r(i=>{if((0,Tt.isShallowEqual)(i,s))return i;let d=new Map(i.map(n=>[(0,Z.getWidgetIdFromBlock)(n),n])),l=s.map(n=>{let f=(0,Z.getWidgetIdFromBlock)(n);if(f&&d.has(f)){let h=d.get(f),m=t.getWidget(f);return(0,Tr.default)(n,h)&&m?m:dt(n,m)}return dt(n)});if((0,Tt.isShallowEqual)(t.getWidgets(),l))return i;let u=t.setWidgets(l);return s.reduce((n,f,h)=>{let m=u[h];return m!==null&&(n===s&&(n=s.slice()),n[h]=(0,Z.addWidgetIdToBlock)(f,m)),n},s)})},[t]);return[e,o,o]}var lt=a(w(),1),Or=a(b(),1),Nr=a(z(),1),Fr=a(G(),1);var W=a(w(),1);var Mr=a(c(),1),he=(0,W.createContext)();he.displayName="FocusControlContext";function Rr({api:t,sidebarControls:e,children:r}){let[o,s]=(0,W.useState)({current:null}),i=(0,W.useCallback)(l=>{for(let u of e)if(u.setting.get().includes(l)){u.sectionInstance.expand({completeCallback(){s({current:l})}});break}},[e]);(0,W.useEffect)(()=>{function l(f){let h=it(f);i(h)}let u=!1;function n(){t.previewer.preview.bind("focus-control-for-setting",l),u=!0}return t.previewer.bind("ready",n),()=>{t.previewer.unbind("ready",n),u&&t.previewer.preview.unbind("focus-control-for-setting",l)}},[t,i]);let d=(0,W.useMemo)(()=>[o,i],[o,i]);return(0,Mr.jsx)(he.Provider,{value:d,children:r})}var Lt=()=>(0,W.useContext)(he);function Dr(t){let{selectBlock:e}=(0,Or.useDispatch)(Nr.store),[r]=Lt(),o=(0,lt.useRef)(t);(0,lt.useEffect)(()=>{o.current=t},[t]),(0,lt.useEffect)(()=>{if(r.current){let s=o.current.find(i=>(0,Fr.getWidgetIdFromBlock)(i)===r.current);s&&(e(s.clientId),document.querySelector(`[data-block="${s.clientId}"]`)?.focus())}},[r,e])}var Hr=a(jr(),1),{lock:Rs,unlock:nt}=(0,Hr.__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/customize-widgets");var Ur=a(c(),1),{ExperimentalBlockEditorProvider:oa}=nt(Vr.privateApis);function Gr({sidebar:t,settings:e,children:r}){let[o,s,i]=Lr(t);return Dr(o),(0,Ur.jsx)(oa,{value:o,onInput:s,onChange:i,settings:e,useSubRegistry:!1,children:r})}var T=a(E(),1),ft=a(R(),1),Kr=a(b(),1),qr=a(rt(),1),S=a(c(),1);function $r({sidebar:t}){let{toggle:e}=(0,Kr.useDispatch)(qr.store),r=t.getWidgets().every(o=>o.id.startsWith("block-"));return(0,S.jsxs)("div",{className:"customize-widgets-welcome-guide",children:[(0,S.jsx)("div",{className:"customize-widgets-welcome-guide__image__wrapper",children:(0,S.jsxs)("picture",{children:[(0,S.jsx)("source",{srcSet:"https://s.w.org/images/block-editor/welcome-editor.svg",media:"(prefers-reduced-motion: reduce)"}),(0,S.jsx)("img",{className:"customize-widgets-welcome-guide__image",src:"https://s.w.org/images/block-editor/welcome-editor.gif",width:"312",height:"240",alt:""})]})}),(0,S.jsx)("h1",{className:"customize-widgets-welcome-guide__heading",children:(0,T.__)("Welcome to block Widgets")}),(0,S.jsx)("p",{className:"customize-widgets-welcome-guide__text",children:r?(0,T.__)("Your theme provides different \u201Cblock\u201D areas for you to add and edit content.\xA0Try adding a search bar, social icons, or other types of blocks here and see how they\u2019ll look on your site."):(0,T.__)("You can now add any block to your site\u2019s widget areas. Don\u2019t worry, all of your favorite widgets still work flawlessly.")}),(0,S.jsx)(ft.Button,{size:"compact",variant:"primary",onClick:()=>e("core/customize-widgets","welcomeGuide"),children:(0,T.__)("Got it")}),(0,S.jsx)("hr",{className:"customize-widgets-welcome-guide__separator"}),!r&&(0,S.jsxs)("p",{className:"customize-widgets-welcome-guide__more-info",children:[(0,T.__)("Want to stick with the old widgets?"),(0,S.jsx)("br",{}),(0,S.jsx)(ft.ExternalLink,{href:(0,T.__)("https://wordpress.org/plugins/classic-widgets/"),children:(0,T.__)("Get the Classic Widgets plugin.")})]}),(0,S.jsxs)("p",{className:"customize-widgets-welcome-guide__more-info",children:[(0,T.__)("New to the block editor?"),(0,S.jsx)("br",{}),(0,S.jsx)(ft.ExternalLink,{href:(0,T.__)("https://wordpress.org/documentation/article/wordpress-block-editor/"),children:(0,T.__)("Here's a detailed guide.")})]})]})}var Xr=a(w(),1),Q=a(at(),1),Yr=a(q(),1),Zr=a(b(),1),Mt=a(E(),1);function Jr({undo:t,redo:e,save:r}){return(0,Q.useShortcut)("core/customize-widgets/undo",o=>{t(),o.preventDefault()}),(0,Q.useShortcut)("core/customize-widgets/redo",o=>{e(),o.preventDefault()}),(0,Q.useShortcut)("core/customize-widgets/save",o=>{o.preventDefault(),r()}),null}function aa(){let{registerShortcut:t,unregisterShortcut:e}=(0,Zr.useDispatch)(Q.store);return(0,Xr.useEffect)(()=>(t({name:"core/customize-widgets/undo",category:"global",description:(0,Mt.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),t({name:"core/customize-widgets/redo",category:"global",description:(0,Mt.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"},aliases:(0,Yr.isAppleOS)()?[]:[{modifier:"primary",character:"y"}]}),t({name:"core/customize-widgets/save",category:"global",description:(0,Mt.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),()=>{e("core/customize-widgets/undo"),e("core/customize-widgets/redo"),e("core/customize-widgets/save")}),[t]),null}Jr.Register=aa;var ge=Jr;var Rt=a(w(),1),Ot=a(z(),1),Qr=a(b(),1),to=a(c(),1);function eo(t){let e=(0,Rt.useRef)(),r=(0,Qr.useSelect)(o=>o(Ot.store).getBlockCount()===0);return(0,Rt.useEffect)(()=>{if(r&&e.current){let{ownerDocument:o}=e.current;(!o.activeElement||o.activeElement===o.body)&&e.current.focus()}},[r]),(0,to.jsx)(Ot.ButtonBlockAppender,{...t,ref:e})}var v=a(c(),1),{ExperimentalBlockCanvas:sa}=nt(L.privateApis),{BlockKeyboardShortcuts:ia}=nt(lo.privateApis);function no({blockEditorSettings:t,sidebar:e,inserter:r,inspector:o}){let[s,i]=Ir(r),d=(0,ro.useViewportMatch)("small"),{hasUploadPermissions:l,isFixedToolbarActive:u,keepCaretInsideBlock:n,isWelcomeGuideActive:f}=(0,ao.useSelect)(m=>{let{get:_}=m(io.store);return{hasUploadPermissions:m(oo.store).canUser("create",{kind:"postType",name:"attachment"})??!0,isFixedToolbarActive:!!_("core/customize-widgets","fixedToolbar"),keepCaretInsideBlock:!!_("core/customize-widgets","keepCaretInsideBlock"),isWelcomeGuideActive:!!_("core/customize-widgets","welcomeGuide")}},[]),h=(0,Nt.useMemo)(()=>{let m;return l&&(m=({onError:_,...ct})=>{(0,so.uploadMedia)({wpAllowedMimeTypes:t.allowedMimeTypes,onError:({message:M})=>_(M),...ct})}),{...t,__experimentalSetIsInserterOpened:i,mediaUpload:m,hasFixedToolbar:u||!d,keepCaretInsideBlock:n,editorTool:"edit",__unstableHasCustomAppender:!0}},[l,t,u,d,n,i]);return f?(0,v.jsx)($r,{sidebar:e}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(ge.Register,{}),(0,v.jsx)(ia,{}),(0,v.jsxs)(Gr,{sidebar:e,settings:h,children:[(0,v.jsx)(ge,{undo:e.undo,redo:e.redo,save:e.save}),(0,v.jsx)(Cr,{sidebar:e,inserter:r,isInserterOpened:s,setIsInserterOpened:i,isFixedToolbarActive:u||!d}),(u||!d)&&(0,v.jsx)(L.BlockToolbar,{hideDragHandle:!0}),(0,v.jsx)(sa,{shouldIframe:!1,styles:h.defaultEditorStyles,height:"100%",children:(0,v.jsx)(L.BlockList,{renderAppender:eo})}),(0,Nt.createPortal)((0,v.jsx)("form",{onSubmit:m=>m.preventDefault(),children:(0,v.jsx)(L.BlockInspector,{})}),o.contentContainer[0])]}),(0,v.jsx)(L.__unstableBlockSettingsMenuFirstItem,{children:({onClose:m})=>(0,v.jsx)(Ye,{inspector:o,closeMenu:m})})]})}var U=a(w(),1),fo=a(c(),1),Ft=(0,U.createContext)();Ft.displayName="SidebarControlsContext";function uo({sidebarControls:t,activeSidebarControl:e,children:r}){let o=(0,U.useMemo)(()=>({sidebarControls:t,activeSidebarControl:e}),[t,e]);return(0,fo.jsx)(Ft.Provider,{value:o,children:r})}function mo(){let{sidebarControls:t}=(0,U.useContext)(Ft);return t}function co(){let{activeSidebarControl:t}=(0,U.useContext)(Ft);return t}var po=a(w(),1),Dt=a(b(),1),we=a(z(),1);function ho(t,e){let{hasSelectedBlock:r,hasMultiSelection:o}=(0,Dt.useSelect)(we.store),{clearSelectedBlock:s}=(0,Dt.useDispatch)(we.store);(0,po.useEffect)(()=>{if(e.current&&t){let i=function(m){(r()||o())&&m&&f.contains(m)&&!n.contains(m)&&!e.current.contains(m)&&!m.closest('[role="dialog"]')&&!u.expanded()&&s()},d=function(m){i(m.target)},l=function(){i(f.activeElement)},u=t.inspector,n=t.container[0],f=n.ownerDocument,h=f.defaultView;return f.addEventListener("mousedown",d),h.addEventListener("blur",l),()=>{f.removeEventListener("mousedown",d),h.removeEventListener("blur",l)}}},[e,t,r,o,s])}var F=a(c(),1);function go({api:t,sidebarControls:e,blockEditorSettings:r}){let[o,s]=(0,D.useState)(null),i=document.getElementById("customize-theme-controls"),d=(0,D.useRef)();ho(o,d),(0,D.useEffect)(()=>{let n=e.map(f=>f.subscribe(h=>{h&&s(f)}));return()=>{n.forEach(f=>f())}},[e]);let l=o&&(0,D.createPortal)((0,F.jsx)(Pe,{children:(0,F.jsx)(no,{blockEditorSettings:r,sidebar:o.sidebarAdapter,inserter:o.inserter,inspector:o.inspector},o.id)}),o.container[0]),u=i&&(0,D.createPortal)((0,F.jsx)("div",{className:"customize-widgets-popover",ref:d,children:(0,F.jsx)(Pt.Popover.Slot,{})}),i);return(0,F.jsx)(Pt.SlotFillProvider,{children:(0,F.jsx)(uo,{sidebarControls:e,activeSidebarControl:o,children:(0,F.jsxs)(Rr,{api:t,sidebarControls:e,children:[l,u]})})})}var jt=a(E(),1);function wo(){let{wp:{customize:t}}=window;return class extends t.Section{constructor(r,o){super(r,o),this.parentSection=o.parentSection,this.returnFocusWhenClose=null,this._isOpen=!1}get isOpen(){return this._isOpen}set isOpen(r){this._isOpen=r,this.triggerActiveCallbacks()}ready(){this.contentContainer[0].classList.add("customize-widgets-layout__inspector")}isContextuallyActive(){return this.isOpen}onChangeExpanded(r,o){super.onChangeExpanded(r,o),this.parentSection&&!o.unchanged&&(r?this.parentSection.collapse({manualTransition:!0}):this.parentSection.expand({manualTransition:!0,completeCallback:()=>{this.returnFocusWhenClose&&!this.contentContainer[0].contains(this.returnFocusWhenClose)&&this.returnFocusWhenClose.focus()}}))}open({returnFocusWhenClose:r}={}){this.isOpen=!0,this.returnFocusWhenClose=r,this.expand({allowMultiple:!0})}close(){this.collapse({allowMultiple:!0})}collapse(r){this.isOpen=!1,super.collapse(r)}triggerActiveCallbacks(){this.active.callbacks.fireWith(this.active,[!1,!0])}}}var da=t=>`widgets-inspector-${t}`;function bo(){let{wp:{customize:t}}=window,e=window.matchMedia("(prefers-reduced-motion: reduce)"),r=e.matches;return e.addEventListener("change",o=>{r=o.matches}),class extends t.Section{ready(){let s=wo();this.inspector=new s(da(this.id),{title:(0,jt.__)("Block Settings"),parentSection:this,customizeAction:[(0,jt.__)("Customizing"),(0,jt.__)("Widgets"),this.params.title].join(" \u25B8 ")}),t.section.add(this.inspector),this.contentContainer[0].classList.add("customize-widgets__sidebar-section")}hasSubSectionOpened(){return this.inspector.expanded()}onChangeExpanded(s,i){let d=this.controls(),l={...i,completeCallback(){d.forEach(u=>{u.onChangeSectionExpanded?.(s,l)}),i.completeCallback?.()}};if(l.manualTransition){s?(this.contentContainer.addClass(["busy","open"]),this.contentContainer.removeClass("is-sub-section-open"),this.contentContainer.closest(".wp-full-overlay").addClass("section-open")):(this.contentContainer.addClass(["busy","is-sub-section-open"]),this.contentContainer.closest(".wp-full-overlay").addClass("section-open"),this.contentContainer.removeClass("open"));let u=()=>{this.contentContainer.removeClass("busy"),l.completeCallback()};r?u():this.contentContainer.one("transitionend",u)}else super.onChangeExpanded(s,l)}}}var Bo=a(b(),1);var{wp:yo}=window;function vo(t){let e=t.match(/^(.+)-(\d+)$/);return e?{idBase:e[1],number:parseInt(e[2],10)}:{idBase:t}}function be(t){let{idBase:e,number:r}=vo(t);return r?`widget_${e}[${r}]`:`widget_${e}`}function la(t,e,r){let o=!1,s;function i(...d){let l=(o?e:t).apply(this,d);return o=!0,clearTimeout(s),s=setTimeout(()=>{o=!1},r),l}return i.cancel=()=>{o=!1,clearTimeout(s)},i}var So=class{constructor(t,e){this.setting=t,this.api=e,this.locked=!1,this.widgetsCache=new WeakMap,this.subscribers=new Set,this.history=[this._getWidgetIds().map(r=>this.getWidget(r))],this.historyIndex=0,this.historySubscribers=new Set,this._debounceSetHistory=la(this._pushHistory,this._replaceHistory,1e3),this.setting.bind(this._handleSettingChange.bind(this)),this.api.bind("change",this._handleAllSettingsChange.bind(this)),this.undo=this.undo.bind(this),this.redo=this.redo.bind(this),this.save=this.save.bind(this)}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}getWidgets(){return this.history[this.historyIndex]}_emit(...t){for(let e of this.subscribers)e(...t)}_getWidgetIds(){return this.setting.get()}_pushHistory(){this.history=[...this.history.slice(0,this.historyIndex+1),this._getWidgetIds().map(t=>this.getWidget(t))],this.historyIndex+=1,this.historySubscribers.forEach(t=>t())}_replaceHistory(){this.history[this.historyIndex]=this._getWidgetIds().map(t=>this.getWidget(t))}_handleSettingChange(){if(this.locked)return;let t=this.getWidgets();this._pushHistory(),this._emit(t,this.getWidgets())}_handleAllSettingsChange(t){if(this.locked||!t.id.startsWith("widget_"))return;let e=it(t.id);if(!this.setting.get().includes(e))return;let r=this.getWidgets();this._pushHistory(),this._emit(r,this.getWidgets())}_createWidget(t){let e=yo.customize.Widgets.availableWidgets.findWhere({id_base:t.idBase}),r=t.number;e.get("is_multi")&&!r&&(e.set("multi_number",e.get("multi_number")+1),r=e.get("multi_number"));let o=r?`widget_${t.idBase}[${r}]`:`widget_${t.idBase}`,s={transport:yo.customize.Widgets.data.selectiveRefreshableWidgets[e.get("id_base")]?"postMessage":"refresh",previewer:this.setting.previewer};return this.api.create(o,o,"",s).set(t.instance),it(o)}_removeWidget(t){let e=be(t.id),r=this.api(e);if(r){let o=r.get();this.widgetsCache.delete(o)}this.api.remove(e)}_updateWidget(t){let e=this.getWidget(t.id);if(e===t)return t.id;if(e.idBase&&t.idBase&&e.idBase===t.idBase){let r=be(t.id);return this.api(r).set(t.instance),t.id}return this._removeWidget(t),this._createWidget(t)}getWidget(t){if(!t)return null;let{idBase:e,number:r}=vo(t),o=be(t),s=this.api(o);if(!s)return null;let i=s.get();if(this.widgetsCache.has(i))return this.widgetsCache.get(i);let d={id:t,idBase:e,number:r,instance:i};return this.widgetsCache.set(i,d),d}_updateWidgets(t){this.locked=!0;let e=[],r=t.map(s=>{if(s.id&&this.getWidget(s.id))return e.push(null),this._updateWidget(s);let i=this._createWidget(s);return e.push(i),i});return this.getWidgets().filter(s=>!r.includes(s.id)).forEach(s=>this._removeWidget(s)),this.setting.set(r),this.locked=!1,e}setWidgets(t){let e=this._updateWidgets(t);return this._debounceSetHistory(),e}hasUndo(){return this.historyIndex>0}hasRedo(){return this.historyIndex<this.history.length-1}_seek(t){let e=this.getWidgets();this.historyIndex=t;let r=this.history[this.historyIndex];this._updateWidgets(r),this._emit(e,this.getWidgets()),this.historySubscribers.forEach(o=>o()),this._debounceSetHistory.cancel()}undo(){this.hasUndo()&&this._seek(this.historyIndex-1)}redo(){this.hasRedo()&&this._seek(this.historyIndex+1)}subscribeHistory(t){return this.historySubscribers.add(t),()=>{this.historySubscribers.delete(t)}}save(){this.api.previewer.save()}};var xo=a(q(),1),Co=a(_o(),1),ye=a(b(),1);function Io(){let{wp:{customize:t}}=window,e=t.OuterSection;return t.OuterSection=class extends e{onChangeExpanded(r,o){return r&&t.section.each(s=>{s.params.type==="outer"&&s.id!==this.id&&s.expanded()&&s.collapse()}),super.onChangeExpanded(r,o)}},t.sectionConstructor.outer=t.OuterSection,class extends t.OuterSection{constructor(...o){super(...o),this.params.type="outer",this.activeElementBeforeExpanded=null,this.contentContainer[0].ownerDocument.defaultView.addEventListener("keydown",i=>{this.expanded()&&(i.keyCode===xo.ESCAPE||i.code==="Escape")&&!i.defaultPrevented&&(i.preventDefault(),i.stopPropagation(),(0,ye.dispatch)(x).setIsInserterOpened(!1))},!0),this.contentContainer.addClass("widgets-inserter"),this.isFromInternalAction=!1,this.expanded.bind(()=>{this.isFromInternalAction||(0,ye.dispatch)(x).setIsInserterOpened(this.expanded()),this.isFromInternalAction=!1})}open(){if(!this.expanded()){let o=this.contentContainer[0];this.activeElementBeforeExpanded=o.ownerDocument.activeElement,this.isFromInternalAction=!0,this.expand({completeCallback(){let s=Co.focus.tabbable.find(o)[1];s&&s.focus()}})}}close(){if(this.expanded()){let o=this.contentContainer[0],s=o.ownerDocument.activeElement;this.isFromInternalAction=!0,this.collapse({completeCallback(){o.contains(s)&&this.activeElementBeforeExpanded&&this.activeElementBeforeExpanded.focus()}})}}}}var na=t=>`widgets-inserter-${t}`;function Wo(){let{wp:{customize:t}}=window;return class extends t.Control{constructor(...r){super(...r),this.subscribers=new Set}ready(){let r=Io();this.inserter=new r(na(this.id),{}),t.section.add(this.inserter),this.sectionInstance=t.section(this.section()),this.inspector=this.sectionInstance.inspector,this.sidebarAdapter=new So(this.setting,t)}subscribe(r){return this.subscribers.add(r),()=>{this.subscribers.delete(r)}}onChangeSectionExpanded(r,o){o.unchanged||(r||(0,Bo.dispatch)(x).setIsInserterOpened(!1),this.subscribers.forEach(s=>s(r,o)))}}}var tt=a(z(),1),Eo=a(K(),1),ut=a(b(),1),zo=a(ot(),1),Ht=a(G(),1);var H=a(c(),1),fa=(0,Eo.createHigherOrderComponent)(t=>e=>{let r=(0,Ht.getWidgetIdFromBlock)(e),o=mo(),s=co(),i=o?.length>1,d=e.name,l=e.clientId,u=(0,ut.useSelect)(_=>_(tt.store).canInsertBlockType(d,""),[d]),n=(0,ut.useSelect)(_=>_(tt.store).getBlock(l),[l]),{removeBlock:f}=(0,ut.useDispatch)(tt.store),[,h]=Lt();function m(_){let ct=o.find(M=>M.id===_);if(r){let M=s.setting,Kt=ct.setting;M(M().filter(qt=>qt!==r)),Kt([...Kt(),r])}else{let M=ct.sidebarAdapter;f(l),r=M.setWidgets([...M.getWidgets(),dt(n)]).reverse().find(qt=>!!qt)}h(r)}return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(t,{...e},"edit"),i&&u&&(0,H.jsx)(tt.BlockControls,{children:(0,H.jsx)(Ht.MoveToWidgetArea,{widgetAreas:o.map(_=>({id:_.id,name:_.params.label,description:_.params.description})),currentWidgetAreaId:s?.id,onSelect:m})})]})},"withMoveToSidebarToolbarItem");(0,zo.addFilter)("editor.BlockEdit","core/customize-widgets/block-edit",fa);var Ao=a(ot(),1),To=a(Jt(),1),ua=()=>To.MediaUpload;(0,Ao.addFilter)("editor.MediaUpload","core/edit-widgets/replace-media-upload",ua);var Lo=a(K(),1),Mo=a(ot(),1),Ro=a(c(),1),{wp:ma}=window,ca=(0,Lo.createHigherOrderComponent)(t=>e=>{let{idBase:r}=e.attributes,o=ma.customize.Widgets.data.availableWidgets.find(s=>s.id_base===r)?.is_wide??!1;return(0,Ro.jsx)(t,{...e,isWide:o},"edit")},"withWideWidgetDisplay");(0,Mo.addFilter)("editor.BlockEdit","core/customize-widgets/wide-widget-display",ca);var Se=a(c(),1),{wp:mt}=window,pa=["core/more","core/block","core/freeform","core/template-part"];function ha(t,e){(0,ve.dispatch)(Oo.store).setDefaults("core/customize-widgets",{fixedToolbar:!1,welcomeGuide:!0}),(0,ve.dispatch)(Gt.store).reapplyBlockTypeFilters();let r=(0,Ut.__experimentalGetCoreBlocks)().filter(i=>!(pa.includes(i.name)||i.name.startsWith("core/post")||i.name.startsWith("core/query")||i.name.startsWith("core/site")||i.name.startsWith("core/navigation")||i.name.startsWith("core/term")));(0,Ut.registerCoreBlocks)(r),(0,et.registerLegacyWidgetBlock)(),(0,et.registerLegacyWidgetVariations)(e),(0,et.registerWidgetGroupBlock)(),(0,Gt.setFreeformContentHandlerName)("core/html");let o=Wo(e);mt.customize.sectionConstructor.sidebar=bo(),mt.customize.controlConstructor.sidebar_block_editor=o;let s=document.createElement("div");document.body.appendChild(s),mt.customize.bind("ready",()=>{let i=[];mt.customize.control.each(d=>{d instanceof o&&i.push(d)}),(0,Vt.createRoot)(s).render((0,Se.jsx)(Vt.StrictMode,{children:(0,Se.jsx)(go,{api:mt.customize,sidebarControls:i,blockEditorSettings:e})}))})}return Ho(ga);})();
                                                                                                                                                                                                                                                                                                                                                                                                                                             dist/data-controls.js                                                                               0000644                 00000010206 15212563776 0010634 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).dataControls = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/api-fetch
  var require_api_fetch = __commonJS({
    "package-external:@wordpress/api-fetch"(exports, module) {
      module.exports = window.wp.apiFetch;
    }
  });

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/deprecated
  var require_deprecated = __commonJS({
    "package-external:@wordpress/deprecated"(exports, module) {
      module.exports = window.wp.deprecated;
    }
  });

  // packages/data-controls/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    __unstableAwaitPromise: () => __unstableAwaitPromise,
    apiFetch: () => apiFetch,
    controls: () => controls,
    dispatch: () => dispatch,
    select: () => select,
    syncSelect: () => syncSelect
  });
  var import_api_fetch = __toESM(require_api_fetch(), 1);
  var import_data = __toESM(require_data(), 1);
  var import_deprecated = __toESM(require_deprecated(), 1);
  function apiFetch(request) {
    return {
      type: "API_FETCH",
      request
    };
  }
  function select(storeNameOrDescriptor, selectorName, ...args) {
    (0, import_deprecated.default)("`select` control in `@wordpress/data-controls`", {
      since: "5.7",
      alternative: "built-in `resolveSelect` control in `@wordpress/data`"
    });
    return import_data.controls.resolveSelect(
      storeNameOrDescriptor,
      selectorName,
      ...args
    );
  }
  function syncSelect(storeNameOrDescriptor, selectorName, ...args) {
    (0, import_deprecated.default)("`syncSelect` control in `@wordpress/data-controls`", {
      since: "5.7",
      alternative: "built-in `select` control in `@wordpress/data`"
    });
    return import_data.controls.select(storeNameOrDescriptor, selectorName, ...args);
  }
  function dispatch(storeNameOrDescriptor, actionName, ...args) {
    (0, import_deprecated.default)("`dispatch` control in `@wordpress/data-controls`", {
      since: "5.7",
      alternative: "built-in `dispatch` control in `@wordpress/data`"
    });
    return import_data.controls.dispatch(storeNameOrDescriptor, actionName, ...args);
  }
  var __unstableAwaitPromise = function(promise) {
    return {
      type: "AWAIT_PROMISE",
      promise
    };
  };
  var controls = {
    AWAIT_PROMISE({ promise }) {
      return promise;
    },
    API_FETCH({ request }) {
      return (0, import_api_fetch.default)(request);
    }
  };
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                                                                                          dist/data-controls.min.js                                                                           0000644                 00000003363 15212564000 0011401 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).dataControls=(()=>{var A=Object.create;var n=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var _=Object.getPrototypeOf,F=Object.prototype.hasOwnProperty;var i=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),P=(t,e)=>{for(var r in e)n(t,r,{get:e[r],enumerable:!0})},p=(t,e,r,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of S(e))!F.call(t,o)&&o!==r&&n(t,o,{get:()=>e[o],enumerable:!(l=I(e,o))||l.enumerable});return t};var a=(t,e,r)=>(r=t!=null?A(_(t)):{},p(e||!t||!t.__esModule?n(r,"default",{value:t,enumerable:!0}):r,t)),b=t=>p(n({},"__esModule",{value:!0}),t);var u=i((O,d)=>{d.exports=window.wp.apiFetch});var f=i((R,w)=>{w.exports=window.wp.data});var m=i((W,h)=>{h.exports=window.wp.deprecated});var H={};P(H,{__unstableAwaitPromise:()=>C,apiFetch:()=>x,controls:()=>g,dispatch:()=>T,select:()=>y,syncSelect:()=>E});var v=a(u(),1),s=a(f(),1),c=a(m(),1);function x(t){return{type:"API_FETCH",request:t}}function y(t,e,...r){return(0,c.default)("`select` control in `@wordpress/data-controls`",{since:"5.7",alternative:"built-in `resolveSelect` control in `@wordpress/data`"}),s.controls.resolveSelect(t,e,...r)}function E(t,e,...r){return(0,c.default)("`syncSelect` control in `@wordpress/data-controls`",{since:"5.7",alternative:"built-in `select` control in `@wordpress/data`"}),s.controls.select(t,e,...r)}function T(t,e,...r){return(0,c.default)("`dispatch` control in `@wordpress/data-controls`",{since:"5.7",alternative:"built-in `dispatch` control in `@wordpress/data`"}),s.controls.dispatch(t,e,...r)}var C=function(t){return{type:"AWAIT_PROMISE",promise:t}},g={AWAIT_PROMISE({promise:t}){return t},API_FETCH({request:t}){return(0,v.default)(t)}};return b(H);})();
                                                                                                                                                                                                                                                                             dist/data.js                                                                                        0000644                 00000245443 15212564002 0006767 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).data = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/deprecated
  var require_deprecated = __commonJS({
    "package-external:@wordpress/deprecated"(exports, module) {
      module.exports = window.wp.deprecated;
    }
  });

  // node_modules/equivalent-key-map/equivalent-key-map.js
  var require_equivalent_key_map = __commonJS({
    "node_modules/equivalent-key-map/equivalent-key-map.js"(exports, module) {
      "use strict";
      function _typeof(obj) {
        if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
          _typeof = function(obj2) {
            return typeof obj2;
          };
        } else {
          _typeof = function(obj2) {
            return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
          };
        }
        return _typeof(obj);
      }
      function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
          throw new TypeError("Cannot call a class as a function");
        }
      }
      function _defineProperties(target, props) {
        for (var i = 0; i < props.length; i++) {
          var descriptor = props[i];
          descriptor.enumerable = descriptor.enumerable || false;
          descriptor.configurable = true;
          if ("value" in descriptor) descriptor.writable = true;
          Object.defineProperty(target, descriptor.key, descriptor);
        }
      }
      function _createClass(Constructor, protoProps, staticProps) {
        if (protoProps) _defineProperties(Constructor.prototype, protoProps);
        if (staticProps) _defineProperties(Constructor, staticProps);
        return Constructor;
      }
      function getValuePair(instance, key) {
        var _map = instance._map, _arrayTreeMap = instance._arrayTreeMap, _objectTreeMap = instance._objectTreeMap;
        if (_map.has(key)) {
          return _map.get(key);
        }
        var properties = Object.keys(key).sort();
        var map = Array.isArray(key) ? _arrayTreeMap : _objectTreeMap;
        for (var i = 0; i < properties.length; i++) {
          var property = properties[i];
          map = map.get(property);
          if (map === void 0) {
            return;
          }
          var propertyValue = key[property];
          map = map.get(propertyValue);
          if (map === void 0) {
            return;
          }
        }
        var valuePair = map.get("_ekm_value");
        if (!valuePair) {
          return;
        }
        _map.delete(valuePair[0]);
        valuePair[0] = key;
        map.set("_ekm_value", valuePair);
        _map.set(key, valuePair);
        return valuePair;
      }
      var EquivalentKeyMap3 = /* @__PURE__ */ (function() {
        function EquivalentKeyMap4(iterable) {
          _classCallCheck(this, EquivalentKeyMap4);
          this.clear();
          if (iterable instanceof EquivalentKeyMap4) {
            var iterablePairs = [];
            iterable.forEach(function(value, key) {
              iterablePairs.push([key, value]);
            });
            iterable = iterablePairs;
          }
          if (iterable != null) {
            for (var i = 0; i < iterable.length; i++) {
              this.set(iterable[i][0], iterable[i][1]);
            }
          }
        }
        _createClass(EquivalentKeyMap4, [{
          key: "set",
          /**
           * Add or update an element with a specified key and value.
           *
           * @param {*} key   The key of the element to add.
           * @param {*} value The value of the element to add.
           *
           * @return {EquivalentKeyMap} Map instance.
           */
          value: function set(key, value) {
            if (key === null || _typeof(key) !== "object") {
              this._map.set(key, value);
              return this;
            }
            var properties = Object.keys(key).sort();
            var valuePair = [key, value];
            var map = Array.isArray(key) ? this._arrayTreeMap : this._objectTreeMap;
            for (var i = 0; i < properties.length; i++) {
              var property = properties[i];
              if (!map.has(property)) {
                map.set(property, new EquivalentKeyMap4());
              }
              map = map.get(property);
              var propertyValue = key[property];
              if (!map.has(propertyValue)) {
                map.set(propertyValue, new EquivalentKeyMap4());
              }
              map = map.get(propertyValue);
            }
            var previousValuePair = map.get("_ekm_value");
            if (previousValuePair) {
              this._map.delete(previousValuePair[0]);
            }
            map.set("_ekm_value", valuePair);
            this._map.set(key, valuePair);
            return this;
          }
          /**
           * Returns a specified element.
           *
           * @param {*} key The key of the element to return.
           *
           * @return {?*} The element associated with the specified key or undefined
           *              if the key can't be found.
           */
        }, {
          key: "get",
          value: function get(key) {
            if (key === null || _typeof(key) !== "object") {
              return this._map.get(key);
            }
            var valuePair = getValuePair(this, key);
            if (valuePair) {
              return valuePair[1];
            }
          }
          /**
           * Returns a boolean indicating whether an element with the specified key
           * exists or not.
           *
           * @param {*} key The key of the element to test for presence.
           *
           * @return {boolean} Whether an element with the specified key exists.
           */
        }, {
          key: "has",
          value: function has(key) {
            if (key === null || _typeof(key) !== "object") {
              return this._map.has(key);
            }
            return getValuePair(this, key) !== void 0;
          }
          /**
           * Removes the specified element.
           *
           * @param {*} key The key of the element to remove.
           *
           * @return {boolean} Returns true if an element existed and has been
           *                   removed, or false if the element does not exist.
           */
        }, {
          key: "delete",
          value: function _delete(key) {
            if (!this.has(key)) {
              return false;
            }
            this.set(key, void 0);
            return true;
          }
          /**
           * Executes a provided function once per each key/value pair, in insertion
           * order.
           *
           * @param {Function} callback Function to execute for each element.
           * @param {*}        thisArg  Value to use as `this` when executing
           *                            `callback`.
           */
        }, {
          key: "forEach",
          value: function forEach(callback) {
            var _this = this;
            var thisArg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this;
            this._map.forEach(function(value, key) {
              if (key !== null && _typeof(key) === "object") {
                value = value[1];
              }
              callback.call(thisArg, value, key, _this);
            });
          }
          /**
           * Removes all elements.
           */
        }, {
          key: "clear",
          value: function clear() {
            this._map = /* @__PURE__ */ new Map();
            this._arrayTreeMap = /* @__PURE__ */ new Map();
            this._objectTreeMap = /* @__PURE__ */ new Map();
          }
        }, {
          key: "size",
          get: function get() {
            return this._map.size;
          }
        }]);
        return EquivalentKeyMap4;
      })();
      module.exports = EquivalentKeyMap3;
    }
  });

  // package-external:@wordpress/redux-routine
  var require_redux_routine = __commonJS({
    "package-external:@wordpress/redux-routine"(exports, module) {
      module.exports = window.wp.reduxRoutine;
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // package-external:@wordpress/private-apis
  var require_private_apis = __commonJS({
    "package-external:@wordpress/private-apis"(exports, module) {
      module.exports = window.wp.privateApis;
    }
  });

  // node_modules/deepmerge/dist/cjs.js
  var require_cjs = __commonJS({
    "node_modules/deepmerge/dist/cjs.js"(exports, module) {
      "use strict";
      var isMergeableObject = function isMergeableObject2(value) {
        return isNonNullObject(value) && !isSpecial(value);
      };
      function isNonNullObject(value) {
        return !!value && typeof value === "object";
      }
      function isSpecial(value) {
        var stringValue = Object.prototype.toString.call(value);
        return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
      }
      var canUseSymbol = typeof Symbol === "function" && Symbol.for;
      var REACT_ELEMENT_TYPE = canUseSymbol ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
      function isReactElement(value) {
        return value.$$typeof === REACT_ELEMENT_TYPE;
      }
      function emptyTarget(val) {
        return Array.isArray(val) ? [] : {};
      }
      function cloneUnlessOtherwiseSpecified(value, options) {
        return options.clone !== false && options.isMergeableObject(value) ? deepmerge2(emptyTarget(value), value, options) : value;
      }
      function defaultArrayMerge(target, source, options) {
        return target.concat(source).map(function(element) {
          return cloneUnlessOtherwiseSpecified(element, options);
        });
      }
      function getMergeFunction(key, options) {
        if (!options.customMerge) {
          return deepmerge2;
        }
        var customMerge = options.customMerge(key);
        return typeof customMerge === "function" ? customMerge : deepmerge2;
      }
      function getEnumerableOwnPropertySymbols(target) {
        return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
          return Object.propertyIsEnumerable.call(target, symbol);
        }) : [];
      }
      function getKeys(target) {
        return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
      }
      function propertyIsOnObject(object, property) {
        try {
          return property in object;
        } catch (_) {
          return false;
        }
      }
      function propertyIsUnsafe(target, key) {
        return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
      }
      function mergeObject(target, source, options) {
        var destination = {};
        if (options.isMergeableObject(target)) {
          getKeys(target).forEach(function(key) {
            destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
          });
        }
        getKeys(source).forEach(function(key) {
          if (propertyIsUnsafe(target, key)) {
            return;
          }
          if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
            destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
          } else {
            destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
          }
        });
        return destination;
      }
      function deepmerge2(target, source, options) {
        options = options || {};
        options.arrayMerge = options.arrayMerge || defaultArrayMerge;
        options.isMergeableObject = options.isMergeableObject || isMergeableObject;
        options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
        var sourceIsArray = Array.isArray(source);
        var targetIsArray = Array.isArray(target);
        var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
        if (!sourceAndTargetTypesMatch) {
          return cloneUnlessOtherwiseSpecified(source, options);
        } else if (sourceIsArray) {
          return options.arrayMerge(target, source, options);
        } else {
          return mergeObject(target, source, options);
        }
      }
      deepmerge2.all = function deepmergeAll(array, options) {
        if (!Array.isArray(array)) {
          throw new Error("first argument should be an array");
        }
        return array.reduce(function(prev, next) {
          return deepmerge2(prev, next, options);
        }, {});
      };
      var deepmerge_1 = deepmerge2;
      module.exports = deepmerge_1;
    }
  });

  // package-external:@wordpress/priority-queue
  var require_priority_queue = __commonJS({
    "package-external:@wordpress/priority-queue"(exports, module) {
      module.exports = window.wp.priorityQueue;
    }
  });

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/is-shallow-equal
  var require_is_shallow_equal = __commonJS({
    "package-external:@wordpress/is-shallow-equal"(exports, module) {
      module.exports = window.wp.isShallowEqual;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // packages/data/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    AsyncModeProvider: () => context_default2,
    RegistryConsumer: () => RegistryConsumer,
    RegistryProvider: () => context_default,
    combineReducers: () => combineReducers2,
    controls: () => controls,
    createReduxStore: () => createReduxStore,
    createRegistry: () => createRegistry,
    createRegistryControl: () => createRegistryControl,
    createRegistrySelector: () => createRegistrySelector,
    createSelector: () => rememo_default,
    dispatch: () => dispatch2,
    plugins: () => plugins_exports,
    register: () => register,
    registerGenericStore: () => registerGenericStore,
    registerStore: () => registerStore,
    resolveSelect: () => resolveSelect2,
    select: () => select2,
    subscribe: () => subscribe,
    suspendSelect: () => suspendSelect,
    use: () => use,
    useDispatch: () => use_dispatch_default,
    useRegistry: () => useRegistry,
    useSelect: () => useSelect,
    useSuspenseSelect: () => useSuspenseSelect,
    withDispatch: () => with_dispatch_default,
    withRegistry: () => with_registry_default,
    withSelect: () => with_select_default
  });

  // packages/data/build-module/registry.mjs
  var import_deprecated2 = __toESM(require_deprecated(), 1);

  // node_modules/redux/dist/redux.mjs
  var $$observable = /* @__PURE__ */ (() => typeof Symbol === "function" && Symbol.observable || "@@observable")();
  var symbol_observable_default = $$observable;
  var randomString = () => Math.random().toString(36).substring(7).split("").join(".");
  var ActionTypes = {
    INIT: `@@redux/INIT${/* @__PURE__ */ randomString()}`,
    REPLACE: `@@redux/REPLACE${/* @__PURE__ */ randomString()}`,
    PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${randomString()}`
  };
  var actionTypes_default = ActionTypes;
  function isPlainObject(obj) {
    if (typeof obj !== "object" || obj === null)
      return false;
    let proto = obj;
    while (Object.getPrototypeOf(proto) !== null) {
      proto = Object.getPrototypeOf(proto);
    }
    return Object.getPrototypeOf(obj) === proto || Object.getPrototypeOf(obj) === null;
  }
  function miniKindOf(val) {
    if (val === void 0)
      return "undefined";
    if (val === null)
      return "null";
    const type = typeof val;
    switch (type) {
      case "boolean":
      case "string":
      case "number":
      case "symbol":
      case "function": {
        return type;
      }
    }
    if (Array.isArray(val))
      return "array";
    if (isDate(val))
      return "date";
    if (isError(val))
      return "error";
    const constructorName = ctorName(val);
    switch (constructorName) {
      case "Symbol":
      case "Promise":
      case "WeakMap":
      case "WeakSet":
      case "Map":
      case "Set":
        return constructorName;
    }
    return Object.prototype.toString.call(val).slice(8, -1).toLowerCase().replace(/\s/g, "");
  }
  function ctorName(val) {
    return typeof val.constructor === "function" ? val.constructor.name : null;
  }
  function isError(val) {
    return val instanceof Error || typeof val.message === "string" && val.constructor && typeof val.constructor.stackTraceLimit === "number";
  }
  function isDate(val) {
    if (val instanceof Date)
      return true;
    return typeof val.toDateString === "function" && typeof val.getDate === "function" && typeof val.setDate === "function";
  }
  function kindOf(val) {
    let typeOfVal = typeof val;
    if (true) {
      typeOfVal = miniKindOf(val);
    }
    return typeOfVal;
  }
  function createStore(reducer, preloadedState, enhancer) {
    if (typeof reducer !== "function") {
      throw new Error(false ? formatProdErrorMessage(2) : `Expected the root reducer to be a function. Instead, received: '${kindOf(reducer)}'`);
    }
    if (typeof preloadedState === "function" && typeof enhancer === "function" || typeof enhancer === "function" && typeof arguments[3] === "function") {
      throw new Error(false ? formatProdErrorMessage(0) : "It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");
    }
    if (typeof preloadedState === "function" && typeof enhancer === "undefined") {
      enhancer = preloadedState;
      preloadedState = void 0;
    }
    if (typeof enhancer !== "undefined") {
      if (typeof enhancer !== "function") {
        throw new Error(false ? formatProdErrorMessage(1) : `Expected the enhancer to be a function. Instead, received: '${kindOf(enhancer)}'`);
      }
      return enhancer(createStore)(reducer, preloadedState);
    }
    let currentReducer = reducer;
    let currentState = preloadedState;
    let currentListeners = /* @__PURE__ */ new Map();
    let nextListeners = currentListeners;
    let listenerIdCounter = 0;
    let isDispatching = false;
    function ensureCanMutateNextListeners() {
      if (nextListeners === currentListeners) {
        nextListeners = /* @__PURE__ */ new Map();
        currentListeners.forEach((listener, key) => {
          nextListeners.set(key, listener);
        });
      }
    }
    function getState() {
      if (isDispatching) {
        throw new Error(false ? formatProdErrorMessage(3) : "You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");
      }
      return currentState;
    }
    function subscribe2(listener) {
      if (typeof listener !== "function") {
        throw new Error(false ? formatProdErrorMessage(4) : `Expected the listener to be a function. Instead, received: '${kindOf(listener)}'`);
      }
      if (isDispatching) {
        throw new Error(false ? formatProdErrorMessage(5) : "You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");
      }
      let isSubscribed = true;
      ensureCanMutateNextListeners();
      const listenerId = listenerIdCounter++;
      nextListeners.set(listenerId, listener);
      return function unsubscribe() {
        if (!isSubscribed) {
          return;
        }
        if (isDispatching) {
          throw new Error(false ? formatProdErrorMessage(6) : "You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");
        }
        isSubscribed = false;
        ensureCanMutateNextListeners();
        nextListeners.delete(listenerId);
        currentListeners = null;
      };
    }
    function dispatch3(action) {
      if (!isPlainObject(action)) {
        throw new Error(false ? formatProdErrorMessage(7) : `Actions must be plain objects. Instead, the actual type was: '${kindOf(action)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);
      }
      if (typeof action.type === "undefined") {
        throw new Error(false ? formatProdErrorMessage(8) : 'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');
      }
      if (typeof action.type !== "string") {
        throw new Error(false ? formatProdErrorMessage(17) : `Action "type" property must be a string. Instead, the actual type was: '${kindOf(action.type)}'. Value was: '${action.type}' (stringified)`);
      }
      if (isDispatching) {
        throw new Error(false ? formatProdErrorMessage(9) : "Reducers may not dispatch actions.");
      }
      try {
        isDispatching = true;
        currentState = currentReducer(currentState, action);
      } finally {
        isDispatching = false;
      }
      const listeners = currentListeners = nextListeners;
      listeners.forEach((listener) => {
        listener();
      });
      return action;
    }
    function replaceReducer(nextReducer) {
      if (typeof nextReducer !== "function") {
        throw new Error(false ? formatProdErrorMessage(10) : `Expected the nextReducer to be a function. Instead, received: '${kindOf(nextReducer)}`);
      }
      currentReducer = nextReducer;
      dispatch3({
        type: actionTypes_default.REPLACE
      });
    }
    function observable() {
      const outerSubscribe = subscribe2;
      return {
        /**
         * The minimal observable subscription method.
         * @param observer Any object that can be used as an observer.
         * The observer object should have a `next` method.
         * @returns An object with an `unsubscribe` method that can
         * be used to unsubscribe the observable from the store, and prevent further
         * emission of values from the observable.
         */
        subscribe(observer) {
          if (typeof observer !== "object" || observer === null) {
            throw new Error(false ? formatProdErrorMessage(11) : `Expected the observer to be an object. Instead, received: '${kindOf(observer)}'`);
          }
          function observeState() {
            const observerAsObserver = observer;
            if (observerAsObserver.next) {
              observerAsObserver.next(getState());
            }
          }
          observeState();
          const unsubscribe = outerSubscribe(observeState);
          return {
            unsubscribe
          };
        },
        [symbol_observable_default]() {
          return this;
        }
      };
    }
    dispatch3({
      type: actionTypes_default.INIT
    });
    const store = {
      dispatch: dispatch3,
      subscribe: subscribe2,
      getState,
      replaceReducer,
      [symbol_observable_default]: observable
    };
    return store;
  }
  function compose(...funcs) {
    if (funcs.length === 0) {
      return (arg) => arg;
    }
    if (funcs.length === 1) {
      return funcs[0];
    }
    return funcs.reduce((a, b) => (...args) => a(b(...args)));
  }
  function applyMiddleware(...middlewares) {
    return (createStore2) => (reducer, preloadedState) => {
      const store = createStore2(reducer, preloadedState);
      let dispatch3 = () => {
        throw new Error(false ? formatProdErrorMessage(15) : "Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.");
      };
      const middlewareAPI = {
        getState: store.getState,
        dispatch: (action, ...args) => dispatch3(action, ...args)
      };
      const chain = middlewares.map((middleware) => middleware(middlewareAPI));
      dispatch3 = compose(...chain)(store.dispatch);
      return {
        ...store,
        dispatch: dispatch3
      };
    };
  }

  // packages/data/build-module/redux-store/index.mjs
  var import_equivalent_key_map2 = __toESM(require_equivalent_key_map(), 1);
  var import_redux_routine = __toESM(require_redux_routine(), 1);
  var import_compose = __toESM(require_compose(), 1);

  // packages/data/build-module/redux-store/combine-reducers.mjs
  function combineReducers(reducers) {
    const keys = Object.keys(reducers);
    return function combinedReducer(state = {}, action) {
      const nextState = {};
      let hasChanged = false;
      for (const key of keys) {
        const reducer = reducers[key];
        const prevStateForKey = state[key];
        const nextStateForKey = reducer(prevStateForKey, action);
        nextState[key] = nextStateForKey;
        hasChanged = hasChanged || nextStateForKey !== prevStateForKey;
      }
      return hasChanged ? nextState : state;
    };
  }

  // packages/data/build-module/factory.mjs
  function createRegistrySelector(registrySelector) {
    const selectorsByRegistry = /* @__PURE__ */ new WeakMap();
    const wrappedSelector = (...args) => {
      let selector = selectorsByRegistry.get(wrappedSelector.registry);
      if (!selector) {
        selector = registrySelector(wrappedSelector.registry.select);
        selectorsByRegistry.set(wrappedSelector.registry, selector);
      }
      return selector(...args);
    };
    wrappedSelector.isRegistrySelector = true;
    return wrappedSelector;
  }
  function createRegistryControl(registryControl) {
    registryControl.isRegistryControl = true;
    return registryControl;
  }

  // packages/data/build-module/controls.mjs
  var SELECT = "@@data/SELECT";
  var RESOLVE_SELECT = "@@data/RESOLVE_SELECT";
  var DISPATCH = "@@data/DISPATCH";
  function isObject(object) {
    return object !== null && typeof object === "object";
  }
  function select(storeNameOrDescriptor, selectorName, ...args) {
    return {
      type: SELECT,
      storeKey: isObject(storeNameOrDescriptor) ? storeNameOrDescriptor.name : storeNameOrDescriptor,
      selectorName,
      args
    };
  }
  function resolveSelect(storeNameOrDescriptor, selectorName, ...args) {
    return {
      type: RESOLVE_SELECT,
      storeKey: isObject(storeNameOrDescriptor) ? storeNameOrDescriptor.name : storeNameOrDescriptor,
      selectorName,
      args
    };
  }
  function dispatch(storeNameOrDescriptor, actionName, ...args) {
    return {
      type: DISPATCH,
      storeKey: isObject(storeNameOrDescriptor) ? storeNameOrDescriptor.name : storeNameOrDescriptor,
      actionName,
      args
    };
  }
  var controls = { select, resolveSelect, dispatch };
  var builtinControls = {
    [SELECT]: createRegistryControl(
      (registry) => ({ storeKey, selectorName, args }) => registry.select(storeKey)[selectorName](...args)
    ),
    [RESOLVE_SELECT]: createRegistryControl(
      (registry) => ({ storeKey, selectorName, args }) => {
        const method = registry.select(storeKey)[selectorName].hasResolver ? "resolveSelect" : "select";
        return registry[method](storeKey)[selectorName](
          ...args
        );
      }
    ),
    [DISPATCH]: createRegistryControl(
      (registry) => ({ storeKey, actionName, args }) => registry.dispatch(storeKey)[actionName](...args)
    )
  };

  // packages/data/build-module/lock-unlock.mjs
  var import_private_apis = __toESM(require_private_apis(), 1);
  var { lock, unlock } = (0, import_private_apis.__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/data"
  );

  // node_modules/is-promise/index.mjs
  function isPromise(obj) {
    return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function";
  }

  // packages/data/build-module/promise-middleware.mjs
  var promiseMiddleware = () => (next) => (action) => {
    if (isPromise(action)) {
      return action.then((resolvedAction) => {
        if (resolvedAction) {
          return next(resolvedAction);
        }
      });
    }
    return next(action);
  };
  var promise_middleware_default = promiseMiddleware;

  // packages/data/build-module/resolvers-cache-middleware.mjs
  var createResolversCacheMiddleware = (registry, storeName) => () => (next) => (action) => {
    const resolvers = registry.select(storeName).getCachedResolvers();
    const resolverEntries = Object.entries(resolvers);
    resolverEntries.forEach(([selectorName, resolversByArgs]) => {
      const resolver = registry.stores[storeName]?.resolvers?.[selectorName];
      if (!resolver || !resolver.shouldInvalidate) {
        return;
      }
      resolversByArgs.forEach((value, args) => {
        if (value === void 0) {
          return;
        }
        if (value.status !== "finished" && value.status !== "error") {
          return;
        }
        if (!resolver.shouldInvalidate(action, ...args)) {
          return;
        }
        registry.dispatch(storeName).invalidateResolution(selectorName, args);
      });
    });
    return next(action);
  };
  var resolvers_cache_middleware_default = createResolversCacheMiddleware;

  // packages/data/build-module/redux-store/thunk-middleware.mjs
  function createThunkMiddleware(args) {
    return () => (next) => (action) => {
      if (typeof action === "function") {
        return action(args);
      }
      return next(action);
    };
  }

  // packages/data/build-module/redux-store/metadata/reducer.mjs
  var import_equivalent_key_map = __toESM(require_equivalent_key_map(), 1);

  // packages/data/build-module/redux-store/metadata/utils.mjs
  var onSubKey = (actionProperty) => (reducer) => (state = {}, action) => {
    const key = action[actionProperty];
    if (key === void 0) {
      return state;
    }
    const nextKeyState = reducer(state[key], action);
    if (nextKeyState === state[key]) {
      return state;
    }
    return {
      ...state,
      [key]: nextKeyState
    };
  };
  function selectorArgsToStateKey(args) {
    if (args === void 0 || args === null) {
      return [];
    }
    const len = args.length;
    let idx = len;
    while (idx > 0 && args[idx - 1] === void 0) {
      idx--;
    }
    return idx === len ? args : args.slice(0, idx);
  }

  // packages/data/build-module/redux-store/metadata/reducer.mjs
  var subKeysIsResolved = onSubKey("selectorName")((state = new import_equivalent_key_map.default(), action) => {
    switch (action.type) {
      case "START_RESOLUTION": {
        const nextState = new import_equivalent_key_map.default(state);
        nextState.set(selectorArgsToStateKey(action.args), {
          status: "resolving"
        });
        return nextState;
      }
      case "FINISH_RESOLUTION": {
        const nextState = new import_equivalent_key_map.default(state);
        nextState.set(selectorArgsToStateKey(action.args), {
          status: "finished"
        });
        return nextState;
      }
      case "FAIL_RESOLUTION": {
        const nextState = new import_equivalent_key_map.default(state);
        nextState.set(selectorArgsToStateKey(action.args), {
          status: "error",
          error: action.error
        });
        return nextState;
      }
      case "START_RESOLUTIONS": {
        const nextState = new import_equivalent_key_map.default(state);
        for (const resolutionArgs of action.args) {
          nextState.set(selectorArgsToStateKey(resolutionArgs), {
            status: "resolving"
          });
        }
        return nextState;
      }
      case "FINISH_RESOLUTIONS": {
        const nextState = new import_equivalent_key_map.default(state);
        for (const resolutionArgs of action.args) {
          nextState.set(selectorArgsToStateKey(resolutionArgs), {
            status: "finished"
          });
        }
        return nextState;
      }
      case "FAIL_RESOLUTIONS": {
        const nextState = new import_equivalent_key_map.default(state);
        action.args.forEach((resolutionArgs, idx) => {
          const resolutionState = {
            status: "error",
            error: void 0
          };
          const error = action.errors[idx];
          if (error) {
            resolutionState.error = error;
          }
          nextState.set(
            selectorArgsToStateKey(resolutionArgs),
            resolutionState
          );
        });
        return nextState;
      }
      case "INVALIDATE_RESOLUTION": {
        const nextState = new import_equivalent_key_map.default(state);
        nextState.delete(selectorArgsToStateKey(action.args));
        return nextState;
      }
    }
    return state;
  });
  var isResolved = (state = {}, action) => {
    switch (action.type) {
      case "INVALIDATE_RESOLUTION_FOR_STORE":
        return {};
      case "INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR": {
        if (action.selectorName in state) {
          const {
            [action.selectorName]: removedSelector,
            ...restState
          } = state;
          return restState;
        }
        return state;
      }
      case "START_RESOLUTION":
      case "FINISH_RESOLUTION":
      case "FAIL_RESOLUTION":
      case "START_RESOLUTIONS":
      case "FINISH_RESOLUTIONS":
      case "FAIL_RESOLUTIONS":
      case "INVALIDATE_RESOLUTION":
        return subKeysIsResolved(state, action);
      default:
        return state;
    }
  };
  var reducer_default = isResolved;

  // packages/data/build-module/redux-store/metadata/selectors.mjs
  var selectors_exports = {};
  __export(selectors_exports, {
    countSelectorsByStatus: () => countSelectorsByStatus,
    getCachedResolvers: () => getCachedResolvers,
    getIsResolving: () => getIsResolving,
    getResolutionError: () => getResolutionError,
    getResolutionState: () => getResolutionState,
    hasFinishedResolution: () => hasFinishedResolution,
    hasResolutionFailed: () => hasResolutionFailed,
    hasResolvingSelectors: () => hasResolvingSelectors,
    hasStartedResolution: () => hasStartedResolution,
    isResolving: () => isResolving
  });
  var import_deprecated = __toESM(require_deprecated(), 1);

  // node_modules/rememo/rememo.js
  var LEAF_KEY = {};
  function arrayOf(value) {
    return [value];
  }
  function isObjectLike(value) {
    return !!value && "object" === typeof value;
  }
  function createCache() {
    var cache = {
      clear: function() {
        cache.head = null;
      }
    };
    return cache;
  }
  function isShallowEqual(a, b, fromIndex) {
    var i;
    if (a.length !== b.length) {
      return false;
    }
    for (i = fromIndex; i < a.length; i++) {
      if (a[i] !== b[i]) {
        return false;
      }
    }
    return true;
  }
  function rememo_default(selector, getDependants) {
    var rootCache;
    var normalizedGetDependants = getDependants ? getDependants : arrayOf;
    function getCache(dependants) {
      var caches = rootCache, isUniqueByDependants = true, i, dependant, map, cache;
      for (i = 0; i < dependants.length; i++) {
        dependant = dependants[i];
        if (!isObjectLike(dependant)) {
          isUniqueByDependants = false;
          break;
        }
        if (caches.has(dependant)) {
          caches = caches.get(dependant);
        } else {
          map = /* @__PURE__ */ new WeakMap();
          caches.set(dependant, map);
          caches = map;
        }
      }
      if (!caches.has(LEAF_KEY)) {
        cache = createCache();
        cache.isUniqueByDependants = isUniqueByDependants;
        caches.set(LEAF_KEY, cache);
      }
      return caches.get(LEAF_KEY);
    }
    function clear() {
      rootCache = /* @__PURE__ */ new WeakMap();
    }
    function callSelector() {
      var len = arguments.length, cache, node, i, args, dependants;
      args = new Array(len);
      for (i = 0; i < len; i++) {
        args[i] = arguments[i];
      }
      dependants = normalizedGetDependants.apply(null, args);
      cache = getCache(dependants);
      if (!cache.isUniqueByDependants) {
        if (cache.lastDependants && !isShallowEqual(dependants, cache.lastDependants, 0)) {
          cache.clear();
        }
        cache.lastDependants = dependants;
      }
      node = cache.head;
      while (node) {
        if (!isShallowEqual(node.args, args, 1)) {
          node = node.next;
          continue;
        }
        if (node !== cache.head) {
          node.prev.next = node.next;
          if (node.next) {
            node.next.prev = node.prev;
          }
          node.next = cache.head;
          node.prev = null;
          cache.head.prev = node;
          cache.head = node;
        }
        return node.val;
      }
      node = /** @type {CacheNode} */
      {
        // Generate the result from original function
        val: selector.apply(null, args)
      };
      args[0] = null;
      node.args = args;
      if (cache.head) {
        cache.head.prev = node;
        node.next = cache.head;
      }
      cache.head = node;
      return node.val;
    }
    callSelector.getDependants = normalizedGetDependants;
    callSelector.clear = clear;
    clear();
    return (
      /** @type {S & EnhancedSelector} */
      callSelector
    );
  }

  // packages/data/build-module/redux-store/metadata/selectors.mjs
  function getResolutionState(state, selectorName, args) {
    const map = state[selectorName];
    if (!map) {
      return;
    }
    return map.get(selectorArgsToStateKey(args));
  }
  function getIsResolving(state, selectorName, args) {
    (0, import_deprecated.default)("wp.data.select( store ).getIsResolving", {
      since: "6.6",
      version: "6.8",
      alternative: "wp.data.select( store ).getResolutionState"
    });
    const resolutionState = getResolutionState(state, selectorName, args);
    return resolutionState && resolutionState.status === "resolving";
  }
  function hasStartedResolution(state, selectorName, args) {
    return getResolutionState(state, selectorName, args) !== void 0;
  }
  function hasFinishedResolution(state, selectorName, args) {
    const status = getResolutionState(state, selectorName, args)?.status;
    return status === "finished" || status === "error";
  }
  function hasResolutionFailed(state, selectorName, args) {
    return getResolutionState(state, selectorName, args)?.status === "error";
  }
  function getResolutionError(state, selectorName, args) {
    const resolutionState = getResolutionState(state, selectorName, args);
    return resolutionState?.status === "error" ? resolutionState.error : null;
  }
  function isResolving(state, selectorName, args) {
    return getResolutionState(state, selectorName, args)?.status === "resolving";
  }
  function getCachedResolvers(state) {
    return state;
  }
  function hasResolvingSelectors(state) {
    return Object.values(state).some(
      (selectorState) => (
        /**
         * This uses the internal `_map` property of `EquivalentKeyMap` for
         * optimization purposes, since the `EquivalentKeyMap` implementation
         * does not support a `.values()` implementation.
         *
         * @see https://github.com/aduth/equivalent-key-map
         */
        Array.from(selectorState._map.values()).some(
          (resolution) => resolution[1]?.status === "resolving"
        )
      )
    );
  }
  var countSelectorsByStatus = rememo_default(
    (state) => {
      const selectorsByStatus = {};
      Object.values(state).forEach(
        (selectorState) => (
          /**
           * This uses the internal `_map` property of `EquivalentKeyMap` for
           * optimization purposes, since the `EquivalentKeyMap` implementation
           * does not support a `.values()` implementation.
           *
           * @see https://github.com/aduth/equivalent-key-map
           */
          Array.from(selectorState._map.values()).forEach(
            (resolution) => {
              const currentStatus = resolution[1]?.status ?? "error";
              if (!selectorsByStatus[currentStatus]) {
                selectorsByStatus[currentStatus] = 0;
              }
              selectorsByStatus[currentStatus]++;
            }
          )
        )
      );
      return selectorsByStatus;
    },
    (state) => [state]
  );

  // packages/data/build-module/redux-store/metadata/actions.mjs
  var actions_exports = {};
  __export(actions_exports, {
    failResolution: () => failResolution,
    failResolutions: () => failResolutions,
    finishResolution: () => finishResolution,
    finishResolutions: () => finishResolutions,
    invalidateResolution: () => invalidateResolution,
    invalidateResolutionForStore: () => invalidateResolutionForStore,
    invalidateResolutionForStoreSelector: () => invalidateResolutionForStoreSelector,
    startResolution: () => startResolution,
    startResolutions: () => startResolutions
  });
  function startResolution(selectorName, args) {
    return {
      type: "START_RESOLUTION",
      selectorName,
      args
    };
  }
  function finishResolution(selectorName, args) {
    return {
      type: "FINISH_RESOLUTION",
      selectorName,
      args
    };
  }
  function failResolution(selectorName, args, error) {
    return {
      type: "FAIL_RESOLUTION",
      selectorName,
      args,
      error
    };
  }
  function startResolutions(selectorName, args) {
    return {
      type: "START_RESOLUTIONS",
      selectorName,
      args
    };
  }
  function finishResolutions(selectorName, args) {
    return {
      type: "FINISH_RESOLUTIONS",
      selectorName,
      args
    };
  }
  function failResolutions(selectorName, args, errors) {
    return {
      type: "FAIL_RESOLUTIONS",
      selectorName,
      args,
      errors
    };
  }
  function invalidateResolution(selectorName, args) {
    return {
      type: "INVALIDATE_RESOLUTION",
      selectorName,
      args
    };
  }
  function invalidateResolutionForStore() {
    return {
      type: "INVALIDATE_RESOLUTION_FOR_STORE"
    };
  }
  function invalidateResolutionForStoreSelector(selectorName) {
    return {
      type: "INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR",
      selectorName
    };
  }

  // packages/data/build-module/redux-store/index.mjs
  var trimUndefinedValues = (array) => {
    const result = [...array];
    for (let i = result.length - 1; i >= 0; i--) {
      if (result[i] === void 0) {
        result.splice(i, 1);
      }
    }
    return result;
  };
  var mapValues = (obj, callback) => Object.fromEntries(
    Object.entries(obj ?? {}).map(([key, value]) => [
      key,
      callback(value, key)
    ])
  );
  var devToolsReplacer = (key, state) => {
    if (state instanceof Map) {
      return Object.fromEntries(state);
    }
    if (state instanceof window.HTMLElement) {
      return null;
    }
    return state;
  };
  function createResolversCache() {
    const cache = {};
    return {
      isRunning(selectorName, args) {
        return cache[selectorName] && cache[selectorName].get(trimUndefinedValues(args));
      },
      clear(selectorName, args) {
        if (cache[selectorName]) {
          cache[selectorName].delete(trimUndefinedValues(args));
        }
      },
      markAsRunning(selectorName, args) {
        if (!cache[selectorName]) {
          cache[selectorName] = new import_equivalent_key_map2.default();
        }
        cache[selectorName].set(trimUndefinedValues(args), true);
      }
    };
  }
  function createBindingCache(getItem, bindItem) {
    const cache = /* @__PURE__ */ new WeakMap();
    return {
      get(itemName) {
        const item = getItem(itemName);
        if (!item) {
          return null;
        }
        let boundItem = cache.get(item);
        if (!boundItem) {
          boundItem = bindItem(item, itemName);
          cache.set(item, boundItem);
        }
        return boundItem;
      }
    };
  }
  function createPrivateProxy(publicItems, privateItems) {
    return new Proxy(publicItems, {
      get: (target, itemName) => privateItems.get(itemName) || Reflect.get(target, itemName)
    });
  }
  function createReduxStore(key, options) {
    const privateActions = {};
    const privateSelectors = {};
    const privateRegistrationFunctions = {
      privateActions,
      registerPrivateActions: (actions) => {
        Object.assign(privateActions, actions);
      },
      privateSelectors,
      registerPrivateSelectors: (selectors) => {
        Object.assign(privateSelectors, selectors);
      }
    };
    const storeDescriptor = {
      name: key,
      instantiate: (registry) => {
        const listeners = /* @__PURE__ */ new Set();
        const reducer = options.reducer;
        const thunkArgs = {
          registry,
          get dispatch() {
            return thunkDispatch;
          },
          get select() {
            return thunkSelect;
          },
          get resolveSelect() {
            return resolveSelectors;
          }
        };
        const store = instantiateReduxStore(
          key,
          options,
          registry,
          thunkArgs
        );
        lock(store, privateRegistrationFunctions);
        const resolversCache = createResolversCache();
        function bindAction(action) {
          return (...args) => Promise.resolve(store.dispatch(action(...args)));
        }
        const actions = {
          ...mapValues(actions_exports, bindAction),
          ...mapValues(options.actions, bindAction)
        };
        const allActions = createPrivateProxy(
          actions,
          createBindingCache(
            (name) => privateActions[name],
            bindAction
          )
        );
        const thunkDispatch = new Proxy(
          (action) => store.dispatch(action),
          { get: (target, name) => allActions[name] }
        );
        lock(actions, allActions);
        const resolvers = options.resolvers ? mapValues(options.resolvers, mapResolver) : {};
        function bindSelector(selector, selectorName) {
          if (selector.isRegistrySelector) {
            selector.registry = registry;
          }
          const boundSelector = (...args) => {
            args = normalize(selector, args);
            const state = store.__unstableOriginalGetState();
            if (selector.isRegistrySelector) {
              selector.registry = registry;
            }
            return selector(state.root, ...args);
          };
          boundSelector.__unstableNormalizeArgs = selector.__unstableNormalizeArgs;
          const resolver = resolvers[selectorName];
          if (!resolver) {
            boundSelector.hasResolver = false;
            return boundSelector;
          }
          return mapSelectorWithResolver(
            boundSelector,
            selectorName,
            resolver,
            store,
            resolversCache,
            boundMetadataSelectors
          );
        }
        function bindMetadataSelector(metaDataSelector) {
          const boundSelector = (selectorName, selectorArgs, ...args) => {
            if (selectorName) {
              const targetSelector = options.selectors?.[selectorName];
              if (targetSelector) {
                selectorArgs = normalize(
                  targetSelector,
                  selectorArgs
                );
              }
            }
            const state = store.__unstableOriginalGetState();
            return metaDataSelector(
              state.metadata,
              selectorName,
              selectorArgs,
              ...args
            );
          };
          boundSelector.hasResolver = false;
          return boundSelector;
        }
        const boundMetadataSelectors = mapValues(
          selectors_exports,
          bindMetadataSelector
        );
        const boundSelectors = mapValues(options.selectors, bindSelector);
        const selectors = {
          ...boundMetadataSelectors,
          ...boundSelectors
        };
        const boundPrivateSelectors = createBindingCache(
          (name) => privateSelectors[name],
          bindSelector
        );
        const allSelectors = createPrivateProxy(
          selectors,
          boundPrivateSelectors
        );
        for (const selectorName of Object.keys(privateSelectors)) {
          boundPrivateSelectors.get(selectorName);
        }
        const thunkSelect = new Proxy(
          (selector) => selector(store.__unstableOriginalGetState()),
          { get: (target, name) => allSelectors[name] }
        );
        lock(selectors, allSelectors);
        const bindResolveSelector = mapResolveSelector(
          store,
          resolvers,
          boundMetadataSelectors
        );
        const resolveSelectors = mapValues(
          boundSelectors,
          bindResolveSelector
        );
        const allResolveSelectors = createPrivateProxy(
          resolveSelectors,
          createBindingCache(
            (name) => boundPrivateSelectors.get(name),
            bindResolveSelector
          )
        );
        lock(resolveSelectors, allResolveSelectors);
        const bindSuspendSelector = mapSuspendSelector(
          store,
          boundMetadataSelectors
        );
        const suspendSelectors = {
          ...boundMetadataSelectors,
          // no special suspense behavior
          ...mapValues(boundSelectors, bindSuspendSelector)
        };
        const allSuspendSelectors = createPrivateProxy(
          suspendSelectors,
          createBindingCache(
            (name) => boundPrivateSelectors.get(name),
            bindSuspendSelector
          )
        );
        lock(suspendSelectors, allSuspendSelectors);
        const getSelectors = () => selectors;
        const getActions = () => actions;
        const getResolveSelectors = () => resolveSelectors;
        const getSuspendSelectors = () => suspendSelectors;
        store.__unstableOriginalGetState = store.getState;
        store.getState = () => store.__unstableOriginalGetState().root;
        const subscribe2 = store && ((listener) => {
          listeners.add(listener);
          return () => listeners.delete(listener);
        });
        let lastState = store.__unstableOriginalGetState();
        store.subscribe(() => {
          const state = store.__unstableOriginalGetState();
          const hasChanged = state !== lastState;
          lastState = state;
          if (hasChanged) {
            for (const listener of listeners) {
              listener();
            }
          }
        });
        return {
          reducer,
          store,
          actions,
          selectors,
          resolvers,
          getSelectors,
          getResolveSelectors,
          getSuspendSelectors,
          getActions,
          subscribe: subscribe2
        };
      }
    };
    lock(storeDescriptor, privateRegistrationFunctions);
    return storeDescriptor;
  }
  function instantiateReduxStore(key, options, registry, thunkArgs) {
    const controls2 = {
      ...options.controls,
      ...builtinControls
    };
    const normalizedControls = mapValues(
      controls2,
      (control) => control.isRegistryControl ? control(registry) : control
    );
    const middlewares = [
      resolvers_cache_middleware_default(registry, key),
      promise_middleware_default,
      (0, import_redux_routine.default)(normalizedControls),
      createThunkMiddleware(thunkArgs)
    ];
    const enhancers = [applyMiddleware(...middlewares)];
    if (typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION__) {
      enhancers.push(
        window.__REDUX_DEVTOOLS_EXTENSION__({
          name: key,
          instanceId: key,
          serialize: {
            replacer: devToolsReplacer
          }
        })
      );
    }
    const { reducer, initialState } = options;
    const enhancedReducer = combineReducers({
      metadata: reducer_default,
      root: reducer
    });
    return createStore(
      enhancedReducer,
      { root: initialState },
      (0, import_compose.compose)(enhancers)
    );
  }
  function mapResolveSelector(store, resolvers, boundMetadataSelectors) {
    return (selector, selectorName) => {
      if (!selector.hasResolver) {
        return async (...args) => selector.apply(null, args);
      }
      return (...args) => new Promise((resolve, reject) => {
        const resolver = resolvers[selectorName];
        const hasFinished = () => {
          return boundMetadataSelectors.hasFinishedResolution(
            selectorName,
            args
          ) || typeof resolver.isFulfilled === "function" && resolver.isFulfilled(store.getState(), ...args);
        };
        const finalize = (result2) => {
          const hasFailed = boundMetadataSelectors.hasResolutionFailed(
            selectorName,
            args
          );
          if (hasFailed) {
            const error = boundMetadataSelectors.getResolutionError(
              selectorName,
              args
            );
            reject(error);
          } else {
            resolve(result2);
          }
        };
        const getResult = () => selector.apply(null, args);
        const result = getResult();
        if (hasFinished()) {
          return finalize(result);
        }
        const unsubscribe = store.subscribe(() => {
          if (hasFinished()) {
            unsubscribe();
            finalize(getResult());
          }
        });
      });
    };
  }
  function mapSuspendSelector(store, boundMetadataSelectors) {
    return (selector, selectorName) => {
      if (!selector.hasResolver) {
        return selector;
      }
      return (...args) => {
        const result = selector.apply(null, args);
        if (boundMetadataSelectors.hasFinishedResolution(
          selectorName,
          args
        )) {
          if (boundMetadataSelectors.hasResolutionFailed(
            selectorName,
            args
          )) {
            throw boundMetadataSelectors.getResolutionError(
              selectorName,
              args
            );
          }
          return result;
        }
        throw new Promise((resolve) => {
          const unsubscribe = store.subscribe(() => {
            if (boundMetadataSelectors.hasFinishedResolution(
              selectorName,
              args
            )) {
              resolve();
              unsubscribe();
            }
          });
        });
      };
    };
  }
  function mapResolver(resolver) {
    if (resolver.fulfill) {
      return resolver;
    }
    return {
      ...resolver,
      // Copy the enumerable properties of the resolver function.
      fulfill: resolver
      // Add the fulfill method.
    };
  }
  function mapSelectorWithResolver(selector, selectorName, resolver, store, resolversCache, boundMetadataSelectors) {
    function fulfillSelector(args) {
      if (resolversCache.isRunning(selectorName, args) || boundMetadataSelectors.hasStartedResolution(selectorName, args) || typeof resolver.isFulfilled === "function" && resolver.isFulfilled(store.getState(), ...args)) {
        return;
      }
      resolversCache.markAsRunning(selectorName, args);
      setTimeout(async () => {
        resolversCache.clear(selectorName, args);
        store.dispatch(
          startResolution(selectorName, args)
        );
        try {
          const action = resolver.fulfill(...args);
          if (action) {
            await store.dispatch(action);
          }
          store.dispatch(
            finishResolution(selectorName, args)
          );
        } catch (error) {
          store.dispatch(
            failResolution(selectorName, args, error)
          );
        }
      }, 0);
    }
    const selectorResolver = (...args) => {
      args = normalize(selector, args);
      fulfillSelector(args);
      return selector(...args);
    };
    selectorResolver.hasResolver = true;
    return selectorResolver;
  }
  function normalize(selector, args) {
    if (selector.__unstableNormalizeArgs && typeof selector.__unstableNormalizeArgs === "function" && args?.length) {
      return selector.__unstableNormalizeArgs(args);
    }
    return args;
  }

  // packages/data/build-module/store/index.mjs
  var coreDataStore = {
    name: "core/data",
    instantiate(registry) {
      const getCoreDataSelector = (selectorName) => (key, ...args) => {
        return registry.select(key)[selectorName](...args);
      };
      const getCoreDataAction = (actionName) => (key, ...args) => {
        return registry.dispatch(key)[actionName](...args);
      };
      return {
        getSelectors() {
          return Object.fromEntries(
            [
              "getIsResolving",
              "hasStartedResolution",
              "hasFinishedResolution",
              "isResolving",
              "getCachedResolvers"
            ].map((selectorName) => [
              selectorName,
              getCoreDataSelector(selectorName)
            ])
          );
        },
        getActions() {
          return Object.fromEntries(
            [
              "startResolution",
              "finishResolution",
              "invalidateResolution",
              "invalidateResolutionForStore",
              "invalidateResolutionForStoreSelector"
            ].map((actionName) => [
              actionName,
              getCoreDataAction(actionName)
            ])
          );
        },
        subscribe() {
          return () => () => {
          };
        }
      };
    }
  };
  var store_default = coreDataStore;

  // packages/data/build-module/utils/emitter.mjs
  function createEmitter() {
    let isPaused = false;
    let isPending = false;
    const listeners = /* @__PURE__ */ new Set();
    const notifyListeners = () => (
      // We use Array.from to clone the listeners Set
      // This ensures that we don't run a listener
      // that was added as a response to another listener.
      Array.from(listeners).forEach((listener) => listener())
    );
    return {
      get isPaused() {
        return isPaused;
      },
      subscribe(listener) {
        listeners.add(listener);
        return () => listeners.delete(listener);
      },
      pause() {
        isPaused = true;
      },
      resume() {
        isPaused = false;
        if (isPending) {
          isPending = false;
          notifyListeners();
        }
      },
      emit() {
        if (isPaused) {
          isPending = true;
          return;
        }
        notifyListeners();
      }
    };
  }

  // packages/data/build-module/registry.mjs
  function getStoreName(storeNameOrDescriptor) {
    return typeof storeNameOrDescriptor === "string" ? storeNameOrDescriptor : storeNameOrDescriptor.name;
  }
  function createRegistry(storeConfigs = {}, parent = null) {
    const stores = {};
    const emitter = createEmitter();
    let listeningStores = null;
    function globalListener() {
      emitter.emit();
    }
    const subscribe2 = (listener, storeNameOrDescriptor) => {
      if (!storeNameOrDescriptor) {
        return emitter.subscribe(listener);
      }
      const storeName = getStoreName(storeNameOrDescriptor);
      const store = stores[storeName];
      if (store) {
        return store.subscribe(listener);
      }
      if (!parent) {
        return emitter.subscribe(listener);
      }
      return parent.subscribe(listener, storeNameOrDescriptor);
    };
    function select3(storeNameOrDescriptor) {
      const storeName = getStoreName(storeNameOrDescriptor);
      listeningStores?.add(storeName);
      const store = stores[storeName];
      if (store) {
        return store.getSelectors();
      }
      return parent?.select(storeName);
    }
    function __unstableMarkListeningStores(callback, ref) {
      listeningStores = /* @__PURE__ */ new Set();
      try {
        return callback.call(this);
      } finally {
        ref.current = Array.from(listeningStores);
        listeningStores = null;
      }
    }
    function resolveSelect3(storeNameOrDescriptor) {
      const storeName = getStoreName(storeNameOrDescriptor);
      listeningStores?.add(storeName);
      const store = stores[storeName];
      if (store) {
        return store.getResolveSelectors();
      }
      return parent && parent.resolveSelect(storeName);
    }
    function suspendSelect2(storeNameOrDescriptor) {
      const storeName = getStoreName(storeNameOrDescriptor);
      listeningStores?.add(storeName);
      const store = stores[storeName];
      if (store) {
        return store.getSuspendSelectors();
      }
      return parent && parent.suspendSelect(storeName);
    }
    function dispatch3(storeNameOrDescriptor) {
      const storeName = getStoreName(storeNameOrDescriptor);
      const store = stores[storeName];
      if (store) {
        return store.getActions();
      }
      return parent && parent.dispatch(storeName);
    }
    function withPlugins(attributes) {
      return Object.fromEntries(
        Object.entries(attributes).map(([key, attribute]) => {
          if (typeof attribute !== "function") {
            return [key, attribute];
          }
          return [
            key,
            function() {
              return registry[key].apply(null, arguments);
            }
          ];
        })
      );
    }
    function registerStoreInstance(name, createStore2) {
      if (stores[name]) {
        console.error('Store "' + name + '" is already registered.');
        return stores[name];
      }
      const store = createStore2();
      if (typeof store.getSelectors !== "function") {
        throw new TypeError("store.getSelectors must be a function");
      }
      if (typeof store.getActions !== "function") {
        throw new TypeError("store.getActions must be a function");
      }
      if (typeof store.subscribe !== "function") {
        throw new TypeError("store.subscribe must be a function");
      }
      store.emitter = createEmitter();
      const currentSubscribe = store.subscribe;
      store.subscribe = (listener) => {
        const unsubscribeFromEmitter = store.emitter.subscribe(listener);
        const unsubscribeFromStore = currentSubscribe(() => {
          if (store.emitter.isPaused) {
            store.emitter.emit();
            return;
          }
          listener();
        });
        return () => {
          unsubscribeFromStore?.();
          unsubscribeFromEmitter?.();
        };
      };
      stores[name] = store;
      store.subscribe(globalListener);
      if (parent) {
        try {
          unlock(store.store).registerPrivateActions(
            unlock(parent).privateActionsOf(name)
          );
          unlock(store.store).registerPrivateSelectors(
            unlock(parent).privateSelectorsOf(name)
          );
        } catch (e) {
        }
      }
      return store;
    }
    function register2(store) {
      registerStoreInstance(
        store.name,
        () => store.instantiate(registry)
      );
    }
    function registerGenericStore2(name, store) {
      (0, import_deprecated2.default)("wp.data.registerGenericStore", {
        since: "5.9",
        alternative: "wp.data.register( storeDescriptor )"
      });
      registerStoreInstance(name, () => store);
    }
    function registerStore2(storeName, options) {
      if (!options.reducer) {
        throw new TypeError("Must specify store reducer");
      }
      const store = registerStoreInstance(
        storeName,
        () => createReduxStore(storeName, options).instantiate(registry)
      );
      return store.store;
    }
    function batch(callback) {
      if (emitter.isPaused) {
        callback();
        return;
      }
      emitter.pause();
      Object.values(stores).forEach((store) => store.emitter.pause());
      try {
        callback();
      } finally {
        emitter.resume();
        Object.values(stores).forEach(
          (store) => store.emitter.resume()
        );
      }
    }
    let registry = {
      batch,
      stores,
      namespaces: stores,
      // TODO: Deprecate/remove this.
      subscribe: subscribe2,
      select: select3,
      resolveSelect: resolveSelect3,
      suspendSelect: suspendSelect2,
      dispatch: dispatch3,
      use: use2,
      register: register2,
      registerGenericStore: registerGenericStore2,
      registerStore: registerStore2,
      __unstableMarkListeningStores
    };
    function use2(plugin, options) {
      if (!plugin) {
        return;
      }
      registry = {
        ...registry,
        ...plugin(registry, options)
      };
      return registry;
    }
    registry.register(store_default);
    for (const [name, config] of Object.entries(storeConfigs)) {
      registry.register(createReduxStore(name, config));
    }
    if (parent) {
      parent.subscribe(globalListener);
    }
    const registryWithPlugins = withPlugins(registry);
    lock(registryWithPlugins, {
      privateActionsOf: (name) => {
        try {
          return unlock(stores[name].store).privateActions;
        } catch (e) {
          return {};
        }
      },
      privateSelectorsOf: (name) => {
        try {
          return unlock(stores[name].store).privateSelectors;
        } catch (e) {
          return {};
        }
      }
    });
    return registryWithPlugins;
  }

  // packages/data/build-module/default-registry.mjs
  var default_registry_default = createRegistry();

  // packages/data/build-module/plugins/index.mjs
  var plugins_exports = {};
  __export(plugins_exports, {
    persistence: () => persistence_default
  });

  // node_modules/is-plain-object/dist/is-plain-object.mjs
  function isObject2(o) {
    return Object.prototype.toString.call(o) === "[object Object]";
  }
  function isPlainObject2(o) {
    var ctor, prot;
    if (isObject2(o) === false) return false;
    ctor = o.constructor;
    if (ctor === void 0) return true;
    prot = ctor.prototype;
    if (isObject2(prot) === false) return false;
    if (prot.hasOwnProperty("isPrototypeOf") === false) {
      return false;
    }
    return true;
  }

  // packages/data/build-module/plugins/persistence/index.mjs
  var import_deepmerge = __toESM(require_cjs(), 1);

  // packages/data/build-module/plugins/persistence/storage/object.mjs
  var objectStorage;
  var storage = {
    getItem(key) {
      if (!objectStorage || !objectStorage[key]) {
        return null;
      }
      return objectStorage[key];
    },
    setItem(key, value) {
      if (!objectStorage) {
        storage.clear();
      }
      objectStorage[key] = String(value);
    },
    clear() {
      objectStorage = /* @__PURE__ */ Object.create(null);
    }
  };
  var object_default = storage;

  // packages/data/build-module/plugins/persistence/storage/default.mjs
  var storage2;
  try {
    storage2 = window.localStorage;
    storage2.setItem("__wpDataTestLocalStorage", "");
    storage2.removeItem("__wpDataTestLocalStorage");
  } catch (error) {
    storage2 = object_default;
  }
  var default_default = storage2;

  // packages/data/build-module/plugins/persistence/index.mjs
  var DEFAULT_STORAGE = default_default;
  var DEFAULT_STORAGE_KEY = "WP_DATA";
  var withLazySameState = (reducer) => (state, action) => {
    if (action.nextState === state) {
      return state;
    }
    return reducer(state, action);
  };
  function createPersistenceInterface(options) {
    const { storage: storage3 = DEFAULT_STORAGE, storageKey = DEFAULT_STORAGE_KEY } = options;
    let data;
    function getData() {
      if (data === void 0) {
        const persisted = storage3.getItem(storageKey);
        if (persisted === null) {
          data = {};
        } else {
          try {
            data = JSON.parse(persisted);
          } catch (error) {
            data = {};
          }
        }
      }
      return data;
    }
    function setData(key, value) {
      data = { ...data, [key]: value };
      storage3.setItem(storageKey, JSON.stringify(data));
    }
    return {
      get: getData,
      set: setData
    };
  }
  function persistencePlugin(registry, pluginOptions) {
    const persistence = createPersistenceInterface(pluginOptions);
    function createPersistOnChange(getState, storeName, keys) {
      let getPersistedState;
      if (Array.isArray(keys)) {
        const reducers = keys.reduce(
          (accumulator, key) => Object.assign(accumulator, {
            [key]: (state, action) => action.nextState[key]
          }),
          {}
        );
        getPersistedState = withLazySameState(
          combineReducers2(reducers)
        );
      } else {
        getPersistedState = (state, action) => action.nextState;
      }
      let lastState = getPersistedState(void 0, {
        nextState: getState()
      });
      return () => {
        const state = getPersistedState(lastState, {
          nextState: getState()
        });
        if (state !== lastState) {
          persistence.set(storeName, state);
          lastState = state;
        }
      };
    }
    return {
      registerStore(storeName, options) {
        if (!options.persist) {
          return registry.registerStore(storeName, options);
        }
        const persistedState = persistence.get()[storeName];
        if (persistedState !== void 0) {
          let initialState = options.reducer(options.initialState, {
            type: "@@WP/PERSISTENCE_RESTORE"
          });
          if (isPlainObject2(initialState) && isPlainObject2(persistedState)) {
            initialState = (0, import_deepmerge.default)(initialState, persistedState, {
              isMergeableObject: isPlainObject2
            });
          } else {
            initialState = persistedState;
          }
          options = {
            ...options,
            initialState
          };
        }
        const store = registry.registerStore(storeName, options);
        store.subscribe(
          createPersistOnChange(
            store.getState,
            storeName,
            options.persist
          )
        );
        return store;
      }
    };
  }
  persistencePlugin.__unstableMigrate = () => {
  };
  var persistence_default = persistencePlugin;

  // packages/data/build-module/components/with-select/index.mjs
  var import_compose2 = __toESM(require_compose(), 1);

  // packages/data/build-module/components/use-select/index.mjs
  var import_priority_queue = __toESM(require_priority_queue(), 1);
  var import_element5 = __toESM(require_element(), 1);
  var import_is_shallow_equal = __toESM(require_is_shallow_equal(), 1);

  // packages/data/build-module/components/registry-provider/use-registry.mjs
  var import_element2 = __toESM(require_element(), 1);

  // packages/data/build-module/components/registry-provider/context.mjs
  var import_element = __toESM(require_element(), 1);
  var Context = (0, import_element.createContext)(default_registry_default);
  Context.displayName = "RegistryProviderContext";
  var { Consumer, Provider } = Context;
  var RegistryConsumer = Consumer;
  var context_default = Provider;

  // packages/data/build-module/components/registry-provider/use-registry.mjs
  function useRegistry() {
    return (0, import_element2.useContext)(Context);
  }

  // packages/data/build-module/components/async-mode-provider/use-async-mode.mjs
  var import_element4 = __toESM(require_element(), 1);

  // packages/data/build-module/components/async-mode-provider/context.mjs
  var import_element3 = __toESM(require_element(), 1);
  var Context2 = (0, import_element3.createContext)(false);
  Context2.displayName = "AsyncModeContext";
  var { Consumer: Consumer2, Provider: Provider2 } = Context2;
  var context_default2 = Provider2;

  // packages/data/build-module/components/async-mode-provider/use-async-mode.mjs
  function useAsyncMode() {
    return (0, import_element4.useContext)(Context2);
  }

  // packages/data/build-module/components/use-select/index.mjs
  var renderQueue = (0, import_priority_queue.createQueue)();
  function warnOnUnstableReference(a, b) {
    if (!a || !b) {
      return;
    }
    const keys = typeof a === "object" && typeof b === "object" ? Object.keys(a).filter((k) => a[k] !== b[k]) : [];
    console.warn(
      "The `useSelect` hook returns different values when called with the same state and parameters.\nThis can lead to unnecessary re-renders and performance issues if not fixed.\n\nNon-equal value keys: %s\n\n",
      keys.join(", ")
    );
  }
  function Store(registry, suspense) {
    const select3 = suspense ? registry.suspendSelect : registry.select;
    const queueContext = {};
    let lastMapSelect;
    let lastMapResult;
    let lastMapResultValid = false;
    let lastIsAsync;
    let subscriber;
    let didWarnUnstableReference;
    const storeStatesOnMount = /* @__PURE__ */ new Map();
    function getStoreState(name) {
      return registry.stores[name]?.store?.getState?.() ?? {};
    }
    const createSubscriber = (stores) => {
      const activeStores = [...stores];
      const activeSubscriptions = /* @__PURE__ */ new Set();
      function subscribe2(listener) {
        if (lastMapResultValid) {
          for (const name of activeStores) {
            if (storeStatesOnMount.get(name) !== getStoreState(name)) {
              lastMapResultValid = false;
            }
          }
        }
        storeStatesOnMount.clear();
        const onStoreChange = () => {
          lastMapResultValid = false;
          listener();
        };
        const onChange = () => {
          if (lastIsAsync) {
            renderQueue.add(queueContext, onStoreChange);
          } else {
            onStoreChange();
          }
        };
        const unsubs = [];
        function subscribeStore(storeName) {
          unsubs.push(registry.subscribe(onChange, storeName));
        }
        for (const storeName of activeStores) {
          subscribeStore(storeName);
        }
        activeSubscriptions.add(subscribeStore);
        return () => {
          activeSubscriptions.delete(subscribeStore);
          for (const unsub of unsubs.values()) {
            unsub?.();
          }
          renderQueue.cancel(queueContext);
        };
      }
      function updateStores(newStores) {
        for (const newStore of newStores) {
          if (activeStores.includes(newStore)) {
            continue;
          }
          activeStores.push(newStore);
          for (const subscription of activeSubscriptions) {
            subscription(newStore);
          }
        }
      }
      return { subscribe: subscribe2, updateStores };
    };
    return (mapSelect, isAsync) => {
      function updateValue() {
        if (lastMapResultValid && mapSelect === lastMapSelect) {
          return lastMapResult;
        }
        const listeningStores = { current: null };
        const mapResult = registry.__unstableMarkListeningStores(
          () => mapSelect(select3, registry),
          listeningStores
        );
        if (true) {
          if (!didWarnUnstableReference) {
            const secondMapResult = mapSelect(select3, registry);
            if (!(0, import_is_shallow_equal.isShallowEqual)(mapResult, secondMapResult)) {
              warnOnUnstableReference(mapResult, secondMapResult);
              didWarnUnstableReference = true;
            }
          }
        }
        if (!subscriber) {
          for (const name of listeningStores.current) {
            storeStatesOnMount.set(name, getStoreState(name));
          }
          subscriber = createSubscriber(listeningStores.current);
        } else {
          subscriber.updateStores(listeningStores.current);
        }
        if (!(0, import_is_shallow_equal.isShallowEqual)(lastMapResult, mapResult)) {
          lastMapResult = mapResult;
        }
        lastMapSelect = mapSelect;
        lastMapResultValid = true;
      }
      function getValue() {
        updateValue();
        return lastMapResult;
      }
      if (lastIsAsync && !isAsync) {
        lastMapResultValid = false;
        renderQueue.cancel(queueContext);
      }
      updateValue();
      lastIsAsync = isAsync;
      return { subscribe: subscriber.subscribe, getValue };
    };
  }
  function _useStaticSelect(storeName) {
    return useRegistry().select(storeName);
  }
  function _useMappingSelect(suspense, mapSelect, deps) {
    const registry = useRegistry();
    const isAsync = useAsyncMode();
    const store = (0, import_element5.useMemo)(
      () => Store(registry, suspense),
      [registry, suspense]
    );
    const selector = (0, import_element5.useCallback)(mapSelect, deps);
    const { subscribe: subscribe2, getValue } = store(selector, isAsync);
    const result = (0, import_element5.useSyncExternalStore)(subscribe2, getValue, getValue);
    (0, import_element5.useDebugValue)(result);
    return result;
  }
  function useSelect(mapSelect, deps) {
    const staticSelectMode = typeof mapSelect !== "function";
    const staticSelectModeRef = (0, import_element5.useRef)(staticSelectMode);
    if (staticSelectMode !== staticSelectModeRef.current) {
      const prevMode = staticSelectModeRef.current ? "static" : "mapping";
      const nextMode = staticSelectMode ? "static" : "mapping";
      throw new Error(
        `Switching useSelect from ${prevMode} to ${nextMode} is not allowed`
      );
    }
    return staticSelectMode ? _useStaticSelect(mapSelect) : _useMappingSelect(false, mapSelect, deps);
  }
  function useSuspenseSelect(mapSelect, deps) {
    return _useMappingSelect(true, mapSelect, deps);
  }

  // packages/data/build-module/components/with-select/index.mjs
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  var withSelect = (mapSelectToProps) => (0, import_compose2.createHigherOrderComponent)(
    (WrappedComponent) => (0, import_compose2.pure)((ownProps) => {
      const mapSelect = (select3, registry) => mapSelectToProps(select3, ownProps, registry);
      const mergeProps = useSelect(mapSelect);
      return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(WrappedComponent, { ...ownProps, ...mergeProps });
    }),
    "withSelect"
  );
  var with_select_default = withSelect;

  // packages/data/build-module/components/with-dispatch/index.mjs
  var import_compose4 = __toESM(require_compose(), 1);

  // packages/data/build-module/components/use-dispatch/use-dispatch.mjs
  var useDispatch = (storeNameOrDescriptor) => {
    const { dispatch: dispatch3 } = useRegistry();
    return storeNameOrDescriptor === void 0 ? dispatch3 : dispatch3(storeNameOrDescriptor);
  };
  var use_dispatch_default = useDispatch;

  // packages/data/build-module/components/use-dispatch/use-dispatch-with-map.mjs
  var import_element6 = __toESM(require_element(), 1);
  var import_compose3 = __toESM(require_compose(), 1);
  var useDispatchWithMap = (dispatchMap, deps) => {
    const registry = useRegistry();
    const currentDispatchMapRef = (0, import_element6.useRef)(dispatchMap);
    (0, import_compose3.useIsomorphicLayoutEffect)(() => {
      currentDispatchMapRef.current = dispatchMap;
    });
    return (0, import_element6.useMemo)(() => {
      const currentDispatchProps = currentDispatchMapRef.current(
        registry.dispatch,
        registry
      );
      return Object.fromEntries(
        Object.entries(currentDispatchProps).map(
          ([propName, dispatcher]) => {
            if (typeof dispatcher !== "function") {
              console.warn(
                `Property ${propName} returned from dispatchMap in useDispatchWithMap must be a function.`
              );
            }
            return [
              propName,
              (...args) => currentDispatchMapRef.current(registry.dispatch, registry)[propName](...args)
            ];
          }
        )
      );
    }, [registry, ...deps]);
  };
  var use_dispatch_with_map_default = useDispatchWithMap;

  // packages/data/build-module/components/with-dispatch/index.mjs
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  var withDispatch = (mapDispatchToProps) => (0, import_compose4.createHigherOrderComponent)(
    (WrappedComponent) => (ownProps) => {
      const mapDispatch = (dispatch3, registry) => mapDispatchToProps(dispatch3, ownProps, registry);
      const dispatchProps = use_dispatch_with_map_default(mapDispatch, []);
      return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(WrappedComponent, { ...ownProps, ...dispatchProps });
    },
    "withDispatch"
  );
  var with_dispatch_default = withDispatch;

  // packages/data/build-module/components/with-registry/index.mjs
  var import_compose5 = __toESM(require_compose(), 1);
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
  var withRegistry = (0, import_compose5.createHigherOrderComponent)(
    (OriginalComponent) => (props) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RegistryConsumer, { children: (registry) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(OriginalComponent, { ...props, registry }) }),
    "withRegistry"
  );
  var with_registry_default = withRegistry;

  // packages/data/build-module/dispatch.mjs
  function dispatch2(storeNameOrDescriptor) {
    return default_registry_default.dispatch(storeNameOrDescriptor);
  }

  // packages/data/build-module/select.mjs
  function select2(storeNameOrDescriptor) {
    return default_registry_default.select(storeNameOrDescriptor);
  }

  // packages/data/build-module/index.mjs
  var defaultRegistry = default_registry_default;
  var combineReducers2 = combineReducers;
  function resolveSelect2(storeNameOrDescriptor) {
    return defaultRegistry.resolveSelect(storeNameOrDescriptor);
  }
  var suspendSelect = (storeNameOrDescriptor) => defaultRegistry.suspendSelect(storeNameOrDescriptor);
  var subscribe = (listener, storeNameOrDescriptor) => defaultRegistry.subscribe(listener, storeNameOrDescriptor);
  var registerGenericStore = defaultRegistry.registerGenericStore;
  var registerStore = defaultRegistry.registerStore;
  var use = defaultRegistry.use;
  var register = (store) => defaultRegistry.register(store);
  return __toCommonJS(index_exports);
})();
/*! Bundled license information:

is-plain-object/dist/is-plain-object.mjs:
  (*!
   * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
   *
   * Copyright (c) 2014-2017, Jon Schlinkert.
   * Released under the MIT License.
   *)
*/
                                                                                                                                                                                                                             dist/data.min.js                                                                                    0000644                 00000063611 15212564002 0007544 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).data=(()=>{var lr=Object.create;var ne=Object.defineProperty;var dr=Object.getOwnPropertyDescriptor;var pr=Object.getOwnPropertyNames;var mr=Object.getPrototypeOf,hr=Object.prototype.hasOwnProperty;var I=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),oe=(e,t)=>{for(var r in t)ne(e,r,{get:t[r],enumerable:!0})},ze=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of pr(t))!hr.call(e,o)&&o!==r&&ne(e,o,{get:()=>t[o],enumerable:!(n=dr(t,o))||n.enumerable});return e};var v=(e,t,r)=>(r=e!=null?lr(mr(e)):{},ze(t||!e||!e.__esModule?ne(r,"default",{value:e,enumerable:!0}):r,e)),yr=e=>ze(ne({},"__esModule",{value:!0}),e);var be=I((Vn,qe)=>{qe.exports=window.wp.deprecated});var Ee=I((Kn,Qe)=>{"use strict";function U(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?U=function(t){return typeof t}:U=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},U(e)}function wr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Er(e,t,r){return t&&Xe(e.prototype,t),r&&Xe(e,r),e}function Je(e,t){var r=e._map,n=e._arrayTreeMap,o=e._objectTreeMap;if(r.has(t))return r.get(t);for(var s=Object.keys(t).sort(),i=Array.isArray(t)?n:o,f=0;f<s.length;f++){var a=s[f];if(i=i.get(a),i===void 0)return;var u=t[a];if(i=i.get(u),i===void 0)return}var c=i.get("_ekm_value");if(c)return r.delete(c[0]),c[0]=t,i.set("_ekm_value",c),r.set(t,c),c}var Rr=(function(){function e(t){if(wr(this,e),this.clear(),t instanceof e){var r=[];t.forEach(function(o,s){r.push([s,o])}),t=r}if(t!=null)for(var n=0;n<t.length;n++)this.set(t[n][0],t[n][1])}return Er(e,[{key:"set",value:function(r,n){if(r===null||U(r)!=="object")return this._map.set(r,n),this;for(var o=Object.keys(r).sort(),s=[r,n],i=Array.isArray(r)?this._arrayTreeMap:this._objectTreeMap,f=0;f<o.length;f++){var a=o[f];i.has(a)||i.set(a,new e),i=i.get(a);var u=r[a];i.has(u)||i.set(u,new e),i=i.get(u)}var c=i.get("_ekm_value");return c&&this._map.delete(c[0]),i.set("_ekm_value",s),this._map.set(r,s),this}},{key:"get",value:function(r){if(r===null||U(r)!=="object")return this._map.get(r);var n=Je(this,r);if(n)return n[1]}},{key:"has",value:function(r){return r===null||U(r)!=="object"?this._map.has(r):Je(this,r)!==void 0}},{key:"delete",value:function(r){return this.has(r)?(this.set(r,void 0),!0):!1}},{key:"forEach",value:function(r){var n=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this;this._map.forEach(function(s,i){i!==null&&U(i)==="object"&&(s=s[1]),r.call(o,s,i,n)})}},{key:"clear",value:function(){this._map=new Map,this._arrayTreeMap=new Map,this._objectTreeMap=new Map}},{key:"size",get:function(){return this._map.size}}]),e})();Qe.exports=Rr});var et=I((Wn,Ze)=>{Ze.exports=window.wp.reduxRoutine});var q=I((Gn,tt)=>{tt.exports=window.wp.compose});var ct=I((Yn,ut)=>{ut.exports=window.wp.privateApis});var Tt=I((jo,xt)=>{"use strict";var nn=function(t){return on(t)&&!sn(t)};function on(e){return!!e&&typeof e=="object"}function sn(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||cn(e)}var an=typeof Symbol=="function"&&Symbol.for,un=an?Symbol.for("react.element"):60103;function cn(e){return e.$$typeof===un}function fn(e){return Array.isArray(e)?[]:{}}function ee(e,t){return t.clone!==!1&&t.isMergeableObject(e)?B(fn(e),e,t):e}function ln(e,t,r){return e.concat(t).map(function(n){return ee(n,r)})}function dn(e,t){if(!t.customMerge)return B;var r=t.customMerge(e);return typeof r=="function"?r:B}function pn(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Ot(e){return Object.keys(e).concat(pn(e))}function _t(e,t){try{return t in e}catch{return!1}}function mn(e,t){return _t(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function hn(e,t,r){var n={};return r.isMergeableObject(e)&&Ot(e).forEach(function(o){n[o]=ee(e[o],r)}),Ot(t).forEach(function(o){mn(e,o)||(_t(e,o)&&r.isMergeableObject(t[o])?n[o]=dn(o,r)(e[o],t[o],r):n[o]=ee(t[o],r))}),n}function B(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||ln,r.isMergeableObject=r.isMergeableObject||nn,r.cloneUnlessOtherwiseSpecified=ee;var n=Array.isArray(t),o=Array.isArray(e),s=n===o;return s?n?r.arrayMerge(e,t,r):hn(e,t,r):ee(t,r)}B.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,o){return B(n,o,r)},{})};var yn=B;xt.exports=yn});var Dt=I((Fo,Pt)=>{Pt.exports=window.wp.priorityQueue});var V=I((Vo,Lt)=>{Lt.exports=window.wp.element});var kt=I(($o,Ut)=>{Ut.exports=window.wp.isShallowEqual});var pe=I((Zo,Bt)=>{Bt.exports=window.ReactJSXRuntime});var kn={};oe(kn,{AsyncModeProvider:()=>Ue,RegistryConsumer:()=>re,RegistryProvider:()=>Le,combineReducers:()=>Pe,controls:()=>it,createReduxStore:()=>Q,createRegistry:()=>ue,createRegistryControl:()=>H,createRegistrySelector:()=>rt,createSelector:()=>J,dispatch:()=>nr,plugins:()=>De,register:()=>Un,registerGenericStore:()=>Pn,registerStore:()=>Dn,resolveSelect:()=>Mn,select:()=>or,subscribe:()=>Cn,suspendSelect:()=>Nn,use:()=>Ln,useDispatch:()=>Fe,useRegistry:()=>M,useSelect:()=>de,useSuspenseSelect:()=>Ht,withDispatch:()=>er,withRegistry:()=>rr,withSelect:()=>Xt});var Et=v(be(),1);function O(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var gr=typeof Symbol=="function"&&Symbol.observable||"@@observable",He=gr,ve=()=>Math.random().toString(36).substring(7).split("").join("."),Sr={INIT:`@@redux/INIT${ve()}`,REPLACE:`@@redux/REPLACE${ve()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ve()}`},Be=Sr;function br(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function we(e,t,r){if(typeof e!="function")throw new Error(O(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(O(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(O(1));return r(we)(e,t)}let n=e,o=t,s=new Map,i=s,f=0,a=!1;function u(){i===s&&(i=new Map,s.forEach((y,w)=>{i.set(w,y)}))}function c(){if(a)throw new Error(O(3));return o}function m(y){if(typeof y!="function")throw new Error(O(4));if(a)throw new Error(O(5));let w=!0;u();let g=f++;return i.set(g,y),function(){if(w){if(a)throw new Error(O(6));w=!1,u(),i.delete(g),s=null}}}function b(y){if(!br(y))throw new Error(O(7));if(typeof y.type>"u")throw new Error(O(8));if(typeof y.type!="string")throw new Error(O(17));if(a)throw new Error(O(9));try{a=!0,o=n(o,y)}finally{a=!1}return(s=i).forEach(g=>{g()}),y}function S(y){if(typeof y!="function")throw new Error(O(10));n=y,b({type:Be.REPLACE})}function R(){let y=m;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(O(11));function g(){let _=w;_.next&&_.next(c())}return g(),{unsubscribe:y(g)}},[He](){return this}}}return b({type:Be.INIT}),{dispatch:b,subscribe:m,getState:c,replaceReducer:S,[He]:R}}function vr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Ye(...e){return t=>(r,n)=>{let o=t(r,n),s=()=>{throw new Error(O(15))},i={getState:o.getState,dispatch:(a,...u)=>s(a,...u)},f=e.map(a=>a(i));return s=vr(...f)(o.dispatch),{...o,dispatch:s}}}var St=v(Ee(),1),bt=v(et(),1),vt=v(q(),1);function se(e){let t=Object.keys(e);return function(n={},o){let s={},i=!1;for(let f of t){let a=e[f],u=n[f],c=a(u,o);s[f]=c,i=i||c!==u}return i?s:n}}function rt(e){let t=new WeakMap,r=(...n)=>{let o=t.get(r.registry);return o||(o=e(r.registry.select),t.set(r.registry,o)),o(...n)};return r.isRegistrySelector=!0,r}function H(e){return e.isRegistryControl=!0,e}var nt="@@data/SELECT",ot="@@data/RESOLVE_SELECT",st="@@data/DISPATCH";function Re(e){return e!==null&&typeof e=="object"}function Or(e,t,...r){return{type:nt,storeKey:Re(e)?e.name:e,selectorName:t,args:r}}function _r(e,t,...r){return{type:ot,storeKey:Re(e)?e.name:e,selectorName:t,args:r}}function xr(e,t,...r){return{type:st,storeKey:Re(e)?e.name:e,actionName:t,args:r}}var it={select:Or,resolveSelect:_r,dispatch:xr},at={[nt]:H(e=>({storeKey:t,selectorName:r,args:n})=>e.select(t)[r](...n)),[ot]:H(e=>({storeKey:t,selectorName:r,args:n})=>{let o=e.select(t)[r].hasResolver?"resolveSelect":"select";return e[o](t)[r](...n)}),[st]:H(e=>({storeKey:t,actionName:r,args:n})=>e.dispatch(t)[r](...n))};var ft=v(ct(),1),{lock:C,unlock:k}=(0,ft.__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/data");function Oe(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}var Tr=()=>e=>t=>Oe(t)?t.then(r=>{if(r)return e(r)}):e(t),lt=Tr;var Ar=(e,t)=>()=>r=>n=>{let o=e.select(t).getCachedResolvers();return Object.entries(o).forEach(([i,f])=>{let a=e.stores[t]?.resolvers?.[i];!a||!a.shouldInvalidate||f.forEach((u,c)=>{u!==void 0&&(u.status!=="finished"&&u.status!=="error"||a.shouldInvalidate(n,...c)&&e.dispatch(t).invalidateResolution(i,c))})}),r(n)},dt=Ar;function pt(e){return()=>t=>r=>typeof r=="function"?r(e):t(r)}var P=v(Ee(),1);var mt=e=>t=>(r={},n)=>{let o=n[e];if(o===void 0)return r;let s=t(r[o],n);return s===r[o]?r:{...r,[o]:s}};function j(e){if(e==null)return[];let t=e.length,r=t;for(;r>0&&e[r-1]===void 0;)r--;return r===t?e:e.slice(0,r)}var Ir=mt("selectorName")((e=new P.default,t)=>{switch(t.type){case"START_RESOLUTION":{let r=new P.default(e);return r.set(j(t.args),{status:"resolving"}),r}case"FINISH_RESOLUTION":{let r=new P.default(e);return r.set(j(t.args),{status:"finished"}),r}case"FAIL_RESOLUTION":{let r=new P.default(e);return r.set(j(t.args),{status:"error",error:t.error}),r}case"START_RESOLUTIONS":{let r=new P.default(e);for(let n of t.args)r.set(j(n),{status:"resolving"});return r}case"FINISH_RESOLUTIONS":{let r=new P.default(e);for(let n of t.args)r.set(j(n),{status:"finished"});return r}case"FAIL_RESOLUTIONS":{let r=new P.default(e);return t.args.forEach((n,o)=>{let s={status:"error",error:void 0},i=t.errors[o];i&&(s.error=i),r.set(j(n),s)}),r}case"INVALIDATE_RESOLUTION":{let r=new P.default(e);return r.delete(j(t.args)),r}}return e}),jr=(e={},t)=>{switch(t.type){case"INVALIDATE_RESOLUTION_FOR_STORE":return{};case"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR":{if(t.selectorName in e){let{[t.selectorName]:r,...n}=e;return n}return e}case"START_RESOLUTION":case"FINISH_RESOLUTION":case"FAIL_RESOLUTION":case"START_RESOLUTIONS":case"FINISH_RESOLUTIONS":case"FAIL_RESOLUTIONS":case"INVALIDATE_RESOLUTION":return Ir(e,t);default:return e}},ht=jr;var xe={};oe(xe,{countSelectorsByStatus:()=>Kr,getCachedResolvers:()=>Vr,getIsResolving:()=>Pr,getResolutionError:()=>kr,getResolutionState:()=>F,hasFinishedResolution:()=>Lr,hasResolutionFailed:()=>Ur,hasResolvingSelectors:()=>$r,hasStartedResolution:()=>Dr,isResolving:()=>Fr});var gt=v(be(),1);var _e={};function Mr(e){return[e]}function Nr(e){return!!e&&typeof e=="object"}function Cr(){var e={clear:function(){e.head=null}};return e}function yt(e,t,r){var n;if(e.length!==t.length)return!1;for(n=r;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function J(e,t){var r,n=t||Mr;function o(f){var a=r,u=!0,c,m,b,S;for(c=0;c<f.length;c++){if(m=f[c],!Nr(m)){u=!1;break}a.has(m)?a=a.get(m):(b=new WeakMap,a.set(m,b),a=b)}return a.has(_e)||(S=Cr(),S.isUniqueByDependants=u,a.set(_e,S)),a.get(_e)}function s(){r=new WeakMap}function i(){var f=arguments.length,a,u,c,m,b;for(m=new Array(f),c=0;c<f;c++)m[c]=arguments[c];for(b=n.apply(null,m),a=o(b),a.isUniqueByDependants||(a.lastDependants&&!yt(b,a.lastDependants,0)&&a.clear(),a.lastDependants=b),u=a.head;u;){if(!yt(u.args,m,1)){u=u.next;continue}return u!==a.head&&(u.prev.next=u.next,u.next&&(u.next.prev=u.prev),u.next=a.head,u.prev=null,a.head.prev=u,a.head=u),u.val}return u={val:e.apply(null,m)},m[0]=null,u.args=m,a.head&&(a.head.prev=u,u.next=a.head),a.head=u,u.val}return i.getDependants=n,i.clear=s,s(),i}function F(e,t,r){let n=e[t];if(n)return n.get(j(r))}function Pr(e,t,r){(0,gt.default)("wp.data.select( store ).getIsResolving",{since:"6.6",version:"6.8",alternative:"wp.data.select( store ).getResolutionState"});let n=F(e,t,r);return n&&n.status==="resolving"}function Dr(e,t,r){return F(e,t,r)!==void 0}function Lr(e,t,r){let n=F(e,t,r)?.status;return n==="finished"||n==="error"}function Ur(e,t,r){return F(e,t,r)?.status==="error"}function kr(e,t,r){let n=F(e,t,r);return n?.status==="error"?n.error:null}function Fr(e,t,r){return F(e,t,r)?.status==="resolving"}function Vr(e){return e}function $r(e){return Object.values(e).some(t=>Array.from(t._map.values()).some(r=>r[1]?.status==="resolving"))}var Kr=J(e=>{let t={};return Object.values(e).forEach(r=>Array.from(r._map.values()).forEach(n=>{let o=n[1]?.status??"error";t[o]||(t[o]=0),t[o]++})),t},e=>[e]);var je={};oe(je,{failResolution:()=>Ie,failResolutions:()=>zr,finishResolution:()=>Ae,finishResolutions:()=>Gr,invalidateResolution:()=>qr,invalidateResolutionForStore:()=>Hr,invalidateResolutionForStoreSelector:()=>Br,startResolution:()=>Te,startResolutions:()=>Wr});function Te(e,t){return{type:"START_RESOLUTION",selectorName:e,args:t}}function Ae(e,t){return{type:"FINISH_RESOLUTION",selectorName:e,args:t}}function Ie(e,t,r){return{type:"FAIL_RESOLUTION",selectorName:e,args:t,error:r}}function Wr(e,t){return{type:"START_RESOLUTIONS",selectorName:e,args:t}}function Gr(e,t){return{type:"FINISH_RESOLUTIONS",selectorName:e,args:t}}function zr(e,t,r){return{type:"FAIL_RESOLUTIONS",selectorName:e,args:t,errors:r}}function qr(e,t){return{type:"INVALIDATE_RESOLUTION",selectorName:e,args:t}}function Hr(){return{type:"INVALIDATE_RESOLUTION_FOR_STORE"}}function Br(e){return{type:"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR",selectorName:e}}var Me=e=>{let t=[...e];for(let r=t.length-1;r>=0;r--)t[r]===void 0&&t.splice(r,1);return t},D=(e,t)=>Object.fromEntries(Object.entries(e??{}).map(([r,n])=>[r,t(n,r)])),Yr=(e,t)=>t instanceof Map?Object.fromEntries(t):t instanceof window.HTMLElement?null:t;function Xr(){let e={};return{isRunning(t,r){return e[t]&&e[t].get(Me(r))},clear(t,r){e[t]&&e[t].delete(Me(r))},markAsRunning(t,r){e[t]||(e[t]=new St.default),e[t].set(Me(r),!0)}}}function ie(e,t){let r=new WeakMap;return{get(n){let o=e(n);if(!o)return null;let s=r.get(o);return s||(s=t(o,n),r.set(o,s)),s}}}function ae(e,t){return new Proxy(e,{get:(r,n)=>t.get(n)||Reflect.get(r,n)})}function Q(e,t){let r={},n={},o={privateActions:r,registerPrivateActions:i=>{Object.assign(r,i)},privateSelectors:n,registerPrivateSelectors:i=>{Object.assign(n,i)}},s={name:e,instantiate:i=>{let f=new Set,a=t.reducer,c=Jr(e,t,i,{registry:i,get dispatch(){return T},get select(){return K},get resolveSelect(){return G}});C(c,o);let m=Xr();function b(h){return(...x)=>Promise.resolve(c.dispatch(h(...x)))}let S={...D(je,b),...D(t.actions,b)},R=ae(S,ie(h=>r[h],b)),T=new Proxy(h=>c.dispatch(h),{get:(h,x)=>R[x]});C(S,R);let y=t.resolvers?D(t.resolvers,en):{};function w(h,x){h.isRegistrySelector&&(h.registry=i);let A=(...X)=>{X=Ne(h,X);let Se=c.__unstableOriginalGetState();return h.isRegistrySelector&&(h.registry=i),h(Se.root,...X)};A.__unstableNormalizeArgs=h.__unstableNormalizeArgs;let z=y[x];return z?tn(A,x,z,c,m,E):(A.hasResolver=!1,A)}function g(h){let x=(A,z,...X)=>{if(A){let Ge=t.selectors?.[A];Ge&&(z=Ne(Ge,z))}let Se=c.__unstableOriginalGetState();return h(Se.metadata,A,z,...X)};return x.hasResolver=!1,x}let E=D(xe,g),_=D(t.selectors,w),l={...E,..._},d=ie(h=>n[h],w),p=ae(l,d);for(let h of Object.keys(n))d.get(h);let K=new Proxy(h=>h(c.__unstableOriginalGetState()),{get:(h,x)=>p[x]});C(l,p);let W=Qr(c,y,E),G=D(_,W),ye=ae(G,ie(h=>d.get(h),W));C(G,ye);let Ke=Zr(c,E),ge={...E,...D(_,Ke)},sr=ae(ge,ie(h=>d.get(h),Ke));C(ge,sr);let ir=()=>l,ar=()=>S,ur=()=>G,cr=()=>ge;c.__unstableOriginalGetState=c.getState,c.getState=()=>c.__unstableOriginalGetState().root;let fr=c&&(h=>(f.add(h),()=>f.delete(h))),We=c.__unstableOriginalGetState();return c.subscribe(()=>{let h=c.__unstableOriginalGetState(),x=h!==We;if(We=h,x)for(let A of f)A()}),{reducer:a,store:c,actions:S,selectors:l,resolvers:y,getSelectors:ir,getResolveSelectors:ur,getSuspendSelectors:cr,getActions:ar,subscribe:fr}}};return C(s,o),s}function Jr(e,t,r,n){let o={...t.controls,...at},s=D(o,m=>m.isRegistryControl?m(r):m),i=[dt(r,e),lt,(0,bt.default)(s),pt(n)],f=[Ye(...i)];typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&f.push(window.__REDUX_DEVTOOLS_EXTENSION__({name:e,instanceId:e,serialize:{replacer:Yr}}));let{reducer:a,initialState:u}=t,c=se({metadata:ht,root:a});return we(c,{root:u},(0,vt.compose)(f))}function Qr(e,t,r){return(n,o)=>n.hasResolver?(...s)=>new Promise((i,f)=>{let a=t[o],u=()=>r.hasFinishedResolution(o,s)||typeof a.isFulfilled=="function"&&a.isFulfilled(e.getState(),...s),c=R=>{if(r.hasResolutionFailed(o,s)){let y=r.getResolutionError(o,s);f(y)}else i(R)},m=()=>n.apply(null,s),b=m();if(u())return c(b);let S=e.subscribe(()=>{u()&&(S(),c(m()))})}):async(...s)=>n.apply(null,s)}function Zr(e,t){return(r,n)=>r.hasResolver?(...o)=>{let s=r.apply(null,o);if(t.hasFinishedResolution(n,o)){if(t.hasResolutionFailed(n,o))throw t.getResolutionError(n,o);return s}throw new Promise(i=>{let f=e.subscribe(()=>{t.hasFinishedResolution(n,o)&&(i(),f())})})}:r}function en(e){return e.fulfill?e:{...e,fulfill:e}}function tn(e,t,r,n,o,s){function i(a){o.isRunning(t,a)||s.hasStartedResolution(t,a)||typeof r.isFulfilled=="function"&&r.isFulfilled(n.getState(),...a)||(o.markAsRunning(t,a),setTimeout(async()=>{o.clear(t,a),n.dispatch(Te(t,a));try{let u=r.fulfill(...a);u&&await n.dispatch(u),n.dispatch(Ae(t,a))}catch(u){n.dispatch(Ie(t,a,u))}},0))}let f=(...a)=>(a=Ne(e,a),i(a),e(...a));return f.hasResolver=!0,f}function Ne(e,t){return e.__unstableNormalizeArgs&&typeof e.__unstableNormalizeArgs=="function"&&t?.length?e.__unstableNormalizeArgs(t):t}var rn={name:"core/data",instantiate(e){let t=n=>(o,...s)=>e.select(o)[n](...s),r=n=>(o,...s)=>e.dispatch(o)[n](...s);return{getSelectors(){return Object.fromEntries(["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"].map(n=>[n,t(n)]))},getActions(){return Object.fromEntries(["startResolution","finishResolution","invalidateResolution","invalidateResolutionForStore","invalidateResolutionForStoreSelector"].map(n=>[n,r(n)]))},subscribe(){return()=>()=>{}}}}},wt=rn;function Ce(){let e=!1,t=!1,r=new Set,n=()=>Array.from(r).forEach(o=>o());return{get isPaused(){return e},subscribe(o){return r.add(o),()=>r.delete(o)},pause(){e=!0},resume(){e=!1,t&&(t=!1,n())},emit(){if(e){t=!0;return}n()}}}function Z(e){return typeof e=="string"?e:e.name}function ue(e={},t=null){let r={},n=Ce(),o=null;function s(){n.emit()}let i=(l,d)=>{if(!d)return n.subscribe(l);let p=Z(d),K=r[p];return K?K.subscribe(l):t?t.subscribe(l,d):n.subscribe(l)};function f(l){let d=Z(l);o?.add(d);let p=r[d];return p?p.getSelectors():t?.select(d)}function a(l,d){o=new Set;try{return l.call(this)}finally{d.current=Array.from(o),o=null}}function u(l){let d=Z(l);o?.add(d);let p=r[d];return p?p.getResolveSelectors():t&&t.resolveSelect(d)}function c(l){let d=Z(l);o?.add(d);let p=r[d];return p?p.getSuspendSelectors():t&&t.suspendSelect(d)}function m(l){let d=Z(l),p=r[d];return p?p.getActions():t&&t.dispatch(d)}function b(l){return Object.fromEntries(Object.entries(l).map(([d,p])=>typeof p!="function"?[d,p]:[d,function(){return g[d].apply(null,arguments)}]))}function S(l,d){if(r[l])return console.error('Store "'+l+'" is already registered.'),r[l];let p=d();if(typeof p.getSelectors!="function")throw new TypeError("store.getSelectors must be a function");if(typeof p.getActions!="function")throw new TypeError("store.getActions must be a function");if(typeof p.subscribe!="function")throw new TypeError("store.subscribe must be a function");p.emitter=Ce();let K=p.subscribe;if(p.subscribe=W=>{let G=p.emitter.subscribe(W),ye=K(()=>{if(p.emitter.isPaused){p.emitter.emit();return}W()});return()=>{ye?.(),G?.()}},r[l]=p,p.subscribe(s),t)try{k(p.store).registerPrivateActions(k(t).privateActionsOf(l)),k(p.store).registerPrivateSelectors(k(t).privateSelectorsOf(l))}catch{}return p}function R(l){S(l.name,()=>l.instantiate(g))}function T(l,d){(0,Et.default)("wp.data.registerGenericStore",{since:"5.9",alternative:"wp.data.register( storeDescriptor )"}),S(l,()=>d)}function y(l,d){if(!d.reducer)throw new TypeError("Must specify store reducer");return S(l,()=>Q(l,d).instantiate(g)).store}function w(l){if(n.isPaused){l();return}n.pause(),Object.values(r).forEach(d=>d.emitter.pause());try{l()}finally{n.resume(),Object.values(r).forEach(d=>d.emitter.resume())}}let g={batch:w,stores:r,namespaces:r,subscribe:i,select:f,resolveSelect:u,suspendSelect:c,dispatch:m,use:E,register:R,registerGenericStore:T,registerStore:y,__unstableMarkListeningStores:a};function E(l,d){if(l)return g={...g,...l(g,d)},g}g.register(wt);for(let[l,d]of Object.entries(e))g.register(Q(l,d));t&&t.subscribe(s);let _=b(g);return C(_,{privateActionsOf:l=>{try{return k(r[l].store).privateActions}catch{return{}}},privateSelectorsOf:l=>{try{return k(r[l].store).privateSelectors}catch{return{}}}}),_}var L=ue();var De={};oe(De,{persistence:()=>Ct});function Rt(e){return Object.prototype.toString.call(e)==="[object Object]"}function ce(e){var t,r;return Rt(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(Rt(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}var Mt=v(Tt(),1);var Y,At={getItem(e){return!Y||!Y[e]?null:Y[e]},setItem(e,t){Y||At.clear(),Y[e]=String(t)},clear(){Y=Object.create(null)}},It=At;var te;try{te=window.localStorage,te.setItem("__wpDataTestLocalStorage",""),te.removeItem("__wpDataTestLocalStorage")}catch{te=It}var jt=te;var gn=jt,Sn="WP_DATA",bn=e=>(t,r)=>r.nextState===t?t:e(t,r);function vn(e){let{storage:t=gn,storageKey:r=Sn}=e,n;function o(){if(n===void 0){let i=t.getItem(r);if(i===null)n={};else try{n=JSON.parse(i)}catch{n={}}}return n}function s(i,f){n={...n,[i]:f},t.setItem(r,JSON.stringify(n))}return{get:o,set:s}}function Nt(e,t){let r=vn(t);function n(o,s,i){let f;if(Array.isArray(i)){let u=i.reduce((c,m)=>Object.assign(c,{[m]:(b,S)=>S.nextState[m]}),{});f=bn(Pe(u))}else f=(u,c)=>c.nextState;let a=f(void 0,{nextState:o()});return()=>{let u=f(a,{nextState:o()});u!==a&&(r.set(s,u),a=u)}}return{registerStore(o,s){if(!s.persist)return e.registerStore(o,s);let i=r.get()[o];if(i!==void 0){let a=s.reducer(s.initialState,{type:"@@WP/PERSISTENCE_RESTORE"});ce(a)&&ce(i)?a=(0,Mt.default)(a,i,{isMergeableObject:ce}):a=i,s={...s,initialState:a}}let f=e.registerStore(o,s);return f.subscribe(n(f.getState,o,s.persist)),f}}}Nt.__unstableMigrate=()=>{};var Ct=Nt;var me=v(q(),1);var Gt=v(Dt(),1),N=v(V(),1),zt=v(kt(),1);var Vt=v(V(),1);var Ft=v(V(),1);var fe=(0,Ft.createContext)(L);fe.displayName="RegistryProviderContext";var{Consumer:wn,Provider:En}=fe,re=wn,Le=En;function M(){return(0,Vt.useContext)(fe)}var Kt=v(V(),1);var $t=v(V(),1),le=(0,$t.createContext)(!1);le.displayName="AsyncModeContext";var{Consumer:qo,Provider:Rn}=le;var Ue=Rn;function Wt(){return(0,Kt.useContext)(le)}var ke=(0,Gt.createQueue)();function On(e,t){let r=t?e.suspendSelect:e.select,n={},o,s,i=!1,f,a,u,c=new Map;function m(S){return e.stores[S]?.store?.getState?.()??{}}let b=S=>{let R=[...S],T=new Set;function y(g){if(i)for(let p of R)c.get(p)!==m(p)&&(i=!1);c.clear();let E=()=>{i=!1,g()},_=()=>{f?ke.add(n,E):E()},l=[];function d(p){l.push(e.subscribe(_,p))}for(let p of R)d(p);return T.add(d),()=>{T.delete(d);for(let p of l.values())p?.();ke.cancel(n)}}function w(g){for(let E of g)if(!R.includes(E)){R.push(E);for(let _ of T)_(E)}}return{subscribe:y,updateStores:w}};return(S,R)=>{function T(){if(i&&S===o)return s;let w={current:null},g=e.__unstableMarkListeningStores(()=>S(r,e),w);if(a)a.updateStores(w.current);else{for(let E of w.current)c.set(E,m(E));a=b(w.current)}(0,zt.isShallowEqual)(s,g)||(s=g),o=S,i=!0}function y(){return T(),s}return f&&!R&&(i=!1,ke.cancel(n)),T(),f=R,{subscribe:a.subscribe,getValue:y}}}function _n(e){return M().select(e)}function qt(e,t,r){let n=M(),o=Wt(),s=(0,N.useMemo)(()=>On(n,e),[n,e]),i=(0,N.useCallback)(t,r),{subscribe:f,getValue:a}=s(i,o),u=(0,N.useSyncExternalStore)(f,a,a);return(0,N.useDebugValue)(u),u}function de(e,t){let r=typeof e!="function",n=(0,N.useRef)(r);if(r!==n.current){let o=n.current?"static":"mapping",s=r?"static":"mapping";throw new Error(`Switching useSelect from ${o} to ${s} is not allowed`)}return r?_n(e):qt(!1,e,t)}function Ht(e,t){return qt(!0,e,t)}var Yt=v(pe(),1),xn=e=>(0,me.createHigherOrderComponent)(t=>(0,me.pure)(r=>{let o=de((s,i)=>e(s,r,i));return(0,Yt.jsx)(t,{...r,...o})}),"withSelect"),Xt=xn;var Qt=v(q(),1);var Tn=e=>{let{dispatch:t}=M();return e===void 0?t:t(e)},Fe=Tn;var he=v(V(),1),Jt=v(q(),1);var An=(e,t)=>{let r=M(),n=(0,he.useRef)(e);return(0,Jt.useIsomorphicLayoutEffect)(()=>{n.current=e}),(0,he.useMemo)(()=>{let o=n.current(r.dispatch,r);return Object.fromEntries(Object.entries(o).map(([s,i])=>(typeof i!="function"&&console.warn(`Property ${s} returned from dispatchMap in useDispatchWithMap must be a function.`),[s,(...f)=>n.current(r.dispatch,r)[s](...f)])))},[r,...t])},Ve=An;var Zt=v(pe(),1),In=e=>(0,Qt.createHigherOrderComponent)(t=>r=>{let o=Ve((s,i)=>e(s,r,i),[]);return(0,Zt.jsx)(t,{...r,...o})},"withDispatch"),er=In;var tr=v(q(),1);var $e=v(pe(),1),jn=(0,tr.createHigherOrderComponent)(e=>t=>(0,$e.jsx)(re,{children:r=>(0,$e.jsx)(e,{...t,registry:r})}),"withRegistry"),rr=jn;function nr(e){return L.dispatch(e)}function or(e){return L.select(e)}var $=L,Pe=se;function Mn(e){return $.resolveSelect(e)}var Nn=e=>$.suspendSelect(e),Cn=(e,t)=>$.subscribe(e,t),Pn=$.registerGenericStore,Dn=$.registerStore,Ln=$.use,Un=e=>$.register(e);return yr(kn);})();
/*! Bundled license information:

is-plain-object/dist/is-plain-object.mjs:
  (*!
   * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
   *
   * Copyright (c) 2014-2017, Jon Schlinkert.
   * Released under the MIT License.
   *)
*/
                                                                                                                       dist/date.js                                                                                        0000644                 00000540540 15212564002 0006767 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).date = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // vendor-external:moment
  var require_moment = __commonJS({
    "vendor-external:moment"(exports, module) {
      module.exports = window.moment;
    }
  });

  // node_modules/moment-timezone/builds/moment-timezone-with-data-1970-2030.js
  var require_moment_timezone_with_data_1970_2030 = __commonJS({
    "node_modules/moment-timezone/builds/moment-timezone-with-data-1970-2030.js"(exports, module) {
      (function(root, factory) {
        "use strict";
        if (typeof module === "object" && module.exports) {
          module.exports = factory(require_moment());
        } else if (typeof define === "function" && define.amd) {
          define(["moment"], factory);
        } else {
          factory(root.moment);
        }
      })(exports, function(moment) {
        "use strict";
        if (moment.version === void 0 && moment.default) {
          moment = moment.default;
        }
        var VERSION = "0.5.43", zones = {}, links = {}, countries = {}, names = {}, guesses = {}, cachedGuess;
        if (!moment || typeof moment.version !== "string") {
          logError("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");
        }
        var momentVersion = moment.version.split("."), major = +momentVersion[0], minor = +momentVersion[1];
        if (major < 2 || major === 2 && minor < 6) {
          logError("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js " + moment.version + ". See momentjs.com");
        }
        function charCodeToInt(charCode) {
          if (charCode > 96) {
            return charCode - 87;
          } else if (charCode > 64) {
            return charCode - 29;
          }
          return charCode - 48;
        }
        function unpackBase60(string) {
          var i = 0, parts = string.split("."), whole = parts[0], fractional = parts[1] || "", multiplier = 1, num, out = 0, sign = 1;
          if (string.charCodeAt(0) === 45) {
            i = 1;
            sign = -1;
          }
          for (i; i < whole.length; i++) {
            num = charCodeToInt(whole.charCodeAt(i));
            out = 60 * out + num;
          }
          for (i = 0; i < fractional.length; i++) {
            multiplier = multiplier / 60;
            num = charCodeToInt(fractional.charCodeAt(i));
            out += num * multiplier;
          }
          return out * sign;
        }
        function arrayToInt(array) {
          for (var i = 0; i < array.length; i++) {
            array[i] = unpackBase60(array[i]);
          }
        }
        function intToUntil(array, length) {
          for (var i = 0; i < length; i++) {
            array[i] = Math.round((array[i - 1] || 0) + array[i] * 6e4);
          }
          array[length - 1] = Infinity;
        }
        function mapIndices(source, indices) {
          var out = [], i;
          for (i = 0; i < indices.length; i++) {
            out[i] = source[indices[i]];
          }
          return out;
        }
        function unpack(string) {
          var data = string.split("|"), offsets = data[2].split(" "), indices = data[3].split(""), untils = data[4].split(" ");
          arrayToInt(offsets);
          arrayToInt(indices);
          arrayToInt(untils);
          intToUntil(untils, indices.length);
          return {
            name: data[0],
            abbrs: mapIndices(data[1].split(" "), indices),
            offsets: mapIndices(offsets, indices),
            untils,
            population: data[5] | 0
          };
        }
        function Zone(packedString) {
          if (packedString) {
            this._set(unpack(packedString));
          }
        }
        Zone.prototype = {
          _set: function(unpacked) {
            this.name = unpacked.name;
            this.abbrs = unpacked.abbrs;
            this.untils = unpacked.untils;
            this.offsets = unpacked.offsets;
            this.population = unpacked.population;
          },
          _index: function(timestamp) {
            var target = +timestamp, untils = this.untils, i;
            for (i = 0; i < untils.length; i++) {
              if (target < untils[i]) {
                return i;
              }
            }
          },
          countries: function() {
            var zone_name = this.name;
            return Object.keys(countries).filter(function(country_code) {
              return countries[country_code].zones.indexOf(zone_name) !== -1;
            });
          },
          parse: function(timestamp) {
            var target = +timestamp, offsets = this.offsets, untils = this.untils, max = untils.length - 1, offset, offsetNext, offsetPrev, i;
            for (i = 0; i < max; i++) {
              offset = offsets[i];
              offsetNext = offsets[i + 1];
              offsetPrev = offsets[i ? i - 1 : i];
              if (offset < offsetNext && tz.moveAmbiguousForward) {
                offset = offsetNext;
              } else if (offset > offsetPrev && tz.moveInvalidForward) {
                offset = offsetPrev;
              }
              if (target < untils[i] - offset * 6e4) {
                return offsets[i];
              }
            }
            return offsets[max];
          },
          abbr: function(mom) {
            return this.abbrs[this._index(mom)];
          },
          offset: function(mom) {
            logError("zone.offset has been deprecated in favor of zone.utcOffset");
            return this.offsets[this._index(mom)];
          },
          utcOffset: function(mom) {
            return this.offsets[this._index(mom)];
          }
        };
        function Country(country_name, zone_names) {
          this.name = country_name;
          this.zones = zone_names;
        }
        function OffsetAt(at) {
          var timeString = at.toTimeString();
          var abbr = timeString.match(/\([a-z ]+\)/i);
          if (abbr && abbr[0]) {
            abbr = abbr[0].match(/[A-Z]/g);
            abbr = abbr ? abbr.join("") : void 0;
          } else {
            abbr = timeString.match(/[A-Z]{3,5}/g);
            abbr = abbr ? abbr[0] : void 0;
          }
          if (abbr === "GMT") {
            abbr = void 0;
          }
          this.at = +at;
          this.abbr = abbr;
          this.offset = at.getTimezoneOffset();
        }
        function ZoneScore(zone) {
          this.zone = zone;
          this.offsetScore = 0;
          this.abbrScore = 0;
        }
        ZoneScore.prototype.scoreOffsetAt = function(offsetAt) {
          this.offsetScore += Math.abs(this.zone.utcOffset(offsetAt.at) - offsetAt.offset);
          if (this.zone.abbr(offsetAt.at).replace(/[^A-Z]/g, "") !== offsetAt.abbr) {
            this.abbrScore++;
          }
        };
        function findChange(low, high) {
          var mid, diff;
          while (diff = ((high.at - low.at) / 12e4 | 0) * 6e4) {
            mid = new OffsetAt(new Date(low.at + diff));
            if (mid.offset === low.offset) {
              low = mid;
            } else {
              high = mid;
            }
          }
          return low;
        }
        function userOffsets() {
          var startYear = (/* @__PURE__ */ new Date()).getFullYear() - 2, last = new OffsetAt(new Date(startYear, 0, 1)), offsets = [last], change, next, i;
          for (i = 1; i < 48; i++) {
            next = new OffsetAt(new Date(startYear, i, 1));
            if (next.offset !== last.offset) {
              change = findChange(last, next);
              offsets.push(change);
              offsets.push(new OffsetAt(new Date(change.at + 6e4)));
            }
            last = next;
          }
          for (i = 0; i < 4; i++) {
            offsets.push(new OffsetAt(new Date(startYear + i, 0, 1)));
            offsets.push(new OffsetAt(new Date(startYear + i, 6, 1)));
          }
          return offsets;
        }
        function sortZoneScores(a, b) {
          if (a.offsetScore !== b.offsetScore) {
            return a.offsetScore - b.offsetScore;
          }
          if (a.abbrScore !== b.abbrScore) {
            return a.abbrScore - b.abbrScore;
          }
          if (a.zone.population !== b.zone.population) {
            return b.zone.population - a.zone.population;
          }
          return b.zone.name.localeCompare(a.zone.name);
        }
        function addToGuesses(name, offsets) {
          var i, offset;
          arrayToInt(offsets);
          for (i = 0; i < offsets.length; i++) {
            offset = offsets[i];
            guesses[offset] = guesses[offset] || {};
            guesses[offset][name] = true;
          }
        }
        function guessesForUserOffsets(offsets) {
          var offsetsLength = offsets.length, filteredGuesses = {}, out = [], i, j, guessesOffset;
          for (i = 0; i < offsetsLength; i++) {
            guessesOffset = guesses[offsets[i].offset] || {};
            for (j in guessesOffset) {
              if (guessesOffset.hasOwnProperty(j)) {
                filteredGuesses[j] = true;
              }
            }
          }
          for (i in filteredGuesses) {
            if (filteredGuesses.hasOwnProperty(i)) {
              out.push(names[i]);
            }
          }
          return out;
        }
        function rebuildGuess() {
          try {
            var intlName = Intl.DateTimeFormat().resolvedOptions().timeZone;
            if (intlName && intlName.length > 3) {
              var name = names[normalizeName(intlName)];
              if (name) {
                return name;
              }
              logError("Moment Timezone found " + intlName + " from the Intl api, but did not have that data loaded.");
            }
          } catch (e) {
          }
          var offsets = userOffsets(), offsetsLength = offsets.length, guesses2 = guessesForUserOffsets(offsets), zoneScores = [], zoneScore, i, j;
          for (i = 0; i < guesses2.length; i++) {
            zoneScore = new ZoneScore(getZone(guesses2[i]), offsetsLength);
            for (j = 0; j < offsetsLength; j++) {
              zoneScore.scoreOffsetAt(offsets[j]);
            }
            zoneScores.push(zoneScore);
          }
          zoneScores.sort(sortZoneScores);
          return zoneScores.length > 0 ? zoneScores[0].zone.name : void 0;
        }
        function guess(ignoreCache) {
          if (!cachedGuess || ignoreCache) {
            cachedGuess = rebuildGuess();
          }
          return cachedGuess;
        }
        function normalizeName(name) {
          return (name || "").toLowerCase().replace(/\//g, "_");
        }
        function addZone(packed) {
          var i, name, split, normalized;
          if (typeof packed === "string") {
            packed = [packed];
          }
          for (i = 0; i < packed.length; i++) {
            split = packed[i].split("|");
            name = split[0];
            normalized = normalizeName(name);
            zones[normalized] = packed[i];
            names[normalized] = name;
            addToGuesses(normalized, split[2].split(" "));
          }
        }
        function getZone(name, caller) {
          name = normalizeName(name);
          var zone = zones[name];
          var link;
          if (zone instanceof Zone) {
            return zone;
          }
          if (typeof zone === "string") {
            zone = new Zone(zone);
            zones[name] = zone;
            return zone;
          }
          if (links[name] && caller !== getZone && (link = getZone(links[name], getZone))) {
            zone = zones[name] = new Zone();
            zone._set(link);
            zone.name = names[name];
            return zone;
          }
          return null;
        }
        function getNames() {
          var i, out = [];
          for (i in names) {
            if (names.hasOwnProperty(i) && (zones[i] || zones[links[i]]) && names[i]) {
              out.push(names[i]);
            }
          }
          return out.sort();
        }
        function getCountryNames() {
          return Object.keys(countries);
        }
        function addLink(aliases) {
          var i, alias, normal0, normal1;
          if (typeof aliases === "string") {
            aliases = [aliases];
          }
          for (i = 0; i < aliases.length; i++) {
            alias = aliases[i].split("|");
            normal0 = normalizeName(alias[0]);
            normal1 = normalizeName(alias[1]);
            links[normal0] = normal1;
            names[normal0] = alias[0];
            links[normal1] = normal0;
            names[normal1] = alias[1];
          }
        }
        function addCountries(data) {
          var i, country_code, country_zones, split;
          if (!data || !data.length) return;
          for (i = 0; i < data.length; i++) {
            split = data[i].split("|");
            country_code = split[0].toUpperCase();
            country_zones = split[1].split(" ");
            countries[country_code] = new Country(
              country_code,
              country_zones
            );
          }
        }
        function getCountry(name) {
          name = name.toUpperCase();
          return countries[name] || null;
        }
        function zonesForCountry(country, with_offset) {
          country = getCountry(country);
          if (!country) return null;
          var zones2 = country.zones.sort();
          if (with_offset) {
            return zones2.map(function(zone_name) {
              var zone = getZone(zone_name);
              return {
                name: zone_name,
                offset: zone.utcOffset(/* @__PURE__ */ new Date())
              };
            });
          }
          return zones2;
        }
        function loadData(data) {
          addZone(data.zones);
          addLink(data.links);
          addCountries(data.countries);
          tz.dataVersion = data.version;
        }
        function zoneExists(name) {
          if (!zoneExists.didShowError) {
            zoneExists.didShowError = true;
            logError("moment.tz.zoneExists('" + name + "') has been deprecated in favor of !moment.tz.zone('" + name + "')");
          }
          return !!getZone(name);
        }
        function needsOffset(m) {
          var isUnixTimestamp = m._f === "X" || m._f === "x";
          return !!(m._a && m._tzm === void 0 && !isUnixTimestamp);
        }
        function logError(message) {
          if (typeof console !== "undefined" && typeof console.error === "function") {
            console.error(message);
          }
        }
        function tz(input) {
          var args = Array.prototype.slice.call(arguments, 0, -1), name = arguments[arguments.length - 1], zone = getZone(name), out = moment.utc.apply(null, args);
          if (zone && !moment.isMoment(input) && needsOffset(out)) {
            out.add(zone.parse(out), "minutes");
          }
          out.tz(name);
          return out;
        }
        tz.version = VERSION;
        tz.dataVersion = "";
        tz._zones = zones;
        tz._links = links;
        tz._names = names;
        tz._countries = countries;
        tz.add = addZone;
        tz.link = addLink;
        tz.load = loadData;
        tz.zone = getZone;
        tz.zoneExists = zoneExists;
        tz.guess = guess;
        tz.names = getNames;
        tz.Zone = Zone;
        tz.unpack = unpack;
        tz.unpackBase60 = unpackBase60;
        tz.needsOffset = needsOffset;
        tz.moveInvalidForward = true;
        tz.moveAmbiguousForward = false;
        tz.countries = getCountryNames;
        tz.zonesForCountry = zonesForCountry;
        var fn = moment.fn;
        moment.tz = tz;
        moment.defaultZone = null;
        moment.updateOffset = function(mom, keepTime) {
          var zone = moment.defaultZone, offset;
          if (mom._z === void 0) {
            if (zone && needsOffset(mom) && !mom._isUTC) {
              mom._d = moment.utc(mom._a)._d;
              mom.utc().add(zone.parse(mom), "minutes");
            }
            mom._z = zone;
          }
          if (mom._z) {
            offset = mom._z.utcOffset(mom);
            if (Math.abs(offset) < 16) {
              offset = offset / 60;
            }
            if (mom.utcOffset !== void 0) {
              var z = mom._z;
              mom.utcOffset(-offset, keepTime);
              mom._z = z;
            } else {
              mom.zone(offset, keepTime);
            }
          }
        };
        fn.tz = function(name, keepTime) {
          if (name) {
            if (typeof name !== "string") {
              throw new Error("Time zone name must be a string, got " + name + " [" + typeof name + "]");
            }
            this._z = getZone(name);
            if (this._z) {
              moment.updateOffset(this, keepTime);
            } else {
              logError("Moment Timezone has no data for " + name + ". See http://momentjs.com/timezone/docs/#/data-loading/.");
            }
            return this;
          }
          if (this._z) {
            return this._z.name;
          }
        };
        function abbrWrap(old) {
          return function() {
            if (this._z) {
              return this._z.abbr(this);
            }
            return old.call(this);
          };
        }
        function resetZoneWrap(old) {
          return function() {
            this._z = null;
            return old.apply(this, arguments);
          };
        }
        function resetZoneWrap2(old) {
          return function() {
            if (arguments.length > 0) this._z = null;
            return old.apply(this, arguments);
          };
        }
        fn.zoneName = abbrWrap(fn.zoneName);
        fn.zoneAbbr = abbrWrap(fn.zoneAbbr);
        fn.utc = resetZoneWrap(fn.utc);
        fn.local = resetZoneWrap(fn.local);
        fn.utcOffset = resetZoneWrap2(fn.utcOffset);
        moment.tz.setDefault = function(name) {
          if (major < 2 || major === 2 && minor < 9) {
            logError("Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js " + moment.version + ".");
          }
          moment.defaultZone = name ? getZone(name) : null;
          return moment;
        };
        var momentProperties = moment.momentProperties;
        if (Object.prototype.toString.call(momentProperties) === "[object Array]") {
          momentProperties.push("_z");
          momentProperties.push("_a");
        } else if (momentProperties) {
          momentProperties._z = null;
        }
        loadData({
          "version": "2023c",
          "zones": [
            "Africa/Abidjan|GMT|0|0||48e5",
            "Africa/Nairobi|EAT|-30|0||47e5",
            "Africa/Algiers|WET WEST CET CEST|0 -10 -10 -20|01012320102|3bX0 11A0 dDd0 17b0 11B0 1cN0 2Dy0 1cN0 1fB0 1cL0|26e5",
            "Africa/Lagos|WAT|-10|0||17e6",
            "Africa/Bissau|-01 GMT|10 0|01|cap0|39e4",
            "Africa/Maputo|CAT|-20|0||26e5",
            "Africa/Cairo|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|LX0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1WL0 rd0 1Rz0 wp0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1qL0 Xd0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1ny0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 WL0 1qN0 Rb0 1wp0 On0 1zd0 Lz0 1EN0 Fb0 c10 8n0 8Nd0 gL0 e10 mn0 kSp0 1cL0 1cN0 1fz0 1a10 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0|15e6",
            "Africa/Casablanca|+00 +01|0 -10|01010101010101010101010101010101010101010101010101010101010101010101010|aS00 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4mn0 SyN0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600|32e5",
            "Africa/Ceuta|WET WEST CET CEST|0 -10 -10 -20|0101010102323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|aS00 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4VB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|85e3",
            "Africa/El_Aaiun|-01 +00 +01|10 0 -10|01212121212121212121212121212121212121212121212121212121212121212121|fi10 6L0 AL0 1Nd0 XX0 1Cp0 pz0 1cBB0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600|20e4",
            "Africa/Johannesburg|SAST|-20|0||84e5",
            "Africa/Juba|CAT CAST EAT|-20 -30 -30|01010101010101010101010101010101020|LW0 16L0 1iN0 17b0 1jd0 17b0 1ip0 17z0 1i10 17X0 1hB0 18n0 1hd0 19b0 1gp0 19z0 1iN0 17b0 1ip0 17z0 1i10 18n0 1hd0 18L0 1gN0 19b0 1gp0 19z0 1iN0 17z0 1i10 17X0 yGd0 PeX0|",
            "Africa/Khartoum|CAT CAST EAT|-20 -30 -30|01010101010101010101010101010101020|LW0 16L0 1iN0 17b0 1jd0 17b0 1ip0 17z0 1i10 17X0 1hB0 18n0 1hd0 19b0 1gp0 19z0 1iN0 17b0 1ip0 17z0 1i10 18n0 1hd0 18L0 1gN0 19b0 1gp0 19z0 1iN0 17z0 1i10 17X0 yGd0 HjL0|51e5",
            "Africa/Monrovia|MMT GMT|I.u 0|01|4SoI.u|11e5",
            "Africa/Ndjamena|WAT WAST|-10 -20|010|nNb0 Wn0|13e5",
            "Africa/Sao_Tome|GMT WAT|0 -10|010|1UQN0 2q00|",
            "Africa/Tripoli|EET CET CEST|-20 -10 -20|0121212121212121210120120|tda0 A10 1db0 1cN0 1db0 1dd0 1db0 1eN0 1bb0 1e10 1cL0 1c10 1db0 1dd0 1db0 1cN0 1db0 1q10 fAn0 1ep0 1db0 AKq0 TA0 1o00|11e5",
            "Africa/Tunis|CET CEST|-10 -20|0101010101010101010|hOn0 WM0 1rA0 11c0 nwo0 Ko0 1cM0 1cM0 1rA0 10M0 zuM0 10N0 1aN0 1qM0 WM0 1qM0 11A0 1o00|20e5",
            "Africa/Windhoek|SAST CAT WAT|-20 -20 -10|01212121212121212121212121212121212121212121212121|Ndy0 9Io0 16P0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|32e4",
            "America/Adak|BST BDT AHST HST HDT|b0 a0 a0 a0 90|0101010101010101010101010101234343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|Kd0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cm0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|326",
            "America/Anchorage|AHST AHDT YST AKST AKDT|a0 90 90 90 80|0101010101010101010101010101234343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|Kc0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cm0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|30e4",
            "America/Puerto_Rico|AST|40|0||24e5",
            "America/Araguaina|-03 -02|30 20|01010101010101010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 dMN0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 ny10 Lz0|14e4",
            "America/Argentina/Buenos_Aires|-03 -02|30 20|01010101010101010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 A4p0 uL0 1qN0 WL0|",
            "America/Argentina/Catamarca|-03 -02 -04|30 20 40|01010101210102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 rlB0 7B0 8zb0 uL0|",
            "America/Argentina/Cordoba|-03 -02 -04|30 20 40|01010101210101010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 A4p0 uL0 1qN0 WL0|",
            "America/Argentina/Jujuy|-03 -02 -04|30 20 40|010101202101010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1ze0 TX0 1ld0 WK0 1wp0 TX0 A4p0 uL0|",
            "America/Argentina/La_Rioja|-03 -02 -04|30 20 40|010101012010102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Qn0 qO0 16n0 Rb0 1wp0 TX0 rlB0 7B0 8zb0 uL0|",
            "America/Argentina/Mendoza|-03 -02 -04|30 20 40|01010120202102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1u20 SL0 1vd0 Tb0 1wp0 TW0 ri10 Op0 7TX0 uL0|",
            "America/Argentina/Rio_Gallegos|-03 -02 -04|30 20 40|01010101010102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 rlB0 7B0 8zb0 uL0|",
            "America/Argentina/Salta|-03 -02 -04|30 20 40|010101012101010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 A4p0 uL0|",
            "America/Argentina/San_Juan|-03 -02 -04|30 20 40|010101012010102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Qn0 qO0 16n0 Rb0 1wp0 TX0 rld0 m10 8lb0 uL0|",
            "America/Argentina/San_Luis|-03 -02 -04|30 20 40|010101202020102020|9Rf0 Db0 zvd0 Bz0 1tB0 XX0 1q20 SL0 AN0 vDb0 m10 8lb0 8L0 jd0 1qN0 WL0 1qN0|",
            "America/Argentina/Tucuman|-03 -02 -04|30 20 40|0101010121010201010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 rlB0 4N0 8BX0 uL0 1qN0 WL0|",
            "America/Argentina/Ushuaia|-03 -02 -04|30 20 40|01010101010102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 rkN0 8p0 8zb0 uL0|",
            "America/Asuncion|-04 -03|40 30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|6FE0 3CL0 3Dd0 10L0 1pB0 10n0 1pB0 10n0 1pB0 1cL0 1dd0 1db0 1dd0 1cL0 1dd0 1cL0 1dd0 1cL0 1dd0 1db0 1dd0 1cL0 1dd0 1cL0 1dd0 1cL0 1dd0 1db0 1dd0 1cL0 1lB0 14n0 1dd0 1cL0 1fd0 WL0 1rd0 1aL0 1dB0 Xz0 1qp0 Xb0 1qN0 10L0 1rB0 TX0 1tB0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 WN0 1qL0 11B0 1nX0 1ip0 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 TX0 1tB0 19X0 1a10 1fz0 1a10 1fz0 1cN0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0|28e5",
            "America/Panama|EST|50|0||15e5",
            "America/Bahia_Banderas|PST MST MDT CDT CST|80 70 60 50 60|01212121212121212121212121212134343434343434343434343434|80 13Vd0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nW0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|84e3",
            "America/Bahia|-03 -02|30 20|010101010101010101010101010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 l5B0 Rb0|27e5",
            "America/Barbados|AST ADT|40 30|010101010|i7G0 IL0 1ip0 17b0 1ip0 17b0 1ld0 13b0|28e4",
            "America/Belem|-03 -02|30 20|0101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0|20e5",
            "America/Belize|CST CDT|60 50|01010|9xG0 qn0 lxB0 mn0|57e3",
            "America/Boa_Vista|-04 -03|40 30|01010101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 smp0 WL0 1tB0 2L0|62e2",
            "America/Bogota|-05 -04|50 40|010|Snh0 1PX0|90e5",
            "America/Boise|MST MDT|70 60|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 Dd0 1Kn0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e4",
            "America/Cambridge_Bay|MST MDT CST CDT EST|70 60 60 50 50|010101010101010101010101010101010101010101010101010101012342101010101010101010101010101010101010101010101010101010101010|5E90 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11A0 1nX0 2K0 WQ0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e2",
            "America/Campo_Grande|-04 -03|40 30|010101010101010101010101010101010101010101010101010101010101010101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 1C10 Lz0 1Ip0 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|77e4",
            "America/Cancun|CST EST EDT CDT|60 50 40 50|012121230303030303030303030303030303030301|t9G0 yLB0 1lb0 14p0 1lb0 14p0 Lz0 xB0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 Dd0|63e4",
            "America/Caracas|-04 -0430|40 4u|010|1wmv0 kqo0|29e5",
            "America/Cayenne|-03|30|0||58e3",
            "America/Chicago|CST CDT|60 50|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K80 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|92e5",
            "America/Chihuahua|CST CDT MDT MST|60 50 60 70|0101023232323232323232323232323232323232323232323232320|13Vk0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|81e4",
            "America/Ciudad_Juarez|CST CDT MDT MST|60 50 60 70|010102323232323232323232323232323232323232323232323232032323232323232323|13Vk0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1wn0 cm0 EP0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|",
            "America/Costa_Rica|CST CDT|60 50|010101010|mgS0 Db0 1Kp0 Db0 pRB0 15b0 1kp0 mL0|12e5",
            "America/Phoenix|MST|70|0||42e5",
            "America/Cuiaba|-04 -03|40 30|0101010101010101010101010101010101010101010101010101010101010101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 4a10 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|54e4",
            "America/Danmarkshavn|-03 -02 GMT|30 20 0|0101010101010101010101010101010102|oXh0 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 DC0|8",
            "America/Dawson_Creek|PST PDT MST|80 70 70|0101012|Ka0 1cL0 1cN0 1fz0 1cN0 ML0|12e3",
            "America/Dawson|YST PST PDT MST|90 80 70 70|012121212121212121212121212121212121212121212121212121212121212121212121212121212123|9ix0 fNd0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1z90|13e2",
            "America/Denver|MST MDT|70 60|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e5",
            "America/Detroit|EST EDT|50 40|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|85H0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e5",
            "America/Edmonton|MST MDT|70 60|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|5E90 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|10e5",
            "America/Eirunepe|-05 -04|50 40|01010101010|CxF0 Rb0 1tB0 IL0 1Fd0 FX0 dPB0 On0 yTd0 d5X0|31e3",
            "America/El_Salvador|CST CDT|60 50|01010|Gcu0 WL0 1qN0 WL0|11e5",
            "America/Tijuana|PST PDT|80 70|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|fmy0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|20e5",
            "America/Fort_Nelson|PST PDT MST|80 70 70|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010102|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0|39e2",
            "America/Fort_Wayne|EST EDT|50 40|01010101010101010101010101010101010101010101010101010|K70 1cL0 1qhd0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|",
            "America/Fortaleza|-03 -02|30 20|01010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 5z0 2mN0 On0|34e5",
            "America/Glace_Bay|AST ADT|40 30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|5E60 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|19e3",
            "America/Godthab|-03 -02 -01|30 20 10|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010121212121212121|oXh0 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 2so0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|17e3",
            "America/Goose_Bay|AST ADT ADDT|40 30 20|010101010101010101010101010101010101020101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K60 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14n1 1lb0 14p0 1nW0 11C0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|76e2",
            "America/Grand_Turk|EST EDT AST|50 40 40|0101010101010101010101010101010101010101010101010101010101010101010101010210101010101010101010101010|mG70 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 7jA0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e2",
            "America/Guatemala|CST CDT|60 50|010101010|9tG0 An0 mtd0 Nz0 ifB0 17b0 zDB0 11z0|13e5",
            "America/Guayaquil|-05 -04|50 40|010|TKR0 rz0|27e5",
            "America/Guyana|-0345 -03 -04|3J 30 40|012|dzfJ Ey0f|80e4",
            "America/Halifax|AST ADT|40 30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K60 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|39e4",
            "America/Havana|CST CDT|50 40|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K50 1cL0 1cN0 1fz0 1cN0 14n0 1ld0 14L0 1kN0 15b0 1kp0 1cL0 1cN0 1fz0 1a10 1fz0 1fB0 11z0 14p0 1nX0 11B0 1nX0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 1a10 1in0 1a10 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 17c0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 11A0 6i00 Rc0 1wo0 U00 1tA0 Rc0 1wo0 U00 1wo0 U00 1zc0 U00 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0|21e5",
            "America/Hermosillo|PST MST MDT|80 70 60|01212121|80 13Vd0 1lb0 14p0 1lb0 14p0 1lb0|64e4",
            "America/Indiana/Knox|CST CDT EST|60 50 50|01010101010101010101010101010101010101010101210101010101010101010101010101010101010101010101010|K80 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 z8o0 1o00 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|",
            "America/Indiana/Marengo|EST EDT CDT|50 40 50|010101010201010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1VA0 LA0 1BX0 1e6p0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|",
            "America/Indiana/Petersburg|CST CDT EST EDT|60 50 50 40|0101010101010101210123232323232323232323232323232323232323232323232|K80 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 19co0 1o00 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|",
            "America/Indiana/Tell_City|EST EDT CDT CST|50 40 50 60|01023232323232323232323232323232323232323232323232323|K70 1cL0 1qhd0 1o00 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|",
            "America/Indiana/Vevay|EST EDT|50 40|010101010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1lnd0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|",
            "America/Indiana/Vincennes|EST EDT CDT CST|50 40 50 60|01023201010101010101010101010101010101010101010101010|K70 1cL0 1qhd0 1o00 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|",
            "America/Indiana/Winamac|EST EDT CDT CST|50 40 50 60|01023101010101010101010101010101010101010101010101010|K70 1cL0 1qhd0 1o00 Rd0 1za0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|",
            "America/Inuvik|PST PDT MDT MST|80 70 60 70|01010101010101023232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|5Ea0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cK0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|35e2",
            "America/Iqaluit|EST EDT CST CDT|50 40 60 50|01010101010101010101010101010101010101010101010101010101230101010101010101010101010101010101010101010101010101010101010|5E70 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11C0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|67e2",
            "America/Jamaica|EST EDT|50 40|010101010101010101010|9Kv0 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0|94e4",
            "America/Juneau|PST PDT YDT YST AKST AKDT|80 70 80 90 90 80|0101010101010101010102010101345454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cM0 1cM0 1cL0 1cN0 1fz0 1a10 1fz0 co0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|33e3",
            "America/Kentucky/Louisville|EST EDT CDT|50 40 50|010101010201010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1VA0 LA0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|",
            "America/Kentucky/Monticello|CST CDT EST EDT|60 50 50 40|010101010101010101010101010101010101010101010101010101010101012323232323232323232323232323232323232323232323232323232323232|K80 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|",
            "America/La_Paz|-04|40|0||19e5",
            "America/Lima|-05 -04|50 40|010101010|CVF0 zX0 1O10 zX0 6Gp0 zX0 98p0 zX0|11e6",
            "America/Los_Angeles|PST PDT|80 70|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e6",
            "America/Maceio|-03 -02|30 20|0101010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 dMN0 Lz0 8Q10 WL0 1tB0 5z0 2mN0 On0|93e4",
            "America/Managua|CST EST CDT|60 50 50|010202010102020|86u0 4mn0 9Up0 Dz0 1K10 Dz0 s3F0 1KH0 DB0 9In0 k8p0 19X0 1o30 11y0|22e5",
            "America/Manaus|-04 -03|40 30|010101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 dPB0 On0|19e5",
            "America/Martinique|AST ADT|40 30|010|oXg0 19X0|39e4",
            "America/Matamoros|CST CDT|60 50|0101010101010101010101010101010101010101010101010101010101010101010101010|IqU0 1nX0 i6p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|45e4",
            "America/Mazatlan|PST MST MDT|80 70 60|01212121212121212121212121212121212121212121212121212121|80 13Vd0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|44e4",
            "America/Menominee|EST CDT CST|50 50 60|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|85H0 1cM0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|85e2",
            "America/Merida|CST EST CDT|60 50 50|010202020202020202020202020202020202020202020202020202020|t9G0 2hz0 wu30 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|11e5",
            "America/Metlakatla|PST PDT AKST AKDT|80 70 90 80|0101010101010101010101010101023232302323232323232323232323232|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1hU10 Rd0 1zb0 Op0 1zb0 Op0 1zb0 uM0 jB0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2",
            "America/Mexico_City|CST CDT|60 50|0101010101010101010101010101010101010101010101010101010|13Vk0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|20e6",
            "America/Miquelon|AST -03 -02|40 30 20|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|p9g0 gQ10 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|61e2",
            "America/Moncton|AST ADT|40 30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K60 1cL0 1cN0 1fz0 1cN0 1cL0 3Cp0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14n1 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 ReX 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|64e3",
            "America/Monterrey|CST CDT|60 50|010101010101010101010101010101010101010101010101010101010|IqU0 1nX0 i6p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|41e5",
            "America/Montevideo|-03 -02 -0130 -0230|30 20 1u 2u|0101023010101010101010101010101010101010101010101010|JD0 jX0 4vB0 xz0 3Cp0 mmu 1a10 IMu Db0 4c10 uL0 1Nd0 An0 1SN0 uL0 mp0 28L0 iPB0 un0 1SN0 xz0 1zd0 Lz0 1zd0 Rb0 1zd0 On0 1wp0 Rb0 s8p0 1fB0 1ip0 11z0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 11z0|17e5",
            "America/Toronto|EST EDT|50 40|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|65e5",
            "America/New_York|EST EDT|50 40|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e6",
            "America/Nome|BST BDT YST AKST AKDT|b0 a0 90 90 80|0101010101010101010101010101234343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|Kd0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cl0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|38e2",
            "America/Noronha|-02 -01|20 10|01010101010101010|CxC0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 2L0 2pB0 On0|30e2",
            "America/North_Dakota/Beulah|MST MDT CST CDT|70 60 60 50|010101010101010101010101010101010101010101010101010101010101010101010101010101010123232323232323232323232323232323232323232|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|",
            "America/North_Dakota/Center|MST MDT CST CDT|70 60 60 50|010101010101010101010101010101010101010101010123232323232323232323232323232323232323232323232323232323232323232323232323232|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14o0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|",
            "America/North_Dakota/New_Salem|MST MDT CST CDT|70 60 60 50|010101010101010101010101010101010101010101010101010101010101010101012323232323232323232323232323232323232323232323232323232|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14o0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|",
            "America/Ojinaga|CST CDT MDT MST|60 50 60 70|01010232323232323232323232323232323232323232323232323201010101010101010|13Vk0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1wn0 Rc0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e3",
            "America/Paramaribo|-0330 -03|3u 30|01|zSPu|24e4",
            "America/Port-au-Prince|EST EDT|50 40|01010101010101010101010101010101010101010101010101010101010101010101010|wu50 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14q0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 i6n0 1nX0 11B0 1nX0 d430 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 3iN0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5",
            "America/Rio_Branco|-05 -04|50 40|010101010|CxF0 Rb0 1tB0 IL0 1Fd0 FX0 NBd0 d5X0|31e4",
            "America/Porto_Velho|-04 -03|40 30|0101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0|37e4",
            "America/Punta_Arenas|-03 -04|30 40|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|yP0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0|",
            "America/Winnipeg|CST CDT|60 50|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K80 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|66e4",
            "America/Rankin_Inlet|CST CDT EST|60 50 50|01010101010101010101010101010101010101010101010101010101012101010101010101010101010101010101010101010101010101010101010|5E80 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e2",
            "America/Recife|-03 -02|30 20|01010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 2L0 2pB0 On0|33e5",
            "America/Regina|CST|60|0||19e4",
            "America/Resolute|CST CDT EST|60 50 50|01010101010101010101010101010101010101010101010101010101012101010101012101010101010101010101010101010101010101010101010|5E80 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|229",
            "America/Santarem|-04 -03|40 30|01010101|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 NBd0|21e4",
            "America/Santiago|-03 -04|30 40|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|yP0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0|62e5",
            "America/Santo_Domingo|-0430 EST AST|4u 50 40|0101010101212|ksu 1Cou yLu 1RAu wLu 1QMu xzu 1Q0u xXu 1PAu 13jB0 e00|29e5",
            "America/Sao_Paulo|-03 -02|30 20|010101010101010101010101010101010101010101010101010101010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 1C10 Lz0 1Ip0 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|20e6",
            "America/Scoresbysund|-02 -01 +00|20 10 0|0102121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|oXg0 1a00 1cK0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|452",
            "America/Sitka|PST PDT YST AKST AKDT|80 70 90 90 80|0101010101010101010101010101234343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 co0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|90e2",
            "America/St_Johns|NST NDT NDDT|3u 2u 1u|010101010101010101010101010101010101020101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K5u 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14n1 1lb0 14p0 1nW0 11C0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4",
            "America/Swift_Current|MST CST|70 60|01|5E90|16e3",
            "America/Tegucigalpa|CST CDT|60 50|0101010|Gcu0 WL0 1qN0 WL0 GRd0 AL0|11e5",
            "America/Thule|AST ADT|40 30|010101010101010101010101010101010101010101010101010101010101010101010101010101010|PHG0 1cL0 1cN0 1cL0 1fB0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|656",
            "America/Vancouver|PST PDT|80 70|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5",
            "America/Whitehorse|PST PDT MST|80 70 70|01010101010101010101010101010101010101010101010101010101010101010101010101010101012|p7K0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1z90|23e3",
            "America/Yakutat|YST YDT AKST AKDT|90 80 90 80|0101010101010101010101010101023232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|Kb0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cn0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|642",
            "Antarctica/Casey|+08 +11|-80 -b0|010101010101|1ARS0 T90 40P0 KL0 blz0 3m10 1o30 14k0 1kr0 12l0 1o01|10",
            "Antarctica/Davis|+07 +05|-70 -50|01010|1ART0 VB0 3Wn0 KN0|70",
            "Pacific/Port_Moresby|+10|-a0|0||25e4",
            "Antarctica/Macquarie|AEDT AEST|-b0 -a0|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|qg0 1wo0 U00 1wo0 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 3Co0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|1",
            "Antarctica/Mawson|+06 +05|-60 -50|01|1ARU0|60",
            "Pacific/Auckland|NZST NZDT|-c0 -d0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|bKC0 IM0 1C00 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1qM0 14o0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1io0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00|14e5",
            "Antarctica/Palmer|-03 -02 -04|30 20 40|01020202020202020202020202020202020202020202020202020202020202020202020|9Rf0 Db0 jsN0 14N0 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0|40",
            "Antarctica/Rothera|-00 -03|0 30|01|gOo0|130",
            "Asia/Riyadh|+03|-30|0||57e5",
            "Antarctica/Troll|-00 +00 +02|0 0 -20|012121212121212121212121212121212121212121212121212121|1puo0 hd0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|40",
            "Asia/Urumqi|+06|-60|0||32e5",
            "Europe/Berlin|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|oXd0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|41e5",
            "Asia/Almaty|+06 +07 +05|-60 -70 -50|0101010101010101010102010101010101010101010101010|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0|15e5",
            "Asia/Amman|EET EEST +03|-20 -30 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101012|8kK0 KL0 1oN0 11b0 1oN0 11b0 1pd0 1dz0 1cp0 11b0 1op0 11b0 fO10 1db0 1e10 1cL0 1cN0 1cL0 1cN0 1fz0 1pd0 10n0 1ld0 14n0 1hB0 15b0 1ip0 19X0 1cN0 1cL0 1cN0 17b0 1ld0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1So0 y00 1fc0 1dc0 1co0 1dc0 1cM0 1cM0 1cM0 1o00 11A0 1lc0 17c0 1cM0 1cM0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 4bX0 Dd0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 LA0 1C00|25e5",
            "Asia/Anadyr|+13 +14 +12 +11|-d0 -e0 -c0 -b0|010202020202020202023202020202020202020202020202020202020232|rmX0 1db0 2q10 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|13e3",
            "Asia/Aqtau|+05 +06 +04|-50 -60 -40|0101010101010101010201010120202020202020202020|sAj0 2pX0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|15e4",
            "Asia/Aqtobe|+05 +06 +04|-50 -60 -40|01010101010101010102010101010101010101010101010|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0|27e4",
            "Asia/Ashgabat|+05 +06 +04|-50 -60 -40|01010101010101010101020|rn70 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0|41e4",
            "Asia/Atyrau|+05 +06 +04|-50 -60 -40|010101010101010101020101010101010102020202020|sAj0 2pX0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 2sp0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|",
            "Asia/Baghdad|+03 +04|-30 -40|01010101010101010101010101010101010101010101010101010|u190 11b0 1cp0 1dz0 1dd0 1db0 1cN0 1cp0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1de0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0|66e5",
            "Asia/Qatar|+04 +03|-40 -30|01|5QI0|96e4",
            "Asia/Baku|+04 +05 +03|-40 -50 -30|010101010101010101010201010101010101010101010101010101010101010|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cM0 9Je0 1o00 11z0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|27e5",
            "Asia/Bangkok|+07|-70|0||15e6",
            "Asia/Barnaul|+07 +08 +06|-70 -80 -60|01010101010101010101020101010102020202020202020202020202020202020|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 p90 LE0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|",
            "Asia/Beirut|EET EEST|-20 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|61a0 En0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1op0 11b0 dA10 17b0 1iN0 17b0 1iN0 17b0 1iN0 17b0 1vB0 SL0 1mp0 13z0 1iN0 17b0 1iN0 17b0 1jd0 12n0 1a10 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0|22e5",
            "Asia/Bishkek|+06 +07 +05|-60 -70 -50|0101010101010101010102020202020202020202020202020|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2e00 1tX0 17b0 1ip0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1cPu 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0|87e4",
            "Asia/Brunei|+08|-80|0||42e4",
            "Asia/Kolkata|IST|-5u|0||15e6",
            "Asia/Chita|+09 +10 +08|-90 -a0 -80|0101010101010101010102010101010101010101010101010101010101010120|rn30 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3re0|33e4",
            "Asia/Choibalsan|+07 +08 +10 +09|-70 -80 -a0 -90|012323232323232323232323232323232323232323232313131|jsF0 cKn0 1da0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 3Db0 h1f0 1cJ0 1cP0 1cJ0|38e3",
            "Asia/Shanghai|CST CDT|-80 -90|0101010101010|DKG0 Rb0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0|23e6",
            "Asia/Colombo|+0530 +0630 +06|-5u -6u -60|0120|14giu 11zu n3cu|22e5",
            "Asia/Dhaka|+06 +07|-60 -70|010|1A5R0 1i00|16e6",
            "Asia/Damascus|EET EEST +03|-20 -30 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101012|M00 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 Nb0 1AN0 Nb0 bcp0 19X0 1gp0 19X0 3ld0 1xX0 Vd0 1Bz0 Sp0 1vX0 10p0 1dz0 1cN0 1cL0 1db0 1db0 1g10 1an0 1ap0 1db0 1fd0 1db0 1cN0 1db0 1dd0 1db0 1cp0 1dz0 1c10 1dX0 1cN0 1db0 1dd0 1db0 1cN0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1db0 1cN0 1db0 1cN0 19z0 1fB0 1qL0 11B0 1on0 Wp0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0|26e5",
            "Asia/Dili|+09 +08|-90 -80|010|fpr0 Xld0|19e4",
            "Asia/Dubai|+04|-40|0||39e5",
            "Asia/Dushanbe|+06 +07 +05|-60 -70 -50|0101010101010101010102|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2hB0|76e4",
            "Asia/Famagusta|EET EEST +03|-20 -30 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101012010101010101010101010101010|cPa0 1cL0 1qp0 Xz0 19B0 19X0 1fB0 1db0 1cp0 1cL0 1fB0 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1o30 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 15U0 2Ks0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|",
            "Asia/Gaza|IST IDT EET EEST|-20 -30 -20 -30|010101010101010101010101010101023232323232323232323232323232323232323232323232323232323232323232323232|aXa0 Db0 1fB0 Rb0 bXB0 gM0 8Q00 IM0 1wo0 TX0 1HB0 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 M10 C00 17c0 1io0 17c0 1io0 17c0 1o00 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 17c0 1io0 18N0 1bz0 19z0 1gp0 1610 1iL0 11z0 1o10 14o0 1lA1 SKX 1xd1 MKX 1AN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nA0 1210 1qL0 WN0 1qL0 WN0 1qL0 11c0 1on0 11B0 1o00 11A0 1qo0 XA0 1qp0 1cN0 1cL0 17d0 1in0 14p0 1lb0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0|18e5",
            "Asia/Hebron|IST IDT EET EEST|-20 -30 -20 -30|01010101010101010101010101010102323232323232323232323232323232323232323232323232323232323232323232323232|aXa0 Db0 1fB0 Rb0 bXB0 gM0 8Q00 IM0 1wo0 TX0 1HB0 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 M10 C00 17c0 1io0 17c0 1io0 17c0 1o00 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 17c0 1io0 18N0 1bz0 19z0 1gp0 1610 1iL0 12L0 1mN0 14o0 1lc0 Tb0 1xd1 MKX bB0 cn0 1cN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nA0 1210 1qL0 WN0 1qL0 WN0 1qL0 11c0 1on0 11B0 1o00 11A0 1qo0 XA0 1qp0 1cN0 1cL0 17d0 1in0 14p0 1lb0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0|25e4",
            "Asia/Ho_Chi_Minh|+08 +07|-80 -70|01|dfs0|90e5",
            "Asia/Hong_Kong|HKT HKST|-80 -90|01010101010101010|H7u 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1cL0 6fd0 14n0|73e5",
            "Asia/Hovd|+06 +07 +08|-60 -70 -80|01212121212121212121212121212121212121212121212121|jsG0 cKn0 1db0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 kEp0 1cJ0 1cP0 1cJ0|81e3",
            "Asia/Irkutsk|+08 +09 +07|-80 -90 -70|010101010101010101010201010101010101010101010101010101010101010|rn40 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|60e4",
            "Europe/Istanbul|EET EEST +03 +04|-20 -30 -30 -40|01010101010123201010101010101010101010101010101010101010101010101010101010101012|8jz0 11A0 WN0 1qL0 TB0 1tX0 U10 1tz0 11B0 1in0 17d0 z90 cne0 pb0 2Cp0 1800 14o0 1dc0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1a00 1fA0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WO0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 Xc0 1qo0 WM0 1qM0 11A0 1o00 1200 1nA0 11A0 1tA0 U00 15w0|13e6",
            "Asia/Jakarta|WIB|-70|0||31e6",
            "Asia/Jayapura|WIT|-90|0||26e4",
            "Asia/Jerusalem|IST IDT|-20 -30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|aXa0 Db0 1fB0 Rb0 bXB0 gM0 8Q00 IM0 1wo0 TX0 1HB0 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 1hB0 1dX0 1ep0 1aL0 1eN0 17X0 1nf0 11z0 1tB0 19W0 1e10 17b0 1ep0 1gL0 18N0 1fz0 1eN0 17b0 1gq0 1gn0 19d0 1dz0 1c10 17X0 1hB0 1gn0 19d0 1dz0 1c10 17X0 1kp0 1dz0 1c10 1aL0 1eN0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0|81e4",
            "Asia/Kabul|+0430|-4u|0||46e5",
            "Asia/Kamchatka|+12 +13 +11|-c0 -d0 -b0|0101010101010101010102010101010101010101010101010101010101020|rn00 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|18e4",
            "Asia/Karachi|+05 PKT PKST|-50 -50 -60|01212121|2Xv0 1fy00 1cL0 dK10 11b0 1610 1jX0|24e6",
            "Asia/Kathmandu|+0530 +0545|-5u -5J|01|CVuu|12e5",
            "Asia/Khandyga|+09 +10 +08 +11|-90 -a0 -80 -b0|01010101010101010101020101010101010101010101010131313131313131310|rn30 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 qK0 yN0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 17V0 7zD0|66e2",
            "Asia/Krasnoyarsk|+07 +08 +06|-70 -80 -60|010101010101010101010201010101010101010101010101010101010101010|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|10e5",
            "Asia/Kuala_Lumpur|+0730 +08|-7u -80|01|td40|71e5",
            "Asia/Macau|CST CDT|-80 -90|01010101010101010|H7u 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1cL0 6fd0 14n0|57e4",
            "Asia/Magadan|+11 +12 +10|-b0 -c0 -a0|0101010101010101010102010101010101010101010101010101010101010120|rn10 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3Cq0|95e3",
            "Asia/Makassar|WITA|-80|0||15e5",
            "Asia/Manila|PST PDT|-80 -90|010|k0E0 1db0|24e6",
            "Asia/Nicosia|EET EEST|-20 -30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|cPa0 1cL0 1qp0 Xz0 19B0 19X0 1fB0 1db0 1cp0 1cL0 1fB0 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1o30 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|32e4",
            "Asia/Novokuznetsk|+07 +08 +06|-70 -80 -60|0101010101010101010102010101010101010101010101010101010101020|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|55e4",
            "Asia/Novosibirsk|+07 +08 +06|-70 -80 -60|01010101010101010101020101020202020202020202020202020202020202020|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 ml0 Os0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 4eN0|15e5",
            "Asia/Omsk|+06 +07 +05|-60 -70 -50|010101010101010101010201010101010101010101010101010101010101010|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|12e5",
            "Asia/Oral|+05 +06 +04|-50 -60 -40|010101010101010202020202020202020202020202020|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 1cM0 IM0 1EM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|27e4",
            "Asia/Pontianak|WITA WIB|-80 -70|01|HNs0|23e4",
            "Asia/Pyongyang|KST KST|-90 -8u|010|1P4D0 6BA0|29e5",
            "Asia/Qostanay|+05 +06 +04|-50 -60 -40|0101010101010101010201010101010101010101010101|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|",
            "Asia/Qyzylorda|+05 +06|-50 -60|010101010101010101010101010101010101010101010|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 3ao0 1EM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 zQl0|73e4",
            "Asia/Rangoon|+0630|-6u|0||48e5",
            "Asia/Sakhalin|+11 +12 +10|-b0 -c0 -a0|010101010101010101010201010101010202020202020202020202020202020|rn10 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 2pB0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|58e4",
            "Asia/Samarkand|+05 +06|-50 -60|010101010101010101010|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|36e4",
            "Asia/Seoul|KST KDT|-90 -a0|01010|Gf50 11A0 1o00 11A0|23e6",
            "Asia/Srednekolymsk|+11 +12 +10|-b0 -c0 -a0|010101010101010101010201010101010101010101010101010101010101010|rn10 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|35e2",
            "Asia/Taipei|CST CDT|-80 -90|0101010|akg0 1db0 1cN0 1db0 97B0 AL0|74e5",
            "Asia/Tashkent|+06 +07 +05|-60 -70 -50|0101010101010101010102|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0|23e5",
            "Asia/Tbilisi|+04 +05 +03|-40 -50 -30|01010101010101010101020202010101010101010101020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cK0 1cL0 1cN0 1cL0 1cN0 2pz0 1cL0 1fB0 3Nz0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 An0 Os0 WM0|11e5",
            "Asia/Tehran|+0330 +0430 +04 +05|-3u -4u -40 -50|0123201010101010101010101010101010101010101010101010101010101010101010|hyHu 1pc0 120u Rc0 XA0 Wou JX0 1dB0 1en0 pNB0 UL0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 64p0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0|14e6",
            "Asia/Thimphu|+0530 +06|-5u -60|01|HcGu|79e3",
            "Asia/Tokyo|JST|-90|0||38e6",
            "Asia/Tomsk|+07 +08 +06|-70 -80 -60|01010101010101010101020101010101010101010101020202020202020202020|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 co0 1bB0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3Qp0|10e5",
            "Asia/Ulaanbaatar|+07 +08 +09|-70 -80 -90|01212121212121212121212121212121212121212121212121|jsF0 cKn0 1db0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 kEp0 1cJ0 1cP0 1cJ0|12e5",
            "Asia/Ust-Nera|+09 +12 +11 +10|-90 -c0 -b0 -a0|0121212121212121212123212121212121212121212121212121212121212123|rn30 1d90 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 17V0 7zD0|65e2",
            "Asia/Vladivostok|+10 +11 +09|-a0 -b0 -90|010101010101010101010201010101010101010101010101010101010101010|rn20 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|60e4",
            "Asia/Yakutsk|+09 +10 +08|-90 -a0 -80|010101010101010101010201010101010101010101010101010101010101010|rn30 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|28e4",
            "Asia/Yekaterinburg|+05 +06 +04|-50 -60 -40|010101010101010101010201010101010101010101010101010101010101010|rn70 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|14e5",
            "Asia/Yerevan|+04 +05 +03|-40 -50 -30|01010101010101010101020202020101010101010101010101010101010|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 4RX0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|13e5",
            "Atlantic/Azores|-01 +00 WET|10 0 0|0101010101010101010101010101010121010101010101010101010101010101010101010101010101010101010101010101010101010|hAN0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|25e4",
            "Atlantic/Bermuda|AST ADT|40 30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|avi0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|65e3",
            "Atlantic/Canary|WET WEST|0 -10|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|oXc0 1a10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|54e4",
            "Atlantic/Cape_Verde|-02 -01|20 10|01|elE0|50e4",
            "Atlantic/Faroe|WET WEST|0 -10|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|rm10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|49e3",
            "Atlantic/Madeira|WET WEST|0 -10|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hAM0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|27e4",
            "Atlantic/South_Georgia|-02|20|0||30",
            "Atlantic/Stanley|-04 -03 -02|40 30 20|01212101010101010101010101010101010101010101010101010101|wrg0 WL0 1qL0 U10 1tz0 2mN0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1tz0 U10 1tz0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1tz0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qN0 U10 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1wn0 U10 1tz0 U10 1tz0 U10|21e2",
            "Australia/Sydney|AEST AEDT|-a0 -b0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4r40 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 14o0 1o00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 11A0 1o00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|40e5",
            "Australia/Adelaide|ACST ACDT|-9u -au|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4r4u LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 Oo0 1zc0 WM0 1qM0 Rc0 1zc0 U00 1tA0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|11e5",
            "Australia/Brisbane|AEST AEDT|-a0 -b0|010101010|4r40 LA0 H1A0 Oo0 1zc0 Oo0 1zc0 Oo0|20e5",
            "Australia/Broken_Hill|ACST ACDT|-9u -au|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4r4u LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 14o0 1o00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|18e3",
            "Australia/Hobart|AEDT AEST|-b0 -a0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|qg0 1wo0 U00 1wo0 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|21e4",
            "Australia/Darwin|ACST|-9u|0||12e4",
            "Australia/Eucla|+0845 +0945|-8J -9J|0101010101010|bHRf Oo0 l5A0 Oo0 iJA0 G00 zU00 IM0 1qM0 11A0 1o00 11A0|368",
            "Australia/Lord_Howe|AEST +1030 +1130 +11|-a0 -au -bu -b0|01212121213131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313|raC0 1zdu Rb0 1zd0 On0 1zd0 On0 1zd0 On0 1zd0 TXu 1qMu WLu 1tAu WLu 1tAu TXu 1tAu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu 11zu 1o0u 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 11Au 1nXu 1qMu 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 1qMu 11zu 1o0u WLu 1qMu 14nu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1fzu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu|347",
            "Australia/Lindeman|AEST AEDT|-a0 -b0|0101010101010|4r40 LA0 H1A0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0|10",
            "Australia/Melbourne|AEST AEDT|-a0 -b0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4r40 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1qM0 11A0 1tA0 U00 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 11A0 1o00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|39e5",
            "Australia/Perth|AWST AWDT|-80 -90|0101010101010|bHS0 Oo0 l5A0 Oo0 iJA0 G00 zU00 IM0 1qM0 11A0 1o00 11A0|18e5",
            "Europe/Brussels|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|21e5",
            "Pacific/Easter|-06 -07 -05|60 70 50|010101010101010101010101020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202|yP0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 2pA0 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0|30e2",
            "EET|EET EEST|-20 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|",
            "Europe/Dublin|IST GMT|-10 0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4re0 U00 1tA0 U00 1tA0 U00 1tA0 U00 1tA0 WM0 1qM0 WM0 1qM0 WM0 1tA0 U00 1tA0 U00 1tA0 11z0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|12e5",
            "Etc/GMT-1|+01|-10|0||",
            "Pacific/Guadalcanal|+11|-b0|0||11e4",
            "Pacific/Tarawa|+12|-c0|0||29e3",
            "Etc/GMT-13|+13|-d0|0||",
            "Etc/GMT-14|+14|-e0|0||",
            "Etc/GMT-2|+02|-20|0||",
            "Indian/Maldives|+05|-50|0||35e4",
            "Pacific/Palau|+09|-90|0||21e3",
            "Etc/GMT+1|-01|10|0||",
            "Pacific/Tahiti|-10|a0|0||18e4",
            "Pacific/Niue|-11|b0|0||12e2",
            "Etc/GMT+12|-12|c0|0||",
            "Etc/GMT+5|-05|50|0||",
            "Etc/GMT+6|-06|60|0||",
            "Etc/GMT+7|-07|70|0||",
            "Etc/GMT+8|-08|80|0||",
            "Pacific/Gambier|-09|90|0||125",
            "Etc/UTC|UTC|0|0||",
            "Europe/Andorra|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|B7d0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|79e3",
            "Europe/Astrakhan|+04 +05 +03|-40 -50 -30|0101010101010101020202020202020202020202020202020202020202020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|10e5",
            "Europe/Athens|EET EEST|-20 -30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|cOK0 1vc0 SO0 1cM0 1a00 1ao0 1fc0 1a10 1fG0 1cg0 1dX0 1bX0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|35e5",
            "Europe/London|BST GMT|-10 0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4re0 U00 1tA0 U00 1tA0 U00 1tA0 U00 1tA0 WM0 1qM0 WM0 1qM0 WM0 1tA0 U00 1tA0 U00 1tA0 11z0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|10e6",
            "Europe/Belgrade|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|wdd0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|12e5",
            "Europe/Prague|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|muN0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|13e5",
            "Europe/Bucharest|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|mRa0 On0 1fA0 1a10 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cK0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|19e5",
            "Europe/Budapest|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|oXb0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cO0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|17e5",
            "Europe/Zurich|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|rm10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|38e4",
            "Europe/Chisinau|MSK MSD EEST EET|-30 -40 -30 -20|010101010101010101012323232323232323232323232323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 gL0 WO0 1cM0 1cM0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1nX0 11D0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|67e4",
            "Europe/Gibraltar|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|tLB0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|30e3",
            "Europe/Helsinki|EET EEST|-20 -30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|rm00 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|12e5",
            "Europe/Kaliningrad|MSK MSD EEST EET +03|-30 -40 -30 -20 -30|010101010101010102323232323232323232323232323232323232323232343|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|44e4",
            "Europe/Kiev|MSK MSD EEST EET|-30 -40 -30 -20|0101010101010101010123232323232323232323232323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 Db0 3220 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o10 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|34e5",
            "Europe/Kirov|+04 +05 MSD MSK MSK|-40 -50 -40 -30 -40|01010101010101010232302323232323232323232323232323232323232343|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 2pz0 1cN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|48e4",
            "Europe/Lisbon|CET WET WEST CEST|-10 0 -10 -20|01212121212121212121212121212121203030302121212121212121212121212121212121212121212121212121212121212121212121|go00 1cM0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|27e5",
            "Europe/Madrid|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|apy0 1a10 1fz0 1a10 19X0 1cN0 1fz0 1a10 1fC0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|62e5",
            "Europe/Malta|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|XX0 LA0 1zc0 Oo0 1C00 Oo0 1co0 1cM0 1lA0 Xc0 1qq0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1iN0 19z0 1fB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|42e4",
            "Europe/Minsk|MSK MSD EEST EET +03|-30 -40 -30 -20 -30|010101010101010101023232323232323232323232323232323232323234|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 3Fc0 1cN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0|19e5",
            "Europe/Paris|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|fbc0 1cL0 1fC0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|11e6",
            "Europe/Moscow|MSK MSD EEST EET MSK|-30 -40 -30 -20 -40|0101010101010101010102301010101010101010101010101010101010101040|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|16e6",
            "Europe/Riga|MSK MSD EEST EET|-30 -40 -30 -20|010101010101010102323232323232323232323232323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 1o00 11A0 1o00 11A0 1qM0 3oo0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|64e4",
            "Europe/Rome|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|XX0 LA0 1zc0 Oo0 1C00 Oo0 1C00 LA0 1zc0 Oo0 1C00 LA0 1C00 LA0 1zc0 Oo0 1C00 Oo0 1zc0 Oo0 1fC0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|39e5",
            "Europe/Samara|+04 +05 +03|-40 -50 -30|01010101010101010202010101010101010101010101010101010101020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 2y10 14m0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|12e5",
            "Europe/Saratov|+04 +05 +03|-40 -50 -30|0101010101010102020202020202020202020202020202020202020202020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1cM0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 5810|",
            "Europe/Simferopol|MSK MSD EET EEST MSK|-30 -40 -20 -30 -40|0101010101010101010232323101010323232323232323232323232323232323240|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Q00 4eN0 1cM0 1cM0 1cM0 1cM0 dV0 WO0 1cM0 1cM0 1fy0 1o30 11B0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11z0 1nW0|33e4",
            "Europe/Sofia|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|muJ0 1dd0 1fb0 1ap0 1fb0 1a20 1fy0 1a30 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|12e5",
            "Europe/Tallinn|MSK MSD EEST EET|-30 -40 -30 -20|0101010101010101023232323232323232323232323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o10 11A0 1qM0 5QM0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|41e4",
            "Europe/Tirane|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|axz0 10n0 1op0 11z0 1pd0 11z0 1qN0 WL0 1qp0 Xb0 1qp0 Xb0 1qp0 11z0 1lB0 11z0 1qN0 11z0 1iN0 16n0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|42e4",
            "Europe/Ulyanovsk|+04 +05 +03 +02|-40 -50 -30 -20|010101010101010102023202020202020202020202020202020202020202020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|13e5",
            "Europe/Vienna|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|oXb0 19X0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|18e5",
            "Europe/Vilnius|MSK MSD EEST EET CEST CET|-30 -40 -30 -20 -20 -10|01010101010101010232323232323232323454323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11B0 1o00 11A0 1qM0 8io0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|54e4",
            "Europe/Volgograd|+04 +05 MSD MSK MSK|-40 -50 -40 -30 -40|0101010101010102323230232323232323232323232323232323232323234303|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1cM0 1fA0 1cM0 2pz0 1cN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 9Jd0 5gn0|10e5",
            "Europe/Warsaw|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDA0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|17e5",
            "Pacific/Honolulu|HST|a0|0||37e4",
            "Indian/Chagos|+05 +06|-50 -60|01|13ij0|30e2",
            "Indian/Mauritius|+04 +05|-40 -50|01010|v5U0 14L0 12kr0 11z0|15e4",
            "Pacific/Kwajalein|-12 +12|c0 -c0|01|Vxo0|14e3",
            "MET|MET MEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|",
            "Pacific/Chatham|+1245 +1345|-cJ -dJ|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|bKC0 IM0 1C00 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1qM0 14o0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1io0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00|600",
            "Pacific/Apia|-11 -10 +14 +13|b0 a0 -e0 -d0|010123232323232323232323|1Dbn0 1ff0 1a00 CI0 AQ0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0|37e3",
            "Pacific/Bougainville|+10 +11|-a0 -b0|01|1NwE0|18e4",
            "Pacific/Efate|+11 +12|-b0 -c0|01010101010101010101010|9EA0 Dc0 n610 1cL0 1cN0 1cL0 1fB0 19X0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 Lz0 1Nd0 An0|66e3",
            "Pacific/Enderbury|-12 -11 +13|c0 b0 -d0|012|nIc0 B7X0|1",
            "Pacific/Fakaofo|-11 +13|b0 -d0|01|1Gfn0|483",
            "Pacific/Fiji|+12 +13|-c0 -d0|01010101010101010101010101010|1ace0 LA0 1EM0 IM0 nJc0 LA0 1o00 Rc0 1wo0 Ao0 1Nc0 Ao0 1Q00 xz0 1SN0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 20o0 pc0 2hc0 bc0|88e4",
            "Pacific/Galapagos|-05 -06|50 60|0101|CVF0 gNd0 rz0|25e3",
            "Pacific/Guam|GST GDT ChST|-a0 -b0 -a0|010101010102|JQ0 Rb0 1wp0 Rb0 5xd0 rX0 5sN0 zb1 1C0X On0 ULb0|17e4",
            "Pacific/Kiritimati|-1040 -10 +14|aE a0 -e0|012|nIaE B7Xk|51e2",
            "Pacific/Kosrae|+12 +11|-c0 -b0|01|1aAA0|66e2",
            "Pacific/Marquesas|-0930|9u|0||86e2",
            "Pacific/Pago_Pago|SST|b0|0||37e2",
            "Pacific/Nauru|+1130 +12|-bu -c0|01|maCu|10e3",
            "Pacific/Norfolk|+1130 +1230 +11 +12|-bu -cu -b0 -c0|010232323232323232323232323|bHOu Oo0 1COo0 9Jcu 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|25e4",
            "Pacific/Noumea|+11 +12|-b0 -c0|0101010|jhp0 xX0 1PB0 yn0 HeP0 Ao0|98e3",
            "Pacific/Pitcairn|-0830 -08|8u 80|01|18Vku|56",
            "Pacific/Rarotonga|-1030 -0930 -10|au 9u a0|012121212121212121212121212|lyWu IL0 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu Onu|13e3",
            "Pacific/Tongatapu|+13 +14|-d0 -e0|010101010|1csd0 15A0 1wo0 xz0 1Q10 xz0 zWN0 s00|75e3",
            "WET|WET WEST|0 -10|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|"
          ],
          "links": [
            "Africa/Abidjan|Africa/Accra",
            "Africa/Abidjan|Africa/Bamako",
            "Africa/Abidjan|Africa/Banjul",
            "Africa/Abidjan|Africa/Conakry",
            "Africa/Abidjan|Africa/Dakar",
            "Africa/Abidjan|Africa/Freetown",
            "Africa/Abidjan|Africa/Lome",
            "Africa/Abidjan|Africa/Nouakchott",
            "Africa/Abidjan|Africa/Ouagadougou",
            "Africa/Abidjan|Africa/Timbuktu",
            "Africa/Abidjan|Atlantic/Reykjavik",
            "Africa/Abidjan|Atlantic/St_Helena",
            "Africa/Abidjan|Etc/GMT",
            "Africa/Abidjan|Etc/GMT+0",
            "Africa/Abidjan|Etc/GMT-0",
            "Africa/Abidjan|Etc/GMT0",
            "Africa/Abidjan|Etc/Greenwich",
            "Africa/Abidjan|GMT",
            "Africa/Abidjan|GMT+0",
            "Africa/Abidjan|GMT-0",
            "Africa/Abidjan|GMT0",
            "Africa/Abidjan|Greenwich",
            "Africa/Abidjan|Iceland",
            "Africa/Cairo|Egypt",
            "Africa/Johannesburg|Africa/Maseru",
            "Africa/Johannesburg|Africa/Mbabane",
            "Africa/Lagos|Africa/Bangui",
            "Africa/Lagos|Africa/Brazzaville",
            "Africa/Lagos|Africa/Douala",
            "Africa/Lagos|Africa/Kinshasa",
            "Africa/Lagos|Africa/Libreville",
            "Africa/Lagos|Africa/Luanda",
            "Africa/Lagos|Africa/Malabo",
            "Africa/Lagos|Africa/Niamey",
            "Africa/Lagos|Africa/Porto-Novo",
            "Africa/Maputo|Africa/Blantyre",
            "Africa/Maputo|Africa/Bujumbura",
            "Africa/Maputo|Africa/Gaborone",
            "Africa/Maputo|Africa/Harare",
            "Africa/Maputo|Africa/Kigali",
            "Africa/Maputo|Africa/Lubumbashi",
            "Africa/Maputo|Africa/Lusaka",
            "Africa/Nairobi|Africa/Addis_Ababa",
            "Africa/Nairobi|Africa/Asmara",
            "Africa/Nairobi|Africa/Asmera",
            "Africa/Nairobi|Africa/Dar_es_Salaam",
            "Africa/Nairobi|Africa/Djibouti",
            "Africa/Nairobi|Africa/Kampala",
            "Africa/Nairobi|Africa/Mogadishu",
            "Africa/Nairobi|Indian/Antananarivo",
            "Africa/Nairobi|Indian/Comoro",
            "Africa/Nairobi|Indian/Mayotte",
            "Africa/Tripoli|Libya",
            "America/Adak|America/Atka",
            "America/Adak|US/Aleutian",
            "America/Anchorage|US/Alaska",
            "America/Argentina/Buenos_Aires|America/Buenos_Aires",
            "America/Argentina/Catamarca|America/Argentina/ComodRivadavia",
            "America/Argentina/Catamarca|America/Catamarca",
            "America/Argentina/Cordoba|America/Cordoba",
            "America/Argentina/Cordoba|America/Rosario",
            "America/Argentina/Jujuy|America/Jujuy",
            "America/Argentina/Mendoza|America/Mendoza",
            "America/Cayenne|Etc/GMT+3",
            "America/Chicago|CST6CDT",
            "America/Chicago|US/Central",
            "America/Denver|America/Shiprock",
            "America/Denver|MST7MDT",
            "America/Denver|Navajo",
            "America/Denver|US/Mountain",
            "America/Detroit|US/Michigan",
            "America/Edmonton|America/Yellowknife",
            "America/Edmonton|Canada/Mountain",
            "America/Fort_Wayne|America/Indiana/Indianapolis",
            "America/Fort_Wayne|America/Indianapolis",
            "America/Fort_Wayne|US/East-Indiana",
            "America/Godthab|America/Nuuk",
            "America/Halifax|Canada/Atlantic",
            "America/Havana|Cuba",
            "America/Indiana/Knox|America/Knox_IN",
            "America/Indiana/Knox|US/Indiana-Starke",
            "America/Iqaluit|America/Pangnirtung",
            "America/Jamaica|Jamaica",
            "America/Kentucky/Louisville|America/Louisville",
            "America/La_Paz|Etc/GMT+4",
            "America/Los_Angeles|PST8PDT",
            "America/Los_Angeles|US/Pacific",
            "America/Manaus|Brazil/West",
            "America/Mazatlan|Mexico/BajaSur",
            "America/Mexico_City|Mexico/General",
            "America/New_York|EST5EDT",
            "America/New_York|US/Eastern",
            "America/Noronha|Brazil/DeNoronha",
            "America/Panama|America/Atikokan",
            "America/Panama|America/Cayman",
            "America/Panama|America/Coral_Harbour",
            "America/Panama|EST",
            "America/Phoenix|America/Creston",
            "America/Phoenix|MST",
            "America/Phoenix|US/Arizona",
            "America/Puerto_Rico|America/Anguilla",
            "America/Puerto_Rico|America/Antigua",
            "America/Puerto_Rico|America/Aruba",
            "America/Puerto_Rico|America/Blanc-Sablon",
            "America/Puerto_Rico|America/Curacao",
            "America/Puerto_Rico|America/Dominica",
            "America/Puerto_Rico|America/Grenada",
            "America/Puerto_Rico|America/Guadeloupe",
            "America/Puerto_Rico|America/Kralendijk",
            "America/Puerto_Rico|America/Lower_Princes",
            "America/Puerto_Rico|America/Marigot",
            "America/Puerto_Rico|America/Montserrat",
            "America/Puerto_Rico|America/Port_of_Spain",
            "America/Puerto_Rico|America/St_Barthelemy",
            "America/Puerto_Rico|America/St_Kitts",
            "America/Puerto_Rico|America/St_Lucia",
            "America/Puerto_Rico|America/St_Thomas",
            "America/Puerto_Rico|America/St_Vincent",
            "America/Puerto_Rico|America/Tortola",
            "America/Puerto_Rico|America/Virgin",
            "America/Regina|Canada/Saskatchewan",
            "America/Rio_Branco|America/Porto_Acre",
            "America/Rio_Branco|Brazil/Acre",
            "America/Santiago|Chile/Continental",
            "America/Sao_Paulo|Brazil/East",
            "America/St_Johns|Canada/Newfoundland",
            "America/Tijuana|America/Ensenada",
            "America/Tijuana|America/Santa_Isabel",
            "America/Tijuana|Mexico/BajaNorte",
            "America/Toronto|America/Montreal",
            "America/Toronto|America/Nassau",
            "America/Toronto|America/Nipigon",
            "America/Toronto|America/Thunder_Bay",
            "America/Toronto|Canada/Eastern",
            "America/Vancouver|Canada/Pacific",
            "America/Whitehorse|Canada/Yukon",
            "America/Winnipeg|America/Rainy_River",
            "America/Winnipeg|Canada/Central",
            "Asia/Ashgabat|Asia/Ashkhabad",
            "Asia/Bangkok|Asia/Phnom_Penh",
            "Asia/Bangkok|Asia/Vientiane",
            "Asia/Bangkok|Etc/GMT-7",
            "Asia/Bangkok|Indian/Christmas",
            "Asia/Brunei|Asia/Kuching",
            "Asia/Brunei|Etc/GMT-8",
            "Asia/Dhaka|Asia/Dacca",
            "Asia/Dubai|Asia/Muscat",
            "Asia/Dubai|Etc/GMT-4",
            "Asia/Dubai|Indian/Mahe",
            "Asia/Dubai|Indian/Reunion",
            "Asia/Ho_Chi_Minh|Asia/Saigon",
            "Asia/Hong_Kong|Hongkong",
            "Asia/Jerusalem|Asia/Tel_Aviv",
            "Asia/Jerusalem|Israel",
            "Asia/Kathmandu|Asia/Katmandu",
            "Asia/Kolkata|Asia/Calcutta",
            "Asia/Kuala_Lumpur|Asia/Singapore",
            "Asia/Kuala_Lumpur|Singapore",
            "Asia/Macau|Asia/Macao",
            "Asia/Makassar|Asia/Ujung_Pandang",
            "Asia/Nicosia|Europe/Nicosia",
            "Asia/Qatar|Asia/Bahrain",
            "Asia/Rangoon|Asia/Yangon",
            "Asia/Rangoon|Indian/Cocos",
            "Asia/Riyadh|Antarctica/Syowa",
            "Asia/Riyadh|Asia/Aden",
            "Asia/Riyadh|Asia/Kuwait",
            "Asia/Riyadh|Etc/GMT-3",
            "Asia/Seoul|ROK",
            "Asia/Shanghai|Asia/Chongqing",
            "Asia/Shanghai|Asia/Chungking",
            "Asia/Shanghai|Asia/Harbin",
            "Asia/Shanghai|PRC",
            "Asia/Taipei|ROC",
            "Asia/Tehran|Iran",
            "Asia/Thimphu|Asia/Thimbu",
            "Asia/Tokyo|Japan",
            "Asia/Ulaanbaatar|Asia/Ulan_Bator",
            "Asia/Urumqi|Antarctica/Vostok",
            "Asia/Urumqi|Asia/Kashgar",
            "Asia/Urumqi|Etc/GMT-6",
            "Atlantic/Faroe|Atlantic/Faeroe",
            "Atlantic/South_Georgia|Etc/GMT+2",
            "Australia/Adelaide|Australia/South",
            "Australia/Brisbane|Australia/Queensland",
            "Australia/Broken_Hill|Australia/Yancowinna",
            "Australia/Darwin|Australia/North",
            "Australia/Hobart|Australia/Currie",
            "Australia/Hobart|Australia/Tasmania",
            "Australia/Lord_Howe|Australia/LHI",
            "Australia/Melbourne|Australia/Victoria",
            "Australia/Perth|Australia/West",
            "Australia/Sydney|Australia/ACT",
            "Australia/Sydney|Australia/Canberra",
            "Australia/Sydney|Australia/NSW",
            "Etc/UTC|Etc/UCT",
            "Etc/UTC|Etc/Universal",
            "Etc/UTC|Etc/Zulu",
            "Etc/UTC|UCT",
            "Etc/UTC|UTC",
            "Etc/UTC|Universal",
            "Etc/UTC|Zulu",
            "Europe/Belgrade|Europe/Ljubljana",
            "Europe/Belgrade|Europe/Podgorica",
            "Europe/Belgrade|Europe/Sarajevo",
            "Europe/Belgrade|Europe/Skopje",
            "Europe/Belgrade|Europe/Zagreb",
            "Europe/Berlin|Arctic/Longyearbyen",
            "Europe/Berlin|Atlantic/Jan_Mayen",
            "Europe/Berlin|Europe/Copenhagen",
            "Europe/Berlin|Europe/Oslo",
            "Europe/Berlin|Europe/Stockholm",
            "Europe/Brussels|CET",
            "Europe/Brussels|Europe/Amsterdam",
            "Europe/Brussels|Europe/Luxembourg",
            "Europe/Chisinau|Europe/Tiraspol",
            "Europe/Dublin|Eire",
            "Europe/Helsinki|Europe/Mariehamn",
            "Europe/Istanbul|Asia/Istanbul",
            "Europe/Istanbul|Turkey",
            "Europe/Kiev|Europe/Kyiv",
            "Europe/Kiev|Europe/Uzhgorod",
            "Europe/Kiev|Europe/Zaporozhye",
            "Europe/Lisbon|Portugal",
            "Europe/London|Europe/Belfast",
            "Europe/London|Europe/Guernsey",
            "Europe/London|Europe/Isle_of_Man",
            "Europe/London|Europe/Jersey",
            "Europe/London|GB",
            "Europe/London|GB-Eire",
            "Europe/Moscow|W-SU",
            "Europe/Paris|Europe/Monaco",
            "Europe/Prague|Europe/Bratislava",
            "Europe/Rome|Europe/San_Marino",
            "Europe/Rome|Europe/Vatican",
            "Europe/Warsaw|Poland",
            "Europe/Zurich|Europe/Busingen",
            "Europe/Zurich|Europe/Vaduz",
            "Indian/Maldives|Etc/GMT-5",
            "Indian/Maldives|Indian/Kerguelen",
            "Pacific/Auckland|Antarctica/McMurdo",
            "Pacific/Auckland|Antarctica/South_Pole",
            "Pacific/Auckland|NZ",
            "Pacific/Chatham|NZ-CHAT",
            "Pacific/Easter|Chile/EasterIsland",
            "Pacific/Enderbury|Pacific/Kanton",
            "Pacific/Gambier|Etc/GMT+9",
            "Pacific/Guadalcanal|Etc/GMT-11",
            "Pacific/Guadalcanal|Pacific/Pohnpei",
            "Pacific/Guadalcanal|Pacific/Ponape",
            "Pacific/Guam|Pacific/Saipan",
            "Pacific/Honolulu|HST",
            "Pacific/Honolulu|Pacific/Johnston",
            "Pacific/Honolulu|US/Hawaii",
            "Pacific/Kwajalein|Kwajalein",
            "Pacific/Niue|Etc/GMT+11",
            "Pacific/Pago_Pago|Pacific/Midway",
            "Pacific/Pago_Pago|Pacific/Samoa",
            "Pacific/Pago_Pago|US/Samoa",
            "Pacific/Palau|Etc/GMT-9",
            "Pacific/Port_Moresby|Antarctica/DumontDUrville",
            "Pacific/Port_Moresby|Etc/GMT-10",
            "Pacific/Port_Moresby|Pacific/Chuuk",
            "Pacific/Port_Moresby|Pacific/Truk",
            "Pacific/Port_Moresby|Pacific/Yap",
            "Pacific/Tahiti|Etc/GMT+10",
            "Pacific/Tarawa|Etc/GMT-12",
            "Pacific/Tarawa|Pacific/Funafuti",
            "Pacific/Tarawa|Pacific/Majuro",
            "Pacific/Tarawa|Pacific/Wake",
            "Pacific/Tarawa|Pacific/Wallis"
          ],
          "countries": [
            "AD|Europe/Andorra",
            "AE|Asia/Dubai",
            "AF|Asia/Kabul",
            "AG|America/Puerto_Rico America/Antigua",
            "AI|America/Puerto_Rico America/Anguilla",
            "AL|Europe/Tirane",
            "AM|Asia/Yerevan",
            "AO|Africa/Lagos Africa/Luanda",
            "AQ|Antarctica/Casey Antarctica/Davis Antarctica/Mawson Antarctica/Palmer Antarctica/Rothera Antarctica/Troll Asia/Urumqi Pacific/Auckland Pacific/Port_Moresby Asia/Riyadh Antarctica/McMurdo Antarctica/DumontDUrville Antarctica/Syowa Antarctica/Vostok",
            "AR|America/Argentina/Buenos_Aires America/Argentina/Cordoba America/Argentina/Salta America/Argentina/Jujuy America/Argentina/Tucuman America/Argentina/Catamarca America/Argentina/La_Rioja America/Argentina/San_Juan America/Argentina/Mendoza America/Argentina/San_Luis America/Argentina/Rio_Gallegos America/Argentina/Ushuaia",
            "AS|Pacific/Pago_Pago",
            "AT|Europe/Vienna",
            "AU|Australia/Lord_Howe Antarctica/Macquarie Australia/Hobart Australia/Melbourne Australia/Sydney Australia/Broken_Hill Australia/Brisbane Australia/Lindeman Australia/Adelaide Australia/Darwin Australia/Perth Australia/Eucla",
            "AW|America/Puerto_Rico America/Aruba",
            "AX|Europe/Helsinki Europe/Mariehamn",
            "AZ|Asia/Baku",
            "BA|Europe/Belgrade Europe/Sarajevo",
            "BB|America/Barbados",
            "BD|Asia/Dhaka",
            "BE|Europe/Brussels",
            "BF|Africa/Abidjan Africa/Ouagadougou",
            "BG|Europe/Sofia",
            "BH|Asia/Qatar Asia/Bahrain",
            "BI|Africa/Maputo Africa/Bujumbura",
            "BJ|Africa/Lagos Africa/Porto-Novo",
            "BL|America/Puerto_Rico America/St_Barthelemy",
            "BM|Atlantic/Bermuda",
            "BN|Asia/Kuching Asia/Brunei",
            "BO|America/La_Paz",
            "BQ|America/Puerto_Rico America/Kralendijk",
            "BR|America/Noronha America/Belem America/Fortaleza America/Recife America/Araguaina America/Maceio America/Bahia America/Sao_Paulo America/Campo_Grande America/Cuiaba America/Santarem America/Porto_Velho America/Boa_Vista America/Manaus America/Eirunepe America/Rio_Branco",
            "BS|America/Toronto America/Nassau",
            "BT|Asia/Thimphu",
            "BW|Africa/Maputo Africa/Gaborone",
            "BY|Europe/Minsk",
            "BZ|America/Belize",
            "CA|America/St_Johns America/Halifax America/Glace_Bay America/Moncton America/Goose_Bay America/Toronto America/Iqaluit America/Winnipeg America/Resolute America/Rankin_Inlet America/Regina America/Swift_Current America/Edmonton America/Cambridge_Bay America/Inuvik America/Dawson_Creek America/Fort_Nelson America/Whitehorse America/Dawson America/Vancouver America/Panama America/Puerto_Rico America/Phoenix America/Blanc-Sablon America/Atikokan America/Creston",
            "CC|Asia/Yangon Indian/Cocos",
            "CD|Africa/Maputo Africa/Lagos Africa/Kinshasa Africa/Lubumbashi",
            "CF|Africa/Lagos Africa/Bangui",
            "CG|Africa/Lagos Africa/Brazzaville",
            "CH|Europe/Zurich",
            "CI|Africa/Abidjan",
            "CK|Pacific/Rarotonga",
            "CL|America/Santiago America/Punta_Arenas Pacific/Easter",
            "CM|Africa/Lagos Africa/Douala",
            "CN|Asia/Shanghai Asia/Urumqi",
            "CO|America/Bogota",
            "CR|America/Costa_Rica",
            "CU|America/Havana",
            "CV|Atlantic/Cape_Verde",
            "CW|America/Puerto_Rico America/Curacao",
            "CX|Asia/Bangkok Indian/Christmas",
            "CY|Asia/Nicosia Asia/Famagusta",
            "CZ|Europe/Prague",
            "DE|Europe/Zurich Europe/Berlin Europe/Busingen",
            "DJ|Africa/Nairobi Africa/Djibouti",
            "DK|Europe/Berlin Europe/Copenhagen",
            "DM|America/Puerto_Rico America/Dominica",
            "DO|America/Santo_Domingo",
            "DZ|Africa/Algiers",
            "EC|America/Guayaquil Pacific/Galapagos",
            "EE|Europe/Tallinn",
            "EG|Africa/Cairo",
            "EH|Africa/El_Aaiun",
            "ER|Africa/Nairobi Africa/Asmara",
            "ES|Europe/Madrid Africa/Ceuta Atlantic/Canary",
            "ET|Africa/Nairobi Africa/Addis_Ababa",
            "FI|Europe/Helsinki",
            "FJ|Pacific/Fiji",
            "FK|Atlantic/Stanley",
            "FM|Pacific/Kosrae Pacific/Port_Moresby Pacific/Guadalcanal Pacific/Chuuk Pacific/Pohnpei",
            "FO|Atlantic/Faroe",
            "FR|Europe/Paris",
            "GA|Africa/Lagos Africa/Libreville",
            "GB|Europe/London",
            "GD|America/Puerto_Rico America/Grenada",
            "GE|Asia/Tbilisi",
            "GF|America/Cayenne",
            "GG|Europe/London Europe/Guernsey",
            "GH|Africa/Abidjan Africa/Accra",
            "GI|Europe/Gibraltar",
            "GL|America/Nuuk America/Danmarkshavn America/Scoresbysund America/Thule",
            "GM|Africa/Abidjan Africa/Banjul",
            "GN|Africa/Abidjan Africa/Conakry",
            "GP|America/Puerto_Rico America/Guadeloupe",
            "GQ|Africa/Lagos Africa/Malabo",
            "GR|Europe/Athens",
            "GS|Atlantic/South_Georgia",
            "GT|America/Guatemala",
            "GU|Pacific/Guam",
            "GW|Africa/Bissau",
            "GY|America/Guyana",
            "HK|Asia/Hong_Kong",
            "HN|America/Tegucigalpa",
            "HR|Europe/Belgrade Europe/Zagreb",
            "HT|America/Port-au-Prince",
            "HU|Europe/Budapest",
            "ID|Asia/Jakarta Asia/Pontianak Asia/Makassar Asia/Jayapura",
            "IE|Europe/Dublin",
            "IL|Asia/Jerusalem",
            "IM|Europe/London Europe/Isle_of_Man",
            "IN|Asia/Kolkata",
            "IO|Indian/Chagos",
            "IQ|Asia/Baghdad",
            "IR|Asia/Tehran",
            "IS|Africa/Abidjan Atlantic/Reykjavik",
            "IT|Europe/Rome",
            "JE|Europe/London Europe/Jersey",
            "JM|America/Jamaica",
            "JO|Asia/Amman",
            "JP|Asia/Tokyo",
            "KE|Africa/Nairobi",
            "KG|Asia/Bishkek",
            "KH|Asia/Bangkok Asia/Phnom_Penh",
            "KI|Pacific/Tarawa Pacific/Kanton Pacific/Kiritimati",
            "KM|Africa/Nairobi Indian/Comoro",
            "KN|America/Puerto_Rico America/St_Kitts",
            "KP|Asia/Pyongyang",
            "KR|Asia/Seoul",
            "KW|Asia/Riyadh Asia/Kuwait",
            "KY|America/Panama America/Cayman",
            "KZ|Asia/Almaty Asia/Qyzylorda Asia/Qostanay Asia/Aqtobe Asia/Aqtau Asia/Atyrau Asia/Oral",
            "LA|Asia/Bangkok Asia/Vientiane",
            "LB|Asia/Beirut",
            "LC|America/Puerto_Rico America/St_Lucia",
            "LI|Europe/Zurich Europe/Vaduz",
            "LK|Asia/Colombo",
            "LR|Africa/Monrovia",
            "LS|Africa/Johannesburg Africa/Maseru",
            "LT|Europe/Vilnius",
            "LU|Europe/Brussels Europe/Luxembourg",
            "LV|Europe/Riga",
            "LY|Africa/Tripoli",
            "MA|Africa/Casablanca",
            "MC|Europe/Paris Europe/Monaco",
            "MD|Europe/Chisinau",
            "ME|Europe/Belgrade Europe/Podgorica",
            "MF|America/Puerto_Rico America/Marigot",
            "MG|Africa/Nairobi Indian/Antananarivo",
            "MH|Pacific/Tarawa Pacific/Kwajalein Pacific/Majuro",
            "MK|Europe/Belgrade Europe/Skopje",
            "ML|Africa/Abidjan Africa/Bamako",
            "MM|Asia/Yangon",
            "MN|Asia/Ulaanbaatar Asia/Hovd Asia/Choibalsan",
            "MO|Asia/Macau",
            "MP|Pacific/Guam Pacific/Saipan",
            "MQ|America/Martinique",
            "MR|Africa/Abidjan Africa/Nouakchott",
            "MS|America/Puerto_Rico America/Montserrat",
            "MT|Europe/Malta",
            "MU|Indian/Mauritius",
            "MV|Indian/Maldives",
            "MW|Africa/Maputo Africa/Blantyre",
            "MX|America/Mexico_City America/Cancun America/Merida America/Monterrey America/Matamoros America/Chihuahua America/Ciudad_Juarez America/Ojinaga America/Mazatlan America/Bahia_Banderas America/Hermosillo America/Tijuana",
            "MY|Asia/Kuching Asia/Singapore Asia/Kuala_Lumpur",
            "MZ|Africa/Maputo",
            "NA|Africa/Windhoek",
            "NC|Pacific/Noumea",
            "NE|Africa/Lagos Africa/Niamey",
            "NF|Pacific/Norfolk",
            "NG|Africa/Lagos",
            "NI|America/Managua",
            "NL|Europe/Brussels Europe/Amsterdam",
            "NO|Europe/Berlin Europe/Oslo",
            "NP|Asia/Kathmandu",
            "NR|Pacific/Nauru",
            "NU|Pacific/Niue",
            "NZ|Pacific/Auckland Pacific/Chatham",
            "OM|Asia/Dubai Asia/Muscat",
            "PA|America/Panama",
            "PE|America/Lima",
            "PF|Pacific/Tahiti Pacific/Marquesas Pacific/Gambier",
            "PG|Pacific/Port_Moresby Pacific/Bougainville",
            "PH|Asia/Manila",
            "PK|Asia/Karachi",
            "PL|Europe/Warsaw",
            "PM|America/Miquelon",
            "PN|Pacific/Pitcairn",
            "PR|America/Puerto_Rico",
            "PS|Asia/Gaza Asia/Hebron",
            "PT|Europe/Lisbon Atlantic/Madeira Atlantic/Azores",
            "PW|Pacific/Palau",
            "PY|America/Asuncion",
            "QA|Asia/Qatar",
            "RE|Asia/Dubai Indian/Reunion",
            "RO|Europe/Bucharest",
            "RS|Europe/Belgrade",
            "RU|Europe/Kaliningrad Europe/Moscow Europe/Simferopol Europe/Kirov Europe/Volgograd Europe/Astrakhan Europe/Saratov Europe/Ulyanovsk Europe/Samara Asia/Yekaterinburg Asia/Omsk Asia/Novosibirsk Asia/Barnaul Asia/Tomsk Asia/Novokuznetsk Asia/Krasnoyarsk Asia/Irkutsk Asia/Chita Asia/Yakutsk Asia/Khandyga Asia/Vladivostok Asia/Ust-Nera Asia/Magadan Asia/Sakhalin Asia/Srednekolymsk Asia/Kamchatka Asia/Anadyr",
            "RW|Africa/Maputo Africa/Kigali",
            "SA|Asia/Riyadh",
            "SB|Pacific/Guadalcanal",
            "SC|Asia/Dubai Indian/Mahe",
            "SD|Africa/Khartoum",
            "SE|Europe/Berlin Europe/Stockholm",
            "SG|Asia/Singapore",
            "SH|Africa/Abidjan Atlantic/St_Helena",
            "SI|Europe/Belgrade Europe/Ljubljana",
            "SJ|Europe/Berlin Arctic/Longyearbyen",
            "SK|Europe/Prague Europe/Bratislava",
            "SL|Africa/Abidjan Africa/Freetown",
            "SM|Europe/Rome Europe/San_Marino",
            "SN|Africa/Abidjan Africa/Dakar",
            "SO|Africa/Nairobi Africa/Mogadishu",
            "SR|America/Paramaribo",
            "SS|Africa/Juba",
            "ST|Africa/Sao_Tome",
            "SV|America/El_Salvador",
            "SX|America/Puerto_Rico America/Lower_Princes",
            "SY|Asia/Damascus",
            "SZ|Africa/Johannesburg Africa/Mbabane",
            "TC|America/Grand_Turk",
            "TD|Africa/Ndjamena",
            "TF|Asia/Dubai Indian/Maldives Indian/Kerguelen",
            "TG|Africa/Abidjan Africa/Lome",
            "TH|Asia/Bangkok",
            "TJ|Asia/Dushanbe",
            "TK|Pacific/Fakaofo",
            "TL|Asia/Dili",
            "TM|Asia/Ashgabat",
            "TN|Africa/Tunis",
            "TO|Pacific/Tongatapu",
            "TR|Europe/Istanbul",
            "TT|America/Puerto_Rico America/Port_of_Spain",
            "TV|Pacific/Tarawa Pacific/Funafuti",
            "TW|Asia/Taipei",
            "TZ|Africa/Nairobi Africa/Dar_es_Salaam",
            "UA|Europe/Simferopol Europe/Kyiv",
            "UG|Africa/Nairobi Africa/Kampala",
            "UM|Pacific/Pago_Pago Pacific/Tarawa Pacific/Midway Pacific/Wake",
            "US|America/New_York America/Detroit America/Kentucky/Louisville America/Kentucky/Monticello America/Indiana/Indianapolis America/Indiana/Vincennes America/Indiana/Winamac America/Indiana/Marengo America/Indiana/Petersburg America/Indiana/Vevay America/Chicago America/Indiana/Tell_City America/Indiana/Knox America/Menominee America/North_Dakota/Center America/North_Dakota/New_Salem America/North_Dakota/Beulah America/Denver America/Boise America/Phoenix America/Los_Angeles America/Anchorage America/Juneau America/Sitka America/Metlakatla America/Yakutat America/Nome America/Adak Pacific/Honolulu",
            "UY|America/Montevideo",
            "UZ|Asia/Samarkand Asia/Tashkent",
            "VA|Europe/Rome Europe/Vatican",
            "VC|America/Puerto_Rico America/St_Vincent",
            "VE|America/Caracas",
            "VG|America/Puerto_Rico America/Tortola",
            "VI|America/Puerto_Rico America/St_Thomas",
            "VN|Asia/Bangkok Asia/Ho_Chi_Minh",
            "VU|Pacific/Efate",
            "WF|Pacific/Tarawa Pacific/Wallis",
            "WS|Pacific/Apia",
            "YE|Asia/Riyadh Asia/Aden",
            "YT|Africa/Nairobi Indian/Mayotte",
            "ZA|Africa/Johannesburg",
            "ZM|Africa/Maputo Africa/Lusaka",
            "ZW|Africa/Maputo Africa/Harare"
          ]
        });
        return moment;
      });
    }
  });

  // node_modules/moment-timezone/moment-timezone-utils.js
  var require_moment_timezone_utils = __commonJS({
    "node_modules/moment-timezone/moment-timezone-utils.js"(exports, module) {
      (function(root, factory) {
        "use strict";
        if (typeof module === "object" && module.exports) {
          module.exports = factory(require_moment_timezone_with_data_1970_2030());
        } else if (typeof define === "function" && define.amd) {
          define(["moment"], factory);
        } else {
          factory(root.moment);
        }
      })(exports, function(moment) {
        "use strict";
        if (!moment.tz) {
          throw new Error("moment-timezone-utils.js must be loaded after moment-timezone.js");
        }
        var BASE60 = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX", EPSILON = 1e-6;
        function packBase60Fraction(fraction, precision) {
          var buffer = ".", output = "", current;
          while (precision > 0) {
            precision -= 1;
            fraction *= 60;
            current = Math.floor(fraction + EPSILON);
            buffer += BASE60[current];
            fraction -= current;
            if (current) {
              output += buffer;
              buffer = "";
            }
          }
          return output;
        }
        function packBase60(number, precision) {
          var output = "", absolute = Math.abs(number), whole = Math.floor(absolute), fraction = packBase60Fraction(absolute - whole, Math.min(~~precision, 10));
          while (whole > 0) {
            output = BASE60[whole % 60] + output;
            whole = Math.floor(whole / 60);
          }
          if (number < 0) {
            output = "-" + output;
          }
          if (output && fraction) {
            return output + fraction;
          }
          if (!fraction && output === "-") {
            return "0";
          }
          return output || fraction || "0";
        }
        function packUntils(untils) {
          var out = [], last = 0, i;
          for (i = 0; i < untils.length - 1; i++) {
            out[i] = packBase60(Math.round((untils[i] - last) / 1e3) / 60, 1);
            last = untils[i];
          }
          return out.join(" ");
        }
        function packAbbrsAndOffsets(source) {
          var index = 0, abbrs = [], offsets = [], indices = [], map = {}, i, key;
          for (i = 0; i < source.abbrs.length; i++) {
            key = source.abbrs[i] + "|" + source.offsets[i];
            if (map[key] === void 0) {
              map[key] = index;
              abbrs[index] = source.abbrs[i];
              offsets[index] = packBase60(Math.round(source.offsets[i] * 60) / 60, 1);
              index++;
            }
            indices[i] = packBase60(map[key], 0);
          }
          return abbrs.join(" ") + "|" + offsets.join(" ") + "|" + indices.join("");
        }
        function packPopulation(number) {
          if (!number) {
            return "";
          }
          if (number < 1e3) {
            return number;
          }
          var exponent = String(number | 0).length - 2;
          var precision = Math.round(number / Math.pow(10, exponent));
          return precision + "e" + exponent;
        }
        function packCountries(countries) {
          if (!countries) {
            return "";
          }
          return countries.join(" ");
        }
        function validatePackData(source) {
          if (!source.name) {
            throw new Error("Missing name");
          }
          if (!source.abbrs) {
            throw new Error("Missing abbrs");
          }
          if (!source.untils) {
            throw new Error("Missing untils");
          }
          if (!source.offsets) {
            throw new Error("Missing offsets");
          }
          if (source.offsets.length !== source.untils.length || source.offsets.length !== source.abbrs.length) {
            throw new Error("Mismatched array lengths");
          }
        }
        function pack(source) {
          validatePackData(source);
          return [
            source.name,
            // 0 - timezone name
            packAbbrsAndOffsets(source),
            // 1 - abbrs, 2 - offsets, 3 - indices
            packUntils(source.untils),
            // 4 - untils
            packPopulation(source.population)
            // 5 - population
          ].join("|");
        }
        function packCountry(source) {
          return [
            source.name,
            source.zones.join(" ")
          ].join("|");
        }
        function arraysAreEqual(a, b) {
          var i;
          if (a.length !== b.length) {
            return false;
          }
          for (i = 0; i < a.length; i++) {
            if (a[i] !== b[i]) {
              return false;
            }
          }
          return true;
        }
        function zonesAreEqual(a, b) {
          return arraysAreEqual(a.offsets, b.offsets) && arraysAreEqual(a.abbrs, b.abbrs) && arraysAreEqual(a.untils, b.untils);
        }
        function findAndCreateLinks(input, output, links, groupLeaders) {
          var i, j, a, b, group, foundGroup, groups = [];
          for (i = 0; i < input.length; i++) {
            foundGroup = false;
            a = input[i];
            for (j = 0; j < groups.length; j++) {
              group = groups[j];
              b = group[0];
              if (zonesAreEqual(a, b)) {
                if (a.population > b.population) {
                  group.unshift(a);
                } else if (a.population === b.population && groupLeaders && groupLeaders[a.name]) {
                  group.unshift(a);
                } else {
                  group.push(a);
                }
                foundGroup = true;
              }
            }
            if (!foundGroup) {
              groups.push([a]);
            }
          }
          for (i = 0; i < groups.length; i++) {
            group = groups[i];
            output.push(group[0]);
            for (j = 1; j < group.length; j++) {
              links.push(group[0].name + "|" + group[j].name);
            }
          }
        }
        function createLinks(source, groupLeaders) {
          var zones = [], links = [];
          if (source.links) {
            links = source.links.slice();
          }
          findAndCreateLinks(source.zones, zones, links, groupLeaders);
          return {
            version: source.version,
            zones,
            links: links.sort()
          };
        }
        function findStartAndEndIndex(untils, start, end) {
          var startI = 0, endI = untils.length + 1, untilYear, i;
          if (!end) {
            end = start;
          }
          if (start > end) {
            i = start;
            start = end;
            end = i;
          }
          for (i = 0; i < untils.length; i++) {
            if (untils[i] == null) {
              continue;
            }
            untilYear = new Date(untils[i]).getUTCFullYear();
            if (untilYear < start) {
              startI = i + 1;
            }
            if (untilYear > end) {
              endI = Math.min(endI, i + 1);
            }
          }
          return [startI, endI];
        }
        function filterYears(source, start, end) {
          var slice = Array.prototype.slice, indices = findStartAndEndIndex(source.untils, start, end), untils = slice.apply(source.untils, indices);
          untils[untils.length - 1] = null;
          return {
            name: source.name,
            abbrs: slice.apply(source.abbrs, indices),
            untils,
            offsets: slice.apply(source.offsets, indices),
            population: source.population,
            countries: source.countries
          };
        }
        function filterLinkPack(input, start, end, groupLeaders) {
          var i, inputZones = input.zones, outputZones = [], output;
          for (i = 0; i < inputZones.length; i++) {
            outputZones[i] = filterYears(inputZones[i], start, end);
          }
          output = createLinks({
            zones: outputZones,
            links: input.links.slice(),
            version: input.version
          }, groupLeaders);
          for (i = 0; i < output.zones.length; i++) {
            output.zones[i] = pack(output.zones[i]);
          }
          output.countries = input.countries ? input.countries.map(function(unpacked) {
            return packCountry(unpacked);
          }) : [];
          return output;
        }
        moment.tz.pack = pack;
        moment.tz.packBase60 = packBase60;
        moment.tz.createLinks = createLinks;
        moment.tz.filterYears = filterYears;
        moment.tz.filterLinkPack = filterLinkPack;
        moment.tz.packCountry = packCountry;
        return moment;
      });
    }
  });

  // package-external:@wordpress/deprecated
  var require_deprecated = __commonJS({
    "package-external:@wordpress/deprecated"(exports, module) {
      module.exports = window.wp.deprecated;
    }
  });

  // packages/date/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    __experimentalGetSettings: () => __experimentalGetSettings,
    date: () => date,
    dateI18n: () => dateI18n,
    format: () => format,
    getDate: () => getDate,
    getSettings: () => getSettings,
    gmdate: () => gmdate,
    gmdateI18n: () => gmdateI18n,
    humanTimeDiff: () => humanTimeDiff,
    isInTheFuture: () => isInTheFuture,
    setSettings: () => setSettings
  });
  var import_moment = __toESM(require_moment(), 1);
  var import_moment_timezone = __toESM(require_moment_timezone_with_data_1970_2030(), 1);
  var import_moment_timezone_utils = __toESM(require_moment_timezone_utils(), 1);
  var import_deprecated = __toESM(require_deprecated(), 1);
  var WP_ZONE = "WP";
  var VALID_UTC_OFFSET = /^[+-][0-1][0-9](:?[0-9][0-9])?$/;
  var settings = {
    l10n: {
      locale: "en",
      months: [
        "January",
        "February",
        "March",
        "April",
        "May",
        "June",
        "July",
        "August",
        "September",
        "October",
        "November",
        "December"
      ],
      monthsShort: [
        "Jan",
        "Feb",
        "Mar",
        "Apr",
        "May",
        "Jun",
        "Jul",
        "Aug",
        "Sep",
        "Oct",
        "Nov",
        "Dec"
      ],
      weekdays: [
        "Sunday",
        "Monday",
        "Tuesday",
        "Wednesday",
        "Thursday",
        "Friday",
        "Saturday"
      ],
      weekdaysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
      meridiem: { am: "am", pm: "pm", AM: "AM", PM: "PM" },
      relative: {
        future: "%s from now",
        past: "%s ago",
        s: "a few seconds",
        ss: "%d seconds",
        m: "a minute",
        mm: "%d minutes",
        h: "an hour",
        hh: "%d hours",
        d: "a day",
        dd: "%d days",
        M: "a month",
        MM: "%d months",
        y: "a year",
        yy: "%d years"
      },
      startOfWeek: 0
    },
    formats: {
      time: "g:i a",
      date: "F j, Y",
      datetime: "F j, Y g:i a",
      datetimeAbbreviated: "M j, Y g:i a"
    },
    timezone: { offset: 0, offsetFormatted: "0", string: "", abbr: "" }
  };
  function setSettings(dateSettings) {
    settings = dateSettings;
    setupWPTimezone();
    if (import_moment.default.locales().includes(dateSettings.l10n.locale)) {
      if (import_moment.default.localeData(dateSettings.l10n.locale).longDateFormat("LTS") === null) {
        import_moment.default.defineLocale(dateSettings.l10n.locale, null);
      } else {
        return;
      }
    }
    const currentLocale = import_moment.default.locale();
    import_moment.default.defineLocale(dateSettings.l10n.locale, {
      // Inherit anything missing from English. We don't load
      // moment-with-locales.js so English is all there is.
      parentLocale: "en",
      months: dateSettings.l10n.months,
      monthsShort: dateSettings.l10n.monthsShort,
      weekdays: dateSettings.l10n.weekdays,
      weekdaysShort: dateSettings.l10n.weekdaysShort,
      meridiem(hour, minute, isLowercase) {
        if (hour < 12) {
          return isLowercase ? dateSettings.l10n.meridiem.am : dateSettings.l10n.meridiem.AM;
        }
        return isLowercase ? dateSettings.l10n.meridiem.pm : dateSettings.l10n.meridiem.PM;
      },
      longDateFormat: {
        LT: dateSettings.formats.time,
        LTS: import_moment.default.localeData("en").longDateFormat("LTS"),
        L: import_moment.default.localeData("en").longDateFormat("L"),
        LL: dateSettings.formats.date,
        LLL: dateSettings.formats.datetime,
        LLLL: import_moment.default.localeData("en").longDateFormat("LLLL")
      },
      // From human_time_diff?
      // Set to `(number, withoutSuffix, key, isFuture) => {}` instead.
      relativeTime: dateSettings.l10n.relative
    });
    import_moment.default.locale(currentLocale);
  }
  function getSettings() {
    return settings;
  }
  function __experimentalGetSettings() {
    (0, import_deprecated.default)("wp.date.__experimentalGetSettings", {
      since: "6.1",
      alternative: "wp.date.getSettings"
    });
    return getSettings();
  }
  function setupWPTimezone() {
    const currentTimezone = import_moment.default.tz.zone(settings.timezone.string);
    if (currentTimezone) {
      import_moment.default.tz.add(
        import_moment.default.tz.pack({
          name: WP_ZONE,
          abbrs: currentTimezone.abbrs,
          untils: currentTimezone.untils,
          offsets: currentTimezone.offsets
        })
      );
    } else {
      import_moment.default.tz.add(
        import_moment.default.tz.pack({
          name: WP_ZONE,
          abbrs: [WP_ZONE],
          untils: [null],
          offsets: [-settings.timezone.offset * 60 || 0]
        })
      );
    }
  }
  var MINUTE_IN_SECONDS = 60;
  var HOUR_IN_MINUTES = 60;
  var HOUR_IN_SECONDS = 60 * MINUTE_IN_SECONDS;
  var formatMap = {
    // Day.
    d: "DD",
    D: "ddd",
    j: "D",
    l: "dddd",
    N: "E",
    /**
     * Gets the ordinal suffix.
     *
     * @param momentDate Moment instance.
     *
     * @return Formatted date.
     */
    S(momentDate) {
      const num = momentDate.format("D");
      const withOrdinal = momentDate.format("Do");
      return withOrdinal.replace(num, "");
    },
    w: "d",
    /**
     * Gets the day of the year (zero-indexed).
     *
     * @param momentDate Moment instance.
     *
     * @return Formatted date.
     */
    z(momentDate) {
      return (parseInt(momentDate.format("DDD"), 10) - 1).toString();
    },
    // Week.
    W: "W",
    // Month.
    F: "MMMM",
    m: "MM",
    M: "MMM",
    n: "M",
    /**
     * Gets the days in the month.
     *
     * @param momentDate Moment instance.
     *
     * @return Formatted date.
     */
    t(momentDate) {
      return momentDate.daysInMonth();
    },
    // Year.
    /**
     * Gets whether the current year is a leap year.
     *
     * @param momentDate Moment instance.
     *
     * @return Formatted date.
     */
    L(momentDate) {
      return momentDate.isLeapYear() ? "1" : "0";
    },
    o: "GGGG",
    Y: "YYYY",
    y: "YY",
    // Time.
    a: "a",
    A: "A",
    /**
     * Gets the current time in Swatch Internet Time (.beats).
     *
     * @param momentDate Moment instance.
     *
     * @return Formatted date.
     */
    B(momentDate) {
      const timezoned = (0, import_moment.default)(momentDate).utcOffset(60);
      const seconds = parseInt(timezoned.format("s"), 10), minutes = parseInt(timezoned.format("m"), 10), hours = parseInt(timezoned.format("H"), 10);
      return parseInt(
        ((seconds + minutes * MINUTE_IN_SECONDS + hours * HOUR_IN_SECONDS) / 86.4).toString(),
        10
      );
    },
    g: "h",
    G: "H",
    h: "hh",
    H: "HH",
    i: "mm",
    s: "ss",
    u: "SSSSSS",
    v: "SSS",
    // Timezone.
    e: "zz",
    /**
     * Gets whether the timezone is in DST currently.
     *
     * @param momentDate Moment instance.
     *
     * @return Formatted date.
     */
    I(momentDate) {
      return momentDate.isDST() ? "1" : "0";
    },
    O: "ZZ",
    P: "Z",
    T: "z",
    /**
     * Gets the timezone offset in seconds.
     *
     * @param momentDate Moment instance.
     *
     * @return Formatted date.
     */
    Z(momentDate) {
      const offset = momentDate.format("Z");
      const sign = offset[0] === "-" ? -1 : 1;
      const parts = offset.substring(1).split(":").map((n) => parseInt(n, 10));
      return sign * (parts[0] * HOUR_IN_MINUTES + parts[1]) * MINUTE_IN_SECONDS;
    },
    // Full date/time.
    c: "YYYY-MM-DDTHH:mm:ssZ",
    // .toISOString.
    /**
     * Formats the date as RFC2822.
     *
     * @param momentDate Moment instance.
     *
     * @return Formatted date.
     */
    r(momentDate) {
      return momentDate.locale("en").format("ddd, DD MMM YYYY HH:mm:ss ZZ");
    },
    U: "X"
  };
  function format(dateFormat, dateValue = /* @__PURE__ */ new Date()) {
    let i, char;
    const newFormat = [];
    const momentDate = (0, import_moment.default)(dateValue);
    for (i = 0; i < dateFormat.length; i++) {
      char = dateFormat[i];
      if ("\\" === char) {
        i++;
        newFormat.push("[" + dateFormat[i] + "]");
        continue;
      }
      if (char in formatMap) {
        const formatter = formatMap[char];
        if (typeof formatter !== "string") {
          newFormat.push("[" + formatter(momentDate) + "]");
        } else {
          newFormat.push(formatter);
        }
      } else {
        newFormat.push("[" + char + "]");
      }
    }
    return momentDate.format(newFormat.join("[]"));
  }
  function date(dateFormat, dateValue = /* @__PURE__ */ new Date(), timezone) {
    const dateMoment = buildMoment(dateValue, timezone);
    return format(dateFormat, dateMoment);
  }
  function gmdate(dateFormat, dateValue = /* @__PURE__ */ new Date()) {
    const dateMoment = (0, import_moment.default)(dateValue).utc();
    return format(dateFormat, dateMoment);
  }
  function dateI18n(dateFormat, dateValue = /* @__PURE__ */ new Date(), timezone) {
    if (true === timezone) {
      return gmdateI18n(dateFormat, dateValue);
    }
    if (false === timezone) {
      timezone = void 0;
    }
    const dateMoment = buildMoment(dateValue, timezone);
    dateMoment.locale(settings.l10n.locale);
    return format(dateFormat, dateMoment);
  }
  function gmdateI18n(dateFormat, dateValue = /* @__PURE__ */ new Date()) {
    const dateMoment = (0, import_moment.default)(dateValue).utc();
    dateMoment.locale(settings.l10n.locale);
    return format(dateFormat, dateMoment);
  }
  function isInTheFuture(dateValue) {
    const now = import_moment.default.tz(WP_ZONE);
    const momentObject = import_moment.default.tz(dateValue, WP_ZONE);
    return momentObject.isAfter(now);
  }
  function getDate(dateString) {
    if (!dateString) {
      return import_moment.default.tz(WP_ZONE).toDate();
    }
    return import_moment.default.tz(dateString, WP_ZONE).toDate();
  }
  function humanTimeDiff(from, to) {
    const fromMoment = import_moment.default.tz(from, WP_ZONE);
    const toMoment = to ? import_moment.default.tz(to, WP_ZONE) : import_moment.default.tz(WP_ZONE);
    return fromMoment.from(toMoment);
  }
  function buildMoment(dateValue, timezone = "") {
    const dateMoment = (0, import_moment.default)(dateValue);
    if (timezone !== "") {
      return isUTCOffset(timezone) ? dateMoment.utcOffset(timezone) : (
        // A false isUTCOffset() guarantees that timezone is a string.
        dateMoment.tz(timezone)
      );
    }
    if (settings.timezone.string) {
      return dateMoment.tz(settings.timezone.string);
    }
    return dateMoment.utcOffset(+settings.timezone.offset);
  }
  function isUTCOffset(offset) {
    if ("number" === typeof offset) {
      return true;
    }
    return VALID_UTC_OFFSET.test(offset);
  }
  setupWPTimezone();
  return __toCommonJS(index_exports);
})();
/*! Bundled license information:

moment-timezone/builds/moment-timezone-with-data-1970-2030.js:
  (*! moment-timezone.js *)
  (*! version : 0.5.43 *)
  (*! Copyright (c) JS Foundation and other contributors *)
  (*! license : MIT *)
  (*! github.com/moment/moment-timezone *)

moment-timezone/moment-timezone-utils.js:
  (*! moment-timezone-utils.js *)
  (*! version : 0.5.43 *)
  (*! Copyright (c) JS Foundation and other contributors *)
  (*! license : MIT *)
  (*! github.com/moment/moment-timezone *)
*/
                                                                                                                                                                dist/date.min.js                                                                                    0000644                 00000432275 15212564002 0007556 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).date=(()=>{var E0=Object.create;var j=Object.defineProperty;var R0=Object.getOwnPropertyDescriptor;var S0=Object.getOwnPropertyNames;var h0=Object.getPrototypeOf,g0=Object.prototype.hasOwnProperty;var F=(M,n)=>()=>(n||M((n={exports:{}}).exports,n),n.exports),C0=(M,n)=>{for(var e in n)j(M,e,{get:n[e],enumerable:!0})},b0=(M,n,e,q)=>{if(n&&typeof n=="object"||typeof n=="function")for(let u of S0(n))!g0.call(M,u)&&u!==e&&j(M,u,{get:()=>n[u],enumerable:!(q=R0(n,u))||q.enumerable});return M};var V=(M,n,e)=>(e=M!=null?E0(h0(M)):{},b0(n||!M||!M.__esModule?j(e,"default",{value:M,enumerable:!0}):e,M)),P0=M=>b0(j({},"__esModule",{value:!0}),M);var M0=F((J0,r0)=>{r0.exports=window.moment});var a0=F((p0,x)=>{(function(M,n){"use strict";typeof x=="object"&&x.exports?x.exports=n(M0()):typeof define=="function"&&define.amd?define(["moment"],n):n(M.moment)})(p0,function(M){"use strict";M.version===void 0&&M.default&&(M=M.default);var n="0.5.43",e={},q={},u={},W={},E={},I;(!M||typeof M.version!="string")&&D("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");var Y=M.version.split("."),_=+Y[0],w=+Y[1];(_<2||_===2&&w<6)&&D("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js "+M.version+". See momentjs.com");function K(c){return c>96?c-87:c>64?c-29:c-48}function k(c){var o=0,a=c.split("."),i=a[0],b=a[1]||"",d=1,B,m=0,L=1;for(c.charCodeAt(0)===45&&(o=1,L=-1),o;o<i.length;o++)B=K(i.charCodeAt(o)),m=60*m+B;for(o=0;o<b.length;o++)d=d/60,B=K(b.charCodeAt(o)),m+=B*d;return m*L}function y(c){for(var o=0;o<c.length;o++)c[o]=k(c[o])}function Z(c,o){for(var a=0;a<o;a++)c[a]=Math.round((c[a-1]||0)+c[a]*6e4);c[o-1]=1/0}function v(c,o){var a=[],i;for(i=0;i<o.length;i++)a[i]=c[o[i]];return a}function U(c){var o=c.split("|"),a=o[2].split(" "),i=o[3].split(""),b=o[4].split(" ");return y(a),y(i),y(b),Z(b,i.length),{name:o[0],abbrs:v(o[1].split(" "),i),offsets:v(a,i),untils:b,population:o[5]|0}}function C(c){c&&this._set(U(c))}C.prototype={_set:function(c){this.name=c.name,this.abbrs=c.abbrs,this.untils=c.untils,this.offsets=c.offsets,this.population=c.population},_index:function(c){var o=+c,a=this.untils,i;for(i=0;i<a.length;i++)if(o<a[i])return i},countries:function(){var c=this.name;return Object.keys(u).filter(function(o){return u[o].zones.indexOf(c)!==-1})},parse:function(c){var o=+c,a=this.offsets,i=this.untils,b=i.length-1,d,B,m,L;for(L=0;L<b;L++)if(d=a[L],B=a[L+1],m=a[L&&L-1],d<B&&s.moveAmbiguousForward?d=B:d>m&&s.moveInvalidForward&&(d=m),o<i[L]-d*6e4)return a[L];return a[b]},abbr:function(c){return this.abbrs[this._index(c)]},offset:function(c){return D("zone.offset has been deprecated in favor of zone.utcOffset"),this.offsets[this._index(c)]},utcOffset:function(c){return this.offsets[this._index(c)]}};function Q(c,o){this.name=c,this.zones=o}function A(c){var o=c.toTimeString(),a=o.match(/\([a-z ]+\)/i);a&&a[0]?(a=a[0].match(/[A-Z]/g),a=a?a.join(""):void 0):(a=o.match(/[A-Z]{3,5}/g),a=a?a[0]:void 0),a==="GMT"&&(a=void 0),this.at=+c,this.abbr=a,this.offset=c.getTimezoneOffset()}function z(c){this.zone=c,this.offsetScore=0,this.abbrScore=0}z.prototype.scoreOffsetAt=function(c){this.offsetScore+=Math.abs(this.zone.utcOffset(c.at)-c.offset),this.zone.abbr(c.at).replace(/[^A-Z]/g,"")!==c.abbr&&this.abbrScore++};function r(c,o){for(var a,i;i=((o.at-c.at)/12e4|0)*6e4;)a=new A(new Date(c.at+i)),a.offset===c.offset?c=a:o=a;return c}function t(){var c=new Date().getFullYear()-2,o=new A(new Date(c,0,1)),a=[o],i,b,d;for(d=1;d<48;d++)b=new A(new Date(c,d,1)),b.offset!==o.offset&&(i=r(o,b),a.push(i),a.push(new A(new Date(i.at+6e4)))),o=b;for(d=0;d<4;d++)a.push(new A(new Date(c+d,0,1))),a.push(new A(new Date(c+d,6,1)));return a}function p(c,o){return c.offsetScore!==o.offsetScore?c.offsetScore-o.offsetScore:c.abbrScore!==o.abbrScore?c.abbrScore-o.abbrScore:c.zone.population!==o.zone.population?o.zone.population-c.zone.population:o.zone.name.localeCompare(c.zone.name)}function O(c,o){var a,i;for(y(o),a=0;a<o.length;a++)i=o[a],E[i]=E[i]||{},E[i][c]=!0}function f(c){var o=c.length,a={},i=[],b,d,B;for(b=0;b<o;b++){B=E[c[b].offset]||{};for(d in B)B.hasOwnProperty(d)&&(a[d]=!0)}for(b in a)a.hasOwnProperty(b)&&i.push(W[b]);return i}function N(){try{var c=Intl.DateTimeFormat().resolvedOptions().timeZone;if(c&&c.length>3){var o=W[h(c)];if(o)return o;D("Moment Timezone found "+c+" from the Intl api, but did not have that data loaded.")}}catch{}var a=t(),i=a.length,b=f(a),d=[],B,m,L;for(m=0;m<b.length;m++){for(B=new z(R(b[m]),i),L=0;L<i;L++)B.scoreOffsetAt(a[L]);d.push(B)}return d.sort(p),d.length>0?d[0].zone.name:void 0}function X(c){return(!I||c)&&(I=N()),I}function h(c){return(c||"").toLowerCase().replace(/\//g,"_")}function P(c){var o,a,i,b;for(typeof c=="string"&&(c=[c]),o=0;o<c.length;o++)i=c[o].split("|"),a=i[0],b=h(a),e[b]=c[o],W[b]=a,O(b,i[2].split(" "))}function R(c,o){c=h(c);var a=e[c],i;return a instanceof C?a:typeof a=="string"?(a=new C(a),e[c]=a,a):q[c]&&o!==R&&(i=R(q[c],R))?(a=e[c]=new C,a._set(i),a.name=W[c],a):null}function L0(){var c,o=[];for(c in W)W.hasOwnProperty(c)&&(e[c]||e[q[c]])&&W[c]&&o.push(W[c]);return o.sort()}function W0(){return Object.keys(u)}function A0(c){var o,a,i,b;for(typeof c=="string"&&(c=[c]),o=0;o<c.length;o++)a=c[o].split("|"),i=h(a[0]),b=h(a[1]),q[i]=b,W[i]=a[0],q[b]=i,W[b]=a[1]}function B0(c){var o,a,i,b;if(!(!c||!c.length))for(o=0;o<c.length;o++)b=c[o].split("|"),a=b[0].toUpperCase(),i=b[1].split(" "),u[a]=new Q(a,i)}function X0(c){return c=c.toUpperCase(),u[c]||null}function m0(c,o){if(c=X0(c),!c)return null;var a=c.zones.sort();return o?a.map(function(i){var b=R(i);return{name:i,offset:b.utcOffset(new Date)}}):a}function i0(c){P(c.zones),A0(c.links),B0(c.countries),s.dataVersion=c.version}function $(c){return $.didShowError||($.didShowError=!0,D("moment.tz.zoneExists('"+c+"') has been deprecated in favor of !moment.tz.zone('"+c+"')")),!!R(c)}function c0(c){var o=c._f==="X"||c._f==="x";return!!(c._a&&c._tzm===void 0&&!o)}function D(c){typeof console<"u"&&typeof console.error=="function"&&console.error(c)}function s(c){var o=Array.prototype.slice.call(arguments,0,-1),a=arguments[arguments.length-1],i=R(a),b=M.utc.apply(null,o);return i&&!M.isMoment(c)&&c0(b)&&b.add(i.parse(b),"minutes"),b.tz(a),b}s.version=n,s.dataVersion="",s._zones=e,s._links=q,s._names=W,s._countries=u,s.add=P,s.link=A0,s.load=i0,s.zone=R,s.zoneExists=$,s.guess=X,s.names=L0,s.Zone=C,s.unpack=U,s.unpackBase60=k,s.needsOffset=c0,s.moveInvalidForward=!0,s.moveAmbiguousForward=!1,s.countries=W0,s.zonesForCountry=m0;var T=M.fn;M.tz=s,M.defaultZone=null,M.updateOffset=function(c,o){var a=M.defaultZone,i;if(c._z===void 0&&(a&&c0(c)&&!c._isUTC&&(c._d=M.utc(c._a)._d,c.utc().add(a.parse(c),"minutes")),c._z=a),c._z)if(i=c._z.utcOffset(c),Math.abs(i)<16&&(i=i/60),c.utcOffset!==void 0){var b=c._z;c.utcOffset(-i,o),c._z=b}else c.zone(i,o)},T.tz=function(c,o){if(c){if(typeof c!="string")throw new Error("Time zone name must be a string, got "+c+" ["+typeof c+"]");return this._z=R(c),this._z?M.updateOffset(this,o):D("Moment Timezone has no data for "+c+". See http://momentjs.com/timezone/docs/#/data-loading/."),this}if(this._z)return this._z.name};function n0(c){return function(){return this._z?this._z.abbr(this):c.call(this)}}function e0(c){return function(){return this._z=null,c.apply(this,arguments)}}function T0(c){return function(){return arguments.length>0&&(this._z=null),c.apply(this,arguments)}}T.zoneName=n0(T.zoneName),T.zoneAbbr=n0(T.zoneAbbr),T.utc=e0(T.utc),T.local=e0(T.local),T.utcOffset=T0(T.utcOffset),M.tz.setDefault=function(c){return(_<2||_===2&&w<9)&&D("Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js "+M.version+"."),M.defaultZone=c?R(c):null,M};var G=M.momentProperties;return Object.prototype.toString.call(G)==="[object Array]"?(G.push("_z"),G.push("_a")):G&&(G._z=null),i0({version:"2023c",zones:["Africa/Abidjan|GMT|0|0||48e5","Africa/Nairobi|EAT|-30|0||47e5","Africa/Algiers|WET WEST CET CEST|0 -10 -10 -20|01012320102|3bX0 11A0 dDd0 17b0 11B0 1cN0 2Dy0 1cN0 1fB0 1cL0|26e5","Africa/Lagos|WAT|-10|0||17e6","Africa/Bissau|-01 GMT|10 0|01|cap0|39e4","Africa/Maputo|CAT|-20|0||26e5","Africa/Cairo|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|LX0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1WL0 rd0 1Rz0 wp0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1qL0 Xd0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1ny0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 WL0 1qN0 Rb0 1wp0 On0 1zd0 Lz0 1EN0 Fb0 c10 8n0 8Nd0 gL0 e10 mn0 kSp0 1cL0 1cN0 1fz0 1a10 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0|15e6","Africa/Casablanca|+00 +01|0 -10|01010101010101010101010101010101010101010101010101010101010101010101010|aS00 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4mn0 SyN0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600|32e5","Africa/Ceuta|WET WEST CET CEST|0 -10 -10 -20|0101010102323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|aS00 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4VB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|85e3","Africa/El_Aaiun|-01 +00 +01|10 0 -10|01212121212121212121212121212121212121212121212121212121212121212121|fi10 6L0 AL0 1Nd0 XX0 1Cp0 pz0 1cBB0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600|20e4","Africa/Johannesburg|SAST|-20|0||84e5","Africa/Juba|CAT CAST EAT|-20 -30 -30|01010101010101010101010101010101020|LW0 16L0 1iN0 17b0 1jd0 17b0 1ip0 17z0 1i10 17X0 1hB0 18n0 1hd0 19b0 1gp0 19z0 1iN0 17b0 1ip0 17z0 1i10 18n0 1hd0 18L0 1gN0 19b0 1gp0 19z0 1iN0 17z0 1i10 17X0 yGd0 PeX0|","Africa/Khartoum|CAT CAST EAT|-20 -30 -30|01010101010101010101010101010101020|LW0 16L0 1iN0 17b0 1jd0 17b0 1ip0 17z0 1i10 17X0 1hB0 18n0 1hd0 19b0 1gp0 19z0 1iN0 17b0 1ip0 17z0 1i10 18n0 1hd0 18L0 1gN0 19b0 1gp0 19z0 1iN0 17z0 1i10 17X0 yGd0 HjL0|51e5","Africa/Monrovia|MMT GMT|I.u 0|01|4SoI.u|11e5","Africa/Ndjamena|WAT WAST|-10 -20|010|nNb0 Wn0|13e5","Africa/Sao_Tome|GMT WAT|0 -10|010|1UQN0 2q00|","Africa/Tripoli|EET CET CEST|-20 -10 -20|0121212121212121210120120|tda0 A10 1db0 1cN0 1db0 1dd0 1db0 1eN0 1bb0 1e10 1cL0 1c10 1db0 1dd0 1db0 1cN0 1db0 1q10 fAn0 1ep0 1db0 AKq0 TA0 1o00|11e5","Africa/Tunis|CET CEST|-10 -20|0101010101010101010|hOn0 WM0 1rA0 11c0 nwo0 Ko0 1cM0 1cM0 1rA0 10M0 zuM0 10N0 1aN0 1qM0 WM0 1qM0 11A0 1o00|20e5","Africa/Windhoek|SAST CAT WAT|-20 -20 -10|01212121212121212121212121212121212121212121212121|Ndy0 9Io0 16P0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|32e4","America/Adak|BST BDT AHST HST HDT|b0 a0 a0 a0 90|0101010101010101010101010101234343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|Kd0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cm0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|326","America/Anchorage|AHST AHDT YST AKST AKDT|a0 90 90 90 80|0101010101010101010101010101234343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|Kc0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cm0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|30e4","America/Puerto_Rico|AST|40|0||24e5","America/Araguaina|-03 -02|30 20|01010101010101010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 dMN0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 ny10 Lz0|14e4","America/Argentina/Buenos_Aires|-03 -02|30 20|01010101010101010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 A4p0 uL0 1qN0 WL0|","America/Argentina/Catamarca|-03 -02 -04|30 20 40|01010101210102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 rlB0 7B0 8zb0 uL0|","America/Argentina/Cordoba|-03 -02 -04|30 20 40|01010101210101010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 A4p0 uL0 1qN0 WL0|","America/Argentina/Jujuy|-03 -02 -04|30 20 40|010101202101010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1ze0 TX0 1ld0 WK0 1wp0 TX0 A4p0 uL0|","America/Argentina/La_Rioja|-03 -02 -04|30 20 40|010101012010102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Qn0 qO0 16n0 Rb0 1wp0 TX0 rlB0 7B0 8zb0 uL0|","America/Argentina/Mendoza|-03 -02 -04|30 20 40|01010120202102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1u20 SL0 1vd0 Tb0 1wp0 TW0 ri10 Op0 7TX0 uL0|","America/Argentina/Rio_Gallegos|-03 -02 -04|30 20 40|01010101010102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 rlB0 7B0 8zb0 uL0|","America/Argentina/Salta|-03 -02 -04|30 20 40|010101012101010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 A4p0 uL0|","America/Argentina/San_Juan|-03 -02 -04|30 20 40|010101012010102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Qn0 qO0 16n0 Rb0 1wp0 TX0 rld0 m10 8lb0 uL0|","America/Argentina/San_Luis|-03 -02 -04|30 20 40|010101202020102020|9Rf0 Db0 zvd0 Bz0 1tB0 XX0 1q20 SL0 AN0 vDb0 m10 8lb0 8L0 jd0 1qN0 WL0 1qN0|","America/Argentina/Tucuman|-03 -02 -04|30 20 40|0101010121010201010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 rlB0 4N0 8BX0 uL0 1qN0 WL0|","America/Argentina/Ushuaia|-03 -02 -04|30 20 40|01010101010102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 rkN0 8p0 8zb0 uL0|","America/Asuncion|-04 -03|40 30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|6FE0 3CL0 3Dd0 10L0 1pB0 10n0 1pB0 10n0 1pB0 1cL0 1dd0 1db0 1dd0 1cL0 1dd0 1cL0 1dd0 1cL0 1dd0 1db0 1dd0 1cL0 1dd0 1cL0 1dd0 1cL0 1dd0 1db0 1dd0 1cL0 1lB0 14n0 1dd0 1cL0 1fd0 WL0 1rd0 1aL0 1dB0 Xz0 1qp0 Xb0 1qN0 10L0 1rB0 TX0 1tB0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 WN0 1qL0 11B0 1nX0 1ip0 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 TX0 1tB0 19X0 1a10 1fz0 1a10 1fz0 1cN0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0|28e5","America/Panama|EST|50|0||15e5","America/Bahia_Banderas|PST MST MDT CDT CST|80 70 60 50 60|01212121212121212121212121212134343434343434343434343434|80 13Vd0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nW0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|84e3","America/Bahia|-03 -02|30 20|010101010101010101010101010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 l5B0 Rb0|27e5","America/Barbados|AST ADT|40 30|010101010|i7G0 IL0 1ip0 17b0 1ip0 17b0 1ld0 13b0|28e4","America/Belem|-03 -02|30 20|0101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0|20e5","America/Belize|CST CDT|60 50|01010|9xG0 qn0 lxB0 mn0|57e3","America/Boa_Vista|-04 -03|40 30|01010101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 smp0 WL0 1tB0 2L0|62e2","America/Bogota|-05 -04|50 40|010|Snh0 1PX0|90e5","America/Boise|MST MDT|70 60|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 Dd0 1Kn0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e4","America/Cambridge_Bay|MST MDT CST CDT EST|70 60 60 50 50|010101010101010101010101010101010101010101010101010101012342101010101010101010101010101010101010101010101010101010101010|5E90 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11A0 1nX0 2K0 WQ0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e2","America/Campo_Grande|-04 -03|40 30|010101010101010101010101010101010101010101010101010101010101010101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 1C10 Lz0 1Ip0 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|77e4","America/Cancun|CST EST EDT CDT|60 50 40 50|012121230303030303030303030303030303030301|t9G0 yLB0 1lb0 14p0 1lb0 14p0 Lz0 xB0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 Dd0|63e4","America/Caracas|-04 -0430|40 4u|010|1wmv0 kqo0|29e5","America/Cayenne|-03|30|0||58e3","America/Chicago|CST CDT|60 50|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K80 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|92e5","America/Chihuahua|CST CDT MDT MST|60 50 60 70|0101023232323232323232323232323232323232323232323232320|13Vk0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|81e4","America/Ciudad_Juarez|CST CDT MDT MST|60 50 60 70|010102323232323232323232323232323232323232323232323232032323232323232323|13Vk0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1wn0 cm0 EP0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Costa_Rica|CST CDT|60 50|010101010|mgS0 Db0 1Kp0 Db0 pRB0 15b0 1kp0 mL0|12e5","America/Phoenix|MST|70|0||42e5","America/Cuiaba|-04 -03|40 30|0101010101010101010101010101010101010101010101010101010101010101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 4a10 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|54e4","America/Danmarkshavn|-03 -02 GMT|30 20 0|0101010101010101010101010101010102|oXh0 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 DC0|8","America/Dawson_Creek|PST PDT MST|80 70 70|0101012|Ka0 1cL0 1cN0 1fz0 1cN0 ML0|12e3","America/Dawson|YST PST PDT MST|90 80 70 70|012121212121212121212121212121212121212121212121212121212121212121212121212121212123|9ix0 fNd0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1z90|13e2","America/Denver|MST MDT|70 60|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e5","America/Detroit|EST EDT|50 40|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|85H0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e5","America/Edmonton|MST MDT|70 60|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|5E90 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|10e5","America/Eirunepe|-05 -04|50 40|01010101010|CxF0 Rb0 1tB0 IL0 1Fd0 FX0 dPB0 On0 yTd0 d5X0|31e3","America/El_Salvador|CST CDT|60 50|01010|Gcu0 WL0 1qN0 WL0|11e5","America/Tijuana|PST PDT|80 70|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|fmy0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|20e5","America/Fort_Nelson|PST PDT MST|80 70 70|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010102|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0|39e2","America/Fort_Wayne|EST EDT|50 40|01010101010101010101010101010101010101010101010101010|K70 1cL0 1qhd0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Fortaleza|-03 -02|30 20|01010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 5z0 2mN0 On0|34e5","America/Glace_Bay|AST ADT|40 30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|5E60 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|19e3","America/Godthab|-03 -02 -01|30 20 10|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010121212121212121|oXh0 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 2so0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|17e3","America/Goose_Bay|AST ADT ADDT|40 30 20|010101010101010101010101010101010101020101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K60 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14n1 1lb0 14p0 1nW0 11C0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|76e2","America/Grand_Turk|EST EDT AST|50 40 40|0101010101010101010101010101010101010101010101010101010101010101010101010210101010101010101010101010|mG70 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 7jA0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e2","America/Guatemala|CST CDT|60 50|010101010|9tG0 An0 mtd0 Nz0 ifB0 17b0 zDB0 11z0|13e5","America/Guayaquil|-05 -04|50 40|010|TKR0 rz0|27e5","America/Guyana|-0345 -03 -04|3J 30 40|012|dzfJ Ey0f|80e4","America/Halifax|AST ADT|40 30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K60 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|39e4","America/Havana|CST CDT|50 40|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K50 1cL0 1cN0 1fz0 1cN0 14n0 1ld0 14L0 1kN0 15b0 1kp0 1cL0 1cN0 1fz0 1a10 1fz0 1fB0 11z0 14p0 1nX0 11B0 1nX0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 1a10 1in0 1a10 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 17c0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 11A0 6i00 Rc0 1wo0 U00 1tA0 Rc0 1wo0 U00 1wo0 U00 1zc0 U00 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0|21e5","America/Hermosillo|PST MST MDT|80 70 60|01212121|80 13Vd0 1lb0 14p0 1lb0 14p0 1lb0|64e4","America/Indiana/Knox|CST CDT EST|60 50 50|01010101010101010101010101010101010101010101210101010101010101010101010101010101010101010101010|K80 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 z8o0 1o00 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Indiana/Marengo|EST EDT CDT|50 40 50|010101010201010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1VA0 LA0 1BX0 1e6p0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Indiana/Petersburg|CST CDT EST EDT|60 50 50 40|0101010101010101210123232323232323232323232323232323232323232323232|K80 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 19co0 1o00 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Indiana/Tell_City|EST EDT CDT CST|50 40 50 60|01023232323232323232323232323232323232323232323232323|K70 1cL0 1qhd0 1o00 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Indiana/Vevay|EST EDT|50 40|010101010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1lnd0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Indiana/Vincennes|EST EDT CDT CST|50 40 50 60|01023201010101010101010101010101010101010101010101010|K70 1cL0 1qhd0 1o00 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Indiana/Winamac|EST EDT CDT CST|50 40 50 60|01023101010101010101010101010101010101010101010101010|K70 1cL0 1qhd0 1o00 Rd0 1za0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Inuvik|PST PDT MDT MST|80 70 60 70|01010101010101023232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|5Ea0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cK0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|35e2","America/Iqaluit|EST EDT CST CDT|50 40 60 50|01010101010101010101010101010101010101010101010101010101230101010101010101010101010101010101010101010101010101010101010|5E70 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11C0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|67e2","America/Jamaica|EST EDT|50 40|010101010101010101010|9Kv0 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0|94e4","America/Juneau|PST PDT YDT YST AKST AKDT|80 70 80 90 90 80|0101010101010101010102010101345454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cM0 1cM0 1cL0 1cN0 1fz0 1a10 1fz0 co0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|33e3","America/Kentucky/Louisville|EST EDT CDT|50 40 50|010101010201010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1VA0 LA0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Kentucky/Monticello|CST CDT EST EDT|60 50 50 40|010101010101010101010101010101010101010101010101010101010101012323232323232323232323232323232323232323232323232323232323232|K80 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/La_Paz|-04|40|0||19e5","America/Lima|-05 -04|50 40|010101010|CVF0 zX0 1O10 zX0 6Gp0 zX0 98p0 zX0|11e6","America/Los_Angeles|PST PDT|80 70|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e6","America/Maceio|-03 -02|30 20|0101010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 dMN0 Lz0 8Q10 WL0 1tB0 5z0 2mN0 On0|93e4","America/Managua|CST EST CDT|60 50 50|010202010102020|86u0 4mn0 9Up0 Dz0 1K10 Dz0 s3F0 1KH0 DB0 9In0 k8p0 19X0 1o30 11y0|22e5","America/Manaus|-04 -03|40 30|010101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 dPB0 On0|19e5","America/Martinique|AST ADT|40 30|010|oXg0 19X0|39e4","America/Matamoros|CST CDT|60 50|0101010101010101010101010101010101010101010101010101010101010101010101010|IqU0 1nX0 i6p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|45e4","America/Mazatlan|PST MST MDT|80 70 60|01212121212121212121212121212121212121212121212121212121|80 13Vd0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|44e4","America/Menominee|EST CDT CST|50 50 60|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|85H0 1cM0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|85e2","America/Merida|CST EST CDT|60 50 50|010202020202020202020202020202020202020202020202020202020|t9G0 2hz0 wu30 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|11e5","America/Metlakatla|PST PDT AKST AKDT|80 70 90 80|0101010101010101010101010101023232302323232323232323232323232|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1hU10 Rd0 1zb0 Op0 1zb0 Op0 1zb0 uM0 jB0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2","America/Mexico_City|CST CDT|60 50|0101010101010101010101010101010101010101010101010101010|13Vk0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|20e6","America/Miquelon|AST -03 -02|40 30 20|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|p9g0 gQ10 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|61e2","America/Moncton|AST ADT|40 30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K60 1cL0 1cN0 1fz0 1cN0 1cL0 3Cp0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14n1 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 ReX 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|64e3","America/Monterrey|CST CDT|60 50|010101010101010101010101010101010101010101010101010101010|IqU0 1nX0 i6p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|41e5","America/Montevideo|-03 -02 -0130 -0230|30 20 1u 2u|0101023010101010101010101010101010101010101010101010|JD0 jX0 4vB0 xz0 3Cp0 mmu 1a10 IMu Db0 4c10 uL0 1Nd0 An0 1SN0 uL0 mp0 28L0 iPB0 un0 1SN0 xz0 1zd0 Lz0 1zd0 Rb0 1zd0 On0 1wp0 Rb0 s8p0 1fB0 1ip0 11z0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 11z0|17e5","America/Toronto|EST EDT|50 40|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|65e5","America/New_York|EST EDT|50 40|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e6","America/Nome|BST BDT YST AKST AKDT|b0 a0 90 90 80|0101010101010101010101010101234343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|Kd0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cl0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|38e2","America/Noronha|-02 -01|20 10|01010101010101010|CxC0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 2L0 2pB0 On0|30e2","America/North_Dakota/Beulah|MST MDT CST CDT|70 60 60 50|010101010101010101010101010101010101010101010101010101010101010101010101010101010123232323232323232323232323232323232323232|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/North_Dakota/Center|MST MDT CST CDT|70 60 60 50|010101010101010101010101010101010101010101010123232323232323232323232323232323232323232323232323232323232323232323232323232|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14o0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/North_Dakota/New_Salem|MST MDT CST CDT|70 60 60 50|010101010101010101010101010101010101010101010101010101010101010101012323232323232323232323232323232323232323232323232323232|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14o0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|","America/Ojinaga|CST CDT MDT MST|60 50 60 70|01010232323232323232323232323232323232323232323232323201010101010101010|13Vk0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1wn0 Rc0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e3","America/Paramaribo|-0330 -03|3u 30|01|zSPu|24e4","America/Port-au-Prince|EST EDT|50 40|01010101010101010101010101010101010101010101010101010101010101010101010|wu50 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14q0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 i6n0 1nX0 11B0 1nX0 d430 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 3iN0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5","America/Rio_Branco|-05 -04|50 40|010101010|CxF0 Rb0 1tB0 IL0 1Fd0 FX0 NBd0 d5X0|31e4","America/Porto_Velho|-04 -03|40 30|0101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0|37e4","America/Punta_Arenas|-03 -04|30 40|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|yP0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0|","America/Winnipeg|CST CDT|60 50|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K80 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|66e4","America/Rankin_Inlet|CST CDT EST|60 50 50|01010101010101010101010101010101010101010101010101010101012101010101010101010101010101010101010101010101010101010101010|5E80 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e2","America/Recife|-03 -02|30 20|01010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 2L0 2pB0 On0|33e5","America/Regina|CST|60|0||19e4","America/Resolute|CST CDT EST|60 50 50|01010101010101010101010101010101010101010101010101010101012101010101012101010101010101010101010101010101010101010101010|5E80 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|229","America/Santarem|-04 -03|40 30|01010101|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 NBd0|21e4","America/Santiago|-03 -04|30 40|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|yP0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0|62e5","America/Santo_Domingo|-0430 EST AST|4u 50 40|0101010101212|ksu 1Cou yLu 1RAu wLu 1QMu xzu 1Q0u xXu 1PAu 13jB0 e00|29e5","America/Sao_Paulo|-03 -02|30 20|010101010101010101010101010101010101010101010101010101010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 1C10 Lz0 1Ip0 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|20e6","America/Scoresbysund|-02 -01 +00|20 10 0|0102121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|oXg0 1a00 1cK0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|452","America/Sitka|PST PDT YST AKST AKDT|80 70 90 90 80|0101010101010101010101010101234343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 co0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|90e2","America/St_Johns|NST NDT NDDT|3u 2u 1u|010101010101010101010101010101010101020101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K5u 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14n1 1lb0 14p0 1nW0 11C0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4","America/Swift_Current|MST CST|70 60|01|5E90|16e3","America/Tegucigalpa|CST CDT|60 50|0101010|Gcu0 WL0 1qN0 WL0 GRd0 AL0|11e5","America/Thule|AST ADT|40 30|010101010101010101010101010101010101010101010101010101010101010101010101010101010|PHG0 1cL0 1cN0 1cL0 1fB0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|656","America/Vancouver|PST PDT|80 70|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5","America/Whitehorse|PST PDT MST|80 70 70|01010101010101010101010101010101010101010101010101010101010101010101010101010101012|p7K0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1z90|23e3","America/Yakutat|YST YDT AKST AKDT|90 80 90 80|0101010101010101010101010101023232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|Kb0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cn0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|642","Antarctica/Casey|+08 +11|-80 -b0|010101010101|1ARS0 T90 40P0 KL0 blz0 3m10 1o30 14k0 1kr0 12l0 1o01|10","Antarctica/Davis|+07 +05|-70 -50|01010|1ART0 VB0 3Wn0 KN0|70","Pacific/Port_Moresby|+10|-a0|0||25e4","Antarctica/Macquarie|AEDT AEST|-b0 -a0|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|qg0 1wo0 U00 1wo0 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 3Co0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|1","Antarctica/Mawson|+06 +05|-60 -50|01|1ARU0|60","Pacific/Auckland|NZST NZDT|-c0 -d0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|bKC0 IM0 1C00 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1qM0 14o0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1io0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00|14e5","Antarctica/Palmer|-03 -02 -04|30 20 40|01020202020202020202020202020202020202020202020202020202020202020202020|9Rf0 Db0 jsN0 14N0 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0|40","Antarctica/Rothera|-00 -03|0 30|01|gOo0|130","Asia/Riyadh|+03|-30|0||57e5","Antarctica/Troll|-00 +00 +02|0 0 -20|012121212121212121212121212121212121212121212121212121|1puo0 hd0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|40","Asia/Urumqi|+06|-60|0||32e5","Europe/Berlin|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|oXd0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|41e5","Asia/Almaty|+06 +07 +05|-60 -70 -50|0101010101010101010102010101010101010101010101010|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0|15e5","Asia/Amman|EET EEST +03|-20 -30 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101012|8kK0 KL0 1oN0 11b0 1oN0 11b0 1pd0 1dz0 1cp0 11b0 1op0 11b0 fO10 1db0 1e10 1cL0 1cN0 1cL0 1cN0 1fz0 1pd0 10n0 1ld0 14n0 1hB0 15b0 1ip0 19X0 1cN0 1cL0 1cN0 17b0 1ld0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1So0 y00 1fc0 1dc0 1co0 1dc0 1cM0 1cM0 1cM0 1o00 11A0 1lc0 17c0 1cM0 1cM0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 4bX0 Dd0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 LA0 1C00|25e5","Asia/Anadyr|+13 +14 +12 +11|-d0 -e0 -c0 -b0|010202020202020202023202020202020202020202020202020202020232|rmX0 1db0 2q10 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|13e3","Asia/Aqtau|+05 +06 +04|-50 -60 -40|0101010101010101010201010120202020202020202020|sAj0 2pX0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|15e4","Asia/Aqtobe|+05 +06 +04|-50 -60 -40|01010101010101010102010101010101010101010101010|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0|27e4","Asia/Ashgabat|+05 +06 +04|-50 -60 -40|01010101010101010101020|rn70 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0|41e4","Asia/Atyrau|+05 +06 +04|-50 -60 -40|010101010101010101020101010101010102020202020|sAj0 2pX0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 2sp0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|","Asia/Baghdad|+03 +04|-30 -40|01010101010101010101010101010101010101010101010101010|u190 11b0 1cp0 1dz0 1dd0 1db0 1cN0 1cp0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1de0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0|66e5","Asia/Qatar|+04 +03|-40 -30|01|5QI0|96e4","Asia/Baku|+04 +05 +03|-40 -50 -30|010101010101010101010201010101010101010101010101010101010101010|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cM0 9Je0 1o00 11z0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|27e5","Asia/Bangkok|+07|-70|0||15e6","Asia/Barnaul|+07 +08 +06|-70 -80 -60|01010101010101010101020101010102020202020202020202020202020202020|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 p90 LE0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|","Asia/Beirut|EET EEST|-20 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|61a0 En0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1op0 11b0 dA10 17b0 1iN0 17b0 1iN0 17b0 1iN0 17b0 1vB0 SL0 1mp0 13z0 1iN0 17b0 1iN0 17b0 1jd0 12n0 1a10 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0|22e5","Asia/Bishkek|+06 +07 +05|-60 -70 -50|0101010101010101010102020202020202020202020202020|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2e00 1tX0 17b0 1ip0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1cPu 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0|87e4","Asia/Brunei|+08|-80|0||42e4","Asia/Kolkata|IST|-5u|0||15e6","Asia/Chita|+09 +10 +08|-90 -a0 -80|0101010101010101010102010101010101010101010101010101010101010120|rn30 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3re0|33e4","Asia/Choibalsan|+07 +08 +10 +09|-70 -80 -a0 -90|012323232323232323232323232323232323232323232313131|jsF0 cKn0 1da0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 3Db0 h1f0 1cJ0 1cP0 1cJ0|38e3","Asia/Shanghai|CST CDT|-80 -90|0101010101010|DKG0 Rb0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0|23e6","Asia/Colombo|+0530 +0630 +06|-5u -6u -60|0120|14giu 11zu n3cu|22e5","Asia/Dhaka|+06 +07|-60 -70|010|1A5R0 1i00|16e6","Asia/Damascus|EET EEST +03|-20 -30 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101012|M00 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 Nb0 1AN0 Nb0 bcp0 19X0 1gp0 19X0 3ld0 1xX0 Vd0 1Bz0 Sp0 1vX0 10p0 1dz0 1cN0 1cL0 1db0 1db0 1g10 1an0 1ap0 1db0 1fd0 1db0 1cN0 1db0 1dd0 1db0 1cp0 1dz0 1c10 1dX0 1cN0 1db0 1dd0 1db0 1cN0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1db0 1cN0 1db0 1cN0 19z0 1fB0 1qL0 11B0 1on0 Wp0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0|26e5","Asia/Dili|+09 +08|-90 -80|010|fpr0 Xld0|19e4","Asia/Dubai|+04|-40|0||39e5","Asia/Dushanbe|+06 +07 +05|-60 -70 -50|0101010101010101010102|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2hB0|76e4","Asia/Famagusta|EET EEST +03|-20 -30 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101012010101010101010101010101010|cPa0 1cL0 1qp0 Xz0 19B0 19X0 1fB0 1db0 1cp0 1cL0 1fB0 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1o30 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 15U0 2Ks0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|","Asia/Gaza|IST IDT EET EEST|-20 -30 -20 -30|010101010101010101010101010101023232323232323232323232323232323232323232323232323232323232323232323232|aXa0 Db0 1fB0 Rb0 bXB0 gM0 8Q00 IM0 1wo0 TX0 1HB0 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 M10 C00 17c0 1io0 17c0 1io0 17c0 1o00 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 17c0 1io0 18N0 1bz0 19z0 1gp0 1610 1iL0 11z0 1o10 14o0 1lA1 SKX 1xd1 MKX 1AN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nA0 1210 1qL0 WN0 1qL0 WN0 1qL0 11c0 1on0 11B0 1o00 11A0 1qo0 XA0 1qp0 1cN0 1cL0 17d0 1in0 14p0 1lb0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0|18e5","Asia/Hebron|IST IDT EET EEST|-20 -30 -20 -30|01010101010101010101010101010102323232323232323232323232323232323232323232323232323232323232323232323232|aXa0 Db0 1fB0 Rb0 bXB0 gM0 8Q00 IM0 1wo0 TX0 1HB0 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 M10 C00 17c0 1io0 17c0 1io0 17c0 1o00 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 17c0 1io0 18N0 1bz0 19z0 1gp0 1610 1iL0 12L0 1mN0 14o0 1lc0 Tb0 1xd1 MKX bB0 cn0 1cN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nA0 1210 1qL0 WN0 1qL0 WN0 1qL0 11c0 1on0 11B0 1o00 11A0 1qo0 XA0 1qp0 1cN0 1cL0 17d0 1in0 14p0 1lb0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0|25e4","Asia/Ho_Chi_Minh|+08 +07|-80 -70|01|dfs0|90e5","Asia/Hong_Kong|HKT HKST|-80 -90|01010101010101010|H7u 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1cL0 6fd0 14n0|73e5","Asia/Hovd|+06 +07 +08|-60 -70 -80|01212121212121212121212121212121212121212121212121|jsG0 cKn0 1db0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 kEp0 1cJ0 1cP0 1cJ0|81e3","Asia/Irkutsk|+08 +09 +07|-80 -90 -70|010101010101010101010201010101010101010101010101010101010101010|rn40 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|60e4","Europe/Istanbul|EET EEST +03 +04|-20 -30 -30 -40|01010101010123201010101010101010101010101010101010101010101010101010101010101012|8jz0 11A0 WN0 1qL0 TB0 1tX0 U10 1tz0 11B0 1in0 17d0 z90 cne0 pb0 2Cp0 1800 14o0 1dc0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1a00 1fA0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WO0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 Xc0 1qo0 WM0 1qM0 11A0 1o00 1200 1nA0 11A0 1tA0 U00 15w0|13e6","Asia/Jakarta|WIB|-70|0||31e6","Asia/Jayapura|WIT|-90|0||26e4","Asia/Jerusalem|IST IDT|-20 -30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|aXa0 Db0 1fB0 Rb0 bXB0 gM0 8Q00 IM0 1wo0 TX0 1HB0 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 1hB0 1dX0 1ep0 1aL0 1eN0 17X0 1nf0 11z0 1tB0 19W0 1e10 17b0 1ep0 1gL0 18N0 1fz0 1eN0 17b0 1gq0 1gn0 19d0 1dz0 1c10 17X0 1hB0 1gn0 19d0 1dz0 1c10 17X0 1kp0 1dz0 1c10 1aL0 1eN0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0|81e4","Asia/Kabul|+0430|-4u|0||46e5","Asia/Kamchatka|+12 +13 +11|-c0 -d0 -b0|0101010101010101010102010101010101010101010101010101010101020|rn00 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|18e4","Asia/Karachi|+05 PKT PKST|-50 -50 -60|01212121|2Xv0 1fy00 1cL0 dK10 11b0 1610 1jX0|24e6","Asia/Kathmandu|+0530 +0545|-5u -5J|01|CVuu|12e5","Asia/Khandyga|+09 +10 +08 +11|-90 -a0 -80 -b0|01010101010101010101020101010101010101010101010131313131313131310|rn30 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 qK0 yN0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 17V0 7zD0|66e2","Asia/Krasnoyarsk|+07 +08 +06|-70 -80 -60|010101010101010101010201010101010101010101010101010101010101010|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|10e5","Asia/Kuala_Lumpur|+0730 +08|-7u -80|01|td40|71e5","Asia/Macau|CST CDT|-80 -90|01010101010101010|H7u 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1cL0 6fd0 14n0|57e4","Asia/Magadan|+11 +12 +10|-b0 -c0 -a0|0101010101010101010102010101010101010101010101010101010101010120|rn10 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3Cq0|95e3","Asia/Makassar|WITA|-80|0||15e5","Asia/Manila|PST PDT|-80 -90|010|k0E0 1db0|24e6","Asia/Nicosia|EET EEST|-20 -30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|cPa0 1cL0 1qp0 Xz0 19B0 19X0 1fB0 1db0 1cp0 1cL0 1fB0 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1o30 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|32e4","Asia/Novokuznetsk|+07 +08 +06|-70 -80 -60|0101010101010101010102010101010101010101010101010101010101020|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|55e4","Asia/Novosibirsk|+07 +08 +06|-70 -80 -60|01010101010101010101020101020202020202020202020202020202020202020|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 ml0 Os0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 4eN0|15e5","Asia/Omsk|+06 +07 +05|-60 -70 -50|010101010101010101010201010101010101010101010101010101010101010|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|12e5","Asia/Oral|+05 +06 +04|-50 -60 -40|010101010101010202020202020202020202020202020|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 1cM0 IM0 1EM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|27e4","Asia/Pontianak|WITA WIB|-80 -70|01|HNs0|23e4","Asia/Pyongyang|KST KST|-90 -8u|010|1P4D0 6BA0|29e5","Asia/Qostanay|+05 +06 +04|-50 -60 -40|0101010101010101010201010101010101010101010101|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|","Asia/Qyzylorda|+05 +06|-50 -60|010101010101010101010101010101010101010101010|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 3ao0 1EM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 zQl0|73e4","Asia/Rangoon|+0630|-6u|0||48e5","Asia/Sakhalin|+11 +12 +10|-b0 -c0 -a0|010101010101010101010201010101010202020202020202020202020202020|rn10 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 2pB0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|58e4","Asia/Samarkand|+05 +06|-50 -60|010101010101010101010|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|36e4","Asia/Seoul|KST KDT|-90 -a0|01010|Gf50 11A0 1o00 11A0|23e6","Asia/Srednekolymsk|+11 +12 +10|-b0 -c0 -a0|010101010101010101010201010101010101010101010101010101010101010|rn10 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|35e2","Asia/Taipei|CST CDT|-80 -90|0101010|akg0 1db0 1cN0 1db0 97B0 AL0|74e5","Asia/Tashkent|+06 +07 +05|-60 -70 -50|0101010101010101010102|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0|23e5","Asia/Tbilisi|+04 +05 +03|-40 -50 -30|01010101010101010101020202010101010101010101020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cK0 1cL0 1cN0 1cL0 1cN0 2pz0 1cL0 1fB0 3Nz0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 An0 Os0 WM0|11e5","Asia/Tehran|+0330 +0430 +04 +05|-3u -4u -40 -50|0123201010101010101010101010101010101010101010101010101010101010101010|hyHu 1pc0 120u Rc0 XA0 Wou JX0 1dB0 1en0 pNB0 UL0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 64p0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0|14e6","Asia/Thimphu|+0530 +06|-5u -60|01|HcGu|79e3","Asia/Tokyo|JST|-90|0||38e6","Asia/Tomsk|+07 +08 +06|-70 -80 -60|01010101010101010101020101010101010101010101020202020202020202020|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 co0 1bB0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3Qp0|10e5","Asia/Ulaanbaatar|+07 +08 +09|-70 -80 -90|01212121212121212121212121212121212121212121212121|jsF0 cKn0 1db0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 kEp0 1cJ0 1cP0 1cJ0|12e5","Asia/Ust-Nera|+09 +12 +11 +10|-90 -c0 -b0 -a0|0121212121212121212123212121212121212121212121212121212121212123|rn30 1d90 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 17V0 7zD0|65e2","Asia/Vladivostok|+10 +11 +09|-a0 -b0 -90|010101010101010101010201010101010101010101010101010101010101010|rn20 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|60e4","Asia/Yakutsk|+09 +10 +08|-90 -a0 -80|010101010101010101010201010101010101010101010101010101010101010|rn30 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|28e4","Asia/Yekaterinburg|+05 +06 +04|-50 -60 -40|010101010101010101010201010101010101010101010101010101010101010|rn70 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|14e5","Asia/Yerevan|+04 +05 +03|-40 -50 -30|01010101010101010101020202020101010101010101010101010101010|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 4RX0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|13e5","Atlantic/Azores|-01 +00 WET|10 0 0|0101010101010101010101010101010121010101010101010101010101010101010101010101010101010101010101010101010101010|hAN0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|25e4","Atlantic/Bermuda|AST ADT|40 30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|avi0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|65e3","Atlantic/Canary|WET WEST|0 -10|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|oXc0 1a10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|54e4","Atlantic/Cape_Verde|-02 -01|20 10|01|elE0|50e4","Atlantic/Faroe|WET WEST|0 -10|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|rm10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|49e3","Atlantic/Madeira|WET WEST|0 -10|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hAM0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|27e4","Atlantic/South_Georgia|-02|20|0||30","Atlantic/Stanley|-04 -03 -02|40 30 20|01212101010101010101010101010101010101010101010101010101|wrg0 WL0 1qL0 U10 1tz0 2mN0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1tz0 U10 1tz0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1tz0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qN0 U10 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1wn0 U10 1tz0 U10 1tz0 U10|21e2","Australia/Sydney|AEST AEDT|-a0 -b0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4r40 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 14o0 1o00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 11A0 1o00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|40e5","Australia/Adelaide|ACST ACDT|-9u -au|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4r4u LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 Oo0 1zc0 WM0 1qM0 Rc0 1zc0 U00 1tA0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|11e5","Australia/Brisbane|AEST AEDT|-a0 -b0|010101010|4r40 LA0 H1A0 Oo0 1zc0 Oo0 1zc0 Oo0|20e5","Australia/Broken_Hill|ACST ACDT|-9u -au|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4r4u LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 14o0 1o00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|18e3","Australia/Hobart|AEDT AEST|-b0 -a0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|qg0 1wo0 U00 1wo0 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|21e4","Australia/Darwin|ACST|-9u|0||12e4","Australia/Eucla|+0845 +0945|-8J -9J|0101010101010|bHRf Oo0 l5A0 Oo0 iJA0 G00 zU00 IM0 1qM0 11A0 1o00 11A0|368","Australia/Lord_Howe|AEST +1030 +1130 +11|-a0 -au -bu -b0|01212121213131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313|raC0 1zdu Rb0 1zd0 On0 1zd0 On0 1zd0 On0 1zd0 TXu 1qMu WLu 1tAu WLu 1tAu TXu 1tAu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu 11zu 1o0u 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 11Au 1nXu 1qMu 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 1qMu 11zu 1o0u WLu 1qMu 14nu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1fzu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu|347","Australia/Lindeman|AEST AEDT|-a0 -b0|0101010101010|4r40 LA0 H1A0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0|10","Australia/Melbourne|AEST AEDT|-a0 -b0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4r40 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1qM0 11A0 1tA0 U00 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 11A0 1o00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|39e5","Australia/Perth|AWST AWDT|-80 -90|0101010101010|bHS0 Oo0 l5A0 Oo0 iJA0 G00 zU00 IM0 1qM0 11A0 1o00 11A0|18e5","Europe/Brussels|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|21e5","Pacific/Easter|-06 -07 -05|60 70 50|010101010101010101010101020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202|yP0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 2pA0 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0|30e2","EET|EET EEST|-20 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|","Europe/Dublin|IST GMT|-10 0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4re0 U00 1tA0 U00 1tA0 U00 1tA0 U00 1tA0 WM0 1qM0 WM0 1qM0 WM0 1tA0 U00 1tA0 U00 1tA0 11z0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|12e5","Etc/GMT-1|+01|-10|0||","Pacific/Guadalcanal|+11|-b0|0||11e4","Pacific/Tarawa|+12|-c0|0||29e3","Etc/GMT-13|+13|-d0|0||","Etc/GMT-14|+14|-e0|0||","Etc/GMT-2|+02|-20|0||","Indian/Maldives|+05|-50|0||35e4","Pacific/Palau|+09|-90|0||21e3","Etc/GMT+1|-01|10|0||","Pacific/Tahiti|-10|a0|0||18e4","Pacific/Niue|-11|b0|0||12e2","Etc/GMT+12|-12|c0|0||","Etc/GMT+5|-05|50|0||","Etc/GMT+6|-06|60|0||","Etc/GMT+7|-07|70|0||","Etc/GMT+8|-08|80|0||","Pacific/Gambier|-09|90|0||125","Etc/UTC|UTC|0|0||","Europe/Andorra|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|B7d0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|79e3","Europe/Astrakhan|+04 +05 +03|-40 -50 -30|0101010101010101020202020202020202020202020202020202020202020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|10e5","Europe/Athens|EET EEST|-20 -30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|cOK0 1vc0 SO0 1cM0 1a00 1ao0 1fc0 1a10 1fG0 1cg0 1dX0 1bX0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|35e5","Europe/London|BST GMT|-10 0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4re0 U00 1tA0 U00 1tA0 U00 1tA0 U00 1tA0 WM0 1qM0 WM0 1qM0 WM0 1tA0 U00 1tA0 U00 1tA0 11z0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|10e6","Europe/Belgrade|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|wdd0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|12e5","Europe/Prague|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|muN0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|13e5","Europe/Bucharest|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|mRa0 On0 1fA0 1a10 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cK0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|19e5","Europe/Budapest|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|oXb0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cO0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|17e5","Europe/Zurich|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|rm10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|38e4","Europe/Chisinau|MSK MSD EEST EET|-30 -40 -30 -20|010101010101010101012323232323232323232323232323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 gL0 WO0 1cM0 1cM0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1nX0 11D0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|67e4","Europe/Gibraltar|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|tLB0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|30e3","Europe/Helsinki|EET EEST|-20 -30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|rm00 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|12e5","Europe/Kaliningrad|MSK MSD EEST EET +03|-30 -40 -30 -20 -30|010101010101010102323232323232323232323232323232323232323232343|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|44e4","Europe/Kiev|MSK MSD EEST EET|-30 -40 -30 -20|0101010101010101010123232323232323232323232323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 Db0 3220 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o10 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|34e5","Europe/Kirov|+04 +05 MSD MSK MSK|-40 -50 -40 -30 -40|01010101010101010232302323232323232323232323232323232323232343|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 2pz0 1cN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|48e4","Europe/Lisbon|CET WET WEST CEST|-10 0 -10 -20|01212121212121212121212121212121203030302121212121212121212121212121212121212121212121212121212121212121212121|go00 1cM0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|27e5","Europe/Madrid|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|apy0 1a10 1fz0 1a10 19X0 1cN0 1fz0 1a10 1fC0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|62e5","Europe/Malta|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|XX0 LA0 1zc0 Oo0 1C00 Oo0 1co0 1cM0 1lA0 Xc0 1qq0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1iN0 19z0 1fB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|42e4","Europe/Minsk|MSK MSD EEST EET +03|-30 -40 -30 -20 -30|010101010101010101023232323232323232323232323232323232323234|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 3Fc0 1cN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0|19e5","Europe/Paris|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|fbc0 1cL0 1fC0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|11e6","Europe/Moscow|MSK MSD EEST EET MSK|-30 -40 -30 -20 -40|0101010101010101010102301010101010101010101010101010101010101040|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|16e6","Europe/Riga|MSK MSD EEST EET|-30 -40 -30 -20|010101010101010102323232323232323232323232323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 1o00 11A0 1o00 11A0 1qM0 3oo0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|64e4","Europe/Rome|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|XX0 LA0 1zc0 Oo0 1C00 Oo0 1C00 LA0 1zc0 Oo0 1C00 LA0 1C00 LA0 1zc0 Oo0 1C00 Oo0 1zc0 Oo0 1fC0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|39e5","Europe/Samara|+04 +05 +03|-40 -50 -30|01010101010101010202010101010101010101010101010101010101020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 2y10 14m0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|12e5","Europe/Saratov|+04 +05 +03|-40 -50 -30|0101010101010102020202020202020202020202020202020202020202020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1cM0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 5810|","Europe/Simferopol|MSK MSD EET EEST MSK|-30 -40 -20 -30 -40|0101010101010101010232323101010323232323232323232323232323232323240|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Q00 4eN0 1cM0 1cM0 1cM0 1cM0 dV0 WO0 1cM0 1cM0 1fy0 1o30 11B0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11z0 1nW0|33e4","Europe/Sofia|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|muJ0 1dd0 1fb0 1ap0 1fb0 1a20 1fy0 1a30 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|12e5","Europe/Tallinn|MSK MSD EEST EET|-30 -40 -30 -20|0101010101010101023232323232323232323232323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o10 11A0 1qM0 5QM0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|41e4","Europe/Tirane|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|axz0 10n0 1op0 11z0 1pd0 11z0 1qN0 WL0 1qp0 Xb0 1qp0 Xb0 1qp0 11z0 1lB0 11z0 1qN0 11z0 1iN0 16n0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|42e4","Europe/Ulyanovsk|+04 +05 +03 +02|-40 -50 -30 -20|010101010101010102023202020202020202020202020202020202020202020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|13e5","Europe/Vienna|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|oXb0 19X0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|18e5","Europe/Vilnius|MSK MSD EEST EET CEST CET|-30 -40 -30 -20 -20 -10|01010101010101010232323232323232323454323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11B0 1o00 11A0 1qM0 8io0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|54e4","Europe/Volgograd|+04 +05 MSD MSK MSK|-40 -50 -40 -30 -40|0101010101010102323230232323232323232323232323232323232323234303|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1cM0 1fA0 1cM0 2pz0 1cN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 9Jd0 5gn0|10e5","Europe/Warsaw|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDA0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|17e5","Pacific/Honolulu|HST|a0|0||37e4","Indian/Chagos|+05 +06|-50 -60|01|13ij0|30e2","Indian/Mauritius|+04 +05|-40 -50|01010|v5U0 14L0 12kr0 11z0|15e4","Pacific/Kwajalein|-12 +12|c0 -c0|01|Vxo0|14e3","MET|MET MEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|","Pacific/Chatham|+1245 +1345|-cJ -dJ|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|bKC0 IM0 1C00 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1qM0 14o0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1io0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00|600","Pacific/Apia|-11 -10 +14 +13|b0 a0 -e0 -d0|010123232323232323232323|1Dbn0 1ff0 1a00 CI0 AQ0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0|37e3","Pacific/Bougainville|+10 +11|-a0 -b0|01|1NwE0|18e4","Pacific/Efate|+11 +12|-b0 -c0|01010101010101010101010|9EA0 Dc0 n610 1cL0 1cN0 1cL0 1fB0 19X0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 Lz0 1Nd0 An0|66e3","Pacific/Enderbury|-12 -11 +13|c0 b0 -d0|012|nIc0 B7X0|1","Pacific/Fakaofo|-11 +13|b0 -d0|01|1Gfn0|483","Pacific/Fiji|+12 +13|-c0 -d0|01010101010101010101010101010|1ace0 LA0 1EM0 IM0 nJc0 LA0 1o00 Rc0 1wo0 Ao0 1Nc0 Ao0 1Q00 xz0 1SN0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 20o0 pc0 2hc0 bc0|88e4","Pacific/Galapagos|-05 -06|50 60|0101|CVF0 gNd0 rz0|25e3","Pacific/Guam|GST GDT ChST|-a0 -b0 -a0|010101010102|JQ0 Rb0 1wp0 Rb0 5xd0 rX0 5sN0 zb1 1C0X On0 ULb0|17e4","Pacific/Kiritimati|-1040 -10 +14|aE a0 -e0|012|nIaE B7Xk|51e2","Pacific/Kosrae|+12 +11|-c0 -b0|01|1aAA0|66e2","Pacific/Marquesas|-0930|9u|0||86e2","Pacific/Pago_Pago|SST|b0|0||37e2","Pacific/Nauru|+1130 +12|-bu -c0|01|maCu|10e3","Pacific/Norfolk|+1130 +1230 +11 +12|-bu -cu -b0 -c0|010232323232323232323232323|bHOu Oo0 1COo0 9Jcu 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|25e4","Pacific/Noumea|+11 +12|-b0 -c0|0101010|jhp0 xX0 1PB0 yn0 HeP0 Ao0|98e3","Pacific/Pitcairn|-0830 -08|8u 80|01|18Vku|56","Pacific/Rarotonga|-1030 -0930 -10|au 9u a0|012121212121212121212121212|lyWu IL0 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu Onu|13e3","Pacific/Tongatapu|+13 +14|-d0 -e0|010101010|1csd0 15A0 1wo0 xz0 1Q10 xz0 zWN0 s00|75e3","WET|WET WEST|0 -10|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|"],links:["Africa/Abidjan|Africa/Accra","Africa/Abidjan|Africa/Bamako","Africa/Abidjan|Africa/Banjul","Africa/Abidjan|Africa/Conakry","Africa/Abidjan|Africa/Dakar","Africa/Abidjan|Africa/Freetown","Africa/Abidjan|Africa/Lome","Africa/Abidjan|Africa/Nouakchott","Africa/Abidjan|Africa/Ouagadougou","Africa/Abidjan|Africa/Timbuktu","Africa/Abidjan|Atlantic/Reykjavik","Africa/Abidjan|Atlantic/St_Helena","Africa/Abidjan|Etc/GMT","Africa/Abidjan|Etc/GMT+0","Africa/Abidjan|Etc/GMT-0","Africa/Abidjan|Etc/GMT0","Africa/Abidjan|Etc/Greenwich","Africa/Abidjan|GMT","Africa/Abidjan|GMT+0","Africa/Abidjan|GMT-0","Africa/Abidjan|GMT0","Africa/Abidjan|Greenwich","Africa/Abidjan|Iceland","Africa/Cairo|Egypt","Africa/Johannesburg|Africa/Maseru","Africa/Johannesburg|Africa/Mbabane","Africa/Lagos|Africa/Bangui","Africa/Lagos|Africa/Brazzaville","Africa/Lagos|Africa/Douala","Africa/Lagos|Africa/Kinshasa","Africa/Lagos|Africa/Libreville","Africa/Lagos|Africa/Luanda","Africa/Lagos|Africa/Malabo","Africa/Lagos|Africa/Niamey","Africa/Lagos|Africa/Porto-Novo","Africa/Maputo|Africa/Blantyre","Africa/Maputo|Africa/Bujumbura","Africa/Maputo|Africa/Gaborone","Africa/Maputo|Africa/Harare","Africa/Maputo|Africa/Kigali","Africa/Maputo|Africa/Lubumbashi","Africa/Maputo|Africa/Lusaka","Africa/Nairobi|Africa/Addis_Ababa","Africa/Nairobi|Africa/Asmara","Africa/Nairobi|Africa/Asmera","Africa/Nairobi|Africa/Dar_es_Salaam","Africa/Nairobi|Africa/Djibouti","Africa/Nairobi|Africa/Kampala","Africa/Nairobi|Africa/Mogadishu","Africa/Nairobi|Indian/Antananarivo","Africa/Nairobi|Indian/Comoro","Africa/Nairobi|Indian/Mayotte","Africa/Tripoli|Libya","America/Adak|America/Atka","America/Adak|US/Aleutian","America/Anchorage|US/Alaska","America/Argentina/Buenos_Aires|America/Buenos_Aires","America/Argentina/Catamarca|America/Argentina/ComodRivadavia","America/Argentina/Catamarca|America/Catamarca","America/Argentina/Cordoba|America/Cordoba","America/Argentina/Cordoba|America/Rosario","America/Argentina/Jujuy|America/Jujuy","America/Argentina/Mendoza|America/Mendoza","America/Cayenne|Etc/GMT+3","America/Chicago|CST6CDT","America/Chicago|US/Central","America/Denver|America/Shiprock","America/Denver|MST7MDT","America/Denver|Navajo","America/Denver|US/Mountain","America/Detroit|US/Michigan","America/Edmonton|America/Yellowknife","America/Edmonton|Canada/Mountain","America/Fort_Wayne|America/Indiana/Indianapolis","America/Fort_Wayne|America/Indianapolis","America/Fort_Wayne|US/East-Indiana","America/Godthab|America/Nuuk","America/Halifax|Canada/Atlantic","America/Havana|Cuba","America/Indiana/Knox|America/Knox_IN","America/Indiana/Knox|US/Indiana-Starke","America/Iqaluit|America/Pangnirtung","America/Jamaica|Jamaica","America/Kentucky/Louisville|America/Louisville","America/La_Paz|Etc/GMT+4","America/Los_Angeles|PST8PDT","America/Los_Angeles|US/Pacific","America/Manaus|Brazil/West","America/Mazatlan|Mexico/BajaSur","America/Mexico_City|Mexico/General","America/New_York|EST5EDT","America/New_York|US/Eastern","America/Noronha|Brazil/DeNoronha","America/Panama|America/Atikokan","America/Panama|America/Cayman","America/Panama|America/Coral_Harbour","America/Panama|EST","America/Phoenix|America/Creston","America/Phoenix|MST","America/Phoenix|US/Arizona","America/Puerto_Rico|America/Anguilla","America/Puerto_Rico|America/Antigua","America/Puerto_Rico|America/Aruba","America/Puerto_Rico|America/Blanc-Sablon","America/Puerto_Rico|America/Curacao","America/Puerto_Rico|America/Dominica","America/Puerto_Rico|America/Grenada","America/Puerto_Rico|America/Guadeloupe","America/Puerto_Rico|America/Kralendijk","America/Puerto_Rico|America/Lower_Princes","America/Puerto_Rico|America/Marigot","America/Puerto_Rico|America/Montserrat","America/Puerto_Rico|America/Port_of_Spain","America/Puerto_Rico|America/St_Barthelemy","America/Puerto_Rico|America/St_Kitts","America/Puerto_Rico|America/St_Lucia","America/Puerto_Rico|America/St_Thomas","America/Puerto_Rico|America/St_Vincent","America/Puerto_Rico|America/Tortola","America/Puerto_Rico|America/Virgin","America/Regina|Canada/Saskatchewan","America/Rio_Branco|America/Porto_Acre","America/Rio_Branco|Brazil/Acre","America/Santiago|Chile/Continental","America/Sao_Paulo|Brazil/East","America/St_Johns|Canada/Newfoundland","America/Tijuana|America/Ensenada","America/Tijuana|America/Santa_Isabel","America/Tijuana|Mexico/BajaNorte","America/Toronto|America/Montreal","America/Toronto|America/Nassau","America/Toronto|America/Nipigon","America/Toronto|America/Thunder_Bay","America/Toronto|Canada/Eastern","America/Vancouver|Canada/Pacific","America/Whitehorse|Canada/Yukon","America/Winnipeg|America/Rainy_River","America/Winnipeg|Canada/Central","Asia/Ashgabat|Asia/Ashkhabad","Asia/Bangkok|Asia/Phnom_Penh","Asia/Bangkok|Asia/Vientiane","Asia/Bangkok|Etc/GMT-7","Asia/Bangkok|Indian/Christmas","Asia/Brunei|Asia/Kuching","Asia/Brunei|Etc/GMT-8","Asia/Dhaka|Asia/Dacca","Asia/Dubai|Asia/Muscat","Asia/Dubai|Etc/GMT-4","Asia/Dubai|Indian/Mahe","Asia/Dubai|Indian/Reunion","Asia/Ho_Chi_Minh|Asia/Saigon","Asia/Hong_Kong|Hongkong","Asia/Jerusalem|Asia/Tel_Aviv","Asia/Jerusalem|Israel","Asia/Kathmandu|Asia/Katmandu","Asia/Kolkata|Asia/Calcutta","Asia/Kuala_Lumpur|Asia/Singapore","Asia/Kuala_Lumpur|Singapore","Asia/Macau|Asia/Macao","Asia/Makassar|Asia/Ujung_Pandang","Asia/Nicosia|Europe/Nicosia","Asia/Qatar|Asia/Bahrain","Asia/Rangoon|Asia/Yangon","Asia/Rangoon|Indian/Cocos","Asia/Riyadh|Antarctica/Syowa","Asia/Riyadh|Asia/Aden","Asia/Riyadh|Asia/Kuwait","Asia/Riyadh|Etc/GMT-3","Asia/Seoul|ROK","Asia/Shanghai|Asia/Chongqing","Asia/Shanghai|Asia/Chungking","Asia/Shanghai|Asia/Harbin","Asia/Shanghai|PRC","Asia/Taipei|ROC","Asia/Tehran|Iran","Asia/Thimphu|Asia/Thimbu","Asia/Tokyo|Japan","Asia/Ulaanbaatar|Asia/Ulan_Bator","Asia/Urumqi|Antarctica/Vostok","Asia/Urumqi|Asia/Kashgar","Asia/Urumqi|Etc/GMT-6","Atlantic/Faroe|Atlantic/Faeroe","Atlantic/South_Georgia|Etc/GMT+2","Australia/Adelaide|Australia/South","Australia/Brisbane|Australia/Queensland","Australia/Broken_Hill|Australia/Yancowinna","Australia/Darwin|Australia/North","Australia/Hobart|Australia/Currie","Australia/Hobart|Australia/Tasmania","Australia/Lord_Howe|Australia/LHI","Australia/Melbourne|Australia/Victoria","Australia/Perth|Australia/West","Australia/Sydney|Australia/ACT","Australia/Sydney|Australia/Canberra","Australia/Sydney|Australia/NSW","Etc/UTC|Etc/UCT","Etc/UTC|Etc/Universal","Etc/UTC|Etc/Zulu","Etc/UTC|UCT","Etc/UTC|UTC","Etc/UTC|Universal","Etc/UTC|Zulu","Europe/Belgrade|Europe/Ljubljana","Europe/Belgrade|Europe/Podgorica","Europe/Belgrade|Europe/Sarajevo","Europe/Belgrade|Europe/Skopje","Europe/Belgrade|Europe/Zagreb","Europe/Berlin|Arctic/Longyearbyen","Europe/Berlin|Atlantic/Jan_Mayen","Europe/Berlin|Europe/Copenhagen","Europe/Berlin|Europe/Oslo","Europe/Berlin|Europe/Stockholm","Europe/Brussels|CET","Europe/Brussels|Europe/Amsterdam","Europe/Brussels|Europe/Luxembourg","Europe/Chisinau|Europe/Tiraspol","Europe/Dublin|Eire","Europe/Helsinki|Europe/Mariehamn","Europe/Istanbul|Asia/Istanbul","Europe/Istanbul|Turkey","Europe/Kiev|Europe/Kyiv","Europe/Kiev|Europe/Uzhgorod","Europe/Kiev|Europe/Zaporozhye","Europe/Lisbon|Portugal","Europe/London|Europe/Belfast","Europe/London|Europe/Guernsey","Europe/London|Europe/Isle_of_Man","Europe/London|Europe/Jersey","Europe/London|GB","Europe/London|GB-Eire","Europe/Moscow|W-SU","Europe/Paris|Europe/Monaco","Europe/Prague|Europe/Bratislava","Europe/Rome|Europe/San_Marino","Europe/Rome|Europe/Vatican","Europe/Warsaw|Poland","Europe/Zurich|Europe/Busingen","Europe/Zurich|Europe/Vaduz","Indian/Maldives|Etc/GMT-5","Indian/Maldives|Indian/Kerguelen","Pacific/Auckland|Antarctica/McMurdo","Pacific/Auckland|Antarctica/South_Pole","Pacific/Auckland|NZ","Pacific/Chatham|NZ-CHAT","Pacific/Easter|Chile/EasterIsland","Pacific/Enderbury|Pacific/Kanton","Pacific/Gambier|Etc/GMT+9","Pacific/Guadalcanal|Etc/GMT-11","Pacific/Guadalcanal|Pacific/Pohnpei","Pacific/Guadalcanal|Pacific/Ponape","Pacific/Guam|Pacific/Saipan","Pacific/Honolulu|HST","Pacific/Honolulu|Pacific/Johnston","Pacific/Honolulu|US/Hawaii","Pacific/Kwajalein|Kwajalein","Pacific/Niue|Etc/GMT+11","Pacific/Pago_Pago|Pacific/Midway","Pacific/Pago_Pago|Pacific/Samoa","Pacific/Pago_Pago|US/Samoa","Pacific/Palau|Etc/GMT-9","Pacific/Port_Moresby|Antarctica/DumontDUrville","Pacific/Port_Moresby|Etc/GMT-10","Pacific/Port_Moresby|Pacific/Chuuk","Pacific/Port_Moresby|Pacific/Truk","Pacific/Port_Moresby|Pacific/Yap","Pacific/Tahiti|Etc/GMT+10","Pacific/Tarawa|Etc/GMT-12","Pacific/Tarawa|Pacific/Funafuti","Pacific/Tarawa|Pacific/Majuro","Pacific/Tarawa|Pacific/Wake","Pacific/Tarawa|Pacific/Wallis"],countries:["AD|Europe/Andorra","AE|Asia/Dubai","AF|Asia/Kabul","AG|America/Puerto_Rico America/Antigua","AI|America/Puerto_Rico America/Anguilla","AL|Europe/Tirane","AM|Asia/Yerevan","AO|Africa/Lagos Africa/Luanda","AQ|Antarctica/Casey Antarctica/Davis Antarctica/Mawson Antarctica/Palmer Antarctica/Rothera Antarctica/Troll Asia/Urumqi Pacific/Auckland Pacific/Port_Moresby Asia/Riyadh Antarctica/McMurdo Antarctica/DumontDUrville Antarctica/Syowa Antarctica/Vostok","AR|America/Argentina/Buenos_Aires America/Argentina/Cordoba America/Argentina/Salta America/Argentina/Jujuy America/Argentina/Tucuman America/Argentina/Catamarca America/Argentina/La_Rioja America/Argentina/San_Juan America/Argentina/Mendoza America/Argentina/San_Luis America/Argentina/Rio_Gallegos America/Argentina/Ushuaia","AS|Pacific/Pago_Pago","AT|Europe/Vienna","AU|Australia/Lord_Howe Antarctica/Macquarie Australia/Hobart Australia/Melbourne Australia/Sydney Australia/Broken_Hill Australia/Brisbane Australia/Lindeman Australia/Adelaide Australia/Darwin Australia/Perth Australia/Eucla","AW|America/Puerto_Rico America/Aruba","AX|Europe/Helsinki Europe/Mariehamn","AZ|Asia/Baku","BA|Europe/Belgrade Europe/Sarajevo","BB|America/Barbados","BD|Asia/Dhaka","BE|Europe/Brussels","BF|Africa/Abidjan Africa/Ouagadougou","BG|Europe/Sofia","BH|Asia/Qatar Asia/Bahrain","BI|Africa/Maputo Africa/Bujumbura","BJ|Africa/Lagos Africa/Porto-Novo","BL|America/Puerto_Rico America/St_Barthelemy","BM|Atlantic/Bermuda","BN|Asia/Kuching Asia/Brunei","BO|America/La_Paz","BQ|America/Puerto_Rico America/Kralendijk","BR|America/Noronha America/Belem America/Fortaleza America/Recife America/Araguaina America/Maceio America/Bahia America/Sao_Paulo America/Campo_Grande America/Cuiaba America/Santarem America/Porto_Velho America/Boa_Vista America/Manaus America/Eirunepe America/Rio_Branco","BS|America/Toronto America/Nassau","BT|Asia/Thimphu","BW|Africa/Maputo Africa/Gaborone","BY|Europe/Minsk","BZ|America/Belize","CA|America/St_Johns America/Halifax America/Glace_Bay America/Moncton America/Goose_Bay America/Toronto America/Iqaluit America/Winnipeg America/Resolute America/Rankin_Inlet America/Regina America/Swift_Current America/Edmonton America/Cambridge_Bay America/Inuvik America/Dawson_Creek America/Fort_Nelson America/Whitehorse America/Dawson America/Vancouver America/Panama America/Puerto_Rico America/Phoenix America/Blanc-Sablon America/Atikokan America/Creston","CC|Asia/Yangon Indian/Cocos","CD|Africa/Maputo Africa/Lagos Africa/Kinshasa Africa/Lubumbashi","CF|Africa/Lagos Africa/Bangui","CG|Africa/Lagos Africa/Brazzaville","CH|Europe/Zurich","CI|Africa/Abidjan","CK|Pacific/Rarotonga","CL|America/Santiago America/Punta_Arenas Pacific/Easter","CM|Africa/Lagos Africa/Douala","CN|Asia/Shanghai Asia/Urumqi","CO|America/Bogota","CR|America/Costa_Rica","CU|America/Havana","CV|Atlantic/Cape_Verde","CW|America/Puerto_Rico America/Curacao","CX|Asia/Bangkok Indian/Christmas","CY|Asia/Nicosia Asia/Famagusta","CZ|Europe/Prague","DE|Europe/Zurich Europe/Berlin Europe/Busingen","DJ|Africa/Nairobi Africa/Djibouti","DK|Europe/Berlin Europe/Copenhagen","DM|America/Puerto_Rico America/Dominica","DO|America/Santo_Domingo","DZ|Africa/Algiers","EC|America/Guayaquil Pacific/Galapagos","EE|Europe/Tallinn","EG|Africa/Cairo","EH|Africa/El_Aaiun","ER|Africa/Nairobi Africa/Asmara","ES|Europe/Madrid Africa/Ceuta Atlantic/Canary","ET|Africa/Nairobi Africa/Addis_Ababa","FI|Europe/Helsinki","FJ|Pacific/Fiji","FK|Atlantic/Stanley","FM|Pacific/Kosrae Pacific/Port_Moresby Pacific/Guadalcanal Pacific/Chuuk Pacific/Pohnpei","FO|Atlantic/Faroe","FR|Europe/Paris","GA|Africa/Lagos Africa/Libreville","GB|Europe/London","GD|America/Puerto_Rico America/Grenada","GE|Asia/Tbilisi","GF|America/Cayenne","GG|Europe/London Europe/Guernsey","GH|Africa/Abidjan Africa/Accra","GI|Europe/Gibraltar","GL|America/Nuuk America/Danmarkshavn America/Scoresbysund America/Thule","GM|Africa/Abidjan Africa/Banjul","GN|Africa/Abidjan Africa/Conakry","GP|America/Puerto_Rico America/Guadeloupe","GQ|Africa/Lagos Africa/Malabo","GR|Europe/Athens","GS|Atlantic/South_Georgia","GT|America/Guatemala","GU|Pacific/Guam","GW|Africa/Bissau","GY|America/Guyana","HK|Asia/Hong_Kong","HN|America/Tegucigalpa","HR|Europe/Belgrade Europe/Zagreb","HT|America/Port-au-Prince","HU|Europe/Budapest","ID|Asia/Jakarta Asia/Pontianak Asia/Makassar Asia/Jayapura","IE|Europe/Dublin","IL|Asia/Jerusalem","IM|Europe/London Europe/Isle_of_Man","IN|Asia/Kolkata","IO|Indian/Chagos","IQ|Asia/Baghdad","IR|Asia/Tehran","IS|Africa/Abidjan Atlantic/Reykjavik","IT|Europe/Rome","JE|Europe/London Europe/Jersey","JM|America/Jamaica","JO|Asia/Amman","JP|Asia/Tokyo","KE|Africa/Nairobi","KG|Asia/Bishkek","KH|Asia/Bangkok Asia/Phnom_Penh","KI|Pacific/Tarawa Pacific/Kanton Pacific/Kiritimati","KM|Africa/Nairobi Indian/Comoro","KN|America/Puerto_Rico America/St_Kitts","KP|Asia/Pyongyang","KR|Asia/Seoul","KW|Asia/Riyadh Asia/Kuwait","KY|America/Panama America/Cayman","KZ|Asia/Almaty Asia/Qyzylorda Asia/Qostanay Asia/Aqtobe Asia/Aqtau Asia/Atyrau Asia/Oral","LA|Asia/Bangkok Asia/Vientiane","LB|Asia/Beirut","LC|America/Puerto_Rico America/St_Lucia","LI|Europe/Zurich Europe/Vaduz","LK|Asia/Colombo","LR|Africa/Monrovia","LS|Africa/Johannesburg Africa/Maseru","LT|Europe/Vilnius","LU|Europe/Brussels Europe/Luxembourg","LV|Europe/Riga","LY|Africa/Tripoli","MA|Africa/Casablanca","MC|Europe/Paris Europe/Monaco","MD|Europe/Chisinau","ME|Europe/Belgrade Europe/Podgorica","MF|America/Puerto_Rico America/Marigot","MG|Africa/Nairobi Indian/Antananarivo","MH|Pacific/Tarawa Pacific/Kwajalein Pacific/Majuro","MK|Europe/Belgrade Europe/Skopje","ML|Africa/Abidjan Africa/Bamako","MM|Asia/Yangon","MN|Asia/Ulaanbaatar Asia/Hovd Asia/Choibalsan","MO|Asia/Macau","MP|Pacific/Guam Pacific/Saipan","MQ|America/Martinique","MR|Africa/Abidjan Africa/Nouakchott","MS|America/Puerto_Rico America/Montserrat","MT|Europe/Malta","MU|Indian/Mauritius","MV|Indian/Maldives","MW|Africa/Maputo Africa/Blantyre","MX|America/Mexico_City America/Cancun America/Merida America/Monterrey America/Matamoros America/Chihuahua America/Ciudad_Juarez America/Ojinaga America/Mazatlan America/Bahia_Banderas America/Hermosillo America/Tijuana","MY|Asia/Kuching Asia/Singapore Asia/Kuala_Lumpur","MZ|Africa/Maputo","NA|Africa/Windhoek","NC|Pacific/Noumea","NE|Africa/Lagos Africa/Niamey","NF|Pacific/Norfolk","NG|Africa/Lagos","NI|America/Managua","NL|Europe/Brussels Europe/Amsterdam","NO|Europe/Berlin Europe/Oslo","NP|Asia/Kathmandu","NR|Pacific/Nauru","NU|Pacific/Niue","NZ|Pacific/Auckland Pacific/Chatham","OM|Asia/Dubai Asia/Muscat","PA|America/Panama","PE|America/Lima","PF|Pacific/Tahiti Pacific/Marquesas Pacific/Gambier","PG|Pacific/Port_Moresby Pacific/Bougainville","PH|Asia/Manila","PK|Asia/Karachi","PL|Europe/Warsaw","PM|America/Miquelon","PN|Pacific/Pitcairn","PR|America/Puerto_Rico","PS|Asia/Gaza Asia/Hebron","PT|Europe/Lisbon Atlantic/Madeira Atlantic/Azores","PW|Pacific/Palau","PY|America/Asuncion","QA|Asia/Qatar","RE|Asia/Dubai Indian/Reunion","RO|Europe/Bucharest","RS|Europe/Belgrade","RU|Europe/Kaliningrad Europe/Moscow Europe/Simferopol Europe/Kirov Europe/Volgograd Europe/Astrakhan Europe/Saratov Europe/Ulyanovsk Europe/Samara Asia/Yekaterinburg Asia/Omsk Asia/Novosibirsk Asia/Barnaul Asia/Tomsk Asia/Novokuznetsk Asia/Krasnoyarsk Asia/Irkutsk Asia/Chita Asia/Yakutsk Asia/Khandyga Asia/Vladivostok Asia/Ust-Nera Asia/Magadan Asia/Sakhalin Asia/Srednekolymsk Asia/Kamchatka Asia/Anadyr","RW|Africa/Maputo Africa/Kigali","SA|Asia/Riyadh","SB|Pacific/Guadalcanal","SC|Asia/Dubai Indian/Mahe","SD|Africa/Khartoum","SE|Europe/Berlin Europe/Stockholm","SG|Asia/Singapore","SH|Africa/Abidjan Atlantic/St_Helena","SI|Europe/Belgrade Europe/Ljubljana","SJ|Europe/Berlin Arctic/Longyearbyen","SK|Europe/Prague Europe/Bratislava","SL|Africa/Abidjan Africa/Freetown","SM|Europe/Rome Europe/San_Marino","SN|Africa/Abidjan Africa/Dakar","SO|Africa/Nairobi Africa/Mogadishu","SR|America/Paramaribo","SS|Africa/Juba","ST|Africa/Sao_Tome","SV|America/El_Salvador","SX|America/Puerto_Rico America/Lower_Princes","SY|Asia/Damascus","SZ|Africa/Johannesburg Africa/Mbabane","TC|America/Grand_Turk","TD|Africa/Ndjamena","TF|Asia/Dubai Indian/Maldives Indian/Kerguelen","TG|Africa/Abidjan Africa/Lome","TH|Asia/Bangkok","TJ|Asia/Dushanbe","TK|Pacific/Fakaofo","TL|Asia/Dili","TM|Asia/Ashgabat","TN|Africa/Tunis","TO|Pacific/Tongatapu","TR|Europe/Istanbul","TT|America/Puerto_Rico America/Port_of_Spain","TV|Pacific/Tarawa Pacific/Funafuti","TW|Asia/Taipei","TZ|Africa/Nairobi Africa/Dar_es_Salaam","UA|Europe/Simferopol Europe/Kyiv","UG|Africa/Nairobi Africa/Kampala","UM|Pacific/Pago_Pago Pacific/Tarawa Pacific/Midway Pacific/Wake","US|America/New_York America/Detroit America/Kentucky/Louisville America/Kentucky/Monticello America/Indiana/Indianapolis America/Indiana/Vincennes America/Indiana/Winamac America/Indiana/Marengo America/Indiana/Petersburg America/Indiana/Vevay America/Chicago America/Indiana/Tell_City America/Indiana/Knox America/Menominee America/North_Dakota/Center America/North_Dakota/New_Salem America/North_Dakota/Beulah America/Denver America/Boise America/Phoenix America/Los_Angeles America/Anchorage America/Juneau America/Sitka America/Metlakatla America/Yakutat America/Nome America/Adak Pacific/Honolulu","UY|America/Montevideo","UZ|Asia/Samarkand Asia/Tashkent","VA|Europe/Rome Europe/Vatican","VC|America/Puerto_Rico America/St_Vincent","VE|America/Caracas","VG|America/Puerto_Rico America/Tortola","VI|America/Puerto_Rico America/St_Thomas","VN|Asia/Bangkok Asia/Ho_Chi_Minh","VU|Pacific/Efate","WF|Pacific/Tarawa Pacific/Wallis","WS|Pacific/Apia","YE|Asia/Riyadh Asia/Aden","YT|Africa/Nairobi Indian/Mayotte","ZA|Africa/Johannesburg","ZM|Africa/Maputo Africa/Lusaka","ZW|Africa/Maputo Africa/Harare"]}),M})});var t0=F((z0,J)=>{(function(M,n){"use strict";typeof J=="object"&&J.exports?J.exports=n(a0()):typeof define=="function"&&define.amd?define(["moment"],n):n(M.moment)})(z0,function(M){"use strict";if(!M.tz)throw new Error("moment-timezone-utils.js must be loaded after moment-timezone.js");var n="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX",e=1e-6;function q(A,z){for(var r=".",t="",p;z>0;)z-=1,A*=60,p=Math.floor(A+e),r+=n[p],A-=p,p&&(t+=r,r="");return t}function u(A,z){for(var r="",t=Math.abs(A),p=Math.floor(t),O=q(t-p,Math.min(~~z,10));p>0;)r=n[p%60]+r,p=Math.floor(p/60);return A<0&&(r="-"+r),r&&O?r+O:!O&&r==="-"?"0":r||O||"0"}function W(A){var z=[],r=0,t;for(t=0;t<A.length-1;t++)z[t]=u(Math.round((A[t]-r)/1e3)/60,1),r=A[t];return z.join(" ")}function E(A){var z=0,r=[],t=[],p=[],O={},f,N;for(f=0;f<A.abbrs.length;f++)N=A.abbrs[f]+"|"+A.offsets[f],O[N]===void 0&&(O[N]=z,r[z]=A.abbrs[f],t[z]=u(Math.round(A.offsets[f]*60)/60,1),z++),p[f]=u(O[N],0);return r.join(" ")+"|"+t.join(" ")+"|"+p.join("")}function I(A){if(!A)return"";if(A<1e3)return A;var z=String(A|0).length-2,r=Math.round(A/Math.pow(10,z));return r+"e"+z}function Y(A){return A?A.join(" "):""}function _(A){if(!A.name)throw new Error("Missing name");if(!A.abbrs)throw new Error("Missing abbrs");if(!A.untils)throw new Error("Missing untils");if(!A.offsets)throw new Error("Missing offsets");if(A.offsets.length!==A.untils.length||A.offsets.length!==A.abbrs.length)throw new Error("Mismatched array lengths")}function w(A){return _(A),[A.name,E(A),W(A.untils),I(A.population)].join("|")}function K(A){return[A.name,A.zones.join(" ")].join("|")}function k(A,z){var r;if(A.length!==z.length)return!1;for(r=0;r<A.length;r++)if(A[r]!==z[r])return!1;return!0}function y(A,z){return k(A.offsets,z.offsets)&&k(A.abbrs,z.abbrs)&&k(A.untils,z.untils)}function Z(A,z,r,t){var p,O,f,N,X,h,P=[];for(p=0;p<A.length;p++){for(h=!1,f=A[p],O=0;O<P.length;O++)X=P[O],N=X[0],y(f,N)&&(f.population>N.population||f.population===N.population&&t&&t[f.name]?X.unshift(f):X.push(f),h=!0);h||P.push([f])}for(p=0;p<P.length;p++)for(X=P[p],z.push(X[0]),O=1;O<X.length;O++)r.push(X[0].name+"|"+X[O].name)}function v(A,z){var r=[],t=[];return A.links&&(t=A.links.slice()),Z(A.zones,r,t,z),{version:A.version,zones:r,links:t.sort()}}function U(A,z,r){var t=0,p=A.length+1,O,f;for(r||(r=z),z>r&&(f=z,z=r,r=f),f=0;f<A.length;f++)A[f]!=null&&(O=new Date(A[f]).getUTCFullYear(),O<z&&(t=f+1),O>r&&(p=Math.min(p,f+1)));return[t,p]}function C(A,z,r){var t=Array.prototype.slice,p=U(A.untils,z,r),O=t.apply(A.untils,p);return O[O.length-1]=null,{name:A.name,abbrs:t.apply(A.abbrs,p),untils:O,offsets:t.apply(A.offsets,p),population:A.population,countries:A.countries}}function Q(A,z,r,t){var p,O=A.zones,f=[],N;for(p=0;p<O.length;p++)f[p]=C(O[p],z,r);for(N=v({zones:f,links:A.links.slice(),version:A.version},t),p=0;p<N.zones.length;p++)N.zones[p]=w(N.zones[p]);return N.countries=A.countries?A.countries.map(function(X){return K(X)}):[],N}return M.tz.pack=w,M.tz.packBase60=u,M.tz.createLinks=v,M.tz.filterYears=C,M.tz.filterLinkPack=Q,M.tz.packCountry=K,M})});var q0=F((Y0,f0)=>{f0.exports=window.wp.deprecated});var F0={};C0(F0,{__experimentalGetSettings:()=>k0,date:()=>w0,dateI18n:()=>v0,format:()=>H,getDate:()=>H0,getSettings:()=>d0,gmdate:()=>K0,gmdateI18n:()=>s0,humanTimeDiff:()=>U0,isInTheFuture:()=>G0,setSettings:()=>_0});var l=V(M0(),1),Z0=V(a0(),1),Q0=V(t0(),1),O0=V(q0(),1),S="WP",D0=/^[+-][0-1][0-9](:?[0-9][0-9])?$/,g={l10n:{locale:"en",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],meridiem:{am:"am",pm:"pm",AM:"AM",PM:"PM"},relative:{future:"%s from now",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},startOfWeek:0},formats:{time:"g:i a",date:"F j, Y",datetime:"F j, Y g:i a",datetimeAbbreviated:"M j, Y g:i a"},timezone:{offset:0,offsetFormatted:"0",string:"",abbr:""}};function _0(M){if(g=M,l0(),l.default.locales().includes(M.l10n.locale))if(l.default.localeData(M.l10n.locale).longDateFormat("LTS")===null)l.default.defineLocale(M.l10n.locale,null);else return;let n=l.default.locale();l.default.defineLocale(M.l10n.locale,{parentLocale:"en",months:M.l10n.months,monthsShort:M.l10n.monthsShort,weekdays:M.l10n.weekdays,weekdaysShort:M.l10n.weekdaysShort,meridiem(e,q,u){return e<12?u?M.l10n.meridiem.am:M.l10n.meridiem.AM:u?M.l10n.meridiem.pm:M.l10n.meridiem.PM},longDateFormat:{LT:M.formats.time,LTS:l.default.localeData("en").longDateFormat("LTS"),L:l.default.localeData("en").longDateFormat("L"),LL:M.formats.date,LLL:M.formats.datetime,LLLL:l.default.localeData("en").longDateFormat("LLLL")},relativeTime:M.l10n.relative}),l.default.locale(n)}function d0(){return g}function k0(){return(0,O0.default)("wp.date.__experimentalGetSettings",{since:"6.1",alternative:"wp.date.getSettings"}),d0()}function l0(){let M=l.default.tz.zone(g.timezone.string);M?l.default.tz.add(l.default.tz.pack({name:S,abbrs:M.abbrs,untils:M.untils,offsets:M.offsets})):l.default.tz.add(l.default.tz.pack({name:S,abbrs:[S],untils:[null],offsets:[-g.timezone.offset*60||0]}))}var o0=60,y0=60,I0=60*o0,u0={d:"DD",D:"ddd",j:"D",l:"dddd",N:"E",S(M){let n=M.format("D");return M.format("Do").replace(n,"")},w:"d",z(M){return(parseInt(M.format("DDD"),10)-1).toString()},W:"W",F:"MMMM",m:"MM",M:"MMM",n:"M",t(M){return M.daysInMonth()},L(M){return M.isLeapYear()?"1":"0"},o:"GGGG",Y:"YYYY",y:"YY",a:"a",A:"A",B(M){let n=(0,l.default)(M).utcOffset(60),e=parseInt(n.format("s"),10),q=parseInt(n.format("m"),10),u=parseInt(n.format("H"),10);return parseInt(((e+q*o0+u*I0)/86.4).toString(),10)},g:"h",G:"H",h:"hh",H:"HH",i:"mm",s:"ss",u:"SSSSSS",v:"SSS",e:"zz",I(M){return M.isDST()?"1":"0"},O:"ZZ",P:"Z",T:"z",Z(M){let n=M.format("Z"),e=n[0]==="-"?-1:1,q=n.substring(1).split(":").map(u=>parseInt(u,10));return e*(q[0]*y0+q[1])*o0},c:"YYYY-MM-DDTHH:mm:ssZ",r(M){return M.locale("en").format("ddd, DD MMM YYYY HH:mm:ss ZZ")},U:"X"};function H(M,n=new Date){let e,q,u=[],W=(0,l.default)(n);for(e=0;e<M.length;e++){if(q=M[e],q==="\\"){e++,u.push("["+M[e]+"]");continue}if(q in u0){let E=u0[q];typeof E!="string"?u.push("["+E(W)+"]"):u.push(E)}else u.push("["+q+"]")}return W.format(u.join("[]"))}function w0(M,n=new Date,e){let q=N0(n,e);return H(M,q)}function K0(M,n=new Date){let e=(0,l.default)(n).utc();return H(M,e)}function v0(M,n=new Date,e){if(e===!0)return s0(M,n);e===!1&&(e=void 0);let q=N0(n,e);return q.locale(g.l10n.locale),H(M,q)}function s0(M,n=new Date){let e=(0,l.default)(n).utc();return e.locale(g.l10n.locale),H(M,e)}function G0(M){let n=l.default.tz(S);return l.default.tz(M,S).isAfter(n)}function H0(M){return M?l.default.tz(M,S).toDate():l.default.tz(S).toDate()}function U0(M,n){let e=l.default.tz(M,S),q=n?l.default.tz(n,S):l.default.tz(S);return e.from(q)}function N0(M,n=""){let e=(0,l.default)(M);return n!==""?j0(n)?e.utcOffset(n):e.tz(n):g.timezone.string?e.tz(g.timezone.string):e.utcOffset(+g.timezone.offset)}function j0(M){return typeof M=="number"?!0:D0.test(M)}l0();return P0(F0);})();
/*! Bundled license information:

moment-timezone/builds/moment-timezone-with-data-1970-2030.js:
  (*! moment-timezone.js *)
  (*! version : 0.5.43 *)
  (*! Copyright (c) JS Foundation and other contributors *)
  (*! license : MIT *)
  (*! github.com/moment/moment-timezone *)

moment-timezone/moment-timezone-utils.js:
  (*! moment-timezone-utils.js *)
  (*! version : 0.5.43 *)
  (*! Copyright (c) JS Foundation and other contributors *)
  (*! license : MIT *)
  (*! github.com/moment/moment-timezone *)
*/
                                                                                                                                                                                                                                                                                                                                   dist/deprecated.js                                                                                  0000644                 00000006051 15212564003 0010145 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).deprecated = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/hooks
  var require_hooks = __commonJS({
    "package-external:@wordpress/hooks"(exports, module) {
      module.exports = window.wp.hooks;
    }
  });

  // packages/deprecated/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    default: () => deprecated,
    logged: () => logged
  });
  var import_hooks = __toESM(require_hooks(), 1);
  var logged = /* @__PURE__ */ Object.create(null);
  function deprecated(feature, options = {}) {
    const { since, version, alternative, plugin, link, hint } = options;
    const pluginMessage = plugin ? ` from ${plugin}` : "";
    const sinceMessage = since ? ` since version ${since}` : "";
    const versionMessage = version ? ` and will be removed${pluginMessage} in version ${version}` : "";
    const useInsteadMessage = alternative ? ` Please use ${alternative} instead.` : "";
    const linkMessage = link ? ` See: ${link}` : "";
    const hintMessage = hint ? ` Note: ${hint}` : "";
    const message = `${feature} is deprecated${sinceMessage}${versionMessage}.${useInsteadMessage}${linkMessage}${hintMessage}`;
    if (message in logged) {
      return;
    }
    (0, import_hooks.doAction)("deprecated", feature, options, message);
    console.warn(message);
    logged[message] = true;
  }
  return __toCommonJS(index_exports);
})();
if (typeof wp.deprecated === 'object' && wp.deprecated.default) { wp.deprecated = wp.deprecated.default; }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       dist/deprecated.min.js                                                                              0000644                 00000002400 15212564003 0010721 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).deprecated=(()=>{var k=Object.create;var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty;var I=(e,s)=>()=>(s||e((s={exports:{}}).exports,s),s.exports),N=(e,s)=>{for(var n in s)a(e,n,{get:s[n],enumerable:!0})},$=(e,s,n,t)=>{if(s&&typeof s=="object"||typeof s=="function")for(let o of x(s))!A.call(e,o)&&o!==n&&a(e,o,{get:()=>s[o],enumerable:!(t=b(s,o))||t.enumerable});return e};var O=(e,s,n)=>(n=e!=null?k(j(e)):{},$(s||!e||!e.__esModule?a(n,"default",{value:e,enumerable:!0}):n,e)),P=e=>$(a({},"__esModule",{value:!0}),e);var p=I((z,g)=>{g.exports=window.wp.hooks});var q={};N(q,{default:()=>S,logged:()=>c});var u=O(p(),1),c=Object.create(null);function S(e,s={}){let{since:n,version:t,alternative:o,plugin:r,link:d,hint:l}=s,v=r?` from ${r}`:"",M=n?` since version ${n}`:"",m=t?` and will be removed${v} in version ${t}`:"",w=o?` Please use ${o} instead.`:"",f=d?` See: ${d}`:"",h=l?` Note: ${l}`:"",i=`${e} is deprecated${M}${m}.${w}${f}${h}`;i in c||((0,u.doAction)("deprecated",e,s,i),console.warn(i),c[i]=!0)}return P(q);})();
if (typeof wp.deprecated === 'object' && wp.deprecated.default) { wp.deprecated = wp.deprecated.default; }
                                                                                                                                                                                                                                                                dist/development/react-refresh-entry.js                                                             0000644                 00000136020 15212564003 0014260 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ 8015
/*!**************************************!*\
  !*** external "ReactRefreshRuntime" ***!
  \**************************************/
(module) {

"use strict";
module.exports = ReactRefreshRuntime;

/***/ },

/***/ 3565
/*!*********************************************************!*\
  !*** ./node_modules/core-js-pure/actual/global-this.js ***!
  \*********************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var parent = __webpack_require__(/*! ../stable/global-this */ 1960);

module.exports = parent;


/***/ },

/***/ 2671
/*!*****************************************************!*\
  !*** ./node_modules/core-js-pure/es/global-this.js ***!
  \*****************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

__webpack_require__(/*! ../modules/es.global-this */ 2344);

module.exports = __webpack_require__(/*! ../internals/global */ 1010);


/***/ },

/***/ 4444
/*!***********************************************************!*\
  !*** ./node_modules/core-js-pure/features/global-this.js ***!
  \***********************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

module.exports = __webpack_require__(/*! ../full/global-this */ 214);


/***/ },

/***/ 214
/*!*******************************************************!*\
  !*** ./node_modules/core-js-pure/full/global-this.js ***!
  \*******************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

// TODO: remove from `core-js@4`
__webpack_require__(/*! ../modules/esnext.global-this */ 397);

var parent = __webpack_require__(/*! ../actual/global-this */ 3565);

module.exports = parent;


/***/ },

/***/ 2159
/*!***********************************************************!*\
  !*** ./node_modules/core-js-pure/internals/a-callable.js ***!
  \***********************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var isCallable = __webpack_require__(/*! ../internals/is-callable */ 2250);
var tryToString = __webpack_require__(/*! ../internals/try-to-string */ 4640);

var $TypeError = TypeError;

// `Assert: IsCallable(argument) is true`
module.exports = function (argument) {
  if (isCallable(argument)) return argument;
  throw new $TypeError(tryToString(argument) + ' is not a function');
};


/***/ },

/***/ 6624
/*!**********************************************************!*\
  !*** ./node_modules/core-js-pure/internals/an-object.js ***!
  \**********************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var isObject = __webpack_require__(/*! ../internals/is-object */ 6285);

var $String = String;
var $TypeError = TypeError;

// `Assert: Type(argument) is Object`
module.exports = function (argument) {
  if (isObject(argument)) return argument;
  throw new $TypeError($String(argument) + ' is not an object');
};


/***/ },

/***/ 5807
/*!************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/classof-raw.js ***!
  \************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 1907);

var toString = uncurryThis({}.toString);
var stringSlice = uncurryThis(''.slice);

module.exports = function (it) {
  return stringSlice(toString(it), 8, -1);
};


/***/ },

/***/ 1626
/*!*******************************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/create-non-enumerable-property.js ***!
  \*******************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 9447);
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ 4284);
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ 5817);

module.exports = DESCRIPTORS ? function (object, key, value) {
  return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
} : function (object, key, value) {
  object[key] = value;
  return object;
};


/***/ },

/***/ 5817
/*!***************************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/create-property-descriptor.js ***!
  \***************************************************************************/
(module) {

"use strict";

module.exports = function (bitmap, value) {
  return {
    enumerable: !(bitmap & 1),
    configurable: !(bitmap & 2),
    writable: !(bitmap & 4),
    value: value
  };
};


/***/ },

/***/ 2532
/*!***********************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/define-global-property.js ***!
  \***********************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var global = __webpack_require__(/*! ../internals/global */ 1010);

// eslint-disable-next-line es/no-object-defineproperty -- safe
var defineProperty = Object.defineProperty;

module.exports = function (key, value) {
  try {
    defineProperty(global, key, { value: value, configurable: true, writable: true });
  } catch (error) {
    global[key] = value;
  } return value;
};


/***/ },

/***/ 9447
/*!************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/descriptors.js ***!
  \************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var fails = __webpack_require__(/*! ../internals/fails */ 8828);

// Detect IE8's incomplete defineProperty implementation
module.exports = !fails(function () {
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
});


/***/ },

/***/ 9552
/*!************************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/document-create-element.js ***!
  \************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var global = __webpack_require__(/*! ../internals/global */ 1010);
var isObject = __webpack_require__(/*! ../internals/is-object */ 6285);

var document = global.document;
// typeof document.createElement is 'object' in old IE
var EXISTS = isObject(document) && isObject(document.createElement);

module.exports = function (it) {
  return EXISTS ? document.createElement(it) : {};
};


/***/ },

/***/ 4723
/*!******************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/engine-user-agent.js ***!
  \******************************************************************/
(module) {

"use strict";

module.exports = typeof navigator != 'undefined' && String(navigator.userAgent) || '';


/***/ },

/***/ 5683
/*!******************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/engine-v8-version.js ***!
  \******************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var global = __webpack_require__(/*! ../internals/global */ 1010);
var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ 4723);

var process = global.process;
var Deno = global.Deno;
var versions = process && process.versions || Deno && Deno.version;
var v8 = versions && versions.v8;
var match, version;

if (v8) {
  match = v8.split('.');
  // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  // but their correct versions are not interesting for us
  version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
}

// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
// so check `userAgent` even if `.v8` exists, but 0
if (!version && userAgent) {
  match = userAgent.match(/Edge\/(\d+)/);
  if (!match || match[1] >= 74) {
    match = userAgent.match(/Chrome\/(\d+)/);
    if (match) version = +match[1];
  }
}

module.exports = version;


/***/ },

/***/ 1091
/*!*******************************************************!*\
  !*** ./node_modules/core-js-pure/internals/export.js ***!
  \*******************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var global = __webpack_require__(/*! ../internals/global */ 1010);
var apply = __webpack_require__(/*! ../internals/function-apply */ 6024);
var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this-clause */ 2361);
var isCallable = __webpack_require__(/*! ../internals/is-callable */ 2250);
var getOwnPropertyDescriptor = (__webpack_require__(/*! ../internals/object-get-own-property-descriptor */ 3846).f);
var isForced = __webpack_require__(/*! ../internals/is-forced */ 7463);
var path = __webpack_require__(/*! ../internals/path */ 2046);
var bind = __webpack_require__(/*! ../internals/function-bind-context */ 8311);
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ 1626);
var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ 9724);

var wrapConstructor = function (NativeConstructor) {
  var Wrapper = function (a, b, c) {
    if (this instanceof Wrapper) {
      switch (arguments.length) {
        case 0: return new NativeConstructor();
        case 1: return new NativeConstructor(a);
        case 2: return new NativeConstructor(a, b);
      } return new NativeConstructor(a, b, c);
    } return apply(NativeConstructor, this, arguments);
  };
  Wrapper.prototype = NativeConstructor.prototype;
  return Wrapper;
};

/*
  options.target         - name of the target object
  options.global         - target is the global object
  options.stat           - export as static methods of target
  options.proto          - export as prototype methods of target
  options.real           - real prototype method for the `pure` version
  options.forced         - export even if the native feature is available
  options.bind           - bind methods to the target, required for the `pure` version
  options.wrap           - wrap constructors to preventing global pollution, required for the `pure` version
  options.unsafe         - use the simple assignment of property instead of delete + defineProperty
  options.sham           - add a flag to not completely full polyfills
  options.enumerable     - export as enumerable property
  options.dontCallGetSet - prevent calling a getter on target
  options.name           - the .name of the function if it does not match the key
*/
module.exports = function (options, source) {
  var TARGET = options.target;
  var GLOBAL = options.global;
  var STATIC = options.stat;
  var PROTO = options.proto;

  var nativeSource = GLOBAL ? global : STATIC ? global[TARGET] : global[TARGET] && global[TARGET].prototype;

  var target = GLOBAL ? path : path[TARGET] || createNonEnumerableProperty(path, TARGET, {})[TARGET];
  var targetPrototype = target.prototype;

  var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE;
  var key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor;

  for (key in source) {
    FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
    // contains in native
    USE_NATIVE = !FORCED && nativeSource && hasOwn(nativeSource, key);

    targetProperty = target[key];

    if (USE_NATIVE) if (options.dontCallGetSet) {
      descriptor = getOwnPropertyDescriptor(nativeSource, key);
      nativeProperty = descriptor && descriptor.value;
    } else nativeProperty = nativeSource[key];

    // export native or implementation
    sourceProperty = (USE_NATIVE && nativeProperty) ? nativeProperty : source[key];

    if (!FORCED && !PROTO && typeof targetProperty == typeof sourceProperty) continue;

    // bind methods to global for calling from export context
    if (options.bind && USE_NATIVE) resultProperty = bind(sourceProperty, global);
    // wrap global constructors for prevent changes in this version
    else if (options.wrap && USE_NATIVE) resultProperty = wrapConstructor(sourceProperty);
    // make static versions for prototype methods
    else if (PROTO && isCallable(sourceProperty)) resultProperty = uncurryThis(sourceProperty);
    // default case
    else resultProperty = sourceProperty;

    // add a flag to not completely full polyfills
    if (options.sham || (sourceProperty && sourceProperty.sham) || (targetProperty && targetProperty.sham)) {
      createNonEnumerableProperty(resultProperty, 'sham', true);
    }

    createNonEnumerableProperty(target, key, resultProperty);

    if (PROTO) {
      VIRTUAL_PROTOTYPE = TARGET + 'Prototype';
      if (!hasOwn(path, VIRTUAL_PROTOTYPE)) {
        createNonEnumerableProperty(path, VIRTUAL_PROTOTYPE, {});
      }
      // export virtual prototype methods
      createNonEnumerableProperty(path[VIRTUAL_PROTOTYPE], key, sourceProperty);
      // export real prototype methods
      if (options.real && targetPrototype && (FORCED || !targetPrototype[key])) {
        createNonEnumerableProperty(targetPrototype, key, sourceProperty);
      }
    }
  }
};


/***/ },

/***/ 8828
/*!******************************************************!*\
  !*** ./node_modules/core-js-pure/internals/fails.js ***!
  \******************************************************/
(module) {

"use strict";

module.exports = function (exec) {
  try {
    return !!exec();
  } catch (error) {
    return true;
  }
};


/***/ },

/***/ 6024
/*!***************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/function-apply.js ***!
  \***************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-native */ 1505);

var FunctionPrototype = Function.prototype;
var apply = FunctionPrototype.apply;
var call = FunctionPrototype.call;

// eslint-disable-next-line es/no-reflect -- safe
module.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {
  return call.apply(apply, arguments);
});


/***/ },

/***/ 8311
/*!**********************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/function-bind-context.js ***!
  \**********************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this-clause */ 2361);
var aCallable = __webpack_require__(/*! ../internals/a-callable */ 2159);
var NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-native */ 1505);

var bind = uncurryThis(uncurryThis.bind);

// optional / simple context binding
module.exports = function (fn, that) {
  aCallable(fn);
  return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {
    return fn.apply(that, arguments);
  };
};


/***/ },

/***/ 1505
/*!*********************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/function-bind-native.js ***!
  \*********************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var fails = __webpack_require__(/*! ../internals/fails */ 8828);

module.exports = !fails(function () {
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
  var test = (function () { /* empty */ }).bind();
  // eslint-disable-next-line no-prototype-builtins -- safe
  return typeof test != 'function' || test.hasOwnProperty('prototype');
});


/***/ },

/***/ 3930
/*!**************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/function-call.js ***!
  \**************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-native */ 1505);

var call = Function.prototype.call;

module.exports = NATIVE_BIND ? call.bind(call) : function () {
  return call.apply(call, arguments);
};


/***/ },

/***/ 2361
/*!*****************************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/function-uncurry-this-clause.js ***!
  \*****************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var classofRaw = __webpack_require__(/*! ../internals/classof-raw */ 5807);
var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 1907);

module.exports = function (fn) {
  // Nashorn bug:
  //   https://github.com/zloirock/core-js/issues/1128
  //   https://github.com/zloirock/core-js/issues/1130
  if (classofRaw(fn) === 'Function') return uncurryThis(fn);
};


/***/ },

/***/ 1907
/*!**********************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/function-uncurry-this.js ***!
  \**********************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-native */ 1505);

var FunctionPrototype = Function.prototype;
var call = FunctionPrototype.call;
var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);

module.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
  return function () {
    return call.apply(fn, arguments);
  };
};


/***/ },

/***/ 5582
/*!*************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/get-built-in.js ***!
  \*************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var path = __webpack_require__(/*! ../internals/path */ 2046);
var global = __webpack_require__(/*! ../internals/global */ 1010);
var isCallable = __webpack_require__(/*! ../internals/is-callable */ 2250);

var aFunction = function (variable) {
  return isCallable(variable) ? variable : undefined;
};

module.exports = function (namespace, method) {
  return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])
    : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
};


/***/ },

/***/ 9367
/*!***********************************************************!*\
  !*** ./node_modules/core-js-pure/internals/get-method.js ***!
  \***********************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var aCallable = __webpack_require__(/*! ../internals/a-callable */ 2159);
var isNullOrUndefined = __webpack_require__(/*! ../internals/is-null-or-undefined */ 7136);

// `GetMethod` abstract operation
// https://tc39.es/ecma262/#sec-getmethod
module.exports = function (V, P) {
  var func = V[P];
  return isNullOrUndefined(func) ? undefined : aCallable(func);
};


/***/ },

/***/ 1010
/*!*******************************************************!*\
  !*** ./node_modules/core-js-pure/internals/global.js ***!
  \*******************************************************/
(module) {

"use strict";

var check = function (it) {
  return it && it.Math === Math && it;
};

// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
module.exports =
  // eslint-disable-next-line es/no-global-this -- safe
  check(typeof globalThis == 'object' && globalThis) ||
  check(typeof window == 'object' && window) ||
  // eslint-disable-next-line no-restricted-globals -- safe
  check(typeof self == 'object' && self) ||
  check(typeof globalThis == 'object' && globalThis) ||
  check(typeof this == 'object' && this) ||
  // eslint-disable-next-line no-new-func -- fallback
  (function () { return this; })() || Function('return this')();


/***/ },

/***/ 9724
/*!*****************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/has-own-property.js ***!
  \*****************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 1907);
var toObject = __webpack_require__(/*! ../internals/to-object */ 9298);

var hasOwnProperty = uncurryThis({}.hasOwnProperty);

// `HasOwnProperty` abstract operation
// https://tc39.es/ecma262/#sec-hasownproperty
// eslint-disable-next-line es/no-object-hasown -- safe
module.exports = Object.hasOwn || function hasOwn(it, key) {
  return hasOwnProperty(toObject(it), key);
};


/***/ },

/***/ 3648
/*!***************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/ie8-dom-define.js ***!
  \***************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 9447);
var fails = __webpack_require__(/*! ../internals/fails */ 8828);
var createElement = __webpack_require__(/*! ../internals/document-create-element */ 9552);

// Thanks to IE8 for its funny defineProperty
module.exports = !DESCRIPTORS && !fails(function () {
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  return Object.defineProperty(createElement('div'), 'a', {
    get: function () { return 7; }
  }).a !== 7;
});


/***/ },

/***/ 6946
/*!***************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/indexed-object.js ***!
  \***************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 1907);
var fails = __webpack_require__(/*! ../internals/fails */ 8828);
var classof = __webpack_require__(/*! ../internals/classof-raw */ 5807);

var $Object = Object;
var split = uncurryThis(''.split);

// fallback for non-array-like ES3 and non-enumerable old V8 strings
module.exports = fails(function () {
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  // eslint-disable-next-line no-prototype-builtins -- safe
  return !$Object('z').propertyIsEnumerable(0);
}) ? function (it) {
  return classof(it) === 'String' ? split(it, '') : $Object(it);
} : $Object;


/***/ },

/***/ 2250
/*!************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/is-callable.js ***!
  \************************************************************/
(module) {

"use strict";

// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
var documentAll = typeof document == 'object' && document.all;

// `IsCallable` abstract operation
// https://tc39.es/ecma262/#sec-iscallable
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
module.exports = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
  return typeof argument == 'function' || argument === documentAll;
} : function (argument) {
  return typeof argument == 'function';
};


/***/ },

/***/ 7463
/*!**********************************************************!*\
  !*** ./node_modules/core-js-pure/internals/is-forced.js ***!
  \**********************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var fails = __webpack_require__(/*! ../internals/fails */ 8828);
var isCallable = __webpack_require__(/*! ../internals/is-callable */ 2250);

var replacement = /#|\.prototype\./;

var isForced = function (feature, detection) {
  var value = data[normalize(feature)];
  return value === POLYFILL ? true
    : value === NATIVE ? false
    : isCallable(detection) ? fails(detection)
    : !!detection;
};

var normalize = isForced.normalize = function (string) {
  return String(string).replace(replacement, '.').toLowerCase();
};

var data = isForced.data = {};
var NATIVE = isForced.NATIVE = 'N';
var POLYFILL = isForced.POLYFILL = 'P';

module.exports = isForced;


/***/ },

/***/ 7136
/*!*********************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/is-null-or-undefined.js ***!
  \*********************************************************************/
(module) {

"use strict";

// we can't use just `it == null` since of `document.all` special case
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
module.exports = function (it) {
  return it === null || it === undefined;
};


/***/ },

/***/ 6285
/*!**********************************************************!*\
  !*** ./node_modules/core-js-pure/internals/is-object.js ***!
  \**********************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var isCallable = __webpack_require__(/*! ../internals/is-callable */ 2250);

module.exports = function (it) {
  return typeof it == 'object' ? it !== null : isCallable(it);
};


/***/ },

/***/ 7376
/*!********************************************************!*\
  !*** ./node_modules/core-js-pure/internals/is-pure.js ***!
  \********************************************************/
(module) {

"use strict";

module.exports = true;


/***/ },

/***/ 5594
/*!**********************************************************!*\
  !*** ./node_modules/core-js-pure/internals/is-symbol.js ***!
  \**********************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ 5582);
var isCallable = __webpack_require__(/*! ../internals/is-callable */ 2250);
var isPrototypeOf = __webpack_require__(/*! ../internals/object-is-prototype-of */ 8280);
var USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ 1175);

var $Object = Object;

module.exports = USE_SYMBOL_AS_UID ? function (it) {
  return typeof it == 'symbol';
} : function (it) {
  var $Symbol = getBuiltIn('Symbol');
  return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
};


/***/ },

/***/ 4284
/*!***********************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/object-define-property.js ***!
  \***********************************************************************/
(__unused_webpack_module, exports, __webpack_require__) {

"use strict";

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 9447);
var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ 3648);
var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(/*! ../internals/v8-prototype-define-bug */ 8661);
var anObject = __webpack_require__(/*! ../internals/an-object */ 6624);
var toPropertyKey = __webpack_require__(/*! ../internals/to-property-key */ 470);

var $TypeError = TypeError;
// eslint-disable-next-line es/no-object-defineproperty -- safe
var $defineProperty = Object.defineProperty;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
var ENUMERABLE = 'enumerable';
var CONFIGURABLE = 'configurable';
var WRITABLE = 'writable';

// `Object.defineProperty` method
// https://tc39.es/ecma262/#sec-object.defineproperty
exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
  anObject(O);
  P = toPropertyKey(P);
  anObject(Attributes);
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
    var current = $getOwnPropertyDescriptor(O, P);
    if (current && current[WRITABLE]) {
      O[P] = Attributes.value;
      Attributes = {
        configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
        enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
        writable: false
      };
    }
  } return $defineProperty(O, P, Attributes);
} : $defineProperty : function defineProperty(O, P, Attributes) {
  anObject(O);
  P = toPropertyKey(P);
  anObject(Attributes);
  if (IE8_DOM_DEFINE) try {
    return $defineProperty(O, P, Attributes);
  } catch (error) { /* empty */ }
  if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported');
  if ('value' in Attributes) O[P] = Attributes.value;
  return O;
};


/***/ },

/***/ 3846
/*!***********************************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/object-get-own-property-descriptor.js ***!
  \***********************************************************************************/
(__unused_webpack_module, exports, __webpack_require__) {

"use strict";

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 9447);
var call = __webpack_require__(/*! ../internals/function-call */ 3930);
var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ 2574);
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ 5817);
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ 7374);
var toPropertyKey = __webpack_require__(/*! ../internals/to-property-key */ 470);
var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ 9724);
var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ 3648);

// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;

// `Object.getOwnPropertyDescriptor` method
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  O = toIndexedObject(O);
  P = toPropertyKey(P);
  if (IE8_DOM_DEFINE) try {
    return $getOwnPropertyDescriptor(O, P);
  } catch (error) { /* empty */ }
  if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
};


/***/ },

/***/ 8280
/*!***********************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/object-is-prototype-of.js ***!
  \***********************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 1907);

module.exports = uncurryThis({}.isPrototypeOf);


/***/ },

/***/ 2574
/*!******************************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/object-property-is-enumerable.js ***!
  \******************************************************************************/
(__unused_webpack_module, exports) {

"use strict";

var $propertyIsEnumerable = {}.propertyIsEnumerable;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;

// Nashorn ~ JDK8 bug
var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);

// `Object.prototype.propertyIsEnumerable` method implementation
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  var descriptor = getOwnPropertyDescriptor(this, V);
  return !!descriptor && descriptor.enumerable;
} : $propertyIsEnumerable;


/***/ },

/***/ 581
/*!**********************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/ordinary-to-primitive.js ***!
  \**********************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var call = __webpack_require__(/*! ../internals/function-call */ 3930);
var isCallable = __webpack_require__(/*! ../internals/is-callable */ 2250);
var isObject = __webpack_require__(/*! ../internals/is-object */ 6285);

var $TypeError = TypeError;

// `OrdinaryToPrimitive` abstract operation
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
module.exports = function (input, pref) {
  var fn, val;
  if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
  if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  throw new $TypeError("Can't convert object to primitive value");
};


/***/ },

/***/ 2046
/*!*****************************************************!*\
  !*** ./node_modules/core-js-pure/internals/path.js ***!
  \*****************************************************/
(module) {

"use strict";

module.exports = {};


/***/ },

/***/ 4239
/*!*************************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/require-object-coercible.js ***!
  \*************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var isNullOrUndefined = __webpack_require__(/*! ../internals/is-null-or-undefined */ 7136);

var $TypeError = TypeError;

// `RequireObjectCoercible` abstract operation
// https://tc39.es/ecma262/#sec-requireobjectcoercible
module.exports = function (it) {
  if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it);
  return it;
};


/***/ },

/***/ 6128
/*!*************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/shared-store.js ***!
  \*************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var global = __webpack_require__(/*! ../internals/global */ 1010);
var defineGlobalProperty = __webpack_require__(/*! ../internals/define-global-property */ 2532);

var SHARED = '__core-js_shared__';
var store = global[SHARED] || defineGlobalProperty(SHARED, {});

module.exports = store;


/***/ },

/***/ 5816
/*!*******************************************************!*\
  !*** ./node_modules/core-js-pure/internals/shared.js ***!
  \*******************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ 7376);
var store = __webpack_require__(/*! ../internals/shared-store */ 6128);

(module.exports = function (key, value) {
  return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
  version: '3.35.1',
  mode: IS_PURE ? 'pure' : 'global',
  copyright: 'Â© 2014-2024 Denis Pushkarev (zloirock.ru)',
  license: 'https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE',
  source: 'https://github.com/zloirock/core-js'
});


/***/ },

/***/ 9846
/*!*****************************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/symbol-constructor-detection.js ***!
  \*****************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

/* eslint-disable es/no-symbol -- required for testing */
var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ 5683);
var fails = __webpack_require__(/*! ../internals/fails */ 8828);
var global = __webpack_require__(/*! ../internals/global */ 1010);

var $String = global.String;

// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
  var symbol = Symbol('symbol detection');
  // Chrome 38 Symbol has incorrect toString conversion
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
  // of course, fail.
  return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||
    // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
    !Symbol.sham && V8_VERSION && V8_VERSION < 41;
});


/***/ },

/***/ 7374
/*!******************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/to-indexed-object.js ***!
  \******************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

// toObject with fallback for non-array-like ES3 strings
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ 6946);
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ 4239);

module.exports = function (it) {
  return IndexedObject(requireObjectCoercible(it));
};


/***/ },

/***/ 9298
/*!**********************************************************!*\
  !*** ./node_modules/core-js-pure/internals/to-object.js ***!
  \**********************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ 4239);

var $Object = Object;

// `ToObject` abstract operation
// https://tc39.es/ecma262/#sec-toobject
module.exports = function (argument) {
  return $Object(requireObjectCoercible(argument));
};


/***/ },

/***/ 6028
/*!*************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/to-primitive.js ***!
  \*************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var call = __webpack_require__(/*! ../internals/function-call */ 3930);
var isObject = __webpack_require__(/*! ../internals/is-object */ 6285);
var isSymbol = __webpack_require__(/*! ../internals/is-symbol */ 5594);
var getMethod = __webpack_require__(/*! ../internals/get-method */ 9367);
var ordinaryToPrimitive = __webpack_require__(/*! ../internals/ordinary-to-primitive */ 581);
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 6264);

var $TypeError = TypeError;
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');

// `ToPrimitive` abstract operation
// https://tc39.es/ecma262/#sec-toprimitive
module.exports = function (input, pref) {
  if (!isObject(input) || isSymbol(input)) return input;
  var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  var result;
  if (exoticToPrim) {
    if (pref === undefined) pref = 'default';
    result = call(exoticToPrim, input, pref);
    if (!isObject(result) || isSymbol(result)) return result;
    throw new $TypeError("Can't convert object to primitive value");
  }
  if (pref === undefined) pref = 'number';
  return ordinaryToPrimitive(input, pref);
};


/***/ },

/***/ 470
/*!****************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/to-property-key.js ***!
  \****************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ 6028);
var isSymbol = __webpack_require__(/*! ../internals/is-symbol */ 5594);

// `ToPropertyKey` abstract operation
// https://tc39.es/ecma262/#sec-topropertykey
module.exports = function (argument) {
  var key = toPrimitive(argument, 'string');
  return isSymbol(key) ? key : key + '';
};


/***/ },

/***/ 4640
/*!**************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/try-to-string.js ***!
  \**************************************************************/
(module) {

"use strict";

var $String = String;

module.exports = function (argument) {
  try {
    return $String(argument);
  } catch (error) {
    return 'Object';
  }
};


/***/ },

/***/ 6499
/*!****************************************************!*\
  !*** ./node_modules/core-js-pure/internals/uid.js ***!
  \****************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 1907);

var id = 0;
var postfix = Math.random();
var toString = uncurryThis(1.0.toString);

module.exports = function (key) {
  return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
};


/***/ },

/***/ 1175
/*!******************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/use-symbol-as-uid.js ***!
  \******************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

/* eslint-disable es/no-symbol -- required for testing */
var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/symbol-constructor-detection */ 9846);

module.exports = NATIVE_SYMBOL
  && !Symbol.sham
  && typeof Symbol.iterator == 'symbol';


/***/ },

/***/ 8661
/*!************************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/v8-prototype-define-bug.js ***!
  \************************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 9447);
var fails = __webpack_require__(/*! ../internals/fails */ 8828);

// V8 ~ Chrome 36-
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
module.exports = DESCRIPTORS && fails(function () {
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
    value: 42,
    writable: false
  }).prototype !== 42;
});


/***/ },

/***/ 6264
/*!******************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/well-known-symbol.js ***!
  \******************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var global = __webpack_require__(/*! ../internals/global */ 1010);
var shared = __webpack_require__(/*! ../internals/shared */ 5816);
var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ 9724);
var uid = __webpack_require__(/*! ../internals/uid */ 6499);
var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/symbol-constructor-detection */ 9846);
var USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ 1175);

var Symbol = global.Symbol;
var WellKnownSymbolsStore = shared('wks');
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;

module.exports = function (name) {
  if (!hasOwn(WellKnownSymbolsStore, name)) {
    WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name)
      ? Symbol[name]
      : createWellKnownSymbol('Symbol.' + name);
  } return WellKnownSymbolsStore[name];
};


/***/ },

/***/ 2344
/*!*************************************************************!*\
  !*** ./node_modules/core-js-pure/modules/es.global-this.js ***!
  \*************************************************************/
(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ 1091);
var global = __webpack_require__(/*! ../internals/global */ 1010);

// `globalThis` object
// https://tc39.es/ecma262/#sec-globalthis
$({ global: true, forced: global.globalThis !== global }, {
  globalThis: global
});


/***/ },

/***/ 397
/*!*****************************************************************!*\
  !*** ./node_modules/core-js-pure/modules/esnext.global-this.js ***!
  \*****************************************************************/
(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

"use strict";

// TODO: Remove from `core-js@4`
__webpack_require__(/*! ../modules/es.global-this */ 2344);


/***/ },

/***/ 1960
/*!*********************************************************!*\
  !*** ./node_modules/core-js-pure/stable/global-this.js ***!
  \*********************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var parent = __webpack_require__(/*! ../es/global-this */ 2671);

module.exports = parent;


/***/ }

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		if (!(moduleId in __webpack_modules__)) {
/******/ 			delete __webpack_module_cache__[moduleId];
/******/ 			var e = new Error("Cannot find module '" + moduleId + "'");
/******/ 			e.code = 'MODULE_NOT_FOUND';
/******/ 			throw e;
/******/ 		}
/******/ 		__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
var __webpack_exports__ = {};
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
(() => {
/*!***************************************************************************************!*\
  !*** ./node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js ***!
  \***************************************************************************************/
/* global __react_refresh_library__ */

if (true) {
  const safeThis = __webpack_require__(/*! core-js-pure/features/global-this */ 4444);
  const RefreshRuntime = __webpack_require__(/*! react-refresh/runtime */ 8015);

  if (typeof safeThis !== 'undefined') {
    var $RefreshInjected$ = '__reactRefreshInjected';
    // Namespace the injected flag (if necessary) for monorepo compatibility
    if (typeof __react_refresh_library__ !== 'undefined' && __react_refresh_library__) {
      $RefreshInjected$ += '_' + __react_refresh_library__;
    }

    // Only inject the runtime if it hasn't been injected
    if (!safeThis[$RefreshInjected$]) {
      // Inject refresh runtime into global scope
      RefreshRuntime.injectIntoGlobalHook(safeThis);

      // Mark the runtime as injected to prevent double-injection
      safeThis[$RefreshInjected$] = true;
    }
  }
}

})();

/******/ })()
;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                dist/development/react-refresh-entry.min.js                                                         0000644                 00000032377 15212564005 0015056 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       (()=>{var t={8015(t){"use strict";t.exports=ReactRefreshRuntime},3565(t,r,e){"use strict";var n=e(/*! ../stable/global-this */1960);t.exports=n},2671(t,r,e){"use strict";e(/*! ../modules/es.global-this */2344),t.exports=e(/*! ../internals/global */1010)},4444(t,r,e){"use strict";t.exports=e(/*! ../full/global-this */214)},214(t,r,e){"use strict";e(/*! ../modules/esnext.global-this */397);var n=e(/*! ../actual/global-this */3565);t.exports=n},2159(t,r,e){"use strict";var n=e(/*! ../internals/is-callable */2250),o=e(/*! ../internals/try-to-string */4640),i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not a function")}},6624(t,r,e){"use strict";var n=e(/*! ../internals/is-object */6285),o=String,i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not an object")}},5807(t,r,e){"use strict";var n=e(/*! ../internals/function-uncurry-this */1907),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},1626(t,r,e){"use strict";var n=e(/*! ../internals/descriptors */9447),o=e(/*! ../internals/object-define-property */4284),i=e(/*! ../internals/create-property-descriptor */5817);t.exports=n?function(t,r,e){return o.f(t,r,i(1,e))}:function(t,r,e){return t[r]=e,t}},5817(t){"use strict";t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},2532(t,r,e){"use strict";var n=e(/*! ../internals/global */1010),o=Object.defineProperty;t.exports=function(t,r){try{o(n,t,{value:r,configurable:!0,writable:!0})}catch(e){n[t]=r}return r}},9447(t,r,e){"use strict";var n=e(/*! ../internals/fails */8828);t.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},9552(t,r,e){"use strict";var n=e(/*! ../internals/global */1010),o=e(/*! ../internals/is-object */6285),i=n.document,s=o(i)&&o(i.createElement);t.exports=function(t){return s?i.createElement(t):{}}},4723(t){"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},5683(t,r,e){"use strict";var n,o,i=e(/*! ../internals/global */1010),s=e(/*! ../internals/engine-user-agent */4723),u=i.process,c=i.Deno,a=u&&u.versions||c&&c.version,p=a&&a.v8;p&&(o=(n=p.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&s&&(!(n=s.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/))&&(o=+n[1]),t.exports=o},1091(t,r,e){"use strict";var n=e(/*! ../internals/global */1010),o=e(/*! ../internals/function-apply */6024),i=e(/*! ../internals/function-uncurry-this-clause */2361),s=e(/*! ../internals/is-callable */2250),u=e(/*! ../internals/object-get-own-property-descriptor */3846).f,c=e(/*! ../internals/is-forced */7463),a=e(/*! ../internals/path */2046),p=e(/*! ../internals/function-bind-context */8311),f=e(/*! ../internals/create-non-enumerable-property */1626),l=e(/*! ../internals/has-own-property */9724),v=function(t){var r=function(e,n,i){if(this instanceof r){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return o(t,this,arguments)};return r.prototype=t.prototype,r};t.exports=function(t,r){var e,o,y,b,h,x,d,m,g,w=t.target,j=t.global,_=t.stat,O=t.proto,S=j?n:_?n[w]:n[w]&&n[w].prototype,P=j?a:a[w]||f(a,w,{})[w],E=P.prototype;for(b in r)o=!(e=c(j?b:w+(_?".":"#")+b,t.forced))&&S&&l(S,b),x=P[b],o&&(d=t.dontCallGetSet?(g=u(S,b))&&g.value:S[b]),h=o&&d?d:r[b],(e||O||typeof x!=typeof h)&&(m=t.bind&&o?p(h,n):t.wrap&&o?v(h):O&&s(h)?i(h):h,(t.sham||h&&h.sham||x&&x.sham)&&f(m,"sham",!0),f(P,b,m),O&&(l(a,y=w+"Prototype")||f(a,y,{}),f(a[y],b,h),t.real&&E&&(e||!E[b])&&f(E,b,h)))}},8828(t){"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},6024(t,r,e){"use strict";var n=e(/*! ../internals/function-bind-native */1505),o=Function.prototype,i=o.apply,s=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?s.bind(i):function(){return s.apply(i,arguments)})},8311(t,r,e){"use strict";var n=e(/*! ../internals/function-uncurry-this-clause */2361),o=e(/*! ../internals/a-callable */2159),i=e(/*! ../internals/function-bind-native */1505),s=n(n.bind);t.exports=function(t,r){return o(t),void 0===r?t:i?s(t,r):function(){return t.apply(r,arguments)}}},1505(t,r,e){"use strict";var n=e(/*! ../internals/fails */8828);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},3930(t,r,e){"use strict";var n=e(/*! ../internals/function-bind-native */1505),o=Function.prototype.call;t.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},2361(t,r,e){"use strict";var n=e(/*! ../internals/classof-raw */5807),o=e(/*! ../internals/function-uncurry-this */1907);t.exports=function(t){if("Function"===n(t))return o(t)}},1907(t,r,e){"use strict";var n=e(/*! ../internals/function-bind-native */1505),o=Function.prototype,i=o.call,s=n&&o.bind.bind(i,i);t.exports=n?s:function(t){return function(){return i.apply(t,arguments)}}},5582(t,r,e){"use strict";var n=e(/*! ../internals/path */2046),o=e(/*! ../internals/global */1010),i=e(/*! ../internals/is-callable */2250),s=function(t){return i(t)?t:void 0};t.exports=function(t,r){return arguments.length<2?s(n[t])||s(o[t]):n[t]&&n[t][r]||o[t]&&o[t][r]}},9367(t,r,e){"use strict";var n=e(/*! ../internals/a-callable */2159),o=e(/*! ../internals/is-null-or-undefined */7136);t.exports=function(t,r){var e=t[r];return o(e)?void 0:n(e)}},1010(t){"use strict";var r=function(t){return t&&t.Math===Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof globalThis&&globalThis)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9724(t,r,e){"use strict";var n=e(/*! ../internals/function-uncurry-this */1907),o=e(/*! ../internals/to-object */9298),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,r){return i(o(t),r)}},3648(t,r,e){"use strict";var n=e(/*! ../internals/descriptors */9447),o=e(/*! ../internals/fails */8828),i=e(/*! ../internals/document-create-element */9552);t.exports=!n&&!o((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},6946(t,r,e){"use strict";var n=e(/*! ../internals/function-uncurry-this */1907),o=e(/*! ../internals/fails */8828),i=e(/*! ../internals/classof-raw */5807),s=Object,u=n("".split);t.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"===i(t)?u(t,""):s(t)}:s},2250(t){"use strict";var r="object"==typeof document&&document.all;t.exports=void 0===r&&void 0!==r?function(t){return"function"==typeof t||t===r}:function(t){return"function"==typeof t}},7463(t,r,e){"use strict";var n=e(/*! ../internals/fails */8828),o=e(/*! ../internals/is-callable */2250),i=/#|\.prototype\./,s=function(t,r){var e=c[u(t)];return e===p||e!==a&&(o(r)?n(r):!!r)},u=s.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=s.data={},a=s.NATIVE="N",p=s.POLYFILL="P";t.exports=s},7136(t){"use strict";t.exports=function(t){return null==t}},6285(t,r,e){"use strict";var n=e(/*! ../internals/is-callable */2250);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},7376(t){"use strict";t.exports=!0},5594(t,r,e){"use strict";var n=e(/*! ../internals/get-built-in */5582),o=e(/*! ../internals/is-callable */2250),i=e(/*! ../internals/object-is-prototype-of */8280),s=e(/*! ../internals/use-symbol-as-uid */1175),u=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var r=n("Symbol");return o(r)&&i(r.prototype,u(t))}},4284(t,r,e){"use strict";var n=e(/*! ../internals/descriptors */9447),o=e(/*! ../internals/ie8-dom-define */3648),i=e(/*! ../internals/v8-prototype-define-bug */8661),s=e(/*! ../internals/an-object */6624),u=e(/*! ../internals/to-property-key */470),c=TypeError,a=Object.defineProperty,p=Object.getOwnPropertyDescriptor,f="enumerable",l="configurable",v="writable";r.f=n?i?function(t,r,e){if(s(t),r=u(r),s(e),"function"==typeof t&&"prototype"===r&&"value"in e&&v in e&&!e[v]){var n=p(t,r);n&&n[v]&&(t[r]=e.value,e={configurable:l in e?e[l]:n[l],enumerable:f in e?e[f]:n[f],writable:!1})}return a(t,r,e)}:a:function(t,r,e){if(s(t),r=u(r),s(e),o)try{return a(t,r,e)}catch(t){}if("get"in e||"set"in e)throw new c("Accessors not supported");return"value"in e&&(t[r]=e.value),t}},3846(t,r,e){"use strict";var n=e(/*! ../internals/descriptors */9447),o=e(/*! ../internals/function-call */3930),i=e(/*! ../internals/object-property-is-enumerable */2574),s=e(/*! ../internals/create-property-descriptor */5817),u=e(/*! ../internals/to-indexed-object */7374),c=e(/*! ../internals/to-property-key */470),a=e(/*! ../internals/has-own-property */9724),p=e(/*! ../internals/ie8-dom-define */3648),f=Object.getOwnPropertyDescriptor;r.f=n?f:function(t,r){if(t=u(t),r=c(r),p)try{return f(t,r)}catch(t){}if(a(t,r))return s(!o(i.f,t,r),t[r])}},8280(t,r,e){"use strict";var n=e(/*! ../internals/function-uncurry-this */1907);t.exports=n({}.isPrototypeOf)},2574(t,r){"use strict";var e={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!e.call({1:2},1);r.f=o?function(t){var r=n(this,t);return!!r&&r.enumerable}:e},581(t,r,e){"use strict";var n=e(/*! ../internals/function-call */3930),o=e(/*! ../internals/is-callable */2250),i=e(/*! ../internals/is-object */6285),s=TypeError;t.exports=function(t,r){var e,u;if("string"===r&&o(e=t.toString)&&!i(u=n(e,t)))return u;if(o(e=t.valueOf)&&!i(u=n(e,t)))return u;if("string"!==r&&o(e=t.toString)&&!i(u=n(e,t)))return u;throw new s("Can't convert object to primitive value")}},2046(t){"use strict";t.exports={}},4239(t,r,e){"use strict";var n=e(/*! ../internals/is-null-or-undefined */7136),o=TypeError;t.exports=function(t){if(n(t))throw new o("Can't call method on "+t);return t}},6128(t,r,e){"use strict";var n=e(/*! ../internals/global */1010),o=e(/*! ../internals/define-global-property */2532),i="__core-js_shared__",s=n[i]||o(i,{});t.exports=s},5816(t,r,e){"use strict";var n=e(/*! ../internals/is-pure */7376),o=e(/*! ../internals/shared-store */6128);(t.exports=function(t,r){return o[t]||(o[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.35.1",mode:n?"pure":"global",copyright:"Â© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE",source:"https://github.com/zloirock/core-js"})},9846(t,r,e){"use strict";var n=e(/*! ../internals/engine-v8-version */5683),o=e(/*! ../internals/fails */8828),i=e(/*! ../internals/global */1010).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},7374(t,r,e){"use strict";var n=e(/*! ../internals/indexed-object */6946),o=e(/*! ../internals/require-object-coercible */4239);t.exports=function(t){return n(o(t))}},9298(t,r,e){"use strict";var n=e(/*! ../internals/require-object-coercible */4239),o=Object;t.exports=function(t){return o(n(t))}},6028(t,r,e){"use strict";var n=e(/*! ../internals/function-call */3930),o=e(/*! ../internals/is-object */6285),i=e(/*! ../internals/is-symbol */5594),s=e(/*! ../internals/get-method */9367),u=e(/*! ../internals/ordinary-to-primitive */581),c=e(/*! ../internals/well-known-symbol */6264),a=TypeError,p=c("toPrimitive");t.exports=function(t,r){if(!o(t)||i(t))return t;var e,c=s(t,p);if(c){if(void 0===r&&(r="default"),e=n(c,t,r),!o(e)||i(e))return e;throw new a("Can't convert object to primitive value")}return void 0===r&&(r="number"),u(t,r)}},470(t,r,e){"use strict";var n=e(/*! ../internals/to-primitive */6028),o=e(/*! ../internals/is-symbol */5594);t.exports=function(t){var r=n(t,"string");return o(r)?r:r+""}},4640(t){"use strict";var r=String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},6499(t,r,e){"use strict";var n=e(/*! ../internals/function-uncurry-this */1907),o=0,i=Math.random(),s=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++o+i,36)}},1175(t,r,e){"use strict";var n=e(/*! ../internals/symbol-constructor-detection */9846);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8661(t,r,e){"use strict";var n=e(/*! ../internals/descriptors */9447),o=e(/*! ../internals/fails */8828);t.exports=n&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},6264(t,r,e){"use strict";var n=e(/*! ../internals/global */1010),o=e(/*! ../internals/shared */5816),i=e(/*! ../internals/has-own-property */9724),s=e(/*! ../internals/uid */6499),u=e(/*! ../internals/symbol-constructor-detection */9846),c=e(/*! ../internals/use-symbol-as-uid */1175),a=n.Symbol,p=o("wks"),f=c?a.for||a:a&&a.withoutSetter||s;t.exports=function(t){return i(p,t)||(p[t]=u&&i(a,t)?a[t]:f("Symbol."+t)),p[t]}},2344(t,r,e){"use strict";var n=e(/*! ../internals/export */1091),o=e(/*! ../internals/global */1010);n({global:!0,forced:o.globalThis!==o},{globalThis:o})},397(t,r,e){"use strict";e(/*! ../modules/es.global-this */2344)},1960(t,r,e){"use strict";var n=e(/*! ../es/global-this */2671);t.exports=n}},r={};function e(n){var o=r[n];if(void 0!==o)return o.exports;var i=r[n]={exports:{}};if(!(n in t)){delete r[n];var s=new Error("Cannot find module '"+n+"'");throw s.code="MODULE_NOT_FOUND",s}return t[n].call(i.exports,i,i.exports,e),i.exports}(()=>{{const r=e(/*! core-js-pure/features/global-this */4444),n=e(/*! react-refresh/runtime */8015);if(void 0!==r){var t="__reactRefreshInjected";"undefined"!=typeof __react_refresh_library__&&__react_refresh_library__&&(t+="_"+__react_refresh_library__),r[t]||(n.injectIntoGlobalHook(r),r[t]=!0)}}})()})();                                                                                                                                                                                                                                                                 dist/development/react-refresh-runtime.js                                                           0000644                 00000054350 15212564005 0014611 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /******/ (() => { // webpackBootstrap
/******/ 	"use strict";
/******/ 	var __webpack_modules__ = ({

/***/ 644
/*!*****************************************************************************!*\
  !*** ./node_modules/react-refresh/cjs/react-refresh-runtime.development.js ***!
  \*****************************************************************************/
(__unused_webpack_module, exports) {

/**
 * @license React
 * react-refresh-runtime.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */



if (true) {
  (function() {
'use strict';

// ATTENTION
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
var REACT_MEMO_TYPE = Symbol.for('react.memo');

var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; // We never remove these associations.
// It's OK to reference families, but use WeakMap/Set for types.

var allFamiliesByID = new Map();
var allFamiliesByType = new PossiblyWeakMap();
var allSignaturesByType = new PossiblyWeakMap(); // This WeakMap is read by React, so we only put families
// that have actually been edited here. This keeps checks fast.
// $FlowIssue

var updatedFamiliesByType = new PossiblyWeakMap(); // This is cleared on every performReactRefresh() call.
// It is an array of [Family, NextType] tuples.

var pendingUpdates = []; // This is injected by the renderer via DevTools global hook.

var helpersByRendererID = new Map();
var helpersByRoot = new Map(); // We keep track of mounted roots so we can schedule updates.

var mountedRoots = new Set(); // If a root captures an error, we remember it so we can retry on edit.

var failedRoots = new Set(); // In environments that support WeakMap, we also remember the last element for every root.
// It needs to be weak because we do this even for roots that failed to mount.
// If there is no WeakMap, we won't attempt to do retrying.
// $FlowIssue

var rootElements = // $FlowIssue
typeof WeakMap === 'function' ? new WeakMap() : null;
var isPerformingRefresh = false;

function computeFullKey(signature) {
  if (signature.fullKey !== null) {
    return signature.fullKey;
  }

  var fullKey = signature.ownKey;
  var hooks;

  try {
    hooks = signature.getCustomHooks();
  } catch (err) {
    // This can happen in an edge case, e.g. if expression like Foo.useSomething
    // depends on Foo which is lazily initialized during rendering.
    // In that case just assume we'll have to remount.
    signature.forceReset = true;
    signature.fullKey = fullKey;
    return fullKey;
  }

  for (var i = 0; i < hooks.length; i++) {
    var hook = hooks[i];

    if (typeof hook !== 'function') {
      // Something's wrong. Assume we need to remount.
      signature.forceReset = true;
      signature.fullKey = fullKey;
      return fullKey;
    }

    var nestedHookSignature = allSignaturesByType.get(hook);

    if (nestedHookSignature === undefined) {
      // No signature means Hook wasn't in the source code, e.g. in a library.
      // We'll skip it because we can assume it won't change during this session.
      continue;
    }

    var nestedHookKey = computeFullKey(nestedHookSignature);

    if (nestedHookSignature.forceReset) {
      signature.forceReset = true;
    }

    fullKey += '\n---\n' + nestedHookKey;
  }

  signature.fullKey = fullKey;
  return fullKey;
}

function haveEqualSignatures(prevType, nextType) {
  var prevSignature = allSignaturesByType.get(prevType);
  var nextSignature = allSignaturesByType.get(nextType);

  if (prevSignature === undefined && nextSignature === undefined) {
    return true;
  }

  if (prevSignature === undefined || nextSignature === undefined) {
    return false;
  }

  if (computeFullKey(prevSignature) !== computeFullKey(nextSignature)) {
    return false;
  }

  if (nextSignature.forceReset) {
    return false;
  }

  return true;
}

function isReactClass(type) {
  return type.prototype && type.prototype.isReactComponent;
}

function canPreserveStateBetween(prevType, nextType) {
  if (isReactClass(prevType) || isReactClass(nextType)) {
    return false;
  }

  if (haveEqualSignatures(prevType, nextType)) {
    return true;
  }

  return false;
}

function resolveFamily(type) {
  // Only check updated types to keep lookups fast.
  return updatedFamiliesByType.get(type);
} // If we didn't care about IE11, we could use new Map/Set(iterable).


function cloneMap(map) {
  var clone = new Map();
  map.forEach(function (value, key) {
    clone.set(key, value);
  });
  return clone;
}

function cloneSet(set) {
  var clone = new Set();
  set.forEach(function (value) {
    clone.add(value);
  });
  return clone;
} // This is a safety mechanism to protect against rogue getters and Proxies.


function getProperty(object, property) {
  try {
    return object[property];
  } catch (err) {
    // Intentionally ignore.
    return undefined;
  }
}

function performReactRefresh() {

  if (pendingUpdates.length === 0) {
    return null;
  }

  if (isPerformingRefresh) {
    return null;
  }

  isPerformingRefresh = true;

  try {
    var staleFamilies = new Set();
    var updatedFamilies = new Set();
    var updates = pendingUpdates;
    pendingUpdates = [];
    updates.forEach(function (_ref) {
      var family = _ref[0],
          nextType = _ref[1];
      // Now that we got a real edit, we can create associations
      // that will be read by the React reconciler.
      var prevType = family.current;
      updatedFamiliesByType.set(prevType, family);
      updatedFamiliesByType.set(nextType, family);
      family.current = nextType; // Determine whether this should be a re-render or a re-mount.

      if (canPreserveStateBetween(prevType, nextType)) {
        updatedFamilies.add(family);
      } else {
        staleFamilies.add(family);
      }
    }); // TODO: rename these fields to something more meaningful.

    var update = {
      updatedFamilies: updatedFamilies,
      // Families that will re-render preserving state
      staleFamilies: staleFamilies // Families that will be remounted

    };
    helpersByRendererID.forEach(function (helpers) {
      // Even if there are no roots, set the handler on first update.
      // This ensures that if *new* roots are mounted, they'll use the resolve handler.
      helpers.setRefreshHandler(resolveFamily);
    });
    var didError = false;
    var firstError = null; // We snapshot maps and sets that are mutated during commits.
    // If we don't do this, there is a risk they will be mutated while
    // we iterate over them. For example, trying to recover a failed root
    // may cause another root to be added to the failed list -- an infinite loop.

    var failedRootsSnapshot = cloneSet(failedRoots);
    var mountedRootsSnapshot = cloneSet(mountedRoots);
    var helpersByRootSnapshot = cloneMap(helpersByRoot);
    failedRootsSnapshot.forEach(function (root) {
      var helpers = helpersByRootSnapshot.get(root);

      if (helpers === undefined) {
        throw new Error('Could not find helpers for a root. This is a bug in React Refresh.');
      }

      if (!failedRoots.has(root)) {// No longer failed.
      }

      if (rootElements === null) {
        return;
      }

      if (!rootElements.has(root)) {
        return;
      }

      var element = rootElements.get(root);

      try {
        helpers.scheduleRoot(root, element);
      } catch (err) {
        if (!didError) {
          didError = true;
          firstError = err;
        } // Keep trying other roots.

      }
    });
    mountedRootsSnapshot.forEach(function (root) {
      var helpers = helpersByRootSnapshot.get(root);

      if (helpers === undefined) {
        throw new Error('Could not find helpers for a root. This is a bug in React Refresh.');
      }

      if (!mountedRoots.has(root)) {// No longer mounted.
      }

      try {
        helpers.scheduleRefresh(root, update);
      } catch (err) {
        if (!didError) {
          didError = true;
          firstError = err;
        } // Keep trying other roots.

      }
    });

    if (didError) {
      throw firstError;
    }

    return update;
  } finally {
    isPerformingRefresh = false;
  }
}
function register(type, id) {
  {
    if (type === null) {
      return;
    }

    if (typeof type !== 'function' && typeof type !== 'object') {
      return;
    } // This can happen in an edge case, e.g. if we register
    // return value of a HOC but it returns a cached component.
    // Ignore anything but the first registration for each type.


    if (allFamiliesByType.has(type)) {
      return;
    } // Create family or remember to update it.
    // None of this bookkeeping affects reconciliation
    // until the first performReactRefresh() call above.


    var family = allFamiliesByID.get(id);

    if (family === undefined) {
      family = {
        current: type
      };
      allFamiliesByID.set(id, family);
    } else {
      pendingUpdates.push([family, type]);
    }

    allFamiliesByType.set(type, family); // Visit inner types because we might not have registered them.

    if (typeof type === 'object' && type !== null) {
      switch (getProperty(type, '$$typeof')) {
        case REACT_FORWARD_REF_TYPE:
          register(type.render, id + '$render');
          break;

        case REACT_MEMO_TYPE:
          register(type.type, id + '$type');
          break;
      }
    }
  }
}
function setSignature(type, key) {
  var forceReset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  var getCustomHooks = arguments.length > 3 ? arguments[3] : undefined;

  {
    if (!allSignaturesByType.has(type)) {
      allSignaturesByType.set(type, {
        forceReset: forceReset,
        ownKey: key,
        fullKey: null,
        getCustomHooks: getCustomHooks || function () {
          return [];
        }
      });
    } // Visit inner types because we might not have signed them.


    if (typeof type === 'object' && type !== null) {
      switch (getProperty(type, '$$typeof')) {
        case REACT_FORWARD_REF_TYPE:
          setSignature(type.render, key, forceReset, getCustomHooks);
          break;

        case REACT_MEMO_TYPE:
          setSignature(type.type, key, forceReset, getCustomHooks);
          break;
      }
    }
  }
} // This is lazily called during first render for a type.
// It captures Hook list at that time so inline requires don't break comparisons.

function collectCustomHooksForSignature(type) {
  {
    var signature = allSignaturesByType.get(type);

    if (signature !== undefined) {
      computeFullKey(signature);
    }
  }
}
function getFamilyByID(id) {
  {
    return allFamiliesByID.get(id);
  }
}
function getFamilyByType(type) {
  {
    return allFamiliesByType.get(type);
  }
}
function findAffectedHostInstances(families) {
  {
    var affectedInstances = new Set();
    mountedRoots.forEach(function (root) {
      var helpers = helpersByRoot.get(root);

      if (helpers === undefined) {
        throw new Error('Could not find helpers for a root. This is a bug in React Refresh.');
      }

      var instancesForRoot = helpers.findHostInstancesForRefresh(root, families);
      instancesForRoot.forEach(function (inst) {
        affectedInstances.add(inst);
      });
    });
    return affectedInstances;
  }
}
function injectIntoGlobalHook(globalObject) {
  {
    // For React Native, the global hook will be set up by require('react-devtools-core').
    // That code will run before us. So we need to monkeypatch functions on existing hook.
    // For React Web, the global hook will be set up by the extension.
    // This will also run before us.
    var hook = globalObject.__REACT_DEVTOOLS_GLOBAL_HOOK__;

    if (hook === undefined) {
      // However, if there is no DevTools extension, we'll need to set up the global hook ourselves.
      // Note that in this case it's important that renderer code runs *after* this method call.
      // Otherwise, the renderer will think that there is no global hook, and won't do the injection.
      var nextID = 0;
      globalObject.__REACT_DEVTOOLS_GLOBAL_HOOK__ = hook = {
        renderers: new Map(),
        supportsFiber: true,
        inject: function (injected) {
          return nextID++;
        },
        onScheduleFiberRoot: function (id, root, children) {},
        onCommitFiberRoot: function (id, root, maybePriorityLevel, didError) {},
        onCommitFiberUnmount: function () {}
      };
    }

    if (hook.isDisabled) {
      // This isn't a real property on the hook, but it can be set to opt out
      // of DevTools integration and associated warnings and logs.
      // Using console['warn'] to evade Babel and ESLint
      console['warn']('Something has shimmed the React DevTools global hook (__REACT_DEVTOOLS_GLOBAL_HOOK__). ' + 'Fast Refresh is not compatible with this shim and will be disabled.');
      return;
    } // Here, we just want to get a reference to scheduleRefresh.


    var oldInject = hook.inject;

    hook.inject = function (injected) {
      var id = oldInject.apply(this, arguments);

      if (typeof injected.scheduleRefresh === 'function' && typeof injected.setRefreshHandler === 'function') {
        // This version supports React Refresh.
        helpersByRendererID.set(id, injected);
      }

      return id;
    }; // Do the same for any already injected roots.
    // This is useful if ReactDOM has already been initialized.
    // https://github.com/facebook/react/issues/17626


    hook.renderers.forEach(function (injected, id) {
      if (typeof injected.scheduleRefresh === 'function' && typeof injected.setRefreshHandler === 'function') {
        // This version supports React Refresh.
        helpersByRendererID.set(id, injected);
      }
    }); // We also want to track currently mounted roots.

    var oldOnCommitFiberRoot = hook.onCommitFiberRoot;

    var oldOnScheduleFiberRoot = hook.onScheduleFiberRoot || function () {};

    hook.onScheduleFiberRoot = function (id, root, children) {
      if (!isPerformingRefresh) {
        // If it was intentionally scheduled, don't attempt to restore.
        // This includes intentionally scheduled unmounts.
        failedRoots.delete(root);

        if (rootElements !== null) {
          rootElements.set(root, children);
        }
      }

      return oldOnScheduleFiberRoot.apply(this, arguments);
    };

    hook.onCommitFiberRoot = function (id, root, maybePriorityLevel, didError) {
      var helpers = helpersByRendererID.get(id);

      if (helpers !== undefined) {
        helpersByRoot.set(root, helpers);
        var current = root.current;
        var alternate = current.alternate; // We need to determine whether this root has just (un)mounted.
        // This logic is copy-pasted from similar logic in the DevTools backend.
        // If this breaks with some refactoring, you'll want to update DevTools too.

        if (alternate !== null) {
          var wasMounted = alternate.memoizedState != null && alternate.memoizedState.element != null && mountedRoots.has(root);
          var isMounted = current.memoizedState != null && current.memoizedState.element != null;

          if (!wasMounted && isMounted) {
            // Mount a new root.
            mountedRoots.add(root);
            failedRoots.delete(root);
          } else if (wasMounted && isMounted) ; else if (wasMounted && !isMounted) {
            // Unmount an existing root.
            mountedRoots.delete(root);

            if (didError) {
              // We'll remount it on future edits.
              failedRoots.add(root);
            } else {
              helpersByRoot.delete(root);
            }
          } else if (!wasMounted && !isMounted) {
            if (didError) {
              // We'll remount it on future edits.
              failedRoots.add(root);
            }
          }
        } else {
          // Mount a new root.
          mountedRoots.add(root);
        }
      } // Always call the decorated DevTools hook.


      return oldOnCommitFiberRoot.apply(this, arguments);
    };
  }
}
function hasUnrecoverableErrors() {
  // TODO: delete this after removing dependency in RN.
  return false;
} // Exposed for testing.

function _getMountedRootCount() {
  {
    return mountedRoots.size;
  }
} // This is a wrapper over more primitive functions for setting signature.
// Signatures let us decide whether the Hook order has changed on refresh.
//
// This function is intended to be used as a transform target, e.g.:
// var _s = createSignatureFunctionForTransform()
//
// function Hello() {
//   const [foo, setFoo] = useState(0);
//   const value = useCustomHook();
//   _s(); /* Call without arguments triggers collecting the custom Hook list.
//          * This doesn't happen during the module evaluation because we
//          * don't want to change the module order with inline requires.
//          * Next calls are noops. */
//   return <h1>Hi</h1>;
// }
//
// /* Call with arguments attaches the signature to the type: */
// _s(
//   Hello,
//   'useState{[foo, setFoo]}(0)',
//   () => [useCustomHook], /* Lazy to avoid triggering inline requires */
// );

function createSignatureFunctionForTransform() {
  {
    var savedType;
    var hasCustomHooks;
    var didCollectHooks = false;
    return function (type, key, forceReset, getCustomHooks) {
      if (typeof key === 'string') {
        // We're in the initial phase that associates signatures
        // with the functions. Note this may be called multiple times
        // in HOC chains like _s(hoc1(_s(hoc2(_s(actualFunction))))).
        if (!savedType) {
          // We're in the innermost call, so this is the actual type.
          savedType = type;
          hasCustomHooks = typeof getCustomHooks === 'function';
        } // Set the signature for all types (even wrappers!) in case
        // they have no signatures of their own. This is to prevent
        // problems like https://github.com/facebook/react/issues/20417.


        if (type != null && (typeof type === 'function' || typeof type === 'object')) {
          setSignature(type, key, forceReset, getCustomHooks);
        }

        return type;
      } else {
        // We're in the _s() call without arguments, which means
        // this is the time to collect custom Hook signatures.
        // Only do this once. This path is hot and runs *inside* every render!
        if (!didCollectHooks && hasCustomHooks) {
          didCollectHooks = true;
          collectCustomHooksForSignature(savedType);
        }
      }
    };
  }
}
function isLikelyComponentType(type) {
  {
    switch (typeof type) {
      case 'function':
        {
          // First, deal with classes.
          if (type.prototype != null) {
            if (type.prototype.isReactComponent) {
              // React class.
              return true;
            }

            var ownNames = Object.getOwnPropertyNames(type.prototype);

            if (ownNames.length > 1 || ownNames[0] !== 'constructor') {
              // This looks like a class.
              return false;
            } // eslint-disable-next-line no-proto


            if (type.prototype.__proto__ !== Object.prototype) {
              // It has a superclass.
              return false;
            } // Pass through.
            // This looks like a regular function with empty prototype.

          } // For plain functions and arrows, use name as a heuristic.


          var name = type.name || type.displayName;
          return typeof name === 'string' && /^[A-Z]/.test(name);
        }

      case 'object':
        {
          if (type != null) {
            switch (getProperty(type, '$$typeof')) {
              case REACT_FORWARD_REF_TYPE:
              case REACT_MEMO_TYPE:
                // Definitely React components.
                return true;

              default:
                return false;
            }
          }

          return false;
        }

      default:
        {
          return false;
        }
    }
  }
}

exports._getMountedRootCount = _getMountedRootCount;
exports.collectCustomHooksForSignature = collectCustomHooksForSignature;
exports.createSignatureFunctionForTransform = createSignatureFunctionForTransform;
exports.findAffectedHostInstances = findAffectedHostInstances;
exports.getFamilyByID = getFamilyByID;
exports.getFamilyByType = getFamilyByType;
exports.hasUnrecoverableErrors = hasUnrecoverableErrors;
exports.injectIntoGlobalHook = injectIntoGlobalHook;
exports.isLikelyComponentType = isLikelyComponentType;
exports.performReactRefresh = performReactRefresh;
exports.register = register;
exports.setSignature = setSignature;
  })();
}


/***/ },

/***/ 206
/*!***********************************************!*\
  !*** ./node_modules/react-refresh/runtime.js ***!
  \***********************************************/
(module, __unused_webpack_exports, __webpack_require__) {



if (false) // removed by dead control flow
{} else {
  module.exports = __webpack_require__(/*! ./cjs/react-refresh-runtime.development.js */ 644);
}


/***/ }

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		if (!(moduleId in __webpack_modules__)) {
/******/ 			delete __webpack_module_cache__[moduleId];
/******/ 			var e = new Error("Cannot find module '" + moduleId + "'");
/******/ 			e.code = 'MODULE_NOT_FOUND';
/******/ 			throw e;
/******/ 		}
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/******/ 	
/******/ 	// startup
/******/ 	// Load entry module and return exports
/******/ 	// This entry module used 'module' so it can't be inlined
/******/ 	var __webpack_exports__ = __webpack_require__(206);
/******/ 	window.ReactRefreshRuntime = __webpack_exports__;
/******/ 	
/******/ })()
;                                                                                                                                                                                                                                                                                        dist/development/react-refresh-runtime.min.js                                                       0000644                 00000012571 15212564005 0015372 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       (()=>{"use strict";var e={644(e,t){(function(){var e=Symbol.for("react.forward_ref"),n=Symbol.for("react.memo"),r="function"==typeof WeakMap?WeakMap:Map,o=new Map,i=new r,f=new r,a=new r,u=[],c=new Map,s=new Map,l=new Set,d=new Set,p="function"==typeof WeakMap?new WeakMap:null,h=!1;function y(e){if(null!==e.fullKey)return e.fullKey;var t,n=e.ownKey;try{t=e.getCustomHooks()}catch(t){return e.forceReset=!0,e.fullKey=n,n}for(var r=0;r<t.length;r++){var o=t[r];if("function"!=typeof o)return e.forceReset=!0,e.fullKey=n,n;var i=f.get(o);if(void 0!==i){var a=y(i);i.forceReset&&(e.forceReset=!0),n+="\n---\n"+a}}return e.fullKey=n,n}function v(e){return e.prototype&&e.prototype.isReactComponent}function m(e,t){return!v(e)&&!v(t)&&!!function(e,t){var n=f.get(e),r=f.get(t);return void 0===n&&void 0===r||void 0!==n&&void 0!==r&&y(n)===y(r)&&!r.forceReset}(e,t)}function R(e){return a.get(e)}function w(e){var t=new Set;return e.forEach((function(e){t.add(e)})),t}function g(e,t){try{return e[t]}catch(e){return}}function b(t,r){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0;if(f.has(t)||f.set(t,{forceReset:o,ownKey:r,fullKey:null,getCustomHooks:i||function(){return[]}}),"object"==typeof t&&null!==t)switch(g(t,"$$typeof")){case e:b(t.render,r,o,i);break;case n:b(t.type,r,o,i)}}function _(e){var t=f.get(e);void 0!==t&&y(t)}t._getMountedRootCount=function(){return l.size},t.collectCustomHooksForSignature=_,t.createSignatureFunctionForTransform=function(){var e,t,n=!1;return function(r,o,i,f){if("string"==typeof o)return e||(e=r,t="function"==typeof f),null==r||"function"!=typeof r&&"object"!=typeof r||b(r,o,i,f),r;!n&&t&&(n=!0,_(e))}},t.findAffectedHostInstances=function(e){var t=new Set;return l.forEach((function(n){var r=s.get(n);if(void 0===r)throw new Error("Could not find helpers for a root. This is a bug in React Refresh.");r.findHostInstancesForRefresh(n,e).forEach((function(e){t.add(e)}))})),t},t.getFamilyByID=function(e){return o.get(e)},t.getFamilyByType=function(e){return i.get(e)},t.hasUnrecoverableErrors=function(){return!1},t.injectIntoGlobalHook=function(e){var t=e.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(void 0===t){var n=0;e.__REACT_DEVTOOLS_GLOBAL_HOOK__=t={renderers:new Map,supportsFiber:!0,inject:function(e){return n++},onScheduleFiberRoot:function(e,t,n){},onCommitFiberRoot:function(e,t,n,r){},onCommitFiberUnmount:function(){}}}if(t.isDisabled)console.warn("Something has shimmed the React DevTools global hook (__REACT_DEVTOOLS_GLOBAL_HOOK__). Fast Refresh is not compatible with this shim and will be disabled.");else{var r=t.inject;t.inject=function(e){var t=r.apply(this,arguments);return"function"==typeof e.scheduleRefresh&&"function"==typeof e.setRefreshHandler&&c.set(t,e),t},t.renderers.forEach((function(e,t){"function"==typeof e.scheduleRefresh&&"function"==typeof e.setRefreshHandler&&c.set(t,e)}));var o=t.onCommitFiberRoot,i=t.onScheduleFiberRoot||function(){};t.onScheduleFiberRoot=function(e,t,n){return h||(d.delete(t),null!==p&&p.set(t,n)),i.apply(this,arguments)},t.onCommitFiberRoot=function(e,t,n,r){var i=c.get(e);if(void 0!==i){s.set(t,i);var f=t.current,a=f.alternate;if(null!==a){var u=null!=a.memoizedState&&null!=a.memoizedState.element&&l.has(t),p=null!=f.memoizedState&&null!=f.memoizedState.element;!u&&p?(l.add(t),d.delete(t)):u&&p||(u&&!p?(l.delete(t),r?d.add(t):s.delete(t)):u||p||r&&d.add(t))}else l.add(t)}return o.apply(this,arguments)}}},t.isLikelyComponentType=function(t){switch(typeof t){case"function":if(null!=t.prototype){if(t.prototype.isReactComponent)return!0;var r=Object.getOwnPropertyNames(t.prototype);if(r.length>1||"constructor"!==r[0])return!1;if(t.prototype.__proto__!==Object.prototype)return!1}var o=t.name||t.displayName;return"string"==typeof o&&/^[A-Z]/.test(o);case"object":if(null!=t)switch(g(t,"$$typeof")){case e:case n:return!0;default:return!1}return!1;default:return!1}},t.performReactRefresh=function(){if(0===u.length)return null;if(h)return null;h=!0;try{var e=new Set,t=new Set,n=u;u=[],n.forEach((function(n){var r=n[0],o=n[1],i=r.current;a.set(i,r),a.set(o,r),r.current=o,m(i,o)?t.add(r):e.add(r)}));var r={updatedFamilies:t,staleFamilies:e};c.forEach((function(e){e.setRefreshHandler(R)}));var o=!1,i=null,f=w(d),y=w(l),v=(g=s,b=new Map,g.forEach((function(e,t){b.set(t,e)})),b);if(f.forEach((function(e){var t=v.get(e);if(void 0===t)throw new Error("Could not find helpers for a root. This is a bug in React Refresh.");if(d.has(e),null!==p&&p.has(e)){var n=p.get(e);try{t.scheduleRoot(e,n)}catch(e){o||(o=!0,i=e)}}})),y.forEach((function(e){var t=v.get(e);if(void 0===t)throw new Error("Could not find helpers for a root. This is a bug in React Refresh.");l.has(e);try{t.scheduleRefresh(e,r)}catch(e){o||(o=!0,i=e)}})),o)throw i;return r}finally{h=!1}var g,b},t.register=function t(r,f){if(null!==r&&("function"==typeof r||"object"==typeof r)&&!i.has(r)){var a=o.get(f);if(void 0===a?(a={current:r},o.set(f,a)):u.push([a,r]),i.set(r,a),"object"==typeof r&&null!==r)switch(g(r,"$$typeof")){case e:t(r.render,f+"$render");break;case n:t(r.type,f+"$type")}}},t.setSignature=b})()},206(e,t,n){e.exports=n(/*! ./cjs/react-refresh-runtime.development.js */644)}},t={};var n=function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};if(!(r in e)){delete t[r];var f=new Error("Cannot find module '"+r+"'");throw f.code="MODULE_NOT_FOUND",f}return e[r](i,i.exports,n),i.exports}(206);window.ReactRefreshRuntime=n})();                                                                                                                                       dist/dom-ready.js                                                                                   0000644                 00000002744 15212564006 0007736 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).domReady = (() => {
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // packages/dom-ready/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    default: () => domReady
  });
  function domReady(callback) {
    if (typeof document === "undefined") {
      return;
    }
    if (document.readyState === "complete" || // DOMContentLoaded + Images/Styles/etc loaded, so we call directly.
    document.readyState === "interactive") {
      return void callback();
    }
    document.addEventListener("DOMContentLoaded", callback);
  }
  return __toCommonJS(index_exports);
})();
if (typeof wp.domReady === 'object' && wp.domReady.default) { wp.domReady = wp.domReady.default; }
                            dist/dom-ready.min.js                                                                               0000644                 00000001417 15212564007 0010515 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).domReady=(()=>{var o=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var f=(e,t)=>{for(var n in t)o(e,n,{get:t[n],enumerable:!0})},m=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let d of a(t))!i.call(e,d)&&d!==n&&o(e,d,{get:()=>t[d],enumerable:!(r=u(t,d))||r.enumerable});return e};var c=e=>m(o({},"__esModule",{value:!0}),e);var p={};f(p,{default:()=>y});function y(e){if(!(typeof document>"u")){if(document.readyState==="complete"||document.readyState==="interactive")return void e();document.addEventListener("DOMContentLoaded",e)}}return c(p);})();
if (typeof wp.domReady === 'object' && wp.domReady.default) { wp.domReady = wp.domReady.default; }
                                                                                                                                                                                                                                                 dist/dom.js                                                                                         0000644                 00000105165 15212564011 0006631 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).dom = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/deprecated
  var require_deprecated = __commonJS({
    "package-external:@wordpress/deprecated"(exports, module) {
      module.exports = window.wp.deprecated;
    }
  });

  // packages/dom/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    __unstableStripHTML: () => stripHTML,
    computeCaretRect: () => computeCaretRect,
    documentHasSelection: () => documentHasSelection,
    documentHasTextSelection: () => documentHasTextSelection,
    documentHasUncollapsedSelection: () => documentHasUncollapsedSelection,
    focus: () => focus,
    getFilesFromDataTransfer: () => getFilesFromDataTransfer,
    getOffsetParent: () => getOffsetParent,
    getPhrasingContentSchema: () => getPhrasingContentSchema,
    getRectangleFromRange: () => getRectangleFromRange,
    getScrollContainer: () => getScrollContainer,
    insertAfter: () => insertAfter,
    isEmpty: () => isEmpty,
    isEntirelySelected: () => isEntirelySelected,
    isFormElement: () => isFormElement,
    isHorizontalEdge: () => isHorizontalEdge,
    isNumberInput: () => isNumberInput,
    isPhrasingContent: () => isPhrasingContent,
    isRTL: () => isRTL,
    isSelectionForward: () => isSelectionForward,
    isTextContent: () => isTextContent,
    isTextField: () => isTextField,
    isVerticalEdge: () => isVerticalEdge,
    placeCaretAtHorizontalEdge: () => placeCaretAtHorizontalEdge,
    placeCaretAtVerticalEdge: () => placeCaretAtVerticalEdge,
    remove: () => remove,
    removeInvalidHTML: () => removeInvalidHTML,
    replace: () => replace,
    replaceTag: () => replaceTag,
    safeHTML: () => safeHTML,
    unwrap: () => unwrap,
    wrap: () => wrap
  });

  // packages/dom/build-module/focusable.mjs
  var focusable_exports = {};
  __export(focusable_exports, {
    find: () => find
  });
  function buildSelector(sequential) {
    return [
      sequential ? '[tabindex]:not([tabindex^="-"])' : "[tabindex]",
      "a[href]",
      "button:not([disabled])",
      'input:not([type="hidden"]):not([disabled])',
      "select:not([disabled])",
      "textarea:not([disabled])",
      'iframe:not([tabindex^="-"])',
      "object",
      "embed",
      "summary",
      "area[href]",
      "[contenteditable]:not([contenteditable=false])"
    ].join(",");
  }
  function isVisible(element) {
    return element.offsetWidth > 0 || element.offsetHeight > 0 || element.getClientRects().length > 0;
  }
  function isValidFocusableArea(element) {
    const map = element.closest("map[name]");
    if (!map) {
      return false;
    }
    const img = element.ownerDocument.querySelector(
      'img[usemap="#' + map.name + '"]'
    );
    return !!img && isVisible(img);
  }
  function find(context, { sequential = false } = {}) {
    const elements = context.querySelectorAll(buildSelector(sequential));
    return Array.from(elements).filter((element) => {
      if (!isVisible(element)) {
        return false;
      }
      if (element.closest("[inert]")) {
        return false;
      }
      const { nodeName } = element;
      if ("AREA" === nodeName) {
        return isValidFocusableArea(
          /** @type {HTMLAreaElement} */
          element
        );
      }
      return true;
    });
  }

  // packages/dom/build-module/tabbable.mjs
  var tabbable_exports = {};
  __export(tabbable_exports, {
    find: () => find2,
    findNext: () => findNext,
    findPrevious: () => findPrevious,
    isTabbableIndex: () => isTabbableIndex
  });
  function getTabIndex(element) {
    const tabIndex = element.getAttribute("tabindex");
    return tabIndex === null ? 0 : parseInt(tabIndex, 10);
  }
  function isTabbableIndex(element) {
    return getTabIndex(element) !== -1;
  }
  function createStatefulCollapseRadioGroup() {
    const CHOSEN_RADIO_BY_NAME = {};
    return function collapseRadioGroup(result, element) {
      const { nodeName, type, checked, name } = element;
      if (nodeName !== "INPUT" || type !== "radio" || !name) {
        return result.concat(element);
      }
      const hasChosen = CHOSEN_RADIO_BY_NAME.hasOwnProperty(name);
      const isChosen = checked || !hasChosen;
      if (!isChosen) {
        return result;
      }
      if (hasChosen) {
        const hadChosenElement = CHOSEN_RADIO_BY_NAME[name];
        result = result.filter((e) => e !== hadChosenElement);
      }
      CHOSEN_RADIO_BY_NAME[name] = element;
      return result.concat(element);
    };
  }
  function mapElementToObjectTabbable(element, index) {
    return { element, index };
  }
  function mapObjectTabbableToElement(object) {
    return object.element;
  }
  function compareObjectTabbables(a, b) {
    const aTabIndex = getTabIndex(a.element);
    const bTabIndex = getTabIndex(b.element);
    if (aTabIndex === bTabIndex) {
      return a.index - b.index;
    }
    return aTabIndex - bTabIndex;
  }
  function filterTabbable(focusables) {
    return focusables.filter(isTabbableIndex).map(mapElementToObjectTabbable).sort(compareObjectTabbables).map(mapObjectTabbableToElement).reduce(createStatefulCollapseRadioGroup(), []);
  }
  function find2(context) {
    return filterTabbable(find(context));
  }
  function findPrevious(element) {
    return filterTabbable(find(element.ownerDocument.body)).reverse().find(
      (focusable) => (
        // eslint-disable-next-line no-bitwise
        element.compareDocumentPosition(focusable) & element.DOCUMENT_POSITION_PRECEDING
      )
    );
  }
  function findNext(element) {
    return filterTabbable(find(element.ownerDocument.body)).find(
      (focusable) => (
        // eslint-disable-next-line no-bitwise
        element.compareDocumentPosition(focusable) & element.DOCUMENT_POSITION_FOLLOWING
      )
    );
  }

  // packages/dom/build-module/utils/assert-is-defined.mjs
  function assertIsDefined(val, name) {
    if (val === void 0 || val === null) {
      throw new Error(
        `Expected '${name}' to be defined, but received ${val}`
      );
    }
  }

  // packages/dom/build-module/dom/get-rectangle-from-range.mjs
  function getRectangleFromRange(range) {
    if (!range.collapsed) {
      const rects2 = Array.from(range.getClientRects());
      if (rects2.length === 1) {
        return rects2[0];
      }
      const filteredRects = rects2.filter(({ width }) => width > 1);
      if (filteredRects.length === 0) {
        return range.getBoundingClientRect();
      }
      if (filteredRects.length === 1) {
        return filteredRects[0];
      }
      let {
        top: furthestTop,
        bottom: furthestBottom,
        left: furthestLeft,
        right: furthestRight
      } = filteredRects[0];
      for (const { top, bottom, left, right } of filteredRects) {
        if (top < furthestTop) {
          furthestTop = top;
        }
        if (bottom > furthestBottom) {
          furthestBottom = bottom;
        }
        if (left < furthestLeft) {
          furthestLeft = left;
        }
        if (right > furthestRight) {
          furthestRight = right;
        }
      }
      return new window.DOMRect(
        furthestLeft,
        furthestTop,
        furthestRight - furthestLeft,
        furthestBottom - furthestTop
      );
    }
    const { startContainer } = range;
    const { ownerDocument } = startContainer;
    if (startContainer.nodeName === "BR") {
      const { parentNode } = startContainer;
      assertIsDefined(parentNode, "parentNode");
      const index = (
        /** @type {Node[]} */
        Array.from(parentNode.childNodes).indexOf(startContainer)
      );
      assertIsDefined(ownerDocument, "ownerDocument");
      range = ownerDocument.createRange();
      range.setStart(parentNode, index);
      range.setEnd(parentNode, index);
    }
    const rects = range.getClientRects();
    if (rects.length > 1) {
      return null;
    }
    let rect = rects[0];
    if (!rect || rect.height === 0) {
      assertIsDefined(ownerDocument, "ownerDocument");
      const padNode = ownerDocument.createTextNode("\u200B");
      range = range.cloneRange();
      range.insertNode(padNode);
      rect = range.getClientRects()[0];
      assertIsDefined(padNode.parentNode, "padNode.parentNode");
      padNode.parentNode.removeChild(padNode);
    }
    return rect;
  }

  // packages/dom/build-module/dom/compute-caret-rect.mjs
  function computeCaretRect(win) {
    const selection = win.getSelection();
    assertIsDefined(selection, "selection");
    const range = selection.rangeCount ? selection.getRangeAt(0) : null;
    if (!range) {
      return null;
    }
    return getRectangleFromRange(range);
  }

  // packages/dom/build-module/dom/document-has-text-selection.mjs
  function documentHasTextSelection(doc) {
    assertIsDefined(doc.defaultView, "doc.defaultView");
    const selection = doc.defaultView.getSelection();
    assertIsDefined(selection, "selection");
    const range = selection.rangeCount ? selection.getRangeAt(0) : null;
    return !!range && !range.collapsed;
  }

  // packages/dom/build-module/dom/is-html-input-element.mjs
  function isHTMLInputElement(node) {
    return node?.nodeName === "INPUT";
  }

  // packages/dom/build-module/dom/is-text-field.mjs
  function isTextField(node) {
    const nonTextInputs = [
      "button",
      "checkbox",
      "hidden",
      "file",
      "radio",
      "image",
      "range",
      "reset",
      "submit",
      "number",
      "email",
      "time"
    ];
    return isHTMLInputElement(node) && node.type && !nonTextInputs.includes(node.type) || node.nodeName === "TEXTAREA" || /** @type {HTMLElement} */
    node.contentEditable === "true";
  }

  // packages/dom/build-module/dom/input-field-has-uncollapsed-selection.mjs
  function inputFieldHasUncollapsedSelection(element) {
    if (!isHTMLInputElement(element) && !isTextField(element)) {
      return false;
    }
    try {
      const { selectionStart, selectionEnd } = (
        /** @type {HTMLInputElement | HTMLTextAreaElement} */
        element
      );
      return (
        // `null` means the input type doesn't implement selection, thus we
        // cannot determine whether the selection is collapsed, so we
        // default to true.
        selectionStart === null || // when not null, compare the two points
        selectionStart !== selectionEnd
      );
    } catch (error) {
      return true;
    }
  }

  // packages/dom/build-module/dom/document-has-uncollapsed-selection.mjs
  function documentHasUncollapsedSelection(doc) {
    return documentHasTextSelection(doc) || !!doc.activeElement && inputFieldHasUncollapsedSelection(doc.activeElement);
  }

  // packages/dom/build-module/dom/document-has-selection.mjs
  function documentHasSelection(doc) {
    return !!doc.activeElement && (isHTMLInputElement(doc.activeElement) || isTextField(doc.activeElement) || documentHasTextSelection(doc));
  }

  // packages/dom/build-module/dom/get-computed-style.mjs
  function getComputedStyle(element) {
    assertIsDefined(
      element.ownerDocument.defaultView,
      "element.ownerDocument.defaultView"
    );
    return element.ownerDocument.defaultView.getComputedStyle(element);
  }

  // packages/dom/build-module/dom/get-scroll-container.mjs
  function getScrollContainer(node, direction = "vertical") {
    if (!node) {
      return void 0;
    }
    if (direction === "vertical" || direction === "all") {
      if (node.scrollHeight > node.clientHeight) {
        const { overflowY } = getComputedStyle(node);
        if (/(auto|scroll)/.test(overflowY)) {
          return node;
        }
      }
    }
    if (direction === "horizontal" || direction === "all") {
      if (node.scrollWidth > node.clientWidth) {
        const { overflowX } = getComputedStyle(node);
        if (/(auto|scroll)/.test(overflowX)) {
          return node;
        }
      }
    }
    if (node.ownerDocument === node.parentNode) {
      return node;
    }
    return getScrollContainer(
      /** @type {Element} */
      node.parentNode,
      direction
    );
  }

  // packages/dom/build-module/dom/get-offset-parent.mjs
  function getOffsetParent(node) {
    let closestElement;
    while (closestElement = /** @type {Node} */
    node.parentNode) {
      if (closestElement.nodeType === closestElement.ELEMENT_NODE) {
        break;
      }
    }
    if (!closestElement) {
      return null;
    }
    if (getComputedStyle(
      /** @type {Element} */
      closestElement
    ).position !== "static") {
      return closestElement;
    }
    return (
      /** @type {Node & { offsetParent: Node }} */
      closestElement.offsetParent
    );
  }

  // packages/dom/build-module/dom/is-input-or-text-area.mjs
  function isInputOrTextArea(element) {
    return element.tagName === "INPUT" || element.tagName === "TEXTAREA";
  }

  // packages/dom/build-module/dom/is-entirely-selected.mjs
  var ZWNBSP = "\uFEFF";
  function isEntirelySelected(element) {
    if (isInputOrTextArea(element)) {
      return element.selectionStart === 0 && element.value.length === element.selectionEnd;
    }
    if (!element.isContentEditable) {
      return true;
    }
    const text = element.textContent || "";
    if (text === "" || text === ZWNBSP) {
      return true;
    }
    const { ownerDocument } = element;
    const { defaultView } = ownerDocument;
    assertIsDefined(defaultView, "defaultView");
    const selection = defaultView.getSelection();
    assertIsDefined(selection, "selection");
    const range = selection.rangeCount ? selection.getRangeAt(0) : null;
    if (!range) {
      return true;
    }
    const { startContainer, endContainer, startOffset, endOffset } = range;
    if (startContainer === element && endContainer === element && startOffset === 0 && endOffset === element.childNodes.length) {
      return true;
    }
    const lastChild = element.lastChild;
    assertIsDefined(lastChild, "lastChild");
    const endContainerContentLength = endContainer.nodeType === endContainer.TEXT_NODE ? (
      /** @type {Text} */
      endContainer.data.length
    ) : endContainer.childNodes.length;
    return isDeepChild(startContainer, element, "firstChild") && isDeepChild(endContainer, element, "lastChild") && startOffset === 0 && endOffset === endContainerContentLength;
  }
  function isDeepChild(query, container, propName) {
    let candidate = container;
    do {
      if (query === candidate) {
        return true;
      }
      candidate = candidate[propName];
      while (candidate && candidate.nodeType === candidate.TEXT_NODE && candidate.nodeValue === "") {
        candidate = candidate[propName === "lastChild" ? "previousSibling" : "nextSibling"];
      }
    } while (candidate);
    return false;
  }

  // packages/dom/build-module/dom/is-form-element.mjs
  function isFormElement(element) {
    if (!element) {
      return false;
    }
    const { tagName } = element;
    const checkForInputTextarea = isInputOrTextArea(element);
    return checkForInputTextarea || tagName === "BUTTON" || tagName === "SELECT";
  }

  // packages/dom/build-module/dom/is-rtl.mjs
  function isRTL(element) {
    return getComputedStyle(element).direction === "rtl";
  }

  // packages/dom/build-module/dom/get-range-height.mjs
  function getRangeHeight(range) {
    const rects = Array.from(range.getClientRects());
    if (!rects.length) {
      return;
    }
    const highestTop = Math.min(...rects.map(({ top }) => top));
    const lowestBottom = Math.max(...rects.map(({ bottom }) => bottom));
    return lowestBottom - highestTop;
  }

  // packages/dom/build-module/dom/is-selection-forward.mjs
  function isSelectionForward(selection) {
    const { anchorNode, focusNode, anchorOffset, focusOffset } = selection;
    assertIsDefined(anchorNode, "anchorNode");
    assertIsDefined(focusNode, "focusNode");
    const position = anchorNode.compareDocumentPosition(focusNode);
    if (position & anchorNode.DOCUMENT_POSITION_PRECEDING) {
      return false;
    }
    if (position & anchorNode.DOCUMENT_POSITION_FOLLOWING) {
      return true;
    }
    if (position === 0) {
      return anchorOffset <= focusOffset;
    }
    return true;
  }

  // packages/dom/build-module/dom/caret-range-from-point.mjs
  function caretRangeFromPoint(doc, x, y) {
    if (doc.caretRangeFromPoint) {
      return doc.caretRangeFromPoint(x, y);
    }
    if (!doc.caretPositionFromPoint) {
      return null;
    }
    const point = doc.caretPositionFromPoint(x, y);
    if (!point) {
      return null;
    }
    const range = doc.createRange();
    range.setStart(point.offsetNode, point.offset);
    range.collapse(true);
    return range;
  }

  // packages/dom/build-module/dom/hidden-caret-range-from-point.mjs
  function hiddenCaretRangeFromPoint(doc, x, y, container) {
    const originalZIndex = container.style.zIndex;
    const originalPosition = container.style.position;
    const originalBorderRadius = container.style.borderRadius;
    const { position = "static" } = getComputedStyle(container);
    if (position === "static") {
      container.style.position = "relative";
    }
    container.style.zIndex = "10000";
    container.style.borderRadius = "0";
    const range = caretRangeFromPoint(doc, x, y);
    container.style.zIndex = originalZIndex;
    container.style.position = originalPosition;
    container.style.borderRadius = originalBorderRadius;
    return range;
  }

  // packages/dom/build-module/dom/scroll-if-no-range.mjs
  function scrollIfNoRange(container, alignToTop, callback) {
    let range = callback();
    if (!range || !range.startContainer || !container.contains(range.startContainer)) {
      container.scrollIntoView(alignToTop);
      range = callback();
      if (!range || !range.startContainer || !container.contains(range.startContainer)) {
        return null;
      }
    }
    return range;
  }

  // packages/dom/build-module/dom/is-edge.mjs
  function isEdge(container, isReverse, onlyVertical = false) {
    if (isInputOrTextArea(container) && typeof container.selectionStart === "number") {
      if (container.selectionStart !== container.selectionEnd) {
        return false;
      }
      if (isReverse) {
        return container.selectionStart === 0;
      }
      return container.value.length === container.selectionStart;
    }
    if (!container.isContentEditable) {
      return true;
    }
    const { ownerDocument } = container;
    const { defaultView } = ownerDocument;
    assertIsDefined(defaultView, "defaultView");
    const selection = defaultView.getSelection();
    if (!selection || !selection.rangeCount) {
      return false;
    }
    const range = selection.getRangeAt(0);
    const collapsedRange = range.cloneRange();
    const isForward = isSelectionForward(selection);
    const isCollapsed = selection.isCollapsed;
    if (!isCollapsed) {
      collapsedRange.collapse(!isForward);
    }
    const collapsedRangeRect = getRectangleFromRange(collapsedRange);
    const rangeRect = getRectangleFromRange(range);
    if (!collapsedRangeRect || !rangeRect) {
      return false;
    }
    const rangeHeight = getRangeHeight(range);
    if (!isCollapsed && rangeHeight && rangeHeight > collapsedRangeRect.height && isForward === isReverse) {
      return false;
    }
    const isReverseDir = isRTL(container) ? !isReverse : isReverse;
    const containerRect = container.getBoundingClientRect();
    const x = isReverseDir ? containerRect.left + 1 : containerRect.right - 1;
    const y = isReverse ? containerRect.top + 1 : containerRect.bottom - 1;
    const testRange = scrollIfNoRange(
      container,
      isReverse,
      () => hiddenCaretRangeFromPoint(ownerDocument, x, y, container)
    );
    if (!testRange) {
      return false;
    }
    const testRect = getRectangleFromRange(testRange);
    if (!testRect) {
      return false;
    }
    const verticalSide = isReverse ? "top" : "bottom";
    const horizontalSide = isReverseDir ? "left" : "right";
    const verticalDiff = testRect[verticalSide] - rangeRect[verticalSide];
    const horizontalDiff = testRect[horizontalSide] - collapsedRangeRect[horizontalSide];
    const hasVerticalDiff = Math.abs(verticalDiff) <= 1;
    const hasHorizontalDiff = Math.abs(horizontalDiff) <= 1;
    return onlyVertical ? hasVerticalDiff : hasVerticalDiff && hasHorizontalDiff;
  }

  // packages/dom/build-module/dom/is-horizontal-edge.mjs
  function isHorizontalEdge(container, isReverse) {
    return isEdge(container, isReverse);
  }

  // packages/dom/build-module/dom/is-number-input.mjs
  var import_deprecated = __toESM(require_deprecated(), 1);
  function isNumberInput(node) {
    (0, import_deprecated.default)("wp.dom.isNumberInput", {
      since: "6.1",
      version: "6.5"
    });
    return isHTMLInputElement(node) && node.type === "number" && !isNaN(node.valueAsNumber);
  }

  // packages/dom/build-module/dom/is-vertical-edge.mjs
  function isVerticalEdge(container, isReverse) {
    return isEdge(container, isReverse, true);
  }

  // packages/dom/build-module/dom/place-caret-at-edge.mjs
  function getRange(container, isReverse, x) {
    const { ownerDocument } = container;
    const isReverseDir = isRTL(container) ? !isReverse : isReverse;
    const containerRect = container.getBoundingClientRect();
    if (x === void 0) {
      x = isReverse ? containerRect.right - 1 : containerRect.left + 1;
    } else if (x <= containerRect.left) {
      x = containerRect.left + 1;
    } else if (x >= containerRect.right) {
      x = containerRect.right - 1;
    }
    const y = isReverseDir ? containerRect.bottom - 1 : containerRect.top + 1;
    return hiddenCaretRangeFromPoint(ownerDocument, x, y, container);
  }
  function placeCaretAtEdge(container, isReverse, x) {
    if (!container) {
      return;
    }
    container.focus();
    if (isInputOrTextArea(container)) {
      if (typeof container.selectionStart !== "number") {
        return;
      }
      if (isReverse) {
        container.selectionStart = container.value.length;
        container.selectionEnd = container.value.length;
      } else {
        container.selectionStart = 0;
        container.selectionEnd = 0;
      }
      return;
    }
    if (!container.isContentEditable) {
      return;
    }
    const range = scrollIfNoRange(
      container,
      isReverse,
      () => getRange(container, isReverse, x)
    );
    if (!range) {
      return;
    }
    const { ownerDocument } = container;
    const { defaultView } = ownerDocument;
    assertIsDefined(defaultView, "defaultView");
    const selection = defaultView.getSelection();
    assertIsDefined(selection, "selection");
    selection.removeAllRanges();
    selection.addRange(range);
  }

  // packages/dom/build-module/dom/place-caret-at-horizontal-edge.mjs
  function placeCaretAtHorizontalEdge(container, isReverse) {
    return placeCaretAtEdge(container, isReverse, void 0);
  }

  // packages/dom/build-module/dom/place-caret-at-vertical-edge.mjs
  function placeCaretAtVerticalEdge(container, isReverse, rect) {
    return placeCaretAtEdge(container, isReverse, rect?.left);
  }

  // packages/dom/build-module/dom/insert-after.mjs
  function insertAfter(newNode, referenceNode) {
    assertIsDefined(referenceNode.parentNode, "referenceNode.parentNode");
    referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
  }

  // packages/dom/build-module/dom/remove.mjs
  function remove(node) {
    assertIsDefined(node.parentNode, "node.parentNode");
    node.parentNode.removeChild(node);
  }

  // packages/dom/build-module/dom/replace.mjs
  function replace(processedNode, newNode) {
    assertIsDefined(processedNode.parentNode, "processedNode.parentNode");
    insertAfter(newNode, processedNode.parentNode);
    remove(processedNode);
  }

  // packages/dom/build-module/dom/unwrap.mjs
  function unwrap(node) {
    const parent = node.parentNode;
    assertIsDefined(parent, "node.parentNode");
    while (node.firstChild) {
      parent.insertBefore(node.firstChild, node);
    }
    parent.removeChild(node);
  }

  // packages/dom/build-module/dom/replace-tag.mjs
  function replaceTag(node, tagName) {
    const newNode = node.ownerDocument.createElement(tagName);
    while (node.firstChild) {
      newNode.appendChild(node.firstChild);
    }
    assertIsDefined(node.parentNode, "node.parentNode");
    node.parentNode.replaceChild(newNode, node);
    return newNode;
  }

  // packages/dom/build-module/dom/wrap.mjs
  function wrap(newNode, referenceNode) {
    assertIsDefined(referenceNode.parentNode, "referenceNode.parentNode");
    referenceNode.parentNode.insertBefore(newNode, referenceNode);
    newNode.appendChild(referenceNode);
  }

  // packages/dom/build-module/dom/safe-html.mjs
  function safeHTML(html) {
    const { body } = document.implementation.createHTMLDocument("");
    body.innerHTML = html;
    const elements = body.getElementsByTagName("*");
    let elementIndex = elements.length;
    while (elementIndex--) {
      const element = elements[elementIndex];
      if (element.tagName === "SCRIPT") {
        remove(element);
      } else {
        let attributeIndex = element.attributes.length;
        while (attributeIndex--) {
          const { name: key } = element.attributes[attributeIndex];
          if (key.startsWith("on")) {
            element.removeAttribute(key);
          }
        }
      }
    }
    return body.innerHTML;
  }

  // packages/dom/build-module/dom/strip-html.mjs
  function stripHTML(html) {
    html = safeHTML(html);
    const doc = document.implementation.createHTMLDocument("");
    doc.body.innerHTML = html;
    return doc.body.textContent || "";
  }

  // packages/dom/build-module/dom/is-empty.mjs
  function isEmpty(element) {
    switch (element.nodeType) {
      case element.TEXT_NODE:
        return /^[ \f\n\r\t\v\u00a0]*$/.test(element.nodeValue || "");
      case element.ELEMENT_NODE:
        if (element.hasAttributes()) {
          return false;
        } else if (!element.hasChildNodes()) {
          return true;
        }
        return (
          /** @type {Element[]} */
          Array.from(element.childNodes).every(isEmpty)
        );
      default:
        return true;
    }
  }

  // packages/dom/build-module/phrasing-content.mjs
  var textContentSchema = {
    strong: {},
    em: {},
    s: {},
    del: {},
    ins: {},
    a: { attributes: ["href", "target", "rel", "id"] },
    code: {},
    abbr: { attributes: ["title"] },
    sub: {},
    sup: {},
    br: {},
    small: {},
    // To do: fix blockquote.
    // cite: {},
    q: { attributes: ["cite"] },
    dfn: { attributes: ["title"] },
    data: { attributes: ["value"] },
    time: { attributes: ["datetime"] },
    var: {},
    samp: {},
    kbd: {},
    i: {},
    b: {},
    u: {},
    mark: {},
    ruby: {},
    rt: {},
    rp: {},
    bdi: { attributes: ["dir"] },
    bdo: { attributes: ["dir"] },
    wbr: {},
    "#text": {}
  };
  var excludedElements = ["#text", "br"];
  Object.keys(textContentSchema).filter((element) => !excludedElements.includes(element)).forEach((tag) => {
    const { [tag]: removedTag, ...restSchema } = textContentSchema;
    textContentSchema[tag].children = restSchema;
  });
  var embeddedContentSchema = {
    audio: {
      attributes: [
        "src",
        "preload",
        "autoplay",
        "mediagroup",
        "loop",
        "muted"
      ]
    },
    canvas: { attributes: ["width", "height"] },
    embed: { attributes: ["src", "type", "width", "height"] },
    img: {
      attributes: [
        "alt",
        "src",
        "srcset",
        "usemap",
        "ismap",
        "width",
        "height"
      ]
    },
    object: {
      attributes: [
        "data",
        "type",
        "name",
        "usemap",
        "form",
        "width",
        "height"
      ]
    },
    video: {
      attributes: [
        "src",
        "poster",
        "preload",
        "playsinline",
        "autoplay",
        "mediagroup",
        "loop",
        "muted",
        "controls",
        "width",
        "height"
      ]
    },
    math: {
      attributes: ["display", "xmlns"],
      children: "*"
    }
  };
  var phrasingContentSchema = {
    ...textContentSchema,
    ...embeddedContentSchema
  };
  function getPhrasingContentSchema(context) {
    if (context !== "paste") {
      return phrasingContentSchema;
    }
    const {
      u,
      // Used to mark misspelling. Shouldn't be pasted.
      abbr,
      // Invisible.
      data,
      // Invisible.
      time,
      // Invisible.
      wbr,
      // Invisible.
      bdi,
      // Invisible.
      bdo,
      // Invisible.
      ...remainingContentSchema
    } = {
      ...phrasingContentSchema,
      // We shouldn't paste potentially sensitive information which is not
      // visible to the user when pasted, so strip the attributes.
      ins: { children: phrasingContentSchema.ins.children },
      del: { children: phrasingContentSchema.del.children }
    };
    return remainingContentSchema;
  }
  function isPhrasingContent(node) {
    const tag = node.nodeName.toLowerCase();
    return getPhrasingContentSchema().hasOwnProperty(tag) || tag === "span";
  }
  function isTextContent(node) {
    const tag = node.nodeName.toLowerCase();
    return textContentSchema.hasOwnProperty(tag) || tag === "span";
  }

  // packages/dom/build-module/dom/is-element.mjs
  function isElement(node) {
    return !!node && node.nodeType === node.ELEMENT_NODE;
  }

  // packages/dom/build-module/dom/clean-node-list.mjs
  var noop = () => {
  };
  function cleanNodeList(nodeList, doc, schema, inline) {
    Array.from(nodeList).forEach(
      (node) => {
        const tag = node.nodeName.toLowerCase();
        if (schema.hasOwnProperty(tag) && (!schema[tag].isMatch || schema[tag].isMatch?.(node))) {
          if (isElement(node)) {
            const {
              attributes = [],
              classes = [],
              children,
              require: require2 = [],
              allowEmpty
            } = schema[tag];
            if (children && !allowEmpty && isEmpty(node)) {
              remove(node);
              return;
            }
            if (node.hasAttributes()) {
              Array.from(node.attributes).forEach(({ name }) => {
                if (name !== "class" && !attributes.includes(name)) {
                  node.removeAttribute(name);
                }
              });
              if (node.classList && node.classList.length) {
                const mattchers = classes.map((item) => {
                  if (item === "*") {
                    return () => true;
                  } else if (typeof item === "string") {
                    return (className) => className === item;
                  } else if (item instanceof RegExp) {
                    return (className) => item.test(className);
                  }
                  return noop;
                });
                Array.from(node.classList).forEach((name) => {
                  if (!mattchers.some(
                    (isMatch) => isMatch(name)
                  )) {
                    node.classList.remove(name);
                  }
                });
                if (!node.classList.length) {
                  node.removeAttribute("class");
                }
              }
            }
            if (node.hasChildNodes()) {
              if (children === "*") {
                return;
              }
              if (children) {
                if (require2.length && !node.querySelector(require2.join(","))) {
                  cleanNodeList(
                    node.childNodes,
                    doc,
                    schema,
                    inline
                  );
                  unwrap(node);
                } else if (node.parentNode && node.parentNode.nodeName === "BODY" && isPhrasingContent(node)) {
                  cleanNodeList(
                    node.childNodes,
                    doc,
                    schema,
                    inline
                  );
                  if (Array.from(node.childNodes).some(
                    (child) => !isPhrasingContent(child)
                  )) {
                    unwrap(node);
                  }
                } else {
                  cleanNodeList(
                    node.childNodes,
                    doc,
                    children,
                    inline
                  );
                }
              } else {
                while (node.firstChild) {
                  remove(node.firstChild);
                }
              }
            }
          }
        } else {
          cleanNodeList(node.childNodes, doc, schema, inline);
          if (inline && !isPhrasingContent(node) && node.nextElementSibling) {
            insertAfter(doc.createElement("br"), node);
          }
          unwrap(node);
        }
      }
    );
  }

  // packages/dom/build-module/dom/remove-invalid-html.mjs
  function removeInvalidHTML(HTML, schema, inline) {
    const doc = document.implementation.createHTMLDocument("");
    doc.body.innerHTML = HTML;
    cleanNodeList(doc.body.childNodes, doc, schema, inline);
    return doc.body.innerHTML;
  }

  // packages/dom/build-module/data-transfer.mjs
  function getFilesFromDataTransfer(dataTransfer) {
    const files = Array.from(dataTransfer.files);
    Array.from(dataTransfer.items).forEach((item) => {
      const file = item.getAsFile();
      if (file && !files.find(
        ({ name, type, size }) => name === file.name && type === file.type && size === file.size
      )) {
        files.push(file);
      }
    });
    return files;
  }

  // packages/dom/build-module/index.mjs
  var focus = { focusable: focusable_exports, tabbable: tabbable_exports };
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                                                                                                           dist/dom.min.js                                                                                     0000644                 00000031167 15212564011 0007413 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).dom=(()=>{var Dt=Object.create;var v=Object.defineProperty;var At=Object.getOwnPropertyDescriptor;var vt=Object.getOwnPropertyNames;var Ot=Object.getPrototypeOf,Lt=Object.prototype.hasOwnProperty;var Ht=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),B=(t,e)=>{for(var r in e)v(t,r,{get:e[r],enumerable:!0})},Z=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of vt(e))!Lt.call(t,n)&&n!==r&&v(t,n,{get:()=>e[n],enumerable:!(o=At(e,n))||o.enumerable});return t};var Ft=(t,e,r)=>(r=t!=null?Dt(Ot(t)):{},Z(e||!t||!t.__esModule?v(r,"default",{value:t,enumerable:!0}):r,t)),Pt=t=>Z(v({},"__esModule",{value:!0}),t);var ut=Ht((Ye,lt)=>{lt.exports=window.wp.deprecated});var Qt={};B(Qt,{__unstableStripHTML:()=>Nt,computeCaretRect:()=>K,documentHasSelection:()=>et,documentHasTextSelection:()=>E,documentHasUncollapsedSelection:()=>tt,focus:()=>Kt,getFilesFromDataTransfer:()=>Jt,getOffsetParent:()=>rt,getPhrasingContentSchema:()=>Et,getRectangleFromRange:()=>h,getScrollContainer:()=>W,insertAfter:()=>y,isEmpty:()=>R,isEntirelySelected:()=>nt,isFormElement:()=>it,isHorizontalEdge:()=>ft,isNumberInput:()=>dt,isPhrasingContent:()=>A,isRTL:()=>T,isSelectionForward:()=>O,isTextContent:()=>Zt,isTextField:()=>C,isVerticalEdge:()=>mt,placeCaretAtHorizontalEdge:()=>pt,placeCaretAtVerticalEdge:()=>gt,remove:()=>g,removeInvalidHTML:()=>Tt,replace:()=>ht,replaceTag:()=>bt,safeHTML:()=>M,unwrap:()=>w,wrap:()=>xt});var z={};B(z,{find:()=>S});function Mt(t){return[t?'[tabindex]:not([tabindex^="-"])':"[tabindex]","a[href]","button:not([disabled])",'input:not([type="hidden"]):not([disabled])',"select:not([disabled])","textarea:not([disabled])",'iframe:not([tabindex^="-"])',"object","embed","summary","area[href]","[contenteditable]:not([contenteditable=false])"].join(",")}function $(t){return t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0}function Vt(t){let e=t.closest("map[name]");if(!e)return!1;let r=t.ownerDocument.querySelector('img[usemap="#'+e.name+'"]');return!!r&&$(r)}function S(t,{sequential:e=!1}={}){let r=t.querySelectorAll(Mt(e));return Array.from(r).filter(o=>{if(!$(o)||o.closest("[inert]"))return!1;let{nodeName:n}=o;return n==="AREA"?Vt(o):!0})}var k={};B(k,{find:()=>jt,findNext:()=>Wt,findPrevious:()=>kt,isTabbableIndex:()=>J});function U(t){let e=t.getAttribute("tabindex");return e===null?0:parseInt(e,10)}function J(t){return U(t)!==-1}function _t(){let t={};return function(r,o){let{nodeName:n,type:i,checked:a,name:s}=o;if(n!=="INPUT"||i!=="radio"||!s)return r.concat(o);let f=t.hasOwnProperty(s);if(!(a||!f))return r;if(f){let d=t[s];r=r.filter(l=>l!==d)}return t[s]=o,r.concat(o)}}function Bt(t,e){return{element:t,index:e}}function zt(t){return t.element}function Ut(t,e){let r=U(t.element),o=U(e.element);return r===o?t.index-e.index:r-o}function j(t){return t.filter(J).map(Bt).sort(Ut).map(zt).reduce(_t(),[])}function jt(t){return j(S(t))}function kt(t){return j(S(t.ownerDocument.body)).reverse().find(e=>t.compareDocumentPosition(e)&t.DOCUMENT_POSITION_PRECEDING)}function Wt(t){return j(S(t.ownerDocument.body)).find(e=>t.compareDocumentPosition(e)&t.DOCUMENT_POSITION_FOLLOWING)}function h(t){if(!t.collapsed){let i=Array.from(t.getClientRects());if(i.length===1)return i[0];let a=i.filter(({width:l})=>l>1);if(a.length===0)return t.getBoundingClientRect();if(a.length===1)return a[0];let{top:s,bottom:f,left:u,right:d}=a[0];for(let{top:l,bottom:c,left:m,right:N}of a)l<s&&(s=l),c>f&&(f=c),m<u&&(u=m),N>d&&(d=N);return new window.DOMRect(u,s,d-u,f-s)}let{startContainer:e}=t,{ownerDocument:r}=e;if(e.nodeName==="BR"){let{parentNode:i}=e;let a=Array.from(i.childNodes).indexOf(e);t=r.createRange(),t.setStart(i,a),t.setEnd(i,a)}let o=t.getClientRects();if(o.length>1)return null;let n=o[0];if(!n||n.height===0){let i=r.createTextNode("\u200B");t=t.cloneRange(),t.insertNode(i),n=t.getClientRects()[0],i.parentNode,i.parentNode.removeChild(i)}return n}function K(t){let e=t.getSelection();let r=e.rangeCount?e.getRangeAt(0):null;return r?h(r):null}function E(t){t.defaultView;let e=t.defaultView.getSelection();let r=e.rangeCount?e.getRangeAt(0):null;return!!r&&!r.collapsed}function b(t){return t?.nodeName==="INPUT"}function C(t){let e=["button","checkbox","hidden","file","radio","image","range","reset","submit","number","email","time"];return b(t)&&t.type&&!e.includes(t.type)||t.nodeName==="TEXTAREA"||t.contentEditable==="true"}function Q(t){if(!b(t)&&!C(t))return!1;try{let{selectionStart:e,selectionEnd:r}=t;return e===null||e!==r}catch{return!0}}function tt(t){return E(t)||!!t.activeElement&&Q(t.activeElement)}function et(t){return!!t.activeElement&&(b(t.activeElement)||C(t.activeElement)||E(t))}function p(t){return t.ownerDocument.defaultView,t.ownerDocument.defaultView.getComputedStyle(t)}function W(t,e="vertical"){if(t){if((e==="vertical"||e==="all")&&t.scrollHeight>t.clientHeight){let{overflowY:r}=p(t);if(/(auto|scroll)/.test(r))return t}if((e==="horizontal"||e==="all")&&t.scrollWidth>t.clientWidth){let{overflowX:r}=p(t);if(/(auto|scroll)/.test(r))return t}return t.ownerDocument===t.parentNode?t:W(t.parentNode,e)}}function rt(t){let e;for(;(e=t.parentNode)&&e.nodeType!==e.ELEMENT_NODE;);return e?p(e).position!=="static"?e:e.offsetParent:null}function x(t){return t.tagName==="INPUT"||t.tagName==="TEXTAREA"}var qt="\uFEFF";function nt(t){if(x(t))return t.selectionStart===0&&t.value.length===t.selectionEnd;if(!t.isContentEditable)return!0;let e=t.textContent||"";if(e===""||e===qt)return!0;let{ownerDocument:r}=t,{defaultView:o}=r;let n=o.getSelection();let i=n.rangeCount?n.getRangeAt(0):null;if(!i)return!0;let{startContainer:a,endContainer:s,startOffset:f,endOffset:u}=i;if(a===t&&s===t&&f===0&&u===t.childNodes.length)return!0;let d=t.lastChild;let l=s.nodeType===s.TEXT_NODE?s.data.length:s.childNodes.length;return ot(a,t,"firstChild")&&ot(s,t,"lastChild")&&f===0&&u===l}function ot(t,e,r){let o=e;do{if(t===o)return!0;for(o=o[r];o&&o.nodeType===o.TEXT_NODE&&o.nodeValue==="";)o=o[r==="lastChild"?"previousSibling":"nextSibling"]}while(o);return!1}function it(t){if(!t)return!1;let{tagName:e}=t;return x(t)||e==="BUTTON"||e==="SELECT"}function T(t){return p(t).direction==="rtl"}function at(t){let e=Array.from(t.getClientRects());if(!e.length)return;let r=Math.min(...e.map(({top:n})=>n));return Math.max(...e.map(({bottom:n})=>n))-r}function O(t){let{anchorNode:e,focusNode:r,anchorOffset:o,focusOffset:n}=t;let i=e.compareDocumentPosition(r);return i&e.DOCUMENT_POSITION_PRECEDING?!1:i&e.DOCUMENT_POSITION_FOLLOWING?!0:i===0?o<=n:!0}function st(t,e,r){if(t.caretRangeFromPoint)return t.caretRangeFromPoint(e,r);if(!t.caretPositionFromPoint)return null;let o=t.caretPositionFromPoint(e,r);if(!o)return null;let n=t.createRange();return n.setStart(o.offsetNode,o.offset),n.collapse(!0),n}function L(t,e,r,o){let n=o.style.zIndex,i=o.style.position,a=o.style.borderRadius,{position:s="static"}=p(o);s==="static"&&(o.style.position="relative"),o.style.zIndex="10000",o.style.borderRadius="0";let f=st(t,e,r);return o.style.zIndex=n,o.style.position=i,o.style.borderRadius=a,f}function H(t,e,r){let o=r();return(!o||!o.startContainer||!t.contains(o.startContainer))&&(t.scrollIntoView(e),o=r(),!o||!o.startContainer||!t.contains(o.startContainer))?null:o}function F(t,e,r=!1){if(x(t)&&typeof t.selectionStart=="number")return t.selectionStart!==t.selectionEnd?!1:e?t.selectionStart===0:t.value.length===t.selectionStart;if(!t.isContentEditable)return!0;let{ownerDocument:o}=t,{defaultView:n}=o;let i=n.getSelection();if(!i||!i.rangeCount)return!1;let a=i.getRangeAt(0),s=a.cloneRange(),f=O(i),u=i.isCollapsed;u||s.collapse(!f);let d=h(s),l=h(a);if(!d||!l)return!1;let c=at(a);if(!u&&c&&c>d.height&&f===e)return!1;let m=T(t)?!e:e,N=t.getBoundingClientRect(),yt=m?N.left+1:N.right-1,wt=e?N.top+1:N.bottom-1,q=H(t,e,()=>L(o,yt,wt,t));if(!q)return!1;let _=h(q);if(!_)return!1;let G=e?"top":"bottom",X=m?"left":"right",It=_[G]-l[G],St=_[X]-d[X],Y=Math.abs(It)<=1,Rt=Math.abs(St)<=1;return r?Y:Y&&Rt}function ft(t,e){return F(t,e)}var ct=Ft(ut(),1);function dt(t){return(0,ct.default)("wp.dom.isNumberInput",{since:"6.1",version:"6.5"}),b(t)&&t.type==="number"&&!isNaN(t.valueAsNumber)}function mt(t,e){return F(t,e,!0)}function Gt(t,e,r){let{ownerDocument:o}=t,n=T(t)?!e:e,i=t.getBoundingClientRect();r===void 0?r=e?i.right-1:i.left+1:r<=i.left?r=i.left+1:r>=i.right&&(r=i.right-1);let a=n?i.bottom-1:i.top+1;return L(o,r,a,t)}function P(t,e,r){if(!t)return;if(t.focus(),x(t)){if(typeof t.selectionStart!="number")return;e?(t.selectionStart=t.value.length,t.selectionEnd=t.value.length):(t.selectionStart=0,t.selectionEnd=0);return}if(!t.isContentEditable)return;let o=H(t,e,()=>Gt(t,e,r));if(!o)return;let{ownerDocument:n}=t,{defaultView:i}=n;let a=i.getSelection();a.removeAllRanges(),a.addRange(o)}function pt(t,e){return P(t,e,void 0)}function gt(t,e,r){return P(t,e,r?.left)}function y(t,e){e.parentNode,e.parentNode.insertBefore(t,e.nextSibling)}function g(t){t.parentNode,t.parentNode.removeChild(t)}function ht(t,e){t.parentNode,y(e,t.parentNode),g(t)}function w(t){let e=t.parentNode;for(;t.firstChild;)e.insertBefore(t.firstChild,t);e.removeChild(t)}function bt(t,e){let r=t.ownerDocument.createElement(e);for(;t.firstChild;)r.appendChild(t.firstChild);return t.parentNode,t.parentNode.replaceChild(r,t),r}function xt(t,e){e.parentNode,e.parentNode.insertBefore(t,e),t.appendChild(e)}function M(t){let{body:e}=document.implementation.createHTMLDocument("");e.innerHTML=t;let r=e.getElementsByTagName("*"),o=r.length;for(;o--;){let n=r[o];if(n.tagName==="SCRIPT")g(n);else{let i=n.attributes.length;for(;i--;){let{name:a}=n.attributes[i];a.startsWith("on")&&n.removeAttribute(a)}}}return e.innerHTML}function Nt(t){t=M(t);let e=document.implementation.createHTMLDocument("");return e.body.innerHTML=t,e.body.textContent||""}function R(t){switch(t.nodeType){case t.TEXT_NODE:return/^[ \f\n\r\t\v\u00a0]*$/.test(t.nodeValue||"");case t.ELEMENT_NODE:return t.hasAttributes()?!1:t.hasChildNodes()?Array.from(t.childNodes).every(R):!0;default:return!0}}var D={strong:{},em:{},s:{},del:{},ins:{},a:{attributes:["href","target","rel","id"]},code:{},abbr:{attributes:["title"]},sub:{},sup:{},br:{},small:{},q:{attributes:["cite"]},dfn:{attributes:["title"]},data:{attributes:["value"]},time:{attributes:["datetime"]},var:{},samp:{},kbd:{},i:{},b:{},u:{},mark:{},ruby:{},rt:{},rp:{},bdi:{attributes:["dir"]},bdo:{attributes:["dir"]},wbr:{},"#text":{}},Xt=["#text","br"];Object.keys(D).filter(t=>!Xt.includes(t)).forEach(t=>{let{[t]:e,...r}=D;D[t].children=r});var Yt={audio:{attributes:["src","preload","autoplay","mediagroup","loop","muted"]},canvas:{attributes:["width","height"]},embed:{attributes:["src","type","width","height"]},img:{attributes:["alt","src","srcset","usemap","ismap","width","height"]},object:{attributes:["data","type","name","usemap","form","width","height"]},video:{attributes:["src","poster","preload","playsinline","autoplay","mediagroup","loop","muted","controls","width","height"]},math:{attributes:["display","xmlns"],children:"*"}},V={...D,...Yt};function Et(t){if(t!=="paste")return V;let{u:e,abbr:r,data:o,time:n,wbr:i,bdi:a,bdo:s,...f}={...V,ins:{children:V.ins.children},del:{children:V.del.children}};return f}function A(t){let e=t.nodeName.toLowerCase();return Et().hasOwnProperty(e)||e==="span"}function Zt(t){let e=t.nodeName.toLowerCase();return D.hasOwnProperty(e)||e==="span"}function Ct(t){return!!t&&t.nodeType===t.ELEMENT_NODE}var $t=()=>{};function I(t,e,r,o){Array.from(t).forEach(n=>{let i=n.nodeName.toLowerCase();if(r.hasOwnProperty(i)&&(!r[i].isMatch||r[i].isMatch?.(n))){if(Ct(n)){let{attributes:a=[],classes:s=[],children:f,require:u=[],allowEmpty:d}=r[i];if(f&&!d&&R(n)){g(n);return}if(n.hasAttributes()&&(Array.from(n.attributes).forEach(({name:l})=>{l!=="class"&&!a.includes(l)&&n.removeAttribute(l)}),n.classList&&n.classList.length)){let l=s.map(c=>c==="*"?()=>!0:typeof c=="string"?m=>m===c:c instanceof RegExp?m=>c.test(m):$t);Array.from(n.classList).forEach(c=>{l.some(m=>m(c))||n.classList.remove(c)}),n.classList.length||n.removeAttribute("class")}if(n.hasChildNodes()){if(f==="*")return;if(f)u.length&&!n.querySelector(u.join(","))?(I(n.childNodes,e,r,o),w(n)):n.parentNode&&n.parentNode.nodeName==="BODY"&&A(n)?(I(n.childNodes,e,r,o),Array.from(n.childNodes).some(l=>!A(l))&&w(n)):I(n.childNodes,e,f,o);else for(;n.firstChild;)g(n.firstChild)}}}else I(n.childNodes,e,r,o),o&&!A(n)&&n.nextElementSibling&&y(e.createElement("br"),n),w(n)})}function Tt(t,e,r){let o=document.implementation.createHTMLDocument("");return o.body.innerHTML=t,I(o.body.childNodes,o,e,r),o.body.innerHTML}function Jt(t){let e=Array.from(t.files);return Array.from(t.items).forEach(r=>{let o=r.getAsFile();o&&!e.find(({name:n,type:i,size:a})=>n===o.name&&i===o.type&&a===o.size)&&e.push(o)}),e}var Kt={focusable:z,tabbable:k};return Pt(Qt);})();
                                                                                                                                                                                                                                                                                                                                                                                                         dist/edit-post.js                                                                                   0000644                 00000352625 15212564011 0007767 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;
(wp ||= {}).editPost = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/blocks
  var require_blocks = __commonJS({
    "package-external:@wordpress/blocks"(exports, module) {
      module.exports = window.wp.blocks;
    }
  });

  // package-external:@wordpress/block-library
  var require_block_library = __commonJS({
    "package-external:@wordpress/block-library"(exports, module) {
      module.exports = window.wp.blockLibrary;
    }
  });

  // package-external:@wordpress/deprecated
  var require_deprecated = __commonJS({
    "package-external:@wordpress/deprecated"(exports, module) {
      module.exports = window.wp.deprecated;
    }
  });

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/preferences
  var require_preferences = __commonJS({
    "package-external:@wordpress/preferences"(exports, module) {
      module.exports = window.wp.preferences;
    }
  });

  // package-external:@wordpress/widgets
  var require_widgets = __commonJS({
    "package-external:@wordpress/widgets"(exports, module) {
      module.exports = window.wp.widgets;
    }
  });

  // package-external:@wordpress/editor
  var require_editor = __commonJS({
    "package-external:@wordpress/editor"(exports, module) {
      module.exports = window.wp.editor;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // package-external:@wordpress/components
  var require_components = __commonJS({
    "package-external:@wordpress/components"(exports, module) {
      module.exports = window.wp.components;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // package-external:@wordpress/primitives
  var require_primitives = __commonJS({
    "package-external:@wordpress/primitives"(exports, module) {
      module.exports = window.wp.primitives;
    }
  });

  // package-external:@wordpress/private-apis
  var require_private_apis = __commonJS({
    "package-external:@wordpress/private-apis"(exports, module) {
      module.exports = window.wp.privateApis;
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // package-external:@wordpress/block-editor
  var require_block_editor = __commonJS({
    "package-external:@wordpress/block-editor"(exports, module) {
      module.exports = window.wp.blockEditor;
    }
  });

  // package-external:@wordpress/style-engine
  var require_style_engine = __commonJS({
    "package-external:@wordpress/style-engine"(exports, module) {
      module.exports = window.wp.styleEngine;
    }
  });

  // package-external:@wordpress/plugins
  var require_plugins = __commonJS({
    "package-external:@wordpress/plugins"(exports, module) {
      module.exports = window.wp.plugins;
    }
  });

  // package-external:@wordpress/notices
  var require_notices = __commonJS({
    "package-external:@wordpress/notices"(exports, module) {
      module.exports = window.wp.notices;
    }
  });

  // package-external:@wordpress/commands
  var require_commands = __commonJS({
    "package-external:@wordpress/commands"(exports, module) {
      module.exports = window.wp.commands;
    }
  });

  // package-external:@wordpress/url
  var require_url = __commonJS({
    "package-external:@wordpress/url"(exports, module) {
      module.exports = window.wp.url;
    }
  });

  // package-external:@wordpress/html-entities
  var require_html_entities = __commonJS({
    "package-external:@wordpress/html-entities"(exports, module) {
      module.exports = window.wp.htmlEntities;
    }
  });

  // package-external:@wordpress/core-data
  var require_core_data = __commonJS({
    "package-external:@wordpress/core-data"(exports, module) {
      module.exports = window.wp.coreData;
    }
  });

  // package-external:@wordpress/keyboard-shortcuts
  var require_keyboard_shortcuts = __commonJS({
    "package-external:@wordpress/keyboard-shortcuts"(exports, module) {
      module.exports = window.wp.keyboardShortcuts;
    }
  });

  // package-external:@wordpress/api-fetch
  var require_api_fetch = __commonJS({
    "package-external:@wordpress/api-fetch"(exports, module) {
      module.exports = window.wp.apiFetch;
    }
  });

  // package-external:@wordpress/hooks
  var require_hooks = __commonJS({
    "package-external:@wordpress/hooks"(exports, module) {
      module.exports = window.wp.hooks;
    }
  });

  // package-external:@wordpress/keycodes
  var require_keycodes = __commonJS({
    "package-external:@wordpress/keycodes"(exports, module) {
      module.exports = window.wp.keycodes;
    }
  });

  // packages/edit-post/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    PluginBlockSettingsMenuItem: () => PluginBlockSettingsMenuItem,
    PluginDocumentSettingPanel: () => PluginDocumentSettingPanel,
    PluginMoreMenuItem: () => PluginMoreMenuItem,
    PluginPostPublishPanel: () => PluginPostPublishPanel,
    PluginPostStatusInfo: () => PluginPostStatusInfo,
    PluginPrePublishPanel: () => PluginPrePublishPanel,
    PluginSidebar: () => PluginSidebar,
    PluginSidebarMoreMenuItem: () => PluginSidebarMoreMenuItem,
    __experimentalFullscreenModeClose: () => fullscreen_mode_close_default,
    __experimentalMainDashboardButton: () => __experimentalMainDashboardButton,
    __experimentalPluginPostExcerpt: () => __experimentalPluginPostExcerpt,
    initializeEditor: () => initializeEditor,
    reinitializeEditor: () => reinitializeEditor,
    store: () => store
  });
  var import_blocks3 = __toESM(require_blocks(), 1);
  var import_block_library2 = __toESM(require_block_library(), 1);
  var import_deprecated4 = __toESM(require_deprecated(), 1);
  var import_element13 = __toESM(require_element(), 1);
  var import_data26 = __toESM(require_data(), 1);
  var import_preferences11 = __toESM(require_preferences(), 1);
  var import_widgets = __toESM(require_widgets(), 1);
  var import_editor20 = __toESM(require_editor(), 1);

  // node_modules/clsx/dist/clsx.mjs
  function 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 = 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 = r(e)) && (n && (n += " "), n += t);
    return n;
  }
  var clsx_default = clsx;

  // packages/admin-ui/build-module/navigable-region/index.mjs
  var import_element = __toESM(require_element(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  var NavigableRegion = (0, import_element.forwardRef)(
    ({ children, className, ariaLabel, as: Tag = "div", ...props }, ref) => {
      return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
        Tag,
        {
          ref,
          className: clsx_default("admin-ui-navigable-region", className),
          "aria-label": ariaLabel,
          role: "region",
          tabIndex: "-1",
          ...props,
          children
        }
      );
    }
  );
  NavigableRegion.displayName = "NavigableRegion";
  var navigable_region_default = NavigableRegion;

  // packages/icons/build-module/library/arrow-up-left.mjs
  var import_primitives = __toESM(require_primitives(), 1);
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  var arrow_up_left_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives.Path, { d: "M14 6H6v8h1.5V8.5L17 18l1-1-9.5-9.5H14V6Z" }) });

  // packages/icons/build-module/library/chevron-down.mjs
  var import_primitives2 = __toESM(require_primitives(), 1);
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
  var chevron_down_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives2.Path, { d: "M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z" }) });

  // packages/icons/build-module/library/chevron-up.mjs
  var import_primitives3 = __toESM(require_primitives(), 1);
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
  var chevron_up_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives3.Path, { d: "M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z" }) });

  // packages/icons/build-module/library/fullscreen.mjs
  var import_primitives4 = __toESM(require_primitives(), 1);
  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
  var fullscreen_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives4.Path, { d: "M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z" }) });

  // packages/icons/build-module/library/wordpress.mjs
  var import_primitives5 = __toESM(require_primitives(), 1);
  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
  var wordpress_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives5.Path, { 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" }) });

  // packages/edit-post/build-module/components/layout/index.mjs
  var import_editor18 = __toESM(require_editor(), 1);
  var import_data25 = __toESM(require_data(), 1);
  var import_block_editor2 = __toESM(require_block_editor(), 1);

  // packages/global-styles-engine/build-module/utils/common.mjs
  var import_style_engine = __toESM(require_style_engine(), 1);
  var ROOT_BLOCK_SELECTOR = "body";
  var ROOT_CSS_PROPERTIES_SELECTOR = ":root";

  // packages/global-styles-engine/build-module/core/render.mjs
  var import_blocks = __toESM(require_blocks(), 1);
  var import_style_engine2 = __toESM(require_style_engine(), 1);
  var import_data = __toESM(require_data(), 1);

  // packages/global-styles-engine/build-module/utils/spacing.mjs
  function getSpacingPresetCssVar(value) {
    if (!value) {
      return;
    }
    const slug = value.match(/var:preset\|spacing\|(.+)/);
    if (!slug) {
      return value;
    }
    return `var(--wp--preset--spacing--${slug[1]})`;
  }

  // packages/global-styles-engine/build-module/utils/gap.mjs
  function getGapBoxControlValueFromStyle(blockGapValue) {
    if (!blockGapValue) {
      return null;
    }
    const isValueString = typeof blockGapValue === "string";
    return {
      top: isValueString ? blockGapValue : blockGapValue?.top,
      left: isValueString ? blockGapValue : blockGapValue?.left
    };
  }
  function getGapCSSValue(blockGapValue, defaultValue = "0") {
    const blockGapBoxControlValue = getGapBoxControlValueFromStyle(blockGapValue);
    if (!blockGapBoxControlValue) {
      return null;
    }
    const row = getSpacingPresetCssVar(blockGapBoxControlValue?.top) || defaultValue;
    const column = getSpacingPresetCssVar(blockGapBoxControlValue?.left) || defaultValue;
    return row === column ? row : `${row} ${column}`;
  }

  // packages/global-styles-engine/build-module/utils/layout.mjs
  var LAYOUT_DEFINITIONS = {
    default: {
      name: "default",
      slug: "flow",
      className: "is-layout-flow",
      baseStyles: [
        {
          selector: " > .alignleft",
          rules: {
            float: "left",
            "margin-inline-start": "0",
            "margin-inline-end": "2em"
          }
        },
        {
          selector: " > .alignright",
          rules: {
            float: "right",
            "margin-inline-start": "2em",
            "margin-inline-end": "0"
          }
        },
        {
          selector: " > .aligncenter",
          rules: {
            "margin-left": "auto !important",
            "margin-right": "auto !important"
          }
        }
      ],
      spacingStyles: [
        {
          selector: " > :first-child",
          rules: {
            "margin-block-start": "0"
          }
        },
        {
          selector: " > :last-child",
          rules: {
            "margin-block-end": "0"
          }
        },
        {
          selector: " > *",
          rules: {
            "margin-block-start": null,
            "margin-block-end": "0"
          }
        }
      ]
    },
    constrained: {
      name: "constrained",
      slug: "constrained",
      className: "is-layout-constrained",
      baseStyles: [
        {
          selector: " > .alignleft",
          rules: {
            float: "left",
            "margin-inline-start": "0",
            "margin-inline-end": "2em"
          }
        },
        {
          selector: " > .alignright",
          rules: {
            float: "right",
            "margin-inline-start": "2em",
            "margin-inline-end": "0"
          }
        },
        {
          selector: " > .aligncenter",
          rules: {
            "margin-left": "auto !important",
            "margin-right": "auto !important"
          }
        },
        {
          selector: " > :where(:not(.alignleft):not(.alignright):not(.alignfull))",
          rules: {
            "max-width": "var(--wp--style--global--content-size)",
            "margin-left": "auto !important",
            "margin-right": "auto !important"
          }
        },
        {
          selector: " > .alignwide",
          rules: {
            "max-width": "var(--wp--style--global--wide-size)"
          }
        }
      ],
      spacingStyles: [
        {
          selector: " > :first-child",
          rules: {
            "margin-block-start": "0"
          }
        },
        {
          selector: " > :last-child",
          rules: {
            "margin-block-end": "0"
          }
        },
        {
          selector: " > *",
          rules: {
            "margin-block-start": null,
            "margin-block-end": "0"
          }
        }
      ]
    },
    flex: {
      name: "flex",
      slug: "flex",
      className: "is-layout-flex",
      displayMode: "flex",
      baseStyles: [
        {
          selector: "",
          rules: {
            "flex-wrap": "wrap",
            "align-items": "center"
          }
        },
        {
          selector: " > :is(*, div)",
          // :is(*, div) instead of just * increases the specificity by 001.
          rules: {
            margin: "0"
          }
        }
      ],
      spacingStyles: [
        {
          selector: "",
          rules: {
            gap: null
          }
        }
      ]
    },
    grid: {
      name: "grid",
      slug: "grid",
      className: "is-layout-grid",
      displayMode: "grid",
      baseStyles: [
        {
          selector: " > :is(*, div)",
          // :is(*, div) instead of just * increases the specificity by 001.
          rules: {
            margin: "0"
          }
        }
      ],
      spacingStyles: [
        {
          selector: "",
          rules: {
            gap: null
          }
        }
      ]
    }
  };

  // packages/global-styles-engine/build-module/core/render.mjs
  function getLayoutStyles({
    layoutDefinitions = LAYOUT_DEFINITIONS,
    style,
    selector,
    hasBlockGapSupport,
    hasFallbackGapSupport,
    fallbackGapValue
  }) {
    let ruleset = "";
    let gapValue = hasBlockGapSupport ? getGapCSSValue(style?.spacing?.blockGap) : "";
    if (hasFallbackGapSupport) {
      if (selector === ROOT_BLOCK_SELECTOR) {
        gapValue = !gapValue ? "0.5em" : gapValue;
      } else if (!hasBlockGapSupport && fallbackGapValue) {
        gapValue = fallbackGapValue;
      }
    }
    if (gapValue && layoutDefinitions) {
      Object.values(layoutDefinitions).forEach(
        ({ className, name, spacingStyles }) => {
          if (!hasBlockGapSupport && "flex" !== name && "grid" !== name) {
            return;
          }
          if (spacingStyles?.length) {
            spacingStyles.forEach((spacingStyle) => {
              const declarations = [];
              if (spacingStyle.rules) {
                Object.entries(spacingStyle.rules).forEach(
                  ([cssProperty, cssValue]) => {
                    declarations.push(
                      `${cssProperty}: ${cssValue ? cssValue : gapValue}`
                    );
                  }
                );
              }
              if (declarations.length) {
                let combinedSelector = "";
                if (!hasBlockGapSupport) {
                  combinedSelector = selector === ROOT_BLOCK_SELECTOR ? `:where(.${className}${spacingStyle?.selector || ""})` : `:where(${selector}.${className}${spacingStyle?.selector || ""})`;
                } else {
                  combinedSelector = selector === ROOT_BLOCK_SELECTOR ? `:root :where(.${className})${spacingStyle?.selector || ""}` : `:root :where(${selector}-${className})${spacingStyle?.selector || ""}`;
                }
                ruleset += `${combinedSelector} { ${declarations.join(
                  "; "
                )}; }`;
              }
            });
          }
        }
      );
      if (selector === ROOT_BLOCK_SELECTOR && hasBlockGapSupport) {
        ruleset += `${ROOT_CSS_PROPERTIES_SELECTOR} { --wp--style--block-gap: ${gapValue}; }`;
      }
    }
    if (selector === ROOT_BLOCK_SELECTOR && layoutDefinitions) {
      const validDisplayModes = ["block", "flex", "grid"];
      Object.values(layoutDefinitions).forEach(
        ({ className, displayMode, baseStyles }) => {
          if (displayMode && validDisplayModes.includes(displayMode)) {
            ruleset += `${selector} .${className} { display:${displayMode}; }`;
          }
          if (baseStyles?.length) {
            baseStyles.forEach((baseStyle) => {
              const declarations = [];
              if (baseStyle.rules) {
                Object.entries(baseStyle.rules).forEach(
                  ([cssProperty, cssValue]) => {
                    declarations.push(
                      `${cssProperty}: ${cssValue}`
                    );
                  }
                );
              }
              if (declarations.length) {
                const combinedSelector = `.${className}${baseStyle?.selector || ""}`;
                ruleset += `${combinedSelector} { ${declarations.join(
                  "; "
                )}; }`;
              }
            });
          }
        }
      );
    }
    return ruleset;
  }

  // packages/edit-post/build-module/components/layout/index.mjs
  var import_plugins = __toESM(require_plugins(), 1);
  var import_i18n14 = __toESM(require_i18n(), 1);
  var import_element12 = __toESM(require_element(), 1);
  var import_notices3 = __toESM(require_notices(), 1);
  var import_preferences10 = __toESM(require_preferences(), 1);
  var import_commands2 = __toESM(require_commands(), 1);
  var import_block_library = __toESM(require_block_library(), 1);
  var import_url5 = __toESM(require_url(), 1);
  var import_html_entities = __toESM(require_html_entities(), 1);
  var import_core_data8 = __toESM(require_core_data(), 1);
  var import_components9 = __toESM(require_components(), 1);
  var import_compose3 = __toESM(require_compose(), 1);

  // packages/edit-post/build-module/components/back-button/index.mjs
  var import_editor2 = __toESM(require_editor(), 1);
  var import_components2 = __toESM(require_components(), 1);

  // packages/edit-post/build-module/components/back-button/fullscreen-mode-close.mjs
  var import_data2 = __toESM(require_data(), 1);
  var import_components = __toESM(require_components(), 1);
  var import_i18n = __toESM(require_i18n(), 1);
  var import_url = __toESM(require_url(), 1);
  var import_editor = __toESM(require_editor(), 1);
  var import_core_data = __toESM(require_core_data(), 1);
  var import_compose = __toESM(require_compose(), 1);
  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
  var siteIconVariants = {
    edit: {
      clipPath: "inset(0% round 0px)"
    },
    hover: {
      clipPath: "inset( 22% round 2px )"
    },
    tap: {
      clipPath: "inset(0% round 0px)"
    }
  };
  var toggleHomeIconVariants = {
    edit: {
      opacity: 0,
      scale: 0.2
    },
    hover: {
      opacity: 1,
      scale: 1,
      clipPath: "inset( 22% round 2px )"
    }
  };
  function FullscreenModeClose({ showTooltip, icon, href, initialPost }) {
    const { isRequestingSiteIcon, postType, siteIconUrl } = (0, import_data2.useSelect)(
      (select3) => {
        const { getCurrentPostType } = select3(import_editor.store);
        const { getEntityRecord, getPostType, isResolving } = select3(import_core_data.store);
        const siteData = getEntityRecord("root", "__unstableBase", void 0) || {};
        const _postType = initialPost?.type || getCurrentPostType();
        return {
          isRequestingSiteIcon: isResolving("getEntityRecord", [
            "root",
            "__unstableBase",
            void 0
          ]),
          postType: getPostType(_postType),
          siteIconUrl: siteData.site_icon_url
        };
      },
      [initialPost?.type]
    );
    const disableMotion = (0, import_compose.useReducedMotion)();
    const transition = {
      duration: disableMotion ? 0 : 0.2
    };
    if (!postType) {
      return null;
    }
    let siteIconContent;
    if (isRequestingSiteIcon && !siteIconUrl) {
      siteIconContent = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "edit-post-fullscreen-mode-close-site-icon__image" });
    } else if (siteIconUrl) {
      siteIconContent = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
        "img",
        {
          className: "edit-post-fullscreen-mode-close-site-icon__image",
          alt: (0, import_i18n.__)("Site Icon"),
          src: siteIconUrl
        }
      );
    } else {
      siteIconContent = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
        import_components.Icon,
        {
          className: "edit-post-fullscreen-mode-close-site-icon__icon",
          icon: wordpress_default,
          size: 48
        }
      );
    }
    const buttonIcon = icon ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_components.Icon, { size: "36px", icon }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "edit-post-fullscreen-mode-close-site-icon", children: siteIconContent });
    const classes = clsx_default("edit-post-fullscreen-mode-close", {
      "has-icon": siteIconUrl
    });
    const buttonHref = href ?? (0, import_url.addQueryArgs)("edit.php", {
      post_type: postType.slug
    });
    const buttonLabel = postType?.labels?.view_items ?? (0, import_i18n.__)("Back");
    return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
      import_components.__unstableMotion.div,
      {
        className: "edit-post-fullscreen-mode-close__view-mode-toggle",
        animate: "edit",
        initial: "edit",
        whileHover: "hover",
        whileTap: "tap",
        transition,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
            import_components.Button,
            {
              __next40pxDefaultSize: true,
              className: classes,
              href: buttonHref,
              label: buttonLabel,
              showTooltip,
              tooltipPosition: "middle right",
              children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_components.__unstableMotion.div, { variants: !disableMotion && siteIconVariants, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "edit-post-fullscreen-mode-close__view-mode-toggle-icon", children: buttonIcon }) })
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
            import_components.__unstableMotion.div,
            {
              className: clsx_default(
                "edit-post-fullscreen-mode-close__back-icon",
                {
                  "has-site-icon": siteIconUrl
                }
              ),
              variants: !disableMotion && toggleHomeIconVariants,
              children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_components.Icon, { icon: arrow_up_left_default })
            }
          )
        ]
      }
    );
  }
  var fullscreen_mode_close_default = FullscreenModeClose;

  // packages/edit-post/build-module/lock-unlock.mjs
  var import_private_apis = __toESM(require_private_apis(), 1);
  var { lock, unlock } = (0, import_private_apis.__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-post"
  );

  // packages/edit-post/build-module/components/back-button/index.mjs
  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
  var { BackButton: BackButtonFill } = unlock(import_editor2.privateApis);
  var slideX = {
    hidden: { x: "-100%" },
    distractionFreeInactive: { x: 0 },
    hover: { x: 0, transition: { type: "tween", delay: 0.2 } }
  };
  function BackButton({ initialPost }) {
    return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(BackButtonFill, { children: ({ length }) => length <= 1 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
      import_components2.__unstableMotion.div,
      {
        variants: slideX,
        transition: { type: "tween", delay: 0.8 },
        children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
          fullscreen_mode_close_default,
          {
            showTooltip: true,
            initialPost
          }
        )
      }
    ) });
  }
  var back_button_default = BackButton;

  // packages/edit-post/build-module/components/editor-initialization/listener-hooks.mjs
  var import_data3 = __toESM(require_data(), 1);
  var import_element2 = __toESM(require_element(), 1);
  var import_editor3 = __toESM(require_editor(), 1);
  var import_core_data2 = __toESM(require_core_data(), 1);

  // packages/edit-post/build-module/store/constants.mjs
  var STORE_NAME = "core/edit-post";
  var VIEW_AS_LINK_SELECTOR = "#wp-admin-bar-view a";
  var VIEW_AS_PREVIEW_LINK_SELECTOR = "#wp-admin-bar-preview a";

  // packages/edit-post/build-module/components/editor-initialization/listener-hooks.mjs
  var useUpdatePostLinkListener = () => {
    const { isViewable, newPermalink } = (0, import_data3.useSelect)((select3) => {
      const { getPostType } = select3(import_core_data2.store);
      const { getCurrentPost, getEditedPostAttribute } = select3(import_editor3.store);
      const postType = getPostType(getEditedPostAttribute("type"));
      return {
        isViewable: postType?.viewable,
        newPermalink: getCurrentPost().link
      };
    }, []);
    const nodeToUpdateRef = (0, import_element2.useRef)();
    (0, import_element2.useEffect)(() => {
      nodeToUpdateRef.current = document.querySelector(VIEW_AS_PREVIEW_LINK_SELECTOR) || document.querySelector(VIEW_AS_LINK_SELECTOR);
    }, []);
    (0, import_element2.useEffect)(() => {
      if (!newPermalink || !nodeToUpdateRef.current) {
        return;
      }
      if (!isViewable) {
        nodeToUpdateRef.current.style.display = "none";
        return;
      }
      nodeToUpdateRef.current.style.display = "";
      nodeToUpdateRef.current.setAttribute("href", newPermalink);
    }, [newPermalink, isViewable]);
  };

  // packages/edit-post/build-module/components/editor-initialization/index.mjs
  function EditorInitialization() {
    useUpdatePostLinkListener();
    return null;
  }

  // packages/edit-post/build-module/components/keyboard-shortcuts/index.mjs
  var import_element3 = __toESM(require_element(), 1);
  var import_data7 = __toESM(require_data(), 1);
  var import_keyboard_shortcuts = __toESM(require_keyboard_shortcuts(), 1);
  var import_i18n3 = __toESM(require_i18n(), 1);

  // packages/edit-post/build-module/store/index.mjs
  var import_data6 = __toESM(require_data(), 1);

  // packages/edit-post/build-module/store/reducer.mjs
  var import_data4 = __toESM(require_data(), 1);
  function isSavingMetaBoxes(state = false, action) {
    switch (action.type) {
      case "REQUEST_META_BOX_UPDATES":
        return true;
      case "META_BOX_UPDATES_SUCCESS":
      case "META_BOX_UPDATES_FAILURE":
        return false;
      default:
        return state;
    }
  }
  function mergeMetaboxes(metaboxes = [], newMetaboxes) {
    const mergedMetaboxes = [...metaboxes];
    for (const metabox of newMetaboxes) {
      const existing = mergedMetaboxes.findIndex(
        (box) => box.id === metabox.id
      );
      if (existing !== -1) {
        mergedMetaboxes[existing] = {
          ...mergedMetaboxes[existing],
          ...metabox
        };
      } else {
        mergedMetaboxes.push(metabox);
      }
    }
    return mergedMetaboxes;
  }
  function metaBoxLocations(state = {}, action) {
    switch (action.type) {
      case "SET_META_BOXES_PER_LOCATIONS": {
        const newState = { ...state };
        for (const [location, metaboxes] of Object.entries(
          action.metaBoxesPerLocation
        )) {
          newState[location] = mergeMetaboxes(
            newState[location],
            metaboxes
          );
        }
        return newState;
      }
    }
    return state;
  }
  function metaBoxesInitialized(state = false, action) {
    switch (action.type) {
      case "META_BOXES_INITIALIZED":
        return true;
    }
    return state;
  }
  var metaBoxes = (0, import_data4.combineReducers)({
    isSaving: isSavingMetaBoxes,
    locations: metaBoxLocations,
    initialized: metaBoxesInitialized
  });
  var reducer_default = (0, import_data4.combineReducers)({
    metaBoxes
  });

  // packages/edit-post/build-module/store/actions.mjs
  var actions_exports = {};
  __export(actions_exports, {
    __experimentalSetPreviewDeviceType: () => __experimentalSetPreviewDeviceType,
    __unstableCreateTemplate: () => __unstableCreateTemplate,
    closeGeneralSidebar: () => closeGeneralSidebar,
    closeModal: () => closeModal,
    closePublishSidebar: () => closePublishSidebar,
    hideBlockTypes: () => hideBlockTypes,
    initializeMetaBoxes: () => initializeMetaBoxes,
    metaBoxUpdatesFailure: () => metaBoxUpdatesFailure,
    metaBoxUpdatesSuccess: () => metaBoxUpdatesSuccess,
    openGeneralSidebar: () => openGeneralSidebar,
    openModal: () => openModal,
    openPublishSidebar: () => openPublishSidebar,
    removeEditorPanel: () => removeEditorPanel,
    requestMetaBoxUpdates: () => requestMetaBoxUpdates,
    setAvailableMetaBoxesPerLocation: () => setAvailableMetaBoxesPerLocation,
    setIsEditingTemplate: () => setIsEditingTemplate,
    setIsInserterOpened: () => setIsInserterOpened,
    setIsListViewOpened: () => setIsListViewOpened,
    showBlockTypes: () => showBlockTypes,
    switchEditorMode: () => switchEditorMode,
    toggleDistractionFree: () => toggleDistractionFree,
    toggleEditorPanelEnabled: () => toggleEditorPanelEnabled,
    toggleEditorPanelOpened: () => toggleEditorPanelOpened,
    toggleFeature: () => toggleFeature,
    toggleFullscreenMode: () => toggleFullscreenMode,
    togglePinnedPluginItem: () => togglePinnedPluginItem,
    togglePublishSidebar: () => togglePublishSidebar,
    updatePreferredStyleVariations: () => updatePreferredStyleVariations
  });
  var import_api_fetch = __toESM(require_api_fetch(), 1);
  var import_preferences = __toESM(require_preferences(), 1);
  var import_editor4 = __toESM(require_editor(), 1);
  var import_deprecated = __toESM(require_deprecated(), 1);
  var import_hooks = __toESM(require_hooks(), 1);
  var import_core_data3 = __toESM(require_core_data(), 1);
  var import_notices = __toESM(require_notices(), 1);
  var import_i18n2 = __toESM(require_i18n(), 1);

  // packages/edit-post/build-module/utils/meta-boxes.mjs
  var getMetaBoxContainer = (location) => {
    const area = document.querySelector(
      `.edit-post-meta-boxes-area.is-${location} .metabox-location-${location}`
    );
    if (area) {
      return area;
    }
    return document.querySelector("#metaboxes .metabox-location-" + location);
  };

  // packages/edit-post/build-module/store/actions.mjs
  var { interfaceStore } = unlock(import_editor4.privateApis);
  var openGeneralSidebar = (name) => ({ registry }) => {
    registry.dispatch(interfaceStore).enableComplementaryArea("core", name);
  };
  var closeGeneralSidebar = () => ({ registry }) => registry.dispatch(interfaceStore).disableComplementaryArea("core");
  var openModal = (name) => ({ registry }) => {
    (0, import_deprecated.default)("select( 'core/edit-post' ).openModal( name )", {
      since: "6.3",
      alternative: "select( 'core/interface').openModal( name )"
    });
    return registry.dispatch(interfaceStore).openModal(name);
  };
  var closeModal = () => ({ registry }) => {
    (0, import_deprecated.default)("select( 'core/edit-post' ).closeModal()", {
      since: "6.3",
      alternative: "select( 'core/interface').closeModal()"
    });
    return registry.dispatch(interfaceStore).closeModal();
  };
  var openPublishSidebar = () => ({ registry }) => {
    (0, import_deprecated.default)("dispatch( 'core/edit-post' ).openPublishSidebar", {
      since: "6.6",
      alternative: "dispatch( 'core/editor').openPublishSidebar"
    });
    registry.dispatch(import_editor4.store).openPublishSidebar();
  };
  var closePublishSidebar = () => ({ registry }) => {
    (0, import_deprecated.default)("dispatch( 'core/edit-post' ).closePublishSidebar", {
      since: "6.6",
      alternative: "dispatch( 'core/editor').closePublishSidebar"
    });
    registry.dispatch(import_editor4.store).closePublishSidebar();
  };
  var togglePublishSidebar = () => ({ registry }) => {
    (0, import_deprecated.default)("dispatch( 'core/edit-post' ).togglePublishSidebar", {
      since: "6.6",
      alternative: "dispatch( 'core/editor').togglePublishSidebar"
    });
    registry.dispatch(import_editor4.store).togglePublishSidebar();
  };
  var toggleEditorPanelEnabled = (panelName) => ({ registry }) => {
    (0, import_deprecated.default)("dispatch( 'core/edit-post' ).toggleEditorPanelEnabled", {
      since: "6.5",
      alternative: "dispatch( 'core/editor').toggleEditorPanelEnabled"
    });
    registry.dispatch(import_editor4.store).toggleEditorPanelEnabled(panelName);
  };
  var toggleEditorPanelOpened = (panelName) => ({ registry }) => {
    (0, import_deprecated.default)("dispatch( 'core/edit-post' ).toggleEditorPanelOpened", {
      since: "6.5",
      alternative: "dispatch( 'core/editor').toggleEditorPanelOpened"
    });
    registry.dispatch(import_editor4.store).toggleEditorPanelOpened(panelName);
  };
  var removeEditorPanel = (panelName) => ({ registry }) => {
    (0, import_deprecated.default)("dispatch( 'core/edit-post' ).removeEditorPanel", {
      since: "6.5",
      alternative: "dispatch( 'core/editor').removeEditorPanel"
    });
    registry.dispatch(import_editor4.store).removeEditorPanel(panelName);
  };
  var toggleFeature = (feature) => ({ registry }) => registry.dispatch(import_preferences.store).toggle("core/edit-post", feature);
  var switchEditorMode = (mode) => ({ registry }) => {
    (0, import_deprecated.default)("dispatch( 'core/edit-post' ).switchEditorMode", {
      since: "6.6",
      alternative: "dispatch( 'core/editor').switchEditorMode"
    });
    registry.dispatch(import_editor4.store).switchEditorMode(mode);
  };
  var togglePinnedPluginItem = (pluginName) => ({ registry }) => {
    const isPinned = registry.select(interfaceStore).isItemPinned("core", pluginName);
    registry.dispatch(interfaceStore)[isPinned ? "unpinItem" : "pinItem"]("core", pluginName);
  };
  function updatePreferredStyleVariations() {
    (0, import_deprecated.default)("dispatch( 'core/edit-post' ).updatePreferredStyleVariations", {
      since: "6.6",
      hint: "Preferred Style Variations are not supported anymore."
    });
    return { type: "NOTHING" };
  }
  var showBlockTypes = (blockNames) => ({ registry }) => {
    unlock(registry.dispatch(import_editor4.store)).showBlockTypes(blockNames);
  };
  var hideBlockTypes = (blockNames) => ({ registry }) => {
    unlock(registry.dispatch(import_editor4.store)).hideBlockTypes(blockNames);
  };
  function setAvailableMetaBoxesPerLocation(metaBoxesPerLocation) {
    return {
      type: "SET_META_BOXES_PER_LOCATIONS",
      metaBoxesPerLocation
    };
  }
  var requestMetaBoxUpdates = () => async ({ registry, select: select3, dispatch: dispatch2 }) => {
    dispatch2({
      type: "REQUEST_META_BOX_UPDATES"
    });
    if (window.tinyMCE) {
      window.tinyMCE.triggerSave();
    }
    const baseFormData = new window.FormData(
      document.querySelector(".metabox-base-form")
    );
    const postId = baseFormData.get("post_ID");
    const postType = baseFormData.get("post_type");
    const post = registry.select(import_core_data3.store).getEditedEntityRecord("postType", postType, postId);
    const additionalData = [
      post.comment_status ? ["comment_status", post.comment_status] : false,
      post.ping_status ? ["ping_status", post.ping_status] : false,
      post.sticky ? ["sticky", post.sticky] : false,
      post.author ? ["post_author", post.author] : false
    ].filter(Boolean);
    const activeMetaBoxLocations = select3.getActiveMetaBoxLocations();
    const formDataToMerge = [
      baseFormData,
      ...activeMetaBoxLocations.map(
        (location) => new window.FormData(getMetaBoxContainer(location))
      )
    ];
    const formData = formDataToMerge.reduce((memo, currentFormData) => {
      for (const [key, value] of currentFormData) {
        memo.append(key, value);
      }
      return memo;
    }, new window.FormData());
    additionalData.forEach(
      ([key, value]) => formData.append(key, value)
    );
    try {
      await (0, import_api_fetch.default)({
        url: window._wpMetaBoxUrl,
        method: "POST",
        body: formData,
        parse: false
      });
      dispatch2.metaBoxUpdatesSuccess();
    } catch {
      dispatch2.metaBoxUpdatesFailure();
    }
  };
  function metaBoxUpdatesSuccess() {
    return {
      type: "META_BOX_UPDATES_SUCCESS"
    };
  }
  function metaBoxUpdatesFailure() {
    return {
      type: "META_BOX_UPDATES_FAILURE"
    };
  }
  var __experimentalSetPreviewDeviceType = (deviceType) => ({ registry }) => {
    (0, import_deprecated.default)(
      "dispatch( 'core/edit-post' ).__experimentalSetPreviewDeviceType",
      {
        since: "6.5",
        version: "6.7",
        hint: "registry.dispatch( editorStore ).setDeviceType"
      }
    );
    registry.dispatch(import_editor4.store).setDeviceType(deviceType);
  };
  var setIsInserterOpened = (value) => ({ registry }) => {
    (0, import_deprecated.default)("dispatch( 'core/edit-post' ).setIsInserterOpened", {
      since: "6.5",
      alternative: "dispatch( 'core/editor').setIsInserterOpened"
    });
    registry.dispatch(import_editor4.store).setIsInserterOpened(value);
  };
  var setIsListViewOpened = (isOpen) => ({ registry }) => {
    (0, import_deprecated.default)("dispatch( 'core/edit-post' ).setIsListViewOpened", {
      since: "6.5",
      alternative: "dispatch( 'core/editor').setIsListViewOpened"
    });
    registry.dispatch(import_editor4.store).setIsListViewOpened(isOpen);
  };
  function setIsEditingTemplate() {
    (0, import_deprecated.default)("dispatch( 'core/edit-post' ).setIsEditingTemplate", {
      since: "6.5",
      alternative: "dispatch( 'core/editor').setRenderingMode"
    });
    return { type: "NOTHING" };
  }
  function __unstableCreateTemplate() {
    (0, import_deprecated.default)("dispatch( 'core/edit-post' ).__unstableCreateTemplate", {
      since: "6.5"
    });
    return { type: "NOTHING" };
  }
  var metaBoxesInitialized2 = false;
  var initializeMetaBoxes = () => ({ registry, select: select3, dispatch: dispatch2 }) => {
    const isEditorReady = registry.select(import_editor4.store).__unstableIsEditorReady();
    if (!isEditorReady) {
      return;
    }
    if (metaBoxesInitialized2) {
      return;
    }
    const postType = registry.select(import_editor4.store).getCurrentPostType();
    if (window.postboxes.page !== postType) {
      window.postboxes.add_postbox_toggles(postType);
    }
    metaBoxesInitialized2 = true;
    (0, import_hooks.addAction)(
      "editor.savePost",
      "core/edit-post/save-metaboxes",
      async (post, options) => {
        if (!options.isAutosave && select3.hasMetaBoxes()) {
          await dispatch2.requestMetaBoxUpdates();
        }
      }
    );
    dispatch2({
      type: "META_BOXES_INITIALIZED"
    });
  };
  var toggleDistractionFree = () => ({ registry }) => {
    (0, import_deprecated.default)("dispatch( 'core/edit-post' ).toggleDistractionFree", {
      since: "6.6",
      alternative: "dispatch( 'core/editor').toggleDistractionFree"
    });
    registry.dispatch(import_editor4.store).toggleDistractionFree();
  };
  var toggleFullscreenMode = () => ({ registry }) => {
    const isFullscreen = registry.select(import_preferences.store).get("core/edit-post", "fullscreenMode");
    registry.dispatch(import_preferences.store).toggle("core/edit-post", "fullscreenMode");
    registry.dispatch(import_notices.store).createInfoNotice(
      isFullscreen ? (0, import_i18n2.__)("Fullscreen mode deactivated.") : (0, import_i18n2.__)("Fullscreen mode activated."),
      {
        id: "core/edit-post/toggle-fullscreen-mode/notice",
        type: "snackbar",
        actions: [
          {
            label: (0, import_i18n2.__)("Undo"),
            onClick: () => {
              registry.dispatch(import_preferences.store).toggle(
                "core/edit-post",
                "fullscreenMode"
              );
            }
          }
        ]
      }
    );
  };

  // packages/edit-post/build-module/store/selectors.mjs
  var selectors_exports = {};
  __export(selectors_exports, {
    __experimentalGetInsertionPoint: () => __experimentalGetInsertionPoint,
    __experimentalGetPreviewDeviceType: () => __experimentalGetPreviewDeviceType,
    areMetaBoxesInitialized: () => areMetaBoxesInitialized,
    getActiveGeneralSidebarName: () => getActiveGeneralSidebarName,
    getActiveMetaBoxLocations: () => getActiveMetaBoxLocations,
    getAllMetaBoxes: () => getAllMetaBoxes,
    getEditedPostTemplate: () => getEditedPostTemplate,
    getEditorMode: () => getEditorMode,
    getHiddenBlockTypes: () => getHiddenBlockTypes,
    getMetaBoxesPerLocation: () => getMetaBoxesPerLocation,
    getPreference: () => getPreference,
    getPreferences: () => getPreferences,
    hasMetaBoxes: () => hasMetaBoxes,
    isEditingTemplate: () => isEditingTemplate,
    isEditorPanelEnabled: () => isEditorPanelEnabled,
    isEditorPanelOpened: () => isEditorPanelOpened,
    isEditorPanelRemoved: () => isEditorPanelRemoved,
    isEditorSidebarOpened: () => isEditorSidebarOpened,
    isFeatureActive: () => isFeatureActive,
    isInserterOpened: () => isInserterOpened,
    isListViewOpened: () => isListViewOpened,
    isMetaBoxLocationActive: () => isMetaBoxLocationActive,
    isMetaBoxLocationVisible: () => isMetaBoxLocationVisible,
    isModalActive: () => isModalActive,
    isPluginItemPinned: () => isPluginItemPinned,
    isPluginSidebarOpened: () => isPluginSidebarOpened,
    isPublishSidebarOpened: () => isPublishSidebarOpened,
    isSavingMetaBoxes: () => isSavingMetaBoxes2
  });
  var import_data5 = __toESM(require_data(), 1);
  var import_preferences2 = __toESM(require_preferences(), 1);
  var import_core_data4 = __toESM(require_core_data(), 1);
  var import_editor5 = __toESM(require_editor(), 1);
  var import_deprecated2 = __toESM(require_deprecated(), 1);
  var { interfaceStore: interfaceStore2 } = unlock(import_editor5.privateApis);
  var EMPTY_ARRAY = [];
  var EMPTY_OBJECT = {};
  var getEditorMode = (0, import_data5.createRegistrySelector)(
    (select3) => () => select3(import_preferences2.store).get("core", "editorMode") ?? "visual"
  );
  var isEditorSidebarOpened = (0, import_data5.createRegistrySelector)(
    (select3) => () => {
      const activeGeneralSidebar = select3(interfaceStore2).getActiveComplementaryArea("core");
      return ["edit-post/document", "edit-post/block"].includes(
        activeGeneralSidebar
      );
    }
  );
  var isPluginSidebarOpened = (0, import_data5.createRegistrySelector)(
    (select3) => () => {
      const activeGeneralSidebar = select3(interfaceStore2).getActiveComplementaryArea("core");
      return !!activeGeneralSidebar && !["edit-post/document", "edit-post/block"].includes(
        activeGeneralSidebar
      );
    }
  );
  var getActiveGeneralSidebarName = (0, import_data5.createRegistrySelector)(
    (select3) => () => {
      return select3(interfaceStore2).getActiveComplementaryArea("core");
    }
  );
  function convertPanelsToOldFormat(inactivePanels, openPanels) {
    const panelsWithEnabledState = inactivePanels?.reduce(
      (accumulatedPanels, panelName) => ({
        ...accumulatedPanels,
        [panelName]: {
          enabled: false
        }
      }),
      {}
    );
    const panels = openPanels?.reduce((accumulatedPanels, panelName) => {
      const currentPanelState = accumulatedPanels?.[panelName];
      return {
        ...accumulatedPanels,
        [panelName]: {
          ...currentPanelState,
          opened: true
        }
      };
    }, panelsWithEnabledState ?? {});
    return panels ?? panelsWithEnabledState ?? EMPTY_OBJECT;
  }
  var getPreferences = (0, import_data5.createRegistrySelector)((select3) => () => {
    (0, import_deprecated2.default)(`select( 'core/edit-post' ).getPreferences`, {
      since: "6.0",
      alternative: `select( 'core/preferences' ).get`
    });
    const corePreferences = ["editorMode", "hiddenBlockTypes"].reduce(
      (accumulatedPrefs, preferenceKey) => {
        const value = select3(import_preferences2.store).get(
          "core",
          preferenceKey
        );
        return {
          ...accumulatedPrefs,
          [preferenceKey]: value
        };
      },
      {}
    );
    const inactivePanels = select3(import_preferences2.store).get(
      "core",
      "inactivePanels"
    );
    const openPanels = select3(import_preferences2.store).get("core", "openPanels");
    const panels = convertPanelsToOldFormat(inactivePanels, openPanels);
    return {
      ...corePreferences,
      panels
    };
  });
  function getPreference(state, preferenceKey, defaultValue) {
    (0, import_deprecated2.default)(`select( 'core/edit-post' ).getPreference`, {
      since: "6.0",
      alternative: `select( 'core/preferences' ).get`
    });
    const preferences = getPreferences(state);
    const value = preferences[preferenceKey];
    return value === void 0 ? defaultValue : value;
  }
  var getHiddenBlockTypes = (0, import_data5.createRegistrySelector)((select3) => () => {
    return select3(import_preferences2.store).get("core", "hiddenBlockTypes") ?? EMPTY_ARRAY;
  });
  var isPublishSidebarOpened = (0, import_data5.createRegistrySelector)(
    (select3) => () => {
      (0, import_deprecated2.default)(`select( 'core/edit-post' ).isPublishSidebarOpened`, {
        since: "6.6",
        alternative: `select( 'core/editor' ).isPublishSidebarOpened`
      });
      return select3(import_editor5.store).isPublishSidebarOpened();
    }
  );
  var isEditorPanelRemoved = (0, import_data5.createRegistrySelector)(
    (select3) => (state, panelName) => {
      (0, import_deprecated2.default)(`select( 'core/edit-post' ).isEditorPanelRemoved`, {
        since: "6.5",
        alternative: `select( 'core/editor' ).isEditorPanelRemoved`
      });
      return select3(import_editor5.store).isEditorPanelRemoved(panelName);
    }
  );
  var isEditorPanelEnabled = (0, import_data5.createRegistrySelector)(
    (select3) => (state, panelName) => {
      (0, import_deprecated2.default)(`select( 'core/edit-post' ).isEditorPanelEnabled`, {
        since: "6.5",
        alternative: `select( 'core/editor' ).isEditorPanelEnabled`
      });
      return select3(import_editor5.store).isEditorPanelEnabled(panelName);
    }
  );
  var isEditorPanelOpened = (0, import_data5.createRegistrySelector)(
    (select3) => (state, panelName) => {
      (0, import_deprecated2.default)(`select( 'core/edit-post' ).isEditorPanelOpened`, {
        since: "6.5",
        alternative: `select( 'core/editor' ).isEditorPanelOpened`
      });
      return select3(import_editor5.store).isEditorPanelOpened(panelName);
    }
  );
  var isModalActive = (0, import_data5.createRegistrySelector)(
    (select3) => (state, modalName) => {
      (0, import_deprecated2.default)(`select( 'core/edit-post' ).isModalActive`, {
        since: "6.3",
        alternative: `select( 'core/interface' ).isModalActive`
      });
      return !!select3(interfaceStore2).isModalActive(modalName);
    }
  );
  var isFeatureActive = (0, import_data5.createRegistrySelector)(
    (select3) => (state, feature) => {
      return !!select3(import_preferences2.store).get("core/edit-post", feature);
    }
  );
  var isPluginItemPinned = (0, import_data5.createRegistrySelector)(
    (select3) => (state, pluginName) => {
      return select3(interfaceStore2).isItemPinned("core", pluginName);
    }
  );
  var getActiveMetaBoxLocations = (0, import_data5.createSelector)(
    (state) => {
      return Object.keys(state.metaBoxes.locations).filter(
        (location) => isMetaBoxLocationActive(state, location)
      );
    },
    (state) => [state.metaBoxes.locations]
  );
  var isMetaBoxLocationVisible = (0, import_data5.createRegistrySelector)(
    (select3) => (state, location) => {
      return isMetaBoxLocationActive(state, location) && getMetaBoxesPerLocation(state, location)?.some(({ id }) => {
        return select3(import_editor5.store).isEditorPanelEnabled(
          `meta-box-${id}`
        );
      });
    }
  );
  function isMetaBoxLocationActive(state, location) {
    const metaBoxes2 = getMetaBoxesPerLocation(state, location);
    return !!metaBoxes2 && metaBoxes2.length !== 0;
  }
  function getMetaBoxesPerLocation(state, location) {
    return state.metaBoxes.locations[location];
  }
  var getAllMetaBoxes = (0, import_data5.createSelector)(
    (state) => {
      return Object.values(state.metaBoxes.locations).flat();
    },
    (state) => [state.metaBoxes.locations]
  );
  function hasMetaBoxes(state) {
    return getActiveMetaBoxLocations(state).length > 0;
  }
  function isSavingMetaBoxes2(state) {
    return state.metaBoxes.isSaving;
  }
  var __experimentalGetPreviewDeviceType = (0, import_data5.createRegistrySelector)(
    (select3) => () => {
      (0, import_deprecated2.default)(
        `select( 'core/edit-site' ).__experimentalGetPreviewDeviceType`,
        {
          since: "6.5",
          version: "6.7",
          alternative: `select( 'core/editor' ).getDeviceType`
        }
      );
      return select3(import_editor5.store).getDeviceType();
    }
  );
  var isInserterOpened = (0, import_data5.createRegistrySelector)((select3) => () => {
    (0, import_deprecated2.default)(`select( 'core/edit-post' ).isInserterOpened`, {
      since: "6.5",
      alternative: `select( 'core/editor' ).isInserterOpened`
    });
    return select3(import_editor5.store).isInserterOpened();
  });
  var __experimentalGetInsertionPoint = (0, import_data5.createRegistrySelector)(
    (select3) => () => {
      (0, import_deprecated2.default)(
        `select( 'core/edit-post' ).__experimentalGetInsertionPoint`,
        {
          since: "6.5",
          version: "6.7"
        }
      );
      return unlock(select3(import_editor5.store)).getInserter();
    }
  );
  var isListViewOpened = (0, import_data5.createRegistrySelector)((select3) => () => {
    (0, import_deprecated2.default)(`select( 'core/edit-post' ).isListViewOpened`, {
      since: "6.5",
      alternative: `select( 'core/editor' ).isListViewOpened`
    });
    return select3(import_editor5.store).isListViewOpened();
  });
  var isEditingTemplate = (0, import_data5.createRegistrySelector)((select3) => () => {
    (0, import_deprecated2.default)(`select( 'core/edit-post' ).isEditingTemplate`, {
      since: "6.5",
      alternative: `select( 'core/editor' ).getRenderingMode`
    });
    return select3(import_editor5.store).getCurrentPostType() === "wp_template";
  });
  function areMetaBoxesInitialized(state) {
    return state.metaBoxes.initialized;
  }
  var getEditedPostTemplate = (0, import_data5.createRegistrySelector)(
    (select3) => () => {
      const { id: postId, type: postType } = select3(import_editor5.store).getCurrentPost();
      const templateId = unlock(select3(import_core_data4.store)).getTemplateId(
        postType,
        postId
      );
      if (!templateId) {
        return void 0;
      }
      return select3(import_core_data4.store).getEditedEntityRecord(
        "postType",
        "wp_template",
        templateId
      );
    }
  );

  // packages/edit-post/build-module/store/index.mjs
  var store = (0, import_data6.createReduxStore)(STORE_NAME, {
    reducer: reducer_default,
    actions: actions_exports,
    selectors: selectors_exports
  });
  (0, import_data6.register)(store);

  // packages/edit-post/build-module/components/keyboard-shortcuts/index.mjs
  function KeyboardShortcuts() {
    const { toggleFullscreenMode: toggleFullscreenMode2 } = (0, import_data7.useDispatch)(store);
    const { registerShortcut } = (0, import_data7.useDispatch)(import_keyboard_shortcuts.store);
    (0, import_element3.useEffect)(() => {
      registerShortcut({
        name: "core/edit-post/toggle-fullscreen",
        category: "global",
        description: (0, import_i18n3.__)("Enable or disable fullscreen mode."),
        keyCombination: {
          modifier: "secondary",
          character: "f"
        }
      });
    }, []);
    (0, import_keyboard_shortcuts.useShortcut)("core/edit-post/toggle-fullscreen", () => {
      toggleFullscreenMode2();
    });
    return null;
  }
  var keyboard_shortcuts_default = KeyboardShortcuts;

  // packages/edit-post/build-module/components/init-pattern-modal/index.mjs
  var import_data8 = __toESM(require_data(), 1);
  var import_i18n4 = __toESM(require_i18n(), 1);
  var import_components3 = __toESM(require_components(), 1);
  var import_element4 = __toESM(require_element(), 1);
  var import_editor6 = __toESM(require_editor(), 1);
  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
  function InitPatternModal() {
    const { editPost } = (0, import_data8.useDispatch)(import_editor6.store);
    const [syncType, setSyncType] = (0, import_element4.useState)(void 0);
    const [title, setTitle] = (0, import_element4.useState)("");
    const isNewPost = (0, import_data8.useSelect)(
      (select3) => select3(import_editor6.store).isCleanNewPost(),
      []
    );
    const [isModalOpen, setIsModalOpen] = (0, import_element4.useState)(() => isNewPost);
    if (!isNewPost) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: isModalOpen && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
      import_components3.Modal,
      {
        title: (0, import_i18n4.__)("Create pattern"),
        onRequestClose: () => {
          setIsModalOpen(false);
        },
        overlayClassName: "reusable-blocks-menu-items__convert-modal",
        children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
          "form",
          {
            onSubmit: (event) => {
              event.preventDefault();
              setIsModalOpen(false);
              editPost({
                title,
                meta: {
                  wp_pattern_sync_status: syncType
                }
              });
            },
            children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_components3.__experimentalVStack, { spacing: "5", children: [
              /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
                import_components3.TextControl,
                {
                  label: (0, import_i18n4.__)("Name"),
                  value: title,
                  onChange: setTitle,
                  placeholder: (0, import_i18n4.__)("My pattern"),
                  className: "patterns-create-modal__name-input",
                  __next40pxDefaultSize: true
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
                import_components3.ToggleControl,
                {
                  label: (0, import_i18n4._x)("Synced", "pattern (singular)"),
                  help: (0, import_i18n4.__)(
                    "Sync this pattern across multiple locations."
                  ),
                  checked: !syncType,
                  onChange: () => {
                    setSyncType(
                      !syncType ? "unsynced" : void 0
                    );
                  }
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_components3.__experimentalHStack, { justify: "right", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
                import_components3.Button,
                {
                  __next40pxDefaultSize: true,
                  variant: "primary",
                  type: "submit",
                  disabled: !title,
                  accessibleWhenDisabled: true,
                  children: (0, import_i18n4.__)("Create")
                }
              ) })
            ] })
          }
        )
      }
    ) });
  }

  // packages/edit-post/build-module/components/browser-url/index.mjs
  var import_element5 = __toESM(require_element(), 1);
  var import_data9 = __toESM(require_data(), 1);
  var import_url2 = __toESM(require_url(), 1);
  var import_editor7 = __toESM(require_editor(), 1);
  function getPostEditURL(postId) {
    return (0, import_url2.addQueryArgs)("post.php", { post: postId, action: "edit" });
  }
  function BrowserURL() {
    const [historyId, setHistoryId] = (0, import_element5.useState)(null);
    const { postId, postStatus } = (0, import_data9.useSelect)((select3) => {
      const { getCurrentPost } = select3(import_editor7.store);
      const post = getCurrentPost();
      let { id, status, type } = post;
      const isTemplate = ["wp_template", "wp_template_part"].includes(
        type
      );
      if (isTemplate) {
        id = post.wp_id;
      }
      return {
        postId: id,
        postStatus: status
      };
    }, []);
    (0, import_element5.useEffect)(() => {
      if (postId && postId !== historyId && postStatus !== "auto-draft") {
        window.history.replaceState(
          { id: postId },
          "Post " + postId,
          getPostEditURL(postId)
        );
        setHistoryId(postId);
      }
    }, [postId, postStatus, historyId]);
    return null;
  }

  // packages/edit-post/build-module/components/meta-boxes/index.mjs
  var import_data12 = __toESM(require_data(), 1);

  // packages/edit-post/build-module/components/meta-boxes/meta-boxes-area/index.mjs
  var import_element6 = __toESM(require_element(), 1);
  var import_components4 = __toESM(require_components(), 1);
  var import_data10 = __toESM(require_data(), 1);
  var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
  function MetaBoxesArea({ location }) {
    const container = (0, import_element6.useRef)(null);
    const formRef = (0, import_element6.useRef)(null);
    (0, import_element6.useEffect)(() => {
      formRef.current = document.querySelector(
        ".metabox-location-" + location
      );
      if (formRef.current) {
        container.current.appendChild(formRef.current);
      }
      return () => {
        if (formRef.current) {
          document.querySelector("#metaboxes").appendChild(formRef.current);
        }
      };
    }, [location]);
    const isSaving = (0, import_data10.useSelect)((select3) => {
      return select3(store).isSavingMetaBoxes();
    }, []);
    const classes = clsx_default("edit-post-meta-boxes-area", `is-${location}`, {
      "is-loading": isSaving
    });
    return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: classes, children: [
      isSaving && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_components4.Spinner, {}),
      /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
        "div",
        {
          className: "edit-post-meta-boxes-area__container",
          ref: container
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "edit-post-meta-boxes-area__clear" })
    ] });
  }
  var meta_boxes_area_default = MetaBoxesArea;

  // packages/edit-post/build-module/components/meta-boxes/meta-box-visibility.mjs
  var import_element7 = __toESM(require_element(), 1);
  var import_data11 = __toESM(require_data(), 1);
  var import_editor8 = __toESM(require_editor(), 1);
  function MetaBoxVisibility({ id }) {
    const isVisible = (0, import_data11.useSelect)(
      (select3) => {
        return select3(import_editor8.store).isEditorPanelEnabled(
          `meta-box-${id}`
        );
      },
      [id]
    );
    (0, import_element7.useEffect)(() => {
      const element = document.getElementById(id);
      if (!element) {
        return;
      }
      if (isVisible) {
        element.classList.remove("is-hidden");
      } else {
        element.classList.add("is-hidden");
      }
    }, [id, isVisible]);
    return null;
  }

  // packages/edit-post/build-module/components/meta-boxes/index.mjs
  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
  function MetaBoxes({ location }) {
    const metaBoxes2 = (0, import_data12.useSelect)(
      (select3) => select3(store).getMetaBoxesPerLocation(location),
      [location]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
      (metaBoxes2 ?? []).map(({ id }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(MetaBoxVisibility, { id }, id)),
      /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(meta_boxes_area_default, { location })
    ] });
  }

  // packages/edit-post/build-module/components/more-menu/index.mjs
  var import_i18n10 = __toESM(require_i18n(), 1);
  var import_compose2 = __toESM(require_compose(), 1);
  var import_editor14 = __toESM(require_editor(), 1);
  var import_keycodes = __toESM(require_keycodes(), 1);
  var import_preferences8 = __toESM(require_preferences(), 1);

  // packages/edit-post/build-module/components/more-menu/manage-patterns-menu-item.mjs
  var import_components5 = __toESM(require_components(), 1);
  var import_core_data5 = __toESM(require_core_data(), 1);
  var import_data13 = __toESM(require_data(), 1);
  var import_i18n5 = __toESM(require_i18n(), 1);
  var import_url3 = __toESM(require_url(), 1);
  var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
  function ManagePatternsMenuItem() {
    const url = (0, import_data13.useSelect)((select3) => {
      const { canUser } = select3(import_core_data5.store);
      const defaultUrl = (0, import_url3.addQueryArgs)("edit.php", {
        post_type: "wp_block"
      });
      const patternsUrl = (0, import_url3.addQueryArgs)("site-editor.php", {
        p: "/pattern"
      });
      return canUser("create", {
        kind: "postType",
        name: "wp_template"
      }) ? patternsUrl : defaultUrl;
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_components5.MenuItem, { role: "menuitem", href: url, children: (0, import_i18n5.__)("Manage patterns") });
  }
  var manage_patterns_menu_item_default = ManagePatternsMenuItem;

  // packages/edit-post/build-module/components/more-menu/welcome-guide-menu-item.mjs
  var import_data14 = __toESM(require_data(), 1);
  var import_preferences3 = __toESM(require_preferences(), 1);
  var import_i18n6 = __toESM(require_i18n(), 1);
  var import_editor9 = __toESM(require_editor(), 1);
  var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
  function WelcomeGuideMenuItem() {
    const isEditingTemplate2 = (0, import_data14.useSelect)(
      (select3) => select3(import_editor9.store).getCurrentPostType() === "wp_template",
      []
    );
    return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
      import_preferences3.PreferenceToggleMenuItem,
      {
        scope: "core/edit-post",
        name: isEditingTemplate2 ? "welcomeGuideTemplate" : "welcomeGuide",
        label: (0, import_i18n6.__)("Welcome Guide")
      }
    );
  }

  // packages/edit-post/build-module/components/preferences-modal/index.mjs
  var import_i18n9 = __toESM(require_i18n(), 1);
  var import_preferences7 = __toESM(require_preferences(), 1);
  var import_editor13 = __toESM(require_editor(), 1);

  // packages/edit-post/build-module/components/preferences-modal/meta-boxes-section.mjs
  var import_i18n8 = __toESM(require_i18n(), 1);
  var import_data17 = __toESM(require_data(), 1);
  var import_editor12 = __toESM(require_editor(), 1);
  var import_preferences6 = __toESM(require_preferences(), 1);

  // packages/edit-post/build-module/components/preferences-modal/enable-custom-fields.mjs
  var import_element8 = __toESM(require_element(), 1);
  var import_i18n7 = __toESM(require_i18n(), 1);
  var import_components6 = __toESM(require_components(), 1);
  var import_data15 = __toESM(require_data(), 1);
  var import_editor10 = __toESM(require_editor(), 1);
  var import_preferences4 = __toESM(require_preferences(), 1);
  var import_url4 = __toESM(require_url(), 1);
  var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
  var { PreferenceBaseOption } = unlock(import_preferences4.privateApis);
  function submitCustomFieldsForm() {
    const customFieldsForm = document.getElementById(
      "toggle-custom-fields-form"
    );
    customFieldsForm.querySelector('[name="_wp_http_referer"]').setAttribute("value", (0, import_url4.getPathAndQueryString)(window.location.href));
    customFieldsForm.submit();
  }
  function CustomFieldsConfirmation({ willEnable }) {
    const [isReloading, setIsReloading] = (0, import_element8.useState)(false);
    return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "edit-post-preferences-modal__custom-fields-confirmation-message", children: (0, import_i18n7.__)(
        "A page reload is required for this change. Make sure your content is saved before reloading."
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
        import_components6.Button,
        {
          __next40pxDefaultSize: true,
          variant: "secondary",
          isBusy: isReloading,
          accessibleWhenDisabled: true,
          disabled: isReloading,
          onClick: () => {
            setIsReloading(true);
            submitCustomFieldsForm();
          },
          children: willEnable ? (0, import_i18n7.__)("Show & Reload Page") : (0, import_i18n7.__)("Hide & Reload Page")
        }
      )
    ] });
  }
  function EnableCustomFieldsOption({ label }) {
    const areCustomFieldsEnabled = (0, import_data15.useSelect)((select3) => {
      return !!select3(import_editor10.store).getEditorSettings().enableCustomFields;
    }, []);
    const [isChecked, setIsChecked] = (0, import_element8.useState)(areCustomFieldsEnabled);
    return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
      PreferenceBaseOption,
      {
        label,
        isChecked,
        onChange: setIsChecked,
        children: isChecked !== areCustomFieldsEnabled && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CustomFieldsConfirmation, { willEnable: isChecked })
      }
    );
  }

  // packages/edit-post/build-module/components/preferences-modal/enable-panel.mjs
  var import_data16 = __toESM(require_data(), 1);
  var import_editor11 = __toESM(require_editor(), 1);
  var import_preferences5 = __toESM(require_preferences(), 1);
  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
  var { PreferenceBaseOption: PreferenceBaseOption2 } = unlock(import_preferences5.privateApis);
  function EnablePanelOption(props) {
    const { toggleEditorPanelEnabled: toggleEditorPanelEnabled2 } = (0, import_data16.useDispatch)(import_editor11.store);
    const { isChecked, isRemoved } = (0, import_data16.useSelect)(
      (select3) => {
        const { isEditorPanelEnabled: isEditorPanelEnabled2, isEditorPanelRemoved: isEditorPanelRemoved2 } = select3(import_editor11.store);
        return {
          isChecked: isEditorPanelEnabled2(props.panelName),
          isRemoved: isEditorPanelRemoved2(props.panelName)
        };
      },
      [props.panelName]
    );
    if (isRemoved) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
      PreferenceBaseOption2,
      {
        isChecked,
        onChange: () => toggleEditorPanelEnabled2(props.panelName),
        ...props
      }
    );
  }

  // packages/edit-post/build-module/components/preferences-modal/meta-boxes-section.mjs
  var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
  var { PreferencesModalSection } = unlock(import_preferences6.privateApis);
  function MetaBoxesSection({
    areCustomFieldsRegistered,
    metaBoxes: metaBoxes2,
    ...sectionProps
  }) {
    const thirdPartyMetaBoxes = metaBoxes2.filter(
      ({ id }) => id !== "postcustom"
    );
    if (!areCustomFieldsRegistered && thirdPartyMetaBoxes.length === 0) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(PreferencesModalSection, { ...sectionProps, children: [
      areCustomFieldsRegistered && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(EnableCustomFieldsOption, { label: (0, import_i18n8.__)("Custom fields") }),
      thirdPartyMetaBoxes.map(({ id, title }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
        EnablePanelOption,
        {
          label: title,
          panelName: `meta-box-${id}`
        },
        id
      ))
    ] });
  }
  var meta_boxes_section_default = (0, import_data17.withSelect)((select3) => {
    const { getEditorSettings } = select3(import_editor12.store);
    const { getAllMetaBoxes: getAllMetaBoxes2 } = select3(store);
    return {
      // This setting should not live in the block editor's store.
      areCustomFieldsRegistered: getEditorSettings().enableCustomFields !== void 0,
      metaBoxes: getAllMetaBoxes2()
    };
  })(MetaBoxesSection);

  // packages/edit-post/build-module/components/preferences-modal/index.mjs
  var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
  var { PreferenceToggleControl } = unlock(import_preferences7.privateApis);
  var { PreferencesModal } = unlock(import_editor13.privateApis);
  function EditPostPreferencesModal() {
    const extraSections = {
      general: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(meta_boxes_section_default, { title: (0, import_i18n9.__)("Advanced") }),
      appearance: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
        PreferenceToggleControl,
        {
          scope: "core/edit-post",
          featureName: "themeStyles",
          help: (0, import_i18n9.__)("Make the editor look like your theme."),
          label: (0, import_i18n9.__)("Use theme styles")
        }
      )
    };
    return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PreferencesModal, { extraSections });
  }

  // packages/edit-post/build-module/components/more-menu/index.mjs
  var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
  var { ToolsMoreMenuGroup, ViewMoreMenuGroup } = unlock(import_editor14.privateApis);
  var MoreMenu = () => {
    const isLargeViewport = (0, import_compose2.useViewportMatch)("large");
    return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
      isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ViewMoreMenuGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
        import_preferences8.PreferenceToggleMenuItem,
        {
          scope: "core/edit-post",
          name: "fullscreenMode",
          label: (0, import_i18n10.__)("Fullscreen mode"),
          info: (0, import_i18n10.__)("Show and hide the admin user interface"),
          messageActivated: (0, import_i18n10.__)("Fullscreen mode activated."),
          messageDeactivated: (0, import_i18n10.__)(
            "Fullscreen mode deactivated."
          ),
          shortcut: import_keycodes.displayShortcut.secondary("f")
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(ToolsMoreMenuGroup, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(manage_patterns_menu_item_default, {}),
        /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(WelcomeGuideMenuItem, {})
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(EditPostPreferencesModal, {})
    ] });
  };
  var more_menu_default = MoreMenu;

  // packages/edit-post/build-module/components/welcome-guide/index.mjs
  var import_data20 = __toESM(require_data(), 1);

  // packages/edit-post/build-module/components/welcome-guide/default.mjs
  var import_data18 = __toESM(require_data(), 1);
  var import_components7 = __toESM(require_components(), 1);
  var import_i18n11 = __toESM(require_i18n(), 1);
  var import_element9 = __toESM(require_element(), 1);

  // packages/edit-post/build-module/components/welcome-guide/image.mjs
  var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
  function WelcomeGuideImage({ nonAnimatedSrc, animatedSrc }) {
    return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("picture", { className: "edit-post-welcome-guide__image", children: [
      /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
        "source",
        {
          srcSet: nonAnimatedSrc,
          media: "(prefers-reduced-motion: reduce)"
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("img", { src: animatedSrc, width: "312", height: "240", alt: "" })
    ] });
  }

  // packages/edit-post/build-module/components/welcome-guide/default.mjs
  var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
  function WelcomeGuideDefault() {
    const { toggleFeature: toggleFeature2 } = (0, import_data18.useDispatch)(store);
    return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
      import_components7.Guide,
      {
        className: "edit-post-welcome-guide",
        contentLabel: (0, import_i18n11.__)("Welcome to the editor"),
        finishButtonText: (0, import_i18n11.__)("Get started"),
        onFinish: () => toggleFeature2("welcomeGuide"),
        pages: [
          {
            image: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
              WelcomeGuideImage,
              {
                nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.svg",
                animatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.gif"
              }
            ),
            content: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h1", { className: "edit-post-welcome-guide__heading", children: (0, import_i18n11.__)("Welcome to the editor") }),
              /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "edit-post-welcome-guide__text", children: (0, import_i18n11.__)(
                "In the WordPress editor, each paragraph, image, or video is presented as a distinct \u201Cblock\u201D of content."
              ) })
            ] })
          },
          {
            image: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
              WelcomeGuideImage,
              {
                nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-editor.svg",
                animatedSrc: "https://s.w.org/images/block-editor/welcome-editor.gif"
              }
            ),
            content: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h1", { className: "edit-post-welcome-guide__heading", children: (0, import_i18n11.__)("Customize each block") }),
              /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "edit-post-welcome-guide__text", children: (0, import_i18n11.__)(
                "Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected."
              ) })
            ] })
          },
          {
            image: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
              WelcomeGuideImage,
              {
                nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-library.svg",
                animatedSrc: "https://s.w.org/images/block-editor/welcome-library.gif"
              }
            ),
            content: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h1", { className: "edit-post-welcome-guide__heading", children: (0, import_i18n11.__)("Explore all blocks") }),
              /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "edit-post-welcome-guide__text", children: (0, import_element9.createInterpolateElement)(
                (0, import_i18n11.__)(
                  "All of the blocks available to you live in the block library. You\u2019ll find it wherever you see the <InserterIconImage /> icon."
                ),
                {
                  InserterIconImage: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
                    "img",
                    {
                      alt: (0, import_i18n11.__)("inserter"),
                      src: "data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A"
                    }
                  )
                }
              ) })
            ] })
          },
          {
            image: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
              WelcomeGuideImage,
              {
                nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.svg",
                animatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.gif"
              }
            ),
            content: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h1", { className: "edit-post-welcome-guide__heading", children: (0, import_i18n11.__)("Learn more") }),
              /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "edit-post-welcome-guide__text", children: (0, import_element9.createInterpolateElement)(
                (0, import_i18n11.__)(
                  "New to the block editor? Want to learn more about using it? <a>Here's a detailed guide.</a>"
                ),
                {
                  a: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
                    import_components7.ExternalLink,
                    {
                      href: (0, import_i18n11.__)(
                        "https://wordpress.org/documentation/article/wordpress-block-editor/"
                      )
                    }
                  )
                }
              ) })
            ] })
          }
        ]
      }
    );
  }

  // packages/edit-post/build-module/components/welcome-guide/template.mjs
  var import_data19 = __toESM(require_data(), 1);
  var import_components8 = __toESM(require_components(), 1);
  var import_i18n12 = __toESM(require_i18n(), 1);
  var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
  function WelcomeGuideTemplate() {
    const { toggleFeature: toggleFeature2 } = (0, import_data19.useDispatch)(store);
    return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
      import_components8.Guide,
      {
        className: "edit-template-welcome-guide",
        contentLabel: (0, import_i18n12.__)("Welcome to the template editor"),
        finishButtonText: (0, import_i18n12.__)("Get started"),
        onFinish: () => toggleFeature2("welcomeGuideTemplate"),
        pages: [
          {
            image: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
              WelcomeGuideImage,
              {
                nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-template-editor.svg",
                animatedSrc: "https://s.w.org/images/block-editor/welcome-template-editor.gif"
              }
            ),
            content: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h1", { className: "edit-post-welcome-guide__heading", children: (0, import_i18n12.__)("Welcome to the template editor") }),
              /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "edit-post-welcome-guide__text", children: (0, import_i18n12.__)(
                "Templates help define the layout of the site. You can customize all aspects of your posts and pages using blocks and patterns in this editor."
              ) })
            ] })
          }
        ]
      }
    );
  }

  // packages/edit-post/build-module/components/welcome-guide/index.mjs
  var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
  function WelcomeGuide({ postType }) {
    const { isActive, isEditingTemplate: isEditingTemplate2 } = (0, import_data20.useSelect)(
      (select3) => {
        const { isFeatureActive: isFeatureActive2 } = select3(store);
        const _isEditingTemplate = postType === "wp_template";
        const feature = _isEditingTemplate ? "welcomeGuideTemplate" : "welcomeGuide";
        return {
          isActive: isFeatureActive2(feature),
          isEditingTemplate: _isEditingTemplate
        };
      },
      [postType]
    );
    if (!isActive) {
      return null;
    }
    return isEditingTemplate2 ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(WelcomeGuideTemplate, {}) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(WelcomeGuideDefault, {});
  }

  // packages/edit-post/build-module/commands/use-commands.mjs
  var import_data21 = __toESM(require_data(), 1);
  var import_i18n13 = __toESM(require_i18n(), 1);
  var import_commands = __toESM(require_commands(), 1);
  var import_preferences9 = __toESM(require_preferences(), 1);
  var import_notices2 = __toESM(require_notices(), 1);
  function useCommands() {
    const { isFullscreen } = (0, import_data21.useSelect)((select3) => {
      const { get } = select3(import_preferences9.store);
      return {
        isFullscreen: get("core/edit-post", "fullscreenMode")
      };
    }, []);
    const { toggle } = (0, import_data21.useDispatch)(import_preferences9.store);
    const { createInfoNotice } = (0, import_data21.useDispatch)(import_notices2.store);
    (0, import_commands.useCommand)({
      name: "core/toggle-fullscreen-mode",
      label: isFullscreen ? (0, import_i18n13.__)("Exit fullscreen") : (0, import_i18n13.__)("Enter fullscreen"),
      icon: fullscreen_default,
      category: "command",
      callback: ({ close }) => {
        toggle("core/edit-post", "fullscreenMode");
        close();
        createInfoNotice(
          isFullscreen ? (0, import_i18n13.__)("Fullscreen off.") : (0, import_i18n13.__)("Fullscreen on."),
          {
            id: "core/edit-post/toggle-fullscreen-mode/notice",
            type: "snackbar",
            actions: [
              {
                label: (0, import_i18n13.__)("Undo"),
                onClick: () => {
                  toggle("core/edit-post", "fullscreenMode");
                }
              }
            ]
          }
        );
      }
    });
  }

  // packages/edit-post/build-module/components/layout/use-should-iframe.mjs
  var import_editor15 = __toESM(require_editor(), 1);
  var import_data22 = __toESM(require_data(), 1);
  var import_blocks2 = __toESM(require_blocks(), 1);
  var import_block_editor = __toESM(require_block_editor(), 1);
  var isGutenbergPlugin = false ? true : false;
  function useShouldIframe() {
    return (0, import_data22.useSelect)((select3) => {
      const { getCurrentPostType, getDeviceType } = select3(import_editor15.store);
      const { getClientIdsWithDescendants, getBlockName } = select3(import_block_editor.store);
      const { getBlockType } = select3(import_blocks2.store);
      return (
        // If the Gutenberg plugin is active, we ALWAYS use the iframe for
        // consistency across the post and site editor. We plan on enforcing
        // the iframe in the future, so Gutenberg both serves as way for us
        // to warn plugin developers and for plugin developers to test their
        // blocks easily. Before GB v22.5, we only enforced it for
        // block-based themes (classic themes used the same rules as core).
        isGutenbergPlugin || // We also still want to iframe all the special
        // editor features and modes such as device previews, zoom out, and
        // template/pattern editing.
        getDeviceType() !== "Desktop" || ["wp_template", "wp_block"].includes(getCurrentPostType()) || unlock(select3(import_block_editor.store)).isZoomOut() || // Finally, still iframe the editor if all present blocks are v3
        // (which means they are marked as iframe-compatible).
        [...new Set(getClientIdsWithDescendants().map(getBlockName))].map(getBlockType).filter(Boolean).every((blockType) => blockType.apiVersion >= 3)
      );
    }, []);
  }

  // packages/edit-post/build-module/hooks/use-navigate-to-entity-record.mjs
  var import_element10 = __toESM(require_element(), 1);
  var import_data23 = __toESM(require_data(), 1);
  var import_editor16 = __toESM(require_editor(), 1);
  var import_core_data6 = __toESM(require_core_data(), 1);
  function useNavigateToEntityRecord(initialPostId, initialPostType, defaultRenderingMode) {
    const registry = (0, import_data23.useRegistry)();
    const [postHistory, dispatch2] = (0, import_element10.useReducer)(
      (historyState, { type, post: post2, previousRenderingMode: previousRenderingMode2, selectedBlockClientId }) => {
        if (type === "push") {
          const updatedHistory = [...historyState];
          const currentIndex = updatedHistory.length - 1;
          updatedHistory[currentIndex] = {
            ...updatedHistory[currentIndex],
            selectedBlockClientId
          };
          return [...updatedHistory, { post: post2, previousRenderingMode: previousRenderingMode2 }];
        }
        if (type === "pop") {
          if (historyState.length > 1) {
            return historyState.slice(0, -1);
          }
        }
        return historyState;
      },
      [
        {
          post: { postId: initialPostId, postType: initialPostType }
        }
      ]
    );
    const { post, previousRenderingMode } = postHistory[postHistory.length - 1];
    const { getRenderingMode } = (0, import_data23.useSelect)(import_editor16.store);
    const { setRenderingMode } = (0, import_data23.useDispatch)(import_editor16.store);
    const { editEntityRecord } = (0, import_data23.useDispatch)(import_core_data6.store);
    const onNavigateToEntityRecord = (0, import_element10.useCallback)(
      (params) => {
        const entityEdits = registry.select(import_core_data6.store).getEntityRecordEdits("postType", post.postType, post.postId);
        const externalClientId = entityEdits?.selection?.selectionStart?.clientId ?? null;
        dispatch2({
          type: "push",
          post: { postId: params.postId, postType: params.postType },
          // Save the current rendering mode so we can restore it when navigating back.
          previousRenderingMode: getRenderingMode(),
          selectedBlockClientId: externalClientId
        });
        setRenderingMode(defaultRenderingMode);
      },
      [
        registry,
        post.postType,
        post.postId,
        getRenderingMode,
        setRenderingMode,
        defaultRenderingMode
      ]
    );
    const onNavigateToPreviousEntityRecord = (0, import_element10.useCallback)(() => {
      if (postHistory.length > 1) {
        const previousItem = postHistory[postHistory.length - 2];
        if (previousItem.selectedBlockClientId) {
          editEntityRecord(
            "postType",
            previousItem.post.postType,
            previousItem.post.postId,
            {
              selection: {
                selectionStart: {
                  clientId: previousItem.selectedBlockClientId
                },
                selectionEnd: {
                  clientId: previousItem.selectedBlockClientId
                }
              }
            },
            { undoIgnore: true }
          );
        }
      }
      dispatch2({
        type: "pop"
      });
      if (previousRenderingMode) {
        setRenderingMode(previousRenderingMode);
      }
    }, [
      setRenderingMode,
      previousRenderingMode,
      postHistory,
      editEntityRecord
    ]);
    return {
      currentPost: post,
      onNavigateToEntityRecord,
      onNavigateToPreviousEntityRecord: postHistory.length > 1 ? onNavigateToPreviousEntityRecord : void 0
    };
  }

  // packages/edit-post/build-module/components/meta-boxes/use-meta-box-initialization.mjs
  var import_data24 = __toESM(require_data(), 1);
  var import_editor17 = __toESM(require_editor(), 1);
  var import_core_data7 = __toESM(require_core_data(), 1);
  var import_element11 = __toESM(require_element(), 1);
  var useMetaBoxInitialization = (enabled) => {
    const {
      isEnabledAndEditorReady,
      isCollaborationEnabled,
      hasIncompatibleMetaBoxes,
      hasActiveMetaBoxes
    } = (0, import_data24.useSelect)(
      (select3) => {
        const {
          __unstableIsEditorReady,
          isCollaborationEnabledForCurrentPost
        } = unlock(select3(import_editor17.store));
        return {
          isEnabledAndEditorReady: enabled && __unstableIsEditorReady(),
          isCollaborationEnabled: isCollaborationEnabledForCurrentPost(),
          hasIncompatibleMetaBoxes: enabled ? select3(store).getAllMetaBoxes().some((metaBox) => !metaBox.__rtc_compatible) : false,
          hasActiveMetaBoxes: enabled && select3(store).hasMetaBoxes()
        };
      },
      [enabled]
    );
    const { setCollaborationSupported } = unlock((0, import_data24.useDispatch)(import_core_data7.store));
    const { updateEditorSettings } = (0, import_data24.useDispatch)(import_editor17.store);
    const { initializeMetaBoxes: initializeMetaBoxes2 } = (0, import_data24.useDispatch)(store);
    (0, import_element11.useEffect)(() => {
      if (isEnabledAndEditorReady) {
        initializeMetaBoxes2();
        if (isCollaborationEnabled && hasIncompatibleMetaBoxes) {
          setCollaborationSupported(false);
        }
        if (hasActiveMetaBoxes) {
          updateEditorSettings({ disableVisualRevisions: true });
        }
      }
    }, [
      isEnabledAndEditorReady,
      initializeMetaBoxes2,
      isCollaborationEnabled,
      setCollaborationSupported,
      hasIncompatibleMetaBoxes,
      hasActiveMetaBoxes,
      updateEditorSettings
    ]);
  };

  // packages/edit-post/build-module/components/layout/index.mjs
  var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
  var { useCommandContext } = unlock(import_commands2.privateApis);
  var { useDrag } = unlock(import_components9.privateApis);
  var { Editor, FullscreenMode } = unlock(import_editor18.privateApis);
  var { BlockKeyboardShortcuts } = unlock(import_block_library.privateApis);
  var DESIGN_POST_TYPES = [
    "wp_template",
    "wp_template_part",
    "wp_block",
    "wp_navigation"
  ];
  function useEditorStyles(settings) {
    const { hasThemeStyleSupport } = (0, import_data25.useSelect)((select3) => {
      return {
        hasThemeStyleSupport: select3(store).isFeatureActive("themeStyles")
      };
    }, []);
    return (0, import_element12.useMemo)(() => {
      const presetStyles = settings.styles?.filter(
        (style) => style.__unstableType && style.__unstableType !== "theme"
      ) ?? [];
      const defaultEditorStyles = [
        ...settings?.defaultEditorStyles ?? [],
        ...presetStyles
      ];
      const hasThemeStyles = hasThemeStyleSupport && presetStyles.length !== (settings.styles?.length ?? 0);
      if (!settings.disableLayoutStyles && !hasThemeStyles) {
        defaultEditorStyles.push({
          css: getLayoutStyles({
            style: {},
            selector: "body",
            hasBlockGapSupport: false,
            hasFallbackGapSupport: true,
            fallbackGapValue: "0.5em"
          })
        });
      }
      return hasThemeStyles ? settings.styles ?? [] : defaultEditorStyles;
    }, [
      settings.defaultEditorStyles,
      settings.disableLayoutStyles,
      settings.styles,
      hasThemeStyleSupport
    ]);
  }
  function MetaBoxesMain({ isLegacy }) {
    const [isOpen, openHeight, hasAnyVisible] = (0, import_data25.useSelect)((select3) => {
      const { get } = select3(import_preferences10.store);
      const { isMetaBoxLocationVisible: isMetaBoxLocationVisible2 } = select3(store);
      return [
        !!get("core/edit-post", "metaBoxesMainIsOpen"),
        get("core/edit-post", "metaBoxesMainOpenHeight"),
        isMetaBoxLocationVisible2("normal") || isMetaBoxLocationVisible2("advanced") || isMetaBoxLocationVisible2("side")
      ];
    }, []);
    const { set: setPreference } = (0, import_data25.useDispatch)(import_preferences10.store);
    const isShort = (0, import_compose3.useMediaQuery)("(max-height: 549px)");
    const [{ min = 0, max }, setHeightConstraints] = (0, import_element12.useState)(() => ({}));
    const effectSizeConstraints = (0, import_compose3.useRefEffect)((node) => {
      const container = node.closest(
        ".interface-interface-skeleton__content"
      );
      if (!container) {
        return;
      }
      const noticeLists = container.querySelectorAll(
        ":scope > .components-notice-list"
      );
      const resizeHandle = container.querySelector(
        ".edit-post-meta-boxes-main__presenter"
      );
      const deriveConstraints = () => {
        const fullHeight = container.offsetHeight;
        let nextMax = fullHeight;
        for (const element of noticeLists) {
          nextMax -= element.offsetHeight;
        }
        const nextMin = resizeHandle.offsetHeight;
        setHeightConstraints({ min: nextMin, max: nextMax });
      };
      const observer = new window.ResizeObserver(deriveConstraints);
      observer.observe(container);
      for (const element of noticeLists) {
        observer.observe(element);
      }
      return () => observer.disconnect();
    }, []);
    const metaBoxesMainRef = (0, import_element12.useRef)();
    const setMainRefs = (0, import_compose3.useMergeRefs)([
      metaBoxesMainRef,
      effectSizeConstraints
    ]);
    const separatorRef = (0, import_element12.useRef)();
    const separatorHelpId = (0, import_element12.useId)();
    const heightRef = (0, import_element12.useRef)();
    const applyHeight = (candidateHeight = "auto", isPersistent) => {
      let styleHeight;
      if (candidateHeight === "auto") {
        isPersistent = false;
        styleHeight = candidateHeight;
      } else {
        candidateHeight = Math.min(max, Math.max(min, candidateHeight));
        heightRef.current = candidateHeight;
        styleHeight = `${candidateHeight}px`;
      }
      if (isPersistent) {
        setPreference(
          "core/edit-post",
          "metaBoxesMainOpenHeight",
          candidateHeight
        );
      } else {
        metaBoxesMainRef.current.style.height = styleHeight;
        if (!isShort) {
          separatorRef.current.ariaValueNow = getAriaValueNow(candidateHeight);
        }
      }
    };
    const bindDragGesture = useDrag(
      ({ movement, first, last, memo, tap, args }) => {
        const pane = metaBoxesMainRef.current;
        const [, yMovement] = movement;
        if (first) {
          pane.classList.add("is-resizing");
          let fromHeight = heightRef.current ?? pane.offsetHeight;
          if (isOpen) {
            if (fromHeight > max) {
              fromHeight = max;
            }
          } else {
            fromHeight = min;
          }
          applyHeight(fromHeight - yMovement);
          return { fromHeight };
        }
        if (!first && !last && !tap) {
          applyHeight(memo.fromHeight - yMovement);
          return memo;
        }
        pane.classList.remove("is-resizing");
        if (tap) {
          const [onTap] = args;
          onTap?.();
          return;
        }
        const nextIsOpen = heightRef.current > min;
        persistIsOpen(nextIsOpen);
        applyHeight(heightRef.current, nextIsOpen);
      },
      { keyboardDisplacement: 20, filterTaps: true }
    );
    if (!hasAnyVisible) {
      return;
    }
    const contents = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
      "div",
      {
        className: "edit-post-layout__metaboxes edit-post-meta-boxes-main__liner",
        hidden: !isLegacy && !isOpen,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(MetaBoxes, { location: "normal" }),
          /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(MetaBoxes, { location: "advanced" })
        ]
      }
    );
    if (isLegacy) {
      return contents;
    }
    const isAutoHeight = openHeight === void 0;
    const usedOpenHeight = isShort ? "auto" : openHeight;
    const usedHeight = isOpen ? usedOpenHeight : min;
    const getAriaValueNow = (height) => Math.round((height - min) / (max - min) * 100);
    const usedAriaValueNow = max === void 0 || isAutoHeight ? 50 : getAriaValueNow(usedHeight);
    const persistIsOpen = (to = !isOpen) => setPreference("core/edit-post", "metaBoxesMainIsOpen", to);
    const paneLabel = (0, import_i18n14.__)("Meta Boxes");
    const toggle = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
      "button",
      {
        "aria-expanded": isOpen,
        onClick: ({ detail }) => {
          if (isShort || !detail) {
            persistIsOpen();
          }
        },
        ...!isShort && bindDragGesture(persistIsOpen),
        children: [
          paneLabel,
          /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components9.Icon, { icon: isOpen ? chevron_up_default : chevron_down_default })
        ]
      }
    );
    const separator = !isShort && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components9.Tooltip, { text: (0, import_i18n14.__)("Drag to resize"), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
        "button",
        {
          ref: separatorRef,
          role: "separator",
          "aria-valuenow": usedAriaValueNow,
          "aria-label": (0, import_i18n14.__)("Drag to resize"),
          "aria-describedby": separatorHelpId,
          ...bindDragGesture()
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components9.VisuallyHidden, { id: separatorHelpId, children: (0, import_i18n14.__)(
        "Use up and down arrow keys to resize the meta box pane."
      ) })
    ] });
    return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
      navigable_region_default,
      {
        "aria-label": paneLabel,
        ref: setMainRefs,
        className: clsx_default(
          "edit-post-meta-boxes-main",
          !isShort && "is-resizable"
        ),
        style: { height: usedHeight },
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "edit-post-meta-boxes-main__presenter", children: [
            toggle,
            separator
          ] }),
          contents
        ]
      }
    );
  }
  function Layout({
    postId: initialPostId,
    postType: initialPostType,
    settings,
    initialEdits
  }) {
    useCommands();
    const shouldIframe = useShouldIframe();
    const { createErrorNotice } = (0, import_data25.useDispatch)(import_notices3.store);
    const {
      currentPost: { postId: currentPostId, postType: currentPostType },
      onNavigateToEntityRecord,
      onNavigateToPreviousEntityRecord
    } = useNavigateToEntityRecord(
      initialPostId,
      initialPostType,
      "post-only"
    );
    const isEditingTemplate2 = currentPostType === "wp_template";
    const {
      mode,
      isFullscreenActive,
      hasResolvedMode,
      hasActiveMetaboxes,
      hasBlockSelected,
      showIconLabels,
      isDistractionFree,
      showMetaBoxes,
      isWelcomeGuideVisible,
      templateId,
      isDevicePreview
    } = (0, import_data25.useSelect)(
      (select3) => {
        const { get } = select3(import_preferences10.store);
        const { isFeatureActive: isFeatureActive2, hasMetaBoxes: hasMetaBoxes2 } = select3(store);
        const { canUser, getPostType, getTemplateId } = unlock(
          select3(import_core_data8.store)
        );
        const supportsTemplateMode = settings.supportsTemplateMode;
        const isViewable = getPostType(currentPostType)?.viewable ?? false;
        const canViewTemplate = canUser("read", {
          kind: "postType",
          name: "wp_template"
        });
        const { getBlockSelectionStart, isZoomOut } = unlock(
          select3(import_block_editor2.store)
        );
        const { getEditorMode: getEditorMode2, getDefaultRenderingMode, getDeviceType } = unlock(select3(import_editor18.store));
        const isNotDesignPostType = !DESIGN_POST_TYPES.includes(currentPostType);
        const isDirectlyEditingPattern = currentPostType === "wp_block" && !onNavigateToPreviousEntityRecord;
        const _templateId = getTemplateId(currentPostType, currentPostId);
        const defaultMode = getDefaultRenderingMode(currentPostType);
        return {
          mode: getEditorMode2(),
          isFullscreenActive: isFeatureActive2("fullscreenMode"),
          hasActiveMetaboxes: hasMetaBoxes2(),
          hasResolvedMode: defaultMode === "template-locked" ? !!_templateId : defaultMode !== void 0,
          hasBlockSelected: !!getBlockSelectionStart(),
          showIconLabels: get("core", "showIconLabels"),
          isDistractionFree: get("core", "distractionFree"),
          showMetaBoxes: isNotDesignPostType && !isZoomOut() || isDirectlyEditingPattern,
          isWelcomeGuideVisible: isFeatureActive2("welcomeGuide"),
          templateId: supportsTemplateMode && isViewable && canViewTemplate && !isEditingTemplate2 ? _templateId : null,
          isDevicePreview: getDeviceType() !== "Desktop"
        };
      },
      [
        currentPostType,
        currentPostId,
        isEditingTemplate2,
        settings.supportsTemplateMode,
        onNavigateToPreviousEntityRecord
      ]
    );
    useMetaBoxInitialization(hasActiveMetaboxes && hasResolvedMode);
    const commandContext = hasBlockSelected ? "block-selection-edit" : "entity-edit";
    useCommandContext(commandContext);
    const styles = useEditorStyles(settings);
    const editorSettings = (0, import_element12.useMemo)(
      () => ({
        ...settings,
        styles,
        onNavigateToEntityRecord,
        onNavigateToPreviousEntityRecord,
        defaultRenderingMode: "post-only"
      }),
      [
        settings,
        styles,
        onNavigateToEntityRecord,
        onNavigateToPreviousEntityRecord
      ]
    );
    if (showIconLabels) {
      document.body.classList.add("show-icon-labels");
    } else {
      document.body.classList.remove("show-icon-labels");
    }
    const navigateRegionsProps = (0, import_components9.__unstableUseNavigateRegions)();
    const className = clsx_default("edit-post-layout", "is-mode-" + mode, {
      "has-metaboxes": hasActiveMetaboxes
    });
    function onPluginAreaError(name) {
      createErrorNotice(
        (0, import_i18n14.sprintf)(
          /* translators: %s: plugin name */
          (0, import_i18n14.__)(
            'The "%s" plugin has encountered an error and cannot be rendered.'
          ),
          name
        )
      );
    }
    const { createSuccessNotice } = (0, import_data25.useDispatch)(import_notices3.store);
    const onActionPerformed = (0, import_element12.useCallback)(
      (actionId, items) => {
        switch (actionId) {
          case "move-to-trash":
            {
              document.location.href = (0, import_url5.addQueryArgs)("edit.php", {
                trashed: 1,
                post_type: items[0].type,
                ids: items[0].id
              });
            }
            break;
          case "duplicate-post":
            {
              const newItem = items[0];
              const title = typeof newItem.title === "string" ? newItem.title : newItem.title?.rendered;
              createSuccessNotice(
                (0, import_i18n14.sprintf)(
                  // translators: %s: Title of the created post or template, e.g: "Hello world".
                  (0, import_i18n14.__)('"%s" successfully created.'),
                  (0, import_html_entities.decodeEntities)(title) || (0, import_i18n14.__)("(no title)")
                ),
                {
                  type: "snackbar",
                  id: "duplicate-post-action",
                  actions: [
                    {
                      label: (0, import_i18n14.__)("Edit"),
                      onClick: () => {
                        const postId = newItem.id;
                        document.location.href = (0, import_url5.addQueryArgs)("post.php", {
                          post: postId,
                          action: "edit"
                        });
                      }
                    }
                  ]
                }
              );
            }
            break;
        }
      },
      [createSuccessNotice]
    );
    const initialPost = (0, import_element12.useMemo)(() => {
      return {
        type: initialPostType,
        id: initialPostId
      };
    }, [initialPostType, initialPostId]);
    const backButton = (0, import_compose3.useViewportMatch)("medium") && isFullscreenActive ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(back_button_default, { initialPost }) : null;
    return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components9.SlotFillProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_editor18.ErrorBoundary, { canCopyContent: true, children: [
      /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(WelcomeGuide, { postType: currentPostType }),
      /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
        "div",
        {
          className: navigateRegionsProps.className,
          ...navigateRegionsProps,
          ref: navigateRegionsProps.ref,
          children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
            Editor,
            {
              settings: editorSettings,
              initialEdits,
              postType: currentPostType,
              postId: currentPostId,
              templateId,
              className,
              forceIsDirty: hasActiveMetaboxes,
              disableIframe: !shouldIframe,
              autoFocus: !isWelcomeGuideVisible,
              onActionPerformed,
              extraSidebarPanels: showMetaBoxes && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(MetaBoxes, { location: "side" }),
              extraContent: !isDistractionFree && showMetaBoxes && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(MetaBoxesMain, { isLegacy: isDevicePreview }),
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_editor18.PostLockedModal, {}),
                /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(EditorInitialization, {}),
                /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FullscreenMode, { isActive: isFullscreenActive }),
                /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(BrowserURL, {}),
                /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_editor18.UnsavedChangesWarning, {}),
                /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_editor18.AutosaveMonitor, {}),
                /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_editor18.LocalAutosaveMonitor, {}),
                /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(keyboard_shortcuts_default, {}),
                /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_editor18.EditorKeyboardShortcutsRegister, {}),
                /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(BlockKeyboardShortcuts, {}),
                currentPostType === "wp_block" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(InitPatternModal, {}),
                /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_plugins.PluginArea, { onError: onPluginAreaError }),
                /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(more_menu_default, {}),
                backButton,
                /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_notices3.SnackbarNotices, { className: "edit-post-layout__snackbar" })
              ]
            }
          )
        }
      )
    ] }) });
  }
  var layout_default = Layout;

  // packages/edit-post/build-module/deprecated.mjs
  var import_editor19 = __toESM(require_editor(), 1);
  var import_url6 = __toESM(require_url(), 1);
  var import_deprecated3 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
  var { PluginPostExcerpt } = unlock(import_editor19.privateApis);
  var isSiteEditor = (0, import_url6.getPath)(window.location.href)?.includes(
    "site-editor.php"
  );
  var deprecateSlot = (name) => {
    (0, import_deprecated3.default)(`wp.editPost.${name}`, {
      since: "6.6",
      alternative: `wp.editor.${name}`
    });
  };
  function PluginBlockSettingsMenuItem(props) {
    if (isSiteEditor) {
      return null;
    }
    deprecateSlot("PluginBlockSettingsMenuItem");
    return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_editor19.PluginBlockSettingsMenuItem, { ...props });
  }
  function PluginDocumentSettingPanel(props) {
    if (isSiteEditor) {
      return null;
    }
    deprecateSlot("PluginDocumentSettingPanel");
    return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_editor19.PluginDocumentSettingPanel, { ...props });
  }
  function PluginMoreMenuItem(props) {
    if (isSiteEditor) {
      return null;
    }
    deprecateSlot("PluginMoreMenuItem");
    return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_editor19.PluginMoreMenuItem, { ...props });
  }
  function PluginPrePublishPanel(props) {
    if (isSiteEditor) {
      return null;
    }
    deprecateSlot("PluginPrePublishPanel");
    return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_editor19.PluginPrePublishPanel, { ...props });
  }
  function PluginPostPublishPanel(props) {
    if (isSiteEditor) {
      return null;
    }
    deprecateSlot("PluginPostPublishPanel");
    return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_editor19.PluginPostPublishPanel, { ...props });
  }
  function PluginPostStatusInfo(props) {
    if (isSiteEditor) {
      return null;
    }
    deprecateSlot("PluginPostStatusInfo");
    return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_editor19.PluginPostStatusInfo, { ...props });
  }
  function PluginSidebar(props) {
    if (isSiteEditor) {
      return null;
    }
    deprecateSlot("PluginSidebar");
    return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_editor19.PluginSidebar, { ...props });
  }
  function PluginSidebarMoreMenuItem(props) {
    if (isSiteEditor) {
      return null;
    }
    deprecateSlot("PluginSidebarMoreMenuItem");
    return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_editor19.PluginSidebarMoreMenuItem, { ...props });
  }
  function __experimentalPluginPostExcerpt() {
    if (isSiteEditor) {
      return null;
    }
    (0, import_deprecated3.default)("wp.editPost.__experimentalPluginPostExcerpt", {
      since: "6.6",
      hint: "Core and custom panels can be access programmatically using their panel name.",
      link: "https://developer.wordpress.org/block-editor/reference-guides/slotfills/plugin-document-setting-panel/#accessing-a-panel-programmatically"
    });
    return PluginPostExcerpt;
  }

  // packages/edit-post/build-module/index.mjs
  var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
  var {
    BackButton: __experimentalMainDashboardButton,
    registerCoreBlockBindingsSources
  } = unlock(import_editor20.privateApis);
  function initializeEditor(id, postType, postId, settings, initialEdits) {
    const isMediumOrBigger = window.matchMedia("(min-width: 782px)").matches;
    const target = document.getElementById(id);
    const root = (0, import_element13.createRoot)(target);
    (0, import_data26.dispatch)(import_preferences11.store).setDefaults("core/edit-post", {
      fullscreenMode: true,
      themeStyles: true,
      welcomeGuide: true,
      welcomeGuideTemplate: true
    });
    (0, import_data26.dispatch)(import_preferences11.store).setDefaults("core", {
      allowRightClickOverrides: true,
      editorMode: "visual",
      editorTool: "edit",
      fixedToolbar: false,
      hiddenBlockTypes: [],
      inactivePanels: [],
      openPanels: ["post-status"],
      showBlockBreadcrumbs: true,
      showIconLabels: false,
      showListViewByDefault: false,
      enableChoosePatternModal: true,
      isPublishSidebarEnabled: true,
      showCollaborationCursor: false,
      showCollaborationNotifications: true
    });
    if (window.__clientSideMediaProcessing) {
      (0, import_data26.dispatch)(import_preferences11.store).setDefaults("core/media", {
        requireApproval: true,
        optimizeOnUpload: true
      });
    }
    (0, import_data26.dispatch)(import_blocks3.store).reapplyBlockTypeFilters();
    if (isMediumOrBigger && (0, import_data26.select)(import_preferences11.store).get("core", "showListViewByDefault") && !(0, import_data26.select)(import_preferences11.store).get("core", "distractionFree")) {
      (0, import_data26.dispatch)(import_editor20.store).setIsListViewOpened(true);
    }
    (0, import_block_library2.registerCoreBlocks)();
    registerCoreBlockBindingsSources();
    (0, import_widgets.registerLegacyWidgetBlock)({ inserter: false });
    (0, import_widgets.registerWidgetGroupBlock)({ inserter: false });
    if (false) {
      (0, import_block_library2.__experimentalRegisterExperimentalCoreBlocks)({
        enableFSEBlocks: settings.__unstableEnableFullSiteEditingBlocks
      });
    }
    const documentMode = document.compatMode === "CSS1Compat" ? "Standards" : "Quirks";
    if (documentMode !== "Standards") {
      console.warn(
        "Your browser is using Quirks Mode. \nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening <!DOCTYPE html>. Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins."
      );
    }
    const isIphone = window.navigator.userAgent.indexOf("iPhone") !== -1;
    if (isIphone) {
      window.addEventListener("scroll", (event) => {
        const editorScrollContainer = document.getElementsByClassName(
          "interface-interface-skeleton__body"
        )[0];
        if (event.target === document) {
          if (window.scrollY > 100) {
            editorScrollContainer.scrollTop = editorScrollContainer.scrollTop + window.scrollY;
          }
          if (document.getElementsByClassName("is-mode-visual")[0]) {
            window.scrollTo(0, 0);
          }
        }
      });
    }
    window.addEventListener("dragover", (e) => e.preventDefault(), false);
    window.addEventListener("drop", (e) => e.preventDefault(), false);
    root.render(
      /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_element13.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
        layout_default,
        {
          settings,
          postId,
          postType,
          initialEdits
        }
      ) })
    );
    return root;
  }
  function reinitializeEditor() {
    (0, import_deprecated4.default)("wp.editPost.reinitializeEditor", {
      since: "6.2",
      version: "6.3"
    });
  }
  return __toCommonJS(index_exports);
})();
                                                                                                           dist/edit-post.min.js                                                                               0000644                 00000142111 15212564011 0010534 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;(wp||={}).editPost=(()=>{var ls=Object.create;var He=Object.defineProperty;var ds=Object.getOwnPropertyDescriptor;var fs=Object.getOwnPropertyNames;var us=Object.getPrototypeOf,ms=Object.prototype.hasOwnProperty;var y=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),wt=(e,t)=>{for(var r in t)He(e,r,{get:t[r],enumerable:!0})},fo=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of fs(t))!ms.call(e,s)&&s!==r&&He(e,s,{get:()=>t[s],enumerable:!(a=ds(t,s))||a.enumerable});return e};var o=(e,t,r)=>(r=e!=null?ls(us(e)):{},fo(t||!e||!e.__esModule?He(r,"default",{value:e,enumerable:!0}):r,e)),cs=e=>fo(He({},"__esModule",{value:!0}),e);var qe=y((vn,uo)=>{uo.exports=window.wp.blocks});var St=y((bn,mo)=>{mo.exports=window.wp.blockLibrary});var Ce=y((wn,co)=>{co.exports=window.wp.deprecated});var O=y((Sn,po)=>{po.exports=window.wp.element});var h=y((xn,go)=>{go.exports=window.wp.data});var U=y((En,ho)=>{ho.exports=window.wp.preferences});var vo=y((_n,yo)=>{yo.exports=window.wp.widgets});var P=y((Pn,bo)=>{bo.exports=window.wp.editor});var R=y((kn,So)=>{So.exports=window.wp.i18n});var Z=y((Tn,xo)=>{xo.exports=window.wp.components});var v=y((In,Eo)=>{Eo.exports=window.ReactJSXRuntime});var Ee=y((Rn,ko)=>{ko.exports=window.wp.primitives});var Io=y((Un,To)=>{To.exports=window.wp.privateApis});var Je=y((Wn,Bo)=>{Bo.exports=window.wp.compose});var At=y((Kn,Co)=>{Co.exports=window.wp.blockEditor});var Ot=y((Yn,Ro)=>{Ro.exports=window.wp.styleEngine});var jo=y((hl,Vo)=>{Vo.exports=window.wp.plugins});var et=y((yl,Do)=>{Do.exports=window.wp.notices});var Vt=y((vl,No)=>{No.exports=window.wp.commands});var pe=y((bl,$o)=>{$o.exports=window.wp.url});var zo=y((wl,Go)=>{Go.exports=window.wp.htmlEntities});var ee=y((Sl,Uo)=>{Uo.exports=window.wp.coreData});var dr=y((Ll,lr)=>{lr.exports=window.wp.keyboardShortcuts});var mr=y((Vl,ur)=>{ur.exports=window.wp.apiFetch});var pr=y((jl,cr)=>{cr.exports=window.wp.hooks});var Nr=y((ad,Dr)=>{Dr.exports=window.wp.keycodes});var hn={};wt(hn,{PluginBlockSettingsMenuItem:()=>on,PluginDocumentSettingPanel:()=>rn,PluginMoreMenuItem:()=>an,PluginPostPublishPanel:()=>nn,PluginPostStatusInfo:()=>ln,PluginPrePublishPanel:()=>sn,PluginSidebar:()=>dn,PluginSidebarMoreMenuItem:()=>fn,__experimentalFullscreenModeClose:()=>tt,__experimentalMainDashboardButton:()=>mn,__experimentalPluginPostExcerpt:()=>un,initializeEditor:()=>pn,reinitializeEditor:()=>gn,store:()=>w});var qa=o(qe(),1),Ka=o(St(),1),Ya=o(Ce(),1),ht=o(O(),1),se=o(h(),1),Ie=o(U(),1),yt=o(vo(),1),vt=o(P(),1);function wo(e){var t,r,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=wo(e[t]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function ps(){for(var e,t,r=0,a="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=wo(e))&&(a&&(a+=" "),a+=t);return a}var Q=ps;var _o=o(O(),1),Po=o(v(),1),Mo=(0,_o.forwardRef)(({children:e,className:t,ariaLabel:r,as:a="div",...s},n)=>(0,Po.jsx)(a,{ref:n,className:Q("admin-ui-navigable-region",t),"aria-label":r,role:"region",tabIndex:"-1",...s,children:e}));Mo.displayName="NavigableRegion";var xt=Mo;var Ke=o(Ee(),1),Et=o(v(),1),_t=(0,Et.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Et.jsx)(Ke.Path,{d:"M14 6H6v8h1.5V8.5L17 18l1-1-9.5-9.5H14V6Z"})});var Ye=o(Ee(),1),Pt=o(v(),1),Mt=(0,Pt.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Pt.jsx)(Ye.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var Xe=o(Ee(),1),kt=o(v(),1),Tt=(0,kt.jsx)(Xe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kt.jsx)(Xe.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var Qe=o(Ee(),1),It=o(v(),1),Bt=(0,It.jsx)(Qe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,It.jsx)(Qe.Path,{d:"M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"})});var Ze=o(Ee(),1),Ct=o(v(),1),Rt=(0,Ct.jsx)(Ze.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,Ct.jsx)(Ze.Path,{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"})});var B=o(P(),1),fe=o(h(),1),Da=o(At(),1);var gs=o(Ot(),1);var _e="body",Ao=":root";var Re=o(qe(),1),Fo=o(Ot(),1),ys=o(h(),1);function Lt(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function hs(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function Oo(e,t="0"){let r=hs(e);if(!r)return null;let a=Lt(r?.top)||t,s=Lt(r?.left)||t;return a===s?a:`${a} ${s}`}var Lo={default:{name:"default",slug:"flow",className:"is-layout-flow",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},constrained:{name:"constrained",slug:"constrained",className:"is-layout-constrained",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > :where(:not(.alignleft):not(.alignright):not(.alignfull))",rules:{"max-width":"var(--wp--style--global--content-size)","margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > .alignwide",rules:{"max-width":"var(--wp--style--global--wide-size)"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},flex:{name:"flex",slug:"flex",className:"is-layout-flex",displayMode:"flex",baseStyles:[{selector:"",rules:{"flex-wrap":"wrap","align-items":"center"}},{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}};function Ft({layoutDefinitions:e=Lo,style:t,selector:r,hasBlockGapSupport:a,hasFallbackGapSupport:s,fallbackGapValue:n}){let i="",l=a?Oo(t?.spacing?.blockGap):"";if(s&&(r===_e?l=l||"0.5em":!a&&n&&(l=n)),l&&e&&(Object.values(e).forEach(({className:c,name:g,spacingStyles:m})=>{!a&&g!=="flex"&&g!=="grid"||m?.length&&m.forEach(p=>{let _=[];if(p.rules&&Object.entries(p.rules).forEach(([u,S])=>{_.push(`${u}: ${S||l}`)}),_.length){let u="";a?u=r===_e?`:root :where(.${c})${p?.selector||""}`:`:root :where(${r}-${c})${p?.selector||""}`:u=r===_e?`:where(.${c}${p?.selector||""})`:`:where(${r}.${c}${p?.selector||""})`,i+=`${u} { ${_.join("; ")}; }`}})}),r===_e&&a&&(i+=`${Ao} { --wp--style--block-gap: ${l}; }`)),r===_e&&e){let c=["block","flex","grid"];Object.values(e).forEach(({className:g,displayMode:m,baseStyles:p})=>{m&&c.includes(m)&&(i+=`${r} .${g} { display:${m}; }`),p?.length&&p.forEach(_=>{let u=[];if(_.rules&&Object.entries(_.rules).forEach(([S,V])=>{u.push(`${S}: ${V}`)}),u.length){let S=`.${g}${_?.selector||""}`;i+=`${S} { ${u.join("; ")}; }`}})})}return i}var Na=o(jo(),1),q=o(R(),1),F=o(O(),1);var ze=o(et(),1),gt=o(U(),1),$a=o(Vt(),1),Ga=o(St(),1),ro=o(pe(),1),za=o(zo(),1),Ua=o(ee(),1),K=o(Z(),1),ue=o(Je(),1);var Qo=o(P(),1),Zo=o(Z(),1);var Wo=o(h(),1),J=o(Z(),1),jt=o(R(),1),Ho=o(pe(),1);var qo=o(P(),1),Ko=o(ee(),1),Yo=o(Je(),1),$=o(v(),1),vs={edit:{clipPath:"inset(0% round 0px)"},hover:{clipPath:"inset( 22% round 2px )"},tap:{clipPath:"inset(0% round 0px)"}},bs={edit:{opacity:0,scale:.2},hover:{opacity:1,scale:1,clipPath:"inset( 22% round 2px )"}};function ws({showTooltip:e,icon:t,href:r,initialPost:a}){let{isRequestingSiteIcon:s,postType:n,siteIconUrl:i}=(0,Wo.useSelect)(S=>{let{getCurrentPostType:V}=S(qo.store),{getEntityRecord:ie,getPostType:ne,isResolving:Y}=S(Ko.store),ce=ie("root","__unstableBase",void 0)||{},be=a?.type||V();return{isRequestingSiteIcon:Y("getEntityRecord",["root","__unstableBase",void 0]),postType:ne(be),siteIconUrl:ce.site_icon_url}},[a?.type]),l=(0,Yo.useReducedMotion)(),c={duration:l?0:.2};if(!n)return null;let g;s&&!i?g=(0,$.jsx)("div",{className:"edit-post-fullscreen-mode-close-site-icon__image"}):i?g=(0,$.jsx)("img",{className:"edit-post-fullscreen-mode-close-site-icon__image",alt:(0,jt.__)("Site Icon"),src:i}):g=(0,$.jsx)(J.Icon,{className:"edit-post-fullscreen-mode-close-site-icon__icon",icon:Rt,size:48});let m=t?(0,$.jsx)(J.Icon,{size:"36px",icon:t}):(0,$.jsx)("div",{className:"edit-post-fullscreen-mode-close-site-icon",children:g}),p=Q("edit-post-fullscreen-mode-close",{"has-icon":i}),_=r??(0,Ho.addQueryArgs)("edit.php",{post_type:n.slug}),u=n?.labels?.view_items??(0,jt.__)("Back");return(0,$.jsxs)(J.__unstableMotion.div,{className:"edit-post-fullscreen-mode-close__view-mode-toggle",animate:"edit",initial:"edit",whileHover:"hover",whileTap:"tap",transition:c,children:[(0,$.jsx)(J.Button,{__next40pxDefaultSize:!0,className:p,href:_,label:u,showTooltip:e,tooltipPosition:"middle right",children:(0,$.jsx)(J.__unstableMotion.div,{variants:!l&&vs,children:(0,$.jsx)("div",{className:"edit-post-fullscreen-mode-close__view-mode-toggle-icon",children:m})})}),(0,$.jsx)(J.__unstableMotion.div,{className:Q("edit-post-fullscreen-mode-close__back-icon",{"has-site-icon":i}),variants:!l&&bs,children:(0,$.jsx)(J.Icon,{icon:_t})})]})}var tt=ws;var Xo=o(Io(),1),{lock:Pl,unlock:d}=(0,Xo.__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-post");var ot=o(v(),1),{BackButton:Ss}=d(Qo.privateApis),xs={hidden:{x:"-100%"},distractionFreeInactive:{x:0},hover:{x:0,transition:{type:"tween",delay:.2}}};function Es({initialPost:e}){return(0,ot.jsx)(Ss,{children:({length:t})=>t<=1&&(0,ot.jsx)(Zo.__unstableMotion.div,{variants:xs,transition:{type:"tween",delay:.8},children:(0,ot.jsx)(tt,{showTooltip:!0,initialPost:e})})})}var Jo=Es;var rr=o(h(),1),Ae=o(O(),1),ar=o(P(),1),sr=o(ee(),1);var er="core/edit-post",tr="#wp-admin-bar-view a",or="#wp-admin-bar-preview a";var ir=()=>{let{isViewable:e,newPermalink:t}=(0,rr.useSelect)(a=>{let{getPostType:s}=a(sr.store),{getCurrentPost:n,getEditedPostAttribute:i}=a(ar.store);return{isViewable:s(i("type"))?.viewable,newPermalink:n().link}},[]),r=(0,Ae.useRef)();(0,Ae.useEffect)(()=>{r.current=document.querySelector(or)||document.querySelector(tr)},[]),(0,Ae.useEffect)(()=>{if(!(!t||!r.current)){if(!e){r.current.style.display="none";return}r.current.style.display="",r.current.setAttribute("href",t)}},[t,e])};function nr(){return ir(),null}var Er=o(O(),1),Wt=o(h(),1),st=o(dr(),1),_r=o(R(),1);var at=o(h(),1);var Dt=o(h(),1);function _s(e=!1,t){switch(t.type){case"REQUEST_META_BOX_UPDATES":return!0;case"META_BOX_UPDATES_SUCCESS":case"META_BOX_UPDATES_FAILURE":return!1;default:return e}}function Ps(e=[],t){let r=[...e];for(let a of t){let s=r.findIndex(n=>n.id===a.id);s!==-1?r[s]={...r[s],...a}:r.push(a)}return r}function Ms(e={},t){switch(t.type){case"SET_META_BOXES_PER_LOCATIONS":{let r={...e};for(let[a,s]of Object.entries(t.metaBoxesPerLocation))r[a]=Ps(r[a],s);return r}}return e}function ks(e=!1,t){return t.type==="META_BOXES_INITIALIZED"?!0:e}var Ts=(0,Dt.combineReducers)({isSaving:_s,locations:Ms,initialized:ks}),fr=(0,Dt.combineReducers)({metaBoxes:Ts});var Nt={};wt(Nt,{__experimentalSetPreviewDeviceType:()=>Ys,__unstableCreateTemplate:()=>Js,closeGeneralSidebar:()=>Bs,closeModal:()=>Rs,closePublishSidebar:()=>Os,hideBlockTypes:()=>Us,initializeMetaBoxes:()=>ei,metaBoxUpdatesFailure:()=>Ks,metaBoxUpdatesSuccess:()=>qs,openGeneralSidebar:()=>Is,openModal:()=>Cs,openPublishSidebar:()=>As,removeEditorPanel:()=>js,requestMetaBoxUpdates:()=>Hs,setAvailableMetaBoxesPerLocation:()=>Ws,setIsEditingTemplate:()=>Zs,setIsInserterOpened:()=>Xs,setIsListViewOpened:()=>Qs,showBlockTypes:()=>zs,switchEditorMode:()=>Ns,toggleDistractionFree:()=>ti,toggleEditorPanelEnabled:()=>Fs,toggleEditorPanelOpened:()=>Vs,toggleFeature:()=>Ds,toggleFullscreenMode:()=>oi,togglePinnedPluginItem:()=>$s,togglePublishSidebar:()=>Ls,updatePreferredStyleVariations:()=>Gs});var yr=o(mr(),1),Oe=o(U(),1),M=o(P(),1),I=o(Ce(),1),vr=o(pr(),1),br=o(ee(),1),wr=o(et(),1),rt=o(R(),1);var gr=e=>{let t=document.querySelector(`.edit-post-meta-boxes-area.is-${e} .metabox-location-${e}`);return t||document.querySelector("#metaboxes .metabox-location-"+e)};var{interfaceStore:Pe}=d(M.privateApis),Is=e=>({registry:t})=>{t.dispatch(Pe).enableComplementaryArea("core",e)},Bs=()=>({registry:e})=>e.dispatch(Pe).disableComplementaryArea("core"),Cs=e=>({registry:t})=>((0,I.default)("select( 'core/edit-post' ).openModal( name )",{since:"6.3",alternative:"select( 'core/interface').openModal( name )"}),t.dispatch(Pe).openModal(e)),Rs=()=>({registry:e})=>((0,I.default)("select( 'core/edit-post' ).closeModal()",{since:"6.3",alternative:"select( 'core/interface').closeModal()"}),e.dispatch(Pe).closeModal()),As=()=>({registry:e})=>{(0,I.default)("dispatch( 'core/edit-post' ).openPublishSidebar",{since:"6.6",alternative:"dispatch( 'core/editor').openPublishSidebar"}),e.dispatch(M.store).openPublishSidebar()},Os=()=>({registry:e})=>{(0,I.default)("dispatch( 'core/edit-post' ).closePublishSidebar",{since:"6.6",alternative:"dispatch( 'core/editor').closePublishSidebar"}),e.dispatch(M.store).closePublishSidebar()},Ls=()=>({registry:e})=>{(0,I.default)("dispatch( 'core/edit-post' ).togglePublishSidebar",{since:"6.6",alternative:"dispatch( 'core/editor').togglePublishSidebar"}),e.dispatch(M.store).togglePublishSidebar()},Fs=e=>({registry:t})=>{(0,I.default)("dispatch( 'core/edit-post' ).toggleEditorPanelEnabled",{since:"6.5",alternative:"dispatch( 'core/editor').toggleEditorPanelEnabled"}),t.dispatch(M.store).toggleEditorPanelEnabled(e)},Vs=e=>({registry:t})=>{(0,I.default)("dispatch( 'core/edit-post' ).toggleEditorPanelOpened",{since:"6.5",alternative:"dispatch( 'core/editor').toggleEditorPanelOpened"}),t.dispatch(M.store).toggleEditorPanelOpened(e)},js=e=>({registry:t})=>{(0,I.default)("dispatch( 'core/edit-post' ).removeEditorPanel",{since:"6.5",alternative:"dispatch( 'core/editor').removeEditorPanel"}),t.dispatch(M.store).removeEditorPanel(e)},Ds=e=>({registry:t})=>t.dispatch(Oe.store).toggle("core/edit-post",e),Ns=e=>({registry:t})=>{(0,I.default)("dispatch( 'core/edit-post' ).switchEditorMode",{since:"6.6",alternative:"dispatch( 'core/editor').switchEditorMode"}),t.dispatch(M.store).switchEditorMode(e)},$s=e=>({registry:t})=>{let r=t.select(Pe).isItemPinned("core",e);t.dispatch(Pe)[r?"unpinItem":"pinItem"]("core",e)};function Gs(){return(0,I.default)("dispatch( 'core/edit-post' ).updatePreferredStyleVariations",{since:"6.6",hint:"Preferred Style Variations are not supported anymore."}),{type:"NOTHING"}}var zs=e=>({registry:t})=>{d(t.dispatch(M.store)).showBlockTypes(e)},Us=e=>({registry:t})=>{d(t.dispatch(M.store)).hideBlockTypes(e)};function Ws(e){return{type:"SET_META_BOXES_PER_LOCATIONS",metaBoxesPerLocation:e}}var Hs=()=>async({registry:e,select:t,dispatch:r})=>{r({type:"REQUEST_META_BOX_UPDATES"}),window.tinyMCE&&window.tinyMCE.triggerSave();let a=new window.FormData(document.querySelector(".metabox-base-form")),s=a.get("post_ID"),n=a.get("post_type"),i=e.select(br.store).getEditedEntityRecord("postType",n,s),l=[i.comment_status?["comment_status",i.comment_status]:!1,i.ping_status?["ping_status",i.ping_status]:!1,i.sticky?["sticky",i.sticky]:!1,i.author?["post_author",i.author]:!1].filter(Boolean),c=t.getActiveMetaBoxLocations(),m=[a,...c.map(p=>new window.FormData(gr(p)))].reduce((p,_)=>{for(let[u,S]of _)p.append(u,S);return p},new window.FormData);l.forEach(([p,_])=>m.append(p,_));try{await(0,yr.default)({url:window._wpMetaBoxUrl,method:"POST",body:m,parse:!1}),r.metaBoxUpdatesSuccess()}catch{r.metaBoxUpdatesFailure()}};function qs(){return{type:"META_BOX_UPDATES_SUCCESS"}}function Ks(){return{type:"META_BOX_UPDATES_FAILURE"}}var Ys=e=>({registry:t})=>{(0,I.default)("dispatch( 'core/edit-post' ).__experimentalSetPreviewDeviceType",{since:"6.5",version:"6.7",hint:"registry.dispatch( editorStore ).setDeviceType"}),t.dispatch(M.store).setDeviceType(e)},Xs=e=>({registry:t})=>{(0,I.default)("dispatch( 'core/edit-post' ).setIsInserterOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsInserterOpened"}),t.dispatch(M.store).setIsInserterOpened(e)},Qs=e=>({registry:t})=>{(0,I.default)("dispatch( 'core/edit-post' ).setIsListViewOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsListViewOpened"}),t.dispatch(M.store).setIsListViewOpened(e)};function Zs(){return(0,I.default)("dispatch( 'core/edit-post' ).setIsEditingTemplate",{since:"6.5",alternative:"dispatch( 'core/editor').setRenderingMode"}),{type:"NOTHING"}}function Js(){return(0,I.default)("dispatch( 'core/edit-post' ).__unstableCreateTemplate",{since:"6.5"}),{type:"NOTHING"}}var hr=!1,ei=()=>({registry:e,select:t,dispatch:r})=>{if(!e.select(M.store).__unstableIsEditorReady()||hr)return;let s=e.select(M.store).getCurrentPostType();window.postboxes.page!==s&&window.postboxes.add_postbox_toggles(s),hr=!0,(0,vr.addAction)("editor.savePost","core/edit-post/save-metaboxes",async(n,i)=>{!i.isAutosave&&t.hasMetaBoxes()&&await r.requestMetaBoxUpdates()}),r({type:"META_BOXES_INITIALIZED"})},ti=()=>({registry:e})=>{(0,I.default)("dispatch( 'core/edit-post' ).toggleDistractionFree",{since:"6.6",alternative:"dispatch( 'core/editor').toggleDistractionFree"}),e.dispatch(M.store).toggleDistractionFree()},oi=()=>({registry:e})=>{let t=e.select(Oe.store).get("core/edit-post","fullscreenMode");e.dispatch(Oe.store).toggle("core/edit-post","fullscreenMode"),e.dispatch(wr.store).createInfoNotice(t?(0,rt.__)("Fullscreen mode deactivated."):(0,rt.__)("Fullscreen mode activated."),{id:"core/edit-post/toggle-fullscreen-mode/notice",type:"snackbar",actions:[{label:(0,rt.__)("Undo"),onClick:()=>{e.dispatch(Oe.store).toggle("core/edit-post","fullscreenMode")}}]})};var Ut={};wt(Ut,{__experimentalGetInsertionPoint:()=>Pi,__experimentalGetPreviewDeviceType:()=>Ei,areMetaBoxesInitialized:()=>Ti,getActiveGeneralSidebarName:()=>li,getActiveMetaBoxLocations:()=>xr,getAllMetaBoxes:()=>wi,getEditedPostTemplate:()=>Ii,getEditorMode:()=>si,getHiddenBlockTypes:()=>ui,getMetaBoxesPerLocation:()=>zt,getPreference:()=>fi,getPreferences:()=>Sr,hasMetaBoxes:()=>Si,isEditingTemplate:()=>ki,isEditorPanelEnabled:()=>pi,isEditorPanelOpened:()=>gi,isEditorPanelRemoved:()=>ci,isEditorSidebarOpened:()=>ii,isFeatureActive:()=>yi,isInserterOpened:()=>_i,isListViewOpened:()=>Mi,isMetaBoxLocationActive:()=>Gt,isMetaBoxLocationVisible:()=>bi,isModalActive:()=>hi,isPluginItemPinned:()=>vi,isPluginSidebarOpened:()=>ni,isPublishSidebarOpened:()=>mi,isSavingMetaBoxes:()=>xi});var x=o(h(),1),ge=o(U(),1),$t=o(ee(),1),L=o(P(),1),G=o(Ce(),1);var{interfaceStore:Le}=d(L.privateApis),ri=[],ai={},si=(0,x.createRegistrySelector)(e=>()=>e(ge.store).get("core","editorMode")??"visual"),ii=(0,x.createRegistrySelector)(e=>()=>{let t=e(Le).getActiveComplementaryArea("core");return["edit-post/document","edit-post/block"].includes(t)}),ni=(0,x.createRegistrySelector)(e=>()=>{let t=e(Le).getActiveComplementaryArea("core");return!!t&&!["edit-post/document","edit-post/block"].includes(t)}),li=(0,x.createRegistrySelector)(e=>()=>e(Le).getActiveComplementaryArea("core"));function di(e,t){let r=e?.reduce((s,n)=>({...s,[n]:{enabled:!1}}),{});return t?.reduce((s,n)=>{let i=s?.[n];return{...s,[n]:{...i,opened:!0}}},r??{})??r??ai}var Sr=(0,x.createRegistrySelector)(e=>()=>{(0,G.default)("select( 'core/edit-post' ).getPreferences",{since:"6.0",alternative:"select( 'core/preferences' ).get"});let t=["editorMode","hiddenBlockTypes"].reduce((n,i)=>{let l=e(ge.store).get("core",i);return{...n,[i]:l}},{}),r=e(ge.store).get("core","inactivePanels"),a=e(ge.store).get("core","openPanels"),s=di(r,a);return{...t,panels:s}});function fi(e,t,r){(0,G.default)("select( 'core/edit-post' ).getPreference",{since:"6.0",alternative:"select( 'core/preferences' ).get"});let s=Sr(e)[t];return s===void 0?r:s}var ui=(0,x.createRegistrySelector)(e=>()=>e(ge.store).get("core","hiddenBlockTypes")??ri),mi=(0,x.createRegistrySelector)(e=>()=>((0,G.default)("select( 'core/edit-post' ).isPublishSidebarOpened",{since:"6.6",alternative:"select( 'core/editor' ).isPublishSidebarOpened"}),e(L.store).isPublishSidebarOpened())),ci=(0,x.createRegistrySelector)(e=>(t,r)=>((0,G.default)("select( 'core/edit-post' ).isEditorPanelRemoved",{since:"6.5",alternative:"select( 'core/editor' ).isEditorPanelRemoved"}),e(L.store).isEditorPanelRemoved(r))),pi=(0,x.createRegistrySelector)(e=>(t,r)=>((0,G.default)("select( 'core/edit-post' ).isEditorPanelEnabled",{since:"6.5",alternative:"select( 'core/editor' ).isEditorPanelEnabled"}),e(L.store).isEditorPanelEnabled(r))),gi=(0,x.createRegistrySelector)(e=>(t,r)=>((0,G.default)("select( 'core/edit-post' ).isEditorPanelOpened",{since:"6.5",alternative:"select( 'core/editor' ).isEditorPanelOpened"}),e(L.store).isEditorPanelOpened(r))),hi=(0,x.createRegistrySelector)(e=>(t,r)=>((0,G.default)("select( 'core/edit-post' ).isModalActive",{since:"6.3",alternative:"select( 'core/interface' ).isModalActive"}),!!e(Le).isModalActive(r))),yi=(0,x.createRegistrySelector)(e=>(t,r)=>!!e(ge.store).get("core/edit-post",r)),vi=(0,x.createRegistrySelector)(e=>(t,r)=>e(Le).isItemPinned("core",r)),xr=(0,x.createSelector)(e=>Object.keys(e.metaBoxes.locations).filter(t=>Gt(e,t)),e=>[e.metaBoxes.locations]),bi=(0,x.createRegistrySelector)(e=>(t,r)=>Gt(t,r)&&zt(t,r)?.some(({id:a})=>e(L.store).isEditorPanelEnabled(`meta-box-${a}`)));function Gt(e,t){let r=zt(e,t);return!!r&&r.length!==0}function zt(e,t){return e.metaBoxes.locations[t]}var wi=(0,x.createSelector)(e=>Object.values(e.metaBoxes.locations).flat(),e=>[e.metaBoxes.locations]);function Si(e){return xr(e).length>0}function xi(e){return e.metaBoxes.isSaving}var Ei=(0,x.createRegistrySelector)(e=>()=>((0,G.default)("select( 'core/edit-site' ).__experimentalGetPreviewDeviceType",{since:"6.5",version:"6.7",alternative:"select( 'core/editor' ).getDeviceType"}),e(L.store).getDeviceType())),_i=(0,x.createRegistrySelector)(e=>()=>((0,G.default)("select( 'core/edit-post' ).isInserterOpened",{since:"6.5",alternative:"select( 'core/editor' ).isInserterOpened"}),e(L.store).isInserterOpened())),Pi=(0,x.createRegistrySelector)(e=>()=>((0,G.default)("select( 'core/edit-post' ).__experimentalGetInsertionPoint",{since:"6.5",version:"6.7"}),d(e(L.store)).getInserter())),Mi=(0,x.createRegistrySelector)(e=>()=>((0,G.default)("select( 'core/edit-post' ).isListViewOpened",{since:"6.5",alternative:"select( 'core/editor' ).isListViewOpened"}),e(L.store).isListViewOpened())),ki=(0,x.createRegistrySelector)(e=>()=>((0,G.default)("select( 'core/edit-post' ).isEditingTemplate",{since:"6.5",alternative:"select( 'core/editor' ).getRenderingMode"}),e(L.store).getCurrentPostType()==="wp_template"));function Ti(e){return e.metaBoxes.initialized}var Ii=(0,x.createRegistrySelector)(e=>()=>{let{id:t,type:r}=e(L.store).getCurrentPost(),a=d(e($t.store)).getTemplateId(r,t);if(a)return e($t.store).getEditedEntityRecord("postType","wp_template",a)});var w=(0,at.createReduxStore)(er,{reducer:fr,actions:Nt,selectors:Ut});(0,at.register)(w);function Bi(){let{toggleFullscreenMode:e}=(0,Wt.useDispatch)(w),{registerShortcut:t}=(0,Wt.useDispatch)(st.store);return(0,Er.useEffect)(()=>{t({name:"core/edit-post/toggle-fullscreen",category:"global",description:(0,_r.__)("Enable or disable fullscreen mode."),keyCombination:{modifier:"secondary",character:"f"}})},[]),(0,st.useShortcut)("core/edit-post/toggle-fullscreen",()=>{e()}),null}var Pr=Bi;var nt=o(h(),1),de=o(R(),1),H=o(Z(),1),it=o(O(),1),Ht=o(P(),1),W=o(v(),1);function Mr(){let{editPost:e}=(0,nt.useDispatch)(Ht.store),[t,r]=(0,it.useState)(void 0),[a,s]=(0,it.useState)(""),n=(0,nt.useSelect)(c=>c(Ht.store).isCleanNewPost(),[]),[i,l]=(0,it.useState)(()=>n);return n?(0,W.jsx)(W.Fragment,{children:i&&(0,W.jsx)(H.Modal,{title:(0,de.__)("Create pattern"),onRequestClose:()=>{l(!1)},overlayClassName:"reusable-blocks-menu-items__convert-modal",children:(0,W.jsx)("form",{onSubmit:c=>{c.preventDefault(),l(!1),e({title:a,meta:{wp_pattern_sync_status:t}})},children:(0,W.jsxs)(H.__experimentalVStack,{spacing:"5",children:[(0,W.jsx)(H.TextControl,{label:(0,de.__)("Name"),value:a,onChange:s,placeholder:(0,de.__)("My pattern"),className:"patterns-create-modal__name-input",__next40pxDefaultSize:!0}),(0,W.jsx)(H.ToggleControl,{label:(0,de._x)("Synced","pattern (singular)"),help:(0,de.__)("Sync this pattern across multiple locations."),checked:!t,onChange:()=>{r(t?void 0:"unsynced")}}),(0,W.jsx)(H.__experimentalHStack,{justify:"right",children:(0,W.jsx)(H.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:!a,accessibleWhenDisabled:!0,children:(0,de.__)("Create")})})]})})})}):null}var lt=o(O(),1),kr=o(h(),1),Tr=o(pe(),1),Ir=o(P(),1);function Ci(e){return(0,Tr.addQueryArgs)("post.php",{post:e,action:"edit"})}function Br(){let[e,t]=(0,lt.useState)(null),{postId:r,postStatus:a}=(0,kr.useSelect)(s=>{let{getCurrentPost:n}=s(Ir.store),i=n(),{id:l,status:c,type:g}=i;return["wp_template","wp_template_part"].includes(g)&&(l=i.wp_id),{postId:l,postStatus:c}},[]);return(0,lt.useEffect)(()=>{r&&r!==e&&a!=="auto-draft"&&(window.history.replaceState({id:r},"Post "+r,Ci(r)),t(r))},[r,a,e]),null}var jr=o(h(),1);var Fe=o(O(),1),Cr=o(Z(),1),Rr=o(h(),1);var Me=o(v(),1);function Ri({location:e}){let t=(0,Fe.useRef)(null),r=(0,Fe.useRef)(null);(0,Fe.useEffect)(()=>(r.current=document.querySelector(".metabox-location-"+e),r.current&&t.current.appendChild(r.current),()=>{r.current&&document.querySelector("#metaboxes").appendChild(r.current)}),[e]);let a=(0,Rr.useSelect)(n=>n(w).isSavingMetaBoxes(),[]),s=Q("edit-post-meta-boxes-area",`is-${e}`,{"is-loading":a});return(0,Me.jsxs)("div",{className:s,children:[a&&(0,Me.jsx)(Cr.Spinner,{}),(0,Me.jsx)("div",{className:"edit-post-meta-boxes-area__container",ref:t}),(0,Me.jsx)("div",{className:"edit-post-meta-boxes-area__clear"})]})}var Ar=Ri;var Or=o(O(),1),Lr=o(h(),1),Fr=o(P(),1);function Vr({id:e}){let t=(0,Lr.useSelect)(r=>r(Fr.store).isEditorPanelEnabled(`meta-box-${e}`),[e]);return(0,Or.useEffect)(()=>{let r=document.getElementById(e);r&&(t?r.classList.remove("is-hidden"):r.classList.add("is-hidden"))},[e,t]),null}var he=o(v(),1);function dt({location:e}){let t=(0,jr.useSelect)(r=>r(w).getMetaBoxesPerLocation(e),[e]);return(0,he.jsxs)(he.Fragment,{children:[(t??[]).map(({id:r})=>(0,he.jsx)(Vr,{id:r},r)),(0,he.jsx)(Ar,{location:e})]})}var je=o(R(),1),ha=o(Je(),1),ya=o(P(),1),va=o(Nr(),1),ba=o(U(),1);var $r=o(Z(),1),Gr=o(ee(),1),zr=o(h(),1),Ur=o(R(),1),qt=o(pe(),1),Wr=o(v(),1);function Ai(){let e=(0,zr.useSelect)(t=>{let{canUser:r}=t(Gr.store),a=(0,qt.addQueryArgs)("edit.php",{post_type:"wp_block"}),s=(0,qt.addQueryArgs)("site-editor.php",{p:"/pattern"});return r("create",{kind:"postType",name:"wp_template"})?s:a},[]);return(0,Wr.jsx)($r.MenuItem,{role:"menuitem",href:e,children:(0,Ur.__)("Manage patterns")})}var Hr=Ai;var qr=o(h(),1),Kr=o(U(),1),Yr=o(R(),1),Xr=o(P(),1),Qr=o(v(),1);function Zr(){let e=(0,qr.useSelect)(t=>t(Xr.store).getCurrentPostType()==="wp_template",[]);return(0,Qr.jsx)(Kr.PreferenceToggleMenuItem,{scope:"core/edit-post",name:e?"welcomeGuideTemplate":"welcomeGuide",label:(0,Yr.__)("Welcome Guide")})}var mt=o(R(),1),ca=o(U(),1),pa=o(P(),1);var la=o(R(),1),da=o(h(),1),fa=o(P(),1),ua=o(U(),1);var Kt=o(O(),1),ft=o(R(),1),Jr=o(Z(),1),ea=o(h(),1),ta=o(P(),1),oa=o(U(),1),ra=o(pe(),1);var te=o(v(),1),{PreferenceBaseOption:Oi}=d(oa.privateApis);function Li(){let e=document.getElementById("toggle-custom-fields-form");e.querySelector('[name="_wp_http_referer"]').setAttribute("value",(0,ra.getPathAndQueryString)(window.location.href)),e.submit()}function Fi({willEnable:e}){let[t,r]=(0,Kt.useState)(!1);return(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)("p",{className:"edit-post-preferences-modal__custom-fields-confirmation-message",children:(0,ft.__)("A page reload is required for this change. Make sure your content is saved before reloading.")}),(0,te.jsx)(Jr.Button,{__next40pxDefaultSize:!0,variant:"secondary",isBusy:t,accessibleWhenDisabled:!0,disabled:t,onClick:()=>{r(!0),Li()},children:e?(0,ft.__)("Show & Reload Page"):(0,ft.__)("Hide & Reload Page")})]})}function aa({label:e}){let t=(0,ea.useSelect)(s=>!!s(ta.store).getEditorSettings().enableCustomFields,[]),[r,a]=(0,Kt.useState)(t);return(0,te.jsx)(Oi,{label:e,isChecked:r,onChange:a,children:r!==t&&(0,te.jsx)(Fi,{willEnable:r})})}var ut=o(h(),1),Yt=o(P(),1),sa=o(U(),1);var ia=o(v(),1),{PreferenceBaseOption:Vi}=d(sa.privateApis);function na(e){let{toggleEditorPanelEnabled:t}=(0,ut.useDispatch)(Yt.store),{isChecked:r,isRemoved:a}=(0,ut.useSelect)(s=>{let{isEditorPanelEnabled:n,isEditorPanelRemoved:i}=s(Yt.store);return{isChecked:n(e.panelName),isRemoved:i(e.panelName)}},[e.panelName]);return a?null:(0,ia.jsx)(Vi,{isChecked:r,onChange:()=>t(e.panelName),...e})}var Ve=o(v(),1),{PreferencesModalSection:ji}=d(ua.privateApis);function Di({areCustomFieldsRegistered:e,metaBoxes:t,...r}){let a=t.filter(({id:s})=>s!=="postcustom");return!e&&a.length===0?null:(0,Ve.jsxs)(ji,{...r,children:[e&&(0,Ve.jsx)(aa,{label:(0,la.__)("Custom fields")}),a.map(({id:s,title:n})=>(0,Ve.jsx)(na,{label:n,panelName:`meta-box-${s}`},s))]})}var ma=(0,da.withSelect)(e=>{let{getEditorSettings:t}=e(fa.store),{getAllMetaBoxes:r}=e(w);return{areCustomFieldsRegistered:t().enableCustomFields!==void 0,metaBoxes:r()}})(Di);var ct=o(v(),1),{PreferenceToggleControl:Ni}=d(ca.privateApis),{PreferencesModal:$i}=d(pa.privateApis);function ga(){let e={general:(0,ct.jsx)(ma,{title:(0,mt.__)("Advanced")}),appearance:(0,ct.jsx)(Ni,{scope:"core/edit-post",featureName:"themeStyles",help:(0,mt.__)("Make the editor look like your theme."),label:(0,mt.__)("Use theme styles")})};return(0,ct.jsx)($i,{extraSections:e})}var X=o(v(),1),{ToolsMoreMenuGroup:Gi,ViewMoreMenuGroup:zi}=d(ya.privateApis),Ui=()=>{let e=(0,ha.useViewportMatch)("large");return(0,X.jsxs)(X.Fragment,{children:[e&&(0,X.jsx)(zi,{children:(0,X.jsx)(ba.PreferenceToggleMenuItem,{scope:"core/edit-post",name:"fullscreenMode",label:(0,je.__)("Fullscreen mode"),info:(0,je.__)("Show and hide the admin user interface"),messageActivated:(0,je.__)("Fullscreen mode activated."),messageDeactivated:(0,je.__)("Fullscreen mode deactivated."),shortcut:va.displayShortcut.secondary("f")})}),(0,X.jsxs)(Gi,{children:[(0,X.jsx)(Hr,{}),(0,X.jsx)(Zr,{})]}),(0,X.jsx)(ga,{})]})},wa=Ui;var Ma=o(h(),1);var Sa=o(h(),1),pt=o(Z(),1),z=o(R(),1),Xt=o(O(),1);var De=o(v(),1);function ye({nonAnimatedSrc:e,animatedSrc:t}){return(0,De.jsxs)("picture",{className:"edit-post-welcome-guide__image",children:[(0,De.jsx)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,De.jsx)("img",{src:t,width:"312",height:"240",alt:""})]})}var b=o(v(),1);function xa(){let{toggleFeature:e}=(0,Sa.useDispatch)(w);return(0,b.jsx)(pt.Guide,{className:"edit-post-welcome-guide",contentLabel:(0,z.__)("Welcome to the editor"),finishButtonText:(0,z.__)("Get started"),onFinish:()=>e("welcomeGuide"),pages:[{image:(0,b.jsx)(ye,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-canvas.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-canvas.gif"}),content:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,z.__)("Welcome to the editor")}),(0,b.jsx)("p",{className:"edit-post-welcome-guide__text",children:(0,z.__)("In the WordPress editor, each paragraph, image, or video is presented as a distinct \u201Cblock\u201D of content.")})]})},{image:(0,b.jsx)(ye,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-editor.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-editor.gif"}),content:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,z.__)("Customize each block")}),(0,b.jsx)("p",{className:"edit-post-welcome-guide__text",children:(0,z.__)("Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.")})]})},{image:(0,b.jsx)(ye,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-library.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-library.gif"}),content:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,z.__)("Explore all blocks")}),(0,b.jsx)("p",{className:"edit-post-welcome-guide__text",children:(0,Xt.createInterpolateElement)((0,z.__)("All of the blocks available to you live in the block library. You\u2019ll find it wherever you see the <InserterIconImage /> icon."),{InserterIconImage:(0,b.jsx)("img",{alt:(0,z.__)("inserter"),src:"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A"})})})]})},{image:(0,b.jsx)(ye,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,z.__)("Learn more")}),(0,b.jsx)("p",{className:"edit-post-welcome-guide__text",children:(0,Xt.createInterpolateElement)((0,z.__)("New to the block editor? Want to learn more about using it? <a>Here's a detailed guide.</a>"),{a:(0,b.jsx)(pt.ExternalLink,{href:(0,z.__)("https://wordpress.org/documentation/article/wordpress-block-editor/")})})})]})}]})}var Ea=o(h(),1),_a=o(Z(),1),Ne=o(R(),1);var oe=o(v(),1);function Pa(){let{toggleFeature:e}=(0,Ea.useDispatch)(w);return(0,oe.jsx)(_a.Guide,{className:"edit-template-welcome-guide",contentLabel:(0,Ne.__)("Welcome to the template editor"),finishButtonText:(0,Ne.__)("Get started"),onFinish:()=>e("welcomeGuideTemplate"),pages:[{image:(0,oe.jsx)(ye,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-template-editor.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-template-editor.gif"}),content:(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,Ne.__)("Welcome to the template editor")}),(0,oe.jsx)("p",{className:"edit-post-welcome-guide__text",children:(0,Ne.__)("Templates help define the layout of the site. You can customize all aspects of your posts and pages using blocks and patterns in this editor.")})]})}]})}var Qt=o(v(),1);function ka({postType:e}){let{isActive:t,isEditingTemplate:r}=(0,Ma.useSelect)(a=>{let{isFeatureActive:s}=a(w),n=e==="wp_template";return{isActive:s(n?"welcomeGuideTemplate":"welcomeGuide"),isEditingTemplate:n}},[e]);return t?r?(0,Qt.jsx)(Pa,{}):(0,Qt.jsx)(xa,{}):null}var $e=o(h(),1),ke=o(R(),1);var Ta=o(Vt(),1),Zt=o(U(),1),Ia=o(et(),1);function Ba(){let{isFullscreen:e}=(0,$e.useSelect)(a=>{let{get:s}=a(Zt.store);return{isFullscreen:s("core/edit-post","fullscreenMode")}},[]),{toggle:t}=(0,$e.useDispatch)(Zt.store),{createInfoNotice:r}=(0,$e.useDispatch)(Ia.store);(0,Ta.useCommand)({name:"core/toggle-fullscreen-mode",label:e?(0,ke.__)("Exit fullscreen"):(0,ke.__)("Enter fullscreen"),icon:Bt,category:"command",callback:({close:a})=>{t("core/edit-post","fullscreenMode"),a(),r(e?(0,ke.__)("Fullscreen off."):(0,ke.__)("Fullscreen on."),{id:"core/edit-post/toggle-fullscreen-mode/notice",type:"snackbar",actions:[{label:(0,ke.__)("Undo"),onClick:()=>{t("core/edit-post","fullscreenMode")}}]})}})}var Ca=o(P(),1),Ra=o(h(),1),Aa=o(qe(),1),Jt=o(At(),1);var Wi=!1;function Oa(){return(0,Ra.useSelect)(e=>{let{getCurrentPostType:t,getDeviceType:r}=e(Ca.store),{getClientIdsWithDescendants:a,getBlockName:s}=e(Jt.store),{getBlockType:n}=e(Aa.store);return Wi||r()!=="Desktop"||["wp_template","wp_block"].includes(t())||d(e(Jt.store)).isZoomOut()||[...new Set(a().map(s))].map(n).filter(Boolean).every(i=>i.apiVersion>=3)},[])}var Ge=o(O(),1),ve=o(h(),1),eo=o(P(),1),to=o(ee(),1);function La(e,t,r){let a=(0,ve.useRegistry)(),[s,n]=(0,Ge.useReducer)((u,{type:S,post:V,previousRenderingMode:ie,selectedBlockClientId:ne})=>{if(S==="push"){let Y=[...u],ce=Y.length-1;return Y[ce]={...Y[ce],selectedBlockClientId:ne},[...Y,{post:V,previousRenderingMode:ie}]}return S==="pop"&&u.length>1?u.slice(0,-1):u},[{post:{postId:e,postType:t}}]),{post:i,previousRenderingMode:l}=s[s.length-1],{getRenderingMode:c}=(0,ve.useSelect)(eo.store),{setRenderingMode:g}=(0,ve.useDispatch)(eo.store),{editEntityRecord:m}=(0,ve.useDispatch)(to.store),p=(0,Ge.useCallback)(u=>{let V=a.select(to.store).getEntityRecordEdits("postType",i.postType,i.postId)?.selection?.selectionStart?.clientId??null;n({type:"push",post:{postId:u.postId,postType:u.postType},previousRenderingMode:c(),selectedBlockClientId:V}),g(r)},[a,i.postType,i.postId,c,g,r]),_=(0,Ge.useCallback)(()=>{if(s.length>1){let u=s[s.length-2];u.selectedBlockClientId&&m("postType",u.post.postType,u.post.postId,{selection:{selectionStart:{clientId:u.selectedBlockClientId},selectionEnd:{clientId:u.selectedBlockClientId}}},{undoIgnore:!0})}n({type:"pop"}),l&&g(l)},[g,l,s,m]);return{currentPost:i,onNavigateToEntityRecord:p,onNavigateToPreviousEntityRecord:s.length>1?_:void 0}}var Te=o(h(),1),oo=o(P(),1),Fa=o(ee(),1),Va=o(O(),1);var ja=e=>{let{isEnabledAndEditorReady:t,isCollaborationEnabled:r,hasIncompatibleMetaBoxes:a,hasActiveMetaBoxes:s}=(0,Te.useSelect)(c=>{let{__unstableIsEditorReady:g,isCollaborationEnabledForCurrentPost:m}=d(c(oo.store));return{isEnabledAndEditorReady:e&&g(),isCollaborationEnabled:m(),hasIncompatibleMetaBoxes:e?c(w).getAllMetaBoxes().some(p=>!p.__rtc_compatible):!1,hasActiveMetaBoxes:e&&c(w).hasMetaBoxes()}},[e]),{setCollaborationSupported:n}=d((0,Te.useDispatch)(Fa.store)),{updateEditorSettings:i}=(0,Te.useDispatch)(oo.store),{initializeMetaBoxes:l}=(0,Te.useDispatch)(w);(0,Va.useEffect)(()=>{t&&(l(),r&&a&&n(!1),s&&i({disableVisualRevisions:!0}))},[t,l,r,n,a,s,i])};var f=o(v(),1),{useCommandContext:Hi}=d($a.privateApis),{useDrag:qi}=d(K.privateApis),{Editor:Ki,FullscreenMode:Yi}=d(B.privateApis),{BlockKeyboardShortcuts:Xi}=d(Ga.privateApis),Qi=["wp_template","wp_template_part","wp_block","wp_navigation"];function Zi(e){let{hasThemeStyleSupport:t}=(0,fe.useSelect)(r=>({hasThemeStyleSupport:r(w).isFeatureActive("themeStyles")}),[]);return(0,F.useMemo)(()=>{let r=e.styles?.filter(n=>n.__unstableType&&n.__unstableType!=="theme")??[],a=[...e?.defaultEditorStyles??[],...r],s=t&&r.length!==(e.styles?.length??0);return!e.disableLayoutStyles&&!s&&a.push({css:Ft({style:{},selector:"body",hasBlockGapSupport:!1,hasFallbackGapSupport:!0,fallbackGapValue:"0.5em"})}),s?e.styles??[]:a},[e.defaultEditorStyles,e.disableLayoutStyles,e.styles,t])}function Ji({isLegacy:e}){let[t,r,a]=(0,fe.useSelect)(E=>{let{get:T}=E(gt.store),{isMetaBoxLocationVisible:A}=E(w);return[!!T("core/edit-post","metaBoxesMainIsOpen"),T("core/edit-post","metaBoxesMainOpenHeight"),A("normal")||A("advanced")||A("side")]},[]),{set:s}=(0,fe.useDispatch)(gt.store),n=(0,ue.useMediaQuery)("(max-height: 549px)"),[{min:i=0,max:l},c]=(0,F.useState)(()=>({})),g=(0,ue.useRefEffect)(E=>{let T=E.closest(".interface-interface-skeleton__content");if(!T)return;let A=T.querySelectorAll(":scope > .components-notice-list"),Se=T.querySelector(".edit-post-meta-boxes-main__presenter"),xe=()=>{let D=T.offsetHeight;for(let N of A)D-=N.offsetHeight;let le=Se.offsetHeight;c({min:le,max:D})},C=new window.ResizeObserver(xe);C.observe(T);for(let j of A)C.observe(j);return()=>C.disconnect()},[]),m=(0,F.useRef)(),p=(0,ue.useMergeRefs)([m,g]),_=(0,F.useRef)(),u=(0,F.useId)(),S=(0,F.useRef)(),V=(E="auto",T)=>{let A;E==="auto"?(T=!1,A=E):(E=Math.min(l,Math.max(i,E)),S.current=E,A=`${E}px`),T?s("core/edit-post","metaBoxesMainOpenHeight",E):(m.current.style.height=A,n||(_.current.ariaValueNow=Ue(E)))},ie=qi(({movement:E,first:T,last:A,memo:Se,tap:xe,args:C})=>{let j=m.current,[,D]=E;if(T){j.classList.add("is-resizing");let N=S.current??j.offsetHeight;return t?N>l&&(N=l):N=i,V(N-D),{fromHeight:N}}if(!T&&!A&&!xe)return V(Se.fromHeight-D),Se;if(j.classList.remove("is-resizing"),xe){let[N]=C;N?.();return}let le=S.current>i;we(le),V(S.current,le)},{keyboardDisplacement:20,filterTaps:!0});if(!a)return;let ne=(0,f.jsxs)("div",{className:"edit-post-layout__metaboxes edit-post-meta-boxes-main__liner",hidden:!e&&!t,children:[(0,f.jsx)(dt,{location:"normal"}),(0,f.jsx)(dt,{location:"advanced"})]});if(e)return ne;let Y=r===void 0,be=t?n?"auto":r:i,Ue=E=>Math.round((E-i)/(l-i)*100),io=l===void 0||Y?50:Ue(be),we=(E=!t)=>s("core/edit-post","metaBoxesMainIsOpen",E),We=(0,q.__)("Meta Boxes"),Be=(0,f.jsxs)("button",{"aria-expanded":t,onClick:({detail:E})=>{(n||!E)&&we()},...!n&&ie(we),children:[We,(0,f.jsx)(K.Icon,{icon:t?Tt:Mt})]}),bt=!n&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(K.Tooltip,{text:(0,q.__)("Drag to resize"),children:(0,f.jsx)("button",{ref:_,role:"separator","aria-valuenow":io,"aria-label":(0,q.__)("Drag to resize"),"aria-describedby":u,...ie()})}),(0,f.jsx)(K.VisuallyHidden,{id:u,children:(0,q.__)("Use up and down arrow keys to resize the meta box pane.")})]});return(0,f.jsxs)(xt,{"aria-label":We,ref:p,className:Q("edit-post-meta-boxes-main",!n&&"is-resizable"),style:{height:be},children:[(0,f.jsxs)("div",{className:"edit-post-meta-boxes-main__presenter",children:[Be,bt]}),ne]})}function en({postId:e,postType:t,settings:r,initialEdits:a}){Ba();let s=Oa(),{createErrorNotice:n}=(0,fe.useDispatch)(ze.store),{currentPost:{postId:i,postType:l},onNavigateToEntityRecord:c,onNavigateToPreviousEntityRecord:g}=La(e,t,"post-only"),m=l==="wp_template",{mode:p,isFullscreenActive:_,hasResolvedMode:u,hasActiveMetaboxes:S,hasBlockSelected:V,showIconLabels:ie,isDistractionFree:ne,showMetaBoxes:Y,isWelcomeGuideVisible:ce,templateId:be,isDevicePreview:Ue}=(0,fe.useSelect)(C=>{let{get:j}=C(gt.store),{isFeatureActive:D,hasMetaBoxes:le}=C(w),{canUser:N,getPostType:Xa,getTemplateId:Qa}=d(C(Ua.store)),Za=r.supportsTemplateMode,Ja=Xa(l)?.viewable??!1,es=N("read",{kind:"postType",name:"wp_template"}),{getBlockSelectionStart:ts,isZoomOut:os}=d(C(Da.store)),{getEditorMode:rs,getDefaultRenderingMode:as,getDeviceType:ss}=d(C(B.store)),is=!Qi.includes(l),ns=l==="wp_block"&&!g,no=Qa(l,i),lo=as(l);return{mode:rs(),isFullscreenActive:D("fullscreenMode"),hasActiveMetaboxes:le(),hasResolvedMode:lo==="template-locked"?!!no:lo!==void 0,hasBlockSelected:!!ts(),showIconLabels:j("core","showIconLabels"),isDistractionFree:j("core","distractionFree"),showMetaBoxes:is&&!os()||ns,isWelcomeGuideVisible:D("welcomeGuide"),templateId:Za&&Ja&&es&&!m?no:null,isDevicePreview:ss()!=="Desktop"}},[l,i,m,r.supportsTemplateMode,g]);ja(S&&u),Hi(V?"block-selection-edit":"entity-edit");let we=Zi(r),We=(0,F.useMemo)(()=>({...r,styles:we,onNavigateToEntityRecord:c,onNavigateToPreviousEntityRecord:g,defaultRenderingMode:"post-only"}),[r,we,c,g]);ie?document.body.classList.add("show-icon-labels"):document.body.classList.remove("show-icon-labels");let Be=(0,K.__unstableUseNavigateRegions)(),bt=Q("edit-post-layout","is-mode-"+p,{"has-metaboxes":S});function E(C){n((0,q.sprintf)((0,q.__)('The "%s" plugin has encountered an error and cannot be rendered.'),C))}let{createSuccessNotice:T}=(0,fe.useDispatch)(ze.store),A=(0,F.useCallback)((C,j)=>{switch(C){case"move-to-trash":document.location.href=(0,ro.addQueryArgs)("edit.php",{trashed:1,post_type:j[0].type,ids:j[0].id});break;case"duplicate-post":{let D=j[0],le=typeof D.title=="string"?D.title:D.title?.rendered;T((0,q.sprintf)((0,q.__)('"%s" successfully created.'),(0,za.decodeEntities)(le)||(0,q.__)("(no title)")),{type:"snackbar",id:"duplicate-post-action",actions:[{label:(0,q.__)("Edit"),onClick:()=>{let N=D.id;document.location.href=(0,ro.addQueryArgs)("post.php",{post:N,action:"edit"})}}]})}break}},[T]),Se=(0,F.useMemo)(()=>({type:t,id:e}),[t,e]),xe=(0,ue.useViewportMatch)("medium")&&_?(0,f.jsx)(Jo,{initialPost:Se}):null;return(0,f.jsx)(K.SlotFillProvider,{children:(0,f.jsxs)(B.ErrorBoundary,{canCopyContent:!0,children:[(0,f.jsx)(ka,{postType:l}),(0,f.jsx)("div",{className:Be.className,...Be,ref:Be.ref,children:(0,f.jsxs)(Ki,{settings:We,initialEdits:a,postType:l,postId:i,templateId:be,className:bt,forceIsDirty:S,disableIframe:!s,autoFocus:!ce,onActionPerformed:A,extraSidebarPanels:Y&&(0,f.jsx)(dt,{location:"side"}),extraContent:!ne&&Y&&(0,f.jsx)(Ji,{isLegacy:Ue}),children:[(0,f.jsx)(B.PostLockedModal,{}),(0,f.jsx)(nr,{}),(0,f.jsx)(Yi,{isActive:_}),(0,f.jsx)(Br,{}),(0,f.jsx)(B.UnsavedChangesWarning,{}),(0,f.jsx)(B.AutosaveMonitor,{}),(0,f.jsx)(B.LocalAutosaveMonitor,{}),(0,f.jsx)(Pr,{}),(0,f.jsx)(B.EditorKeyboardShortcutsRegister,{}),(0,f.jsx)(Xi,{}),l==="wp_block"&&(0,f.jsx)(Mr,{}),(0,f.jsx)(Na.PluginArea,{onError:E}),(0,f.jsx)(wa,{}),xe,(0,f.jsx)(ze.SnackbarNotices,{className:"edit-post-layout__snackbar"})]})})]})})}var Wa=en;var k=o(P(),1),Ha=o(pe(),1),ao=o(Ce(),1);var re=o(v(),1),{PluginPostExcerpt:tn}=d(k.privateApis),ae=(0,Ha.getPath)(window.location.href)?.includes("site-editor.php"),me=e=>{(0,ao.default)(`wp.editPost.${e}`,{since:"6.6",alternative:`wp.editor.${e}`})};function on(e){return ae?null:(me("PluginBlockSettingsMenuItem"),(0,re.jsx)(k.PluginBlockSettingsMenuItem,{...e}))}function rn(e){return ae?null:(me("PluginDocumentSettingPanel"),(0,re.jsx)(k.PluginDocumentSettingPanel,{...e}))}function an(e){return ae?null:(me("PluginMoreMenuItem"),(0,re.jsx)(k.PluginMoreMenuItem,{...e}))}function sn(e){return ae?null:(me("PluginPrePublishPanel"),(0,re.jsx)(k.PluginPrePublishPanel,{...e}))}function nn(e){return ae?null:(me("PluginPostPublishPanel"),(0,re.jsx)(k.PluginPostPublishPanel,{...e}))}function ln(e){return ae?null:(me("PluginPostStatusInfo"),(0,re.jsx)(k.PluginPostStatusInfo,{...e}))}function dn(e){return ae?null:(me("PluginSidebar"),(0,re.jsx)(k.PluginSidebar,{...e}))}function fn(e){return ae?null:(me("PluginSidebarMoreMenuItem"),(0,re.jsx)(k.PluginSidebarMoreMenuItem,{...e}))}function un(){return ae?null:((0,ao.default)("wp.editPost.__experimentalPluginPostExcerpt",{since:"6.6",hint:"Core and custom panels can be access programmatically using their panel name.",link:"https://developer.wordpress.org/block-editor/reference-guides/slotfills/plugin-document-setting-panel/#accessing-a-panel-programmatically"}),tn)}var so=o(v(),1),{BackButton:mn,registerCoreBlockBindingsSources:cn}=d(vt.privateApis);function pn(e,t,r,a,s){let n=window.matchMedia("(min-width: 782px)").matches,i=document.getElementById(e),l=(0,ht.createRoot)(i);return(0,se.dispatch)(Ie.store).setDefaults("core/edit-post",{fullscreenMode:!0,themeStyles:!0,welcomeGuide:!0,welcomeGuideTemplate:!0}),(0,se.dispatch)(Ie.store).setDefaults("core",{allowRightClickOverrides:!0,editorMode:"visual",editorTool:"edit",fixedToolbar:!1,hiddenBlockTypes:[],inactivePanels:[],openPanels:["post-status"],showBlockBreadcrumbs:!0,showIconLabels:!1,showListViewByDefault:!1,enableChoosePatternModal:!0,isPublishSidebarEnabled:!0,showCollaborationCursor:!1,showCollaborationNotifications:!0}),window.__clientSideMediaProcessing&&(0,se.dispatch)(Ie.store).setDefaults("core/media",{requireApproval:!0,optimizeOnUpload:!0}),(0,se.dispatch)(qa.store).reapplyBlockTypeFilters(),n&&(0,se.select)(Ie.store).get("core","showListViewByDefault")&&!(0,se.select)(Ie.store).get("core","distractionFree")&&(0,se.dispatch)(vt.store).setIsListViewOpened(!0),(0,Ka.registerCoreBlocks)(),cn(),(0,yt.registerLegacyWidgetBlock)({inserter:!1}),(0,yt.registerWidgetGroupBlock)({inserter:!1}),(document.compatMode==="CSS1Compat"?"Standards":"Quirks")!=="Standards"&&console.warn(`Your browser is using Quirks Mode. 
This can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening <!DOCTYPE html>. Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins.`),window.navigator.userAgent.indexOf("iPhone")!==-1&&window.addEventListener("scroll",m=>{let p=document.getElementsByClassName("interface-interface-skeleton__body")[0];m.target===document&&(window.scrollY>100&&(p.scrollTop=p.scrollTop+window.scrollY),document.getElementsByClassName("is-mode-visual")[0]&&window.scrollTo(0,0))}),window.addEventListener("dragover",m=>m.preventDefault(),!1),window.addEventListener("drop",m=>m.preventDefault(),!1),l.render((0,so.jsx)(ht.StrictMode,{children:(0,so.jsx)(Wa,{settings:a,postId:r,postType:t,initialEdits:s})})),l}function gn(){(0,Ya.default)("wp.editPost.reinitializeEditor",{since:"6.2",version:"6.3"})}return cs(hn);})();
                                                                                                                                                                                                                                                                                                                                                                                                                                                       dist/edit-site.js                                                                                   0000644                 00006574040 15212564011 0007751 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).editSite = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __require = /* @__PURE__ */ ((x2) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x2, {
    get: (a2, b2) => (typeof require !== "undefined" ? require : a2)[b2]
  }) : x2)(function(x2) {
    if (typeof require !== "undefined") return require.apply(this, arguments);
    throw Error('Dynamic require of "' + x2 + '" is not supported');
  });
  var __commonJS = (cb, mod) => function __require4() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name2 in all)
      __defProp(target, name2, { get: all[name2], enumerable: true });
  };
  var __copyProps = (to2, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to2, key) && key !== except)
          __defProp(to2, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to2;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/blocks
  var require_blocks = __commonJS({
    "package-external:@wordpress/blocks"(exports, module) {
      module.exports = window.wp.blocks;
    }
  });

  // package-external:@wordpress/block-library
  var require_block_library = __commonJS({
    "package-external:@wordpress/block-library"(exports, module) {
      module.exports = window.wp.blockLibrary;
    }
  });

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/deprecated
  var require_deprecated = __commonJS({
    "package-external:@wordpress/deprecated"(exports, module) {
      module.exports = window.wp.deprecated;
    }
  });

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/editor
  var require_editor = __commonJS({
    "package-external:@wordpress/editor"(exports, module) {
      module.exports = window.wp.editor;
    }
  });

  // package-external:@wordpress/preferences
  var require_preferences = __commonJS({
    "package-external:@wordpress/preferences"(exports, module) {
      module.exports = window.wp.preferences;
    }
  });

  // package-external:@wordpress/widgets
  var require_widgets = __commonJS({
    "package-external:@wordpress/widgets"(exports, module) {
      module.exports = window.wp.widgets;
    }
  });

  // package-external:@wordpress/core-data
  var require_core_data = __commonJS({
    "package-external:@wordpress/core-data"(exports, module) {
      module.exports = window.wp.coreData;
    }
  });

  // package-external:@wordpress/block-editor
  var require_block_editor = __commonJS({
    "package-external:@wordpress/block-editor"(exports, module) {
      module.exports = window.wp.blockEditor;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // package-external:@wordpress/patterns
  var require_patterns = __commonJS({
    "package-external:@wordpress/patterns"(exports, module) {
      module.exports = window.wp.patterns;
    }
  });

  // package-external:@wordpress/private-apis
  var require_private_apis = __commonJS({
    "package-external:@wordpress/private-apis"(exports, module) {
      module.exports = window.wp.privateApis;
    }
  });

  // package-external:@wordpress/router
  var require_router = __commonJS({
    "package-external:@wordpress/router"(exports, module) {
      module.exports = window.wp.router;
    }
  });

  // package-external:@wordpress/components
  var require_components = __commonJS({
    "package-external:@wordpress/components"(exports, module) {
      module.exports = window.wp.components;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // vendor-external:react
  var require_react = __commonJS({
    "vendor-external:react"(exports, module) {
      module.exports = window.React;
    }
  });

  // vendor-external:react-dom
  var require_react_dom = __commonJS({
    "vendor-external:react-dom"(exports, module) {
      module.exports = window.ReactDOM;
    }
  });

  // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
  var require_use_sync_external_store_shim_development = __commonJS({
    "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports) {
      "use strict";
      (function() {
        function is2(x2, y2) {
          return x2 === y2 && (0 !== x2 || 1 / x2 === 1 / y2) || x2 !== x2 && y2 !== y2;
        }
        function useSyncExternalStore$2(subscribe2, getSnapshot) {
          didWarnOld18Alpha || void 0 === React10.startTransition || (didWarnOld18Alpha = true, console.error(
            "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
          ));
          var value = getSnapshot();
          if (!didWarnUncachedGetSnapshot) {
            var cachedValue = getSnapshot();
            objectIs(value, cachedValue) || (console.error(
              "The result of getSnapshot should be cached to avoid an infinite loop"
            ), didWarnUncachedGetSnapshot = true);
          }
          cachedValue = useState71({
            inst: { value, getSnapshot }
          });
          var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
          useLayoutEffect7(
            function() {
              inst.value = value;
              inst.getSnapshot = getSnapshot;
              checkIfSnapshotChanged(inst) && forceUpdate({ inst });
            },
            [subscribe2, value, getSnapshot]
          );
          useEffect51(
            function() {
              checkIfSnapshotChanged(inst) && forceUpdate({ inst });
              return subscribe2(function() {
                checkIfSnapshotChanged(inst) && forceUpdate({ inst });
              });
            },
            [subscribe2]
          );
          useDebugValue(value);
          return value;
        }
        function checkIfSnapshotChanged(inst) {
          var latestGetSnapshot = inst.getSnapshot;
          inst = inst.value;
          try {
            var nextValue = latestGetSnapshot();
            return !objectIs(inst, nextValue);
          } catch (error) {
            return true;
          }
        }
        function useSyncExternalStore$1(subscribe2, getSnapshot) {
          return getSnapshot();
        }
        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
        var React10 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is2, useState71 = React10.useState, useEffect51 = React10.useEffect, useLayoutEffect7 = React10.useLayoutEffect, useDebugValue = React10.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
        exports.useSyncExternalStore = void 0 !== React10.useSyncExternalStore ? React10.useSyncExternalStore : shim;
        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
      })();
    }
  });

  // node_modules/use-sync-external-store/shim/index.js
  var require_shim = __commonJS({
    "node_modules/use-sync-external-store/shim/index.js"(exports, module) {
      "use strict";
      if (false) {
        module.exports = null;
      } else {
        module.exports = require_use_sync_external_store_shim_development();
      }
    }
  });

  // package-external:@wordpress/a11y
  var require_a11y = __commonJS({
    "package-external:@wordpress/a11y"(exports, module) {
      module.exports = window.wp.a11y;
    }
  });

  // package-external:@wordpress/primitives
  var require_primitives = __commonJS({
    "package-external:@wordpress/primitives"(exports, module) {
      module.exports = window.wp.primitives;
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // package-external:@wordpress/plugins
  var require_plugins = __commonJS({
    "package-external:@wordpress/plugins"(exports, module) {
      module.exports = window.wp.plugins;
    }
  });

  // package-external:@wordpress/notices
  var require_notices = __commonJS({
    "package-external:@wordpress/notices"(exports, module) {
      module.exports = window.wp.notices;
    }
  });

  // package-external:@wordpress/html-entities
  var require_html_entities = __commonJS({
    "package-external:@wordpress/html-entities"(exports, module) {
      module.exports = window.wp.htmlEntities;
    }
  });

  // package-external:@wordpress/commands
  var require_commands = __commonJS({
    "package-external:@wordpress/commands"(exports, module) {
      module.exports = window.wp.commands;
    }
  });

  // package-external:@wordpress/keycodes
  var require_keycodes = __commonJS({
    "package-external:@wordpress/keycodes"(exports, module) {
      module.exports = window.wp.keycodes;
    }
  });

  // package-external:@wordpress/url
  var require_url = __commonJS({
    "package-external:@wordpress/url"(exports, module) {
      module.exports = window.wp.url;
    }
  });

  // package-external:@wordpress/dom
  var require_dom = __commonJS({
    "package-external:@wordpress/dom"(exports, module) {
      module.exports = window.wp.dom;
    }
  });

  // package-external:@wordpress/keyboard-shortcuts
  var require_keyboard_shortcuts = __commonJS({
    "package-external:@wordpress/keyboard-shortcuts"(exports, module) {
      module.exports = window.wp.keyboardShortcuts;
    }
  });

  // package-external:@wordpress/api-fetch
  var require_api_fetch = __commonJS({
    "package-external:@wordpress/api-fetch"(exports, module) {
      module.exports = window.wp.apiFetch;
    }
  });

  // package-external:@wordpress/style-engine
  var require_style_engine = __commonJS({
    "package-external:@wordpress/style-engine"(exports, module) {
      module.exports = window.wp.styleEngine;
    }
  });

  // node_modules/fast-deep-equal/es6/index.js
  var require_es6 = __commonJS({
    "node_modules/fast-deep-equal/es6/index.js"(exports, module) {
      "use strict";
      module.exports = function equal(a2, b2) {
        if (a2 === b2) return true;
        if (a2 && b2 && typeof a2 == "object" && typeof b2 == "object") {
          if (a2.constructor !== b2.constructor) return false;
          var length, i2, keys;
          if (Array.isArray(a2)) {
            length = a2.length;
            if (length != b2.length) return false;
            for (i2 = length; i2-- !== 0; )
              if (!equal(a2[i2], b2[i2])) return false;
            return true;
          }
          if (a2 instanceof Map && b2 instanceof Map) {
            if (a2.size !== b2.size) return false;
            for (i2 of a2.entries())
              if (!b2.has(i2[0])) return false;
            for (i2 of a2.entries())
              if (!equal(i2[1], b2.get(i2[0]))) return false;
            return true;
          }
          if (a2 instanceof Set && b2 instanceof Set) {
            if (a2.size !== b2.size) return false;
            for (i2 of a2.entries())
              if (!b2.has(i2[0])) return false;
            return true;
          }
          if (ArrayBuffer.isView(a2) && ArrayBuffer.isView(b2)) {
            length = a2.length;
            if (length != b2.length) return false;
            for (i2 = length; i2-- !== 0; )
              if (a2[i2] !== b2[i2]) return false;
            return true;
          }
          if (a2.constructor === RegExp) return a2.source === b2.source && a2.flags === b2.flags;
          if (a2.valueOf !== Object.prototype.valueOf) return a2.valueOf() === b2.valueOf();
          if (a2.toString !== Object.prototype.toString) return a2.toString() === b2.toString();
          keys = Object.keys(a2);
          length = keys.length;
          if (length !== Object.keys(b2).length) return false;
          for (i2 = length; i2-- !== 0; )
            if (!Object.prototype.hasOwnProperty.call(b2, keys[i2])) return false;
          for (i2 = length; i2-- !== 0; ) {
            var key = keys[i2];
            if (!equal(a2[key], b2[key])) return false;
          }
          return true;
        }
        return a2 !== a2 && b2 !== b2;
      };
    }
  });

  // node_modules/deepmerge/dist/cjs.js
  var require_cjs = __commonJS({
    "node_modules/deepmerge/dist/cjs.js"(exports, module) {
      "use strict";
      var isMergeableObject = function isMergeableObject2(value) {
        return isNonNullObject(value) && !isSpecial(value);
      };
      function isNonNullObject(value) {
        return !!value && typeof value === "object";
      }
      function isSpecial(value) {
        var stringValue = Object.prototype.toString.call(value);
        return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
      }
      var canUseSymbol = typeof Symbol === "function" && Symbol.for;
      var REACT_ELEMENT_TYPE = canUseSymbol ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
      function isReactElement(value) {
        return value.$$typeof === REACT_ELEMENT_TYPE;
      }
      function emptyTarget(val) {
        return Array.isArray(val) ? [] : {};
      }
      function cloneUnlessOtherwiseSpecified(value, options) {
        return options.clone !== false && options.isMergeableObject(value) ? deepmerge2(emptyTarget(value), value, options) : value;
      }
      function defaultArrayMerge(target, source, options) {
        return target.concat(source).map(function(element) {
          return cloneUnlessOtherwiseSpecified(element, options);
        });
      }
      function getMergeFunction(key, options) {
        if (!options.customMerge) {
          return deepmerge2;
        }
        var customMerge = options.customMerge(key);
        return typeof customMerge === "function" ? customMerge : deepmerge2;
      }
      function getEnumerableOwnPropertySymbols(target) {
        return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol3) {
          return Object.propertyIsEnumerable.call(target, symbol3);
        }) : [];
      }
      function getKeys2(target) {
        return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
      }
      function propertyIsOnObject(object, property) {
        try {
          return property in object;
        } catch (_) {
          return false;
        }
      }
      function propertyIsUnsafe(target, key) {
        return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
      }
      function mergeObject(target, source, options) {
        var destination = {};
        if (options.isMergeableObject(target)) {
          getKeys2(target).forEach(function(key) {
            destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
          });
        }
        getKeys2(source).forEach(function(key) {
          if (propertyIsUnsafe(target, key)) {
            return;
          }
          if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
            destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
          } else {
            destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
          }
        });
        return destination;
      }
      function deepmerge2(target, source, options) {
        options = options || {};
        options.arrayMerge = options.arrayMerge || defaultArrayMerge;
        options.isMergeableObject = options.isMergeableObject || isMergeableObject;
        options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
        var sourceIsArray = Array.isArray(source);
        var targetIsArray = Array.isArray(target);
        var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
        if (!sourceAndTargetTypesMatch) {
          return cloneUnlessOtherwiseSpecified(source, options);
        } else if (sourceIsArray) {
          return options.arrayMerge(target, source, options);
        } else {
          return mergeObject(target, source, options);
        }
      }
      deepmerge2.all = function deepmergeAll(array, options) {
        if (!Array.isArray(array)) {
          throw new Error("first argument should be an array");
        }
        return array.reduce(function(prev, next) {
          return deepmerge2(prev, next, options);
        }, {});
      };
      var deepmerge_1 = deepmerge2;
      module.exports = deepmerge_1;
    }
  });

  // package-external:@wordpress/date
  var require_date = __commonJS({
    "package-external:@wordpress/date"(exports, module) {
      module.exports = window.wp.date;
    }
  });

  // package-external:@wordpress/blob
  var require_blob = __commonJS({
    "package-external:@wordpress/blob"(exports, module) {
      module.exports = window.wp.blob;
    }
  });

  // node_modules/remove-accents/index.js
  var require_remove_accents = __commonJS({
    "node_modules/remove-accents/index.js"(exports, module) {
      var characterMap = {
        "\xC0": "A",
        "\xC1": "A",
        "\xC2": "A",
        "\xC3": "A",
        "\xC4": "A",
        "\xC5": "A",
        "\u1EA4": "A",
        "\u1EAE": "A",
        "\u1EB2": "A",
        "\u1EB4": "A",
        "\u1EB6": "A",
        "\xC6": "AE",
        "\u1EA6": "A",
        "\u1EB0": "A",
        "\u0202": "A",
        "\u1EA2": "A",
        "\u1EA0": "A",
        "\u1EA8": "A",
        "\u1EAA": "A",
        "\u1EAC": "A",
        "\xC7": "C",
        "\u1E08": "C",
        "\xC8": "E",
        "\xC9": "E",
        "\xCA": "E",
        "\xCB": "E",
        "\u1EBE": "E",
        "\u1E16": "E",
        "\u1EC0": "E",
        "\u1E14": "E",
        "\u1E1C": "E",
        "\u0206": "E",
        "\u1EBA": "E",
        "\u1EBC": "E",
        "\u1EB8": "E",
        "\u1EC2": "E",
        "\u1EC4": "E",
        "\u1EC6": "E",
        "\xCC": "I",
        "\xCD": "I",
        "\xCE": "I",
        "\xCF": "I",
        "\u1E2E": "I",
        "\u020A": "I",
        "\u1EC8": "I",
        "\u1ECA": "I",
        "\xD0": "D",
        "\xD1": "N",
        "\xD2": "O",
        "\xD3": "O",
        "\xD4": "O",
        "\xD5": "O",
        "\xD6": "O",
        "\xD8": "O",
        "\u1ED0": "O",
        "\u1E4C": "O",
        "\u1E52": "O",
        "\u020E": "O",
        "\u1ECE": "O",
        "\u1ECC": "O",
        "\u1ED4": "O",
        "\u1ED6": "O",
        "\u1ED8": "O",
        "\u1EDC": "O",
        "\u1EDE": "O",
        "\u1EE0": "O",
        "\u1EDA": "O",
        "\u1EE2": "O",
        "\xD9": "U",
        "\xDA": "U",
        "\xDB": "U",
        "\xDC": "U",
        "\u1EE6": "U",
        "\u1EE4": "U",
        "\u1EEC": "U",
        "\u1EEE": "U",
        "\u1EF0": "U",
        "\xDD": "Y",
        "\xE0": "a",
        "\xE1": "a",
        "\xE2": "a",
        "\xE3": "a",
        "\xE4": "a",
        "\xE5": "a",
        "\u1EA5": "a",
        "\u1EAF": "a",
        "\u1EB3": "a",
        "\u1EB5": "a",
        "\u1EB7": "a",
        "\xE6": "ae",
        "\u1EA7": "a",
        "\u1EB1": "a",
        "\u0203": "a",
        "\u1EA3": "a",
        "\u1EA1": "a",
        "\u1EA9": "a",
        "\u1EAB": "a",
        "\u1EAD": "a",
        "\xE7": "c",
        "\u1E09": "c",
        "\xE8": "e",
        "\xE9": "e",
        "\xEA": "e",
        "\xEB": "e",
        "\u1EBF": "e",
        "\u1E17": "e",
        "\u1EC1": "e",
        "\u1E15": "e",
        "\u1E1D": "e",
        "\u0207": "e",
        "\u1EBB": "e",
        "\u1EBD": "e",
        "\u1EB9": "e",
        "\u1EC3": "e",
        "\u1EC5": "e",
        "\u1EC7": "e",
        "\xEC": "i",
        "\xED": "i",
        "\xEE": "i",
        "\xEF": "i",
        "\u1E2F": "i",
        "\u020B": "i",
        "\u1EC9": "i",
        "\u1ECB": "i",
        "\xF0": "d",
        "\xF1": "n",
        "\xF2": "o",
        "\xF3": "o",
        "\xF4": "o",
        "\xF5": "o",
        "\xF6": "o",
        "\xF8": "o",
        "\u1ED1": "o",
        "\u1E4D": "o",
        "\u1E53": "o",
        "\u020F": "o",
        "\u1ECF": "o",
        "\u1ECD": "o",
        "\u1ED5": "o",
        "\u1ED7": "o",
        "\u1ED9": "o",
        "\u1EDD": "o",
        "\u1EDF": "o",
        "\u1EE1": "o",
        "\u1EDB": "o",
        "\u1EE3": "o",
        "\xF9": "u",
        "\xFA": "u",
        "\xFB": "u",
        "\xFC": "u",
        "\u1EE7": "u",
        "\u1EE5": "u",
        "\u1EED": "u",
        "\u1EEF": "u",
        "\u1EF1": "u",
        "\xFD": "y",
        "\xFF": "y",
        "\u0100": "A",
        "\u0101": "a",
        "\u0102": "A",
        "\u0103": "a",
        "\u0104": "A",
        "\u0105": "a",
        "\u0106": "C",
        "\u0107": "c",
        "\u0108": "C",
        "\u0109": "c",
        "\u010A": "C",
        "\u010B": "c",
        "\u010C": "C",
        "\u010D": "c",
        "C\u0306": "C",
        "c\u0306": "c",
        "\u010E": "D",
        "\u010F": "d",
        "\u0110": "D",
        "\u0111": "d",
        "\u0112": "E",
        "\u0113": "e",
        "\u0114": "E",
        "\u0115": "e",
        "\u0116": "E",
        "\u0117": "e",
        "\u0118": "E",
        "\u0119": "e",
        "\u011A": "E",
        "\u011B": "e",
        "\u011C": "G",
        "\u01F4": "G",
        "\u011D": "g",
        "\u01F5": "g",
        "\u011E": "G",
        "\u011F": "g",
        "\u0120": "G",
        "\u0121": "g",
        "\u0122": "G",
        "\u0123": "g",
        "\u0124": "H",
        "\u0125": "h",
        "\u0126": "H",
        "\u0127": "h",
        "\u1E2A": "H",
        "\u1E2B": "h",
        "\u0128": "I",
        "\u0129": "i",
        "\u012A": "I",
        "\u012B": "i",
        "\u012C": "I",
        "\u012D": "i",
        "\u012E": "I",
        "\u012F": "i",
        "\u0130": "I",
        "\u0131": "i",
        "\u0132": "IJ",
        "\u0133": "ij",
        "\u0134": "J",
        "\u0135": "j",
        "\u0136": "K",
        "\u0137": "k",
        "\u1E30": "K",
        "\u1E31": "k",
        "K\u0306": "K",
        "k\u0306": "k",
        "\u0139": "L",
        "\u013A": "l",
        "\u013B": "L",
        "\u013C": "l",
        "\u013D": "L",
        "\u013E": "l",
        "\u013F": "L",
        "\u0140": "l",
        "\u0141": "l",
        "\u0142": "l",
        "\u1E3E": "M",
        "\u1E3F": "m",
        "M\u0306": "M",
        "m\u0306": "m",
        "\u0143": "N",
        "\u0144": "n",
        "\u0145": "N",
        "\u0146": "n",
        "\u0147": "N",
        "\u0148": "n",
        "\u0149": "n",
        "N\u0306": "N",
        "n\u0306": "n",
        "\u014C": "O",
        "\u014D": "o",
        "\u014E": "O",
        "\u014F": "o",
        "\u0150": "O",
        "\u0151": "o",
        "\u0152": "OE",
        "\u0153": "oe",
        "P\u0306": "P",
        "p\u0306": "p",
        "\u0154": "R",
        "\u0155": "r",
        "\u0156": "R",
        "\u0157": "r",
        "\u0158": "R",
        "\u0159": "r",
        "R\u0306": "R",
        "r\u0306": "r",
        "\u0212": "R",
        "\u0213": "r",
        "\u015A": "S",
        "\u015B": "s",
        "\u015C": "S",
        "\u015D": "s",
        "\u015E": "S",
        "\u0218": "S",
        "\u0219": "s",
        "\u015F": "s",
        "\u0160": "S",
        "\u0161": "s",
        "\u0162": "T",
        "\u0163": "t",
        "\u021B": "t",
        "\u021A": "T",
        "\u0164": "T",
        "\u0165": "t",
        "\u0166": "T",
        "\u0167": "t",
        "T\u0306": "T",
        "t\u0306": "t",
        "\u0168": "U",
        "\u0169": "u",
        "\u016A": "U",
        "\u016B": "u",
        "\u016C": "U",
        "\u016D": "u",
        "\u016E": "U",
        "\u016F": "u",
        "\u0170": "U",
        "\u0171": "u",
        "\u0172": "U",
        "\u0173": "u",
        "\u0216": "U",
        "\u0217": "u",
        "V\u0306": "V",
        "v\u0306": "v",
        "\u0174": "W",
        "\u0175": "w",
        "\u1E82": "W",
        "\u1E83": "w",
        "X\u0306": "X",
        "x\u0306": "x",
        "\u0176": "Y",
        "\u0177": "y",
        "\u0178": "Y",
        "Y\u0306": "Y",
        "y\u0306": "y",
        "\u0179": "Z",
        "\u017A": "z",
        "\u017B": "Z",
        "\u017C": "z",
        "\u017D": "Z",
        "\u017E": "z",
        "\u017F": "s",
        "\u0192": "f",
        "\u01A0": "O",
        "\u01A1": "o",
        "\u01AF": "U",
        "\u01B0": "u",
        "\u01CD": "A",
        "\u01CE": "a",
        "\u01CF": "I",
        "\u01D0": "i",
        "\u01D1": "O",
        "\u01D2": "o",
        "\u01D3": "U",
        "\u01D4": "u",
        "\u01D5": "U",
        "\u01D6": "u",
        "\u01D7": "U",
        "\u01D8": "u",
        "\u01D9": "U",
        "\u01DA": "u",
        "\u01DB": "U",
        "\u01DC": "u",
        "\u1EE8": "U",
        "\u1EE9": "u",
        "\u1E78": "U",
        "\u1E79": "u",
        "\u01FA": "A",
        "\u01FB": "a",
        "\u01FC": "AE",
        "\u01FD": "ae",
        "\u01FE": "O",
        "\u01FF": "o",
        "\xDE": "TH",
        "\xFE": "th",
        "\u1E54": "P",
        "\u1E55": "p",
        "\u1E64": "S",
        "\u1E65": "s",
        "X\u0301": "X",
        "x\u0301": "x",
        "\u0403": "\u0413",
        "\u0453": "\u0433",
        "\u040C": "\u041A",
        "\u045C": "\u043A",
        "A\u030B": "A",
        "a\u030B": "a",
        "E\u030B": "E",
        "e\u030B": "e",
        "I\u030B": "I",
        "i\u030B": "i",
        "\u01F8": "N",
        "\u01F9": "n",
        "\u1ED2": "O",
        "\u1ED3": "o",
        "\u1E50": "O",
        "\u1E51": "o",
        "\u1EEA": "U",
        "\u1EEB": "u",
        "\u1E80": "W",
        "\u1E81": "w",
        "\u1EF2": "Y",
        "\u1EF3": "y",
        "\u0200": "A",
        "\u0201": "a",
        "\u0204": "E",
        "\u0205": "e",
        "\u0208": "I",
        "\u0209": "i",
        "\u020C": "O",
        "\u020D": "o",
        "\u0210": "R",
        "\u0211": "r",
        "\u0214": "U",
        "\u0215": "u",
        "B\u030C": "B",
        "b\u030C": "b",
        "\u010C\u0323": "C",
        "\u010D\u0323": "c",
        "\xCA\u030C": "E",
        "\xEA\u030C": "e",
        "F\u030C": "F",
        "f\u030C": "f",
        "\u01E6": "G",
        "\u01E7": "g",
        "\u021E": "H",
        "\u021F": "h",
        "J\u030C": "J",
        "\u01F0": "j",
        "\u01E8": "K",
        "\u01E9": "k",
        "M\u030C": "M",
        "m\u030C": "m",
        "P\u030C": "P",
        "p\u030C": "p",
        "Q\u030C": "Q",
        "q\u030C": "q",
        "\u0158\u0329": "R",
        "\u0159\u0329": "r",
        "\u1E66": "S",
        "\u1E67": "s",
        "V\u030C": "V",
        "v\u030C": "v",
        "W\u030C": "W",
        "w\u030C": "w",
        "X\u030C": "X",
        "x\u030C": "x",
        "Y\u030C": "Y",
        "y\u030C": "y",
        "A\u0327": "A",
        "a\u0327": "a",
        "B\u0327": "B",
        "b\u0327": "b",
        "\u1E10": "D",
        "\u1E11": "d",
        "\u0228": "E",
        "\u0229": "e",
        "\u0190\u0327": "E",
        "\u025B\u0327": "e",
        "\u1E28": "H",
        "\u1E29": "h",
        "I\u0327": "I",
        "i\u0327": "i",
        "\u0197\u0327": "I",
        "\u0268\u0327": "i",
        "M\u0327": "M",
        "m\u0327": "m",
        "O\u0327": "O",
        "o\u0327": "o",
        "Q\u0327": "Q",
        "q\u0327": "q",
        "U\u0327": "U",
        "u\u0327": "u",
        "X\u0327": "X",
        "x\u0327": "x",
        "Z\u0327": "Z",
        "z\u0327": "z",
        "\u0439": "\u0438",
        "\u0419": "\u0418",
        "\u0451": "\u0435",
        "\u0401": "\u0415"
      };
      var chars = Object.keys(characterMap).join("|");
      var allAccents = new RegExp(chars, "g");
      var firstAccent = new RegExp(chars, "");
      function matcher(match3) {
        return characterMap[match3];
      }
      var removeAccents3 = function(string) {
        return string.replace(allAccents, matcher);
      };
      var hasAccents = function(string) {
        return !!string.match(firstAccent);
      };
      module.exports = removeAccents3;
      module.exports.has = hasAccents;
      module.exports.remove = removeAccents3;
    }
  });

  // package-external:@wordpress/warning
  var require_warning = __commonJS({
    "package-external:@wordpress/warning"(exports, module) {
      module.exports = window.wp.warning;
    }
  });

  // packages/edit-site/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    PluginMoreMenuItem: () => PluginMoreMenuItem,
    PluginSidebar: () => PluginSidebar,
    PluginSidebarMoreMenuItem: () => PluginSidebarMoreMenuItem,
    PluginTemplateSettingPanel: () => plugin_template_setting_panel_default,
    initializeEditor: () => initializeEditor,
    reinitializeEditor: () => reinitializeEditor,
    store: () => store
  });
  var import_blocks15 = __toESM(require_blocks(), 1);
  var import_block_library3 = __toESM(require_block_library(), 1);
  var import_data84 = __toESM(require_data(), 1);
  var import_deprecated6 = __toESM(require_deprecated(), 1);
  var import_element162 = __toESM(require_element(), 1);
  var import_editor46 = __toESM(require_editor(), 1);
  var import_preferences13 = __toESM(require_preferences(), 1);
  var import_widgets = __toESM(require_widgets(), 1);

  // packages/edit-site/build-module/store/index.mjs
  var import_data3 = __toESM(require_data(), 1);

  // packages/edit-site/build-module/store/reducer.mjs
  var import_data = __toESM(require_data(), 1);
  function settings(state = {}, action) {
    switch (action.type) {
      case "UPDATE_SETTINGS":
        return {
          ...state,
          ...action.settings
        };
    }
    return state;
  }
  function editedPost(state = {}, action) {
    switch (action.type) {
      case "SET_EDITED_POST":
        return {
          postType: action.postType,
          id: action.id,
          context: action.context
        };
      case "SET_EDITED_POST_CONTEXT":
        return {
          ...state,
          context: action.context
        };
    }
    return state;
  }
  function saveViewPanel(state = false, action) {
    switch (action.type) {
      case "SET_IS_SAVE_VIEW_OPENED":
        return action.isOpen;
    }
    return state;
  }
  function routes(state = [], action) {
    switch (action.type) {
      case "REGISTER_ROUTE":
        return [...state, action.route];
      case "UNREGISTER_ROUTE":
        return state.filter((route) => route.name !== action.name);
    }
    return state;
  }
  var reducer_default = (0, import_data.combineReducers)({
    settings,
    editedPost,
    saveViewPanel,
    routes
  });

  // packages/edit-site/build-module/store/actions.mjs
  var actions_exports = {};
  __export(actions_exports, {
    __experimentalSetPreviewDeviceType: () => __experimentalSetPreviewDeviceType,
    addTemplate: () => addTemplate,
    closeGeneralSidebar: () => closeGeneralSidebar,
    openGeneralSidebar: () => openGeneralSidebar,
    openNavigationPanelToMenu: () => openNavigationPanelToMenu,
    removeTemplate: () => removeTemplate,
    revertTemplate: () => revertTemplate,
    setEditedEntity: () => setEditedEntity,
    setEditedPostContext: () => setEditedPostContext,
    setHasPageContentFocus: () => setHasPageContentFocus,
    setHomeTemplateId: () => setHomeTemplateId,
    setIsInserterOpened: () => setIsInserterOpened,
    setIsListViewOpened: () => setIsListViewOpened,
    setIsNavigationPanelOpened: () => setIsNavigationPanelOpened,
    setIsSaveViewOpened: () => setIsSaveViewOpened,
    setNavigationMenu: () => setNavigationMenu,
    setNavigationPanelActiveMenu: () => setNavigationPanelActiveMenu,
    setPage: () => setPage,
    setTemplate: () => setTemplate,
    setTemplatePart: () => setTemplatePart,
    switchEditorMode: () => switchEditorMode,
    toggleDistractionFree: () => toggleDistractionFree,
    toggleFeature: () => toggleFeature,
    updateSettings: () => updateSettings
  });
  var import_blocks = __toESM(require_blocks(), 1);
  var import_deprecated = __toESM(require_deprecated(), 1);
  var import_core_data = __toESM(require_core_data(), 1);
  var import_block_editor = __toESM(require_block_editor(), 1);
  var import_editor = __toESM(require_editor(), 1);
  var import_preferences = __toESM(require_preferences(), 1);

  // packages/edit-site/build-module/utils/constants.mjs
  var import_i18n = __toESM(require_i18n(), 1);
  var import_patterns = __toESM(require_patterns(), 1);

  // packages/edit-site/build-module/lock-unlock.mjs
  var import_private_apis = __toESM(require_private_apis(), 1);
  var { lock, unlock } = (0, import_private_apis.__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"
  );

  // packages/edit-site/build-module/utils/constants.mjs
  var ATTACHMENT_POST_TYPE = "attachment";
  var NAVIGATION_POST_TYPE = "wp_navigation";
  var TEMPLATE_POST_TYPE = "wp_template";
  var TEMPLATE_PART_POST_TYPE = "wp_template_part";
  var TEMPLATE_ORIGINS = {
    custom: "custom",
    theme: "theme",
    plugin: "plugin"
  };
  var TEMPLATE_PART_AREA_DEFAULT_CATEGORY = "uncategorized";
  var TEMPLATE_PART_ALL_AREAS_CATEGORY = "all-parts";
  var {
    PATTERN_TYPES,
    PATTERN_DEFAULT_CATEGORY,
    PATTERN_USER_CATEGORY,
    EXCLUDED_PATTERN_SOURCES,
    PATTERN_SYNC_TYPES
  } = unlock(import_patterns.privateApis);
  var FOCUSABLE_ENTITIES = [
    TEMPLATE_PART_POST_TYPE,
    NAVIGATION_POST_TYPE,
    PATTERN_TYPES.user
  ];
  var POST_TYPE_LABELS = {
    [TEMPLATE_POST_TYPE]: (0, import_i18n.__)("Template"),
    [TEMPLATE_PART_POST_TYPE]: (0, import_i18n.__)("Template part"),
    [PATTERN_TYPES.user]: (0, import_i18n.__)("Pattern"),
    [NAVIGATION_POST_TYPE]: (0, import_i18n.__)("Navigation")
  };
  var LAYOUT_GRID = "grid";
  var LAYOUT_TABLE = "table";
  var LAYOUT_LIST = "list";
  var OPERATOR_IS = "is";
  var OPERATOR_IS_ANY = "isAny";
  var OPERATOR_IS_NONE = "isNone";
  var OPERATOR_BEFORE = "before";
  var OPERATOR_AFTER = "after";

  // packages/edit-site/build-module/store/actions.mjs
  var { interfaceStore } = unlock(import_editor.privateApis);
  function toggleFeature(featureName) {
    return function({ registry }) {
      (0, import_deprecated.default)(
        "dispatch( 'core/edit-site' ).toggleFeature( featureName )",
        {
          since: "6.0",
          alternative: "dispatch( 'core/preferences').toggle( 'core/edit-site', featureName )"
        }
      );
      registry.dispatch(import_preferences.store).toggle("core/edit-site", featureName);
    };
  }
  var __experimentalSetPreviewDeviceType = (deviceType) => ({ registry }) => {
    (0, import_deprecated.default)(
      "dispatch( 'core/edit-site' ).__experimentalSetPreviewDeviceType",
      {
        since: "6.5",
        version: "6.7",
        hint: "registry.dispatch( editorStore ).setDeviceType"
      }
    );
    registry.dispatch(import_editor.store).setDeviceType(deviceType);
  };
  function setTemplate() {
    (0, import_deprecated.default)("dispatch( 'core/edit-site' ).setTemplate", {
      since: "6.5",
      version: "6.8",
      hint: "The setTemplate is not needed anymore, the correct entity is resolved from the URL automatically."
    });
    return {
      type: "NOTHING"
    };
  }
  var addTemplate = (template) => async ({ dispatch: dispatch2, registry }) => {
    (0, import_deprecated.default)("dispatch( 'core/edit-site' ).addTemplate", {
      since: "6.5",
      version: "6.8",
      hint: "use saveEntityRecord directly"
    });
    const newTemplate = await registry.dispatch(import_core_data.store).saveEntityRecord("postType", TEMPLATE_POST_TYPE, template);
    if (template.content) {
      registry.dispatch(import_core_data.store).editEntityRecord(
        "postType",
        TEMPLATE_POST_TYPE,
        newTemplate.id,
        { blocks: (0, import_blocks.parse)(template.content) },
        { undoIgnore: true }
      );
    }
    dispatch2({
      type: "SET_EDITED_POST",
      postType: TEMPLATE_POST_TYPE,
      id: newTemplate.id
    });
  };
  var removeTemplate = (template) => ({ registry }) => {
    return unlock(registry.dispatch(import_editor.store)).removeTemplates([
      template
    ]);
  };
  function setTemplatePart(templatePartId) {
    (0, import_deprecated.default)("dispatch( 'core/edit-site' ).setTemplatePart", {
      since: "6.8"
    });
    return {
      type: "SET_EDITED_POST",
      postType: TEMPLATE_PART_POST_TYPE,
      id: templatePartId
    };
  }
  function setNavigationMenu(navigationMenuId) {
    (0, import_deprecated.default)("dispatch( 'core/edit-site' ).setNavigationMenu", {
      since: "6.8"
    });
    return {
      type: "SET_EDITED_POST",
      postType: NAVIGATION_POST_TYPE,
      id: navigationMenuId
    };
  }
  function setEditedEntity(postType2, postId, context) {
    return {
      type: "SET_EDITED_POST",
      postType: postType2,
      id: postId,
      context
    };
  }
  function setHomeTemplateId() {
    (0, import_deprecated.default)("dispatch( 'core/edit-site' ).setHomeTemplateId", {
      since: "6.2",
      version: "6.4"
    });
    return {
      type: "NOTHING"
    };
  }
  function setEditedPostContext(context) {
    (0, import_deprecated.default)("dispatch( 'core/edit-site' ).setEditedPostContext", {
      since: "6.8"
    });
    return {
      type: "SET_EDITED_POST_CONTEXT",
      context
    };
  }
  function setPage() {
    (0, import_deprecated.default)("dispatch( 'core/edit-site' ).setPage", {
      since: "6.5",
      version: "6.8",
      hint: "The setPage is not needed anymore, the correct entity is resolved from the URL automatically."
    });
    return { type: "NOTHING" };
  }
  function setNavigationPanelActiveMenu() {
    (0, import_deprecated.default)("dispatch( 'core/edit-site' ).setNavigationPanelActiveMenu", {
      since: "6.2",
      version: "6.4"
    });
    return { type: "NOTHING" };
  }
  function openNavigationPanelToMenu() {
    (0, import_deprecated.default)("dispatch( 'core/edit-site' ).openNavigationPanelToMenu", {
      since: "6.2",
      version: "6.4"
    });
    return { type: "NOTHING" };
  }
  function setIsNavigationPanelOpened() {
    (0, import_deprecated.default)("dispatch( 'core/edit-site' ).setIsNavigationPanelOpened", {
      since: "6.2",
      version: "6.4"
    });
    return { type: "NOTHING" };
  }
  var setIsInserterOpened = (value) => ({ registry }) => {
    (0, import_deprecated.default)("dispatch( 'core/edit-site' ).setIsInserterOpened", {
      since: "6.5",
      alternative: "dispatch( 'core/editor').setIsInserterOpened"
    });
    registry.dispatch(import_editor.store).setIsInserterOpened(value);
  };
  var setIsListViewOpened = (isOpen) => ({ registry }) => {
    (0, import_deprecated.default)("dispatch( 'core/edit-site' ).setIsListViewOpened", {
      since: "6.5",
      alternative: "dispatch( 'core/editor').setIsListViewOpened"
    });
    registry.dispatch(import_editor.store).setIsListViewOpened(isOpen);
  };
  function updateSettings(settings2) {
    return {
      type: "UPDATE_SETTINGS",
      settings: settings2
    };
  }
  function setIsSaveViewOpened(isOpen) {
    return {
      type: "SET_IS_SAVE_VIEW_OPENED",
      isOpen
    };
  }
  var revertTemplate = (template, options) => ({ registry }) => {
    return unlock(registry.dispatch(import_editor.store)).revertTemplate(
      template,
      options
    );
  };
  var openGeneralSidebar = (name2) => ({ registry }) => {
    registry.dispatch(interfaceStore).enableComplementaryArea("core", name2);
  };
  var closeGeneralSidebar = () => ({ registry }) => {
    registry.dispatch(interfaceStore).disableComplementaryArea("core");
  };
  var switchEditorMode = (mode) => ({ registry }) => {
    (0, import_deprecated.default)("dispatch( 'core/edit-site' ).switchEditorMode", {
      since: "6.6",
      alternative: "dispatch( 'core/editor').switchEditorMode"
    });
    registry.dispatch(import_editor.store).switchEditorMode(mode);
  };
  var setHasPageContentFocus = (hasPageContentFocus2) => ({ dispatch: dispatch2, registry }) => {
    (0, import_deprecated.default)(`dispatch( 'core/edit-site' ).setHasPageContentFocus`, {
      since: "6.5"
    });
    if (hasPageContentFocus2) {
      registry.dispatch(import_block_editor.store).clearSelectedBlock();
    }
    dispatch2({
      type: "SET_HAS_PAGE_CONTENT_FOCUS",
      hasPageContentFocus: hasPageContentFocus2
    });
  };
  var toggleDistractionFree = () => ({ registry }) => {
    (0, import_deprecated.default)("dispatch( 'core/edit-site' ).toggleDistractionFree", {
      since: "6.6",
      alternative: "dispatch( 'core/editor').toggleDistractionFree"
    });
    registry.dispatch(import_editor.store).toggleDistractionFree();
  };

  // packages/edit-site/build-module/store/private-actions.mjs
  var private_actions_exports = {};
  __export(private_actions_exports, {
    registerRoute: () => registerRoute,
    unregisterRoute: () => unregisterRoute
  });
  function registerRoute(route) {
    return {
      type: "REGISTER_ROUTE",
      route
    };
  }
  function unregisterRoute(name2) {
    return {
      type: "UNREGISTER_ROUTE",
      name: name2
    };
  }

  // packages/edit-site/build-module/store/selectors.mjs
  var selectors_exports = {};
  __export(selectors_exports, {
    __experimentalGetInsertionPoint: () => __experimentalGetInsertionPoint,
    __experimentalGetPreviewDeviceType: () => __experimentalGetPreviewDeviceType,
    getCanUserCreateMedia: () => getCanUserCreateMedia,
    getCurrentTemplateNavigationPanelSubMenu: () => getCurrentTemplateNavigationPanelSubMenu,
    getCurrentTemplateTemplateParts: () => getCurrentTemplateTemplateParts,
    getEditedPostContext: () => getEditedPostContext,
    getEditedPostId: () => getEditedPostId,
    getEditedPostType: () => getEditedPostType,
    getEditorMode: () => getEditorMode,
    getHomeTemplateId: () => getHomeTemplateId,
    getNavigationPanelActiveMenu: () => getNavigationPanelActiveMenu,
    getPage: () => getPage,
    getReusableBlocks: () => getReusableBlocks,
    getSettings: () => getSettings,
    hasPageContentFocus: () => hasPageContentFocus,
    isFeatureActive: () => isFeatureActive,
    isInserterOpened: () => isInserterOpened,
    isListViewOpened: () => isListViewOpened,
    isNavigationOpened: () => isNavigationOpened,
    isPage: () => isPage,
    isSaveViewOpened: () => isSaveViewOpened
  });
  var import_core_data2 = __toESM(require_core_data(), 1);
  var import_data2 = __toESM(require_data(), 1);
  var import_deprecated2 = __toESM(require_deprecated(), 1);
  var import_element = __toESM(require_element(), 1);
  var import_preferences2 = __toESM(require_preferences(), 1);
  var import_editor2 = __toESM(require_editor(), 1);
  var import_block_editor2 = __toESM(require_block_editor(), 1);

  // packages/edit-site/build-module/utils/get-filtered-template-parts.mjs
  var import_blocks2 = __toESM(require_blocks(), 1);
  var EMPTY_ARRAY = [];
  function getFilteredTemplatePartBlocks(blocks = EMPTY_ARRAY, templateParts) {
    const templatePartsById = templateParts ? (
      // Key template parts by their ID.
      templateParts.reduce(
        (newTemplateParts, part) => ({
          ...newTemplateParts,
          [part.id]: part
        }),
        {}
      )
    ) : {};
    const result = [];
    const stack = [...blocks];
    while (stack.length) {
      const { innerBlocks, ...block } = stack.shift();
      stack.unshift(...innerBlocks);
      if ((0, import_blocks2.isTemplatePart)(block)) {
        const {
          attributes: { theme, slug }
        } = block;
        const templatePartId = `${theme}//${slug}`;
        const templatePart = templatePartsById[templatePartId];
        if (templatePart) {
          result.push({
            templatePart,
            block
          });
        }
      }
    }
    return result;
  }

  // packages/edit-site/build-module/store/selectors.mjs
  var isFeatureActive = (0, import_data2.createRegistrySelector)(
    (select3) => (_, featureName) => {
      (0, import_deprecated2.default)(`select( 'core/edit-site' ).isFeatureActive`, {
        since: "6.0",
        alternative: `select( 'core/preferences' ).get`
      });
      return !!select3(import_preferences2.store).get(
        "core/edit-site",
        featureName
      );
    }
  );
  var __experimentalGetPreviewDeviceType = (0, import_data2.createRegistrySelector)(
    (select3) => () => {
      (0, import_deprecated2.default)(
        `select( 'core/edit-site' ).__experimentalGetPreviewDeviceType`,
        {
          since: "6.5",
          version: "6.7",
          alternative: `select( 'core/editor' ).getDeviceType`
        }
      );
      return select3(import_editor2.store).getDeviceType();
    }
  );
  var getCanUserCreateMedia = (0, import_data2.createRegistrySelector)(
    (select3) => () => {
      (0, import_deprecated2.default)(
        `wp.data.select( 'core/edit-site' ).getCanUserCreateMedia()`,
        {
          since: "6.7",
          alternative: `wp.data.select( 'core' ).canUser( 'create', { kind: 'postType', type: 'attachment' } )`
        }
      );
      return select3(import_core_data2.store).canUser("create", "media");
    }
  );
  var getReusableBlocks = (0, import_data2.createRegistrySelector)((select3) => () => {
    (0, import_deprecated2.default)(`select( 'core/edit-site' ).getReusableBlocks()`, {
      since: "6.5",
      version: "6.8",
      alternative: `select( 'core/core' ).getEntityRecords( 'postType', 'wp_block' )`
    });
    const isWeb = import_element.Platform.OS === "web";
    return isWeb ? select3(import_core_data2.store).getEntityRecords("postType", "wp_block", {
      per_page: -1
    }) : [];
  });
  function getSettings(state) {
    return state.settings;
  }
  function getHomeTemplateId() {
    (0, import_deprecated2.default)("select( 'core/edit-site' ).getHomeTemplateId", {
      since: "6.2",
      version: "6.4"
    });
  }
  function getEditedPostType(state) {
    (0, import_deprecated2.default)("select( 'core/edit-site' ).getEditedPostType", {
      since: "6.8",
      alternative: "select( 'core/editor' ).getCurrentPostType"
    });
    return state.editedPost.postType;
  }
  function getEditedPostId(state) {
    (0, import_deprecated2.default)("select( 'core/edit-site' ).getEditedPostId", {
      since: "6.8",
      alternative: "select( 'core/editor' ).getCurrentPostId"
    });
    return state.editedPost.id;
  }
  function getEditedPostContext(state) {
    (0, import_deprecated2.default)("select( 'core/edit-site' ).getEditedPostContext", {
      since: "6.8"
    });
    return state.editedPost.context;
  }
  function getPage(state) {
    (0, import_deprecated2.default)("select( 'core/edit-site' ).getPage", {
      since: "6.8"
    });
    return { context: state.editedPost.context };
  }
  var isInserterOpened = (0, import_data2.createRegistrySelector)((select3) => () => {
    (0, import_deprecated2.default)(`select( 'core/edit-site' ).isInserterOpened`, {
      since: "6.5",
      alternative: `select( 'core/editor' ).isInserterOpened`
    });
    return select3(import_editor2.store).isInserterOpened();
  });
  var __experimentalGetInsertionPoint = (0, import_data2.createRegistrySelector)(
    (select3) => () => {
      (0, import_deprecated2.default)(
        `select( 'core/edit-site' ).__experimentalGetInsertionPoint`,
        {
          since: "6.5",
          version: "6.7"
        }
      );
      return unlock(select3(import_editor2.store)).getInserter();
    }
  );
  var isListViewOpened = (0, import_data2.createRegistrySelector)((select3) => () => {
    (0, import_deprecated2.default)(`select( 'core/edit-site' ).isListViewOpened`, {
      since: "6.5",
      alternative: `select( 'core/editor' ).isListViewOpened`
    });
    return select3(import_editor2.store).isListViewOpened();
  });
  function isSaveViewOpened(state) {
    return state.saveViewPanel;
  }
  function getBlocksAndTemplateParts(select3) {
    const templateParts = select3(import_core_data2.store).getEntityRecords(
      "postType",
      TEMPLATE_PART_POST_TYPE,
      { per_page: -1 }
    );
    const { getBlocksByName, getBlocksByClientId } = select3(import_block_editor2.store);
    const clientIds = getBlocksByName("core/template-part");
    const blocks = getBlocksByClientId(clientIds);
    return [blocks, templateParts];
  }
  var getCurrentTemplateTemplateParts = (0, import_data2.createRegistrySelector)(
    (select3) => (0, import_data2.createSelector)(
      () => {
        (0, import_deprecated2.default)(
          `select( 'core/edit-site' ).getCurrentTemplateTemplateParts()`,
          {
            since: "6.7",
            version: "6.9",
            alternative: `select( 'core/block-editor' ).getBlocksByName( 'core/template-part' )`
          }
        );
        return getFilteredTemplatePartBlocks(
          ...getBlocksAndTemplateParts(select3)
        );
      },
      () => getBlocksAndTemplateParts(select3)
    )
  );
  var getEditorMode = (0, import_data2.createRegistrySelector)((select3) => () => {
    return select3(import_preferences2.store).get("core", "editorMode");
  });
  function getCurrentTemplateNavigationPanelSubMenu() {
    (0, import_deprecated2.default)(
      "dispatch( 'core/edit-site' ).getCurrentTemplateNavigationPanelSubMenu",
      {
        since: "6.2",
        version: "6.4"
      }
    );
  }
  function getNavigationPanelActiveMenu() {
    (0, import_deprecated2.default)("dispatch( 'core/edit-site' ).getNavigationPanelActiveMenu", {
      since: "6.2",
      version: "6.4"
    });
  }
  function isNavigationOpened() {
    (0, import_deprecated2.default)("dispatch( 'core/edit-site' ).isNavigationOpened", {
      since: "6.2",
      version: "6.4"
    });
  }
  function isPage(state) {
    (0, import_deprecated2.default)("select( 'core/edit-site' ).isPage", {
      since: "6.8",
      alternative: "select( 'core/editor' ).getCurrentPostType"
    });
    return !!state.editedPost.context?.postId;
  }
  function hasPageContentFocus() {
    (0, import_deprecated2.default)(`select( 'core/edit-site' ).hasPageContentFocus`, {
      since: "6.5"
    });
    return false;
  }

  // packages/edit-site/build-module/store/private-selectors.mjs
  var private_selectors_exports = {};
  __export(private_selectors_exports, {
    getRoutes: () => getRoutes
  });
  function getRoutes(state) {
    return state.routes;
  }

  // packages/edit-site/build-module/store/constants.mjs
  var STORE_NAME = "core/edit-site";

  // packages/edit-site/build-module/store/index.mjs
  var storeConfig = {
    reducer: reducer_default,
    actions: actions_exports,
    selectors: selectors_exports
  };
  var store = (0, import_data3.createReduxStore)(STORE_NAME, storeConfig);
  (0, import_data3.register)(store);
  unlock(store).registerPrivateSelectors(private_selectors_exports);
  unlock(store).registerPrivateActions(private_actions_exports);

  // packages/edit-site/build-module/components/app/index.mjs
  var import_data83 = __toESM(require_data(), 1);
  var import_router42 = __toESM(require_router(), 1);
  var import_element161 = __toESM(require_element(), 1);
  var import_core_data65 = __toESM(require_core_data(), 1);

  // node_modules/clsx/dist/clsx.mjs
  function r(e2) {
    var t3, f2, n2 = "";
    if ("string" == typeof e2 || "number" == typeof e2) n2 += e2;
    else if ("object" == typeof e2) if (Array.isArray(e2)) {
      var o3 = e2.length;
      for (t3 = 0; t3 < o3; t3++) e2[t3] && (f2 = r(e2[t3])) && (n2 && (n2 += " "), n2 += f2);
    } else for (f2 in e2) e2[f2] && (n2 && (n2 += " "), n2 += f2);
    return n2;
  }
  function clsx() {
    for (var e2, t3, f2 = 0, n2 = "", o3 = arguments.length; f2 < o3; f2++) (e2 = arguments[f2]) && (t3 = r(e2)) && (n2 && (n2 += " "), n2 += t3);
    return n2;
  }
  var clsx_default = clsx;

  // packages/admin-ui/build-module/navigable-region/index.mjs
  var import_element2 = __toESM(require_element(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  var NavigableRegion = (0, import_element2.forwardRef)(
    ({ children, className, ariaLabel, as: Tag = "div", ...props }, ref) => {
      return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
        Tag,
        {
          ref,
          className: clsx_default("admin-ui-navigable-region", className),
          "aria-label": ariaLabel,
          role: "region",
          tabIndex: "-1",
          ...props,
          children
        }
      );
    }
  );
  NavigableRegion.displayName = "NavigableRegion";
  var navigable_region_default = NavigableRegion;

  // node_modules/@base-ui/utils/esm/useRefWithInit.js
  var React = __toESM(require_react(), 1);
  var UNINITIALIZED = {};
  function useRefWithInit(init2, initArg) {
    const ref = React.useRef(UNINITIALIZED);
    if (ref.current === UNINITIALIZED) {
      ref.current = init2(initArg);
    }
    return ref;
  }

  // node_modules/@base-ui/react/esm/utils/useRenderElement.js
  var React4 = __toESM(require_react(), 1);

  // node_modules/@base-ui/utils/esm/useMergedRefs.js
  function useMergedRefs(a2, b2, c6, d2) {
    const forkRef = useRefWithInit(createForkRef).current;
    if (didChange(forkRef, a2, b2, c6, d2)) {
      update(forkRef, [a2, b2, c6, d2]);
    }
    return forkRef.callback;
  }
  function useMergedRefsN(refs) {
    const forkRef = useRefWithInit(createForkRef).current;
    if (didChangeN(forkRef, refs)) {
      update(forkRef, refs);
    }
    return forkRef.callback;
  }
  function createForkRef() {
    return {
      callback: null,
      cleanup: null,
      refs: []
    };
  }
  function didChange(forkRef, a2, b2, c6, d2) {
    return forkRef.refs[0] !== a2 || forkRef.refs[1] !== b2 || forkRef.refs[2] !== c6 || forkRef.refs[3] !== d2;
  }
  function didChangeN(forkRef, newRefs) {
    return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);
  }
  function update(forkRef, refs) {
    forkRef.refs = refs;
    if (refs.every((ref) => ref == null)) {
      forkRef.callback = null;
      return;
    }
    forkRef.callback = (instance) => {
      if (forkRef.cleanup) {
        forkRef.cleanup();
        forkRef.cleanup = null;
      }
      if (instance != null) {
        const cleanupCallbacks = Array(refs.length).fill(null);
        for (let i2 = 0; i2 < refs.length; i2 += 1) {
          const ref = refs[i2];
          if (ref == null) {
            continue;
          }
          switch (typeof ref) {
            case "function": {
              const refCleanup = ref(instance);
              if (typeof refCleanup === "function") {
                cleanupCallbacks[i2] = refCleanup;
              }
              break;
            }
            case "object": {
              ref.current = instance;
              break;
            }
            default:
          }
        }
        forkRef.cleanup = () => {
          for (let i2 = 0; i2 < refs.length; i2 += 1) {
            const ref = refs[i2];
            if (ref == null) {
              continue;
            }
            switch (typeof ref) {
              case "function": {
                const cleanupCallback = cleanupCallbacks[i2];
                if (typeof cleanupCallback === "function") {
                  cleanupCallback();
                } else {
                  ref(null);
                }
                break;
              }
              case "object": {
                ref.current = null;
                break;
              }
              default:
            }
          }
        };
      }
    };
  }

  // node_modules/@base-ui/utils/esm/getReactElementRef.js
  var React3 = __toESM(require_react(), 1);

  // node_modules/@base-ui/utils/esm/reactVersion.js
  var React2 = __toESM(require_react(), 1);
  var majorVersion = parseInt(React2.version, 10);
  function isReactVersionAtLeast(reactVersionToCheck) {
    return majorVersion >= reactVersionToCheck;
  }

  // node_modules/@base-ui/utils/esm/getReactElementRef.js
  function getReactElementRef(element) {
    if (!/* @__PURE__ */ React3.isValidElement(element)) {
      return null;
    }
    const reactElement = element;
    const propsWithRef = reactElement.props;
    return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
  }

  // node_modules/@base-ui/utils/esm/mergeObjects.js
  function mergeObjects(a2, b2) {
    if (a2 && !b2) {
      return a2;
    }
    if (!a2 && b2) {
      return b2;
    }
    if (a2 || b2) {
      return {
        ...a2,
        ...b2
      };
    }
    return void 0;
  }

  // node_modules/@base-ui/react/esm/utils/getStateAttributesProps.js
  function getStateAttributesProps(state, customMapping) {
    const props = {};
    for (const key in state) {
      const value = state[key];
      if (customMapping?.hasOwnProperty(key)) {
        const customProps = customMapping[key](value);
        if (customProps != null) {
          Object.assign(props, customProps);
        }
        continue;
      }
      if (value === true) {
        props[`data-${key.toLowerCase()}`] = "";
      } else if (value) {
        props[`data-${key.toLowerCase()}`] = value.toString();
      }
    }
    return props;
  }

  // node_modules/@base-ui/react/esm/utils/resolveClassName.js
  function resolveClassName(className, state) {
    return typeof className === "function" ? className(state) : className;
  }

  // node_modules/@base-ui/react/esm/utils/resolveStyle.js
  function resolveStyle(style, state) {
    return typeof style === "function" ? style(state) : style;
  }

  // node_modules/@base-ui/react/esm/merge-props/mergeProps.js
  var EMPTY_PROPS = {};
  function mergeProps(a2, b2, c6, d2, e2) {
    let merged = {
      ...resolvePropsGetter(a2, EMPTY_PROPS)
    };
    if (b2) {
      merged = mergeOne(merged, b2);
    }
    if (c6) {
      merged = mergeOne(merged, c6);
    }
    if (d2) {
      merged = mergeOne(merged, d2);
    }
    if (e2) {
      merged = mergeOne(merged, e2);
    }
    return merged;
  }
  function mergePropsN(props) {
    if (props.length === 0) {
      return EMPTY_PROPS;
    }
    if (props.length === 1) {
      return resolvePropsGetter(props[0], EMPTY_PROPS);
    }
    let merged = {
      ...resolvePropsGetter(props[0], EMPTY_PROPS)
    };
    for (let i2 = 1; i2 < props.length; i2 += 1) {
      merged = mergeOne(merged, props[i2]);
    }
    return merged;
  }
  function mergeOne(merged, inputProps) {
    if (isPropsGetter(inputProps)) {
      return inputProps(merged);
    }
    return mutablyMergeInto(merged, inputProps);
  }
  function mutablyMergeInto(mergedProps, externalProps) {
    if (!externalProps) {
      return mergedProps;
    }
    for (const propName in externalProps) {
      const externalPropValue = externalProps[propName];
      switch (propName) {
        case "style": {
          mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
          break;
        }
        case "className": {
          mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
          break;
        }
        default: {
          if (isEventHandler(propName, externalPropValue)) {
            mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
          } else {
            mergedProps[propName] = externalPropValue;
          }
        }
      }
    }
    return mergedProps;
  }
  function isEventHandler(key, value) {
    const code0 = key.charCodeAt(0);
    const code1 = key.charCodeAt(1);
    const code2 = key.charCodeAt(2);
    return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
  }
  function isPropsGetter(inputProps) {
    return typeof inputProps === "function";
  }
  function resolvePropsGetter(inputProps, previousProps) {
    if (isPropsGetter(inputProps)) {
      return inputProps(previousProps);
    }
    return inputProps ?? EMPTY_PROPS;
  }
  function mergeEventHandlers(ourHandler, theirHandler) {
    if (!theirHandler) {
      return ourHandler;
    }
    if (!ourHandler) {
      return theirHandler;
    }
    return (event) => {
      if (isSyntheticEvent(event)) {
        const baseUIEvent = event;
        makeEventPreventable(baseUIEvent);
        const result2 = theirHandler(baseUIEvent);
        if (!baseUIEvent.baseUIHandlerPrevented) {
          ourHandler?.(baseUIEvent);
        }
        return result2;
      }
      const result = theirHandler(event);
      ourHandler?.(event);
      return result;
    };
  }
  function makeEventPreventable(event) {
    event.preventBaseUIHandler = () => {
      event.baseUIHandlerPrevented = true;
    };
    return event;
  }
  function mergeClassNames(ourClassName, theirClassName) {
    if (theirClassName) {
      if (ourClassName) {
        return theirClassName + " " + ourClassName;
      }
      return theirClassName;
    }
    return ourClassName;
  }
  function isSyntheticEvent(event) {
    return event != null && typeof event === "object" && "nativeEvent" in event;
  }

  // node_modules/@base-ui/utils/esm/empty.js
  var EMPTY_ARRAY2 = Object.freeze([]);
  var EMPTY_OBJECT = Object.freeze({});

  // node_modules/@base-ui/react/esm/utils/useRenderElement.js
  var import_react = __toESM(require_react(), 1);
  function useRenderElement(element, componentProps, params = {}) {
    const renderProp = componentProps.render;
    const outProps = useRenderElementProps(componentProps, params);
    if (params.enabled === false) {
      return null;
    }
    const state = params.state ?? EMPTY_OBJECT;
    return evaluateRenderProp(element, renderProp, outProps, state);
  }
  function useRenderElementProps(componentProps, params = {}) {
    const {
      className: classNameProp,
      style: styleProp,
      render: renderProp
    } = componentProps;
    const {
      state = EMPTY_OBJECT,
      ref,
      props,
      stateAttributesMapping,
      enabled = true
    } = params;
    const className = enabled ? resolveClassName(classNameProp, state) : void 0;
    const style = enabled ? resolveStyle(styleProp, state) : void 0;
    const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT;
    const outProps = enabled ? mergeObjects(stateProps, Array.isArray(props) ? mergePropsN(props) : props) ?? EMPTY_OBJECT : EMPTY_OBJECT;
    if (typeof document !== "undefined") {
      if (!enabled) {
        useMergedRefs(null, null);
      } else if (Array.isArray(ref)) {
        outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
      } else {
        outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
      }
    }
    if (!enabled) {
      return EMPTY_OBJECT;
    }
    if (className !== void 0) {
      outProps.className = mergeClassNames(outProps.className, className);
    }
    if (style !== void 0) {
      outProps.style = mergeObjects(outProps.style, style);
    }
    return outProps;
  }
  function evaluateRenderProp(element, render4, props, state) {
    if (render4) {
      if (typeof render4 === "function") {
        return render4(props, state);
      }
      const mergedProps = mergeProps(props, render4.props);
      mergedProps.ref = props.ref;
      return /* @__PURE__ */ React4.cloneElement(render4, mergedProps);
    }
    if (element) {
      if (typeof element === "string") {
        return renderTag(element, props);
      }
    }
    throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage(8));
  }
  function renderTag(Tag, props) {
    if (Tag === "button") {
      return /* @__PURE__ */ (0, import_react.createElement)("button", {
        type: "button",
        ...props,
        key: props.key
      });
    }
    if (Tag === "img") {
      return /* @__PURE__ */ (0, import_react.createElement)("img", {
        alt: "",
        ...props,
        key: props.key
      });
    }
    return /* @__PURE__ */ React4.createElement(Tag, props);
  }

  // node_modules/@base-ui/react/esm/use-render/useRender.js
  function useRender(params) {
    return useRenderElement(params.defaultTagName ?? "div", params, params);
  }

  // packages/ui/build-module/badge/badge.mjs
  var import_element3 = __toESM(require_element(), 1);
  if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='244b5c59c0']")) {
    const style = document.createElement("style");
    style.setAttribute("data-wp-hash", "244b5c59c0");
    style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-sm,12px);font-weight:var(--wpds-font-weight-regular,400);line-height:var(--wpds-font-line-height-xs,16px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-bg-surface-error,#f6e6e3);color:var(--wpds-color-fg-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-bg-surface-warning,#fde6bd);color:var(--wpds-color-fg-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution,#fee994);color:var(--wpds-color-fg-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success,#c5f7cc);color:var(--wpds-color-fg-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-bg-surface-info,#deebfa);color:var(--wpds-color-fg-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);color:var(--wpds-color-fg-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-bg-surface-neutral,#f8f8f8);color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d)}}'));
    document.head.appendChild(style);
  }
  var style_default = { "badge": "_96e6251aad1a6136__badge", "is-high-intent": "_99f7158cb520f750__is-high-intent", "is-medium-intent": "c20ebef2365bc8b7__is-medium-intent", "is-low-intent": "_365e1626c6202e52__is-low-intent", "is-stable-intent": "_33f8198127ddf4ef__is-stable-intent", "is-informational-intent": "_04c1aca8fc449412__is-informational-intent", "is-draft-intent": "_90726e69d495ec19__is-draft-intent", "is-none-intent": "_898f4a544993bd39__is-none-intent" };
  var Badge = (0, import_element3.forwardRef)(function Badge2({ children, intent = "none", render: render4, className, ...props }, ref) {
    const element = useRender({
      render: render4,
      defaultTagName: "span",
      ref,
      props: mergeProps(props, {
        className: clsx_default(
          style_default.badge,
          style_default[`is-${intent}-intent`],
          className
        ),
        children
      })
    });
    return element;
  });

  // packages/icons/build-module/icon/index.mjs
  var import_element4 = __toESM(require_element(), 1);
  var icon_default = (0, import_element4.forwardRef)(
    ({ icon, size = 24, ...props }, ref) => {
      return (0, import_element4.cloneElement)(icon, {
        width: size,
        height: size,
        ...props,
        ref
      });
    }
  );

  // packages/icons/build-module/library/archive.mjs
  var import_primitives = __toESM(require_primitives(), 1);
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  var archive_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/arrow-down.mjs
  var import_primitives2 = __toESM(require_primitives(), 1);
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
  var arrow_down_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives2.Path, { d: "m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z" }) });

  // packages/icons/build-module/library/arrow-left.mjs
  var import_primitives3 = __toESM(require_primitives(), 1);
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
  var arrow_left_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives3.Path, { d: "M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z" }) });

  // packages/icons/build-module/library/arrow-right.mjs
  var import_primitives4 = __toESM(require_primitives(), 1);
  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
  var arrow_right_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives4.Path, { d: "m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z" }) });

  // packages/icons/build-module/library/arrow-up-left.mjs
  var import_primitives5 = __toESM(require_primitives(), 1);
  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
  var arrow_up_left_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives5.Path, { d: "M14 6H6v8h1.5V8.5L17 18l1-1-9.5-9.5H14V6Z" }) });

  // packages/icons/build-module/library/arrow-up.mjs
  var import_primitives6 = __toESM(require_primitives(), 1);
  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
  var arrow_up_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives6.Path, { d: "M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z" }) });

  // packages/icons/build-module/library/backup.mjs
  var import_primitives7 = __toESM(require_primitives(), 1);
  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
  var backup_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives7.Path, { 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" }) });

  // packages/icons/build-module/library/block-meta.mjs
  var import_primitives8 = __toESM(require_primitives(), 1);
  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
  var block_meta_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives8.Path, { fillRule: "evenodd", 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", clipRule: "evenodd" }) });

  // packages/icons/build-module/library/block-table.mjs
  var import_primitives9 = __toESM(require_primitives(), 1);
  var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
  var block_table_default = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives9.Path, { 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" }) });

  // packages/icons/build-module/library/calendar.mjs
  var import_primitives10 = __toESM(require_primitives(), 1);
  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
  var calendar_default = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives10.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives10.Path, { 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" }) });

  // packages/icons/build-module/library/category.mjs
  var import_primitives11 = __toESM(require_primitives(), 1);
  var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
  var category_default = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives11.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives11.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/check.mjs
  var import_primitives12 = __toESM(require_primitives(), 1);
  var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
  var check_default = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives12.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives12.Path, { d: "M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z" }) });

  // packages/icons/build-module/library/chevron-down.mjs
  var import_primitives13 = __toESM(require_primitives(), 1);
  var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
  var chevron_down_default = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives13.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives13.Path, { d: "M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z" }) });

  // packages/icons/build-module/library/chevron-left-small.mjs
  var import_primitives14 = __toESM(require_primitives(), 1);
  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
  var chevron_left_small_default = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives14.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives14.Path, { d: "m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z" }) });

  // packages/icons/build-module/library/chevron-left.mjs
  var import_primitives15 = __toESM(require_primitives(), 1);
  var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
  var chevron_left_default = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives15.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives15.Path, { d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z" }) });

  // packages/icons/build-module/library/chevron-right-small.mjs
  var import_primitives16 = __toESM(require_primitives(), 1);
  var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
  var chevron_right_small_default = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives16.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives16.Path, { d: "M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z" }) });

  // packages/icons/build-module/library/chevron-right.mjs
  var import_primitives17 = __toESM(require_primitives(), 1);
  var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
  var chevron_right_default = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_primitives17.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_primitives17.Path, { d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z" }) });

  // packages/icons/build-module/library/chevron-up.mjs
  var import_primitives18 = __toESM(require_primitives(), 1);
  var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
  var chevron_up_default = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_primitives18.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_primitives18.Path, { d: "M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z" }) });

  // packages/icons/build-module/library/close-small.mjs
  var import_primitives19 = __toESM(require_primitives(), 1);
  var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
  var close_small_default = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_primitives19.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_primitives19.Path, { 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" }) });

  // packages/icons/build-module/library/cog.mjs
  var import_primitives20 = __toESM(require_primitives(), 1);
  var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
  var cog_default = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_primitives20.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_primitives20.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/comment-author-avatar.mjs
  var import_primitives21 = __toESM(require_primitives(), 1);
  var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
  var comment_author_avatar_default = /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives21.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives21.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/download.mjs
  var import_primitives22 = __toESM(require_primitives(), 1);
  var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
  var download_default = /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_primitives22.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_primitives22.Path, { 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" }) });

  // packages/icons/build-module/library/drafts.mjs
  var import_primitives23 = __toESM(require_primitives(), 1);
  var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
  var drafts_default = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_primitives23.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_primitives23.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/drawer-right.mjs
  var import_primitives24 = __toESM(require_primitives(), 1);
  var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
  var drawer_right_default = /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_primitives24.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_primitives24.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z" }) });

  // packages/icons/build-module/library/envelope.mjs
  var import_primitives25 = __toESM(require_primitives(), 1);
  var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
  var envelope_default = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_primitives25.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_primitives25.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M3 7c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Zm2-.5h14c.3 0 .5.2.5.5v1L12 13.5 4.5 7.9V7c0-.3.2-.5.5-.5Zm-.5 3.3V17c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V9.8L12 15.4 4.5 9.8Z" }) });

  // packages/icons/build-module/library/error.mjs
  var import_primitives26 = __toESM(require_primitives(), 1);
  var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
  var error_default = /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_primitives26.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_primitives26.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z" }) });

  // packages/icons/build-module/library/file.mjs
  var import_primitives27 = __toESM(require_primitives(), 1);
  var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
  var file_default = /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_primitives27.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_primitives27.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/format-list-bullets-rtl.mjs
  var import_primitives28 = __toESM(require_primitives(), 1);
  var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
  var format_list_bullets_rtl_default = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_primitives28.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_primitives28.Path, { 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" }) });

  // packages/icons/build-module/library/format-list-bullets.mjs
  var import_primitives29 = __toESM(require_primitives(), 1);
  var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
  var format_list_bullets_default = /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_primitives29.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_primitives29.Path, { 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" }) });

  // packages/icons/build-module/library/funnel.mjs
  var import_primitives30 = __toESM(require_primitives(), 1);
  var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
  var funnel_default = /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_primitives30.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_primitives30.Path, { d: "M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z" }) });

  // packages/icons/build-module/library/globe.mjs
  var import_primitives31 = __toESM(require_primitives(), 1);
  var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
  var globe_default = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_primitives31.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_primitives31.Path, { d: "M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm6.5 8c0 .6 0 1.2-.2 1.8h-2.7c0-.6.2-1.1.2-1.8s0-1.2-.2-1.8h2.7c.2.6.2 1.1.2 1.8Zm-.9-3.2h-2.4c-.3-.9-.7-1.8-1.1-2.4-.1-.2-.2-.4-.3-.5 1.6.5 3 1.6 3.8 3ZM12.8 17c-.3.5-.6 1-.8 1.3-.2-.3-.5-.8-.8-1.3-.3-.5-.6-1.1-.8-1.7h3.3c-.2.6-.5 1.2-.8 1.7Zm-2.9-3.2c-.1-.6-.2-1.1-.2-1.8s0-1.2.2-1.8H14c.1.6.2 1.1.2 1.8s0 1.2-.2 1.8H9.9ZM11.2 7c.3-.5.6-1 .8-1.3.2.3.5.8.8 1.3.3.5.6 1.1.8 1.7h-3.3c.2-.6.5-1.2.8-1.7Zm-1-1.2c-.1.2-.2.3-.3.5-.4.7-.8 1.5-1.1 2.4H6.4c.8-1.4 2.2-2.5 3.8-3Zm-1.8 8H5.7c-.2-.6-.2-1.1-.2-1.8s0-1.2.2-1.8h2.7c0 .6-.2 1.1-.2 1.8s0 1.2.2 1.8Zm-2 1.4h2.4c.3.9.7 1.8 1.1 2.4.1.2.2.4.3.5-1.6-.5-3-1.6-3.8-3Zm7.4 3c.1-.2.2-.3.3-.5.4-.7.8-1.5 1.1-2.4h2.4c-.8 1.4-2.2 2.5-3.8 3Z" }) });

  // packages/icons/build-module/library/help.mjs
  var import_primitives32 = __toESM(require_primitives(), 1);
  var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
  var help_default = /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_primitives32.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_primitives32.Path, { d: "M12 4a8 8 0 1 1 .001 16.001A8 8 0 0 1 12 4Zm0 1.5a6.5 6.5 0 1 0-.001 13.001A6.5 6.5 0 0 0 12 5.5Zm.75 11h-1.5V15h1.5v1.5Zm-.445-9.234a3 3 0 0 1 .445 5.89V14h-1.5v-1.25c0-.57.452-.958.917-1.01A1.5 1.5 0 0 0 12 8.75a1.5 1.5 0 0 0-1.5 1.5H9a3 3 0 0 1 3.305-2.984Z" }) });

  // packages/icons/build-module/library/home.mjs
  var import_primitives33 = __toESM(require_primitives(), 1);
  var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
  var home_default = /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_primitives33.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_primitives33.Path, { d: "M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z" }) });

  // packages/icons/build-module/library/layout.mjs
  var import_primitives34 = __toESM(require_primitives(), 1);
  var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
  var layout_default = /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_primitives34.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_primitives34.Path, { 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" }) });

  // packages/icons/build-module/library/link.mjs
  var import_primitives35 = __toESM(require_primitives(), 1);
  var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
  var link_default = /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_primitives35.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_primitives35.Path, { d: "M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z" }) });

  // packages/icons/build-module/library/list.mjs
  var import_primitives36 = __toESM(require_primitives(), 1);
  var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
  var list_default = /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_primitives36.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_primitives36.Path, { 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" }) });

  // packages/icons/build-module/library/media.mjs
  var import_primitives37 = __toESM(require_primitives(), 1);
  var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
  var media_default = /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_primitives37.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_primitives37.Path, { d: "m7 6.5 4 2.5-4 2.5z" }),
    /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_primitives37.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" })
  ] });

  // packages/icons/build-module/library/mobile.mjs
  var import_primitives38 = __toESM(require_primitives(), 1);
  var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
  var mobile_default = /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_primitives38.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_primitives38.Path, { d: "M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z" }) });

  // packages/icons/build-module/library/more-vertical.mjs
  var import_primitives39 = __toESM(require_primitives(), 1);
  var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
  var more_vertical_default = /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_primitives39.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_primitives39.Path, { d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" }) });

  // packages/icons/build-module/library/navigation.mjs
  var import_primitives40 = __toESM(require_primitives(), 1);
  var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
  var navigation_default = /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_primitives40.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_primitives40.Path, { 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" }) });

  // packages/icons/build-module/library/next.mjs
  var import_primitives41 = __toESM(require_primitives(), 1);
  var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
  var next_default = /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_primitives41.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_primitives41.Path, { 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" }) });

  // packages/icons/build-module/library/not-allowed.mjs
  var import_primitives42 = __toESM(require_primitives(), 1);
  var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
  var not_allowed_default = /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_primitives42.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_primitives42.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/not-found.mjs
  var import_primitives43 = __toESM(require_primitives(), 1);
  var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
  var not_found_default = /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_primitives43.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_primitives43.Path, { d: "M19 5c1.1 0 2 .9 2 2v10c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2zM5 6.5c-.3 0-.5.2-.5.5v10c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V7c0-.3-.2-.5-.5-.5zm7.01 2.75q.711 0 1.24.364.533.364.824 1.012.296.645.296 1.488 0 .887-.296 1.556-.292.664-.824 1.036-.528.368-1.24.368-.708 0-1.24-.368-.527-.372-.824-1.036-.296-.668-.296-1.556 0-.848.296-1.492.296-.648.824-1.008a2.14 2.14 0 0 1 1.24-.364m-3.484 3.6h.72v.832h-.72v1.28h-.984v-1.28H4.75l3.08-4.32h.696zm9.522 0h.72v.832h-.72v1.28h-.983v-1.28h-2.793l3.08-4.32h.696zm-6.038-2.696q-.568 0-.952.48-.384.475-.384 1.48 0 .716.176 1.168.176.45.476.66.304.212.684.212t.68-.208q.304-.207.48-.656.176-.451.176-1.176 0-.996-.384-1.476-.38-.484-.952-.484M6.33 12.85h1.212v-1.722zm9.523 0h1.211v-1.722z" }) });

  // packages/icons/build-module/library/page.mjs
  var import_primitives44 = __toESM(require_primitives(), 1);
  var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
  var page_default = /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_primitives44.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_primitives44.Path, { d: "M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z" }),
    /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_primitives44.Path, { 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" })
  ] });

  // packages/icons/build-module/library/pages.mjs
  var import_primitives45 = __toESM(require_primitives(), 1);
  var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
  var pages_default = /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_primitives45.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_primitives45.Path, { d: "M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z" }),
    /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_primitives45.Path, { 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" }),
    /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_primitives45.Path, { d: "M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z" })
  ] });

  // packages/icons/build-module/library/pencil.mjs
  var import_primitives46 = __toESM(require_primitives(), 1);
  var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
  var pencil_default = /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_primitives46.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_primitives46.Path, { d: "m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z" }) });

  // packages/icons/build-module/library/pending.mjs
  var import_primitives47 = __toESM(require_primitives(), 1);
  var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
  var pending_default = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_primitives47.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_primitives47.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/pin.mjs
  var import_primitives48 = __toESM(require_primitives(), 1);
  var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
  var pin_default = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_primitives48.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_primitives48.Path, { 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" }) });

  // packages/icons/build-module/library/plugins.mjs
  var import_primitives49 = __toESM(require_primitives(), 1);
  var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
  var plugins_default = /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_primitives49.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_primitives49.Path, { 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" }) });

  // packages/icons/build-module/library/post.mjs
  var import_primitives50 = __toESM(require_primitives(), 1);
  var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
  var post_default = /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_primitives50.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_primitives50.Path, { 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" }) });

  // packages/icons/build-module/library/previous.mjs
  var import_primitives51 = __toESM(require_primitives(), 1);
  var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
  var previous_default = /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_primitives51.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_primitives51.Path, { 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" }) });

  // packages/icons/build-module/library/published.mjs
  var import_primitives52 = __toESM(require_primitives(), 1);
  var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
  var published_default = /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_primitives52.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_primitives52.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/rotate-left.mjs
  var import_primitives53 = __toESM(require_primitives(), 1);
  var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
  var rotate_left_default = /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_primitives53.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_primitives53.Path, { 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" }) });

  // packages/icons/build-module/library/rotate-right.mjs
  var import_primitives54 = __toESM(require_primitives(), 1);
  var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
  var rotate_right_default = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_primitives54.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_primitives54.Path, { 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" }) });

  // packages/icons/build-module/library/scheduled.mjs
  var import_primitives55 = __toESM(require_primitives(), 1);
  var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
  var scheduled_default = /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_primitives55.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_primitives55.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/search.mjs
  var import_primitives56 = __toESM(require_primitives(), 1);
  var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1);
  var search_default = /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_primitives56.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_primitives56.Path, { 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" }) });

  // packages/icons/build-module/library/seen.mjs
  var import_primitives57 = __toESM(require_primitives(), 1);
  var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1);
  var seen_default = /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_primitives57.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_primitives57.Path, { 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" }) });

  // packages/icons/build-module/library/styles.mjs
  var import_primitives58 = __toESM(require_primitives(), 1);
  var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1);
  var styles_default = /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_primitives58.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_primitives58.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z" }) });

  // packages/icons/build-module/library/symbol-filled.mjs
  var import_primitives59 = __toESM(require_primitives(), 1);
  var import_jsx_runtime60 = __toESM(require_jsx_runtime(), 1);
  var symbol_filled_default = /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_primitives59.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_primitives59.Path, { 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" }) });

  // packages/icons/build-module/library/symbol.mjs
  var import_primitives60 = __toESM(require_primitives(), 1);
  var import_jsx_runtime61 = __toESM(require_jsx_runtime(), 1);
  var symbol_default = /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_primitives60.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_primitives60.Path, { 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" }) });

  // packages/icons/build-module/library/tag.mjs
  var import_primitives61 = __toESM(require_primitives(), 1);
  var import_jsx_runtime62 = __toESM(require_jsx_runtime(), 1);
  var tag_default = /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_primitives61.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_primitives61.Path, { 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" }) });

  // packages/icons/build-module/library/trash.mjs
  var import_primitives62 = __toESM(require_primitives(), 1);
  var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1);
  var trash_default = /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_primitives62.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_primitives62.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/unseen.mjs
  var import_primitives63 = __toESM(require_primitives(), 1);
  var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
  var unseen_default = /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_primitives63.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_primitives63.Path, { d: "M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z" }) });

  // packages/icons/build-module/library/upload.mjs
  var import_primitives64 = __toESM(require_primitives(), 1);
  var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1);
  var upload_default = /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_primitives64.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_primitives64.Path, { 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" }) });

  // packages/icons/build-module/library/verse.mjs
  var import_primitives65 = __toESM(require_primitives(), 1);
  var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1);
  var verse_default = /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_primitives65.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_primitives65.Path, { 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" }) });

  // packages/icons/build-module/library/wordpress.mjs
  var import_primitives66 = __toESM(require_primitives(), 1);
  var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
  var wordpress_default = /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_primitives66.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_primitives66.Path, { 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" }) });

  // packages/ui/build-module/stack/stack.mjs
  var import_element5 = __toESM(require_element(), 1);
  if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='71d20935c2']")) {
    const style = document.createElement("style");
    style.setAttribute("data-wp-hash", "71d20935c2");
    style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}"));
    document.head.appendChild(style);
  }
  var style_default2 = { "stack": "_19ce0419607e1896__stack" };
  var gapTokens = {
    xs: "var(--wpds-dimension-gap-xs, 4px)",
    sm: "var(--wpds-dimension-gap-sm, 8px)",
    md: "var(--wpds-dimension-gap-md, 12px)",
    lg: "var(--wpds-dimension-gap-lg, 16px)",
    xl: "var(--wpds-dimension-gap-xl, 24px)",
    "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
    "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
  };
  var Stack = (0, import_element5.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render: render4, ...props }, ref) {
    const style = {
      gap: gap && gapTokens[gap],
      alignItems: align,
      justifyContent: justify,
      flexDirection: direction,
      flexWrap: wrap
    };
    const element = useRender({
      render: render4,
      ref,
      props: mergeProps(props, { style, className: style_default2.stack })
    });
    return element;
  });

  // packages/admin-ui/build-module/page/sidebar-toggle-slot.mjs
  var import_components = __toESM(require_components(), 1);
  var { Fill: SidebarToggleFill, Slot: SidebarToggleSlot } = (0, import_components.createSlotFill)("SidebarToggle");

  // packages/admin-ui/build-module/page/header.mjs
  var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
  function Header({
    headingLevel = 1,
    breadcrumbs,
    badges,
    title,
    subTitle,
    actions,
    showSidebarToggle = true
  }) {
    const HeadingTag = `h${headingLevel}`;
    return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(Stack, { direction: "column", className: "admin-ui-page__header", children: [
      /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(Stack, { direction: "row", justify: "space-between", gap: "sm", children: [
        /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(Stack, { direction: "row", gap: "sm", align: "center", justify: "start", children: [
          showSidebarToggle && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
            SidebarToggleSlot,
            {
              bubblesVirtually: true,
              className: "admin-ui-page__sidebar-toggle-slot"
            }
          ),
          title && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(HeadingTag, { className: "admin-ui-page__header-title", children: title }),
          breadcrumbs,
          badges
        ] }),
        /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
          Stack,
          {
            direction: "row",
            gap: "sm",
            style: { width: "auto", flexShrink: 0 },
            className: "admin-ui-page__header-actions",
            align: "center",
            children: actions
          }
        )
      ] }),
      subTitle && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("p", { className: "admin-ui-page__header-subtitle", children: subTitle })
    ] });
  }

  // packages/admin-ui/build-module/page/index.mjs
  var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
  function Page({
    headingLevel,
    breadcrumbs,
    badges,
    title,
    subTitle,
    children,
    className,
    actions,
    hasPadding = false,
    showSidebarToggle = true
  }) {
    const classes = clsx_default("admin-ui-page", className);
    return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(navigable_region_default, { className: classes, ariaLabel: title, children: [
      (title || breadcrumbs || badges) && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
        Header,
        {
          headingLevel,
          breadcrumbs,
          badges,
          title,
          subTitle,
          actions,
          showSidebarToggle
        }
      ),
      hasPadding ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "admin-ui-page__content has-padding", children }) : children
    ] });
  }
  Page.SidebarToggleFill = SidebarToggleFill;
  var page_default2 = Page;

  // packages/edit-site/build-module/components/layout/index.mjs
  var import_components8 = __toESM(require_components(), 1);
  var import_compose2 = __toESM(require_compose(), 1);
  var import_i18n8 = __toESM(require_i18n(), 1);
  var import_element14 = __toESM(require_element(), 1);
  var import_editor6 = __toESM(require_editor(), 1);
  var import_router6 = __toESM(require_router(), 1);
  var import_plugins2 = __toESM(require_plugins(), 1);
  var import_notices = __toESM(require_notices(), 1);
  var import_data13 = __toESM(require_data(), 1);
  var import_preferences3 = __toESM(require_preferences(), 1);

  // packages/edit-site/build-module/components/site-hub/index.mjs
  var import_data5 = __toESM(require_data(), 1);
  var import_components3 = __toESM(require_components(), 1);
  var import_i18n3 = __toESM(require_i18n(), 1);
  var import_core_data4 = __toESM(require_core_data(), 1);
  var import_html_entities = __toESM(require_html_entities(), 1);
  var import_element7 = __toESM(require_element(), 1);
  var import_commands = __toESM(require_commands(), 1);
  var import_keycodes = __toESM(require_keycodes(), 1);
  var import_url = __toESM(require_url(), 1);
  var import_router = __toESM(require_router(), 1);

  // packages/edit-site/build-module/components/site-icon/index.mjs
  var import_data4 = __toESM(require_data(), 1);
  var import_components2 = __toESM(require_components(), 1);
  var import_i18n2 = __toESM(require_i18n(), 1);
  var import_core_data3 = __toESM(require_core_data(), 1);
  var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
  function SiteIcon({ className }) {
    const { isRequestingSite, siteIconUrl } = (0, import_data4.useSelect)((select3) => {
      const { getEntityRecord } = select3(import_core_data3.store);
      const siteData = getEntityRecord("root", "__unstableBase", void 0);
      return {
        isRequestingSite: !siteData,
        siteIconUrl: siteData?.site_icon_url
      };
    }, []);
    if (isRequestingSite && !siteIconUrl) {
      return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "edit-site-site-icon__image" });
    }
    const icon = siteIconUrl ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
      "img",
      {
        className: "edit-site-site-icon__image",
        alt: (0, import_i18n2.__)("Site Icon"),
        src: siteIconUrl
      }
    ) : /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
      import_components2.Icon,
      {
        className: "edit-site-site-icon__icon",
        icon: wordpress_default,
        size: 48
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: clsx_default(className, "edit-site-site-icon"), children: icon });
  }
  var site_icon_default = SiteIcon;

  // packages/edit-site/build-module/components/sidebar/index.mjs
  var import_element6 = __toESM(require_element(), 1);
  var import_dom = __toESM(require_dom(), 1);
  var import_jsx_runtime71 = __toESM(require_jsx_runtime(), 1);
  var SidebarNavigationContext = (0, import_element6.createContext)(() => {
  });
  SidebarNavigationContext.displayName = "SidebarNavigationContext";
  function focusSidebarElement(el, direction, focusSelector) {
    let elementToFocus;
    if (direction === "back" && focusSelector) {
      elementToFocus = el.querySelector(focusSelector);
    }
    if (direction !== null && !elementToFocus) {
      const [firstTabbable] = import_dom.focus.tabbable.find(el);
      elementToFocus = firstTabbable ?? el;
    }
    elementToFocus?.focus();
  }
  function createNavState() {
    let state = {
      direction: null,
      focusSelector: null
    };
    return {
      get() {
        return state;
      },
      navigate(direction, focusSelector = null) {
        state = {
          direction,
          focusSelector: direction === "forward" && focusSelector ? focusSelector : state.focusSelector
        };
      }
    };
  }
  function SidebarContentWrapper({ children, shouldAnimate }) {
    const navState = (0, import_element6.useContext)(SidebarNavigationContext);
    const wrapperRef = (0, import_element6.useRef)();
    const [navAnimation, setNavAnimation] = (0, import_element6.useState)(null);
    (0, import_element6.useLayoutEffect)(() => {
      const { direction, focusSelector } = navState.get();
      focusSidebarElement(wrapperRef.current, direction, focusSelector);
      setNavAnimation(direction);
    }, [navState]);
    const wrapperCls = clsx_default(
      "edit-site-sidebar__screen-wrapper",
      /*
       * Some panes do not have sub-panes and therefore
       * should not animate when clicked on.
       */
      shouldAnimate ? {
        "slide-from-left": navAnimation === "back",
        "slide-from-right": navAnimation === "forward"
      } : {}
    );
    return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { ref: wrapperRef, className: wrapperCls, children });
  }
  function SidebarNavigationProvider({ children }) {
    const [navState] = (0, import_element6.useState)(createNavState);
    return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(SidebarNavigationContext.Provider, { value: navState, children });
  }
  function SidebarContent({ routeKey, shouldAnimate, children }) {
    return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "edit-site-sidebar__content", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
      SidebarContentWrapper,
      {
        shouldAnimate,
        children
      },
      routeKey
    ) });
  }

  // packages/edit-site/build-module/components/site-hub/index.mjs
  var import_jsx_runtime72 = __toESM(require_jsx_runtime(), 1);
  var { useLocation, useHistory } = unlock(import_router.privateApis);
  var SiteHub = (0, import_element7.memo)(
    (0, import_element7.forwardRef)(({ isTransparent }, ref) => {
      const { dashboardLink, homeUrl, siteTitle } = (0, import_data5.useSelect)((select3) => {
        const { getSettings: getSettings7 } = unlock(select3(store));
        const { getEntityRecord } = select3(import_core_data4.store);
        const _site = getEntityRecord("root", "site");
        return {
          dashboardLink: getSettings7().__experimentalDashboardLink,
          homeUrl: getEntityRecord("root", "__unstableBase")?.home,
          siteTitle: !_site?.title && !!_site?.url ? (0, import_url.filterURLForDisplay)(_site?.url) : _site?.title
        };
      }, []);
      const { open: openCommandCenter } = (0, import_data5.useDispatch)(import_commands.store);
      return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "edit-site-site-hub", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_components3.__experimentalHStack, { justify: "flex-start", spacing: "0", children: [
        /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
          "div",
          {
            className: clsx_default(
              "edit-site-site-hub__view-mode-toggle-container",
              {
                "has-transparent-background": isTransparent
              }
            ),
            children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
              import_components3.Button,
              {
                __next40pxDefaultSize: true,
                ref,
                href: dashboardLink,
                label: (0, import_i18n3.__)("Go to the Dashboard"),
                className: "edit-site-layout__view-mode-toggle",
                style: {
                  transform: "scale(0.5333) translateX(-4px)",
                  // Offset to position the icon 12px from viewport edge
                  borderRadius: 4
                },
                children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(site_icon_default, { className: "edit-site-layout__view-mode-toggle-icon" })
              }
            )
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_components3.__experimentalHStack, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "edit-site-site-hub__title", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
            import_components3.Button,
            {
              __next40pxDefaultSize: true,
              variant: "link",
              href: homeUrl,
              target: "_blank",
              children: [
                (0, import_html_entities.decodeEntities)(siteTitle),
                /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_components3.VisuallyHidden, {
                  as: "span",
                  /* translators: accessibility text */
                  children: (0, import_i18n3.__)("(opens in a new tab)")
                })
              ]
            }
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
            import_components3.__experimentalHStack,
            {
              spacing: 0,
              expanded: false,
              className: "edit-site-site-hub__actions",
              children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
                import_components3.Button,
                {
                  size: "compact",
                  className: "edit-site-site-hub_toggle-command-center",
                  icon: search_default,
                  onClick: () => openCommandCenter(),
                  label: (0, import_i18n3.__)("Open command palette"),
                  shortcut: import_keycodes.displayShortcut.primary("k")
                }
              )
            }
          )
        ] })
      ] }) });
    })
  );
  var site_hub_default = SiteHub;
  var SiteHubMobile = (0, import_element7.memo)(
    (0, import_element7.forwardRef)(({ isTransparent }, ref) => {
      const { path } = useLocation();
      const history = useHistory();
      const { navigate } = (0, import_element7.useContext)(SidebarNavigationContext);
      const {
        dashboardLink,
        homeUrl,
        siteTitle,
        isBlockTheme,
        isClassicThemeWithStyleBookSupport: isClassicThemeWithStyleBookSupport2
      } = (0, import_data5.useSelect)((select3) => {
        const { getSettings: getSettings7 } = unlock(select3(store));
        const { getEntityRecord, getCurrentTheme } = select3(import_core_data4.store);
        const _site = getEntityRecord("root", "site");
        const currentTheme = getCurrentTheme();
        const settings2 = getSettings7();
        const supportsEditorStyles = currentTheme?.theme_supports["editor-styles"];
        const hasThemeJson = settings2.supportsLayout;
        return {
          dashboardLink: settings2.__experimentalDashboardLink,
          homeUrl: getEntityRecord("root", "__unstableBase")?.home,
          siteTitle: !_site?.title && !!_site?.url ? (0, import_url.filterURLForDisplay)(_site?.url) : _site?.title,
          isBlockTheme: currentTheme?.is_block_theme,
          isClassicThemeWithStyleBookSupport: !currentTheme?.is_block_theme && (supportsEditorStyles || hasThemeJson)
        };
      }, []);
      const { open: openCommandCenter } = (0, import_data5.useDispatch)(import_commands.store);
      let backPath;
      if (path !== "/") {
        if (isBlockTheme || isClassicThemeWithStyleBookSupport2) {
          backPath = "/";
        } else if (path !== "/pattern") {
          backPath = "/pattern";
        }
      }
      const backButtonProps = {
        href: !!backPath ? void 0 : dashboardLink,
        label: !!backPath ? (0, import_i18n3.__)("Go to Site Editor") : (0, import_i18n3.__)("Go to the Dashboard"),
        onClick: !!backPath ? () => {
          history.navigate(backPath);
          navigate("back");
        } : void 0
      };
      return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "edit-site-site-hub", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_components3.__experimentalHStack, { justify: "flex-start", spacing: "0", children: [
        /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
          "div",
          {
            className: clsx_default(
              "edit-site-site-hub__view-mode-toggle-container",
              {
                "has-transparent-background": isTransparent
              }
            ),
            children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
              import_components3.Button,
              {
                __next40pxDefaultSize: true,
                ref,
                className: "edit-site-layout__view-mode-toggle",
                style: {
                  transform: "scale(0.5)",
                  borderRadius: 4
                },
                ...backButtonProps,
                children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(site_icon_default, { className: "edit-site-layout__view-mode-toggle-icon" })
              }
            )
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_components3.__experimentalHStack, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "edit-site-site-hub__title", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
            import_components3.Button,
            {
              __next40pxDefaultSize: true,
              variant: "link",
              href: homeUrl,
              target: "_blank",
              label: (0, import_i18n3.__)("View site (opens in a new tab)"),
              children: (0, import_html_entities.decodeEntities)(siteTitle)
            }
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
            import_components3.__experimentalHStack,
            {
              spacing: 0,
              expanded: false,
              className: "edit-site-site-hub__actions",
              children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
                import_components3.Button,
                {
                  __next40pxDefaultSize: true,
                  className: "edit-site-site-hub_toggle-command-center",
                  icon: search_default,
                  onClick: () => openCommandCenter(),
                  label: (0, import_i18n3.__)("Open command palette"),
                  shortcut: import_keycodes.displayShortcut.primary("k")
                }
              )
            }
          )
        ] })
      ] }) });
    })
  );

  // packages/edit-site/build-module/components/resizable-frame/index.mjs
  var import_element8 = __toESM(require_element(), 1);
  var import_components4 = __toESM(require_components(), 1);
  var import_compose = __toESM(require_compose(), 1);
  var import_i18n4 = __toESM(require_i18n(), 1);
  var import_router2 = __toESM(require_router(), 1);
  var import_data6 = __toESM(require_data(), 1);
  var import_core_data5 = __toESM(require_core_data(), 1);
  var import_url2 = __toESM(require_url(), 1);
  var import_jsx_runtime73 = __toESM(require_jsx_runtime(), 1);
  var { useLocation: useLocation2, useHistory: useHistory2 } = unlock(import_router2.privateApis);
  var HANDLE_STYLES_OVERRIDE = {
    position: void 0,
    userSelect: void 0,
    cursor: void 0,
    width: void 0,
    height: void 0,
    top: void 0,
    right: void 0,
    bottom: void 0,
    left: void 0
  };
  var FRAME_MIN_WIDTH = 320;
  var FRAME_REFERENCE_WIDTH = 1300;
  var FRAME_TARGET_ASPECT_RATIO = 9 / 19.5;
  var SNAP_TO_EDIT_CANVAS_MODE_THRESHOLD = 200;
  var INITIAL_FRAME_SIZE = { width: "100%", height: "100%" };
  function calculateNewHeight(width, initialAspectRatio) {
    const lerp = (a2, b2, amount) => {
      return a2 + (b2 - a2) * amount;
    };
    const lerpFactor = 1 - Math.max(
      0,
      Math.min(
        1,
        (width - FRAME_MIN_WIDTH) / (FRAME_REFERENCE_WIDTH - FRAME_MIN_WIDTH)
      )
    );
    const intermediateAspectRatio = lerp(
      initialAspectRatio,
      FRAME_TARGET_ASPECT_RATIO,
      lerpFactor
    );
    return width / intermediateAspectRatio;
  }
  function ResizableFrame({
    isFullWidth,
    isOversized,
    setIsOversized,
    isReady,
    children,
    /** The default (unresized) width/height of the frame, based on the space available in the viewport. */
    defaultSize,
    innerContentStyle
  }) {
    const history = useHistory2();
    const { path, query } = useLocation2();
    const { canvas = "view" } = query;
    const disableMotion = (0, import_compose.useReducedMotion)();
    const [frameSize, setFrameSize] = (0, import_element8.useState)(INITIAL_FRAME_SIZE);
    const [startingWidth, setStartingWidth] = (0, import_element8.useState)();
    const [isResizing, setIsResizing] = (0, import_element8.useState)(false);
    const [shouldShowHandle, setShouldShowHandle] = (0, import_element8.useState)(false);
    const [resizeRatio, setResizeRatio] = (0, import_element8.useState)(1);
    const FRAME_TRANSITION = { type: "tween", duration: isResizing ? 0 : 0.5 };
    const frameRef = (0, import_element8.useRef)(null);
    const resizableHandleHelpId = (0, import_compose.useInstanceId)(
      ResizableFrame,
      "edit-site-resizable-frame-handle-help"
    );
    const defaultAspectRatio = defaultSize.width / defaultSize.height;
    const isBlockTheme = (0, import_data6.useSelect)((select3) => {
      const { getCurrentTheme } = select3(import_core_data5.store);
      return getCurrentTheme()?.is_block_theme;
    }, []);
    const handleResizeStart = (_event, _direction, ref) => {
      setStartingWidth(ref.offsetWidth);
      setIsResizing(true);
    };
    const handleResize = (_event, _direction, _ref, delta) => {
      const normalizedDelta = delta.width / resizeRatio;
      const deltaAbs = Math.abs(normalizedDelta);
      const maxDoubledDelta = delta.width < 0 ? deltaAbs : (defaultSize.width - startingWidth) / 2;
      const deltaToDouble = Math.min(deltaAbs, maxDoubledDelta);
      const doubleSegment = deltaAbs === 0 ? 0 : deltaToDouble / deltaAbs;
      const singleSegment = 1 - doubleSegment;
      setResizeRatio(singleSegment + doubleSegment * 2);
      const updatedWidth = startingWidth + delta.width;
      setIsOversized(updatedWidth > defaultSize.width);
      setFrameSize({
        height: isOversized ? "100%" : calculateNewHeight(updatedWidth, defaultAspectRatio)
      });
    };
    const handleResizeStop = (_event, _direction, ref) => {
      setIsResizing(false);
      if (!isOversized) {
        return;
      }
      setIsOversized(false);
      const remainingWidth = ref.ownerDocument.documentElement.offsetWidth - ref.offsetWidth;
      if (remainingWidth > SNAP_TO_EDIT_CANVAS_MODE_THRESHOLD || !isBlockTheme) {
        setFrameSize(INITIAL_FRAME_SIZE);
      } else {
        history.navigate(
          (0, import_url2.addQueryArgs)(path, {
            canvas: "edit"
          }),
          {
            transition: "canvas-mode-edit-transition"
          }
        );
      }
    };
    const handleResizableHandleKeyDown = (event) => {
      if (!["ArrowLeft", "ArrowRight"].includes(event.key)) {
        return;
      }
      event.preventDefault();
      const step = 20 * (event.shiftKey ? 5 : 1);
      const delta = step * (event.key === "ArrowLeft" ? 1 : -1) * ((0, import_i18n4.isRTL)() ? -1 : 1);
      const newWidth = Math.min(
        Math.max(
          FRAME_MIN_WIDTH,
          frameRef.current.resizable.offsetWidth + delta
        ),
        defaultSize.width
      );
      setFrameSize({
        width: newWidth,
        height: calculateNewHeight(newWidth, defaultAspectRatio)
      });
    };
    const frameAnimationVariants = {
      default: {
        flexGrow: 0,
        height: frameSize.height
      },
      fullWidth: {
        flexGrow: 1,
        height: frameSize.height
      }
    };
    const resizeHandleVariants = {
      hidden: {
        opacity: 0,
        ...(0, import_i18n4.isRTL)() ? { right: 0 } : { left: 0 }
      },
      visible: {
        opacity: 1,
        // Account for the handle's width.
        ...(0, import_i18n4.isRTL)() ? { right: -14 } : { left: -14 }
      },
      active: {
        opacity: 1,
        // Account for the handle's width.
        ...(0, import_i18n4.isRTL)() ? { right: -14 } : { left: -14 },
        scaleY: 1.3
      }
    };
    const currentResizeHandleVariant = (() => {
      if (isResizing) {
        return "active";
      }
      return shouldShowHandle ? "visible" : "hidden";
    })();
    return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
      import_components4.ResizableBox,
      {
        as: import_components4.__unstableMotion.div,
        ref: frameRef,
        initial: false,
        variants: frameAnimationVariants,
        animate: isFullWidth ? "fullWidth" : "default",
        onAnimationComplete: (definition) => {
          if (definition === "fullWidth") {
            setFrameSize({ width: "100%", height: "100%" });
          }
        },
        whileHover: canvas === "view" && isBlockTheme ? {
          scale: 1.005,
          transition: {
            duration: disableMotion ? 0 : 0.5,
            ease: "easeOut"
          }
        } : {},
        transition: FRAME_TRANSITION,
        size: frameSize,
        enable: {
          top: false,
          bottom: false,
          // Resizing will be disabled until the editor content is loaded.
          ...(0, import_i18n4.isRTL)() ? { right: isReady, left: false } : { left: isReady, right: false },
          topRight: false,
          bottomRight: false,
          bottomLeft: false,
          topLeft: false
        },
        resizeRatio,
        handleClasses: void 0,
        handleStyles: {
          left: HANDLE_STYLES_OVERRIDE,
          right: HANDLE_STYLES_OVERRIDE
        },
        minWidth: FRAME_MIN_WIDTH,
        maxWidth: isFullWidth ? "100%" : "150%",
        maxHeight: "100%",
        onFocus: () => setShouldShowHandle(true),
        onBlur: () => setShouldShowHandle(false),
        onMouseOver: () => setShouldShowHandle(true),
        onMouseOut: () => setShouldShowHandle(false),
        handleComponent: {
          [(0, import_i18n4.isRTL)() ? "right" : "left"]: canvas === "view" && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_components4.Tooltip, { text: (0, import_i18n4.__)("Drag to resize"), children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
              import_components4.__unstableMotion.button,
              {
                role: "separator",
                "aria-orientation": "vertical",
                className: clsx_default(
                  "edit-site-resizable-frame__handle",
                  { "is-resizing": isResizing }
                ),
                variants: resizeHandleVariants,
                animate: currentResizeHandleVariant,
                "aria-label": (0, import_i18n4.__)("Drag to resize"),
                "aria-describedby": resizableHandleHelpId,
                "aria-valuenow": frameRef.current?.resizable?.offsetWidth || void 0,
                "aria-valuemin": FRAME_MIN_WIDTH,
                "aria-valuemax": defaultSize.width,
                onKeyDown: handleResizableHandleKeyDown,
                initial: "hidden",
                exit: "hidden",
                whileFocus: "active",
                whileHover: "active"
              },
              "handle"
            ) }),
            /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { hidden: true, id: resizableHandleHelpId, children: (0, import_i18n4.__)(
              "Use left and right arrow keys to resize the canvas. Hold shift to resize in larger increments."
            ) })
          ] })
        },
        onResizeStart: handleResizeStart,
        onResize: handleResize,
        onResizeStop: handleResizeStop,
        className: clsx_default("edit-site-resizable-frame__inner", {
          "is-resizing": isResizing
        }),
        showHandle: false,
        children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
          "div",
          {
            className: "edit-site-resizable-frame__inner-content",
            style: innerContentStyle,
            children
          }
        )
      }
    );
  }
  var resizable_frame_default = ResizableFrame;

  // packages/edit-site/build-module/components/save-keyboard-shortcut/index.mjs
  var import_element9 = __toESM(require_element(), 1);
  var import_keyboard_shortcuts = __toESM(require_keyboard_shortcuts(), 1);
  var import_i18n5 = __toESM(require_i18n(), 1);
  var import_data7 = __toESM(require_data(), 1);
  var import_core_data6 = __toESM(require_core_data(), 1);
  var import_editor3 = __toESM(require_editor(), 1);
  var shortcutName = "core/edit-site/save";
  function SaveKeyboardShortcut() {
    const { __experimentalGetDirtyEntityRecords, isSavingEntityRecord } = (0, import_data7.useSelect)(import_core_data6.store);
    const { hasNonPostEntityChanges, isPostSavingLocked } = (0, import_data7.useSelect)(import_editor3.store);
    const { savePost } = (0, import_data7.useDispatch)(import_editor3.store);
    const { setIsSaveViewOpened: setIsSaveViewOpened2 } = (0, import_data7.useDispatch)(store);
    const { registerShortcut, unregisterShortcut } = (0, import_data7.useDispatch)(
      import_keyboard_shortcuts.store
    );
    (0, import_element9.useEffect)(() => {
      registerShortcut({
        name: shortcutName,
        category: "global",
        description: (0, import_i18n5.__)("Save your changes."),
        keyCombination: {
          modifier: "primary",
          character: "s"
        }
      });
      return () => {
        unregisterShortcut(shortcutName);
      };
    }, [registerShortcut, unregisterShortcut]);
    (0, import_keyboard_shortcuts.useShortcut)("core/edit-site/save", (event) => {
      event.preventDefault();
      const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
      const hasDirtyEntities = !!dirtyEntityRecords.length;
      const isSaving = dirtyEntityRecords.some(
        (record) => isSavingEntityRecord(record.kind, record.name, record.key)
      );
      if (!hasDirtyEntities || isSaving) {
        return;
      }
      if (hasNonPostEntityChanges()) {
        setIsSaveViewOpened2(true);
      } else if (!isPostSavingLocked()) {
        savePost();
      }
    });
    return null;
  }

  // packages/edit-site/build-module/components/layout/hooks.mjs
  var import_element10 = __toESM(require_element(), 1);
  var import_data8 = __toESM(require_data(), 1);
  var import_core_data7 = __toESM(require_core_data(), 1);
  var MAX_LOADING_TIME = 1e4;
  function useIsSiteEditorLoading() {
    const [loaded, setLoaded] = (0, import_element10.useState)(false);
    const inLoadingPause = (0, import_data8.useSelect)(
      (select3) => {
        const hasResolvingSelectors = select3(import_core_data7.store).hasResolvingSelectors();
        return !loaded && !hasResolvingSelectors;
      },
      [loaded]
    );
    (0, import_element10.useEffect)(() => {
      let timeout;
      if (!loaded) {
        timeout = setTimeout(() => {
          setLoaded(true);
        }, MAX_LOADING_TIME);
      }
      return () => {
        clearTimeout(timeout);
      };
    }, [loaded]);
    (0, import_element10.useEffect)(() => {
      if (inLoadingPause) {
        const ARTIFICIAL_DELAY = 100;
        const timeout = setTimeout(() => {
          setLoaded(true);
        }, ARTIFICIAL_DELAY);
        return () => {
          clearTimeout(timeout);
        };
      }
    }, [inLoadingPause]);
    return !loaded;
  }

  // node_modules/@react-spring/rafz/dist/react-spring-rafz.esm.js
  var updateQueue = makeQueue();
  var raf = (fn) => schedule(fn, updateQueue);
  var writeQueue = makeQueue();
  raf.write = (fn) => schedule(fn, writeQueue);
  var onStartQueue = makeQueue();
  raf.onStart = (fn) => schedule(fn, onStartQueue);
  var onFrameQueue = makeQueue();
  raf.onFrame = (fn) => schedule(fn, onFrameQueue);
  var onFinishQueue = makeQueue();
  raf.onFinish = (fn) => schedule(fn, onFinishQueue);
  var timeouts = [];
  raf.setTimeout = (handler, ms) => {
    let time = raf.now() + ms;
    let cancel = () => {
      let i2 = timeouts.findIndex((t3) => t3.cancel == cancel);
      if (~i2) timeouts.splice(i2, 1);
      pendingCount -= ~i2 ? 1 : 0;
    };
    let timeout = {
      time,
      handler,
      cancel
    };
    timeouts.splice(findTimeout(time), 0, timeout);
    pendingCount += 1;
    start();
    return timeout;
  };
  var findTimeout = (time) => ~(~timeouts.findIndex((t3) => t3.time > time) || ~timeouts.length);
  raf.cancel = (fn) => {
    onStartQueue.delete(fn);
    onFrameQueue.delete(fn);
    onFinishQueue.delete(fn);
    updateQueue.delete(fn);
    writeQueue.delete(fn);
  };
  raf.sync = (fn) => {
    sync = true;
    raf.batchedUpdates(fn);
    sync = false;
  };
  raf.throttle = (fn) => {
    let lastArgs;
    function queuedFn() {
      try {
        fn(...lastArgs);
      } finally {
        lastArgs = null;
      }
    }
    function throttled(...args) {
      lastArgs = args;
      raf.onStart(queuedFn);
    }
    throttled.handler = fn;
    throttled.cancel = () => {
      onStartQueue.delete(queuedFn);
      lastArgs = null;
    };
    return throttled;
  };
  var nativeRaf = typeof window != "undefined" ? window.requestAnimationFrame : () => {
  };
  raf.use = (impl) => nativeRaf = impl;
  raf.now = typeof performance != "undefined" ? () => performance.now() : Date.now;
  raf.batchedUpdates = (fn) => fn();
  raf.catch = console.error;
  raf.frameLoop = "always";
  raf.advance = () => {
    if (raf.frameLoop !== "demand") {
      console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand");
    } else {
      update2();
    }
  };
  var ts = -1;
  var pendingCount = 0;
  var sync = false;
  function schedule(fn, queue) {
    if (sync) {
      queue.delete(fn);
      fn(0);
    } else {
      queue.add(fn);
      start();
    }
  }
  function start() {
    if (ts < 0) {
      ts = 0;
      if (raf.frameLoop !== "demand") {
        nativeRaf(loop);
      }
    }
  }
  function stop() {
    ts = -1;
  }
  function loop() {
    if (~ts) {
      nativeRaf(loop);
      raf.batchedUpdates(update2);
    }
  }
  function update2() {
    let prevTs = ts;
    ts = raf.now();
    let count = findTimeout(ts);
    if (count) {
      eachSafely(timeouts.splice(0, count), (t3) => t3.handler());
      pendingCount -= count;
    }
    if (!pendingCount) {
      stop();
      return;
    }
    onStartQueue.flush();
    updateQueue.flush(prevTs ? Math.min(64, ts - prevTs) : 16.667);
    onFrameQueue.flush();
    writeQueue.flush();
    onFinishQueue.flush();
  }
  function makeQueue() {
    let next = /* @__PURE__ */ new Set();
    let current = next;
    return {
      add(fn) {
        pendingCount += current == next && !next.has(fn) ? 1 : 0;
        next.add(fn);
      },
      delete(fn) {
        pendingCount -= current == next && next.has(fn) ? 1 : 0;
        return next.delete(fn);
      },
      flush(arg) {
        if (current.size) {
          next = /* @__PURE__ */ new Set();
          pendingCount -= current.size;
          eachSafely(current, (fn) => fn(arg) && next.add(fn));
          pendingCount += next.size;
          current = next;
        }
      }
    };
  }
  function eachSafely(values, each2) {
    values.forEach((value) => {
      try {
        each2(value);
      } catch (e2) {
        raf.catch(e2);
      }
    });
  }

  // node_modules/@react-spring/shared/dist/react-spring-shared.esm.js
  var import_react4 = __toESM(require_react());
  function noop() {
  }
  var defineHidden = (obj, key, value) => Object.defineProperty(obj, key, {
    value,
    writable: true,
    configurable: true
  });
  var is = {
    arr: Array.isArray,
    obj: (a2) => !!a2 && a2.constructor.name === "Object",
    fun: (a2) => typeof a2 === "function",
    str: (a2) => typeof a2 === "string",
    num: (a2) => typeof a2 === "number",
    und: (a2) => a2 === void 0
  };
  function isEqual(a2, b2) {
    if (is.arr(a2)) {
      if (!is.arr(b2) || a2.length !== b2.length) return false;
      for (let i2 = 0; i2 < a2.length; i2++) {
        if (a2[i2] !== b2[i2]) return false;
      }
      return true;
    }
    return a2 === b2;
  }
  var each = (obj, fn) => obj.forEach(fn);
  function eachProp(obj, fn, ctx9) {
    if (is.arr(obj)) {
      for (let i2 = 0; i2 < obj.length; i2++) {
        fn.call(ctx9, obj[i2], `${i2}`);
      }
      return;
    }
    for (const key in obj) {
      if (obj.hasOwnProperty(key)) {
        fn.call(ctx9, obj[key], key);
      }
    }
  }
  var toArray = (a2) => is.und(a2) ? [] : is.arr(a2) ? a2 : [a2];
  function flush(queue, iterator) {
    if (queue.size) {
      const items = Array.from(queue);
      queue.clear();
      each(items, iterator);
    }
  }
  var flushCalls = (queue, ...args) => flush(queue, (fn) => fn(...args));
  var isSSR = () => typeof window === "undefined" || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent);
  var createStringInterpolator$1;
  var to;
  var colors$1 = null;
  var skipAnimation = false;
  var willAdvance = noop;
  var assign = (globals2) => {
    if (globals2.to) to = globals2.to;
    if (globals2.now) raf.now = globals2.now;
    if (globals2.colors !== void 0) colors$1 = globals2.colors;
    if (globals2.skipAnimation != null) skipAnimation = globals2.skipAnimation;
    if (globals2.createStringInterpolator) createStringInterpolator$1 = globals2.createStringInterpolator;
    if (globals2.requestAnimationFrame) raf.use(globals2.requestAnimationFrame);
    if (globals2.batchedUpdates) raf.batchedUpdates = globals2.batchedUpdates;
    if (globals2.willAdvance) willAdvance = globals2.willAdvance;
    if (globals2.frameLoop) raf.frameLoop = globals2.frameLoop;
  };
  var globals = /* @__PURE__ */ Object.freeze({
    __proto__: null,
    get createStringInterpolator() {
      return createStringInterpolator$1;
    },
    get to() {
      return to;
    },
    get colors() {
      return colors$1;
    },
    get skipAnimation() {
      return skipAnimation;
    },
    get willAdvance() {
      return willAdvance;
    },
    assign
  });
  var startQueue = /* @__PURE__ */ new Set();
  var currentFrame = [];
  var prevFrame = [];
  var priority = 0;
  var frameLoop = {
    get idle() {
      return !startQueue.size && !currentFrame.length;
    },
    start(animation) {
      if (priority > animation.priority) {
        startQueue.add(animation);
        raf.onStart(flushStartQueue);
      } else {
        startSafely(animation);
        raf(advance);
      }
    },
    advance,
    sort(animation) {
      if (priority) {
        raf.onFrame(() => frameLoop.sort(animation));
      } else {
        const prevIndex = currentFrame.indexOf(animation);
        if (~prevIndex) {
          currentFrame.splice(prevIndex, 1);
          startUnsafely(animation);
        }
      }
    },
    clear() {
      currentFrame = [];
      startQueue.clear();
    }
  };
  function flushStartQueue() {
    startQueue.forEach(startSafely);
    startQueue.clear();
    raf(advance);
  }
  function startSafely(animation) {
    if (!currentFrame.includes(animation)) startUnsafely(animation);
  }
  function startUnsafely(animation) {
    currentFrame.splice(findIndex(currentFrame, (other) => other.priority > animation.priority), 0, animation);
  }
  function advance(dt) {
    const nextFrame = prevFrame;
    for (let i2 = 0; i2 < currentFrame.length; i2++) {
      const animation = currentFrame[i2];
      priority = animation.priority;
      if (!animation.idle) {
        willAdvance(animation);
        animation.advance(dt);
        if (!animation.idle) {
          nextFrame.push(animation);
        }
      }
    }
    priority = 0;
    prevFrame = currentFrame;
    prevFrame.length = 0;
    currentFrame = nextFrame;
    return currentFrame.length > 0;
  }
  function findIndex(arr, test) {
    const index = arr.findIndex(test);
    return index < 0 ? arr.length : index;
  }
  var colors = {
    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 NUMBER = "[-+]?\\d*\\.?\\d+";
  var PERCENTAGE = NUMBER + "%";
  function call(...parts) {
    return "\\(\\s*(" + parts.join(")\\s*,\\s*(") + ")\\s*\\)";
  }
  var rgb = new RegExp("rgb" + call(NUMBER, NUMBER, NUMBER));
  var rgba = new RegExp("rgba" + call(NUMBER, NUMBER, NUMBER, NUMBER));
  var hsl = new RegExp("hsl" + call(NUMBER, PERCENTAGE, PERCENTAGE));
  var hsla = new RegExp("hsla" + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));
  var hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
  var hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
  var hex6 = /^#([0-9a-fA-F]{6})$/;
  var hex8 = /^#([0-9a-fA-F]{8})$/;
  function normalizeColor(color) {
    let match3;
    if (typeof color === "number") {
      return color >>> 0 === color && color >= 0 && color <= 4294967295 ? color : null;
    }
    if (match3 = hex6.exec(color)) return parseInt(match3[1] + "ff", 16) >>> 0;
    if (colors$1 && colors$1[color] !== void 0) {
      return colors$1[color];
    }
    if (match3 = rgb.exec(color)) {
      return (parse255(match3[1]) << 24 | parse255(match3[2]) << 16 | parse255(match3[3]) << 8 | 255) >>> 0;
    }
    if (match3 = rgba.exec(color)) {
      return (parse255(match3[1]) << 24 | parse255(match3[2]) << 16 | parse255(match3[3]) << 8 | parse1(match3[4])) >>> 0;
    }
    if (match3 = hex3.exec(color)) {
      return parseInt(match3[1] + match3[1] + match3[2] + match3[2] + match3[3] + match3[3] + "ff", 16) >>> 0;
    }
    if (match3 = hex8.exec(color)) return parseInt(match3[1], 16) >>> 0;
    if (match3 = hex4.exec(color)) {
      return parseInt(match3[1] + match3[1] + match3[2] + match3[2] + match3[3] + match3[3] + match3[4] + match3[4], 16) >>> 0;
    }
    if (match3 = hsl.exec(color)) {
      return (hslToRgb(parse360(match3[1]), parsePercentage(match3[2]), parsePercentage(match3[3])) | 255) >>> 0;
    }
    if (match3 = hsla.exec(color)) {
      return (hslToRgb(parse360(match3[1]), parsePercentage(match3[2]), parsePercentage(match3[3])) | parse1(match3[4])) >>> 0;
    }
    return null;
  }
  function hue2rgb(p3, q, t3) {
    if (t3 < 0) t3 += 1;
    if (t3 > 1) t3 -= 1;
    if (t3 < 1 / 6) return p3 + (q - p3) * 6 * t3;
    if (t3 < 1 / 2) return q;
    if (t3 < 2 / 3) return p3 + (q - p3) * (2 / 3 - t3) * 6;
    return p3;
  }
  function hslToRgb(h2, s2, l2) {
    const q = l2 < 0.5 ? l2 * (1 + s2) : l2 + s2 - l2 * s2;
    const p3 = 2 * l2 - q;
    const r3 = hue2rgb(p3, q, h2 + 1 / 3);
    const g2 = hue2rgb(p3, q, h2);
    const b2 = hue2rgb(p3, q, h2 - 1 / 3);
    return Math.round(r3 * 255) << 24 | Math.round(g2 * 255) << 16 | Math.round(b2 * 255) << 8;
  }
  function parse255(str) {
    const int = parseInt(str, 10);
    if (int < 0) return 0;
    if (int > 255) return 255;
    return int;
  }
  function parse360(str) {
    const int = parseFloat(str);
    return (int % 360 + 360) % 360 / 360;
  }
  function parse1(str) {
    const num = parseFloat(str);
    if (num < 0) return 0;
    if (num > 1) return 255;
    return Math.round(num * 255);
  }
  function parsePercentage(str) {
    const int = parseFloat(str);
    if (int < 0) return 0;
    if (int > 100) return 1;
    return int / 100;
  }
  function colorToRgba(input) {
    let int32Color = normalizeColor(input);
    if (int32Color === null) return input;
    int32Color = int32Color || 0;
    let r3 = (int32Color & 4278190080) >>> 24;
    let g2 = (int32Color & 16711680) >>> 16;
    let b2 = (int32Color & 65280) >>> 8;
    let a2 = (int32Color & 255) / 255;
    return `rgba(${r3}, ${g2}, ${b2}, ${a2})`;
  }
  var createInterpolator = (range, output, extrapolate) => {
    if (is.fun(range)) {
      return range;
    }
    if (is.arr(range)) {
      return createInterpolator({
        range,
        output,
        extrapolate
      });
    }
    if (is.str(range.output[0])) {
      return createStringInterpolator$1(range);
    }
    const config2 = range;
    const outputRange = config2.output;
    const inputRange = config2.range || [0, 1];
    const extrapolateLeft = config2.extrapolateLeft || config2.extrapolate || "extend";
    const extrapolateRight = config2.extrapolateRight || config2.extrapolate || "extend";
    const easing = config2.easing || ((t3) => t3);
    return (input) => {
      const range2 = findRange(input, inputRange);
      return interpolate(input, inputRange[range2], inputRange[range2 + 1], outputRange[range2], outputRange[range2 + 1], easing, extrapolateLeft, extrapolateRight, config2.map);
    };
  };
  function interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight, map) {
    let result = map ? map(input) : input;
    if (result < inputMin) {
      if (extrapolateLeft === "identity") return result;
      else if (extrapolateLeft === "clamp") result = inputMin;
    }
    if (result > inputMax) {
      if (extrapolateRight === "identity") return result;
      else if (extrapolateRight === "clamp") result = inputMax;
    }
    if (outputMin === outputMax) return outputMin;
    if (inputMin === inputMax) return input <= inputMin ? outputMin : outputMax;
    if (inputMin === -Infinity) result = -result;
    else if (inputMax === Infinity) result = result - inputMin;
    else result = (result - inputMin) / (inputMax - inputMin);
    result = easing(result);
    if (outputMin === -Infinity) result = -result;
    else if (outputMax === Infinity) result = result + outputMin;
    else result = result * (outputMax - outputMin) + outputMin;
    return result;
  }
  function findRange(input, inputRange) {
    for (var i2 = 1; i2 < inputRange.length - 1; ++i2) if (inputRange[i2] >= input) break;
    return i2 - 1;
  }
  function _extends() {
    _extends = Object.assign ? Object.assign.bind() : function(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2];
        for (var key in source) {
          if (Object.prototype.hasOwnProperty.call(source, key)) {
            target[key] = source[key];
          }
        }
      }
      return target;
    };
    return _extends.apply(this, arguments);
  }
  var $get = /* @__PURE__ */ Symbol.for("FluidValue.get");
  var $observers = /* @__PURE__ */ Symbol.for("FluidValue.observers");
  var hasFluidValue = (arg) => Boolean(arg && arg[$get]);
  var getFluidValue = (arg) => arg && arg[$get] ? arg[$get]() : arg;
  var getFluidObservers = (target) => target[$observers] || null;
  function callFluidObserver(observer, event) {
    if (observer.eventObserved) {
      observer.eventObserved(event);
    } else {
      observer(event);
    }
  }
  function callFluidObservers(target, event) {
    let observers = target[$observers];
    if (observers) {
      observers.forEach((observer) => {
        callFluidObserver(observer, event);
      });
    }
  }
  var FluidValue = class {
    constructor(get) {
      this[$get] = void 0;
      this[$observers] = void 0;
      if (!get && !(get = this.get)) {
        throw Error("Unknown getter");
      }
      setFluidGetter(this, get);
    }
  };
  var setFluidGetter = (target, get) => setHidden(target, $get, get);
  function addFluidObserver(target, observer) {
    if (target[$get]) {
      let observers = target[$observers];
      if (!observers) {
        setHidden(target, $observers, observers = /* @__PURE__ */ new Set());
      }
      if (!observers.has(observer)) {
        observers.add(observer);
        if (target.observerAdded) {
          target.observerAdded(observers.size, observer);
        }
      }
    }
    return observer;
  }
  function removeFluidObserver(target, observer) {
    let observers = target[$observers];
    if (observers && observers.has(observer)) {
      const count = observers.size - 1;
      if (count) {
        observers.delete(observer);
      } else {
        target[$observers] = null;
      }
      if (target.observerRemoved) {
        target.observerRemoved(count, observer);
      }
    }
  }
  var setHidden = (target, key, value) => Object.defineProperty(target, key, {
    value,
    writable: true,
    configurable: true
  });
  var numberRegex = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g;
  var colorRegex = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi;
  var unitRegex = new RegExp(`(${numberRegex.source})(%|[a-z]+)`, "i");
  var rgbaRegex = /rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi;
  var cssVariableRegex = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;
  var variableToRgba = (input) => {
    const [token, fallback] = parseCSSVariable(input);
    if (!token || isSSR()) {
      return input;
    }
    const value = window.getComputedStyle(document.documentElement).getPropertyValue(token);
    if (value) {
      return value.trim();
    } else if (fallback && fallback.startsWith("--")) {
      const _value = window.getComputedStyle(document.documentElement).getPropertyValue(fallback);
      if (_value) {
        return _value;
      } else {
        return input;
      }
    } else if (fallback && cssVariableRegex.test(fallback)) {
      return variableToRgba(fallback);
    } else if (fallback) {
      return fallback;
    }
    return input;
  };
  var parseCSSVariable = (current) => {
    const match3 = cssVariableRegex.exec(current);
    if (!match3) return [,];
    const [, token, fallback] = match3;
    return [token, fallback];
  };
  var namedColorRegex;
  var rgbaRound = (_, p1, p22, p3, p4) => `rgba(${Math.round(p1)}, ${Math.round(p22)}, ${Math.round(p3)}, ${p4})`;
  var createStringInterpolator = (config2) => {
    if (!namedColorRegex) namedColorRegex = colors$1 ? new RegExp(`(${Object.keys(colors$1).join("|")})(?!\\w)`, "g") : /^\b$/;
    const output = config2.output.map((value) => {
      return getFluidValue(value).replace(cssVariableRegex, variableToRgba).replace(colorRegex, colorToRgba).replace(namedColorRegex, colorToRgba);
    });
    const keyframes = output.map((value) => value.match(numberRegex).map(Number));
    const outputRanges = keyframes[0].map((_, i2) => keyframes.map((values) => {
      if (!(i2 in values)) {
        throw Error('The arity of each "output" value must be equal');
      }
      return values[i2];
    }));
    const interpolators = outputRanges.map((output2) => createInterpolator(_extends({}, config2, {
      output: output2
    })));
    return (input) => {
      var _output$find;
      const missingUnit = !unitRegex.test(output[0]) && ((_output$find = output.find((value) => unitRegex.test(value))) == null ? void 0 : _output$find.replace(numberRegex, ""));
      let i2 = 0;
      return output[0].replace(numberRegex, () => `${interpolators[i2++](input)}${missingUnit || ""}`).replace(rgbaRegex, rgbaRound);
    };
  };
  var prefix = "react-spring: ";
  var once = (fn) => {
    const func = fn;
    let called = false;
    if (typeof func != "function") {
      throw new TypeError(`${prefix}once requires a function parameter`);
    }
    return (...args) => {
      if (!called) {
        func(...args);
        called = true;
      }
    };
  };
  var warnInterpolate = once(console.warn);
  function deprecateInterpolate() {
    warnInterpolate(`${prefix}The "interpolate" function is deprecated in v9 (use "to" instead)`);
  }
  var warnDirectCall = once(console.warn);
  function isAnimatedString(value) {
    return is.str(value) && (value[0] == "#" || /\d/.test(value) || !isSSR() && cssVariableRegex.test(value) || value in (colors$1 || {}));
  }
  var useIsomorphicLayoutEffect = isSSR() ? import_react4.useEffect : import_react4.useLayoutEffect;
  var useIsMounted = () => {
    const isMounted = (0, import_react4.useRef)(false);
    useIsomorphicLayoutEffect(() => {
      isMounted.current = true;
      return () => {
        isMounted.current = false;
      };
    }, []);
    return isMounted;
  };
  function useForceUpdate() {
    const update4 = (0, import_react4.useState)()[1];
    const isMounted = useIsMounted();
    return () => {
      if (isMounted.current) {
        update4(Math.random());
      }
    };
  }
  function useMemoOne(getResult, inputs) {
    const [initial] = (0, import_react4.useState)(() => ({
      inputs,
      result: getResult()
    }));
    const committed = (0, import_react4.useRef)();
    const prevCache = committed.current;
    let cache = prevCache;
    if (cache) {
      const useCache = Boolean(inputs && cache.inputs && areInputsEqual(inputs, cache.inputs));
      if (!useCache) {
        cache = {
          inputs,
          result: getResult()
        };
      }
    } else {
      cache = initial;
    }
    (0, import_react4.useEffect)(() => {
      committed.current = cache;
      if (prevCache == initial) {
        initial.inputs = initial.result = void 0;
      }
    }, [cache]);
    return cache.result;
  }
  function areInputsEqual(next, prev) {
    if (next.length !== prev.length) {
      return false;
    }
    for (let i2 = 0; i2 < next.length; i2++) {
      if (next[i2] !== prev[i2]) {
        return false;
      }
    }
    return true;
  }
  var useOnce = (effect) => (0, import_react4.useEffect)(effect, emptyDeps);
  var emptyDeps = [];

  // node_modules/@react-spring/core/dist/react-spring-core.esm.js
  var React6 = __toESM(require_react());
  var import_react6 = __toESM(require_react());

  // node_modules/@react-spring/animated/dist/react-spring-animated.esm.js
  var React5 = __toESM(require_react());
  var import_react5 = __toESM(require_react());
  var $node = /* @__PURE__ */ Symbol.for("Animated:node");
  var isAnimated = (value) => !!value && value[$node] === value;
  var getAnimated = (owner) => owner && owner[$node];
  var setAnimated = (owner, node) => defineHidden(owner, $node, node);
  var getPayload = (owner) => owner && owner[$node] && owner[$node].getPayload();
  var Animated = class {
    constructor() {
      this.payload = void 0;
      setAnimated(this, this);
    }
    getPayload() {
      return this.payload || [];
    }
  };
  var AnimatedValue = class _AnimatedValue extends Animated {
    constructor(_value) {
      super();
      this.done = true;
      this.elapsedTime = void 0;
      this.lastPosition = void 0;
      this.lastVelocity = void 0;
      this.v0 = void 0;
      this.durationProgress = 0;
      this._value = _value;
      if (is.num(this._value)) {
        this.lastPosition = this._value;
      }
    }
    static create(value) {
      return new _AnimatedValue(value);
    }
    getPayload() {
      return [this];
    }
    getValue() {
      return this._value;
    }
    setValue(value, step) {
      if (is.num(value)) {
        this.lastPosition = value;
        if (step) {
          value = Math.round(value / step) * step;
          if (this.done) {
            this.lastPosition = value;
          }
        }
      }
      if (this._value === value) {
        return false;
      }
      this._value = value;
      return true;
    }
    reset() {
      const {
        done
      } = this;
      this.done = false;
      if (is.num(this._value)) {
        this.elapsedTime = 0;
        this.durationProgress = 0;
        this.lastPosition = this._value;
        if (done) this.lastVelocity = null;
        this.v0 = null;
      }
    }
  };
  var AnimatedString = class _AnimatedString extends AnimatedValue {
    constructor(value) {
      super(0);
      this._string = null;
      this._toString = void 0;
      this._toString = createInterpolator({
        output: [value, value]
      });
    }
    static create(value) {
      return new _AnimatedString(value);
    }
    getValue() {
      let value = this._string;
      return value == null ? this._string = this._toString(this._value) : value;
    }
    setValue(value) {
      if (is.str(value)) {
        if (value == this._string) {
          return false;
        }
        this._string = value;
        this._value = 1;
      } else if (super.setValue(value)) {
        this._string = null;
      } else {
        return false;
      }
      return true;
    }
    reset(goal) {
      if (goal) {
        this._toString = createInterpolator({
          output: [this.getValue(), goal]
        });
      }
      this._value = 0;
      super.reset();
    }
  };
  var TreeContext = {
    dependencies: null
  };
  var AnimatedObject = class extends Animated {
    constructor(source) {
      super();
      this.source = source;
      this.setValue(source);
    }
    getValue(animated2) {
      const values = {};
      eachProp(this.source, (source, key) => {
        if (isAnimated(source)) {
          values[key] = source.getValue(animated2);
        } else if (hasFluidValue(source)) {
          values[key] = getFluidValue(source);
        } else if (!animated2) {
          values[key] = source;
        }
      });
      return values;
    }
    setValue(source) {
      this.source = source;
      this.payload = this._makePayload(source);
    }
    reset() {
      if (this.payload) {
        each(this.payload, (node) => node.reset());
      }
    }
    _makePayload(source) {
      if (source) {
        const payload = /* @__PURE__ */ new Set();
        eachProp(source, this._addToPayload, payload);
        return Array.from(payload);
      }
    }
    _addToPayload(source) {
      if (TreeContext.dependencies && hasFluidValue(source)) {
        TreeContext.dependencies.add(source);
      }
      const payload = getPayload(source);
      if (payload) {
        each(payload, (node) => this.add(node));
      }
    }
  };
  var AnimatedArray = class _AnimatedArray extends AnimatedObject {
    constructor(source) {
      super(source);
    }
    static create(source) {
      return new _AnimatedArray(source);
    }
    getValue() {
      return this.source.map((node) => node.getValue());
    }
    setValue(source) {
      const payload = this.getPayload();
      if (source.length == payload.length) {
        return payload.map((node, i2) => node.setValue(source[i2])).some(Boolean);
      }
      super.setValue(source.map(makeAnimated));
      return true;
    }
  };
  function makeAnimated(value) {
    const nodeType = isAnimatedString(value) ? AnimatedString : AnimatedValue;
    return nodeType.create(value);
  }
  function getAnimatedType(value) {
    const parentNode = getAnimated(value);
    return parentNode ? parentNode.constructor : is.arr(value) ? AnimatedArray : isAnimatedString(value) ? AnimatedString : AnimatedValue;
  }
  function _extends2() {
    _extends2 = Object.assign ? Object.assign.bind() : function(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2];
        for (var key in source) {
          if (Object.prototype.hasOwnProperty.call(source, key)) {
            target[key] = source[key];
          }
        }
      }
      return target;
    };
    return _extends2.apply(this, arguments);
  }
  var withAnimated = (Component, host2) => {
    const hasInstance = !is.fun(Component) || Component.prototype && Component.prototype.isReactComponent;
    return (0, import_react5.forwardRef)((givenProps, givenRef) => {
      const instanceRef = (0, import_react5.useRef)(null);
      const ref = hasInstance && (0, import_react5.useCallback)((value) => {
        instanceRef.current = updateRef(givenRef, value);
      }, [givenRef]);
      const [props, deps] = getAnimatedState(givenProps, host2);
      const forceUpdate = useForceUpdate();
      const callback = () => {
        const instance = instanceRef.current;
        if (hasInstance && !instance) {
          return;
        }
        const didUpdate = instance ? host2.applyAnimatedValues(instance, props.getValue(true)) : false;
        if (didUpdate === false) {
          forceUpdate();
        }
      };
      const observer = new PropsObserver(callback, deps);
      const observerRef = (0, import_react5.useRef)();
      useIsomorphicLayoutEffect(() => {
        observerRef.current = observer;
        each(deps, (dep) => addFluidObserver(dep, observer));
        return () => {
          if (observerRef.current) {
            each(observerRef.current.deps, (dep) => removeFluidObserver(dep, observerRef.current));
            raf.cancel(observerRef.current.update);
          }
        };
      });
      (0, import_react5.useEffect)(callback, []);
      useOnce(() => () => {
        const observer2 = observerRef.current;
        each(observer2.deps, (dep) => removeFluidObserver(dep, observer2));
      });
      const usedProps = host2.getComponentProps(props.getValue());
      return React5.createElement(Component, _extends2({}, usedProps, {
        ref
      }));
    });
  };
  var PropsObserver = class {
    constructor(update4, deps) {
      this.update = update4;
      this.deps = deps;
    }
    eventObserved(event) {
      if (event.type == "change") {
        raf.write(this.update);
      }
    }
  };
  function getAnimatedState(props, host2) {
    const dependencies = /* @__PURE__ */ new Set();
    TreeContext.dependencies = dependencies;
    if (props.style) props = _extends2({}, props, {
      style: host2.createAnimatedStyle(props.style)
    });
    props = new AnimatedObject(props);
    TreeContext.dependencies = null;
    return [props, dependencies];
  }
  function updateRef(ref, value) {
    if (ref) {
      if (is.fun(ref)) ref(value);
      else ref.current = value;
    }
    return value;
  }
  var cacheKey = /* @__PURE__ */ Symbol.for("AnimatedComponent");
  var createHost = (components, {
    applyAnimatedValues: _applyAnimatedValues = () => false,
    createAnimatedStyle: _createAnimatedStyle = (style) => new AnimatedObject(style),
    getComponentProps: _getComponentProps = (props) => props
  } = {}) => {
    const hostConfig = {
      applyAnimatedValues: _applyAnimatedValues,
      createAnimatedStyle: _createAnimatedStyle,
      getComponentProps: _getComponentProps
    };
    const animated2 = (Component) => {
      const displayName = getDisplayName(Component) || "Anonymous";
      if (is.str(Component)) {
        Component = animated2[Component] || (animated2[Component] = withAnimated(Component, hostConfig));
      } else {
        Component = Component[cacheKey] || (Component[cacheKey] = withAnimated(Component, hostConfig));
      }
      Component.displayName = `Animated(${displayName})`;
      return Component;
    };
    eachProp(components, (Component, key) => {
      if (is.arr(components)) {
        key = getDisplayName(Component);
      }
      animated2[key] = animated2(Component);
    });
    return {
      animated: animated2
    };
  };
  var getDisplayName = (arg) => is.str(arg) ? arg : arg && is.str(arg.displayName) ? arg.displayName : is.fun(arg) && arg.name || null;

  // node_modules/@react-spring/core/dist/react-spring-core.esm.js
  function _extends3() {
    _extends3 = Object.assign ? Object.assign.bind() : function(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2];
        for (var key in source) {
          if (Object.prototype.hasOwnProperty.call(source, key)) {
            target[key] = source[key];
          }
        }
      }
      return target;
    };
    return _extends3.apply(this, arguments);
  }
  function callProp(value, ...args) {
    return is.fun(value) ? value(...args) : value;
  }
  var matchProp = (value, key) => value === true || !!(key && value && (is.fun(value) ? value(key) : toArray(value).includes(key)));
  var resolveProp = (prop, key) => is.obj(prop) ? key && prop[key] : prop;
  var getDefaultProp = (props, key) => props.default === true ? props[key] : props.default ? props.default[key] : void 0;
  var noopTransform = (value) => value;
  var getDefaultProps = (props, transform = noopTransform) => {
    let keys = DEFAULT_PROPS;
    if (props.default && props.default !== true) {
      props = props.default;
      keys = Object.keys(props);
    }
    const defaults2 = {};
    for (const key of keys) {
      const value = transform(props[key], key);
      if (!is.und(value)) {
        defaults2[key] = value;
      }
    }
    return defaults2;
  };
  var DEFAULT_PROPS = ["config", "onProps", "onStart", "onChange", "onPause", "onResume", "onRest"];
  var RESERVED_PROPS = {
    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 getForwardProps(props) {
    const forward = {};
    let count = 0;
    eachProp(props, (value, prop) => {
      if (!RESERVED_PROPS[prop]) {
        forward[prop] = value;
        count++;
      }
    });
    if (count) {
      return forward;
    }
  }
  function inferTo(props) {
    const to2 = getForwardProps(props);
    if (to2) {
      const out = {
        to: to2
      };
      eachProp(props, (val, key) => key in to2 || (out[key] = val));
      return out;
    }
    return _extends3({}, props);
  }
  function computeGoal(value) {
    value = getFluidValue(value);
    return is.arr(value) ? value.map(computeGoal) : isAnimatedString(value) ? globals.createStringInterpolator({
      range: [0, 1],
      output: [value, value]
    })(1) : value;
  }
  function isAsyncTo(to2) {
    return is.fun(to2) || is.arr(to2) && is.obj(to2[0]);
  }
  var config = {
    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 c1 = 1.70158;
  var c2 = c1 * 1.525;
  var c3 = c1 + 1;
  var c4 = 2 * Math.PI / 3;
  var c5 = 2 * Math.PI / 4.5;
  var bounceOut = (x2) => {
    const n1 = 7.5625;
    const d1 = 2.75;
    if (x2 < 1 / d1) {
      return n1 * x2 * x2;
    } else if (x2 < 2 / d1) {
      return n1 * (x2 -= 1.5 / d1) * x2 + 0.75;
    } else if (x2 < 2.5 / d1) {
      return n1 * (x2 -= 2.25 / d1) * x2 + 0.9375;
    } else {
      return n1 * (x2 -= 2.625 / d1) * x2 + 0.984375;
    }
  };
  var easings = {
    linear: (x2) => x2,
    easeInQuad: (x2) => x2 * x2,
    easeOutQuad: (x2) => 1 - (1 - x2) * (1 - x2),
    easeInOutQuad: (x2) => x2 < 0.5 ? 2 * x2 * x2 : 1 - Math.pow(-2 * x2 + 2, 2) / 2,
    easeInCubic: (x2) => x2 * x2 * x2,
    easeOutCubic: (x2) => 1 - Math.pow(1 - x2, 3),
    easeInOutCubic: (x2) => x2 < 0.5 ? 4 * x2 * x2 * x2 : 1 - Math.pow(-2 * x2 + 2, 3) / 2,
    easeInQuart: (x2) => x2 * x2 * x2 * x2,
    easeOutQuart: (x2) => 1 - Math.pow(1 - x2, 4),
    easeInOutQuart: (x2) => x2 < 0.5 ? 8 * x2 * x2 * x2 * x2 : 1 - Math.pow(-2 * x2 + 2, 4) / 2,
    easeInQuint: (x2) => x2 * x2 * x2 * x2 * x2,
    easeOutQuint: (x2) => 1 - Math.pow(1 - x2, 5),
    easeInOutQuint: (x2) => x2 < 0.5 ? 16 * x2 * x2 * x2 * x2 * x2 : 1 - Math.pow(-2 * x2 + 2, 5) / 2,
    easeInSine: (x2) => 1 - Math.cos(x2 * Math.PI / 2),
    easeOutSine: (x2) => Math.sin(x2 * Math.PI / 2),
    easeInOutSine: (x2) => -(Math.cos(Math.PI * x2) - 1) / 2,
    easeInExpo: (x2) => x2 === 0 ? 0 : Math.pow(2, 10 * x2 - 10),
    easeOutExpo: (x2) => x2 === 1 ? 1 : 1 - Math.pow(2, -10 * x2),
    easeInOutExpo: (x2) => x2 === 0 ? 0 : x2 === 1 ? 1 : x2 < 0.5 ? Math.pow(2, 20 * x2 - 10) / 2 : (2 - Math.pow(2, -20 * x2 + 10)) / 2,
    easeInCirc: (x2) => 1 - Math.sqrt(1 - Math.pow(x2, 2)),
    easeOutCirc: (x2) => Math.sqrt(1 - Math.pow(x2 - 1, 2)),
    easeInOutCirc: (x2) => x2 < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * x2, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * x2 + 2, 2)) + 1) / 2,
    easeInBack: (x2) => c3 * x2 * x2 * x2 - c1 * x2 * x2,
    easeOutBack: (x2) => 1 + c3 * Math.pow(x2 - 1, 3) + c1 * Math.pow(x2 - 1, 2),
    easeInOutBack: (x2) => x2 < 0.5 ? Math.pow(2 * x2, 2) * ((c2 + 1) * 2 * x2 - c2) / 2 : (Math.pow(2 * x2 - 2, 2) * ((c2 + 1) * (x2 * 2 - 2) + c2) + 2) / 2,
    easeInElastic: (x2) => x2 === 0 ? 0 : x2 === 1 ? 1 : -Math.pow(2, 10 * x2 - 10) * Math.sin((x2 * 10 - 10.75) * c4),
    easeOutElastic: (x2) => x2 === 0 ? 0 : x2 === 1 ? 1 : Math.pow(2, -10 * x2) * Math.sin((x2 * 10 - 0.75) * c4) + 1,
    easeInOutElastic: (x2) => x2 === 0 ? 0 : x2 === 1 ? 1 : x2 < 0.5 ? -(Math.pow(2, 20 * x2 - 10) * Math.sin((20 * x2 - 11.125) * c5)) / 2 : Math.pow(2, -20 * x2 + 10) * Math.sin((20 * x2 - 11.125) * c5) / 2 + 1,
    easeInBounce: (x2) => 1 - bounceOut(1 - x2),
    easeOutBounce: bounceOut,
    easeInOutBounce: (x2) => x2 < 0.5 ? (1 - bounceOut(1 - 2 * x2)) / 2 : (1 + bounceOut(2 * x2 - 1)) / 2
  };
  var defaults = _extends3({}, config.default, {
    mass: 1,
    damping: 1,
    easing: easings.linear,
    clamp: false
  });
  var AnimationConfig = class {
    constructor() {
      this.tension = void 0;
      this.friction = void 0;
      this.frequency = void 0;
      this.damping = void 0;
      this.mass = void 0;
      this.velocity = 0;
      this.restVelocity = void 0;
      this.precision = void 0;
      this.progress = void 0;
      this.duration = void 0;
      this.easing = void 0;
      this.clamp = void 0;
      this.bounce = void 0;
      this.decay = void 0;
      this.round = void 0;
      Object.assign(this, defaults);
    }
  };
  function mergeConfig(config2, newConfig, defaultConfig) {
    if (defaultConfig) {
      defaultConfig = _extends3({}, defaultConfig);
      sanitizeConfig(defaultConfig, newConfig);
      newConfig = _extends3({}, defaultConfig, newConfig);
    }
    sanitizeConfig(config2, newConfig);
    Object.assign(config2, newConfig);
    for (const key in defaults) {
      if (config2[key] == null) {
        config2[key] = defaults[key];
      }
    }
    let {
      mass,
      frequency,
      damping
    } = config2;
    if (!is.und(frequency)) {
      if (frequency < 0.01) frequency = 0.01;
      if (damping < 0) damping = 0;
      config2.tension = Math.pow(2 * Math.PI / frequency, 2) * mass;
      config2.friction = 4 * Math.PI * damping * mass / frequency;
    }
    return config2;
  }
  function sanitizeConfig(config2, props) {
    if (!is.und(props.decay)) {
      config2.duration = void 0;
    } else {
      const isTensionConfig = !is.und(props.tension) || !is.und(props.friction);
      if (isTensionConfig || !is.und(props.frequency) || !is.und(props.damping) || !is.und(props.mass)) {
        config2.duration = void 0;
        config2.decay = void 0;
      }
      if (isTensionConfig) {
        config2.frequency = void 0;
      }
    }
  }
  var emptyArray = [];
  var Animation = class {
    constructor() {
      this.changed = false;
      this.values = emptyArray;
      this.toValues = null;
      this.fromValues = emptyArray;
      this.to = void 0;
      this.from = void 0;
      this.config = new AnimationConfig();
      this.immediate = false;
    }
  };
  function scheduleProps(callId, {
    key,
    props,
    defaultProps,
    state,
    actions
  }) {
    return new Promise((resolve, reject) => {
      var _props$cancel;
      let delay;
      let timeout;
      let cancel = matchProp((_props$cancel = props.cancel) != null ? _props$cancel : defaultProps == null ? void 0 : defaultProps.cancel, key);
      if (cancel) {
        onStart();
      } else {
        if (!is.und(props.pause)) {
          state.paused = matchProp(props.pause, key);
        }
        let pause = defaultProps == null ? void 0 : defaultProps.pause;
        if (pause !== true) {
          pause = state.paused || matchProp(pause, key);
        }
        delay = callProp(props.delay || 0, key);
        if (pause) {
          state.resumeQueue.add(onResume);
          actions.pause();
        } else {
          actions.resume();
          onResume();
        }
      }
      function onPause() {
        state.resumeQueue.add(onResume);
        state.timeouts.delete(timeout);
        timeout.cancel();
        delay = timeout.time - raf.now();
      }
      function onResume() {
        if (delay > 0 && !globals.skipAnimation) {
          state.delayed = true;
          timeout = raf.setTimeout(onStart, delay);
          state.pauseQueue.add(onPause);
          state.timeouts.add(timeout);
        } else {
          onStart();
        }
      }
      function onStart() {
        if (state.delayed) {
          state.delayed = false;
        }
        state.pauseQueue.delete(onPause);
        state.timeouts.delete(timeout);
        if (callId <= (state.cancelId || 0)) {
          cancel = true;
        }
        try {
          actions.start(_extends3({}, props, {
            callId,
            cancel
          }), resolve);
        } catch (err) {
          reject(err);
        }
      }
    });
  }
  var getCombinedResult = (target, results) => results.length == 1 ? results[0] : results.some((result) => result.cancelled) ? getCancelledResult(target.get()) : results.every((result) => result.noop) ? getNoopResult(target.get()) : getFinishedResult(target.get(), results.every((result) => result.finished));
  var getNoopResult = (value) => ({
    value,
    noop: true,
    finished: true,
    cancelled: false
  });
  var getFinishedResult = (value, finished, cancelled = false) => ({
    value,
    finished,
    cancelled
  });
  var getCancelledResult = (value) => ({
    value,
    cancelled: true,
    finished: false
  });
  function runAsync(to2, props, state, target) {
    const {
      callId,
      parentId,
      onRest
    } = props;
    const {
      asyncTo: prevTo,
      promise: prevPromise
    } = state;
    if (!parentId && to2 === prevTo && !props.reset) {
      return prevPromise;
    }
    return state.promise = (async () => {
      state.asyncId = callId;
      state.asyncTo = to2;
      const defaultProps = getDefaultProps(props, (value, key) => key === "onRest" ? void 0 : value);
      let preventBail;
      let bail;
      const bailPromise = new Promise((resolve, reject) => (preventBail = resolve, bail = reject));
      const bailIfEnded = (bailSignal) => {
        const bailResult = callId <= (state.cancelId || 0) && getCancelledResult(target) || callId !== state.asyncId && getFinishedResult(target, false);
        if (bailResult) {
          bailSignal.result = bailResult;
          bail(bailSignal);
          throw bailSignal;
        }
      };
      const animate = (arg1, arg2) => {
        const bailSignal = new BailSignal();
        const skipAnimationSignal = new SkipAniamtionSignal();
        return (async () => {
          if (globals.skipAnimation) {
            stopAsync(state);
            skipAnimationSignal.result = getFinishedResult(target, false);
            bail(skipAnimationSignal);
            throw skipAnimationSignal;
          }
          bailIfEnded(bailSignal);
          const props2 = is.obj(arg1) ? _extends3({}, arg1) : _extends3({}, arg2, {
            to: arg1
          });
          props2.parentId = callId;
          eachProp(defaultProps, (value, key) => {
            if (is.und(props2[key])) {
              props2[key] = value;
            }
          });
          const result2 = await target.start(props2);
          bailIfEnded(bailSignal);
          if (state.paused) {
            await new Promise((resume) => {
              state.resumeQueue.add(resume);
            });
          }
          return result2;
        })();
      };
      let result;
      if (globals.skipAnimation) {
        stopAsync(state);
        return getFinishedResult(target, false);
      }
      try {
        let animating;
        if (is.arr(to2)) {
          animating = (async (queue) => {
            for (const props2 of queue) {
              await animate(props2);
            }
          })(to2);
        } else {
          animating = Promise.resolve(to2(animate, target.stop.bind(target)));
        }
        await Promise.all([animating.then(preventBail), bailPromise]);
        result = getFinishedResult(target.get(), true, false);
      } catch (err) {
        if (err instanceof BailSignal) {
          result = err.result;
        } else if (err instanceof SkipAniamtionSignal) {
          result = err.result;
        } else {
          throw err;
        }
      } finally {
        if (callId == state.asyncId) {
          state.asyncId = parentId;
          state.asyncTo = parentId ? prevTo : void 0;
          state.promise = parentId ? prevPromise : void 0;
        }
      }
      if (is.fun(onRest)) {
        raf.batchedUpdates(() => {
          onRest(result, target, target.item);
        });
      }
      return result;
    })();
  }
  function stopAsync(state, cancelId) {
    flush(state.timeouts, (t3) => t3.cancel());
    state.pauseQueue.clear();
    state.resumeQueue.clear();
    state.asyncId = state.asyncTo = state.promise = void 0;
    if (cancelId) state.cancelId = cancelId;
  }
  var BailSignal = class extends Error {
    constructor() {
      super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.");
      this.result = void 0;
    }
  };
  var SkipAniamtionSignal = class extends Error {
    constructor() {
      super("SkipAnimationSignal");
      this.result = void 0;
    }
  };
  var isFrameValue = (value) => value instanceof FrameValue;
  var nextId$1 = 1;
  var FrameValue = class extends FluidValue {
    constructor(...args) {
      super(...args);
      this.id = nextId$1++;
      this.key = void 0;
      this._priority = 0;
    }
    get priority() {
      return this._priority;
    }
    set priority(priority2) {
      if (this._priority != priority2) {
        this._priority = priority2;
        this._onPriorityChange(priority2);
      }
    }
    get() {
      const node = getAnimated(this);
      return node && node.getValue();
    }
    to(...args) {
      return globals.to(this, args);
    }
    interpolate(...args) {
      deprecateInterpolate();
      return globals.to(this, args);
    }
    toJSON() {
      return this.get();
    }
    observerAdded(count) {
      if (count == 1) this._attach();
    }
    observerRemoved(count) {
      if (count == 0) this._detach();
    }
    _attach() {
    }
    _detach() {
    }
    _onChange(value, idle = false) {
      callFluidObservers(this, {
        type: "change",
        parent: this,
        value,
        idle
      });
    }
    _onPriorityChange(priority2) {
      if (!this.idle) {
        frameLoop.sort(this);
      }
      callFluidObservers(this, {
        type: "priority",
        parent: this,
        priority: priority2
      });
    }
  };
  var $P = /* @__PURE__ */ Symbol.for("SpringPhase");
  var HAS_ANIMATED = 1;
  var IS_ANIMATING = 2;
  var IS_PAUSED = 4;
  var hasAnimated = (target) => (target[$P] & HAS_ANIMATED) > 0;
  var isAnimating = (target) => (target[$P] & IS_ANIMATING) > 0;
  var isPaused = (target) => (target[$P] & IS_PAUSED) > 0;
  var setActiveBit = (target, active) => active ? target[$P] |= IS_ANIMATING | HAS_ANIMATED : target[$P] &= ~IS_ANIMATING;
  var setPausedBit = (target, paused) => paused ? target[$P] |= IS_PAUSED : target[$P] &= ~IS_PAUSED;
  var SpringValue = class extends FrameValue {
    constructor(arg1, arg2) {
      super();
      this.key = void 0;
      this.animation = new Animation();
      this.queue = void 0;
      this.defaultProps = {};
      this._state = {
        paused: false,
        delayed: false,
        pauseQueue: /* @__PURE__ */ new Set(),
        resumeQueue: /* @__PURE__ */ new Set(),
        timeouts: /* @__PURE__ */ new Set()
      };
      this._pendingCalls = /* @__PURE__ */ new Set();
      this._lastCallId = 0;
      this._lastToId = 0;
      this._memoizedDuration = 0;
      if (!is.und(arg1) || !is.und(arg2)) {
        const props = is.obj(arg1) ? _extends3({}, arg1) : _extends3({}, arg2, {
          from: arg1
        });
        if (is.und(props.default)) {
          props.default = true;
        }
        this.start(props);
      }
    }
    get idle() {
      return !(isAnimating(this) || this._state.asyncTo) || isPaused(this);
    }
    get goal() {
      return getFluidValue(this.animation.to);
    }
    get velocity() {
      const node = getAnimated(this);
      return node instanceof AnimatedValue ? node.lastVelocity || 0 : node.getPayload().map((node2) => node2.lastVelocity || 0);
    }
    get hasAnimated() {
      return hasAnimated(this);
    }
    get isAnimating() {
      return isAnimating(this);
    }
    get isPaused() {
      return isPaused(this);
    }
    get isDelayed() {
      return this._state.delayed;
    }
    advance(dt) {
      let idle = true;
      let changed = false;
      const anim = this.animation;
      let {
        config: config2,
        toValues
      } = anim;
      const payload = getPayload(anim.to);
      if (!payload && hasFluidValue(anim.to)) {
        toValues = toArray(getFluidValue(anim.to));
      }
      anim.values.forEach((node2, i2) => {
        if (node2.done) return;
        const to2 = node2.constructor == AnimatedString ? 1 : payload ? payload[i2].lastPosition : toValues[i2];
        let finished = anim.immediate;
        let position = to2;
        if (!finished) {
          position = node2.lastPosition;
          if (config2.tension <= 0) {
            node2.done = true;
            return;
          }
          let elapsed = node2.elapsedTime += dt;
          const from = anim.fromValues[i2];
          const v0 = node2.v0 != null ? node2.v0 : node2.v0 = is.arr(config2.velocity) ? config2.velocity[i2] : config2.velocity;
          let velocity;
          const precision = config2.precision || (from == to2 ? 5e-3 : Math.min(1, Math.abs(to2 - from) * 1e-3));
          if (!is.und(config2.duration)) {
            let p3 = 1;
            if (config2.duration > 0) {
              if (this._memoizedDuration !== config2.duration) {
                this._memoizedDuration = config2.duration;
                if (node2.durationProgress > 0) {
                  node2.elapsedTime = config2.duration * node2.durationProgress;
                  elapsed = node2.elapsedTime += dt;
                }
              }
              p3 = (config2.progress || 0) + elapsed / this._memoizedDuration;
              p3 = p3 > 1 ? 1 : p3 < 0 ? 0 : p3;
              node2.durationProgress = p3;
            }
            position = from + config2.easing(p3) * (to2 - from);
            velocity = (position - node2.lastPosition) / dt;
            finished = p3 == 1;
          } else if (config2.decay) {
            const decay = config2.decay === true ? 0.998 : config2.decay;
            const e2 = Math.exp(-(1 - decay) * elapsed);
            position = from + v0 / (1 - decay) * (1 - e2);
            finished = Math.abs(node2.lastPosition - position) <= precision;
            velocity = v0 * e2;
          } else {
            velocity = node2.lastVelocity == null ? v0 : node2.lastVelocity;
            const restVelocity = config2.restVelocity || precision / 10;
            const bounceFactor = config2.clamp ? 0 : config2.bounce;
            const canBounce = !is.und(bounceFactor);
            const isGrowing = from == to2 ? node2.v0 > 0 : from < to2;
            let isMoving;
            let isBouncing = false;
            const step = 1;
            const numSteps = Math.ceil(dt / step);
            for (let n2 = 0; n2 < numSteps; ++n2) {
              isMoving = Math.abs(velocity) > restVelocity;
              if (!isMoving) {
                finished = Math.abs(to2 - position) <= precision;
                if (finished) {
                  break;
                }
              }
              if (canBounce) {
                isBouncing = position == to2 || position > to2 == isGrowing;
                if (isBouncing) {
                  velocity = -velocity * bounceFactor;
                  position = to2;
                }
              }
              const springForce = -config2.tension * 1e-6 * (position - to2);
              const dampingForce = -config2.friction * 1e-3 * velocity;
              const acceleration = (springForce + dampingForce) / config2.mass;
              velocity = velocity + acceleration * step;
              position = position + velocity * step;
            }
          }
          node2.lastVelocity = velocity;
          if (Number.isNaN(position)) {
            console.warn(`Got NaN while animating:`, this);
            finished = true;
          }
        }
        if (payload && !payload[i2].done) {
          finished = false;
        }
        if (finished) {
          node2.done = true;
        } else {
          idle = false;
        }
        if (node2.setValue(position, config2.round)) {
          changed = true;
        }
      });
      const node = getAnimated(this);
      const currVal = node.getValue();
      if (idle) {
        const finalVal = getFluidValue(anim.to);
        if ((currVal !== finalVal || changed) && !config2.decay) {
          node.setValue(finalVal);
          this._onChange(finalVal);
        } else if (changed && config2.decay) {
          this._onChange(currVal);
        }
        this._stop();
      } else if (changed) {
        this._onChange(currVal);
      }
    }
    set(value) {
      raf.batchedUpdates(() => {
        this._stop();
        this._focus(value);
        this._set(value);
      });
      return this;
    }
    pause() {
      this._update({
        pause: true
      });
    }
    resume() {
      this._update({
        pause: false
      });
    }
    finish() {
      if (isAnimating(this)) {
        const {
          to: to2,
          config: config2
        } = this.animation;
        raf.batchedUpdates(() => {
          this._onStart();
          if (!config2.decay) {
            this._set(to2, false);
          }
          this._stop();
        });
      }
      return this;
    }
    update(props) {
      const queue = this.queue || (this.queue = []);
      queue.push(props);
      return this;
    }
    start(to2, arg2) {
      let queue;
      if (!is.und(to2)) {
        queue = [is.obj(to2) ? to2 : _extends3({}, arg2, {
          to: to2
        })];
      } else {
        queue = this.queue || [];
        this.queue = [];
      }
      return Promise.all(queue.map((props) => {
        const up = this._update(props);
        return up;
      })).then((results) => getCombinedResult(this, results));
    }
    stop(cancel) {
      const {
        to: to2
      } = this.animation;
      this._focus(this.get());
      stopAsync(this._state, cancel && this._lastCallId);
      raf.batchedUpdates(() => this._stop(to2, cancel));
      return this;
    }
    reset() {
      this._update({
        reset: true
      });
    }
    eventObserved(event) {
      if (event.type == "change") {
        this._start();
      } else if (event.type == "priority") {
        this.priority = event.priority + 1;
      }
    }
    _prepareNode(props) {
      const key = this.key || "";
      let {
        to: to2,
        from
      } = props;
      to2 = is.obj(to2) ? to2[key] : to2;
      if (to2 == null || isAsyncTo(to2)) {
        to2 = void 0;
      }
      from = is.obj(from) ? from[key] : from;
      if (from == null) {
        from = void 0;
      }
      const range = {
        to: to2,
        from
      };
      if (!hasAnimated(this)) {
        if (props.reverse) [to2, from] = [from, to2];
        from = getFluidValue(from);
        if (!is.und(from)) {
          this._set(from);
        } else if (!getAnimated(this)) {
          this._set(to2);
        }
      }
      return range;
    }
    _update(_ref, isLoop) {
      let props = _extends3({}, _ref);
      const {
        key,
        defaultProps
      } = this;
      if (props.default) Object.assign(defaultProps, getDefaultProps(props, (value, prop) => /^on/.test(prop) ? resolveProp(value, key) : value));
      mergeActiveFn(this, props, "onProps");
      sendEvent(this, "onProps", props, this);
      const range = this._prepareNode(props);
      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?");
      }
      const state = this._state;
      return scheduleProps(++this._lastCallId, {
        key,
        props,
        defaultProps,
        state,
        actions: {
          pause: () => {
            if (!isPaused(this)) {
              setPausedBit(this, true);
              flushCalls(state.pauseQueue);
              sendEvent(this, "onPause", getFinishedResult(this, checkFinished(this, this.animation.to)), this);
            }
          },
          resume: () => {
            if (isPaused(this)) {
              setPausedBit(this, false);
              if (isAnimating(this)) {
                this._resume();
              }
              flushCalls(state.resumeQueue);
              sendEvent(this, "onResume", getFinishedResult(this, checkFinished(this, this.animation.to)), this);
            }
          },
          start: this._merge.bind(this, range)
        }
      }).then((result) => {
        if (props.loop && result.finished && !(isLoop && result.noop)) {
          const nextProps = createLoopUpdate(props);
          if (nextProps) {
            return this._update(nextProps, true);
          }
        }
        return result;
      });
    }
    _merge(range, props, resolve) {
      if (props.cancel) {
        this.stop(true);
        return resolve(getCancelledResult(this));
      }
      const hasToProp = !is.und(range.to);
      const hasFromProp = !is.und(range.from);
      if (hasToProp || hasFromProp) {
        if (props.callId > this._lastToId) {
          this._lastToId = props.callId;
        } else {
          return resolve(getCancelledResult(this));
        }
      }
      const {
        key,
        defaultProps,
        animation: anim
      } = this;
      const {
        to: prevTo,
        from: prevFrom
      } = anim;
      let {
        to: to2 = prevTo,
        from = prevFrom
      } = range;
      if (hasFromProp && !hasToProp && (!props.default || is.und(to2))) {
        to2 = from;
      }
      if (props.reverse) [to2, from] = [from, to2];
      const hasFromChanged = !isEqual(from, prevFrom);
      if (hasFromChanged) {
        anim.from = from;
      }
      from = getFluidValue(from);
      const hasToChanged = !isEqual(to2, prevTo);
      if (hasToChanged) {
        this._focus(to2);
      }
      const hasAsyncTo = isAsyncTo(props.to);
      const {
        config: config2
      } = anim;
      const {
        decay,
        velocity
      } = config2;
      if (hasToProp || hasFromProp) {
        config2.velocity = 0;
      }
      if (props.config && !hasAsyncTo) {
        mergeConfig(config2, callProp(props.config, key), props.config !== defaultProps.config ? callProp(defaultProps.config, key) : void 0);
      }
      let node = getAnimated(this);
      if (!node || is.und(to2)) {
        return resolve(getFinishedResult(this, true));
      }
      const reset = is.und(props.reset) ? hasFromProp && !props.default : !is.und(from) && matchProp(props.reset, key);
      const value = reset ? from : this.get();
      const goal = computeGoal(to2);
      const isAnimatable = is.num(goal) || is.arr(goal) || isAnimatedString(goal);
      const immediate = !hasAsyncTo && (!isAnimatable || matchProp(defaultProps.immediate || props.immediate, key));
      if (hasToChanged) {
        const nodeType = getAnimatedType(to2);
        if (nodeType !== node.constructor) {
          if (immediate) {
            node = this._set(goal);
          } else throw Error(`Cannot animate between ${node.constructor.name} and ${nodeType.name}, as the "to" prop suggests`);
        }
      }
      const goalType = node.constructor;
      let started = hasFluidValue(to2);
      let finished = false;
      if (!started) {
        const hasValueChanged = reset || !hasAnimated(this) && hasFromChanged;
        if (hasToChanged || hasValueChanged) {
          finished = isEqual(computeGoal(value), goal);
          started = !finished;
        }
        if (!isEqual(anim.immediate, immediate) && !immediate || !isEqual(config2.decay, decay) || !isEqual(config2.velocity, velocity)) {
          started = true;
        }
      }
      if (finished && isAnimating(this)) {
        if (anim.changed && !reset) {
          started = true;
        } else if (!started) {
          this._stop(prevTo);
        }
      }
      if (!hasAsyncTo) {
        if (started || hasFluidValue(prevTo)) {
          anim.values = node.getPayload();
          anim.toValues = hasFluidValue(to2) ? null : goalType == AnimatedString ? [1] : toArray(goal);
        }
        if (anim.immediate != immediate) {
          anim.immediate = immediate;
          if (!immediate && !reset) {
            this._set(prevTo);
          }
        }
        if (started) {
          const {
            onRest
          } = anim;
          each(ACTIVE_EVENTS, (type) => mergeActiveFn(this, props, type));
          const result = getFinishedResult(this, checkFinished(this, prevTo));
          flushCalls(this._pendingCalls, result);
          this._pendingCalls.add(resolve);
          if (anim.changed) raf.batchedUpdates(() => {
            anim.changed = !reset;
            onRest == null ? void 0 : onRest(result, this);
            if (reset) {
              callProp(defaultProps.onRest, result);
            } else {
              anim.onStart == null ? void 0 : anim.onStart(result, this);
            }
          });
        }
      }
      if (reset) {
        this._set(value);
      }
      if (hasAsyncTo) {
        resolve(runAsync(props.to, props, this._state, this));
      } else if (started) {
        this._start();
      } else if (isAnimating(this) && !hasToChanged) {
        this._pendingCalls.add(resolve);
      } else {
        resolve(getNoopResult(value));
      }
    }
    _focus(value) {
      const anim = this.animation;
      if (value !== anim.to) {
        if (getFluidObservers(this)) {
          this._detach();
        }
        anim.to = value;
        if (getFluidObservers(this)) {
          this._attach();
        }
      }
    }
    _attach() {
      let priority2 = 0;
      const {
        to: to2
      } = this.animation;
      if (hasFluidValue(to2)) {
        addFluidObserver(to2, this);
        if (isFrameValue(to2)) {
          priority2 = to2.priority + 1;
        }
      }
      this.priority = priority2;
    }
    _detach() {
      const {
        to: to2
      } = this.animation;
      if (hasFluidValue(to2)) {
        removeFluidObserver(to2, this);
      }
    }
    _set(arg, idle = true) {
      const value = getFluidValue(arg);
      if (!is.und(value)) {
        const oldNode = getAnimated(this);
        if (!oldNode || !isEqual(value, oldNode.getValue())) {
          const nodeType = getAnimatedType(value);
          if (!oldNode || oldNode.constructor != nodeType) {
            setAnimated(this, nodeType.create(value));
          } else {
            oldNode.setValue(value);
          }
          if (oldNode) {
            raf.batchedUpdates(() => {
              this._onChange(value, idle);
            });
          }
        }
      }
      return getAnimated(this);
    }
    _onStart() {
      const anim = this.animation;
      if (!anim.changed) {
        anim.changed = true;
        sendEvent(this, "onStart", getFinishedResult(this, checkFinished(this, anim.to)), this);
      }
    }
    _onChange(value, idle) {
      if (!idle) {
        this._onStart();
        callProp(this.animation.onChange, value, this);
      }
      callProp(this.defaultProps.onChange, value, this);
      super._onChange(value, idle);
    }
    _start() {
      const anim = this.animation;
      getAnimated(this).reset(getFluidValue(anim.to));
      if (!anim.immediate) {
        anim.fromValues = anim.values.map((node) => node.lastPosition);
      }
      if (!isAnimating(this)) {
        setActiveBit(this, true);
        if (!isPaused(this)) {
          this._resume();
        }
      }
    }
    _resume() {
      if (globals.skipAnimation) {
        this.finish();
      } else {
        frameLoop.start(this);
      }
    }
    _stop(goal, cancel) {
      if (isAnimating(this)) {
        setActiveBit(this, false);
        const anim = this.animation;
        each(anim.values, (node) => {
          node.done = true;
        });
        if (anim.toValues) {
          anim.onChange = anim.onPause = anim.onResume = void 0;
        }
        callFluidObservers(this, {
          type: "idle",
          parent: this
        });
        const result = cancel ? getCancelledResult(this.get()) : getFinishedResult(this.get(), checkFinished(this, goal != null ? goal : anim.to));
        flushCalls(this._pendingCalls, result);
        if (anim.changed) {
          anim.changed = false;
          sendEvent(this, "onRest", result, this);
        }
      }
    }
  };
  function checkFinished(target, to2) {
    const goal = computeGoal(to2);
    const value = computeGoal(target.get());
    return isEqual(value, goal);
  }
  function createLoopUpdate(props, loop2 = props.loop, to2 = props.to) {
    let loopRet = callProp(loop2);
    if (loopRet) {
      const overrides = loopRet !== true && inferTo(loopRet);
      const reverse = (overrides || props).reverse;
      const reset = !overrides || overrides.reset;
      return createUpdate(_extends3({}, props, {
        loop: loop2,
        default: false,
        pause: void 0,
        to: !reverse || isAsyncTo(to2) ? to2 : void 0,
        from: reset ? props.from : void 0,
        reset
      }, overrides));
    }
  }
  function createUpdate(props) {
    const {
      to: to2,
      from
    } = props = inferTo(props);
    const keys = /* @__PURE__ */ new Set();
    if (is.obj(to2)) findDefined(to2, keys);
    if (is.obj(from)) findDefined(from, keys);
    props.keys = keys.size ? Array.from(keys) : null;
    return props;
  }
  function findDefined(values, keys) {
    eachProp(values, (value, key) => value != null && keys.add(key));
  }
  var ACTIVE_EVENTS = ["onStart", "onRest", "onChange", "onPause", "onResume"];
  function mergeActiveFn(target, props, type) {
    target.animation[type] = props[type] !== getDefaultProp(props, type) ? resolveProp(props[type], target.key) : void 0;
  }
  function sendEvent(target, type, ...args) {
    var _target$animation$typ, _target$animation, _target$defaultProps$, _target$defaultProps;
    (_target$animation$typ = (_target$animation = target.animation)[type]) == null ? void 0 : _target$animation$typ.call(_target$animation, ...args);
    (_target$defaultProps$ = (_target$defaultProps = target.defaultProps)[type]) == null ? void 0 : _target$defaultProps$.call(_target$defaultProps, ...args);
  }
  var BATCHED_EVENTS = ["onStart", "onChange", "onRest"];
  var nextId = 1;
  var Controller = class {
    constructor(props, flush2) {
      this.id = nextId++;
      this.springs = {};
      this.queue = [];
      this.ref = void 0;
      this._flush = void 0;
      this._initialProps = void 0;
      this._lastAsyncId = 0;
      this._active = /* @__PURE__ */ new Set();
      this._changed = /* @__PURE__ */ new Set();
      this._started = false;
      this._item = void 0;
      this._state = {
        paused: false,
        pauseQueue: /* @__PURE__ */ new Set(),
        resumeQueue: /* @__PURE__ */ new Set(),
        timeouts: /* @__PURE__ */ new Set()
      };
      this._events = {
        onStart: /* @__PURE__ */ new Map(),
        onChange: /* @__PURE__ */ new Map(),
        onRest: /* @__PURE__ */ new Map()
      };
      this._onFrame = this._onFrame.bind(this);
      if (flush2) {
        this._flush = flush2;
      }
      if (props) {
        this.start(_extends3({
          default: true
        }, props));
      }
    }
    get idle() {
      return !this._state.asyncTo && Object.values(this.springs).every((spring) => {
        return spring.idle && !spring.isDelayed && !spring.isPaused;
      });
    }
    get item() {
      return this._item;
    }
    set item(item) {
      this._item = item;
    }
    get() {
      const values = {};
      this.each((spring, key) => values[key] = spring.get());
      return values;
    }
    set(values) {
      for (const key in values) {
        const value = values[key];
        if (!is.und(value)) {
          this.springs[key].set(value);
        }
      }
    }
    update(props) {
      if (props) {
        this.queue.push(createUpdate(props));
      }
      return this;
    }
    start(props) {
      let {
        queue
      } = this;
      if (props) {
        queue = toArray(props).map(createUpdate);
      } else {
        this.queue = [];
      }
      if (this._flush) {
        return this._flush(this, queue);
      }
      prepareKeys(this, queue);
      return flushUpdateQueue(this, queue);
    }
    stop(arg, keys) {
      if (arg !== !!arg) {
        keys = arg;
      }
      if (keys) {
        const springs = this.springs;
        each(toArray(keys), (key) => springs[key].stop(!!arg));
      } else {
        stopAsync(this._state, this._lastAsyncId);
        this.each((spring) => spring.stop(!!arg));
      }
      return this;
    }
    pause(keys) {
      if (is.und(keys)) {
        this.start({
          pause: true
        });
      } else {
        const springs = this.springs;
        each(toArray(keys), (key) => springs[key].pause());
      }
      return this;
    }
    resume(keys) {
      if (is.und(keys)) {
        this.start({
          pause: false
        });
      } else {
        const springs = this.springs;
        each(toArray(keys), (key) => springs[key].resume());
      }
      return this;
    }
    each(iterator) {
      eachProp(this.springs, iterator);
    }
    _onFrame() {
      const {
        onStart,
        onChange,
        onRest
      } = this._events;
      const active = this._active.size > 0;
      const changed = this._changed.size > 0;
      if (active && !this._started || changed && !this._started) {
        this._started = true;
        flush(onStart, ([onStart2, result]) => {
          result.value = this.get();
          onStart2(result, this, this._item);
        });
      }
      const idle = !active && this._started;
      const values = changed || idle && onRest.size ? this.get() : null;
      if (changed && onChange.size) {
        flush(onChange, ([onChange2, result]) => {
          result.value = values;
          onChange2(result, this, this._item);
        });
      }
      if (idle) {
        this._started = false;
        flush(onRest, ([onRest2, result]) => {
          result.value = values;
          onRest2(result, this, this._item);
        });
      }
    }
    eventObserved(event) {
      if (event.type == "change") {
        this._changed.add(event.parent);
        if (!event.idle) {
          this._active.add(event.parent);
        }
      } else if (event.type == "idle") {
        this._active.delete(event.parent);
      } else return;
      raf.onFrame(this._onFrame);
    }
  };
  function flushUpdateQueue(ctrl, queue) {
    return Promise.all(queue.map((props) => flushUpdate(ctrl, props))).then((results) => getCombinedResult(ctrl, results));
  }
  async function flushUpdate(ctrl, props, isLoop) {
    const {
      keys,
      to: to2,
      from,
      loop: loop2,
      onRest,
      onResolve
    } = props;
    const defaults2 = is.obj(props.default) && props.default;
    if (loop2) {
      props.loop = false;
    }
    if (to2 === false) props.to = null;
    if (from === false) props.from = null;
    const asyncTo = is.arr(to2) || is.fun(to2) ? to2 : void 0;
    if (asyncTo) {
      props.to = void 0;
      props.onRest = void 0;
      if (defaults2) {
        defaults2.onRest = void 0;
      }
    } else {
      each(BATCHED_EVENTS, (key) => {
        const handler = props[key];
        if (is.fun(handler)) {
          const queue = ctrl["_events"][key];
          props[key] = ({
            finished,
            cancelled
          }) => {
            const result2 = queue.get(handler);
            if (result2) {
              if (!finished) result2.finished = false;
              if (cancelled) result2.cancelled = true;
            } else {
              queue.set(handler, {
                value: null,
                finished: finished || false,
                cancelled: cancelled || false
              });
            }
          };
          if (defaults2) {
            defaults2[key] = props[key];
          }
        }
      });
    }
    const state = ctrl["_state"];
    if (props.pause === !state.paused) {
      state.paused = props.pause;
      flushCalls(props.pause ? state.pauseQueue : state.resumeQueue);
    } else if (state.paused) {
      props.pause = true;
    }
    const promises = (keys || Object.keys(ctrl.springs)).map((key) => ctrl.springs[key].start(props));
    const cancel = props.cancel === true || getDefaultProp(props, "cancel") === true;
    if (asyncTo || cancel && state.asyncId) {
      promises.push(scheduleProps(++ctrl["_lastAsyncId"], {
        props,
        state,
        actions: {
          pause: noop,
          resume: noop,
          start(props2, resolve) {
            if (cancel) {
              stopAsync(state, ctrl["_lastAsyncId"]);
              resolve(getCancelledResult(ctrl));
            } else {
              props2.onRest = onRest;
              resolve(runAsync(asyncTo, props2, state, ctrl));
            }
          }
        }
      }));
    }
    if (state.paused) {
      await new Promise((resume) => {
        state.resumeQueue.add(resume);
      });
    }
    const result = getCombinedResult(ctrl, await Promise.all(promises));
    if (loop2 && result.finished && !(isLoop && result.noop)) {
      const nextProps = createLoopUpdate(props, loop2, to2);
      if (nextProps) {
        prepareKeys(ctrl, [nextProps]);
        return flushUpdate(ctrl, nextProps, true);
      }
    }
    if (onResolve) {
      raf.batchedUpdates(() => onResolve(result, ctrl, ctrl.item));
    }
    return result;
  }
  function createSpring(key, observer) {
    const spring = new SpringValue();
    spring.key = key;
    if (observer) {
      addFluidObserver(spring, observer);
    }
    return spring;
  }
  function prepareSprings(springs, props, create) {
    if (props.keys) {
      each(props.keys, (key) => {
        const spring = springs[key] || (springs[key] = create(key));
        spring["_prepareNode"](props);
      });
    }
  }
  function prepareKeys(ctrl, queue) {
    each(queue, (props) => {
      prepareSprings(ctrl.springs, props, (key) => {
        return createSpring(key, ctrl);
      });
    });
  }
  function _objectWithoutPropertiesLoose(source, excluded) {
    if (source == null) return {};
    var target = {};
    var sourceKeys = Object.keys(source);
    var key, i2;
    for (i2 = 0; i2 < sourceKeys.length; i2++) {
      key = sourceKeys[i2];
      if (excluded.indexOf(key) >= 0) continue;
      target[key] = source[key];
    }
    return target;
  }
  var _excluded$3 = ["children"];
  var SpringContext = (_ref) => {
    let {
      children
    } = _ref, props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
    const inherited = (0, import_react6.useContext)(ctx);
    const pause = props.pause || !!inherited.pause, immediate = props.immediate || !!inherited.immediate;
    props = useMemoOne(() => ({
      pause,
      immediate
    }), [pause, immediate]);
    const {
      Provider
    } = ctx;
    return React6.createElement(Provider, {
      value: props
    }, children);
  };
  var ctx = makeContext(SpringContext, {});
  SpringContext.Provider = ctx.Provider;
  SpringContext.Consumer = ctx.Consumer;
  function makeContext(target, init2) {
    Object.assign(target, React6.createContext(init2));
    target.Provider._context = target;
    target.Consumer._context = target;
    return target;
  }
  var TransitionPhase;
  (function(TransitionPhase2) {
    TransitionPhase2["MOUNT"] = "mount";
    TransitionPhase2["ENTER"] = "enter";
    TransitionPhase2["UPDATE"] = "update";
    TransitionPhase2["LEAVE"] = "leave";
  })(TransitionPhase || (TransitionPhase = {}));
  var Interpolation = class extends FrameValue {
    constructor(source, args) {
      super();
      this.key = void 0;
      this.idle = true;
      this.calc = void 0;
      this._active = /* @__PURE__ */ new Set();
      this.source = source;
      this.calc = createInterpolator(...args);
      const value = this._get();
      const nodeType = getAnimatedType(value);
      setAnimated(this, nodeType.create(value));
    }
    advance(_dt) {
      const value = this._get();
      const oldValue = this.get();
      if (!isEqual(value, oldValue)) {
        getAnimated(this).setValue(value);
        this._onChange(value, this.idle);
      }
      if (!this.idle && checkIdle(this._active)) {
        becomeIdle(this);
      }
    }
    _get() {
      const inputs = is.arr(this.source) ? this.source.map(getFluidValue) : toArray(getFluidValue(this.source));
      return this.calc(...inputs);
    }
    _start() {
      if (this.idle && !checkIdle(this._active)) {
        this.idle = false;
        each(getPayload(this), (node) => {
          node.done = false;
        });
        if (globals.skipAnimation) {
          raf.batchedUpdates(() => this.advance());
          becomeIdle(this);
        } else {
          frameLoop.start(this);
        }
      }
    }
    _attach() {
      let priority2 = 1;
      each(toArray(this.source), (source) => {
        if (hasFluidValue(source)) {
          addFluidObserver(source, this);
        }
        if (isFrameValue(source)) {
          if (!source.idle) {
            this._active.add(source);
          }
          priority2 = Math.max(priority2, source.priority + 1);
        }
      });
      this.priority = priority2;
      this._start();
    }
    _detach() {
      each(toArray(this.source), (source) => {
        if (hasFluidValue(source)) {
          removeFluidObserver(source, this);
        }
      });
      this._active.clear();
      becomeIdle(this);
    }
    eventObserved(event) {
      if (event.type == "change") {
        if (event.idle) {
          this.advance();
        } else {
          this._active.add(event.parent);
          this._start();
        }
      } else if (event.type == "idle") {
        this._active.delete(event.parent);
      } else if (event.type == "priority") {
        this.priority = toArray(this.source).reduce((highest, parent) => Math.max(highest, (isFrameValue(parent) ? parent.priority : 0) + 1), 0);
      }
    }
  };
  function isIdle(source) {
    return source.idle !== false;
  }
  function checkIdle(active) {
    return !active.size || Array.from(active).every(isIdle);
  }
  function becomeIdle(self2) {
    if (!self2.idle) {
      self2.idle = true;
      each(getPayload(self2), (node) => {
        node.done = true;
      });
      callFluidObservers(self2, {
        type: "idle",
        parent: self2
      });
    }
  }
  globals.assign({
    createStringInterpolator,
    to: (source, args) => new Interpolation(source, args)
  });
  var update3 = frameLoop.advance;

  // node_modules/@react-spring/web/dist/react-spring-web.esm.js
  var import_react_dom = __toESM(require_react_dom());
  function _objectWithoutPropertiesLoose2(source, excluded) {
    if (source == null) return {};
    var target = {};
    var sourceKeys = Object.keys(source);
    var key, i2;
    for (i2 = 0; i2 < sourceKeys.length; i2++) {
      key = sourceKeys[i2];
      if (excluded.indexOf(key) >= 0) continue;
      target[key] = source[key];
    }
    return target;
  }
  var _excluded$2 = ["style", "children", "scrollTop", "scrollLeft"];
  var isCustomPropRE = /^--/;
  function dangerousStyleValue(name2, value) {
    if (value == null || typeof value === "boolean" || value === "") return "";
    if (typeof value === "number" && value !== 0 && !isCustomPropRE.test(name2) && !(isUnitlessNumber.hasOwnProperty(name2) && isUnitlessNumber[name2])) return value + "px";
    return ("" + value).trim();
  }
  var attributeCache = {};
  function applyAnimatedValues(instance, props) {
    if (!instance.nodeType || !instance.setAttribute) {
      return false;
    }
    const isFilterElement = instance.nodeName === "filter" || instance.parentNode && instance.parentNode.nodeName === "filter";
    const _ref = props, {
      style,
      children,
      scrollTop,
      scrollLeft
    } = _ref, attributes = _objectWithoutPropertiesLoose2(_ref, _excluded$2);
    const values = Object.values(attributes);
    const names = Object.keys(attributes).map((name2) => isFilterElement || instance.hasAttribute(name2) ? name2 : attributeCache[name2] || (attributeCache[name2] = name2.replace(/([A-Z])/g, (n2) => "-" + n2.toLowerCase())));
    if (children !== void 0) {
      instance.textContent = children;
    }
    for (let name2 in style) {
      if (style.hasOwnProperty(name2)) {
        const value = dangerousStyleValue(name2, style[name2]);
        if (isCustomPropRE.test(name2)) {
          instance.style.setProperty(name2, value);
        } else {
          instance.style[name2] = value;
        }
      }
    }
    names.forEach((name2, i2) => {
      instance.setAttribute(name2, values[i2]);
    });
    if (scrollTop !== void 0) {
      instance.scrollTop = scrollTop;
    }
    if (scrollLeft !== void 0) {
      instance.scrollLeft = scrollLeft;
    }
  }
  var isUnitlessNumber = {
    animationIterationCount: true,
    borderImageOutset: true,
    borderImageSlice: true,
    borderImageWidth: true,
    boxFlex: true,
    boxFlexGroup: true,
    boxOrdinalGroup: true,
    columnCount: true,
    columns: true,
    flex: true,
    flexGrow: true,
    flexPositive: true,
    flexShrink: true,
    flexNegative: true,
    flexOrder: true,
    gridRow: true,
    gridRowEnd: true,
    gridRowSpan: true,
    gridRowStart: true,
    gridColumn: true,
    gridColumnEnd: true,
    gridColumnSpan: true,
    gridColumnStart: true,
    fontWeight: true,
    lineClamp: true,
    lineHeight: true,
    opacity: true,
    order: true,
    orphans: true,
    tabSize: true,
    widows: true,
    zIndex: true,
    zoom: true,
    fillOpacity: true,
    floodOpacity: true,
    stopOpacity: true,
    strokeDasharray: true,
    strokeDashoffset: true,
    strokeMiterlimit: true,
    strokeOpacity: true,
    strokeWidth: true
  };
  var prefixKey = (prefix2, key) => prefix2 + key.charAt(0).toUpperCase() + key.substring(1);
  var prefixes = ["Webkit", "Ms", "Moz", "O"];
  isUnitlessNumber = Object.keys(isUnitlessNumber).reduce((acc, prop) => {
    prefixes.forEach((prefix2) => acc[prefixKey(prefix2, prop)] = acc[prop]);
    return acc;
  }, isUnitlessNumber);
  var _excluded$1 = ["x", "y", "z"];
  var domTransforms = /^(matrix|translate|scale|rotate|skew)/;
  var pxTransforms = /^(translate)/;
  var degTransforms = /^(rotate|skew)/;
  var addUnit = (value, unit) => is.num(value) && value !== 0 ? value + unit : value;
  var isValueIdentity = (value, id) => is.arr(value) ? value.every((v2) => isValueIdentity(v2, id)) : is.num(value) ? value === id : parseFloat(value) === id;
  var AnimatedStyle = class extends AnimatedObject {
    constructor(_ref) {
      let {
        x: x2,
        y: y2,
        z
      } = _ref, style = _objectWithoutPropertiesLoose2(_ref, _excluded$1);
      const inputs = [];
      const transforms = [];
      if (x2 || y2 || z) {
        inputs.push([x2 || 0, y2 || 0, z || 0]);
        transforms.push((xyz) => [`translate3d(${xyz.map((v2) => addUnit(v2, "px")).join(",")})`, isValueIdentity(xyz, 0)]);
      }
      eachProp(style, (value, key) => {
        if (key === "transform") {
          inputs.push([value || ""]);
          transforms.push((transform) => [transform, transform === ""]);
        } else if (domTransforms.test(key)) {
          delete style[key];
          if (is.und(value)) return;
          const unit = pxTransforms.test(key) ? "px" : degTransforms.test(key) ? "deg" : "";
          inputs.push(toArray(value));
          transforms.push(key === "rotate3d" ? ([x3, y3, z2, deg]) => [`rotate3d(${x3},${y3},${z2},${addUnit(deg, unit)})`, isValueIdentity(deg, 0)] : (input) => [`${key}(${input.map((v2) => addUnit(v2, unit)).join(",")})`, isValueIdentity(input, key.startsWith("scale") ? 1 : 0)]);
        }
      });
      if (inputs.length) {
        style.transform = new FluidTransform(inputs, transforms);
      }
      super(style);
    }
  };
  var FluidTransform = class extends FluidValue {
    constructor(inputs, transforms) {
      super();
      this._value = null;
      this.inputs = inputs;
      this.transforms = transforms;
    }
    get() {
      return this._value || (this._value = this._get());
    }
    _get() {
      let transform = "";
      let identity2 = true;
      each(this.inputs, (input, i2) => {
        const arg1 = getFluidValue(input[0]);
        const [t3, id] = this.transforms[i2](is.arr(arg1) ? arg1 : input.map(getFluidValue));
        transform += " " + t3;
        identity2 = identity2 && id;
      });
      return identity2 ? "none" : transform;
    }
    observerAdded(count) {
      if (count == 1) each(this.inputs, (input) => each(input, (value) => hasFluidValue(value) && addFluidObserver(value, this)));
    }
    observerRemoved(count) {
      if (count == 0) each(this.inputs, (input) => each(input, (value) => hasFluidValue(value) && removeFluidObserver(value, this)));
    }
    eventObserved(event) {
      if (event.type == "change") {
        this._value = null;
      }
      callFluidObservers(this, event);
    }
  };
  var primitives = ["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"];
  var _excluded = ["scrollTop", "scrollLeft"];
  globals.assign({
    batchedUpdates: import_react_dom.unstable_batchedUpdates,
    createStringInterpolator,
    colors
  });
  var host = createHost(primitives, {
    applyAnimatedValues,
    createAnimatedStyle: (style) => new AnimatedStyle(style),
    getComponentProps: (_ref) => {
      let props = _objectWithoutPropertiesLoose2(_ref, _excluded);
      return props;
    }
  });
  var animated = host.animated;

  // packages/edit-site/build-module/components/layout/animation.mjs
  var import_element11 = __toESM(require_element(), 1);
  function getAbsolutePosition(element) {
    return {
      top: element.offsetTop,
      left: element.offsetLeft
    };
  }
  var ANIMATION_DURATION = 400;
  function useMovingAnimation({ triggerAnimationOnChange }) {
    const ref = (0, import_element11.useRef)();
    const { previous, prevRect } = (0, import_element11.useMemo)(
      () => ({
        previous: ref.current && getAbsolutePosition(ref.current),
        prevRect: ref.current && ref.current.getBoundingClientRect()
      }),
      [triggerAnimationOnChange]
    );
    (0, import_element11.useLayoutEffect)(() => {
      if (!previous || !ref.current) {
        return;
      }
      const disableAnimation = window.matchMedia(
        "(prefers-reduced-motion: reduce)"
      ).matches;
      if (disableAnimation) {
        return;
      }
      const controller = new Controller({
        x: 0,
        y: 0,
        width: prevRect.width,
        height: prevRect.height,
        config: {
          duration: ANIMATION_DURATION,
          easing: easings.easeInOutQuint
        },
        onChange({ value }) {
          if (!ref.current) {
            return;
          }
          let { x: x22, y: y22, width: width2, height: height2 } = value;
          x22 = Math.round(x22);
          y22 = Math.round(y22);
          width2 = Math.round(width2);
          height2 = Math.round(height2);
          const finishedMoving = x22 === 0 && y22 === 0;
          ref.current.style.transformOrigin = "center center";
          ref.current.style.transform = finishedMoving ? null : `translate3d(${x22}px,${y22}px,0)`;
          ref.current.style.width = finishedMoving ? null : `${width2}px`;
          ref.current.style.height = finishedMoving ? null : `${height2}px`;
        }
      });
      ref.current.style.transform = void 0;
      const destination = ref.current.getBoundingClientRect();
      const x2 = Math.round(prevRect.left - destination.left);
      const y2 = Math.round(prevRect.top - destination.top);
      const width = destination.width;
      const height = destination.height;
      controller.start({
        x: 0,
        y: 0,
        width,
        height,
        from: { x: x2, y: y2, width: prevRect.width, height: prevRect.height }
      });
      return () => {
        controller.stop();
        controller.set({
          x: 0,
          y: 0,
          width: prevRect.width,
          height: prevRect.height
        });
      };
    }, [previous, prevRect]);
    return ref;
  }
  var animation_default = useMovingAnimation;

  // packages/edit-site/build-module/components/save-hub/index.mjs
  var import_data10 = __toESM(require_data(), 1);
  var import_components6 = __toESM(require_components(), 1);
  var import_core_data9 = __toESM(require_core_data(), 1);

  // packages/edit-site/build-module/components/save-button/index.mjs
  var import_data9 = __toESM(require_data(), 1);
  var import_components5 = __toESM(require_components(), 1);
  var import_i18n6 = __toESM(require_i18n(), 1);
  var import_core_data8 = __toESM(require_core_data(), 1);
  var import_keycodes2 = __toESM(require_keycodes(), 1);
  var import_router3 = __toESM(require_router(), 1);
  var import_editor4 = __toESM(require_editor(), 1);

  // packages/edit-site/build-module/utils/is-previewing-theme.mjs
  var import_url3 = __toESM(require_url(), 1);
  function isPreviewingTheme() {
    return !!(0, import_url3.getQueryArg)(window.location.href, "wp_theme_preview");
  }
  function currentlyPreviewingTheme() {
    if (isPreviewingTheme()) {
      return (0, import_url3.getQueryArg)(window.location.href, "wp_theme_preview");
    }
    return null;
  }

  // packages/edit-site/build-module/components/save-button/index.mjs
  var import_jsx_runtime74 = __toESM(require_jsx_runtime(), 1);
  var { useLocation: useLocation3 } = unlock(import_router3.privateApis);
  function SaveButton({
    className = "edit-site-save-button__button",
    variant = "primary",
    showTooltip = true,
    showReviewMessage,
    icon,
    size,
    __next40pxDefaultSize = false
  }) {
    const { params } = useLocation3();
    const { setIsSaveViewOpened: setIsSaveViewOpened2 } = (0, import_data9.useDispatch)(store);
    const { saveDirtyEntities } = unlock((0, import_data9.useDispatch)(import_editor4.store));
    const { dirtyEntityRecords } = (0, import_editor4.useEntitiesSavedStatesIsDirty)();
    const { isSaving, isSaveViewOpen, previewingThemeName } = (0, import_data9.useSelect)(
      (select3) => {
        const { isSavingEntityRecord, isResolving } = select3(import_core_data8.store);
        const { isSaveViewOpened: isSaveViewOpened2 } = select3(store);
        const isActivatingTheme = isResolving("activateTheme");
        const currentlyPreviewingThemeId = currentlyPreviewingTheme();
        return {
          isSaving: dirtyEntityRecords.some(
            (record) => isSavingEntityRecord(
              record.kind,
              record.name,
              record.key
            )
          ) || isActivatingTheme,
          isSaveViewOpen: isSaveViewOpened2(),
          // Do not call `getTheme` with null, it will cause a request to
          // the server.
          previewingThemeName: currentlyPreviewingThemeId ? select3(import_core_data8.store).getTheme(currentlyPreviewingThemeId)?.name?.rendered : void 0
        };
      },
      [dirtyEntityRecords]
    );
    const hasDirtyEntities = !!dirtyEntityRecords.length;
    let isOnlyCurrentEntityDirty;
    if (dirtyEntityRecords.length === 1) {
      if (params.postId) {
        isOnlyCurrentEntityDirty = `${dirtyEntityRecords[0].key}` === params.postId && dirtyEntityRecords[0].name === params.postType;
      } else if (params.path?.includes("wp_global_styles")) {
        isOnlyCurrentEntityDirty = dirtyEntityRecords[0].name === "globalStyles";
      }
    }
    const disabled = isSaving || !hasDirtyEntities && !isPreviewingTheme();
    const getLabel = () => {
      if (isPreviewingTheme()) {
        if (isSaving) {
          return (0, import_i18n6.sprintf)(
            /* translators: %s: The name of theme to be activated. */
            (0, import_i18n6.__)("Activating %s"),
            previewingThemeName
          );
        } else if (disabled) {
          return (0, import_i18n6.__)("Saved");
        } else if (hasDirtyEntities) {
          return (0, import_i18n6.sprintf)(
            /* translators: %s: The name of theme to be activated. */
            (0, import_i18n6.__)("Activate %s & Save"),
            previewingThemeName
          );
        }
        return (0, import_i18n6.sprintf)(
          /* translators: %s: The name of theme to be activated. */
          (0, import_i18n6.__)("Activate %s"),
          previewingThemeName
        );
      }
      if (isSaving) {
        return (0, import_i18n6.__)("Saving");
      }
      if (disabled) {
        return (0, import_i18n6.__)("Saved");
      }
      if (!isOnlyCurrentEntityDirty && showReviewMessage) {
        return (0, import_i18n6.sprintf)(
          // translators: %d: number of unsaved changes (number).
          (0, import_i18n6._n)(
            "Review %d change\u2026",
            "Review %d changes\u2026",
            dirtyEntityRecords.length
          ),
          dirtyEntityRecords.length
        );
      }
      return (0, import_i18n6.__)("Save");
    };
    const label = getLabel();
    const onClick = isOnlyCurrentEntityDirty ? () => saveDirtyEntities({ dirtyEntityRecords }) : () => setIsSaveViewOpened2(true);
    return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
      import_components5.Button,
      {
        variant,
        className,
        "aria-disabled": disabled,
        "aria-expanded": isSaveViewOpen,
        isBusy: isSaving,
        onClick: disabled ? void 0 : onClick,
        label,
        shortcut: disabled ? void 0 : import_keycodes2.displayShortcut.primary("s"),
        showTooltip,
        icon,
        __next40pxDefaultSize,
        size,
        children: label
      }
    );
  }

  // packages/edit-site/build-module/components/save-hub/index.mjs
  var import_jsx_runtime75 = __toESM(require_jsx_runtime(), 1);
  function SaveHub() {
    const { isDisabled, isSaving } = (0, import_data10.useSelect)((select3) => {
      const { __experimentalGetDirtyEntityRecords, isSavingEntityRecord } = select3(import_core_data9.store);
      const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
      const _isSaving = dirtyEntityRecords.some(
        (record) => isSavingEntityRecord(record.kind, record.name, record.key)
      );
      return {
        isSaving: _isSaving,
        isDisabled: _isSaving || !dirtyEntityRecords.length && !isPreviewingTheme()
      };
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components6.__experimentalHStack, { className: "edit-site-save-hub", alignment: "right", spacing: 4, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
      SaveButton,
      {
        className: "edit-site-save-hub__button",
        variant: isDisabled ? null : "primary",
        showTooltip: false,
        icon: isDisabled && !isSaving ? check_default : null,
        showReviewMessage: true,
        __next40pxDefaultSize: true
      }
    ) });
  }

  // packages/edit-site/build-module/components/save-panel/index.mjs
  var import_components7 = __toESM(require_components(), 1);
  var import_editor5 = __toESM(require_editor(), 1);
  var import_data12 = __toESM(require_data(), 1);
  var import_i18n7 = __toESM(require_i18n(), 1);
  var import_core_data11 = __toESM(require_core_data(), 1);
  var import_router5 = __toESM(require_router(), 1);
  var import_element13 = __toESM(require_element(), 1);

  // packages/edit-site/build-module/utils/use-activate-theme.mjs
  var import_core_data10 = __toESM(require_core_data(), 1);
  var import_data11 = __toESM(require_data(), 1);
  var import_router4 = __toESM(require_router(), 1);
  var import_url4 = __toESM(require_url(), 1);
  var { useHistory: useHistory3, useLocation: useLocation4 } = unlock(import_router4.privateApis);
  function useActivateTheme() {
    const history = useHistory3();
    const { path } = useLocation4();
    const { startResolution, finishResolution } = (0, import_data11.useDispatch)(import_core_data10.store);
    return async () => {
      if (isPreviewingTheme()) {
        const activationURL = "themes.php?action=activate&stylesheet=" + currentlyPreviewingTheme() + "&_wpnonce=" + window.WP_BLOCK_THEME_ACTIVATE_NONCE;
        startResolution("activateTheme");
        await window.fetch(activationURL);
        finishResolution("activateTheme");
        history.navigate((0, import_url4.addQueryArgs)(path, { wp_theme_preview: "" }));
      }
    };
  }

  // packages/edit-site/build-module/utils/use-actual-current-theme.mjs
  var import_api_fetch = __toESM(require_api_fetch(), 1);
  var import_element12 = __toESM(require_element(), 1);
  var import_url5 = __toESM(require_url(), 1);
  var ACTIVE_THEMES_URL = "/wp/v2/themes?status=active";
  function useActualCurrentTheme() {
    const [currentTheme, setCurrentTheme] = (0, import_element12.useState)();
    (0, import_element12.useEffect)(() => {
      const path = (0, import_url5.addQueryArgs)(ACTIVE_THEMES_URL, {
        context: "edit",
        wp_theme_preview: ""
      });
      (0, import_api_fetch.default)({ path }).then((activeThemes) => setCurrentTheme(activeThemes[0])).catch(() => {
      });
    }, []);
    return currentTheme;
  }

  // packages/edit-site/build-module/components/save-panel/index.mjs
  var import_jsx_runtime76 = __toESM(require_jsx_runtime(), 1);
  var { EntitiesSavedStatesExtensible } = unlock(import_editor5.privateApis);
  var { useLocation: useLocation5 } = unlock(import_router5.privateApis);
  var EntitiesSavedStatesForPreview = ({
    onClose,
    renderDialog,
    variant
  }) => {
    const isDirtyProps = (0, import_editor5.useEntitiesSavedStatesIsDirty)();
    let activateSaveLabel, successNoticeContent;
    if (isDirtyProps.isDirty) {
      activateSaveLabel = (0, import_i18n7.__)("Activate & Save");
      successNoticeContent = (0, import_i18n7.__)("Theme activated and site updated.");
    } else {
      activateSaveLabel = (0, import_i18n7.__)("Activate");
      successNoticeContent = (0, import_i18n7.__)("Theme activated.");
    }
    const currentTheme = useActualCurrentTheme();
    const previewingTheme = (0, import_data12.useSelect)(
      (select3) => select3(import_core_data11.store).getCurrentTheme(),
      []
    );
    const additionalPrompt = /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("p", { children: (0, import_i18n7.sprintf)(
      /* translators: 1: The name of active theme, 2: The name of theme to be activated. */
      (0, import_i18n7.__)(
        "Saving your changes will change your active theme from %1$s to %2$s."
      ),
      currentTheme?.name?.rendered ?? "...",
      previewingTheme?.name?.rendered ?? "..."
    ) });
    const activateTheme = useActivateTheme();
    const onSave = async (values) => {
      await activateTheme();
      return values;
    };
    return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
      EntitiesSavedStatesExtensible,
      {
        ...{
          ...isDirtyProps,
          additionalPrompt,
          close: onClose,
          onSave,
          saveEnabled: true,
          saveLabel: activateSaveLabel,
          renderDialog,
          variant,
          successNoticeContent
        }
      }
    );
  };
  var _EntitiesSavedStates = ({ onClose, renderDialog, variant }) => {
    if (isPreviewingTheme()) {
      return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
        EntitiesSavedStatesForPreview,
        {
          onClose,
          renderDialog,
          variant
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
      import_editor5.EntitiesSavedStates,
      {
        close: onClose,
        renderDialog,
        variant
      }
    );
  };
  function SavePanel() {
    const { query } = useLocation5();
    const { canvas = "view" } = query;
    const { isSaveViewOpen, isDirty, isSaving } = (0, import_data12.useSelect)((select3) => {
      const {
        __experimentalGetDirtyEntityRecords,
        isSavingEntityRecord,
        isResolving
      } = select3(import_core_data11.store);
      const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
      const isActivatingTheme = isResolving("activateTheme");
      const { isSaveViewOpened: isSaveViewOpened2 } = unlock(select3(store));
      return {
        isSaveViewOpen: isSaveViewOpened2(),
        isDirty: dirtyEntityRecords.length > 0,
        isSaving: dirtyEntityRecords.some(
          (record) => isSavingEntityRecord(record.kind, record.name, record.key)
        ) || isActivatingTheme
      };
    }, []);
    const { setIsSaveViewOpened: setIsSaveViewOpened2 } = (0, import_data12.useDispatch)(store);
    const onClose = () => setIsSaveViewOpened2(false);
    (0, import_element13.useEffect)(() => {
      setIsSaveViewOpened2(false);
    }, [canvas, setIsSaveViewOpened2]);
    if (canvas === "view") {
      return isSaveViewOpen ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
        import_components7.Modal,
        {
          className: "edit-site-save-panel__modal",
          onRequestClose: onClose,
          title: (0, import_i18n7.__)("Review changes"),
          size: "small",
          children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(_EntitiesSavedStates, { onClose, variant: "inline" })
        }
      ) : null;
    }
    const activateSaveEnabled = isPreviewingTheme() || isDirty;
    const disabled = isSaving || !activateSaveEnabled;
    return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
      navigable_region_default,
      {
        className: clsx_default("edit-site-layout__actions", {
          "is-entity-save-view-open": isSaveViewOpen
        }),
        ariaLabel: (0, import_i18n7.__)("Save panel"),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
            "div",
            {
              className: clsx_default("edit-site-editor__toggle-save-panel", {
                "screen-reader-text": isSaveViewOpen
              }),
              children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
                import_components7.Button,
                {
                  __next40pxDefaultSize: true,
                  variant: "secondary",
                  className: "edit-site-editor__toggle-save-panel-button",
                  onClick: () => setIsSaveViewOpened2(true),
                  "aria-haspopup": "dialog",
                  disabled,
                  accessibleWhenDisabled: true,
                  children: (0, import_i18n7.__)("Open save panel")
                }
              )
            }
          ),
          isSaveViewOpen && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(_EntitiesSavedStates, { onClose, renderDialog: true })
        ]
      }
    );
  }

  // packages/edit-site/build-module/components/layout/index.mjs
  var import_jsx_runtime77 = __toESM(require_jsx_runtime(), 1);
  var { useLocation: useLocation6 } = unlock(import_router6.privateApis);
  var { useStyle } = unlock(import_editor6.privateApis);
  var ANIMATION_DURATION2 = 0.3;
  function Layout() {
    const { query, name: routeKey, areas: areas2, widths } = useLocation6();
    const canvas = routeKey === "notfound" ? "view" : query?.canvas ?? "view";
    const isMobileViewport = (0, import_compose2.useViewportMatch)("medium", "<");
    const toggleRef = (0, import_element14.useRef)();
    const navigateRegionsProps = (0, import_components8.__unstableUseNavigateRegions)();
    const disableMotion = (0, import_compose2.useReducedMotion)();
    const [canvasResizer, canvasSize] = (0, import_compose2.useResizeObserver)();
    const isEditorLoading = useIsSiteEditorLoading();
    const [isResizableFrameOversized, setIsResizableFrameOversized] = (0, import_element14.useState)(false);
    const animationRef = animation_default({
      triggerAnimationOnChange: routeKey + "-" + canvas
    });
    const { showIconLabels } = (0, import_data13.useSelect)((select3) => {
      return {
        showIconLabels: select3(import_preferences3.store).get(
          "core",
          "showIconLabels"
        )
      };
    });
    const backgroundColor = useStyle("color.background");
    const gradientValue = useStyle("color.gradient");
    const previousCanvaMode = (0, import_compose2.usePrevious)(canvas);
    (0, import_element14.useEffect)(() => {
      if (previousCanvaMode === "edit") {
        toggleRef.current?.focus();
      }
    }, [canvas]);
    return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_editor6.UnsavedChangesWarning, {}),
      canvas === "view" && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SaveKeyboardShortcut, {}),
      /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
        "div",
        {
          ...navigateRegionsProps,
          ref: navigateRegionsProps.ref,
          className: clsx_default(
            "edit-site-layout",
            navigateRegionsProps.className,
            {
              "is-full-canvas": canvas === "edit",
              "show-icon-labels": showIconLabels
            }
          ),
          children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "edit-site-layout__content", children: [
            (!isMobileViewport || !areas2.mobile) && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
              navigable_region_default,
              {
                ariaLabel: (0, import_i18n8.__)("Navigation"),
                className: "edit-site-layout__sidebar-region",
                children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components8.__unstableAnimatePresence, { children: canvas === "view" && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
                  import_components8.__unstableMotion.div,
                  {
                    initial: { opacity: 0 },
                    animate: { opacity: 1 },
                    exit: { opacity: 0 },
                    transition: {
                      type: "tween",
                      duration: (
                        // Disable transition in mobile to emulate a full page transition.
                        disableMotion || isMobileViewport ? 0 : ANIMATION_DURATION2
                      ),
                      ease: "easeOut"
                    },
                    className: "edit-site-layout__sidebar",
                    children: [
                      /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
                        site_hub_default,
                        {
                          ref: toggleRef,
                          isTransparent: isResizableFrameOversized
                        }
                      ),
                      /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SidebarNavigationProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
                        SidebarContent,
                        {
                          shouldAnimate: routeKey !== "styles",
                          routeKey,
                          children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_editor6.ErrorBoundary, { children: areas2.sidebar })
                        }
                      ) }),
                      /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SaveHub, {}),
                      /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SavePanel, {})
                    ]
                  }
                ) })
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_notices.SnackbarNotices, { className: "edit-site-layout__snackbar" }),
            isMobileViewport && areas2.mobile && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "edit-site-layout__mobile", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SidebarNavigationProvider, { children: canvas !== "edit" ? /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
                SiteHubMobile,
                {
                  ref: toggleRef,
                  isTransparent: isResizableFrameOversized
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SidebarContent, { routeKey, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_editor6.ErrorBoundary, { children: areas2.mobile }) }),
              /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SaveHub, {}),
              /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SavePanel, {})
            ] }) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_editor6.ErrorBoundary, { children: areas2.mobile }) }) }),
            !isMobileViewport && areas2.content && canvas !== "edit" && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
              "div",
              {
                className: "edit-site-layout__area",
                style: {
                  maxWidth: widths?.content
                },
                children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_editor6.ErrorBoundary, { children: areas2.content })
              }
            ),
            !isMobileViewport && areas2.edit && canvas !== "edit" && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
              "div",
              {
                className: "edit-site-layout__area",
                style: {
                  maxWidth: widths?.edit
                },
                children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_editor6.ErrorBoundary, { children: areas2.edit })
              }
            ),
            !isMobileViewport && areas2.preview && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "edit-site-layout__canvas-container", children: [
              canvasResizer,
              !!canvasSize.width && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
                "div",
                {
                  className: clsx_default(
                    "edit-site-layout__canvas",
                    {
                      "is-right-aligned": isResizableFrameOversized
                    }
                  ),
                  ref: animationRef,
                  children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_editor6.ErrorBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
                    resizable_frame_default,
                    {
                      isReady: !isEditorLoading,
                      isFullWidth: canvas === "edit",
                      defaultSize: {
                        width: canvasSize.width - 24,
                        height: canvasSize.height
                      },
                      isOversized: isResizableFrameOversized,
                      setIsOversized: setIsResizableFrameOversized,
                      innerContentStyle: {
                        background: gradientValue ?? backgroundColor
                      },
                      children: areas2.preview
                    }
                  ) })
                }
              )
            ] })
          ] })
        }
      )
    ] });
  }
  function LayoutWithGlobalStylesProvider(props) {
    const { createErrorNotice } = (0, import_data13.useDispatch)(import_notices.store);
    function onPluginAreaError(name2) {
      createErrorNotice(
        (0, import_i18n8.sprintf)(
          /* translators: %s: plugin name */
          (0, import_i18n8.__)(
            'The "%s" plugin has encountered an error and cannot be rendered.'
          ),
          name2
        )
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_components8.SlotFillProvider, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_plugins2.PluginArea, { onError: onPluginAreaError }),
      /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Layout, { ...props })
    ] });
  }

  // packages/edit-site/build-module/hooks/commands/use-common-commands.mjs
  var import_element15 = __toESM(require_element(), 1);
  var import_data14 = __toESM(require_data(), 1);
  var import_i18n9 = __toESM(require_i18n(), 1);
  var import_commands2 = __toESM(require_commands(), 1);
  var import_router7 = __toESM(require_router(), 1);
  var import_preferences4 = __toESM(require_preferences(), 1);
  var import_core_data12 = __toESM(require_core_data(), 1);
  var import_editor7 = __toESM(require_editor(), 1);
  var { useHistory: useHistory4, useLocation: useLocation7 } = unlock(import_router7.privateApis);
  var { useGlobalStyles } = unlock(import_editor7.privateApis);
  var getGlobalStylesToggleWelcomeGuideCommands = () => function useGlobalStylesToggleWelcomeGuideCommands() {
    const { openGeneralSidebar: openGeneralSidebar2 } = unlock((0, import_data14.useDispatch)(store));
    const { params } = useLocation7();
    const { canvas = "view" } = params;
    const { set } = (0, import_data14.useDispatch)(import_preferences4.store);
    const history = useHistory4();
    const isBlockBasedTheme = (0, import_data14.useSelect)((select3) => {
      return select3(import_core_data12.store).getCurrentTheme().is_block_theme;
    }, []);
    const commands = (0, import_element15.useMemo)(() => {
      if (!isBlockBasedTheme) {
        return [];
      }
      return [
        {
          name: "core/edit-site/toggle-styles-welcome-guide",
          label: (0, import_i18n9.__)("Learn about styles"),
          callback: ({ close }) => {
            close();
            if (canvas !== "edit") {
              history.navigate("/styles?canvas=edit", {
                transition: "canvas-mode-edit-transition"
              });
            }
            openGeneralSidebar2("edit-site/global-styles");
            set("core/edit-site", "welcomeGuideStyles", true);
            setTimeout(() => {
              set("core/edit-site", "welcomeGuideStyles", true);
            }, 500);
          },
          icon: help_default
        }
      ];
    }, [history, openGeneralSidebar2, canvas, isBlockBasedTheme, set]);
    return {
      isLoading: false,
      commands
    };
  };
  var getGlobalStylesResetCommands = () => function useGlobalStylesResetCommands() {
    const { user, setUser } = useGlobalStyles();
    const canReset = !!user && (Object.keys(user?.styles ?? {}).length > 0 || Object.keys(user?.settings ?? {}).length > 0);
    const commands = (0, import_element15.useMemo)(() => {
      if (!canReset) {
        return [];
      }
      return [
        {
          name: "core/edit-site/reset-global-styles",
          label: (0, import_i18n9.__)("Reset styles"),
          icon: (0, import_i18n9.isRTL)() ? rotate_right_default : rotate_left_default,
          callback: ({ close }) => {
            close();
            setUser({ styles: {}, settings: {} });
          }
        }
      ];
    }, [canReset, setUser]);
    return {
      isLoading: false,
      commands
    };
  };
  var getGlobalStylesOpenRevisionsCommands = () => function useGlobalStylesOpenRevisionsCommands() {
    const { openGeneralSidebar: openGeneralSidebar2 } = unlock((0, import_data14.useDispatch)(store));
    const { setStylesPath } = unlock((0, import_data14.useDispatch)(import_editor7.store));
    const { params } = useLocation7();
    const { canvas = "view" } = params;
    const history = useHistory4();
    const hasRevisions = (0, import_data14.useSelect)((select3) => {
      const { getEntityRecord, __experimentalGetCurrentGlobalStylesId } = select3(import_core_data12.store);
      const globalStylesId = __experimentalGetCurrentGlobalStylesId();
      const globalStyles = globalStylesId ? getEntityRecord("root", "globalStyles", globalStylesId) : void 0;
      return !!globalStyles?._links?.["version-history"]?.[0]?.count;
    }, []);
    const commands = (0, import_element15.useMemo)(() => {
      if (!hasRevisions) {
        return [];
      }
      return [
        {
          name: "core/edit-site/open-styles-revisions",
          label: (0, import_i18n9.__)("Open style revisions"),
          icon: backup_default,
          callback: ({ close }) => {
            close();
            if (canvas !== "edit") {
              history.navigate("/styles?canvas=edit", {
                transition: "canvas-mode-edit-transition"
              });
            }
            openGeneralSidebar2("edit-site/global-styles");
            setStylesPath("/revisions");
          }
        }
      ];
    }, [
      history,
      openGeneralSidebar2,
      setStylesPath,
      hasRevisions,
      canvas
    ]);
    return {
      isLoading: false,
      commands
    };
  };
  function useCommonCommands() {
    (0, import_commands2.useCommandLoader)({
      name: "core/edit-site/toggle-styles-welcome-guide",
      hook: getGlobalStylesToggleWelcomeGuideCommands()
    });
    (0, import_commands2.useCommandLoader)({
      name: "core/edit-site/reset-global-styles",
      hook: getGlobalStylesResetCommands()
    });
    (0, import_commands2.useCommandLoader)({
      name: "core/edit-site/open-styles-revisions",
      hook: getGlobalStylesOpenRevisionsCommands()
    });
  }

  // packages/edit-site/build-module/hooks/commands/use-set-command-context.mjs
  var import_data15 = __toESM(require_data(), 1);
  var import_commands3 = __toESM(require_commands(), 1);
  var import_block_editor3 = __toESM(require_block_editor(), 1);
  var import_router8 = __toESM(require_router(), 1);
  var { useCommandContext } = unlock(import_commands3.privateApis);
  var { useLocation: useLocation8 } = unlock(import_router8.privateApis);
  function useSetCommandContext() {
    const { query = {} } = useLocation8();
    const { canvas = "view" } = query;
    const hasBlockSelected = (0, import_data15.useSelect)((select3) => {
      return select3(import_block_editor3.store).getBlockSelectionStart();
    }, []);
    let commandContext = "site-editor";
    if (canvas === "edit") {
      commandContext = "entity-edit";
    }
    if (hasBlockSelected) {
      commandContext = "block-selection-edit";
    }
    useCommandContext(commandContext);
  }

  // packages/edit-site/build-module/components/site-editor-routes/index.mjs
  var import_data82 = __toESM(require_data(), 1);
  var import_element160 = __toESM(require_element(), 1);

  // packages/edit-site/build-module/components/sidebar-navigation-screen-main/index.mjs
  var import_components73 = __toESM(require_components(), 1);
  var import_i18n59 = __toESM(require_i18n(), 1);
  var import_data31 = __toESM(require_data(), 1);
  var import_core_data25 = __toESM(require_core_data(), 1);

  // packages/edit-site/build-module/components/sidebar-navigation-screen/index.mjs
  var import_components10 = __toESM(require_components(), 1);
  var import_i18n10 = __toESM(require_i18n(), 1);
  var import_core_data13 = __toESM(require_core_data(), 1);
  var import_data16 = __toESM(require_data(), 1);
  var import_router9 = __toESM(require_router(), 1);
  var import_element16 = __toESM(require_element(), 1);

  // packages/edit-site/build-module/components/sidebar-button/index.mjs
  var import_components9 = __toESM(require_components(), 1);
  var import_jsx_runtime78 = __toESM(require_jsx_runtime(), 1);
  function SidebarButton(props) {
    return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
      import_components9.Button,
      {
        size: "compact",
        ...props,
        className: clsx_default("edit-site-sidebar-button", props.className)
      }
    );
  }

  // packages/edit-site/build-module/components/sidebar-navigation-screen/index.mjs
  var import_jsx_runtime79 = __toESM(require_jsx_runtime(), 1);
  var { useHistory: useHistory5, useLocation: useLocation9 } = unlock(import_router9.privateApis);
  function SidebarNavigationScreen({
    isRoot,
    title,
    actions,
    content,
    footer,
    description,
    backPath: backPathProp
  }) {
    const { dashboardLink, dashboardLinkText, previewingThemeName } = (0, import_data16.useSelect)(
      (select3) => {
        const { getSettings: getSettings7 } = unlock(select3(store));
        const currentlyPreviewingThemeId = currentlyPreviewingTheme();
        return {
          dashboardLink: getSettings7().__experimentalDashboardLink,
          dashboardLinkText: getSettings7().__experimentalDashboardLinkText,
          // Do not call `getTheme` with null, it will cause a request to
          // the server.
          previewingThemeName: currentlyPreviewingThemeId ? select3(import_core_data13.store).getTheme(currentlyPreviewingThemeId)?.name?.rendered : void 0
        };
      },
      []
    );
    const location = useLocation9();
    const history = useHistory5();
    const { navigate } = (0, import_element16.useContext)(SidebarNavigationContext);
    const backPath = backPathProp ?? location.state?.backPath;
    const icon = (0, import_i18n10.isRTL)() ? chevron_right_default : chevron_left_default;
    return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
        import_components10.__experimentalVStack,
        {
          className: clsx_default("edit-site-sidebar-navigation-screen__main", {
            "has-footer": !!footer
          }),
          spacing: 0,
          justify: "flex-start",
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
              import_components10.__experimentalHStack,
              {
                spacing: 3,
                alignment: "flex-start",
                className: "edit-site-sidebar-navigation-screen__title-icon",
                children: [
                  !isRoot && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
                    SidebarButton,
                    {
                      onClick: () => {
                        history.navigate(backPath);
                        navigate("back");
                      },
                      icon,
                      label: (0, import_i18n10.__)("Back"),
                      showTooltip: false
                    }
                  ),
                  isRoot && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
                    SidebarButton,
                    {
                      icon,
                      label: dashboardLinkText || (0, import_i18n10.__)("Go to the Dashboard"),
                      href: dashboardLink
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
                    import_components10.__experimentalHeading,
                    {
                      className: "edit-site-sidebar-navigation-screen__title",
                      color: "#e0e0e0",
                      level: 1,
                      size: 20,
                      children: !isPreviewingTheme() ? title : (0, import_i18n10.sprintf)(
                        /* translators: 1: theme name. 2: title */
                        (0, import_i18n10.__)("Previewing %1$s: %2$s"),
                        previewingThemeName,
                        title
                      )
                    }
                  ),
                  actions && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "edit-site-sidebar-navigation-screen__actions", children: actions })
                ]
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "edit-site-sidebar-navigation-screen__content", children: [
              description && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "edit-site-sidebar-navigation-screen__description", children: description }),
              content
            ] })
          ]
        }
      ),
      footer && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("footer", { className: "edit-site-sidebar-navigation-screen__footer", children: footer })
    ] });
  }

  // packages/edit-site/build-module/components/sidebar-navigation-item/index.mjs
  var import_components11 = __toESM(require_components(), 1);
  var import_i18n11 = __toESM(require_i18n(), 1);
  var import_router10 = __toESM(require_router(), 1);
  var import_element17 = __toESM(require_element(), 1);
  var import_jsx_runtime80 = __toESM(require_jsx_runtime(), 1);
  var { useHistory: useHistory6, useLink } = unlock(import_router10.privateApis);
  function SidebarNavigationItem({
    className,
    icon,
    withChevron = false,
    suffix,
    uid,
    to: to2,
    onClick,
    children,
    ...props
  }) {
    const history = useHistory6();
    const { navigate } = (0, import_element17.useContext)(SidebarNavigationContext);
    function handleClick(e2) {
      if (onClick) {
        onClick(e2);
        navigate("forward");
      } else if (to2) {
        e2.preventDefault();
        history.navigate(to2);
        navigate("forward", `[id="${uid}"]`);
      }
    }
    const linkProps = useLink(to2);
    return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
      import_components11.__experimentalItem,
      {
        className: clsx_default(
          "edit-site-sidebar-navigation-item",
          { "with-suffix": !withChevron && suffix },
          className
        ),
        id: uid,
        onClick: handleClick,
        href: to2 ? linkProps.href : void 0,
        ...props,
        children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_components11.__experimentalHStack, { justify: "flex-start", children: [
          icon && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
            icon_default,
            {
              style: { fill: "currentcolor" },
              icon,
              size: 24
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_components11.FlexBlock, { children }),
          withChevron && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
            icon_default,
            {
              icon: (0, import_i18n11.isRTL)() ? chevron_left_small_default : chevron_right_small_default,
              className: "edit-site-sidebar-navigation-item__drilldown-indicator",
              size: 24
            }
          ),
          !withChevron && suffix
        ] })
      }
    );
  }

  // packages/edit-site/build-module/components/sidebar-navigation-screen-global-styles/index.mjs
  var import_i18n58 = __toESM(require_i18n(), 1);
  var import_data30 = __toESM(require_data(), 1);
  var import_element49 = __toESM(require_element(), 1);
  var import_preferences5 = __toESM(require_preferences(), 1);
  var import_editor8 = __toESM(require_editor(), 1);
  var import_router11 = __toESM(require_router(), 1);
  var import_url7 = __toESM(require_url(), 1);

  // packages/global-styles-ui/build-module/global-styles-ui.mjs
  var import_components71 = __toESM(require_components(), 1);
  var import_blocks8 = __toESM(require_blocks(), 1);
  var import_data29 = __toESM(require_data(), 1);
  var import_block_editor16 = __toESM(require_block_editor(), 1);
  var import_element48 = __toESM(require_element(), 1);
  var import_compose8 = __toESM(require_compose(), 1);

  // packages/global-styles-engine/build-module/utils/object.mjs
  function setImmutably(object, path, value) {
    path = Array.isArray(path) ? [...path] : [path];
    object = Array.isArray(object) ? [...object] : { ...object };
    const leaf = path.pop();
    let prev = object;
    for (const key of path) {
      const lvl = prev[key];
      prev = prev[key] = Array.isArray(lvl) ? [...lvl] : { ...lvl };
    }
    prev[leaf] = value;
    return object;
  }
  var getValueFromObjectPath = (object, path, defaultValue2) => {
    const arrayPath = Array.isArray(path) ? path : path.split(".");
    let value = object;
    arrayPath.forEach((fieldName) => {
      value = value?.[fieldName];
    });
    return value ?? defaultValue2;
  };

  // packages/global-styles-engine/build-module/settings/get-setting.mjs
  var VALID_SETTINGS = [
    "appearanceTools",
    "useRootPaddingAwareAlignments",
    "background.backgroundImage",
    "background.backgroundRepeat",
    "background.backgroundSize",
    "background.backgroundPosition",
    "border.color",
    "border.radius",
    "border.radiusSizes",
    "border.style",
    "border.width",
    "shadow.presets",
    "shadow.defaultPresets",
    "color.background",
    "color.button",
    "color.caption",
    "color.custom",
    "color.customDuotone",
    "color.customGradient",
    "color.defaultDuotone",
    "color.defaultGradients",
    "color.defaultPalette",
    "color.duotone",
    "color.gradients",
    "color.heading",
    "color.link",
    "color.palette",
    "color.text",
    "custom",
    "dimensions.aspectRatio",
    "dimensions.height",
    "dimensions.minHeight",
    "dimensions.width",
    "dimensions.dimensionSizes",
    "layout.contentSize",
    "layout.definitions",
    "layout.wideSize",
    "lightbox.enabled",
    "lightbox.allowEditing",
    "position.fixed",
    "position.sticky",
    "spacing.customSpacingSize",
    "spacing.defaultSpacingSizes",
    "spacing.spacingSizes",
    "spacing.spacingScale",
    "spacing.blockGap",
    "spacing.margin",
    "spacing.padding",
    "spacing.units",
    "typography.fluid",
    "typography.customFontSize",
    "typography.defaultFontSizes",
    "typography.dropCap",
    "typography.fontFamilies",
    "typography.fontSizes",
    "typography.fontStyle",
    "typography.fontWeight",
    "typography.letterSpacing",
    "typography.lineHeight",
    "typography.textAlign",
    "typography.textColumns",
    "typography.textDecoration",
    "typography.textIndent",
    "typography.textTransform",
    "typography.writingMode"
  ];
  function getSetting(globalStyles, path, blockName) {
    const appendedBlockPath = blockName ? ".blocks." + blockName : "";
    const appendedPropertyPath = path ? "." + path : "";
    const contextualPath = `settings${appendedBlockPath}${appendedPropertyPath}`;
    const globalPath = `settings${appendedPropertyPath}`;
    if (path) {
      return getValueFromObjectPath(globalStyles, contextualPath) ?? getValueFromObjectPath(globalStyles, globalPath);
    }
    let result = {};
    VALID_SETTINGS.forEach((setting) => {
      const value = getValueFromObjectPath(
        globalStyles,
        `settings${appendedBlockPath}.${setting}`
      ) ?? getValueFromObjectPath(globalStyles, `settings.${setting}`);
      if (value !== void 0) {
        result = setImmutably(result, setting.split("."), value);
      }
    });
    return result;
  }

  // packages/global-styles-engine/build-module/settings/set-setting.mjs
  function setSetting(globalStyles, path, newValue, blockName) {
    const appendedBlockPath = blockName ? ".blocks." + blockName : "";
    const appendedPropertyPath = path ? "." + path : "";
    const finalPath = `settings${appendedBlockPath}${appendedPropertyPath}`;
    return setImmutably(
      globalStyles,
      finalPath.split("."),
      newValue
    );
  }

  // packages/global-styles-engine/build-module/utils/common.mjs
  var import_style_engine = __toESM(require_style_engine(), 1);

  // packages/global-styles-engine/build-module/utils/fluid.mjs
  var DEFAULT_MAXIMUM_VIEWPORT_WIDTH = "1600px";
  var DEFAULT_MINIMUM_VIEWPORT_WIDTH = "320px";
  var DEFAULT_SCALE_FACTOR = 1;
  var DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN = 0.25;
  var DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX = 0.75;
  var DEFAULT_MINIMUM_FONT_SIZE_LIMIT = "14px";
  function getComputedFluidTypographyValue({
    minimumFontSize,
    maximumFontSize,
    fontSize,
    minimumViewportWidth = DEFAULT_MINIMUM_VIEWPORT_WIDTH,
    maximumViewportWidth = DEFAULT_MAXIMUM_VIEWPORT_WIDTH,
    scaleFactor = DEFAULT_SCALE_FACTOR,
    minimumFontSizeLimit
  }) {
    minimumFontSizeLimit = !!getTypographyValueAndUnit(minimumFontSizeLimit) ? minimumFontSizeLimit : DEFAULT_MINIMUM_FONT_SIZE_LIMIT;
    if (fontSize) {
      const fontSizeParsed = getTypographyValueAndUnit(fontSize);
      if (!fontSizeParsed?.unit || !fontSizeParsed?.value) {
        return null;
      }
      const minimumFontSizeLimitParsed = getTypographyValueAndUnit(
        minimumFontSizeLimit,
        {
          coerceTo: fontSizeParsed.unit
        }
      );
      if (!!minimumFontSizeLimitParsed?.value && !minimumFontSize && !maximumFontSize) {
        if (fontSizeParsed?.value <= minimumFontSizeLimitParsed?.value) {
          return null;
        }
      }
      if (!maximumFontSize) {
        maximumFontSize = `${fontSizeParsed.value}${fontSizeParsed.unit}`;
      }
      if (!minimumFontSize) {
        const fontSizeValueInPx = fontSizeParsed.unit === "px" ? fontSizeParsed.value : fontSizeParsed.value * 16;
        const minimumFontSizeFactor = Math.min(
          Math.max(
            1 - 0.075 * Math.log2(fontSizeValueInPx),
            DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN
          ),
          DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX
        );
        const calculatedMinimumFontSize = roundToPrecision(
          fontSizeParsed.value * minimumFontSizeFactor,
          3
        );
        if (!!minimumFontSizeLimitParsed?.value && calculatedMinimumFontSize < minimumFontSizeLimitParsed?.value) {
          minimumFontSize = `${minimumFontSizeLimitParsed.value}${minimumFontSizeLimitParsed.unit}`;
        } else {
          minimumFontSize = `${calculatedMinimumFontSize}${fontSizeParsed.unit}`;
        }
      }
    }
    const minimumFontSizeParsed = getTypographyValueAndUnit(minimumFontSize);
    const fontSizeUnit = minimumFontSizeParsed?.unit || "rem";
    const maximumFontSizeParsed = getTypographyValueAndUnit(maximumFontSize, {
      coerceTo: fontSizeUnit
    });
    if (!minimumFontSizeParsed || !maximumFontSizeParsed) {
      return null;
    }
    const minimumFontSizeRem = getTypographyValueAndUnit(minimumFontSize, {
      coerceTo: "rem"
    });
    const maximumViewportWidthParsed = getTypographyValueAndUnit(
      maximumViewportWidth,
      { coerceTo: fontSizeUnit }
    );
    const minimumViewportWidthParsed = getTypographyValueAndUnit(
      minimumViewportWidth,
      { coerceTo: fontSizeUnit }
    );
    if (!maximumViewportWidthParsed || !minimumViewportWidthParsed || !minimumFontSizeRem) {
      return null;
    }
    const linearDenominator = maximumViewportWidthParsed.value - minimumViewportWidthParsed.value;
    if (!linearDenominator) {
      return null;
    }
    const minViewportWidthOffsetValue = roundToPrecision(
      minimumViewportWidthParsed.value / 100,
      3
    );
    const viewportWidthOffset = roundToPrecision(minViewportWidthOffsetValue, 3) + fontSizeUnit;
    const linearFactor = 100 * ((maximumFontSizeParsed.value - minimumFontSizeParsed.value) / linearDenominator);
    const linearFactorScaled = roundToPrecision(
      (linearFactor || 1) * scaleFactor,
      3
    );
    const fluidTargetFontSize = `${minimumFontSizeRem.value}${minimumFontSizeRem.unit} + ((1vw - ${viewportWidthOffset}) * ${linearFactorScaled})`;
    return `clamp(${minimumFontSize}, ${fluidTargetFontSize}, ${maximumFontSize})`;
  }
  function getTypographyValueAndUnit(rawValue, options = {}) {
    if (typeof rawValue !== "string" && typeof rawValue !== "number") {
      return null;
    }
    if (isFinite(rawValue)) {
      rawValue = `${rawValue}px`;
    }
    const { coerceTo, rootSizeValue, acceptableUnits } = {
      coerceTo: "",
      // Default browser font size. Later we could inject some JS to compute this `getComputedStyle( document.querySelector( "html" ) ).fontSize`.
      rootSizeValue: 16,
      acceptableUnits: ["rem", "px", "em"],
      ...options
    };
    const acceptableUnitsGroup = acceptableUnits?.join("|");
    const regexUnits = new RegExp(
      `^(\\d*\\.?\\d+)(${acceptableUnitsGroup}){1,1}$`
    );
    const matches = rawValue.toString().match(regexUnits);
    if (!matches || matches.length < 3) {
      return null;
    }
    let [, value, unit] = matches;
    let returnValue = parseFloat(value);
    if ("px" === coerceTo && ("em" === unit || "rem" === unit)) {
      returnValue = returnValue * rootSizeValue;
      unit = coerceTo;
    }
    if ("px" === unit && ("em" === coerceTo || "rem" === coerceTo)) {
      returnValue = returnValue / rootSizeValue;
      unit = coerceTo;
    }
    if (("em" === coerceTo || "rem" === coerceTo) && ("em" === unit || "rem" === unit)) {
      unit = coerceTo;
    }
    if (!unit) {
      return null;
    }
    return {
      value: roundToPrecision(returnValue, 3),
      unit
    };
  }
  function roundToPrecision(value, digits = 3) {
    const base = Math.pow(10, digits);
    return Math.round(value * base) / base;
  }

  // packages/global-styles-engine/build-module/utils/typography.mjs
  function isFluidTypographyEnabled(typographySettings) {
    const fluidSettings = typographySettings?.fluid;
    return true === fluidSettings || fluidSettings && typeof fluidSettings === "object" && Object.keys(fluidSettings).length > 0;
  }
  function getFluidTypographyOptionsFromSettings(settings2) {
    const typographySettings = settings2?.typography ?? {};
    const layoutSettings = settings2?.layout;
    const defaultMaxViewportWidth = getTypographyValueAndUnit(
      layoutSettings?.wideSize
    ) ? layoutSettings?.wideSize : null;
    return isFluidTypographyEnabled(typographySettings) && defaultMaxViewportWidth ? {
      fluid: {
        maxViewportWidth: defaultMaxViewportWidth,
        ...typeof typographySettings.fluid === "object" ? typographySettings.fluid : {}
      }
    } : {
      fluid: typographySettings?.fluid
    };
  }
  function getTypographyFontSizeValue(preset, settings2) {
    const { size: defaultSize } = preset;
    if (!defaultSize || "0" === defaultSize || false === preset?.fluid) {
      return defaultSize;
    }
    if (!isFluidTypographyEnabled(settings2?.typography) && !isFluidTypographyEnabled(preset)) {
      return defaultSize;
    }
    const fluidTypographySettings = getFluidTypographyOptionsFromSettings(settings2)?.fluid ?? {};
    const fluidFontSizeValue = getComputedFluidTypographyValue({
      minimumFontSize: typeof preset?.fluid === "boolean" ? void 0 : preset?.fluid?.min,
      maximumFontSize: typeof preset?.fluid === "boolean" ? void 0 : preset?.fluid?.max,
      fontSize: defaultSize,
      minimumFontSizeLimit: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.minFontSize : void 0,
      maximumViewportWidth: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.maxViewportWidth : void 0,
      minimumViewportWidth: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.minViewportWidth : void 0
    });
    if (!!fluidFontSizeValue) {
      return fluidFontSizeValue;
    }
    return defaultSize;
  }

  // packages/global-styles-engine/build-module/utils/common.mjs
  var ROOT_BLOCK_SELECTOR = "body";
  var ROOT_CSS_PROPERTIES_SELECTOR = ":root";
  var PRESET_METADATA = [
    {
      path: ["color", "palette"],
      valueKey: "color",
      cssVarInfix: "color",
      classes: [
        { classSuffix: "color", propertyName: "color" },
        {
          classSuffix: "background-color",
          propertyName: "background-color"
        },
        {
          classSuffix: "border-color",
          propertyName: "border-color"
        }
      ]
    },
    {
      path: ["color", "gradients"],
      valueKey: "gradient",
      cssVarInfix: "gradient",
      classes: [
        {
          classSuffix: "gradient-background",
          propertyName: "background"
        }
      ]
    },
    {
      path: ["color", "duotone"],
      valueKey: "colors",
      cssVarInfix: "duotone",
      valueFunc: ({ slug }) => `url( '#wp-duotone-${slug}' )`,
      classes: []
    },
    {
      path: ["shadow", "presets"],
      valueKey: "shadow",
      cssVarInfix: "shadow",
      classes: []
    },
    {
      path: ["typography", "fontSizes"],
      valueFunc: (preset, settings2) => getTypographyFontSizeValue(preset, settings2),
      valueKey: "size",
      cssVarInfix: "font-size",
      classes: [{ classSuffix: "font-size", propertyName: "font-size" }]
    },
    {
      path: ["typography", "fontFamilies"],
      valueKey: "fontFamily",
      cssVarInfix: "font-family",
      classes: [
        { classSuffix: "font-family", propertyName: "font-family" }
      ]
    },
    {
      path: ["spacing", "spacingSizes"],
      valueKey: "size",
      cssVarInfix: "spacing",
      valueFunc: ({ size }) => size,
      classes: []
    },
    {
      path: ["border", "radiusSizes"],
      valueKey: "size",
      cssVarInfix: "border-radius",
      classes: []
    },
    {
      path: ["dimensions", "dimensionSizes"],
      valueKey: "size",
      cssVarInfix: "dimension",
      classes: []
    }
  ];
  function scopeSelector(scope, selector2) {
    if (!scope || !selector2) {
      return selector2;
    }
    const scopes = scope.split(",");
    const selectors = selector2.split(",");
    const selectorsScoped = [];
    scopes.forEach((outer) => {
      selectors.forEach((inner) => {
        selectorsScoped.push(`${outer.trim()} ${inner.trim()}`);
      });
    });
    return selectorsScoped.join(", ");
  }
  function scopeFeatureSelectors(scope, selectors) {
    if (!scope || !selectors) {
      return;
    }
    const featureSelectors = {};
    Object.entries(selectors).forEach(([feature, selector2]) => {
      if (typeof selector2 === "string") {
        featureSelectors[feature] = scopeSelector(scope, selector2);
      }
      if (typeof selector2 === "object") {
        featureSelectors[feature] = {};
        Object.entries(selector2).forEach(
          ([subfeature, subfeatureSelector]) => {
            featureSelectors[feature][subfeature] = scopeSelector(
              scope,
              subfeatureSelector
            );
          }
        );
      }
    });
    return featureSelectors;
  }
  function appendToSelector(selector2, toAppend) {
    if (!selector2.includes(",")) {
      return selector2 + toAppend;
    }
    const selectors = selector2.split(",");
    const newSelectors = selectors.map((sel) => sel + toAppend);
    return newSelectors.join(",");
  }
  function getBlockStyleVariationSelector(variation, blockSelector) {
    const variationClass = `.is-style-${variation}`;
    if (!blockSelector) {
      return variationClass;
    }
    const ancestorRegex = /((?::\([^)]+\))?\s*)([^\s:]+)/;
    const addVariationClass = (_match, group1, group2) => {
      return group1 + group2 + variationClass;
    };
    const result = blockSelector.split(",").map((part) => part.replace(ancestorRegex, addVariationClass));
    return result.join(",");
  }
  function getResolvedRefValue(ruleValue, tree) {
    if (!ruleValue || !tree) {
      return ruleValue;
    }
    if (typeof ruleValue === "object" && "ref" in ruleValue && ruleValue?.ref) {
      const resolvedRuleValue = (0, import_style_engine.getCSSValueFromRawStyle)(
        getValueFromObjectPath(tree, ruleValue.ref)
      );
      if (typeof resolvedRuleValue === "object" && resolvedRuleValue !== null && "ref" in resolvedRuleValue && resolvedRuleValue?.ref) {
        return void 0;
      }
      if (resolvedRuleValue === void 0) {
        return ruleValue;
      }
      return resolvedRuleValue;
    }
    return ruleValue;
  }
  function getResolvedThemeFilePath(file, themeFileURIs) {
    if (!file || !themeFileURIs || !Array.isArray(themeFileURIs)) {
      return file;
    }
    const uri = themeFileURIs.find(
      (themeFileUri) => themeFileUri?.name === file
    );
    if (!uri?.href) {
      return file;
    }
    return uri?.href;
  }
  function getResolvedValue(ruleValue, tree) {
    if (!ruleValue || !tree) {
      return ruleValue;
    }
    const resolvedValue = getResolvedRefValue(ruleValue, tree);
    if (typeof resolvedValue === "object" && resolvedValue !== null && "url" in resolvedValue && resolvedValue?.url) {
      resolvedValue.url = getResolvedThemeFilePath(
        resolvedValue.url,
        tree?._links?.["wp:theme-file"]
      );
    }
    return resolvedValue;
  }
  function findInPresetsBy(settings2, blockName, presetPath = [], presetProperty = "slug", presetValueValue) {
    const orderedPresetsByOrigin = [
      blockName ? getValueFromObjectPath(settings2, [
        "blocks",
        blockName,
        ...presetPath
      ]) : void 0,
      getValueFromObjectPath(settings2, presetPath)
    ].filter(Boolean);
    for (const presetByOrigin of orderedPresetsByOrigin) {
      if (presetByOrigin) {
        const origins = ["custom", "theme", "default"];
        for (const origin of origins) {
          const presets = presetByOrigin[origin];
          if (presets) {
            const presetObject = presets.find(
              (preset) => preset[presetProperty] === presetValueValue
            );
            if (presetObject) {
              if (presetProperty === "slug") {
                return presetObject;
              }
              const highestPresetObjectWithSameSlug = findInPresetsBy(
                settings2,
                blockName,
                presetPath,
                "slug",
                presetObject.slug
              );
              if (highestPresetObjectWithSameSlug[presetProperty] === presetObject[presetProperty]) {
                return presetObject;
              }
              return void 0;
            }
          }
        }
      }
    }
  }
  function getValueFromPresetVariable(features, blockName, variable, [presetType, slug] = []) {
    const metadata = PRESET_METADATA.find(
      (data) => data.cssVarInfix === presetType
    );
    if (!metadata || !features.settings) {
      return variable;
    }
    const presetObject = findInPresetsBy(
      features.settings,
      blockName,
      metadata.path,
      "slug",
      slug
    );
    if (presetObject) {
      const { valueKey } = metadata;
      const result = presetObject[valueKey];
      return getValueFromVariable(features, blockName, result);
    }
    return variable;
  }
  function getValueFromCustomVariable(features, blockName, variable, path = []) {
    const result = (blockName ? getValueFromObjectPath(features?.settings ?? {}, [
      "blocks",
      blockName,
      "custom",
      ...path
    ]) : void 0) ?? getValueFromObjectPath(features?.settings ?? {}, [
      "custom",
      ...path
    ]);
    if (!result) {
      return variable;
    }
    return getValueFromVariable(features, blockName, result);
  }
  function getValueFromVariable(features, blockName, variable) {
    if (!variable || typeof variable !== "string") {
      if (typeof variable === "object" && variable !== null && "ref" in variable && typeof variable.ref === "string") {
        const resolvedVariable = getValueFromObjectPath(
          features,
          variable.ref
        );
        if (!resolvedVariable || typeof resolvedVariable === "object" && "ref" in resolvedVariable) {
          return resolvedVariable;
        }
        variable = resolvedVariable;
      } else {
        return variable;
      }
    }
    const USER_VALUE_PREFIX = "var:";
    const THEME_VALUE_PREFIX = "var(--wp--";
    const THEME_VALUE_SUFFIX = ")";
    let parsedVar;
    if (variable.startsWith(USER_VALUE_PREFIX)) {
      parsedVar = variable.slice(USER_VALUE_PREFIX.length).split("|");
    } else if (variable.startsWith(THEME_VALUE_PREFIX) && variable.endsWith(THEME_VALUE_SUFFIX)) {
      parsedVar = variable.slice(THEME_VALUE_PREFIX.length, -THEME_VALUE_SUFFIX.length).split("--");
    } else {
      return variable;
    }
    const [type, ...path] = parsedVar;
    if (type === "preset") {
      return getValueFromPresetVariable(
        features,
        blockName,
        variable,
        path
      );
    }
    if (type === "custom") {
      return getValueFromCustomVariable(
        features,
        blockName,
        variable,
        path
      );
    }
    return variable;
  }

  // packages/global-styles-engine/build-module/settings/get-style.mjs
  function getStyle(globalStyles, path, blockName, shouldDecodeEncode = true) {
    const appendedPath = path ? "." + path : "";
    const finalPath = !blockName ? `styles${appendedPath}` : `styles.blocks.${blockName}${appendedPath}`;
    if (!globalStyles) {
      return void 0;
    }
    const rawResult = getValueFromObjectPath(globalStyles, finalPath);
    const result = shouldDecodeEncode ? getValueFromVariable(globalStyles, blockName, rawResult) : rawResult;
    return result;
  }

  // packages/global-styles-engine/build-module/settings/set-style.mjs
  function setStyle(globalStyles, path, newValue, blockName) {
    const appendedPath = path ? "." + path : "";
    const finalPath = !blockName ? `styles${appendedPath}` : `styles.blocks.${blockName}${appendedPath}`;
    return setImmutably(
      globalStyles,
      finalPath.split("."),
      newValue
    );
  }

  // packages/global-styles-engine/build-module/core/equal.mjs
  var import_es6 = __toESM(require_es6(), 1);
  function areGlobalStylesEqual(original, variation) {
    if (typeof original !== "object" || typeof variation !== "object") {
      return original === variation;
    }
    return (0, import_es6.default)(original?.styles, variation?.styles) && (0, import_es6.default)(original?.settings, variation?.settings);
  }

  // packages/global-styles-engine/build-module/core/merge.mjs
  var import_deepmerge = __toESM(require_cjs(), 1);

  // node_modules/is-plain-object/dist/is-plain-object.mjs
  function isObject(o3) {
    return Object.prototype.toString.call(o3) === "[object Object]";
  }
  function isPlainObject(o3) {
    var ctor, prot;
    if (isObject(o3) === false) return false;
    ctor = o3.constructor;
    if (ctor === void 0) return true;
    prot = ctor.prototype;
    if (isObject(prot) === false) return false;
    if (prot.hasOwnProperty("isPrototypeOf") === false) {
      return false;
    }
    return true;
  }

  // packages/global-styles-engine/build-module/core/merge.mjs
  function mergeGlobalStyles(base, user) {
    return (0, import_deepmerge.default)(base, user, {
      /*
       * We only pass as arrays the presets,
       * in which case we want the new array of values
       * to override the old array (no merging).
       */
      isMergeableObject: isPlainObject,
      /*
       * Exceptions to the above rule.
       * Background images should be replaced, not merged,
       * as they themselves are specific object definitions for the style.
       */
      customMerge: (key) => {
        if (key === "backgroundImage") {
          return (baseConfig, userConfig) => userConfig ?? baseConfig;
        }
        return void 0;
      }
    });
  }

  // packages/global-styles-engine/build-module/core/render.mjs
  var import_blocks3 = __toESM(require_blocks(), 1);
  var import_style_engine2 = __toESM(require_style_engine(), 1);
  var import_data17 = __toESM(require_data(), 1);

  // packages/global-styles-engine/build-module/core/selectors.mjs
  function getBlockSelector(blockType, target = "root", options = {}) {
    if (!target) {
      return null;
    }
    const { fallback = false } = options;
    const { name: name2, selectors, supports } = blockType;
    const hasSelectors = selectors && Object.keys(selectors).length > 0;
    const path = Array.isArray(target) ? target.join(".") : target;
    let rootSelector = null;
    if (hasSelectors && selectors.root) {
      rootSelector = selectors?.root;
    } else if (supports?.__experimentalSelector) {
      rootSelector = supports.__experimentalSelector;
    } else {
      rootSelector = ".wp-block-" + name2.replace("core/", "").replace("/", "-");
    }
    if (path === "root") {
      return rootSelector;
    }
    const pathArray = Array.isArray(target) ? target : target.split(".");
    if (pathArray.length === 1) {
      const fallbackSelector = fallback ? rootSelector : null;
      if (hasSelectors) {
        const featureSelector2 = getValueFromObjectPath(
          selectors,
          `${path}.root`,
          null
        ) || getValueFromObjectPath(selectors, path, null);
        return featureSelector2 || fallbackSelector;
      }
      const featureSelector = supports ? getValueFromObjectPath(
        supports,
        `${path}.__experimentalSelector`,
        null
      ) : void 0;
      if (!featureSelector) {
        return fallbackSelector;
      }
      return scopeSelector(rootSelector, featureSelector);
    }
    let subfeatureSelector;
    if (hasSelectors) {
      subfeatureSelector = getValueFromObjectPath(selectors, path, null);
    }
    if (subfeatureSelector) {
      return subfeatureSelector;
    }
    if (fallback) {
      return getBlockSelector(blockType, pathArray[0], options);
    }
    return null;
  }

  // node_modules/colord/index.mjs
  var r2 = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) };
  var t = function(r3) {
    return "string" == typeof r3 ? r3.length > 0 : "number" == typeof r3;
  };
  var n = function(r3, t3, n2) {
    return void 0 === t3 && (t3 = 0), void 0 === n2 && (n2 = Math.pow(10, t3)), Math.round(n2 * r3) / n2 + 0;
  };
  var e = function(r3, t3, n2) {
    return void 0 === t3 && (t3 = 0), void 0 === n2 && (n2 = 1), r3 > n2 ? n2 : r3 > t3 ? r3 : t3;
  };
  var u = function(r3) {
    return (r3 = isFinite(r3) ? r3 % 360 : 0) > 0 ? r3 : r3 + 360;
  };
  var a = function(r3) {
    return { r: e(r3.r, 0, 255), g: e(r3.g, 0, 255), b: e(r3.b, 0, 255), a: e(r3.a) };
  };
  var o = function(r3) {
    return { r: n(r3.r), g: n(r3.g), b: n(r3.b), a: n(r3.a, 3) };
  };
  var i = /^#([0-9a-f]{3,8})$/i;
  var s = function(r3) {
    var t3 = r3.toString(16);
    return t3.length < 2 ? "0" + t3 : t3;
  };
  var h = function(r3) {
    var t3 = r3.r, n2 = r3.g, e2 = r3.b, u2 = r3.a, a2 = Math.max(t3, n2, e2), o3 = a2 - Math.min(t3, n2, e2), i2 = o3 ? a2 === t3 ? (n2 - e2) / o3 : a2 === n2 ? 2 + (e2 - t3) / o3 : 4 + (t3 - n2) / o3 : 0;
    return { h: 60 * (i2 < 0 ? i2 + 6 : i2), s: a2 ? o3 / a2 * 100 : 0, v: a2 / 255 * 100, a: u2 };
  };
  var b = function(r3) {
    var t3 = r3.h, n2 = r3.s, e2 = r3.v, u2 = r3.a;
    t3 = t3 / 360 * 6, n2 /= 100, e2 /= 100;
    var a2 = Math.floor(t3), o3 = e2 * (1 - n2), i2 = e2 * (1 - (t3 - a2) * n2), s2 = e2 * (1 - (1 - t3 + a2) * n2), h2 = a2 % 6;
    return { r: 255 * [e2, i2, o3, o3, s2, e2][h2], g: 255 * [s2, e2, e2, i2, o3, o3][h2], b: 255 * [o3, o3, s2, e2, e2, i2][h2], a: u2 };
  };
  var g = function(r3) {
    return { h: u(r3.h), s: e(r3.s, 0, 100), l: e(r3.l, 0, 100), a: e(r3.a) };
  };
  var d = function(r3) {
    return { h: n(r3.h), s: n(r3.s), l: n(r3.l), a: n(r3.a, 3) };
  };
  var f = function(r3) {
    return b((n2 = (t3 = r3).s, { h: t3.h, s: (n2 *= ((e2 = t3.l) < 50 ? e2 : 100 - e2) / 100) > 0 ? 2 * n2 / (e2 + n2) * 100 : 0, v: e2 + n2, a: t3.a }));
    var t3, n2, e2;
  };
  var c = function(r3) {
    return { h: (t3 = h(r3)).h, s: (u2 = (200 - (n2 = t3.s)) * (e2 = t3.v) / 100) > 0 && u2 < 200 ? n2 * e2 / 100 / (u2 <= 100 ? u2 : 200 - u2) * 100 : 0, l: u2 / 2, a: t3.a };
    var t3, n2, e2, u2;
  };
  var l = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var p2 = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var v = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var m = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var y = { string: [[function(r3) {
    var t3 = i.exec(r3);
    return t3 ? (r3 = t3[1]).length <= 4 ? { r: parseInt(r3[0] + r3[0], 16), g: parseInt(r3[1] + r3[1], 16), b: parseInt(r3[2] + r3[2], 16), a: 4 === r3.length ? n(parseInt(r3[3] + r3[3], 16) / 255, 2) : 1 } : 6 === r3.length || 8 === r3.length ? { r: parseInt(r3.substr(0, 2), 16), g: parseInt(r3.substr(2, 2), 16), b: parseInt(r3.substr(4, 2), 16), a: 8 === r3.length ? n(parseInt(r3.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
  }, "hex"], [function(r3) {
    var t3 = v.exec(r3) || m.exec(r3);
    return t3 ? t3[2] !== t3[4] || t3[4] !== t3[6] ? null : a({ r: Number(t3[1]) / (t3[2] ? 100 / 255 : 1), g: Number(t3[3]) / (t3[4] ? 100 / 255 : 1), b: Number(t3[5]) / (t3[6] ? 100 / 255 : 1), a: void 0 === t3[7] ? 1 : Number(t3[7]) / (t3[8] ? 100 : 1) }) : null;
  }, "rgb"], [function(t3) {
    var n2 = l.exec(t3) || p2.exec(t3);
    if (!n2) return null;
    var e2, u2, a2 = g({ h: (e2 = n2[1], u2 = n2[2], void 0 === u2 && (u2 = "deg"), Number(e2) * (r2[u2] || 1)), s: Number(n2[3]), l: Number(n2[4]), a: void 0 === n2[5] ? 1 : Number(n2[5]) / (n2[6] ? 100 : 1) });
    return f(a2);
  }, "hsl"]], object: [[function(r3) {
    var n2 = r3.r, e2 = r3.g, u2 = r3.b, o3 = r3.a, i2 = void 0 === o3 ? 1 : o3;
    return t(n2) && t(e2) && t(u2) ? a({ r: Number(n2), g: Number(e2), b: Number(u2), a: Number(i2) }) : null;
  }, "rgb"], [function(r3) {
    var n2 = r3.h, e2 = r3.s, u2 = r3.l, a2 = r3.a, o3 = void 0 === a2 ? 1 : a2;
    if (!t(n2) || !t(e2) || !t(u2)) return null;
    var i2 = g({ h: Number(n2), s: Number(e2), l: Number(u2), a: Number(o3) });
    return f(i2);
  }, "hsl"], [function(r3) {
    var n2 = r3.h, a2 = r3.s, o3 = r3.v, i2 = r3.a, s2 = void 0 === i2 ? 1 : i2;
    if (!t(n2) || !t(a2) || !t(o3)) return null;
    var h2 = (function(r4) {
      return { h: u(r4.h), s: e(r4.s, 0, 100), v: e(r4.v, 0, 100), a: e(r4.a) };
    })({ h: Number(n2), s: Number(a2), v: Number(o3), a: Number(s2) });
    return b(h2);
  }, "hsv"]] };
  var N = function(r3, t3) {
    for (var n2 = 0; n2 < t3.length; n2++) {
      var e2 = t3[n2][0](r3);
      if (e2) return [e2, t3[n2][1]];
    }
    return [null, void 0];
  };
  var x = function(r3) {
    return "string" == typeof r3 ? N(r3.trim(), y.string) : "object" == typeof r3 && null !== r3 ? N(r3, y.object) : [null, void 0];
  };
  var M = function(r3, t3) {
    var n2 = c(r3);
    return { h: n2.h, s: e(n2.s + 100 * t3, 0, 100), l: n2.l, a: n2.a };
  };
  var H = function(r3) {
    return (299 * r3.r + 587 * r3.g + 114 * r3.b) / 1e3 / 255;
  };
  var $ = function(r3, t3) {
    var n2 = c(r3);
    return { h: n2.h, s: n2.s, l: e(n2.l + 100 * t3, 0, 100), a: n2.a };
  };
  var j = (function() {
    function r3(r4) {
      this.parsed = x(r4)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
    }
    return r3.prototype.isValid = function() {
      return null !== this.parsed;
    }, r3.prototype.brightness = function() {
      return n(H(this.rgba), 2);
    }, r3.prototype.isDark = function() {
      return H(this.rgba) < 0.5;
    }, r3.prototype.isLight = function() {
      return H(this.rgba) >= 0.5;
    }, r3.prototype.toHex = function() {
      return r4 = o(this.rgba), t3 = r4.r, e2 = r4.g, u2 = r4.b, i2 = (a2 = r4.a) < 1 ? s(n(255 * a2)) : "", "#" + s(t3) + s(e2) + s(u2) + i2;
      var r4, t3, e2, u2, a2, i2;
    }, r3.prototype.toRgb = function() {
      return o(this.rgba);
    }, r3.prototype.toRgbString = function() {
      return r4 = o(this.rgba), t3 = r4.r, n2 = r4.g, e2 = r4.b, (u2 = r4.a) < 1 ? "rgba(" + t3 + ", " + n2 + ", " + e2 + ", " + u2 + ")" : "rgb(" + t3 + ", " + n2 + ", " + e2 + ")";
      var r4, t3, n2, e2, u2;
    }, r3.prototype.toHsl = function() {
      return d(c(this.rgba));
    }, r3.prototype.toHslString = function() {
      return r4 = d(c(this.rgba)), t3 = r4.h, n2 = r4.s, e2 = r4.l, (u2 = r4.a) < 1 ? "hsla(" + t3 + ", " + n2 + "%, " + e2 + "%, " + u2 + ")" : "hsl(" + t3 + ", " + n2 + "%, " + e2 + "%)";
      var r4, t3, n2, e2, u2;
    }, r3.prototype.toHsv = function() {
      return r4 = h(this.rgba), { h: n(r4.h), s: n(r4.s), v: n(r4.v), a: n(r4.a, 3) };
      var r4;
    }, r3.prototype.invert = function() {
      return w({ r: 255 - (r4 = this.rgba).r, g: 255 - r4.g, b: 255 - r4.b, a: r4.a });
      var r4;
    }, r3.prototype.saturate = function(r4) {
      return void 0 === r4 && (r4 = 0.1), w(M(this.rgba, r4));
    }, r3.prototype.desaturate = function(r4) {
      return void 0 === r4 && (r4 = 0.1), w(M(this.rgba, -r4));
    }, r3.prototype.grayscale = function() {
      return w(M(this.rgba, -1));
    }, r3.prototype.lighten = function(r4) {
      return void 0 === r4 && (r4 = 0.1), w($(this.rgba, r4));
    }, r3.prototype.darken = function(r4) {
      return void 0 === r4 && (r4 = 0.1), w($(this.rgba, -r4));
    }, r3.prototype.rotate = function(r4) {
      return void 0 === r4 && (r4 = 15), this.hue(this.hue() + r4);
    }, r3.prototype.alpha = function(r4) {
      return "number" == typeof r4 ? w({ r: (t3 = this.rgba).r, g: t3.g, b: t3.b, a: r4 }) : n(this.rgba.a, 3);
      var t3;
    }, r3.prototype.hue = function(r4) {
      var t3 = c(this.rgba);
      return "number" == typeof r4 ? w({ h: r4, s: t3.s, l: t3.l, a: t3.a }) : n(t3.h);
    }, r3.prototype.isEqual = function(r4) {
      return this.toHex() === w(r4).toHex();
    }, r3;
  })();
  var w = function(r3) {
    return r3 instanceof j ? r3 : new j(r3);
  };
  var S = [];
  var k = function(r3) {
    r3.forEach(function(r4) {
      S.indexOf(r4) < 0 && (r4(j, y), S.push(r4));
    });
  };

  // packages/global-styles-engine/build-module/utils/duotone.mjs
  function getValuesFromColors(colors2 = []) {
    const values = {
      r: [],
      g: [],
      b: [],
      a: []
    };
    colors2.forEach((color) => {
      const rgbColor = w(color).toRgb();
      values.r.push(rgbColor.r / 255);
      values.g.push(rgbColor.g / 255);
      values.b.push(rgbColor.b / 255);
      values.a.push(rgbColor.a);
    });
    return values;
  }
  function getDuotoneFilter(id, colors2) {
    const values = getValuesFromColors(colors2);
    return `
<svg
	xmlns:xlink="http://www.w3.org/1999/xlink"
	viewBox="0 0 0 0"
	width="0"
	height="0"
	focusable="false"
	role="none"
	aria-hidden="true"
	style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
>
	<defs>
		<filter id="${id}">
			<!--
				Use sRGB instead of linearRGB so transparency looks correct.
				Use perceptual brightness to convert to grayscale.
			-->
			<feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix>
			<!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. -->
			<feComponentTransfer color-interpolation-filters="sRGB">
				<feFuncR type="table" tableValues="${values.r.join(" ")}"></feFuncR>
				<feFuncG type="table" tableValues="${values.g.join(" ")}"></feFuncG>
				<feFuncB type="table" tableValues="${values.b.join(" ")}"></feFuncB>
				<feFuncA type="table" tableValues="${values.a.join(" ")}"></feFuncA>
			</feComponentTransfer>
			<!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. -->
			<feComposite in2="SourceGraphic" operator="in"></feComposite>
		</filter>
	</defs>
</svg>`;
  }

  // packages/global-styles-engine/build-module/utils/string.mjs
  function kebabCase(str) {
    return str.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([0-9])([a-zA-Z])/g, "$1-$2").replace(/([a-zA-Z])([0-9])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
  }

  // packages/global-styles-engine/build-module/utils/spacing.mjs
  function getSpacingPresetCssVar(value) {
    if (!value) {
      return;
    }
    const slug = value.match(/var:preset\|spacing\|(.+)/);
    if (!slug) {
      return value;
    }
    return `var(--wp--preset--spacing--${slug[1]})`;
  }

  // packages/global-styles-engine/build-module/utils/gap.mjs
  function getGapBoxControlValueFromStyle(blockGapValue) {
    if (!blockGapValue) {
      return null;
    }
    const isValueString = typeof blockGapValue === "string";
    return {
      top: isValueString ? blockGapValue : blockGapValue?.top,
      left: isValueString ? blockGapValue : blockGapValue?.left
    };
  }
  function getGapCSSValue(blockGapValue, defaultValue2 = "0") {
    const blockGapBoxControlValue = getGapBoxControlValueFromStyle(blockGapValue);
    if (!blockGapBoxControlValue) {
      return null;
    }
    const row = getSpacingPresetCssVar(blockGapBoxControlValue?.top) || defaultValue2;
    const column = getSpacingPresetCssVar(blockGapBoxControlValue?.left) || defaultValue2;
    return row === column ? row : `${row} ${column}`;
  }

  // packages/global-styles-engine/build-module/utils/background.mjs
  var BACKGROUND_BLOCK_DEFAULT_VALUES = {
    backgroundSize: "cover",
    backgroundPosition: "50% 50%"
    // used only when backgroundSize is 'contain'.
  };
  function setBackgroundStyleDefaults(backgroundStyle) {
    if (!backgroundStyle || // @ts-expect-error
    !backgroundStyle?.backgroundImage?.url) {
      return;
    }
    let backgroundStylesWithDefaults;
    if (!backgroundStyle?.backgroundSize) {
      backgroundStylesWithDefaults = {
        backgroundSize: BACKGROUND_BLOCK_DEFAULT_VALUES.backgroundSize
      };
    }
    if ("contain" === backgroundStyle?.backgroundSize && !backgroundStyle?.backgroundPosition) {
      backgroundStylesWithDefaults = {
        backgroundPosition: BACKGROUND_BLOCK_DEFAULT_VALUES.backgroundPosition
      };
    }
    return backgroundStylesWithDefaults;
  }

  // packages/global-styles-engine/build-module/utils/layout.mjs
  var LAYOUT_DEFINITIONS = {
    default: {
      name: "default",
      slug: "flow",
      className: "is-layout-flow",
      baseStyles: [
        {
          selector: " > .alignleft",
          rules: {
            float: "left",
            "margin-inline-start": "0",
            "margin-inline-end": "2em"
          }
        },
        {
          selector: " > .alignright",
          rules: {
            float: "right",
            "margin-inline-start": "2em",
            "margin-inline-end": "0"
          }
        },
        {
          selector: " > .aligncenter",
          rules: {
            "margin-left": "auto !important",
            "margin-right": "auto !important"
          }
        }
      ],
      spacingStyles: [
        {
          selector: " > :first-child",
          rules: {
            "margin-block-start": "0"
          }
        },
        {
          selector: " > :last-child",
          rules: {
            "margin-block-end": "0"
          }
        },
        {
          selector: " > *",
          rules: {
            "margin-block-start": null,
            "margin-block-end": "0"
          }
        }
      ]
    },
    constrained: {
      name: "constrained",
      slug: "constrained",
      className: "is-layout-constrained",
      baseStyles: [
        {
          selector: " > .alignleft",
          rules: {
            float: "left",
            "margin-inline-start": "0",
            "margin-inline-end": "2em"
          }
        },
        {
          selector: " > .alignright",
          rules: {
            float: "right",
            "margin-inline-start": "2em",
            "margin-inline-end": "0"
          }
        },
        {
          selector: " > .aligncenter",
          rules: {
            "margin-left": "auto !important",
            "margin-right": "auto !important"
          }
        },
        {
          selector: " > :where(:not(.alignleft):not(.alignright):not(.alignfull))",
          rules: {
            "max-width": "var(--wp--style--global--content-size)",
            "margin-left": "auto !important",
            "margin-right": "auto !important"
          }
        },
        {
          selector: " > .alignwide",
          rules: {
            "max-width": "var(--wp--style--global--wide-size)"
          }
        }
      ],
      spacingStyles: [
        {
          selector: " > :first-child",
          rules: {
            "margin-block-start": "0"
          }
        },
        {
          selector: " > :last-child",
          rules: {
            "margin-block-end": "0"
          }
        },
        {
          selector: " > *",
          rules: {
            "margin-block-start": null,
            "margin-block-end": "0"
          }
        }
      ]
    },
    flex: {
      name: "flex",
      slug: "flex",
      className: "is-layout-flex",
      displayMode: "flex",
      baseStyles: [
        {
          selector: "",
          rules: {
            "flex-wrap": "wrap",
            "align-items": "center"
          }
        },
        {
          selector: " > :is(*, div)",
          // :is(*, div) instead of just * increases the specificity by 001.
          rules: {
            margin: "0"
          }
        }
      ],
      spacingStyles: [
        {
          selector: "",
          rules: {
            gap: null
          }
        }
      ]
    },
    grid: {
      name: "grid",
      slug: "grid",
      className: "is-layout-grid",
      displayMode: "grid",
      baseStyles: [
        {
          selector: " > :is(*, div)",
          // :is(*, div) instead of just * increases the specificity by 001.
          rules: {
            margin: "0"
          }
        }
      ],
      spacingStyles: [
        {
          selector: "",
          rules: {
            gap: null
          }
        }
      ]
    }
  };

  // packages/global-styles-engine/build-module/core/render.mjs
  var ELEMENT_CLASS_NAMES = {
    button: "wp-element-button",
    caption: "wp-element-caption"
  };
  var BLOCK_SUPPORT_FEATURE_LEVEL_SELECTORS = {
    __experimentalBorder: "border",
    color: "color",
    dimensions: "dimensions",
    spacing: "spacing",
    typography: "typography"
  };
  function getPresetsDeclarations(blockPresets = {}, mergedSettings) {
    return PRESET_METADATA.reduce(
      (declarations, { path, valueKey, valueFunc, cssVarInfix }) => {
        const presetByOrigin = getValueFromObjectPath(
          blockPresets,
          path,
          []
        );
        ["default", "theme", "custom"].forEach((origin) => {
          if (presetByOrigin[origin]) {
            presetByOrigin[origin].forEach((value) => {
              if (valueKey && !valueFunc) {
                declarations.push(
                  `--wp--preset--${cssVarInfix}--${kebabCase(
                    value.slug
                  )}: ${value[valueKey]}`
                );
              } else if (valueFunc && typeof valueFunc === "function") {
                declarations.push(
                  `--wp--preset--${cssVarInfix}--${kebabCase(
                    value.slug
                  )}: ${valueFunc(value, mergedSettings)}`
                );
              }
            });
          }
        });
        return declarations;
      },
      []
    );
  }
  function getPresetsClasses(blockSelector = "*", blockPresets = {}) {
    return PRESET_METADATA.reduce(
      (declarations, { path, cssVarInfix, classes }) => {
        if (!classes) {
          return declarations;
        }
        const presetByOrigin = getValueFromObjectPath(
          blockPresets,
          path,
          []
        );
        ["default", "theme", "custom"].forEach((origin) => {
          if (presetByOrigin[origin]) {
            presetByOrigin[origin].forEach(
              ({ slug }) => {
                classes.forEach(
                  ({
                    classSuffix,
                    propertyName
                  }) => {
                    const classSelectorToUse = `.has-${kebabCase(
                      slug
                    )}-${classSuffix}`;
                    const selectorToUse = blockSelector.split(",").map(
                      (selector2) => `${selector2}${classSelectorToUse}`
                    ).join(",");
                    const value = `var(--wp--preset--${cssVarInfix}--${kebabCase(
                      slug
                    )})`;
                    declarations += `${selectorToUse}{${propertyName}: ${value} !important;}`;
                  }
                );
              }
            );
          }
        });
        return declarations;
      },
      ""
    );
  }
  function getPresetsSvgFilters(blockPresets = {}) {
    return PRESET_METADATA.filter(
      // Duotone are the only type of filters for now.
      (metadata) => metadata.path.at(-1) === "duotone"
    ).flatMap((metadata) => {
      const presetByOrigin = getValueFromObjectPath(
        blockPresets,
        metadata.path,
        {}
      );
      return ["default", "theme"].filter((origin) => presetByOrigin[origin]).flatMap(
        (origin) => presetByOrigin[origin].map(
          (preset) => getDuotoneFilter(
            `wp-duotone-${preset.slug}`,
            preset.colors
          )
        )
      ).join("");
    });
  }
  function flattenTree(input = {}, prefix2, token) {
    let result = [];
    Object.keys(input).forEach((key) => {
      const newKey = prefix2 + kebabCase(key.replace("/", "-"));
      const newLeaf = input[key];
      if (newLeaf instanceof Object) {
        const newPrefix = newKey + token;
        result = [...result, ...flattenTree(newLeaf, newPrefix, token)];
      } else {
        result.push(`${newKey}: ${newLeaf}`);
      }
    });
    return result;
  }
  function concatFeatureVariationSelectorString(featureSelector, styleVariationSelector) {
    const featureSelectors = featureSelector.split(",");
    const combinedSelectors = [];
    featureSelectors.forEach((selector2) => {
      combinedSelectors.push(
        `${styleVariationSelector.trim()}${selector2.trim()}`
      );
    });
    return combinedSelectors.join(", ");
  }
  var updateParagraphTextIndentSelector = (featureDeclarations, settings2, blockName) => {
    if (blockName !== "core/paragraph") {
      return featureDeclarations;
    }
    const blockSettings = settings2?.blocks?.["core/paragraph"];
    const textIndentSetting = blockSettings?.typography?.textIndent ?? settings2?.typography?.textIndent ?? "subsequent";
    if (textIndentSetting !== "all") {
      return featureDeclarations;
    }
    const oldSelector = ".wp-block-paragraph + .wp-block-paragraph";
    const newSelector = ".wp-block-paragraph";
    if (oldSelector in featureDeclarations) {
      const declarations = featureDeclarations[oldSelector];
      const updated = { ...featureDeclarations };
      delete updated[oldSelector];
      updated[newSelector] = declarations;
      return updated;
    }
    return featureDeclarations;
  };
  var getFeatureDeclarations = (selectors, styles) => {
    const declarations = {};
    Object.entries(selectors).forEach(([feature, selector2]) => {
      if (feature === "root" || !styles?.[feature]) {
        return;
      }
      const isShorthand = typeof selector2 === "string";
      if (!isShorthand && typeof selector2 === "object" && selector2 !== null) {
        Object.entries(selector2).forEach(
          ([subfeature, subfeatureSelector]) => {
            if (subfeature === "root" || !styles?.[feature][subfeature]) {
              return;
            }
            const subfeatureStyles = {
              [feature]: {
                [subfeature]: styles[feature][subfeature]
              }
            };
            const newDeclarations = getStylesDeclarations(subfeatureStyles);
            declarations[subfeatureSelector] = [
              ...declarations[subfeatureSelector] || [],
              ...newDeclarations
            ];
            delete styles[feature][subfeature];
          }
        );
      }
      if (isShorthand || typeof selector2 === "object" && selector2 !== null && "root" in selector2) {
        const featureSelector = isShorthand ? selector2 : selector2.root;
        const featureStyles = { [feature]: styles[feature] };
        const newDeclarations = getStylesDeclarations(featureStyles);
        declarations[featureSelector] = [
          ...declarations[featureSelector] || [],
          ...newDeclarations
        ];
        delete styles[feature];
      }
    });
    return declarations;
  };
  function getStylesDeclarations(blockStyles = {}, selector2 = "", useRootPaddingAlign, tree = {}, disableRootPadding = false) {
    const isRoot = ROOT_BLOCK_SELECTOR === selector2;
    const output = Object.entries(
      import_blocks3.__EXPERIMENTAL_STYLE_PROPERTY
    ).reduce(
      (declarations, [key, { value, properties, useEngine, rootOnly }]) => {
        if (rootOnly && !isRoot) {
          return declarations;
        }
        const pathToValue = value;
        if (pathToValue[0] === "elements" || useEngine) {
          return declarations;
        }
        const styleValue = getValueFromObjectPath(
          blockStyles,
          pathToValue
        );
        if (key === "--wp--style--root--padding" && (typeof styleValue === "string" || !useRootPaddingAlign)) {
          return declarations;
        }
        if (properties && typeof styleValue !== "string") {
          Object.entries(properties).forEach((entry) => {
            const [name2, prop] = entry;
            if (!getValueFromObjectPath(styleValue, [prop], false)) {
              return;
            }
            const cssProperty = name2.startsWith("--") ? name2 : kebabCase(name2);
            declarations.push(
              `${cssProperty}: ${(0, import_style_engine2.getCSSValueFromRawStyle)(
                getValueFromObjectPath(styleValue, [prop])
              )}`
            );
          });
        } else if (getValueFromObjectPath(blockStyles, pathToValue, false)) {
          const cssProperty = key.startsWith("--") ? key : kebabCase(key);
          declarations.push(
            `${cssProperty}: ${(0, import_style_engine2.getCSSValueFromRawStyle)(
              getValueFromObjectPath(blockStyles, pathToValue)
            )}`
          );
        }
        return declarations;
      },
      []
    );
    if (!!blockStyles.background) {
      if (blockStyles.background?.backgroundImage) {
        blockStyles.background.backgroundImage = getResolvedValue(
          blockStyles.background.backgroundImage,
          tree
        );
      }
      if (!isRoot && !!blockStyles.background?.backgroundImage?.id) {
        blockStyles = {
          ...blockStyles,
          background: {
            ...blockStyles.background,
            ...setBackgroundStyleDefaults(blockStyles.background)
          }
        };
      }
    }
    const extraRules = (0, import_style_engine2.getCSSRules)(blockStyles);
    extraRules.forEach((rule) => {
      if (isRoot && (useRootPaddingAlign || disableRootPadding) && rule.key.startsWith("padding")) {
        return;
      }
      const cssProperty = rule.key.startsWith("--") ? rule.key : kebabCase(rule.key);
      let ruleValue = getResolvedValue(rule.value, tree);
      if (cssProperty === "font-size") {
        ruleValue = getTypographyFontSizeValue(
          { name: "", slug: "", size: ruleValue },
          tree?.settings
        );
      }
      if (cssProperty === "aspect-ratio") {
        output.push("min-height: unset");
      }
      output.push(`${cssProperty}: ${ruleValue}`);
    });
    return output;
  }
  function getLayoutStyles({
    layoutDefinitions = LAYOUT_DEFINITIONS,
    style,
    selector: selector2,
    hasBlockGapSupport,
    hasFallbackGapSupport,
    fallbackGapValue
  }) {
    let ruleset = "";
    let gapValue = hasBlockGapSupport ? getGapCSSValue(style?.spacing?.blockGap) : "";
    if (hasFallbackGapSupport) {
      if (selector2 === ROOT_BLOCK_SELECTOR) {
        gapValue = !gapValue ? "0.5em" : gapValue;
      } else if (!hasBlockGapSupport && fallbackGapValue) {
        gapValue = fallbackGapValue;
      }
    }
    if (gapValue && layoutDefinitions) {
      Object.values(layoutDefinitions).forEach(
        ({ className, name: name2, spacingStyles }) => {
          if (!hasBlockGapSupport && "flex" !== name2 && "grid" !== name2) {
            return;
          }
          if (spacingStyles?.length) {
            spacingStyles.forEach((spacingStyle) => {
              const declarations = [];
              if (spacingStyle.rules) {
                Object.entries(spacingStyle.rules).forEach(
                  ([cssProperty, cssValue]) => {
                    declarations.push(
                      `${cssProperty}: ${cssValue ? cssValue : gapValue}`
                    );
                  }
                );
              }
              if (declarations.length) {
                let combinedSelector = "";
                if (!hasBlockGapSupport) {
                  combinedSelector = selector2 === ROOT_BLOCK_SELECTOR ? `:where(.${className}${spacingStyle?.selector || ""})` : `:where(${selector2}.${className}${spacingStyle?.selector || ""})`;
                } else {
                  combinedSelector = selector2 === ROOT_BLOCK_SELECTOR ? `:root :where(.${className})${spacingStyle?.selector || ""}` : `:root :where(${selector2}-${className})${spacingStyle?.selector || ""}`;
                }
                ruleset += `${combinedSelector} { ${declarations.join(
                  "; "
                )}; }`;
              }
            });
          }
        }
      );
      if (selector2 === ROOT_BLOCK_SELECTOR && hasBlockGapSupport) {
        ruleset += `${ROOT_CSS_PROPERTIES_SELECTOR} { --wp--style--block-gap: ${gapValue}; }`;
      }
    }
    if (selector2 === ROOT_BLOCK_SELECTOR && layoutDefinitions) {
      const validDisplayModes = ["block", "flex", "grid"];
      Object.values(layoutDefinitions).forEach(
        ({ className, displayMode, baseStyles }) => {
          if (displayMode && validDisplayModes.includes(displayMode)) {
            ruleset += `${selector2} .${className} { display:${displayMode}; }`;
          }
          if (baseStyles?.length) {
            baseStyles.forEach((baseStyle) => {
              const declarations = [];
              if (baseStyle.rules) {
                Object.entries(baseStyle.rules).forEach(
                  ([cssProperty, cssValue]) => {
                    declarations.push(
                      `${cssProperty}: ${cssValue}`
                    );
                  }
                );
              }
              if (declarations.length) {
                const combinedSelector = `.${className}${baseStyle?.selector || ""}`;
                ruleset += `${combinedSelector} { ${declarations.join(
                  "; "
                )}; }`;
              }
            });
          }
        }
      );
    }
    return ruleset;
  }
  var STYLE_KEYS = [
    "border",
    "color",
    "dimensions",
    "spacing",
    "typography",
    "filter",
    "outline",
    "shadow",
    "background"
  ];
  function pickStyleKeys(treeToPickFrom) {
    if (!treeToPickFrom) {
      return {};
    }
    const entries = Object.entries(treeToPickFrom);
    const pickedEntries = entries.filter(
      ([key]) => STYLE_KEYS.includes(key)
    );
    const clonedEntries = pickedEntries.map(([key, style]) => [
      key,
      JSON.parse(JSON.stringify(style))
    ]);
    return Object.fromEntries(clonedEntries);
  }
  var getNodesWithStyles = (tree, blockSelectors) => {
    const nodes = [];
    if (!tree?.styles) {
      return nodes;
    }
    const styles = pickStyleKeys(tree.styles);
    if (styles) {
      nodes.push({
        styles,
        selector: ROOT_BLOCK_SELECTOR,
        // Root selector (body) styles should not be wrapped in `:root where()` to keep
        // specificity at (0,0,1) and maintain backwards compatibility.
        skipSelectorWrapper: true
      });
    }
    Object.entries(import_blocks3.__EXPERIMENTAL_ELEMENTS).forEach(([name2, selector2]) => {
      if (tree.styles?.elements?.[name2]) {
        nodes.push({
          styles: tree.styles?.elements?.[name2] ?? {},
          selector: selector2,
          // Top level elements that don't use a class name should not receive the
          // `:root :where()` wrapper to maintain backwards compatibility.
          skipSelectorWrapper: !ELEMENT_CLASS_NAMES[name2]
        });
      }
    });
    Object.entries(tree.styles?.blocks ?? {}).forEach(
      ([blockName, node]) => {
        const blockStyles = pickStyleKeys(node);
        const typedNode = node;
        const variationNodesToAdd = [];
        if (typedNode?.variations) {
          const variations = {};
          Object.entries(typedNode.variations).forEach(
            ([variationName, variation]) => {
              const typedVariation = variation;
              variations[variationName] = pickStyleKeys(typedVariation);
              if (typedVariation?.css) {
                variations[variationName].css = typedVariation.css;
              }
              const variationSelector = typeof blockSelectors !== "string" ? blockSelectors[blockName]?.styleVariationSelectors?.[variationName] : void 0;
              Object.entries(
                typedVariation?.elements ?? {}
              ).forEach(([element, elementStyles]) => {
                if (elementStyles && import_blocks3.__EXPERIMENTAL_ELEMENTS[element]) {
                  variationNodesToAdd.push({
                    styles: elementStyles,
                    selector: scopeSelector(
                      variationSelector,
                      import_blocks3.__EXPERIMENTAL_ELEMENTS[element]
                    )
                  });
                }
              });
              Object.entries(typedVariation?.blocks ?? {}).forEach(
                ([
                  variationBlockName,
                  variationBlockStyles
                ]) => {
                  const variationBlockSelector = typeof blockSelectors !== "string" ? scopeSelector(
                    variationSelector,
                    blockSelectors[variationBlockName]?.selector
                  ) : void 0;
                  const variationDuotoneSelector = typeof blockSelectors !== "string" ? scopeSelector(
                    variationSelector,
                    blockSelectors[variationBlockName]?.duotoneSelector
                  ) : void 0;
                  const variationFeatureSelectors = typeof blockSelectors !== "string" ? scopeFeatureSelectors(
                    variationSelector,
                    blockSelectors[variationBlockName]?.featureSelectors ?? {}
                  ) : void 0;
                  const variationBlockStyleNodes = pickStyleKeys(variationBlockStyles);
                  if (variationBlockStyles?.css) {
                    variationBlockStyleNodes.css = variationBlockStyles.css;
                  }
                  if (!variationBlockSelector || typeof blockSelectors === "string") {
                    return;
                  }
                  variationNodesToAdd.push({
                    selector: variationBlockSelector,
                    duotoneSelector: variationDuotoneSelector,
                    featureSelectors: variationFeatureSelectors,
                    fallbackGapValue: blockSelectors[variationBlockName]?.fallbackGapValue,
                    hasLayoutSupport: blockSelectors[variationBlockName]?.hasLayoutSupport,
                    styles: variationBlockStyleNodes
                  });
                  Object.entries(
                    variationBlockStyles.elements ?? {}
                  ).forEach(
                    ([
                      variationBlockElement,
                      variationBlockElementStyles
                    ]) => {
                      if (variationBlockElementStyles && import_blocks3.__EXPERIMENTAL_ELEMENTS[variationBlockElement]) {
                        variationNodesToAdd.push({
                          styles: variationBlockElementStyles,
                          selector: scopeSelector(
                            variationBlockSelector,
                            import_blocks3.__EXPERIMENTAL_ELEMENTS[variationBlockElement]
                          )
                        });
                      }
                    }
                  );
                }
              );
            }
          );
          blockStyles.variations = variations;
        }
        if (typeof blockSelectors !== "string" && blockSelectors?.[blockName]?.selector) {
          nodes.push({
            duotoneSelector: blockSelectors[blockName].duotoneSelector,
            fallbackGapValue: blockSelectors[blockName].fallbackGapValue,
            hasLayoutSupport: blockSelectors[blockName].hasLayoutSupport,
            selector: blockSelectors[blockName].selector,
            styles: blockStyles,
            featureSelectors: blockSelectors[blockName].featureSelectors,
            styleVariationSelectors: blockSelectors[blockName].styleVariationSelectors,
            name: blockName
          });
        }
        Object.entries(typedNode?.elements ?? {}).forEach(
          ([elementName, value]) => {
            if (typeof blockSelectors !== "string" && value && blockSelectors?.[blockName] && import_blocks3.__EXPERIMENTAL_ELEMENTS[elementName]) {
              nodes.push({
                styles: value,
                selector: blockSelectors[blockName]?.selector.split(",").map((sel) => {
                  const elementSelectors = import_blocks3.__EXPERIMENTAL_ELEMENTS[elementName].split(",");
                  return elementSelectors.map(
                    (elementSelector) => sel + " " + elementSelector
                  );
                }).join(",")
              });
            }
          }
        );
        nodes.push(...variationNodesToAdd);
      }
    );
    return nodes;
  };
  var getNodesWithSettings = (tree, blockSelectors) => {
    const nodes = [];
    if (!tree?.settings) {
      return nodes;
    }
    const pickPresets = (treeToPickFrom) => {
      let presets2 = {};
      PRESET_METADATA.forEach(({ path }) => {
        const value = getValueFromObjectPath(treeToPickFrom, path, false);
        if (value !== false) {
          presets2 = setImmutably(presets2, path, value);
        }
      });
      return presets2;
    };
    const presets = pickPresets(tree.settings);
    const custom = tree.settings?.custom;
    if (Object.keys(presets).length > 0 || custom) {
      nodes.push({
        presets,
        custom,
        selector: ROOT_CSS_PROPERTIES_SELECTOR
      });
    }
    Object.entries(tree.settings?.blocks ?? {}).forEach(
      ([blockName, node]) => {
        const blockCustom = node.custom;
        if (typeof blockSelectors === "string" || !blockSelectors[blockName]) {
          return;
        }
        const blockPresets = pickPresets(node);
        if (Object.keys(blockPresets).length > 0 || blockCustom) {
          nodes.push({
            presets: blockPresets,
            custom: blockCustom,
            selector: blockSelectors[blockName]?.selector
          });
        }
      }
    );
    return nodes;
  };
  var generateCustomProperties = (tree, blockSelectors) => {
    const settings2 = getNodesWithSettings(tree, blockSelectors);
    let ruleset = "";
    settings2.forEach(({ presets, custom, selector: selector2 }) => {
      const declarations = tree?.settings ? getPresetsDeclarations(presets, tree?.settings) : [];
      const customProps = flattenTree(custom, "--wp--custom--", "--");
      if (customProps.length > 0) {
        declarations.push(...customProps);
      }
      if (declarations.length > 0) {
        ruleset += `${selector2}{${declarations.join(";")};}`;
      }
    });
    return ruleset;
  };
  var transformToStyles = (tree, blockSelectors, hasBlockGapSupport, hasFallbackGapSupport, disableLayoutStyles = false, disableRootPadding = false, styleOptions = {}) => {
    const options = {
      blockGap: true,
      blockStyles: true,
      layoutStyles: true,
      marginReset: true,
      presets: true,
      rootPadding: true,
      variationStyles: false,
      ...styleOptions
    };
    const nodesWithStyles = getNodesWithStyles(tree, blockSelectors);
    const nodesWithSettings = getNodesWithSettings(tree, blockSelectors);
    const useRootPaddingAlign = tree?.settings?.useRootPaddingAwareAlignments;
    const { contentSize, wideSize } = tree?.settings?.layout || {};
    const hasBodyStyles = options.marginReset || options.rootPadding || options.layoutStyles;
    let ruleset = "";
    if (options.presets && (contentSize || wideSize)) {
      ruleset += `${ROOT_CSS_PROPERTIES_SELECTOR} {`;
      ruleset = contentSize ? ruleset + ` --wp--style--global--content-size: ${contentSize};` : ruleset;
      ruleset = wideSize ? ruleset + ` --wp--style--global--wide-size: ${wideSize};` : ruleset;
      ruleset += "}";
    }
    if (hasBodyStyles) {
      ruleset += ":where(body) {margin: 0;";
      if (options.rootPadding && useRootPaddingAlign) {
        ruleset += `padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }
				.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
				.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;
				`;
      }
      ruleset += "}";
    }
    if (options.blockStyles) {
      nodesWithStyles.forEach(
        ({
          selector: selector2,
          duotoneSelector,
          styles,
          fallbackGapValue,
          hasLayoutSupport,
          featureSelectors,
          styleVariationSelectors,
          skipSelectorWrapper,
          name: name2
        }) => {
          if (featureSelectors) {
            let featureDeclarations = getFeatureDeclarations(
              featureSelectors,
              styles
            );
            featureDeclarations = updateParagraphTextIndentSelector(
              featureDeclarations,
              tree.settings,
              name2
            );
            Object.entries(featureDeclarations).forEach(
              ([cssSelector, declarations]) => {
                if (declarations.length) {
                  const rules = declarations.join(";");
                  ruleset += `:root :where(${cssSelector}){${rules};}`;
                }
              }
            );
          }
          if (duotoneSelector) {
            const duotoneStyles = {};
            if (styles?.filter) {
              duotoneStyles.filter = styles.filter;
              delete styles.filter;
            }
            const duotoneDeclarations = getStylesDeclarations(duotoneStyles);
            if (duotoneDeclarations.length) {
              ruleset += `${duotoneSelector}{${duotoneDeclarations.join(
                ";"
              )};}`;
            }
          }
          if (!disableLayoutStyles && (ROOT_BLOCK_SELECTOR === selector2 || hasLayoutSupport)) {
            ruleset += getLayoutStyles({
              style: styles,
              selector: selector2,
              hasBlockGapSupport,
              hasFallbackGapSupport,
              fallbackGapValue
            });
          }
          const styleDeclarations = getStylesDeclarations(
            styles,
            selector2,
            useRootPaddingAlign,
            tree,
            disableRootPadding
          );
          if (styleDeclarations?.length) {
            const generalSelector = skipSelectorWrapper ? selector2 : `:root :where(${selector2})`;
            ruleset += `${generalSelector}{${styleDeclarations.join(
              ";"
            )};}`;
          }
          if (styles?.css) {
            ruleset += processCSSNesting(
              styles.css,
              `:root :where(${selector2})`
            );
          }
          if (options.variationStyles && styleVariationSelectors) {
            Object.entries(styleVariationSelectors).forEach(
              ([styleVariationName, styleVariationSelector]) => {
                const styleVariations = styles?.variations?.[styleVariationName];
                if (styleVariations) {
                  if (featureSelectors) {
                    let featureDeclarations = getFeatureDeclarations(
                      featureSelectors,
                      styleVariations
                    );
                    featureDeclarations = updateParagraphTextIndentSelector(
                      featureDeclarations,
                      tree.settings,
                      name2
                    );
                    Object.entries(
                      featureDeclarations
                    ).forEach(
                      ([baseSelector, declarations]) => {
                        if (declarations.length) {
                          const cssSelector = concatFeatureVariationSelectorString(
                            baseSelector,
                            styleVariationSelector
                          );
                          const rules = declarations.join(";");
                          ruleset += `:root :where(${cssSelector}){${rules};}`;
                        }
                      }
                    );
                  }
                  const styleVariationDeclarations = getStylesDeclarations(
                    styleVariations,
                    styleVariationSelector,
                    useRootPaddingAlign,
                    tree
                  );
                  if (styleVariationDeclarations.length) {
                    ruleset += `:root :where(${styleVariationSelector}){${styleVariationDeclarations.join(
                      ";"
                    )};}`;
                  }
                  if (styleVariations?.css) {
                    ruleset += processCSSNesting(
                      styleVariations.css,
                      `:root :where(${styleVariationSelector})`
                    );
                  }
                  if (hasLayoutSupport && styleVariations?.spacing?.blockGap) {
                    const variationSelectorWithBlock = styleVariationSelector + selector2;
                    ruleset += getLayoutStyles({
                      style: styleVariations,
                      selector: variationSelectorWithBlock,
                      hasBlockGapSupport: true,
                      hasFallbackGapSupport,
                      fallbackGapValue
                    });
                  }
                }
              }
            );
          }
          const pseudoSelectorStyles = Object.entries(styles).filter(
            ([key]) => key.startsWith(":")
          );
          if (pseudoSelectorStyles?.length) {
            pseudoSelectorStyles.forEach(
              ([pseudoKey, pseudoStyle]) => {
                const pseudoDeclarations = getStylesDeclarations(pseudoStyle);
                if (!pseudoDeclarations?.length) {
                  return;
                }
                const _selector = selector2.split(",").map((sel) => sel + pseudoKey).join(",");
                const pseudoRule = `:root :where(${_selector}){${pseudoDeclarations.join(
                  ";"
                )};}`;
                ruleset += pseudoRule;
              }
            );
          }
        }
      );
    }
    if (options.layoutStyles) {
      ruleset = ruleset + ".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }";
      ruleset = ruleset + ".wp-site-blocks > .alignright { float: right; margin-left: 2em; }";
      ruleset = ruleset + ".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }";
    }
    if (options.blockGap && hasBlockGapSupport) {
      const gapValue = getGapCSSValue(tree?.styles?.spacing?.blockGap) || "0.5em";
      ruleset = ruleset + `:root :where(.wp-site-blocks) > * { margin-block-start: ${gapValue}; margin-block-end: 0; }`;
      ruleset = ruleset + ":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }";
      ruleset = ruleset + ":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }";
    }
    if (options.presets) {
      nodesWithSettings.forEach(({ selector: selector2, presets }) => {
        if (ROOT_BLOCK_SELECTOR === selector2 || ROOT_CSS_PROPERTIES_SELECTOR === selector2) {
          selector2 = "";
        }
        const classes = getPresetsClasses(selector2, presets);
        if (classes.length > 0) {
          ruleset += classes;
        }
      });
    }
    return ruleset;
  };
  function generateSvgFilters(tree, blockSelectors) {
    const nodesWithSettings = getNodesWithSettings(tree, blockSelectors);
    return nodesWithSettings.flatMap(({ presets }) => {
      return getPresetsSvgFilters(presets);
    });
  }
  var getSelectorsConfig = (blockType, rootSelector) => {
    if (blockType?.selectors && Object.keys(blockType.selectors).length > 0) {
      return blockType.selectors;
    }
    const config2 = {
      root: rootSelector
    };
    Object.entries(BLOCK_SUPPORT_FEATURE_LEVEL_SELECTORS).forEach(
      ([featureKey, featureName]) => {
        const featureSelector = getBlockSelector(blockType, featureKey);
        if (featureSelector) {
          config2[featureName] = featureSelector;
        }
      }
    );
    return config2;
  };
  var getBlockSelectors = (blockTypes, variationInstanceId) => {
    const { getBlockStyles } = (0, import_data17.select)(import_blocks3.store);
    const result = {};
    blockTypes.forEach((blockType) => {
      const name2 = blockType.name;
      const selector2 = getBlockSelector(blockType);
      if (!selector2) {
        return;
      }
      let duotoneSelector = getBlockSelector(blockType, "filter.duotone");
      if (!duotoneSelector) {
        const rootSelector = getBlockSelector(blockType);
        const duotoneSupport = (0, import_blocks3.getBlockSupport)(
          blockType,
          "color.__experimentalDuotone",
          false
        );
        duotoneSelector = duotoneSupport && rootSelector && scopeSelector(rootSelector, duotoneSupport);
      }
      const hasLayoutSupport = !!blockType?.supports?.layout || !!blockType?.supports?.__experimentalLayout;
      const fallbackGapValue = (
        // @ts-expect-error
        blockType?.supports?.spacing?.blockGap?.__experimentalDefault
      );
      const blockStyleVariations = getBlockStyles(name2);
      const styleVariationSelectors = {};
      blockStyleVariations?.forEach((variation) => {
        const variationSuffix = variationInstanceId ? `-${variationInstanceId}` : "";
        const variationName = `${variation.name}${variationSuffix}`;
        const styleVariationSelector = getBlockStyleVariationSelector(
          variationName,
          selector2
        );
        styleVariationSelectors[variationName] = styleVariationSelector;
      });
      const featureSelectors = getSelectorsConfig(blockType, selector2);
      result[name2] = {
        duotoneSelector: duotoneSelector ?? void 0,
        fallbackGapValue,
        featureSelectors: Object.keys(featureSelectors).length ? featureSelectors : void 0,
        hasLayoutSupport,
        name: name2,
        selector: selector2,
        styleVariationSelectors: blockStyleVariations?.length ? styleVariationSelectors : void 0
      };
    });
    return result;
  };
  function updateConfigWithSeparator(config2) {
    const blocks = config2.styles?.blocks;
    const separatorBlock = blocks?.["core/separator"];
    const needsSeparatorStyleUpdate = separatorBlock && separatorBlock.color?.background && !separatorBlock.color?.text && !separatorBlock.border?.color;
    if (needsSeparatorStyleUpdate) {
      return {
        ...config2,
        styles: {
          ...config2.styles,
          blocks: {
            ...blocks,
            "core/separator": {
              ...separatorBlock,
              color: {
                ...separatorBlock.color,
                text: separatorBlock.color?.background
              }
            }
          }
        }
      };
    }
    return config2;
  }
  function processCSSNesting(css, blockSelector) {
    let processedCSS = "";
    if (!css || css.trim() === "") {
      return processedCSS;
    }
    const parts = css.split("&");
    parts.forEach((part) => {
      if (!part || part.trim() === "") {
        return;
      }
      const isRootCss = !part.includes("{");
      if (isRootCss) {
        processedCSS += `:root :where(${blockSelector}){${part.trim()}}`;
      } else {
        const splitPart = part.replace("}", "").split("{");
        if (splitPart.length !== 2) {
          return;
        }
        const [nestedSelector, cssValue] = splitPart;
        const matches = nestedSelector.match(/([>+~\s]*::[a-zA-Z-]+)/);
        const pseudoPart = matches ? matches[1] : "";
        const withoutPseudoElement = matches ? nestedSelector.replace(pseudoPart, "").trim() : nestedSelector.trim();
        let combinedSelector;
        if (withoutPseudoElement === "") {
          combinedSelector = blockSelector;
        } else {
          combinedSelector = nestedSelector.startsWith(" ") ? scopeSelector(blockSelector, withoutPseudoElement) : appendToSelector(blockSelector, withoutPseudoElement);
        }
        processedCSS += `:root :where(${combinedSelector})${pseudoPart}{${cssValue.trim()}}`;
      }
    });
    return processedCSS;
  }
  function generateGlobalStyles(config2 = {}, blockTypes = [], options = {}) {
    const {
      hasBlockGapSupport: hasBlockGapSupportOption,
      hasFallbackGapSupport: hasFallbackGapSupportOption,
      disableLayoutStyles = false,
      disableRootPadding = false,
      styleOptions = {}
    } = options;
    const blocks = blockTypes.length > 0 ? blockTypes : (0, import_blocks3.getBlockTypes)();
    const blockGap = getSetting(config2, "spacing.blockGap");
    const hasBlockGapSupport = hasBlockGapSupportOption ?? blockGap !== null;
    const hasFallbackGapSupport = hasFallbackGapSupportOption ?? !hasBlockGapSupport;
    if (!config2?.styles || !config2?.settings) {
      return [[], {}];
    }
    const updatedConfig = updateConfigWithSeparator(config2);
    const blockSelectors = getBlockSelectors(blocks);
    const customProperties = generateCustomProperties(
      updatedConfig,
      blockSelectors
    );
    const globalStyles = transformToStyles(
      updatedConfig,
      blockSelectors,
      hasBlockGapSupport,
      hasFallbackGapSupport,
      disableLayoutStyles,
      disableRootPadding,
      styleOptions
    );
    const svgs = generateSvgFilters(updatedConfig, blockSelectors);
    const styles = [
      {
        css: customProperties,
        isGlobalStyles: true
      },
      {
        css: globalStyles,
        isGlobalStyles: true
      },
      // Load custom CSS in own stylesheet so that any invalid CSS entered in the input won't break all the global styles in the editor.
      {
        css: updatedConfig?.styles?.css ?? "",
        isGlobalStyles: true
      },
      {
        assets: svgs,
        __unstableType: "svg",
        isGlobalStyles: true
      }
    ];
    blocks.forEach((blockType) => {
      const blockStyles = updatedConfig?.styles?.blocks?.[blockType.name];
      if (blockStyles?.css) {
        const selector2 = blockSelectors[blockType.name].selector;
        styles.push({
          css: processCSSNesting(blockStyles.css, selector2),
          isGlobalStyles: true
        });
      }
    });
    return [styles, updatedConfig.settings];
  }

  // packages/global-styles-ui/build-module/provider.mjs
  var import_element19 = __toESM(require_element(), 1);

  // packages/global-styles-ui/build-module/context.mjs
  var import_element18 = __toESM(require_element(), 1);
  var GlobalStylesContext = (0, import_element18.createContext)({
    user: { styles: {}, settings: {} },
    base: { styles: {}, settings: {} },
    merged: { styles: {}, settings: {} },
    onChange: () => {
    },
    fontLibraryEnabled: false
  });

  // packages/global-styles-ui/build-module/provider.mjs
  var import_jsx_runtime81 = __toESM(require_jsx_runtime(), 1);
  function GlobalStylesProvider({
    children,
    value,
    baseValue,
    onChange,
    fontLibraryEnabled
  }) {
    const merged = (0, import_element19.useMemo)(() => {
      return mergeGlobalStyles(baseValue, value);
    }, [baseValue, value]);
    const contextValue = (0, import_element19.useMemo)(
      () => ({
        user: value,
        base: baseValue,
        merged,
        onChange,
        fontLibraryEnabled
      }),
      [value, baseValue, merged, onChange, fontLibraryEnabled]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(GlobalStylesContext.Provider, { value: contextValue, children });
  }

  // packages/global-styles-ui/build-module/screen-root.mjs
  var import_components18 = __toESM(require_components(), 1);
  var import_i18n15 = __toESM(require_i18n(), 1);
  var import_data19 = __toESM(require_data(), 1);
  var import_core_data15 = __toESM(require_core_data(), 1);

  // packages/global-styles-ui/build-module/icon-with-current-color.mjs
  var import_jsx_runtime82 = __toESM(require_jsx_runtime(), 1);
  function IconWithCurrentColor({
    className,
    ...props
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
      icon_default,
      {
        className: clsx_default(
          className,
          "global-styles-ui-icon-with-current-color"
        ),
        ...props
      }
    );
  }

  // packages/global-styles-ui/build-module/navigation-button.mjs
  var import_components12 = __toESM(require_components(), 1);
  var import_jsx_runtime83 = __toESM(require_jsx_runtime(), 1);
  function GenericNavigationButton({
    icon,
    children,
    ...props
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_components12.__experimentalItem, { ...props, children: [
      icon && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_components12.__experimentalHStack, { justify: "flex-start", children: [
        /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(IconWithCurrentColor, { icon, size: 24 }),
        /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_components12.FlexItem, { children })
      ] }),
      !icon && children
    ] });
  }
  function NavigationButtonAsItem(props) {
    return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_components12.Navigator.Button, { as: GenericNavigationButton, ...props });
  }

  // packages/global-styles-ui/build-module/root-menu.mjs
  var import_components13 = __toESM(require_components(), 1);
  var import_i18n13 = __toESM(require_i18n(), 1);
  var import_block_editor4 = __toESM(require_block_editor(), 1);

  // node_modules/colord/plugins/a11y.mjs
  var o2 = function(o3) {
    var t3 = o3 / 255;
    return t3 < 0.04045 ? t3 / 12.92 : Math.pow((t3 + 0.055) / 1.055, 2.4);
  };
  var t2 = function(t3) {
    return 0.2126 * o2(t3.r) + 0.7152 * o2(t3.g) + 0.0722 * o2(t3.b);
  };
  function a11y_default(o3) {
    o3.prototype.luminance = function() {
      return o4 = t2(this.rgba), void 0 === (r3 = 2) && (r3 = 0), void 0 === n2 && (n2 = Math.pow(10, r3)), Math.round(n2 * o4) / n2 + 0;
      var o4, r3, n2;
    }, o3.prototype.contrast = function(r3) {
      void 0 === r3 && (r3 = "#FFF");
      var n2, a2, i2, e2, v2, u2, d2, c6 = r3 instanceof o3 ? r3 : new o3(r3);
      return e2 = this.rgba, v2 = c6.toRgb(), u2 = t2(e2), d2 = t2(v2), n2 = u2 > d2 ? (u2 + 0.05) / (d2 + 0.05) : (d2 + 0.05) / (u2 + 0.05), void 0 === (a2 = 2) && (a2 = 0), void 0 === i2 && (i2 = Math.pow(10, a2)), Math.floor(i2 * n2) / i2 + 0;
    }, o3.prototype.isReadable = function(o4, t3) {
      return void 0 === o4 && (o4 = "#FFF"), void 0 === t3 && (t3 = {}), this.contrast(o4) >= (e2 = void 0 === (i2 = (r3 = t3).size) ? "normal" : i2, "AAA" === (a2 = void 0 === (n2 = r3.level) ? "AA" : n2) && "normal" === e2 ? 7 : "AA" === a2 && "large" === e2 ? 3 : 4.5);
      var r3, n2, a2, i2, e2;
    };
  }

  // packages/global-styles-ui/build-module/hooks.mjs
  var import_element20 = __toESM(require_element(), 1);
  var import_data18 = __toESM(require_data(), 1);
  var import_core_data14 = __toESM(require_core_data(), 1);
  var import_i18n12 = __toESM(require_i18n(), 1);

  // packages/global-styles-ui/build-module/utils.mjs
  function removePropertiesFromObject(object, properties) {
    if (!properties?.length) {
      return object;
    }
    if (typeof object !== "object" || !object || !Object.keys(object).length) {
      return object;
    }
    for (const key in object) {
      if (properties.includes(key)) {
        delete object[key];
      } else if (typeof object[key] === "object") {
        removePropertiesFromObject(object[key], properties);
      }
    }
    return object;
  }
  var filterObjectByProperties = (object, properties) => {
    if (!object || !properties?.length) {
      return {};
    }
    const newObject = {};
    Object.keys(object).forEach((key) => {
      if (properties.includes(key)) {
        newObject[key] = object[key];
      } else if (typeof object[key] === "object") {
        const newFilter = filterObjectByProperties(
          object[key],
          properties
        );
        if (Object.keys(newFilter).length) {
          newObject[key] = newFilter;
        }
      }
    });
    return newObject;
  };
  function isVariationWithProperties(variation, properties) {
    const variationWithProperties = filterObjectByProperties(
      structuredClone(variation),
      properties
    );
    return areGlobalStylesEqual(variationWithProperties, variation);
  }
  function getFontFamilyFromSetting(fontFamilies, setting) {
    if (!Array.isArray(fontFamilies) || !setting) {
      return null;
    }
    const fontFamilyVariable = setting.replace("var(", "").replace(")", "");
    const fontFamilySlug = fontFamilyVariable?.split("--").slice(-1)[0];
    return fontFamilies.find(
      (fontFamily) => fontFamily.slug === fontFamilySlug
    );
  }
  function getFontFamilies(themeJson) {
    const themeFontFamilies = themeJson?.settings?.typography?.fontFamilies?.theme;
    const customFontFamilies = themeJson?.settings?.typography?.fontFamilies?.custom;
    let fontFamilies = [];
    if (themeFontFamilies && customFontFamilies) {
      fontFamilies = [...themeFontFamilies, ...customFontFamilies];
    } else if (themeFontFamilies) {
      fontFamilies = themeFontFamilies;
    } else if (customFontFamilies) {
      fontFamilies = customFontFamilies;
    }
    const bodyFontFamilySetting = themeJson?.styles?.typography?.fontFamily;
    const bodyFontFamily = getFontFamilyFromSetting(
      fontFamilies,
      bodyFontFamilySetting
    );
    const headingFontFamilySetting = themeJson?.styles?.elements?.heading?.typography?.fontFamily;
    let headingFontFamily;
    if (!headingFontFamilySetting) {
      headingFontFamily = bodyFontFamily;
    } else {
      headingFontFamily = getFontFamilyFromSetting(
        fontFamilies,
        themeJson?.styles?.elements?.heading?.typography?.fontFamily
      );
    }
    return [bodyFontFamily, headingFontFamily];
  }

  // packages/global-styles-ui/build-module/hooks.mjs
  k([a11y_default]);
  function useStyle2(path, blockName, readFrom = "merged", shouldDecodeEncode = true) {
    const { user, base, merged, onChange } = (0, import_element20.useContext)(GlobalStylesContext);
    let sourceValue = merged;
    if (readFrom === "base") {
      sourceValue = base;
    } else if (readFrom === "user") {
      sourceValue = user;
    }
    const styleValue = (0, import_element20.useMemo)(
      () => getStyle(sourceValue, path, blockName, shouldDecodeEncode),
      [sourceValue, path, blockName, shouldDecodeEncode]
    );
    const setStyleValue = (0, import_element20.useCallback)(
      (newValue) => {
        const newGlobalStyles = setStyle(
          user,
          path,
          newValue,
          blockName
        );
        onChange(newGlobalStyles);
      },
      [user, onChange, path, blockName]
    );
    return [styleValue, setStyleValue];
  }
  function useSetting(path, blockName, readFrom = "merged") {
    const { user, base, merged, onChange } = (0, import_element20.useContext)(GlobalStylesContext);
    let sourceValue = merged;
    if (readFrom === "base") {
      sourceValue = base;
    } else if (readFrom === "user") {
      sourceValue = user;
    }
    const settingValue = (0, import_element20.useMemo)(
      () => getSetting(sourceValue, path, blockName),
      [sourceValue, path, blockName]
    );
    const setSettingValue = (0, import_element20.useCallback)(
      (newValue) => {
        const newGlobalStyles = setSetting(
          user,
          path,
          newValue,
          blockName
        );
        onChange(newGlobalStyles);
      },
      [user, onChange, path, blockName]
    );
    return [settingValue, setSettingValue];
  }
  var EMPTY_ARRAY3 = [];
  function hasThemeVariation({
    title,
    settings: settings2,
    styles
  }) {
    return title === (0, import_i18n12.__)("Default") || Object.keys(settings2 || {}).length > 0 || Object.keys(styles || {}).length > 0;
  }
  function useCurrentMergeThemeStyleVariationsWithUserConfig(properties = []) {
    const { variationsFromTheme } = (0, import_data18.useSelect)((select3) => {
      const _variationsFromTheme = select3(
        import_core_data14.store
      ).__experimentalGetCurrentThemeGlobalStylesVariations?.();
      return {
        variationsFromTheme: _variationsFromTheme || EMPTY_ARRAY3
      };
    }, []);
    const { user: userVariation } = (0, import_element20.useContext)(GlobalStylesContext);
    return (0, import_element20.useMemo)(() => {
      const clonedUserVariation = structuredClone(userVariation);
      const userVariationWithoutProperties = removePropertiesFromObject(
        clonedUserVariation,
        properties
      );
      userVariationWithoutProperties.title = (0, import_i18n12.__)("Default");
      const variationsWithPropertiesAndBase = variationsFromTheme.filter((variation) => {
        return isVariationWithProperties(variation, properties);
      }).map((variation) => {
        return mergeGlobalStyles(
          userVariationWithoutProperties,
          variation
        );
      });
      const variationsByProperties = [
        userVariationWithoutProperties,
        ...variationsWithPropertiesAndBase
      ];
      return variationsByProperties?.length ? variationsByProperties.filter(hasThemeVariation) : [];
    }, [properties, userVariation, variationsFromTheme]);
  }

  // packages/global-styles-ui/build-module/lock-unlock.mjs
  var import_private_apis2 = __toESM(require_private_apis(), 1);
  var { lock: lock2, unlock: unlock2 } = (0, import_private_apis2.__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/global-styles-ui"
  );

  // packages/global-styles-ui/build-module/root-menu.mjs
  var import_jsx_runtime84 = __toESM(require_jsx_runtime(), 1);
  var {
    useHasDimensionsPanel,
    useHasTypographyPanel,
    useHasColorPanel,
    useSettingsForBlockElement,
    useHasBackgroundPanel
  } = unlock2(import_block_editor4.privateApis);

  // packages/global-styles-ui/build-module/preview-styles.mjs
  var import_components17 = __toESM(require_components(), 1);

  // packages/global-styles-ui/build-module/preview-hooks.mjs
  function useStylesPreviewColors() {
    const [textColor = "black"] = useStyle2("color.text");
    const [backgroundColor = "white"] = useStyle2("color.background");
    const [headingColor = textColor] = useStyle2(
      "elements.h1.color.text"
    );
    const [linkColor = headingColor] = useStyle2(
      "elements.link.color.text"
    );
    const [buttonBackgroundColor = linkColor] = useStyle2(
      "elements.button.color.background"
    );
    const [coreColors] = useSetting("color.palette.core") || [];
    const [themeColors] = useSetting("color.palette.theme") || [];
    const [customColors] = useSetting("color.palette.custom") || [];
    const paletteColors = (themeColors ?? []).concat(customColors ?? []).concat(coreColors ?? []);
    const textColorObject = paletteColors.filter(
      ({ color }) => color === textColor
    );
    const buttonBackgroundColorObject = paletteColors.filter(
      ({ color }) => color === buttonBackgroundColor
    );
    const highlightedColors = textColorObject.concat(buttonBackgroundColorObject).concat(paletteColors).filter(
      // we exclude these background color because it is already visible in the preview.
      ({ color }) => color !== backgroundColor
    ).slice(0, 2);
    return {
      paletteColors,
      highlightedColors
    };
  }

  // packages/global-styles-ui/build-module/typography-example.mjs
  var import_element21 = __toESM(require_element(), 1);
  var import_components14 = __toESM(require_components(), 1);
  var import_i18n14 = __toESM(require_i18n(), 1);

  // packages/global-styles-ui/build-module/font-library/utils/preview-styles.mjs
  function findNearest(input, numbers) {
    if (numbers.length === 0) {
      return null;
    }
    numbers.sort((a2, b2) => Math.abs(input - a2) - Math.abs(input - b2));
    return numbers[0];
  }
  function extractFontWeights(fontFaces) {
    const result = [];
    fontFaces.forEach((face) => {
      const weights = String(face.fontWeight).split(" ");
      if (weights.length === 2) {
        const start2 = parseInt(weights[0]);
        const end = parseInt(weights[1]);
        for (let i2 = start2; i2 <= end; i2 += 100) {
          result.push(i2);
        }
      } else if (weights.length === 1) {
        result.push(parseInt(weights[0]));
      }
    });
    return result;
  }
  function formatFontFamily(input) {
    const regex = /^(?!generic\([ a-zA-Z\-]+\)$)(?!^[a-zA-Z\-]+$).+/;
    const output = input.trim();
    const formatItem = (item) => {
      item = item.trim();
      if (item.match(regex)) {
        item = item.replace(/^["']|["']$/g, "");
        return `"${item}"`;
      }
      return item;
    };
    if (output.includes(",")) {
      return output.split(",").map(formatItem).filter((item) => item !== "").join(", ");
    }
    return formatItem(output);
  }
  function getFamilyPreviewStyle(family) {
    const style = {
      fontFamily: formatFontFamily(family.fontFamily)
    };
    if (!("fontFace" in family) || !Array.isArray(family.fontFace)) {
      style.fontWeight = "400";
      style.fontStyle = "normal";
      return style;
    }
    if (family.fontFace) {
      const normalFaces = family.fontFace.filter(
        (face) => face?.fontStyle && face.fontStyle.toLowerCase() === "normal"
      );
      if (normalFaces.length > 0) {
        style.fontStyle = "normal";
        const normalWeights = extractFontWeights(normalFaces);
        const nearestWeight = findNearest(400, normalWeights);
        style.fontWeight = String(nearestWeight) || "400";
      } else {
        style.fontStyle = family.fontFace.length && family.fontFace[0].fontStyle || "normal";
        style.fontWeight = family.fontFace.length && String(family.fontFace[0].fontWeight) || "400";
      }
    }
    return style;
  }

  // packages/global-styles-ui/build-module/typography-example.mjs
  var import_jsx_runtime85 = __toESM(require_jsx_runtime(), 1);
  function PreviewTypography({
    fontSize,
    variation
  }) {
    const { base } = (0, import_element21.useContext)(GlobalStylesContext);
    let config2 = base;
    if (variation) {
      config2 = { ...base, ...variation };
    }
    const [textColor] = useStyle2("color.text");
    const [bodyFontFamilies, headingFontFamilies] = getFontFamilies(config2);
    const bodyPreviewStyle = bodyFontFamilies ? getFamilyPreviewStyle(bodyFontFamilies) : {};
    const headingPreviewStyle = headingFontFamilies ? getFamilyPreviewStyle(headingFontFamilies) : {};
    if (textColor) {
      bodyPreviewStyle.color = textColor;
      headingPreviewStyle.color = textColor;
    }
    if (fontSize) {
      bodyPreviewStyle.fontSize = fontSize;
      headingPreviewStyle.fontSize = fontSize;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
      import_components14.__unstableMotion.div,
      {
        animate: {
          scale: 1,
          opacity: 1
        },
        initial: {
          scale: 0.1,
          opacity: 0
        },
        transition: {
          delay: 0.3,
          type: "tween"
        },
        style: {
          textAlign: "center",
          lineHeight: 1
        },
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { style: headingPreviewStyle, children: (0, import_i18n14._x)("A", "Uppercase letter A") }),
          /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { style: bodyPreviewStyle, children: (0, import_i18n14._x)("a", "Lowercase letter A") })
        ]
      }
    );
  }

  // packages/global-styles-ui/build-module/highlighted-colors.mjs
  var import_components15 = __toESM(require_components(), 1);
  var import_jsx_runtime86 = __toESM(require_jsx_runtime(), 1);
  function HighlightedColors({
    normalizedColorSwatchSize,
    ratio
  }) {
    const { highlightedColors } = useStylesPreviewColors();
    const scaledSwatchSize = normalizedColorSwatchSize * ratio;
    return highlightedColors.map(({ slug, color }, index) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
      import_components15.__unstableMotion.div,
      {
        style: {
          height: scaledSwatchSize,
          width: scaledSwatchSize,
          background: color,
          borderRadius: scaledSwatchSize / 2
        },
        animate: {
          scale: 1,
          opacity: 1
        },
        initial: {
          scale: 0.1,
          opacity: 0
        },
        transition: {
          delay: index === 1 ? 0.2 : 0.1
        }
      },
      `${slug}-${index}`
    ));
  }

  // packages/global-styles-ui/build-module/preview-wrapper.mjs
  var import_components16 = __toESM(require_components(), 1);
  var import_compose3 = __toESM(require_compose(), 1);
  var import_element22 = __toESM(require_element(), 1);
  var import_jsx_runtime87 = __toESM(require_jsx_runtime(), 1);
  var normalizedWidth = 248;
  var normalizedHeight = 152;
  var THROTTLE_OPTIONS = {
    leading: true,
    trailing: true
  };
  function PreviewWrapper({
    children,
    label,
    isFocused,
    withHoverView
  }) {
    const [backgroundColor = "white"] = useStyle2("color.background");
    const [gradientValue] = useStyle2("color.gradient");
    const disableMotion = (0, import_compose3.useReducedMotion)();
    const [isHovered, setIsHovered] = (0, import_element22.useState)(false);
    const [containerResizeListener, { width }] = (0, import_compose3.useResizeObserver)();
    const [throttledWidth, setThrottledWidthState] = (0, import_element22.useState)(width);
    const [ratioState, setRatioState] = (0, import_element22.useState)();
    const setThrottledWidth = (0, import_compose3.useThrottle)(
      setThrottledWidthState,
      250,
      THROTTLE_OPTIONS
    );
    (0, import_element22.useLayoutEffect)(() => {
      if (width) {
        setThrottledWidth(width);
      }
    }, [width, setThrottledWidth]);
    (0, import_element22.useLayoutEffect)(() => {
      const newRatio = throttledWidth ? throttledWidth / normalizedWidth : 1;
      const ratioDiff = newRatio - (ratioState || 0);
      const isRatioDiffBigEnough = Math.abs(ratioDiff) > 0.1;
      if (isRatioDiffBigEnough || !ratioState) {
        setRatioState(newRatio);
      }
    }, [throttledWidth, ratioState]);
    const fallbackRatio = width ? width / normalizedWidth : 1;
    const ratio = ratioState ? ratioState : fallbackRatio;
    const isReady = !!width;
    return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { style: { position: "relative" }, children: containerResizeListener }),
      isReady && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
        "div",
        {
          className: "global-styles-ui-preview__wrapper",
          style: {
            height: normalizedHeight * ratio
          },
          onMouseEnter: () => setIsHovered(true),
          onMouseLeave: () => setIsHovered(false),
          tabIndex: -1,
          children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
            import_components16.__unstableMotion.div,
            {
              style: {
                height: normalizedHeight * ratio,
                width: "100%",
                background: gradientValue ?? backgroundColor,
                cursor: withHoverView ? "pointer" : void 0
              },
              initial: "start",
              animate: (isHovered || isFocused) && !disableMotion && label ? "hover" : "start",
              children: [].concat(children).map(
                (child, key) => child({ ratio, key })
              )
            }
          )
        }
      )
    ] });
  }
  var preview_wrapper_default = PreviewWrapper;

  // packages/global-styles-ui/build-module/preview-styles.mjs
  var import_jsx_runtime88 = __toESM(require_jsx_runtime(), 1);
  var firstFrameVariants = {
    start: {
      scale: 1,
      opacity: 1
    },
    hover: {
      scale: 0,
      opacity: 0
    }
  };
  var midFrameVariants = {
    hover: {
      opacity: 1
    },
    start: {
      opacity: 0.5
    }
  };
  var secondFrameVariants = {
    hover: {
      scale: 1,
      opacity: 1
    },
    start: {
      scale: 0,
      opacity: 0
    }
  };
  function PreviewStyles({
    label,
    isFocused,
    withHoverView,
    variation
  }) {
    const [fontWeight] = useStyle2("typography.fontWeight");
    const [fontFamily = "serif"] = useStyle2(
      "typography.fontFamily"
    );
    const [headingFontFamily = fontFamily] = useStyle2(
      "elements.h1.typography.fontFamily"
    );
    const [headingFontWeight = fontWeight] = useStyle2(
      "elements.h1.typography.fontWeight"
    );
    const [textColor = "black"] = useStyle2("color.text");
    const [headingColor = textColor] = useStyle2(
      "elements.h1.color.text"
    );
    const { paletteColors } = useStylesPreviewColors();
    return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
      preview_wrapper_default,
      {
        label,
        isFocused,
        withHoverView,
        children: [
          ({ ratio, key }) => /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
            import_components17.__unstableMotion.div,
            {
              variants: firstFrameVariants,
              style: {
                height: "100%",
                overflow: "hidden"
              },
              children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
                import_components17.__experimentalHStack,
                {
                  spacing: 10 * ratio,
                  justify: "center",
                  style: {
                    height: "100%",
                    overflow: "hidden"
                  },
                  children: [
                    /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
                      PreviewTypography,
                      {
                        fontSize: 65 * ratio,
                        variation
                      }
                    ),
                    /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_components17.__experimentalVStack, { spacing: 4 * ratio, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
                      HighlightedColors,
                      {
                        normalizedColorSwatchSize: 32,
                        ratio
                      }
                    ) })
                  ]
                }
              )
            },
            key
          ),
          ({ key }) => /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
            import_components17.__unstableMotion.div,
            {
              variants: withHoverView ? midFrameVariants : void 0,
              style: {
                height: "100%",
                width: "100%",
                position: "absolute",
                top: 0,
                overflow: "hidden",
                filter: "blur(60px)",
                opacity: 0.1
              },
              children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
                import_components17.__experimentalHStack,
                {
                  spacing: 0,
                  justify: "flex-start",
                  style: {
                    height: "100%",
                    overflow: "hidden"
                  },
                  children: paletteColors.slice(0, 4).map(({ color }, index) => /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
                    "div",
                    {
                      style: {
                        height: "100%",
                        background: color,
                        flexGrow: 1
                      }
                    },
                    index
                  ))
                }
              )
            },
            key
          ),
          ({ ratio, key }) => /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
            import_components17.__unstableMotion.div,
            {
              variants: secondFrameVariants,
              style: {
                height: "100%",
                width: "100%",
                overflow: "hidden",
                position: "absolute",
                top: 0
              },
              children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
                import_components17.__experimentalVStack,
                {
                  spacing: 3 * ratio,
                  justify: "center",
                  style: {
                    height: "100%",
                    overflow: "hidden",
                    padding: 10 * ratio,
                    boxSizing: "border-box"
                  },
                  children: label && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
                    "div",
                    {
                      style: {
                        fontSize: 40 * ratio,
                        fontFamily: headingFontFamily,
                        color: headingColor,
                        fontWeight: headingFontWeight,
                        lineHeight: "1em",
                        textAlign: "center"
                      },
                      children: label
                    }
                  )
                }
              )
            },
            key
          )
        ]
      }
    );
  }
  var preview_styles_default = PreviewStyles;

  // packages/global-styles-ui/build-module/screen-root.mjs
  var import_jsx_runtime89 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/screen-block-list.mjs
  var import_blocks5 = __toESM(require_blocks(), 1);
  var import_i18n17 = __toESM(require_i18n(), 1);
  var import_components21 = __toESM(require_components(), 1);
  var import_data21 = __toESM(require_data(), 1);
  var import_element23 = __toESM(require_element(), 1);
  var import_block_editor5 = __toESM(require_block_editor(), 1);
  var import_compose4 = __toESM(require_compose(), 1);
  var import_a11y2 = __toESM(require_a11y(), 1);

  // packages/global-styles-ui/build-module/variations/variations-panel.mjs
  var import_blocks4 = __toESM(require_blocks(), 1);
  var import_data20 = __toESM(require_data(), 1);
  var import_components19 = __toESM(require_components(), 1);
  var import_jsx_runtime90 = __toESM(require_jsx_runtime(), 1);
  function getFilteredBlockStyles(blockStyles, variations) {
    return blockStyles?.filter(
      (style) => style.source === "block" || variations.includes(style.name)
    ) || [];
  }
  function useBlockVariations(name2) {
    const blockStyles = (0, import_data20.useSelect)(
      (select3) => {
        const { getBlockStyles } = select3(import_blocks4.store);
        return getBlockStyles(name2);
      },
      [name2]
    );
    const [variations] = useStyle2("variations", name2);
    const variationNames = Object.keys(variations ?? {});
    return getFilteredBlockStyles(blockStyles, variationNames);
  }

  // packages/global-styles-ui/build-module/screen-header.mjs
  var import_components20 = __toESM(require_components(), 1);
  var import_i18n16 = __toESM(require_i18n(), 1);
  var import_jsx_runtime91 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/screen-block-list.mjs
  var import_jsx_runtime92 = __toESM(require_jsx_runtime(), 1);
  var {
    useHasDimensionsPanel: useHasDimensionsPanel2,
    useHasTypographyPanel: useHasTypographyPanel2,
    useHasBorderPanel,
    useSettingsForBlockElement: useSettingsForBlockElement2,
    useHasColorPanel: useHasColorPanel2
  } = unlock2(import_block_editor5.privateApis);
  function useSortedBlockTypes() {
    const blockItems = (0, import_data21.useSelect)(
      (select3) => select3(import_blocks5.store).getBlockTypes(),
      []
    );
    const groupByType = (blocks, block) => {
      const { core, noncore } = blocks;
      const type = block.name.startsWith("core/") ? core : noncore;
      type.push(block);
      return blocks;
    };
    const { core: coreItems, noncore: nonCoreItems } = blockItems.reduce(
      groupByType,
      { core: [], noncore: [] }
    );
    return [...coreItems, ...nonCoreItems];
  }
  function useBlockHasGlobalStyles(blockName) {
    const [rawSettings] = useSetting("", blockName);
    const settings2 = useSettingsForBlockElement2(rawSettings, blockName);
    const hasTypographyPanel = useHasTypographyPanel2(settings2);
    const hasColorPanel = useHasColorPanel2(settings2);
    const hasBorderPanel = useHasBorderPanel(settings2);
    const hasDimensionsPanel = useHasDimensionsPanel2(settings2);
    const hasLayoutPanel = hasBorderPanel || hasDimensionsPanel;
    const hasVariationsPanel = !!useBlockVariations(blockName)?.length;
    const hasGlobalStyles = hasTypographyPanel || hasColorPanel || hasLayoutPanel || hasVariationsPanel;
    return hasGlobalStyles;
  }
  function BlockMenuItem({ block }) {
    const hasBlockMenuItem = useBlockHasGlobalStyles(block.name);
    if (!hasBlockMenuItem) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
      NavigationButtonAsItem,
      {
        path: "/blocks/" + encodeURIComponent(block.name),
        children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_components21.__experimentalHStack, { justify: "flex-start", children: [
          /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_block_editor5.BlockIcon, { icon: block.icon }),
          /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_components21.FlexItem, { children: block.title })
        ] })
      }
    );
  }
  function BlockList({ filterValue }) {
    const sortedBlockTypes = useSortedBlockTypes();
    const debouncedSpeak = (0, import_compose4.useDebounce)(import_a11y2.speak, 500);
    const { isMatchingSearchTerm } = (0, import_data21.useSelect)(import_blocks5.store);
    const filteredBlockTypes = !filterValue ? sortedBlockTypes : sortedBlockTypes.filter(
      (blockType) => isMatchingSearchTerm(blockType, filterValue)
    );
    const blockTypesListRef = (0, import_element23.useRef)(null);
    (0, import_element23.useEffect)(() => {
      if (!filterValue) {
        return;
      }
      const count = blockTypesListRef.current?.childElementCount || 0;
      const resultsFoundMessage = (0, import_i18n17.sprintf)(
        /* translators: %d: number of results. */
        (0, import_i18n17._n)("%d result found.", "%d results found.", count),
        count
      );
      debouncedSpeak(resultsFoundMessage, "polite");
    }, [filterValue, debouncedSpeak]);
    return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
      "div",
      {
        ref: blockTypesListRef,
        className: "global-styles-ui-block-types-item-list",
        role: "list",
        children: filteredBlockTypes.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_components21.__experimentalText, { align: "center", as: "p", children: (0, import_i18n17.__)("No blocks found.") }) : filteredBlockTypes.map((block) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
          BlockMenuItem,
          {
            block
          },
          "menu-itemblock-" + block.name
        ))
      }
    );
  }
  var MemoizedBlockList = (0, import_element23.memo)(BlockList);

  // packages/global-styles-ui/build-module/screen-block.mjs
  var import_blocks7 = __toESM(require_blocks(), 1);
  var import_block_editor7 = __toESM(require_block_editor(), 1);
  var import_element25 = __toESM(require_element(), 1);
  var import_data22 = __toESM(require_data(), 1);
  var import_core_data16 = __toESM(require_core_data(), 1);
  var import_components24 = __toESM(require_components(), 1);
  var import_i18n18 = __toESM(require_i18n(), 1);

  // packages/global-styles-ui/build-module/block-preview-panel.mjs
  var import_block_editor6 = __toESM(require_block_editor(), 1);
  var import_blocks6 = __toESM(require_blocks(), 1);
  var import_components22 = __toESM(require_components(), 1);
  var import_element24 = __toESM(require_element(), 1);
  var import_jsx_runtime93 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/subtitle.mjs
  var import_components23 = __toESM(require_components(), 1);
  var import_jsx_runtime94 = __toESM(require_jsx_runtime(), 1);
  function Subtitle({ children, level = 2 }) {
    return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_components23.__experimentalHeading, { className: "global-styles-ui-subtitle", level, children });
  }

  // packages/global-styles-ui/build-module/screen-block.mjs
  var import_jsx_runtime95 = __toESM(require_jsx_runtime(), 1);
  var {
    useHasDimensionsPanel: useHasDimensionsPanel3,
    useHasTypographyPanel: useHasTypographyPanel3,
    useHasBorderPanel: useHasBorderPanel2,
    useSettingsForBlockElement: useSettingsForBlockElement3,
    useHasColorPanel: useHasColorPanel3,
    useHasFiltersPanel,
    useHasImageSettingsPanel,
    useHasBackgroundPanel: useHasBackgroundPanel2,
    BackgroundPanel: StylesBackgroundPanel,
    BorderPanel: StylesBorderPanel,
    ColorPanel: StylesColorPanel,
    TypographyPanel: StylesTypographyPanel,
    DimensionsPanel: StylesDimensionsPanel,
    FiltersPanel: StylesFiltersPanel,
    ImageSettingsPanel,
    AdvancedPanel: StylesAdvancedPanel
  } = unlock2(import_block_editor7.privateApis);

  // packages/global-styles-ui/build-module/screen-typography.mjs
  var import_i18n32 = __toESM(require_i18n(), 1);
  var import_components44 = __toESM(require_components(), 1);
  var import_element36 = __toESM(require_element(), 1);

  // packages/global-styles-ui/build-module/screen-body.mjs
  var import_components25 = __toESM(require_components(), 1);
  var import_jsx_runtime96 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/typography-elements.mjs
  var import_i18n19 = __toESM(require_i18n(), 1);
  var import_components26 = __toESM(require_components(), 1);
  var import_jsx_runtime97 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/variations/variations-typography.mjs
  var import_components29 = __toESM(require_components(), 1);

  // packages/global-styles-ui/build-module/preview-typography.mjs
  var import_components27 = __toESM(require_components(), 1);
  var import_jsx_runtime98 = __toESM(require_jsx_runtime(), 1);
  var StylesPreviewTypography = ({
    variation,
    isFocused,
    withHoverView
  }) => {
    return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
      preview_wrapper_default,
      {
        label: variation.title,
        isFocused,
        withHoverView,
        children: ({ ratio, key }) => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
          import_components27.__experimentalHStack,
          {
            spacing: 10 * ratio,
            justify: "center",
            style: {
              height: "100%",
              overflow: "hidden"
            },
            children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
              PreviewTypography,
              {
                variation,
                fontSize: 85 * ratio
              }
            )
          },
          key
        )
      }
    );
  };
  var preview_typography_default = StylesPreviewTypography;

  // packages/global-styles-ui/build-module/variations/variation.mjs
  var import_components28 = __toESM(require_components(), 1);
  var import_element26 = __toESM(require_element(), 1);
  var import_keycodes3 = __toESM(require_keycodes(), 1);
  var import_i18n20 = __toESM(require_i18n(), 1);
  var import_jsx_runtime99 = __toESM(require_jsx_runtime(), 1);
  function Variation({
    variation,
    children,
    isPill = false,
    properties,
    showTooltip = false
  }) {
    const [isFocused, setIsFocused] = (0, import_element26.useState)(false);
    const {
      base,
      user,
      onChange: setUserConfig
    } = (0, import_element26.useContext)(GlobalStylesContext);
    const context = (0, import_element26.useMemo)(() => {
      let merged = mergeGlobalStyles(base, variation);
      if (properties) {
        merged = filterObjectByProperties(merged, properties);
      }
      return {
        user: variation,
        base,
        merged,
        onChange: () => {
        }
      };
    }, [variation, base, properties]);
    const selectVariation = () => setUserConfig(variation);
    const selectOnEnter = (event) => {
      if (event.keyCode === import_keycodes3.ENTER) {
        event.preventDefault();
        selectVariation();
      }
    };
    const isActive = (0, import_element26.useMemo)(
      () => areGlobalStylesEqual(user, variation),
      [user, variation]
    );
    let label = variation?.title;
    if (variation?.description) {
      label = (0, import_i18n20.sprintf)(
        /* translators: 1: variation title. 2: variation description. */
        (0, import_i18n20._x)("%1$s (%2$s)", "variation label"),
        variation?.title,
        variation?.description
      );
    }
    const content = /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
      "div",
      {
        className: clsx_default("global-styles-ui-variations_item", {
          "is-active": isActive
        }),
        role: "button",
        onClick: selectVariation,
        onKeyDown: selectOnEnter,
        tabIndex: 0,
        "aria-label": label,
        "aria-current": isActive,
        onFocus: () => setIsFocused(true),
        onBlur: () => setIsFocused(false),
        children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
          "div",
          {
            className: clsx_default("global-styles-ui-variations_item-preview", {
              "is-pill": isPill
            }),
            children: children(isFocused)
          }
        )
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(GlobalStylesContext.Provider, { value: context, children: showTooltip ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_components28.Tooltip, { text: variation?.title, children: content }) : content });
  }

  // packages/global-styles-ui/build-module/variations/variations-typography.mjs
  var import_jsx_runtime100 = __toESM(require_jsx_runtime(), 1);
  var propertiesToFilter = ["typography"];
  function TypographyVariations({
    title,
    gap = 2
  }) {
    const typographyVariations = useCurrentMergeThemeStyleVariationsWithUserConfig(propertiesToFilter);
    if (typographyVariations?.length <= 1) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(import_components29.__experimentalVStack, { spacing: 3, children: [
      title && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Subtitle, { level: 3, children: title }),
      /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
        import_components29.__experimentalGrid,
        {
          columns: 3,
          gap,
          className: "global-styles-ui-style-variations-container",
          children: typographyVariations.map(
            (variation, index) => {
              return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
                Variation,
                {
                  variation,
                  properties: propertiesToFilter,
                  showTooltip: true,
                  children: () => /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
                    preview_typography_default,
                    {
                      variation
                    }
                  )
                },
                index
              );
            }
          )
        }
      )
    ] });
  }

  // packages/global-styles-ui/build-module/font-families.mjs
  var import_i18n30 = __toESM(require_i18n(), 1);
  var import_components42 = __toESM(require_components(), 1);
  var import_element35 = __toESM(require_element(), 1);

  // packages/global-styles-ui/build-module/font-library/context.mjs
  var import_element27 = __toESM(require_element(), 1);
  var import_data23 = __toESM(require_data(), 1);
  var import_core_data18 = __toESM(require_core_data(), 1);
  var import_i18n22 = __toESM(require_i18n(), 1);

  // packages/global-styles-ui/build-module/font-library/api.mjs
  var import_api_fetch2 = __toESM(require_api_fetch(), 1);
  var import_core_data17 = __toESM(require_core_data(), 1);

  // packages/global-styles-ui/build-module/font-library/utils/index.mjs
  var import_components30 = __toESM(require_components(), 1);

  // packages/global-styles-ui/build-module/font-library/utils/constants.mjs
  var import_i18n21 = __toESM(require_i18n(), 1);
  var FONT_WEIGHTS = {
    100: (0, import_i18n21._x)("Thin", "font weight"),
    200: (0, import_i18n21._x)("Extra-light", "font weight"),
    300: (0, import_i18n21._x)("Light", "font weight"),
    400: (0, import_i18n21._x)("Normal", "font weight"),
    500: (0, import_i18n21._x)("Medium", "font weight"),
    600: (0, import_i18n21._x)("Semi-bold", "font weight"),
    700: (0, import_i18n21._x)("Bold", "font weight"),
    800: (0, import_i18n21._x)("Extra-bold", "font weight"),
    900: (0, import_i18n21._x)("Black", "font weight")
  };
  var FONT_STYLES = {
    normal: (0, import_i18n21._x)("Normal", "font style"),
    italic: (0, import_i18n21._x)("Italic", "font style")
  };

  // packages/global-styles-ui/build-module/font-library/utils/index.mjs
  var { File } = window;
  var { kebabCase: kebabCase2 } = unlock2(import_components30.privateApis);

  // packages/global-styles-ui/build-module/font-library/context.mjs
  var import_jsx_runtime101 = __toESM(require_jsx_runtime(), 1);
  var FontLibraryContext = (0, import_element27.createContext)(
    {}
  );
  FontLibraryContext.displayName = "FontLibraryContext";

  // packages/global-styles-ui/build-module/font-library/modal.mjs
  var import_i18n28 = __toESM(require_i18n(), 1);
  var import_components40 = __toESM(require_components(), 1);
  var import_core_data21 = __toESM(require_core_data(), 1);
  var import_data25 = __toESM(require_data(), 1);

  // packages/global-styles-ui/build-module/font-library/installed-fonts.mjs
  var import_components34 = __toESM(require_components(), 1);
  var import_core_data19 = __toESM(require_core_data(), 1);
  var import_data24 = __toESM(require_data(), 1);
  var import_element30 = __toESM(require_element(), 1);
  var import_i18n24 = __toESM(require_i18n(), 1);

  // packages/global-styles-ui/build-module/font-library/font-card.mjs
  var import_i18n23 = __toESM(require_i18n(), 1);
  var import_components32 = __toESM(require_components(), 1);

  // packages/global-styles-ui/build-module/font-library/font-demo.mjs
  var import_components31 = __toESM(require_components(), 1);
  var import_element28 = __toESM(require_element(), 1);
  var import_jsx_runtime102 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/font-library/font-card.mjs
  var import_jsx_runtime103 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/font-library/library-font-variant.mjs
  var import_element29 = __toESM(require_element(), 1);
  var import_components33 = __toESM(require_components(), 1);
  var import_jsx_runtime104 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/font-library/installed-fonts.mjs
  var import_jsx_runtime105 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/font-library/font-collection.mjs
  var import_element32 = __toESM(require_element(), 1);
  var import_components37 = __toESM(require_components(), 1);
  var import_compose5 = __toESM(require_compose(), 1);
  var import_i18n26 = __toESM(require_i18n(), 1);
  var import_core_data20 = __toESM(require_core_data(), 1);

  // packages/global-styles-ui/build-module/font-library/google-fonts-confirm-dialog.mjs
  var import_i18n25 = __toESM(require_i18n(), 1);
  var import_components35 = __toESM(require_components(), 1);
  var import_jsx_runtime106 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/font-library/collection-font-variant.mjs
  var import_element31 = __toESM(require_element(), 1);
  var import_components36 = __toESM(require_components(), 1);
  var import_jsx_runtime107 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/font-library/font-collection.mjs
  var import_jsx_runtime108 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_CATEGORY = {
    slug: "all",
    name: (0, import_i18n26._x)("All", "font categories")
  };

  // packages/global-styles-ui/build-module/font-library/upload-fonts.mjs
  var import_i18n27 = __toESM(require_i18n(), 1);
  var import_components39 = __toESM(require_components(), 1);
  var import_element33 = __toESM(require_element(), 1);

  // packages/global-styles-ui/build-module/font-library/lib/unbrotli.mjs
  var __require2 = /* @__PURE__ */ ((x2) => typeof __require !== "undefined" ? __require : typeof Proxy !== "undefined" ? new Proxy(x2, {
    get: (a2, b2) => (typeof __require !== "undefined" ? __require : a2)[b2]
  }) : x2)(function(x2) {
    if (typeof __require !== "undefined") return __require.apply(this, arguments);
    throw Error('Dynamic require of "' + x2 + '" is not supported');
  });
  var unbrotli_default = (function() {
    var define, module, exports;
    return (/* @__PURE__ */ (function() {
      function r3(e2, n2, t3) {
        function o3(i22, f2) {
          if (!n2[i22]) {
            if (!e2[i22]) {
              var c6 = "function" == typeof __require2 && __require2;
              if (!f2 && c6) return c6(i22, true);
              if (u2) return u2(i22, true);
              var a2 = new Error("Cannot find module '" + i22 + "'");
              throw a2.code = "MODULE_NOT_FOUND", a2;
            }
            var p3 = n2[i22] = { exports: {} };
            e2[i22][0].call(
              p3.exports,
              function(r22) {
                var n22 = e2[i22][1][r22];
                return o3(n22 || r22);
              },
              p3,
              p3.exports,
              r3,
              e2,
              n2,
              t3
            );
          }
          return n2[i22].exports;
        }
        for (var u2 = "function" == typeof __require2 && __require2, i2 = 0; i2 < t3.length; i2++)
          o3(t3[i2]);
        return o3;
      }
      return r3;
    })())(
      {
        1: [
          function(require2, module2, exports2) {
            var BROTLI_READ_SIZE = 4096;
            var BROTLI_IBUF_SIZE = 2 * BROTLI_READ_SIZE + 32;
            var BROTLI_IBUF_MASK = 2 * BROTLI_READ_SIZE - 1;
            var kBitMask = new Uint32Array([
              0,
              1,
              3,
              7,
              15,
              31,
              63,
              127,
              255,
              511,
              1023,
              2047,
              4095,
              8191,
              16383,
              32767,
              65535,
              131071,
              262143,
              524287,
              1048575,
              2097151,
              4194303,
              8388607,
              16777215
            ]);
            function BrotliBitReader(input) {
              this.buf_ = new Uint8Array(BROTLI_IBUF_SIZE);
              this.input_ = input;
              this.reset();
            }
            BrotliBitReader.READ_SIZE = BROTLI_READ_SIZE;
            BrotliBitReader.IBUF_MASK = BROTLI_IBUF_MASK;
            BrotliBitReader.prototype.reset = function() {
              this.buf_ptr_ = 0;
              this.val_ = 0;
              this.pos_ = 0;
              this.bit_pos_ = 0;
              this.bit_end_pos_ = 0;
              this.eos_ = 0;
              this.readMoreInput();
              for (var i2 = 0; i2 < 4; i2++) {
                this.val_ |= this.buf_[this.pos_] << 8 * i2;
                ++this.pos_;
              }
              return this.bit_end_pos_ > 0;
            };
            BrotliBitReader.prototype.readMoreInput = function() {
              if (this.bit_end_pos_ > 256) {
                return;
              } else if (this.eos_) {
                if (this.bit_pos_ > this.bit_end_pos_)
                  throw new Error(
                    "Unexpected end of input " + this.bit_pos_ + " " + this.bit_end_pos_
                  );
              } else {
                var dst = this.buf_ptr_;
                var bytes_read = this.input_.read(
                  this.buf_,
                  dst,
                  BROTLI_READ_SIZE
                );
                if (bytes_read < 0) {
                  throw new Error("Unexpected end of input");
                }
                if (bytes_read < BROTLI_READ_SIZE) {
                  this.eos_ = 1;
                  for (var p3 = 0; p3 < 32; p3++)
                    this.buf_[dst + bytes_read + p3] = 0;
                }
                if (dst === 0) {
                  for (var p3 = 0; p3 < 32; p3++)
                    this.buf_[(BROTLI_READ_SIZE << 1) + p3] = this.buf_[p3];
                  this.buf_ptr_ = BROTLI_READ_SIZE;
                } else {
                  this.buf_ptr_ = 0;
                }
                this.bit_end_pos_ += bytes_read << 3;
              }
            };
            BrotliBitReader.prototype.fillBitWindow = function() {
              while (this.bit_pos_ >= 8) {
                this.val_ >>>= 8;
                this.val_ |= this.buf_[this.pos_ & BROTLI_IBUF_MASK] << 24;
                ++this.pos_;
                this.bit_pos_ = this.bit_pos_ - 8 >>> 0;
                this.bit_end_pos_ = this.bit_end_pos_ - 8 >>> 0;
              }
            };
            BrotliBitReader.prototype.readBits = function(n_bits) {
              if (32 - this.bit_pos_ < n_bits) {
                this.fillBitWindow();
              }
              var val = this.val_ >>> this.bit_pos_ & kBitMask[n_bits];
              this.bit_pos_ += n_bits;
              return val;
            };
            module2.exports = BrotliBitReader;
          },
          {}
        ],
        2: [
          function(require2, module2, exports2) {
            var CONTEXT_LSB6 = 0;
            var CONTEXT_MSB6 = 1;
            var CONTEXT_UTF8 = 2;
            var CONTEXT_SIGNED = 3;
            exports2.lookup = new Uint8Array([
              /* CONTEXT_UTF8, last byte. */
              /* ASCII range. */
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              4,
              4,
              0,
              0,
              4,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              8,
              12,
              16,
              12,
              12,
              20,
              12,
              16,
              24,
              28,
              12,
              12,
              32,
              12,
              36,
              12,
              44,
              44,
              44,
              44,
              44,
              44,
              44,
              44,
              44,
              44,
              32,
              32,
              24,
              40,
              28,
              12,
              12,
              48,
              52,
              52,
              52,
              48,
              52,
              52,
              52,
              48,
              52,
              52,
              52,
              52,
              52,
              48,
              52,
              52,
              52,
              52,
              52,
              48,
              52,
              52,
              52,
              52,
              52,
              24,
              12,
              28,
              12,
              12,
              12,
              56,
              60,
              60,
              60,
              56,
              60,
              60,
              60,
              56,
              60,
              60,
              60,
              60,
              60,
              56,
              60,
              60,
              60,
              60,
              60,
              56,
              60,
              60,
              60,
              60,
              60,
              24,
              12,
              28,
              12,
              0,
              /* UTF8 continuation byte range. */
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              /* ASCII range. */
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              1,
              1,
              1,
              1,
              1,
              1,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              1,
              1,
              1,
              1,
              0,
              /* UTF8 continuation byte range. */
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              0,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              7,
              /* CONTEXT_SIGNED, last byte, same as the above values shifted by 3 bits. */
              0,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              56,
              /* CONTEXT_LSB6, last byte. */
              0,
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              12,
              13,
              14,
              15,
              16,
              17,
              18,
              19,
              20,
              21,
              22,
              23,
              24,
              25,
              26,
              27,
              28,
              29,
              30,
              31,
              32,
              33,
              34,
              35,
              36,
              37,
              38,
              39,
              40,
              41,
              42,
              43,
              44,
              45,
              46,
              47,
              48,
              49,
              50,
              51,
              52,
              53,
              54,
              55,
              56,
              57,
              58,
              59,
              60,
              61,
              62,
              63,
              0,
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              12,
              13,
              14,
              15,
              16,
              17,
              18,
              19,
              20,
              21,
              22,
              23,
              24,
              25,
              26,
              27,
              28,
              29,
              30,
              31,
              32,
              33,
              34,
              35,
              36,
              37,
              38,
              39,
              40,
              41,
              42,
              43,
              44,
              45,
              46,
              47,
              48,
              49,
              50,
              51,
              52,
              53,
              54,
              55,
              56,
              57,
              58,
              59,
              60,
              61,
              62,
              63,
              0,
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              12,
              13,
              14,
              15,
              16,
              17,
              18,
              19,
              20,
              21,
              22,
              23,
              24,
              25,
              26,
              27,
              28,
              29,
              30,
              31,
              32,
              33,
              34,
              35,
              36,
              37,
              38,
              39,
              40,
              41,
              42,
              43,
              44,
              45,
              46,
              47,
              48,
              49,
              50,
              51,
              52,
              53,
              54,
              55,
              56,
              57,
              58,
              59,
              60,
              61,
              62,
              63,
              0,
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              12,
              13,
              14,
              15,
              16,
              17,
              18,
              19,
              20,
              21,
              22,
              23,
              24,
              25,
              26,
              27,
              28,
              29,
              30,
              31,
              32,
              33,
              34,
              35,
              36,
              37,
              38,
              39,
              40,
              41,
              42,
              43,
              44,
              45,
              46,
              47,
              48,
              49,
              50,
              51,
              52,
              53,
              54,
              55,
              56,
              57,
              58,
              59,
              60,
              61,
              62,
              63,
              /* CONTEXT_MSB6, last byte. */
              0,
              0,
              0,
              0,
              1,
              1,
              1,
              1,
              2,
              2,
              2,
              2,
              3,
              3,
              3,
              3,
              4,
              4,
              4,
              4,
              5,
              5,
              5,
              5,
              6,
              6,
              6,
              6,
              7,
              7,
              7,
              7,
              8,
              8,
              8,
              8,
              9,
              9,
              9,
              9,
              10,
              10,
              10,
              10,
              11,
              11,
              11,
              11,
              12,
              12,
              12,
              12,
              13,
              13,
              13,
              13,
              14,
              14,
              14,
              14,
              15,
              15,
              15,
              15,
              16,
              16,
              16,
              16,
              17,
              17,
              17,
              17,
              18,
              18,
              18,
              18,
              19,
              19,
              19,
              19,
              20,
              20,
              20,
              20,
              21,
              21,
              21,
              21,
              22,
              22,
              22,
              22,
              23,
              23,
              23,
              23,
              24,
              24,
              24,
              24,
              25,
              25,
              25,
              25,
              26,
              26,
              26,
              26,
              27,
              27,
              27,
              27,
              28,
              28,
              28,
              28,
              29,
              29,
              29,
              29,
              30,
              30,
              30,
              30,
              31,
              31,
              31,
              31,
              32,
              32,
              32,
              32,
              33,
              33,
              33,
              33,
              34,
              34,
              34,
              34,
              35,
              35,
              35,
              35,
              36,
              36,
              36,
              36,
              37,
              37,
              37,
              37,
              38,
              38,
              38,
              38,
              39,
              39,
              39,
              39,
              40,
              40,
              40,
              40,
              41,
              41,
              41,
              41,
              42,
              42,
              42,
              42,
              43,
              43,
              43,
              43,
              44,
              44,
              44,
              44,
              45,
              45,
              45,
              45,
              46,
              46,
              46,
              46,
              47,
              47,
              47,
              47,
              48,
              48,
              48,
              48,
              49,
              49,
              49,
              49,
              50,
              50,
              50,
              50,
              51,
              51,
              51,
              51,
              52,
              52,
              52,
              52,
              53,
              53,
              53,
              53,
              54,
              54,
              54,
              54,
              55,
              55,
              55,
              55,
              56,
              56,
              56,
              56,
              57,
              57,
              57,
              57,
              58,
              58,
              58,
              58,
              59,
              59,
              59,
              59,
              60,
              60,
              60,
              60,
              61,
              61,
              61,
              61,
              62,
              62,
              62,
              62,
              63,
              63,
              63,
              63,
              /* CONTEXT_{M,L}SB6, second last byte, */
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0
            ]);
            exports2.lookupOffsets = new Uint16Array([
              /* CONTEXT_LSB6 */
              1024,
              1536,
              1280,
              1536,
              0,
              256,
              768,
              512
            ]);
          },
          {}
        ],
        3: [
          function(require2, module2, exports2) {
            var BrotliInput = require2("./streams").BrotliInput;
            var BrotliOutput = require2("./streams").BrotliOutput;
            var BrotliBitReader = require2("./bit_reader");
            var BrotliDictionary = require2("./dictionary");
            var HuffmanCode = require2("./huffman").HuffmanCode;
            var BrotliBuildHuffmanTable = require2("./huffman").BrotliBuildHuffmanTable;
            var Context = require2("./context");
            var Prefix = require2("./prefix");
            var Transform = require2("./transform");
            var kDefaultCodeLength = 8;
            var kCodeLengthRepeatCode = 16;
            var kNumLiteralCodes = 256;
            var kNumInsertAndCopyCodes = 704;
            var kNumBlockLengthCodes = 26;
            var kLiteralContextBits = 6;
            var kDistanceContextBits = 2;
            var HUFFMAN_TABLE_BITS = 8;
            var HUFFMAN_TABLE_MASK = 255;
            var HUFFMAN_MAX_TABLE_SIZE = 1080;
            var CODE_LENGTH_CODES = 18;
            var kCodeLengthCodeOrder = new Uint8Array([
              1,
              2,
              3,
              4,
              0,
              5,
              17,
              6,
              16,
              7,
              8,
              9,
              10,
              11,
              12,
              13,
              14,
              15
            ]);
            var NUM_DISTANCE_SHORT_CODES = 16;
            var kDistanceShortCodeIndexOffset = new Uint8Array([
              3,
              2,
              1,
              0,
              3,
              3,
              3,
              3,
              3,
              3,
              2,
              2,
              2,
              2,
              2,
              2
            ]);
            var kDistanceShortCodeValueOffset = new Int8Array([
              0,
              0,
              0,
              0,
              -1,
              1,
              -2,
              2,
              -3,
              3,
              -1,
              1,
              -2,
              2,
              -3,
              3
            ]);
            var kMaxHuffmanTableSize = new Uint16Array([
              256,
              402,
              436,
              468,
              500,
              534,
              566,
              598,
              630,
              662,
              694,
              726,
              758,
              790,
              822,
              854,
              886,
              920,
              952,
              984,
              1016,
              1048,
              1080
            ]);
            function DecodeWindowBits(br) {
              var n2;
              if (br.readBits(1) === 0) {
                return 16;
              }
              n2 = br.readBits(3);
              if (n2 > 0) {
                return 17 + n2;
              }
              n2 = br.readBits(3);
              if (n2 > 0) {
                return 8 + n2;
              }
              return 17;
            }
            function DecodeVarLenUint8(br) {
              if (br.readBits(1)) {
                var nbits = br.readBits(3);
                if (nbits === 0) {
                  return 1;
                } else {
                  return br.readBits(nbits) + (1 << nbits);
                }
              }
              return 0;
            }
            function MetaBlockLength() {
              this.meta_block_length = 0;
              this.input_end = 0;
              this.is_uncompressed = 0;
              this.is_metadata = false;
            }
            function DecodeMetaBlockLength(br) {
              var out = new MetaBlockLength();
              var size_nibbles;
              var size_bytes;
              var i2;
              out.input_end = br.readBits(1);
              if (out.input_end && br.readBits(1)) {
                return out;
              }
              size_nibbles = br.readBits(2) + 4;
              if (size_nibbles === 7) {
                out.is_metadata = true;
                if (br.readBits(1) !== 0)
                  throw new Error("Invalid reserved bit");
                size_bytes = br.readBits(2);
                if (size_bytes === 0) return out;
                for (i2 = 0; i2 < size_bytes; i2++) {
                  var next_byte = br.readBits(8);
                  if (i2 + 1 === size_bytes && size_bytes > 1 && next_byte === 0)
                    throw new Error("Invalid size byte");
                  out.meta_block_length |= next_byte << i2 * 8;
                }
              } else {
                for (i2 = 0; i2 < size_nibbles; ++i2) {
                  var next_nibble = br.readBits(4);
                  if (i2 + 1 === size_nibbles && size_nibbles > 4 && next_nibble === 0)
                    throw new Error("Invalid size nibble");
                  out.meta_block_length |= next_nibble << i2 * 4;
                }
              }
              ++out.meta_block_length;
              if (!out.input_end && !out.is_metadata) {
                out.is_uncompressed = br.readBits(1);
              }
              return out;
            }
            function ReadSymbol(table, index, br) {
              var start_index = index;
              var nbits;
              br.fillBitWindow();
              index += br.val_ >>> br.bit_pos_ & HUFFMAN_TABLE_MASK;
              nbits = table[index].bits - HUFFMAN_TABLE_BITS;
              if (nbits > 0) {
                br.bit_pos_ += HUFFMAN_TABLE_BITS;
                index += table[index].value;
                index += br.val_ >>> br.bit_pos_ & (1 << nbits) - 1;
              }
              br.bit_pos_ += table[index].bits;
              return table[index].value;
            }
            function ReadHuffmanCodeLengths(code_length_code_lengths, num_symbols, code_lengths, br) {
              var symbol3 = 0;
              var prev_code_len = kDefaultCodeLength;
              var repeat = 0;
              var repeat_code_len = 0;
              var space = 32768;
              var table = [];
              for (var i2 = 0; i2 < 32; i2++)
                table.push(new HuffmanCode(0, 0));
              BrotliBuildHuffmanTable(
                table,
                0,
                5,
                code_length_code_lengths,
                CODE_LENGTH_CODES
              );
              while (symbol3 < num_symbols && space > 0) {
                var p3 = 0;
                var code_len;
                br.readMoreInput();
                br.fillBitWindow();
                p3 += br.val_ >>> br.bit_pos_ & 31;
                br.bit_pos_ += table[p3].bits;
                code_len = table[p3].value & 255;
                if (code_len < kCodeLengthRepeatCode) {
                  repeat = 0;
                  code_lengths[symbol3++] = code_len;
                  if (code_len !== 0) {
                    prev_code_len = code_len;
                    space -= 32768 >> code_len;
                  }
                } else {
                  var extra_bits = code_len - 14;
                  var old_repeat;
                  var repeat_delta;
                  var new_len = 0;
                  if (code_len === kCodeLengthRepeatCode) {
                    new_len = prev_code_len;
                  }
                  if (repeat_code_len !== new_len) {
                    repeat = 0;
                    repeat_code_len = new_len;
                  }
                  old_repeat = repeat;
                  if (repeat > 0) {
                    repeat -= 2;
                    repeat <<= extra_bits;
                  }
                  repeat += br.readBits(extra_bits) + 3;
                  repeat_delta = repeat - old_repeat;
                  if (symbol3 + repeat_delta > num_symbols) {
                    throw new Error(
                      "[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols"
                    );
                  }
                  for (var x2 = 0; x2 < repeat_delta; x2++)
                    code_lengths[symbol3 + x2] = repeat_code_len;
                  symbol3 += repeat_delta;
                  if (repeat_code_len !== 0) {
                    space -= repeat_delta << 15 - repeat_code_len;
                  }
                }
              }
              if (space !== 0) {
                throw new Error(
                  "[ReadHuffmanCodeLengths] space = " + space
                );
              }
              for (; symbol3 < num_symbols; symbol3++)
                code_lengths[symbol3] = 0;
            }
            function ReadHuffmanCode(alphabet_size, tables, table, br) {
              var table_size = 0;
              var simple_code_or_skip;
              var code_lengths = new Uint8Array(alphabet_size);
              br.readMoreInput();
              simple_code_or_skip = br.readBits(2);
              if (simple_code_or_skip === 1) {
                var i2;
                var max_bits_counter = alphabet_size - 1;
                var max_bits = 0;
                var symbols = new Int32Array(4);
                var num_symbols = br.readBits(2) + 1;
                while (max_bits_counter) {
                  max_bits_counter >>= 1;
                  ++max_bits;
                }
                for (i2 = 0; i2 < num_symbols; ++i2) {
                  symbols[i2] = br.readBits(max_bits) % alphabet_size;
                  code_lengths[symbols[i2]] = 2;
                }
                code_lengths[symbols[0]] = 1;
                switch (num_symbols) {
                  case 1:
                    break;
                  case 3:
                    if (symbols[0] === symbols[1] || symbols[0] === symbols[2] || symbols[1] === symbols[2]) {
                      throw new Error(
                        "[ReadHuffmanCode] invalid symbols"
                      );
                    }
                    break;
                  case 2:
                    if (symbols[0] === symbols[1]) {
                      throw new Error(
                        "[ReadHuffmanCode] invalid symbols"
                      );
                    }
                    code_lengths[symbols[1]] = 1;
                    break;
                  case 4:
                    if (symbols[0] === symbols[1] || symbols[0] === symbols[2] || symbols[0] === symbols[3] || symbols[1] === symbols[2] || symbols[1] === symbols[3] || symbols[2] === symbols[3]) {
                      throw new Error(
                        "[ReadHuffmanCode] invalid symbols"
                      );
                    }
                    if (br.readBits(1)) {
                      code_lengths[symbols[2]] = 3;
                      code_lengths[symbols[3]] = 3;
                    } else {
                      code_lengths[symbols[0]] = 2;
                    }
                    break;
                }
              } else {
                var i2;
                var code_length_code_lengths = new Uint8Array(
                  CODE_LENGTH_CODES
                );
                var space = 32;
                var num_codes = 0;
                var huff = [
                  new HuffmanCode(2, 0),
                  new HuffmanCode(2, 4),
                  new HuffmanCode(2, 3),
                  new HuffmanCode(3, 2),
                  new HuffmanCode(2, 0),
                  new HuffmanCode(2, 4),
                  new HuffmanCode(2, 3),
                  new HuffmanCode(4, 1),
                  new HuffmanCode(2, 0),
                  new HuffmanCode(2, 4),
                  new HuffmanCode(2, 3),
                  new HuffmanCode(3, 2),
                  new HuffmanCode(2, 0),
                  new HuffmanCode(2, 4),
                  new HuffmanCode(2, 3),
                  new HuffmanCode(4, 5)
                ];
                for (i2 = simple_code_or_skip; i2 < CODE_LENGTH_CODES && space > 0; ++i2) {
                  var code_len_idx = kCodeLengthCodeOrder[i2];
                  var p3 = 0;
                  var v2;
                  br.fillBitWindow();
                  p3 += br.val_ >>> br.bit_pos_ & 15;
                  br.bit_pos_ += huff[p3].bits;
                  v2 = huff[p3].value;
                  code_length_code_lengths[code_len_idx] = v2;
                  if (v2 !== 0) {
                    space -= 32 >> v2;
                    ++num_codes;
                  }
                }
                if (!(num_codes === 1 || space === 0))
                  throw new Error(
                    "[ReadHuffmanCode] invalid num_codes or space"
                  );
                ReadHuffmanCodeLengths(
                  code_length_code_lengths,
                  alphabet_size,
                  code_lengths,
                  br
                );
              }
              table_size = BrotliBuildHuffmanTable(
                tables,
                table,
                HUFFMAN_TABLE_BITS,
                code_lengths,
                alphabet_size
              );
              if (table_size === 0) {
                throw new Error(
                  "[ReadHuffmanCode] BuildHuffmanTable failed: "
                );
              }
              return table_size;
            }
            function ReadBlockLength(table, index, br) {
              var code;
              var nbits;
              code = ReadSymbol(table, index, br);
              nbits = Prefix.kBlockLengthPrefixCode[code].nbits;
              return Prefix.kBlockLengthPrefixCode[code].offset + br.readBits(nbits);
            }
            function TranslateShortCodes(code, ringbuffer, index) {
              var val;
              if (code < NUM_DISTANCE_SHORT_CODES) {
                index += kDistanceShortCodeIndexOffset[code];
                index &= 3;
                val = ringbuffer[index] + kDistanceShortCodeValueOffset[code];
              } else {
                val = code - NUM_DISTANCE_SHORT_CODES + 1;
              }
              return val;
            }
            function MoveToFront(v2, index) {
              var value = v2[index];
              var i2 = index;
              for (; i2; --i2) v2[i2] = v2[i2 - 1];
              v2[0] = value;
            }
            function InverseMoveToFrontTransform(v2, v_len) {
              var mtf = new Uint8Array(256);
              var i2;
              for (i2 = 0; i2 < 256; ++i2) {
                mtf[i2] = i2;
              }
              for (i2 = 0; i2 < v_len; ++i2) {
                var index = v2[i2];
                v2[i2] = mtf[index];
                if (index) MoveToFront(mtf, index);
              }
            }
            function HuffmanTreeGroup(alphabet_size, num_htrees) {
              this.alphabet_size = alphabet_size;
              this.num_htrees = num_htrees;
              this.codes = new Array(
                num_htrees + num_htrees * kMaxHuffmanTableSize[alphabet_size + 31 >>> 5]
              );
              this.htrees = new Uint32Array(num_htrees);
            }
            HuffmanTreeGroup.prototype.decode = function(br) {
              var i2;
              var table_size;
              var next = 0;
              for (i2 = 0; i2 < this.num_htrees; ++i2) {
                this.htrees[i2] = next;
                table_size = ReadHuffmanCode(
                  this.alphabet_size,
                  this.codes,
                  next,
                  br
                );
                next += table_size;
              }
            };
            function DecodeContextMap(context_map_size, br) {
              var out = { num_htrees: null, context_map: null };
              var use_rle_for_zeros;
              var max_run_length_prefix = 0;
              var table;
              var i2;
              br.readMoreInput();
              var num_htrees = out.num_htrees = DecodeVarLenUint8(br) + 1;
              var context_map = out.context_map = new Uint8Array(
                context_map_size
              );
              if (num_htrees <= 1) {
                return out;
              }
              use_rle_for_zeros = br.readBits(1);
              if (use_rle_for_zeros) {
                max_run_length_prefix = br.readBits(4) + 1;
              }
              table = [];
              for (i2 = 0; i2 < HUFFMAN_MAX_TABLE_SIZE; i2++) {
                table[i2] = new HuffmanCode(0, 0);
              }
              ReadHuffmanCode(
                num_htrees + max_run_length_prefix,
                table,
                0,
                br
              );
              for (i2 = 0; i2 < context_map_size; ) {
                var code;
                br.readMoreInput();
                code = ReadSymbol(table, 0, br);
                if (code === 0) {
                  context_map[i2] = 0;
                  ++i2;
                } else if (code <= max_run_length_prefix) {
                  var reps = 1 + (1 << code) + br.readBits(code);
                  while (--reps) {
                    if (i2 >= context_map_size) {
                      throw new Error(
                        "[DecodeContextMap] i >= context_map_size"
                      );
                    }
                    context_map[i2] = 0;
                    ++i2;
                  }
                } else {
                  context_map[i2] = code - max_run_length_prefix;
                  ++i2;
                }
              }
              if (br.readBits(1)) {
                InverseMoveToFrontTransform(
                  context_map,
                  context_map_size
                );
              }
              return out;
            }
            function DecodeBlockType(max_block_type, trees, tree_type, block_types, ringbuffers, indexes, br) {
              var ringbuffer = tree_type * 2;
              var index = tree_type;
              var type_code = ReadSymbol(
                trees,
                tree_type * HUFFMAN_MAX_TABLE_SIZE,
                br
              );
              var block_type;
              if (type_code === 0) {
                block_type = ringbuffers[ringbuffer + (indexes[index] & 1)];
              } else if (type_code === 1) {
                block_type = ringbuffers[ringbuffer + (indexes[index] - 1 & 1)] + 1;
              } else {
                block_type = type_code - 2;
              }
              if (block_type >= max_block_type) {
                block_type -= max_block_type;
              }
              block_types[tree_type] = block_type;
              ringbuffers[ringbuffer + (indexes[index] & 1)] = block_type;
              ++indexes[index];
            }
            function CopyUncompressedBlockToOutput(output, len, pos, ringbuffer, ringbuffer_mask, br) {
              var rb_size = ringbuffer_mask + 1;
              var rb_pos = pos & ringbuffer_mask;
              var br_pos = br.pos_ & BrotliBitReader.IBUF_MASK;
              var nbytes;
              if (len < 8 || br.bit_pos_ + (len << 3) < br.bit_end_pos_) {
                while (len-- > 0) {
                  br.readMoreInput();
                  ringbuffer[rb_pos++] = br.readBits(8);
                  if (rb_pos === rb_size) {
                    output.write(ringbuffer, rb_size);
                    rb_pos = 0;
                  }
                }
                return;
              }
              if (br.bit_end_pos_ < 32) {
                throw new Error(
                  "[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32"
                );
              }
              while (br.bit_pos_ < 32) {
                ringbuffer[rb_pos] = br.val_ >>> br.bit_pos_;
                br.bit_pos_ += 8;
                ++rb_pos;
                --len;
              }
              nbytes = br.bit_end_pos_ - br.bit_pos_ >> 3;
              if (br_pos + nbytes > BrotliBitReader.IBUF_MASK) {
                var tail = BrotliBitReader.IBUF_MASK + 1 - br_pos;
                for (var x2 = 0; x2 < tail; x2++)
                  ringbuffer[rb_pos + x2] = br.buf_[br_pos + x2];
                nbytes -= tail;
                rb_pos += tail;
                len -= tail;
                br_pos = 0;
              }
              for (var x2 = 0; x2 < nbytes; x2++)
                ringbuffer[rb_pos + x2] = br.buf_[br_pos + x2];
              rb_pos += nbytes;
              len -= nbytes;
              if (rb_pos >= rb_size) {
                output.write(ringbuffer, rb_size);
                rb_pos -= rb_size;
                for (var x2 = 0; x2 < rb_pos; x2++)
                  ringbuffer[x2] = ringbuffer[rb_size + x2];
              }
              while (rb_pos + len >= rb_size) {
                nbytes = rb_size - rb_pos;
                if (br.input_.read(ringbuffer, rb_pos, nbytes) < nbytes) {
                  throw new Error(
                    "[CopyUncompressedBlockToOutput] not enough bytes"
                  );
                }
                output.write(ringbuffer, rb_size);
                len -= nbytes;
                rb_pos = 0;
              }
              if (br.input_.read(ringbuffer, rb_pos, len) < len) {
                throw new Error(
                  "[CopyUncompressedBlockToOutput] not enough bytes"
                );
              }
              br.reset();
            }
            function JumpToByteBoundary(br) {
              var new_bit_pos = br.bit_pos_ + 7 & ~7;
              var pad_bits = br.readBits(new_bit_pos - br.bit_pos_);
              return pad_bits == 0;
            }
            function BrotliDecompressedSize(buffer) {
              var input = new BrotliInput(buffer);
              var br = new BrotliBitReader(input);
              DecodeWindowBits(br);
              var out = DecodeMetaBlockLength(br);
              return out.meta_block_length;
            }
            exports2.BrotliDecompressedSize = BrotliDecompressedSize;
            function BrotliDecompressBuffer(buffer, output_size) {
              var input = new BrotliInput(buffer);
              if (output_size == null) {
                output_size = BrotliDecompressedSize(buffer);
              }
              var output_buffer = new Uint8Array(output_size);
              var output = new BrotliOutput(output_buffer);
              BrotliDecompress(input, output);
              if (output.pos < output.buffer.length) {
                output.buffer = output.buffer.subarray(
                  0,
                  output.pos
                );
              }
              return output.buffer;
            }
            exports2.BrotliDecompressBuffer = BrotliDecompressBuffer;
            function BrotliDecompress(input, output) {
              var i2;
              var pos = 0;
              var input_end = 0;
              var window_bits = 0;
              var max_backward_distance;
              var max_distance = 0;
              var ringbuffer_size;
              var ringbuffer_mask;
              var ringbuffer;
              var ringbuffer_end;
              var dist_rb = [16, 15, 11, 4];
              var dist_rb_idx = 0;
              var prev_byte1 = 0;
              var prev_byte2 = 0;
              var hgroup = [
                new HuffmanTreeGroup(0, 0),
                new HuffmanTreeGroup(0, 0),
                new HuffmanTreeGroup(0, 0)
              ];
              var block_type_trees;
              var block_len_trees;
              var br;
              var kRingBufferWriteAheadSlack = 128 + BrotliBitReader.READ_SIZE;
              br = new BrotliBitReader(input);
              window_bits = DecodeWindowBits(br);
              max_backward_distance = (1 << window_bits) - 16;
              ringbuffer_size = 1 << window_bits;
              ringbuffer_mask = ringbuffer_size - 1;
              ringbuffer = new Uint8Array(
                ringbuffer_size + kRingBufferWriteAheadSlack + BrotliDictionary.maxDictionaryWordLength
              );
              ringbuffer_end = ringbuffer_size;
              block_type_trees = [];
              block_len_trees = [];
              for (var x2 = 0; x2 < 3 * HUFFMAN_MAX_TABLE_SIZE; x2++) {
                block_type_trees[x2] = new HuffmanCode(0, 0);
                block_len_trees[x2] = new HuffmanCode(0, 0);
              }
              while (!input_end) {
                var meta_block_remaining_len = 0;
                var is_uncompressed;
                var block_length = [1 << 28, 1 << 28, 1 << 28];
                var block_type = [0];
                var num_block_types = [1, 1, 1];
                var block_type_rb = [0, 1, 0, 1, 0, 1];
                var block_type_rb_index = [0];
                var distance_postfix_bits;
                var num_direct_distance_codes;
                var distance_postfix_mask;
                var num_distance_codes;
                var context_map = null;
                var context_modes = null;
                var num_literal_htrees;
                var dist_context_map = null;
                var num_dist_htrees;
                var context_offset = 0;
                var context_map_slice = null;
                var literal_htree_index = 0;
                var dist_context_offset = 0;
                var dist_context_map_slice = null;
                var dist_htree_index = 0;
                var context_lookup_offset1 = 0;
                var context_lookup_offset2 = 0;
                var context_mode;
                var htree_command;
                for (i2 = 0; i2 < 3; ++i2) {
                  hgroup[i2].codes = null;
                  hgroup[i2].htrees = null;
                }
                br.readMoreInput();
                var _out = DecodeMetaBlockLength(br);
                meta_block_remaining_len = _out.meta_block_length;
                if (pos + meta_block_remaining_len > output.buffer.length) {
                  var tmp = new Uint8Array(
                    pos + meta_block_remaining_len
                  );
                  tmp.set(output.buffer);
                  output.buffer = tmp;
                }
                input_end = _out.input_end;
                is_uncompressed = _out.is_uncompressed;
                if (_out.is_metadata) {
                  JumpToByteBoundary(br);
                  for (; meta_block_remaining_len > 0; --meta_block_remaining_len) {
                    br.readMoreInput();
                    br.readBits(8);
                  }
                  continue;
                }
                if (meta_block_remaining_len === 0) {
                  continue;
                }
                if (is_uncompressed) {
                  br.bit_pos_ = br.bit_pos_ + 7 & ~7;
                  CopyUncompressedBlockToOutput(
                    output,
                    meta_block_remaining_len,
                    pos,
                    ringbuffer,
                    ringbuffer_mask,
                    br
                  );
                  pos += meta_block_remaining_len;
                  continue;
                }
                for (i2 = 0; i2 < 3; ++i2) {
                  num_block_types[i2] = DecodeVarLenUint8(br) + 1;
                  if (num_block_types[i2] >= 2) {
                    ReadHuffmanCode(
                      num_block_types[i2] + 2,
                      block_type_trees,
                      i2 * HUFFMAN_MAX_TABLE_SIZE,
                      br
                    );
                    ReadHuffmanCode(
                      kNumBlockLengthCodes,
                      block_len_trees,
                      i2 * HUFFMAN_MAX_TABLE_SIZE,
                      br
                    );
                    block_length[i2] = ReadBlockLength(
                      block_len_trees,
                      i2 * HUFFMAN_MAX_TABLE_SIZE,
                      br
                    );
                    block_type_rb_index[i2] = 1;
                  }
                }
                br.readMoreInput();
                distance_postfix_bits = br.readBits(2);
                num_direct_distance_codes = NUM_DISTANCE_SHORT_CODES + (br.readBits(4) << distance_postfix_bits);
                distance_postfix_mask = (1 << distance_postfix_bits) - 1;
                num_distance_codes = num_direct_distance_codes + (48 << distance_postfix_bits);
                context_modes = new Uint8Array(
                  num_block_types[0]
                );
                for (i2 = 0; i2 < num_block_types[0]; ++i2) {
                  br.readMoreInput();
                  context_modes[i2] = br.readBits(2) << 1;
                }
                var _o1 = DecodeContextMap(
                  num_block_types[0] << kLiteralContextBits,
                  br
                );
                num_literal_htrees = _o1.num_htrees;
                context_map = _o1.context_map;
                var _o2 = DecodeContextMap(
                  num_block_types[2] << kDistanceContextBits,
                  br
                );
                num_dist_htrees = _o2.num_htrees;
                dist_context_map = _o2.context_map;
                hgroup[0] = new HuffmanTreeGroup(
                  kNumLiteralCodes,
                  num_literal_htrees
                );
                hgroup[1] = new HuffmanTreeGroup(
                  kNumInsertAndCopyCodes,
                  num_block_types[1]
                );
                hgroup[2] = new HuffmanTreeGroup(
                  num_distance_codes,
                  num_dist_htrees
                );
                for (i2 = 0; i2 < 3; ++i2) {
                  hgroup[i2].decode(br);
                }
                context_map_slice = 0;
                dist_context_map_slice = 0;
                context_mode = context_modes[block_type[0]];
                context_lookup_offset1 = Context.lookupOffsets[context_mode];
                context_lookup_offset2 = Context.lookupOffsets[context_mode + 1];
                htree_command = hgroup[1].htrees[0];
                while (meta_block_remaining_len > 0) {
                  var cmd_code;
                  var range_idx;
                  var insert_code;
                  var copy_code;
                  var insert_length;
                  var copy_length;
                  var distance_code;
                  var distance;
                  var context;
                  var j2;
                  var copy_dst;
                  br.readMoreInput();
                  if (block_length[1] === 0) {
                    DecodeBlockType(
                      num_block_types[1],
                      block_type_trees,
                      1,
                      block_type,
                      block_type_rb,
                      block_type_rb_index,
                      br
                    );
                    block_length[1] = ReadBlockLength(
                      block_len_trees,
                      HUFFMAN_MAX_TABLE_SIZE,
                      br
                    );
                    htree_command = hgroup[1].htrees[block_type[1]];
                  }
                  --block_length[1];
                  cmd_code = ReadSymbol(
                    hgroup[1].codes,
                    htree_command,
                    br
                  );
                  range_idx = cmd_code >> 6;
                  if (range_idx >= 2) {
                    range_idx -= 2;
                    distance_code = -1;
                  } else {
                    distance_code = 0;
                  }
                  insert_code = Prefix.kInsertRangeLut[range_idx] + (cmd_code >> 3 & 7);
                  copy_code = Prefix.kCopyRangeLut[range_idx] + (cmd_code & 7);
                  insert_length = Prefix.kInsertLengthPrefixCode[insert_code].offset + br.readBits(
                    Prefix.kInsertLengthPrefixCode[insert_code].nbits
                  );
                  copy_length = Prefix.kCopyLengthPrefixCode[copy_code].offset + br.readBits(
                    Prefix.kCopyLengthPrefixCode[copy_code].nbits
                  );
                  prev_byte1 = ringbuffer[pos - 1 & ringbuffer_mask];
                  prev_byte2 = ringbuffer[pos - 2 & ringbuffer_mask];
                  for (j2 = 0; j2 < insert_length; ++j2) {
                    br.readMoreInput();
                    if (block_length[0] === 0) {
                      DecodeBlockType(
                        num_block_types[0],
                        block_type_trees,
                        0,
                        block_type,
                        block_type_rb,
                        block_type_rb_index,
                        br
                      );
                      block_length[0] = ReadBlockLength(
                        block_len_trees,
                        0,
                        br
                      );
                      context_offset = block_type[0] << kLiteralContextBits;
                      context_map_slice = context_offset;
                      context_mode = context_modes[block_type[0]];
                      context_lookup_offset1 = Context.lookupOffsets[context_mode];
                      context_lookup_offset2 = Context.lookupOffsets[context_mode + 1];
                    }
                    context = Context.lookup[context_lookup_offset1 + prev_byte1] | Context.lookup[context_lookup_offset2 + prev_byte2];
                    literal_htree_index = context_map[context_map_slice + context];
                    --block_length[0];
                    prev_byte2 = prev_byte1;
                    prev_byte1 = ReadSymbol(
                      hgroup[0].codes,
                      hgroup[0].htrees[literal_htree_index],
                      br
                    );
                    ringbuffer[pos & ringbuffer_mask] = prev_byte1;
                    if ((pos & ringbuffer_mask) === ringbuffer_mask) {
                      output.write(
                        ringbuffer,
                        ringbuffer_size
                      );
                    }
                    ++pos;
                  }
                  meta_block_remaining_len -= insert_length;
                  if (meta_block_remaining_len <= 0) break;
                  if (distance_code < 0) {
                    var context;
                    br.readMoreInput();
                    if (block_length[2] === 0) {
                      DecodeBlockType(
                        num_block_types[2],
                        block_type_trees,
                        2,
                        block_type,
                        block_type_rb,
                        block_type_rb_index,
                        br
                      );
                      block_length[2] = ReadBlockLength(
                        block_len_trees,
                        2 * HUFFMAN_MAX_TABLE_SIZE,
                        br
                      );
                      dist_context_offset = block_type[2] << kDistanceContextBits;
                      dist_context_map_slice = dist_context_offset;
                    }
                    --block_length[2];
                    context = (copy_length > 4 ? 3 : copy_length - 2) & 255;
                    dist_htree_index = dist_context_map[dist_context_map_slice + context];
                    distance_code = ReadSymbol(
                      hgroup[2].codes,
                      hgroup[2].htrees[dist_htree_index],
                      br
                    );
                    if (distance_code >= num_direct_distance_codes) {
                      var nbits;
                      var postfix;
                      var offset;
                      distance_code -= num_direct_distance_codes;
                      postfix = distance_code & distance_postfix_mask;
                      distance_code >>= distance_postfix_bits;
                      nbits = (distance_code >> 1) + 1;
                      offset = (2 + (distance_code & 1) << nbits) - 4;
                      distance_code = num_direct_distance_codes + (offset + br.readBits(nbits) << distance_postfix_bits) + postfix;
                    }
                  }
                  distance = TranslateShortCodes(
                    distance_code,
                    dist_rb,
                    dist_rb_idx
                  );
                  if (distance < 0) {
                    throw new Error(
                      "[BrotliDecompress] invalid distance"
                    );
                  }
                  if (pos < max_backward_distance && max_distance !== max_backward_distance) {
                    max_distance = pos;
                  } else {
                    max_distance = max_backward_distance;
                  }
                  copy_dst = pos & ringbuffer_mask;
                  if (distance > max_distance) {
                    if (copy_length >= BrotliDictionary.minDictionaryWordLength && copy_length <= BrotliDictionary.maxDictionaryWordLength) {
                      var offset = BrotliDictionary.offsetsByLength[copy_length];
                      var word_id = distance - max_distance - 1;
                      var shift = BrotliDictionary.sizeBitsByLength[copy_length];
                      var mask = (1 << shift) - 1;
                      var word_idx = word_id & mask;
                      var transform_idx = word_id >> shift;
                      offset += word_idx * copy_length;
                      if (transform_idx < Transform.kNumTransforms) {
                        var len = Transform.transformDictionaryWord(
                          ringbuffer,
                          copy_dst,
                          offset,
                          copy_length,
                          transform_idx
                        );
                        copy_dst += len;
                        pos += len;
                        meta_block_remaining_len -= len;
                        if (copy_dst >= ringbuffer_end) {
                          output.write(
                            ringbuffer,
                            ringbuffer_size
                          );
                          for (var _x24 = 0; _x24 < copy_dst - ringbuffer_end; _x24++)
                            ringbuffer[_x24] = ringbuffer[ringbuffer_end + _x24];
                        }
                      } else {
                        throw new Error(
                          "Invalid backward reference. pos: " + pos + " distance: " + distance + " len: " + copy_length + " bytes left: " + meta_block_remaining_len
                        );
                      }
                    } else {
                      throw new Error(
                        "Invalid backward reference. pos: " + pos + " distance: " + distance + " len: " + copy_length + " bytes left: " + meta_block_remaining_len
                      );
                    }
                  } else {
                    if (distance_code > 0) {
                      dist_rb[dist_rb_idx & 3] = distance;
                      ++dist_rb_idx;
                    }
                    if (copy_length > meta_block_remaining_len) {
                      throw new Error(
                        "Invalid backward reference. pos: " + pos + " distance: " + distance + " len: " + copy_length + " bytes left: " + meta_block_remaining_len
                      );
                    }
                    for (j2 = 0; j2 < copy_length; ++j2) {
                      ringbuffer[pos & ringbuffer_mask] = ringbuffer[pos - distance & ringbuffer_mask];
                      if ((pos & ringbuffer_mask) === ringbuffer_mask) {
                        output.write(
                          ringbuffer,
                          ringbuffer_size
                        );
                      }
                      ++pos;
                      --meta_block_remaining_len;
                    }
                  }
                  prev_byte1 = ringbuffer[pos - 1 & ringbuffer_mask];
                  prev_byte2 = ringbuffer[pos - 2 & ringbuffer_mask];
                }
                pos &= 1073741823;
              }
              output.write(ringbuffer, pos & ringbuffer_mask);
            }
            exports2.BrotliDecompress = BrotliDecompress;
            BrotliDictionary.init();
          },
          {
            "./bit_reader": 1,
            "./context": 2,
            "./dictionary": 6,
            "./huffman": 7,
            "./prefix": 9,
            "./streams": 10,
            "./transform": 11
          }
        ],
        4: [
          function(require2, module2, exports2) {
            var base64 = require2("base64-js");
            exports2.init = function() {
              var BrotliDecompressBuffer = require2("./decode").BrotliDecompressBuffer;
              var compressed = base64.toByteArray(
                require2("./dictionary.bin.js")
              );
              return BrotliDecompressBuffer(compressed);
            };
          },
          { "./decode": 3, "./dictionary.bin.js": 5, "base64-js": 8 }
        ],
        5: [
          function(require2, module2, exports2) {
            module2.exports = "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=";
          },
          {}
        ],
        6: [
          function(require2, module2, exports2) {
            var data = require2("./dictionary-browser");
            exports2.init = function() {
              exports2.dictionary = data.init();
            };
            exports2.offsetsByLength = new Uint32Array([
              0,
              0,
              0,
              0,
              0,
              4096,
              9216,
              21504,
              35840,
              44032,
              53248,
              63488,
              74752,
              87040,
              93696,
              100864,
              104704,
              106752,
              108928,
              113536,
              115968,
              118528,
              119872,
              121280,
              122016
            ]);
            exports2.sizeBitsByLength = new Uint8Array([
              0,
              0,
              0,
              0,
              10,
              10,
              11,
              11,
              10,
              10,
              10,
              10,
              10,
              9,
              9,
              8,
              7,
              7,
              8,
              7,
              7,
              6,
              6,
              5,
              5
            ]);
            exports2.minDictionaryWordLength = 4;
            exports2.maxDictionaryWordLength = 24;
          },
          { "./dictionary-browser": 4 }
        ],
        7: [
          function(require2, module2, exports2) {
            function HuffmanCode(bits, value) {
              this.bits = bits;
              this.value = value;
            }
            exports2.HuffmanCode = HuffmanCode;
            var MAX_LENGTH = 15;
            function GetNextKey(key, len) {
              var step = 1 << len - 1;
              while (key & step) {
                step >>= 1;
              }
              return (key & step - 1) + step;
            }
            function ReplicateValue(table, i2, step, end, code) {
              do {
                end -= step;
                table[i2 + end] = new HuffmanCode(
                  code.bits,
                  code.value
                );
              } while (end > 0);
            }
            function NextTableBitSize(count, len, root_bits) {
              var left = 1 << len - root_bits;
              while (len < MAX_LENGTH) {
                left -= count[len];
                if (left <= 0) break;
                ++len;
                left <<= 1;
              }
              return len - root_bits;
            }
            exports2.BrotliBuildHuffmanTable = function(root_table, table, root_bits, code_lengths, code_lengths_size) {
              var start_table = table;
              var code;
              var len;
              var symbol3;
              var key;
              var step;
              var low;
              var mask;
              var table_bits;
              var table_size;
              var total_size;
              var sorted;
              var count = new Int32Array(
                MAX_LENGTH + 1
              );
              var offset = new Int32Array(
                MAX_LENGTH + 1
              );
              sorted = new Int32Array(code_lengths_size);
              for (symbol3 = 0; symbol3 < code_lengths_size; symbol3++) {
                count[code_lengths[symbol3]]++;
              }
              offset[1] = 0;
              for (len = 1; len < MAX_LENGTH; len++) {
                offset[len + 1] = offset[len] + count[len];
              }
              for (symbol3 = 0; symbol3 < code_lengths_size; symbol3++) {
                if (code_lengths[symbol3] !== 0) {
                  sorted[offset[code_lengths[symbol3]]++] = symbol3;
                }
              }
              table_bits = root_bits;
              table_size = 1 << table_bits;
              total_size = table_size;
              if (offset[MAX_LENGTH] === 1) {
                for (key = 0; key < total_size; ++key) {
                  root_table[table + key] = new HuffmanCode(
                    0,
                    sorted[0] & 65535
                  );
                }
                return total_size;
              }
              key = 0;
              symbol3 = 0;
              for (len = 1, step = 2; len <= root_bits; ++len, step <<= 1) {
                for (; count[len] > 0; --count[len]) {
                  code = new HuffmanCode(
                    len & 255,
                    sorted[symbol3++] & 65535
                  );
                  ReplicateValue(
                    root_table,
                    table + key,
                    step,
                    table_size,
                    code
                  );
                  key = GetNextKey(key, len);
                }
              }
              mask = total_size - 1;
              low = -1;
              for (len = root_bits + 1, step = 2; len <= MAX_LENGTH; ++len, step <<= 1) {
                for (; count[len] > 0; --count[len]) {
                  if ((key & mask) !== low) {
                    table += table_size;
                    table_bits = NextTableBitSize(
                      count,
                      len,
                      root_bits
                    );
                    table_size = 1 << table_bits;
                    total_size += table_size;
                    low = key & mask;
                    root_table[start_table + low] = new HuffmanCode(
                      table_bits + root_bits & 255,
                      table - start_table - low & 65535
                    );
                  }
                  code = new HuffmanCode(
                    len - root_bits & 255,
                    sorted[symbol3++] & 65535
                  );
                  ReplicateValue(
                    root_table,
                    table + (key >> root_bits),
                    step,
                    table_size,
                    code
                  );
                  key = GetNextKey(key, len);
                }
              }
              return total_size;
            };
          },
          {}
        ],
        8: [
          function(require2, module2, exports2) {
            "use strict";
            exports2.byteLength = byteLength;
            exports2.toByteArray = toByteArray;
            exports2.fromByteArray = fromByteArray;
            var lookup = [];
            var revLookup = [];
            var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
            var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
            for (var i2 = 0, len = code.length; i2 < len; ++i2) {
              lookup[i2] = code[i2];
              revLookup[code.charCodeAt(i2)] = i2;
            }
            revLookup["-".charCodeAt(0)] = 62;
            revLookup["_".charCodeAt(0)] = 63;
            function getLens(b64) {
              var len2 = b64.length;
              if (len2 % 4 > 0) {
                throw new Error(
                  "Invalid string. Length must be a multiple of 4"
                );
              }
              var validLen = b64.indexOf("=");
              if (validLen === -1) validLen = len2;
              var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;
              return [validLen, placeHoldersLen];
            }
            function byteLength(b64) {
              var lens = getLens(b64);
              var validLen = lens[0];
              var placeHoldersLen = lens[1];
              return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
            }
            function _byteLength(b64, validLen, placeHoldersLen) {
              return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
            }
            function toByteArray(b64) {
              var tmp;
              var lens = getLens(b64);
              var validLen = lens[0];
              var placeHoldersLen = lens[1];
              var arr = new Arr(
                _byteLength(b64, validLen, placeHoldersLen)
              );
              var curByte = 0;
              var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen;
              for (var i22 = 0; i22 < len2; i22 += 4) {
                tmp = revLookup[b64.charCodeAt(i22)] << 18 | revLookup[b64.charCodeAt(i22 + 1)] << 12 | revLookup[b64.charCodeAt(i22 + 2)] << 6 | revLookup[b64.charCodeAt(i22 + 3)];
                arr[curByte++] = tmp >> 16 & 255;
                arr[curByte++] = tmp >> 8 & 255;
                arr[curByte++] = tmp & 255;
              }
              if (placeHoldersLen === 2) {
                tmp = revLookup[b64.charCodeAt(i22)] << 2 | revLookup[b64.charCodeAt(i22 + 1)] >> 4;
                arr[curByte++] = tmp & 255;
              }
              if (placeHoldersLen === 1) {
                tmp = revLookup[b64.charCodeAt(i22)] << 10 | revLookup[b64.charCodeAt(i22 + 1)] << 4 | revLookup[b64.charCodeAt(i22 + 2)] >> 2;
                arr[curByte++] = tmp >> 8 & 255;
                arr[curByte++] = tmp & 255;
              }
              return arr;
            }
            function tripletToBase64(num) {
              return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
            }
            function encodeChunk(uint8, start2, end) {
              var tmp;
              var output = [];
              for (var i22 = start2; i22 < end; i22 += 3) {
                tmp = (uint8[i22] << 16 & 16711680) + (uint8[i22 + 1] << 8 & 65280) + (uint8[i22 + 2] & 255);
                output.push(tripletToBase64(tmp));
              }
              return output.join("");
            }
            function fromByteArray(uint8) {
              var tmp;
              var len2 = uint8.length;
              var extraBytes = len2 % 3;
              var parts = [];
              var maxChunkLength = 16383;
              for (var i22 = 0, len22 = len2 - extraBytes; i22 < len22; i22 += maxChunkLength) {
                parts.push(
                  encodeChunk(
                    uint8,
                    i22,
                    i22 + maxChunkLength > len22 ? len22 : i22 + maxChunkLength
                  )
                );
              }
              if (extraBytes === 1) {
                tmp = uint8[len2 - 1];
                parts.push(
                  lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "=="
                );
              } else if (extraBytes === 2) {
                tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1];
                parts.push(
                  lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "="
                );
              }
              return parts.join("");
            }
          },
          {}
        ],
        9: [
          function(require2, module2, exports2) {
            function PrefixCodeRange(offset, nbits) {
              this.offset = offset;
              this.nbits = nbits;
            }
            exports2.kBlockLengthPrefixCode = [
              new PrefixCodeRange(1, 2),
              new PrefixCodeRange(5, 2),
              new PrefixCodeRange(9, 2),
              new PrefixCodeRange(13, 2),
              new PrefixCodeRange(17, 3),
              new PrefixCodeRange(25, 3),
              new PrefixCodeRange(33, 3),
              new PrefixCodeRange(41, 3),
              new PrefixCodeRange(49, 4),
              new PrefixCodeRange(65, 4),
              new PrefixCodeRange(81, 4),
              new PrefixCodeRange(97, 4),
              new PrefixCodeRange(113, 5),
              new PrefixCodeRange(145, 5),
              new PrefixCodeRange(177, 5),
              new PrefixCodeRange(209, 5),
              new PrefixCodeRange(241, 6),
              new PrefixCodeRange(305, 6),
              new PrefixCodeRange(369, 7),
              new PrefixCodeRange(497, 8),
              new PrefixCodeRange(753, 9),
              new PrefixCodeRange(1265, 10),
              new PrefixCodeRange(2289, 11),
              new PrefixCodeRange(4337, 12),
              new PrefixCodeRange(8433, 13),
              new PrefixCodeRange(16625, 24)
            ];
            exports2.kInsertLengthPrefixCode = [
              new PrefixCodeRange(0, 0),
              new PrefixCodeRange(1, 0),
              new PrefixCodeRange(2, 0),
              new PrefixCodeRange(3, 0),
              new PrefixCodeRange(4, 0),
              new PrefixCodeRange(5, 0),
              new PrefixCodeRange(6, 1),
              new PrefixCodeRange(8, 1),
              new PrefixCodeRange(10, 2),
              new PrefixCodeRange(14, 2),
              new PrefixCodeRange(18, 3),
              new PrefixCodeRange(26, 3),
              new PrefixCodeRange(34, 4),
              new PrefixCodeRange(50, 4),
              new PrefixCodeRange(66, 5),
              new PrefixCodeRange(98, 5),
              new PrefixCodeRange(130, 6),
              new PrefixCodeRange(194, 7),
              new PrefixCodeRange(322, 8),
              new PrefixCodeRange(578, 9),
              new PrefixCodeRange(1090, 10),
              new PrefixCodeRange(2114, 12),
              new PrefixCodeRange(6210, 14),
              new PrefixCodeRange(22594, 24)
            ];
            exports2.kCopyLengthPrefixCode = [
              new PrefixCodeRange(2, 0),
              new PrefixCodeRange(3, 0),
              new PrefixCodeRange(4, 0),
              new PrefixCodeRange(5, 0),
              new PrefixCodeRange(6, 0),
              new PrefixCodeRange(7, 0),
              new PrefixCodeRange(8, 0),
              new PrefixCodeRange(9, 0),
              new PrefixCodeRange(10, 1),
              new PrefixCodeRange(12, 1),
              new PrefixCodeRange(14, 2),
              new PrefixCodeRange(18, 2),
              new PrefixCodeRange(22, 3),
              new PrefixCodeRange(30, 3),
              new PrefixCodeRange(38, 4),
              new PrefixCodeRange(54, 4),
              new PrefixCodeRange(70, 5),
              new PrefixCodeRange(102, 5),
              new PrefixCodeRange(134, 6),
              new PrefixCodeRange(198, 7),
              new PrefixCodeRange(326, 8),
              new PrefixCodeRange(582, 9),
              new PrefixCodeRange(1094, 10),
              new PrefixCodeRange(2118, 24)
            ];
            exports2.kInsertRangeLut = [0, 0, 8, 8, 0, 16, 8, 16, 16];
            exports2.kCopyRangeLut = [0, 8, 0, 8, 16, 0, 16, 8, 16];
          },
          {}
        ],
        10: [
          function(require2, module2, exports2) {
            function BrotliInput(buffer) {
              this.buffer = buffer;
              this.pos = 0;
            }
            BrotliInput.prototype.read = function(buf, i2, count) {
              if (this.pos + count > this.buffer.length) {
                count = this.buffer.length - this.pos;
              }
              for (var p3 = 0; p3 < count; p3++)
                buf[i2 + p3] = this.buffer[this.pos + p3];
              this.pos += count;
              return count;
            };
            exports2.BrotliInput = BrotliInput;
            function BrotliOutput(buf) {
              this.buffer = buf;
              this.pos = 0;
            }
            BrotliOutput.prototype.write = function(buf, count) {
              if (this.pos + count > this.buffer.length)
                throw new Error(
                  "Output buffer is not large enough"
                );
              this.buffer.set(buf.subarray(0, count), this.pos);
              this.pos += count;
              return count;
            };
            exports2.BrotliOutput = BrotliOutput;
          },
          {}
        ],
        11: [
          function(require2, module2, exports2) {
            var BrotliDictionary = require2("./dictionary");
            var kIdentity = 0;
            var kOmitLast1 = 1;
            var kOmitLast2 = 2;
            var kOmitLast3 = 3;
            var kOmitLast4 = 4;
            var kOmitLast5 = 5;
            var kOmitLast6 = 6;
            var kOmitLast7 = 7;
            var kOmitLast8 = 8;
            var kOmitLast9 = 9;
            var kUppercaseFirst = 10;
            var kUppercaseAll = 11;
            var kOmitFirst1 = 12;
            var kOmitFirst2 = 13;
            var kOmitFirst3 = 14;
            var kOmitFirst4 = 15;
            var kOmitFirst5 = 16;
            var kOmitFirst6 = 17;
            var kOmitFirst7 = 18;
            var kOmitFirst8 = 19;
            var kOmitFirst9 = 20;
            function Transform(prefix2, transform, suffix) {
              this.prefix = new Uint8Array(prefix2.length);
              this.transform = transform;
              this.suffix = new Uint8Array(suffix.length);
              for (var i2 = 0; i2 < prefix2.length; i2++)
                this.prefix[i2] = prefix2.charCodeAt(i2);
              for (var i2 = 0; i2 < suffix.length; i2++)
                this.suffix[i2] = suffix.charCodeAt(i2);
            }
            var kTransforms = [
              new Transform("", kIdentity, ""),
              new Transform("", kIdentity, " "),
              new Transform(" ", kIdentity, " "),
              new Transform("", kOmitFirst1, ""),
              new Transform("", kUppercaseFirst, " "),
              new Transform("", kIdentity, " the "),
              new Transform(" ", kIdentity, ""),
              new Transform("s ", kIdentity, " "),
              new Transform("", kIdentity, " of "),
              new Transform("", kUppercaseFirst, ""),
              new Transform("", kIdentity, " and "),
              new Transform("", kOmitFirst2, ""),
              new Transform("", kOmitLast1, ""),
              new Transform(", ", kIdentity, " "),
              new Transform("", kIdentity, ", "),
              new Transform(" ", kUppercaseFirst, " "),
              new Transform("", kIdentity, " in "),
              new Transform("", kIdentity, " to "),
              new Transform("e ", kIdentity, " "),
              new Transform("", kIdentity, '"'),
              new Transform("", kIdentity, "."),
              new Transform("", kIdentity, '">'),
              new Transform("", kIdentity, "\n"),
              new Transform("", kOmitLast3, ""),
              new Transform("", kIdentity, "]"),
              new Transform("", kIdentity, " for "),
              new Transform("", kOmitFirst3, ""),
              new Transform("", kOmitLast2, ""),
              new Transform("", kIdentity, " a "),
              new Transform("", kIdentity, " that "),
              new Transform(" ", kUppercaseFirst, ""),
              new Transform("", kIdentity, ". "),
              new Transform(".", kIdentity, ""),
              new Transform(" ", kIdentity, ", "),
              new Transform("", kOmitFirst4, ""),
              new Transform("", kIdentity, " with "),
              new Transform("", kIdentity, "'"),
              new Transform("", kIdentity, " from "),
              new Transform("", kIdentity, " by "),
              new Transform("", kOmitFirst5, ""),
              new Transform("", kOmitFirst6, ""),
              new Transform(" the ", kIdentity, ""),
              new Transform("", kOmitLast4, ""),
              new Transform("", kIdentity, ". The "),
              new Transform("", kUppercaseAll, ""),
              new Transform("", kIdentity, " on "),
              new Transform("", kIdentity, " as "),
              new Transform("", kIdentity, " is "),
              new Transform("", kOmitLast7, ""),
              new Transform("", kOmitLast1, "ing "),
              new Transform("", kIdentity, "\n	"),
              new Transform("", kIdentity, ":"),
              new Transform(" ", kIdentity, ". "),
              new Transform("", kIdentity, "ed "),
              new Transform("", kOmitFirst9, ""),
              new Transform("", kOmitFirst7, ""),
              new Transform("", kOmitLast6, ""),
              new Transform("", kIdentity, "("),
              new Transform("", kUppercaseFirst, ", "),
              new Transform("", kOmitLast8, ""),
              new Transform("", kIdentity, " at "),
              new Transform("", kIdentity, "ly "),
              new Transform(" the ", kIdentity, " of "),
              new Transform("", kOmitLast5, ""),
              new Transform("", kOmitLast9, ""),
              new Transform(" ", kUppercaseFirst, ", "),
              new Transform("", kUppercaseFirst, '"'),
              new Transform(".", kIdentity, "("),
              new Transform("", kUppercaseAll, " "),
              new Transform("", kUppercaseFirst, '">'),
              new Transform("", kIdentity, '="'),
              new Transform(" ", kIdentity, "."),
              new Transform(".com/", kIdentity, ""),
              new Transform(" the ", kIdentity, " of the "),
              new Transform("", kUppercaseFirst, "'"),
              new Transform("", kIdentity, ". This "),
              new Transform("", kIdentity, ","),
              new Transform(".", kIdentity, " "),
              new Transform("", kUppercaseFirst, "("),
              new Transform("", kUppercaseFirst, "."),
              new Transform("", kIdentity, " not "),
              new Transform(" ", kIdentity, '="'),
              new Transform("", kIdentity, "er "),
              new Transform(" ", kUppercaseAll, " "),
              new Transform("", kIdentity, "al "),
              new Transform(" ", kUppercaseAll, ""),
              new Transform("", kIdentity, "='"),
              new Transform("", kUppercaseAll, '"'),
              new Transform("", kUppercaseFirst, ". "),
              new Transform(" ", kIdentity, "("),
              new Transform("", kIdentity, "ful "),
              new Transform(" ", kUppercaseFirst, ". "),
              new Transform("", kIdentity, "ive "),
              new Transform("", kIdentity, "less "),
              new Transform("", kUppercaseAll, "'"),
              new Transform("", kIdentity, "est "),
              new Transform(" ", kUppercaseFirst, "."),
              new Transform("", kUppercaseAll, '">'),
              new Transform(" ", kIdentity, "='"),
              new Transform("", kUppercaseFirst, ","),
              new Transform("", kIdentity, "ize "),
              new Transform("", kUppercaseAll, "."),
              new Transform("\xC2\xA0", kIdentity, ""),
              new Transform(" ", kIdentity, ","),
              new Transform("", kUppercaseFirst, '="'),
              new Transform("", kUppercaseAll, '="'),
              new Transform("", kIdentity, "ous "),
              new Transform("", kUppercaseAll, ", "),
              new Transform("", kUppercaseFirst, "='"),
              new Transform(" ", kUppercaseFirst, ","),
              new Transform(" ", kUppercaseAll, '="'),
              new Transform(" ", kUppercaseAll, ", "),
              new Transform("", kUppercaseAll, ","),
              new Transform("", kUppercaseAll, "("),
              new Transform("", kUppercaseAll, ". "),
              new Transform(" ", kUppercaseAll, "."),
              new Transform("", kUppercaseAll, "='"),
              new Transform(" ", kUppercaseAll, ". "),
              new Transform(" ", kUppercaseFirst, '="'),
              new Transform(" ", kUppercaseAll, "='"),
              new Transform(" ", kUppercaseFirst, "='")
            ];
            exports2.kTransforms = kTransforms;
            exports2.kNumTransforms = kTransforms.length;
            function ToUpperCase(p3, i2) {
              if (p3[i2] < 192) {
                if (p3[i2] >= 97 && p3[i2] <= 122) {
                  p3[i2] ^= 32;
                }
                return 1;
              }
              if (p3[i2] < 224) {
                p3[i2 + 1] ^= 32;
                return 2;
              }
              p3[i2 + 2] ^= 5;
              return 3;
            }
            exports2.transformDictionaryWord = function(dst, idx, word, len, transform) {
              var prefix2 = kTransforms[transform].prefix;
              var suffix = kTransforms[transform].suffix;
              var t3 = kTransforms[transform].transform;
              var skip = t3 < kOmitFirst1 ? 0 : t3 - (kOmitFirst1 - 1);
              var i2 = 0;
              var start_idx = idx;
              var uppercase;
              if (skip > len) {
                skip = len;
              }
              var prefix_pos = 0;
              while (prefix_pos < prefix2.length) {
                dst[idx++] = prefix2[prefix_pos++];
              }
              word += skip;
              len -= skip;
              if (t3 <= kOmitLast9) {
                len -= t3;
              }
              for (i2 = 0; i2 < len; i2++) {
                dst[idx++] = BrotliDictionary.dictionary[word + i2];
              }
              uppercase = idx - len;
              if (t3 === kUppercaseFirst) {
                ToUpperCase(dst, uppercase);
              } else if (t3 === kUppercaseAll) {
                while (len > 0) {
                  var step = ToUpperCase(dst, uppercase);
                  uppercase += step;
                  len -= step;
                }
              }
              var suffix_pos = 0;
              while (suffix_pos < suffix.length) {
                dst[idx++] = suffix[suffix_pos++];
              }
              return idx - start_idx;
            };
          },
          { "./dictionary": 6 }
        ],
        12: [
          function(require2, module2, exports2) {
            module2.exports = require2("./dec/decode").BrotliDecompressBuffer;
          },
          { "./dec/decode": 3 }
        ]
      },
      {},
      [12]
    )(12);
  })();

  // packages/global-styles-ui/build-module/font-library/lib/inflate.mjs
  var __require3 = /* @__PURE__ */ ((x2) => typeof __require !== "undefined" ? __require : typeof Proxy !== "undefined" ? new Proxy(x2, {
    get: (a2, b2) => (typeof __require !== "undefined" ? __require : a2)[b2]
  }) : x2)(function(x2) {
    if (typeof __require !== "undefined") return __require.apply(this, arguments);
    throw Error('Dynamic require of "' + x2 + '" is not supported');
  });
  var inflate_default = (function() {
    var define, module, exports;
    return (/* @__PURE__ */ (function() {
      function r3(e2, n2, t3) {
        function o3(i22, f2) {
          if (!n2[i22]) {
            if (!e2[i22]) {
              var c6 = "function" == typeof __require3 && __require3;
              if (!f2 && c6) return c6(i22, true);
              if (u2) return u2(i22, true);
              var a2 = new Error("Cannot find module '" + i22 + "'");
              throw a2.code = "MODULE_NOT_FOUND", a2;
            }
            var p3 = n2[i22] = { exports: {} };
            e2[i22][0].call(
              p3.exports,
              function(r22) {
                var n22 = e2[i22][1][r22];
                return o3(n22 || r22);
              },
              p3,
              p3.exports,
              r3,
              e2,
              n2,
              t3
            );
          }
          return n2[i22].exports;
        }
        for (var u2 = "function" == typeof __require3 && __require3, i2 = 0; i2 < t3.length; i2++)
          o3(t3[i2]);
        return o3;
      }
      return r3;
    })())(
      {
        1: [
          function(require2, module2, exports2) {
            "use strict";
            var TYPED_OK = typeof Uint8Array !== "undefined" && typeof Uint16Array !== "undefined" && typeof Int32Array !== "undefined";
            function _has(obj, key) {
              return Object.prototype.hasOwnProperty.call(obj, key);
            }
            exports2.assign = function(obj) {
              var sources = Array.prototype.slice.call(
                arguments,
                1
              );
              while (sources.length) {
                var source = sources.shift();
                if (!source) {
                  continue;
                }
                if (typeof source !== "object") {
                  throw new TypeError(
                    source + "must be non-object"
                  );
                }
                for (var p3 in source) {
                  if (_has(source, p3)) {
                    obj[p3] = source[p3];
                  }
                }
              }
              return obj;
            };
            exports2.shrinkBuf = function(buf, size) {
              if (buf.length === size) {
                return buf;
              }
              if (buf.subarray) {
                return buf.subarray(0, size);
              }
              buf.length = size;
              return buf;
            };
            var fnTyped = {
              arraySet: function(dest, src, src_offs, len, dest_offs) {
                if (src.subarray && dest.subarray) {
                  dest.set(
                    src.subarray(src_offs, src_offs + len),
                    dest_offs
                  );
                  return;
                }
                for (var i2 = 0; i2 < len; i2++) {
                  dest[dest_offs + i2] = src[src_offs + i2];
                }
              },
              // Join array of chunks to single array.
              flattenChunks: function(chunks) {
                var i2, l2, len, pos, chunk2, result;
                len = 0;
                for (i2 = 0, l2 = chunks.length; i2 < l2; i2++) {
                  len += chunks[i2].length;
                }
                result = new Uint8Array(len);
                pos = 0;
                for (i2 = 0, l2 = chunks.length; i2 < l2; i2++) {
                  chunk2 = chunks[i2];
                  result.set(chunk2, pos);
                  pos += chunk2.length;
                }
                return result;
              }
            };
            var fnUntyped = {
              arraySet: function(dest, src, src_offs, len, dest_offs) {
                for (var i2 = 0; i2 < len; i2++) {
                  dest[dest_offs + i2] = src[src_offs + i2];
                }
              },
              // Join array of chunks to single array.
              flattenChunks: function(chunks) {
                return [].concat.apply([], chunks);
              }
            };
            exports2.setTyped = function(on) {
              if (on) {
                exports2.Buf8 = Uint8Array;
                exports2.Buf16 = Uint16Array;
                exports2.Buf32 = Int32Array;
                exports2.assign(exports2, fnTyped);
              } else {
                exports2.Buf8 = Array;
                exports2.Buf16 = Array;
                exports2.Buf32 = Array;
                exports2.assign(exports2, fnUntyped);
              }
            };
            exports2.setTyped(TYPED_OK);
          },
          {}
        ],
        2: [
          function(require2, module2, exports2) {
            "use strict";
            var utils = require2("./common");
            var STR_APPLY_OK = true;
            var STR_APPLY_UIA_OK = true;
            try {
              String.fromCharCode.apply(null, [0]);
            } catch (__150) {
              STR_APPLY_OK = false;
            }
            try {
              String.fromCharCode.apply(null, new Uint8Array(1));
            } catch (__150) {
              STR_APPLY_UIA_OK = false;
            }
            var _utf8len = new utils.Buf8(256);
            for (var q = 0; q < 256; q++) {
              _utf8len[q] = q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1;
            }
            _utf8len[254] = _utf8len[254] = 1;
            exports2.string2buf = function(str) {
              var buf, c6, c22, m_pos, i2, str_len = str.length, buf_len = 0;
              for (m_pos = 0; m_pos < str_len; m_pos++) {
                c6 = str.charCodeAt(m_pos);
                if ((c6 & 64512) === 55296 && m_pos + 1 < str_len) {
                  c22 = str.charCodeAt(m_pos + 1);
                  if ((c22 & 64512) === 56320) {
                    c6 = 65536 + (c6 - 55296 << 10) + (c22 - 56320);
                    m_pos++;
                  }
                }
                buf_len += c6 < 128 ? 1 : c6 < 2048 ? 2 : c6 < 65536 ? 3 : 4;
              }
              buf = new utils.Buf8(buf_len);
              for (i2 = 0, m_pos = 0; i2 < buf_len; m_pos++) {
                c6 = str.charCodeAt(m_pos);
                if ((c6 & 64512) === 55296 && m_pos + 1 < str_len) {
                  c22 = str.charCodeAt(m_pos + 1);
                  if ((c22 & 64512) === 56320) {
                    c6 = 65536 + (c6 - 55296 << 10) + (c22 - 56320);
                    m_pos++;
                  }
                }
                if (c6 < 128) {
                  buf[i2++] = c6;
                } else if (c6 < 2048) {
                  buf[i2++] = 192 | c6 >>> 6;
                  buf[i2++] = 128 | c6 & 63;
                } else if (c6 < 65536) {
                  buf[i2++] = 224 | c6 >>> 12;
                  buf[i2++] = 128 | c6 >>> 6 & 63;
                  buf[i2++] = 128 | c6 & 63;
                } else {
                  buf[i2++] = 240 | c6 >>> 18;
                  buf[i2++] = 128 | c6 >>> 12 & 63;
                  buf[i2++] = 128 | c6 >>> 6 & 63;
                  buf[i2++] = 128 | c6 & 63;
                }
              }
              return buf;
            };
            function buf2binstring(buf, len) {
              if (len < 65534) {
                if (buf.subarray && STR_APPLY_UIA_OK || !buf.subarray && STR_APPLY_OK) {
                  return String.fromCharCode.apply(
                    null,
                    utils.shrinkBuf(buf, len)
                  );
                }
              }
              var result = "";
              for (var i2 = 0; i2 < len; i2++) {
                result += String.fromCharCode(buf[i2]);
              }
              return result;
            }
            exports2.buf2binstring = function(buf) {
              return buf2binstring(buf, buf.length);
            };
            exports2.binstring2buf = function(str) {
              var buf = new utils.Buf8(str.length);
              for (var i2 = 0, len = buf.length; i2 < len; i2++) {
                buf[i2] = str.charCodeAt(i2);
              }
              return buf;
            };
            exports2.buf2string = function(buf, max) {
              var i2, out, c6, c_len;
              var len = max || buf.length;
              var utf16buf = new Array(len * 2);
              for (out = 0, i2 = 0; i2 < len; ) {
                c6 = buf[i2++];
                if (c6 < 128) {
                  utf16buf[out++] = c6;
                  continue;
                }
                c_len = _utf8len[c6];
                if (c_len > 4) {
                  utf16buf[out++] = 65533;
                  i2 += c_len - 1;
                  continue;
                }
                c6 &= c_len === 2 ? 31 : c_len === 3 ? 15 : 7;
                while (c_len > 1 && i2 < len) {
                  c6 = c6 << 6 | buf[i2++] & 63;
                  c_len--;
                }
                if (c_len > 1) {
                  utf16buf[out++] = 65533;
                  continue;
                }
                if (c6 < 65536) {
                  utf16buf[out++] = c6;
                } else {
                  c6 -= 65536;
                  utf16buf[out++] = 55296 | c6 >> 10 & 1023;
                  utf16buf[out++] = 56320 | c6 & 1023;
                }
              }
              return buf2binstring(utf16buf, out);
            };
            exports2.utf8border = function(buf, max) {
              var pos;
              max = max || buf.length;
              if (max > buf.length) {
                max = buf.length;
              }
              pos = max - 1;
              while (pos >= 0 && (buf[pos] & 192) === 128) {
                pos--;
              }
              if (pos < 0) {
                return max;
              }
              if (pos === 0) {
                return max;
              }
              return pos + _utf8len[buf[pos]] > max ? pos : max;
            };
          },
          { "./common": 1 }
        ],
        3: [
          function(require2, module2, exports2) {
            "use strict";
            function adler32(adler, buf, len, pos) {
              var s1 = adler & 65535 | 0, s2 = adler >>> 16 & 65535 | 0, n2 = 0;
              while (len !== 0) {
                n2 = len > 2e3 ? 2e3 : len;
                len -= n2;
                do {
                  s1 = s1 + buf[pos++] | 0;
                  s2 = s2 + s1 | 0;
                } while (--n2);
                s1 %= 65521;
                s2 %= 65521;
              }
              return s1 | s2 << 16 | 0;
            }
            module2.exports = adler32;
          },
          {}
        ],
        4: [
          function(require2, module2, exports2) {
            "use strict";
            module2.exports = {
              /* Allowed flush values; see deflate() and inflate() below for details */
              Z_NO_FLUSH: 0,
              Z_PARTIAL_FLUSH: 1,
              Z_SYNC_FLUSH: 2,
              Z_FULL_FLUSH: 3,
              Z_FINISH: 4,
              Z_BLOCK: 5,
              Z_TREES: 6,
              /* Return codes for the compression/decompression functions. Negative values
               * are errors, positive values are used for special but normal events.
               */
              Z_OK: 0,
              Z_STREAM_END: 1,
              Z_NEED_DICT: 2,
              Z_ERRNO: -1,
              Z_STREAM_ERROR: -2,
              Z_DATA_ERROR: -3,
              //Z_MEM_ERROR:     -4,
              Z_BUF_ERROR: -5,
              //Z_VERSION_ERROR: -6,
              /* compression levels */
              Z_NO_COMPRESSION: 0,
              Z_BEST_SPEED: 1,
              Z_BEST_COMPRESSION: 9,
              Z_DEFAULT_COMPRESSION: -1,
              Z_FILTERED: 1,
              Z_HUFFMAN_ONLY: 2,
              Z_RLE: 3,
              Z_FIXED: 4,
              Z_DEFAULT_STRATEGY: 0,
              /* Possible values of the data_type field (though see inflate()) */
              Z_BINARY: 0,
              Z_TEXT: 1,
              //Z_ASCII:                1, // = Z_TEXT (deprecated)
              Z_UNKNOWN: 2,
              /* The deflate compression method */
              Z_DEFLATED: 8
              //Z_NULL:                 null // Use -1 or null inline, depending on var type
            };
          },
          {}
        ],
        5: [
          function(require2, module2, exports2) {
            "use strict";
            function makeTable() {
              var c6, table = [];
              for (var n2 = 0; n2 < 256; n2++) {
                c6 = n2;
                for (var k2 = 0; k2 < 8; k2++) {
                  c6 = c6 & 1 ? 3988292384 ^ c6 >>> 1 : c6 >>> 1;
                }
                table[n2] = c6;
              }
              return table;
            }
            var crcTable = makeTable();
            function crc32(crc, buf, len, pos) {
              var t3 = crcTable, end = pos + len;
              crc ^= -1;
              for (var i2 = pos; i2 < end; i2++) {
                crc = crc >>> 8 ^ t3[(crc ^ buf[i2]) & 255];
              }
              return crc ^ -1;
            }
            module2.exports = crc32;
          },
          {}
        ],
        6: [
          function(require2, module2, exports2) {
            "use strict";
            function GZheader() {
              this.text = 0;
              this.time = 0;
              this.xflags = 0;
              this.os = 0;
              this.extra = null;
              this.extra_len = 0;
              this.name = "";
              this.comment = "";
              this.hcrc = 0;
              this.done = false;
            }
            module2.exports = GZheader;
          },
          {}
        ],
        7: [
          function(require2, module2, exports2) {
            "use strict";
            var BAD = 30;
            var TYPE = 12;
            module2.exports = function inflate_fast(strm, start2) {
              var state;
              var _in;
              var last;
              var _out;
              var beg;
              var end;
              var dmax;
              var wsize;
              var whave;
              var wnext;
              var s_window;
              var hold;
              var bits;
              var lcode;
              var dcode;
              var lmask;
              var dmask;
              var here;
              var op;
              var len;
              var dist;
              var from;
              var from_source;
              var input, output;
              state = strm.state;
              _in = strm.next_in;
              input = strm.input;
              last = _in + (strm.avail_in - 5);
              _out = strm.next_out;
              output = strm.output;
              beg = _out - (start2 - strm.avail_out);
              end = _out + (strm.avail_out - 257);
              dmax = state.dmax;
              wsize = state.wsize;
              whave = state.whave;
              wnext = state.wnext;
              s_window = state.window;
              hold = state.hold;
              bits = state.bits;
              lcode = state.lencode;
              dcode = state.distcode;
              lmask = (1 << state.lenbits) - 1;
              dmask = (1 << state.distbits) - 1;
              top: do {
                if (bits < 15) {
                  hold += input[_in++] << bits;
                  bits += 8;
                  hold += input[_in++] << bits;
                  bits += 8;
                }
                here = lcode[hold & lmask];
                dolen: for (; ; ) {
                  op = here >>> 24;
                  hold >>>= op;
                  bits -= op;
                  op = here >>> 16 & 255;
                  if (op === 0) {
                    output[_out++] = here & 65535;
                  } else if (op & 16) {
                    len = here & 65535;
                    op &= 15;
                    if (op) {
                      if (bits < op) {
                        hold += input[_in++] << bits;
                        bits += 8;
                      }
                      len += hold & (1 << op) - 1;
                      hold >>>= op;
                      bits -= op;
                    }
                    if (bits < 15) {
                      hold += input[_in++] << bits;
                      bits += 8;
                      hold += input[_in++] << bits;
                      bits += 8;
                    }
                    here = dcode[hold & dmask];
                    dodist: for (; ; ) {
                      op = here >>> 24;
                      hold >>>= op;
                      bits -= op;
                      op = here >>> 16 & 255;
                      if (op & 16) {
                        dist = here & 65535;
                        op &= 15;
                        if (bits < op) {
                          hold += input[_in++] << bits;
                          bits += 8;
                          if (bits < op) {
                            hold += input[_in++] << bits;
                            bits += 8;
                          }
                        }
                        dist += hold & (1 << op) - 1;
                        if (dist > dmax) {
                          strm.msg = "invalid distance too far back";
                          state.mode = BAD;
                          break top;
                        }
                        hold >>>= op;
                        bits -= op;
                        op = _out - beg;
                        if (dist > op) {
                          op = dist - op;
                          if (op > whave) {
                            if (state.sane) {
                              strm.msg = "invalid distance too far back";
                              state.mode = BAD;
                              break top;
                            }
                          }
                          from = 0;
                          from_source = s_window;
                          if (wnext === 0) {
                            from += wsize - op;
                            if (op < len) {
                              len -= op;
                              do {
                                output[_out++] = s_window[from++];
                              } while (--op);
                              from = _out - dist;
                              from_source = output;
                            }
                          } else if (wnext < op) {
                            from += wsize + wnext - op;
                            op -= wnext;
                            if (op < len) {
                              len -= op;
                              do {
                                output[_out++] = s_window[from++];
                              } while (--op);
                              from = 0;
                              if (wnext < len) {
                                op = wnext;
                                len -= op;
                                do {
                                  output[_out++] = s_window[from++];
                                } while (--op);
                                from = _out - dist;
                                from_source = output;
                              }
                            }
                          } else {
                            from += wnext - op;
                            if (op < len) {
                              len -= op;
                              do {
                                output[_out++] = s_window[from++];
                              } while (--op);
                              from = _out - dist;
                              from_source = output;
                            }
                          }
                          while (len > 2) {
                            output[_out++] = from_source[from++];
                            output[_out++] = from_source[from++];
                            output[_out++] = from_source[from++];
                            len -= 3;
                          }
                          if (len) {
                            output[_out++] = from_source[from++];
                            if (len > 1) {
                              output[_out++] = from_source[from++];
                            }
                          }
                        } else {
                          from = _out - dist;
                          do {
                            output[_out++] = output[from++];
                            output[_out++] = output[from++];
                            output[_out++] = output[from++];
                            len -= 3;
                          } while (len > 2);
                          if (len) {
                            output[_out++] = output[from++];
                            if (len > 1) {
                              output[_out++] = output[from++];
                            }
                          }
                        }
                      } else if ((op & 64) === 0) {
                        here = dcode[(here & 65535) + (hold & (1 << op) - 1)];
                        continue dodist;
                      } else {
                        strm.msg = "invalid distance code";
                        state.mode = BAD;
                        break top;
                      }
                      break;
                    }
                  } else if ((op & 64) === 0) {
                    here = lcode[(here & 65535) + (hold & (1 << op) - 1)];
                    continue dolen;
                  } else if (op & 32) {
                    state.mode = TYPE;
                    break top;
                  } else {
                    strm.msg = "invalid literal/length code";
                    state.mode = BAD;
                    break top;
                  }
                  break;
                }
              } while (_in < last && _out < end);
              len = bits >> 3;
              _in -= len;
              bits -= len << 3;
              hold &= (1 << bits) - 1;
              strm.next_in = _in;
              strm.next_out = _out;
              strm.avail_in = _in < last ? 5 + (last - _in) : 5 - (_in - last);
              strm.avail_out = _out < end ? 257 + (end - _out) : 257 - (_out - end);
              state.hold = hold;
              state.bits = bits;
              return;
            };
          },
          {}
        ],
        8: [
          function(require2, module2, exports2) {
            "use strict";
            var utils = require2("../utils/common");
            var adler32 = require2("./adler32");
            var crc32 = require2("./crc32");
            var inflate_fast = require2("./inffast");
            var inflate_table = require2("./inftrees");
            var CODES = 0;
            var LENS = 1;
            var DISTS = 2;
            var Z_FINISH = 4;
            var Z_BLOCK = 5;
            var Z_TREES = 6;
            var Z_OK = 0;
            var Z_STREAM_END = 1;
            var Z_NEED_DICT = 2;
            var Z_STREAM_ERROR = -2;
            var Z_DATA_ERROR = -3;
            var Z_MEM_ERROR = -4;
            var Z_BUF_ERROR = -5;
            var Z_DEFLATED = 8;
            var HEAD = 1;
            var FLAGS = 2;
            var TIME = 3;
            var OS = 4;
            var EXLEN = 5;
            var EXTRA = 6;
            var NAME = 7;
            var COMMENT = 8;
            var HCRC = 9;
            var DICTID = 10;
            var DICT = 11;
            var TYPE = 12;
            var TYPEDO = 13;
            var STORED = 14;
            var COPY_ = 15;
            var COPY = 16;
            var TABLE = 17;
            var LENLENS = 18;
            var CODELENS = 19;
            var LEN_ = 20;
            var LEN = 21;
            var LENEXT = 22;
            var DIST = 23;
            var DISTEXT = 24;
            var MATCH = 25;
            var LIT = 26;
            var CHECK = 27;
            var LENGTH = 28;
            var DONE = 29;
            var BAD = 30;
            var MEM = 31;
            var SYNC = 32;
            var ENOUGH_LENS = 852;
            var ENOUGH_DISTS = 592;
            var MAX_WBITS = 15;
            var DEF_WBITS = MAX_WBITS;
            function zswap32(q) {
              return (q >>> 24 & 255) + (q >>> 8 & 65280) + ((q & 65280) << 8) + ((q & 255) << 24);
            }
            function InflateState() {
              this.mode = 0;
              this.last = false;
              this.wrap = 0;
              this.havedict = false;
              this.flags = 0;
              this.dmax = 0;
              this.check = 0;
              this.total = 0;
              this.head = null;
              this.wbits = 0;
              this.wsize = 0;
              this.whave = 0;
              this.wnext = 0;
              this.window = null;
              this.hold = 0;
              this.bits = 0;
              this.length = 0;
              this.offset = 0;
              this.extra = 0;
              this.lencode = null;
              this.distcode = null;
              this.lenbits = 0;
              this.distbits = 0;
              this.ncode = 0;
              this.nlen = 0;
              this.ndist = 0;
              this.have = 0;
              this.next = null;
              this.lens = new utils.Buf16(
                320
              );
              this.work = new utils.Buf16(
                288
              );
              this.lendyn = null;
              this.distdyn = null;
              this.sane = 0;
              this.back = 0;
              this.was = 0;
            }
            function inflateResetKeep(strm) {
              var state;
              if (!strm || !strm.state) {
                return Z_STREAM_ERROR;
              }
              state = strm.state;
              strm.total_in = strm.total_out = state.total = 0;
              strm.msg = "";
              if (state.wrap) {
                strm.adler = state.wrap & 1;
              }
              state.mode = HEAD;
              state.last = 0;
              state.havedict = 0;
              state.dmax = 32768;
              state.head = null;
              state.hold = 0;
              state.bits = 0;
              state.lencode = state.lendyn = new utils.Buf32(
                ENOUGH_LENS
              );
              state.distcode = state.distdyn = new utils.Buf32(
                ENOUGH_DISTS
              );
              state.sane = 1;
              state.back = -1;
              return Z_OK;
            }
            function inflateReset(strm) {
              var state;
              if (!strm || !strm.state) {
                return Z_STREAM_ERROR;
              }
              state = strm.state;
              state.wsize = 0;
              state.whave = 0;
              state.wnext = 0;
              return inflateResetKeep(strm);
            }
            function inflateReset2(strm, windowBits) {
              var wrap;
              var state;
              if (!strm || !strm.state) {
                return Z_STREAM_ERROR;
              }
              state = strm.state;
              if (windowBits < 0) {
                wrap = 0;
                windowBits = -windowBits;
              } else {
                wrap = (windowBits >> 4) + 1;
                if (windowBits < 48) {
                  windowBits &= 15;
                }
              }
              if (windowBits && (windowBits < 8 || windowBits > 15)) {
                return Z_STREAM_ERROR;
              }
              if (state.window !== null && state.wbits !== windowBits) {
                state.window = null;
              }
              state.wrap = wrap;
              state.wbits = windowBits;
              return inflateReset(strm);
            }
            function inflateInit2(strm, windowBits) {
              var ret;
              var state;
              if (!strm) {
                return Z_STREAM_ERROR;
              }
              state = new InflateState();
              strm.state = state;
              state.window = null;
              ret = inflateReset2(strm, windowBits);
              if (ret !== Z_OK) {
                strm.state = null;
              }
              return ret;
            }
            function inflateInit(strm) {
              return inflateInit2(strm, DEF_WBITS);
            }
            var virgin = true;
            var lenfix, distfix;
            function fixedtables(state) {
              if (virgin) {
                var sym;
                lenfix = new utils.Buf32(512);
                distfix = new utils.Buf32(32);
                sym = 0;
                while (sym < 144) {
                  state.lens[sym++] = 8;
                }
                while (sym < 256) {
                  state.lens[sym++] = 9;
                }
                while (sym < 280) {
                  state.lens[sym++] = 7;
                }
                while (sym < 288) {
                  state.lens[sym++] = 8;
                }
                inflate_table(
                  LENS,
                  state.lens,
                  0,
                  288,
                  lenfix,
                  0,
                  state.work,
                  { bits: 9 }
                );
                sym = 0;
                while (sym < 32) {
                  state.lens[sym++] = 5;
                }
                inflate_table(
                  DISTS,
                  state.lens,
                  0,
                  32,
                  distfix,
                  0,
                  state.work,
                  { bits: 5 }
                );
                virgin = false;
              }
              state.lencode = lenfix;
              state.lenbits = 9;
              state.distcode = distfix;
              state.distbits = 5;
            }
            function updatewindow(strm, src, end, copy) {
              var dist;
              var state = strm.state;
              if (state.window === null) {
                state.wsize = 1 << state.wbits;
                state.wnext = 0;
                state.whave = 0;
                state.window = new utils.Buf8(state.wsize);
              }
              if (copy >= state.wsize) {
                utils.arraySet(
                  state.window,
                  src,
                  end - state.wsize,
                  state.wsize,
                  0
                );
                state.wnext = 0;
                state.whave = state.wsize;
              } else {
                dist = state.wsize - state.wnext;
                if (dist > copy) {
                  dist = copy;
                }
                utils.arraySet(
                  state.window,
                  src,
                  end - copy,
                  dist,
                  state.wnext
                );
                copy -= dist;
                if (copy) {
                  utils.arraySet(
                    state.window,
                    src,
                    end - copy,
                    copy,
                    0
                  );
                  state.wnext = copy;
                  state.whave = state.wsize;
                } else {
                  state.wnext += dist;
                  if (state.wnext === state.wsize) {
                    state.wnext = 0;
                  }
                  if (state.whave < state.wsize) {
                    state.whave += dist;
                  }
                }
              }
              return 0;
            }
            function inflate(strm, flush2) {
              var state;
              var input, output;
              var next;
              var put;
              var have, left;
              var hold;
              var bits;
              var _in, _out;
              var copy;
              var from;
              var from_source;
              var here = 0;
              var here_bits, here_op, here_val;
              var last_bits, last_op, last_val;
              var len;
              var ret;
              var hbuf = new utils.Buf8(
                4
              );
              var opts;
              var n2;
              var order = (
                /* permutation of code lengths */
                [
                  16,
                  17,
                  18,
                  0,
                  8,
                  7,
                  9,
                  6,
                  10,
                  5,
                  11,
                  4,
                  12,
                  3,
                  13,
                  2,
                  14,
                  1,
                  15
                ]
              );
              if (!strm || !strm.state || !strm.output || !strm.input && strm.avail_in !== 0) {
                return Z_STREAM_ERROR;
              }
              state = strm.state;
              if (state.mode === TYPE) {
                state.mode = TYPEDO;
              }
              put = strm.next_out;
              output = strm.output;
              left = strm.avail_out;
              next = strm.next_in;
              input = strm.input;
              have = strm.avail_in;
              hold = state.hold;
              bits = state.bits;
              _in = have;
              _out = left;
              ret = Z_OK;
              inf_leave: for (; ; ) {
                switch (state.mode) {
                  case HEAD:
                    if (state.wrap === 0) {
                      state.mode = TYPEDO;
                      break;
                    }
                    while (bits < 16) {
                      if (have === 0) {
                        break inf_leave;
                      }
                      have--;
                      hold += input[next++] << bits;
                      bits += 8;
                    }
                    if (state.wrap & 2 && hold === 35615) {
                      state.check = 0;
                      hbuf[0] = hold & 255;
                      hbuf[1] = hold >>> 8 & 255;
                      state.check = crc32(
                        state.check,
                        hbuf,
                        2,
                        0
                      );
                      hold = 0;
                      bits = 0;
                      state.mode = FLAGS;
                      break;
                    }
                    state.flags = 0;
                    if (state.head) {
                      state.head.done = false;
                    }
                    if (!(state.wrap & 1) || (((hold & 255) << 8) + (hold >> 8)) % 31) {
                      strm.msg = "incorrect header check";
                      state.mode = BAD;
                      break;
                    }
                    if ((hold & 15) !== Z_DEFLATED) {
                      strm.msg = "unknown compression method";
                      state.mode = BAD;
                      break;
                    }
                    hold >>>= 4;
                    bits -= 4;
                    len = (hold & 15) + 8;
                    if (state.wbits === 0) {
                      state.wbits = len;
                    } else if (len > state.wbits) {
                      strm.msg = "invalid window size";
                      state.mode = BAD;
                      break;
                    }
                    state.dmax = 1 << len;
                    strm.adler = state.check = 1;
                    state.mode = hold & 512 ? DICTID : TYPE;
                    hold = 0;
                    bits = 0;
                    break;
                  case FLAGS:
                    while (bits < 16) {
                      if (have === 0) {
                        break inf_leave;
                      }
                      have--;
                      hold += input[next++] << bits;
                      bits += 8;
                    }
                    state.flags = hold;
                    if ((state.flags & 255) !== Z_DEFLATED) {
                      strm.msg = "unknown compression method";
                      state.mode = BAD;
                      break;
                    }
                    if (state.flags & 57344) {
                      strm.msg = "unknown header flags set";
                      state.mode = BAD;
                      break;
                    }
                    if (state.head) {
                      state.head.text = hold >> 8 & 1;
                    }
                    if (state.flags & 512) {
                      hbuf[0] = hold & 255;
                      hbuf[1] = hold >>> 8 & 255;
                      state.check = crc32(
                        state.check,
                        hbuf,
                        2,
                        0
                      );
                    }
                    hold = 0;
                    bits = 0;
                    state.mode = TIME;
                  /* falls through */
                  case TIME:
                    while (bits < 32) {
                      if (have === 0) {
                        break inf_leave;
                      }
                      have--;
                      hold += input[next++] << bits;
                      bits += 8;
                    }
                    if (state.head) {
                      state.head.time = hold;
                    }
                    if (state.flags & 512) {
                      hbuf[0] = hold & 255;
                      hbuf[1] = hold >>> 8 & 255;
                      hbuf[2] = hold >>> 16 & 255;
                      hbuf[3] = hold >>> 24 & 255;
                      state.check = crc32(
                        state.check,
                        hbuf,
                        4,
                        0
                      );
                    }
                    hold = 0;
                    bits = 0;
                    state.mode = OS;
                  /* falls through */
                  case OS:
                    while (bits < 16) {
                      if (have === 0) {
                        break inf_leave;
                      }
                      have--;
                      hold += input[next++] << bits;
                      bits += 8;
                    }
                    if (state.head) {
                      state.head.xflags = hold & 255;
                      state.head.os = hold >> 8;
                    }
                    if (state.flags & 512) {
                      hbuf[0] = hold & 255;
                      hbuf[1] = hold >>> 8 & 255;
                      state.check = crc32(
                        state.check,
                        hbuf,
                        2,
                        0
                      );
                    }
                    hold = 0;
                    bits = 0;
                    state.mode = EXLEN;
                  /* falls through */
                  case EXLEN:
                    if (state.flags & 1024) {
                      while (bits < 16) {
                        if (have === 0) {
                          break inf_leave;
                        }
                        have--;
                        hold += input[next++] << bits;
                        bits += 8;
                      }
                      state.length = hold;
                      if (state.head) {
                        state.head.extra_len = hold;
                      }
                      if (state.flags & 512) {
                        hbuf[0] = hold & 255;
                        hbuf[1] = hold >>> 8 & 255;
                        state.check = crc32(
                          state.check,
                          hbuf,
                          2,
                          0
                        );
                      }
                      hold = 0;
                      bits = 0;
                    } else if (state.head) {
                      state.head.extra = null;
                    }
                    state.mode = EXTRA;
                  /* falls through */
                  case EXTRA:
                    if (state.flags & 1024) {
                      copy = state.length;
                      if (copy > have) {
                        copy = have;
                      }
                      if (copy) {
                        if (state.head) {
                          len = state.head.extra_len - state.length;
                          if (!state.head.extra) {
                            state.head.extra = new Array(
                              state.head.extra_len
                            );
                          }
                          utils.arraySet(
                            state.head.extra,
                            input,
                            next,
                            // extra field is limited to 65536 bytes
                            // - no need for additional size check
                            copy,
                            /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/
                            len
                          );
                        }
                        if (state.flags & 512) {
                          state.check = crc32(
                            state.check,
                            input,
                            copy,
                            next
                          );
                        }
                        have -= copy;
                        next += copy;
                        state.length -= copy;
                      }
                      if (state.length) {
                        break inf_leave;
                      }
                    }
                    state.length = 0;
                    state.mode = NAME;
                  /* falls through */
                  case NAME:
                    if (state.flags & 2048) {
                      if (have === 0) {
                        break inf_leave;
                      }
                      copy = 0;
                      do {
                        len = input[next + copy++];
                        if (state.head && len && state.length < 65536) {
                          state.head.name += String.fromCharCode(len);
                        }
                      } while (len && copy < have);
                      if (state.flags & 512) {
                        state.check = crc32(
                          state.check,
                          input,
                          copy,
                          next
                        );
                      }
                      have -= copy;
                      next += copy;
                      if (len) {
                        break inf_leave;
                      }
                    } else if (state.head) {
                      state.head.name = null;
                    }
                    state.length = 0;
                    state.mode = COMMENT;
                  /* falls through */
                  case COMMENT:
                    if (state.flags & 4096) {
                      if (have === 0) {
                        break inf_leave;
                      }
                      copy = 0;
                      do {
                        len = input[next + copy++];
                        if (state.head && len && state.length < 65536) {
                          state.head.comment += String.fromCharCode(len);
                        }
                      } while (len && copy < have);
                      if (state.flags & 512) {
                        state.check = crc32(
                          state.check,
                          input,
                          copy,
                          next
                        );
                      }
                      have -= copy;
                      next += copy;
                      if (len) {
                        break inf_leave;
                      }
                    } else if (state.head) {
                      state.head.comment = null;
                    }
                    state.mode = HCRC;
                  /* falls through */
                  case HCRC:
                    if (state.flags & 512) {
                      while (bits < 16) {
                        if (have === 0) {
                          break inf_leave;
                        }
                        have--;
                        hold += input[next++] << bits;
                        bits += 8;
                      }
                      if (hold !== (state.check & 65535)) {
                        strm.msg = "header crc mismatch";
                        state.mode = BAD;
                        break;
                      }
                      hold = 0;
                      bits = 0;
                    }
                    if (state.head) {
                      state.head.hcrc = state.flags >> 9 & 1;
                      state.head.done = true;
                    }
                    strm.adler = state.check = 0;
                    state.mode = TYPE;
                    break;
                  case DICTID:
                    while (bits < 32) {
                      if (have === 0) {
                        break inf_leave;
                      }
                      have--;
                      hold += input[next++] << bits;
                      bits += 8;
                    }
                    strm.adler = state.check = zswap32(hold);
                    hold = 0;
                    bits = 0;
                    state.mode = DICT;
                  /* falls through */
                  case DICT:
                    if (state.havedict === 0) {
                      strm.next_out = put;
                      strm.avail_out = left;
                      strm.next_in = next;
                      strm.avail_in = have;
                      state.hold = hold;
                      state.bits = bits;
                      return Z_NEED_DICT;
                    }
                    strm.adler = state.check = 1;
                    state.mode = TYPE;
                  /* falls through */
                  case TYPE:
                    if (flush2 === Z_BLOCK || flush2 === Z_TREES) {
                      break inf_leave;
                    }
                  /* falls through */
                  case TYPEDO:
                    if (state.last) {
                      hold >>>= bits & 7;
                      bits -= bits & 7;
                      state.mode = CHECK;
                      break;
                    }
                    while (bits < 3) {
                      if (have === 0) {
                        break inf_leave;
                      }
                      have--;
                      hold += input[next++] << bits;
                      bits += 8;
                    }
                    state.last = hold & 1;
                    hold >>>= 1;
                    bits -= 1;
                    switch (hold & 3) {
                      case 0:
                        state.mode = STORED;
                        break;
                      case 1:
                        fixedtables(state);
                        state.mode = LEN_;
                        if (flush2 === Z_TREES) {
                          hold >>>= 2;
                          bits -= 2;
                          break inf_leave;
                        }
                        break;
                      case 2:
                        state.mode = TABLE;
                        break;
                      case 3:
                        strm.msg = "invalid block type";
                        state.mode = BAD;
                    }
                    hold >>>= 2;
                    bits -= 2;
                    break;
                  case STORED:
                    hold >>>= bits & 7;
                    bits -= bits & 7;
                    while (bits < 32) {
                      if (have === 0) {
                        break inf_leave;
                      }
                      have--;
                      hold += input[next++] << bits;
                      bits += 8;
                    }
                    if ((hold & 65535) !== (hold >>> 16 ^ 65535)) {
                      strm.msg = "invalid stored block lengths";
                      state.mode = BAD;
                      break;
                    }
                    state.length = hold & 65535;
                    hold = 0;
                    bits = 0;
                    state.mode = COPY_;
                    if (flush2 === Z_TREES) {
                      break inf_leave;
                    }
                  /* falls through */
                  case COPY_:
                    state.mode = COPY;
                  /* falls through */
                  case COPY:
                    copy = state.length;
                    if (copy) {
                      if (copy > have) {
                        copy = have;
                      }
                      if (copy > left) {
                        copy = left;
                      }
                      if (copy === 0) {
                        break inf_leave;
                      }
                      utils.arraySet(
                        output,
                        input,
                        next,
                        copy,
                        put
                      );
                      have -= copy;
                      next += copy;
                      left -= copy;
                      put += copy;
                      state.length -= copy;
                      break;
                    }
                    state.mode = TYPE;
                    break;
                  case TABLE:
                    while (bits < 14) {
                      if (have === 0) {
                        break inf_leave;
                      }
                      have--;
                      hold += input[next++] << bits;
                      bits += 8;
                    }
                    state.nlen = (hold & 31) + 257;
                    hold >>>= 5;
                    bits -= 5;
                    state.ndist = (hold & 31) + 1;
                    hold >>>= 5;
                    bits -= 5;
                    state.ncode = (hold & 15) + 4;
                    hold >>>= 4;
                    bits -= 4;
                    if (state.nlen > 286 || state.ndist > 30) {
                      strm.msg = "too many length or distance symbols";
                      state.mode = BAD;
                      break;
                    }
                    state.have = 0;
                    state.mode = LENLENS;
                  /* falls through */
                  case LENLENS:
                    while (state.have < state.ncode) {
                      while (bits < 3) {
                        if (have === 0) {
                          break inf_leave;
                        }
                        have--;
                        hold += input[next++] << bits;
                        bits += 8;
                      }
                      state.lens[order[state.have++]] = hold & 7;
                      hold >>>= 3;
                      bits -= 3;
                    }
                    while (state.have < 19) {
                      state.lens[order[state.have++]] = 0;
                    }
                    state.lencode = state.lendyn;
                    state.lenbits = 7;
                    opts = { bits: state.lenbits };
                    ret = inflate_table(
                      CODES,
                      state.lens,
                      0,
                      19,
                      state.lencode,
                      0,
                      state.work,
                      opts
                    );
                    state.lenbits = opts.bits;
                    if (ret) {
                      strm.msg = "invalid code lengths set";
                      state.mode = BAD;
                      break;
                    }
                    state.have = 0;
                    state.mode = CODELENS;
                  /* falls through */
                  case CODELENS:
                    while (state.have < state.nlen + state.ndist) {
                      for (; ; ) {
                        here = state.lencode[hold & (1 << state.lenbits) - 1];
                        here_bits = here >>> 24;
                        here_op = here >>> 16 & 255;
                        here_val = here & 65535;
                        if (here_bits <= bits) {
                          break;
                        }
                        if (have === 0) {
                          break inf_leave;
                        }
                        have--;
                        hold += input[next++] << bits;
                        bits += 8;
                      }
                      if (here_val < 16) {
                        hold >>>= here_bits;
                        bits -= here_bits;
                        state.lens[state.have++] = here_val;
                      } else {
                        if (here_val === 16) {
                          n2 = here_bits + 2;
                          while (bits < n2) {
                            if (have === 0) {
                              break inf_leave;
                            }
                            have--;
                            hold += input[next++] << bits;
                            bits += 8;
                          }
                          hold >>>= here_bits;
                          bits -= here_bits;
                          if (state.have === 0) {
                            strm.msg = "invalid bit length repeat";
                            state.mode = BAD;
                            break;
                          }
                          len = state.lens[state.have - 1];
                          copy = 3 + (hold & 3);
                          hold >>>= 2;
                          bits -= 2;
                        } else if (here_val === 17) {
                          n2 = here_bits + 3;
                          while (bits < n2) {
                            if (have === 0) {
                              break inf_leave;
                            }
                            have--;
                            hold += input[next++] << bits;
                            bits += 8;
                          }
                          hold >>>= here_bits;
                          bits -= here_bits;
                          len = 0;
                          copy = 3 + (hold & 7);
                          hold >>>= 3;
                          bits -= 3;
                        } else {
                          n2 = here_bits + 7;
                          while (bits < n2) {
                            if (have === 0) {
                              break inf_leave;
                            }
                            have--;
                            hold += input[next++] << bits;
                            bits += 8;
                          }
                          hold >>>= here_bits;
                          bits -= here_bits;
                          len = 0;
                          copy = 11 + (hold & 127);
                          hold >>>= 7;
                          bits -= 7;
                        }
                        if (state.have + copy > state.nlen + state.ndist) {
                          strm.msg = "invalid bit length repeat";
                          state.mode = BAD;
                          break;
                        }
                        while (copy--) {
                          state.lens[state.have++] = len;
                        }
                      }
                    }
                    if (state.mode === BAD) {
                      break;
                    }
                    if (state.lens[256] === 0) {
                      strm.msg = "invalid code -- missing end-of-block";
                      state.mode = BAD;
                      break;
                    }
                    state.lenbits = 9;
                    opts = { bits: state.lenbits };
                    ret = inflate_table(
                      LENS,
                      state.lens,
                      0,
                      state.nlen,
                      state.lencode,
                      0,
                      state.work,
                      opts
                    );
                    state.lenbits = opts.bits;
                    if (ret) {
                      strm.msg = "invalid literal/lengths set";
                      state.mode = BAD;
                      break;
                    }
                    state.distbits = 6;
                    state.distcode = state.distdyn;
                    opts = { bits: state.distbits };
                    ret = inflate_table(
                      DISTS,
                      state.lens,
                      state.nlen,
                      state.ndist,
                      state.distcode,
                      0,
                      state.work,
                      opts
                    );
                    state.distbits = opts.bits;
                    if (ret) {
                      strm.msg = "invalid distances set";
                      state.mode = BAD;
                      break;
                    }
                    state.mode = LEN_;
                    if (flush2 === Z_TREES) {
                      break inf_leave;
                    }
                  /* falls through */
                  case LEN_:
                    state.mode = LEN;
                  /* falls through */
                  case LEN:
                    if (have >= 6 && left >= 258) {
                      strm.next_out = put;
                      strm.avail_out = left;
                      strm.next_in = next;
                      strm.avail_in = have;
                      state.hold = hold;
                      state.bits = bits;
                      inflate_fast(strm, _out);
                      put = strm.next_out;
                      output = strm.output;
                      left = strm.avail_out;
                      next = strm.next_in;
                      input = strm.input;
                      have = strm.avail_in;
                      hold = state.hold;
                      bits = state.bits;
                      if (state.mode === TYPE) {
                        state.back = -1;
                      }
                      break;
                    }
                    state.back = 0;
                    for (; ; ) {
                      here = state.lencode[hold & (1 << state.lenbits) - 1];
                      here_bits = here >>> 24;
                      here_op = here >>> 16 & 255;
                      here_val = here & 65535;
                      if (here_bits <= bits) {
                        break;
                      }
                      if (have === 0) {
                        break inf_leave;
                      }
                      have--;
                      hold += input[next++] << bits;
                      bits += 8;
                    }
                    if (here_op && (here_op & 240) === 0) {
                      last_bits = here_bits;
                      last_op = here_op;
                      last_val = here_val;
                      for (; ; ) {
                        here = state.lencode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)];
                        here_bits = here >>> 24;
                        here_op = here >>> 16 & 255;
                        here_val = here & 65535;
                        if (last_bits + here_bits <= bits) {
                          break;
                        }
                        if (have === 0) {
                          break inf_leave;
                        }
                        have--;
                        hold += input[next++] << bits;
                        bits += 8;
                      }
                      hold >>>= last_bits;
                      bits -= last_bits;
                      state.back += last_bits;
                    }
                    hold >>>= here_bits;
                    bits -= here_bits;
                    state.back += here_bits;
                    state.length = here_val;
                    if (here_op === 0) {
                      state.mode = LIT;
                      break;
                    }
                    if (here_op & 32) {
                      state.back = -1;
                      state.mode = TYPE;
                      break;
                    }
                    if (here_op & 64) {
                      strm.msg = "invalid literal/length code";
                      state.mode = BAD;
                      break;
                    }
                    state.extra = here_op & 15;
                    state.mode = LENEXT;
                  /* falls through */
                  case LENEXT:
                    if (state.extra) {
                      n2 = state.extra;
                      while (bits < n2) {
                        if (have === 0) {
                          break inf_leave;
                        }
                        have--;
                        hold += input[next++] << bits;
                        bits += 8;
                      }
                      state.length += hold & (1 << state.extra) - 1;
                      hold >>>= state.extra;
                      bits -= state.extra;
                      state.back += state.extra;
                    }
                    state.was = state.length;
                    state.mode = DIST;
                  /* falls through */
                  case DIST:
                    for (; ; ) {
                      here = state.distcode[hold & (1 << state.distbits) - 1];
                      here_bits = here >>> 24;
                      here_op = here >>> 16 & 255;
                      here_val = here & 65535;
                      if (here_bits <= bits) {
                        break;
                      }
                      if (have === 0) {
                        break inf_leave;
                      }
                      have--;
                      hold += input[next++] << bits;
                      bits += 8;
                    }
                    if ((here_op & 240) === 0) {
                      last_bits = here_bits;
                      last_op = here_op;
                      last_val = here_val;
                      for (; ; ) {
                        here = state.distcode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)];
                        here_bits = here >>> 24;
                        here_op = here >>> 16 & 255;
                        here_val = here & 65535;
                        if (last_bits + here_bits <= bits) {
                          break;
                        }
                        if (have === 0) {
                          break inf_leave;
                        }
                        have--;
                        hold += input[next++] << bits;
                        bits += 8;
                      }
                      hold >>>= last_bits;
                      bits -= last_bits;
                      state.back += last_bits;
                    }
                    hold >>>= here_bits;
                    bits -= here_bits;
                    state.back += here_bits;
                    if (here_op & 64) {
                      strm.msg = "invalid distance code";
                      state.mode = BAD;
                      break;
                    }
                    state.offset = here_val;
                    state.extra = here_op & 15;
                    state.mode = DISTEXT;
                  /* falls through */
                  case DISTEXT:
                    if (state.extra) {
                      n2 = state.extra;
                      while (bits < n2) {
                        if (have === 0) {
                          break inf_leave;
                        }
                        have--;
                        hold += input[next++] << bits;
                        bits += 8;
                      }
                      state.offset += hold & (1 << state.extra) - 1;
                      hold >>>= state.extra;
                      bits -= state.extra;
                      state.back += state.extra;
                    }
                    if (state.offset > state.dmax) {
                      strm.msg = "invalid distance too far back";
                      state.mode = BAD;
                      break;
                    }
                    state.mode = MATCH;
                  /* falls through */
                  case MATCH:
                    if (left === 0) {
                      break inf_leave;
                    }
                    copy = _out - left;
                    if (state.offset > copy) {
                      copy = state.offset - copy;
                      if (copy > state.whave) {
                        if (state.sane) {
                          strm.msg = "invalid distance too far back";
                          state.mode = BAD;
                          break;
                        }
                      }
                      if (copy > state.wnext) {
                        copy -= state.wnext;
                        from = state.wsize - copy;
                      } else {
                        from = state.wnext - copy;
                      }
                      if (copy > state.length) {
                        copy = state.length;
                      }
                      from_source = state.window;
                    } else {
                      from_source = output;
                      from = put - state.offset;
                      copy = state.length;
                    }
                    if (copy > left) {
                      copy = left;
                    }
                    left -= copy;
                    state.length -= copy;
                    do {
                      output[put++] = from_source[from++];
                    } while (--copy);
                    if (state.length === 0) {
                      state.mode = LEN;
                    }
                    break;
                  case LIT:
                    if (left === 0) {
                      break inf_leave;
                    }
                    output[put++] = state.length;
                    left--;
                    state.mode = LEN;
                    break;
                  case CHECK:
                    if (state.wrap) {
                      while (bits < 32) {
                        if (have === 0) {
                          break inf_leave;
                        }
                        have--;
                        hold |= input[next++] << bits;
                        bits += 8;
                      }
                      _out -= left;
                      strm.total_out += _out;
                      state.total += _out;
                      if (_out) {
                        strm.adler = state.check = /*UPDATE(state.check, put - _out, _out);*/
                        state.flags ? crc32(
                          state.check,
                          output,
                          _out,
                          put - _out
                        ) : adler32(
                          state.check,
                          output,
                          _out,
                          put - _out
                        );
                      }
                      _out = left;
                      if ((state.flags ? hold : zswap32(hold)) !== state.check) {
                        strm.msg = "incorrect data check";
                        state.mode = BAD;
                        break;
                      }
                      hold = 0;
                      bits = 0;
                    }
                    state.mode = LENGTH;
                  /* falls through */
                  case LENGTH:
                    if (state.wrap && state.flags) {
                      while (bits < 32) {
                        if (have === 0) {
                          break inf_leave;
                        }
                        have--;
                        hold += input[next++] << bits;
                        bits += 8;
                      }
                      if (hold !== (state.total & 4294967295)) {
                        strm.msg = "incorrect length check";
                        state.mode = BAD;
                        break;
                      }
                      hold = 0;
                      bits = 0;
                    }
                    state.mode = DONE;
                  /* falls through */
                  case DONE:
                    ret = Z_STREAM_END;
                    break inf_leave;
                  case BAD:
                    ret = Z_DATA_ERROR;
                    break inf_leave;
                  case MEM:
                    return Z_MEM_ERROR;
                  case SYNC:
                  /* falls through */
                  default:
                    return Z_STREAM_ERROR;
                }
              }
              strm.next_out = put;
              strm.avail_out = left;
              strm.next_in = next;
              strm.avail_in = have;
              state.hold = hold;
              state.bits = bits;
              if (state.wsize || _out !== strm.avail_out && state.mode < BAD && (state.mode < CHECK || flush2 !== Z_FINISH)) {
                if (updatewindow(
                  strm,
                  strm.output,
                  strm.next_out,
                  _out - strm.avail_out
                )) {
                  state.mode = MEM;
                  return Z_MEM_ERROR;
                }
              }
              _in -= strm.avail_in;
              _out -= strm.avail_out;
              strm.total_in += _in;
              strm.total_out += _out;
              state.total += _out;
              if (state.wrap && _out) {
                strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
                state.flags ? crc32(
                  state.check,
                  output,
                  _out,
                  strm.next_out - _out
                ) : adler32(
                  state.check,
                  output,
                  _out,
                  strm.next_out - _out
                );
              }
              strm.data_type = state.bits + (state.last ? 64 : 0) + (state.mode === TYPE ? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);
              if ((_in === 0 && _out === 0 || flush2 === Z_FINISH) && ret === Z_OK) {
                ret = Z_BUF_ERROR;
              }
              return ret;
            }
            function inflateEnd(strm) {
              if (!strm || !strm.state) {
                return Z_STREAM_ERROR;
              }
              var state = strm.state;
              if (state.window) {
                state.window = null;
              }
              strm.state = null;
              return Z_OK;
            }
            function inflateGetHeader(strm, head2) {
              var state;
              if (!strm || !strm.state) {
                return Z_STREAM_ERROR;
              }
              state = strm.state;
              if ((state.wrap & 2) === 0) {
                return Z_STREAM_ERROR;
              }
              state.head = head2;
              head2.done = false;
              return Z_OK;
            }
            function inflateSetDictionary(strm, dictionary) {
              var dictLength = dictionary.length;
              var state;
              var dictid;
              var ret;
              if (!strm || !strm.state) {
                return Z_STREAM_ERROR;
              }
              state = strm.state;
              if (state.wrap !== 0 && state.mode !== DICT) {
                return Z_STREAM_ERROR;
              }
              if (state.mode === DICT) {
                dictid = 1;
                dictid = adler32(
                  dictid,
                  dictionary,
                  dictLength,
                  0
                );
                if (dictid !== state.check) {
                  return Z_DATA_ERROR;
                }
              }
              ret = updatewindow(
                strm,
                dictionary,
                dictLength,
                dictLength
              );
              if (ret) {
                state.mode = MEM;
                return Z_MEM_ERROR;
              }
              state.havedict = 1;
              return Z_OK;
            }
            exports2.inflateReset = inflateReset;
            exports2.inflateReset2 = inflateReset2;
            exports2.inflateResetKeep = inflateResetKeep;
            exports2.inflateInit = inflateInit;
            exports2.inflateInit2 = inflateInit2;
            exports2.inflate = inflate;
            exports2.inflateEnd = inflateEnd;
            exports2.inflateGetHeader = inflateGetHeader;
            exports2.inflateSetDictionary = inflateSetDictionary;
            exports2.inflateInfo = "pako inflate (from Nodeca project)";
          },
          {
            "../utils/common": 1,
            "./adler32": 3,
            "./crc32": 5,
            "./inffast": 7,
            "./inftrees": 9
          }
        ],
        9: [
          function(require2, module2, exports2) {
            "use strict";
            var utils = require2("../utils/common");
            var MAXBITS = 15;
            var ENOUGH_LENS = 852;
            var ENOUGH_DISTS = 592;
            var CODES = 0;
            var LENS = 1;
            var DISTS = 2;
            var lbase = [
              /* Length codes 257..285 base */
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              13,
              15,
              17,
              19,
              23,
              27,
              31,
              35,
              43,
              51,
              59,
              67,
              83,
              99,
              115,
              131,
              163,
              195,
              227,
              258,
              0,
              0
            ];
            var lext = [
              /* Length codes 257..285 extra */
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              17,
              17,
              17,
              17,
              18,
              18,
              18,
              18,
              19,
              19,
              19,
              19,
              20,
              20,
              20,
              20,
              21,
              21,
              21,
              21,
              16,
              72,
              78
            ];
            var dbase = [
              /* Distance codes 0..29 base */
              1,
              2,
              3,
              4,
              5,
              7,
              9,
              13,
              17,
              25,
              33,
              49,
              65,
              97,
              129,
              193,
              257,
              385,
              513,
              769,
              1025,
              1537,
              2049,
              3073,
              4097,
              6145,
              8193,
              12289,
              16385,
              24577,
              0,
              0
            ];
            var dext = [
              /* Distance codes 0..29 extra */
              16,
              16,
              16,
              16,
              17,
              17,
              18,
              18,
              19,
              19,
              20,
              20,
              21,
              21,
              22,
              22,
              23,
              23,
              24,
              24,
              25,
              25,
              26,
              26,
              27,
              27,
              28,
              28,
              29,
              29,
              64,
              64
            ];
            module2.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) {
              var bits = opts.bits;
              var len = 0;
              var sym = 0;
              var min = 0, max = 0;
              var root = 0;
              var curr = 0;
              var drop = 0;
              var left = 0;
              var used = 0;
              var huff = 0;
              var incr;
              var fill;
              var low;
              var mask;
              var next;
              var base = null;
              var base_index = 0;
              var end;
              var count = new utils.Buf16(MAXBITS + 1);
              var offs = new utils.Buf16(MAXBITS + 1);
              var extra = null;
              var extra_index = 0;
              var here_bits, here_op, here_val;
              for (len = 0; len <= MAXBITS; len++) {
                count[len] = 0;
              }
              for (sym = 0; sym < codes; sym++) {
                count[lens[lens_index + sym]]++;
              }
              root = bits;
              for (max = MAXBITS; max >= 1; max--) {
                if (count[max] !== 0) {
                  break;
                }
              }
              if (root > max) {
                root = max;
              }
              if (max === 0) {
                table[table_index++] = 1 << 24 | 64 << 16 | 0;
                table[table_index++] = 1 << 24 | 64 << 16 | 0;
                opts.bits = 1;
                return 0;
              }
              for (min = 1; min < max; min++) {
                if (count[min] !== 0) {
                  break;
                }
              }
              if (root < min) {
                root = min;
              }
              left = 1;
              for (len = 1; len <= MAXBITS; len++) {
                left <<= 1;
                left -= count[len];
                if (left < 0) {
                  return -1;
                }
              }
              if (left > 0 && (type === CODES || max !== 1)) {
                return -1;
              }
              offs[1] = 0;
              for (len = 1; len < MAXBITS; len++) {
                offs[len + 1] = offs[len] + count[len];
              }
              for (sym = 0; sym < codes; sym++) {
                if (lens[lens_index + sym] !== 0) {
                  work[offs[lens[lens_index + sym]]++] = sym;
                }
              }
              if (type === CODES) {
                base = extra = work;
                end = 19;
              } else if (type === LENS) {
                base = lbase;
                base_index -= 257;
                extra = lext;
                extra_index -= 257;
                end = 256;
              } else {
                base = dbase;
                extra = dext;
                end = -1;
              }
              huff = 0;
              sym = 0;
              len = min;
              next = table_index;
              curr = root;
              drop = 0;
              low = -1;
              used = 1 << root;
              mask = used - 1;
              if (type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS) {
                return 1;
              }
              for (; ; ) {
                here_bits = len - drop;
                if (work[sym] < end) {
                  here_op = 0;
                  here_val = work[sym];
                } else if (work[sym] > end) {
                  here_op = extra[extra_index + work[sym]];
                  here_val = base[base_index + work[sym]];
                } else {
                  here_op = 32 + 64;
                  here_val = 0;
                }
                incr = 1 << len - drop;
                fill = 1 << curr;
                min = fill;
                do {
                  fill -= incr;
                  table[next + (huff >> drop) + fill] = here_bits << 24 | here_op << 16 | here_val | 0;
                } while (fill !== 0);
                incr = 1 << len - 1;
                while (huff & incr) {
                  incr >>= 1;
                }
                if (incr !== 0) {
                  huff &= incr - 1;
                  huff += incr;
                } else {
                  huff = 0;
                }
                sym++;
                if (--count[len] === 0) {
                  if (len === max) {
                    break;
                  }
                  len = lens[lens_index + work[sym]];
                }
                if (len > root && (huff & mask) !== low) {
                  if (drop === 0) {
                    drop = root;
                  }
                  next += min;
                  curr = len - drop;
                  left = 1 << curr;
                  while (curr + drop < max) {
                    left -= count[curr + drop];
                    if (left <= 0) {
                      break;
                    }
                    curr++;
                    left <<= 1;
                  }
                  used += 1 << curr;
                  if (type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS) {
                    return 1;
                  }
                  low = huff & mask;
                  table[low] = root << 24 | curr << 16 | next - table_index | 0;
                }
              }
              if (huff !== 0) {
                table[next + huff] = len - drop << 24 | 64 << 16 | 0;
              }
              opts.bits = root;
              return 0;
            };
          },
          { "../utils/common": 1 }
        ],
        10: [
          function(require2, module2, exports2) {
            "use strict";
            module2.exports = {
              2: "need dictionary",
              1: "stream end",
              0: "",
              "-1": "file error",
              "-2": "stream error",
              "-3": "data error",
              "-4": "insufficient memory",
              "-5": "buffer error",
              "-6": "incompatible version"
            };
          },
          {}
        ],
        11: [
          function(require2, module2, exports2) {
            "use strict";
            function ZStream() {
              this.input = null;
              this.next_in = 0;
              this.avail_in = 0;
              this.total_in = 0;
              this.output = null;
              this.next_out = 0;
              this.avail_out = 0;
              this.total_out = 0;
              this.msg = "";
              this.state = null;
              this.data_type = 2;
              this.adler = 0;
            }
            module2.exports = ZStream;
          },
          {}
        ],
        "/lib/inflate.js": [
          function(require2, module2, exports2) {
            "use strict";
            var zlib_inflate = require2("./zlib/inflate");
            var utils = require2("./utils/common");
            var strings = require2("./utils/strings");
            var c6 = require2("./zlib/constants");
            var msg = require2("./zlib/messages");
            var ZStream = require2("./zlib/zstream");
            var GZheader = require2("./zlib/gzheader");
            var toString = Object.prototype.toString;
            function Inflate(options) {
              if (!(this instanceof Inflate))
                return new Inflate(options);
              this.options = utils.assign(
                {
                  chunkSize: 16384,
                  windowBits: 0,
                  to: ""
                },
                options || {}
              );
              var opt = this.options;
              if (opt.raw && opt.windowBits >= 0 && opt.windowBits < 16) {
                opt.windowBits = -opt.windowBits;
                if (opt.windowBits === 0) {
                  opt.windowBits = -15;
                }
              }
              if (opt.windowBits >= 0 && opt.windowBits < 16 && !(options && options.windowBits)) {
                opt.windowBits += 32;
              }
              if (opt.windowBits > 15 && opt.windowBits < 48) {
                if ((opt.windowBits & 15) === 0) {
                  opt.windowBits |= 15;
                }
              }
              this.err = 0;
              this.msg = "";
              this.ended = false;
              this.chunks = [];
              this.strm = new ZStream();
              this.strm.avail_out = 0;
              var status = zlib_inflate.inflateInit2(
                this.strm,
                opt.windowBits
              );
              if (status !== c6.Z_OK) {
                throw new Error(msg[status]);
              }
              this.header = new GZheader();
              zlib_inflate.inflateGetHeader(this.strm, this.header);
              if (opt.dictionary) {
                if (typeof opt.dictionary === "string") {
                  opt.dictionary = strings.string2buf(
                    opt.dictionary
                  );
                } else if (toString.call(opt.dictionary) === "[object ArrayBuffer]") {
                  opt.dictionary = new Uint8Array(
                    opt.dictionary
                  );
                }
                if (opt.raw) {
                  status = zlib_inflate.inflateSetDictionary(
                    this.strm,
                    opt.dictionary
                  );
                  if (status !== c6.Z_OK) {
                    throw new Error(msg[status]);
                  }
                }
              }
            }
            Inflate.prototype.push = function(data, mode) {
              var strm = this.strm;
              var chunkSize = this.options.chunkSize;
              var dictionary = this.options.dictionary;
              var status, _mode;
              var next_out_utf8, tail, utf8str;
              var allowBufError = false;
              if (this.ended) {
                return false;
              }
              _mode = mode === ~~mode ? mode : mode === true ? c6.Z_FINISH : c6.Z_NO_FLUSH;
              if (typeof data === "string") {
                strm.input = strings.binstring2buf(data);
              } else if (toString.call(data) === "[object ArrayBuffer]") {
                strm.input = new Uint8Array(data);
              } else {
                strm.input = data;
              }
              strm.next_in = 0;
              strm.avail_in = strm.input.length;
              do {
                if (strm.avail_out === 0) {
                  strm.output = new utils.Buf8(chunkSize);
                  strm.next_out = 0;
                  strm.avail_out = chunkSize;
                }
                status = zlib_inflate.inflate(
                  strm,
                  c6.Z_NO_FLUSH
                );
                if (status === c6.Z_NEED_DICT && dictionary) {
                  status = zlib_inflate.inflateSetDictionary(
                    this.strm,
                    dictionary
                  );
                }
                if (status === c6.Z_BUF_ERROR && allowBufError === true) {
                  status = c6.Z_OK;
                  allowBufError = false;
                }
                if (status !== c6.Z_STREAM_END && status !== c6.Z_OK) {
                  this.onEnd(status);
                  this.ended = true;
                  return false;
                }
                if (strm.next_out) {
                  if (strm.avail_out === 0 || status === c6.Z_STREAM_END || strm.avail_in === 0 && (_mode === c6.Z_FINISH || _mode === c6.Z_SYNC_FLUSH)) {
                    if (this.options.to === "string") {
                      next_out_utf8 = strings.utf8border(
                        strm.output,
                        strm.next_out
                      );
                      tail = strm.next_out - next_out_utf8;
                      utf8str = strings.buf2string(
                        strm.output,
                        next_out_utf8
                      );
                      strm.next_out = tail;
                      strm.avail_out = chunkSize - tail;
                      if (tail) {
                        utils.arraySet(
                          strm.output,
                          strm.output,
                          next_out_utf8,
                          tail,
                          0
                        );
                      }
                      this.onData(utf8str);
                    } else {
                      this.onData(
                        utils.shrinkBuf(
                          strm.output,
                          strm.next_out
                        )
                      );
                    }
                  }
                }
                if (strm.avail_in === 0 && strm.avail_out === 0) {
                  allowBufError = true;
                }
              } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c6.Z_STREAM_END);
              if (status === c6.Z_STREAM_END) {
                _mode = c6.Z_FINISH;
              }
              if (_mode === c6.Z_FINISH) {
                status = zlib_inflate.inflateEnd(this.strm);
                this.onEnd(status);
                this.ended = true;
                return status === c6.Z_OK;
              }
              if (_mode === c6.Z_SYNC_FLUSH) {
                this.onEnd(c6.Z_OK);
                strm.avail_out = 0;
                return true;
              }
              return true;
            };
            Inflate.prototype.onData = function(chunk2) {
              this.chunks.push(chunk2);
            };
            Inflate.prototype.onEnd = function(status) {
              if (status === c6.Z_OK) {
                if (this.options.to === "string") {
                  this.result = this.chunks.join("");
                } else {
                  this.result = utils.flattenChunks(
                    this.chunks
                  );
                }
              }
              this.chunks = [];
              this.err = status;
              this.msg = this.strm.msg;
            };
            function inflate(input, options) {
              var inflator = new Inflate(options);
              inflator.push(input, true);
              if (inflator.err) {
                throw inflator.msg || msg[inflator.err];
              }
              return inflator.result;
            }
            function inflateRaw(input, options) {
              options = options || {};
              options.raw = true;
              return inflate(input, options);
            }
            exports2.Inflate = Inflate;
            exports2.inflate = inflate;
            exports2.inflateRaw = inflateRaw;
            exports2.ungzip = inflate;
          },
          {
            "./utils/common": 1,
            "./utils/strings": 2,
            "./zlib/constants": 4,
            "./zlib/gzheader": 6,
            "./zlib/inflate": 8,
            "./zlib/messages": 10,
            "./zlib/zstream": 11
          }
        ]
      },
      {},
      []
    )("/lib/inflate.js");
  })();

  // packages/global-styles-ui/build-module/font-library/lib/lib-font.browser.mjs
  var fetchFunction = globalThis.fetch;
  var Event2 = class {
    constructor(type, detail = {}, msg) {
      this.type = type;
      this.detail = detail;
      this.msg = msg;
      Object.defineProperty(this, `__mayPropagate`, {
        enumerable: false,
        writable: true
      });
      this.__mayPropagate = true;
    }
    preventDefault() {
    }
    stopPropagation() {
      this.__mayPropagate = false;
    }
    valueOf() {
      return this;
    }
    toString() {
      return this.msg ? `[${this.type} event]: ${this.msg}` : `[${this.type} event]`;
    }
  };
  var EventManager = class {
    constructor() {
      this.listeners = {};
    }
    addEventListener(type, listener, useCapture) {
      let bin = this.listeners[type] || [];
      if (useCapture) bin.unshift(listener);
      else bin.push(listener);
      this.listeners[type] = bin;
    }
    removeEventListener(type, listener) {
      let bin = this.listeners[type] || [];
      let pos = bin.findIndex((e2) => e2 === listener);
      if (pos > -1) {
        bin.splice(pos, 1);
        this.listeners[type] = bin;
      }
    }
    dispatch(event) {
      let bin = this.listeners[event.type];
      if (bin) {
        for (let l2 = 0, e2 = bin.length; l2 < e2; l2++) {
          if (!event.__mayPropagate) break;
          bin[l2](event);
        }
      }
    }
  };
  var startDate = (/* @__PURE__ */ new Date(`1904-01-01T00:00:00+0000`)).getTime();
  function asText(data) {
    return Array.from(data).map((v2) => String.fromCharCode(v2)).join(``);
  }
  var Parser = class {
    constructor(dict, dataview, name2) {
      this.name = (name2 || dict.tag || ``).trim();
      this.length = dict.length;
      this.start = dict.offset;
      this.offset = 0;
      this.data = dataview;
      [
        `getInt8`,
        `getUint8`,
        `getInt16`,
        `getUint16`,
        `getInt32`,
        `getUint32`,
        `getBigInt64`,
        `getBigUint64`
      ].forEach((name3) => {
        let fn = name3.replace(/get(Big)?/, "").toLowerCase();
        let increment = parseInt(name3.replace(/[^\d]/g, "")) / 8;
        Object.defineProperty(this, fn, {
          get: () => this.getValue(name3, increment)
        });
      });
    }
    get currentPosition() {
      return this.start + this.offset;
    }
    set currentPosition(position) {
      this.start = position;
      this.offset = 0;
    }
    skip(n2 = 0, bits = 8) {
      this.offset += n2 * bits / 8;
    }
    getValue(type, increment) {
      let pos = this.start + this.offset;
      this.offset += increment;
      try {
        return this.data[type](pos);
      } catch (e2) {
        console.error(`parser`, type, increment, this);
        console.error(`parser`, this.start, this.offset);
        throw e2;
      }
    }
    flags(n2) {
      if (n2 === 8 || n2 === 16 || n2 === 32 || n2 === 64) {
        return this[`uint${n2}`].toString(2).padStart(n2, 0).split(``).map((v2) => v2 === "1");
      }
      console.error(
        `Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long`
      );
      console.trace();
    }
    get tag() {
      const t3 = this.uint32;
      return asText([
        t3 >> 24 & 255,
        t3 >> 16 & 255,
        t3 >> 8 & 255,
        t3 & 255
      ]);
    }
    get fixed() {
      let major = this.int16;
      let minor = Math.round(1e3 * this.uint16 / 65356);
      return major + minor / 1e3;
    }
    get legacyFixed() {
      let major = this.uint16;
      let minor = this.uint16.toString(16).padStart(4, 0);
      return parseFloat(`${major}.${minor}`);
    }
    get uint24() {
      return (this.uint8 << 16) + (this.uint8 << 8) + this.uint8;
    }
    get uint128() {
      let value = 0;
      for (let i2 = 0; i2 < 5; i2++) {
        let byte = this.uint8;
        value = value * 128 + (byte & 127);
        if (byte < 128) break;
      }
      return value;
    }
    get longdatetime() {
      return new Date(startDate + 1e3 * parseInt(this.int64.toString()));
    }
    get fword() {
      return this.int16;
    }
    get ufword() {
      return this.uint16;
    }
    get Offset16() {
      return this.uint16;
    }
    get Offset32() {
      return this.uint32;
    }
    get F2DOT14() {
      const bits = p.uint16;
      const integer = [0, 1, -2, -1][bits >> 14];
      const fraction = bits & 16383;
      return integer + fraction / 16384;
    }
    verifyLength() {
      if (this.offset != this.length) {
        console.error(
          `unexpected parsed table size (${this.offset}) for "${this.name}" (expected ${this.length})`
        );
      }
    }
    readBytes(n2 = 0, position = 0, bits = 8, signed = false) {
      n2 = n2 || this.length;
      if (n2 === 0) return [];
      if (position) this.currentPosition = position;
      const fn = `${signed ? `` : `u`}int${bits}`, slice = [];
      while (n2--) slice.push(this[fn]);
      return slice;
    }
  };
  var ParsedData = class {
    constructor(parser) {
      const pGetter = { enumerable: false, get: () => parser };
      Object.defineProperty(this, `parser`, pGetter);
      const start2 = parser.currentPosition;
      const startGetter = { enumerable: false, get: () => start2 };
      Object.defineProperty(this, `start`, startGetter);
    }
    load(struct) {
      Object.keys(struct).forEach((p22) => {
        let props = Object.getOwnPropertyDescriptor(struct, p22);
        if (props.get) {
          this[p22] = props.get.bind(this);
        } else if (props.value !== void 0) {
          this[p22] = props.value;
        }
      });
      if (this.parser.length) {
        this.parser.verifyLength();
      }
    }
  };
  var SimpleTable = class extends ParsedData {
    constructor(dict, dataview, name2) {
      const { parser, start: start2 } = super(
        new Parser(dict, dataview, name2)
      );
      const pGetter = { enumerable: false, get: () => parser };
      Object.defineProperty(this, `p`, pGetter);
      const startGetter = { enumerable: false, get: () => start2 };
      Object.defineProperty(this, `tableStart`, startGetter);
    }
  };
  function lazy$1(object, property, getter) {
    let val;
    Object.defineProperty(object, property, {
      get: () => {
        if (val) return val;
        val = getter();
        return val;
      },
      enumerable: true
    });
  }
  var SFNT = class extends SimpleTable {
    constructor(font2, dataview, createTable2) {
      const { p: p22 } = super({ offset: 0, length: 12 }, dataview, `sfnt`);
      this.version = p22.uint32;
      this.numTables = p22.uint16;
      this.searchRange = p22.uint16;
      this.entrySelector = p22.uint16;
      this.rangeShift = p22.uint16;
      p22.verifyLength();
      this.directory = [...new Array(this.numTables)].map(
        (_) => new TableRecord(p22)
      );
      this.tables = {};
      this.directory.forEach((entry) => {
        const getter = () => createTable2(
          this.tables,
          {
            tag: entry.tag,
            offset: entry.offset,
            length: entry.length
          },
          dataview
        );
        lazy$1(this.tables, entry.tag.trim(), getter);
      });
    }
  };
  var TableRecord = class {
    constructor(p22) {
      this.tag = p22.tag;
      this.checksum = p22.uint32;
      this.offset = p22.uint32;
      this.length = p22.uint32;
    }
  };
  var gzipDecode = inflate_default.inflate || void 0;
  var nativeGzipDecode = void 0;
  var WOFF$1 = class extends SimpleTable {
    constructor(font2, dataview, createTable2) {
      const { p: p22 } = super({ offset: 0, length: 44 }, dataview, `woff`);
      this.signature = p22.tag;
      this.flavor = p22.uint32;
      this.length = p22.uint32;
      this.numTables = p22.uint16;
      p22.uint16;
      this.totalSfntSize = p22.uint32;
      this.majorVersion = p22.uint16;
      this.minorVersion = p22.uint16;
      this.metaOffset = p22.uint32;
      this.metaLength = p22.uint32;
      this.metaOrigLength = p22.uint32;
      this.privOffset = p22.uint32;
      this.privLength = p22.uint32;
      p22.verifyLength();
      this.directory = [...new Array(this.numTables)].map(
        (_) => new WoffTableDirectoryEntry(p22)
      );
      buildWoffLazyLookups(this, dataview, createTable2);
    }
  };
  var WoffTableDirectoryEntry = class {
    constructor(p22) {
      this.tag = p22.tag;
      this.offset = p22.uint32;
      this.compLength = p22.uint32;
      this.origLength = p22.uint32;
      this.origChecksum = p22.uint32;
    }
  };
  function buildWoffLazyLookups(woff, dataview, createTable2) {
    woff.tables = {};
    woff.directory.forEach((entry) => {
      lazy$1(woff.tables, entry.tag.trim(), () => {
        let offset = 0;
        let view = dataview;
        if (entry.compLength !== entry.origLength) {
          const data = dataview.buffer.slice(
            entry.offset,
            entry.offset + entry.compLength
          );
          let unpacked;
          if (gzipDecode) {
            unpacked = gzipDecode(new Uint8Array(data));
          } else if (nativeGzipDecode) {
            unpacked = nativeGzipDecode(new Uint8Array(data));
          } else {
            const msg = `no brotli decoder available to decode WOFF2 font`;
            if (font.onerror) font.onerror(msg);
            throw new Error(msg);
          }
          view = new DataView(unpacked.buffer);
        } else {
          offset = entry.offset;
        }
        return createTable2(
          woff.tables,
          { tag: entry.tag, offset, length: entry.origLength },
          view
        );
      });
    });
  }
  var brotliDecode = unbrotli_default;
  var nativeBrotliDecode = void 0;
  var WOFF2$1 = class extends SimpleTable {
    constructor(font2, dataview, createTable2) {
      const { p: p22 } = super({ offset: 0, length: 48 }, dataview, `woff2`);
      this.signature = p22.tag;
      this.flavor = p22.uint32;
      this.length = p22.uint32;
      this.numTables = p22.uint16;
      p22.uint16;
      this.totalSfntSize = p22.uint32;
      this.totalCompressedSize = p22.uint32;
      this.majorVersion = p22.uint16;
      this.minorVersion = p22.uint16;
      this.metaOffset = p22.uint32;
      this.metaLength = p22.uint32;
      this.metaOrigLength = p22.uint32;
      this.privOffset = p22.uint32;
      this.privLength = p22.uint32;
      p22.verifyLength();
      this.directory = [...new Array(this.numTables)].map(
        (_) => new Woff2TableDirectoryEntry(p22)
      );
      let dictOffset = p22.currentPosition;
      this.directory[0].offset = 0;
      this.directory.forEach((e2, i2) => {
        let next = this.directory[i2 + 1];
        if (next) {
          next.offset = e2.offset + (e2.transformLength !== void 0 ? e2.transformLength : e2.origLength);
        }
      });
      let decoded;
      let buffer = dataview.buffer.slice(dictOffset);
      if (brotliDecode) {
        decoded = brotliDecode(new Uint8Array(buffer));
      } else if (nativeBrotliDecode) {
        decoded = new Uint8Array(nativeBrotliDecode(buffer));
      } else {
        const msg = `no brotli decoder available to decode WOFF2 font`;
        if (font2.onerror) font2.onerror(msg);
        throw new Error(msg);
      }
      buildWoff2LazyLookups(this, decoded, createTable2);
    }
  };
  var Woff2TableDirectoryEntry = class {
    constructor(p22) {
      this.flags = p22.uint8;
      const tagNumber = this.tagNumber = this.flags & 63;
      if (tagNumber === 63) {
        this.tag = p22.tag;
      } else {
        this.tag = getWOFF2Tag(tagNumber);
      }
      const transformVersion = this.transformVersion = (this.flags & 192) >> 6;
      let hasTransforms = transformVersion !== 0;
      if (this.tag === `glyf` || this.tag === `loca`) {
        hasTransforms = this.transformVersion !== 3;
      }
      this.origLength = p22.uint128;
      if (hasTransforms) {
        this.transformLength = p22.uint128;
      }
    }
  };
  function buildWoff2LazyLookups(woff2, decoded, createTable2) {
    woff2.tables = {};
    woff2.directory.forEach((entry) => {
      lazy$1(woff2.tables, entry.tag.trim(), () => {
        const start2 = entry.offset;
        const end = start2 + (entry.transformLength ? entry.transformLength : entry.origLength);
        const data = new DataView(decoded.slice(start2, end).buffer);
        try {
          return createTable2(
            woff2.tables,
            { tag: entry.tag, offset: 0, length: entry.origLength },
            data
          );
        } catch (e2) {
          console.error(e2);
        }
      });
    });
  }
  function getWOFF2Tag(flag) {
    return [
      `cmap`,
      `head`,
      `hhea`,
      `hmtx`,
      `maxp`,
      `name`,
      `OS/2`,
      `post`,
      `cvt `,
      `fpgm`,
      `glyf`,
      `loca`,
      `prep`,
      `CFF `,
      `VORG`,
      `EBDT`,
      `EBLC`,
      `gasp`,
      `hdmx`,
      `kern`,
      `LTSH`,
      `PCLT`,
      `VDMX`,
      `vhea`,
      `vmtx`,
      `BASE`,
      `GDEF`,
      `GPOS`,
      `GSUB`,
      `EBSC`,
      `JSTF`,
      `MATH`,
      `CBDT`,
      `CBLC`,
      `COLR`,
      `CPAL`,
      `SVG `,
      `sbix`,
      `acnt`,
      `avar`,
      `bdat`,
      `bloc`,
      `bsln`,
      `cvar`,
      `fdsc`,
      `feat`,
      `fmtx`,
      `fvar`,
      `gvar`,
      `hsty`,
      `just`,
      `lcar`,
      `mort`,
      `morx`,
      `opbd`,
      `prop`,
      `trak`,
      `Zapf`,
      `Silf`,
      `Glat`,
      `Gloc`,
      `Feat`,
      `Sill`
    ][flag & 63];
  }
  var tableClasses = {};
  var tableClassesLoaded = false;
  Promise.all([
    Promise.resolve().then(function() {
      return cmap$1;
    }),
    Promise.resolve().then(function() {
      return head$1;
    }),
    Promise.resolve().then(function() {
      return hhea$1;
    }),
    Promise.resolve().then(function() {
      return hmtx$1;
    }),
    Promise.resolve().then(function() {
      return maxp$1;
    }),
    Promise.resolve().then(function() {
      return name$1;
    }),
    Promise.resolve().then(function() {
      return OS2$1;
    }),
    Promise.resolve().then(function() {
      return post$1;
    }),
    Promise.resolve().then(function() {
      return BASE$1;
    }),
    Promise.resolve().then(function() {
      return GDEF$1;
    }),
    Promise.resolve().then(function() {
      return GSUB$1;
    }),
    Promise.resolve().then(function() {
      return GPOS$1;
    }),
    Promise.resolve().then(function() {
      return SVG$1;
    }),
    Promise.resolve().then(function() {
      return fvar$1;
    }),
    Promise.resolve().then(function() {
      return cvt$1;
    }),
    Promise.resolve().then(function() {
      return fpgm$1;
    }),
    Promise.resolve().then(function() {
      return gasp$1;
    }),
    Promise.resolve().then(function() {
      return glyf$1;
    }),
    Promise.resolve().then(function() {
      return loca$1;
    }),
    Promise.resolve().then(function() {
      return prep$1;
    }),
    Promise.resolve().then(function() {
      return CFF$1;
    }),
    Promise.resolve().then(function() {
      return CFF2$1;
    }),
    Promise.resolve().then(function() {
      return VORG$1;
    }),
    Promise.resolve().then(function() {
      return EBLC$1;
    }),
    Promise.resolve().then(function() {
      return EBDT$1;
    }),
    Promise.resolve().then(function() {
      return EBSC$1;
    }),
    Promise.resolve().then(function() {
      return CBLC$1;
    }),
    Promise.resolve().then(function() {
      return CBDT$1;
    }),
    Promise.resolve().then(function() {
      return sbix$1;
    }),
    Promise.resolve().then(function() {
      return COLR$1;
    }),
    Promise.resolve().then(function() {
      return CPAL$1;
    }),
    Promise.resolve().then(function() {
      return DSIG$1;
    }),
    Promise.resolve().then(function() {
      return hdmx$1;
    }),
    Promise.resolve().then(function() {
      return kern$1;
    }),
    Promise.resolve().then(function() {
      return LTSH$1;
    }),
    Promise.resolve().then(function() {
      return MERG$1;
    }),
    Promise.resolve().then(function() {
      return meta$1;
    }),
    Promise.resolve().then(function() {
      return PCLT$1;
    }),
    Promise.resolve().then(function() {
      return VDMX$1;
    }),
    Promise.resolve().then(function() {
      return vhea$1;
    }),
    Promise.resolve().then(function() {
      return vmtx$1;
    })
  ]).then((data) => {
    data.forEach((e2) => {
      let name2 = Object.keys(e2)[0];
      tableClasses[name2] = e2[name2];
    });
    tableClassesLoaded = true;
  });
  function createTable(tables, dict, dataview) {
    let name2 = dict.tag.replace(/[^\w\d]/g, ``);
    let Type = tableClasses[name2];
    if (Type) return new Type(dict, dataview, tables);
    console.warn(
      `lib-font has no definition for ${name2}. The table was skipped.`
    );
    return {};
  }
  function loadTableClasses() {
    let count = 0;
    function checkLoaded(resolve, reject) {
      if (!tableClassesLoaded) {
        if (count > 10) {
          return reject(new Error(`loading took too long`));
        }
        count++;
        return setTimeout(() => checkLoaded(resolve), 250);
      }
      resolve(createTable);
    }
    return new Promise((resolve, reject) => checkLoaded(resolve));
  }
  function getFontCSSFormat(path, errorOnStyle) {
    let pos = path.lastIndexOf(`.`);
    let ext = (path.substring(pos + 1) || ``).toLowerCase();
    let format6 = {
      ttf: `truetype`,
      otf: `opentype`,
      woff: `woff`,
      woff2: `woff2`
    }[ext];
    if (format6) return format6;
    let msg = {
      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.`,
      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.`,
      fon: `The .fon format is not supported: this is an ancient Windows bitmap font format.`,
      ttc: `Based on the current CSS specification, font collections are not (yet?) supported.`
    }[ext];
    if (!msg) msg = `${path} is not a known webfont format.`;
    if (errorOnStyle) {
      throw new Error(msg);
    } else {
      console.warn(`Could not load font: ${msg}`);
    }
  }
  async function setupFontFace(name2, url, options = {}) {
    if (!globalThis.document) return;
    let format6 = getFontCSSFormat(url, options.errorOnStyle);
    if (!format6) return;
    let style = document.createElement(`style`);
    style.className = `injected-by-Font-js`;
    let rules = [];
    if (options.styleRules) {
      rules = Object.entries(options.styleRules).map(
        ([key, value]) => `${key}: ${value};`
      );
    }
    style.textContent = `
@font-face {
    font-family: "${name2}";
    ${rules.join(
      `
	`
    )}
    src: url("${url}") format("${format6}");
}`;
    globalThis.document.head.appendChild(style);
    return style;
  }
  var TTF = [0, 1, 0, 0];
  var OTF = [79, 84, 84, 79];
  var WOFF = [119, 79, 70, 70];
  var WOFF2 = [119, 79, 70, 50];
  function match(ar1, ar2) {
    if (ar1.length !== ar2.length) return;
    for (let i2 = 0; i2 < ar1.length; i2++) {
      if (ar1[i2] !== ar2[i2]) return;
    }
    return true;
  }
  function validFontFormat(dataview) {
    const LEAD_BYTES = [
      dataview.getUint8(0),
      dataview.getUint8(1),
      dataview.getUint8(2),
      dataview.getUint8(3)
    ];
    if (match(LEAD_BYTES, TTF) || match(LEAD_BYTES, OTF)) return `SFNT`;
    if (match(LEAD_BYTES, WOFF)) return `WOFF`;
    if (match(LEAD_BYTES, WOFF2)) return `WOFF2`;
  }
  function checkFetchResponseStatus(response) {
    if (!response.ok) {
      throw new Error(
        `HTTP ${response.status} - ${response.statusText}`
      );
    }
    return response;
  }
  var Font = class extends EventManager {
    constructor(name2, options = {}) {
      super();
      this.name = name2;
      this.options = options;
      this.metrics = false;
    }
    get src() {
      return this.__src;
    }
    set src(src) {
      this.__src = src;
      (async () => {
        if (globalThis.document && !this.options.skipStyleSheet) {
          await setupFontFace(this.name, src, this.options);
        }
        this.loadFont(src);
      })();
    }
    async loadFont(url, filename) {
      fetch(url).then(
        (response) => checkFetchResponseStatus(response) && response.arrayBuffer()
      ).then(
        (buffer) => this.fromDataBuffer(buffer, filename || url)
      ).catch((err) => {
        const evt = new Event2(
          `error`,
          err,
          `Failed to load font at ${filename || url}`
        );
        this.dispatch(evt);
        if (this.onerror) this.onerror(evt);
      });
    }
    async fromDataBuffer(buffer, filenameOrUrL) {
      this.fontData = new DataView(buffer);
      let type = validFontFormat(this.fontData);
      if (!type) {
        throw new Error(
          `${filenameOrUrL} is either an unsupported font format, or not a font at all.`
        );
      }
      await this.parseBasicData(type);
      const evt = new Event2("load", { font: this });
      this.dispatch(evt);
      if (this.onload) this.onload(evt);
    }
    async parseBasicData(type) {
      return loadTableClasses().then((createTable2) => {
        if (type === `SFNT`) {
          this.opentype = new SFNT(this, this.fontData, createTable2);
        }
        if (type === `WOFF`) {
          this.opentype = new WOFF$1(this, this.fontData, createTable2);
        }
        if (type === `WOFF2`) {
          this.opentype = new WOFF2$1(this, this.fontData, createTable2);
        }
        return this.opentype;
      });
    }
    getGlyphId(char) {
      return this.opentype.tables.cmap.getGlyphId(char);
    }
    reverse(glyphid) {
      return this.opentype.tables.cmap.reverse(glyphid);
    }
    supports(char) {
      return this.getGlyphId(char) !== 0;
    }
    supportsVariation(variation) {
      return this.opentype.tables.cmap.supportsVariation(variation) !== false;
    }
    measureText(text, size = 16) {
      if (this.__unloaded)
        throw new Error(
          "Cannot measure text: font was unloaded. Please reload before calling measureText()"
        );
      let d2 = document.createElement("div");
      d2.textContent = text;
      d2.style.fontFamily = this.name;
      d2.style.fontSize = `${size}px`;
      d2.style.color = `transparent`;
      d2.style.background = `transparent`;
      d2.style.top = `0`;
      d2.style.left = `0`;
      d2.style.position = `absolute`;
      document.body.appendChild(d2);
      let bbox = d2.getBoundingClientRect();
      document.body.removeChild(d2);
      const OS22 = this.opentype.tables["OS/2"];
      bbox.fontSize = size;
      bbox.ascender = OS22.sTypoAscender;
      bbox.descender = OS22.sTypoDescender;
      return bbox;
    }
    unload() {
      if (this.styleElement.parentNode) {
        this.styleElement.parentNode.removeElement(this.styleElement);
        const evt = new Event2("unload", { font: this });
        this.dispatch(evt);
        if (this.onunload) this.onunload(evt);
      }
      this._unloaded = true;
    }
    load() {
      if (this.__unloaded) {
        delete this.__unloaded;
        document.head.appendChild(this.styleElement);
        const evt = new Event2("load", { font: this });
        this.dispatch(evt);
        if (this.onload) this.onload(evt);
      }
    }
  };
  globalThis.Font = Font;
  var Subtable = class extends ParsedData {
    constructor(p22, plaformID, encodingID) {
      super(p22);
      this.plaformID = plaformID;
      this.encodingID = encodingID;
    }
  };
  var Format0 = class extends Subtable {
    constructor(p22, platformID, encodingID) {
      super(p22, platformID, encodingID);
      this.format = 0;
      this.length = p22.uint16;
      this.language = p22.uint16;
      this.glyphIdArray = [...new Array(256)].map((_) => p22.uint8);
    }
    supports(charCode) {
      if (charCode.charCodeAt) {
        charCode = -1;
        console.warn(
          `supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.`
        );
      }
      return 0 <= charCode && charCode <= 255;
    }
    reverse(glyphID) {
      console.warn(`reverse not implemented for cmap subtable format 0`);
      return {};
    }
    getSupportedCharCodes() {
      return [{ start: 1, end: 256 }];
    }
  };
  var Format2 = class extends Subtable {
    constructor(p22, platformID, encodingID) {
      super(p22, platformID, encodingID);
      this.format = 2;
      this.length = p22.uint16;
      this.language = p22.uint16;
      this.subHeaderKeys = [...new Array(256)].map((_) => p22.uint16);
      const subHeaderCount = Math.max(...this.subHeaderKeys);
      const subHeaderOffset = p22.currentPosition;
      lazy$1(this, `subHeaders`, () => {
        p22.currentPosition = subHeaderOffset;
        return [...new Array(subHeaderCount)].map(
          (_) => new SubHeader(p22)
        );
      });
      const glyphIndexOffset = subHeaderOffset + subHeaderCount * 8;
      lazy$1(this, `glyphIndexArray`, () => {
        p22.currentPosition = glyphIndexOffset;
        return [...new Array(subHeaderCount)].map((_) => p22.uint16);
      });
    }
    supports(charCode) {
      if (charCode.charCodeAt) {
        charCode = -1;
        console.warn(
          `supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented.`
        );
      }
      const low = charCode && 255;
      const high = charCode && 65280;
      const subHeaderKey = this.subHeaders[high];
      const subheader = this.subHeaders[subHeaderKey];
      const first = subheader.firstCode;
      const last = first + subheader.entryCount;
      return first <= low && low <= last;
    }
    reverse(glyphID) {
      console.warn(`reverse not implemented for cmap subtable format 2`);
      return {};
    }
    getSupportedCharCodes(preservePropNames = false) {
      if (preservePropNames) {
        return this.subHeaders.map((h2) => ({
          firstCode: h2.firstCode,
          lastCode: h2.lastCode
        }));
      }
      return this.subHeaders.map((h2) => ({
        start: h2.firstCode,
        end: h2.lastCode
      }));
    }
  };
  var SubHeader = class {
    constructor(p22) {
      this.firstCode = p22.uint16;
      this.entryCount = p22.uint16;
      this.lastCode = this.first + this.entryCount;
      this.idDelta = p22.int16;
      this.idRangeOffset = p22.uint16;
    }
  };
  var Format4 = class extends Subtable {
    constructor(p22, platformID, encodingID) {
      super(p22, platformID, encodingID);
      this.format = 4;
      this.length = p22.uint16;
      this.language = p22.uint16;
      this.segCountX2 = p22.uint16;
      this.segCount = this.segCountX2 / 2;
      this.searchRange = p22.uint16;
      this.entrySelector = p22.uint16;
      this.rangeShift = p22.uint16;
      const endCodePosition = p22.currentPosition;
      lazy$1(
        this,
        `endCode`,
        () => p22.readBytes(this.segCount, endCodePosition, 16)
      );
      const startCodePosition = endCodePosition + 2 + this.segCountX2;
      lazy$1(
        this,
        `startCode`,
        () => p22.readBytes(this.segCount, startCodePosition, 16)
      );
      const idDeltaPosition = startCodePosition + this.segCountX2;
      lazy$1(
        this,
        `idDelta`,
        () => p22.readBytes(this.segCount, idDeltaPosition, 16, true)
      );
      const idRangePosition = idDeltaPosition + this.segCountX2;
      lazy$1(
        this,
        `idRangeOffset`,
        () => p22.readBytes(this.segCount, idRangePosition, 16)
      );
      const glyphIdArrayPosition = idRangePosition + this.segCountX2;
      const glyphIdArrayLength = this.length - (glyphIdArrayPosition - this.tableStart);
      lazy$1(
        this,
        `glyphIdArray`,
        () => p22.readBytes(glyphIdArrayLength, glyphIdArrayPosition, 16)
      );
      lazy$1(
        this,
        `segments`,
        () => this.buildSegments(idRangePosition, glyphIdArrayPosition, p22)
      );
    }
    buildSegments(idRangePosition, glyphIdArrayPosition, p22) {
      const build = (_, i2) => {
        let startCode = this.startCode[i2], endCode = this.endCode[i2], idDelta = this.idDelta[i2], idRangeOffset = this.idRangeOffset[i2], idRangeOffsetPointer = idRangePosition + 2 * i2, glyphIDs = [];
        if (idRangeOffset === 0) {
          for (let i22 = startCode + idDelta, e2 = endCode + idDelta; i22 <= e2; i22++) {
            glyphIDs.push(i22);
          }
        } else {
          for (let i22 = 0, e2 = endCode - startCode; i22 <= e2; i22++) {
            p22.currentPosition = idRangeOffsetPointer + idRangeOffset + i22 * 2;
            glyphIDs.push(p22.uint16);
          }
        }
        return {
          startCode,
          endCode,
          idDelta,
          idRangeOffset,
          glyphIDs
        };
      };
      return [...new Array(this.segCount)].map(build);
    }
    reverse(glyphID) {
      let s2 = this.segments.find((v2) => v2.glyphIDs.includes(glyphID));
      if (!s2) return {};
      const code = s2.startCode + s2.glyphIDs.indexOf(glyphID);
      return { code, unicode: String.fromCodePoint(code) };
    }
    getGlyphId(charCode) {
      if (charCode.charCodeAt) charCode = charCode.charCodeAt(0);
      if (55296 <= charCode && charCode <= 57343) return 0;
      if ((charCode & 65534) === 65534 || (charCode & 65535) === 65535)
        return 0;
      let segment = this.segments.find(
        (s2) => s2.startCode <= charCode && charCode <= s2.endCode
      );
      if (!segment) return 0;
      return segment.glyphIDs[charCode - segment.startCode];
    }
    supports(charCode) {
      return this.getGlyphId(charCode) !== 0;
    }
    getSupportedCharCodes(preservePropNames = false) {
      if (preservePropNames) return this.segments;
      return this.segments.map((v2) => ({
        start: v2.startCode,
        end: v2.endCode
      }));
    }
  };
  var Format6 = class extends Subtable {
    constructor(p22, platformID, encodingID) {
      super(p22, platformID, encodingID);
      this.format = 6;
      this.length = p22.uint16;
      this.language = p22.uint16;
      this.firstCode = p22.uint16;
      this.entryCount = p22.uint16;
      this.lastCode = this.firstCode + this.entryCount - 1;
      const getter = () => [...new Array(this.entryCount)].map((_) => p22.uint16);
      lazy$1(this, `glyphIdArray`, getter);
    }
    supports(charCode) {
      if (charCode.charCodeAt) {
        charCode = -1;
        console.warn(
          `supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.`
        );
      }
      if (charCode < this.firstCode) return {};
      if (charCode > this.firstCode + this.entryCount) return {};
      const code = charCode - this.firstCode;
      return { code, unicode: String.fromCodePoint(code) };
    }
    reverse(glyphID) {
      let pos = this.glyphIdArray.indexOf(glyphID);
      if (pos > -1) return this.firstCode + pos;
    }
    getSupportedCharCodes(preservePropNames = false) {
      if (preservePropNames) {
        return [{ firstCode: this.firstCode, lastCode: this.lastCode }];
      }
      return [{ start: this.firstCode, end: this.lastCode }];
    }
  };
  var Format8 = class extends Subtable {
    constructor(p22, platformID, encodingID) {
      super(p22, platformID, encodingID);
      this.format = 8;
      p22.uint16;
      this.length = p22.uint32;
      this.language = p22.uint32;
      this.is32 = [...new Array(8192)].map((_) => p22.uint8);
      this.numGroups = p22.uint32;
      const getter = () => [...new Array(this.numGroups)].map(
        (_) => new SequentialMapGroup$1(p22)
      );
      lazy$1(this, `groups`, getter);
    }
    supports(charCode) {
      if (charCode.charCodeAt) {
        charCode = -1;
        console.warn(
          `supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.`
        );
      }
      return this.groups.findIndex(
        (s2) => s2.startcharCode <= charCode && charCode <= s2.endcharCode
      ) !== -1;
    }
    reverse(glyphID) {
      console.warn(`reverse not implemented for cmap subtable format 8`);
      return {};
    }
    getSupportedCharCodes(preservePropNames = false) {
      if (preservePropNames) return this.groups;
      return this.groups.map((v2) => ({
        start: v2.startcharCode,
        end: v2.endcharCode
      }));
    }
  };
  var SequentialMapGroup$1 = class {
    constructor(p22) {
      this.startcharCode = p22.uint32;
      this.endcharCode = p22.uint32;
      this.startGlyphID = p22.uint32;
    }
  };
  var Format10 = class extends Subtable {
    constructor(p22, platformID, encodingID) {
      super(p22, platformID, encodingID);
      this.format = 10;
      p22.uint16;
      this.length = p22.uint32;
      this.language = p22.uint32;
      this.startCharCode = p22.uint32;
      this.numChars = p22.uint32;
      this.endCharCode = this.startCharCode + this.numChars;
      const getter = () => [...new Array(this.numChars)].map((_) => p22.uint16);
      lazy$1(this, `glyphs`, getter);
    }
    supports(charCode) {
      if (charCode.charCodeAt) {
        charCode = -1;
        console.warn(
          `supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.`
        );
      }
      if (charCode < this.startCharCode) return false;
      if (charCode > this.startCharCode + this.numChars) return false;
      return charCode - this.startCharCode;
    }
    reverse(glyphID) {
      console.warn(`reverse not implemented for cmap subtable format 10`);
      return {};
    }
    getSupportedCharCodes(preservePropNames = false) {
      if (preservePropNames) {
        return [
          {
            startCharCode: this.startCharCode,
            endCharCode: this.endCharCode
          }
        ];
      }
      return [{ start: this.startCharCode, end: this.endCharCode }];
    }
  };
  var Format12 = class extends Subtable {
    constructor(p22, platformID, encodingID) {
      super(p22, platformID, encodingID);
      this.format = 12;
      p22.uint16;
      this.length = p22.uint32;
      this.language = p22.uint32;
      this.numGroups = p22.uint32;
      const getter = () => [...new Array(this.numGroups)].map(
        (_) => new SequentialMapGroup(p22)
      );
      lazy$1(this, `groups`, getter);
    }
    supports(charCode) {
      if (charCode.charCodeAt) charCode = charCode.charCodeAt(0);
      if (55296 <= charCode && charCode <= 57343) return 0;
      if ((charCode & 65534) === 65534 || (charCode & 65535) === 65535)
        return 0;
      return this.groups.findIndex(
        (s2) => s2.startCharCode <= charCode && charCode <= s2.endCharCode
      ) !== -1;
    }
    reverse(glyphID) {
      for (let group of this.groups) {
        let start2 = group.startGlyphID;
        if (start2 > glyphID) continue;
        if (start2 === glyphID) return group.startCharCode;
        let end = start2 + (group.endCharCode - group.startCharCode);
        if (end < glyphID) continue;
        const code = group.startCharCode + (glyphID - start2);
        return { code, unicode: String.fromCodePoint(code) };
      }
      return {};
    }
    getSupportedCharCodes(preservePropNames = false) {
      if (preservePropNames) return this.groups;
      return this.groups.map((v2) => ({
        start: v2.startCharCode,
        end: v2.endCharCode
      }));
    }
  };
  var SequentialMapGroup = class {
    constructor(p22) {
      this.startCharCode = p22.uint32;
      this.endCharCode = p22.uint32;
      this.startGlyphID = p22.uint32;
    }
  };
  var Format13 = class extends Subtable {
    constructor(p22, platformID, encodingID) {
      super(p22, platformID, encodingID);
      this.format = 13;
      p22.uint16;
      this.length = p22.uint32;
      this.language = p22.uint32;
      this.numGroups = p22.uint32;
      const getter = [...new Array(this.numGroups)].map(
        (_) => new ConstantMapGroup(p22)
      );
      lazy$1(this, `groups`, getter);
    }
    supports(charCode) {
      if (charCode.charCodeAt) charCode = charCode.charCodeAt(0);
      return this.groups.findIndex(
        (s2) => s2.startCharCode <= charCode && charCode <= s2.endCharCode
      ) !== -1;
    }
    reverse(glyphID) {
      console.warn(`reverse not implemented for cmap subtable format 13`);
      return {};
    }
    getSupportedCharCodes(preservePropNames = false) {
      if (preservePropNames) return this.groups;
      return this.groups.map((v2) => ({
        start: v2.startCharCode,
        end: v2.endCharCode
      }));
    }
  };
  var ConstantMapGroup = class {
    constructor(p22) {
      this.startCharCode = p22.uint32;
      this.endCharCode = p22.uint32;
      this.glyphID = p22.uint32;
    }
  };
  var Format14 = class extends Subtable {
    constructor(p22, platformID, encodingID) {
      super(p22, platformID, encodingID);
      this.subTableStart = p22.currentPosition;
      this.format = 14;
      this.length = p22.uint32;
      this.numVarSelectorRecords = p22.uint32;
      lazy$1(
        this,
        `varSelectors`,
        () => [...new Array(this.numVarSelectorRecords)].map(
          (_) => new VariationSelector(p22)
        )
      );
    }
    supports() {
      console.warn(`supports not implemented for cmap subtable format 14`);
      return 0;
    }
    getSupportedCharCodes() {
      console.warn(
        `getSupportedCharCodes not implemented for cmap subtable format 14`
      );
      return [];
    }
    reverse(glyphID) {
      console.warn(`reverse not implemented for cmap subtable format 14`);
      return {};
    }
    supportsVariation(variation) {
      let v2 = this.varSelector.find(
        (uvs) => uvs.varSelector === variation
      );
      return v2 ? v2 : false;
    }
    getSupportedVariations() {
      return this.varSelectors.map((v2) => v2.varSelector);
    }
  };
  var VariationSelector = class {
    constructor(p22) {
      this.varSelector = p22.uint24;
      this.defaultUVSOffset = p22.Offset32;
      this.nonDefaultUVSOffset = p22.Offset32;
    }
  };
  function createSubTable(parser, platformID, encodingID) {
    const format6 = parser.uint16;
    if (format6 === 0) return new Format0(parser, platformID, encodingID);
    if (format6 === 2) return new Format2(parser, platformID, encodingID);
    if (format6 === 4) return new Format4(parser, platformID, encodingID);
    if (format6 === 6) return new Format6(parser, platformID, encodingID);
    if (format6 === 8) return new Format8(parser, platformID, encodingID);
    if (format6 === 10) return new Format10(parser, platformID, encodingID);
    if (format6 === 12) return new Format12(parser, platformID, encodingID);
    if (format6 === 13) return new Format13(parser, platformID, encodingID);
    if (format6 === 14) return new Format14(parser, platformID, encodingID);
    return {};
  }
  var cmap = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint16;
      this.numTables = p22.uint16;
      this.encodingRecords = [...new Array(this.numTables)].map(
        (_) => new EncodingRecord(p22, this.tableStart)
      );
    }
    getSubTable(tableID) {
      return this.encodingRecords[tableID].table;
    }
    getSupportedEncodings() {
      return this.encodingRecords.map((r3) => ({
        platformID: r3.platformID,
        encodingId: r3.encodingID
      }));
    }
    getSupportedCharCodes(platformID, encodingID) {
      const recordID = this.encodingRecords.findIndex(
        (r3) => r3.platformID === platformID && r3.encodingID === encodingID
      );
      if (recordID === -1) return false;
      const subtable = this.getSubTable(recordID);
      return subtable.getSupportedCharCodes();
    }
    reverse(glyphid) {
      for (let i2 = 0; i2 < this.numTables; i2++) {
        let code = this.getSubTable(i2).reverse(glyphid);
        if (code) return code;
      }
    }
    getGlyphId(char) {
      let last = 0;
      this.encodingRecords.some((_, tableID) => {
        let t3 = this.getSubTable(tableID);
        if (!t3.getGlyphId) return false;
        last = t3.getGlyphId(char);
        return last !== 0;
      });
      return last;
    }
    supports(char) {
      return this.encodingRecords.some((_, tableID) => {
        const t3 = this.getSubTable(tableID);
        return t3.supports && t3.supports(char) !== false;
      });
    }
    supportsVariation(variation) {
      return this.encodingRecords.some((_, tableID) => {
        const t3 = this.getSubTable(tableID);
        return t3.supportsVariation && t3.supportsVariation(variation) !== false;
      });
    }
  };
  var EncodingRecord = class {
    constructor(p22, tableStart) {
      const platformID = this.platformID = p22.uint16;
      const encodingID = this.encodingID = p22.uint16;
      const offset = this.offset = p22.Offset32;
      lazy$1(this, `table`, () => {
        p22.currentPosition = tableStart + offset;
        return createSubTable(p22, platformID, encodingID);
      });
    }
  };
  var cmap$1 = Object.freeze({ __proto__: null, cmap });
  var head = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.load({
        majorVersion: p22.uint16,
        minorVersion: p22.uint16,
        fontRevision: p22.fixed,
        checkSumAdjustment: p22.uint32,
        magicNumber: p22.uint32,
        flags: p22.flags(16),
        unitsPerEm: p22.uint16,
        created: p22.longdatetime,
        modified: p22.longdatetime,
        xMin: p22.int16,
        yMin: p22.int16,
        xMax: p22.int16,
        yMax: p22.int16,
        macStyle: p22.flags(16),
        lowestRecPPEM: p22.uint16,
        fontDirectionHint: p22.uint16,
        indexToLocFormat: p22.uint16,
        glyphDataFormat: p22.uint16
      });
    }
  };
  var head$1 = Object.freeze({ __proto__: null, head });
  var hhea = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.majorVersion = p22.uint16;
      this.minorVersion = p22.uint16;
      this.ascender = p22.fword;
      this.descender = p22.fword;
      this.lineGap = p22.fword;
      this.advanceWidthMax = p22.ufword;
      this.minLeftSideBearing = p22.fword;
      this.minRightSideBearing = p22.fword;
      this.xMaxExtent = p22.fword;
      this.caretSlopeRise = p22.int16;
      this.caretSlopeRun = p22.int16;
      this.caretOffset = p22.int16;
      p22.int16;
      p22.int16;
      p22.int16;
      p22.int16;
      this.metricDataFormat = p22.int16;
      this.numberOfHMetrics = p22.uint16;
      p22.verifyLength();
    }
  };
  var hhea$1 = Object.freeze({ __proto__: null, hhea });
  var hmtx = class extends SimpleTable {
    constructor(dict, dataview, tables) {
      const { p: p22 } = super(dict, dataview);
      const numberOfHMetrics = tables.hhea.numberOfHMetrics;
      const numGlyphs = tables.maxp.numGlyphs;
      const metricsStart = p22.currentPosition;
      lazy$1(this, `hMetrics`, () => {
        p22.currentPosition = metricsStart;
        return [...new Array(numberOfHMetrics)].map(
          (_) => new LongHorMetric(p22.uint16, p22.int16)
        );
      });
      if (numberOfHMetrics < numGlyphs) {
        const lsbStart = metricsStart + numberOfHMetrics * 4;
        lazy$1(this, `leftSideBearings`, () => {
          p22.currentPosition = lsbStart;
          return [...new Array(numGlyphs - numberOfHMetrics)].map(
            (_) => p22.int16
          );
        });
      }
    }
  };
  var LongHorMetric = class {
    constructor(w2, b2) {
      this.advanceWidth = w2;
      this.lsb = b2;
    }
  };
  var hmtx$1 = Object.freeze({ __proto__: null, hmtx });
  var maxp = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.legacyFixed;
      this.numGlyphs = p22.uint16;
      if (this.version === 1) {
        this.maxPoints = p22.uint16;
        this.maxContours = p22.uint16;
        this.maxCompositePoints = p22.uint16;
        this.maxCompositeContours = p22.uint16;
        this.maxZones = p22.uint16;
        this.maxTwilightPoints = p22.uint16;
        this.maxStorage = p22.uint16;
        this.maxFunctionDefs = p22.uint16;
        this.maxInstructionDefs = p22.uint16;
        this.maxStackElements = p22.uint16;
        this.maxSizeOfInstructions = p22.uint16;
        this.maxComponentElements = p22.uint16;
        this.maxComponentDepth = p22.uint16;
      }
      p22.verifyLength();
    }
  };
  var maxp$1 = Object.freeze({ __proto__: null, maxp });
  var name = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.format = p22.uint16;
      this.count = p22.uint16;
      this.stringOffset = p22.Offset16;
      this.nameRecords = [...new Array(this.count)].map(
        (_) => new NameRecord(p22, this)
      );
      if (this.format === 1) {
        this.langTagCount = p22.uint16;
        this.langTagRecords = [...new Array(this.langTagCount)].map(
          (_) => new LangTagRecord(p22.uint16, p22.Offset16)
        );
      }
      this.stringStart = this.tableStart + this.stringOffset;
    }
    get(nameID) {
      let record = this.nameRecords.find(
        (record2) => record2.nameID === nameID
      );
      if (record) return record.string;
    }
  };
  var LangTagRecord = class {
    constructor(length, offset) {
      this.length = length;
      this.offset = offset;
    }
  };
  var NameRecord = class {
    constructor(p22, nameTable) {
      this.platformID = p22.uint16;
      this.encodingID = p22.uint16;
      this.languageID = p22.uint16;
      this.nameID = p22.uint16;
      this.length = p22.uint16;
      this.offset = p22.Offset16;
      lazy$1(this, `string`, () => {
        p22.currentPosition = nameTable.stringStart + this.offset;
        return decodeString(p22, this);
      });
    }
  };
  function decodeString(p22, record) {
    const { platformID, length } = record;
    if (length === 0) return ``;
    if (platformID === 0 || platformID === 3) {
      const str2 = [];
      for (let i2 = 0, e2 = length / 2; i2 < e2; i2++)
        str2[i2] = String.fromCharCode(p22.uint16);
      return str2.join(``);
    }
    const bytes = p22.readBytes(length);
    const str = [];
    bytes.forEach(function(b2, i2) {
      str[i2] = String.fromCharCode(b2);
    });
    return str.join(``);
  }
  var name$1 = Object.freeze({ __proto__: null, name });
  var OS2 = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint16;
      this.xAvgCharWidth = p22.int16;
      this.usWeightClass = p22.uint16;
      this.usWidthClass = p22.uint16;
      this.fsType = p22.uint16;
      this.ySubscriptXSize = p22.int16;
      this.ySubscriptYSize = p22.int16;
      this.ySubscriptXOffset = p22.int16;
      this.ySubscriptYOffset = p22.int16;
      this.ySuperscriptXSize = p22.int16;
      this.ySuperscriptYSize = p22.int16;
      this.ySuperscriptXOffset = p22.int16;
      this.ySuperscriptYOffset = p22.int16;
      this.yStrikeoutSize = p22.int16;
      this.yStrikeoutPosition = p22.int16;
      this.sFamilyClass = p22.int16;
      this.panose = [...new Array(10)].map((_) => p22.uint8);
      this.ulUnicodeRange1 = p22.flags(32);
      this.ulUnicodeRange2 = p22.flags(32);
      this.ulUnicodeRange3 = p22.flags(32);
      this.ulUnicodeRange4 = p22.flags(32);
      this.achVendID = p22.tag;
      this.fsSelection = p22.uint16;
      this.usFirstCharIndex = p22.uint16;
      this.usLastCharIndex = p22.uint16;
      this.sTypoAscender = p22.int16;
      this.sTypoDescender = p22.int16;
      this.sTypoLineGap = p22.int16;
      this.usWinAscent = p22.uint16;
      this.usWinDescent = p22.uint16;
      if (this.version === 0) return p22.verifyLength();
      this.ulCodePageRange1 = p22.flags(32);
      this.ulCodePageRange2 = p22.flags(32);
      if (this.version === 1) return p22.verifyLength();
      this.sxHeight = p22.int16;
      this.sCapHeight = p22.int16;
      this.usDefaultChar = p22.uint16;
      this.usBreakChar = p22.uint16;
      this.usMaxContext = p22.uint16;
      if (this.version <= 4) return p22.verifyLength();
      this.usLowerOpticalPointSize = p22.uint16;
      this.usUpperOpticalPointSize = p22.uint16;
      if (this.version === 5) return p22.verifyLength();
    }
  };
  var OS2$1 = Object.freeze({ __proto__: null, OS2 });
  var post = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.legacyFixed;
      this.italicAngle = p22.fixed;
      this.underlinePosition = p22.fword;
      this.underlineThickness = p22.fword;
      this.isFixedPitch = p22.uint32;
      this.minMemType42 = p22.uint32;
      this.maxMemType42 = p22.uint32;
      this.minMemType1 = p22.uint32;
      this.maxMemType1 = p22.uint32;
      if (this.version === 1 || this.version === 3) return p22.verifyLength();
      this.numGlyphs = p22.uint16;
      if (this.version === 2) {
        this.glyphNameIndex = [...new Array(this.numGlyphs)].map(
          (_) => p22.uint16
        );
        this.namesOffset = p22.currentPosition;
        this.glyphNameOffsets = [1];
        for (let i2 = 0; i2 < this.numGlyphs; i2++) {
          let index = this.glyphNameIndex[i2];
          if (index < macStrings.length) {
            this.glyphNameOffsets.push(this.glyphNameOffsets[i2]);
            continue;
          }
          let bytelength = p22.int8;
          p22.skip(bytelength);
          this.glyphNameOffsets.push(
            this.glyphNameOffsets[i2] + bytelength + 1
          );
        }
      }
      if (this.version === 2.5) {
        this.offset = [...new Array(this.numGlyphs)].map(
          (_) => p22.int8
        );
      }
    }
    getGlyphName(glyphid) {
      if (this.version !== 2) {
        console.warn(
          `post table version ${this.version} does not support glyph name lookups`
        );
        return ``;
      }
      let index = this.glyphNameIndex[glyphid];
      if (index < 258) return macStrings[index];
      let offset = this.glyphNameOffsets[glyphid];
      let next = this.glyphNameOffsets[glyphid + 1];
      let len = next - offset - 1;
      if (len === 0) return `.notdef.`;
      this.parser.currentPosition = this.namesOffset + offset;
      const data = this.parser.readBytes(
        len,
        this.namesOffset + offset,
        8,
        true
      );
      return data.map((b2) => String.fromCharCode(b2)).join(``);
    }
  };
  var macStrings = [
    `.notdef`,
    `.null`,
    `nonmarkingreturn`,
    `space`,
    `exclam`,
    `quotedbl`,
    `numbersign`,
    `dollar`,
    `percent`,
    `ampersand`,
    `quotesingle`,
    `parenleft`,
    `parenright`,
    `asterisk`,
    `plus`,
    `comma`,
    `hyphen`,
    `period`,
    `slash`,
    `zero`,
    `one`,
    `two`,
    `three`,
    `four`,
    `five`,
    `six`,
    `seven`,
    `eight`,
    `nine`,
    `colon`,
    `semicolon`,
    `less`,
    `equal`,
    `greater`,
    `question`,
    `at`,
    `A`,
    `B`,
    `C`,
    `D`,
    `E`,
    `F`,
    `G`,
    `H`,
    `I`,
    `J`,
    `K`,
    `L`,
    `M`,
    `N`,
    `O`,
    `P`,
    `Q`,
    `R`,
    `S`,
    `T`,
    `U`,
    `V`,
    `W`,
    `X`,
    `Y`,
    `Z`,
    `bracketleft`,
    `backslash`,
    `bracketright`,
    `asciicircum`,
    `underscore`,
    `grave`,
    `a`,
    `b`,
    `c`,
    `d`,
    `e`,
    `f`,
    `g`,
    `h`,
    `i`,
    `j`,
    `k`,
    `l`,
    `m`,
    `n`,
    `o`,
    `p`,
    `q`,
    `r`,
    `s`,
    `t`,
    `u`,
    `v`,
    `w`,
    `x`,
    `y`,
    `z`,
    `braceleft`,
    `bar`,
    `braceright`,
    `asciitilde`,
    `Adieresis`,
    `Aring`,
    `Ccedilla`,
    `Eacute`,
    `Ntilde`,
    `Odieresis`,
    `Udieresis`,
    `aacute`,
    `agrave`,
    `acircumflex`,
    `adieresis`,
    `atilde`,
    `aring`,
    `ccedilla`,
    `eacute`,
    `egrave`,
    `ecircumflex`,
    `edieresis`,
    `iacute`,
    `igrave`,
    `icircumflex`,
    `idieresis`,
    `ntilde`,
    `oacute`,
    `ograve`,
    `ocircumflex`,
    `odieresis`,
    `otilde`,
    `uacute`,
    `ugrave`,
    `ucircumflex`,
    `udieresis`,
    `dagger`,
    `degree`,
    `cent`,
    `sterling`,
    `section`,
    `bullet`,
    `paragraph`,
    `germandbls`,
    `registered`,
    `copyright`,
    `trademark`,
    `acute`,
    `dieresis`,
    `notequal`,
    `AE`,
    `Oslash`,
    `infinity`,
    `plusminus`,
    `lessequal`,
    `greaterequal`,
    `yen`,
    `mu`,
    `partialdiff`,
    `summation`,
    `product`,
    `pi`,
    `integral`,
    `ordfeminine`,
    `ordmasculine`,
    `Omega`,
    `ae`,
    `oslash`,
    `questiondown`,
    `exclamdown`,
    `logicalnot`,
    `radical`,
    `florin`,
    `approxequal`,
    `Delta`,
    `guillemotleft`,
    `guillemotright`,
    `ellipsis`,
    `nonbreakingspace`,
    `Agrave`,
    `Atilde`,
    `Otilde`,
    `OE`,
    `oe`,
    `endash`,
    `emdash`,
    `quotedblleft`,
    `quotedblright`,
    `quoteleft`,
    `quoteright`,
    `divide`,
    `lozenge`,
    `ydieresis`,
    `Ydieresis`,
    `fraction`,
    `currency`,
    `guilsinglleft`,
    `guilsinglright`,
    `fi`,
    `fl`,
    `daggerdbl`,
    `periodcentered`,
    `quotesinglbase`,
    `quotedblbase`,
    `perthousand`,
    `Acircumflex`,
    `Ecircumflex`,
    `Aacute`,
    `Edieresis`,
    `Egrave`,
    `Iacute`,
    `Icircumflex`,
    `Idieresis`,
    `Igrave`,
    `Oacute`,
    `Ocircumflex`,
    `apple`,
    `Ograve`,
    `Uacute`,
    `Ucircumflex`,
    `Ugrave`,
    `dotlessi`,
    `circumflex`,
    `tilde`,
    `macron`,
    `breve`,
    `dotaccent`,
    `ring`,
    `cedilla`,
    `hungarumlaut`,
    `ogonek`,
    `caron`,
    `Lslash`,
    `lslash`,
    `Scaron`,
    `scaron`,
    `Zcaron`,
    `zcaron`,
    `brokenbar`,
    `Eth`,
    `eth`,
    `Yacute`,
    `yacute`,
    `Thorn`,
    `thorn`,
    `minus`,
    `multiply`,
    `onesuperior`,
    `twosuperior`,
    `threesuperior`,
    `onehalf`,
    `onequarter`,
    `threequarters`,
    `franc`,
    `Gbreve`,
    `gbreve`,
    `Idotaccent`,
    `Scedilla`,
    `scedilla`,
    `Cacute`,
    `cacute`,
    `Ccaron`,
    `ccaron`,
    `dcroat`
  ];
  var post$1 = Object.freeze({ __proto__: null, post });
  var BASE = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.majorVersion = p22.uint16;
      this.minorVersion = p22.uint16;
      this.horizAxisOffset = p22.Offset16;
      this.vertAxisOffset = p22.Offset16;
      lazy$1(
        this,
        `horizAxis`,
        () => new AxisTable(
          { offset: dict.offset + this.horizAxisOffset },
          dataview
        )
      );
      lazy$1(
        this,
        `vertAxis`,
        () => new AxisTable(
          { offset: dict.offset + this.vertAxisOffset },
          dataview
        )
      );
      if (this.majorVersion === 1 && this.minorVersion === 1) {
        this.itemVarStoreOffset = p22.Offset32;
        lazy$1(
          this,
          `itemVarStore`,
          () => new AxisTable(
            { offset: dict.offset + this.itemVarStoreOffset },
            dataview
          )
        );
      }
    }
  };
  var AxisTable = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview, `AxisTable`);
      this.baseTagListOffset = p22.Offset16;
      this.baseScriptListOffset = p22.Offset16;
      lazy$1(
        this,
        `baseTagList`,
        () => new BaseTagListTable(
          { offset: dict.offset + this.baseTagListOffset },
          dataview
        )
      );
      lazy$1(
        this,
        `baseScriptList`,
        () => new BaseScriptListTable(
          { offset: dict.offset + this.baseScriptListOffset },
          dataview
        )
      );
    }
  };
  var BaseTagListTable = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview, `BaseTagListTable`);
      this.baseTagCount = p22.uint16;
      this.baselineTags = [...new Array(this.baseTagCount)].map(
        (_) => p22.tag
      );
    }
  };
  var BaseScriptListTable = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview, `BaseScriptListTable`);
      this.baseScriptCount = p22.uint16;
      const recordStart = p22.currentPosition;
      lazy$1(this, `baseScriptRecords`, () => {
        p22.currentPosition = recordStart;
        return [...new Array(this.baseScriptCount)].map(
          (_) => new BaseScriptRecord(this.start, p22)
        );
      });
    }
  };
  var BaseScriptRecord = class {
    constructor(baseScriptListTableStart, p22) {
      this.baseScriptTag = p22.tag;
      this.baseScriptOffset = p22.Offset16;
      lazy$1(this, `baseScriptTable`, () => {
        p22.currentPosition = baseScriptListTableStart + this.baseScriptOffset;
        return new BaseScriptTable(p22);
      });
    }
  };
  var BaseScriptTable = class {
    constructor(p22) {
      this.start = p22.currentPosition;
      this.baseValuesOffset = p22.Offset16;
      this.defaultMinMaxOffset = p22.Offset16;
      this.baseLangSysCount = p22.uint16;
      this.baseLangSysRecords = [...new Array(this.baseLangSysCount)].map(
        (_) => new BaseLangSysRecord(this.start, p22)
      );
      lazy$1(this, `baseValues`, () => {
        p22.currentPosition = this.start + this.baseValuesOffset;
        return new BaseValuesTable(p22);
      });
      lazy$1(this, `defaultMinMax`, () => {
        p22.currentPosition = this.start + this.defaultMinMaxOffset;
        return new MinMaxTable(p22);
      });
    }
  };
  var BaseLangSysRecord = class {
    constructor(baseScriptTableStart, p22) {
      this.baseLangSysTag = p22.tag;
      this.minMaxOffset = p22.Offset16;
      lazy$1(this, `minMax`, () => {
        p22.currentPosition = baseScriptTableStart + this.minMaxOffset;
        return new MinMaxTable(p22);
      });
    }
  };
  var BaseValuesTable = class {
    constructor(p22) {
      this.parser = p22;
      this.start = p22.currentPosition;
      this.defaultBaselineIndex = p22.uint16;
      this.baseCoordCount = p22.uint16;
      this.baseCoords = [...new Array(this.baseCoordCount)].map(
        (_) => p22.Offset16
      );
    }
    getTable(id) {
      this.parser.currentPosition = this.start + this.baseCoords[id];
      return new BaseCoordTable(this.parser);
    }
  };
  var MinMaxTable = class {
    constructor(p22) {
      this.minCoord = p22.Offset16;
      this.maxCoord = p22.Offset16;
      this.featMinMaxCount = p22.uint16;
      const recordStart = p22.currentPosition;
      lazy$1(this, `featMinMaxRecords`, () => {
        p22.currentPosition = recordStart;
        return [...new Array(this.featMinMaxCount)].map(
          (_) => new FeatMinMaxRecord(p22)
        );
      });
    }
  };
  var FeatMinMaxRecord = class {
    constructor(p22) {
      this.featureTableTag = p22.tag;
      this.minCoord = p22.Offset16;
      this.maxCoord = p22.Offset16;
    }
  };
  var BaseCoordTable = class {
    constructor(p22) {
      this.baseCoordFormat = p22.uint16;
      this.coordinate = p22.int16;
      if (this.baseCoordFormat === 2) {
        this.referenceGlyph = p22.uint16;
        this.baseCoordPoint = p22.uint16;
      }
      if (this.baseCoordFormat === 3) {
        this.deviceTable = p22.Offset16;
      }
    }
  };
  var BASE$1 = Object.freeze({ __proto__: null, BASE });
  var ClassDefinition = class {
    constructor(p22) {
      this.classFormat = p22.uint16;
      if (this.classFormat === 1) {
        this.startGlyphID = p22.uint16;
        this.glyphCount = p22.uint16;
        this.classValueArray = [...new Array(this.glyphCount)].map(
          (_) => p22.uint16
        );
      }
      if (this.classFormat === 2) {
        this.classRangeCount = p22.uint16;
        this.classRangeRecords = [
          ...new Array(this.classRangeCount)
        ].map((_) => new ClassRangeRecord(p22));
      }
    }
  };
  var ClassRangeRecord = class {
    constructor(p22) {
      this.startGlyphID = p22.uint16;
      this.endGlyphID = p22.uint16;
      this.class = p22.uint16;
    }
  };
  var CoverageTable = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.coverageFormat = p22.uint16;
      if (this.coverageFormat === 1) {
        this.glyphCount = p22.uint16;
        this.glyphArray = [...new Array(this.glyphCount)].map(
          (_) => p22.uint16
        );
      }
      if (this.coverageFormat === 2) {
        this.rangeCount = p22.uint16;
        this.rangeRecords = [...new Array(this.rangeCount)].map(
          (_) => new CoverageRangeRecord(p22)
        );
      }
    }
  };
  var CoverageRangeRecord = class {
    constructor(p22) {
      this.startGlyphID = p22.uint16;
      this.endGlyphID = p22.uint16;
      this.startCoverageIndex = p22.uint16;
    }
  };
  var ItemVariationStoreTable = class {
    constructor(table, p22) {
      this.table = table;
      this.parser = p22;
      this.start = p22.currentPosition;
      this.format = p22.uint16;
      this.variationRegionListOffset = p22.Offset32;
      this.itemVariationDataCount = p22.uint16;
      this.itemVariationDataOffsets = [
        ...new Array(this.itemVariationDataCount)
      ].map((_) => p22.Offset32);
    }
  };
  var GDEF = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.majorVersion = p22.uint16;
      this.minorVersion = p22.uint16;
      this.glyphClassDefOffset = p22.Offset16;
      lazy$1(this, `glyphClassDefs`, () => {
        if (this.glyphClassDefOffset === 0) return void 0;
        p22.currentPosition = this.tableStart + this.glyphClassDefOffset;
        return new ClassDefinition(p22);
      });
      this.attachListOffset = p22.Offset16;
      lazy$1(this, `attachList`, () => {
        if (this.attachListOffset === 0) return void 0;
        p22.currentPosition = this.tableStart + this.attachListOffset;
        return new AttachList(p22);
      });
      this.ligCaretListOffset = p22.Offset16;
      lazy$1(this, `ligCaretList`, () => {
        if (this.ligCaretListOffset === 0) return void 0;
        p22.currentPosition = this.tableStart + this.ligCaretListOffset;
        return new LigCaretList(p22);
      });
      this.markAttachClassDefOffset = p22.Offset16;
      lazy$1(this, `markAttachClassDef`, () => {
        if (this.markAttachClassDefOffset === 0) return void 0;
        p22.currentPosition = this.tableStart + this.markAttachClassDefOffset;
        return new ClassDefinition(p22);
      });
      if (this.minorVersion >= 2) {
        this.markGlyphSetsDefOffset = p22.Offset16;
        lazy$1(this, `markGlyphSetsDef`, () => {
          if (this.markGlyphSetsDefOffset === 0) return void 0;
          p22.currentPosition = this.tableStart + this.markGlyphSetsDefOffset;
          return new MarkGlyphSetsTable(p22);
        });
      }
      if (this.minorVersion === 3) {
        this.itemVarStoreOffset = p22.Offset32;
        lazy$1(this, `itemVarStore`, () => {
          if (this.itemVarStoreOffset === 0) return void 0;
          p22.currentPosition = this.tableStart + this.itemVarStoreOffset;
          return new ItemVariationStoreTable(p22);
        });
      }
    }
  };
  var AttachList = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.coverageOffset = p22.Offset16;
      this.glyphCount = p22.uint16;
      this.attachPointOffsets = [...new Array(this.glyphCount)].map(
        (_) => p22.Offset16
      );
    }
    getPoint(pointID) {
      this.parser.currentPosition = this.start + this.attachPointOffsets[pointID];
      return new AttachPoint(this.parser);
    }
  };
  var AttachPoint = class {
    constructor(p22) {
      this.pointCount = p22.uint16;
      this.pointIndices = [...new Array(this.pointCount)].map(
        (_) => p22.uint16
      );
    }
  };
  var LigCaretList = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.coverageOffset = p22.Offset16;
      lazy$1(this, `coverage`, () => {
        p22.currentPosition = this.start + this.coverageOffset;
        return new CoverageTable(p22);
      });
      this.ligGlyphCount = p22.uint16;
      this.ligGlyphOffsets = [...new Array(this.ligGlyphCount)].map(
        (_) => p22.Offset16
      );
    }
    getLigGlyph(ligGlyphID) {
      this.parser.currentPosition = this.start + this.ligGlyphOffsets[ligGlyphID];
      return new LigGlyph(this.parser);
    }
  };
  var LigGlyph = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.caretCount = p22.uint16;
      this.caretValueOffsets = [...new Array(this.caretCount)].map(
        (_) => p22.Offset16
      );
    }
    getCaretValue(caretID) {
      this.parser.currentPosition = this.start + this.caretValueOffsets[caretID];
      return new CaretValue(this.parser);
    }
  };
  var CaretValue = class {
    constructor(p22) {
      this.caretValueFormat = p22.uint16;
      if (this.caretValueFormat === 1) {
        this.coordinate = p22.int16;
      }
      if (this.caretValueFormat === 2) {
        this.caretValuePointIndex = p22.uint16;
      }
      if (this.caretValueFormat === 3) {
        this.coordinate = p22.int16;
        this.deviceOffset = p22.Offset16;
      }
    }
  };
  var MarkGlyphSetsTable = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.markGlyphSetTableFormat = p22.uint16;
      this.markGlyphSetCount = p22.uint16;
      this.coverageOffsets = [...new Array(this.markGlyphSetCount)].map(
        (_) => p22.Offset32
      );
    }
    getMarkGlyphSet(markGlyphSetID) {
      this.parser.currentPosition = this.start + this.coverageOffsets[markGlyphSetID];
      return new CoverageTable(this.parser);
    }
  };
  var GDEF$1 = Object.freeze({ __proto__: null, GDEF });
  var ScriptList = class extends ParsedData {
    static EMPTY = { scriptCount: 0, scriptRecords: [] };
    constructor(p22) {
      super(p22);
      this.scriptCount = p22.uint16;
      this.scriptRecords = [...new Array(this.scriptCount)].map(
        (_) => new ScriptRecord(p22)
      );
    }
  };
  var ScriptRecord = class {
    constructor(p22) {
      this.scriptTag = p22.tag;
      this.scriptOffset = p22.Offset16;
    }
  };
  var ScriptTable = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.defaultLangSys = p22.Offset16;
      this.langSysCount = p22.uint16;
      this.langSysRecords = [...new Array(this.langSysCount)].map(
        (_) => new LangSysRecord(p22)
      );
    }
  };
  var LangSysRecord = class {
    constructor(p22) {
      this.langSysTag = p22.tag;
      this.langSysOffset = p22.Offset16;
    }
  };
  var LangSysTable = class {
    constructor(p22) {
      this.lookupOrder = p22.Offset16;
      this.requiredFeatureIndex = p22.uint16;
      this.featureIndexCount = p22.uint16;
      this.featureIndices = [...new Array(this.featureIndexCount)].map(
        (_) => p22.uint16
      );
    }
  };
  var FeatureList = class extends ParsedData {
    static EMPTY = { featureCount: 0, featureRecords: [] };
    constructor(p22) {
      super(p22);
      this.featureCount = p22.uint16;
      this.featureRecords = [...new Array(this.featureCount)].map(
        (_) => new FeatureRecord(p22)
      );
    }
  };
  var FeatureRecord = class {
    constructor(p22) {
      this.featureTag = p22.tag;
      this.featureOffset = p22.Offset16;
    }
  };
  var FeatureTable = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.featureParams = p22.Offset16;
      this.lookupIndexCount = p22.uint16;
      this.lookupListIndices = [...new Array(this.lookupIndexCount)].map(
        (_) => p22.uint16
      );
    }
    getFeatureParams() {
      if (this.featureParams > 0) {
        const p22 = this.parser;
        p22.currentPosition = this.start + this.featureParams;
        const tag = this.featureTag;
        if (tag === `size`) return new Size(p22);
        if (tag.startsWith(`cc`)) return new CharacterVariant(p22);
        if (tag.startsWith(`ss`)) return new StylisticSet(p22);
      }
    }
  };
  var CharacterVariant = class {
    constructor(p22) {
      this.format = p22.uint16;
      this.featUiLabelNameId = p22.uint16;
      this.featUiTooltipTextNameId = p22.uint16;
      this.sampleTextNameId = p22.uint16;
      this.numNamedParameters = p22.uint16;
      this.firstParamUiLabelNameId = p22.uint16;
      this.charCount = p22.uint16;
      this.character = [...new Array(this.charCount)].map(
        (_) => p22.uint24
      );
    }
  };
  var Size = class {
    constructor(p22) {
      this.designSize = p22.uint16;
      this.subfamilyIdentifier = p22.uint16;
      this.subfamilyNameID = p22.uint16;
      this.smallEnd = p22.uint16;
      this.largeEnd = p22.uint16;
    }
  };
  var StylisticSet = class {
    constructor(p22) {
      this.version = p22.uint16;
      this.UINameID = p22.uint16;
    }
  };
  function undoCoverageOffsetParsing(instance) {
    instance.parser.currentPosition -= 2;
    delete instance.coverageOffset;
    delete instance.getCoverageTable;
  }
  var LookupType$1 = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.substFormat = p22.uint16;
      this.coverageOffset = p22.Offset16;
    }
    getCoverageTable() {
      let p22 = this.parser;
      p22.currentPosition = this.start + this.coverageOffset;
      return new CoverageTable(p22);
    }
  };
  var SubstLookupRecord = class {
    constructor(p22) {
      this.glyphSequenceIndex = p22.uint16;
      this.lookupListIndex = p22.uint16;
    }
  };
  var LookupType1$1 = class extends LookupType$1 {
    constructor(p22) {
      super(p22);
      this.deltaGlyphID = p22.int16;
    }
  };
  var LookupType2$1 = class extends LookupType$1 {
    constructor(p22) {
      super(p22);
      this.sequenceCount = p22.uint16;
      this.sequenceOffsets = [...new Array(this.sequenceCount)].map(
        (_) => p22.Offset16
      );
    }
    getSequence(index) {
      let p22 = this.parser;
      p22.currentPosition = this.start + this.sequenceOffsets[index];
      return new SequenceTable(p22);
    }
  };
  var SequenceTable = class {
    constructor(p22) {
      this.glyphCount = p22.uint16;
      this.substituteGlyphIDs = [...new Array(this.glyphCount)].map(
        (_) => p22.uint16
      );
    }
  };
  var LookupType3$1 = class extends LookupType$1 {
    constructor(p22) {
      super(p22);
      this.alternateSetCount = p22.uint16;
      this.alternateSetOffsets = [
        ...new Array(this.alternateSetCount)
      ].map((_) => p22.Offset16);
    }
    getAlternateSet(index) {
      let p22 = this.parser;
      p22.currentPosition = this.start + this.alternateSetOffsets[index];
      return new AlternateSetTable(p22);
    }
  };
  var AlternateSetTable = class {
    constructor(p22) {
      this.glyphCount = p22.uint16;
      this.alternateGlyphIDs = [...new Array(this.glyphCount)].map(
        (_) => p22.uint16
      );
    }
  };
  var LookupType4$1 = class extends LookupType$1 {
    constructor(p22) {
      super(p22);
      this.ligatureSetCount = p22.uint16;
      this.ligatureSetOffsets = [...new Array(this.ligatureSetCount)].map(
        (_) => p22.Offset16
      );
    }
    getLigatureSet(index) {
      let p22 = this.parser;
      p22.currentPosition = this.start + this.ligatureSetOffsets[index];
      return new LigatureSetTable(p22);
    }
  };
  var LigatureSetTable = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.ligatureCount = p22.uint16;
      this.ligatureOffsets = [...new Array(this.ligatureCount)].map(
        (_) => p22.Offset16
      );
    }
    getLigature(index) {
      let p22 = this.parser;
      p22.currentPosition = this.start + this.ligatureOffsets[index];
      return new LigatureTable(p22);
    }
  };
  var LigatureTable = class {
    constructor(p22) {
      this.ligatureGlyph = p22.uint16;
      this.componentCount = p22.uint16;
      this.componentGlyphIDs = [
        ...new Array(this.componentCount - 1)
      ].map((_) => p22.uint16);
    }
  };
  var LookupType5$1 = class extends LookupType$1 {
    constructor(p22) {
      super(p22);
      if (this.substFormat === 1) {
        this.subRuleSetCount = p22.uint16;
        this.subRuleSetOffsets = [
          ...new Array(this.subRuleSetCount)
        ].map((_) => p22.Offset16);
      }
      if (this.substFormat === 2) {
        this.classDefOffset = p22.Offset16;
        this.subClassSetCount = p22.uint16;
        this.subClassSetOffsets = [
          ...new Array(this.subClassSetCount)
        ].map((_) => p22.Offset16);
      }
      if (this.substFormat === 3) {
        undoCoverageOffsetParsing(this);
        this.glyphCount = p22.uint16;
        this.substitutionCount = p22.uint16;
        this.coverageOffsets = [...new Array(this.glyphCount)].map(
          (_) => p22.Offset16
        );
        this.substLookupRecords = [
          ...new Array(this.substitutionCount)
        ].map((_) => new SubstLookupRecord(p22));
      }
    }
    getSubRuleSet(index) {
      if (this.substFormat !== 1)
        throw new Error(
          `lookup type 5.${this.substFormat} has no subrule sets.`
        );
      let p22 = this.parser;
      p22.currentPosition = this.start + this.subRuleSetOffsets[index];
      return new SubRuleSetTable(p22);
    }
    getSubClassSet(index) {
      if (this.substFormat !== 2)
        throw new Error(
          `lookup type 5.${this.substFormat} has no subclass sets.`
        );
      let p22 = this.parser;
      p22.currentPosition = this.start + this.subClassSetOffsets[index];
      return new SubClassSetTable(p22);
    }
    getCoverageTable(index) {
      if (this.substFormat !== 3 && !index)
        return super.getCoverageTable();
      if (!index)
        throw new Error(
          `lookup type 5.${this.substFormat} requires an coverage table index.`
        );
      let p22 = this.parser;
      p22.currentPosition = this.start + this.coverageOffsets[index];
      return new CoverageTable(p22);
    }
  };
  var SubRuleSetTable = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.subRuleCount = p22.uint16;
      this.subRuleOffsets = [...new Array(this.subRuleCount)].map(
        (_) => p22.Offset16
      );
    }
    getSubRule(index) {
      let p22 = this.parser;
      p22.currentPosition = this.start + this.subRuleOffsets[index];
      return new SubRuleTable(p22);
    }
  };
  var SubRuleTable = class {
    constructor(p22) {
      this.glyphCount = p22.uint16;
      this.substitutionCount = p22.uint16;
      this.inputSequence = [...new Array(this.glyphCount - 1)].map(
        (_) => p22.uint16
      );
      this.substLookupRecords = [
        ...new Array(this.substitutionCount)
      ].map((_) => new SubstLookupRecord(p22));
    }
  };
  var SubClassSetTable = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.subClassRuleCount = p22.uint16;
      this.subClassRuleOffsets = [
        ...new Array(this.subClassRuleCount)
      ].map((_) => p22.Offset16);
    }
    getSubClass(index) {
      let p22 = this.parser;
      p22.currentPosition = this.start + this.subClassRuleOffsets[index];
      return new SubClassRuleTable(p22);
    }
  };
  var SubClassRuleTable = class extends SubRuleTable {
    constructor(p22) {
      super(p22);
    }
  };
  var LookupType6$1 = class extends LookupType$1 {
    constructor(p22) {
      super(p22);
      if (this.substFormat === 1) {
        this.chainSubRuleSetCount = p22.uint16;
        this.chainSubRuleSetOffsets = [
          ...new Array(this.chainSubRuleSetCount)
        ].map((_) => p22.Offset16);
      }
      if (this.substFormat === 2) {
        this.backtrackClassDefOffset = p22.Offset16;
        this.inputClassDefOffset = p22.Offset16;
        this.lookaheadClassDefOffset = p22.Offset16;
        this.chainSubClassSetCount = p22.uint16;
        this.chainSubClassSetOffsets = [
          ...new Array(this.chainSubClassSetCount)
        ].map((_) => p22.Offset16);
      }
      if (this.substFormat === 3) {
        undoCoverageOffsetParsing(this);
        this.backtrackGlyphCount = p22.uint16;
        this.backtrackCoverageOffsets = [
          ...new Array(this.backtrackGlyphCount)
        ].map((_) => p22.Offset16);
        this.inputGlyphCount = p22.uint16;
        this.inputCoverageOffsets = [
          ...new Array(this.inputGlyphCount)
        ].map((_) => p22.Offset16);
        this.lookaheadGlyphCount = p22.uint16;
        this.lookaheadCoverageOffsets = [
          ...new Array(this.lookaheadGlyphCount)
        ].map((_) => p22.Offset16);
        this.seqLookupCount = p22.uint16;
        this.seqLookupRecords = [
          ...new Array(this.substitutionCount)
        ].map((_) => new SequenceLookupRecord(p22));
      }
    }
    getChainSubRuleSet(index) {
      if (this.substFormat !== 1)
        throw new Error(
          `lookup type 6.${this.substFormat} has no chainsubrule sets.`
        );
      let p22 = this.parser;
      p22.currentPosition = this.start + this.chainSubRuleSetOffsets[index];
      return new ChainSubRuleSetTable(p22);
    }
    getChainSubClassSet(index) {
      if (this.substFormat !== 2)
        throw new Error(
          `lookup type 6.${this.substFormat} has no chainsubclass sets.`
        );
      let p22 = this.parser;
      p22.currentPosition = this.start + this.chainSubClassSetOffsets[index];
      return new ChainSubClassSetTable(p22);
    }
    getCoverageFromOffset(offset) {
      if (this.substFormat !== 3)
        throw new Error(
          `lookup type 6.${this.substFormat} does not use contextual coverage offsets.`
        );
      let p22 = this.parser;
      p22.currentPosition = this.start + offset;
      return new CoverageTable(p22);
    }
  };
  var ChainSubRuleSetTable = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.chainSubRuleCount = p22.uint16;
      this.chainSubRuleOffsets = [
        ...new Array(this.chainSubRuleCount)
      ].map((_) => p22.Offset16);
    }
    getSubRule(index) {
      let p22 = this.parser;
      p22.currentPosition = this.start + this.chainSubRuleOffsets[index];
      return new ChainSubRuleTable(p22);
    }
  };
  var ChainSubRuleTable = class {
    constructor(p22) {
      this.backtrackGlyphCount = p22.uint16;
      this.backtrackSequence = [
        ...new Array(this.backtrackGlyphCount)
      ].map((_) => p22.uint16);
      this.inputGlyphCount = p22.uint16;
      this.inputSequence = [...new Array(this.inputGlyphCount - 1)].map(
        (_) => p22.uint16
      );
      this.lookaheadGlyphCount = p22.uint16;
      this.lookAheadSequence = [
        ...new Array(this.lookAheadGlyphCount)
      ].map((_) => p22.uint16);
      this.substitutionCount = p22.uint16;
      this.substLookupRecords = [...new Array(this.SubstCount)].map(
        (_) => new SubstLookupRecord(p22)
      );
    }
  };
  var ChainSubClassSetTable = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.chainSubClassRuleCount = p22.uint16;
      this.chainSubClassRuleOffsets = [
        ...new Array(this.chainSubClassRuleCount)
      ].map((_) => p22.Offset16);
    }
    getSubClass(index) {
      let p22 = this.parser;
      p22.currentPosition = this.start + this.chainSubRuleOffsets[index];
      return new ChainSubClassRuleTable(p22);
    }
  };
  var ChainSubClassRuleTable = class {
    constructor(p22) {
      this.backtrackGlyphCount = p22.uint16;
      this.backtrackSequence = [
        ...new Array(this.backtrackGlyphCount)
      ].map((_) => p22.uint16);
      this.inputGlyphCount = p22.uint16;
      this.inputSequence = [...new Array(this.inputGlyphCount - 1)].map(
        (_) => p22.uint16
      );
      this.lookaheadGlyphCount = p22.uint16;
      this.lookAheadSequence = [
        ...new Array(this.lookAheadGlyphCount)
      ].map((_) => p22.uint16);
      this.substitutionCount = p22.uint16;
      this.substLookupRecords = [
        ...new Array(this.substitutionCount)
      ].map((_) => new SequenceLookupRecord(p22));
    }
  };
  var SequenceLookupRecord = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.sequenceIndex = p22.uint16;
      this.lookupListIndex = p22.uint16;
    }
  };
  var LookupType7$1 = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.substFormat = p22.uint16;
      this.extensionLookupType = p22.uint16;
      this.extensionOffset = p22.Offset32;
    }
  };
  var LookupType8$1 = class extends LookupType$1 {
    constructor(p22) {
      super(p22);
      this.backtrackGlyphCount = p22.uint16;
      this.backtrackCoverageOffsets = [
        ...new Array(this.backtrackGlyphCount)
      ].map((_) => p22.Offset16);
      this.lookaheadGlyphCount = p22.uint16;
      this.lookaheadCoverageOffsets = [
        new Array(this.lookaheadGlyphCount)
      ].map((_) => p22.Offset16);
      this.glyphCount = p22.uint16;
      this.substituteGlyphIDs = [...new Array(this.glyphCount)].map(
        (_) => p22.uint16
      );
    }
  };
  var GSUBtables = {
    buildSubtable: function(type, p22) {
      const subtable = new [
        void 0,
        LookupType1$1,
        LookupType2$1,
        LookupType3$1,
        LookupType4$1,
        LookupType5$1,
        LookupType6$1,
        LookupType7$1,
        LookupType8$1
      ][type](p22);
      subtable.type = type;
      return subtable;
    }
  };
  var LookupType = class extends ParsedData {
    constructor(p22) {
      super(p22);
    }
  };
  var LookupType1 = class extends LookupType {
    constructor(p22) {
      super(p22);
      console.log(`lookup type 1`);
    }
  };
  var LookupType2 = class extends LookupType {
    constructor(p22) {
      super(p22);
      console.log(`lookup type 2`);
    }
  };
  var LookupType3 = class extends LookupType {
    constructor(p22) {
      super(p22);
      console.log(`lookup type 3`);
    }
  };
  var LookupType4 = class extends LookupType {
    constructor(p22) {
      super(p22);
      console.log(`lookup type 4`);
    }
  };
  var LookupType5 = class extends LookupType {
    constructor(p22) {
      super(p22);
      console.log(`lookup type 5`);
    }
  };
  var LookupType6 = class extends LookupType {
    constructor(p22) {
      super(p22);
      console.log(`lookup type 6`);
    }
  };
  var LookupType7 = class extends LookupType {
    constructor(p22) {
      super(p22);
      console.log(`lookup type 7`);
    }
  };
  var LookupType8 = class extends LookupType {
    constructor(p22) {
      super(p22);
      console.log(`lookup type 8`);
    }
  };
  var LookupType9 = class extends LookupType {
    constructor(p22) {
      super(p22);
      console.log(`lookup type 9`);
    }
  };
  var GPOStables = {
    buildSubtable: function(type, p22) {
      const subtable = new [
        void 0,
        LookupType1,
        LookupType2,
        LookupType3,
        LookupType4,
        LookupType5,
        LookupType6,
        LookupType7,
        LookupType8,
        LookupType9
      ][type](p22);
      subtable.type = type;
      return subtable;
    }
  };
  var LookupList = class extends ParsedData {
    static EMPTY = { lookupCount: 0, lookups: [] };
    constructor(p22) {
      super(p22);
      this.lookupCount = p22.uint16;
      this.lookups = [...new Array(this.lookupCount)].map(
        (_) => p22.Offset16
      );
    }
  };
  var LookupTable = class extends ParsedData {
    constructor(p22, type) {
      super(p22);
      this.ctType = type;
      this.lookupType = p22.uint16;
      this.lookupFlag = p22.uint16;
      this.subTableCount = p22.uint16;
      this.subtableOffsets = [...new Array(this.subTableCount)].map(
        (_) => p22.Offset16
      );
      this.markFilteringSet = p22.uint16;
    }
    get rightToLeft() {
      return this.lookupFlag & true;
    }
    get ignoreBaseGlyphs() {
      return this.lookupFlag & true;
    }
    get ignoreLigatures() {
      return this.lookupFlag & true;
    }
    get ignoreMarks() {
      return this.lookupFlag & true;
    }
    get useMarkFilteringSet() {
      return this.lookupFlag & true;
    }
    get markAttachmentType() {
      return this.lookupFlag & true;
    }
    getSubTable(index) {
      const builder = this.ctType === `GSUB` ? GSUBtables : GPOStables;
      this.parser.currentPosition = this.start + this.subtableOffsets[index];
      return builder.buildSubtable(this.lookupType, this.parser);
    }
  };
  var CommonLayoutTable = class extends SimpleTable {
    constructor(dict, dataview, name2) {
      const { p: p22, tableStart } = super(dict, dataview, name2);
      this.majorVersion = p22.uint16;
      this.minorVersion = p22.uint16;
      this.scriptListOffset = p22.Offset16;
      this.featureListOffset = p22.Offset16;
      this.lookupListOffset = p22.Offset16;
      if (this.majorVersion === 1 && this.minorVersion === 1) {
        this.featureVariationsOffset = p22.Offset32;
      }
      const no_content = !(this.scriptListOffset || this.featureListOffset || this.lookupListOffset);
      lazy$1(this, `scriptList`, () => {
        if (no_content) return ScriptList.EMPTY;
        p22.currentPosition = tableStart + this.scriptListOffset;
        return new ScriptList(p22);
      });
      lazy$1(this, `featureList`, () => {
        if (no_content) return FeatureList.EMPTY;
        p22.currentPosition = tableStart + this.featureListOffset;
        return new FeatureList(p22);
      });
      lazy$1(this, `lookupList`, () => {
        if (no_content) return LookupList.EMPTY;
        p22.currentPosition = tableStart + this.lookupListOffset;
        return new LookupList(p22);
      });
      if (this.featureVariationsOffset) {
        lazy$1(this, `featureVariations`, () => {
          if (no_content) return FeatureVariations.EMPTY;
          p22.currentPosition = tableStart + this.featureVariationsOffset;
          return new FeatureVariations(p22);
        });
      }
    }
    getSupportedScripts() {
      return this.scriptList.scriptRecords.map((r3) => r3.scriptTag);
    }
    getScriptTable(scriptTag) {
      let record = this.scriptList.scriptRecords.find(
        (r3) => r3.scriptTag === scriptTag
      );
      this.parser.currentPosition = this.scriptList.start + record.scriptOffset;
      let table = new ScriptTable(this.parser);
      table.scriptTag = scriptTag;
      return table;
    }
    ensureScriptTable(arg) {
      if (typeof arg === "string") {
        return this.getScriptTable(arg);
      }
      return arg;
    }
    getSupportedLangSys(scriptTable) {
      scriptTable = this.ensureScriptTable(scriptTable);
      const hasDefault = scriptTable.defaultLangSys !== 0;
      const supported = scriptTable.langSysRecords.map(
        (l2) => l2.langSysTag
      );
      if (hasDefault) supported.unshift(`dflt`);
      return supported;
    }
    getDefaultLangSysTable(scriptTable) {
      scriptTable = this.ensureScriptTable(scriptTable);
      let offset = scriptTable.defaultLangSys;
      if (offset !== 0) {
        this.parser.currentPosition = scriptTable.start + offset;
        let table = new LangSysTable(this.parser);
        table.langSysTag = ``;
        table.defaultForScript = scriptTable.scriptTag;
        return table;
      }
    }
    getLangSysTable(scriptTable, langSysTag = `dflt`) {
      if (langSysTag === `dflt`)
        return this.getDefaultLangSysTable(scriptTable);
      scriptTable = this.ensureScriptTable(scriptTable);
      let record = scriptTable.langSysRecords.find(
        (l2) => l2.langSysTag === langSysTag
      );
      this.parser.currentPosition = scriptTable.start + record.langSysOffset;
      let table = new LangSysTable(this.parser);
      table.langSysTag = langSysTag;
      return table;
    }
    getFeatures(langSysTable) {
      return langSysTable.featureIndices.map(
        (index) => this.getFeature(index)
      );
    }
    getFeature(indexOrTag) {
      let record;
      if (parseInt(indexOrTag) == indexOrTag) {
        record = this.featureList.featureRecords[indexOrTag];
      } else {
        record = this.featureList.featureRecords.find(
          (f2) => f2.featureTag === indexOrTag
        );
      }
      if (!record) return;
      this.parser.currentPosition = this.featureList.start + record.featureOffset;
      let table = new FeatureTable(this.parser);
      table.featureTag = record.featureTag;
      return table;
    }
    getLookups(featureTable) {
      return featureTable.lookupListIndices.map(
        (index) => this.getLookup(index)
      );
    }
    getLookup(lookupIndex, type) {
      let lookupOffset = this.lookupList.lookups[lookupIndex];
      this.parser.currentPosition = this.lookupList.start + lookupOffset;
      return new LookupTable(this.parser, type);
    }
  };
  var GSUB = class extends CommonLayoutTable {
    constructor(dict, dataview) {
      super(dict, dataview, `GSUB`);
    }
    getLookup(lookupIndex) {
      return super.getLookup(lookupIndex, `GSUB`);
    }
  };
  var GSUB$1 = Object.freeze({ __proto__: null, GSUB });
  var GPOS = class extends CommonLayoutTable {
    constructor(dict, dataview) {
      super(dict, dataview, `GPOS`);
    }
    getLookup(lookupIndex) {
      return super.getLookup(lookupIndex, `GPOS`);
    }
  };
  var GPOS$1 = Object.freeze({ __proto__: null, GPOS });
  var SVG67 = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint16;
      this.offsetToSVGDocumentList = p22.Offset32;
      p22.currentPosition = this.tableStart + this.offsetToSVGDocumentList;
      this.documentList = new SVGDocumentList(p22);
    }
  };
  var SVGDocumentList = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.numEntries = p22.uint16;
      this.documentRecords = [...new Array(this.numEntries)].map(
        (_) => new SVGDocumentRecord(p22)
      );
    }
    getDocument(documentID) {
      let record = this.documentRecords[documentID];
      if (!record) return "";
      let offset = this.start + record.svgDocOffset;
      this.parser.currentPosition = offset;
      return this.parser.readBytes(record.svgDocLength);
    }
    getDocumentForGlyph(glyphID) {
      let id = this.documentRecords.findIndex(
        (d2) => d2.startGlyphID <= glyphID && glyphID <= d2.endGlyphID
      );
      if (id === -1) return "";
      return this.getDocument(id);
    }
  };
  var SVGDocumentRecord = class {
    constructor(p22) {
      this.startGlyphID = p22.uint16;
      this.endGlyphID = p22.uint16;
      this.svgDocOffset = p22.Offset32;
      this.svgDocLength = p22.uint32;
    }
  };
  var SVG$1 = Object.freeze({ __proto__: null, SVG: SVG67 });
  var fvar = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.majorVersion = p22.uint16;
      this.minorVersion = p22.uint16;
      this.axesArrayOffset = p22.Offset16;
      p22.uint16;
      this.axisCount = p22.uint16;
      this.axisSize = p22.uint16;
      this.instanceCount = p22.uint16;
      this.instanceSize = p22.uint16;
      const axisStart = this.tableStart + this.axesArrayOffset;
      lazy$1(this, `axes`, () => {
        p22.currentPosition = axisStart;
        return [...new Array(this.axisCount)].map(
          (_) => new VariationAxisRecord(p22)
        );
      });
      const instanceStart = axisStart + this.axisCount * this.axisSize;
      lazy$1(this, `instances`, () => {
        let instances = [];
        for (let i2 = 0; i2 < this.instanceCount; i2++) {
          p22.currentPosition = instanceStart + i2 * this.instanceSize;
          instances.push(
            new InstanceRecord(p22, this.axisCount, this.instanceSize)
          );
        }
        return instances;
      });
    }
    getSupportedAxes() {
      return this.axes.map((a2) => a2.tag);
    }
    getAxis(name2) {
      return this.axes.find((a2) => a2.tag === name2);
    }
  };
  var VariationAxisRecord = class {
    constructor(p22) {
      this.tag = p22.tag;
      this.minValue = p22.fixed;
      this.defaultValue = p22.fixed;
      this.maxValue = p22.fixed;
      this.flags = p22.flags(16);
      this.axisNameID = p22.uint16;
    }
  };
  var InstanceRecord = class {
    constructor(p22, axisCount, size) {
      let start2 = p22.currentPosition;
      this.subfamilyNameID = p22.uint16;
      p22.uint16;
      this.coordinates = [...new Array(axisCount)].map(
        (_) => p22.fixed
      );
      if (p22.currentPosition - start2 < size) {
        this.postScriptNameID = p22.uint16;
      }
    }
  };
  var fvar$1 = Object.freeze({ __proto__: null, fvar });
  var cvt = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      const n2 = dict.length / 2;
      lazy$1(
        this,
        `items`,
        () => [...new Array(n2)].map((_) => p22.fword)
      );
    }
  };
  var cvt$1 = Object.freeze({ __proto__: null, cvt });
  var fpgm = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      lazy$1(
        this,
        `instructions`,
        () => [...new Array(dict.length)].map((_) => p22.uint8)
      );
    }
  };
  var fpgm$1 = Object.freeze({ __proto__: null, fpgm });
  var gasp = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint16;
      this.numRanges = p22.uint16;
      const getter = () => [...new Array(this.numRanges)].map(
        (_) => new GASPRange(p22)
      );
      lazy$1(this, `gaspRanges`, getter);
    }
  };
  var GASPRange = class {
    constructor(p22) {
      this.rangeMaxPPEM = p22.uint16;
      this.rangeGaspBehavior = p22.uint16;
    }
  };
  var gasp$1 = Object.freeze({ __proto__: null, gasp });
  var glyf = class extends SimpleTable {
    constructor(dict, dataview) {
      super(dict, dataview);
    }
    getGlyphData(offset, length) {
      this.parser.currentPosition = this.tableStart + offset;
      return this.parser.readBytes(length);
    }
  };
  var glyf$1 = Object.freeze({ __proto__: null, glyf });
  var loca = class extends SimpleTable {
    constructor(dict, dataview, tables) {
      const { p: p22 } = super(dict, dataview);
      const n2 = tables.maxp.numGlyphs + 1;
      if (tables.head.indexToLocFormat === 0) {
        this.x2 = true;
        lazy$1(
          this,
          `offsets`,
          () => [...new Array(n2)].map((_) => p22.Offset16)
        );
      } else {
        lazy$1(
          this,
          `offsets`,
          () => [...new Array(n2)].map((_) => p22.Offset32)
        );
      }
    }
    getGlyphDataOffsetAndLength(glyphID) {
      let offset = this.offsets[glyphID] * this.x2 ? 2 : 1;
      let nextOffset = this.offsets[glyphID + 1] * this.x2 ? 2 : 1;
      return { offset, length: nextOffset - offset };
    }
  };
  var loca$1 = Object.freeze({ __proto__: null, loca });
  var prep = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      lazy$1(
        this,
        `instructions`,
        () => [...new Array(dict.length)].map((_) => p22.uint8)
      );
    }
  };
  var prep$1 = Object.freeze({ __proto__: null, prep });
  var CFF = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      lazy$1(this, `data`, () => p22.readBytes());
    }
  };
  var CFF$1 = Object.freeze({ __proto__: null, CFF });
  var CFF2 = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      lazy$1(this, `data`, () => p22.readBytes());
    }
  };
  var CFF2$1 = Object.freeze({ __proto__: null, CFF2 });
  var VORG = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.majorVersion = p22.uint16;
      this.minorVersion = p22.uint16;
      this.defaultVertOriginY = p22.int16;
      this.numVertOriginYMetrics = p22.uint16;
      lazy$1(
        this,
        `vertORiginYMetrics`,
        () => [...new Array(this.numVertOriginYMetrics)].map(
          (_) => new VertOriginYMetric(p22)
        )
      );
    }
  };
  var VertOriginYMetric = class {
    constructor(p22) {
      this.glyphIndex = p22.uint16;
      this.vertOriginY = p22.int16;
    }
  };
  var VORG$1 = Object.freeze({ __proto__: null, VORG });
  var BitmapSize = class {
    constructor(p22) {
      this.indexSubTableArrayOffset = p22.Offset32;
      this.indexTablesSize = p22.uint32;
      this.numberofIndexSubTables = p22.uint32;
      this.colorRef = p22.uint32;
      this.hori = new SbitLineMetrics(p22);
      this.vert = new SbitLineMetrics(p22);
      this.startGlyphIndex = p22.uint16;
      this.endGlyphIndex = p22.uint16;
      this.ppemX = p22.uint8;
      this.ppemY = p22.uint8;
      this.bitDepth = p22.uint8;
      this.flags = p22.int8;
    }
  };
  var BitmapScale = class {
    constructor(p22) {
      this.hori = new SbitLineMetrics(p22);
      this.vert = new SbitLineMetrics(p22);
      this.ppemX = p22.uint8;
      this.ppemY = p22.uint8;
      this.substitutePpemX = p22.uint8;
      this.substitutePpemY = p22.uint8;
    }
  };
  var SbitLineMetrics = class {
    constructor(p22) {
      this.ascender = p22.int8;
      this.descender = p22.int8;
      this.widthMax = p22.uint8;
      this.caretSlopeNumerator = p22.int8;
      this.caretSlopeDenominator = p22.int8;
      this.caretOffset = p22.int8;
      this.minOriginSB = p22.int8;
      this.minAdvanceSB = p22.int8;
      this.maxBeforeBL = p22.int8;
      this.minAfterBL = p22.int8;
      this.pad1 = p22.int8;
      this.pad2 = p22.int8;
    }
  };
  var EBLC = class extends SimpleTable {
    constructor(dict, dataview, name2) {
      const { p: p22 } = super(dict, dataview, name2);
      this.majorVersion = p22.uint16;
      this.minorVersion = p22.uint16;
      this.numSizes = p22.uint32;
      lazy$1(
        this,
        `bitMapSizes`,
        () => [...new Array(this.numSizes)].map(
          (_) => new BitmapSize(p22)
        )
      );
    }
  };
  var EBLC$1 = Object.freeze({ __proto__: null, EBLC });
  var EBDT = class extends SimpleTable {
    constructor(dict, dataview, name2) {
      const { p: p22 } = super(dict, dataview, name2);
      this.majorVersion = p22.uint16;
      this.minorVersion = p22.uint16;
    }
  };
  var EBDT$1 = Object.freeze({ __proto__: null, EBDT });
  var EBSC = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.majorVersion = p22.uint16;
      this.minorVersion = p22.uint16;
      this.numSizes = p22.uint32;
      lazy$1(
        this,
        `bitmapScales`,
        () => [...new Array(this.numSizes)].map(
          (_) => new BitmapScale(p22)
        )
      );
    }
  };
  var EBSC$1 = Object.freeze({ __proto__: null, EBSC });
  var CBLC = class extends EBLC {
    constructor(dict, dataview) {
      super(dict, dataview, `CBLC`);
    }
  };
  var CBLC$1 = Object.freeze({ __proto__: null, CBLC });
  var CBDT = class extends EBDT {
    constructor(dict, dataview) {
      super(dict, dataview, `CBDT`);
    }
  };
  var CBDT$1 = Object.freeze({ __proto__: null, CBDT });
  var sbix = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint16;
      this.flags = p22.flags(16);
      this.numStrikes = p22.uint32;
      lazy$1(
        this,
        `strikeOffsets`,
        () => [...new Array(this.numStrikes)].map((_) => p22.Offset32)
      );
    }
  };
  var sbix$1 = Object.freeze({ __proto__: null, sbix });
  var COLR = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint16;
      this.numBaseGlyphRecords = p22.uint16;
      this.baseGlyphRecordsOffset = p22.Offset32;
      this.layerRecordsOffset = p22.Offset32;
      this.numLayerRecords = p22.uint16;
    }
    getBaseGlyphRecord(glyphID) {
      let start2 = this.tableStart + this.baseGlyphRecordsOffset;
      this.parser.currentPosition = start2;
      let first = new BaseGlyphRecord(this.parser);
      let firstID = first.gID;
      let end = this.tableStart + this.layerRecordsOffset - 6;
      this.parser.currentPosition = end;
      let last = new BaseGlyphRecord(this.parser);
      let lastID = last.gID;
      if (firstID === glyphID) return first;
      if (lastID === glyphID) return last;
      while (true) {
        if (start2 === end) break;
        let mid = start2 + (end - start2) / 12;
        this.parser.currentPosition = mid;
        let middle = new BaseGlyphRecord(this.parser);
        let midID = middle.gID;
        if (midID === glyphID) return middle;
        else if (midID > glyphID) {
          end = mid;
        } else if (midID < glyphID) {
          start2 = mid;
        }
      }
      return false;
    }
    getLayers(glyphID) {
      let record = this.getBaseGlyphRecord(glyphID);
      this.parser.currentPosition = this.tableStart + this.layerRecordsOffset + 4 * record.firstLayerIndex;
      return [...new Array(record.numLayers)].map(
        (_) => new LayerRecord(p)
      );
    }
  };
  var BaseGlyphRecord = class {
    constructor(p22) {
      this.gID = p22.uint16;
      this.firstLayerIndex = p22.uint16;
      this.numLayers = p22.uint16;
    }
  };
  var LayerRecord = class {
    constructor(p22) {
      this.gID = p22.uint16;
      this.paletteIndex = p22.uint16;
    }
  };
  var COLR$1 = Object.freeze({ __proto__: null, COLR });
  var CPAL = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint16;
      this.numPaletteEntries = p22.uint16;
      const numPalettes = this.numPalettes = p22.uint16;
      this.numColorRecords = p22.uint16;
      this.offsetFirstColorRecord = p22.Offset32;
      this.colorRecordIndices = [...new Array(this.numPalettes)].map(
        (_) => p22.uint16
      );
      lazy$1(this, `colorRecords`, () => {
        p22.currentPosition = this.tableStart + this.offsetFirstColorRecord;
        return [...new Array(this.numColorRecords)].map(
          (_) => new ColorRecord(p22)
        );
      });
      if (this.version === 1) {
        this.offsetPaletteTypeArray = p22.Offset32;
        this.offsetPaletteLabelArray = p22.Offset32;
        this.offsetPaletteEntryLabelArray = p22.Offset32;
        lazy$1(this, `paletteTypeArray`, () => {
          p22.currentPosition = this.tableStart + this.offsetPaletteTypeArray;
          return new PaletteTypeArray(p22, numPalettes);
        });
        lazy$1(this, `paletteLabelArray`, () => {
          p22.currentPosition = this.tableStart + this.offsetPaletteLabelArray;
          return new PaletteLabelsArray(p22, numPalettes);
        });
        lazy$1(this, `paletteEntryLabelArray`, () => {
          p22.currentPosition = this.tableStart + this.offsetPaletteEntryLabelArray;
          return new PaletteEntryLabelArray(p22, numPalettes);
        });
      }
    }
  };
  var ColorRecord = class {
    constructor(p22) {
      this.blue = p22.uint8;
      this.green = p22.uint8;
      this.red = p22.uint8;
      this.alpha = p22.uint8;
    }
  };
  var PaletteTypeArray = class {
    constructor(p22, numPalettes) {
      this.paletteTypes = [...new Array(numPalettes)].map(
        (_) => p22.uint32
      );
    }
  };
  var PaletteLabelsArray = class {
    constructor(p22, numPalettes) {
      this.paletteLabels = [...new Array(numPalettes)].map(
        (_) => p22.uint16
      );
    }
  };
  var PaletteEntryLabelArray = class {
    constructor(p22, numPalettes) {
      this.paletteEntryLabels = [...new Array(numPalettes)].map(
        (_) => p22.uint16
      );
    }
  };
  var CPAL$1 = Object.freeze({ __proto__: null, CPAL });
  var DSIG = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint32;
      this.numSignatures = p22.uint16;
      this.flags = p22.uint16;
      this.signatureRecords = [...new Array(this.numSignatures)].map(
        (_) => new SignatureRecord(p22)
      );
    }
    getData(signatureID) {
      const record = this.signatureRecords[signatureID];
      this.parser.currentPosition = this.tableStart + record.offset;
      return new SignatureBlockFormat1(this.parser);
    }
  };
  var SignatureRecord = class {
    constructor(p22) {
      this.format = p22.uint32;
      this.length = p22.uint32;
      this.offset = p22.Offset32;
    }
  };
  var SignatureBlockFormat1 = class {
    constructor(p22) {
      p22.uint16;
      p22.uint16;
      this.signatureLength = p22.uint32;
      this.signature = p22.readBytes(this.signatureLength);
    }
  };
  var DSIG$1 = Object.freeze({ __proto__: null, DSIG });
  var hdmx = class extends SimpleTable {
    constructor(dict, dataview, tables) {
      const { p: p22 } = super(dict, dataview);
      const numGlyphs = tables.hmtx.numGlyphs;
      this.version = p22.uint16;
      this.numRecords = p22.int16;
      this.sizeDeviceRecord = p22.int32;
      this.records = [...new Array(numRecords)].map(
        (_) => new DeviceRecord(p22, numGlyphs)
      );
    }
  };
  var DeviceRecord = class {
    constructor(p22, numGlyphs) {
      this.pixelSize = p22.uint8;
      this.maxWidth = p22.uint8;
      this.widths = p22.readBytes(numGlyphs);
    }
  };
  var hdmx$1 = Object.freeze({ __proto__: null, hdmx });
  var kern = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint16;
      this.nTables = p22.uint16;
      lazy$1(this, `tables`, () => {
        let offset = this.tableStart + 4;
        const tables = [];
        for (let i2 = 0; i2 < this.nTables; i2++) {
          p22.currentPosition = offset;
          let subtable = new KernSubTable(p22);
          tables.push(subtable);
          offset += subtable;
        }
        return tables;
      });
    }
  };
  var KernSubTable = class {
    constructor(p22) {
      this.version = p22.uint16;
      this.length = p22.uint16;
      this.coverage = p22.flags(8);
      this.format = p22.uint8;
      if (this.format === 0) {
        this.nPairs = p22.uint16;
        this.searchRange = p22.uint16;
        this.entrySelector = p22.uint16;
        this.rangeShift = p22.uint16;
        lazy$1(
          this,
          `pairs`,
          () => [...new Array(this.nPairs)].map((_) => new Pair(p22))
        );
      }
      if (this.format === 2) {
        console.warn(
          `Kern subtable format 2 is not supported: this parser currently only parses universal table data.`
        );
      }
    }
    get horizontal() {
      return this.coverage[0];
    }
    get minimum() {
      return this.coverage[1];
    }
    get crossstream() {
      return this.coverage[2];
    }
    get override() {
      return this.coverage[3];
    }
  };
  var Pair = class {
    constructor(p22) {
      this.left = p22.uint16;
      this.right = p22.uint16;
      this.value = p22.fword;
    }
  };
  var kern$1 = Object.freeze({ __proto__: null, kern });
  var LTSH = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint16;
      this.numGlyphs = p22.uint16;
      this.yPels = p22.readBytes(this.numGlyphs);
    }
  };
  var LTSH$1 = Object.freeze({ __proto__: null, LTSH });
  var MERG = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint16;
      this.mergeClassCount = p22.uint16;
      this.mergeDataOffset = p22.Offset16;
      this.classDefCount = p22.uint16;
      this.offsetToClassDefOffsets = p22.Offset16;
      lazy$1(
        this,
        `mergeEntryMatrix`,
        () => [...new Array(this.mergeClassCount)].map(
          (_) => p22.readBytes(this.mergeClassCount)
        )
      );
      console.warn(`Full MERG parsing is currently not supported.`);
      console.warn(
        `If you need this table parsed, please file an issue, or better yet, a PR.`
      );
    }
  };
  var MERG$1 = Object.freeze({ __proto__: null, MERG });
  var meta = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint32;
      this.flags = p22.uint32;
      p22.uint32;
      this.dataMapsCount = p22.uint32;
      this.dataMaps = [...new Array(this.dataMapsCount)].map(
        (_) => new DataMap(this.tableStart, p22)
      );
    }
  };
  var DataMap = class {
    constructor(tableStart, p22) {
      this.tableStart = tableStart;
      this.parser = p22;
      this.tag = p22.tag;
      this.dataOffset = p22.Offset32;
      this.dataLength = p22.uint32;
    }
    getData() {
      this.parser.currentField = this.tableStart + this.dataOffset;
      return this.parser.readBytes(this.dataLength);
    }
  };
  var meta$1 = Object.freeze({ __proto__: null, meta });
  var PCLT = class extends SimpleTable {
    constructor(dict, dataview) {
      super(dict, dataview);
      console.warn(
        `This font uses a PCLT table, which is currently not supported by this parser.`
      );
      console.warn(
        `If you need this table parsed, please file an issue, or better yet, a PR.`
      );
    }
  };
  var PCLT$1 = Object.freeze({ __proto__: null, PCLT });
  var VDMX = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint16;
      this.numRecs = p22.uint16;
      this.numRatios = p22.uint16;
      this.ratRanges = [...new Array(this.numRatios)].map(
        (_) => new RatioRange(p22)
      );
      this.offsets = [...new Array(this.numRatios)].map(
        (_) => p22.Offset16
      );
      this.VDMXGroups = [...new Array(this.numRecs)].map(
        (_) => new VDMXGroup(p22)
      );
    }
  };
  var RatioRange = class {
    constructor(p22) {
      this.bCharSet = p22.uint8;
      this.xRatio = p22.uint8;
      this.yStartRatio = p22.uint8;
      this.yEndRatio = p22.uint8;
    }
  };
  var VDMXGroup = class {
    constructor(p22) {
      this.recs = p22.uint16;
      this.startsz = p22.uint8;
      this.endsz = p22.uint8;
      this.records = [...new Array(this.recs)].map(
        (_) => new vTable(p22)
      );
    }
  };
  var vTable = class {
    constructor(p22) {
      this.yPelHeight = p22.uint16;
      this.yMax = p22.int16;
      this.yMin = p22.int16;
    }
  };
  var VDMX$1 = Object.freeze({ __proto__: null, VDMX });
  var vhea = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.fixed;
      this.ascent = this.vertTypoAscender = p22.int16;
      this.descent = this.vertTypoDescender = p22.int16;
      this.lineGap = this.vertTypoLineGap = p22.int16;
      this.advanceHeightMax = p22.int16;
      this.minTopSideBearing = p22.int16;
      this.minBottomSideBearing = p22.int16;
      this.yMaxExtent = p22.int16;
      this.caretSlopeRise = p22.int16;
      this.caretSlopeRun = p22.int16;
      this.caretOffset = p22.int16;
      this.reserved = p22.int16;
      this.reserved = p22.int16;
      this.reserved = p22.int16;
      this.reserved = p22.int16;
      this.metricDataFormat = p22.int16;
      this.numOfLongVerMetrics = p22.uint16;
      p22.verifyLength();
    }
  };
  var vhea$1 = Object.freeze({ __proto__: null, vhea });
  var vmtx = class extends SimpleTable {
    constructor(dict, dataview, tables) {
      super(dict, dataview);
      const numOfLongVerMetrics = tables.vhea.numOfLongVerMetrics;
      const numGlyphs = tables.maxp.numGlyphs;
      const metricsStart = p.currentPosition;
      lazy(this, `vMetrics`, () => {
        p.currentPosition = metricsStart;
        return [...new Array(numOfLongVerMetrics)].map(
          (_) => new LongVertMetric(p.uint16, p.int16)
        );
      });
      if (numOfLongVerMetrics < numGlyphs) {
        const tsbStart = metricsStart + numOfLongVerMetrics * 4;
        lazy(this, `topSideBearings`, () => {
          p.currentPosition = tsbStart;
          return [...new Array(numGlyphs - numOfLongVerMetrics)].map(
            (_) => p.int16
          );
        });
      }
    }
  };
  var LongVertMetric = class {
    constructor(h2, b2) {
      this.advanceHeight = h2;
      this.topSideBearing = b2;
    }
  };
  var vmtx$1 = Object.freeze({ __proto__: null, vmtx });

  // packages/global-styles-ui/build-module/font-library/utils/make-families-from-faces.mjs
  var import_components38 = __toESM(require_components(), 1);
  var { kebabCase: kebabCase3 } = unlock2(import_components38.privateApis);

  // packages/global-styles-ui/build-module/font-library/upload-fonts.mjs
  var import_jsx_runtime109 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/font-library/modal.mjs
  var import_jsx_runtime110 = __toESM(require_jsx_runtime(), 1);
  var { Tabs } = unlock2(import_components40.privateApis);
  var DEFAULT_TAB = {
    id: "installed-fonts",
    title: (0, import_i18n28._x)("Library", "Font library")
  };
  var UPLOAD_TAB = {
    id: "upload-fonts",
    title: (0, import_i18n28._x)("Upload", "noun")
  };

  // packages/global-styles-ui/build-module/font-family-item.mjs
  var import_i18n29 = __toESM(require_i18n(), 1);
  var import_components41 = __toESM(require_components(), 1);
  var import_element34 = __toESM(require_element(), 1);
  var import_jsx_runtime111 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/font-families.mjs
  var import_jsx_runtime112 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/font-sizes/font-sizes-count.mjs
  var import_i18n31 = __toESM(require_i18n(), 1);
  var import_components43 = __toESM(require_components(), 1);
  var import_jsx_runtime113 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/screen-typography.mjs
  var import_jsx_runtime114 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/screen-typography-element.mjs
  var import_i18n33 = __toESM(require_i18n(), 1);
  var import_components45 = __toESM(require_components(), 1);
  var import_element37 = __toESM(require_element(), 1);

  // packages/global-styles-ui/build-module/typography-panel.mjs
  var import_block_editor8 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime115 = __toESM(require_jsx_runtime(), 1);
  var { useSettingsForBlockElement: useSettingsForBlockElement4, TypographyPanel: StylesTypographyPanel2 } = unlock2(import_block_editor8.privateApis);

  // packages/global-styles-ui/build-module/typography-preview.mjs
  var import_jsx_runtime116 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/screen-typography-element.mjs
  var import_jsx_runtime117 = __toESM(require_jsx_runtime(), 1);
  var elements = {
    text: {
      description: (0, import_i18n33.__)("Manage the fonts used on the site."),
      title: (0, import_i18n33.__)("Text")
    },
    link: {
      description: (0, import_i18n33.__)("Manage the fonts and typography used on the links."),
      title: (0, import_i18n33.__)("Links")
    },
    heading: {
      description: (0, import_i18n33.__)("Manage the fonts and typography used on headings."),
      title: (0, import_i18n33.__)("Headings")
    },
    caption: {
      description: (0, import_i18n33.__)("Manage the fonts and typography used on captions."),
      title: (0, import_i18n33.__)("Captions")
    },
    button: {
      description: (0, import_i18n33.__)("Manage the fonts and typography used on buttons."),
      title: (0, import_i18n33.__)("Buttons")
    }
  };

  // packages/global-styles-ui/build-module/screen-colors.mjs
  var import_i18n35 = __toESM(require_i18n(), 1);
  var import_components48 = __toESM(require_components(), 1);
  var import_block_editor9 = __toESM(require_block_editor(), 1);

  // packages/global-styles-ui/build-module/palette.mjs
  var import_components47 = __toESM(require_components(), 1);
  var import_i18n34 = __toESM(require_i18n(), 1);
  var import_element38 = __toESM(require_element(), 1);

  // packages/global-styles-ui/build-module/color-indicator-wrapper.mjs
  var import_components46 = __toESM(require_components(), 1);
  var import_jsx_runtime118 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/palette.mjs
  var import_jsx_runtime119 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/screen-colors.mjs
  var import_jsx_runtime120 = __toESM(require_jsx_runtime(), 1);
  var { useSettingsForBlockElement: useSettingsForBlockElement5, ColorPanel: StylesColorPanel2 } = unlock2(
    import_block_editor9.privateApis
  );

  // packages/global-styles-ui/build-module/screen-color-palette.mjs
  var import_i18n38 = __toESM(require_i18n(), 1);
  var import_components53 = __toESM(require_components(), 1);

  // packages/global-styles-ui/build-module/color-palette-panel.mjs
  var import_compose6 = __toESM(require_compose(), 1);
  var import_components51 = __toESM(require_components(), 1);
  var import_i18n36 = __toESM(require_i18n(), 1);

  // packages/global-styles-ui/build-module/variations/variations-color.mjs
  var import_components50 = __toESM(require_components(), 1);

  // packages/global-styles-ui/build-module/preview-colors.mjs
  var import_components49 = __toESM(require_components(), 1);

  // packages/global-styles-ui/build-module/preset-colors.mjs
  var import_jsx_runtime121 = __toESM(require_jsx_runtime(), 1);
  function PresetColors() {
    const { paletteColors } = useStylesPreviewColors();
    return paletteColors.slice(0, 4).map(({ slug, color }, index) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
      "div",
      {
        style: {
          flexGrow: 1,
          height: "100%",
          background: color
        }
      },
      `${slug}-${index}`
    ));
  }

  // packages/global-styles-ui/build-module/preview-colors.mjs
  var import_jsx_runtime122 = __toESM(require_jsx_runtime(), 1);
  var firstFrameVariants2 = {
    start: {
      scale: 1,
      opacity: 1
    },
    hover: {
      scale: 0,
      opacity: 0
    }
  };
  var StylesPreviewColors = ({
    label,
    isFocused,
    withHoverView
  }) => {
    return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
      preview_wrapper_default,
      {
        label,
        isFocused,
        withHoverView,
        children: ({ key }) => /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
          import_components49.__unstableMotion.div,
          {
            variants: firstFrameVariants2,
            style: {
              height: "100%",
              overflow: "hidden"
            },
            children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
              import_components49.__experimentalHStack,
              {
                spacing: 0,
                justify: "center",
                style: {
                  height: "100%",
                  overflow: "hidden"
                },
                children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(PresetColors, {})
              }
            )
          },
          key
        )
      }
    );
  };
  var preview_colors_default = StylesPreviewColors;

  // packages/global-styles-ui/build-module/variations/variations-color.mjs
  var import_jsx_runtime123 = __toESM(require_jsx_runtime(), 1);
  var propertiesToFilter2 = ["color"];
  function ColorVariations({
    title,
    gap = 2
  }) {
    const colorVariations = useCurrentMergeThemeStyleVariationsWithUserConfig(propertiesToFilter2);
    if (colorVariations?.length <= 1) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(import_components50.__experimentalVStack, { spacing: 3, children: [
      title && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Subtitle, { level: 3, children: title }),
      /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_components50.__experimentalGrid, { gap, children: colorVariations.map((variation, index) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
        Variation,
        {
          variation,
          isPill: true,
          properties: propertiesToFilter2,
          showTooltip: true,
          children: () => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(preview_colors_default, {})
        },
        index
      )) })
    ] });
  }

  // packages/global-styles-ui/build-module/color-palette-panel.mjs
  var import_jsx_runtime124 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/gradients-palette-panel.mjs
  var import_compose7 = __toESM(require_compose(), 1);
  var import_components52 = __toESM(require_components(), 1);
  var import_i18n37 = __toESM(require_i18n(), 1);
  var import_jsx_runtime125 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/screen-color-palette.mjs
  var import_jsx_runtime126 = __toESM(require_jsx_runtime(), 1);
  var { Tabs: Tabs2 } = unlock2(import_components53.privateApis);

  // packages/global-styles-ui/build-module/screen-background.mjs
  var import_i18n39 = __toESM(require_i18n(), 1);
  var import_block_editor11 = __toESM(require_block_editor(), 1);
  var import_components54 = __toESM(require_components(), 1);

  // packages/global-styles-ui/build-module/background-panel.mjs
  var import_block_editor10 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime127 = __toESM(require_jsx_runtime(), 1);
  var { BackgroundPanel: StylesBackgroundPanel2 } = unlock2(
    import_block_editor10.privateApis
  );

  // packages/global-styles-ui/build-module/screen-background.mjs
  var import_jsx_runtime128 = __toESM(require_jsx_runtime(), 1);
  var { useHasBackgroundPanel: useHasBackgroundPanel3 } = unlock2(import_block_editor11.privateApis);

  // packages/global-styles-ui/build-module/shadows-panel.mjs
  var import_components56 = __toESM(require_components(), 1);
  var import_i18n41 = __toESM(require_i18n(), 1);
  var import_element39 = __toESM(require_element(), 1);

  // packages/global-styles-ui/build-module/confirm-reset-shadow-dialog.mjs
  var import_components55 = __toESM(require_components(), 1);
  var import_i18n40 = __toESM(require_i18n(), 1);
  var import_jsx_runtime129 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/shadows-panel.mjs
  var import_jsx_runtime130 = __toESM(require_jsx_runtime(), 1);
  var { Menu } = unlock2(import_components56.privateApis);

  // packages/global-styles-ui/build-module/shadows-edit-panel.mjs
  var import_components57 = __toESM(require_components(), 1);
  var import_i18n42 = __toESM(require_i18n(), 1);
  var import_element40 = __toESM(require_element(), 1);
  var import_jsx_runtime131 = __toESM(require_jsx_runtime(), 1);
  var { Menu: Menu2 } = unlock2(import_components57.privateApis);
  var customShadowMenuItems = [
    {
      label: (0, import_i18n42.__)("Rename"),
      action: "rename"
    },
    {
      label: (0, import_i18n42.__)("Delete"),
      action: "delete"
    }
  ];
  var presetShadowMenuItems = [
    {
      label: (0, import_i18n42.__)("Reset"),
      action: "reset"
    }
  ];

  // packages/global-styles-ui/build-module/screen-shadows.mjs
  var import_jsx_runtime132 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/screen-layout.mjs
  var import_i18n43 = __toESM(require_i18n(), 1);
  var import_block_editor13 = __toESM(require_block_editor(), 1);

  // packages/global-styles-ui/build-module/dimensions-panel.mjs
  var import_block_editor12 = __toESM(require_block_editor(), 1);
  var import_element41 = __toESM(require_element(), 1);
  var import_jsx_runtime133 = __toESM(require_jsx_runtime(), 1);
  var { useSettingsForBlockElement: useSettingsForBlockElement6, DimensionsPanel: StylesDimensionsPanel2 } = unlock2(import_block_editor12.privateApis);

  // packages/global-styles-ui/build-module/screen-layout.mjs
  var import_jsx_runtime134 = __toESM(require_jsx_runtime(), 1);
  var { useHasDimensionsPanel: useHasDimensionsPanel4, useSettingsForBlockElement: useSettingsForBlockElement7 } = unlock2(
    import_block_editor13.privateApis
  );

  // packages/global-styles-ui/build-module/screen-style-variations.mjs
  var import_components60 = __toESM(require_components(), 1);
  var import_i18n46 = __toESM(require_i18n(), 1);

  // packages/global-styles-ui/build-module/style-variations-content.mjs
  var import_i18n45 = __toESM(require_i18n(), 1);
  var import_components59 = __toESM(require_components(), 1);

  // packages/global-styles-ui/build-module/style-variations-container.mjs
  var import_core_data22 = __toESM(require_core_data(), 1);
  var import_data26 = __toESM(require_data(), 1);
  var import_element42 = __toESM(require_element(), 1);
  var import_components58 = __toESM(require_components(), 1);
  var import_i18n44 = __toESM(require_i18n(), 1);
  var import_jsx_runtime135 = __toESM(require_jsx_runtime(), 1);
  function StyleVariationsContainer({
    gap = 2
  }) {
    const { user } = (0, import_element42.useContext)(GlobalStylesContext);
    const userStyles = user?.styles;
    const variations = (0, import_data26.useSelect)((select3) => {
      const result = select3(
        import_core_data22.store
      ).__experimentalGetCurrentThemeGlobalStylesVariations();
      return Array.isArray(result) ? result : void 0;
    }, []);
    const fullStyleVariations = variations?.filter(
      (variation) => {
        return !isVariationWithProperties(variation, ["color"]) && !isVariationWithProperties(variation, [
          "typography",
          "spacing"
        ]);
      }
    );
    const themeVariations = (0, import_element42.useMemo)(() => {
      const withEmptyVariation = [
        {
          title: (0, import_i18n44.__)("Default"),
          settings: {},
          styles: {}
        },
        ...fullStyleVariations ?? []
      ];
      return [
        ...withEmptyVariation.map((variation) => {
          const blockStyles = variation?.styles?.blocks ? { ...variation.styles.blocks } : {};
          if (userStyles?.blocks) {
            Object.keys(userStyles.blocks).forEach((blockName) => {
              if (userStyles.blocks?.[blockName]?.css) {
                const variationBlockStyles = blockStyles[blockName] || {};
                const customCSS = {
                  css: `${blockStyles[blockName]?.css || ""} ${userStyles.blocks?.[blockName]?.css?.trim() || ""}`
                };
                blockStyles[blockName] = {
                  ...variationBlockStyles,
                  ...customCSS
                };
              }
            });
          }
          const css = userStyles?.css || variation.styles?.css ? {
            css: `${variation.styles?.css || ""} ${userStyles?.css || ""}`
          } : {};
          const blocks = Object.keys(blockStyles).length > 0 ? { blocks: blockStyles } : {};
          const styles = {
            ...variation.styles,
            ...css,
            ...blocks
          };
          return {
            ...variation,
            settings: variation.settings ?? {},
            styles
          };
        })
      ];
    }, [fullStyleVariations, userStyles?.blocks, userStyles?.css]);
    if (!fullStyleVariations || fullStyleVariations.length < 1) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
      import_components58.__experimentalGrid,
      {
        columns: 2,
        className: "global-styles-ui-style-variations-container",
        gap,
        children: themeVariations.map(
          (variation, index) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Variation, { variation, children: (isFocused) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
            preview_styles_default,
            {
              label: variation?.title,
              withHoverView: true,
              isFocused,
              variation
            }
          ) }, index)
        )
      }
    );
  }
  var style_variations_container_default = StyleVariationsContainer;

  // packages/global-styles-ui/build-module/style-variations-content.mjs
  var import_jsx_runtime136 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/screen-style-variations.mjs
  var import_jsx_runtime137 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/screen-css.mjs
  var import_i18n47 = __toESM(require_i18n(), 1);
  var import_components61 = __toESM(require_components(), 1);
  var import_block_editor14 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime138 = __toESM(require_jsx_runtime(), 1);
  var { AdvancedPanel: StylesAdvancedPanel2 } = unlock2(import_block_editor14.privateApis);

  // packages/global-styles-ui/build-module/screen-revisions/index.mjs
  var import_i18n50 = __toESM(require_i18n(), 1);
  var import_components64 = __toESM(require_components(), 1);
  var import_element44 = __toESM(require_element(), 1);

  // packages/global-styles-ui/build-module/screen-revisions/use-global-styles-revisions.mjs
  var import_data27 = __toESM(require_data(), 1);
  var import_core_data23 = __toESM(require_core_data(), 1);
  var import_element43 = __toESM(require_element(), 1);
  var SITE_EDITOR_AUTHORS_QUERY = {
    per_page: -1,
    _fields: "id,name,avatar_urls",
    context: "view",
    capabilities: ["edit_theme_options"]
  };
  var DEFAULT_QUERY = { per_page: 100, page: 1 };
  var EMPTY_ARRAY4 = [];
  function useGlobalStylesRevisions({
    query
  } = {}) {
    const { user: userConfig } = (0, import_element43.useContext)(GlobalStylesContext);
    const _query = (0, import_element43.useMemo)(
      () => ({ ...DEFAULT_QUERY, ...query }),
      [query]
    );
    const {
      authors,
      currentUser,
      isDirty,
      revisions,
      isLoadingGlobalStylesRevisions,
      revisionsCount
    } = (0, import_data27.useSelect)(
      (select3) => {
        const {
          __experimentalGetDirtyEntityRecords,
          getCurrentUser,
          getUsers,
          getRevisions,
          __experimentalGetCurrentGlobalStylesId,
          getEntityRecord,
          // @ts-expect-error
          isResolving
        } = select3(import_core_data23.store);
        const dirtyEntityRecords = __experimentalGetDirtyEntityRecords() || [];
        const _currentUser = getCurrentUser();
        const _isDirty = dirtyEntityRecords.length > 0;
        const globalStylesId = __experimentalGetCurrentGlobalStylesId();
        const globalStyles = globalStylesId ? getEntityRecord(
          "root",
          "globalStyles",
          globalStylesId
        ) : void 0;
        const _revisionsCount = (
          // @ts-expect-error - _links is not typed in GlobalStylesRevision
          globalStyles?._links?.["version-history"]?.[0]?.count ?? 0
        );
        const globalStylesRevisions = globalStylesId ? getRevisions(
          "root",
          "globalStyles",
          globalStylesId,
          _query
        ) || EMPTY_ARRAY4 : EMPTY_ARRAY4;
        const _authors = getUsers(SITE_EDITOR_AUTHORS_QUERY) || EMPTY_ARRAY4;
        const _isResolving = globalStylesId ? isResolving("getRevisions", [
          "root",
          "globalStyles",
          globalStylesId,
          _query
        ]) : false;
        return {
          authors: _authors,
          currentUser: _currentUser,
          isDirty: _isDirty,
          revisions: globalStylesRevisions,
          isLoadingGlobalStylesRevisions: _isResolving,
          revisionsCount: _revisionsCount
        };
      },
      [_query]
    );
    return (0, import_element43.useMemo)(() => {
      if (!authors.length || isLoadingGlobalStylesRevisions) {
        return {
          revisions: EMPTY_ARRAY4,
          hasUnsavedChanges: isDirty,
          isLoading: true,
          revisionsCount
        };
      }
      const _modifiedRevisions = revisions.map((revision) => {
        return {
          ...revision,
          author: authors.find(
            (author) => author.id === revision.author
          )
        };
      });
      const fetchedRevisionsCount = revisions.length;
      if (fetchedRevisionsCount) {
        if (_modifiedRevisions[0].id !== "unsaved" && _query.page === 1) {
          _modifiedRevisions[0].isLatest = true;
        }
        if (isDirty && userConfig && Object.keys(userConfig).length > 0 && currentUser && _query.page === 1) {
          const unsavedRevision = {
            id: "unsaved",
            styles: userConfig?.styles,
            settings: userConfig?.settings,
            _links: userConfig?._links,
            author: {
              name: currentUser?.name || "",
              // @ts-expect-error - avatar_urls is not typed in User
              avatar_urls: currentUser?.avatar_urls || {}
            },
            modified: /* @__PURE__ */ new Date()
          };
          _modifiedRevisions.unshift(unsavedRevision);
        }
        if (_query.per_page && _query.page === Math.ceil(revisionsCount / _query.per_page)) {
          _modifiedRevisions.push({
            id: "parent",
            styles: {},
            settings: {}
          });
        }
      }
      return {
        revisions: _modifiedRevisions,
        hasUnsavedChanges: isDirty,
        isLoading: false,
        revisionsCount
      };
    }, [
      isDirty,
      revisions,
      currentUser,
      authors,
      userConfig,
      isLoadingGlobalStylesRevisions,
      revisionsCount,
      _query.page,
      _query.per_page
    ]);
  }

  // packages/global-styles-ui/build-module/screen-revisions/revisions-buttons.mjs
  var import_i18n48 = __toESM(require_i18n(), 1);
  var import_components62 = __toESM(require_components(), 1);
  var import_date = __toESM(require_date(), 1);
  var import_core_data24 = __toESM(require_core_data(), 1);
  var import_data28 = __toESM(require_data(), 1);
  var import_keycodes4 = __toESM(require_keycodes(), 1);
  var import_jsx_runtime139 = __toESM(require_jsx_runtime(), 1);
  var DAY_IN_MILLISECONDS = 60 * 60 * 1e3 * 24;

  // packages/global-styles-ui/build-module/pagination/index.mjs
  var import_components63 = __toESM(require_components(), 1);
  var import_i18n49 = __toESM(require_i18n(), 1);
  var import_jsx_runtime140 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/screen-revisions/index.mjs
  var import_jsx_runtime141 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/font-sizes/font-sizes.mjs
  var import_i18n52 = __toESM(require_i18n(), 1);
  var import_components66 = __toESM(require_components(), 1);
  var import_element45 = __toESM(require_element(), 1);

  // packages/global-styles-ui/build-module/font-sizes/confirm-reset-font-sizes-dialog.mjs
  var import_components65 = __toESM(require_components(), 1);
  var import_i18n51 = __toESM(require_i18n(), 1);
  var import_jsx_runtime142 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/font-sizes/font-sizes.mjs
  var import_jsx_runtime143 = __toESM(require_jsx_runtime(), 1);
  var { Menu: Menu3 } = unlock2(import_components66.privateApis);

  // packages/global-styles-ui/build-module/font-sizes/font-size.mjs
  var import_i18n56 = __toESM(require_i18n(), 1);
  var import_components70 = __toESM(require_components(), 1);
  var import_element47 = __toESM(require_element(), 1);

  // packages/global-styles-ui/build-module/font-sizes/font-size-preview.mjs
  var import_block_editor15 = __toESM(require_block_editor(), 1);
  var import_i18n53 = __toESM(require_i18n(), 1);
  var import_jsx_runtime144 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/font-sizes/confirm-delete-font-size-dialog.mjs
  var import_components67 = __toESM(require_components(), 1);
  var import_i18n54 = __toESM(require_i18n(), 1);
  var import_jsx_runtime145 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/font-sizes/rename-font-size-dialog.mjs
  var import_components68 = __toESM(require_components(), 1);
  var import_i18n55 = __toESM(require_i18n(), 1);
  var import_element46 = __toESM(require_element(), 1);
  var import_jsx_runtime146 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/size-control/index.mjs
  var import_components69 = __toESM(require_components(), 1);
  var import_jsx_runtime147 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/font-sizes/font-size.mjs
  var import_jsx_runtime148 = __toESM(require_jsx_runtime(), 1);
  var { Menu: Menu4 } = unlock2(import_components70.privateApis);

  // packages/global-styles-ui/build-module/global-styles-ui.mjs
  var import_jsx_runtime149 = __toESM(require_jsx_runtime(), 1);

  // packages/global-styles-ui/build-module/with-global-styles-provider.mjs
  var import_jsx_runtime150 = __toESM(require_jsx_runtime(), 1);
  function withGlobalStylesProvider(Component) {
    return function WrappedComponent({
      value,
      baseValue,
      onChange,
      ...props
    }) {
      return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
        GlobalStylesProvider,
        {
          value,
          baseValue,
          onChange,
          children: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(Component, { ...props })
        }
      );
    };
  }

  // packages/global-styles-ui/build-module/style-variations.mjs
  var StyleVariations = withGlobalStylesProvider(style_variations_container_default);

  // packages/global-styles-ui/build-module/color-variations.mjs
  var ColorVariations2 = withGlobalStylesProvider(ColorVariations);

  // packages/global-styles-ui/build-module/typography-variations.mjs
  var TypographyVariations2 = withGlobalStylesProvider(TypographyVariations);

  // packages/global-styles-ui/build-module/font-library/font-library.mjs
  var import_jsx_runtime151 = __toESM(require_jsx_runtime(), 1);

  // packages/edit-site/build-module/components/sidebar-navigation-screen-details-footer/index.mjs
  var import_i18n57 = __toESM(require_i18n(), 1);
  var import_url6 = __toESM(require_url(), 1);
  var import_components72 = __toESM(require_components(), 1);
  var import_jsx_runtime152 = __toESM(require_jsx_runtime(), 1);
  function SidebarNavigationScreenDetailsFooter({
    record,
    revisionsCount,
    ...otherProps
  }) {
    const hrefProps = {};
    const lastRevisionId = record?._links?.["predecessor-version"]?.[0]?.id ?? null;
    revisionsCount = revisionsCount || record?._links?.["version-history"]?.[0]?.count || 0;
    if (lastRevisionId && revisionsCount > 1) {
      hrefProps.href = (0, import_url6.addQueryArgs)("revision.php", {
        revision: record?._links["predecessor-version"][0].id
      });
      hrefProps.as = "a";
    }
    return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
      import_components72.__experimentalItemGroup,
      {
        size: "large",
        className: "edit-site-sidebar-navigation-screen-details-footer",
        children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
          SidebarNavigationItem,
          {
            icon: backup_default,
            ...hrefProps,
            ...otherProps,
            children: (0, import_i18n57.sprintf)(
              /* translators: %d: Number of Styles revisions. */
              (0, import_i18n57._n)("%d Revision", "%d Revisions", revisionsCount),
              revisionsCount
            )
          }
        )
      }
    );
  }

  // packages/edit-site/build-module/components/sidebar-navigation-screen-global-styles/index.mjs
  var import_jsx_runtime153 = __toESM(require_jsx_runtime(), 1);
  var { useLocation: useLocation10, useHistory: useHistory7 } = unlock(import_router11.privateApis);
  function SidebarNavigationItemGlobalStyles(props) {
    const { name: name2 } = useLocation10();
    return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
      SidebarNavigationItem,
      {
        ...props,
        "aria-current": name2 === "styles"
      }
    );
  }
  function SidebarNavigationScreenGlobalStyles() {
    const history = useHistory7();
    const { path } = useLocation10();
    const {
      revisions,
      isLoading: isLoadingRevisions,
      revisionsCount
    } = useGlobalStylesRevisions();
    const { openGeneralSidebar: openGeneralSidebar2 } = (0, import_data30.useDispatch)(store);
    const { setStylesPath } = unlock((0, import_data30.useDispatch)(import_editor8.store));
    const { set: setPreference } = (0, import_data30.useDispatch)(import_preferences5.store);
    const openGlobalStyles = (0, import_element49.useCallback)(async () => {
      history.navigate((0, import_url7.addQueryArgs)(path, { canvas: "edit" }), {
        transition: "canvas-mode-edit-transition"
      });
      return Promise.all([
        setPreference("core", "distractionFree", false),
        openGeneralSidebar2("edit-site/global-styles")
      ]);
    }, [path, history, openGeneralSidebar2, setPreference]);
    const openRevisions = (0, import_element49.useCallback)(async () => {
      await openGlobalStyles();
      setStylesPath("/revisions");
    }, [openGlobalStyles, setStylesPath]);
    const shouldShowGlobalStylesFooter = !!revisionsCount && !isLoadingRevisions;
    return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(import_jsx_runtime153.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
      SidebarNavigationScreen,
      {
        title: (0, import_i18n58.__)("Design"),
        isRoot: true,
        description: (0, import_i18n58.__)(
          "Customize the appearance of your website using the block editor."
        ),
        content: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(MainSidebarNavigationContent, { activeItem: "styles-navigation-item" }),
        footer: shouldShowGlobalStylesFooter && /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
          SidebarNavigationScreenDetailsFooter,
          {
            record: revisions?.[0],
            revisionsCount,
            onClick: openRevisions
          }
        )
      }
    ) });
  }

  // packages/edit-site/build-module/components/sidebar-navigation-screen-main/index.mjs
  var import_jsx_runtime154 = __toESM(require_jsx_runtime(), 1);
  function MainSidebarNavigationContent({ isBlockBasedTheme = true }) {
    return /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(import_components73.__experimentalItemGroup, { className: "edit-site-sidebar-navigation-screen-main", children: [
      isBlockBasedTheme && /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(import_jsx_runtime154.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
          SidebarNavigationItemGlobalStyles,
          {
            to: "/styles",
            uid: "global-styles-navigation-item",
            icon: styles_default,
            children: (0, import_i18n59.__)("Styles")
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
          SidebarNavigationItem,
          {
            uid: "navigation-navigation-item",
            to: "/navigation",
            withChevron: true,
            icon: navigation_default,
            children: (0, import_i18n59.__)("Navigation")
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
          SidebarNavigationItem,
          {
            uid: "page-navigation-item",
            to: "/page",
            withChevron: true,
            icon: page_default,
            children: (0, import_i18n59.__)("Pages")
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
          SidebarNavigationItem,
          {
            uid: "template-navigation-item",
            to: "/template",
            withChevron: true,
            icon: layout_default,
            children: (0, import_i18n59.__)("Templates")
          }
        )
      ] }),
      !isBlockBasedTheme && /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
        SidebarNavigationItem,
        {
          uid: "stylebook-navigation-item",
          to: "/stylebook",
          withChevron: true,
          icon: styles_default,
          children: (0, import_i18n59.__)("Styles")
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
        SidebarNavigationItem,
        {
          uid: "patterns-navigation-item",
          to: "/pattern",
          withChevron: true,
          icon: symbol_default,
          children: (0, import_i18n59.__)("Patterns")
        }
      )
    ] });
  }
  function SidebarNavigationScreenMain({ customDescription }) {
    const isBlockBasedTheme = (0, import_data31.useSelect)(
      (select3) => select3(import_core_data25.store).getCurrentTheme()?.is_block_theme,
      []
    );
    let description;
    if (customDescription) {
      description = customDescription;
    } else if (isBlockBasedTheme) {
      description = (0, import_i18n59.__)(
        "Customize the appearance of your website using the block editor."
      );
    } else {
      description = (0, import_i18n59.__)(
        "Explore block styles and patterns to refine your site."
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
      SidebarNavigationScreen,
      {
        isRoot: true,
        title: (0, import_i18n59.__)("Design"),
        description,
        content: /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
          MainSidebarNavigationContent,
          {
            isBlockBasedTheme
          }
        )
      }
    );
  }

  // packages/edit-site/build-module/components/sidebar-navigation-screen-unsupported/index.mjs
  var import_i18n60 = __toESM(require_i18n(), 1);
  var import_components74 = __toESM(require_components(), 1);
  var import_jsx_runtime155 = __toESM(require_jsx_runtime(), 1);
  function SidebarNavigationScreenUnsupported() {
    return /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(import_components74.__experimentalSpacer, { padding: 3, children: /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(import_components74.Notice, { status: "warning", isDismissible: false, children: (0, import_i18n60.__)(
      "The theme you are currently using does not support this screen."
    ) }) });
  }

  // packages/edit-site/build-module/components/editor/index.mjs
  var import_data48 = __toESM(require_data(), 1);
  var import_components82 = __toESM(require_components(), 1);
  var import_compose10 = __toESM(require_compose(), 1);
  var import_editor20 = __toESM(require_editor(), 1);
  var import_i18n70 = __toESM(require_i18n(), 1);
  var import_core_data34 = __toESM(require_core_data(), 1);
  var import_block_library = __toESM(require_block_library(), 1);
  var import_element58 = __toESM(require_element(), 1);
  var import_notices3 = __toESM(require_notices(), 1);
  var import_router18 = __toESM(require_router(), 1);
  var import_html_entities4 = __toESM(require_html_entities(), 1);
  var import_block_editor18 = __toESM(require_block_editor(), 1);
  var import_url11 = __toESM(require_url(), 1);

  // packages/edit-site/build-module/components/welcome-guide/editor.mjs
  var import_data32 = __toESM(require_data(), 1);
  var import_components75 = __toESM(require_components(), 1);
  var import_i18n61 = __toESM(require_i18n(), 1);
  var import_element50 = __toESM(require_element(), 1);
  var import_preferences6 = __toESM(require_preferences(), 1);
  var import_core_data26 = __toESM(require_core_data(), 1);

  // packages/edit-site/build-module/components/welcome-guide/image.mjs
  var import_jsx_runtime156 = __toESM(require_jsx_runtime(), 1);
  function WelcomeGuideImage({ nonAnimatedSrc, animatedSrc }) {
    return /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("picture", { className: "edit-site-welcome-guide__image", children: [
      /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
        "source",
        {
          srcSet: nonAnimatedSrc,
          media: "(prefers-reduced-motion: reduce)"
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime156.jsx)("img", { src: animatedSrc, width: "312", height: "240", alt: "" })
    ] });
  }

  // packages/edit-site/build-module/components/welcome-guide/editor.mjs
  var import_jsx_runtime157 = __toESM(require_jsx_runtime(), 1);
  function WelcomeGuideEditor() {
    const { toggle } = (0, import_data32.useDispatch)(import_preferences6.store);
    const { isActive, isBlockBasedTheme } = (0, import_data32.useSelect)((select3) => {
      return {
        isActive: !!select3(import_preferences6.store).get(
          "core/edit-site",
          "welcomeGuide"
        ),
        isBlockBasedTheme: select3(import_core_data26.store).getCurrentTheme()?.is_block_theme
      };
    }, []);
    if (!isActive || !isBlockBasedTheme) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
      import_components75.Guide,
      {
        className: "edit-site-welcome-guide guide-editor",
        contentLabel: (0, import_i18n61.__)("Welcome to the site editor"),
        finishButtonText: (0, import_i18n61.__)("Get started"),
        onFinish: () => toggle("core/edit-site", "welcomeGuide"),
        pages: [
          {
            image: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
              WelcomeGuideImage,
              {
                nonAnimatedSrc: "https://s.w.org/images/block-editor/edit-your-site.svg?1",
                animatedSrc: "https://s.w.org/images/block-editor/edit-your-site.gif?1"
              }
            ),
            content: /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)(import_jsx_runtime157.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("h1", { className: "edit-site-welcome-guide__heading", children: (0, import_i18n61.__)("Edit your site") }),
              /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("p", { className: "edit-site-welcome-guide__text", children: (0, import_i18n61.__)(
                "Design everything on your site \u2014 from the header right down to the footer \u2014 using blocks."
              ) }),
              /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("p", { className: "edit-site-welcome-guide__text", children: (0, import_element50.createInterpolateElement)(
                (0, import_i18n61.__)(
                  "Click <StylesIconImage /> to start designing your blocks, and choose your typography, layout, and colors."
                ),
                {
                  StylesIconImage: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
                    "img",
                    {
                      alt: (0, import_i18n61.__)("styles"),
                      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"
                    }
                  )
                }
              ) })
            ] })
          }
        ]
      }
    );
  }

  // packages/edit-site/build-module/components/welcome-guide/page.mjs
  var import_data33 = __toESM(require_data(), 1);
  var import_components76 = __toESM(require_components(), 1);
  var import_i18n62 = __toESM(require_i18n(), 1);
  var import_preferences7 = __toESM(require_preferences(), 1);
  var import_jsx_runtime158 = __toESM(require_jsx_runtime(), 1);
  function WelcomeGuidePage() {
    const { toggle } = (0, import_data33.useDispatch)(import_preferences7.store);
    const isVisible2 = (0, import_data33.useSelect)((select3) => {
      const isPageActive = !!select3(import_preferences7.store).get(
        "core/edit-site",
        "welcomeGuidePage"
      );
      const isEditorActive = !!select3(import_preferences7.store).get(
        "core/edit-site",
        "welcomeGuide"
      );
      return isPageActive && !isEditorActive;
    }, []);
    if (!isVisible2) {
      return null;
    }
    const heading = (0, import_i18n62.__)("Editing a page");
    return /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
      import_components76.Guide,
      {
        className: "edit-site-welcome-guide guide-page",
        contentLabel: heading,
        finishButtonText: (0, import_i18n62.__)("Continue"),
        onFinish: () => toggle("core/edit-site", "welcomeGuidePage"),
        pages: [
          {
            image: /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
              "video",
              {
                className: "edit-site-welcome-guide__video",
                autoPlay: true,
                loop: true,
                muted: true,
                width: "312",
                height: "240",
                children: /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
                  "source",
                  {
                    src: "https://s.w.org/images/block-editor/editing-your-page.mp4",
                    type: "video/mp4"
                  }
                )
              }
            ),
            content: /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(import_jsx_runtime158.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("h1", { className: "edit-site-welcome-guide__heading", children: heading }),
              /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("p", { className: "edit-site-welcome-guide__text", children: (0, import_i18n62.__)(
                // eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts
                "It\u2019s 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."
              ) })
            ] })
          }
        ]
      }
    );
  }

  // packages/edit-site/build-module/components/welcome-guide/template.mjs
  var import_data34 = __toESM(require_data(), 1);
  var import_components77 = __toESM(require_components(), 1);
  var import_i18n63 = __toESM(require_i18n(), 1);
  var import_preferences8 = __toESM(require_preferences(), 1);
  var import_editor9 = __toESM(require_editor(), 1);
  var import_jsx_runtime159 = __toESM(require_jsx_runtime(), 1);
  function WelcomeGuideTemplate() {
    const { toggle } = (0, import_data34.useDispatch)(import_preferences8.store);
    const { isActive, hasPreviousEntity } = (0, import_data34.useSelect)((select3) => {
      const { getEditorSettings } = select3(import_editor9.store);
      const { get } = select3(import_preferences8.store);
      return {
        isActive: get("core/edit-site", "welcomeGuideTemplate"),
        hasPreviousEntity: !!getEditorSettings().onNavigateToPreviousEntityRecord
      };
    }, []);
    const isVisible2 = isActive && hasPreviousEntity;
    if (!isVisible2) {
      return null;
    }
    const heading = (0, import_i18n63.__)("Editing a template");
    return /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
      import_components77.Guide,
      {
        className: "edit-site-welcome-guide guide-template",
        contentLabel: heading,
        finishButtonText: (0, import_i18n63.__)("Continue"),
        onFinish: () => toggle("core/edit-site", "welcomeGuideTemplate"),
        pages: [
          {
            image: /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
              "video",
              {
                className: "edit-site-welcome-guide__video",
                autoPlay: true,
                loop: true,
                muted: true,
                width: "312",
                height: "240",
                children: /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
                  "source",
                  {
                    src: "https://s.w.org/images/block-editor/editing-your-template.mp4",
                    type: "video/mp4"
                  }
                )
              }
            ),
            content: /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)(import_jsx_runtime159.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("h1", { className: "edit-site-welcome-guide__heading", children: heading }),
              /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("p", { className: "edit-site-welcome-guide__text", children: (0, import_i18n63.__)(
                "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 \u2018Back\u2019 button in the toolbar."
              ) })
            ] })
          }
        ]
      }
    );
  }

  // packages/edit-site/build-module/components/welcome-guide/index.mjs
  var import_jsx_runtime160 = __toESM(require_jsx_runtime(), 1);
  function WelcomeGuide({ postType: postType2 }) {
    return /* @__PURE__ */ (0, import_jsx_runtime160.jsxs)(import_jsx_runtime160.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(WelcomeGuideEditor, {}),
      postType2 === "page" && /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(WelcomeGuidePage, {}),
      postType2 === "wp_template" && /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(WelcomeGuideTemplate, {})
    ] });
  }

  // packages/edit-site/build-module/components/canvas-loader/index.mjs
  var import_components78 = __toESM(require_components(), 1);
  var import_core_data27 = __toESM(require_core_data(), 1);
  var import_data35 = __toESM(require_data(), 1);
  var import_editor11 = __toESM(require_editor(), 1);
  var import_jsx_runtime161 = __toESM(require_jsx_runtime(), 1);
  var { Theme } = unlock(import_components78.privateApis);
  var { useStyle: useStyle3 } = unlock(import_editor11.privateApis);
  function CanvasLoader({ id }) {
    const textColor = useStyle3("color.text");
    const backgroundColor = useStyle3("color.background");
    const { elapsed, total } = (0, import_data35.useSelect)((select3) => {
      const selectorsByStatus = select3(import_core_data27.store).countSelectorsByStatus();
      const resolving = selectorsByStatus.resolving ?? 0;
      const finished = selectorsByStatus.finished ?? 0;
      return {
        elapsed: finished,
        total: finished + resolving
      };
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("div", { className: "edit-site-canvas-loader", children: /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(Theme, { accent: textColor, background: backgroundColor, children: /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(import_components78.ProgressBar, { id, max: total, value: elapsed }) }) });
  }

  // packages/edit-site/build-module/components/block-editor/use-site-editor-settings.mjs
  var import_data38 = __toESM(require_data(), 1);
  var import_element53 = __toESM(require_element(), 1);
  var import_router14 = __toESM(require_router(), 1);
  var import_compose9 = __toESM(require_compose(), 1);
  var import_editor14 = __toESM(require_editor(), 1);

  // packages/edit-site/build-module/components/block-editor/use-navigate-to-entity-record.mjs
  var import_data37 = __toESM(require_data(), 1);
  var import_router13 = __toESM(require_router(), 1);
  var import_element52 = __toESM(require_element(), 1);
  var import_url8 = __toESM(require_url(), 1);
  var import_core_data28 = __toESM(require_core_data(), 1);
  var import_editor13 = __toESM(require_editor(), 1);

  // packages/edit-site/build-module/components/block-editor/use-viewport-sync.mjs
  var import_element51 = __toESM(require_element(), 1);
  var import_data36 = __toESM(require_data(), 1);
  var import_router12 = __toESM(require_router(), 1);
  var import_editor12 = __toESM(require_editor(), 1);
  var { useLocation: useLocation11 } = unlock(import_router12.privateApis);
  var DEFAULT_DEVICE_TYPE = "Desktop";
  var VALID_DEVICE_TYPES = ["desktop", "tablet", "mobile"];
  var capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
  function useViewportSync() {
    const { query } = useLocation11();
    const { setDeviceType } = (0, import_data36.useDispatch)(import_editor12.store);
    (0, import_element51.useEffect)(() => {
      const viewport = query?.viewport?.toLowerCase();
      const isValid2 = VALID_DEVICE_TYPES.includes(viewport);
      setDeviceType(isValid2 ? capitalize(viewport) : DEFAULT_DEVICE_TYPE);
    }, [query?.viewport, setDeviceType]);
  }
  function ViewportSync() {
    useViewportSync();
    return null;
  }

  // packages/edit-site/build-module/components/block-editor/use-navigate-to-entity-record.mjs
  var { useHistory: useHistory8, useLocation: useLocation12 } = unlock(import_router13.privateApis);
  var VALID_VIEWPORTS = ["desktop", "tablet", "mobile"];
  function useNavigateToEntityRecord() {
    const history = useHistory8();
    const location = useLocation12();
    const { query, path } = location;
    const registry = (0, import_data37.useRegistry)();
    const currentDeviceType = (0, import_data37.useSelect)(
      (select3) => select3(import_editor13.store).getDeviceType(),
      []
    );
    const onNavigateToEntityRecord = (0, import_element52.useCallback)(
      (params) => {
        const currentPostType = registry.select(import_editor13.store).getCurrentPostType();
        const currentPostId = registry.select(import_editor13.store).getCurrentPostId();
        const entityEdits = registry.select(import_core_data28.store).getEntityRecordEdits(
          "postType",
          currentPostType,
          currentPostId
        );
        const externalClientId = entityEdits?.selection?.selectionStart?.clientId;
        const urlUpdates = { ...query };
        if (externalClientId) {
          urlUpdates.selectedBlock = externalClientId;
        }
        const requestedViewport = typeof params.viewport === "string" ? params.viewport.toLowerCase() : void 0;
        const isValidRequestedViewport = VALID_VIEWPORTS.includes(requestedViewport);
        if (isValidRequestedViewport) {
          const currentViewportLower = (currentDeviceType || DEFAULT_DEVICE_TYPE).toLowerCase();
          if (currentViewportLower === DEFAULT_DEVICE_TYPE.toLowerCase()) {
            delete urlUpdates.viewport;
          } else {
            urlUpdates.viewport = currentViewportLower;
          }
        }
        const hasUpdatesToSave = externalClientId || isValidRequestedViewport;
        if (hasUpdatesToSave) {
          history.navigate((0, import_url8.addQueryArgs)(path, urlUpdates), {
            replace: true
          });
        }
        const queryArgs = {
          canvas: "edit",
          focusMode: true
        };
        if (isValidRequestedViewport) {
          queryArgs.viewport = requestedViewport;
        }
        const url = (0, import_url8.addQueryArgs)(
          `/${params.postType}/${params.postId}`,
          queryArgs
        );
        history.navigate(url);
      },
      [history, path, query, registry, currentDeviceType]
    );
    return onNavigateToEntityRecord;
  }

  // packages/edit-site/build-module/components/block-editor/use-site-editor-settings.mjs
  var { useLocation: useLocation13, useHistory: useHistory9 } = unlock(import_router14.privateApis);
  var { useGlobalStyles: useGlobalStyles2 } = unlock(import_editor14.privateApis);
  function useNavigateToPreviousEntityRecord() {
    const location = useLocation13();
    const previousCanvas = (0, import_compose9.usePrevious)(location.query.canvas);
    const history = useHistory9();
    const goBack = (0, import_element53.useMemo)(() => {
      const isFocusMode = location.query.focusMode || location?.params?.postId && FOCUSABLE_ENTITIES.includes(location?.params?.postType);
      const didComeFromEditorCanvas = previousCanvas === "edit";
      const showBackButton = isFocusMode && didComeFromEditorCanvas;
      return showBackButton ? () => history.back() : void 0;
    }, [location, history, previousCanvas]);
    return goBack;
  }
  function useSpecificEditorSettings() {
    const { query } = useLocation13();
    const { canvas = "view" } = query;
    const onNavigateToEntityRecord = useNavigateToEntityRecord();
    const { merged: mergedConfig } = useGlobalStyles2();
    const { settings: settings2, currentPostIsTrashed } = (0, import_data38.useSelect)((select3) => {
      const { getSettings: getSettings7 } = select3(store);
      const { getCurrentPostAttribute } = select3(import_editor14.store);
      return {
        settings: getSettings7(),
        currentPostIsTrashed: getCurrentPostAttribute("status") === "trash"
      };
    }, []);
    const onNavigateToPreviousEntityRecord = useNavigateToPreviousEntityRecord();
    const [globalStyles, globalSettings] = (0, import_element53.useMemo)(() => {
      return generateGlobalStyles(mergedConfig, [], {
        disableRootPadding: false
      });
    }, [mergedConfig]);
    const defaultEditorSettings = (0, import_element53.useMemo)(() => {
      const nonGlobalStyles = (settings2?.styles ?? []).filter(
        (style) => !style.isGlobalStyles
      );
      return {
        ...settings2,
        styles: [
          ...nonGlobalStyles,
          ...globalStyles,
          {
            // Forming a "block formatting context" to prevent margin collapsing.
            // @see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context
            css: canvas === "view" ? `body{min-height: 100vh; ${currentPostIsTrashed ? "" : "cursor: pointer;"}}` : void 0
          }
        ],
        __experimentalFeatures: globalSettings,
        richEditingEnabled: true,
        supportsTemplateMode: true,
        focusMode: canvas !== "view",
        onNavigateToEntityRecord,
        onNavigateToPreviousEntityRecord,
        isPreviewMode: canvas === "view"
      };
    }, [
      settings2,
      globalStyles,
      globalSettings,
      canvas,
      currentPostIsTrashed,
      onNavigateToEntityRecord,
      onNavigateToPreviousEntityRecord
    ]);
    return defaultEditorSettings;
  }

  // packages/edit-site/build-module/components/plugin-template-setting-panel/index.mjs
  var import_editor15 = __toESM(require_editor(), 1);
  var import_data39 = __toESM(require_data(), 1);
  var import_components79 = __toESM(require_components(), 1);
  var import_deprecated3 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime162 = __toESM(require_jsx_runtime(), 1);
  var { Fill, Slot } = (0, import_components79.createSlotFill)("PluginTemplateSettingPanel");
  var PluginTemplateSettingPanel = ({ children }) => {
    (0, import_deprecated3.default)("wp.editSite.PluginTemplateSettingPanel", {
      since: "6.6",
      version: "6.8",
      alternative: "wp.editor.PluginDocumentSettingPanel"
    });
    const isCurrentEntityTemplate = (0, import_data39.useSelect)(
      (select3) => select3(import_editor15.store).getCurrentPostType() === "wp_template",
      []
    );
    if (!isCurrentEntityTemplate) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(Fill, { children });
  };
  PluginTemplateSettingPanel.Slot = Slot;
  var plugin_template_setting_panel_default = PluginTemplateSettingPanel;

  // packages/edit-site/build-module/components/more-menu/index.mjs
  var import_editor16 = __toESM(require_editor(), 1);

  // packages/edit-site/build-module/components/more-menu/site-export.mjs
  var import_i18n64 = __toESM(require_i18n(), 1);
  var import_components80 = __toESM(require_components(), 1);
  var import_api_fetch3 = __toESM(require_api_fetch(), 1);
  var import_data40 = __toESM(require_data(), 1);
  var import_blob = __toESM(require_blob(), 1);
  var import_core_data29 = __toESM(require_core_data(), 1);
  var import_notices2 = __toESM(require_notices(), 1);
  var import_jsx_runtime163 = __toESM(require_jsx_runtime(), 1);
  function SiteExport() {
    const canExport = (0, import_data40.useSelect)((select3) => {
      const targetHints = select3(import_core_data29.store).getCurrentTheme()?._links?.["wp:export-theme"]?.[0]?.targetHints ?? {};
      return !!targetHints.allow?.includes("GET");
    }, []);
    const { createErrorNotice } = (0, import_data40.useDispatch)(import_notices2.store);
    if (!canExport) {
      return null;
    }
    async function handleExport() {
      try {
        const response = await (0, import_api_fetch3.default)({
          path: "/wp-block-editor/v1/export",
          parse: false,
          headers: {
            Accept: "application/zip"
          }
        });
        const blob = await response.blob();
        const contentDisposition = response.headers.get(
          "content-disposition"
        );
        const contentDispositionMatches = contentDisposition.match(/=(.+)\.zip/);
        const fileName = contentDispositionMatches[1] ? contentDispositionMatches[1] : "edit-site-export";
        (0, import_blob.downloadBlob)(fileName + ".zip", blob, "application/zip");
      } catch (errorResponse) {
        let error = {};
        try {
          error = await errorResponse.json();
        } catch (e2) {
        }
        const errorMessage = error.message && error.code !== "unknown_error" ? error.message : (0, import_i18n64.__)("An error occurred while creating the site export.");
        createErrorNotice(errorMessage, { type: "snackbar" });
      }
    }
    return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
      import_components80.MenuItem,
      {
        role: "menuitem",
        icon: download_default,
        onClick: handleExport,
        info: (0, import_i18n64.__)(
          "Download your theme with updated templates and styles."
        ),
        children: (0, import_i18n64._x)("Export", "site exporter menu item")
      }
    );
  }

  // packages/edit-site/build-module/components/more-menu/welcome-guide-menu-item.mjs
  var import_i18n65 = __toESM(require_i18n(), 1);
  var import_data41 = __toESM(require_data(), 1);
  var import_components81 = __toESM(require_components(), 1);
  var import_preferences9 = __toESM(require_preferences(), 1);
  var import_jsx_runtime164 = __toESM(require_jsx_runtime(), 1);
  function WelcomeGuideMenuItem() {
    const { toggle } = (0, import_data41.useDispatch)(import_preferences9.store);
    return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(import_components81.MenuItem, { onClick: () => toggle("core/edit-site", "welcomeGuide"), children: (0, import_i18n65.__)("Welcome Guide") });
  }

  // packages/edit-site/build-module/components/more-menu/index.mjs
  var import_jsx_runtime165 = __toESM(require_jsx_runtime(), 1);
  var { ToolsMoreMenuGroup, PreferencesModal } = unlock(import_editor16.privateApis);
  function MoreMenu() {
    return /* @__PURE__ */ (0, import_jsx_runtime165.jsxs)(import_jsx_runtime165.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime165.jsxs)(ToolsMoreMenuGroup, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(SiteExport, {}),
        /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(WelcomeGuideMenuItem, {})
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(PreferencesModal, {})
    ] });
  }

  // packages/edit-site/build-module/components/block-editor/use-editor-iframe-props.mjs
  var import_data42 = __toESM(require_data(), 1);
  var import_keycodes5 = __toESM(require_keycodes(), 1);
  var import_element54 = __toESM(require_element(), 1);
  var import_i18n66 = __toESM(require_i18n(), 1);
  var import_editor17 = __toESM(require_editor(), 1);
  var import_router15 = __toESM(require_router(), 1);
  var import_url9 = __toESM(require_url(), 1);
  var { useLocation: useLocation14, useHistory: useHistory10 } = unlock(import_router15.privateApis);
  function useEditorIframeProps() {
    const { query, path } = useLocation14();
    const history = useHistory10();
    const { canvas = "view" } = query;
    const currentPostIsTrashed = (0, import_data42.useSelect)((select3) => {
      return select3(import_editor17.store).getCurrentPostAttribute("status") === "trash";
    }, []);
    const [isFocused, setIsFocused] = (0, import_element54.useState)(false);
    (0, import_element54.useEffect)(() => {
      if (canvas === "edit") {
        setIsFocused(false);
      }
    }, [canvas]);
    const viewModeIframeProps = {
      "aria-label": (0, import_i18n66.__)("Edit"),
      "aria-disabled": currentPostIsTrashed,
      title: null,
      role: "button",
      tabIndex: 0,
      onFocus: () => setIsFocused(true),
      onBlur: () => setIsFocused(false),
      onKeyDown: (event) => {
        const { keyCode } = event;
        if ((keyCode === import_keycodes5.ENTER || keyCode === import_keycodes5.SPACE) && !currentPostIsTrashed) {
          event.preventDefault();
          history.navigate((0, import_url9.addQueryArgs)(path, { canvas: "edit" }), {
            transition: "canvas-mode-edit-transition"
          });
        }
      },
      onClick: () => history.navigate((0, import_url9.addQueryArgs)(path, { canvas: "edit" }), {
        transition: "canvas-mode-edit-transition"
      }),
      onClickCapture: (event) => {
        if (currentPostIsTrashed) {
          event.preventDefault();
          event.stopPropagation();
        }
      },
      readonly: true
    };
    return {
      className: clsx_default("edit-site-visual-editor__editor-canvas", {
        "is-focused": isFocused && canvas === "view"
      }),
      ...canvas === "view" ? viewModeIframeProps : {}
    };
  }

  // packages/edit-site/build-module/components/editor/use-editor-title.mjs
  var import_i18n68 = __toESM(require_i18n(), 1);
  var import_data44 = __toESM(require_data(), 1);
  var import_core_data31 = __toESM(require_core_data(), 1);
  var import_html_entities3 = __toESM(require_html_entities(), 1);
  var import_editor18 = __toESM(require_editor(), 1);

  // packages/edit-site/build-module/components/routes/use-title.mjs
  var import_element55 = __toESM(require_element(), 1);
  var import_data43 = __toESM(require_data(), 1);
  var import_core_data30 = __toESM(require_core_data(), 1);
  var import_i18n67 = __toESM(require_i18n(), 1);
  var import_a11y3 = __toESM(require_a11y(), 1);
  var import_html_entities2 = __toESM(require_html_entities(), 1);
  var import_router16 = __toESM(require_router(), 1);
  var { useLocation: useLocation15 } = unlock(import_router16.privateApis);
  function useTitle(title) {
    const location = useLocation15();
    const siteTitle = (0, import_data43.useSelect)(
      (select3) => select3(import_core_data30.store).getEntityRecord("root", "site")?.title,
      []
    );
    const isInitialLocationRef = (0, import_element55.useRef)(true);
    (0, import_element55.useEffect)(() => {
      isInitialLocationRef.current = false;
    }, [location]);
    (0, import_element55.useEffect)(() => {
      if (isInitialLocationRef.current) {
        return;
      }
      if (title && siteTitle) {
        const formattedTitle = (0, import_i18n67.sprintf)(
          /* translators: Admin document title. 1: Admin screen name, 2: Network or site name. */
          (0, import_i18n67.__)("%1$s \u2039 %2$s \u2039 Editor \u2014 WordPress"),
          (0, import_html_entities2.decodeEntities)(title),
          (0, import_html_entities2.decodeEntities)(siteTitle)
        );
        document.title = formattedTitle;
        (0, import_a11y3.speak)(title, "assertive");
      }
    }, [title, siteTitle, location]);
  }

  // packages/edit-site/build-module/components/editor/use-editor-title.mjs
  var { getTemplateInfo } = unlock(import_editor18.privateApis);
  function useEditorTitle(postType2, postId) {
    const { title, isLoaded } = (0, import_data44.useSelect)(
      (select3) => {
        const {
          getEditedEntityRecord,
          getCurrentTheme,
          hasFinishedResolution
        } = select3(import_core_data31.store);
        if (!postId) {
          return { isLoaded: false };
        }
        const _record = getEditedEntityRecord(
          "postType",
          postType2,
          postId
        );
        const { default_template_types: templateTypes = [] } = getCurrentTheme() ?? {};
        const templateInfo = getTemplateInfo({
          template: _record,
          templateTypes
        });
        const _isLoaded = hasFinishedResolution("getEditedEntityRecord", [
          "postType",
          postType2,
          postId
        ]);
        return {
          title: templateInfo.title,
          isLoaded: _isLoaded
        };
      },
      [postType2, postId]
    );
    let editorTitle;
    if (isLoaded) {
      editorTitle = (0, import_i18n68.sprintf)(
        // translators: A breadcrumb trail for the Admin document title. 1: title of template being edited, 2: type of template (Template or Template Part).
        (0, import_i18n68._x)("%1$s \u2039 %2$s", "breadcrumb trail"),
        (0, import_html_entities3.decodeEntities)(title),
        POST_TYPE_LABELS[postType2] ?? POST_TYPE_LABELS[TEMPLATE_POST_TYPE]
      );
    }
    useTitle(isLoaded && editorTitle);
  }
  var use_editor_title_default = useEditorTitle;

  // packages/edit-site/build-module/components/editor/use-adapt-editor-to-canvas.mjs
  var import_data45 = __toESM(require_data(), 1);
  var import_block_editor17 = __toESM(require_block_editor(), 1);
  var import_editor19 = __toESM(require_editor(), 1);
  var import_element56 = __toESM(require_element(), 1);
  var import_preferences10 = __toESM(require_preferences(), 1);
  function useAdaptEditorToCanvas(canvas) {
    const { clearSelectedBlock } = (0, import_data45.useDispatch)(import_block_editor17.store);
    const {
      editPost,
      setDeviceType,
      closePublishSidebar,
      setIsListViewOpened: setIsListViewOpened2,
      setIsInserterOpened: setIsInserterOpened2
    } = (0, import_data45.useDispatch)(import_editor19.store);
    const { get: getPreference } = (0, import_data45.useSelect)(import_preferences10.store);
    const { getCurrentPost } = (0, import_data45.useSelect)(import_editor19.store);
    const registry = (0, import_data45.useRegistry)();
    (0, import_element56.useLayoutEffect)(() => {
      const isMediumOrBigger = window.matchMedia("(min-width: 782px)").matches;
      registry.batch(() => {
        clearSelectedBlock();
        if (getCurrentPost()?.type) {
          editPost({ selection: void 0 }, { undoIgnore: true });
        }
        setDeviceType(DEFAULT_DEVICE_TYPE);
        closePublishSidebar();
        setIsInserterOpened2(false);
        if (isMediumOrBigger && canvas === "edit" && getPreference("core", "showListViewByDefault") && !getPreference("core", "distractionFree")) {
          setIsListViewOpened2(true);
        } else {
          setIsListViewOpened2(false);
        }
      });
    }, [
      canvas,
      registry,
      clearSelectedBlock,
      editPost,
      setDeviceType,
      closePublishSidebar,
      setIsInserterOpened2,
      setIsListViewOpened2,
      getPreference,
      getCurrentPost
    ]);
  }

  // packages/edit-site/build-module/components/editor/use-resolve-edited-entity.mjs
  var import_element57 = __toESM(require_element(), 1);
  var import_data46 = __toESM(require_data(), 1);
  var import_core_data32 = __toESM(require_core_data(), 1);
  var import_router17 = __toESM(require_router(), 1);
  var { useLocation: useLocation16 } = unlock(import_router17.privateApis);
  var postTypesWithoutParentTemplate = [
    ATTACHMENT_POST_TYPE,
    TEMPLATE_POST_TYPE,
    TEMPLATE_PART_POST_TYPE,
    NAVIGATION_POST_TYPE,
    PATTERN_TYPES.user
  ];
  var authorizedPostTypes = ["page", "post"];
  function getPostType(name2) {
    let postType2;
    if (name2 === "navigation-item") {
      postType2 = NAVIGATION_POST_TYPE;
    } else if (name2 === "pattern-item") {
      postType2 = PATTERN_TYPES.user;
    } else if (name2 === "template-part-item") {
      postType2 = TEMPLATE_PART_POST_TYPE;
    } else if (name2 === "templates") {
      postType2 = TEMPLATE_POST_TYPE;
    } else if (name2 === "template-item") {
      postType2 = TEMPLATE_POST_TYPE;
    } else if (name2 === "page-item" || name2 === "pages") {
      postType2 = "page";
    } else if (name2 === "post-item" || name2 === "posts") {
      postType2 = "post";
    } else if (name2 === "attachment-item") {
      postType2 = ATTACHMENT_POST_TYPE;
    }
    return postType2;
  }
  function useResolveEditedEntity() {
    const { editEntityRecord } = (0, import_data46.useDispatch)(import_core_data32.store);
    const { hasEntityRecord } = (0, import_data46.useSelect)(import_core_data32.store);
    const { name: name2, params = {}, query } = useLocation16();
    const { postId = query?.postId } = params;
    const postType2 = getPostType(name2, postId) ?? query?.postType;
    const { selectedBlock } = query;
    const appliedSelectionRef = (0, import_element57.useRef)(null);
    const homePage = (0, import_data46.useSelect)((select3) => {
      const { getHomePage } = unlock(select3(import_core_data32.store));
      return getHomePage();
    }, []);
    const resolvedTemplateId = (0, import_data46.useSelect)(
      (select3) => {
        if (postTypesWithoutParentTemplate.includes(postType2) && postId) {
          return;
        }
        if (postId && postId.includes(",")) {
          return;
        }
        const { getTemplateId } = unlock(select3(import_core_data32.store));
        if (postType2 && postId && authorizedPostTypes.includes(postType2)) {
          return getTemplateId(postType2, postId);
        }
        if (homePage?.postType === "page") {
          return getTemplateId("page", homePage?.postId);
        }
        if (homePage?.postType === "wp_template") {
          return homePage?.postId;
        }
      },
      [homePage, postId, postType2]
    );
    const context = (0, import_element57.useMemo)(() => {
      if (postTypesWithoutParentTemplate.includes(postType2) && postId) {
        return {};
      }
      if (postType2 && postId && authorizedPostTypes.includes(postType2)) {
        return { postType: postType2, postId };
      }
      if (homePage?.postType === "page") {
        return { postType: "page", postId: homePage?.postId };
      }
      return {};
    }, [homePage, postType2, postId]);
    let entity;
    if (postTypesWithoutParentTemplate.includes(postType2) && postId) {
      entity = { isReady: true, postType: postType2, postId, context };
    } else if (!!homePage) {
      entity = {
        isReady: resolvedTemplateId !== void 0,
        postType: TEMPLATE_POST_TYPE,
        postId: resolvedTemplateId,
        context
      };
    } else {
      entity = { isReady: false };
    }
    if (selectedBlock && entity.isReady && appliedSelectionRef.current !== selectedBlock) {
      const selectionPostType = entity.context?.postId ? entity.context.postType : entity.postType;
      const selectionPostId = entity.context?.postId ? entity.context.postId : entity.postId;
      if (hasEntityRecord("postType", selectionPostType, selectionPostId)) {
        editEntityRecord(
          "postType",
          selectionPostType,
          selectionPostId,
          {
            selection: {
              selectionStart: { clientId: selectedBlock },
              selectionEnd: { clientId: selectedBlock }
            }
          },
          { undoIgnore: true }
        );
        appliedSelectionRef.current = selectedBlock;
      }
    }
    return entity;
  }
  function useSyncDeprecatedEntityIntoState({
    postType: postType2,
    postId,
    context,
    isReady
  }) {
    const { setEditedEntity: setEditedEntity2 } = (0, import_data46.useDispatch)(store);
    (0, import_element57.useEffect)(() => {
      if (isReady) {
        setEditedEntity2(postType2, String(postId), context);
      }
    }, [isReady, postType2, postId, context, setEditedEntity2]);
  }

  // packages/edit-site/build-module/components/editor/site-preview.mjs
  var import_i18n69 = __toESM(require_i18n(), 1);
  var import_data47 = __toESM(require_data(), 1);
  var import_core_data33 = __toESM(require_core_data(), 1);
  var import_dom2 = __toESM(require_dom(), 1);
  var import_url10 = __toESM(require_url(), 1);
  var import_jsx_runtime166 = __toESM(require_jsx_runtime(), 1);
  function SitePreview() {
    const siteUrl = (0, import_data47.useSelect)((select3) => {
      const { getEntityRecord } = select3(import_core_data33.store);
      const siteData = getEntityRecord("root", "__unstableBase");
      return siteData?.home;
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
      "iframe",
      {
        src: (0, import_url10.addQueryArgs)(siteUrl, {
          // Parameter for hiding the admin bar.
          wp_site_preview: 1
        }),
        title: (0, import_i18n69.__)("Site Preview"),
        style: {
          display: "block",
          width: "100%",
          height: "100%",
          backgroundColor: "#fff"
        },
        onLoad: (event) => {
          const document2 = event.target.contentDocument;
          const focusableElements = import_dom2.focus.focusable.find(document2);
          focusableElements.forEach((element) => {
            element.style.pointerEvents = "none";
            element.tabIndex = -1;
            element.setAttribute("aria-hidden", "true");
          });
        }
      }
    );
  }

  // packages/edit-site/build-module/components/editor/index.mjs
  var import_jsx_runtime167 = __toESM(require_jsx_runtime(), 1);
  var { Editor, BackButton } = unlock(import_editor20.privateApis);
  var { useHistory: useHistory11, useLocation: useLocation17 } = unlock(import_router18.privateApis);
  var { BlockKeyboardShortcuts } = unlock(import_block_library.privateApis);
  var toggleHomeIconVariants = {
    edit: {
      opacity: 0,
      scale: 0.2
    },
    hover: {
      opacity: 1,
      scale: 1,
      clipPath: "inset( 22% round 2px )"
    }
  };
  var siteIconVariants = {
    edit: {
      clipPath: "inset(0% round 0px)"
    },
    hover: {
      clipPath: "inset( 22% round 2px )"
    },
    tap: {
      clipPath: "inset(0% round 0px)"
    }
  };
  function getListPathForPostType(postType2) {
    switch (postType2) {
      case "navigation":
        return "/navigation";
      case "wp_block":
        return "/pattern?postType=wp_block";
      case "wp_template_part":
        return "/pattern?postType=wp_template_part";
      case "wp_template":
        return "/template";
      case "page":
        return "/page";
      case "post":
        return "/";
    }
    throw "Unknown post type";
  }
  function getNavigationPath(location, postType2) {
    const { path, name: name2 } = location;
    if ([
      "pattern-item",
      "template-part-item",
      "page-item",
      "template-item",
      "static-template-item",
      "post-item"
    ].includes(name2)) {
      return getListPathForPostType(postType2);
    }
    return (0, import_url11.addQueryArgs)(path, { canvas: void 0 });
  }
  function EditSiteEditor({ isHomeRoute = false }) {
    const disableMotion = (0, import_compose10.useReducedMotion)();
    const location = useLocation17();
    const history = useHistory11();
    const { canvas = "view" } = location.query;
    const isLoading = useIsSiteEditorLoading();
    useAdaptEditorToCanvas(canvas);
    const entity = useResolveEditedEntity();
    useSyncDeprecatedEntityIntoState(entity);
    const { postType: postType2, postId, context } = entity;
    const { isBlockBasedTheme, hasSiteIcon } = (0, import_data48.useSelect)((select3) => {
      const { getCurrentTheme, getEntityRecord } = select3(import_core_data34.store);
      const siteData = getEntityRecord("root", "__unstableBase", void 0);
      return {
        isBlockBasedTheme: getCurrentTheme()?.is_block_theme,
        hasSiteIcon: !!siteData?.site_icon_url
      };
    }, []);
    const postWithTemplate = !!context?.postId;
    use_editor_title_default(
      postWithTemplate ? context.postType : postType2,
      postWithTemplate ? context.postId : postId
    );
    const _isPreviewingTheme = isPreviewingTheme();
    const iframeProps = useEditorIframeProps();
    const isEditMode = canvas === "edit";
    const loadingProgressId = (0, import_compose10.useInstanceId)(
      CanvasLoader,
      "edit-site-editor__loading-progress"
    );
    const editorSettings = useSpecificEditorSettings();
    const { resetZoomLevel } = unlock((0, import_data48.useDispatch)(import_block_editor18.store));
    const { setCurrentRevisionId } = unlock((0, import_data48.useDispatch)(import_editor20.store));
    const { createSuccessNotice } = (0, import_data48.useDispatch)(import_notices3.store);
    const onActionPerformed = (0, import_element58.useCallback)(
      (actionId, items) => {
        switch (actionId) {
          case "move-to-trash":
          case "delete-post":
            {
              history.navigate(
                getListPathForPostType(
                  postWithTemplate ? context.postType : postType2
                )
              );
            }
            break;
          case "duplicate-post":
            {
              const newItem = items[0];
              const _title = typeof newItem.title === "string" ? newItem.title : newItem.title?.rendered;
              createSuccessNotice(
                (0, import_i18n70.sprintf)(
                  // translators: %s: Title of the created post or template, e.g: "Hello world".
                  (0, import_i18n70.__)('"%s" successfully created.'),
                  (0, import_html_entities4.decodeEntities)(_title) || (0, import_i18n70.__)("(no title)")
                ),
                {
                  type: "snackbar",
                  id: "duplicate-post-action",
                  actions: [
                    {
                      label: (0, import_i18n70.__)("Edit"),
                      onClick: () => {
                        history.navigate(
                          `/${newItem.type}/${newItem.id}?canvas=edit`
                        );
                      }
                    }
                  ]
                }
              );
            }
            break;
        }
      },
      [
        postType2,
        context?.postType,
        postWithTemplate,
        history,
        createSuccessNotice
      ]
    );
    const isReady = !isLoading;
    const transition = {
      duration: disableMotion ? 0 : 0.2
    };
    return !isBlockBasedTheme && isHomeRoute ? /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(SitePreview, {}) : /* @__PURE__ */ (0, import_jsx_runtime167.jsxs)(import_jsx_runtime167.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(import_editor20.EditorKeyboardShortcutsRegister, {}),
      isEditMode && /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(BlockKeyboardShortcuts, {}),
      !isReady ? /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(CanvasLoader, { id: loadingProgressId }) : null,
      isEditMode && isReady && /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
        WelcomeGuide,
        {
          postType: postWithTemplate ? context.postType : postType2
        }
      ),
      isReady && /* @__PURE__ */ (0, import_jsx_runtime167.jsxs)(
        Editor,
        {
          postType: postWithTemplate ? context.postType : postType2,
          postId: postWithTemplate ? context.postId : postId,
          templateId: postWithTemplate ? postId : void 0,
          settings: editorSettings,
          className: "edit-site-editor__editor-interface",
          customSaveButton: _isPreviewingTheme && /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(SaveButton, { size: "compact" }),
          customSavePanel: _isPreviewingTheme && /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(SavePanel, {}),
          iframeProps,
          onActionPerformed,
          extraSidebarPanels: !postWithTemplate && /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(plugin_template_setting_panel_default.Slot, {}),
          children: [
            isEditMode && /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(ViewportSync, {}),
            isEditMode && /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(BackButton, { children: ({ length }) => length <= 1 && /* @__PURE__ */ (0, import_jsx_runtime167.jsxs)(
              import_components82.__unstableMotion.div,
              {
                className: "edit-site-editor__view-mode-toggle",
                transition,
                animate: "edit",
                initial: "edit",
                whileHover: "hover",
                whileTap: "tap",
                children: [
                  /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
                    import_components82.Button,
                    {
                      __next40pxDefaultSize: true,
                      label: (0, import_i18n70.__)("Open Navigation"),
                      showTooltip: true,
                      tooltipPosition: "middle right",
                      onClick: () => {
                        resetZoomLevel();
                        setCurrentRevisionId(null);
                        history.navigate(
                          getNavigationPath(
                            location,
                            postWithTemplate ? context.postType : postType2
                          ),
                          {
                            transition: "canvas-mode-view-transition"
                          }
                        );
                      },
                      children: /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
                        import_components82.__unstableMotion.div,
                        {
                          variants: siteIconVariants,
                          children: /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(site_icon_default, { className: "edit-site-editor__view-mode-toggle-icon" })
                        }
                      )
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
                    import_components82.__unstableMotion.div,
                    {
                      className: clsx_default(
                        "edit-site-editor__back-icon",
                        {
                          "has-site-icon": hasSiteIcon
                        }
                      ),
                      variants: toggleHomeIconVariants,
                      children: /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(icon_default, { icon: arrow_up_left_default })
                    }
                  )
                ]
              }
            ) }),
            /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(MoreMenu, {})
          ]
        }
      )
    ] });
  }

  // packages/edit-site/build-module/components/site-editor-routes/utils.mjs
  function isClassicThemeWithStyleBookSupport(siteData) {
    const isBlockTheme = siteData.currentTheme?.is_block_theme;
    const supportsEditorStyles = siteData.currentTheme?.theme_supports["editor-styles"];
    const hasThemeJson = siteData.editorSettings?.supportsLayout;
    return !isBlockTheme && (supportsEditorStyles || hasThemeJson);
  }

  // packages/edit-site/build-module/components/site-editor-routes/home.mjs
  var import_jsx_runtime168 = __toESM(require_jsx_runtime(), 1);
  var homeRoute = {
    name: "home",
    path: "/",
    areas: {
      sidebar({ siteData }) {
        const isBlockTheme = siteData.currentTheme?.is_block_theme;
        return isBlockTheme || isClassicThemeWithStyleBookSupport(siteData) ? /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(SidebarNavigationScreenMain, {}) : /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(SidebarNavigationScreenUnsupported, {});
      },
      preview({ siteData }) {
        const isBlockTheme = siteData.currentTheme?.is_block_theme;
        return isBlockTheme || isClassicThemeWithStyleBookSupport(siteData) ? /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(EditSiteEditor, { isHomeRoute: true }) : void 0;
      },
      mobile({ siteData }) {
        const isBlockTheme = siteData.currentTheme?.is_block_theme;
        return isBlockTheme || isClassicThemeWithStyleBookSupport(siteData) ? /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(SidebarNavigationScreenMain, {}) : /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(SidebarNavigationScreenUnsupported, {});
      }
    }
  };

  // packages/edit-site/build-module/components/site-editor-routes/styles.mjs
  var import_router20 = __toESM(require_router(), 1);
  var import_editor23 = __toESM(require_editor(), 1);
  var import_url13 = __toESM(require_url(), 1);

  // packages/edit-site/build-module/components/sidebar-global-styles/index.mjs
  var import_i18n71 = __toESM(require_i18n(), 1);
  var import_element59 = __toESM(require_element(), 1);
  var import_router19 = __toESM(require_router(), 1);
  var import_editor22 = __toESM(require_editor(), 1);
  var import_compose11 = __toESM(require_compose(), 1);
  var import_components83 = __toESM(require_components(), 1);
  var import_url12 = __toESM(require_url(), 1);
  var import_jsx_runtime169 = __toESM(require_jsx_runtime(), 1);
  var { GlobalStylesUIWrapper, GlobalStylesActionMenu } = unlock(import_editor22.privateApis);
  var { useLocation: useLocation18, useHistory: useHistory12 } = unlock(import_router19.privateApis);
  var GlobalStylesPageActions = ({
    isStyleBookOpened,
    setIsStyleBookOpened,
    path,
    onChangeSection
  }) => {
    const history = useHistory12();
    return /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)(import_components83.__experimentalHStack, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
        import_components83.Button,
        {
          isPressed: isStyleBookOpened,
          icon: seen_default,
          label: (0, import_i18n71.__)("Style Book"),
          onClick: () => {
            setIsStyleBookOpened(!isStyleBookOpened);
            const updatedPath = !isStyleBookOpened ? (0, import_url12.addQueryArgs)(path, { preview: "stylebook" }) : (0, import_url12.removeQueryArgs)(path, "preview");
            history.navigate(updatedPath);
          },
          size: "compact"
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
        GlobalStylesActionMenu,
        {
          hideWelcomeGuide: true,
          onChangePath: onChangeSection
        }
      )
    ] });
  };
  var useSection = () => {
    const { path, query } = useLocation18();
    const history = useHistory12();
    return (0, import_element59.useMemo)(() => {
      return [
        query.section ?? "/",
        (updatedSection) => {
          history.navigate(
            (0, import_url12.addQueryArgs)(path, {
              section: updatedSection
            })
          );
        }
      ];
    }, [path, query.section, history]);
  };
  function SidebarGlobalStyles() {
    const { path } = useLocation18();
    const [isStyleBookOpened, setIsStyleBookOpened] = (0, import_element59.useState)(
      path.includes("preview=stylebook")
    );
    const isMobileViewport = (0, import_compose11.useViewportMatch)("medium", "<");
    const [section, onChangeSection] = useSection();
    return /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
      page_default2,
      {
        actions: !isMobileViewport ? /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
          GlobalStylesPageActions,
          {
            isStyleBookOpened,
            setIsStyleBookOpened,
            path,
            onChangeSection
          }
        ) : null,
        className: "edit-site-styles",
        title: (0, import_i18n71.__)("Styles"),
        headingLevel: 2,
        children: /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
          GlobalStylesUIWrapper,
          {
            path: section,
            onPathChange: onChangeSection
          }
        )
      }
    );
  }

  // packages/edit-site/build-module/components/site-editor-routes/styles.mjs
  var import_jsx_runtime170 = __toESM(require_jsx_runtime(), 1);
  var { useLocation: useLocation19, useHistory: useHistory13 } = unlock(import_router20.privateApis);
  var { StyleBookPreview } = unlock(import_editor23.privateApis);
  function MobileGlobalStylesUI() {
    const { query = {} } = useLocation19();
    const { canvas } = query;
    if (canvas === "edit") {
      return /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(EditSiteEditor, {});
    }
    return /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(SidebarGlobalStyles, {});
  }
  function StylesPreviewArea() {
    const { path, query } = useLocation19();
    const history = useHistory13();
    const isStylebook = query.preview === "stylebook";
    const section = query.section ?? "/";
    const onChangeSection = (updatedSection) => {
      history.navigate(
        (0, import_url13.addQueryArgs)(path, {
          section: updatedSection
        })
      );
    };
    if (isStylebook) {
      return /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
        StyleBookPreview,
        {
          path: section,
          onPathChange: onChangeSection
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(EditSiteEditor, {});
  }
  var stylesRoute = {
    name: "styles",
    path: "/styles",
    areas: {
      content: /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(SidebarGlobalStyles, {}),
      sidebar: /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(SidebarNavigationScreenGlobalStyles, { backPath: "/" }),
      preview: /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(StylesPreviewArea, {}),
      mobile: /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(MobileGlobalStylesUI, {})
    },
    widths: {
      content: 380
    }
  };

  // packages/edit-site/build-module/components/site-editor-routes/navigation.mjs
  var import_router25 = __toESM(require_router(), 1);

  // packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menus/index.mjs
  var import_i18n80 = __toESM(require_i18n(), 1);
  var import_core_data38 = __toESM(require_core_data(), 1);
  var import_data54 = __toESM(require_data(), 1);
  var import_html_entities8 = __toESM(require_html_entities(), 1);
  var import_components89 = __toESM(require_components(), 1);

  // packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menus/constants.mjs
  var PRELOADED_NAVIGATION_MENUS_QUERY = {
    per_page: 100,
    status: ["publish", "draft"],
    order: "desc",
    orderby: "date"
  };

  // packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.mjs
  var import_i18n77 = __toESM(require_i18n(), 1);
  var import_html_entities6 = __toESM(require_html_entities(), 1);

  // packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.mjs
  var import_components86 = __toESM(require_components(), 1);
  var import_i18n74 = __toESM(require_i18n(), 1);
  var import_element61 = __toESM(require_element(), 1);
  var import_router21 = __toESM(require_router(), 1);

  // packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.mjs
  var import_components84 = __toESM(require_components(), 1);
  var import_i18n72 = __toESM(require_i18n(), 1);
  var import_element60 = __toESM(require_element(), 1);
  var import_jsx_runtime171 = __toESM(require_jsx_runtime(), 1);
  var notEmptyString = (testString) => testString?.trim()?.length > 0;
  function RenameModal({ menuTitle, onClose, onSave }) {
    const [editedMenuTitle, setEditedMenuTitle] = (0, import_element60.useState)(menuTitle);
    const titleHasChanged = editedMenuTitle !== menuTitle;
    const isEditedMenuTitleValid = titleHasChanged && notEmptyString(editedMenuTitle);
    return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
      import_components84.Modal,
      {
        title: (0, import_i18n72.__)("Rename"),
        onRequestClose: onClose,
        focusOnMount: "firstContentElement",
        size: "small",
        children: /* @__PURE__ */ (0, import_jsx_runtime171.jsx)("form", { className: "sidebar-navigation__rename-modal-form", children: /* @__PURE__ */ (0, import_jsx_runtime171.jsxs)(import_components84.__experimentalVStack, { spacing: "3", children: [
          /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
            import_components84.TextControl,
            {
              __next40pxDefaultSize: true,
              value: editedMenuTitle,
              placeholder: (0, import_i18n72.__)("Navigation title"),
              onChange: setEditedMenuTitle,
              label: (0, import_i18n72.__)("Name")
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime171.jsxs)(import_components84.__experimentalHStack, { justify: "right", children: [
            /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
              import_components84.Button,
              {
                __next40pxDefaultSize: true,
                variant: "tertiary",
                onClick: onClose,
                children: (0, import_i18n72.__)("Cancel")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
              import_components84.Button,
              {
                __next40pxDefaultSize: true,
                accessibleWhenDisabled: true,
                disabled: !isEditedMenuTitleValid,
                variant: "primary",
                type: "submit",
                onClick: (e2) => {
                  e2.preventDefault();
                  if (!isEditedMenuTitleValid) {
                    return;
                  }
                  onSave({ title: editedMenuTitle });
                  onClose();
                },
                children: (0, import_i18n72.__)("Save")
              }
            )
          ] })
        ] }) })
      }
    );
  }

  // packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.mjs
  var import_components85 = __toESM(require_components(), 1);
  var import_i18n73 = __toESM(require_i18n(), 1);
  var import_jsx_runtime172 = __toESM(require_jsx_runtime(), 1);
  function DeleteConfirmDialog({ onClose, onConfirm }) {
    return /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
      import_components85.__experimentalConfirmDialog,
      {
        isOpen: true,
        onConfirm: () => {
          onConfirm();
          onClose();
        },
        onCancel: onClose,
        confirmButtonText: (0, import_i18n73.__)("Delete"),
        size: "medium",
        children: (0, import_i18n73.__)("Are you sure you want to delete this Navigation Menu?")
      }
    );
  }

  // packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.mjs
  var import_jsx_runtime173 = __toESM(require_jsx_runtime(), 1);
  var { useHistory: useHistory14 } = unlock(import_router21.privateApis);
  var POPOVER_PROPS = {
    position: "bottom right"
  };
  function ScreenNavigationMoreMenu(props) {
    const { onDelete, onSave, onDuplicate, menuTitle, menuId } = props;
    const [renameModalOpen, setRenameModalOpen] = (0, import_element61.useState)(false);
    const [deleteConfirmDialogOpen, setDeleteConfirmDialogOpen] = (0, import_element61.useState)(false);
    const history = useHistory14();
    const closeModals = () => {
      setRenameModalOpen(false);
      setDeleteConfirmDialogOpen(false);
    };
    const openRenameModal = () => setRenameModalOpen(true);
    const openDeleteConfirmDialog = () => setDeleteConfirmDialogOpen(true);
    return /* @__PURE__ */ (0, import_jsx_runtime173.jsxs)(import_jsx_runtime173.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
        import_components86.DropdownMenu,
        {
          className: "sidebar-navigation__more-menu",
          label: (0, import_i18n74.__)("Actions"),
          icon: more_vertical_default,
          popoverProps: POPOVER_PROPS,
          children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime173.jsxs)(import_components86.MenuGroup, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
              import_components86.MenuItem,
              {
                onClick: () => {
                  openRenameModal();
                  onClose();
                },
                children: (0, import_i18n74.__)("Rename")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
              import_components86.MenuItem,
              {
                onClick: () => {
                  history.navigate(
                    `/wp_navigation/${menuId}?canvas=edit`
                  );
                },
                children: (0, import_i18n74.__)("Edit")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
              import_components86.MenuItem,
              {
                onClick: () => {
                  onDuplicate();
                  onClose();
                },
                children: (0, import_i18n74.__)("Duplicate")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
              import_components86.MenuItem,
              {
                isDestructive: true,
                onClick: () => {
                  openDeleteConfirmDialog();
                  onClose();
                },
                children: (0, import_i18n74.__)("Delete")
              }
            )
          ] })
        }
      ),
      deleteConfirmDialogOpen && /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
        DeleteConfirmDialog,
        {
          onClose: closeModals,
          onConfirm: onDelete
        }
      ),
      renameModalOpen && /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
        RenameModal,
        {
          onClose: closeModals,
          menuTitle,
          onSave
        }
      )
    ] });
  }

  // packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.mjs
  var import_element64 = __toESM(require_element(), 1);
  var import_data51 = __toESM(require_data(), 1);
  var import_block_editor21 = __toESM(require_block_editor(), 1);
  var import_blocks10 = __toESM(require_blocks(), 1);

  // packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.mjs
  var import_block_editor20 = __toESM(require_block_editor(), 1);
  var import_data50 = __toESM(require_data(), 1);
  var import_blocks9 = __toESM(require_blocks(), 1);
  var import_element63 = __toESM(require_element(), 1);
  var import_core_data35 = __toESM(require_core_data(), 1);

  // packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.mjs
  var import_components87 = __toESM(require_components(), 1);
  var import_data49 = __toESM(require_data(), 1);
  var import_element62 = __toESM(require_element(), 1);
  var import_i18n75 = __toESM(require_i18n(), 1);
  var import_block_editor19 = __toESM(require_block_editor(), 1);
  var import_router22 = __toESM(require_router(), 1);
  var import_jsx_runtime174 = __toESM(require_jsx_runtime(), 1);
  var POPOVER_PROPS2 = {
    className: "block-editor-block-settings-menu__popover",
    placement: "bottom-start"
  };
  var { useHistory: useHistory15, useLocation: useLocation20 } = unlock(import_router22.privateApis);
  function LeafMoreMenu(props) {
    const history = useHistory15();
    const { path } = useLocation20();
    const { block } = props;
    const { clientId } = block;
    const { moveBlocksDown, moveBlocksUp, removeBlocks } = (0, import_data49.useDispatch)(import_block_editor19.store);
    const removeLabel = (0, import_i18n75.sprintf)(
      /* translators: %s: block name */
      (0, import_i18n75.__)("Remove %s"),
      (0, import_block_editor19.BlockTitle)({ clientId, maximumLength: 25 })
    );
    const goToLabel = (0, import_i18n75.sprintf)(
      /* translators: %s: block name */
      (0, import_i18n75.__)("Go to %s"),
      (0, import_block_editor19.BlockTitle)({ clientId, maximumLength: 25 })
    );
    const rootClientId = (0, import_data49.useSelect)(
      (select3) => {
        const { getBlockRootClientId } = select3(import_block_editor19.store);
        return getBlockRootClientId(clientId);
      },
      [clientId]
    );
    const onGoToPage = (0, import_element62.useCallback)(
      (selectedBlock) => {
        const { attributes, name: name2 } = selectedBlock;
        if (attributes.kind === "post-type" && attributes.id && attributes.type && history) {
          history.navigate(
            `/${attributes.type}/${attributes.id}?canvas=edit`,
            {
              state: { backPath: path }
            }
          );
        }
        if (name2 === "core/page-list-item" && attributes.id && history) {
          history.navigate(`/page/${attributes.id}?canvas=edit`, {
            state: { backPath: path }
          });
        }
      },
      [path, history]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
      import_components87.DropdownMenu,
      {
        icon: more_vertical_default,
        label: (0, import_i18n75.__)("Options"),
        className: "block-editor-block-settings-menu",
        popoverProps: POPOVER_PROPS2,
        noIcons: true,
        ...props,
        children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(import_jsx_runtime174.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(import_components87.MenuGroup, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
              import_components87.MenuItem,
              {
                icon: chevron_up_default,
                onClick: () => {
                  moveBlocksUp([clientId], rootClientId);
                  onClose();
                },
                children: (0, import_i18n75.__)("Move up")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
              import_components87.MenuItem,
              {
                icon: chevron_down_default,
                onClick: () => {
                  moveBlocksDown([clientId], rootClientId);
                  onClose();
                },
                children: (0, import_i18n75.__)("Move down")
              }
            ),
            block.attributes?.type === "page" && block.attributes?.id && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
              import_components87.MenuItem,
              {
                onClick: () => {
                  onGoToPage(block);
                  onClose();
                },
                children: goToLabel
              }
            )
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_components87.MenuGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
            import_components87.MenuItem,
            {
              onClick: () => {
                removeBlocks([clientId], false);
                onClose();
              },
              children: removeLabel
            }
          ) })
        ] })
      }
    );
  }

  // packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.mjs
  var import_jsx_runtime175 = __toESM(require_jsx_runtime(), 1);
  var { PrivateListView } = unlock(import_block_editor20.privateApis);
  var MAX_PAGE_COUNT = 100;
  var PAGES_QUERY = [
    "postType",
    "page",
    {
      per_page: MAX_PAGE_COUNT,
      _fields: ["id", "link", "menu_order", "parent", "title", "type"],
      // TODO: When https://core.trac.wordpress.org/ticket/39037 REST API support for multiple orderby
      // values is resolved, update 'orderby' to [ 'menu_order', 'post_title' ] to provide a consistent
      // sort.
      orderby: "menu_order",
      order: "asc"
    }
  ];
  function NavigationMenuContent({ rootClientId }) {
    const { listViewRootClientId, isLoading } = (0, import_data50.useSelect)(
      (select3) => {
        const {
          areInnerBlocksControlled,
          getBlockName,
          getBlockCount,
          getBlockOrder
        } = select3(import_block_editor20.store);
        const { isResolving } = select3(import_core_data35.store);
        const blockClientIds = getBlockOrder(rootClientId);
        const hasOnlyPageListBlock = blockClientIds.length === 1 && getBlockName(blockClientIds[0]) === "core/page-list";
        const pageListHasBlocks = hasOnlyPageListBlock && getBlockCount(blockClientIds[0]) > 0;
        const isLoadingPages = isResolving(
          "getEntityRecords",
          PAGES_QUERY
        );
        return {
          listViewRootClientId: pageListHasBlocks ? blockClientIds[0] : rootClientId,
          // This is a small hack to wait for the navigation block
          // to actually load its inner blocks.
          isLoading: !areInnerBlocksControlled(rootClientId) || isLoadingPages
        };
      },
      [rootClientId]
    );
    const { replaceBlock, __unstableMarkNextChangeAsNotPersistent } = (0, import_data50.useDispatch)(import_block_editor20.store);
    const offCanvasOnselect = (0, import_element63.useCallback)(
      (block) => {
        if (block.name === "core/navigation-link" && !block.attributes.url) {
          __unstableMarkNextChangeAsNotPersistent();
          replaceBlock(
            block.clientId,
            (0, import_blocks9.createBlock)("core/navigation-link", block.attributes)
          );
        }
      },
      [__unstableMarkNextChangeAsNotPersistent, replaceBlock]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)(import_jsx_runtime175.Fragment, { children: [
      !isLoading && /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
        PrivateListView,
        {
          rootClientId: listViewRootClientId,
          onSelect: offCanvasOnselect,
          blockSettingsMenu: LeafMoreMenu,
          showAppender: false,
          isExpanded: true
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { className: "edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor", children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(import_block_editor20.BlockList, {}) })
    ] });
  }

  // packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.mjs
  var import_jsx_runtime176 = __toESM(require_jsx_runtime(), 1);
  var noop2 = () => {
  };
  function NavigationMenuEditor({ navigationMenuId }) {
    const { storedSettings } = (0, import_data51.useSelect)((select3) => {
      const { getSettings: getSettings7 } = unlock(select3(store));
      return {
        storedSettings: getSettings7()
      };
    }, []);
    const blocks = (0, import_element64.useMemo)(() => {
      if (!navigationMenuId) {
        return [];
      }
      return [(0, import_blocks10.createBlock)("core/navigation", { ref: navigationMenuId })];
    }, [navigationMenuId]);
    if (!navigationMenuId || !blocks?.length) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
      import_block_editor21.BlockEditorProvider,
      {
        settings: storedSettings,
        value: blocks,
        onChange: noop2,
        onInput: noop2,
        children: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)("div", { className: "edit-site-sidebar-navigation-screen-navigation-menus__content", children: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(NavigationMenuContent, { rootClientId: blocks[0].clientId }) })
      }
    );
  }

  // packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.mjs
  var import_i18n76 = __toESM(require_i18n(), 1);
  var import_html_entities5 = __toESM(require_html_entities(), 1);
  function buildNavigationLabel(title, id, status) {
    if (!title?.rendered) {
      return (0, import_i18n76.sprintf)((0, import_i18n76.__)("(no title %s)"), id);
    }
    if (status === "publish") {
      return (0, import_html_entities5.decodeEntities)(title?.rendered);
    }
    return (0, import_i18n76.sprintf)(
      // translators: 1: title of the menu. 2: status of the menu (draft, pending, etc.).
      (0, import_i18n76._x)("%1$s (%2$s)", "menu label"),
      (0, import_html_entities5.decodeEntities)(title?.rendered),
      status
    );
  }

  // packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.mjs
  var import_jsx_runtime177 = __toESM(require_jsx_runtime(), 1);
  function SingleNavigationMenu({
    navigationMenu,
    backPath,
    handleDelete,
    handleDuplicate,
    handleSave
  }) {
    const menuTitle = navigationMenu?.title?.rendered;
    return /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(
      SidebarNavigationScreenWrapper,
      {
        actions: /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(import_jsx_runtime177.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(
          ScreenNavigationMoreMenu,
          {
            menuId: navigationMenu?.id,
            menuTitle: (0, import_html_entities6.decodeEntities)(menuTitle),
            onDelete: handleDelete,
            onSave: handleSave,
            onDuplicate: handleDuplicate
          }
        ) }),
        backPath,
        title: buildNavigationLabel(
          navigationMenu?.title,
          navigationMenu?.id,
          navigationMenu?.status
        ),
        description: (0, import_i18n77.__)(
          "Navigation Menus are a curated collection of blocks that allow visitors to get around your site."
        ),
        children: /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(NavigationMenuEditor, { navigationMenuId: navigationMenu?.id })
      }
    );
  }

  // packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.mjs
  var import_core_data37 = __toESM(require_core_data(), 1);
  var import_i18n79 = __toESM(require_i18n(), 1);
  var import_data53 = __toESM(require_data(), 1);
  var import_notices4 = __toESM(require_notices(), 1);
  var import_router24 = __toESM(require_router(), 1);

  // packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/index.mjs
  var import_core_data36 = __toESM(require_core_data(), 1);
  var import_components88 = __toESM(require_components(), 1);
  var import_i18n78 = __toESM(require_i18n(), 1);
  var import_data52 = __toESM(require_data(), 1);
  var import_html_entities7 = __toESM(require_html_entities(), 1);
  var import_router23 = __toESM(require_router(), 1);
  var import_jsx_runtime178 = __toESM(require_jsx_runtime(), 1);
  var { useLocation: useLocation21 } = unlock(import_router23.privateApis);
  var postType = `wp_navigation`;
  function SidebarNavigationScreenNavigationMenu({ backPath }) {
    const {
      params: { postId }
    } = useLocation21();
    const { record: navigationMenu, isResolving } = (0, import_core_data36.useEntityRecord)(
      "postType",
      postType,
      postId
    );
    const { isSaving, isDeleting } = (0, import_data52.useSelect)(
      (select3) => {
        const { isSavingEntityRecord, isDeletingEntityRecord } = select3(import_core_data36.store);
        return {
          isSaving: isSavingEntityRecord("postType", postType, postId),
          isDeleting: isDeletingEntityRecord(
            "postType",
            postType,
            postId
          )
        };
      },
      [postId]
    );
    const isLoading = isResolving || isSaving || isDeleting;
    const menuTitle = navigationMenu?.title?.rendered || navigationMenu?.slug;
    const { handleSave, handleDelete, handleDuplicate } = useNavigationMenuHandlers();
    const _handleDelete = () => handleDelete(navigationMenu);
    const _handleSave = (edits) => handleSave(navigationMenu, edits);
    const _handleDuplicate = () => handleDuplicate(navigationMenu);
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
        SidebarNavigationScreenWrapper,
        {
          description: (0, import_i18n78.__)(
            "Navigation Menus are a curated collection of blocks that allow visitors to get around your site."
          ),
          backPath,
          children: /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(import_components88.Spinner, { className: "edit-site-sidebar-navigation-screen-navigation-menus__loading" })
        }
      );
    }
    if (!isLoading && !navigationMenu) {
      return /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
        SidebarNavigationScreenWrapper,
        {
          description: (0, import_i18n78.__)("Navigation Menu missing."),
          backPath
        }
      );
    }
    if (!navigationMenu?.content?.raw) {
      return /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
        SidebarNavigationScreenWrapper,
        {
          actions: /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
            ScreenNavigationMoreMenu,
            {
              menuId: navigationMenu?.id,
              menuTitle: (0, import_html_entities7.decodeEntities)(menuTitle),
              onDelete: _handleDelete,
              onSave: _handleSave,
              onDuplicate: _handleDuplicate
            }
          ),
          backPath,
          title: buildNavigationLabel(
            navigationMenu?.title,
            navigationMenu?.id,
            navigationMenu?.status
          ),
          description: (0, import_i18n78.__)("This Navigation Menu is empty.")
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
      SingleNavigationMenu,
      {
        navigationMenu,
        backPath,
        handleDelete: _handleDelete,
        handleSave: _handleSave,
        handleDuplicate: _handleDuplicate
      }
    );
  }

  // packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.mjs
  var { useHistory: useHistory16 } = unlock(import_router24.privateApis);
  function useDeleteNavigationMenu() {
    const { deleteEntityRecord } = (0, import_data53.useDispatch)(import_core_data37.store);
    const { createSuccessNotice, createErrorNotice } = (0, import_data53.useDispatch)(import_notices4.store);
    const history = useHistory16();
    const handleDelete = async (navigationMenu) => {
      const postId = navigationMenu?.id;
      try {
        await deleteEntityRecord(
          "postType",
          postType,
          postId,
          {
            force: true
          },
          {
            throwOnError: true
          }
        );
        createSuccessNotice(
          (0, import_i18n79.__)("Navigation Menu successfully deleted."),
          {
            type: "snackbar"
          }
        );
        history.navigate("/navigation");
      } catch (error) {
        createErrorNotice(
          (0, import_i18n79.sprintf)(
            /* translators: %s: error message describing why the navigation menu could not be deleted. */
            (0, import_i18n79.__)(`Unable to delete Navigation Menu (%s).`),
            error?.message
          ),
          {
            type: "snackbar"
          }
        );
      }
    };
    return handleDelete;
  }
  function useSaveNavigationMenu() {
    const { getEditedEntityRecord } = (0, import_data53.useSelect)((select3) => {
      const { getEditedEntityRecord: getEditedEntityRecordSelector } = select3(import_core_data37.store);
      return {
        getEditedEntityRecord: getEditedEntityRecordSelector
      };
    }, []);
    const {
      editEntityRecord,
      __experimentalSaveSpecifiedEntityEdits: saveSpecifiedEntityEdits
    } = (0, import_data53.useDispatch)(import_core_data37.store);
    const { createSuccessNotice, createErrorNotice } = (0, import_data53.useDispatch)(import_notices4.store);
    const handleSave = async (navigationMenu, edits) => {
      if (!edits) {
        return;
      }
      const postId = navigationMenu?.id;
      const originalRecord = getEditedEntityRecord(
        "postType",
        NAVIGATION_POST_TYPE,
        postId
      );
      editEntityRecord("postType", postType, postId, edits);
      const recordPropertiesToSave = Object.keys(edits);
      try {
        await saveSpecifiedEntityEdits(
          "postType",
          postType,
          postId,
          recordPropertiesToSave,
          {
            throwOnError: true
          }
        );
        createSuccessNotice((0, import_i18n79.__)("Renamed Navigation Menu"), {
          type: "snackbar"
        });
      } catch (error) {
        editEntityRecord("postType", postType, postId, originalRecord);
        createErrorNotice(
          (0, import_i18n79.sprintf)(
            /* translators: %s: error message describing why the navigation menu could not be renamed. */
            (0, import_i18n79.__)(`Unable to rename Navigation Menu (%s).`),
            error?.message
          ),
          {
            type: "snackbar"
          }
        );
      }
    };
    return handleSave;
  }
  function useDuplicateNavigationMenu() {
    const history = useHistory16();
    const { saveEntityRecord } = (0, import_data53.useDispatch)(import_core_data37.store);
    const { createSuccessNotice, createErrorNotice } = (0, import_data53.useDispatch)(import_notices4.store);
    const handleDuplicate = async (navigationMenu) => {
      const menuTitle = navigationMenu?.title?.rendered || navigationMenu?.slug;
      try {
        const savedRecord = await saveEntityRecord(
          "postType",
          postType,
          {
            title: (0, import_i18n79.sprintf)(
              /* translators: %s: Navigation menu title */
              (0, import_i18n79._x)("%s (Copy)", "navigation menu"),
              menuTitle
            ),
            content: navigationMenu?.content?.raw,
            status: "publish"
          },
          {
            throwOnError: true
          }
        );
        if (savedRecord) {
          createSuccessNotice((0, import_i18n79.__)("Duplicated Navigation Menu"), {
            type: "snackbar"
          });
          history.navigate(`/wp_navigation/${savedRecord.id}`);
        }
      } catch (error) {
        createErrorNotice(
          (0, import_i18n79.sprintf)(
            /* translators: %s: error message describing why the navigation menu could not be deleted. */
            (0, import_i18n79.__)(`Unable to duplicate Navigation Menu (%s).`),
            error?.message
          ),
          {
            type: "snackbar"
          }
        );
      }
    };
    return handleDuplicate;
  }
  function useNavigationMenuHandlers() {
    return {
      handleDelete: useDeleteNavigationMenu(),
      handleSave: useSaveNavigationMenu(),
      handleDuplicate: useDuplicateNavigationMenu()
    };
  }

  // packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menus/index.mjs
  var import_jsx_runtime179 = __toESM(require_jsx_runtime(), 1);
  function buildMenuLabel(title, id, status) {
    if (!title) {
      return (0, import_i18n80.sprintf)((0, import_i18n80.__)("(no title %s)"), id);
    }
    if (status === "publish") {
      return (0, import_html_entities8.decodeEntities)(title);
    }
    return (0, import_i18n80.sprintf)(
      // translators: 1: title of the menu. 2: status of the menu (draft, pending, etc.).
      (0, import_i18n80._x)("%1$s (%2$s)", "menu label"),
      (0, import_html_entities8.decodeEntities)(title),
      status
    );
  }
  function SidebarNavigationScreenNavigationMenus({ backPath }) {
    const {
      records: navigationMenus,
      isResolving: isResolvingNavigationMenus,
      hasResolved: hasResolvedNavigationMenus
    } = (0, import_core_data38.useEntityRecords)(
      "postType",
      NAVIGATION_POST_TYPE,
      PRELOADED_NAVIGATION_MENUS_QUERY
    );
    const isLoading = isResolvingNavigationMenus && !hasResolvedNavigationMenus;
    const { getNavigationFallbackId } = unlock((0, import_data54.useSelect)(import_core_data38.store));
    const isCreatingNavigationFallback = (0, import_data54.useSelect)(
      (select3) => select3(import_core_data38.store).isResolving("getNavigationFallbackId"),
      []
    );
    const firstNavigationMenu = navigationMenus?.[0];
    if (!firstNavigationMenu && !isResolvingNavigationMenus && hasResolvedNavigationMenus && // Ensure a fallback navigation is created only once
    !isCreatingNavigationFallback) {
      getNavigationFallbackId();
    }
    const { handleSave, handleDelete, handleDuplicate } = useNavigationMenuHandlers();
    const hasNavigationMenus = !!navigationMenus?.length;
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(SidebarNavigationScreenWrapper, { backPath, children: /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(import_components89.Spinner, { className: "edit-site-sidebar-navigation-screen-navigation-menus__loading" }) });
    }
    if (!isLoading && !hasNavigationMenus) {
      return /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
        SidebarNavigationScreenWrapper,
        {
          description: (0, import_i18n80.__)("No Navigation Menus found."),
          backPath
        }
      );
    }
    if (navigationMenus?.length === 1) {
      return /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
        SingleNavigationMenu,
        {
          navigationMenu: firstNavigationMenu,
          backPath,
          handleDelete: () => handleDelete(firstNavigationMenu),
          handleDuplicate: () => handleDuplicate(firstNavigationMenu),
          handleSave: (edits) => handleSave(firstNavigationMenu, edits)
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(SidebarNavigationScreenWrapper, { backPath, children: /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(import_components89.__experimentalItemGroup, { className: "edit-site-sidebar-navigation-screen-navigation-menus", children: navigationMenus?.map(({ id, title, status }, index) => /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
      NavMenuItem,
      {
        postId: id,
        withChevron: true,
        icon: navigation_default,
        children: buildMenuLabel(title?.rendered, index + 1, status)
      },
      id
    )) }) });
  }
  function SidebarNavigationScreenWrapper({
    children,
    actions,
    title,
    description,
    backPath
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
      SidebarNavigationScreen,
      {
        title: title || (0, import_i18n80.__)("Navigation"),
        actions,
        description: description || (0, import_i18n80.__)("Manage your Navigation Menus."),
        backPath,
        content: children
      }
    );
  }
  var NavMenuItem = ({ postId, ...props }) => {
    return /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
      SidebarNavigationItem,
      {
        to: `/wp_navigation/${postId}`,
        ...props
      }
    );
  };

  // packages/edit-site/build-module/components/site-editor-routes/navigation.mjs
  var import_jsx_runtime180 = __toESM(require_jsx_runtime(), 1);
  var { useLocation: useLocation22 } = unlock(import_router25.privateApis);
  function MobileNavigationView() {
    const { query = {} } = useLocation22();
    const { canvas = "view" } = query;
    return canvas === "edit" ? /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(EditSiteEditor, {}) : /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(SidebarNavigationScreenNavigationMenus, { backPath: "/" });
  }
  var navigationRoute = {
    name: "navigation",
    path: "/navigation",
    areas: {
      sidebar({ siteData }) {
        const isBlockTheme = siteData.currentTheme?.is_block_theme;
        return isBlockTheme ? /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(SidebarNavigationScreenNavigationMenus, { backPath: "/" }) : /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(SidebarNavigationScreenUnsupported, {});
      },
      preview({ siteData }) {
        const isBlockTheme = siteData.currentTheme?.is_block_theme;
        return isBlockTheme ? /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(EditSiteEditor, {}) : void 0;
      },
      mobile({ siteData }) {
        const isBlockTheme = siteData.currentTheme?.is_block_theme;
        return isBlockTheme ? /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(MobileNavigationView, {}) : /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(SidebarNavigationScreenUnsupported, {});
      }
    }
  };

  // packages/edit-site/build-module/components/site-editor-routes/navigation-item.mjs
  var import_router26 = __toESM(require_router(), 1);
  var import_jsx_runtime181 = __toESM(require_jsx_runtime(), 1);
  var { useLocation: useLocation23 } = unlock(import_router26.privateApis);
  function MobileNavigationItemView() {
    const { query = {} } = useLocation23();
    const { canvas = "view" } = query;
    return canvas === "edit" ? /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(EditSiteEditor, {}) : /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(SidebarNavigationScreenNavigationMenu, { backPath: "/navigation" });
  }
  var navigationItemRoute = {
    name: "navigation-item",
    path: "/wp_navigation/:postId",
    areas: {
      sidebar({ siteData }) {
        const isBlockTheme = siteData.currentTheme?.is_block_theme;
        return isBlockTheme ? /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(SidebarNavigationScreenNavigationMenu, { backPath: "/navigation" }) : /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(SidebarNavigationScreenUnsupported, {});
      },
      preview({ siteData }) {
        const isBlockTheme = siteData.currentTheme?.is_block_theme;
        return isBlockTheme ? /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(EditSiteEditor, {}) : /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(SidebarNavigationScreenUnsupported, {});
      },
      mobile({ siteData }) {
        const isBlockTheme = siteData.currentTheme?.is_block_theme;
        return isBlockTheme ? /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(MobileNavigationItemView, {}) : /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(SidebarNavigationScreenUnsupported, {});
      }
    }
  };

  // packages/edit-site/build-module/components/sidebar-navigation-screen-patterns/index.mjs
  var import_components90 = __toESM(require_components(), 1);
  var import_editor27 = __toESM(require_editor(), 1);
  var import_i18n82 = __toESM(require_i18n(), 1);
  var import_router27 = __toESM(require_router(), 1);

  // packages/edit-site/build-module/components/sidebar-navigation-screen-patterns/category-item.mjs
  var import_jsx_runtime182 = __toESM(require_jsx_runtime(), 1);
  function CategoryItem({
    count,
    icon,
    id,
    isActive,
    label,
    type
  }) {
    if (!count) {
      return;
    }
    const queryArgs = [`postType=${type}`];
    if (id) {
      queryArgs.push(`categoryId=${id}`);
    }
    return /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
      SidebarNavigationItem,
      {
        icon,
        suffix: /* @__PURE__ */ (0, import_jsx_runtime182.jsx)("span", { children: count }),
        "aria-current": isActive ? "true" : void 0,
        to: `/pattern?${queryArgs.join("&")}`,
        children: label
      }
    );
  }

  // packages/edit-site/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.mjs
  var import_element67 = __toESM(require_element(), 1);
  var import_i18n81 = __toESM(require_i18n(), 1);

  // packages/edit-site/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.mjs
  var import_core_data39 = __toESM(require_core_data(), 1);
  var import_data55 = __toESM(require_data(), 1);
  function useDefaultPatternCategories() {
    const blockPatternCategories = (0, import_data55.useSelect)((select3) => {
      const { getSettings: getSettings7 } = unlock(select3(store));
      const settings2 = getSettings7();
      return settings2.__experimentalAdditionalBlockPatternCategories ?? settings2.__experimentalBlockPatternCategories;
    });
    const restBlockPatternCategories = (0, import_data55.useSelect)(
      (select3) => select3(import_core_data39.store).getBlockPatternCategories()
    );
    return [
      ...blockPatternCategories || [],
      ...restBlockPatternCategories || []
    ];
  }

  // packages/edit-site/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.mjs
  var import_core_data40 = __toESM(require_core_data(), 1);
  var import_data56 = __toESM(require_data(), 1);
  var import_element65 = __toESM(require_element(), 1);

  // packages/edit-site/build-module/components/page-patterns/utils.mjs
  var filterOutDuplicatesByName = (currentItem, index, items) => index === items.findIndex((item) => currentItem.name === item.name);

  // packages/edit-site/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.mjs
  function useThemePatterns() {
    const blockPatterns = (0, import_data56.useSelect)((select3) => {
      const { getSettings: getSettings7 } = unlock(select3(store));
      return getSettings7().__experimentalAdditionalBlockPatterns ?? getSettings7().__experimentalBlockPatterns;
    });
    const restBlockPatterns = (0, import_data56.useSelect)(
      (select3) => select3(import_core_data40.store).getBlockPatterns()
    );
    const patterns = (0, import_element65.useMemo)(
      () => [...blockPatterns || [], ...restBlockPatterns || []].filter(
        (pattern) => !EXCLUDED_PATTERN_SOURCES.includes(pattern.source)
      ).filter(filterOutDuplicatesByName).filter((pattern) => pattern.inserter !== false),
      [blockPatterns, restBlockPatterns]
    );
    return patterns;
  }

  // packages/edit-site/build-module/components/page-patterns/use-patterns.mjs
  var import_blocks11 = __toESM(require_blocks(), 1);
  var import_data57 = __toESM(require_data(), 1);
  var import_core_data41 = __toESM(require_core_data(), 1);
  var import_element66 = __toESM(require_element(), 1);

  // packages/edit-site/build-module/components/page-patterns/search-items.mjs
  var import_block_editor22 = __toESM(require_block_editor(), 1);
  var { extractWords, getNormalizedSearchTerms, normalizeString } = unlock(
    import_block_editor22.privateApis
  );
  var defaultGetName = (item) => {
    if (item.type === PATTERN_TYPES.user) {
      return item.slug;
    }
    if (item.type === TEMPLATE_PART_POST_TYPE) {
      return "";
    }
    return item.name || "";
  };
  var defaultGetTitle = (item) => {
    if (typeof item.title === "string") {
      return item.title;
    }
    if (item.title && item.title.rendered) {
      return item.title.rendered;
    }
    if (item.title && item.title.raw) {
      return item.title.raw;
    }
    return "";
  };
  var defaultGetDescription = (item) => {
    if (item.type === PATTERN_TYPES.user) {
      return item.excerpt.raw;
    }
    return item.description || "";
  };
  var defaultGetKeywords = (item) => item.keywords || [];
  var defaultHasCategory = () => false;
  var removeMatchingTerms = (unmatchedTerms, unprocessedTerms) => {
    return unmatchedTerms.filter(
      (term) => !getNormalizedSearchTerms(unprocessedTerms).some(
        (unprocessedTerm) => unprocessedTerm.includes(term)
      )
    );
  };
  var searchItems = (items = [], searchInput = "", config2 = {}) => {
    const normalizedSearchTerms = getNormalizedSearchTerms(searchInput);
    const onlyFilterByCategory = config2.categoryId !== PATTERN_DEFAULT_CATEGORY && !normalizedSearchTerms.length;
    const searchRankConfig = { ...config2, onlyFilterByCategory };
    const threshold = onlyFilterByCategory ? 0 : 1;
    const rankedItems = items.map((item) => {
      return [
        item,
        getItemSearchRank(item, searchInput, searchRankConfig)
      ];
    }).filter(([, rank]) => rank > threshold);
    if (normalizedSearchTerms.length === 0) {
      return rankedItems.map(([item]) => item);
    }
    rankedItems.sort(([, rank1], [, rank2]) => rank2 - rank1);
    return rankedItems.map(([item]) => item);
  };
  function getItemSearchRank(item, searchTerm, config2) {
    const {
      categoryId,
      getName = defaultGetName,
      getTitle = defaultGetTitle,
      getDescription = defaultGetDescription,
      getKeywords = defaultGetKeywords,
      hasCategory = defaultHasCategory,
      onlyFilterByCategory
    } = config2;
    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;
    if (!rank || onlyFilterByCategory) {
      return rank;
    }
    const name2 = getName(item);
    const title = getTitle(item);
    const description = getDescription(item);
    const keywords = getKeywords(item);
    const normalizedSearchInput = normalizeString(searchTerm);
    const normalizedTitle = normalizeString(title);
    if (normalizedSearchInput === normalizedTitle) {
      rank += 30;
    } else if (normalizedTitle.startsWith(normalizedSearchInput)) {
      rank += 20;
    } else {
      const terms = [name2, title, description, ...keywords].join(" ");
      const normalizedSearchTerms = extractWords(normalizedSearchInput);
      const unmatchedTerms = removeMatchingTerms(
        normalizedSearchTerms,
        terms
      );
      if (unmatchedTerms.length === 0) {
        rank += 10;
      }
    }
    return rank;
  }

  // packages/edit-site/build-module/components/page-patterns/use-patterns.mjs
  var EMPTY_PATTERN_LIST = [];
  var selectTemplateParts = (0, import_data57.createSelector)(
    (select3, categoryId, search = "") => {
      const {
        getEntityRecords,
        getCurrentTheme,
        isResolving: isResolvingSelector
      } = select3(import_core_data41.store);
      const query = { per_page: -1 };
      const templateParts = getEntityRecords("postType", TEMPLATE_PART_POST_TYPE, query) ?? EMPTY_PATTERN_LIST;
      const knownAreas = getCurrentTheme()?.default_template_part_areas || [];
      const templatePartAreas = knownAreas.map((area) => area.area);
      const templatePartHasCategory = (item, category) => {
        if (category !== TEMPLATE_PART_AREA_DEFAULT_CATEGORY) {
          return item.area === category;
        }
        return item.area === category || !templatePartAreas.includes(item.area);
      };
      const isResolving = isResolvingSelector("getEntityRecords", [
        "postType",
        TEMPLATE_PART_POST_TYPE,
        query
      ]);
      const patterns = searchItems(templateParts, search, {
        categoryId,
        hasCategory: templatePartHasCategory
      });
      return { patterns, isResolving };
    },
    (select3) => [
      select3(import_core_data41.store).getEntityRecords(
        "postType",
        TEMPLATE_PART_POST_TYPE,
        {
          per_page: -1
        }
      ),
      select3(import_core_data41.store).isResolving("getEntityRecords", [
        "postType",
        TEMPLATE_PART_POST_TYPE,
        { per_page: -1 }
      ]),
      select3(import_core_data41.store).getCurrentTheme()?.default_template_part_areas
    ]
  );
  var selectThemePatterns = (0, import_data57.createSelector)(
    (select3) => {
      const { getSettings: getSettings7 } = unlock(select3(store));
      const { isResolving: isResolvingSelector } = select3(import_core_data41.store);
      const settings2 = getSettings7();
      const blockPatterns = settings2.__experimentalAdditionalBlockPatterns ?? settings2.__experimentalBlockPatterns;
      const restBlockPatterns = select3(import_core_data41.store).getBlockPatterns();
      const patterns = [
        ...blockPatterns || [],
        ...restBlockPatterns || []
      ].filter(
        (pattern) => !EXCLUDED_PATTERN_SOURCES.includes(pattern.source)
      ).filter(filterOutDuplicatesByName).filter((pattern) => pattern.inserter !== false).map((pattern) => ({
        ...pattern,
        keywords: pattern.keywords || [],
        type: PATTERN_TYPES.theme,
        blocks: (0, import_blocks11.parse)(pattern.content, {
          __unstableSkipMigrationLogs: true
        })
      }));
      return {
        patterns,
        isResolving: isResolvingSelector("getBlockPatterns")
      };
    },
    (select3) => [
      select3(import_core_data41.store).getBlockPatterns(),
      select3(import_core_data41.store).isResolving("getBlockPatterns"),
      unlock(select3(store)).getSettings()
    ]
  );
  var selectPatterns = (0, import_data57.createSelector)(
    (select3, categoryId, syncStatus, search = "") => {
      const {
        patterns: themePatterns,
        isResolving: isResolvingThemePatterns
      } = selectThemePatterns(select3);
      const {
        patterns: userPatterns,
        isResolving: isResolvingUserPatterns,
        categories: userPatternCategories
      } = selectUserPatterns(select3);
      let patterns = [
        ...themePatterns || [],
        ...userPatterns || []
      ];
      if (syncStatus) {
        patterns = patterns.filter((pattern) => {
          return pattern.type === PATTERN_TYPES.user ? (pattern.wp_pattern_sync_status || PATTERN_SYNC_TYPES.full) === syncStatus : syncStatus === PATTERN_SYNC_TYPES.unsynced;
        });
      }
      if (categoryId) {
        patterns = searchItems(patterns, search, {
          categoryId,
          hasCategory: (item, currentCategory) => {
            if (item.type === PATTERN_TYPES.user) {
              return item.wp_pattern_category?.some(
                (catId) => userPatternCategories.find(
                  (cat) => cat.id === catId
                )?.slug === currentCategory
              );
            }
            return item.categories?.includes(currentCategory);
          }
        });
      } else {
        patterns = searchItems(patterns, search, {
          hasCategory: (item) => {
            if (item.type === PATTERN_TYPES.user) {
              return userPatternCategories?.length && (!item.wp_pattern_category?.length || !item.wp_pattern_category?.some(
                (catId) => userPatternCategories.find(
                  (cat) => cat.id === catId
                )
              ));
            }
            return !item.hasOwnProperty("categories");
          }
        });
      }
      return {
        patterns,
        isResolving: isResolvingThemePatterns || isResolvingUserPatterns
      };
    },
    (select3) => [
      selectThemePatterns(select3),
      selectUserPatterns(select3)
    ]
  );
  var selectUserPatterns = (0, import_data57.createSelector)(
    (select3, syncStatus, search = "") => {
      const {
        getEntityRecords,
        isResolving: isResolvingSelector,
        getUserPatternCategories
      } = select3(import_core_data41.store);
      const query = { per_page: -1 };
      const patternPosts = getEntityRecords(
        "postType",
        PATTERN_TYPES.user,
        query
      );
      const userPatternCategories = getUserPatternCategories();
      const categories = /* @__PURE__ */ new Map();
      userPatternCategories.forEach(
        (userCategory) => categories.set(userCategory.id, userCategory)
      );
      let patterns = patternPosts ?? EMPTY_PATTERN_LIST;
      const isResolving = isResolvingSelector("getEntityRecords", [
        "postType",
        PATTERN_TYPES.user,
        query
      ]);
      if (syncStatus) {
        patterns = patterns.filter(
          (pattern) => pattern.wp_pattern_sync_status || PATTERN_SYNC_TYPES.full === syncStatus
        );
      }
      patterns = searchItems(patterns, search, {
        // We exit user pattern retrieval early if we aren't in the
        // catch-all category for user created patterns, so it has
        // to be in the category.
        hasCategory: () => true
      });
      return {
        patterns,
        isResolving,
        categories: userPatternCategories
      };
    },
    (select3) => [
      select3(import_core_data41.store).getEntityRecords("postType", PATTERN_TYPES.user, {
        per_page: -1
      }),
      select3(import_core_data41.store).isResolving("getEntityRecords", [
        "postType",
        PATTERN_TYPES.user,
        { per_page: -1 }
      ]),
      select3(import_core_data41.store).getUserPatternCategories()
    ]
  );
  function useAugmentPatternsWithPermissions(patterns) {
    const idsAndTypes = (0, import_element66.useMemo)(
      () => patterns?.filter((record) => record.type !== PATTERN_TYPES.theme).map((record) => [record.type, record.id]) ?? [],
      [patterns]
    );
    const permissions = (0, import_data57.useSelect)(
      (select3) => {
        const { getEntityRecordPermissions } = unlock(
          select3(import_core_data41.store)
        );
        return idsAndTypes.reduce((acc, [type, id]) => {
          acc[id] = getEntityRecordPermissions("postType", type, id);
          return acc;
        }, {});
      },
      [idsAndTypes]
    );
    return (0, import_element66.useMemo)(
      () => patterns?.map((record) => ({
        ...record,
        permissions: permissions?.[record.id] ?? {}
      })) ?? [],
      [patterns, permissions]
    );
  }
  var usePatterns = (postType2, categoryId, { search = "", syncStatus } = {}) => {
    return (0, import_data57.useSelect)(
      (select3) => {
        if (postType2 === TEMPLATE_PART_POST_TYPE) {
          return selectTemplateParts(select3, categoryId, search);
        } else if (postType2 === PATTERN_TYPES.user && !!categoryId) {
          const appliedCategory = categoryId === "uncategorized" ? "" : categoryId;
          return selectPatterns(
            select3,
            appliedCategory,
            syncStatus,
            search
          );
        } else if (postType2 === PATTERN_TYPES.user) {
          return selectUserPatterns(select3, syncStatus, search);
        }
        return {
          patterns: EMPTY_PATTERN_LIST,
          isResolving: false
        };
      },
      [categoryId, postType2, search, syncStatus]
    );
  };
  var use_patterns_default = usePatterns;

  // packages/edit-site/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.mjs
  function usePatternCategories() {
    const defaultCategories = useDefaultPatternCategories();
    defaultCategories.push({
      name: TEMPLATE_PART_AREA_DEFAULT_CATEGORY,
      label: (0, import_i18n81.__)("Uncategorized")
    });
    const themePatterns = useThemePatterns();
    const { patterns: userPatterns, categories: userPatternCategories } = use_patterns_default(PATTERN_TYPES.user);
    const patternCategories = (0, import_element67.useMemo)(() => {
      const categoryMap = {};
      const categoriesWithCounts = [];
      defaultCategories.forEach((category) => {
        if (!categoryMap[category.name]) {
          categoryMap[category.name] = { ...category, count: 0 };
        }
      });
      userPatternCategories.forEach((category) => {
        if (!categoryMap[category.name]) {
          categoryMap[category.name] = { ...category, count: 0 };
        }
      });
      themePatterns.forEach((pattern) => {
        pattern.categories?.forEach((category) => {
          if (categoryMap[category]) {
            categoryMap[category].count += 1;
          }
        });
        if (!pattern.categories?.length) {
          categoryMap.uncategorized.count += 1;
        }
      });
      userPatterns.forEach((pattern) => {
        pattern.wp_pattern_category?.forEach((catId) => {
          const category = userPatternCategories.find(
            (cat) => cat.id === catId
          )?.name;
          if (categoryMap[category]) {
            categoryMap[category].count += 1;
          }
        });
        if (!pattern.wp_pattern_category?.length || !pattern.wp_pattern_category?.some(
          (catId) => userPatternCategories.find((cat) => cat.id === catId)
        )) {
          categoryMap.uncategorized.count += 1;
        }
      });
      [...defaultCategories, ...userPatternCategories].forEach(
        (category) => {
          if (categoryMap[category.name].count && !categoriesWithCounts.find(
            (cat) => cat.name === category.name
          )) {
            categoriesWithCounts.push(categoryMap[category.name]);
          }
        }
      );
      const sortedCategories = categoriesWithCounts.sort(
        (a2, b2) => a2.label.localeCompare(b2.label)
      );
      sortedCategories.unshift({
        name: PATTERN_USER_CATEGORY,
        label: (0, import_i18n81.__)("My patterns"),
        count: userPatterns.length
      });
      sortedCategories.unshift({
        name: PATTERN_DEFAULT_CATEGORY,
        label: (0, import_i18n81.__)("All patterns"),
        description: (0, import_i18n81.__)("A list of all patterns from all sources."),
        count: themePatterns.length + userPatterns.length
      });
      return sortedCategories;
    }, [
      defaultCategories,
      themePatterns,
      userPatternCategories,
      userPatterns
    ]);
    return { patternCategories, hasPatterns: !!patternCategories.length };
  }

  // packages/edit-site/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.mjs
  var import_core_data42 = __toESM(require_core_data(), 1);
  var import_data58 = __toESM(require_data(), 1);
  var import_block_library2 = __toESM(require_block_library(), 1);
  var { NAVIGATION_OVERLAY_TEMPLATE_PART_AREA } = unlock(
    import_block_library2.privateApis
  );
  var useTemplatePartsGroupedByArea = (items) => {
    const allItems = items || [];
    const templatePartAreas = (0, import_data58.useSelect)(
      (select3) => select3(import_core_data42.store).getCurrentTheme()?.default_template_part_areas || [],
      []
    );
    const knownAreas = {
      header: {},
      footer: {},
      sidebar: {},
      uncategorized: {},
      [NAVIGATION_OVERLAY_TEMPLATE_PART_AREA]: {}
    };
    templatePartAreas.forEach(
      (templatePartArea) => knownAreas[templatePartArea.area] = {
        ...templatePartArea,
        templateParts: []
      }
    );
    const groupedByArea = allItems.reduce((accumulator, item) => {
      const key = accumulator[item.area] ? item.area : TEMPLATE_PART_AREA_DEFAULT_CATEGORY;
      accumulator[key]?.templateParts?.push(item);
      return accumulator;
    }, knownAreas);
    return groupedByArea;
  };
  function useTemplatePartAreas() {
    const { records: templateParts, isResolving: isLoading } = (0, import_core_data42.useEntityRecords)(
      "postType",
      TEMPLATE_PART_POST_TYPE,
      { per_page: -1 }
    );
    return {
      hasTemplateParts: templateParts ? !!templateParts.length : false,
      isLoading,
      templatePartAreas: useTemplatePartsGroupedByArea(templateParts)
    };
  }

  // packages/edit-site/build-module/components/sidebar-navigation-screen-patterns/index.mjs
  var import_jsx_runtime183 = __toESM(require_jsx_runtime(), 1);
  var { useLocation: useLocation24 } = unlock(import_router27.privateApis);
  function CategoriesGroup({
    templatePartAreas,
    patternCategories,
    currentCategory,
    currentType
  }) {
    const [allPatterns, ...otherPatterns] = patternCategories;
    return /* @__PURE__ */ (0, import_jsx_runtime183.jsxs)(import_components90.__experimentalItemGroup, { className: "edit-site-sidebar-navigation-screen-patterns__group", children: [
      /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
        CategoryItem,
        {
          count: Object.values(templatePartAreas).map(({ templateParts }) => templateParts?.length || 0).reduce((acc, val) => acc + val, 0),
          icon: (0, import_editor27.getTemplatePartIcon)(),
          label: (0, import_i18n82.__)("All template parts"),
          id: TEMPLATE_PART_ALL_AREAS_CATEGORY,
          type: TEMPLATE_PART_POST_TYPE,
          isActive: currentCategory === TEMPLATE_PART_ALL_AREAS_CATEGORY && currentType === TEMPLATE_PART_POST_TYPE
        },
        "all"
      ),
      Object.entries(templatePartAreas).map(
        ([area, { label, templateParts, icon }]) => /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
          CategoryItem,
          {
            count: templateParts?.length,
            icon: (0, import_editor27.getTemplatePartIcon)(icon),
            label,
            id: area,
            type: TEMPLATE_PART_POST_TYPE,
            isActive: currentCategory === area && currentType === TEMPLATE_PART_POST_TYPE
          },
          area
        )
      ),
      /* @__PURE__ */ (0, import_jsx_runtime183.jsx)("div", { className: "edit-site-sidebar-navigation-screen-patterns__divider" }),
      allPatterns && /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
        CategoryItem,
        {
          count: allPatterns.count,
          label: allPatterns.label,
          icon: file_default,
          id: allPatterns.name,
          type: PATTERN_TYPES.user,
          isActive: currentCategory === `${allPatterns.name}` && currentType === PATTERN_TYPES.user
        },
        allPatterns.name
      ),
      otherPatterns.map((category) => /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
        CategoryItem,
        {
          count: category.count,
          label: category.label,
          icon: file_default,
          id: category.name,
          type: PATTERN_TYPES.user,
          isActive: currentCategory === `${category.name}` && currentType === PATTERN_TYPES.user
        },
        category.name
      ))
    ] });
  }
  function SidebarNavigationScreenPatterns({ backPath }) {
    const {
      query: { postType: postType2 = "wp_block", categoryId }
    } = useLocation24();
    const currentCategory = categoryId || (postType2 === PATTERN_TYPES.user ? PATTERN_DEFAULT_CATEGORY : TEMPLATE_PART_ALL_AREAS_CATEGORY);
    const { templatePartAreas, hasTemplateParts, isLoading } = useTemplatePartAreas();
    const { patternCategories, hasPatterns } = usePatternCategories();
    return /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
      SidebarNavigationScreen,
      {
        title: (0, import_i18n82.__)("Patterns"),
        description: (0, import_i18n82.__)(
          "Manage what patterns are available when editing the site."
        ),
        isRoot: !backPath,
        backPath,
        content: /* @__PURE__ */ (0, import_jsx_runtime183.jsxs)(import_jsx_runtime183.Fragment, { children: [
          isLoading && (0, import_i18n82.__)("Loading items\u2026"),
          !isLoading && /* @__PURE__ */ (0, import_jsx_runtime183.jsxs)(import_jsx_runtime183.Fragment, { children: [
            !hasTemplateParts && !hasPatterns && /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(import_components90.__experimentalItemGroup, { className: "edit-site-sidebar-navigation-screen-patterns__group", children: /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(import_components90.__experimentalItem, { children: (0, import_i18n82.__)("No items found") }) }),
            /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
              CategoriesGroup,
              {
                templatePartAreas,
                patternCategories,
                currentCategory,
                currentType: postType2
              }
            )
          ] })
        ] })
      }
    );
  }

  // packages/edit-site/build-module/components/page-patterns/index.mjs
  var import_i18n139 = __toESM(require_i18n(), 1);
  var import_element141 = __toESM(require_element(), 1);
  var import_block_editor25 = __toESM(require_block_editor(), 1);

  // packages/dataviews/build-module/dataviews/index.mjs
  var import_element121 = __toESM(require_element(), 1);
  var import_compose23 = __toESM(require_compose(), 1);

  // packages/dataviews/build-module/components/dataviews-context/index.mjs
  var import_element68 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/constants.mjs
  var import_i18n83 = __toESM(require_i18n(), 1);
  var OPERATOR_IS_ANY2 = "isAny";
  var OPERATOR_IS_NONE2 = "isNone";
  var OPERATOR_IS_ALL = "isAll";
  var OPERATOR_IS_NOT_ALL = "isNotAll";
  var OPERATOR_BETWEEN = "between";
  var OPERATOR_IN_THE_PAST = "inThePast";
  var OPERATOR_OVER = "over";
  var OPERATOR_IS2 = "is";
  var OPERATOR_IS_NOT = "isNot";
  var OPERATOR_LESS_THAN = "lessThan";
  var OPERATOR_GREATER_THAN = "greaterThan";
  var OPERATOR_LESS_THAN_OR_EQUAL = "lessThanOrEqual";
  var OPERATOR_GREATER_THAN_OR_EQUAL = "greaterThanOrEqual";
  var OPERATOR_BEFORE2 = "before";
  var OPERATOR_AFTER2 = "after";
  var OPERATOR_BEFORE_INC = "beforeInc";
  var OPERATOR_AFTER_INC = "afterInc";
  var OPERATOR_CONTAINS = "contains";
  var OPERATOR_NOT_CONTAINS = "notContains";
  var OPERATOR_STARTS_WITH = "startsWith";
  var OPERATOR_ON = "on";
  var OPERATOR_NOT_ON = "notOn";
  var SORTING_DIRECTIONS = ["asc", "desc"];
  var sortArrows = { asc: "\u2191", desc: "\u2193" };
  var sortValues = { asc: "ascending", desc: "descending" };
  var sortLabels = {
    asc: (0, import_i18n83.__)("Sort ascending"),
    desc: (0, import_i18n83.__)("Sort descending")
  };
  var sortIcons = {
    asc: arrow_up_default,
    desc: arrow_down_default
  };
  var LAYOUT_TABLE2 = "table";
  var LAYOUT_GRID2 = "grid";
  var LAYOUT_LIST2 = "list";
  var LAYOUT_ACTIVITY = "activity";
  var LAYOUT_PICKER_GRID = "pickerGrid";
  var LAYOUT_PICKER_TABLE = "pickerTable";

  // packages/dataviews/build-module/components/dataviews-context/index.mjs
  var DataViewsContext = (0, import_element68.createContext)({
    view: { type: LAYOUT_TABLE2 },
    onChangeView: () => {
    },
    fields: [],
    data: [],
    paginationInfo: {
      totalItems: 0,
      totalPages: 0
    },
    selection: [],
    onChangeSelection: () => {
    },
    setOpenedFilter: () => {
    },
    openedFilter: null,
    getItemId: (item) => item.id,
    isItemClickable: () => true,
    renderItemLink: void 0,
    containerWidth: 0,
    containerRef: (0, import_element68.createRef)(),
    resizeObserverRef: () => {
    },
    defaultLayouts: { list: {}, grid: {}, table: {} },
    filters: [],
    isShowingFilter: false,
    setIsShowingFilter: () => {
    },
    hasInitiallyLoaded: false,
    hasInfiniteScrollHandler: false,
    config: {
      perPageSizes: []
    }
  });
  DataViewsContext.displayName = "DataViewsContext";
  var dataviews_context_default = DataViewsContext;

  // packages/dataviews/build-module/components/dataviews-layouts/index.mjs
  var import_i18n103 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/components/dataviews-layouts/table/index.mjs
  var import_i18n91 = __toESM(require_i18n(), 1);
  var import_components96 = __toESM(require_components(), 1);
  var import_element76 = __toESM(require_element(), 1);
  var import_keycodes6 = __toESM(require_keycodes(), 1);

  // packages/dataviews/build-module/components/dataviews-selection-checkbox/index.mjs
  var import_components91 = __toESM(require_components(), 1);
  var import_i18n84 = __toESM(require_i18n(), 1);
  var import_jsx_runtime184 = __toESM(require_jsx_runtime(), 1);
  function DataViewsSelectionCheckbox({
    selection,
    onChangeSelection,
    item,
    getItemId: getItemId2,
    titleField,
    disabled,
    ...extraProps
  }) {
    const id = getItemId2(item);
    const checked = !disabled && selection.includes(id);
    const selectionLabel = titleField?.getValue?.({ item }) || (0, import_i18n84.__)("(no title)");
    return /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
      import_components91.CheckboxControl,
      {
        className: "dataviews-selection-checkbox",
        "aria-label": selectionLabel,
        "aria-disabled": disabled,
        checked,
        onChange: () => {
          if (disabled) {
            return;
          }
          onChangeSelection(
            selection.includes(id) ? selection.filter((itemId) => id !== itemId) : [...selection, id]
          );
        },
        ...extraProps
      }
    );
  }

  // packages/dataviews/build-module/components/dataviews-item-actions/index.mjs
  var import_components92 = __toESM(require_components(), 1);
  var import_i18n85 = __toESM(require_i18n(), 1);
  var import_element69 = __toESM(require_element(), 1);
  var import_data59 = __toESM(require_data(), 1);
  var import_compose12 = __toESM(require_compose(), 1);

  // packages/dataviews/build-module/lock-unlock.mjs
  var import_private_apis3 = __toESM(require_private_apis(), 1);
  var { lock: lock3, unlock: unlock3 } = (0, import_private_apis3.__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"
  );

  // packages/dataviews/build-module/components/dataviews-item-actions/index.mjs
  var import_jsx_runtime185 = __toESM(require_jsx_runtime(), 1);
  var { Menu: Menu5, kebabCase: kebabCase4 } = unlock3(import_components92.privateApis);
  function ButtonTrigger({
    action,
    onClick,
    items,
    variant
  }) {
    const label = typeof action.label === "string" ? action.label : action.label(items);
    return /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
      import_components92.Button,
      {
        disabled: !!action.disabled,
        accessibleWhenDisabled: true,
        size: "compact",
        variant,
        onClick,
        children: label
      }
    );
  }
  function MenuItemTrigger({
    action,
    onClick,
    items
  }) {
    const label = typeof action.label === "string" ? action.label : action.label(items);
    return /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(Menu5.Item, { disabled: action.disabled, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(Menu5.ItemLabel, { children: label }) });
  }
  function ActionModal({
    action,
    items,
    closeModal
  }) {
    const label = typeof action.label === "string" ? action.label : action.label(items);
    const modalHeader = typeof action.modalHeader === "function" ? action.modalHeader(items) : action.modalHeader;
    return /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
      import_components92.Modal,
      {
        title: modalHeader || label,
        __experimentalHideHeader: !!action.hideModalHeader,
        onRequestClose: closeModal,
        focusOnMount: action.modalFocusOnMount ?? true,
        size: action.modalSize || "medium",
        overlayClassName: `dataviews-action-modal dataviews-action-modal__${kebabCase4(
          action.id
        )}`,
        children: /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(action.RenderModal, { items, closeModal })
      }
    );
  }
  function ActionsMenuGroup({
    actions,
    item,
    registry,
    setActiveModalAction
  }) {
    const { primaryActions, regularActions } = (0, import_element69.useMemo)(() => {
      return actions.reduce(
        (acc, action) => {
          (action.isPrimary ? acc.primaryActions : acc.regularActions).push(action);
          return acc;
        },
        {
          primaryActions: [],
          regularActions: []
        }
      );
    }, [actions]);
    const renderActionGroup = (actionList) => actionList.map((action) => /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
      MenuItemTrigger,
      {
        action,
        onClick: () => {
          if ("RenderModal" in action) {
            setActiveModalAction(action);
            return;
          }
          action.callback([item], { registry });
        },
        items: [item]
      },
      action.id
    ));
    return /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)(Menu5.Group, { children: [
      renderActionGroup(primaryActions),
      renderActionGroup(regularActions)
    ] });
  }
  function ItemActions({
    item,
    actions,
    isCompact
  }) {
    const registry = (0, import_data59.useRegistry)();
    const { primaryActions, eligibleActions } = (0, import_element69.useMemo)(() => {
      const _eligibleActions = actions.filter(
        (action) => !action.isEligible || action.isEligible(item)
      );
      const _primaryActions = _eligibleActions.filter(
        (action) => action.isPrimary
      );
      return {
        primaryActions: _primaryActions,
        eligibleActions: _eligibleActions
      };
    }, [actions, item]);
    const isMobileViewport = (0, import_compose12.useViewportMatch)("medium", "<");
    if (isCompact) {
      return /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
        CompactItemActions,
        {
          item,
          actions: eligibleActions,
          isSmall: true,
          registry
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)(
      Stack,
      {
        direction: "row",
        justify: "flex-end",
        className: "dataviews-item-actions",
        style: {
          flexShrink: 0,
          width: "auto"
        },
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
            PrimaryActions,
            {
              item,
              actions: primaryActions,
              registry
            }
          ),
          (primaryActions.length < eligibleActions.length || // Since we hide primary actions on mobile, we need to show the menu
          // there if there are any actions at all.
          isMobileViewport) && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
            CompactItemActions,
            {
              item,
              actions: eligibleActions,
              registry
            }
          )
        ]
      }
    );
  }
  function CompactItemActions({
    item,
    actions,
    isSmall,
    registry
  }) {
    const [activeModalAction, setActiveModalAction] = (0, import_element69.useState)(
      null
    );
    return /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)(import_jsx_runtime185.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)(Menu5, { placement: "bottom-end", children: [
        /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
          Menu5.TriggerButton,
          {
            render: /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
              import_components92.Button,
              {
                size: isSmall ? "small" : "compact",
                icon: more_vertical_default,
                label: (0, import_i18n85.__)("Actions"),
                accessibleWhenDisabled: true,
                disabled: !actions.length,
                className: "dataviews-all-actions-button"
              }
            )
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(Menu5.Popover, { children: /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
          ActionsMenuGroup,
          {
            actions,
            item,
            registry,
            setActiveModalAction
          }
        ) })
      ] }),
      !!activeModalAction && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
        ActionModal,
        {
          action: activeModalAction,
          items: [item],
          closeModal: () => setActiveModalAction(null)
        }
      )
    ] });
  }
  function PrimaryActions({
    item,
    actions,
    registry,
    buttonVariant
  }) {
    const [activeModalAction, setActiveModalAction] = (0, import_element69.useState)(null);
    const isMobileViewport = (0, import_compose12.useViewportMatch)("medium", "<");
    if (isMobileViewport) {
      return null;
    }
    if (!Array.isArray(actions) || actions.length === 0) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)(import_jsx_runtime185.Fragment, { children: [
      actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
        ButtonTrigger,
        {
          action,
          onClick: () => {
            if ("RenderModal" in action) {
              setActiveModalAction(action);
              return;
            }
            action.callback([item], { registry });
          },
          items: [item],
          variant: buttonVariant
        },
        action.id
      )),
      !!activeModalAction && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
        ActionModal,
        {
          action: activeModalAction,
          items: [item],
          closeModal: () => setActiveModalAction(null)
        }
      )
    ] });
  }

  // packages/dataviews/build-module/components/dataviews-bulk-actions/index.mjs
  var import_components93 = __toESM(require_components(), 1);
  var import_i18n87 = __toESM(require_i18n(), 1);
  var import_element70 = __toESM(require_element(), 1);
  var import_data60 = __toESM(require_data(), 1);
  var import_compose13 = __toESM(require_compose(), 1);

  // packages/dataviews/build-module/utils/get-footer-message.mjs
  var import_i18n86 = __toESM(require_i18n(), 1);
  function getFooterMessage(selectionCount, itemsCount, totalItems) {
    if (selectionCount > 0) {
      return (0, import_i18n86.sprintf)(
        /* translators: %d: number of items. */
        (0, import_i18n86._n)("%d Item selected", "%d Items selected", selectionCount),
        selectionCount
      );
    }
    if (totalItems > itemsCount) {
      return (0, import_i18n86.sprintf)(
        /* translators: %1$d: number of items. %2$d: total number of items. */
        (0, import_i18n86._n)("%1$d of %2$d Item", "%1$d of %2$d Items", totalItems),
        itemsCount,
        totalItems
      );
    }
    return (0, import_i18n86.sprintf)(
      /* translators: %d: number of items. */
      (0, import_i18n86._n)("%d Item", "%d Items", itemsCount),
      itemsCount
    );
  }

  // packages/dataviews/build-module/components/dataviews-bulk-actions/index.mjs
  var import_jsx_runtime186 = __toESM(require_jsx_runtime(), 1);
  function ActionWithModal({
    action,
    items,
    ActionTriggerComponent
  }) {
    const [isModalOpen, setIsModalOpen] = (0, import_element70.useState)(false);
    const actionTriggerProps = {
      action,
      onClick: () => {
        setIsModalOpen(true);
      },
      items
    };
    return /* @__PURE__ */ (0, import_jsx_runtime186.jsxs)(import_jsx_runtime186.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(ActionTriggerComponent, { ...actionTriggerProps }),
      isModalOpen && /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
        ActionModal,
        {
          action,
          items,
          closeModal: () => setIsModalOpen(false)
        }
      )
    ] });
  }
  function useHasAPossibleBulkAction(actions, item) {
    return (0, import_element70.useMemo)(() => {
      return actions.some((action) => {
        return action.supportsBulk && (!action.isEligible || action.isEligible(item));
      });
    }, [actions, item]);
  }
  function useSomeItemHasAPossibleBulkAction(actions, data) {
    return (0, import_element70.useMemo)(() => {
      return data.some((item) => {
        return actions.some((action) => {
          return action.supportsBulk && (!action.isEligible || action.isEligible(item));
        });
      });
    }, [actions, data]);
  }
  function BulkSelectionCheckbox({
    selection,
    onChangeSelection,
    data,
    actions,
    getItemId: getItemId2
  }) {
    const selectableItems = (0, import_element70.useMemo)(() => {
      return data.filter((item) => {
        return actions.some(
          (action) => action.supportsBulk && (!action.isEligible || action.isEligible(item))
        );
      });
    }, [data, actions]);
    const selectedItems = data.filter(
      (item) => selection.includes(getItemId2(item)) && selectableItems.includes(item)
    );
    const areAllSelected = selectedItems.length === selectableItems.length;
    return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
      import_components93.CheckboxControl,
      {
        className: "dataviews-view-table-selection-checkbox",
        checked: areAllSelected,
        indeterminate: !areAllSelected && !!selectedItems.length,
        onChange: () => {
          if (areAllSelected) {
            onChangeSelection([]);
          } else {
            onChangeSelection(
              selectableItems.map((item) => getItemId2(item))
            );
          }
        },
        "aria-label": areAllSelected ? (0, import_i18n87.__)("Deselect all") : (0, import_i18n87.__)("Select all")
      }
    );
  }
  function ActionTrigger({
    action,
    onClick,
    isBusy,
    items
  }) {
    const label = typeof action.label === "string" ? action.label : action.label(items);
    const isMobile = (0, import_compose13.useViewportMatch)("medium", "<");
    if (isMobile) {
      return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
        import_components93.Button,
        {
          disabled: isBusy,
          accessibleWhenDisabled: true,
          label,
          icon: action.icon,
          size: "compact",
          onClick,
          isBusy
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
      import_components93.Button,
      {
        disabled: isBusy,
        accessibleWhenDisabled: true,
        size: "compact",
        onClick,
        isBusy,
        children: label
      }
    );
  }
  var EMPTY_ARRAY5 = [];
  function ActionButton({
    action,
    selectedItems,
    actionInProgress,
    setActionInProgress
  }) {
    const registry = (0, import_data60.useRegistry)();
    const selectedEligibleItems = (0, import_element70.useMemo)(() => {
      return selectedItems.filter((item) => {
        return !action.isEligible || action.isEligible(item);
      });
    }, [action, selectedItems]);
    if ("RenderModal" in action) {
      return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
        ActionWithModal,
        {
          action,
          items: selectedEligibleItems,
          ActionTriggerComponent: ActionTrigger
        },
        action.id
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
      ActionTrigger,
      {
        action,
        onClick: async () => {
          setActionInProgress(action.id);
          await action.callback(selectedItems, {
            registry
          });
          setActionInProgress(null);
        },
        items: selectedEligibleItems,
        isBusy: actionInProgress === action.id
      },
      action.id
    );
  }
  function renderFooterContent(data, actions, getItemId2, selection, actionsToShow, selectedItems, actionInProgress, setActionInProgress, onChangeSelection, paginationInfo) {
    const message2 = getFooterMessage(
      selection.length,
      data.length,
      paginationInfo.totalItems
    );
    return /* @__PURE__ */ (0, import_jsx_runtime186.jsxs)(
      Stack,
      {
        direction: "row",
        className: "dataviews-bulk-actions-footer__container",
        gap: "md",
        align: "center",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
            BulkSelectionCheckbox,
            {
              selection,
              onChangeSelection,
              data,
              actions,
              getItemId: getItemId2
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime186.jsx)("span", { className: "dataviews-bulk-actions-footer__item-count", children: message2 }),
          /* @__PURE__ */ (0, import_jsx_runtime186.jsxs)(
            Stack,
            {
              direction: "row",
              className: "dataviews-bulk-actions-footer__action-buttons",
              gap: "xs",
              children: [
                actionsToShow.map((action) => {
                  return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
                    ActionButton,
                    {
                      action,
                      selectedItems,
                      actionInProgress,
                      setActionInProgress
                    },
                    action.id
                  );
                }),
                selectedItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
                  import_components93.Button,
                  {
                    icon: close_small_default,
                    showTooltip: true,
                    tooltipPosition: "top",
                    size: "compact",
                    label: (0, import_i18n87.__)("Cancel"),
                    disabled: !!actionInProgress,
                    accessibleWhenDisabled: false,
                    onClick: () => {
                      onChangeSelection(EMPTY_ARRAY5);
                    }
                  }
                )
              ]
            }
          )
        ]
      }
    );
  }
  function FooterContent({
    selection,
    actions,
    onChangeSelection,
    data,
    getItemId: getItemId2,
    paginationInfo
  }) {
    const [actionInProgress, setActionInProgress] = (0, import_element70.useState)(
      null
    );
    const footerContentRef = (0, import_element70.useRef)(void 0);
    const isMobile = (0, import_compose13.useViewportMatch)("medium", "<");
    const bulkActions = (0, import_element70.useMemo)(
      () => actions.filter((action) => action.supportsBulk),
      [actions]
    );
    const selectableItems = (0, import_element70.useMemo)(() => {
      return data.filter((item) => {
        return bulkActions.some(
          (action) => !action.isEligible || action.isEligible(item)
        );
      });
    }, [data, bulkActions]);
    const selectedItems = (0, import_element70.useMemo)(() => {
      return data.filter(
        (item) => selection.includes(getItemId2(item)) && selectableItems.includes(item)
      );
    }, [selection, data, getItemId2, selectableItems]);
    const actionsToShow = (0, import_element70.useMemo)(
      () => actions.filter((action) => {
        return action.supportsBulk && (!isMobile || action.icon) && selectedItems.some(
          (item) => !action.isEligible || action.isEligible(item)
        );
      }),
      [actions, selectedItems, isMobile]
    );
    if (!actionInProgress) {
      if (footerContentRef.current) {
        footerContentRef.current = void 0;
      }
      return renderFooterContent(
        data,
        actions,
        getItemId2,
        selection,
        actionsToShow,
        selectedItems,
        actionInProgress,
        setActionInProgress,
        onChangeSelection,
        paginationInfo
      );
    } else if (!footerContentRef.current) {
      footerContentRef.current = renderFooterContent(
        data,
        actions,
        getItemId2,
        selection,
        actionsToShow,
        selectedItems,
        actionInProgress,
        setActionInProgress,
        onChangeSelection,
        paginationInfo
      );
    }
    return footerContentRef.current;
  }
  function BulkActionsFooter() {
    const {
      data,
      selection,
      actions = EMPTY_ARRAY5,
      onChangeSelection,
      getItemId: getItemId2,
      paginationInfo
    } = (0, import_element70.useContext)(dataviews_context_default);
    return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
      FooterContent,
      {
        selection,
        onChangeSelection,
        data,
        actions,
        getItemId: getItemId2,
        paginationInfo
      }
    );
  }

  // packages/dataviews/build-module/components/dataviews-layouts/table/column-header-menu.mjs
  var import_i18n88 = __toESM(require_i18n(), 1);
  var import_components94 = __toESM(require_components(), 1);
  var import_element71 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/utils/get-hideable-fields.mjs
  function getHideableFields(view, fields) {
    const togglableFields = [
      view?.titleField,
      view?.mediaField,
      view?.descriptionField
    ].filter(Boolean);
    return fields.filter(
      (f2) => !togglableFields.includes(f2.id) && f2.type !== "media" && f2.enableHiding !== false
    );
  }

  // packages/dataviews/build-module/components/dataviews-layouts/table/column-header-menu.mjs
  var import_jsx_runtime187 = __toESM(require_jsx_runtime(), 1);
  var { Menu: Menu6 } = unlock3(import_components94.privateApis);
  function WithMenuSeparators({ children }) {
    return import_element71.Children.toArray(children).filter(Boolean).map((child, i2) => /* @__PURE__ */ (0, import_jsx_runtime187.jsxs)(import_element71.Fragment, { children: [
      i2 > 0 && /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Menu6.Separator, {}),
      child
    ] }, i2));
  }
  var _HeaderMenu = (0, import_element71.forwardRef)(function HeaderMenu({
    fieldId,
    view,
    fields,
    onChangeView,
    onHide,
    setOpenedFilter,
    canMove = true,
    canInsertLeft = true,
    canInsertRight = true
  }, ref) {
    const visibleFieldIds = view.fields ?? [];
    const index = visibleFieldIds?.indexOf(fieldId);
    const isSorted = view.sort?.field === fieldId;
    let isHidable = false;
    let isSortable = false;
    let canAddFilter = false;
    let operators = [];
    const field = fields.find((f2) => f2.id === fieldId);
    const { setIsShowingFilter } = (0, import_element71.useContext)(dataviews_context_default);
    if (!field) {
      return null;
    }
    isHidable = field.enableHiding !== false;
    isSortable = field.enableSorting !== false;
    const header = field.header;
    operators = !!field.filterBy && field.filterBy?.operators || [];
    canAddFilter = !view.filters?.some((_filter) => fieldId === _filter.field) && !!(field.hasElements || field.Edit) && field.filterBy !== false && !field.filterBy?.isPrimary;
    if (!isSortable && !canMove && !isHidable && !canAddFilter) {
      return header;
    }
    const hiddenFields = getHideableFields(view, fields).filter(
      (f2) => !visibleFieldIds.includes(f2.id)
    );
    const canInsert = (canInsertLeft || canInsertRight) && !!hiddenFields.length;
    const isRtl = (0, import_i18n88.isRTL)();
    return /* @__PURE__ */ (0, import_jsx_runtime187.jsxs)(Menu6, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime187.jsxs)(
        Menu6.TriggerButton,
        {
          render: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
            import_components94.Button,
            {
              size: "compact",
              className: "dataviews-view-table-header-button",
              ref,
              variant: "tertiary"
            }
          ),
          children: [
            header,
            view.sort && isSorted && /* @__PURE__ */ (0, import_jsx_runtime187.jsx)("span", { "aria-hidden": "true", children: sortArrows[view.sort.direction] })
          ]
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Menu6.Popover, { style: { minWidth: "240px" }, children: /* @__PURE__ */ (0, import_jsx_runtime187.jsxs)(WithMenuSeparators, { children: [
        isSortable && /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Menu6.Group, { children: SORTING_DIRECTIONS.map(
          (direction) => {
            const isChecked = view.sort && isSorted && view.sort.direction === direction;
            const value = `${fieldId}-${direction}`;
            return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
              Menu6.RadioItem,
              {
                name: "view-table-sorting",
                value,
                checked: isChecked,
                onChange: () => {
                  onChangeView({
                    ...view,
                    sort: {
                      field: fieldId,
                      direction
                    },
                    showLevels: false
                  });
                },
                children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Menu6.ItemLabel, { children: sortLabels[direction] })
              },
              value
            );
          }
        ) }),
        canAddFilter && /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Menu6.Group, { children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
          Menu6.Item,
          {
            prefix: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(import_components94.Icon, { icon: funnel_default }),
            onClick: () => {
              setOpenedFilter(fieldId);
              setIsShowingFilter(true);
              onChangeView({
                ...view,
                page: 1,
                filters: [
                  ...view.filters || [],
                  {
                    field: fieldId,
                    value: void 0,
                    operator: operators[0]
                  }
                ]
              });
            },
            children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Menu6.ItemLabel, { children: (0, import_i18n88.__)("Add filter") })
          }
        ) }),
        (canMove || isHidable || canInsert) && field && /* @__PURE__ */ (0, import_jsx_runtime187.jsxs)(Menu6.Group, { children: [
          canMove && /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
            Menu6.Item,
            {
              prefix: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(import_components94.Icon, { icon: arrow_left_default }),
              disabled: isRtl ? index >= visibleFieldIds.length - 1 : index < 1,
              onClick: () => {
                const targetIndex = isRtl ? index + 1 : index - 1;
                const newFields = [
                  ...visibleFieldIds
                ];
                newFields.splice(index, 1);
                newFields.splice(
                  targetIndex,
                  0,
                  fieldId
                );
                onChangeView({
                  ...view,
                  fields: newFields
                });
              },
              children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Menu6.ItemLabel, { children: (0, import_i18n88.__)("Move left") })
            }
          ),
          canMove && /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
            Menu6.Item,
            {
              prefix: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(import_components94.Icon, { icon: arrow_right_default }),
              disabled: isRtl ? index < 1 : index >= visibleFieldIds.length - 1,
              onClick: () => {
                const targetIndex = isRtl ? index - 1 : index + 1;
                const newFields = [
                  ...visibleFieldIds
                ];
                newFields.splice(index, 1);
                newFields.splice(
                  targetIndex,
                  0,
                  fieldId
                );
                onChangeView({
                  ...view,
                  fields: newFields
                });
              },
              children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Menu6.ItemLabel, { children: (0, import_i18n88.__)("Move right") })
            }
          ),
          canInsertLeft && !!hiddenFields.length && /* @__PURE__ */ (0, import_jsx_runtime187.jsxs)(Menu6, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Menu6.SubmenuTriggerItem, { children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Menu6.ItemLabel, { children: (0, import_i18n88.__)("Insert left") }) }),
            /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Menu6.Popover, { children: hiddenFields.map((hiddenField) => {
              const insertIndex = isRtl ? index + 1 : index;
              return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
                Menu6.Item,
                {
                  onClick: () => {
                    onChangeView({
                      ...view,
                      fields: [
                        ...visibleFieldIds.slice(
                          0,
                          insertIndex
                        ),
                        hiddenField.id,
                        ...visibleFieldIds.slice(
                          insertIndex
                        )
                      ]
                    });
                  },
                  children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Menu6.ItemLabel, { children: hiddenField.label })
                },
                hiddenField.id
              );
            }) })
          ] }),
          canInsertRight && !!hiddenFields.length && /* @__PURE__ */ (0, import_jsx_runtime187.jsxs)(Menu6, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Menu6.SubmenuTriggerItem, { children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Menu6.ItemLabel, { children: (0, import_i18n88.__)("Insert right") }) }),
            /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Menu6.Popover, { children: hiddenFields.map((hiddenField) => {
              const insertIndex = isRtl ? index : index + 1;
              return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
                Menu6.Item,
                {
                  onClick: () => {
                    onChangeView({
                      ...view,
                      fields: [
                        ...visibleFieldIds.slice(
                          0,
                          insertIndex
                        ),
                        hiddenField.id,
                        ...visibleFieldIds.slice(
                          insertIndex
                        )
                      ]
                    });
                  },
                  children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Menu6.ItemLabel, { children: hiddenField.label })
                },
                hiddenField.id
              );
            }) })
          ] }),
          isHidable && field && /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
            Menu6.Item,
            {
              prefix: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(import_components94.Icon, { icon: unseen_default }),
              onClick: () => {
                onHide(field);
                onChangeView({
                  ...view,
                  fields: visibleFieldIds.filter(
                    (id) => id !== fieldId
                  )
                });
              },
              children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Menu6.ItemLabel, { children: (0, import_i18n88.__)("Hide column") })
            }
          )
        ] })
      ] }) })
    ] });
  });
  var ColumnHeaderMenu = _HeaderMenu;
  var column_header_menu_default = ColumnHeaderMenu;

  // packages/dataviews/build-module/components/dataviews-layouts/utils/item-click-wrapper.mjs
  var import_element72 = __toESM(require_element(), 1);
  var import_jsx_runtime188 = __toESM(require_jsx_runtime(), 1);
  function getClickableItemProps({
    item,
    isItemClickable,
    onClickItem,
    className
  }) {
    if (!isItemClickable(item) || !onClickItem) {
      return { className };
    }
    return {
      className: className ? `${className} ${className}--clickable` : void 0,
      role: "button",
      tabIndex: 0,
      onClick: (event) => {
        event.stopPropagation();
        onClickItem(item);
      },
      onKeyDown: (event) => {
        if (event.key === "Enter" || event.key === "" || event.key === " ") {
          event.stopPropagation();
          onClickItem(item);
        }
      }
    };
  }
  function ItemClickWrapper({
    item,
    isItemClickable,
    onClickItem,
    renderItemLink,
    className,
    children,
    ...extraProps
  }) {
    if (!isItemClickable(item)) {
      return /* @__PURE__ */ (0, import_jsx_runtime188.jsx)("div", { className, ...extraProps, children });
    }
    if (renderItemLink) {
      const renderedElement = renderItemLink({
        item,
        className: `${className} ${className}--clickable`,
        ...extraProps,
        children
      });
      return (0, import_element72.cloneElement)(renderedElement, {
        onClick: (event) => {
          event.stopPropagation();
          if (renderedElement.props.onClick) {
            renderedElement.props.onClick(event);
          }
        },
        onKeyDown: (event) => {
          if (event.key === "Enter" || event.key === "" || event.key === " ") {
            event.stopPropagation();
            if (renderedElement.props.onKeyDown) {
              renderedElement.props.onKeyDown(event);
            }
          }
        }
      });
    }
    const clickProps = getClickableItemProps({
      item,
      isItemClickable,
      onClickItem,
      className
    });
    return /* @__PURE__ */ (0, import_jsx_runtime188.jsx)("div", { ...clickProps, ...extraProps, children });
  }

  // packages/dataviews/build-module/components/dataviews-layouts/table/column-primary.mjs
  var import_jsx_runtime189 = __toESM(require_jsx_runtime(), 1);
  function ColumnPrimary({
    item,
    level,
    titleField,
    mediaField,
    descriptionField: descriptionField2,
    onClickItem,
    renderItemLink,
    isItemClickable
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime189.jsxs)(Stack, { direction: "row", gap: "md", align: "flex-start", justify: "flex-start", children: [
      mediaField && /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
        ItemClickWrapper,
        {
          item,
          isItemClickable,
          onClickItem,
          renderItemLink,
          className: "dataviews-view-table__cell-content-wrapper dataviews-column-primary__media",
          "aria-label": isItemClickable(item) && (!!onClickItem || !!renderItemLink) && !!titleField ? titleField.getValue?.({ item }) : void 0,
          children: /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
            mediaField.render,
            {
              item,
              field: mediaField,
              config: { sizes: "32px" }
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime189.jsxs)(
        Stack,
        {
          direction: "column",
          align: "flex-start",
          className: "dataviews-view-table__primary-column-content",
          children: [
            titleField && /* @__PURE__ */ (0, import_jsx_runtime189.jsxs)(
              ItemClickWrapper,
              {
                item,
                isItemClickable,
                onClickItem,
                renderItemLink,
                className: "dataviews-view-table__cell-content-wrapper dataviews-title-field",
                children: [
                  level !== void 0 && level > 0 && /* @__PURE__ */ (0, import_jsx_runtime189.jsxs)("span", { className: "dataviews-view-table__level", children: [
                    Array(level).fill("\u2014").join(" "),
                    "\xA0"
                  ] }),
                  /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(titleField.render, { item, field: titleField })
                ]
              }
            ),
            descriptionField2 && /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
              descriptionField2.render,
              {
                item,
                field: descriptionField2
              }
            )
          ]
        }
      )
    ] });
  }
  var column_primary_default = ColumnPrimary;

  // packages/dataviews/build-module/components/dataviews-layouts/table/use-is-horizontal-scroll-end.mjs
  var import_compose14 = __toESM(require_compose(), 1);
  var import_element73 = __toESM(require_element(), 1);
  var import_i18n89 = __toESM(require_i18n(), 1);
  var isScrolledToEnd = (element) => {
    if ((0, import_i18n89.isRTL)()) {
      const scrollLeft = Math.abs(element.scrollLeft);
      return scrollLeft <= 1;
    }
    return element.scrollLeft + element.clientWidth >= element.scrollWidth - 1;
  };
  function useIsHorizontalScrollEnd({
    scrollContainerRef,
    enabled = false
  }) {
    const [isHorizontalScrollEnd, setIsHorizontalScrollEnd] = (0, import_element73.useState)(false);
    const handleIsHorizontalScrollEnd = (0, import_compose14.useDebounce)(
      (0, import_element73.useCallback)(() => {
        const scrollContainer = scrollContainerRef.current;
        if (scrollContainer) {
          setIsHorizontalScrollEnd(isScrolledToEnd(scrollContainer));
        }
      }, [scrollContainerRef, setIsHorizontalScrollEnd]),
      200
    );
    (0, import_element73.useEffect)(() => {
      if (typeof window === "undefined" || !enabled || !scrollContainerRef.current) {
        return () => {
        };
      }
      handleIsHorizontalScrollEnd();
      scrollContainerRef.current.addEventListener(
        "scroll",
        handleIsHorizontalScrollEnd
      );
      window.addEventListener("resize", handleIsHorizontalScrollEnd);
      return () => {
        scrollContainerRef.current?.removeEventListener(
          "scroll",
          handleIsHorizontalScrollEnd
        );
        window.removeEventListener("resize", handleIsHorizontalScrollEnd);
      };
    }, [scrollContainerRef, enabled]);
    return isHorizontalScrollEnd;
  }

  // packages/dataviews/build-module/components/dataviews-layouts/utils/get-data-by-group.mjs
  function getDataByGroup(data, groupByField) {
    return data.reduce((groups, item) => {
      const groupName = groupByField.getValue({ item });
      if (!groups.has(groupName)) {
        groups.set(groupName, []);
      }
      groups.get(groupName)?.push(item);
      return groups;
    }, /* @__PURE__ */ new Map());
  }

  // packages/dataviews/build-module/components/dataviews-view-config/properties-section.mjs
  var import_components95 = __toESM(require_components(), 1);
  var import_i18n90 = __toESM(require_i18n(), 1);
  var import_element74 = __toESM(require_element(), 1);
  var import_jsx_runtime190 = __toESM(require_jsx_runtime(), 1);
  function FieldItem({
    field,
    isVisible: isVisible2,
    onToggleVisibility
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(import_components95.__experimentalItem, { onClick: field.enableHiding ? onToggleVisibility : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(Stack, { direction: "row", gap: "sm", justify: "flex-start", align: "center", children: [
      /* @__PURE__ */ (0, import_jsx_runtime190.jsx)("div", { style: { height: 24, width: 24 }, children: isVisible2 && /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(import_components95.Icon, { icon: check_default }) }),
      /* @__PURE__ */ (0, import_jsx_runtime190.jsx)("span", { className: "dataviews-view-config__label", children: field.label })
    ] }) });
  }
  function isDefined(item) {
    return !!item;
  }
  function PropertiesSection({
    showLabel = true
  }) {
    const { view, fields, onChangeView } = (0, import_element74.useContext)(dataviews_context_default);
    const regularFields = getHideableFields(view, fields);
    if (!regularFields?.length) {
      return null;
    }
    const titleField = fields.find((f2) => f2.id === view.titleField);
    const previewField3 = fields.find((f2) => f2.id === view.mediaField);
    const descriptionField2 = fields.find(
      (f2) => f2.id === view.descriptionField
    );
    const lockedFields = [
      {
        field: titleField,
        isVisibleFlag: "showTitle"
      },
      {
        field: previewField3,
        isVisibleFlag: "showMedia"
      },
      {
        field: descriptionField2,
        isVisibleFlag: "showDescription"
      }
    ].filter(({ field }) => isDefined(field));
    const visibleFieldIds = view.fields ?? [];
    const visibleRegularFieldsCount = regularFields.filter(
      (f2) => visibleFieldIds.includes(f2.id)
    ).length;
    const visibleLockedFields = lockedFields.filter(
      ({ isVisibleFlag }) => (
        // @ts-expect-error
        view[isVisibleFlag] ?? true
      )
    );
    const totalVisibleFields = visibleLockedFields.length + visibleRegularFieldsCount;
    const isSingleVisibleLockedField = totalVisibleFields === 1 && visibleLockedFields.length === 1;
    return /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(Stack, { direction: "column", className: "dataviews-field-control", children: [
      showLabel && /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(import_components95.BaseControl.VisualLabel, { children: (0, import_i18n90.__)("Properties") }),
      /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
        Stack,
        {
          direction: "column",
          className: "dataviews-view-config__properties",
          children: /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(import_components95.__experimentalItemGroup, { isBordered: true, isSeparated: true, size: "medium", children: [
            lockedFields.map(({ field, isVisibleFlag }) => {
              const isVisible2 = view[isVisibleFlag] ?? true;
              const fieldToRender = isSingleVisibleLockedField && isVisible2 ? { ...field, enableHiding: false } : field;
              return /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
                FieldItem,
                {
                  field: fieldToRender,
                  isVisible: isVisible2,
                  onToggleVisibility: () => {
                    onChangeView({
                      ...view,
                      [isVisibleFlag]: !isVisible2
                    });
                  }
                },
                field.id
              );
            }),
            regularFields.map((field) => {
              const isVisible2 = visibleFieldIds.includes(field.id);
              const fieldToRender = totalVisibleFields === 1 && isVisible2 ? { ...field, enableHiding: false } : field;
              return /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
                FieldItem,
                {
                  field: fieldToRender,
                  isVisible: isVisible2,
                  onToggleVisibility: () => {
                    onChangeView({
                      ...view,
                      fields: isVisible2 ? visibleFieldIds.filter(
                        (fieldId) => fieldId !== field.id
                      ) : [...visibleFieldIds, field.id]
                    });
                  }
                },
                field.id
              );
            })
          ] })
        }
      )
    ] });
  }

  // packages/dataviews/build-module/hooks/use-delayed-loading.mjs
  var import_element75 = __toESM(require_element(), 1);
  function useDelayedLoading(isLoading, options = { delay: 400 }) {
    const [showLoader, setShowLoader] = (0, import_element75.useState)(false);
    (0, import_element75.useEffect)(() => {
      if (!isLoading) {
        return;
      }
      const timeout = setTimeout(() => {
        setShowLoader(true);
      }, options.delay);
      return () => {
        clearTimeout(timeout);
        setShowLoader(false);
      };
    }, [isLoading, options.delay]);
    return showLoader;
  }

  // packages/dataviews/build-module/components/dataviews-layouts/table/index.mjs
  var import_jsx_runtime191 = __toESM(require_jsx_runtime(), 1);
  function getEffectiveAlign(explicitAlign, fieldType) {
    if (explicitAlign) {
      return explicitAlign;
    }
    if (fieldType === "integer" || fieldType === "number") {
      return "end";
    }
    return void 0;
  }
  function TableColumnField({
    item,
    fields,
    column,
    align
  }) {
    const field = fields.find((f2) => f2.id === column);
    if (!field) {
      return null;
    }
    const className = clsx_default("dataviews-view-table__cell-content-wrapper", {
      "dataviews-view-table__cell-align-end": align === "end",
      "dataviews-view-table__cell-align-center": align === "center"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(field.render, { item, field }) });
  }
  function TableRow({
    hasBulkActions,
    item,
    level,
    actions,
    fields,
    id,
    view,
    titleField,
    mediaField,
    descriptionField: descriptionField2,
    selection,
    getItemId: getItemId2,
    isItemClickable,
    onClickItem,
    renderItemLink,
    onChangeSelection,
    isActionsColumnSticky,
    posinset
  }) {
    const { paginationInfo } = (0, import_element76.useContext)(dataviews_context_default);
    const hasPossibleBulkAction = useHasAPossibleBulkAction(actions, item);
    const isSelected2 = hasPossibleBulkAction && selection.includes(id);
    const {
      showTitle = true,
      showMedia = true,
      showDescription = true,
      infiniteScrollEnabled
    } = view;
    const isTouchDeviceRef = (0, import_element76.useRef)(false);
    const columns = view.fields ?? [];
    const hasPrimaryColumn = titleField && showTitle || mediaField && showMedia || descriptionField2 && showDescription;
    return /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(
      "tr",
      {
        className: clsx_default("dataviews-view-table__row", {
          "is-selected": hasPossibleBulkAction && isSelected2,
          "has-bulk-actions": hasPossibleBulkAction
        }),
        onTouchStart: () => {
          isTouchDeviceRef.current = true;
        },
        "aria-setsize": infiniteScrollEnabled ? paginationInfo.totalItems : void 0,
        "aria-posinset": posinset,
        role: infiniteScrollEnabled ? "article" : void 0,
        onMouseDown: (event) => {
          const isMetaClick = (0, import_keycodes6.isAppleOS)() ? event.metaKey : event.ctrlKey;
          if (event.button === 0 && isMetaClick && window.navigator.userAgent.toLowerCase().includes("firefox")) {
            event?.preventDefault();
          }
        },
        onClick: (event) => {
          if (!hasPossibleBulkAction) {
            return;
          }
          const isModifierKeyPressed = (0, import_keycodes6.isAppleOS)() ? event.metaKey : event.ctrlKey;
          if (isModifierKeyPressed && !isTouchDeviceRef.current && document.getSelection()?.type !== "Range") {
            onChangeSelection(
              selection.includes(id) ? selection.filter((itemId) => id !== itemId) : [...selection, id]
            );
          }
        },
        children: [
          hasBulkActions && /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("td", { className: "dataviews-view-table__checkbox-column", children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("div", { className: "dataviews-view-table__cell-content-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
            DataViewsSelectionCheckbox,
            {
              item,
              selection,
              onChangeSelection,
              getItemId: getItemId2,
              titleField,
              disabled: !hasPossibleBulkAction
            }
          ) }) }),
          hasPrimaryColumn && /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
            column_primary_default,
            {
              item,
              level,
              titleField: showTitle ? titleField : void 0,
              mediaField: showMedia ? mediaField : void 0,
              descriptionField: showDescription ? descriptionField2 : void 0,
              isItemClickable,
              onClickItem,
              renderItemLink
            }
          ) }),
          columns.map((column) => {
            const { width, maxWidth, minWidth, align } = view.layout?.styles?.[column] ?? {};
            const field = fields.find((f2) => f2.id === column);
            const effectiveAlign = getEffectiveAlign(align, field?.type);
            return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
              "td",
              {
                style: {
                  width,
                  maxWidth,
                  minWidth
                },
                children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
                  TableColumnField,
                  {
                    fields,
                    item,
                    column,
                    align: effectiveAlign
                  }
                )
              },
              column
            );
          }),
          !!actions?.length && // Disable reason: we are not making the element interactive,
          // but preventing any click events from bubbling up to the
          // table row. This allows us to add a click handler to the row
          // itself (to toggle row selection) without erroneously
          // intercepting click events from ItemActions.
          /* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */
          /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
            "td",
            {
              className: clsx_default("dataviews-view-table__actions-column", {
                "dataviews-view-table__actions-column--sticky": true,
                "dataviews-view-table__actions-column--stuck": isActionsColumnSticky
              }),
              onClick: (e2) => e2.stopPropagation(),
              children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(ItemActions, { item, actions })
            }
          )
        ]
      }
    );
  }
  function ViewTable({
    actions,
    data,
    fields,
    getItemId: getItemId2,
    getItemLevel: getItemLevel2,
    isLoading = false,
    onChangeView,
    onChangeSelection,
    selection,
    setOpenedFilter,
    onClickItem,
    isItemClickable,
    renderItemLink,
    view,
    className,
    empty
  }) {
    const { containerRef } = (0, import_element76.useContext)(dataviews_context_default);
    const isDelayedLoading = useDelayedLoading(isLoading);
    const headerMenuRefs = (0, import_element76.useRef)(/* @__PURE__ */ new Map());
    const headerMenuToFocusRef = (0, import_element76.useRef)(void 0);
    const [nextHeaderMenuToFocus, setNextHeaderMenuToFocus] = (0, import_element76.useState)();
    const [contextMenuAnchor, setContextMenuAnchor] = (0, import_element76.useState)(null);
    (0, import_element76.useEffect)(() => {
      if (headerMenuToFocusRef.current) {
        headerMenuToFocusRef.current.focus();
        headerMenuToFocusRef.current = void 0;
      }
    });
    const tableNoticeId = (0, import_element76.useId)();
    const isHorizontalScrollEnd = useIsHorizontalScrollEnd({
      scrollContainerRef: containerRef,
      enabled: !!actions?.length
    });
    const hasBulkActions = useSomeItemHasAPossibleBulkAction(actions, data);
    if (nextHeaderMenuToFocus) {
      headerMenuToFocusRef.current = nextHeaderMenuToFocus;
      setNextHeaderMenuToFocus(void 0);
      return;
    }
    const onHide = (field) => {
      const hidden = headerMenuRefs.current.get(field.id);
      const fallback = hidden ? headerMenuRefs.current.get(hidden.fallback) : void 0;
      setNextHeaderMenuToFocus(fallback?.node);
    };
    const handleHeaderContextMenu = (event) => {
      event.preventDefault();
      event.stopPropagation();
      const virtualAnchor = {
        getBoundingClientRect: () => ({
          x: event.clientX,
          y: event.clientY,
          top: event.clientY,
          left: event.clientX,
          right: event.clientX,
          bottom: event.clientY,
          width: 0,
          height: 0,
          toJSON: () => ({})
        })
      };
      window.requestAnimationFrame(() => {
        setContextMenuAnchor(virtualAnchor);
      });
    };
    const hasData = !!data?.length;
    const titleField = fields.find((field) => field.id === view.titleField);
    const mediaField = fields.find((field) => field.id === view.mediaField);
    const descriptionField2 = fields.find(
      (field) => field.id === view.descriptionField
    );
    const groupField = view.groupBy?.field ? fields.find((f2) => f2.id === view.groupBy?.field) : null;
    const dataByGroup = groupField ? getDataByGroup(data, groupField) : null;
    const { showTitle = true, showMedia = true, showDescription = true } = view;
    const hasPrimaryColumn = titleField && showTitle || mediaField && showMedia || descriptionField2 && showDescription;
    const columns = view.fields ?? [];
    const headerMenuRef = (column, index) => (node) => {
      if (node) {
        headerMenuRefs.current.set(column, {
          node,
          fallback: columns[index > 0 ? index - 1 : 1]
        });
      } else {
        headerMenuRefs.current.delete(column);
      }
    };
    const isInfiniteScroll = view.infiniteScrollEnabled && !dataByGroup;
    const isRtl = (0, import_i18n91.isRTL)();
    if (!hasData) {
      return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
        "div",
        {
          className: clsx_default("dataviews-no-results", {
            "is-refreshing": isDelayedLoading
          }),
          id: tableNoticeId,
          children: empty
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(import_jsx_runtime191.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(
        "table",
        {
          className: clsx_default("dataviews-view-table", className, {
            [`has-${view.layout?.density}-density`]: view.layout?.density && ["compact", "comfortable"].includes(
              view.layout.density
            ),
            "has-bulk-actions": hasBulkActions,
            "is-refreshing": !isInfiniteScroll && isDelayedLoading
          }),
          "aria-busy": isLoading,
          "aria-describedby": tableNoticeId,
          role: isInfiniteScroll ? "feed" : void 0,
          inert: !isInfiniteScroll && isLoading ? "true" : void 0,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)("colgroup", { children: [
              hasBulkActions && /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("col", { className: "dataviews-view-table__col-checkbox" }),
              hasPrimaryColumn && /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("col", { className: "dataviews-view-table__col-first-data" }),
              columns.map((column, index) => /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
                "col",
                {
                  className: clsx_default(
                    `dataviews-view-table__col-${column}`,
                    {
                      "dataviews-view-table__col-first-data": !hasPrimaryColumn && index === 0
                    }
                  )
                },
                `col-${column}`
              )),
              !!actions?.length && /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("col", { className: "dataviews-view-table__col-actions" })
            ] }),
            contextMenuAnchor && /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
              import_components96.Popover,
              {
                anchor: contextMenuAnchor,
                onClose: () => setContextMenuAnchor(null),
                placement: "bottom-start",
                children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(PropertiesSection, { showLabel: false })
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("thead", { onContextMenu: handleHeaderContextMenu, children: /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)("tr", { className: "dataviews-view-table__row", children: [
              hasBulkActions && /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
                "th",
                {
                  className: "dataviews-view-table__checkbox-column",
                  scope: "col",
                  onContextMenu: handleHeaderContextMenu,
                  children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
                    BulkSelectionCheckbox,
                    {
                      selection,
                      onChangeSelection,
                      data,
                      actions,
                      getItemId: getItemId2
                    }
                  )
                }
              ),
              hasPrimaryColumn && /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("th", { scope: "col", children: titleField && /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
                column_header_menu_default,
                {
                  ref: headerMenuRef(
                    titleField.id,
                    0
                  ),
                  fieldId: titleField.id,
                  view,
                  fields,
                  onChangeView,
                  onHide,
                  setOpenedFilter,
                  canMove: false,
                  canInsertLeft: isRtl ? view.layout?.enableMoving ?? true : false,
                  canInsertRight: isRtl ? false : view.layout?.enableMoving ?? true
                }
              ) }),
              columns.map((column, index) => {
                const { width, maxWidth, minWidth, align } = view.layout?.styles?.[column] ?? {};
                const field = fields.find(
                  (f2) => f2.id === column
                );
                const effectiveAlign = getEffectiveAlign(
                  align,
                  field?.type
                );
                const canInsertOrMove = view.layout?.enableMoving ?? true;
                return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
                  "th",
                  {
                    style: {
                      width,
                      maxWidth,
                      minWidth,
                      textAlign: effectiveAlign
                    },
                    "aria-sort": view.sort?.direction && view.sort?.field === column ? sortValues[view.sort.direction] : void 0,
                    scope: "col",
                    children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
                      column_header_menu_default,
                      {
                        ref: headerMenuRef(column, index),
                        fieldId: column,
                        view,
                        fields,
                        onChangeView,
                        onHide,
                        setOpenedFilter,
                        canMove: canInsertOrMove,
                        canInsertLeft: canInsertOrMove,
                        canInsertRight: canInsertOrMove
                      }
                    )
                  },
                  column
                );
              }),
              !!actions?.length && /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
                "th",
                {
                  className: clsx_default(
                    "dataviews-view-table__actions-column",
                    {
                      "dataviews-view-table__actions-column--sticky": true,
                      "dataviews-view-table__actions-column--stuck": !isHorizontalScrollEnd
                    }
                  ),
                  children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("span", { className: "dataviews-view-table-header", children: (0, import_i18n91.__)("Actions") })
                }
              )
            ] }) }),
            hasData && groupField && dataByGroup ? Array.from(dataByGroup.entries()).map(
              ([groupName, groupItems]) => /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)("tbody", { children: [
                /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("tr", { className: "dataviews-view-table__group-header-row", children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
                  "td",
                  {
                    colSpan: columns.length + (hasPrimaryColumn ? 1 : 0) + (hasBulkActions ? 1 : 0) + (actions?.length ? 1 : 0),
                    className: "dataviews-view-table__group-header-cell",
                    children: view.groupBy?.showLabel === false ? groupName : (0, import_i18n91.sprintf)(
                      // translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
                      (0, import_i18n91.__)("%1$s: %2$s"),
                      groupField.label,
                      groupName
                    )
                  }
                ) }),
                groupItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
                  TableRow,
                  {
                    item,
                    level: view.showLevels && typeof getItemLevel2 === "function" ? getItemLevel2(item) : void 0,
                    hasBulkActions,
                    actions,
                    fields,
                    id: getItemId2(item) || index.toString(),
                    view,
                    titleField,
                    mediaField,
                    descriptionField: descriptionField2,
                    selection,
                    getItemId: getItemId2,
                    onChangeSelection,
                    onClickItem,
                    renderItemLink,
                    isItemClickable,
                    isActionsColumnSticky: !isHorizontalScrollEnd
                  },
                  getItemId2(item)
                ))
              ] }, `group-${groupName}`)
            ) : /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("tbody", { children: hasData && data.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
              TableRow,
              {
                item,
                level: view.showLevels && typeof getItemLevel2 === "function" ? getItemLevel2(item) : void 0,
                hasBulkActions,
                actions,
                fields,
                id: getItemId2(item) || index.toString(),
                view,
                titleField,
                mediaField,
                descriptionField: descriptionField2,
                selection,
                getItemId: getItemId2,
                onChangeSelection,
                onClickItem,
                renderItemLink,
                isItemClickable,
                isActionsColumnSticky: !isHorizontalScrollEnd,
                posinset: isInfiniteScroll ? index + 1 : void 0
              },
              getItemId2(item)
            )) })
          ]
        }
      ),
      isInfiniteScroll && isLoading && /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("div", { className: "dataviews-loading", id: tableNoticeId, children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("p", { className: "dataviews-loading-more", children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(import_components96.Spinner, {}) }) })
    ] });
  }
  var table_default = ViewTable;

  // packages/dataviews/build-module/components/dataviews-layouts/grid/index.mjs
  var import_components99 = __toESM(require_components(), 1);
  var import_i18n94 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/components/dataviews-layouts/grid/composite-grid.mjs
  var import_components98 = __toESM(require_components(), 1);
  var import_i18n93 = __toESM(require_i18n(), 1);
  var import_compose15 = __toESM(require_compose(), 1);
  var import_keycodes7 = __toESM(require_keycodes(), 1);
  var import_element78 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/components/dataviews-layouts/grid/preview-size-picker.mjs
  var import_components97 = __toESM(require_components(), 1);
  var import_i18n92 = __toESM(require_i18n(), 1);
  var import_element77 = __toESM(require_element(), 1);
  var import_jsx_runtime192 = __toESM(require_jsx_runtime(), 1);
  var imageSizes = [
    {
      value: 120,
      breakpoint: 1
    },
    {
      value: 170,
      breakpoint: 1
    },
    {
      value: 230,
      breakpoint: 1
    },
    {
      value: 290,
      breakpoint: 1112
      // at minimum image width, 4 images display at this container size
    },
    {
      value: 350,
      breakpoint: 1636
      // at minimum image width, 6 images display at this container size
    },
    {
      value: 430,
      breakpoint: 588
      // at minimum image width, 2 images display at this container size
    }
  ];
  var DEFAULT_PREVIEW_SIZE = imageSizes[2].value;
  function useGridColumns() {
    const context = (0, import_element77.useContext)(dataviews_context_default);
    const view = context.view;
    return (0, import_element77.useMemo)(() => {
      const containerWidth = context.containerWidth;
      const gap = 32;
      const previewSize = view.layout?.previewSize ?? DEFAULT_PREVIEW_SIZE;
      const columns = Math.floor(
        (containerWidth + gap) / (previewSize + gap)
      );
      return Math.max(1, columns);
    }, [context.containerWidth, view.layout?.previewSize]);
  }

  // packages/dataviews/build-module/components/dataviews-layouts/grid/composite-grid.mjs
  var import_jsx_runtime193 = __toESM(require_jsx_runtime(), 1);
  var { Badge: Badge3 } = unlock3(import_components98.privateApis);
  function chunk(array, size) {
    const chunks = [];
    for (let i2 = 0, j2 = array.length; i2 < j2; i2 += size) {
      chunks.push(array.slice(i2, i2 + size));
    }
    return chunks;
  }
  var GridItem = (0, import_element78.forwardRef)(function GridItem2({
    view,
    selection,
    onChangeSelection,
    onClickItem,
    isItemClickable,
    renderItemLink,
    getItemId: getItemId2,
    item,
    actions,
    mediaField,
    titleField,
    descriptionField: descriptionField2,
    regularFields,
    badgeFields,
    hasBulkActions,
    config: config2,
    ...props
  }, ref) {
    const { showTitle = true, showMedia = true, showDescription = true } = view;
    const hasBulkAction = useHasAPossibleBulkAction(actions, item);
    const id = getItemId2(item);
    const instanceId = (0, import_compose15.useInstanceId)(GridItem2);
    const isSelected2 = selection.includes(id);
    const mediaPlaceholder = /* @__PURE__ */ (0, import_jsx_runtime193.jsx)("span", { className: "dataviews-view-grid__media-placeholder" });
    const rendersMediaField = showMedia && mediaField?.render;
    const renderedMediaField = rendersMediaField ? /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
      mediaField.render,
      {
        item,
        field: mediaField,
        config: config2
      }
    ) : mediaPlaceholder;
    const renderedTitleField = showTitle && titleField?.render ? /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(titleField.render, { item, field: titleField }) : null;
    let mediaA11yProps;
    let titleA11yProps;
    if (isItemClickable(item) && onClickItem) {
      if (renderedTitleField) {
        mediaA11yProps = {
          "aria-labelledby": `dataviews-view-grid__title-field-${instanceId}`
        };
        titleA11yProps = {
          id: `dataviews-view-grid__title-field-${instanceId}`
        };
      } else {
        mediaA11yProps = {
          "aria-label": (0, import_i18n93.__)("Navigate to item")
        };
      }
    }
    return /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(
      Stack,
      {
        direction: "column",
        ...props,
        ref,
        className: clsx_default(
          props.className,
          "dataviews-view-grid__row__gridcell",
          "dataviews-view-grid__card",
          {
            "is-selected": hasBulkAction && isSelected2
          }
        ),
        onClickCapture: (event) => {
          props.onClickCapture?.(event);
          if ((0, import_keycodes7.isAppleOS)() ? event.metaKey : event.ctrlKey) {
            event.stopPropagation();
            event.preventDefault();
            if (!hasBulkAction) {
              return;
            }
            onChangeSelection(
              selection.includes(id) ? selection.filter((itemId) => id !== itemId) : [...selection, id]
            );
          }
        },
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
            ItemClickWrapper,
            {
              item,
              isItemClickable,
              onClickItem,
              renderItemLink,
              className: clsx_default("dataviews-view-grid__media", {
                "dataviews-view-grid__media--placeholder": !rendersMediaField
              }),
              ...mediaA11yProps,
              children: renderedMediaField
            }
          ),
          hasBulkActions && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
            DataViewsSelectionCheckbox,
            {
              item,
              selection,
              onChangeSelection,
              getItemId: getItemId2,
              titleField,
              disabled: !hasBulkAction
            }
          ),
          !!actions?.length && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)("div", { className: "dataviews-view-grid__media-actions", children: /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(ItemActions, { item, actions, isCompact: true }) }),
          showTitle && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)("div", { className: "dataviews-view-grid__title", children: /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
            ItemClickWrapper,
            {
              item,
              isItemClickable,
              onClickItem,
              renderItemLink,
              className: "dataviews-view-grid__title-field dataviews-title-field",
              ...titleA11yProps,
              title: titleField?.getValueFormatted({
                item,
                field: titleField
              }) || void 0,
              children: renderedTitleField
            }
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(Stack, { direction: "column", gap: "xs", children: [
            showDescription && descriptionField2?.render && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
              descriptionField2.render,
              {
                item,
                field: descriptionField2
              }
            ),
            !!badgeFields?.length && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
              Stack,
              {
                direction: "row",
                className: "dataviews-view-grid__badge-fields",
                gap: "sm",
                wrap: "wrap",
                align: "top",
                justify: "flex-start",
                children: badgeFields.map((field) => {
                  return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
                    Badge3,
                    {
                      className: "dataviews-view-grid__field-value",
                      children: /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
                        field.render,
                        {
                          item,
                          field
                        }
                      )
                    },
                    field.id
                  );
                })
              }
            ),
            !!regularFields?.length && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
              Stack,
              {
                direction: "column",
                className: "dataviews-view-grid__fields",
                gap: "xs",
                children: regularFields.map((field) => {
                  return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
                    import_components98.Flex,
                    {
                      className: "dataviews-view-grid__field",
                      gap: 1,
                      justify: "flex-start",
                      expanded: true,
                      style: { height: "auto" },
                      direction: "row",
                      children: /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(import_jsx_runtime193.Fragment, { children: [
                        /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(import_components98.Tooltip, { text: field.label, children: /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(import_components98.FlexItem, { className: "dataviews-view-grid__field-name", children: field.header }) }),
                        /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
                          import_components98.FlexItem,
                          {
                            className: "dataviews-view-grid__field-value",
                            style: { maxHeight: "none" },
                            children: /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
                              field.render,
                              {
                                item,
                                field
                              }
                            )
                          }
                        )
                      ] })
                    },
                    field.id
                  );
                })
              }
            )
          ] })
        ]
      }
    );
  });
  function CompositeGrid({
    data,
    isInfiniteScroll,
    className,
    inert,
    isLoading,
    view,
    fields,
    selection,
    onChangeSelection,
    onClickItem,
    isItemClickable,
    renderItemLink,
    getItemId: getItemId2,
    actions
  }) {
    const { paginationInfo, resizeObserverRef } = (0, import_element78.useContext)(dataviews_context_default);
    const gridColumns = useGridColumns();
    const hasBulkActions = useSomeItemHasAPossibleBulkAction(actions, data);
    const titleField = fields.find(
      (field) => field.id === view?.titleField
    );
    const mediaField = fields.find(
      (field) => field.id === view?.mediaField
    );
    const descriptionField2 = fields.find(
      (field) => field.id === view?.descriptionField
    );
    const otherFields = view.fields ?? [];
    const { regularFields, badgeFields } = otherFields.reduce(
      (accumulator, fieldId) => {
        const field = fields.find((f2) => f2.id === fieldId);
        if (!field) {
          return accumulator;
        }
        const key = view.layout?.badgeFields?.includes(fieldId) ? "badgeFields" : "regularFields";
        accumulator[key].push(field);
        return accumulator;
      },
      { regularFields: [], badgeFields: [] }
    );
    const size = "900px";
    const totalRows = Math.ceil(data.length / gridColumns);
    return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
      import_components98.Composite,
      {
        role: isInfiniteScroll ? "feed" : "grid",
        className: clsx_default("dataviews-view-grid", className),
        focusWrap: true,
        "aria-busy": isLoading,
        "aria-rowcount": isInfiniteScroll ? void 0 : totalRows,
        ref: resizeObserverRef,
        inert,
        children: chunk(data, gridColumns).map((row, i2) => /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
          import_components98.Composite.Row,
          {
            render: /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
              "div",
              {
                role: "row",
                "aria-rowindex": i2 + 1,
                "aria-label": (0, import_i18n93.sprintf)(
                  /* translators: %d: The row number in the grid */
                  (0, import_i18n93.__)("Row %d"),
                  i2 + 1
                ),
                className: "dataviews-view-grid__row",
                style: {
                  gridTemplateColumns: `repeat( ${gridColumns}, minmax(0, 1fr) )`
                }
              }
            ),
            children: row.map((item, indexInRow) => {
              const index = i2 * gridColumns + indexInRow;
              return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
                import_components98.Composite.Item,
                {
                  render: (props) => /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
                    GridItem,
                    {
                      ...props,
                      role: isInfiniteScroll ? "article" : "gridcell",
                      "aria-setsize": isInfiniteScroll ? paginationInfo.totalItems : void 0,
                      "aria-posinset": isInfiniteScroll ? index + 1 : void 0,
                      view,
                      selection,
                      onChangeSelection,
                      onClickItem,
                      isItemClickable,
                      renderItemLink,
                      getItemId: getItemId2,
                      item,
                      actions,
                      mediaField,
                      titleField,
                      descriptionField: descriptionField2,
                      regularFields,
                      badgeFields,
                      hasBulkActions,
                      config: {
                        sizes: size
                      }
                    }
                  )
                },
                getItemId2(item)
              );
            })
          },
          i2
        ))
      }
    );
  }

  // packages/dataviews/build-module/components/dataviews-layouts/grid/index.mjs
  var import_jsx_runtime194 = __toESM(require_jsx_runtime(), 1);
  function ViewGrid({
    actions,
    data,
    fields,
    getItemId: getItemId2,
    isLoading,
    onChangeSelection,
    onClickItem,
    isItemClickable,
    renderItemLink,
    selection,
    view,
    className,
    empty
  }) {
    const isDelayedLoading = useDelayedLoading(!!isLoading);
    const hasData = !!data?.length;
    const groupField = view.groupBy?.field ? fields.find((f2) => f2.id === view.groupBy?.field) : null;
    const dataByGroup = groupField ? getDataByGroup(data, groupField) : null;
    const isInfiniteScroll = view.infiniteScrollEnabled && !dataByGroup;
    if (!hasData) {
      return /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
        "div",
        {
          className: clsx_default("dataviews-no-results", {
            "is-refreshing": isDelayedLoading
          }),
          children: empty
        }
      );
    }
    const gridProps = {
      className: clsx_default(className, {
        "is-refreshing": !isInfiniteScroll && isDelayedLoading
      }),
      inert: !isInfiniteScroll && !!isLoading ? "true" : void 0,
      isLoading,
      view,
      fields,
      selection,
      onChangeSelection,
      onClickItem,
      isItemClickable,
      renderItemLink,
      getItemId: getItemId2,
      actions
    };
    return /* @__PURE__ */ (0, import_jsx_runtime194.jsxs)(import_jsx_runtime194.Fragment, {
      // Render multiple groups.
      children: [
        hasData && groupField && dataByGroup && /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(Stack, { direction: "column", gap: "lg", children: Array.from(dataByGroup.entries()).map(
          ([groupName, groupItems]) => /* @__PURE__ */ (0, import_jsx_runtime194.jsxs)(
            Stack,
            {
              direction: "column",
              gap: "sm",
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime194.jsx)("h3", { className: "dataviews-view-grid__group-header", children: view.groupBy?.showLabel === false ? groupName : (0, import_i18n94.sprintf)(
                  // translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
                  (0, import_i18n94.__)("%1$s: %2$s"),
                  groupField.label,
                  groupName
                ) }),
                /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
                  CompositeGrid,
                  {
                    ...gridProps,
                    data: groupItems,
                    isInfiniteScroll: false
                  }
                )
              ]
            },
            groupName
          )
        ) }),
        // Render a single grid with all data.
        !dataByGroup && /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
          CompositeGrid,
          {
            ...gridProps,
            data,
            isInfiniteScroll: !!isInfiniteScroll
          }
        ),
        isInfiniteScroll && isLoading && /* @__PURE__ */ (0, import_jsx_runtime194.jsx)("p", { className: "dataviews-loading-more", children: /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(import_components99.Spinner, {}) })
      ]
    });
  }
  var grid_default = ViewGrid;

  // packages/dataviews/build-module/components/dataviews-layouts/list/index.mjs
  var import_compose16 = __toESM(require_compose(), 1);
  var import_components100 = __toESM(require_components(), 1);
  var import_element79 = __toESM(require_element(), 1);
  var import_i18n95 = __toESM(require_i18n(), 1);
  var import_data61 = __toESM(require_data(), 1);
  var import_jsx_runtime195 = __toESM(require_jsx_runtime(), 1);
  var { Menu: Menu7 } = unlock3(import_components100.privateApis);
  function generateItemWrapperCompositeId(idPrefix) {
    return `${idPrefix}-item-wrapper`;
  }
  function generatePrimaryActionCompositeId(idPrefix, primaryActionId) {
    return `${idPrefix}-primary-action-${primaryActionId}`;
  }
  function generateDropdownTriggerCompositeId(idPrefix) {
    return `${idPrefix}-dropdown`;
  }
  function PrimaryActionGridCell({
    idPrefix,
    primaryAction,
    item
  }) {
    const registry = (0, import_data61.useRegistry)();
    const [isModalOpen, setIsModalOpen] = (0, import_element79.useState)(false);
    const compositeItemId = generatePrimaryActionCompositeId(
      idPrefix,
      primaryAction.id
    );
    const label = typeof primaryAction.label === "string" ? primaryAction.label : primaryAction.label([item]);
    return "RenderModal" in primaryAction ? /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("div", { role: "gridcell", children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
      import_components100.Composite.Item,
      {
        id: compositeItemId,
        render: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
          import_components100.Button,
          {
            disabled: !!primaryAction.disabled,
            accessibleWhenDisabled: true,
            text: label,
            size: "small",
            onClick: () => setIsModalOpen(true)
          }
        ),
        children: isModalOpen && /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
          ActionModal,
          {
            action: primaryAction,
            items: [item],
            closeModal: () => setIsModalOpen(false)
          }
        )
      }
    ) }, primaryAction.id) : /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("div", { role: "gridcell", children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
      import_components100.Composite.Item,
      {
        id: compositeItemId,
        render: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
          import_components100.Button,
          {
            disabled: !!primaryAction.disabled,
            accessibleWhenDisabled: true,
            size: "small",
            onClick: () => {
              primaryAction.callback([item], { registry });
            },
            children: label
          }
        )
      }
    ) }, primaryAction.id);
  }
  function ListItem({
    view,
    actions,
    idPrefix,
    isSelected: isSelected2,
    item,
    titleField,
    mediaField,
    descriptionField: descriptionField2,
    onSelect,
    otherFields,
    onDropdownTriggerKeyDown,
    posinset
  }) {
    const {
      showTitle = true,
      showMedia = true,
      showDescription = true,
      infiniteScrollEnabled
    } = view;
    const itemRef = (0, import_element79.useRef)(null);
    const labelId = `${idPrefix}-label`;
    const descriptionId = `${idPrefix}-description`;
    const registry = (0, import_data61.useRegistry)();
    const [isHovered, setIsHovered] = (0, import_element79.useState)(false);
    const [activeModalAction, setActiveModalAction] = (0, import_element79.useState)(
      null
    );
    const handleHover = ({ type }) => {
      const isHover = type === "mouseenter";
      setIsHovered(isHover);
    };
    const { paginationInfo } = (0, import_element79.useContext)(dataviews_context_default);
    (0, import_element79.useEffect)(() => {
      if (isSelected2) {
        itemRef.current?.scrollIntoView({
          behavior: "auto",
          block: "nearest",
          inline: "nearest"
        });
      }
    }, [isSelected2]);
    const { primaryAction, eligibleActions } = (0, import_element79.useMemo)(() => {
      const _eligibleActions = actions.filter(
        (action) => !action.isEligible || action.isEligible(item)
      );
      const _primaryActions = _eligibleActions.filter(
        (action) => action.isPrimary
      );
      return {
        primaryAction: _primaryActions[0],
        eligibleActions: _eligibleActions
      };
    }, [actions, item]);
    const hasOnlyOnePrimaryAction = primaryAction && actions.length === 1;
    const renderedMediaField = showMedia && mediaField?.render ? /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("div", { className: "dataviews-view-list__media-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
      mediaField.render,
      {
        item,
        field: mediaField,
        config: { sizes: "52px" }
      }
    ) }) : null;
    const renderedTitleField = showTitle && titleField?.render ? /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(titleField.render, { item, field: titleField }) : null;
    const usedActions = eligibleActions?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)(
      Stack,
      {
        direction: "row",
        gap: "md",
        className: "dataviews-view-list__item-actions",
        children: [
          primaryAction && /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
            PrimaryActionGridCell,
            {
              idPrefix,
              primaryAction,
              item
            }
          ),
          !hasOnlyOnePrimaryAction && /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)("div", { role: "gridcell", children: [
            /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)(Menu7, { placement: "bottom-end", children: [
              /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
                Menu7.TriggerButton,
                {
                  render: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
                    import_components100.Composite.Item,
                    {
                      id: generateDropdownTriggerCompositeId(
                        idPrefix
                      ),
                      render: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
                        import_components100.Button,
                        {
                          size: "small",
                          icon: more_vertical_default,
                          label: (0, import_i18n95.__)("Actions"),
                          accessibleWhenDisabled: true,
                          disabled: !actions.length,
                          onKeyDown: onDropdownTriggerKeyDown
                        }
                      )
                    }
                  )
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(Menu7.Popover, { children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
                ActionsMenuGroup,
                {
                  actions: eligibleActions,
                  item,
                  registry,
                  setActiveModalAction
                }
              ) })
            ] }),
            !!activeModalAction && /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
              ActionModal,
              {
                action: activeModalAction,
                items: [item],
                closeModal: () => setActiveModalAction(null)
              }
            )
          ] })
        ]
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
      import_components100.Composite.Row,
      {
        ref: itemRef,
        render: (
          /* aria-posinset breaks Composite.Row if passed to it directly. */
          /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
            "div",
            {
              "aria-posinset": posinset,
              "aria-setsize": infiniteScrollEnabled ? paginationInfo.totalItems : void 0
            }
          )
        ),
        role: infiniteScrollEnabled ? "article" : "row",
        className: clsx_default({
          "is-selected": isSelected2,
          "is-hovered": isHovered
        }),
        onMouseEnter: handleHover,
        onMouseLeave: handleHover,
        children: /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)(
          Stack,
          {
            direction: "row",
            className: "dataviews-view-list__item-wrapper",
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("div", { role: "gridcell", children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
                import_components100.Composite.Item,
                {
                  id: generateItemWrapperCompositeId(idPrefix),
                  "aria-pressed": isSelected2,
                  "aria-labelledby": labelId,
                  "aria-describedby": descriptionId,
                  className: "dataviews-view-list__item",
                  onClick: () => onSelect(item)
                }
              ) }),
              /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)(
                Stack,
                {
                  direction: "row",
                  gap: "md",
                  justify: "start",
                  align: "flex-start",
                  style: { flex: 1, minWidth: 0 },
                  children: [
                    renderedMediaField,
                    /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)(
                      Stack,
                      {
                        direction: "column",
                        gap: "xs",
                        className: "dataviews-view-list__field-wrapper",
                        children: [
                          /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)(Stack, { direction: "row", align: "center", children: [
                            /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
                              "div",
                              {
                                className: "dataviews-title-field dataviews-view-list__title-field",
                                id: labelId,
                                children: renderedTitleField
                              }
                            ),
                            usedActions
                          ] }),
                          showDescription && descriptionField2?.render && /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("div", { className: "dataviews-view-list__field", children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
                            descriptionField2.render,
                            {
                              item,
                              field: descriptionField2
                            }
                          ) }),
                          /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
                            "div",
                            {
                              className: "dataviews-view-list__fields",
                              id: descriptionId,
                              children: otherFields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)(
                                "div",
                                {
                                  className: "dataviews-view-list__field",
                                  children: [
                                    /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
                                      import_components100.VisuallyHidden,
                                      {
                                        as: "span",
                                        className: "dataviews-view-list__field-label",
                                        children: field.label
                                      }
                                    ),
                                    /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("span", { className: "dataviews-view-list__field-value", children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
                                      field.render,
                                      {
                                        item,
                                        field
                                      }
                                    ) })
                                  ]
                                },
                                field.id
                              ))
                            }
                          )
                        ]
                      }
                    )
                  ]
                }
              )
            ]
          }
        )
      }
    );
  }
  function isDefined2(item) {
    return !!item;
  }
  function ViewList(props) {
    const {
      actions,
      data,
      fields,
      getItemId: getItemId2,
      isLoading,
      onChangeSelection,
      selection,
      view,
      className,
      empty
    } = props;
    const baseId = (0, import_compose16.useInstanceId)(ViewList, "view-list");
    const isDelayedLoading = useDelayedLoading(!!isLoading);
    const selectedItem = data?.findLast(
      (item) => selection.includes(getItemId2(item))
    );
    const titleField = fields.find((field) => field.id === view.titleField);
    const mediaField = fields.find((field) => field.id === view.mediaField);
    const descriptionField2 = fields.find(
      (field) => field.id === view.descriptionField
    );
    const otherFields = (view?.fields ?? []).map((fieldId) => fields.find((f2) => fieldId === f2.id)).filter(isDefined2);
    const onSelect = (item) => onChangeSelection([getItemId2(item)]);
    const generateCompositeItemIdPrefix = (0, import_element79.useCallback)(
      (item) => `${baseId}-${getItemId2(item)}`,
      [baseId, getItemId2]
    );
    const isActiveCompositeItem = (0, import_element79.useCallback)(
      (item, idToCheck) => {
        return idToCheck.startsWith(
          generateCompositeItemIdPrefix(item)
        );
      },
      [generateCompositeItemIdPrefix]
    );
    const [activeCompositeId, setActiveCompositeId] = (0, import_element79.useState)(void 0);
    (0, import_element79.useEffect)(() => {
      if (selectedItem) {
        setActiveCompositeId(
          generateItemWrapperCompositeId(
            generateCompositeItemIdPrefix(selectedItem)
          )
        );
      }
    }, [selectedItem, generateCompositeItemIdPrefix]);
    const activeItemIndex = data.findIndex(
      (item) => isActiveCompositeItem(item, activeCompositeId ?? "")
    );
    const previousActiveItemIndex = (0, import_compose16.usePrevious)(activeItemIndex);
    const isActiveIdInList = activeItemIndex !== -1;
    const selectCompositeItem = (0, import_element79.useCallback)(
      (targetIndex, generateCompositeId) => {
        const clampedIndex = Math.min(
          data.length - 1,
          Math.max(0, targetIndex)
        );
        if (!data[clampedIndex]) {
          return;
        }
        const itemIdPrefix = generateCompositeItemIdPrefix(
          data[clampedIndex]
        );
        const targetCompositeItemId = generateCompositeId(itemIdPrefix);
        setActiveCompositeId(targetCompositeItemId);
        document.getElementById(targetCompositeItemId)?.focus();
      },
      [data, generateCompositeItemIdPrefix]
    );
    (0, import_element79.useEffect)(() => {
      const wasActiveIdInList = previousActiveItemIndex !== void 0 && previousActiveItemIndex !== -1;
      if (!isActiveIdInList && wasActiveIdInList) {
        selectCompositeItem(
          previousActiveItemIndex,
          generateItemWrapperCompositeId
        );
      }
    }, [isActiveIdInList, selectCompositeItem, previousActiveItemIndex]);
    const onDropdownTriggerKeyDown = (0, import_element79.useCallback)(
      (event) => {
        if (event.key === "ArrowDown") {
          event.preventDefault();
          selectCompositeItem(
            activeItemIndex + 1,
            generateDropdownTriggerCompositeId
          );
        }
        if (event.key === "ArrowUp") {
          event.preventDefault();
          selectCompositeItem(
            activeItemIndex - 1,
            generateDropdownTriggerCompositeId
          );
        }
      },
      [selectCompositeItem, activeItemIndex]
    );
    const hasData = !!data?.length;
    const groupField = view.groupBy?.field ? fields.find((field) => field.id === view.groupBy?.field) : null;
    const dataByGroup = hasData && groupField ? getDataByGroup(data, groupField) : null;
    const isInfiniteScroll = view.infiniteScrollEnabled && !dataByGroup;
    if (!hasData) {
      return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
        "div",
        {
          className: clsx_default("dataviews-no-results", {
            "is-refreshing": isDelayedLoading
          }),
          children: empty
        }
      );
    }
    if (hasData && groupField && dataByGroup) {
      return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
        import_components100.Composite,
        {
          id: `${baseId}`,
          render: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("div", {}),
          className: "dataviews-view-list__group",
          role: "grid",
          activeId: activeCompositeId,
          setActiveId: setActiveCompositeId,
          children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
            Stack,
            {
              direction: "column",
              gap: "lg",
              className: clsx_default("dataviews-view-list", className),
              children: Array.from(dataByGroup.entries()).map(
                ([groupName, groupItems]) => /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)(
                  Stack,
                  {
                    direction: "column",
                    gap: "sm",
                    children: [
                      /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("h3", { className: "dataviews-view-list__group-header", children: view.groupBy?.showLabel === false ? groupName : (0, import_i18n95.sprintf)(
                        // translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
                        (0, import_i18n95.__)("%1$s: %2$s"),
                        groupField.label,
                        groupName
                      ) }),
                      groupItems.map((item) => {
                        const id = generateCompositeItemIdPrefix(item);
                        return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
                          ListItem,
                          {
                            view,
                            idPrefix: id,
                            actions,
                            item,
                            isSelected: item === selectedItem,
                            onSelect,
                            mediaField,
                            titleField,
                            descriptionField: descriptionField2,
                            otherFields,
                            onDropdownTriggerKeyDown
                          },
                          id
                        );
                      })
                    ]
                  },
                  groupName
                )
              )
            }
          )
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)(import_jsx_runtime195.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
        import_components100.Composite,
        {
          id: baseId,
          render: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("div", {}),
          className: clsx_default("dataviews-view-list", className, {
            [`has-${view.layout?.density}-density`]: view.layout?.density && ["compact", "comfortable"].includes(
              view.layout.density
            ),
            "is-refreshing": !isInfiniteScroll && isDelayedLoading
          }),
          role: view.infiniteScrollEnabled ? "feed" : "grid",
          activeId: activeCompositeId,
          setActiveId: setActiveCompositeId,
          inert: !isInfiniteScroll && !!isLoading ? "true" : void 0,
          children: data.map((item, index) => {
            const id = generateCompositeItemIdPrefix(item);
            return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
              ListItem,
              {
                view,
                idPrefix: id,
                actions,
                item,
                isSelected: item === selectedItem,
                onSelect,
                mediaField,
                titleField,
                descriptionField: descriptionField2,
                otherFields,
                onDropdownTriggerKeyDown,
                posinset: view.infiniteScrollEnabled ? index + 1 : void 0
              },
              id
            );
          })
        }
      ),
      isInfiniteScroll && isLoading && /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("p", { className: "dataviews-loading-more", children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(import_components100.Spinner, {}) })
    ] });
  }

  // packages/dataviews/build-module/components/dataviews-layouts/activity/index.mjs
  var import_components102 = __toESM(require_components(), 1);

  // packages/dataviews/build-module/components/dataviews-layouts/activity/activity-group.mjs
  var import_i18n96 = __toESM(require_i18n(), 1);
  var import_element80 = __toESM(require_element(), 1);
  var import_jsx_runtime196 = __toESM(require_jsx_runtime(), 1);
  function ActivityGroup({
    groupName,
    groupData,
    groupField,
    showLabel = true,
    children
  }) {
    const groupHeader = showLabel ? (0, import_element80.createInterpolateElement)(
      // translators: %s: The label of the field e.g. "Status".
      (0, import_i18n96.sprintf)((0, import_i18n96.__)("%s: <groupName />"), groupField.label).trim(),
      {
        groupName: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
          groupField.render,
          {
            item: groupData[0],
            field: groupField
          }
        )
      }
    ) : /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(groupField.render, { item: groupData[0], field: groupField });
    return /* @__PURE__ */ (0, import_jsx_runtime196.jsxs)(
      Stack,
      {
        direction: "column",
        className: "dataviews-view-activity__group",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime196.jsx)("h3", { className: "dataviews-view-activity__group-header", children: groupHeader }),
          children
        ]
      },
      groupName
    );
  }

  // packages/dataviews/build-module/components/dataviews-layouts/activity/activity-item.mjs
  var import_components101 = __toESM(require_components(), 1);
  var import_element81 = __toESM(require_element(), 1);
  var import_data62 = __toESM(require_data(), 1);
  var import_compose17 = __toESM(require_compose(), 1);
  var import_jsx_runtime197 = __toESM(require_jsx_runtime(), 1);
  function ActivityItem(props) {
    const {
      view,
      actions,
      item,
      titleField,
      mediaField,
      descriptionField: descriptionField2,
      otherFields,
      posinset,
      onClickItem,
      renderItemLink,
      isItemClickable
    } = props;
    const {
      showTitle = true,
      showMedia = true,
      showDescription = true,
      infiniteScrollEnabled
    } = view;
    const itemRef = (0, import_element81.useRef)(null);
    const registry = (0, import_data62.useRegistry)();
    const { paginationInfo } = (0, import_element81.useContext)(dataviews_context_default);
    const { primaryActions, eligibleActions } = (0, import_element81.useMemo)(() => {
      const _eligibleActions = actions.filter(
        (action) => !action.isEligible || action.isEligible(item)
      );
      const _primaryActions = _eligibleActions.filter(
        (action) => action.isPrimary
      );
      return {
        primaryActions: _primaryActions,
        eligibleActions: _eligibleActions
      };
    }, [actions, item]);
    const isMobileViewport = (0, import_compose17.useViewportMatch)("medium", "<");
    const density = view.layout?.density ?? "balanced";
    const mediaContent = showMedia && density !== "compact" && mediaField?.render ? /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
      mediaField.render,
      {
        item,
        field: mediaField,
        config: {
          sizes: density === "comfortable" ? "32px" : "24px"
        }
      }
    ) : null;
    const renderedMediaField = /* @__PURE__ */ (0, import_jsx_runtime197.jsx)("div", { className: "dataviews-view-activity__item-type-icon", children: mediaContent || /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
      "span",
      {
        className: "dataviews-view-activity__item-bullet",
        "aria-hidden": "true"
      }
    ) });
    const renderedTitleField = showTitle && titleField?.render ? /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(titleField.render, { item, field: titleField }) : null;
    const verticalGap = (0, import_element81.useMemo)(() => {
      switch (density) {
        case "comfortable":
          return "md";
        default:
          return "sm";
      }
    }, [density]);
    return /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
      "div",
      {
        ref: itemRef,
        role: infiniteScrollEnabled ? "article" : void 0,
        "aria-posinset": posinset,
        "aria-setsize": infiniteScrollEnabled ? paginationInfo.totalItems : void 0,
        className: clsx_default(
          "dataviews-view-activity__item",
          density === "compact" && "is-compact",
          density === "balanced" && "is-balanced",
          density === "comfortable" && "is-comfortable"
        ),
        children: /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(Stack, { direction: "row", gap: "lg", justify: "start", align: "flex-start", children: [
          /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
            Stack,
            {
              direction: "column",
              gap: "xs",
              align: "center",
              className: "dataviews-view-activity__item-type",
              children: renderedMediaField
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(
            Stack,
            {
              direction: "column",
              gap: verticalGap,
              align: "flex-start",
              className: "dataviews-view-activity__item-content",
              children: [
                renderedTitleField && /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
                  ItemClickWrapper,
                  {
                    item,
                    isItemClickable,
                    onClickItem,
                    renderItemLink,
                    className: "dataviews-view-activity__item-title",
                    children: renderedTitleField
                  }
                ),
                showDescription && descriptionField2 && /* @__PURE__ */ (0, import_jsx_runtime197.jsx)("div", { className: "dataviews-view-activity__item-description", children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
                  descriptionField2.render,
                  {
                    item,
                    field: descriptionField2
                  }
                ) }),
                /* @__PURE__ */ (0, import_jsx_runtime197.jsx)("div", { className: "dataviews-view-activity__item-fields", children: otherFields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(
                  "div",
                  {
                    className: "dataviews-view-activity__item-field",
                    children: [
                      /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
                        import_components101.VisuallyHidden,
                        {
                          as: "span",
                          className: "dataviews-view-activity__item-field-label",
                          children: field.label
                        }
                      ),
                      /* @__PURE__ */ (0, import_jsx_runtime197.jsx)("span", { className: "dataviews-view-activity__item-field-value", children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
                        field.render,
                        {
                          item,
                          field
                        }
                      ) })
                    ]
                  },
                  field.id
                )) }),
                !!primaryActions?.length && /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
                  PrimaryActions,
                  {
                    item,
                    actions: primaryActions,
                    registry,
                    buttonVariant: "secondary"
                  }
                )
              ]
            }
          ),
          (primaryActions.length < eligibleActions.length || // Since we hide primary actions on mobile, we need to show the menu
          // there if there are any actions at all.
          isMobileViewport && // At the same time, only show the menu if there are actions to show.
          eligibleActions.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime197.jsx)("div", { className: "dataviews-view-activity__item-actions", children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
            ItemActions,
            {
              item,
              actions: eligibleActions,
              isCompact: true
            }
          ) })
        ] })
      }
    );
  }
  var activity_item_default = ActivityItem;

  // packages/dataviews/build-module/components/dataviews-layouts/activity/activity-items.mjs
  var import_react7 = __toESM(require_react(), 1);
  function isDefined3(item) {
    return !!item;
  }
  function ActivityItems(props) {
    const { data, fields, getItemId: getItemId2, view } = props;
    const titleField = fields.find((field) => field.id === view.titleField);
    const mediaField = fields.find((field) => field.id === view.mediaField);
    const descriptionField2 = fields.find(
      (field) => field.id === view.descriptionField
    );
    const otherFields = (view?.fields ?? []).map((fieldId) => fields.find((f2) => fieldId === f2.id)).filter(isDefined3);
    return data.map((item, index) => {
      return /* @__PURE__ */ (0, import_react7.createElement)(
        activity_item_default,
        {
          ...props,
          key: getItemId2(item),
          item,
          mediaField,
          titleField,
          descriptionField: descriptionField2,
          otherFields,
          posinset: view.infiniteScrollEnabled ? index + 1 : void 0
        }
      );
    });
  }

  // packages/dataviews/build-module/components/dataviews-layouts/activity/index.mjs
  var import_jsx_runtime198 = __toESM(require_jsx_runtime(), 1);
  function ViewActivity(props) {
    const { empty, data, fields, isLoading, view, className } = props;
    const isDelayedLoading = useDelayedLoading(!!isLoading);
    const hasData = !!data?.length;
    const groupField = view.groupBy?.field ? fields.find((field) => field.id === view.groupBy?.field) : null;
    const dataByGroup = hasData && groupField ? getDataByGroup(data, groupField) : null;
    const isInfiniteScroll = view.infiniteScrollEnabled && !dataByGroup;
    if (!hasData) {
      return /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
        "div",
        {
          className: clsx_default("dataviews-no-results", {
            "is-refreshing": isDelayedLoading
          }),
          children: empty
        }
      );
    }
    const isInert = !isInfiniteScroll && !!isLoading;
    const wrapperClassName = clsx_default("dataviews-view-activity", className, {
      "is-refreshing": !isInfiniteScroll && isDelayedLoading
    });
    const groupedEntries = dataByGroup ? Array.from(dataByGroup.entries()) : [];
    if (hasData && groupField && dataByGroup) {
      return /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
        Stack,
        {
          direction: "column",
          gap: "sm",
          className: wrapperClassName,
          inert: isInert ? "true" : void 0,
          children: groupedEntries.map(
            ([groupName, groupData]) => /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
              ActivityGroup,
              {
                groupName,
                groupData,
                groupField,
                showLabel: view.groupBy?.showLabel !== false,
                children: /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
                  ActivityItems,
                  {
                    ...props,
                    data: groupData
                  }
                )
              },
              groupName
            )
          )
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(import_jsx_runtime198.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
        "div",
        {
          className: wrapperClassName,
          role: view.infiniteScrollEnabled ? "feed" : void 0,
          inert: isInert ? "true" : void 0,
          children: /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(ActivityItems, { ...props })
        }
      ),
      isInfiniteScroll && isLoading && /* @__PURE__ */ (0, import_jsx_runtime198.jsx)("p", { className: "dataviews-loading-more", children: /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(import_components102.Spinner, {}) })
    ] });
  }

  // packages/dataviews/build-module/components/dataviews-layouts/picker-grid/index.mjs
  var import_components105 = __toESM(require_components(), 1);
  var import_i18n99 = __toESM(require_i18n(), 1);
  var import_compose18 = __toESM(require_compose(), 1);
  var import_element85 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/components/dataviews-picker-footer/index.mjs
  var import_components104 = __toESM(require_components(), 1);
  var import_data63 = __toESM(require_data(), 1);
  var import_element83 = __toESM(require_element(), 1);
  var import_i18n98 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/components/dataviews-pagination/index.mjs
  var import_components103 = __toESM(require_components(), 1);
  var import_element82 = __toESM(require_element(), 1);
  var import_i18n97 = __toESM(require_i18n(), 1);
  var import_jsx_runtime199 = __toESM(require_jsx_runtime(), 1);
  function DataViewsPagination() {
    const {
      view,
      onChangeView,
      paginationInfo: { totalItems = 0, totalPages }
    } = (0, import_element82.useContext)(dataviews_context_default);
    if (!totalItems || !totalPages || view.infiniteScrollEnabled) {
      return null;
    }
    const currentPage = view.page ?? 1;
    const pageSelectOptions = Array.from(Array(totalPages)).map(
      (_, i2) => {
        const page = i2 + 1;
        return {
          value: page.toString(),
          label: page.toString(),
          "aria-label": currentPage === page ? (0, import_i18n97.sprintf)(
            // translators: 1: current page number. 2: total number of pages.
            (0, import_i18n97.__)("Page %1$d of %2$d"),
            currentPage,
            totalPages
          ) : page.toString()
        };
      }
    );
    return !!totalItems && totalPages !== 1 && /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)(
      Stack,
      {
        direction: "row",
        className: "dataviews-pagination",
        justify: "end",
        align: "center",
        gap: "xl",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
            Stack,
            {
              direction: "row",
              justify: "flex-start",
              align: "center",
              gap: "xs",
              className: "dataviews-pagination__page-select",
              children: (0, import_element82.createInterpolateElement)(
                (0, import_i18n97.sprintf)(
                  // translators: 1: Current page number, 2: Total number of pages.
                  (0, import_i18n97._x)(
                    "<div>Page</div>%1$s<div>of %2$d</div>",
                    "paging"
                  ),
                  "<CurrentPage />",
                  totalPages
                ),
                {
                  div: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("div", { "aria-hidden": true }),
                  CurrentPage: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
                    import_components103.SelectControl,
                    {
                      "aria-label": (0, import_i18n97.__)("Current page"),
                      value: currentPage.toString(),
                      options: pageSelectOptions,
                      onChange: (newValue) => {
                        onChangeView({
                          ...view,
                          page: +newValue
                        });
                      },
                      size: "small",
                      variant: "minimal"
                    }
                  )
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)(Stack, { direction: "row", gap: "xs", align: "center", children: [
            /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
              import_components103.Button,
              {
                onClick: () => onChangeView({
                  ...view,
                  page: currentPage - 1
                }),
                disabled: currentPage === 1,
                accessibleWhenDisabled: true,
                label: (0, import_i18n97.__)("Previous page"),
                icon: (0, import_i18n97.isRTL)() ? next_default : previous_default,
                showTooltip: true,
                size: "compact",
                tooltipPosition: "top"
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
              import_components103.Button,
              {
                onClick: () => onChangeView({ ...view, page: currentPage + 1 }),
                disabled: currentPage >= totalPages,
                accessibleWhenDisabled: true,
                label: (0, import_i18n97.__)("Next page"),
                icon: (0, import_i18n97.isRTL)() ? previous_default : next_default,
                showTooltip: true,
                size: "compact",
                tooltipPosition: "top"
              }
            )
          ] })
        ]
      }
    );
  }
  var dataviews_pagination_default = (0, import_element82.memo)(DataViewsPagination);

  // packages/dataviews/build-module/components/dataviews-picker-footer/index.mjs
  var import_jsx_runtime200 = __toESM(require_jsx_runtime(), 1);
  function useIsMultiselectPicker(actions) {
    return (0, import_element83.useMemo)(() => {
      return actions?.every((action) => action.supportsBulk);
    }, [actions]);
  }

  // packages/dataviews/build-module/components/dataviews-layouts/utils/grid-items.mjs
  var import_element84 = __toESM(require_element(), 1);
  var import_jsx_runtime201 = __toESM(require_jsx_runtime(), 1);
  var GridItems = (0, import_element84.forwardRef)(({ className, previewSize, ...props }, ref) => {
    return /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
      "div",
      {
        ref,
        className: clsx_default("dataviews-view-grid-items", className),
        style: {
          gridTemplateColumns: previewSize && `repeat(auto-fill, minmax(${previewSize}px, 1fr))`
        },
        ...props
      }
    );
  });

  // packages/dataviews/build-module/components/dataviews-layouts/picker-grid/index.mjs
  var import_jsx_runtime202 = __toESM(require_jsx_runtime(), 1);
  var { Badge: Badge4 } = unlock3(import_components105.privateApis);
  function GridItem3({
    view,
    multiselect,
    selection,
    onChangeSelection,
    getItemId: getItemId2,
    item,
    mediaField,
    titleField,
    descriptionField: descriptionField2,
    regularFields,
    badgeFields,
    config: config2,
    posinset,
    setsize
  }) {
    const { showTitle = true, showMedia = true, showDescription = true } = view;
    const id = getItemId2(item);
    const isSelected2 = selection.includes(id);
    const renderedMediaField = mediaField?.render ? /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
      mediaField.render,
      {
        item,
        field: mediaField,
        config: config2
      }
    ) : null;
    const renderedTitleField = showTitle && titleField?.render ? /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(titleField.render, { item, field: titleField }) : null;
    return /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)(
      import_components105.Composite.Item,
      {
        "aria-label": titleField ? titleField.getValue({ item }) || (0, import_i18n99.__)("(no title)") : void 0,
        render: ({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(Stack, { direction: "column", children, ...props }),
        role: "option",
        "aria-posinset": posinset,
        "aria-setsize": setsize,
        className: clsx_default("dataviews-view-picker-grid__card", {
          "is-selected": isSelected2
        }),
        "aria-selected": isSelected2,
        onClick: () => {
          if (isSelected2) {
            onChangeSelection(
              selection.filter((itemId) => id !== itemId)
            );
          } else {
            const newSelection = multiselect ? [...selection, id] : [id];
            onChangeSelection(newSelection);
          }
        },
        children: [
          showMedia && renderedMediaField && /* @__PURE__ */ (0, import_jsx_runtime202.jsx)("div", { className: "dataviews-view-picker-grid__media", children: renderedMediaField }),
          showMedia && renderedMediaField && /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
            DataViewsSelectionCheckbox,
            {
              item,
              selection,
              onChangeSelection,
              getItemId: getItemId2,
              titleField,
              disabled: false,
              "aria-hidden": true,
              tabIndex: -1
            }
          ),
          showTitle && /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
            Stack,
            {
              direction: "row",
              justify: "space-between",
              className: "dataviews-view-picker-grid__title-actions",
              children: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)("div", { className: "dataviews-view-picker-grid__title-field dataviews-title-field", children: renderedTitleField })
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)(Stack, { direction: "column", gap: "xs", children: [
            showDescription && descriptionField2?.render && /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
              descriptionField2.render,
              {
                item,
                field: descriptionField2
              }
            ),
            !!badgeFields?.length && /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
              Stack,
              {
                direction: "row",
                className: "dataviews-view-picker-grid__badge-fields",
                gap: "sm",
                wrap: "wrap",
                align: "top",
                justify: "flex-start",
                children: badgeFields.map((field) => {
                  return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
                    Badge4,
                    {
                      className: "dataviews-view-picker-grid__field-value",
                      children: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
                        field.render,
                        {
                          item,
                          field
                        }
                      )
                    },
                    field.id
                  );
                })
              }
            ),
            !!regularFields?.length && /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
              Stack,
              {
                direction: "column",
                className: "dataviews-view-picker-grid__fields",
                gap: "xs",
                children: regularFields.map((field) => {
                  return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
                    import_components105.Flex,
                    {
                      className: "dataviews-view-picker-grid__field",
                      gap: 1,
                      justify: "flex-start",
                      expanded: true,
                      style: { height: "auto" },
                      direction: "row",
                      children: /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)(import_jsx_runtime202.Fragment, { children: [
                        /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(import_components105.FlexItem, { className: "dataviews-view-picker-grid__field-name", children: field.header }),
                        /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
                          import_components105.FlexItem,
                          {
                            className: "dataviews-view-picker-grid__field-value",
                            style: { maxHeight: "none" },
                            children: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
                              field.render,
                              {
                                item,
                                field
                              }
                            )
                          }
                        )
                      ] })
                    },
                    field.id
                  );
                })
              }
            )
          ] })
        ]
      },
      id
    );
  }
  function GridGroup({
    groupName,
    groupField,
    showLabel = true,
    children
  }) {
    const headerId = (0, import_compose18.useInstanceId)(
      GridGroup,
      "dataviews-view-picker-grid-group__header"
    );
    return /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)(
      Stack,
      {
        direction: "column",
        gap: "sm",
        role: "group",
        "aria-labelledby": headerId,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
            "h3",
            {
              className: "dataviews-view-picker-grid-group__header",
              id: headerId,
              children: showLabel ? (0, import_i18n99.sprintf)(
                // translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
                (0, import_i18n99.__)("%1$s: %2$s"),
                groupField.label,
                groupName
              ) : groupName
            }
          ),
          children
        ]
      },
      groupName
    );
  }
  function ViewPickerGrid({
    actions,
    data,
    fields,
    getItemId: getItemId2,
    isLoading,
    onChangeSelection,
    selection,
    view,
    className,
    empty
  }) {
    const { resizeObserverRef, paginationInfo, itemListLabel } = (0, import_element85.useContext)(dataviews_context_default);
    const titleField = fields.find(
      (field) => field.id === view?.titleField
    );
    const mediaField = fields.find(
      (field) => field.id === view?.mediaField
    );
    const descriptionField2 = fields.find(
      (field) => field.id === view?.descriptionField
    );
    const otherFields = view.fields ?? [];
    const { regularFields, badgeFields } = otherFields.reduce(
      (accumulator, fieldId) => {
        const field = fields.find((f2) => f2.id === fieldId);
        if (!field) {
          return accumulator;
        }
        const key = view.layout?.badgeFields?.includes(fieldId) ? "badgeFields" : "regularFields";
        accumulator[key].push(field);
        return accumulator;
      },
      { regularFields: [], badgeFields: [] }
    );
    const hasData = !!data?.length;
    const usedPreviewSize = view.layout?.previewSize;
    const isMultiselect = useIsMultiselectPicker(actions);
    const size = "900px";
    const groupField = view.groupBy?.field ? fields.find((f2) => f2.id === view.groupBy?.field) : null;
    const dataByGroup = groupField ? getDataByGroup(data, groupField) : null;
    const isInfiniteScroll = view.infiniteScrollEnabled && !dataByGroup;
    const currentPage = view?.page ?? 1;
    const perPage = view?.perPage ?? 0;
    const setSize = isInfiniteScroll ? paginationInfo?.totalItems : void 0;
    return /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)(import_jsx_runtime202.Fragment, {
      // Render multiple groups.
      children: [
        hasData && groupField && dataByGroup && /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
          import_components105.Composite,
          {
            virtualFocus: true,
            orientation: "horizontal",
            role: "listbox",
            "aria-multiselectable": isMultiselect,
            className: clsx_default(
              "dataviews-view-picker-grid",
              className
            ),
            "aria-label": itemListLabel,
            render: ({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
              Stack,
              {
                direction: "column",
                gap: "lg",
                children,
                ...props
              }
            ),
            children: Array.from(dataByGroup.entries()).map(
              ([groupName, groupItems]) => /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
                GridGroup,
                {
                  groupName,
                  groupField,
                  showLabel: view.groupBy?.showLabel !== false,
                  children: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
                    GridItems,
                    {
                      previewSize: usedPreviewSize,
                      style: {
                        gridTemplateColumns: usedPreviewSize && `repeat(auto-fill, minmax(${usedPreviewSize}px, 1fr))`
                      },
                      "aria-busy": isLoading,
                      ref: resizeObserverRef,
                      children: groupItems.map((item) => {
                        const posInSet = (currentPage - 1) * perPage + data.indexOf(item) + 1;
                        return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
                          GridItem3,
                          {
                            view,
                            multiselect: isMultiselect,
                            selection,
                            onChangeSelection,
                            getItemId: getItemId2,
                            item,
                            mediaField,
                            titleField,
                            descriptionField: descriptionField2,
                            regularFields,
                            badgeFields,
                            config: {
                              sizes: size
                            },
                            posinset: posInSet,
                            setsize: setSize
                          },
                          getItemId2(item)
                        );
                      })
                    }
                  )
                },
                groupName
              )
            )
          }
        ),
        // Render a single grid with all data.
        hasData && !dataByGroup && /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
          import_components105.Composite,
          {
            render: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
              GridItems,
              {
                className: clsx_default(
                  "dataviews-view-picker-grid",
                  className
                ),
                previewSize: usedPreviewSize,
                "aria-busy": isLoading,
                ref: resizeObserverRef
              }
            ),
            virtualFocus: true,
            orientation: "horizontal",
            role: "listbox",
            "aria-multiselectable": isMultiselect,
            "aria-label": itemListLabel,
            children: data.map((item, index) => {
              let posinset = isInfiniteScroll ? index + 1 : void 0;
              if (!isInfiniteScroll) {
                posinset = (currentPage - 1) * perPage + index + 1;
              }
              return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
                GridItem3,
                {
                  view,
                  multiselect: isMultiselect,
                  selection,
                  onChangeSelection,
                  getItemId: getItemId2,
                  item,
                  mediaField,
                  titleField,
                  descriptionField: descriptionField2,
                  regularFields,
                  badgeFields,
                  config: {
                    sizes: size
                  },
                  posinset,
                  setsize: setSize
                },
                getItemId2(item)
              );
            })
          }
        ),
        // Render empty state.
        !hasData && /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
          "div",
          {
            className: clsx_default({
              "dataviews-loading": isLoading,
              "dataviews-no-results": !isLoading
            }),
            children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime202.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(import_components105.Spinner, {}) }) : empty
          }
        ),
        hasData && isLoading && /* @__PURE__ */ (0, import_jsx_runtime202.jsx)("p", { className: "dataviews-loading-more", children: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(import_components105.Spinner, {}) })
      ]
    });
  }
  var picker_grid_default = ViewPickerGrid;

  // packages/dataviews/build-module/components/dataviews-layouts/picker-table/index.mjs
  var import_i18n100 = __toESM(require_i18n(), 1);
  var import_components106 = __toESM(require_components(), 1);
  var import_element86 = __toESM(require_element(), 1);
  var import_jsx_runtime203 = __toESM(require_jsx_runtime(), 1);
  function TableColumnField2({
    item,
    fields,
    column,
    align
  }) {
    const field = fields.find((f2) => f2.id === column);
    if (!field) {
      return null;
    }
    const className = clsx_default("dataviews-view-table__cell-content-wrapper", {
      "dataviews-view-table__cell-align-end": align === "end",
      "dataviews-view-table__cell-align-center": align === "center"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(field.render, { item, field }) });
  }
  function TableRow2({
    item,
    fields,
    id,
    view,
    titleField,
    mediaField,
    descriptionField: descriptionField2,
    selection,
    getItemId: getItemId2,
    onChangeSelection,
    multiselect,
    posinset
  }) {
    const { paginationInfo } = (0, import_element86.useContext)(dataviews_context_default);
    const isSelected2 = selection.includes(id);
    const [isHovered, setIsHovered] = (0, import_element86.useState)(false);
    const {
      showTitle = true,
      showMedia = true,
      showDescription = true,
      infiniteScrollEnabled
    } = view;
    const handleMouseEnter = () => {
      setIsHovered(true);
    };
    const handleMouseLeave = () => {
      setIsHovered(false);
    };
    const columns = view.fields ?? [];
    const hasPrimaryColumn = titleField && showTitle || mediaField && showMedia || descriptionField2 && showDescription;
    return /* @__PURE__ */ (0, import_jsx_runtime203.jsxs)(
      import_components106.Composite.Item,
      {
        render: ({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
          "tr",
          {
            className: clsx_default("dataviews-view-table__row", {
              "is-selected": isSelected2,
              "is-hovered": isHovered
            }),
            onMouseEnter: handleMouseEnter,
            onMouseLeave: handleMouseLeave,
            children,
            ...props
          }
        ),
        "aria-selected": isSelected2,
        "aria-setsize": paginationInfo.totalItems || void 0,
        "aria-posinset": posinset,
        role: infiniteScrollEnabled ? "article" : "option",
        onClick: () => {
          if (isSelected2) {
            onChangeSelection(
              selection.filter((itemId) => id !== itemId)
            );
          } else {
            const newSelection = multiselect ? [...selection, id] : [id];
            onChangeSelection(newSelection);
          }
        },
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
            "td",
            {
              className: "dataviews-view-table__checkbox-column",
              role: "presentation",
              children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)("div", { className: "dataviews-view-table__cell-content-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
                DataViewsSelectionCheckbox,
                {
                  item,
                  selection,
                  onChangeSelection,
                  getItemId: getItemId2,
                  titleField,
                  disabled: false,
                  "aria-hidden": true,
                  tabIndex: -1
                }
              ) })
            }
          ),
          hasPrimaryColumn && /* @__PURE__ */ (0, import_jsx_runtime203.jsx)("td", { role: "presentation", children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
            column_primary_default,
            {
              item,
              titleField: showTitle ? titleField : void 0,
              mediaField: showMedia ? mediaField : void 0,
              descriptionField: showDescription ? descriptionField2 : void 0,
              isItemClickable: () => false
            }
          ) }),
          columns.map((column) => {
            const { width, maxWidth, minWidth, align } = view.layout?.styles?.[column] ?? {};
            return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
              "td",
              {
                style: {
                  width,
                  maxWidth,
                  minWidth
                },
                role: "presentation",
                children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
                  TableColumnField2,
                  {
                    fields,
                    item,
                    column,
                    align
                  }
                )
              },
              column
            );
          })
        ]
      },
      id
    );
  }
  function ViewPickerTable({
    actions,
    data,
    fields,
    getItemId: getItemId2,
    isLoading = false,
    onChangeView,
    onChangeSelection,
    selection,
    setOpenedFilter,
    view,
    className,
    empty
  }) {
    const headerMenuRefs = (0, import_element86.useRef)(/* @__PURE__ */ new Map());
    const headerMenuToFocusRef = (0, import_element86.useRef)(void 0);
    const [nextHeaderMenuToFocus, setNextHeaderMenuToFocus] = (0, import_element86.useState)();
    const isMultiselect = useIsMultiselectPicker(actions) ?? false;
    (0, import_element86.useEffect)(() => {
      if (headerMenuToFocusRef.current) {
        headerMenuToFocusRef.current.focus();
        headerMenuToFocusRef.current = void 0;
      }
    });
    const tableNoticeId = (0, import_element86.useId)();
    if (nextHeaderMenuToFocus) {
      headerMenuToFocusRef.current = nextHeaderMenuToFocus;
      setNextHeaderMenuToFocus(void 0);
      return;
    }
    const onHide = (field) => {
      const hidden = headerMenuRefs.current.get(field.id);
      const fallback = hidden ? headerMenuRefs.current.get(hidden.fallback) : void 0;
      setNextHeaderMenuToFocus(fallback?.node);
    };
    const hasData = !!data?.length;
    const titleField = fields.find((field) => field.id === view.titleField);
    const mediaField = fields.find((field) => field.id === view.mediaField);
    const descriptionField2 = fields.find(
      (field) => field.id === view.descriptionField
    );
    const groupField = view.groupBy?.field ? fields.find((f2) => f2.id === view.groupBy?.field) : null;
    const dataByGroup = groupField ? getDataByGroup(data, groupField) : null;
    const { showTitle = true, showMedia = true, showDescription = true } = view;
    const hasPrimaryColumn = titleField && showTitle || mediaField && showMedia || descriptionField2 && showDescription;
    const columns = view.fields ?? [];
    const headerMenuRef = (column, index) => (node) => {
      if (node) {
        headerMenuRefs.current.set(column, {
          node,
          fallback: columns[index > 0 ? index - 1 : 1]
        });
      } else {
        headerMenuRefs.current.delete(column);
      }
    };
    const isInfiniteScroll = view.infiniteScrollEnabled && !dataByGroup;
    return /* @__PURE__ */ (0, import_jsx_runtime203.jsxs)(import_jsx_runtime203.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime203.jsxs)(
        "table",
        {
          className: clsx_default(
            "dataviews-view-table",
            "dataviews-view-picker-table",
            className,
            {
              [`has-${view.layout?.density}-density`]: view.layout?.density && ["compact", "comfortable"].includes(
                view.layout.density
              )
            }
          ),
          "aria-busy": isLoading,
          "aria-describedby": tableNoticeId,
          role: isInfiniteScroll ? "feed" : "listbox",
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime203.jsx)("thead", { role: "presentation", children: /* @__PURE__ */ (0, import_jsx_runtime203.jsxs)(
              "tr",
              {
                className: "dataviews-view-table__row",
                role: "presentation",
                children: [
                  /* @__PURE__ */ (0, import_jsx_runtime203.jsx)("th", { className: "dataviews-view-table__checkbox-column", children: isMultiselect && /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
                    BulkSelectionCheckbox,
                    {
                      selection,
                      onChangeSelection,
                      data,
                      actions,
                      getItemId: getItemId2
                    }
                  ) }),
                  hasPrimaryColumn && /* @__PURE__ */ (0, import_jsx_runtime203.jsx)("th", { children: titleField && /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
                    column_header_menu_default,
                    {
                      ref: headerMenuRef(
                        titleField.id,
                        0
                      ),
                      fieldId: titleField.id,
                      view,
                      fields,
                      onChangeView,
                      onHide,
                      setOpenedFilter,
                      canMove: false
                    }
                  ) }),
                  columns.map((column, index) => {
                    const { width, maxWidth, minWidth, align } = view.layout?.styles?.[column] ?? {};
                    return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
                      "th",
                      {
                        style: {
                          width,
                          maxWidth,
                          minWidth,
                          textAlign: align
                        },
                        "aria-sort": view.sort?.direction && view.sort?.field === column ? sortValues[view.sort.direction] : void 0,
                        scope: "col",
                        children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
                          column_header_menu_default,
                          {
                            ref: headerMenuRef(column, index),
                            fieldId: column,
                            view,
                            fields,
                            onChangeView,
                            onHide,
                            setOpenedFilter,
                            canMove: view.layout?.enableMoving ?? true
                          }
                        )
                      },
                      column
                    );
                  })
                ]
              }
            ) }),
            hasData && groupField && dataByGroup ? Array.from(dataByGroup.entries()).map(
              ([groupName, groupItems]) => /* @__PURE__ */ (0, import_jsx_runtime203.jsxs)(
                import_components106.Composite,
                {
                  virtualFocus: true,
                  orientation: "vertical",
                  render: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)("tbody", { role: "group" }),
                  children: [
                    /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
                      "tr",
                      {
                        className: "dataviews-view-table__group-header-row",
                        role: "presentation",
                        children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
                          "td",
                          {
                            colSpan: columns.length + (hasPrimaryColumn ? 1 : 0) + 1,
                            className: "dataviews-view-table__group-header-cell",
                            role: "presentation",
                            children: view.groupBy?.showLabel === false ? groupName : (0, import_i18n100.sprintf)(
                              // translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
                              (0, import_i18n100.__)("%1$s: %2$s"),
                              groupField.label,
                              groupName
                            )
                          }
                        )
                      }
                    ),
                    groupItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
                      TableRow2,
                      {
                        item,
                        fields,
                        id: getItemId2(item) || index.toString(),
                        view,
                        titleField,
                        mediaField,
                        descriptionField: descriptionField2,
                        selection,
                        getItemId: getItemId2,
                        onChangeSelection,
                        multiselect: isMultiselect
                      },
                      getItemId2(item)
                    ))
                  ]
                },
                `group-${groupName}`
              )
            ) : /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
              import_components106.Composite,
              {
                render: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)("tbody", { role: "presentation" }),
                virtualFocus: true,
                orientation: "vertical",
                children: hasData && data.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
                  TableRow2,
                  {
                    item,
                    fields,
                    id: getItemId2(item) || index.toString(),
                    view,
                    titleField,
                    mediaField,
                    descriptionField: descriptionField2,
                    selection,
                    getItemId: getItemId2,
                    onChangeSelection,
                    multiselect: isMultiselect,
                    posinset: index + 1
                  },
                  getItemId2(item)
                ))
              }
            )
          ]
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime203.jsxs)(
        "div",
        {
          className: clsx_default({
            "dataviews-loading": isLoading,
            "dataviews-no-results": !hasData && !isLoading
          }),
          id: tableNoticeId,
          children: [
            !hasData && (isLoading ? /* @__PURE__ */ (0, import_jsx_runtime203.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(import_components106.Spinner, {}) }) : empty),
            hasData && isLoading && /* @__PURE__ */ (0, import_jsx_runtime203.jsx)("p", { className: "dataviews-loading-more", children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(import_components106.Spinner, {}) })
          ]
        }
      )
    ] });
  }
  var picker_table_default = ViewPickerTable;

  // packages/dataviews/build-module/components/dataviews-layouts/utils/preview-size-picker.mjs
  var import_components107 = __toESM(require_components(), 1);
  var import_i18n101 = __toESM(require_i18n(), 1);
  var import_element87 = __toESM(require_element(), 1);
  var import_jsx_runtime204 = __toESM(require_jsx_runtime(), 1);
  var imageSizes2 = [
    {
      value: 120,
      breakpoint: 1
    },
    {
      value: 170,
      breakpoint: 1
    },
    {
      value: 230,
      breakpoint: 1
    },
    {
      value: 290,
      breakpoint: 1112
      // at minimum image width, 4 images display at this container size
    },
    {
      value: 350,
      breakpoint: 1636
      // at minimum image width, 6 images display at this container size
    },
    {
      value: 430,
      breakpoint: 588
      // at minimum image width, 2 images display at this container size
    }
  ];
  function PreviewSizePicker() {
    const context = (0, import_element87.useContext)(dataviews_context_default);
    const view = context.view;
    const breakValues = imageSizes2.filter((size) => {
      return context.containerWidth >= size.breakpoint;
    });
    const layoutPreviewSize = view.layout?.previewSize ?? 230;
    const previewSizeToUse = breakValues.map((size, index) => ({ ...size, index })).filter((size) => size.value <= layoutPreviewSize).sort((a2, b2) => b2.value - a2.value)[0]?.index ?? 0;
    const marks = breakValues.map((size, index) => {
      return {
        value: index
      };
    });
    return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
      import_components107.RangeControl,
      {
        __next40pxDefaultSize: true,
        showTooltip: false,
        label: (0, import_i18n101.__)("Preview size"),
        value: previewSizeToUse,
        min: 0,
        max: breakValues.length - 1,
        withInputField: false,
        onChange: (value = 0) => {
          context.onChangeView({
            ...view,
            layout: {
              ...view.layout,
              previewSize: breakValues[value].value
            }
          });
        },
        step: 1,
        marks
      }
    );
  }

  // packages/dataviews/build-module/components/dataviews-layouts/utils/density-picker.mjs
  var import_components108 = __toESM(require_components(), 1);
  var import_i18n102 = __toESM(require_i18n(), 1);
  var import_element88 = __toESM(require_element(), 1);
  var import_jsx_runtime205 = __toESM(require_jsx_runtime(), 1);
  function DensityPicker() {
    const context = (0, import_element88.useContext)(dataviews_context_default);
    const view = context.view;
    return /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)(
      import_components108.__experimentalToggleGroupControl,
      {
        size: "__unstable-large",
        label: (0, import_i18n102.__)("Density"),
        value: view.layout?.density || "balanced",
        onChange: (value) => {
          context.onChangeView({
            ...view,
            layout: {
              ...view.layout,
              density: value
            }
          });
        },
        isBlock: true,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
            import_components108.__experimentalToggleGroupControlOption,
            {
              value: "comfortable",
              label: (0, import_i18n102._x)(
                "Comfortable",
                "Density option for DataView layout"
              )
            },
            "comfortable"
          ),
          /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
            import_components108.__experimentalToggleGroupControlOption,
            {
              value: "balanced",
              label: (0, import_i18n102._x)("Balanced", "Density option for DataView layout")
            },
            "balanced"
          ),
          /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
            import_components108.__experimentalToggleGroupControlOption,
            {
              value: "compact",
              label: (0, import_i18n102._x)("Compact", "Density option for DataView layout")
            },
            "compact"
          )
        ]
      }
    );
  }

  // packages/dataviews/build-module/components/dataviews-layouts/index.mjs
  var VIEW_LAYOUTS = [
    {
      type: LAYOUT_TABLE2,
      label: (0, import_i18n103.__)("Table"),
      component: table_default,
      icon: block_table_default,
      viewConfigOptions: DensityPicker
    },
    {
      type: LAYOUT_GRID2,
      label: (0, import_i18n103.__)("Grid"),
      component: grid_default,
      icon: category_default,
      viewConfigOptions: PreviewSizePicker
    },
    {
      type: LAYOUT_LIST2,
      label: (0, import_i18n103.__)("List"),
      component: ViewList,
      icon: (0, import_i18n103.isRTL)() ? format_list_bullets_rtl_default : format_list_bullets_default,
      viewConfigOptions: DensityPicker
    },
    {
      type: LAYOUT_ACTIVITY,
      label: (0, import_i18n103.__)("Activity"),
      component: ViewActivity,
      icon: scheduled_default,
      viewConfigOptions: DensityPicker
    },
    {
      type: LAYOUT_PICKER_GRID,
      label: (0, import_i18n103.__)("Grid"),
      component: picker_grid_default,
      icon: category_default,
      viewConfigOptions: PreviewSizePicker,
      isPicker: true
    },
    {
      type: LAYOUT_PICKER_TABLE,
      label: (0, import_i18n103.__)("Table"),
      component: picker_table_default,
      icon: block_table_default,
      viewConfigOptions: DensityPicker,
      isPicker: true
    }
  ];

  // packages/dataviews/build-module/components/dataviews-filters/filters.mjs
  var import_element96 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/components/dataviews-filters/filter.mjs
  var import_components111 = __toESM(require_components(), 1);
  var import_i18n106 = __toESM(require_i18n(), 1);
  var import_element93 = __toESM(require_element(), 1);

  // node_modules/@ariakit/core/esm/__chunks/XMCVU3LR.js
  function noop3(..._) {
  }
  function applyState(argument, currentValue) {
    if (isUpdater(argument)) {
      const value = isLazyValue(currentValue) ? currentValue() : currentValue;
      return argument(value);
    }
    return argument;
  }
  function isUpdater(argument) {
    return typeof argument === "function";
  }
  function isLazyValue(value) {
    return typeof value === "function";
  }
  function hasOwnProperty(object, prop) {
    if (typeof Object.hasOwn === "function") {
      return Object.hasOwn(object, prop);
    }
    return Object.prototype.hasOwnProperty.call(object, prop);
  }
  function chain(...fns) {
    return (...args) => {
      for (const fn of fns) {
        if (typeof fn === "function") {
          fn(...args);
        }
      }
    };
  }
  function normalizeString2(str) {
    return str.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
  }
  function omit(object, keys) {
    const result = { ...object };
    for (const key of keys) {
      if (hasOwnProperty(result, key)) {
        delete result[key];
      }
    }
    return result;
  }
  function pick(object, paths) {
    const result = {};
    for (const key of paths) {
      if (hasOwnProperty(object, key)) {
        result[key] = object[key];
      }
    }
    return result;
  }
  function identity(value) {
    return value;
  }
  function invariant(condition, message2) {
    if (condition) return;
    if (typeof message2 !== "string") throw new Error("Invariant failed");
    throw new Error(message2);
  }
  function getKeys(obj) {
    return Object.keys(obj);
  }
  function isFalsyBooleanCallback(booleanOrCallback, ...args) {
    const result = typeof booleanOrCallback === "function" ? booleanOrCallback(...args) : booleanOrCallback;
    if (result == null) return false;
    return !result;
  }
  function disabledFromProps(props) {
    return props.disabled || props["aria-disabled"] === true || props["aria-disabled"] === "true";
  }
  function removeUndefinedValues(obj) {
    const result = {};
    for (const key in obj) {
      if (obj[key] !== void 0) {
        result[key] = obj[key];
      }
    }
    return result;
  }
  function defaultValue(...values) {
    for (const value of values) {
      if (value !== void 0) return value;
    }
    return void 0;
  }

  // node_modules/@ariakit/react-core/esm/__chunks/YXGXYGQX.js
  var import_react8 = __toESM(require_react(), 1);
  function setRef(ref, value) {
    if (typeof ref === "function") {
      ref(value);
    } else if (ref) {
      ref.current = value;
    }
  }
  function isValidElementWithRef(element) {
    if (!element) return false;
    if (!(0, import_react8.isValidElement)(element)) return false;
    if ("ref" in element.props) return true;
    if ("ref" in element) return true;
    return false;
  }
  function getRefProperty(element) {
    if (!isValidElementWithRef(element)) return null;
    const props = { ...element.props };
    return props.ref || element.ref;
  }
  function mergeProps2(base, overrides) {
    const props = { ...base };
    for (const key in overrides) {
      if (!hasOwnProperty(overrides, key)) continue;
      if (key === "className") {
        const prop = "className";
        props[prop] = base[prop] ? `${base[prop]} ${overrides[prop]}` : overrides[prop];
        continue;
      }
      if (key === "style") {
        const prop = "style";
        props[prop] = base[prop] ? { ...base[prop], ...overrides[prop] } : overrides[prop];
        continue;
      }
      const overrideValue = overrides[key];
      if (typeof overrideValue === "function" && key.startsWith("on")) {
        const baseValue = base[key];
        if (typeof baseValue === "function") {
          props[key] = (...args) => {
            overrideValue(...args);
            baseValue(...args);
          };
          continue;
        }
      }
      props[key] = overrideValue;
    }
    return props;
  }

  // node_modules/@ariakit/core/esm/__chunks/3DNM6L6E.js
  var canUseDOM = checkIsBrowser();
  function checkIsBrowser() {
    var _a;
    return typeof window !== "undefined" && !!((_a = window.document) == null ? void 0 : _a.createElement);
  }
  function getDocument(node) {
    if (!node) return document;
    if ("self" in node) return node.document;
    return node.ownerDocument || document;
  }
  function getActiveElement(node, activeDescendant = false) {
    var _a;
    const { activeElement } = getDocument(node);
    if (!(activeElement == null ? void 0 : activeElement.nodeName)) {
      return null;
    }
    if (isFrame(activeElement) && ((_a = activeElement.contentDocument) == null ? void 0 : _a.body)) {
      return getActiveElement(
        activeElement.contentDocument.body,
        activeDescendant
      );
    }
    if (activeDescendant) {
      const id = activeElement.getAttribute("aria-activedescendant");
      if (id) {
        const element = getDocument(activeElement).getElementById(id);
        if (element) {
          return element;
        }
      }
    }
    return activeElement;
  }
  function contains(parent, child) {
    return parent === child || parent.contains(child);
  }
  function isFrame(element) {
    return element.tagName === "IFRAME";
  }
  function isButton(element) {
    const tagName = element.tagName.toLowerCase();
    if (tagName === "button") return true;
    if (tagName === "input" && element.type) {
      return buttonInputTypes.indexOf(element.type) !== -1;
    }
    return false;
  }
  var buttonInputTypes = [
    "button",
    "color",
    "file",
    "image",
    "reset",
    "submit"
  ];
  function isVisible(element) {
    if (typeof element.checkVisibility === "function") {
      return element.checkVisibility();
    }
    const htmlElement = element;
    return htmlElement.offsetWidth > 0 || htmlElement.offsetHeight > 0 || element.getClientRects().length > 0;
  }
  function isTextField(element) {
    try {
      const isTextInput = element instanceof HTMLInputElement && element.selectionStart !== null;
      const isTextArea = element.tagName === "TEXTAREA";
      return isTextInput || isTextArea || false;
    } catch (_error) {
      return false;
    }
  }
  function isTextbox(element) {
    return element.isContentEditable || isTextField(element);
  }
  function getTextboxValue(element) {
    if (isTextField(element)) {
      return element.value;
    }
    if (element.isContentEditable) {
      const range = getDocument(element).createRange();
      range.selectNodeContents(element);
      return range.toString();
    }
    return "";
  }
  function getTextboxSelection(element) {
    let start2 = 0;
    let end = 0;
    if (isTextField(element)) {
      start2 = element.selectionStart || 0;
      end = element.selectionEnd || 0;
    } else if (element.isContentEditable) {
      const selection = getDocument(element).getSelection();
      if ((selection == null ? void 0 : selection.rangeCount) && selection.anchorNode && contains(element, selection.anchorNode) && selection.focusNode && contains(element, selection.focusNode)) {
        const range = selection.getRangeAt(0);
        const nextRange = range.cloneRange();
        nextRange.selectNodeContents(element);
        nextRange.setEnd(range.startContainer, range.startOffset);
        start2 = nextRange.toString().length;
        nextRange.setEnd(range.endContainer, range.endOffset);
        end = nextRange.toString().length;
      }
    }
    return { start: start2, end };
  }
  function getPopupRole(element, fallback) {
    const allowedPopupRoles = ["dialog", "menu", "listbox", "tree", "grid"];
    const role = element == null ? void 0 : element.getAttribute("role");
    if (role && allowedPopupRoles.indexOf(role) !== -1) {
      return role;
    }
    return fallback;
  }
  function getScrollingElement(element) {
    if (!element) return null;
    const isScrollableOverflow = (overflow) => {
      if (overflow === "auto") return true;
      if (overflow === "scroll") return true;
      return false;
    };
    if (element.clientHeight && element.scrollHeight > element.clientHeight) {
      const { overflowY } = getComputedStyle(element);
      if (isScrollableOverflow(overflowY)) return element;
    } else if (element.clientWidth && element.scrollWidth > element.clientWidth) {
      const { overflowX } = getComputedStyle(element);
      if (isScrollableOverflow(overflowX)) return element;
    }
    return getScrollingElement(element.parentElement) || document.scrollingElement || document.body;
  }
  function setSelectionRange(element, ...args) {
    if (/text|search|password|tel|url/i.test(element.type)) {
      element.setSelectionRange(...args);
    }
  }
  function sortBasedOnDOMPosition(items, getElement) {
    const pairs = items.map((item, index) => [index, item]);
    let isOrderDifferent = false;
    pairs.sort(([indexA, a2], [indexB, b2]) => {
      const elementA = getElement(a2);
      const elementB = getElement(b2);
      if (elementA === elementB) return 0;
      if (!elementA || !elementB) return 0;
      if (isElementPreceding(elementA, elementB)) {
        if (indexA > indexB) {
          isOrderDifferent = true;
        }
        return -1;
      }
      if (indexA < indexB) {
        isOrderDifferent = true;
      }
      return 1;
    });
    if (isOrderDifferent) {
      return pairs.map(([_, item]) => item);
    }
    return items;
  }
  function isElementPreceding(a2, b2) {
    return Boolean(
      b2.compareDocumentPosition(a2) & Node.DOCUMENT_POSITION_PRECEDING
    );
  }

  // node_modules/@ariakit/core/esm/__chunks/SNHYQNEZ.js
  function isTouchDevice() {
    return canUseDOM && !!navigator.maxTouchPoints;
  }
  function isApple() {
    if (!canUseDOM) return false;
    return /mac|iphone|ipad|ipod/i.test(navigator.platform);
  }
  function isSafari() {
    return canUseDOM && isApple() && /apple/i.test(navigator.vendor);
  }
  function isFirefox() {
    return canUseDOM && /firefox\//i.test(navigator.userAgent);
  }

  // node_modules/@ariakit/core/esm/utils/events.js
  function isPortalEvent(event) {
    return Boolean(
      event.currentTarget && !contains(event.currentTarget, event.target)
    );
  }
  function isSelfTarget(event) {
    return event.target === event.currentTarget;
  }
  function isOpeningInNewTab(event) {
    const element = event.currentTarget;
    if (!element) return false;
    const isAppleDevice = isApple();
    if (isAppleDevice && !event.metaKey) return false;
    if (!isAppleDevice && !event.ctrlKey) return false;
    const tagName = element.tagName.toLowerCase();
    if (tagName === "a") return true;
    if (tagName === "button" && element.type === "submit") return true;
    if (tagName === "input" && element.type === "submit") return true;
    return false;
  }
  function isDownloading(event) {
    const element = event.currentTarget;
    if (!element) return false;
    const tagName = element.tagName.toLowerCase();
    if (!event.altKey) return false;
    if (tagName === "a") return true;
    if (tagName === "button" && element.type === "submit") return true;
    if (tagName === "input" && element.type === "submit") return true;
    return false;
  }
  function fireBlurEvent(element, eventInit) {
    const event = new FocusEvent("blur", eventInit);
    const defaultAllowed = element.dispatchEvent(event);
    const bubbleInit = { ...eventInit, bubbles: true };
    element.dispatchEvent(new FocusEvent("focusout", bubbleInit));
    return defaultAllowed;
  }
  function fireKeyboardEvent(element, type, eventInit) {
    const event = new KeyboardEvent(type, eventInit);
    return element.dispatchEvent(event);
  }
  function fireClickEvent(element, eventInit) {
    const event = new MouseEvent("click", eventInit);
    return element.dispatchEvent(event);
  }
  function isFocusEventOutside(event, container) {
    const containerElement = container || event.currentTarget;
    const relatedTarget = event.relatedTarget;
    return !relatedTarget || !contains(containerElement, relatedTarget);
  }
  function queueBeforeEvent(element, type, callback, timeout) {
    const createTimer = (callback2) => {
      if (timeout) {
        const timerId2 = setTimeout(callback2, timeout);
        return () => clearTimeout(timerId2);
      }
      const timerId = requestAnimationFrame(callback2);
      return () => cancelAnimationFrame(timerId);
    };
    const cancelTimer = createTimer(() => {
      element.removeEventListener(type, callSync, true);
      callback();
    });
    const callSync = () => {
      cancelTimer();
      callback();
    };
    element.addEventListener(type, callSync, { once: true, capture: true });
    return cancelTimer;
  }
  function addGlobalEventListener(type, listener, options, scope = window) {
    const children = [];
    try {
      scope.document.addEventListener(type, listener, options);
      for (const frame of Array.from(scope.frames)) {
        children.push(addGlobalEventListener(type, listener, options, frame));
      }
    } catch (e2) {
    }
    const removeEventListener = () => {
      try {
        scope.document.removeEventListener(type, listener, options);
      } catch (e2) {
      }
      for (const remove of children) {
        remove();
      }
    };
    return removeEventListener;
  }

  // node_modules/@ariakit/react-core/esm/__chunks/KPHZR4MB.js
  var React7 = __toESM(require_react(), 1);
  var import_react9 = __toESM(require_react(), 1);
  var _React = { ...React7 };
  var useReactId = _React.useId;
  var useReactDeferredValue = _React.useDeferredValue;
  var useReactInsertionEffect = _React.useInsertionEffect;
  var useSafeLayoutEffect = canUseDOM ? import_react9.useLayoutEffect : import_react9.useEffect;
  function useInitialValue(value) {
    const [initialValue] = (0, import_react9.useState)(value);
    return initialValue;
  }
  function useLiveRef(value) {
    const ref = (0, import_react9.useRef)(value);
    useSafeLayoutEffect(() => {
      ref.current = value;
    });
    return ref;
  }
  function useEvent(callback) {
    const ref = (0, import_react9.useRef)(() => {
      throw new Error("Cannot call an event handler while rendering.");
    });
    if (useReactInsertionEffect) {
      useReactInsertionEffect(() => {
        ref.current = callback;
      });
    } else {
      ref.current = callback;
    }
    return (0, import_react9.useCallback)((...args) => {
      var _a;
      return (_a = ref.current) == null ? void 0 : _a.call(ref, ...args);
    }, []);
  }
  function useTransactionState(callback) {
    const [state, setState] = (0, import_react9.useState)(null);
    useSafeLayoutEffect(() => {
      if (state == null) return;
      if (!callback) return;
      let prevState = null;
      callback((prev) => {
        prevState = prev;
        return state;
      });
      return () => {
        callback(prevState);
      };
    }, [state, callback]);
    return [state, setState];
  }
  function useMergeRefs(...refs) {
    return (0, import_react9.useMemo)(() => {
      if (!refs.some(Boolean)) return;
      return (value) => {
        for (const ref of refs) {
          setRef(ref, value);
        }
      };
    }, refs);
  }
  function useId5(defaultId) {
    if (useReactId) {
      const reactId = useReactId();
      if (defaultId) return defaultId;
      return reactId;
    }
    const [id, setId] = (0, import_react9.useState)(defaultId);
    useSafeLayoutEffect(() => {
      if (defaultId || id) return;
      const random = Math.random().toString(36).slice(2, 8);
      setId(`id-${random}`);
    }, [defaultId, id]);
    return defaultId || id;
  }
  function useTagName(refOrElement, type) {
    const stringOrUndefined = (type2) => {
      if (typeof type2 !== "string") return;
      return type2;
    };
    const [tagName, setTagName] = (0, import_react9.useState)(() => stringOrUndefined(type));
    useSafeLayoutEffect(() => {
      const element = refOrElement && "current" in refOrElement ? refOrElement.current : refOrElement;
      setTagName((element == null ? void 0 : element.tagName.toLowerCase()) || stringOrUndefined(type));
    }, [refOrElement, type]);
    return tagName;
  }
  function useAttribute(refOrElement, attributeName, defaultValue2) {
    const initialValue = useInitialValue(defaultValue2);
    const [attribute, setAttribute] = (0, import_react9.useState)(initialValue);
    (0, import_react9.useEffect)(() => {
      const element = refOrElement && "current" in refOrElement ? refOrElement.current : refOrElement;
      if (!element) return;
      const callback = () => {
        const value = element.getAttribute(attributeName);
        setAttribute(value == null ? initialValue : value);
      };
      const observer = new MutationObserver(callback);
      observer.observe(element, { attributeFilter: [attributeName] });
      callback();
      return () => observer.disconnect();
    }, [refOrElement, attributeName, initialValue]);
    return attribute;
  }
  function useUpdateEffect(effect, deps) {
    const mounted = (0, import_react9.useRef)(false);
    (0, import_react9.useEffect)(() => {
      if (mounted.current) {
        return effect();
      }
      mounted.current = true;
    }, deps);
    (0, import_react9.useEffect)(
      () => () => {
        mounted.current = false;
      },
      []
    );
  }
  function useUpdateLayoutEffect(effect, deps) {
    const mounted = (0, import_react9.useRef)(false);
    useSafeLayoutEffect(() => {
      if (mounted.current) {
        return effect();
      }
      mounted.current = true;
    }, deps);
    useSafeLayoutEffect(
      () => () => {
        mounted.current = false;
      },
      []
    );
  }
  function useForceUpdate2() {
    return (0, import_react9.useReducer)(() => [], []);
  }
  function useBooleanEvent(booleanOrCallback) {
    return useEvent(
      typeof booleanOrCallback === "function" ? booleanOrCallback : () => booleanOrCallback
    );
  }
  function useWrapElement(props, callback, deps = []) {
    const wrapElement = (0, import_react9.useCallback)(
      (element) => {
        if (props.wrapElement) {
          element = props.wrapElement(element);
        }
        return callback(element);
      },
      [...deps, props.wrapElement]
    );
    return { ...props, wrapElement };
  }
  function useMetadataProps(props, key, value) {
    const parent = props.onLoadedMetadataCapture;
    const onLoadedMetadataCapture = (0, import_react9.useMemo)(() => {
      return Object.assign(() => {
      }, { ...parent, [key]: value });
    }, [parent, key, value]);
    return [parent == null ? void 0 : parent[key], { onLoadedMetadataCapture }];
  }
  var hasInstalledGlobalEventListeners = false;
  function useIsMouseMoving() {
    (0, import_react9.useEffect)(() => {
      if (hasInstalledGlobalEventListeners) return;
      addGlobalEventListener("mousemove", setMouseMoving, true);
      addGlobalEventListener("mousedown", resetMouseMoving, true);
      addGlobalEventListener("mouseup", resetMouseMoving, true);
      addGlobalEventListener("keydown", resetMouseMoving, true);
      addGlobalEventListener("scroll", resetMouseMoving, true);
      hasInstalledGlobalEventListeners = true;
    }, []);
    const isMouseMoving = useEvent(() => mouseMoving);
    return isMouseMoving;
  }
  var mouseMoving = false;
  var previousScreenX = 0;
  var previousScreenY = 0;
  function hasMouseMovement(event) {
    const movementX = event.movementX || event.screenX - previousScreenX;
    const movementY = event.movementY || event.screenY - previousScreenY;
    previousScreenX = event.screenX;
    previousScreenY = event.screenY;
    return movementX || movementY || false;
  }
  function setMouseMoving(event) {
    if (!hasMouseMovement(event)) return;
    mouseMoving = true;
  }
  function resetMouseMoving() {
    mouseMoving = false;
  }

  // node_modules/@ariakit/react-core/esm/__chunks/GWSL6KNJ.js
  var React8 = __toESM(require_react(), 1);
  var import_jsx_runtime206 = __toESM(require_jsx_runtime(), 1);
  function forwardRef22(render4) {
    const Role = React8.forwardRef(
      // @ts-ignore Incompatible with React 19 types. Ignore for now.
      (props, ref) => render4({ ...props, ref })
    );
    Role.displayName = render4.displayName || render4.name;
    return Role;
  }
  function memo22(Component, propsAreEqual) {
    return React8.memo(Component, propsAreEqual);
  }
  function createElement5(Type, props) {
    const { wrapElement, render: render4, ...rest } = props;
    const mergedRef = useMergeRefs(props.ref, getRefProperty(render4));
    let element;
    if (React8.isValidElement(render4)) {
      const renderProps = {
        // @ts-ignore Incompatible with React 19 types. Ignore for now.
        ...render4.props,
        ref: mergedRef
      };
      element = React8.cloneElement(render4, mergeProps2(rest, renderProps));
    } else if (render4) {
      element = render4(rest);
    } else {
      element = /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(Type, { ...rest });
    }
    if (wrapElement) {
      return wrapElement(element);
    }
    return element;
  }
  function createHook(useProps) {
    const useRole = (props = {}) => {
      return useProps(props);
    };
    useRole.displayName = useProps.name;
    return useRole;
  }
  function createStoreContext(providers = [], scopedProviders = []) {
    const context = React8.createContext(void 0);
    const scopedContext = React8.createContext(void 0);
    const useContext210 = () => React8.useContext(context);
    const useScopedContext = (onlyScoped = false) => {
      const scoped = React8.useContext(scopedContext);
      const store2 = useContext210();
      if (onlyScoped) return scoped;
      return scoped || store2;
    };
    const useProviderContext = () => {
      const scoped = React8.useContext(scopedContext);
      const store2 = useContext210();
      if (scoped && scoped === store2) return;
      return store2;
    };
    const ContextProvider = (props) => {
      return providers.reduceRight(
        (children, Provider) => /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(Provider, { ...props, children }),
        /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(context.Provider, { ...props })
      );
    };
    const ScopedContextProvider = (props) => {
      return /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(ContextProvider, { ...props, children: scopedProviders.reduceRight(
        (children, Provider) => /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(Provider, { ...props, children }),
        /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(scopedContext.Provider, { ...props })
      ) });
    };
    return {
      context,
      scopedContext,
      useContext: useContext210,
      useScopedContext,
      useProviderContext,
      ContextProvider,
      ScopedContextProvider
    };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/SMPCIMZM.js
  var ctx2 = createStoreContext();
  var useCollectionContext = ctx2.useContext;
  var useCollectionScopedContext = ctx2.useScopedContext;
  var useCollectionProviderContext = ctx2.useProviderContext;
  var CollectionContextProvider = ctx2.ContextProvider;
  var CollectionScopedContextProvider = ctx2.ScopedContextProvider;

  // node_modules/@ariakit/react-core/esm/__chunks/AVVXDJMZ.js
  var import_react10 = __toESM(require_react(), 1);
  var ctx3 = createStoreContext(
    [CollectionContextProvider],
    [CollectionScopedContextProvider]
  );
  var useCompositeContext = ctx3.useContext;
  var useCompositeScopedContext = ctx3.useScopedContext;
  var useCompositeProviderContext = ctx3.useProviderContext;
  var CompositeContextProvider = ctx3.ContextProvider;
  var CompositeScopedContextProvider = ctx3.ScopedContextProvider;
  var CompositeItemContext = (0, import_react10.createContext)(
    void 0
  );
  var CompositeRowContext = (0, import_react10.createContext)(
    void 0
  );

  // node_modules/@ariakit/react-core/esm/__chunks/5VQZOHHZ.js
  function findFirstEnabledItem(items, excludeId) {
    return items.find((item) => {
      if (excludeId) {
        return !item.disabled && item.id !== excludeId;
      }
      return !item.disabled;
    });
  }
  function getEnabledItem(store2, id) {
    if (!id) return null;
    return store2.item(id) || null;
  }
  function groupItemsByRows(items) {
    const rows = [];
    for (const item of items) {
      const row = rows.find((currentRow) => {
        var _a;
        return ((_a = currentRow[0]) == null ? void 0 : _a.rowId) === item.rowId;
      });
      if (row) {
        row.push(item);
      } else {
        rows.push([item]);
      }
    }
    return rows;
  }
  function selectTextField(element, collapseToEnd = false) {
    if (isTextField(element)) {
      element.setSelectionRange(
        collapseToEnd ? element.value.length : 0,
        element.value.length
      );
    } else if (element.isContentEditable) {
      const selection = getDocument(element).getSelection();
      selection == null ? void 0 : selection.selectAllChildren(element);
      if (collapseToEnd) {
        selection == null ? void 0 : selection.collapseToEnd();
      }
    }
  }
  var FOCUS_SILENTLY = /* @__PURE__ */ Symbol("FOCUS_SILENTLY");
  function focusSilently(element) {
    element[FOCUS_SILENTLY] = true;
    element.focus({ preventScroll: true });
  }
  function silentlyFocused(element) {
    const isSilentlyFocused = element[FOCUS_SILENTLY];
    delete element[FOCUS_SILENTLY];
    return isSilentlyFocused;
  }
  function isItem(store2, element, exclude) {
    if (!element) return false;
    if (element === exclude) return false;
    const item = store2.item(element.id);
    if (!item) return false;
    if (exclude && item.element === exclude) return false;
    return true;
  }

  // node_modules/@ariakit/react-core/esm/__chunks/Z2O3VLAQ.js
  var import_react11 = __toESM(require_react(), 1);
  var TagName = "div";
  var useCollectionItem = createHook(
    function useCollectionItem2({
      store: store2,
      shouldRegisterItem = true,
      getItem = identity,
      // @ts-expect-error This prop may come from a collection renderer.
      element,
      ...props
    }) {
      const context = useCollectionContext();
      store2 = store2 || context;
      const id = useId5(props.id);
      const ref = (0, import_react11.useRef)(element);
      (0, import_react11.useEffect)(() => {
        const element2 = ref.current;
        if (!id) return;
        if (!element2) return;
        if (!shouldRegisterItem) return;
        const item = getItem({ id, element: element2 });
        return store2 == null ? void 0 : store2.renderItem(item);
      }, [id, shouldRegisterItem, getItem, store2]);
      props = {
        ...props,
        ref: useMergeRefs(ref, props.ref)
      };
      return removeUndefinedValues(props);
    }
  );
  var CollectionItem = forwardRef22(function CollectionItem2(props) {
    const htmlProps = useCollectionItem(props);
    return createElement5(TagName, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/SWN3JYXT.js
  var import_react12 = __toESM(require_react(), 1);
  var FocusableContext = (0, import_react12.createContext)(true);

  // node_modules/@ariakit/core/esm/utils/focus.js
  var selector = "input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";
  function isFocusable(element) {
    if (!element.matches(selector)) return false;
    if (!isVisible(element)) return false;
    if (element.closest("[inert]")) return false;
    return true;
  }
  function getClosestFocusable(element) {
    while (element && !isFocusable(element)) {
      element = element.closest(selector);
    }
    return element || null;
  }
  function hasFocus(element) {
    const activeElement = getActiveElement(element);
    if (!activeElement) return false;
    if (activeElement === element) return true;
    const activeDescendant = activeElement.getAttribute("aria-activedescendant");
    if (!activeDescendant) return false;
    return activeDescendant === element.id;
  }
  function hasFocusWithin(element) {
    const activeElement = getActiveElement(element);
    if (!activeElement) return false;
    if (contains(element, activeElement)) return true;
    const activeDescendant = activeElement.getAttribute("aria-activedescendant");
    if (!activeDescendant) return false;
    if (!("id" in element)) return false;
    if (activeDescendant === element.id) return true;
    return !!element.querySelector(`#${CSS.escape(activeDescendant)}`);
  }
  function focusIfNeeded(element) {
    if (!hasFocusWithin(element) && isFocusable(element)) {
      element.focus();
    }
  }
  function focusIntoView(element, options) {
    if (!("scrollIntoView" in element)) {
      element.focus();
    } else {
      element.focus({ preventScroll: true });
      element.scrollIntoView({ block: "nearest", inline: "nearest", ...options });
    }
  }

  // node_modules/@ariakit/react-core/esm/__chunks/U6HHPQDW.js
  var import_react13 = __toESM(require_react(), 1);
  var TagName2 = "div";
  var isSafariBrowser = isSafari();
  var alwaysFocusVisibleInputTypes = [
    "text",
    "search",
    "url",
    "tel",
    "email",
    "password",
    "number",
    "date",
    "month",
    "week",
    "time",
    "datetime",
    "datetime-local"
  ];
  var safariFocusAncestorSymbol = /* @__PURE__ */ Symbol("safariFocusAncestor");
  function markSafariFocusAncestor(element, value) {
    if (!element) return;
    element[safariFocusAncestorSymbol] = value;
  }
  function isAlwaysFocusVisible(element) {
    const { tagName, readOnly, type } = element;
    if (tagName === "TEXTAREA" && !readOnly) return true;
    if (tagName === "SELECT" && !readOnly) return true;
    if (tagName === "INPUT" && !readOnly) {
      return alwaysFocusVisibleInputTypes.includes(type);
    }
    if (element.isContentEditable) return true;
    const role = element.getAttribute("role");
    if (role === "combobox" && element.dataset.name) {
      return true;
    }
    return false;
  }
  function getLabels(element) {
    if ("labels" in element) {
      return element.labels;
    }
    return null;
  }
  function isNativeCheckboxOrRadio(element) {
    const tagName = element.tagName.toLowerCase();
    if (tagName === "input" && element.type) {
      return element.type === "radio" || element.type === "checkbox";
    }
    return false;
  }
  function isNativeTabbable(tagName) {
    if (!tagName) return true;
    return tagName === "button" || tagName === "summary" || tagName === "input" || tagName === "select" || tagName === "textarea" || tagName === "a";
  }
  function supportsDisabledAttribute(tagName) {
    if (!tagName) return true;
    return tagName === "button" || tagName === "input" || tagName === "select" || tagName === "textarea";
  }
  function getTabIndex(focusable, trulyDisabled, nativeTabbable, supportsDisabled, tabIndexProp) {
    if (!focusable) {
      return tabIndexProp;
    }
    if (trulyDisabled) {
      if (nativeTabbable && !supportsDisabled) {
        return -1;
      }
      return;
    }
    if (nativeTabbable) {
      return tabIndexProp;
    }
    return tabIndexProp || 0;
  }
  function useDisableEvent(onEvent, disabled) {
    return useEvent((event) => {
      onEvent == null ? void 0 : onEvent(event);
      if (event.defaultPrevented) return;
      if (disabled) {
        event.stopPropagation();
        event.preventDefault();
      }
    });
  }
  var hasInstalledGlobalEventListeners2 = false;
  var isKeyboardModality = true;
  function onGlobalMouseDown(event) {
    const target = event.target;
    if (target && "hasAttribute" in target) {
      if (!target.hasAttribute("data-focus-visible")) {
        isKeyboardModality = false;
      }
    }
  }
  function onGlobalKeyDown(event) {
    if (event.metaKey) return;
    if (event.ctrlKey) return;
    if (event.altKey) return;
    isKeyboardModality = true;
  }
  var useFocusable = createHook(
    function useFocusable2({
      focusable = true,
      accessibleWhenDisabled,
      autoFocus,
      onFocusVisible,
      ...props
    }) {
      const ref = (0, import_react13.useRef)(null);
      (0, import_react13.useEffect)(() => {
        if (!focusable) return;
        if (hasInstalledGlobalEventListeners2) return;
        addGlobalEventListener("mousedown", onGlobalMouseDown, true);
        addGlobalEventListener("keydown", onGlobalKeyDown, true);
        hasInstalledGlobalEventListeners2 = true;
      }, [focusable]);
      if (isSafariBrowser) {
        (0, import_react13.useEffect)(() => {
          if (!focusable) return;
          const element = ref.current;
          if (!element) return;
          if (!isNativeCheckboxOrRadio(element)) return;
          const labels = getLabels(element);
          if (!labels) return;
          const onMouseUp = () => queueMicrotask(() => element.focus());
          for (const label of labels) {
            label.addEventListener("mouseup", onMouseUp);
          }
          return () => {
            for (const label of labels) {
              label.removeEventListener("mouseup", onMouseUp);
            }
          };
        }, [focusable]);
      }
      const disabled = focusable && disabledFromProps(props);
      const trulyDisabled = !!disabled && !accessibleWhenDisabled;
      const [focusVisible, setFocusVisible] = (0, import_react13.useState)(false);
      (0, import_react13.useEffect)(() => {
        if (!focusable) return;
        if (trulyDisabled && focusVisible) {
          setFocusVisible(false);
        }
      }, [focusable, trulyDisabled, focusVisible]);
      (0, import_react13.useEffect)(() => {
        if (!focusable) return;
        if (!focusVisible) return;
        const element = ref.current;
        if (!element) return;
        if (typeof IntersectionObserver === "undefined") return;
        const observer = new IntersectionObserver(() => {
          if (!isFocusable(element)) {
            setFocusVisible(false);
          }
        });
        observer.observe(element);
        return () => observer.disconnect();
      }, [focusable, focusVisible]);
      const onKeyPressCapture = useDisableEvent(
        props.onKeyPressCapture,
        disabled
      );
      const onMouseDownCapture = useDisableEvent(
        props.onMouseDownCapture,
        disabled
      );
      const onClickCapture = useDisableEvent(props.onClickCapture, disabled);
      const onMouseDownProp = props.onMouseDown;
      const onMouseDown = useEvent((event) => {
        onMouseDownProp == null ? void 0 : onMouseDownProp(event);
        if (event.defaultPrevented) return;
        if (!focusable) return;
        const element = event.currentTarget;
        if (!isSafariBrowser) return;
        if (isPortalEvent(event)) return;
        if (!isButton(element) && !isNativeCheckboxOrRadio(element)) return;
        let receivedFocus = false;
        const onFocus = () => {
          receivedFocus = true;
        };
        const options = { capture: true, once: true };
        element.addEventListener("focusin", onFocus, options);
        const focusableContainer = getClosestFocusable(element.parentElement);
        markSafariFocusAncestor(focusableContainer, true);
        queueBeforeEvent(element, "mouseup", () => {
          element.removeEventListener("focusin", onFocus, true);
          markSafariFocusAncestor(focusableContainer, false);
          if (receivedFocus) return;
          focusIfNeeded(element);
        });
      });
      const handleFocusVisible = (event, currentTarget) => {
        if (currentTarget) {
          event.currentTarget = currentTarget;
        }
        if (!focusable) return;
        const element = event.currentTarget;
        if (!element) return;
        if (!hasFocus(element)) return;
        onFocusVisible == null ? void 0 : onFocusVisible(event);
        if (event.defaultPrevented) return;
        element.dataset.focusVisible = "true";
        setFocusVisible(true);
      };
      const onKeyDownCaptureProp = props.onKeyDownCapture;
      const onKeyDownCapture = useEvent((event) => {
        onKeyDownCaptureProp == null ? void 0 : onKeyDownCaptureProp(event);
        if (event.defaultPrevented) return;
        if (!focusable) return;
        if (focusVisible) return;
        if (event.metaKey) return;
        if (event.altKey) return;
        if (event.ctrlKey) return;
        if (!isSelfTarget(event)) return;
        const element = event.currentTarget;
        const applyFocusVisible = () => handleFocusVisible(event, element);
        queueBeforeEvent(element, "focusout", applyFocusVisible);
      });
      const onFocusCaptureProp = props.onFocusCapture;
      const onFocusCapture = useEvent((event) => {
        onFocusCaptureProp == null ? void 0 : onFocusCaptureProp(event);
        if (event.defaultPrevented) return;
        if (!focusable) return;
        if (!isSelfTarget(event)) {
          setFocusVisible(false);
          return;
        }
        const element = event.currentTarget;
        const applyFocusVisible = () => handleFocusVisible(event, element);
        if (isKeyboardModality || isAlwaysFocusVisible(event.target)) {
          queueBeforeEvent(event.target, "focusout", applyFocusVisible);
        } else {
          setFocusVisible(false);
        }
      });
      const onBlurProp = props.onBlur;
      const onBlur = useEvent((event) => {
        onBlurProp == null ? void 0 : onBlurProp(event);
        if (!focusable) return;
        if (!isFocusEventOutside(event)) return;
        event.currentTarget.removeAttribute("data-focus-visible");
        setFocusVisible(false);
      });
      const autoFocusOnShow = (0, import_react13.useContext)(FocusableContext);
      const autoFocusRef = useEvent((element) => {
        if (!focusable) return;
        if (!autoFocus) return;
        if (!element) return;
        if (!autoFocusOnShow) return;
        queueMicrotask(() => {
          if (hasFocus(element)) return;
          if (!isFocusable(element)) return;
          element.focus();
        });
      });
      const tagName = useTagName(ref);
      const nativeTabbable = focusable && isNativeTabbable(tagName);
      const supportsDisabled = focusable && supportsDisabledAttribute(tagName);
      const styleProp = props.style;
      const style = (0, import_react13.useMemo)(() => {
        if (trulyDisabled) {
          return { pointerEvents: "none", ...styleProp };
        }
        return styleProp;
      }, [trulyDisabled, styleProp]);
      props = {
        "data-focus-visible": focusable && focusVisible || void 0,
        "data-autofocus": autoFocus || void 0,
        "aria-disabled": disabled || void 0,
        ...props,
        ref: useMergeRefs(ref, autoFocusRef, props.ref),
        style,
        tabIndex: getTabIndex(
          focusable,
          trulyDisabled,
          nativeTabbable,
          supportsDisabled,
          props.tabIndex
        ),
        disabled: supportsDisabled && trulyDisabled ? true : void 0,
        // TODO: Test Focusable contentEditable.
        contentEditable: disabled ? void 0 : props.contentEditable,
        onKeyPressCapture,
        onClickCapture,
        onMouseDownCapture,
        onMouseDown,
        onKeyDownCapture,
        onFocusCapture,
        onBlur
      };
      return removeUndefinedValues(props);
    }
  );
  var Focusable = forwardRef22(function Focusable2(props) {
    const htmlProps = useFocusable(props);
    return createElement5(TagName2, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/PZ3OL7I2.js
  var import_react14 = __toESM(require_react(), 1);
  var TagName3 = "button";
  function isNativeClick(event) {
    if (!event.isTrusted) return false;
    const element = event.currentTarget;
    if (event.key === "Enter") {
      return isButton(element) || element.tagName === "SUMMARY" || element.tagName === "A";
    }
    if (event.key === " ") {
      return isButton(element) || element.tagName === "SUMMARY" || element.tagName === "INPUT" || element.tagName === "SELECT";
    }
    return false;
  }
  var symbol = /* @__PURE__ */ Symbol("command");
  var useCommand = createHook(
    function useCommand2({ clickOnEnter = true, clickOnSpace = true, ...props }) {
      const ref = (0, import_react14.useRef)(null);
      const [isNativeButton, setIsNativeButton] = (0, import_react14.useState)(false);
      (0, import_react14.useEffect)(() => {
        if (!ref.current) return;
        setIsNativeButton(isButton(ref.current));
      }, []);
      const [active, setActive] = (0, import_react14.useState)(false);
      const activeRef = (0, import_react14.useRef)(false);
      const disabled = disabledFromProps(props);
      const [isDuplicate, metadataProps] = useMetadataProps(props, symbol, true);
      const onKeyDownProp = props.onKeyDown;
      const onKeyDown = useEvent((event) => {
        onKeyDownProp == null ? void 0 : onKeyDownProp(event);
        const element = event.currentTarget;
        if (event.defaultPrevented) return;
        if (isDuplicate) return;
        if (disabled) return;
        if (!isSelfTarget(event)) return;
        if (isTextField(element)) return;
        if (element.isContentEditable) return;
        const isEnter = clickOnEnter && event.key === "Enter";
        const isSpace = clickOnSpace && event.key === " ";
        const shouldPreventEnter = event.key === "Enter" && !clickOnEnter;
        const shouldPreventSpace = event.key === " " && !clickOnSpace;
        if (shouldPreventEnter || shouldPreventSpace) {
          event.preventDefault();
          return;
        }
        if (isEnter || isSpace) {
          const nativeClick = isNativeClick(event);
          if (isEnter) {
            if (!nativeClick) {
              event.preventDefault();
              const { view, ...eventInit } = event;
              const click = () => fireClickEvent(element, eventInit);
              if (isFirefox()) {
                queueBeforeEvent(element, "keyup", click);
              } else {
                queueMicrotask(click);
              }
            }
          } else if (isSpace) {
            activeRef.current = true;
            if (!nativeClick) {
              event.preventDefault();
              setActive(true);
            }
          }
        }
      });
      const onKeyUpProp = props.onKeyUp;
      const onKeyUp = useEvent((event) => {
        onKeyUpProp == null ? void 0 : onKeyUpProp(event);
        if (event.defaultPrevented) return;
        if (isDuplicate) return;
        if (disabled) return;
        if (event.metaKey) return;
        const isSpace = clickOnSpace && event.key === " ";
        if (activeRef.current && isSpace) {
          activeRef.current = false;
          if (!isNativeClick(event)) {
            event.preventDefault();
            setActive(false);
            const element = event.currentTarget;
            const { view, ...eventInit } = event;
            queueMicrotask(() => fireClickEvent(element, eventInit));
          }
        }
      });
      props = {
        "data-active": active || void 0,
        type: isNativeButton ? "button" : void 0,
        ...metadataProps,
        ...props,
        ref: useMergeRefs(ref, props.ref),
        onKeyDown,
        onKeyUp
      };
      props = useFocusable(props);
      return props;
    }
  );
  var Command = forwardRef22(function Command2(props) {
    const htmlProps = useCommand(props);
    return createElement5(TagName3, htmlProps);
  });

  // node_modules/@ariakit/core/esm/__chunks/SXKM4CGU.js
  function getInternal(store2, key) {
    const internals = store2.__unstableInternals;
    invariant(internals, "Invalid store");
    return internals[key];
  }
  function createStore(initialState, ...stores) {
    let state = initialState;
    let prevStateBatch = state;
    let lastUpdate = /* @__PURE__ */ Symbol();
    let destroy = noop3;
    const instances = /* @__PURE__ */ new Set();
    const updatedKeys = /* @__PURE__ */ new Set();
    const setups = /* @__PURE__ */ new Set();
    const listeners = /* @__PURE__ */ new Set();
    const batchListeners = /* @__PURE__ */ new Set();
    const disposables = /* @__PURE__ */ new WeakMap();
    const listenerKeys = /* @__PURE__ */ new WeakMap();
    const storeSetup = (callback) => {
      setups.add(callback);
      return () => setups.delete(callback);
    };
    const storeInit = () => {
      const initialized = instances.size;
      const instance = /* @__PURE__ */ Symbol();
      instances.add(instance);
      const maybeDestroy = () => {
        instances.delete(instance);
        if (instances.size) return;
        destroy();
      };
      if (initialized) return maybeDestroy;
      const desyncs = getKeys(state).map(
        (key) => chain(
          ...stores.map((store2) => {
            var _a;
            const storeState = (_a = store2 == null ? void 0 : store2.getState) == null ? void 0 : _a.call(store2);
            if (!storeState) return;
            if (!hasOwnProperty(storeState, key)) return;
            return sync2(store2, [key], (state2) => {
              setState(
                key,
                state2[key],
                // @ts-expect-error - Not public API. This is just to prevent
                // infinite loops.
                true
              );
            });
          })
        )
      );
      const teardowns = [];
      for (const setup2 of setups) {
        teardowns.push(setup2());
      }
      const cleanups = stores.map(init);
      destroy = chain(...desyncs, ...teardowns, ...cleanups);
      return maybeDestroy;
    };
    const sub = (keys, listener, set = listeners) => {
      set.add(listener);
      listenerKeys.set(listener, keys);
      return () => {
        var _a;
        (_a = disposables.get(listener)) == null ? void 0 : _a();
        disposables.delete(listener);
        listenerKeys.delete(listener);
        set.delete(listener);
      };
    };
    const storeSubscribe = (keys, listener) => sub(keys, listener);
    const storeSync = (keys, listener) => {
      disposables.set(listener, listener(state, state));
      return sub(keys, listener);
    };
    const storeBatch = (keys, listener) => {
      disposables.set(listener, listener(state, prevStateBatch));
      return sub(keys, listener, batchListeners);
    };
    const storePick = (keys) => createStore(pick(state, keys), finalStore);
    const storeOmit = (keys) => createStore(omit(state, keys), finalStore);
    const getState = () => state;
    const setState = (key, value, fromStores = false) => {
      var _a;
      if (!hasOwnProperty(state, key)) return;
      const nextValue = applyState(value, state[key]);
      if (nextValue === state[key]) return;
      if (!fromStores) {
        for (const store2 of stores) {
          (_a = store2 == null ? void 0 : store2.setState) == null ? void 0 : _a.call(store2, key, nextValue);
        }
      }
      const prevState = state;
      state = { ...state, [key]: nextValue };
      const thisUpdate = /* @__PURE__ */ Symbol();
      lastUpdate = thisUpdate;
      updatedKeys.add(key);
      const run = (listener, prev, uKeys) => {
        var _a2;
        const keys = listenerKeys.get(listener);
        const updated = (k2) => uKeys ? uKeys.has(k2) : k2 === key;
        if (!keys || keys.some(updated)) {
          (_a2 = disposables.get(listener)) == null ? void 0 : _a2();
          disposables.set(listener, listener(state, prev));
        }
      };
      for (const listener of listeners) {
        run(listener, prevState);
      }
      queueMicrotask(() => {
        if (lastUpdate !== thisUpdate) return;
        const snapshot = state;
        for (const listener of batchListeners) {
          run(listener, prevStateBatch, updatedKeys);
        }
        prevStateBatch = snapshot;
        updatedKeys.clear();
      });
    };
    const finalStore = {
      getState,
      setState,
      __unstableInternals: {
        setup: storeSetup,
        init: storeInit,
        subscribe: storeSubscribe,
        sync: storeSync,
        batch: storeBatch,
        pick: storePick,
        omit: storeOmit
      }
    };
    return finalStore;
  }
  function setup(store2, ...args) {
    if (!store2) return;
    return getInternal(store2, "setup")(...args);
  }
  function init(store2, ...args) {
    if (!store2) return;
    return getInternal(store2, "init")(...args);
  }
  function subscribe(store2, ...args) {
    if (!store2) return;
    return getInternal(store2, "subscribe")(...args);
  }
  function sync2(store2, ...args) {
    if (!store2) return;
    return getInternal(store2, "sync")(...args);
  }
  function batch(store2, ...args) {
    if (!store2) return;
    return getInternal(store2, "batch")(...args);
  }
  function omit2(store2, ...args) {
    if (!store2) return;
    return getInternal(store2, "omit")(...args);
  }
  function pick2(store2, ...args) {
    if (!store2) return;
    return getInternal(store2, "pick")(...args);
  }
  function mergeStore(...stores) {
    var _a;
    const initialState = {};
    for (const store22 of stores) {
      const nextState = (_a = store22 == null ? void 0 : store22.getState) == null ? void 0 : _a.call(store22);
      if (nextState) {
        Object.assign(initialState, nextState);
      }
    }
    const store2 = createStore(initialState, ...stores);
    return Object.assign({}, ...stores, store2);
  }
  function throwOnConflictingProps(props, store2) {
    if (false) return;
    if (!store2) return;
    const defaultKeys = Object.entries(props).filter(([key, value]) => key.startsWith("default") && value !== void 0).map(([key]) => {
      var _a;
      const stateKey = key.replace("default", "");
      return `${((_a = stateKey[0]) == null ? void 0 : _a.toLowerCase()) || ""}${stateKey.slice(1)}`;
    });
    if (!defaultKeys.length) return;
    const storeState = store2.getState();
    const conflictingProps = defaultKeys.filter(
      (key) => hasOwnProperty(storeState, key)
    );
    if (!conflictingProps.length) return;
    throw new Error(
      `Passing a store prop in conjunction with a default state is not supported.

const store = useSelectStore();
<SelectProvider store={store} defaultValue="Apple" />
                ^             ^

Instead, pass the default state to the topmost store:

const store = useSelectStore({ defaultValue: "Apple" });
<SelectProvider store={store} />

See https://github.com/ariakit/ariakit/pull/2745 for more details.

If there's a particular need for this, please submit a feature request at https://github.com/ariakit/ariakit
`
    );
  }

  // node_modules/@ariakit/react-core/esm/__chunks/Q5W46E73.js
  var React9 = __toESM(require_react(), 1);
  var import_shim = __toESM(require_shim(), 1);
  var { useSyncExternalStore } = import_shim.default;
  var noopSubscribe = () => () => {
  };
  function useStoreState(store2, keyOrSelector = identity) {
    const storeSubscribe = React9.useCallback(
      (callback) => {
        if (!store2) return noopSubscribe();
        return subscribe(store2, null, callback);
      },
      [store2]
    );
    const getSnapshot = () => {
      const key = typeof keyOrSelector === "string" ? keyOrSelector : null;
      const selector2 = typeof keyOrSelector === "function" ? keyOrSelector : null;
      const state = store2 == null ? void 0 : store2.getState();
      if (selector2) return selector2(state);
      if (!state) return;
      if (!key) return;
      if (!hasOwnProperty(state, key)) return;
      return state[key];
    };
    return useSyncExternalStore(storeSubscribe, getSnapshot, getSnapshot);
  }
  function useStoreStateObject(store2, object) {
    const objRef = React9.useRef(
      {}
    );
    const storeSubscribe = React9.useCallback(
      (callback) => {
        if (!store2) return noopSubscribe();
        return subscribe(store2, null, callback);
      },
      [store2]
    );
    const getSnapshot = () => {
      const state = store2 == null ? void 0 : store2.getState();
      let updated = false;
      const obj = objRef.current;
      for (const prop in object) {
        const keyOrSelector = object[prop];
        if (typeof keyOrSelector === "function") {
          const value = keyOrSelector(state);
          if (value !== obj[prop]) {
            obj[prop] = value;
            updated = true;
          }
        }
        if (typeof keyOrSelector === "string") {
          if (!state) continue;
          if (!hasOwnProperty(state, keyOrSelector)) continue;
          const value = state[keyOrSelector];
          if (value !== obj[prop]) {
            obj[prop] = value;
            updated = true;
          }
        }
      }
      if (updated) {
        objRef.current = { ...obj };
      }
      return objRef.current;
    };
    return useSyncExternalStore(storeSubscribe, getSnapshot, getSnapshot);
  }
  function useStoreProps(store2, props, key, setKey) {
    const value = hasOwnProperty(props, key) ? props[key] : void 0;
    const setValue = setKey ? props[setKey] : void 0;
    const propsRef = useLiveRef({ value, setValue });
    useSafeLayoutEffect(() => {
      return sync2(store2, [key], (state, prev) => {
        const { value: value2, setValue: setValue2 } = propsRef.current;
        if (!setValue2) return;
        if (state[key] === prev[key]) return;
        if (state[key] === value2) return;
        setValue2(state[key]);
      });
    }, [store2, key]);
    useSafeLayoutEffect(() => {
      if (value === void 0) return;
      store2.setState(key, value);
      return batch(store2, [key], () => {
        if (value === void 0) return;
        store2.setState(key, value);
      });
    });
  }
  function useStore(createStore2, props) {
    const [store2, setStore] = React9.useState(() => createStore2(props));
    useSafeLayoutEffect(() => init(store2), [store2]);
    const useState210 = React9.useCallback(
      (keyOrSelector) => useStoreState(store2, keyOrSelector),
      [store2]
    );
    const memoizedStore = React9.useMemo(
      () => ({ ...store2, useState: useState210 }),
      [store2, useState210]
    );
    const updateStore = useEvent(() => {
      setStore((store22) => createStore2({ ...props, ...store22.getState() }));
    });
    return [memoizedStore, updateStore];
  }

  // node_modules/@ariakit/react-core/esm/__chunks/WZWDIE3S.js
  var import_react15 = __toESM(require_react(), 1);
  var import_jsx_runtime207 = __toESM(require_jsx_runtime(), 1);
  var TagName4 = "button";
  function isEditableElement(element) {
    if (isTextbox(element)) return true;
    return element.tagName === "INPUT" && !isButton(element);
  }
  function getNextPageOffset(scrollingElement, pageUp = false) {
    const height = scrollingElement.clientHeight;
    const { top } = scrollingElement.getBoundingClientRect();
    const pageSize = Math.max(height * 0.875, height - 40) * 1.5;
    const pageOffset = pageUp ? height - pageSize + top : pageSize + top;
    if (scrollingElement.tagName === "HTML") {
      return pageOffset + scrollingElement.scrollTop;
    }
    return pageOffset;
  }
  function getItemOffset(itemElement, pageUp = false) {
    const { top } = itemElement.getBoundingClientRect();
    if (pageUp) {
      return top + itemElement.clientHeight;
    }
    return top;
  }
  function findNextPageItemId(element, store2, next, pageUp = false) {
    var _a;
    if (!store2) return;
    if (!next) return;
    const { renderedItems } = store2.getState();
    const scrollingElement = getScrollingElement(element);
    if (!scrollingElement) return;
    const nextPageOffset = getNextPageOffset(scrollingElement, pageUp);
    let id;
    let prevDifference;
    for (let i2 = 0; i2 < renderedItems.length; i2 += 1) {
      const previousId = id;
      id = next(i2);
      if (!id) break;
      if (id === previousId) continue;
      const itemElement = (_a = getEnabledItem(store2, id)) == null ? void 0 : _a.element;
      if (!itemElement) continue;
      const itemOffset = getItemOffset(itemElement, pageUp);
      const difference = itemOffset - nextPageOffset;
      const absDifference = Math.abs(difference);
      if (pageUp && difference <= 0 || !pageUp && difference >= 0) {
        if (prevDifference !== void 0 && prevDifference < absDifference) {
          id = previousId;
        }
        break;
      }
      prevDifference = absDifference;
    }
    return id;
  }
  function targetIsAnotherItem(event, store2) {
    if (isSelfTarget(event)) return false;
    return isItem(store2, event.target);
  }
  var useCompositeItem = createHook(
    function useCompositeItem2({
      store: store2,
      rowId: rowIdProp,
      preventScrollOnKeyDown = false,
      moveOnKeyPress = true,
      tabbable = false,
      getItem: getItemProp,
      "aria-setsize": ariaSetSizeProp,
      "aria-posinset": ariaPosInSetProp,
      ...props
    }) {
      const context = useCompositeContext();
      store2 = store2 || context;
      const id = useId5(props.id);
      const ref = (0, import_react15.useRef)(null);
      const row = (0, import_react15.useContext)(CompositeRowContext);
      const disabled = disabledFromProps(props);
      const trulyDisabled = disabled && !props.accessibleWhenDisabled;
      const {
        rowId,
        baseElement,
        isActiveItem,
        ariaSetSize,
        ariaPosInSet,
        isTabbable
      } = useStoreStateObject(store2, {
        rowId(state) {
          if (rowIdProp) return rowIdProp;
          if (!state) return;
          if (!(row == null ? void 0 : row.baseElement)) return;
          if (row.baseElement !== state.baseElement) return;
          return row.id;
        },
        baseElement(state) {
          return (state == null ? void 0 : state.baseElement) || void 0;
        },
        isActiveItem(state) {
          return !!state && state.activeId === id;
        },
        ariaSetSize(state) {
          if (ariaSetSizeProp != null) return ariaSetSizeProp;
          if (!state) return;
          if (!(row == null ? void 0 : row.ariaSetSize)) return;
          if (row.baseElement !== state.baseElement) return;
          return row.ariaSetSize;
        },
        ariaPosInSet(state) {
          if (ariaPosInSetProp != null) return ariaPosInSetProp;
          if (!state) return;
          if (!(row == null ? void 0 : row.ariaPosInSet)) return;
          if (row.baseElement !== state.baseElement) return;
          const itemsInRow = state.renderedItems.filter(
            (item) => item.rowId === rowId
          );
          return row.ariaPosInSet + itemsInRow.findIndex((item) => item.id === id);
        },
        isTabbable(state) {
          if (!(state == null ? void 0 : state.renderedItems.length)) return true;
          if (state.virtualFocus) return false;
          if (tabbable) return true;
          if (state.activeId === null) return false;
          const item = store2 == null ? void 0 : store2.item(state.activeId);
          if (item == null ? void 0 : item.disabled) return true;
          if (!(item == null ? void 0 : item.element)) return true;
          return state.activeId === id;
        }
      });
      const getItem = (0, import_react15.useCallback)(
        (item) => {
          var _a;
          const nextItem = {
            ...item,
            id: id || item.id,
            rowId,
            disabled: !!trulyDisabled,
            children: (_a = item.element) == null ? void 0 : _a.textContent
          };
          if (getItemProp) {
            return getItemProp(nextItem);
          }
          return nextItem;
        },
        [id, rowId, trulyDisabled, getItemProp]
      );
      const onFocusProp = props.onFocus;
      const hasFocusedComposite = (0, import_react15.useRef)(false);
      const onFocus = useEvent((event) => {
        onFocusProp == null ? void 0 : onFocusProp(event);
        if (event.defaultPrevented) return;
        if (isPortalEvent(event)) return;
        if (!id) return;
        if (!store2) return;
        if (targetIsAnotherItem(event, store2)) return;
        const { virtualFocus, baseElement: baseElement2 } = store2.getState();
        store2.setActiveId(id);
        if (isTextbox(event.currentTarget)) {
          selectTextField(event.currentTarget);
        }
        if (!virtualFocus) return;
        if (!isSelfTarget(event)) return;
        if (isEditableElement(event.currentTarget)) return;
        if (!(baseElement2 == null ? void 0 : baseElement2.isConnected)) return;
        if (isSafari() && event.currentTarget.hasAttribute("data-autofocus")) {
          event.currentTarget.scrollIntoView({
            block: "nearest",
            inline: "nearest"
          });
        }
        hasFocusedComposite.current = true;
        const fromComposite = event.relatedTarget === baseElement2 || isItem(store2, event.relatedTarget);
        if (fromComposite) {
          focusSilently(baseElement2);
        } else {
          baseElement2.focus();
        }
      });
      const onBlurCaptureProp = props.onBlurCapture;
      const onBlurCapture = useEvent((event) => {
        onBlurCaptureProp == null ? void 0 : onBlurCaptureProp(event);
        if (event.defaultPrevented) return;
        const state = store2 == null ? void 0 : store2.getState();
        if ((state == null ? void 0 : state.virtualFocus) && hasFocusedComposite.current) {
          hasFocusedComposite.current = false;
          event.preventDefault();
          event.stopPropagation();
        }
      });
      const onKeyDownProp = props.onKeyDown;
      const preventScrollOnKeyDownProp = useBooleanEvent(preventScrollOnKeyDown);
      const moveOnKeyPressProp = useBooleanEvent(moveOnKeyPress);
      const onKeyDown = useEvent((event) => {
        onKeyDownProp == null ? void 0 : onKeyDownProp(event);
        if (event.defaultPrevented) return;
        if (!isSelfTarget(event)) return;
        if (!store2) return;
        const { currentTarget } = event;
        const state = store2.getState();
        const item = store2.item(id);
        const isGrid2 = !!(item == null ? void 0 : item.rowId);
        const isVertical = state.orientation !== "horizontal";
        const isHorizontal = state.orientation !== "vertical";
        const canHomeEnd = () => {
          if (isGrid2) return true;
          if (isHorizontal) return true;
          if (!state.baseElement) return true;
          if (!isTextField(state.baseElement)) return true;
          return false;
        };
        const keyMap = {
          ArrowUp: (isGrid2 || isVertical) && store2.up,
          ArrowRight: (isGrid2 || isHorizontal) && store2.next,
          ArrowDown: (isGrid2 || isVertical) && store2.down,
          ArrowLeft: (isGrid2 || isHorizontal) && store2.previous,
          Home: () => {
            if (!canHomeEnd()) return;
            if (!isGrid2 || event.ctrlKey) {
              return store2 == null ? void 0 : store2.first();
            }
            return store2 == null ? void 0 : store2.previous(-1);
          },
          End: () => {
            if (!canHomeEnd()) return;
            if (!isGrid2 || event.ctrlKey) {
              return store2 == null ? void 0 : store2.last();
            }
            return store2 == null ? void 0 : store2.next(-1);
          },
          PageUp: () => {
            return findNextPageItemId(currentTarget, store2, store2 == null ? void 0 : store2.up, true);
          },
          PageDown: () => {
            return findNextPageItemId(currentTarget, store2, store2 == null ? void 0 : store2.down);
          }
        };
        const action = keyMap[event.key];
        if (action) {
          if (isTextbox(currentTarget)) {
            const selection = getTextboxSelection(currentTarget);
            const isLeft = isHorizontal && event.key === "ArrowLeft";
            const isRight = isHorizontal && event.key === "ArrowRight";
            const isUp = isVertical && event.key === "ArrowUp";
            const isDown = isVertical && event.key === "ArrowDown";
            if (isRight || isDown) {
              const { length: valueLength } = getTextboxValue(currentTarget);
              if (selection.end !== valueLength) return;
            } else if ((isLeft || isUp) && selection.start !== 0) return;
          }
          const nextId2 = action();
          if (preventScrollOnKeyDownProp(event) || nextId2 !== void 0) {
            if (!moveOnKeyPressProp(event)) return;
            event.preventDefault();
            store2.move(nextId2);
          }
        }
      });
      const providerValue = (0, import_react15.useMemo)(
        () => ({ id, baseElement }),
        [id, baseElement]
      );
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(CompositeItemContext.Provider, { value: providerValue, children: element }),
        [providerValue]
      );
      props = {
        id,
        "data-active-item": isActiveItem || void 0,
        ...props,
        ref: useMergeRefs(ref, props.ref),
        tabIndex: isTabbable ? props.tabIndex : -1,
        onFocus,
        onBlurCapture,
        onKeyDown
      };
      props = useCommand(props);
      props = useCollectionItem({
        store: store2,
        ...props,
        getItem,
        shouldRegisterItem: id ? props.shouldRegisterItem : false
      });
      return removeUndefinedValues({
        ...props,
        "aria-setsize": ariaSetSize,
        "aria-posinset": ariaPosInSet
      });
    }
  );
  var CompositeItem = memo22(
    forwardRef22(function CompositeItem2(props) {
      const htmlProps = useCompositeItem(props);
      return createElement5(TagName4, htmlProps);
    })
  );

  // node_modules/@ariakit/core/esm/__chunks/7PRQYBBV.js
  function toArray2(arg) {
    if (Array.isArray(arg)) {
      return arg;
    }
    return typeof arg !== "undefined" ? [arg] : [];
  }
  function flatten2DArray(array) {
    const flattened = [];
    for (const row of array) {
      flattened.push(...row);
    }
    return flattened;
  }
  function reverseArray(array) {
    return array.slice().reverse();
  }

  // node_modules/@ariakit/react-core/esm/__chunks/ZMWF7ASR.js
  var import_react16 = __toESM(require_react(), 1);
  var import_jsx_runtime208 = __toESM(require_jsx_runtime(), 1);
  var TagName5 = "div";
  function isGrid(items) {
    return items.some((item) => !!item.rowId);
  }
  function isPrintableKey(event) {
    const target = event.target;
    if (target && !isTextField(target)) return false;
    return event.key.length === 1 && !event.ctrlKey && !event.metaKey;
  }
  function isModifierKey(event) {
    return event.key === "Shift" || event.key === "Control" || event.key === "Alt" || event.key === "Meta";
  }
  function useKeyboardEventProxy(store2, onKeyboardEvent, previousElementRef) {
    return useEvent((event) => {
      var _a;
      onKeyboardEvent == null ? void 0 : onKeyboardEvent(event);
      if (event.defaultPrevented) return;
      if (event.isPropagationStopped()) return;
      if (!isSelfTarget(event)) return;
      if (isModifierKey(event)) return;
      if (isPrintableKey(event)) return;
      const state = store2.getState();
      const activeElement = (_a = getEnabledItem(store2, state.activeId)) == null ? void 0 : _a.element;
      if (!activeElement) return;
      const { view, ...eventInit } = event;
      const previousElement = previousElementRef == null ? void 0 : previousElementRef.current;
      if (activeElement !== previousElement) {
        activeElement.focus();
      }
      if (!fireKeyboardEvent(activeElement, event.type, eventInit)) {
        event.preventDefault();
      }
      if (event.currentTarget.contains(activeElement)) {
        event.stopPropagation();
      }
    });
  }
  function findFirstEnabledItemInTheLastRow(items) {
    return findFirstEnabledItem(
      flatten2DArray(reverseArray(groupItemsByRows(items)))
    );
  }
  function useScheduleFocus(store2) {
    const [scheduled, setScheduled] = (0, import_react16.useState)(false);
    const schedule2 = (0, import_react16.useCallback)(() => setScheduled(true), []);
    const activeItem = store2.useState(
      (state) => getEnabledItem(store2, state.activeId)
    );
    (0, import_react16.useEffect)(() => {
      const activeElement = activeItem == null ? void 0 : activeItem.element;
      if (!scheduled) return;
      if (!activeElement) return;
      setScheduled(false);
      activeElement.focus({ preventScroll: true });
    }, [activeItem, scheduled]);
    return schedule2;
  }
  var useComposite = createHook(
    function useComposite2({
      store: store2,
      composite = true,
      focusOnMove = composite,
      moveOnKeyPress = true,
      ...props
    }) {
      const context = useCompositeProviderContext();
      store2 = store2 || context;
      invariant(
        store2,
        "Composite must receive a `store` prop or be wrapped in a CompositeProvider component."
      );
      const ref = (0, import_react16.useRef)(null);
      const previousElementRef = (0, import_react16.useRef)(null);
      const scheduleFocus = useScheduleFocus(store2);
      const moves = store2.useState("moves");
      const [, setBaseElement] = useTransactionState(
        composite ? store2.setBaseElement : null
      );
      (0, import_react16.useEffect)(() => {
        var _a;
        if (!store2) return;
        if (!moves) return;
        if (!composite) return;
        if (!focusOnMove) return;
        const { activeId: activeId2 } = store2.getState();
        const itemElement = (_a = getEnabledItem(store2, activeId2)) == null ? void 0 : _a.element;
        if (!itemElement) return;
        focusIntoView(itemElement);
      }, [store2, moves, composite, focusOnMove]);
      useSafeLayoutEffect(() => {
        if (!store2) return;
        if (!moves) return;
        if (!composite) return;
        const { baseElement, activeId: activeId2 } = store2.getState();
        const isSelfAcive = activeId2 === null;
        if (!isSelfAcive) return;
        if (!baseElement) return;
        const previousElement = previousElementRef.current;
        previousElementRef.current = null;
        if (previousElement) {
          fireBlurEvent(previousElement, { relatedTarget: baseElement });
        }
        if (!hasFocus(baseElement)) {
          baseElement.focus();
        }
      }, [store2, moves, composite]);
      const activeId = store2.useState("activeId");
      const virtualFocus = store2.useState("virtualFocus");
      useSafeLayoutEffect(() => {
        var _a;
        if (!store2) return;
        if (!composite) return;
        if (!virtualFocus) return;
        const previousElement = previousElementRef.current;
        previousElementRef.current = null;
        if (!previousElement) return;
        const activeElement = (_a = getEnabledItem(store2, activeId)) == null ? void 0 : _a.element;
        const relatedTarget = activeElement || getActiveElement(previousElement);
        if (relatedTarget === previousElement) return;
        fireBlurEvent(previousElement, { relatedTarget });
      }, [store2, activeId, virtualFocus, composite]);
      const onKeyDownCapture = useKeyboardEventProxy(
        store2,
        props.onKeyDownCapture,
        previousElementRef
      );
      const onKeyUpCapture = useKeyboardEventProxy(
        store2,
        props.onKeyUpCapture,
        previousElementRef
      );
      const onFocusCaptureProp = props.onFocusCapture;
      const onFocusCapture = useEvent((event) => {
        onFocusCaptureProp == null ? void 0 : onFocusCaptureProp(event);
        if (event.defaultPrevented) return;
        if (!store2) return;
        const { virtualFocus: virtualFocus2 } = store2.getState();
        if (!virtualFocus2) return;
        const previousActiveElement = event.relatedTarget;
        const isSilentlyFocused = silentlyFocused(event.currentTarget);
        if (isSelfTarget(event) && isSilentlyFocused) {
          event.stopPropagation();
          previousElementRef.current = previousActiveElement;
        }
      });
      const onFocusProp = props.onFocus;
      const onFocus = useEvent((event) => {
        onFocusProp == null ? void 0 : onFocusProp(event);
        if (event.defaultPrevented) return;
        if (!composite) return;
        if (!store2) return;
        const { relatedTarget } = event;
        const { virtualFocus: virtualFocus2 } = store2.getState();
        if (virtualFocus2) {
          if (isSelfTarget(event) && !isItem(store2, relatedTarget)) {
            queueMicrotask(scheduleFocus);
          }
        } else if (isSelfTarget(event)) {
          store2.setActiveId(null);
        }
      });
      const onBlurCaptureProp = props.onBlurCapture;
      const onBlurCapture = useEvent((event) => {
        var _a;
        onBlurCaptureProp == null ? void 0 : onBlurCaptureProp(event);
        if (event.defaultPrevented) return;
        if (!store2) return;
        const { virtualFocus: virtualFocus2, activeId: activeId2 } = store2.getState();
        if (!virtualFocus2) return;
        const activeElement = (_a = getEnabledItem(store2, activeId2)) == null ? void 0 : _a.element;
        const nextActiveElement = event.relatedTarget;
        const nextActiveElementIsItem = isItem(store2, nextActiveElement);
        const previousElement = previousElementRef.current;
        previousElementRef.current = null;
        if (isSelfTarget(event) && nextActiveElementIsItem) {
          if (nextActiveElement === activeElement) {
            if (previousElement && previousElement !== nextActiveElement) {
              fireBlurEvent(previousElement, event);
            }
          } else if (activeElement) {
            fireBlurEvent(activeElement, event);
          } else if (previousElement) {
            fireBlurEvent(previousElement, event);
          }
          event.stopPropagation();
        } else {
          const targetIsItem = isItem(store2, event.target);
          if (!targetIsItem && activeElement) {
            fireBlurEvent(activeElement, event);
          }
        }
      });
      const onKeyDownProp = props.onKeyDown;
      const moveOnKeyPressProp = useBooleanEvent(moveOnKeyPress);
      const onKeyDown = useEvent((event) => {
        var _a;
        onKeyDownProp == null ? void 0 : onKeyDownProp(event);
        if (event.nativeEvent.isComposing) return;
        if (event.defaultPrevented) return;
        if (!store2) return;
        if (!isSelfTarget(event)) return;
        const { orientation, renderedItems, activeId: activeId2 } = store2.getState();
        const activeItem = getEnabledItem(store2, activeId2);
        if ((_a = activeItem == null ? void 0 : activeItem.element) == null ? void 0 : _a.isConnected) return;
        const isVertical = orientation !== "horizontal";
        const isHorizontal = orientation !== "vertical";
        const grid = isGrid(renderedItems);
        const isHorizontalKey = event.key === "ArrowLeft" || event.key === "ArrowRight" || event.key === "Home" || event.key === "End";
        if (isHorizontalKey && isTextField(event.currentTarget)) return;
        const up = () => {
          if (grid) {
            const item = findFirstEnabledItemInTheLastRow(renderedItems);
            return item == null ? void 0 : item.id;
          }
          return store2 == null ? void 0 : store2.last();
        };
        const keyMap = {
          ArrowUp: (grid || isVertical) && up,
          ArrowRight: (grid || isHorizontal) && store2.first,
          ArrowDown: (grid || isVertical) && store2.first,
          ArrowLeft: (grid || isHorizontal) && store2.last,
          Home: store2.first,
          End: store2.last,
          PageUp: store2.first,
          PageDown: store2.last
        };
        const action = keyMap[event.key];
        if (action) {
          const id = action();
          if (id !== void 0) {
            if (!moveOnKeyPressProp(event)) return;
            event.preventDefault();
            store2.move(id);
          }
        }
      });
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(CompositeContextProvider, { value: store2, children: element }),
        [store2]
      );
      const activeDescendant = store2.useState((state) => {
        var _a;
        if (!store2) return;
        if (!composite) return;
        if (!state.virtualFocus) return;
        return (_a = getEnabledItem(store2, state.activeId)) == null ? void 0 : _a.id;
      });
      props = {
        "aria-activedescendant": activeDescendant,
        ...props,
        ref: useMergeRefs(ref, setBaseElement, props.ref),
        onKeyDownCapture,
        onKeyUpCapture,
        onFocusCapture,
        onFocus,
        onBlurCapture,
        onKeyDown
      };
      const focusable = store2.useState(
        (state) => composite && (state.virtualFocus || state.activeId === null)
      );
      props = useFocusable({ focusable, ...props });
      return props;
    }
  );
  var Composite6 = forwardRef22(function Composite22(props) {
    const htmlProps = useComposite(props);
    return createElement5(TagName5, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/LVDQFHCH.js
  var ctx4 = createStoreContext();
  var useDisclosureContext = ctx4.useContext;
  var useDisclosureScopedContext = ctx4.useScopedContext;
  var useDisclosureProviderContext = ctx4.useProviderContext;
  var DisclosureContextProvider = ctx4.ContextProvider;
  var DisclosureScopedContextProvider = ctx4.ScopedContextProvider;

  // node_modules/@ariakit/react-core/esm/__chunks/A62MDFCW.js
  var import_react17 = __toESM(require_react(), 1);
  var ctx5 = createStoreContext(
    [DisclosureContextProvider],
    [DisclosureScopedContextProvider]
  );
  var useDialogContext = ctx5.useContext;
  var useDialogScopedContext = ctx5.useScopedContext;
  var useDialogProviderContext = ctx5.useProviderContext;
  var DialogContextProvider = ctx5.ContextProvider;
  var DialogScopedContextProvider = ctx5.ScopedContextProvider;
  var DialogHeadingContext = (0, import_react17.createContext)(void 0);
  var DialogDescriptionContext = (0, import_react17.createContext)(void 0);

  // node_modules/@ariakit/react-core/esm/__chunks/6B3RXHKP.js
  var import_react18 = __toESM(require_react(), 1);
  var import_react_dom2 = __toESM(require_react_dom(), 1);
  var import_jsx_runtime209 = __toESM(require_jsx_runtime(), 1);
  var TagName6 = "div";
  function afterTimeout(timeoutMs, cb) {
    const timeoutId = setTimeout(cb, timeoutMs);
    return () => clearTimeout(timeoutId);
  }
  function afterPaint2(cb) {
    let raf2 = requestAnimationFrame(() => {
      raf2 = requestAnimationFrame(cb);
    });
    return () => cancelAnimationFrame(raf2);
  }
  function parseCSSTime(...times) {
    return times.join(", ").split(", ").reduce((longestTime, currentTimeString) => {
      const multiplier = currentTimeString.endsWith("ms") ? 1 : 1e3;
      const currentTime = Number.parseFloat(currentTimeString || "0s") * multiplier;
      if (currentTime > longestTime) return currentTime;
      return longestTime;
    }, 0);
  }
  function isHidden(mounted, hidden, alwaysVisible) {
    return !alwaysVisible && hidden !== false && (!mounted || !!hidden);
  }
  var useDisclosureContent = createHook(function useDisclosureContent2({ store: store2, alwaysVisible, ...props }) {
    const context = useDisclosureProviderContext();
    store2 = store2 || context;
    invariant(
      store2,
      "DisclosureContent must receive a `store` prop or be wrapped in a DisclosureProvider component."
    );
    const ref = (0, import_react18.useRef)(null);
    const id = useId5(props.id);
    const [transition, setTransition] = (0, import_react18.useState)(null);
    const open = store2.useState("open");
    const mounted = store2.useState("mounted");
    const animated2 = store2.useState("animated");
    const contentElement = store2.useState("contentElement");
    const otherElement = useStoreState(store2.disclosure, "contentElement");
    useSafeLayoutEffect(() => {
      if (!ref.current) return;
      store2 == null ? void 0 : store2.setContentElement(ref.current);
    }, [store2]);
    useSafeLayoutEffect(() => {
      let previousAnimated;
      store2 == null ? void 0 : store2.setState("animated", (animated22) => {
        previousAnimated = animated22;
        return true;
      });
      return () => {
        if (previousAnimated === void 0) return;
        store2 == null ? void 0 : store2.setState("animated", previousAnimated);
      };
    }, [store2]);
    useSafeLayoutEffect(() => {
      if (!animated2) return;
      if (!(contentElement == null ? void 0 : contentElement.isConnected)) {
        setTransition(null);
        return;
      }
      return afterPaint2(() => {
        setTransition(open ? "enter" : mounted ? "leave" : null);
      });
    }, [animated2, contentElement, open, mounted]);
    useSafeLayoutEffect(() => {
      if (!store2) return;
      if (!animated2) return;
      if (!transition) return;
      if (!contentElement) return;
      const stopAnimation = () => store2 == null ? void 0 : store2.setState("animating", false);
      const stopAnimationSync = () => (0, import_react_dom2.flushSync)(stopAnimation);
      if (transition === "leave" && open) return;
      if (transition === "enter" && !open) return;
      if (typeof animated2 === "number") {
        const timeout2 = animated2;
        return afterTimeout(timeout2, stopAnimationSync);
      }
      const {
        transitionDuration,
        animationDuration,
        transitionDelay,
        animationDelay
      } = getComputedStyle(contentElement);
      const {
        transitionDuration: transitionDuration2 = "0",
        animationDuration: animationDuration2 = "0",
        transitionDelay: transitionDelay2 = "0",
        animationDelay: animationDelay2 = "0"
      } = otherElement ? getComputedStyle(otherElement) : {};
      const delay = parseCSSTime(
        transitionDelay,
        animationDelay,
        transitionDelay2,
        animationDelay2
      );
      const duration = parseCSSTime(
        transitionDuration,
        animationDuration,
        transitionDuration2,
        animationDuration2
      );
      const timeout = delay + duration;
      if (!timeout) {
        if (transition === "enter") {
          store2.setState("animated", false);
        }
        stopAnimation();
        return;
      }
      const frameRate = 1e3 / 60;
      const maxTimeout = Math.max(timeout - frameRate, 0);
      return afterTimeout(maxTimeout, stopAnimationSync);
    }, [store2, animated2, contentElement, otherElement, open, transition]);
    props = useWrapElement(
      props,
      (element) => /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(DialogScopedContextProvider, { value: store2, children: element }),
      [store2]
    );
    const hidden = isHidden(mounted, props.hidden, alwaysVisible);
    const styleProp = props.style;
    const style = (0, import_react18.useMemo)(() => {
      if (hidden) {
        return { ...styleProp, display: "none" };
      }
      return styleProp;
    }, [hidden, styleProp]);
    props = {
      id,
      "data-open": open || void 0,
      "data-enter": transition === "enter" || void 0,
      "data-leave": transition === "leave" || void 0,
      hidden,
      ...props,
      ref: useMergeRefs(id ? store2.setContentElement : null, ref, props.ref),
      style
    };
    return removeUndefinedValues(props);
  });
  var DisclosureContentImpl = forwardRef22(function DisclosureContentImpl2(props) {
    const htmlProps = useDisclosureContent(props);
    return createElement5(TagName6, htmlProps);
  });
  var DisclosureContent = forwardRef22(function DisclosureContent2({
    unmountOnHide,
    ...props
  }) {
    const context = useDisclosureProviderContext();
    const store2 = props.store || context;
    const mounted = useStoreState(
      store2,
      (state) => !unmountOnHide || (state == null ? void 0 : state.mounted)
    );
    if (mounted === false) return null;
    return /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(DisclosureContentImpl, { ...props });
  });

  // node_modules/@ariakit/core/esm/__chunks/75BJEVSH.js
  function createDisclosureStore(props = {}) {
    const store2 = mergeStore(
      props.store,
      omit2(props.disclosure, ["contentElement", "disclosureElement"])
    );
    throwOnConflictingProps(props, store2);
    const syncState = store2 == null ? void 0 : store2.getState();
    const open = defaultValue(
      props.open,
      syncState == null ? void 0 : syncState.open,
      props.defaultOpen,
      false
    );
    const animated2 = defaultValue(props.animated, syncState == null ? void 0 : syncState.animated, false);
    const initialState = {
      open,
      animated: animated2,
      animating: !!animated2 && open,
      mounted: open,
      contentElement: defaultValue(syncState == null ? void 0 : syncState.contentElement, null),
      disclosureElement: defaultValue(syncState == null ? void 0 : syncState.disclosureElement, null)
    };
    const disclosure = createStore(initialState, store2);
    setup(
      disclosure,
      () => sync2(disclosure, ["animated", "animating"], (state) => {
        if (state.animated) return;
        disclosure.setState("animating", false);
      })
    );
    setup(
      disclosure,
      () => subscribe(disclosure, ["open"], () => {
        if (!disclosure.getState().animated) return;
        disclosure.setState("animating", true);
      })
    );
    setup(
      disclosure,
      () => sync2(disclosure, ["open", "animating"], (state) => {
        disclosure.setState("mounted", state.open || state.animating);
      })
    );
    return {
      ...disclosure,
      disclosure: props.disclosure,
      setOpen: (value) => disclosure.setState("open", value),
      show: () => disclosure.setState("open", true),
      hide: () => disclosure.setState("open", false),
      toggle: () => disclosure.setState("open", (open2) => !open2),
      stopAnimation: () => disclosure.setState("animating", false),
      setContentElement: (value) => disclosure.setState("contentElement", value),
      setDisclosureElement: (value) => disclosure.setState("disclosureElement", value)
    };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/WLZ6H5FH.js
  function useDisclosureStoreProps(store2, update4, props) {
    useUpdateEffect(update4, [props.store, props.disclosure]);
    useStoreProps(store2, props, "open", "setOpen");
    useStoreProps(store2, props, "mounted", "setMounted");
    useStoreProps(store2, props, "animated");
    return Object.assign(store2, { disclosure: props.disclosure });
  }

  // node_modules/@ariakit/react-core/esm/__chunks/JMU4N4M5.js
  var ctx6 = createStoreContext(
    [DialogContextProvider],
    [DialogScopedContextProvider]
  );
  var usePopoverContext = ctx6.useContext;
  var usePopoverScopedContext = ctx6.useScopedContext;
  var usePopoverProviderContext = ctx6.useProviderContext;
  var PopoverContextProvider = ctx6.ContextProvider;
  var PopoverScopedContextProvider = ctx6.ScopedContextProvider;

  // node_modules/@ariakit/core/esm/__chunks/N5XGANPW.js
  function getCommonParent(items) {
    var _a;
    const firstItem = items.find((item) => !!item.element);
    const lastItem = [...items].reverse().find((item) => !!item.element);
    let parentElement = (_a = firstItem == null ? void 0 : firstItem.element) == null ? void 0 : _a.parentElement;
    while (parentElement && (lastItem == null ? void 0 : lastItem.element)) {
      const parent = parentElement;
      if (lastItem && parent.contains(lastItem.element)) {
        return parentElement;
      }
      parentElement = parentElement.parentElement;
    }
    return getDocument(parentElement).body;
  }
  function getPrivateStore(store2) {
    return store2 == null ? void 0 : store2.__unstablePrivateStore;
  }
  function createCollectionStore(props = {}) {
    var _a;
    throwOnConflictingProps(props, props.store);
    const syncState = (_a = props.store) == null ? void 0 : _a.getState();
    const items = defaultValue(
      props.items,
      syncState == null ? void 0 : syncState.items,
      props.defaultItems,
      []
    );
    const itemsMap = new Map(items.map((item) => [item.id, item]));
    const initialState = {
      items,
      renderedItems: defaultValue(syncState == null ? void 0 : syncState.renderedItems, [])
    };
    const syncPrivateStore = getPrivateStore(props.store);
    const privateStore = createStore(
      { items, renderedItems: initialState.renderedItems },
      syncPrivateStore
    );
    const collection = createStore(initialState, props.store);
    const sortItems = (renderedItems) => {
      const sortedItems = sortBasedOnDOMPosition(renderedItems, (i2) => i2.element);
      privateStore.setState("renderedItems", sortedItems);
      collection.setState("renderedItems", sortedItems);
    };
    setup(collection, () => init(privateStore));
    setup(privateStore, () => {
      return batch(privateStore, ["items"], (state) => {
        collection.setState("items", state.items);
      });
    });
    setup(privateStore, () => {
      return batch(privateStore, ["renderedItems"], (state) => {
        let firstRun = true;
        let raf2 = requestAnimationFrame(() => {
          const { renderedItems } = collection.getState();
          if (state.renderedItems === renderedItems) return;
          sortItems(state.renderedItems);
        });
        if (typeof IntersectionObserver !== "function") {
          return () => cancelAnimationFrame(raf2);
        }
        const ioCallback = () => {
          if (firstRun) {
            firstRun = false;
            return;
          }
          cancelAnimationFrame(raf2);
          raf2 = requestAnimationFrame(() => sortItems(state.renderedItems));
        };
        const root = getCommonParent(state.renderedItems);
        const observer = new IntersectionObserver(ioCallback, { root });
        for (const item of state.renderedItems) {
          if (!item.element) continue;
          observer.observe(item.element);
        }
        return () => {
          cancelAnimationFrame(raf2);
          observer.disconnect();
        };
      });
    });
    const mergeItem = (item, setItems, canDeleteFromMap = false) => {
      let prevItem;
      setItems((items2) => {
        const index = items2.findIndex(({ id }) => id === item.id);
        const nextItems = items2.slice();
        if (index !== -1) {
          prevItem = items2[index];
          const nextItem = { ...prevItem, ...item };
          nextItems[index] = nextItem;
          itemsMap.set(item.id, nextItem);
        } else {
          nextItems.push(item);
          itemsMap.set(item.id, item);
        }
        return nextItems;
      });
      const unmergeItem = () => {
        setItems((items2) => {
          if (!prevItem) {
            if (canDeleteFromMap) {
              itemsMap.delete(item.id);
            }
            return items2.filter(({ id }) => id !== item.id);
          }
          const index = items2.findIndex(({ id }) => id === item.id);
          if (index === -1) return items2;
          const nextItems = items2.slice();
          nextItems[index] = prevItem;
          itemsMap.set(item.id, prevItem);
          return nextItems;
        });
      };
      return unmergeItem;
    };
    const registerItem = (item) => mergeItem(
      item,
      (getItems) => privateStore.setState("items", getItems),
      true
    );
    return {
      ...collection,
      registerItem,
      renderItem: (item) => chain(
        registerItem(item),
        mergeItem(
          item,
          (getItems) => privateStore.setState("renderedItems", getItems)
        )
      ),
      item: (id) => {
        if (!id) return null;
        let item = itemsMap.get(id);
        if (!item) {
          const { items: items2 } = privateStore.getState();
          item = items2.find((item2) => item2.id === id);
          if (item) {
            itemsMap.set(id, item);
          }
        }
        return item || null;
      },
      // @ts-expect-error Internal
      __unstablePrivateStore: privateStore
    };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/GVAFFF2B.js
  function useCollectionStoreProps(store2, update4, props) {
    useUpdateEffect(update4, [props.store]);
    useStoreProps(store2, props, "items", "setItems");
    return store2;
  }

  // node_modules/@ariakit/core/esm/__chunks/RVTIKFRL.js
  var NULL_ITEM = { id: null };
  function findFirstEnabledItem2(items, excludeId) {
    return items.find((item) => {
      if (excludeId) {
        return !item.disabled && item.id !== excludeId;
      }
      return !item.disabled;
    });
  }
  function getEnabledItems(items, excludeId) {
    return items.filter((item) => {
      if (excludeId) {
        return !item.disabled && item.id !== excludeId;
      }
      return !item.disabled;
    });
  }
  function getItemsInRow(items, rowId) {
    return items.filter((item) => item.rowId === rowId);
  }
  function flipItems(items, activeId, shouldInsertNullItem = false) {
    const index = items.findIndex((item) => item.id === activeId);
    return [
      ...items.slice(index + 1),
      ...shouldInsertNullItem ? [NULL_ITEM] : [],
      ...items.slice(0, index)
    ];
  }
  function groupItemsByRows2(items) {
    const rows = [];
    for (const item of items) {
      const row = rows.find((currentRow) => {
        var _a;
        return ((_a = currentRow[0]) == null ? void 0 : _a.rowId) === item.rowId;
      });
      if (row) {
        row.push(item);
      } else {
        rows.push([item]);
      }
    }
    return rows;
  }
  function getMaxRowLength(array) {
    let maxLength = 0;
    for (const { length } of array) {
      if (length > maxLength) {
        maxLength = length;
      }
    }
    return maxLength;
  }
  function createEmptyItem(rowId) {
    return {
      id: "__EMPTY_ITEM__",
      disabled: true,
      rowId
    };
  }
  function normalizeRows(rows, activeId, focusShift) {
    const maxLength = getMaxRowLength(rows);
    for (const row of rows) {
      for (let i2 = 0; i2 < maxLength; i2 += 1) {
        const item = row[i2];
        if (!item || focusShift && item.disabled) {
          const isFirst = i2 === 0;
          const previousItem = isFirst && focusShift ? findFirstEnabledItem2(row) : row[i2 - 1];
          row[i2] = previousItem && activeId !== previousItem.id && focusShift ? previousItem : createEmptyItem(previousItem == null ? void 0 : previousItem.rowId);
        }
      }
    }
    return rows;
  }
  function verticalizeItems(items) {
    const rows = groupItemsByRows2(items);
    const maxLength = getMaxRowLength(rows);
    const verticalized = [];
    for (let i2 = 0; i2 < maxLength; i2 += 1) {
      for (const row of rows) {
        const item = row[i2];
        if (item) {
          verticalized.push({
            ...item,
            // If there's no rowId, it means that it's not a grid composite, but
            // a single row instead. So, instead of verticalizing it, that is,
            // assigning a different rowId based on the column index, we keep it
            // undefined so they will be part of the same row. This is useful
            // when using up/down on one-dimensional composites.
            rowId: item.rowId ? `${i2}` : void 0
          });
        }
      }
    }
    return verticalized;
  }
  function createCompositeStore(props = {}) {
    var _a;
    const syncState = (_a = props.store) == null ? void 0 : _a.getState();
    const collection = createCollectionStore(props);
    const activeId = defaultValue(
      props.activeId,
      syncState == null ? void 0 : syncState.activeId,
      props.defaultActiveId
    );
    const initialState = {
      ...collection.getState(),
      id: defaultValue(
        props.id,
        syncState == null ? void 0 : syncState.id,
        `id-${Math.random().toString(36).slice(2, 8)}`
      ),
      activeId,
      baseElement: defaultValue(syncState == null ? void 0 : syncState.baseElement, null),
      includesBaseElement: defaultValue(
        props.includesBaseElement,
        syncState == null ? void 0 : syncState.includesBaseElement,
        activeId === null
      ),
      moves: defaultValue(syncState == null ? void 0 : syncState.moves, 0),
      orientation: defaultValue(
        props.orientation,
        syncState == null ? void 0 : syncState.orientation,
        "both"
      ),
      rtl: defaultValue(props.rtl, syncState == null ? void 0 : syncState.rtl, false),
      virtualFocus: defaultValue(
        props.virtualFocus,
        syncState == null ? void 0 : syncState.virtualFocus,
        false
      ),
      focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, false),
      focusWrap: defaultValue(props.focusWrap, syncState == null ? void 0 : syncState.focusWrap, false),
      focusShift: defaultValue(props.focusShift, syncState == null ? void 0 : syncState.focusShift, false)
    };
    const composite = createStore(initialState, collection, props.store);
    setup(
      composite,
      () => sync2(composite, ["renderedItems", "activeId"], (state) => {
        composite.setState("activeId", (activeId2) => {
          var _a2;
          if (activeId2 !== void 0) return activeId2;
          return (_a2 = findFirstEnabledItem2(state.renderedItems)) == null ? void 0 : _a2.id;
        });
      })
    );
    const getNextId = (direction = "next", options = {}) => {
      var _a2, _b;
      const defaultState = composite.getState();
      const {
        skip = 0,
        activeId: activeId2 = defaultState.activeId,
        focusShift = defaultState.focusShift,
        focusLoop = defaultState.focusLoop,
        focusWrap = defaultState.focusWrap,
        includesBaseElement = defaultState.includesBaseElement,
        renderedItems = defaultState.renderedItems,
        rtl = defaultState.rtl
      } = options;
      const isVerticalDirection = direction === "up" || direction === "down";
      const isNextDirection = direction === "next" || direction === "down";
      const canReverse = isNextDirection ? rtl && !isVerticalDirection : !rtl || isVerticalDirection;
      const canShift = focusShift && !skip;
      let items = !isVerticalDirection ? renderedItems : flatten2DArray(
        normalizeRows(groupItemsByRows2(renderedItems), activeId2, canShift)
      );
      items = canReverse ? reverseArray(items) : items;
      items = isVerticalDirection ? verticalizeItems(items) : items;
      if (activeId2 == null) {
        return (_a2 = findFirstEnabledItem2(items)) == null ? void 0 : _a2.id;
      }
      const activeItem = items.find((item) => item.id === activeId2);
      if (!activeItem) {
        return (_b = findFirstEnabledItem2(items)) == null ? void 0 : _b.id;
      }
      const isGrid2 = items.some((item) => item.rowId);
      const activeIndex = items.indexOf(activeItem);
      const nextItems = items.slice(activeIndex + 1);
      const nextItemsInRow = getItemsInRow(nextItems, activeItem.rowId);
      if (skip) {
        const nextEnabledItemsInRow = getEnabledItems(nextItemsInRow, activeId2);
        const nextItem2 = nextEnabledItemsInRow.slice(skip)[0] || // If we can't find an item, just return the last one.
        nextEnabledItemsInRow[nextEnabledItemsInRow.length - 1];
        return nextItem2 == null ? void 0 : nextItem2.id;
      }
      const canLoop = focusLoop && (isVerticalDirection ? focusLoop !== "horizontal" : focusLoop !== "vertical");
      const canWrap = isGrid2 && focusWrap && (isVerticalDirection ? focusWrap !== "horizontal" : focusWrap !== "vertical");
      const hasNullItem = isNextDirection ? (!isGrid2 || isVerticalDirection) && canLoop && includesBaseElement : isVerticalDirection ? includesBaseElement : false;
      if (canLoop) {
        const loopItems = canWrap && !hasNullItem ? items : getItemsInRow(items, activeItem.rowId);
        const sortedItems = flipItems(loopItems, activeId2, hasNullItem);
        const nextItem2 = findFirstEnabledItem2(sortedItems, activeId2);
        return nextItem2 == null ? void 0 : nextItem2.id;
      }
      if (canWrap) {
        const nextItem2 = findFirstEnabledItem2(
          // We can use nextItems, which contains all the next items, including
          // items from other rows, to wrap between rows. However, if there is a
          // null item (the composite container), we'll only use the next items in
          // the row. So moving next from the last item will focus on the
          // composite container. On grid composites, horizontal navigation never
          // focuses on the composite container, only vertical.
          hasNullItem ? nextItemsInRow : nextItems,
          activeId2
        );
        const nextId2 = hasNullItem ? (nextItem2 == null ? void 0 : nextItem2.id) || null : nextItem2 == null ? void 0 : nextItem2.id;
        return nextId2;
      }
      const nextItem = findFirstEnabledItem2(nextItemsInRow, activeId2);
      if (!nextItem && hasNullItem) {
        return null;
      }
      return nextItem == null ? void 0 : nextItem.id;
    };
    return {
      ...collection,
      ...composite,
      setBaseElement: (element) => composite.setState("baseElement", element),
      setActiveId: (id) => composite.setState("activeId", id),
      move: (id) => {
        if (id === void 0) return;
        composite.setState("activeId", id);
        composite.setState("moves", (moves) => moves + 1);
      },
      first: () => {
        var _a2;
        return (_a2 = findFirstEnabledItem2(composite.getState().renderedItems)) == null ? void 0 : _a2.id;
      },
      last: () => {
        var _a2;
        return (_a2 = findFirstEnabledItem2(reverseArray(composite.getState().renderedItems))) == null ? void 0 : _a2.id;
      },
      next: (options) => {
        if (options !== void 0 && typeof options === "number") {
          options = { skip: options };
        }
        return getNextId("next", options);
      },
      previous: (options) => {
        if (options !== void 0 && typeof options === "number") {
          options = { skip: options };
        }
        return getNextId("previous", options);
      },
      down: (options) => {
        if (options !== void 0 && typeof options === "number") {
          options = { skip: options };
        }
        return getNextId("down", options);
      },
      up: (options) => {
        if (options !== void 0 && typeof options === "number") {
          options = { skip: options };
        }
        return getNextId("up", options);
      }
    };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/IQYAUKXT.js
  function useCompositeStoreOptions(props) {
    const id = useId5(props.id);
    return { id, ...props };
  }
  function useCompositeStoreProps(store2, update4, props) {
    store2 = useCollectionStoreProps(store2, update4, props);
    useStoreProps(store2, props, "activeId", "setActiveId");
    useStoreProps(store2, props, "includesBaseElement");
    useStoreProps(store2, props, "virtualFocus");
    useStoreProps(store2, props, "orientation");
    useStoreProps(store2, props, "rtl");
    useStoreProps(store2, props, "focusLoop");
    useStoreProps(store2, props, "focusWrap");
    useStoreProps(store2, props, "focusShift");
    return store2;
  }

  // node_modules/@ariakit/react-core/esm/__chunks/CVCFNOHX.js
  var import_react19 = __toESM(require_react(), 1);
  var ComboboxListRoleContext = (0, import_react19.createContext)(
    void 0
  );
  var ctx7 = createStoreContext(
    [PopoverContextProvider, CompositeContextProvider],
    [PopoverScopedContextProvider, CompositeScopedContextProvider]
  );
  var useComboboxContext = ctx7.useContext;
  var useComboboxScopedContext = ctx7.useScopedContext;
  var useComboboxProviderContext = ctx7.useProviderContext;
  var ComboboxContextProvider = ctx7.ContextProvider;
  var ComboboxScopedContextProvider = ctx7.ScopedContextProvider;
  var ComboboxItemValueContext = (0, import_react19.createContext)(
    void 0
  );
  var ComboboxItemCheckedContext = (0, import_react19.createContext)(false);

  // node_modules/@ariakit/core/esm/__chunks/KMAUV3TY.js
  function createDialogStore(props = {}) {
    return createDisclosureStore(props);
  }

  // node_modules/@ariakit/react-core/esm/__chunks/4NYSH4UO.js
  function useDialogStoreProps(store2, update4, props) {
    return useDisclosureStoreProps(store2, update4, props);
  }

  // node_modules/@ariakit/core/esm/__chunks/BFGNM53A.js
  function createPopoverStore({
    popover: otherPopover,
    ...props
  } = {}) {
    const store2 = mergeStore(
      props.store,
      omit2(otherPopover, [
        "arrowElement",
        "anchorElement",
        "contentElement",
        "popoverElement",
        "disclosureElement"
      ])
    );
    throwOnConflictingProps(props, store2);
    const syncState = store2 == null ? void 0 : store2.getState();
    const dialog = createDialogStore({ ...props, store: store2 });
    const placement = defaultValue(
      props.placement,
      syncState == null ? void 0 : syncState.placement,
      "bottom"
    );
    const initialState = {
      ...dialog.getState(),
      placement,
      currentPlacement: placement,
      anchorElement: defaultValue(syncState == null ? void 0 : syncState.anchorElement, null),
      popoverElement: defaultValue(syncState == null ? void 0 : syncState.popoverElement, null),
      arrowElement: defaultValue(syncState == null ? void 0 : syncState.arrowElement, null),
      rendered: /* @__PURE__ */ Symbol("rendered")
    };
    const popover = createStore(initialState, dialog, store2);
    return {
      ...dialog,
      ...popover,
      setAnchorElement: (element) => popover.setState("anchorElement", element),
      setPopoverElement: (element) => popover.setState("popoverElement", element),
      setArrowElement: (element) => popover.setState("arrowElement", element),
      render: () => popover.setState("rendered", /* @__PURE__ */ Symbol("rendered"))
    };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/B6FLPFJM.js
  function usePopoverStoreProps(store2, update4, props) {
    useUpdateEffect(update4, [props.popover]);
    useStoreProps(store2, props, "placement");
    return useDialogStoreProps(store2, update4, props);
  }

  // node_modules/@ariakit/react-core/esm/__chunks/4POTBZ2J.js
  var TagName7 = "div";
  var usePopoverAnchor = createHook(
    function usePopoverAnchor2({ store: store2, ...props }) {
      const context = usePopoverProviderContext();
      store2 = store2 || context;
      props = {
        ...props,
        ref: useMergeRefs(store2 == null ? void 0 : store2.setAnchorElement, props.ref)
      };
      return props;
    }
  );
  var PopoverAnchor = forwardRef22(function PopoverAnchor2(props) {
    const htmlProps = usePopoverAnchor(props);
    return createElement5(TagName7, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/X6LNAU2F.js
  var import_react20 = __toESM(require_react(), 1);
  var TagName8 = "div";
  function getMouseDestination(event) {
    const relatedTarget = event.relatedTarget;
    if ((relatedTarget == null ? void 0 : relatedTarget.nodeType) === Node.ELEMENT_NODE) {
      return relatedTarget;
    }
    return null;
  }
  function hoveringInside(event) {
    const nextElement = getMouseDestination(event);
    if (!nextElement) return false;
    return contains(event.currentTarget, nextElement);
  }
  var symbol2 = /* @__PURE__ */ Symbol("composite-hover");
  function movingToAnotherItem(event) {
    let dest = getMouseDestination(event);
    if (!dest) return false;
    do {
      if (hasOwnProperty(dest, symbol2) && dest[symbol2]) return true;
      dest = dest.parentElement;
    } while (dest);
    return false;
  }
  var useCompositeHover = createHook(
    function useCompositeHover2({
      store: store2,
      focusOnHover = true,
      blurOnHoverEnd = !!focusOnHover,
      ...props
    }) {
      const context = useCompositeContext();
      store2 = store2 || context;
      invariant(
        store2,
        "CompositeHover must be wrapped in a Composite component."
      );
      const isMouseMoving = useIsMouseMoving();
      const onMouseMoveProp = props.onMouseMove;
      const focusOnHoverProp = useBooleanEvent(focusOnHover);
      const onMouseMove = useEvent((event) => {
        onMouseMoveProp == null ? void 0 : onMouseMoveProp(event);
        if (event.defaultPrevented) return;
        if (!isMouseMoving()) return;
        if (!focusOnHoverProp(event)) return;
        if (!hasFocusWithin(event.currentTarget)) {
          const baseElement = store2 == null ? void 0 : store2.getState().baseElement;
          if (baseElement && !hasFocus(baseElement)) {
            baseElement.focus();
          }
        }
        store2 == null ? void 0 : store2.setActiveId(event.currentTarget.id);
      });
      const onMouseLeaveProp = props.onMouseLeave;
      const blurOnHoverEndProp = useBooleanEvent(blurOnHoverEnd);
      const onMouseLeave = useEvent((event) => {
        var _a;
        onMouseLeaveProp == null ? void 0 : onMouseLeaveProp(event);
        if (event.defaultPrevented) return;
        if (!isMouseMoving()) return;
        if (hoveringInside(event)) return;
        if (movingToAnotherItem(event)) return;
        if (!focusOnHoverProp(event)) return;
        if (!blurOnHoverEndProp(event)) return;
        store2 == null ? void 0 : store2.setActiveId(null);
        (_a = store2 == null ? void 0 : store2.getState().baseElement) == null ? void 0 : _a.focus();
      });
      const ref = (0, import_react20.useCallback)((element) => {
        if (!element) return;
        element[symbol2] = true;
      }, []);
      props = {
        ...props,
        ref: useMergeRefs(ref, props.ref),
        onMouseMove,
        onMouseLeave
      };
      return removeUndefinedValues(props);
    }
  );
  var CompositeHover = memo22(
    forwardRef22(function CompositeHover2(props) {
      const htmlProps = useCompositeHover(props);
      return createElement5(TagName8, htmlProps);
    })
  );

  // node_modules/@ariakit/react-core/esm/combobox/combobox.js
  var import_react21 = __toESM(require_react(), 1);
  var TagName9 = "input";
  function isFirstItemAutoSelected(items, activeValue, autoSelect) {
    if (!autoSelect) return false;
    const firstItem = items.find((item) => !item.disabled && item.value);
    return (firstItem == null ? void 0 : firstItem.value) === activeValue;
  }
  function hasCompletionString(value, activeValue) {
    if (!activeValue) return false;
    if (value == null) return false;
    value = normalizeString2(value);
    return activeValue.length > value.length && activeValue.toLowerCase().indexOf(value.toLowerCase()) === 0;
  }
  function isInputEvent(event) {
    return event.type === "input";
  }
  function isAriaAutoCompleteValue(value) {
    return value === "inline" || value === "list" || value === "both" || value === "none";
  }
  function getDefaultAutoSelectId(items) {
    const item = items.find((item2) => {
      var _a;
      if (item2.disabled) return false;
      return ((_a = item2.element) == null ? void 0 : _a.getAttribute("role")) !== "tab";
    });
    return item == null ? void 0 : item.id;
  }
  var useCombobox = createHook(
    function useCombobox2({
      store: store2,
      focusable = true,
      autoSelect: autoSelectProp = false,
      getAutoSelectId,
      setValueOnChange,
      showMinLength = 0,
      showOnChange,
      showOnMouseDown,
      showOnClick = showOnMouseDown,
      showOnKeyDown,
      showOnKeyPress = showOnKeyDown,
      blurActiveItemOnClick,
      setValueOnClick = true,
      moveOnKeyPress = true,
      autoComplete = "list",
      ...props
    }) {
      const context = useComboboxProviderContext();
      store2 = store2 || context;
      invariant(
        store2,
        "Combobox must receive a `store` prop or be wrapped in a ComboboxProvider component."
      );
      const ref = (0, import_react21.useRef)(null);
      const [valueUpdated, forceValueUpdate] = useForceUpdate2();
      const canAutoSelectRef = (0, import_react21.useRef)(false);
      const composingRef = (0, import_react21.useRef)(false);
      const autoSelect = store2.useState(
        (state) => state.virtualFocus && autoSelectProp
      );
      const inline = autoComplete === "inline" || autoComplete === "both";
      const [canInline, setCanInline] = (0, import_react21.useState)(inline);
      useUpdateLayoutEffect(() => {
        if (!inline) return;
        setCanInline(true);
      }, [inline]);
      const storeValue = store2.useState("value");
      const prevSelectedValueRef = (0, import_react21.useRef)(void 0);
      (0, import_react21.useEffect)(() => {
        return sync2(store2, ["selectedValue", "activeId"], (_, prev) => {
          prevSelectedValueRef.current = prev.selectedValue;
        });
      }, []);
      const inlineActiveValue = store2.useState((state) => {
        var _a;
        if (!inline) return;
        if (!canInline) return;
        if (state.activeValue && Array.isArray(state.selectedValue)) {
          if (state.selectedValue.includes(state.activeValue)) return;
          if ((_a = prevSelectedValueRef.current) == null ? void 0 : _a.includes(state.activeValue)) return;
        }
        return state.activeValue;
      });
      const items = store2.useState("renderedItems");
      const open = store2.useState("open");
      const contentElement = store2.useState("contentElement");
      const value = (0, import_react21.useMemo)(() => {
        if (!inline) return storeValue;
        if (!canInline) return storeValue;
        const firstItemAutoSelected = isFirstItemAutoSelected(
          items,
          inlineActiveValue,
          autoSelect
        );
        if (firstItemAutoSelected) {
          if (hasCompletionString(storeValue, inlineActiveValue)) {
            const slice = (inlineActiveValue == null ? void 0 : inlineActiveValue.slice(storeValue.length)) || "";
            return storeValue + slice;
          }
          return storeValue;
        }
        return inlineActiveValue || storeValue;
      }, [inline, canInline, items, inlineActiveValue, autoSelect, storeValue]);
      (0, import_react21.useEffect)(() => {
        const element = ref.current;
        if (!element) return;
        const onCompositeItemMove = () => setCanInline(true);
        element.addEventListener("combobox-item-move", onCompositeItemMove);
        return () => {
          element.removeEventListener("combobox-item-move", onCompositeItemMove);
        };
      }, []);
      (0, import_react21.useEffect)(() => {
        if (!inline) return;
        if (!canInline) return;
        if (!inlineActiveValue) return;
        const firstItemAutoSelected = isFirstItemAutoSelected(
          items,
          inlineActiveValue,
          autoSelect
        );
        if (!firstItemAutoSelected) return;
        if (!hasCompletionString(storeValue, inlineActiveValue)) return;
        let cleanup = noop3;
        queueMicrotask(() => {
          const element = ref.current;
          if (!element) return;
          const { start: prevStart, end: prevEnd } = getTextboxSelection(element);
          const nextStart = storeValue.length;
          const nextEnd = inlineActiveValue.length;
          setSelectionRange(element, nextStart, nextEnd);
          cleanup = () => {
            if (!hasFocus(element)) return;
            const { start: start2, end } = getTextboxSelection(element);
            if (start2 !== nextStart) return;
            if (end !== nextEnd) return;
            setSelectionRange(element, prevStart, prevEnd);
          };
        });
        return () => cleanup();
      }, [
        valueUpdated,
        inline,
        canInline,
        inlineActiveValue,
        items,
        autoSelect,
        storeValue
      ]);
      const scrollingElementRef = (0, import_react21.useRef)(null);
      const getAutoSelectIdProp = useEvent(getAutoSelectId);
      const autoSelectIdRef = (0, import_react21.useRef)(null);
      (0, import_react21.useEffect)(() => {
        if (!open) return;
        if (!contentElement) return;
        const scrollingElement = getScrollingElement(contentElement);
        if (!scrollingElement) return;
        scrollingElementRef.current = scrollingElement;
        const onUserScroll = () => {
          canAutoSelectRef.current = false;
        };
        const onScroll = () => {
          if (!store2) return;
          if (!canAutoSelectRef.current) return;
          const { activeId } = store2.getState();
          if (activeId === null) return;
          if (activeId === autoSelectIdRef.current) return;
          canAutoSelectRef.current = false;
        };
        const options = { passive: true, capture: true };
        scrollingElement.addEventListener("wheel", onUserScroll, options);
        scrollingElement.addEventListener("touchmove", onUserScroll, options);
        scrollingElement.addEventListener("scroll", onScroll, options);
        return () => {
          scrollingElement.removeEventListener("wheel", onUserScroll, true);
          scrollingElement.removeEventListener("touchmove", onUserScroll, true);
          scrollingElement.removeEventListener("scroll", onScroll, true);
        };
      }, [open, contentElement, store2]);
      useSafeLayoutEffect(() => {
        if (!storeValue) return;
        if (composingRef.current) return;
        canAutoSelectRef.current = true;
      }, [storeValue]);
      useSafeLayoutEffect(() => {
        if (autoSelect !== "always" && open) return;
        canAutoSelectRef.current = open;
      }, [autoSelect, open]);
      const resetValueOnSelect = store2.useState("resetValueOnSelect");
      useUpdateEffect(() => {
        var _a, _b;
        const canAutoSelect = canAutoSelectRef.current;
        if (!store2) return;
        if (!open) return;
        if (!canAutoSelect && !resetValueOnSelect) return;
        const { baseElement, contentElement: contentElement2, activeId } = store2.getState();
        if (baseElement && !hasFocus(baseElement)) return;
        if (contentElement2 == null ? void 0 : contentElement2.hasAttribute("data-placing")) {
          const observer = new MutationObserver(forceValueUpdate);
          observer.observe(contentElement2, { attributeFilter: ["data-placing"] });
          return () => observer.disconnect();
        }
        if (autoSelect && canAutoSelect) {
          const userAutoSelectId = getAutoSelectIdProp(items);
          const autoSelectId = userAutoSelectId !== void 0 ? userAutoSelectId : (_a = getDefaultAutoSelectId(items)) != null ? _a : store2.first();
          autoSelectIdRef.current = autoSelectId;
          store2.move(autoSelectId != null ? autoSelectId : null);
        } else {
          const element = (_b = store2.item(activeId || store2.first())) == null ? void 0 : _b.element;
          if (element && "scrollIntoView" in element) {
            element.scrollIntoView({ block: "nearest", inline: "nearest" });
          }
        }
        return;
      }, [
        store2,
        open,
        valueUpdated,
        storeValue,
        autoSelect,
        resetValueOnSelect,
        getAutoSelectIdProp,
        items
      ]);
      (0, import_react21.useEffect)(() => {
        if (!inline) return;
        const combobox = ref.current;
        if (!combobox) return;
        const elements2 = [combobox, contentElement].filter(
          (value2) => !!value2
        );
        const onBlur2 = (event) => {
          if (elements2.every((el) => isFocusEventOutside(event, el))) {
            store2 == null ? void 0 : store2.setValue(value);
          }
        };
        for (const element of elements2) {
          element.addEventListener("focusout", onBlur2);
        }
        return () => {
          for (const element of elements2) {
            element.removeEventListener("focusout", onBlur2);
          }
        };
      }, [inline, contentElement, store2, value]);
      const canShow = (event) => {
        const currentTarget = event.currentTarget;
        return currentTarget.value.length >= showMinLength;
      };
      const onChangeProp = props.onChange;
      const showOnChangeProp = useBooleanEvent(showOnChange != null ? showOnChange : canShow);
      const setValueOnChangeProp = useBooleanEvent(
        // If the combobox is combined with tags, the value will be set by the tag
        // input component.
        setValueOnChange != null ? setValueOnChange : !store2.tag
      );
      const onChange = useEvent((event) => {
        onChangeProp == null ? void 0 : onChangeProp(event);
        if (event.defaultPrevented) return;
        if (!store2) return;
        const currentTarget = event.currentTarget;
        const { value: value2, selectionStart, selectionEnd } = currentTarget;
        const nativeEvent = event.nativeEvent;
        canAutoSelectRef.current = true;
        if (isInputEvent(nativeEvent)) {
          if (nativeEvent.isComposing) {
            canAutoSelectRef.current = false;
            composingRef.current = true;
          }
          if (inline) {
            const textInserted = nativeEvent.inputType === "insertText" || nativeEvent.inputType === "insertCompositionText";
            const caretAtEnd = selectionStart === value2.length;
            setCanInline(textInserted && caretAtEnd);
          }
        }
        if (setValueOnChangeProp(event)) {
          const isSameValue = value2 === store2.getState().value;
          store2.setValue(value2);
          queueMicrotask(() => {
            setSelectionRange(currentTarget, selectionStart, selectionEnd);
          });
          if (inline && autoSelect && isSameValue) {
            forceValueUpdate();
          }
        }
        if (showOnChangeProp(event)) {
          store2.show();
        }
        if (!autoSelect || !canAutoSelectRef.current) {
          store2.setActiveId(null);
        }
      });
      const onCompositionEndProp = props.onCompositionEnd;
      const onCompositionEnd = useEvent((event) => {
        canAutoSelectRef.current = true;
        composingRef.current = false;
        onCompositionEndProp == null ? void 0 : onCompositionEndProp(event);
        if (event.defaultPrevented) return;
        if (!autoSelect) return;
        forceValueUpdate();
      });
      const onMouseDownProp = props.onMouseDown;
      const blurActiveItemOnClickProp = useBooleanEvent(
        blurActiveItemOnClick != null ? blurActiveItemOnClick : (() => !!(store2 == null ? void 0 : store2.getState().includesBaseElement))
      );
      const setValueOnClickProp = useBooleanEvent(setValueOnClick);
      const showOnClickProp = useBooleanEvent(showOnClick != null ? showOnClick : canShow);
      const onMouseDown = useEvent((event) => {
        onMouseDownProp == null ? void 0 : onMouseDownProp(event);
        if (event.defaultPrevented) return;
        if (event.button) return;
        if (event.ctrlKey) return;
        if (!store2) return;
        if (blurActiveItemOnClickProp(event)) {
          store2.setActiveId(null);
        }
        if (setValueOnClickProp(event)) {
          store2.setValue(value);
        }
        if (showOnClickProp(event)) {
          queueBeforeEvent(event.currentTarget, "mouseup", store2.show);
        }
      });
      const onKeyDownProp = props.onKeyDown;
      const showOnKeyPressProp = useBooleanEvent(showOnKeyPress != null ? showOnKeyPress : canShow);
      const onKeyDown = useEvent((event) => {
        onKeyDownProp == null ? void 0 : onKeyDownProp(event);
        if (!event.repeat) {
          canAutoSelectRef.current = false;
        }
        if (event.defaultPrevented) return;
        if (event.ctrlKey) return;
        if (event.altKey) return;
        if (event.shiftKey) return;
        if (event.metaKey) return;
        if (!store2) return;
        const { open: open2 } = store2.getState();
        if (open2) return;
        if (event.key === "ArrowUp" || event.key === "ArrowDown") {
          if (showOnKeyPressProp(event)) {
            event.preventDefault();
            store2.show();
          }
        }
      });
      const onBlurProp = props.onBlur;
      const onBlur = useEvent((event) => {
        canAutoSelectRef.current = false;
        onBlurProp == null ? void 0 : onBlurProp(event);
        if (event.defaultPrevented) return;
      });
      const id = useId5(props.id);
      const ariaAutoComplete = isAriaAutoCompleteValue(autoComplete) ? autoComplete : void 0;
      const isActiveItem = store2.useState((state) => state.activeId === null);
      props = {
        id,
        role: "combobox",
        "aria-autocomplete": ariaAutoComplete,
        "aria-haspopup": getPopupRole(contentElement, "listbox"),
        "aria-expanded": open,
        "aria-controls": contentElement == null ? void 0 : contentElement.id,
        "data-active-item": isActiveItem || void 0,
        value,
        ...props,
        ref: useMergeRefs(ref, props.ref),
        onChange,
        onCompositionEnd,
        onMouseDown,
        onKeyDown,
        onBlur
      };
      props = useComposite({
        store: store2,
        focusable,
        ...props,
        // Enable inline autocomplete when the user moves from the combobox input
        // to an item.
        moveOnKeyPress: (event) => {
          if (isFalsyBooleanCallback(moveOnKeyPress, event)) return false;
          if (inline) setCanInline(true);
          return true;
        }
      });
      props = usePopoverAnchor({ store: store2, ...props });
      return { autoComplete: "off", ...props };
    }
  );
  var Combobox = forwardRef22(function Combobox2(props) {
    const htmlProps = useCombobox(props);
    return createElement5(TagName9, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/IBXZ2LQC.js
  var import_react22 = __toESM(require_react(), 1);
  var import_jsx_runtime210 = __toESM(require_jsx_runtime(), 1);
  var TagName10 = "div";
  function isSelected(storeValue, itemValue) {
    if (itemValue == null) return;
    if (storeValue == null) return false;
    if (Array.isArray(storeValue)) {
      return storeValue.includes(itemValue);
    }
    return storeValue === itemValue;
  }
  function getItemRole(popupRole) {
    var _a;
    const itemRoleByPopupRole = {
      menu: "menuitem",
      listbox: "option",
      tree: "treeitem"
    };
    const key = popupRole;
    return (_a = itemRoleByPopupRole[key]) != null ? _a : "option";
  }
  var useComboboxItem = createHook(
    function useComboboxItem2({
      store: store2,
      value,
      hideOnClick,
      setValueOnClick,
      selectValueOnClick = true,
      resetValueOnSelect,
      focusOnHover = false,
      moveOnKeyPress = true,
      getItem: getItemProp,
      ...props
    }) {
      var _a;
      const context = useComboboxScopedContext();
      store2 = store2 || context;
      invariant(
        store2,
        "ComboboxItem must be wrapped in a ComboboxList or ComboboxPopover component."
      );
      const { resetValueOnSelectState, multiSelectable, selected } = useStoreStateObject(store2, {
        resetValueOnSelectState: "resetValueOnSelect",
        multiSelectable(state) {
          return Array.isArray(state.selectedValue);
        },
        selected(state) {
          return isSelected(state.selectedValue, value);
        }
      });
      const getItem = (0, import_react22.useCallback)(
        (item) => {
          const nextItem = { ...item, value };
          if (getItemProp) {
            return getItemProp(nextItem);
          }
          return nextItem;
        },
        [value, getItemProp]
      );
      setValueOnClick = setValueOnClick != null ? setValueOnClick : !multiSelectable;
      hideOnClick = hideOnClick != null ? hideOnClick : value != null && !multiSelectable;
      const onClickProp = props.onClick;
      const setValueOnClickProp = useBooleanEvent(setValueOnClick);
      const selectValueOnClickProp = useBooleanEvent(selectValueOnClick);
      const resetValueOnSelectProp = useBooleanEvent(
        (_a = resetValueOnSelect != null ? resetValueOnSelect : resetValueOnSelectState) != null ? _a : multiSelectable
      );
      const hideOnClickProp = useBooleanEvent(hideOnClick);
      const onClick = useEvent((event) => {
        onClickProp == null ? void 0 : onClickProp(event);
        if (event.defaultPrevented) return;
        if (isDownloading(event)) return;
        if (isOpeningInNewTab(event)) return;
        if (value != null) {
          if (selectValueOnClickProp(event)) {
            if (resetValueOnSelectProp(event)) {
              store2 == null ? void 0 : store2.resetValue();
            }
            store2 == null ? void 0 : store2.setSelectedValue((prevValue) => {
              if (!Array.isArray(prevValue)) return value;
              if (prevValue.includes(value)) {
                return prevValue.filter((v2) => v2 !== value);
              }
              return [...prevValue, value];
            });
          }
          if (setValueOnClickProp(event)) {
            store2 == null ? void 0 : store2.setValue(value);
          }
        }
        if (hideOnClickProp(event)) {
          store2 == null ? void 0 : store2.hide();
        }
      });
      const onKeyDownProp = props.onKeyDown;
      const onKeyDown = useEvent((event) => {
        onKeyDownProp == null ? void 0 : onKeyDownProp(event);
        if (event.defaultPrevented) return;
        const baseElement = store2 == null ? void 0 : store2.getState().baseElement;
        if (!baseElement) return;
        if (hasFocus(baseElement)) return;
        const printable = event.key.length === 1;
        if (printable || event.key === "Backspace" || event.key === "Delete") {
          queueMicrotask(() => baseElement.focus());
          if (isTextField(baseElement)) {
            store2 == null ? void 0 : store2.setValue(baseElement.value);
          }
        }
      });
      if (multiSelectable && selected != null) {
        props = {
          "aria-selected": selected,
          ...props
        };
      }
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(ComboboxItemValueContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(ComboboxItemCheckedContext.Provider, { value: selected != null ? selected : false, children: element }) }),
        [value, selected]
      );
      const popupRole = (0, import_react22.useContext)(ComboboxListRoleContext);
      props = {
        role: getItemRole(popupRole),
        children: value,
        ...props,
        onClick,
        onKeyDown
      };
      const moveOnKeyPressProp = useBooleanEvent(moveOnKeyPress);
      props = useCompositeItem({
        store: store2,
        ...props,
        getItem,
        // Dispatch a custom event on the combobox input when moving to an item
        // with the keyboard so the Combobox component can enable inline
        // autocompletion.
        moveOnKeyPress: (event) => {
          if (!moveOnKeyPressProp(event)) return false;
          const moveEvent = new Event("combobox-item-move");
          const baseElement = store2 == null ? void 0 : store2.getState().baseElement;
          baseElement == null ? void 0 : baseElement.dispatchEvent(moveEvent);
          return true;
        }
      });
      props = useCompositeHover({ store: store2, focusOnHover, ...props });
      return props;
    }
  );
  var ComboboxItem = memo22(
    forwardRef22(function ComboboxItem2(props) {
      const htmlProps = useComboboxItem(props);
      return createElement5(TagName10, htmlProps);
    })
  );

  // node_modules/@ariakit/react-core/esm/combobox/combobox-item-value.js
  var import_react23 = __toESM(require_react(), 1);
  var import_jsx_runtime211 = __toESM(require_jsx_runtime(), 1);
  var TagName11 = "span";
  function normalizeValue(value) {
    return normalizeString2(value).toLowerCase();
  }
  function getOffsets(string, values) {
    const offsets = [];
    for (const value of values) {
      let pos = 0;
      const length = value.length;
      while (string.indexOf(value, pos) !== -1) {
        const index = string.indexOf(value, pos);
        if (index !== -1) {
          offsets.push([index, length]);
        }
        pos = index + 1;
      }
    }
    return offsets;
  }
  function filterOverlappingOffsets(offsets) {
    return offsets.filter(([offset, length], i2, arr) => {
      return !arr.some(
        ([o3, l2], j2) => j2 !== i2 && o3 <= offset && o3 + l2 >= offset + length
      );
    });
  }
  function sortOffsets(offsets) {
    return offsets.sort(([a2], [b2]) => a2 - b2);
  }
  function splitValue(itemValue, userValue) {
    if (!itemValue) return itemValue;
    if (!userValue) return itemValue;
    const userValues = toArray2(userValue).filter(Boolean).map(normalizeValue);
    const parts = [];
    const span = (value, autocomplete = false) => /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
      "span",
      {
        "data-autocomplete-value": autocomplete ? "" : void 0,
        "data-user-value": autocomplete ? void 0 : "",
        children: value
      },
      parts.length
    );
    const offsets = sortOffsets(
      filterOverlappingOffsets(
        // Convert userValues into a set to avoid duplicates
        getOffsets(normalizeValue(itemValue), new Set(userValues))
      )
    );
    if (!offsets.length) {
      parts.push(span(itemValue, true));
      return parts;
    }
    const [firstOffset] = offsets[0];
    const values = [
      itemValue.slice(0, firstOffset),
      ...offsets.flatMap(([offset, length], i2) => {
        var _a;
        const value = itemValue.slice(offset, offset + length);
        const nextOffset = (_a = offsets[i2 + 1]) == null ? void 0 : _a[0];
        const nextValue = itemValue.slice(offset + length, nextOffset);
        return [value, nextValue];
      })
    ];
    values.forEach((value, i2) => {
      if (!value) return;
      parts.push(span(value, i2 % 2 === 0));
    });
    return parts;
  }
  var useComboboxItemValue = createHook(function useComboboxItemValue2({ store: store2, value, userValue, ...props }) {
    const context = useComboboxScopedContext();
    store2 = store2 || context;
    const itemContext = (0, import_react23.useContext)(ComboboxItemValueContext);
    const itemValue = value != null ? value : itemContext;
    const inputValue = useStoreState(store2, (state) => userValue != null ? userValue : state == null ? void 0 : state.value);
    const children = (0, import_react23.useMemo)(() => {
      if (!itemValue) return;
      if (!inputValue) return itemValue;
      return splitValue(itemValue, inputValue);
    }, [itemValue, inputValue]);
    props = {
      children,
      ...props
    };
    return removeUndefinedValues(props);
  });
  var ComboboxItemValue = forwardRef22(function ComboboxItemValue2(props) {
    const htmlProps = useComboboxItemValue(props);
    return createElement5(TagName11, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/combobox/combobox-label.js
  var TagName12 = "label";
  var useComboboxLabel = createHook(
    function useComboboxLabel2({ store: store2, ...props }) {
      const context = useComboboxProviderContext();
      store2 = store2 || context;
      invariant(
        store2,
        "ComboboxLabel must receive a `store` prop or be wrapped in a ComboboxProvider component."
      );
      const comboboxId = store2.useState((state) => {
        var _a;
        return (_a = state.baseElement) == null ? void 0 : _a.id;
      });
      props = {
        htmlFor: comboboxId,
        ...props
      };
      return removeUndefinedValues(props);
    }
  );
  var ComboboxLabel = memo22(
    forwardRef22(function ComboboxLabel2(props) {
      const htmlProps = useComboboxLabel(props);
      return createElement5(TagName12, htmlProps);
    })
  );

  // node_modules/@ariakit/react-core/esm/__chunks/2G6YEJT4.js
  var import_react24 = __toESM(require_react(), 1);
  var import_jsx_runtime212 = __toESM(require_jsx_runtime(), 1);
  var TagName13 = "div";
  var useComboboxList = createHook(
    function useComboboxList2({ store: store2, alwaysVisible, ...props }) {
      const scopedContext = useComboboxScopedContext(true);
      const context = useComboboxContext();
      store2 = store2 || context;
      const scopedContextSameStore = !!store2 && store2 === scopedContext;
      invariant(
        store2,
        "ComboboxList must receive a `store` prop or be wrapped in a ComboboxProvider component."
      );
      const ref = (0, import_react24.useRef)(null);
      const id = useId5(props.id);
      const mounted = store2.useState("mounted");
      const hidden = isHidden(mounted, props.hidden, alwaysVisible);
      const style = hidden ? { ...props.style, display: "none" } : props.style;
      const multiSelectable = store2.useState(
        (state) => Array.isArray(state.selectedValue)
      );
      const role = useAttribute(ref, "role", props.role);
      const isCompositeRole = role === "listbox" || role === "tree" || role === "grid";
      const ariaMultiSelectable = isCompositeRole ? multiSelectable || void 0 : void 0;
      const [hasListboxInside, setHasListboxInside] = (0, import_react24.useState)(false);
      const contentElement = store2.useState("contentElement");
      useSafeLayoutEffect(() => {
        if (!mounted) return;
        const element = ref.current;
        if (!element) return;
        if (contentElement !== element) return;
        const callback = () => {
          setHasListboxInside(!!element.querySelector("[role='listbox']"));
        };
        const observer = new MutationObserver(callback);
        observer.observe(element, {
          subtree: true,
          childList: true,
          attributeFilter: ["role"]
        });
        callback();
        return () => observer.disconnect();
      }, [mounted, contentElement]);
      if (!hasListboxInside) {
        props = {
          role: "listbox",
          "aria-multiselectable": ariaMultiSelectable,
          ...props
        };
      }
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(ComboboxScopedContextProvider, { value: store2, children: /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(ComboboxListRoleContext.Provider, { value: role, children: element }) }),
        [store2, role]
      );
      const setContentElement = id && (!scopedContext || !scopedContextSameStore) ? store2.setContentElement : null;
      props = {
        id,
        hidden,
        ...props,
        ref: useMergeRefs(setContentElement, ref, props.ref),
        style
      };
      return removeUndefinedValues(props);
    }
  );
  var ComboboxList = forwardRef22(function ComboboxList2(props) {
    const htmlProps = useComboboxList(props);
    return createElement5(TagName13, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/XSIEPKGA.js
  var import_react25 = __toESM(require_react(), 1);
  var TagValueContext = (0, import_react25.createContext)(null);
  var TagRemoveIdContext = (0, import_react25.createContext)(
    null
  );
  var ctx8 = createStoreContext(
    [CompositeContextProvider],
    [CompositeScopedContextProvider]
  );
  var useTagContext = ctx8.useContext;
  var useTagScopedContext = ctx8.useScopedContext;
  var useTagProviderContext = ctx8.useProviderContext;
  var TagContextProvider = ctx8.ContextProvider;
  var TagScopedContextProvider = ctx8.ScopedContextProvider;

  // node_modules/@ariakit/core/esm/combobox/combobox-store.js
  var isTouchSafari = isSafari() && isTouchDevice();
  function createComboboxStore({
    tag,
    ...props
  } = {}) {
    const store2 = mergeStore(props.store, pick2(tag, ["value", "rtl"]));
    throwOnConflictingProps(props, store2);
    const tagState = tag == null ? void 0 : tag.getState();
    const syncState = store2 == null ? void 0 : store2.getState();
    const activeId = defaultValue(
      props.activeId,
      syncState == null ? void 0 : syncState.activeId,
      props.defaultActiveId,
      null
    );
    const composite = createCompositeStore({
      ...props,
      activeId,
      includesBaseElement: defaultValue(
        props.includesBaseElement,
        syncState == null ? void 0 : syncState.includesBaseElement,
        true
      ),
      orientation: defaultValue(
        props.orientation,
        syncState == null ? void 0 : syncState.orientation,
        "vertical"
      ),
      focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true),
      focusWrap: defaultValue(props.focusWrap, syncState == null ? void 0 : syncState.focusWrap, true),
      virtualFocus: defaultValue(
        props.virtualFocus,
        syncState == null ? void 0 : syncState.virtualFocus,
        true
      )
    });
    const popover = createPopoverStore({
      ...props,
      placement: defaultValue(
        props.placement,
        syncState == null ? void 0 : syncState.placement,
        "bottom-start"
      )
    });
    const value = defaultValue(
      props.value,
      syncState == null ? void 0 : syncState.value,
      props.defaultValue,
      ""
    );
    const selectedValue = defaultValue(
      props.selectedValue,
      syncState == null ? void 0 : syncState.selectedValue,
      tagState == null ? void 0 : tagState.values,
      props.defaultSelectedValue,
      ""
    );
    const multiSelectable = Array.isArray(selectedValue);
    const initialState = {
      ...composite.getState(),
      ...popover.getState(),
      value,
      selectedValue,
      resetValueOnSelect: defaultValue(
        props.resetValueOnSelect,
        syncState == null ? void 0 : syncState.resetValueOnSelect,
        multiSelectable
      ),
      resetValueOnHide: defaultValue(
        props.resetValueOnHide,
        syncState == null ? void 0 : syncState.resetValueOnHide,
        multiSelectable && !tag
      ),
      activeValue: syncState == null ? void 0 : syncState.activeValue
    };
    const combobox = createStore(initialState, composite, popover, store2);
    if (isTouchSafari) {
      setup(
        combobox,
        () => sync2(combobox, ["virtualFocus"], () => {
          combobox.setState("virtualFocus", false);
        })
      );
    }
    setup(combobox, () => {
      if (!tag) return;
      return chain(
        sync2(combobox, ["selectedValue"], (state) => {
          if (!Array.isArray(state.selectedValue)) return;
          tag.setValues(state.selectedValue);
        }),
        sync2(tag, ["values"], (state) => {
          combobox.setState("selectedValue", state.values);
        })
      );
    });
    setup(
      combobox,
      () => sync2(combobox, ["resetValueOnHide", "mounted"], (state) => {
        if (!state.resetValueOnHide) return;
        if (state.mounted) return;
        combobox.setState("value", value);
      })
    );
    setup(
      combobox,
      () => sync2(combobox, ["open"], (state) => {
        if (state.open) return;
        combobox.setState("activeId", activeId);
        combobox.setState("moves", 0);
      })
    );
    setup(
      combobox,
      () => sync2(combobox, ["moves", "activeId"], (state, prevState) => {
        if (state.moves === prevState.moves) {
          combobox.setState("activeValue", void 0);
        }
      })
    );
    setup(
      combobox,
      () => batch(combobox, ["moves", "renderedItems"], (state, prev) => {
        if (state.moves === prev.moves) return;
        const { activeId: activeId2 } = combobox.getState();
        const activeItem = composite.item(activeId2);
        combobox.setState("activeValue", activeItem == null ? void 0 : activeItem.value);
      })
    );
    return {
      ...popover,
      ...composite,
      ...combobox,
      tag,
      setValue: (value2) => combobox.setState("value", value2),
      resetValue: () => combobox.setState("value", initialState.value),
      setSelectedValue: (selectedValue2) => combobox.setState("selectedValue", selectedValue2)
    };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/SVN33SY6.js
  function useComboboxStoreOptions(props) {
    const tag = useTagContext();
    props = {
      ...props,
      tag: props.tag !== void 0 ? props.tag : tag
    };
    return useCompositeStoreOptions(props);
  }
  function useComboboxStoreProps(store2, update4, props) {
    useUpdateEffect(update4, [props.tag]);
    useStoreProps(store2, props, "value", "setValue");
    useStoreProps(store2, props, "selectedValue", "setSelectedValue");
    useStoreProps(store2, props, "resetValueOnHide");
    useStoreProps(store2, props, "resetValueOnSelect");
    return Object.assign(
      useCompositeStoreProps(
        usePopoverStoreProps(store2, update4, props),
        update4,
        props
      ),
      { tag: props.tag }
    );
  }
  function useComboboxStore(props = {}) {
    props = useComboboxStoreOptions(props);
    const [store2, update4] = useStore(createComboboxStore, props);
    return useComboboxStoreProps(store2, update4, props);
  }

  // node_modules/@ariakit/react-core/esm/combobox/combobox-provider.js
  var import_jsx_runtime213 = __toESM(require_jsx_runtime(), 1);
  function ComboboxProvider(props = {}) {
    const store2 = useComboboxStore(props);
    return /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(ComboboxContextProvider, { value: store2, children: props.children });
  }

  // packages/dataviews/build-module/components/dataviews-filters/search-widget.mjs
  var import_remove_accents = __toESM(require_remove_accents(), 1);
  var import_compose19 = __toESM(require_compose(), 1);
  var import_i18n104 = __toESM(require_i18n(), 1);
  var import_element90 = __toESM(require_element(), 1);
  var import_components109 = __toESM(require_components(), 1);

  // packages/dataviews/build-module/components/dataviews-filters/utils.mjs
  var EMPTY_ARRAY6 = [];
  var getCurrentValue = (filterDefinition, currentFilter) => {
    if (filterDefinition.singleSelection) {
      return currentFilter?.value;
    }
    if (Array.isArray(currentFilter?.value)) {
      return currentFilter.value;
    }
    if (!Array.isArray(currentFilter?.value) && !!currentFilter?.value) {
      return [currentFilter.value];
    }
    return EMPTY_ARRAY6;
  };

  // packages/dataviews/build-module/hooks/use-elements.mjs
  var import_element89 = __toESM(require_element(), 1);
  var EMPTY_ARRAY7 = [];
  function useElements({
    elements: elements2,
    getElements
  }) {
    const staticElements = Array.isArray(elements2) && elements2.length > 0 ? elements2 : EMPTY_ARRAY7;
    const [records, setRecords] = (0, import_element89.useState)(staticElements);
    const [isLoading, setIsLoading] = (0, import_element89.useState)(false);
    (0, import_element89.useEffect)(() => {
      if (!getElements) {
        setRecords(staticElements);
        return;
      }
      let cancelled = false;
      setIsLoading(true);
      getElements().then((fetchedElements) => {
        if (!cancelled) {
          const dynamicElements = Array.isArray(fetchedElements) && fetchedElements.length > 0 ? fetchedElements : staticElements;
          setRecords(dynamicElements);
        }
      }).catch(() => {
        if (!cancelled) {
          setRecords(staticElements);
        }
      }).finally(() => {
        if (!cancelled) {
          setIsLoading(false);
        }
      });
      return () => {
        cancelled = true;
      };
    }, [getElements, staticElements]);
    return {
      elements: records,
      isLoading
    };
  }

  // packages/dataviews/build-module/components/dataviews-filters/search-widget.mjs
  var import_jsx_runtime214 = __toESM(require_jsx_runtime(), 1);
  function normalizeSearchInput(input = "") {
    return (0, import_remove_accents.default)(input.trim().toLowerCase());
  }
  var getNewValue = (filterDefinition, currentFilter, value) => {
    if (filterDefinition.singleSelection) {
      return value;
    }
    if (Array.isArray(currentFilter?.value)) {
      return currentFilter.value.includes(value) ? currentFilter.value.filter((v2) => v2 !== value) : [...currentFilter.value, value];
    }
    return [value];
  };
  function generateFilterElementCompositeItemId(prefix2, filterElementValue) {
    return `${prefix2}-${filterElementValue}`;
  }
  var MultiSelectionOption = ({ selected }) => {
    return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
      "span",
      {
        className: clsx_default(
          "dataviews-filters__search-widget-listitem-multi-selection",
          { "is-selected": selected }
        ),
        children: selected && /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(import_components109.Icon, { icon: check_default })
      }
    );
  };
  var SingleSelectionOption = ({ selected }) => {
    return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
      "span",
      {
        className: clsx_default(
          "dataviews-filters__search-widget-listitem-single-selection",
          { "is-selected": selected }
        )
      }
    );
  };
  function ListBox({ view, filter, onChangeView }) {
    const baseId = (0, import_compose19.useInstanceId)(ListBox, "dataviews-filter-list-box");
    const [activeCompositeId, setActiveCompositeId] = (0, import_element90.useState)(
      // When there are one or less operators, the first item is set as active
      // (by setting the initial `activeId` to `undefined`).
      // With 2 or more operators, the focus is moved on the operators control
      // (by setting the initial `activeId` to `null`), meaning that there won't
      // be an active item initially. Focus is then managed via the
      // `onFocusVisible` callback.
      filter.operators?.length === 1 ? void 0 : null
    );
    const currentFilter = view.filters?.find(
      (f2) => f2.field === filter.field
    );
    const currentValue = getCurrentValue(filter, currentFilter);
    return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
      import_components109.Composite,
      {
        virtualFocus: true,
        focusLoop: true,
        activeId: activeCompositeId,
        setActiveId: setActiveCompositeId,
        role: "listbox",
        className: "dataviews-filters__search-widget-listbox",
        "aria-label": (0, import_i18n104.sprintf)(
          /* translators: List of items for a filter. 1: Filter name. e.g.: "List of: Author". */
          (0, import_i18n104.__)("List of: %1$s"),
          filter.name
        ),
        onFocusVisible: () => {
          if (!activeCompositeId && filter.elements.length) {
            setActiveCompositeId(
              generateFilterElementCompositeItemId(
                baseId,
                filter.elements[0].value
              )
            );
          }
        },
        render: /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(import_components109.Composite.Typeahead, {}),
        children: filter.elements.map((element) => /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)(
          import_components109.Composite.Hover,
          {
            render: /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
              import_components109.Composite.Item,
              {
                id: generateFilterElementCompositeItemId(
                  baseId,
                  element.value
                ),
                render: /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
                  "div",
                  {
                    "aria-label": element.label,
                    role: "option",
                    className: "dataviews-filters__search-widget-listitem"
                  }
                ),
                onClick: () => {
                  const newFilters = currentFilter ? [
                    ...(view.filters ?? []).map(
                      (_filter) => {
                        if (_filter.field === filter.field) {
                          return {
                            ..._filter,
                            operator: currentFilter.operator || filter.operators[0],
                            value: getNewValue(
                              filter,
                              currentFilter,
                              element.value
                            )
                          };
                        }
                        return _filter;
                      }
                    )
                  ] : [
                    ...view.filters ?? [],
                    {
                      field: filter.field,
                      operator: filter.operators[0],
                      value: getNewValue(
                        filter,
                        currentFilter,
                        element.value
                      )
                    }
                  ];
                  onChangeView({
                    ...view,
                    page: 1,
                    filters: newFilters
                  });
                }
              }
            ),
            children: [
              filter.singleSelection && /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
                SingleSelectionOption,
                {
                  selected: currentValue === element.value
                }
              ),
              !filter.singleSelection && /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
                MultiSelectionOption,
                {
                  selected: currentValue.includes(element.value)
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
                "span",
                {
                  className: "dataviews-filters__search-widget-listitem-value",
                  title: element.label,
                  children: element.label
                }
              )
            ]
          },
          element.value
        ))
      }
    );
  }
  function ComboboxList22({ view, filter, onChangeView }) {
    const [searchValue, setSearchValue] = (0, import_element90.useState)("");
    const deferredSearchValue = (0, import_element90.useDeferredValue)(searchValue);
    const currentFilter = view.filters?.find(
      (_filter) => _filter.field === filter.field
    );
    const currentValue = getCurrentValue(filter, currentFilter);
    const matches = (0, import_element90.useMemo)(() => {
      const normalizedSearch = normalizeSearchInput(deferredSearchValue);
      return filter.elements.filter(
        (item) => normalizeSearchInput(item.label).includes(normalizedSearch)
      );
    }, [filter.elements, deferredSearchValue]);
    return /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)(
      ComboboxProvider,
      {
        selectedValue: currentValue,
        setSelectedValue: (value) => {
          const newFilters = currentFilter ? [
            ...(view.filters ?? []).map((_filter) => {
              if (_filter.field === filter.field) {
                return {
                  ..._filter,
                  operator: currentFilter.operator || filter.operators[0],
                  value
                };
              }
              return _filter;
            })
          ] : [
            ...view.filters ?? [],
            {
              field: filter.field,
              operator: filter.operators[0],
              value
            }
          ];
          onChangeView({
            ...view,
            page: 1,
            filters: newFilters
          });
        },
        setValue: setSearchValue,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)("div", { className: "dataviews-filters__search-widget-filter-combobox__wrapper", children: [
            /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
              ComboboxLabel,
              {
                render: /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(import_components109.VisuallyHidden, { children: (0, import_i18n104.__)("Search items") }),
                children: (0, import_i18n104.__)("Search items")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
              Combobox,
              {
                autoSelect: "always",
                placeholder: (0, import_i18n104.__)("Search"),
                className: "dataviews-filters__search-widget-filter-combobox__input"
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime214.jsx)("div", { className: "dataviews-filters__search-widget-filter-combobox__icon", children: /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(import_components109.Icon, { icon: search_default }) })
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)(
            ComboboxList,
            {
              className: "dataviews-filters__search-widget-filter-combobox-list",
              alwaysVisible: true,
              children: [
                matches.map((element) => {
                  return /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)(
                    ComboboxItem,
                    {
                      resetValueOnSelect: false,
                      value: element.value,
                      className: "dataviews-filters__search-widget-listitem",
                      hideOnClick: false,
                      setValueOnClick: false,
                      focusOnHover: true,
                      children: [
                        filter.singleSelection && /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
                          SingleSelectionOption,
                          {
                            selected: currentValue === element.value
                          }
                        ),
                        !filter.singleSelection && /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
                          MultiSelectionOption,
                          {
                            selected: currentValue.includes(
                              element.value
                            )
                          }
                        ),
                        /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)(
                          "span",
                          {
                            className: "dataviews-filters__search-widget-listitem-value",
                            title: element.label,
                            children: [
                              /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
                                ComboboxItemValue,
                                {
                                  className: "dataviews-filters__search-widget-filter-combobox-item-value",
                                  value: element.label
                                }
                              ),
                              !!element.description && /* @__PURE__ */ (0, import_jsx_runtime214.jsx)("span", { className: "dataviews-filters__search-widget-listitem-description", children: element.description })
                            ]
                          }
                        )
                      ]
                    },
                    element.value
                  );
                }),
                !matches.length && /* @__PURE__ */ (0, import_jsx_runtime214.jsx)("p", { children: (0, import_i18n104.__)("No results found") })
              ]
            }
          )
        ]
      }
    );
  }
  function SearchWidget(props) {
    const { elements: elements2, isLoading } = useElements({
      elements: props.filter.elements,
      getElements: props.filter.getElements
    });
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)("div", { className: "dataviews-filters__search-widget-no-elements", children: /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(import_components109.Spinner, {}) });
    }
    if (elements2.length === 0) {
      return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)("div", { className: "dataviews-filters__search-widget-no-elements", children: (0, import_i18n104.__)("No elements found") });
    }
    const Widget = elements2.length > 10 ? ComboboxList22 : ListBox;
    return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(Widget, { ...props, filter: { ...props.filter, elements: elements2 } });
  }

  // packages/dataviews/build-module/components/dataviews-filters/input-widget.mjs
  var import_es62 = __toESM(require_es6(), 1);
  var import_compose20 = __toESM(require_compose(), 1);
  var import_element91 = __toESM(require_element(), 1);
  var import_components110 = __toESM(require_components(), 1);
  var import_jsx_runtime215 = __toESM(require_jsx_runtime(), 1);
  function InputWidget({
    filter,
    view,
    onChangeView,
    fields
  }) {
    const currentFilter = view.filters?.find(
      (f2) => f2.field === filter.field
    );
    const currentValue = getCurrentValue(filter, currentFilter);
    const field = (0, import_element91.useMemo)(() => {
      const currentField = fields.find((f2) => f2.id === filter.field);
      if (currentField) {
        return {
          ...currentField,
          // Deactivate validation for filters.
          isValid: {},
          // Configure getValue/setValue as if Item was a plain object.
          getValue: ({ item }) => item[currentField.id],
          setValue: ({ value }) => ({
            [currentField.id]: value
          })
        };
      }
      return currentField;
    }, [fields, filter.field]);
    const data = (0, import_element91.useMemo)(() => {
      return (view.filters ?? []).reduce(
        (acc, activeFilter) => {
          acc[activeFilter.field] = activeFilter.value;
          return acc;
        },
        {}
      );
    }, [view.filters]);
    const handleChange = (0, import_compose20.useEvent)((updatedData) => {
      if (!field || !currentFilter) {
        return;
      }
      const nextValue = field.getValue({ item: updatedData });
      if ((0, import_es62.default)(nextValue, currentValue)) {
        return;
      }
      onChangeView({
        ...view,
        filters: (view.filters ?? []).map(
          (_filter) => _filter.field === filter.field ? {
            ..._filter,
            operator: currentFilter.operator || filter.operators[0],
            // Consider empty strings as undefined:
            //
            // - undefined as value means the filter is unset: the filter widget displays no value and the search returns all records
            // - empty string as value means "search empty string": returns only the records that have an empty string as value
            //
            // In practice, this means the filter will not be able to find an empty string as the value.
            value: nextValue === "" ? void 0 : nextValue
          } : _filter
        )
      });
    });
    if (!field || !field.Edit || !currentFilter) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(
      import_components110.Flex,
      {
        className: "dataviews-filters__user-input-widget",
        gap: 2.5,
        direction: "column",
        children: /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(
          field.Edit,
          {
            hideLabelFromVision: true,
            data,
            field,
            operator: currentFilter.operator,
            onChange: handleChange
          }
        )
      }
    );
  }

  // packages/dataviews/node_modules/date-fns/constants.js
  var daysInYear = 365.2425;
  var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1e3;
  var minTime = -maxTime;
  var millisecondsInWeek = 6048e5;
  var millisecondsInDay = 864e5;
  var secondsInHour = 3600;
  var secondsInDay = secondsInHour * 24;
  var secondsInWeek = secondsInDay * 7;
  var secondsInYear = secondsInDay * daysInYear;
  var secondsInMonth = secondsInYear / 12;
  var secondsInQuarter = secondsInMonth * 3;
  var constructFromSymbol = /* @__PURE__ */ Symbol.for("constructDateFrom");

  // packages/dataviews/node_modules/date-fns/constructFrom.js
  function constructFrom(date, value) {
    if (typeof date === "function") return date(value);
    if (date && typeof date === "object" && constructFromSymbol in date)
      return date[constructFromSymbol](value);
    if (date instanceof Date) return new date.constructor(value);
    return new Date(value);
  }

  // packages/dataviews/node_modules/date-fns/toDate.js
  function toDate(argument, context) {
    return constructFrom(context || argument, argument);
  }

  // packages/dataviews/node_modules/date-fns/addDays.js
  function addDays(date, amount, options) {
    const _date = toDate(date, options?.in);
    if (isNaN(amount)) return constructFrom(options?.in || date, NaN);
    if (!amount) return _date;
    _date.setDate(_date.getDate() + amount);
    return _date;
  }

  // packages/dataviews/node_modules/date-fns/addMonths.js
  function addMonths(date, amount, options) {
    const _date = toDate(date, options?.in);
    if (isNaN(amount)) return constructFrom(options?.in || date, NaN);
    if (!amount) {
      return _date;
    }
    const dayOfMonth = _date.getDate();
    const endOfDesiredMonth = constructFrom(options?.in || date, _date.getTime());
    endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);
    const daysInMonth = endOfDesiredMonth.getDate();
    if (dayOfMonth >= daysInMonth) {
      return endOfDesiredMonth;
    } else {
      _date.setFullYear(
        endOfDesiredMonth.getFullYear(),
        endOfDesiredMonth.getMonth(),
        dayOfMonth
      );
      return _date;
    }
  }

  // packages/dataviews/node_modules/date-fns/_lib/defaultOptions.js
  var defaultOptions = {};
  function getDefaultOptions() {
    return defaultOptions;
  }

  // packages/dataviews/node_modules/date-fns/startOfWeek.js
  function startOfWeek(date, options) {
    const defaultOptions2 = getDefaultOptions();
    const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
    const _date = toDate(date, options?.in);
    const day = _date.getDay();
    const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
    _date.setDate(_date.getDate() - diff);
    _date.setHours(0, 0, 0, 0);
    return _date;
  }

  // packages/dataviews/node_modules/date-fns/startOfISOWeek.js
  function startOfISOWeek(date, options) {
    return startOfWeek(date, { ...options, weekStartsOn: 1 });
  }

  // packages/dataviews/node_modules/date-fns/getISOWeekYear.js
  function getISOWeekYear(date, options) {
    const _date = toDate(date, options?.in);
    const year = _date.getFullYear();
    const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);
    fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
    fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
    const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
    const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);
    fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
    fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
    const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
    if (_date.getTime() >= startOfNextYear.getTime()) {
      return year + 1;
    } else if (_date.getTime() >= startOfThisYear.getTime()) {
      return year;
    } else {
      return year - 1;
    }
  }

  // packages/dataviews/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
  function getTimezoneOffsetInMilliseconds(date) {
    const _date = toDate(date);
    const utcDate = new Date(
      Date.UTC(
        _date.getFullYear(),
        _date.getMonth(),
        _date.getDate(),
        _date.getHours(),
        _date.getMinutes(),
        _date.getSeconds(),
        _date.getMilliseconds()
      )
    );
    utcDate.setUTCFullYear(_date.getFullYear());
    return +date - +utcDate;
  }

  // packages/dataviews/node_modules/date-fns/_lib/normalizeDates.js
  function normalizeDates(context, ...dates) {
    const normalize = constructFrom.bind(
      null,
      context || dates.find((date) => typeof date === "object")
    );
    return dates.map(normalize);
  }

  // packages/dataviews/node_modules/date-fns/startOfDay.js
  function startOfDay(date, options) {
    const _date = toDate(date, options?.in);
    _date.setHours(0, 0, 0, 0);
    return _date;
  }

  // packages/dataviews/node_modules/date-fns/differenceInCalendarDays.js
  function differenceInCalendarDays(laterDate, earlierDate, options) {
    const [laterDate_, earlierDate_] = normalizeDates(
      options?.in,
      laterDate,
      earlierDate
    );
    const laterStartOfDay = startOfDay(laterDate_);
    const earlierStartOfDay = startOfDay(earlierDate_);
    const laterTimestamp = +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);
    const earlierTimestamp = +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);
    return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);
  }

  // packages/dataviews/node_modules/date-fns/startOfISOWeekYear.js
  function startOfISOWeekYear(date, options) {
    const year = getISOWeekYear(date, options);
    const fourthOfJanuary = constructFrom(options?.in || date, 0);
    fourthOfJanuary.setFullYear(year, 0, 4);
    fourthOfJanuary.setHours(0, 0, 0, 0);
    return startOfISOWeek(fourthOfJanuary);
  }

  // packages/dataviews/node_modules/date-fns/addWeeks.js
  function addWeeks(date, amount, options) {
    return addDays(date, amount * 7, options);
  }

  // packages/dataviews/node_modules/date-fns/addYears.js
  function addYears(date, amount, options) {
    return addMonths(date, amount * 12, options);
  }

  // packages/dataviews/node_modules/date-fns/isDate.js
  function isDate(value) {
    return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]";
  }

  // packages/dataviews/node_modules/date-fns/isValid.js
  function isValid(date) {
    return !(!isDate(date) && typeof date !== "number" || isNaN(+toDate(date)));
  }

  // packages/dataviews/node_modules/date-fns/startOfMonth.js
  function startOfMonth(date, options) {
    const _date = toDate(date, options?.in);
    _date.setDate(1);
    _date.setHours(0, 0, 0, 0);
    return _date;
  }

  // packages/dataviews/node_modules/date-fns/startOfYear.js
  function startOfYear(date, options) {
    const date_ = toDate(date, options?.in);
    date_.setFullYear(date_.getFullYear(), 0, 1);
    date_.setHours(0, 0, 0, 0);
    return date_;
  }

  // packages/dataviews/node_modules/date-fns/locale/en-US/_lib/formatDistance.js
  var formatDistanceLocale = {
    lessThanXSeconds: {
      one: "less than a second",
      other: "less than {{count}} seconds"
    },
    xSeconds: {
      one: "1 second",
      other: "{{count}} seconds"
    },
    halfAMinute: "half a minute",
    lessThanXMinutes: {
      one: "less than a minute",
      other: "less than {{count}} minutes"
    },
    xMinutes: {
      one: "1 minute",
      other: "{{count}} minutes"
    },
    aboutXHours: {
      one: "about 1 hour",
      other: "about {{count}} hours"
    },
    xHours: {
      one: "1 hour",
      other: "{{count}} hours"
    },
    xDays: {
      one: "1 day",
      other: "{{count}} days"
    },
    aboutXWeeks: {
      one: "about 1 week",
      other: "about {{count}} weeks"
    },
    xWeeks: {
      one: "1 week",
      other: "{{count}} weeks"
    },
    aboutXMonths: {
      one: "about 1 month",
      other: "about {{count}} months"
    },
    xMonths: {
      one: "1 month",
      other: "{{count}} months"
    },
    aboutXYears: {
      one: "about 1 year",
      other: "about {{count}} years"
    },
    xYears: {
      one: "1 year",
      other: "{{count}} years"
    },
    overXYears: {
      one: "over 1 year",
      other: "over {{count}} years"
    },
    almostXYears: {
      one: "almost 1 year",
      other: "almost {{count}} years"
    }
  };
  var formatDistance = (token, count, options) => {
    let result;
    const tokenValue = formatDistanceLocale[token];
    if (typeof tokenValue === "string") {
      result = tokenValue;
    } else if (count === 1) {
      result = tokenValue.one;
    } else {
      result = tokenValue.other.replace("{{count}}", count.toString());
    }
    if (options?.addSuffix) {
      if (options.comparison && options.comparison > 0) {
        return "in " + result;
      } else {
        return result + " ago";
      }
    }
    return result;
  };

  // packages/dataviews/node_modules/date-fns/locale/_lib/buildFormatLongFn.js
  function buildFormatLongFn(args) {
    return (options = {}) => {
      const width = options.width ? String(options.width) : args.defaultWidth;
      const format6 = args.formats[width] || args.formats[args.defaultWidth];
      return format6;
    };
  }

  // packages/dataviews/node_modules/date-fns/locale/en-US/_lib/formatLong.js
  var dateFormats = {
    full: "EEEE, MMMM do, y",
    long: "MMMM do, y",
    medium: "MMM d, y",
    short: "MM/dd/yyyy"
  };
  var timeFormats = {
    full: "h:mm:ss a zzzz",
    long: "h:mm:ss a z",
    medium: "h:mm:ss a",
    short: "h:mm a"
  };
  var dateTimeFormats = {
    full: "{{date}} 'at' {{time}}",
    long: "{{date}} 'at' {{time}}",
    medium: "{{date}}, {{time}}",
    short: "{{date}}, {{time}}"
  };
  var formatLong = {
    date: buildFormatLongFn({
      formats: dateFormats,
      defaultWidth: "full"
    }),
    time: buildFormatLongFn({
      formats: timeFormats,
      defaultWidth: "full"
    }),
    dateTime: buildFormatLongFn({
      formats: dateTimeFormats,
      defaultWidth: "full"
    })
  };

  // packages/dataviews/node_modules/date-fns/locale/en-US/_lib/formatRelative.js
  var formatRelativeLocale = {
    lastWeek: "'last' eeee 'at' p",
    yesterday: "'yesterday at' p",
    today: "'today at' p",
    tomorrow: "'tomorrow at' p",
    nextWeek: "eeee 'at' p",
    other: "P"
  };
  var formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];

  // packages/dataviews/node_modules/date-fns/locale/_lib/buildLocalizeFn.js
  function buildLocalizeFn(args) {
    return (value, options) => {
      const context = options?.context ? String(options.context) : "standalone";
      let valuesArray;
      if (context === "formatting" && args.formattingValues) {
        const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
        const width = options?.width ? String(options.width) : defaultWidth;
        valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
      } else {
        const defaultWidth = args.defaultWidth;
        const width = options?.width ? String(options.width) : args.defaultWidth;
        valuesArray = args.values[width] || args.values[defaultWidth];
      }
      const index = args.argumentCallback ? args.argumentCallback(value) : value;
      return valuesArray[index];
    };
  }

  // packages/dataviews/node_modules/date-fns/locale/en-US/_lib/localize.js
  var eraValues = {
    narrow: ["B", "A"],
    abbreviated: ["BC", "AD"],
    wide: ["Before Christ", "Anno Domini"]
  };
  var quarterValues = {
    narrow: ["1", "2", "3", "4"],
    abbreviated: ["Q1", "Q2", "Q3", "Q4"],
    wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
  };
  var monthValues = {
    narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
    abbreviated: [
      "Jan",
      "Feb",
      "Mar",
      "Apr",
      "May",
      "Jun",
      "Jul",
      "Aug",
      "Sep",
      "Oct",
      "Nov",
      "Dec"
    ],
    wide: [
      "January",
      "February",
      "March",
      "April",
      "May",
      "June",
      "July",
      "August",
      "September",
      "October",
      "November",
      "December"
    ]
  };
  var dayValues = {
    narrow: ["S", "M", "T", "W", "T", "F", "S"],
    short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
    abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
    wide: [
      "Sunday",
      "Monday",
      "Tuesday",
      "Wednesday",
      "Thursday",
      "Friday",
      "Saturday"
    ]
  };
  var dayPeriodValues = {
    narrow: {
      am: "a",
      pm: "p",
      midnight: "mi",
      noon: "n",
      morning: "morning",
      afternoon: "afternoon",
      evening: "evening",
      night: "night"
    },
    abbreviated: {
      am: "AM",
      pm: "PM",
      midnight: "midnight",
      noon: "noon",
      morning: "morning",
      afternoon: "afternoon",
      evening: "evening",
      night: "night"
    },
    wide: {
      am: "a.m.",
      pm: "p.m.",
      midnight: "midnight",
      noon: "noon",
      morning: "morning",
      afternoon: "afternoon",
      evening: "evening",
      night: "night"
    }
  };
  var formattingDayPeriodValues = {
    narrow: {
      am: "a",
      pm: "p",
      midnight: "mi",
      noon: "n",
      morning: "in the morning",
      afternoon: "in the afternoon",
      evening: "in the evening",
      night: "at night"
    },
    abbreviated: {
      am: "AM",
      pm: "PM",
      midnight: "midnight",
      noon: "noon",
      morning: "in the morning",
      afternoon: "in the afternoon",
      evening: "in the evening",
      night: "at night"
    },
    wide: {
      am: "a.m.",
      pm: "p.m.",
      midnight: "midnight",
      noon: "noon",
      morning: "in the morning",
      afternoon: "in the afternoon",
      evening: "in the evening",
      night: "at night"
    }
  };
  var ordinalNumber = (dirtyNumber, _options) => {
    const number = Number(dirtyNumber);
    const rem100 = number % 100;
    if (rem100 > 20 || rem100 < 10) {
      switch (rem100 % 10) {
        case 1:
          return number + "st";
        case 2:
          return number + "nd";
        case 3:
          return number + "rd";
      }
    }
    return number + "th";
  };
  var localize = {
    ordinalNumber,
    era: buildLocalizeFn({
      values: eraValues,
      defaultWidth: "wide"
    }),
    quarter: buildLocalizeFn({
      values: quarterValues,
      defaultWidth: "wide",
      argumentCallback: (quarter) => quarter - 1
    }),
    month: buildLocalizeFn({
      values: monthValues,
      defaultWidth: "wide"
    }),
    day: buildLocalizeFn({
      values: dayValues,
      defaultWidth: "wide"
    }),
    dayPeriod: buildLocalizeFn({
      values: dayPeriodValues,
      defaultWidth: "wide",
      formattingValues: formattingDayPeriodValues,
      defaultFormattingWidth: "wide"
    })
  };

  // packages/dataviews/node_modules/date-fns/locale/_lib/buildMatchFn.js
  function buildMatchFn(args) {
    return (string, options = {}) => {
      const width = options.width;
      const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
      const matchResult = string.match(matchPattern);
      if (!matchResult) {
        return null;
      }
      const matchedString = matchResult[0];
      const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
      const key = Array.isArray(parsePatterns) ? findIndex2(parsePatterns, (pattern) => pattern.test(matchedString)) : (
        // [TODO] -- I challenge you to fix the type
        findKey(parsePatterns, (pattern) => pattern.test(matchedString))
      );
      let value;
      value = args.valueCallback ? args.valueCallback(key) : key;
      value = options.valueCallback ? (
        // [TODO] -- I challenge you to fix the type
        options.valueCallback(value)
      ) : value;
      const rest = string.slice(matchedString.length);
      return { value, rest };
    };
  }
  function findKey(object, predicate) {
    for (const key in object) {
      if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
        return key;
      }
    }
    return void 0;
  }
  function findIndex2(array, predicate) {
    for (let key = 0; key < array.length; key++) {
      if (predicate(array[key])) {
        return key;
      }
    }
    return void 0;
  }

  // packages/dataviews/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
  function buildMatchPatternFn(args) {
    return (string, options = {}) => {
      const matchResult = string.match(args.matchPattern);
      if (!matchResult) return null;
      const matchedString = matchResult[0];
      const parseResult = string.match(args.parsePattern);
      if (!parseResult) return null;
      let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
      value = options.valueCallback ? options.valueCallback(value) : value;
      const rest = string.slice(matchedString.length);
      return { value, rest };
    };
  }

  // packages/dataviews/node_modules/date-fns/locale/en-US/_lib/match.js
  var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
  var parseOrdinalNumberPattern = /\d+/i;
  var matchEraPatterns = {
    narrow: /^(b|a)/i,
    abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
    wide: /^(before christ|before common era|anno domini|common era)/i
  };
  var parseEraPatterns = {
    any: [/^b/i, /^(a|c)/i]
  };
  var matchQuarterPatterns = {
    narrow: /^[1234]/i,
    abbreviated: /^q[1234]/i,
    wide: /^[1234](th|st|nd|rd)? quarter/i
  };
  var parseQuarterPatterns = {
    any: [/1/i, /2/i, /3/i, /4/i]
  };
  var matchMonthPatterns = {
    narrow: /^[jfmasond]/i,
    abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
    wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
  };
  var parseMonthPatterns = {
    narrow: [
      /^j/i,
      /^f/i,
      /^m/i,
      /^a/i,
      /^m/i,
      /^j/i,
      /^j/i,
      /^a/i,
      /^s/i,
      /^o/i,
      /^n/i,
      /^d/i
    ],
    any: [
      /^ja/i,
      /^f/i,
      /^mar/i,
      /^ap/i,
      /^may/i,
      /^jun/i,
      /^jul/i,
      /^au/i,
      /^s/i,
      /^o/i,
      /^n/i,
      /^d/i
    ]
  };
  var matchDayPatterns = {
    narrow: /^[smtwf]/i,
    short: /^(su|mo|tu|we|th|fr|sa)/i,
    abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
    wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
  };
  var parseDayPatterns = {
    narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
    any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
  };
  var matchDayPeriodPatterns = {
    narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
    any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
  };
  var parseDayPeriodPatterns = {
    any: {
      am: /^a/i,
      pm: /^p/i,
      midnight: /^mi/i,
      noon: /^no/i,
      morning: /morning/i,
      afternoon: /afternoon/i,
      evening: /evening/i,
      night: /night/i
    }
  };
  var match2 = {
    ordinalNumber: buildMatchPatternFn({
      matchPattern: matchOrdinalNumberPattern,
      parsePattern: parseOrdinalNumberPattern,
      valueCallback: (value) => parseInt(value, 10)
    }),
    era: buildMatchFn({
      matchPatterns: matchEraPatterns,
      defaultMatchWidth: "wide",
      parsePatterns: parseEraPatterns,
      defaultParseWidth: "any"
    }),
    quarter: buildMatchFn({
      matchPatterns: matchQuarterPatterns,
      defaultMatchWidth: "wide",
      parsePatterns: parseQuarterPatterns,
      defaultParseWidth: "any",
      valueCallback: (index) => index + 1
    }),
    month: buildMatchFn({
      matchPatterns: matchMonthPatterns,
      defaultMatchWidth: "wide",
      parsePatterns: parseMonthPatterns,
      defaultParseWidth: "any"
    }),
    day: buildMatchFn({
      matchPatterns: matchDayPatterns,
      defaultMatchWidth: "wide",
      parsePatterns: parseDayPatterns,
      defaultParseWidth: "any"
    }),
    dayPeriod: buildMatchFn({
      matchPatterns: matchDayPeriodPatterns,
      defaultMatchWidth: "any",
      parsePatterns: parseDayPeriodPatterns,
      defaultParseWidth: "any"
    })
  };

  // packages/dataviews/node_modules/date-fns/locale/en-US.js
  var enUS = {
    code: "en-US",
    formatDistance,
    formatLong,
    formatRelative,
    localize,
    match: match2,
    options: {
      weekStartsOn: 0,
      firstWeekContainsDate: 1
    }
  };

  // packages/dataviews/node_modules/date-fns/getDayOfYear.js
  function getDayOfYear(date, options) {
    const _date = toDate(date, options?.in);
    const diff = differenceInCalendarDays(_date, startOfYear(_date));
    const dayOfYear = diff + 1;
    return dayOfYear;
  }

  // packages/dataviews/node_modules/date-fns/getISOWeek.js
  function getISOWeek(date, options) {
    const _date = toDate(date, options?.in);
    const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);
    return Math.round(diff / millisecondsInWeek) + 1;
  }

  // packages/dataviews/node_modules/date-fns/getWeekYear.js
  function getWeekYear(date, options) {
    const _date = toDate(date, options?.in);
    const year = _date.getFullYear();
    const defaultOptions2 = getDefaultOptions();
    const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
    const firstWeekOfNextYear = constructFrom(options?.in || date, 0);
    firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
    firstWeekOfNextYear.setHours(0, 0, 0, 0);
    const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);
    const firstWeekOfThisYear = constructFrom(options?.in || date, 0);
    firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);
    firstWeekOfThisYear.setHours(0, 0, 0, 0);
    const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);
    if (+_date >= +startOfNextYear) {
      return year + 1;
    } else if (+_date >= +startOfThisYear) {
      return year;
    } else {
      return year - 1;
    }
  }

  // packages/dataviews/node_modules/date-fns/startOfWeekYear.js
  function startOfWeekYear(date, options) {
    const defaultOptions2 = getDefaultOptions();
    const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
    const year = getWeekYear(date, options);
    const firstWeek = constructFrom(options?.in || date, 0);
    firstWeek.setFullYear(year, 0, firstWeekContainsDate);
    firstWeek.setHours(0, 0, 0, 0);
    const _date = startOfWeek(firstWeek, options);
    return _date;
  }

  // packages/dataviews/node_modules/date-fns/getWeek.js
  function getWeek(date, options) {
    const _date = toDate(date, options?.in);
    const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);
    return Math.round(diff / millisecondsInWeek) + 1;
  }

  // packages/dataviews/node_modules/date-fns/_lib/addLeadingZeros.js
  function addLeadingZeros(number, targetLength) {
    const sign = number < 0 ? "-" : "";
    const output = Math.abs(number).toString().padStart(targetLength, "0");
    return sign + output;
  }

  // packages/dataviews/node_modules/date-fns/_lib/format/lightFormatters.js
  var lightFormatters = {
    // Year
    y(date, token) {
      const signedYear = date.getFullYear();
      const year = signedYear > 0 ? signedYear : 1 - signedYear;
      return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
    },
    // Month
    M(date, token) {
      const month = date.getMonth();
      return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
    },
    // Day of the month
    d(date, token) {
      return addLeadingZeros(date.getDate(), token.length);
    },
    // AM or PM
    a(date, token) {
      const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am";
      switch (token) {
        case "a":
        case "aa":
          return dayPeriodEnumValue.toUpperCase();
        case "aaa":
          return dayPeriodEnumValue;
        case "aaaaa":
          return dayPeriodEnumValue[0];
        case "aaaa":
        default:
          return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
      }
    },
    // Hour [1-12]
    h(date, token) {
      return addLeadingZeros(date.getHours() % 12 || 12, token.length);
    },
    // Hour [0-23]
    H(date, token) {
      return addLeadingZeros(date.getHours(), token.length);
    },
    // Minute
    m(date, token) {
      return addLeadingZeros(date.getMinutes(), token.length);
    },
    // Second
    s(date, token) {
      return addLeadingZeros(date.getSeconds(), token.length);
    },
    // Fraction of second
    S(date, token) {
      const numberOfDigits = token.length;
      const milliseconds = date.getMilliseconds();
      const fractionalSeconds = Math.trunc(
        milliseconds * Math.pow(10, numberOfDigits - 3)
      );
      return addLeadingZeros(fractionalSeconds, token.length);
    }
  };

  // packages/dataviews/node_modules/date-fns/_lib/format/formatters.js
  var dayPeriodEnum = {
    am: "am",
    pm: "pm",
    midnight: "midnight",
    noon: "noon",
    morning: "morning",
    afternoon: "afternoon",
    evening: "evening",
    night: "night"
  };
  var formatters = {
    // Era
    G: function(date, token, localize2) {
      const era = date.getFullYear() > 0 ? 1 : 0;
      switch (token) {
        // AD, BC
        case "G":
        case "GG":
        case "GGG":
          return localize2.era(era, { width: "abbreviated" });
        // A, B
        case "GGGGG":
          return localize2.era(era, { width: "narrow" });
        // Anno Domini, Before Christ
        case "GGGG":
        default:
          return localize2.era(era, { width: "wide" });
      }
    },
    // Year
    y: function(date, token, localize2) {
      if (token === "yo") {
        const signedYear = date.getFullYear();
        const year = signedYear > 0 ? signedYear : 1 - signedYear;
        return localize2.ordinalNumber(year, { unit: "year" });
      }
      return lightFormatters.y(date, token);
    },
    // Local week-numbering year
    Y: function(date, token, localize2, options) {
      const signedWeekYear = getWeekYear(date, options);
      const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
      if (token === "YY") {
        const twoDigitYear = weekYear % 100;
        return addLeadingZeros(twoDigitYear, 2);
      }
      if (token === "Yo") {
        return localize2.ordinalNumber(weekYear, { unit: "year" });
      }
      return addLeadingZeros(weekYear, token.length);
    },
    // ISO week-numbering year
    R: function(date, token) {
      const isoWeekYear = getISOWeekYear(date);
      return addLeadingZeros(isoWeekYear, token.length);
    },
    // Extended year. This is a single number designating the year of this calendar system.
    // The main difference between `y` and `u` localizers are B.C. years:
    // | Year | `y` | `u` |
    // |------|-----|-----|
    // | AC 1 |   1 |   1 |
    // | BC 1 |   1 |   0 |
    // | BC 2 |   2 |  -1 |
    // Also `yy` always returns the last two digits of a year,
    // while `uu` pads single digit years to 2 characters and returns other years unchanged.
    u: function(date, token) {
      const year = date.getFullYear();
      return addLeadingZeros(year, token.length);
    },
    // Quarter
    Q: function(date, token, localize2) {
      const quarter = Math.ceil((date.getMonth() + 1) / 3);
      switch (token) {
        // 1, 2, 3, 4
        case "Q":
          return String(quarter);
        // 01, 02, 03, 04
        case "QQ":
          return addLeadingZeros(quarter, 2);
        // 1st, 2nd, 3rd, 4th
        case "Qo":
          return localize2.ordinalNumber(quarter, { unit: "quarter" });
        // Q1, Q2, Q3, Q4
        case "QQQ":
          return localize2.quarter(quarter, {
            width: "abbreviated",
            context: "formatting"
          });
        // 1, 2, 3, 4 (narrow quarter; could be not numerical)
        case "QQQQQ":
          return localize2.quarter(quarter, {
            width: "narrow",
            context: "formatting"
          });
        // 1st quarter, 2nd quarter, ...
        case "QQQQ":
        default:
          return localize2.quarter(quarter, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // Stand-alone quarter
    q: function(date, token, localize2) {
      const quarter = Math.ceil((date.getMonth() + 1) / 3);
      switch (token) {
        // 1, 2, 3, 4
        case "q":
          return String(quarter);
        // 01, 02, 03, 04
        case "qq":
          return addLeadingZeros(quarter, 2);
        // 1st, 2nd, 3rd, 4th
        case "qo":
          return localize2.ordinalNumber(quarter, { unit: "quarter" });
        // Q1, Q2, Q3, Q4
        case "qqq":
          return localize2.quarter(quarter, {
            width: "abbreviated",
            context: "standalone"
          });
        // 1, 2, 3, 4 (narrow quarter; could be not numerical)
        case "qqqqq":
          return localize2.quarter(quarter, {
            width: "narrow",
            context: "standalone"
          });
        // 1st quarter, 2nd quarter, ...
        case "qqqq":
        default:
          return localize2.quarter(quarter, {
            width: "wide",
            context: "standalone"
          });
      }
    },
    // Month
    M: function(date, token, localize2) {
      const month = date.getMonth();
      switch (token) {
        case "M":
        case "MM":
          return lightFormatters.M(date, token);
        // 1st, 2nd, ..., 12th
        case "Mo":
          return localize2.ordinalNumber(month + 1, { unit: "month" });
        // Jan, Feb, ..., Dec
        case "MMM":
          return localize2.month(month, {
            width: "abbreviated",
            context: "formatting"
          });
        // J, F, ..., D
        case "MMMMM":
          return localize2.month(month, {
            width: "narrow",
            context: "formatting"
          });
        // January, February, ..., December
        case "MMMM":
        default:
          return localize2.month(month, { width: "wide", context: "formatting" });
      }
    },
    // Stand-alone month
    L: function(date, token, localize2) {
      const month = date.getMonth();
      switch (token) {
        // 1, 2, ..., 12
        case "L":
          return String(month + 1);
        // 01, 02, ..., 12
        case "LL":
          return addLeadingZeros(month + 1, 2);
        // 1st, 2nd, ..., 12th
        case "Lo":
          return localize2.ordinalNumber(month + 1, { unit: "month" });
        // Jan, Feb, ..., Dec
        case "LLL":
          return localize2.month(month, {
            width: "abbreviated",
            context: "standalone"
          });
        // J, F, ..., D
        case "LLLLL":
          return localize2.month(month, {
            width: "narrow",
            context: "standalone"
          });
        // January, February, ..., December
        case "LLLL":
        default:
          return localize2.month(month, { width: "wide", context: "standalone" });
      }
    },
    // Local week of year
    w: function(date, token, localize2, options) {
      const week = getWeek(date, options);
      if (token === "wo") {
        return localize2.ordinalNumber(week, { unit: "week" });
      }
      return addLeadingZeros(week, token.length);
    },
    // ISO week of year
    I: function(date, token, localize2) {
      const isoWeek = getISOWeek(date);
      if (token === "Io") {
        return localize2.ordinalNumber(isoWeek, { unit: "week" });
      }
      return addLeadingZeros(isoWeek, token.length);
    },
    // Day of the month
    d: function(date, token, localize2) {
      if (token === "do") {
        return localize2.ordinalNumber(date.getDate(), { unit: "date" });
      }
      return lightFormatters.d(date, token);
    },
    // Day of year
    D: function(date, token, localize2) {
      const dayOfYear = getDayOfYear(date);
      if (token === "Do") {
        return localize2.ordinalNumber(dayOfYear, { unit: "dayOfYear" });
      }
      return addLeadingZeros(dayOfYear, token.length);
    },
    // Day of week
    E: function(date, token, localize2) {
      const dayOfWeek = date.getDay();
      switch (token) {
        // Tue
        case "E":
        case "EE":
        case "EEE":
          return localize2.day(dayOfWeek, {
            width: "abbreviated",
            context: "formatting"
          });
        // T
        case "EEEEE":
          return localize2.day(dayOfWeek, {
            width: "narrow",
            context: "formatting"
          });
        // Tu
        case "EEEEEE":
          return localize2.day(dayOfWeek, {
            width: "short",
            context: "formatting"
          });
        // Tuesday
        case "EEEE":
        default:
          return localize2.day(dayOfWeek, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // Local day of week
    e: function(date, token, localize2, options) {
      const dayOfWeek = date.getDay();
      const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
      switch (token) {
        // Numerical value (Nth day of week with current locale or weekStartsOn)
        case "e":
          return String(localDayOfWeek);
        // Padded numerical value
        case "ee":
          return addLeadingZeros(localDayOfWeek, 2);
        // 1st, 2nd, ..., 7th
        case "eo":
          return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
        case "eee":
          return localize2.day(dayOfWeek, {
            width: "abbreviated",
            context: "formatting"
          });
        // T
        case "eeeee":
          return localize2.day(dayOfWeek, {
            width: "narrow",
            context: "formatting"
          });
        // Tu
        case "eeeeee":
          return localize2.day(dayOfWeek, {
            width: "short",
            context: "formatting"
          });
        // Tuesday
        case "eeee":
        default:
          return localize2.day(dayOfWeek, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // Stand-alone local day of week
    c: function(date, token, localize2, options) {
      const dayOfWeek = date.getDay();
      const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
      switch (token) {
        // Numerical value (same as in `e`)
        case "c":
          return String(localDayOfWeek);
        // Padded numerical value
        case "cc":
          return addLeadingZeros(localDayOfWeek, token.length);
        // 1st, 2nd, ..., 7th
        case "co":
          return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
        case "ccc":
          return localize2.day(dayOfWeek, {
            width: "abbreviated",
            context: "standalone"
          });
        // T
        case "ccccc":
          return localize2.day(dayOfWeek, {
            width: "narrow",
            context: "standalone"
          });
        // Tu
        case "cccccc":
          return localize2.day(dayOfWeek, {
            width: "short",
            context: "standalone"
          });
        // Tuesday
        case "cccc":
        default:
          return localize2.day(dayOfWeek, {
            width: "wide",
            context: "standalone"
          });
      }
    },
    // ISO day of week
    i: function(date, token, localize2) {
      const dayOfWeek = date.getDay();
      const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
      switch (token) {
        // 2
        case "i":
          return String(isoDayOfWeek);
        // 02
        case "ii":
          return addLeadingZeros(isoDayOfWeek, token.length);
        // 2nd
        case "io":
          return localize2.ordinalNumber(isoDayOfWeek, { unit: "day" });
        // Tue
        case "iii":
          return localize2.day(dayOfWeek, {
            width: "abbreviated",
            context: "formatting"
          });
        // T
        case "iiiii":
          return localize2.day(dayOfWeek, {
            width: "narrow",
            context: "formatting"
          });
        // Tu
        case "iiiiii":
          return localize2.day(dayOfWeek, {
            width: "short",
            context: "formatting"
          });
        // Tuesday
        case "iiii":
        default:
          return localize2.day(dayOfWeek, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // AM or PM
    a: function(date, token, localize2) {
      const hours = date.getHours();
      const dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
      switch (token) {
        case "a":
        case "aa":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          });
        case "aaa":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          }).toLowerCase();
        case "aaaaa":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "narrow",
            context: "formatting"
          });
        case "aaaa":
        default:
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // AM, PM, midnight, noon
    b: function(date, token, localize2) {
      const hours = date.getHours();
      let dayPeriodEnumValue;
      if (hours === 12) {
        dayPeriodEnumValue = dayPeriodEnum.noon;
      } else if (hours === 0) {
        dayPeriodEnumValue = dayPeriodEnum.midnight;
      } else {
        dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
      }
      switch (token) {
        case "b":
        case "bb":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          });
        case "bbb":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          }).toLowerCase();
        case "bbbbb":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "narrow",
            context: "formatting"
          });
        case "bbbb":
        default:
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // in the morning, in the afternoon, in the evening, at night
    B: function(date, token, localize2) {
      const hours = date.getHours();
      let dayPeriodEnumValue;
      if (hours >= 17) {
        dayPeriodEnumValue = dayPeriodEnum.evening;
      } else if (hours >= 12) {
        dayPeriodEnumValue = dayPeriodEnum.afternoon;
      } else if (hours >= 4) {
        dayPeriodEnumValue = dayPeriodEnum.morning;
      } else {
        dayPeriodEnumValue = dayPeriodEnum.night;
      }
      switch (token) {
        case "B":
        case "BB":
        case "BBB":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          });
        case "BBBBB":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "narrow",
            context: "formatting"
          });
        case "BBBB":
        default:
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // Hour [1-12]
    h: function(date, token, localize2) {
      if (token === "ho") {
        let hours = date.getHours() % 12;
        if (hours === 0) hours = 12;
        return localize2.ordinalNumber(hours, { unit: "hour" });
      }
      return lightFormatters.h(date, token);
    },
    // Hour [0-23]
    H: function(date, token, localize2) {
      if (token === "Ho") {
        return localize2.ordinalNumber(date.getHours(), { unit: "hour" });
      }
      return lightFormatters.H(date, token);
    },
    // Hour [0-11]
    K: function(date, token, localize2) {
      const hours = date.getHours() % 12;
      if (token === "Ko") {
        return localize2.ordinalNumber(hours, { unit: "hour" });
      }
      return addLeadingZeros(hours, token.length);
    },
    // Hour [1-24]
    k: function(date, token, localize2) {
      let hours = date.getHours();
      if (hours === 0) hours = 24;
      if (token === "ko") {
        return localize2.ordinalNumber(hours, { unit: "hour" });
      }
      return addLeadingZeros(hours, token.length);
    },
    // Minute
    m: function(date, token, localize2) {
      if (token === "mo") {
        return localize2.ordinalNumber(date.getMinutes(), { unit: "minute" });
      }
      return lightFormatters.m(date, token);
    },
    // Second
    s: function(date, token, localize2) {
      if (token === "so") {
        return localize2.ordinalNumber(date.getSeconds(), { unit: "second" });
      }
      return lightFormatters.s(date, token);
    },
    // Fraction of second
    S: function(date, token) {
      return lightFormatters.S(date, token);
    },
    // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
    X: function(date, token, _localize) {
      const timezoneOffset = date.getTimezoneOffset();
      if (timezoneOffset === 0) {
        return "Z";
      }
      switch (token) {
        // Hours and optional minutes
        case "X":
          return formatTimezoneWithOptionalMinutes(timezoneOffset);
        // Hours, minutes and optional seconds without `:` delimiter
        // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
        // so this token always has the same output as `XX`
        case "XXXX":
        case "XX":
          return formatTimezone(timezoneOffset);
        // Hours, minutes and optional seconds with `:` delimiter
        // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
        // so this token always has the same output as `XXX`
        case "XXXXX":
        case "XXX":
        // Hours and minutes with `:` delimiter
        default:
          return formatTimezone(timezoneOffset, ":");
      }
    },
    // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
    x: function(date, token, _localize) {
      const timezoneOffset = date.getTimezoneOffset();
      switch (token) {
        // Hours and optional minutes
        case "x":
          return formatTimezoneWithOptionalMinutes(timezoneOffset);
        // Hours, minutes and optional seconds without `:` delimiter
        // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
        // so this token always has the same output as `xx`
        case "xxxx":
        case "xx":
          return formatTimezone(timezoneOffset);
        // Hours, minutes and optional seconds with `:` delimiter
        // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
        // so this token always has the same output as `xxx`
        case "xxxxx":
        case "xxx":
        // Hours and minutes with `:` delimiter
        default:
          return formatTimezone(timezoneOffset, ":");
      }
    },
    // Timezone (GMT)
    O: function(date, token, _localize) {
      const timezoneOffset = date.getTimezoneOffset();
      switch (token) {
        // Short
        case "O":
        case "OO":
        case "OOO":
          return "GMT" + formatTimezoneShort(timezoneOffset, ":");
        // Long
        case "OOOO":
        default:
          return "GMT" + formatTimezone(timezoneOffset, ":");
      }
    },
    // Timezone (specific non-location)
    z: function(date, token, _localize) {
      const timezoneOffset = date.getTimezoneOffset();
      switch (token) {
        // Short
        case "z":
        case "zz":
        case "zzz":
          return "GMT" + formatTimezoneShort(timezoneOffset, ":");
        // Long
        case "zzzz":
        default:
          return "GMT" + formatTimezone(timezoneOffset, ":");
      }
    },
    // Seconds timestamp
    t: function(date, token, _localize) {
      const timestamp = Math.trunc(+date / 1e3);
      return addLeadingZeros(timestamp, token.length);
    },
    // Milliseconds timestamp
    T: function(date, token, _localize) {
      return addLeadingZeros(+date, token.length);
    }
  };
  function formatTimezoneShort(offset, delimiter = "") {
    const sign = offset > 0 ? "-" : "+";
    const absOffset = Math.abs(offset);
    const hours = Math.trunc(absOffset / 60);
    const minutes = absOffset % 60;
    if (minutes === 0) {
      return sign + String(hours);
    }
    return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
  }
  function formatTimezoneWithOptionalMinutes(offset, delimiter) {
    if (offset % 60 === 0) {
      const sign = offset > 0 ? "-" : "+";
      return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
    }
    return formatTimezone(offset, delimiter);
  }
  function formatTimezone(offset, delimiter = "") {
    const sign = offset > 0 ? "-" : "+";
    const absOffset = Math.abs(offset);
    const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);
    const minutes = addLeadingZeros(absOffset % 60, 2);
    return sign + hours + delimiter + minutes;
  }

  // packages/dataviews/node_modules/date-fns/_lib/format/longFormatters.js
  var dateLongFormatter = (pattern, formatLong2) => {
    switch (pattern) {
      case "P":
        return formatLong2.date({ width: "short" });
      case "PP":
        return formatLong2.date({ width: "medium" });
      case "PPP":
        return formatLong2.date({ width: "long" });
      case "PPPP":
      default:
        return formatLong2.date({ width: "full" });
    }
  };
  var timeLongFormatter = (pattern, formatLong2) => {
    switch (pattern) {
      case "p":
        return formatLong2.time({ width: "short" });
      case "pp":
        return formatLong2.time({ width: "medium" });
      case "ppp":
        return formatLong2.time({ width: "long" });
      case "pppp":
      default:
        return formatLong2.time({ width: "full" });
    }
  };
  var dateTimeLongFormatter = (pattern, formatLong2) => {
    const matchResult = pattern.match(/(P+)(p+)?/) || [];
    const datePattern = matchResult[1];
    const timePattern = matchResult[2];
    if (!timePattern) {
      return dateLongFormatter(pattern, formatLong2);
    }
    let dateTimeFormat;
    switch (datePattern) {
      case "P":
        dateTimeFormat = formatLong2.dateTime({ width: "short" });
        break;
      case "PP":
        dateTimeFormat = formatLong2.dateTime({ width: "medium" });
        break;
      case "PPP":
        dateTimeFormat = formatLong2.dateTime({ width: "long" });
        break;
      case "PPPP":
      default:
        dateTimeFormat = formatLong2.dateTime({ width: "full" });
        break;
    }
    return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
  };
  var longFormatters = {
    p: timeLongFormatter,
    P: dateTimeLongFormatter
  };

  // packages/dataviews/node_modules/date-fns/_lib/protectedTokens.js
  var dayOfYearTokenRE = /^D+$/;
  var weekYearTokenRE = /^Y+$/;
  var throwTokens = ["D", "DD", "YY", "YYYY"];
  function isProtectedDayOfYearToken(token) {
    return dayOfYearTokenRE.test(token);
  }
  function isProtectedWeekYearToken(token) {
    return weekYearTokenRE.test(token);
  }
  function warnOrThrowProtectedError(token, format6, input) {
    const _message = message(token, format6, input);
    console.warn(_message);
    if (throwTokens.includes(token)) throw new RangeError(_message);
  }
  function message(token, format6, input) {
    const subject = token[0] === "Y" ? "years" : "days of the month";
    return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format6}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
  }

  // packages/dataviews/node_modules/date-fns/format.js
  var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
  var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
  var escapedStringRegExp = /^'([^]*?)'?$/;
  var doubleQuoteRegExp = /''/g;
  var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
  function format(date, formatStr, options) {
    const defaultOptions2 = getDefaultOptions();
    const locale = options?.locale ?? defaultOptions2.locale ?? enUS;
    const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
    const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
    const originalDate = toDate(date, options?.in);
    if (!isValid(originalDate)) {
      throw new RangeError("Invalid time value");
    }
    let parts = formatStr.match(longFormattingTokensRegExp).map((substring) => {
      const firstCharacter = substring[0];
      if (firstCharacter === "p" || firstCharacter === "P") {
        const longFormatter = longFormatters[firstCharacter];
        return longFormatter(substring, locale.formatLong);
      }
      return substring;
    }).join("").match(formattingTokensRegExp).map((substring) => {
      if (substring === "''") {
        return { isToken: false, value: "'" };
      }
      const firstCharacter = substring[0];
      if (firstCharacter === "'") {
        return { isToken: false, value: cleanEscapedString(substring) };
      }
      if (formatters[firstCharacter]) {
        return { isToken: true, value: substring };
      }
      if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
        throw new RangeError(
          "Format string contains an unescaped latin alphabet character `" + firstCharacter + "`"
        );
      }
      return { isToken: false, value: substring };
    });
    if (locale.localize.preprocessor) {
      parts = locale.localize.preprocessor(originalDate, parts);
    }
    const formatterOptions = {
      firstWeekContainsDate,
      weekStartsOn,
      locale
    };
    return parts.map((part) => {
      if (!part.isToken) return part.value;
      const token = part.value;
      if (!options?.useAdditionalWeekYearTokens && isProtectedWeekYearToken(token) || !options?.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(token)) {
        warnOrThrowProtectedError(token, formatStr, String(date));
      }
      const formatter = formatters[token[0]];
      return formatter(originalDate, token, locale.localize, formatterOptions);
    }).join("");
  }
  function cleanEscapedString(input) {
    const matched = input.match(escapedStringRegExp);
    if (!matched) {
      return input;
    }
    return matched[1].replace(doubleQuoteRegExp, "'");
  }

  // packages/dataviews/node_modules/date-fns/subDays.js
  function subDays(date, amount, options) {
    return addDays(date, -amount, options);
  }

  // packages/dataviews/node_modules/date-fns/subMonths.js
  function subMonths(date, amount, options) {
    return addMonths(date, -amount, options);
  }

  // packages/dataviews/node_modules/date-fns/subWeeks.js
  function subWeeks(date, amount, options) {
    return addWeeks(date, -amount, options);
  }

  // packages/dataviews/node_modules/date-fns/subYears.js
  function subYears(date, amount, options) {
    return addYears(date, -amount, options);
  }

  // packages/dataviews/build-module/utils/operators.mjs
  var import_i18n105 = __toESM(require_i18n(), 1);
  var import_element92 = __toESM(require_element(), 1);
  var import_date2 = __toESM(require_date(), 1);
  var import_jsx_runtime216 = __toESM(require_jsx_runtime(), 1);
  var filterTextWrappers = {
    Name: /* @__PURE__ */ (0, import_jsx_runtime216.jsx)("span", { className: "dataviews-filters__summary-filter-text-name" }),
    Value: /* @__PURE__ */ (0, import_jsx_runtime216.jsx)("span", { className: "dataviews-filters__summary-filter-text-value" })
  };
  function getRelativeDate(value, unit) {
    switch (unit) {
      case "days":
        return subDays(/* @__PURE__ */ new Date(), value);
      case "weeks":
        return subWeeks(/* @__PURE__ */ new Date(), value);
      case "months":
        return subMonths(/* @__PURE__ */ new Date(), value);
      case "years":
        return subYears(/* @__PURE__ */ new Date(), value);
      default:
        return /* @__PURE__ */ new Date();
    }
  }
  var isNoneOperatorDefinition = {
    /* translators: DataViews operator name */
    label: (0, import_i18n105.__)("Is none of"),
    filterText: (filter, activeElements) => (0, import_element92.createInterpolateElement)(
      (0, import_i18n105.sprintf)(
        /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is none of: Admin, Editor". */
        (0, import_i18n105.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),
        filter.name,
        activeElements.map((element) => element.label).join(", ")
      ),
      filterTextWrappers
    ),
    filter: ((item, field, filterValue) => {
      if (!filterValue?.length) {
        return true;
      }
      const fieldValue = field.getValue({ item });
      if (Array.isArray(fieldValue)) {
        return !filterValue.some(
          (fv) => fieldValue.includes(fv)
        );
      } else if (typeof fieldValue === "string") {
        return !filterValue.includes(fieldValue);
      }
      return false;
    }),
    selection: "multi"
  };
  var OPERATORS = [
    {
      name: OPERATOR_IS_ANY2,
      /* translators: DataViews operator name */
      label: (0, import_i18n105.__)("Includes"),
      filterText: (filter, activeElements) => (0, import_element92.createInterpolateElement)(
        (0, import_i18n105.sprintf)(
          /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is any: Admin, Editor". */
          (0, import_i18n105.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements.map((element) => element.label).join(", ")
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (!filterValue?.length) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        if (Array.isArray(fieldValue)) {
          return filterValue.some(
            (fv) => fieldValue.includes(fv)
          );
        } else if (typeof fieldValue === "string") {
          return filterValue.includes(fieldValue);
        }
        return false;
      },
      selection: "multi"
    },
    {
      name: OPERATOR_IS_NONE2,
      ...isNoneOperatorDefinition
    },
    {
      name: OPERATOR_IS_ALL,
      /* translators: DataViews operator name */
      label: (0, import_i18n105.__)("Includes all"),
      filterText: (filter, activeElements) => (0, import_element92.createInterpolateElement)(
        (0, import_i18n105.sprintf)(
          /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author includes all: Admin, Editor". */
          (0, import_i18n105.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements.map((element) => element.label).join(", ")
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (!filterValue?.length) {
          return true;
        }
        return filterValue.every((value) => {
          return field.getValue({ item })?.includes(value);
        });
      },
      selection: "multi"
    },
    {
      name: OPERATOR_IS_NOT_ALL,
      ...isNoneOperatorDefinition
    },
    {
      name: OPERATOR_BETWEEN,
      /* translators: DataViews operator name */
      label: (0, import_i18n105.__)("Between (inc)"),
      filterText: (filter, activeElements) => (0, import_element92.createInterpolateElement)(
        (0, import_i18n105.sprintf)(
          /* translators: 1: Filter name (e.g. "Item count"). 2: Filter value min. 3: Filter value max. e.g.: "Item count between (inc): 10 and 180". */
          (0, import_i18n105.__)(
            "<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"
          ),
          filter.name,
          activeElements[0].label[0],
          activeElements[0].label[1]
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (!Array.isArray(filterValue) || filterValue.length !== 2 || filterValue[0] === void 0 || filterValue[1] === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        if (typeof fieldValue === "number" || fieldValue instanceof Date || typeof fieldValue === "string") {
          return fieldValue >= filterValue[0] && fieldValue <= filterValue[1];
        }
        return false;
      },
      selection: "custom"
    },
    {
      name: OPERATOR_IN_THE_PAST,
      /* translators: DataViews operator name */
      label: (0, import_i18n105.__)("In the past"),
      filterText: (filter, activeElements) => (0, import_element92.createInterpolateElement)(
        (0, import_i18n105.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "7 days"): "Date is in the past: 7 days". */
          (0, import_i18n105.__)(
            "<Name>%1$s is in the past: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          `${activeElements[0].value.value} ${activeElements[0].value.unit}`
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue?.value === void 0 || filterValue?.unit === void 0) {
          return true;
        }
        const targetDate = getRelativeDate(
          filterValue.value,
          filterValue.unit
        );
        const fieldValue = (0, import_date2.getDate)(field.getValue({ item }));
        return fieldValue >= targetDate && fieldValue <= /* @__PURE__ */ new Date();
      },
      selection: "custom"
    },
    {
      name: OPERATOR_OVER,
      /* translators: DataViews operator name */
      label: (0, import_i18n105.__)("Over"),
      filterText: (filter, activeElements) => (0, import_element92.createInterpolateElement)(
        (0, import_i18n105.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "7 days"): "Date is over: 7 days". */
          (0, import_i18n105.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),
          filter.name,
          `${activeElements[0].value.value} ${activeElements[0].value.unit}`
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue?.value === void 0 || filterValue?.unit === void 0) {
          return true;
        }
        const targetDate = getRelativeDate(
          filterValue.value,
          filterValue.unit
        );
        const fieldValue = (0, import_date2.getDate)(field.getValue({ item }));
        return fieldValue < targetDate;
      },
      selection: "custom"
    },
    {
      name: OPERATOR_IS2,
      /* translators: DataViews operator name */
      label: (0, import_i18n105.__)("Is"),
      filterText: (filter, activeElements) => (0, import_element92.createInterpolateElement)(
        (0, import_i18n105.sprintf)(
          /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is: Admin". */
          (0, import_i18n105.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        return filterValue === field.getValue({ item }) || filterValue === void 0;
      },
      selection: "single"
    },
    {
      name: OPERATOR_IS_NOT,
      /* translators: DataViews operator name */
      label: (0, import_i18n105.__)("Is not"),
      filterText: (filter, activeElements) => (0, import_element92.createInterpolateElement)(
        (0, import_i18n105.sprintf)(
          /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is not: Admin". */
          (0, import_i18n105.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        return filterValue !== field.getValue({ item });
      },
      selection: "single"
    },
    {
      name: OPERATOR_LESS_THAN,
      /* translators: DataViews operator name */
      label: (0, import_i18n105.__)("Less than"),
      filterText: (filter, activeElements) => (0, import_element92.createInterpolateElement)(
        (0, import_i18n105.sprintf)(
          /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is less than: 10". */
          (0, import_i18n105.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return fieldValue < filterValue;
      },
      selection: "single"
    },
    {
      name: OPERATOR_GREATER_THAN,
      /* translators: DataViews operator name */
      label: (0, import_i18n105.__)("Greater than"),
      filterText: (filter, activeElements) => (0, import_element92.createInterpolateElement)(
        (0, import_i18n105.sprintf)(
          /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is greater than: 10". */
          (0, import_i18n105.__)(
            "<Name>%1$s is greater than: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return fieldValue > filterValue;
      },
      selection: "single"
    },
    {
      name: OPERATOR_LESS_THAN_OR_EQUAL,
      /* translators: DataViews operator name */
      label: (0, import_i18n105.__)("Less than or equal"),
      filterText: (filter, activeElements) => (0, import_element92.createInterpolateElement)(
        (0, import_i18n105.sprintf)(
          /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is less than or equal to: 10". */
          (0, import_i18n105.__)(
            "<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return fieldValue <= filterValue;
      },
      selection: "single"
    },
    {
      name: OPERATOR_GREATER_THAN_OR_EQUAL,
      /* translators: DataViews operator name */
      label: (0, import_i18n105.__)("Greater than or equal"),
      filterText: (filter, activeElements) => (0, import_element92.createInterpolateElement)(
        (0, import_i18n105.sprintf)(
          /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is greater than or equal to: 10". */
          (0, import_i18n105.__)(
            "<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return fieldValue >= filterValue;
      },
      selection: "single"
    },
    {
      name: OPERATOR_BEFORE2,
      /* translators: DataViews operator name */
      label: (0, import_i18n105.__)("Before"),
      filterText: (filter, activeElements) => (0, import_element92.createInterpolateElement)(
        (0, import_i18n105.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is before: 2024-01-01". */
          (0, import_i18n105.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const filterDate = (0, import_date2.getDate)(filterValue);
        const fieldDate = (0, import_date2.getDate)(field.getValue({ item }));
        return fieldDate < filterDate;
      },
      selection: "single"
    },
    {
      name: OPERATOR_AFTER2,
      /* translators: DataViews operator name */
      label: (0, import_i18n105.__)("After"),
      filterText: (filter, activeElements) => (0, import_element92.createInterpolateElement)(
        (0, import_i18n105.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is after: 2024-01-01". */
          (0, import_i18n105.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const filterDate = (0, import_date2.getDate)(filterValue);
        const fieldDate = (0, import_date2.getDate)(field.getValue({ item }));
        return fieldDate > filterDate;
      },
      selection: "single"
    },
    {
      name: OPERATOR_BEFORE_INC,
      /* translators: DataViews operator name */
      label: (0, import_i18n105.__)("Before (inc)"),
      filterText: (filter, activeElements) => (0, import_element92.createInterpolateElement)(
        (0, import_i18n105.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is on or before: 2024-01-01". */
          (0, import_i18n105.__)(
            "<Name>%1$s is on or before: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const filterDate = (0, import_date2.getDate)(filterValue);
        const fieldDate = (0, import_date2.getDate)(field.getValue({ item }));
        return fieldDate <= filterDate;
      },
      selection: "single"
    },
    {
      name: OPERATOR_AFTER_INC,
      /* translators: DataViews operator name */
      label: (0, import_i18n105.__)("After (inc)"),
      filterText: (filter, activeElements) => (0, import_element92.createInterpolateElement)(
        (0, import_i18n105.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is on or after: 2024-01-01". */
          (0, import_i18n105.__)(
            "<Name>%1$s is on or after: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const filterDate = (0, import_date2.getDate)(filterValue);
        const fieldDate = (0, import_date2.getDate)(field.getValue({ item }));
        return fieldDate >= filterDate;
      },
      selection: "single"
    },
    {
      name: OPERATOR_CONTAINS,
      /* translators: DataViews operator name */
      label: (0, import_i18n105.__)("Contains"),
      filterText: (filter, activeElements) => (0, import_element92.createInterpolateElement)(
        (0, import_i18n105.sprintf)(
          /* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title contains: Hello". */
          (0, import_i18n105.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return typeof fieldValue === "string" && filterValue && fieldValue.toLowerCase().includes(String(filterValue).toLowerCase());
      },
      selection: "single"
    },
    {
      name: OPERATOR_NOT_CONTAINS,
      /* translators: DataViews operator name */
      label: (0, import_i18n105.__)("Doesn't contain"),
      filterText: (filter, activeElements) => (0, import_element92.createInterpolateElement)(
        (0, import_i18n105.sprintf)(
          /* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title doesn't contain: Hello". */
          (0, import_i18n105.__)(
            "<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return typeof fieldValue === "string" && filterValue && !fieldValue.toLowerCase().includes(String(filterValue).toLowerCase());
      },
      selection: "single"
    },
    {
      name: OPERATOR_STARTS_WITH,
      /* translators: DataViews operator name */
      label: (0, import_i18n105.__)("Starts with"),
      filterText: (filter, activeElements) => (0, import_element92.createInterpolateElement)(
        (0, import_i18n105.sprintf)(
          /* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title starts with: Hello". */
          (0, import_i18n105.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return typeof fieldValue === "string" && filterValue && fieldValue.toLowerCase().startsWith(String(filterValue).toLowerCase());
      },
      selection: "single"
    },
    {
      name: OPERATOR_ON,
      /* translators: DataViews operator name */
      label: (0, import_i18n105.__)("On"),
      filterText: (filter, activeElements) => (0, import_element92.createInterpolateElement)(
        (0, import_i18n105.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is: 2024-01-01". */
          (0, import_i18n105.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const filterDate = (0, import_date2.getDate)(filterValue);
        const fieldDate = (0, import_date2.getDate)(field.getValue({ item }));
        return filterDate.getTime() === fieldDate.getTime();
      },
      selection: "single"
    },
    {
      name: OPERATOR_NOT_ON,
      /* translators: DataViews operator name */
      label: (0, import_i18n105.__)("Not on"),
      filterText: (filter, activeElements) => (0, import_element92.createInterpolateElement)(
        (0, import_i18n105.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is not: 2024-01-01". */
          (0, import_i18n105.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const filterDate = (0, import_date2.getDate)(filterValue);
        const fieldDate = (0, import_date2.getDate)(field.getValue({ item }));
        return filterDate.getTime() !== fieldDate.getTime();
      },
      selection: "single"
    }
  ];
  var getOperatorByName = (name2) => OPERATORS.find((op) => op.name === name2);
  var getAllOperatorNames = () => OPERATORS.map((op) => op.name);
  var isSingleSelectionOperator = (name2) => OPERATORS.filter((op) => op.selection === "single").some(
    (op) => op.name === name2
  );
  var isRegisteredOperator = (name2) => OPERATORS.some((op) => op.name === name2);

  // packages/dataviews/build-module/components/dataviews-filters/filter.mjs
  var import_jsx_runtime217 = __toESM(require_jsx_runtime(), 1);
  var ENTER4 = "Enter";
  var SPACE3 = " ";
  var FilterText = ({
    activeElements,
    filterInView,
    filter
  }) => {
    if (activeElements === void 0 || activeElements.length === 0) {
      return filter.name;
    }
    const operator = getOperatorByName(filterInView?.operator);
    if (operator !== void 0) {
      return operator.filterText(filter, activeElements);
    }
    return (0, import_i18n106.sprintf)(
      /* translators: 1: Filter name e.g.: "Unknown status for Author". */
      (0, import_i18n106.__)("Unknown status for %1$s"),
      filter.name
    );
  };
  function OperatorSelector({
    filter,
    view,
    onChangeView
  }) {
    const operatorOptions = filter.operators?.map((operator) => ({
      value: operator,
      label: getOperatorByName(operator)?.label || operator
    }));
    const currentFilter = view.filters?.find(
      (_filter) => _filter.field === filter.field
    );
    const value = currentFilter?.operator || filter.operators[0];
    return operatorOptions.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)(
      Stack,
      {
        direction: "row",
        gap: "sm",
        justify: "flex-start",
        className: "dataviews-filters__summary-operators-container",
        align: "center",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(import_components111.FlexItem, { className: "dataviews-filters__summary-operators-filter-name", children: filter.name }),
          /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
            import_components111.SelectControl,
            {
              className: "dataviews-filters__summary-operators-filter-select",
              label: (0, import_i18n106.__)("Conditions"),
              value,
              options: operatorOptions,
              onChange: (newValue) => {
                const newOperator = newValue;
                const currentOperator = currentFilter?.operator;
                const newFilters = currentFilter ? [
                  ...(view.filters ?? []).map(
                    (_filter) => {
                      if (_filter.field === filter.field) {
                        const currentOpSelectionModel = getOperatorByName(
                          currentOperator
                        )?.selection;
                        const newOpSelectionModel = getOperatorByName(
                          newOperator
                        )?.selection;
                        const shouldResetValue = currentOpSelectionModel !== newOpSelectionModel || [
                          currentOpSelectionModel,
                          newOpSelectionModel
                        ].includes("custom");
                        return {
                          ..._filter,
                          value: shouldResetValue ? void 0 : _filter.value,
                          operator: newOperator
                        };
                      }
                      return _filter;
                    }
                  )
                ] : [
                  ...view.filters ?? [],
                  {
                    field: filter.field,
                    operator: newOperator,
                    value: void 0
                  }
                ];
                onChangeView({
                  ...view,
                  page: 1,
                  filters: newFilters
                });
              },
              size: "small",
              variant: "minimal",
              hideLabelFromVision: true
            }
          )
        ]
      }
    );
  }
  function Filter({
    addFilterRef,
    openedFilter,
    fields,
    ...commonProps
  }) {
    const toggleRef = (0, import_element93.useRef)(null);
    const { filter, view, onChangeView } = commonProps;
    const filterInView = view.filters?.find(
      (f2) => f2.field === filter.field
    );
    let activeElements = [];
    const field = (0, import_element93.useMemo)(() => {
      const currentField = fields.find((f2) => f2.id === filter.field);
      if (currentField) {
        return {
          ...currentField,
          // Configure getValue as if Item was a plain object.
          // See related input-widget.tsx
          getValue: ({ item }) => item[currentField.id]
        };
      }
      return currentField;
    }, [fields, filter.field]);
    const { elements: elements2 } = useElements({
      elements: filter.elements,
      getElements: filter.getElements
    });
    if (elements2.length > 0) {
      activeElements = elements2.filter((element) => {
        if (filter.singleSelection) {
          return element.value === filterInView?.value;
        }
        return filterInView?.value?.includes(element.value);
      });
    } else if (Array.isArray(filterInView?.value)) {
      const label = filterInView.value.map((v2) => {
        const formattedValue = field?.getValueFormatted({
          item: { [field.id]: v2 },
          field
        });
        return formattedValue || String(v2);
      });
      activeElements = [
        {
          value: filterInView.value,
          // @ts-ignore
          label
        }
      ];
    } else if (typeof filterInView?.value === "object") {
      activeElements = [
        { value: filterInView.value, label: filterInView.value }
      ];
    } else if (filterInView?.value !== void 0) {
      const label = field !== void 0 ? field.getValueFormatted({
        item: { [field.id]: filterInView.value },
        field
      }) : String(filterInView.value);
      activeElements = [
        {
          value: filterInView.value,
          label
        }
      ];
    }
    const isPrimary = filter.isPrimary;
    const isLocked = filterInView?.isLocked;
    const hasValues = !isLocked && filterInView?.value !== void 0;
    const canResetOrRemove = !isLocked && (!isPrimary || hasValues);
    return /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
      import_components111.Dropdown,
      {
        defaultOpen: openedFilter === filter.field,
        contentClassName: "dataviews-filters__summary-popover",
        popoverProps: { placement: "bottom-start", role: "dialog" },
        onClose: () => {
          toggleRef.current?.focus();
        },
        renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)("div", { className: "dataviews-filters__summary-chip-container", children: [
          /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
            import_components111.Tooltip,
            {
              text: (0, import_i18n106.sprintf)(
                /* translators: 1: Filter name. */
                (0, import_i18n106.__)("Filter by: %1$s"),
                filter.name.toLowerCase()
              ),
              placement: "top",
              children: /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
                "div",
                {
                  className: clsx_default(
                    "dataviews-filters__summary-chip",
                    {
                      "has-reset": canResetOrRemove,
                      "has-values": hasValues,
                      "is-not-clickable": isLocked
                    }
                  ),
                  role: "button",
                  tabIndex: isLocked ? -1 : 0,
                  onClick: () => {
                    if (!isLocked) {
                      onToggle();
                    }
                  },
                  onKeyDown: (event) => {
                    if (!isLocked && [ENTER4, SPACE3].includes(event.key)) {
                      onToggle();
                      event.preventDefault();
                    }
                  },
                  "aria-disabled": isLocked,
                  "aria-pressed": isOpen,
                  "aria-expanded": isOpen,
                  ref: toggleRef,
                  children: /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
                    FilterText,
                    {
                      activeElements,
                      filterInView,
                      filter
                    }
                  )
                }
              )
            }
          ),
          canResetOrRemove && /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
            import_components111.Tooltip,
            {
              text: isPrimary ? (0, import_i18n106.__)("Reset") : (0, import_i18n106.__)("Remove"),
              placement: "top",
              children: /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
                "button",
                {
                  className: clsx_default(
                    "dataviews-filters__summary-chip-remove",
                    { "has-values": hasValues }
                  ),
                  onClick: () => {
                    onChangeView({
                      ...view,
                      page: 1,
                      filters: view.filters?.filter(
                        (_filter) => _filter.field !== filter.field
                      )
                    });
                    if (!isPrimary) {
                      addFilterRef.current?.focus();
                    } else {
                      toggleRef.current?.focus();
                    }
                  },
                  children: /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(import_components111.Icon, { icon: close_small_default })
                }
              )
            }
          )
        ] }),
        renderContent: () => {
          return /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)(Stack, { direction: "column", justify: "flex-start", children: [
            /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(OperatorSelector, { ...commonProps }),
            commonProps.filter.hasElements ? /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
              SearchWidget,
              {
                ...commonProps,
                filter: {
                  ...commonProps.filter,
                  elements: elements2
                }
              }
            ) : /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(InputWidget, { ...commonProps, fields })
          ] });
        }
      }
    );
  }

  // packages/dataviews/build-module/components/dataviews-filters/add-filter.mjs
  var import_components112 = __toESM(require_components(), 1);
  var import_i18n107 = __toESM(require_i18n(), 1);
  var import_element94 = __toESM(require_element(), 1);
  var import_jsx_runtime218 = __toESM(require_jsx_runtime(), 1);
  var { Menu: Menu8 } = unlock3(import_components112.privateApis);
  function AddFilterMenu({
    filters,
    view,
    onChangeView,
    setOpenedFilter,
    triggerProps
  }) {
    const inactiveFilters = filters.filter((filter) => !filter.isVisible);
    return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)(Menu8, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(Menu8.TriggerButton, { ...triggerProps }),
      /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(Menu8.Popover, { children: inactiveFilters.map((filter) => {
        return /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          Menu8.Item,
          {
            onClick: () => {
              setOpenedFilter(filter.field);
              onChangeView({
                ...view,
                page: 1,
                filters: [
                  ...view.filters || [],
                  {
                    field: filter.field,
                    value: void 0,
                    operator: filter.operators[0]
                  }
                ]
              });
            },
            children: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(Menu8.ItemLabel, { children: filter.name })
          },
          filter.field
        );
      }) })
    ] });
  }
  function AddFilter({ filters, view, onChangeView, setOpenedFilter }, ref) {
    if (!filters.length || filters.every(({ isPrimary }) => isPrimary)) {
      return null;
    }
    const inactiveFilters = filters.filter((filter) => !filter.isVisible);
    return /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
      AddFilterMenu,
      {
        triggerProps: {
          render: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
            import_components112.Button,
            {
              accessibleWhenDisabled: true,
              size: "compact",
              className: "dataviews-filters-button",
              variant: "tertiary",
              disabled: !inactiveFilters.length,
              ref
            }
          ),
          children: (0, import_i18n107.__)("Add filter")
        },
        ...{ filters, view, onChangeView, setOpenedFilter }
      }
    );
  }
  var add_filter_default = (0, import_element94.forwardRef)(AddFilter);

  // packages/dataviews/build-module/components/dataviews-filters/reset-filters.mjs
  var import_components113 = __toESM(require_components(), 1);
  var import_i18n108 = __toESM(require_i18n(), 1);
  var import_jsx_runtime219 = __toESM(require_jsx_runtime(), 1);
  function ResetFilter({
    filters,
    view,
    onChangeView
  }) {
    const isPrimary = (field) => filters.some(
      (_filter) => _filter.field === field && _filter.isPrimary
    );
    const isDisabled = !view.search && !view.filters?.some(
      (_filter) => !_filter.isLocked && (_filter.value !== void 0 || !isPrimary(_filter.field))
    );
    return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
      import_components113.Button,
      {
        disabled: isDisabled,
        accessibleWhenDisabled: true,
        size: "compact",
        variant: "tertiary",
        className: "dataviews-filters__reset-button",
        onClick: () => {
          onChangeView({
            ...view,
            page: 1,
            search: "",
            filters: view.filters?.filter((f2) => !!f2.isLocked) || []
          });
        },
        children: (0, import_i18n108.__)("Reset")
      }
    );
  }

  // packages/dataviews/build-module/components/dataviews-filters/use-filters.mjs
  var import_element95 = __toESM(require_element(), 1);
  function useFilters(fields, view) {
    return (0, import_element95.useMemo)(() => {
      const filters = [];
      fields.forEach((field) => {
        if (field.filterBy === false || !field.hasElements && !field.Edit) {
          return;
        }
        const operators = field.filterBy.operators;
        const isPrimary = !!field.filterBy?.isPrimary;
        const isLocked = view.filters?.some(
          (f2) => f2.field === field.id && !!f2.isLocked
        ) ?? false;
        filters.push({
          field: field.id,
          name: field.label,
          elements: field.elements,
          getElements: field.getElements,
          hasElements: field.hasElements,
          singleSelection: operators.some(
            (op) => isSingleSelectionOperator(op)
          ),
          operators,
          isVisible: isLocked || isPrimary || !!view.filters?.some(
            (f2) => f2.field === field.id && isRegisteredOperator(f2.operator)
          ),
          isPrimary,
          isLocked
        });
      });
      filters.sort((a2, b2) => {
        if (a2.isLocked && !b2.isLocked) {
          return -1;
        }
        if (!a2.isLocked && b2.isLocked) {
          return 1;
        }
        if (a2.isPrimary && !b2.isPrimary) {
          return -1;
        }
        if (!a2.isPrimary && b2.isPrimary) {
          return 1;
        }
        return a2.name.localeCompare(b2.name);
      });
      return filters;
    }, [fields, view]);
  }
  var use_filters_default = useFilters;

  // packages/dataviews/build-module/components/dataviews-filters/filters.mjs
  var import_jsx_runtime220 = __toESM(require_jsx_runtime(), 1);
  function Filters({ className }) {
    const { fields, view, onChangeView, openedFilter, setOpenedFilter } = (0, import_element96.useContext)(dataviews_context_default);
    const addFilterRef = (0, import_element96.useRef)(null);
    const filters = use_filters_default(fields, view);
    const addFilter = /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
      add_filter_default,
      {
        filters,
        view,
        onChangeView,
        ref: addFilterRef,
        setOpenedFilter
      },
      "add-filter"
    );
    const visibleFilters = filters.filter((filter) => filter.isVisible);
    if (visibleFilters.length === 0) {
      return null;
    }
    const filterComponents = [
      ...visibleFilters.map((filter) => {
        return /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
          Filter,
          {
            filter,
            view,
            fields,
            onChangeView,
            addFilterRef,
            openedFilter
          },
          filter.field
        );
      }),
      addFilter
    ];
    filterComponents.push(
      /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
        ResetFilter,
        {
          filters,
          view,
          onChangeView
        },
        "reset-filters"
      )
    );
    return /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
      Stack,
      {
        direction: "row",
        justify: "flex-start",
        gap: "sm",
        style: { width: "fit-content" },
        wrap: "wrap",
        className,
        children: filterComponents
      }
    );
  }
  var filters_default = (0, import_element96.memo)(Filters);

  // packages/dataviews/build-module/components/dataviews-filters/toggle.mjs
  var import_element97 = __toESM(require_element(), 1);
  var import_components114 = __toESM(require_components(), 1);
  var import_i18n109 = __toESM(require_i18n(), 1);
  var import_jsx_runtime221 = __toESM(require_jsx_runtime(), 1);
  function FiltersToggle() {
    const {
      filters,
      view,
      onChangeView,
      setOpenedFilter,
      isShowingFilter,
      setIsShowingFilter
    } = (0, import_element97.useContext)(dataviews_context_default);
    const buttonRef = (0, import_element97.useRef)(null);
    const onChangeViewWithFilterVisibility = (0, import_element97.useCallback)(
      (_view) => {
        onChangeView(_view);
        setIsShowingFilter(true);
      },
      [onChangeView, setIsShowingFilter]
    );
    if (filters.length === 0) {
      return null;
    }
    const hasVisibleFilters = filters.some((filter) => filter.isVisible);
    const addFilterButtonProps = {
      label: (0, import_i18n109.__)("Add filter"),
      "aria-expanded": false,
      isPressed: false
    };
    const toggleFiltersButtonProps = {
      label: (0, import_i18n109._x)("Filter", "verb"),
      "aria-expanded": isShowingFilter,
      isPressed: isShowingFilter,
      onClick: () => {
        if (!isShowingFilter) {
          setOpenedFilter(null);
        }
        setIsShowingFilter(!isShowingFilter);
      }
    };
    const hasPrimaryOrLockedFilters = filters.some(
      (filter) => filter.isPrimary || filter.isLocked
    );
    const buttonComponent = /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
      import_components114.Button,
      {
        ref: buttonRef,
        className: "dataviews-filters__visibility-toggle",
        size: "compact",
        icon: funnel_default,
        disabled: hasPrimaryOrLockedFilters,
        accessibleWhenDisabled: true,
        ...hasVisibleFilters ? toggleFiltersButtonProps : addFilterButtonProps
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime221.jsx)("div", { className: "dataviews-filters__container-visibility-toggle", children: !hasVisibleFilters ? /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
      AddFilterMenu,
      {
        filters,
        view,
        onChangeView: onChangeViewWithFilterVisibility,
        setOpenedFilter,
        triggerProps: { render: buttonComponent }
      }
    ) : /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
      FilterVisibilityToggle,
      {
        buttonRef,
        filtersCount: view.filters?.length,
        children: buttonComponent
      }
    ) });
  }
  function FilterVisibilityToggle({
    buttonRef,
    filtersCount,
    children
  }) {
    (0, import_element97.useEffect)(
      () => () => {
        buttonRef.current?.focus();
      },
      [buttonRef]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)(import_jsx_runtime221.Fragment, { children: [
      children,
      !!filtersCount && /* @__PURE__ */ (0, import_jsx_runtime221.jsx)("span", { className: "dataviews-filters-toggle__count", children: filtersCount })
    ] });
  }
  var toggle_default = FiltersToggle;

  // packages/dataviews/build-module/components/dataviews-filters/filters-toggled.mjs
  var import_element98 = __toESM(require_element(), 1);
  var import_jsx_runtime222 = __toESM(require_jsx_runtime(), 1);
  function FiltersToggled(props) {
    const { isShowingFilter } = (0, import_element98.useContext)(dataviews_context_default);
    if (!isShowingFilter) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(filters_default, { ...props });
  }
  var filters_toggled_default = FiltersToggled;

  // packages/dataviews/build-module/components/dataviews-layout/index.mjs
  var import_element99 = __toESM(require_element(), 1);
  var import_components115 = __toESM(require_components(), 1);
  var import_i18n110 = __toESM(require_i18n(), 1);
  var import_jsx_runtime223 = __toESM(require_jsx_runtime(), 1);
  function DataViewsLayout({ className }) {
    const {
      actions = [],
      data,
      fields,
      getItemId: getItemId2,
      getItemLevel: getItemLevel2,
      hasInitiallyLoaded,
      isLoading,
      view,
      onChangeView,
      selection,
      onChangeSelection,
      setOpenedFilter,
      onClickItem,
      isItemClickable,
      renderItemLink,
      defaultLayouts: defaultLayouts4,
      empty = /* @__PURE__ */ (0, import_jsx_runtime223.jsx)("p", { children: (0, import_i18n110.__)("No results") })
    } = (0, import_element99.useContext)(dataviews_context_default);
    const isDelayedInitialLoading = useDelayedLoading(!hasInitiallyLoaded, {
      delay: 200
    });
    if (!hasInitiallyLoaded) {
      if (!isDelayedInitialLoading) {
        return null;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime223.jsx)("div", { className: "dataviews-loading", children: /* @__PURE__ */ (0, import_jsx_runtime223.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(import_components115.Spinner, {}) }) });
    }
    const ViewComponent = VIEW_LAYOUTS.find(
      (v2) => v2.type === view.type && defaultLayouts4[v2.type]
    )?.component;
    return /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(
      ViewComponent,
      {
        className,
        actions,
        data,
        fields,
        getItemId: getItemId2,
        getItemLevel: getItemLevel2,
        isLoading,
        onChangeView,
        onChangeSelection,
        selection,
        setOpenedFilter,
        onClickItem,
        renderItemLink,
        isItemClickable,
        view,
        empty
      }
    );
  }

  // packages/dataviews/build-module/components/dataviews-footer/index.mjs
  var import_element100 = __toESM(require_element(), 1);
  var import_jsx_runtime224 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_ARRAY8 = [];
  function DataViewsFooter() {
    const {
      view,
      paginationInfo: { totalItems = 0, totalPages },
      data,
      actions = EMPTY_ARRAY8,
      isLoading,
      hasInitiallyLoaded,
      hasInfiniteScrollHandler
    } = (0, import_element100.useContext)(dataviews_context_default);
    const isRefreshing = !!isLoading && hasInitiallyLoaded && !hasInfiniteScrollHandler && !!data?.length;
    const isDelayedRefreshing = useDelayedLoading(!!isRefreshing);
    const hasBulkActions = useSomeItemHasAPossibleBulkAction(actions, data) && [LAYOUT_TABLE2, LAYOUT_GRID2].includes(view.type);
    if (!isRefreshing && (!totalItems || !totalPages || totalPages <= 1 && !hasBulkActions)) {
      return null;
    }
    return (!!totalItems || isRefreshing) && /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
      "div",
      {
        className: "dataviews-footer",
        inert: isRefreshing ? "true" : void 0,
        children: /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)(
          Stack,
          {
            direction: "row",
            justify: "end",
            align: "center",
            className: clsx_default("dataviews-footer__content", {
              "is-refreshing": isDelayedRefreshing
            }),
            gap: "sm",
            children: [
              hasBulkActions && /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(BulkActionsFooter, {}),
              /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(dataviews_pagination_default, {})
            ]
          }
        )
      }
    );
  }

  // packages/dataviews/build-module/components/dataviews-search/index.mjs
  var import_i18n111 = __toESM(require_i18n(), 1);
  var import_element101 = __toESM(require_element(), 1);
  var import_components116 = __toESM(require_components(), 1);
  var import_compose21 = __toESM(require_compose(), 1);
  var import_jsx_runtime225 = __toESM(require_jsx_runtime(), 1);
  var DataViewsSearch = (0, import_element101.memo)(function Search({ label }) {
    const { view, onChangeView } = (0, import_element101.useContext)(dataviews_context_default);
    const [search, setSearch, debouncedSearch] = (0, import_compose21.useDebouncedInput)(
      view.search
    );
    (0, import_element101.useEffect)(() => {
      setSearch(view.search ?? "");
    }, [view.search, setSearch]);
    const onChangeViewRef = (0, import_element101.useRef)(onChangeView);
    const viewRef = (0, import_element101.useRef)(view);
    (0, import_element101.useEffect)(() => {
      onChangeViewRef.current = onChangeView;
      viewRef.current = view;
    }, [onChangeView, view]);
    (0, import_element101.useEffect)(() => {
      if (debouncedSearch !== viewRef.current?.search) {
        onChangeViewRef.current({
          ...viewRef.current,
          page: 1,
          search: debouncedSearch
        });
      }
    }, [debouncedSearch]);
    const searchLabel = label || (0, import_i18n111.__)("Search");
    return /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
      import_components116.SearchControl,
      {
        className: "dataviews-search",
        onChange: setSearch,
        value: search,
        label: searchLabel,
        placeholder: searchLabel,
        size: "compact"
      }
    );
  });
  var dataviews_search_default = DataViewsSearch;

  // packages/dataviews/build-module/components/dataviews-view-config/index.mjs
  var import_components118 = __toESM(require_components(), 1);
  var import_i18n113 = __toESM(require_i18n(), 1);
  var import_element103 = __toESM(require_element(), 1);
  var import_warning = __toESM(require_warning(), 1);
  var import_compose22 = __toESM(require_compose(), 1);

  // packages/dataviews/build-module/components/dataviews-view-config/infinite-scroll-toggle.mjs
  var import_components117 = __toESM(require_components(), 1);
  var import_i18n112 = __toESM(require_i18n(), 1);
  var import_element102 = __toESM(require_element(), 1);
  var import_jsx_runtime226 = __toESM(require_jsx_runtime(), 1);
  function InfiniteScrollToggle() {
    const context = (0, import_element102.useContext)(dataviews_context_default);
    const { view, onChangeView } = context;
    const infiniteScrollEnabled = view.infiniteScrollEnabled ?? false;
    if (!context.hasInfiniteScrollHandler) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
      import_components117.ToggleControl,
      {
        label: (0, import_i18n112.__)("Enable infinite scroll"),
        help: (0, import_i18n112.__)(
          "Automatically load more content as you scroll, instead of showing pagination links."
        ),
        checked: infiniteScrollEnabled,
        onChange: (newValue) => {
          onChangeView({
            ...view,
            infiniteScrollEnabled: newValue
          });
        }
      }
    );
  }

  // packages/dataviews/build-module/components/dataviews-view-config/index.mjs
  var import_jsx_runtime227 = __toESM(require_jsx_runtime(), 1);
  var { Menu: Menu9 } = unlock3(import_components118.privateApis);
  var DATAVIEWS_CONFIG_POPOVER_PROPS = {
    className: "dataviews-config__popover",
    placement: "bottom-end",
    offset: 9
  };
  function ViewTypeMenu() {
    const { view, onChangeView, defaultLayouts: defaultLayouts4 } = (0, import_element103.useContext)(dataviews_context_default);
    const availableLayouts = Object.keys(defaultLayouts4);
    if (availableLayouts.length <= 1) {
      return null;
    }
    const activeView = VIEW_LAYOUTS.find((v2) => view.type === v2.type);
    return /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(Menu9, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
        Menu9.TriggerButton,
        {
          render: /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
            import_components118.Button,
            {
              size: "compact",
              icon: activeView?.icon,
              label: (0, import_i18n113.__)("Layout")
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(Menu9.Popover, { children: availableLayouts.map((layout) => {
        const config2 = VIEW_LAYOUTS.find(
          (v2) => v2.type === layout
        );
        if (!config2) {
          return null;
        }
        return /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
          Menu9.RadioItem,
          {
            value: layout,
            name: "view-actions-available-view",
            checked: layout === view.type,
            hideOnClick: true,
            onChange: (e2) => {
              switch (e2.target.value) {
                case "list":
                case "grid":
                case "table":
                case "pickerGrid":
                case "pickerTable":
                case "activity":
                  const viewWithoutLayout = { ...view };
                  if ("layout" in viewWithoutLayout) {
                    delete viewWithoutLayout.layout;
                  }
                  return onChangeView({
                    ...viewWithoutLayout,
                    type: e2.target.value,
                    ...defaultLayouts4[e2.target.value]
                  });
              }
              (0, import_warning.default)("Invalid dataview");
            },
            children: /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(Menu9.ItemLabel, { children: config2.label })
          },
          layout
        );
      }) })
    ] });
  }
  function SortFieldControl() {
    const { view, fields, onChangeView } = (0, import_element103.useContext)(dataviews_context_default);
    const orderOptions = (0, import_element103.useMemo)(() => {
      const sortableFields = fields.filter(
        (field) => field.enableSorting !== false
      );
      return sortableFields.map((field) => {
        return {
          label: field.label,
          value: field.id
        };
      });
    }, [fields]);
    return /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
      import_components118.SelectControl,
      {
        __next40pxDefaultSize: true,
        label: (0, import_i18n113.__)("Sort by"),
        value: view.sort?.field,
        options: orderOptions,
        onChange: (value) => {
          onChangeView({
            ...view,
            sort: {
              direction: view?.sort?.direction || "desc",
              field: value
            },
            showLevels: false
          });
        }
      }
    );
  }
  function SortDirectionControl() {
    const { view, fields, onChangeView } = (0, import_element103.useContext)(dataviews_context_default);
    const sortableFields = fields.filter(
      (field) => field.enableSorting !== false
    );
    if (sortableFields.length === 0) {
      return null;
    }
    let value = view.sort?.direction;
    if (!value && view.sort?.field) {
      value = "desc";
    }
    return /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
      import_components118.__experimentalToggleGroupControl,
      {
        className: "dataviews-view-config__sort-direction",
        __next40pxDefaultSize: true,
        isBlock: true,
        label: (0, import_i18n113.__)("Order"),
        value,
        onChange: (newDirection) => {
          if (newDirection === "asc" || newDirection === "desc") {
            onChangeView({
              ...view,
              sort: {
                direction: newDirection,
                field: view.sort?.field || // If there is no field assigned as the sorting field assign the first sortable field.
                fields.find(
                  (field) => field.enableSorting !== false
                )?.id || ""
              },
              showLevels: false
            });
            return;
          }
          (0, import_warning.default)("Invalid direction");
        },
        children: SORTING_DIRECTIONS.map((direction) => {
          return /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
            import_components118.__experimentalToggleGroupControlOptionIcon,
            {
              value: direction,
              icon: sortIcons[direction],
              label: sortLabels[direction]
            },
            direction
          );
        })
      }
    );
  }
  function ItemsPerPageControl() {
    const { view, config: config2, onChangeView } = (0, import_element103.useContext)(dataviews_context_default);
    const { infiniteScrollEnabled } = view;
    if (!config2 || !config2.perPageSizes || config2.perPageSizes.length < 2 || config2.perPageSizes.length > 6 || infiniteScrollEnabled) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
      import_components118.__experimentalToggleGroupControl,
      {
        __next40pxDefaultSize: true,
        isBlock: true,
        label: (0, import_i18n113.__)("Items per page"),
        value: view.perPage || 10,
        disabled: !view?.sort?.field,
        onChange: (newItemsPerPage) => {
          const newItemsPerPageNumber = typeof newItemsPerPage === "number" || newItemsPerPage === void 0 ? newItemsPerPage : parseInt(newItemsPerPage, 10);
          onChangeView({
            ...view,
            perPage: newItemsPerPageNumber,
            page: 1
          });
        },
        children: config2.perPageSizes.map((value) => {
          return /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
            import_components118.__experimentalToggleGroupControlOption,
            {
              value,
              label: value.toString()
            },
            value
          );
        })
      }
    );
  }
  function ResetViewButton() {
    const { onReset } = (0, import_element103.useContext)(dataviews_context_default);
    if (onReset === void 0) {
      return null;
    }
    const isDisabled = onReset === false;
    return /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
      import_components118.Button,
      {
        variant: "tertiary",
        size: "compact",
        disabled: isDisabled,
        accessibleWhenDisabled: true,
        className: "dataviews-view-config__reset-button",
        onClick: () => {
          if (typeof onReset === "function") {
            onReset();
          }
        },
        children: (0, import_i18n113.__)("Reset view")
      }
    );
  }
  function DataviewsViewConfigDropdown() {
    const { view, onReset } = (0, import_element103.useContext)(dataviews_context_default);
    const popoverId = (0, import_compose22.useInstanceId)(
      _DataViewsViewConfig,
      "dataviews-view-config-dropdown"
    );
    const activeLayout = VIEW_LAYOUTS.find(
      (layout) => layout.type === view.type
    );
    const isModified = typeof onReset === "function";
    return /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
      import_components118.Dropdown,
      {
        expandOnMobile: true,
        popoverProps: {
          ...DATAVIEWS_CONFIG_POPOVER_PROPS,
          id: popoverId
        },
        renderToggle: ({ onToggle, isOpen }) => {
          return /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)("div", { className: "dataviews-view-config__toggle-wrapper", children: [
            /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
              import_components118.Button,
              {
                size: "compact",
                icon: cog_default,
                label: (0, import_i18n113._x)(
                  "View options",
                  "View is used as a noun"
                ),
                onClick: onToggle,
                "aria-expanded": isOpen ? "true" : "false",
                "aria-controls": popoverId
              }
            ),
            isModified && /* @__PURE__ */ (0, import_jsx_runtime227.jsx)("span", { className: "dataviews-view-config__modified-indicator" })
          ] });
        },
        renderContent: () => /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
          import_components118.__experimentalDropdownContentWrapper,
          {
            paddingSize: "medium",
            className: "dataviews-config__popover-content-wrapper",
            children: /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(
              Stack,
              {
                direction: "column",
                className: "dataviews-view-config",
                gap: "xl",
                children: [
                  /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(
                    Stack,
                    {
                      direction: "row",
                      justify: "space-between",
                      align: "center",
                      className: "dataviews-view-config__header",
                      children: [
                        /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
                          import_components118.__experimentalHeading,
                          {
                            level: 2,
                            className: "dataviews-settings-section__title",
                            children: (0, import_i18n113.__)("Appearance")
                          }
                        ),
                        /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(ResetViewButton, {})
                      ]
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(Stack, { direction: "column", gap: "lg", children: [
                    /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(
                      Stack,
                      {
                        direction: "row",
                        gap: "sm",
                        className: "dataviews-view-config__sort-controls",
                        children: [
                          /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(SortFieldControl, {}),
                          /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(SortDirectionControl, {})
                        ]
                      }
                    ),
                    !!activeLayout?.viewConfigOptions && /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(activeLayout.viewConfigOptions, {}),
                    /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(InfiniteScrollToggle, {}),
                    /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(ItemsPerPageControl, {}),
                    /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(PropertiesSection, {})
                  ] })
                ]
              }
            )
          }
        )
      }
    );
  }
  function _DataViewsViewConfig() {
    return /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(import_jsx_runtime227.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(ViewTypeMenu, {}),
      /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(DataviewsViewConfigDropdown, {})
    ] });
  }
  var DataViewsViewConfig = (0, import_element103.memo)(_DataViewsViewConfig);
  var dataviews_view_config_default = DataViewsViewConfig;

  // packages/dataviews/build-module/components/dataform-controls/checkbox.mjs
  var import_components119 = __toESM(require_components(), 1);
  var import_element104 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/components/dataform-controls/utils/get-custom-validity.mjs
  function getCustomValidity(isValid2, validity) {
    let customValidity;
    if (isValid2?.required && validity?.required) {
      customValidity = validity?.required?.message ? validity.required : void 0;
    } else if (isValid2?.pattern && validity?.pattern) {
      customValidity = validity.pattern;
    } else if (isValid2?.min && validity?.min) {
      customValidity = validity.min;
    } else if (isValid2?.max && validity?.max) {
      customValidity = validity.max;
    } else if (isValid2?.minLength && validity?.minLength) {
      customValidity = validity.minLength;
    } else if (isValid2?.maxLength && validity?.maxLength) {
      customValidity = validity.maxLength;
    } else if (isValid2?.elements && validity?.elements) {
      customValidity = validity.elements;
    } else if (validity?.custom) {
      customValidity = validity.custom;
    }
    return customValidity;
  }

  // packages/dataviews/build-module/components/dataform-controls/checkbox.mjs
  var import_jsx_runtime228 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedCheckboxControl } = unlock3(import_components119.privateApis);
  function Checkbox({
    field,
    onChange,
    data,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { getValue, setValue, label, description, isValid: isValid2 } = field;
    const onChangeControl = (0, import_element104.useCallback)(() => {
      onChange(
        setValue({ item: data, value: !getValue({ item: data }) })
      );
    }, [data, getValue, onChange, setValue]);
    return /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
      ValidatedCheckboxControl,
      {
        required: !!field.isValid?.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        hidden: hideLabelFromVision,
        label,
        help: description,
        checked: getValue({ item: data }),
        onChange: onChangeControl
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/combobox.mjs
  var import_components120 = __toESM(require_components(), 1);
  var import_element105 = __toESM(require_element(), 1);
  var import_jsx_runtime229 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedComboboxControl } = unlock3(import_components120.privateApis);
  function Combobox3({
    data,
    field,
    onChange,
    hideLabelFromVision,
    validity
  }) {
    const { label, description, placeholder, getValue, setValue, isValid: isValid2 } = field;
    const value = getValue({ item: data }) ?? "";
    const onChangeControl = (0, import_element105.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue ?? "" })),
      [data, onChange, setValue]
    );
    const { elements: elements2, isLoading } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(import_components120.Spinner, {});
    }
    return /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
      ValidatedComboboxControl,
      {
        required: !!field.isValid?.required,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        value,
        help: description,
        placeholder,
        options: elements2,
        onChange: onChangeControl,
        hideLabelFromVision,
        allowReset: true,
        expandOnFocus: true
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/datetime.mjs
  var import_components122 = __toESM(require_components(), 1);
  var import_element107 = __toESM(require_element(), 1);
  var import_i18n115 = __toESM(require_i18n(), 1);
  var import_date4 = __toESM(require_date(), 1);

  // packages/dataviews/build-module/components/dataform-controls/utils/relative-date-control.mjs
  var import_components121 = __toESM(require_components(), 1);
  var import_element106 = __toESM(require_element(), 1);
  var import_i18n114 = __toESM(require_i18n(), 1);
  var import_jsx_runtime230 = __toESM(require_jsx_runtime(), 1);
  var TIME_UNITS_OPTIONS = {
    [OPERATOR_IN_THE_PAST]: [
      { value: "days", label: (0, import_i18n114.__)("Days") },
      { value: "weeks", label: (0, import_i18n114.__)("Weeks") },
      { value: "months", label: (0, import_i18n114.__)("Months") },
      { value: "years", label: (0, import_i18n114.__)("Years") }
    ],
    [OPERATOR_OVER]: [
      { value: "days", label: (0, import_i18n114.__)("Days ago") },
      { value: "weeks", label: (0, import_i18n114.__)("Weeks ago") },
      { value: "months", label: (0, import_i18n114.__)("Months ago") },
      { value: "years", label: (0, import_i18n114.__)("Years ago") }
    ]
  };
  function RelativeDateControl({
    className,
    data,
    field,
    onChange,
    hideLabelFromVision,
    operator
  }) {
    const options = TIME_UNITS_OPTIONS[operator === OPERATOR_IN_THE_PAST ? "inThePast" : "over"];
    const { id, label, getValue, setValue } = field;
    const fieldValue = getValue({ item: data });
    const { value: relValue = "", unit = options[0].value } = fieldValue && typeof fieldValue === "object" ? fieldValue : {};
    const onChangeValue = (0, import_element106.useCallback)(
      (newValue) => onChange(
        setValue({
          item: data,
          value: { value: Number(newValue), unit }
        })
      ),
      [onChange, setValue, data, unit]
    );
    const onChangeUnit = (0, import_element106.useCallback)(
      (newUnit) => onChange(
        setValue({
          item: data,
          value: { value: relValue, unit: newUnit }
        })
      ),
      [onChange, setValue, data, relValue]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
      import_components121.BaseControl,
      {
        id,
        className: clsx_default(className, "dataviews-controls__relative-date"),
        label,
        hideLabelFromVision,
        children: /* @__PURE__ */ (0, import_jsx_runtime230.jsxs)(Stack, { direction: "row", gap: "sm", children: [
          /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
            import_components121.__experimentalNumberControl,
            {
              __next40pxDefaultSize: true,
              className: "dataviews-controls__relative-date-number",
              spinControls: "none",
              min: 1,
              step: 1,
              value: relValue,
              onChange: onChangeValue
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
            import_components121.SelectControl,
            {
              className: "dataviews-controls__relative-date-unit",
              __next40pxDefaultSize: true,
              label: (0, import_i18n114.__)("Unit"),
              value: unit,
              options,
              onChange: onChangeUnit,
              hideLabelFromVision: true
            }
          )
        ] })
      }
    );
  }

  // packages/dataviews/build-module/field-types/utils/parse-date-time.mjs
  var import_date3 = __toESM(require_date(), 1);
  function parseDateTime(dateTimeString) {
    if (!dateTimeString) {
      return null;
    }
    const parsed = (0, import_date3.getDate)(dateTimeString);
    return parsed && isValid(parsed) ? parsed : null;
  }

  // packages/dataviews/build-module/components/dataform-controls/datetime.mjs
  var import_jsx_runtime231 = __toESM(require_jsx_runtime(), 1);
  var { DateCalendar, ValidatedInputControl } = unlock3(import_components122.privateApis);
  var formatDateTime = (value) => {
    if (!value) {
      return "";
    }
    return (0, import_date4.dateI18n)("Y-m-d\\TH:i", (0, import_date4.getDate)(value));
  };
  function CalendarDateTimeControl({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { id, label, description, setValue, getValue, isValid: isValid2 } = field;
    const fieldValue = getValue({ item: data });
    const value = typeof fieldValue === "string" ? fieldValue : void 0;
    const [calendarMonth, setCalendarMonth] = (0, import_element107.useState)(() => {
      const parsedDate = parseDateTime(value);
      return parsedDate || /* @__PURE__ */ new Date();
    });
    const inputControlRef = (0, import_element107.useRef)(null);
    const validationTimeoutRef = (0, import_element107.useRef)(void 0);
    const previousFocusRef = (0, import_element107.useRef)(null);
    const onChangeCallback = (0, import_element107.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue })),
      [data, onChange, setValue]
    );
    (0, import_element107.useEffect)(() => {
      return () => {
        if (validationTimeoutRef.current) {
          clearTimeout(validationTimeoutRef.current);
        }
      };
    }, []);
    const onSelectDate = (0, import_element107.useCallback)(
      (newDate) => {
        let dateTimeValue;
        if (newDate) {
          const wpDate = (0, import_date4.dateI18n)("Y-m-d", newDate);
          let wpTime;
          if (value) {
            wpTime = (0, import_date4.dateI18n)("H:i", (0, import_date4.getDate)(value));
          } else {
            wpTime = (0, import_date4.dateI18n)("H:i", newDate);
          }
          const finalDateTime = (0, import_date4.getDate)(`${wpDate}T${wpTime}`);
          dateTimeValue = finalDateTime.toISOString();
          onChangeCallback(dateTimeValue);
          if (validationTimeoutRef.current) {
            clearTimeout(validationTimeoutRef.current);
          }
        } else {
          onChangeCallback(void 0);
        }
        previousFocusRef.current = inputControlRef.current && inputControlRef.current.ownerDocument.activeElement;
        validationTimeoutRef.current = setTimeout(() => {
          if (inputControlRef.current) {
            inputControlRef.current.focus();
            inputControlRef.current.blur();
            onChangeCallback(dateTimeValue);
            if (previousFocusRef.current && previousFocusRef.current instanceof HTMLElement) {
              previousFocusRef.current.focus();
            }
          }
        }, 0);
      },
      [onChangeCallback, value]
    );
    const handleManualDateTimeChange = (0, import_element107.useCallback)(
      (newValue) => {
        if (newValue) {
          const dateTime = (0, import_date4.getDate)(newValue);
          onChangeCallback(dateTime.toISOString());
          const parsedDate = parseDateTime(dateTime.toISOString());
          if (parsedDate) {
            setCalendarMonth(parsedDate);
          }
        } else {
          onChangeCallback(void 0);
        }
      },
      [onChangeCallback]
    );
    const { format: fieldFormat } = field;
    const weekStartsOn = fieldFormat.weekStartsOn ?? (0, import_date4.getSettings)().l10n.startOfWeek;
    const {
      timezone: { string: timezoneString }
    } = (0, import_date4.getSettings)();
    let displayLabel = label;
    if (isValid2?.required && !markWhenOptional && !hideLabelFromVision) {
      displayLabel = `${label} (${(0, import_i18n115.__)("Required")})`;
    } else if (!isValid2?.required && markWhenOptional && !hideLabelFromVision) {
      displayLabel = `${label} (${(0, import_i18n115.__)("Optional")})`;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
      import_components122.BaseControl,
      {
        id,
        label: displayLabel,
        help: description,
        hideLabelFromVision,
        children: /* @__PURE__ */ (0, import_jsx_runtime231.jsxs)(Stack, { direction: "column", gap: "lg", children: [
          /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
            DateCalendar,
            {
              style: { width: "100%" },
              selected: value ? parseDateTime(value) || void 0 : void 0,
              onSelect: onSelectDate,
              month: calendarMonth,
              onMonthChange: setCalendarMonth,
              timeZone: timezoneString || void 0,
              weekStartsOn
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
            ValidatedInputControl,
            {
              ref: inputControlRef,
              __next40pxDefaultSize: true,
              required: !!isValid2?.required,
              customValidity: getCustomValidity(isValid2, validity),
              type: "datetime-local",
              label: (0, import_i18n115.__)("Date time"),
              hideLabelFromVision: true,
              value: formatDateTime(value),
              onChange: handleManualDateTimeChange
            }
          )
        ] })
      }
    );
  }
  function DateTime({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    operator,
    validity
  }) {
    if (operator === OPERATOR_IN_THE_PAST || operator === OPERATOR_OVER) {
      return /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
        RelativeDateControl,
        {
          className: "dataviews-controls__datetime",
          data,
          field,
          onChange,
          hideLabelFromVision,
          operator
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
      CalendarDateTimeControl,
      {
        data,
        field,
        onChange,
        hideLabelFromVision,
        markWhenOptional,
        validity
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/date.mjs
  var import_components123 = __toESM(require_components(), 1);
  var import_element108 = __toESM(require_element(), 1);
  var import_i18n116 = __toESM(require_i18n(), 1);
  var import_date5 = __toESM(require_date(), 1);
  var import_jsx_runtime232 = __toESM(require_jsx_runtime(), 1);
  var { DateCalendar: DateCalendar2, DateRangeCalendar } = unlock3(import_components123.privateApis);
  var DATE_PRESETS = [
    {
      id: "today",
      label: (0, import_i18n116.__)("Today"),
      getValue: () => (0, import_date5.getDate)(null)
    },
    {
      id: "yesterday",
      label: (0, import_i18n116.__)("Yesterday"),
      getValue: () => {
        const today = (0, import_date5.getDate)(null);
        return subDays(today, 1);
      }
    },
    {
      id: "past-week",
      label: (0, import_i18n116.__)("Past week"),
      getValue: () => {
        const today = (0, import_date5.getDate)(null);
        return subDays(today, 7);
      }
    },
    {
      id: "past-month",
      label: (0, import_i18n116.__)("Past month"),
      getValue: () => {
        const today = (0, import_date5.getDate)(null);
        return subMonths(today, 1);
      }
    }
  ];
  var DATE_RANGE_PRESETS = [
    {
      id: "last-7-days",
      label: (0, import_i18n116.__)("Last 7 days"),
      getValue: () => {
        const today = (0, import_date5.getDate)(null);
        return [subDays(today, 7), today];
      }
    },
    {
      id: "last-30-days",
      label: (0, import_i18n116.__)("Last 30 days"),
      getValue: () => {
        const today = (0, import_date5.getDate)(null);
        return [subDays(today, 30), today];
      }
    },
    {
      id: "month-to-date",
      label: (0, import_i18n116.__)("Month to date"),
      getValue: () => {
        const today = (0, import_date5.getDate)(null);
        return [startOfMonth(today), today];
      }
    },
    {
      id: "last-year",
      label: (0, import_i18n116.__)("Last year"),
      getValue: () => {
        const today = (0, import_date5.getDate)(null);
        return [subYears(today, 1), today];
      }
    },
    {
      id: "year-to-date",
      label: (0, import_i18n116.__)("Year to date"),
      getValue: () => {
        const today = (0, import_date5.getDate)(null);
        return [startOfYear(today), today];
      }
    }
  ];
  var parseDate = (dateString) => {
    if (!dateString) {
      return null;
    }
    const parsed = (0, import_date5.getDate)(dateString);
    return parsed && isValid(parsed) ? parsed : null;
  };
  var formatDate = (date) => {
    if (!date) {
      return "";
    }
    return typeof date === "string" ? date : format(date, "yyyy-MM-dd");
  };
  function ValidatedDateControl({
    field,
    validity,
    inputRefs,
    isTouched,
    setIsTouched,
    children
  }) {
    const { isValid: isValid2 } = field;
    const [customValidity, setCustomValidity] = (0, import_element108.useState)(void 0);
    const validateRefs = (0, import_element108.useCallback)(() => {
      const refs = Array.isArray(inputRefs) ? inputRefs : [inputRefs];
      for (const ref of refs) {
        const input = ref.current;
        if (input && !input.validity.valid) {
          setCustomValidity({
            type: "invalid",
            message: input.validationMessage
          });
          return;
        }
      }
      setCustomValidity(void 0);
    }, [inputRefs]);
    (0, import_element108.useEffect)(() => {
      const refs = Array.isArray(inputRefs) ? inputRefs : [inputRefs];
      const result = validity ? getCustomValidity(isValid2, validity) : void 0;
      for (const ref of refs) {
        const input = ref.current;
        if (input) {
          input.setCustomValidity(
            result?.type === "invalid" && result.message ? result.message : ""
          );
        }
      }
    }, [inputRefs, isValid2, validity]);
    (0, import_element108.useEffect)(() => {
      const refs = Array.isArray(inputRefs) ? inputRefs : [inputRefs];
      const handleInvalid = (event) => {
        event.preventDefault();
        setIsTouched(true);
      };
      for (const ref of refs) {
        ref.current?.addEventListener("invalid", handleInvalid);
      }
      return () => {
        for (const ref of refs) {
          ref.current?.removeEventListener("invalid", handleInvalid);
        }
      };
    }, [inputRefs, setIsTouched]);
    (0, import_element108.useEffect)(() => {
      if (!isTouched) {
        return;
      }
      const result = validity ? getCustomValidity(isValid2, validity) : void 0;
      if (result) {
        setCustomValidity(result);
      } else {
        validateRefs();
      }
    }, [isTouched, isValid2, validity, validateRefs]);
    const onBlur = (event) => {
      if (isTouched) {
        return;
      }
      if (!event.relatedTarget || !event.currentTarget.contains(event.relatedTarget)) {
        setIsTouched(true);
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime232.jsxs)("div", { onBlur, children: [
      children,
      /* @__PURE__ */ (0, import_jsx_runtime232.jsx)("div", { "aria-live": "polite", children: customValidity && /* @__PURE__ */ (0, import_jsx_runtime232.jsxs)(
        "p",
        {
          className: clsx_default(
            "components-validated-control__indicator",
            customValidity.type === "invalid" ? "is-invalid" : void 0
          ),
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
              import_components123.Icon,
              {
                className: "components-validated-control__indicator-icon",
                icon: error_default,
                size: 16,
                fill: "currentColor"
              }
            ),
            customValidity.message
          ]
        }
      ) })
    ] });
  }
  function CalendarDateControl({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const {
      id,
      label,
      setValue,
      getValue,
      isValid: isValid2,
      format: fieldFormat
    } = field;
    const [selectedPresetId, setSelectedPresetId] = (0, import_element108.useState)(
      null
    );
    const weekStartsOn = fieldFormat.weekStartsOn ?? (0, import_date5.getSettings)().l10n.startOfWeek;
    const fieldValue = getValue({ item: data });
    const value = typeof fieldValue === "string" ? fieldValue : void 0;
    const [calendarMonth, setCalendarMonth] = (0, import_element108.useState)(() => {
      const parsedDate = parseDate(value);
      return parsedDate || /* @__PURE__ */ new Date();
    });
    const [isTouched, setIsTouched] = (0, import_element108.useState)(false);
    const validityTargetRef = (0, import_element108.useRef)(null);
    const onChangeCallback = (0, import_element108.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue })),
      [data, onChange, setValue]
    );
    const onSelectDate = (0, import_element108.useCallback)(
      (newDate) => {
        const dateValue = newDate ? format(newDate, "yyyy-MM-dd") : void 0;
        onChangeCallback(dateValue);
        setSelectedPresetId(null);
        setIsTouched(true);
      },
      [onChangeCallback]
    );
    const handlePresetClick = (0, import_element108.useCallback)(
      (preset) => {
        const presetDate = preset.getValue();
        const dateValue = formatDate(presetDate);
        setCalendarMonth(presetDate);
        onChangeCallback(dateValue);
        setSelectedPresetId(preset.id);
        setIsTouched(true);
      },
      [onChangeCallback]
    );
    const handleManualDateChange = (0, import_element108.useCallback)(
      (newValue) => {
        onChangeCallback(newValue);
        if (newValue) {
          const parsedDate = parseDate(newValue);
          if (parsedDate) {
            setCalendarMonth(parsedDate);
          }
        }
        setSelectedPresetId(null);
        setIsTouched(true);
      },
      [onChangeCallback]
    );
    const {
      timezone: { string: timezoneString }
    } = (0, import_date5.getSettings)();
    let displayLabel = label;
    if (isValid2?.required && !markWhenOptional) {
      displayLabel = `${label} (${(0, import_i18n116.__)("Required")})`;
    } else if (!isValid2?.required && markWhenOptional) {
      displayLabel = `${label} (${(0, import_i18n116.__)("Optional")})`;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
      ValidatedDateControl,
      {
        field,
        validity,
        inputRefs: validityTargetRef,
        isTouched,
        setIsTouched,
        children: /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
          import_components123.BaseControl,
          {
            id,
            className: "dataviews-controls__date",
            label: displayLabel,
            hideLabelFromVision,
            children: /* @__PURE__ */ (0, import_jsx_runtime232.jsxs)(Stack, { direction: "column", gap: "lg", children: [
              /* @__PURE__ */ (0, import_jsx_runtime232.jsxs)(
                Stack,
                {
                  direction: "row",
                  gap: "sm",
                  wrap: "wrap",
                  justify: "flex-start",
                  children: [
                    DATE_PRESETS.map((preset) => {
                      const isSelected2 = selectedPresetId === preset.id;
                      return /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
                        import_components123.Button,
                        {
                          className: "dataviews-controls__date-preset",
                          variant: "tertiary",
                          isPressed: isSelected2,
                          size: "small",
                          onClick: () => handlePresetClick(preset),
                          children: preset.label
                        },
                        preset.id
                      );
                    }),
                    /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
                      import_components123.Button,
                      {
                        className: "dataviews-controls__date-preset",
                        variant: "tertiary",
                        isPressed: !selectedPresetId,
                        size: "small",
                        disabled: !!selectedPresetId,
                        accessibleWhenDisabled: false,
                        children: (0, import_i18n116.__)("Custom")
                      }
                    )
                  ]
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
                import_components123.__experimentalInputControl,
                {
                  __next40pxDefaultSize: true,
                  ref: validityTargetRef,
                  type: "date",
                  label: (0, import_i18n116.__)("Date"),
                  hideLabelFromVision: true,
                  value,
                  onChange: handleManualDateChange,
                  required: !!field.isValid?.required
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
                DateCalendar2,
                {
                  style: { width: "100%" },
                  selected: value ? parseDate(value) || void 0 : void 0,
                  onSelect: onSelectDate,
                  month: calendarMonth,
                  onMonthChange: setCalendarMonth,
                  timeZone: timezoneString || void 0,
                  weekStartsOn
                }
              )
            ] })
          }
        )
      }
    );
  }
  function CalendarDateRangeControl({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { id, label, getValue, setValue, format: fieldFormat } = field;
    let value;
    const fieldValue = getValue({ item: data });
    if (Array.isArray(fieldValue) && fieldValue.length === 2 && fieldValue.every((date) => typeof date === "string")) {
      value = fieldValue;
    }
    const weekStartsOn = fieldFormat.weekStartsOn ?? (0, import_date5.getSettings)().l10n.startOfWeek;
    const onChangeCallback = (0, import_element108.useCallback)(
      (newValue) => {
        onChange(
          setValue({
            item: data,
            value: newValue
          })
        );
      },
      [data, onChange, setValue]
    );
    const [selectedPresetId, setSelectedPresetId] = (0, import_element108.useState)(
      null
    );
    const selectedRange = (0, import_element108.useMemo)(() => {
      if (!value) {
        return { from: void 0, to: void 0 };
      }
      const [from, to2] = value;
      return {
        from: parseDate(from) || void 0,
        to: parseDate(to2) || void 0
      };
    }, [value]);
    const [calendarMonth, setCalendarMonth] = (0, import_element108.useState)(() => {
      return selectedRange.from || /* @__PURE__ */ new Date();
    });
    const [isTouched, setIsTouched] = (0, import_element108.useState)(false);
    const fromInputRef = (0, import_element108.useRef)(null);
    const toInputRef = (0, import_element108.useRef)(null);
    const updateDateRange = (0, import_element108.useCallback)(
      (fromDate, toDate2) => {
        if (fromDate && toDate2) {
          onChangeCallback([
            formatDate(fromDate),
            formatDate(toDate2)
          ]);
        } else if (!fromDate && !toDate2) {
          onChangeCallback(void 0);
        }
      },
      [onChangeCallback]
    );
    const onSelectCalendarRange = (0, import_element108.useCallback)(
      (newRange) => {
        updateDateRange(newRange?.from, newRange?.to);
        setSelectedPresetId(null);
        setIsTouched(true);
      },
      [updateDateRange]
    );
    const handlePresetClick = (0, import_element108.useCallback)(
      (preset) => {
        const [startDate2, endDate] = preset.getValue();
        setCalendarMonth(startDate2);
        updateDateRange(startDate2, endDate);
        setSelectedPresetId(preset.id);
        setIsTouched(true);
      },
      [updateDateRange]
    );
    const handleManualDateChange = (0, import_element108.useCallback)(
      (fromOrTo, newValue) => {
        const [currentFrom, currentTo] = value || [
          void 0,
          void 0
        ];
        const updatedFrom = fromOrTo === "from" ? newValue : currentFrom;
        const updatedTo = fromOrTo === "to" ? newValue : currentTo;
        updateDateRange(updatedFrom, updatedTo);
        if (newValue) {
          const parsedDate = parseDate(newValue);
          if (parsedDate) {
            setCalendarMonth(parsedDate);
          }
        }
        setSelectedPresetId(null);
        setIsTouched(true);
      },
      [value, updateDateRange]
    );
    const { timezone } = (0, import_date5.getSettings)();
    let displayLabel = label;
    if (field.isValid?.required && !markWhenOptional) {
      displayLabel = `${label} (${(0, import_i18n116.__)("Required")})`;
    } else if (!field.isValid?.required && markWhenOptional) {
      displayLabel = `${label} (${(0, import_i18n116.__)("Optional")})`;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
      ValidatedDateControl,
      {
        field,
        validity,
        inputRefs: [fromInputRef, toInputRef],
        isTouched,
        setIsTouched,
        children: /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
          import_components123.BaseControl,
          {
            id,
            className: "dataviews-controls__date",
            label: displayLabel,
            hideLabelFromVision,
            children: /* @__PURE__ */ (0, import_jsx_runtime232.jsxs)(Stack, { direction: "column", gap: "lg", children: [
              /* @__PURE__ */ (0, import_jsx_runtime232.jsxs)(
                Stack,
                {
                  direction: "row",
                  gap: "sm",
                  wrap: "wrap",
                  justify: "flex-start",
                  children: [
                    DATE_RANGE_PRESETS.map((preset) => {
                      const isSelected2 = selectedPresetId === preset.id;
                      return /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
                        import_components123.Button,
                        {
                          className: "dataviews-controls__date-preset",
                          variant: "tertiary",
                          isPressed: isSelected2,
                          size: "small",
                          onClick: () => handlePresetClick(preset),
                          children: preset.label
                        },
                        preset.id
                      );
                    }),
                    /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
                      import_components123.Button,
                      {
                        className: "dataviews-controls__date-preset",
                        variant: "tertiary",
                        isPressed: !selectedPresetId,
                        size: "small",
                        accessibleWhenDisabled: false,
                        disabled: !!selectedPresetId,
                        children: (0, import_i18n116.__)("Custom")
                      }
                    )
                  ]
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime232.jsxs)(
                Stack,
                {
                  direction: "row",
                  gap: "sm",
                  justify: "space-between",
                  className: "dataviews-controls__date-range-inputs",
                  children: [
                    /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
                      import_components123.__experimentalInputControl,
                      {
                        __next40pxDefaultSize: true,
                        ref: fromInputRef,
                        type: "date",
                        label: (0, import_i18n116.__)("From"),
                        hideLabelFromVision: true,
                        value: value?.[0],
                        onChange: (newValue) => handleManualDateChange("from", newValue),
                        required: !!field.isValid?.required
                      }
                    ),
                    /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
                      import_components123.__experimentalInputControl,
                      {
                        __next40pxDefaultSize: true,
                        ref: toInputRef,
                        type: "date",
                        label: (0, import_i18n116.__)("To"),
                        hideLabelFromVision: true,
                        value: value?.[1],
                        onChange: (newValue) => handleManualDateChange("to", newValue),
                        required: !!field.isValid?.required
                      }
                    )
                  ]
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
                DateRangeCalendar,
                {
                  style: { width: "100%" },
                  selected: selectedRange,
                  onSelect: onSelectCalendarRange,
                  month: calendarMonth,
                  onMonthChange: setCalendarMonth,
                  timeZone: timezone.string || void 0,
                  weekStartsOn
                }
              )
            ] })
          }
        )
      }
    );
  }
  function DateControl({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    operator,
    validity
  }) {
    if (operator === OPERATOR_IN_THE_PAST || operator === OPERATOR_OVER) {
      return /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
        RelativeDateControl,
        {
          className: "dataviews-controls__date",
          data,
          field,
          onChange,
          hideLabelFromVision,
          operator
        }
      );
    }
    if (operator === OPERATOR_BETWEEN) {
      return /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
        CalendarDateRangeControl,
        {
          data,
          field,
          onChange,
          hideLabelFromVision,
          markWhenOptional,
          validity
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
      CalendarDateControl,
      {
        data,
        field,
        onChange,
        hideLabelFromVision,
        markWhenOptional,
        validity
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/select.mjs
  var import_components124 = __toESM(require_components(), 1);
  var import_element109 = __toESM(require_element(), 1);
  var import_jsx_runtime233 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedSelectControl } = unlock3(import_components124.privateApis);
  function Select({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { type, label, description, getValue, setValue, isValid: isValid2 } = field;
    const isMultiple = type === "array";
    const value = getValue({ item: data }) ?? (isMultiple ? [] : "");
    const onChangeControl = (0, import_element109.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue })),
      [data, onChange, setValue]
    );
    const { elements: elements2, isLoading } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(import_components124.Spinner, {});
    }
    return /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
      ValidatedSelectControl,
      {
        required: !!field.isValid?.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        value,
        help: description,
        options: elements2,
        onChange: onChangeControl,
        __next40pxDefaultSize: true,
        hideLabelFromVision,
        multiple: isMultiple
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/adaptive-select.mjs
  var import_jsx_runtime234 = __toESM(require_jsx_runtime(), 1);
  var ELEMENTS_THRESHOLD = 10;
  function AdaptiveSelect(props) {
    const { field } = props;
    const { elements: elements2 } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    if (elements2.length >= ELEMENTS_THRESHOLD) {
      return /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(Combobox3, { ...props });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(Select, { ...props });
  }

  // packages/dataviews/build-module/components/dataform-controls/email.mjs
  var import_components126 = __toESM(require_components(), 1);

  // packages/dataviews/build-module/components/dataform-controls/utils/validated-input.mjs
  var import_components125 = __toESM(require_components(), 1);
  var import_element110 = __toESM(require_element(), 1);
  var import_jsx_runtime235 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedInputControl: ValidatedInputControl2 } = unlock3(import_components125.privateApis);
  function ValidatedText({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    type,
    prefix: prefix2,
    suffix,
    validity
  }) {
    const { label, placeholder, description, getValue, setValue, isValid: isValid2 } = field;
    const value = getValue({ item: data });
    const onChangeControl = (0, import_element110.useCallback)(
      (newValue) => onChange(
        setValue({
          item: data,
          value: newValue
        })
      ),
      [data, setValue, onChange]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(
      ValidatedInputControl2,
      {
        required: !!isValid2.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        placeholder,
        value: value ?? "",
        help: description,
        onChange: onChangeControl,
        hideLabelFromVision,
        type,
        prefix: prefix2,
        suffix,
        pattern: isValid2.pattern ? isValid2.pattern.constraint : void 0,
        minLength: isValid2.minLength ? isValid2.minLength.constraint : void 0,
        maxLength: isValid2.maxLength ? isValid2.maxLength.constraint : void 0,
        __next40pxDefaultSize: true
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/email.mjs
  var import_jsx_runtime236 = __toESM(require_jsx_runtime(), 1);
  function Email({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
      ValidatedText,
      {
        ...{
          data,
          field,
          onChange,
          hideLabelFromVision,
          markWhenOptional,
          validity,
          type: "email",
          prefix: /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(import_components126.__experimentalInputControlPrefixWrapper, { variant: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(import_components126.Icon, { icon: envelope_default }) })
        }
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/telephone.mjs
  var import_components127 = __toESM(require_components(), 1);
  var import_jsx_runtime237 = __toESM(require_jsx_runtime(), 1);
  function Telephone({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(
      ValidatedText,
      {
        ...{
          data,
          field,
          onChange,
          hideLabelFromVision,
          markWhenOptional,
          validity,
          type: "tel",
          prefix: /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(import_components127.__experimentalInputControlPrefixWrapper, { variant: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(import_components127.Icon, { icon: mobile_default }) })
        }
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/url.mjs
  var import_components128 = __toESM(require_components(), 1);
  var import_jsx_runtime238 = __toESM(require_jsx_runtime(), 1);
  function Url({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
      ValidatedText,
      {
        ...{
          data,
          field,
          onChange,
          hideLabelFromVision,
          markWhenOptional,
          validity,
          type: "url",
          prefix: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(import_components128.__experimentalInputControlPrefixWrapper, { variant: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(import_components128.Icon, { icon: link_default }) })
        }
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/utils/validated-number.mjs
  var import_components129 = __toESM(require_components(), 1);
  var import_element111 = __toESM(require_element(), 1);
  var import_i18n117 = __toESM(require_i18n(), 1);
  var import_jsx_runtime239 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedNumberControl } = unlock3(import_components129.privateApis);
  function toNumberOrEmpty(value) {
    if (value === "" || value === void 0) {
      return "";
    }
    const number = Number(value);
    return Number.isFinite(number) ? number : "";
  }
  function BetweenControls({
    value,
    onChange,
    hideLabelFromVision,
    step
  }) {
    const [min = "", max = ""] = value;
    const onChangeMin = (0, import_element111.useCallback)(
      (newValue) => onChange([toNumberOrEmpty(newValue), max]),
      [onChange, max]
    );
    const onChangeMax = (0, import_element111.useCallback)(
      (newValue) => onChange([min, toNumberOrEmpty(newValue)]),
      [onChange, min]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
      import_components129.BaseControl,
      {
        help: (0, import_i18n117.__)("The max. value must be greater than the min. value."),
        children: /* @__PURE__ */ (0, import_jsx_runtime239.jsxs)(import_components129.Flex, { direction: "row", gap: 4, children: [
          /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
            import_components129.__experimentalNumberControl,
            {
              label: (0, import_i18n117.__)("Min."),
              value: min,
              max: max ? Number(max) - step : void 0,
              onChange: onChangeMin,
              __next40pxDefaultSize: true,
              hideLabelFromVision,
              step
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
            import_components129.__experimentalNumberControl,
            {
              label: (0, import_i18n117.__)("Max."),
              value: max,
              min: min ? Number(min) + step : void 0,
              onChange: onChangeMax,
              __next40pxDefaultSize: true,
              hideLabelFromVision,
              step
            }
          )
        ] })
      }
    );
  }
  function ValidatedNumber({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    operator,
    validity
  }) {
    const decimals = field.format?.decimals ?? 0;
    const step = Math.pow(10, Math.abs(decimals) * -1);
    const { label, description, getValue, setValue, isValid: isValid2 } = field;
    const value = getValue({ item: data }) ?? "";
    const onChangeControl = (0, import_element111.useCallback)(
      (newValue) => {
        onChange(
          setValue({
            item: data,
            // Do not convert an empty string or undefined to a number,
            // otherwise there's a mismatch between the UI control (empty)
            // and the data relied by onChange (0).
            value: ["", void 0].includes(newValue) ? void 0 : Number(newValue)
          })
        );
      },
      [data, onChange, setValue]
    );
    const onChangeBetweenControls = (0, import_element111.useCallback)(
      (newValue) => {
        onChange(
          setValue({
            item: data,
            value: newValue
          })
        );
      },
      [data, onChange, setValue]
    );
    if (operator === OPERATOR_BETWEEN) {
      let valueBetween = ["", ""];
      if (Array.isArray(value) && value.length === 2 && value.every(
        (element) => typeof element === "number" || element === ""
      )) {
        valueBetween = value;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
        BetweenControls,
        {
          value: valueBetween,
          onChange: onChangeBetweenControls,
          hideLabelFromVision,
          step
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
      ValidatedNumberControl,
      {
        required: !!isValid2.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        help: description,
        value,
        onChange: onChangeControl,
        __next40pxDefaultSize: true,
        hideLabelFromVision,
        step,
        min: isValid2.min ? isValid2.min.constraint : void 0,
        max: isValid2.max ? isValid2.max.constraint : void 0
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/integer.mjs
  var import_jsx_runtime240 = __toESM(require_jsx_runtime(), 1);
  function Integer(props) {
    return /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(ValidatedNumber, { ...props });
  }

  // packages/dataviews/build-module/components/dataform-controls/number.mjs
  var import_jsx_runtime241 = __toESM(require_jsx_runtime(), 1);
  function Number2(props) {
    return /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(ValidatedNumber, { ...props });
  }

  // packages/dataviews/build-module/components/dataform-controls/radio.mjs
  var import_components130 = __toESM(require_components(), 1);
  var import_element112 = __toESM(require_element(), 1);
  var import_jsx_runtime242 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedRadioControl } = unlock3(import_components130.privateApis);
  function Radio({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { label, description, getValue, setValue, isValid: isValid2 } = field;
    const { elements: elements2, isLoading } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    const value = getValue({ item: data });
    const onChangeControl = (0, import_element112.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue })),
      [data, onChange, setValue]
    );
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(import_components130.Spinner, {});
    }
    return /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
      ValidatedRadioControl,
      {
        required: !!field.isValid?.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        help: description,
        onChange: onChangeControl,
        options: elements2,
        selected: value,
        hideLabelFromVision
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/text.mjs
  var import_element113 = __toESM(require_element(), 1);
  var import_jsx_runtime243 = __toESM(require_jsx_runtime(), 1);
  function Text12({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    config: config2,
    validity
  }) {
    const { prefix: prefix2, suffix } = config2 || {};
    return /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
      ValidatedText,
      {
        ...{
          data,
          field,
          onChange,
          hideLabelFromVision,
          markWhenOptional,
          validity,
          prefix: prefix2 ? (0, import_element113.createElement)(prefix2) : void 0,
          suffix: suffix ? (0, import_element113.createElement)(suffix) : void 0
        }
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/toggle.mjs
  var import_components131 = __toESM(require_components(), 1);
  var import_element114 = __toESM(require_element(), 1);
  var import_jsx_runtime244 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedToggleControl } = unlock3(import_components131.privateApis);
  function Toggle({
    field,
    onChange,
    data,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { label, description, getValue, setValue, isValid: isValid2 } = field;
    const onChangeControl = (0, import_element114.useCallback)(() => {
      onChange(
        setValue({ item: data, value: !getValue({ item: data }) })
      );
    }, [onChange, setValue, data, getValue]);
    return /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(
      ValidatedToggleControl,
      {
        required: !!isValid2.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        hidden: hideLabelFromVision,
        label,
        help: description,
        checked: getValue({ item: data }),
        onChange: onChangeControl
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/textarea.mjs
  var import_components132 = __toESM(require_components(), 1);
  var import_element115 = __toESM(require_element(), 1);
  var import_jsx_runtime245 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedTextareaControl } = unlock3(import_components132.privateApis);
  function Textarea({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    config: config2,
    validity
  }) {
    const { rows = 4 } = config2 || {};
    const { label, placeholder, description, setValue, isValid: isValid2 } = field;
    const value = field.getValue({ item: data });
    const onChangeControl = (0, import_element115.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue })),
      [data, onChange, setValue]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(
      ValidatedTextareaControl,
      {
        required: !!isValid2.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        placeholder,
        value: value ?? "",
        help: description,
        onChange: onChangeControl,
        rows,
        minLength: isValid2.minLength ? isValid2.minLength.constraint : void 0,
        maxLength: isValid2.maxLength ? isValid2.maxLength.constraint : void 0,
        __next40pxDefaultSize: true,
        hideLabelFromVision
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/toggle-group.mjs
  var import_components133 = __toESM(require_components(), 1);
  var import_element116 = __toESM(require_element(), 1);
  var import_jsx_runtime246 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedToggleGroupControl } = unlock3(import_components133.privateApis);
  function ToggleGroup({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { getValue, setValue, isValid: isValid2 } = field;
    const value = getValue({ item: data });
    const onChangeControl = (0, import_element116.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue })),
      [data, onChange, setValue]
    );
    const { elements: elements2, isLoading } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(import_components133.Spinner, {});
    }
    if (elements2.length === 0) {
      return null;
    }
    const selectedOption = elements2.find((el) => el.value === value);
    return /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
      ValidatedToggleGroupControl,
      {
        required: !!field.isValid?.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        __next40pxDefaultSize: true,
        isBlock: true,
        label: field.label,
        help: selectedOption?.description || field.description,
        onChange: onChangeControl,
        value,
        hideLabelFromVision,
        children: elements2.map((el) => /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
          import_components133.__experimentalToggleGroupControlOption,
          {
            label: el.label,
            value: el.value
          },
          el.value
        ))
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/array.mjs
  var import_components134 = __toESM(require_components(), 1);
  var import_element117 = __toESM(require_element(), 1);
  var import_jsx_runtime247 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedFormTokenField } = unlock3(import_components134.privateApis);
  function ArrayControl({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { label, placeholder, getValue, setValue, isValid: isValid2 } = field;
    const value = getValue({ item: data });
    const { elements: elements2, isLoading } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    const arrayValueAsElements = (0, import_element117.useMemo)(
      () => Array.isArray(value) ? value.map((token) => {
        const element = elements2?.find(
          (suggestion) => suggestion.value === token
        );
        return element || { value: token, label: token };
      }) : [],
      [value, elements2]
    );
    const onChangeControl = (0, import_element117.useCallback)(
      (tokens) => {
        const valueTokens = tokens.map((token) => {
          if (typeof token === "object" && "value" in token) {
            return token.value;
          }
          return token;
        });
        onChange(setValue({ item: data, value: valueTokens }));
      },
      [onChange, setValue, data]
    );
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(import_components134.Spinner, {});
    }
    return /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
      ValidatedFormTokenField,
      {
        required: !!isValid2?.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label: hideLabelFromVision ? void 0 : label,
        value: arrayValueAsElements,
        onChange: onChangeControl,
        placeholder,
        suggestions: elements2?.map((element) => element.value),
        __experimentalValidateInput: (token) => {
          if (field.isValid?.elements && elements2) {
            return elements2.some(
              (element) => element.value === token || element.label === token
            );
          }
          return true;
        },
        __experimentalExpandOnFocus: elements2 && elements2.length > 0,
        __experimentalShowHowTo: !field.isValid?.elements,
        displayTransform: (token) => {
          if (typeof token === "object" && "label" in token) {
            return token.label;
          }
          if (typeof token === "string" && elements2) {
            const element = elements2.find(
              (el) => el.value === token
            );
            return element?.label || token;
          }
          return token;
        },
        __experimentalRenderItem: ({ item }) => {
          if (typeof item === "string" && elements2) {
            const element = elements2.find(
              (el) => el.value === item
            );
            return /* @__PURE__ */ (0, import_jsx_runtime247.jsx)("span", { children: element?.label || item });
          }
          return /* @__PURE__ */ (0, import_jsx_runtime247.jsx)("span", { children: item });
        }
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/color.mjs
  var import_components135 = __toESM(require_components(), 1);
  var import_element118 = __toESM(require_element(), 1);
  var import_i18n118 = __toESM(require_i18n(), 1);
  var import_jsx_runtime248 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedInputControl: ValidatedInputControl3 } = unlock3(import_components135.privateApis);
  var ColorPickerDropdown = ({
    color,
    onColorChange
  }) => {
    const validColor = color && w(color).isValid() ? color : "#ffffff";
    return /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(
      import_components135.Dropdown,
      {
        className: "dataviews-controls__color-picker-dropdown",
        popoverProps: { resize: false },
        renderToggle: ({ onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(
          import_components135.Button,
          {
            onClick: onToggle,
            "aria-label": (0, import_i18n118.__)("Open color picker"),
            size: "small",
            icon: () => /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(import_components135.ColorIndicator, { colorValue: validColor })
          }
        ),
        renderContent: () => /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(import_components135.__experimentalDropdownContentWrapper, { paddingSize: "none", children: /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(
          import_components135.ColorPicker,
          {
            color: validColor,
            onChange: onColorChange,
            enableAlpha: true
          }
        ) })
      }
    );
  };
  function Color({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { label, placeholder, description, setValue, isValid: isValid2 } = field;
    const value = field.getValue({ item: data }) || "";
    const handleColorChange = (0, import_element118.useCallback)(
      (newColor) => {
        onChange(setValue({ item: data, value: newColor }));
      },
      [data, onChange, setValue]
    );
    const handleInputChange = (0, import_element118.useCallback)(
      (newValue) => {
        onChange(setValue({ item: data, value: newValue || "" }));
      },
      [data, onChange, setValue]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(
      ValidatedInputControl3,
      {
        required: !!field.isValid?.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        placeholder,
        value,
        help: description,
        onChange: handleInputChange,
        hideLabelFromVision,
        type: "text",
        prefix: /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(import_components135.__experimentalInputControlPrefixWrapper, { variant: "control", children: /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(
          ColorPickerDropdown,
          {
            color: value,
            onColorChange: handleColorChange
          }
        ) })
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/password.mjs
  var import_components136 = __toESM(require_components(), 1);
  var import_element119 = __toESM(require_element(), 1);
  var import_i18n119 = __toESM(require_i18n(), 1);
  var import_jsx_runtime249 = __toESM(require_jsx_runtime(), 1);
  function Password({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const [isVisible2, setIsVisible] = (0, import_element119.useState)(false);
    const toggleVisibility = (0, import_element119.useCallback)(() => {
      setIsVisible((prev) => !prev);
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
      ValidatedText,
      {
        ...{
          data,
          field,
          onChange,
          hideLabelFromVision,
          markWhenOptional,
          validity,
          type: isVisible2 ? "text" : "password",
          suffix: /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(import_components136.__experimentalInputControlSuffixWrapper, { variant: "control", children: /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
            import_components136.Button,
            {
              icon: isVisible2 ? unseen_default : seen_default,
              onClick: toggleVisibility,
              size: "small",
              label: isVisible2 ? (0, import_i18n119.__)("Hide password") : (0, import_i18n119.__)("Show password")
            }
          ) })
        }
      }
    );
  }

  // packages/dataviews/build-module/field-types/utils/has-elements.mjs
  function hasElements(field) {
    return Array.isArray(field.elements) && field.elements.length > 0 || typeof field.getElements === "function";
  }

  // packages/dataviews/build-module/components/dataform-controls/index.mjs
  var import_jsx_runtime250 = __toESM(require_jsx_runtime(), 1);
  var FORM_CONTROLS = {
    adaptiveSelect: AdaptiveSelect,
    array: ArrayControl,
    checkbox: Checkbox,
    color: Color,
    combobox: Combobox3,
    datetime: DateTime,
    date: DateControl,
    email: Email,
    telephone: Telephone,
    url: Url,
    integer: Integer,
    number: Number2,
    password: Password,
    radio: Radio,
    select: Select,
    text: Text12,
    toggle: Toggle,
    textarea: Textarea,
    toggleGroup: ToggleGroup
  };
  function isEditConfig(value) {
    return value && typeof value === "object" && typeof value.control === "string";
  }
  function createConfiguredControl(config2) {
    const { control, ...controlConfig } = config2;
    const BaseControlType = getControlByType(control);
    if (BaseControlType === null) {
      return null;
    }
    return function ConfiguredControl(props) {
      return /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(BaseControlType, { ...props, config: controlConfig });
    };
  }
  function getControl(field, fallback) {
    if (typeof field.Edit === "function") {
      return field.Edit;
    }
    if (typeof field.Edit === "string") {
      return getControlByType(field.Edit);
    }
    if (isEditConfig(field.Edit)) {
      return createConfiguredControl(field.Edit);
    }
    if (hasElements(field) && field.type !== "array") {
      return getControlByType("adaptiveSelect");
    }
    if (fallback === null) {
      return null;
    }
    return getControlByType(fallback);
  }
  function getControlByType(type) {
    if (Object.keys(FORM_CONTROLS).includes(type)) {
      return FORM_CONTROLS[type];
    }
    return null;
  }

  // packages/dataviews/build-module/field-types/utils/get-filter-by.mjs
  function getFilterBy(field, defaultOperators, validOperators) {
    if (field.filterBy === false) {
      return false;
    }
    const operators = field.filterBy?.operators?.filter(
      (op) => validOperators.includes(op)
    ) ?? defaultOperators;
    if (operators.length === 0) {
      return false;
    }
    return {
      isPrimary: !!field.filterBy?.isPrimary,
      operators
    };
  }
  var get_filter_by_default = getFilterBy;

  // packages/dataviews/build-module/field-types/utils/get-value-from-id.mjs
  var getValueFromId = (id) => ({ item }) => {
    const path = id.split(".");
    let value = item;
    for (const segment of path) {
      if (value.hasOwnProperty(segment)) {
        value = value[segment];
      } else {
        value = void 0;
      }
    }
    return value;
  };
  var get_value_from_id_default = getValueFromId;

  // packages/dataviews/build-module/field-types/utils/set-value-from-id.mjs
  var setValueFromId = (id) => ({ value }) => {
    const path = id.split(".");
    const result = {};
    let current = result;
    for (const segment of path.slice(0, -1)) {
      current[segment] = {};
      current = current[segment];
    }
    current[path.at(-1)] = value;
    return result;
  };
  var set_value_from_id_default = setValueFromId;

  // packages/dataviews/build-module/field-types/email.mjs
  var import_i18n120 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/field-types/utils/render-from-elements.mjs
  function RenderFromElements({
    item,
    field
  }) {
    const { elements: elements2, isLoading } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    const value = field.getValue({ item });
    if (isLoading) {
      return value;
    }
    if (elements2.length === 0) {
      return value;
    }
    return elements2?.find((element) => element.value === value)?.label || field.getValue({ item });
  }

  // packages/dataviews/build-module/field-types/utils/render-default.mjs
  var import_jsx_runtime251 = __toESM(require_jsx_runtime(), 1);
  function render({
    item,
    field
  }) {
    if (field.hasElements) {
      return /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(RenderFromElements, { item, field });
    }
    return field.getValueFormatted({ item, field });
  }

  // packages/dataviews/build-module/field-types/utils/sort-text.mjs
  var sort_text_default = (a2, b2, direction) => {
    return direction === "asc" ? a2.localeCompare(b2) : b2.localeCompare(a2);
  };

  // packages/dataviews/build-module/field-types/utils/is-valid-required.mjs
  function isValidRequired(item, field) {
    const value = field.getValue({ item });
    return ![void 0, "", null].includes(value);
  }

  // packages/dataviews/build-module/field-types/utils/is-valid-min-length.mjs
  function isValidMinLength(item, field) {
    if (typeof field.isValid.minLength?.constraint !== "number") {
      return false;
    }
    const value = field.getValue({ item });
    if ([void 0, "", null].includes(value)) {
      return true;
    }
    return String(value).length >= field.isValid.minLength.constraint;
  }

  // packages/dataviews/build-module/field-types/utils/is-valid-max-length.mjs
  function isValidMaxLength(item, field) {
    if (typeof field.isValid.maxLength?.constraint !== "number") {
      return false;
    }
    const value = field.getValue({ item });
    if ([void 0, "", null].includes(value)) {
      return true;
    }
    return String(value).length <= field.isValid.maxLength.constraint;
  }

  // packages/dataviews/build-module/field-types/utils/is-valid-pattern.mjs
  function isValidPattern(item, field) {
    if (field.isValid.pattern?.constraint === void 0) {
      return true;
    }
    try {
      const regexp = new RegExp(field.isValid.pattern.constraint);
      const value = field.getValue({ item });
      if ([void 0, "", null].includes(value)) {
        return true;
      }
      return regexp.test(String(value));
    } catch {
      return false;
    }
  }

  // packages/dataviews/build-module/field-types/utils/is-valid-elements.mjs
  function isValidElements(item, field) {
    const elements2 = field.elements ?? [];
    const validValues = elements2.map((el) => el.value);
    if (validValues.length === 0) {
      return true;
    }
    const value = field.getValue({ item });
    return [].concat(value).every((v2) => validValues.includes(v2));
  }

  // packages/dataviews/build-module/field-types/utils/get-value-formatted-default.mjs
  function getValueFormatted({
    item,
    field
  }) {
    return field.getValue({ item });
  }
  var get_value_formatted_default_default = getValueFormatted;

  // packages/dataviews/build-module/field-types/email.mjs
  var emailRegex = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
  function isValidCustom(item, field) {
    const value = field.getValue({ item });
    if (![void 0, "", null].includes(value) && !emailRegex.test(value)) {
      return (0, import_i18n120.__)("Value must be a valid email address.");
    }
    return null;
  }
  var email_default = {
    type: "email",
    render,
    Edit: "email",
    sort: sort_text_default,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS_ANY2, OPERATOR_IS_NONE2],
    validOperators: [
      OPERATOR_IS2,
      OPERATOR_IS_NOT,
      OPERATOR_CONTAINS,
      OPERATOR_NOT_CONTAINS,
      OPERATOR_STARTS_WITH,
      // Multiple selection
      OPERATOR_IS_ANY2,
      OPERATOR_IS_NONE2,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    validate: {
      required: isValidRequired,
      pattern: isValidPattern,
      minLength: isValidMinLength,
      maxLength: isValidMaxLength,
      elements: isValidElements,
      custom: isValidCustom
    }
  };

  // packages/dataviews/build-module/field-types/integer.mjs
  var import_i18n121 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/field-types/utils/sort-number.mjs
  var sort_number_default = (a2, b2, direction) => {
    return direction === "asc" ? a2 - b2 : b2 - a2;
  };

  // packages/dataviews/build-module/field-types/utils/is-valid-min.mjs
  function isValidMin(item, field) {
    if (typeof field.isValid.min?.constraint !== "number") {
      return false;
    }
    const value = field.getValue({ item });
    if ([void 0, "", null].includes(value)) {
      return true;
    }
    return Number(value) >= field.isValid.min.constraint;
  }

  // packages/dataviews/build-module/field-types/utils/is-valid-max.mjs
  function isValidMax(item, field) {
    if (typeof field.isValid.max?.constraint !== "number") {
      return false;
    }
    const value = field.getValue({ item });
    if ([void 0, "", null].includes(value)) {
      return true;
    }
    return Number(value) <= field.isValid.max.constraint;
  }

  // packages/dataviews/build-module/field-types/integer.mjs
  var format2 = {
    separatorThousand: ","
  };
  function getValueFormatted2({
    item,
    field
  }) {
    let value = field.getValue({ item });
    if (value === null || value === void 0) {
      return "";
    }
    value = Number(value);
    if (!Number.isFinite(value)) {
      return String(value);
    }
    let formatInteger;
    if (field.type !== "integer") {
      formatInteger = format2;
    } else {
      formatInteger = field.format;
    }
    const { separatorThousand } = formatInteger;
    const integerValue = Math.trunc(value);
    if (!separatorThousand) {
      return String(integerValue);
    }
    return String(integerValue).replace(
      /\B(?=(\d{3})+(?!\d))/g,
      separatorThousand
    );
  }
  function isValidCustom2(item, field) {
    const value = field.getValue({ item });
    if (![void 0, "", null].includes(value) && !Number.isInteger(value)) {
      return (0, import_i18n121.__)("Value must be an integer.");
    }
    return null;
  }
  var integer_default = {
    type: "integer",
    render,
    Edit: "integer",
    sort: sort_number_default,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [
      OPERATOR_IS2,
      OPERATOR_IS_NOT,
      OPERATOR_LESS_THAN,
      OPERATOR_GREATER_THAN,
      OPERATOR_LESS_THAN_OR_EQUAL,
      OPERATOR_GREATER_THAN_OR_EQUAL,
      OPERATOR_BETWEEN
    ],
    validOperators: [
      // Single-selection
      OPERATOR_IS2,
      OPERATOR_IS_NOT,
      OPERATOR_LESS_THAN,
      OPERATOR_GREATER_THAN,
      OPERATOR_LESS_THAN_OR_EQUAL,
      OPERATOR_GREATER_THAN_OR_EQUAL,
      OPERATOR_BETWEEN,
      // Multiple-selection
      OPERATOR_IS_ANY2,
      OPERATOR_IS_NONE2,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: format2,
    getValueFormatted: getValueFormatted2,
    validate: {
      required: isValidRequired,
      min: isValidMin,
      max: isValidMax,
      elements: isValidElements,
      custom: isValidCustom2
    }
  };

  // packages/dataviews/build-module/field-types/number.mjs
  var import_i18n122 = __toESM(require_i18n(), 1);
  var format3 = {
    separatorThousand: ",",
    separatorDecimal: ".",
    decimals: 2
  };
  function getValueFormatted3({
    item,
    field
  }) {
    let value = field.getValue({ item });
    if (value === null || value === void 0) {
      return "";
    }
    value = Number(value);
    if (!Number.isFinite(value)) {
      return String(value);
    }
    let formatNumber;
    if (field.type !== "number") {
      formatNumber = format3;
    } else {
      formatNumber = field.format;
    }
    const { separatorThousand, separatorDecimal, decimals } = formatNumber;
    const fixedValue = value.toFixed(decimals);
    const [integerPart, decimalPart] = fixedValue.split(".");
    const formattedInteger = separatorThousand ? integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, separatorThousand) : integerPart;
    return decimals === 0 ? formattedInteger : formattedInteger + separatorDecimal + decimalPart;
  }
  function isEmpty2(value) {
    return value === "" || value === void 0 || value === null;
  }
  function isValidCustom3(item, field) {
    const value = field.getValue({ item });
    if (!isEmpty2(value) && !Number.isFinite(value)) {
      return (0, import_i18n122.__)("Value must be a number.");
    }
    return null;
  }
  var number_default = {
    type: "number",
    render,
    Edit: "number",
    sort: sort_number_default,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [
      OPERATOR_IS2,
      OPERATOR_IS_NOT,
      OPERATOR_LESS_THAN,
      OPERATOR_GREATER_THAN,
      OPERATOR_LESS_THAN_OR_EQUAL,
      OPERATOR_GREATER_THAN_OR_EQUAL,
      OPERATOR_BETWEEN
    ],
    validOperators: [
      // Single-selection
      OPERATOR_IS2,
      OPERATOR_IS_NOT,
      OPERATOR_LESS_THAN,
      OPERATOR_GREATER_THAN,
      OPERATOR_LESS_THAN_OR_EQUAL,
      OPERATOR_GREATER_THAN_OR_EQUAL,
      OPERATOR_BETWEEN,
      // Multiple-selection
      OPERATOR_IS_ANY2,
      OPERATOR_IS_NONE2,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: format3,
    getValueFormatted: getValueFormatted3,
    validate: {
      required: isValidRequired,
      min: isValidMin,
      max: isValidMax,
      elements: isValidElements,
      custom: isValidCustom3
    }
  };

  // packages/dataviews/build-module/field-types/text.mjs
  var text_default = {
    type: "text",
    render,
    Edit: "text",
    sort: sort_text_default,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS_ANY2, OPERATOR_IS_NONE2],
    validOperators: [
      // Single selection
      OPERATOR_IS2,
      OPERATOR_IS_NOT,
      OPERATOR_CONTAINS,
      OPERATOR_NOT_CONTAINS,
      OPERATOR_STARTS_WITH,
      // Multiple selection
      OPERATOR_IS_ANY2,
      OPERATOR_IS_NONE2,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    validate: {
      required: isValidRequired,
      pattern: isValidPattern,
      minLength: isValidMinLength,
      maxLength: isValidMaxLength,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/datetime.mjs
  var import_date7 = __toESM(require_date(), 1);
  var format4 = {
    datetime: (0, import_date7.getSettings)().formats.datetime,
    weekStartsOn: (0, import_date7.getSettings)().l10n.startOfWeek
  };
  function getValueFormatted4({
    item,
    field
  }) {
    const value = field.getValue({ item });
    if (["", void 0, null].includes(value)) {
      return "";
    }
    let formatDatetime;
    if (field.type !== "datetime") {
      formatDatetime = format4;
    } else {
      formatDatetime = field.format;
    }
    return (0, import_date7.dateI18n)(formatDatetime.datetime, (0, import_date7.getDate)(value));
  }
  var sort = (a2, b2, direction) => {
    const timeA = new Date(a2).getTime();
    const timeB = new Date(b2).getTime();
    return direction === "asc" ? timeA - timeB : timeB - timeA;
  };
  var datetime_default = {
    type: "datetime",
    render,
    Edit: "datetime",
    sort,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [
      OPERATOR_ON,
      OPERATOR_NOT_ON,
      OPERATOR_BEFORE2,
      OPERATOR_AFTER2,
      OPERATOR_BEFORE_INC,
      OPERATOR_AFTER_INC,
      OPERATOR_IN_THE_PAST,
      OPERATOR_OVER
    ],
    validOperators: [
      OPERATOR_ON,
      OPERATOR_NOT_ON,
      OPERATOR_BEFORE2,
      OPERATOR_AFTER2,
      OPERATOR_BEFORE_INC,
      OPERATOR_AFTER_INC,
      OPERATOR_IN_THE_PAST,
      OPERATOR_OVER
    ],
    format: format4,
    getValueFormatted: getValueFormatted4,
    validate: {
      required: isValidRequired,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/date.mjs
  var import_date8 = __toESM(require_date(), 1);
  var format5 = {
    date: (0, import_date8.getSettings)().formats.date,
    weekStartsOn: (0, import_date8.getSettings)().l10n.startOfWeek
  };
  function getValueFormatted5({
    item,
    field
  }) {
    const value = field.getValue({ item });
    if (["", void 0, null].includes(value)) {
      return "";
    }
    let formatDate2;
    if (field.type !== "date") {
      formatDate2 = format5;
    } else {
      formatDate2 = field.format;
    }
    return (0, import_date8.dateI18n)(formatDate2.date, (0, import_date8.getDate)(value));
  }
  var sort2 = (a2, b2, direction) => {
    const timeA = new Date(a2).getTime();
    const timeB = new Date(b2).getTime();
    return direction === "asc" ? timeA - timeB : timeB - timeA;
  };
  var date_default = {
    type: "date",
    render,
    Edit: "date",
    sort: sort2,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [
      OPERATOR_ON,
      OPERATOR_NOT_ON,
      OPERATOR_BEFORE2,
      OPERATOR_AFTER2,
      OPERATOR_BEFORE_INC,
      OPERATOR_AFTER_INC,
      OPERATOR_IN_THE_PAST,
      OPERATOR_OVER,
      OPERATOR_BETWEEN
    ],
    validOperators: [
      OPERATOR_ON,
      OPERATOR_NOT_ON,
      OPERATOR_BEFORE2,
      OPERATOR_AFTER2,
      OPERATOR_BEFORE_INC,
      OPERATOR_AFTER_INC,
      OPERATOR_IN_THE_PAST,
      OPERATOR_OVER,
      OPERATOR_BETWEEN
    ],
    format: format5,
    getValueFormatted: getValueFormatted5,
    validate: {
      required: isValidRequired,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/boolean.mjs
  var import_i18n123 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/field-types/utils/is-valid-required-for-bool.mjs
  function isValidRequiredForBool(item, field) {
    const value = field.getValue({ item });
    return value === true;
  }

  // packages/dataviews/build-module/field-types/boolean.mjs
  function getValueFormatted6({
    item,
    field
  }) {
    const value = field.getValue({ item });
    if (value === true) {
      return (0, import_i18n123.__)("True");
    }
    if (value === false) {
      return (0, import_i18n123.__)("False");
    }
    return "";
  }
  function isValidCustom4(item, field) {
    const value = field.getValue({ item });
    if (![void 0, "", null].includes(value) && ![true, false].includes(value)) {
      return (0, import_i18n123.__)("Value must be true, false, or undefined");
    }
    return null;
  }
  var sort3 = (a2, b2, direction) => {
    const boolA = Boolean(a2);
    const boolB = Boolean(b2);
    if (boolA === boolB) {
      return 0;
    }
    if (direction === "asc") {
      return boolA ? 1 : -1;
    }
    return boolA ? -1 : 1;
  };
  var boolean_default = {
    type: "boolean",
    render,
    Edit: "checkbox",
    sort: sort3,
    validate: {
      required: isValidRequiredForBool,
      elements: isValidElements,
      custom: isValidCustom4
    },
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS2, OPERATOR_IS_NOT],
    validOperators: [OPERATOR_IS2, OPERATOR_IS_NOT],
    format: {},
    getValueFormatted: getValueFormatted6
  };

  // packages/dataviews/build-module/field-types/media.mjs
  var media_default2 = {
    type: "media",
    render: () => null,
    Edit: null,
    sort: () => 0,
    enableSorting: false,
    enableGlobalSearch: false,
    defaultOperators: [],
    validOperators: [],
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    // cannot validate any constraint, so
    // the only available validation for the field author
    // would be providing a custom validator.
    validate: {}
  };

  // packages/dataviews/build-module/field-types/array.mjs
  var import_i18n124 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/field-types/utils/is-valid-required-for-array.mjs
  function isValidRequiredForArray(item, field) {
    const value = field.getValue({ item });
    return Array.isArray(value) && value.length > 0 && value.every(
      (element) => ![void 0, "", null].includes(element)
    );
  }

  // packages/dataviews/build-module/field-types/array.mjs
  function getValueFormatted7({
    item,
    field
  }) {
    const value = field.getValue({ item });
    const arr = Array.isArray(value) ? value : [];
    return arr.join(", ");
  }
  function render2({ item, field }) {
    return getValueFormatted7({ item, field });
  }
  function isValidCustom5(item, field) {
    const value = field.getValue({ item });
    if (![void 0, "", null].includes(value) && !Array.isArray(value)) {
      return (0, import_i18n124.__)("Value must be an array.");
    }
    if (!value.every((v2) => typeof v2 === "string")) {
      return (0, import_i18n124.__)("Every value must be a string.");
    }
    return null;
  }
  var sort4 = (a2, b2, direction) => {
    const arrA = Array.isArray(a2) ? a2 : [];
    const arrB = Array.isArray(b2) ? b2 : [];
    if (arrA.length !== arrB.length) {
      return direction === "asc" ? arrA.length - arrB.length : arrB.length - arrA.length;
    }
    const joinedA = arrA.join(",");
    const joinedB = arrB.join(",");
    return direction === "asc" ? joinedA.localeCompare(joinedB) : joinedB.localeCompare(joinedA);
  };
  var array_default = {
    type: "array",
    render: render2,
    Edit: "array",
    sort: sort4,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS_ANY2, OPERATOR_IS_NONE2],
    validOperators: [
      OPERATOR_IS_ANY2,
      OPERATOR_IS_NONE2,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: {},
    getValueFormatted: getValueFormatted7,
    validate: {
      required: isValidRequiredForArray,
      elements: isValidElements,
      custom: isValidCustom5
    }
  };

  // packages/dataviews/build-module/field-types/password.mjs
  function getValueFormatted8({
    item,
    field
  }) {
    return field.getValue({ item }) ? "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" : "";
  }
  var password_default = {
    type: "password",
    render,
    Edit: "password",
    sort: () => 0,
    // Passwords should not be sortable for security reasons
    enableSorting: false,
    enableGlobalSearch: false,
    defaultOperators: [],
    validOperators: [],
    format: {},
    getValueFormatted: getValueFormatted8,
    validate: {
      required: isValidRequired,
      pattern: isValidPattern,
      minLength: isValidMinLength,
      maxLength: isValidMaxLength,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/telephone.mjs
  var telephone_default = {
    type: "telephone",
    render,
    Edit: "telephone",
    sort: sort_text_default,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS_ANY2, OPERATOR_IS_NONE2],
    validOperators: [
      OPERATOR_IS2,
      OPERATOR_IS_NOT,
      OPERATOR_CONTAINS,
      OPERATOR_NOT_CONTAINS,
      OPERATOR_STARTS_WITH,
      // Multiple selection
      OPERATOR_IS_ANY2,
      OPERATOR_IS_NONE2,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    validate: {
      required: isValidRequired,
      pattern: isValidPattern,
      minLength: isValidMinLength,
      maxLength: isValidMaxLength,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/color.mjs
  var import_i18n125 = __toESM(require_i18n(), 1);
  var import_jsx_runtime252 = __toESM(require_jsx_runtime(), 1);
  function render3({ item, field }) {
    if (field.hasElements) {
      return /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(RenderFromElements, { item, field });
    }
    const value = get_value_formatted_default_default({ item, field });
    if (!value || !w(value).isValid()) {
      return value;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime252.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
      /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(
        "div",
        {
          style: {
            width: "16px",
            height: "16px",
            borderRadius: "50%",
            backgroundColor: value,
            border: "1px solid #ddd",
            flexShrink: 0
          }
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime252.jsx)("span", { children: value })
    ] });
  }
  function isValidCustom6(item, field) {
    const value = field.getValue({ item });
    if (![void 0, "", null].includes(value) && !w(value).isValid()) {
      return (0, import_i18n125.__)("Value must be a valid color.");
    }
    return null;
  }
  var sort5 = (a2, b2, direction) => {
    const colorA = w(a2);
    const colorB = w(b2);
    if (!colorA.isValid() && !colorB.isValid()) {
      return 0;
    }
    if (!colorA.isValid()) {
      return direction === "asc" ? 1 : -1;
    }
    if (!colorB.isValid()) {
      return direction === "asc" ? -1 : 1;
    }
    const hslA = colorA.toHsl();
    const hslB = colorB.toHsl();
    if (hslA.h !== hslB.h) {
      return direction === "asc" ? hslA.h - hslB.h : hslB.h - hslA.h;
    }
    if (hslA.s !== hslB.s) {
      return direction === "asc" ? hslA.s - hslB.s : hslB.s - hslA.s;
    }
    return direction === "asc" ? hslA.l - hslB.l : hslB.l - hslA.l;
  };
  var color_default = {
    type: "color",
    render: render3,
    Edit: "color",
    sort: sort5,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS_ANY2, OPERATOR_IS_NONE2],
    validOperators: [
      OPERATOR_IS2,
      OPERATOR_IS_NOT,
      OPERATOR_IS_ANY2,
      OPERATOR_IS_NONE2
    ],
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    validate: {
      required: isValidRequired,
      elements: isValidElements,
      custom: isValidCustom6
    }
  };

  // packages/dataviews/build-module/field-types/url.mjs
  var url_default = {
    type: "url",
    render,
    Edit: "url",
    sort: sort_text_default,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS_ANY2, OPERATOR_IS_NONE2],
    validOperators: [
      OPERATOR_IS2,
      OPERATOR_IS_NOT,
      OPERATOR_CONTAINS,
      OPERATOR_NOT_CONTAINS,
      OPERATOR_STARTS_WITH,
      // Multiple selection
      OPERATOR_IS_ANY2,
      OPERATOR_IS_NONE2,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    validate: {
      required: isValidRequired,
      pattern: isValidPattern,
      minLength: isValidMinLength,
      maxLength: isValidMaxLength,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/no-type.mjs
  var sort6 = (a2, b2, direction) => {
    if (typeof a2 === "number" && typeof b2 === "number") {
      return sort_number_default(a2, b2, direction);
    }
    return sort_text_default(a2, b2, direction);
  };
  var no_type_default = {
    // type: no type for this one
    render,
    Edit: null,
    sort: sort6,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS2, OPERATOR_IS_NOT],
    validOperators: getAllOperatorNames(),
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    validate: {
      required: isValidRequired,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/utils/get-is-valid.mjs
  function getIsValid(field, fieldType) {
    let required;
    if (field.isValid?.required === true && fieldType.validate.required !== void 0) {
      required = {
        constraint: true,
        validate: fieldType.validate.required
      };
    }
    let elements2;
    if ((field.isValid?.elements === true || // elements is enabled unless the field opts-out
    field.isValid?.elements === void 0 && (!!field.elements || !!field.getElements)) && fieldType.validate.elements !== void 0) {
      elements2 = {
        constraint: true,
        validate: fieldType.validate.elements
      };
    }
    let min;
    if (typeof field.isValid?.min === "number" && fieldType.validate.min !== void 0) {
      min = {
        constraint: field.isValid.min,
        validate: fieldType.validate.min
      };
    }
    let max;
    if (typeof field.isValid?.max === "number" && fieldType.validate.max !== void 0) {
      max = {
        constraint: field.isValid.max,
        validate: fieldType.validate.max
      };
    }
    let minLength;
    if (typeof field.isValid?.minLength === "number" && fieldType.validate.minLength !== void 0) {
      minLength = {
        constraint: field.isValid.minLength,
        validate: fieldType.validate.minLength
      };
    }
    let maxLength;
    if (typeof field.isValid?.maxLength === "number" && fieldType.validate.maxLength !== void 0) {
      maxLength = {
        constraint: field.isValid.maxLength,
        validate: fieldType.validate.maxLength
      };
    }
    let pattern;
    if (field.isValid?.pattern !== void 0 && fieldType.validate.pattern !== void 0) {
      pattern = {
        constraint: field.isValid?.pattern,
        validate: fieldType.validate.pattern
      };
    }
    const custom = field.isValid?.custom ?? fieldType.validate.custom;
    return {
      required,
      elements: elements2,
      min,
      max,
      minLength,
      maxLength,
      pattern,
      custom
    };
  }

  // packages/dataviews/build-module/field-types/utils/get-filter.mjs
  function getFilter(fieldType) {
    return fieldType.validOperators.reduce((accumulator, operator) => {
      const operatorObj = getOperatorByName(operator);
      if (operatorObj?.filter) {
        accumulator[operator] = operatorObj.filter;
      }
      return accumulator;
    }, {});
  }

  // packages/dataviews/build-module/field-types/utils/get-format.mjs
  function getFormat(field, fieldType) {
    return {
      ...fieldType.format,
      ...field.format
    };
  }
  var get_format_default = getFormat;

  // packages/dataviews/build-module/field-types/index.mjs
  function getFieldTypeByName(type) {
    const found = [
      email_default,
      integer_default,
      number_default,
      text_default,
      datetime_default,
      date_default,
      boolean_default,
      media_default2,
      array_default,
      password_default,
      telephone_default,
      color_default,
      url_default
    ].find((fieldType) => fieldType?.type === type);
    if (!!found) {
      return found;
    }
    return no_type_default;
  }
  function normalizeFields(fields) {
    return fields.map((field) => {
      const fieldType = getFieldTypeByName(field.type);
      const getValue = field.getValue || get_value_from_id_default(field.id);
      const sort7 = function(a2, b2, direction) {
        const aValue = getValue({ item: a2 });
        const bValue = getValue({ item: b2 });
        return field.sort ? field.sort(aValue, bValue, direction) : fieldType.sort(aValue, bValue, direction);
      };
      return {
        id: field.id,
        label: field.label || field.id,
        header: field.header || field.label || field.id,
        description: field.description,
        placeholder: field.placeholder,
        getValue,
        setValue: field.setValue || set_value_from_id_default(field.id),
        elements: field.elements,
        getElements: field.getElements,
        hasElements: hasElements(field),
        isVisible: field.isVisible,
        enableHiding: field.enableHiding ?? true,
        readOnly: field.readOnly ?? false,
        // The type provides defaults for the following props
        type: fieldType.type,
        render: field.render ?? fieldType.render,
        Edit: getControl(field, fieldType.Edit),
        sort: sort7,
        enableSorting: field.enableSorting ?? fieldType.enableSorting,
        enableGlobalSearch: field.enableGlobalSearch ?? fieldType.enableGlobalSearch,
        isValid: getIsValid(field, fieldType),
        filterBy: get_filter_by_default(
          field,
          fieldType.defaultOperators,
          fieldType.validOperators
        ),
        filter: getFilter(fieldType),
        format: get_format_default(field, fieldType),
        getValueFormatted: field.getValueFormatted ?? fieldType.getValueFormatted
      };
    });
  }

  // packages/dataviews/build-module/hooks/use-data.mjs
  var import_element120 = __toESM(require_element(), 1);
  function useData(data, isLoading, paginationInfo) {
    const previousDataRef = (0, import_element120.useRef)(data);
    const previousPaginationInfoRef = (0, import_element120.useRef)(paginationInfo);
    const [hasInitiallyLoaded, setHasInitiallyLoaded] = (0, import_element120.useState)(
      !isLoading
    );
    (0, import_element120.useEffect)(() => {
      if (!isLoading) {
        previousDataRef.current = data;
        previousPaginationInfoRef.current = paginationInfo;
        setHasInitiallyLoaded(true);
      }
    }, [data, isLoading, paginationInfo]);
    return {
      data: isLoading && previousDataRef.current?.length ? previousDataRef.current : data,
      paginationInfo: isLoading && previousDataRef.current?.length ? previousPaginationInfoRef.current : paginationInfo,
      hasInitiallyLoaded
    };
  }

  // packages/dataviews/build-module/dataviews/index.mjs
  var import_jsx_runtime253 = __toESM(require_jsx_runtime(), 1);
  var defaultGetItemId = (item) => item.id;
  var defaultIsItemClickable = () => true;
  var EMPTY_ARRAY9 = [];
  var dataViewsLayouts = VIEW_LAYOUTS.filter(
    (viewLayout) => !viewLayout.isPicker
  );
  function DefaultUI({
    header,
    search = true,
    searchLabel = void 0
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime253.jsxs)(import_jsx_runtime253.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime253.jsxs)(
        Stack,
        {
          direction: "row",
          align: "top",
          justify: "space-between",
          className: "dataviews__view-actions",
          gap: "xs",
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime253.jsxs)(
              Stack,
              {
                direction: "row",
                justify: "start",
                gap: "sm",
                className: "dataviews__search",
                children: [
                  search && /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(dataviews_search_default, { label: searchLabel }),
                  /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(toggle_default, {})
                ]
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime253.jsxs)(Stack, { direction: "row", gap: "xs", style: { flexShrink: 0 }, children: [
              /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(dataviews_view_config_default, {}),
              header
            ] })
          ]
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(filters_toggled_default, { className: "dataviews-filters__container" }),
      /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(DataViewsLayout, {}),
      /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(DataViewsFooter, {})
    ] });
  }
  function DataViews({
    view,
    onChangeView,
    fields,
    search = true,
    searchLabel = void 0,
    actions = EMPTY_ARRAY9,
    data,
    getItemId: getItemId2 = defaultGetItemId,
    getItemLevel: getItemLevel2,
    isLoading = false,
    paginationInfo,
    defaultLayouts: defaultLayoutsProperty,
    selection: selectionProperty,
    onChangeSelection,
    onClickItem,
    renderItemLink,
    isItemClickable = defaultIsItemClickable,
    header,
    children,
    config: config2 = { perPageSizes: [10, 20, 50, 100] },
    empty,
    onReset
  }) {
    const { infiniteScrollHandler } = paginationInfo;
    const containerRef = (0, import_element121.useRef)(null);
    const [containerWidth, setContainerWidth] = (0, import_element121.useState)(0);
    const resizeObserverRef = (0, import_compose23.useResizeObserver)(
      (resizeObserverEntries) => {
        setContainerWidth(
          resizeObserverEntries[0].borderBoxSize[0].inlineSize
        );
      },
      { box: "border-box" }
    );
    const [selectionState, setSelectionState] = (0, import_element121.useState)([]);
    const isUncontrolled = selectionProperty === void 0 || onChangeSelection === void 0;
    const selection = isUncontrolled ? selectionState : selectionProperty;
    const [openedFilter, setOpenedFilter] = (0, import_element121.useState)(null);
    function setSelectionWithChange(value) {
      const newValue = typeof value === "function" ? value(selection) : value;
      if (isUncontrolled) {
        setSelectionState(newValue);
      }
      if (onChangeSelection) {
        onChangeSelection(newValue);
      }
    }
    const _fields = (0, import_element121.useMemo)(() => normalizeFields(fields), [fields]);
    const _selection = (0, import_element121.useMemo)(() => {
      return selection.filter(
        (id) => data.some((item) => getItemId2(item) === id)
      );
    }, [selection, data, getItemId2]);
    const filters = use_filters_default(_fields, view);
    const hasPrimaryOrLockedFilters = (0, import_element121.useMemo)(
      () => (filters || []).some(
        (filter) => filter.isPrimary || filter.isLocked
      ),
      [filters]
    );
    const [isShowingFilter, setIsShowingFilter] = (0, import_element121.useState)(
      hasPrimaryOrLockedFilters
    );
    (0, import_element121.useEffect)(() => {
      if (hasPrimaryOrLockedFilters && !isShowingFilter) {
        setIsShowingFilter(true);
      }
    }, [hasPrimaryOrLockedFilters, isShowingFilter]);
    (0, import_element121.useEffect)(() => {
      if (!view.infiniteScrollEnabled || !containerRef.current) {
        return;
      }
      const handleScroll = (0, import_compose23.throttle)((event) => {
        const target = event.target;
        const scrollTop = target.scrollTop;
        const scrollHeight = target.scrollHeight;
        const clientHeight = target.clientHeight;
        if (scrollTop + clientHeight >= scrollHeight - 100) {
          infiniteScrollHandler?.();
        }
      }, 100);
      const container = containerRef.current;
      container.addEventListener("scroll", handleScroll);
      return () => {
        container.removeEventListener("scroll", handleScroll);
        handleScroll.cancel();
      };
    }, [infiniteScrollHandler, view.infiniteScrollEnabled]);
    const defaultLayouts4 = (0, import_element121.useMemo)(
      () => Object.fromEntries(
        Object.entries(defaultLayoutsProperty).filter(
          ([layoutType]) => {
            return dataViewsLayouts.some(
              (viewLayout) => viewLayout.type === layoutType
            );
          }
        )
      ),
      [defaultLayoutsProperty]
    );
    const {
      data: displayData,
      paginationInfo: displayPaginationInfo,
      hasInitiallyLoaded
    } = useData(data, isLoading, paginationInfo);
    if (!defaultLayouts4[view.type]) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(
      dataviews_context_default.Provider,
      {
        value: {
          view,
          onChangeView,
          fields: _fields,
          actions,
          data: displayData,
          isLoading,
          paginationInfo: displayPaginationInfo,
          selection: _selection,
          onChangeSelection: setSelectionWithChange,
          openedFilter,
          setOpenedFilter,
          getItemId: getItemId2,
          getItemLevel: getItemLevel2,
          isItemClickable,
          onClickItem,
          renderItemLink,
          containerWidth,
          containerRef,
          resizeObserverRef,
          defaultLayouts: defaultLayouts4,
          filters,
          isShowingFilter,
          setIsShowingFilter,
          config: config2,
          empty,
          hasInitiallyLoaded,
          hasInfiniteScrollHandler: !!infiniteScrollHandler,
          onReset
        },
        children: /* @__PURE__ */ (0, import_jsx_runtime253.jsx)("div", { className: "dataviews-wrapper", ref: containerRef, children: children ?? /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(
          DefaultUI,
          {
            header,
            search,
            searchLabel
          }
        ) })
      }
    );
  }
  var DataViewsSubComponents = DataViews;
  DataViewsSubComponents.BulkActionToolbar = BulkActionsFooter;
  DataViewsSubComponents.Filters = filters_default;
  DataViewsSubComponents.FiltersToggled = filters_toggled_default;
  DataViewsSubComponents.FiltersToggle = toggle_default;
  DataViewsSubComponents.Layout = DataViewsLayout;
  DataViewsSubComponents.LayoutSwitcher = ViewTypeMenu;
  DataViewsSubComponents.Pagination = DataViewsPagination;
  DataViewsSubComponents.Search = dataviews_search_default;
  DataViewsSubComponents.ViewConfig = DataviewsViewConfigDropdown;
  DataViewsSubComponents.Footer = DataViewsFooter;
  var dataviews_default = DataViewsSubComponents;

  // packages/dataviews/build-module/dataform/index.mjs
  var import_element133 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/components/dataform-context/index.mjs
  var import_element122 = __toESM(require_element(), 1);
  var import_jsx_runtime254 = __toESM(require_jsx_runtime(), 1);
  var DataFormContext = (0, import_element122.createContext)({
    fields: []
  });
  DataFormContext.displayName = "DataFormContext";
  function DataFormProvider({
    fields,
    children
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(DataFormContext.Provider, { value: { fields }, children });
  }
  var dataform_context_default = DataFormContext;

  // packages/dataviews/build-module/components/dataform-layouts/data-form-layout.mjs
  var import_element132 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/components/dataform-layouts/regular/index.mjs
  var import_element123 = __toESM(require_element(), 1);
  var import_components137 = __toESM(require_components(), 1);

  // packages/dataviews/build-module/components/dataform-layouts/normalize-form.mjs
  var DEFAULT_LAYOUT = {
    type: "regular",
    labelPosition: "top"
  };
  var normalizeCardSummaryField = (sum) => {
    if (typeof sum === "string") {
      return [{ id: sum, visibility: "when-collapsed" }];
    }
    return sum.map((item) => {
      if (typeof item === "string") {
        return { id: item, visibility: "when-collapsed" };
      }
      return { id: item.id, visibility: item.visibility };
    });
  };
  function normalizeLayout(layout) {
    let normalizedLayout = DEFAULT_LAYOUT;
    if (layout?.type === "regular") {
      normalizedLayout = {
        type: "regular",
        labelPosition: layout?.labelPosition ?? "top"
      };
    } else if (layout?.type === "panel") {
      const summary = layout.summary ?? [];
      const normalizedSummary = Array.isArray(summary) ? summary : [summary];
      normalizedLayout = {
        type: "panel",
        labelPosition: layout?.labelPosition ?? "side",
        openAs: layout?.openAs ?? "dropdown",
        summary: normalizedSummary,
        editVisibility: layout?.editVisibility ?? "on-hover"
      };
    } else if (layout?.type === "card") {
      if (layout.withHeader === false) {
        normalizedLayout = {
          type: "card",
          withHeader: false,
          isOpened: true,
          summary: [],
          isCollapsible: false
        };
      } else {
        const summary = layout.summary ?? [];
        normalizedLayout = {
          type: "card",
          withHeader: true,
          isOpened: typeof layout.isOpened === "boolean" ? layout.isOpened : true,
          summary: normalizeCardSummaryField(summary),
          isCollapsible: layout.isCollapsible === void 0 ? true : layout.isCollapsible
        };
      }
    } else if (layout?.type === "row") {
      normalizedLayout = {
        type: "row",
        alignment: layout?.alignment ?? "center",
        styles: layout?.styles ?? {}
      };
    } else if (layout?.type === "details") {
      normalizedLayout = {
        type: "details",
        summary: layout?.summary ?? ""
      };
    }
    return normalizedLayout;
  }
  function normalizeForm(form) {
    const normalizedFormLayout = normalizeLayout(form?.layout);
    const normalizedFields = (form.fields ?? []).map(
      (field) => {
        if (typeof field === "string") {
          return {
            id: field,
            layout: normalizedFormLayout
          };
        }
        const fieldLayout = field.layout ? normalizeLayout(field.layout) : normalizedFormLayout;
        return {
          id: field.id,
          layout: fieldLayout,
          ...!!field.label && { label: field.label },
          ...!!field.description && {
            description: field.description
          },
          ..."children" in field && Array.isArray(field.children) && {
            children: normalizeForm({
              fields: field.children,
              layout: DEFAULT_LAYOUT
            }).fields
          }
        };
      }
    );
    return {
      layout: normalizedFormLayout,
      fields: normalizedFields
    };
  }
  var normalize_form_default = normalizeForm;

  // packages/dataviews/build-module/components/dataform-layouts/regular/index.mjs
  var import_jsx_runtime255 = __toESM(require_jsx_runtime(), 1);
  function Header2({ title }) {
    return /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
      Stack,
      {
        direction: "column",
        className: "dataforms-layouts-regular__header",
        gap: "lg",
        children: /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(Stack, { direction: "row", align: "center", children: /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(import_components137.__experimentalHeading, { level: 2, size: 13, children: title }) })
      }
    );
  }
  function FormRegularField({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { fields } = (0, import_element123.useContext)(dataform_context_default);
    const layout = field.layout;
    const form = (0, import_element123.useMemo)(
      () => ({
        layout: DEFAULT_LAYOUT,
        fields: !!field.children ? field.children : []
      }),
      [field]
    );
    if (!!field.children) {
      return /* @__PURE__ */ (0, import_jsx_runtime255.jsxs)(import_jsx_runtime255.Fragment, { children: [
        !hideLabelFromVision && field.label && /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(Header2, { title: field.label }),
        /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
          DataFormLayout,
          {
            data,
            form,
            onChange,
            validity: validity?.children
          }
        )
      ] });
    }
    const labelPosition = layout.labelPosition;
    const fieldDefinition = fields.find(
      (fieldDef) => fieldDef.id === field.id
    );
    if (!fieldDefinition || !fieldDefinition.Edit) {
      return null;
    }
    if (labelPosition === "side") {
      return /* @__PURE__ */ (0, import_jsx_runtime255.jsxs)(
        Stack,
        {
          direction: "row",
          className: "dataforms-layouts-regular__field",
          gap: "sm",
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
              "div",
              {
                className: clsx_default(
                  "dataforms-layouts-regular__field-label",
                  `dataforms-layouts-regular__field-label--label-position-${labelPosition}`
                ),
                children: /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(import_components137.BaseControl.VisualLabel, { children: fieldDefinition.label })
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime255.jsx)("div", { className: "dataforms-layouts-regular__field-control", children: fieldDefinition.readOnly === true ? /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
              fieldDefinition.render,
              {
                item: data,
                field: fieldDefinition
              }
            ) : /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
              fieldDefinition.Edit,
              {
                data,
                field: fieldDefinition,
                onChange,
                hideLabelFromVision: true,
                markWhenOptional,
                validity
              },
              fieldDefinition.id
            ) })
          ]
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime255.jsx)("div", { className: "dataforms-layouts-regular__field", children: fieldDefinition.readOnly === true ? /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(import_jsx_runtime255.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime255.jsxs)(import_jsx_runtime255.Fragment, { children: [
      !hideLabelFromVision && labelPosition !== "none" && /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(import_components137.BaseControl.VisualLabel, { children: fieldDefinition.label }),
      /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
        fieldDefinition.render,
        {
          item: data,
          field: fieldDefinition
        }
      )
    ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
      fieldDefinition.Edit,
      {
        data,
        field: fieldDefinition,
        onChange,
        hideLabelFromVision: labelPosition === "none" ? true : hideLabelFromVision,
        markWhenOptional,
        validity
      }
    ) });
  }

  // packages/dataviews/build-module/components/dataform-layouts/panel/modal.mjs
  var import_deepmerge3 = __toESM(require_cjs(), 1);
  var import_components140 = __toESM(require_components(), 1);
  var import_i18n128 = __toESM(require_i18n(), 1);
  var import_element128 = __toESM(require_element(), 1);
  var import_compose25 = __toESM(require_compose(), 1);

  // packages/dataviews/build-module/components/dataform-layouts/panel/summary-button.mjs
  var import_components139 = __toESM(require_components(), 1);
  var import_i18n126 = __toESM(require_i18n(), 1);
  var import_compose24 = __toESM(require_compose(), 1);
  var import_element124 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/components/dataform-layouts/panel/utils/get-label-classname.mjs
  function getLabelClassName(labelPosition, showError) {
    return clsx_default(
      "dataforms-layouts-panel__field-label",
      `dataforms-layouts-panel__field-label--label-position-${labelPosition}`,
      { "has-error": showError }
    );
  }
  var get_label_classname_default = getLabelClassName;

  // packages/dataviews/build-module/components/dataform-layouts/panel/utils/get-label-content.mjs
  var import_components138 = __toESM(require_components(), 1);
  var import_jsx_runtime256 = __toESM(require_jsx_runtime(), 1);
  function getLabelContent(showError, errorMessage, fieldLabel) {
    return showError ? /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(import_components138.Tooltip, { text: errorMessage, placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime256.jsxs)("span", { className: "dataforms-layouts-panel__field-label-error-content", children: [
      /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(import_components138.Icon, { icon: error_default, size: 16 }),
      fieldLabel
    ] }) }) : fieldLabel;
  }
  var get_label_content_default = getLabelContent;

  // packages/dataviews/build-module/components/dataform-layouts/panel/utils/get-first-validation-error.mjs
  function getFirstValidationError(validity) {
    if (!validity) {
      return void 0;
    }
    const validityRules = Object.keys(validity).filter(
      (key) => key !== "children"
    );
    for (const key of validityRules) {
      const rule = validity[key];
      if (rule === void 0) {
        continue;
      }
      if (rule.type === "invalid") {
        if (rule.message) {
          return rule.message;
        }
        if (key === "required") {
          return "A required field is empty";
        }
        return "Unidentified validation error";
      }
    }
    if (validity.children) {
      for (const childValidity of Object.values(validity.children)) {
        const childError = getFirstValidationError(childValidity);
        if (childError) {
          return childError;
        }
      }
    }
    return void 0;
  }
  var get_first_validation_error_default = getFirstValidationError;

  // packages/dataviews/build-module/components/dataform-layouts/panel/summary-button.mjs
  var import_jsx_runtime257 = __toESM(require_jsx_runtime(), 1);
  function SummaryButton({
    data,
    field,
    fieldLabel,
    summaryFields,
    validity,
    touched,
    disabled,
    onClick,
    "aria-expanded": ariaExpanded
  }) {
    const { labelPosition, editVisibility } = field.layout;
    const errorMessage = get_first_validation_error_default(validity);
    const showError = touched && !!errorMessage;
    const labelClassName = get_label_classname_default(labelPosition, showError);
    const labelContent = get_label_content_default(showError, errorMessage, fieldLabel);
    const className = clsx_default(
      "dataforms-layouts-panel__field-trigger",
      `dataforms-layouts-panel__field-trigger--label-${labelPosition}`,
      {
        "is-disabled": disabled,
        "dataforms-layouts-panel__field-trigger--edit-always": editVisibility === "always"
      }
    );
    const controlId = (0, import_compose24.useInstanceId)(
      SummaryButton,
      "dataforms-layouts-panel__field-control"
    );
    const ariaLabel = showError ? (0, import_i18n126.sprintf)(
      // translators: %s: Field name.
      (0, import_i18n126._x)("Edit %s (has errors)", "field"),
      fieldLabel || ""
    ) : (0, import_i18n126.sprintf)(
      // translators: %s: Field name.
      (0, import_i18n126._x)("Edit %s", "field"),
      fieldLabel || ""
    );
    const rowRef = (0, import_element124.useRef)(null);
    const handleRowClick = () => {
      const selection = rowRef.current?.ownerDocument.defaultView?.getSelection();
      if (selection && selection.toString().length > 0) {
        return;
      }
      onClick();
    };
    const handleKeyDown = (event) => {
      if (event.target === event.currentTarget && (event.key === "Enter" || event.key === " ")) {
        event.preventDefault();
        onClick();
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime257.jsxs)(
      "div",
      {
        ref: rowRef,
        className,
        onClick: !disabled ? handleRowClick : void 0,
        onKeyDown: !disabled ? handleKeyDown : void 0,
        children: [
          labelPosition !== "none" && /* @__PURE__ */ (0, import_jsx_runtime257.jsx)("span", { className: labelClassName, children: labelContent }),
          labelPosition === "none" && showError && /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(import_components139.Tooltip, { text: errorMessage, placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime257.jsx)("span", { className: "dataforms-layouts-panel__field-label-error-content", children: /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(import_components139.Icon, { icon: error_default, size: 16 }) }) }),
          /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
            "span",
            {
              id: `${controlId}`,
              className: "dataforms-layouts-panel__field-control",
              children: summaryFields.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
                "span",
                {
                  style: {
                    display: "flex",
                    flexDirection: "column",
                    alignItems: "flex-start",
                    width: "100%",
                    gap: "2px"
                  },
                  children: summaryFields.map((summaryField) => /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
                    "span",
                    {
                      style: { width: "100%" },
                      children: /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
                        summaryField.render,
                        {
                          item: data,
                          field: summaryField
                        }
                      )
                    },
                    summaryField.id
                  ))
                }
              ) : summaryFields.map((summaryField) => /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
                summaryField.render,
                {
                  item: data,
                  field: summaryField
                },
                summaryField.id
              ))
            }
          ),
          !disabled && /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
            import_components139.Button,
            {
              className: "dataforms-layouts-panel__field-trigger-icon",
              label: ariaLabel,
              showTooltip: false,
              icon: pencil_default,
              size: "small",
              "aria-expanded": ariaExpanded,
              "aria-haspopup": "dialog",
              "aria-describedby": `${controlId}`
            }
          )
        ]
      }
    );
  }

  // packages/dataviews/build-module/hooks/use-form-validity.mjs
  var import_deepmerge2 = __toESM(require_cjs(), 1);
  var import_es63 = __toESM(require_es6(), 1);
  var import_element125 = __toESM(require_element(), 1);
  var import_i18n127 = __toESM(require_i18n(), 1);
  function isFormValid(formValidity) {
    if (!formValidity) {
      return true;
    }
    return Object.values(formValidity).every((fieldValidation) => {
      return Object.entries(fieldValidation).every(
        ([key, validation]) => {
          if (key === "children" && validation && typeof validation === "object") {
            return isFormValid(validation);
          }
          return validation.type !== "invalid" && validation.type !== "validating";
        }
      );
    });
  }
  function getFormFieldsToValidate(form, fields) {
    const normalizedForm = normalize_form_default(form);
    if (normalizedForm.fields.length === 0) {
      return [];
    }
    const fieldsMap = /* @__PURE__ */ new Map();
    fields.forEach((field) => {
      fieldsMap.set(field.id, field);
    });
    function processFormField(formField) {
      if ("children" in formField && Array.isArray(formField.children)) {
        const processedChildren = formField.children.map(processFormField).filter((child) => child !== null);
        if (processedChildren.length === 0) {
          return null;
        }
        const fieldDef2 = fieldsMap.get(formField.id);
        if (fieldDef2) {
          const [normalizedField2] = normalizeFields([
            fieldDef2
          ]);
          return {
            id: formField.id,
            children: processedChildren,
            field: normalizedField2
          };
        }
        return {
          id: formField.id,
          children: processedChildren
        };
      }
      const fieldDef = fieldsMap.get(formField.id);
      if (!fieldDef) {
        return null;
      }
      const [normalizedField] = normalizeFields([fieldDef]);
      return {
        id: formField.id,
        children: [],
        field: normalizedField
      };
    }
    const toValidate = normalizedForm.fields.map(processFormField).filter((field) => field !== null);
    return toValidate;
  }
  function setValidityAtPath(formValidity, fieldValidity, path) {
    if (!formValidity) {
      formValidity = {};
    }
    if (path.length === 0) {
      return formValidity;
    }
    const result = { ...formValidity };
    let current = result;
    for (let i2 = 0; i2 < path.length - 1; i2++) {
      const segment = path[i2];
      if (!current[segment]) {
        current[segment] = {};
      }
      current[segment] = { ...current[segment] };
      current = current[segment];
    }
    const finalKey = path[path.length - 1];
    current[finalKey] = {
      ...current[finalKey] || {},
      ...fieldValidity
    };
    return result;
  }
  function removeValidationProperty(formValidity, path, property) {
    if (!formValidity || path.length === 0) {
      return formValidity;
    }
    const result = { ...formValidity };
    let current = result;
    for (let i2 = 0; i2 < path.length - 1; i2++) {
      const segment = path[i2];
      if (!current[segment]) {
        return formValidity;
      }
      current[segment] = { ...current[segment] };
      current = current[segment];
    }
    const finalKey = path[path.length - 1];
    if (!current[finalKey]) {
      return formValidity;
    }
    const fieldValidity = { ...current[finalKey] };
    delete fieldValidity[property];
    if (Object.keys(fieldValidity).length === 0) {
      delete current[finalKey];
    } else {
      current[finalKey] = fieldValidity;
    }
    if (Object.keys(result).length === 0) {
      return void 0;
    }
    return result;
  }
  function handleElementsValidationAsync(promise, formField, promiseHandler) {
    const { elementsCounterRef, setFormValidity, path, item } = promiseHandler;
    const currentToken = (elementsCounterRef.current[formField.id] || 0) + 1;
    elementsCounterRef.current[formField.id] = currentToken;
    promise.then((result) => {
      if (currentToken !== elementsCounterRef.current[formField.id]) {
        return;
      }
      if (!Array.isArray(result)) {
        setFormValidity((prev) => {
          const newFormValidity = setValidityAtPath(
            prev,
            {
              elements: {
                type: "invalid",
                message: (0, import_i18n127.__)("Could not validate elements.")
              }
            },
            [...path, formField.id]
          );
          return newFormValidity;
        });
        return;
      }
      if (formField.field?.isValid.elements && !formField.field.isValid.elements.validate(item, {
        ...formField.field,
        elements: result
      })) {
        setFormValidity((prev) => {
          const newFormValidity = setValidityAtPath(
            prev,
            {
              elements: {
                type: "invalid",
                message: (0, import_i18n127.__)(
                  "Value must be one of the elements."
                )
              }
            },
            [...path, formField.id]
          );
          return newFormValidity;
        });
      } else {
        setFormValidity((prev) => {
          return removeValidationProperty(
            prev,
            [...path, formField.id],
            "elements"
          );
        });
      }
    }).catch((error) => {
      if (currentToken !== elementsCounterRef.current[formField.id]) {
        return;
      }
      let errorMessage;
      if (error instanceof Error) {
        errorMessage = error.message;
      } else {
        errorMessage = String(error) || (0, import_i18n127.__)(
          "Unknown error when running elements validation asynchronously."
        );
      }
      setFormValidity((prev) => {
        const newFormValidity = setValidityAtPath(
          prev,
          {
            elements: {
              type: "invalid",
              message: errorMessage
            }
          },
          [...path, formField.id]
        );
        return newFormValidity;
      });
    });
  }
  function handleCustomValidationAsync(promise, formField, promiseHandler) {
    const { customCounterRef, setFormValidity, path } = promiseHandler;
    const currentToken = (customCounterRef.current[formField.id] || 0) + 1;
    customCounterRef.current[formField.id] = currentToken;
    promise.then((result) => {
      if (currentToken !== customCounterRef.current[formField.id]) {
        return;
      }
      if (result === null) {
        setFormValidity((prev) => {
          return removeValidationProperty(
            prev,
            [...path, formField.id],
            "custom"
          );
        });
        return;
      }
      if (typeof result === "string") {
        setFormValidity((prev) => {
          const newFormValidity = setValidityAtPath(
            prev,
            {
              custom: {
                type: "invalid",
                message: result
              }
            },
            [...path, formField.id]
          );
          return newFormValidity;
        });
        return;
      }
      setFormValidity((prev) => {
        const newFormValidity = setValidityAtPath(
          prev,
          {
            custom: {
              type: "invalid",
              message: (0, import_i18n127.__)("Validation could not be processed.")
            }
          },
          [...path, formField.id]
        );
        return newFormValidity;
      });
    }).catch((error) => {
      if (currentToken !== customCounterRef.current[formField.id]) {
        return;
      }
      let errorMessage;
      if (error instanceof Error) {
        errorMessage = error.message;
      } else {
        errorMessage = String(error) || (0, import_i18n127.__)(
          "Unknown error when running custom validation asynchronously."
        );
      }
      setFormValidity((prev) => {
        const newFormValidity = setValidityAtPath(
          prev,
          {
            custom: {
              type: "invalid",
              message: errorMessage
            }
          },
          [...path, formField.id]
        );
        return newFormValidity;
      });
    });
  }
  function validateFormField(item, formField, promiseHandler) {
    if (formField.field?.isValid.required && !formField.field.isValid.required.validate(item, formField.field)) {
      return {
        required: { type: "invalid" }
      };
    }
    if (formField.field?.isValid.pattern && !formField.field.isValid.pattern.validate(item, formField.field)) {
      return {
        pattern: {
          type: "invalid",
          message: (0, import_i18n127.__)("Value does not match the required pattern.")
        }
      };
    }
    if (formField.field?.isValid.min && !formField.field.isValid.min.validate(item, formField.field)) {
      return {
        min: {
          type: "invalid",
          message: (0, import_i18n127.__)("Value is below the minimum.")
        }
      };
    }
    if (formField.field?.isValid.max && !formField.field.isValid.max.validate(item, formField.field)) {
      return {
        max: {
          type: "invalid",
          message: (0, import_i18n127.__)("Value is above the maximum.")
        }
      };
    }
    if (formField.field?.isValid.minLength && !formField.field.isValid.minLength.validate(item, formField.field)) {
      return {
        minLength: {
          type: "invalid",
          message: (0, import_i18n127.__)("Value is too short.")
        }
      };
    }
    if (formField.field?.isValid.maxLength && !formField.field.isValid.maxLength.validate(item, formField.field)) {
      return {
        maxLength: {
          type: "invalid",
          message: (0, import_i18n127.__)("Value is too long.")
        }
      };
    }
    if (formField.field?.isValid.elements && formField.field.hasElements && !formField.field.getElements && Array.isArray(formField.field.elements) && !formField.field.isValid.elements.validate(item, formField.field)) {
      return {
        elements: {
          type: "invalid",
          message: (0, import_i18n127.__)("Value must be one of the elements.")
        }
      };
    }
    let customError;
    if (!!formField.field && formField.field.isValid.custom) {
      try {
        const value = formField.field.getValue({ item });
        customError = formField.field.isValid.custom(
          (0, import_deepmerge2.default)(
            item,
            formField.field.setValue({
              item,
              value
            })
          ),
          formField.field
        );
      } catch (error) {
        let errorMessage;
        if (error instanceof Error) {
          errorMessage = error.message;
        } else {
          errorMessage = String(error) || (0, import_i18n127.__)("Unknown error when running custom validation.");
        }
        return {
          custom: {
            type: "invalid",
            message: errorMessage
          }
        };
      }
    }
    if (typeof customError === "string") {
      return {
        custom: {
          type: "invalid",
          message: customError
        }
      };
    }
    const fieldValidity = {};
    if (!!formField.field && formField.field.isValid.elements && formField.field.hasElements && typeof formField.field.getElements === "function") {
      handleElementsValidationAsync(
        formField.field.getElements(),
        formField,
        promiseHandler
      );
      fieldValidity.elements = {
        type: "validating",
        message: (0, import_i18n127.__)("Validating\u2026")
      };
    }
    if (customError instanceof Promise) {
      handleCustomValidationAsync(customError, formField, promiseHandler);
      fieldValidity.custom = {
        type: "validating",
        message: (0, import_i18n127.__)("Validating\u2026")
      };
    }
    if (Object.keys(fieldValidity).length > 0) {
      return fieldValidity;
    }
    if (formField.children.length > 0) {
      const result = {};
      formField.children.forEach((child) => {
        result[child.id] = validateFormField(item, child, {
          ...promiseHandler,
          path: [...promiseHandler.path, formField.id, "children"]
        });
      });
      const filteredResult = {};
      Object.entries(result).forEach(([key, value]) => {
        if (value !== void 0) {
          filteredResult[key] = value;
        }
      });
      if (Object.keys(filteredResult).length === 0) {
        return void 0;
      }
      return {
        children: filteredResult
      };
    }
    return void 0;
  }
  function getFormFieldValue(formField, item) {
    const fieldValue = formField?.field?.getValue({ item });
    if (formField.children.length === 0) {
      return fieldValue;
    }
    const childrenValues = formField.children.map(
      (child) => getFormFieldValue(child, item)
    );
    if (!childrenValues) {
      return fieldValue;
    }
    return {
      value: fieldValue,
      children: childrenValues
    };
  }
  function useFormValidity(item, fields, form) {
    const [formValidity, setFormValidity] = (0, import_element125.useState)();
    const customCounterRef = (0, import_element125.useRef)({});
    const elementsCounterRef = (0, import_element125.useRef)({});
    const previousValuesRef = (0, import_element125.useRef)({});
    const validate = (0, import_element125.useCallback)(() => {
      const promiseHandler = {
        customCounterRef,
        elementsCounterRef,
        setFormValidity,
        path: [],
        item
      };
      const formFieldsToValidate = getFormFieldsToValidate(form, fields);
      if (formFieldsToValidate.length === 0) {
        setFormValidity(void 0);
        return;
      }
      const newFormValidity = {};
      const untouchedFields = [];
      formFieldsToValidate.forEach((formField) => {
        const value = getFormFieldValue(formField, item);
        if (previousValuesRef.current.hasOwnProperty(formField.id) && (0, import_es63.default)(
          previousValuesRef.current[formField.id],
          value
        )) {
          untouchedFields.push(formField.id);
          return;
        }
        previousValuesRef.current[formField.id] = value;
        const fieldValidity = validateFormField(
          item,
          formField,
          promiseHandler
        );
        if (fieldValidity !== void 0) {
          newFormValidity[formField.id] = fieldValidity;
        }
      });
      setFormValidity((existingFormValidity) => {
        let validity = {
          ...existingFormValidity,
          ...newFormValidity
        };
        const fieldsToKeep = [
          ...untouchedFields,
          ...Object.keys(newFormValidity)
        ];
        Object.keys(validity).forEach((key) => {
          if (validity && !fieldsToKeep.includes(key)) {
            delete validity[key];
          }
        });
        if (Object.keys(validity).length === 0) {
          validity = void 0;
        }
        const areEqual = (0, import_es63.default)(existingFormValidity, validity);
        if (areEqual) {
          return existingFormValidity;
        }
        return validity;
      });
    }, [item, fields, form]);
    (0, import_element125.useEffect)(() => {
      validate();
    }, [validate]);
    return {
      validity: formValidity,
      isValid: isFormValid(formValidity)
    };
  }
  var use_form_validity_default = useFormValidity;

  // packages/dataviews/build-module/hooks/use-report-validity.mjs
  var import_element126 = __toESM(require_element(), 1);
  function useReportValidity(ref, shouldReport) {
    (0, import_element126.useEffect)(() => {
      if (shouldReport && ref.current) {
        const inputs = ref.current.querySelectorAll(
          "input, textarea, select"
        );
        inputs.forEach((input) => {
          input.reportValidity();
        });
      }
    }, [shouldReport, ref]);
  }

  // packages/dataviews/build-module/components/dataform-layouts/panel/utils/use-field-from-form-field.mjs
  var import_element127 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/components/dataform-layouts/get-summary-fields.mjs
  function extractSummaryIds(summary) {
    if (Array.isArray(summary)) {
      return summary.map(
        (item) => typeof item === "string" ? item : item.id
      );
    }
    return [];
  }
  var getSummaryFields = (summaryField, fields) => {
    if (Array.isArray(summaryField) && summaryField.length > 0) {
      const summaryIds = extractSummaryIds(summaryField);
      return summaryIds.map(
        (summaryId) => fields.find((_field) => _field.id === summaryId)
      ).filter((_field) => _field !== void 0);
    }
    return [];
  };

  // packages/dataviews/build-module/components/dataform-layouts/panel/utils/use-field-from-form-field.mjs
  var getFieldDefinition = (field, fields) => {
    const fieldDefinition = fields.find((_field) => _field.id === field.id);
    if (!fieldDefinition) {
      return fields.find((_field) => {
        if (!!field.children) {
          const simpleChildren = field.children.filter(
            (child) => !child.children
          );
          if (simpleChildren.length === 0) {
            return false;
          }
          return _field.id === simpleChildren[0].id;
        }
        return _field.id === field.id;
      });
    }
    return fieldDefinition;
  };
  function useFieldFromFormField(field) {
    const { fields } = (0, import_element127.useContext)(dataform_context_default);
    const layout = field.layout;
    const summaryFields = getSummaryFields(layout.summary, fields);
    const fieldDefinition = getFieldDefinition(field, fields);
    const fieldLabel = !!field.children ? field.label : fieldDefinition?.label;
    if (summaryFields.length === 0) {
      return {
        summaryFields: fieldDefinition ? [fieldDefinition] : [],
        fieldDefinition,
        fieldLabel
      };
    }
    return {
      summaryFields,
      fieldDefinition,
      fieldLabel
    };
  }
  var use_field_from_form_field_default = useFieldFromFormField;

  // packages/dataviews/build-module/components/dataform-layouts/panel/modal.mjs
  var import_jsx_runtime258 = __toESM(require_jsx_runtime(), 1);
  function ModalContent({
    data,
    field,
    onChange,
    fieldLabel,
    onClose,
    touched
  }) {
    const { fields } = (0, import_element128.useContext)(dataform_context_default);
    const [changes, setChanges] = (0, import_element128.useState)({});
    const modalData = (0, import_element128.useMemo)(() => {
      return (0, import_deepmerge3.default)(data, changes, {
        arrayMerge: (target, source) => source
      });
    }, [data, changes]);
    const form = (0, import_element128.useMemo)(
      () => ({
        layout: DEFAULT_LAYOUT,
        fields: !!field.children ? field.children : (
          // If not explicit children return the field id itself.
          [{ id: field.id, layout: DEFAULT_LAYOUT }]
        )
      }),
      [field]
    );
    const fieldsAsFieldType = fields.map((f2) => ({
      ...f2,
      Edit: f2.Edit === null ? void 0 : f2.Edit,
      isValid: {
        required: f2.isValid.required?.constraint,
        elements: f2.isValid.elements?.constraint,
        min: f2.isValid.min?.constraint,
        max: f2.isValid.max?.constraint,
        pattern: f2.isValid.pattern?.constraint,
        minLength: f2.isValid.minLength?.constraint,
        maxLength: f2.isValid.maxLength?.constraint
      }
    }));
    const { validity } = use_form_validity_default(modalData, fieldsAsFieldType, form);
    const onApply = () => {
      onChange(changes);
      onClose();
    };
    const handleOnChange = (newValue) => {
      setChanges(
        (prev) => (0, import_deepmerge3.default)(prev, newValue, {
          arrayMerge: (target, source) => source
        })
      );
    };
    const focusOnMountRef = (0, import_compose25.useFocusOnMount)("firstInputElement");
    const contentRef = (0, import_element128.useRef)(null);
    const mergedRef = (0, import_compose25.useMergeRefs)([focusOnMountRef, contentRef]);
    useReportValidity(contentRef, touched);
    return /* @__PURE__ */ (0, import_jsx_runtime258.jsxs)(
      import_components140.Modal,
      {
        className: "dataforms-layouts-panel__modal",
        onRequestClose: onClose,
        isFullScreen: false,
        title: fieldLabel,
        size: "medium",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime258.jsx)("div", { ref: mergedRef, children: /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
            DataFormLayout,
            {
              data: modalData,
              form,
              onChange: handleOnChange,
              validity,
              children: (FieldLayout, childField, childFieldValidity, markWhenOptional) => /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
                FieldLayout,
                {
                  data: modalData,
                  field: childField,
                  onChange: handleOnChange,
                  hideLabelFromVision: form.fields.length < 2,
                  markWhenOptional,
                  validity: childFieldValidity
                },
                childField.id
              )
            }
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime258.jsxs)(
            Stack,
            {
              direction: "row",
              className: "dataforms-layouts-panel__modal-footer",
              gap: "md",
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(import_components140.__experimentalSpacer, { style: { flex: 1 } }),
                /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
                  import_components140.Button,
                  {
                    variant: "tertiary",
                    onClick: onClose,
                    __next40pxDefaultSize: true,
                    children: (0, import_i18n128.__)("Cancel")
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
                  import_components140.Button,
                  {
                    variant: "primary",
                    onClick: onApply,
                    __next40pxDefaultSize: true,
                    children: (0, import_i18n128.__)("Apply")
                  }
                )
              ]
            }
          )
        ]
      }
    );
  }
  function PanelModal({
    data,
    field,
    onChange,
    validity
  }) {
    const [touched, setTouched] = (0, import_element128.useState)(false);
    const [isOpen, setIsOpen] = (0, import_element128.useState)(false);
    const { fieldDefinition, fieldLabel, summaryFields } = use_field_from_form_field_default(field);
    if (!fieldDefinition) {
      return null;
    }
    const handleClose = () => {
      setIsOpen(false);
      setTouched(true);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime258.jsxs)(import_jsx_runtime258.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
        SummaryButton,
        {
          data,
          field,
          fieldLabel,
          summaryFields,
          validity,
          touched,
          disabled: fieldDefinition.readOnly === true,
          onClick: () => setIsOpen(true),
          "aria-expanded": isOpen
        }
      ),
      isOpen && /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
        ModalContent,
        {
          data,
          field,
          onChange,
          fieldLabel: fieldLabel ?? "",
          onClose: handleClose,
          touched
        }
      )
    ] });
  }
  var modal_default2 = PanelModal;

  // packages/dataviews/build-module/components/dataform-layouts/panel/dropdown.mjs
  var import_components141 = __toESM(require_components(), 1);
  var import_i18n129 = __toESM(require_i18n(), 1);
  var import_element129 = __toESM(require_element(), 1);
  var import_compose26 = __toESM(require_compose(), 1);
  var import_jsx_runtime259 = __toESM(require_jsx_runtime(), 1);
  function DropdownHeader({
    title,
    onClose
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
      Stack,
      {
        direction: "column",
        className: "dataforms-layouts-panel__dropdown-header",
        gap: "lg",
        children: /* @__PURE__ */ (0, import_jsx_runtime259.jsxs)(Stack, { direction: "row", gap: "sm", align: "center", children: [
          title && /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(import_components141.__experimentalHeading, { level: 2, size: 13, children: title }),
          /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(import_components141.__experimentalSpacer, { style: { flex: 1 } }),
          onClose && /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
            import_components141.Button,
            {
              label: (0, import_i18n129.__)("Close"),
              icon: close_small_default,
              onClick: onClose,
              size: "small"
            }
          )
        ] })
      }
    );
  }
  function DropdownContentWithValidation({
    touched,
    children
  }) {
    const ref = (0, import_element129.useRef)(null);
    useReportValidity(ref, touched);
    return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)("div", { ref, children });
  }
  function PanelDropdown({
    data,
    field,
    onChange,
    validity
  }) {
    const [touched, setTouched] = (0, import_element129.useState)(false);
    const [popoverAnchor, setPopoverAnchor] = (0, import_element129.useState)(
      null
    );
    const popoverProps = (0, import_element129.useMemo)(
      () => ({
        // Anchor the popover to the middle of the entire row so that it doesn't
        // move around when the label changes.
        anchor: popoverAnchor,
        placement: "left-start",
        offset: 36,
        shift: true
      }),
      [popoverAnchor]
    );
    const [dialogRef, dialogProps] = (0, import_compose26.__experimentalUseDialog)({
      focusOnMount: "firstInputElement"
    });
    const form = (0, import_element129.useMemo)(
      () => ({
        layout: DEFAULT_LAYOUT,
        fields: !!field.children ? field.children : (
          // If not explicit children return the field id itself.
          [{ id: field.id, layout: DEFAULT_LAYOUT }]
        )
      }),
      [field]
    );
    const formValidity = (0, import_element129.useMemo)(() => {
      if (validity === void 0) {
        return void 0;
      }
      if (!!field.children) {
        return validity?.children;
      }
      return { [field.id]: validity };
    }, [validity, field]);
    const { fieldDefinition, fieldLabel, summaryFields } = use_field_from_form_field_default(field);
    if (!fieldDefinition) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
      "div",
      {
        ref: setPopoverAnchor,
        className: "dataforms-layouts-panel__field-dropdown-anchor",
        children: /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
          import_components141.Dropdown,
          {
            contentClassName: "dataforms-layouts-panel__field-dropdown",
            popoverProps,
            focusOnMount: false,
            onToggle: (willOpen) => {
              if (!willOpen) {
                setTouched(true);
              }
            },
            renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
              SummaryButton,
              {
                data,
                field,
                fieldLabel,
                summaryFields,
                validity,
                touched,
                disabled: fieldDefinition.readOnly === true,
                onClick: onToggle,
                "aria-expanded": isOpen
              }
            ),
            renderContent: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(DropdownContentWithValidation, { touched, children: /* @__PURE__ */ (0, import_jsx_runtime259.jsxs)("div", { ref: dialogRef, ...dialogProps, children: [
              /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
                DropdownHeader,
                {
                  title: fieldLabel,
                  onClose
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
                DataFormLayout,
                {
                  data,
                  form,
                  onChange,
                  validity: formValidity,
                  children: (FieldLayout, childField, childFieldValidity, markWhenOptional) => /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
                    FieldLayout,
                    {
                      data,
                      field: childField,
                      onChange,
                      hideLabelFromVision: (form?.fields ?? []).length < 2,
                      markWhenOptional,
                      validity: childFieldValidity
                    },
                    childField.id
                  )
                }
              )
            ] }) })
          }
        )
      }
    );
  }
  var dropdown_default = PanelDropdown;

  // packages/dataviews/build-module/components/dataform-layouts/panel/index.mjs
  var import_jsx_runtime260 = __toESM(require_jsx_runtime(), 1);
  function FormPanelField({
    data,
    field,
    onChange,
    validity
  }) {
    const layout = field.layout;
    if (layout.openAs === "modal") {
      return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
        modal_default2,
        {
          data,
          field,
          onChange,
          validity
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
      dropdown_default,
      {
        data,
        field,
        onChange,
        validity
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-layouts/card/index.mjs
  var import_components142 = __toESM(require_components(), 1);
  var import_compose27 = __toESM(require_compose(), 1);
  var import_element130 = __toESM(require_element(), 1);
  var import_i18n131 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/components/dataform-layouts/validation-badge.mjs
  var import_i18n130 = __toESM(require_i18n(), 1);
  var import_jsx_runtime261 = __toESM(require_jsx_runtime(), 1);
  function countInvalidFields(validity) {
    if (!validity) {
      return 0;
    }
    let count = 0;
    const validityRules = Object.keys(validity).filter(
      (key) => key !== "children"
    );
    for (const key of validityRules) {
      const rule = validity[key];
      if (rule?.type === "invalid") {
        count++;
      }
    }
    if (validity.children) {
      for (const childValidity of Object.values(validity.children)) {
        count += countInvalidFields(childValidity);
      }
    }
    return count;
  }
  function ValidationBadge({
    validity
  }) {
    const invalidCount = countInvalidFields(validity);
    if (invalidCount === 0) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(Badge, { intent: "high", children: (0, import_i18n130.sprintf)(
      /* translators: %d: Number of fields that need attention */
      (0, import_i18n130._n)(
        "%d field needs attention",
        "%d fields need attention",
        invalidCount
      ),
      invalidCount
    ) });
  }

  // packages/dataviews/build-module/components/dataform-layouts/card/index.mjs
  var import_jsx_runtime262 = __toESM(require_jsx_runtime(), 1);
  function isSummaryFieldVisible(summaryField, summaryConfig, isOpen) {
    if (!summaryConfig || Array.isArray(summaryConfig) && summaryConfig.length === 0) {
      return false;
    }
    const summaryConfigArray = Array.isArray(summaryConfig) ? summaryConfig : [summaryConfig];
    const fieldConfig = summaryConfigArray.find((config2) => {
      if (typeof config2 === "string") {
        return config2 === summaryField.id;
      }
      if (typeof config2 === "object" && "id" in config2) {
        return config2.id === summaryField.id;
      }
      return false;
    });
    if (!fieldConfig) {
      return false;
    }
    if (typeof fieldConfig === "string") {
      return true;
    }
    if (typeof fieldConfig === "object" && "visibility" in fieldConfig) {
      return fieldConfig.visibility === "always" || fieldConfig.visibility === "when-collapsed" && !isOpen;
    }
    return true;
  }
  function FormCardField({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { fields } = (0, import_element130.useContext)(dataform_context_default);
    const layout = field.layout;
    const cardBodyRef = (0, import_element130.useRef)(null);
    const bodyId = (0, import_compose27.useInstanceId)(
      FormCardField,
      "dataforms-layouts-card-card-body"
    );
    const form = (0, import_element130.useMemo)(
      () => ({
        layout: DEFAULT_LAYOUT,
        fields: field.children ?? []
      }),
      [field]
    );
    const { isOpened, isCollapsible } = layout;
    const [internalIsOpen, setIsOpen] = (0, import_element130.useState)(isOpened);
    const [touched, setTouched] = (0, import_element130.useState)(false);
    (0, import_element130.useEffect)(() => {
      setIsOpen(isOpened);
    }, [isOpened]);
    const toggle = (0, import_element130.useCallback)(() => {
      setIsOpen((prev) => {
        if (prev) {
          setTouched(true);
        }
        return !prev;
      });
    }, []);
    const isOpen = isCollapsible ? internalIsOpen : true;
    const handleBlur = (0, import_element130.useCallback)(() => {
      setTouched(true);
    }, [setTouched]);
    useReportValidity(cardBodyRef, isOpen && touched);
    const summaryFields = getSummaryFields(layout.summary, fields);
    const visibleSummaryFields = summaryFields.filter(
      (summaryField) => isSummaryFieldVisible(summaryField, layout.summary, isOpen)
    );
    const validationBadge = touched && layout.isCollapsible ? /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(ValidationBadge, { validity }) : null;
    const sizeCard = {
      blockStart: "medium",
      blockEnd: "medium",
      inlineStart: "medium",
      inlineEnd: "medium"
    };
    let label = field.label;
    let withHeader;
    let bodyContent;
    if (field.children) {
      withHeader = !!label && layout.withHeader;
      bodyContent = /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)(import_jsx_runtime262.Fragment, { children: [
        field.description && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)("div", { className: "dataforms-layouts-card__field-description", children: field.description }),
        /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          DataFormLayout,
          {
            data,
            form,
            onChange,
            validity: validity?.children
          }
        )
      ] });
    } else {
      const fieldDefinition = fields.find(
        (fieldDef) => fieldDef.id === field.id
      );
      if (!fieldDefinition || !fieldDefinition.Edit) {
        return null;
      }
      const SingleFieldLayout = getFormFieldLayout("regular")?.component;
      if (!SingleFieldLayout) {
        return null;
      }
      label = fieldDefinition.label;
      withHeader = !!label && layout.withHeader;
      bodyContent = /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
        SingleFieldLayout,
        {
          data,
          field,
          onChange,
          hideLabelFromVision: hideLabelFromVision || withHeader,
          markWhenOptional,
          validity
        }
      );
    }
    const sizeCardBody = {
      blockStart: withHeader ? "none" : "medium",
      blockEnd: "medium",
      inlineStart: "medium",
      inlineEnd: "medium"
    };
    return /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)(import_components142.Card, { className: "dataforms-layouts-card__field", size: sizeCard, children: [
      withHeader && /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)(
        import_components142.CardHeader,
        {
          className: "dataforms-layouts-card__field-header",
          onClick: isCollapsible ? toggle : void 0,
          style: {
            cursor: isCollapsible ? "pointer" : void 0
          },
          isBorderless: true,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)(
              "div",
              {
                style: {
                  // Match the expand/collapse button's height to avoid layout
                  // differences when that button is not displayed.
                  height: isCollapsible ? void 0 : "40px",
                  width: "100%",
                  display: "flex",
                  justifyContent: "space-between",
                  alignItems: "center"
                },
                children: [
                  /* @__PURE__ */ (0, import_jsx_runtime262.jsx)("span", { className: "dataforms-layouts-card__field-header-label", children: label }),
                  validationBadge,
                  visibleSummaryFields.length > 0 && layout.withHeader && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)("div", { className: "dataforms-layouts-card__field-summary", children: visibleSummaryFields.map(
                    (summaryField) => /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
                      summaryField.render,
                      {
                        item: data,
                        field: summaryField
                      },
                      summaryField.id
                    )
                  ) })
                ]
              }
            ),
            isCollapsible && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
              import_components142.Button,
              {
                __next40pxDefaultSize: true,
                variant: "tertiary",
                icon: isOpen ? chevron_up_default : chevron_down_default,
                "aria-expanded": isOpen,
                "aria-controls": bodyId,
                "aria-label": isOpen ? (0, import_i18n131.__)("Collapse") : (0, import_i18n131.__)("Expand")
              }
            )
          ]
        }
      ),
      (isOpen || !withHeader) && // If it doesn't have a header, keep it open.
      // Otherwise, the card will not be visible.
      /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
        import_components142.CardBody,
        {
          id: bodyId,
          size: sizeCardBody,
          className: "dataforms-layouts-card__field-control",
          ref: cardBodyRef,
          onBlur: handleBlur,
          children: bodyContent
        }
      )
    ] });
  }

  // packages/dataviews/build-module/components/dataform-layouts/row/index.mjs
  var import_components143 = __toESM(require_components(), 1);
  var import_jsx_runtime263 = __toESM(require_jsx_runtime(), 1);
  function Header3({ title }) {
    return /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
      Stack,
      {
        direction: "column",
        className: "dataforms-layouts-row__header",
        gap: "lg",
        children: /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(Stack, { direction: "row", align: "center", children: /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(import_components143.__experimentalHeading, { level: 2, size: 13, children: title }) })
      }
    );
  }
  var EMPTY_WRAPPER = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(import_jsx_runtime263.Fragment, { children });
  function FormRowField({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const layout = field.layout;
    if (!!field.children) {
      const form = {
        layout: DEFAULT_LAYOUT,
        fields: field.children
      };
      return /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)("div", { className: "dataforms-layouts-row__field", children: [
        !hideLabelFromVision && field.label && /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(Header3, { title: field.label }),
        /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(Stack, { direction: "row", align: layout.alignment, gap: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
          DataFormLayout,
          {
            data,
            form,
            onChange,
            validity: validity?.children,
            as: EMPTY_WRAPPER,
            children: (FieldLayout, childField, childFieldValidity) => /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
              "div",
              {
                className: "dataforms-layouts-row__field-control",
                style: layout.styles[childField.id],
                children: /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
                  FieldLayout,
                  {
                    data,
                    field: childField,
                    onChange,
                    hideLabelFromVision,
                    markWhenOptional,
                    validity: childFieldValidity
                  }
                )
              },
              childField.id
            )
          }
        ) })
      ] });
    }
    const RegularLayout = getFormFieldLayout("regular")?.component;
    if (!RegularLayout) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(import_jsx_runtime263.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime263.jsx)("div", { className: "dataforms-layouts-row__field-control", children: /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
      RegularLayout,
      {
        data,
        field,
        onChange,
        markWhenOptional,
        validity
      }
    ) }) });
  }

  // packages/dataviews/build-module/components/dataform-layouts/details/index.mjs
  var import_element131 = __toESM(require_element(), 1);
  var import_i18n132 = __toESM(require_i18n(), 1);
  var import_jsx_runtime264 = __toESM(require_jsx_runtime(), 1);
  function FormDetailsField({
    data,
    field,
    onChange,
    validity
  }) {
    const { fields } = (0, import_element131.useContext)(dataform_context_default);
    const detailsRef = (0, import_element131.useRef)(null);
    const contentRef = (0, import_element131.useRef)(null);
    const [touched, setTouched] = (0, import_element131.useState)(false);
    const [isOpen, setIsOpen] = (0, import_element131.useState)(false);
    const form = (0, import_element131.useMemo)(
      () => ({
        layout: DEFAULT_LAYOUT,
        fields: field.children ?? []
      }),
      [field]
    );
    (0, import_element131.useEffect)(() => {
      const details = detailsRef.current;
      if (!details) {
        return;
      }
      const handleToggle = () => {
        const nowOpen = details.open;
        if (!nowOpen) {
          setTouched(true);
        }
        setIsOpen(nowOpen);
      };
      details.addEventListener("toggle", handleToggle);
      return () => {
        details.removeEventListener("toggle", handleToggle);
      };
    }, []);
    useReportValidity(contentRef, isOpen && touched);
    const handleBlur = (0, import_element131.useCallback)(() => {
      setTouched(true);
    }, []);
    if (!field.children) {
      return null;
    }
    const summaryFieldId = field.layout.summary ?? "";
    const summaryField = summaryFieldId ? fields.find((fieldDef) => fieldDef.id === summaryFieldId) : void 0;
    let summaryContent;
    if (summaryField && summaryField.render) {
      summaryContent = /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(summaryField.render, { item: data, field: summaryField });
    } else {
      summaryContent = field.label || (0, import_i18n132.__)("More details");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime264.jsxs)(
      "details",
      {
        ref: detailsRef,
        className: "dataforms-layouts-details__details",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime264.jsx)("summary", { className: "dataforms-layouts-details__summary", children: /* @__PURE__ */ (0, import_jsx_runtime264.jsxs)(
            Stack,
            {
              direction: "row",
              align: "center",
              gap: "md",
              className: "dataforms-layouts-details__summary-content",
              children: [
                summaryContent,
                touched && /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(ValidationBadge, { validity })
              ]
            }
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(
            "div",
            {
              ref: contentRef,
              className: "dataforms-layouts-details__content",
              onBlur: handleBlur,
              children: /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(
                DataFormLayout,
                {
                  data,
                  form,
                  onChange,
                  validity: validity?.children
                }
              )
            }
          )
        ]
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-layouts/index.mjs
  var import_jsx_runtime265 = __toESM(require_jsx_runtime(), 1);
  var FORM_FIELD_LAYOUTS = [
    {
      type: "regular",
      component: FormRegularField,
      wrapper: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
        Stack,
        {
          direction: "column",
          className: "dataforms-layouts__wrapper",
          gap: "lg",
          children
        }
      )
    },
    {
      type: "panel",
      component: FormPanelField,
      wrapper: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
        Stack,
        {
          direction: "column",
          className: "dataforms-layouts__wrapper",
          gap: "md",
          children
        }
      )
    },
    {
      type: "card",
      component: FormCardField,
      wrapper: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
        Stack,
        {
          direction: "column",
          className: "dataforms-layouts__wrapper",
          gap: "xl",
          children
        }
      )
    },
    {
      type: "row",
      component: FormRowField,
      wrapper: ({
        children,
        layout
      }) => /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
        Stack,
        {
          direction: "column",
          className: "dataforms-layouts__wrapper",
          gap: "lg",
          children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)("div", { className: "dataforms-layouts-row__field", children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
            Stack,
            {
              direction: "row",
              gap: "lg",
              align: layout.alignment,
              children
            }
          ) })
        }
      )
    },
    {
      type: "details",
      component: FormDetailsField
    }
  ];
  function getFormFieldLayout(type) {
    return FORM_FIELD_LAYOUTS.find((layout) => layout.type === type);
  }

  // packages/dataviews/build-module/components/dataform-layouts/data-form-layout.mjs
  var import_jsx_runtime266 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_WRAPPER = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(Stack, { direction: "column", className: "dataforms-layouts__wrapper", gap: "lg", children });
  function DataFormLayout({
    data,
    form,
    onChange,
    validity,
    children,
    as
  }) {
    const { fields: fieldDefinitions } = (0, import_element132.useContext)(dataform_context_default);
    const markWhenOptional = (0, import_element132.useMemo)(() => {
      const requiredCount = fieldDefinitions.filter(
        (f2) => !!f2.isValid?.required
      ).length;
      const optionalCount = fieldDefinitions.length - requiredCount;
      return requiredCount > optionalCount;
    }, [fieldDefinitions]);
    function getFieldDefinition2(field) {
      return fieldDefinitions.find(
        (fieldDefinition) => fieldDefinition.id === field.id
      );
    }
    const Wrapper = as ?? getFormFieldLayout(form.layout.type)?.wrapper ?? DEFAULT_WRAPPER;
    return /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(Wrapper, { layout: form.layout, children: form.fields.map((formField) => {
      const FieldLayout = getFormFieldLayout(formField.layout.type)?.component;
      if (!FieldLayout) {
        return null;
      }
      const fieldDefinition = !formField.children ? getFieldDefinition2(formField) : void 0;
      if (fieldDefinition && fieldDefinition.isVisible && !fieldDefinition.isVisible(data)) {
        return null;
      }
      if (children) {
        return children(
          FieldLayout,
          formField,
          validity?.[formField.id],
          markWhenOptional
        );
      }
      return /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(
        FieldLayout,
        {
          data,
          field: formField,
          onChange,
          markWhenOptional,
          validity: validity?.[formField.id]
        },
        formField.id
      );
    }) });
  }

  // packages/dataviews/build-module/dataform/index.mjs
  var import_jsx_runtime267 = __toESM(require_jsx_runtime(), 1);
  function DataForm({
    data,
    form,
    fields,
    onChange,
    validity
  }) {
    const normalizedForm = (0, import_element133.useMemo)(() => normalize_form_default(form), [form]);
    const normalizedFields = (0, import_element133.useMemo)(
      () => normalizeFields(fields),
      [fields]
    );
    if (!form.fields) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(DataFormProvider, { fields: normalizedFields, children: /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
      DataFormLayout,
      {
        data,
        form: normalizedForm,
        onChange,
        validity
      }
    ) });
  }

  // packages/dataviews/build-module/utils/filter-sort-and-paginate.mjs
  var import_remove_accents2 = __toESM(require_remove_accents(), 1);
  var import_deprecated4 = __toESM(require_deprecated(), 1);
  function normalizeSearchInput2(input = "") {
    return (0, import_remove_accents2.default)(input.trim().toLowerCase());
  }
  var EMPTY_ARRAY10 = [];
  function filterSortAndPaginate(data, view, fields) {
    if (!data) {
      return {
        data: EMPTY_ARRAY10,
        paginationInfo: { totalItems: 0, totalPages: 0 }
      };
    }
    const _fields = normalizeFields(fields);
    let filteredData = [...data];
    if (view.search) {
      const normalizedSearch = normalizeSearchInput2(view.search);
      filteredData = filteredData.filter((item) => {
        return _fields.filter((field) => field.enableGlobalSearch).some((field) => {
          const fieldValue = field.getValue({ item });
          const values = Array.isArray(fieldValue) ? fieldValue : [fieldValue];
          return values.some(
            (value) => normalizeSearchInput2(String(value)).includes(
              normalizedSearch
            )
          );
        });
      });
    }
    if (view.filters && view.filters?.length > 0) {
      view.filters.forEach((filter) => {
        const field = _fields.find(
          (_field) => _field.id === filter.field
        );
        if (field) {
          if (filter.operator === OPERATOR_IS_NOT_ALL) {
            (0, import_deprecated4.default)("The 'isNotAll' filter operator", {
              since: "7.0",
              alternative: "'isNone'"
            });
          }
          const handler = field.filter[filter.operator];
          if (handler) {
            filteredData = filteredData.filter(
              (item) => handler(item, field, filter.value)
            );
          }
        }
      });
    }
    const sortByField = view.sort?.field ? _fields.find((field) => {
      return field.enableSorting !== false && field.id === view.sort?.field;
    }) : null;
    const groupByField = view.groupBy?.field ? _fields.find((field) => {
      return field.enableSorting !== false && field.id === view.groupBy?.field;
    }) : null;
    if (sortByField || groupByField) {
      filteredData.sort((a2, b2) => {
        if (groupByField) {
          const groupCompare = groupByField.sort(
            a2,
            b2,
            view.groupBy?.direction ?? "asc"
          );
          if (groupCompare !== 0) {
            return groupCompare;
          }
        }
        if (sortByField) {
          return sortByField.sort(a2, b2, view.sort?.direction ?? "desc");
        }
        return 0;
      });
    }
    let totalItems = filteredData.length;
    let totalPages = 1;
    if (view.page !== void 0 && view.perPage !== void 0) {
      const start2 = (view.page - 1) * view.perPage;
      totalItems = filteredData?.length || 0;
      totalPages = Math.ceil(totalItems / view.perPage);
      filteredData = filteredData?.slice(start2, start2 + view.perPage);
    }
    return {
      data: filteredData,
      paginationInfo: {
        totalItems,
        totalPages
      }
    };
  }

  // packages/edit-site/build-module/components/page-patterns/index.mjs
  var import_core_data48 = __toESM(require_core_data(), 1);
  var import_editor31 = __toESM(require_editor(), 1);
  var import_router31 = __toESM(require_router(), 1);

  // node_modules/dequal/dist/index.mjs
  var has = Object.prototype.hasOwnProperty;
  function find(iter, tar, key) {
    for (key of iter.keys()) {
      if (dequal(key, tar)) return key;
    }
  }
  function dequal(foo, bar) {
    var ctor, len, tmp;
    if (foo === bar) return true;
    if (foo && bar && (ctor = foo.constructor) === bar.constructor) {
      if (ctor === Date) return foo.getTime() === bar.getTime();
      if (ctor === RegExp) return foo.toString() === bar.toString();
      if (ctor === Array) {
        if ((len = foo.length) === bar.length) {
          while (len-- && dequal(foo[len], bar[len])) ;
        }
        return len === -1;
      }
      if (ctor === Set) {
        if (foo.size !== bar.size) {
          return false;
        }
        for (len of foo) {
          tmp = len;
          if (tmp && typeof tmp === "object") {
            tmp = find(bar, tmp);
            if (!tmp) return false;
          }
          if (!bar.has(tmp)) return false;
        }
        return true;
      }
      if (ctor === Map) {
        if (foo.size !== bar.size) {
          return false;
        }
        for (len of foo) {
          tmp = len[0];
          if (tmp && typeof tmp === "object") {
            tmp = find(bar, tmp);
            if (!tmp) return false;
          }
          if (!dequal(len[1], bar.get(tmp))) {
            return false;
          }
        }
        return true;
      }
      if (ctor === ArrayBuffer) {
        foo = new Uint8Array(foo);
        bar = new Uint8Array(bar);
      } else if (ctor === DataView) {
        if ((len = foo.byteLength) === bar.byteLength) {
          while (len-- && foo.getInt8(len) === bar.getInt8(len)) ;
        }
        return len === -1;
      }
      if (ArrayBuffer.isView(foo)) {
        if ((len = foo.byteLength) === bar.byteLength) {
          while (len-- && foo[len] === bar[len]) ;
        }
        return len === -1;
      }
      if (!ctor || typeof foo === "object") {
        len = 0;
        for (ctor in foo) {
          if (has.call(foo, ctor) && ++len && !has.call(bar, ctor)) return false;
          if (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return false;
        }
        return Object.keys(bar).length === len;
      }
    }
    return foo !== foo && bar !== bar;
  }

  // packages/views/build-module/use-view.mjs
  var import_element134 = __toESM(require_element(), 1);
  var import_data64 = __toESM(require_data(), 1);
  var import_preferences11 = __toESM(require_preferences(), 1);

  // packages/views/build-module/preference-keys.mjs
  function generatePreferenceKey(kind, name2, slug) {
    return `dataviews-${kind}-${name2}-${slug}`;
  }

  // packages/views/build-module/filter-utils.mjs
  var SCALAR_VALUES = [
    "titleField",
    "mediaField",
    "descriptionField",
    "showTitle",
    "showMedia",
    "showDescription",
    "showLevels",
    "infiniteScrollEnabled"
  ];
  function mergeActiveViewOverrides(view, activeViewOverrides, defaultView) {
    if (!activeViewOverrides) {
      return view;
    }
    let result = view;
    for (const key of SCALAR_VALUES) {
      if (key in activeViewOverrides) {
        result = { ...result, [key]: activeViewOverrides[key] };
      }
    }
    if (activeViewOverrides.filters && activeViewOverrides.filters.length > 0) {
      const activeFields = new Set(
        activeViewOverrides.filters.map((f2) => f2.field)
      );
      const preserved = (view.filters ?? []).filter(
        (f2) => !activeFields.has(f2.field)
      );
      result = {
        ...result,
        filters: [...preserved, ...activeViewOverrides.filters]
      };
    }
    if (activeViewOverrides.sort) {
      const isDefaultSort = defaultView && view.sort?.field === defaultView.sort?.field && view.sort?.direction === defaultView.sort?.direction;
      if (isDefaultSort) {
        result = {
          ...result,
          sort: activeViewOverrides.sort
        };
      }
    }
    if (activeViewOverrides.layout) {
      result = {
        ...result,
        layout: {
          ...result.layout,
          ...activeViewOverrides.layout
        }
      };
    }
    if (activeViewOverrides.groupBy) {
      result = {
        ...result,
        groupBy: activeViewOverrides.groupBy
      };
    }
    return result;
  }
  function stripActiveViewOverrides(view, activeViewOverrides, defaultView) {
    if (!activeViewOverrides) {
      return view;
    }
    let result = view;
    for (const key of SCALAR_VALUES) {
      if (key in activeViewOverrides) {
        const { [key]: _, ...rest } = result;
        result = rest;
      }
    }
    if (activeViewOverrides.filters && activeViewOverrides.filters.length > 0) {
      const activeFields = new Set(
        activeViewOverrides.filters.map((f2) => f2.field)
      );
      result = {
        ...result,
        filters: (view.filters ?? []).filter(
          (f2) => !activeFields.has(f2.field)
        )
      };
    }
    if (activeViewOverrides.sort && view.sort?.field === activeViewOverrides.sort.field && view.sort?.direction === activeViewOverrides.sort.direction) {
      result = {
        ...result,
        sort: defaultView?.sort
      };
    }
    if (activeViewOverrides.layout && "layout" in result && result.layout) {
      const layout = { ...result.layout };
      for (const key of Object.keys(activeViewOverrides.layout)) {
        delete layout[key];
      }
      result = {
        ...result,
        layout: Object.keys(layout).length > 0 ? layout : void 0
      };
    }
    if (activeViewOverrides.groupBy && "groupBy" in result) {
      const { groupBy: _, ...rest } = result;
      result = rest;
    }
    return result;
  }

  // packages/views/build-module/use-view.mjs
  function omit3(obj, keys) {
    const result = { ...obj };
    for (const key of keys) {
      delete result[key];
    }
    return result;
  }
  function useView(config2) {
    const {
      kind,
      name: name2,
      slug,
      defaultView,
      activeViewOverrides,
      queryParams,
      onChangeQueryParams
    } = config2;
    const preferenceKey = generatePreferenceKey(kind, name2, slug);
    const persistedView = (0, import_data64.useSelect)(
      (select3) => {
        return select3(import_preferences11.store).get(
          "core/views",
          preferenceKey
        );
      },
      [preferenceKey]
    );
    const { set } = (0, import_data64.useDispatch)(import_preferences11.store);
    const baseView = persistedView ?? defaultView;
    const page = Number(queryParams?.page ?? baseView.page ?? 1);
    const search = queryParams?.search ?? baseView.search ?? "";
    const view = (0, import_element134.useMemo)(() => {
      return mergeActiveViewOverrides(
        {
          ...baseView,
          page,
          search
        },
        activeViewOverrides,
        defaultView
      );
    }, [baseView, page, search, activeViewOverrides, defaultView]);
    const isModified = !!persistedView;
    const updateView = (0, import_element134.useCallback)(
      (newView) => {
        const urlParams = {
          page: newView?.page,
          search: newView?.search
        };
        const preferenceView = stripActiveViewOverrides(
          omit3(newView, ["page", "search"]),
          activeViewOverrides,
          defaultView
        );
        if (onChangeQueryParams && !dequal(urlParams, { page, search })) {
          onChangeQueryParams(urlParams);
        }
        const comparableBaseView = stripActiveViewOverrides(
          baseView,
          activeViewOverrides,
          defaultView
        );
        const comparableDefaultView = stripActiveViewOverrides(
          defaultView,
          activeViewOverrides,
          defaultView
        );
        if (!dequal(comparableBaseView, preferenceView)) {
          if (dequal(preferenceView, comparableDefaultView)) {
            set("core/views", preferenceKey, void 0);
          } else {
            set("core/views", preferenceKey, preferenceView);
          }
        }
      },
      [
        onChangeQueryParams,
        page,
        search,
        baseView,
        defaultView,
        activeViewOverrides,
        set,
        preferenceKey
      ]
    );
    const resetToDefault = (0, import_element134.useCallback)(() => {
      set("core/views", preferenceKey, void 0);
    }, [preferenceKey, set]);
    return {
      view,
      isModified,
      updateView,
      resetToDefault
    };
  }

  // packages/views/build-module/load-view.mjs
  var import_data65 = __toESM(require_data(), 1);
  var import_preferences12 = __toESM(require_preferences(), 1);
  async function loadView(config2) {
    const { kind, name: name2, slug, defaultView, activeViewOverrides, queryParams } = config2;
    const preferenceKey = generatePreferenceKey(kind, name2, slug);
    const persistedView = (0, import_data65.select)(import_preferences12.store).get(
      "core/views",
      preferenceKey
    );
    const baseView = persistedView ?? defaultView;
    const page = queryParams?.page ?? 1;
    const search = queryParams?.search ?? "";
    return mergeActiveViewOverrides(
      {
        ...baseView,
        page,
        search
      },
      activeViewOverrides,
      defaultView
    );
  }

  // packages/edit-site/build-module/components/page-patterns/index.mjs
  var import_data71 = __toESM(require_data(), 1);
  var import_url17 = __toESM(require_url(), 1);

  // packages/edit-site/build-module/components/page-patterns/use-pattern-settings.mjs
  var import_core_data43 = __toESM(require_core_data(), 1);
  var import_data66 = __toESM(require_data(), 1);
  var import_element135 = __toESM(require_element(), 1);
  var import_block_editor23 = __toESM(require_block_editor(), 1);
  var import_editor28 = __toESM(require_editor(), 1);
  var { useGlobalStyles: useGlobalStyles3 } = unlock(import_editor28.privateApis);
  var { globalStylesDataKey } = unlock(import_block_editor23.privateApis);
  function usePatternSettings() {
    const { merged: mergedConfig } = useGlobalStyles3();
    const storedSettings = (0, import_data66.useSelect)((select3) => {
      const { getSettings: getSettings7 } = unlock(select3(store));
      return getSettings7();
    }, []);
    const settingsBlockPatterns = storedSettings.__experimentalAdditionalBlockPatterns ?? // WP 6.0
    storedSettings.__experimentalBlockPatterns;
    const restBlockPatterns = (0, import_data66.useSelect)(
      (select3) => select3(import_core_data43.store).getBlockPatterns(),
      []
    );
    const blockPatterns = (0, import_element135.useMemo)(
      () => [
        ...settingsBlockPatterns || [],
        ...restBlockPatterns || []
      ].filter(filterOutDuplicatesByName),
      [settingsBlockPatterns, restBlockPatterns]
    );
    const [globalStyles, globalSettings] = (0, import_element135.useMemo)(() => {
      return generateGlobalStyles(mergedConfig, [], {
        disableRootPadding: false
      });
    }, [mergedConfig]);
    const settings2 = (0, import_element135.useMemo)(() => {
      const {
        __experimentalAdditionalBlockPatterns,
        styles,
        __experimentalFeatures,
        ...restStoredSettings
      } = storedSettings;
      const nonGlobalStyles = (styles ?? []).filter(
        (style) => !style.isGlobalStyles
      );
      return {
        ...restStoredSettings,
        styles: [...nonGlobalStyles, ...globalStyles],
        __experimentalFeatures: globalSettings,
        [globalStylesDataKey]: mergedConfig.styles ?? {},
        __experimentalBlockPatterns: blockPatterns,
        isPreviewMode: true
      };
    }, [
      storedSettings,
      blockPatterns,
      globalStyles,
      globalSettings,
      mergedConfig
    ]);
    return settings2;
  }

  // packages/edit-site/build-module/components/page-patterns/actions.mjs
  var import_components147 = __toESM(require_components(), 1);
  var import_i18n136 = __toESM(require_i18n(), 1);

  // packages/edit-site/build-module/components/add-new-pattern/index.mjs
  var import_components144 = __toESM(require_components(), 1);
  var import_element136 = __toESM(require_element(), 1);
  var import_i18n133 = __toESM(require_i18n(), 1);
  var import_data67 = __toESM(require_data(), 1);
  var import_router28 = __toESM(require_router(), 1);
  var import_patterns2 = __toESM(require_patterns(), 1);
  var import_notices5 = __toESM(require_notices(), 1);
  var import_core_data44 = __toESM(require_core_data(), 1);
  var import_editor29 = __toESM(require_editor(), 1);
  var import_jsx_runtime268 = __toESM(require_jsx_runtime(), 1);
  var { useHistory: useHistory17, useLocation: useLocation25 } = unlock(import_router28.privateApis);
  var { CreatePatternModal, useAddPatternCategory } = unlock(
    import_patterns2.privateApis
  );
  var { CreateTemplatePartModal } = unlock(import_editor29.privateApis);
  function AddNewPattern() {
    const history = useHistory17();
    const location = useLocation25();
    const [showPatternModal, setShowPatternModal] = (0, import_element136.useState)(false);
    const [showTemplatePartModal, setShowTemplatePartModal] = (0, import_element136.useState)(false);
    const { createPatternFromFile } = unlock((0, import_data67.useDispatch)(import_patterns2.store));
    const { createSuccessNotice, createErrorNotice } = (0, import_data67.useDispatch)(import_notices5.store);
    const patternUploadInputRef = (0, import_element136.useRef)();
    const {
      isBlockBasedTheme,
      addNewPatternLabel,
      addNewTemplatePartLabel,
      canCreatePattern,
      canCreateTemplatePart
    } = (0, import_data67.useSelect)((select3) => {
      const { getCurrentTheme, getPostType: getPostType2, canUser } = select3(import_core_data44.store);
      return {
        isBlockBasedTheme: getCurrentTheme()?.is_block_theme,
        addNewPatternLabel: getPostType2(PATTERN_TYPES.user)?.labels?.add_new_item,
        addNewTemplatePartLabel: getPostType2(TEMPLATE_PART_POST_TYPE)?.labels?.add_new_item,
        // Blocks refers to the wp_block post type, this checks the ability to create a post of that type.
        canCreatePattern: canUser("create", {
          kind: "postType",
          name: PATTERN_TYPES.user
        }),
        canCreateTemplatePart: canUser("create", {
          kind: "postType",
          name: TEMPLATE_PART_POST_TYPE
        })
      };
    }, []);
    function handleCreatePattern({ pattern }) {
      setShowPatternModal(false);
      history.navigate(
        `/${PATTERN_TYPES.user}/${pattern.id}?canvas=edit`
      );
    }
    function handleCreateTemplatePart(templatePart) {
      setShowTemplatePartModal(false);
      history.navigate(
        `/${TEMPLATE_PART_POST_TYPE}/${templatePart.id}?canvas=edit`
      );
    }
    function handleError() {
      setShowPatternModal(false);
      setShowTemplatePartModal(false);
    }
    const controls = [];
    if (canCreatePattern) {
      controls.push({
        icon: symbol_default,
        onClick: () => setShowPatternModal(true),
        title: addNewPatternLabel
      });
    }
    if (isBlockBasedTheme && canCreateTemplatePart) {
      controls.push({
        icon: symbol_filled_default,
        onClick: () => setShowTemplatePartModal(true),
        title: addNewTemplatePartLabel
      });
    }
    if (canCreatePattern) {
      controls.push({
        icon: upload_default,
        onClick: () => {
          patternUploadInputRef.current.click();
        },
        title: (0, import_i18n133.__)("Import pattern from JSON")
      });
    }
    const { categoryMap, findOrCreateTerm } = useAddPatternCategory();
    if (controls.length === 0) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime268.jsxs)(import_jsx_runtime268.Fragment, { children: [
      addNewPatternLabel && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
        import_components144.DropdownMenu,
        {
          controls,
          icon: null,
          toggleProps: {
            variant: "primary",
            showTooltip: false,
            __next40pxDefaultSize: true
          },
          text: addNewPatternLabel,
          label: addNewPatternLabel
        }
      ),
      showPatternModal && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
        CreatePatternModal,
        {
          onClose: () => setShowPatternModal(false),
          onSuccess: handleCreatePattern,
          onError: handleError
        }
      ),
      showTemplatePartModal && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
        CreateTemplatePartModal,
        {
          closeModal: () => setShowTemplatePartModal(false),
          blocks: [],
          onCreate: handleCreateTemplatePart,
          onError: handleError
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
        "input",
        {
          type: "file",
          accept: ".json",
          hidden: true,
          ref: patternUploadInputRef,
          onChange: async (event) => {
            const file = event.target.files?.[0];
            if (!file) {
              return;
            }
            try {
              let currentCategoryId;
              if (location.query.postType !== TEMPLATE_PART_POST_TYPE) {
                const currentCategory = Array.from(
                  categoryMap.values()
                ).find(
                  (term) => term.name === location.query.categoryId
                );
                if (currentCategory) {
                  currentCategoryId = currentCategory.id || await findOrCreateTerm(
                    currentCategory.label
                  );
                }
              }
              const pattern = await createPatternFromFile(
                file,
                currentCategoryId ? [currentCategoryId] : void 0
              );
              if (!currentCategoryId && location.query.categoryId !== "my-patterns") {
                history.navigate(
                  `/pattern?categoryId=${PATTERN_DEFAULT_CATEGORY}`
                );
              }
              createSuccessNotice(
                (0, import_i18n133.sprintf)(
                  // translators: %s: The imported pattern's title.
                  (0, import_i18n133.__)('Imported "%s" from JSON.'),
                  pattern.title.raw
                ),
                {
                  type: "snackbar",
                  id: "import-pattern-success"
                }
              );
            } catch (err) {
              createErrorNotice(err.message, {
                type: "snackbar",
                id: "import-pattern-error"
              });
            } finally {
              event.target.value = "";
            }
          }
        }
      )
    ] });
  }

  // packages/edit-site/build-module/components/page-patterns/rename-category-menu-item.mjs
  var import_components145 = __toESM(require_components(), 1);
  var import_element137 = __toESM(require_element(), 1);
  var import_i18n134 = __toESM(require_i18n(), 1);
  var import_patterns3 = __toESM(require_patterns(), 1);
  var import_jsx_runtime269 = __toESM(require_jsx_runtime(), 1);
  var { RenamePatternCategoryModal } = unlock(import_patterns3.privateApis);
  function RenameCategoryMenuItem({ category, onClose }) {
    const [isModalOpen, setIsModalOpen] = (0, import_element137.useState)(false);
    return /* @__PURE__ */ (0, import_jsx_runtime269.jsxs)(import_jsx_runtime269.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(import_components145.MenuItem, { onClick: () => setIsModalOpen(true), children: (0, import_i18n134.__)("Rename") }),
      isModalOpen && /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
        RenameModal2,
        {
          category,
          onClose: () => {
            setIsModalOpen(false);
            onClose();
          }
        }
      )
    ] });
  }
  function RenameModal2({ category, onClose }) {
    const normalizedCategory = {
      id: category.id,
      slug: category.slug,
      name: category.label
    };
    const existingCategories = usePatternCategories();
    return /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
      RenamePatternCategoryModal,
      {
        category: normalizedCategory,
        existingCategories,
        onClose,
        overlayClassName: "edit-site-list__rename-modal",
        focusOnMount: "firstContentElement",
        size: "small"
      }
    );
  }

  // packages/edit-site/build-module/components/page-patterns/delete-category-menu-item.mjs
  var import_components146 = __toESM(require_components(), 1);
  var import_core_data45 = __toESM(require_core_data(), 1);
  var import_data68 = __toESM(require_data(), 1);
  var import_element138 = __toESM(require_element(), 1);
  var import_html_entities9 = __toESM(require_html_entities(), 1);
  var import_i18n135 = __toESM(require_i18n(), 1);
  var import_notices6 = __toESM(require_notices(), 1);
  var import_router29 = __toESM(require_router(), 1);
  var import_jsx_runtime270 = __toESM(require_jsx_runtime(), 1);
  var { useHistory: useHistory18 } = unlock(import_router29.privateApis);
  function DeleteCategoryMenuItem({ category, onClose }) {
    const [isModalOpen, setIsModalOpen] = (0, import_element138.useState)(false);
    const history = useHistory18();
    const { createSuccessNotice, createErrorNotice } = (0, import_data68.useDispatch)(import_notices6.store);
    const { deleteEntityRecord, invalidateResolution } = (0, import_data68.useDispatch)(import_core_data45.store);
    const onDelete = async () => {
      try {
        await deleteEntityRecord(
          "taxonomy",
          "wp_pattern_category",
          category.id,
          { force: true },
          { throwOnError: true }
        );
        invalidateResolution("getUserPatternCategories");
        invalidateResolution("getEntityRecords", [
          "postType",
          PATTERN_TYPES.user,
          { per_page: -1 }
        ]);
        createSuccessNotice(
          (0, import_i18n135.sprintf)(
            /* translators: %s: The pattern category's name */
            (0, import_i18n135._x)('"%s" deleted.', "pattern category"),
            category.label
          ),
          { type: "snackbar", id: "pattern-category-delete" }
        );
        onClose?.();
        history.navigate(
          `/pattern?categoryId=${PATTERN_DEFAULT_CATEGORY}`
        );
      } catch (error) {
        const errorMessage = error.message && error.code !== "unknown_error" ? error.message : (0, import_i18n135.__)(
          "An error occurred while deleting the pattern category."
        );
        createErrorNotice(errorMessage, {
          type: "snackbar",
          id: "pattern-category-delete"
        });
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime270.jsxs)(import_jsx_runtime270.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(import_components146.MenuItem, { isDestructive: true, onClick: () => setIsModalOpen(true), children: (0, import_i18n135.__)("Delete") }),
      /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
        import_components146.__experimentalConfirmDialog,
        {
          isOpen: isModalOpen,
          onConfirm: onDelete,
          onCancel: () => setIsModalOpen(false),
          confirmButtonText: (0, import_i18n135.__)("Delete"),
          className: "edit-site-patterns__delete-modal",
          title: (0, import_i18n135.sprintf)(
            // translators: %s: The pattern category's name.
            (0, import_i18n135._x)('Delete "%s"?', "pattern category"),
            (0, import_html_entities9.decodeEntities)(category.label)
          ),
          size: "medium",
          __experimentalHideHeader: false,
          children: (0, import_i18n135.sprintf)(
            // translators: %s: The pattern category's name.
            (0, import_i18n135.__)(
              'Are you sure you want to delete the category "%s"? The patterns will not be deleted.'
            ),
            (0, import_html_entities9.decodeEntities)(category.label)
          )
        }
      )
    ] });
  }

  // packages/edit-site/build-module/components/page-patterns/actions.mjs
  var import_jsx_runtime271 = __toESM(require_jsx_runtime(), 1);
  function PatternsActions({ categoryId, type }) {
    const { patternCategories } = usePatternCategories();
    let patternCategory;
    if (type === PATTERN_TYPES.user && !!categoryId) {
      patternCategory = patternCategories.find(
        (category) => category.name === categoryId
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime271.jsxs)(import_jsx_runtime271.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(AddNewPattern, {}),
      !!patternCategory?.id && /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
        import_components147.DropdownMenu,
        {
          icon: more_vertical_default,
          label: (0, import_i18n136.__)("Actions"),
          toggleProps: {
            className: "edit-site-patterns__button",
            size: "compact"
          },
          children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime271.jsxs)(import_components147.MenuGroup, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
              RenameCategoryMenuItem,
              {
                category: patternCategory,
                onClose
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
              DeleteCategoryMenuItem,
              {
                category: patternCategory,
                onClose
              }
            )
          ] })
        }
      )
    ] });
  }

  // packages/edit-site/build-module/components/dataviews-actions/index.mjs
  var import_i18n137 = __toESM(require_i18n(), 1);
  var import_element139 = __toESM(require_element(), 1);
  var import_router30 = __toESM(require_router(), 1);
  var import_data69 = __toESM(require_data(), 1);
  var import_core_data46 = __toESM(require_core_data(), 1);
  var import_url16 = __toESM(require_url(), 1);
  var { useLocation: useLocation26, useHistory: useHistory19 } = unlock(import_router30.privateApis);
  var useSetActiveTemplateAction = () => {
    const activeTheme = (0, import_data69.useSelect)(
      (select3) => select3(import_core_data46.store).getCurrentTheme()
    );
    const { getEntityRecord } = (0, import_data69.useSelect)(import_core_data46.store);
    const { editEntityRecord, saveEditedEntityRecord } = (0, import_data69.useDispatch)(import_core_data46.store);
    return (0, import_element139.useMemo)(
      () => ({
        id: "set-active-template",
        label(items) {
          return items.some((item) => item._isActive) ? (0, import_i18n137.__)("Deactivate") : (0, import_i18n137.__)("Activate");
        },
        isPrimary: true,
        icon: pencil_default,
        isEligible(item) {
          if (item.theme !== activeTheme.stylesheet) {
            return false;
          }
          if (typeof item.id !== "number") {
            return item._isActive === false;
          }
          return true;
        },
        async callback(items) {
          const deactivate = items.some((item) => item._isActive);
          const activeTemplates = {
            ...await getEntityRecord("root", "site").active_templates ?? {}
          };
          for (const item of items) {
            if (deactivate) {
              delete activeTemplates[item.slug];
            } else {
              activeTemplates[item.slug] = item.id;
            }
          }
          await editEntityRecord("root", "site", void 0, {
            active_templates: activeTemplates
          });
          await saveEditedEntityRecord("root", "site");
        }
      }),
      [
        editEntityRecord,
        saveEditedEntityRecord,
        getEntityRecord,
        activeTheme
      ]
    );
  };
  var useEditPostAction = () => {
    const history = useHistory19();
    return (0, import_element139.useMemo)(
      () => ({
        id: "edit-post",
        label: (0, import_i18n137.__)("Edit"),
        icon: pencil_default,
        isEligible(post2) {
          if (post2.status === "trash") {
            return false;
          }
          return post2.type !== PATTERN_TYPES.theme;
        },
        callback(items) {
          const post2 = items[0];
          history.navigate(`/${post2.type}/${post2.id}?canvas=edit`);
        }
      }),
      [history]
    );
  };
  var useQuickEditPostAction = () => {
    const history = useHistory19();
    const { path, query } = useLocation26();
    return (0, import_element139.useMemo)(
      () => ({
        id: "quick-edit",
        label: (0, import_i18n137.__)("Quick Edit"),
        icon: drawer_right_default,
        isPrimary: true,
        supportsBulk: true,
        isEligible(post2) {
          if (post2.status === "trash") {
            return false;
          }
          return post2.type === "page";
        },
        callback(items) {
          history.navigate(
            (0, import_url16.addQueryArgs)(path, {
              ...query,
              quickEdit: true,
              postId: items.map((item) => item.id).join(",")
            })
          );
        }
      }),
      [history, path, query]
    );
  };

  // packages/edit-site/build-module/components/page-patterns/fields.mjs
  var import_components148 = __toESM(require_components(), 1);
  var import_i18n138 = __toESM(require_i18n(), 1);
  var import_element140 = __toESM(require_element(), 1);
  var import_block_editor24 = __toESM(require_block_editor(), 1);
  var import_blocks12 = __toESM(require_blocks(), 1);
  var import_editor30 = __toESM(require_editor(), 1);

  // packages/edit-site/build-module/components/page-templates/hooks.mjs
  var import_core_data47 = __toESM(require_core_data(), 1);
  var import_data70 = __toESM(require_data(), 1);
  function useAddedBy(postType2, postId) {
    return (0, import_data70.useSelect)(
      (select3) => {
        const { getEntityRecord, getUser, getEditedEntityRecord } = select3(import_core_data47.store);
        const template = getEditedEntityRecord(
          "postType",
          postType2,
          postId
        );
        const originalSource = template?.original_source;
        const authorText = template?.author_text;
        switch (originalSource) {
          case "theme": {
            return {
              type: originalSource,
              icon: layout_default,
              text: authorText,
              isCustomized: template.source === TEMPLATE_ORIGINS.custom
            };
          }
          case "plugin": {
            return {
              type: originalSource,
              icon: plugins_default,
              text: authorText,
              isCustomized: template.source === TEMPLATE_ORIGINS.custom
            };
          }
          case "site": {
            const siteData = getEntityRecord(
              "root",
              "__unstableBase"
            );
            return {
              type: originalSource,
              icon: globe_default,
              imageUrl: siteData?.site_logo ? getEntityRecord(
                "postType",
                "attachment",
                siteData.site_logo
              )?.source_url : void 0,
              text: authorText,
              isCustomized: false
            };
          }
          default: {
            const user = getUser(template.author);
            return {
              type: "user",
              icon: comment_author_avatar_default,
              imageUrl: user?.avatar_urls?.[48],
              text: authorText ?? user?.name,
              isCustomized: false
            };
          }
        }
      },
      [postType2, postId]
    );
  }

  // packages/edit-site/build-module/components/page-patterns/fields.mjs
  var import_jsx_runtime272 = __toESM(require_jsx_runtime(), 1);
  var { useStyle: useStyle4 } = unlock(import_editor30.privateApis);
  function PreviewField({ item }) {
    const descriptionId = (0, import_element140.useId)();
    const description = item.description || item?.excerpt?.raw;
    const isTemplatePart2 = item.type === TEMPLATE_PART_POST_TYPE;
    const backgroundColor = useStyle4("color.background");
    const blocks = (0, import_element140.useMemo)(() => {
      return item.blocks ?? (0, import_blocks12.parse)(item.content.raw, {
        __unstableSkipMigrationLogs: true
      });
    }, [item?.content?.raw, item.blocks]);
    const isEmpty3 = !blocks?.length;
    return /* @__PURE__ */ (0, import_jsx_runtime272.jsxs)(
      "div",
      {
        className: "page-patterns-preview-field",
        style: { backgroundColor },
        "aria-describedby": !!description ? descriptionId : void 0,
        children: [
          isEmpty3 && isTemplatePart2 && (0, import_i18n138.__)("Empty template part"),
          isEmpty3 && !isTemplatePart2 && (0, import_i18n138.__)("Empty pattern"),
          !isEmpty3 && /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(import_block_editor24.BlockPreview.Async, { children: /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(
            import_block_editor24.BlockPreview,
            {
              blocks,
              viewportWidth: item.viewportWidth
            }
          ) }),
          !!description && /* @__PURE__ */ (0, import_jsx_runtime272.jsx)("div", { hidden: true, id: descriptionId, children: description })
        ]
      }
    );
  }
  var previewField = {
    label: (0, import_i18n138.__)("Preview"),
    id: "preview",
    render: PreviewField,
    enableSorting: false
  };
  var SYNC_FILTERS = [
    {
      value: PATTERN_SYNC_TYPES.full,
      label: (0, import_i18n138._x)("Synced", "pattern (singular)"),
      description: (0, import_i18n138.__)("Patterns that are kept in sync across the site.")
    },
    {
      value: PATTERN_SYNC_TYPES.unsynced,
      label: (0, import_i18n138._x)("Not synced", "pattern (singular)"),
      description: (0, import_i18n138.__)(
        "Patterns that can be changed freely without affecting the site."
      )
    }
  ];
  var patternStatusField = {
    label: (0, import_i18n138.__)("Sync status"),
    id: "sync-status",
    render: ({ item }) => {
      const syncStatus = "wp_pattern_sync_status" in item ? item.wp_pattern_sync_status || PATTERN_SYNC_TYPES.full : PATTERN_SYNC_TYPES.unsynced;
      return /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(
        "span",
        {
          className: `edit-site-patterns__field-sync-status-${syncStatus}`,
          children: SYNC_FILTERS.find(({ value }) => value === syncStatus).label
        }
      );
    },
    elements: SYNC_FILTERS,
    filterBy: {
      operators: [OPERATOR_IS],
      isPrimary: true
    },
    enableSorting: false
  };
  function AuthorField({ item }) {
    const [isImageLoaded, setIsImageLoaded] = (0, import_element140.useState)(false);
    const { text, icon, imageUrl } = useAddedBy(item.type, item.id);
    return /* @__PURE__ */ (0, import_jsx_runtime272.jsxs)(import_components148.__experimentalHStack, { alignment: "left", spacing: 0, children: [
      imageUrl && /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(
        "div",
        {
          className: clsx_default("page-templates-author-field__avatar", {
            "is-loaded": isImageLoaded
          }),
          children: /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(
            "img",
            {
              onLoad: () => setIsImageLoaded(true),
              alt: "",
              src: imageUrl
            }
          )
        }
      ),
      !imageUrl && /* @__PURE__ */ (0, import_jsx_runtime272.jsx)("div", { className: "page-templates-author-field__icon", children: /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(icon_default, { icon }) }),
      /* @__PURE__ */ (0, import_jsx_runtime272.jsx)("span", { className: "page-templates-author-field__name", children: text })
    ] });
  }
  var templatePartAuthorField = {
    label: (0, import_i18n138.__)("Author"),
    id: "author",
    getValue: ({ item }) => item.author_text,
    render: AuthorField,
    filterBy: {
      isPrimary: true
    }
  };

  // packages/edit-site/build-module/components/page-patterns/index.mjs
  var import_jsx_runtime273 = __toESM(require_jsx_runtime(), 1);
  var { ExperimentalBlockEditorProvider } = unlock(import_block_editor25.privateApis);
  var { usePostActions, patternTitleField } = unlock(import_editor31.privateApis);
  var { useLocation: useLocation27, useHistory: useHistory20 } = unlock(import_router31.privateApis);
  var EMPTY_ARRAY11 = [];
  var defaultLayouts = {
    [LAYOUT_TABLE]: {
      layout: {
        styles: {
          author: {
            width: "1%"
          }
        }
      }
    },
    [LAYOUT_GRID]: {
      layout: {
        badgeFields: ["sync-status"]
      }
    }
  };
  var DEFAULT_VIEW = {
    type: LAYOUT_GRID,
    perPage: 20,
    titleField: "title",
    mediaField: "preview",
    fields: ["sync-status"],
    filters: [],
    ...defaultLayouts[LAYOUT_GRID]
  };
  function usePagePatternsHeader(type, categoryId) {
    const { patternCategories } = usePatternCategories();
    const templatePartAreas = (0, import_data71.useSelect)(
      (select3) => select3(import_core_data48.store).getCurrentTheme()?.default_template_part_areas || [],
      []
    );
    let title, description, patternCategory;
    if (type === TEMPLATE_PART_POST_TYPE) {
      const templatePartArea = templatePartAreas.find(
        (area) => area.area === categoryId
      );
      title = templatePartArea?.label || (0, import_i18n139.__)("All Template Parts");
      description = templatePartArea?.description || (0, import_i18n139.__)("Includes every template part defined for any area.");
    } else if (type === PATTERN_TYPES.user && !!categoryId) {
      patternCategory = patternCategories.find(
        (category) => category.name === categoryId
      );
      title = patternCategory?.label;
      description = patternCategory?.description;
    }
    return { title, description };
  }
  function DataviewsPatterns() {
    const { path, query } = useLocation27();
    const { postType: postType2 = "wp_block", categoryId: categoryIdFromURL } = query;
    const history = useHistory20();
    const categoryId = categoryIdFromURL || PATTERN_DEFAULT_CATEGORY;
    const { view, updateView, isModified, resetToDefault } = useView({
      kind: "postType",
      name: postType2,
      slug: "default",
      defaultView: DEFAULT_VIEW,
      queryParams: {
        page: query.pageNumber,
        search: query.search
      },
      onChangeQueryParams: (params) => {
        history.navigate(
          (0, import_url17.addQueryArgs)(path, {
            ...query,
            pageNumber: params.page,
            search: params.search
          })
        );
      }
    });
    const viewSyncStatus = view.filters?.find(
      ({ field }) => field === "sync-status"
    )?.value;
    const { patterns, isResolving } = use_patterns_default(postType2, categoryId, {
      search: view.search,
      syncStatus: viewSyncStatus
    });
    const { records } = (0, import_core_data48.useEntityRecords)("postType", TEMPLATE_PART_POST_TYPE, {
      per_page: -1
    });
    const authors = (0, import_element141.useMemo)(() => {
      if (!records) {
        return EMPTY_ARRAY11;
      }
      const authorsSet = /* @__PURE__ */ new Set();
      records.forEach((template) => {
        authorsSet.add(template.author_text);
      });
      return Array.from(authorsSet).map((author) => ({
        value: author,
        label: author
      }));
    }, [records]);
    const fields = (0, import_element141.useMemo)(() => {
      const _fields = [previewField, patternTitleField];
      if (postType2 === PATTERN_TYPES.user) {
        _fields.push(patternStatusField);
      } else if (postType2 === TEMPLATE_PART_POST_TYPE) {
        _fields.push({
          ...templatePartAuthorField,
          elements: authors
        });
      }
      return _fields;
    }, [postType2, authors]);
    const { data, paginationInfo } = (0, import_element141.useMemo)(() => {
      const viewWithoutFilters = { ...view };
      delete viewWithoutFilters.search;
      if (postType2 !== TEMPLATE_PART_POST_TYPE) {
        viewWithoutFilters.filters = [];
      }
      return filterSortAndPaginate(patterns, viewWithoutFilters, fields);
    }, [patterns, view, fields, postType2]);
    const dataWithPermissions = useAugmentPatternsWithPermissions(data);
    const templatePartActions = usePostActions({
      postType: TEMPLATE_PART_POST_TYPE,
      context: "list"
    });
    const patternActions = usePostActions({
      postType: PATTERN_TYPES.user,
      context: "list"
    });
    const editAction = useEditPostAction();
    const actions = (0, import_element141.useMemo)(() => {
      if (postType2 === TEMPLATE_PART_POST_TYPE) {
        return [editAction, ...templatePartActions].filter(Boolean);
      }
      return [editAction, ...patternActions].filter(Boolean);
    }, [editAction, postType2, templatePartActions, patternActions]);
    const settings2 = usePatternSettings();
    const { title, description } = usePagePatternsHeader(
      postType2,
      categoryId
    );
    return /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(ExperimentalBlockEditorProvider, { settings: settings2, children: /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
      page_default2,
      {
        className: "edit-site-page-patterns-dataviews",
        title,
        headingLevel: 2,
        subTitle: description,
        actions: /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
          PatternsActions,
          {
            categoryId,
            type: postType2
          }
        ),
        children: /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
          dataviews_default,
          {
            paginationInfo,
            fields,
            actions,
            data: dataWithPermissions || EMPTY_ARRAY11,
            getItemId: (item) => item.name ?? item.id,
            isLoading: isResolving,
            isItemClickable: (item) => item.type !== PATTERN_TYPES.theme,
            onClickItem: (item) => {
              history.navigate(
                `/${item.type}/${[
                  PATTERN_TYPES.user,
                  TEMPLATE_PART_POST_TYPE
                ].includes(item.type) ? item.id : item.name}?canvas=edit`
              );
            },
            view,
            onChangeView: updateView,
            defaultLayouts,
            onReset: isModified ? resetToDefault : false
          },
          categoryId + postType2
        )
      }
    ) });
  }

  // packages/edit-site/build-module/components/site-editor-routes/patterns.mjs
  var import_jsx_runtime274 = __toESM(require_jsx_runtime(), 1);
  var patternsRoute = {
    name: "patterns",
    path: "/pattern",
    areas: {
      sidebar({ siteData }) {
        const isBlockTheme = siteData.currentTheme?.is_block_theme;
        const backPath = isBlockTheme || isClassicThemeWithStyleBookSupport(siteData) ? "/" : void 0;
        return /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(SidebarNavigationScreenPatterns, { backPath });
      },
      content: /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(DataviewsPatterns, {}),
      mobile({ siteData, query }) {
        const { categoryId } = query;
        const isBlockTheme = siteData.currentTheme?.is_block_theme;
        const backPath = isBlockTheme || isClassicThemeWithStyleBookSupport(siteData) ? "/" : void 0;
        return !!categoryId ? /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(DataviewsPatterns, {}) : /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(SidebarNavigationScreenPatterns, { backPath });
      }
    }
  };

  // packages/edit-site/build-module/components/site-editor-routes/pattern-item.mjs
  var import_jsx_runtime275 = __toESM(require_jsx_runtime(), 1);
  var patternItemRoute = {
    name: "pattern-item",
    path: "/wp_block/:postId",
    areas: {
      sidebar({ siteData }) {
        const isBlockTheme = siteData.currentTheme?.is_block_theme;
        const backPath = isBlockTheme || isClassicThemeWithStyleBookSupport(siteData) ? "/" : void 0;
        return /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(SidebarNavigationScreenPatterns, { backPath });
      },
      mobile: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(EditSiteEditor, {}),
      preview: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(EditSiteEditor, {})
    }
  };

  // packages/edit-site/build-module/components/site-editor-routes/template-part-item.mjs
  var import_jsx_runtime276 = __toESM(require_jsx_runtime(), 1);
  var templatePartItemRoute = {
    name: "template-part-item",
    path: "/wp_template_part/*postId",
    areas: {
      sidebar: /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(SidebarNavigationScreenPatterns, { backPath: "/" }),
      mobile: /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(EditSiteEditor, {}),
      preview: /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(EditSiteEditor, {})
    }
  };

  // packages/edit-site/build-module/components/sidebar-navigation-screen-templates-browse/index.mjs
  var import_i18n142 = __toESM(require_i18n(), 1);

  // packages/edit-site/build-module/components/sidebar-navigation-screen-templates-browse/content.mjs
  var import_core_data49 = __toESM(require_core_data(), 1);
  var import_element142 = __toESM(require_element(), 1);
  var import_components149 = __toESM(require_components(), 1);
  var import_i18n140 = __toESM(require_i18n(), 1);
  var import_router32 = __toESM(require_router(), 1);
  var import_url18 = __toESM(require_url(), 1);
  var import_jsx_runtime277 = __toESM(require_jsx_runtime(), 1);
  var { useLocation: useLocation28 } = unlock(import_router32.privateApis);
  var EMPTY_ARRAY12 = [];
  function TemplateDataviewItem({ template, isActive }) {
    const { text, icon } = useAddedBy(template.type, template.id);
    return /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
      SidebarNavigationItem,
      {
        to: (0, import_url18.addQueryArgs)("/template", { activeView: text }),
        icon,
        "aria-current": isActive,
        children: text
      }
    );
  }
  function DataviewsTemplatesSidebarContent() {
    const {
      query: { activeView = "active" }
    } = useLocation28();
    const { records } = (0, import_core_data49.useEntityRecords)("root", "registeredTemplate", {
      // This should not be needed, the endpoint returns all registered
      // templates, but it's not possible right now to turn off pagination for
      // entity configs.
      per_page: -1
    });
    const firstItemPerAuthorText = (0, import_element142.useMemo)(() => {
      const firstItemPerAuthor = records?.reduce((acc, template) => {
        const author = template.author_text;
        if (author && !acc[author]) {
          acc[author] = template;
        }
        return acc;
      }, {});
      return (firstItemPerAuthor && Object.values(firstItemPerAuthor)) ?? EMPTY_ARRAY12;
    }, [records]);
    return /* @__PURE__ */ (0, import_jsx_runtime277.jsxs)(import_components149.__experimentalItemGroup, { className: "edit-site-sidebar-navigation-screen-templates-browse", children: [
      /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
        SidebarNavigationItem,
        {
          to: "/template",
          icon: published_default,
          "aria-current": activeView === "active",
          children: (0, import_i18n140.__)("Active templates")
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
        SidebarNavigationItem,
        {
          to: (0, import_url18.addQueryArgs)("/template", { activeView: "user" }),
          icon: comment_author_avatar_default,
          "aria-current": activeView === "user",
          // Let's avoid calling them "custom templates" to avoid
          // confusion. "Created" is closest to meaning database
          // templates, created by users.
          // https://developer.wordpress.org/themes/classic-themes/templates/page-template-files/#creating-custom-page-templates-for-global-use
          children: (0, import_i18n140.__)("Created templates")
        }
      ),
      firstItemPerAuthorText.map((template) => {
        return /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
          TemplateDataviewItem,
          {
            template,
            isActive: activeView === template.author_text
          },
          template.author_text
        );
      })
    ] });
  }

  // packages/edit-site/build-module/components/sidebar-navigation-screen-templates-browse/content-legacy.mjs
  var import_core_data50 = __toESM(require_core_data(), 1);
  var import_element143 = __toESM(require_element(), 1);
  var import_components150 = __toESM(require_components(), 1);
  var import_i18n141 = __toESM(require_i18n(), 1);
  var import_router33 = __toESM(require_router(), 1);
  var import_url19 = __toESM(require_url(), 1);
  var import_jsx_runtime278 = __toESM(require_jsx_runtime(), 1);
  var { useLocation: useLocation29 } = unlock(import_router33.privateApis);
  var EMPTY_ARRAY13 = [];
  function TemplateDataviewItem2({ template, isActive }) {
    const { text, icon } = useAddedBy(template.type, template.id);
    return /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
      SidebarNavigationItem,
      {
        to: (0, import_url19.addQueryArgs)("/template", { activeView: text }),
        icon,
        "aria-current": isActive,
        children: text
      }
    );
  }
  function DataviewsTemplatesSidebarContent2() {
    const {
      query: { activeView = "all" }
    } = useLocation29();
    const { records } = (0, import_core_data50.useEntityRecords)("postType", TEMPLATE_POST_TYPE, {
      per_page: -1
    });
    const firstItemPerAuthorText = (0, import_element143.useMemo)(() => {
      const firstItemPerAuthor = records?.reduce((acc, template) => {
        const author = template.author_text;
        if (author && !acc[author]) {
          acc[author] = template;
        }
        return acc;
      }, {});
      return (firstItemPerAuthor && Object.values(firstItemPerAuthor)) ?? EMPTY_ARRAY13;
    }, [records]);
    return /* @__PURE__ */ (0, import_jsx_runtime278.jsxs)(import_components150.__experimentalItemGroup, { className: "edit-site-sidebar-navigation-screen-templates-browse", children: [
      /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
        SidebarNavigationItem,
        {
          to: "/template",
          icon: layout_default,
          "aria-current": activeView === "all",
          children: (0, import_i18n141.__)("All templates")
        }
      ),
      firstItemPerAuthorText.map((template) => {
        return /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
          TemplateDataviewItem2,
          {
            template,
            isActive: activeView === template.author_text
          },
          template.author_text
        );
      })
    ] });
  }

  // packages/edit-site/build-module/components/sidebar-navigation-screen-templates-browse/index.mjs
  var import_jsx_runtime279 = __toESM(require_jsx_runtime(), 1);
  function SidebarNavigationScreenTemplatesBrowse({ backPath }) {
    return /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(
      SidebarNavigationScreen,
      {
        title: (0, import_i18n142.__)("Templates"),
        description: (0, import_i18n142.__)(
          "Create new templates, or reset any customizations made to the templates supplied by your theme."
        ),
        backPath,
        content: window?.__experimentalTemplateActivate ? /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(DataviewsTemplatesSidebarContent, {}) : /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(DataviewsTemplatesSidebarContent2, {})
      }
    );
  }

  // packages/edit-site/build-module/components/page-templates/index.mjs
  var import_i18n148 = __toESM(require_i18n(), 1);
  var import_html_entities14 = __toESM(require_html_entities(), 1);
  var import_element149 = __toESM(require_element(), 1);
  var import_core_data55 = __toESM(require_core_data(), 1);
  var import_router35 = __toESM(require_router(), 1);
  var import_editor35 = __toESM(require_editor(), 1);
  var import_url22 = __toESM(require_url(), 1);
  var import_data75 = __toESM(require_data(), 1);
  var import_compose30 = __toESM(require_compose(), 1);
  var import_components155 = __toESM(require_components(), 1);
  var import_notices8 = __toESM(require_notices(), 1);

  // packages/edit-site/build-module/components/add-new-template/index.mjs
  var import_components153 = __toESM(require_components(), 1);
  var import_html_entities12 = __toESM(require_html_entities(), 1);
  var import_element147 = __toESM(require_element(), 1);
  var import_data73 = __toESM(require_data(), 1);
  var import_core_data53 = __toESM(require_core_data(), 1);
  var import_compose29 = __toESM(require_compose(), 1);
  var import_i18n146 = __toESM(require_i18n(), 1);
  var import_notices7 = __toESM(require_notices(), 1);
  var import_router34 = __toESM(require_router(), 1);
  var import_dom13 = __toESM(require_dom(), 1);

  // packages/edit-site/build-module/components/add-new-template/add-custom-template-modal-content.mjs
  var import_element145 = __toESM(require_element(), 1);
  var import_i18n144 = __toESM(require_i18n(), 1);
  var import_components151 = __toESM(require_components(), 1);
  var import_core_data52 = __toESM(require_core_data(), 1);
  var import_html_entities11 = __toESM(require_html_entities(), 1);
  var import_compose28 = __toESM(require_compose(), 1);
  var import_dom12 = __toESM(require_dom(), 1);
  var import_url21 = __toESM(require_url(), 1);

  // packages/edit-site/build-module/components/add-new-template/utils.mjs
  var import_data72 = __toESM(require_data(), 1);
  var import_core_data51 = __toESM(require_core_data(), 1);
  var import_html_entities10 = __toESM(require_html_entities(), 1);
  var import_element144 = __toESM(require_element(), 1);
  var import_i18n143 = __toESM(require_i18n(), 1);
  var import_url20 = __toESM(require_url(), 1);
  var EMPTY_OBJECT2 = {};
  var getValueFromObjectPath2 = (object, path) => {
    let value = object;
    path.split(".").forEach((fieldName) => {
      value = value?.[fieldName];
    });
    return value;
  };
  function prefixSlug(prefix2, slug) {
    return `${prefix2}-${(0, import_url20.safeDecodeURI)(slug)}`;
  }
  var mapToIHasNameAndId = (entities, path) => {
    return (entities || []).map((entity) => ({
      ...entity,
      name: (0, import_html_entities10.decodeEntities)(getValueFromObjectPath2(entity, path))
    }));
  };
  var useExistingTemplates = () => {
    return (0, import_data72.useSelect)(
      (select3) => select3(import_core_data51.store).getEntityRecords(
        "postType",
        TEMPLATE_POST_TYPE,
        {
          per_page: -1
        }
      ),
      []
    );
  };
  var useDefaultTemplateTypes = () => {
    return (0, import_data72.useSelect)(
      (select3) => select3(import_core_data51.store).getCurrentTheme()?.default_template_types || [],
      []
    );
  };
  var usePublicPostTypes = () => {
    const postTypes = (0, import_data72.useSelect)(
      (select3) => select3(import_core_data51.store).getPostTypes({ per_page: -1 }),
      []
    );
    return (0, import_element144.useMemo)(() => {
      const excludedPostTypes = ["attachment"];
      return postTypes?.filter(
        ({ viewable, slug }) => viewable && !excludedPostTypes.includes(slug)
      ).sort((a2, b2) => {
        if (a2.slug === "post" || b2.slug === "post") {
          return 0;
        }
        return a2.name.localeCompare(b2.name);
      });
    }, [postTypes]);
  };
  var usePublicTaxonomies = () => {
    const taxonomies = (0, import_data72.useSelect)(
      (select3) => select3(import_core_data51.store).getTaxonomies({ per_page: -1 }),
      []
    );
    return (0, import_element144.useMemo)(() => {
      return taxonomies?.filter(
        ({ visibility }) => visibility?.publicly_queryable
      );
    }, [taxonomies]);
  };
  function usePostTypeArchiveMenuItems() {
    const publicPostTypes = usePublicPostTypes();
    const postTypesWithArchives = (0, import_element144.useMemo)(
      () => publicPostTypes?.filter((postType2) => postType2.has_archive),
      [publicPostTypes]
    );
    const existingTemplates = useExistingTemplates();
    const postTypeLabels = (0, import_element144.useMemo)(
      () => publicPostTypes?.reduce((accumulator, { labels }) => {
        const singularName = labels.singular_name.toLowerCase();
        accumulator[singularName] = (accumulator[singularName] || 0) + 1;
        return accumulator;
      }, {}),
      [publicPostTypes]
    );
    const needsUniqueIdentifier = (0, import_element144.useCallback)(
      ({ labels, slug }) => {
        const singularName = labels.singular_name.toLowerCase();
        return postTypeLabels[singularName] > 1 && singularName !== slug;
      },
      [postTypeLabels]
    );
    return (0, import_element144.useMemo)(
      () => postTypesWithArchives?.filter(
        (postType2) => !(existingTemplates || []).some(
          (existingTemplate) => existingTemplate.slug === "archive-" + postType2.slug
        )
      ).map((postType2) => {
        let title;
        if (needsUniqueIdentifier(postType2)) {
          title = (0, import_i18n143.sprintf)(
            // translators: %1s: Name of the post type e.g: "Post"; %2s: Slug of the post type e.g: "book".
            (0, import_i18n143.__)("Archive: %1$s (%2$s)"),
            postType2.labels.singular_name,
            postType2.slug
          );
        } else {
          title = (0, import_i18n143.sprintf)(
            // translators: %s: Name of the post type e.g: "Post".
            (0, import_i18n143.__)("Archive: %s"),
            postType2.labels.singular_name
          );
        }
        return {
          slug: "archive-" + postType2.slug,
          description: (0, import_i18n143.sprintf)(
            // translators: %s: Name of the post type e.g: "Post".
            (0, import_i18n143.__)(
              "Displays an archive with the latest posts of type: %s."
            ),
            postType2.labels.singular_name
          ),
          title,
          // `icon` is the `menu_icon` property of a post type. We
          // only handle `dashicons` for now, even if the `menu_icon`
          // also supports urls and svg as values.
          icon: typeof postType2.icon === "string" && postType2.icon.startsWith("dashicons-") ? postType2.icon.slice(10) : archive_default,
          templatePrefix: "archive"
        };
      }) || [],
      [postTypesWithArchives, existingTemplates, needsUniqueIdentifier]
    );
  }
  var usePostTypeMenuItems = (onClickMenuItem) => {
    const publicPostTypes = usePublicPostTypes();
    const defaultTemplateTypes = useDefaultTemplateTypes();
    const templateLabels = (0, import_element144.useMemo)(
      () => publicPostTypes?.reduce((accumulator, { labels }) => {
        const templateName = (labels.template_name || labels.singular_name).toLowerCase();
        accumulator[templateName] = (accumulator[templateName] || 0) + 1;
        return accumulator;
      }, {}),
      [publicPostTypes]
    );
    const needsUniqueIdentifier = (0, import_element144.useCallback)(
      ({ labels, slug }) => {
        const templateName = (labels.template_name || labels.singular_name).toLowerCase();
        return templateLabels[templateName] > 1 && templateName !== slug;
      },
      [templateLabels]
    );
    const templatePrefixes = (0, import_element144.useMemo)(
      () => publicPostTypes?.reduce((accumulator, { slug }) => {
        let suffix = slug;
        if (slug !== "page") {
          suffix = `single-${suffix}`;
        }
        accumulator[slug] = suffix;
        return accumulator;
      }, {}),
      [publicPostTypes]
    );
    const postTypesInfo = useEntitiesInfo("postType", templatePrefixes);
    const menuItems = (publicPostTypes || []).reduce(
      (accumulator, postType2) => {
        const { slug, labels, icon } = postType2;
        const generalTemplateSlug = templatePrefixes[slug];
        const defaultTemplateType = defaultTemplateTypes?.find(
          ({ slug: _slug }) => _slug === generalTemplateSlug
        );
        const _needsUniqueIdentifier = needsUniqueIdentifier(postType2);
        let menuItemTitle = labels.template_name || (0, import_i18n143.sprintf)(
          // translators: %s: Name of the post type e.g: "Post".
          (0, import_i18n143.__)("Single item: %s"),
          labels.singular_name
        );
        if (_needsUniqueIdentifier) {
          menuItemTitle = labels.template_name ? (0, import_i18n143.sprintf)(
            // translators: 1: Name of the template e.g: "Single Item: Post". 2: Slug of the post type e.g: "book".
            (0, import_i18n143._x)("%1$s (%2$s)", "post type menu label"),
            labels.template_name,
            slug
          ) : (0, import_i18n143.sprintf)(
            // translators: 1: Name of the post type e.g: "Post". 2: Slug of the post type e.g: "book".
            (0, import_i18n143._x)(
              "Single item: %1$s (%2$s)",
              "post type menu label"
            ),
            labels.singular_name,
            slug
          );
        }
        const menuItem = defaultTemplateType ? {
          ...defaultTemplateType,
          templatePrefix: templatePrefixes[slug]
        } : {
          slug: generalTemplateSlug,
          title: menuItemTitle,
          description: (0, import_i18n143.sprintf)(
            // translators: %s: Name of the post type e.g: "Post".
            (0, import_i18n143.__)("Displays a single item: %s."),
            labels.singular_name
          ),
          // `icon` is the `menu_icon` property of a post type. We
          // only handle `dashicons` for now, even if the `menu_icon`
          // also supports urls and svg as values.
          icon: typeof icon === "string" && icon.startsWith("dashicons-") ? icon.slice(10) : post_default,
          templatePrefix: templatePrefixes[slug]
        };
        const hasEntities = postTypesInfo?.[slug]?.hasEntities;
        if (hasEntities) {
          menuItem.onClick = (template) => {
            onClickMenuItem({
              type: "postType",
              slug,
              config: {
                recordNamePath: "title.rendered",
                queryArgs: ({ search }) => {
                  return {
                    _fields: "id,title,slug,link",
                    orderBy: search ? "relevance" : "modified",
                    exclude: postTypesInfo[slug].existingEntitiesIds
                  };
                },
                getSpecificTemplate: (suggestion) => {
                  const templateSlug = prefixSlug(
                    templatePrefixes[slug],
                    suggestion.slug
                  );
                  return {
                    title: templateSlug,
                    slug: templateSlug,
                    templatePrefix: templatePrefixes[slug]
                  };
                }
              },
              labels,
              template
            });
          };
        }
        if (hasEntities) {
          accumulator.push(menuItem);
        }
        return accumulator;
      },
      []
    );
    const postTypesMenuItems = (0, import_element144.useMemo)(
      () => menuItems.reduce(
        (accumulator, postType2) => {
          const { slug } = postType2;
          let key = "postTypesMenuItems";
          if (slug === "page") {
            key = "defaultPostTypesMenuItems";
          }
          accumulator[key].push(postType2);
          return accumulator;
        },
        { defaultPostTypesMenuItems: [], postTypesMenuItems: [] }
      ),
      [menuItems]
    );
    return postTypesMenuItems;
  };
  var useTaxonomiesMenuItems = (onClickMenuItem) => {
    const publicTaxonomies = usePublicTaxonomies();
    const existingTemplates = useExistingTemplates();
    const defaultTemplateTypes = useDefaultTemplateTypes();
    const templatePrefixes = (0, import_element144.useMemo)(
      () => publicTaxonomies?.reduce((accumulator, { slug }) => {
        let suffix = slug;
        if (!["category", "post_tag"].includes(slug)) {
          suffix = `taxonomy-${suffix}`;
        }
        if (slug === "post_tag") {
          suffix = `tag`;
        }
        accumulator[slug] = suffix;
        return accumulator;
      }, {}),
      [publicTaxonomies]
    );
    const taxonomyLabels = publicTaxonomies?.reduce(
      (accumulator, { labels }) => {
        const templateName = (labels.template_name || labels.singular_name).toLowerCase();
        accumulator[templateName] = (accumulator[templateName] || 0) + 1;
        return accumulator;
      },
      {}
    );
    const needsUniqueIdentifier = (labels, slug) => {
      if (["category", "post_tag"].includes(slug)) {
        return false;
      }
      const templateName = (labels.template_name || labels.singular_name).toLowerCase();
      return taxonomyLabels[templateName] > 1 && templateName !== slug;
    };
    const taxonomiesInfo = useEntitiesInfo("taxonomy", templatePrefixes);
    const existingTemplateSlugs = (existingTemplates || []).map(
      ({ slug }) => slug
    );
    const menuItems = (publicTaxonomies || []).reduce(
      (accumulator, taxonomy) => {
        const { slug, labels } = taxonomy;
        const generalTemplateSlug = templatePrefixes[slug];
        const defaultTemplateType = defaultTemplateTypes?.find(
          ({ slug: _slug }) => _slug === generalTemplateSlug
        );
        const hasGeneralTemplate = existingTemplateSlugs?.includes(generalTemplateSlug);
        const _needsUniqueIdentifier = needsUniqueIdentifier(
          labels,
          slug
        );
        let menuItemTitle = labels.template_name || labels.singular_name;
        if (_needsUniqueIdentifier) {
          menuItemTitle = labels.template_name ? (0, import_i18n143.sprintf)(
            // translators: 1: Name of the template e.g: "Products by Category". 2: Slug of the taxonomy e.g: "product_cat".
            (0, import_i18n143._x)("%1$s (%2$s)", "taxonomy template menu label"),
            labels.template_name,
            slug
          ) : (0, import_i18n143.sprintf)(
            // translators: 1: Name of the taxonomy e.g: "Category". 2: Slug of the taxonomy e.g: "product_cat".
            (0, import_i18n143._x)("%1$s (%2$s)", "taxonomy menu label"),
            labels.singular_name,
            slug
          );
        }
        const menuItem = defaultTemplateType ? {
          ...defaultTemplateType,
          templatePrefix: templatePrefixes[slug]
        } : {
          slug: generalTemplateSlug,
          title: menuItemTitle,
          description: (0, import_i18n143.sprintf)(
            // translators: %s: Name of the taxonomy e.g: "Product Categories".
            (0, import_i18n143.__)("Displays taxonomy: %s."),
            labels.singular_name
          ),
          icon: block_meta_default,
          templatePrefix: templatePrefixes[slug]
        };
        const hasEntities = taxonomiesInfo?.[slug]?.hasEntities;
        if (hasEntities) {
          menuItem.onClick = (template) => {
            onClickMenuItem({
              type: "taxonomy",
              slug,
              config: {
                queryArgs: ({ search }) => {
                  return {
                    _fields: "id,name,slug,link",
                    orderBy: search ? "name" : "count",
                    exclude: taxonomiesInfo[slug].existingEntitiesIds
                  };
                },
                getSpecificTemplate: (suggestion) => {
                  const templateSlug = prefixSlug(
                    templatePrefixes[slug],
                    suggestion.slug
                  );
                  return {
                    title: templateSlug,
                    slug: templateSlug,
                    templatePrefix: templatePrefixes[slug]
                  };
                }
              },
              labels,
              hasGeneralTemplate,
              template
            });
          };
        }
        if (!hasGeneralTemplate || hasEntities) {
          accumulator.push(menuItem);
        }
        return accumulator;
      },
      []
    );
    const taxonomiesMenuItems = (0, import_element144.useMemo)(
      () => menuItems.reduce(
        (accumulator, taxonomy) => {
          const { slug } = taxonomy;
          let key = "taxonomiesMenuItems";
          if (["category", "tag"].includes(slug)) {
            key = "defaultTaxonomiesMenuItems";
          }
          accumulator[key].push(taxonomy);
          return accumulator;
        },
        { defaultTaxonomiesMenuItems: [], taxonomiesMenuItems: [] }
      ),
      [menuItems]
    );
    return taxonomiesMenuItems;
  };
  var USE_AUTHOR_MENU_ITEM_TEMPLATE_PREFIX = { user: "author" };
  var USE_AUTHOR_MENU_ITEM_QUERY_PARAMETERS = { user: { who: "authors" } };
  function useAuthorMenuItem(onClickMenuItem) {
    const existingTemplates = useExistingTemplates();
    const defaultTemplateTypes = useDefaultTemplateTypes();
    const authorInfo = useEntitiesInfo(
      "root",
      USE_AUTHOR_MENU_ITEM_TEMPLATE_PREFIX,
      USE_AUTHOR_MENU_ITEM_QUERY_PARAMETERS
    );
    let authorMenuItem = defaultTemplateTypes?.find(
      ({ slug }) => slug === "author"
    );
    if (!authorMenuItem) {
      authorMenuItem = {
        description: (0, import_i18n143.__)(
          "Displays latest posts written by a single author."
        ),
        slug: "author",
        title: "Author"
      };
    }
    const hasGeneralTemplate = !!existingTemplates?.find(
      ({ slug }) => slug === "author"
    );
    if (authorInfo.user?.hasEntities) {
      authorMenuItem = { ...authorMenuItem, templatePrefix: "author" };
      authorMenuItem.onClick = (template) => {
        onClickMenuItem({
          type: "root",
          slug: "user",
          config: {
            queryArgs: ({ search }) => {
              return {
                _fields: "id,name,slug,link",
                orderBy: search ? "name" : "registered_date",
                exclude: authorInfo.user.existingEntitiesIds,
                who: "authors"
              };
            },
            getSpecificTemplate: (suggestion) => {
              const templateSlug = prefixSlug(
                "author",
                suggestion.slug
              );
              return {
                title: (0, import_i18n143.sprintf)(
                  // translators: %s: Name of the author e.g: "Admin".
                  (0, import_i18n143.__)("Author: %s"),
                  suggestion.name
                ),
                slug: templateSlug,
                templatePrefix: "author"
              };
            }
          },
          labels: {
            singular_name: (0, import_i18n143.__)("Author"),
            search_items: (0, import_i18n143.__)("Search Authors"),
            not_found: (0, import_i18n143.__)("No authors found."),
            all_items: (0, import_i18n143.__)("All Authors")
          },
          hasGeneralTemplate,
          template
        });
      };
    }
    if (!hasGeneralTemplate || authorInfo.user?.hasEntities) {
      return authorMenuItem;
    }
  }
  var useEntitiesInfo = (entityName, templatePrefixes, additionalQueryParameters = EMPTY_OBJECT2) => {
    const entitiesHasRecords = (0, import_data72.useSelect)(
      (select3) => {
        return Object.keys(templatePrefixes || {}).reduce(
          (accumulator, slug) => {
            accumulator[slug] = !!select3(
              import_core_data51.store
            ).getEntityRecords(entityName, slug, {
              per_page: 1,
              _fields: "id",
              context: "view",
              ...additionalQueryParameters[slug]
            })?.length;
            return accumulator;
          },
          {}
        );
      },
      [templatePrefixes, entityName, additionalQueryParameters]
    );
    const entitiesInfo = (0, import_element144.useMemo)(() => {
      return Object.keys(templatePrefixes || {}).reduce(
        (accumulator, slug) => {
          accumulator[slug] = {
            hasEntities: entitiesHasRecords[slug]
          };
          return accumulator;
        },
        {}
      );
    }, [templatePrefixes, entitiesHasRecords]);
    return entitiesInfo;
  };

  // packages/edit-site/build-module/components/add-new-template/add-custom-template-modal-content.mjs
  var import_jsx_runtime280 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_ARRAY14 = [];
  function SuggestionListItem({
    suggestion,
    search,
    onSelect,
    entityForSuggestions
  }) {
    const baseCssClass = "edit-site-custom-template-modal__suggestions_list__list-item";
    return /* @__PURE__ */ (0, import_jsx_runtime280.jsxs)(
      import_components151.Composite.Item,
      {
        render: /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
          import_components151.Button,
          {
            __next40pxDefaultSize: true,
            role: "option",
            className: baseCssClass,
            onClick: () => onSelect(
              entityForSuggestions.config.getSpecificTemplate(
                suggestion
              )
            )
          }
        ),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
            import_components151.__experimentalText,
            {
              size: "body",
              lineHeight: 1.53846153846,
              weight: 500,
              className: `${baseCssClass}__title`,
              children: /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
                import_components151.TextHighlight,
                {
                  text: (0, import_html_entities11.decodeEntities)(suggestion.name),
                  highlight: search
                }
              )
            }
          ),
          suggestion.link && /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
            import_components151.__experimentalText,
            {
              size: "body",
              lineHeight: 1.53846153846,
              className: `${baseCssClass}__info`,
              children: (0, import_url21.safeDecodeURI)(suggestion.link)
            }
          )
        ]
      }
    );
  }
  function useSearchSuggestions(entityForSuggestions, search) {
    const { config: config2 } = entityForSuggestions;
    const query = (0, import_element145.useMemo)(
      () => ({
        order: "asc",
        context: "view",
        search,
        per_page: search ? 20 : 10,
        ...config2.queryArgs(search)
      }),
      [search, config2]
    );
    const { records: searchResults, hasResolved: searchHasResolved } = (0, import_core_data52.useEntityRecords)(
      entityForSuggestions.type,
      entityForSuggestions.slug,
      query
    );
    const [suggestions, setSuggestions] = (0, import_element145.useState)(EMPTY_ARRAY14);
    (0, import_element145.useEffect)(() => {
      if (!searchHasResolved) {
        return;
      }
      let newSuggestions = EMPTY_ARRAY14;
      if (searchResults?.length) {
        newSuggestions = searchResults;
        if (config2.recordNamePath) {
          newSuggestions = mapToIHasNameAndId(
            newSuggestions,
            config2.recordNamePath
          );
        }
      }
      setSuggestions(newSuggestions);
    }, [searchResults, searchHasResolved]);
    return suggestions;
  }
  function SuggestionList({ entityForSuggestions, onSelect }) {
    const [search, setSearch, debouncedSearch] = (0, import_compose28.useDebouncedInput)();
    const suggestions = useSearchSuggestions(
      entityForSuggestions,
      debouncedSearch
    );
    const { labels } = entityForSuggestions;
    const [showSearchControl, setShowSearchControl] = (0, import_element145.useState)(false);
    if (!showSearchControl && suggestions?.length > 9) {
      setShowSearchControl(true);
    }
    return /* @__PURE__ */ (0, import_jsx_runtime280.jsxs)(import_jsx_runtime280.Fragment, { children: [
      showSearchControl && /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
        import_components151.SearchControl,
        {
          onChange: setSearch,
          value: search,
          label: labels.search_items,
          placeholder: labels.search_items
        }
      ),
      !!suggestions?.length && /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
        import_components151.Composite,
        {
          orientation: "vertical",
          role: "listbox",
          className: "edit-site-custom-template-modal__suggestions_list",
          "aria-label": (0, import_i18n144.__)("Suggestions list"),
          children: suggestions.map((suggestion) => /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
            SuggestionListItem,
            {
              suggestion,
              search: debouncedSearch,
              onSelect,
              entityForSuggestions
            },
            suggestion.slug
          ))
        }
      ),
      debouncedSearch && !suggestions?.length && /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
        import_components151.__experimentalText,
        {
          as: "p",
          className: "edit-site-custom-template-modal__no-results",
          children: labels.not_found
        }
      )
    ] });
  }
  function AddCustomTemplateModalContent({
    onSelect,
    entityForSuggestions,
    onBack,
    containerRef
  }) {
    const [showSearchEntities, setShowSearchEntities] = (0, import_element145.useState)();
    (0, import_element145.useEffect)(() => {
      if (containerRef.current) {
        const [firstFocusable] = import_dom12.focus.focusable.find(
          containerRef.current
        );
        firstFocusable?.focus();
      }
    }, [showSearchEntities]);
    return /* @__PURE__ */ (0, import_jsx_runtime280.jsxs)(
      import_components151.__experimentalVStack,
      {
        spacing: 4,
        className: "edit-site-custom-template-modal__contents-wrapper",
        alignment: "left",
        children: [
          !showSearchEntities && /* @__PURE__ */ (0, import_jsx_runtime280.jsxs)(import_jsx_runtime280.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(import_components151.__experimentalText, { as: "p", children: (0, import_i18n144.__)(
              "Select whether to create a single template for all items or a specific one."
            ) }),
            /* @__PURE__ */ (0, import_jsx_runtime280.jsxs)(
              import_components151.Flex,
              {
                className: "edit-site-custom-template-modal__contents",
                gap: "4",
                align: "initial",
                children: [
                  /* @__PURE__ */ (0, import_jsx_runtime280.jsxs)(
                    import_components151.FlexItem,
                    {
                      isBlock: true,
                      as: import_components151.Button,
                      onClick: () => {
                        const {
                          slug,
                          title,
                          description,
                          templatePrefix
                        } = entityForSuggestions.template;
                        onSelect({
                          slug,
                          title,
                          description,
                          templatePrefix
                        });
                      },
                      children: [
                        /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
                          import_components151.__experimentalText,
                          {
                            as: "span",
                            weight: 500,
                            lineHeight: 1.53846153846,
                            children: entityForSuggestions.labels.all_items
                          }
                        ),
                        /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
                          import_components151.__experimentalText,
                          {
                            as: "span",
                            lineHeight: 1.53846153846,
                            // 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.
                            children: (0, import_i18n144.__)("For all items")
                          }
                        )
                      ]
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime280.jsxs)(
                    import_components151.FlexItem,
                    {
                      isBlock: true,
                      as: import_components151.Button,
                      onClick: () => {
                        setShowSearchEntities(true);
                      },
                      children: [
                        /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
                          import_components151.__experimentalText,
                          {
                            as: "span",
                            weight: 500,
                            lineHeight: 1.53846153846,
                            children: entityForSuggestions.labels.singular_name
                          }
                        ),
                        /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
                          import_components151.__experimentalText,
                          {
                            as: "span",
                            lineHeight: 1.53846153846,
                            // 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.
                            children: (0, import_i18n144.__)("For a specific item")
                          }
                        )
                      ]
                    }
                  )
                ]
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(import_components151.Flex, { justify: "right", children: /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
              import_components151.Button,
              {
                __next40pxDefaultSize: true,
                variant: "tertiary",
                onClick: onBack,
                children: (0, import_i18n144.__)("Back")
              }
            ) })
          ] }),
          showSearchEntities && /* @__PURE__ */ (0, import_jsx_runtime280.jsxs)(import_jsx_runtime280.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(import_components151.__experimentalText, { as: "p", children: (0, import_i18n144.__)(
              "This template will be used only for the specific item chosen."
            ) }),
            /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
              SuggestionList,
              {
                entityForSuggestions,
                onSelect
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(import_components151.Flex, { justify: "right", children: /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
              import_components151.Button,
              {
                __next40pxDefaultSize: true,
                variant: "tertiary",
                onClick: () => {
                  if (entityForSuggestions.hasGeneralTemplate) {
                    onBack();
                  } else {
                    setShowSearchEntities(false);
                  }
                },
                children: (0, import_i18n144.__)("Back")
              }
            ) })
          ] })
        ]
      }
    );
  }
  var add_custom_template_modal_content_default = AddCustomTemplateModalContent;

  // node_modules/tslib/tslib.es6.mjs
  var __assign = function() {
    __assign = Object.assign || function __assign2(t3) {
      for (var s2, i2 = 1, n2 = arguments.length; i2 < n2; i2++) {
        s2 = arguments[i2];
        for (var p3 in s2) if (Object.prototype.hasOwnProperty.call(s2, p3)) t3[p3] = s2[p3];
      }
      return t3;
    };
    return __assign.apply(this, arguments);
  };

  // node_modules/lower-case/dist.es2015/index.js
  function lowerCase(str) {
    return str.toLowerCase();
  }

  // node_modules/no-case/dist.es2015/index.js
  var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
  var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
  function noCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    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;
    var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
    var start2 = 0;
    var end = result.length;
    while (result.charAt(start2) === "\0")
      start2++;
    while (result.charAt(end - 1) === "\0")
      end--;
    return result.slice(start2, end).split("\0").map(transform).join(delimiter);
  }
  function replace(input, re, value) {
    if (re instanceof RegExp)
      return input.replace(re, value);
    return re.reduce(function(input2, re2) {
      return input2.replace(re2, value);
    }, input);
  }

  // node_modules/dot-case/dist.es2015/index.js
  function dotCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    return noCase(input, __assign({ delimiter: "." }, options));
  }

  // node_modules/param-case/dist.es2015/index.js
  function paramCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    return dotCase(input, __assign({ delimiter: "-" }, options));
  }

  // packages/edit-site/build-module/components/add-new-template/add-custom-generic-template-modal-content.mjs
  var import_element146 = __toESM(require_element(), 1);
  var import_i18n145 = __toESM(require_i18n(), 1);
  var import_components152 = __toESM(require_components(), 1);
  var import_jsx_runtime281 = __toESM(require_jsx_runtime(), 1);
  function AddCustomGenericTemplateModalContent({ createTemplate, onBack }) {
    const [title, setTitle] = (0, import_element146.useState)("");
    const defaultTitle = (0, import_i18n145.__)("Custom Template");
    const [isBusy, setIsBusy] = (0, import_element146.useState)(false);
    const inputRef = (0, import_element146.useRef)();
    (0, import_element146.useEffect)(() => {
      if (inputRef.current) {
        inputRef.current.focus();
      }
    }, []);
    async function onCreateTemplate(event) {
      event.preventDefault();
      if (isBusy) {
        return;
      }
      setIsBusy(true);
      try {
        await createTemplate(
          {
            slug: paramCase(title || defaultTitle) || "wp-custom-template",
            title: title || defaultTitle
          },
          false
        );
      } finally {
        setIsBusy(false);
      }
    }
    return /* @__PURE__ */ (0, import_jsx_runtime281.jsx)("form", { onSubmit: onCreateTemplate, children: /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)(import_components152.__experimentalVStack, { spacing: 6, children: [
      /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
        import_components152.TextControl,
        {
          __next40pxDefaultSize: true,
          label: (0, import_i18n145.__)("Name"),
          value: title,
          onChange: setTitle,
          placeholder: defaultTitle,
          disabled: isBusy,
          ref: inputRef,
          help: (0, import_i18n145.__)(
            // eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts
            'Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.'
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)(
        import_components152.__experimentalHStack,
        {
          className: "edit-site-custom-generic-template__modal-actions",
          justify: "right",
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
              import_components152.Button,
              {
                __next40pxDefaultSize: true,
                variant: "tertiary",
                onClick: onBack,
                children: (0, import_i18n145.__)("Back")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
              import_components152.Button,
              {
                __next40pxDefaultSize: true,
                variant: "primary",
                type: "submit",
                isBusy,
                "aria-disabled": isBusy,
                children: (0, import_i18n145.__)("Create")
              }
            )
          ]
        }
      )
    ] }) });
  }
  var add_custom_generic_template_modal_content_default = AddCustomGenericTemplateModalContent;

  // packages/edit-site/build-module/components/add-new-template/index.mjs
  var import_jsx_runtime282 = __toESM(require_jsx_runtime(), 1);
  var { useHistory: useHistory21 } = unlock(import_router34.privateApis);
  var DEFAULT_TEMPLATE_SLUGS = [
    "front-page",
    "home",
    "single",
    "page",
    "index",
    "archive",
    "author",
    "category",
    "date",
    "tag",
    "search",
    "404"
  ];
  var TEMPLATE_ICONS = {
    "front-page": home_default,
    home: verse_default,
    single: pin_default,
    page: page_default,
    archive: archive_default,
    search: search_default,
    404: not_found_default,
    index: list_default,
    category: category_default,
    author: comment_author_avatar_default,
    taxonomy: block_meta_default,
    date: calendar_default,
    tag: tag_default,
    attachment: media_default
  };
  function TemplateListItem({
    title,
    direction,
    className,
    description,
    icon,
    onClick,
    children
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
      import_components153.Button,
      {
        __next40pxDefaultSize: true,
        className,
        onClick,
        label: description,
        showTooltip: !!description,
        children: /* @__PURE__ */ (0, import_jsx_runtime282.jsxs)(
          import_components153.Flex,
          {
            as: "span",
            spacing: 2,
            align: "center",
            justify: "center",
            style: { width: "100%" },
            direction,
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime282.jsx)("div", { className: "edit-site-add-new-template__template-icon", children: /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(import_components153.Icon, { icon }) }),
              /* @__PURE__ */ (0, import_jsx_runtime282.jsxs)(
                import_components153.__experimentalVStack,
                {
                  className: "edit-site-add-new-template__template-name",
                  alignment: "center",
                  spacing: 0,
                  children: [
                    /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
                      import_components153.__experimentalText,
                      {
                        align: "center",
                        weight: 500,
                        lineHeight: 1.53846153846,
                        children: title
                      }
                    ),
                    children
                  ]
                }
              )
            ]
          }
        )
      }
    );
  }
  var modalContentMap = {
    templatesList: 1,
    customTemplate: 2,
    customGenericTemplate: 3
  };
  function NewTemplateModal({ onClose }) {
    const [modalContent, setModalContent] = (0, import_element147.useState)(
      modalContentMap.templatesList
    );
    const [entityForSuggestions, setEntityForSuggestions] = (0, import_element147.useState)({});
    const [isSubmitting, setIsSubmitting] = (0, import_element147.useState)(false);
    const missingTemplates = useMissingTemplates(
      setEntityForSuggestions,
      () => setModalContent(modalContentMap.customTemplate)
    );
    const history = useHistory21();
    const { saveEntityRecord } = (0, import_data73.useDispatch)(import_core_data53.store);
    const { createErrorNotice, createSuccessNotice } = (0, import_data73.useDispatch)(import_notices7.store);
    const containerRef = (0, import_element147.useRef)(null);
    const isMobile = (0, import_compose29.useViewportMatch)("medium", "<");
    const homeUrl = (0, import_data73.useSelect)((select3) => {
      return select3(import_core_data53.store).getEntityRecord("root", "__unstableBase")?.home;
    }, []);
    const TEMPLATE_SHORT_DESCRIPTIONS = {
      "front-page": homeUrl,
      date: (0, import_i18n146.sprintf)(
        // translators: %s: The homepage url.
        (0, import_i18n146.__)("E.g. %s"),
        homeUrl + "/" + (/* @__PURE__ */ new Date()).getFullYear()
      )
    };
    (0, import_element147.useEffect)(() => {
      if (containerRef.current && modalContent === modalContentMap.templatesList) {
        const [firstFocusable] = import_dom13.focus.focusable.find(
          containerRef.current
        );
        firstFocusable?.focus();
      }
    }, [modalContent]);
    async function createTemplate(template, isWPSuggestion = true) {
      if (isSubmitting) {
        return;
      }
      setIsSubmitting(true);
      try {
        const { title, description, slug } = template;
        const newTemplate = await saveEntityRecord(
          "postType",
          TEMPLATE_POST_TYPE,
          {
            description,
            // Slugs need to be strings, so this is for template `404`
            slug: slug.toString(),
            status: "publish",
            title,
            // This adds a post meta field in template that is part of `is_custom` value calculation.
            meta: {
              is_wp_suggestion: isWPSuggestion
            }
          },
          { throwOnError: true }
        );
        history.navigate(
          `/${TEMPLATE_POST_TYPE}/${newTemplate.id}?canvas=edit`
        );
        createSuccessNotice(
          (0, import_i18n146.sprintf)(
            // translators: %s: Title of the created post or template, e.g: "Hello world".
            (0, import_i18n146.__)('"%s" successfully created.'),
            (0, import_html_entities12.decodeEntities)(newTemplate.title?.rendered || title) || (0, import_i18n146.__)("(no title)")
          ),
          {
            type: "snackbar"
          }
        );
      } catch (error) {
        const errorMessage = error.message && error.code !== "unknown_error" ? error.message : (0, import_i18n146.__)("An error occurred while creating the template.");
        createErrorNotice(errorMessage, {
          type: "snackbar"
        });
      } finally {
        setIsSubmitting(false);
      }
    }
    const onModalClose = () => {
      onClose();
      setModalContent(modalContentMap.templatesList);
    };
    let modalTitle = (0, import_i18n146.__)("Add template");
    if (modalContent === modalContentMap.customTemplate) {
      modalTitle = (0, import_i18n146.sprintf)(
        // translators: %s: Name of the post type e.g: "Post".
        (0, import_i18n146.__)("Add template: %s"),
        entityForSuggestions.labels.singular_name
      );
    } else if (modalContent === modalContentMap.customGenericTemplate) {
      modalTitle = (0, import_i18n146.__)("Create custom template");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime282.jsxs)(
      import_components153.Modal,
      {
        title: modalTitle,
        className: clsx_default("edit-site-add-new-template__modal", {
          "edit-site-add-new-template__modal_template_list": modalContent === modalContentMap.templatesList,
          "edit-site-custom-template-modal": modalContent === modalContentMap.customTemplate
        }),
        onRequestClose: onModalClose,
        overlayClassName: modalContent === modalContentMap.customGenericTemplate ? "edit-site-custom-generic-template__modal" : void 0,
        ref: containerRef,
        children: [
          modalContent === modalContentMap.templatesList && /* @__PURE__ */ (0, import_jsx_runtime282.jsxs)(
            import_components153.__experimentalGrid,
            {
              columns: isMobile ? 2 : 3,
              gap: 4,
              align: "flex-start",
              justify: "center",
              className: "edit-site-add-new-template__template-list__contents",
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(import_components153.Flex, { className: "edit-site-add-new-template__template-list__prompt", children: (0, import_i18n146.__)(
                  "Select what the new template should apply to:"
                ) }),
                missingTemplates.map((template) => {
                  const { title, slug, onClick } = template;
                  return /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
                    TemplateListItem,
                    {
                      title,
                      direction: "column",
                      className: "edit-site-add-new-template__template-button",
                      description: TEMPLATE_SHORT_DESCRIPTIONS[slug],
                      icon: TEMPLATE_ICONS[slug] || layout_default,
                      onClick: () => onClick ? onClick(template) : createTemplate(template)
                    },
                    slug
                  );
                }),
                /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
                  TemplateListItem,
                  {
                    title: (0, import_i18n146.__)("Custom template"),
                    direction: "row",
                    className: "edit-site-add-new-template__custom-template-button",
                    icon: pencil_default,
                    onClick: () => setModalContent(
                      modalContentMap.customGenericTemplate
                    ),
                    children: /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
                      import_components153.__experimentalText,
                      {
                        lineHeight: 1.53846153846,
                        children: (0, import_i18n146.__)(
                          "A custom template can be manually applied to any post or page."
                        )
                      }
                    )
                  }
                )
              ]
            }
          ),
          modalContent === modalContentMap.customTemplate && /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
            add_custom_template_modal_content_default,
            {
              onSelect: createTemplate,
              entityForSuggestions,
              onBack: () => setModalContent(modalContentMap.templatesList),
              containerRef
            }
          ),
          modalContent === modalContentMap.customGenericTemplate && /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
            add_custom_generic_template_modal_content_default,
            {
              createTemplate,
              onBack: () => setModalContent(modalContentMap.templatesList)
            }
          )
        ]
      }
    );
  }
  function NewTemplate() {
    const [showModal, setShowModal] = (0, import_element147.useState)(false);
    const { postType: postType2 } = (0, import_data73.useSelect)((select3) => {
      const { getPostType: getPostType2 } = select3(import_core_data53.store);
      return {
        postType: getPostType2(TEMPLATE_POST_TYPE)
      };
    }, []);
    if (!postType2) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime282.jsxs)(import_jsx_runtime282.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
        import_components153.Button,
        {
          variant: "primary",
          onClick: () => setShowModal(true),
          label: postType2.labels.add_new_item,
          __next40pxDefaultSize: true,
          children: postType2.labels.add_new_item
        }
      ),
      showModal && /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(NewTemplateModal, { onClose: () => setShowModal(false) })
    ] });
  }
  function useMissingTemplates(setEntityForSuggestions, onClick) {
    const defaultTemplateTypes = useDefaultTemplateTypes();
    const missingDefaultTemplates = (defaultTemplateTypes || []).filter(
      (template) => DEFAULT_TEMPLATE_SLUGS.includes(template.slug)
    );
    const onClickMenuItem = (_entityForSuggestions) => {
      onClick?.();
      setEntityForSuggestions(_entityForSuggestions);
    };
    const enhancedMissingDefaultTemplateTypes = [...missingDefaultTemplates];
    const { defaultTaxonomiesMenuItems, taxonomiesMenuItems } = useTaxonomiesMenuItems(onClickMenuItem);
    const { defaultPostTypesMenuItems, postTypesMenuItems } = usePostTypeMenuItems(onClickMenuItem);
    const authorMenuItem = useAuthorMenuItem(onClickMenuItem);
    [
      ...defaultTaxonomiesMenuItems,
      ...defaultPostTypesMenuItems,
      authorMenuItem
    ].forEach((menuItem) => {
      if (!menuItem) {
        return;
      }
      const matchIndex = enhancedMissingDefaultTemplateTypes.findIndex(
        (template) => template.slug === menuItem.slug
      );
      if (matchIndex > -1) {
        enhancedMissingDefaultTemplateTypes[matchIndex] = menuItem;
      } else {
        enhancedMissingDefaultTemplateTypes.push(menuItem);
      }
    });
    enhancedMissingDefaultTemplateTypes?.sort((template1, template2) => {
      return DEFAULT_TEMPLATE_SLUGS.indexOf(template1.slug) - DEFAULT_TEMPLATE_SLUGS.indexOf(template2.slug);
    });
    const missingTemplates = [
      ...enhancedMissingDefaultTemplateTypes,
      ...usePostTypeArchiveMenuItems(),
      ...postTypesMenuItems,
      ...taxonomiesMenuItems
    ];
    return missingTemplates;
  }
  var add_new_template_default = (0, import_element147.memo)(NewTemplate);

  // packages/edit-site/build-module/components/page-templates/fields.mjs
  var import_components154 = __toESM(require_components(), 1);
  var import_i18n147 = __toESM(require_i18n(), 1);
  var import_element148 = __toESM(require_element(), 1);
  var import_html_entities13 = __toESM(require_html_entities(), 1);
  var import_blocks13 = __toESM(require_blocks(), 1);
  var import_block_editor26 = __toESM(require_block_editor(), 1);
  var import_editor34 = __toESM(require_editor(), 1);
  var import_core_data54 = __toESM(require_core_data(), 1);
  var import_data74 = __toESM(require_data(), 1);
  var import_jsx_runtime283 = __toESM(require_jsx_runtime(), 1);
  var { Badge: Badge5 } = unlock(import_components154.privateApis);
  var { useEntityRecordsWithPermissions } = unlock(import_core_data54.privateApis);
  var { useStyle: useStyle5 } = unlock(import_editor34.privateApis);
  function useAllDefaultTemplateTypes() {
    const defaultTemplateTypes = useDefaultTemplateTypes();
    const { records: staticRecords } = useEntityRecordsWithPermissions(
      "root",
      "registeredTemplate"
    );
    return [
      ...defaultTemplateTypes,
      ...staticRecords?.filter((record) => !record.is_custom).map((record) => {
        return {
          slug: record.slug,
          title: record.title.rendered,
          description: record.description
        };
      })
    ];
  }
  function PreviewField2({ item }) {
    const settings2 = usePatternSettings();
    const backgroundColor = useStyle5("color.background") ?? "white";
    const blocks = (0, import_element148.useMemo)(() => {
      return (0, import_blocks13.parse)(item.content.raw);
    }, [item.content.raw]);
    const isEmpty3 = !blocks?.length;
    return /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(import_editor34.EditorProvider, { post: item, settings: settings2, children: /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(
      "div",
      {
        className: "page-templates-preview-field",
        style: { backgroundColor },
        children: [
          isEmpty3 && (0, import_i18n147.__)("Empty template"),
          !isEmpty3 && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(import_block_editor26.BlockPreview.Async, { children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(import_block_editor26.BlockPreview, { blocks }) })
        ]
      }
    ) });
  }
  var previewField2 = {
    label: (0, import_i18n147.__)("Preview"),
    id: "preview",
    render: PreviewField2,
    enableSorting: false
  };
  var descriptionField = {
    label: (0, import_i18n147.__)("Description"),
    id: "description",
    render: window?.__experimentalTemplateActivate ? function RenderDescription({ item }) {
      const defaultTemplateTypes = useAllDefaultTemplateTypes();
      const defaultTemplateType = defaultTemplateTypes.find(
        (type) => type.slug === item.slug
      );
      return item.description ? (0, import_html_entities13.decodeEntities)(item.description) : defaultTemplateType?.description;
    } : ({ item }) => {
      return item.description && (0, import_html_entities13.decodeEntities)(item.description);
    },
    enableSorting: false,
    enableGlobalSearch: true
  };
  function AuthorField2({ item }) {
    const [isImageLoaded, setIsImageLoaded] = (0, import_element148.useState)(false);
    const { text, icon, imageUrl } = useAddedBy(item.type, item.id);
    return /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(import_components154.__experimentalHStack, { alignment: "left", spacing: 0, children: [
      imageUrl && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
        "div",
        {
          className: clsx_default("page-templates-author-field__avatar", {
            "is-loaded": isImageLoaded
          }),
          children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
            "img",
            {
              onLoad: () => setIsImageLoaded(true),
              alt: "",
              src: imageUrl
            }
          )
        }
      ),
      !imageUrl && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)("div", { className: "page-templates-author-field__icon", children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(import_components154.Icon, { icon }) }),
      /* @__PURE__ */ (0, import_jsx_runtime283.jsx)("span", { className: "page-templates-author-field__name", children: text })
    ] });
  }
  var authorField = {
    label: (0, import_i18n147.__)("Author"),
    id: "author",
    getValue: ({ item }) => item.author_text ?? item.author,
    render: AuthorField2
  };
  var activeField = {
    label: (0, import_i18n147.__)("Status"),
    id: "active",
    type: "boolean",
    getValue: ({ item }) => item._isActive,
    render: function Render({ item }) {
      const activeLabel = item._isCustom ? (0, import_i18n147._x)("Active when used", "template") : (0, import_i18n147._x)("Active", "template");
      const activeIntent = item._isCustom ? "info" : "success";
      const isActive = item._isActive;
      return /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(Badge5, { intent: isActive ? activeIntent : "default", children: isActive ? activeLabel : (0, import_i18n147._x)("Inactive", "template") });
    }
  };
  var useThemeField = () => {
    const activeTheme = (0, import_data74.useSelect)(
      (select3) => select3(import_core_data54.store).getCurrentTheme()
    );
    return (0, import_element148.useMemo)(
      () => ({
        label: (0, import_i18n147.__)("Compatible Theme"),
        id: "theme",
        getValue: ({ item }) => item.theme,
        render: function Render3({ item }) {
          if (item.theme === activeTheme.stylesheet) {
            return /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(Badge5, { intent: "success", children: item.theme });
          }
          return /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(Badge5, { intent: "error", children: item.theme });
        }
      }),
      [activeTheme]
    );
  };
  var slugField = {
    label: (0, import_i18n147.__)("Template Type"),
    id: "slug",
    getValue: ({ item }) => item.slug,
    render: function Render2({ item }) {
      const defaultTemplateTypes = useAllDefaultTemplateTypes();
      const defaultTemplateType = defaultTemplateTypes.find(
        (type) => type.slug === item.slug
      );
      return defaultTemplateType?.title || (0, import_i18n147._x)("Custom", "template type");
    }
  };

  // packages/edit-site/build-module/components/page-templates/view-utils.mjs
  var defaultLayouts2 = {
    table: {
      showMedia: false
    },
    grid: {
      showMedia: true
    },
    list: {
      showMedia: false
    }
  };
  var DEFAULT_VIEW2 = {
    type: "grid",
    perPage: 20,
    sort: {
      field: "title",
      direction: "asc"
    },
    titleField: "title",
    descriptionField: "description",
    mediaField: "preview",
    fields: ["author", "active", "slug", "theme"],
    filters: [],
    ...defaultLayouts2.grid
  };
  function getActiveViewOverridesForTab(activeView) {
    if (activeView === "user") {
      return {
        sort: { field: "date", direction: "desc" }
      };
    }
    if (activeView === "active") {
      return {};
    }
    return {
      filters: [
        {
          field: "author",
          operator: "is",
          value: activeView,
          isLocked: true
        }
      ]
    };
  }

  // packages/edit-site/build-module/components/page-templates/index.mjs
  var import_jsx_runtime284 = __toESM(require_jsx_runtime(), 1);
  var { usePostActions: usePostActions2, usePostFields, templateTitleField } = unlock(import_editor35.privateApis);
  var { useHistory: useHistory22, useLocation: useLocation30 } = unlock(import_router35.privateApis);
  var { useEntityRecordsWithPermissions: useEntityRecordsWithPermissions2 } = unlock(import_core_data55.privateApis);
  function PageTemplates() {
    const { path, query } = useLocation30();
    const { activeView = "active", postId } = query;
    const [selection, setSelection] = (0, import_element149.useState)([postId]);
    const [selectedRegisteredTemplate, setSelectedRegisteredTemplate] = (0, import_element149.useState)(false);
    const defaultView = DEFAULT_VIEW2;
    const activeViewOverrides = (0, import_element149.useMemo)(
      () => getActiveViewOverridesForTab(activeView),
      [activeView]
    );
    const { view, updateView, isModified, resetToDefault } = useView({
      kind: "postType",
      name: TEMPLATE_POST_TYPE,
      slug: "default",
      defaultView,
      activeViewOverrides,
      queryParams: {
        page: query.pageNumber,
        search: query.search
      },
      onChangeQueryParams: (newQueryParams) => {
        history.navigate(
          (0, import_url22.addQueryArgs)(path, {
            ...query,
            pageNumber: newQueryParams.page,
            search: newQueryParams.search || void 0
          })
        );
      }
    });
    const { activeTemplatesOption, activeTheme, defaultTemplateTypes } = (0, import_data75.useSelect)((select3) => {
      const { getEntityRecord, getCurrentTheme } = select3(import_core_data55.store);
      return {
        activeTemplatesOption: getEntityRecord("root", "site")?.active_templates,
        activeTheme: getCurrentTheme(),
        defaultTemplateTypes: select3(import_core_data55.store).getCurrentTheme()?.default_template_types
      };
    });
    const { records: userRecords, isResolving: isLoadingUserRecords } = useEntityRecordsWithPermissions2("postType", TEMPLATE_POST_TYPE, {
      per_page: -1,
      combinedTemplates: false
    });
    const { records: staticRecords, isResolving: isLoadingStaticData } = useEntityRecordsWithPermissions2("root", "registeredTemplate", {
      // This should not be needed, the endpoint returns all registered
      // templates, but it's not possible right now to turn off pagination
      // for entity configs.
      per_page: -1
    });
    const activeTemplates = (0, import_element149.useMemo)(() => {
      const _active = [...staticRecords];
      if (activeTemplatesOption) {
        for (const activeSlug in activeTemplatesOption) {
          const activeId = activeTemplatesOption[activeSlug];
          const template = userRecords.find(
            (userRecord) => userRecord.id === activeId && userRecord.theme === activeTheme.stylesheet
          );
          if (template) {
            const index = _active.findIndex(
              ({ slug }) => slug === template.slug
            );
            if (index !== -1) {
              _active[index] = template;
            } else {
              _active.push(template);
            }
          }
        }
      }
      return _active;
    }, [userRecords, staticRecords, activeTemplatesOption, activeTheme]);
    let isLoadingData;
    if (activeView === "active") {
      isLoadingData = isLoadingUserRecords || isLoadingStaticData;
    } else if (activeView === "user") {
      isLoadingData = isLoadingUserRecords;
    } else {
      isLoadingData = isLoadingStaticData;
    }
    const records = (0, import_element149.useMemo)(() => {
      function isCustom(record) {
        return record.is_custom ?? // For user templates it's custom if the is_wp_suggestion meta
        // field is not set and the slug is not found in the default
        // template types.
        (!record.meta?.is_wp_suggestion && !defaultTemplateTypes.some(
          (type) => type.slug === record.slug
        ));
      }
      let _records;
      if (activeView === "active") {
        _records = activeTemplates.filter(
          (record) => !isCustom(record)
        );
      } else if (activeView === "user") {
        _records = userRecords;
      } else {
        _records = staticRecords;
      }
      return _records.map((record) => ({
        ...record,
        _isActive: activeTemplates.some(
          (template) => template.id === record.id
        ),
        _isCustom: isCustom(record)
      }));
    }, [
      activeTemplates,
      defaultTemplateTypes,
      userRecords,
      staticRecords,
      activeView
    ]);
    const users = (0, import_data75.useSelect)(
      (select3) => {
        const { getUser } = select3(import_core_data55.store);
        return records.reduce((acc, record) => {
          if (record.author_text) {
            if (!acc[record.author_text]) {
              acc[record.author_text] = record.author_text;
            }
          } else if (record.author) {
            if (!acc[record.author]) {
              acc[record.author] = getUser(record.author);
            }
          }
          return acc;
        }, {});
      },
      [records]
    );
    const history = useHistory22();
    const onChangeSelection = (0, import_element149.useCallback)(
      (items) => {
        setSelection(items);
        if (view?.type === "list") {
          history.navigate(
            (0, import_url22.addQueryArgs)(path, {
              postId: items.length === 1 ? items[0] : void 0
            })
          );
        }
      },
      [history, path, view?.type]
    );
    const postTypeFields = usePostFields({
      postType: TEMPLATE_POST_TYPE
    });
    const dateField = postTypeFields.find((field) => field.id === "date");
    const themeField = useThemeField();
    const fields = (0, import_element149.useMemo)(() => {
      const _fields = [
        previewField2,
        templateTitleField,
        descriptionField,
        activeField,
        slugField
      ];
      if (activeView === "user") {
        _fields.push(themeField);
        if (dateField) {
          _fields.push(dateField);
        }
      }
      const elements2 = [];
      for (const author in users) {
        elements2.push({
          value: users[author]?.id ?? author,
          label: users[author]?.name ?? author
        });
      }
      _fields.push({
        ...authorField,
        elements: elements2
      });
      return _fields;
    }, [users, activeView, themeField, dateField]);
    const { data, paginationInfo } = (0, import_element149.useMemo)(() => {
      return filterSortAndPaginate(records, view, fields);
    }, [records, view, fields]);
    const { createSuccessNotice } = (0, import_data75.useDispatch)(import_notices8.store);
    const onActionPerformed = (0, import_element149.useCallback)(
      (actionId, items) => {
        switch (actionId) {
          case "duplicate-post":
            {
              const newItem = items[0];
              const _title = typeof newItem.title === "string" ? newItem.title : newItem.title?.rendered;
              history.navigate(`/template?activeView=user`);
              createSuccessNotice(
                (0, import_i18n148.sprintf)(
                  // translators: %s: Title of the created post or template, e.g: "Hello world".
                  (0, import_i18n148.__)('"%s" successfully created.'),
                  (0, import_html_entities14.decodeEntities)(_title) || (0, import_i18n148.__)("(no title)")
                ),
                {
                  type: "snackbar",
                  id: "duplicate-post-action",
                  actions: [
                    {
                      label: (0, import_i18n148.__)("Edit"),
                      onClick: () => {
                        history.navigate(
                          `/${newItem.type}/${newItem.id}?canvas=edit`
                        );
                      }
                    }
                  ]
                }
              );
            }
            break;
        }
      },
      [history, createSuccessNotice]
    );
    const postTypeActions = usePostActions2({
      postType: TEMPLATE_POST_TYPE,
      context: "list",
      onActionPerformed
    });
    const editAction = useEditPostAction();
    const setActiveTemplateAction = useSetActiveTemplateAction();
    const actions = (0, import_element149.useMemo)(
      () => activeView === "user" ? [setActiveTemplateAction, editAction, ...postTypeActions] : [setActiveTemplateAction, ...postTypeActions],
      [postTypeActions, setActiveTemplateAction, editAction, activeView]
    );
    const onChangeView = (0, import_compose30.useEvent)((newView) => {
      updateView(newView);
      if (newView.type !== view.type) {
        history.invalidate();
      }
    });
    const duplicateAction = actions.find(
      (action) => action.id === "duplicate-post"
    );
    return /* @__PURE__ */ (0, import_jsx_runtime284.jsxs)(
      page_default2,
      {
        className: "edit-site-page-templates",
        title: (0, import_i18n148.__)("Templates"),
        headingLevel: 2,
        actions: /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(add_new_template_default, {}),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
            dataviews_default,
            {
              paginationInfo,
              fields,
              actions,
              data,
              isLoading: isLoadingData,
              view,
              onChangeView,
              onChangeSelection,
              isItemClickable: () => true,
              onClickItem: (item) => {
                if (typeof item.id === "string") {
                  setSelectedRegisteredTemplate(item);
                } else {
                  history.navigate(
                    `/${item.type}/${item.id}?canvas=edit`
                  );
                }
              },
              selection,
              defaultLayouts: defaultLayouts2,
              onReset: isModified ? () => {
                resetToDefault();
                history.invalidate();
              } : false
            },
            activeView
          ),
          selectedRegisteredTemplate && duplicateAction && /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
            import_components155.Modal,
            {
              title: (0, import_i18n148.__)("Duplicate"),
              onRequestClose: () => setSelectedRegisteredTemplate(),
              size: "small",
              children: /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
                duplicateAction.RenderModal,
                {
                  items: [selectedRegisteredTemplate],
                  closeModal: () => setSelectedRegisteredTemplate()
                }
              )
            }
          )
        ]
      }
    );
  }

  // packages/edit-site/build-module/components/page-templates/index-legacy.mjs
  var import_i18n153 = __toESM(require_i18n(), 1);
  var import_element154 = __toESM(require_element(), 1);
  var import_core_data59 = __toESM(require_core_data(), 1);
  var import_router37 = __toESM(require_router(), 1);
  var import_editor36 = __toESM(require_editor(), 1);
  var import_url25 = __toESM(require_url(), 1);
  var import_compose33 = __toESM(require_compose(), 1);

  // packages/edit-site/build-module/components/add-new-template-legacy/index.mjs
  var import_components158 = __toESM(require_components(), 1);
  var import_html_entities17 = __toESM(require_html_entities(), 1);
  var import_element153 = __toESM(require_element(), 1);
  var import_data77 = __toESM(require_data(), 1);
  var import_core_data58 = __toESM(require_core_data(), 1);
  var import_compose32 = __toESM(require_compose(), 1);
  var import_i18n152 = __toESM(require_i18n(), 1);
  var import_notices9 = __toESM(require_notices(), 1);
  var import_router36 = __toESM(require_router(), 1);
  var import_dom15 = __toESM(require_dom(), 1);

  // packages/edit-site/build-module/components/add-new-template-legacy/add-custom-template-modal-content.mjs
  var import_element151 = __toESM(require_element(), 1);
  var import_i18n150 = __toESM(require_i18n(), 1);
  var import_components156 = __toESM(require_components(), 1);
  var import_core_data57 = __toESM(require_core_data(), 1);
  var import_html_entities16 = __toESM(require_html_entities(), 1);
  var import_compose31 = __toESM(require_compose(), 1);
  var import_dom14 = __toESM(require_dom(), 1);
  var import_url24 = __toESM(require_url(), 1);

  // packages/edit-site/build-module/components/add-new-template-legacy/utils.mjs
  var import_data76 = __toESM(require_data(), 1);
  var import_core_data56 = __toESM(require_core_data(), 1);
  var import_html_entities15 = __toESM(require_html_entities(), 1);
  var import_element150 = __toESM(require_element(), 1);
  var import_i18n149 = __toESM(require_i18n(), 1);
  var import_url23 = __toESM(require_url(), 1);
  var EMPTY_OBJECT3 = {};
  var getValueFromObjectPath3 = (object, path) => {
    let value = object;
    path.split(".").forEach((fieldName) => {
      value = value?.[fieldName];
    });
    return value;
  };
  function prefixSlug2(prefix2, slug) {
    return `${prefix2}-${(0, import_url23.safeDecodeURI)(slug)}`;
  }
  var mapToIHasNameAndId2 = (entities, path) => {
    return (entities || []).map((entity) => ({
      ...entity,
      name: (0, import_html_entities15.decodeEntities)(getValueFromObjectPath3(entity, path))
    }));
  };
  var useExistingTemplates2 = () => {
    return (0, import_data76.useSelect)(
      (select3) => select3(import_core_data56.store).getEntityRecords(
        "postType",
        TEMPLATE_POST_TYPE,
        {
          per_page: -1
        }
      ),
      []
    );
  };
  var useDefaultTemplateTypes2 = () => {
    return (0, import_data76.useSelect)(
      (select3) => select3(import_core_data56.store).getCurrentTheme()?.default_template_types || [],
      []
    );
  };
  var usePublicPostTypes2 = () => {
    const postTypes = (0, import_data76.useSelect)(
      (select3) => select3(import_core_data56.store).getPostTypes({ per_page: -1 }),
      []
    );
    return (0, import_element150.useMemo)(() => {
      const excludedPostTypes = ["attachment"];
      return postTypes?.filter(
        ({ viewable, slug }) => viewable && !excludedPostTypes.includes(slug)
      ).sort((a2, b2) => {
        if (a2.slug === "post" || b2.slug === "post") {
          return 0;
        }
        return a2.name.localeCompare(b2.name);
      });
    }, [postTypes]);
  };
  var usePublicTaxonomies2 = () => {
    const taxonomies = (0, import_data76.useSelect)(
      (select3) => select3(import_core_data56.store).getTaxonomies({ per_page: -1 }),
      []
    );
    return (0, import_element150.useMemo)(() => {
      return taxonomies?.filter(
        ({ visibility }) => visibility?.publicly_queryable
      );
    }, [taxonomies]);
  };
  function usePostTypeArchiveMenuItems2() {
    const publicPostTypes = usePublicPostTypes2();
    const postTypesWithArchives = (0, import_element150.useMemo)(
      () => publicPostTypes?.filter((postType2) => postType2.has_archive),
      [publicPostTypes]
    );
    const existingTemplates = useExistingTemplates2();
    const postTypeLabels = (0, import_element150.useMemo)(
      () => publicPostTypes?.reduce((accumulator, { labels }) => {
        const singularName = labels.singular_name.toLowerCase();
        accumulator[singularName] = (accumulator[singularName] || 0) + 1;
        return accumulator;
      }, {}),
      [publicPostTypes]
    );
    const needsUniqueIdentifier = (0, import_element150.useCallback)(
      ({ labels, slug }) => {
        const singularName = labels.singular_name.toLowerCase();
        return postTypeLabels[singularName] > 1 && singularName !== slug;
      },
      [postTypeLabels]
    );
    return (0, import_element150.useMemo)(
      () => postTypesWithArchives?.filter(
        (postType2) => !(existingTemplates || []).some(
          (existingTemplate) => existingTemplate.slug === "archive-" + postType2.slug
        )
      ).map((postType2) => {
        let title;
        if (needsUniqueIdentifier(postType2)) {
          title = (0, import_i18n149.sprintf)(
            // translators: %1s: Name of the post type e.g: "Post"; %2s: Slug of the post type e.g: "book".
            (0, import_i18n149.__)("Archive: %1$s (%2$s)"),
            postType2.labels.singular_name,
            postType2.slug
          );
        } else {
          title = (0, import_i18n149.sprintf)(
            // translators: %s: Name of the post type e.g: "Post".
            (0, import_i18n149.__)("Archive: %s"),
            postType2.labels.singular_name
          );
        }
        return {
          slug: "archive-" + postType2.slug,
          description: (0, import_i18n149.sprintf)(
            // translators: %s: Name of the post type e.g: "Post".
            (0, import_i18n149.__)(
              "Displays an archive with the latest posts of type: %s."
            ),
            postType2.labels.singular_name
          ),
          title,
          // `icon` is the `menu_icon` property of a post type. We
          // only handle `dashicons` for now, even if the `menu_icon`
          // also supports urls and svg as values.
          icon: typeof postType2.icon === "string" && postType2.icon.startsWith("dashicons-") ? postType2.icon.slice(10) : archive_default,
          templatePrefix: "archive"
        };
      }) || [],
      [postTypesWithArchives, existingTemplates, needsUniqueIdentifier]
    );
  }
  var usePostTypeMenuItems2 = (onClickMenuItem) => {
    const publicPostTypes = usePublicPostTypes2();
    const existingTemplates = useExistingTemplates2();
    const defaultTemplateTypes = useDefaultTemplateTypes2();
    const templateLabels = (0, import_element150.useMemo)(
      () => publicPostTypes?.reduce((accumulator, { labels }) => {
        const templateName = (labels.template_name || labels.singular_name).toLowerCase();
        accumulator[templateName] = (accumulator[templateName] || 0) + 1;
        return accumulator;
      }, {}),
      [publicPostTypes]
    );
    const needsUniqueIdentifier = (0, import_element150.useCallback)(
      ({ labels, slug }) => {
        const templateName = (labels.template_name || labels.singular_name).toLowerCase();
        return templateLabels[templateName] > 1 && templateName !== slug;
      },
      [templateLabels]
    );
    const templatePrefixes = (0, import_element150.useMemo)(
      () => publicPostTypes?.reduce((accumulator, { slug }) => {
        let suffix = slug;
        if (slug !== "page") {
          suffix = `single-${suffix}`;
        }
        accumulator[slug] = suffix;
        return accumulator;
      }, {}),
      [publicPostTypes]
    );
    const postTypesInfo = useEntitiesInfo2("postType", templatePrefixes);
    const existingTemplateSlugs = (existingTemplates || []).map(
      ({ slug }) => slug
    );
    const menuItems = (publicPostTypes || []).reduce(
      (accumulator, postType2) => {
        const { slug, labels, icon } = postType2;
        const generalTemplateSlug = templatePrefixes[slug];
        const defaultTemplateType = defaultTemplateTypes?.find(
          ({ slug: _slug }) => _slug === generalTemplateSlug
        );
        const hasGeneralTemplate = existingTemplateSlugs?.includes(generalTemplateSlug);
        const _needsUniqueIdentifier = needsUniqueIdentifier(postType2);
        let menuItemTitle = labels.template_name || (0, import_i18n149.sprintf)(
          // translators: %s: Name of the post type e.g: "Post".
          (0, import_i18n149.__)("Single item: %s"),
          labels.singular_name
        );
        if (_needsUniqueIdentifier) {
          menuItemTitle = labels.template_name ? (0, import_i18n149.sprintf)(
            // translators: 1: Name of the template e.g: "Single Item: Post". 2: Slug of the post type e.g: "book".
            (0, import_i18n149._x)("%1$s (%2$s)", "post type menu label"),
            labels.template_name,
            slug
          ) : (0, import_i18n149.sprintf)(
            // translators: 1: Name of the post type e.g: "Post". 2: Slug of the post type e.g: "book".
            (0, import_i18n149._x)(
              "Single item: %1$s (%2$s)",
              "post type menu label"
            ),
            labels.singular_name,
            slug
          );
        }
        const menuItem = defaultTemplateType ? {
          ...defaultTemplateType,
          templatePrefix: templatePrefixes[slug]
        } : {
          slug: generalTemplateSlug,
          title: menuItemTitle,
          description: (0, import_i18n149.sprintf)(
            // translators: %s: Name of the post type e.g: "Post".
            (0, import_i18n149.__)("Displays a single item: %s."),
            labels.singular_name
          ),
          // `icon` is the `menu_icon` property of a post type. We
          // only handle `dashicons` for now, even if the `menu_icon`
          // also supports urls and svg as values.
          icon: typeof icon === "string" && icon.startsWith("dashicons-") ? icon.slice(10) : post_default,
          templatePrefix: templatePrefixes[slug]
        };
        const hasEntities = postTypesInfo?.[slug]?.hasEntities;
        if (hasEntities) {
          menuItem.onClick = (template) => {
            onClickMenuItem({
              type: "postType",
              slug,
              config: {
                recordNamePath: "title.rendered",
                queryArgs: ({ search }) => {
                  return {
                    _fields: "id,title,slug,link",
                    orderBy: search ? "relevance" : "modified",
                    exclude: postTypesInfo[slug].existingEntitiesIds
                  };
                },
                getSpecificTemplate: (suggestion) => {
                  const templateSlug = prefixSlug2(
                    templatePrefixes[slug],
                    suggestion.slug
                  );
                  return {
                    title: templateSlug,
                    slug: templateSlug,
                    templatePrefix: templatePrefixes[slug]
                  };
                }
              },
              labels,
              hasGeneralTemplate,
              template
            });
          };
        }
        if (!hasGeneralTemplate || hasEntities) {
          accumulator.push(menuItem);
        }
        return accumulator;
      },
      []
    );
    const postTypesMenuItems = (0, import_element150.useMemo)(
      () => menuItems.reduce(
        (accumulator, postType2) => {
          const { slug } = postType2;
          let key = "postTypesMenuItems";
          if (slug === "page") {
            key = "defaultPostTypesMenuItems";
          }
          accumulator[key].push(postType2);
          return accumulator;
        },
        { defaultPostTypesMenuItems: [], postTypesMenuItems: [] }
      ),
      [menuItems]
    );
    return postTypesMenuItems;
  };
  var useTaxonomiesMenuItems2 = (onClickMenuItem) => {
    const publicTaxonomies = usePublicTaxonomies2();
    const existingTemplates = useExistingTemplates2();
    const defaultTemplateTypes = useDefaultTemplateTypes2();
    const templatePrefixes = (0, import_element150.useMemo)(
      () => publicTaxonomies?.reduce((accumulator, { slug }) => {
        let suffix = slug;
        if (!["category", "post_tag"].includes(slug)) {
          suffix = `taxonomy-${suffix}`;
        }
        if (slug === "post_tag") {
          suffix = `tag`;
        }
        accumulator[slug] = suffix;
        return accumulator;
      }, {}),
      [publicTaxonomies]
    );
    const taxonomyLabels = publicTaxonomies?.reduce(
      (accumulator, { labels }) => {
        const templateName = (labels.template_name || labels.singular_name).toLowerCase();
        accumulator[templateName] = (accumulator[templateName] || 0) + 1;
        return accumulator;
      },
      {}
    );
    const needsUniqueIdentifier = (labels, slug) => {
      if (["category", "post_tag"].includes(slug)) {
        return false;
      }
      const templateName = (labels.template_name || labels.singular_name).toLowerCase();
      return taxonomyLabels[templateName] > 1 && templateName !== slug;
    };
    const taxonomiesInfo = useEntitiesInfo2("taxonomy", templatePrefixes);
    const existingTemplateSlugs = (existingTemplates || []).map(
      ({ slug }) => slug
    );
    const menuItems = (publicTaxonomies || []).reduce(
      (accumulator, taxonomy) => {
        const { slug, labels } = taxonomy;
        const generalTemplateSlug = templatePrefixes[slug];
        const defaultTemplateType = defaultTemplateTypes?.find(
          ({ slug: _slug }) => _slug === generalTemplateSlug
        );
        const hasGeneralTemplate = existingTemplateSlugs?.includes(generalTemplateSlug);
        const _needsUniqueIdentifier = needsUniqueIdentifier(
          labels,
          slug
        );
        let menuItemTitle = labels.template_name || labels.singular_name;
        if (_needsUniqueIdentifier) {
          menuItemTitle = labels.template_name ? (0, import_i18n149.sprintf)(
            // translators: 1: Name of the template e.g: "Products by Category". 2: Slug of the taxonomy e.g: "product_cat".
            (0, import_i18n149._x)("%1$s (%2$s)", "taxonomy template menu label"),
            labels.template_name,
            slug
          ) : (0, import_i18n149.sprintf)(
            // translators: 1: Name of the taxonomy e.g: "Category". 2: Slug of the taxonomy e.g: "product_cat".
            (0, import_i18n149._x)("%1$s (%2$s)", "taxonomy menu label"),
            labels.singular_name,
            slug
          );
        }
        const menuItem = defaultTemplateType ? {
          ...defaultTemplateType,
          templatePrefix: templatePrefixes[slug]
        } : {
          slug: generalTemplateSlug,
          title: menuItemTitle,
          description: (0, import_i18n149.sprintf)(
            // translators: %s: Name of the taxonomy e.g: "Product Categories".
            (0, import_i18n149.__)("Displays taxonomy: %s."),
            labels.singular_name
          ),
          icon: block_meta_default,
          templatePrefix: templatePrefixes[slug]
        };
        const hasEntities = taxonomiesInfo?.[slug]?.hasEntities;
        if (hasEntities) {
          menuItem.onClick = (template) => {
            onClickMenuItem({
              type: "taxonomy",
              slug,
              config: {
                queryArgs: ({ search }) => {
                  return {
                    _fields: "id,name,slug,link",
                    orderBy: search ? "name" : "count",
                    exclude: taxonomiesInfo[slug].existingEntitiesIds
                  };
                },
                getSpecificTemplate: (suggestion) => {
                  const templateSlug = prefixSlug2(
                    templatePrefixes[slug],
                    suggestion.slug
                  );
                  return {
                    title: templateSlug,
                    slug: templateSlug,
                    templatePrefix: templatePrefixes[slug]
                  };
                }
              },
              labels,
              hasGeneralTemplate,
              template
            });
          };
        }
        if (!hasGeneralTemplate || hasEntities) {
          accumulator.push(menuItem);
        }
        return accumulator;
      },
      []
    );
    const taxonomiesMenuItems = (0, import_element150.useMemo)(
      () => menuItems.reduce(
        (accumulator, taxonomy) => {
          const { slug } = taxonomy;
          let key = "taxonomiesMenuItems";
          if (["category", "tag"].includes(slug)) {
            key = "defaultTaxonomiesMenuItems";
          }
          accumulator[key].push(taxonomy);
          return accumulator;
        },
        { defaultTaxonomiesMenuItems: [], taxonomiesMenuItems: [] }
      ),
      [menuItems]
    );
    return taxonomiesMenuItems;
  };
  var USE_AUTHOR_MENU_ITEM_TEMPLATE_PREFIX2 = { user: "author" };
  var USE_AUTHOR_MENU_ITEM_QUERY_PARAMETERS2 = { user: { who: "authors" } };
  function useAuthorMenuItem2(onClickMenuItem) {
    const existingTemplates = useExistingTemplates2();
    const defaultTemplateTypes = useDefaultTemplateTypes2();
    const authorInfo = useEntitiesInfo2(
      "root",
      USE_AUTHOR_MENU_ITEM_TEMPLATE_PREFIX2,
      USE_AUTHOR_MENU_ITEM_QUERY_PARAMETERS2
    );
    let authorMenuItem = defaultTemplateTypes?.find(
      ({ slug }) => slug === "author"
    );
    if (!authorMenuItem) {
      authorMenuItem = {
        description: (0, import_i18n149.__)(
          "Displays latest posts written by a single author."
        ),
        slug: "author",
        title: "Author"
      };
    }
    const hasGeneralTemplate = !!existingTemplates?.find(
      ({ slug }) => slug === "author"
    );
    if (authorInfo.user?.hasEntities) {
      authorMenuItem = { ...authorMenuItem, templatePrefix: "author" };
      authorMenuItem.onClick = (template) => {
        onClickMenuItem({
          type: "root",
          slug: "user",
          config: {
            queryArgs: ({ search }) => {
              return {
                _fields: "id,name,slug,link",
                orderBy: search ? "name" : "registered_date",
                exclude: authorInfo.user.existingEntitiesIds,
                who: "authors"
              };
            },
            getSpecificTemplate: (suggestion) => {
              const templateSlug = prefixSlug2(
                "author",
                suggestion.slug
              );
              return {
                title: templateSlug,
                slug: templateSlug,
                templatePrefix: "author"
              };
            }
          },
          labels: {
            singular_name: (0, import_i18n149.__)("Author"),
            search_items: (0, import_i18n149.__)("Search Authors"),
            not_found: (0, import_i18n149.__)("No authors found."),
            all_items: (0, import_i18n149.__)("All Authors")
          },
          hasGeneralTemplate,
          template
        });
      };
    }
    if (!hasGeneralTemplate || authorInfo.user?.hasEntities) {
      return authorMenuItem;
    }
  }
  var useExistingTemplateSlugs = (templatePrefixes) => {
    const existingTemplates = useExistingTemplates2();
    const existingSlugs = (0, import_element150.useMemo)(() => {
      return Object.entries(templatePrefixes || {}).reduce(
        (accumulator, [slug, prefix2]) => {
          const slugsWithTemplates = (existingTemplates || []).reduce(
            (_accumulator, existingTemplate) => {
              const _prefix = `${prefix2}-`;
              if (existingTemplate.slug.startsWith(_prefix)) {
                _accumulator.push(
                  existingTemplate.slug.substring(
                    _prefix.length
                  )
                );
              }
              return _accumulator;
            },
            []
          );
          if (slugsWithTemplates.length) {
            accumulator[slug] = slugsWithTemplates;
          }
          return accumulator;
        },
        {}
      );
    }, [templatePrefixes, existingTemplates]);
    return existingSlugs;
  };
  var useTemplatesToExclude = (entityName, templatePrefixes, additionalQueryParameters = {}) => {
    const slugsToExcludePerEntity = useExistingTemplateSlugs(templatePrefixes);
    const recordsToExcludePerEntity = (0, import_data76.useSelect)(
      (select3) => {
        return Object.entries(slugsToExcludePerEntity || {}).reduce(
          (accumulator, [slug, slugsWithTemplates]) => {
            const entitiesWithTemplates = select3(
              import_core_data56.store
            ).getEntityRecords(entityName, slug, {
              _fields: "id",
              context: "view",
              slug: slugsWithTemplates,
              ...additionalQueryParameters[slug]
            });
            if (entitiesWithTemplates?.length) {
              accumulator[slug] = entitiesWithTemplates;
            }
            return accumulator;
          },
          {}
        );
      },
      [slugsToExcludePerEntity]
    );
    return recordsToExcludePerEntity;
  };
  var useEntitiesInfo2 = (entityName, templatePrefixes, additionalQueryParameters = EMPTY_OBJECT3) => {
    const recordsToExcludePerEntity = useTemplatesToExclude(
      entityName,
      templatePrefixes,
      additionalQueryParameters
    );
    const entitiesHasRecords = (0, import_data76.useSelect)(
      (select3) => {
        return Object.keys(templatePrefixes || {}).reduce(
          (accumulator, slug) => {
            const existingEntitiesIds = recordsToExcludePerEntity?.[slug]?.map(
              ({ id }) => id
            ) || [];
            accumulator[slug] = !!select3(
              import_core_data56.store
            ).getEntityRecords(entityName, slug, {
              per_page: 1,
              _fields: "id",
              context: "view",
              exclude: existingEntitiesIds,
              ...additionalQueryParameters[slug]
            })?.length;
            return accumulator;
          },
          {}
        );
      },
      [
        templatePrefixes,
        recordsToExcludePerEntity,
        entityName,
        additionalQueryParameters
      ]
    );
    const entitiesInfo = (0, import_element150.useMemo)(() => {
      return Object.keys(templatePrefixes || {}).reduce(
        (accumulator, slug) => {
          const existingEntitiesIds = recordsToExcludePerEntity?.[slug]?.map(
            ({ id }) => id
          ) || [];
          accumulator[slug] = {
            hasEntities: entitiesHasRecords[slug],
            existingEntitiesIds
          };
          return accumulator;
        },
        {}
      );
    }, [templatePrefixes, recordsToExcludePerEntity, entitiesHasRecords]);
    return entitiesInfo;
  };

  // packages/edit-site/build-module/components/add-new-template-legacy/add-custom-template-modal-content.mjs
  var import_jsx_runtime285 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_ARRAY15 = [];
  function SuggestionListItem2({
    suggestion,
    search,
    onSelect,
    entityForSuggestions
  }) {
    const baseCssClass = "edit-site-custom-template-modal__suggestions_list__list-item";
    return /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(
      import_components156.Composite.Item,
      {
        render: /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
          import_components156.Button,
          {
            __next40pxDefaultSize: true,
            role: "option",
            className: baseCssClass,
            onClick: () => onSelect(
              entityForSuggestions.config.getSpecificTemplate(
                suggestion
              )
            )
          }
        ),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
            import_components156.__experimentalText,
            {
              size: "body",
              lineHeight: 1.53846153846,
              weight: 500,
              className: `${baseCssClass}__title`,
              children: /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
                import_components156.TextHighlight,
                {
                  text: (0, import_html_entities16.decodeEntities)(suggestion.name),
                  highlight: search
                }
              )
            }
          ),
          suggestion.link && /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
            import_components156.__experimentalText,
            {
              size: "body",
              lineHeight: 1.53846153846,
              className: `${baseCssClass}__info`,
              children: (0, import_url24.safeDecodeURI)(suggestion.link)
            }
          )
        ]
      }
    );
  }
  function useSearchSuggestions2(entityForSuggestions, search) {
    const { config: config2 } = entityForSuggestions;
    const query = (0, import_element151.useMemo)(
      () => ({
        order: "asc",
        context: "view",
        search,
        per_page: search ? 20 : 10,
        ...config2.queryArgs(search)
      }),
      [search, config2]
    );
    const { records: searchResults, hasResolved: searchHasResolved } = (0, import_core_data57.useEntityRecords)(
      entityForSuggestions.type,
      entityForSuggestions.slug,
      query
    );
    const [suggestions, setSuggestions] = (0, import_element151.useState)(EMPTY_ARRAY15);
    (0, import_element151.useEffect)(() => {
      if (!searchHasResolved) {
        return;
      }
      let newSuggestions = EMPTY_ARRAY15;
      if (searchResults?.length) {
        newSuggestions = searchResults;
        if (config2.recordNamePath) {
          newSuggestions = mapToIHasNameAndId2(
            newSuggestions,
            config2.recordNamePath
          );
        }
      }
      setSuggestions(newSuggestions);
    }, [searchResults, searchHasResolved]);
    return suggestions;
  }
  function SuggestionList2({ entityForSuggestions, onSelect }) {
    const [search, setSearch, debouncedSearch] = (0, import_compose31.useDebouncedInput)();
    const suggestions = useSearchSuggestions2(
      entityForSuggestions,
      debouncedSearch
    );
    const { labels } = entityForSuggestions;
    const [showSearchControl, setShowSearchControl] = (0, import_element151.useState)(false);
    if (!showSearchControl && suggestions?.length > 9) {
      setShowSearchControl(true);
    }
    return /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(import_jsx_runtime285.Fragment, { children: [
      showSearchControl && /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
        import_components156.SearchControl,
        {
          onChange: setSearch,
          value: search,
          label: labels.search_items,
          placeholder: labels.search_items
        }
      ),
      !!suggestions?.length && /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
        import_components156.Composite,
        {
          orientation: "vertical",
          role: "listbox",
          className: "edit-site-custom-template-modal__suggestions_list",
          "aria-label": (0, import_i18n150.__)("Suggestions list"),
          children: suggestions.map((suggestion) => /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
            SuggestionListItem2,
            {
              suggestion,
              search: debouncedSearch,
              onSelect,
              entityForSuggestions
            },
            suggestion.slug
          ))
        }
      ),
      debouncedSearch && !suggestions?.length && /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
        import_components156.__experimentalText,
        {
          as: "p",
          className: "edit-site-custom-template-modal__no-results",
          children: labels.not_found
        }
      )
    ] });
  }
  function AddCustomTemplateModalContent2({
    onSelect,
    entityForSuggestions,
    onBack,
    containerRef
  }) {
    const [showSearchEntities, setShowSearchEntities] = (0, import_element151.useState)(
      entityForSuggestions.hasGeneralTemplate
    );
    (0, import_element151.useEffect)(() => {
      if (containerRef.current) {
        const [firstFocusable] = import_dom14.focus.focusable.find(
          containerRef.current
        );
        firstFocusable?.focus();
      }
    }, [showSearchEntities]);
    return /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(
      import_components156.__experimentalVStack,
      {
        spacing: 4,
        className: "edit-site-custom-template-modal__contents-wrapper",
        alignment: "left",
        children: [
          !showSearchEntities && /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(import_jsx_runtime285.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(import_components156.__experimentalText, { as: "p", children: (0, import_i18n150.__)(
              "Select whether to create a single template for all items or a specific one."
            ) }),
            /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(
              import_components156.Flex,
              {
                className: "edit-site-custom-template-modal__contents",
                gap: "4",
                align: "initial",
                children: [
                  /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(
                    import_components156.FlexItem,
                    {
                      isBlock: true,
                      as: import_components156.Button,
                      onClick: () => {
                        const {
                          slug,
                          title,
                          description,
                          templatePrefix
                        } = entityForSuggestions.template;
                        onSelect({
                          slug,
                          title,
                          description,
                          templatePrefix
                        });
                      },
                      children: [
                        /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
                          import_components156.__experimentalText,
                          {
                            as: "span",
                            weight: 500,
                            lineHeight: 1.53846153846,
                            children: entityForSuggestions.labels.all_items
                          }
                        ),
                        /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
                          import_components156.__experimentalText,
                          {
                            as: "span",
                            lineHeight: 1.53846153846,
                            // 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.
                            children: (0, import_i18n150.__)("For all items")
                          }
                        )
                      ]
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(
                    import_components156.FlexItem,
                    {
                      isBlock: true,
                      as: import_components156.Button,
                      onClick: () => {
                        setShowSearchEntities(true);
                      },
                      children: [
                        /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
                          import_components156.__experimentalText,
                          {
                            as: "span",
                            weight: 500,
                            lineHeight: 1.53846153846,
                            children: entityForSuggestions.labels.singular_name
                          }
                        ),
                        /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
                          import_components156.__experimentalText,
                          {
                            as: "span",
                            lineHeight: 1.53846153846,
                            // 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.
                            children: (0, import_i18n150.__)("For a specific item")
                          }
                        )
                      ]
                    }
                  )
                ]
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(import_components156.Flex, { justify: "right", children: /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
              import_components156.Button,
              {
                __next40pxDefaultSize: true,
                variant: "tertiary",
                onClick: onBack,
                children: (0, import_i18n150.__)("Back")
              }
            ) })
          ] }),
          showSearchEntities && /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(import_jsx_runtime285.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(import_components156.__experimentalText, { as: "p", children: (0, import_i18n150.__)(
              "This template will be used only for the specific item chosen."
            ) }),
            /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
              SuggestionList2,
              {
                entityForSuggestions,
                onSelect
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(import_components156.Flex, { justify: "right", children: /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
              import_components156.Button,
              {
                __next40pxDefaultSize: true,
                variant: "tertiary",
                onClick: () => {
                  if (entityForSuggestions.hasGeneralTemplate) {
                    onBack();
                  } else {
                    setShowSearchEntities(false);
                  }
                },
                children: (0, import_i18n150.__)("Back")
              }
            ) })
          ] })
        ]
      }
    );
  }
  var add_custom_template_modal_content_default2 = AddCustomTemplateModalContent2;

  // packages/edit-site/build-module/components/add-new-template-legacy/add-custom-generic-template-modal-content.mjs
  var import_element152 = __toESM(require_element(), 1);
  var import_i18n151 = __toESM(require_i18n(), 1);
  var import_components157 = __toESM(require_components(), 1);
  var import_jsx_runtime286 = __toESM(require_jsx_runtime(), 1);
  function AddCustomGenericTemplateModalContent2({ createTemplate, onBack }) {
    const [title, setTitle] = (0, import_element152.useState)("");
    const defaultTitle = (0, import_i18n151.__)("Custom Template");
    const [isBusy, setIsBusy] = (0, import_element152.useState)(false);
    const inputRef = (0, import_element152.useRef)();
    (0, import_element152.useEffect)(() => {
      if (inputRef.current) {
        inputRef.current.focus();
      }
    }, []);
    async function onCreateTemplate(event) {
      event.preventDefault();
      if (isBusy) {
        return;
      }
      setIsBusy(true);
      try {
        await createTemplate(
          {
            slug: paramCase(title || defaultTitle) || "wp-custom-template",
            title: title || defaultTitle
          },
          false
        );
      } finally {
        setIsBusy(false);
      }
    }
    return /* @__PURE__ */ (0, import_jsx_runtime286.jsx)("form", { onSubmit: onCreateTemplate, children: /* @__PURE__ */ (0, import_jsx_runtime286.jsxs)(import_components157.__experimentalVStack, { spacing: 6, children: [
      /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(
        import_components157.TextControl,
        {
          __next40pxDefaultSize: true,
          label: (0, import_i18n151.__)("Name"),
          value: title,
          onChange: setTitle,
          placeholder: defaultTitle,
          disabled: isBusy,
          ref: inputRef,
          help: (0, import_i18n151.__)(
            // eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts
            'Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.'
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime286.jsxs)(
        import_components157.__experimentalHStack,
        {
          className: "edit-site-custom-generic-template__modal-actions",
          justify: "right",
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(
              import_components157.Button,
              {
                __next40pxDefaultSize: true,
                variant: "tertiary",
                onClick: onBack,
                children: (0, import_i18n151.__)("Back")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(
              import_components157.Button,
              {
                __next40pxDefaultSize: true,
                variant: "primary",
                type: "submit",
                isBusy,
                "aria-disabled": isBusy,
                children: (0, import_i18n151.__)("Create")
              }
            )
          ]
        }
      )
    ] }) });
  }
  var add_custom_generic_template_modal_content_default2 = AddCustomGenericTemplateModalContent2;

  // packages/edit-site/build-module/components/add-new-template-legacy/index.mjs
  var import_jsx_runtime287 = __toESM(require_jsx_runtime(), 1);
  var { useHistory: useHistory23 } = unlock(import_router36.privateApis);
  var DEFAULT_TEMPLATE_SLUGS2 = [
    "front-page",
    "home",
    "single",
    "page",
    "index",
    "archive",
    "author",
    "category",
    "date",
    "tag",
    "search",
    "404"
  ];
  var TEMPLATE_ICONS2 = {
    "front-page": home_default,
    home: verse_default,
    single: pin_default,
    page: page_default,
    archive: archive_default,
    search: search_default,
    404: not_found_default,
    index: list_default,
    category: category_default,
    author: comment_author_avatar_default,
    taxonomy: block_meta_default,
    date: calendar_default,
    tag: tag_default,
    attachment: media_default
  };
  function TemplateListItem2({
    title,
    direction,
    className,
    description,
    icon,
    onClick,
    children
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
      import_components158.Button,
      {
        __next40pxDefaultSize: true,
        className,
        onClick,
        label: description,
        showTooltip: !!description,
        children: /* @__PURE__ */ (0, import_jsx_runtime287.jsxs)(
          import_components158.Flex,
          {
            as: "span",
            spacing: 2,
            align: "center",
            justify: "center",
            style: { width: "100%" },
            direction,
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime287.jsx)("div", { className: "edit-site-add-new-template__template-icon", children: /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(import_components158.Icon, { icon }) }),
              /* @__PURE__ */ (0, import_jsx_runtime287.jsxs)(
                import_components158.__experimentalVStack,
                {
                  className: "edit-site-add-new-template__template-name",
                  alignment: "center",
                  spacing: 0,
                  children: [
                    /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
                      import_components158.__experimentalText,
                      {
                        align: "center",
                        weight: 500,
                        lineHeight: 1.53846153846,
                        children: title
                      }
                    ),
                    children
                  ]
                }
              )
            ]
          }
        )
      }
    );
  }
  var modalContentMap2 = {
    templatesList: 1,
    customTemplate: 2,
    customGenericTemplate: 3
  };
  function NewTemplateModal2({ onClose }) {
    const [modalContent, setModalContent] = (0, import_element153.useState)(
      modalContentMap2.templatesList
    );
    const [entityForSuggestions, setEntityForSuggestions] = (0, import_element153.useState)({});
    const [isSubmitting, setIsSubmitting] = (0, import_element153.useState)(false);
    const missingTemplates = useMissingTemplates2(
      setEntityForSuggestions,
      () => setModalContent(modalContentMap2.customTemplate)
    );
    const history = useHistory23();
    const { saveEntityRecord } = (0, import_data77.useDispatch)(import_core_data58.store);
    const { createErrorNotice, createSuccessNotice } = (0, import_data77.useDispatch)(import_notices9.store);
    const containerRef = (0, import_element153.useRef)(null);
    const isMobile = (0, import_compose32.useViewportMatch)("medium", "<");
    const homeUrl = (0, import_data77.useSelect)((select3) => {
      return select3(import_core_data58.store).getEntityRecord("root", "__unstableBase")?.home;
    }, []);
    const TEMPLATE_SHORT_DESCRIPTIONS = {
      "front-page": homeUrl,
      date: (0, import_i18n152.sprintf)(
        // translators: %s: The homepage url.
        (0, import_i18n152.__)("E.g. %s"),
        homeUrl + "/" + (/* @__PURE__ */ new Date()).getFullYear()
      )
    };
    (0, import_element153.useEffect)(() => {
      if (containerRef.current && modalContent === modalContentMap2.templatesList) {
        const [firstFocusable] = import_dom15.focus.focusable.find(
          containerRef.current
        );
        firstFocusable?.focus();
      }
    }, [modalContent]);
    async function createTemplate(template, isWPSuggestion = true) {
      if (isSubmitting) {
        return;
      }
      setIsSubmitting(true);
      try {
        const { title, description, slug } = template;
        const newTemplate = await saveEntityRecord(
          "postType",
          TEMPLATE_POST_TYPE,
          {
            description,
            // Slugs need to be strings, so this is for template `404`
            slug: slug.toString(),
            status: "publish",
            title,
            // This adds a post meta field in template that is part of `is_custom` value calculation.
            is_wp_suggestion: isWPSuggestion
          },
          { throwOnError: true }
        );
        history.navigate(
          `/${TEMPLATE_POST_TYPE}/${newTemplate.id}?canvas=edit`
        );
        createSuccessNotice(
          (0, import_i18n152.sprintf)(
            // translators: %s: Title of the created post or template, e.g: "Hello world".
            (0, import_i18n152.__)('"%s" successfully created.'),
            (0, import_html_entities17.decodeEntities)(newTemplate.title?.rendered || title) || (0, import_i18n152.__)("(no title)")
          ),
          {
            type: "snackbar"
          }
        );
      } catch (error) {
        const errorMessage = error.message && error.code !== "unknown_error" ? error.message : (0, import_i18n152.__)("An error occurred while creating the template.");
        createErrorNotice(errorMessage, {
          type: "snackbar"
        });
      } finally {
        setIsSubmitting(false);
      }
    }
    const onModalClose = () => {
      onClose();
      setModalContent(modalContentMap2.templatesList);
    };
    let modalTitle = (0, import_i18n152.__)("Add template");
    if (modalContent === modalContentMap2.customTemplate) {
      modalTitle = (0, import_i18n152.sprintf)(
        // translators: %s: Name of the post type e.g: "Post".
        (0, import_i18n152.__)("Add template: %s"),
        entityForSuggestions.labels.singular_name
      );
    } else if (modalContent === modalContentMap2.customGenericTemplate) {
      modalTitle = (0, import_i18n152.__)("Create custom template");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime287.jsxs)(
      import_components158.Modal,
      {
        title: modalTitle,
        className: clsx_default("edit-site-add-new-template__modal", {
          "edit-site-add-new-template__modal_template_list": modalContent === modalContentMap2.templatesList,
          "edit-site-custom-template-modal": modalContent === modalContentMap2.customTemplate
        }),
        onRequestClose: onModalClose,
        overlayClassName: modalContent === modalContentMap2.customGenericTemplate ? "edit-site-custom-generic-template__modal" : void 0,
        ref: containerRef,
        children: [
          modalContent === modalContentMap2.templatesList && /* @__PURE__ */ (0, import_jsx_runtime287.jsxs)(
            import_components158.__experimentalGrid,
            {
              columns: isMobile ? 2 : 3,
              gap: 4,
              align: "flex-start",
              justify: "center",
              className: "edit-site-add-new-template__template-list__contents",
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(import_components158.Flex, { className: "edit-site-add-new-template__template-list__prompt", children: (0, import_i18n152.__)(
                  "Select what the new template should apply to:"
                ) }),
                missingTemplates.map((template) => {
                  const { title, slug, onClick } = template;
                  return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
                    TemplateListItem2,
                    {
                      title,
                      direction: "column",
                      className: "edit-site-add-new-template__template-button",
                      description: TEMPLATE_SHORT_DESCRIPTIONS[slug],
                      icon: TEMPLATE_ICONS2[slug] || layout_default,
                      onClick: () => onClick ? onClick(template) : createTemplate(template)
                    },
                    slug
                  );
                }),
                /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
                  TemplateListItem2,
                  {
                    title: (0, import_i18n152.__)("Custom template"),
                    direction: "row",
                    className: "edit-site-add-new-template__custom-template-button",
                    icon: pencil_default,
                    onClick: () => setModalContent(
                      modalContentMap2.customGenericTemplate
                    ),
                    children: /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
                      import_components158.__experimentalText,
                      {
                        lineHeight: 1.53846153846,
                        children: (0, import_i18n152.__)(
                          "A custom template can be manually applied to any post or page."
                        )
                      }
                    )
                  }
                )
              ]
            }
          ),
          modalContent === modalContentMap2.customTemplate && /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
            add_custom_template_modal_content_default2,
            {
              onSelect: createTemplate,
              entityForSuggestions,
              onBack: () => setModalContent(modalContentMap2.templatesList),
              containerRef
            }
          ),
          modalContent === modalContentMap2.customGenericTemplate && /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
            add_custom_generic_template_modal_content_default2,
            {
              createTemplate,
              onBack: () => setModalContent(modalContentMap2.templatesList)
            }
          )
        ]
      }
    );
  }
  function NewTemplate2() {
    const [showModal, setShowModal] = (0, import_element153.useState)(false);
    const { postType: postType2 } = (0, import_data77.useSelect)((select3) => {
      const { getPostType: getPostType2 } = select3(import_core_data58.store);
      return {
        postType: getPostType2(TEMPLATE_POST_TYPE)
      };
    }, []);
    if (!postType2) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime287.jsxs)(import_jsx_runtime287.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
        import_components158.Button,
        {
          variant: "primary",
          onClick: () => setShowModal(true),
          label: postType2.labels.add_new_item,
          __next40pxDefaultSize: true,
          children: postType2.labels.add_new_item
        }
      ),
      showModal && /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(NewTemplateModal2, { onClose: () => setShowModal(false) })
    ] });
  }
  function useMissingTemplates2(setEntityForSuggestions, onClick) {
    const existingTemplates = useExistingTemplates2();
    const defaultTemplateTypes = useDefaultTemplateTypes2();
    const existingTemplateSlugs = (existingTemplates || []).map(
      ({ slug }) => slug
    );
    const missingDefaultTemplates = (defaultTemplateTypes || []).filter(
      (template) => DEFAULT_TEMPLATE_SLUGS2.includes(template.slug) && !existingTemplateSlugs.includes(template.slug)
    );
    const onClickMenuItem = (_entityForSuggestions) => {
      onClick?.();
      setEntityForSuggestions(_entityForSuggestions);
    };
    const enhancedMissingDefaultTemplateTypes = [...missingDefaultTemplates];
    const { defaultTaxonomiesMenuItems, taxonomiesMenuItems } = useTaxonomiesMenuItems2(onClickMenuItem);
    const { defaultPostTypesMenuItems, postTypesMenuItems } = usePostTypeMenuItems2(onClickMenuItem);
    const authorMenuItem = useAuthorMenuItem2(onClickMenuItem);
    [
      ...defaultTaxonomiesMenuItems,
      ...defaultPostTypesMenuItems,
      authorMenuItem
    ].forEach((menuItem) => {
      if (!menuItem) {
        return;
      }
      const matchIndex = enhancedMissingDefaultTemplateTypes.findIndex(
        (template) => template.slug === menuItem.slug
      );
      if (matchIndex > -1) {
        enhancedMissingDefaultTemplateTypes[matchIndex] = menuItem;
      } else {
        enhancedMissingDefaultTemplateTypes.push(menuItem);
      }
    });
    enhancedMissingDefaultTemplateTypes?.sort((template1, template2) => {
      return DEFAULT_TEMPLATE_SLUGS2.indexOf(template1.slug) - DEFAULT_TEMPLATE_SLUGS2.indexOf(template2.slug);
    });
    const missingTemplates = [
      ...enhancedMissingDefaultTemplateTypes,
      ...usePostTypeArchiveMenuItems2(),
      ...postTypesMenuItems,
      ...taxonomiesMenuItems
    ];
    return missingTemplates;
  }
  var add_new_template_legacy_default = (0, import_element153.memo)(NewTemplate2);

  // packages/edit-site/build-module/components/page-templates/index-legacy.mjs
  var import_jsx_runtime288 = __toESM(require_jsx_runtime(), 1);
  var { usePostActions: usePostActions3, templateTitleField: templateTitleField2 } = unlock(import_editor36.privateApis);
  var { useHistory: useHistory24, useLocation: useLocation31 } = unlock(import_router37.privateApis);
  var { useEntityRecordsWithPermissions: useEntityRecordsWithPermissions3 } = unlock(import_core_data59.privateApis);
  function PageTemplates2() {
    const { path, query } = useLocation31();
    const { activeView = "active", postId } = query;
    const [selection, setSelection] = (0, import_element154.useState)([postId]);
    const defaultView = DEFAULT_VIEW2;
    const activeViewOverrides = (0, import_element154.useMemo)(
      () => getActiveViewOverridesForTab(activeView),
      [activeView]
    );
    const { view, updateView, isModified, resetToDefault } = useView({
      kind: "postType",
      name: TEMPLATE_POST_TYPE,
      slug: "default",
      defaultView,
      activeViewOverrides,
      queryParams: {
        page: query.pageNumber,
        search: query.search
      },
      onChangeQueryParams: (newQueryParams) => {
        history.navigate(
          (0, import_url25.addQueryArgs)(path, {
            ...query,
            pageNumber: newQueryParams.page,
            search: newQueryParams.search || void 0
          })
        );
      }
    });
    const { records, isResolving: isLoadingData } = useEntityRecordsWithPermissions3("postType", TEMPLATE_POST_TYPE, {
      per_page: -1
    });
    const history = useHistory24();
    const onChangeSelection = (0, import_element154.useCallback)(
      (items) => {
        setSelection(items);
        if (view?.type === "list") {
          history.navigate(
            (0, import_url25.addQueryArgs)(path, {
              postId: items.length === 1 ? items[0] : void 0
            })
          );
        }
      },
      [history, path, view?.type]
    );
    const authors = (0, import_element154.useMemo)(() => {
      if (!records) {
        return [];
      }
      const authorsSet = /* @__PURE__ */ new Set();
      records.forEach((template) => {
        authorsSet.add(template.author_text);
      });
      return Array.from(authorsSet).map((author) => ({
        value: author,
        label: author
      }));
    }, [records]);
    const fields = (0, import_element154.useMemo)(
      () => [
        previewField2,
        templateTitleField2,
        descriptionField,
        {
          ...authorField,
          elements: authors
        }
      ],
      [authors]
    );
    const { data, paginationInfo } = (0, import_element154.useMemo)(() => {
      return filterSortAndPaginate(records, view, fields);
    }, [records, view, fields]);
    const postTypeActions = usePostActions3({
      postType: TEMPLATE_POST_TYPE,
      context: "list"
    });
    const editAction = useEditPostAction();
    const actions = (0, import_element154.useMemo)(
      () => [editAction, ...postTypeActions],
      [postTypeActions, editAction]
    );
    const onChangeView = (0, import_compose33.useEvent)((newView) => {
      updateView(newView);
      if (newView.type !== view.type) {
        history.invalidate();
      }
    });
    return /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
      page_default2,
      {
        className: "edit-site-page-templates",
        title: (0, import_i18n153.__)("Templates"),
        headingLevel: 2,
        actions: /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(add_new_template_legacy_default, {}),
        children: /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
          dataviews_default,
          {
            paginationInfo,
            fields,
            actions,
            data,
            isLoading: isLoadingData,
            view,
            onChangeView,
            onChangeSelection,
            isItemClickable: () => true,
            onClickItem: ({ id }) => {
              history.navigate(`/wp_template/${id}?canvas=edit`);
            },
            selection,
            defaultLayouts: defaultLayouts2,
            onReset: isModified ? () => {
              resetToDefault();
              history.invalidate();
            } : false
          },
          activeView
        )
      }
    );
  }

  // packages/edit-site/build-module/components/site-editor-routes/templates.mjs
  var import_jsx_runtime289 = __toESM(require_jsx_runtime(), 1);
  async function isTemplateListView(query) {
    const { activeView = "active" } = query;
    const view = await loadView({
      kind: "postType",
      name: "wp_template",
      slug: "default",
      defaultView: DEFAULT_VIEW2,
      activeViewOverrides: getActiveViewOverridesForTab(activeView)
    });
    return view.type === "list";
  }
  var templatesRoute = {
    name: "templates",
    path: "/template",
    areas: {
      sidebar({ siteData }) {
        const isBlockTheme = siteData.currentTheme?.is_block_theme;
        return isBlockTheme ? /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(SidebarNavigationScreenTemplatesBrowse, { backPath: "/" }) : /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(SidebarNavigationScreenUnsupported, {});
      },
      content({ siteData }) {
        const isBlockTheme = siteData.currentTheme?.is_block_theme;
        if (!isBlockTheme) {
          return void 0;
        }
        return window?.__experimentalTemplateActivate ? /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(PageTemplates, {}) : /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(PageTemplates2, {});
      },
      async preview({ query, siteData }) {
        const isBlockTheme = siteData.currentTheme?.is_block_theme;
        if (!isBlockTheme) {
          return void 0;
        }
        const isListView2 = await isTemplateListView(query);
        return isListView2 ? /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(EditSiteEditor, {}) : void 0;
      },
      mobile({ siteData }) {
        const isBlockTheme = siteData.currentTheme?.is_block_theme;
        if (!isBlockTheme) {
          return /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(SidebarNavigationScreenUnsupported, {});
        }
        const isTemplateActivateEnabled = typeof window !== "undefined" && window.__experimentalTemplateActivate;
        return isTemplateActivateEnabled ? /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(PageTemplates, {}) : /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(PageTemplates2, {});
      }
    },
    widths: {
      async content({ query }) {
        const isListView2 = await isTemplateListView(query);
        return isListView2 ? 380 : void 0;
      }
    }
  };

  // packages/edit-site/build-module/components/site-editor-routes/template-item.mjs
  var import_jsx_runtime290 = __toESM(require_jsx_runtime(), 1);
  var areas = {
    sidebar({ siteData }) {
      const isBlockTheme = siteData.currentTheme?.is_block_theme;
      return isBlockTheme ? /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(SidebarNavigationScreenTemplatesBrowse, { backPath: "/" }) : /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(SidebarNavigationScreenUnsupported, {});
    },
    mobile({ siteData }) {
      const isBlockTheme = siteData.currentTheme?.is_block_theme;
      return isBlockTheme ? /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(EditSiteEditor, {}) : /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(SidebarNavigationScreenUnsupported, {});
    },
    preview({ siteData }) {
      const isBlockTheme = siteData.currentTheme?.is_block_theme;
      return isBlockTheme ? /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(EditSiteEditor, {}) : /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(SidebarNavigationScreenUnsupported, {});
    }
  };
  var templateItemRoute = {
    name: "template-item",
    path: "/wp_template/*postId",
    areas
  };

  // packages/edit-site/build-module/components/site-editor-routes/pages.mjs
  var import_router41 = __toESM(require_router(), 1);
  var import_i18n157 = __toESM(require_i18n(), 1);

  // packages/edit-site/build-module/components/sidebar-dataviews/index.mjs
  var import_components160 = __toESM(require_components(), 1);
  var import_router39 = __toESM(require_router(), 1);
  var import_data78 = __toESM(require_data(), 1);
  var import_core_data60 = __toESM(require_core_data(), 1);
  var import_element155 = __toESM(require_element(), 1);

  // packages/edit-site/build-module/components/sidebar-dataviews/dataview-item.mjs
  var import_router38 = __toESM(require_router(), 1);
  var import_components159 = __toESM(require_components(), 1);
  var import_url26 = __toESM(require_url(), 1);
  var import_jsx_runtime291 = __toESM(require_jsx_runtime(), 1);
  var { useLocation: useLocation32 } = unlock(import_router38.privateApis);
  function DataViewItem({
    title,
    slug,
    type,
    icon,
    isActive,
    suffix
  }) {
    const { path } = useLocation32();
    const iconToUse = icon || VIEW_LAYOUTS.find((v2) => v2.type === type).icon;
    if (slug === "all") {
      slug = void 0;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime291.jsxs)(
      import_components159.__experimentalHStack,
      {
        justify: "flex-start",
        className: clsx_default("edit-site-sidebar-dataviews-dataview-item", {
          "is-selected": isActive
        }),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
            SidebarNavigationItem,
            {
              icon: iconToUse,
              to: (0, import_url26.addQueryArgs)(path, {
                activeView: slug
              }),
              "aria-current": isActive ? "true" : void 0,
              children: title
            }
          ),
          suffix
        ]
      }
    );
  }

  // packages/edit-site/build-module/components/post-list/view-utils.mjs
  var import_i18n154 = __toESM(require_i18n(), 1);
  var defaultLayouts3 = {
    table: {
      layout: {
        styles: {
          author: {
            align: "start"
          }
        }
      }
    },
    grid: {},
    list: {}
  };
  var DEFAULT_VIEW3 = {
    type: "list",
    filters: [],
    perPage: 20,
    sort: {
      field: "title",
      direction: "asc"
    },
    showLevels: true,
    titleField: "title",
    mediaField: "featured_media",
    fields: ["author", "status"],
    ...defaultLayouts3.list
  };
  function getDefaultViews(postType2) {
    return [
      {
        title: postType2?.labels?.all_items || (0, import_i18n154.__)("All items"),
        slug: "all",
        icon: pages_default,
        view: DEFAULT_VIEW3
      },
      {
        title: (0, import_i18n154.__)("Published"),
        slug: "published",
        icon: published_default,
        view: {
          ...DEFAULT_VIEW3,
          filters: [
            {
              field: "status",
              operator: OPERATOR_IS_ANY,
              value: "publish",
              isLocked: true
            }
          ]
        }
      },
      {
        title: (0, import_i18n154.__)("Scheduled"),
        slug: "future",
        icon: scheduled_default,
        view: {
          ...DEFAULT_VIEW3,
          filters: [
            {
              field: "status",
              operator: OPERATOR_IS_ANY,
              value: "future",
              isLocked: true
            }
          ]
        }
      },
      {
        title: (0, import_i18n154.__)("Drafts"),
        slug: "drafts",
        icon: drafts_default,
        view: {
          ...DEFAULT_VIEW3,
          filters: [
            {
              field: "status",
              operator: OPERATOR_IS_ANY,
              value: "draft",
              isLocked: true
            }
          ]
        }
      },
      {
        title: (0, import_i18n154.__)("Pending"),
        slug: "pending",
        icon: pending_default,
        view: {
          ...DEFAULT_VIEW3,
          filters: [
            {
              field: "status",
              operator: OPERATOR_IS_ANY,
              value: "pending",
              isLocked: true
            }
          ]
        }
      },
      {
        title: (0, import_i18n154.__)("Private"),
        slug: "private",
        icon: not_allowed_default,
        view: {
          ...DEFAULT_VIEW3,
          filters: [
            {
              field: "status",
              operator: OPERATOR_IS_ANY,
              value: "private",
              isLocked: true
            }
          ]
        }
      },
      {
        title: (0, import_i18n154.__)("Trash"),
        slug: "trash",
        icon: trash_default,
        view: {
          ...DEFAULT_VIEW3,
          type: "table",
          layout: defaultLayouts3.table.layout,
          filters: [
            {
              field: "status",
              operator: OPERATOR_IS_ANY,
              value: "trash",
              isLocked: true
            }
          ]
        }
      }
    ];
  }
  var SLUG_TO_STATUS = {
    published: "publish",
    future: "future",
    drafts: "draft",
    pending: "pending",
    private: "private",
    trash: "trash"
  };
  function getActiveViewOverridesForTab2(activeView) {
    const base = {
      ...defaultLayouts3.table
    };
    const status = SLUG_TO_STATUS[activeView];
    if (!status) {
      return base;
    }
    return {
      ...base,
      filters: [
        {
          field: "status",
          operator: OPERATOR_IS_ANY,
          value: status,
          isLocked: true
        }
      ]
    };
  }

  // packages/edit-site/build-module/components/sidebar-dataviews/index.mjs
  var import_jsx_runtime292 = __toESM(require_jsx_runtime(), 1);
  var { useLocation: useLocation33 } = unlock(import_router39.privateApis);
  function DataViewsSidebarContent({ postType: postType2 }) {
    const {
      query: { activeView = "all" }
    } = useLocation33();
    const postTypeObject = (0, import_data78.useSelect)(
      (select3) => {
        const { getPostType: getPostType2 } = select3(import_core_data60.store);
        return getPostType2(postType2);
      },
      [postType2]
    );
    const defaultViews = (0, import_element155.useMemo)(
      () => getDefaultViews(postTypeObject),
      [postTypeObject]
    );
    if (!postType2) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime292.jsx)(import_jsx_runtime292.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime292.jsx)(import_components160.__experimentalItemGroup, { className: "edit-site-sidebar-dataviews", children: defaultViews.map((dataview) => {
      return /* @__PURE__ */ (0, import_jsx_runtime292.jsx)(
        DataViewItem,
        {
          slug: dataview.slug,
          title: dataview.title,
          icon: dataview.icon,
          type: dataview.view.type,
          isActive: dataview.slug === activeView
        },
        dataview.slug
      );
    }) }) });
  }

  // packages/edit-site/build-module/components/post-list/index.mjs
  var import_components163 = __toESM(require_components(), 1);
  var import_core_data64 = __toESM(require_core_data(), 1);
  var import_element159 = __toESM(require_element(), 1);
  var import_router40 = __toESM(require_router(), 1);
  var import_data81 = __toESM(require_data(), 1);
  var import_editor40 = __toESM(require_editor(), 1);
  var import_compose34 = __toESM(require_compose(), 1);
  var import_url27 = __toESM(require_url(), 1);

  // packages/edit-site/build-module/components/add-new-post/index.mjs
  var import_components161 = __toESM(require_components(), 1);
  var import_i18n155 = __toESM(require_i18n(), 1);
  var import_data79 = __toESM(require_data(), 1);
  var import_element156 = __toESM(require_element(), 1);
  var import_core_data61 = __toESM(require_core_data(), 1);
  var import_notices10 = __toESM(require_notices(), 1);
  var import_html_entities18 = __toESM(require_html_entities(), 1);
  var import_blocks14 = __toESM(require_blocks(), 1);
  var import_jsx_runtime293 = __toESM(require_jsx_runtime(), 1);
  function AddNewPostModal({ postType: postType2, onSave, onClose }) {
    const labels = (0, import_data79.useSelect)(
      (select3) => select3(import_core_data61.store).getPostType(postType2)?.labels,
      [postType2]
    );
    const [isCreatingPost, setIsCreatingPost] = (0, import_element156.useState)(false);
    const [title, setTitle] = (0, import_element156.useState)("");
    const { saveEntityRecord } = (0, import_data79.useDispatch)(import_core_data61.store);
    const { createErrorNotice, createSuccessNotice } = (0, import_data79.useDispatch)(import_notices10.store);
    const { resolveSelect: resolveSelect2 } = (0, import_data79.useRegistry)();
    async function createPost(event) {
      event.preventDefault();
      if (isCreatingPost) {
        return;
      }
      setIsCreatingPost(true);
      try {
        const postTypeObject = await resolveSelect2(import_core_data61.store).getPostType(postType2);
        const newPage = await saveEntityRecord(
          "postType",
          postType2,
          {
            status: "draft",
            title,
            slug: title ?? void 0,
            content: !!postTypeObject.template && postTypeObject.template.length ? (0, import_blocks14.serialize)(
              (0, import_blocks14.synchronizeBlocksWithTemplate)(
                [],
                postTypeObject.template
              )
            ) : void 0
          },
          { throwOnError: true }
        );
        onSave(newPage);
        createSuccessNotice(
          (0, import_i18n155.sprintf)(
            // translators: %s: Title of the created post or template, e.g: "Hello world".
            (0, import_i18n155.__)('"%s" successfully created.'),
            (0, import_html_entities18.decodeEntities)(newPage.title?.rendered || title) || (0, import_i18n155.__)("(no title)")
          ),
          { type: "snackbar" }
        );
      } catch (error) {
        const errorMessage = error.message && error.code !== "unknown_error" ? error.message : (0, import_i18n155.__)("An error occurred while creating the item.");
        createErrorNotice(errorMessage, {
          type: "snackbar"
        });
      } finally {
        setIsCreatingPost(false);
      }
    }
    return /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(
      import_components161.Modal,
      {
        title: (
          // translators: %s: post type singular_name label e.g: "Page".
          (0, import_i18n155.sprintf)((0, import_i18n155.__)("Draft new: %s"), labels?.singular_name)
        ),
        onRequestClose: onClose,
        focusOnMount: "firstContentElement",
        size: "small",
        children: /* @__PURE__ */ (0, import_jsx_runtime293.jsx)("form", { onSubmit: createPost, children: /* @__PURE__ */ (0, import_jsx_runtime293.jsxs)(import_components161.__experimentalVStack, { spacing: 4, children: [
          /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(
            import_components161.TextControl,
            {
              __next40pxDefaultSize: true,
              label: (0, import_i18n155.__)("Title"),
              onChange: setTitle,
              placeholder: (0, import_i18n155.__)("No title"),
              value: title
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime293.jsxs)(import_components161.__experimentalHStack, { spacing: 2, justify: "end", children: [
            /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(
              import_components161.Button,
              {
                __next40pxDefaultSize: true,
                variant: "tertiary",
                onClick: onClose,
                children: (0, import_i18n155.__)("Cancel")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(
              import_components161.Button,
              {
                __next40pxDefaultSize: true,
                variant: "primary",
                type: "submit",
                isBusy: isCreatingPost,
                "aria-disabled": isCreatingPost,
                children: (0, import_i18n155.__)("Create draft")
              }
            )
          ] })
        ] }) })
      }
    );
  }

  // packages/edit-site/build-module/components/post-list/use-notes-count.mjs
  var import_element157 = __toESM(require_element(), 1);
  var import_core_data62 = __toESM(require_core_data(), 1);
  function useNotesCount(postIds) {
    const { records: notes, isResolving } = (0, import_core_data62.useEntityRecords)(
      "root",
      "comment",
      {
        post: postIds,
        type: "note",
        status: "all",
        per_page: -1,
        _fields: "id,post"
      },
      {
        enabled: postIds?.length > 0
      }
    );
    const notesCount = (0, import_element157.useMemo)(() => {
      if (!notes || notes.length === 0) {
        return {};
      }
      const counts = {};
      notes.forEach((note) => {
        const postId = note.post;
        counts[postId] = (counts[postId] || 0) + 1;
      });
      return counts;
    }, [notes]);
    return { notesCount, isResolving };
  }

  // packages/edit-site/build-module/components/post-list/quick-edit-modal.mjs
  var import_i18n156 = __toESM(require_i18n(), 1);
  var import_data80 = __toESM(require_data(), 1);
  var import_core_data63 = __toESM(require_core_data(), 1);
  var import_components162 = __toESM(require_components(), 1);
  var import_element158 = __toESM(require_element(), 1);
  var import_editor39 = __toESM(require_editor(), 1);
  var import_jsx_runtime294 = __toESM(require_jsx_runtime(), 1);
  var { usePostFields: usePostFields2, PostCardPanel } = unlock(import_editor39.privateApis);
  var fieldsWithBulkEditSupport = ["status", "date", "author", "discussion"];
  function QuickEditModal({ postType: postType2, postId, closeModal }) {
    const isBulk = postId.length > 1;
    const [localEdits, setLocalEdits] = (0, import_element158.useState)({});
    const { record, hasFinishedResolution, canSwitchTemplate } = (0, import_data80.useSelect)(
      (select3) => {
        const {
          getEditedEntityRecord,
          hasFinishedResolution: hasFinished
        } = select3(import_core_data63.store);
        if (isBulk) {
          return {
            record: null,
            hasFinishedResolution: true
          };
        }
        const args = ["postType", postType2, postId[0]];
        const { getHomePage, getPostsPageId } = unlock(
          select3(import_core_data63.store)
        );
        const singlePostId = String(postId[0]);
        const isPostsPage = singlePostId !== void 0 && getPostsPageId() === singlePostId;
        const isFrontPage = singlePostId !== void 0 && postType2 === "page" && getHomePage()?.postId === singlePostId;
        return {
          record: getEditedEntityRecord(...args),
          hasFinishedResolution: hasFinished(
            "getEditedEntityRecord",
            args
          ),
          canSwitchTemplate: !isPostsPage && !isFrontPage
        };
      },
      [postType2, postId, isBulk]
    );
    const { editEntityRecord, saveEditedEntityRecord } = (0, import_data80.useDispatch)(import_core_data63.store);
    const _fields = usePostFields2({ postType: postType2 });
    const fields = (0, import_element158.useMemo)(
      () => _fields?.map((field) => {
        if (field.id === "status") {
          return {
            ...field,
            elements: field.elements.filter(
              (element) => element.value !== "trash"
            )
          };
        }
        if (field.id === "template") {
          return {
            ...field,
            readOnly: !canSwitchTemplate
          };
        }
        return field;
      }),
      [_fields, canSwitchTemplate]
    );
    const form = (0, import_element158.useMemo)(() => {
      const allFields = [
        {
          id: "featured_media",
          layout: {
            type: "regular",
            labelPosition: "none"
          }
        },
        {
          id: "status",
          label: (0, import_i18n156.__)("Status"),
          children: [
            {
              id: "status",
              layout: { type: "regular", labelPosition: "none" }
            },
            "password"
          ]
        },
        "author",
        "date",
        "slug",
        "parent",
        {
          id: "discussion",
          label: (0, import_i18n156.__)("Discussion"),
          children: [
            {
              id: "comment_status",
              layout: { type: "regular", labelPosition: "none" }
            },
            "ping_status"
          ]
        },
        "template"
      ];
      return {
        layout: {
          type: "panel"
        },
        fields: isBulk ? allFields.filter(
          (field) => fieldsWithBulkEditSupport.includes(
            typeof field === "string" ? field : field.id
          )
        ) : allFields
      };
    }, [isBulk]);
    const onChange = (edits) => {
      const currentData = { ...record, ...localEdits };
      if (edits.status && edits.status !== "future" && currentData?.status === "future" && new Date(currentData.date) > /* @__PURE__ */ new Date()) {
        edits.date = null;
      }
      if (edits.status && edits.status === "private" && currentData?.password) {
        edits.password = "";
      }
      setLocalEdits((prev) => ({ ...prev, ...edits }));
    };
    (0, import_element158.useEffect)(() => {
      setLocalEdits({});
    }, [postId]);
    const onSave = async () => {
      for (const id of postId) {
        editEntityRecord("postType", postType2, id, localEdits);
      }
      if (isBulk) {
        await Promise.allSettled(
          postId.map(
            (id) => saveEditedEntityRecord("postType", postType2, id)
          )
        );
      } else {
        await saveEditedEntityRecord("postType", postType2, postId[0]);
      }
      closeModal?.();
    };
    return /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(
      import_components162.Modal,
      {
        overlayClassName: "dataviews-action-modal__quick-edit",
        __experimentalHideHeader: true,
        onRequestClose: closeModal,
        focusOnMount: "firstElement",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime294.jsx)("div", { className: "dataviews-action-modal__quick-edit-header", children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
            PostCardPanel,
            {
              postType: postType2,
              postId,
              onClose: closeModal,
              hideActions: true
            }
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime294.jsx)("div", { className: "dataviews-action-modal__quick-edit-content", children: hasFinishedResolution && /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
            DataForm,
            {
              data: { ...record, ...localEdits },
              fields,
              form,
              onChange
            }
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(import_components162.__experimentalHStack, { className: "dataviews-action-modal__quick-edit-footer", children: [
            /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
              import_components162.Button,
              {
                __next40pxDefaultSize: true,
                variant: "secondary",
                onClick: closeModal,
                children: (0, import_i18n156.__)("Cancel")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
              import_components162.Button,
              {
                __next40pxDefaultSize: true,
                variant: "primary",
                onClick: onSave,
                children: (0, import_i18n156.__)("Done")
              }
            )
          ] })
        ]
      }
    );
  }

  // packages/edit-site/build-module/components/post-list/index.mjs
  var import_jsx_runtime295 = __toESM(require_jsx_runtime(), 1);
  var { usePostActions: usePostActions4, usePostFields: usePostFields3 } = unlock(import_editor40.privateApis);
  var { useLocation: useLocation34, useHistory: useHistory25 } = unlock(import_router40.privateApis);
  var { useEntityRecordsWithPermissions: useEntityRecordsWithPermissions4 } = unlock(import_core_data64.privateApis);
  var EMPTY_ARRAY16 = [];
  var DEFAULT_STATUSES = "draft,future,pending,private,publish";
  function getItemId(item) {
    return item.id.toString();
  }
  function getItemLevel(item) {
    return item.level;
  }
  function PostList({ postType: postType2 }) {
    const { path, query } = useLocation34();
    const { activeView = "all", postId, quickEdit = false } = query;
    const history = useHistory25();
    const defaultView = DEFAULT_VIEW3;
    const activeViewOverrides = (0, import_element159.useMemo)(
      () => getActiveViewOverridesForTab2(activeView),
      [activeView]
    );
    const { view, updateView, isModified, resetToDefault } = useView({
      kind: "postType",
      name: postType2,
      slug: "default",
      defaultView,
      activeViewOverrides,
      queryParams: {
        page: query.pageNumber,
        search: query.search
      },
      onChangeQueryParams: (newQueryParams) => {
        history.navigate(
          (0, import_url27.addQueryArgs)(path, {
            ...query,
            pageNumber: newQueryParams.page,
            search: newQueryParams.search || void 0
          })
        );
      }
    });
    const onChangeView = (0, import_compose34.useEvent)((newView) => {
      updateView(newView);
      if (newView.type !== view.type) {
        history.invalidate();
      }
    });
    const [selection, setSelection] = (0, import_element159.useState)(postId?.split(",") ?? []);
    const onChangeSelection = (0, import_element159.useCallback)(
      (items) => {
        setSelection(items);
        history.navigate(
          (0, import_url27.addQueryArgs)(path, {
            postId: items.join(",")
          })
        );
      },
      [path, history]
    );
    (0, import_element159.useEffect)(() => {
      const newSelection = postId?.split(",") ?? [];
      setSelection(newSelection);
    }, [postId]);
    const fields = usePostFields3({
      postType: postType2
    });
    const queryArgs = (0, import_element159.useMemo)(() => {
      const filters = {};
      view.filters?.forEach((filter) => {
        if (filter.field === "status" && filter.operator === OPERATOR_IS_ANY) {
          filters.status = filter.value;
        }
        if (filter.field === "author" && filter.operator === OPERATOR_IS_ANY) {
          filters.author = filter.value;
        } else if (filter.field === "author" && filter.operator === OPERATOR_IS_NONE) {
          filters.author_exclude = filter.value;
        }
        if (filter.field === "date") {
          if (!filter.value) {
            return;
          }
          if (filter.operator === OPERATOR_BEFORE) {
            filters.before = filter.value;
          } else if (filter.operator === OPERATOR_AFTER) {
            filters.after = filter.value;
          }
        }
      });
      if (!filters.status || filters.status === "") {
        filters.status = DEFAULT_STATUSES;
      }
      return {
        per_page: view.perPage,
        page: view.page,
        _embed: "author,wp:featuredmedia",
        order: view.sort?.direction,
        orderby: view.sort?.field,
        orderby_hierarchy: !!view.showLevels,
        search: view.search,
        ...filters
      };
    }, [view]);
    const {
      records,
      isResolving: isLoadingData,
      totalItems,
      totalPages,
      hasResolved
    } = useEntityRecordsWithPermissions4("postType", postType2, queryArgs);
    const postIds = (0, import_element159.useMemo)(
      () => records?.map((record) => record.id) ?? [],
      [records]
    );
    const { notesCount, isLoading: isLoadingNotesCount } = useNotesCount(postIds);
    const data = (0, import_element159.useMemo)(() => {
      let processedRecords = records;
      if (view?.sort?.field === "author") {
        processedRecords = filterSortAndPaginate(
          records,
          { sort: { ...view.sort } },
          fields
        ).data;
      }
      if (processedRecords) {
        return processedRecords.map((record) => ({
          ...record,
          notesCount: notesCount[record.id] ?? 0
        }));
      }
      return processedRecords;
    }, [records, fields, view?.sort, notesCount]);
    const ids = data?.map((record) => getItemId(record)) ?? [];
    const prevIds = (0, import_compose34.usePrevious)(ids) ?? [];
    const deletedIds = prevIds.filter((id) => !ids.includes(id));
    const postIdWasDeleted = deletedIds.includes(postId);
    (0, import_element159.useEffect)(() => {
      if (postIdWasDeleted) {
        history.navigate(
          (0, import_url27.addQueryArgs)(path, {
            postId: void 0
          })
        );
      }
    }, [history, postIdWasDeleted, path]);
    const paginationInfo = (0, import_element159.useMemo)(
      () => ({
        totalItems,
        totalPages
      }),
      [totalItems, totalPages]
    );
    const { labels, canCreateRecord } = (0, import_data81.useSelect)(
      (select3) => {
        const { getPostType: getPostType2, canUser } = select3(import_core_data64.store);
        return {
          labels: getPostType2(postType2)?.labels,
          canCreateRecord: canUser("create", {
            kind: "postType",
            name: postType2
          })
        };
      },
      [postType2]
    );
    const postTypeActions = usePostActions4({
      postType: postType2,
      context: "list"
    });
    const editAction = useEditPostAction();
    const quickEditAction = useQuickEditPostAction();
    const actions = (0, import_element159.useMemo)(() => {
      if (view.type === LAYOUT_LIST) {
        const editActionPrimary = { ...editAction, isPrimary: true };
        return [editActionPrimary, ...postTypeActions];
      }
      return [editAction, quickEditAction, ...postTypeActions];
    }, [view.type, editAction, quickEditAction, postTypeActions]);
    const [showAddPostModal, setShowAddPostModal] = (0, import_element159.useState)(false);
    const openModal = () => setShowAddPostModal(true);
    const closeModal = () => setShowAddPostModal(false);
    const handleNewPage = ({ type, id }) => {
      history.navigate(`/${type}/${id}?canvas=edit`);
      closeModal();
    };
    const closeQuickEditModal = () => {
      history.navigate(
        (0, import_url27.addQueryArgs)(path, {
          ...query,
          quickEdit: void 0
        })
      );
    };
    return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)(
      page_default2,
      {
        title: labels?.name,
        headingLevel: 2,
        actions: /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(import_jsx_runtime295.Fragment, { children: labels?.add_new_item && canCreateRecord && /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)(import_jsx_runtime295.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
            import_components163.Button,
            {
              variant: "primary",
              onClick: openModal,
              __next40pxDefaultSize: true,
              children: labels.add_new_item
            }
          ),
          showAddPostModal && /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
            AddNewPostModal,
            {
              postType: postType2,
              onSave: handleNewPage,
              onClose: closeModal
            }
          )
        ] }) }),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
            dataviews_default,
            {
              paginationInfo,
              fields,
              actions,
              data: data || EMPTY_ARRAY16,
              isLoading: isLoadingData || isLoadingNotesCount || !hasResolved,
              view,
              onChangeView,
              selection,
              onChangeSelection,
              isItemClickable: (item) => item.status !== "trash",
              onClickItem: ({ id }) => {
                history.navigate(`/${postType2}/${id}?canvas=edit`);
              },
              getItemId,
              getItemLevel,
              defaultLayouts: defaultLayouts3,
              onReset: isModified ? () => {
                resetToDefault();
                history.invalidate();
              } : false
            },
            activeView
          ),
          quickEdit && !isLoadingData && selection.length > 0 && view.type !== LAYOUT_LIST && /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
            QuickEditModal,
            {
              postType: postType2,
              postId: selection,
              closeModal: closeQuickEditModal
            }
          )
        ]
      }
    );
  }

  // packages/edit-site/build-module/components/site-editor-routes/pages.mjs
  var import_jsx_runtime296 = __toESM(require_jsx_runtime(), 1);
  var { useLocation: useLocation35 } = unlock(import_router41.privateApis);
  async function isListView(query) {
    const { activeView = "all" } = query;
    const view = await loadView({
      kind: "postType",
      name: "page",
      slug: "default",
      defaultView: DEFAULT_VIEW3,
      activeViewOverrides: getActiveViewOverridesForTab2(activeView)
    });
    return view.type === "list";
  }
  function MobilePagesView() {
    const { query = {} } = useLocation35();
    const { canvas = "view" } = query;
    return canvas === "edit" ? /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(EditSiteEditor, {}) : /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(PostList, { postType: "page" });
  }
  var pagesRoute = {
    name: "pages",
    path: "/page",
    areas: {
      sidebar({ siteData }) {
        const isBlockTheme = siteData.currentTheme?.is_block_theme;
        return isBlockTheme ? /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
          SidebarNavigationScreen,
          {
            title: (0, import_i18n157.__)("Pages"),
            backPath: "/",
            content: /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(DataViewsSidebarContent, { postType: "page" })
          }
        ) : /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(SidebarNavigationScreenUnsupported, {});
      },
      content({ siteData }) {
        const isBlockTheme = siteData.currentTheme?.is_block_theme;
        return isBlockTheme ? /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(PostList, { postType: "page" }) : void 0;
      },
      async preview({ query, siteData }) {
        const isBlockTheme = siteData.currentTheme?.is_block_theme;
        if (!isBlockTheme) {
          return void 0;
        }
        const isList = await isListView(query);
        return isList ? /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(EditSiteEditor, {}) : void 0;
      },
      mobile({ siteData }) {
        const isBlockTheme = siteData.currentTheme?.is_block_theme;
        return isBlockTheme ? /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(MobilePagesView, {}) : /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(SidebarNavigationScreenUnsupported, {});
      }
    },
    widths: {
      async content({ query }) {
        const isList = await isListView(query);
        return isList ? 380 : void 0;
      }
    }
  };

  // packages/edit-site/build-module/components/site-editor-routes/page-item.mjs
  var import_i18n158 = __toESM(require_i18n(), 1);
  var import_jsx_runtime297 = __toESM(require_jsx_runtime(), 1);
  var pageItemRoute = {
    name: "page-item",
    path: "/page/:postId",
    areas: {
      sidebar({ siteData }) {
        const isBlockTheme = siteData.currentTheme?.is_block_theme;
        return isBlockTheme ? /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
          SidebarNavigationScreen,
          {
            title: (0, import_i18n158.__)("Pages"),
            backPath: "/",
            content: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(DataViewsSidebarContent, { postType: "page" })
          }
        ) : /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(SidebarNavigationScreenUnsupported, {});
      },
      mobile({ siteData }) {
        const isBlockTheme = siteData.currentTheme?.is_block_theme;
        return isBlockTheme ? /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(EditSiteEditor, {}) : /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(SidebarNavigationScreenUnsupported, {});
      },
      preview({ siteData }) {
        const isBlockTheme = siteData.currentTheme?.is_block_theme;
        return isBlockTheme ? /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(EditSiteEditor, {}) : /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(SidebarNavigationScreenUnsupported, {});
      }
    }
  };

  // packages/edit-site/build-module/components/site-editor-routes/attachment-item.mjs
  var import_i18n159 = __toESM(require_i18n(), 1);
  var import_jsx_runtime298 = __toESM(require_jsx_runtime(), 1);
  var attachmentItemRoute = {
    name: "attachment-item",
    path: "/attachment/:postId",
    areas: {
      sidebar: /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
        SidebarNavigationScreen,
        {
          title: (0, import_i18n159.__)("Media"),
          backPath: "/",
          content: null
        }
      ),
      mobile: /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(EditSiteEditor, {}),
      preview: /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(EditSiteEditor, {})
    }
  };

  // packages/edit-site/build-module/components/site-editor-routes/stylebook.mjs
  var import_i18n160 = __toESM(require_i18n(), 1);
  var import_editor44 = __toESM(require_editor(), 1);
  var import_jsx_runtime299 = __toESM(require_jsx_runtime(), 1);
  var { StyleBookPreview: StyleBookPreview2 } = unlock(import_editor44.privateApis);
  var stylebookRoute = {
    name: "stylebook",
    path: "/stylebook",
    areas: {
      sidebar({ siteData }) {
        return isClassicThemeWithStyleBookSupport(siteData) ? /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
          SidebarNavigationScreen,
          {
            title: (0, import_i18n160.__)("Styles"),
            backPath: "/",
            description: (0, import_i18n160.__)(
              `Preview your website's visual identity: colors, typography, and blocks.`
            )
          }
        ) : /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(SidebarNavigationScreenUnsupported, {});
      },
      preview({ siteData }) {
        return isClassicThemeWithStyleBookSupport(siteData) ? /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
          StyleBookPreview2,
          {
            isStatic: true,
            settings: siteData.editorSettings
          }
        ) : void 0;
      },
      mobile({ siteData }) {
        return isClassicThemeWithStyleBookSupport(siteData) ? /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
          StyleBookPreview2,
          {
            isStatic: true,
            settings: siteData.editorSettings
          }
        ) : void 0;
      }
    }
  };

  // packages/edit-site/build-module/components/site-editor-routes/notfound.mjs
  var import_i18n161 = __toESM(require_i18n(), 1);
  var import_components164 = __toESM(require_components(), 1);
  var import_jsx_runtime300 = __toESM(require_jsx_runtime(), 1);
  function NotFoundError() {
    return /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(import_components164.Notice, { status: "error", isDismissible: false, children: (0, import_i18n161.__)(
      "The requested page could not be found. Please check the URL."
    ) });
  }
  var notFoundRoute = {
    name: "notfound",
    path: "*",
    areas: {
      sidebar: /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(SidebarNavigationScreenMain, {}),
      mobile: /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
        SidebarNavigationScreenMain,
        {
          customDescription: /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(NotFoundError, {})
        }
      ),
      content: /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(import_components164.__experimentalSpacer, { padding: 2, children: /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(NotFoundError, {}) })
    }
  };

  // packages/edit-site/build-module/components/site-editor-routes/index.mjs
  var routes2 = [
    ...window?.__experimentalMediaEditor ? [attachmentItemRoute] : [],
    pageItemRoute,
    pagesRoute,
    templateItemRoute,
    templatesRoute,
    templatePartItemRoute,
    patternItemRoute,
    patternsRoute,
    navigationItemRoute,
    navigationRoute,
    stylesRoute,
    homeRoute,
    stylebookRoute,
    notFoundRoute
  ];
  function useRegisterSiteEditorRoutes() {
    const registry = (0, import_data82.useRegistry)();
    const { registerRoute: registerRoute2 } = unlock((0, import_data82.useDispatch)(store));
    (0, import_element160.useEffect)(() => {
      registry.batch(() => {
        routes2.forEach(registerRoute2);
      });
    }, [registry, registerRoute2]);
  }

  // packages/edit-site/build-module/components/app/index.mjs
  var import_jsx_runtime301 = __toESM(require_jsx_runtime(), 1);
  var { RouterProvider } = unlock(import_router42.privateApis);
  function AppLayout() {
    useCommonCommands();
    useSetCommandContext();
    return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(LayoutWithGlobalStylesProvider, {});
  }
  function App() {
    useRegisterSiteEditorRoutes();
    const { routes: routes3, currentTheme, editorSettings } = (0, import_data83.useSelect)((select3) => {
      return {
        routes: unlock(select3(store)).getRoutes(),
        currentTheme: select3(import_core_data65.store).getCurrentTheme(),
        // This is a temp solution until the has_theme_json value is available for the current theme.
        editorSettings: select3(store).getSettings()
      };
    }, []);
    const beforeNavigate = (0, import_element161.useCallback)(({ path, query }) => {
      if (!isPreviewingTheme()) {
        return { path, query };
      }
      return {
        path,
        query: {
          ...query,
          wp_theme_preview: "wp_theme_preview" in query ? query.wp_theme_preview : currentlyPreviewingTheme()
        }
      };
    }, []);
    const matchResolverArgsValue = (0, import_element161.useMemo)(
      () => ({
        siteData: { currentTheme, editorSettings }
      }),
      [currentTheme, editorSettings]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
      RouterProvider,
      {
        routes: routes3,
        pathArg: "p",
        beforeNavigate,
        matchResolverArgs: matchResolverArgsValue,
        children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(AppLayout, {})
      }
    );
  }

  // packages/edit-site/build-module/deprecated.mjs
  var import_editor45 = __toESM(require_editor(), 1);
  var import_url28 = __toESM(require_url(), 1);
  var import_deprecated5 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime302 = __toESM(require_jsx_runtime(), 1);
  var isSiteEditor = (0, import_url28.getPath)(window.location.href)?.includes(
    "site-editor.php"
  );
  var deprecateSlot = (name2) => {
    (0, import_deprecated5.default)(`wp.editPost.${name2}`, {
      since: "6.6",
      alternative: `wp.editor.${name2}`
    });
  };
  function PluginMoreMenuItem(props) {
    if (!isSiteEditor) {
      return null;
    }
    deprecateSlot("PluginMoreMenuItem");
    return /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(import_editor45.PluginMoreMenuItem, { ...props });
  }
  function PluginSidebar(props) {
    if (!isSiteEditor) {
      return null;
    }
    deprecateSlot("PluginSidebar");
    return /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(import_editor45.PluginSidebar, { ...props });
  }
  function PluginSidebarMoreMenuItem(props) {
    if (!isSiteEditor) {
      return null;
    }
    deprecateSlot("PluginSidebarMoreMenuItem");
    return /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(import_editor45.PluginSidebarMoreMenuItem, { ...props });
  }

  // packages/edit-site/build-module/index.mjs
  var import_jsx_runtime303 = __toESM(require_jsx_runtime(), 1);
  var { registerCoreBlockBindingsSources } = unlock(import_editor46.privateApis);
  function initializeEditor(id, settings2) {
    const target = document.getElementById(id);
    const root = (0, import_element162.createRoot)(target);
    (0, import_data84.dispatch)(import_blocks15.store).reapplyBlockTypeFilters();
    const coreBlocks = (0, import_block_library3.__experimentalGetCoreBlocks)().filter(
      ({ name: name2 }) => name2 !== "core/freeform"
    );
    (0, import_block_library3.registerCoreBlocks)(coreBlocks);
    registerCoreBlockBindingsSources();
    (0, import_data84.dispatch)(import_blocks15.store).setFreeformFallbackBlockName("core/html");
    (0, import_widgets.registerLegacyWidgetBlock)({ inserter: false });
    (0, import_widgets.registerWidgetGroupBlock)({ inserter: false });
    if (false) {
      (0, import_block_library3.__experimentalRegisterExperimentalCoreBlocks)({
        enableFSEBlocks: true
      });
    }
    (0, import_data84.dispatch)(import_preferences13.store).setDefaults("core/edit-site", {
      welcomeGuide: true,
      welcomeGuideStyles: true,
      welcomeGuidePage: true,
      welcomeGuideTemplate: true
    });
    (0, import_data84.dispatch)(import_preferences13.store).setDefaults("core", {
      allowRightClickOverrides: true,
      distractionFree: false,
      editorMode: "visual",
      editorTool: "edit",
      fixedToolbar: false,
      focusMode: false,
      inactivePanels: [],
      keepCaretInsideBlock: false,
      openPanels: ["post-status"],
      showBlockBreadcrumbs: true,
      showListViewByDefault: false,
      enableChoosePatternModal: true,
      showCollaborationCursor: false,
      showCollaborationNotifications: true
    });
    if (window.__clientSideMediaProcessing) {
      (0, import_data84.dispatch)(import_preferences13.store).setDefaults("core/media", {
        requireApproval: true,
        optimizeOnUpload: true
      });
    }
    (0, import_data84.dispatch)(store).updateSettings(settings2);
    window.addEventListener("dragover", (e2) => e2.preventDefault(), false);
    window.addEventListener("drop", (e2) => e2.preventDefault(), false);
    root.render(
      /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(import_element162.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(App, {}) })
    );
    return root;
  }
  function reinitializeEditor() {
    (0, import_deprecated6.default)("wp.editSite.reinitializeEditor", {
      since: "6.2",
      version: "6.3"
    });
  }
  return __toCommonJS(index_exports);
})();
/*! Bundled license information:

use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
  (**
   * @license React
   * use-sync-external-store-shim.development.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

is-plain-object/dist/is-plain-object.mjs:
  (*!
   * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
   *
   * Copyright (c) 2014-2017, Jon Schlinkert.
   * Released under the MIT License.
   *)
*/
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                dist/edit-site.min.js                                                                               0000644                 00002530655 15212564012 0010534 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).editSite=(()=>{var iB=Object.create;var bp=Object.defineProperty;var sB=Object.getOwnPropertyDescriptor;var aB=Object.getOwnPropertyNames;var lB=Object.getPrototypeOf,uB=Object.prototype.hasOwnProperty;var Po=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var je=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Lf=(e,t)=>{for(var r in t)bp(e,r,{get:t[r],enumerable:!0})},HC=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of aB(t))!uB.call(e,n)&&n!==r&&bp(e,n,{get:()=>t[n],enumerable:!(o=sB(t,n))||o.enumerable});return e};var a=(e,t,r)=>(r=e!=null?iB(lB(e)):{},HC(t||!e||!e.__esModule?bp(r,"default",{value:e,enumerable:!0}):r,e)),cB=e=>HC(bp({},"__esModule",{value:!0}),e);var Gr=je((gte,UC)=>{UC.exports=window.wp.blocks});var wp=je((vte,WC)=>{WC.exports=window.wp.blockLibrary});var re=je((yte,qC)=>{qC.exports=window.wp.data});var vl=je((bte,YC)=>{YC.exports=window.wp.deprecated});var B=je((wte,ZC)=>{ZC.exports=window.wp.element});var Ke=je((xte,KC)=>{KC.exports=window.wp.editor});var Ao=je((Ste,XC)=>{XC.exports=window.wp.preferences});var JC=je((_te,QC)=>{QC.exports=window.wp.widgets});var he=je((Tte,tT)=>{tT.exports=window.wp.coreData});var yt=je((Ete,rT)=>{rT.exports=window.wp.blockEditor});var j=je((Pte,oT)=>{oT.exports=window.wp.i18n});var xp=je((Ate,nT)=>{nT.exports=window.wp.patterns});var Sp=je((kte,iT)=>{iT.exports=window.wp.privateApis});var Ne=je((Wte,CT)=>{CT.exports=window.wp.router});var M=je((Yte,ET)=>{ET.exports=window.wp.components});var C=je((Zte,PT)=>{PT.exports=window.ReactJSXRuntime});var Je=je((Qte,OT)=>{OT.exports=window.React});var Yb=je((Cre,qT)=>{qT.exports=window.ReactDOM});var ZT=je(YT=>{"use strict";var Hu=Je();function Cj(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tj=typeof Object.is=="function"?Object.is:Cj,Ej=Hu.useState,Pj=Hu.useEffect,Aj=Hu.useLayoutEffect,kj=Hu.useDebugValue;function Rj(e,t){var r=t(),o=Ej({inst:{value:r,getSnapshot:t}}),n=o[0].inst,i=o[1];return Aj(function(){n.value=r,n.getSnapshot=t,Zb(n)&&i({inst:n})},[e,r,t]),Pj(function(){return Zb(n)&&i({inst:n}),e(function(){Zb(n)&&i({inst:n})})},[e]),kj(r),r}function Zb(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Tj(e,r)}catch{return!0}}function Oj(e,t){return t()}var Ij=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Oj:Rj;YT.useSyncExternalStore=Hu.useSyncExternalStore!==void 0?Hu.useSyncExternalStore:Ij});var XT=je((Ere,KT)=>{"use strict";KT.exports=ZT()});var Xb=je((Vre,$T)=>{$T.exports=window.wp.a11y});var me=je((Nre,eE)=>{eE.exports=window.wp.primitives});var Qe=je((fie,tE)=>{tE.exports=window.wp.compose});var uE=je((Aie,lE)=>{lE.exports=window.wp.plugins});var Mn=je((kie,cE)=>{cE.exports=window.wp.notices});var mr=je((Rie,fE)=>{fE.exports=window.wp.htmlEntities});var Wh=je((Oie,dE)=>{dE.exports=window.wp.commands});var Js=je((Iie,mE)=>{mE.exports=window.wp.keycodes});var bt=je((Fie,pE)=>{pE.exports=window.wp.url});var _l=je((Lie,bE)=>{bE.exports=window.wp.dom});var VE=je((Xie,FE)=>{FE.exports=window.wp.keyboardShortcuts});var bg=je((Lse,$P)=>{$P.exports=window.wp.apiFetch});var Dx=je((Oae,RA)=>{RA.exports=window.wp.styleEngine});var kg=je((Hae,LA)=>{"use strict";LA.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;for(n of t.entries())if(!e(n[1],r.get(n[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(t[n]!==r[n])return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),o=i.length,o!==Object.keys(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=o;n--!==0;){var s=i[n];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}});var Rg=je((Wae,jA)=>{"use strict";var F7=function(t){return V7(t)&&!N7(t)};function V7(e){return!!e&&typeof e=="object"}function N7(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||M7(e)}var D7=typeof Symbol=="function"&&Symbol.for,L7=D7?Symbol.for("react.element"):60103;function M7(e){return e.$$typeof===L7}function B7(e){return Array.isArray(e)?[]:{}}function Gd(e,t){return t.clone!==!1&&t.isMergeableObject(e)?uc(B7(e),e,t):e}function j7(e,t,r){return e.concat(t).map(function(o){return Gd(o,r)})}function z7(e,t){if(!t.customMerge)return uc;var r=t.customMerge(e);return typeof r=="function"?r:uc}function G7(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function MA(e){return Object.keys(e).concat(G7(e))}function BA(e,t){try{return t in e}catch{return!1}}function H7(e,t){return BA(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function U7(e,t,r){var o={};return r.isMergeableObject(e)&&MA(e).forEach(function(n){o[n]=Gd(e[n],r)}),MA(t).forEach(function(n){H7(e,n)||(BA(e,n)&&r.isMergeableObject(t[n])?o[n]=z7(n,r)(e[n],t[n],r):o[n]=Gd(t[n],r))}),o}function uc(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||j7,r.isMergeableObject=r.isMergeableObject||F7,r.cloneUnlessOtherwiseSpecified=Gd;var o=Array.isArray(t),n=Array.isArray(e),i=o===n;return i?o?r.arrayMerge(e,t,r):U7(e,t,r):Gd(t,r)}uc.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(o,n){return uc(o,n,r)},{})};var W7=uc;jA.exports=W7});var ba=je((bye,cR)=>{cR.exports=window.wp.date});var wO=je((o1e,bO)=>{bO.exports=window.wp.blob});var C2=je((hAe,Ny)=>{var fF={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u1EA4:"A",\u1EAE:"A",\u1EB2:"A",\u1EB4:"A",\u1EB6:"A",\u00C6:"AE",\u1EA6:"A",\u1EB0:"A",\u0202:"A",\u1EA2:"A",\u1EA0:"A",\u1EA8:"A",\u1EAA:"A",\u1EAC:"A",\u00C7:"C",\u1E08:"C",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u1EBE:"E",\u1E16:"E",\u1EC0:"E",\u1E14:"E",\u1E1C:"E",\u0206:"E",\u1EBA:"E",\u1EBC:"E",\u1EB8:"E",\u1EC2:"E",\u1EC4:"E",\u1EC6:"E",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u1E2E:"I",\u020A:"I",\u1EC8:"I",\u1ECA:"I",\u00D0:"D",\u00D1:"N",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u1ED0:"O",\u1E4C:"O",\u1E52:"O",\u020E:"O",\u1ECE:"O",\u1ECC:"O",\u1ED4:"O",\u1ED6:"O",\u1ED8:"O",\u1EDC:"O",\u1EDE:"O",\u1EE0:"O",\u1EDA:"O",\u1EE2:"O",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u1EE6:"U",\u1EE4:"U",\u1EEC:"U",\u1EEE:"U",\u1EF0:"U",\u00DD:"Y",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u1EA5:"a",\u1EAF:"a",\u1EB3:"a",\u1EB5:"a",\u1EB7:"a",\u00E6:"ae",\u1EA7:"a",\u1EB1:"a",\u0203:"a",\u1EA3:"a",\u1EA1:"a",\u1EA9:"a",\u1EAB:"a",\u1EAD:"a",\u00E7:"c",\u1E09:"c",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u1EBF:"e",\u1E17:"e",\u1EC1:"e",\u1E15:"e",\u1E1D:"e",\u0207:"e",\u1EBB:"e",\u1EBD:"e",\u1EB9:"e",\u1EC3:"e",\u1EC5:"e",\u1EC7:"e",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u1E2F:"i",\u020B:"i",\u1EC9:"i",\u1ECB:"i",\u00F0:"d",\u00F1:"n",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u1ED1:"o",\u1E4D:"o",\u1E53:"o",\u020F:"o",\u1ECF:"o",\u1ECD:"o",\u1ED5:"o",\u1ED7:"o",\u1ED9:"o",\u1EDD:"o",\u1EDF:"o",\u1EE1:"o",\u1EDB:"o",\u1EE3:"o",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u1EE7:"u",\u1EE5:"u",\u1EED:"u",\u1EEF:"u",\u1EF1:"u",\u00FD:"y",\u00FF:"y",\u0100:"A",\u0101:"a",\u0102:"A",\u0103:"a",\u0104:"A",\u0105:"a",\u0106:"C",\u0107:"c",\u0108:"C",\u0109:"c",\u010A:"C",\u010B:"c",\u010C:"C",\u010D:"c",C\u0306:"C",c\u0306:"c",\u010E:"D",\u010F:"d",\u0110:"D",\u0111:"d",\u0112:"E",\u0113:"e",\u0114:"E",\u0115:"e",\u0116:"E",\u0117:"e",\u0118:"E",\u0119:"e",\u011A:"E",\u011B:"e",\u011C:"G",\u01F4:"G",\u011D:"g",\u01F5:"g",\u011E:"G",\u011F:"g",\u0120:"G",\u0121:"g",\u0122:"G",\u0123:"g",\u0124:"H",\u0125:"h",\u0126:"H",\u0127:"h",\u1E2A:"H",\u1E2B:"h",\u0128:"I",\u0129:"i",\u012A:"I",\u012B:"i",\u012C:"I",\u012D:"i",\u012E:"I",\u012F:"i",\u0130:"I",\u0131:"i",\u0132:"IJ",\u0133:"ij",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u1E30:"K",\u1E31:"k",K\u0306:"K",k\u0306:"k",\u0139:"L",\u013A:"l",\u013B:"L",\u013C:"l",\u013D:"L",\u013E:"l",\u013F:"L",\u0140:"l",\u0141:"l",\u0142:"l",\u1E3E:"M",\u1E3F:"m",M\u0306:"M",m\u0306:"m",\u0143:"N",\u0144:"n",\u0145:"N",\u0146:"n",\u0147:"N",\u0148:"n",\u0149:"n",N\u0306:"N",n\u0306:"n",\u014C:"O",\u014D:"o",\u014E:"O",\u014F:"o",\u0150:"O",\u0151:"o",\u0152:"OE",\u0153:"oe",P\u0306:"P",p\u0306:"p",\u0154:"R",\u0155:"r",\u0156:"R",\u0157:"r",\u0158:"R",\u0159:"r",R\u0306:"R",r\u0306:"r",\u0212:"R",\u0213:"r",\u015A:"S",\u015B:"s",\u015C:"S",\u015D:"s",\u015E:"S",\u0218:"S",\u0219:"s",\u015F:"s",\u0160:"S",\u0161:"s",\u0162:"T",\u0163:"t",\u021B:"t",\u021A:"T",\u0164:"T",\u0165:"t",\u0166:"T",\u0167:"t",T\u0306:"T",t\u0306:"t",\u0168:"U",\u0169:"u",\u016A:"U",\u016B:"u",\u016C:"U",\u016D:"u",\u016E:"U",\u016F:"u",\u0170:"U",\u0171:"u",\u0172:"U",\u0173:"u",\u0216:"U",\u0217:"u",V\u0306:"V",v\u0306:"v",\u0174:"W",\u0175:"w",\u1E82:"W",\u1E83:"w",X\u0306:"X",x\u0306:"x",\u0176:"Y",\u0177:"y",\u0178:"Y",Y\u0306:"Y",y\u0306:"y",\u0179:"Z",\u017A:"z",\u017B:"Z",\u017C:"z",\u017D:"Z",\u017E:"z",\u017F:"s",\u0192:"f",\u01A0:"O",\u01A1:"o",\u01AF:"U",\u01B0:"u",\u01CD:"A",\u01CE:"a",\u01CF:"I",\u01D0:"i",\u01D1:"O",\u01D2:"o",\u01D3:"U",\u01D4:"u",\u01D5:"U",\u01D6:"u",\u01D7:"U",\u01D8:"u",\u01D9:"U",\u01DA:"u",\u01DB:"U",\u01DC:"u",\u1EE8:"U",\u1EE9:"u",\u1E78:"U",\u1E79:"u",\u01FA:"A",\u01FB:"a",\u01FC:"AE",\u01FD:"ae",\u01FE:"O",\u01FF:"o",\u00DE:"TH",\u00FE:"th",\u1E54:"P",\u1E55:"p",\u1E64:"S",\u1E65:"s",X\u0301:"X",x\u0301:"x",\u0403:"\u0413",\u0453:"\u0433",\u040C:"\u041A",\u045C:"\u043A",A\u030B:"A",a\u030B:"a",E\u030B:"E",e\u030B:"e",I\u030B:"I",i\u030B:"i",\u01F8:"N",\u01F9:"n",\u1ED2:"O",\u1ED3:"o",\u1E50:"O",\u1E51:"o",\u1EEA:"U",\u1EEB:"u",\u1E80:"W",\u1E81:"w",\u1EF2:"Y",\u1EF3:"y",\u0200:"A",\u0201:"a",\u0204:"E",\u0205:"e",\u0208:"I",\u0209:"i",\u020C:"O",\u020D:"o",\u0210:"R",\u0211:"r",\u0214:"U",\u0215:"u",B\u030C:"B",b\u030C:"b",\u010C\u0323:"C",\u010D\u0323:"c",\u00CA\u030C:"E",\u00EA\u030C:"e",F\u030C:"F",f\u030C:"f",\u01E6:"G",\u01E7:"g",\u021E:"H",\u021F:"h",J\u030C:"J",\u01F0:"j",\u01E8:"K",\u01E9:"k",M\u030C:"M",m\u030C:"m",P\u030C:"P",p\u030C:"p",Q\u030C:"Q",q\u030C:"q",\u0158\u0329:"R",\u0159\u0329:"r",\u1E66:"S",\u1E67:"s",V\u030C:"V",v\u030C:"v",W\u030C:"W",w\u030C:"w",X\u030C:"X",x\u030C:"x",Y\u030C:"Y",y\u030C:"y",A\u0327:"A",a\u0327:"a",B\u0327:"B",b\u0327:"b",\u1E10:"D",\u1E11:"d",\u0228:"E",\u0229:"e",\u0190\u0327:"E",\u025B\u0327:"e",\u1E28:"H",\u1E29:"h",I\u0327:"I",i\u0327:"i",\u0197\u0327:"I",\u0268\u0327:"i",M\u0327:"M",m\u0327:"m",O\u0327:"O",o\u0327:"o",Q\u0327:"Q",q\u0327:"q",U\u0327:"U",u\u0327:"u",X\u0327:"X",x\u0327:"x",Z\u0327:"Z",z\u0327:"z",\u0439:"\u0438",\u0419:"\u0418",\u0451:"\u0435",\u0401:"\u0415"},dF=Object.keys(fF).join("|"),FX=new RegExp(dF,"g"),VX=new RegExp(dF,"");function NX(e){return fF[e]}var mF=function(e){return e.replace(FX,NX)},DX=function(e){return!!e.match(VX)};Ny.exports=mF;Ny.exports.has=DX;Ny.exports.remove=mF});var PV=je((LRe,EV)=>{EV.exports=window.wp.warning});var pte={};Lf(pte,{PluginMoreMenuItem:()=>lte,PluginSidebar:()=>ute,PluginSidebarMoreMenuItem:()=>cte,PluginTemplateSettingPanel:()=>Tv,initializeEditor:()=>dte,reinitializeEditor:()=>mte,store:()=>Re});var LC=a(Gr(),1),Cb=a(wp(),1),Du=a(re(),1),tB=a(vl(),1),Tb=a(B(),1),rB=a(Ke(),1),_b=a(Ao(),1),Eb=a(JC(),1);var Pp=a(re(),1);var $C=a(re(),1);function fB(e={},t){return t.type==="UPDATE_SETTINGS"?{...e,...t.settings}:e}function dB(e={},t){switch(t.type){case"SET_EDITED_POST":return{postType:t.postType,id:t.id,context:t.context};case"SET_EDITED_POST_CONTEXT":return{...e,context:t.context}}return e}function mB(e=!1,t){return t.type==="SET_IS_SAVE_VIEW_OPENED"?t.isOpen:e}function pB(e=[],t){switch(t.type){case"REGISTER_ROUTE":return[...e,t.route];case"UNREGISTER_ROUTE":return e.filter(r=>r.name!==t.name)}return e}var eT=(0,$C.combineReducers)({settings:fB,editedPost:dB,saveViewPanel:mB,routes:pB});var Nb={};Lf(Nb,{__experimentalSetPreviewDeviceType:()=>gB,addTemplate:()=>yB,closeGeneralSidebar:()=>NB,openGeneralSidebar:()=>VB,openNavigationPanelToMenu:()=>PB,removeTemplate:()=>bB,revertTemplate:()=>FB,setEditedEntity:()=>SB,setEditedPostContext:()=>CB,setHasPageContentFocus:()=>LB,setHomeTemplateId:()=>_B,setIsInserterOpened:()=>kB,setIsListViewOpened:()=>RB,setIsNavigationPanelOpened:()=>AB,setIsSaveViewOpened:()=>IB,setNavigationMenu:()=>xB,setNavigationPanelActiveMenu:()=>EB,setPage:()=>TB,setTemplate:()=>vB,setTemplatePart:()=>wB,switchEditorMode:()=>DB,toggleDistractionFree:()=>MB,toggleFeature:()=>hB,updateSettings:()=>OB});var pT=a(Gr(),1),br=a(vl(),1),Vb=a(he(),1),hT=a(yt(),1),li=a(Ke(),1),gT=a(Ao(),1);var Mf=a(j(),1),aT=a(xp(),1);var sT=a(Sp(),1),{lock:Rte,unlock:L}=(0,sT.__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");var Rb="attachment",Fn="wp_navigation",Xe="wp_template",ze="wp_template_part",Ob={custom:"custom",theme:"theme",plugin:"plugin"},ju="uncategorized",zu="all-parts",{PATTERN_TYPES:ke,PATTERN_DEFAULT_CATEGORY:Zo,PATTERN_USER_CATEGORY:_p,EXCLUDED_PATTERN_SOURCES:Cp,PATTERN_SYNC_TYPES:Qi}=L(aT.privateApis),lT=[ze,Fn,ke.user],Ib={[Xe]:(0,Mf.__)("Template"),[ze]:(0,Mf.__)("Template part"),[ke.user]:(0,Mf.__)("Pattern"),[Fn]:(0,Mf.__)("Navigation")},Tp="grid",uT="table",Fb="list",cT="is";var Vn="isAny",fT="isNone",dT="before",mT="after";var{interfaceStore:vT}=L(li.privateApis);function hB(e){return function({registry:t}){(0,br.default)("dispatch( 'core/edit-site' ).toggleFeature( featureName )",{since:"6.0",alternative:"dispatch( 'core/preferences').toggle( 'core/edit-site', featureName )"}),t.dispatch(gT.store).toggle("core/edit-site",e)}}var gB=e=>({registry:t})=>{(0,br.default)("dispatch( 'core/edit-site' ).__experimentalSetPreviewDeviceType",{since:"6.5",version:"6.7",hint:"registry.dispatch( editorStore ).setDeviceType"}),t.dispatch(li.store).setDeviceType(e)};function vB(){return(0,br.default)("dispatch( 'core/edit-site' ).setTemplate",{since:"6.5",version:"6.8",hint:"The setTemplate is not needed anymore, the correct entity is resolved from the URL automatically."}),{type:"NOTHING"}}var yB=e=>async({dispatch:t,registry:r})=>{(0,br.default)("dispatch( 'core/edit-site' ).addTemplate",{since:"6.5",version:"6.8",hint:"use saveEntityRecord directly"});let o=await r.dispatch(Vb.store).saveEntityRecord("postType",Xe,e);e.content&&r.dispatch(Vb.store).editEntityRecord("postType",Xe,o.id,{blocks:(0,pT.parse)(e.content)},{undoIgnore:!0}),t({type:"SET_EDITED_POST",postType:Xe,id:o.id})},bB=e=>({registry:t})=>L(t.dispatch(li.store)).removeTemplates([e]);function wB(e){return(0,br.default)("dispatch( 'core/edit-site' ).setTemplatePart",{since:"6.8"}),{type:"SET_EDITED_POST",postType:ze,id:e}}function xB(e){return(0,br.default)("dispatch( 'core/edit-site' ).setNavigationMenu",{since:"6.8"}),{type:"SET_EDITED_POST",postType:Fn,id:e}}function SB(e,t,r){return{type:"SET_EDITED_POST",postType:e,id:t,context:r}}function _B(){return(0,br.default)("dispatch( 'core/edit-site' ).setHomeTemplateId",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function CB(e){return(0,br.default)("dispatch( 'core/edit-site' ).setEditedPostContext",{since:"6.8"}),{type:"SET_EDITED_POST_CONTEXT",context:e}}function TB(){return(0,br.default)("dispatch( 'core/edit-site' ).setPage",{since:"6.5",version:"6.8",hint:"The setPage is not needed anymore, the correct entity is resolved from the URL automatically."}),{type:"NOTHING"}}function EB(){return(0,br.default)("dispatch( 'core/edit-site' ).setNavigationPanelActiveMenu",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function PB(){return(0,br.default)("dispatch( 'core/edit-site' ).openNavigationPanelToMenu",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function AB(){return(0,br.default)("dispatch( 'core/edit-site' ).setIsNavigationPanelOpened",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}var kB=e=>({registry:t})=>{(0,br.default)("dispatch( 'core/edit-site' ).setIsInserterOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsInserterOpened"}),t.dispatch(li.store).setIsInserterOpened(e)},RB=e=>({registry:t})=>{(0,br.default)("dispatch( 'core/edit-site' ).setIsListViewOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsListViewOpened"}),t.dispatch(li.store).setIsListViewOpened(e)};function OB(e){return{type:"UPDATE_SETTINGS",settings:e}}function IB(e){return{type:"SET_IS_SAVE_VIEW_OPENED",isOpen:e}}var FB=(e,t)=>({registry:r})=>L(r.dispatch(li.store)).revertTemplate(e,t),VB=e=>({registry:t})=>{t.dispatch(vT).enableComplementaryArea("core",e)},NB=()=>({registry:e})=>{e.dispatch(vT).disableComplementaryArea("core")},DB=e=>({registry:t})=>{(0,br.default)("dispatch( 'core/edit-site' ).switchEditorMode",{since:"6.6",alternative:"dispatch( 'core/editor').switchEditorMode"}),t.dispatch(li.store).switchEditorMode(e)},LB=e=>({dispatch:t,registry:r})=>{(0,br.default)("dispatch( 'core/edit-site' ).setHasPageContentFocus",{since:"6.5"}),e&&r.dispatch(hT.store).clearSelectedBlock(),t({type:"SET_HAS_PAGE_CONTENT_FOCUS",hasPageContentFocus:e})},MB=()=>({registry:e})=>{(0,br.default)("dispatch( 'core/edit-site' ).toggleDistractionFree",{since:"6.6",alternative:"dispatch( 'core/editor').toggleDistractionFree"}),e.dispatch(li.store).toggleDistractionFree()};var Db={};Lf(Db,{registerRoute:()=>BB,unregisterRoute:()=>jB});function BB(e){return{type:"REGISTER_ROUTE",route:e}}function jB(e){return{type:"UNREGISTER_ROUTE",name:e}}var Mb={};Lf(Mb,{__experimentalGetInsertionPoint:()=>$B,__experimentalGetPreviewDeviceType:()=>HB,getCanUserCreateMedia:()=>UB,getCurrentTemplateNavigationPanelSubMenu:()=>nj,getCurrentTemplateTemplateParts:()=>rj,getEditedPostContext:()=>XB,getEditedPostId:()=>KB,getEditedPostType:()=>ZB,getEditorMode:()=>oj,getHomeTemplateId:()=>YB,getNavigationPanelActiveMenu:()=>ij,getPage:()=>QB,getReusableBlocks:()=>WB,getSettings:()=>qB,hasPageContentFocus:()=>lj,isFeatureActive:()=>GB,isInserterOpened:()=>JB,isListViewOpened:()=>ej,isNavigationOpened:()=>sj,isPage:()=>aj,isSaveViewOpened:()=>tj});var Ep=a(he(),1),mn=a(re(),1),dr=a(vl(),1),xT=a(B(),1),Lb=a(Ao(),1),Bf=a(Ke(),1),ST=a(yt(),1);var yT=a(Gr(),1),zB=[];function bT(e=zB,t){let r=t?t.reduce((i,s)=>({...i,[s.id]:s}),{}):{},o=[],n=[...e];for(;n.length;){let{innerBlocks:i,...s}=n.shift();if(n.unshift(...i),(0,yT.isTemplatePart)(s)){let{attributes:{theme:l,slug:u}}=s,c=`${l}//${u}`,f=r[c];f&&o.push({templatePart:f,block:s})}}return o}var GB=(0,mn.createRegistrySelector)(e=>(t,r)=>((0,dr.default)("select( 'core/edit-site' ).isFeatureActive",{since:"6.0",alternative:"select( 'core/preferences' ).get"}),!!e(Lb.store).get("core/edit-site",r))),HB=(0,mn.createRegistrySelector)(e=>()=>((0,dr.default)("select( 'core/edit-site' ).__experimentalGetPreviewDeviceType",{since:"6.5",version:"6.7",alternative:"select( 'core/editor' ).getDeviceType"}),e(Bf.store).getDeviceType())),UB=(0,mn.createRegistrySelector)(e=>()=>((0,dr.default)("wp.data.select( 'core/edit-site' ).getCanUserCreateMedia()",{since:"6.7",alternative:"wp.data.select( 'core' ).canUser( 'create', { kind: 'postType', type: 'attachment' } )"}),e(Ep.store).canUser("create","media"))),WB=(0,mn.createRegistrySelector)(e=>()=>((0,dr.default)("select( 'core/edit-site' ).getReusableBlocks()",{since:"6.5",version:"6.8",alternative:"select( 'core/core' ).getEntityRecords( 'postType', 'wp_block' )"}),xT.Platform.OS==="web"?e(Ep.store).getEntityRecords("postType","wp_block",{per_page:-1}):[]));function qB(e){return e.settings}function YB(){(0,dr.default)("select( 'core/edit-site' ).getHomeTemplateId",{since:"6.2",version:"6.4"})}function ZB(e){return(0,dr.default)("select( 'core/edit-site' ).getEditedPostType",{since:"6.8",alternative:"select( 'core/editor' ).getCurrentPostType"}),e.editedPost.postType}function KB(e){return(0,dr.default)("select( 'core/edit-site' ).getEditedPostId",{since:"6.8",alternative:"select( 'core/editor' ).getCurrentPostId"}),e.editedPost.id}function XB(e){return(0,dr.default)("select( 'core/edit-site' ).getEditedPostContext",{since:"6.8"}),e.editedPost.context}function QB(e){return(0,dr.default)("select( 'core/edit-site' ).getPage",{since:"6.8"}),{context:e.editedPost.context}}var JB=(0,mn.createRegistrySelector)(e=>()=>((0,dr.default)("select( 'core/edit-site' ).isInserterOpened",{since:"6.5",alternative:"select( 'core/editor' ).isInserterOpened"}),e(Bf.store).isInserterOpened())),$B=(0,mn.createRegistrySelector)(e=>()=>((0,dr.default)("select( 'core/edit-site' ).__experimentalGetInsertionPoint",{since:"6.5",version:"6.7"}),L(e(Bf.store)).getInserter())),ej=(0,mn.createRegistrySelector)(e=>()=>((0,dr.default)("select( 'core/edit-site' ).isListViewOpened",{since:"6.5",alternative:"select( 'core/editor' ).isListViewOpened"}),e(Bf.store).isListViewOpened()));function tj(e){return e.saveViewPanel}function wT(e){let t=e(Ep.store).getEntityRecords("postType",ze,{per_page:-1}),{getBlocksByName:r,getBlocksByClientId:o}=e(ST.store),n=r("core/template-part");return[o(n),t]}var rj=(0,mn.createRegistrySelector)(e=>(0,mn.createSelector)(()=>((0,dr.default)("select( 'core/edit-site' ).getCurrentTemplateTemplateParts()",{since:"6.7",version:"6.9",alternative:"select( 'core/block-editor' ).getBlocksByName( 'core/template-part' )"}),bT(...wT(e))),()=>wT(e))),oj=(0,mn.createRegistrySelector)(e=>()=>e(Lb.store).get("core","editorMode"));function nj(){(0,dr.default)("dispatch( 'core/edit-site' ).getCurrentTemplateNavigationPanelSubMenu",{since:"6.2",version:"6.4"})}function ij(){(0,dr.default)("dispatch( 'core/edit-site' ).getNavigationPanelActiveMenu",{since:"6.2",version:"6.4"})}function sj(){(0,dr.default)("dispatch( 'core/edit-site' ).isNavigationOpened",{since:"6.2",version:"6.4"})}function aj(e){return(0,dr.default)("select( 'core/edit-site' ).isPage",{since:"6.8",alternative:"select( 'core/editor' ).getCurrentPostType"}),!!e.editedPost.context?.postId}function lj(){return(0,dr.default)("select( 'core/edit-site' ).hasPageContentFocus",{since:"6.5"}),!1}var Bb={};Lf(Bb,{getRoutes:()=>uj});function uj(e){return e.routes}var _T="core/edit-site";var cj={reducer:eT,actions:Nb,selectors:Mb},Re=(0,Pp.createReduxStore)(_T,cj);(0,Pp.register)(Re);L(Re).registerPrivateSelectors(Bb);L(Re).registerPrivateActions(Db);var K8=a(re(),1),X8=a(Ne(),1),xb=a(B(),1),Q8=a(he(),1);function TT(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=TT(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function fj(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=TT(e))&&(o&&(o+=" "),o+=t);return o}var Z=fj;var AT=a(B(),1),kT=a(C(),1),RT=(0,AT.forwardRef)(({children:e,className:t,ariaLabel:r,as:o="div",...n},i)=>(0,kT.jsx)(o,{ref:i,className:Z("admin-ui-navigable-region",t),"aria-label":r,role:"region",tabIndex:"-1",...n,children:e}));RT.displayName="NavigableRegion";var yl=RT;var FT=a(Je(),1),IT={};function jb(e,t){let r=FT.useRef(IT);return r.current===IT&&(r.current=e(t)),r}function zb(e,...t){let r=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(o=>r.searchParams.append("args[]",o)),`Base UI error #${e}; visit ${r} for the full message.`}var Ap=a(Je(),1);function Gb(e,t,r,o){let n=jb(NT).current;return dj(n,e,t,r,o)&&DT(n,[e,t,r,o]),n.callback}function VT(e){let t=jb(NT).current;return mj(t,e)&&DT(t,e),t.callback}function NT(){return{callback:null,cleanup:null,refs:[]}}function dj(e,t,r,o,n){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==o||e.refs[3]!==n}function mj(e,t){return e.refs.length!==t.length||e.refs.some((r,o)=>r!==t[o])}function DT(e,t){if(e.refs=t,t.every(r=>r==null)){e.callback=null;return}e.callback=r=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),r!=null){let o=Array(t.length).fill(null);for(let n=0;n<t.length;n+=1){let i=t[n];if(i!=null)switch(typeof i){case"function":{let s=i(r);typeof s=="function"&&(o[n]=s);break}case"object":{i.current=r;break}default:}}e.cleanup=()=>{for(let n=0;n<t.length;n+=1){let i=t[n];if(i!=null)switch(typeof i){case"function":{let s=o[n];typeof s=="function"?s():i(null);break}case"object":{i.current=null;break}default:}}}}}}var BT=a(Je(),1);var LT=a(Je(),1),pj=parseInt(LT.version,10);function MT(e){return pj>=e}function Hb(e){if(!BT.isValidElement(e))return null;let t=e,r=t.props;return(MT(19)?r?.ref:t.ref)??null}function jf(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function jT(e,t){let r={};for(let o in e){let n=e[o];if(t?.hasOwnProperty(o)){let i=t[o](n);i!=null&&Object.assign(r,i);continue}n===!0?r[`data-${o.toLowerCase()}`]="":n&&(r[`data-${o.toLowerCase()}`]=n.toString())}return r}function zT(e,t){return typeof e=="function"?e(t):e}function GT(e,t){return typeof e=="function"?e(t):e}var Gf={};function Gu(e,t,r,o,n){let i={...Ub(e,Gf)};return t&&(i=zf(i,t)),r&&(i=zf(i,r)),o&&(i=zf(i,o)),n&&(i=zf(i,n)),i}function HT(e){if(e.length===0)return Gf;if(e.length===1)return Ub(e[0],Gf);let t={...Ub(e[0],Gf)};for(let r=1;r<e.length;r+=1)t=zf(t,e[r]);return t}function zf(e,t){return UT(t)?t(e):hj(e,t)}function hj(e,t){if(!t)return e;for(let r in t){let o=t[r];switch(r){case"style":{e[r]=jf(e.style,o);break}case"className":{e[r]=Wb(e.className,o);break}default:gj(r,o)?e[r]=vj(e[r],o):e[r]=o}}return e}function gj(e,t){let r=e.charCodeAt(0),o=e.charCodeAt(1),n=e.charCodeAt(2);return r===111&&o===110&&n>=65&&n<=90&&(typeof t=="function"||typeof t>"u")}function UT(e){return typeof e=="function"}function Ub(e,t){return UT(e)?e(t):e??Gf}function vj(e,t){return t?e?r=>{if(bj(r)){let n=r;yj(n);let i=t(n);return n.baseUIHandlerPrevented||e?.(n),i}let o=t(r);return e?.(r),o}:t:e}function yj(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Wb(e,t){return t?e?t+" "+e:t:e}function bj(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var wj=Object.freeze([]),Xs=Object.freeze({});var qb=a(Je(),1);function WT(e,t,r={}){let o=t.render,n=xj(t,r);if(r.enabled===!1)return null;let i=r.state??Xs;return Sj(e,o,n,i)}function xj(e,t={}){let{className:r,style:o,render:n}=e,{state:i=Xs,ref:s,props:l,stateAttributesMapping:u,enabled:c=!0}=t,f=c?zT(r,i):void 0,m=c?GT(o,i):void 0,d=c?jT(i,u):Xs,h=c?jf(d,Array.isArray(l)?HT(l):l)??Xs:Xs;return typeof document<"u"&&(c?Array.isArray(s)?h.ref=VT([h.ref,Hb(n),...s]):h.ref=Gb(h.ref,Hb(n),s):Gb(null,null)),c?(f!==void 0&&(h.className=Wb(h.className,f)),m!==void 0&&(h.style=jf(h.style,m)),h):Xs}function Sj(e,t,r,o){if(t){if(typeof t=="function")return t(r,o);let n=Gu(r,t.props);return n.ref=r.ref,Ap.cloneElement(t,n)}if(e&&typeof e=="string")return _j(e,r);throw new Error(zb(8))}function _j(e,t){return e==="button"?(0,qb.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,qb.createElement)("img",{alt:"",...t,key:t.key}):Ap.createElement(e,t)}function kp(e){return WT(e.defaultTagName??"div",e,e)}var JT=a(B(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='244b5c59c0']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","244b5c59c0"),e.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-sm,12px);font-weight:var(--wpds-font-weight-regular,400);line-height:var(--wpds-font-line-height-xs,16px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-bg-surface-error,#f6e6e3);color:var(--wpds-color-fg-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-bg-surface-warning,#fde6bd);color:var(--wpds-color-fg-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution,#fee994);color:var(--wpds-color-fg-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success,#c5f7cc);color:var(--wpds-color-fg-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-bg-surface-info,#deebfa);color:var(--wpds-color-fg-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);color:var(--wpds-color-fg-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-bg-surface-neutral,#f8f8f8);color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d)}}')),document.head.appendChild(e)}var QT={badge:"_96e6251aad1a6136__badge","is-high-intent":"_99f7158cb520f750__is-high-intent","is-medium-intent":"c20ebef2365bc8b7__is-medium-intent","is-low-intent":"_365e1626c6202e52__is-low-intent","is-stable-intent":"_33f8198127ddf4ef__is-stable-intent","is-informational-intent":"_04c1aca8fc449412__is-informational-intent","is-draft-intent":"_90726e69d495ec19__is-draft-intent","is-none-intent":"_898f4a544993bd39__is-none-intent"},Kb=(0,JT.forwardRef)(function({children:t,intent:r="none",render:o,className:n,...i},s){return kp({render:o,defaultTagName:"span",ref:s,props:Gu(i,{className:Z(QT.badge,QT[`is-${r}-intent`],n),children:t})})});var Rp=a(B(),1),ui=(0,Rp.forwardRef)(({icon:e,size:t=24,...r},o)=>(0,Rp.cloneElement)(e,{width:t,height:t,...r,ref:o}));var Op=a(me(),1),Qb=a(C(),1),Ji=(0,Qb.jsx)(Op.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Qb.jsx)(Op.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var Ip=a(me(),1),Jb=a(C(),1),$b=(0,Jb.jsx)(Ip.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Jb.jsx)(Ip.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})});var Fp=a(me(),1),e1=a(C(),1),t1=(0,e1.jsx)(Fp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,e1.jsx)(Fp.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var Vp=a(me(),1),r1=a(C(),1),o1=(0,r1.jsx)(Vp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r1.jsx)(Vp.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})});var Np=a(me(),1),n1=a(C(),1),i1=(0,n1.jsx)(Np.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n1.jsx)(Np.Path,{d:"M14 6H6v8h1.5V8.5L17 18l1-1-9.5-9.5H14V6Z"})});var Dp=a(me(),1),s1=a(C(),1),a1=(0,s1.jsx)(Dp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s1.jsx)(Dp.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})});var Lp=a(me(),1),l1=a(C(),1),Hf=(0,l1.jsx)(Lp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l1.jsx)(Lp.Path,{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"})});var Mp=a(me(),1),u1=a(C(),1),$i=(0,u1.jsx)(Mp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,u1.jsx)(Mp.Path,{fillRule:"evenodd",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",clipRule:"evenodd"})});var Bp=a(me(),1),c1=a(C(),1),jp=(0,c1.jsx)(Bp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c1.jsx)(Bp.Path,{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"})});var zp=a(me(),1),f1=a(C(),1),Uf=(0,f1.jsx)(zp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f1.jsx)(zp.Path,{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"})});var Gp=a(me(),1),d1=a(C(),1),Qs=(0,d1.jsx)(Gp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d1.jsx)(Gp.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var Hp=a(me(),1),m1=a(C(),1),bl=(0,m1.jsx)(Hp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,m1.jsx)(Hp.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var Up=a(me(),1),p1=a(C(),1),Wf=(0,p1.jsx)(Up.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,p1.jsx)(Up.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var Wp=a(me(),1),h1=a(C(),1),g1=(0,h1.jsx)(Wp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,h1.jsx)(Wp.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});var qp=a(me(),1),v1=a(C(),1),y1=(0,v1.jsx)(qp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,v1.jsx)(qp.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var Yp=a(me(),1),b1=a(C(),1),w1=(0,b1.jsx)(Yp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,b1.jsx)(Yp.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})});var Zp=a(me(),1),x1=a(C(),1),S1=(0,x1.jsx)(Zp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,x1.jsx)(Zp.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var Kp=a(me(),1),_1=a(C(),1),qf=(0,_1.jsx)(Kp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_1.jsx)(Kp.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var Xp=a(me(),1),C1=a(C(),1),wl=(0,C1.jsx)(Xp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,C1.jsx)(Xp.Path,{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"})});var Qp=a(me(),1),T1=a(C(),1),E1=(0,T1.jsx)(Qp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,T1.jsx)(Qp.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var Jp=a(me(),1),P1=a(C(),1),es=(0,P1.jsx)(Jp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P1.jsx)(Jp.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var $p=a(me(),1),A1=a(C(),1),k1=(0,A1.jsx)($p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,A1.jsx)($p.Path,{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"})});var eh=a(me(),1),R1=a(C(),1),O1=(0,R1.jsx)(eh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,R1.jsx)(eh.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var th=a(me(),1),I1=a(C(),1),F1=(0,I1.jsx)(th.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,I1.jsx)(th.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z"})});var rh=a(me(),1),V1=a(C(),1),N1=(0,V1.jsx)(rh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,V1.jsx)(rh.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M3 7c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Zm2-.5h14c.3 0 .5.2.5.5v1L12 13.5 4.5 7.9V7c0-.3.2-.5.5-.5Zm-.5 3.3V17c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V9.8L12 15.4 4.5 9.8Z"})});var oh=a(me(),1),D1=a(C(),1),xl=(0,D1.jsx)(oh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,D1.jsx)(oh.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z"})});var nh=a(me(),1),L1=a(C(),1),ih=(0,L1.jsx)(nh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,L1.jsx)(nh.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var sh=a(me(),1),M1=a(C(),1),B1=(0,M1.jsx)(sh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,M1.jsx)(sh.Path,{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"})});var ah=a(me(),1),j1=a(C(),1),z1=(0,j1.jsx)(ah.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,j1.jsx)(ah.Path,{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"})});var lh=a(me(),1),G1=a(C(),1),Yf=(0,G1.jsx)(lh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,G1.jsx)(lh.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z"})});var uh=a(me(),1),H1=a(C(),1),U1=(0,H1.jsx)(uh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,H1.jsx)(uh.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm6.5 8c0 .6 0 1.2-.2 1.8h-2.7c0-.6.2-1.1.2-1.8s0-1.2-.2-1.8h2.7c.2.6.2 1.1.2 1.8Zm-.9-3.2h-2.4c-.3-.9-.7-1.8-1.1-2.4-.1-.2-.2-.4-.3-.5 1.6.5 3 1.6 3.8 3ZM12.8 17c-.3.5-.6 1-.8 1.3-.2-.3-.5-.8-.8-1.3-.3-.5-.6-1.1-.8-1.7h3.3c-.2.6-.5 1.2-.8 1.7Zm-2.9-3.2c-.1-.6-.2-1.1-.2-1.8s0-1.2.2-1.8H14c.1.6.2 1.1.2 1.8s0 1.2-.2 1.8H9.9ZM11.2 7c.3-.5.6-1 .8-1.3.2.3.5.8.8 1.3.3.5.6 1.1.8 1.7h-3.3c.2-.6.5-1.2.8-1.7Zm-1-1.2c-.1.2-.2.3-.3.5-.4.7-.8 1.5-1.1 2.4H6.4c.8-1.4 2.2-2.5 3.8-3Zm-1.8 8H5.7c-.2-.6-.2-1.1-.2-1.8s0-1.2.2-1.8h2.7c0 .6-.2 1.1-.2 1.8s0 1.2.2 1.8Zm-2 1.4h2.4c.3.9.7 1.8 1.1 2.4.1.2.2.4.3.5-1.6-.5-3-1.6-3.8-3Zm7.4 3c.1-.2.2-.3.3-.5.4-.7.8-1.5 1.1-2.4h2.4c-.8 1.4-2.2 2.5-3.8 3Z"})});var ch=a(me(),1),W1=a(C(),1),q1=(0,W1.jsx)(ch.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,W1.jsx)(ch.Path,{d:"M12 4a8 8 0 1 1 .001 16.001A8 8 0 0 1 12 4Zm0 1.5a6.5 6.5 0 1 0-.001 13.001A6.5 6.5 0 0 0 12 5.5Zm.75 11h-1.5V15h1.5v1.5Zm-.445-9.234a3 3 0 0 1 .445 5.89V14h-1.5v-1.25c0-.57.452-.958.917-1.01A1.5 1.5 0 0 0 12 8.75a1.5 1.5 0 0 0-1.5 1.5H9a3 3 0 0 1 3.305-2.984Z"})});var fh=a(me(),1),Y1=a(C(),1),Zf=(0,Y1.jsx)(fh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Y1.jsx)(fh.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})});var dh=a(me(),1),Z1=a(C(),1),Nn=(0,Z1.jsx)(dh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Z1.jsx)(dh.Path,{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"})});var mh=a(me(),1),K1=a(C(),1),X1=(0,K1.jsx)(mh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,K1.jsx)(mh.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});var ph=a(me(),1),Q1=a(C(),1),Kf=(0,Q1.jsx)(ph.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Q1.jsx)(ph.Path,{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"})});var Xf=a(me(),1),Qf=a(C(),1),Jf=(0,Qf.jsxs)(Xf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Qf.jsx)(Xf.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,Qf.jsx)(Xf.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})]});var hh=a(me(),1),J1=a(C(),1),$1=(0,J1.jsx)(hh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,J1.jsx)(hh.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"})});var gh=a(me(),1),ew=a(C(),1),Dn=(0,ew.jsx)(gh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ew.jsx)(gh.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var vh=a(me(),1),tw=a(C(),1),$f=(0,tw.jsx)(vh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,tw.jsx)(vh.Path,{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"})});var yh=a(me(),1),rw=a(C(),1),bh=(0,rw.jsx)(yh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rw.jsx)(yh.Path,{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"})});var wh=a(me(),1),ow=a(C(),1),nw=(0,ow.jsx)(wh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ow.jsx)(wh.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var xh=a(me(),1),iw=a(C(),1),ed=(0,iw.jsx)(xh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,iw.jsx)(xh.Path,{d:"M19 5c1.1 0 2 .9 2 2v10c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2zM5 6.5c-.3 0-.5.2-.5.5v10c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V7c0-.3-.2-.5-.5-.5zm7.01 2.75q.711 0 1.24.364.533.364.824 1.012.296.645.296 1.488 0 .887-.296 1.556-.292.664-.824 1.036-.528.368-1.24.368-.708 0-1.24-.368-.527-.372-.824-1.036-.296-.668-.296-1.556 0-.848.296-1.492.296-.648.824-1.008a2.14 2.14 0 0 1 1.24-.364m-3.484 3.6h.72v.832h-.72v1.28h-.984v-1.28H4.75l3.08-4.32h.696zm9.522 0h.72v.832h-.72v1.28h-.983v-1.28h-2.793l3.08-4.32h.696zm-6.038-2.696q-.568 0-.952.48-.384.475-.384 1.48 0 .716.176 1.168.176.45.476.66.304.212.684.212t.68-.208q.304-.207.48-.656.176-.451.176-1.176 0-.996-.384-1.476-.38-.484-.952-.484M6.33 12.85h1.212v-1.722zm9.523 0h1.211v-1.722z"})});var td=a(me(),1),rd=a(C(),1),Sl=(0,rd.jsxs)(td.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,rd.jsx)(td.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,rd.jsx)(td.Path,{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"})]});var Uu=a(me(),1),Wu=a(C(),1),sw=(0,Wu.jsxs)(Uu.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Wu.jsx)(Uu.Path,{d:"M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z"}),(0,Wu.jsx)(Uu.Path,{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"}),(0,Wu.jsx)(Uu.Path,{d:"M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z"})]});var Sh=a(me(),1),aw=a(C(),1),ci=(0,aw.jsx)(Sh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aw.jsx)(Sh.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});var _h=a(me(),1),lw=a(C(),1),uw=(0,lw.jsx)(_h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,lw.jsx)(_h.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var Ch=a(me(),1),cw=a(C(),1),od=(0,cw.jsx)(Ch.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cw.jsx)(Ch.Path,{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"})});var Th=a(me(),1),fw=a(C(),1),dw=(0,fw.jsx)(Th.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fw.jsx)(Th.Path,{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"})});var Eh=a(me(),1),mw=a(C(),1),nd=(0,mw.jsx)(Eh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mw.jsx)(Eh.Path,{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"})});var Ph=a(me(),1),pw=a(C(),1),Ah=(0,pw.jsx)(Ph.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pw.jsx)(Ph.Path,{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"})});var kh=a(me(),1),hw=a(C(),1),id=(0,hw.jsx)(kh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hw.jsx)(kh.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var Rh=a(me(),1),gw=a(C(),1),vw=(0,gw.jsx)(Rh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gw.jsx)(Rh.Path,{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"})});var Oh=a(me(),1),yw=a(C(),1),bw=(0,yw.jsx)(Oh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yw.jsx)(Oh.Path,{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"})});var Ih=a(me(),1),ww=a(C(),1),sd=(0,ww.jsx)(Ih.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ww.jsx)(Ih.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var Fh=a(me(),1),xw=a(C(),1),fi=(0,xw.jsx)(Fh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xw.jsx)(Fh.Path,{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"})});var Vh=a(me(),1),Sw=a(C(),1),ad=(0,Sw.jsx)(Vh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Sw.jsx)(Vh.Path,{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"})});var Nh=a(me(),1),_w=a(C(),1),Dh=(0,_w.jsx)(Nh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_w.jsx)(Nh.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z"})});var Lh=a(me(),1),Cw=a(C(),1),Tw=(0,Cw.jsx)(Lh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Cw.jsx)(Lh.Path,{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"})});var Mh=a(me(),1),Ew=a(C(),1),ld=(0,Ew.jsx)(Mh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ew.jsx)(Mh.Path,{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"})});var Bh=a(me(),1),Pw=a(C(),1),ud=(0,Pw.jsx)(Bh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Pw.jsx)(Bh.Path,{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"})});var jh=a(me(),1),Aw=a(C(),1),kw=(0,Aw.jsx)(jh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Aw.jsx)(jh.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var zh=a(me(),1),Rw=a(C(),1),cd=(0,Rw.jsx)(zh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Rw.jsx)(zh.Path,{d:"M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"})});var Gh=a(me(),1),Ow=a(C(),1),Iw=(0,Ow.jsx)(Gh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ow.jsx)(Gh.Path,{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"})});var Hh=a(me(),1),Fw=a(C(),1),fd=(0,Fw.jsx)(Hh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Fw.jsx)(Hh.Path,{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"})});var Uh=a(me(),1),Vw=a(C(),1),Nw=(0,Vw.jsx)(Uh.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,Vw.jsx)(Uh.Path,{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"})});var rE=a(B(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='71d20935c2']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","71d20935c2"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}")),document.head.appendChild(e)}var Fj={stack:"_19ce0419607e1896__stack"},Vj={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},Q=(0,rE.forwardRef)(function({direction:t,gap:r,align:o,justify:n,wrap:i,render:s,...l},u){let c={gap:r&&Vj[r],alignItems:o,justifyContent:n,flexDirection:t,flexWrap:i};return kp({render:s,ref:u,props:Gu(l,{style:c,className:Fj.stack})})});var oE=a(M(),1),{Fill:nE,Slot:iE}=(0,oE.createSlotFill)("SidebarToggle");var ts=a(C(),1);function sE({headingLevel:e=1,breadcrumbs:t,badges:r,title:o,subTitle:n,actions:i,showSidebarToggle:s=!0}){let l=`h${e}`;return(0,ts.jsxs)(Q,{direction:"column",className:"admin-ui-page__header",children:[(0,ts.jsxs)(Q,{direction:"row",justify:"space-between",gap:"sm",children:[(0,ts.jsxs)(Q,{direction:"row",gap:"sm",align:"center",justify:"start",children:[s&&(0,ts.jsx)(iE,{bubblesVirtually:!0,className:"admin-ui-page__sidebar-toggle-slot"}),o&&(0,ts.jsx)(l,{className:"admin-ui-page__header-title",children:o}),t,r]}),(0,ts.jsx)(Q,{direction:"row",gap:"sm",style:{width:"auto",flexShrink:0},className:"admin-ui-page__header-actions",align:"center",children:i})]}),n&&(0,ts.jsx)("p",{className:"admin-ui-page__header-subtitle",children:n})]})}var dd=a(C(),1);function aE({headingLevel:e,breadcrumbs:t,badges:r,title:o,subTitle:n,children:i,className:s,actions:l,hasPadding:u=!1,showSidebarToggle:c=!0}){let f=Z("admin-ui-page",s);return(0,dd.jsxs)(yl,{className:f,ariaLabel:o,children:[(o||t||r)&&(0,dd.jsx)(sE,{headingLevel:e,breadcrumbs:t,badges:r,title:o,subTitle:n,actions:l,showSidebarToggle:c}),u?(0,dd.jsx)("div",{className:"admin-ui-page__content has-padding",children:i}):i]})}aE.SidebarToggleFill=nE;var Ln=aE;var ca=a(M(),1),fa=a(Qe(),1),Ld=a(j(),1),nc=a(B(),1),Wn=a(Ke(),1),aA=a(Ne(),1),lA=a(uE(),1),Sg=a(Mn(),1),_g=a(re(),1),uA=a(Ao(),1);var qu=a(re(),1),Hr=a(M(),1),$s=a(j(),1),Mw=a(he(),1),Bw=a(mr(),1),ea=a(B(),1);var jw=a(Wh(),1),zw=a(Js(),1),Gw=a(bt(),1),xE=a(Ne(),1);var hE=a(re(),1),gE=a(M(),1),vE=a(j(),1);var yE=a(he(),1),md=a(C(),1);function Nj({className:e}){let{isRequestingSite:t,siteIconUrl:r}=(0,hE.useSelect)(n=>{let{getEntityRecord:i}=n(yE.store),s=i("root","__unstableBase",void 0);return{isRequestingSite:!s,siteIconUrl:s?.site_icon_url}},[]);if(t&&!r)return(0,md.jsx)("div",{className:"edit-site-site-icon__image"});let o=r?(0,md.jsx)("img",{className:"edit-site-site-icon__image",alt:(0,vE.__)("Site Icon"),src:r}):(0,md.jsx)(gE.Icon,{className:"edit-site-site-icon__icon",icon:Nw,size:48});return(0,md.jsx)("div",{className:Z(e,"edit-site-site-icon"),children:o})}var pd=Nj;var Bn=a(B(),1),wE=a(_l(),1),hd=a(C(),1),rs=(0,Bn.createContext)(()=>{});rs.displayName="SidebarNavigationContext";function Dj(e,t,r){let o;if(t==="back"&&r&&(o=e.querySelector(r)),t!==null&&!o){let[n]=wE.focus.tabbable.find(e);o=n??e}o?.focus()}function Lj(){let e={direction:null,focusSelector:null};return{get(){return e},navigate(t,r=null){e={direction:t,focusSelector:t==="forward"&&r?r:e.focusSelector}}}}function Mj({children:e,shouldAnimate:t}){let r=(0,Bn.useContext)(rs),o=(0,Bn.useRef)(),[n,i]=(0,Bn.useState)(null);(0,Bn.useLayoutEffect)(()=>{let{direction:l,focusSelector:u}=r.get();Dj(o.current,l,u),i(l)},[r]);let s=Z("edit-site-sidebar__screen-wrapper",t?{"slide-from-left":n==="back","slide-from-right":n==="forward"}:{});return(0,hd.jsx)("div",{ref:o,className:s,children:e})}function Dw({children:e}){let[t]=(0,Bn.useState)(Lj);return(0,hd.jsx)(rs.Provider,{value:t,children:e})}function Lw({routeKey:e,shouldAnimate:t,children:r}){return(0,hd.jsx)("div",{className:"edit-site-sidebar__content",children:(0,hd.jsx)(Mj,{shouldAnimate:t,children:r},e)})}var jt=a(C(),1),{useLocation:Bj,useHistory:jj}=L(xE.privateApis),zj=(0,ea.memo)((0,ea.forwardRef)(({isTransparent:e},t)=>{let{dashboardLink:r,homeUrl:o,siteTitle:n}=(0,qu.useSelect)(s=>{let{getSettings:l}=L(s(Re)),{getEntityRecord:u}=s(Mw.store),c=u("root","site");return{dashboardLink:l().__experimentalDashboardLink,homeUrl:u("root","__unstableBase")?.home,siteTitle:!c?.title&&c?.url?(0,Gw.filterURLForDisplay)(c?.url):c?.title}},[]),{open:i}=(0,qu.useDispatch)(jw.store);return(0,jt.jsx)("div",{className:"edit-site-site-hub",children:(0,jt.jsxs)(Hr.__experimentalHStack,{justify:"flex-start",spacing:"0",children:[(0,jt.jsx)("div",{className:Z("edit-site-site-hub__view-mode-toggle-container",{"has-transparent-background":e}),children:(0,jt.jsx)(Hr.Button,{__next40pxDefaultSize:!0,ref:t,href:r,label:(0,$s.__)("Go to the Dashboard"),className:"edit-site-layout__view-mode-toggle",style:{transform:"scale(0.5333) translateX(-4px)",borderRadius:4},children:(0,jt.jsx)(pd,{className:"edit-site-layout__view-mode-toggle-icon"})})}),(0,jt.jsxs)(Hr.__experimentalHStack,{children:[(0,jt.jsx)("div",{className:"edit-site-site-hub__title",children:(0,jt.jsxs)(Hr.Button,{__next40pxDefaultSize:!0,variant:"link",href:o,target:"_blank",children:[(0,Bw.decodeEntities)(n),(0,jt.jsx)(Hr.VisuallyHidden,{as:"span",children:(0,$s.__)("(opens in a new tab)")})]})}),(0,jt.jsx)(Hr.__experimentalHStack,{spacing:0,expanded:!1,className:"edit-site-site-hub__actions",children:(0,jt.jsx)(Hr.Button,{size:"compact",className:"edit-site-site-hub_toggle-command-center",icon:fi,onClick:()=>i(),label:(0,$s.__)("Open command palette"),shortcut:zw.displayShortcut.primary("k")})})]})]})})})),SE=zj,_E=(0,ea.memo)((0,ea.forwardRef)(({isTransparent:e},t)=>{let{path:r}=Bj(),o=jj(),{navigate:n}=(0,ea.useContext)(rs),{dashboardLink:i,homeUrl:s,siteTitle:l,isBlockTheme:u,isClassicThemeWithStyleBookSupport:c}=(0,qu.useSelect)(h=>{let{getSettings:g}=L(h(Re)),{getEntityRecord:y,getCurrentTheme:v}=h(Mw.store),b=y("root","site"),w=v(),x=g(),T=w?.theme_supports["editor-styles"],E=x.supportsLayout;return{dashboardLink:x.__experimentalDashboardLink,homeUrl:y("root","__unstableBase")?.home,siteTitle:!b?.title&&b?.url?(0,Gw.filterURLForDisplay)(b?.url):b?.title,isBlockTheme:w?.is_block_theme,isClassicThemeWithStyleBookSupport:!w?.is_block_theme&&(T||E)}},[]),{open:f}=(0,qu.useDispatch)(jw.store),m;r!=="/"&&(u||c?m="/":r!=="/pattern"&&(m="/pattern"));let d={href:m?void 0:i,label:m?(0,$s.__)("Go to Site Editor"):(0,$s.__)("Go to the Dashboard"),onClick:m?()=>{o.navigate(m),n("back")}:void 0};return(0,jt.jsx)("div",{className:"edit-site-site-hub",children:(0,jt.jsxs)(Hr.__experimentalHStack,{justify:"flex-start",spacing:"0",children:[(0,jt.jsx)("div",{className:Z("edit-site-site-hub__view-mode-toggle-container",{"has-transparent-background":e}),children:(0,jt.jsx)(Hr.Button,{__next40pxDefaultSize:!0,ref:t,className:"edit-site-layout__view-mode-toggle",style:{transform:"scale(0.5)",borderRadius:4},...d,children:(0,jt.jsx)(pd,{className:"edit-site-layout__view-mode-toggle-icon"})})}),(0,jt.jsxs)(Hr.__experimentalHStack,{children:[(0,jt.jsx)("div",{className:"edit-site-site-hub__title",children:(0,jt.jsx)(Hr.Button,{__next40pxDefaultSize:!0,variant:"link",href:s,target:"_blank",label:(0,$s.__)("View site (opens in a new tab)"),children:(0,Bw.decodeEntities)(l)})}),(0,jt.jsx)(Hr.__experimentalHStack,{spacing:0,expanded:!1,className:"edit-site-site-hub__actions",children:(0,jt.jsx)(Hr.Button,{__next40pxDefaultSize:!0,className:"edit-site-site-hub_toggle-command-center",icon:fi,onClick:()=>f(),label:(0,$s.__)("Open command palette"),shortcut:zw.displayShortcut.primary("k")})})]})]})})}));var ta=a(B(),1),Cl=a(M(),1),qh=a(Qe(),1),jn=a(j(),1),PE=a(Ne(),1),AE=a(re(),1),kE=a(he(),1);var RE=a(bt(),1),di=a(C(),1),{useLocation:Gj,useHistory:Hj}=L(PE.privateApis),CE={position:void 0,userSelect:void 0,cursor:void 0,width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0},gd=320,Uj=1300,Wj=9/19.5,qj=200,TE={width:"100%",height:"100%"};function EE(e,t){let r=(i,s,l)=>i+(s-i)*l,o=1-Math.max(0,Math.min(1,(e-gd)/(Uj-gd))),n=r(t,Wj,o);return e/n}function OE({isFullWidth:e,isOversized:t,setIsOversized:r,isReady:o,children:n,defaultSize:i,innerContentStyle:s}){let l=Hj(),{path:u,query:c}=Gj(),{canvas:f="view"}=c,m=(0,qh.useReducedMotion)(),[d,h]=(0,ta.useState)(TE),[g,y]=(0,ta.useState)(),[v,b]=(0,ta.useState)(!1),[w,x]=(0,ta.useState)(!1),[T,E]=(0,ta.useState)(1),k={type:"tween",duration:v?0:.5},F=(0,ta.useRef)(null),P=(0,qh.useInstanceId)(OE,"edit-site-resizable-frame-handle-help"),V=i.width/i.height,N=(0,AE.useSelect)(G=>{let{getCurrentTheme:U}=G(kE.store);return U()?.is_block_theme},[]),A=(G,U,ce)=>{y(ce.offsetWidth),b(!0)},S=(G,U,ce,ye)=>{let Te=ye.width/T,Ie=Math.abs(Te),He=ye.width<0?Ie:(i.width-g)/2,pe=Math.min(Ie,He),Se=Ie===0?0:pe/Ie,J=1-Se;E(J+Se*2);let ie=g+ye.width;r(ie>i.width),h({height:t?"100%":EE(ie,V)})},I=(G,U,ce)=>{if(b(!1),!t)return;r(!1),ce.ownerDocument.documentElement.offsetWidth-ce.offsetWidth>qj||!N?h(TE):l.navigate((0,RE.addQueryArgs)(u,{canvas:"edit"}),{transition:"canvas-mode-edit-transition"})},O=G=>{if(!["ArrowLeft","ArrowRight"].includes(G.key))return;G.preventDefault();let ce=20*(G.shiftKey?5:1)*(G.key==="ArrowLeft"?1:-1)*((0,jn.isRTL)()?-1:1),ye=Math.min(Math.max(gd,F.current.resizable.offsetWidth+ce),i.width);h({width:ye,height:EE(ye,V)})},z={default:{flexGrow:0,height:d.height},fullWidth:{flexGrow:1,height:d.height}},R={hidden:{opacity:0,...(0,jn.isRTL)()?{right:0}:{left:0}},visible:{opacity:1,...(0,jn.isRTL)()?{right:-14}:{left:-14}},active:{opacity:1,...(0,jn.isRTL)()?{right:-14}:{left:-14},scaleY:1.3}},D=v?"active":w?"visible":"hidden";return(0,di.jsx)(Cl.ResizableBox,{as:Cl.__unstableMotion.div,ref:F,initial:!1,variants:z,animate:e?"fullWidth":"default",onAnimationComplete:G=>{G==="fullWidth"&&h({width:"100%",height:"100%"})},whileHover:f==="view"&&N?{scale:1.005,transition:{duration:m?0:.5,ease:"easeOut"}}:{},transition:k,size:d,enable:{top:!1,bottom:!1,...(0,jn.isRTL)()?{right:o,left:!1}:{left:o,right:!1},topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},resizeRatio:T,handleClasses:void 0,handleStyles:{left:CE,right:CE},minWidth:gd,maxWidth:e?"100%":"150%",maxHeight:"100%",onFocus:()=>x(!0),onBlur:()=>x(!1),onMouseOver:()=>x(!0),onMouseOut:()=>x(!1),handleComponent:{[(0,jn.isRTL)()?"right":"left"]:f==="view"&&(0,di.jsxs)(di.Fragment,{children:[(0,di.jsx)(Cl.Tooltip,{text:(0,jn.__)("Drag to resize"),children:(0,di.jsx)(Cl.__unstableMotion.button,{role:"separator","aria-orientation":"vertical",className:Z("edit-site-resizable-frame__handle",{"is-resizing":v}),variants:R,animate:D,"aria-label":(0,jn.__)("Drag to resize"),"aria-describedby":P,"aria-valuenow":F.current?.resizable?.offsetWidth||void 0,"aria-valuemin":gd,"aria-valuemax":i.width,onKeyDown:O,initial:"hidden",exit:"hidden",whileFocus:"active",whileHover:"active"},"handle")}),(0,di.jsx)("div",{hidden:!0,id:P,children:(0,jn.__)("Use left and right arrow keys to resize the canvas. Hold shift to resize in larger increments.")})]})},onResizeStart:A,onResize:S,onResizeStop:I,className:Z("edit-site-resizable-frame__inner",{"is-resizing":v}),showHandle:!1,children:(0,di.jsx)("div",{className:"edit-site-resizable-frame__inner-content",style:s,children:n})})}var IE=OE;var DE=a(B(),1),Yh=a(VE(),1),LE=a(j(),1),Tl=a(re(),1),ME=a(he(),1),Hw=a(Ke(),1);var NE="core/edit-site/save";function BE(){let{__experimentalGetDirtyEntityRecords:e,isSavingEntityRecord:t}=(0,Tl.useSelect)(ME.store),{hasNonPostEntityChanges:r,isPostSavingLocked:o}=(0,Tl.useSelect)(Hw.store),{savePost:n}=(0,Tl.useDispatch)(Hw.store),{setIsSaveViewOpened:i}=(0,Tl.useDispatch)(Re),{registerShortcut:s,unregisterShortcut:l}=(0,Tl.useDispatch)(Yh.store);return(0,DE.useEffect)(()=>(s({name:NE,category:"global",description:(0,LE.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),()=>{l(NE)}),[s,l]),(0,Yh.useShortcut)("core/edit-site/save",u=>{u.preventDefault();let c=e(),f=!!c.length,m=c.some(d=>t(d.kind,d.name,d.key));!f||m||(r()?i(!0):o()||n())}),null}var vd=a(B(),1),jE=a(re(),1),zE=a(he(),1),Yj=1e4;function Zh(){let[e,t]=(0,vd.useState)(!1),r=(0,jE.useSelect)(o=>{let n=o(zE.store).hasResolvingSelectors();return!e&&!n},[e]);return(0,vd.useEffect)(()=>{let o;return e||(o=setTimeout(()=>{t(!0)},Yj)),()=>{clearTimeout(o)}},[e]),(0,vd.useEffect)(()=>{if(r){let n=setTimeout(()=>{t(!0)},100);return()=>{clearTimeout(n)}}},[r]),!e}var Ww=bd(),Ae=e=>yd(e,Ww),qw=bd();Ae.write=e=>yd(e,qw);var Kh=bd();Ae.onStart=e=>yd(e,Kh);var Yw=bd();Ae.onFrame=e=>yd(e,Yw);var Zw=bd();Ae.onFinish=e=>yd(e,Zw);var Yu=[];Ae.setTimeout=(e,t)=>{let r=Ae.now()+t,o=()=>{let i=Yu.findIndex(s=>s.cancel==o);~i&&Yu.splice(i,1),oa-=~i?1:0},n={time:r,handler:e,cancel:o};return Yu.splice(GE(r),0,n),oa+=1,HE(),n};var GE=e=>~(~Yu.findIndex(t=>t.time>e)||~Yu.length);Ae.cancel=e=>{Kh.delete(e),Yw.delete(e),Zw.delete(e),Ww.delete(e),qw.delete(e)};Ae.sync=e=>{Uw=!0,Ae.batchedUpdates(e),Uw=!1};Ae.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function o(...n){t=n,Ae.onStart(r)}return o.handler=e,o.cancel=()=>{Kh.delete(r),t=null},o};var Kw=typeof window<"u"?window.requestAnimationFrame:()=>{};Ae.use=e=>Kw=e;Ae.now=typeof performance<"u"?()=>performance.now():Date.now;Ae.batchedUpdates=e=>e();Ae.catch=console.error;Ae.frameLoop="always";Ae.advance=()=>{Ae.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):WE()};var ra=-1,oa=0,Uw=!1;function yd(e,t){Uw?(t.delete(e),e(0)):(t.add(e),HE())}function HE(){ra<0&&(ra=0,Ae.frameLoop!=="demand"&&Kw(UE))}function Zj(){ra=-1}function UE(){~ra&&(Kw(UE),Ae.batchedUpdates(WE))}function WE(){let e=ra;ra=Ae.now();let t=GE(ra);if(t&&(qE(Yu.splice(0,t),r=>r.handler()),oa-=t),!oa){Zj();return}Kh.flush(),Ww.flush(e?Math.min(64,ra-e):16.667),Yw.flush(),qw.flush(),Zw.flush()}function bd(){let e=new Set,t=e;return{add(r){oa+=t==e&&!e.has(r)?1:0,e.add(r)},delete(r){return oa-=t==e&&e.has(r)?1:0,e.delete(r)},flush(r){t.size&&(e=new Set,oa-=t.size,qE(t,o=>o(r)&&e.add(o)),oa+=e.size,t=e)}}}function qE(e,t){e.forEach(r=>{try{t(r)}catch(o){Ae.catch(o)}})}var hn=a(Je());function eg(){}var JE=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),se={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 mi(e,t){if(se.arr(e)){if(!se.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 Tt=(e,t)=>e.forEach(t);function gn(e,t,r){if(se.arr(e)){for(let o=0;o<e.length;o++)t.call(r,e[o],`${o}`);return}for(let o in e)e.hasOwnProperty(o)&&t.call(r,e[o],o)}var ko=e=>se.und(e)?[]:se.arr(e)?e:[e];function Qu(e,t){if(e.size){let r=Array.from(e);e.clear(),Tt(r,t)}}var Ju=(e,...t)=>Qu(e,r=>r(...t)),tx=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),rx,$E,na=null,eP=!1,ox=eg,Kj=e=>{e.to&&($E=e.to),e.now&&(Ae.now=e.now),e.colors!==void 0&&(na=e.colors),e.skipAnimation!=null&&(eP=e.skipAnimation),e.createStringInterpolator&&(rx=e.createStringInterpolator),e.requestAnimationFrame&&Ae.use(e.requestAnimationFrame),e.batchedUpdates&&(Ae.batchedUpdates=e.batchedUpdates),e.willAdvance&&(ox=e.willAdvance),e.frameLoop&&(Ae.frameLoop=e.frameLoop)},Ko=Object.freeze({__proto__:null,get createStringInterpolator(){return rx},get to(){return $E},get colors(){return na},get skipAnimation(){return eP},get willAdvance(){return ox},assign:Kj}),wd=new Set,pn=[],Xw=[],Jh=0,$u={get idle(){return!wd.size&&!pn.length},start(e){Jh>e.priority?(wd.add(e),Ae.onStart(Xj)):(tP(e),Ae($w))},advance:$w,sort(e){if(Jh)Ae.onFrame(()=>$u.sort(e));else{let t=pn.indexOf(e);~t&&(pn.splice(t,1),rP(e))}},clear(){pn=[],wd.clear()}};function Xj(){wd.forEach(tP),wd.clear(),Ae($w)}function tP(e){pn.includes(e)||rP(e)}function rP(e){pn.splice(Qj(pn,t=>t.priority>e.priority),0,e)}function $w(e){let t=Xw;for(let r=0;r<pn.length;r++){let o=pn[r];Jh=o.priority,o.idle||(ox(o),o.advance(e),o.idle||t.push(o))}return Jh=0,Xw=pn,Xw.length=0,pn=t,pn.length>0}function Qj(e,t){let r=e.findIndex(t);return r<0?e.length:r}var oP={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},zn="[-+]?\\d*\\.?\\d+",$h=zn+"%";function tg(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Jj=new RegExp("rgb"+tg(zn,zn,zn)),$j=new RegExp("rgba"+tg(zn,zn,zn,zn)),e9=new RegExp("hsl"+tg(zn,$h,$h)),t9=new RegExp("hsla"+tg(zn,$h,$h,zn)),r9=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,o9=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,n9=/^#([0-9a-fA-F]{6})$/,i9=/^#([0-9a-fA-F]{8})$/;function s9(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=n9.exec(e))?parseInt(t[1]+"ff",16)>>>0:na&&na[e]!==void 0?na[e]:(t=Jj.exec(e))?(Zu(t[1])<<24|Zu(t[2])<<16|Zu(t[3])<<8|255)>>>0:(t=$j.exec(e))?(Zu(t[1])<<24|Zu(t[2])<<16|Zu(t[3])<<8|KE(t[4]))>>>0:(t=r9.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=i9.exec(e))?parseInt(t[1],16)>>>0:(t=o9.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=e9.exec(e))?(YE(ZE(t[1]),Xh(t[2]),Xh(t[3]))|255)>>>0:(t=t9.exec(e))?(YE(ZE(t[1]),Xh(t[2]),Xh(t[3]))|KE(t[4]))>>>0:null}function Qw(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 YE(e,t,r){let o=r<.5?r*(1+t):r+t-r*t,n=2*r-o,i=Qw(n,o,e+1/3),s=Qw(n,o,e),l=Qw(n,o,e-1/3);return Math.round(i*255)<<24|Math.round(s*255)<<16|Math.round(l*255)<<8}function Zu(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function ZE(e){return(parseFloat(e)%360+360)%360/360}function KE(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Xh(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function XE(e){let t=s9(e);if(t===null)return e;t=t||0;let r=(t&4278190080)>>>24,o=(t&16711680)>>>16,n=(t&65280)>>>8,i=(t&255)/255;return`rgba(${r}, ${o}, ${n}, ${i})`}var ia=(e,t,r)=>{if(se.fun(e))return e;if(se.arr(e))return ia({range:e,output:t,extrapolate:r});if(se.str(e.output[0]))return rx(e);let o=e,n=o.output,i=o.range||[0,1],s=o.extrapolateLeft||o.extrapolate||"extend",l=o.extrapolateRight||o.extrapolate||"extend",u=o.easing||(c=>c);return c=>{let f=l9(c,i);return a9(c,i[f],i[f+1],n[f],n[f+1],u,s,l,o.map)}};function a9(e,t,r,o,n,i,s,l,u){let c=u?u(e):e;if(c<t){if(s==="identity")return c;s==="clamp"&&(c=t)}if(c>r){if(l==="identity")return c;l==="clamp"&&(c=r)}return o===n?o:t===r?e<=t?o:n:(t===-1/0?c=-c:r===1/0?c=c-t:c=(c-t)/(r-t),c=i(c),o===-1/0?c=-c:n===1/0?c=c+o:c=c*(n-o)+o,c)}function l9(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}function ex(){return ex=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},ex.apply(this,arguments)}var Ku=Symbol.for("FluidValue.get"),El=Symbol.for("FluidValue.observers"),no=e=>!!(e&&e[Ku]),kr=e=>e&&e[Ku]?e[Ku]():e,nx=e=>e[El]||null;function u9(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Pl(e,t){let r=e[El];r&&r.forEach(o=>{u9(o,t)})}var Xu=class{constructor(t){if(this[Ku]=void 0,this[El]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");c9(this,t)}},c9=(e,t)=>nP(e,Ku,t);function sa(e,t){if(e[Ku]){let r=e[El];r||nP(e,El,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function aa(e,t){let r=e[El];if(r&&r.has(t)){let o=r.size-1;o?r.delete(t):e[El]=null,e.observerRemoved&&e.observerRemoved(o,t)}}var nP=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),Qh=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,f9=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,QE=new RegExp(`(${Qh.source})(%|[a-z]+)`,"i"),d9=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,rg=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,iP=e=>{let[t,r]=m9(e);if(!t||tx())return e;let o=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(o)return o.trim();if(r&&r.startsWith("--")){let n=window.getComputedStyle(document.documentElement).getPropertyValue(r);return n||e}else{if(r&&rg.test(r))return iP(r);if(r)return r}return e},m9=e=>{let t=rg.exec(e);if(!t)return[,];let[,r,o]=t;return[r,o]},Jw,p9=(e,t,r,o,n)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(o)}, ${n})`,og=e=>{Jw||(Jw=na?new RegExp(`(${Object.keys(na).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(i=>kr(i).replace(rg,iP).replace(f9,XE).replace(Jw,XE)),r=t.map(i=>i.match(Qh).map(Number)),n=r[0].map((i,s)=>r.map(l=>{if(!(s in l))throw Error('The arity of each "output" value must be equal');return l[s]})).map(i=>ia(ex({},e,{output:i})));return i=>{var s;let l=!QE.test(t[0])&&((s=t.find(c=>QE.test(c)))==null?void 0:s.replace(Qh,"")),u=0;return t[0].replace(Qh,()=>`${n[u++](i)}${l||""}`).replace(d9,p9)}},sP="react-spring: ",aP=e=>{let t=e,r=!1;if(typeof t!="function")throw new TypeError(`${sP}once requires a function parameter`);return(...o)=>{r||(t(...o),r=!0)}},h9=aP(console.warn);function lP(){h9(`${sP}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var rse=aP(console.warn);function ec(e){return se.str(e)&&(e[0]=="#"||/\d/.test(e)||!tx()&&rg.test(e)||e in(na||{}))}var xd=tx()?hn.useEffect:hn.useLayoutEffect,g9=()=>{let e=(0,hn.useRef)(!1);return xd(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function ix(){let e=(0,hn.useState)()[1],t=g9();return()=>{t.current&&e(Math.random())}}function uP(e,t){let[r]=(0,hn.useState)(()=>({inputs:t,result:e()})),o=(0,hn.useRef)(),n=o.current,i=n;return i?t&&i.inputs&&v9(t,i.inputs)||(i={inputs:t,result:e()}):i=r,(0,hn.useEffect)(()=>{o.current=i,n==r&&(r.inputs=r.result=void 0)},[i]),i.result}function v9(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 sx=e=>(0,hn.useEffect)(e,y9),y9=[];var Od=a(Je()),Id=a(Je());var mP=a(Je()),os=a(Je()),Sd=Symbol.for("Animated:node"),b9=e=>!!e&&e[Sd]===e,Gn=e=>e&&e[Sd],ag=(e,t)=>JE(e,Sd,t),_d=e=>e&&e[Sd]&&e[Sd].getPayload(),ng=class{constructor(){this.payload=void 0,ag(this,this)}getPayload(){return this.payload||[]}},Al=class e extends ng{constructor(t){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=t,se.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new e(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,r){return se.num(t)&&(this.lastPosition=t,r&&(t=Math.round(t/r)*r,this.done&&(this.lastPosition=t))),this._value===t?!1:(this._value=t,!0)}reset(){let{done:t}=this;this.done=!1,se.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},kl=class e extends Al{constructor(t){super(0),this._string=null,this._toString=void 0,this._toString=ia({output:[t,t]})}static create(t){return new e(t)}getValue(){let t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(se.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=ia({output:[this.getValue(),t]})),this._value=0,super.reset()}},ig={dependencies:null},Rl=class extends ng{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){let r={};return gn(this.source,(o,n)=>{b9(o)?r[n]=o.getValue(t):no(o)?r[n]=kr(o):t||(r[n]=o)}),r}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&Tt(this.payload,t=>t.reset())}_makePayload(t){if(t){let r=new Set;return gn(t,this._addToPayload,r),Array.from(r)}}_addToPayload(t){ig.dependencies&&no(t)&&ig.dependencies.add(t);let r=_d(t);r&&Tt(r,o=>this.add(o))}},ax=class e extends Rl{constructor(t){super(t)}static create(t){return new e(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){let r=this.getPayload();return t.length==r.length?r.map((o,n)=>o.setValue(t[n])).some(Boolean):(super.setValue(t.map(w9)),!0)}};function w9(e){return(ec(e)?kl:Al).create(e)}function lg(e){let t=Gn(e);return t?t.constructor:se.arr(e)?ax:ec(e)?kl:Al}function sg(){return sg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},sg.apply(this,arguments)}var cP=(e,t)=>{let r=!se.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,os.forwardRef)((o,n)=>{let i=(0,os.useRef)(null),s=r&&(0,os.useCallback)(g=>{i.current=S9(n,g)},[n]),[l,u]=x9(o,t),c=ix(),f=()=>{let g=i.current;if(r&&!g)return;(g?t.applyAnimatedValues(g,l.getValue(!0)):!1)===!1&&c()},m=new lx(f,u),d=(0,os.useRef)();xd(()=>(d.current=m,Tt(u,g=>sa(g,m)),()=>{d.current&&(Tt(d.current.deps,g=>aa(g,d.current)),Ae.cancel(d.current.update))})),(0,os.useEffect)(f,[]),sx(()=>()=>{let g=d.current;Tt(g.deps,y=>aa(y,g))});let h=t.getComponentProps(l.getValue());return mP.createElement(e,sg({},h,{ref:s}))})},lx=class{constructor(t,r){this.update=t,this.deps=r}eventObserved(t){t.type=="change"&&Ae.write(this.update)}};function x9(e,t){let r=new Set;return ig.dependencies=r,e.style&&(e=sg({},e,{style:t.createAnimatedStyle(e.style)})),e=new Rl(e),ig.dependencies=null,[e,r]}function S9(e,t){return e&&(se.fun(e)?e(t):e.current=t),t}var fP=Symbol.for("AnimatedComponent"),pP=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=n=>new Rl(n),getComponentProps:o=n=>n}={})=>{let n={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:o},i=s=>{let l=dP(s)||"Anonymous";return se.str(s)?s=i[s]||(i[s]=cP(s,n)):s=s[fP]||(s[fP]=cP(s,n)),s.displayName=`Animated(${l})`,s};return gn(e,(s,l)=>{se.arr(e)&&(l=dP(s)),i[l]=i(s)}),{animated:i}},dP=e=>se.str(e)?e:e&&se.str(e.displayName)?e.displayName:se.fun(e)&&e.name||null;function io(){return io=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},io.apply(this,arguments)}function Ol(e,...t){return se.fun(e)?e(...t):e}var Pd=(e,t)=>e===!0||!!(t&&e&&(se.fun(e)?e(t):ko(e).includes(t))),EP=(e,t)=>se.obj(e)?t&&e[t]:e,PP=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,_9=e=>e,AP=(e,t=_9)=>{let r=C9;e.default&&e.default!==!0&&(e=e.default,r=Object.keys(e));let o={};for(let n of r){let i=t(e[n],n);se.und(i)||(o[n]=i)}return o},C9=["config","onProps","onStart","onChange","onPause","onResume","onRest"],T9={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 E9(e){let t={},r=0;if(gn(e,(o,n)=>{T9[n]||(t[n]=o,r++)}),r)return t}function kP(e){let t=E9(e);if(t){let r={to:t};return gn(e,(o,n)=>n in t||(r[n]=o)),r}return io({},e)}function Ad(e){return e=kr(e),se.arr(e)?e.map(Ad):ec(e)?Ko.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function fx(e){return se.fun(e)||se.arr(e)&&se.obj(e[0])}var P9={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}},fg=1.70158,ug=fg*1.525,hP=fg+1,gP=2*Math.PI/3,vP=2*Math.PI/4.5,cg=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,xx={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=>hP*e*e*e-fg*e*e,easeOutBack:e=>1+hP*Math.pow(e-1,3)+fg*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((ug+1)*2*e-ug)/2:(Math.pow(2*e-2,2)*((ug+1)*(e*2-2)+ug)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*gP),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*gP)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*vP))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*vP)/2+1,easeInBounce:e=>1-cg(1-e),easeOutBounce:cg,easeInOutBounce:e=>e<.5?(1-cg(1-2*e))/2:(1+cg(2*e-1))/2},dx=io({},P9.default,{mass:1,damping:1,easing:xx.linear,clamp:!1}),mx=class{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,dx)}};function A9(e,t,r){r&&(r=io({},r),yP(r,t),t=io({},r,t)),yP(e,t),Object.assign(e,t);for(let s in dx)e[s]==null&&(e[s]=dx[s]);let{mass:o,frequency:n,damping:i}=e;return se.und(n)||(n<.01&&(n=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/n,2)*o,e.friction=4*Math.PI*i*o/n),e}function yP(e,t){if(!se.und(t.decay))e.duration=void 0;else{let r=!se.und(t.tension)||!se.und(t.friction);(r||!se.und(t.frequency)||!se.und(t.damping)||!se.und(t.mass))&&(e.duration=void 0,e.decay=void 0),r&&(e.frequency=void 0)}}var bP=[],px=class{constructor(){this.changed=!1,this.values=bP,this.toValues=null,this.fromValues=bP,this.to=void 0,this.from=void 0,this.config=new mx,this.immediate=!1}};function RP(e,{key:t,props:r,defaultProps:o,state:n,actions:i}){return new Promise((s,l)=>{var u;let c,f,m=Pd((u=r.cancel)!=null?u:o?.cancel,t);if(m)g();else{se.und(r.pause)||(n.paused=Pd(r.pause,t));let y=o?.pause;y!==!0&&(y=n.paused||Pd(y,t)),c=Ol(r.delay||0,t),y?(n.resumeQueue.add(h),i.pause()):(i.resume(),h())}function d(){n.resumeQueue.add(h),n.timeouts.delete(f),f.cancel(),c=f.time-Ae.now()}function h(){c>0&&!Ko.skipAnimation?(n.delayed=!0,f=Ae.setTimeout(g,c),n.pauseQueue.add(d),n.timeouts.add(f)):g()}function g(){n.delayed&&(n.delayed=!1),n.pauseQueue.delete(d),n.timeouts.delete(f),e<=(n.cancelId||0)&&(m=!0);try{i.start(io({},r,{callId:e,cancel:m}),s)}catch(y){l(y)}}})}var Sx=(e,t)=>t.length==1?t[0]:t.some(r=>r.cancelled)?tc(e.get()):t.every(r=>r.noop)?OP(e.get()):Hn(e.get(),t.every(r=>r.finished)),OP=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Hn=(e,t,r=!1)=>({value:e,finished:t,cancelled:r}),tc=e=>({value:e,cancelled:!0,finished:!1});function IP(e,t,r,o){let{callId:n,parentId:i,onRest:s}=t,{asyncTo:l,promise:u}=r;return!i&&e===l&&!t.reset?u:r.promise=(async()=>{r.asyncId=n,r.asyncTo=e;let c=AP(t,(v,b)=>b==="onRest"?void 0:v),f,m,d=new Promise((v,b)=>(f=v,m=b)),h=v=>{let b=n<=(r.cancelId||0)&&tc(o)||n!==r.asyncId&&Hn(o,!1);if(b)throw v.result=b,m(v),v},g=(v,b)=>{let w=new dg,x=new mg;return(async()=>{if(Ko.skipAnimation)throw kd(r),x.result=Hn(o,!1),m(x),x;h(w);let T=se.obj(v)?io({},v):io({},b,{to:v});T.parentId=n,gn(c,(k,F)=>{se.und(T[F])&&(T[F]=k)});let E=await o.start(T);return h(w),r.paused&&await new Promise(k=>{r.resumeQueue.add(k)}),E})()},y;if(Ko.skipAnimation)return kd(r),Hn(o,!1);try{let v;se.arr(e)?v=(async b=>{for(let w of b)await g(w)})(e):v=Promise.resolve(e(g,o.stop.bind(o))),await Promise.all([v.then(f),d]),y=Hn(o.get(),!0,!1)}catch(v){if(v instanceof dg)y=v.result;else if(v instanceof mg)y=v.result;else throw v}finally{n==r.asyncId&&(r.asyncId=i,r.asyncTo=i?l:void 0,r.promise=i?u:void 0)}return se.fun(s)&&Ae.batchedUpdates(()=>{s(y,o,o.item)}),y})()}function kd(e,t){Qu(e.timeouts,r=>r.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var dg=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."),this.result=void 0}},mg=class extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}},hx=e=>e instanceof Rd,k9=1,Rd=class extends Xu{constructor(...t){super(...t),this.id=k9++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(t){this._priority!=t&&(this._priority=t,this._onPriorityChange(t))}get(){let t=Gn(this);return t&&t.getValue()}to(...t){return Ko.to(this,t)}interpolate(...t){return lP(),Ko.to(this,t)}toJSON(){return this.get()}observerAdded(t){t==1&&this._attach()}observerRemoved(t){t==0&&this._detach()}_attach(){}_detach(){}_onChange(t,r=!1){Pl(this,{type:"change",parent:this,value:t,idle:r})}_onPriorityChange(t){this.idle||$u.sort(this),Pl(this,{type:"priority",parent:this,priority:t})}},Il=Symbol.for("SpringPhase"),FP=1,gx=2,vx=4,ux=e=>(e[Il]&FP)>0,la=e=>(e[Il]&gx)>0,Cd=e=>(e[Il]&vx)>0,wP=(e,t)=>t?e[Il]|=gx|FP:e[Il]&=~gx,xP=(e,t)=>t?e[Il]|=vx:e[Il]&=~vx,yx=class extends Rd{constructor(t,r){if(super(),this.key=void 0,this.animation=new px,this.queue=void 0,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!se.und(t)||!se.und(r)){let o=se.obj(t)?io({},t):io({},r,{from:t});se.und(o.default)&&(o.default=!0),this.start(o)}}get idle(){return!(la(this)||this._state.asyncTo)||Cd(this)}get goal(){return kr(this.animation.to)}get velocity(){let t=Gn(this);return t instanceof Al?t.lastVelocity||0:t.getPayload().map(r=>r.lastVelocity||0)}get hasAnimated(){return ux(this)}get isAnimating(){return la(this)}get isPaused(){return Cd(this)}get isDelayed(){return this._state.delayed}advance(t){let r=!0,o=!1,n=this.animation,{config:i,toValues:s}=n,l=_d(n.to);!l&&no(n.to)&&(s=ko(kr(n.to))),n.values.forEach((f,m)=>{if(f.done)return;let d=f.constructor==kl?1:l?l[m].lastPosition:s[m],h=n.immediate,g=d;if(!h){if(g=f.lastPosition,i.tension<=0){f.done=!0;return}let y=f.elapsedTime+=t,v=n.fromValues[m],b=f.v0!=null?f.v0:f.v0=se.arr(i.velocity)?i.velocity[m]:i.velocity,w,x=i.precision||(v==d?.005:Math.min(1,Math.abs(d-v)*.001));if(se.und(i.duration))if(i.decay){let T=i.decay===!0?.998:i.decay,E=Math.exp(-(1-T)*y);g=v+b/(1-T)*(1-E),h=Math.abs(f.lastPosition-g)<=x,w=b*E}else{w=f.lastVelocity==null?b:f.lastVelocity;let T=i.restVelocity||x/10,E=i.clamp?0:i.bounce,k=!se.und(E),F=v==d?f.v0>0:v<d,P,V=!1,N=1,A=Math.ceil(t/N);for(let S=0;S<A&&(P=Math.abs(w)>T,!(!P&&(h=Math.abs(d-g)<=x,h)));++S){k&&(V=g==d||g>d==F,V&&(w=-w*E,g=d));let I=-i.tension*1e-6*(g-d),O=-i.friction*.001*w,z=(I+O)/i.mass;w=w+z*N,g=g+w*N}}else{let T=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,f.durationProgress>0&&(f.elapsedTime=i.duration*f.durationProgress,y=f.elapsedTime+=t)),T=(i.progress||0)+y/this._memoizedDuration,T=T>1?1:T<0?0:T,f.durationProgress=T),g=v+i.easing(T)*(d-v),w=(g-f.lastPosition)/t,h=T==1}f.lastVelocity=w,Number.isNaN(g)&&(console.warn("Got NaN while animating:",this),h=!0)}l&&!l[m].done&&(h=!1),h?f.done=!0:r=!1,f.setValue(g,i.round)&&(o=!0)});let u=Gn(this),c=u.getValue();if(r){let f=kr(n.to);(c!==f||o)&&!i.decay?(u.setValue(f),this._onChange(f)):o&&i.decay&&this._onChange(c),this._stop()}else o&&this._onChange(c)}set(t){return Ae.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(la(this)){let{to:t,config:r}=this.animation;Ae.batchedUpdates(()=>{this._onStart(),r.decay||this._set(t,!1),this._stop()})}return this}update(t){return(this.queue||(this.queue=[])).push(t),this}start(t,r){let o;return se.und(t)?(o=this.queue||[],this.queue=[]):o=[se.obj(t)?t:io({},r,{to:t})],Promise.all(o.map(n=>this._update(n))).then(n=>Sx(this,n))}stop(t){let{to:r}=this.animation;return this._focus(this.get()),kd(this._state,t&&this._lastCallId),Ae.batchedUpdates(()=>this._stop(r,t)),this}reset(){this._update({reset:!0})}eventObserved(t){t.type=="change"?this._start():t.type=="priority"&&(this.priority=t.priority+1)}_prepareNode(t){let r=this.key||"",{to:o,from:n}=t;o=se.obj(o)?o[r]:o,(o==null||fx(o))&&(o=void 0),n=se.obj(n)?n[r]:n,n==null&&(n=void 0);let i={to:o,from:n};return ux(this)||(t.reverse&&([o,n]=[n,o]),n=kr(n),se.und(n)?Gn(this)||this._set(o):this._set(n)),i}_update(t,r){let o=io({},t),{key:n,defaultProps:i}=this;o.default&&Object.assign(i,AP(o,(u,c)=>/^on/.test(c)?EP(u,n):u)),_P(this,o,"onProps"),Ed(this,"onProps",o,this);let s=this._prepareNode(o);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 l=this._state;return RP(++this._lastCallId,{key:n,props:o,defaultProps:i,state:l,actions:{pause:()=>{Cd(this)||(xP(this,!0),Ju(l.pauseQueue),Ed(this,"onPause",Hn(this,Td(this,this.animation.to)),this))},resume:()=>{Cd(this)&&(xP(this,!1),la(this)&&this._resume(),Ju(l.resumeQueue),Ed(this,"onResume",Hn(this,Td(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(u=>{if(o.loop&&u.finished&&!(r&&u.noop)){let c=VP(o);if(c)return this._update(c,!0)}return u})}_merge(t,r,o){if(r.cancel)return this.stop(!0),o(tc(this));let n=!se.und(t.to),i=!se.und(t.from);if(n||i)if(r.callId>this._lastToId)this._lastToId=r.callId;else return o(tc(this));let{key:s,defaultProps:l,animation:u}=this,{to:c,from:f}=u,{to:m=c,from:d=f}=t;i&&!n&&(!r.default||se.und(m))&&(m=d),r.reverse&&([m,d]=[d,m]);let h=!mi(d,f);h&&(u.from=d),d=kr(d);let g=!mi(m,c);g&&this._focus(m);let y=fx(r.to),{config:v}=u,{decay:b,velocity:w}=v;(n||i)&&(v.velocity=0),r.config&&!y&&A9(v,Ol(r.config,s),r.config!==l.config?Ol(l.config,s):void 0);let x=Gn(this);if(!x||se.und(m))return o(Hn(this,!0));let T=se.und(r.reset)?i&&!r.default:!se.und(d)&&Pd(r.reset,s),E=T?d:this.get(),k=Ad(m),F=se.num(k)||se.arr(k)||ec(k),P=!y&&(!F||Pd(l.immediate||r.immediate,s));if(g){let S=lg(m);if(S!==x.constructor)if(P)x=this._set(k);else throw Error(`Cannot animate between ${x.constructor.name} and ${S.name}, as the "to" prop suggests`)}let V=x.constructor,N=no(m),A=!1;if(!N){let S=T||!ux(this)&&h;(g||S)&&(A=mi(Ad(E),k),N=!A),(!mi(u.immediate,P)&&!P||!mi(v.decay,b)||!mi(v.velocity,w))&&(N=!0)}if(A&&la(this)&&(u.changed&&!T?N=!0:N||this._stop(c)),!y&&((N||no(c))&&(u.values=x.getPayload(),u.toValues=no(m)?null:V==kl?[1]:ko(k)),u.immediate!=P&&(u.immediate=P,!P&&!T&&this._set(c)),N)){let{onRest:S}=u;Tt(R9,O=>_P(this,r,O));let I=Hn(this,Td(this,c));Ju(this._pendingCalls,I),this._pendingCalls.add(o),u.changed&&Ae.batchedUpdates(()=>{u.changed=!T,S?.(I,this),T?Ol(l.onRest,I):u.onStart==null||u.onStart(I,this)})}T&&this._set(E),y?o(IP(r.to,r,this._state,this)):N?this._start():la(this)&&!g?this._pendingCalls.add(o):o(OP(E))}_focus(t){let r=this.animation;t!==r.to&&(nx(this)&&this._detach(),r.to=t,nx(this)&&this._attach())}_attach(){let t=0,{to:r}=this.animation;no(r)&&(sa(r,this),hx(r)&&(t=r.priority+1)),this.priority=t}_detach(){let{to:t}=this.animation;no(t)&&aa(t,this)}_set(t,r=!0){let o=kr(t);if(!se.und(o)){let n=Gn(this);if(!n||!mi(o,n.getValue())){let i=lg(o);!n||n.constructor!=i?ag(this,i.create(o)):n.setValue(o),n&&Ae.batchedUpdates(()=>{this._onChange(o,r)})}}return Gn(this)}_onStart(){let t=this.animation;t.changed||(t.changed=!0,Ed(this,"onStart",Hn(this,Td(this,t.to)),this))}_onChange(t,r){r||(this._onStart(),Ol(this.animation.onChange,t,this)),Ol(this.defaultProps.onChange,t,this),super._onChange(t,r)}_start(){let t=this.animation;Gn(this).reset(kr(t.to)),t.immediate||(t.fromValues=t.values.map(r=>r.lastPosition)),la(this)||(wP(this,!0),Cd(this)||this._resume())}_resume(){Ko.skipAnimation?this.finish():$u.start(this)}_stop(t,r){if(la(this)){wP(this,!1);let o=this.animation;Tt(o.values,i=>{i.done=!0}),o.toValues&&(o.onChange=o.onPause=o.onResume=void 0),Pl(this,{type:"idle",parent:this});let n=r?tc(this.get()):Hn(this.get(),Td(this,t??o.to));Ju(this._pendingCalls,n),o.changed&&(o.changed=!1,Ed(this,"onRest",n,this))}}};function Td(e,t){let r=Ad(t),o=Ad(e.get());return mi(o,r)}function VP(e,t=e.loop,r=e.to){let o=Ol(t);if(o){let n=o!==!0&&kP(o),i=(n||e).reverse,s=!n||n.reset;return bx(io({},e,{loop:t,default:!1,pause:void 0,to:!i||fx(r)?r:void 0,from:s?e.from:void 0,reset:s},n))}}function bx(e){let{to:t,from:r}=e=kP(e),o=new Set;return se.obj(t)&&SP(t,o),se.obj(r)&&SP(r,o),e.keys=o.size?Array.from(o):null,e}function SP(e,t){gn(e,(r,o)=>r!=null&&t.add(o))}var R9=["onStart","onRest","onChange","onPause","onResume"];function _P(e,t,r){e.animation[r]=t[r]!==PP(t,r)?EP(t[r],e.key):void 0}function Ed(e,t,...r){var o,n,i,s;(o=(n=e.animation)[t])==null||o.call(n,...r),(i=(s=e.defaultProps)[t])==null||i.call(s,...r)}var O9=["onStart","onChange","onRest"],I9=1,pg=class{constructor(t,r){this.id=I9++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),r&&(this._flush=r),t&&this.start(io({default:!0},t))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){let t={};return this.each((r,o)=>t[o]=r.get()),t}set(t){for(let r in t){let o=t[r];se.und(o)||this.springs[r].set(o)}}update(t){return t&&this.queue.push(bx(t)),this}start(t){let{queue:r}=this;return t?r=ko(t).map(bx):this.queue=[],this._flush?this._flush(this,r):(DP(this,r),F9(this,r))}stop(t,r){if(t!==!!t&&(r=t),r){let o=this.springs;Tt(ko(r),n=>o[n].stop(!!t))}else kd(this._state,this._lastAsyncId),this.each(o=>o.stop(!!t));return this}pause(t){if(se.und(t))this.start({pause:!0});else{let r=this.springs;Tt(ko(t),o=>r[o].pause())}return this}resume(t){if(se.und(t))this.start({pause:!1});else{let r=this.springs;Tt(ko(t),o=>r[o].resume())}return this}each(t){gn(this.springs,t)}_onFrame(){let{onStart:t,onChange:r,onRest:o}=this._events,n=this._active.size>0,i=this._changed.size>0;(n&&!this._started||i&&!this._started)&&(this._started=!0,Qu(t,([u,c])=>{c.value=this.get(),u(c,this,this._item)}));let s=!n&&this._started,l=i||s&&o.size?this.get():null;i&&r.size&&Qu(r,([u,c])=>{c.value=l,u(c,this,this._item)}),s&&(this._started=!1,Qu(o,([u,c])=>{c.value=l,u(c,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;Ae.onFrame(this._onFrame)}};function F9(e,t){return Promise.all(t.map(r=>NP(e,r))).then(r=>Sx(e,r))}async function NP(e,t,r){let{keys:o,to:n,from:i,loop:s,onRest:l,onResolve:u}=t,c=se.obj(t.default)&&t.default;s&&(t.loop=!1),n===!1&&(t.to=null),i===!1&&(t.from=null);let f=se.arr(n)||se.fun(n)?n:void 0;f?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Tt(O9,y=>{let v=t[y];if(se.fun(v)){let b=e._events[y];t[y]=({finished:w,cancelled:x})=>{let T=b.get(v);T?(w||(T.finished=!1),x&&(T.cancelled=!0)):b.set(v,{value:null,finished:w||!1,cancelled:x||!1})},c&&(c[y]=t[y])}});let m=e._state;t.pause===!m.paused?(m.paused=t.pause,Ju(t.pause?m.pauseQueue:m.resumeQueue)):m.paused&&(t.pause=!0);let d=(o||Object.keys(e.springs)).map(y=>e.springs[y].start(t)),h=t.cancel===!0||PP(t,"cancel")===!0;(f||h&&m.asyncId)&&d.push(RP(++e._lastAsyncId,{props:t,state:m,actions:{pause:eg,resume:eg,start(y,v){h?(kd(m,e._lastAsyncId),v(tc(e))):(y.onRest=l,v(IP(f,y,m,e)))}}})),m.paused&&await new Promise(y=>{m.resumeQueue.add(y)});let g=Sx(e,await Promise.all(d));if(s&&g.finished&&!(r&&g.noop)){let y=VP(t,s,n);if(y)return DP(e,[y]),NP(e,y,!0)}return u&&Ae.batchedUpdates(()=>u(g,e,e.item)),g}function V9(e,t){let r=new yx;return r.key=e,t&&sa(r,t),r}function N9(e,t,r){t.keys&&Tt(t.keys,o=>{(e[o]||(e[o]=r(o)))._prepareNode(t)})}function DP(e,t){Tt(t,r=>{N9(e.springs,r,o=>V9(o,e))})}function D9(e,t){if(e==null)return{};var r={},o=Object.keys(e),n,i;for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}var L9=["children"],_x=e=>{let{children:t}=e,r=D9(e,L9),o=(0,Id.useContext)(hg),n=r.pause||!!o.pause,i=r.immediate||!!o.immediate;r=uP(()=>({pause:n,immediate:i}),[n,i]);let{Provider:s}=hg;return Od.createElement(s,{value:r},t)},hg=M9(_x,{});_x.Provider=hg.Provider;_x.Consumer=hg.Consumer;function M9(e,t){return Object.assign(e,Od.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var CP;(function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"})(CP||(CP={}));var wx=class extends Rd{constructor(t,r){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=ia(...r);let o=this._get(),n=lg(o);ag(this,n.create(o))}advance(t){let r=this._get(),o=this.get();mi(r,o)||(Gn(this).setValue(r),this._onChange(r,this.idle)),!this.idle&&TP(this._active)&&cx(this)}_get(){let t=se.arr(this.source)?this.source.map(kr):ko(kr(this.source));return this.calc(...t)}_start(){this.idle&&!TP(this._active)&&(this.idle=!1,Tt(_d(this),t=>{t.done=!1}),Ko.skipAnimation?(Ae.batchedUpdates(()=>this.advance()),cx(this)):$u.start(this))}_attach(){let t=1;Tt(ko(this.source),r=>{no(r)&&sa(r,this),hx(r)&&(r.idle||this._active.add(r),t=Math.max(t,r.priority+1))}),this.priority=t,this._start()}_detach(){Tt(ko(this.source),t=>{no(t)&&aa(t,this)}),this._active.clear(),cx(this)}eventObserved(t){t.type=="change"?t.idle?this.advance():(this._active.add(t.parent),this._start()):t.type=="idle"?this._active.delete(t.parent):t.type=="priority"&&(this.priority=ko(this.source).reduce((r,o)=>Math.max(r,(hx(o)?o.priority:0)+1),0))}};function B9(e){return e.idle!==!1}function TP(e){return!e.size||Array.from(e).every(B9)}function cx(e){e.idle||(e.idle=!0,Tt(_d(e),t=>{t.done=!0}),Pl(e,{type:"idle",parent:e}))}Ko.assign({createStringInterpolator:og,to:(e,t)=>new wx(e,t)});var dse=$u.advance;var MP=a(Yb());function Px(e,t){if(e==null)return{};var r={},o=Object.keys(e),n,i;for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}var j9=["style","children","scrollTop","scrollLeft"],BP=/^--/;function z9(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!BP.test(e)&&!(Fd.hasOwnProperty(e)&&Fd[e])?t+"px":(""+t).trim()}var LP={};function G9(e,t){if(!e.nodeType||!e.setAttribute)return!1;let r=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",o=t,{style:n,children:i,scrollTop:s,scrollLeft:l}=o,u=Px(o,j9),c=Object.values(u),f=Object.keys(u).map(m=>r||e.hasAttribute(m)?m:LP[m]||(LP[m]=m.replace(/([A-Z])/g,d=>"-"+d.toLowerCase())));i!==void 0&&(e.textContent=i);for(let m in n)if(n.hasOwnProperty(m)){let d=z9(m,n[m]);BP.test(m)?e.style.setProperty(m,d):e.style[m]=d}f.forEach((m,d)=>{e.setAttribute(m,c[d])}),s!==void 0&&(e.scrollTop=s),l!==void 0&&(e.scrollLeft=l)}var Fd={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},H9=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),U9=["Webkit","Ms","Moz","O"];Fd=Object.keys(Fd).reduce((e,t)=>(U9.forEach(r=>e[H9(r,t)]=e[t]),e),Fd);var W9=["x","y","z"],q9=/^(matrix|translate|scale|rotate|skew)/,Y9=/^(translate)/,Z9=/^(rotate|skew)/,Cx=(e,t)=>se.num(e)&&e!==0?e+t:e,gg=(e,t)=>se.arr(e)?e.every(r=>gg(r,t)):se.num(e)?e===t:parseFloat(e)===t,Tx=class extends Rl{constructor(t){let{x:r,y:o,z:n}=t,i=Px(t,W9),s=[],l=[];(r||o||n)&&(s.push([r||0,o||0,n||0]),l.push(u=>[`translate3d(${u.map(c=>Cx(c,"px")).join(",")})`,gg(u,0)])),gn(i,(u,c)=>{if(c==="transform")s.push([u||""]),l.push(f=>[f,f===""]);else if(q9.test(c)){if(delete i[c],se.und(u))return;let f=Y9.test(c)?"px":Z9.test(c)?"deg":"";s.push(ko(u)),l.push(c==="rotate3d"?([m,d,h,g])=>[`rotate3d(${m},${d},${h},${Cx(g,f)})`,gg(g,0)]:m=>[`${c}(${m.map(d=>Cx(d,f)).join(",")})`,gg(m,c.startsWith("scale")?1:0)])}}),s.length&&(i.transform=new Ex(s,l)),super(i)}},Ex=class extends Xu{constructor(t,r){super(),this._value=null,this.inputs=t,this.transforms=r}get(){return this._value||(this._value=this._get())}_get(){let t="",r=!0;return Tt(this.inputs,(o,n)=>{let i=kr(o[0]),[s,l]=this.transforms[n](se.arr(i)?i:o.map(kr));t+=" "+s,r=r&&l}),r?"none":t}observerAdded(t){t==1&&Tt(this.inputs,r=>Tt(r,o=>no(o)&&sa(o,this)))}observerRemoved(t){t==0&&Tt(this.inputs,r=>Tt(r,o=>no(o)&&aa(o,this)))}eventObserved(t){t.type=="change"&&(this._value=null),Pl(this,t)}},K9=["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"],X9=["scrollTop","scrollLeft"];Ko.assign({batchedUpdates:MP.unstable_batchedUpdates,createStringInterpolator:og,colors:oP});var Q9=pP(K9,{applyAnimatedValues:G9,createAnimatedStyle:e=>new Tx(e),getComponentProps:e=>Px(e,X9)}),wse=Q9.animated;var rc=a(B(),1);function J9(e){return{top:e.offsetTop,left:e.offsetLeft}}var $9=400;function e7({triggerAnimationOnChange:e}){let t=(0,rc.useRef)(),{previous:r,prevRect:o}=(0,rc.useMemo)(()=>({previous:t.current&&J9(t.current),prevRect:t.current&&t.current.getBoundingClientRect()}),[e]);return(0,rc.useLayoutEffect)(()=>{if(!r||!t.current||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let i=new pg({x:0,y:0,width:o.width,height:o.height,config:{duration:$9,easing:xx.easeInOutQuint},onChange({value:m}){if(!t.current)return;let{x:d,y:h,width:g,height:y}=m;d=Math.round(d),h=Math.round(h),g=Math.round(g),y=Math.round(y);let v=d===0&&h===0;t.current.style.transformOrigin="center center",t.current.style.transform=v?null:`translate3d(${d}px,${h}px,0)`,t.current.style.width=v?null:`${g}px`,t.current.style.height=v?null:`${y}px`}});t.current.style.transform=void 0;let s=t.current.getBoundingClientRect(),l=Math.round(o.left-s.left),u=Math.round(o.top-s.top),c=s.width,f=s.height;return i.start({x:0,y:0,width:c,height:f,from:{x:l,y:u,width:o.width,height:o.height}}),()=>{i.stop(),i.set({x:0,y:0,width:o.width,height:o.height})}},[r,o]),t}var jP=e7;var WP=a(re(),1),qP=a(M(),1),YP=a(he(),1);var Vd=a(re(),1),zP=a(M(),1),so=a(j(),1),kx=a(he(),1),GP=a(Js(),1),HP=a(Ne(),1),vg=a(Ke(),1);var Ax=a(bt(),1);function Rr(){return!!(0,Ax.getQueryArg)(window.location.href,"wp_theme_preview")}function ua(){return Rr()?(0,Ax.getQueryArg)(window.location.href,"wp_theme_preview"):null}var UP=a(C(),1),{useLocation:t7}=L(HP.privateApis);function yg({className:e="edit-site-save-button__button",variant:t="primary",showTooltip:r=!0,showReviewMessage:o,icon:n,size:i,__next40pxDefaultSize:s=!1}){let{params:l}=t7(),{setIsSaveViewOpened:u}=(0,Vd.useDispatch)(Re),{saveDirtyEntities:c}=L((0,Vd.useDispatch)(vg.store)),{dirtyEntityRecords:f}=(0,vg.useEntitiesSavedStatesIsDirty)(),{isSaving:m,isSaveViewOpen:d,previewingThemeName:h}=(0,Vd.useSelect)(T=>{let{isSavingEntityRecord:E,isResolving:k}=T(kx.store),{isSaveViewOpened:F}=T(Re),P=k("activateTheme"),V=ua();return{isSaving:f.some(N=>E(N.kind,N.name,N.key))||P,isSaveViewOpen:F(),previewingThemeName:V?T(kx.store).getTheme(V)?.name?.rendered:void 0}},[f]),g=!!f.length,y;f.length===1&&(l.postId?y=`${f[0].key}`===l.postId&&f[0].name===l.postType:l.path?.includes("wp_global_styles")&&(y=f[0].name==="globalStyles"));let v=m||!g&&!Rr(),w=Rr()?m?(0,so.sprintf)((0,so.__)("Activating %s"),h):v?(0,so.__)("Saved"):g?(0,so.sprintf)((0,so.__)("Activate %s & Save"),h):(0,so.sprintf)((0,so.__)("Activate %s"),h):m?(0,so.__)("Saving"):v?(0,so.__)("Saved"):!y&&o?(0,so.sprintf)((0,so._n)("Review %d change\u2026","Review %d changes\u2026",f.length),f.length):(0,so.__)("Save");return(0,UP.jsx)(zP.Button,{variant:t,className:e,"aria-disabled":v,"aria-expanded":d,isBusy:m,onClick:v?void 0:y?()=>c({dirtyEntityRecords:f}):()=>u(!0),label:w,shortcut:v?void 0:GP.displayShortcut.primary("s"),showTooltip:r,icon:n,__next40pxDefaultSize:s,size:i,children:w})}var Rx=a(C(),1);function Ox(){let{isDisabled:e,isSaving:t}=(0,WP.useSelect)(r=>{let{__experimentalGetDirtyEntityRecords:o,isSavingEntityRecord:n}=r(YP.store),i=o(),s=i.some(l=>n(l.kind,l.name,l.key));return{isSaving:s,isDisabled:s||!i.length&&!Rr()}},[]);return(0,Rx.jsx)(qP.__experimentalHStack,{className:"edit-site-save-hub",alignment:"right",spacing:4,children:(0,Rx.jsx)(yg,{className:"edit-site-save-hub__button",variant:e?null:"primary",showTooltip:!1,icon:e&&!t?bl:null,showReviewMessage:!0,__next40pxDefaultSize:!0})})}var xg=a(M(),1),oc=a(Ke(),1),Nd=a(re(),1),Un=a(j(),1),Ix=a(he(),1),nA=a(Ne(),1),iA=a(B(),1);var ZP=a(he(),1),KP=a(re(),1),XP=a(Ne(),1),QP=a(bt(),1);var{useHistory:r7,useLocation:o7}=L(XP.privateApis);function JP(){let e=r7(),{path:t}=o7(),{startResolution:r,finishResolution:o}=(0,KP.useDispatch)(ZP.store);return async()=>{if(Rr()){let n="themes.php?action=activate&stylesheet="+ua()+"&_wpnonce="+window.WP_BLOCK_THEME_ACTIVATE_NONCE;r("activateTheme"),await window.fetch(n),o("activateTheme"),e.navigate((0,QP.addQueryArgs)(t,{wp_theme_preview:""}))}}}var eA=a(bg(),1),wg=a(B(),1),tA=a(bt(),1),n7="/wp/v2/themes?status=active";function rA(){let[e,t]=(0,wg.useState)();return(0,wg.useEffect)(()=>{let r=(0,tA.addQueryArgs)(n7,{context:"edit",wp_theme_preview:""});(0,eA.default)({path:r}).then(o=>t(o[0])).catch(()=>{})},[]),e}var vn=a(C(),1),{EntitiesSavedStatesExtensible:i7}=L(oc.privateApis),{useLocation:s7}=L(nA.privateApis),a7=({onClose:e,renderDialog:t,variant:r})=>{let o=(0,oc.useEntitiesSavedStatesIsDirty)(),n,i;o.isDirty?(n=(0,Un.__)("Activate & Save"),i=(0,Un.__)("Theme activated and site updated.")):(n=(0,Un.__)("Activate"),i=(0,Un.__)("Theme activated."));let s=rA(),l=(0,Nd.useSelect)(m=>m(Ix.store).getCurrentTheme(),[]),u=(0,vn.jsx)("p",{children:(0,Un.sprintf)((0,Un.__)("Saving your changes will change your active theme from %1$s to %2$s."),s?.name?.rendered??"...",l?.name?.rendered??"...")}),c=JP();return(0,vn.jsx)(i7,{...o,additionalPrompt:u,close:e,onSave:async m=>(await c(),m),saveEnabled:!0,saveLabel:n,renderDialog:t,variant:r,successNoticeContent:i})},oA=({onClose:e,renderDialog:t,variant:r})=>Rr()?(0,vn.jsx)(a7,{onClose:e,renderDialog:t,variant:r}):(0,vn.jsx)(oc.EntitiesSavedStates,{close:e,renderDialog:t,variant:r});function Dd(){let{query:e}=s7(),{canvas:t="view"}=e,{isSaveViewOpen:r,isDirty:o,isSaving:n}=(0,Nd.useSelect)(c=>{let{__experimentalGetDirtyEntityRecords:f,isSavingEntityRecord:m,isResolving:d}=c(Ix.store),h=f(),g=d("activateTheme"),{isSaveViewOpened:y}=L(c(Re));return{isSaveViewOpen:y(),isDirty:h.length>0,isSaving:h.some(v=>m(v.kind,v.name,v.key))||g}},[]),{setIsSaveViewOpened:i}=(0,Nd.useDispatch)(Re),s=()=>i(!1);if((0,iA.useEffect)(()=>{i(!1)},[t,i]),t==="view")return r?(0,vn.jsx)(xg.Modal,{className:"edit-site-save-panel__modal",onRequestClose:s,title:(0,Un.__)("Review changes"),size:"small",children:(0,vn.jsx)(oA,{onClose:s,variant:"inline"})}):null;let l=Rr()||o,u=n||!l;return(0,vn.jsxs)(yl,{className:Z("edit-site-layout__actions",{"is-entity-save-view-open":r}),ariaLabel:(0,Un.__)("Save panel"),children:[(0,vn.jsx)("div",{className:Z("edit-site-editor__toggle-save-panel",{"screen-reader-text":r}),children:(0,vn.jsx)(xg.Button,{__next40pxDefaultSize:!0,variant:"secondary",className:"edit-site-editor__toggle-save-panel-button",onClick:()=>i(!0),"aria-haspopup":"dialog",disabled:u,accessibleWhenDisabled:!0,children:(0,Un.__)("Open save panel")})}),r&&(0,vn.jsx)(oA,{onClose:s,renderDialog:!0})]})}var Le=a(C(),1),{useLocation:l7}=L(aA.privateApis),{useStyle:sA}=L(Wn.privateApis),u7=.3;function c7(){let{query:e,name:t,areas:r,widths:o}=l7(),n=t==="notfound"?"view":e?.canvas??"view",i=(0,fa.useViewportMatch)("medium","<"),s=(0,nc.useRef)(),l=(0,ca.__unstableUseNavigateRegions)(),u=(0,fa.useReducedMotion)(),[c,f]=(0,fa.useResizeObserver)(),m=Zh(),[d,h]=(0,nc.useState)(!1),g=jP({triggerAnimationOnChange:t+"-"+n}),{showIconLabels:y}=(0,_g.useSelect)(x=>({showIconLabels:x(uA.store).get("core","showIconLabels")})),v=sA("color.background"),b=sA("color.gradient"),w=(0,fa.usePrevious)(n);return(0,nc.useEffect)(()=>{w==="edit"&&s.current?.focus()},[n]),(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)(Wn.UnsavedChangesWarning,{}),n==="view"&&(0,Le.jsx)(BE,{}),(0,Le.jsx)("div",{...l,ref:l.ref,className:Z("edit-site-layout",l.className,{"is-full-canvas":n==="edit","show-icon-labels":y}),children:(0,Le.jsxs)("div",{className:"edit-site-layout__content",children:[(!i||!r.mobile)&&(0,Le.jsx)(yl,{ariaLabel:(0,Ld.__)("Navigation"),className:"edit-site-layout__sidebar-region",children:(0,Le.jsx)(ca.__unstableAnimatePresence,{children:n==="view"&&(0,Le.jsxs)(ca.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{type:"tween",duration:u||i?0:u7,ease:"easeOut"},className:"edit-site-layout__sidebar",children:[(0,Le.jsx)(SE,{ref:s,isTransparent:d}),(0,Le.jsx)(Dw,{children:(0,Le.jsx)(Lw,{shouldAnimate:t!=="styles",routeKey:t,children:(0,Le.jsx)(Wn.ErrorBoundary,{children:r.sidebar})})}),(0,Le.jsx)(Ox,{}),(0,Le.jsx)(Dd,{})]})})}),(0,Le.jsx)(Sg.SnackbarNotices,{className:"edit-site-layout__snackbar"}),i&&r.mobile&&(0,Le.jsx)("div",{className:"edit-site-layout__mobile",children:(0,Le.jsx)(Dw,{children:n!=="edit"?(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)(_E,{ref:s,isTransparent:d}),(0,Le.jsx)(Lw,{routeKey:t,children:(0,Le.jsx)(Wn.ErrorBoundary,{children:r.mobile})}),(0,Le.jsx)(Ox,{}),(0,Le.jsx)(Dd,{})]}):(0,Le.jsx)(Wn.ErrorBoundary,{children:r.mobile})})}),!i&&r.content&&n!=="edit"&&(0,Le.jsx)("div",{className:"edit-site-layout__area",style:{maxWidth:o?.content},children:(0,Le.jsx)(Wn.ErrorBoundary,{children:r.content})}),!i&&r.edit&&n!=="edit"&&(0,Le.jsx)("div",{className:"edit-site-layout__area",style:{maxWidth:o?.edit},children:(0,Le.jsx)(Wn.ErrorBoundary,{children:r.edit})}),!i&&r.preview&&(0,Le.jsxs)("div",{className:"edit-site-layout__canvas-container",children:[c,!!f.width&&(0,Le.jsx)("div",{className:Z("edit-site-layout__canvas",{"is-right-aligned":d}),ref:g,children:(0,Le.jsx)(Wn.ErrorBoundary,{children:(0,Le.jsx)(IE,{isReady:!m,isFullWidth:n==="edit",defaultSize:{width:f.width-24,height:f.height},isOversized:d,setIsOversized:h,innerContentStyle:{background:b??v},children:r.preview})})})]})]})})]})}function cA(e){let{createErrorNotice:t}=(0,_g.useDispatch)(Sg.store);function r(o){t((0,Ld.sprintf)((0,Ld.__)('The "%s" plugin has encountered an error and cannot be rendered.'),o))}return(0,Le.jsxs)(ca.SlotFillProvider,{children:[(0,Le.jsx)(lA.PluginArea,{onError:r}),(0,Le.jsx)(c7,{...e})]})}var Tg=a(B(),1),da=a(re(),1),ic=a(j(),1);var Cg=a(Wh(),1),fA=a(Ne(),1),dA=a(Ao(),1),Fx=a(he(),1),Eg=a(Ke(),1);var{useHistory:mA,useLocation:pA}=L(fA.privateApis),{useGlobalStyles:f7}=L(Eg.privateApis),d7=()=>function(){let{openGeneralSidebar:t}=L((0,da.useDispatch)(Re)),{params:r}=pA(),{canvas:o="view"}=r,{set:n}=(0,da.useDispatch)(dA.store),i=mA(),s=(0,da.useSelect)(u=>u(Fx.store).getCurrentTheme().is_block_theme,[]);return{isLoading:!1,commands:(0,Tg.useMemo)(()=>s?[{name:"core/edit-site/toggle-styles-welcome-guide",label:(0,ic.__)("Learn about styles"),callback:({close:u})=>{u(),o!=="edit"&&i.navigate("/styles?canvas=edit",{transition:"canvas-mode-edit-transition"}),t("edit-site/global-styles"),n("core/edit-site","welcomeGuideStyles",!0),setTimeout(()=>{n("core/edit-site","welcomeGuideStyles",!0)},500)},icon:q1}]:[],[i,t,o,s,n])}},m7=()=>function(){let{user:t,setUser:r}=f7(),o=!!t&&(Object.keys(t?.styles??{}).length>0||Object.keys(t?.settings??{}).length>0);return{isLoading:!1,commands:(0,Tg.useMemo)(()=>o?[{name:"core/edit-site/reset-global-styles",label:(0,ic.__)("Reset styles"),icon:(0,ic.isRTL)()?bw:vw,callback:({close:i})=>{i(),r({styles:{},settings:{}})}}]:[],[o,r])}},p7=()=>function(){let{openGeneralSidebar:t}=L((0,da.useDispatch)(Re)),{setStylesPath:r}=L((0,da.useDispatch)(Eg.store)),{params:o}=pA(),{canvas:n="view"}=o,i=mA(),s=(0,da.useSelect)(u=>{let{getEntityRecord:c,__experimentalGetCurrentGlobalStylesId:f}=u(Fx.store),m=f();return!!(m?c("root","globalStyles",m):void 0)?._links?.["version-history"]?.[0]?.count},[]);return{isLoading:!1,commands:(0,Tg.useMemo)(()=>s?[{name:"core/edit-site/open-styles-revisions",label:(0,ic.__)("Open style revisions"),icon:Hf,callback:({close:u})=>{u(),n!=="edit"&&i.navigate("/styles?canvas=edit",{transition:"canvas-mode-edit-transition"}),t("edit-site/global-styles"),r("/revisions")}}]:[],[i,t,r,s,n])}};function hA(){(0,Cg.useCommandLoader)({name:"core/edit-site/toggle-styles-welcome-guide",hook:d7()}),(0,Cg.useCommandLoader)({name:"core/edit-site/reset-global-styles",hook:m7()}),(0,Cg.useCommandLoader)({name:"core/edit-site/open-styles-revisions",hook:p7()})}var gA=a(re(),1),vA=a(Wh(),1),yA=a(yt(),1),bA=a(Ne(),1);var{useCommandContext:h7}=L(vA.privateApis),{useLocation:g7}=L(bA.privateApis);function wA(){let{query:e={}}=g7(),{canvas:t="view"}=e,r=(0,gA.useSelect)(n=>n(yA.store).getBlockSelectionStart(),[]),o="site-editor";t==="edit"&&(o="entity-edit"),r&&(o="block-selection-edit"),h7(o)}var bb=a(re(),1),Y8=a(B(),1);var VR=a(M(),1),wi=a(j(),1);var NR=a(re(),1),DR=a(he(),1);var sc=a(M(),1),ma=a(j(),1);var _A=a(he(),1),CA=a(re(),1),TA=a(Ne(),1),EA=a(B(),1);var xA=a(M(),1),SA=a(C(),1);function Vx(e){return(0,SA.jsx)(xA.Button,{size:"compact",...e,className:Z("edit-site-sidebar-button",e.className)})}var Ro=a(C(),1),{useHistory:v7,useLocation:y7}=L(TA.privateApis);function wr({isRoot:e,title:t,actions:r,content:o,footer:n,description:i,backPath:s}){let{dashboardLink:l,dashboardLinkText:u,previewingThemeName:c}=(0,CA.useSelect)(y=>{let{getSettings:v}=L(y(Re)),b=ua();return{dashboardLink:v().__experimentalDashboardLink,dashboardLinkText:v().__experimentalDashboardLinkText,previewingThemeName:b?y(_A.store).getTheme(b)?.name?.rendered:void 0}},[]),f=y7(),m=v7(),{navigate:d}=(0,EA.useContext)(rs),h=s??f.state?.backPath,g=(0,ma.isRTL)()?S1:y1;return(0,Ro.jsxs)(Ro.Fragment,{children:[(0,Ro.jsxs)(sc.__experimentalVStack,{className:Z("edit-site-sidebar-navigation-screen__main",{"has-footer":!!n}),spacing:0,justify:"flex-start",children:[(0,Ro.jsxs)(sc.__experimentalHStack,{spacing:3,alignment:"flex-start",className:"edit-site-sidebar-navigation-screen__title-icon",children:[!e&&(0,Ro.jsx)(Vx,{onClick:()=>{m.navigate(h),d("back")},icon:g,label:(0,ma.__)("Back"),showTooltip:!1}),e&&(0,Ro.jsx)(Vx,{icon:g,label:u||(0,ma.__)("Go to the Dashboard"),href:l}),(0,Ro.jsx)(sc.__experimentalHeading,{className:"edit-site-sidebar-navigation-screen__title",color:"#e0e0e0",level:1,size:20,children:Rr()?(0,ma.sprintf)((0,ma.__)("Previewing %1$s: %2$s"),c,t):t}),r&&(0,Ro.jsx)("div",{className:"edit-site-sidebar-navigation-screen__actions",children:r})]}),(0,Ro.jsxs)("div",{className:"edit-site-sidebar-navigation-screen__content",children:[i&&(0,Ro.jsx)("div",{className:"edit-site-sidebar-navigation-screen__description",children:i}),o]})]}),n&&(0,Ro.jsx)("footer",{className:"edit-site-sidebar-navigation-screen__footer",children:n})]})}var ac=a(M(),1),PA=a(j(),1);var AA=a(Ne(),1),kA=a(B(),1);var Fl=a(C(),1),{useHistory:b7,useLink:w7}=L(AA.privateApis);function zt({className:e,icon:t,withChevron:r=!1,suffix:o,uid:n,to:i,onClick:s,children:l,...u}){let c=b7(),{navigate:f}=(0,kA.useContext)(rs);function m(h){s?(s(h),f("forward")):i&&(h.preventDefault(),c.navigate(i),f("forward",`[id="${n}"]`))}let d=w7(i);return(0,Fl.jsx)(ac.__experimentalItem,{className:Z("edit-site-sidebar-navigation-item",{"with-suffix":!r&&o},e),id:n,onClick:m,href:i?d.href:void 0,...u,children:(0,Fl.jsxs)(ac.__experimentalHStack,{justify:"flex-start",children:[t&&(0,Fl.jsx)(ui,{style:{fill:"currentcolor"},icon:t,size:24}),(0,Fl.jsx)(ac.FlexBlock,{children:l}),r&&(0,Fl.jsx)(ui,{icon:(0,PA.isRTL)()?g1:w1,className:"edit-site-sidebar-navigation-item__drilldown-indicator",size:24}),!r&&o]})})}var KS=a(j(),1),fv=a(re(),1),XS=a(B(),1),PR=a(Ao(),1),AR=a(Ke(),1),kR=a(Ne(),1),RR=a(bt(),1);var SR=a(M(),1),_R=a(Gr(),1),aY=a(re(),1),lY=a(yt(),1),WS=a(B(),1),uY=a(Qe(),1);function pa(e,t,r){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};let o=t.pop(),n=e;for(let i of t){let s=n[i];n=n[i]=Array.isArray(s)?[...s]:{...s}}return n[o]=r,e}var ft=(e,t,r)=>{let o=Array.isArray(t)?t:t.split("."),n=e;return o.forEach(i=>{n=n?.[i]}),n??r};var x7=["appearanceTools","useRootPaddingAwareAlignments","background.backgroundImage","background.backgroundRepeat","background.backgroundSize","background.backgroundPosition","border.color","border.radius","border.radiusSizes","border.style","border.width","shadow.presets","shadow.defaultPresets","color.background","color.button","color.caption","color.custom","color.customDuotone","color.customGradient","color.defaultDuotone","color.defaultGradients","color.defaultPalette","color.duotone","color.gradients","color.heading","color.link","color.palette","color.text","custom","dimensions.aspectRatio","dimensions.height","dimensions.minHeight","dimensions.width","dimensions.dimensionSizes","layout.contentSize","layout.definitions","layout.wideSize","lightbox.enabled","lightbox.allowEditing","position.fixed","position.sticky","spacing.customSpacingSize","spacing.defaultSpacingSizes","spacing.spacingSizes","spacing.spacingScale","spacing.blockGap","spacing.margin","spacing.padding","spacing.units","typography.fluid","typography.customFontSize","typography.defaultFontSizes","typography.dropCap","typography.fontFamilies","typography.fontSizes","typography.fontStyle","typography.fontWeight","typography.letterSpacing","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textIndent","typography.textTransform","typography.writingMode"];function Md(e,t,r){let o=r?".blocks."+r:"",n=t?"."+t:"",i=`settings${o}${n}`,s=`settings${n}`;if(t)return ft(e,i)??ft(e,s);let l={};return x7.forEach(u=>{let c=ft(e,`settings${o}.${u}`)??ft(e,`settings.${u}`);c!==void 0&&(l=pa(l,u.split("."),c))}),l}function Nx(e,t,r,o){let n=o?".blocks."+o:"",i=t?"."+t:"",s=`settings${n}${i}`;return pa(e,s.split("."),r)}var IA=a(Dx(),1);var S7="1600px",_7="320px",C7=1,T7=.25,E7=.75,P7="14px";function OA({minimumFontSize:e,maximumFontSize:t,fontSize:r,minimumViewportWidth:o=_7,maximumViewportWidth:n=S7,scaleFactor:i=C7,minimumFontSizeLimit:s}){if(s=pi(s)?s:P7,r){let x=pi(r);if(!x?.unit||!x?.value)return null;let T=pi(s,{coerceTo:x.unit});if(T?.value&&!e&&!t&&x?.value<=T?.value)return null;if(t||(t=`${x.value}${x.unit}`),!e){let E=x.unit==="px"?x.value:x.value*16,k=Math.min(Math.max(1-.075*Math.log2(E),T7),E7),F=Bd(x.value*k,3);T?.value&&F<T?.value?e=`${T.value}${T.unit}`:e=`${F}${x.unit}`}}let l=pi(e),u=l?.unit||"rem",c=pi(t,{coerceTo:u});if(!l||!c)return null;let f=pi(e,{coerceTo:"rem"}),m=pi(n,{coerceTo:u}),d=pi(o,{coerceTo:u});if(!m||!d||!f)return null;let h=m.value-d.value;if(!h)return null;let g=Bd(d.value/100,3),y=Bd(g,3)+u,v=100*((c.value-l.value)/h),b=Bd((v||1)*i,3),w=`${f.value}${f.unit} + ((1vw - ${y}) * ${b})`;return`clamp(${e}, ${w}, ${t})`}function pi(e,t={}){if(typeof e!="string"&&typeof e!="number")return null;isFinite(e)&&(e=`${e}px`);let{coerceTo:r,rootSizeValue:o,acceptableUnits:n}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=n?.join("|"),s=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),l=e.toString().match(s);if(!l||l.length<3)return null;let[,u,c]=l,f=parseFloat(u);return r==="px"&&(c==="em"||c==="rem")&&(f=f*o,c=r),c==="px"&&(r==="em"||r==="rem")&&(f=f/o,c=r),(r==="em"||r==="rem")&&(c==="em"||c==="rem")&&(c=r),c?{value:Bd(f,3),unit:c}:null}function Bd(e,t=3){let r=Math.pow(10,t);return Math.round(e*r)/r}function Lx(e){let t=e?.fluid;return t===!0||t&&typeof t=="object"&&Object.keys(t).length>0}function A7(e){let t=e?.typography??{},r=e?.layout,o=pi(r?.wideSize)?r?.wideSize:null;return Lx(t)&&o?{fluid:{maxViewportWidth:o,...typeof t.fluid=="object"?t.fluid:{}}}:{fluid:t?.fluid}}function Pg(e,t){let{size:r}=e;if(!r||r==="0"||e?.fluid===!1||!Lx(t?.typography)&&!Lx(e))return r;let o=A7(t)?.fluid??{},n=OA({minimumFontSize:typeof e?.fluid=="boolean"?void 0:e?.fluid?.min,maximumFontSize:typeof e?.fluid=="boolean"?void 0:e?.fluid?.max,fontSize:r,minimumFontSizeLimit:typeof o=="object"?o?.minFontSize:void 0,maximumViewportWidth:typeof o=="object"?o?.maxViewportWidth:void 0,minimumViewportWidth:typeof o=="object"?o?.minViewportWidth:void 0});return n||r}var hi="body",jd=":root",lc=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],valueKey:"colors",cssVarInfix:"duotone",valueFunc:({slug:e})=>`url( '#wp-duotone-${e}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>Pg(e,t),valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:({size:e})=>e,classes:[]},{path:["border","radiusSizes"],valueKey:"size",cssVarInfix:"border-radius",classes:[]},{path:["dimensions","dimensionSizes"],valueKey:"size",cssVarInfix:"dimension",classes:[]}];function qn(e,t){if(!e||!t)return t;let r=e.split(","),o=t.split(","),n=[];return r.forEach(i=>{o.forEach(s=>{n.push(`${i.trim()} ${s.trim()}`)})}),n.join(", ")}function FA(e,t){if(!e||!t)return;let r={};return Object.entries(t).forEach(([o,n])=>{typeof n=="string"&&(r[o]=qn(e,n)),typeof n=="object"&&(r[o]={},Object.entries(n).forEach(([i,s])=>{r[o][i]=qn(e,s)}))}),r}function VA(e,t){return e.includes(",")?e.split(",").map(n=>n+t).join(","):e+t}function NA(e,t){let r=`.is-style-${e}`;if(!t)return r;let o=/((?::\([^)]+\))?\s*)([^\s:]+)/,n=(s,l,u)=>l+u+r;return t.split(",").map(s=>s.replace(o,n)).join(",")}function k7(e,t){if(!e||!t)return e;if(typeof e=="object"&&"ref"in e&&e?.ref){let r=(0,IA.getCSSValueFromRawStyle)(ft(t,e.ref));return typeof r=="object"&&r!==null&&"ref"in r&&r?.ref?void 0:r===void 0?e:r}return e}function R7(e,t){if(!e||!t||!Array.isArray(t))return e;let r=t.find(o=>o?.name===e);return r?.href?r?.href:e}function Mx(e,t){if(!e||!t)return e;let r=k7(e,t);return typeof r=="object"&&r!==null&&"url"in r&&r?.url&&(r.url=R7(r.url,t?._links?.["wp:theme-file"])),r}function DA(e,t,r=[],o="slug",n){let i=[t?ft(e,["blocks",t,...r]):void 0,ft(e,r)].filter(Boolean);for(let s of i)if(s){let l=["custom","theme","default"];for(let u of l){let c=s[u];if(c){let f=c.find(m=>m[o]===n);if(f)return o==="slug"||DA(e,t,r,"slug",f.slug)[o]===f[o]?f:void 0}}}}function O7(e,t,r,[o,n]=[]){let i=lc.find(l=>l.cssVarInfix===o);if(!i||!e.settings)return r;let s=DA(e.settings,t,i.path,"slug",n);if(s){let{valueKey:l}=i,u=s[l];return Ag(e,t,u)}return r}function I7(e,t,r,o=[]){let n=(t?ft(e?.settings??{},["blocks",t,"custom",...o]):void 0)??ft(e?.settings??{},["custom",...o]);return n?Ag(e,t,n):r}function Ag(e,t,r){if(!r||typeof r!="string")if(typeof r=="object"&&r!==null&&"ref"in r&&typeof r.ref=="string"){let c=ft(e,r.ref);if(!c||typeof c=="object"&&"ref"in c)return c;r=c}else return r;let o="var:",n="var(--wp--",i=")",s;if(r.startsWith(o))s=r.slice(o.length).split("|");else if(r.startsWith(n)&&r.endsWith(i))s=r.slice(n.length,-i.length).split("--");else return r;let[l,...u]=s;return l==="preset"?O7(e,t,r,u):l==="custom"?I7(e,t,r,u):r}function Bx(e,t,r,o=!0){let n=t?"."+t:"",i=r?`styles.blocks.${r}${n}`:`styles${n}`;if(!e)return;let s=ft(e,i);return o?Ag(e,r,s):s}function jx(e,t,r,o){let n=t?"."+t:"",i=o?`styles.blocks.${o}${n}`:`styles${n}`;return pa(e,i.split("."),r)}var zx=a(kg(),1);function zd(e,t){return typeof e!="object"||typeof t!="object"?e===t:(0,zx.default)(e?.styles,t?.styles)&&(0,zx.default)(e?.settings,t?.settings)}var HA=a(Rg(),1);function zA(e){return Object.prototype.toString.call(e)==="[object Object]"}function GA(e){var t,r;return zA(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(zA(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}function Vl(e,t){return(0,HA.default)(e,t,{isMergeableObject:GA,customMerge:r=>{if(r==="backgroundImage")return(o,n)=>n??o}})}var Ur=a(Gr(),1),Ud=a(Dx(),1),lk=a(re(),1);function cc(e,t="root",r={}){if(!t)return null;let{fallback:o=!1}=r,{name:n,selectors:i,supports:s}=e,l=i&&Object.keys(i).length>0,u=Array.isArray(t)?t.join("."):t,c=null;if(l&&i.root?c=i?.root:s?.__experimentalSelector?c=s.__experimentalSelector:c=".wp-block-"+n.replace("core/","").replace("/","-"),u==="root")return c;let f=Array.isArray(t)?t:t.split(".");if(f.length===1){let d=o?c:null;if(l)return ft(i,`${u}.root`,null)||ft(i,u,null)||d;let h=s?ft(s,`${u}.__experimentalSelector`,null):void 0;return h?qn(c,h):d}let m;return l&&(m=ft(i,u,null)),m||(o?cc(e,f[0],r):null)}var q7={grad:.9,turn:360,rad:360/(2*Math.PI)},ns=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},xr=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},yn=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},QA=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},UA=function(e){return{r:yn(e.r,0,255),g:yn(e.g,0,255),b:yn(e.b,0,255),a:yn(e.a)}},Gx=function(e){return{r:xr(e.r),g:xr(e.g),b:xr(e.b),a:xr(e.a,3)}},Y7=/^#([0-9a-f]{3,8})$/i,Og=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},JA=function(e){var t=e.r,r=e.g,o=e.b,n=e.a,i=Math.max(t,r,o),s=i-Math.min(t,r,o),l=s?i===t?(r-o)/s:i===r?2+(o-t)/s:4+(t-r)/s:0;return{h:60*(l<0?l+6:l),s:i?s/i*100:0,v:i/255*100,a:n}},$A=function(e){var t=e.h,r=e.s,o=e.v,n=e.a;t=t/360*6,r/=100,o/=100;var i=Math.floor(t),s=o*(1-r),l=o*(1-(t-i)*r),u=o*(1-(1-t+i)*r),c=i%6;return{r:255*[o,l,s,s,u,o][c],g:255*[u,o,o,l,s,s][c],b:255*[s,s,u,o,o,l][c],a:n}},WA=function(e){return{h:QA(e.h),s:yn(e.s,0,100),l:yn(e.l,0,100),a:yn(e.a)}},qA=function(e){return{h:xr(e.h),s:xr(e.s),l:xr(e.l),a:xr(e.a,3)}},YA=function(e){return $A((r=(t=e).s,{h:t.h,s:(r*=((o=t.l)<50?o:100-o)/100)>0?2*r/(o+r)*100:0,v:o+r,a:t.a}));var t,r,o},Hd=function(e){return{h:(t=JA(e)).h,s:(n=(200-(r=t.s))*(o=t.v)/100)>0&&n<200?r*o/100/(n<=100?n:200-n)*100:0,l:n/2,a:t.a};var t,r,o,n},Z7=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,K7=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,X7=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Q7=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Wx={string:[[function(e){var t=Y7.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?xr(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?xr(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=X7.exec(e)||Q7.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:UA({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:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Z7.exec(e)||K7.exec(e);if(!t)return null;var r,o,n=WA({h:(r=t[1],o=t[2],o===void 0&&(o="deg"),Number(r)*(q7[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return YA(n)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,o=e.b,n=e.a,i=n===void 0?1:n;return ns(t)&&ns(r)&&ns(o)?UA({r:Number(t),g:Number(r),b:Number(o),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,r=e.s,o=e.l,n=e.a,i=n===void 0?1:n;if(!ns(t)||!ns(r)||!ns(o))return null;var s=WA({h:Number(t),s:Number(r),l:Number(o),a:Number(i)});return YA(s)},"hsl"],[function(e){var t=e.h,r=e.s,o=e.v,n=e.a,i=n===void 0?1:n;if(!ns(t)||!ns(r)||!ns(o))return null;var s=(function(l){return{h:QA(l.h),s:yn(l.s,0,100),v:yn(l.v,0,100),a:yn(l.a)}})({h:Number(t),s:Number(r),v:Number(o),a:Number(i)});return $A(s)},"hsv"]]},ZA=function(e,t){for(var r=0;r<t.length;r++){var o=t[r][0](e);if(o)return[o,t[r][1]]}return[null,void 0]},J7=function(e){return typeof e=="string"?ZA(e.trim(),Wx.string):typeof e=="object"&&e!==null?ZA(e,Wx.object):[null,void 0]};var Hx=function(e,t){var r=Hd(e);return{h:r.h,s:yn(r.s+100*t,0,100),l:r.l,a:r.a}},Ux=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},KA=function(e,t){var r=Hd(e);return{h:r.h,s:r.s,l:yn(r.l+100*t,0,100),a:r.a}},qx=(function(){function e(t){this.parsed=J7(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return xr(Ux(this.rgba),2)},e.prototype.isDark=function(){return Ux(this.rgba)<.5},e.prototype.isLight=function(){return Ux(this.rgba)>=.5},e.prototype.toHex=function(){return t=Gx(this.rgba),r=t.r,o=t.g,n=t.b,s=(i=t.a)<1?Og(xr(255*i)):"","#"+Og(r)+Og(o)+Og(n)+s;var t,r,o,n,i,s},e.prototype.toRgb=function(){return Gx(this.rgba)},e.prototype.toRgbString=function(){return t=Gx(this.rgba),r=t.r,o=t.g,n=t.b,(i=t.a)<1?"rgba("+r+", "+o+", "+n+", "+i+")":"rgb("+r+", "+o+", "+n+")";var t,r,o,n,i},e.prototype.toHsl=function(){return qA(Hd(this.rgba))},e.prototype.toHslString=function(){return t=qA(Hd(this.rgba)),r=t.h,o=t.s,n=t.l,(i=t.a)<1?"hsla("+r+", "+o+"%, "+n+"%, "+i+")":"hsl("+r+", "+o+"%, "+n+"%)";var t,r,o,n,i},e.prototype.toHsv=function(){return t=JA(this.rgba),{h:xr(t.h),s:xr(t.s),v:xr(t.v),a:xr(t.a,3)};var t},e.prototype.invert=function(){return pr({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),pr(Hx(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),pr(Hx(this.rgba,-t))},e.prototype.grayscale=function(){return pr(Hx(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),pr(KA(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),pr(KA(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?pr({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):xr(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=Hd(this.rgba);return typeof t=="number"?pr({h:t,s:r.s,l:r.l,a:r.a}):xr(r.h)},e.prototype.isEqual=function(t){return this.toHex()===pr(t).toHex()},e})(),pr=function(e){return e instanceof qx?e:new qx(e)},XA=[],ek=function(e){e.forEach(function(t){XA.indexOf(t)<0&&(t(qx,Wx),XA.push(t))})};function $7(e=[]){let t={r:[],g:[],b:[],a:[]};return e.forEach(r=>{let o=pr(r).toRgb();t.r.push(o.r/255),t.g.push(o.g/255),t.b.push(o.b/255),t.a.push(o.a)}),t}function tk(e,t){let r=$7(t);return`
<svg
	xmlns:xlink="http://www.w3.org/1999/xlink"
	viewBox="0 0 0 0"
	width="0"
	height="0"
	focusable="false"
	role="none"
	aria-hidden="true"
	style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
>
	<defs>
		<filter id="${e}">
			<!--
				Use sRGB instead of linearRGB so transparency looks correct.
				Use perceptual brightness to convert to grayscale.
			-->
			<feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix>
			<!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. -->
			<feComponentTransfer color-interpolation-filters="sRGB">
				<feFuncR type="table" tableValues="${r.r.join(" ")}"></feFuncR>
				<feFuncG type="table" tableValues="${r.g.join(" ")}"></feFuncG>
				<feFuncB type="table" tableValues="${r.b.join(" ")}"></feFuncB>
				<feFuncA type="table" tableValues="${r.a.join(" ")}"></feFuncA>
			</feComponentTransfer>
			<!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. -->
			<feComposite in2="SourceGraphic" operator="in"></feComposite>
		</filter>
	</defs>
</svg>`}function is(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([0-9])([a-zA-Z])/g,"$1-$2").replace(/([a-zA-Z])([0-9])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function Yx(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function ez(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function Zx(e,t="0"){let r=ez(e);if(!r)return null;let o=Yx(r?.top)||t,n=Yx(r?.left)||t;return o===n?o:`${o} ${n}`}var rk={backgroundSize:"cover",backgroundPosition:"50% 50%"};function ok(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:rk.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:rk.backgroundPosition}),t}var nk={default:{name:"default",slug:"flow",className:"is-layout-flow",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},constrained:{name:"constrained",slug:"constrained",className:"is-layout-constrained",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > :where(:not(.alignleft):not(.alignright):not(.alignfull))",rules:{"max-width":"var(--wp--style--global--content-size)","margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > .alignwide",rules:{"max-width":"var(--wp--style--global--wide-size)"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},flex:{name:"flex",slug:"flex",className:"is-layout-flex",displayMode:"flex",baseStyles:[{selector:"",rules:{"flex-wrap":"wrap","align-items":"center"}},{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}};var tz={button:"wp-element-button",caption:"wp-element-caption"},rz={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"};function oz(e={},t){return lc.reduce((r,{path:o,valueKey:n,valueFunc:i,cssVarInfix:s})=>{let l=ft(e,o,[]);return["default","theme","custom"].forEach(u=>{l[u]&&l[u].forEach(c=>{n&&!i?r.push(`--wp--preset--${s}--${is(c.slug)}: ${c[n]}`):i&&typeof i=="function"&&r.push(`--wp--preset--${s}--${is(c.slug)}: ${i(c,t)}`)})}),r},[])}function nz(e="*",t={}){return lc.reduce((r,{path:o,cssVarInfix:n,classes:i})=>{if(!i)return r;let s=ft(t,o,[]);return["default","theme","custom"].forEach(l=>{s[l]&&s[l].forEach(({slug:u})=>{i.forEach(({classSuffix:c,propertyName:f})=>{let m=`.has-${is(u)}-${c}`,d=e.split(",").map(g=>`${g}${m}`).join(","),h=`var(--wp--preset--${n}--${is(u)})`;r+=`${d}{${f}: ${h} !important;}`})})}),r},"")}function iz(e={}){return lc.filter(t=>t.path.at(-1)==="duotone").flatMap(t=>{let r=ft(e,t.path,{});return["default","theme"].filter(o=>r[o]).flatMap(o=>r[o].map(n=>tk(`wp-duotone-${n.slug}`,n.colors))).join("")})}function uk(e={},t,r){let o=[];return Object.keys(e).forEach(n=>{let i=t+is(n.replace("/","-")),s=e[n];if(s instanceof Object){let l=i+r;o=[...o,...uk(s,l,r)]}else o.push(`${i}: ${s}`)}),o}function sz(e,t){let r=e.split(","),o=[];return r.forEach(n=>{o.push(`${t.trim()}${n.trim()}`)}),o.join(", ")}var ik=(e,t,r)=>{if(r!=="core/paragraph"||(t?.blocks?.["core/paragraph"]?.typography?.textIndent??t?.typography?.textIndent??"subsequent")!=="all")return e;let i=".wp-block-paragraph + .wp-block-paragraph",s=".wp-block-paragraph";if(i in e){let l=e[i],u={...e};return delete u[i],u[s]=l,u}return e},sk=(e,t)=>{let r={};return Object.entries(e).forEach(([o,n])=>{if(o==="root"||!t?.[o])return;let i=typeof n=="string";if(!i&&typeof n=="object"&&n!==null&&Object.entries(n).forEach(([s,l])=>{if(s==="root"||!t?.[o][s])return;let u={[o]:{[s]:t[o][s]}},c=fc(u);r[l]=[...r[l]||[],...c],delete t[o][s]}),i||typeof n=="object"&&n!==null&&"root"in n){let s=i?n:n.root,l={[o]:t[o]},u=fc(l);r[s]=[...r[s]||[],...u],delete t[o]}}),r};function fc(e={},t="",r,o={},n=!1){let i=hi===t,s=Object.entries(Ur.__EXPERIMENTAL_STYLE_PROPERTY).reduce((u,[c,{value:f,properties:m,useEngine:d,rootOnly:h}])=>{if(h&&!i)return u;let g=f;if(g[0]==="elements"||d)return u;let y=ft(e,g);if(c==="--wp--style--root--padding"&&(typeof y=="string"||!r))return u;if(m&&typeof y!="string")Object.entries(m).forEach(v=>{let[b,w]=v;if(!ft(y,[w],!1))return;let x=b.startsWith("--")?b:is(b);u.push(`${x}: ${(0,Ud.getCSSValueFromRawStyle)(ft(y,[w]))}`)});else if(ft(e,g,!1)){let v=c.startsWith("--")?c:is(c);u.push(`${v}: ${(0,Ud.getCSSValueFromRawStyle)(ft(e,g))}`)}return u},[]);return e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=Mx(e.background.backgroundImage,o)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...ok(e.background)}})),(0,Ud.getCSSRules)(e).forEach(u=>{if(i&&(r||n)&&u.key.startsWith("padding"))return;let c=u.key.startsWith("--")?u.key:is(u.key),f=Mx(u.value,o);c==="font-size"&&(f=Pg({name:"",slug:"",size:f},o?.settings)),c==="aspect-ratio"&&s.push("min-height: unset"),s.push(`${c}: ${f}`)}),s}function ak({layoutDefinitions:e=nk,style:t,selector:r,hasBlockGapSupport:o,hasFallbackGapSupport:n,fallbackGapValue:i}){let s="",l=o?Zx(t?.spacing?.blockGap):"";if(n&&(r===hi?l=l||"0.5em":!o&&i&&(l=i)),l&&e&&(Object.values(e).forEach(({className:u,name:c,spacingStyles:f})=>{!o&&c!=="flex"&&c!=="grid"||f?.length&&f.forEach(m=>{let d=[];if(m.rules&&Object.entries(m.rules).forEach(([h,g])=>{d.push(`${h}: ${g||l}`)}),d.length){let h="";o?h=r===hi?`:root :where(.${u})${m?.selector||""}`:`:root :where(${r}-${u})${m?.selector||""}`:h=r===hi?`:where(.${u}${m?.selector||""})`:`:where(${r}.${u}${m?.selector||""})`,s+=`${h} { ${d.join("; ")}; }`}})}),r===hi&&o&&(s+=`${jd} { --wp--style--block-gap: ${l}; }`)),r===hi&&e){let u=["block","flex","grid"];Object.values(e).forEach(({className:c,displayMode:f,baseStyles:m})=>{f&&u.includes(f)&&(s+=`${r} .${c} { display:${f}; }`),m?.length&&m.forEach(d=>{let h=[];if(d.rules&&Object.entries(d.rules).forEach(([g,y])=>{h.push(`${g}: ${y}`)}),h.length){let g=`.${c}${d?.selector||""}`;s+=`${g} { ${h.join("; ")}; }`}})})}return s}var az=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function Ig(e){if(!e)return{};let o=Object.entries(e).filter(([n])=>az.includes(n)).map(([n,i])=>[n,JSON.parse(JSON.stringify(i))]);return Object.fromEntries(o)}var lz=(e,t)=>{let r=[];if(!e?.styles)return r;let o=Ig(e.styles);return o&&r.push({styles:o,selector:hi,skipSelectorWrapper:!0}),Object.entries(Ur.__EXPERIMENTAL_ELEMENTS).forEach(([n,i])=>{e.styles?.elements?.[n]&&r.push({styles:e.styles?.elements?.[n]??{},selector:i,skipSelectorWrapper:!tz[n]})}),Object.entries(e.styles?.blocks??{}).forEach(([n,i])=>{let s=Ig(i),l=i,u=[];if(l?.variations){let c={};Object.entries(l.variations).forEach(([f,m])=>{let d=m;c[f]=Ig(d),d?.css&&(c[f].css=d.css);let h=typeof t!="string"?t[n]?.styleVariationSelectors?.[f]:void 0;Object.entries(d?.elements??{}).forEach(([g,y])=>{y&&Ur.__EXPERIMENTAL_ELEMENTS[g]&&u.push({styles:y,selector:qn(h,Ur.__EXPERIMENTAL_ELEMENTS[g])})}),Object.entries(d?.blocks??{}).forEach(([g,y])=>{let v=typeof t!="string"?qn(h,t[g]?.selector):void 0,b=typeof t!="string"?qn(h,t[g]?.duotoneSelector):void 0,w=typeof t!="string"?FA(h,t[g]?.featureSelectors??{}):void 0,x=Ig(y);y?.css&&(x.css=y.css),!(!v||typeof t=="string")&&(u.push({selector:v,duotoneSelector:b,featureSelectors:w,fallbackGapValue:t[g]?.fallbackGapValue,hasLayoutSupport:t[g]?.hasLayoutSupport,styles:x}),Object.entries(y.elements??{}).forEach(([T,E])=>{E&&Ur.__EXPERIMENTAL_ELEMENTS[T]&&u.push({styles:E,selector:qn(v,Ur.__EXPERIMENTAL_ELEMENTS[T])})}))})}),s.variations=c}typeof t!="string"&&t?.[n]?.selector&&r.push({duotoneSelector:t[n].duotoneSelector,fallbackGapValue:t[n].fallbackGapValue,hasLayoutSupport:t[n].hasLayoutSupport,selector:t[n].selector,styles:s,featureSelectors:t[n].featureSelectors,styleVariationSelectors:t[n].styleVariationSelectors,name:n}),Object.entries(l?.elements??{}).forEach(([c,f])=>{typeof t!="string"&&f&&t?.[n]&&Ur.__EXPERIMENTAL_ELEMENTS[c]&&r.push({styles:f,selector:t[n]?.selector.split(",").map(m=>Ur.__EXPERIMENTAL_ELEMENTS[c].split(",").map(h=>m+" "+h)).join(",")})}),r.push(...u)}),r},Xx=(e,t)=>{let r=[];if(!e?.settings)return r;let o=s=>{let l={};return lc.forEach(({path:u})=>{let c=ft(s,u,!1);c!==!1&&(l=pa(l,u,c))}),l},n=o(e.settings),i=e.settings?.custom;return(Object.keys(n).length>0||i)&&r.push({presets:n,custom:i,selector:jd}),Object.entries(e.settings?.blocks??{}).forEach(([s,l])=>{let u=l.custom;if(typeof t=="string"||!t[s])return;let c=o(l);(Object.keys(c).length>0||u)&&r.push({presets:c,custom:u,selector:t[s]?.selector})}),r},uz=(e,t)=>{let r=Xx(e,t),o="";return r.forEach(({presets:n,custom:i,selector:s})=>{let l=e?.settings?oz(n,e?.settings):[],u=uk(i,"--wp--custom--","--");u.length>0&&l.push(...u),l.length>0&&(o+=`${s}{${l.join(";")};}`)}),o},cz=(e,t,r,o,n=!1,i=!1,s={})=>{let l={blockGap:!0,blockStyles:!0,layoutStyles:!0,marginReset:!0,presets:!0,rootPadding:!0,variationStyles:!1,...s},u=lz(e,t),c=Xx(e,t),f=e?.settings?.useRootPaddingAwareAlignments,{contentSize:m,wideSize:d}=e?.settings?.layout||{},h=l.marginReset||l.rootPadding||l.layoutStyles,g="";if(l.presets&&(m||d)&&(g+=`${jd} {`,g=m?g+` --wp--style--global--content-size: ${m};`:g,g=d?g+` --wp--style--global--wide-size: ${d};`:g,g+="}"),h&&(g+=":where(body) {margin: 0;",l.rootPadding&&f&&(g+=`padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }
				.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
				.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;
				`),g+="}"),l.blockStyles&&u.forEach(({selector:y,duotoneSelector:v,styles:b,fallbackGapValue:w,hasLayoutSupport:x,featureSelectors:T,styleVariationSelectors:E,skipSelectorWrapper:k,name:F})=>{if(T){let N=sk(T,b);N=ik(N,e.settings,F),Object.entries(N).forEach(([A,S])=>{if(S.length){let I=S.join(";");g+=`:root :where(${A}){${I};}`}})}if(v){let N={};b?.filter&&(N.filter=b.filter,delete b.filter);let A=fc(N);A.length&&(g+=`${v}{${A.join(";")};}`)}!n&&(hi===y||x)&&(g+=ak({style:b,selector:y,hasBlockGapSupport:r,hasFallbackGapSupport:o,fallbackGapValue:w}));let P=fc(b,y,f,e,i);if(P?.length){let N=k?y:`:root :where(${y})`;g+=`${N}{${P.join(";")};}`}b?.css&&(g+=Kx(b.css,`:root :where(${y})`)),l.variationStyles&&E&&Object.entries(E).forEach(([N,A])=>{let S=b?.variations?.[N];if(S){if(T){let O=sk(T,S);O=ik(O,e.settings,F),Object.entries(O).forEach(([z,R])=>{if(R.length){let D=sz(z,A),G=R.join(";");g+=`:root :where(${D}){${G};}`}})}let I=fc(S,A,f,e);if(I.length&&(g+=`:root :where(${A}){${I.join(";")};}`),S?.css&&(g+=Kx(S.css,`:root :where(${A})`)),x&&S?.spacing?.blockGap){let O=A+y;g+=ak({style:S,selector:O,hasBlockGapSupport:!0,hasFallbackGapSupport:o,fallbackGapValue:w})}}});let V=Object.entries(b).filter(([N])=>N.startsWith(":"));V?.length&&V.forEach(([N,A])=>{let S=fc(A);if(!S?.length)return;let O=`:root :where(${y.split(",").map(z=>z+N).join(",")}){${S.join(";")};}`;g+=O})}),l.layoutStyles&&(g=g+".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",g=g+".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",g=g+".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),l.blockGap&&r){let y=Zx(e?.styles?.spacing?.blockGap)||"0.5em";g=g+`:root :where(.wp-site-blocks) > * { margin-block-start: ${y}; margin-block-end: 0; }`,g=g+":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",g=g+":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return l.presets&&c.forEach(({selector:y,presets:v})=>{(hi===y||jd===y)&&(y="");let b=nz(y,v);b.length>0&&(g+=b)}),g};function fz(e,t){return Xx(e,t).flatMap(({presets:o})=>iz(o))}var dz=(e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;let r={root:t};return Object.entries(rz).forEach(([o,n])=>{let i=cc(e,o);i&&(r[n]=i)}),r},mz=(e,t)=>{let{getBlockStyles:r}=(0,lk.select)(Ur.store),o={};return e.forEach(n=>{let i=n.name,s=cc(n);if(!s)return;let l=cc(n,"filter.duotone");if(!l){let h=cc(n),g=(0,Ur.getBlockSupport)(n,"color.__experimentalDuotone",!1);l=g&&h&&qn(h,g)}let u=!!n?.supports?.layout||!!n?.supports?.__experimentalLayout,c=n?.supports?.spacing?.blockGap?.__experimentalDefault,f=r(i),m={};f?.forEach(h=>{let g=t?`-${t}`:"",y=`${h.name}${g}`,v=NA(y,s);m[y]=v});let d=dz(n,s);o[i]={duotoneSelector:l??void 0,fallbackGapValue:c,featureSelectors:Object.keys(d).length?d:void 0,hasLayoutSupport:u,name:i,selector:s,styleVariationSelectors:f?.length?m:void 0}}),o};function pz(e){let t=e.styles?.blocks,r=t?.["core/separator"];return r&&r.color?.background&&!r.color?.text&&!r.border?.color?{...e,styles:{...e.styles,blocks:{...t,"core/separator":{...r,color:{...r.color,text:r.color?.background}}}}}:e}function Kx(e,t){let r="";return!e||e.trim()===""||e.split("&").forEach(n=>{if(!n||n.trim()==="")return;if(!n.includes("{"))r+=`:root :where(${t}){${n.trim()}}`;else{let s=n.replace("}","").split("{");if(s.length!==2)return;let[l,u]=s,c=l.match(/([>+~\s]*::[a-zA-Z-]+)/),f=c?c[1]:"",m=c?l.replace(f,"").trim():l.trim(),d;m===""?d=t:d=l.startsWith(" ")?qn(t,m):VA(t,m),r+=`:root :where(${d})${f}{${u.trim()}}`}}),r}function Wd(e={},t=[],r={}){let{hasBlockGapSupport:o,hasFallbackGapSupport:n,disableLayoutStyles:i=!1,disableRootPadding:s=!1,styleOptions:l={}}=r,u=t.length>0?t:(0,Ur.getBlockTypes)(),c=Md(e,"spacing.blockGap"),f=o??c!==null,m=n??!f;if(!e?.styles||!e?.settings)return[[],{}];let d=pz(e),h=mz(u),g=uz(d,h),y=cz(d,h,f,m,i,s,l),v=fz(d,h),b=[{css:g,isGlobalStyles:!0},{css:y,isGlobalStyles:!0},{css:d?.styles?.css??"",isGlobalStyles:!0},{assets:v,__unstableType:"svg",isGlobalStyles:!0}];return u.forEach(w=>{let x=d?.styles?.blocks?.[w.name];if(x?.css){let T=h[w.name].selector;b.push({css:Kx(x.css,T),isGlobalStyles:!0})}}),[b,d.settings]}var Qx=a(B(),1);var ck=a(B(),1),Sr=(0,ck.createContext)({user:{styles:{},settings:{}},base:{styles:{},settings:{}},merged:{styles:{},settings:{}},onChange:()=>{},fontLibraryEnabled:!1});var fk=a(C(),1);function Fg({children:e,value:t,baseValue:r,onChange:o,fontLibraryEnabled:n}){let i=(0,Qx.useMemo)(()=>Vl(r,t),[r,t]),s=(0,Qx.useMemo)(()=>({user:t,base:r,merged:i,onChange:o,fontLibraryEnabled:n}),[t,r,i,o,n]);return(0,fk.jsx)(Sr.Provider,{value:s,children:e})}var ss=a(M(),1),Ak=a(j(),1);var kz=a(re(),1),Rz=a(he(),1);var dk=a(C(),1);function Jx({className:e,...t}){return(0,dk.jsx)(ui,{className:Z(e,"global-styles-ui-icon-with-current-color"),...t})}var ha=a(M(),1);var Nl=a(C(),1);function hz({icon:e,children:t,...r}){return(0,Nl.jsxs)(ha.__experimentalItem,{...r,children:[e&&(0,Nl.jsxs)(ha.__experimentalHStack,{justify:"flex-start",children:[(0,Nl.jsx)(Jx,{icon:e,size:24}),(0,Nl.jsx)(ha.FlexItem,{children:t})]}),!e&&t]})}function gi(e){return(0,Nl.jsx)(ha.Navigator.Button,{as:hz,...e})}var yz=a(M(),1);var bz=a(j(),1),bk=a(yt(),1);var $x=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},eS=function(e){return .2126*$x(e.r)+.7152*$x(e.g)+.0722*$x(e.b)};function mk(e){e.prototype.luminance=function(){return t=eS(this.rgba),(r=2)===void 0&&(r=0),o===void 0&&(o=Math.pow(10,r)),Math.round(o*t)/o+0;var t,r,o},e.prototype.contrast=function(t){t===void 0&&(t="#FFF");var r,o,n,i,s,l,u,c=t instanceof e?t:new e(t);return i=this.rgba,s=c.toRgb(),l=eS(i),u=eS(s),r=l>u?(l+.05)/(u+.05):(u+.05)/(l+.05),(o=2)===void 0&&(o=0),n===void 0&&(n=Math.pow(10,o)),Math.floor(n*r)/n+0},e.prototype.isReadable=function(t,r){return t===void 0&&(t="#FFF"),r===void 0&&(r={}),this.contrast(t)>=(l=(s=(o=r).size)===void 0?"normal":s,(i=(n=o.level)===void 0?"AA":n)==="AAA"&&l==="normal"?7:i==="AA"&&l==="large"?3:4.5);var o,n,i,s,l}}var Yn=a(B(),1),gk=a(re(),1),vk=a(he(),1),rS=a(j(),1);function tS(e,t){if(!t?.length||typeof e!="object"||!e||!Object.keys(e).length)return e;for(let r in e)t.includes(r)?delete e[r]:typeof e[r]=="object"&&tS(e[r],t);return e}var Vg=(e,t)=>{if(!e||!t?.length)return{};let r={};return Object.keys(e).forEach(o=>{if(t.includes(o))r[o]=e[o];else if(typeof e[o]=="object"){let n=Vg(e[o],t);Object.keys(n).length&&(r[o]=n)}}),r};function qd(e,t){let r=Vg(structuredClone(e),t);return zd(r,e)}function pk(e,t){if(!Array.isArray(e)||!t)return null;let o=t.replace("var(","").replace(")","")?.split("--").slice(-1)[0];return e.find(n=>n.slug===o)}function hk(e){let t=e?.settings?.typography?.fontFamilies?.theme,r=e?.settings?.typography?.fontFamilies?.custom,o=[];t&&r?o=[...t,...r]:t?o=t:r&&(o=r);let n=e?.styles?.typography?.fontFamily,i=pk(o,n),s=e?.styles?.elements?.heading?.typography?.fontFamily,l;return s?l=pk(o,e?.styles?.elements?.heading?.typography?.fontFamily):l=i,[i,l]}ek([mk]);function dt(e,t,r="merged",o=!0){let{user:n,base:i,merged:s,onChange:l}=(0,Yn.useContext)(Sr),u=s;r==="base"?u=i:r==="user"&&(u=n);let c=(0,Yn.useMemo)(()=>Bx(u,e,t,o),[u,e,t,o]),f=(0,Yn.useCallback)(m=>{let d=jx(n,e,m,t);l(d)},[n,l,e,t]);return[c,f]}function Ft(e,t,r="merged"){let{user:o,base:n,merged:i,onChange:s}=(0,Yn.useContext)(Sr),l=i;r==="base"?l=n:r==="user"&&(l=o);let u=(0,Yn.useMemo)(()=>Md(l,e,t),[l,e,t]),c=(0,Yn.useCallback)(f=>{let m=Nx(o,e,f,t);s(m)},[o,s,e,t]);return[u,c]}var gz=[];function vz({title:e,settings:t,styles:r}){return e===(0,rS.__)("Default")||Object.keys(t||{}).length>0||Object.keys(r||{}).length>0}function Ng(e=[]){let{variationsFromTheme:t}=(0,gk.useSelect)(o=>({variationsFromTheme:o(vk.store).__experimentalGetCurrentThemeGlobalStylesVariations?.()||gz}),[]),{user:r}=(0,Yn.useContext)(Sr);return(0,Yn.useMemo)(()=>{let o=structuredClone(r),n=tS(o,e);n.title=(0,rS.__)("Default");let i=t.filter(l=>qd(l,e)).map(l=>Vl(n,l)),s=[n,...i];return s?.length?s.filter(vz):[]},[e,r,t])}var yk=a(Sp(),1),{lock:Ule,unlock:Ye}=(0,yk.__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/global-styles-ui");var oS=a(C(),1),{useHasDimensionsPanel:Kle,useHasTypographyPanel:Xle,useHasColorPanel:Qle,useSettingsForBlockElement:Jle,useHasBackgroundPanel:$le}=Ye(bk.privateApis);var vi=a(M(),1);function dc(){let[e="black"]=dt("color.text"),[t="white"]=dt("color.background"),[r=e]=dt("elements.h1.color.text"),[o=r]=dt("elements.link.color.text"),[n=o]=dt("elements.button.color.background"),[i]=Ft("color.palette.core")||[],[s]=Ft("color.palette.theme")||[],[l]=Ft("color.palette.custom")||[],u=(s??[]).concat(l??[]).concat(i??[]),c=u.filter(({color:d})=>d===e),f=u.filter(({color:d})=>d===n),m=c.concat(f).concat(u).filter(({color:d})=>d!==t).slice(0,2);return{paletteColors:u,highlightedColors:m}}var wk=a(B(),1),xk=a(M(),1),nS=a(j(),1);function wz(e,t){return t.length===0?null:(t.sort((r,o)=>Math.abs(e-r)-Math.abs(e-o)),t[0])}function xz(e){let t=[];return e.forEach(r=>{let o=String(r.fontWeight).split(" ");if(o.length===2){let n=parseInt(o[0]),i=parseInt(o[1]);for(let s=n;s<=i;s+=100)t.push(s)}else o.length===1&&t.push(parseInt(o[0]))}),t}function Sz(e){let t=/^(?!generic\([ a-zA-Z\-]+\)$)(?!^[a-zA-Z\-]+$).+/,r=e.trim(),o=n=>(n=n.trim(),n.match(t)?(n=n.replace(/^["']|["']$/g,""),`"${n}"`):n);return r.includes(",")?r.split(",").map(o).filter(n=>n!=="").join(", "):o(r)}function Yd(e){let t={fontFamily:Sz(e.fontFamily)};if(!("fontFace"in e)||!Array.isArray(e.fontFace))return t.fontWeight="400",t.fontStyle="normal",t;if(e.fontFace){let r=e.fontFace.filter(o=>o?.fontStyle&&o.fontStyle.toLowerCase()==="normal");if(r.length>0){t.fontStyle="normal";let o=xz(r),n=wz(400,o);t.fontWeight=String(n)||"400"}else t.fontStyle=e.fontFace.length&&e.fontFace[0].fontStyle||"normal",t.fontWeight=e.fontFace.length&&String(e.fontFace[0].fontWeight)||"400"}return t}var Zd=a(C(),1);function Dg({fontSize:e,variation:t}){let{base:r}=(0,wk.useContext)(Sr),o=r;t&&(o={...r,...t});let[n]=dt("color.text"),[i,s]=hk(o),l=i?Yd(i):{},u=s?Yd(s):{};return n&&(l.color=n,u.color=n),e&&(l.fontSize=e,u.fontSize=e),(0,Zd.jsxs)(xk.__unstableMotion.div,{animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:.3,type:"tween"},style:{textAlign:"center",lineHeight:1},children:[(0,Zd.jsx)("span",{style:u,children:(0,nS._x)("A","Uppercase letter A")}),(0,Zd.jsx)("span",{style:l,children:(0,nS._x)("a","Lowercase letter A")})]})}var Sk=a(M(),1);var _k=a(C(),1);function Ck({normalizedColorSwatchSize:e,ratio:t}){let{highlightedColors:r}=dc(),o=e*t;return r.map(({slug:n,color:i},s)=>(0,_k.jsx)(Sk.__unstableMotion.div,{style:{height:o,width:o,background:i,borderRadius:o/2},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:s===1?.2:.1}},`${n}-${s}`))}var Pk=a(M(),1),mc=a(Qe(),1),Dl=a(B(),1);var ga=a(C(),1),Tk=248,Ek=152,_z={leading:!0,trailing:!0};function Cz({children:e,label:t,isFocused:r,withHoverView:o}){let[n="white"]=dt("color.background"),[i]=dt("color.gradient"),s=(0,mc.useReducedMotion)(),[l,u]=(0,Dl.useState)(!1),[c,{width:f}]=(0,mc.useResizeObserver)(),[m,d]=(0,Dl.useState)(f),[h,g]=(0,Dl.useState)(),y=(0,mc.useThrottle)(d,250,_z);(0,Dl.useLayoutEffect)(()=>{f&&y(f)},[f,y]),(0,Dl.useLayoutEffect)(()=>{let x=m?m/Tk:1,T=x-(h||0);(Math.abs(T)>.1||!h)&&g(x)},[m,h]);let v=f?f/Tk:1,b=h||v;return(0,ga.jsxs)(ga.Fragment,{children:[(0,ga.jsx)("div",{style:{position:"relative"},children:c}),!!f&&(0,ga.jsx)("div",{className:"global-styles-ui-preview__wrapper",style:{height:Ek*b},onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),tabIndex:-1,children:(0,ga.jsx)(Pk.__unstableMotion.div,{style:{height:Ek*b,width:"100%",background:i??n,cursor:o?"pointer":void 0},initial:"start",animate:(l||r)&&!s&&t?"hover":"start",children:[].concat(e).map((x,T)=>x({ratio:b,key:T}))})})]})}var pc=Cz;var Oo=a(C(),1),Tz={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},Ez={hover:{opacity:1},start:{opacity:.5}},Pz={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}};function Az({label:e,isFocused:t,withHoverView:r,variation:o}){let[n]=dt("typography.fontWeight"),[i="serif"]=dt("typography.fontFamily"),[s=i]=dt("elements.h1.typography.fontFamily"),[l=n]=dt("elements.h1.typography.fontWeight"),[u="black"]=dt("color.text"),[c=u]=dt("elements.h1.color.text"),{paletteColors:f}=dc();return(0,Oo.jsxs)(pc,{label:e,isFocused:t,withHoverView:r,children:[({ratio:m,key:d})=>(0,Oo.jsx)(vi.__unstableMotion.div,{variants:Tz,style:{height:"100%",overflow:"hidden"},children:(0,Oo.jsxs)(vi.__experimentalHStack,{spacing:10*m,justify:"center",style:{height:"100%",overflow:"hidden"},children:[(0,Oo.jsx)(Dg,{fontSize:65*m,variation:o}),(0,Oo.jsx)(vi.__experimentalVStack,{spacing:4*m,children:(0,Oo.jsx)(Ck,{normalizedColorSwatchSize:32,ratio:m})})]})},d),({key:m})=>(0,Oo.jsx)(vi.__unstableMotion.div,{variants:r?Ez:void 0,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1},children:(0,Oo.jsx)(vi.__experimentalHStack,{spacing:0,justify:"flex-start",style:{height:"100%",overflow:"hidden"},children:f.slice(0,4).map(({color:d},h)=>(0,Oo.jsx)("div",{style:{height:"100%",background:d,flexGrow:1}},h))})},m),({ratio:m,key:d})=>(0,Oo.jsx)(vi.__unstableMotion.div,{variants:Pz,style:{height:"100%",width:"100%",overflow:"hidden",position:"absolute",top:0},children:(0,Oo.jsx)(vi.__experimentalVStack,{spacing:3*m,justify:"center",style:{height:"100%",overflow:"hidden",padding:10*m,boxSizing:"border-box"},children:e&&(0,Oo.jsx)("div",{style:{fontSize:40*m,fontFamily:s,color:c,fontWeight:l,lineHeight:"1em",textAlign:"center"},children:e})})},d)]})}var iS=Az;var kk=a(C(),1);var aS=a(Gr(),1),hc=a(j(),1),Ml=a(M(),1),lS=a(re(),1),va=a(B(),1),Lg=a(yt(),1),Vk=a(Qe(),1),Nk=a(Xb(),1);var Rk=a(Gr(),1),Ok=a(re(),1),Oz=a(M(),1);var Iz=a(C(),1);function Fz(e,t){return e?.filter(r=>r.source==="block"||t.includes(r.name))||[]}function sS(e){let t=(0,Ok.useSelect)(n=>{let{getBlockStyles:i}=n(Rk.store);return i(e)},[e]),[r]=dt("variations",e),o=Object.keys(r??{});return Fz(t,o)}var Ll=a(M(),1),Ik=a(j(),1);var Fk=a(C(),1);var yi=a(C(),1),{useHasDimensionsPanel:Vz,useHasTypographyPanel:Nz,useHasBorderPanel:Dz,useSettingsForBlockElement:Lz,useHasColorPanel:Mz}=Ye(Lg.privateApis);function Bz(){let e=(0,lS.useSelect)(n=>n(aS.store).getBlockTypes(),[]),t=(n,i)=>{let{core:s,noncore:l}=n;return(i.name.startsWith("core/")?s:l).push(i),n},{core:r,noncore:o}=e.reduce(t,{core:[],noncore:[]});return[...r,...o]}function jz(e){let[t]=Ft("",e),r=Lz(t,e),o=Nz(r),n=Mz(r),i=Dz(r),s=Vz(r),l=i||s,u=!!sS(e)?.length;return o||n||l||u}function zz({block:e}){return jz(e.name)?(0,yi.jsx)(gi,{path:"/blocks/"+encodeURIComponent(e.name),children:(0,yi.jsxs)(Ml.__experimentalHStack,{justify:"flex-start",children:[(0,yi.jsx)(Lg.BlockIcon,{icon:e.icon}),(0,yi.jsx)(Ml.FlexItem,{children:e.title})]})}):null}function Gz({filterValue:e}){let t=Bz(),r=(0,Vk.useDebounce)(Nk.speak,500),{isMatchingSearchTerm:o}=(0,lS.useSelect)(aS.store),n=e?t.filter(s=>o(s,e)):t,i=(0,va.useRef)(null);return(0,va.useEffect)(()=>{if(!e)return;let s=i.current?.childElementCount||0,l=(0,hc.sprintf)((0,hc._n)("%d result found.","%d results found.",s),s);r(l,"polite")},[e,r]),(0,yi.jsx)("div",{ref:i,className:"global-styles-ui-block-types-item-list",role:"list",children:n.length===0?(0,yi.jsx)(Ml.__experimentalText,{align:"center",as:"p",children:(0,hc.__)("No blocks found.")}):n.map(s=>(0,yi.jsx)(zz,{block:s},"menu-itemblock-"+s.name))})}var Vue=(0,va.memo)(Gz);var Yz=a(Gr(),1),Bk=a(yt(),1),jk=a(B(),1),Zz=a(re(),1),Kz=a(he(),1),uS=a(M(),1),zk=a(j(),1);var Hz=a(yt(),1),Dk=a(Gr(),1),Uz=a(M(),1),Wz=a(B(),1);var qz=a(C(),1);var Lk=a(M(),1),Mk=a(C(),1);function Xo({children:e,level:t=2}){return(0,Mk.jsx)(Lk.__experimentalHeading,{className:"global-styles-ui-subtitle",level:t,children:e})}var cS=a(C(),1);var{useHasDimensionsPanel:Kue,useHasTypographyPanel:Xue,useHasBorderPanel:Que,useSettingsForBlockElement:Jue,useHasColorPanel:$ue,useHasFiltersPanel:ece,useHasImageSettingsPanel:tce,useHasBackgroundPanel:rce,BackgroundPanel:oce,BorderPanel:nce,ColorPanel:ice,TypographyPanel:sce,DimensionsPanel:ace,FiltersPanel:lce,ImageSettingsPanel:uce,AdvancedPanel:cce}=Ye(Bk.privateApis);var cq=a(j(),1),fq=a(M(),1),dq=a(B(),1);var Xz=a(M(),1);var Qz=a(C(),1);var Jz=a(j(),1),Mg=a(M(),1);var Gk=a(C(),1);var zg=a(M(),1);var Hk=a(M(),1);var Bg=a(C(),1),$z=({variation:e,isFocused:t,withHoverView:r})=>(0,Bg.jsx)(pc,{label:e.title,isFocused:t,withHoverView:r,children:({ratio:o,key:n})=>(0,Bg.jsx)(Hk.__experimentalHStack,{spacing:10*o,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,Bg.jsx)(Dg,{variation:e,fontSize:85*o})},n)}),Uk=$z;var Wk=a(M(),1),Bl=a(B(),1),qk=a(Js(),1),jg=a(j(),1);var Kd=a(C(),1);function gc({variation:e,children:t,isPill:r=!1,properties:o,showTooltip:n=!1}){let[i,s]=(0,Bl.useState)(!1),{base:l,user:u,onChange:c}=(0,Bl.useContext)(Sr),f=(0,Bl.useMemo)(()=>{let v=Vl(l,e);return o&&(v=Vg(v,o)),{user:e,base:l,merged:v,onChange:()=>{}}},[e,l,o]),m=()=>c(e),d=v=>{v.keyCode===qk.ENTER&&(v.preventDefault(),m())},h=(0,Bl.useMemo)(()=>zd(u,e),[u,e]),g=e?.title;e?.description&&(g=(0,jg.sprintf)((0,jg._x)("%1$s (%2$s)","variation label"),e?.title,e?.description));let y=(0,Kd.jsx)("div",{className:Z("global-styles-ui-variations_item",{"is-active":h}),role:"button",onClick:m,onKeyDown:d,tabIndex:0,"aria-label":g,"aria-current":h,onFocus:()=>s(!0),onBlur:()=>s(!1),children:(0,Kd.jsx)("div",{className:Z("global-styles-ui-variations_item-preview",{"is-pill":r}),children:t(i)})});return(0,Kd.jsx)(Sr.Provider,{value:f,children:n?(0,Kd.jsx)(Wk.Tooltip,{text:e?.title,children:y}):y})}var jl=a(C(),1),Yk=["typography"];function Gg({title:e,gap:t=2}){let r=Ng(Yk);return r?.length<=1?null:(0,jl.jsxs)(zg.__experimentalVStack,{spacing:3,children:[e&&(0,jl.jsx)(Xo,{level:3,children:e}),(0,jl.jsx)(zg.__experimentalGrid,{columns:3,gap:t,className:"global-styles-ui-style-variations-container",children:r.map((o,n)=>(0,jl.jsx)(gc,{variation:o,properties:Yk,showTooltip:!0,children:()=>(0,jl.jsx)(Uk,{variation:o})},n))})]})}var lq=a(j(),1),em=a(M(),1);var uq=a(B(),1);var Hg=a(B(),1),Ug=a(re(),1),fS=a(he(),1),aG=a(j(),1);var eG=a(bg(),1),tG=a(he(),1);var Zk=a(M(),1);var bn=a(j(),1);var rG={100:(0,bn._x)("Thin","font weight"),200:(0,bn._x)("Extra-light","font weight"),300:(0,bn._x)("Light","font weight"),400:(0,bn._x)("Normal","font weight"),500:(0,bn._x)("Medium","font weight"),600:(0,bn._x)("Semi-bold","font weight"),700:(0,bn._x)("Bold","font weight"),800:(0,bn._x)("Extra-bold","font weight"),900:(0,bn._x)("Black","font weight")},oG={normal:(0,bn._x)("Normal","font style"),italic:(0,bn._x)("Italic","font style")};var{File:Bce}=window,{kebabCase:jce}=Ye(Zk.privateApis);var lG=a(C(),1),as=(0,Hg.createContext)({});as.displayName="FontLibraryContext";var Jg=a(j(),1),bS=a(M(),1),V5=a(he(),1),sq=a(re(),1);var Qo=a(M(),1),r5=a(he(),1),pG=a(re(),1),mS=a(B(),1),qg=a(j(),1);var dS=a(j(),1),Xd=a(M(),1);var uG=a(M(),1),Wg=a(B(),1);var cG=a(C(),1);var Jk=a(C(),1);var $k=a(B(),1),e5=a(M(),1);var t5=a(C(),1);var pS=a(C(),1);var Qd=a(B(),1),Fo=a(M(),1),vG=a(Qe(),1),Jd=a(j(),1);var yG=a(he(),1);var hG=a(j(),1),vc=a(M(),1),o5=a(C(),1);var gG=a(B(),1),n5=a(M(),1);var i5=a(C(),1);var hS=a(C(),1),Hfe={slug:"all",name:(0,Jd._x)("All","font categories")};var iq=a(j(),1),ya=a(M(),1),k5=a(B(),1);var Yg=(e=>typeof Po<"u"?Po:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof Po<"u"?Po:t)[r]}):e)(function(e){if(typeof Po<"u")return Po.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),s5=(function(){var e,t,r;return(function(){function o(n,i,s){function l(f,m){if(!i[f]){if(!n[f]){var d=typeof Yg=="function"&&Yg;if(!m&&d)return d(f,!0);if(u)return u(f,!0);var h=new Error("Cannot find module '"+f+"'");throw h.code="MODULE_NOT_FOUND",h}var g=i[f]={exports:{}};n[f][0].call(g.exports,function(y){var v=n[f][1][y];return l(v||y)},g,g.exports,o,n,i,s)}return i[f].exports}for(var u=typeof Yg=="function"&&Yg,c=0;c<s.length;c++)l(s[c]);return l}return o})()({1:[function(o,n,i){var s=4096,l=2*s+32,u=2*s-1,c=new Uint32Array([0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215]);function f(m){this.buf_=new Uint8Array(l),this.input_=m,this.reset()}f.READ_SIZE=s,f.IBUF_MASK=u,f.prototype.reset=function(){this.buf_ptr_=0,this.val_=0,this.pos_=0,this.bit_pos_=0,this.bit_end_pos_=0,this.eos_=0,this.readMoreInput();for(var m=0;m<4;m++)this.val_|=this.buf_[this.pos_]<<8*m,++this.pos_;return this.bit_end_pos_>0},f.prototype.readMoreInput=function(){if(!(this.bit_end_pos_>256))if(this.eos_){if(this.bit_pos_>this.bit_end_pos_)throw new Error("Unexpected end of input "+this.bit_pos_+" "+this.bit_end_pos_)}else{var m=this.buf_ptr_,d=this.input_.read(this.buf_,m,s);if(d<0)throw new Error("Unexpected end of input");if(d<s){this.eos_=1;for(var h=0;h<32;h++)this.buf_[m+d+h]=0}if(m===0){for(var h=0;h<32;h++)this.buf_[(s<<1)+h]=this.buf_[h];this.buf_ptr_=s}else this.buf_ptr_=0;this.bit_end_pos_+=d<<3}},f.prototype.fillBitWindow=function(){for(;this.bit_pos_>=8;)this.val_>>>=8,this.val_|=this.buf_[this.pos_&u]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},f.prototype.readBits=function(m){32-this.bit_pos_<m&&this.fillBitWindow();var d=this.val_>>>this.bit_pos_&c[m];return this.bit_pos_+=m,d},n.exports=f},{}],2:[function(o,n,i){var s=0,l=1,u=2,c=3;i.lookup=new Uint8Array([0,0,0,0,0,0,0,0,0,4,4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,12,16,12,12,20,12,16,24,28,12,12,32,12,36,12,44,44,44,44,44,44,44,44,44,44,32,32,24,40,28,12,12,48,52,52,52,48,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,24,12,28,12,12,12,56,60,60,60,56,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,24,12,28,12,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,56,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),i.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])},{}],3:[function(o,n,i){var s=o("./streams").BrotliInput,l=o("./streams").BrotliOutput,u=o("./bit_reader"),c=o("./dictionary"),f=o("./huffman").HuffmanCode,m=o("./huffman").BrotliBuildHuffmanTable,d=o("./context"),h=o("./prefix"),g=o("./transform"),y=8,v=16,b=256,w=704,x=26,T=6,E=2,k=8,F=255,P=1080,V=18,N=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),A=16,S=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),I=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),O=new Uint16Array([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]);function z(ee){var Y;return ee.readBits(1)===0?16:(Y=ee.readBits(3),Y>0?17+Y:(Y=ee.readBits(3),Y>0?8+Y:17))}function R(ee){if(ee.readBits(1)){var Y=ee.readBits(3);return Y===0?1:ee.readBits(Y)+(1<<Y)}return 0}function D(){this.meta_block_length=0,this.input_end=0,this.is_uncompressed=0,this.is_metadata=!1}function G(ee){var Y=new D,te,X,oe;if(Y.input_end=ee.readBits(1),Y.input_end&&ee.readBits(1))return Y;if(te=ee.readBits(2)+4,te===7){if(Y.is_metadata=!0,ee.readBits(1)!==0)throw new Error("Invalid reserved bit");if(X=ee.readBits(2),X===0)return Y;for(oe=0;oe<X;oe++){var Pe=ee.readBits(8);if(oe+1===X&&X>1&&Pe===0)throw new Error("Invalid size byte");Y.meta_block_length|=Pe<<oe*8}}else for(oe=0;oe<te;++oe){var we=ee.readBits(4);if(oe+1===te&&te>4&&we===0)throw new Error("Invalid size nibble");Y.meta_block_length|=we<<oe*4}return++Y.meta_block_length,!Y.input_end&&!Y.is_metadata&&(Y.is_uncompressed=ee.readBits(1)),Y}function U(ee,Y,te){var X=Y,oe;return te.fillBitWindow(),Y+=te.val_>>>te.bit_pos_&F,oe=ee[Y].bits-k,oe>0&&(te.bit_pos_+=k,Y+=ee[Y].value,Y+=te.val_>>>te.bit_pos_&(1<<oe)-1),te.bit_pos_+=ee[Y].bits,ee[Y].value}function ce(ee,Y,te,X){for(var oe=0,Pe=y,we=0,_e=0,K=32768,ae=[],ne=0;ne<32;ne++)ae.push(new f(0,0));for(m(ae,0,5,ee,V);oe<Y&&K>0;){var Ee=0,ct;if(X.readMoreInput(),X.fillBitWindow(),Ee+=X.val_>>>X.bit_pos_&31,X.bit_pos_+=ae[Ee].bits,ct=ae[Ee].value&255,ct<v)we=0,te[oe++]=ct,ct!==0&&(Pe=ct,K-=32768>>ct);else{var Lt=ct-14,rt,Ot,It=0;if(ct===v&&(It=Pe),_e!==It&&(we=0,_e=It),rt=we,we>0&&(we-=2,we<<=Lt),we+=X.readBits(Lt)+3,Ot=we-rt,oe+Ot>Y)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var zr=0;zr<Ot;zr++)te[oe+zr]=_e;oe+=Ot,_e!==0&&(K-=Ot<<15-_e)}}if(K!==0)throw new Error("[ReadHuffmanCodeLengths] space = "+K);for(;oe<Y;oe++)te[oe]=0}function ye(ee,Y,te,X){var oe=0,Pe,we=new Uint8Array(ee);if(X.readMoreInput(),Pe=X.readBits(2),Pe===1){for(var _e,K=ee-1,ae=0,ne=new Int32Array(4),Ee=X.readBits(2)+1;K;)K>>=1,++ae;for(_e=0;_e<Ee;++_e)ne[_e]=X.readBits(ae)%ee,we[ne[_e]]=2;switch(we[ne[0]]=1,Ee){case 1:break;case 3:if(ne[0]===ne[1]||ne[0]===ne[2]||ne[1]===ne[2])throw new Error("[ReadHuffmanCode] invalid symbols");break;case 2:if(ne[0]===ne[1])throw new Error("[ReadHuffmanCode] invalid symbols");we[ne[1]]=1;break;case 4:if(ne[0]===ne[1]||ne[0]===ne[2]||ne[0]===ne[3]||ne[1]===ne[2]||ne[1]===ne[3]||ne[2]===ne[3])throw new Error("[ReadHuffmanCode] invalid symbols");X.readBits(1)?(we[ne[2]]=3,we[ne[3]]=3):we[ne[0]]=2;break}}else{var _e,ct=new Uint8Array(V),Lt=32,rt=0,Ot=[new f(2,0),new f(2,4),new f(2,3),new f(3,2),new f(2,0),new f(2,4),new f(2,3),new f(4,1),new f(2,0),new f(2,4),new f(2,3),new f(3,2),new f(2,0),new f(2,4),new f(2,3),new f(4,5)];for(_e=Pe;_e<V&&Lt>0;++_e){var It=N[_e],zr=0,eo;X.fillBitWindow(),zr+=X.val_>>>X.bit_pos_&15,X.bit_pos_+=Ot[zr].bits,eo=Ot[zr].value,ct[It]=eo,eo!==0&&(Lt-=32>>eo,++rt)}if(!(rt===1||Lt===0))throw new Error("[ReadHuffmanCode] invalid num_codes or space");ce(ct,ee,we,X)}if(oe=m(Y,te,k,we,ee),oe===0)throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return oe}function Te(ee,Y,te){var X,oe;return X=U(ee,Y,te),oe=h.kBlockLengthPrefixCode[X].nbits,h.kBlockLengthPrefixCode[X].offset+te.readBits(oe)}function Ie(ee,Y,te){var X;return ee<A?(te+=S[ee],te&=3,X=Y[te]+I[ee]):X=ee-A+1,X}function He(ee,Y){for(var te=ee[Y],X=Y;X;--X)ee[X]=ee[X-1];ee[0]=te}function pe(ee,Y){var te=new Uint8Array(256),X;for(X=0;X<256;++X)te[X]=X;for(X=0;X<Y;++X){var oe=ee[X];ee[X]=te[oe],oe&&He(te,oe)}}function Se(ee,Y){this.alphabet_size=ee,this.num_htrees=Y,this.codes=new Array(Y+Y*O[ee+31>>>5]),this.htrees=new Uint32Array(Y)}Se.prototype.decode=function(ee){var Y,te,X=0;for(Y=0;Y<this.num_htrees;++Y)this.htrees[Y]=X,te=ye(this.alphabet_size,this.codes,X,ee),X+=te};function J(ee,Y){var te={num_htrees:null,context_map:null},X,oe=0,Pe,we;Y.readMoreInput();var _e=te.num_htrees=R(Y)+1,K=te.context_map=new Uint8Array(ee);if(_e<=1)return te;for(X=Y.readBits(1),X&&(oe=Y.readBits(4)+1),Pe=[],we=0;we<P;we++)Pe[we]=new f(0,0);for(ye(_e+oe,Pe,0,Y),we=0;we<ee;){var ae;if(Y.readMoreInput(),ae=U(Pe,0,Y),ae===0)K[we]=0,++we;else if(ae<=oe)for(var ne=1+(1<<ae)+Y.readBits(ae);--ne;){if(we>=ee)throw new Error("[DecodeContextMap] i >= context_map_size");K[we]=0,++we}else K[we]=ae-oe,++we}return Y.readBits(1)&&pe(K,ee),te}function ie(ee,Y,te,X,oe,Pe,we){var _e=te*2,K=te,ae=U(Y,te*P,we),ne;ae===0?ne=oe[_e+(Pe[K]&1)]:ae===1?ne=oe[_e+(Pe[K]-1&1)]+1:ne=ae-2,ne>=ee&&(ne-=ee),X[te]=ne,oe[_e+(Pe[K]&1)]=ne,++Pe[K]}function $(ee,Y,te,X,oe,Pe){var we=oe+1,_e=te&oe,K=Pe.pos_&u.IBUF_MASK,ae;if(Y<8||Pe.bit_pos_+(Y<<3)<Pe.bit_end_pos_){for(;Y-- >0;)Pe.readMoreInput(),X[_e++]=Pe.readBits(8),_e===we&&(ee.write(X,we),_e=0);return}if(Pe.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;Pe.bit_pos_<32;)X[_e]=Pe.val_>>>Pe.bit_pos_,Pe.bit_pos_+=8,++_e,--Y;if(ae=Pe.bit_end_pos_-Pe.bit_pos_>>3,K+ae>u.IBUF_MASK){for(var ne=u.IBUF_MASK+1-K,Ee=0;Ee<ne;Ee++)X[_e+Ee]=Pe.buf_[K+Ee];ae-=ne,_e+=ne,Y-=ne,K=0}for(var Ee=0;Ee<ae;Ee++)X[_e+Ee]=Pe.buf_[K+Ee];if(_e+=ae,Y-=ae,_e>=we){ee.write(X,we),_e-=we;for(var Ee=0;Ee<_e;Ee++)X[Ee]=X[we+Ee]}for(;_e+Y>=we;){if(ae=we-_e,Pe.input_.read(X,_e,ae)<ae)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");ee.write(X,we),Y-=ae,_e=0}if(Pe.input_.read(X,_e,Y)<Y)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");Pe.reset()}function Fe(ee){var Y=ee.bit_pos_+7&-8,te=ee.readBits(Y-ee.bit_pos_);return te==0}function Yt(ee){var Y=new s(ee),te=new u(Y);z(te);var X=G(te);return X.meta_block_length}i.BrotliDecompressedSize=Yt;function $r(ee,Y){var te=new s(ee);Y==null&&(Y=Yt(ee));var X=new Uint8Array(Y),oe=new l(X);return jr(te,oe),oe.pos<oe.buffer.length&&(oe.buffer=oe.buffer.subarray(0,oe.pos)),oe.buffer}i.BrotliDecompressBuffer=$r;function jr(ee,Y){var te,X=0,oe=0,Pe=0,we,_e=0,K,ae,ne,Ee,ct=[16,15,11,4],Lt=0,rt=0,Ot=0,It=[new Se(0,0),new Se(0,0),new Se(0,0)],zr,eo,De,Ff=128+u.READ_SIZE;De=new u(ee),Pe=z(De),we=(1<<Pe)-16,K=1<<Pe,ae=K-1,ne=new Uint8Array(K+Ff+c.maxDictionaryWordLength),Ee=K,zr=[],eo=[];for(var Lu=0;Lu<3*P;Lu++)zr[Lu]=new f(0,0),eo[Lu]=new f(0,0);for(;!oe;){var ar=0,vp,dn=[1<<28,1<<28,1<<28],ai=[0],qo=[1,1,1],H=[0,1,0,1,0,1],le=[0],_,de,Ct,ue,to=null,fe=null,Zt,q=null,W,ml=0,vt=null,be=0,pl=0,hl=null,Mt=0,$e=0,lr=0,ur,yr;for(te=0;te<3;++te)It[te].codes=null,It[te].htrees=null;De.readMoreInput();var Ki=G(De);if(ar=Ki.meta_block_length,X+ar>Y.buffer.length){var gl=new Uint8Array(X+ar);gl.set(Y.buffer),Y.buffer=gl}if(oe=Ki.input_end,vp=Ki.is_uncompressed,Ki.is_metadata){for(Fe(De);ar>0;--ar)De.readMoreInput(),De.readBits(8);continue}if(ar!==0){if(vp){De.bit_pos_=De.bit_pos_+7&-8,$(Y,ar,X,ne,ae,De),X+=ar;continue}for(te=0;te<3;++te)qo[te]=R(De)+1,qo[te]>=2&&(ye(qo[te]+2,zr,te*P,De),ye(x,eo,te*P,De),dn[te]=Te(eo,te*P,De),le[te]=1);for(De.readMoreInput(),_=De.readBits(2),de=A+(De.readBits(4)<<_),Ct=(1<<_)-1,ue=de+(48<<_),fe=new Uint8Array(qo[0]),te=0;te<qo[0];++te)De.readMoreInput(),fe[te]=De.readBits(2)<<1;var Bt=J(qo[0]<<T,De);Zt=Bt.num_htrees,to=Bt.context_map;var ro=J(qo[2]<<E,De);for(W=ro.num_htrees,q=ro.context_map,It[0]=new Se(b,Zt),It[1]=new Se(w,qo[1]),It[2]=new Se(ue,W),te=0;te<3;++te)It[te].decode(De);for(vt=0,hl=0,ur=fe[ai[0]],$e=d.lookupOffsets[ur],lr=d.lookupOffsets[ur+1],yr=It[1].htrees[0];ar>0;){var Kt,oo,To,Mu,Pb,Eo,Yo,Xi,Vf,Bu,Nf;for(De.readMoreInput(),dn[1]===0&&(ie(qo[1],zr,1,ai,H,le,De),dn[1]=Te(eo,P,De),yr=It[1].htrees[ai[1]]),--dn[1],Kt=U(It[1].codes,yr,De),oo=Kt>>6,oo>=2?(oo-=2,Yo=-1):Yo=0,To=h.kInsertRangeLut[oo]+(Kt>>3&7),Mu=h.kCopyRangeLut[oo]+(Kt&7),Pb=h.kInsertLengthPrefixCode[To].offset+De.readBits(h.kInsertLengthPrefixCode[To].nbits),Eo=h.kCopyLengthPrefixCode[Mu].offset+De.readBits(h.kCopyLengthPrefixCode[Mu].nbits),rt=ne[X-1&ae],Ot=ne[X-2&ae],Bu=0;Bu<Pb;++Bu)De.readMoreInput(),dn[0]===0&&(ie(qo[0],zr,0,ai,H,le,De),dn[0]=Te(eo,0,De),ml=ai[0]<<T,vt=ml,ur=fe[ai[0]],$e=d.lookupOffsets[ur],lr=d.lookupOffsets[ur+1]),Vf=d.lookup[$e+rt]|d.lookup[lr+Ot],be=to[vt+Vf],--dn[0],Ot=rt,rt=U(It[0].codes,It[0].htrees[be],De),ne[X&ae]=rt,(X&ae)===ae&&Y.write(ne,K),++X;if(ar-=Pb,ar<=0)break;if(Yo<0){var Vf;if(De.readMoreInput(),dn[2]===0&&(ie(qo[2],zr,2,ai,H,le,De),dn[2]=Te(eo,2*P,De),pl=ai[2]<<E,hl=pl),--dn[2],Vf=(Eo>4?3:Eo-2)&255,Mt=q[hl+Vf],Yo=U(It[2].codes,It[2].htrees[Mt],De),Yo>=de){var Ab,BC,Df;Yo-=de,BC=Yo&Ct,Yo>>=_,Ab=(Yo>>1)+1,Df=(2+(Yo&1)<<Ab)-4,Yo=de+(Df+De.readBits(Ab)<<_)+BC}}if(Xi=Ie(Yo,ct,Lt),Xi<0)throw new Error("[BrotliDecompress] invalid distance");if(X<we&&_e!==we?_e=X:_e=we,Nf=X&ae,Xi>_e)if(Eo>=c.minDictionaryWordLength&&Eo<=c.maxDictionaryWordLength){var Df=c.offsetsByLength[Eo],jC=Xi-_e-1,zC=c.sizeBitsByLength[Eo],oB=(1<<zC)-1,nB=jC&oB,GC=jC>>zC;if(Df+=nB*Eo,GC<g.kNumTransforms){var kb=g.transformDictionaryWord(ne,Nf,Df,Eo,GC);if(Nf+=kb,X+=kb,ar-=kb,Nf>=Ee){Y.write(ne,K);for(var yp=0;yp<Nf-Ee;yp++)ne[yp]=ne[Ee+yp]}}else throw new Error("Invalid backward reference. pos: "+X+" distance: "+Xi+" len: "+Eo+" bytes left: "+ar)}else throw new Error("Invalid backward reference. pos: "+X+" distance: "+Xi+" len: "+Eo+" bytes left: "+ar);else{if(Yo>0&&(ct[Lt&3]=Xi,++Lt),Eo>ar)throw new Error("Invalid backward reference. pos: "+X+" distance: "+Xi+" len: "+Eo+" bytes left: "+ar);for(Bu=0;Bu<Eo;++Bu)ne[X&ae]=ne[X-Xi&ae],(X&ae)===ae&&Y.write(ne,K),++X,--ar}rt=ne[X-1&ae],Ot=ne[X-2&ae]}X&=1073741823}}Y.write(ne,X&ae)}i.BrotliDecompress=jr,c.init()},{"./bit_reader":1,"./context":2,"./dictionary":6,"./huffman":7,"./prefix":9,"./streams":10,"./transform":11}],4:[function(o,n,i){var s=o("base64-js");i.init=function(){var l=o("./decode").BrotliDecompressBuffer,u=s.toByteArray(o("./dictionary.bin.js"));return l(u)}},{"./decode":3,"./dictionary.bin.js":5,"base64-js":8}],5:[function(o,n,i){n.exports="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="},{}],6:[function(o,n,i){var s=o("./dictionary-browser");i.init=function(){i.dictionary=s.init()},i.offsetsByLength=new Uint32Array([0,0,0,0,0,4096,9216,21504,35840,44032,53248,63488,74752,87040,93696,100864,104704,106752,108928,113536,115968,118528,119872,121280,122016]),i.sizeBitsByLength=new Uint8Array([0,0,0,0,10,10,11,11,10,10,10,10,10,9,9,8,7,7,8,7,7,6,6,5,5]),i.minDictionaryWordLength=4,i.maxDictionaryWordLength=24},{"./dictionary-browser":4}],7:[function(o,n,i){function s(m,d){this.bits=m,this.value=d}i.HuffmanCode=s;var l=15;function u(m,d){for(var h=1<<d-1;m&h;)h>>=1;return(m&h-1)+h}function c(m,d,h,g,y){do g-=h,m[d+g]=new s(y.bits,y.value);while(g>0)}function f(m,d,h){for(var g=1<<d-h;d<l&&(g-=m[d],!(g<=0));)++d,g<<=1;return d-h}i.BrotliBuildHuffmanTable=function(m,d,h,g,y){var v=d,b,w,x,T,E,k,F,P,V,N,A,S=new Int32Array(l+1),I=new Int32Array(l+1);for(A=new Int32Array(y),x=0;x<y;x++)S[g[x]]++;for(I[1]=0,w=1;w<l;w++)I[w+1]=I[w]+S[w];for(x=0;x<y;x++)g[x]!==0&&(A[I[g[x]]++]=x);if(P=h,V=1<<P,N=V,I[l]===1){for(T=0;T<N;++T)m[d+T]=new s(0,A[0]&65535);return N}for(T=0,x=0,w=1,E=2;w<=h;++w,E<<=1)for(;S[w]>0;--S[w])b=new s(w&255,A[x++]&65535),c(m,d+T,E,V,b),T=u(T,w);for(F=N-1,k=-1,w=h+1,E=2;w<=l;++w,E<<=1)for(;S[w]>0;--S[w])(T&F)!==k&&(d+=V,P=f(S,w,h),V=1<<P,N+=V,k=T&F,m[v+k]=new s(P+h&255,d-v-k&65535)),b=new s(w-h&255,A[x++]&65535),c(m,d+(T>>h),E,V,b),T=u(T,w);return N}},{}],8:[function(o,n,i){"use strict";i.byteLength=h,i.toByteArray=y,i.fromByteArray=w;for(var s=[],l=[],u=typeof Uint8Array<"u"?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,m=c.length;f<m;++f)s[f]=c[f],l[c.charCodeAt(f)]=f;l[45]=62,l[95]=63;function d(x){var T=x.length;if(T%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var E=x.indexOf("=");E===-1&&(E=T);var k=E===T?0:4-E%4;return[E,k]}function h(x){var T=d(x),E=T[0],k=T[1];return(E+k)*3/4-k}function g(x,T,E){return(T+E)*3/4-E}function y(x){for(var T,E=d(x),k=E[0],F=E[1],P=new u(g(x,k,F)),V=0,N=F>0?k-4:k,A=0;A<N;A+=4)T=l[x.charCodeAt(A)]<<18|l[x.charCodeAt(A+1)]<<12|l[x.charCodeAt(A+2)]<<6|l[x.charCodeAt(A+3)],P[V++]=T>>16&255,P[V++]=T>>8&255,P[V++]=T&255;return F===2&&(T=l[x.charCodeAt(A)]<<2|l[x.charCodeAt(A+1)]>>4,P[V++]=T&255),F===1&&(T=l[x.charCodeAt(A)]<<10|l[x.charCodeAt(A+1)]<<4|l[x.charCodeAt(A+2)]>>2,P[V++]=T>>8&255,P[V++]=T&255),P}function v(x){return s[x>>18&63]+s[x>>12&63]+s[x>>6&63]+s[x&63]}function b(x,T,E){for(var k,F=[],P=T;P<E;P+=3)k=(x[P]<<16&16711680)+(x[P+1]<<8&65280)+(x[P+2]&255),F.push(v(k));return F.join("")}function w(x){for(var T,E=x.length,k=E%3,F=[],P=16383,V=0,N=E-k;V<N;V+=P)F.push(b(x,V,V+P>N?N:V+P));return k===1?(T=x[E-1],F.push(s[T>>2]+s[T<<4&63]+"==")):k===2&&(T=(x[E-2]<<8)+x[E-1],F.push(s[T>>10]+s[T>>4&63]+s[T<<2&63]+"=")),F.join("")}},{}],9:[function(o,n,i){function s(l,u){this.offset=l,this.nbits=u}i.kBlockLengthPrefixCode=[new s(1,2),new s(5,2),new s(9,2),new s(13,2),new s(17,3),new s(25,3),new s(33,3),new s(41,3),new s(49,4),new s(65,4),new s(81,4),new s(97,4),new s(113,5),new s(145,5),new s(177,5),new s(209,5),new s(241,6),new s(305,6),new s(369,7),new s(497,8),new s(753,9),new s(1265,10),new s(2289,11),new s(4337,12),new s(8433,13),new s(16625,24)],i.kInsertLengthPrefixCode=[new s(0,0),new s(1,0),new s(2,0),new s(3,0),new s(4,0),new s(5,0),new s(6,1),new s(8,1),new s(10,2),new s(14,2),new s(18,3),new s(26,3),new s(34,4),new s(50,4),new s(66,5),new s(98,5),new s(130,6),new s(194,7),new s(322,8),new s(578,9),new s(1090,10),new s(2114,12),new s(6210,14),new s(22594,24)],i.kCopyLengthPrefixCode=[new s(2,0),new s(3,0),new s(4,0),new s(5,0),new s(6,0),new s(7,0),new s(8,0),new s(9,0),new s(10,1),new s(12,1),new s(14,2),new s(18,2),new s(22,3),new s(30,3),new s(38,4),new s(54,4),new s(70,5),new s(102,5),new s(134,6),new s(198,7),new s(326,8),new s(582,9),new s(1094,10),new s(2118,24)],i.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],i.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},{}],10:[function(o,n,i){function s(u){this.buffer=u,this.pos=0}s.prototype.read=function(u,c,f){this.pos+f>this.buffer.length&&(f=this.buffer.length-this.pos);for(var m=0;m<f;m++)u[c+m]=this.buffer[this.pos+m];return this.pos+=f,f},i.BrotliInput=s;function l(u){this.buffer=u,this.pos=0}l.prototype.write=function(u,c){if(this.pos+c>this.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(u.subarray(0,c),this.pos),this.pos+=c,c},i.BrotliOutput=l},{}],11:[function(o,n,i){var s=o("./dictionary"),l=0,u=1,c=2,f=3,m=4,d=5,h=6,g=7,y=8,v=9,b=10,w=11,x=12,T=13,E=14,k=15,F=16,P=17,V=18,N=19,A=20;function S(z,R,D){this.prefix=new Uint8Array(z.length),this.transform=R,this.suffix=new Uint8Array(D.length);for(var G=0;G<z.length;G++)this.prefix[G]=z.charCodeAt(G);for(var G=0;G<D.length;G++)this.suffix[G]=D.charCodeAt(G)}var I=[new S("",l,""),new S("",l," "),new S(" ",l," "),new S("",x,""),new S("",b," "),new S("",l," the "),new S(" ",l,""),new S("s ",l," "),new S("",l," of "),new S("",b,""),new S("",l," and "),new S("",T,""),new S("",u,""),new S(", ",l," "),new S("",l,", "),new S(" ",b," "),new S("",l," in "),new S("",l," to "),new S("e ",l," "),new S("",l,'"'),new S("",l,"."),new S("",l,'">'),new S("",l,`
`),new S("",f,""),new S("",l,"]"),new S("",l," for "),new S("",E,""),new S("",c,""),new S("",l," a "),new S("",l," that "),new S(" ",b,""),new S("",l,". "),new S(".",l,""),new S(" ",l,", "),new S("",k,""),new S("",l," with "),new S("",l,"'"),new S("",l," from "),new S("",l," by "),new S("",F,""),new S("",P,""),new S(" the ",l,""),new S("",m,""),new S("",l,". The "),new S("",w,""),new S("",l," on "),new S("",l," as "),new S("",l," is "),new S("",g,""),new S("",u,"ing "),new S("",l,`
	`),new S("",l,":"),new S(" ",l,". "),new S("",l,"ed "),new S("",A,""),new S("",V,""),new S("",h,""),new S("",l,"("),new S("",b,", "),new S("",y,""),new S("",l," at "),new S("",l,"ly "),new S(" the ",l," of "),new S("",d,""),new S("",v,""),new S(" ",b,", "),new S("",b,'"'),new S(".",l,"("),new S("",w," "),new S("",b,'">'),new S("",l,'="'),new S(" ",l,"."),new S(".com/",l,""),new S(" the ",l," of the "),new S("",b,"'"),new S("",l,". This "),new S("",l,","),new S(".",l," "),new S("",b,"("),new S("",b,"."),new S("",l," not "),new S(" ",l,'="'),new S("",l,"er "),new S(" ",w," "),new S("",l,"al "),new S(" ",w,""),new S("",l,"='"),new S("",w,'"'),new S("",b,". "),new S(" ",l,"("),new S("",l,"ful "),new S(" ",b,". "),new S("",l,"ive "),new S("",l,"less "),new S("",w,"'"),new S("",l,"est "),new S(" ",b,"."),new S("",w,'">'),new S(" ",l,"='"),new S("",b,","),new S("",l,"ize "),new S("",w,"."),new S("\xC2\xA0",l,""),new S(" ",l,","),new S("",b,'="'),new S("",w,'="'),new S("",l,"ous "),new S("",w,", "),new S("",b,"='"),new S(" ",b,","),new S(" ",w,'="'),new S(" ",w,", "),new S("",w,","),new S("",w,"("),new S("",w,". "),new S(" ",w,"."),new S("",w,"='"),new S(" ",w,". "),new S(" ",b,'="'),new S(" ",w,"='"),new S(" ",b,"='")];i.kTransforms=I,i.kNumTransforms=I.length;function O(z,R){return z[R]<192?(z[R]>=97&&z[R]<=122&&(z[R]^=32),1):z[R]<224?(z[R+1]^=32,2):(z[R+2]^=5,3)}i.transformDictionaryWord=function(z,R,D,G,U){var ce=I[U].prefix,ye=I[U].suffix,Te=I[U].transform,Ie=Te<x?0:Te-(x-1),He=0,pe=R,Se;Ie>G&&(Ie=G);for(var J=0;J<ce.length;)z[R++]=ce[J++];for(D+=Ie,G-=Ie,Te<=v&&(G-=Te),He=0;He<G;He++)z[R++]=s.dictionary[D+He];if(Se=R-G,Te===b)O(z,Se);else if(Te===w)for(;G>0;){var ie=O(z,Se);Se+=ie,G-=ie}for(var $=0;$<ye.length;)z[R++]=ye[$++];return R-pe}},{"./dictionary":6}],12:[function(o,n,i){n.exports=o("./dec/decode").BrotliDecompressBuffer},{"./dec/decode":3}]},{},[12])(12)})();var Zg=(e=>typeof Po<"u"?Po:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof Po<"u"?Po:t)[r]}):e)(function(e){if(typeof Po<"u")return Po.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),a5=(function(){var e,t,r;return(function(){function o(n,i,s){function l(f,m){if(!i[f]){if(!n[f]){var d=typeof Zg=="function"&&Zg;if(!m&&d)return d(f,!0);if(u)return u(f,!0);var h=new Error("Cannot find module '"+f+"'");throw h.code="MODULE_NOT_FOUND",h}var g=i[f]={exports:{}};n[f][0].call(g.exports,function(y){var v=n[f][1][y];return l(v||y)},g,g.exports,o,n,i,s)}return i[f].exports}for(var u=typeof Zg=="function"&&Zg,c=0;c<s.length;c++)l(s[c]);return l}return o})()({1:[function(o,n,i){"use strict";var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function l(f,m){return Object.prototype.hasOwnProperty.call(f,m)}i.assign=function(f){for(var m=Array.prototype.slice.call(arguments,1);m.length;){var d=m.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var h in d)l(d,h)&&(f[h]=d[h])}}return f},i.shrinkBuf=function(f,m){return f.length===m?f:f.subarray?f.subarray(0,m):(f.length=m,f)};var u={arraySet:function(f,m,d,h,g){if(m.subarray&&f.subarray){f.set(m.subarray(d,d+h),g);return}for(var y=0;y<h;y++)f[g+y]=m[d+y]},flattenChunks:function(f){var m,d,h,g,y,v;for(h=0,m=0,d=f.length;m<d;m++)h+=f[m].length;for(v=new Uint8Array(h),g=0,m=0,d=f.length;m<d;m++)y=f[m],v.set(y,g),g+=y.length;return v}},c={arraySet:function(f,m,d,h,g){for(var y=0;y<h;y++)f[g+y]=m[d+y]},flattenChunks:function(f){return[].concat.apply([],f)}};i.setTyped=function(f){f?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,u)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,c))},i.setTyped(s)},{}],2:[function(o,n,i){"use strict";var s=o("./common"),l=!0,u=!0;try{String.fromCharCode.apply(null,[0])}catch{l=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{u=!1}for(var c=new s.Buf8(256),f=0;f<256;f++)c[f]=f>=252?6:f>=248?5:f>=240?4:f>=224?3:f>=192?2:1;c[254]=c[254]=1,i.string2buf=function(d){var h,g,y,v,b,w=d.length,x=0;for(v=0;v<w;v++)g=d.charCodeAt(v),(g&64512)===55296&&v+1<w&&(y=d.charCodeAt(v+1),(y&64512)===56320&&(g=65536+(g-55296<<10)+(y-56320),v++)),x+=g<128?1:g<2048?2:g<65536?3:4;for(h=new s.Buf8(x),b=0,v=0;b<x;v++)g=d.charCodeAt(v),(g&64512)===55296&&v+1<w&&(y=d.charCodeAt(v+1),(y&64512)===56320&&(g=65536+(g-55296<<10)+(y-56320),v++)),g<128?h[b++]=g:g<2048?(h[b++]=192|g>>>6,h[b++]=128|g&63):g<65536?(h[b++]=224|g>>>12,h[b++]=128|g>>>6&63,h[b++]=128|g&63):(h[b++]=240|g>>>18,h[b++]=128|g>>>12&63,h[b++]=128|g>>>6&63,h[b++]=128|g&63);return h};function m(d,h){if(h<65534&&(d.subarray&&u||!d.subarray&&l))return String.fromCharCode.apply(null,s.shrinkBuf(d,h));for(var g="",y=0;y<h;y++)g+=String.fromCharCode(d[y]);return g}i.buf2binstring=function(d){return m(d,d.length)},i.binstring2buf=function(d){for(var h=new s.Buf8(d.length),g=0,y=h.length;g<y;g++)h[g]=d.charCodeAt(g);return h},i.buf2string=function(d,h){var g,y,v,b,w=h||d.length,x=new Array(w*2);for(y=0,g=0;g<w;){if(v=d[g++],v<128){x[y++]=v;continue}if(b=c[v],b>4){x[y++]=65533,g+=b-1;continue}for(v&=b===2?31:b===3?15:7;b>1&&g<w;)v=v<<6|d[g++]&63,b--;if(b>1){x[y++]=65533;continue}v<65536?x[y++]=v:(v-=65536,x[y++]=55296|v>>10&1023,x[y++]=56320|v&1023)}return m(x,y)},i.utf8border=function(d,h){var g;for(h=h||d.length,h>d.length&&(h=d.length),g=h-1;g>=0&&(d[g]&192)===128;)g--;return g<0||g===0?h:g+c[d[g]]>h?g:h}},{"./common":1}],3:[function(o,n,i){"use strict";function s(l,u,c,f){for(var m=l&65535|0,d=l>>>16&65535|0,h=0;c!==0;){h=c>2e3?2e3:c,c-=h;do m=m+u[f++]|0,d=d+m|0;while(--h);m%=65521,d%=65521}return m|d<<16|0}n.exports=s},{}],4:[function(o,n,i){"use strict";n.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(o,n,i){"use strict";function s(){for(var c,f=[],m=0;m<256;m++){c=m;for(var d=0;d<8;d++)c=c&1?3988292384^c>>>1:c>>>1;f[m]=c}return f}var l=s();function u(c,f,m,d){var h=l,g=d+m;c^=-1;for(var y=d;y<g;y++)c=c>>>8^h[(c^f[y])&255];return c^-1}n.exports=u},{}],6:[function(o,n,i){"use strict";function s(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}n.exports=s},{}],7:[function(o,n,i){"use strict";var s=30,l=12;n.exports=function(c,f){var m,d,h,g,y,v,b,w,x,T,E,k,F,P,V,N,A,S,I,O,z,R,D,G,U;m=c.state,d=c.next_in,G=c.input,h=d+(c.avail_in-5),g=c.next_out,U=c.output,y=g-(f-c.avail_out),v=g+(c.avail_out-257),b=m.dmax,w=m.wsize,x=m.whave,T=m.wnext,E=m.window,k=m.hold,F=m.bits,P=m.lencode,V=m.distcode,N=(1<<m.lenbits)-1,A=(1<<m.distbits)-1;e:do{F<15&&(k+=G[d++]<<F,F+=8,k+=G[d++]<<F,F+=8),S=P[k&N];t:for(;;){if(I=S>>>24,k>>>=I,F-=I,I=S>>>16&255,I===0)U[g++]=S&65535;else if(I&16){O=S&65535,I&=15,I&&(F<I&&(k+=G[d++]<<F,F+=8),O+=k&(1<<I)-1,k>>>=I,F-=I),F<15&&(k+=G[d++]<<F,F+=8,k+=G[d++]<<F,F+=8),S=V[k&A];r:for(;;){if(I=S>>>24,k>>>=I,F-=I,I=S>>>16&255,I&16){if(z=S&65535,I&=15,F<I&&(k+=G[d++]<<F,F+=8,F<I&&(k+=G[d++]<<F,F+=8)),z+=k&(1<<I)-1,z>b){c.msg="invalid distance too far back",m.mode=s;break e}if(k>>>=I,F-=I,I=g-y,z>I){if(I=z-I,I>x&&m.sane){c.msg="invalid distance too far back",m.mode=s;break e}if(R=0,D=E,T===0){if(R+=w-I,I<O){O-=I;do U[g++]=E[R++];while(--I);R=g-z,D=U}}else if(T<I){if(R+=w+T-I,I-=T,I<O){O-=I;do U[g++]=E[R++];while(--I);if(R=0,T<O){I=T,O-=I;do U[g++]=E[R++];while(--I);R=g-z,D=U}}}else if(R+=T-I,I<O){O-=I;do U[g++]=E[R++];while(--I);R=g-z,D=U}for(;O>2;)U[g++]=D[R++],U[g++]=D[R++],U[g++]=D[R++],O-=3;O&&(U[g++]=D[R++],O>1&&(U[g++]=D[R++]))}else{R=g-z;do U[g++]=U[R++],U[g++]=U[R++],U[g++]=U[R++],O-=3;while(O>2);O&&(U[g++]=U[R++],O>1&&(U[g++]=U[R++]))}}else if((I&64)===0){S=V[(S&65535)+(k&(1<<I)-1)];continue r}else{c.msg="invalid distance code",m.mode=s;break e}break}}else if((I&64)===0){S=P[(S&65535)+(k&(1<<I)-1)];continue t}else if(I&32){m.mode=l;break e}else{c.msg="invalid literal/length code",m.mode=s;break e}break}}while(d<h&&g<v);O=F>>3,d-=O,F-=O<<3,k&=(1<<F)-1,c.next_in=d,c.next_out=g,c.avail_in=d<h?5+(h-d):5-(d-h),c.avail_out=g<v?257+(v-g):257-(g-v),m.hold=k,m.bits=F}},{}],8:[function(o,n,i){"use strict";var s=o("../utils/common"),l=o("./adler32"),u=o("./crc32"),c=o("./inffast"),f=o("./inftrees"),m=0,d=1,h=2,g=4,y=5,v=6,b=0,w=1,x=2,T=-2,E=-3,k=-4,F=-5,P=8,V=1,N=2,A=3,S=4,I=5,O=6,z=7,R=8,D=9,G=10,U=11,ce=12,ye=13,Te=14,Ie=15,He=16,pe=17,Se=18,J=19,ie=20,$=21,Fe=22,Yt=23,$r=24,jr=25,ee=26,Y=27,te=28,X=29,oe=30,Pe=31,we=32,_e=852,K=592,ae=15,ne=ae;function Ee(H){return(H>>>24&255)+(H>>>8&65280)+((H&65280)<<8)+((H&255)<<24)}function ct(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Lt(H){var le;return!H||!H.state?T:(le=H.state,H.total_in=H.total_out=le.total=0,H.msg="",le.wrap&&(H.adler=le.wrap&1),le.mode=V,le.last=0,le.havedict=0,le.dmax=32768,le.head=null,le.hold=0,le.bits=0,le.lencode=le.lendyn=new s.Buf32(_e),le.distcode=le.distdyn=new s.Buf32(K),le.sane=1,le.back=-1,b)}function rt(H){var le;return!H||!H.state?T:(le=H.state,le.wsize=0,le.whave=0,le.wnext=0,Lt(H))}function Ot(H,le){var _,de;return!H||!H.state||(de=H.state,le<0?(_=0,le=-le):(_=(le>>4)+1,le<48&&(le&=15)),le&&(le<8||le>15))?T:(de.window!==null&&de.wbits!==le&&(de.window=null),de.wrap=_,de.wbits=le,rt(H))}function It(H,le){var _,de;return H?(de=new ct,H.state=de,de.window=null,_=Ot(H,le),_!==b&&(H.state=null),_):T}function zr(H){return It(H,ne)}var eo=!0,De,Ff;function Lu(H){if(eo){var le;for(De=new s.Buf32(512),Ff=new s.Buf32(32),le=0;le<144;)H.lens[le++]=8;for(;le<256;)H.lens[le++]=9;for(;le<280;)H.lens[le++]=7;for(;le<288;)H.lens[le++]=8;for(f(d,H.lens,0,288,De,0,H.work,{bits:9}),le=0;le<32;)H.lens[le++]=5;f(h,H.lens,0,32,Ff,0,H.work,{bits:5}),eo=!1}H.lencode=De,H.lenbits=9,H.distcode=Ff,H.distbits=5}function ar(H,le,_,de){var Ct,ue=H.state;return ue.window===null&&(ue.wsize=1<<ue.wbits,ue.wnext=0,ue.whave=0,ue.window=new s.Buf8(ue.wsize)),de>=ue.wsize?(s.arraySet(ue.window,le,_-ue.wsize,ue.wsize,0),ue.wnext=0,ue.whave=ue.wsize):(Ct=ue.wsize-ue.wnext,Ct>de&&(Ct=de),s.arraySet(ue.window,le,_-de,Ct,ue.wnext),de-=Ct,de?(s.arraySet(ue.window,le,_-de,de,0),ue.wnext=de,ue.whave=ue.wsize):(ue.wnext+=Ct,ue.wnext===ue.wsize&&(ue.wnext=0),ue.whave<ue.wsize&&(ue.whave+=Ct))),0}function vp(H,le){var _,de,Ct,ue,to,fe,Zt,q,W,ml,vt,be,pl,hl,Mt=0,$e,lr,ur,yr,Ki,gl,Bt,ro,Kt=new s.Buf8(4),oo,To,Mu=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!H||!H.state||!H.output||!H.input&&H.avail_in!==0)return T;_=H.state,_.mode===ce&&(_.mode=ye),to=H.next_out,Ct=H.output,Zt=H.avail_out,ue=H.next_in,de=H.input,fe=H.avail_in,q=_.hold,W=_.bits,ml=fe,vt=Zt,ro=b;e:for(;;)switch(_.mode){case V:if(_.wrap===0){_.mode=ye;break}for(;W<16;){if(fe===0)break e;fe--,q+=de[ue++]<<W,W+=8}if(_.wrap&2&&q===35615){_.check=0,Kt[0]=q&255,Kt[1]=q>>>8&255,_.check=u(_.check,Kt,2,0),q=0,W=0,_.mode=N;break}if(_.flags=0,_.head&&(_.head.done=!1),!(_.wrap&1)||(((q&255)<<8)+(q>>8))%31){H.msg="incorrect header check",_.mode=oe;break}if((q&15)!==P){H.msg="unknown compression method",_.mode=oe;break}if(q>>>=4,W-=4,Bt=(q&15)+8,_.wbits===0)_.wbits=Bt;else if(Bt>_.wbits){H.msg="invalid window size",_.mode=oe;break}_.dmax=1<<Bt,H.adler=_.check=1,_.mode=q&512?G:ce,q=0,W=0;break;case N:for(;W<16;){if(fe===0)break e;fe--,q+=de[ue++]<<W,W+=8}if(_.flags=q,(_.flags&255)!==P){H.msg="unknown compression method",_.mode=oe;break}if(_.flags&57344){H.msg="unknown header flags set",_.mode=oe;break}_.head&&(_.head.text=q>>8&1),_.flags&512&&(Kt[0]=q&255,Kt[1]=q>>>8&255,_.check=u(_.check,Kt,2,0)),q=0,W=0,_.mode=A;case A:for(;W<32;){if(fe===0)break e;fe--,q+=de[ue++]<<W,W+=8}_.head&&(_.head.time=q),_.flags&512&&(Kt[0]=q&255,Kt[1]=q>>>8&255,Kt[2]=q>>>16&255,Kt[3]=q>>>24&255,_.check=u(_.check,Kt,4,0)),q=0,W=0,_.mode=S;case S:for(;W<16;){if(fe===0)break e;fe--,q+=de[ue++]<<W,W+=8}_.head&&(_.head.xflags=q&255,_.head.os=q>>8),_.flags&512&&(Kt[0]=q&255,Kt[1]=q>>>8&255,_.check=u(_.check,Kt,2,0)),q=0,W=0,_.mode=I;case I:if(_.flags&1024){for(;W<16;){if(fe===0)break e;fe--,q+=de[ue++]<<W,W+=8}_.length=q,_.head&&(_.head.extra_len=q),_.flags&512&&(Kt[0]=q&255,Kt[1]=q>>>8&255,_.check=u(_.check,Kt,2,0)),q=0,W=0}else _.head&&(_.head.extra=null);_.mode=O;case O:if(_.flags&1024&&(be=_.length,be>fe&&(be=fe),be&&(_.head&&(Bt=_.head.extra_len-_.length,_.head.extra||(_.head.extra=new Array(_.head.extra_len)),s.arraySet(_.head.extra,de,ue,be,Bt)),_.flags&512&&(_.check=u(_.check,de,be,ue)),fe-=be,ue+=be,_.length-=be),_.length))break e;_.length=0,_.mode=z;case z:if(_.flags&2048){if(fe===0)break e;be=0;do Bt=de[ue+be++],_.head&&Bt&&_.length<65536&&(_.head.name+=String.fromCharCode(Bt));while(Bt&&be<fe);if(_.flags&512&&(_.check=u(_.check,de,be,ue)),fe-=be,ue+=be,Bt)break e}else _.head&&(_.head.name=null);_.length=0,_.mode=R;case R:if(_.flags&4096){if(fe===0)break e;be=0;do Bt=de[ue+be++],_.head&&Bt&&_.length<65536&&(_.head.comment+=String.fromCharCode(Bt));while(Bt&&be<fe);if(_.flags&512&&(_.check=u(_.check,de,be,ue)),fe-=be,ue+=be,Bt)break e}else _.head&&(_.head.comment=null);_.mode=D;case D:if(_.flags&512){for(;W<16;){if(fe===0)break e;fe--,q+=de[ue++]<<W,W+=8}if(q!==(_.check&65535)){H.msg="header crc mismatch",_.mode=oe;break}q=0,W=0}_.head&&(_.head.hcrc=_.flags>>9&1,_.head.done=!0),H.adler=_.check=0,_.mode=ce;break;case G:for(;W<32;){if(fe===0)break e;fe--,q+=de[ue++]<<W,W+=8}H.adler=_.check=Ee(q),q=0,W=0,_.mode=U;case U:if(_.havedict===0)return H.next_out=to,H.avail_out=Zt,H.next_in=ue,H.avail_in=fe,_.hold=q,_.bits=W,x;H.adler=_.check=1,_.mode=ce;case ce:if(le===y||le===v)break e;case ye:if(_.last){q>>>=W&7,W-=W&7,_.mode=Y;break}for(;W<3;){if(fe===0)break e;fe--,q+=de[ue++]<<W,W+=8}switch(_.last=q&1,q>>>=1,W-=1,q&3){case 0:_.mode=Te;break;case 1:if(Lu(_),_.mode=ie,le===v){q>>>=2,W-=2;break e}break;case 2:_.mode=pe;break;case 3:H.msg="invalid block type",_.mode=oe}q>>>=2,W-=2;break;case Te:for(q>>>=W&7,W-=W&7;W<32;){if(fe===0)break e;fe--,q+=de[ue++]<<W,W+=8}if((q&65535)!==(q>>>16^65535)){H.msg="invalid stored block lengths",_.mode=oe;break}if(_.length=q&65535,q=0,W=0,_.mode=Ie,le===v)break e;case Ie:_.mode=He;case He:if(be=_.length,be){if(be>fe&&(be=fe),be>Zt&&(be=Zt),be===0)break e;s.arraySet(Ct,de,ue,be,to),fe-=be,ue+=be,Zt-=be,to+=be,_.length-=be;break}_.mode=ce;break;case pe:for(;W<14;){if(fe===0)break e;fe--,q+=de[ue++]<<W,W+=8}if(_.nlen=(q&31)+257,q>>>=5,W-=5,_.ndist=(q&31)+1,q>>>=5,W-=5,_.ncode=(q&15)+4,q>>>=4,W-=4,_.nlen>286||_.ndist>30){H.msg="too many length or distance symbols",_.mode=oe;break}_.have=0,_.mode=Se;case Se:for(;_.have<_.ncode;){for(;W<3;){if(fe===0)break e;fe--,q+=de[ue++]<<W,W+=8}_.lens[Mu[_.have++]]=q&7,q>>>=3,W-=3}for(;_.have<19;)_.lens[Mu[_.have++]]=0;if(_.lencode=_.lendyn,_.lenbits=7,oo={bits:_.lenbits},ro=f(m,_.lens,0,19,_.lencode,0,_.work,oo),_.lenbits=oo.bits,ro){H.msg="invalid code lengths set",_.mode=oe;break}_.have=0,_.mode=J;case J:for(;_.have<_.nlen+_.ndist;){for(;Mt=_.lencode[q&(1<<_.lenbits)-1],$e=Mt>>>24,lr=Mt>>>16&255,ur=Mt&65535,!($e<=W);){if(fe===0)break e;fe--,q+=de[ue++]<<W,W+=8}if(ur<16)q>>>=$e,W-=$e,_.lens[_.have++]=ur;else{if(ur===16){for(To=$e+2;W<To;){if(fe===0)break e;fe--,q+=de[ue++]<<W,W+=8}if(q>>>=$e,W-=$e,_.have===0){H.msg="invalid bit length repeat",_.mode=oe;break}Bt=_.lens[_.have-1],be=3+(q&3),q>>>=2,W-=2}else if(ur===17){for(To=$e+3;W<To;){if(fe===0)break e;fe--,q+=de[ue++]<<W,W+=8}q>>>=$e,W-=$e,Bt=0,be=3+(q&7),q>>>=3,W-=3}else{for(To=$e+7;W<To;){if(fe===0)break e;fe--,q+=de[ue++]<<W,W+=8}q>>>=$e,W-=$e,Bt=0,be=11+(q&127),q>>>=7,W-=7}if(_.have+be>_.nlen+_.ndist){H.msg="invalid bit length repeat",_.mode=oe;break}for(;be--;)_.lens[_.have++]=Bt}}if(_.mode===oe)break;if(_.lens[256]===0){H.msg="invalid code -- missing end-of-block",_.mode=oe;break}if(_.lenbits=9,oo={bits:_.lenbits},ro=f(d,_.lens,0,_.nlen,_.lencode,0,_.work,oo),_.lenbits=oo.bits,ro){H.msg="invalid literal/lengths set",_.mode=oe;break}if(_.distbits=6,_.distcode=_.distdyn,oo={bits:_.distbits},ro=f(h,_.lens,_.nlen,_.ndist,_.distcode,0,_.work,oo),_.distbits=oo.bits,ro){H.msg="invalid distances set",_.mode=oe;break}if(_.mode=ie,le===v)break e;case ie:_.mode=$;case $:if(fe>=6&&Zt>=258){H.next_out=to,H.avail_out=Zt,H.next_in=ue,H.avail_in=fe,_.hold=q,_.bits=W,c(H,vt),to=H.next_out,Ct=H.output,Zt=H.avail_out,ue=H.next_in,de=H.input,fe=H.avail_in,q=_.hold,W=_.bits,_.mode===ce&&(_.back=-1);break}for(_.back=0;Mt=_.lencode[q&(1<<_.lenbits)-1],$e=Mt>>>24,lr=Mt>>>16&255,ur=Mt&65535,!($e<=W);){if(fe===0)break e;fe--,q+=de[ue++]<<W,W+=8}if(lr&&(lr&240)===0){for(yr=$e,Ki=lr,gl=ur;Mt=_.lencode[gl+((q&(1<<yr+Ki)-1)>>yr)],$e=Mt>>>24,lr=Mt>>>16&255,ur=Mt&65535,!(yr+$e<=W);){if(fe===0)break e;fe--,q+=de[ue++]<<W,W+=8}q>>>=yr,W-=yr,_.back+=yr}if(q>>>=$e,W-=$e,_.back+=$e,_.length=ur,lr===0){_.mode=ee;break}if(lr&32){_.back=-1,_.mode=ce;break}if(lr&64){H.msg="invalid literal/length code",_.mode=oe;break}_.extra=lr&15,_.mode=Fe;case Fe:if(_.extra){for(To=_.extra;W<To;){if(fe===0)break e;fe--,q+=de[ue++]<<W,W+=8}_.length+=q&(1<<_.extra)-1,q>>>=_.extra,W-=_.extra,_.back+=_.extra}_.was=_.length,_.mode=Yt;case Yt:for(;Mt=_.distcode[q&(1<<_.distbits)-1],$e=Mt>>>24,lr=Mt>>>16&255,ur=Mt&65535,!($e<=W);){if(fe===0)break e;fe--,q+=de[ue++]<<W,W+=8}if((lr&240)===0){for(yr=$e,Ki=lr,gl=ur;Mt=_.distcode[gl+((q&(1<<yr+Ki)-1)>>yr)],$e=Mt>>>24,lr=Mt>>>16&255,ur=Mt&65535,!(yr+$e<=W);){if(fe===0)break e;fe--,q+=de[ue++]<<W,W+=8}q>>>=yr,W-=yr,_.back+=yr}if(q>>>=$e,W-=$e,_.back+=$e,lr&64){H.msg="invalid distance code",_.mode=oe;break}_.offset=ur,_.extra=lr&15,_.mode=$r;case $r:if(_.extra){for(To=_.extra;W<To;){if(fe===0)break e;fe--,q+=de[ue++]<<W,W+=8}_.offset+=q&(1<<_.extra)-1,q>>>=_.extra,W-=_.extra,_.back+=_.extra}if(_.offset>_.dmax){H.msg="invalid distance too far back",_.mode=oe;break}_.mode=jr;case jr:if(Zt===0)break e;if(be=vt-Zt,_.offset>be){if(be=_.offset-be,be>_.whave&&_.sane){H.msg="invalid distance too far back",_.mode=oe;break}be>_.wnext?(be-=_.wnext,pl=_.wsize-be):pl=_.wnext-be,be>_.length&&(be=_.length),hl=_.window}else hl=Ct,pl=to-_.offset,be=_.length;be>Zt&&(be=Zt),Zt-=be,_.length-=be;do Ct[to++]=hl[pl++];while(--be);_.length===0&&(_.mode=$);break;case ee:if(Zt===0)break e;Ct[to++]=_.length,Zt--,_.mode=$;break;case Y:if(_.wrap){for(;W<32;){if(fe===0)break e;fe--,q|=de[ue++]<<W,W+=8}if(vt-=Zt,H.total_out+=vt,_.total+=vt,vt&&(H.adler=_.check=_.flags?u(_.check,Ct,vt,to-vt):l(_.check,Ct,vt,to-vt)),vt=Zt,(_.flags?q:Ee(q))!==_.check){H.msg="incorrect data check",_.mode=oe;break}q=0,W=0}_.mode=te;case te:if(_.wrap&&_.flags){for(;W<32;){if(fe===0)break e;fe--,q+=de[ue++]<<W,W+=8}if(q!==(_.total&4294967295)){H.msg="incorrect length check",_.mode=oe;break}q=0,W=0}_.mode=X;case X:ro=w;break e;case oe:ro=E;break e;case Pe:return k;case we:default:return T}return H.next_out=to,H.avail_out=Zt,H.next_in=ue,H.avail_in=fe,_.hold=q,_.bits=W,(_.wsize||vt!==H.avail_out&&_.mode<oe&&(_.mode<Y||le!==g))&&ar(H,H.output,H.next_out,vt-H.avail_out)?(_.mode=Pe,k):(ml-=H.avail_in,vt-=H.avail_out,H.total_in+=ml,H.total_out+=vt,_.total+=vt,_.wrap&&vt&&(H.adler=_.check=_.flags?u(_.check,Ct,vt,H.next_out-vt):l(_.check,Ct,vt,H.next_out-vt)),H.data_type=_.bits+(_.last?64:0)+(_.mode===ce?128:0)+(_.mode===ie||_.mode===Ie?256:0),(ml===0&&vt===0||le===g)&&ro===b&&(ro=F),ro)}function dn(H){if(!H||!H.state)return T;var le=H.state;return le.window&&(le.window=null),H.state=null,b}function ai(H,le){var _;return!H||!H.state||(_=H.state,(_.wrap&2)===0)?T:(_.head=le,le.done=!1,b)}function qo(H,le){var _=le.length,de,Ct,ue;return!H||!H.state||(de=H.state,de.wrap!==0&&de.mode!==U)?T:de.mode===U&&(Ct=1,Ct=l(Ct,le,_,0),Ct!==de.check)?E:(ue=ar(H,le,_,_),ue?(de.mode=Pe,k):(de.havedict=1,b))}i.inflateReset=rt,i.inflateReset2=Ot,i.inflateResetKeep=Lt,i.inflateInit=zr,i.inflateInit2=It,i.inflate=vp,i.inflateEnd=dn,i.inflateGetHeader=ai,i.inflateSetDictionary=qo,i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(o,n,i){"use strict";var s=o("../utils/common"),l=15,u=852,c=592,f=0,m=1,d=2,h=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],y=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],v=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];n.exports=function(w,x,T,E,k,F,P,V){var N=V.bits,A=0,S=0,I=0,O=0,z=0,R=0,D=0,G=0,U=0,ce=0,ye,Te,Ie,He,pe,Se=null,J=0,ie,$=new s.Buf16(l+1),Fe=new s.Buf16(l+1),Yt=null,$r=0,jr,ee,Y;for(A=0;A<=l;A++)$[A]=0;for(S=0;S<E;S++)$[x[T+S]]++;for(z=N,O=l;O>=1&&$[O]===0;O--);if(z>O&&(z=O),O===0)return k[F++]=1<<24|64<<16|0,k[F++]=1<<24|64<<16|0,V.bits=1,0;for(I=1;I<O&&$[I]===0;I++);for(z<I&&(z=I),G=1,A=1;A<=l;A++)if(G<<=1,G-=$[A],G<0)return-1;if(G>0&&(w===f||O!==1))return-1;for(Fe[1]=0,A=1;A<l;A++)Fe[A+1]=Fe[A]+$[A];for(S=0;S<E;S++)x[T+S]!==0&&(P[Fe[x[T+S]]++]=S);if(w===f?(Se=Yt=P,ie=19):w===m?(Se=h,J-=257,Yt=g,$r-=257,ie=256):(Se=y,Yt=v,ie=-1),ce=0,S=0,A=I,pe=F,R=z,D=0,Ie=-1,U=1<<z,He=U-1,w===m&&U>u||w===d&&U>c)return 1;for(;;){jr=A-D,P[S]<ie?(ee=0,Y=P[S]):P[S]>ie?(ee=Yt[$r+P[S]],Y=Se[J+P[S]]):(ee=96,Y=0),ye=1<<A-D,Te=1<<R,I=Te;do Te-=ye,k[pe+(ce>>D)+Te]=jr<<24|ee<<16|Y|0;while(Te!==0);for(ye=1<<A-1;ce&ye;)ye>>=1;if(ye!==0?(ce&=ye-1,ce+=ye):ce=0,S++,--$[A]===0){if(A===O)break;A=x[T+P[S]]}if(A>z&&(ce&He)!==Ie){for(D===0&&(D=z),pe+=I,R=A-D,G=1<<R;R+D<O&&(G-=$[R+D],!(G<=0));)R++,G<<=1;if(U+=1<<R,w===m&&U>u||w===d&&U>c)return 1;Ie=ce&He,k[Ie]=z<<24|R<<16|pe-F|0}}return ce!==0&&(k[pe+ce]=A-D<<24|64<<16|0),V.bits=z,0}},{"../utils/common":1}],10:[function(o,n,i){"use strict";n.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(o,n,i){"use strict";function s(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}n.exports=s},{}],"/lib/inflate.js":[function(o,n,i){"use strict";var s=o("./zlib/inflate"),l=o("./utils/common"),u=o("./utils/strings"),c=o("./zlib/constants"),f=o("./zlib/messages"),m=o("./zlib/zstream"),d=o("./zlib/gzheader"),h=Object.prototype.toString;function g(b){if(!(this instanceof g))return new g(b);this.options=l.assign({chunkSize:16384,windowBits:0,to:""},b||{});var w=this.options;w.raw&&w.windowBits>=0&&w.windowBits<16&&(w.windowBits=-w.windowBits,w.windowBits===0&&(w.windowBits=-15)),w.windowBits>=0&&w.windowBits<16&&!(b&&b.windowBits)&&(w.windowBits+=32),w.windowBits>15&&w.windowBits<48&&(w.windowBits&15)===0&&(w.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new m,this.strm.avail_out=0;var x=s.inflateInit2(this.strm,w.windowBits);if(x!==c.Z_OK)throw new Error(f[x]);if(this.header=new d,s.inflateGetHeader(this.strm,this.header),w.dictionary&&(typeof w.dictionary=="string"?w.dictionary=u.string2buf(w.dictionary):h.call(w.dictionary)==="[object ArrayBuffer]"&&(w.dictionary=new Uint8Array(w.dictionary)),w.raw&&(x=s.inflateSetDictionary(this.strm,w.dictionary),x!==c.Z_OK)))throw new Error(f[x])}g.prototype.push=function(b,w){var x=this.strm,T=this.options.chunkSize,E=this.options.dictionary,k,F,P,V,N,A=!1;if(this.ended)return!1;F=w===~~w?w:w===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof b=="string"?x.input=u.binstring2buf(b):h.call(b)==="[object ArrayBuffer]"?x.input=new Uint8Array(b):x.input=b,x.next_in=0,x.avail_in=x.input.length;do{if(x.avail_out===0&&(x.output=new l.Buf8(T),x.next_out=0,x.avail_out=T),k=s.inflate(x,c.Z_NO_FLUSH),k===c.Z_NEED_DICT&&E&&(k=s.inflateSetDictionary(this.strm,E)),k===c.Z_BUF_ERROR&&A===!0&&(k=c.Z_OK,A=!1),k!==c.Z_STREAM_END&&k!==c.Z_OK)return this.onEnd(k),this.ended=!0,!1;x.next_out&&(x.avail_out===0||k===c.Z_STREAM_END||x.avail_in===0&&(F===c.Z_FINISH||F===c.Z_SYNC_FLUSH))&&(this.options.to==="string"?(P=u.utf8border(x.output,x.next_out),V=x.next_out-P,N=u.buf2string(x.output,P),x.next_out=V,x.avail_out=T-V,V&&l.arraySet(x.output,x.output,P,V,0),this.onData(N)):this.onData(l.shrinkBuf(x.output,x.next_out))),x.avail_in===0&&x.avail_out===0&&(A=!0)}while((x.avail_in>0||x.avail_out===0)&&k!==c.Z_STREAM_END);return k===c.Z_STREAM_END&&(F=c.Z_FINISH),F===c.Z_FINISH?(k=s.inflateEnd(this.strm),this.onEnd(k),this.ended=!0,k===c.Z_OK):(F===c.Z_SYNC_FLUSH&&(this.onEnd(c.Z_OK),x.avail_out=0),!0)},g.prototype.onData=function(b){this.chunks.push(b)},g.prototype.onEnd=function(b){b===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=l.flattenChunks(this.chunks)),this.chunks=[],this.err=b,this.msg=this.strm.msg};function y(b,w){var x=new g(w);if(x.push(b,!0),x.err)throw x.msg||f[x.err];return x.result}function v(b,w){return w=w||{},w.raw=!0,y(b,w)}i.Inflate=g,i.inflate=y,i.inflateRaw=v,i.ungzip=y},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")})();var Qfe=globalThis.fetch,Kg=class{constructor(e,t={},r){this.type=e,this.detail=t,this.msg=r,Object.defineProperty(this,"__mayPropagate",{enumerable:!1,writable:!0}),this.__mayPropagate=!0}preventDefault(){}stopPropagation(){this.__mayPropagate=!1}valueOf(){return this}toString(){return this.msg?`[${this.type} event]: ${this.msg}`:`[${this.type} event]`}},bG=class{constructor(){this.listeners={}}addEventListener(e,t,r){let o=this.listeners[e]||[];r?o.unshift(t):o.push(t),this.listeners[e]=o}removeEventListener(e,t){let r=this.listeners[e]||[],o=r.findIndex(n=>n===t);o>-1&&(r.splice(o,1),this.listeners[e]=r)}dispatch(e){let t=this.listeners[e.type];if(t)for(let r=0,o=t.length;r<o&&e.__mayPropagate;r++)t[r](e)}},wG=new Date("1904-01-01T00:00:00+0000").getTime();function xG(e){return Array.from(e).map(t=>String.fromCharCode(t)).join("")}var SG=class{constructor(e,t,r){this.name=(r||e.tag||"").trim(),this.length=e.length,this.start=e.offset,this.offset=0,this.data=t,["getInt8","getUint8","getInt16","getUint16","getInt32","getUint32","getBigInt64","getBigUint64"].forEach(o=>{let n=o.replace(/get(Big)?/,"").toLowerCase(),i=parseInt(o.replace(/[^\d]/g,""))/8;Object.defineProperty(this,n,{get:()=>this.getValue(o,i)})})}get currentPosition(){return this.start+this.offset}set currentPosition(e){this.start=e,this.offset=0}skip(e=0,t=8){this.offset+=e*t/8}getValue(e,t){let r=this.start+this.offset;this.offset+=t;try{return this.data[e](r)}catch(o){throw console.error("parser",e,t,this),console.error("parser",this.start,this.offset),o}}flags(e){if(e===8||e===16||e===32||e===64)return this[`uint${e}`].toString(2).padStart(e,0).split("").map(t=>t==="1");console.error("Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long"),console.trace()}get tag(){let e=this.uint32;return xG([e>>24&255,e>>16&255,e>>8&255,e&255])}get fixed(){let e=this.int16,t=Math.round(1e3*this.uint16/65356);return e+t/1e3}get legacyFixed(){let e=this.uint16,t=this.uint16.toString(16).padStart(4,0);return parseFloat(`${e}.${t}`)}get uint24(){return(this.uint8<<16)+(this.uint8<<8)+this.uint8}get uint128(){let e=0;for(let t=0;t<5;t++){let r=this.uint8;if(e=e*128+(r&127),r<128)break}return e}get longdatetime(){return new Date(wG+1e3*parseInt(this.int64.toString()))}get fword(){return this.int16}get ufword(){return this.uint16}get Offset16(){return this.uint16}get Offset32(){return this.uint32}get F2DOT14(){let e=p.uint16,t=[0,1,-2,-1][e>>14],r=e&16383;return t+r/16384}verifyLength(){this.offset!=this.length&&console.error(`unexpected parsed table size (${this.offset}) for "${this.name}" (expected ${this.length})`)}readBytes(e=0,t=0,r=8,o=!1){if(e=e||this.length,e===0)return[];t&&(this.currentPosition=t);let n=`${o?"":"u"}int${r}`,i=[];for(;e--;)i.push(this[n]);return i}},Gt=class{constructor(e){Object.defineProperty(this,"parser",{enumerable:!1,get:()=>e});let r=e.currentPosition;Object.defineProperty(this,"start",{enumerable:!1,get:()=>r})}load(e){Object.keys(e).forEach(t=>{let r=Object.getOwnPropertyDescriptor(e,t);r.get?this[t]=r.get.bind(this):r.value!==void 0&&(this[t]=r.value)}),this.parser.length&&this.parser.verifyLength()}},Ve=class extends Gt{constructor(e,t,r){let{parser:o,start:n}=super(new SG(e,t,r));Object.defineProperty(this,"p",{enumerable:!1,get:()=>o}),Object.defineProperty(this,"tableStart",{enumerable:!1,get:()=>n})}};function ve(e,t,r){let o;Object.defineProperty(e,t,{get:()=>o||(o=r(),o),enumerable:!0})}var _G=class extends Ve{constructor(e,t,r){let{p:o}=super({offset:0,length:12},t,"sfnt");this.version=o.uint32,this.numTables=o.uint16,this.searchRange=o.uint16,this.entrySelector=o.uint16,this.rangeShift=o.uint16,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(n=>new CG(o)),this.tables={},this.directory.forEach(n=>{let i=()=>r(this.tables,{tag:n.tag,offset:n.offset,length:n.length},t);ve(this.tables,n.tag.trim(),i)})}},CG=class{constructor(e){this.tag=e.tag,this.checksum=e.uint32,this.offset=e.uint32,this.length=e.uint32}},l5=a5.inflate||void 0,u5=void 0,TG=class extends Ve{constructor(e,t,r){let{p:o}=super({offset:0,length:44},t,"woff");this.signature=o.tag,this.flavor=o.uint32,this.length=o.uint32,this.numTables=o.uint16,o.uint16,this.totalSfntSize=o.uint32,this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.metaOffset=o.uint32,this.metaLength=o.uint32,this.metaOrigLength=o.uint32,this.privOffset=o.uint32,this.privLength=o.uint32,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(n=>new EG(o)),PG(this,t,r)}},EG=class{constructor(e){this.tag=e.tag,this.offset=e.uint32,this.compLength=e.uint32,this.origLength=e.uint32,this.origChecksum=e.uint32}};function PG(e,t,r){e.tables={},e.directory.forEach(o=>{ve(e.tables,o.tag.trim(),()=>{let n=0,i=t;if(o.compLength!==o.origLength){let s=t.buffer.slice(o.offset,o.offset+o.compLength),l;if(l5)l=l5(new Uint8Array(s));else if(u5)l=u5(new Uint8Array(s));else{let u="no brotli decoder available to decode WOFF2 font";throw font.onerror&&font.onerror(u),new Error(u)}i=new DataView(l.buffer)}else n=o.offset;return r(e.tables,{tag:o.tag,offset:n,length:o.origLength},i)})})}var c5=s5,f5=void 0,AG=class extends Ve{constructor(e,t,r){let{p:o}=super({offset:0,length:48},t,"woff2");this.signature=o.tag,this.flavor=o.uint32,this.length=o.uint32,this.numTables=o.uint16,o.uint16,this.totalSfntSize=o.uint32,this.totalCompressedSize=o.uint32,this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.metaOffset=o.uint32,this.metaLength=o.uint32,this.metaOrigLength=o.uint32,this.privOffset=o.uint32,this.privLength=o.uint32,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(l=>new kG(o));let n=o.currentPosition;this.directory[0].offset=0,this.directory.forEach((l,u)=>{let c=this.directory[u+1];c&&(c.offset=l.offset+(l.transformLength!==void 0?l.transformLength:l.origLength))});let i,s=t.buffer.slice(n);if(c5)i=c5(new Uint8Array(s));else if(f5)i=new Uint8Array(f5(s));else{let l="no brotli decoder available to decode WOFF2 font";throw e.onerror&&e.onerror(l),new Error(l)}RG(this,i,r)}},kG=class{constructor(e){this.flags=e.uint8;let t=this.tagNumber=this.flags&63;t===63?this.tag=e.tag:this.tag=OG(t);let o=(this.transformVersion=(this.flags&192)>>6)!==0;(this.tag==="glyf"||this.tag==="loca")&&(o=this.transformVersion!==3),this.origLength=e.uint128,o&&(this.transformLength=e.uint128)}};function RG(e,t,r){e.tables={},e.directory.forEach(o=>{ve(e.tables,o.tag.trim(),()=>{let n=o.offset,i=n+(o.transformLength?o.transformLength:o.origLength),s=new DataView(t.slice(n,i).buffer);try{return r(e.tables,{tag:o.tag,offset:0,length:o.origLength},s)}catch(l){console.error(l)}})})}function OG(e){return["cmap","head","hhea","hmtx","maxp","name","OS/2","post","cvt ","fpgm","glyf","loca","prep","CFF ","VORG","EBDT","EBLC","gasp","hdmx","kern","LTSH","PCLT","VDMX","vhea","vmtx","BASE","GDEF","GPOS","GSUB","EBSC","JSTF","MATH","CBDT","CBLC","COLR","CPAL","SVG ","sbix","acnt","avar","bdat","bloc","bsln","cvar","fdsc","feat","fmtx","fvar","gvar","hsty","just","lcar","mort","morx","opbd","prop","trak","Zapf","Silf","Glat","Gloc","Feat","Sill"][e&63]}var y5={},b5=!1;Promise.all([Promise.resolve().then(function(){return iH}),Promise.resolve().then(function(){return aH}),Promise.resolve().then(function(){return uH}),Promise.resolve().then(function(){return dH}),Promise.resolve().then(function(){return pH}),Promise.resolve().then(function(){return bH}),Promise.resolve().then(function(){return xH}),Promise.resolve().then(function(){return _H}),Promise.resolve().then(function(){return FH}),Promise.resolve().then(function(){return UH}),Promise.resolve().then(function(){return OU}),Promise.resolve().then(function(){return FU}),Promise.resolve().then(function(){return LU}),Promise.resolve().then(function(){return zU}),Promise.resolve().then(function(){return HU}),Promise.resolve().then(function(){return WU}),Promise.resolve().then(function(){return ZU}),Promise.resolve().then(function(){return XU}),Promise.resolve().then(function(){return JU}),Promise.resolve().then(function(){return eW}),Promise.resolve().then(function(){return rW}),Promise.resolve().then(function(){return nW}),Promise.resolve().then(function(){return aW}),Promise.resolve().then(function(){return cW}),Promise.resolve().then(function(){return fW}),Promise.resolve().then(function(){return mW}),Promise.resolve().then(function(){return hW}),Promise.resolve().then(function(){return vW}),Promise.resolve().then(function(){return bW}),Promise.resolve().then(function(){return SW}),Promise.resolve().then(function(){return AW}),Promise.resolve().then(function(){return IW}),Promise.resolve().then(function(){return NW}),Promise.resolve().then(function(){return BW}),Promise.resolve().then(function(){return zW}),Promise.resolve().then(function(){return HW}),Promise.resolve().then(function(){return qW}),Promise.resolve().then(function(){return ZW}),Promise.resolve().then(function(){return $W}),Promise.resolve().then(function(){return tq}),Promise.resolve().then(function(){return nq})]).then(e=>{e.forEach(t=>{let r=Object.keys(t)[0];y5[r]=t[r]}),b5=!0});function IG(e,t,r){let o=t.tag.replace(/[^\w\d]/g,""),n=y5[o];return n?new n(t,r,e):(console.warn(`lib-font has no definition for ${o}. The table was skipped.`),{})}function FG(){let e=0;function t(r,o){if(!b5)return e>10?o(new Error("loading took too long")):(e++,setTimeout(()=>t(r),250));r(IG)}return new Promise((r,o)=>t(r))}function VG(e,t){let r=e.lastIndexOf("."),o=(e.substring(r+1)||"").toLowerCase(),n={ttf:"truetype",otf:"opentype",woff:"woff",woff2:"woff2"}[o];if(n)return n;let i={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.",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.",fon:"The .fon format is not supported: this is an ancient Windows bitmap font format.",ttc:"Based on the current CSS specification, font collections are not (yet?) supported."}[o];if(i||(i=`${e} is not a known webfont format.`),t)throw new Error(i);console.warn(`Could not load font: ${i}`)}async function NG(e,t,r={}){if(!globalThis.document)return;let o=VG(t,r.errorOnStyle);if(!o)return;let n=document.createElement("style");n.className="injected-by-Font-js";let i=[];return r.styleRules&&(i=Object.entries(r.styleRules).map(([s,l])=>`${s}: ${l};`)),n.textContent=`
@font-face {
    font-family: "${e}";
    ${i.join(`
	`)}
    src: url("${t}") format("${o}");
}`,globalThis.document.head.appendChild(n),n}var DG=[0,1,0,0],LG=[79,84,84,79],MG=[119,79,70,70],BG=[119,79,70,50];function Xg(e,t){if(e.length===t.length){for(let r=0;r<e.length;r++)if(e[r]!==t[r])return;return!0}}function jG(e){let t=[e.getUint8(0),e.getUint8(1),e.getUint8(2),e.getUint8(3)];if(Xg(t,DG)||Xg(t,LG))return"SFNT";if(Xg(t,MG))return"WOFF";if(Xg(t,BG))return"WOFF2"}function zG(e){if(!e.ok)throw new Error(`HTTP ${e.status} - ${e.statusText}`);return e}var w5=class extends bG{constructor(e,t={}){super(),this.name=e,this.options=t,this.metrics=!1}get src(){return this.__src}set src(e){this.__src=e,(async()=>(globalThis.document&&!this.options.skipStyleSheet&&await NG(this.name,e,this.options),this.loadFont(e)))()}async loadFont(e,t){fetch(e).then(r=>zG(r)&&r.arrayBuffer()).then(r=>this.fromDataBuffer(r,t||e)).catch(r=>{let o=new Kg("error",r,`Failed to load font at ${t||e}`);this.dispatch(o),this.onerror&&this.onerror(o)})}async fromDataBuffer(e,t){this.fontData=new DataView(e);let r=jG(this.fontData);if(!r)throw new Error(`${t} is either an unsupported font format, or not a font at all.`);await this.parseBasicData(r);let o=new Kg("load",{font:this});this.dispatch(o),this.onload&&this.onload(o)}async parseBasicData(e){return FG().then(t=>(e==="SFNT"&&(this.opentype=new _G(this,this.fontData,t)),e==="WOFF"&&(this.opentype=new TG(this,this.fontData,t)),e==="WOFF2"&&(this.opentype=new AG(this,this.fontData,t)),this.opentype))}getGlyphId(e){return this.opentype.tables.cmap.getGlyphId(e)}reverse(e){return this.opentype.tables.cmap.reverse(e)}supports(e){return this.getGlyphId(e)!==0}supportsVariation(e){return this.opentype.tables.cmap.supportsVariation(e)!==!1}measureText(e,t=16){if(this.__unloaded)throw new Error("Cannot measure text: font was unloaded. Please reload before calling measureText()");let r=document.createElement("div");r.textContent=e,r.style.fontFamily=this.name,r.style.fontSize=`${t}px`,r.style.color="transparent",r.style.background="transparent",r.style.top="0",r.style.left="0",r.style.position="absolute",document.body.appendChild(r);let o=r.getBoundingClientRect();document.body.removeChild(r);let n=this.opentype.tables["OS/2"];return o.fontSize=t,o.ascender=n.sTypoAscender,o.descender=n.sTypoDescender,o}unload(){if(this.styleElement.parentNode){this.styleElement.parentNode.removeElement(this.styleElement);let e=new Kg("unload",{font:this});this.dispatch(e),this.onunload&&this.onunload(e)}this._unloaded=!0}load(){if(this.__unloaded){delete this.__unloaded,document.head.appendChild(this.styleElement);let e=new Kg("load",{font:this});this.dispatch(e),this.onload&&this.onload(e)}}};globalThis.Font=w5;var ls=class extends Gt{constructor(e,t,r){super(e),this.plaformID=t,this.encodingID=r}},GG=class extends ls{constructor(e,t,r){super(e,t,r),this.format=0,this.length=e.uint16,this.language=e.uint16,this.glyphIdArray=[...new Array(256)].map(o=>e.uint8)}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.")),0<=e&&e<=255}reverse(e){return console.warn("reverse not implemented for cmap subtable format 0"),{}}getSupportedCharCodes(){return[{start:1,end:256}]}},HG=class extends ls{constructor(e,t,r){super(e,t,r),this.format=2,this.length=e.uint16,this.language=e.uint16,this.subHeaderKeys=[...new Array(256)].map(s=>e.uint16);let o=Math.max(...this.subHeaderKeys),n=e.currentPosition;ve(this,"subHeaders",()=>(e.currentPosition=n,[...new Array(o)].map(s=>new UG(e))));let i=n+o*8;ve(this,"glyphIndexArray",()=>(e.currentPosition=i,[...new Array(o)].map(s=>e.uint16)))}supports(e){e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented."));let t=e&&255,r=e&&65280,o=this.subHeaders[r],n=this.subHeaders[o],i=n.firstCode,s=i+n.entryCount;return i<=t&&t<=s}reverse(e){return console.warn("reverse not implemented for cmap subtable format 2"),{}}getSupportedCharCodes(e=!1){return e?this.subHeaders.map(t=>({firstCode:t.firstCode,lastCode:t.lastCode})):this.subHeaders.map(t=>({start:t.firstCode,end:t.lastCode}))}},UG=class{constructor(e){this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.first+this.entryCount,this.idDelta=e.int16,this.idRangeOffset=e.uint16}},WG=class extends ls{constructor(e,t,r){super(e,t,r),this.format=4,this.length=e.uint16,this.language=e.uint16,this.segCountX2=e.uint16,this.segCount=this.segCountX2/2,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16;let o=e.currentPosition;ve(this,"endCode",()=>e.readBytes(this.segCount,o,16));let n=o+2+this.segCountX2;ve(this,"startCode",()=>e.readBytes(this.segCount,n,16));let i=n+this.segCountX2;ve(this,"idDelta",()=>e.readBytes(this.segCount,i,16,!0));let s=i+this.segCountX2;ve(this,"idRangeOffset",()=>e.readBytes(this.segCount,s,16));let l=s+this.segCountX2,u=this.length-(l-this.tableStart);ve(this,"glyphIdArray",()=>e.readBytes(u,l,16)),ve(this,"segments",()=>this.buildSegments(s,l,e))}buildSegments(e,t,r){let o=(n,i)=>{let s=this.startCode[i],l=this.endCode[i],u=this.idDelta[i],c=this.idRangeOffset[i],f=e+2*i,m=[];if(c===0)for(let d=s+u,h=l+u;d<=h;d++)m.push(d);else for(let d=0,h=l-s;d<=h;d++)r.currentPosition=f+c+d*2,m.push(r.uint16);return{startCode:s,endCode:l,idDelta:u,idRangeOffset:c,glyphIDs:m}};return[...new Array(this.segCount)].map(o)}reverse(e){let t=this.segments.find(o=>o.glyphIDs.includes(e));if(!t)return{};let r=t.startCode+t.glyphIDs.indexOf(e);return{code:r,unicode:String.fromCodePoint(r)}}getGlyphId(e){if(e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343||(e&65534)===65534||(e&65535)===65535)return 0;let t=this.segments.find(r=>r.startCode<=e&&e<=r.endCode);return t?t.glyphIDs[e-t.startCode]:0}supports(e){return this.getGlyphId(e)!==0}getSupportedCharCodes(e=!1){return e?this.segments:this.segments.map(t=>({start:t.startCode,end:t.endCode}))}},qG=class extends ls{constructor(e,t,r){super(e,t,r),this.format=6,this.length=e.uint16,this.language=e.uint16,this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.firstCode+this.entryCount-1,ve(this,"glyphIdArray",()=>[...new Array(this.entryCount)].map(n=>e.uint16))}supports(e){if(e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.")),e<this.firstCode)return{};if(e>this.firstCode+this.entryCount)return{};let t=e-this.firstCode;return{code:t,unicode:String.fromCodePoint(t)}}reverse(e){let t=this.glyphIdArray.indexOf(e);if(t>-1)return this.firstCode+t}getSupportedCharCodes(e=!1){return e?[{firstCode:this.firstCode,lastCode:this.lastCode}]:[{start:this.firstCode,end:this.lastCode}]}},YG=class extends ls{constructor(e,t,r){super(e,t,r),this.format=8,e.uint16,this.length=e.uint32,this.language=e.uint32,this.is32=[...new Array(8192)].map(n=>e.uint8),this.numGroups=e.uint32,ve(this,"groups",()=>[...new Array(this.numGroups)].map(n=>new ZG(e)))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.")),this.groups.findIndex(t=>t.startcharCode<=e&&e<=t.endcharCode)!==-1}reverse(e){return console.warn("reverse not implemented for cmap subtable format 8"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map(t=>({start:t.startcharCode,end:t.endcharCode}))}},ZG=class{constructor(e){this.startcharCode=e.uint32,this.endcharCode=e.uint32,this.startGlyphID=e.uint32}},KG=class extends ls{constructor(e,t,r){super(e,t,r),this.format=10,e.uint16,this.length=e.uint32,this.language=e.uint32,this.startCharCode=e.uint32,this.numChars=e.uint32,this.endCharCode=this.startCharCode+this.numChars,ve(this,"glyphs",()=>[...new Array(this.numChars)].map(n=>e.uint16))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.")),e<this.startCharCode||e>this.startCharCode+this.numChars?!1:e-this.startCharCode}reverse(e){return console.warn("reverse not implemented for cmap subtable format 10"),{}}getSupportedCharCodes(e=!1){return e?[{startCharCode:this.startCharCode,endCharCode:this.endCharCode}]:[{start:this.startCharCode,end:this.endCharCode}]}},XG=class extends ls{constructor(e,t,r){super(e,t,r),this.format=12,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32,ve(this,"groups",()=>[...new Array(this.numGroups)].map(n=>new QG(e)))}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343||(e&65534)===65534||(e&65535)===65535?0:this.groups.findIndex(t=>t.startCharCode<=e&&e<=t.endCharCode)!==-1}reverse(e){for(let t of this.groups){let r=t.startGlyphID;if(r>e)continue;if(r===e)return t.startCharCode;if(r+(t.endCharCode-t.startCharCode)<e)continue;let n=t.startCharCode+(e-r);return{code:n,unicode:String.fromCodePoint(n)}}return{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map(t=>({start:t.startCharCode,end:t.endCharCode}))}},QG=class{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.startGlyphID=e.uint32}},JG=class extends ls{constructor(e,t,r){super(e,t,r),this.format=13,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32;let o=[...new Array(this.numGroups)].map(n=>new $G(e));ve(this,"groups",o)}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),this.groups.findIndex(t=>t.startCharCode<=e&&e<=t.endCharCode)!==-1}reverse(e){return console.warn("reverse not implemented for cmap subtable format 13"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map(t=>({start:t.startCharCode,end:t.endCharCode}))}},$G=class{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.glyphID=e.uint32}},eH=class extends ls{constructor(e,t,r){super(e,t,r),this.subTableStart=e.currentPosition,this.format=14,this.length=e.uint32,this.numVarSelectorRecords=e.uint32,ve(this,"varSelectors",()=>[...new Array(this.numVarSelectorRecords)].map(o=>new tH(e)))}supports(){return console.warn("supports not implemented for cmap subtable format 14"),0}getSupportedCharCodes(){return console.warn("getSupportedCharCodes not implemented for cmap subtable format 14"),[]}reverse(e){return console.warn("reverse not implemented for cmap subtable format 14"),{}}supportsVariation(e){let t=this.varSelector.find(r=>r.varSelector===e);return t||!1}getSupportedVariations(){return this.varSelectors.map(e=>e.varSelector)}},tH=class{constructor(e){this.varSelector=e.uint24,this.defaultUVSOffset=e.Offset32,this.nonDefaultUVSOffset=e.Offset32}};function rH(e,t,r){let o=e.uint16;return o===0?new GG(e,t,r):o===2?new HG(e,t,r):o===4?new WG(e,t,r):o===6?new qG(e,t,r):o===8?new YG(e,t,r):o===10?new KG(e,t,r):o===12?new XG(e,t,r):o===13?new JG(e,t,r):o===14?new eH(e,t,r):{}}var oH=class extends Ve{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numTables=r.uint16,this.encodingRecords=[...new Array(this.numTables)].map(o=>new nH(r,this.tableStart))}getSubTable(e){return this.encodingRecords[e].table}getSupportedEncodings(){return this.encodingRecords.map(e=>({platformID:e.platformID,encodingId:e.encodingID}))}getSupportedCharCodes(e,t){let r=this.encodingRecords.findIndex(n=>n.platformID===e&&n.encodingID===t);return r===-1?!1:this.getSubTable(r).getSupportedCharCodes()}reverse(e){for(let t=0;t<this.numTables;t++){let r=this.getSubTable(t).reverse(e);if(r)return r}}getGlyphId(e){let t=0;return this.encodingRecords.some((r,o)=>{let n=this.getSubTable(o);return n.getGlyphId?(t=n.getGlyphId(e),t!==0):!1}),t}supports(e){return this.encodingRecords.some((t,r)=>{let o=this.getSubTable(r);return o.supports&&o.supports(e)!==!1})}supportsVariation(e){return this.encodingRecords.some((t,r)=>{let o=this.getSubTable(r);return o.supportsVariation&&o.supportsVariation(e)!==!1})}},nH=class{constructor(e,t){let r=this.platformID=e.uint16,o=this.encodingID=e.uint16,n=this.offset=e.Offset32;ve(this,"table",()=>(e.currentPosition=t+n,rH(e,r,o)))}},iH=Object.freeze({__proto__:null,cmap:oH}),sH=class extends Ve{constructor(e,t){let{p:r}=super(e,t);this.load({majorVersion:r.uint16,minorVersion:r.uint16,fontRevision:r.fixed,checkSumAdjustment:r.uint32,magicNumber:r.uint32,flags:r.flags(16),unitsPerEm:r.uint16,created:r.longdatetime,modified:r.longdatetime,xMin:r.int16,yMin:r.int16,xMax:r.int16,yMax:r.int16,macStyle:r.flags(16),lowestRecPPEM:r.uint16,fontDirectionHint:r.uint16,indexToLocFormat:r.uint16,glyphDataFormat:r.uint16})}},aH=Object.freeze({__proto__:null,head:sH}),lH=class extends Ve{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.ascender=r.fword,this.descender=r.fword,this.lineGap=r.fword,this.advanceWidthMax=r.ufword,this.minLeftSideBearing=r.fword,this.minRightSideBearing=r.fword,this.xMaxExtent=r.fword,this.caretSlopeRise=r.int16,this.caretSlopeRun=r.int16,this.caretOffset=r.int16,r.int16,r.int16,r.int16,r.int16,this.metricDataFormat=r.int16,this.numberOfHMetrics=r.uint16,r.verifyLength()}},uH=Object.freeze({__proto__:null,hhea:lH}),cH=class extends Ve{constructor(e,t,r){let{p:o}=super(e,t),n=r.hhea.numberOfHMetrics,i=r.maxp.numGlyphs,s=o.currentPosition;if(ve(this,"hMetrics",()=>(o.currentPosition=s,[...new Array(n)].map(l=>new fH(o.uint16,o.int16)))),n<i){let l=s+n*4;ve(this,"leftSideBearings",()=>(o.currentPosition=l,[...new Array(i-n)].map(u=>o.int16)))}}},fH=class{constructor(e,t){this.advanceWidth=e,this.lsb=t}},dH=Object.freeze({__proto__:null,hmtx:cH}),mH=class extends Ve{constructor(e,t){let{p:r}=super(e,t);this.version=r.legacyFixed,this.numGlyphs=r.uint16,this.version===1&&(this.maxPoints=r.uint16,this.maxContours=r.uint16,this.maxCompositePoints=r.uint16,this.maxCompositeContours=r.uint16,this.maxZones=r.uint16,this.maxTwilightPoints=r.uint16,this.maxStorage=r.uint16,this.maxFunctionDefs=r.uint16,this.maxInstructionDefs=r.uint16,this.maxStackElements=r.uint16,this.maxSizeOfInstructions=r.uint16,this.maxComponentElements=r.uint16,this.maxComponentDepth=r.uint16),r.verifyLength()}},pH=Object.freeze({__proto__:null,maxp:mH}),hH=class extends Ve{constructor(e,t){let{p:r}=super(e,t);this.format=r.uint16,this.count=r.uint16,this.stringOffset=r.Offset16,this.nameRecords=[...new Array(this.count)].map(o=>new vH(r,this)),this.format===1&&(this.langTagCount=r.uint16,this.langTagRecords=[...new Array(this.langTagCount)].map(o=>new gH(r.uint16,r.Offset16))),this.stringStart=this.tableStart+this.stringOffset}get(e){let t=this.nameRecords.find(r=>r.nameID===e);if(t)return t.string}},gH=class{constructor(e,t){this.length=e,this.offset=t}},vH=class{constructor(e,t){this.platformID=e.uint16,this.encodingID=e.uint16,this.languageID=e.uint16,this.nameID=e.uint16,this.length=e.uint16,this.offset=e.Offset16,ve(this,"string",()=>(e.currentPosition=t.stringStart+this.offset,yH(e,this)))}};function yH(e,t){let{platformID:r,length:o}=t;if(o===0)return"";if(r===0||r===3){let s=[];for(let l=0,u=o/2;l<u;l++)s[l]=String.fromCharCode(e.uint16);return s.join("")}let n=e.readBytes(o),i=[];return n.forEach(function(s,l){i[l]=String.fromCharCode(s)}),i.join("")}var bH=Object.freeze({__proto__:null,name:hH}),wH=class extends Ve{constructor(e,t){let{p:r}=super(e,t);if(this.version=r.uint16,this.xAvgCharWidth=r.int16,this.usWeightClass=r.uint16,this.usWidthClass=r.uint16,this.fsType=r.uint16,this.ySubscriptXSize=r.int16,this.ySubscriptYSize=r.int16,this.ySubscriptXOffset=r.int16,this.ySubscriptYOffset=r.int16,this.ySuperscriptXSize=r.int16,this.ySuperscriptYSize=r.int16,this.ySuperscriptXOffset=r.int16,this.ySuperscriptYOffset=r.int16,this.yStrikeoutSize=r.int16,this.yStrikeoutPosition=r.int16,this.sFamilyClass=r.int16,this.panose=[...new Array(10)].map(o=>r.uint8),this.ulUnicodeRange1=r.flags(32),this.ulUnicodeRange2=r.flags(32),this.ulUnicodeRange3=r.flags(32),this.ulUnicodeRange4=r.flags(32),this.achVendID=r.tag,this.fsSelection=r.uint16,this.usFirstCharIndex=r.uint16,this.usLastCharIndex=r.uint16,this.sTypoAscender=r.int16,this.sTypoDescender=r.int16,this.sTypoLineGap=r.int16,this.usWinAscent=r.uint16,this.usWinDescent=r.uint16,this.version===0||(this.ulCodePageRange1=r.flags(32),this.ulCodePageRange2=r.flags(32),this.version===1)||(this.sxHeight=r.int16,this.sCapHeight=r.int16,this.usDefaultChar=r.uint16,this.usBreakChar=r.uint16,this.usMaxContext=r.uint16,this.version<=4)||(this.usLowerOpticalPointSize=r.uint16,this.usUpperOpticalPointSize=r.uint16,this.version===5))return r.verifyLength()}},xH=Object.freeze({__proto__:null,OS2:wH}),SH=class extends Ve{constructor(e,t){let{p:r}=super(e,t);if(this.version=r.legacyFixed,this.italicAngle=r.fixed,this.underlinePosition=r.fword,this.underlineThickness=r.fword,this.isFixedPitch=r.uint32,this.minMemType42=r.uint32,this.maxMemType42=r.uint32,this.minMemType1=r.uint32,this.maxMemType1=r.uint32,this.version===1||this.version===3)return r.verifyLength();if(this.numGlyphs=r.uint16,this.version===2){this.glyphNameIndex=[...new Array(this.numGlyphs)].map(o=>r.uint16),this.namesOffset=r.currentPosition,this.glyphNameOffsets=[1];for(let o=0;o<this.numGlyphs;o++){if(this.glyphNameIndex[o]<d5.length){this.glyphNameOffsets.push(this.glyphNameOffsets[o]);continue}let i=r.int8;r.skip(i),this.glyphNameOffsets.push(this.glyphNameOffsets[o]+i+1)}}this.version===2.5&&(this.offset=[...new Array(this.numGlyphs)].map(o=>r.int8))}getGlyphName(e){if(this.version!==2)return console.warn(`post table version ${this.version} does not support glyph name lookups`),"";let t=this.glyphNameIndex[e];if(t<258)return d5[t];let r=this.glyphNameOffsets[e],n=this.glyphNameOffsets[e+1]-r-1;return n===0?".notdef.":(this.parser.currentPosition=this.namesOffset+r,this.parser.readBytes(n,this.namesOffset+r,8,!0).map(s=>String.fromCharCode(s)).join(""))}},d5=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"],_H=Object.freeze({__proto__:null,post:SH}),CH=class extends Ve{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.horizAxisOffset=r.Offset16,this.vertAxisOffset=r.Offset16,ve(this,"horizAxis",()=>new gS({offset:e.offset+this.horizAxisOffset},t)),ve(this,"vertAxis",()=>new gS({offset:e.offset+this.vertAxisOffset},t)),this.majorVersion===1&&this.minorVersion===1&&(this.itemVarStoreOffset=r.Offset32,ve(this,"itemVarStore",()=>new gS({offset:e.offset+this.itemVarStoreOffset},t)))}},gS=class extends Ve{constructor(e,t){let{p:r}=super(e,t,"AxisTable");this.baseTagListOffset=r.Offset16,this.baseScriptListOffset=r.Offset16,ve(this,"baseTagList",()=>new TH({offset:e.offset+this.baseTagListOffset},t)),ve(this,"baseScriptList",()=>new EH({offset:e.offset+this.baseScriptListOffset},t))}},TH=class extends Ve{constructor(e,t){let{p:r}=super(e,t,"BaseTagListTable");this.baseTagCount=r.uint16,this.baselineTags=[...new Array(this.baseTagCount)].map(o=>r.tag)}},EH=class extends Ve{constructor(e,t){let{p:r}=super(e,t,"BaseScriptListTable");this.baseScriptCount=r.uint16;let o=r.currentPosition;ve(this,"baseScriptRecords",()=>(r.currentPosition=o,[...new Array(this.baseScriptCount)].map(n=>new PH(this.start,r))))}},PH=class{constructor(e,t){this.baseScriptTag=t.tag,this.baseScriptOffset=t.Offset16,ve(this,"baseScriptTable",()=>(t.currentPosition=e+this.baseScriptOffset,new AH(t)))}},AH=class{constructor(e){this.start=e.currentPosition,this.baseValuesOffset=e.Offset16,this.defaultMinMaxOffset=e.Offset16,this.baseLangSysCount=e.uint16,this.baseLangSysRecords=[...new Array(this.baseLangSysCount)].map(t=>new kH(this.start,e)),ve(this,"baseValues",()=>(e.currentPosition=this.start+this.baseValuesOffset,new RH(e))),ve(this,"defaultMinMax",()=>(e.currentPosition=this.start+this.defaultMinMaxOffset,new x5(e)))}},kH=class{constructor(e,t){this.baseLangSysTag=t.tag,this.minMaxOffset=t.Offset16,ve(this,"minMax",()=>(t.currentPosition=e+this.minMaxOffset,new x5(t)))}},RH=class{constructor(e){this.parser=e,this.start=e.currentPosition,this.defaultBaselineIndex=e.uint16,this.baseCoordCount=e.uint16,this.baseCoords=[...new Array(this.baseCoordCount)].map(t=>e.Offset16)}getTable(e){return this.parser.currentPosition=this.start+this.baseCoords[e],new IH(this.parser)}},x5=class{constructor(e){this.minCoord=e.Offset16,this.maxCoord=e.Offset16,this.featMinMaxCount=e.uint16;let t=e.currentPosition;ve(this,"featMinMaxRecords",()=>(e.currentPosition=t,[...new Array(this.featMinMaxCount)].map(r=>new OH(e))))}},OH=class{constructor(e){this.featureTableTag=e.tag,this.minCoord=e.Offset16,this.maxCoord=e.Offset16}},IH=class{constructor(e){this.baseCoordFormat=e.uint16,this.coordinate=e.int16,this.baseCoordFormat===2&&(this.referenceGlyph=e.uint16,this.baseCoordPoint=e.uint16),this.baseCoordFormat===3&&(this.deviceTable=e.Offset16)}},FH=Object.freeze({__proto__:null,BASE:CH}),m5=class{constructor(e){this.classFormat=e.uint16,this.classFormat===1&&(this.startGlyphID=e.uint16,this.glyphCount=e.uint16,this.classValueArray=[...new Array(this.glyphCount)].map(t=>e.uint16)),this.classFormat===2&&(this.classRangeCount=e.uint16,this.classRangeRecords=[...new Array(this.classRangeCount)].map(t=>new VH(e)))}},VH=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.class=e.uint16}},$d=class extends Gt{constructor(e){super(e),this.coverageFormat=e.uint16,this.coverageFormat===1&&(this.glyphCount=e.uint16,this.glyphArray=[...new Array(this.glyphCount)].map(t=>e.uint16)),this.coverageFormat===2&&(this.rangeCount=e.uint16,this.rangeRecords=[...new Array(this.rangeCount)].map(t=>new NH(e)))}},NH=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.startCoverageIndex=e.uint16}},DH=class{constructor(e,t){this.table=e,this.parser=t,this.start=t.currentPosition,this.format=t.uint16,this.variationRegionListOffset=t.Offset32,this.itemVariationDataCount=t.uint16,this.itemVariationDataOffsets=[...new Array(this.itemVariationDataCount)].map(r=>t.Offset32)}},LH=class extends Ve{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.glyphClassDefOffset=r.Offset16,ve(this,"glyphClassDefs",()=>{if(this.glyphClassDefOffset!==0)return r.currentPosition=this.tableStart+this.glyphClassDefOffset,new m5(r)}),this.attachListOffset=r.Offset16,ve(this,"attachList",()=>{if(this.attachListOffset!==0)return r.currentPosition=this.tableStart+this.attachListOffset,new MH(r)}),this.ligCaretListOffset=r.Offset16,ve(this,"ligCaretList",()=>{if(this.ligCaretListOffset!==0)return r.currentPosition=this.tableStart+this.ligCaretListOffset,new jH(r)}),this.markAttachClassDefOffset=r.Offset16,ve(this,"markAttachClassDef",()=>{if(this.markAttachClassDefOffset!==0)return r.currentPosition=this.tableStart+this.markAttachClassDefOffset,new m5(r)}),this.minorVersion>=2&&(this.markGlyphSetsDefOffset=r.Offset16,ve(this,"markGlyphSetsDef",()=>{if(this.markGlyphSetsDefOffset!==0)return r.currentPosition=this.tableStart+this.markGlyphSetsDefOffset,new HH(r)})),this.minorVersion===3&&(this.itemVarStoreOffset=r.Offset32,ve(this,"itemVarStore",()=>{if(this.itemVarStoreOffset!==0)return r.currentPosition=this.tableStart+this.itemVarStoreOffset,new DH(r)}))}},MH=class extends Gt{constructor(e){super(e),this.coverageOffset=e.Offset16,this.glyphCount=e.uint16,this.attachPointOffsets=[...new Array(this.glyphCount)].map(t=>e.Offset16)}getPoint(e){return this.parser.currentPosition=this.start+this.attachPointOffsets[e],new BH(this.parser)}},BH=class{constructor(e){this.pointCount=e.uint16,this.pointIndices=[...new Array(this.pointCount)].map(t=>e.uint16)}},jH=class extends Gt{constructor(e){super(e),this.coverageOffset=e.Offset16,ve(this,"coverage",()=>(e.currentPosition=this.start+this.coverageOffset,new $d(e))),this.ligGlyphCount=e.uint16,this.ligGlyphOffsets=[...new Array(this.ligGlyphCount)].map(t=>e.Offset16)}getLigGlyph(e){return this.parser.currentPosition=this.start+this.ligGlyphOffsets[e],new zH(this.parser)}},zH=class extends Gt{constructor(e){super(e),this.caretCount=e.uint16,this.caretValueOffsets=[...new Array(this.caretCount)].map(t=>e.Offset16)}getCaretValue(e){return this.parser.currentPosition=this.start+this.caretValueOffsets[e],new GH(this.parser)}},GH=class{constructor(e){this.caretValueFormat=e.uint16,this.caretValueFormat===1&&(this.coordinate=e.int16),this.caretValueFormat===2&&(this.caretValuePointIndex=e.uint16),this.caretValueFormat===3&&(this.coordinate=e.int16,this.deviceOffset=e.Offset16)}},HH=class extends Gt{constructor(e){super(e),this.markGlyphSetTableFormat=e.uint16,this.markGlyphSetCount=e.uint16,this.coverageOffsets=[...new Array(this.markGlyphSetCount)].map(t=>e.Offset32)}getMarkGlyphSet(e){return this.parser.currentPosition=this.start+this.coverageOffsets[e],new $d(this.parser)}},UH=Object.freeze({__proto__:null,GDEF:LH}),p5=class extends Gt{static EMPTY={scriptCount:0,scriptRecords:[]};constructor(e){super(e),this.scriptCount=e.uint16,this.scriptRecords=[...new Array(this.scriptCount)].map(t=>new WH(e))}},WH=class{constructor(e){this.scriptTag=e.tag,this.scriptOffset=e.Offset16}},qH=class extends Gt{constructor(e){super(e),this.defaultLangSys=e.Offset16,this.langSysCount=e.uint16,this.langSysRecords=[...new Array(this.langSysCount)].map(t=>new YH(e))}},YH=class{constructor(e){this.langSysTag=e.tag,this.langSysOffset=e.Offset16}},h5=class{constructor(e){this.lookupOrder=e.Offset16,this.requiredFeatureIndex=e.uint16,this.featureIndexCount=e.uint16,this.featureIndices=[...new Array(this.featureIndexCount)].map(t=>e.uint16)}},g5=class extends Gt{static EMPTY={featureCount:0,featureRecords:[]};constructor(e){super(e),this.featureCount=e.uint16,this.featureRecords=[...new Array(this.featureCount)].map(t=>new ZH(e))}},ZH=class{constructor(e){this.featureTag=e.tag,this.featureOffset=e.Offset16}},KH=class extends Gt{constructor(e){super(e),this.featureParams=e.Offset16,this.lookupIndexCount=e.uint16,this.lookupListIndices=[...new Array(this.lookupIndexCount)].map(t=>e.uint16)}getFeatureParams(){if(this.featureParams>0){let e=this.parser;e.currentPosition=this.start+this.featureParams;let t=this.featureTag;if(t==="size")return new QH(e);if(t.startsWith("cc"))return new XH(e);if(t.startsWith("ss"))return new JH(e)}}},XH=class{constructor(e){this.format=e.uint16,this.featUiLabelNameId=e.uint16,this.featUiTooltipTextNameId=e.uint16,this.sampleTextNameId=e.uint16,this.numNamedParameters=e.uint16,this.firstParamUiLabelNameId=e.uint16,this.charCount=e.uint16,this.character=[...new Array(this.charCount)].map(t=>e.uint24)}},QH=class{constructor(e){this.designSize=e.uint16,this.subfamilyIdentifier=e.uint16,this.subfamilyNameID=e.uint16,this.smallEnd=e.uint16,this.largeEnd=e.uint16}},JH=class{constructor(e){this.version=e.uint16,this.UINameID=e.uint16}};function S5(e){e.parser.currentPosition-=2,delete e.coverageOffset,delete e.getCoverageTable}var zl=class extends Gt{constructor(e){super(e),this.substFormat=e.uint16,this.coverageOffset=e.Offset16}getCoverageTable(){let e=this.parser;return e.currentPosition=this.start+this.coverageOffset,new $d(e)}},yS=class{constructor(e){this.glyphSequenceIndex=e.uint16,this.lookupListIndex=e.uint16}},$H=class extends zl{constructor(e){super(e),this.deltaGlyphID=e.int16}},eU=class extends zl{constructor(e){super(e),this.sequenceCount=e.uint16,this.sequenceOffsets=[...new Array(this.sequenceCount)].map(t=>e.Offset16)}getSequence(e){let t=this.parser;return t.currentPosition=this.start+this.sequenceOffsets[e],new tU(t)}},tU=class{constructor(e){this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},rU=class extends zl{constructor(e){super(e),this.alternateSetCount=e.uint16,this.alternateSetOffsets=[...new Array(this.alternateSetCount)].map(t=>e.Offset16)}getAlternateSet(e){let t=this.parser;return t.currentPosition=this.start+this.alternateSetOffsets[e],new oU(t)}},oU=class{constructor(e){this.glyphCount=e.uint16,this.alternateGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},nU=class extends zl{constructor(e){super(e),this.ligatureSetCount=e.uint16,this.ligatureSetOffsets=[...new Array(this.ligatureSetCount)].map(t=>e.Offset16)}getLigatureSet(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureSetOffsets[e],new iU(t)}},iU=class extends Gt{constructor(e){super(e),this.ligatureCount=e.uint16,this.ligatureOffsets=[...new Array(this.ligatureCount)].map(t=>e.Offset16)}getLigature(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureOffsets[e],new sU(t)}},sU=class{constructor(e){this.ligatureGlyph=e.uint16,this.componentCount=e.uint16,this.componentGlyphIDs=[...new Array(this.componentCount-1)].map(t=>e.uint16)}},aU=class extends zl{constructor(e){super(e),this.substFormat===1&&(this.subRuleSetCount=e.uint16,this.subRuleSetOffsets=[...new Array(this.subRuleSetCount)].map(t=>e.Offset16)),this.substFormat===2&&(this.classDefOffset=e.Offset16,this.subClassSetCount=e.uint16,this.subClassSetOffsets=[...new Array(this.subClassSetCount)].map(t=>e.Offset16)),this.substFormat===3&&(S5(this),this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.coverageOffsets=[...new Array(this.glyphCount)].map(t=>e.Offset16),this.substLookupRecords=[...new Array(this.substitutionCount)].map(t=>new yS(e)))}getSubRuleSet(e){if(this.substFormat!==1)throw new Error(`lookup type 5.${this.substFormat} has no subrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.subRuleSetOffsets[e],new lU(t)}getSubClassSet(e){if(this.substFormat!==2)throw new Error(`lookup type 5.${this.substFormat} has no subclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.subClassSetOffsets[e],new uU(t)}getCoverageTable(e){if(this.substFormat!==3&&!e)return super.getCoverageTable();if(!e)throw new Error(`lookup type 5.${this.substFormat} requires an coverage table index.`);let t=this.parser;return t.currentPosition=this.start+this.coverageOffsets[e],new $d(t)}},lU=class extends Gt{constructor(e){super(e),this.subRuleCount=e.uint16,this.subRuleOffsets=[...new Array(this.subRuleCount)].map(t=>e.Offset16)}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.subRuleOffsets[e],new _5(t)}},_5=class{constructor(e){this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.inputSequence=[...new Array(this.glyphCount-1)].map(t=>e.uint16),this.substLookupRecords=[...new Array(this.substitutionCount)].map(t=>new yS(e))}},uU=class extends Gt{constructor(e){super(e),this.subClassRuleCount=e.uint16,this.subClassRuleOffsets=[...new Array(this.subClassRuleCount)].map(t=>e.Offset16)}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.subClassRuleOffsets[e],new cU(t)}},cU=class extends _5{constructor(e){super(e)}},fU=class extends zl{constructor(e){super(e),this.substFormat===1&&(this.chainSubRuleSetCount=e.uint16,this.chainSubRuleSetOffsets=[...new Array(this.chainSubRuleSetCount)].map(t=>e.Offset16)),this.substFormat===2&&(this.backtrackClassDefOffset=e.Offset16,this.inputClassDefOffset=e.Offset16,this.lookaheadClassDefOffset=e.Offset16,this.chainSubClassSetCount=e.uint16,this.chainSubClassSetOffsets=[...new Array(this.chainSubClassSetCount)].map(t=>e.Offset16)),this.substFormat===3&&(S5(this),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map(t=>e.Offset16),this.inputGlyphCount=e.uint16,this.inputCoverageOffsets=[...new Array(this.inputGlyphCount)].map(t=>e.Offset16),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[...new Array(this.lookaheadGlyphCount)].map(t=>e.Offset16),this.seqLookupCount=e.uint16,this.seqLookupRecords=[...new Array(this.substitutionCount)].map(t=>new C5(e)))}getChainSubRuleSet(e){if(this.substFormat!==1)throw new Error(`lookup type 6.${this.substFormat} has no chainsubrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleSetOffsets[e],new dU(t)}getChainSubClassSet(e){if(this.substFormat!==2)throw new Error(`lookup type 6.${this.substFormat} has no chainsubclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubClassSetOffsets[e],new pU(t)}getCoverageFromOffset(e){if(this.substFormat!==3)throw new Error(`lookup type 6.${this.substFormat} does not use contextual coverage offsets.`);let t=this.parser;return t.currentPosition=this.start+e,new $d(t)}},dU=class extends Gt{constructor(e){super(e),this.chainSubRuleCount=e.uint16,this.chainSubRuleOffsets=[...new Array(this.chainSubRuleCount)].map(t=>e.Offset16)}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new mU(t)}},mU=class{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map(t=>e.uint16),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map(t=>e.uint16),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map(t=>e.uint16),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.SubstCount)].map(t=>new yS(e))}},pU=class extends Gt{constructor(e){super(e),this.chainSubClassRuleCount=e.uint16,this.chainSubClassRuleOffsets=[...new Array(this.chainSubClassRuleCount)].map(t=>e.Offset16)}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new hU(t)}},hU=class{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map(t=>e.uint16),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map(t=>e.uint16),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map(t=>e.uint16),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.substitutionCount)].map(t=>new C5(e))}},C5=class extends Gt{constructor(e){super(e),this.sequenceIndex=e.uint16,this.lookupListIndex=e.uint16}},gU=class extends Gt{constructor(e){super(e),this.substFormat=e.uint16,this.extensionLookupType=e.uint16,this.extensionOffset=e.Offset32}},vU=class extends zl{constructor(e){super(e),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map(t=>e.Offset16),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[new Array(this.lookaheadGlyphCount)].map(t=>e.Offset16),this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},yU={buildSubtable:function(e,t){let r=new[void 0,$H,eU,rU,nU,aU,fU,gU,vU][e](t);return r.type=e,r}},us=class extends Gt{constructor(e){super(e)}},bU=class extends us{constructor(e){super(e),console.log("lookup type 1")}},wU=class extends us{constructor(e){super(e),console.log("lookup type 2")}},xU=class extends us{constructor(e){super(e),console.log("lookup type 3")}},SU=class extends us{constructor(e){super(e),console.log("lookup type 4")}},_U=class extends us{constructor(e){super(e),console.log("lookup type 5")}},CU=class extends us{constructor(e){super(e),console.log("lookup type 6")}},TU=class extends us{constructor(e){super(e),console.log("lookup type 7")}},EU=class extends us{constructor(e){super(e),console.log("lookup type 8")}},PU=class extends us{constructor(e){super(e),console.log("lookup type 9")}},AU={buildSubtable:function(e,t){let r=new[void 0,bU,wU,xU,SU,_U,CU,TU,EU,PU][e](t);return r.type=e,r}},v5=class extends Gt{static EMPTY={lookupCount:0,lookups:[]};constructor(e){super(e),this.lookupCount=e.uint16,this.lookups=[...new Array(this.lookupCount)].map(t=>e.Offset16)}},kU=class extends Gt{constructor(e,t){super(e),this.ctType=t,this.lookupType=e.uint16,this.lookupFlag=e.uint16,this.subTableCount=e.uint16,this.subtableOffsets=[...new Array(this.subTableCount)].map(r=>e.Offset16),this.markFilteringSet=e.uint16}get rightToLeft(){return this.lookupFlag&!0}get ignoreBaseGlyphs(){return this.lookupFlag&!0}get ignoreLigatures(){return this.lookupFlag&!0}get ignoreMarks(){return this.lookupFlag&!0}get useMarkFilteringSet(){return this.lookupFlag&!0}get markAttachmentType(){return this.lookupFlag&!0}getSubTable(e){let t=this.ctType==="GSUB"?yU:AU;return this.parser.currentPosition=this.start+this.subtableOffsets[e],t.buildSubtable(this.lookupType,this.parser)}},T5=class extends Ve{constructor(e,t,r){let{p:o,tableStart:n}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.scriptListOffset=o.Offset16,this.featureListOffset=o.Offset16,this.lookupListOffset=o.Offset16,this.majorVersion===1&&this.minorVersion===1&&(this.featureVariationsOffset=o.Offset32);let i=!(this.scriptListOffset||this.featureListOffset||this.lookupListOffset);ve(this,"scriptList",()=>i?p5.EMPTY:(o.currentPosition=n+this.scriptListOffset,new p5(o))),ve(this,"featureList",()=>i?g5.EMPTY:(o.currentPosition=n+this.featureListOffset,new g5(o))),ve(this,"lookupList",()=>i?v5.EMPTY:(o.currentPosition=n+this.lookupListOffset,new v5(o))),this.featureVariationsOffset&&ve(this,"featureVariations",()=>i?FeatureVariations.EMPTY:(o.currentPosition=n+this.featureVariationsOffset,new FeatureVariations(o)))}getSupportedScripts(){return this.scriptList.scriptRecords.map(e=>e.scriptTag)}getScriptTable(e){let t=this.scriptList.scriptRecords.find(o=>o.scriptTag===e);this.parser.currentPosition=this.scriptList.start+t.scriptOffset;let r=new qH(this.parser);return r.scriptTag=e,r}ensureScriptTable(e){return typeof e=="string"?this.getScriptTable(e):e}getSupportedLangSys(e){e=this.ensureScriptTable(e);let t=e.defaultLangSys!==0,r=e.langSysRecords.map(o=>o.langSysTag);return t&&r.unshift("dflt"),r}getDefaultLangSysTable(e){e=this.ensureScriptTable(e);let t=e.defaultLangSys;if(t!==0){this.parser.currentPosition=e.start+t;let r=new h5(this.parser);return r.langSysTag="",r.defaultForScript=e.scriptTag,r}}getLangSysTable(e,t="dflt"){if(t==="dflt")return this.getDefaultLangSysTable(e);e=this.ensureScriptTable(e);let r=e.langSysRecords.find(n=>n.langSysTag===t);this.parser.currentPosition=e.start+r.langSysOffset;let o=new h5(this.parser);return o.langSysTag=t,o}getFeatures(e){return e.featureIndices.map(t=>this.getFeature(t))}getFeature(e){let t;if(parseInt(e)==e?t=this.featureList.featureRecords[e]:t=this.featureList.featureRecords.find(o=>o.featureTag===e),!t)return;this.parser.currentPosition=this.featureList.start+t.featureOffset;let r=new KH(this.parser);return r.featureTag=t.featureTag,r}getLookups(e){return e.lookupListIndices.map(t=>this.getLookup(t))}getLookup(e,t){let r=this.lookupList.lookups[e];return this.parser.currentPosition=this.lookupList.start+r,new kU(this.parser,t)}},RU=class extends T5{constructor(e,t){super(e,t,"GSUB")}getLookup(e){return super.getLookup(e,"GSUB")}},OU=Object.freeze({__proto__:null,GSUB:RU}),IU=class extends T5{constructor(e,t){super(e,t,"GPOS")}getLookup(e){return super.getLookup(e,"GPOS")}},FU=Object.freeze({__proto__:null,GPOS:IU}),VU=class extends Ve{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.offsetToSVGDocumentList=r.Offset32,r.currentPosition=this.tableStart+this.offsetToSVGDocumentList,this.documentList=new NU(r)}},NU=class extends Gt{constructor(e){super(e),this.numEntries=e.uint16,this.documentRecords=[...new Array(this.numEntries)].map(t=>new DU(e))}getDocument(e){let t=this.documentRecords[e];if(!t)return"";let r=this.start+t.svgDocOffset;return this.parser.currentPosition=r,this.parser.readBytes(t.svgDocLength)}getDocumentForGlyph(e){let t=this.documentRecords.findIndex(r=>r.startGlyphID<=e&&e<=r.endGlyphID);return t===-1?"":this.getDocument(t)}},DU=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.svgDocOffset=e.Offset32,this.svgDocLength=e.uint32}},LU=Object.freeze({__proto__:null,SVG:VU}),MU=class extends Ve{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.axesArrayOffset=r.Offset16,r.uint16,this.axisCount=r.uint16,this.axisSize=r.uint16,this.instanceCount=r.uint16,this.instanceSize=r.uint16;let o=this.tableStart+this.axesArrayOffset;ve(this,"axes",()=>(r.currentPosition=o,[...new Array(this.axisCount)].map(i=>new BU(r))));let n=o+this.axisCount*this.axisSize;ve(this,"instances",()=>{let i=[];for(let s=0;s<this.instanceCount;s++)r.currentPosition=n+s*this.instanceSize,i.push(new jU(r,this.axisCount,this.instanceSize));return i})}getSupportedAxes(){return this.axes.map(e=>e.tag)}getAxis(e){return this.axes.find(t=>t.tag===e)}},BU=class{constructor(e){this.tag=e.tag,this.minValue=e.fixed,this.defaultValue=e.fixed,this.maxValue=e.fixed,this.flags=e.flags(16),this.axisNameID=e.uint16}},jU=class{constructor(e,t,r){let o=e.currentPosition;this.subfamilyNameID=e.uint16,e.uint16,this.coordinates=[...new Array(t)].map(n=>e.fixed),e.currentPosition-o<r&&(this.postScriptNameID=e.uint16)}},zU=Object.freeze({__proto__:null,fvar:MU}),GU=class extends Ve{constructor(e,t){let{p:r}=super(e,t),o=e.length/2;ve(this,"items",()=>[...new Array(o)].map(n=>r.fword))}},HU=Object.freeze({__proto__:null,cvt:GU}),UU=class extends Ve{constructor(e,t){let{p:r}=super(e,t);ve(this,"instructions",()=>[...new Array(e.length)].map(o=>r.uint8))}},WU=Object.freeze({__proto__:null,fpgm:UU}),qU=class extends Ve{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numRanges=r.uint16,ve(this,"gaspRanges",()=>[...new Array(this.numRanges)].map(n=>new YU(r)))}},YU=class{constructor(e){this.rangeMaxPPEM=e.uint16,this.rangeGaspBehavior=e.uint16}},ZU=Object.freeze({__proto__:null,gasp:qU}),KU=class extends Ve{constructor(e,t){super(e,t)}getGlyphData(e,t){return this.parser.currentPosition=this.tableStart+e,this.parser.readBytes(t)}},XU=Object.freeze({__proto__:null,glyf:KU}),QU=class extends Ve{constructor(e,t,r){let{p:o}=super(e,t),n=r.maxp.numGlyphs+1;r.head.indexToLocFormat===0?(this.x2=!0,ve(this,"offsets",()=>[...new Array(n)].map(i=>o.Offset16))):ve(this,"offsets",()=>[...new Array(n)].map(i=>o.Offset32))}getGlyphDataOffsetAndLength(e){let t=this.offsets[e]*this.x2?2:1,r=this.offsets[e+1]*this.x2?2:1;return{offset:t,length:r-t}}},JU=Object.freeze({__proto__:null,loca:QU}),$U=class extends Ve{constructor(e,t){let{p:r}=super(e,t);ve(this,"instructions",()=>[...new Array(e.length)].map(o=>r.uint8))}},eW=Object.freeze({__proto__:null,prep:$U}),tW=class extends Ve{constructor(e,t){let{p:r}=super(e,t);ve(this,"data",()=>r.readBytes())}},rW=Object.freeze({__proto__:null,CFF:tW}),oW=class extends Ve{constructor(e,t){let{p:r}=super(e,t);ve(this,"data",()=>r.readBytes())}},nW=Object.freeze({__proto__:null,CFF2:oW}),iW=class extends Ve{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.defaultVertOriginY=r.int16,this.numVertOriginYMetrics=r.uint16,ve(this,"vertORiginYMetrics",()=>[...new Array(this.numVertOriginYMetrics)].map(o=>new sW(r)))}},sW=class{constructor(e){this.glyphIndex=e.uint16,this.vertOriginY=e.int16}},aW=Object.freeze({__proto__:null,VORG:iW}),lW=class{constructor(e){this.indexSubTableArrayOffset=e.Offset32,this.indexTablesSize=e.uint32,this.numberofIndexSubTables=e.uint32,this.colorRef=e.uint32,this.hori=new Qg(e),this.vert=new Qg(e),this.startGlyphIndex=e.uint16,this.endGlyphIndex=e.uint16,this.ppemX=e.uint8,this.ppemY=e.uint8,this.bitDepth=e.uint8,this.flags=e.int8}},uW=class{constructor(e){this.hori=new Qg(e),this.vert=new Qg(e),this.ppemX=e.uint8,this.ppemY=e.uint8,this.substitutePpemX=e.uint8,this.substitutePpemY=e.uint8}},Qg=class{constructor(e){this.ascender=e.int8,this.descender=e.int8,this.widthMax=e.uint8,this.caretSlopeNumerator=e.int8,this.caretSlopeDenominator=e.int8,this.caretOffset=e.int8,this.minOriginSB=e.int8,this.minAdvanceSB=e.int8,this.maxBeforeBL=e.int8,this.minAfterBL=e.int8,this.pad1=e.int8,this.pad2=e.int8}},E5=class extends Ve{constructor(e,t,r){let{p:o}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.numSizes=o.uint32,ve(this,"bitMapSizes",()=>[...new Array(this.numSizes)].map(n=>new lW(o)))}},cW=Object.freeze({__proto__:null,EBLC:E5}),P5=class extends Ve{constructor(e,t,r){let{p:o}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16}},fW=Object.freeze({__proto__:null,EBDT:P5}),dW=class extends Ve{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.numSizes=r.uint32,ve(this,"bitmapScales",()=>[...new Array(this.numSizes)].map(o=>new uW(r)))}},mW=Object.freeze({__proto__:null,EBSC:dW}),pW=class extends E5{constructor(e,t){super(e,t,"CBLC")}},hW=Object.freeze({__proto__:null,CBLC:pW}),gW=class extends P5{constructor(e,t){super(e,t,"CBDT")}},vW=Object.freeze({__proto__:null,CBDT:gW}),yW=class extends Ve{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.flags=r.flags(16),this.numStrikes=r.uint32,ve(this,"strikeOffsets",()=>[...new Array(this.numStrikes)].map(o=>r.Offset32))}},bW=Object.freeze({__proto__:null,sbix:yW}),wW=class extends Ve{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numBaseGlyphRecords=r.uint16,this.baseGlyphRecordsOffset=r.Offset32,this.layerRecordsOffset=r.Offset32,this.numLayerRecords=r.uint16}getBaseGlyphRecord(e){let t=this.tableStart+this.baseGlyphRecordsOffset;this.parser.currentPosition=t;let r=new vS(this.parser),o=r.gID,n=this.tableStart+this.layerRecordsOffset-6;this.parser.currentPosition=n;let i=new vS(this.parser),s=i.gID;if(o===e)return r;if(s===e)return i;for(;t!==n;){let l=t+(n-t)/12;this.parser.currentPosition=l;let u=new vS(this.parser),c=u.gID;if(c===e)return u;c>e?n=l:c<e&&(t=l)}return!1}getLayers(e){let t=this.getBaseGlyphRecord(e);return this.parser.currentPosition=this.tableStart+this.layerRecordsOffset+4*t.firstLayerIndex,[...new Array(t.numLayers)].map(r=>new xW(p))}},vS=class{constructor(e){this.gID=e.uint16,this.firstLayerIndex=e.uint16,this.numLayers=e.uint16}},xW=class{constructor(e){this.gID=e.uint16,this.paletteIndex=e.uint16}},SW=Object.freeze({__proto__:null,COLR:wW}),_W=class extends Ve{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numPaletteEntries=r.uint16;let o=this.numPalettes=r.uint16;this.numColorRecords=r.uint16,this.offsetFirstColorRecord=r.Offset32,this.colorRecordIndices=[...new Array(this.numPalettes)].map(n=>r.uint16),ve(this,"colorRecords",()=>(r.currentPosition=this.tableStart+this.offsetFirstColorRecord,[...new Array(this.numColorRecords)].map(n=>new CW(r)))),this.version===1&&(this.offsetPaletteTypeArray=r.Offset32,this.offsetPaletteLabelArray=r.Offset32,this.offsetPaletteEntryLabelArray=r.Offset32,ve(this,"paletteTypeArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteTypeArray,new TW(r,o))),ve(this,"paletteLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteLabelArray,new EW(r,o))),ve(this,"paletteEntryLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteEntryLabelArray,new PW(r,o))))}},CW=class{constructor(e){this.blue=e.uint8,this.green=e.uint8,this.red=e.uint8,this.alpha=e.uint8}},TW=class{constructor(e,t){this.paletteTypes=[...new Array(t)].map(r=>e.uint32)}},EW=class{constructor(e,t){this.paletteLabels=[...new Array(t)].map(r=>e.uint16)}},PW=class{constructor(e,t){this.paletteEntryLabels=[...new Array(t)].map(r=>e.uint16)}},AW=Object.freeze({__proto__:null,CPAL:_W}),kW=class extends Ve{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint32,this.numSignatures=r.uint16,this.flags=r.uint16,this.signatureRecords=[...new Array(this.numSignatures)].map(o=>new RW(r))}getData(e){let t=this.signatureRecords[e];return this.parser.currentPosition=this.tableStart+t.offset,new OW(this.parser)}},RW=class{constructor(e){this.format=e.uint32,this.length=e.uint32,this.offset=e.Offset32}},OW=class{constructor(e){e.uint16,e.uint16,this.signatureLength=e.uint32,this.signature=e.readBytes(this.signatureLength)}},IW=Object.freeze({__proto__:null,DSIG:kW}),FW=class extends Ve{constructor(e,t,r){let{p:o}=super(e,t),n=r.hmtx.numGlyphs;this.version=o.uint16,this.numRecords=o.int16,this.sizeDeviceRecord=o.int32,this.records=[...new Array(numRecords)].map(i=>new VW(o,n))}},VW=class{constructor(e,t){this.pixelSize=e.uint8,this.maxWidth=e.uint8,this.widths=e.readBytes(t)}},NW=Object.freeze({__proto__:null,hdmx:FW}),DW=class extends Ve{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.nTables=r.uint16,ve(this,"tables",()=>{let o=this.tableStart+4,n=[];for(let i=0;i<this.nTables;i++){r.currentPosition=o;let s=new LW(r);n.push(s),o+=s}return n})}},LW=class{constructor(e){this.version=e.uint16,this.length=e.uint16,this.coverage=e.flags(8),this.format=e.uint8,this.format===0&&(this.nPairs=e.uint16,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16,ve(this,"pairs",()=>[...new Array(this.nPairs)].map(t=>new MW(e)))),this.format===2&&console.warn("Kern subtable format 2 is not supported: this parser currently only parses universal table data.")}get horizontal(){return this.coverage[0]}get minimum(){return this.coverage[1]}get crossstream(){return this.coverage[2]}get override(){return this.coverage[3]}},MW=class{constructor(e){this.left=e.uint16,this.right=e.uint16,this.value=e.fword}},BW=Object.freeze({__proto__:null,kern:DW}),jW=class extends Ve{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numGlyphs=r.uint16,this.yPels=r.readBytes(this.numGlyphs)}},zW=Object.freeze({__proto__:null,LTSH:jW}),GW=class extends Ve{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.mergeClassCount=r.uint16,this.mergeDataOffset=r.Offset16,this.classDefCount=r.uint16,this.offsetToClassDefOffsets=r.Offset16,ve(this,"mergeEntryMatrix",()=>[...new Array(this.mergeClassCount)].map(o=>r.readBytes(this.mergeClassCount))),console.warn("Full MERG parsing is currently not supported."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}},HW=Object.freeze({__proto__:null,MERG:GW}),UW=class extends Ve{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint32,this.flags=r.uint32,r.uint32,this.dataMapsCount=r.uint32,this.dataMaps=[...new Array(this.dataMapsCount)].map(o=>new WW(this.tableStart,r))}},WW=class{constructor(e,t){this.tableStart=e,this.parser=t,this.tag=t.tag,this.dataOffset=t.Offset32,this.dataLength=t.uint32}getData(){return this.parser.currentField=this.tableStart+this.dataOffset,this.parser.readBytes(this.dataLength)}},qW=Object.freeze({__proto__:null,meta:UW}),YW=class extends Ve{constructor(e,t){super(e,t),console.warn("This font uses a PCLT table, which is currently not supported by this parser."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}},ZW=Object.freeze({__proto__:null,PCLT:YW}),KW=class extends Ve{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numRecs=r.uint16,this.numRatios=r.uint16,this.ratRanges=[...new Array(this.numRatios)].map(o=>new XW(r)),this.offsets=[...new Array(this.numRatios)].map(o=>r.Offset16),this.VDMXGroups=[...new Array(this.numRecs)].map(o=>new QW(r))}},XW=class{constructor(e){this.bCharSet=e.uint8,this.xRatio=e.uint8,this.yStartRatio=e.uint8,this.yEndRatio=e.uint8}},QW=class{constructor(e){this.recs=e.uint16,this.startsz=e.uint8,this.endsz=e.uint8,this.records=[...new Array(this.recs)].map(t=>new JW(e))}},JW=class{constructor(e){this.yPelHeight=e.uint16,this.yMax=e.int16,this.yMin=e.int16}},$W=Object.freeze({__proto__:null,VDMX:KW}),eq=class extends Ve{constructor(e,t){let{p:r}=super(e,t);this.version=r.fixed,this.ascent=this.vertTypoAscender=r.int16,this.descent=this.vertTypoDescender=r.int16,this.lineGap=this.vertTypoLineGap=r.int16,this.advanceHeightMax=r.int16,this.minTopSideBearing=r.int16,this.minBottomSideBearing=r.int16,this.yMaxExtent=r.int16,this.caretSlopeRise=r.int16,this.caretSlopeRun=r.int16,this.caretOffset=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.metricDataFormat=r.int16,this.numOfLongVerMetrics=r.uint16,r.verifyLength()}},tq=Object.freeze({__proto__:null,vhea:eq}),rq=class extends Ve{constructor(e,t,r){super(e,t);let o=r.vhea.numOfLongVerMetrics,n=r.maxp.numGlyphs,i=p.currentPosition;if(lazy(this,"vMetrics",()=>(p.currentPosition=i,[...new Array(o)].map(s=>new oq(p.uint16,p.int16)))),o<n){let s=i+o*4;lazy(this,"topSideBearings",()=>(p.currentPosition=s,[...new Array(n-o)].map(l=>p.int16)))}}},oq=class{constructor(e,t){this.advanceHeight=e,this.topSideBearing=t}},nq=Object.freeze({__proto__:null,vmtx:rq});var A5=a(M(),1);var{kebabCase:ohe}=Ye(A5.privateApis);var R5=a(C(),1);var N5=a(C(),1),{Tabs:vhe}=Ye(bS.privateApis),yhe={id:"installed-fonts",title:(0,Jg._x)("Library","Font library")},bhe={id:"upload-fonts",title:(0,Jg._x)("Upload","noun")};var D5=a(j(),1),wS=a(M(),1),aq=a(B(),1);var L5=a(C(),1);var xS=a(C(),1);var B5=a(j(),1),$g=a(M(),1);var j5=a(C(),1);var _S=a(C(),1);var wn=a(j(),1),CS=a(M(),1),hq=a(B(),1);var z5=a(yt(),1);var mq=a(C(),1),{useSettingsForBlockElement:Khe,TypographyPanel:Xhe}=Ye(z5.privateApis);var pq=a(C(),1);var TS=a(C(),1),ige={text:{description:(0,wn.__)("Manage the fonts used on the site."),title:(0,wn.__)("Text")},link:{description:(0,wn.__)("Manage the fonts and typography used on the links."),title:(0,wn.__)("Links")},heading:{description:(0,wn.__)("Manage the fonts and typography used on headings."),title:(0,wn.__)("Headings")},caption:{description:(0,wn.__)("Manage the fonts and typography used on captions."),title:(0,wn.__)("Captions")},button:{description:(0,wn.__)("Manage the fonts and typography used on buttons."),title:(0,wn.__)("Buttons")}};var bq=a(j(),1),wq=a(M(),1),H5=a(yt(),1);var yc=a(M(),1),G5=a(j(),1);var yq=a(B(),1);var gq=a(M(),1),vq=a(C(),1);var ES=a(C(),1);var PS=a(C(),1),{useSettingsForBlockElement:xge,ColorPanel:Sge}=Ye(H5.privateApis);var Pq=a(j(),1),X5=a(M(),1);var _q=a(Qe(),1),AS=a(M(),1),Cq=a(j(),1);var tv=a(M(),1);var ev=a(M(),1);var U5=a(C(),1);function W5(){let{paletteColors:e}=dc();return e.slice(0,4).map(({slug:t,color:r},o)=>(0,U5.jsx)("div",{style:{flexGrow:1,height:"100%",background:r}},`${t}-${o}`))}var tm=a(C(),1),xq={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},Sq=({label:e,isFocused:t,withHoverView:r})=>(0,tm.jsx)(pc,{label:e,isFocused:t,withHoverView:r,children:({key:o})=>(0,tm.jsx)(ev.__unstableMotion.div,{variants:xq,style:{height:"100%",overflow:"hidden"},children:(0,tm.jsx)(ev.__experimentalHStack,{spacing:0,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,tm.jsx)(W5,{})})},o)}),q5=Sq;var Gl=a(C(),1),Y5=["color"];function rv({title:e,gap:t=2}){let r=Ng(Y5);return r?.length<=1?null:(0,Gl.jsxs)(tv.__experimentalVStack,{spacing:3,children:[e&&(0,Gl.jsx)(Xo,{level:3,children:e}),(0,Gl.jsx)(tv.__experimentalGrid,{gap:t,children:r.map((o,n)=>(0,Gl.jsx)(gc,{variation:o,isPill:!0,properties:Y5,showTooltip:!0,children:()=>(0,Gl.jsx)(q5,{})},n))})]})}var Z5=a(C(),1);var Tq=a(Qe(),1),ov=a(M(),1),Eq=a(j(),1);var K5=a(C(),1);var kS=a(C(),1),{Tabs:Yge}=Ye(X5.privateApis);var kq=a(j(),1),J5=a(yt(),1),Rq=a(M(),1);var Q5=a(yt(),1);var Aq=a(C(),1);var{BackgroundPanel:Qge}=Ye(Q5.privateApis);var RS=a(C(),1),{useHasBackgroundPanel:nve}=Ye(J5.privateApis);var Hl=a(M(),1),OS=a(j(),1);var Nq=a(B(),1);var Oq=a(M(),1),Iq=a(j(),1),Fq=a(C(),1);var IS=a(C(),1),{Menu:gve}=Ye(Hl.privateApis);var cr=a(M(),1),rm=a(j(),1);var nv=a(B(),1);var FS=a(C(),1),{Menu:Ove}=Ye(cr.privateApis),Ive=[{label:(0,rm.__)("Rename"),action:"rename"},{label:(0,rm.__)("Delete"),action:"delete"}],Fve=[{label:(0,rm.__)("Reset"),action:"reset"}];var Dq=a(C(),1);var Bq=a(j(),1),eR=a(yt(),1);var $5=a(yt(),1),Lq=a(B(),1);var Mq=a(C(),1),{useSettingsForBlockElement:Gve,DimensionsPanel:Hve}=Ye($5.privateApis);var VS=a(C(),1),{useHasDimensionsPanel:Xve,useSettingsForBlockElement:Qve}=Ye(eR.privateApis);var sR=a(M(),1),Hq=a(j(),1);var zq=a(j(),1),Gq=a(M(),1);var tR=a(he(),1),rR=a(re(),1),sv=a(B(),1),oR=a(M(),1),nR=a(j(),1);var iv=a(C(),1);function jq({gap:e=2}){let{user:t}=(0,sv.useContext)(Sr),r=t?.styles,n=(0,rR.useSelect)(s=>{let l=s(tR.store).__experimentalGetCurrentThemeGlobalStylesVariations();return Array.isArray(l)?l:void 0},[])?.filter(s=>!qd(s,["color"])&&!qd(s,["typography","spacing"])),i=(0,sv.useMemo)(()=>[...[{title:(0,nR.__)("Default"),settings:{},styles:{}},...n??[]].map(l=>{let u=l?.styles?.blocks?{...l.styles.blocks}:{};r?.blocks&&Object.keys(r.blocks).forEach(d=>{if(r.blocks?.[d]?.css){let h=u[d]||{},g={css:`${u[d]?.css||""} ${r.blocks?.[d]?.css?.trim()||""}`};u[d]={...h,...g}}});let c=r?.css||l.styles?.css?{css:`${l.styles?.css||""} ${r?.css||""}`}:{},f=Object.keys(u).length>0?{blocks:u}:{},m={...l.styles,...c,...f};return{...l,settings:l.settings??{},styles:m}})],[n,r?.blocks,r?.css]);return!n||n.length<1?null:(0,iv.jsx)(oR.__experimentalGrid,{columns:2,className:"global-styles-ui-style-variations-container",gap:e,children:i.map((s,l)=>(0,iv.jsx)(gc,{variation:s,children:u=>(0,iv.jsx)(iS,{label:s?.title,withHoverView:!0,isFocused:u,variation:s})},l))})}var NS=jq;var iR=a(C(),1);var DS=a(C(),1);var Uq=a(j(),1),Wq=a(M(),1),aR=a(yt(),1);var LS=a(C(),1),{AdvancedPanel:hye}=Ye(aR.privateApis);var gR=a(j(),1),BS=a(M(),1),jS=a(B(),1);var lR=a(re(),1),uR=a(he(),1),om=a(B(),1);var qq={per_page:-1,_fields:"id,name,avatar_urls",context:"view",capabilities:["edit_theme_options"]},Yq={per_page:100,page:1},av=[];function lv({query:e}={}){let{user:t}=(0,om.useContext)(Sr),r=(0,om.useMemo)(()=>({...Yq,...e}),[e]),{authors:o,currentUser:n,isDirty:i,revisions:s,isLoadingGlobalStylesRevisions:l,revisionsCount:u}=(0,lR.useSelect)(c=>{let{__experimentalGetDirtyEntityRecords:f,getCurrentUser:m,getUsers:d,getRevisions:h,__experimentalGetCurrentGlobalStylesId:g,getEntityRecord:y,isResolving:v}=c(uR.store),b=f()||[],w=m(),x=b.length>0,T=g(),k=(T?y("root","globalStyles",T):void 0)?._links?.["version-history"]?.[0]?.count??0,F=T&&h("root","globalStyles",T,r)||av,P=d(qq)||av,V=T?v("getRevisions",["root","globalStyles",T,r]):!1;return{authors:P,currentUser:w,isDirty:x,revisions:F,isLoadingGlobalStylesRevisions:V,revisionsCount:k}},[r]);return(0,om.useMemo)(()=>{if(!o.length||l)return{revisions:av,hasUnsavedChanges:i,isLoading:!0,revisionsCount:u};let c=s.map(m=>({...m,author:o.find(d=>d.id===m.author)}));if(s.length){if(c[0].id!=="unsaved"&&r.page===1&&(c[0].isLatest=!0),i&&t&&Object.keys(t).length>0&&n&&r.page===1){let m={id:"unsaved",styles:t?.styles,settings:t?.settings,_links:t?._links,author:{name:n?.name||"",avatar_urls:n?.avatar_urls||{}},modified:new Date};c.unshift(m)}r.per_page&&r.page===Math.ceil(u/r.per_page)&&c.push({id:"parent",styles:{},settings:{}})}return{revisions:c,hasUnsavedChanges:i,isLoading:!1,revisionsCount:u}},[i,s,n,o,t,l,u,r.page,r.per_page])}var fR=a(j(),1),dR=a(M(),1),uv=a(ba(),1),Zq=a(he(),1),Kq=a(re(),1);var mR=a(Js(),1),pR=a(C(),1),wye=3600*1e3*24;var MS=a(M(),1),nm=a(j(),1);var hR=a(C(),1);var zS=a(C(),1);var GS=a(j(),1),cs=a(M(),1);var $q=a(B(),1);var Xq=a(M(),1),Qq=a(j(),1),Jq=a(C(),1);var HS=a(C(),1),{Menu:zye}=Ye(cs.privateApis);var wR=a(j(),1),bi=a(M(),1);var xR=a(B(),1);var eY=a(yt(),1),tY=a(j(),1);var rY=a(C(),1);var oY=a(M(),1),vR=a(j(),1),nY=a(C(),1);var im=a(M(),1),iY=a(j(),1),sY=a(B(),1),yR=a(C(),1);var fs=a(M(),1),bR=a(C(),1);var US=a(C(),1),{Menu:i0e}=Ye(bi.privateApis);var qS=a(C(),1);var YS=a(C(),1);function bc(e){return function({value:r,baseValue:o,onChange:n,...i}){return(0,YS.jsx)(Fg,{value:r,baseValue:o,onChange:n,children:(0,YS.jsx)(e,{...i})})}}var cY=bc(NS);var fY=bc(rv);var dY=bc(Gg);var mY=a(C(),1);var cv=a(j(),1),CR=a(bt(),1),TR=a(M(),1);var ZS=a(C(),1);function ER({record:e,revisionsCount:t,...r}){let o={},n=e?._links?.["predecessor-version"]?.[0]?.id??null;return t=t||e?._links?.["version-history"]?.[0]?.count||0,n&&t>1&&(o.href=(0,CR.addQueryArgs)("revision.php",{revision:e?._links["predecessor-version"][0].id}),o.as="a"),(0,ZS.jsx)(TR.__experimentalItemGroup,{size:"large",className:"edit-site-sidebar-navigation-screen-details-footer",children:(0,ZS.jsx)(zt,{icon:Hf,...o,...r,children:(0,cv.sprintf)((0,cv._n)("%d Revision","%d Revisions",t),t)})})}var wa=a(C(),1),{useLocation:OR,useHistory:pY}=L(kR.privateApis);function IR(e){let{name:t}=OR();return(0,wa.jsx)(zt,{...e,"aria-current":t==="styles"})}function FR(){let e=pY(),{path:t}=OR(),{revisions:r,isLoading:o,revisionsCount:n}=lv(),{openGeneralSidebar:i}=(0,fv.useDispatch)(Re),{setStylesPath:s}=L((0,fv.useDispatch)(AR.store)),{set:l}=(0,fv.useDispatch)(PR.store),u=(0,XS.useCallback)(async()=>(e.navigate((0,RR.addQueryArgs)(t,{canvas:"edit"}),{transition:"canvas-mode-edit-transition"}),Promise.all([l("core","distractionFree",!1),i("edit-site/global-styles")])),[t,e,i,l]),c=(0,XS.useCallback)(async()=>{await u(),s("/revisions")},[u,s]),f=!!n&&!o;return(0,wa.jsx)(wa.Fragment,{children:(0,wa.jsx)(wr,{title:(0,KS.__)("Design"),isRoot:!0,description:(0,KS.__)("Customize the appearance of your website using the block editor."),content:(0,wa.jsx)(QS,{activeItem:"styles-navigation-item"}),footer:f&&(0,wa.jsx)(ER,{record:r?.[0],revisionsCount:n,onClick:c})})})}var Vo=a(C(),1);function QS({isBlockBasedTheme:e=!0}){return(0,Vo.jsxs)(VR.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-main",children:[e&&(0,Vo.jsxs)(Vo.Fragment,{children:[(0,Vo.jsx)(IR,{to:"/styles",uid:"global-styles-navigation-item",icon:Dh,children:(0,wi.__)("Styles")}),(0,Vo.jsx)(zt,{uid:"navigation-navigation-item",to:"/navigation",withChevron:!0,icon:$f,children:(0,wi.__)("Navigation")}),(0,Vo.jsx)(zt,{uid:"page-navigation-item",to:"/page",withChevron:!0,icon:Sl,children:(0,wi.__)("Pages")}),(0,Vo.jsx)(zt,{uid:"template-navigation-item",to:"/template",withChevron:!0,icon:Nn,children:(0,wi.__)("Templates")})]}),!e&&(0,Vo.jsx)(zt,{uid:"stylebook-navigation-item",to:"/stylebook",withChevron:!0,icon:Dh,children:(0,wi.__)("Styles")}),(0,Vo.jsx)(zt,{uid:"patterns-navigation-item",to:"/pattern",withChevron:!0,icon:ld,children:(0,wi.__)("Patterns")})]})}function wc({customDescription:e}){let t=(0,NR.useSelect)(o=>o(DR.store).getCurrentTheme()?.is_block_theme,[]),r;return e?r=e:t?r=(0,wi.__)("Customize the appearance of your website using the block editor."):r=(0,wi.__)("Explore block styles and patterns to refine your site."),(0,Vo.jsx)(wr,{isRoot:!0,title:(0,wi.__)("Design"),description:r,content:(0,Vo.jsx)(QS,{isBlockBasedTheme:t})})}var LR=a(j(),1),dv=a(M(),1),JS=a(C(),1);function Et(){return(0,JS.jsx)(dv.__experimentalSpacer,{padding:3,children:(0,JS.jsx)(dv.Notice,{status:"warning",isDismissible:!1,children:(0,LR.__)("The theme you are currently using does not support this screen.")})})}var _c=a(re(),1),Cc=a(M(),1),Ov=a(Qe(),1),Tc=a(Ke(),1),ql=a(j(),1),dI=a(he(),1),mI=a(wp(),1),pI=a(B(),1),hI=a(Mn(),1),gI=a(Ne(),1),vI=a(mr(),1);var yI=a(yt(),1),bI=a(bt(),1);var mv=a(re(),1),BR=a(M(),1),Ul=a(j(),1),jR=a(B(),1),$S=a(Ao(),1),zR=a(he(),1);var sm=a(C(),1);function MR({nonAnimatedSrc:e,animatedSrc:t}){return(0,sm.jsxs)("picture",{className:"edit-site-welcome-guide__image",children:[(0,sm.jsx)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,sm.jsx)("img",{src:t,width:"312",height:"240",alt:""})]})}var Zn=a(C(),1);function GR(){let{toggle:e}=(0,mv.useDispatch)($S.store),{isActive:t,isBlockBasedTheme:r}=(0,mv.useSelect)(o=>({isActive:!!o($S.store).get("core/edit-site","welcomeGuide"),isBlockBasedTheme:o(zR.store).getCurrentTheme()?.is_block_theme}),[]);return!t||!r?null:(0,Zn.jsx)(BR.Guide,{className:"edit-site-welcome-guide guide-editor",contentLabel:(0,Ul.__)("Welcome to the site editor"),finishButtonText:(0,Ul.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuide"),pages:[{image:(0,Zn.jsx)(MR,{nonAnimatedSrc:"https://s.w.org/images/block-editor/edit-your-site.svg?1",animatedSrc:"https://s.w.org/images/block-editor/edit-your-site.gif?1"}),content:(0,Zn.jsxs)(Zn.Fragment,{children:[(0,Zn.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:(0,Ul.__)("Edit your site")}),(0,Zn.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,Ul.__)("Design everything on your site \u2014 from the header right down to the footer \u2014 using blocks.")}),(0,Zn.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,jR.createInterpolateElement)((0,Ul.__)("Click <StylesIconImage /> to start designing your blocks, and choose your typography, layout, and colors."),{StylesIconImage:(0,Zn.jsx)("img",{alt:(0,Ul.__)("styles"),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"})})})]})}]})}var gv=a(re(),1),HR=a(M(),1),pv=a(j(),1),hv=a(Ao(),1),xi=a(C(),1);function UR(){let{toggle:e}=(0,gv.useDispatch)(hv.store);if(!(0,gv.useSelect)(o=>{let n=!!o(hv.store).get("core/edit-site","welcomeGuidePage"),i=!!o(hv.store).get("core/edit-site","welcomeGuide");return n&&!i},[]))return null;let r=(0,pv.__)("Editing a page");return(0,xi.jsx)(HR.Guide,{className:"edit-site-welcome-guide guide-page",contentLabel:r,finishButtonText:(0,pv.__)("Continue"),onFinish:()=>e("core/edit-site","welcomeGuidePage"),pages:[{image:(0,xi.jsx)("video",{className:"edit-site-welcome-guide__video",autoPlay:!0,loop:!0,muted:!0,width:"312",height:"240",children:(0,xi.jsx)("source",{src:"https://s.w.org/images/block-editor/editing-your-page.mp4",type:"video/mp4"})}),content:(0,xi.jsxs)(xi.Fragment,{children:[(0,xi.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:r}),(0,xi.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,pv.__)("It\u2019s 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.")})]})}]})}var yv=a(re(),1),WR=a(M(),1),vv=a(j(),1),e_=a(Ao(),1),qR=a(Ke(),1),Si=a(C(),1);function YR(){let{toggle:e}=(0,yv.useDispatch)(e_.store),{isActive:t,hasPreviousEntity:r}=(0,yv.useSelect)(i=>{let{getEditorSettings:s}=i(qR.store),{get:l}=i(e_.store);return{isActive:l("core/edit-site","welcomeGuideTemplate"),hasPreviousEntity:!!s().onNavigateToPreviousEntityRecord}},[]);if(!(t&&r))return null;let n=(0,vv.__)("Editing a template");return(0,Si.jsx)(WR.Guide,{className:"edit-site-welcome-guide guide-template",contentLabel:n,finishButtonText:(0,vv.__)("Continue"),onFinish:()=>e("core/edit-site","welcomeGuideTemplate"),pages:[{image:(0,Si.jsx)("video",{className:"edit-site-welcome-guide__video",autoPlay:!0,loop:!0,muted:!0,width:"312",height:"240",children:(0,Si.jsx)("source",{src:"https://s.w.org/images/block-editor/editing-your-template.mp4",type:"video/mp4"})}),content:(0,Si.jsxs)(Si.Fragment,{children:[(0,Si.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:n}),(0,Si.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,vv.__)("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 \u2018Back\u2019 button in the toolbar.")})]})}]})}var xa=a(C(),1);function ZR({postType:e}){return(0,xa.jsxs)(xa.Fragment,{children:[(0,xa.jsx)(GR,{}),e==="page"&&(0,xa.jsx)(UR,{}),e==="wp_template"&&(0,xa.jsx)(YR,{})]})}var wv=a(M(),1),XR=a(he(),1),QR=a(re(),1),JR=a(Ke(),1);var bv=a(C(),1),{Theme:hY}=L(wv.privateApis),{useStyle:KR}=L(JR.privateApis);function t_({id:e}){let t=KR("color.text"),r=KR("color.background"),{elapsed:o,total:n}=(0,QR.useSelect)(i=>{let s=i(XR.store).countSelectorsByStatus(),l=s.resolving??0,u=s.finished??0;return{elapsed:u,total:u+l}},[]);return(0,bv.jsx)("div",{className:"edit-site-canvas-loader",children:(0,bv.jsx)(hY,{accent:t,background:r,children:(0,bv.jsx)(wv.ProgressBar,{id:e,max:n,value:o})})})}var lO=a(re(),1),_v=a(B(),1),uO=a(Ne(),1),cO=a(Qe(),1),Cv=a(Ke(),1);var Sv=a(re(),1),nO=a(Ne(),1),iO=a(B(),1),r_=a(bt(),1),sO=a(he(),1),xv=a(Ke(),1);var $R=a(B(),1),eO=a(re(),1),tO=a(Ne(),1),rO=a(Ke(),1);var{useLocation:gY}=L(tO.privateApis),xc="Desktop",vY=["desktop","tablet","mobile"],yY=e=>e.charAt(0).toUpperCase()+e.slice(1);function bY(){let{query:e}=gY(),{setDeviceType:t}=(0,eO.useDispatch)(rO.store);(0,$R.useEffect)(()=>{let r=e?.viewport?.toLowerCase(),o=vY.includes(r);t(o?yY(r):xc)},[e?.viewport,t])}function oO(){return bY(),null}var{useHistory:wY,useLocation:xY}=L(nO.privateApis),SY=["desktop","tablet","mobile"];function aO(){let e=wY(),t=xY(),{query:r,path:o}=t,n=(0,Sv.useRegistry)(),i=(0,Sv.useSelect)(l=>l(xv.store).getDeviceType(),[]);return(0,iO.useCallback)(l=>{let u=n.select(xv.store).getCurrentPostType(),c=n.select(xv.store).getCurrentPostId(),m=n.select(sO.store).getEntityRecordEdits("postType",u,c)?.selection?.selectionStart?.clientId,d={...r};m&&(d.selectedBlock=m);let h=typeof l.viewport=="string"?l.viewport.toLowerCase():void 0,g=SY.includes(h);if(g){let w=(i||xc).toLowerCase();w===xc.toLowerCase()?delete d.viewport:d.viewport=w}(m||g)&&e.navigate((0,r_.addQueryArgs)(o,d),{replace:!0});let v={canvas:"edit",focusMode:!0};g&&(v.viewport=h);let b=(0,r_.addQueryArgs)(`/${l.postType}/${l.postId}`,v);e.navigate(b)},[e,o,r,n,i])}var{useLocation:fO,useHistory:_Y}=L(uO.privateApis),{useGlobalStyles:CY}=L(Cv.privateApis);function TY(){let e=fO(),t=(0,cO.usePrevious)(e.query.canvas),r=_Y();return(0,_v.useMemo)(()=>(e.query.focusMode||e?.params?.postId&&lT.includes(e?.params?.postType))&&t==="edit"?()=>r.back():void 0,[e,r,t])}function dO(){let{query:e}=fO(),{canvas:t="view"}=e,r=aO(),{merged:o}=CY(),{settings:n,currentPostIsTrashed:i}=(0,lO.useSelect)(f=>{let{getSettings:m}=f(Re),{getCurrentPostAttribute:d}=f(Cv.store);return{settings:m(),currentPostIsTrashed:d("status")==="trash"}},[]),s=TY(),[l,u]=(0,_v.useMemo)(()=>Wd(o,[],{disableRootPadding:!1}),[o]);return(0,_v.useMemo)(()=>{let f=(n?.styles??[]).filter(m=>!m.isGlobalStyles);return{...n,styles:[...f,...l,{css:t==="view"?`body{min-height: 100vh; ${i?"":"cursor: pointer;"}}`:void 0}],__experimentalFeatures:u,richEditingEnabled:!0,supportsTemplateMode:!0,focusMode:t!=="view",onNavigateToEntityRecord:r,onNavigateToPreviousEntityRecord:s,isPreviewMode:t==="view"}},[n,l,u,t,i,r,s])}var mO=a(Ke(),1),pO=a(re(),1),hO=a(M(),1),gO=a(vl(),1),vO=a(C(),1),{Fill:EY,Slot:PY}=(0,hO.createSlotFill)("PluginTemplateSettingPanel"),yO=({children:e})=>((0,gO.default)("wp.editSite.PluginTemplateSettingPanel",{since:"6.6",version:"6.8",alternative:"wp.editor.PluginDocumentSettingPanel"}),(0,pO.useSelect)(r=>r(mO.store).getCurrentPostType()==="wp_template",[])?(0,vO.jsx)(EY,{children:e}):null);yO.Slot=PY;var Tv=yO;var VO=a(Ke(),1);var am=a(j(),1),xO=a(M(),1),SO=a(bg(),1);var Ev=a(re(),1),_O=a(wO(),1),CO=a(he(),1),TO=a(Mn(),1),EO=a(C(),1);function PO(){let e=(0,Ev.useSelect)(o=>!!(o(CO.store).getCurrentTheme()?._links?.["wp:export-theme"]?.[0]?.targetHints??{}).allow?.includes("GET"),[]),{createErrorNotice:t}=(0,Ev.useDispatch)(TO.store);if(!e)return null;async function r(){try{let o=await(0,SO.default)({path:"/wp-block-editor/v1/export",parse:!1,headers:{Accept:"application/zip"}}),n=await o.blob(),s=o.headers.get("content-disposition").match(/=(.+)\.zip/),l=s[1]?s[1]:"edit-site-export";(0,_O.downloadBlob)(l+".zip",n,"application/zip")}catch(o){let n={};try{n=await o.json()}catch{}let i=n.message&&n.code!=="unknown_error"?n.message:(0,am.__)("An error occurred while creating the site export.");t(i,{type:"snackbar"})}}return(0,EO.jsx)(xO.MenuItem,{role:"menuitem",icon:k1,onClick:r,info:(0,am.__)("Download your theme with updated templates and styles."),children:(0,am._x)("Export","site exporter menu item")})}var AO=a(j(),1),kO=a(re(),1),RO=a(M(),1),OO=a(Ao(),1),IO=a(C(),1);function FO(){let{toggle:e}=(0,kO.useDispatch)(OO.store);return(0,IO.jsx)(RO.MenuItem,{onClick:()=>e("core/edit-site","welcomeGuide"),children:(0,AO.__)("Welcome Guide")})}var ds=a(C(),1),{ToolsMoreMenuGroup:AY,PreferencesModal:kY}=L(VO.privateApis);function NO(){return(0,ds.jsxs)(ds.Fragment,{children:[(0,ds.jsxs)(AY,{children:[(0,ds.jsx)(PO,{}),(0,ds.jsx)(FO,{})]}),(0,ds.jsx)(kY,{})]})}var DO=a(re(),1),Pv=a(Js(),1),Av=a(B(),1),LO=a(j(),1),MO=a(Ke(),1),BO=a(Ne(),1),o_=a(bt(),1);var{useLocation:RY,useHistory:OY}=L(BO.privateApis);function jO(){let{query:e,path:t}=RY(),r=OY(),{canvas:o="view"}=e,n=(0,DO.useSelect)(u=>u(MO.store).getCurrentPostAttribute("status")==="trash",[]),[i,s]=(0,Av.useState)(!1);(0,Av.useEffect)(()=>{o==="edit"&&s(!1)},[o]);let l={"aria-label":(0,LO.__)("Edit"),"aria-disabled":n,title:null,role:"button",tabIndex:0,onFocus:()=>s(!0),onBlur:()=>s(!1),onKeyDown:u=>{let{keyCode:c}=u;(c===Pv.ENTER||c===Pv.SPACE)&&!n&&(u.preventDefault(),r.navigate((0,o_.addQueryArgs)(t,{canvas:"edit"}),{transition:"canvas-mode-edit-transition"}))},onClick:()=>r.navigate((0,o_.addQueryArgs)(t,{canvas:"edit"}),{transition:"canvas-mode-edit-transition"}),onClickCapture:u=>{n&&(u.preventDefault(),u.stopPropagation())},readonly:!0};return{className:Z("edit-site-visual-editor__editor-canvas",{"is-focused":i&&o==="view"}),...o==="view"?l:{}}}var Rv=a(j(),1),qO=a(re(),1),YO=a(he(),1),ZO=a(mr(),1),KO=a(Ke(),1);var lm=a(B(),1),zO=a(re(),1),GO=a(he(),1),kv=a(j(),1),HO=a(Xb(),1),n_=a(mr(),1),UO=a(Ne(),1);var{useLocation:IY}=L(UO.privateApis);function WO(e){let t=IY(),r=(0,zO.useSelect)(n=>n(GO.store).getEntityRecord("root","site")?.title,[]),o=(0,lm.useRef)(!0);(0,lm.useEffect)(()=>{o.current=!1},[t]),(0,lm.useEffect)(()=>{if(!o.current&&e&&r){let n=(0,kv.sprintf)((0,kv.__)("%1$s \u2039 %2$s \u2039 Editor \u2014 WordPress"),(0,n_.decodeEntities)(e),(0,n_.decodeEntities)(r));document.title=n,(0,HO.speak)(e,"assertive")}},[e,r,t])}var{getTemplateInfo:FY}=L(KO.privateApis);function VY(e,t){let{title:r,isLoaded:o}=(0,qO.useSelect)(i=>{let{getEditedEntityRecord:s,getCurrentTheme:l,hasFinishedResolution:u}=i(YO.store);if(!t)return{isLoaded:!1};let c=s("postType",e,t),{default_template_types:f=[]}=l()??{},m=FY({template:c,templateTypes:f}),d=u("getEditedEntityRecord",["postType",e,t]);return{title:m.title,isLoaded:d}},[e,t]),n;o&&(n=(0,Rv.sprintf)((0,Rv._x)("%1$s \u2039 %2$s","breadcrumb trail"),(0,ZO.decodeEntities)(r),Ib[e]??Ib[Xe])),WO(o&&n)}var XO=VY;var Sa=a(re(),1),QO=a(yt(),1),i_=a(Ke(),1),JO=a(B(),1),$O=a(Ao(),1);function eI(e){let{clearSelectedBlock:t}=(0,Sa.useDispatch)(QO.store),{editPost:r,setDeviceType:o,closePublishSidebar:n,setIsListViewOpened:i,setIsInserterOpened:s}=(0,Sa.useDispatch)(i_.store),{get:l}=(0,Sa.useSelect)($O.store),{getCurrentPost:u}=(0,Sa.useSelect)(i_.store),c=(0,Sa.useRegistry)();(0,JO.useLayoutEffect)(()=>{let f=window.matchMedia("(min-width: 782px)").matches;c.batch(()=>{t(),u()?.type&&r({selection:void 0},{undoIgnore:!0}),o(xc),n(),s(!1),f&&e==="edit"&&l("core","showListViewByDefault")&&!l("core","distractionFree")?i(!0):i(!1)})},[e,c,t,r,o,n,s,i,l,u])}var Sc=a(B(),1),Wl=a(re(),1),um=a(he(),1),rI=a(Ne(),1);var{useLocation:NY}=L(rI.privateApis),s_=[Rb,Xe,ze,Fn,ke.user],tI=["page","post"];function DY(e){let t;return e==="navigation-item"?t=Fn:e==="pattern-item"?t=ke.user:e==="template-part-item"?t=ze:e==="templates"?t=Xe:e==="template-item"?t=Xe:e==="page-item"||e==="pages"?t="page":e==="post-item"||e==="posts"?t="post":e==="attachment-item"&&(t=Rb),t}function oI(){let{editEntityRecord:e}=(0,Wl.useDispatch)(um.store),{hasEntityRecord:t}=(0,Wl.useSelect)(um.store),{name:r,params:o={},query:n}=NY(),{postId:i=n?.postId}=o,s=DY(r,i)??n?.postType,{selectedBlock:l}=n,u=(0,Sc.useRef)(null),c=(0,Wl.useSelect)(h=>{let{getHomePage:g}=L(h(um.store));return g()},[]),f=(0,Wl.useSelect)(h=>{if(s_.includes(s)&&i||i&&i.includes(","))return;let{getTemplateId:g}=L(h(um.store));if(s&&i&&tI.includes(s))return g(s,i);if(c?.postType==="page")return g("page",c?.postId);if(c?.postType==="wp_template")return c?.postId},[c,i,s]),m=(0,Sc.useMemo)(()=>s_.includes(s)&&i?{}:s&&i&&tI.includes(s)?{postType:s,postId:i}:c?.postType==="page"?{postType:"page",postId:c?.postId}:{},[c,s,i]),d;if(s_.includes(s)&&i?d={isReady:!0,postType:s,postId:i,context:m}:c?d={isReady:f!==void 0,postType:Xe,postId:f,context:m}:d={isReady:!1},l&&d.isReady&&u.current!==l){let h=d.context?.postId?d.context.postType:d.postType,g=d.context?.postId?d.context.postId:d.postId;t("postType",h,g)&&(e("postType",h,g,{selection:{selectionStart:{clientId:l},selectionEnd:{clientId:l}}},{undoIgnore:!0}),u.current=l)}return d}function nI({postType:e,postId:t,context:r,isReady:o}){let{setEditedEntity:n}=(0,Wl.useDispatch)(Re);(0,Sc.useEffect)(()=>{o&&n(e,String(t),r)},[o,e,t,r,n])}var iI=a(j(),1),sI=a(re(),1),aI=a(he(),1),lI=a(_l(),1),uI=a(bt(),1),cI=a(C(),1);function fI(){let e=(0,sI.useSelect)(t=>{let{getEntityRecord:r}=t(aI.store);return r("root","__unstableBase")?.home},[]);return(0,cI.jsx)("iframe",{src:(0,uI.addQueryArgs)(e,{wp_site_preview:1}),title:(0,iI.__)("Site Preview"),style:{display:"block",width:"100%",height:"100%",backgroundColor:"#fff"},onLoad:t=>{let r=t.target.contentDocument;lI.focus.focusable.find(r).forEach(n=>{n.style.pointerEvents="none",n.tabIndex=-1,n.setAttribute("aria-hidden","true")})}})}var Ht=a(C(),1),{Editor:LY,BackButton:MY}=L(Tc.privateApis),{useHistory:BY,useLocation:jY}=L(gI.privateApis),{BlockKeyboardShortcuts:zY}=L(mI.privateApis),GY={edit:{opacity:0,scale:.2},hover:{opacity:1,scale:1,clipPath:"inset( 22% round 2px )"}},HY={edit:{clipPath:"inset(0% round 0px)"},hover:{clipPath:"inset( 22% round 2px )"},tap:{clipPath:"inset(0% round 0px)"}};function wI(e){switch(e){case"navigation":return"/navigation";case"wp_block":return"/pattern?postType=wp_block";case"wp_template_part":return"/pattern?postType=wp_template_part";case"wp_template":return"/template";case"page":return"/page";case"post":return"/"}throw"Unknown post type"}function UY(e,t){let{path:r,name:o}=e;return["pattern-item","template-part-item","page-item","template-item","static-template-item","post-item"].includes(o)?wI(t):(0,bI.addQueryArgs)(r,{canvas:void 0})}function st({isHomeRoute:e=!1}){let t=(0,Ov.useReducedMotion)(),r=jY(),o=BY(),{canvas:n="view"}=r.query,i=Zh();eI(n);let s=oI();nI(s);let{postType:l,postId:u,context:c}=s,{isBlockBasedTheme:f,hasSiteIcon:m}=(0,_c.useSelect)(P=>{let{getCurrentTheme:V,getEntityRecord:N}=P(dI.store),A=N("root","__unstableBase",void 0);return{isBlockBasedTheme:V()?.is_block_theme,hasSiteIcon:!!A?.site_icon_url}},[]),d=!!c?.postId;XO(d?c.postType:l,d?c.postId:u);let h=Rr(),g=jO(),y=n==="edit",v=(0,Ov.useInstanceId)(t_,"edit-site-editor__loading-progress"),b=dO(),{resetZoomLevel:w}=L((0,_c.useDispatch)(yI.store)),{setCurrentRevisionId:x}=L((0,_c.useDispatch)(Tc.store)),{createSuccessNotice:T}=(0,_c.useDispatch)(hI.store),E=(0,pI.useCallback)((P,V)=>{switch(P){case"move-to-trash":case"delete-post":o.navigate(wI(d?c.postType:l));break;case"duplicate-post":{let N=V[0],A=typeof N.title=="string"?N.title:N.title?.rendered;T((0,ql.sprintf)((0,ql.__)('"%s" successfully created.'),(0,vI.decodeEntities)(A)||(0,ql.__)("(no title)")),{type:"snackbar",id:"duplicate-post-action",actions:[{label:(0,ql.__)("Edit"),onClick:()=>{o.navigate(`/${N.type}/${N.id}?canvas=edit`)}}]})}break}},[l,c?.postType,d,o,T]),k=!i,F={duration:t?0:.2};return!f&&e?(0,Ht.jsx)(fI,{}):(0,Ht.jsxs)(Ht.Fragment,{children:[(0,Ht.jsx)(Tc.EditorKeyboardShortcutsRegister,{}),y&&(0,Ht.jsx)(zY,{}),k?null:(0,Ht.jsx)(t_,{id:v}),y&&k&&(0,Ht.jsx)(ZR,{postType:d?c.postType:l}),k&&(0,Ht.jsxs)(LY,{postType:d?c.postType:l,postId:d?c.postId:u,templateId:d?u:void 0,settings:b,className:"edit-site-editor__editor-interface",customSaveButton:h&&(0,Ht.jsx)(yg,{size:"compact"}),customSavePanel:h&&(0,Ht.jsx)(Dd,{}),iframeProps:g,onActionPerformed:E,extraSidebarPanels:!d&&(0,Ht.jsx)(Tv.Slot,{}),children:[y&&(0,Ht.jsx)(oO,{}),y&&(0,Ht.jsx)(MY,{children:({length:P})=>P<=1&&(0,Ht.jsxs)(Cc.__unstableMotion.div,{className:"edit-site-editor__view-mode-toggle",transition:F,animate:"edit",initial:"edit",whileHover:"hover",whileTap:"tap",children:[(0,Ht.jsx)(Cc.Button,{__next40pxDefaultSize:!0,label:(0,ql.__)("Open Navigation"),showTooltip:!0,tooltipPosition:"middle right",onClick:()=>{w(),x(null),o.navigate(UY(r,d?c.postType:l),{transition:"canvas-mode-view-transition"})},children:(0,Ht.jsx)(Cc.__unstableMotion.div,{variants:HY,children:(0,Ht.jsx)(pd,{className:"edit-site-editor__view-mode-toggle-icon"})})}),(0,Ht.jsx)(Cc.__unstableMotion.div,{className:Z("edit-site-editor__back-icon",{"has-site-icon":m}),variants:GY,children:(0,Ht.jsx)(ui,{icon:i1})})]})}),(0,Ht.jsx)(NO,{})]})]})}function Jo(e){let t=e.currentTheme?.is_block_theme,r=e.currentTheme?.theme_supports["editor-styles"],o=e.editorSettings?.supportsLayout;return!t&&(r||o)}var Ec=a(C(),1),xI={name:"home",path:"/",areas:{sidebar({siteData:e}){return e.currentTheme?.is_block_theme||Jo(e)?(0,Ec.jsx)(wc,{}):(0,Ec.jsx)(Et,{})},preview({siteData:e}){return e.currentTheme?.is_block_theme||Jo(e)?(0,Ec.jsx)(st,{isHomeRoute:!0}):void 0},mobile({siteData:e}){return e.currentTheme?.is_block_theme||Jo(e)?(0,Ec.jsx)(wc,{}):(0,Ec.jsx)(Et,{})}}};var PI=a(Ne(),1),AI=a(Ke(),1),kI=a(bt(),1);var a_=a(j(),1),Iv=a(B(),1),SI=a(Ne(),1),_I=a(Ke(),1),CI=a(Qe(),1),Fv=a(M(),1),cm=a(bt(),1);var _a=a(C(),1),{GlobalStylesUIWrapper:WY,GlobalStylesActionMenu:qY}=L(_I.privateApis),{useLocation:TI,useHistory:EI}=L(SI.privateApis),YY=({isStyleBookOpened:e,setIsStyleBookOpened:t,path:r,onChangeSection:o})=>{let n=EI();return(0,_a.jsxs)(Fv.__experimentalHStack,{children:[(0,_a.jsx)(Fv.Button,{isPressed:e,icon:ad,label:(0,a_.__)("Style Book"),onClick:()=>{t(!e);let i=e?(0,cm.removeQueryArgs)(r,"preview"):(0,cm.addQueryArgs)(r,{preview:"stylebook"});n.navigate(i)},size:"compact"}),(0,_a.jsx)(qY,{hideWelcomeGuide:!0,onChangePath:o})]})},ZY=()=>{let{path:e,query:t}=TI(),r=EI();return(0,Iv.useMemo)(()=>[t.section??"/",o=>{r.navigate((0,cm.addQueryArgs)(e,{section:o}))}],[e,t.section,r])};function l_(){let{path:e}=TI(),[t,r]=(0,Iv.useState)(e.includes("preview=stylebook")),o=(0,CI.useViewportMatch)("medium","<"),[n,i]=ZY();return(0,_a.jsx)(Ln,{actions:o?null:(0,_a.jsx)(YY,{isStyleBookOpened:t,setIsStyleBookOpened:r,path:e,onChangeSection:i}),className:"edit-site-styles",title:(0,a_.__)("Styles"),headingLevel:2,children:(0,_a.jsx)(WY,{path:n,onPathChange:i})})}var ms=a(C(),1),{useLocation:RI,useHistory:KY}=L(PI.privateApis),{StyleBookPreview:XY}=L(AI.privateApis);function QY(){let{query:e={}}=RI(),{canvas:t}=e;return t==="edit"?(0,ms.jsx)(st,{}):(0,ms.jsx)(l_,{})}function JY(){let{path:e,query:t}=RI(),r=KY(),o=t.preview==="stylebook",n=t.section??"/",i=s=>{r.navigate((0,kI.addQueryArgs)(e,{section:s}))};return o?(0,ms.jsx)(XY,{path:n,onPathChange:i}):(0,ms.jsx)(st,{})}var OI={name:"styles",path:"/styles",areas:{content:(0,ms.jsx)(l_,{}),sidebar:(0,ms.jsx)(FR,{backPath:"/"}),preview:(0,ms.jsx)(JY,{}),mobile:(0,ms.jsx)(QY,{})},widths:{content:380}};var s6=a(Ne(),1);var Ti=a(j(),1),dm=a(he(),1),m_=a(re(),1),p_=a(mr(),1),Uv=a(M(),1);var II={per_page:100,status:["publish","draft"],order:"desc",orderby:"date"};var JI=a(j(),1),$I=a(mr(),1);var hs=a(M(),1);var Ac=a(j(),1),c_=a(B(),1),MI=a(Ne(),1);var Kn=a(M(),1),Pc=a(j(),1),FI=a(B(),1),ps=a(C(),1),$Y=e=>e?.trim()?.length>0;function VI({menuTitle:e,onClose:t,onSave:r}){let[o,n]=(0,FI.useState)(e),s=o!==e&&$Y(o);return(0,ps.jsx)(Kn.Modal,{title:(0,Pc.__)("Rename"),onRequestClose:t,focusOnMount:"firstContentElement",size:"small",children:(0,ps.jsx)("form",{className:"sidebar-navigation__rename-modal-form",children:(0,ps.jsxs)(Kn.__experimentalVStack,{spacing:"3",children:[(0,ps.jsx)(Kn.TextControl,{__next40pxDefaultSize:!0,value:o,placeholder:(0,Pc.__)("Navigation title"),onChange:n,label:(0,Pc.__)("Name")}),(0,ps.jsxs)(Kn.__experimentalHStack,{justify:"right",children:[(0,ps.jsx)(Kn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,Pc.__)("Cancel")}),(0,ps.jsx)(Kn.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,disabled:!s,variant:"primary",type:"submit",onClick:l=>{l.preventDefault(),s&&(r({title:o}),t())},children:(0,Pc.__)("Save")})]})]})})})}var NI=a(M(),1),u_=a(j(),1),DI=a(C(),1);function LI({onClose:e,onConfirm:t}){return(0,DI.jsx)(NI.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{t(),e()},onCancel:e,confirmButtonText:(0,u_.__)("Delete"),size:"medium",children:(0,u_.__)("Are you sure you want to delete this Navigation Menu?")})}var $o=a(C(),1),{useHistory:eZ}=L(MI.privateApis),tZ={position:"bottom right"};function Vv(e){let{onDelete:t,onSave:r,onDuplicate:o,menuTitle:n,menuId:i}=e,[s,l]=(0,c_.useState)(!1),[u,c]=(0,c_.useState)(!1),f=eZ(),m=()=>{l(!1),c(!1)},d=()=>l(!0),h=()=>c(!0);return(0,$o.jsxs)($o.Fragment,{children:[(0,$o.jsx)(hs.DropdownMenu,{className:"sidebar-navigation__more-menu",label:(0,Ac.__)("Actions"),icon:Dn,popoverProps:tZ,children:({onClose:g})=>(0,$o.jsxs)(hs.MenuGroup,{children:[(0,$o.jsx)(hs.MenuItem,{onClick:()=>{d(),g()},children:(0,Ac.__)("Rename")}),(0,$o.jsx)(hs.MenuItem,{onClick:()=>{f.navigate(`/wp_navigation/${i}?canvas=edit`)},children:(0,Ac.__)("Edit")}),(0,$o.jsx)(hs.MenuItem,{onClick:()=>{o(),g()},children:(0,Ac.__)("Duplicate")}),(0,$o.jsx)(hs.MenuItem,{isDestructive:!0,onClick:()=>{h(),g()},children:(0,Ac.__)("Delete")})]})}),u&&(0,$o.jsx)(LI,{onClose:m,onConfirm:t}),s&&(0,$o.jsx)(VI,{onClose:m,menuTitle:n,onSave:r})]})}var YI=a(B(),1),ZI=a(re(),1),KI=a(yt(),1),XI=a(Gr(),1);var Yl=a(yt(),1),Dv=a(re(),1),GI=a(Gr(),1),HI=a(B(),1),UI=a(he(),1);var _i=a(M(),1),Nv=a(re(),1),BI=a(B(),1),gs=a(j(),1),kc=a(yt(),1),jI=a(Ne(),1);var xn=a(C(),1),rZ={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"},{useHistory:oZ,useLocation:nZ}=L(jI.privateApis);function zI(e){let t=oZ(),{path:r}=nZ(),{block:o}=e,{clientId:n}=o,{moveBlocksDown:i,moveBlocksUp:s,removeBlocks:l}=(0,Nv.useDispatch)(kc.store),u=(0,gs.sprintf)((0,gs.__)("Remove %s"),(0,kc.BlockTitle)({clientId:n,maximumLength:25})),c=(0,gs.sprintf)((0,gs.__)("Go to %s"),(0,kc.BlockTitle)({clientId:n,maximumLength:25})),f=(0,Nv.useSelect)(d=>{let{getBlockRootClientId:h}=d(kc.store);return h(n)},[n]),m=(0,BI.useCallback)(d=>{let{attributes:h,name:g}=d;h.kind==="post-type"&&h.id&&h.type&&t&&t.navigate(`/${h.type}/${h.id}?canvas=edit`,{state:{backPath:r}}),g==="core/page-list-item"&&h.id&&t&&t.navigate(`/page/${h.id}?canvas=edit`,{state:{backPath:r}})},[r,t]);return(0,xn.jsx)(_i.DropdownMenu,{icon:Dn,label:(0,gs.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:rZ,noIcons:!0,...e,children:({onClose:d})=>(0,xn.jsxs)(xn.Fragment,{children:[(0,xn.jsxs)(_i.MenuGroup,{children:[(0,xn.jsx)(_i.MenuItem,{icon:qf,onClick:()=>{s([n],f),d()},children:(0,gs.__)("Move up")}),(0,xn.jsx)(_i.MenuItem,{icon:Wf,onClick:()=>{i([n],f),d()},children:(0,gs.__)("Move down")}),o.attributes?.type==="page"&&o.attributes?.id&&(0,xn.jsx)(_i.MenuItem,{onClick:()=>{m(o),d()},children:c})]}),(0,xn.jsx)(_i.MenuGroup,{children:(0,xn.jsx)(_i.MenuItem,{onClick:()=>{l([n],!1),d()},children:u})})]})})}var Ca=a(C(),1),{PrivateListView:iZ}=L(Yl.privateApis),sZ=100,aZ=["postType","page",{per_page:sZ,_fields:["id","link","menu_order","parent","title","type"],orderby:"menu_order",order:"asc"}];function WI({rootClientId:e}){let{listViewRootClientId:t,isLoading:r}=(0,Dv.useSelect)(s=>{let{areInnerBlocksControlled:l,getBlockName:u,getBlockCount:c,getBlockOrder:f}=s(Yl.store),{isResolving:m}=s(UI.store),d=f(e),g=d.length===1&&u(d[0])==="core/page-list"&&c(d[0])>0,y=m("getEntityRecords",aZ);return{listViewRootClientId:g?d[0]:e,isLoading:!l(e)||y}},[e]),{replaceBlock:o,__unstableMarkNextChangeAsNotPersistent:n}=(0,Dv.useDispatch)(Yl.store),i=(0,HI.useCallback)(s=>{s.name==="core/navigation-link"&&!s.attributes.url&&(n(),o(s.clientId,(0,GI.createBlock)("core/navigation-link",s.attributes)))},[n,o]);return(0,Ca.jsxs)(Ca.Fragment,{children:[!r&&(0,Ca.jsx)(iZ,{rootClientId:t,onSelect:i,blockSettingsMenu:zI,showAppender:!1,isExpanded:!0}),(0,Ca.jsx)("div",{className:"edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor",children:(0,Ca.jsx)(Yl.BlockList,{})})]})}var Lv=a(C(),1),qI=()=>{};function QI({navigationMenuId:e}){let{storedSettings:t}=(0,ZI.useSelect)(o=>{let{getSettings:n}=L(o(Re));return{storedSettings:n()}},[]),r=(0,YI.useMemo)(()=>e?[(0,XI.createBlock)("core/navigation",{ref:e})]:[],[e]);return!e||!r?.length?null:(0,Lv.jsx)(KI.BlockEditorProvider,{settings:t,value:r,onChange:qI,onInput:qI,children:(0,Lv.jsx)("div",{className:"edit-site-sidebar-navigation-screen-navigation-menus__content",children:(0,Lv.jsx)(WI,{rootClientId:r[0].clientId})})})}var Zl=a(j(),1),f_=a(mr(),1);function Mv(e,t,r){return e?.rendered?r==="publish"?(0,f_.decodeEntities)(e?.rendered):(0,Zl.sprintf)((0,Zl._x)("%1$s (%2$s)","menu label"),(0,f_.decodeEntities)(e?.rendered),r):(0,Zl.sprintf)((0,Zl.__)("(no title %s)"),t)}var Kl=a(C(),1);function Bv({navigationMenu:e,backPath:t,handleDelete:r,handleDuplicate:o,handleSave:n}){let i=e?.title?.rendered;return(0,Kl.jsx)(vs,{actions:(0,Kl.jsx)(Kl.Fragment,{children:(0,Kl.jsx)(Vv,{menuId:e?.id,menuTitle:(0,$I.decodeEntities)(i),onDelete:r,onSave:n,onDuplicate:o})}),backPath:t,title:Mv(e?.title,e?.id,e?.status),description:(0,JI.__)("Navigation Menus are a curated collection of blocks that allow visitors to get around your site."),children:(0,Kl.jsx)(QI,{navigationMenuId:e?.id})})}var fm=a(he(),1),No=a(j(),1),bs=a(re(),1),Hv=a(Mn(),1),n6=a(Ne(),1);var zv=a(he(),1),e6=a(M(),1),jv=a(j(),1),t6=a(re(),1),r6=a(mr(),1),o6=a(Ne(),1);var Xl=a(C(),1),{useLocation:lZ}=L(o6.privateApis),ys="wp_navigation";function d_({backPath:e}){let{params:{postId:t}}=lZ(),{record:r,isResolving:o}=(0,zv.useEntityRecord)("postType",ys,t),{isSaving:n,isDeleting:i}=(0,t6.useSelect)(g=>{let{isSavingEntityRecord:y,isDeletingEntityRecord:v}=g(zv.store);return{isSaving:y("postType",ys,t),isDeleting:v("postType",ys,t)}},[t]),s=o||n||i,l=r?.title?.rendered||r?.slug,{handleSave:u,handleDelete:c,handleDuplicate:f}=Gv(),m=()=>c(r),d=g=>u(r,g),h=()=>f(r);return s?(0,Xl.jsx)(vs,{description:(0,jv.__)("Navigation Menus are a curated collection of blocks that allow visitors to get around your site."),backPath:e,children:(0,Xl.jsx)(e6.Spinner,{className:"edit-site-sidebar-navigation-screen-navigation-menus__loading"})}):!s&&!r?(0,Xl.jsx)(vs,{description:(0,jv.__)("Navigation Menu missing."),backPath:e}):r?.content?.raw?(0,Xl.jsx)(Bv,{navigationMenu:r,backPath:e,handleDelete:m,handleSave:d,handleDuplicate:h}):(0,Xl.jsx)(vs,{actions:(0,Xl.jsx)(Vv,{menuId:r?.id,menuTitle:(0,r6.decodeEntities)(l),onDelete:m,onSave:d,onDuplicate:h}),backPath:e,title:Mv(r?.title,r?.id,r?.status),description:(0,jv.__)("This Navigation Menu is empty.")})}var{useHistory:i6}=L(n6.privateApis);function uZ(){let{deleteEntityRecord:e}=(0,bs.useDispatch)(fm.store),{createSuccessNotice:t,createErrorNotice:r}=(0,bs.useDispatch)(Hv.store),o=i6();return async i=>{let s=i?.id;try{await e("postType",ys,s,{force:!0},{throwOnError:!0}),t((0,No.__)("Navigation Menu successfully deleted."),{type:"snackbar"}),o.navigate("/navigation")}catch(l){r((0,No.sprintf)((0,No.__)("Unable to delete Navigation Menu (%s)."),l?.message),{type:"snackbar"})}}}function cZ(){let{getEditedEntityRecord:e}=(0,bs.useSelect)(s=>{let{getEditedEntityRecord:l}=s(fm.store);return{getEditedEntityRecord:l}},[]),{editEntityRecord:t,__experimentalSaveSpecifiedEntityEdits:r}=(0,bs.useDispatch)(fm.store),{createSuccessNotice:o,createErrorNotice:n}=(0,bs.useDispatch)(Hv.store);return async(s,l)=>{if(!l)return;let u=s?.id,c=e("postType",Fn,u);t("postType",ys,u,l);let f=Object.keys(l);try{await r("postType",ys,u,f,{throwOnError:!0}),o((0,No.__)("Renamed Navigation Menu"),{type:"snackbar"})}catch(m){t("postType",ys,u,c),n((0,No.sprintf)((0,No.__)("Unable to rename Navigation Menu (%s)."),m?.message),{type:"snackbar"})}}}function fZ(){let e=i6(),{saveEntityRecord:t}=(0,bs.useDispatch)(fm.store),{createSuccessNotice:r,createErrorNotice:o}=(0,bs.useDispatch)(Hv.store);return async i=>{let s=i?.title?.rendered||i?.slug;try{let l=await t("postType",ys,{title:(0,No.sprintf)((0,No._x)("%s (Copy)","navigation menu"),s),content:i?.content?.raw,status:"publish"},{throwOnError:!0});l&&(r((0,No.__)("Duplicated Navigation Menu"),{type:"snackbar"}),e.navigate(`/wp_navigation/${l.id}`))}catch(l){o((0,No.sprintf)((0,No.__)("Unable to duplicate Navigation Menu (%s)."),l?.message),{type:"snackbar"})}}}function Gv(){return{handleDelete:uZ(),handleSave:cZ(),handleDuplicate:fZ()}}var Ci=a(C(),1);function dZ(e,t,r){return e?r==="publish"?(0,p_.decodeEntities)(e):(0,Ti.sprintf)((0,Ti._x)("%1$s (%2$s)","menu label"),(0,p_.decodeEntities)(e),r):(0,Ti.sprintf)((0,Ti.__)("(no title %s)"),t)}function h_({backPath:e}){let{records:t,isResolving:r,hasResolved:o}=(0,dm.useEntityRecords)("postType",Fn,II),n=r&&!o,{getNavigationFallbackId:i}=L((0,m_.useSelect)(dm.store)),s=(0,m_.useSelect)(d=>d(dm.store).isResolving("getNavigationFallbackId"),[]),l=t?.[0];!l&&!r&&o&&!s&&i();let{handleSave:u,handleDelete:c,handleDuplicate:f}=Gv(),m=!!t?.length;return n?(0,Ci.jsx)(vs,{backPath:e,children:(0,Ci.jsx)(Uv.Spinner,{className:"edit-site-sidebar-navigation-screen-navigation-menus__loading"})}):!n&&!m?(0,Ci.jsx)(vs,{description:(0,Ti.__)("No Navigation Menus found."),backPath:e}):t?.length===1?(0,Ci.jsx)(Bv,{navigationMenu:l,backPath:e,handleDelete:()=>c(l),handleDuplicate:()=>f(l),handleSave:d=>u(l,d)}):(0,Ci.jsx)(vs,{backPath:e,children:(0,Ci.jsx)(Uv.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-navigation-menus",children:t?.map(({id:d,title:h,status:g},y)=>(0,Ci.jsx)(mZ,{postId:d,withChevron:!0,icon:$f,children:dZ(h?.rendered,y+1,g)},d))})})}function vs({children:e,actions:t,title:r,description:o,backPath:n}){return(0,Ci.jsx)(wr,{title:r||(0,Ti.__)("Navigation"),actions:t,description:o||(0,Ti.__)("Manage your Navigation Menus."),backPath:n,content:e})}var mZ=({postId:e,...t})=>(0,Ci.jsx)(zt,{to:`/wp_navigation/${e}`,...t});var Ta=a(C(),1),{useLocation:pZ}=L(s6.privateApis);function hZ(){let{query:e={}}=pZ(),{canvas:t="view"}=e;return t==="edit"?(0,Ta.jsx)(st,{}):(0,Ta.jsx)(h_,{backPath:"/"})}var a6={name:"navigation",path:"/navigation",areas:{sidebar({siteData:e}){return e.currentTheme?.is_block_theme?(0,Ta.jsx)(h_,{backPath:"/"}):(0,Ta.jsx)(Et,{})},preview({siteData:e}){return e.currentTheme?.is_block_theme?(0,Ta.jsx)(st,{}):void 0},mobile({siteData:e}){return e.currentTheme?.is_block_theme?(0,Ta.jsx)(hZ,{}):(0,Ta.jsx)(Et,{})}}};var l6=a(Ne(),1);var ws=a(C(),1),{useLocation:gZ}=L(l6.privateApis);function vZ(){let{query:e={}}=gZ(),{canvas:t="view"}=e;return t==="edit"?(0,ws.jsx)(st,{}):(0,ws.jsx)(d_,{backPath:"/navigation"})}var u6={name:"navigation-item",path:"/wp_navigation/:postId",areas:{sidebar({siteData:e}){return e.currentTheme?.is_block_theme?(0,ws.jsx)(d_,{backPath:"/navigation"}):(0,ws.jsx)(Et,{})},preview({siteData:e}){return e.currentTheme?.is_block_theme?(0,ws.jsx)(st,{}):(0,ws.jsx)(Et,{})},mobile({siteData:e}){return e.currentTheme?.is_block_theme?(0,ws.jsx)(vZ,{}):(0,ws.jsx)(Et,{})}}};var gm=a(M(),1),S_=a(Ke(),1),Oc=a(j(),1);var T6=a(Ne(),1);var g_=a(C(),1);function mm({count:e,icon:t,id:r,isActive:o,label:n,type:i}){if(!e)return;let s=[`postType=${i}`];return r&&s.push(`categoryId=${r}`),(0,g_.jsx)(zt,{icon:t,suffix:(0,g_.jsx)("span",{children:e}),"aria-current":o?"true":void 0,to:`/pattern?${s.join("&")}`,children:n})}var x6=a(B(),1),hm=a(j(),1);var c6=a(he(),1),v_=a(re(),1);function f6(){let e=(0,v_.useSelect)(r=>{let{getSettings:o}=L(r(Re)),n=o();return n.__experimentalAdditionalBlockPatternCategories??n.__experimentalBlockPatternCategories}),t=(0,v_.useSelect)(r=>r(c6.store).getBlockPatternCategories());return[...e||[],...t||[]]}var d6=a(he(),1),y_=a(re(),1),m6=a(B(),1);var Rc=(e,t,r)=>t===r.findIndex(o=>e.name===o.name);function p6(){let e=(0,y_.useSelect)(o=>{let{getSettings:n}=L(o(Re));return n().__experimentalAdditionalBlockPatterns??n().__experimentalBlockPatterns}),t=(0,y_.useSelect)(o=>o(d6.store).getBlockPatterns());return(0,m6.useMemo)(()=>[...e||[],...t||[]].filter(o=>!Cp.includes(o.source)).filter(Rc).filter(o=>o.inserter!==!1),[e,t])}var b6=a(Gr(),1),Ea=a(re(),1),Do=a(he(),1),b_=a(B(),1);var g6=a(yt(),1);var{extractWords:yZ,getNormalizedSearchTerms:v6,normalizeString:h6}=L(g6.privateApis),bZ=e=>e.type===ke.user?e.slug:e.type===ze?"":e.name||"",wZ=e=>typeof e.title=="string"?e.title:e.title&&e.title.rendered?e.title.rendered:e.title&&e.title.raw?e.title.raw:"",xZ=e=>e.type===ke.user?e.excerpt.raw:e.description||"",SZ=e=>e.keywords||[],_Z=()=>!1,CZ=(e,t)=>e.filter(r=>!v6(t).some(o=>o.includes(r))),pm=(e=[],t="",r={})=>{let o=v6(t),n=r.categoryId!==Zo&&!o.length,i={...r,onlyFilterByCategory:n},s=n?0:1,l=e.map(u=>[u,TZ(u,t,i)]).filter(([,u])=>u>s);return o.length===0?l.map(([u])=>u):(l.sort(([,u],[,c])=>c-u),l.map(([u])=>u))};function TZ(e,t,r){let{categoryId:o,getName:n=bZ,getTitle:i=wZ,getDescription:s=xZ,getKeywords:l=SZ,hasCategory:u=_Z,onlyFilterByCategory:c}=r,f=o===Zo||o===zu||o===_p&&e.type===ke.user||u(e,o)?1:0;if(!f||c)return f;let m=n(e),d=i(e),h=s(e),g=l(e),y=h6(t),v=h6(d);if(y===v)f+=30;else if(v.startsWith(y))f+=20;else{let b=[m,d,h,...g].join(" "),w=yZ(y);CZ(w,b).length===0&&(f+=10)}return f}var x_=[],EZ=(0,Ea.createSelector)((e,t,r="")=>{let{getEntityRecords:o,getCurrentTheme:n,isResolving:i}=e(Do.store),s={per_page:-1},l=o("postType",ze,s)??x_,c=(n()?.default_template_part_areas||[]).map(h=>h.area),f=(h,g)=>g!==ju?h.area===g:h.area===g||!c.includes(h.area),m=i("getEntityRecords",["postType",ze,s]);return{patterns:pm(l,r,{categoryId:t,hasCategory:f}),isResolving:m}},e=>[e(Do.store).getEntityRecords("postType",ze,{per_page:-1}),e(Do.store).isResolving("getEntityRecords",["postType",ze,{per_page:-1}]),e(Do.store).getCurrentTheme()?.default_template_part_areas]),y6=(0,Ea.createSelector)(e=>{let{getSettings:t}=L(e(Re)),{isResolving:r}=e(Do.store),o=t(),n=o.__experimentalAdditionalBlockPatterns??o.__experimentalBlockPatterns,i=e(Do.store).getBlockPatterns();return{patterns:[...n||[],...i||[]].filter(l=>!Cp.includes(l.source)).filter(Rc).filter(l=>l.inserter!==!1).map(l=>({...l,keywords:l.keywords||[],type:ke.theme,blocks:(0,b6.parse)(l.content,{__unstableSkipMigrationLogs:!0})})),isResolving:r("getBlockPatterns")}},e=>[e(Do.store).getBlockPatterns(),e(Do.store).isResolving("getBlockPatterns"),L(e(Re)).getSettings()]),PZ=(0,Ea.createSelector)((e,t,r,o="")=>{let{patterns:n,isResolving:i}=y6(e),{patterns:s,isResolving:l,categories:u}=w_(e),c=[...n||[],...s||[]];return r&&(c=c.filter(f=>f.type===ke.user?(f.wp_pattern_sync_status||Qi.full)===r:r===Qi.unsynced)),t?c=pm(c,o,{categoryId:t,hasCategory:(f,m)=>f.type===ke.user?f.wp_pattern_category?.some(d=>u.find(h=>h.id===d)?.slug===m):f.categories?.includes(m)}):c=pm(c,o,{hasCategory:f=>f.type===ke.user?u?.length&&(!f.wp_pattern_category?.length||!f.wp_pattern_category?.some(m=>u.find(d=>d.id===m))):!f.hasOwnProperty("categories")}),{patterns:c,isResolving:i||l}},e=>[y6(e),w_(e)]),w_=(0,Ea.createSelector)((e,t,r="")=>{let{getEntityRecords:o,isResolving:n,getUserPatternCategories:i}=e(Do.store),s={per_page:-1},l=o("postType",ke.user,s),u=i(),c=new Map;u.forEach(d=>c.set(d.id,d));let f=l??x_,m=n("getEntityRecords",["postType",ke.user,s]);return t&&(f=f.filter(d=>d.wp_pattern_sync_status||Qi.full===t)),f=pm(f,r,{hasCategory:()=>!0}),{patterns:f,isResolving:m,categories:u}},e=>[e(Do.store).getEntityRecords("postType",ke.user,{per_page:-1}),e(Do.store).isResolving("getEntityRecords",["postType",ke.user,{per_page:-1}]),e(Do.store).getUserPatternCategories()]);function w6(e){let t=(0,b_.useMemo)(()=>e?.filter(o=>o.type!==ke.theme).map(o=>[o.type,o.id])??[],[e]),r=(0,Ea.useSelect)(o=>{let{getEntityRecordPermissions:n}=L(o(Do.store));return t.reduce((i,[s,l])=>(i[l]=n("postType",s,l),i),{})},[t]);return(0,b_.useMemo)(()=>e?.map(o=>({...o,permissions:r?.[o.id]??{}}))??[],[e,r])}var AZ=(e,t,{search:r="",syncStatus:o}={})=>(0,Ea.useSelect)(n=>e===ze?EZ(n,t,r):e===ke.user&&t?PZ(n,t==="uncategorized"?"":t,o,r):e===ke.user?w_(n,o,r):{patterns:x_,isResolving:!1},[t,e,r,o]),Wv=AZ;function Pa(){let e=f6();e.push({name:ju,label:(0,hm.__)("Uncategorized")});let t=p6(),{patterns:r,categories:o}=Wv(ke.user),n=(0,x6.useMemo)(()=>{let i={},s=[];e.forEach(u=>{i[u.name]||(i[u.name]={...u,count:0})}),o.forEach(u=>{i[u.name]||(i[u.name]={...u,count:0})}),t.forEach(u=>{u.categories?.forEach(c=>{i[c]&&(i[c].count+=1)}),u.categories?.length||(i.uncategorized.count+=1)}),r.forEach(u=>{u.wp_pattern_category?.forEach(c=>{let f=o.find(m=>m.id===c)?.name;i[f]&&(i[f].count+=1)}),(!u.wp_pattern_category?.length||!u.wp_pattern_category?.some(c=>o.find(f=>f.id===c)))&&(i.uncategorized.count+=1)}),[...e,...o].forEach(u=>{i[u.name].count&&!s.find(c=>c.name===u.name)&&s.push(i[u.name])});let l=s.sort((u,c)=>u.label.localeCompare(c.label));return l.unshift({name:_p,label:(0,hm.__)("My patterns"),count:r.length}),l.unshift({name:Zo,label:(0,hm.__)("All patterns"),description:(0,hm.__)("A list of all patterns from all sources."),count:t.length+r.length}),l},[e,t,o,r]);return{patternCategories:n,hasPatterns:!!n.length}}var qv=a(he(),1),S6=a(re(),1),_6=a(wp(),1);var{NAVIGATION_OVERLAY_TEMPLATE_PART_AREA:kZ}=L(_6.privateApis),RZ=e=>{let t=e||[],r=(0,S6.useSelect)(i=>i(qv.store).getCurrentTheme()?.default_template_part_areas||[],[]),o={header:{},footer:{},sidebar:{},uncategorized:{},[kZ]:{}};return r.forEach(i=>o[i.area]={...i,templateParts:[]}),t.reduce((i,s)=>{let l=i[s.area]?s.area:ju;return i[l]?.templateParts?.push(s),i},o)};function C6(){let{records:e,isResolving:t}=(0,qv.useEntityRecords)("postType",ze,{per_page:-1});return{hasTemplateParts:e?!!e.length:!1,isLoading:t,templatePartAreas:RZ(e)}}var Or=a(C(),1),{useLocation:OZ}=L(T6.privateApis);function IZ({templatePartAreas:e,patternCategories:t,currentCategory:r,currentType:o}){let[n,...i]=t;return(0,Or.jsxs)(gm.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-patterns__group",children:[(0,Or.jsx)(mm,{count:Object.values(e).map(({templateParts:s})=>s?.length||0).reduce((s,l)=>s+l,0),icon:(0,S_.getTemplatePartIcon)(),label:(0,Oc.__)("All template parts"),id:zu,type:ze,isActive:r===zu&&o===ze},"all"),Object.entries(e).map(([s,{label:l,templateParts:u,icon:c}])=>(0,Or.jsx)(mm,{count:u?.length,icon:(0,S_.getTemplatePartIcon)(c),label:l,id:s,type:ze,isActive:r===s&&o===ze},s)),(0,Or.jsx)("div",{className:"edit-site-sidebar-navigation-screen-patterns__divider"}),n&&(0,Or.jsx)(mm,{count:n.count,label:n.label,icon:ih,id:n.name,type:ke.user,isActive:r===`${n.name}`&&o===ke.user},n.name),i.map(s=>(0,Or.jsx)(mm,{count:s.count,label:s.label,icon:ih,id:s.name,type:ke.user,isActive:r===`${s.name}`&&o===ke.user},s.name))]})}function Ql({backPath:e}){let{query:{postType:t="wp_block",categoryId:r}}=OZ(),o=r||(t===ke.user?Zo:zu),{templatePartAreas:n,hasTemplateParts:i,isLoading:s}=C6(),{patternCategories:l,hasPatterns:u}=Pa();return(0,Or.jsx)(wr,{title:(0,Oc.__)("Patterns"),description:(0,Oc.__)("Manage what patterns are available when editing the site."),isRoot:!e,backPath:e,content:(0,Or.jsxs)(Or.Fragment,{children:[s&&(0,Oc.__)("Loading items\u2026"),!s&&(0,Or.jsxs)(Or.Fragment,{children:[!i&&!u&&(0,Or.jsx)(gm.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-patterns__group",children:(0,Or.jsx)(gm.__experimentalItem,{children:(0,Oc.__)("No items found")})}),(0,Or.jsx)(IZ,{templatePartAreas:n,patternCategories:l,currentCategory:o,currentType:t})]})]})})}var mC=a(j(),1),sp=a(B(),1),EL=a(yt(),1);var ho=a(B(),1),E0=a(Qe(),1);var Qv=a(B(),1);var __=a(j(),1);var Vt="isAny",Nt="isNone",Wr="isAll",_r="isNotAll",ao="between",lo="inThePast",Lo="over",Ut="is",Wt="isNot",Aa="lessThan",ka="greaterThan",Ra="lessThanOrEqual",Oa="greaterThanOrEqual",Ia="before",Fa="after",Va="beforeInc",Na="afterInc",Ei="contains",Pi="notContains",Ai="startsWith",Da="on",La="notOn",Yv=["asc","desc"],E6={asc:"\u2191",desc:"\u2193"},Zv={asc:"ascending",desc:"descending"},Kv={asc:(0,__.__)("Sort ascending"),desc:(0,__.__)("Sort descending")},P6={asc:a1,desc:$b},Ic="table",Xv="grid",A6="list",k6="activity",R6="pickerGrid",O6="pickerTable";var I6=(0,Qv.createContext)({view:{type:Ic},onChangeView:()=>{},fields:[],data:[],paginationInfo:{totalItems:0,totalPages:0},selection:[],onChangeSelection:()=>{},setOpenedFilter:()=>{},openedFilter:null,getItemId:e=>e.id,isItemClickable:()=>!0,renderItemLink:void 0,containerWidth:0,containerRef:(0,Qv.createRef)(),resizeObserverRef:()=>{},defaultLayouts:{list:{},grid:{},table:{}},filters:[],isShowingFilter:!1,setIsShowingFilter:()=>{},hasInitiallyLoaded:!1,hasInfiniteScrollHandler:!1,config:{perPageSizes:[]}});I6.displayName="DataViewsContext";var Ce=I6;var Cs=a(j(),1);var eu=a(j(),1),iy=a(M(),1),Mo=a(B(),1),k_=a(Js(),1);var F6=a(M(),1),V6=a(j(),1),N6=a(C(),1);function Ma({selection:e,onChangeSelection:t,item:r,getItemId:o,titleField:n,disabled:i,...s}){let l=o(r),u=!i&&e.includes(l),c=n?.getValue?.({item:r})||(0,V6.__)("(no title)");return(0,N6.jsx)(F6.CheckboxControl,{className:"dataviews-selection-checkbox","aria-label":c,"aria-disabled":i,checked:u,onChange:()=>{i||t(e.includes(l)?e.filter(f=>l!==f):[...e,l])},...s})}var Jl=a(M(),1),M6=a(j(),1),Vc=a(B(),1);var B6=a(re(),1),C_=a(Qe(),1);var D6=a(Sp(),1),{lock:Kxe,unlock:Me}=(0,D6.__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");var Pt=a(C(),1),{Menu:Fc,kebabCase:FZ}=Me(Jl.privateApis);function VZ({action:e,onClick:t,items:r,variant:o}){let n=typeof e.label=="string"?e.label:e.label(r);return(0,Pt.jsx)(Jl.Button,{disabled:!!e.disabled,accessibleWhenDisabled:!0,size:"compact",variant:o,onClick:t,children:n})}function NZ({action:e,onClick:t,items:r}){let o=typeof e.label=="string"?e.label:e.label(r);return(0,Pt.jsx)(Fc.Item,{disabled:e.disabled,onClick:t,children:(0,Pt.jsx)(Fc.ItemLabel,{children:o})})}function $l({action:e,items:t,closeModal:r}){let o=typeof e.label=="string"?e.label:e.label(t),n=typeof e.modalHeader=="function"?e.modalHeader(t):e.modalHeader;return(0,Pt.jsx)(Jl.Modal,{title:n||o,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:r,focusOnMount:e.modalFocusOnMount??!0,size:e.modalSize||"medium",overlayClassName:`dataviews-action-modal dataviews-action-modal__${FZ(e.id)}`,children:(0,Pt.jsx)(e.RenderModal,{items:t,closeModal:r})})}function T_({actions:e,item:t,registry:r,setActiveModalAction:o}){let{primaryActions:n,regularActions:i}=(0,Vc.useMemo)(()=>e.reduce((l,u)=>((u.isPrimary?l.primaryActions:l.regularActions).push(u),l),{primaryActions:[],regularActions:[]}),[e]),s=l=>l.map(u=>(0,Pt.jsx)(NZ,{action:u,onClick:()=>{if("RenderModal"in u){o(u);return}u.callback([t],{registry:r})},items:[t]},u.id));return(0,Pt.jsxs)(Fc.Group,{children:[s(n),s(i)]})}function Nc({item:e,actions:t,isCompact:r}){let o=(0,B6.useRegistry)(),{primaryActions:n,eligibleActions:i}=(0,Vc.useMemo)(()=>{let l=t.filter(c=>!c.isEligible||c.isEligible(e));return{primaryActions:l.filter(c=>c.isPrimary),eligibleActions:l}},[t,e]),s=(0,C_.useViewportMatch)("medium","<");return r?(0,Pt.jsx)(L6,{item:e,actions:i,isSmall:!0,registry:o}):(0,Pt.jsxs)(Q,{direction:"row",justify:"flex-end",className:"dataviews-item-actions",style:{flexShrink:0,width:"auto"},children:[(0,Pt.jsx)(E_,{item:e,actions:n,registry:o}),(n.length<i.length||s)&&(0,Pt.jsx)(L6,{item:e,actions:i,registry:o})]})}function L6({item:e,actions:t,isSmall:r,registry:o}){let[n,i]=(0,Vc.useState)(null);return(0,Pt.jsxs)(Pt.Fragment,{children:[(0,Pt.jsxs)(Fc,{placement:"bottom-end",children:[(0,Pt.jsx)(Fc.TriggerButton,{render:(0,Pt.jsx)(Jl.Button,{size:r?"small":"compact",icon:Dn,label:(0,M6.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,className:"dataviews-all-actions-button"})}),(0,Pt.jsx)(Fc.Popover,{children:(0,Pt.jsx)(T_,{actions:t,item:e,registry:o,setActiveModalAction:i})})]}),!!n&&(0,Pt.jsx)($l,{action:n,items:[e],closeModal:()=>i(null)})]})}function E_({item:e,actions:t,registry:r,buttonVariant:o}){let[n,i]=(0,Vc.useState)(null);return(0,C_.useViewportMatch)("medium","<")||!Array.isArray(t)||t.length===0?null:(0,Pt.jsxs)(Pt.Fragment,{children:[t.map(l=>(0,Pt.jsx)(VZ,{action:l,onClick:()=>{if("RenderModal"in l){i(l);return}l.callback([e],{registry:r})},items:[e],variant:o},l.id)),!!n&&(0,Pt.jsx)($l,{action:n,items:[e],closeModal:()=>i(null)})]})}var Dc=a(M(),1),Jv=a(j(),1),qr=a(B(),1),H6=a(re(),1);var P_=a(Qe(),1);var Ba=a(j(),1);function j6(e,t,r){return e>0?(0,Ba.sprintf)((0,Ba._n)("%d Item selected","%d Items selected",e),e):r>t?(0,Ba.sprintf)((0,Ba._n)("%1$d of %2$d Item","%1$d of %2$d Items",r),t,r):(0,Ba.sprintf)((0,Ba._n)("%d Item","%d Items",t),t)}var hr=a(C(),1);function DZ({action:e,items:t,ActionTriggerComponent:r}){let[o,n]=(0,qr.useState)(!1);return(0,hr.jsxs)(hr.Fragment,{children:[(0,hr.jsx)(r,{...{action:e,onClick:()=>{n(!0)},items:t}}),o&&(0,hr.jsx)($l,{action:e,items:t,closeModal:()=>n(!1)})]})}function $v(e,t){return(0,qr.useMemo)(()=>e.some(r=>r.supportsBulk&&(!r.isEligible||r.isEligible(t))),[e,t])}function Lc(e,t){return(0,qr.useMemo)(()=>t.some(r=>e.some(o=>o.supportsBulk&&(!o.isEligible||o.isEligible(r)))),[e,t])}function vm({selection:e,onChangeSelection:t,data:r,actions:o,getItemId:n}){let i=(0,qr.useMemo)(()=>r.filter(u=>o.some(c=>c.supportsBulk&&(!c.isEligible||c.isEligible(u)))),[r,o]),s=r.filter(u=>e.includes(n(u))&&i.includes(u)),l=s.length===i.length;return(0,hr.jsx)(Dc.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",checked:l,indeterminate:!l&&!!s.length,onChange:()=>{t(l?[]:i.map(u=>n(u)))},"aria-label":l?(0,Jv.__)("Deselect all"):(0,Jv.__)("Select all")})}function z6({action:e,onClick:t,isBusy:r,items:o}){let n=typeof e.label=="string"?e.label:e.label(o);return(0,P_.useViewportMatch)("medium","<")?(0,hr.jsx)(Dc.Button,{disabled:r,accessibleWhenDisabled:!0,label:n,icon:e.icon,size:"compact",onClick:t,isBusy:r}):(0,hr.jsx)(Dc.Button,{disabled:r,accessibleWhenDisabled:!0,size:"compact",onClick:t,isBusy:r,children:n})}var U6=[];function LZ({action:e,selectedItems:t,actionInProgress:r,setActionInProgress:o}){let n=(0,H6.useRegistry)(),i=(0,qr.useMemo)(()=>t.filter(s=>!e.isEligible||e.isEligible(s)),[e,t]);return"RenderModal"in e?(0,hr.jsx)(DZ,{action:e,items:i,ActionTriggerComponent:z6},e.id):(0,hr.jsx)(z6,{action:e,onClick:async()=>{o(e.id),await e.callback(t,{registry:n}),o(null)},items:i,isBusy:r===e.id},e.id)}function G6(e,t,r,o,n,i,s,l,u,c){let f=j6(o.length,e.length,c.totalItems);return(0,hr.jsxs)(Q,{direction:"row",className:"dataviews-bulk-actions-footer__container",gap:"md",align:"center",children:[(0,hr.jsx)(vm,{selection:o,onChangeSelection:u,data:e,actions:t,getItemId:r}),(0,hr.jsx)("span",{className:"dataviews-bulk-actions-footer__item-count",children:f}),(0,hr.jsxs)(Q,{direction:"row",className:"dataviews-bulk-actions-footer__action-buttons",gap:"xs",children:[n.map(m=>(0,hr.jsx)(LZ,{action:m,selectedItems:i,actionInProgress:s,setActionInProgress:l},m.id)),i.length>0&&(0,hr.jsx)(Dc.Button,{icon:wl,showTooltip:!0,tooltipPosition:"top",size:"compact",label:(0,Jv.__)("Cancel"),disabled:!!s,accessibleWhenDisabled:!1,onClick:()=>{u(U6)}})]})]})}function MZ({selection:e,actions:t,onChangeSelection:r,data:o,getItemId:n,paginationInfo:i}){let[s,l]=(0,qr.useState)(null),u=(0,qr.useRef)(void 0),c=(0,P_.useViewportMatch)("medium","<"),f=(0,qr.useMemo)(()=>t.filter(g=>g.supportsBulk),[t]),m=(0,qr.useMemo)(()=>o.filter(g=>f.some(y=>!y.isEligible||y.isEligible(g))),[o,f]),d=(0,qr.useMemo)(()=>o.filter(g=>e.includes(n(g))&&m.includes(g)),[e,o,n,m]),h=(0,qr.useMemo)(()=>t.filter(g=>g.supportsBulk&&(!c||g.icon)&&d.some(y=>!g.isEligible||g.isEligible(y))),[t,d,c]);if(s)u.current||(u.current=G6(o,t,n,e,h,d,s,l,r,i));else return u.current&&(u.current=void 0),G6(o,t,n,e,h,d,s,l,r,i);return u.current}function ey(){let{data:e,selection:t,actions:r=U6,onChangeSelection:o,getItemId:n,paginationInfo:i}=(0,qr.useContext)(Ce);return(0,hr.jsx)(MZ,{selection:t,onChangeSelection:o,data:e,actions:r,getItemId:n,paginationInfo:i})}var xs=a(j(),1);var Ss=a(M(),1),ja=a(B(),1);function ty(e,t){let r=[e?.titleField,e?.mediaField,e?.descriptionField].filter(Boolean);return t.filter(o=>!r.includes(o.id)&&o.type!=="media"&&o.enableHiding!==!1)}var Ge=a(C(),1),{Menu:mt}=Me(Ss.privateApis);function BZ({children:e}){return ja.Children.toArray(e).filter(Boolean).map((t,r)=>(0,Ge.jsxs)(ja.Fragment,{children:[r>0&&(0,Ge.jsx)(mt.Separator,{}),t]},r))}var jZ=(0,ja.forwardRef)(function({fieldId:t,view:r,fields:o,onChangeView:n,onHide:i,setOpenedFilter:s,canMove:l=!0,canInsertLeft:u=!0,canInsertRight:c=!0},f){let m=r.fields??[],d=m?.indexOf(t),h=r.sort?.field===t,g=!1,y=!1,v=!1,b=[],w=o.find(P=>P.id===t),{setIsShowingFilter:x}=(0,ja.useContext)(Ce);if(!w)return null;g=w.enableHiding!==!1,y=w.enableSorting!==!1;let T=w.header;if(b=!!w.filterBy&&w.filterBy?.operators||[],v=!r.filters?.some(P=>t===P.field)&&!!(w.hasElements||w.Edit)&&w.filterBy!==!1&&!w.filterBy?.isPrimary,!y&&!l&&!g&&!v)return T;let E=ty(r,o).filter(P=>!m.includes(P.id)),k=(u||c)&&!!E.length,F=(0,xs.isRTL)();return(0,Ge.jsxs)(mt,{children:[(0,Ge.jsxs)(mt.TriggerButton,{render:(0,Ge.jsx)(Ss.Button,{size:"compact",className:"dataviews-view-table-header-button",ref:f,variant:"tertiary"}),children:[T,r.sort&&h&&(0,Ge.jsx)("span",{"aria-hidden":"true",children:E6[r.sort.direction]})]}),(0,Ge.jsx)(mt.Popover,{style:{minWidth:"240px"},children:(0,Ge.jsxs)(BZ,{children:[y&&(0,Ge.jsx)(mt.Group,{children:Yv.map(P=>{let V=r.sort&&h&&r.sort.direction===P,N=`${t}-${P}`;return(0,Ge.jsx)(mt.RadioItem,{name:"view-table-sorting",value:N,checked:V,onChange:()=>{n({...r,sort:{field:t,direction:P},showLevels:!1})},children:(0,Ge.jsx)(mt.ItemLabel,{children:Kv[P]})},N)})}),v&&(0,Ge.jsx)(mt.Group,{children:(0,Ge.jsx)(mt.Item,{prefix:(0,Ge.jsx)(Ss.Icon,{icon:Yf}),onClick:()=>{s(t),x(!0),n({...r,page:1,filters:[...r.filters||[],{field:t,value:void 0,operator:b[0]}]})},children:(0,Ge.jsx)(mt.ItemLabel,{children:(0,xs.__)("Add filter")})})}),(l||g||k)&&w&&(0,Ge.jsxs)(mt.Group,{children:[l&&(0,Ge.jsx)(mt.Item,{prefix:(0,Ge.jsx)(Ss.Icon,{icon:t1}),disabled:F?d>=m.length-1:d<1,onClick:()=>{let P=F?d+1:d-1,V=[...m];V.splice(d,1),V.splice(P,0,t),n({...r,fields:V})},children:(0,Ge.jsx)(mt.ItemLabel,{children:(0,xs.__)("Move left")})}),l&&(0,Ge.jsx)(mt.Item,{prefix:(0,Ge.jsx)(Ss.Icon,{icon:o1}),disabled:F?d<1:d>=m.length-1,onClick:()=>{let P=F?d-1:d+1,V=[...m];V.splice(d,1),V.splice(P,0,t),n({...r,fields:V})},children:(0,Ge.jsx)(mt.ItemLabel,{children:(0,xs.__)("Move right")})}),u&&!!E.length&&(0,Ge.jsxs)(mt,{children:[(0,Ge.jsx)(mt.SubmenuTriggerItem,{children:(0,Ge.jsx)(mt.ItemLabel,{children:(0,xs.__)("Insert left")})}),(0,Ge.jsx)(mt.Popover,{children:E.map(P=>{let V=F?d+1:d;return(0,Ge.jsx)(mt.Item,{onClick:()=>{n({...r,fields:[...m.slice(0,V),P.id,...m.slice(V)]})},children:(0,Ge.jsx)(mt.ItemLabel,{children:P.label})},P.id)})})]}),c&&!!E.length&&(0,Ge.jsxs)(mt,{children:[(0,Ge.jsx)(mt.SubmenuTriggerItem,{children:(0,Ge.jsx)(mt.ItemLabel,{children:(0,xs.__)("Insert right")})}),(0,Ge.jsx)(mt.Popover,{children:E.map(P=>{let V=F?d:d+1;return(0,Ge.jsx)(mt.Item,{onClick:()=>{n({...r,fields:[...m.slice(0,V),P.id,...m.slice(V)]})},children:(0,Ge.jsx)(mt.ItemLabel,{children:P.label})},P.id)})})]}),g&&w&&(0,Ge.jsx)(mt.Item,{prefix:(0,Ge.jsx)(Ss.Icon,{icon:cd}),onClick:()=>{i(w),n({...r,fields:m.filter(P=>P!==t)})},children:(0,Ge.jsx)(mt.ItemLabel,{children:(0,xs.__)("Hide column")})})]})]})})]})}),zZ=jZ,Mc=zZ;var W6=a(B(),1),A_=a(C(),1);function GZ({item:e,isItemClickable:t,onClickItem:r,className:o}){return!t(e)||!r?{className:o}:{className:o?`${o} ${o}--clickable`:void 0,role:"button",tabIndex:0,onClick:n=>{n.stopPropagation(),r(e)},onKeyDown:n=>{(n.key==="Enter"||n.key===""||n.key===" ")&&(n.stopPropagation(),r(e))}}}function za({item:e,isItemClickable:t,onClickItem:r,renderItemLink:o,className:n,children:i,...s}){if(!t(e))return(0,A_.jsx)("div",{className:n,...s,children:i});if(o){let u=o({item:e,className:`${n} ${n}--clickable`,...s,children:i});return(0,W6.cloneElement)(u,{onClick:c=>{c.stopPropagation(),u.props.onClick&&u.props.onClick(c)},onKeyDown:c=>{(c.key==="Enter"||c.key===""||c.key===" ")&&(c.stopPropagation(),u.props.onKeyDown&&u.props.onKeyDown(c))}})}let l=GZ({item:e,isItemClickable:t,onClickItem:r,className:n});return(0,A_.jsx)("div",{...l,...s,children:i})}var ki=a(C(),1);function HZ({item:e,level:t,titleField:r,mediaField:o,descriptionField:n,onClickItem:i,renderItemLink:s,isItemClickable:l}){return(0,ki.jsxs)(Q,{direction:"row",gap:"md",align:"flex-start",justify:"flex-start",children:[o&&(0,ki.jsx)(za,{item:e,isItemClickable:l,onClickItem:i,renderItemLink:s,className:"dataviews-view-table__cell-content-wrapper dataviews-column-primary__media","aria-label":l(e)&&(i||s)&&r?r.getValue?.({item:e}):void 0,children:(0,ki.jsx)(o.render,{item:e,field:o,config:{sizes:"32px"}})}),(0,ki.jsxs)(Q,{direction:"column",align:"flex-start",className:"dataviews-view-table__primary-column-content",children:[r&&(0,ki.jsxs)(za,{item:e,isItemClickable:l,onClickItem:i,renderItemLink:s,className:"dataviews-view-table__cell-content-wrapper dataviews-title-field",children:[t!==void 0&&t>0&&(0,ki.jsxs)("span",{className:"dataviews-view-table__level",children:[Array(t).fill("\u2014").join(" "),"\xA0"]}),(0,ki.jsx)(r.render,{item:e,field:r})]}),n&&(0,ki.jsx)(n.render,{item:e,field:n})]})]})}var ry=HZ;var q6=a(Qe(),1),Bc=a(B(),1),Y6=a(j(),1),UZ=e=>(0,Y6.isRTL)()?Math.abs(e.scrollLeft)<=1:e.scrollLeft+e.clientWidth>=e.scrollWidth-1;function Z6({scrollContainerRef:e,enabled:t=!1}){let[r,o]=(0,Bc.useState)(!1),n=(0,q6.useDebounce)((0,Bc.useCallback)(()=>{let i=e.current;i&&o(UZ(i))},[e,o]),200);return(0,Bc.useEffect)(()=>typeof window>"u"||!t||!e.current?()=>{}:(n(),e.current.addEventListener("scroll",n),window.addEventListener("resize",n),()=>{e.current?.removeEventListener("scroll",n),window.removeEventListener("resize",n)}),[e,t]),r}function Sn(e,t){return e.reduce((r,o)=>{let n=t.getValue({item:o});return r.has(n)||r.set(n,[]),r.get(n)?.push(o),r},new Map)}var Ga=a(M(),1),X6=a(j(),1),Q6=a(B(),1);var en=a(C(),1);function K6({field:e,isVisible:t,onToggleVisibility:r}){return(0,en.jsx)(Ga.__experimentalItem,{onClick:e.enableHiding?r:void 0,children:(0,en.jsxs)(Q,{direction:"row",gap:"sm",justify:"flex-start",align:"center",children:[(0,en.jsx)("div",{style:{height:24,width:24},children:t&&(0,en.jsx)(Ga.Icon,{icon:bl})}),(0,en.jsx)("span",{className:"dataviews-view-config__label",children:e.label})]})})}function WZ(e){return!!e}function oy({showLabel:e=!0}){let{view:t,fields:r,onChangeView:o}=(0,Q6.useContext)(Ce),n=ty(t,r);if(!n?.length)return null;let i=r.find(g=>g.id===t.titleField),s=r.find(g=>g.id===t.mediaField),l=r.find(g=>g.id===t.descriptionField),u=[{field:i,isVisibleFlag:"showTitle"},{field:s,isVisibleFlag:"showMedia"},{field:l,isVisibleFlag:"showDescription"}].filter(({field:g})=>WZ(g)),c=t.fields??[],f=n.filter(g=>c.includes(g.id)).length,m=u.filter(({isVisibleFlag:g})=>t[g]??!0),d=m.length+f,h=d===1&&m.length===1;return(0,en.jsxs)(Q,{direction:"column",className:"dataviews-field-control",children:[e&&(0,en.jsx)(Ga.BaseControl.VisualLabel,{children:(0,X6.__)("Properties")}),(0,en.jsx)(Q,{direction:"column",className:"dataviews-view-config__properties",children:(0,en.jsxs)(Ga.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,size:"medium",children:[u.map(({field:g,isVisibleFlag:y})=>{let v=t[y]??!0,b=h&&v?{...g,enableHiding:!1}:g;return(0,en.jsx)(K6,{field:b,isVisible:v,onToggleVisibility:()=>{o({...t,[y]:!v})}},g.id)}),n.map(g=>{let y=c.includes(g.id),v=d===1&&y?{...g,enableHiding:!1}:g;return(0,en.jsx)(K6,{field:v,isVisible:y,onToggleVisibility:()=>{o({...t,fields:y?c.filter(b=>b!==g.id):[...c,g.id]})}},g.id)})]})})]})}var ny=a(B(),1);function _n(e,t={delay:400}){let[r,o]=(0,ny.useState)(!1);return(0,ny.useEffect)(()=>{if(!e)return;let n=setTimeout(()=>{o(!0)},t.delay);return()=>{clearTimeout(n),o(!1)}},[e,t.delay]),r}var Oe=a(C(),1);function $6(e,t){if(e)return e;if(t==="integer"||t==="number")return"end"}function qZ({item:e,fields:t,column:r,align:o}){let n=t.find(s=>s.id===r);if(!n)return null;let i=Z("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__cell-align-end":o==="end","dataviews-view-table__cell-align-center":o==="center"});return(0,Oe.jsx)("div",{className:i,children:(0,Oe.jsx)(n.render,{item:e,field:n})})}function J6({hasBulkActions:e,item:t,level:r,actions:o,fields:n,id:i,view:s,titleField:l,mediaField:u,descriptionField:c,selection:f,getItemId:m,isItemClickable:d,onClickItem:h,renderItemLink:g,onChangeSelection:y,isActionsColumnSticky:v,posinset:b}){let{paginationInfo:w}=(0,Mo.useContext)(Ce),x=$v(o,t),T=x&&f.includes(i),{showTitle:E=!0,showMedia:k=!0,showDescription:F=!0,infiniteScrollEnabled:P}=s,V=(0,Mo.useRef)(!1),N=s.fields??[],A=l&&E||u&&k||c&&F;return(0,Oe.jsxs)("tr",{className:Z("dataviews-view-table__row",{"is-selected":x&&T,"has-bulk-actions":x}),onTouchStart:()=>{V.current=!0},"aria-setsize":P?w.totalItems:void 0,"aria-posinset":b,role:P?"article":void 0,onMouseDown:S=>{let I=(0,k_.isAppleOS)()?S.metaKey:S.ctrlKey;S.button===0&&I&&window.navigator.userAgent.toLowerCase().includes("firefox")&&S?.preventDefault()},onClick:S=>{if(!x)return;((0,k_.isAppleOS)()?S.metaKey:S.ctrlKey)&&!V.current&&document.getSelection()?.type!=="Range"&&y(f.includes(i)?f.filter(O=>i!==O):[...f,i])},children:[e&&(0,Oe.jsx)("td",{className:"dataviews-view-table__checkbox-column",children:(0,Oe.jsx)("div",{className:"dataviews-view-table__cell-content-wrapper",children:(0,Oe.jsx)(Ma,{item:t,selection:f,onChangeSelection:y,getItemId:m,titleField:l,disabled:!x})})}),A&&(0,Oe.jsx)("td",{children:(0,Oe.jsx)(ry,{item:t,level:r,titleField:E?l:void 0,mediaField:k?u:void 0,descriptionField:F?c:void 0,isItemClickable:d,onClickItem:h,renderItemLink:g})}),N.map(S=>{let{width:I,maxWidth:O,minWidth:z,align:R}=s.layout?.styles?.[S]??{},D=n.find(U=>U.id===S),G=$6(R,D?.type);return(0,Oe.jsx)("td",{style:{width:I,maxWidth:O,minWidth:z},children:(0,Oe.jsx)(qZ,{fields:n,item:t,column:S,align:G})},S)}),!!o?.length&&(0,Oe.jsx)("td",{className:Z("dataviews-view-table__actions-column",{"dataviews-view-table__actions-column--sticky":!0,"dataviews-view-table__actions-column--stuck":v}),onClick:S=>S.stopPropagation(),children:(0,Oe.jsx)(Nc,{item:t,actions:o})})]})}function YZ({actions:e,data:t,fields:r,getItemId:o,getItemLevel:n,isLoading:i=!1,onChangeView:s,onChangeSelection:l,selection:u,setOpenedFilter:c,onClickItem:f,isItemClickable:m,renderItemLink:d,view:h,className:g,empty:y}){let{containerRef:v}=(0,Mo.useContext)(Ce),b=_n(i),w=(0,Mo.useRef)(new Map),x=(0,Mo.useRef)(void 0),[T,E]=(0,Mo.useState)(),[k,F]=(0,Mo.useState)(null);(0,Mo.useEffect)(()=>{x.current&&(x.current.focus(),x.current=void 0)});let P=(0,Mo.useId)(),V=Z6({scrollContainerRef:v,enabled:!!e?.length}),N=Lc(e,t);if(T){x.current=T,E(void 0);return}let A=J=>{let ie=w.current.get(J.id),$=ie?w.current.get(ie.fallback):void 0;E($?.node)},S=J=>{J.preventDefault(),J.stopPropagation();let ie={getBoundingClientRect:()=>({x:J.clientX,y:J.clientY,top:J.clientY,left:J.clientX,right:J.clientX,bottom:J.clientY,width:0,height:0,toJSON:()=>({})})};window.requestAnimationFrame(()=>{F(ie)})},I=!!t?.length,O=r.find(J=>J.id===h.titleField),z=r.find(J=>J.id===h.mediaField),R=r.find(J=>J.id===h.descriptionField),D=h.groupBy?.field?r.find(J=>J.id===h.groupBy?.field):null,G=D?Sn(t,D):null,{showTitle:U=!0,showMedia:ce=!0,showDescription:ye=!0}=h,Te=O&&U||z&&ce||R&&ye,Ie=h.fields??[],He=(J,ie)=>$=>{$?w.current.set(J,{node:$,fallback:Ie[ie>0?ie-1:1]}):w.current.delete(J)},pe=h.infiniteScrollEnabled&&!G,Se=(0,eu.isRTL)();return I?(0,Oe.jsxs)(Oe.Fragment,{children:[(0,Oe.jsxs)("table",{className:Z("dataviews-view-table",g,{[`has-${h.layout?.density}-density`]:h.layout?.density&&["compact","comfortable"].includes(h.layout.density),"has-bulk-actions":N,"is-refreshing":!pe&&b}),"aria-busy":i,"aria-describedby":P,role:pe?"feed":void 0,inert:!pe&&i?"true":void 0,children:[(0,Oe.jsxs)("colgroup",{children:[N&&(0,Oe.jsx)("col",{className:"dataviews-view-table__col-checkbox"}),Te&&(0,Oe.jsx)("col",{className:"dataviews-view-table__col-first-data"}),Ie.map((J,ie)=>(0,Oe.jsx)("col",{className:Z(`dataviews-view-table__col-${J}`,{"dataviews-view-table__col-first-data":!Te&&ie===0})},`col-${J}`)),!!e?.length&&(0,Oe.jsx)("col",{className:"dataviews-view-table__col-actions"})]}),k&&(0,Oe.jsx)(iy.Popover,{anchor:k,onClose:()=>F(null),placement:"bottom-start",children:(0,Oe.jsx)(oy,{showLabel:!1})}),(0,Oe.jsx)("thead",{onContextMenu:S,children:(0,Oe.jsxs)("tr",{className:"dataviews-view-table__row",children:[N&&(0,Oe.jsx)("th",{className:"dataviews-view-table__checkbox-column",scope:"col",onContextMenu:S,children:(0,Oe.jsx)(vm,{selection:u,onChangeSelection:l,data:t,actions:e,getItemId:o})}),Te&&(0,Oe.jsx)("th",{scope:"col",children:O&&(0,Oe.jsx)(Mc,{ref:He(O.id,0),fieldId:O.id,view:h,fields:r,onChangeView:s,onHide:A,setOpenedFilter:c,canMove:!1,canInsertLeft:Se?h.layout?.enableMoving??!0:!1,canInsertRight:Se?!1:h.layout?.enableMoving??!0})}),Ie.map((J,ie)=>{let{width:$,maxWidth:Fe,minWidth:Yt,align:$r}=h.layout?.styles?.[J]??{},jr=r.find(te=>te.id===J),ee=$6($r,jr?.type),Y=h.layout?.enableMoving??!0;return(0,Oe.jsx)("th",{style:{width:$,maxWidth:Fe,minWidth:Yt,textAlign:ee},"aria-sort":h.sort?.direction&&h.sort?.field===J?Zv[h.sort.direction]:void 0,scope:"col",children:(0,Oe.jsx)(Mc,{ref:He(J,ie),fieldId:J,view:h,fields:r,onChangeView:s,onHide:A,setOpenedFilter:c,canMove:Y,canInsertLeft:Y,canInsertRight:Y})},J)}),!!e?.length&&(0,Oe.jsx)("th",{className:Z("dataviews-view-table__actions-column",{"dataviews-view-table__actions-column--sticky":!0,"dataviews-view-table__actions-column--stuck":!V}),children:(0,Oe.jsx)("span",{className:"dataviews-view-table-header",children:(0,eu.__)("Actions")})})]})}),I&&D&&G?Array.from(G.entries()).map(([J,ie])=>(0,Oe.jsxs)("tbody",{children:[(0,Oe.jsx)("tr",{className:"dataviews-view-table__group-header-row",children:(0,Oe.jsx)("td",{colSpan:Ie.length+(Te?1:0)+(N?1:0)+(e?.length?1:0),className:"dataviews-view-table__group-header-cell",children:h.groupBy?.showLabel===!1?J:(0,eu.sprintf)((0,eu.__)("%1$s: %2$s"),D.label,J)})}),ie.map(($,Fe)=>(0,Oe.jsx)(J6,{item:$,level:h.showLevels&&typeof n=="function"?n($):void 0,hasBulkActions:N,actions:e,fields:r,id:o($)||Fe.toString(),view:h,titleField:O,mediaField:z,descriptionField:R,selection:u,getItemId:o,onChangeSelection:l,onClickItem:f,renderItemLink:d,isItemClickable:m,isActionsColumnSticky:!V},o($)))]},`group-${J}`)):(0,Oe.jsx)("tbody",{children:I&&t.map((J,ie)=>(0,Oe.jsx)(J6,{item:J,level:h.showLevels&&typeof n=="function"?n(J):void 0,hasBulkActions:N,actions:e,fields:r,id:o(J)||ie.toString(),view:h,titleField:O,mediaField:z,descriptionField:R,selection:u,getItemId:o,onChangeSelection:l,onClickItem:f,renderItemLink:d,isItemClickable:m,isActionsColumnSticky:!V,posinset:pe?ie+1:void 0},o(J)))})]}),pe&&i&&(0,Oe.jsx)("div",{className:"dataviews-loading",id:P,children:(0,Oe.jsx)("p",{className:"dataviews-loading-more",children:(0,Oe.jsx)(iy.Spinner,{})})})]}):(0,Oe.jsx)("div",{className:Z("dataviews-no-results",{"is-refreshing":b}),id:P,children:y})}var e3=YZ;var n3=a(M(),1),ly=a(j(),1);var tn=a(M(),1);var ym=a(j(),1),r3=a(Qe(),1),o3=a(Js(),1),ay=a(B(),1);var ZZ=a(M(),1),KZ=a(j(),1),sy=a(B(),1);var XZ=a(C(),1),QZ=[{value:120,breakpoint:1},{value:170,breakpoint:1},{value:230,breakpoint:1},{value:290,breakpoint:1112},{value:350,breakpoint:1636},{value:430,breakpoint:588}],JZ=QZ[2].value;function t3(){let e=(0,sy.useContext)(Ce),t=e.view;return(0,sy.useMemo)(()=>{let r=e.containerWidth,o=32,n=t.layout?.previewSize??JZ,i=Math.floor((r+o)/(n+o));return Math.max(1,i)},[e.containerWidth,t.layout?.previewSize])}var at=a(C(),1),{Badge:$Z}=Me(tn.privateApis);function eK(e,t){let r=[];for(let o=0,n=e.length;o<n;o+=t)r.push(e.slice(o,o+t));return r}var tK=(0,ay.forwardRef)(function e({view:t,selection:r,onChangeSelection:o,onClickItem:n,isItemClickable:i,renderItemLink:s,getItemId:l,item:u,actions:c,mediaField:f,titleField:m,descriptionField:d,regularFields:h,badgeFields:g,hasBulkActions:y,config:v,...b},w){let{showTitle:x=!0,showMedia:T=!0,showDescription:E=!0}=t,k=$v(c,u),F=l(u),P=(0,r3.useInstanceId)(e),V=r.includes(F),N=(0,at.jsx)("span",{className:"dataviews-view-grid__media-placeholder"}),A=T&&f?.render,S=A?(0,at.jsx)(f.render,{item:u,field:f,config:v}):N,I=x&&m?.render?(0,at.jsx)(m.render,{item:u,field:m}):null,O,z;return i(u)&&n&&(I?(O={"aria-labelledby":`dataviews-view-grid__title-field-${P}`},z={id:`dataviews-view-grid__title-field-${P}`}):O={"aria-label":(0,ym.__)("Navigate to item")}),(0,at.jsxs)(Q,{direction:"column",...b,ref:w,className:Z(b.className,"dataviews-view-grid__row__gridcell","dataviews-view-grid__card",{"is-selected":k&&V}),onClickCapture:R=>{if(b.onClickCapture?.(R),(0,o3.isAppleOS)()?R.metaKey:R.ctrlKey){if(R.stopPropagation(),R.preventDefault(),!k)return;o(r.includes(F)?r.filter(D=>F!==D):[...r,F])}},children:[(0,at.jsx)(za,{item:u,isItemClickable:i,onClickItem:n,renderItemLink:s,className:Z("dataviews-view-grid__media",{"dataviews-view-grid__media--placeholder":!A}),...O,children:S}),y&&(0,at.jsx)(Ma,{item:u,selection:r,onChangeSelection:o,getItemId:l,titleField:m,disabled:!k}),!!c?.length&&(0,at.jsx)("div",{className:"dataviews-view-grid__media-actions",children:(0,at.jsx)(Nc,{item:u,actions:c,isCompact:!0})}),x&&(0,at.jsx)("div",{className:"dataviews-view-grid__title",children:(0,at.jsx)(za,{item:u,isItemClickable:i,onClickItem:n,renderItemLink:s,className:"dataviews-view-grid__title-field dataviews-title-field",...z,title:m?.getValueFormatted({item:u,field:m})||void 0,children:I})}),(0,at.jsxs)(Q,{direction:"column",gap:"xs",children:[E&&d?.render&&(0,at.jsx)(d.render,{item:u,field:d}),!!g?.length&&(0,at.jsx)(Q,{direction:"row",className:"dataviews-view-grid__badge-fields",gap:"sm",wrap:"wrap",align:"top",justify:"flex-start",children:g.map(R=>(0,at.jsx)($Z,{className:"dataviews-view-grid__field-value",children:(0,at.jsx)(R.render,{item:u,field:R})},R.id))}),!!h?.length&&(0,at.jsx)(Q,{direction:"column",className:"dataviews-view-grid__fields",gap:"xs",children:h.map(R=>(0,at.jsx)(tn.Flex,{className:"dataviews-view-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,at.jsxs)(at.Fragment,{children:[(0,at.jsx)(tn.Tooltip,{text:R.label,children:(0,at.jsx)(tn.FlexItem,{className:"dataviews-view-grid__field-name",children:R.header})}),(0,at.jsx)(tn.FlexItem,{className:"dataviews-view-grid__field-value",style:{maxHeight:"none"},children:(0,at.jsx)(R.render,{item:u,field:R})})]})},R.id))})]})]})});function R_({data:e,isInfiniteScroll:t,className:r,inert:o,isLoading:n,view:i,fields:s,selection:l,onChangeSelection:u,onClickItem:c,isItemClickable:f,renderItemLink:m,getItemId:d,actions:h}){let{paginationInfo:g,resizeObserverRef:y}=(0,ay.useContext)(Ce),v=t3(),b=Lc(h,e),w=s.find(N=>N.id===i?.titleField),x=s.find(N=>N.id===i?.mediaField),T=s.find(N=>N.id===i?.descriptionField),E=i.fields??[],{regularFields:k,badgeFields:F}=E.reduce((N,A)=>{let S=s.find(O=>O.id===A);if(!S)return N;let I=i.layout?.badgeFields?.includes(A)?"badgeFields":"regularFields";return N[I].push(S),N},{regularFields:[],badgeFields:[]}),P="900px",V=Math.ceil(e.length/v);return(0,at.jsx)(tn.Composite,{role:t?"feed":"grid",className:Z("dataviews-view-grid",r),focusWrap:!0,"aria-busy":n,"aria-rowcount":t?void 0:V,ref:y,inert:o,children:eK(e,v).map((N,A)=>(0,at.jsx)(tn.Composite.Row,{render:(0,at.jsx)("div",{role:"row","aria-rowindex":A+1,"aria-label":(0,ym.sprintf)((0,ym.__)("Row %d"),A+1),className:"dataviews-view-grid__row",style:{gridTemplateColumns:`repeat( ${v}, minmax(0, 1fr) )`}}),children:N.map((S,I)=>{let O=A*v+I;return(0,at.jsx)(tn.Composite.Item,{render:z=>(0,at.jsx)(tK,{...z,role:t?"article":"gridcell","aria-setsize":t?g.totalItems:void 0,"aria-posinset":t?O+1:void 0,view:i,selection:l,onChangeSelection:u,onClickItem:c,isItemClickable:f,renderItemLink:m,getItemId:d,item:S,actions:h,mediaField:x,titleField:w,descriptionField:T,regularFields:k,badgeFields:F,hasBulkActions:b,config:{sizes:P}})},d(S))})},A))})}var rn=a(C(),1);function rK({actions:e,data:t,fields:r,getItemId:o,isLoading:n,onChangeSelection:i,onClickItem:s,isItemClickable:l,renderItemLink:u,selection:c,view:f,className:m,empty:d}){let h=_n(!!n),g=!!t?.length,y=f.groupBy?.field?r.find(x=>x.id===f.groupBy?.field):null,v=y?Sn(t,y):null,b=f.infiniteScrollEnabled&&!v;if(!g)return(0,rn.jsx)("div",{className:Z("dataviews-no-results",{"is-refreshing":h}),children:d});let w={className:Z(m,{"is-refreshing":!b&&h}),inert:!b&&n?"true":void 0,isLoading:n,view:f,fields:r,selection:c,onChangeSelection:i,onClickItem:s,isItemClickable:l,renderItemLink:u,getItemId:o,actions:e};return(0,rn.jsxs)(rn.Fragment,{children:[g&&y&&v&&(0,rn.jsx)(Q,{direction:"column",gap:"lg",children:Array.from(v.entries()).map(([x,T])=>(0,rn.jsxs)(Q,{direction:"column",gap:"sm",children:[(0,rn.jsx)("h3",{className:"dataviews-view-grid__group-header",children:f.groupBy?.showLabel===!1?x:(0,ly.sprintf)((0,ly.__)("%1$s: %2$s"),y.label,x)}),(0,rn.jsx)(R_,{...w,data:T,isInfiniteScroll:!1})]},x))}),!v&&(0,rn.jsx)(R_,{...w,data:t,isInfiniteScroll:!!b}),b&&n&&(0,rn.jsx)("p",{className:"dataviews-loading-more",children:(0,rn.jsx)(n3.Spinner,{})})]})}var i3=rK;var uy=a(Qe(),1),Cr=a(M(),1),fr=a(B(),1),bm=a(j(),1);var V_=a(re(),1);var xe=a(C(),1),{Menu:O_}=Me(Cr.privateApis);function I_(e){return`${e}-item-wrapper`}function oK(e,t){return`${e}-primary-action-${t}`}function F_(e){return`${e}-dropdown`}function nK({idPrefix:e,primaryAction:t,item:r}){let o=(0,V_.useRegistry)(),[n,i]=(0,fr.useState)(!1),s=oK(e,t.id),l=typeof t.label=="string"?t.label:t.label([r]);return"RenderModal"in t?(0,xe.jsx)("div",{role:"gridcell",children:(0,xe.jsx)(Cr.Composite.Item,{id:s,render:(0,xe.jsx)(Cr.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,text:l,size:"small",onClick:()=>i(!0)}),children:n&&(0,xe.jsx)($l,{action:t,items:[r],closeModal:()=>i(!1)})})},t.id):(0,xe.jsx)("div",{role:"gridcell",children:(0,xe.jsx)(Cr.Composite.Item,{id:s,render:(0,xe.jsx)(Cr.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,size:"small",onClick:()=>{t.callback([r],{registry:o})},children:l})})},t.id)}function s3({view:e,actions:t,idPrefix:r,isSelected:o,item:n,titleField:i,mediaField:s,descriptionField:l,onSelect:u,otherFields:c,onDropdownTriggerKeyDown:f,posinset:m}){let{showTitle:d=!0,showMedia:h=!0,showDescription:g=!0,infiniteScrollEnabled:y}=e,v=(0,fr.useRef)(null),b=`${r}-label`,w=`${r}-description`,x=(0,V_.useRegistry)(),[T,E]=(0,fr.useState)(!1),[k,F]=(0,fr.useState)(null),P=({type:R})=>{E(R==="mouseenter")},{paginationInfo:V}=(0,fr.useContext)(Ce);(0,fr.useEffect)(()=>{o&&v.current?.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})},[o]);let{primaryAction:N,eligibleActions:A}=(0,fr.useMemo)(()=>{let R=t.filter(G=>!G.isEligible||G.isEligible(n));return{primaryAction:R.filter(G=>G.isPrimary)[0],eligibleActions:R}},[t,n]),S=N&&t.length===1,I=h&&s?.render?(0,xe.jsx)("div",{className:"dataviews-view-list__media-wrapper",children:(0,xe.jsx)(s.render,{item:n,field:s,config:{sizes:"52px"}})}):null,O=d&&i?.render?(0,xe.jsx)(i.render,{item:n,field:i}):null,z=A?.length>0&&(0,xe.jsxs)(Q,{direction:"row",gap:"md",className:"dataviews-view-list__item-actions",children:[N&&(0,xe.jsx)(nK,{idPrefix:r,primaryAction:N,item:n}),!S&&(0,xe.jsxs)("div",{role:"gridcell",children:[(0,xe.jsxs)(O_,{placement:"bottom-end",children:[(0,xe.jsx)(O_.TriggerButton,{render:(0,xe.jsx)(Cr.Composite.Item,{id:F_(r),render:(0,xe.jsx)(Cr.Button,{size:"small",icon:Dn,label:(0,bm.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,onKeyDown:f})})}),(0,xe.jsx)(O_.Popover,{children:(0,xe.jsx)(T_,{actions:A,item:n,registry:x,setActiveModalAction:F})})]}),!!k&&(0,xe.jsx)($l,{action:k,items:[n],closeModal:()=>F(null)})]})]});return(0,xe.jsx)(Cr.Composite.Row,{ref:v,render:(0,xe.jsx)("div",{"aria-posinset":m,"aria-setsize":y?V.totalItems:void 0}),role:y?"article":"row",className:Z({"is-selected":o,"is-hovered":T}),onMouseEnter:P,onMouseLeave:P,children:(0,xe.jsxs)(Q,{direction:"row",className:"dataviews-view-list__item-wrapper",children:[(0,xe.jsx)("div",{role:"gridcell",children:(0,xe.jsx)(Cr.Composite.Item,{id:I_(r),"aria-pressed":o,"aria-labelledby":b,"aria-describedby":w,className:"dataviews-view-list__item",onClick:()=>u(n)})}),(0,xe.jsxs)(Q,{direction:"row",gap:"md",justify:"start",align:"flex-start",style:{flex:1,minWidth:0},children:[I,(0,xe.jsxs)(Q,{direction:"column",gap:"xs",className:"dataviews-view-list__field-wrapper",children:[(0,xe.jsxs)(Q,{direction:"row",align:"center",children:[(0,xe.jsx)("div",{className:"dataviews-title-field dataviews-view-list__title-field",id:b,children:O}),z]}),g&&l?.render&&(0,xe.jsx)("div",{className:"dataviews-view-list__field",children:(0,xe.jsx)(l.render,{item:n,field:l})}),(0,xe.jsx)("div",{className:"dataviews-view-list__fields",id:w,children:c.map(R=>(0,xe.jsxs)("div",{className:"dataviews-view-list__field",children:[(0,xe.jsx)(Cr.VisuallyHidden,{as:"span",className:"dataviews-view-list__field-label",children:R.label}),(0,xe.jsx)("span",{className:"dataviews-view-list__field-value",children:(0,xe.jsx)(R.render,{item:n,field:R})})]},R.id))})]})]})]})})}function iK(e){return!!e}function N_(e){let{actions:t,data:r,fields:o,getItemId:n,isLoading:i,onChangeSelection:s,selection:l,view:u,className:c,empty:f}=e,m=(0,uy.useInstanceId)(N_,"view-list"),d=_n(!!i),h=r?.findLast(R=>l.includes(n(R))),g=o.find(R=>R.id===u.titleField),y=o.find(R=>R.id===u.mediaField),v=o.find(R=>R.id===u.descriptionField),b=(u?.fields??[]).map(R=>o.find(D=>R===D.id)).filter(iK),w=R=>s([n(R)]),x=(0,fr.useCallback)(R=>`${m}-${n(R)}`,[m,n]),T=(0,fr.useCallback)((R,D)=>D.startsWith(x(R)),[x]),[E,k]=(0,fr.useState)(void 0);(0,fr.useEffect)(()=>{h&&k(I_(x(h)))},[h,x]);let F=r.findIndex(R=>T(R,E??"")),P=(0,uy.usePrevious)(F),V=F!==-1,N=(0,fr.useCallback)((R,D)=>{let G=Math.min(r.length-1,Math.max(0,R));if(!r[G])return;let U=x(r[G]),ce=D(U);k(ce),document.getElementById(ce)?.focus()},[r,x]);(0,fr.useEffect)(()=>{!V&&(P!==void 0&&P!==-1)&&N(P,I_)},[V,N,P]);let A=(0,fr.useCallback)(R=>{R.key==="ArrowDown"&&(R.preventDefault(),N(F+1,F_)),R.key==="ArrowUp"&&(R.preventDefault(),N(F-1,F_))},[N,F]),S=!!r?.length,I=u.groupBy?.field?o.find(R=>R.id===u.groupBy?.field):null,O=S&&I?Sn(r,I):null,z=u.infiniteScrollEnabled&&!O;return S?S&&I&&O?(0,xe.jsx)(Cr.Composite,{id:`${m}`,render:(0,xe.jsx)("div",{}),className:"dataviews-view-list__group",role:"grid",activeId:E,setActiveId:k,children:(0,xe.jsx)(Q,{direction:"column",gap:"lg",className:Z("dataviews-view-list",c),children:Array.from(O.entries()).map(([R,D])=>(0,xe.jsxs)(Q,{direction:"column",gap:"sm",children:[(0,xe.jsx)("h3",{className:"dataviews-view-list__group-header",children:u.groupBy?.showLabel===!1?R:(0,bm.sprintf)((0,bm.__)("%1$s: %2$s"),I.label,R)}),D.map(G=>{let U=x(G);return(0,xe.jsx)(s3,{view:u,idPrefix:U,actions:t,item:G,isSelected:G===h,onSelect:w,mediaField:y,titleField:g,descriptionField:v,otherFields:b,onDropdownTriggerKeyDown:A},U)})]},R))})}):(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)(Cr.Composite,{id:m,render:(0,xe.jsx)("div",{}),className:Z("dataviews-view-list",c,{[`has-${u.layout?.density}-density`]:u.layout?.density&&["compact","comfortable"].includes(u.layout.density),"is-refreshing":!z&&d}),role:u.infiniteScrollEnabled?"feed":"grid",activeId:E,setActiveId:k,inert:!z&&i?"true":void 0,children:r.map((R,D)=>{let G=x(R);return(0,xe.jsx)(s3,{view:u,idPrefix:G,actions:t,item:R,isSelected:R===h,onSelect:w,mediaField:y,titleField:g,descriptionField:v,otherFields:b,onDropdownTriggerKeyDown:A,posinset:u.infiniteScrollEnabled?D+1:void 0},G)})}),z&&i&&(0,xe.jsx)("p",{className:"dataviews-loading-more",children:(0,xe.jsx)(Cr.Spinner,{})})]}):(0,xe.jsx)("div",{className:Z("dataviews-no-results",{"is-refreshing":d}),children:f})}var p3=a(M(),1);var cy=a(j(),1),a3=a(B(),1);var jc=a(C(),1);function l3({groupName:e,groupData:t,groupField:r,showLabel:o=!0,children:n}){let i=o?(0,a3.createInterpolateElement)((0,cy.sprintf)((0,cy.__)("%s: <groupName />"),r.label).trim(),{groupName:(0,jc.jsx)(r.render,{item:t[0],field:r})}):(0,jc.jsx)(r.render,{item:t[0],field:r});return(0,jc.jsxs)(Q,{direction:"column",className:"dataviews-view-activity__group",children:[(0,jc.jsx)("h3",{className:"dataviews-view-activity__group-header",children:i}),n]},e)}var u3=a(M(),1),tu=a(B(),1),c3=a(re(),1),f3=a(Qe(),1);var tr=a(C(),1);function sK(e){let{view:t,actions:r,item:o,titleField:n,mediaField:i,descriptionField:s,otherFields:l,posinset:u,onClickItem:c,renderItemLink:f,isItemClickable:m}=e,{showTitle:d=!0,showMedia:h=!0,showDescription:g=!0,infiniteScrollEnabled:y}=t,v=(0,tu.useRef)(null),b=(0,c3.useRegistry)(),{paginationInfo:w}=(0,tu.useContext)(Ce),{primaryActions:x,eligibleActions:T}=(0,tu.useMemo)(()=>{let A=r.filter(I=>!I.isEligible||I.isEligible(o));return{primaryActions:A.filter(I=>I.isPrimary),eligibleActions:A}},[r,o]),E=(0,f3.useViewportMatch)("medium","<"),k=t.layout?.density??"balanced",F=h&&k!=="compact"&&i?.render?(0,tr.jsx)(i.render,{item:o,field:i,config:{sizes:k==="comfortable"?"32px":"24px"}}):null,P=(0,tr.jsx)("div",{className:"dataviews-view-activity__item-type-icon",children:F||(0,tr.jsx)("span",{className:"dataviews-view-activity__item-bullet","aria-hidden":"true"})}),V=d&&n?.render?(0,tr.jsx)(n.render,{item:o,field:n}):null,N=(0,tu.useMemo)(()=>k==="comfortable"?"md":"sm",[k]);return(0,tr.jsx)("div",{ref:v,role:y?"article":void 0,"aria-posinset":u,"aria-setsize":y?w.totalItems:void 0,className:Z("dataviews-view-activity__item",k==="compact"&&"is-compact",k==="balanced"&&"is-balanced",k==="comfortable"&&"is-comfortable"),children:(0,tr.jsxs)(Q,{direction:"row",gap:"lg",justify:"start",align:"flex-start",children:[(0,tr.jsx)(Q,{direction:"column",gap:"xs",align:"center",className:"dataviews-view-activity__item-type",children:P}),(0,tr.jsxs)(Q,{direction:"column",gap:N,align:"flex-start",className:"dataviews-view-activity__item-content",children:[V&&(0,tr.jsx)(za,{item:o,isItemClickable:m,onClickItem:c,renderItemLink:f,className:"dataviews-view-activity__item-title",children:V}),g&&s&&(0,tr.jsx)("div",{className:"dataviews-view-activity__item-description",children:(0,tr.jsx)(s.render,{item:o,field:s})}),(0,tr.jsx)("div",{className:"dataviews-view-activity__item-fields",children:l.map(A=>(0,tr.jsxs)("div",{className:"dataviews-view-activity__item-field",children:[(0,tr.jsx)(u3.VisuallyHidden,{as:"span",className:"dataviews-view-activity__item-field-label",children:A.label}),(0,tr.jsx)("span",{className:"dataviews-view-activity__item-field-value",children:(0,tr.jsx)(A.render,{item:o,field:A})})]},A.id))}),!!x?.length&&(0,tr.jsx)(E_,{item:o,actions:x,registry:b,buttonVariant:"secondary"})]}),(x.length<T.length||E&&T.length>0)&&(0,tr.jsx)("div",{className:"dataviews-view-activity__item-actions",children:(0,tr.jsx)(Nc,{item:o,actions:T,isCompact:!0})})]})})}var d3=sK;var m3=a(Je(),1);function aK(e){return!!e}function D_(e){let{data:t,fields:r,getItemId:o,view:n}=e,i=r.find(c=>c.id===n.titleField),s=r.find(c=>c.id===n.mediaField),l=r.find(c=>c.id===n.descriptionField),u=(n?.fields??[]).map(c=>r.find(f=>c===f.id)).filter(aK);return t.map((c,f)=>(0,m3.createElement)(d3,{...e,key:o(c),item:c,mediaField:s,titleField:i,descriptionField:l,otherFields:u,posinset:n.infiniteScrollEnabled?f+1:void 0}))}var on=a(C(),1);function h3(e){let{empty:t,data:r,fields:o,isLoading:n,view:i,className:s}=e,l=_n(!!n),u=!!r?.length,c=i.groupBy?.field?o.find(y=>y.id===i.groupBy?.field):null,f=u&&c?Sn(r,c):null,m=i.infiniteScrollEnabled&&!f;if(!u)return(0,on.jsx)("div",{className:Z("dataviews-no-results",{"is-refreshing":l}),children:t});let d=!m&&!!n,h=Z("dataviews-view-activity",s,{"is-refreshing":!m&&l}),g=f?Array.from(f.entries()):[];return u&&c&&f?(0,on.jsx)(Q,{direction:"column",gap:"sm",className:h,inert:d?"true":void 0,children:g.map(([y,v])=>(0,on.jsx)(l3,{groupName:y,groupData:v,groupField:c,showLabel:i.groupBy?.showLabel!==!1,children:(0,on.jsx)(D_,{...e,data:v})},y))}):(0,on.jsxs)(on.Fragment,{children:[(0,on.jsx)("div",{className:h,role:i.infiniteScrollEnabled?"feed":void 0,inert:d?"true":void 0,children:(0,on.jsx)(D_,{...e})}),m&&n&&(0,on.jsx)("p",{className:"dataviews-loading-more",children:(0,on.jsx)(p3.Spinner,{})})]})}var Bo=a(M(),1),xm=a(j(),1),S3=a(Qe(),1),_3=a(B(),1);var v3=a(M(),1),lK=a(re(),1),fy=a(B(),1);var uK=a(j(),1);var wm=a(M(),1),zc=a(B(),1),nn=a(j(),1);var _s=a(C(),1);function L_(){let{view:e,onChangeView:t,paginationInfo:{totalItems:r=0,totalPages:o}}=(0,zc.useContext)(Ce);if(!r||!o||e.infiniteScrollEnabled)return null;let n=e.page??1,i=Array.from(Array(o)).map((s,l)=>{let u=l+1;return{value:u.toString(),label:u.toString(),"aria-label":n===u?(0,nn.sprintf)((0,nn.__)("Page %1$d of %2$d"),n,o):u.toString()}});return!!r&&o!==1&&(0,_s.jsxs)(Q,{direction:"row",className:"dataviews-pagination",justify:"end",align:"center",gap:"xl",children:[(0,_s.jsx)(Q,{direction:"row",justify:"flex-start",align:"center",gap:"xs",className:"dataviews-pagination__page-select",children:(0,zc.createInterpolateElement)((0,nn.sprintf)((0,nn._x)("<div>Page</div>%1$s<div>of %2$d</div>","paging"),"<CurrentPage />",o),{div:(0,_s.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,_s.jsx)(wm.SelectControl,{"aria-label":(0,nn.__)("Current page"),value:n.toString(),options:i,onChange:s=>{t({...e,page:+s})},size:"small",variant:"minimal"})})}),(0,_s.jsxs)(Q,{direction:"row",gap:"xs",align:"center",children:[(0,_s.jsx)(wm.Button,{onClick:()=>t({...e,page:n-1}),disabled:n===1,accessibleWhenDisabled:!0,label:(0,nn.__)("Previous page"),icon:(0,nn.isRTL)()?bh:Ah,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,_s.jsx)(wm.Button,{onClick:()=>t({...e,page:n+1}),disabled:n>=o,accessibleWhenDisabled:!0,label:(0,nn.__)("Next page"),icon:(0,nn.isRTL)()?Ah:bh,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})}var g3=(0,zc.memo)(L_);var y3=a(C(),1);function dy(e){return(0,fy.useMemo)(()=>e?.every(t=>t.supportsBulk),[e])}var b3=a(B(),1);var w3=a(C(),1),M_=(0,b3.forwardRef)(({className:e,previewSize:t,...r},o)=>(0,w3.jsx)("div",{ref:o,className:Z("dataviews-view-grid-items",e),style:{gridTemplateColumns:t&&`repeat(auto-fill, minmax(${t}px, 1fr))`},...r}));var Be=a(C(),1),{Badge:cK}=Me(Bo.privateApis);function x3({view:e,multiselect:t,selection:r,onChangeSelection:o,getItemId:n,item:i,mediaField:s,titleField:l,descriptionField:u,regularFields:c,badgeFields:f,config:m,posinset:d,setsize:h}){let{showTitle:g=!0,showMedia:y=!0,showDescription:v=!0}=e,b=n(i),w=r.includes(b),x=s?.render?(0,Be.jsx)(s.render,{item:i,field:s,config:m}):null,T=g&&l?.render?(0,Be.jsx)(l.render,{item:i,field:l}):null;return(0,Be.jsxs)(Bo.Composite.Item,{"aria-label":l?l.getValue({item:i})||(0,xm.__)("(no title)"):void 0,render:({children:E,...k})=>(0,Be.jsx)(Q,{direction:"column",children:E,...k}),role:"option","aria-posinset":d,"aria-setsize":h,className:Z("dataviews-view-picker-grid__card",{"is-selected":w}),"aria-selected":w,onClick:()=>{if(w)o(r.filter(E=>b!==E));else{let E=t?[...r,b]:[b];o(E)}},children:[y&&x&&(0,Be.jsx)("div",{className:"dataviews-view-picker-grid__media",children:x}),y&&x&&(0,Be.jsx)(Ma,{item:i,selection:r,onChangeSelection:o,getItemId:n,titleField:l,disabled:!1,"aria-hidden":!0,tabIndex:-1}),g&&(0,Be.jsx)(Q,{direction:"row",justify:"space-between",className:"dataviews-view-picker-grid__title-actions",children:(0,Be.jsx)("div",{className:"dataviews-view-picker-grid__title-field dataviews-title-field",children:T})}),(0,Be.jsxs)(Q,{direction:"column",gap:"xs",children:[v&&u?.render&&(0,Be.jsx)(u.render,{item:i,field:u}),!!f?.length&&(0,Be.jsx)(Q,{direction:"row",className:"dataviews-view-picker-grid__badge-fields",gap:"sm",wrap:"wrap",align:"top",justify:"flex-start",children:f.map(E=>(0,Be.jsx)(cK,{className:"dataviews-view-picker-grid__field-value",children:(0,Be.jsx)(E.render,{item:i,field:E})},E.id))}),!!c?.length&&(0,Be.jsx)(Q,{direction:"column",className:"dataviews-view-picker-grid__fields",gap:"xs",children:c.map(E=>(0,Be.jsx)(Bo.Flex,{className:"dataviews-view-picker-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsx)(Bo.FlexItem,{className:"dataviews-view-picker-grid__field-name",children:E.header}),(0,Be.jsx)(Bo.FlexItem,{className:"dataviews-view-picker-grid__field-value",style:{maxHeight:"none"},children:(0,Be.jsx)(E.render,{item:i,field:E})})]})},E.id))})]})]},b)}function C3({groupName:e,groupField:t,showLabel:r=!0,children:o}){let n=(0,S3.useInstanceId)(C3,"dataviews-view-picker-grid-group__header");return(0,Be.jsxs)(Q,{direction:"column",gap:"sm",role:"group","aria-labelledby":n,children:[(0,Be.jsx)("h3",{className:"dataviews-view-picker-grid-group__header",id:n,children:r?(0,xm.sprintf)((0,xm.__)("%1$s: %2$s"),t.label,e):e}),o]},e)}function fK({actions:e,data:t,fields:r,getItemId:o,isLoading:n,onChangeSelection:i,selection:s,view:l,className:u,empty:c}){let{resizeObserverRef:f,paginationInfo:m,itemListLabel:d}=(0,_3.useContext)(Ce),h=r.find(I=>I.id===l?.titleField),g=r.find(I=>I.id===l?.mediaField),y=r.find(I=>I.id===l?.descriptionField),v=l.fields??[],{regularFields:b,badgeFields:w}=v.reduce((I,O)=>{let z=r.find(D=>D.id===O);if(!z)return I;let R=l.layout?.badgeFields?.includes(O)?"badgeFields":"regularFields";return I[R].push(z),I},{regularFields:[],badgeFields:[]}),x=!!t?.length,T=l.layout?.previewSize,E=dy(e),k="900px",F=l.groupBy?.field?r.find(I=>I.id===l.groupBy?.field):null,P=F?Sn(t,F):null,V=l.infiniteScrollEnabled&&!P,N=l?.page??1,A=l?.perPage??0,S=V?m?.totalItems:void 0;return(0,Be.jsxs)(Be.Fragment,{children:[x&&F&&P&&(0,Be.jsx)(Bo.Composite,{virtualFocus:!0,orientation:"horizontal",role:"listbox","aria-multiselectable":E,className:Z("dataviews-view-picker-grid",u),"aria-label":d,render:({children:I,...O})=>(0,Be.jsx)(Q,{direction:"column",gap:"lg",children:I,...O}),children:Array.from(P.entries()).map(([I,O])=>(0,Be.jsx)(C3,{groupName:I,groupField:F,showLabel:l.groupBy?.showLabel!==!1,children:(0,Be.jsx)(M_,{previewSize:T,style:{gridTemplateColumns:T&&`repeat(auto-fill, minmax(${T}px, 1fr))`},"aria-busy":n,ref:f,children:O.map(z=>{let R=(N-1)*A+t.indexOf(z)+1;return(0,Be.jsx)(x3,{view:l,multiselect:E,selection:s,onChangeSelection:i,getItemId:o,item:z,mediaField:g,titleField:h,descriptionField:y,regularFields:b,badgeFields:w,config:{sizes:k},posinset:R,setsize:S},o(z))})})},I))}),x&&!P&&(0,Be.jsx)(Bo.Composite,{render:(0,Be.jsx)(M_,{className:Z("dataviews-view-picker-grid",u),previewSize:T,"aria-busy":n,ref:f}),virtualFocus:!0,orientation:"horizontal",role:"listbox","aria-multiselectable":E,"aria-label":d,children:t.map((I,O)=>{let z=V?O+1:void 0;return V||(z=(N-1)*A+O+1),(0,Be.jsx)(x3,{view:l,multiselect:E,selection:s,onChangeSelection:i,getItemId:o,item:I,mediaField:g,titleField:h,descriptionField:y,regularFields:b,badgeFields:w,config:{sizes:k},posinset:z,setsize:S},o(I))})}),!x&&(0,Be.jsx)("div",{className:Z({"dataviews-loading":n,"dataviews-no-results":!n}),children:n?(0,Be.jsx)("p",{children:(0,Be.jsx)(Bo.Spinner,{})}):c}),x&&n&&(0,Be.jsx)("p",{className:"dataviews-loading-more",children:(0,Be.jsx)(Bo.Spinner,{})})]})}var T3=fK;var my=a(j(),1),ru=a(M(),1),Cn=a(B(),1);var Ue=a(C(),1);function dK({item:e,fields:t,column:r,align:o}){let n=t.find(s=>s.id===r);if(!n)return null;let i=Z("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__cell-align-end":o==="end","dataviews-view-table__cell-align-center":o==="center"});return(0,Ue.jsx)("div",{className:i,children:(0,Ue.jsx)(n.render,{item:e,field:n})})}function E3({item:e,fields:t,id:r,view:o,titleField:n,mediaField:i,descriptionField:s,selection:l,getItemId:u,onChangeSelection:c,multiselect:f,posinset:m}){let{paginationInfo:d}=(0,Cn.useContext)(Ce),h=l.includes(r),[g,y]=(0,Cn.useState)(!1),{showTitle:v=!0,showMedia:b=!0,showDescription:w=!0,infiniteScrollEnabled:x}=o,T=()=>{y(!0)},E=()=>{y(!1)},k=o.fields??[],F=n&&v||i&&b||s&&w;return(0,Ue.jsxs)(ru.Composite.Item,{render:({children:P,...V})=>(0,Ue.jsx)("tr",{className:Z("dataviews-view-table__row",{"is-selected":h,"is-hovered":g}),onMouseEnter:T,onMouseLeave:E,children:P,...V}),"aria-selected":h,"aria-setsize":d.totalItems||void 0,"aria-posinset":m,role:x?"article":"option",onClick:()=>{if(h)c(l.filter(P=>r!==P));else{let P=f?[...l,r]:[r];c(P)}},children:[(0,Ue.jsx)("td",{className:"dataviews-view-table__checkbox-column",role:"presentation",children:(0,Ue.jsx)("div",{className:"dataviews-view-table__cell-content-wrapper",children:(0,Ue.jsx)(Ma,{item:e,selection:l,onChangeSelection:c,getItemId:u,titleField:n,disabled:!1,"aria-hidden":!0,tabIndex:-1})})}),F&&(0,Ue.jsx)("td",{role:"presentation",children:(0,Ue.jsx)(ry,{item:e,titleField:v?n:void 0,mediaField:b?i:void 0,descriptionField:w?s:void 0,isItemClickable:()=>!1})}),k.map(P=>{let{width:V,maxWidth:N,minWidth:A,align:S}=o.layout?.styles?.[P]??{};return(0,Ue.jsx)("td",{style:{width:V,maxWidth:N,minWidth:A},role:"presentation",children:(0,Ue.jsx)(dK,{fields:t,item:e,column:P,align:S})},P)})]},r)}function mK({actions:e,data:t,fields:r,getItemId:o,isLoading:n=!1,onChangeView:i,onChangeSelection:s,selection:l,setOpenedFilter:u,view:c,className:f,empty:m}){let d=(0,Cn.useRef)(new Map),h=(0,Cn.useRef)(void 0),[g,y]=(0,Cn.useState)(),v=dy(e)??!1;(0,Cn.useEffect)(()=>{h.current&&(h.current.focus(),h.current=void 0)});let b=(0,Cn.useId)();if(g){h.current=g,y(void 0);return}let w=R=>{let D=d.current.get(R.id),G=D?d.current.get(D.fallback):void 0;y(G?.node)},x=!!t?.length,T=r.find(R=>R.id===c.titleField),E=r.find(R=>R.id===c.mediaField),k=r.find(R=>R.id===c.descriptionField),F=c.groupBy?.field?r.find(R=>R.id===c.groupBy?.field):null,P=F?Sn(t,F):null,{showTitle:V=!0,showMedia:N=!0,showDescription:A=!0}=c,S=T&&V||E&&N||k&&A,I=c.fields??[],O=(R,D)=>G=>{G?d.current.set(R,{node:G,fallback:I[D>0?D-1:1]}):d.current.delete(R)},z=c.infiniteScrollEnabled&&!P;return(0,Ue.jsxs)(Ue.Fragment,{children:[(0,Ue.jsxs)("table",{className:Z("dataviews-view-table","dataviews-view-picker-table",f,{[`has-${c.layout?.density}-density`]:c.layout?.density&&["compact","comfortable"].includes(c.layout.density)}),"aria-busy":n,"aria-describedby":b,role:z?"feed":"listbox",children:[(0,Ue.jsx)("thead",{role:"presentation",children:(0,Ue.jsxs)("tr",{className:"dataviews-view-table__row",role:"presentation",children:[(0,Ue.jsx)("th",{className:"dataviews-view-table__checkbox-column",children:v&&(0,Ue.jsx)(vm,{selection:l,onChangeSelection:s,data:t,actions:e,getItemId:o})}),S&&(0,Ue.jsx)("th",{children:T&&(0,Ue.jsx)(Mc,{ref:O(T.id,0),fieldId:T.id,view:c,fields:r,onChangeView:i,onHide:w,setOpenedFilter:u,canMove:!1})}),I.map((R,D)=>{let{width:G,maxWidth:U,minWidth:ce,align:ye}=c.layout?.styles?.[R]??{};return(0,Ue.jsx)("th",{style:{width:G,maxWidth:U,minWidth:ce,textAlign:ye},"aria-sort":c.sort?.direction&&c.sort?.field===R?Zv[c.sort.direction]:void 0,scope:"col",children:(0,Ue.jsx)(Mc,{ref:O(R,D),fieldId:R,view:c,fields:r,onChangeView:i,onHide:w,setOpenedFilter:u,canMove:c.layout?.enableMoving??!0})},R)})]})}),x&&F&&P?Array.from(P.entries()).map(([R,D])=>(0,Ue.jsxs)(ru.Composite,{virtualFocus:!0,orientation:"vertical",render:(0,Ue.jsx)("tbody",{role:"group"}),children:[(0,Ue.jsx)("tr",{className:"dataviews-view-table__group-header-row",role:"presentation",children:(0,Ue.jsx)("td",{colSpan:I.length+(S?1:0)+1,className:"dataviews-view-table__group-header-cell",role:"presentation",children:c.groupBy?.showLabel===!1?R:(0,my.sprintf)((0,my.__)("%1$s: %2$s"),F.label,R)})}),D.map((G,U)=>(0,Ue.jsx)(E3,{item:G,fields:r,id:o(G)||U.toString(),view:c,titleField:T,mediaField:E,descriptionField:k,selection:l,getItemId:o,onChangeSelection:s,multiselect:v},o(G)))]},`group-${R}`)):(0,Ue.jsx)(ru.Composite,{render:(0,Ue.jsx)("tbody",{role:"presentation"}),virtualFocus:!0,orientation:"vertical",children:x&&t.map((R,D)=>(0,Ue.jsx)(E3,{item:R,fields:r,id:o(R)||D.toString(),view:c,titleField:T,mediaField:E,descriptionField:k,selection:l,getItemId:o,onChangeSelection:s,multiselect:v,posinset:D+1},o(R)))})]}),(0,Ue.jsxs)("div",{className:Z({"dataviews-loading":n,"dataviews-no-results":!x&&!n}),id:b,children:[!x&&(n?(0,Ue.jsx)("p",{children:(0,Ue.jsx)(ru.Spinner,{})}):m),x&&n&&(0,Ue.jsx)("p",{className:"dataviews-loading-more",children:(0,Ue.jsx)(ru.Spinner,{})})]})]})}var P3=mK;var A3=a(M(),1),k3=a(j(),1),R3=a(B(),1);var O3=a(C(),1),pK=[{value:120,breakpoint:1},{value:170,breakpoint:1},{value:230,breakpoint:1},{value:290,breakpoint:1112},{value:350,breakpoint:1636},{value:430,breakpoint:588}];function B_(){let e=(0,R3.useContext)(Ce),t=e.view,r=pK.filter(s=>e.containerWidth>=s.breakpoint),o=t.layout?.previewSize??230,n=r.map((s,l)=>({...s,index:l})).filter(s=>s.value<=o).sort((s,l)=>l.value-s.value)[0]?.index??0,i=r.map((s,l)=>({value:l}));return(0,O3.jsx)(A3.RangeControl,{__next40pxDefaultSize:!0,showTooltip:!1,label:(0,k3.__)("Preview size"),value:n,min:0,max:r.length-1,withInputField:!1,onChange:(s=0)=>{e.onChangeView({...t,layout:{...t.layout,previewSize:r[s].value}})},step:1,marks:i})}var Gc=a(M(),1),Hc=a(j(),1),I3=a(B(),1);var Uc=a(C(),1);function Sm(){let e=(0,I3.useContext)(Ce),t=e.view;return(0,Uc.jsxs)(Gc.__experimentalToggleGroupControl,{size:"__unstable-large",label:(0,Hc.__)("Density"),value:t.layout?.density||"balanced",onChange:r=>{e.onChangeView({...t,layout:{...t.layout,density:r}})},isBlock:!0,children:[(0,Uc.jsx)(Gc.__experimentalToggleGroupControlOption,{value:"comfortable",label:(0,Hc._x)("Comfortable","Density option for DataView layout")},"comfortable"),(0,Uc.jsx)(Gc.__experimentalToggleGroupControlOption,{value:"balanced",label:(0,Hc._x)("Balanced","Density option for DataView layout")},"balanced"),(0,Uc.jsx)(Gc.__experimentalToggleGroupControlOption,{value:"compact",label:(0,Hc._x)("Compact","Density option for DataView layout")},"compact")]})}var Xn=[{type:Ic,label:(0,Cs.__)("Table"),component:e3,icon:jp,viewConfigOptions:Sm},{type:Xv,label:(0,Cs.__)("Grid"),component:i3,icon:Qs,viewConfigOptions:B_},{type:A6,label:(0,Cs.__)("List"),component:N_,icon:(0,Cs.isRTL)()?B1:z1,viewConfigOptions:Sm},{type:k6,label:(0,Cs.__)("Activity"),component:h3,icon:sd,viewConfigOptions:Sm},{type:R6,label:(0,Cs.__)("Grid"),component:T3,icon:Qs,viewConfigOptions:B_,isPicker:!0},{type:O6,label:(0,Cs.__)("Table"),component:P3,icon:jp,viewConfigOptions:Sm,isPicker:!0}];var sf=a(B(),1);var Qn=a(M(),1),Is=a(j(),1),qy=a(B(),1);function _m(...e){}function j_(e,t){if(hK(e)){let r=gK(t)?t():t;return e(r)}return e}function hK(e){return typeof e=="function"}function gK(e){return typeof e=="function"}function jo(e,t){return typeof Object.hasOwn=="function"?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t)}function Ha(...e){return(...t)=>{for(let r of e)typeof r=="function"&&r(...t)}}function Cm(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function z_(e,t){let r={...e};for(let o of t)jo(r,o)&&delete r[o];return r}function G_(e,t){let r={};for(let o of t)jo(e,o)&&(r[o]=e[o]);return r}function Tm(e){return e}function Ir(e,t){if(!e)throw typeof t!="string"?new Error("Invariant failed"):new Error(t)}function H_(e){return Object.keys(e)}function U_(e,...t){let r=typeof e=="function"?e(...t):e;return r==null?!1:!r}function ou(e){return e.disabled||e["aria-disabled"]===!0||e["aria-disabled"]==="true"}function Fr(e){let t={};for(let r in e)e[r]!==void 0&&(t[r]=e[r]);return t}function We(...e){for(let t of e)if(t!==void 0)return t}var F3=a(Je(),1);function V3(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function vK(e){return!e||!(0,F3.isValidElement)(e)?!1:"ref"in e.props||"ref"in e}function N3(e){return vK(e)?{...e.props}.ref||e.ref:null}function D3(e,t){let r={...e};for(let o in t){if(!jo(t,o))continue;if(o==="className"){let i="className";r[i]=e[i]?`${e[i]} ${t[i]}`:t[i];continue}if(o==="style"){let i="style";r[i]=e[i]?{...e[i],...t[i]}:t[i];continue}let n=t[o];if(typeof n=="function"&&o.startsWith("on")){let i=e[o];if(typeof i=="function"){r[o]=(...s)=>{n(...s),i(...s)};continue}}r[o]=n}return r}var Ua=yK();function yK(){var e;return typeof window<"u"&&!!((e=window.document)!=null&&e.createElement)}function Ts(e){return e?"self"in e?e.document:e.ownerDocument||document:document}function nu(e,t=!1){var r;let{activeElement:o}=Ts(e);if(!o?.nodeName)return null;if(W_(o)&&((r=o.contentDocument)!=null&&r.body))return nu(o.contentDocument.body,t);if(t){let n=o.getAttribute("aria-activedescendant");if(n){let i=Ts(o).getElementById(n);if(i)return i}}return o}function Ri(e,t){return e===t||e.contains(t)}function W_(e){return e.tagName==="IFRAME"}function Es(e){let t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?bK.indexOf(e.type)!==-1:!1}var bK=["button","color","file","image","reset","submit"];function q_(e){if(typeof e.checkVisibility=="function")return e.checkVisibility();let t=e;return t.offsetWidth>0||t.offsetHeight>0||e.getClientRects().length>0}function uo(e){try{let t=e instanceof HTMLInputElement&&e.selectionStart!==null,r=e.tagName==="TEXTAREA";return t||r||!1}catch{return!1}}function Em(e){return e.isContentEditable||uo(e)}function Y_(e){if(uo(e))return e.value;if(e.isContentEditable){let t=Ts(e).createRange();return t.selectNodeContents(e),t.toString()}return""}function Wc(e){let t=0,r=0;if(uo(e))t=e.selectionStart||0,r=e.selectionEnd||0;else if(e.isContentEditable){let o=Ts(e).getSelection();if(o?.rangeCount&&o.anchorNode&&Ri(e,o.anchorNode)&&o.focusNode&&Ri(e,o.focusNode)){let n=o.getRangeAt(0),i=n.cloneRange();i.selectNodeContents(e),i.setEnd(n.startContainer,n.startOffset),t=i.toString().length,i.setEnd(n.endContainer,n.endOffset),r=i.toString().length}}return{start:t,end:r}}function Z_(e,t){let r=["dialog","menu","listbox","tree","grid"],o=e?.getAttribute("role");return o&&r.indexOf(o)!==-1?o:t}function qc(e){if(!e)return null;let t=r=>r==="auto"||r==="scroll";if(e.clientHeight&&e.scrollHeight>e.clientHeight){let{overflowY:r}=getComputedStyle(e);if(t(r))return e}else if(e.clientWidth&&e.scrollWidth>e.clientWidth){let{overflowX:r}=getComputedStyle(e);if(t(r))return e}return qc(e.parentElement)||document.scrollingElement||document.body}function Pm(e,...t){/text|search|password|tel|url/i.test(e.type)&&e.setSelectionRange(...t)}function K_(e,t){let r=e.map((n,i)=>[i,n]),o=!1;return r.sort(([n,i],[s,l])=>{let u=t(i),c=t(l);return u===c||!u||!c?0:wK(u,c)?(n>s&&(o=!0),-1):(n<s&&(o=!0),1)}),o?r.map(([n,i])=>i):e}function wK(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function X_(){return Ua&&!!navigator.maxTouchPoints}function py(){return Ua?/mac|iphone|ipad|ipod/i.test(navigator.platform):!1}function iu(){return Ua&&py()&&/apple/i.test(navigator.vendor)}function Q_(){return Ua&&/firefox\//i.test(navigator.userAgent)}function hy(e){return!!(e.currentTarget&&!Ri(e.currentTarget,e.target))}function Yr(e){return e.target===e.currentTarget}function L3(e){let t=e.currentTarget;if(!t)return!1;let r=py();if(r&&!e.metaKey||!r&&!e.ctrlKey)return!1;let o=t.tagName.toLowerCase();return o==="a"||o==="button"&&t.type==="submit"||o==="input"&&t.type==="submit"}function M3(e){let t=e.currentTarget;if(!t)return!1;let r=t.tagName.toLowerCase();return e.altKey?r==="a"||r==="button"&&t.type==="submit"||r==="input"&&t.type==="submit":!1}function su(e,t){let r=new FocusEvent("blur",t),o=e.dispatchEvent(r),n={...t,bubbles:!0};return e.dispatchEvent(new FocusEvent("focusout",n)),o}function B3(e,t,r){let o=new KeyboardEvent(t,r);return e.dispatchEvent(o)}function J_(e,t){let r=new MouseEvent("click",t);return e.dispatchEvent(r)}function gy(e,t){let r=t||e.currentTarget,o=e.relatedTarget;return!o||!Ri(r,o)}function Wa(e,t,r,o){let i=(l=>{if(o){let c=setTimeout(l,o);return()=>clearTimeout(c)}let u=requestAnimationFrame(l);return()=>cancelAnimationFrame(u)})(()=>{e.removeEventListener(t,s,!0),r()}),s=()=>{i(),r()};return e.addEventListener(t,s,{once:!0,capture:!0}),i}function Oi(e,t,r,o=window){let n=[];try{o.document.addEventListener(e,t,r);for(let s of Array.from(o.frames))n.push(Oi(e,t,r,s))}catch{}return()=>{try{o.document.removeEventListener(e,t,r)}catch{}for(let s of n)s()}}var xK=a(Je(),1),wt=a(Je(),1),$_={...xK},j3=$_.useId,U2e=$_.useDeferredValue,z3=$_.useInsertionEffect,qt=Ua?wt.useLayoutEffect:wt.useEffect;function SK(e){let[t]=(0,wt.useState)(e);return t}function W3(e){let t=(0,wt.useRef)(e);return qt(()=>{t.current=e}),t}function qe(e){let t=(0,wt.useRef)(()=>{throw new Error("Cannot call an event handler while rendering.")});return z3?z3(()=>{t.current=e}):t.current=e,(0,wt.useCallback)((...r)=>{var o;return(o=t.current)==null?void 0:o.call(t,...r)},[])}function q3(e){let[t,r]=(0,wt.useState)(null);return qt(()=>{if(t==null||!e)return;let o=null;return e(n=>(o=n,t)),()=>{e(o)}},[t,e]),[t,r]}function Xt(...e){return(0,wt.useMemo)(()=>{if(e.some(Boolean))return t=>{for(let r of e)V3(r,t)}},e)}function Tn(e){if(j3){let o=j3();return e||o}let[t,r]=(0,wt.useState)(e);return qt(()=>{if(e||t)return;let o=Math.random().toString(36).slice(2,8);r(`id-${o}`)},[e,t]),e||t}function Y3(e,t){let r=i=>{if(typeof i=="string")return i},[o,n]=(0,wt.useState)(()=>r(t));return qt(()=>{let i=e&&"current"in e?e.current:e;n(i?.tagName.toLowerCase()||r(t))},[e,t]),o}function Z3(e,t,r){let o=SK(r),[n,i]=(0,wt.useState)(o);return(0,wt.useEffect)(()=>{let s=e&&"current"in e?e.current:e;if(!s)return;let l=()=>{let c=s.getAttribute(t);i(c??o)},u=new MutationObserver(l);return u.observe(s,{attributeFilter:[t]}),l(),()=>u.disconnect()},[e,t,o]),n}function Ii(e,t){let r=(0,wt.useRef)(!1);(0,wt.useEffect)(()=>{if(r.current)return e();r.current=!0},t),(0,wt.useEffect)(()=>()=>{r.current=!1},[])}function K3(e,t){let r=(0,wt.useRef)(!1);qt(()=>{if(r.current)return e();r.current=!0},t),qt(()=>()=>{r.current=!1},[])}function X3(){return(0,wt.useReducer)(()=>[],[])}function rr(e){return qe(typeof e=="function"?e:()=>e)}function Fi(e,t,r=[]){let o=(0,wt.useCallback)(n=>(e.wrapElement&&(n=e.wrapElement(n)),t(n)),[...r,e.wrapElement]);return{...e,wrapElement:o}}function Q3(e,t,r){let o=e.onLoadedMetadataCapture,n=(0,wt.useMemo)(()=>Object.assign(()=>{},{...o,[t]:r}),[o,t,r]);return[o?.[t],{onLoadedMetadataCapture:n}]}var G3=!1;function J3(){return(0,wt.useEffect)(()=>{G3||(Oi("mousemove",CK,!0),Oi("mousedown",vy,!0),Oi("mouseup",vy,!0),Oi("keydown",vy,!0),Oi("scroll",vy,!0),G3=!0)},[]),qe(()=>e2)}var e2=!1,H3=0,U3=0;function _K(e){let t=e.movementX||e.screenX-H3,r=e.movementY||e.screenY-U3;return H3=e.screenX,U3=e.screenY,t||r||!1}function CK(e){_K(e)&&(e2=!0)}function vy(){e2=!1}var co=a(Je(),1),au=a(C(),1);function xt(e){let t=co.forwardRef((r,o)=>e({...r,ref:o}));return t.displayName=e.displayName||e.name,t}function qa(e,t){return co.memo(e,t)}function At(e,t){let{wrapElement:r,render:o,...n}=t,i=Xt(t.ref,N3(o)),s;if(co.isValidElement(o)){let l={...o.props,ref:i};s=co.cloneElement(o,D3(n,l))}else o?s=o(n):s=(0,au.jsx)(e,{...n});return r?r(s):s}function kt(e){let t=(r={})=>e(r);return t.displayName=e.name,t}function zo(e=[],t=[]){let r=co.createContext(void 0),o=co.createContext(void 0),n=()=>co.useContext(r),i=(c=!1)=>{let f=co.useContext(o),m=n();return c?f:f||m},s=()=>{let c=co.useContext(o),f=n();if(!(c&&c===f))return f},l=c=>e.reduceRight((f,m)=>(0,au.jsx)(m,{...c,children:f}),(0,au.jsx)(r.Provider,{...c}));return{context:r,scopedContext:o,useContext:n,useScopedContext:i,useProviderContext:s,ContextProvider:l,ScopedContextProvider:c=>(0,au.jsx)(l,{...c,children:t.reduceRight((f,m)=>(0,au.jsx)(m,{...c,children:f}),(0,au.jsx)(o.Provider,{...c}))})}}var Am=zo(),$3=Am.useContext,X2e=Am.useScopedContext,Q2e=Am.useProviderContext,e4=Am.ContextProvider,t4=Am.ScopedContextProvider;var t2=a(Je(),1),km=zo([e4],[t4]),yy=km.useContext,tCe=km.useScopedContext,r4=km.useProviderContext,Yc=km.ContextProvider,by=km.ScopedContextProvider,o4=(0,t2.createContext)(void 0),n4=(0,t2.createContext)(void 0);function i4(e,t){return e.find(r=>t?!r.disabled&&r.id!==t:!r.disabled)}function Vi(e,t){return t&&e.item(t)||null}function s4(e){let t=[];for(let r of e){let o=t.find(n=>{var i;return((i=n[0])==null?void 0:i.rowId)===r.rowId});o?o.push(r):t.push([r])}return t}function a4(e,t=!1){if(uo(e))e.setSelectionRange(t?e.value.length:0,e.value.length);else if(e.isContentEditable){let r=Ts(e).getSelection();r?.selectAllChildren(e),t&&r?.collapseToEnd()}}var r2=Symbol("FOCUS_SILENTLY");function l4(e){e[r2]=!0,e.focus({preventScroll:!0})}function u4(e){let t=e[r2];return delete e[r2],t}function lu(e,t,r){if(!t||t===r)return!1;let o=e.item(t.id);return!(!o||r&&o.element===r)}var wy=a(Je(),1),TK="div",o2=kt(function({store:t,shouldRegisterItem:r=!0,getItem:o=Tm,element:n,...i}){let s=$3();t=t||s;let l=Tn(i.id),u=(0,wy.useRef)(n);return(0,wy.useEffect)(()=>{let c=u.current;if(!l||!c||!r)return;let f=o({id:l,element:c});return t?.renderItem(f)},[l,r,o,t]),i={...i,ref:Xt(u,i.ref)},Fr(i)}),uCe=xt(function(t){let r=o2(t);return At(TK,r)});var c4=a(Je(),1),f4=(0,c4.createContext)(!0);var d4="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function Rm(e){return!(!e.matches(d4)||!q_(e)||e.closest("[inert]"))}function m4(e){for(;e&&!Rm(e);)e=e.closest(d4);return e||null}function En(e){let t=nu(e);if(!t)return!1;if(t===e)return!0;let r=t.getAttribute("aria-activedescendant");return r?r===e.id:!1}function n2(e){let t=nu(e);if(!t)return!1;if(Ri(e,t))return!0;let r=t.getAttribute("aria-activedescendant");return!r||!("id"in e)?!1:r===e.id?!0:!!e.querySelector(`#${CSS.escape(r)}`)}function p4(e){!n2(e)&&Rm(e)&&e.focus()}function h4(e,t){"scrollIntoView"in e?(e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest",...t})):e.focus()}var sn=a(Je(),1),EK="div",g4=iu(),PK=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"],AK=Symbol("safariFocusAncestor");function v4(e,t){e&&(e[AK]=t)}function kK(e){let{tagName:t,readOnly:r,type:o}=e;return t==="TEXTAREA"&&!r||t==="SELECT"&&!r?!0:t==="INPUT"&&!r?PK.includes(o):!!(e.isContentEditable||e.getAttribute("role")==="combobox"&&e.dataset.name)}function RK(e){return"labels"in e?e.labels:null}function y4(e){return e.tagName.toLowerCase()==="input"&&e.type?e.type==="radio"||e.type==="checkbox":!1}function OK(e){return e?e==="button"||e==="summary"||e==="input"||e==="select"||e==="textarea"||e==="a":!0}function IK(e){return e?e==="button"||e==="input"||e==="select"||e==="textarea":!0}function FK(e,t,r,o,n){return e?t?r&&!o?-1:void 0:r?n:n||0:n}function i2(e,t){return qe(r=>{e?.(r),!r.defaultPrevented&&t&&(r.stopPropagation(),r.preventDefault())})}var b4=!1,s2=!0;function VK(e){let t=e.target;t&&"hasAttribute"in t&&(t.hasAttribute("data-focus-visible")||(s2=!1))}function NK(e){e.metaKey||e.ctrlKey||e.altKey||(s2=!0)}var Om=kt(function({focusable:t=!0,accessibleWhenDisabled:r,autoFocus:o,onFocusVisible:n,...i}){let s=(0,sn.useRef)(null);(0,sn.useEffect)(()=>{t&&(b4||(Oi("mousedown",VK,!0),Oi("keydown",NK,!0),b4=!0))},[t]),g4&&(0,sn.useEffect)(()=>{if(!t)return;let O=s.current;if(!O||!y4(O))return;let z=RK(O);if(!z)return;let R=()=>queueMicrotask(()=>O.focus());for(let D of z)D.addEventListener("mouseup",R);return()=>{for(let D of z)D.removeEventListener("mouseup",R)}},[t]);let l=t&&ou(i),u=!!l&&!r,[c,f]=(0,sn.useState)(!1);(0,sn.useEffect)(()=>{t&&u&&c&&f(!1)},[t,u,c]),(0,sn.useEffect)(()=>{if(!t||!c)return;let O=s.current;if(!O||typeof IntersectionObserver>"u")return;let z=new IntersectionObserver(()=>{Rm(O)||f(!1)});return z.observe(O),()=>z.disconnect()},[t,c]);let m=i2(i.onKeyPressCapture,l),d=i2(i.onMouseDownCapture,l),h=i2(i.onClickCapture,l),g=i.onMouseDown,y=qe(O=>{if(g?.(O),O.defaultPrevented||!t)return;let z=O.currentTarget;if(!g4||hy(O)||!Es(z)&&!y4(z))return;let R=!1,D=()=>{R=!0},G={capture:!0,once:!0};z.addEventListener("focusin",D,G);let U=m4(z.parentElement);v4(U,!0),Wa(z,"mouseup",()=>{z.removeEventListener("focusin",D,!0),v4(U,!1),!R&&p4(z)})}),v=(O,z)=>{if(z&&(O.currentTarget=z),!t)return;let R=O.currentTarget;R&&En(R)&&(n?.(O),!O.defaultPrevented&&(R.dataset.focusVisible="true",f(!0)))},b=i.onKeyDownCapture,w=qe(O=>{if(b?.(O),O.defaultPrevented||!t||c||O.metaKey||O.altKey||O.ctrlKey||!Yr(O))return;let z=O.currentTarget;Wa(z,"focusout",()=>v(O,z))}),x=i.onFocusCapture,T=qe(O=>{if(x?.(O),O.defaultPrevented||!t)return;if(!Yr(O)){f(!1);return}let z=O.currentTarget,R=()=>v(O,z);s2||kK(O.target)?Wa(O.target,"focusout",R):f(!1)}),E=i.onBlur,k=qe(O=>{E?.(O),t&&gy(O)&&(O.currentTarget.removeAttribute("data-focus-visible"),f(!1))}),F=(0,sn.useContext)(f4),P=qe(O=>{t&&o&&O&&F&&queueMicrotask(()=>{En(O)||Rm(O)&&O.focus()})}),V=Y3(s),N=t&&OK(V),A=t&&IK(V),S=i.style,I=(0,sn.useMemo)(()=>u?{pointerEvents:"none",...S}:S,[u,S]);return i={"data-focus-visible":t&&c||void 0,"data-autofocus":o||void 0,"aria-disabled":l||void 0,...i,ref:Xt(s,P,i.ref),style:I,tabIndex:FK(t,u,N,A,i.tabIndex),disabled:A&&u?!0:void 0,contentEditable:l?void 0:i.contentEditable,onKeyPressCapture:m,onClickCapture:h,onMouseDownCapture:d,onMouseDown:y,onKeyDownCapture:w,onFocusCapture:T,onBlur:k},Fr(i)}),TCe=xt(function(t){let r=Om(t);return At(EK,r)});var Ya=a(Je(),1),DK="button";function w4(e){if(!e.isTrusted)return!1;let t=e.currentTarget;return e.key==="Enter"?Es(t)||t.tagName==="SUMMARY"||t.tagName==="A":e.key===" "?Es(t)||t.tagName==="SUMMARY"||t.tagName==="INPUT"||t.tagName==="SELECT":!1}var LK=Symbol("command"),a2=kt(function({clickOnEnter:t=!0,clickOnSpace:r=!0,...o}){let n=(0,Ya.useRef)(null),[i,s]=(0,Ya.useState)(!1);(0,Ya.useEffect)(()=>{n.current&&s(Es(n.current))},[]);let[l,u]=(0,Ya.useState)(!1),c=(0,Ya.useRef)(!1),f=ou(o),[m,d]=Q3(o,LK,!0),h=o.onKeyDown,g=qe(b=>{h?.(b);let w=b.currentTarget;if(b.defaultPrevented||m||f||!Yr(b)||uo(w)||w.isContentEditable)return;let x=t&&b.key==="Enter",T=r&&b.key===" ",E=b.key==="Enter"&&!t,k=b.key===" "&&!r;if(E||k){b.preventDefault();return}if(x||T){let F=w4(b);if(x){if(!F){b.preventDefault();let{view:P,...V}=b,N=()=>J_(w,V);Q_()?Wa(w,"keyup",N):queueMicrotask(N)}}else T&&(c.current=!0,F||(b.preventDefault(),u(!0)))}}),y=o.onKeyUp,v=qe(b=>{if(y?.(b),b.defaultPrevented||m||f||b.metaKey)return;let w=r&&b.key===" ";if(c.current&&w&&(c.current=!1,!w4(b))){b.preventDefault(),u(!1);let x=b.currentTarget,{view:T,...E}=b;queueMicrotask(()=>J_(x,E))}});return o={"data-active":l||void 0,type:i?"button":void 0,...d,...o,ref:Xt(n,o.ref),onKeyDown:g,onKeyUp:v},o=Om(o),o}),VCe=xt(function(t){let r=a2(t);return At(DK,r)});function uu(e,t){let r=e.__unstableInternals;return Ir(r,"Invalid store"),r[t]}function fo(e,...t){let r=e,o=r,n=Symbol(),i=_m,s=new Set,l=new Set,u=new Set,c=new Set,f=new Set,m=new WeakMap,d=new WeakMap,h=P=>(u.add(P),()=>u.delete(P)),g=()=>{let P=s.size,V=Symbol();s.add(V);let N=()=>{s.delete(V),!s.size&&i()};if(P)return N;let A=H_(r).map(O=>Ha(...t.map(z=>{var R;let D=(R=z?.getState)==null?void 0:R.call(z);if(D&&jo(D,O))return Er(z,[O],G=>{k(O,G[O],!0)})}))),S=[];for(let O of u)S.push(O());let I=t.map(Zc);return i=Ha(...A,...S,...I),N},y=(P,V,N=c)=>(N.add(V),d.set(V,P),()=>{var A;(A=m.get(V))==null||A(),m.delete(V),d.delete(V),N.delete(V)}),v=(P,V)=>y(P,V),b=(P,V)=>(m.set(V,V(r,r)),y(P,V)),w=(P,V)=>(m.set(V,V(r,o)),y(P,V,f)),x=P=>fo(G_(r,P),F),T=P=>fo(z_(r,P),F),E=()=>r,k=(P,V,N=!1)=>{var A;if(!jo(r,P))return;let S=j_(V,r[P]);if(S===r[P])return;if(!N)for(let R of t)(A=R?.setState)==null||A.call(R,P,S);let I=r;r={...r,[P]:S};let O=Symbol();n=O,l.add(P);let z=(R,D,G)=>{var U;let ce=d.get(R),ye=Te=>G?G.has(Te):Te===P;(!ce||ce.some(ye))&&((U=m.get(R))==null||U(),m.set(R,R(r,D)))};for(let R of c)z(R,I);queueMicrotask(()=>{if(n!==O)return;let R=r;for(let D of f)z(D,o,l);o=R,l.clear()})},F={getState:E,setState:k,__unstableInternals:{setup:h,init:g,subscribe:v,sync:b,batch:w,pick:x,omit:T}};return F}function Tr(e,...t){if(e)return uu(e,"setup")(...t)}function Zc(e,...t){if(e)return uu(e,"init")(...t)}function Kc(e,...t){if(e)return uu(e,"subscribe")(...t)}function Er(e,...t){if(e)return uu(e,"sync")(...t)}function Za(e,...t){if(e)return uu(e,"batch")(...t)}function Im(e,...t){if(e)return uu(e,"omit")(...t)}function l2(e,...t){if(e)return uu(e,"pick")(...t)}function cu(...e){var t;let r={};for(let n of e){let i=(t=n?.getState)==null?void 0:t.call(n);i&&Object.assign(r,i)}let o=fo(r,...e);return Object.assign({},...e,o)}var Ni=a(Je(),1),x4=a(XT(),1),{useSyncExternalStore:S4}=x4.default,_4=()=>()=>{};function Xc(e,t=Tm){let r=Ni.useCallback(n=>e?Kc(e,null,n):_4(),[e]),o=()=>{let n=typeof t=="string"?t:null,i=typeof t=="function"?t:null,s=e?.getState();if(i)return i(s);if(s&&n&&jo(s,n))return s[n]};return S4(r,o,o)}function Sy(e,t){let r=Ni.useRef({}),o=Ni.useCallback(i=>e?Kc(e,null,i):_4(),[e]),n=()=>{let i=e?.getState(),s=!1,l=r.current;for(let u in t){let c=t[u];if(typeof c=="function"){let f=c(i);f!==l[u]&&(l[u]=f,s=!0)}if(typeof c=="string"){if(!i||!jo(i,c))continue;let f=i[c];f!==l[u]&&(l[u]=f,s=!0)}}return s&&(r.current={...l}),r.current};return S4(o,n,n)}function Qt(e,t,r,o){let n=jo(t,r)?t[r]:void 0,i=o?t[o]:void 0,s=W3({value:n,setValue:i});qt(()=>Er(e,[r],(l,u)=>{let{value:c,setValue:f}=s.current;f&&l[r]!==u[r]&&l[r]!==c&&f(l[r])}),[e,r]),qt(()=>{if(n!==void 0)return e.setState(r,n),Za(e,[r],()=>{n!==void 0&&e.setState(r,n)})})}function Qc(e,t){let[r,o]=Ni.useState(()=>e(t));qt(()=>Zc(r),[r]);let n=Ni.useCallback(l=>Xc(r,l),[r]),i=Ni.useMemo(()=>({...r,useState:n}),[r,n]),s=qe(()=>{o(l=>e({...t,...l.getState()}))});return[i,s]}var Ps=a(Je(),1),T4=a(C(),1),MK="button";function BK(e){return Em(e)?!0:e.tagName==="INPUT"&&!Es(e)}function jK(e,t=!1){let r=e.clientHeight,{top:o}=e.getBoundingClientRect(),n=Math.max(r*.875,r-40)*1.5,i=t?r-n+o:n+o;return e.tagName==="HTML"?i+e.scrollTop:i}function zK(e,t=!1){let{top:r}=e.getBoundingClientRect();return t?r+e.clientHeight:r}function C4(e,t,r,o=!1){var n;if(!t||!r)return;let{renderedItems:i}=t.getState(),s=qc(e);if(!s)return;let l=jK(s,o),u,c;for(let f=0;f<i.length;f+=1){let m=u;if(u=r(f),!u)break;if(u===m)continue;let d=(n=Vi(t,u))==null?void 0:n.element;if(!d)continue;let g=zK(d,o)-l,y=Math.abs(g);if(o&&g<=0||!o&&g>=0){c!==void 0&&c<y&&(u=m);break}c=y}return u}function GK(e,t){return Yr(e)?!1:lu(t,e.target)}var u2=kt(function({store:t,rowId:r,preventScrollOnKeyDown:o=!1,moveOnKeyPress:n=!0,tabbable:i=!1,getItem:s,"aria-setsize":l,"aria-posinset":u,...c}){let f=yy();t=t||f;let m=Tn(c.id),d=(0,Ps.useRef)(null),h=(0,Ps.useContext)(n4),y=ou(c)&&!c.accessibleWhenDisabled,{rowId:v,baseElement:b,isActiveItem:w,ariaSetSize:x,ariaPosInSet:T,isTabbable:E}=Sy(t,{rowId(D){if(r)return r;if(D&&h?.baseElement&&h.baseElement===D.baseElement)return h.id},baseElement(D){return D?.baseElement||void 0},isActiveItem(D){return!!D&&D.activeId===m},ariaSetSize(D){if(l!=null)return l;if(D&&h?.ariaSetSize&&h.baseElement===D.baseElement)return h.ariaSetSize},ariaPosInSet(D){if(u!=null)return u;if(!D||!h?.ariaPosInSet||h.baseElement!==D.baseElement)return;let G=D.renderedItems.filter(U=>U.rowId===v);return h.ariaPosInSet+G.findIndex(U=>U.id===m)},isTabbable(D){if(!D?.renderedItems.length)return!0;if(D.virtualFocus)return!1;if(i)return!0;if(D.activeId===null)return!1;let G=t?.item(D.activeId);return G?.disabled||!G?.element?!0:D.activeId===m}}),k=(0,Ps.useCallback)(D=>{var G;let U={...D,id:m||D.id,rowId:v,disabled:!!y,children:(G=D.element)==null?void 0:G.textContent};return s?s(U):U},[m,v,y,s]),F=c.onFocus,P=(0,Ps.useRef)(!1),V=qe(D=>{if(F?.(D),D.defaultPrevented||hy(D)||!m||!t||GK(D,t))return;let{virtualFocus:G,baseElement:U}=t.getState();if(t.setActiveId(m),Em(D.currentTarget)&&a4(D.currentTarget),!G||!Yr(D)||BK(D.currentTarget)||!U?.isConnected)return;iu()&&D.currentTarget.hasAttribute("data-autofocus")&&D.currentTarget.scrollIntoView({block:"nearest",inline:"nearest"}),P.current=!0,D.relatedTarget===U||lu(t,D.relatedTarget)?l4(U):U.focus()}),N=c.onBlurCapture,A=qe(D=>{if(N?.(D),D.defaultPrevented)return;let G=t?.getState();G?.virtualFocus&&P.current&&(P.current=!1,D.preventDefault(),D.stopPropagation())}),S=c.onKeyDown,I=rr(o),O=rr(n),z=qe(D=>{if(S?.(D),D.defaultPrevented||!Yr(D)||!t)return;let{currentTarget:G}=D,U=t.getState(),ce=t.item(m),ye=!!ce?.rowId,Te=U.orientation!=="horizontal",Ie=U.orientation!=="vertical",He=()=>!!(ye||Ie||!U.baseElement||!uo(U.baseElement)),Se={ArrowUp:(ye||Te)&&t.up,ArrowRight:(ye||Ie)&&t.next,ArrowDown:(ye||Te)&&t.down,ArrowLeft:(ye||Ie)&&t.previous,Home:()=>{if(He())return!ye||D.ctrlKey?t?.first():t?.previous(-1)},End:()=>{if(He())return!ye||D.ctrlKey?t?.last():t?.next(-1)},PageUp:()=>C4(G,t,t?.up,!0),PageDown:()=>C4(G,t,t?.down)}[D.key];if(Se){if(Em(G)){let ie=Wc(G),$=Ie&&D.key==="ArrowLeft",Fe=Ie&&D.key==="ArrowRight",Yt=Te&&D.key==="ArrowUp",$r=Te&&D.key==="ArrowDown";if(Fe||$r){let{length:jr}=Y_(G);if(ie.end!==jr)return}else if(($||Yt)&&ie.start!==0)return}let J=Se();if(I(D)||J!==void 0){if(!O(D))return;D.preventDefault(),t.move(J)}}}),R=(0,Ps.useMemo)(()=>({id:m,baseElement:b}),[m,b]);return c=Fi(c,D=>(0,T4.jsx)(o4.Provider,{value:R,children:D}),[R]),c={id:m,"data-active-item":w||void 0,...c,ref:Xt(d,c.ref),tabIndex:E?c.tabIndex:-1,onFocus:V,onBlurCapture:A,onKeyDown:z},c=a2(c),c=o2({store:t,...c,getItem:k,shouldRegisterItem:m?c.shouldRegisterItem:!1}),Fr({...c,"aria-setsize":x,"aria-posinset":T})}),tTe=qa(xt(function(t){let r=u2(t);return At(MK,r)}));function c2(e){return Array.isArray(e)?e:typeof e<"u"?[e]:[]}function Fm(e){let t=[];for(let r of e)t.push(...r);return t}function Jc(e){return e.slice().reverse()}var Di=a(Je(),1),P4=a(C(),1),HK="div";function UK(e){return e.some(t=>!!t.rowId)}function WK(e){let t=e.target;return t&&!uo(t)?!1:e.key.length===1&&!e.ctrlKey&&!e.metaKey}function qK(e){return e.key==="Shift"||e.key==="Control"||e.key==="Alt"||e.key==="Meta"}function E4(e,t,r){return qe(o=>{var n;if(t?.(o),o.defaultPrevented||o.isPropagationStopped()||!Yr(o)||qK(o)||WK(o))return;let i=e.getState(),s=(n=Vi(e,i.activeId))==null?void 0:n.element;if(!s)return;let{view:l,...u}=o,c=r?.current;s!==c&&s.focus(),B3(s,o.type,u)||o.preventDefault(),o.currentTarget.contains(s)&&o.stopPropagation()})}function YK(e){return i4(Fm(Jc(s4(e))))}function ZK(e){let[t,r]=(0,Di.useState)(!1),o=(0,Di.useCallback)(()=>r(!0),[]),n=e.useState(i=>Vi(e,i.activeId));return(0,Di.useEffect)(()=>{let i=n?.element;t&&i&&(r(!1),i.focus({preventScroll:!0}))},[n,t]),o}var f2=kt(function({store:t,composite:r=!0,focusOnMove:o=r,moveOnKeyPress:n=!0,...i}){let s=r4();t=t||s,Ir(t,!1);let l=(0,Di.useRef)(null),u=(0,Di.useRef)(null),c=ZK(t),f=t.useState("moves"),[,m]=q3(r?t.setBaseElement:null);(0,Di.useEffect)(()=>{var A;if(!t||!f||!r||!o)return;let{activeId:S}=t.getState(),I=(A=Vi(t,S))==null?void 0:A.element;I&&h4(I)},[t,f,r,o]),qt(()=>{if(!t||!f||!r)return;let{baseElement:A,activeId:S}=t.getState();if(!(S===null)||!A)return;let O=u.current;u.current=null,O&&su(O,{relatedTarget:A}),En(A)||A.focus()},[t,f,r]);let d=t.useState("activeId"),h=t.useState("virtualFocus");qt(()=>{var A;if(!t||!r||!h)return;let S=u.current;if(u.current=null,!S)return;let O=((A=Vi(t,d))==null?void 0:A.element)||nu(S);O!==S&&su(S,{relatedTarget:O})},[t,d,h,r]);let g=E4(t,i.onKeyDownCapture,u),y=E4(t,i.onKeyUpCapture,u),v=i.onFocusCapture,b=qe(A=>{if(v?.(A),A.defaultPrevented||!t)return;let{virtualFocus:S}=t.getState();if(!S)return;let I=A.relatedTarget,O=u4(A.currentTarget);Yr(A)&&O&&(A.stopPropagation(),u.current=I)}),w=i.onFocus,x=qe(A=>{if(w?.(A),A.defaultPrevented||!r||!t)return;let{relatedTarget:S}=A,{virtualFocus:I}=t.getState();I?Yr(A)&&!lu(t,S)&&queueMicrotask(c):Yr(A)&&t.setActiveId(null)}),T=i.onBlurCapture,E=qe(A=>{var S;if(T?.(A),A.defaultPrevented||!t)return;let{virtualFocus:I,activeId:O}=t.getState();if(!I)return;let z=(S=Vi(t,O))==null?void 0:S.element,R=A.relatedTarget,D=lu(t,R),G=u.current;u.current=null,Yr(A)&&D?(R===z?G&&G!==R&&su(G,A):z?su(z,A):G&&su(G,A),A.stopPropagation()):!lu(t,A.target)&&z&&su(z,A)}),k=i.onKeyDown,F=rr(n),P=qe(A=>{var S;if(k?.(A),A.nativeEvent.isComposing||A.defaultPrevented||!t||!Yr(A))return;let{orientation:I,renderedItems:O,activeId:z}=t.getState(),R=Vi(t,z);if((S=R?.element)!=null&&S.isConnected)return;let D=I!=="horizontal",G=I!=="vertical",U=UK(O);if((A.key==="ArrowLeft"||A.key==="ArrowRight"||A.key==="Home"||A.key==="End")&&uo(A.currentTarget))return;let Ie={ArrowUp:(U||D)&&(()=>{if(U){let He=YK(O);return He?.id}return t?.last()}),ArrowRight:(U||G)&&t.first,ArrowDown:(U||D)&&t.first,ArrowLeft:(U||G)&&t.last,Home:t.first,End:t.last,PageUp:t.first,PageDown:t.last}[A.key];if(Ie){let He=Ie();if(He!==void 0){if(!F(A))return;A.preventDefault(),t.move(He)}}});i=Fi(i,A=>(0,P4.jsx)(Yc,{value:t,children:A}),[t]),i={"aria-activedescendant":t.useState(A=>{var S;if(t&&r&&A.virtualFocus)return(S=Vi(t,A.activeId))==null?void 0:S.id}),...i,ref:Xt(l,m,i.ref),onKeyDownCapture:g,onKeyUpCapture:y,onFocusCapture:b,onFocus:x,onBlurCapture:E,onKeyDown:P};let N=t.useState(A=>r&&(A.virtualFocus||A.activeId===null));return i=Om({focusable:N,...i}),i}),vTe=xt(function(t){let r=f2(t);return At(HK,r)});var Vm=zo(),wTe=Vm.useContext,xTe=Vm.useScopedContext,d2=Vm.useProviderContext,A4=Vm.ContextProvider,k4=Vm.ScopedContextProvider;var m2=a(Je(),1),Nm=zo([A4],[k4]),TTe=Nm.useContext,ETe=Nm.useScopedContext,PTe=Nm.useProviderContext,R4=Nm.ContextProvider,_y=Nm.ScopedContextProvider,ATe=(0,m2.createContext)(void 0),kTe=(0,m2.createContext)(void 0);var $c=a(Je(),1),F4=a(Yb(),1),p2=a(C(),1),KK="div";function O4(e,t){let r=setTimeout(t,e);return()=>clearTimeout(r)}function XK(e){let t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>cancelAnimationFrame(t)}function I4(...e){return e.join(", ").split(", ").reduce((t,r)=>{let o=r.endsWith("ms")?1:1e3,n=Number.parseFloat(r||"0s")*o;return n>t?n:t},0)}function h2(e,t,r){return!r&&t!==!1&&(!e||!!t)}var QK=kt(function({store:t,alwaysVisible:r,...o}){let n=d2();t=t||n,Ir(t,!1);let i=(0,$c.useRef)(null),s=Tn(o.id),[l,u]=(0,$c.useState)(null),c=t.useState("open"),f=t.useState("mounted"),m=t.useState("animated"),d=t.useState("contentElement"),h=Xc(t.disclosure,"contentElement");qt(()=>{i.current&&t?.setContentElement(i.current)},[t]),qt(()=>{let b;return t?.setState("animated",w=>(b=w,!0)),()=>{b!==void 0&&t?.setState("animated",b)}},[t]),qt(()=>{if(m){if(!d?.isConnected){u(null);return}return XK(()=>{u(c?"enter":f?"leave":null)})}},[m,d,c,f]),qt(()=>{if(!t||!m||!l||!d)return;let b=()=>t?.setState("animating",!1),w=()=>(0,F4.flushSync)(b);if(l==="leave"&&c||l==="enter"&&!c)return;if(typeof m=="number")return O4(m,w);let{transitionDuration:x,animationDuration:T,transitionDelay:E,animationDelay:k}=getComputedStyle(d),{transitionDuration:F="0",animationDuration:P="0",transitionDelay:V="0",animationDelay:N="0"}=h?getComputedStyle(h):{},A=I4(E,k,V,N),S=I4(x,T,F,P),I=A+S;if(!I){l==="enter"&&t.setState("animated",!1),b();return}let O=1e3/60,z=Math.max(I-O,0);return O4(z,w)},[t,m,d,h,c,l]),o=Fi(o,b=>(0,p2.jsx)(_y,{value:t,children:b}),[t]);let g=h2(f,o.hidden,r),y=o.style,v=(0,$c.useMemo)(()=>g?{...y,display:"none"}:y,[g,y]);return o={id:s,"data-open":c||void 0,"data-enter":l==="enter"||void 0,"data-leave":l==="leave"||void 0,hidden:g,...o,ref:Xt(s?t.setContentElement:null,i,o.ref),style:v},Fr(o)}),JK=xt(function(t){let r=QK(t);return At(KK,r)}),LTe=xt(function({unmountOnHide:t,...r}){let o=d2(),n=r.store||o;return Xc(n,s=>!t||s?.mounted)===!1?null:(0,p2.jsx)(JK,{...r})});function V4(e={}){let t=cu(e.store,Im(e.disclosure,["contentElement","disclosureElement"]));let r=t?.getState(),o=We(e.open,r?.open,e.defaultOpen,!1),n=We(e.animated,r?.animated,!1),i={open:o,animated:n,animating:!!n&&o,mounted:o,contentElement:We(r?.contentElement,null),disclosureElement:We(r?.disclosureElement,null)},s=fo(i,t);return Tr(s,()=>Er(s,["animated","animating"],l=>{l.animated||s.setState("animating",!1)})),Tr(s,()=>Kc(s,["open"],()=>{s.getState().animated&&s.setState("animating",!0)})),Tr(s,()=>Er(s,["open","animating"],l=>{s.setState("mounted",l.open||l.animating)})),{...s,disclosure:e.disclosure,setOpen:l=>s.setState("open",l),show:()=>s.setState("open",!0),hide:()=>s.setState("open",!1),toggle:()=>s.setState("open",l=>!l),stopAnimation:()=>s.setState("animating",!1),setContentElement:l=>s.setState("contentElement",l),setDisclosureElement:l=>s.setState("disclosureElement",l)}}function N4(e,t,r){return Ii(t,[r.store,r.disclosure]),Qt(e,r,"open","setOpen"),Qt(e,r,"mounted","setMounted"),Qt(e,r,"animated"),Object.assign(e,{disclosure:r.disclosure})}var Dm=zo([R4],[_y]),YTe=Dm.useContext,ZTe=Dm.useScopedContext,D4=Dm.useProviderContext,L4=Dm.ContextProvider,M4=Dm.ScopedContextProvider;function $K(e){var t;let r=e.find(i=>!!i.element),o=[...e].reverse().find(i=>!!i.element),n=(t=r?.element)==null?void 0:t.parentElement;for(;n&&o?.element;){if(o&&n.contains(o.element))return n;n=n.parentElement}return Ts(n).body}function eX(e){return e?.__unstablePrivateStore}function B4(e={}){var t;e.store;let r=(t=e.store)==null?void 0:t.getState(),o=We(e.items,r?.items,e.defaultItems,[]),n=new Map(o.map(d=>[d.id,d])),i={items:o,renderedItems:We(r?.renderedItems,[])},s=eX(e.store),l=fo({items:o,renderedItems:i.renderedItems},s),u=fo(i,e.store),c=d=>{let h=K_(d,g=>g.element);l.setState("renderedItems",h),u.setState("renderedItems",h)};Tr(u,()=>Zc(l)),Tr(l,()=>Za(l,["items"],d=>{u.setState("items",d.items)})),Tr(l,()=>Za(l,["renderedItems"],d=>{let h=!0,g=requestAnimationFrame(()=>{let{renderedItems:w}=u.getState();d.renderedItems!==w&&c(d.renderedItems)});if(typeof IntersectionObserver!="function")return()=>cancelAnimationFrame(g);let y=()=>{if(h){h=!1;return}cancelAnimationFrame(g),g=requestAnimationFrame(()=>c(d.renderedItems))},v=$K(d.renderedItems),b=new IntersectionObserver(y,{root:v});for(let w of d.renderedItems)w.element&&b.observe(w.element);return()=>{cancelAnimationFrame(g),b.disconnect()}}));let f=(d,h,g=!1)=>{let y;return h(b=>{let w=b.findIndex(({id:T})=>T===d.id),x=b.slice();if(w!==-1){y=b[w];let T={...y,...d};x[w]=T,n.set(d.id,T)}else x.push(d),n.set(d.id,d);return x}),()=>{h(b=>{if(!y)return g&&n.delete(d.id),b.filter(({id:T})=>T!==d.id);let w=b.findIndex(({id:T})=>T===d.id);if(w===-1)return b;let x=b.slice();return x[w]=y,n.set(d.id,y),x})}},m=d=>f(d,h=>l.setState("items",h),!0);return{...u,registerItem:m,renderItem:d=>Ha(m(d),f(d,h=>l.setState("renderedItems",h))),item:d=>{if(!d)return null;let h=n.get(d);if(!h){let{items:g}=l.getState();h=g.find(y=>y.id===d),h&&n.set(d,h)}return h||null},__unstablePrivateStore:l}}function j4(e,t,r){return Ii(t,[r.store]),Qt(e,r,"items","setItems"),e}var tX={id:null};function As(e,t){return e.find(r=>t?!r.disabled&&r.id!==t:!r.disabled)}function rX(e,t){return e.filter(r=>t?!r.disabled&&r.id!==t:!r.disabled)}function z4(e,t){return e.filter(r=>r.rowId===t)}function oX(e,t,r=!1){let o=e.findIndex(n=>n.id===t);return[...e.slice(o+1),...r?[tX]:[],...e.slice(0,o)]}function G4(e){let t=[];for(let r of e){let o=t.find(n=>{var i;return((i=n[0])==null?void 0:i.rowId)===r.rowId});o?o.push(r):t.push([r])}return t}function H4(e){let t=0;for(let{length:r}of e)r>t&&(t=r);return t}function nX(e){return{id:"__EMPTY_ITEM__",disabled:!0,rowId:e}}function iX(e,t,r){let o=H4(e);for(let n of e)for(let i=0;i<o;i+=1){let s=n[i];if(!s||r&&s.disabled){let u=i===0&&r?As(n):n[i-1];n[i]=u&&t!==u.id&&r?u:nX(u?.rowId)}}return e}function sX(e){let t=G4(e),r=H4(t),o=[];for(let n=0;n<r;n+=1)for(let i of t){let s=i[n];s&&o.push({...s,rowId:s.rowId?`${n}`:void 0})}return o}function U4(e={}){var t;let r=(t=e.store)==null?void 0:t.getState(),o=B4(e),n=We(e.activeId,r?.activeId,e.defaultActiveId),i={...o.getState(),id:We(e.id,r?.id,`id-${Math.random().toString(36).slice(2,8)}`),activeId:n,baseElement:We(r?.baseElement,null),includesBaseElement:We(e.includesBaseElement,r?.includesBaseElement,n===null),moves:We(r?.moves,0),orientation:We(e.orientation,r?.orientation,"both"),rtl:We(e.rtl,r?.rtl,!1),virtualFocus:We(e.virtualFocus,r?.virtualFocus,!1),focusLoop:We(e.focusLoop,r?.focusLoop,!1),focusWrap:We(e.focusWrap,r?.focusWrap,!1),focusShift:We(e.focusShift,r?.focusShift,!1)},s=fo(i,o,e.store);Tr(s,()=>Er(s,["renderedItems","activeId"],u=>{s.setState("activeId",c=>{var f;return c!==void 0?c:(f=As(u.renderedItems))==null?void 0:f.id})}));let l=(u="next",c={})=>{var f,m;let d=s.getState(),{skip:h=0,activeId:g=d.activeId,focusShift:y=d.focusShift,focusLoop:v=d.focusLoop,focusWrap:b=d.focusWrap,includesBaseElement:w=d.includesBaseElement,renderedItems:x=d.renderedItems,rtl:T=d.rtl}=c,E=u==="up"||u==="down",k=u==="next"||u==="down",F=k?T&&!E:!T||E,P=y&&!h,V=E?Fm(iX(G4(x),g,P)):x;if(V=F?Jc(V):V,V=E?sX(V):V,g==null)return(f=As(V))==null?void 0:f.id;let N=V.find(U=>U.id===g);if(!N)return(m=As(V))==null?void 0:m.id;let A=V.some(U=>U.rowId),S=V.indexOf(N),I=V.slice(S+1),O=z4(I,N.rowId);if(h){let U=rX(O,g),ce=U.slice(h)[0]||U[U.length-1];return ce?.id}let z=v&&(E?v!=="horizontal":v!=="vertical"),R=A&&b&&(E?b!=="horizontal":b!=="vertical"),D=k?(!A||E)&&z&&w:E?w:!1;if(z){let U=R&&!D?V:z4(V,N.rowId),ce=oX(U,g,D),ye=As(ce,g);return ye?.id}if(R){let U=As(D?O:I,g);return D?U?.id||null:U?.id}let G=As(O,g);return!G&&D?null:G?.id};return{...o,...s,setBaseElement:u=>s.setState("baseElement",u),setActiveId:u=>s.setState("activeId",u),move:u=>{u!==void 0&&(s.setState("activeId",u),s.setState("moves",c=>c+1))},first:()=>{var u;return(u=As(s.getState().renderedItems))==null?void 0:u.id},last:()=>{var u;return(u=As(Jc(s.getState().renderedItems)))==null?void 0:u.id},next:u=>(u!==void 0&&typeof u=="number"&&(u={skip:u}),l("next",u)),previous:u=>(u!==void 0&&typeof u=="number"&&(u={skip:u}),l("previous",u)),down:u=>(u!==void 0&&typeof u=="number"&&(u={skip:u}),l("down",u)),up:u=>(u!==void 0&&typeof u=="number"&&(u={skip:u}),l("up",u))}}function W4(e){return{id:Tn(e.id),...e}}function q4(e,t,r){return e=j4(e,t,r),Qt(e,r,"activeId","setActiveId"),Qt(e,r,"includesBaseElement"),Qt(e,r,"virtualFocus"),Qt(e,r,"orientation"),Qt(e,r,"rtl"),Qt(e,r,"focusLoop"),Qt(e,r,"focusWrap"),Qt(e,r,"focusShift"),e}var Cy=a(Je(),1),Ty=(0,Cy.createContext)(void 0),Lm=zo([L4,Yc],[M4,by]),g2=Lm.useContext,ef=Lm.useScopedContext,Ey=Lm.useProviderContext,Y4=Lm.ContextProvider,Z4=Lm.ScopedContextProvider,Py=(0,Cy.createContext)(void 0),K4=(0,Cy.createContext)(!1);function X4(e={}){return V4(e)}function Q4(e,t,r){return N4(e,t,r)}function J4({popover:e,...t}={}){let r=cu(t.store,Im(e,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"]));let o=r?.getState(),n=X4({...t,store:r}),i=We(t.placement,o?.placement,"bottom"),s={...n.getState(),placement:i,currentPlacement:i,anchorElement:We(o?.anchorElement,null),popoverElement:We(o?.popoverElement,null),arrowElement:We(o?.arrowElement,null),rendered:Symbol("rendered")},l=fo(s,n,r);return{...n,...l,setAnchorElement:u=>l.setState("anchorElement",u),setPopoverElement:u=>l.setState("popoverElement",u),setArrowElement:u=>l.setState("arrowElement",u),render:()=>l.setState("rendered",Symbol("rendered"))}}function $4(e,t,r){return Ii(t,[r.popover]),Qt(e,r,"placement"),Q4(e,t,r)}var aX="div",v2=kt(function({store:t,...r}){let o=D4();return t=t||o,r={...r,ref:Xt(t?.setAnchorElement,r.ref)},r}),OEe=xt(function(t){let r=v2(t);return At(aX,r)});var eF=a(Je(),1),lX="div";function tF(e){let t=e.relatedTarget;return t?.nodeType===Node.ELEMENT_NODE?t:null}function uX(e){let t=tF(e);return t?Ri(e.currentTarget,t):!1}var y2=Symbol("composite-hover");function cX(e){let t=tF(e);if(!t)return!1;do{if(jo(t,y2)&&t[y2])return!0;t=t.parentElement}while(t);return!1}var b2=kt(function({store:t,focusOnHover:r=!0,blurOnHoverEnd:o=!!r,...n}){let i=yy();t=t||i,Ir(t,!1);let s=J3(),l=n.onMouseMove,u=rr(r),c=qe(g=>{if(l?.(g),!g.defaultPrevented&&s()&&u(g)){if(!n2(g.currentTarget)){let y=t?.getState().baseElement;y&&!En(y)&&y.focus()}t?.setActiveId(g.currentTarget.id)}}),f=n.onMouseLeave,m=rr(o),d=qe(g=>{var y;f?.(g),!g.defaultPrevented&&s()&&(uX(g)||cX(g)||u(g)&&m(g)&&(t?.setActiveId(null),(y=t?.getState().baseElement)==null||y.focus()))}),h=(0,eF.useCallback)(g=>{g&&(g[y2]=!0)},[]);return n={...n,ref:Xt(h,n.ref),onMouseMove:c,onMouseLeave:d},Fr(n)}),BEe=qa(xt(function(t){let r=b2(t);return At(lX,r)}));var Vr=a(Je(),1),fX="input";function rF(e,t,r){if(!r)return!1;let o=e.find(n=>!n.disabled&&n.value);return o?.value===t}function oF(e,t){return!t||e==null?!1:(e=Cm(e),t.length>e.length&&t.toLowerCase().indexOf(e.toLowerCase())===0)}function dX(e){return e.type==="input"}function mX(e){return e==="inline"||e==="list"||e==="both"||e==="none"}function pX(e){let t=e.find(r=>{var o;return r.disabled?!1:((o=r.element)==null?void 0:o.getAttribute("role"))!=="tab"});return t?.id}var hX=kt(function({store:t,focusable:r=!0,autoSelect:o=!1,getAutoSelectId:n,setValueOnChange:i,showMinLength:s=0,showOnChange:l,showOnMouseDown:u,showOnClick:c=u,showOnKeyDown:f,showOnKeyPress:m=f,blurActiveItemOnClick:d,setValueOnClick:h=!0,moveOnKeyPress:g=!0,autoComplete:y="list",...v}){let b=Ey();t=t||b,Ir(t,!1);let w=(0,Vr.useRef)(null),[x,T]=X3(),E=(0,Vr.useRef)(!1),k=(0,Vr.useRef)(!1),F=t.useState(K=>K.virtualFocus&&o),P=y==="inline"||y==="both",[V,N]=(0,Vr.useState)(P);K3(()=>{P&&N(!0)},[P]);let A=t.useState("value"),S=(0,Vr.useRef)(void 0);(0,Vr.useEffect)(()=>Er(t,["selectedValue","activeId"],(K,ae)=>{S.current=ae.selectedValue}),[]);let I=t.useState(K=>{var ae;if(P&&V&&!(K.activeValue&&Array.isArray(K.selectedValue)&&(K.selectedValue.includes(K.activeValue)||(ae=S.current)!=null&&ae.includes(K.activeValue))))return K.activeValue}),O=t.useState("renderedItems"),z=t.useState("open"),R=t.useState("contentElement"),D=(0,Vr.useMemo)(()=>{if(!P||!V)return A;if(rF(O,I,F)){if(oF(A,I)){let ae=I?.slice(A.length)||"";return A+ae}return A}return I||A},[P,V,O,I,F,A]);(0,Vr.useEffect)(()=>{let K=w.current;if(!K)return;let ae=()=>N(!0);return K.addEventListener("combobox-item-move",ae),()=>{K.removeEventListener("combobox-item-move",ae)}},[]),(0,Vr.useEffect)(()=>{if(!P||!V||!I||!rF(O,I,F)||!oF(A,I))return;let ae=_m;return queueMicrotask(()=>{let ne=w.current;if(!ne)return;let{start:Ee,end:ct}=Wc(ne),Lt=A.length,rt=I.length;Pm(ne,Lt,rt),ae=()=>{if(!En(ne))return;let{start:Ot,end:It}=Wc(ne);Ot===Lt&&It===rt&&Pm(ne,Ee,ct)}}),()=>ae()},[x,P,V,I,O,F,A]);let G=(0,Vr.useRef)(null),U=qe(n),ce=(0,Vr.useRef)(null);(0,Vr.useEffect)(()=>{if(!z||!R)return;let K=qc(R);if(!K)return;G.current=K;let ae=()=>{E.current=!1},ne=()=>{if(!t||!E.current)return;let{activeId:ct}=t.getState();ct!==null&&ct!==ce.current&&(E.current=!1)},Ee={passive:!0,capture:!0};return K.addEventListener("wheel",ae,Ee),K.addEventListener("touchmove",ae,Ee),K.addEventListener("scroll",ne,Ee),()=>{K.removeEventListener("wheel",ae,!0),K.removeEventListener("touchmove",ae,!0),K.removeEventListener("scroll",ne,!0)}},[z,R,t]),qt(()=>{A&&(k.current||(E.current=!0))},[A]),qt(()=>{F!=="always"&&z||(E.current=z)},[F,z]);let ye=t.useState("resetValueOnSelect");Ii(()=>{var K,ae;let ne=E.current;if(!t||!z||!ne&&!ye)return;let{baseElement:Ee,contentElement:ct,activeId:Lt}=t.getState();if(!(Ee&&!En(Ee))){if(ct?.hasAttribute("data-placing")){let rt=new MutationObserver(T);return rt.observe(ct,{attributeFilter:["data-placing"]}),()=>rt.disconnect()}if(F&&ne){let rt=U(O),Ot=rt!==void 0?rt:(K=pX(O))!=null?K:t.first();ce.current=Ot,t.move(Ot??null)}else{let rt=(ae=t.item(Lt||t.first()))==null?void 0:ae.element;rt&&"scrollIntoView"in rt&&rt.scrollIntoView({block:"nearest",inline:"nearest"})}}},[t,z,x,A,F,ye,U,O]),(0,Vr.useEffect)(()=>{if(!P)return;let K=w.current;if(!K)return;let ae=[K,R].filter(Ee=>!!Ee),ne=Ee=>{ae.every(ct=>gy(Ee,ct))&&t?.setValue(D)};for(let Ee of ae)Ee.addEventListener("focusout",ne);return()=>{for(let Ee of ae)Ee.removeEventListener("focusout",ne)}},[P,R,t,D]);let Te=K=>K.currentTarget.value.length>=s,Ie=v.onChange,He=rr(l??Te),pe=rr(i??!t.tag),Se=qe(K=>{if(Ie?.(K),K.defaultPrevented||!t)return;let ae=K.currentTarget,{value:ne,selectionStart:Ee,selectionEnd:ct}=ae,Lt=K.nativeEvent;if(E.current=!0,dX(Lt)&&(Lt.isComposing&&(E.current=!1,k.current=!0),P)){let rt=Lt.inputType==="insertText"||Lt.inputType==="insertCompositionText",Ot=Ee===ne.length;N(rt&&Ot)}if(pe(K)){let rt=ne===t.getState().value;t.setValue(ne),queueMicrotask(()=>{Pm(ae,Ee,ct)}),P&&F&&rt&&T()}He(K)&&t.show(),(!F||!E.current)&&t.setActiveId(null)}),J=v.onCompositionEnd,ie=qe(K=>{E.current=!0,k.current=!1,J?.(K),!K.defaultPrevented&&F&&T()}),$=v.onMouseDown,Fe=rr(d??(()=>!!t?.getState().includesBaseElement)),Yt=rr(h),$r=rr(c??Te),jr=qe(K=>{$?.(K),!K.defaultPrevented&&(K.button||K.ctrlKey||t&&(Fe(K)&&t.setActiveId(null),Yt(K)&&t.setValue(D),$r(K)&&Wa(K.currentTarget,"mouseup",t.show)))}),ee=v.onKeyDown,Y=rr(m??Te),te=qe(K=>{if(ee?.(K),K.repeat||(E.current=!1),K.defaultPrevented||K.ctrlKey||K.altKey||K.shiftKey||K.metaKey||!t)return;let{open:ae}=t.getState();ae||(K.key==="ArrowUp"||K.key==="ArrowDown")&&Y(K)&&(K.preventDefault(),t.show())}),X=v.onBlur,oe=qe(K=>{E.current=!1,X?.(K),K.defaultPrevented}),Pe=Tn(v.id),we=mX(y)?y:void 0,_e=t.useState(K=>K.activeId===null);return v={id:Pe,role:"combobox","aria-autocomplete":we,"aria-haspopup":Z_(R,"listbox"),"aria-expanded":z,"aria-controls":R?.id,"data-active-item":_e||void 0,value:D,...v,ref:Xt(w,v.ref),onChange:Se,onCompositionEnd:ie,onMouseDown:jr,onKeyDown:te,onBlur:oe},v=f2({store:t,focusable:r,...v,moveOnKeyPress:K=>U_(g,K)?!1:(P&&N(!0),!0)}),v=v2({store:t,...v}),{autoComplete:"off",...v}}),Ay=xt(function(t){let r=hX(t);return At(fX,r)});var ky=a(Je(),1),w2=a(C(),1),gX="div";function vX(e,t){if(t!=null)return e==null?!1:Array.isArray(e)?e.includes(t):e===t}function yX(e){var t;return(t={menu:"menuitem",listbox:"option",tree:"treeitem"}[e])!=null?t:"option"}var nF=kt(function({store:t,value:r,hideOnClick:o,setValueOnClick:n,selectValueOnClick:i=!0,resetValueOnSelect:s,focusOnHover:l=!1,moveOnKeyPress:u=!0,getItem:c,...f}){var m;let d=ef();t=t||d,Ir(t,!1);let{resetValueOnSelectState:h,multiSelectable:g,selected:y}=Sy(t,{resetValueOnSelectState:"resetValueOnSelect",multiSelectable(A){return Array.isArray(A.selectedValue)},selected(A){return vX(A.selectedValue,r)}}),v=(0,ky.useCallback)(A=>{let S={...A,value:r};return c?c(S):S},[r,c]);n=n??!g,o=o??(r!=null&&!g);let b=f.onClick,w=rr(n),x=rr(i),T=rr((m=s??h)!=null?m:g),E=rr(o),k=qe(A=>{b?.(A),!A.defaultPrevented&&(M3(A)||L3(A)||(r!=null&&(x(A)&&(T(A)&&t?.resetValue(),t?.setSelectedValue(S=>Array.isArray(S)?S.includes(r)?S.filter(I=>I!==r):[...S,r]:r)),w(A)&&t?.setValue(r)),E(A)&&t?.hide()))}),F=f.onKeyDown,P=qe(A=>{if(F?.(A),A.defaultPrevented)return;let S=t?.getState().baseElement;if(!S||En(S))return;(A.key.length===1||A.key==="Backspace"||A.key==="Delete")&&(queueMicrotask(()=>S.focus()),uo(S)&&t?.setValue(S.value))});g&&y!=null&&(f={"aria-selected":y,...f}),f=Fi(f,A=>(0,w2.jsx)(Py.Provider,{value:r,children:(0,w2.jsx)(K4.Provider,{value:y??!1,children:A})}),[r,y]);let V=(0,ky.useContext)(Ty);f={role:yX(V),children:r,...f,onClick:k,onKeyDown:P};let N=rr(u);return f=u2({store:t,...f,getItem:v,moveOnKeyPress:A=>{if(!N(A))return!1;let S=new Event("combobox-item-move"),I=t?.getState().baseElement;return I?.dispatchEvent(S),!0}}),f=b2({store:t,focusOnHover:l,...f}),f}),Mm=qa(xt(function(t){let r=nF(t);return At(gX,r)}));var Ry=a(Je(),1),sF=a(C(),1),bX="span";function iF(e){return Cm(e).toLowerCase()}function wX(e,t){let r=[];for(let o of t){let n=0,i=o.length;for(;e.indexOf(o,n)!==-1;){let s=e.indexOf(o,n);s!==-1&&r.push([s,i]),n=s+1}}return r}function xX(e){return e.filter(([t,r],o,n)=>!n.some(([i,s],l)=>l!==o&&i<=t&&i+s>=t+r))}function SX(e){return e.sort(([t],[r])=>t-r)}function _X(e,t){if(!e||!t)return e;let r=c2(t).filter(Boolean).map(iF),o=[],n=(u,c=!1)=>(0,sF.jsx)("span",{"data-autocomplete-value":c?"":void 0,"data-user-value":c?void 0:"",children:u},o.length),i=SX(xX(wX(iF(e),new Set(r))));if(!i.length)return o.push(n(e,!0)),o;let[s]=i[0];return[e.slice(0,s),...i.flatMap(([u,c],f)=>{var m;let d=e.slice(u,u+c),h=(m=i[f+1])==null?void 0:m[0],g=e.slice(u+c,h);return[d,g]})].forEach((u,c)=>{u&&o.push(n(u,c%2===0))}),o}var CX=kt(function({store:t,value:r,userValue:o,...n}){let i=ef();t=t||i;let s=(0,Ry.useContext)(Py),l=r??s,u=Xc(t,f=>o??f?.value);return n={children:(0,Ry.useMemo)(()=>{if(l)return u?_X(l,u):l},[l,u]),...n},Fr(n)}),Oy=xt(function(t){let r=CX(t);return At(bX,r)});var TX="label",EX=kt(function({store:t,...r}){let o=Ey();return t=t||o,Ir(t,!1),r={htmlFor:t.useState(i=>{var s;return(s=i.baseElement)==null?void 0:s.id}),...r},Fr(r)}),Iy=qa(xt(function(t){let r=EX(t);return At(TX,r)}));var Fy=a(Je(),1),x2=a(C(),1),PX="div",aF=kt(function({store:t,alwaysVisible:r,...o}){let n=ef(!0),i=g2();t=t||i;let s=!!t&&t===n;Ir(t,!1);let l=(0,Fy.useRef)(null),u=Tn(o.id),c=t.useState("mounted"),f=h2(c,o.hidden,r),m=f?{...o.style,display:"none"}:o.style,d=t.useState(T=>Array.isArray(T.selectedValue)),h=Z3(l,"role",o.role),y=(h==="listbox"||h==="tree"||h==="grid")&&d||void 0,[v,b]=(0,Fy.useState)(!1),w=t.useState("contentElement");qt(()=>{if(!c)return;let T=l.current;if(!T||w!==T)return;let E=()=>{b(!!T.querySelector("[role='listbox']"))},k=new MutationObserver(E);return k.observe(T,{subtree:!0,childList:!0,attributeFilter:["role"]}),E(),()=>k.disconnect()},[c,w]),v||(o={role:"listbox","aria-multiselectable":y,...o}),o=Fi(o,T=>(0,x2.jsx)(Z4,{value:t,children:(0,x2.jsx)(Ty.Provider,{value:h,children:T})}),[t,h]);let x=u&&(!n||!s)?t.setContentElement:null;return o={id:u,hidden:f,...o,ref:Xt(x,l,o.ref),style:m},Fr(o)}),Bm=xt(function(t){let r=aF(t);return At(PX,r)});var S2=a(Je(),1),OPe=(0,S2.createContext)(null),IPe=(0,S2.createContext)(null),jm=zo([Yc],[by]),lF=jm.useContext,FPe=jm.useScopedContext,VPe=jm.useProviderContext,NPe=jm.ContextProvider,DPe=jm.ScopedContextProvider;var AX=iu()&&X_();function uF({tag:e,...t}={}){let r=cu(t.store,l2(e,["value","rtl"]));let o=e?.getState(),n=r?.getState(),i=We(t.activeId,n?.activeId,t.defaultActiveId,null),s=U4({...t,activeId:i,includesBaseElement:We(t.includesBaseElement,n?.includesBaseElement,!0),orientation:We(t.orientation,n?.orientation,"vertical"),focusLoop:We(t.focusLoop,n?.focusLoop,!0),focusWrap:We(t.focusWrap,n?.focusWrap,!0),virtualFocus:We(t.virtualFocus,n?.virtualFocus,!0)}),l=J4({...t,placement:We(t.placement,n?.placement,"bottom-start")}),u=We(t.value,n?.value,t.defaultValue,""),c=We(t.selectedValue,n?.selectedValue,o?.values,t.defaultSelectedValue,""),f=Array.isArray(c),m={...s.getState(),...l.getState(),value:u,selectedValue:c,resetValueOnSelect:We(t.resetValueOnSelect,n?.resetValueOnSelect,f),resetValueOnHide:We(t.resetValueOnHide,n?.resetValueOnHide,f&&!e),activeValue:n?.activeValue},d=fo(m,s,l,r);return AX&&Tr(d,()=>Er(d,["virtualFocus"],()=>{d.setState("virtualFocus",!1)})),Tr(d,()=>{if(e)return Ha(Er(d,["selectedValue"],h=>{Array.isArray(h.selectedValue)&&e.setValues(h.selectedValue)}),Er(e,["values"],h=>{d.setState("selectedValue",h.values)}))}),Tr(d,()=>Er(d,["resetValueOnHide","mounted"],h=>{h.resetValueOnHide&&(h.mounted||d.setState("value",u))})),Tr(d,()=>Er(d,["open"],h=>{h.open||(d.setState("activeId",i),d.setState("moves",0))})),Tr(d,()=>Er(d,["moves","activeId"],(h,g)=>{h.moves===g.moves&&d.setState("activeValue",void 0)})),Tr(d,()=>Za(d,["moves","renderedItems"],(h,g)=>{if(h.moves===g.moves)return;let{activeId:y}=d.getState(),v=s.item(y);d.setState("activeValue",v?.value)})),{...l,...s,...d,tag:e,setValue:h=>d.setState("value",h),resetValue:()=>d.setState("value",m.value),setSelectedValue:h=>d.setState("selectedValue",h)}}function RX(e){let t=lF();return e={...e,tag:e.tag!==void 0?e.tag:t},W4(e)}function OX(e,t,r){return Ii(t,[r.tag]),Qt(e,r,"value","setValue"),Qt(e,r,"selectedValue","setSelectedValue"),Qt(e,r,"resetValueOnHide"),Qt(e,r,"resetValueOnSelect"),Object.assign(q4($4(e,t,r),t,r),{tag:r.tag})}function _2(e={}){e=RX(e);let[t,r]=Qc(uF,e);return OX(t,r,e)}var cF=a(C(),1);function Vy(e={}){let t=_2(e);return(0,cF.jsx)(Y4,{value:t,children:e.children})}var vF=a(C2(),1);var yF=a(Qe(),1),ks=a(j(),1),fu=a(B(),1),Pn=a(M(),1);var LX=[],zm=(e,t)=>e.singleSelection?t?.value:Array.isArray(t?.value)?t.value:!Array.isArray(t?.value)&&t?.value?[t.value]:LX;var Gm=a(B(),1),MX=[];function Pr({elements:e,getElements:t}){let r=Array.isArray(e)&&e.length>0?e:MX,[o,n]=(0,Gm.useState)(r),[i,s]=(0,Gm.useState)(!1);return(0,Gm.useEffect)(()=>{if(!t){n(r);return}let l=!1;return s(!0),t().then(u=>{if(!l){let c=Array.isArray(u)&&u.length>0?u:r;n(c)}}).catch(()=>{l||n(r)}).finally(()=>{l||s(!1)}),()=>{l=!0}},[t,r]),{elements:o,isLoading:i}}var ot=a(C(),1);function pF(e=""){return(0,vF.default)(e.trim().toLowerCase())}var hF=(e,t,r)=>e.singleSelection?r:Array.isArray(t?.value)?t.value.includes(r)?t.value.filter(o=>o!==r):[...t.value,r]:[r];function gF(e,t){return`${e}-${t}`}var bF=({selected:e})=>(0,ot.jsx)("span",{className:Z("dataviews-filters__search-widget-listitem-multi-selection",{"is-selected":e}),children:e&&(0,ot.jsx)(Pn.Icon,{icon:bl})}),wF=({selected:e})=>(0,ot.jsx)("span",{className:Z("dataviews-filters__search-widget-listitem-single-selection",{"is-selected":e})});function xF({view:e,filter:t,onChangeView:r}){let o=(0,yF.useInstanceId)(xF,"dataviews-filter-list-box"),[n,i]=(0,fu.useState)(t.operators?.length===1?void 0:null),s=e.filters?.find(u=>u.field===t.field),l=zm(t,s);return(0,ot.jsx)(Pn.Composite,{virtualFocus:!0,focusLoop:!0,activeId:n,setActiveId:i,role:"listbox",className:"dataviews-filters__search-widget-listbox","aria-label":(0,ks.sprintf)((0,ks.__)("List of: %1$s"),t.name),onFocusVisible:()=>{!n&&t.elements.length&&i(gF(o,t.elements[0].value))},render:(0,ot.jsx)(Pn.Composite.Typeahead,{}),children:t.elements.map(u=>(0,ot.jsxs)(Pn.Composite.Hover,{render:(0,ot.jsx)(Pn.Composite.Item,{id:gF(o,u.value),render:(0,ot.jsx)("div",{"aria-label":u.label,role:"option",className:"dataviews-filters__search-widget-listitem"}),onClick:()=>{let c=s?[...(e.filters??[]).map(f=>f.field===t.field?{...f,operator:s.operator||t.operators[0],value:hF(t,s,u.value)}:f)]:[...e.filters??[],{field:t.field,operator:t.operators[0],value:hF(t,s,u.value)}];r({...e,page:1,filters:c})}}),children:[t.singleSelection&&(0,ot.jsx)(wF,{selected:l===u.value}),!t.singleSelection&&(0,ot.jsx)(bF,{selected:l.includes(u.value)}),(0,ot.jsx)("span",{className:"dataviews-filters__search-widget-listitem-value",title:u.label,children:u.label})]},u.value))})}function BX({view:e,filter:t,onChangeView:r}){let[o,n]=(0,fu.useState)(""),i=(0,fu.useDeferredValue)(o),s=e.filters?.find(c=>c.field===t.field),l=zm(t,s),u=(0,fu.useMemo)(()=>{let c=pF(i);return t.elements.filter(f=>pF(f.label).includes(c))},[t.elements,i]);return(0,ot.jsxs)(Vy,{selectedValue:l,setSelectedValue:c=>{let f=s?[...(e.filters??[]).map(m=>m.field===t.field?{...m,operator:s.operator||t.operators[0],value:c}:m)]:[...e.filters??[],{field:t.field,operator:t.operators[0],value:c}];r({...e,page:1,filters:f})},setValue:n,children:[(0,ot.jsxs)("div",{className:"dataviews-filters__search-widget-filter-combobox__wrapper",children:[(0,ot.jsx)(Iy,{render:(0,ot.jsx)(Pn.VisuallyHidden,{children:(0,ks.__)("Search items")}),children:(0,ks.__)("Search items")}),(0,ot.jsx)(Ay,{autoSelect:"always",placeholder:(0,ks.__)("Search"),className:"dataviews-filters__search-widget-filter-combobox__input"}),(0,ot.jsx)("div",{className:"dataviews-filters__search-widget-filter-combobox__icon",children:(0,ot.jsx)(Pn.Icon,{icon:fi})})]}),(0,ot.jsxs)(Bm,{className:"dataviews-filters__search-widget-filter-combobox-list",alwaysVisible:!0,children:[u.map(c=>(0,ot.jsxs)(Mm,{resetValueOnSelect:!1,value:c.value,className:"dataviews-filters__search-widget-listitem",hideOnClick:!1,setValueOnClick:!1,focusOnHover:!0,children:[t.singleSelection&&(0,ot.jsx)(wF,{selected:l===c.value}),!t.singleSelection&&(0,ot.jsx)(bF,{selected:l.includes(c.value)}),(0,ot.jsxs)("span",{className:"dataviews-filters__search-widget-listitem-value",title:c.label,children:[(0,ot.jsx)(Oy,{className:"dataviews-filters__search-widget-filter-combobox-item-value",value:c.label}),!!c.description&&(0,ot.jsx)("span",{className:"dataviews-filters__search-widget-listitem-description",children:c.description})]})]},c.value)),!u.length&&(0,ot.jsx)("p",{children:(0,ks.__)("No results found")})]})]})}function SF(e){let{elements:t,isLoading:r}=Pr({elements:e.filter.elements,getElements:e.filter.getElements});if(r)return(0,ot.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,ot.jsx)(Pn.Spinner,{})});if(t.length===0)return(0,ot.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,ks.__)("No elements found")});let o=t.length>10?BX:xF;return(0,ot.jsx)(o,{...e,filter:{...e.filter,elements:t}})}var _F=a(kg(),1),CF=a(Qe(),1),T2=a(B(),1),TF=a(M(),1);var E2=a(C(),1);function EF({filter:e,view:t,onChangeView:r,fields:o}){let n=t.filters?.find(c=>c.field===e.field),i=zm(e,n),s=(0,T2.useMemo)(()=>{let c=o.find(f=>f.id===e.field);return c&&{...c,isValid:{},getValue:({item:f})=>f[c.id],setValue:({value:f})=>({[c.id]:f})}},[o,e.field]),l=(0,T2.useMemo)(()=>(t.filters??[]).reduce((c,f)=>(c[f.field]=f.value,c),{}),[t.filters]),u=(0,CF.useEvent)(c=>{if(!s||!n)return;let f=s.getValue({item:c});(0,_F.default)(f,i)||r({...t,filters:(t.filters??[]).map(m=>m.field===e.field?{...m,operator:n.operator||e.operators[0],value:f===""?void 0:f}:m)})});return!s||!s.Edit||!n?null:(0,E2.jsx)(TF.Flex,{className:"dataviews-filters__user-input-widget",gap:2.5,direction:"column",children:(0,E2.jsx)(s.Edit,{hideLabelFromVision:!0,data:l,field:s,operator:n.operator,onChange:u})})}var jX=Math.pow(10,8)*24*60*60*1e3,TAe=-jX,Dy=6048e5,PF=864e5;var zX=3600;var AF=zX*24,EAe=AF*7,GX=AF*365.2425,HX=GX/12,PAe=HX*3,P2=Symbol.for("constructDateFrom");function gr(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&P2 in e?e[P2](t):e instanceof Date?new e.constructor(t):new Date(t)}function ht(e,t){return gr(t||e,e)}function Ly(e,t,r){let o=ht(e,r?.in);return isNaN(t)?gr(r?.in||e,NaN):(t&&o.setDate(o.getDate()+t),o)}function My(e,t,r){let o=ht(e,r?.in);if(isNaN(t))return gr(r?.in||e,NaN);if(!t)return o;let n=o.getDate(),i=gr(r?.in||e,o.getTime());i.setMonth(o.getMonth()+t+1,0);let s=i.getDate();return n>=s?i:(o.setFullYear(i.getFullYear(),i.getMonth(),n),o)}var UX={};function Ka(){return UX}function Rs(e,t){let r=Ka(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=ht(e,t?.in),i=n.getDay(),s=(i<o?7:0)+i-o;return n.setDate(n.getDate()-s),n.setHours(0,0,0,0),n}function du(e,t){return Rs(e,{...t,weekStartsOn:1})}function By(e,t){let r=ht(e,t?.in),o=r.getFullYear(),n=gr(r,0);n.setFullYear(o+1,0,4),n.setHours(0,0,0,0);let i=du(n),s=gr(r,0);s.setFullYear(o,0,4),s.setHours(0,0,0,0);let l=du(s);return r.getTime()>=i.getTime()?o+1:r.getTime()>=l.getTime()?o:o-1}function A2(e){let t=ht(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function kF(e,...t){let r=gr.bind(null,e||t.find(o=>typeof o=="object"));return t.map(r)}function k2(e,t){let r=ht(e,t?.in);return r.setHours(0,0,0,0),r}function RF(e,t,r){let[o,n]=kF(r?.in,e,t),i=k2(o),s=k2(n),l=+i-A2(i),u=+s-A2(s);return Math.round((l-u)/PF)}function OF(e,t){let r=By(e,t),o=gr(t?.in||e,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),du(o)}function IF(e,t,r){return Ly(e,t*7,r)}function FF(e,t,r){return My(e,t*12,r)}function VF(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function tf(e){return!(!VF(e)&&typeof e!="number"||isNaN(+ht(e)))}function NF(e,t){let r=ht(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function jy(e,t){let r=ht(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}var WX={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},DF=(e,t,r)=>{let o,n=WX[e];return typeof n=="string"?o=n:t===1?o=n.one:o=n.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+o:o+" ago":o};function zy(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var qX={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},YX={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ZX={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},LF={date:zy({formats:qX,defaultWidth:"full"}),time:zy({formats:YX,defaultWidth:"full"}),dateTime:zy({formats:ZX,defaultWidth:"full"})};var KX={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},MF=(e,t,r,o)=>KX[e];function rf(e){return(t,r)=>{let o=r?.context?String(r.context):"standalone",n;if(o==="formatting"&&e.formattingValues){let s=e.defaultFormattingWidth||e.defaultWidth,l=r?.width?String(r.width):s;n=e.formattingValues[l]||e.formattingValues[s]}else{let s=e.defaultWidth,l=r?.width?String(r.width):e.defaultWidth;n=e.values[l]||e.values[s]}let i=e.argumentCallback?e.argumentCallback(t):t;return n[i]}}var XX={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},QX={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},JX={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},$X={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eQ={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},tQ={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},rQ=(e,t)=>{let r=Number(e),o=r%100;if(o>20||o<10)switch(o%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},BF={ordinalNumber:rQ,era:rf({values:XX,defaultWidth:"wide"}),quarter:rf({values:QX,defaultWidth:"wide",argumentCallback:e=>e-1}),month:rf({values:JX,defaultWidth:"wide"}),day:rf({values:$X,defaultWidth:"wide"}),dayPeriod:rf({values:eQ,defaultWidth:"wide",formattingValues:tQ,defaultFormattingWidth:"wide"})};function of(e){return(t,r={})=>{let o=r.width,n=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],i=t.match(n);if(!i)return null;let s=i[0],l=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?nQ(l,m=>m.test(s)):oQ(l,m=>m.test(s)),c;c=e.valueCallback?e.valueCallback(u):u,c=r.valueCallback?r.valueCallback(c):c;let f=t.slice(s.length);return{value:c,rest:f}}}function oQ(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function nQ(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function jF(e){return(t,r={})=>{let o=t.match(e.matchPattern);if(!o)return null;let n=o[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=r.valueCallback?r.valueCallback(s):s;let l=t.slice(n.length);return{value:s,rest:l}}}var iQ=/^(\d+)(th|st|nd|rd)?/i,sQ=/\d+/i,aQ={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},lQ={any:[/^b/i,/^(a|c)/i]},uQ={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},cQ={any:[/1/i,/2/i,/3/i,/4/i]},fQ={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},dQ={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},mQ={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},pQ={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},hQ={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},gQ={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},zF={ordinalNumber:jF({matchPattern:iQ,parsePattern:sQ,valueCallback:e=>parseInt(e,10)}),era:of({matchPatterns:aQ,defaultMatchWidth:"wide",parsePatterns:lQ,defaultParseWidth:"any"}),quarter:of({matchPatterns:uQ,defaultMatchWidth:"wide",parsePatterns:cQ,defaultParseWidth:"any",valueCallback:e=>e+1}),month:of({matchPatterns:fQ,defaultMatchWidth:"wide",parsePatterns:dQ,defaultParseWidth:"any"}),day:of({matchPatterns:mQ,defaultMatchWidth:"wide",parsePatterns:pQ,defaultParseWidth:"any"}),dayPeriod:of({matchPatterns:hQ,defaultMatchWidth:"any",parsePatterns:gQ,defaultParseWidth:"any"})};var R2={code:"en-US",formatDistance:DF,formatLong:LF,formatRelative:MF,localize:BF,match:zF,options:{weekStartsOn:0,firstWeekContainsDate:1}};function GF(e,t){let r=ht(e,t?.in);return RF(r,jy(r))+1}function HF(e,t){let r=ht(e,t?.in),o=+du(r)-+OF(r);return Math.round(o/Dy)+1}function Gy(e,t){let r=ht(e,t?.in),o=r.getFullYear(),n=Ka(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=gr(t?.in||e,0);s.setFullYear(o+1,0,i),s.setHours(0,0,0,0);let l=Rs(s,t),u=gr(t?.in||e,0);u.setFullYear(o,0,i),u.setHours(0,0,0,0);let c=Rs(u,t);return+r>=+l?o+1:+r>=+c?o:o-1}function UF(e,t){let r=Ka(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=Gy(e,t),i=gr(t?.in||e,0);return i.setFullYear(n,0,o),i.setHours(0,0,0,0),Rs(i,t)}function WF(e,t){let r=ht(e,t?.in),o=+Rs(r,t)-+UF(r,t);return Math.round(o/Dy)+1}function lt(e,t){let r=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return r+o}var Os={y(e,t){let r=e.getFullYear(),o=r>0?r:1-r;return lt(t==="yy"?o%100:o,t.length)},M(e,t){let r=e.getMonth();return t==="M"?String(r+1):lt(r+1,2)},d(e,t){return lt(e.getDate(),t.length)},a(e,t){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return r==="am"?"a.m.":"p.m."}},h(e,t){return lt(e.getHours()%12||12,t.length)},H(e,t){return lt(e.getHours(),t.length)},m(e,t){return lt(e.getMinutes(),t.length)},s(e,t){return lt(e.getSeconds(),t.length)},S(e,t){let r=t.length,o=e.getMilliseconds(),n=Math.trunc(o*Math.pow(10,r-3));return lt(n,t.length)}};var nf={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},O2={G:function(e,t,r){let o=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(o,{width:"abbreviated"});case"GGGGG":return r.era(o,{width:"narrow"});default:return r.era(o,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){let o=e.getFullYear(),n=o>0?o:1-o;return r.ordinalNumber(n,{unit:"year"})}return Os.y(e,t)},Y:function(e,t,r,o){let n=Gy(e,o),i=n>0?n:1-n;if(t==="YY"){let s=i%100;return lt(s,2)}return t==="Yo"?r.ordinalNumber(i,{unit:"year"}):lt(i,t.length)},R:function(e,t){let r=By(e);return lt(r,t.length)},u:function(e,t){let r=e.getFullYear();return lt(r,t.length)},Q:function(e,t,r){let o=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return lt(o,2);case"Qo":return r.ordinalNumber(o,{unit:"quarter"});case"QQQ":return r.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(o,{width:"narrow",context:"formatting"});default:return r.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,r){let o=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return lt(o,2);case"qo":return r.ordinalNumber(o,{unit:"quarter"});case"qqq":return r.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(o,{width:"narrow",context:"standalone"});default:return r.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,r){let o=e.getMonth();switch(t){case"M":case"MM":return Os.M(e,t);case"Mo":return r.ordinalNumber(o+1,{unit:"month"});case"MMM":return r.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(o,{width:"narrow",context:"formatting"});default:return r.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,r){let o=e.getMonth();switch(t){case"L":return String(o+1);case"LL":return lt(o+1,2);case"Lo":return r.ordinalNumber(o+1,{unit:"month"});case"LLL":return r.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(o,{width:"narrow",context:"standalone"});default:return r.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,r,o){let n=WF(e,o);return t==="wo"?r.ordinalNumber(n,{unit:"week"}):lt(n,t.length)},I:function(e,t,r){let o=HF(e);return t==="Io"?r.ordinalNumber(o,{unit:"week"}):lt(o,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Os.d(e,t)},D:function(e,t,r){let o=GF(e);return t==="Do"?r.ordinalNumber(o,{unit:"dayOfYear"}):lt(o,t.length)},E:function(e,t,r){let o=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,r,o){let n=e.getDay(),i=(n-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return lt(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,r,o){let n=e.getDay(),i=(n-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return lt(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(n,{width:"narrow",context:"standalone"});case"cccccc":return r.day(n,{width:"short",context:"standalone"});default:return r.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,r){let o=e.getDay(),n=o===0?7:o;switch(t){case"i":return String(n);case"ii":return lt(n,t.length);case"io":return r.ordinalNumber(n,{unit:"day"});case"iii":return r.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,r){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){let o=e.getHours(),n;switch(o===12?n=nf.noon:o===0?n=nf.midnight:n=o/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){let o=e.getHours(),n;switch(o>=17?n=nf.evening:o>=12?n=nf.afternoon:o>=4?n=nf.morning:n=nf.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let o=e.getHours()%12;return o===0&&(o=12),r.ordinalNumber(o,{unit:"hour"})}return Os.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Os.H(e,t)},K:function(e,t,r){let o=e.getHours()%12;return t==="Ko"?r.ordinalNumber(o,{unit:"hour"}):lt(o,t.length)},k:function(e,t,r){let o=e.getHours();return o===0&&(o=24),t==="ko"?r.ordinalNumber(o,{unit:"hour"}):lt(o,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Os.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Os.s(e,t)},S:function(e,t){return Os.S(e,t)},X:function(e,t,r){let o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return YF(o);case"XXXX":case"XX":return mu(o);default:return mu(o,":")}},x:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"x":return YF(o);case"xxxx":case"xx":return mu(o);default:return mu(o,":")}},O:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+qF(o,":");default:return"GMT"+mu(o,":")}},z:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+qF(o,":");default:return"GMT"+mu(o,":")}},t:function(e,t,r){let o=Math.trunc(+e/1e3);return lt(o,t.length)},T:function(e,t,r){return lt(+e,t.length)}};function qF(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=Math.trunc(o/60),i=o%60;return i===0?r+String(n):r+String(n)+t+lt(i,2)}function YF(e,t){return e%60===0?(e>0?"-":"+")+lt(Math.abs(e)/60,2):mu(e,t)}function mu(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=lt(Math.trunc(o/60),2),i=lt(o%60,2);return r+n+t+i}var ZF=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},KF=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},vQ=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],o=r[1],n=r[2];if(!n)return ZF(e,t);let i;switch(o){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",ZF(o,t)).replace("{{time}}",KF(n,t))},XF={p:KF,P:vQ};var yQ=/^D+$/,bQ=/^Y+$/,wQ=["D","DD","YY","YYYY"];function QF(e){return yQ.test(e)}function JF(e){return bQ.test(e)}function $F(e,t,r){let o=xQ(e,t,r);if(console.warn(o),wQ.includes(e))throw new RangeError(o)}function xQ(e,t,r){let o=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${o} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var SQ=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_Q=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,CQ=/^'([^]*?)'?$/,TQ=/''/g,EQ=/[a-zA-Z]/;function I2(e,t,r){let o=Ka(),n=r?.locale??o.locale??R2,i=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,l=ht(e,r?.in);if(!tf(l))throw new RangeError("Invalid time value");let u=t.match(_Q).map(f=>{let m=f[0];if(m==="p"||m==="P"){let d=XF[m];return d(f,n.formatLong)}return f}).join("").match(SQ).map(f=>{if(f==="''")return{isToken:!1,value:"'"};let m=f[0];if(m==="'")return{isToken:!1,value:PQ(f)};if(O2[m])return{isToken:!0,value:f};if(m.match(EQ))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:f}});n.localize.preprocessor&&(u=n.localize.preprocessor(l,u));let c={firstWeekContainsDate:i,weekStartsOn:s,locale:n};return u.map(f=>{if(!f.isToken)return f.value;let m=f.value;(!r?.useAdditionalWeekYearTokens&&JF(m)||!r?.useAdditionalDayOfYearTokens&&QF(m))&&$F(m,t,String(e));let d=O2[m[0]];return d(l,m,n.localize,c)}).join("")}function PQ(e){let t=e.match(CQ);return t?t[1].replace(TQ,"'"):e}function pu(e,t,r){return Ly(e,-t,r)}function Hy(e,t,r){return My(e,-t,r)}function eV(e,t,r){return IF(e,-t,r)}function Uy(e,t,r){return FF(e,-t,r)}var ge=a(j(),1),Jt=a(B(),1),mo=a(ba(),1);var F2=a(C(),1),or={Name:(0,F2.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,F2.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};function tV(e,t){switch(t){case"days":return pu(new Date,e);case"weeks":return eV(new Date,e);case"months":return Hy(new Date,e);case"years":return Uy(new Date,e);default:return new Date}}var rV={label:(0,ge.__)("Is none of"),filterText:(e,t)=>(0,Jt.createInterpolateElement)((0,ge.sprintf)((0,ge.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),or),filter:((e,t,r)=>{if(!r?.length)return!0;let o=t.getValue({item:e});return Array.isArray(o)?!r.some(n=>o.includes(n)):typeof o=="string"?!r.includes(o):!1}),selection:"multi"},Wy=[{name:Vt,label:(0,ge.__)("Includes"),filterText:(e,t)=>(0,Jt.createInterpolateElement)((0,ge.sprintf)((0,ge.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),or),filter(e,t,r){if(!r?.length)return!0;let o=t.getValue({item:e});return Array.isArray(o)?r.some(n=>o.includes(n)):typeof o=="string"?r.includes(o):!1},selection:"multi"},{name:Nt,...rV},{name:Wr,label:(0,ge.__)("Includes all"),filterText:(e,t)=>(0,Jt.createInterpolateElement)((0,ge.sprintf)((0,ge.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),or),filter(e,t,r){return r?.length?r.every(o=>t.getValue({item:e})?.includes(o)):!0},selection:"multi"},{name:_r,...rV},{name:ao,label:(0,ge.__)("Between (inc)"),filterText:(e,t)=>(0,Jt.createInterpolateElement)((0,ge.sprintf)((0,ge.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"),e.name,t[0].label[0],t[0].label[1]),or),filter(e,t,r){if(!Array.isArray(r)||r.length!==2||r[0]===void 0||r[1]===void 0)return!0;let o=t.getValue({item:e});return typeof o=="number"||o instanceof Date||typeof o=="string"?o>=r[0]&&o<=r[1]:!1},selection:"custom"},{name:lo,label:(0,ge.__)("In the past"),filterText:(e,t)=>(0,Jt.createInterpolateElement)((0,ge.sprintf)((0,ge.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),or),filter(e,t,r){if(r?.value===void 0||r?.unit===void 0)return!0;let o=tV(r.value,r.unit),n=(0,mo.getDate)(t.getValue({item:e}));return n>=o&&n<=new Date},selection:"custom"},{name:Lo,label:(0,ge.__)("Over"),filterText:(e,t)=>(0,Jt.createInterpolateElement)((0,ge.sprintf)((0,ge.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),or),filter(e,t,r){if(r?.value===void 0||r?.unit===void 0)return!0;let o=tV(r.value,r.unit);return(0,mo.getDate)(t.getValue({item:e}))<o},selection:"custom"},{name:Ut,label:(0,ge.__)("Is"),filterText:(e,t)=>(0,Jt.createInterpolateElement)((0,ge.sprintf)((0,ge.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),or),filter(e,t,r){return r===t.getValue({item:e})||r===void 0},selection:"single"},{name:Wt,label:(0,ge.__)("Is not"),filterText:(e,t)=>(0,Jt.createInterpolateElement)((0,ge.sprintf)((0,ge.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),or),filter(e,t,r){return r!==t.getValue({item:e})},selection:"single"},{name:Aa,label:(0,ge.__)("Less than"),filterText:(e,t)=>(0,Jt.createInterpolateElement)((0,ge.sprintf)((0,ge.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),e.name,t[0].label),or),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})<r},selection:"single"},{name:ka,label:(0,ge.__)("Greater than"),filterText:(e,t)=>(0,Jt.createInterpolateElement)((0,ge.sprintf)((0,ge.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),e.name,t[0].label),or),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})>r},selection:"single"},{name:Ra,label:(0,ge.__)("Less than or equal"),filterText:(e,t)=>(0,Jt.createInterpolateElement)((0,ge.sprintf)((0,ge.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),or),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})<=r},selection:"single"},{name:Oa,label:(0,ge.__)("Greater than or equal"),filterText:(e,t)=>(0,Jt.createInterpolateElement)((0,ge.sprintf)((0,ge.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),or),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})>=r},selection:"single"},{name:Ia,label:(0,ge.__)("Before"),filterText:(e,t)=>(0,Jt.createInterpolateElement)((0,ge.sprintf)((0,ge.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),e.name,t[0].label),or),filter(e,t,r){if(r===void 0)return!0;let o=(0,mo.getDate)(r);return(0,mo.getDate)(t.getValue({item:e}))<o},selection:"single"},{name:Fa,label:(0,ge.__)("After"),filterText:(e,t)=>(0,Jt.createInterpolateElement)((0,ge.sprintf)((0,ge.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),e.name,t[0].label),or),filter(e,t,r){if(r===void 0)return!0;let o=(0,mo.getDate)(r);return(0,mo.getDate)(t.getValue({item:e}))>o},selection:"single"},{name:Va,label:(0,ge.__)("Before (inc)"),filterText:(e,t)=>(0,Jt.createInterpolateElement)((0,ge.sprintf)((0,ge.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),e.name,t[0].label),or),filter(e,t,r){if(r===void 0)return!0;let o=(0,mo.getDate)(r);return(0,mo.getDate)(t.getValue({item:e}))<=o},selection:"single"},{name:Na,label:(0,ge.__)("After (inc)"),filterText:(e,t)=>(0,Jt.createInterpolateElement)((0,ge.sprintf)((0,ge.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),e.name,t[0].label),or),filter(e,t,r){if(r===void 0)return!0;let o=(0,mo.getDate)(r);return(0,mo.getDate)(t.getValue({item:e}))>=o},selection:"single"},{name:Ei,label:(0,ge.__)("Contains"),filterText:(e,t)=>(0,Jt.createInterpolateElement)((0,ge.sprintf)((0,ge.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),e.name,t[0].label),or),filter(e,t,r){if(r===void 0)return!0;let o=t.getValue({item:e});return typeof o=="string"&&r&&o.toLowerCase().includes(String(r).toLowerCase())},selection:"single"},{name:Pi,label:(0,ge.__)("Doesn't contain"),filterText:(e,t)=>(0,Jt.createInterpolateElement)((0,ge.sprintf)((0,ge.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),e.name,t[0].label),or),filter(e,t,r){if(r===void 0)return!0;let o=t.getValue({item:e});return typeof o=="string"&&r&&!o.toLowerCase().includes(String(r).toLowerCase())},selection:"single"},{name:Ai,label:(0,ge.__)("Starts with"),filterText:(e,t)=>(0,Jt.createInterpolateElement)((0,ge.sprintf)((0,ge.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),e.name,t[0].label),or),filter(e,t,r){if(r===void 0)return!0;let o=t.getValue({item:e});return typeof o=="string"&&r&&o.toLowerCase().startsWith(String(r).toLowerCase())},selection:"single"},{name:Da,label:(0,ge.__)("On"),filterText:(e,t)=>(0,Jt.createInterpolateElement)((0,ge.sprintf)((0,ge.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),or),filter(e,t,r){if(r===void 0)return!0;let o=(0,mo.getDate)(r),n=(0,mo.getDate)(t.getValue({item:e}));return o.getTime()===n.getTime()},selection:"single"},{name:La,label:(0,ge.__)("Not on"),filterText:(e,t)=>(0,Jt.createInterpolateElement)((0,ge.sprintf)((0,ge.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),or),filter(e,t,r){if(r===void 0)return!0;let o=(0,mo.getDate)(r),n=(0,mo.getDate)(t.getValue({item:e}));return o.getTime()!==n.getTime()},selection:"single"}],hu=e=>Wy.find(t=>t.name===e),oV=()=>Wy.map(e=>e.name),nV=e=>Wy.filter(t=>t.selection==="single").some(t=>t.name===e),iV=e=>Wy.some(t=>t.name===e);var Nr=a(C(),1),AQ="Enter",kQ=" ",RQ=({activeElements:e,filterInView:t,filter:r})=>{if(e===void 0||e.length===0)return r.name;let o=hu(t?.operator);return o!==void 0?o.filterText(r,e):(0,Is.sprintf)((0,Is.__)("Unknown status for %1$s"),r.name)};function OQ({filter:e,view:t,onChangeView:r}){let o=e.operators?.map(s=>({value:s,label:hu(s)?.label||s})),n=t.filters?.find(s=>s.field===e.field),i=n?.operator||e.operators[0];return o.length>1&&(0,Nr.jsxs)(Q,{direction:"row",gap:"sm",justify:"flex-start",className:"dataviews-filters__summary-operators-container",align:"center",children:[(0,Nr.jsx)(Qn.FlexItem,{className:"dataviews-filters__summary-operators-filter-name",children:e.name}),(0,Nr.jsx)(Qn.SelectControl,{className:"dataviews-filters__summary-operators-filter-select",label:(0,Is.__)("Conditions"),value:i,options:o,onChange:s=>{let l=s,u=n?.operator,c=n?[...(t.filters??[]).map(f=>{if(f.field===e.field){let m=hu(u)?.selection,d=hu(l)?.selection,h=m!==d||[m,d].includes("custom");return{...f,value:h?void 0:f.value,operator:l}}return f})]:[...t.filters??[],{field:e.field,operator:l,value:void 0}];r({...t,page:1,filters:c})},size:"small",variant:"minimal",hideLabelFromVision:!0})]})}function sV({addFilterRef:e,openedFilter:t,fields:r,...o}){let n=(0,qy.useRef)(null),{filter:i,view:s,onChangeView:l}=o,u=s.filters?.find(v=>v.field===i.field),c=[],f=(0,qy.useMemo)(()=>{let v=r.find(b=>b.id===i.field);return v&&{...v,getValue:({item:b})=>b[v.id]}},[r,i.field]),{elements:m}=Pr({elements:i.elements,getElements:i.getElements});if(m.length>0)c=m.filter(v=>i.singleSelection?v.value===u?.value:u?.value?.includes(v.value));else if(Array.isArray(u?.value)){let v=u.value.map(b=>f?.getValueFormatted({item:{[f.id]:b},field:f})||String(b));c=[{value:u.value,label:v}]}else if(typeof u?.value=="object")c=[{value:u.value,label:u.value}];else if(u?.value!==void 0){let v=f!==void 0?f.getValueFormatted({item:{[f.id]:u.value},field:f}):String(u.value);c=[{value:u.value,label:v}]}let d=i.isPrimary,h=u?.isLocked,g=!h&&u?.value!==void 0,y=!h&&(!d||g);return(0,Nr.jsx)(Qn.Dropdown,{defaultOpen:t===i.field,contentClassName:"dataviews-filters__summary-popover",popoverProps:{placement:"bottom-start",role:"dialog"},onClose:()=>{n.current?.focus()},renderToggle:({isOpen:v,onToggle:b})=>(0,Nr.jsxs)("div",{className:"dataviews-filters__summary-chip-container",children:[(0,Nr.jsx)(Qn.Tooltip,{text:(0,Is.sprintf)((0,Is.__)("Filter by: %1$s"),i.name.toLowerCase()),placement:"top",children:(0,Nr.jsx)("div",{className:Z("dataviews-filters__summary-chip",{"has-reset":y,"has-values":g,"is-not-clickable":h}),role:"button",tabIndex:h?-1:0,onClick:()=>{h||b()},onKeyDown:w=>{!h&&[AQ,kQ].includes(w.key)&&(b(),w.preventDefault())},"aria-disabled":h,"aria-pressed":v,"aria-expanded":v,ref:n,children:(0,Nr.jsx)(RQ,{activeElements:c,filterInView:u,filter:i})})}),y&&(0,Nr.jsx)(Qn.Tooltip,{text:d?(0,Is.__)("Reset"):(0,Is.__)("Remove"),placement:"top",children:(0,Nr.jsx)("button",{className:Z("dataviews-filters__summary-chip-remove",{"has-values":g}),onClick:()=>{l({...s,page:1,filters:s.filters?.filter(w=>w.field!==i.field)}),d?n.current?.focus():e.current?.focus()},children:(0,Nr.jsx)(Qn.Icon,{icon:wl})})})]}),renderContent:()=>(0,Nr.jsxs)(Q,{direction:"column",justify:"flex-start",children:[(0,Nr.jsx)(OQ,{...o}),o.filter.hasElements?(0,Nr.jsx)(SF,{...o,filter:{...o.filter,elements:m}}):(0,Nr.jsx)(EF,{...o,fields:r})]})})}var Yy=a(M(),1),aV=a(j(),1),lV=a(B(),1);var Fs=a(C(),1),{Menu:Hm}=Me(Yy.privateApis);function V2({filters:e,view:t,onChangeView:r,setOpenedFilter:o,triggerProps:n}){let i=e.filter(s=>!s.isVisible);return(0,Fs.jsxs)(Hm,{children:[(0,Fs.jsx)(Hm.TriggerButton,{...n}),(0,Fs.jsx)(Hm.Popover,{children:i.map(s=>(0,Fs.jsx)(Hm.Item,{onClick:()=>{o(s.field),r({...t,page:1,filters:[...t.filters||[],{field:s.field,value:void 0,operator:s.operators[0]}]})},children:(0,Fs.jsx)(Hm.ItemLabel,{children:s.name})},s.field))})]})}function IQ({filters:e,view:t,onChangeView:r,setOpenedFilter:o},n){if(!e.length||e.every(({isPrimary:s})=>s))return null;let i=e.filter(s=>!s.isVisible);return(0,Fs.jsx)(V2,{triggerProps:{render:(0,Fs.jsx)(Yy.Button,{accessibleWhenDisabled:!0,size:"compact",className:"dataviews-filters-button",variant:"tertiary",disabled:!i.length,ref:n}),children:(0,aV.__)("Add filter")},filters:e,view:t,onChangeView:r,setOpenedFilter:o})}var uV=(0,lV.forwardRef)(IQ);var cV=a(M(),1),fV=a(j(),1),dV=a(C(),1);function mV({filters:e,view:t,onChangeView:r}){let o=i=>e.some(s=>s.field===i&&s.isPrimary),n=!t.search&&!t.filters?.some(i=>!i.isLocked&&(i.value!==void 0||!o(i.field)));return(0,dV.jsx)(cV.Button,{disabled:n,accessibleWhenDisabled:!0,size:"compact",variant:"tertiary",className:"dataviews-filters__reset-button",onClick:()=>{r({...t,page:1,search:"",filters:t.filters?.filter(i=>!!i.isLocked)||[]})},children:(0,fV.__)("Reset")})}var pV=a(B(),1);function FQ(e,t){return(0,pV.useMemo)(()=>{let r=[];return e.forEach(o=>{if(o.filterBy===!1||!o.hasElements&&!o.Edit)return;let n=o.filterBy.operators,i=!!o.filterBy?.isPrimary,s=t.filters?.some(l=>l.field===o.id&&!!l.isLocked)??!1;r.push({field:o.id,name:o.label,elements:o.elements,getElements:o.getElements,hasElements:o.hasElements,singleSelection:n.some(l=>nV(l)),operators:n,isVisible:s||i||!!t.filters?.some(l=>l.field===o.id&&iV(l.operator)),isPrimary:i,isLocked:s})}),r.sort((o,n)=>o.isLocked&&!n.isLocked?-1:!o.isLocked&&n.isLocked?1:o.isPrimary&&!n.isPrimary?-1:!o.isPrimary&&n.isPrimary?1:o.name.localeCompare(n.name)),r},[e,t])}var Um=FQ;var Wm=a(C(),1);function VQ({className:e}){let{fields:t,view:r,onChangeView:o,openedFilter:n,setOpenedFilter:i}=(0,sf.useContext)(Ce),s=(0,sf.useRef)(null),l=Um(t,r),u=(0,Wm.jsx)(uV,{filters:l,view:r,onChangeView:o,ref:s,setOpenedFilter:i},"add-filter"),c=l.filter(m=>m.isVisible);if(c.length===0)return null;let f=[...c.map(m=>(0,Wm.jsx)(sV,{filter:m,view:r,fields:t,onChangeView:o,addFilterRef:s,openedFilter:n},m.field)),u];return f.push((0,Wm.jsx)(mV,{filters:l,view:r,onChangeView:o},"reset-filters")),(0,Wm.jsx)(Q,{direction:"row",justify:"flex-start",gap:"sm",style:{width:"fit-content"},wrap:"wrap",className:e,children:f})}var qm=(0,sf.memo)(VQ);var Xa=a(B(),1),hV=a(M(),1);var Zy=a(j(),1);var Li=a(C(),1);function NQ(){let{filters:e,view:t,onChangeView:r,setOpenedFilter:o,isShowingFilter:n,setIsShowingFilter:i}=(0,Xa.useContext)(Ce),s=(0,Xa.useRef)(null),l=(0,Xa.useCallback)(h=>{r(h),i(!0)},[r,i]);if(e.length===0)return null;let u=e.some(h=>h.isVisible),c={label:(0,Zy.__)("Add filter"),"aria-expanded":!1,isPressed:!1},f={label:(0,Zy._x)("Filter","verb"),"aria-expanded":n,isPressed:n,onClick:()=>{n||o(null),i(!n)}},m=e.some(h=>h.isPrimary||h.isLocked),d=(0,Li.jsx)(hV.Button,{ref:s,className:"dataviews-filters__visibility-toggle",size:"compact",icon:Yf,disabled:m,accessibleWhenDisabled:!0,...u?f:c});return(0,Li.jsx)("div",{className:"dataviews-filters__container-visibility-toggle",children:u?(0,Li.jsx)(DQ,{buttonRef:s,filtersCount:t.filters?.length,children:d}):(0,Li.jsx)(V2,{filters:e,view:t,onChangeView:l,setOpenedFilter:o,triggerProps:{render:d}})})}function DQ({buttonRef:e,filtersCount:t,children:r}){return(0,Xa.useEffect)(()=>()=>{e.current?.focus()},[e]),(0,Li.jsxs)(Li.Fragment,{children:[r,!!t&&(0,Li.jsx)("span",{className:"dataviews-filters-toggle__count",children:t})]})}var Ky=NQ;var gV=a(B(),1);var vV=a(C(),1);function LQ(e){let{isShowingFilter:t}=(0,gV.useContext)(Ce);return t?(0,vV.jsx)(qm,{...e}):null}var Xy=LQ;var yV=a(B(),1),bV=a(M(),1),wV=a(j(),1);var af=a(C(),1);function N2({className:e}){let{actions:t=[],data:r,fields:o,getItemId:n,getItemLevel:i,hasInitiallyLoaded:s,isLoading:l,view:u,onChangeView:c,selection:f,onChangeSelection:m,setOpenedFilter:d,onClickItem:h,isItemClickable:g,renderItemLink:y,defaultLayouts:v,empty:b=(0,af.jsx)("p",{children:(0,wV.__)("No results")})}=(0,yV.useContext)(Ce),w=_n(!s,{delay:200});if(!s)return w?(0,af.jsx)("div",{className:"dataviews-loading",children:(0,af.jsx)("p",{children:(0,af.jsx)(bV.Spinner,{})})}):null;let x=Xn.find(T=>T.type===u.type&&v[T.type])?.component;return(0,af.jsx)(x,{className:e,actions:t,data:r,fields:o,getItemId:n,getItemLevel:i,isLoading:l,onChangeView:c,onChangeSelection:m,selection:f,setOpenedFilter:d,onClickItem:h,renderItemLink:y,isItemClickable:g,view:u,empty:b})}var xV=a(B(),1);var lf=a(C(),1),MQ=[];function D2(){let{view:e,paginationInfo:{totalItems:t=0,totalPages:r},data:o,actions:n=MQ,isLoading:i,hasInitiallyLoaded:s,hasInfiniteScrollHandler:l}=(0,xV.useContext)(Ce),u=!!i&&s&&!l&&!!o?.length,c=_n(!!u),f=Lc(n,o)&&[Ic,Xv].includes(e.type);return!u&&(!t||!r||r<=1&&!f)?null:(!!t||u)&&(0,lf.jsx)("div",{className:"dataviews-footer",inert:u?"true":void 0,children:(0,lf.jsxs)(Q,{direction:"row",justify:"end",align:"center",className:Z("dataviews-footer__content",{"is-refreshing":c}),gap:"sm",children:[f&&(0,lf.jsx)(ey,{}),(0,lf.jsx)(g3,{})]})})}var SV=a(j(),1),Jn=a(B(),1),_V=a(M(),1),CV=a(Qe(),1);var TV=a(C(),1),BQ=(0,Jn.memo)(function({label:t}){let{view:r,onChangeView:o}=(0,Jn.useContext)(Ce),[n,i,s]=(0,CV.useDebouncedInput)(r.search);(0,Jn.useEffect)(()=>{i(r.search??"")},[r.search,i]);let l=(0,Jn.useRef)(o),u=(0,Jn.useRef)(r);(0,Jn.useEffect)(()=>{l.current=o,u.current=r},[o,r]),(0,Jn.useEffect)(()=>{s!==u.current?.search&&l.current({...u.current,page:1,search:s})},[s]);let c=t||(0,SV.__)("Search");return(0,TV.jsx)(_V.SearchControl,{className:"dataviews-search",onChange:i,value:n,label:c,placeholder:c,size:"compact"})}),L2=BQ;var nr=a(M(),1),Vs=a(j(),1),$n=a(B(),1);var B2=a(PV(),1),IV=a(Qe(),1);var AV=a(M(),1),M2=a(j(),1),kV=a(B(),1);var RV=a(C(),1);function OV(){let e=(0,kV.useContext)(Ce),{view:t,onChangeView:r}=e,o=t.infiniteScrollEnabled??!1;return e.hasInfiniteScrollHandler?(0,RV.jsx)(AV.ToggleControl,{label:(0,M2.__)("Enable infinite scroll"),help:(0,M2.__)("Automatically load more content as you scroll, instead of showing pagination links."),checked:o,onChange:n=>{r({...t,infiniteScrollEnabled:n})}}):null}var Ze=a(C(),1),{Menu:Ym}=Me(nr.privateApis),jQ={className:"dataviews-config__popover",placement:"bottom-end",offset:9};function j2(){let{view:e,onChangeView:t,defaultLayouts:r}=(0,$n.useContext)(Ce),o=Object.keys(r);if(o.length<=1)return null;let n=Xn.find(i=>e.type===i.type);return(0,Ze.jsxs)(Ym,{children:[(0,Ze.jsx)(Ym.TriggerButton,{render:(0,Ze.jsx)(nr.Button,{size:"compact",icon:n?.icon,label:(0,Vs.__)("Layout")})}),(0,Ze.jsx)(Ym.Popover,{children:o.map(i=>{let s=Xn.find(l=>l.type===i);return s?(0,Ze.jsx)(Ym.RadioItem,{value:i,name:"view-actions-available-view",checked:i===e.type,hideOnClick:!0,onChange:l=>{switch(l.target.value){case"list":case"grid":case"table":case"pickerGrid":case"pickerTable":case"activity":let u={...e};return"layout"in u&&delete u.layout,t({...u,type:l.target.value,...r[l.target.value]})}(0,B2.default)("Invalid dataview")},children:(0,Ze.jsx)(Ym.ItemLabel,{children:s.label})},i):null})})]})}function zQ(){let{view:e,fields:t,onChangeView:r}=(0,$n.useContext)(Ce),o=(0,$n.useMemo)(()=>t.filter(i=>i.enableSorting!==!1).map(i=>({label:i.label,value:i.id})),[t]);return(0,Ze.jsx)(nr.SelectControl,{__next40pxDefaultSize:!0,label:(0,Vs.__)("Sort by"),value:e.sort?.field,options:o,onChange:n=>{r({...e,sort:{direction:e?.sort?.direction||"desc",field:n},showLevels:!1})}})}function GQ(){let{view:e,fields:t,onChangeView:r}=(0,$n.useContext)(Ce);if(t.filter(i=>i.enableSorting!==!1).length===0)return null;let n=e.sort?.direction;return!n&&e.sort?.field&&(n="desc"),(0,Ze.jsx)(nr.__experimentalToggleGroupControl,{className:"dataviews-view-config__sort-direction",__next40pxDefaultSize:!0,isBlock:!0,label:(0,Vs.__)("Order"),value:n,onChange:i=>{if(i==="asc"||i==="desc"){r({...e,sort:{direction:i,field:e.sort?.field||t.find(s=>s.enableSorting!==!1)?.id||""},showLevels:!1});return}(0,B2.default)("Invalid direction")},children:Yv.map(i=>(0,Ze.jsx)(nr.__experimentalToggleGroupControlOptionIcon,{value:i,icon:P6[i],label:Kv[i]},i))})}function HQ(){let{view:e,config:t,onChangeView:r}=(0,$n.useContext)(Ce),{infiniteScrollEnabled:o}=e;return!t||!t.perPageSizes||t.perPageSizes.length<2||t.perPageSizes.length>6||o?null:(0,Ze.jsx)(nr.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,Vs.__)("Items per page"),value:e.perPage||10,disabled:!e?.sort?.field,onChange:n=>{let i=typeof n=="number"||n===void 0?n:parseInt(n,10);r({...e,perPage:i,page:1})},children:t.perPageSizes.map(n=>(0,Ze.jsx)(nr.__experimentalToggleGroupControlOption,{value:n,label:n.toString()},n))})}function UQ(){let{onReset:e}=(0,$n.useContext)(Ce);return e===void 0?null:(0,Ze.jsx)(nr.Button,{variant:"tertiary",size:"compact",disabled:e===!1,accessibleWhenDisabled:!0,className:"dataviews-view-config__reset-button",onClick:()=>{typeof e=="function"&&e()},children:(0,Vs.__)("Reset view")})}function z2(){let{view:e,onReset:t}=(0,$n.useContext)(Ce),r=(0,IV.useInstanceId)(FV,"dataviews-view-config-dropdown"),o=Xn.find(i=>i.type===e.type),n=typeof t=="function";return(0,Ze.jsx)(nr.Dropdown,{expandOnMobile:!0,popoverProps:{...jQ,id:r},renderToggle:({onToggle:i,isOpen:s})=>(0,Ze.jsxs)("div",{className:"dataviews-view-config__toggle-wrapper",children:[(0,Ze.jsx)(nr.Button,{size:"compact",icon:E1,label:(0,Vs._x)("View options","View is used as a noun"),onClick:i,"aria-expanded":s?"true":"false","aria-controls":r}),n&&(0,Ze.jsx)("span",{className:"dataviews-view-config__modified-indicator"})]}),renderContent:()=>(0,Ze.jsx)(nr.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"dataviews-config__popover-content-wrapper",children:(0,Ze.jsxs)(Q,{direction:"column",className:"dataviews-view-config",gap:"xl",children:[(0,Ze.jsxs)(Q,{direction:"row",justify:"space-between",align:"center",className:"dataviews-view-config__header",children:[(0,Ze.jsx)(nr.__experimentalHeading,{level:2,className:"dataviews-settings-section__title",children:(0,Vs.__)("Appearance")}),(0,Ze.jsx)(UQ,{})]}),(0,Ze.jsxs)(Q,{direction:"column",gap:"lg",children:[(0,Ze.jsxs)(Q,{direction:"row",gap:"sm",className:"dataviews-view-config__sort-controls",children:[(0,Ze.jsx)(zQ,{}),(0,Ze.jsx)(GQ,{})]}),!!o?.viewConfigOptions&&(0,Ze.jsx)(o.viewConfigOptions,{}),(0,Ze.jsx)(OV,{}),(0,Ze.jsx)(HQ,{}),(0,Ze.jsx)(oy,{})]})]})})})}function FV(){return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(j2,{}),(0,Ze.jsx)(z2,{})]})}var WQ=(0,$n.memo)(FV),VV=WQ;var NV=a(M(),1),DV=a(B(),1);function St(e,t){let r;return e?.required&&t?.required?r=t?.required?.message?t.required:void 0:e?.pattern&&t?.pattern?r=t.pattern:e?.min&&t?.min?r=t.min:e?.max&&t?.max?r=t.max:e?.minLength&&t?.minLength?r=t.minLength:e?.maxLength&&t?.maxLength?r=t.maxLength:e?.elements&&t?.elements?r=t.elements:t?.custom&&(r=t.custom),r}var LV=a(C(),1),{ValidatedCheckboxControl:qQ}=Me(NV.privateApis);function MV({field:e,onChange:t,data:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{getValue:s,setValue:l,label:u,description:c,isValid:f}=e,m=(0,DV.useCallback)(()=>{t(l({item:r,value:!s({item:r})}))},[r,s,t,l]);return(0,LV.jsx)(qQ,{required:!!e.isValid?.required,markWhenOptional:n,customValidity:St(f,i),hidden:o,label:u,help:c,checked:s({item:r}),onChange:m})}var Qy=a(M(),1),BV=a(B(),1);var G2=a(C(),1),{ValidatedComboboxControl:YQ}=Me(Qy.privateApis);function Jy({data:e,field:t,onChange:r,hideLabelFromVision:o,validity:n}){let{label:i,description:s,placeholder:l,getValue:u,setValue:c,isValid:f}=t,m=u({item:e})??"",d=(0,BV.useCallback)(y=>r(c({item:e,value:y??""})),[e,r,c]),{elements:h,isLoading:g}=Pr({elements:t.elements,getElements:t.getElements});return g?(0,G2.jsx)(Qy.Spinner,{}):(0,G2.jsx)(YQ,{required:!!t.isValid?.required,customValidity:St(f,n),label:i,value:m,help:s,placeholder:l,options:h,onChange:d,hideLabelFromVision:o,allowReset:!0,expandOnFocus:!0})}var r0=a(M(),1),An=a(B(),1),t0=a(j(),1),an=a(ba(),1);var cf=a(M(),1),H2=a(B(),1),Mi=a(j(),1);var uf=a(C(),1),ZQ={[lo]:[{value:"days",label:(0,Mi.__)("Days")},{value:"weeks",label:(0,Mi.__)("Weeks")},{value:"months",label:(0,Mi.__)("Months")},{value:"years",label:(0,Mi.__)("Years")}],[Lo]:[{value:"days",label:(0,Mi.__)("Days ago")},{value:"weeks",label:(0,Mi.__)("Weeks ago")},{value:"months",label:(0,Mi.__)("Months ago")},{value:"years",label:(0,Mi.__)("Years ago")}]};function $y({className:e,data:t,field:r,onChange:o,hideLabelFromVision:n,operator:i}){let s=ZQ[i===lo?"inThePast":"over"],{id:l,label:u,getValue:c,setValue:f}=r,m=c({item:t}),{value:d="",unit:h=s[0].value}=m&&typeof m=="object"?m:{},g=(0,H2.useCallback)(v=>o(f({item:t,value:{value:Number(v),unit:h}})),[o,f,t,h]),y=(0,H2.useCallback)(v=>o(f({item:t,value:{value:d,unit:v}})),[o,f,t,d]);return(0,uf.jsx)(cf.BaseControl,{id:l,className:Z(e,"dataviews-controls__relative-date"),label:u,hideLabelFromVision:n,children:(0,uf.jsxs)(Q,{direction:"row",gap:"sm",children:[(0,uf.jsx)(cf.__experimentalNumberControl,{__next40pxDefaultSize:!0,className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:d,onChange:g}),(0,uf.jsx)(cf.SelectControl,{className:"dataviews-controls__relative-date-unit",__next40pxDefaultSize:!0,label:(0,Mi.__)("Unit"),value:h,options:s,onChange:y,hideLabelFromVision:!0})]})})}var jV=a(ba(),1);function e0(e){if(!e)return null;let t=(0,jV.getDate)(e);return t&&tf(t)?t:null}var Qa=a(C(),1),{DateCalendar:KQ,ValidatedInputControl:XQ}=Me(r0.privateApis),QQ=e=>e?(0,an.dateI18n)("Y-m-d\\TH:i",(0,an.getDate)(e)):"";function JQ({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{id:s,label:l,description:u,setValue:c,getValue:f,isValid:m}=t,d=f({item:e}),h=typeof d=="string"?d:void 0,[g,y]=(0,An.useState)(()=>e0(h)||new Date),v=(0,An.useRef)(null),b=(0,An.useRef)(void 0),w=(0,An.useRef)(null),x=(0,An.useCallback)(N=>r(c({item:e,value:N})),[e,r,c]);(0,An.useEffect)(()=>()=>{b.current&&clearTimeout(b.current)},[]);let T=(0,An.useCallback)(N=>{let A;if(N){let S=(0,an.dateI18n)("Y-m-d",N),I;h?I=(0,an.dateI18n)("H:i",(0,an.getDate)(h)):I=(0,an.dateI18n)("H:i",N),A=(0,an.getDate)(`${S}T${I}`).toISOString(),x(A),b.current&&clearTimeout(b.current)}else x(void 0);w.current=v.current&&v.current.ownerDocument.activeElement,b.current=setTimeout(()=>{v.current&&(v.current.focus(),v.current.blur(),x(A),w.current&&w.current instanceof HTMLElement&&w.current.focus())},0)},[x,h]),E=(0,An.useCallback)(N=>{if(N){let A=(0,an.getDate)(N);x(A.toISOString());let S=e0(A.toISOString());S&&y(S)}else x(void 0)},[x]),{format:k}=t,F=k.weekStartsOn??(0,an.getSettings)().l10n.startOfWeek,{timezone:{string:P}}=(0,an.getSettings)(),V=l;return m?.required&&!n&&!o?V=`${l} (${(0,t0.__)("Required")})`:!m?.required&&n&&!o&&(V=`${l} (${(0,t0.__)("Optional")})`),(0,Qa.jsx)(r0.BaseControl,{id:s,label:V,help:u,hideLabelFromVision:o,children:(0,Qa.jsxs)(Q,{direction:"column",gap:"lg",children:[(0,Qa.jsx)(KQ,{style:{width:"100%"},selected:h&&e0(h)||void 0,onSelect:T,month:g,onMonthChange:y,timeZone:P||void 0,weekStartsOn:F}),(0,Qa.jsx)(XQ,{ref:v,__next40pxDefaultSize:!0,required:!!m?.required,customValidity:St(m,i),type:"datetime-local",label:(0,t0.__)("Date time"),hideLabelFromVision:!0,value:QQ(h),onChange:E})]})})}function zV({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:s}){return i===lo||i===Lo?(0,Qa.jsx)($y,{className:"dataviews-controls__datetime",data:e,field:t,onChange:r,hideLabelFromVision:o,operator:i}):(0,Qa.jsx)(JQ,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:s})}var Kr=a(M(),1),pt=a(B(),1),vr=a(j(),1),Zr=a(ba(),1);var _t=a(C(),1),{DateCalendar:$Q,DateRangeCalendar:eJ}=Me(Kr.privateApis),tJ=[{id:"today",label:(0,vr.__)("Today"),getValue:()=>(0,Zr.getDate)(null)},{id:"yesterday",label:(0,vr.__)("Yesterday"),getValue:()=>{let e=(0,Zr.getDate)(null);return pu(e,1)}},{id:"past-week",label:(0,vr.__)("Past week"),getValue:()=>{let e=(0,Zr.getDate)(null);return pu(e,7)}},{id:"past-month",label:(0,vr.__)("Past month"),getValue:()=>{let e=(0,Zr.getDate)(null);return Hy(e,1)}}],rJ=[{id:"last-7-days",label:(0,vr.__)("Last 7 days"),getValue:()=>{let e=(0,Zr.getDate)(null);return[pu(e,7),e]}},{id:"last-30-days",label:(0,vr.__)("Last 30 days"),getValue:()=>{let e=(0,Zr.getDate)(null);return[pu(e,30),e]}},{id:"month-to-date",label:(0,vr.__)("Month to date"),getValue:()=>{let e=(0,Zr.getDate)(null);return[NF(e),e]}},{id:"last-year",label:(0,vr.__)("Last year"),getValue:()=>{let e=(0,Zr.getDate)(null);return[Uy(e,1),e]}},{id:"year-to-date",label:(0,vr.__)("Year to date"),getValue:()=>{let e=(0,Zr.getDate)(null);return[jy(e),e]}}],ff=e=>{if(!e)return null;let t=(0,Zr.getDate)(e);return t&&tf(t)?t:null},U2=e=>e?typeof e=="string"?e:I2(e,"yyyy-MM-dd"):"";function GV({field:e,validity:t,inputRefs:r,isTouched:o,setIsTouched:n,children:i}){let{isValid:s}=e,[l,u]=(0,pt.useState)(void 0),c=(0,pt.useCallback)(()=>{let m=Array.isArray(r)?r:[r];for(let d of m){let h=d.current;if(h&&!h.validity.valid){u({type:"invalid",message:h.validationMessage});return}}u(void 0)},[r]);return(0,pt.useEffect)(()=>{let m=Array.isArray(r)?r:[r],d=t?St(s,t):void 0;for(let h of m){let g=h.current;g&&g.setCustomValidity(d?.type==="invalid"&&d.message?d.message:"")}},[r,s,t]),(0,pt.useEffect)(()=>{let m=Array.isArray(r)?r:[r],d=h=>{h.preventDefault(),n(!0)};for(let h of m)h.current?.addEventListener("invalid",d);return()=>{for(let h of m)h.current?.removeEventListener("invalid",d)}},[r,n]),(0,pt.useEffect)(()=>{if(!o)return;let m=t?St(s,t):void 0;m?u(m):c()},[o,s,t,c]),(0,_t.jsxs)("div",{onBlur:m=>{o||(!m.relatedTarget||!m.currentTarget.contains(m.relatedTarget))&&n(!0)},children:[i,(0,_t.jsx)("div",{"aria-live":"polite",children:l&&(0,_t.jsxs)("p",{className:Z("components-validated-control__indicator",l.type==="invalid"?"is-invalid":void 0),children:[(0,_t.jsx)(Kr.Icon,{className:"components-validated-control__indicator-icon",icon:xl,size:16,fill:"currentColor"}),l.message]})})]})}function oJ({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{id:s,label:l,setValue:u,getValue:c,isValid:f,format:m}=t,[d,h]=(0,pt.useState)(null),g=m.weekStartsOn??(0,Zr.getSettings)().l10n.startOfWeek,y=c({item:e}),v=typeof y=="string"?y:void 0,[b,w]=(0,pt.useState)(()=>ff(v)||new Date),[x,T]=(0,pt.useState)(!1),E=(0,pt.useRef)(null),k=(0,pt.useCallback)(S=>r(u({item:e,value:S})),[e,r,u]),F=(0,pt.useCallback)(S=>{let I=S?I2(S,"yyyy-MM-dd"):void 0;k(I),h(null),T(!0)},[k]),P=(0,pt.useCallback)(S=>{let I=S.getValue(),O=U2(I);w(I),k(O),h(S.id),T(!0)},[k]),V=(0,pt.useCallback)(S=>{if(k(S),S){let I=ff(S);I&&w(I)}h(null),T(!0)},[k]),{timezone:{string:N}}=(0,Zr.getSettings)(),A=l;return f?.required&&!n?A=`${l} (${(0,vr.__)("Required")})`:!f?.required&&n&&(A=`${l} (${(0,vr.__)("Optional")})`),(0,_t.jsx)(GV,{field:t,validity:i,inputRefs:E,isTouched:x,setIsTouched:T,children:(0,_t.jsx)(Kr.BaseControl,{id:s,className:"dataviews-controls__date",label:A,hideLabelFromVision:o,children:(0,_t.jsxs)(Q,{direction:"column",gap:"lg",children:[(0,_t.jsxs)(Q,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[tJ.map(S=>{let I=d===S.id;return(0,_t.jsx)(Kr.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:I,size:"small",onClick:()=>P(S),children:S.label},S.id)}),(0,_t.jsx)(Kr.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!d,size:"small",disabled:!!d,accessibleWhenDisabled:!1,children:(0,vr.__)("Custom")})]}),(0,_t.jsx)(Kr.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:E,type:"date",label:(0,vr.__)("Date"),hideLabelFromVision:!0,value:v,onChange:V,required:!!t.isValid?.required}),(0,_t.jsx)($Q,{style:{width:"100%"},selected:v&&ff(v)||void 0,onSelect:F,month:b,onMonthChange:w,timeZone:N||void 0,weekStartsOn:g})]})})})}function nJ({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{id:s,label:l,getValue:u,setValue:c,format:f}=t,m,d=u({item:e});Array.isArray(d)&&d.length===2&&d.every(O=>typeof O=="string")&&(m=d);let h=f.weekStartsOn??(0,Zr.getSettings)().l10n.startOfWeek,g=(0,pt.useCallback)(O=>{r(c({item:e,value:O}))},[e,r,c]),[y,v]=(0,pt.useState)(null),b=(0,pt.useMemo)(()=>{if(!m)return{from:void 0,to:void 0};let[O,z]=m;return{from:ff(O)||void 0,to:ff(z)||void 0}},[m]),[w,x]=(0,pt.useState)(()=>b.from||new Date),[T,E]=(0,pt.useState)(!1),k=(0,pt.useRef)(null),F=(0,pt.useRef)(null),P=(0,pt.useCallback)((O,z)=>{O&&z?g([U2(O),U2(z)]):!O&&!z&&g(void 0)},[g]),V=(0,pt.useCallback)(O=>{P(O?.from,O?.to),v(null),E(!0)},[P]),N=(0,pt.useCallback)(O=>{let[z,R]=O.getValue();x(z),P(z,R),v(O.id),E(!0)},[P]),A=(0,pt.useCallback)((O,z)=>{let[R,D]=m||[void 0,void 0];if(P(O==="from"?z:R,O==="to"?z:D),z){let ce=ff(z);ce&&x(ce)}v(null),E(!0)},[m,P]),{timezone:S}=(0,Zr.getSettings)(),I=l;return t.isValid?.required&&!n?I=`${l} (${(0,vr.__)("Required")})`:!t.isValid?.required&&n&&(I=`${l} (${(0,vr.__)("Optional")})`),(0,_t.jsx)(GV,{field:t,validity:i,inputRefs:[k,F],isTouched:T,setIsTouched:E,children:(0,_t.jsx)(Kr.BaseControl,{id:s,className:"dataviews-controls__date",label:I,hideLabelFromVision:o,children:(0,_t.jsxs)(Q,{direction:"column",gap:"lg",children:[(0,_t.jsxs)(Q,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[rJ.map(O=>{let z=y===O.id;return(0,_t.jsx)(Kr.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:z,size:"small",onClick:()=>N(O),children:O.label},O.id)}),(0,_t.jsx)(Kr.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!y,size:"small",accessibleWhenDisabled:!1,disabled:!!y,children:(0,vr.__)("Custom")})]}),(0,_t.jsxs)(Q,{direction:"row",gap:"sm",justify:"space-between",className:"dataviews-controls__date-range-inputs",children:[(0,_t.jsx)(Kr.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:k,type:"date",label:(0,vr.__)("From"),hideLabelFromVision:!0,value:m?.[0],onChange:O=>A("from",O),required:!!t.isValid?.required}),(0,_t.jsx)(Kr.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:F,type:"date",label:(0,vr.__)("To"),hideLabelFromVision:!0,value:m?.[1],onChange:O=>A("to",O),required:!!t.isValid?.required})]}),(0,_t.jsx)(eJ,{style:{width:"100%"},selected:b,onSelect:V,month:w,onMonthChange:x,timeZone:S.string||void 0,weekStartsOn:h})]})})})}function HV({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:s}){return i===lo||i===Lo?(0,_t.jsx)($y,{className:"dataviews-controls__date",data:e,field:t,onChange:r,hideLabelFromVision:o,operator:i}):i===ao?(0,_t.jsx)(nJ,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:s}):(0,_t.jsx)(oJ,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:s})}var o0=a(M(),1),UV=a(B(),1);var W2=a(C(),1),{ValidatedSelectControl:iJ}=Me(o0.privateApis);function n0({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{type:s,label:l,description:u,getValue:c,setValue:f,isValid:m}=t,d=s==="array",h=c({item:e})??(d?[]:""),g=(0,UV.useCallback)(b=>r(f({item:e,value:b})),[e,r,f]),{elements:y,isLoading:v}=Pr({elements:t.elements,getElements:t.getElements});return v?(0,W2.jsx)(o0.Spinner,{}):(0,W2.jsx)(iJ,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:St(m,i),label:l,value:h,help:u,options:y,onChange:g,__next40pxDefaultSize:!0,hideLabelFromVision:o,multiple:d})}var q2=a(C(),1),sJ=10;function WV(e){let{field:t}=e,{elements:r}=Pr({elements:t.elements,getElements:t.getElements});return r.length>=sJ?(0,q2.jsx)(Jy,{...e}):(0,q2.jsx)(n0,{...e})}var s0=a(M(),1);var qV=a(M(),1),YV=a(B(),1);var ZV=a(C(),1),{ValidatedInputControl:aJ}=Me(qV.privateApis);function Bi({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,type:i,prefix:s,suffix:l,validity:u}){let{label:c,placeholder:f,description:m,getValue:d,setValue:h,isValid:g}=t,y=d({item:e}),v=(0,YV.useCallback)(b=>r(h({item:e,value:b})),[e,h,r]);return(0,ZV.jsx)(aJ,{required:!!g.required,markWhenOptional:n,customValidity:St(g,u),label:c,placeholder:f,value:y??"",help:m,onChange:v,hideLabelFromVision:o,type:i,prefix:s,suffix:l,pattern:g.pattern?g.pattern.constraint:void 0,minLength:g.minLength?g.minLength.constraint:void 0,maxLength:g.maxLength?g.maxLength.constraint:void 0,__next40pxDefaultSize:!0})}var i0=a(C(),1);function KV({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,i0.jsx)(Bi,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"email",prefix:(0,i0.jsx)(s0.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,i0.jsx)(s0.Icon,{icon:N1})})})}var l0=a(M(),1);var a0=a(C(),1);function XV({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,a0.jsx)(Bi,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"tel",prefix:(0,a0.jsx)(l0.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,a0.jsx)(l0.Icon,{icon:$1})})})}var c0=a(M(),1);var u0=a(C(),1);function QV({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,u0.jsx)(Bi,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"url",prefix:(0,u0.jsx)(c0.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,u0.jsx)(c0.Icon,{icon:X1})})})}var Ns=a(M(),1),Zm=a(B(),1),f0=a(j(),1);var Ja=a(C(),1),{ValidatedNumberControl:lJ}=Me(Ns.privateApis);function JV(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function uJ({value:e,onChange:t,hideLabelFromVision:r,step:o}){let[n="",i=""]=e,s=(0,Zm.useCallback)(u=>t([JV(u),i]),[t,i]),l=(0,Zm.useCallback)(u=>t([n,JV(u)]),[t,n]);return(0,Ja.jsx)(Ns.BaseControl,{help:(0,f0.__)("The max. value must be greater than the min. value."),children:(0,Ja.jsxs)(Ns.Flex,{direction:"row",gap:4,children:[(0,Ja.jsx)(Ns.__experimentalNumberControl,{label:(0,f0.__)("Min."),value:n,max:i?Number(i)-o:void 0,onChange:s,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:o}),(0,Ja.jsx)(Ns.__experimentalNumberControl,{label:(0,f0.__)("Max."),value:i,min:n?Number(n)+o:void 0,onChange:l,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:o})]})})}function d0({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:s}){let l=t.format?.decimals??0,u=Math.pow(10,Math.abs(l)*-1),{label:c,description:f,getValue:m,setValue:d,isValid:h}=t,g=m({item:e})??"",y=(0,Zm.useCallback)(b=>{r(d({item:e,value:["",void 0].includes(b)?void 0:Number(b)}))},[e,r,d]),v=(0,Zm.useCallback)(b=>{r(d({item:e,value:b}))},[e,r,d]);if(i===ao){let b=["",""];return Array.isArray(g)&&g.length===2&&g.every(w=>typeof w=="number"||w==="")&&(b=g),(0,Ja.jsx)(uJ,{value:b,onChange:v,hideLabelFromVision:o,step:u})}return(0,Ja.jsx)(lJ,{required:!!h.required,markWhenOptional:n,customValidity:St(h,s),label:c,help:f,value:g,onChange:y,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:u,min:h.min?h.min.constraint:void 0,max:h.max?h.max.constraint:void 0})}var $V=a(C(),1);function eN(e){return(0,$V.jsx)(d0,{...e})}var tN=a(C(),1);function rN(e){return(0,tN.jsx)(d0,{...e})}var m0=a(M(),1),oN=a(B(),1);var Y2=a(C(),1),{ValidatedRadioControl:cJ}=Me(m0.privateApis);function nN({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:s,description:l,getValue:u,setValue:c,isValid:f}=t,{elements:m,isLoading:d}=Pr({elements:t.elements,getElements:t.getElements}),h=u({item:e}),g=(0,oN.useCallback)(y=>r(c({item:e,value:y})),[e,r,c]);return d?(0,Y2.jsx)(m0.Spinner,{}):(0,Y2.jsx)(cJ,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:St(f,i),label:s,help:l,onChange:g,options:m,selected:h,hideLabelFromVision:o})}var Z2=a(B(),1);var iN=a(C(),1);function sN({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,config:i,validity:s}){let{prefix:l,suffix:u}=i||{};return(0,iN.jsx)(Bi,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:s,prefix:l?(0,Z2.createElement)(l):void 0,suffix:u?(0,Z2.createElement)(u):void 0})}var aN=a(M(),1),lN=a(B(),1);var uN=a(C(),1),{ValidatedToggleControl:fJ}=Me(aN.privateApis);function cN({field:e,onChange:t,data:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:s,description:l,getValue:u,setValue:c,isValid:f}=e,m=(0,lN.useCallback)(()=>{t(c({item:r,value:!u({item:r})}))},[t,c,r,u]);return(0,uN.jsx)(fJ,{required:!!f.required,markWhenOptional:n,customValidity:St(f,i),hidden:o,label:s,help:l,checked:u({item:r}),onChange:m})}var fN=a(M(),1),dN=a(B(),1);var mN=a(C(),1),{ValidatedTextareaControl:dJ}=Me(fN.privateApis);function pN({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,config:i,validity:s}){let{rows:l=4}=i||{},{label:u,placeholder:c,description:f,setValue:m,isValid:d}=t,h=t.getValue({item:e}),g=(0,dN.useCallback)(y=>r(m({item:e,value:y})),[e,r,m]);return(0,mN.jsx)(dJ,{required:!!d.required,markWhenOptional:n,customValidity:St(d,s),label:u,placeholder:c,value:h??"",help:f,onChange:g,rows:l,minLength:d.minLength?d.minLength.constraint:void 0,maxLength:d.maxLength?d.maxLength.constraint:void 0,__next40pxDefaultSize:!0,hideLabelFromVision:o})}var df=a(M(),1),hN=a(B(),1);var p0=a(C(),1),{ValidatedToggleGroupControl:mJ}=Me(df.privateApis);function gN({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{getValue:s,setValue:l,isValid:u}=t,c=s({item:e}),f=(0,hN.useCallback)(g=>r(l({item:e,value:g})),[e,r,l]),{elements:m,isLoading:d}=Pr({elements:t.elements,getElements:t.getElements});if(d)return(0,p0.jsx)(df.Spinner,{});if(m.length===0)return null;let h=m.find(g=>g.value===c);return(0,p0.jsx)(mJ,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:St(u,i),__next40pxDefaultSize:!0,isBlock:!0,label:t.label,help:h?.description||t.description,onChange:f,value:c,hideLabelFromVision:o,children:m.map(g=>(0,p0.jsx)(df.__experimentalToggleGroupControlOption,{label:g.label,value:g.value},g.value))})}var h0=a(M(),1),g0=a(B(),1);var Km=a(C(),1),{ValidatedFormTokenField:pJ}=Me(h0.privateApis);function vN({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:s,placeholder:l,getValue:u,setValue:c,isValid:f}=t,m=u({item:e}),{elements:d,isLoading:h}=Pr({elements:t.elements,getElements:t.getElements}),g=(0,g0.useMemo)(()=>Array.isArray(m)?m.map(v=>d?.find(w=>w.value===v)||{value:v,label:v}):[],[m,d]),y=(0,g0.useCallback)(v=>{let b=v.map(w=>typeof w=="object"&&"value"in w?w.value:w);r(c({item:e,value:b}))},[r,c,e]);return h?(0,Km.jsx)(h0.Spinner,{}):(0,Km.jsx)(pJ,{required:!!f?.required,markWhenOptional:n,customValidity:St(f,i),label:o?void 0:s,value:g,onChange:y,placeholder:l,suggestions:d?.map(v=>v.value),__experimentalValidateInput:v=>t.isValid?.elements&&d?d.some(b=>b.value===v||b.label===v):!0,__experimentalExpandOnFocus:d&&d.length>0,__experimentalShowHowTo:!t.isValid?.elements,displayTransform:v=>typeof v=="object"&&"label"in v?v.label:typeof v=="string"&&d&&d.find(w=>w.value===v)?.label||v,__experimentalRenderItem:({item:v})=>{if(typeof v=="string"&&d){let b=d.find(w=>w.value===v);return(0,Km.jsx)("span",{children:b?.label||v})}return(0,Km.jsx)("span",{children:v})}})}var Go=a(M(),1),K2=a(B(),1),yN=a(j(),1);var Ds=a(C(),1),{ValidatedInputControl:hJ}=Me(Go.privateApis),gJ=({color:e,onColorChange:t})=>{let r=e&&pr(e).isValid()?e:"#ffffff";return(0,Ds.jsx)(Go.Dropdown,{className:"dataviews-controls__color-picker-dropdown",popoverProps:{resize:!1},renderToggle:({onToggle:o})=>(0,Ds.jsx)(Go.Button,{onClick:o,"aria-label":(0,yN.__)("Open color picker"),size:"small",icon:()=>(0,Ds.jsx)(Go.ColorIndicator,{colorValue:r})}),renderContent:()=>(0,Ds.jsx)(Go.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,Ds.jsx)(Go.ColorPicker,{color:r,onChange:t,enableAlpha:!0})})})};function bN({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:s,placeholder:l,description:u,setValue:c,isValid:f}=t,m=t.getValue({item:e})||"",d=(0,K2.useCallback)(g=>{r(c({item:e,value:g}))},[e,r,c]),h=(0,K2.useCallback)(g=>{r(c({item:e,value:g||""}))},[e,r,c]);return(0,Ds.jsx)(hJ,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:St(f,i),label:s,placeholder:l,value:m,help:u,onChange:h,hideLabelFromVision:o,type:"text",prefix:(0,Ds.jsx)(Go.__experimentalInputControlPrefixWrapper,{variant:"control",children:(0,Ds.jsx)(gJ,{color:m,onColorChange:d})})})}var y0=a(M(),1),b0=a(B(),1),X2=a(j(),1);var v0=a(C(),1);function wN({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let[s,l]=(0,b0.useState)(!1),u=(0,b0.useCallback)(()=>{l(c=>!c)},[]);return(0,v0.jsx)(Bi,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:s?"text":"password",suffix:(0,v0.jsx)(y0.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,v0.jsx)(y0.Button,{icon:s?cd:ad,onClick:u,size:"small",label:s?(0,X2.__)("Hide password"):(0,X2.__)("Show password")})})})}function w0(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var SN=a(C(),1),xN={adaptiveSelect:WV,array:vN,checkbox:MV,color:bN,combobox:Jy,datetime:zV,date:HV,email:KV,telephone:XV,url:QV,integer:eN,number:rN,password:wN,radio:nN,select:n0,text:sN,toggle:cN,textarea:pN,toggleGroup:gN};function vJ(e){return e&&typeof e=="object"&&typeof e.control=="string"}function yJ(e){let{control:t,...r}=e,o=x0(t);return o===null?null:function(i){return(0,SN.jsx)(o,{...i,config:r})}}function _N(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?x0(e.Edit):vJ(e.Edit)?yJ(e.Edit):w0(e)&&e.type!=="array"?x0("adaptiveSelect"):t===null?null:x0(t)}function x0(e){return Object.keys(xN).includes(e)?xN[e]:null}function bJ(e,t,r){if(e.filterBy===!1)return!1;let o=e.filterBy?.operators?.filter(n=>r.includes(n))??t;return o.length===0?!1:{isPrimary:!!e.filterBy?.isPrimary,operators:o}}var CN=bJ;var wJ=e=>({item:t})=>{let r=e.split("."),o=t;for(let n of r)o.hasOwnProperty(n)?o=o[n]:o=void 0;return o},TN=wJ;var xJ=e=>({value:t})=>{let r=e.split("."),o={},n=o;for(let i of r.slice(0,-1))n[i]={},n=n[i];return n[r.at(-1)]=t,o},EN=xJ;var AN=a(j(),1);function S0({item:e,field:t}){let{elements:r,isLoading:o}=Pr({elements:t.elements,getElements:t.getElements}),n=t.getValue({item:e});return o||r.length===0?n:r?.find(i=>i.value===n)?.label||t.getValue({item:e})}var PN=a(C(),1);function $t({item:e,field:t}){return t.hasElements?(0,PN.jsx)(S0,{item:e,field:t}):t.getValueFormatted({item:e,field:t})}var ji=(e,t,r)=>r==="asc"?e.localeCompare(t):t.localeCompare(e);function er(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)}function zi(e,t){if(typeof t.isValid.minLength?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:String(r).length>=t.isValid.minLength.constraint}function Gi(e,t){if(typeof t.isValid.maxLength?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:String(r).length<=t.isValid.maxLength.constraint}function Hi(e,t){if(t.isValid.pattern?.constraint===void 0)return!0;try{let r=new RegExp(t.isValid.pattern.constraint),o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:r.test(String(o))}catch{return!1}}function Rt(e,t){let o=(t.elements??[]).map(i=>i.value);if(o.length===0)return!0;let n=t.getValue({item:e});return[].concat(n).every(i=>o.includes(i))}function SJ({item:e,field:t}){return t.getValue({item:e})}var po=SJ;var _J=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function CJ(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!_J.test(r)?(0,AN.__)("Value must be a valid email address."):null}var kN={type:"email",render:$t,Edit:"email",sort:ji,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Vt,Nt],validOperators:[Ut,Wt,Ei,Pi,Ai,Vt,Nt,Wr,_r],format:{},getValueFormatted:po,validate:{required:er,pattern:Hi,minLength:zi,maxLength:Gi,elements:Rt,custom:CJ}};var RN=a(j(),1);var mf=(e,t,r)=>r==="asc"?e-t:t-e;function _0(e,t){if(typeof t.isValid.min?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:Number(r)>=t.isValid.min.constraint}function C0(e,t){if(typeof t.isValid.max?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:Number(r)<=t.isValid.max.constraint}var ON={separatorThousand:","};function TJ({item:e,field:t}){let r=t.getValue({item:e});if(r==null)return"";if(r=Number(r),!Number.isFinite(r))return String(r);let o;t.type!=="integer"?o=ON:o=t.format;let{separatorThousand:n}=o,i=Math.trunc(r);return n?String(i).replace(/\B(?=(\d{3})+(?!\d))/g,n):String(i)}function EJ(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Number.isInteger(r)?(0,RN.__)("Value must be an integer."):null}var IN={type:"integer",render:$t,Edit:"integer",sort:mf,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Wt,Aa,ka,Ra,Oa,ao],validOperators:[Ut,Wt,Aa,ka,Ra,Oa,ao,Vt,Nt,Wr,_r],format:ON,getValueFormatted:TJ,validate:{required:er,min:_0,max:C0,elements:Rt,custom:EJ}};var FN=a(j(),1);var VN={separatorThousand:",",separatorDecimal:".",decimals:2};function PJ({item:e,field:t}){let r=t.getValue({item:e});if(r==null)return"";if(r=Number(r),!Number.isFinite(r))return String(r);let o;t.type!=="number"?o=VN:o=t.format;let{separatorThousand:n,separatorDecimal:i,decimals:s}=o,l=r.toFixed(s),[u,c]=l.split("."),f=n?u.replace(/\B(?=(\d{3})+(?!\d))/g,n):u;return s===0?f:f+i+c}function AJ(e){return e===""||e===void 0||e===null}function kJ(e,t){let r=t.getValue({item:e});return!AJ(r)&&!Number.isFinite(r)?(0,FN.__)("Value must be a number."):null}var NN={type:"number",render:$t,Edit:"number",sort:mf,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Wt,Aa,ka,Ra,Oa,ao],validOperators:[Ut,Wt,Aa,ka,Ra,Oa,ao,Vt,Nt,Wr,_r],format:VN,getValueFormatted:PJ,validate:{required:er,min:_0,max:C0,elements:Rt,custom:kJ}};var DN={type:"text",render:$t,Edit:"text",sort:ji,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Vt,Nt],validOperators:[Ut,Wt,Ei,Pi,Ai,Vt,Nt,Wr,_r],format:{},getValueFormatted:po,validate:{required:er,pattern:Hi,minLength:zi,maxLength:Gi,elements:Rt}};var gu=a(ba(),1);var LN={datetime:(0,gu.getSettings)().formats.datetime,weekStartsOn:(0,gu.getSettings)().l10n.startOfWeek};function RJ({item:e,field:t}){let r=t.getValue({item:e});if(["",void 0,null].includes(r))return"";let o;return t.type!=="datetime"?o=LN:o=t.format,(0,gu.dateI18n)(o.datetime,(0,gu.getDate)(r))}var OJ=(e,t,r)=>{let o=new Date(e).getTime(),n=new Date(t).getTime();return r==="asc"?o-n:n-o},MN={type:"datetime",render:$t,Edit:"datetime",sort:OJ,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Da,La,Ia,Fa,Va,Na,lo,Lo],validOperators:[Da,La,Ia,Fa,Va,Na,lo,Lo],format:LN,getValueFormatted:RJ,validate:{required:er,elements:Rt}};var vu=a(ba(),1);var BN={date:(0,vu.getSettings)().formats.date,weekStartsOn:(0,vu.getSettings)().l10n.startOfWeek};function IJ({item:e,field:t}){let r=t.getValue({item:e});if(["",void 0,null].includes(r))return"";let o;return t.type!=="date"?o=BN:o=t.format,(0,vu.dateI18n)(o.date,(0,vu.getDate)(r))}var FJ=(e,t,r)=>{let o=new Date(e).getTime(),n=new Date(t).getTime();return r==="asc"?o-n:n-o},jN={type:"date",render:$t,Edit:"date",sort:FJ,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Da,La,Ia,Fa,Va,Na,lo,Lo,ao],validOperators:[Da,La,Ia,Fa,Va,Na,lo,Lo,ao],format:BN,getValueFormatted:IJ,validate:{required:er,elements:Rt}};var T0=a(j(),1);function zN(e,t){return t.getValue({item:e})===!0}function VJ({item:e,field:t}){let r=t.getValue({item:e});return r===!0?(0,T0.__)("True"):r===!1?(0,T0.__)("False"):""}function NJ(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&![!0,!1].includes(r)?(0,T0.__)("Value must be true, false, or undefined"):null}var DJ=(e,t,r)=>{let o=!!e;return o===!!t?0:r==="asc"?o?1:-1:o?-1:1},GN={type:"boolean",render:$t,Edit:"checkbox",sort:DJ,validate:{required:zN,elements:Rt,custom:NJ},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Wt],validOperators:[Ut,Wt],format:{},getValueFormatted:VJ};var HN={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:po,validate:{}};var Q2=a(j(),1);function UN(e,t){let r=t.getValue({item:e});return Array.isArray(r)&&r.length>0&&r.every(o=>![void 0,"",null].includes(o))}function WN({item:e,field:t}){let r=t.getValue({item:e});return(Array.isArray(r)?r:[]).join(", ")}function LJ({item:e,field:t}){return WN({item:e,field:t})}function MJ(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Array.isArray(r)?(0,Q2.__)("Value must be an array."):r.every(o=>typeof o=="string")?null:(0,Q2.__)("Every value must be a string.")}var BJ=(e,t,r)=>{let o=Array.isArray(e)?e:[],n=Array.isArray(t)?t:[];if(o.length!==n.length)return r==="asc"?o.length-n.length:n.length-o.length;let i=o.join(","),s=n.join(",");return r==="asc"?i.localeCompare(s):s.localeCompare(i)},qN={type:"array",render:LJ,Edit:"array",sort:BJ,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Vt,Nt],validOperators:[Vt,Nt,Wr,_r],format:{},getValueFormatted:WN,validate:{required:UN,elements:Rt,custom:MJ}};function jJ({item:e,field:t}){return t.getValue({item:e})?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":""}var YN={type:"password",render:$t,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:jJ,validate:{required:er,pattern:Hi,minLength:zi,maxLength:Gi,elements:Rt}};var ZN={type:"telephone",render:$t,Edit:"telephone",sort:ji,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Vt,Nt],validOperators:[Ut,Wt,Ei,Pi,Ai,Vt,Nt,Wr,_r],format:{},getValueFormatted:po,validate:{required:er,pattern:Hi,minLength:zi,maxLength:Gi,elements:Rt}};var KN=a(j(),1);var pf=a(C(),1);function zJ({item:e,field:t}){if(t.hasElements)return(0,pf.jsx)(S0,{item:e,field:t});let r=po({item:e,field:t});return!r||!pr(r).isValid()?r:(0,pf.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,pf.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:r,border:"1px solid #ddd",flexShrink:0}}),(0,pf.jsx)("span",{children:r})]})}function GJ(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!pr(r).isValid()?(0,KN.__)("Value must be a valid color."):null}var HJ=(e,t,r)=>{let o=pr(e),n=pr(t);if(!o.isValid()&&!n.isValid())return 0;if(!o.isValid())return r==="asc"?1:-1;if(!n.isValid())return r==="asc"?-1:1;let i=o.toHsl(),s=n.toHsl();return i.h!==s.h?r==="asc"?i.h-s.h:s.h-i.h:i.s!==s.s?r==="asc"?i.s-s.s:s.s-i.s:r==="asc"?i.l-s.l:s.l-i.l},XN={type:"color",render:zJ,Edit:"color",sort:HJ,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Vt,Nt],validOperators:[Ut,Wt,Vt,Nt],format:{},getValueFormatted:po,validate:{required:er,elements:Rt,custom:GJ}};var QN={type:"url",render:$t,Edit:"url",sort:ji,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Vt,Nt],validOperators:[Ut,Wt,Ei,Pi,Ai,Vt,Nt,Wr,_r],format:{},getValueFormatted:po,validate:{required:er,pattern:Hi,minLength:zi,maxLength:Gi,elements:Rt}};var UJ=(e,t,r)=>typeof e=="number"&&typeof t=="number"?mf(e,t,r):ji(e,t,r),JN={render:$t,Edit:null,sort:UJ,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Wt],validOperators:oV(),format:{},getValueFormatted:po,validate:{required:er,elements:Rt}};function $N(e,t){let r;e.isValid?.required===!0&&t.validate.required!==void 0&&(r={constraint:!0,validate:t.validate.required});let o;(e.isValid?.elements===!0||e.isValid?.elements===void 0&&(e.elements||e.getElements))&&t.validate.elements!==void 0&&(o={constraint:!0,validate:t.validate.elements});let n;typeof e.isValid?.min=="number"&&t.validate.min!==void 0&&(n={constraint:e.isValid.min,validate:t.validate.min});let i;typeof e.isValid?.max=="number"&&t.validate.max!==void 0&&(i={constraint:e.isValid.max,validate:t.validate.max});let s;typeof e.isValid?.minLength=="number"&&t.validate.minLength!==void 0&&(s={constraint:e.isValid.minLength,validate:t.validate.minLength});let l;typeof e.isValid?.maxLength=="number"&&t.validate.maxLength!==void 0&&(l={constraint:e.isValid.maxLength,validate:t.validate.maxLength});let u;e.isValid?.pattern!==void 0&&t.validate.pattern!==void 0&&(u={constraint:e.isValid?.pattern,validate:t.validate.pattern});let c=e.isValid?.custom??t.validate.custom;return{required:r,elements:o,min:n,max:i,minLength:s,maxLength:l,pattern:u,custom:c}}function eD(e){return e.validOperators.reduce((t,r)=>{let o=hu(r);return o?.filter&&(t[r]=o.filter),t},{})}function WJ(e,t){return{...t.format,...e.format}}var tD=WJ;function qJ(e){let t=[kN,IN,NN,DN,MN,jN,GN,HN,qN,YN,ZN,XN,QN].find(r=>r?.type===e);return t||JN}function Ls(e){return e.map(t=>{let r=qJ(t.type),o=t.getValue||TN(t.id),n=function(i,s,l){let u=o({item:i}),c=o({item:s});return t.sort?t.sort(u,c,l):r.sort(u,c,l)};return{id:t.id,label:t.label||t.id,header:t.header||t.label||t.id,description:t.description,placeholder:t.placeholder,getValue:o,setValue:t.setValue||EN(t.id),elements:t.elements,getElements:t.getElements,hasElements:w0(t),isVisible:t.isVisible,enableHiding:t.enableHiding??!0,readOnly:t.readOnly??!1,type:r.type,render:t.render??r.render,Edit:_N(t,r.Edit),sort:n,enableSorting:t.enableSorting??r.enableSorting,enableGlobalSearch:t.enableGlobalSearch??r.enableGlobalSearch,isValid:$N(t,r),filterBy:CN(t,r.defaultOperators,r.validOperators),filter:eD(r),format:tD(t,r),getValueFormatted:t.getValueFormatted??r.getValueFormatted}})}var yu=a(B(),1);function rD(e,t,r){let o=(0,yu.useRef)(e),n=(0,yu.useRef)(r),[i,s]=(0,yu.useState)(!t);return(0,yu.useEffect)(()=>{t||(o.current=e,n.current=r,s(!0))},[e,t,r]),{data:t&&o.current?.length?o.current:e,paginationInfo:t&&o.current?.length?n.current:r,hasInitiallyLoaded:i}}var Dr=a(C(),1),YJ=e=>e.id,ZJ=()=>!0,KJ=[],XJ=Xn.filter(e=>!e.isPicker);function QJ({header:e,search:t=!0,searchLabel:r=void 0}){return(0,Dr.jsxs)(Dr.Fragment,{children:[(0,Dr.jsxs)(Q,{direction:"row",align:"top",justify:"space-between",className:"dataviews__view-actions",gap:"xs",children:[(0,Dr.jsxs)(Q,{direction:"row",justify:"start",gap:"sm",className:"dataviews__search",children:[t&&(0,Dr.jsx)(L2,{label:r}),(0,Dr.jsx)(Ky,{})]}),(0,Dr.jsxs)(Q,{direction:"row",gap:"xs",style:{flexShrink:0},children:[(0,Dr.jsx)(VV,{}),e]})]}),(0,Dr.jsx)(Xy,{className:"dataviews-filters__container"}),(0,Dr.jsx)(N2,{}),(0,Dr.jsx)(D2,{})]})}function JJ({view:e,onChangeView:t,fields:r,search:o=!0,searchLabel:n=void 0,actions:i=KJ,data:s,getItemId:l=YJ,getItemLevel:u,isLoading:c=!1,paginationInfo:f,defaultLayouts:m,selection:d,onChangeSelection:h,onClickItem:g,renderItemLink:y,isItemClickable:v=ZJ,header:b,children:w,config:x={perPageSizes:[10,20,50,100]},empty:T,onReset:E}){let{infiniteScrollHandler:k}=f,F=(0,ho.useRef)(null),[P,V]=(0,ho.useState)(0),N=(0,E0.useResizeObserver)(ie=>{V(ie[0].borderBoxSize[0].inlineSize)},{box:"border-box"}),[A,S]=(0,ho.useState)([]),I=d===void 0||h===void 0,O=I?A:d,[z,R]=(0,ho.useState)(null);function D(ie){let $=typeof ie=="function"?ie(O):ie;I&&S($),h&&h($)}let G=(0,ho.useMemo)(()=>Ls(r),[r]),U=(0,ho.useMemo)(()=>O.filter(ie=>s.some($=>l($)===ie)),[O,s,l]),ce=Um(G,e),ye=(0,ho.useMemo)(()=>(ce||[]).some(ie=>ie.isPrimary||ie.isLocked),[ce]),[Te,Ie]=(0,ho.useState)(ye);(0,ho.useEffect)(()=>{ye&&!Te&&Ie(!0)},[ye,Te]),(0,ho.useEffect)(()=>{if(!e.infiniteScrollEnabled||!F.current)return;let ie=(0,E0.throttle)(Fe=>{let Yt=Fe.target,$r=Yt.scrollTop,jr=Yt.scrollHeight,ee=Yt.clientHeight;$r+ee>=jr-100&&k?.()},100),$=F.current;return $.addEventListener("scroll",ie),()=>{$.removeEventListener("scroll",ie),ie.cancel()}},[k,e.infiniteScrollEnabled]);let He=(0,ho.useMemo)(()=>Object.fromEntries(Object.entries(m).filter(([ie])=>XJ.some($=>$.type===ie))),[m]),{data:pe,paginationInfo:Se,hasInitiallyLoaded:J}=rD(s,c,f);return He[e.type]?(0,Dr.jsx)(Ce.Provider,{value:{view:e,onChangeView:t,fields:G,actions:i,data:pe,isLoading:c,paginationInfo:Se,selection:U,onChangeSelection:D,openedFilter:z,setOpenedFilter:R,getItemId:l,getItemLevel:u,isItemClickable:v,onClickItem:g,renderItemLink:y,containerWidth:P,containerRef:F,resizeObserverRef:N,defaultLayouts:He,filters:ce,isShowingFilter:Te,setIsShowingFilter:Ie,config:x,empty:T,hasInitiallyLoaded:J,hasInfiniteScrollHandler:!!k,onReset:E},children:(0,Dr.jsx)("div",{className:"dataviews-wrapper",ref:F,children:w??(0,Dr.jsx)(QJ,{header:b,search:o,searchLabel:n})})}):null}var ei=JJ;ei.BulkActionToolbar=ey;ei.Filters=qm;ei.FiltersToggled=Xy;ei.FiltersToggle=Ky;ei.Layout=N2;ei.LayoutSwitcher=j2;ei.Pagination=L_;ei.Search=L2;ei.ViewConfig=z2;ei.Footer=D2;var Ms=ei;var iC=a(B(),1);var oD=a(B(),1),nD=a(C(),1),J2=(0,oD.createContext)({fields:[]});J2.displayName="DataFormContext";function iD({fields:e,children:t}){return(0,nD.jsx)(J2.Provider,{value:{fields:e},children:t})}var kn=J2;var D0=a(B(),1);var A0=a(B(),1),Xm=a(M(),1);var Xr={type:"regular",labelPosition:"top"},$J=e=>typeof e=="string"?[{id:e,visibility:"when-collapsed"}]:e.map(t=>typeof t=="string"?{id:t,visibility:"when-collapsed"}:{id:t.id,visibility:t.visibility});function sD(e){let t=Xr;if(e?.type==="regular")t={type:"regular",labelPosition:e?.labelPosition??"top"};else if(e?.type==="panel"){let r=e.summary??[],o=Array.isArray(r)?r:[r];t={type:"panel",labelPosition:e?.labelPosition??"side",openAs:e?.openAs??"dropdown",summary:o,editVisibility:e?.editVisibility??"on-hover"}}else if(e?.type==="card")if(e.withHeader===!1)t={type:"card",withHeader:!1,isOpened:!0,summary:[],isCollapsible:!1};else{let r=e.summary??[];t={type:"card",withHeader:!0,isOpened:typeof e.isOpened=="boolean"?e.isOpened:!0,summary:$J(r),isCollapsible:e.isCollapsible===void 0?!0:e.isCollapsible}}else e?.type==="row"?t={type:"row",alignment:e?.alignment??"center",styles:e?.styles??{}}:e?.type==="details"&&(t={type:"details",summary:e?.summary??""});return t}function aD(e){let t=sD(e?.layout),r=(e.fields??[]).map(o=>{if(typeof o=="string")return{id:o,layout:t};let n=o.layout?sD(o.layout):t;return{id:o.id,layout:n,...!!o.label&&{label:o.label},...!!o.description&&{description:o.description},..."children"in o&&Array.isArray(o.children)&&{children:aD({fields:o.children,layout:Xr}).fields}}});return{layout:t,fields:r}}var P0=aD;var Dt=a(C(),1);function e$({title:e}){return(0,Dt.jsx)(Q,{direction:"column",className:"dataforms-layouts-regular__header",gap:"lg",children:(0,Dt.jsx)(Q,{direction:"row",align:"center",children:(0,Dt.jsx)(Xm.__experimentalHeading,{level:2,size:13,children:e})})})}function lD({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{fields:s}=(0,A0.useContext)(kn),l=t.layout,u=(0,A0.useMemo)(()=>({layout:Xr,fields:t.children?t.children:[]}),[t]);if(t.children)return(0,Dt.jsxs)(Dt.Fragment,{children:[!o&&t.label&&(0,Dt.jsx)(e$,{title:t.label}),(0,Dt.jsx)(Ho,{data:e,form:u,onChange:r,validity:i?.children})]});let c=l.labelPosition,f=s.find(m=>m.id===t.id);return!f||!f.Edit?null:c==="side"?(0,Dt.jsxs)(Q,{direction:"row",className:"dataforms-layouts-regular__field",gap:"sm",children:[(0,Dt.jsx)("div",{className:Z("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${c}`),children:(0,Dt.jsx)(Xm.BaseControl.VisualLabel,{children:f.label})}),(0,Dt.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:f.readOnly===!0?(0,Dt.jsx)(f.render,{item:e,field:f}):(0,Dt.jsx)(f.Edit,{data:e,field:f,onChange:r,hideLabelFromVision:!0,markWhenOptional:n,validity:i},f.id)})]}):(0,Dt.jsx)("div",{className:"dataforms-layouts-regular__field",children:f.readOnly===!0?(0,Dt.jsx)(Dt.Fragment,{children:(0,Dt.jsxs)(Dt.Fragment,{children:[!o&&c!=="none"&&(0,Dt.jsx)(Xm.BaseControl.VisualLabel,{children:f.label}),(0,Dt.jsx)(f.render,{item:e,field:f})]})}):(0,Dt.jsx)(f.Edit,{data:e,field:f,onChange:r,hideLabelFromVision:c==="none"?!0:o,markWhenOptional:n,validity:i})})}var eC=a(Rg(),1),bu=a(M(),1),tC=a(j(),1),ti=a(B(),1),I0=a(Qe(),1);var gf=a(M(),1),hf=a(j(),1);var mD=a(Qe(),1),pD=a(B(),1);function t$(e,t){return Z("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${e}`,{"has-error":t})}var uD=t$;var k0=a(M(),1);var Qm=a(C(),1);function r$(e,t,r){return e?(0,Qm.jsx)(k0.Tooltip,{text:t,placement:"top",children:(0,Qm.jsxs)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:[(0,Qm.jsx)(k0.Icon,{icon:xl,size:16}),r]})}):r}var cD=r$;function fD(e){if(!e)return;let t=Object.keys(e).filter(r=>r!=="children");for(let r of t){let o=e[r];if(o!==void 0&&o.type==="invalid")return o.message?o.message:r==="required"?"A required field is empty":"Unidentified validation error"}if(e.children)for(let r of Object.values(e.children)){let o=fD(r);if(o)return o}}var dD=fD;var ln=a(C(),1);function Jm({data:e,field:t,fieldLabel:r,summaryFields:o,validity:n,touched:i,disabled:s,onClick:l,"aria-expanded":u}){let{labelPosition:c,editVisibility:f}=t.layout,m=dD(n),d=i&&!!m,h=uD(c,d),g=cD(d,m,r),y=Z("dataforms-layouts-panel__field-trigger",`dataforms-layouts-panel__field-trigger--label-${c}`,{"is-disabled":s,"dataforms-layouts-panel__field-trigger--edit-always":f==="always"}),v=(0,mD.useInstanceId)(Jm,"dataforms-layouts-panel__field-control"),b=d?(0,hf.sprintf)((0,hf._x)("Edit %s (has errors)","field"),r||""):(0,hf.sprintf)((0,hf._x)("Edit %s","field"),r||""),w=(0,pD.useRef)(null);return(0,ln.jsxs)("div",{ref:w,className:y,onClick:s?void 0:()=>{let E=w.current?.ownerDocument.defaultView?.getSelection();E&&E.toString().length>0||l()},onKeyDown:s?void 0:E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),l())},children:[c!=="none"&&(0,ln.jsx)("span",{className:h,children:g}),c==="none"&&d&&(0,ln.jsx)(gf.Tooltip,{text:m,placement:"top",children:(0,ln.jsx)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:(0,ln.jsx)(gf.Icon,{icon:xl,size:16})})}),(0,ln.jsx)("span",{id:`${v}`,className:"dataforms-layouts-panel__field-control",children:o.length>1?(0,ln.jsx)("span",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:o.map(E=>(0,ln.jsx)("span",{style:{width:"100%"},children:(0,ln.jsx)(E.render,{item:e,field:E})},E.id))}):o.map(E=>(0,ln.jsx)(E.render,{item:e,field:E},E.id))}),!s&&(0,ln.jsx)(gf.Button,{className:"dataforms-layouts-panel__field-trigger-icon",label:b,showTooltip:!1,icon:ci,size:"small","aria-expanded":u,"aria-haspopup":"dialog","aria-describedby":`${v}`})]})}var hD=a(Rg(),1),$2=a(kg(),1),Ui=a(B(),1),go=a(j(),1);function gD(e){return e?Object.values(e).every(t=>Object.entries(t).every(([r,o])=>r==="children"&&o&&typeof o=="object"?gD(o):o.type!=="invalid"&&o.type!=="validating")):!0}function o$(e,t){let r=P0(e);if(r.fields.length===0)return[];let o=new Map;t.forEach(s=>{o.set(s.id,s)});function n(s){if("children"in s&&Array.isArray(s.children)){let c=s.children.map(n).filter(m=>m!==null);if(c.length===0)return null;let f=o.get(s.id);if(f){let[m]=Ls([f]);return{id:s.id,children:c,field:m}}return{id:s.id,children:c}}let l=o.get(s.id);if(!l)return null;let[u]=Ls([l]);return{id:s.id,children:[],field:u}}return r.fields.map(n).filter(s=>s!==null)}function vf(e,t,r){if(e||(e={}),r.length===0)return e;let o={...e},n=o;for(let s=0;s<r.length-1;s++){let l=r[s];n[l]||(n[l]={}),n[l]={...n[l]},n=n[l]}let i=r[r.length-1];return n[i]={...n[i]||{},...t},o}function vD(e,t,r){if(!e||t.length===0)return e;let o={...e},n=o;for(let l=0;l<t.length-1;l++){let u=t[l];if(!n[u])return e;n[u]={...n[u]},n=n[u]}let i=t[t.length-1];if(!n[i])return e;let s={...n[i]};if(delete s[r],Object.keys(s).length===0?delete n[i]:n[i]=s,Object.keys(o).length!==0)return o}function n$(e,t,r){let{elementsCounterRef:o,setFormValidity:n,path:i,item:s}=r,l=(o.current[t.id]||0)+1;o.current[t.id]=l,e.then(u=>{if(l===o.current[t.id]){if(!Array.isArray(u)){n(c=>vf(c,{elements:{type:"invalid",message:(0,go.__)("Could not validate elements.")}},[...i,t.id]));return}t.field?.isValid.elements&&!t.field.isValid.elements.validate(s,{...t.field,elements:u})?n(c=>vf(c,{elements:{type:"invalid",message:(0,go.__)("Value must be one of the elements.")}},[...i,t.id])):n(c=>vD(c,[...i,t.id],"elements"))}}).catch(u=>{if(l!==o.current[t.id])return;let c;u instanceof Error?c=u.message:c=String(u)||(0,go.__)("Unknown error when running elements validation asynchronously."),n(f=>vf(f,{elements:{type:"invalid",message:c}},[...i,t.id]))})}function i$(e,t,r){let{customCounterRef:o,setFormValidity:n,path:i}=r,s=(o.current[t.id]||0)+1;o.current[t.id]=s,e.then(l=>{if(s===o.current[t.id]){if(l===null){n(u=>vD(u,[...i,t.id],"custom"));return}if(typeof l=="string"){n(u=>vf(u,{custom:{type:"invalid",message:l}},[...i,t.id]));return}n(u=>vf(u,{custom:{type:"invalid",message:(0,go.__)("Validation could not be processed.")}},[...i,t.id]))}}).catch(l=>{if(s!==o.current[t.id])return;let u;l instanceof Error?u=l.message:u=String(l)||(0,go.__)("Unknown error when running custom validation asynchronously."),n(c=>vf(c,{custom:{type:"invalid",message:u}},[...i,t.id]))})}function yD(e,t,r){if(t.field?.isValid.required&&!t.field.isValid.required.validate(e,t.field))return{required:{type:"invalid"}};if(t.field?.isValid.pattern&&!t.field.isValid.pattern.validate(e,t.field))return{pattern:{type:"invalid",message:(0,go.__)("Value does not match the required pattern.")}};if(t.field?.isValid.min&&!t.field.isValid.min.validate(e,t.field))return{min:{type:"invalid",message:(0,go.__)("Value is below the minimum.")}};if(t.field?.isValid.max&&!t.field.isValid.max.validate(e,t.field))return{max:{type:"invalid",message:(0,go.__)("Value is above the maximum.")}};if(t.field?.isValid.minLength&&!t.field.isValid.minLength.validate(e,t.field))return{minLength:{type:"invalid",message:(0,go.__)("Value is too short.")}};if(t.field?.isValid.maxLength&&!t.field.isValid.maxLength.validate(e,t.field))return{maxLength:{type:"invalid",message:(0,go.__)("Value is too long.")}};if(t.field?.isValid.elements&&t.field.hasElements&&!t.field.getElements&&Array.isArray(t.field.elements)&&!t.field.isValid.elements.validate(e,t.field))return{elements:{type:"invalid",message:(0,go.__)("Value must be one of the elements.")}};let o;if(t.field&&t.field.isValid.custom)try{let i=t.field.getValue({item:e});o=t.field.isValid.custom((0,hD.default)(e,t.field.setValue({item:e,value:i})),t.field)}catch(i){let s;return i instanceof Error?s=i.message:s=String(i)||(0,go.__)("Unknown error when running custom validation."),{custom:{type:"invalid",message:s}}}if(typeof o=="string")return{custom:{type:"invalid",message:o}};let n={};if(t.field&&t.field.isValid.elements&&t.field.hasElements&&typeof t.field.getElements=="function"&&(n$(t.field.getElements(),t,r),n.elements={type:"validating",message:(0,go.__)("Validating\u2026")}),o instanceof Promise&&(i$(o,t,r),n.custom={type:"validating",message:(0,go.__)("Validating\u2026")}),Object.keys(n).length>0)return n;if(t.children.length>0){let i={};t.children.forEach(l=>{i[l.id]=yD(e,l,{...r,path:[...r.path,t.id,"children"]})});let s={};return Object.entries(i).forEach(([l,u])=>{u!==void 0&&(s[l]=u)}),Object.keys(s).length===0?void 0:{children:s}}}function bD(e,t){let r=e?.field?.getValue({item:t});if(e.children.length===0)return r;let o=e.children.map(n=>bD(n,t));return o?{value:r,children:o}:r}function s$(e,t,r){let[o,n]=(0,Ui.useState)(),i=(0,Ui.useRef)({}),s=(0,Ui.useRef)({}),l=(0,Ui.useRef)({}),u=(0,Ui.useCallback)(()=>{let c={customCounterRef:i,elementsCounterRef:s,setFormValidity:n,path:[],item:e},f=o$(r,t);if(f.length===0){n(void 0);return}let m={},d=[];f.forEach(h=>{let g=bD(h,e);if(l.current.hasOwnProperty(h.id)&&(0,$2.default)(l.current[h.id],g)){d.push(h.id);return}l.current[h.id]=g;let y=yD(e,h,c);y!==void 0&&(m[h.id]=y)}),n(h=>{let g={...h,...m},y=[...d,...Object.keys(m)];return Object.keys(g).forEach(b=>{g&&!y.includes(b)&&delete g[b]}),Object.keys(g).length===0&&(g=void 0),(0,$2.default)(h,g)?h:g})},[e,t,r]);return(0,Ui.useEffect)(()=>{u()},[u]),{validity:o,isValid:gD(o)}}var wD=s$;var xD=a(B(),1);function $a(e,t){(0,xD.useEffect)(()=>{t&&e.current&&e.current.querySelectorAll("input, textarea, select").forEach(o=>{o.reportValidity()})},[t,e])}var SD=a(B(),1);function a$(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.id):[]}var R0=(e,t)=>Array.isArray(e)&&e.length>0?a$(e).map(o=>t.find(n=>n.id===o)).filter(o=>o!==void 0):[];var l$=(e,t)=>{let r=t.find(o=>o.id===e.id);return r||t.find(o=>{if(e.children){let n=e.children.filter(i=>!i.children);return n.length===0?!1:o.id===n[0].id}return o.id===e.id})};function u$(e){let{fields:t}=(0,SD.useContext)(kn),r=e.layout,o=R0(r.summary,t),n=l$(e,t),i=e.children?e.label:n?.label;return o.length===0?{summaryFields:n?[n]:[],fieldDefinition:n,fieldLabel:i}:{summaryFields:o,fieldDefinition:n,fieldLabel:i}}var O0=u$;var vo=a(C(),1);function c$({data:e,field:t,onChange:r,fieldLabel:o,onClose:n,touched:i}){let{fields:s}=(0,ti.useContext)(kn),[l,u]=(0,ti.useState)({}),c=(0,ti.useMemo)(()=>(0,eC.default)(e,l,{arrayMerge:(w,x)=>x}),[e,l]),f=(0,ti.useMemo)(()=>({layout:Xr,fields:t.children?t.children:[{id:t.id,layout:Xr}]}),[t]),m=s.map(w=>({...w,Edit:w.Edit===null?void 0:w.Edit,isValid:{required:w.isValid.required?.constraint,elements:w.isValid.elements?.constraint,min:w.isValid.min?.constraint,max:w.isValid.max?.constraint,pattern:w.isValid.pattern?.constraint,minLength:w.isValid.minLength?.constraint,maxLength:w.isValid.maxLength?.constraint}})),{validity:d}=wD(c,m,f),h=()=>{r(l),n()},g=w=>{u(x=>(0,eC.default)(x,w,{arrayMerge:(T,E)=>E}))},y=(0,I0.useFocusOnMount)("firstInputElement"),v=(0,ti.useRef)(null),b=(0,I0.useMergeRefs)([y,v]);return $a(v,i),(0,vo.jsxs)(bu.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:n,isFullScreen:!1,title:o,size:"medium",children:[(0,vo.jsx)("div",{ref:b,children:(0,vo.jsx)(Ho,{data:c,form:f,onChange:g,validity:d,children:(w,x,T,E)=>(0,vo.jsx)(w,{data:c,field:x,onChange:g,hideLabelFromVision:f.fields.length<2,markWhenOptional:E,validity:T},x.id)})}),(0,vo.jsxs)(Q,{direction:"row",className:"dataforms-layouts-panel__modal-footer",gap:"md",children:[(0,vo.jsx)(bu.__experimentalSpacer,{style:{flex:1}}),(0,vo.jsx)(bu.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:(0,tC.__)("Cancel")}),(0,vo.jsx)(bu.Button,{variant:"primary",onClick:h,__next40pxDefaultSize:!0,children:(0,tC.__)("Apply")})]})]})}function f$({data:e,field:t,onChange:r,validity:o}){let[n,i]=(0,ti.useState)(!1),[s,l]=(0,ti.useState)(!1),{fieldDefinition:u,fieldLabel:c,summaryFields:f}=O0(t);if(!u)return null;let m=()=>{l(!1),i(!0)};return(0,vo.jsxs)(vo.Fragment,{children:[(0,vo.jsx)(Jm,{data:e,field:t,fieldLabel:c,summaryFields:f,validity:o,touched:n,disabled:u.readOnly===!0,onClick:()=>l(!0),"aria-expanded":s}),s&&(0,vo.jsx)(c$,{data:e,field:t,onChange:r,fieldLabel:c??"",onClose:m,touched:n})]})}var _D=f$;var el=a(M(),1),CD=a(j(),1),Bs=a(B(),1);var TD=a(Qe(),1);var Qr=a(C(),1);function d$({title:e,onClose:t}){return(0,Qr.jsx)(Q,{direction:"column",className:"dataforms-layouts-panel__dropdown-header",gap:"lg",children:(0,Qr.jsxs)(Q,{direction:"row",gap:"sm",align:"center",children:[e&&(0,Qr.jsx)(el.__experimentalHeading,{level:2,size:13,children:e}),(0,Qr.jsx)(el.__experimentalSpacer,{style:{flex:1}}),t&&(0,Qr.jsx)(el.Button,{label:(0,CD.__)("Close"),icon:wl,onClick:t,size:"small"})]})})}function m$({touched:e,children:t}){let r=(0,Bs.useRef)(null);return $a(r,e),(0,Qr.jsx)("div",{ref:r,children:t})}function p$({data:e,field:t,onChange:r,validity:o}){let[n,i]=(0,Bs.useState)(!1),[s,l]=(0,Bs.useState)(null),u=(0,Bs.useMemo)(()=>({anchor:s,placement:"left-start",offset:36,shift:!0}),[s]),[c,f]=(0,TD.__experimentalUseDialog)({focusOnMount:"firstInputElement"}),m=(0,Bs.useMemo)(()=>({layout:Xr,fields:t.children?t.children:[{id:t.id,layout:Xr}]}),[t]),d=(0,Bs.useMemo)(()=>{if(o!==void 0)return t.children?o?.children:{[t.id]:o}},[o,t]),{fieldDefinition:h,fieldLabel:g,summaryFields:y}=O0(t);return h?(0,Qr.jsx)("div",{ref:l,className:"dataforms-layouts-panel__field-dropdown-anchor",children:(0,Qr.jsx)(el.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:u,focusOnMount:!1,onToggle:v=>{v||i(!0)},renderToggle:({isOpen:v,onToggle:b})=>(0,Qr.jsx)(Jm,{data:e,field:t,fieldLabel:g,summaryFields:y,validity:o,touched:n,disabled:h.readOnly===!0,onClick:b,"aria-expanded":v}),renderContent:({onClose:v})=>(0,Qr.jsx)(m$,{touched:n,children:(0,Qr.jsxs)("div",{ref:c,...f,children:[(0,Qr.jsx)(d$,{title:g,onClose:v}),(0,Qr.jsx)(Ho,{data:e,form:m,onChange:r,validity:d,children:(b,w,x,T)=>(0,Qr.jsx)(b,{data:e,field:w,onChange:r,hideLabelFromVision:(m?.fields??[]).length<2,markWhenOptional:T,validity:x},w.id)})]})})})}):null}var ED=p$;var rC=a(C(),1);function PD({data:e,field:t,onChange:r,validity:o}){return t.layout.openAs==="modal"?(0,rC.jsx)(_D,{data:e,field:t,onChange:r,validity:o}):(0,rC.jsx)(ED,{data:e,field:t,onChange:r,validity:o})}var tl=a(M(),1),RD=a(Qe(),1),Uo=a(B(),1),oC=a(j(),1);var F0=a(j(),1),AD=a(C(),1);function kD(e){if(!e)return 0;let t=0,r=Object.keys(e).filter(o=>o!=="children");for(let o of r)e[o]?.type==="invalid"&&t++;if(e.children)for(let o of Object.values(e.children))t+=kD(o);return t}function V0({validity:e}){let t=kD(e);return t===0?null:(0,AD.jsx)(Kb,{intent:"high",children:(0,F0.sprintf)((0,F0._n)("%d field needs attention","%d fields need attention",t),t)})}var Lr=a(C(),1);function h$(e,t,r){if(!t||Array.isArray(t)&&t.length===0)return!1;let n=(Array.isArray(t)?t:[t]).find(i=>typeof i=="string"?i===e.id:typeof i=="object"&&"id"in i?i.id===e.id:!1);return n?typeof n=="string"?!0:typeof n=="object"&&"visibility"in n?n.visibility==="always"||n.visibility==="when-collapsed"&&!r:!0:!1}function nC({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{fields:s}=(0,Uo.useContext)(kn),l=t.layout,u=(0,Uo.useRef)(null),c=(0,RD.useInstanceId)(nC,"dataforms-layouts-card-card-body"),f=(0,Uo.useMemo)(()=>({layout:Xr,fields:t.children??[]}),[t]),{isOpened:m,isCollapsible:d}=l,[h,g]=(0,Uo.useState)(m),[y,v]=(0,Uo.useState)(!1);(0,Uo.useEffect)(()=>{g(m)},[m]);let b=(0,Uo.useCallback)(()=>{g(S=>(S&&v(!0),!S))},[]),w=d?h:!0,x=(0,Uo.useCallback)(()=>{v(!0)},[v]);$a(u,w&&y);let E=R0(l.summary,s).filter(S=>h$(S,l.summary,w)),k=y&&l.isCollapsible?(0,Lr.jsx)(V0,{validity:i}):null,F={blockStart:"medium",blockEnd:"medium",inlineStart:"medium",inlineEnd:"medium"},P=t.label,V,N;if(t.children)V=!!P&&l.withHeader,N=(0,Lr.jsxs)(Lr.Fragment,{children:[t.description&&(0,Lr.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,Lr.jsx)(Ho,{data:e,form:f,onChange:r,validity:i?.children})]});else{let S=s.find(O=>O.id===t.id);if(!S||!S.Edit)return null;let I=wu("regular")?.component;if(!I)return null;P=S.label,V=!!P&&l.withHeader,N=(0,Lr.jsx)(I,{data:e,field:t,onChange:r,hideLabelFromVision:o||V,markWhenOptional:n,validity:i})}let A={blockStart:V?"none":"medium",blockEnd:"medium",inlineStart:"medium",inlineEnd:"medium"};return(0,Lr.jsxs)(tl.Card,{className:"dataforms-layouts-card__field",size:F,children:[V&&(0,Lr.jsxs)(tl.CardHeader,{className:"dataforms-layouts-card__field-header",onClick:d?b:void 0,style:{cursor:d?"pointer":void 0},isBorderless:!0,children:[(0,Lr.jsxs)("div",{style:{height:d?void 0:"40px",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,Lr.jsx)("span",{className:"dataforms-layouts-card__field-header-label",children:P}),k,E.length>0&&l.withHeader&&(0,Lr.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:E.map(S=>(0,Lr.jsx)(S.render,{item:e,field:S},S.id))})]}),d&&(0,Lr.jsx)(tl.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:w?qf:Wf,"aria-expanded":w,"aria-controls":c,"aria-label":w?(0,oC.__)("Collapse"):(0,oC.__)("Expand")})]}),(w||!V)&&(0,Lr.jsx)(tl.CardBody,{id:c,size:A,className:"dataforms-layouts-card__field-control",ref:u,onBlur:x,children:N})]})}var OD=a(M(),1);var Ar=a(C(),1);function g$({title:e}){return(0,Ar.jsx)(Q,{direction:"column",className:"dataforms-layouts-row__header",gap:"lg",children:(0,Ar.jsx)(Q,{direction:"row",align:"center",children:(0,Ar.jsx)(OD.__experimentalHeading,{level:2,size:13,children:e})})})}var v$=({children:e})=>(0,Ar.jsx)(Ar.Fragment,{children:e});function ID({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let s=t.layout;if(t.children){let u={layout:Xr,fields:t.children};return(0,Ar.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!o&&t.label&&(0,Ar.jsx)(g$,{title:t.label}),(0,Ar.jsx)(Q,{direction:"row",align:s.alignment,gap:"lg",children:(0,Ar.jsx)(Ho,{data:e,form:u,onChange:r,validity:i?.children,as:v$,children:(c,f,m)=>(0,Ar.jsx)("div",{className:"dataforms-layouts-row__field-control",style:s.styles[f.id],children:(0,Ar.jsx)(c,{data:e,field:f,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:m})},f.id)})})]})}let l=wu("regular")?.component;return l?(0,Ar.jsx)(Ar.Fragment,{children:(0,Ar.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,Ar.jsx)(l,{data:e,field:t,onChange:r,markWhenOptional:n,validity:i})})}):null}var Wo=a(B(),1),FD=a(j(),1);var js=a(C(),1);function VD({data:e,field:t,onChange:r,validity:o}){let{fields:n}=(0,Wo.useContext)(kn),i=(0,Wo.useRef)(null),s=(0,Wo.useRef)(null),[l,u]=(0,Wo.useState)(!1),[c,f]=(0,Wo.useState)(!1),m=(0,Wo.useMemo)(()=>({layout:Xr,fields:t.children??[]}),[t]);(0,Wo.useEffect)(()=>{let v=i.current;if(!v)return;let b=()=>{let w=v.open;w||u(!0),f(w)};return v.addEventListener("toggle",b),()=>{v.removeEventListener("toggle",b)}},[]),$a(s,c&&l);let d=(0,Wo.useCallback)(()=>{u(!0)},[]);if(!t.children)return null;let h=t.layout.summary??"",g=h?n.find(v=>v.id===h):void 0,y;return g&&g.render?y=(0,js.jsx)(g.render,{item:e,field:g}):y=t.label||(0,FD.__)("More details"),(0,js.jsxs)("details",{ref:i,className:"dataforms-layouts-details__details",children:[(0,js.jsx)("summary",{className:"dataforms-layouts-details__summary",children:(0,js.jsxs)(Q,{direction:"row",align:"center",gap:"md",className:"dataforms-layouts-details__summary-content",children:[y,l&&(0,js.jsx)(V0,{validity:o})]})}),(0,js.jsx)("div",{ref:s,className:"dataforms-layouts-details__content",onBlur:d,children:(0,js.jsx)(Ho,{data:e,form:m,onChange:r,validity:o?.children})})]})}var xu=a(C(),1),y$=[{type:"regular",component:lD,wrapper:({children:e})=>(0,xu.jsx)(Q,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e})},{type:"panel",component:PD,wrapper:({children:e})=>(0,xu.jsx)(Q,{direction:"column",className:"dataforms-layouts__wrapper",gap:"md",children:e})},{type:"card",component:nC,wrapper:({children:e})=>(0,xu.jsx)(Q,{direction:"column",className:"dataforms-layouts__wrapper",gap:"xl",children:e})},{type:"row",component:ID,wrapper:({children:e,layout:t})=>(0,xu.jsx)(Q,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:(0,xu.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,xu.jsx)(Q,{direction:"row",gap:"lg",align:t.alignment,children:e})})})},{type:"details",component:VD}];function wu(e){return y$.find(t=>t.type===e)}var N0=a(C(),1),b$=({children:e})=>(0,N0.jsx)(Q,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e});function Ho({data:e,form:t,onChange:r,validity:o,children:n,as:i}){let{fields:s}=(0,D0.useContext)(kn),l=(0,D0.useMemo)(()=>{let f=s.filter(d=>!!d.isValid?.required).length,m=s.length-f;return f>m},[s]);function u(f){return s.find(m=>m.id===f.id)}let c=i??wu(t.layout.type)?.wrapper??b$;return(0,N0.jsx)(c,{layout:t.layout,children:t.fields.map(f=>{let m=wu(f.layout.type)?.component;if(!m)return null;let d=f.children?void 0:u(f);return d&&d.isVisible&&!d.isVisible(e)?null:n?n(m,f,o?.[f.id],l):(0,N0.jsx)(m,{data:e,field:f,onChange:r,markWhenOptional:l,validity:o?.[f.id]},f.id)})})}var sC=a(C(),1);function aC({data:e,form:t,fields:r,onChange:o,validity:n}){let i=(0,iC.useMemo)(()=>P0(t),[t]),s=(0,iC.useMemo)(()=>Ls(r),[r]);return t.fields?(0,sC.jsx)(iD,{fields:s,children:(0,sC.jsx)(Ho,{data:e,form:i,onChange:o,validity:n})}):null}var DD=a(C2(),1),LD=a(vl(),1);function ND(e=""){return(0,DD.default)(e.trim().toLowerCase())}var w$=[];function zs(e,t,r){if(!e)return{data:w$,paginationInfo:{totalItems:0,totalPages:0}};let o=Ls(r),n=[...e];if(t.search){let c=ND(t.search);n=n.filter(f=>o.filter(m=>m.enableGlobalSearch).some(m=>{let d=m.getValue({item:f});return(Array.isArray(d)?d:[d]).some(g=>ND(String(g)).includes(c))}))}t.filters&&t.filters?.length>0&&t.filters.forEach(c=>{let f=o.find(m=>m.id===c.field);if(f){c.operator===_r&&(0,LD.default)("The 'isNotAll' filter operator",{since:"7.0",alternative:"'isNone'"});let m=f.filter[c.operator];m&&(n=n.filter(d=>m(d,f,c.value)))}});let i=t.sort?.field?o.find(c=>c.enableSorting!==!1&&c.id===t.sort?.field):null,s=t.groupBy?.field?o.find(c=>c.enableSorting!==!1&&c.id===t.groupBy?.field):null;(i||s)&&n.sort((c,f)=>{if(s){let m=s.sort(c,f,t.groupBy?.direction??"asc");if(m!==0)return m}return i?i.sort(c,f,t.sort?.direction??"desc"):0});let l=n.length,u=1;if(t.page!==void 0&&t.perPage!==void 0){let c=(t.page-1)*t.perPage;l=n?.length||0,u=Math.ceil(l/t.perPage),n=n?.slice(c,c+t.perPage)}return{data:n,paginationInfo:{totalItems:l,totalPages:u}}}var Z0=a(he(),1),PL=a(Ke(),1),AL=a(Ne(),1);var MD=Object.prototype.hasOwnProperty;function BD(e,t,r){for(r of e.keys())if(rl(r,t))return r}function rl(e,t){var r,o,n;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((o=e.length)===t.length)for(;o--&&rl(e[o],t[o]););return o===-1}if(r===Set){if(e.size!==t.size)return!1;for(o of e)if(n=o,n&&typeof n=="object"&&(n=BD(t,n),!n)||!t.has(n))return!1;return!0}if(r===Map){if(e.size!==t.size)return!1;for(o of e)if(n=o[0],n&&typeof n=="object"&&(n=BD(t,n),!n)||!rl(o[1],t.get(n)))return!1;return!0}if(r===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(r===DataView){if((o=e.byteLength)===t.byteLength)for(;o--&&e.getInt8(o)===t.getInt8(o););return o===-1}if(ArrayBuffer.isView(e)){if((o=e.byteLength)===t.byteLength)for(;o--&&e[o]===t[o];);return o===-1}if(!r||typeof e=="object"){o=0;for(r in e)if(MD.call(e,r)&&++o&&!MD.call(t,r)||!(r in t)||!rl(e[r],t[r]))return!1;return Object.keys(t).length===o}}return e!==e&&t!==t}var $m=a(B(),1),j0=a(re(),1),lC=a(Ao(),1);function L0(e,t,r){return`dataviews-${e}-${t}-${r}`}var jD=["titleField","mediaField","descriptionField","showTitle","showMedia","showDescription","showLevels","infiniteScrollEnabled"];function M0(e,t,r){if(!t)return e;let o=e;for(let n of jD)n in t&&(o={...o,[n]:t[n]});if(t.filters&&t.filters.length>0){let n=new Set(t.filters.map(s=>s.field)),i=(e.filters??[]).filter(s=>!n.has(s.field));o={...o,filters:[...i,...t.filters]}}return t.sort&&r&&e.sort?.field===r.sort?.field&&e.sort?.direction===r.sort?.direction&&(o={...o,sort:t.sort}),t.layout&&(o={...o,layout:{...o.layout,...t.layout}}),t.groupBy&&(o={...o,groupBy:t.groupBy}),o}function B0(e,t,r){if(!t)return e;let o=e;for(let n of jD)if(n in t){let{[n]:i,...s}=o;o=s}if(t.filters&&t.filters.length>0){let n=new Set(t.filters.map(i=>i.field));o={...o,filters:(e.filters??[]).filter(i=>!n.has(i.field))}}if(t.sort&&e.sort?.field===t.sort.field&&e.sort?.direction===t.sort.direction&&(o={...o,sort:r?.sort}),t.layout&&"layout"in o&&o.layout){let n={...o.layout};for(let i of Object.keys(t.layout))delete n[i];o={...o,layout:Object.keys(n).length>0?n:void 0}}if(t.groupBy&&"groupBy"in o){let{groupBy:n,...i}=o;o=i}return o}function x$(e,t){let r={...e};for(let o of t)delete r[o];return r}function Gs(e){let{kind:t,name:r,slug:o,defaultView:n,activeViewOverrides:i,queryParams:s,onChangeQueryParams:l}=e,u=L0(t,r,o),c=(0,j0.useSelect)(w=>w(lC.store).get("core/views",u),[u]),{set:f}=(0,j0.useDispatch)(lC.store),m=c??n,d=Number(s?.page??m.page??1),h=s?.search??m.search??"",g=(0,$m.useMemo)(()=>M0({...m,page:d,search:h},i,n),[m,d,h,i,n]),y=!!c,v=(0,$m.useCallback)(w=>{let x={page:w?.page,search:w?.search},T=B0(x$(w,["page","search"]),i,n);l&&!rl(x,{page:d,search:h})&&l(x);let E=B0(m,i,n),k=B0(n,i,n);rl(E,T)||(rl(T,k)?f("core/views",u,void 0):f("core/views",u,T))},[l,d,h,m,n,i,f,u]),b=(0,$m.useCallback)(()=>{f("core/views",u,void 0)},[u,f]);return{view:g,isModified:y,updateView:v,resetToDefault:b}}var zD=a(re(),1),GD=a(Ao(),1);async function ep(e){let{kind:t,name:r,slug:o,defaultView:n,activeViewOverrides:i,queryParams:s}=e,l=L0(t,r,o),c=(0,zD.select)(GD.store).get("core/views",l)??n,f=s?.page??1,m=s?.search??"";return M0({...c,page:f,search:m},i,n)}var kL=a(re(),1),RL=a(bt(),1);var HD=a(he(),1),uC=a(re(),1),z0=a(B(),1),UD=a(yt(),1),WD=a(Ke(),1);var{useGlobalStyles:S$}=L(WD.privateApis),{globalStylesDataKey:_$}=L(UD.privateApis);function G0(){let{merged:e}=S$(),t=(0,uC.useSelect)(u=>{let{getSettings:c}=L(u(Re));return c()},[]),r=t.__experimentalAdditionalBlockPatterns??t.__experimentalBlockPatterns,o=(0,uC.useSelect)(u=>u(HD.store).getBlockPatterns(),[]),n=(0,z0.useMemo)(()=>[...r||[],...o||[]].filter(Rc),[r,o]),[i,s]=(0,z0.useMemo)(()=>Wd(e,[],{disableRootPadding:!1}),[e]);return(0,z0.useMemo)(()=>{let{__experimentalAdditionalBlockPatterns:u,styles:c,__experimentalFeatures:f,...m}=t,d=(c??[]).filter(h=>!h.isGlobalStyles);return{...m,styles:[...d,...i],__experimentalFeatures:s,[_$]:e.styles??{},__experimentalBlockPatterns:n,isPreviewMode:!0}},[t,n,i,s,e])}var W0=a(M(),1),lL=a(j(),1);var qD=a(M(),1),tp=a(B(),1),rp=a(j(),1);var op=a(re(),1),YD=a(Ne(),1),H0=a(xp(),1),ZD=a(Mn(),1),KD=a(he(),1),XD=a(Ke(),1);var Hs=a(C(),1),{useHistory:C$,useLocation:T$}=L(YD.privateApis),{CreatePatternModal:E$,useAddPatternCategory:P$}=L(H0.privateApis),{CreateTemplatePartModal:A$}=L(XD.privateApis);function QD(){let e=C$(),t=T$(),[r,o]=(0,tp.useState)(!1),[n,i]=(0,tp.useState)(!1),{createPatternFromFile:s}=L((0,op.useDispatch)(H0.store)),{createSuccessNotice:l,createErrorNotice:u}=(0,op.useDispatch)(ZD.store),c=(0,tp.useRef)(),{isBlockBasedTheme:f,addNewPatternLabel:m,addNewTemplatePartLabel:d,canCreatePattern:h,canCreateTemplatePart:g}=(0,op.useSelect)(E=>{let{getCurrentTheme:k,getPostType:F,canUser:P}=E(KD.store);return{isBlockBasedTheme:k()?.is_block_theme,addNewPatternLabel:F(ke.user)?.labels?.add_new_item,addNewTemplatePartLabel:F(ze)?.labels?.add_new_item,canCreatePattern:P("create",{kind:"postType",name:ke.user}),canCreateTemplatePart:P("create",{kind:"postType",name:ze})}},[]);function y({pattern:E}){o(!1),e.navigate(`/${ke.user}/${E.id}?canvas=edit`)}function v(E){i(!1),e.navigate(`/${ze}/${E.id}?canvas=edit`)}function b(){o(!1),i(!1)}let w=[];h&&w.push({icon:ld,onClick:()=>o(!0),title:m}),f&&g&&w.push({icon:Tw,onClick:()=>i(!0),title:d}),h&&w.push({icon:Iw,onClick:()=>{c.current.click()},title:(0,rp.__)("Import pattern from JSON")});let{categoryMap:x,findOrCreateTerm:T}=P$();return w.length===0?null:(0,Hs.jsxs)(Hs.Fragment,{children:[m&&(0,Hs.jsx)(qD.DropdownMenu,{controls:w,icon:null,toggleProps:{variant:"primary",showTooltip:!1,__next40pxDefaultSize:!0},text:m,label:m}),r&&(0,Hs.jsx)(E$,{onClose:()=>o(!1),onSuccess:y,onError:b}),n&&(0,Hs.jsx)(A$,{closeModal:()=>i(!1),blocks:[],onCreate:v,onError:b}),(0,Hs.jsx)("input",{type:"file",accept:".json",hidden:!0,ref:c,onChange:async E=>{let k=E.target.files?.[0];if(k)try{let F;if(t.query.postType!==ze){let V=Array.from(x.values()).find(N=>N.name===t.query.categoryId);V&&(F=V.id||await T(V.label))}let P=await s(k,F?[F]:void 0);!F&&t.query.categoryId!=="my-patterns"&&e.navigate(`/pattern?categoryId=${Zo}`),l((0,rp.sprintf)((0,rp.__)('Imported "%s" from JSON.'),P.title.raw),{type:"snackbar",id:"import-pattern-success"})}catch(F){u(F.message,{type:"snackbar",id:"import-pattern-error"})}finally{E.target.value=""}}})]})}var JD=a(M(),1),$D=a(B(),1),eL=a(j(),1),tL=a(xp(),1);var ol=a(C(),1),{RenamePatternCategoryModal:k$}=L(tL.privateApis);function rL({category:e,onClose:t}){let[r,o]=(0,$D.useState)(!1);return(0,ol.jsxs)(ol.Fragment,{children:[(0,ol.jsx)(JD.MenuItem,{onClick:()=>o(!0),children:(0,eL.__)("Rename")}),r&&(0,ol.jsx)(R$,{category:e,onClose:()=>{o(!1),t()}})]})}function R$({category:e,onClose:t}){let r={id:e.id,slug:e.slug,name:e.label},o=Pa();return(0,ol.jsx)(k$,{category:r,existingCategories:o,onClose:t,overlayClassName:"edit-site-list__rename-modal",focusOnMount:"firstContentElement",size:"small"})}var U0=a(M(),1),oL=a(he(),1),cC=a(re(),1),nL=a(B(),1),fC=a(mr(),1),Rn=a(j(),1),iL=a(Mn(),1),sL=a(Ne(),1);var Su=a(C(),1),{useHistory:O$}=L(sL.privateApis);function aL({category:e,onClose:t}){let[r,o]=(0,nL.useState)(!1),n=O$(),{createSuccessNotice:i,createErrorNotice:s}=(0,cC.useDispatch)(iL.store),{deleteEntityRecord:l,invalidateResolution:u}=(0,cC.useDispatch)(oL.store),c=async()=>{try{await l("taxonomy","wp_pattern_category",e.id,{force:!0},{throwOnError:!0}),u("getUserPatternCategories"),u("getEntityRecords",["postType",ke.user,{per_page:-1}]),i((0,Rn.sprintf)((0,Rn._x)('"%s" deleted.',"pattern category"),e.label),{type:"snackbar",id:"pattern-category-delete"}),t?.(),n.navigate(`/pattern?categoryId=${Zo}`)}catch(f){let m=f.message&&f.code!=="unknown_error"?f.message:(0,Rn.__)("An error occurred while deleting the pattern category.");s(m,{type:"snackbar",id:"pattern-category-delete"})}};return(0,Su.jsxs)(Su.Fragment,{children:[(0,Su.jsx)(U0.MenuItem,{isDestructive:!0,onClick:()=>o(!0),children:(0,Rn.__)("Delete")}),(0,Su.jsx)(U0.__experimentalConfirmDialog,{isOpen:r,onConfirm:c,onCancel:()=>o(!1),confirmButtonText:(0,Rn.__)("Delete"),className:"edit-site-patterns__delete-modal",title:(0,Rn.sprintf)((0,Rn._x)('Delete "%s"?',"pattern category"),(0,fC.decodeEntities)(e.label)),size:"medium",__experimentalHideHeader:!1,children:(0,Rn.sprintf)((0,Rn.__)('Are you sure you want to delete the category "%s"? The patterns will not be deleted.'),(0,fC.decodeEntities)(e.label))})]})}var Wi=a(C(),1);function uL({categoryId:e,type:t}){let{patternCategories:r}=Pa(),o;return t===ke.user&&e&&(o=r.find(n=>n.name===e)),(0,Wi.jsxs)(Wi.Fragment,{children:[(0,Wi.jsx)(QD,{}),!!o?.id&&(0,Wi.jsx)(W0.DropdownMenu,{icon:Dn,label:(0,lL.__)("Actions"),toggleProps:{className:"edit-site-patterns__button",size:"compact"},children:({onClose:n})=>(0,Wi.jsxs)(W0.MenuGroup,{children:[(0,Wi.jsx)(rL,{category:o,onClose:n}),(0,Wi.jsx)(aL,{category:o,onClose:n})]})})]})}var np=a(j(),1);var Y0=a(B(),1),cL=a(Ne(),1),ip=a(re(),1),q0=a(he(),1),fL=a(bt(),1);var{useLocation:I$,useHistory:dL}=L(cL.privateApis),mL=()=>{let e=(0,ip.useSelect)(n=>n(q0.store).getCurrentTheme()),{getEntityRecord:t}=(0,ip.useSelect)(q0.store),{editEntityRecord:r,saveEditedEntityRecord:o}=(0,ip.useDispatch)(q0.store);return(0,Y0.useMemo)(()=>({id:"set-active-template",label(n){return n.some(i=>i._isActive)?(0,np.__)("Deactivate"):(0,np.__)("Activate")},isPrimary:!0,icon:ci,isEligible(n){return n.theme!==e.stylesheet?!1:typeof n.id!="number"?n._isActive===!1:!0},async callback(n){let i=n.some(l=>l._isActive),s={...await t("root","site").active_templates??{}};for(let l of n)i?delete s[l.slug]:s[l.slug]=l.id;await r("root","site",void 0,{active_templates:s}),await o("root","site")}}),[r,o,t,e])},nl=()=>{let e=dL();return(0,Y0.useMemo)(()=>({id:"edit-post",label:(0,np.__)("Edit"),icon:ci,isEligible(t){return t.status==="trash"?!1:t.type!==ke.theme},callback(t){let r=t[0];e.navigate(`/${r.type}/${r.id}?canvas=edit`)}}),[e])},pL=()=>{let e=dL(),{path:t,query:r}=I$();return(0,Y0.useMemo)(()=>({id:"quick-edit",label:(0,np.__)("Quick Edit"),icon:F1,isPrimary:!0,supportsBulk:!0,isEligible(o){return o.status==="trash"?!1:o.type==="page"},callback(o){e.navigate((0,fL.addQueryArgs)(t,{...r,quickEdit:!0,postId:o.map(n=>n.id).join(",")}))}}),[e,t,r])};var yL=a(M(),1),ri=a(j(),1),yf=a(B(),1),dC=a(yt(),1);var bL=a(Gr(),1),wL=a(Ke(),1);var hL=a(he(),1),gL=a(re(),1);function il(e,t){return(0,gL.useSelect)(r=>{let{getEntityRecord:o,getUser:n,getEditedEntityRecord:i}=r(hL.store),s=i("postType",e,t),l=s?.original_source,u=s?.author_text;switch(l){case"theme":return{type:l,icon:Nn,text:u,isCustomized:s.source===Ob.custom};case"plugin":return{type:l,icon:dw,text:u,isCustomized:s.source===Ob.custom};case"site":{let c=o("root","__unstableBase");return{type:l,icon:U1,imageUrl:c?.site_logo?o("postType","attachment",c.site_logo)?.source_url:void 0,text:u,isCustomized:!1}}default:{let c=n(s.author);return{type:"user",icon:es,imageUrl:c?.avatar_urls?.[48],text:u??c?.name,isCustomized:!1}}}},[e,t])}var un=a(C(),1),{useStyle:F$}=L(wL.privateApis);function V$({item:e}){let t=(0,yf.useId)(),r=e.description||e?.excerpt?.raw,o=e.type===ze,n=F$("color.background"),i=(0,yf.useMemo)(()=>e.blocks??(0,bL.parse)(e.content.raw,{__unstableSkipMigrationLogs:!0}),[e?.content?.raw,e.blocks]),s=!i?.length;return(0,un.jsxs)("div",{className:"page-patterns-preview-field",style:{backgroundColor:n},"aria-describedby":r?t:void 0,children:[s&&o&&(0,ri.__)("Empty template part"),s&&!o&&(0,ri.__)("Empty pattern"),!s&&(0,un.jsx)(dC.BlockPreview.Async,{children:(0,un.jsx)(dC.BlockPreview,{blocks:i,viewportWidth:e.viewportWidth})}),!!r&&(0,un.jsx)("div",{hidden:!0,id:t,children:r})]})}var xL={label:(0,ri.__)("Preview"),id:"preview",render:V$,enableSorting:!1},vL=[{value:Qi.full,label:(0,ri._x)("Synced","pattern (singular)"),description:(0,ri.__)("Patterns that are kept in sync across the site.")},{value:Qi.unsynced,label:(0,ri._x)("Not synced","pattern (singular)"),description:(0,ri.__)("Patterns that can be changed freely without affecting the site.")}],SL={label:(0,ri.__)("Sync status"),id:"sync-status",render:({item:e})=>{let t="wp_pattern_sync_status"in e?e.wp_pattern_sync_status||Qi.full:Qi.unsynced;return(0,un.jsx)("span",{className:`edit-site-patterns__field-sync-status-${t}`,children:vL.find(({value:r})=>r===t).label})},elements:vL,filterBy:{operators:[cT],isPrimary:!0},enableSorting:!1};function N$({item:e}){let[t,r]=(0,yf.useState)(!1),{text:o,icon:n,imageUrl:i}=il(e.type,e.id);return(0,un.jsxs)(yL.__experimentalHStack,{alignment:"left",spacing:0,children:[i&&(0,un.jsx)("div",{className:Z("page-templates-author-field__avatar",{"is-loaded":t}),children:(0,un.jsx)("img",{onLoad:()=>r(!0),alt:"",src:i})}),!i&&(0,un.jsx)("div",{className:"page-templates-author-field__icon",children:(0,un.jsx)(ui,{icon:n})}),(0,un.jsx)("span",{className:"page-templates-author-field__name",children:o})]})}var _L={label:(0,ri.__)("Author"),id:"author",getValue:({item:e})=>e.author_text,render:N$,filterBy:{isPrimary:!0}};var ap=a(C(),1),{ExperimentalBlockEditorProvider:D$}=L(EL.privateApis),{usePostActions:CL,patternTitleField:L$}=L(PL.privateApis),{useLocation:M$,useHistory:B$}=L(AL.privateApis),TL=[],OL={[uT]:{layout:{styles:{author:{width:"1%"}}}},[Tp]:{layout:{badgeFields:["sync-status"]}}},j$={type:Tp,perPage:20,titleField:"title",mediaField:"preview",fields:["sync-status"],filters:[],...OL[Tp]};function z$(e,t){let{patternCategories:r}=Pa(),o=(0,kL.useSelect)(l=>l(Z0.store).getCurrentTheme()?.default_template_part_areas||[],[]),n,i,s;if(e===ze){let l=o.find(u=>u.area===t);n=l?.label||(0,mC.__)("All Template Parts"),i=l?.description||(0,mC.__)("Includes every template part defined for any area.")}else e===ke.user&&t&&(s=r.find(l=>l.name===t),n=s?.label,i=s?.description);return{title:n,description:i}}function pC(){let{path:e,query:t}=M$(),{postType:r="wp_block",categoryId:o}=t,n=B$(),i=o||Zo,{view:s,updateView:l,isModified:u,resetToDefault:c}=Gs({kind:"postType",name:r,slug:"default",defaultView:j$,queryParams:{page:t.pageNumber,search:t.search},onChangeQueryParams:N=>{n.navigate((0,RL.addQueryArgs)(e,{...t,pageNumber:N.page,search:N.search}))}}),f=s.filters?.find(({field:N})=>N==="sync-status")?.value,{patterns:m,isResolving:d}=Wv(r,i,{search:s.search,syncStatus:f}),{records:h}=(0,Z0.useEntityRecords)("postType",ze,{per_page:-1}),g=(0,sp.useMemo)(()=>{if(!h)return TL;let N=new Set;return h.forEach(A=>{N.add(A.author_text)}),Array.from(N).map(A=>({value:A,label:A}))},[h]),y=(0,sp.useMemo)(()=>{let N=[xL,L$];return r===ke.user?N.push(SL):r===ze&&N.push({..._L,elements:g}),N},[r,g]),{data:v,paginationInfo:b}=(0,sp.useMemo)(()=>{let N={...s};return delete N.search,r!==ze&&(N.filters=[]),zs(m,N,y)},[m,s,y,r]),w=w6(v),x=CL({postType:ze,context:"list"}),T=CL({postType:ke.user,context:"list"}),E=nl(),k=(0,sp.useMemo)(()=>r===ze?[E,...x].filter(Boolean):[E,...T].filter(Boolean),[E,r,x,T]),F=G0(),{title:P,description:V}=z$(r,i);return(0,ap.jsx)(D$,{settings:F,children:(0,ap.jsx)(Ln,{className:"edit-site-page-patterns-dataviews",title:P,headingLevel:2,subTitle:V,actions:(0,ap.jsx)(uL,{categoryId:i,type:r}),children:(0,ap.jsx)(Ms,{paginationInfo:b,fields:y,actions:k,data:w||TL,getItemId:N=>N.name??N.id,isLoading:d,isItemClickable:N=>N.type!==ke.theme,onClickItem:N=>{n.navigate(`/${N.type}/${[ke.user,ze].includes(N.type)?N.id:N.name}?canvas=edit`)},view:s,onChangeView:l,defaultLayouts:OL,onReset:u?c:!1},i+r)})})}var lp=a(C(),1),IL={name:"patterns",path:"/pattern",areas:{sidebar({siteData:e}){let r=e.currentTheme?.is_block_theme||Jo(e)?"/":void 0;return(0,lp.jsx)(Ql,{backPath:r})},content:(0,lp.jsx)(pC,{}),mobile({siteData:e,query:t}){let{categoryId:r}=t,n=e.currentTheme?.is_block_theme||Jo(e)?"/":void 0;return r?(0,lp.jsx)(pC,{}):(0,lp.jsx)(Ql,{backPath:n})}}};var K0=a(C(),1),FL={name:"pattern-item",path:"/wp_block/:postId",areas:{sidebar({siteData:e}){let r=e.currentTheme?.is_block_theme||Jo(e)?"/":void 0;return(0,K0.jsx)(Ql,{backPath:r})},mobile:(0,K0.jsx)(st,{}),preview:(0,K0.jsx)(st,{})}};var X0=a(C(),1),VL={name:"template-part-item",path:"/wp_template_part/*postId",areas:{sidebar:(0,X0.jsx)(Ql,{backPath:"/"}),mobile:(0,X0.jsx)(st,{}),preview:(0,X0.jsx)(st,{})}};var vC=a(j(),1);var NL=a(he(),1),DL=a(B(),1),LL=a(M(),1),hC=a(j(),1),ML=a(Ne(),1),gC=a(bt(),1);var _u=a(C(),1),{useLocation:G$}=L(ML.privateApis),H$=[];function U$({template:e,isActive:t}){let{text:r,icon:o}=il(e.type,e.id);return(0,_u.jsx)(zt,{to:(0,gC.addQueryArgs)("/template",{activeView:r}),icon:o,"aria-current":t,children:r})}function BL(){let{query:{activeView:e="active"}}=G$(),{records:t}=(0,NL.useEntityRecords)("root","registeredTemplate",{per_page:-1}),r=(0,DL.useMemo)(()=>{let o=t?.reduce((n,i)=>{let s=i.author_text;return s&&!n[s]&&(n[s]=i),n},{});return(o&&Object.values(o))??H$},[t]);return(0,_u.jsxs)(LL.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-templates-browse",children:[(0,_u.jsx)(zt,{to:"/template",icon:id,"aria-current":e==="active",children:(0,hC.__)("Active templates")}),(0,_u.jsx)(zt,{to:(0,gC.addQueryArgs)("/template",{activeView:"user"}),icon:es,"aria-current":e==="user",children:(0,hC.__)("Created templates")}),r.map(o=>(0,_u.jsx)(U$,{template:o,isActive:e===o.author_text},o.author_text))]})}var jL=a(he(),1),zL=a(B(),1),GL=a(M(),1),HL=a(j(),1),UL=a(Ne(),1),WL=a(bt(),1);var bf=a(C(),1),{useLocation:W$}=L(UL.privateApis),q$=[];function Y$({template:e,isActive:t}){let{text:r,icon:o}=il(e.type,e.id);return(0,bf.jsx)(zt,{to:(0,WL.addQueryArgs)("/template",{activeView:r}),icon:o,"aria-current":t,children:r})}function qL(){let{query:{activeView:e="all"}}=W$(),{records:t}=(0,jL.useEntityRecords)("postType",Xe,{per_page:-1}),r=(0,zL.useMemo)(()=>{let o=t?.reduce((n,i)=>{let s=i.author_text;return s&&!n[s]&&(n[s]=i),n},{});return(o&&Object.values(o))??q$},[t]);return(0,bf.jsxs)(GL.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-templates-browse",children:[(0,bf.jsx)(zt,{to:"/template",icon:Nn,"aria-current":e==="all",children:(0,HL.__)("All templates")}),r.map(o=>(0,bf.jsx)(Y$,{template:o,isActive:e===o.author_text},o.author_text))]})}var Q0=a(C(),1);function J0({backPath:e}){return(0,Q0.jsx)(wr,{title:(0,vC.__)("Templates"),description:(0,vC.__)("Create new templates, or reset any customizations made to the templates supplied by your theme."),backPath:e,content:window?.__experimentalTemplateActivate?(0,Q0.jsx)(BL,{}):(0,Q0.jsx)(qL,{})})}var ll=a(j(),1),PM=a(mr(),1),fn=a(B(),1),Af=a(he(),1);var AM=a(Ne(),1),kM=a(Ke(),1),TC=a(bt(),1),fp=a(re(),1),RM=a(Qe(),1);var OM=a(M(),1),IM=a(Mn(),1);var Mr=a(M(),1),pM=a(mr(),1),oi=a(B(),1),Cf=a(re(),1),eb=a(he(),1),hM=a(Qe(),1);var wo=a(j(),1),gM=a(Mn(),1),vM=a(Ne(),1),yM=a(_l(),1);var Us=a(B(),1),sl=a(j(),1),nt=a(M(),1),rM=a(he(),1),oM=a(mr(),1),nM=a(Qe(),1),iM=a(_l(),1),sM=a(bt(),1);var wf=a(re(),1),xf=a(he(),1),YL=a(mr(),1),yo=a(B(),1),ut=a(j(),1);var ZL=a(bt(),1);var Z$={},K$=(e,t)=>{let r=e;return t.split(".").forEach(o=>{r=r?.[o]}),r};function yC(e,t){return`${e}-${(0,ZL.safeDecodeURI)(t)}`}var KL=(e,t)=>(e||[]).map(r=>({...r,name:(0,YL.decodeEntities)(K$(r,t))})),bC=()=>(0,wf.useSelect)(e=>e(xf.store).getEntityRecords("postType",Xe,{per_page:-1}),[]),Cu=()=>(0,wf.useSelect)(e=>e(xf.store).getCurrentTheme()?.default_template_types||[],[]),XL=()=>{let e=(0,wf.useSelect)(t=>t(xf.store).getPostTypes({per_page:-1}),[]);return(0,yo.useMemo)(()=>{let t=["attachment"];return e?.filter(({viewable:r,slug:o})=>r&&!t.includes(o)).sort((r,o)=>r.slug==="post"||o.slug==="post"?0:r.name.localeCompare(o.name))},[e])},X$=()=>{let e=(0,wf.useSelect)(t=>t(xf.store).getTaxonomies({per_page:-1}),[]);return(0,yo.useMemo)(()=>e?.filter(({visibility:t})=>t?.publicly_queryable),[e])};function QL(){let e=XL(),t=(0,yo.useMemo)(()=>e?.filter(i=>i.has_archive),[e]),r=bC(),o=(0,yo.useMemo)(()=>e?.reduce((i,{labels:s})=>{let l=s.singular_name.toLowerCase();return i[l]=(i[l]||0)+1,i},{}),[e]),n=(0,yo.useCallback)(({labels:i,slug:s})=>{let l=i.singular_name.toLowerCase();return o[l]>1&&l!==s},[o]);return(0,yo.useMemo)(()=>t?.filter(i=>!(r||[]).some(s=>s.slug==="archive-"+i.slug)).map(i=>{let s;return n(i)?s=(0,ut.sprintf)((0,ut.__)("Archive: %1$s (%2$s)"),i.labels.singular_name,i.slug):s=(0,ut.sprintf)((0,ut.__)("Archive: %s"),i.labels.singular_name),{slug:"archive-"+i.slug,description:(0,ut.sprintf)((0,ut.__)("Displays an archive with the latest posts of type: %s."),i.labels.singular_name),title:s,icon:typeof i.icon=="string"&&i.icon.startsWith("dashicons-")?i.icon.slice(10):Ji,templatePrefix:"archive"}})||[],[t,r,n])}var JL=e=>{let t=XL(),r=Cu(),o=(0,yo.useMemo)(()=>t?.reduce((c,{labels:f})=>{let m=(f.template_name||f.singular_name).toLowerCase();return c[m]=(c[m]||0)+1,c},{}),[t]),n=(0,yo.useCallback)(({labels:c,slug:f})=>{let m=(c.template_name||c.singular_name).toLowerCase();return o[m]>1&&m!==f},[o]),i=(0,yo.useMemo)(()=>t?.reduce((c,{slug:f})=>{let m=f;return f!=="page"&&(m=`single-${m}`),c[f]=m,c},{}),[t]),s=wC("postType",i),l=(t||[]).reduce((c,f)=>{let{slug:m,labels:d,icon:h}=f,g=i[m],y=r?.find(({slug:T})=>T===g),v=n(f),b=d.template_name||(0,ut.sprintf)((0,ut.__)("Single item: %s"),d.singular_name);v&&(b=d.template_name?(0,ut.sprintf)((0,ut._x)("%1$s (%2$s)","post type menu label"),d.template_name,m):(0,ut.sprintf)((0,ut._x)("Single item: %1$s (%2$s)","post type menu label"),d.singular_name,m));let w=y?{...y,templatePrefix:i[m]}:{slug:g,title:b,description:(0,ut.sprintf)((0,ut.__)("Displays a single item: %s."),d.singular_name),icon:typeof h=="string"&&h.startsWith("dashicons-")?h.slice(10):nd,templatePrefix:i[m]},x=s?.[m]?.hasEntities;return x&&(w.onClick=T=>{e({type:"postType",slug:m,config:{recordNamePath:"title.rendered",queryArgs:({search:E})=>({_fields:"id,title,slug,link",orderBy:E?"relevance":"modified",exclude:s[m].existingEntitiesIds}),getSpecificTemplate:E=>{let k=yC(i[m],E.slug);return{title:k,slug:k,templatePrefix:i[m]}}},labels:d,template:T})}),x&&c.push(w),c},[]);return(0,yo.useMemo)(()=>l.reduce((c,f)=>{let{slug:m}=f,d="postTypesMenuItems";return m==="page"&&(d="defaultPostTypesMenuItems"),c[d].push(f),c},{defaultPostTypesMenuItems:[],postTypesMenuItems:[]}),[l])},$L=e=>{let t=X$(),r=bC(),o=Cu(),n=(0,yo.useMemo)(()=>t?.reduce((m,{slug:d})=>{let h=d;return["category","post_tag"].includes(d)||(h=`taxonomy-${h}`),d==="post_tag"&&(h="tag"),m[d]=h,m},{}),[t]),i=t?.reduce((m,{labels:d})=>{let h=(d.template_name||d.singular_name).toLowerCase();return m[h]=(m[h]||0)+1,m},{}),s=(m,d)=>{if(["category","post_tag"].includes(d))return!1;let h=(m.template_name||m.singular_name).toLowerCase();return i[h]>1&&h!==d},l=wC("taxonomy",n),u=(r||[]).map(({slug:m})=>m),c=(t||[]).reduce((m,d)=>{let{slug:h,labels:g}=d,y=n[h],v=o?.find(({slug:k})=>k===y),b=u?.includes(y),w=s(g,h),x=g.template_name||g.singular_name;w&&(x=g.template_name?(0,ut.sprintf)((0,ut._x)("%1$s (%2$s)","taxonomy template menu label"),g.template_name,h):(0,ut.sprintf)((0,ut._x)("%1$s (%2$s)","taxonomy menu label"),g.singular_name,h));let T=v?{...v,templatePrefix:n[h]}:{slug:y,title:x,description:(0,ut.sprintf)((0,ut.__)("Displays taxonomy: %s."),g.singular_name),icon:$i,templatePrefix:n[h]},E=l?.[h]?.hasEntities;return E&&(T.onClick=k=>{e({type:"taxonomy",slug:h,config:{queryArgs:({search:F})=>({_fields:"id,name,slug,link",orderBy:F?"name":"count",exclude:l[h].existingEntitiesIds}),getSpecificTemplate:F=>{let P=yC(n[h],F.slug);return{title:P,slug:P,templatePrefix:n[h]}}},labels:g,hasGeneralTemplate:b,template:k})}),(!b||E)&&m.push(T),m},[]);return(0,yo.useMemo)(()=>c.reduce((m,d)=>{let{slug:h}=d,g="taxonomiesMenuItems";return["category","tag"].includes(h)&&(g="defaultTaxonomiesMenuItems"),m[g].push(d),m},{defaultTaxonomiesMenuItems:[],taxonomiesMenuItems:[]}),[c])},Q$={user:"author"},J$={user:{who:"authors"}};function eM(e){let t=bC(),r=Cu(),o=wC("root",Q$,J$),n=r?.find(({slug:s})=>s==="author");n||(n={description:(0,ut.__)("Displays latest posts written by a single author."),slug:"author",title:"Author"});let i=!!t?.find(({slug:s})=>s==="author");if(o.user?.hasEntities&&(n={...n,templatePrefix:"author"},n.onClick=s=>{e({type:"root",slug:"user",config:{queryArgs:({search:l})=>({_fields:"id,name,slug,link",orderBy:l?"name":"registered_date",exclude:o.user.existingEntitiesIds,who:"authors"}),getSpecificTemplate:l=>{let u=yC("author",l.slug);return{title:(0,ut.sprintf)((0,ut.__)("Author: %s"),l.name),slug:u,templatePrefix:"author"}}},labels:{singular_name:(0,ut.__)("Author"),search_items:(0,ut.__)("Search Authors"),not_found:(0,ut.__)("No authors found."),all_items:(0,ut.__)("All Authors")},hasGeneralTemplate:i,template:s})}),!i||o.user?.hasEntities)return n}var wC=(e,t,r=Z$)=>{let o=(0,wf.useSelect)(i=>Object.keys(t||{}).reduce((s,l)=>(s[l]=!!i(xf.store).getEntityRecords(e,l,{per_page:1,_fields:"id",context:"view",...r[l]})?.length,s),{}),[t,e,r]);return(0,yo.useMemo)(()=>Object.keys(t||{}).reduce((i,s)=>(i[s]={hasEntities:o[s]},i),{}),[t,o])};var et=a(C(),1),tM=[];function $$({suggestion:e,search:t,onSelect:r,entityForSuggestions:o}){let n="edit-site-custom-template-modal__suggestions_list__list-item";return(0,et.jsxs)(nt.Composite.Item,{render:(0,et.jsx)(nt.Button,{__next40pxDefaultSize:!0,role:"option",className:n,onClick:()=>r(o.config.getSpecificTemplate(e))}),children:[(0,et.jsx)(nt.__experimentalText,{size:"body",lineHeight:1.53846153846,weight:500,className:`${n}__title`,children:(0,et.jsx)(nt.TextHighlight,{text:(0,oM.decodeEntities)(e.name),highlight:t})}),e.link&&(0,et.jsx)(nt.__experimentalText,{size:"body",lineHeight:1.53846153846,className:`${n}__info`,children:(0,sM.safeDecodeURI)(e.link)})]})}function eee(e,t){let{config:r}=e,o=(0,Us.useMemo)(()=>({order:"asc",context:"view",search:t,per_page:t?20:10,...r.queryArgs(t)}),[t,r]),{records:n,hasResolved:i}=(0,rM.useEntityRecords)(e.type,e.slug,o),[s,l]=(0,Us.useState)(tM);return(0,Us.useEffect)(()=>{if(!i)return;let u=tM;n?.length&&(u=n,r.recordNamePath&&(u=KL(u,r.recordNamePath))),l(u)},[n,i]),s}function tee({entityForSuggestions:e,onSelect:t}){let[r,o,n]=(0,nM.useDebouncedInput)(),i=eee(e,n),{labels:s}=e,[l,u]=(0,Us.useState)(!1);return!l&&i?.length>9&&u(!0),(0,et.jsxs)(et.Fragment,{children:[l&&(0,et.jsx)(nt.SearchControl,{onChange:o,value:r,label:s.search_items,placeholder:s.search_items}),!!i?.length&&(0,et.jsx)(nt.Composite,{orientation:"vertical",role:"listbox",className:"edit-site-custom-template-modal__suggestions_list","aria-label":(0,sl.__)("Suggestions list"),children:i.map(c=>(0,et.jsx)($$,{suggestion:c,search:n,onSelect:t,entityForSuggestions:e},c.slug))}),n&&!i?.length&&(0,et.jsx)(nt.__experimentalText,{as:"p",className:"edit-site-custom-template-modal__no-results",children:s.not_found})]})}function ree({onSelect:e,entityForSuggestions:t,onBack:r,containerRef:o}){let[n,i]=(0,Us.useState)();return(0,Us.useEffect)(()=>{if(o.current){let[s]=iM.focus.focusable.find(o.current);s?.focus()}},[n]),(0,et.jsxs)(nt.__experimentalVStack,{spacing:4,className:"edit-site-custom-template-modal__contents-wrapper",alignment:"left",children:[!n&&(0,et.jsxs)(et.Fragment,{children:[(0,et.jsx)(nt.__experimentalText,{as:"p",children:(0,sl.__)("Select whether to create a single template for all items or a specific one.")}),(0,et.jsxs)(nt.Flex,{className:"edit-site-custom-template-modal__contents",gap:"4",align:"initial",children:[(0,et.jsxs)(nt.FlexItem,{isBlock:!0,as:nt.Button,onClick:()=>{let{slug:s,title:l,description:u,templatePrefix:c}=t.template;e({slug:s,title:l,description:u,templatePrefix:c})},children:[(0,et.jsx)(nt.__experimentalText,{as:"span",weight:500,lineHeight:1.53846153846,children:t.labels.all_items}),(0,et.jsx)(nt.__experimentalText,{as:"span",lineHeight:1.53846153846,children:(0,sl.__)("For all items")})]}),(0,et.jsxs)(nt.FlexItem,{isBlock:!0,as:nt.Button,onClick:()=>{i(!0)},children:[(0,et.jsx)(nt.__experimentalText,{as:"span",weight:500,lineHeight:1.53846153846,children:t.labels.singular_name}),(0,et.jsx)(nt.__experimentalText,{as:"span",lineHeight:1.53846153846,children:(0,sl.__)("For a specific item")})]})]}),(0,et.jsx)(nt.Flex,{justify:"right",children:(0,et.jsx)(nt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:r,children:(0,sl.__)("Back")})})]}),n&&(0,et.jsxs)(et.Fragment,{children:[(0,et.jsx)(nt.__experimentalText,{as:"p",children:(0,sl.__)("This template will be used only for the specific item chosen.")}),(0,et.jsx)(tee,{entityForSuggestions:t,onSelect:e}),(0,et.jsx)(nt.Flex,{justify:"right",children:(0,et.jsx)(nt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t.hasGeneralTemplate?r():i(!1)},children:(0,sl.__)("Back")})})]})]})}var aM=ree;var Sf=function(){return Sf=Object.assign||function(t){for(var r,o=1,n=arguments.length;o<n;o++){r=arguments[o];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Sf.apply(this,arguments)};function lM(e){return e.toLowerCase()}var oee=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],nee=/[^A-Z0-9]+/gi;function cM(e,t){t===void 0&&(t={});for(var r=t.splitRegexp,o=r===void 0?oee:r,n=t.stripRegexp,i=n===void 0?nee:n,s=t.transform,l=s===void 0?lM:s,u=t.delimiter,c=u===void 0?" ":u,f=uM(uM(e,o,"$1\0$2"),i,"\0"),m=0,d=f.length;f.charAt(m)==="\0";)m++;for(;f.charAt(d-1)==="\0";)d--;return f.slice(m,d).split("\0").map(l).join(c)}function uM(e,t,r){return t instanceof RegExp?e.replace(t,r):t.reduce(function(o,n){return o.replace(n,r)},e)}function fM(e,t){return t===void 0&&(t={}),cM(e,Sf({delimiter:"."},t))}function $0(e,t){return t===void 0&&(t={}),fM(e,Sf({delimiter:"-"},t))}var Tu=a(B(),1),_f=a(j(),1),Ws=a(M(),1),al=a(C(),1);function iee({createTemplate:e,onBack:t}){let[r,o]=(0,Tu.useState)(""),n=(0,_f.__)("Custom Template"),[i,s]=(0,Tu.useState)(!1),l=(0,Tu.useRef)();(0,Tu.useEffect)(()=>{l.current&&l.current.focus()},[]);async function u(c){if(c.preventDefault(),!i){s(!0);try{await e({slug:$0(r||n)||"wp-custom-template",title:r||n},!1)}finally{s(!1)}}}return(0,al.jsx)("form",{onSubmit:u,children:(0,al.jsxs)(Ws.__experimentalVStack,{spacing:6,children:[(0,al.jsx)(Ws.TextControl,{__next40pxDefaultSize:!0,label:(0,_f.__)("Name"),value:r,onChange:o,placeholder:n,disabled:i,ref:l,help:(0,_f.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,al.jsxs)(Ws.__experimentalHStack,{className:"edit-site-custom-generic-template__modal-actions",justify:"right",children:[(0,al.jsx)(Ws.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,_f.__)("Back")}),(0,al.jsx)(Ws.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:i,"aria-disabled":i,children:(0,_f.__)("Create")})]})]})})}var dM=iee;var ir=a(C(),1),{useHistory:see}=L(vM.privateApis),xC=["front-page","home","single","page","index","archive","author","category","date","tag","search","404"],aee={"front-page":Zf,home:fd,single:od,page:Sl,archive:Ji,search:fi,404:ed,index:Kf,category:Qs,author:es,taxonomy:$i,date:Uf,tag:ud,attachment:Jf};function mM({title:e,direction:t,className:r,description:o,icon:n,onClick:i,children:s}){return(0,ir.jsx)(Mr.Button,{__next40pxDefaultSize:!0,className:r,onClick:i,label:o,showTooltip:!!o,children:(0,ir.jsxs)(Mr.Flex,{as:"span",spacing:2,align:"center",justify:"center",style:{width:"100%"},direction:t,children:[(0,ir.jsx)("div",{className:"edit-site-add-new-template__template-icon",children:(0,ir.jsx)(Mr.Icon,{icon:n})}),(0,ir.jsxs)(Mr.__experimentalVStack,{className:"edit-site-add-new-template__template-name",alignment:"center",spacing:0,children:[(0,ir.jsx)(Mr.__experimentalText,{align:"center",weight:500,lineHeight:1.53846153846,children:e}),s]})]})})}var bo={templatesList:1,customTemplate:2,customGenericTemplate:3};function lee({onClose:e}){let[t,r]=(0,oi.useState)(bo.templatesList),[o,n]=(0,oi.useState)({}),[i,s]=(0,oi.useState)(!1),l=cee(n,()=>r(bo.customTemplate)),u=see(),{saveEntityRecord:c}=(0,Cf.useDispatch)(eb.store),{createErrorNotice:f,createSuccessNotice:m}=(0,Cf.useDispatch)(gM.store),d=(0,oi.useRef)(null),h=(0,hM.useViewportMatch)("medium","<"),g=(0,Cf.useSelect)(x=>x(eb.store).getEntityRecord("root","__unstableBase")?.home,[]),y={"front-page":g,date:(0,wo.sprintf)((0,wo.__)("E.g. %s"),g+"/"+new Date().getFullYear())};(0,oi.useEffect)(()=>{if(d.current&&t===bo.templatesList){let[x]=yM.focus.focusable.find(d.current);x?.focus()}},[t]);async function v(x,T=!0){if(!i){s(!0);try{let{title:E,description:k,slug:F}=x,P=await c("postType",Xe,{description:k,slug:F.toString(),status:"publish",title:E,meta:{is_wp_suggestion:T}},{throwOnError:!0});u.navigate(`/${Xe}/${P.id}?canvas=edit`),m((0,wo.sprintf)((0,wo.__)('"%s" successfully created.'),(0,pM.decodeEntities)(P.title?.rendered||E)||(0,wo.__)("(no title)")),{type:"snackbar"})}catch(E){let k=E.message&&E.code!=="unknown_error"?E.message:(0,wo.__)("An error occurred while creating the template.");f(k,{type:"snackbar"})}finally{s(!1)}}}let b=()=>{e(),r(bo.templatesList)},w=(0,wo.__)("Add template");return t===bo.customTemplate?w=(0,wo.sprintf)((0,wo.__)("Add template: %s"),o.labels.singular_name):t===bo.customGenericTemplate&&(w=(0,wo.__)("Create custom template")),(0,ir.jsxs)(Mr.Modal,{title:w,className:Z("edit-site-add-new-template__modal",{"edit-site-add-new-template__modal_template_list":t===bo.templatesList,"edit-site-custom-template-modal":t===bo.customTemplate}),onRequestClose:b,overlayClassName:t===bo.customGenericTemplate?"edit-site-custom-generic-template__modal":void 0,ref:d,children:[t===bo.templatesList&&(0,ir.jsxs)(Mr.__experimentalGrid,{columns:h?2:3,gap:4,align:"flex-start",justify:"center",className:"edit-site-add-new-template__template-list__contents",children:[(0,ir.jsx)(Mr.Flex,{className:"edit-site-add-new-template__template-list__prompt",children:(0,wo.__)("Select what the new template should apply to:")}),l.map(x=>{let{title:T,slug:E,onClick:k}=x;return(0,ir.jsx)(mM,{title:T,direction:"column",className:"edit-site-add-new-template__template-button",description:y[E],icon:aee[E]||Nn,onClick:()=>k?k(x):v(x)},E)}),(0,ir.jsx)(mM,{title:(0,wo.__)("Custom template"),direction:"row",className:"edit-site-add-new-template__custom-template-button",icon:ci,onClick:()=>r(bo.customGenericTemplate),children:(0,ir.jsx)(Mr.__experimentalText,{lineHeight:1.53846153846,children:(0,wo.__)("A custom template can be manually applied to any post or page.")})})]}),t===bo.customTemplate&&(0,ir.jsx)(aM,{onSelect:v,entityForSuggestions:o,onBack:()=>r(bo.templatesList),containerRef:d}),t===bo.customGenericTemplate&&(0,ir.jsx)(dM,{createTemplate:v,onBack:()=>r(bo.templatesList)})]})}function uee(){let[e,t]=(0,oi.useState)(!1),{postType:r}=(0,Cf.useSelect)(o=>{let{getPostType:n}=o(eb.store);return{postType:n(Xe)}},[]);return r?(0,ir.jsxs)(ir.Fragment,{children:[(0,ir.jsx)(Mr.Button,{variant:"primary",onClick:()=>t(!0),label:r.labels.add_new_item,__next40pxDefaultSize:!0,children:r.labels.add_new_item}),e&&(0,ir.jsx)(lee,{onClose:()=>t(!1)})]}):null}function cee(e,t){let o=(Cu()||[]).filter(d=>xC.includes(d.slug)),n=d=>{t?.(),e(d)},i=[...o],{defaultTaxonomiesMenuItems:s,taxonomiesMenuItems:l}=$L(n),{defaultPostTypesMenuItems:u,postTypesMenuItems:c}=JL(n),f=eM(n);return[...s,...u,f].forEach(d=>{if(!d)return;let h=i.findIndex(g=>g.slug===d.slug);h>-1?i[h]=d:i.push(d)}),i?.sort((d,h)=>xC.indexOf(d.slug)-xC.indexOf(h.slug)),[...i,...QL(),...c,...l]}var bM=(0,oi.memo)(uee);var Tf=a(M(),1),cn=a(j(),1),up=a(B(),1),SC=a(mr(),1),wM=a(Gr(),1),_C=a(yt(),1),tb=a(Ke(),1),rb=a(he(),1),xM=a(re(),1);var xo=a(C(),1),{Badge:CC}=L(Tf.privateApis),{useEntityRecordsWithPermissions:fee}=L(rb.privateApis),{useStyle:dee}=L(tb.privateApis);function SM(){let e=Cu(),{records:t}=fee("root","registeredTemplate");return[...e,...t?.filter(r=>!r.is_custom).map(r=>({slug:r.slug,title:r.title.rendered,description:r.description}))]}function mee({item:e}){let t=G0(),r=dee("color.background")??"white",o=(0,up.useMemo)(()=>(0,wM.parse)(e.content.raw),[e.content.raw]),n=!o?.length;return(0,xo.jsx)(tb.EditorProvider,{post:e,settings:t,children:(0,xo.jsxs)("div",{className:"page-templates-preview-field",style:{backgroundColor:r},children:[n&&(0,cn.__)("Empty template"),!n&&(0,xo.jsx)(_C.BlockPreview.Async,{children:(0,xo.jsx)(_C.BlockPreview,{blocks:o})})]})})}var ob={label:(0,cn.__)("Preview"),id:"preview",render:mee,enableSorting:!1},nb={label:(0,cn.__)("Description"),id:"description",render:window?.__experimentalTemplateActivate?function({item:t}){let o=SM().find(n=>n.slug===t.slug);return t.description?(0,SC.decodeEntities)(t.description):o?.description}:({item:e})=>e.description&&(0,SC.decodeEntities)(e.description),enableSorting:!1,enableGlobalSearch:!0};function pee({item:e}){let[t,r]=(0,up.useState)(!1),{text:o,icon:n,imageUrl:i}=il(e.type,e.id);return(0,xo.jsxs)(Tf.__experimentalHStack,{alignment:"left",spacing:0,children:[i&&(0,xo.jsx)("div",{className:Z("page-templates-author-field__avatar",{"is-loaded":t}),children:(0,xo.jsx)("img",{onLoad:()=>r(!0),alt:"",src:i})}),!i&&(0,xo.jsx)("div",{className:"page-templates-author-field__icon",children:(0,xo.jsx)(Tf.Icon,{icon:n})}),(0,xo.jsx)("span",{className:"page-templates-author-field__name",children:o})]})}var ib={label:(0,cn.__)("Author"),id:"author",getValue:({item:e})=>e.author_text??e.author,render:pee},_M={label:(0,cn.__)("Status"),id:"active",type:"boolean",getValue:({item:e})=>e._isActive,render:function({item:t}){let r=t._isCustom?(0,cn._x)("Active when used","template"):(0,cn._x)("Active","template"),o=t._isCustom?"info":"success",n=t._isActive;return(0,xo.jsx)(CC,{intent:n?o:"default",children:n?r:(0,cn._x)("Inactive","template")})}},CM=()=>{let e=(0,xM.useSelect)(t=>t(rb.store).getCurrentTheme());return(0,up.useMemo)(()=>({label:(0,cn.__)("Compatible Theme"),id:"theme",getValue:({item:t})=>t.theme,render:function({item:r}){return r.theme===e.stylesheet?(0,xo.jsx)(CC,{intent:"success",children:r.theme}):(0,xo.jsx)(CC,{intent:"error",children:r.theme})}}),[e])},TM={label:(0,cn.__)("Template Type"),id:"slug",getValue:({item:e})=>e.slug,render:function({item:t}){return SM().find(n=>n.slug===t.slug)?.title||(0,cn._x)("Custom","template type")}};var cp={table:{showMedia:!1},grid:{showMedia:!0},list:{showMedia:!1}},Ef={type:"grid",perPage:20,sort:{field:"title",direction:"asc"},titleField:"title",descriptionField:"description",mediaField:"preview",fields:["author","active","slug","theme"],filters:[],...cp.grid};function Pf(e){return e==="user"?{sort:{field:"date",direction:"desc"}}:e==="active"?{}:{filters:[{field:"author",operator:"is",value:e,isLocked:!0}]}}var Eu=a(C(),1),{usePostActions:hee,usePostFields:gee,templateTitleField:vee}=L(kM.privateApis),{useHistory:yee,useLocation:bee}=L(AM.privateApis),{useEntityRecordsWithPermissions:EM}=L(Af.privateApis);function EC(){let{path:e,query:t}=bee(),{activeView:r="active",postId:o}=t,[n,i]=(0,fn.useState)([o]),[s,l]=(0,fn.useState)(!1),u=Ef,c=(0,fn.useMemo)(()=>Pf(r),[r]),{view:f,updateView:m,isModified:d,resetToDefault:h}=Gs({kind:"postType",name:Xe,slug:"default",defaultView:u,activeViewOverrides:c,queryParams:{page:t.pageNumber,search:t.search},onChangeQueryParams:pe=>{V.navigate((0,TC.addQueryArgs)(e,{...t,pageNumber:pe.page,search:pe.search||void 0}))}}),{activeTemplatesOption:g,activeTheme:y,defaultTemplateTypes:v}=(0,fp.useSelect)(pe=>{let{getEntityRecord:Se,getCurrentTheme:J}=pe(Af.store);return{activeTemplatesOption:Se("root","site")?.active_templates,activeTheme:J(),defaultTemplateTypes:pe(Af.store).getCurrentTheme()?.default_template_types}}),{records:b,isResolving:w}=EM("postType",Xe,{per_page:-1,combinedTemplates:!1}),{records:x,isResolving:T}=EM("root","registeredTemplate",{per_page:-1}),E=(0,fn.useMemo)(()=>{let pe=[...x];if(g)for(let Se in g){let J=g[Se],ie=b.find($=>$.id===J&&$.theme===y.stylesheet);if(ie){let $=pe.findIndex(({slug:Fe})=>Fe===ie.slug);$!==-1?pe[$]=ie:pe.push(ie)}}return pe},[b,x,g,y]),k;r==="active"?k=w||T:r==="user"?k=w:k=T;let F=(0,fn.useMemo)(()=>{function pe(J){return J.is_custom??(!J.meta?.is_wp_suggestion&&!v.some(ie=>ie.slug===J.slug))}let Se;return r==="active"?Se=E.filter(J=>!pe(J)):r==="user"?Se=b:Se=x,Se.map(J=>({...J,_isActive:E.some(ie=>ie.id===J.id),_isCustom:pe(J)}))},[E,v,b,x,r]),P=(0,fp.useSelect)(pe=>{let{getUser:Se}=pe(Af.store);return F.reduce((J,ie)=>(ie.author_text?J[ie.author_text]||(J[ie.author_text]=ie.author_text):ie.author&&(J[ie.author]||(J[ie.author]=Se(ie.author))),J),{})},[F]),V=yee(),N=(0,fn.useCallback)(pe=>{i(pe),f?.type==="list"&&V.navigate((0,TC.addQueryArgs)(e,{postId:pe.length===1?pe[0]:void 0}))},[V,e,f?.type]),S=gee({postType:Xe}).find(pe=>pe.id==="date"),I=CM(),O=(0,fn.useMemo)(()=>{let pe=[ob,vee,nb,_M,TM];r==="user"&&(pe.push(I),S&&pe.push(S));let Se=[];for(let J in P)Se.push({value:P[J]?.id??J,label:P[J]?.name??J});return pe.push({...ib,elements:Se}),pe},[P,r,I,S]),{data:z,paginationInfo:R}=(0,fn.useMemo)(()=>zs(F,f,O),[F,f,O]),{createSuccessNotice:D}=(0,fp.useDispatch)(IM.store),G=(0,fn.useCallback)((pe,Se)=>{switch(pe){case"duplicate-post":{let J=Se[0],ie=typeof J.title=="string"?J.title:J.title?.rendered;V.navigate("/template?activeView=user"),D((0,ll.sprintf)((0,ll.__)('"%s" successfully created.'),(0,PM.decodeEntities)(ie)||(0,ll.__)("(no title)")),{type:"snackbar",id:"duplicate-post-action",actions:[{label:(0,ll.__)("Edit"),onClick:()=>{V.navigate(`/${J.type}/${J.id}?canvas=edit`)}}]})}break}},[V,D]),U=hee({postType:Xe,context:"list",onActionPerformed:G}),ce=nl(),ye=mL(),Te=(0,fn.useMemo)(()=>r==="user"?[ye,ce,...U]:[ye,...U],[U,ye,ce,r]),Ie=(0,RM.useEvent)(pe=>{m(pe),pe.type!==f.type&&V.invalidate()}),He=Te.find(pe=>pe.id==="duplicate-post");return(0,Eu.jsxs)(Ln,{className:"edit-site-page-templates",title:(0,ll.__)("Templates"),headingLevel:2,actions:(0,Eu.jsx)(bM,{}),children:[(0,Eu.jsx)(Ms,{paginationInfo:R,fields:O,actions:Te,data:z,isLoading:k,view:f,onChangeView:Ie,onChangeSelection:N,isItemClickable:()=>!0,onClickItem:pe=>{typeof pe.id=="string"?l(pe):V.navigate(`/${pe.type}/${pe.id}?canvas=edit`)},selection:n,defaultLayouts:cp,onReset:d?()=>{h(),V.invalidate()}:!1},r),s&&He&&(0,Eu.jsx)(OM.Modal,{title:(0,ll.__)("Duplicate"),onRequestClose:()=>l(),size:"small",children:(0,Eu.jsx)(He.RenderModal,{items:[s],closeModal:()=>l()})})]})}var r8=a(j(),1),qi=a(B(),1),o8=a(he(),1);var n8=a(Ne(),1),i8=a(Ke(),1),RC=a(bt(),1),s8=a(Qe(),1);var Br=a(M(),1),XM=a(mr(),1),ni=a(B(),1),Rf=a(re(),1),sb=a(he(),1),QM=a(Qe(),1);var _o=a(j(),1),JM=a(Mn(),1),$M=a(Ne(),1),e8=a(_l(),1);var qs=a(B(),1),ul=a(j(),1),it=a(M(),1),GM=a(he(),1),HM=a(mr(),1),UM=a(Qe(),1),WM=a(_l(),1),qM=a(bt(),1);var Pu=a(re(),1),Au=a(he(),1),FM=a(mr(),1),Jr=a(B(),1),gt=a(j(),1);var VM=a(bt(),1);var wee={},xee=(e,t)=>{let r=e;return t.split(".").forEach(o=>{r=r?.[o]}),r};function PC(e,t){return`${e}-${(0,VM.safeDecodeURI)(t)}`}var NM=(e,t)=>(e||[]).map(r=>({...r,name:(0,FM.decodeEntities)(xee(r,t))})),ku=()=>(0,Pu.useSelect)(e=>e(Au.store).getEntityRecords("postType",Xe,{per_page:-1}),[]),dp=()=>(0,Pu.useSelect)(e=>e(Au.store).getCurrentTheme()?.default_template_types||[],[]),DM=()=>{let e=(0,Pu.useSelect)(t=>t(Au.store).getPostTypes({per_page:-1}),[]);return(0,Jr.useMemo)(()=>{let t=["attachment"];return e?.filter(({viewable:r,slug:o})=>r&&!t.includes(o)).sort((r,o)=>r.slug==="post"||o.slug==="post"?0:r.name.localeCompare(o.name))},[e])},See=()=>{let e=(0,Pu.useSelect)(t=>t(Au.store).getTaxonomies({per_page:-1}),[]);return(0,Jr.useMemo)(()=>e?.filter(({visibility:t})=>t?.publicly_queryable),[e])};function LM(){let e=DM(),t=(0,Jr.useMemo)(()=>e?.filter(i=>i.has_archive),[e]),r=ku(),o=(0,Jr.useMemo)(()=>e?.reduce((i,{labels:s})=>{let l=s.singular_name.toLowerCase();return i[l]=(i[l]||0)+1,i},{}),[e]),n=(0,Jr.useCallback)(({labels:i,slug:s})=>{let l=i.singular_name.toLowerCase();return o[l]>1&&l!==s},[o]);return(0,Jr.useMemo)(()=>t?.filter(i=>!(r||[]).some(s=>s.slug==="archive-"+i.slug)).map(i=>{let s;return n(i)?s=(0,gt.sprintf)((0,gt.__)("Archive: %1$s (%2$s)"),i.labels.singular_name,i.slug):s=(0,gt.sprintf)((0,gt.__)("Archive: %s"),i.labels.singular_name),{slug:"archive-"+i.slug,description:(0,gt.sprintf)((0,gt.__)("Displays an archive with the latest posts of type: %s."),i.labels.singular_name),title:s,icon:typeof i.icon=="string"&&i.icon.startsWith("dashicons-")?i.icon.slice(10):Ji,templatePrefix:"archive"}})||[],[t,r,n])}var MM=e=>{let t=DM(),r=ku(),o=dp(),n=(0,Jr.useMemo)(()=>t?.reduce((m,{labels:d})=>{let h=(d.template_name||d.singular_name).toLowerCase();return m[h]=(m[h]||0)+1,m},{}),[t]),i=(0,Jr.useCallback)(({labels:m,slug:d})=>{let h=(m.template_name||m.singular_name).toLowerCase();return n[h]>1&&h!==d},[n]),s=(0,Jr.useMemo)(()=>t?.reduce((m,{slug:d})=>{let h=d;return d!=="page"&&(h=`single-${h}`),m[d]=h,m},{}),[t]),l=AC("postType",s),u=(r||[]).map(({slug:m})=>m),c=(t||[]).reduce((m,d)=>{let{slug:h,labels:g,icon:y}=d,v=s[h],b=o?.find(({slug:F})=>F===v),w=u?.includes(v),x=i(d),T=g.template_name||(0,gt.sprintf)((0,gt.__)("Single item: %s"),g.singular_name);x&&(T=g.template_name?(0,gt.sprintf)((0,gt._x)("%1$s (%2$s)","post type menu label"),g.template_name,h):(0,gt.sprintf)((0,gt._x)("Single item: %1$s (%2$s)","post type menu label"),g.singular_name,h));let E=b?{...b,templatePrefix:s[h]}:{slug:v,title:T,description:(0,gt.sprintf)((0,gt.__)("Displays a single item: %s."),g.singular_name),icon:typeof y=="string"&&y.startsWith("dashicons-")?y.slice(10):nd,templatePrefix:s[h]},k=l?.[h]?.hasEntities;return k&&(E.onClick=F=>{e({type:"postType",slug:h,config:{recordNamePath:"title.rendered",queryArgs:({search:P})=>({_fields:"id,title,slug,link",orderBy:P?"relevance":"modified",exclude:l[h].existingEntitiesIds}),getSpecificTemplate:P=>{let V=PC(s[h],P.slug);return{title:V,slug:V,templatePrefix:s[h]}}},labels:g,hasGeneralTemplate:w,template:F})}),(!w||k)&&m.push(E),m},[]);return(0,Jr.useMemo)(()=>c.reduce((m,d)=>{let{slug:h}=d,g="postTypesMenuItems";return h==="page"&&(g="defaultPostTypesMenuItems"),m[g].push(d),m},{defaultPostTypesMenuItems:[],postTypesMenuItems:[]}),[c])},BM=e=>{let t=See(),r=ku(),o=dp(),n=(0,Jr.useMemo)(()=>t?.reduce((m,{slug:d})=>{let h=d;return["category","post_tag"].includes(d)||(h=`taxonomy-${h}`),d==="post_tag"&&(h="tag"),m[d]=h,m},{}),[t]),i=t?.reduce((m,{labels:d})=>{let h=(d.template_name||d.singular_name).toLowerCase();return m[h]=(m[h]||0)+1,m},{}),s=(m,d)=>{if(["category","post_tag"].includes(d))return!1;let h=(m.template_name||m.singular_name).toLowerCase();return i[h]>1&&h!==d},l=AC("taxonomy",n),u=(r||[]).map(({slug:m})=>m),c=(t||[]).reduce((m,d)=>{let{slug:h,labels:g}=d,y=n[h],v=o?.find(({slug:k})=>k===y),b=u?.includes(y),w=s(g,h),x=g.template_name||g.singular_name;w&&(x=g.template_name?(0,gt.sprintf)((0,gt._x)("%1$s (%2$s)","taxonomy template menu label"),g.template_name,h):(0,gt.sprintf)((0,gt._x)("%1$s (%2$s)","taxonomy menu label"),g.singular_name,h));let T=v?{...v,templatePrefix:n[h]}:{slug:y,title:x,description:(0,gt.sprintf)((0,gt.__)("Displays taxonomy: %s."),g.singular_name),icon:$i,templatePrefix:n[h]},E=l?.[h]?.hasEntities;return E&&(T.onClick=k=>{e({type:"taxonomy",slug:h,config:{queryArgs:({search:F})=>({_fields:"id,name,slug,link",orderBy:F?"name":"count",exclude:l[h].existingEntitiesIds}),getSpecificTemplate:F=>{let P=PC(n[h],F.slug);return{title:P,slug:P,templatePrefix:n[h]}}},labels:g,hasGeneralTemplate:b,template:k})}),(!b||E)&&m.push(T),m},[]);return(0,Jr.useMemo)(()=>c.reduce((m,d)=>{let{slug:h}=d,g="taxonomiesMenuItems";return["category","tag"].includes(h)&&(g="defaultTaxonomiesMenuItems"),m[g].push(d),m},{defaultTaxonomiesMenuItems:[],taxonomiesMenuItems:[]}),[c])},_ee={user:"author"},Cee={user:{who:"authors"}};function jM(e){let t=ku(),r=dp(),o=AC("root",_ee,Cee),n=r?.find(({slug:s})=>s==="author");n||(n={description:(0,gt.__)("Displays latest posts written by a single author."),slug:"author",title:"Author"});let i=!!t?.find(({slug:s})=>s==="author");if(o.user?.hasEntities&&(n={...n,templatePrefix:"author"},n.onClick=s=>{e({type:"root",slug:"user",config:{queryArgs:({search:l})=>({_fields:"id,name,slug,link",orderBy:l?"name":"registered_date",exclude:o.user.existingEntitiesIds,who:"authors"}),getSpecificTemplate:l=>{let u=PC("author",l.slug);return{title:u,slug:u,templatePrefix:"author"}}},labels:{singular_name:(0,gt.__)("Author"),search_items:(0,gt.__)("Search Authors"),not_found:(0,gt.__)("No authors found."),all_items:(0,gt.__)("All Authors")},hasGeneralTemplate:i,template:s})}),!i||o.user?.hasEntities)return n}var Tee=e=>{let t=ku();return(0,Jr.useMemo)(()=>Object.entries(e||{}).reduce((o,[n,i])=>{let s=(t||[]).reduce((l,u)=>{let c=`${i}-`;return u.slug.startsWith(c)&&l.push(u.slug.substring(c.length)),l},[]);return s.length&&(o[n]=s),o},{}),[e,t])},Eee=(e,t,r={})=>{let o=Tee(t);return(0,Pu.useSelect)(i=>Object.entries(o||{}).reduce((s,[l,u])=>{let c=i(Au.store).getEntityRecords(e,l,{_fields:"id",context:"view",slug:u,...r[l]});return c?.length&&(s[l]=c),s},{}),[o])},AC=(e,t,r=wee)=>{let o=Eee(e,t,r),n=(0,Pu.useSelect)(s=>Object.keys(t||{}).reduce((l,u)=>{let c=o?.[u]?.map(({id:f})=>f)||[];return l[u]=!!s(Au.store).getEntityRecords(e,u,{per_page:1,_fields:"id",context:"view",exclude:c,...r[u]})?.length,l},{}),[t,o,e,r]);return(0,Jr.useMemo)(()=>Object.keys(t||{}).reduce((s,l)=>{let u=o?.[l]?.map(({id:c})=>c)||[];return s[l]={hasEntities:n[l],existingEntitiesIds:u},s},{}),[t,o,n])};var tt=a(C(),1),zM=[];function Pee({suggestion:e,search:t,onSelect:r,entityForSuggestions:o}){let n="edit-site-custom-template-modal__suggestions_list__list-item";return(0,tt.jsxs)(it.Composite.Item,{render:(0,tt.jsx)(it.Button,{__next40pxDefaultSize:!0,role:"option",className:n,onClick:()=>r(o.config.getSpecificTemplate(e))}),children:[(0,tt.jsx)(it.__experimentalText,{size:"body",lineHeight:1.53846153846,weight:500,className:`${n}__title`,children:(0,tt.jsx)(it.TextHighlight,{text:(0,HM.decodeEntities)(e.name),highlight:t})}),e.link&&(0,tt.jsx)(it.__experimentalText,{size:"body",lineHeight:1.53846153846,className:`${n}__info`,children:(0,qM.safeDecodeURI)(e.link)})]})}function Aee(e,t){let{config:r}=e,o=(0,qs.useMemo)(()=>({order:"asc",context:"view",search:t,per_page:t?20:10,...r.queryArgs(t)}),[t,r]),{records:n,hasResolved:i}=(0,GM.useEntityRecords)(e.type,e.slug,o),[s,l]=(0,qs.useState)(zM);return(0,qs.useEffect)(()=>{if(!i)return;let u=zM;n?.length&&(u=n,r.recordNamePath&&(u=NM(u,r.recordNamePath))),l(u)},[n,i]),s}function kee({entityForSuggestions:e,onSelect:t}){let[r,o,n]=(0,UM.useDebouncedInput)(),i=Aee(e,n),{labels:s}=e,[l,u]=(0,qs.useState)(!1);return!l&&i?.length>9&&u(!0),(0,tt.jsxs)(tt.Fragment,{children:[l&&(0,tt.jsx)(it.SearchControl,{onChange:o,value:r,label:s.search_items,placeholder:s.search_items}),!!i?.length&&(0,tt.jsx)(it.Composite,{orientation:"vertical",role:"listbox",className:"edit-site-custom-template-modal__suggestions_list","aria-label":(0,ul.__)("Suggestions list"),children:i.map(c=>(0,tt.jsx)(Pee,{suggestion:c,search:n,onSelect:t,entityForSuggestions:e},c.slug))}),n&&!i?.length&&(0,tt.jsx)(it.__experimentalText,{as:"p",className:"edit-site-custom-template-modal__no-results",children:s.not_found})]})}function Ree({onSelect:e,entityForSuggestions:t,onBack:r,containerRef:o}){let[n,i]=(0,qs.useState)(t.hasGeneralTemplate);return(0,qs.useEffect)(()=>{if(o.current){let[s]=WM.focus.focusable.find(o.current);s?.focus()}},[n]),(0,tt.jsxs)(it.__experimentalVStack,{spacing:4,className:"edit-site-custom-template-modal__contents-wrapper",alignment:"left",children:[!n&&(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(it.__experimentalText,{as:"p",children:(0,ul.__)("Select whether to create a single template for all items or a specific one.")}),(0,tt.jsxs)(it.Flex,{className:"edit-site-custom-template-modal__contents",gap:"4",align:"initial",children:[(0,tt.jsxs)(it.FlexItem,{isBlock:!0,as:it.Button,onClick:()=>{let{slug:s,title:l,description:u,templatePrefix:c}=t.template;e({slug:s,title:l,description:u,templatePrefix:c})},children:[(0,tt.jsx)(it.__experimentalText,{as:"span",weight:500,lineHeight:1.53846153846,children:t.labels.all_items}),(0,tt.jsx)(it.__experimentalText,{as:"span",lineHeight:1.53846153846,children:(0,ul.__)("For all items")})]}),(0,tt.jsxs)(it.FlexItem,{isBlock:!0,as:it.Button,onClick:()=>{i(!0)},children:[(0,tt.jsx)(it.__experimentalText,{as:"span",weight:500,lineHeight:1.53846153846,children:t.labels.singular_name}),(0,tt.jsx)(it.__experimentalText,{as:"span",lineHeight:1.53846153846,children:(0,ul.__)("For a specific item")})]})]}),(0,tt.jsx)(it.Flex,{justify:"right",children:(0,tt.jsx)(it.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:r,children:(0,ul.__)("Back")})})]}),n&&(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(it.__experimentalText,{as:"p",children:(0,ul.__)("This template will be used only for the specific item chosen.")}),(0,tt.jsx)(kee,{entityForSuggestions:t,onSelect:e}),(0,tt.jsx)(it.Flex,{justify:"right",children:(0,tt.jsx)(it.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t.hasGeneralTemplate?r():i(!1)},children:(0,ul.__)("Back")})})]})]})}var YM=Ree;var Ru=a(B(),1),kf=a(j(),1),Ys=a(M(),1),cl=a(C(),1);function Oee({createTemplate:e,onBack:t}){let[r,o]=(0,Ru.useState)(""),n=(0,kf.__)("Custom Template"),[i,s]=(0,Ru.useState)(!1),l=(0,Ru.useRef)();(0,Ru.useEffect)(()=>{l.current&&l.current.focus()},[]);async function u(c){if(c.preventDefault(),!i){s(!0);try{await e({slug:$0(r||n)||"wp-custom-template",title:r||n},!1)}finally{s(!1)}}}return(0,cl.jsx)("form",{onSubmit:u,children:(0,cl.jsxs)(Ys.__experimentalVStack,{spacing:6,children:[(0,cl.jsx)(Ys.TextControl,{__next40pxDefaultSize:!0,label:(0,kf.__)("Name"),value:r,onChange:o,placeholder:n,disabled:i,ref:l,help:(0,kf.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,cl.jsxs)(Ys.__experimentalHStack,{className:"edit-site-custom-generic-template__modal-actions",justify:"right",children:[(0,cl.jsx)(Ys.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,kf.__)("Back")}),(0,cl.jsx)(Ys.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:i,"aria-disabled":i,children:(0,kf.__)("Create")})]})]})})}var ZM=Oee;var sr=a(C(),1),{useHistory:Iee}=L($M.privateApis),kC=["front-page","home","single","page","index","archive","author","category","date","tag","search","404"],Fee={"front-page":Zf,home:fd,single:od,page:Sl,archive:Ji,search:fi,404:ed,index:Kf,category:Qs,author:es,taxonomy:$i,date:Uf,tag:ud,attachment:Jf};function KM({title:e,direction:t,className:r,description:o,icon:n,onClick:i,children:s}){return(0,sr.jsx)(Br.Button,{__next40pxDefaultSize:!0,className:r,onClick:i,label:o,showTooltip:!!o,children:(0,sr.jsxs)(Br.Flex,{as:"span",spacing:2,align:"center",justify:"center",style:{width:"100%"},direction:t,children:[(0,sr.jsx)("div",{className:"edit-site-add-new-template__template-icon",children:(0,sr.jsx)(Br.Icon,{icon:n})}),(0,sr.jsxs)(Br.__experimentalVStack,{className:"edit-site-add-new-template__template-name",alignment:"center",spacing:0,children:[(0,sr.jsx)(Br.__experimentalText,{align:"center",weight:500,lineHeight:1.53846153846,children:e}),s]})]})})}var So={templatesList:1,customTemplate:2,customGenericTemplate:3};function Vee({onClose:e}){let[t,r]=(0,ni.useState)(So.templatesList),[o,n]=(0,ni.useState)({}),[i,s]=(0,ni.useState)(!1),l=Dee(n,()=>r(So.customTemplate)),u=Iee(),{saveEntityRecord:c}=(0,Rf.useDispatch)(sb.store),{createErrorNotice:f,createSuccessNotice:m}=(0,Rf.useDispatch)(JM.store),d=(0,ni.useRef)(null),h=(0,QM.useViewportMatch)("medium","<"),g=(0,Rf.useSelect)(x=>x(sb.store).getEntityRecord("root","__unstableBase")?.home,[]),y={"front-page":g,date:(0,_o.sprintf)((0,_o.__)("E.g. %s"),g+"/"+new Date().getFullYear())};(0,ni.useEffect)(()=>{if(d.current&&t===So.templatesList){let[x]=e8.focus.focusable.find(d.current);x?.focus()}},[t]);async function v(x,T=!0){if(!i){s(!0);try{let{title:E,description:k,slug:F}=x,P=await c("postType",Xe,{description:k,slug:F.toString(),status:"publish",title:E,is_wp_suggestion:T},{throwOnError:!0});u.navigate(`/${Xe}/${P.id}?canvas=edit`),m((0,_o.sprintf)((0,_o.__)('"%s" successfully created.'),(0,XM.decodeEntities)(P.title?.rendered||E)||(0,_o.__)("(no title)")),{type:"snackbar"})}catch(E){let k=E.message&&E.code!=="unknown_error"?E.message:(0,_o.__)("An error occurred while creating the template.");f(k,{type:"snackbar"})}finally{s(!1)}}}let b=()=>{e(),r(So.templatesList)},w=(0,_o.__)("Add template");return t===So.customTemplate?w=(0,_o.sprintf)((0,_o.__)("Add template: %s"),o.labels.singular_name):t===So.customGenericTemplate&&(w=(0,_o.__)("Create custom template")),(0,sr.jsxs)(Br.Modal,{title:w,className:Z("edit-site-add-new-template__modal",{"edit-site-add-new-template__modal_template_list":t===So.templatesList,"edit-site-custom-template-modal":t===So.customTemplate}),onRequestClose:b,overlayClassName:t===So.customGenericTemplate?"edit-site-custom-generic-template__modal":void 0,ref:d,children:[t===So.templatesList&&(0,sr.jsxs)(Br.__experimentalGrid,{columns:h?2:3,gap:4,align:"flex-start",justify:"center",className:"edit-site-add-new-template__template-list__contents",children:[(0,sr.jsx)(Br.Flex,{className:"edit-site-add-new-template__template-list__prompt",children:(0,_o.__)("Select what the new template should apply to:")}),l.map(x=>{let{title:T,slug:E,onClick:k}=x;return(0,sr.jsx)(KM,{title:T,direction:"column",className:"edit-site-add-new-template__template-button",description:y[E],icon:Fee[E]||Nn,onClick:()=>k?k(x):v(x)},E)}),(0,sr.jsx)(KM,{title:(0,_o.__)("Custom template"),direction:"row",className:"edit-site-add-new-template__custom-template-button",icon:ci,onClick:()=>r(So.customGenericTemplate),children:(0,sr.jsx)(Br.__experimentalText,{lineHeight:1.53846153846,children:(0,_o.__)("A custom template can be manually applied to any post or page.")})})]}),t===So.customTemplate&&(0,sr.jsx)(YM,{onSelect:v,entityForSuggestions:o,onBack:()=>r(So.templatesList),containerRef:d}),t===So.customGenericTemplate&&(0,sr.jsx)(ZM,{createTemplate:v,onBack:()=>r(So.templatesList)})]})}function Nee(){let[e,t]=(0,ni.useState)(!1),{postType:r}=(0,Rf.useSelect)(o=>{let{getPostType:n}=o(sb.store);return{postType:n(Xe)}},[]);return r?(0,sr.jsxs)(sr.Fragment,{children:[(0,sr.jsx)(Br.Button,{variant:"primary",onClick:()=>t(!0),label:r.labels.add_new_item,__next40pxDefaultSize:!0,children:r.labels.add_new_item}),e&&(0,sr.jsx)(Vee,{onClose:()=>t(!1)})]}):null}function Dee(e,t){let r=ku(),o=dp(),n=(r||[]).map(({slug:g})=>g),i=(o||[]).filter(g=>kC.includes(g.slug)&&!n.includes(g.slug)),s=g=>{t?.(),e(g)},l=[...i],{defaultTaxonomiesMenuItems:u,taxonomiesMenuItems:c}=BM(s),{defaultPostTypesMenuItems:f,postTypesMenuItems:m}=MM(s),d=jM(s);return[...u,...f,d].forEach(g=>{if(!g)return;let y=l.findIndex(v=>v.slug===g.slug);y>-1?l[y]=g:l.push(g)}),l?.sort((g,y)=>kC.indexOf(g.slug)-kC.indexOf(y.slug)),[...l,...LM(),...m,...c]}var t8=(0,ni.memo)(Nee);var ab=a(C(),1),{usePostActions:Lee,templateTitleField:Mee}=L(i8.privateApis),{useHistory:Bee,useLocation:jee}=L(n8.privateApis),{useEntityRecordsWithPermissions:zee}=L(o8.privateApis);function OC(){let{path:e,query:t}=jee(),{activeView:r="active",postId:o}=t,[n,i]=(0,qi.useState)([o]),s=Ef,l=(0,qi.useMemo)(()=>Pf(r),[r]),{view:u,updateView:c,isModified:f,resetToDefault:m}=Gs({kind:"postType",name:Xe,slug:"default",defaultView:s,activeViewOverrides:l,queryParams:{page:t.pageNumber,search:t.search},onChangeQueryParams:P=>{g.navigate((0,RC.addQueryArgs)(e,{...t,pageNumber:P.page,search:P.search||void 0}))}}),{records:d,isResolving:h}=zee("postType",Xe,{per_page:-1}),g=Bee(),y=(0,qi.useCallback)(P=>{i(P),u?.type==="list"&&g.navigate((0,RC.addQueryArgs)(e,{postId:P.length===1?P[0]:void 0}))},[g,e,u?.type]),v=(0,qi.useMemo)(()=>{if(!d)return[];let P=new Set;return d.forEach(V=>{P.add(V.author_text)}),Array.from(P).map(V=>({value:V,label:V}))},[d]),b=(0,qi.useMemo)(()=>[ob,Mee,nb,{...ib,elements:v}],[v]),{data:w,paginationInfo:x}=(0,qi.useMemo)(()=>zs(d,u,b),[d,u,b]),T=Lee({postType:Xe,context:"list"}),E=nl(),k=(0,qi.useMemo)(()=>[E,...T],[T,E]),F=(0,s8.useEvent)(P=>{c(P),P.type!==u.type&&g.invalidate()});return(0,ab.jsx)(Ln,{className:"edit-site-page-templates",title:(0,r8.__)("Templates"),headingLevel:2,actions:(0,ab.jsx)(t8,{}),children:(0,ab.jsx)(Ms,{paginationInfo:x,fields:b,actions:k,data:w,isLoading:h,view:u,onChangeView:F,onChangeSelection:y,isItemClickable:()=>!0,onClickItem:({id:P})=>{g.navigate(`/wp_template/${P}?canvas=edit`)},selection:n,defaultLayouts:cp,onReset:f?()=>{m(),g.invalidate()}:!1},r)})}var Zs=a(C(),1);async function a8(e){let{activeView:t="active"}=e;return(await ep({kind:"postType",name:"wp_template",slug:"default",defaultView:Ef,activeViewOverrides:Pf(t)})).type==="list"}var l8={name:"templates",path:"/template",areas:{sidebar({siteData:e}){return e.currentTheme?.is_block_theme?(0,Zs.jsx)(J0,{backPath:"/"}):(0,Zs.jsx)(Et,{})},content({siteData:e}){if(e.currentTheme?.is_block_theme)return window?.__experimentalTemplateActivate?(0,Zs.jsx)(EC,{}):(0,Zs.jsx)(OC,{})},async preview({query:e,siteData:t}){return t.currentTheme?.is_block_theme&&await a8(e)?(0,Zs.jsx)(st,{}):void 0},mobile({siteData:e}){return e.currentTheme?.is_block_theme?typeof window<"u"&&window.__experimentalTemplateActivate?(0,Zs.jsx)(EC,{}):(0,Zs.jsx)(OC,{}):(0,Zs.jsx)(Et,{})}},widths:{async content({query:e}){return await a8(e)?380:void 0}}};var Ou=a(C(),1),Gee={sidebar({siteData:e}){return e.currentTheme?.is_block_theme?(0,Ou.jsx)(J0,{backPath:"/"}):(0,Ou.jsx)(Et,{})},mobile({siteData:e}){return e.currentTheme?.is_block_theme?(0,Ou.jsx)(st,{}):(0,Ou.jsx)(Et,{})},preview({siteData:e}){return e.currentTheme?.is_block_theme?(0,Ou.jsx)(st,{}):(0,Ou.jsx)(Et,{})}},u8={name:"template-item",path:"/wp_template/*postId",areas:Gee};var V8=a(Ne(),1),N8=a(j(),1);var h8=a(M(),1),g8=a(Ne(),1),v8=a(re(),1),y8=a(he(),1),b8=a(B(),1);var c8=a(Ne(),1),f8=a(M(),1);var d8=a(bt(),1);var lb=a(C(),1),{useLocation:Hee}=L(c8.privateApis);function m8({title:e,slug:t,type:r,icon:o,isActive:n,suffix:i}){let{path:s}=Hee(),l=o||Xn.find(u=>u.type===r).icon;return t==="all"&&(t=void 0),(0,lb.jsxs)(f8.__experimentalHStack,{justify:"flex-start",className:Z("edit-site-sidebar-dataviews-dataview-item",{"is-selected":n}),children:[(0,lb.jsx)(zt,{icon:l,to:(0,d8.addQueryArgs)(s,{activeView:t}),"aria-current":n?"true":void 0,children:e}),i]})}var fl=a(j(),1);var mp={table:{layout:{styles:{author:{align:"start"}}}},grid:{},list:{}},ii={type:"list",filters:[],perPage:20,sort:{field:"title",direction:"asc"},showLevels:!0,titleField:"title",mediaField:"featured_media",fields:["author","status"],...mp.list};function p8(e){return[{title:e?.labels?.all_items||(0,fl.__)("All items"),slug:"all",icon:sw,view:ii},{title:(0,fl.__)("Published"),slug:"published",icon:id,view:{...ii,filters:[{field:"status",operator:Vn,value:"publish",isLocked:!0}]}},{title:(0,fl.__)("Scheduled"),slug:"future",icon:sd,view:{...ii,filters:[{field:"status",operator:Vn,value:"future",isLocked:!0}]}},{title:(0,fl.__)("Drafts"),slug:"drafts",icon:O1,view:{...ii,filters:[{field:"status",operator:Vn,value:"draft",isLocked:!0}]}},{title:(0,fl.__)("Pending"),slug:"pending",icon:uw,view:{...ii,filters:[{field:"status",operator:Vn,value:"pending",isLocked:!0}]}},{title:(0,fl.__)("Private"),slug:"private",icon:nw,view:{...ii,filters:[{field:"status",operator:Vn,value:"private",isLocked:!0}]}},{title:(0,fl.__)("Trash"),slug:"trash",icon:kw,view:{...ii,type:"table",layout:mp.table.layout,filters:[{field:"status",operator:Vn,value:"trash",isLocked:!0}]}}]}var Uee={published:"publish",future:"future",drafts:"draft",pending:"pending",private:"private",trash:"trash"};function ub(e){let t={...mp.table},r=Uee[e];return r?{...t,filters:[{field:"status",operator:Vn,value:r,isLocked:!0}]}:t}var Of=a(C(),1),{useLocation:Wee}=L(g8.privateApis);function cb({postType:e}){let{query:{activeView:t="all"}}=Wee(),r=(0,v8.useSelect)(n=>{let{getPostType:i}=n(y8.store);return i(e)},[e]),o=(0,b8.useMemo)(()=>p8(r),[r]);return e?(0,Of.jsx)(Of.Fragment,{children:(0,Of.jsx)(h8.__experimentalItemGroup,{className:"edit-site-sidebar-dataviews",children:o.map(n=>(0,Of.jsx)(m8,{slug:n.slug,title:n.title,icon:n.icon,type:n.view.type,isActive:n.slug===t},n.slug))})}):null}var k8=a(M(),1),hb=a(he(),1),Co=a(B(),1),R8=a(Ne(),1),O8=a(re(),1);var I8=a(Ke(),1),gb=a(Qe(),1),hp=a(bt(),1);var si=a(M(),1),On=a(j(),1),Iu=a(re(),1),IC=a(B(),1),fb=a(he(),1),w8=a(Mn(),1),x8=a(mr(),1),db=a(Gr(),1),Ks=a(C(),1);function S8({postType:e,onSave:t,onClose:r}){let o=(0,Iu.useSelect)(h=>h(fb.store).getPostType(e)?.labels,[e]),[n,i]=(0,IC.useState)(!1),[s,l]=(0,IC.useState)(""),{saveEntityRecord:u}=(0,Iu.useDispatch)(fb.store),{createErrorNotice:c,createSuccessNotice:f}=(0,Iu.useDispatch)(w8.store),{resolveSelect:m}=(0,Iu.useRegistry)();async function d(h){if(h.preventDefault(),!n){i(!0);try{let g=await m(fb.store).getPostType(e),y=await u("postType",e,{status:"draft",title:s,slug:s??void 0,content:g.template&&g.template.length?(0,db.serialize)((0,db.synchronizeBlocksWithTemplate)([],g.template)):void 0},{throwOnError:!0});t(y),f((0,On.sprintf)((0,On.__)('"%s" successfully created.'),(0,x8.decodeEntities)(y.title?.rendered||s)||(0,On.__)("(no title)")),{type:"snackbar"})}catch(g){let y=g.message&&g.code!=="unknown_error"?g.message:(0,On.__)("An error occurred while creating the item.");c(y,{type:"snackbar"})}finally{i(!1)}}}return(0,Ks.jsx)(si.Modal,{title:(0,On.sprintf)((0,On.__)("Draft new: %s"),o?.singular_name),onRequestClose:r,focusOnMount:"firstContentElement",size:"small",children:(0,Ks.jsx)("form",{onSubmit:d,children:(0,Ks.jsxs)(si.__experimentalVStack,{spacing:4,children:[(0,Ks.jsx)(si.TextControl,{__next40pxDefaultSize:!0,label:(0,On.__)("Title"),onChange:l,placeholder:(0,On.__)("No title"),value:s}),(0,Ks.jsxs)(si.__experimentalHStack,{spacing:2,justify:"end",children:[(0,Ks.jsx)(si.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:r,children:(0,On.__)("Cancel")}),(0,Ks.jsx)(si.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:n,"aria-disabled":n,children:(0,On.__)("Create draft")})]})]})})})}var _8=a(B(),1),C8=a(he(),1);function T8(e){let{records:t,isResolving:r}=(0,C8.useEntityRecords)("root","comment",{post:e,type:"note",status:"all",per_page:-1,_fields:"id,post"},{enabled:e?.length>0});return{notesCount:(0,_8.useMemo)(()=>{if(!t||t.length===0)return{};let n={};return t.forEach(i=>{let s=i.post;n[s]=(n[s]||0)+1}),n},[t]),isResolving:r}}var pp=a(j(),1),pb=a(re(),1),mb=a(he(),1);var Fu=a(M(),1),Vu=a(B(),1),E8=a(Ke(),1);var Yi=a(C(),1),{usePostFields:qee,PostCardPanel:Yee}=L(E8.privateApis),Zee=["status","date","author","discussion"];function P8({postType:e,postId:t,closeModal:r}){let o=t.length>1,[n,i]=(0,Vu.useState)({}),{record:s,hasFinishedResolution:l,canSwitchTemplate:u}=(0,pb.useSelect)(v=>{let{getEditedEntityRecord:b,hasFinishedResolution:w}=v(mb.store);if(o)return{record:null,hasFinishedResolution:!0};let x=["postType",e,t[0]],{getHomePage:T,getPostsPageId:E}=L(v(mb.store)),k=String(t[0]),F=k!==void 0&&E()===k,P=k!==void 0&&e==="page"&&T()?.postId===k;return{record:b(...x),hasFinishedResolution:w("getEditedEntityRecord",x),canSwitchTemplate:!F&&!P}},[e,t,o]),{editEntityRecord:c,saveEditedEntityRecord:f}=(0,pb.useDispatch)(mb.store),m=qee({postType:e}),d=(0,Vu.useMemo)(()=>m?.map(v=>v.id==="status"?{...v,elements:v.elements.filter(b=>b.value!=="trash")}:v.id==="template"?{...v,readOnly:!u}:v),[m,u]),h=(0,Vu.useMemo)(()=>{let v=[{id:"featured_media",layout:{type:"regular",labelPosition:"none"}},{id:"status",label:(0,pp.__)("Status"),children:[{id:"status",layout:{type:"regular",labelPosition:"none"}},"password"]},"author","date","slug","parent",{id:"discussion",label:(0,pp.__)("Discussion"),children:[{id:"comment_status",layout:{type:"regular",labelPosition:"none"}},"ping_status"]},"template"];return{layout:{type:"panel"},fields:o?v.filter(b=>Zee.includes(typeof b=="string"?b:b.id)):v}},[o]),g=v=>{let b={...s,...n};v.status&&v.status!=="future"&&b?.status==="future"&&new Date(b.date)>new Date&&(v.date=null),v.status&&v.status==="private"&&b?.password&&(v.password=""),i(w=>({...w,...v}))};(0,Vu.useEffect)(()=>{i({})},[t]);let y=async()=>{for(let v of t)c("postType",e,v,n);o?await Promise.allSettled(t.map(v=>f("postType",e,v))):await f("postType",e,t[0]),r?.()};return(0,Yi.jsxs)(Fu.Modal,{overlayClassName:"dataviews-action-modal__quick-edit",__experimentalHideHeader:!0,onRequestClose:r,focusOnMount:"firstElement",children:[(0,Yi.jsx)("div",{className:"dataviews-action-modal__quick-edit-header",children:(0,Yi.jsx)(Yee,{postType:e,postId:t,onClose:r,hideActions:!0})}),(0,Yi.jsx)("div",{className:"dataviews-action-modal__quick-edit-content",children:l&&(0,Yi.jsx)(aC,{data:{...s,...n},fields:d,form:h,onChange:g})}),(0,Yi.jsxs)(Fu.__experimentalHStack,{className:"dataviews-action-modal__quick-edit-footer",children:[(0,Yi.jsx)(Fu.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:r,children:(0,pp.__)("Cancel")}),(0,Yi.jsx)(Fu.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:y,children:(0,pp.__)("Done")})]})]})}var In=a(C(),1),{usePostActions:Kee,usePostFields:Xee}=L(I8.privateApis),{useLocation:Qee,useHistory:Jee}=L(R8.privateApis),{useEntityRecordsWithPermissions:$ee}=L(hb.privateApis),ete=[],tte="draft,future,pending,private,publish";function A8(e){return e.id.toString()}function rte(e){return e.level}function FC({postType:e}){let{path:t,query:r}=Qee(),{activeView:o="all",postId:n,quickEdit:i=!1}=r,s=Jee(),l=ii,u=(0,Co.useMemo)(()=>ub(o),[o]),{view:c,updateView:f,isModified:m,resetToDefault:d}=Gs({kind:"postType",name:e,slug:"default",defaultView:l,activeViewOverrides:u,queryParams:{page:r.pageNumber,search:r.search},onChangeQueryParams:$=>{s.navigate((0,hp.addQueryArgs)(t,{...r,pageNumber:$.page,search:$.search||void 0}))}}),h=(0,gb.useEvent)($=>{f($),$.type!==c.type&&s.invalidate()}),[g,y]=(0,Co.useState)(n?.split(",")??[]),v=(0,Co.useCallback)($=>{y($),s.navigate((0,hp.addQueryArgs)(t,{postId:$.join(",")}))},[t,s]);(0,Co.useEffect)(()=>{let $=n?.split(",")??[];y($)},[n]);let b=Xee({postType:e}),w=(0,Co.useMemo)(()=>{let $={};return c.filters?.forEach(Fe=>{if(Fe.field==="status"&&Fe.operator===Vn&&($.status=Fe.value),Fe.field==="author"&&Fe.operator===Vn?$.author=Fe.value:Fe.field==="author"&&Fe.operator===fT&&($.author_exclude=Fe.value),Fe.field==="date"){if(!Fe.value)return;Fe.operator===dT?$.before=Fe.value:Fe.operator===mT&&($.after=Fe.value)}}),(!$.status||$.status==="")&&($.status=tte),{per_page:c.perPage,page:c.page,_embed:"author,wp:featuredmedia",order:c.sort?.direction,orderby:c.sort?.field,orderby_hierarchy:!!c.showLevels,search:c.search,...$}},[c]),{records:x,isResolving:T,totalItems:E,totalPages:k,hasResolved:F}=$ee("postType",e,w),P=(0,Co.useMemo)(()=>x?.map($=>$.id)??[],[x]),{notesCount:V,isLoading:N}=T8(P),A=(0,Co.useMemo)(()=>{let $=x;return c?.sort?.field==="author"&&($=zs(x,{sort:{...c.sort}},b).data),$&&$.map(Fe=>({...Fe,notesCount:V[Fe.id]??0}))},[x,b,c?.sort,V]),S=A?.map($=>A8($))??[],z=((0,gb.usePrevious)(S)??[]).filter($=>!S.includes($)).includes(n);(0,Co.useEffect)(()=>{z&&s.navigate((0,hp.addQueryArgs)(t,{postId:void 0}))},[s,z,t]);let R=(0,Co.useMemo)(()=>({totalItems:E,totalPages:k}),[E,k]),{labels:D,canCreateRecord:G}=(0,O8.useSelect)($=>{let{getPostType:Fe,canUser:Yt}=$(hb.store);return{labels:Fe(e)?.labels,canCreateRecord:Yt("create",{kind:"postType",name:e})}},[e]),U=Kee({postType:e,context:"list"}),ce=nl(),ye=pL(),Te=(0,Co.useMemo)(()=>c.type===Fb?[{...ce,isPrimary:!0},...U]:[ce,ye,...U],[c.type,ce,ye,U]),[Ie,He]=(0,Co.useState)(!1),pe=()=>He(!0),Se=()=>He(!1),J=({type:$,id:Fe})=>{s.navigate(`/${$}/${Fe}?canvas=edit`),Se()},ie=()=>{s.navigate((0,hp.addQueryArgs)(t,{...r,quickEdit:void 0}))};return(0,In.jsxs)(Ln,{title:D?.name,headingLevel:2,actions:(0,In.jsx)(In.Fragment,{children:D?.add_new_item&&G&&(0,In.jsxs)(In.Fragment,{children:[(0,In.jsx)(k8.Button,{variant:"primary",onClick:pe,__next40pxDefaultSize:!0,children:D.add_new_item}),Ie&&(0,In.jsx)(S8,{postType:e,onSave:J,onClose:Se})]})}),children:[(0,In.jsx)(Ms,{paginationInfo:R,fields:b,actions:Te,data:A||ete,isLoading:T||N||!F,view:c,onChangeView:h,selection:g,onChangeSelection:v,isItemClickable:$=>$.status!=="trash",onClickItem:({id:$})=>{s.navigate(`/${e}/${$}?canvas=edit`)},getItemId:A8,getItemLevel:rte,defaultLayouts:mp,onReset:m?()=>{d(),s.invalidate()}:!1},o),i&&!T&&g.length>0&&c.type!==Fb&&(0,In.jsx)(P8,{postType:e,postId:g,closeModal:ie})]})}var Zi=a(C(),1),{useLocation:ote}=L(V8.privateApis);async function F8(e){let{activeView:t="all"}=e;return(await ep({kind:"postType",name:"page",slug:"default",defaultView:ii,activeViewOverrides:ub(t)})).type==="list"}function nte(){let{query:e={}}=ote(),{canvas:t="view"}=e;return t==="edit"?(0,Zi.jsx)(st,{}):(0,Zi.jsx)(FC,{postType:"page"})}var D8={name:"pages",path:"/page",areas:{sidebar({siteData:e}){return e.currentTheme?.is_block_theme?(0,Zi.jsx)(wr,{title:(0,N8.__)("Pages"),backPath:"/",content:(0,Zi.jsx)(cb,{postType:"page"})}):(0,Zi.jsx)(Et,{})},content({siteData:e}){return e.currentTheme?.is_block_theme?(0,Zi.jsx)(FC,{postType:"page"}):void 0},async preview({query:e,siteData:t}){return t.currentTheme?.is_block_theme&&await F8(e)?(0,Zi.jsx)(st,{}):void 0},mobile({siteData:e}){return e.currentTheme?.is_block_theme?(0,Zi.jsx)(nte,{}):(0,Zi.jsx)(Et,{})}},widths:{async content({query:e}){return await F8(e)?380:void 0}}};var L8=a(j(),1);var dl=a(C(),1),M8={name:"page-item",path:"/page/:postId",areas:{sidebar({siteData:e}){return e.currentTheme?.is_block_theme?(0,dl.jsx)(wr,{title:(0,L8.__)("Pages"),backPath:"/",content:(0,dl.jsx)(cb,{postType:"page"})}):(0,dl.jsx)(Et,{})},mobile({siteData:e}){return e.currentTheme?.is_block_theme?(0,dl.jsx)(st,{}):(0,dl.jsx)(Et,{})},preview({siteData:e}){return e.currentTheme?.is_block_theme?(0,dl.jsx)(st,{}):(0,dl.jsx)(Et,{})}}};var B8=a(j(),1);var vb=a(C(),1),j8={name:"attachment-item",path:"/attachment/:postId",areas:{sidebar:(0,vb.jsx)(wr,{title:(0,B8.__)("Media"),backPath:"/",content:null}),mobile:(0,vb.jsx)(st,{}),preview:(0,vb.jsx)(st,{})}};var VC=a(j(),1),G8=a(Ke(),1);var gp=a(C(),1),{StyleBookPreview:z8}=L(G8.privateApis),H8={name:"stylebook",path:"/stylebook",areas:{sidebar({siteData:e}){return Jo(e)?(0,gp.jsx)(wr,{title:(0,VC.__)("Styles"),backPath:"/",description:(0,VC.__)("Preview your website's visual identity: colors, typography, and blocks.")}):(0,gp.jsx)(Et,{})},preview({siteData:e}){return Jo(e)?(0,gp.jsx)(z8,{isStatic:!0,settings:e.editorSettings}):void 0},mobile({siteData:e}){return Jo(e)?(0,gp.jsx)(z8,{isStatic:!0,settings:e.editorSettings}):void 0}}};var W8=a(j(),1),yb=a(M(),1);var Nu=a(C(),1);function U8(){return(0,Nu.jsx)(yb.Notice,{status:"error",isDismissible:!1,children:(0,W8.__)("The requested page could not be found. Please check the URL.")})}var q8={name:"notfound",path:"*",areas:{sidebar:(0,Nu.jsx)(wc,{}),mobile:(0,Nu.jsx)(wc,{customDescription:(0,Nu.jsx)(U8,{})}),content:(0,Nu.jsx)(yb.__experimentalSpacer,{padding:2,children:(0,Nu.jsx)(U8,{})})}};var ite=[...window?.__experimentalMediaEditor?[j8]:[],M8,D8,u8,l8,VL,FL,IL,u6,a6,OI,xI,H8,q8];function Z8(){let e=(0,bb.useRegistry)(),{registerRoute:t}=L((0,bb.useDispatch)(Re));(0,Y8.useEffect)(()=>{e.batch(()=>{ite.forEach(t)})},[e,t])}var wb=a(C(),1),{RouterProvider:ste}=L(X8.privateApis);function ate(){return hA(),wA(),(0,wb.jsx)(cA,{})}function J8(){Z8();let{routes:e,currentTheme:t,editorSettings:r}=(0,K8.useSelect)(i=>({routes:L(i(Re)).getRoutes(),currentTheme:i(Q8.store).getCurrentTheme(),editorSettings:i(Re).getSettings()}),[]),o=(0,xb.useCallback)(({path:i,query:s})=>Rr()?{path:i,query:{...s,wp_theme_preview:"wp_theme_preview"in s?s.wp_theme_preview:ua()}}:{path:i,query:s},[]),n=(0,xb.useMemo)(()=>({siteData:{currentTheme:t,editorSettings:r}}),[t,r]);return(0,wb.jsx)(ste,{routes:e,pathArg:"p",beforeNavigate:o,matchResolverArgs:n,children:(0,wb.jsx)(ate,{})})}var If=a(Ke(),1),$8=a(bt(),1),eB=a(vl(),1),Sb=a(C(),1),NC=(0,$8.getPath)(window.location.href)?.includes("site-editor.php"),DC=e=>{(0,eB.default)(`wp.editPost.${e}`,{since:"6.6",alternative:`wp.editor.${e}`})};function lte(e){return NC?(DC("PluginMoreMenuItem"),(0,Sb.jsx)(If.PluginMoreMenuItem,{...e})):null}function ute(e){return NC?(DC("PluginSidebar"),(0,Sb.jsx)(If.PluginSidebar,{...e})):null}function cte(e){return NC?(DC("PluginSidebarMoreMenuItem"),(0,Sb.jsx)(If.PluginSidebarMoreMenuItem,{...e})):null}var MC=a(C(),1),{registerCoreBlockBindingsSources:fte}=L(rB.privateApis);function dte(e,t){let r=document.getElementById(e),o=(0,Tb.createRoot)(r);(0,Du.dispatch)(LC.store).reapplyBlockTypeFilters();let n=(0,Cb.__experimentalGetCoreBlocks)().filter(({name:i})=>i!=="core/freeform");return(0,Cb.registerCoreBlocks)(n),fte(),(0,Du.dispatch)(LC.store).setFreeformFallbackBlockName("core/html"),(0,Eb.registerLegacyWidgetBlock)({inserter:!1}),(0,Eb.registerWidgetGroupBlock)({inserter:!1}),(0,Du.dispatch)(_b.store).setDefaults("core/edit-site",{welcomeGuide:!0,welcomeGuideStyles:!0,welcomeGuidePage:!0,welcomeGuideTemplate:!0}),(0,Du.dispatch)(_b.store).setDefaults("core",{allowRightClickOverrides:!0,distractionFree:!1,editorMode:"visual",editorTool:"edit",fixedToolbar:!1,focusMode:!1,inactivePanels:[],keepCaretInsideBlock:!1,openPanels:["post-status"],showBlockBreadcrumbs:!0,showListViewByDefault:!1,enableChoosePatternModal:!0,showCollaborationCursor:!1,showCollaborationNotifications:!0}),window.__clientSideMediaProcessing&&(0,Du.dispatch)(_b.store).setDefaults("core/media",{requireApproval:!0,optimizeOnUpload:!0}),(0,Du.dispatch)(Re).updateSettings(t),window.addEventListener("dragover",i=>i.preventDefault(),!1),window.addEventListener("drop",i=>i.preventDefault(),!1),o.render((0,MC.jsx)(Tb.StrictMode,{children:(0,MC.jsx)(J8,{})})),o}function mte(){(0,tB.default)("wp.editSite.reinitializeEditor",{since:"6.2",version:"6.3"})}return cB(pte);})();
/*! Bundled license information:

use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
  (**
   * @license React
   * use-sync-external-store-shim.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

is-plain-object/dist/is-plain-object.mjs:
  (*!
   * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
   *
   * Copyright (c) 2014-2017, Jon Schlinkert.
   * Released under the MIT License.
   *)
*/
                                                                                   dist/edit-widgets.js                                                                                0000644                 00000500376 15212564012 0010447 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;
(wp ||= {}).editWidgets = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name2 in all)
      __defProp(target, name2, { get: all[name2], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/blocks
  var require_blocks = __commonJS({
    "package-external:@wordpress/blocks"(exports, module) {
      module.exports = window.wp.blocks;
    }
  });

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/deprecated
  var require_deprecated = __commonJS({
    "package-external:@wordpress/deprecated"(exports, module) {
      module.exports = window.wp.deprecated;
    }
  });

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/block-library
  var require_block_library = __commonJS({
    "package-external:@wordpress/block-library"(exports, module) {
      module.exports = window.wp.blockLibrary;
    }
  });

  // package-external:@wordpress/core-data
  var require_core_data = __commonJS({
    "package-external:@wordpress/core-data"(exports, module) {
      module.exports = window.wp.coreData;
    }
  });

  // package-external:@wordpress/widgets
  var require_widgets = __commonJS({
    "package-external:@wordpress/widgets"(exports, module) {
      module.exports = window.wp.widgets;
    }
  });

  // package-external:@wordpress/preferences
  var require_preferences = __commonJS({
    "package-external:@wordpress/preferences"(exports, module) {
      module.exports = window.wp.preferences;
    }
  });

  // package-external:@wordpress/api-fetch
  var require_api_fetch = __commonJS({
    "package-external:@wordpress/api-fetch"(exports, module) {
      module.exports = window.wp.apiFetch;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // package-external:@wordpress/notices
  var require_notices = __commonJS({
    "package-external:@wordpress/notices"(exports, module) {
      module.exports = window.wp.notices;
    }
  });

  // package-external:@wordpress/components
  var require_components = __commonJS({
    "package-external:@wordpress/components"(exports, module) {
      module.exports = window.wp.components;
    }
  });

  // package-external:@wordpress/primitives
  var require_primitives = __commonJS({
    "package-external:@wordpress/primitives"(exports, module) {
      module.exports = window.wp.primitives;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // package-external:@wordpress/viewport
  var require_viewport = __commonJS({
    "package-external:@wordpress/viewport"(exports, module) {
      module.exports = window.wp.viewport;
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // package-external:@wordpress/plugins
  var require_plugins = __commonJS({
    "package-external:@wordpress/plugins"(exports, module) {
      module.exports = window.wp.plugins;
    }
  });

  // package-external:@wordpress/private-apis
  var require_private_apis = __commonJS({
    "package-external:@wordpress/private-apis"(exports, module) {
      module.exports = window.wp.privateApis;
    }
  });

  // package-external:@wordpress/block-editor
  var require_block_editor = __commonJS({
    "package-external:@wordpress/block-editor"(exports, module) {
      module.exports = window.wp.blockEditor;
    }
  });

  // package-external:@wordpress/hooks
  var require_hooks = __commonJS({
    "package-external:@wordpress/hooks"(exports, module) {
      module.exports = window.wp.hooks;
    }
  });

  // package-external:@wordpress/media-utils
  var require_media_utils = __commonJS({
    "package-external:@wordpress/media-utils"(exports, module) {
      module.exports = window.wp.mediaUtils;
    }
  });

  // package-external:@wordpress/patterns
  var require_patterns = __commonJS({
    "package-external:@wordpress/patterns"(exports, module) {
      module.exports = window.wp.patterns;
    }
  });

  // package-external:@wordpress/keyboard-shortcuts
  var require_keyboard_shortcuts = __commonJS({
    "package-external:@wordpress/keyboard-shortcuts"(exports, module) {
      module.exports = window.wp.keyboardShortcuts;
    }
  });

  // package-external:@wordpress/keycodes
  var require_keycodes = __commonJS({
    "package-external:@wordpress/keycodes"(exports, module) {
      module.exports = window.wp.keycodes;
    }
  });

  // package-external:@wordpress/url
  var require_url = __commonJS({
    "package-external:@wordpress/url"(exports, module) {
      module.exports = window.wp.url;
    }
  });

  // package-external:@wordpress/dom
  var require_dom = __commonJS({
    "package-external:@wordpress/dom"(exports, module) {
      module.exports = window.wp.dom;
    }
  });

  // packages/edit-widgets/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    initialize: () => initialize,
    initializeEditor: () => initializeEditor,
    reinitializeEditor: () => reinitializeEditor,
    store: () => store2
  });
  var import_blocks3 = __toESM(require_blocks(), 1);
  var import_data32 = __toESM(require_data(), 1);
  var import_deprecated6 = __toESM(require_deprecated(), 1);
  var import_element25 = __toESM(require_element(), 1);
  var import_block_library2 = __toESM(require_block_library(), 1);
  var import_core_data12 = __toESM(require_core_data(), 1);
  var import_widgets5 = __toESM(require_widgets(), 1);
  var import_preferences10 = __toESM(require_preferences(), 1);

  // packages/edit-widgets/build-module/store/index.mjs
  var import_api_fetch = __toESM(require_api_fetch(), 1);
  var import_data8 = __toESM(require_data(), 1);

  // packages/edit-widgets/build-module/store/reducer.mjs
  var import_data = __toESM(require_data(), 1);
  function widgetAreasOpenState(state = {}, action) {
    const { type } = action;
    switch (type) {
      case "SET_WIDGET_AREAS_OPEN_STATE": {
        return action.widgetAreasOpenState;
      }
      case "SET_IS_WIDGET_AREA_OPEN": {
        const { clientId, isOpen } = action;
        return {
          ...state,
          [clientId]: isOpen
        };
      }
      default: {
        return state;
      }
    }
  }
  function blockInserterPanel(state = false, action) {
    switch (action.type) {
      case "SET_IS_LIST_VIEW_OPENED":
        return action.isOpen ? false : state;
      case "SET_IS_INSERTER_OPENED":
        return action.value;
    }
    return state;
  }
  function listViewPanel(state = false, action) {
    switch (action.type) {
      case "SET_IS_INSERTER_OPENED":
        return action.value ? false : state;
      case "SET_IS_LIST_VIEW_OPENED":
        return action.isOpen;
    }
    return state;
  }
  function listViewToggleRef(state = { current: null }) {
    return state;
  }
  function inserterSidebarToggleRef(state = { current: null }) {
    return state;
  }
  function widgetSavingLock(state = {}, action) {
    switch (action.type) {
      case "LOCK_WIDGET_SAVING":
        return { ...state, [action.lockName]: true };
      case "UNLOCK_WIDGET_SAVING": {
        const { [action.lockName]: removedLockName, ...restState } = state;
        return restState;
      }
    }
    return state;
  }
  var reducer_default = (0, import_data.combineReducers)({
    blockInserterPanel,
    inserterSidebarToggleRef,
    listViewPanel,
    listViewToggleRef,
    widgetAreasOpenState,
    widgetSavingLock
  });

  // packages/edit-widgets/build-module/store/resolvers.mjs
  var resolvers_exports = {};
  __export(resolvers_exports, {
    getWidgetAreas: () => getWidgetAreas,
    getWidgets: () => getWidgets
  });
  var import_blocks2 = __toESM(require_blocks(), 1);
  var import_core_data2 = __toESM(require_core_data(), 1);

  // packages/edit-widgets/build-module/store/actions.mjs
  var actions_exports2 = {};
  __export(actions_exports2, {
    closeGeneralSidebar: () => closeGeneralSidebar,
    lockWidgetSaving: () => lockWidgetSaving,
    moveBlockToWidgetArea: () => moveBlockToWidgetArea,
    persistStubPost: () => persistStubPost,
    saveEditedWidgetAreas: () => saveEditedWidgetAreas,
    saveWidgetArea: () => saveWidgetArea,
    saveWidgetAreas: () => saveWidgetAreas,
    setIsInserterOpened: () => setIsInserterOpened,
    setIsListViewOpened: () => setIsListViewOpened,
    setIsWidgetAreaOpen: () => setIsWidgetAreaOpen,
    setWidgetAreasOpenState: () => setWidgetAreasOpenState,
    setWidgetIdForClientId: () => setWidgetIdForClientId,
    unlockWidgetSaving: () => unlockWidgetSaving
  });
  var import_i18n3 = __toESM(require_i18n(), 1);
  var import_notices = __toESM(require_notices(), 1);

  // node_modules/clsx/dist/clsx.mjs
  function 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 = 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 = r(e)) && (n && (n += " "), n += t);
    return n;
  }
  var clsx_default = clsx;

  // packages/interface/build-module/components/complementary-area/index.mjs
  var import_components5 = __toESM(require_components(), 1);
  var import_data6 = __toESM(require_data(), 1);
  var import_i18n = __toESM(require_i18n(), 1);

  // packages/icons/build-module/library/block-default.mjs
  var import_primitives = __toESM(require_primitives(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  var block_default_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z" }) });

  // packages/icons/build-module/library/check.mjs
  var import_primitives2 = __toESM(require_primitives(), 1);
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  var check_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.Path, { d: "M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z" }) });

  // packages/icons/build-module/library/close-small.mjs
  var import_primitives3 = __toESM(require_primitives(), 1);
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
  var close_small_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.Path, { 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" }) });

  // packages/icons/build-module/library/drawer-left.mjs
  var import_primitives4 = __toESM(require_primitives(), 1);
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
  var drawer_left_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.5 18.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h2.5v13zm10-.5c0 .3-.2.5-.5.5h-8v-13h8c.3 0 .5.2.5.5v12z" }) });

  // packages/icons/build-module/library/drawer-right.mjs
  var import_primitives5 = __toESM(require_primitives(), 1);
  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
  var drawer_right_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z" }) });

  // packages/icons/build-module/library/external.mjs
  var import_primitives6 = __toESM(require_primitives(), 1);
  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
  var external_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.Path, { 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" }) });

  // packages/icons/build-module/library/list-view.mjs
  var import_primitives7 = __toESM(require_primitives(), 1);
  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
  var list_view_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.Path, { d: "M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z" }) });

  // packages/icons/build-module/library/more-vertical.mjs
  var import_primitives8 = __toESM(require_primitives(), 1);
  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
  var more_vertical_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.Path, { d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" }) });

  // packages/icons/build-module/library/plus.mjs
  var import_primitives9 = __toESM(require_primitives(), 1);
  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
  var plus_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.Path, { d: "M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z" }) });

  // packages/icons/build-module/library/redo.mjs
  var import_primitives10 = __toESM(require_primitives(), 1);
  var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
  var redo_default = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.Path, { 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" }) });

  // packages/icons/build-module/library/star-empty.mjs
  var import_primitives11 = __toESM(require_primitives(), 1);
  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
  var star_empty_default = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives11.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives11.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/star-filled.mjs
  var import_primitives12 = __toESM(require_primitives(), 1);
  var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
  var star_filled_default = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.Path, { 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" }) });

  // packages/icons/build-module/library/undo.mjs
  var import_primitives13 = __toESM(require_primitives(), 1);
  var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
  var undo_default = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives13.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives13.Path, { 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" }) });

  // packages/interface/build-module/components/complementary-area/index.mjs
  var import_element2 = __toESM(require_element(), 1);
  var import_viewport = __toESM(require_viewport(), 1);
  var import_preferences3 = __toESM(require_preferences(), 1);
  var import_compose = __toESM(require_compose(), 1);
  var import_plugins2 = __toESM(require_plugins(), 1);

  // packages/interface/build-module/components/complementary-area-toggle/index.mjs
  var import_components = __toESM(require_components(), 1);
  var import_data5 = __toESM(require_data(), 1);
  var import_plugins = __toESM(require_plugins(), 1);

  // packages/interface/build-module/store/index.mjs
  var import_data4 = __toESM(require_data(), 1);

  // packages/interface/build-module/store/actions.mjs
  var actions_exports = {};
  __export(actions_exports, {
    closeModal: () => closeModal,
    disableComplementaryArea: () => disableComplementaryArea,
    enableComplementaryArea: () => enableComplementaryArea,
    openModal: () => openModal,
    pinItem: () => pinItem,
    setDefaultComplementaryArea: () => setDefaultComplementaryArea,
    setFeatureDefaults: () => setFeatureDefaults,
    setFeatureValue: () => setFeatureValue,
    toggleFeature: () => toggleFeature,
    unpinItem: () => unpinItem
  });
  var import_deprecated2 = __toESM(require_deprecated(), 1);
  var import_preferences = __toESM(require_preferences(), 1);

  // packages/interface/build-module/store/deprecated.mjs
  var import_deprecated = __toESM(require_deprecated(), 1);
  function normalizeComplementaryAreaScope(scope) {
    if (["core/edit-post", "core/edit-site"].includes(scope)) {
      (0, import_deprecated.default)(`${scope} interface scope`, {
        alternative: "core interface scope",
        hint: "core/edit-post and core/edit-site are merging.",
        version: "6.6"
      });
      return "core";
    }
    return scope;
  }
  function normalizeComplementaryAreaName(scope, name2) {
    if (scope === "core" && name2 === "edit-site/template") {
      (0, import_deprecated.default)(`edit-site/template sidebar`, {
        alternative: "edit-post/document",
        version: "6.6"
      });
      return "edit-post/document";
    }
    if (scope === "core" && name2 === "edit-site/block-inspector") {
      (0, import_deprecated.default)(`edit-site/block-inspector sidebar`, {
        alternative: "edit-post/block",
        version: "6.6"
      });
      return "edit-post/block";
    }
    return name2;
  }

  // packages/interface/build-module/store/actions.mjs
  var setDefaultComplementaryArea = (scope, area) => {
    scope = normalizeComplementaryAreaScope(scope);
    area = normalizeComplementaryAreaName(scope, area);
    return {
      type: "SET_DEFAULT_COMPLEMENTARY_AREA",
      scope,
      area
    };
  };
  var enableComplementaryArea = (scope, area) => ({ registry, dispatch: dispatch2 }) => {
    if (!area) {
      return;
    }
    scope = normalizeComplementaryAreaScope(scope);
    area = normalizeComplementaryAreaName(scope, area);
    const isComplementaryAreaVisible = registry.select(import_preferences.store).get(scope, "isComplementaryAreaVisible");
    if (!isComplementaryAreaVisible) {
      registry.dispatch(import_preferences.store).set(scope, "isComplementaryAreaVisible", true);
    }
    dispatch2({
      type: "ENABLE_COMPLEMENTARY_AREA",
      scope,
      area
    });
  };
  var disableComplementaryArea = (scope) => ({ registry }) => {
    scope = normalizeComplementaryAreaScope(scope);
    const isComplementaryAreaVisible = registry.select(import_preferences.store).get(scope, "isComplementaryAreaVisible");
    if (isComplementaryAreaVisible) {
      registry.dispatch(import_preferences.store).set(scope, "isComplementaryAreaVisible", false);
    }
  };
  var pinItem = (scope, item) => ({ registry }) => {
    if (!item) {
      return;
    }
    scope = normalizeComplementaryAreaScope(scope);
    item = normalizeComplementaryAreaName(scope, item);
    const pinnedItems = registry.select(import_preferences.store).get(scope, "pinnedItems");
    if (pinnedItems?.[item] === true) {
      return;
    }
    registry.dispatch(import_preferences.store).set(scope, "pinnedItems", {
      ...pinnedItems,
      [item]: true
    });
  };
  var unpinItem = (scope, item) => ({ registry }) => {
    if (!item) {
      return;
    }
    scope = normalizeComplementaryAreaScope(scope);
    item = normalizeComplementaryAreaName(scope, item);
    const pinnedItems = registry.select(import_preferences.store).get(scope, "pinnedItems");
    registry.dispatch(import_preferences.store).set(scope, "pinnedItems", {
      ...pinnedItems,
      [item]: false
    });
  };
  function toggleFeature(scope, featureName) {
    return function({ registry }) {
      (0, import_deprecated2.default)(`dispatch( 'core/interface' ).toggleFeature`, {
        since: "6.0",
        alternative: `dispatch( 'core/preferences' ).toggle`
      });
      registry.dispatch(import_preferences.store).toggle(scope, featureName);
    };
  }
  function setFeatureValue(scope, featureName, value) {
    return function({ registry }) {
      (0, import_deprecated2.default)(`dispatch( 'core/interface' ).setFeatureValue`, {
        since: "6.0",
        alternative: `dispatch( 'core/preferences' ).set`
      });
      registry.dispatch(import_preferences.store).set(scope, featureName, !!value);
    };
  }
  function setFeatureDefaults(scope, defaults) {
    return function({ registry }) {
      (0, import_deprecated2.default)(`dispatch( 'core/interface' ).setFeatureDefaults`, {
        since: "6.0",
        alternative: `dispatch( 'core/preferences' ).setDefaults`
      });
      registry.dispatch(import_preferences.store).setDefaults(scope, defaults);
    };
  }
  function openModal(name2) {
    return {
      type: "OPEN_MODAL",
      name: name2
    };
  }
  function closeModal() {
    return {
      type: "CLOSE_MODAL"
    };
  }

  // packages/interface/build-module/store/selectors.mjs
  var selectors_exports = {};
  __export(selectors_exports, {
    getActiveComplementaryArea: () => getActiveComplementaryArea,
    isComplementaryAreaLoading: () => isComplementaryAreaLoading,
    isFeatureActive: () => isFeatureActive,
    isItemPinned: () => isItemPinned,
    isModalActive: () => isModalActive
  });
  var import_data2 = __toESM(require_data(), 1);
  var import_deprecated4 = __toESM(require_deprecated(), 1);
  var import_preferences2 = __toESM(require_preferences(), 1);
  var getActiveComplementaryArea = (0, import_data2.createRegistrySelector)(
    (select) => (state, scope) => {
      scope = normalizeComplementaryAreaScope(scope);
      const isComplementaryAreaVisible = select(import_preferences2.store).get(
        scope,
        "isComplementaryAreaVisible"
      );
      if (isComplementaryAreaVisible === void 0) {
        return void 0;
      }
      if (isComplementaryAreaVisible === false) {
        return null;
      }
      return state?.complementaryAreas?.[scope];
    }
  );
  var isComplementaryAreaLoading = (0, import_data2.createRegistrySelector)(
    (select) => (state, scope) => {
      scope = normalizeComplementaryAreaScope(scope);
      const isVisible = select(import_preferences2.store).get(
        scope,
        "isComplementaryAreaVisible"
      );
      const identifier = state?.complementaryAreas?.[scope];
      return isVisible && identifier === void 0;
    }
  );
  var isItemPinned = (0, import_data2.createRegistrySelector)(
    (select) => (state, scope, item) => {
      scope = normalizeComplementaryAreaScope(scope);
      item = normalizeComplementaryAreaName(scope, item);
      const pinnedItems = select(import_preferences2.store).get(
        scope,
        "pinnedItems"
      );
      return pinnedItems?.[item] ?? true;
    }
  );
  var isFeatureActive = (0, import_data2.createRegistrySelector)(
    (select) => (state, scope, featureName) => {
      (0, import_deprecated4.default)(
        `select( 'core/interface' ).isFeatureActive( scope, featureName )`,
        {
          since: "6.0",
          alternative: `select( 'core/preferences' ).get( scope, featureName )`
        }
      );
      return !!select(import_preferences2.store).get(scope, featureName);
    }
  );
  function isModalActive(state, modalName) {
    return state.activeModal === modalName;
  }

  // packages/interface/build-module/store/reducer.mjs
  var import_data3 = __toESM(require_data(), 1);
  function complementaryAreas(state = {}, action) {
    switch (action.type) {
      case "SET_DEFAULT_COMPLEMENTARY_AREA": {
        const { scope, area } = action;
        if (state[scope]) {
          return state;
        }
        return {
          ...state,
          [scope]: area
        };
      }
      case "ENABLE_COMPLEMENTARY_AREA": {
        const { scope, area } = action;
        return {
          ...state,
          [scope]: area
        };
      }
    }
    return state;
  }
  function activeModal(state = null, action) {
    switch (action.type) {
      case "OPEN_MODAL":
        return action.name;
      case "CLOSE_MODAL":
        return null;
    }
    return state;
  }
  var reducer_default2 = (0, import_data3.combineReducers)({
    complementaryAreas,
    activeModal
  });

  // packages/interface/build-module/store/constants.mjs
  var STORE_NAME = "core/interface";

  // packages/interface/build-module/store/index.mjs
  var store = (0, import_data4.createReduxStore)(STORE_NAME, {
    reducer: reducer_default2,
    actions: actions_exports,
    selectors: selectors_exports
  });
  (0, import_data4.register)(store);

  // packages/interface/build-module/components/complementary-area-toggle/index.mjs
  var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
  function roleSupportsCheckedState(role) {
    return [
      "checkbox",
      "option",
      "radio",
      "switch",
      "menuitemcheckbox",
      "menuitemradio",
      "treeitem"
    ].includes(role);
  }
  function ComplementaryAreaToggle({
    as = import_components.Button,
    scope,
    identifier: identifierProp,
    icon: iconProp,
    selectedIcon,
    name: name2,
    shortcut,
    ...props
  }) {
    const ComponentToUse = as;
    const context = (0, import_plugins.usePluginContext)();
    const icon = iconProp || context.icon;
    const identifier = identifierProp || `${context.name}/${name2}`;
    const isSelected = (0, import_data5.useSelect)(
      (select) => select(store).getActiveComplementaryArea(scope) === identifier,
      [identifier, scope]
    );
    const { enableComplementaryArea: enableComplementaryArea2, disableComplementaryArea: disableComplementaryArea2 } = (0, import_data5.useDispatch)(store);
    return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
      ComponentToUse,
      {
        icon: selectedIcon && isSelected ? selectedIcon : icon,
        "aria-controls": identifier.replace("/", ":"),
        "aria-checked": roleSupportsCheckedState(props.role) ? isSelected : void 0,
        onClick: () => {
          if (isSelected) {
            disableComplementaryArea2(scope);
          } else {
            enableComplementaryArea2(scope, identifier);
          }
        },
        shortcut,
        ...props
      }
    );
  }

  // packages/interface/build-module/components/complementary-area-header/index.mjs
  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
  var ComplementaryAreaHeader = ({
    children,
    className,
    toggleButtonProps
  }) => {
    const toggleButton = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ComplementaryAreaToggle, { icon: close_small_default, ...toggleButtonProps });
    return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
      "div",
      {
        className: clsx_default(
          "components-panel__header",
          "interface-complementary-area-header",
          className
        ),
        tabIndex: -1,
        children: [
          children,
          toggleButton
        ]
      }
    );
  };
  var complementary_area_header_default = ComplementaryAreaHeader;

  // packages/interface/build-module/components/complementary-area-more-menu-item/index.mjs
  var import_components3 = __toESM(require_components(), 1);

  // packages/interface/build-module/components/action-item/index.mjs
  var import_components2 = __toESM(require_components(), 1);
  var import_element = __toESM(require_element(), 1);
  var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
  var noop = () => {
  };
  function ActionItemSlot({
    name: name2,
    as: Component2 = import_components2.MenuGroup,
    fillProps = {},
    bubblesVirtually,
    ...props
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
      import_components2.Slot,
      {
        name: name2,
        bubblesVirtually,
        fillProps,
        children: (fills) => {
          if (!import_element.Children.toArray(fills).length) {
            return null;
          }
          const initializedByPlugins = [];
          import_element.Children.forEach(
            fills,
            ({
              props: { __unstableExplicitMenuItem, __unstableTarget }
            }) => {
              if (__unstableTarget && __unstableExplicitMenuItem) {
                initializedByPlugins.push(__unstableTarget);
              }
            }
          );
          const children = import_element.Children.map(fills, (child) => {
            if (!child.props.__unstableExplicitMenuItem && initializedByPlugins.includes(
              child.props.__unstableTarget
            )) {
              return null;
            }
            return child;
          });
          return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Component2, { ...props, children });
        }
      }
    );
  }
  function ActionItem({ name: name2, as: Component2 = import_components2.Button, onClick, ...props }) {
    return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_components2.Fill, { name: name2, children: ({ onClick: fpOnClick }) => {
      return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
        Component2,
        {
          onClick: onClick || fpOnClick ? (...args) => {
            (onClick || noop)(...args);
            (fpOnClick || noop)(...args);
          } : void 0,
          ...props
        }
      );
    } });
  }
  ActionItem.Slot = ActionItemSlot;
  var action_item_default = ActionItem;

  // packages/interface/build-module/components/complementary-area-more-menu-item/index.mjs
  var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
  var PluginsMenuItem = ({
    // Menu item is marked with unstable prop for backward compatibility.
    // They are removed so they don't leak to DOM elements.
    // @see https://github.com/WordPress/gutenberg/issues/14457
    __unstableExplicitMenuItem,
    __unstableTarget,
    ...restProps
  }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_components3.MenuItem, { ...restProps });
  function ComplementaryAreaMoreMenuItem({
    scope,
    target,
    __unstableExplicitMenuItem,
    ...props
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
      ComplementaryAreaToggle,
      {
        as: (toggleProps) => {
          return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
            action_item_default,
            {
              __unstableExplicitMenuItem,
              __unstableTarget: `${scope}/${target}`,
              as: PluginsMenuItem,
              name: `${scope}/plugin-more-menu`,
              ...toggleProps
            }
          );
        },
        role: "menuitemcheckbox",
        selectedIcon: check_default,
        name: target,
        scope,
        ...props
      }
    );
  }

  // packages/interface/build-module/components/pinned-items/index.mjs
  var import_components4 = __toESM(require_components(), 1);
  var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
  function PinnedItems({ scope, ...props }) {
    return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_components4.Fill, { name: `PinnedItems/${scope}`, ...props });
  }
  function PinnedItemsSlot({ scope, className, ...props }) {
    return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_components4.Slot, { name: `PinnedItems/${scope}`, ...props, children: (fills) => fills?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
      "div",
      {
        className: clsx_default(
          className,
          "interface-pinned-items"
        ),
        children: fills
      }
    ) });
  }
  PinnedItems.Slot = PinnedItemsSlot;
  var pinned_items_default = PinnedItems;

  // packages/interface/build-module/components/complementary-area/index.mjs
  var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
  var ANIMATION_DURATION = 0.3;
  function ComplementaryAreaSlot({ scope, ...props }) {
    return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_components5.Slot, { name: `ComplementaryArea/${scope}`, ...props });
  }
  var SIDEBAR_WIDTH = 280;
  var variants = {
    open: { width: SIDEBAR_WIDTH },
    closed: { width: 0 },
    mobileOpen: { width: "100vw" }
  };
  function ComplementaryAreaFill({
    activeArea,
    isActive,
    scope,
    children,
    className,
    id
  }) {
    const disableMotion = (0, import_compose.useReducedMotion)();
    const isMobileViewport = (0, import_compose.useViewportMatch)("medium", "<");
    const previousActiveArea = (0, import_compose.usePrevious)(activeArea);
    const previousIsActive = (0, import_compose.usePrevious)(isActive);
    const [, setState] = (0, import_element2.useState)({});
    (0, import_element2.useEffect)(() => {
      setState({});
    }, [isActive]);
    const transition = {
      type: "tween",
      duration: disableMotion || isMobileViewport || !!previousActiveArea && !!activeArea && activeArea !== previousActiveArea ? 0 : ANIMATION_DURATION,
      ease: [0.6, 0, 0.4, 1]
    };
    return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_components5.Fill, { name: `ComplementaryArea/${scope}`, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_components5.__unstableAnimatePresence, { initial: false, children: (previousIsActive || isActive) && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
      import_components5.__unstableMotion.div,
      {
        variants,
        initial: "closed",
        animate: isMobileViewport ? "mobileOpen" : "open",
        exit: "closed",
        transition,
        className: "interface-complementary-area__fill",
        children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
          "div",
          {
            id,
            className,
            style: {
              width: isMobileViewport ? "100vw" : SIDEBAR_WIDTH
            },
            children
          }
        )
      }
    ) }) });
  }
  function useAdjustComplementaryListener(scope, identifier, activeArea, isActive, isSmall) {
    const previousIsSmallRef = (0, import_element2.useRef)(false);
    const shouldOpenWhenNotSmallRef = (0, import_element2.useRef)(false);
    const { enableComplementaryArea: enableComplementaryArea2, disableComplementaryArea: disableComplementaryArea2 } = (0, import_data6.useDispatch)(store);
    (0, import_element2.useEffect)(() => {
      if (isActive && isSmall && !previousIsSmallRef.current) {
        disableComplementaryArea2(scope);
        shouldOpenWhenNotSmallRef.current = true;
      } else if (
        // If there is a flag indicating the complementary area should be
        // enabled when we go from small to big window size and we are going
        // from a small to big window size.
        shouldOpenWhenNotSmallRef.current && !isSmall && previousIsSmallRef.current
      ) {
        shouldOpenWhenNotSmallRef.current = false;
        enableComplementaryArea2(scope, identifier);
      } else if (
        // If the flag is indicating the current complementary should be
        // reopened but another complementary area becomes active, remove
        // the flag.
        shouldOpenWhenNotSmallRef.current && activeArea && activeArea !== identifier
      ) {
        shouldOpenWhenNotSmallRef.current = false;
      }
      if (isSmall !== previousIsSmallRef.current) {
        previousIsSmallRef.current = isSmall;
      }
    }, [
      isActive,
      isSmall,
      scope,
      identifier,
      activeArea,
      disableComplementaryArea2,
      enableComplementaryArea2
    ]);
  }
  function ComplementaryArea({
    children,
    className,
    closeLabel = (0, import_i18n.__)("Close plugin"),
    identifier: identifierProp,
    header,
    headerClassName,
    icon: iconProp,
    isPinnable = true,
    panelClassName,
    scope,
    name: name2,
    title,
    toggleShortcut,
    isActiveByDefault
  }) {
    const context = (0, import_plugins2.usePluginContext)();
    const icon = iconProp || context.icon;
    const identifier = identifierProp || `${context.name}/${name2}`;
    const [isReady, setIsReady] = (0, import_element2.useState)(false);
    const {
      isLoading,
      isActive,
      isPinned,
      activeArea,
      isSmall,
      isLarge,
      showIconLabels
    } = (0, import_data6.useSelect)(
      (select) => {
        const {
          getActiveComplementaryArea: getActiveComplementaryArea2,
          isComplementaryAreaLoading: isComplementaryAreaLoading2,
          isItemPinned: isItemPinned2
        } = select(store);
        const { get } = select(import_preferences3.store);
        const _activeArea = getActiveComplementaryArea2(scope);
        return {
          isLoading: isComplementaryAreaLoading2(scope),
          isActive: _activeArea === identifier,
          isPinned: isItemPinned2(scope, identifier),
          activeArea: _activeArea,
          isSmall: select(import_viewport.store).isViewportMatch("< medium"),
          isLarge: select(import_viewport.store).isViewportMatch("large"),
          showIconLabels: get("core", "showIconLabels")
        };
      },
      [identifier, scope]
    );
    const isMobileViewport = (0, import_compose.useViewportMatch)("medium", "<");
    useAdjustComplementaryListener(
      scope,
      identifier,
      activeArea,
      isActive,
      isSmall
    );
    const {
      enableComplementaryArea: enableComplementaryArea2,
      disableComplementaryArea: disableComplementaryArea2,
      pinItem: pinItem2,
      unpinItem: unpinItem2
    } = (0, import_data6.useDispatch)(store);
    (0, import_element2.useEffect)(() => {
      if (isActiveByDefault && activeArea === void 0 && !isSmall) {
        enableComplementaryArea2(scope, identifier);
      } else if (activeArea === void 0 && isSmall) {
        disableComplementaryArea2(scope, identifier);
      }
      setIsReady(true);
    }, [
      activeArea,
      isActiveByDefault,
      scope,
      identifier,
      isSmall,
      enableComplementaryArea2,
      disableComplementaryArea2
    ]);
    if (!isReady) {
      return;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
      isPinnable && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(pinned_items_default, { scope, children: isPinned && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
        ComplementaryAreaToggle,
        {
          scope,
          identifier,
          isPressed: isActive && (!showIconLabels || isLarge),
          "aria-expanded": isActive,
          "aria-disabled": isLoading,
          label: title,
          icon: showIconLabels ? check_default : icon,
          showTooltip: !showIconLabels,
          variant: showIconLabels ? "tertiary" : void 0,
          size: "compact",
          shortcut: toggleShortcut
        }
      ) }),
      name2 && isPinnable && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
        ComplementaryAreaMoreMenuItem,
        {
          target: name2,
          scope,
          icon,
          identifier,
          children: title
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
        ComplementaryAreaFill,
        {
          activeArea,
          isActive,
          className: clsx_default("interface-complementary-area", className),
          scope,
          id: identifier.replace("/", ":"),
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
              complementary_area_header_default,
              {
                className: headerClassName,
                closeLabel,
                onClose: () => disableComplementaryArea2(scope),
                toggleButtonProps: {
                  label: closeLabel,
                  size: "compact",
                  shortcut: toggleShortcut,
                  scope,
                  identifier
                },
                children: header || /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
                  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { className: "interface-complementary-area-header__title", children: title }),
                  isPinnable && !isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
                    import_components5.Button,
                    {
                      className: "interface-complementary-area__pin-unpin-item",
                      icon: isPinned ? star_filled_default : star_empty_default,
                      label: isPinned ? (0, import_i18n.__)("Unpin from toolbar") : (0, import_i18n.__)("Pin to toolbar"),
                      onClick: () => (isPinned ? unpinItem2 : pinItem2)(
                        scope,
                        identifier
                      ),
                      isPressed: isPinned,
                      "aria-expanded": isPinned,
                      size: "compact"
                    }
                  )
                ] })
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_components5.Panel, { className: panelClassName, children })
          ]
        }
      )
    ] });
  }
  ComplementaryArea.Slot = ComplementaryAreaSlot;
  var complementary_area_default = ComplementaryArea;

  // packages/admin-ui/build-module/navigable-region/index.mjs
  var import_element3 = __toESM(require_element(), 1);
  var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
  var NavigableRegion = (0, import_element3.forwardRef)(
    ({ children, className, ariaLabel, as: Tag = "div", ...props }, ref) => {
      return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
        Tag,
        {
          ref,
          className: clsx_default("admin-ui-navigable-region", className),
          "aria-label": ariaLabel,
          role: "region",
          tabIndex: "-1",
          ...props,
          children
        }
      );
    }
  );
  NavigableRegion.displayName = "NavigableRegion";
  var navigable_region_default = NavigableRegion;

  // packages/interface/build-module/components/interface-skeleton/index.mjs
  var import_element4 = __toESM(require_element(), 1);
  var import_components6 = __toESM(require_components(), 1);
  var import_i18n2 = __toESM(require_i18n(), 1);
  var import_compose2 = __toESM(require_compose(), 1);
  var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
  var ANIMATION_DURATION2 = 0.25;
  var commonTransition = {
    type: "tween",
    duration: ANIMATION_DURATION2,
    ease: [0.6, 0, 0.4, 1]
  };
  function useHTMLClass(className) {
    (0, import_element4.useEffect)(() => {
      const element = document && document.querySelector(`html:not(.${className})`);
      if (!element) {
        return;
      }
      element.classList.toggle(className);
      return () => {
        element.classList.toggle(className);
      };
    }, [className]);
  }
  var headerVariants = {
    hidden: { opacity: 1, marginTop: -60 },
    visible: { opacity: 1, marginTop: 0 },
    distractionFreeHover: {
      opacity: 1,
      marginTop: 0,
      transition: {
        ...commonTransition,
        delay: 0.2,
        delayChildren: 0.2
      }
    },
    distractionFreeHidden: {
      opacity: 0,
      marginTop: -60
    },
    distractionFreeDisabled: {
      opacity: 0,
      marginTop: 0,
      transition: {
        ...commonTransition,
        delay: 0.8,
        delayChildren: 0.8
      }
    }
  };
  function InterfaceSkeleton({
    isDistractionFree,
    footer,
    header,
    editorNotices,
    sidebar,
    secondarySidebar,
    content,
    actions,
    labels,
    className
  }, ref) {
    const [secondarySidebarResizeListener, secondarySidebarSize] = (0, import_compose2.useResizeObserver)();
    const isMobileViewport = (0, import_compose2.useViewportMatch)("medium", "<");
    const disableMotion = (0, import_compose2.useReducedMotion)();
    const defaultTransition = {
      type: "tween",
      duration: disableMotion ? 0 : ANIMATION_DURATION2,
      ease: [0.6, 0, 0.4, 1]
    };
    useHTMLClass("interface-interface-skeleton__html-container");
    const defaultLabels = {
      /* translators: accessibility text for the top bar landmark region. */
      header: (0, import_i18n2._x)("Header", "header landmark area"),
      /* translators: accessibility text for the content landmark region. */
      body: (0, import_i18n2.__)("Content"),
      /* translators: accessibility text for the secondary sidebar landmark region. */
      secondarySidebar: (0, import_i18n2.__)("Block Library"),
      /* translators: accessibility text for the settings landmark region. */
      sidebar: (0, import_i18n2._x)("Settings", "settings landmark area"),
      /* translators: accessibility text for the publish landmark region. */
      actions: (0, import_i18n2.__)("Publish"),
      /* translators: accessibility text for the footer landmark region. */
      footer: (0, import_i18n2.__)("Footer")
    };
    const mergedLabels = { ...defaultLabels, ...labels };
    return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
      "div",
      {
        ref,
        className: clsx_default(
          className,
          "interface-interface-skeleton",
          !!footer && "has-footer"
        ),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "interface-interface-skeleton__editor", children: [
            /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components6.__unstableAnimatePresence, { initial: false, children: !!header && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
              navigable_region_default,
              {
                as: import_components6.__unstableMotion.div,
                className: "interface-interface-skeleton__header",
                "aria-label": mergedLabels.header,
                initial: isDistractionFree && !isMobileViewport ? "distractionFreeHidden" : "hidden",
                whileHover: isDistractionFree && !isMobileViewport ? "distractionFreeHover" : "visible",
                animate: isDistractionFree && !isMobileViewport ? "distractionFreeDisabled" : "visible",
                exit: isDistractionFree && !isMobileViewport ? "distractionFreeHidden" : "hidden",
                variants: headerVariants,
                transition: defaultTransition,
                children: header
              }
            ) }),
            isDistractionFree && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "interface-interface-skeleton__header", children: editorNotices }),
            /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "interface-interface-skeleton__body", children: [
              /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components6.__unstableAnimatePresence, { initial: false, children: !!secondarySidebar && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
                navigable_region_default,
                {
                  className: "interface-interface-skeleton__secondary-sidebar",
                  ariaLabel: mergedLabels.secondarySidebar,
                  as: import_components6.__unstableMotion.div,
                  initial: "closed",
                  animate: "open",
                  exit: "closed",
                  variants: {
                    open: { width: secondarySidebarSize.width },
                    closed: { width: 0 }
                  },
                  transition: defaultTransition,
                  children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
                    import_components6.__unstableMotion.div,
                    {
                      style: {
                        position: "absolute",
                        width: isMobileViewport ? "100vw" : "fit-content",
                        height: "100%",
                        left: 0
                      },
                      variants: {
                        open: { x: 0 },
                        closed: { x: "-100%" }
                      },
                      transition: defaultTransition,
                      children: [
                        secondarySidebarResizeListener,
                        secondarySidebar
                      ]
                    }
                  )
                }
              ) }),
              /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
                navigable_region_default,
                {
                  className: "interface-interface-skeleton__content",
                  ariaLabel: mergedLabels.body,
                  children: content
                }
              ),
              !!sidebar && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
                navigable_region_default,
                {
                  className: "interface-interface-skeleton__sidebar",
                  ariaLabel: mergedLabels.sidebar,
                  children: sidebar
                }
              ),
              !!actions && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
                navigable_region_default,
                {
                  className: "interface-interface-skeleton__actions",
                  ariaLabel: mergedLabels.actions,
                  children: actions
                }
              )
            ] })
          ] }),
          !!footer && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
            navigable_region_default,
            {
              className: "interface-interface-skeleton__footer",
              ariaLabel: mergedLabels.footer,
              children: footer
            }
          )
        ]
      }
    );
  }
  var interface_skeleton_default = (0, import_element4.forwardRef)(InterfaceSkeleton);

  // packages/edit-widgets/build-module/store/actions.mjs
  var import_widgets2 = __toESM(require_widgets(), 1);
  var import_core_data = __toESM(require_core_data(), 1);
  var import_block_editor = __toESM(require_block_editor(), 1);

  // packages/edit-widgets/build-module/store/transformers.mjs
  var import_blocks = __toESM(require_blocks(), 1);
  var import_widgets = __toESM(require_widgets(), 1);
  function transformWidgetToBlock(widget) {
    if (widget.id_base === "block") {
      const parsedBlocks = (0, import_blocks.parse)(widget.instance.raw.content, {
        __unstableSkipAutop: true
      });
      if (!parsedBlocks.length) {
        return (0, import_widgets.addWidgetIdToBlock)(
          (0, import_blocks.createBlock)("core/paragraph", {}, []),
          widget.id
        );
      }
      return (0, import_widgets.addWidgetIdToBlock)(parsedBlocks[0], widget.id);
    }
    let attributes;
    if (widget._embedded.about[0].is_multi) {
      attributes = {
        idBase: widget.id_base,
        instance: widget.instance
      };
    } else {
      attributes = {
        id: widget.id
      };
    }
    return (0, import_widgets.addWidgetIdToBlock)(
      (0, import_blocks.createBlock)("core/legacy-widget", attributes, []),
      widget.id
    );
  }
  function transformBlockToWidget(block, relatedWidget = {}) {
    let widget;
    const isValidLegacyWidgetBlock = block.name === "core/legacy-widget" && (block.attributes.id || block.attributes.instance);
    if (isValidLegacyWidgetBlock) {
      widget = {
        ...relatedWidget,
        id: block.attributes.id ?? relatedWidget.id,
        id_base: block.attributes.idBase ?? relatedWidget.id_base,
        instance: block.attributes.instance ?? relatedWidget.instance
      };
    } else {
      widget = {
        ...relatedWidget,
        id_base: "block",
        instance: {
          raw: {
            content: (0, import_blocks.serialize)(block)
          }
        }
      };
    }
    delete widget.rendered;
    delete widget.rendered_form;
    return widget;
  }

  // packages/edit-widgets/build-module/store/utils.mjs
  var KIND = "root";
  var WIDGET_AREA_ENTITY_TYPE = "sidebar";
  var POST_TYPE = "postType";
  var buildWidgetAreaPostId = (widgetAreaId) => `widget-area-${widgetAreaId}`;
  var buildWidgetAreasPostId = () => `widget-areas`;
  function buildWidgetAreasQuery() {
    return {
      per_page: -1
    };
  }
  function buildWidgetsQuery() {
    return {
      per_page: -1,
      _embed: "about"
    };
  }
  var createStubPost = (id, blocks) => ({
    id,
    slug: id,
    status: "draft",
    type: "page",
    blocks,
    meta: {
      widgetAreaId: id
    }
  });

  // packages/edit-widgets/build-module/store/constants.mjs
  var STORE_NAME2 = "core/edit-widgets";

  // packages/edit-widgets/build-module/store/actions.mjs
  var persistStubPost = (id, blocks) => ({ registry }) => {
    const stubPost = createStubPost(id, blocks);
    registry.dispatch(import_core_data.store).receiveEntityRecords(
      KIND,
      POST_TYPE,
      stubPost,
      { id: stubPost.id },
      false
    );
    return stubPost;
  };
  var saveEditedWidgetAreas = () => async ({ select, dispatch: dispatch2, registry }) => {
    const editedWidgetAreas = select.getEditedWidgetAreas();
    if (!editedWidgetAreas?.length) {
      return;
    }
    try {
      await dispatch2.saveWidgetAreas(editedWidgetAreas);
      registry.dispatch(import_notices.store).createSuccessNotice((0, import_i18n3.__)("Widgets saved."), {
        type: "snackbar"
      });
    } catch (e) {
      registry.dispatch(import_notices.store).createErrorNotice(
        /* translators: %s: The error message. */
        (0, import_i18n3.sprintf)((0, import_i18n3.__)("There was an error. %s"), e.message),
        {
          type: "snackbar"
        }
      );
    }
  };
  var saveWidgetAreas = (widgetAreas) => async ({ dispatch: dispatch2, registry }) => {
    try {
      for (const widgetArea of widgetAreas) {
        await dispatch2.saveWidgetArea(widgetArea.id);
      }
    } finally {
      await registry.dispatch(import_core_data.store).finishResolution(
        "getEntityRecord",
        KIND,
        WIDGET_AREA_ENTITY_TYPE,
        buildWidgetAreasQuery()
      );
    }
  };
  var saveWidgetArea = (widgetAreaId) => async ({ dispatch: dispatch2, select, registry }) => {
    const widgets = select.getWidgets();
    const post = registry.select(import_core_data.store).getEditedEntityRecord(
      KIND,
      POST_TYPE,
      buildWidgetAreaPostId(widgetAreaId)
    );
    const areaWidgets = Object.values(widgets).filter(
      ({ sidebar }) => sidebar === widgetAreaId
    );
    const usedReferenceWidgets = [];
    const widgetsBlocks = post.blocks.filter((block) => {
      const { id } = block.attributes;
      if (block.name === "core/legacy-widget" && id) {
        if (usedReferenceWidgets.includes(id)) {
          return false;
        }
        usedReferenceWidgets.push(id);
      }
      return true;
    });
    const deletedWidgets = [];
    for (const widget of areaWidgets) {
      const widgetsNewArea = select.getWidgetAreaForWidgetId(widget.id);
      if (!widgetsNewArea) {
        deletedWidgets.push(widget);
      }
    }
    const batchMeta = [];
    const batchTasks = [];
    const sidebarWidgetsIds = [];
    for (let i = 0; i < widgetsBlocks.length; i++) {
      const block = widgetsBlocks[i];
      const widgetId = (0, import_widgets2.getWidgetIdFromBlock)(block);
      const oldWidget = widgets[widgetId];
      const widget = transformBlockToWidget(block, oldWidget);
      sidebarWidgetsIds.push(widgetId);
      if (oldWidget) {
        registry.dispatch(import_core_data.store).editEntityRecord(
          "root",
          "widget",
          widgetId,
          {
            ...widget,
            sidebar: widgetAreaId
          },
          { undoIgnore: true }
        );
        const hasEdits = registry.select(import_core_data.store).hasEditsForEntityRecord("root", "widget", widgetId);
        if (!hasEdits) {
          continue;
        }
        batchTasks.push(
          ({ saveEditedEntityRecord }) => saveEditedEntityRecord("root", "widget", widgetId)
        );
      } else {
        batchTasks.push(
          ({ saveEntityRecord }) => saveEntityRecord("root", "widget", {
            ...widget,
            sidebar: widgetAreaId
          })
        );
      }
      batchMeta.push({
        block,
        position: i,
        clientId: block.clientId
      });
    }
    for (const widget of deletedWidgets) {
      batchTasks.push(
        ({ deleteEntityRecord }) => deleteEntityRecord("root", "widget", widget.id, {
          force: true
        })
      );
    }
    const records = await registry.dispatch(import_core_data.store).__experimentalBatch(batchTasks);
    const preservedRecords = records.filter(
      (record) => !record.hasOwnProperty("deleted")
    );
    const failedWidgetNames = [];
    for (let i = 0; i < preservedRecords.length; i++) {
      const widget = preservedRecords[i];
      const { block, position } = batchMeta[i];
      post.blocks[position].attributes.__internalWidgetId = widget.id;
      const error = registry.select(import_core_data.store).getLastEntitySaveError("root", "widget", widget.id);
      if (error) {
        failedWidgetNames.push(block.attributes?.name || block?.name);
      }
      if (!sidebarWidgetsIds[position]) {
        sidebarWidgetsIds[position] = widget.id;
      }
    }
    if (failedWidgetNames.length) {
      throw new Error(
        (0, import_i18n3.sprintf)(
          /* translators: %s: List of widget names */
          (0, import_i18n3.__)("Could not save the following widgets: %s."),
          failedWidgetNames.join(", ")
        )
      );
    }
    registry.dispatch(import_core_data.store).editEntityRecord(
      KIND,
      WIDGET_AREA_ENTITY_TYPE,
      widgetAreaId,
      {
        widgets: sidebarWidgetsIds
      },
      { undoIgnore: true }
    );
    dispatch2(trySaveWidgetArea(widgetAreaId));
    registry.dispatch(import_core_data.store).receiveEntityRecords(KIND, POST_TYPE, post, void 0);
  };
  var trySaveWidgetArea = (widgetAreaId) => ({ registry }) => {
    registry.dispatch(import_core_data.store).saveEditedEntityRecord(
      KIND,
      WIDGET_AREA_ENTITY_TYPE,
      widgetAreaId,
      {
        throwOnError: true
      }
    );
  };
  function setWidgetIdForClientId(clientId, widgetId) {
    return {
      type: "SET_WIDGET_ID_FOR_CLIENT_ID",
      clientId,
      widgetId
    };
  }
  function setWidgetAreasOpenState(widgetAreasOpenState2) {
    return {
      type: "SET_WIDGET_AREAS_OPEN_STATE",
      widgetAreasOpenState: widgetAreasOpenState2
    };
  }
  function setIsWidgetAreaOpen(clientId, isOpen) {
    return {
      type: "SET_IS_WIDGET_AREA_OPEN",
      clientId,
      isOpen
    };
  }
  function setIsInserterOpened(value) {
    return {
      type: "SET_IS_INSERTER_OPENED",
      value
    };
  }
  function setIsListViewOpened(isOpen) {
    return {
      type: "SET_IS_LIST_VIEW_OPENED",
      isOpen
    };
  }
  var closeGeneralSidebar = () => ({ registry }) => {
    registry.dispatch(store).disableComplementaryArea(STORE_NAME2);
  };
  var moveBlockToWidgetArea = (clientId, widgetAreaId) => async ({ dispatch: dispatch2, select, registry }) => {
    const sourceRootClientId = registry.select(import_block_editor.store).getBlockRootClientId(clientId);
    const widgetAreas = registry.select(import_block_editor.store).getBlocks();
    const destinationWidgetAreaBlock = widgetAreas.find(
      ({ attributes }) => attributes.id === widgetAreaId
    );
    const destinationRootClientId = destinationWidgetAreaBlock.clientId;
    const destinationInnerBlocksClientIds = registry.select(import_block_editor.store).getBlockOrder(destinationRootClientId);
    const destinationIndex = destinationInnerBlocksClientIds.length;
    const isDestinationWidgetAreaOpen = select.getIsWidgetAreaOpen(
      destinationRootClientId
    );
    if (!isDestinationWidgetAreaOpen) {
      dispatch2.setIsWidgetAreaOpen(destinationRootClientId, true);
    }
    registry.dispatch(import_block_editor.store).moveBlocksToPosition(
      [clientId],
      sourceRootClientId,
      destinationRootClientId,
      destinationIndex
    );
  };
  function unlockWidgetSaving(lockName) {
    return {
      type: "UNLOCK_WIDGET_SAVING",
      lockName
    };
  }
  function lockWidgetSaving(lockName) {
    return {
      type: "LOCK_WIDGET_SAVING",
      lockName
    };
  }

  // packages/edit-widgets/build-module/store/resolvers.mjs
  var getWidgetAreas = () => async ({ dispatch: dispatch2, registry }) => {
    const query = buildWidgetAreasQuery();
    const widgetAreas = await registry.resolveSelect(import_core_data2.store).getEntityRecords(KIND, WIDGET_AREA_ENTITY_TYPE, query);
    const widgetAreaBlocks = [];
    const sortedWidgetAreas = widgetAreas.sort((a, b) => {
      if (a.id === "wp_inactive_widgets") {
        return 1;
      }
      if (b.id === "wp_inactive_widgets") {
        return -1;
      }
      return 0;
    });
    for (const widgetArea of sortedWidgetAreas) {
      widgetAreaBlocks.push(
        (0, import_blocks2.createBlock)("core/widget-area", {
          id: widgetArea.id,
          name: widgetArea.name
        })
      );
      if (!widgetArea.widgets.length) {
        dispatch2(
          persistStubPost(
            buildWidgetAreaPostId(widgetArea.id),
            []
          )
        );
      }
    }
    const widgetAreasOpenState2 = {};
    widgetAreaBlocks.forEach((widgetAreaBlock, index) => {
      widgetAreasOpenState2[widgetAreaBlock.clientId] = index === 0;
    });
    dispatch2(setWidgetAreasOpenState(widgetAreasOpenState2));
    dispatch2(
      persistStubPost(buildWidgetAreasPostId(), widgetAreaBlocks)
    );
  };
  var getWidgets = () => async ({ dispatch: dispatch2, registry }) => {
    const query = buildWidgetsQuery();
    const widgets = await registry.resolveSelect(import_core_data2.store).getEntityRecords("root", "widget", query);
    const groupedBySidebar = {};
    for (const widget of widgets) {
      const block = transformWidgetToBlock(widget);
      groupedBySidebar[widget.sidebar] = groupedBySidebar[widget.sidebar] || [];
      groupedBySidebar[widget.sidebar].push(block);
    }
    for (const sidebarId in groupedBySidebar) {
      if (groupedBySidebar.hasOwnProperty(sidebarId)) {
        dispatch2(
          persistStubPost(
            buildWidgetAreaPostId(sidebarId),
            groupedBySidebar[sidebarId]
          )
        );
      }
    }
  };

  // packages/edit-widgets/build-module/store/selectors.mjs
  var selectors_exports2 = {};
  __export(selectors_exports2, {
    __experimentalGetInsertionPoint: () => __experimentalGetInsertionPoint,
    canInsertBlockInWidgetArea: () => canInsertBlockInWidgetArea,
    getEditedWidgetAreas: () => getEditedWidgetAreas,
    getIsWidgetAreaOpen: () => getIsWidgetAreaOpen,
    getParentWidgetAreaBlock: () => getParentWidgetAreaBlock,
    getReferenceWidgetBlocks: () => getReferenceWidgetBlocks,
    getWidget: () => getWidget,
    getWidgetAreaForWidgetId: () => getWidgetAreaForWidgetId,
    getWidgetAreas: () => getWidgetAreas2,
    getWidgets: () => getWidgets2,
    isInserterOpened: () => isInserterOpened,
    isListViewOpened: () => isListViewOpened,
    isSavingWidgetAreas: () => isSavingWidgetAreas,
    isWidgetSavingLocked: () => isWidgetSavingLocked
  });
  var import_data7 = __toESM(require_data(), 1);
  var import_widgets3 = __toESM(require_widgets(), 1);
  var import_core_data3 = __toESM(require_core_data(), 1);
  var import_block_editor2 = __toESM(require_block_editor(), 1);
  var EMPTY_INSERTION_POINT = {
    rootClientId: void 0,
    insertionIndex: void 0
  };
  var getWidgets2 = (0, import_data7.createRegistrySelector)(
    (select) => (0, import_data7.createSelector)(
      () => {
        const widgets = select(import_core_data3.store).getEntityRecords(
          "root",
          "widget",
          buildWidgetsQuery()
        );
        return (
          // Key widgets by their ID.
          widgets?.reduce(
            (allWidgets, widget) => ({
              ...allWidgets,
              [widget.id]: widget
            }),
            {}
          ) ?? {}
        );
      },
      () => [
        select(import_core_data3.store).getEntityRecords(
          "root",
          "widget",
          buildWidgetsQuery()
        )
      ]
    )
  );
  var getWidget = (0, import_data7.createRegistrySelector)(
    (select) => (state, id) => {
      const widgets = select(STORE_NAME2).getWidgets();
      return widgets[id];
    }
  );
  var getWidgetAreas2 = (0, import_data7.createRegistrySelector)((select) => () => {
    const query = buildWidgetAreasQuery();
    return select(import_core_data3.store).getEntityRecords(
      KIND,
      WIDGET_AREA_ENTITY_TYPE,
      query
    );
  });
  var getWidgetAreaForWidgetId = (0, import_data7.createRegistrySelector)(
    (select) => (state, widgetId) => {
      const widgetAreas = select(STORE_NAME2).getWidgetAreas();
      return widgetAreas.find((widgetArea) => {
        const post = select(import_core_data3.store).getEditedEntityRecord(
          KIND,
          POST_TYPE,
          buildWidgetAreaPostId(widgetArea.id)
        );
        const blockWidgetIds = post.blocks.map(
          (block) => (0, import_widgets3.getWidgetIdFromBlock)(block)
        );
        return blockWidgetIds.includes(widgetId);
      });
    }
  );
  var getParentWidgetAreaBlock = (0, import_data7.createRegistrySelector)(
    (select) => (state, clientId) => {
      const { getBlock, getBlockName, getBlockParents } = select(import_block_editor2.store);
      const blockParents = getBlockParents(clientId);
      const widgetAreaClientId = blockParents.find(
        (parentClientId) => getBlockName(parentClientId) === "core/widget-area"
      );
      return getBlock(widgetAreaClientId);
    }
  );
  var getEditedWidgetAreas = (0, import_data7.createRegistrySelector)(
    (select) => (state, ids) => {
      let widgetAreas = select(STORE_NAME2).getWidgetAreas();
      if (!widgetAreas) {
        return [];
      }
      if (ids) {
        widgetAreas = widgetAreas.filter(
          ({ id }) => ids.includes(id)
        );
      }
      return widgetAreas.filter(
        ({ id }) => select(import_core_data3.store).hasEditsForEntityRecord(
          KIND,
          POST_TYPE,
          buildWidgetAreaPostId(id)
        )
      ).map(
        ({ id }) => select(import_core_data3.store).getEditedEntityRecord(
          KIND,
          WIDGET_AREA_ENTITY_TYPE,
          id
        )
      );
    }
  );
  var getReferenceWidgetBlocks = (0, import_data7.createRegistrySelector)(
    (select) => (state, referenceWidgetName = null) => {
      const results = [];
      const widgetAreas = select(STORE_NAME2).getWidgetAreas();
      for (const _widgetArea of widgetAreas) {
        const post = select(import_core_data3.store).getEditedEntityRecord(
          KIND,
          POST_TYPE,
          buildWidgetAreaPostId(_widgetArea.id)
        );
        for (const block of post.blocks) {
          if (block.name === "core/legacy-widget" && (!referenceWidgetName || block.attributes?.referenceWidgetName === referenceWidgetName)) {
            results.push(block);
          }
        }
      }
      return results;
    }
  );
  var isSavingWidgetAreas = (0, import_data7.createRegistrySelector)((select) => () => {
    const widgetAreasIds = select(STORE_NAME2).getWidgetAreas()?.map(({ id }) => id);
    if (!widgetAreasIds) {
      return false;
    }
    for (const id of widgetAreasIds) {
      const isSaving = select(import_core_data3.store).isSavingEntityRecord(
        KIND,
        WIDGET_AREA_ENTITY_TYPE,
        id
      );
      if (isSaving) {
        return true;
      }
    }
    const widgetIds = [
      ...Object.keys(select(STORE_NAME2).getWidgets()),
      void 0
      // account for new widgets without an ID
    ];
    for (const id of widgetIds) {
      const isSaving = select(import_core_data3.store).isSavingEntityRecord(
        "root",
        "widget",
        id
      );
      if (isSaving) {
        return true;
      }
    }
    return false;
  });
  var getIsWidgetAreaOpen = (state, clientId) => {
    const { widgetAreasOpenState: widgetAreasOpenState2 } = state;
    return !!widgetAreasOpenState2[clientId];
  };
  function isInserterOpened(state) {
    return !!state.blockInserterPanel;
  }
  function __experimentalGetInsertionPoint(state) {
    if (typeof state.blockInserterPanel === "boolean") {
      return EMPTY_INSERTION_POINT;
    }
    return state.blockInserterPanel;
  }
  var canInsertBlockInWidgetArea = (0, import_data7.createRegistrySelector)(
    (select) => (state, blockName) => {
      const widgetAreas = select(import_block_editor2.store).getBlocks();
      const [firstWidgetArea] = widgetAreas;
      return select(import_block_editor2.store).canInsertBlockType(
        blockName,
        firstWidgetArea.clientId
      );
    }
  );
  function isListViewOpened(state) {
    return state.listViewPanel;
  }
  function isWidgetSavingLocked(state) {
    return Object.keys(state.widgetSavingLock).length > 0;
  }

  // packages/edit-widgets/build-module/store/private-selectors.mjs
  var private_selectors_exports = {};
  __export(private_selectors_exports, {
    getInserterSidebarToggleRef: () => getInserterSidebarToggleRef,
    getListViewToggleRef: () => getListViewToggleRef
  });
  function getListViewToggleRef(state) {
    return state.listViewToggleRef;
  }
  function getInserterSidebarToggleRef(state) {
    return state.inserterSidebarToggleRef;
  }

  // packages/edit-widgets/build-module/lock-unlock.mjs
  var import_private_apis = __toESM(require_private_apis(), 1);
  var { lock, unlock } = (0, import_private_apis.__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-widgets"
  );

  // packages/edit-widgets/build-module/store/index.mjs
  var storeConfig = {
    reducer: reducer_default,
    selectors: selectors_exports2,
    resolvers: resolvers_exports,
    actions: actions_exports2
  };
  var store2 = (0, import_data8.createReduxStore)(STORE_NAME2, storeConfig);
  (0, import_data8.register)(store2);
  import_api_fetch.default.use(function(options, next) {
    if (options.path?.indexOf("/wp/v2/types/widget-area") === 0) {
      return Promise.resolve({});
    }
    return next(options);
  });
  unlock(store2).registerPrivateSelectors(private_selectors_exports);

  // packages/edit-widgets/build-module/filters/move-to-widget-area.mjs
  var import_block_editor3 = __toESM(require_block_editor(), 1);
  var import_compose3 = __toESM(require_compose(), 1);
  var import_data9 = __toESM(require_data(), 1);
  var import_hooks = __toESM(require_hooks(), 1);
  var import_widgets4 = __toESM(require_widgets(), 1);
  var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
  var withMoveToWidgetAreaToolbarItem = (0, import_compose3.createHigherOrderComponent)(
    (BlockEdit) => (props) => {
      const { clientId, name: blockName } = props;
      const { widgetAreas, currentWidgetAreaId, canInsertBlockInWidgetArea: canInsertBlockInWidgetArea2 } = (0, import_data9.useSelect)(
        (select) => {
          if (blockName === "core/widget-area") {
            return {};
          }
          const selectors = select(store2);
          const widgetAreaBlock = selectors.getParentWidgetAreaBlock(clientId);
          return {
            widgetAreas: selectors.getWidgetAreas(),
            currentWidgetAreaId: widgetAreaBlock?.attributes?.id,
            canInsertBlockInWidgetArea: selectors.canInsertBlockInWidgetArea(blockName)
          };
        },
        [clientId, blockName]
      );
      const { moveBlockToWidgetArea: moveBlockToWidgetArea2 } = (0, import_data9.useDispatch)(store2);
      const hasMultipleWidgetAreas = widgetAreas?.length > 1;
      const isMoveToWidgetAreaVisible = blockName !== "core/widget-area" && hasMultipleWidgetAreas && canInsertBlockInWidgetArea2;
      return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(BlockEdit, { ...props }, "edit"),
        isMoveToWidgetAreaVisible && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_block_editor3.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
          import_widgets4.MoveToWidgetArea,
          {
            widgetAreas,
            currentWidgetAreaId,
            onSelect: (widgetAreaId) => {
              moveBlockToWidgetArea2(
                props.clientId,
                widgetAreaId
              );
            }
          }
        ) })
      ] });
    },
    "withMoveToWidgetAreaToolbarItem"
  );
  (0, import_hooks.addFilter)(
    "editor.BlockEdit",
    "core/edit-widgets/block-edit",
    withMoveToWidgetAreaToolbarItem
  );

  // packages/edit-widgets/build-module/filters/replace-media-upload.mjs
  var import_hooks2 = __toESM(require_hooks(), 1);
  var import_media_utils = __toESM(require_media_utils(), 1);
  var replaceMediaUpload = () => import_media_utils.MediaUpload;
  (0, import_hooks2.addFilter)(
    "editor.MediaUpload",
    "core/edit-widgets/replace-media-upload",
    replaceMediaUpload
  );

  // packages/edit-widgets/build-module/blocks/widget-area/index.mjs
  var widget_area_exports = {};
  __export(widget_area_exports, {
    metadata: () => block_default,
    name: () => name,
    settings: () => settings
  });
  var import_i18n4 = __toESM(require_i18n(), 1);

  // packages/edit-widgets/build-module/blocks/widget-area/block.json
  var block_default = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/widget-area",
    title: "Widget Area",
    category: "widgets",
    attributes: {
      id: {
        type: "string"
      },
      name: {
        type: "string"
      }
    },
    supports: {
      html: false,
      inserter: false,
      customClassName: false,
      reusable: false,
      renaming: false,
      visibility: false,
      __experimentalToolbar: false,
      __experimentalParentSelector: false,
      __experimentalDisableBlockOverlay: true
    },
    editorStyle: "wp-block-widget-area-editor",
    style: "wp-block-widget-area"
  };

  // packages/edit-widgets/build-module/blocks/widget-area/edit/index.mjs
  var import_element7 = __toESM(require_element(), 1);
  var import_data10 = __toESM(require_data(), 1);
  var import_core_data5 = __toESM(require_core_data(), 1);
  var import_components7 = __toESM(require_components(), 1);
  var import_block_editor5 = __toESM(require_block_editor(), 1);

  // packages/edit-widgets/build-module/blocks/widget-area/edit/inner-blocks.mjs
  var import_core_data4 = __toESM(require_core_data(), 1);
  var import_block_editor4 = __toESM(require_block_editor(), 1);
  var import_element6 = __toESM(require_element(), 1);

  // packages/edit-widgets/build-module/blocks/widget-area/edit/use-is-dragging-within.mjs
  var import_element5 = __toESM(require_element(), 1);
  var useIsDraggingWithin = (elementRef) => {
    const [isDraggingWithin, setIsDraggingWithin] = (0, import_element5.useState)(false);
    (0, import_element5.useEffect)(() => {
      const { ownerDocument } = elementRef.current;
      function handleDragStart(event) {
        handleDragEnter(event);
      }
      function handleDragEnd() {
        setIsDraggingWithin(false);
      }
      function handleDragEnter(event) {
        if (elementRef.current.contains(event.target)) {
          setIsDraggingWithin(true);
        } else {
          setIsDraggingWithin(false);
        }
      }
      ownerDocument.addEventListener("dragstart", handleDragStart);
      ownerDocument.addEventListener("dragend", handleDragEnd);
      ownerDocument.addEventListener("dragenter", handleDragEnter);
      return () => {
        ownerDocument.removeEventListener("dragstart", handleDragStart);
        ownerDocument.removeEventListener("dragend", handleDragEnd);
        ownerDocument.removeEventListener("dragenter", handleDragEnter);
      };
    }, []);
    return isDraggingWithin;
  };
  var use_is_dragging_within_default = useIsDraggingWithin;

  // packages/edit-widgets/build-module/blocks/widget-area/edit/inner-blocks.mjs
  var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
  function WidgetAreaInnerBlocks({ id }) {
    const [blocks, onInput, onChange] = (0, import_core_data4.useEntityBlockEditor)(
      "root",
      "postType"
    );
    const innerBlocksRef = (0, import_element6.useRef)();
    const isDraggingWithinInnerBlocks = use_is_dragging_within_default(innerBlocksRef);
    const shouldHighlightDropZone = isDraggingWithinInnerBlocks;
    const innerBlocksProps = (0, import_block_editor4.useInnerBlocksProps)(
      { ref: innerBlocksRef },
      {
        value: blocks,
        onInput,
        onChange,
        templateLock: false,
        renderAppender: import_block_editor4.InnerBlocks.ButtonBlockAppender
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
      "div",
      {
        "data-widget-area-id": id,
        className: clsx_default(
          "wp-block-widget-area__inner-blocks block-editor-inner-blocks editor-styles-wrapper",
          {
            "wp-block-widget-area__highlight-drop-zone": shouldHighlightDropZone
          }
        ),
        children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { ...innerBlocksProps })
      }
    );
  }

  // packages/edit-widgets/build-module/blocks/widget-area/edit/index.mjs
  var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
  function WidgetAreaEdit({
    clientId,
    attributes: { id, name: name2 }
  }) {
    const isOpen = (0, import_data10.useSelect)(
      (select) => select(store2).getIsWidgetAreaOpen(clientId),
      [clientId]
    );
    const { setIsWidgetAreaOpen: setIsWidgetAreaOpen2 } = (0, import_data10.useDispatch)(store2);
    const wrapper = (0, import_element7.useRef)();
    const setOpen = (0, import_element7.useCallback)(
      (openState) => setIsWidgetAreaOpen2(clientId, openState),
      [clientId]
    );
    const isDragging = useIsDragging(wrapper);
    const isDraggingWithin = use_is_dragging_within_default(wrapper);
    const [openedWhileDragging, setOpenedWhileDragging] = (0, import_element7.useState)(false);
    (0, import_element7.useEffect)(() => {
      if (!isDragging) {
        setOpenedWhileDragging(false);
        return;
      }
      if (isDraggingWithin && !isOpen) {
        setOpen(true);
        setOpenedWhileDragging(true);
      } else if (!isDraggingWithin && isOpen && openedWhileDragging) {
        setOpen(false);
      }
    }, [isOpen, isDragging, isDraggingWithin, openedWhileDragging]);
    const blockProps = (0, import_block_editor5.useBlockProps)();
    return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components7.Panel, { ref: wrapper, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
      import_components7.PanelBody,
      {
        title: name2,
        opened: isOpen,
        onToggle: () => {
          setIsWidgetAreaOpen2(clientId, !isOpen);
        },
        scrollAfterOpen: !isDragging,
        children: ({ opened }) => (
          // This is required to ensure LegacyWidget blocks are not
          // unmounted when the panel is collapsed. Unmounting legacy
          // widgets may have unintended consequences (e.g.  TinyMCE
          // not being properly reinitialized)
          /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
            import_components7.__unstableDisclosureContent,
            {
              className: "wp-block-widget-area__panel-body-content",
              visible: opened,
              children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
                import_core_data5.EntityProvider,
                {
                  kind: "root",
                  type: "postType",
                  id: `widget-area-${id}`,
                  children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(WidgetAreaInnerBlocks, { id })
                }
              )
            }
          )
        )
      }
    ) }) });
  }
  var useIsDragging = (elementRef) => {
    const [isDragging, setIsDragging] = (0, import_element7.useState)(false);
    (0, import_element7.useEffect)(() => {
      const { ownerDocument } = elementRef.current;
      function handleDragStart() {
        setIsDragging(true);
      }
      function handleDragEnd() {
        setIsDragging(false);
      }
      ownerDocument.addEventListener("dragstart", handleDragStart);
      ownerDocument.addEventListener("dragend", handleDragEnd);
      return () => {
        ownerDocument.removeEventListener("dragstart", handleDragStart);
        ownerDocument.removeEventListener("dragend", handleDragEnd);
      };
    }, []);
    return isDragging;
  };

  // packages/edit-widgets/build-module/blocks/widget-area/index.mjs
  var { name } = block_default;
  var settings = {
    title: (0, import_i18n4.__)("Widget Area"),
    description: (0, import_i18n4.__)("A widget area container."),
    __experimentalLabel: ({ name: label }) => label,
    edit: WidgetAreaEdit
  };

  // packages/edit-widgets/build-module/components/layout/index.mjs
  var import_i18n21 = __toESM(require_i18n(), 1);
  var import_data31 = __toESM(require_data(), 1);
  var import_plugins3 = __toESM(require_plugins(), 1);
  var import_notices4 = __toESM(require_notices(), 1);
  var import_components22 = __toESM(require_components(), 1);

  // packages/edit-widgets/build-module/components/error-boundary/index.mjs
  var import_element8 = __toESM(require_element(), 1);
  var import_i18n5 = __toESM(require_i18n(), 1);
  var import_components8 = __toESM(require_components(), 1);
  var import_block_editor6 = __toESM(require_block_editor(), 1);
  var import_compose4 = __toESM(require_compose(), 1);
  var import_hooks3 = __toESM(require_hooks(), 1);
  var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
  function CopyButton({ text, children }) {
    const ref = (0, import_compose4.useCopyToClipboard)(text);
    return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_components8.Button, { __next40pxDefaultSize: true, variant: "secondary", ref, children });
  }
  function ErrorBoundaryWarning({ message, error }) {
    const actions = [
      /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CopyButton, { text: error.stack, children: (0, import_i18n5.__)("Copy Error") }, "copy-error")
    ];
    return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_block_editor6.Warning, { className: "edit-widgets-error-boundary", actions, children: message });
  }
  var ErrorBoundary = class extends import_element8.Component {
    constructor() {
      super(...arguments);
      this.state = {
        error: null
      };
    }
    componentDidCatch(error) {
      (0, import_hooks3.doAction)("editor.ErrorBoundary.errorLogged", error);
    }
    static getDerivedStateFromError(error) {
      return { error };
    }
    render() {
      if (!this.state.error) {
        return this.props.children;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
        ErrorBoundaryWarning,
        {
          message: (0, import_i18n5.__)(
            "The editor has encountered an unexpected error."
          ),
          error: this.state.error
        }
      );
    }
  };

  // packages/edit-widgets/build-module/components/widget-areas-block-editor-provider/index.mjs
  var import_components9 = __toESM(require_components(), 1);
  var import_compose5 = __toESM(require_compose(), 1);
  var import_media_utils2 = __toESM(require_media_utils(), 1);
  var import_data13 = __toESM(require_data(), 1);
  var import_core_data8 = __toESM(require_core_data(), 1);
  var import_element10 = __toESM(require_element(), 1);
  var import_block_editor8 = __toESM(require_block_editor(), 1);
  var import_patterns = __toESM(require_patterns(), 1);
  var import_preferences4 = __toESM(require_preferences(), 1);
  var import_block_library = __toESM(require_block_library(), 1);

  // packages/edit-widgets/build-module/components/keyboard-shortcuts/index.mjs
  var import_element9 = __toESM(require_element(), 1);
  var import_keyboard_shortcuts = __toESM(require_keyboard_shortcuts(), 1);
  var import_keycodes = __toESM(require_keycodes(), 1);
  var import_data11 = __toESM(require_data(), 1);
  var import_i18n6 = __toESM(require_i18n(), 1);
  var import_core_data6 = __toESM(require_core_data(), 1);
  function KeyboardShortcuts() {
    const { redo, undo } = (0, import_data11.useDispatch)(import_core_data6.store);
    const { saveEditedWidgetAreas: saveEditedWidgetAreas2 } = (0, import_data11.useDispatch)(store2);
    (0, import_keyboard_shortcuts.useShortcut)("core/edit-widgets/undo", (event) => {
      undo();
      event.preventDefault();
    });
    (0, import_keyboard_shortcuts.useShortcut)("core/edit-widgets/redo", (event) => {
      redo();
      event.preventDefault();
    });
    (0, import_keyboard_shortcuts.useShortcut)("core/edit-widgets/save", (event) => {
      event.preventDefault();
      saveEditedWidgetAreas2();
    });
    return null;
  }
  function KeyboardShortcutsRegister() {
    const { registerShortcut } = (0, import_data11.useDispatch)(import_keyboard_shortcuts.store);
    (0, import_element9.useEffect)(() => {
      registerShortcut({
        name: "core/edit-widgets/undo",
        category: "global",
        description: (0, import_i18n6.__)("Undo your last changes."),
        keyCombination: {
          modifier: "primary",
          character: "z"
        }
      });
      registerShortcut({
        name: "core/edit-widgets/redo",
        category: "global",
        description: (0, import_i18n6.__)("Redo your last undo."),
        keyCombination: {
          modifier: "primaryShift",
          character: "z"
        },
        // Disable on Apple OS because it conflicts with the browser's
        // history shortcut. It's a fine alias for both Windows and Linux.
        // Since there's no conflict for Ctrl+Shift+Z on both Windows and
        // Linux, we keep it as the default for consistency.
        aliases: (0, import_keycodes.isAppleOS)() ? [] : [
          {
            modifier: "primary",
            character: "y"
          }
        ]
      });
      registerShortcut({
        name: "core/edit-widgets/save",
        category: "global",
        description: (0, import_i18n6.__)("Save your changes."),
        keyCombination: {
          modifier: "primary",
          character: "s"
        }
      });
      registerShortcut({
        name: "core/edit-widgets/keyboard-shortcuts",
        category: "main",
        description: (0, import_i18n6.__)("Display these keyboard shortcuts."),
        keyCombination: {
          modifier: "access",
          character: "h"
        }
      });
      registerShortcut({
        name: "core/edit-widgets/next-region",
        category: "global",
        description: (0, import_i18n6.__)("Navigate to the next part of the editor."),
        keyCombination: {
          modifier: "ctrl",
          character: "`"
        },
        aliases: [
          {
            modifier: "access",
            character: "n"
          }
        ]
      });
      registerShortcut({
        name: "core/edit-widgets/previous-region",
        category: "global",
        description: (0, import_i18n6.__)("Navigate to the previous part of the editor."),
        keyCombination: {
          modifier: "ctrlShift",
          character: "`"
        },
        aliases: [
          {
            modifier: "access",
            character: "p"
          },
          {
            modifier: "ctrlShift",
            character: "~"
          }
        ]
      });
    }, [registerShortcut]);
    return null;
  }
  KeyboardShortcuts.Register = KeyboardShortcutsRegister;
  var keyboard_shortcuts_default = KeyboardShortcuts;

  // packages/edit-widgets/build-module/hooks/use-last-selected-widget-area.mjs
  var import_data12 = __toESM(require_data(), 1);
  var import_block_editor7 = __toESM(require_block_editor(), 1);
  var import_core_data7 = __toESM(require_core_data(), 1);
  var useLastSelectedWidgetArea = () => (0, import_data12.useSelect)((select) => {
    const { getBlockSelectionEnd, getBlockName } = select(import_block_editor7.store);
    const selectionEndClientId = getBlockSelectionEnd();
    if (getBlockName(selectionEndClientId) === "core/widget-area") {
      return selectionEndClientId;
    }
    const { getParentWidgetAreaBlock: getParentWidgetAreaBlock2 } = select(store2);
    const widgetAreaBlock = getParentWidgetAreaBlock2(selectionEndClientId);
    const widgetAreaBlockClientId = widgetAreaBlock?.clientId;
    if (widgetAreaBlockClientId) {
      return widgetAreaBlockClientId;
    }
    const { getEntityRecord } = select(import_core_data7.store);
    const widgetAreasPost = getEntityRecord(
      KIND,
      POST_TYPE,
      buildWidgetAreasPostId()
    );
    return widgetAreasPost?.blocks[0]?.clientId;
  }, []);
  var use_last_selected_widget_area_default = useLastSelectedWidgetArea;

  // packages/edit-widgets/build-module/constants.mjs
  var ALLOW_REUSABLE_BLOCKS = false;

  // packages/edit-widgets/build-module/components/widget-areas-block-editor-provider/index.mjs
  var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
  var { ExperimentalBlockEditorProvider } = unlock(import_block_editor8.privateApis);
  var { PatternsMenuItems } = unlock(import_patterns.privateApis);
  var { BlockKeyboardShortcuts } = unlock(import_block_library.privateApis);
  var EMPTY_ARRAY = [];
  function WidgetAreasBlockEditorProvider({
    blockEditorSettings,
    children,
    ...props
  }) {
    const isLargeViewport = (0, import_compose5.useViewportMatch)("medium");
    const {
      hasUploadPermissions,
      reusableBlocks,
      isFixedToolbarActive,
      keepCaretInsideBlock,
      pageOnFront,
      pageForPosts
    } = (0, import_data13.useSelect)((select) => {
      const { canUser, getEntityRecord, getEntityRecords } = select(import_core_data8.store);
      const siteSettings = canUser("read", {
        kind: "root",
        name: "site"
      }) ? getEntityRecord("root", "site") : void 0;
      return {
        hasUploadPermissions: canUser("create", {
          kind: "postType",
          name: "attachment"
        }) ?? true,
        reusableBlocks: ALLOW_REUSABLE_BLOCKS ? getEntityRecords("postType", "wp_block") : EMPTY_ARRAY,
        isFixedToolbarActive: !!select(import_preferences4.store).get(
          "core/edit-widgets",
          "fixedToolbar"
        ),
        keepCaretInsideBlock: !!select(import_preferences4.store).get(
          "core/edit-widgets",
          "keepCaretInsideBlock"
        ),
        pageOnFront: siteSettings?.page_on_front,
        pageForPosts: siteSettings?.page_for_posts
      };
    }, []);
    const { setIsInserterOpened: setIsInserterOpened2 } = (0, import_data13.useDispatch)(store2);
    const settings2 = (0, import_element10.useMemo)(() => {
      let mediaUploadBlockEditor;
      if (hasUploadPermissions) {
        mediaUploadBlockEditor = ({ onError, ...argumentsObject }) => {
          (0, import_media_utils2.uploadMedia)({
            wpAllowedMimeTypes: blockEditorSettings.allowedMimeTypes,
            onError: ({ message }) => onError(message),
            ...argumentsObject
          });
        };
      }
      return {
        ...blockEditorSettings,
        __experimentalReusableBlocks: reusableBlocks,
        hasFixedToolbar: isFixedToolbarActive || !isLargeViewport,
        keepCaretInsideBlock,
        mediaUpload: mediaUploadBlockEditor,
        templateLock: "all",
        __experimentalSetIsInserterOpened: setIsInserterOpened2,
        pageOnFront,
        pageForPosts,
        editorTool: "edit"
      };
    }, [
      hasUploadPermissions,
      blockEditorSettings,
      isFixedToolbarActive,
      isLargeViewport,
      keepCaretInsideBlock,
      reusableBlocks,
      setIsInserterOpened2,
      pageOnFront,
      pageForPosts
    ]);
    const widgetAreaId = use_last_selected_widget_area_default();
    const [blocks, onInput, onChange] = (0, import_core_data8.useEntityBlockEditor)(
      KIND,
      POST_TYPE,
      { id: buildWidgetAreasPostId() }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_components9.SlotFillProvider, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(keyboard_shortcuts_default.Register, {}),
      /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(BlockKeyboardShortcuts, {}),
      /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
        ExperimentalBlockEditorProvider,
        {
          value: blocks,
          onInput,
          onChange,
          settings: settings2,
          useSubRegistry: false,
          ...props,
          children: [
            children,
            /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(PatternsMenuItems, { rootClientId: widgetAreaId })
          ]
        }
      )
    ] });
  }

  // packages/edit-widgets/build-module/components/sidebar/index.mjs
  var import_element12 = __toESM(require_element(), 1);
  var import_i18n8 = __toESM(require_i18n(), 1);
  var import_block_editor10 = __toESM(require_block_editor(), 1);
  var import_components11 = __toESM(require_components(), 1);
  var import_data15 = __toESM(require_data(), 1);

  // packages/edit-widgets/build-module/components/sidebar/widget-areas.mjs
  var import_data14 = __toESM(require_data(), 1);
  var import_element11 = __toESM(require_element(), 1);
  var import_block_editor9 = __toESM(require_block_editor(), 1);
  var import_components10 = __toESM(require_components(), 1);
  var import_i18n7 = __toESM(require_i18n(), 1);
  var import_url = __toESM(require_url(), 1);
  var import_dom = __toESM(require_dom(), 1);
  var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
  function WidgetAreas({ selectedWidgetAreaId }) {
    const widgetAreas = (0, import_data14.useSelect)(
      (select) => select(store2).getWidgetAreas(),
      []
    );
    const selectedWidgetArea = (0, import_element11.useMemo)(
      () => selectedWidgetAreaId && widgetAreas?.find(
        (widgetArea) => widgetArea.id === selectedWidgetAreaId
      ),
      [selectedWidgetAreaId, widgetAreas]
    );
    let description;
    if (!selectedWidgetArea) {
      description = (0, import_i18n7.__)(
        // eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts
        "Widget Areas are global parts in your site\u2019s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer."
      );
    } else if (selectedWidgetAreaId === "wp_inactive_widgets") {
      description = (0, import_i18n7.__)(
        "Blocks in this Widget Area will not be displayed in your site."
      );
    } else {
      description = selectedWidgetArea.description;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "edit-widgets-widget-areas", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "edit-widgets-widget-areas__top-container", children: [
      /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_block_editor9.BlockIcon, { icon: block_default_default }),
      /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { children: [
        /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
          "p",
          {
            dangerouslySetInnerHTML: {
              __html: (0, import_dom.safeHTML)(description)
            }
          }
        ),
        widgetAreas?.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { children: (0, import_i18n7.__)(
          "Your theme does not contain any Widget Areas."
        ) }),
        !selectedWidgetArea && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
          import_components10.Button,
          {
            __next40pxDefaultSize: true,
            href: (0, import_url.addQueryArgs)("customize.php", {
              "autofocus[panel]": "widgets",
              return: window.location.pathname
            }),
            variant: "tertiary",
            children: (0, import_i18n7.__)("Manage with live preview")
          }
        )
      ] })
    ] }) });
  }

  // packages/edit-widgets/build-module/components/sidebar/index.mjs
  var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
  var SIDEBAR_ACTIVE_BY_DEFAULT = import_element12.Platform.select({
    web: true,
    native: false
  });
  var BLOCK_INSPECTOR_IDENTIFIER = "edit-widgets/block-inspector";
  var WIDGET_AREAS_IDENTIFIER = "edit-widgets/block-areas";
  var { Tabs } = unlock(import_components11.privateApis);
  function SidebarHeader({ selectedWidgetAreaBlock }) {
    return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Tabs.TabList, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Tabs.Tab, { tabId: WIDGET_AREAS_IDENTIFIER, children: selectedWidgetAreaBlock ? selectedWidgetAreaBlock.attributes.name : (0, import_i18n8.__)("Widget Areas") }),
      /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Tabs.Tab, { tabId: BLOCK_INSPECTOR_IDENTIFIER, children: (0, import_i18n8.__)("Block") })
    ] });
  }
  function SidebarContent({
    hasSelectedNonAreaBlock,
    currentArea,
    isGeneralSidebarOpen,
    selectedWidgetAreaBlock
  }) {
    const { enableComplementaryArea: enableComplementaryArea2 } = (0, import_data15.useDispatch)(store);
    (0, import_element12.useEffect)(() => {
      if (hasSelectedNonAreaBlock && currentArea === WIDGET_AREAS_IDENTIFIER && isGeneralSidebarOpen) {
        enableComplementaryArea2(
          "core/edit-widgets",
          BLOCK_INSPECTOR_IDENTIFIER
        );
      }
      if (!hasSelectedNonAreaBlock && currentArea === BLOCK_INSPECTOR_IDENTIFIER && isGeneralSidebarOpen) {
        enableComplementaryArea2(
          "core/edit-widgets",
          WIDGET_AREAS_IDENTIFIER
        );
      }
    }, [hasSelectedNonAreaBlock, enableComplementaryArea2]);
    const tabsContextValue = (0, import_element12.useContext)(Tabs.Context);
    return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
      complementary_area_default,
      {
        className: "edit-widgets-sidebar",
        header: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Tabs.Context.Provider, { value: tabsContextValue, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
          SidebarHeader,
          {
            selectedWidgetAreaBlock
          }
        ) }),
        headerClassName: "edit-widgets-sidebar__panel-tabs",
        title: (0, import_i18n8.__)("Settings"),
        closeLabel: (0, import_i18n8.__)("Close Settings"),
        scope: "core/edit-widgets",
        identifier: currentArea,
        icon: (0, import_i18n8.isRTL)() ? drawer_left_default : drawer_right_default,
        isActiveByDefault: SIDEBAR_ACTIVE_BY_DEFAULT,
        children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Tabs.Context.Provider, { value: tabsContextValue, children: [
          /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
            Tabs.TabPanel,
            {
              tabId: WIDGET_AREAS_IDENTIFIER,
              focusable: false,
              children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
                WidgetAreas,
                {
                  selectedWidgetAreaId: selectedWidgetAreaBlock?.attributes.id
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
            Tabs.TabPanel,
            {
              tabId: BLOCK_INSPECTOR_IDENTIFIER,
              focusable: false,
              children: hasSelectedNonAreaBlock ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_block_editor10.BlockInspector, {}) : (
                // Pretend that Widget Areas are part of the UI by not
                // showing the Block Inspector when one is selected.
                /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "block-editor-block-inspector__no-blocks", children: (0, import_i18n8.__)("No block selected.") })
              )
            }
          )
        ] })
      }
    );
  }
  function Sidebar() {
    const {
      currentArea,
      hasSelectedNonAreaBlock,
      isGeneralSidebarOpen,
      selectedWidgetAreaBlock
    } = (0, import_data15.useSelect)((select) => {
      const { getSelectedBlock, getBlock, getBlockParentsByBlockName } = select(import_block_editor10.store);
      const { getActiveComplementaryArea: getActiveComplementaryArea2 } = select(store);
      const selectedBlock = getSelectedBlock();
      const activeArea = getActiveComplementaryArea2(store2.name);
      let currentSelection = activeArea;
      if (!currentSelection) {
        if (selectedBlock) {
          currentSelection = BLOCK_INSPECTOR_IDENTIFIER;
        } else {
          currentSelection = WIDGET_AREAS_IDENTIFIER;
        }
      }
      let widgetAreaBlock;
      if (selectedBlock) {
        if (selectedBlock.name === "core/widget-area") {
          widgetAreaBlock = selectedBlock;
        } else {
          widgetAreaBlock = getBlock(
            getBlockParentsByBlockName(
              selectedBlock.clientId,
              "core/widget-area"
            )[0]
          );
        }
      }
      return {
        currentArea: currentSelection,
        hasSelectedNonAreaBlock: !!(selectedBlock && selectedBlock.name !== "core/widget-area"),
        isGeneralSidebarOpen: !!activeArea,
        selectedWidgetAreaBlock: widgetAreaBlock
      };
    }, []);
    const { enableComplementaryArea: enableComplementaryArea2 } = (0, import_data15.useDispatch)(store);
    const onTabSelect = (0, import_element12.useCallback)(
      (newSelectedTabId) => {
        if (!!newSelectedTabId) {
          enableComplementaryArea2(
            store2.name,
            newSelectedTabId
          );
        }
      },
      [enableComplementaryArea2]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
      Tabs,
      {
        selectedTabId: isGeneralSidebarOpen ? currentArea : null,
        onSelect: onTabSelect,
        selectOnMove: false,
        children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
          SidebarContent,
          {
            hasSelectedNonAreaBlock,
            currentArea,
            isGeneralSidebarOpen,
            selectedWidgetAreaBlock
          }
        )
      }
    );
  }

  // packages/edit-widgets/build-module/components/layout/interface.mjs
  var import_compose12 = __toESM(require_compose(), 1);
  var import_block_editor17 = __toESM(require_block_editor(), 1);
  var import_element22 = __toESM(require_element(), 1);
  var import_data28 = __toESM(require_data(), 1);
  var import_i18n18 = __toESM(require_i18n(), 1);
  var import_preferences8 = __toESM(require_preferences(), 1);

  // packages/edit-widgets/build-module/components/header/index.mjs
  var import_block_editor12 = __toESM(require_block_editor(), 1);
  var import_data22 = __toESM(require_data(), 1);
  var import_element18 = __toESM(require_element(), 1);
  var import_i18n16 = __toESM(require_i18n(), 1);
  var import_components19 = __toESM(require_components(), 1);
  var import_compose8 = __toESM(require_compose(), 1);
  var import_preferences6 = __toESM(require_preferences(), 1);

  // packages/edit-widgets/build-module/components/header/document-tools/index.mjs
  var import_data18 = __toESM(require_data(), 1);
  var import_i18n11 = __toESM(require_i18n(), 1);
  var import_components14 = __toESM(require_components(), 1);
  var import_block_editor11 = __toESM(require_block_editor(), 1);
  var import_element15 = __toESM(require_element(), 1);
  var import_compose6 = __toESM(require_compose(), 1);

  // packages/edit-widgets/build-module/components/header/undo-redo/undo.mjs
  var import_i18n9 = __toESM(require_i18n(), 1);
  var import_components12 = __toESM(require_components(), 1);
  var import_data16 = __toESM(require_data(), 1);
  var import_keycodes2 = __toESM(require_keycodes(), 1);
  var import_core_data9 = __toESM(require_core_data(), 1);
  var import_element13 = __toESM(require_element(), 1);
  var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
  function UndoButton(props, ref) {
    const hasUndo = (0, import_data16.useSelect)(
      (select) => select(import_core_data9.store).hasUndo(),
      []
    );
    const { undo } = (0, import_data16.useDispatch)(import_core_data9.store);
    return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
      import_components12.Button,
      {
        ...props,
        ref,
        icon: !(0, import_i18n9.isRTL)() ? undo_default : redo_default,
        label: (0, import_i18n9.__)("Undo"),
        shortcut: import_keycodes2.displayShortcut.primary("z"),
        "aria-disabled": !hasUndo,
        onClick: hasUndo ? undo : void 0,
        size: "compact"
      }
    );
  }
  var undo_default2 = (0, import_element13.forwardRef)(UndoButton);

  // packages/edit-widgets/build-module/components/header/undo-redo/redo.mjs
  var import_i18n10 = __toESM(require_i18n(), 1);
  var import_components13 = __toESM(require_components(), 1);
  var import_data17 = __toESM(require_data(), 1);
  var import_keycodes3 = __toESM(require_keycodes(), 1);
  var import_core_data10 = __toESM(require_core_data(), 1);
  var import_element14 = __toESM(require_element(), 1);
  var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
  function RedoButton(props, ref) {
    const shortcut = (0, import_keycodes3.isAppleOS)() ? import_keycodes3.displayShortcut.primaryShift("z") : import_keycodes3.displayShortcut.primary("y");
    const hasRedo = (0, import_data17.useSelect)(
      (select) => select(import_core_data10.store).hasRedo(),
      []
    );
    const { redo } = (0, import_data17.useDispatch)(import_core_data10.store);
    return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
      import_components13.Button,
      {
        ...props,
        ref,
        icon: !(0, import_i18n10.isRTL)() ? redo_default : undo_default,
        label: (0, import_i18n10.__)("Redo"),
        shortcut,
        "aria-disabled": !hasRedo,
        onClick: hasRedo ? redo : void 0,
        size: "compact"
      }
    );
  }
  var redo_default2 = (0, import_element14.forwardRef)(RedoButton);

  // packages/edit-widgets/build-module/components/header/document-tools/index.mjs
  var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
  function DocumentTools() {
    const isMediumViewport = (0, import_compose6.useViewportMatch)("medium");
    const {
      isInserterOpen,
      isListViewOpen,
      inserterSidebarToggleRef: inserterSidebarToggleRef2,
      listViewToggleRef: listViewToggleRef2
    } = (0, import_data18.useSelect)((select) => {
      const {
        isInserterOpened: isInserterOpened2,
        getInserterSidebarToggleRef: getInserterSidebarToggleRef2,
        isListViewOpened: isListViewOpened2,
        getListViewToggleRef: getListViewToggleRef2
      } = unlock(select(store2));
      return {
        isInserterOpen: isInserterOpened2(),
        isListViewOpen: isListViewOpened2(),
        inserterSidebarToggleRef: getInserterSidebarToggleRef2(),
        listViewToggleRef: getListViewToggleRef2()
      };
    }, []);
    const { setIsInserterOpened: setIsInserterOpened2, setIsListViewOpened: setIsListViewOpened2 } = (0, import_data18.useDispatch)(store2);
    const toggleListView = (0, import_element15.useCallback)(
      () => setIsListViewOpened2(!isListViewOpen),
      [setIsListViewOpened2, isListViewOpen]
    );
    const toggleInserterSidebar = (0, import_element15.useCallback)(
      () => setIsInserterOpened2(!isInserterOpen),
      [setIsInserterOpened2, isInserterOpen]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
      import_block_editor11.NavigableToolbar,
      {
        className: "edit-widgets-header-toolbar",
        "aria-label": (0, import_i18n11.__)("Document tools"),
        variant: "unstyled",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
            import_components14.ToolbarItem,
            {
              ref: inserterSidebarToggleRef2,
              as: import_components14.Button,
              className: "edit-widgets-header-toolbar__inserter-toggle",
              variant: "primary",
              isPressed: isInserterOpen,
              onMouseDown: (event) => {
                event.preventDefault();
              },
              onClick: toggleInserterSidebar,
              icon: plus_default,
              label: (0, import_i18n11._x)(
                "Block Inserter",
                "Generic label for block inserter button"
              ),
              size: "compact"
            }
          ),
          isMediumViewport && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components14.ToolbarItem, { as: undo_default2 }),
            /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components14.ToolbarItem, { as: redo_default2 }),
            /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
              import_components14.ToolbarItem,
              {
                as: import_components14.Button,
                className: "edit-widgets-header-toolbar__list-view-toggle",
                icon: list_view_default,
                isPressed: isListViewOpen,
                label: (0, import_i18n11.__)("List View"),
                onClick: toggleListView,
                ref: listViewToggleRef2,
                size: "compact"
              }
            )
          ] })
        ]
      }
    );
  }
  var document_tools_default = DocumentTools;

  // packages/edit-widgets/build-module/components/save-button/index.mjs
  var import_components15 = __toESM(require_components(), 1);
  var import_i18n12 = __toESM(require_i18n(), 1);
  var import_data19 = __toESM(require_data(), 1);
  var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
  function SaveButton() {
    const { hasEditedWidgetAreaIds, isSaving, isWidgetSaveLocked } = (0, import_data19.useSelect)(
      (select) => {
        const {
          getEditedWidgetAreas: getEditedWidgetAreas2,
          isSavingWidgetAreas: isSavingWidgetAreas2,
          isWidgetSavingLocked: isWidgetSavingLocked2
        } = select(store2);
        return {
          hasEditedWidgetAreaIds: getEditedWidgetAreas2()?.length > 0,
          isSaving: isSavingWidgetAreas2(),
          isWidgetSaveLocked: isWidgetSavingLocked2()
        };
      },
      []
    );
    const { saveEditedWidgetAreas: saveEditedWidgetAreas2 } = (0, import_data19.useDispatch)(store2);
    const isDisabled = isWidgetSaveLocked || isSaving || !hasEditedWidgetAreaIds;
    return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
      import_components15.Button,
      {
        variant: "primary",
        isBusy: isSaving,
        "aria-disabled": isDisabled,
        onClick: isDisabled ? void 0 : saveEditedWidgetAreas2,
        size: "compact",
        children: isSaving ? (0, import_i18n12.__)("Saving\u2026") : (0, import_i18n12.__)("Update")
      }
    );
  }
  var save_button_default = SaveButton;

  // packages/edit-widgets/build-module/components/more-menu/index.mjs
  var import_components18 = __toESM(require_components(), 1);
  var import_element17 = __toESM(require_element(), 1);
  var import_i18n15 = __toESM(require_i18n(), 1);
  var import_preferences5 = __toESM(require_preferences(), 1);
  var import_keycodes5 = __toESM(require_keycodes(), 1);
  var import_keyboard_shortcuts5 = __toESM(require_keyboard_shortcuts(), 1);
  var import_compose7 = __toESM(require_compose(), 1);

  // packages/edit-widgets/build-module/components/keyboard-shortcut-help-modal/index.mjs
  var import_components16 = __toESM(require_components(), 1);
  var import_i18n14 = __toESM(require_i18n(), 1);
  var import_keyboard_shortcuts4 = __toESM(require_keyboard_shortcuts(), 1);
  var import_data21 = __toESM(require_data(), 1);

  // packages/edit-widgets/build-module/components/keyboard-shortcut-help-modal/config.mjs
  var import_i18n13 = __toESM(require_i18n(), 1);
  var textFormattingShortcuts = [
    {
      keyCombination: { modifier: "primary", character: "b" },
      description: (0, import_i18n13.__)("Make the selected text bold.")
    },
    {
      keyCombination: { modifier: "primary", character: "i" },
      description: (0, import_i18n13.__)("Make the selected text italic.")
    },
    {
      keyCombination: { modifier: "primary", character: "k" },
      description: (0, import_i18n13.__)("Convert the selected text into a link.")
    },
    {
      keyCombination: { modifier: "primaryShift", character: "k" },
      description: (0, import_i18n13.__)("Remove a link.")
    },
    {
      keyCombination: { character: "[[" },
      description: (0, import_i18n13.__)("Insert a link to a post or page.")
    },
    {
      keyCombination: { modifier: "primary", character: "u" },
      description: (0, import_i18n13.__)("Underline the selected text.")
    },
    {
      keyCombination: { modifier: "access", character: "d" },
      description: (0, import_i18n13.__)("Strikethrough the selected text.")
    },
    {
      keyCombination: { modifier: "access", character: "x" },
      description: (0, import_i18n13.__)("Make the selected text inline code.")
    },
    {
      keyCombination: {
        modifier: "access",
        character: "0"
      },
      aliases: [
        {
          modifier: "access",
          character: "7"
        }
      ],
      description: (0, import_i18n13.__)("Convert the current heading to a paragraph.")
    },
    {
      keyCombination: { modifier: "access", character: "1-6" },
      description: (0, import_i18n13.__)(
        "Convert the current paragraph or heading to a heading of level 1 to 6."
      )
    },
    {
      keyCombination: { modifier: "primaryShift", character: "SPACE" },
      description: (0, import_i18n13.__)("Add non breaking space.")
    }
  ];

  // packages/edit-widgets/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs
  var import_element16 = __toESM(require_element(), 1);
  var import_keycodes4 = __toESM(require_keycodes(), 1);
  var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
  function KeyCombination({ keyCombination, forceAriaLabel }) {
    const shortcut = keyCombination.modifier ? import_keycodes4.displayShortcutList[keyCombination.modifier](
      keyCombination.character
    ) : keyCombination.character;
    const ariaLabel = keyCombination.modifier ? import_keycodes4.shortcutAriaLabel[keyCombination.modifier](
      keyCombination.character
    ) : keyCombination.character;
    const shortcuts = Array.isArray(shortcut) ? shortcut : [shortcut];
    return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
      "kbd",
      {
        className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-key-combination",
        "aria-label": forceAriaLabel || ariaLabel,
        children: shortcuts.map((character, index) => {
          if (character === "+") {
            return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_element16.Fragment, { children: character }, index);
          }
          return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
            "kbd",
            {
              className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-key",
              children: character
            },
            index
          );
        })
      }
    );
  }
  function Shortcut({ description, keyCombination, aliases = [], ariaLabel }) {
    return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-description", children: description }),
      /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-term", children: [
        /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
          KeyCombination,
          {
            keyCombination,
            forceAriaLabel: ariaLabel
          }
        ),
        aliases.map((alias, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
          KeyCombination,
          {
            keyCombination: alias,
            forceAriaLabel: ariaLabel
          },
          index
        ))
      ] })
    ] });
  }
  var shortcut_default = Shortcut;

  // packages/edit-widgets/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.mjs
  var import_data20 = __toESM(require_data(), 1);
  var import_keyboard_shortcuts3 = __toESM(require_keyboard_shortcuts(), 1);
  var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
  function DynamicShortcut({ name: name2 }) {
    const { keyCombination, description, aliases } = (0, import_data20.useSelect)(
      (select) => {
        const {
          getShortcutKeyCombination,
          getShortcutDescription,
          getShortcutAliases
        } = select(import_keyboard_shortcuts3.store);
        return {
          keyCombination: getShortcutKeyCombination(name2),
          aliases: getShortcutAliases(name2),
          description: getShortcutDescription(name2)
        };
      },
      [name2]
    );
    if (!keyCombination) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
      shortcut_default,
      {
        keyCombination,
        description,
        aliases
      }
    );
  }
  var dynamic_shortcut_default = DynamicShortcut;

  // packages/edit-widgets/build-module/components/keyboard-shortcut-help-modal/index.mjs
  var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
  var ShortcutList = ({ shortcuts }) => (
    /*
     * Disable reason: The `list` ARIA role is redundant but
     * Safari+VoiceOver won't announce the list otherwise.
     */
    /* eslint-disable jsx-a11y/no-redundant-roles */
    /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
      "ul",
      {
        className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-list",
        role: "list",
        children: shortcuts.map((shortcut, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
          "li",
          {
            className: "edit-widgets-keyboard-shortcut-help-modal__shortcut",
            children: typeof shortcut === "string" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(dynamic_shortcut_default, { name: shortcut }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(shortcut_default, { ...shortcut })
          },
          index
        ))
      }
    )
  );
  var ShortcutSection = ({ title, shortcuts, className }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
    "section",
    {
      className: clsx_default(
        "edit-widgets-keyboard-shortcut-help-modal__section",
        className
      ),
      children: [
        !!title && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h2", { className: "edit-widgets-keyboard-shortcut-help-modal__section-title", children: title }),
        /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ShortcutList, { shortcuts })
      ]
    }
  );
  var ShortcutCategorySection = ({
    title,
    categoryName,
    additionalShortcuts = []
  }) => {
    const categoryShortcuts = (0, import_data21.useSelect)(
      (select) => {
        return select(import_keyboard_shortcuts4.store).getCategoryShortcuts(
          categoryName
        );
      },
      [categoryName]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
      ShortcutSection,
      {
        title,
        shortcuts: categoryShortcuts.concat(additionalShortcuts)
      }
    );
  };
  function KeyboardShortcutHelpModal({
    isModalActive: isModalActive2,
    toggleModal
  }) {
    (0, import_keyboard_shortcuts4.useShortcut)("core/edit-widgets/keyboard-shortcuts", toggleModal, {
      bindGlobal: true
    });
    if (!isModalActive2) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
      import_components16.Modal,
      {
        className: "edit-widgets-keyboard-shortcut-help-modal",
        title: (0, import_i18n14.__)("Keyboard shortcuts"),
        onRequestClose: toggleModal,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
            ShortcutSection,
            {
              className: "edit-widgets-keyboard-shortcut-help-modal__main-shortcuts",
              shortcuts: ["core/edit-widgets/keyboard-shortcuts"]
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
            ShortcutCategorySection,
            {
              title: (0, import_i18n14.__)("Global shortcuts"),
              categoryName: "global"
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
            ShortcutCategorySection,
            {
              title: (0, import_i18n14.__)("Selection shortcuts"),
              categoryName: "selection"
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
            ShortcutCategorySection,
            {
              title: (0, import_i18n14.__)("Block shortcuts"),
              categoryName: "block",
              additionalShortcuts: [
                {
                  keyCombination: { character: "/" },
                  description: (0, import_i18n14.__)(
                    "Change the block type after adding a new paragraph."
                  ),
                  /* translators: The forward-slash character. e.g. '/'. */
                  ariaLabel: (0, import_i18n14.__)("Forward-slash")
                }
              ]
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
            ShortcutSection,
            {
              title: (0, import_i18n14.__)("Text formatting"),
              shortcuts: textFormattingShortcuts
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
            ShortcutCategorySection,
            {
              title: (0, import_i18n14.__)("List View shortcuts"),
              categoryName: "list-view"
            }
          )
        ]
      }
    );
  }

  // packages/edit-widgets/build-module/components/more-menu/tools-more-menu-group.mjs
  var import_components17 = __toESM(require_components(), 1);
  var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
  var { Fill: ToolsMoreMenuGroup, Slot: Slot4 } = (0, import_components17.createSlotFill)(
    "EditWidgetsToolsMoreMenuGroup"
  );
  ToolsMoreMenuGroup.Slot = ({ fillProps }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Slot4, { fillProps, children: (fills) => fills.length > 0 && fills });
  var tools_more_menu_group_default = ToolsMoreMenuGroup;

  // packages/edit-widgets/build-module/components/more-menu/index.mjs
  var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
  function MoreMenu() {
    const [
      isKeyboardShortcutsModalActive,
      setIsKeyboardShortcutsModalVisible
    ] = (0, import_element17.useState)(false);
    const toggleKeyboardShortcutsModal = () => setIsKeyboardShortcutsModalVisible(!isKeyboardShortcutsModalActive);
    (0, import_keyboard_shortcuts5.useShortcut)(
      "core/edit-widgets/keyboard-shortcuts",
      toggleKeyboardShortcutsModal
    );
    const isLargeViewport = (0, import_compose7.useViewportMatch)("medium");
    return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
        import_components18.DropdownMenu,
        {
          icon: more_vertical_default,
          label: (0, import_i18n15.__)("Options"),
          popoverProps: {
            placement: "bottom-end",
            className: "more-menu-dropdown__content"
          },
          toggleProps: {
            tooltipPosition: "bottom",
            size: "compact"
          },
          children: (onClose) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
            isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_components18.MenuGroup, { label: (0, import_i18n15._x)("View", "noun"), children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
              import_preferences5.PreferenceToggleMenuItem,
              {
                scope: "core/edit-widgets",
                name: "fixedToolbar",
                label: (0, import_i18n15.__)("Top toolbar"),
                info: (0, import_i18n15.__)(
                  "Access all block and document tools in a single place"
                ),
                messageActivated: (0, import_i18n15.__)(
                  "Top toolbar activated"
                ),
                messageDeactivated: (0, import_i18n15.__)(
                  "Top toolbar deactivated"
                )
              }
            ) }),
            /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_components18.MenuGroup, { label: (0, import_i18n15.__)("Tools"), children: [
              /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
                import_components18.MenuItem,
                {
                  onClick: () => {
                    setIsKeyboardShortcutsModalVisible(true);
                  },
                  shortcut: import_keycodes5.displayShortcut.access("h"),
                  children: (0, import_i18n15.__)("Keyboard shortcuts")
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
                import_preferences5.PreferenceToggleMenuItem,
                {
                  scope: "core/edit-widgets",
                  name: "welcomeGuide",
                  label: (0, import_i18n15.__)("Welcome Guide")
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
                import_components18.MenuItem,
                {
                  role: "menuitem",
                  icon: external_default,
                  href: (0, import_i18n15.__)(
                    "https://wordpress.org/documentation/article/block-based-widgets-editor/"
                  ),
                  target: "_blank",
                  rel: "noopener noreferrer",
                  children: [
                    (0, import_i18n15.__)("Help"),
                    /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_components18.VisuallyHidden, {
                      as: "span",
                      /* translators: accessibility text */
                      children: (0, import_i18n15.__)("(opens in a new tab)")
                    })
                  ]
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
                tools_more_menu_group_default.Slot,
                {
                  fillProps: { onClose }
                }
              )
            ] }),
            /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_components18.MenuGroup, { label: (0, import_i18n15.__)("Preferences"), children: [
              /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
                import_preferences5.PreferenceToggleMenuItem,
                {
                  scope: "core/edit-widgets",
                  name: "keepCaretInsideBlock",
                  label: (0, import_i18n15.__)(
                    "Contain text cursor inside block"
                  ),
                  info: (0, import_i18n15.__)(
                    "Aids screen readers by stopping text caret from leaving blocks."
                  ),
                  messageActivated: (0, import_i18n15.__)(
                    "Contain text cursor inside block activated"
                  ),
                  messageDeactivated: (0, import_i18n15.__)(
                    "Contain text cursor inside block deactivated"
                  )
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
                import_preferences5.PreferenceToggleMenuItem,
                {
                  scope: "core/edit-widgets",
                  name: "themeStyles",
                  info: (0, import_i18n15.__)(
                    "Make the editor look like your theme."
                  ),
                  label: (0, import_i18n15.__)("Use theme styles")
                }
              ),
              isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
                import_preferences5.PreferenceToggleMenuItem,
                {
                  scope: "core/edit-widgets",
                  name: "showBlockBreadcrumbs",
                  label: (0, import_i18n15.__)("Display block breadcrumbs"),
                  info: (0, import_i18n15.__)(
                    "Shows block breadcrumbs at the bottom of the editor."
                  ),
                  messageActivated: (0, import_i18n15.__)(
                    "Display block breadcrumbs activated"
                  ),
                  messageDeactivated: (0, import_i18n15.__)(
                    "Display block breadcrumbs deactivated"
                  )
                }
              )
            ] })
          ] })
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
        KeyboardShortcutHelpModal,
        {
          isModalActive: isKeyboardShortcutsModalActive,
          toggleModal: toggleKeyboardShortcutsModal
        }
      )
    ] });
  }

  // packages/edit-widgets/build-module/components/header/index.mjs
  var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
  function Header() {
    const isLargeViewport = (0, import_compose8.useViewportMatch)("medium");
    const blockToolbarRef = (0, import_element18.useRef)();
    const { hasFixedToolbar } = (0, import_data22.useSelect)(
      (select) => ({
        hasFixedToolbar: !!select(import_preferences6.store).get(
          "core/edit-widgets",
          "fixedToolbar"
        )
      }),
      []
    );
    return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_jsx_runtime38.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "edit-widgets-header", children: [
      /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "edit-widgets-header__navigable-toolbar-wrapper", children: [
        isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h1", { className: "edit-widgets-header__title", children: (0, import_i18n16.__)("Widgets") }),
        !isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
          import_components19.VisuallyHidden,
          {
            as: "h1",
            className: "edit-widgets-header__title",
            children: (0, import_i18n16.__)("Widgets")
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(document_tools_default, {}),
        hasFixedToolbar && isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "selected-block-tools-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_block_editor12.BlockToolbar, { hideDragHandle: true }) }),
          /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
            import_components19.Popover.Slot,
            {
              ref: blockToolbarRef,
              name: "block-toolbar"
            }
          )
        ] })
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "edit-widgets-header__actions", children: [
        /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(pinned_items_default.Slot, { scope: "core/edit-widgets" }),
        /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(save_button_default, {}),
        /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(MoreMenu, {})
      ] })
    ] }) });
  }
  var header_default = Header;

  // packages/edit-widgets/build-module/components/widget-areas-block-editor-content/index.mjs
  var import_block_editor13 = __toESM(require_block_editor(), 1);
  var import_compose9 = __toESM(require_compose(), 1);
  var import_data23 = __toESM(require_data(), 1);
  var import_element19 = __toESM(require_element(), 1);
  var import_preferences7 = __toESM(require_preferences(), 1);

  // packages/edit-widgets/build-module/components/notices/index.mjs
  var import_notices2 = __toESM(require_notices(), 1);
  var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
  function Notices() {
    return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
        import_notices2.InlineNotices,
        {
          pinnedNoticesClassName: "edit-widgets-notices__pinned",
          dismissibleNoticesClassName: "edit-widgets-notices__dismissible"
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_notices2.SnackbarNotices, { className: "edit-widgets-notices__snackbar" })
    ] });
  }
  var notices_default = Notices;

  // packages/edit-widgets/build-module/components/widget-areas-block-editor-content/index.mjs
  var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
  function WidgetAreasBlockEditorContent({
    blockEditorSettings
  }) {
    const hasThemeStyles = (0, import_data23.useSelect)(
      (select) => !!select(import_preferences7.store).get(
        "core/edit-widgets",
        "themeStyles"
      ),
      []
    );
    const isLargeViewport = (0, import_compose9.useViewportMatch)("medium");
    const styles = (0, import_element19.useMemo)(() => {
      return hasThemeStyles ? blockEditorSettings.styles : [];
    }, [blockEditorSettings, hasThemeStyles]);
    return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "edit-widgets-block-editor", children: [
      /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(notices_default, {}),
      !isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_block_editor13.BlockToolbar, { hideDragHandle: true }),
      /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_block_editor13.BlockTools, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(keyboard_shortcuts_default, {}),
        /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
          import_block_editor13.__unstableEditorStyles,
          {
            styles,
            scope: ":where(.editor-styles-wrapper)"
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_block_editor13.BlockSelectionClearer, { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_block_editor13.WritingFlow, { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_block_editor13.BlockList, { className: "edit-widgets-main-block-list" }) }) })
      ] })
    ] });
  }

  // packages/edit-widgets/build-module/components/secondary-sidebar/index.mjs
  var import_data27 = __toESM(require_data(), 1);

  // packages/edit-widgets/build-module/components/secondary-sidebar/inserter-sidebar.mjs
  var import_block_editor15 = __toESM(require_block_editor(), 1);
  var import_compose10 = __toESM(require_compose(), 1);
  var import_element20 = __toESM(require_element(), 1);
  var import_data25 = __toESM(require_data(), 1);

  // packages/edit-widgets/build-module/hooks/use-widget-library-insertion-point.mjs
  var import_data24 = __toESM(require_data(), 1);
  var import_block_editor14 = __toESM(require_block_editor(), 1);
  var import_core_data11 = __toESM(require_core_data(), 1);
  var useWidgetLibraryInsertionPoint = () => {
    const firstRootId = (0, import_data24.useSelect)((select) => {
      const { getEntityRecord } = select(import_core_data11.store);
      const widgetAreasPost = getEntityRecord(
        KIND,
        POST_TYPE,
        buildWidgetAreasPostId()
      );
      return widgetAreasPost?.blocks[0]?.clientId;
    }, []);
    return (0, import_data24.useSelect)(
      (select) => {
        const {
          getBlockRootClientId,
          getBlockSelectionEnd,
          getBlockOrder,
          getBlockIndex
        } = select(import_block_editor14.store);
        const insertionPoint = select(store2).__experimentalGetInsertionPoint();
        if (insertionPoint.rootClientId) {
          return insertionPoint;
        }
        const clientId = getBlockSelectionEnd() || firstRootId;
        const rootClientId = getBlockRootClientId(clientId);
        if (clientId && rootClientId === "") {
          return {
            rootClientId: clientId,
            insertionIndex: getBlockOrder(clientId).length
          };
        }
        return {
          rootClientId,
          insertionIndex: getBlockIndex(clientId) + 1
        };
      },
      [firstRootId]
    );
  };
  var use_widget_library_insertion_point_default = useWidgetLibraryInsertionPoint;

  // packages/edit-widgets/build-module/components/secondary-sidebar/inserter-sidebar.mjs
  var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
  function InserterSidebar() {
    const isMobileViewport = (0, import_compose10.useViewportMatch)("medium", "<");
    const { rootClientId, insertionIndex } = use_widget_library_insertion_point_default();
    const { setIsInserterOpened: setIsInserterOpened2 } = (0, import_data25.useDispatch)(store2);
    const closeInserter = (0, import_element20.useCallback)(() => {
      return setIsInserterOpened2(false);
    }, [setIsInserterOpened2]);
    const libraryRef = (0, import_element20.useRef)();
    return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "edit-widgets-layout__inserter-panel", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "edit-widgets-layout__inserter-panel-content", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
      import_block_editor15.__experimentalLibrary,
      {
        showInserterHelpPanel: true,
        shouldFocusBlock: isMobileViewport,
        rootClientId,
        __experimentalInsertionIndex: insertionIndex,
        ref: libraryRef,
        onClose: closeInserter
      }
    ) }) });
  }

  // packages/edit-widgets/build-module/components/secondary-sidebar/list-view-sidebar.mjs
  var import_block_editor16 = __toESM(require_block_editor(), 1);
  var import_components20 = __toESM(require_components(), 1);
  var import_compose11 = __toESM(require_compose(), 1);
  var import_data26 = __toESM(require_data(), 1);
  var import_element21 = __toESM(require_element(), 1);
  var import_i18n17 = __toESM(require_i18n(), 1);
  var import_keycodes6 = __toESM(require_keycodes(), 1);
  var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
  function ListViewSidebar() {
    const { setIsListViewOpened: setIsListViewOpened2 } = (0, import_data26.useDispatch)(store2);
    const { getListViewToggleRef: getListViewToggleRef2 } = unlock((0, import_data26.useSelect)(store2));
    const [dropZoneElement, setDropZoneElement] = (0, import_element21.useState)(null);
    const focusOnMountRef = (0, import_compose11.useFocusOnMount)("firstElement");
    const closeListView = (0, import_element21.useCallback)(() => {
      setIsListViewOpened2(false);
      getListViewToggleRef2().current?.focus();
    }, [getListViewToggleRef2, setIsListViewOpened2]);
    const closeOnEscape = (0, import_element21.useCallback)(
      (event) => {
        if (event.keyCode === import_keycodes6.ESCAPE && !event.defaultPrevented) {
          event.preventDefault();
          closeListView();
        }
      },
      [closeListView]
    );
    return (
      // eslint-disable-next-line jsx-a11y/no-static-element-interactions
      /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
        "div",
        {
          className: "edit-widgets-editor__list-view-panel",
          onKeyDown: closeOnEscape,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "edit-widgets-editor__list-view-panel-header", children: [
              /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("strong", { children: (0, import_i18n17.__)("List View") }),
              /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
                import_components20.Button,
                {
                  icon: close_small_default,
                  label: (0, import_i18n17.__)("Close"),
                  onClick: closeListView,
                  size: "compact"
                }
              )
            ] }),
            /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
              "div",
              {
                className: "edit-widgets-editor__list-view-panel-content",
                ref: (0, import_compose11.useMergeRefs)([focusOnMountRef, setDropZoneElement]),
                children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_block_editor16.__experimentalListView, { dropZoneElement })
              }
            )
          ]
        }
      )
    );
  }

  // packages/edit-widgets/build-module/components/secondary-sidebar/index.mjs
  var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
  function SecondarySidebar() {
    const { isInserterOpen, isListViewOpen } = (0, import_data27.useSelect)((select) => {
      const { isInserterOpened: isInserterOpened2, isListViewOpened: isListViewOpened2 } = select(store2);
      return {
        isInserterOpen: isInserterOpened2(),
        isListViewOpen: isListViewOpened2()
      };
    }, []);
    if (isInserterOpen) {
      return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(InserterSidebar, {});
    }
    if (isListViewOpen) {
      return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ListViewSidebar, {});
    }
    return null;
  }

  // packages/edit-widgets/build-module/components/layout/interface.mjs
  var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
  var interfaceLabels = {
    /* translators: accessibility text for the widgets screen top bar landmark region. */
    header: (0, import_i18n18.__)("Widgets top bar"),
    /* translators: accessibility text for the widgets screen content landmark region. */
    body: (0, import_i18n18.__)("Widgets and blocks"),
    /* translators: accessibility text for the widgets screen settings landmark region. */
    sidebar: (0, import_i18n18.__)("Widgets settings"),
    /* translators: accessibility text for the widgets screen footer landmark region. */
    footer: (0, import_i18n18.__)("Widgets footer")
  };
  function Interface({ blockEditorSettings }) {
    const isMobileViewport = (0, import_compose12.useViewportMatch)("medium", "<");
    const isHugeViewport = (0, import_compose12.useViewportMatch)("huge", ">=");
    const { setIsInserterOpened: setIsInserterOpened2, setIsListViewOpened: setIsListViewOpened2, closeGeneralSidebar: closeGeneralSidebar2 } = (0, import_data28.useDispatch)(store2);
    const {
      hasBlockBreadCrumbsEnabled,
      hasSidebarEnabled,
      isInserterOpened: isInserterOpened2,
      isListViewOpened: isListViewOpened2
    } = (0, import_data28.useSelect)(
      (select) => ({
        hasSidebarEnabled: !!select(
          store
        ).getActiveComplementaryArea(store2.name),
        isInserterOpened: !!select(store2).isInserterOpened(),
        isListViewOpened: !!select(store2).isListViewOpened(),
        hasBlockBreadCrumbsEnabled: !!select(import_preferences8.store).get(
          "core/edit-widgets",
          "showBlockBreadcrumbs"
        )
      }),
      []
    );
    (0, import_element22.useEffect)(() => {
      if (hasSidebarEnabled && !isHugeViewport) {
        setIsInserterOpened2(false);
        setIsListViewOpened2(false);
      }
    }, [hasSidebarEnabled, isHugeViewport]);
    (0, import_element22.useEffect)(() => {
      if ((isInserterOpened2 || isListViewOpened2) && !isHugeViewport) {
        closeGeneralSidebar2();
      }
    }, [isInserterOpened2, isListViewOpened2, isHugeViewport]);
    const secondarySidebarLabel = isListViewOpened2 ? (0, import_i18n18.__)("List View") : (0, import_i18n18.__)("Block Library");
    const hasSecondarySidebar = isListViewOpened2 || isInserterOpened2;
    return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
      interface_skeleton_default,
      {
        labels: {
          ...interfaceLabels,
          secondarySidebar: secondarySidebarLabel
        },
        header: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(header_default, {}),
        secondarySidebar: hasSecondarySidebar && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(SecondarySidebar, {}),
        sidebar: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(complementary_area_default.Slot, { scope: "core/edit-widgets" }),
        content: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_jsx_runtime44.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
          WidgetAreasBlockEditorContent,
          {
            blockEditorSettings
          }
        ) }),
        footer: hasBlockBreadCrumbsEnabled && !isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "edit-widgets-layout__footer", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_block_editor17.BlockBreadcrumb, { rootLabelText: (0, import_i18n18.__)("Widgets") }) })
      }
    );
  }
  var interface_default = Interface;

  // packages/edit-widgets/build-module/components/layout/unsaved-changes-warning.mjs
  var import_i18n19 = __toESM(require_i18n(), 1);
  var import_element23 = __toESM(require_element(), 1);
  var import_data29 = __toESM(require_data(), 1);
  function UnsavedChangesWarning() {
    const isDirty = (0, import_data29.useSelect)((select) => {
      const { getEditedWidgetAreas: getEditedWidgetAreas2 } = select(store2);
      const editedWidgetAreas = getEditedWidgetAreas2();
      return editedWidgetAreas?.length > 0;
    }, []);
    (0, import_element23.useEffect)(() => {
      const warnIfUnsavedChanges = (event) => {
        if (isDirty) {
          event.returnValue = (0, import_i18n19.__)(
            "You have unsaved changes. If you proceed, they will be lost."
          );
          return event.returnValue;
        }
      };
      window.addEventListener("beforeunload", warnIfUnsavedChanges);
      return () => {
        window.removeEventListener("beforeunload", warnIfUnsavedChanges);
      };
    }, [isDirty]);
    return null;
  }

  // packages/edit-widgets/build-module/components/welcome-guide/index.mjs
  var import_data30 = __toESM(require_data(), 1);
  var import_components21 = __toESM(require_components(), 1);
  var import_i18n20 = __toESM(require_i18n(), 1);
  var import_element24 = __toESM(require_element(), 1);
  var import_preferences9 = __toESM(require_preferences(), 1);
  var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
  function WelcomeGuide() {
    const isActive = (0, import_data30.useSelect)(
      (select) => !!select(import_preferences9.store).get(
        "core/edit-widgets",
        "welcomeGuide"
      ),
      []
    );
    const { toggle } = (0, import_data30.useDispatch)(import_preferences9.store);
    const widgetAreas = (0, import_data30.useSelect)(
      (select) => select(store2).getWidgetAreas({ per_page: -1 }),
      []
    );
    if (!isActive) {
      return null;
    }
    const isEntirelyBlockWidgets = widgetAreas?.every(
      (widgetArea) => widgetArea.id === "wp_inactive_widgets" || widgetArea.widgets.every(
        (widgetId) => widgetId.startsWith("block-")
      )
    );
    const numWidgetAreas = widgetAreas?.filter(
      (widgetArea) => widgetArea.id !== "wp_inactive_widgets"
    ).length ?? 0;
    return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
      import_components21.Guide,
      {
        className: "edit-widgets-welcome-guide",
        contentLabel: (0, import_i18n20.__)("Welcome to block Widgets"),
        finishButtonText: (0, import_i18n20.__)("Get started"),
        onFinish: () => toggle("core/edit-widgets", "welcomeGuide"),
        pages: [
          {
            image: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
              WelcomeGuideImage,
              {
                nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.svg",
                animatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.gif"
              }
            ),
            content: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("h1", { className: "edit-widgets-welcome-guide__heading", children: (0, import_i18n20.__)("Welcome to block Widgets") }),
              isEntirelyBlockWidgets ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "edit-widgets-welcome-guide__text", children: (0, import_i18n20.sprintf)(
                // Translators: %s: Number of block areas in the current theme.
                (0, import_i18n20._n)(
                  "Your theme provides %s \u201Cblock\u201D area for you to add and edit content.\xA0Try adding a search bar, social icons, or other types of blocks here and see how they\u2019ll look on your site.",
                  "Your theme provides %s different \u201Cblock\u201D areas for you to add and edit content.\xA0Try adding a search bar, social icons, or other types of blocks here and see how they\u2019ll look on your site.",
                  numWidgetAreas
                ),
                numWidgetAreas
              ) }) }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
                /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "edit-widgets-welcome-guide__text", children: (0, import_i18n20.__)(
                  "You can now add any block to your site\u2019s widget areas. Don\u2019t worry, all of your favorite widgets still work flawlessly."
                ) }),
                /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("p", { className: "edit-widgets-welcome-guide__text", children: [
                  /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("strong", { children: (0, import_i18n20.__)(
                    "Want to stick with the old widgets?"
                  ) }),
                  " ",
                  /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
                    import_components21.ExternalLink,
                    {
                      href: (0, import_i18n20.__)(
                        "https://wordpress.org/plugins/classic-widgets/"
                      ),
                      children: (0, import_i18n20.__)(
                        "Get the Classic Widgets plugin."
                      )
                    }
                  )
                ] })
              ] })
            ] })
          },
          {
            image: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
              WelcomeGuideImage,
              {
                nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-editor.svg",
                animatedSrc: "https://s.w.org/images/block-editor/welcome-editor.gif"
              }
            ),
            content: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("h1", { className: "edit-widgets-welcome-guide__heading", children: (0, import_i18n20.__)("Customize each block") }),
              /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "edit-widgets-welcome-guide__text", children: (0, import_i18n20.__)(
                "Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected."
              ) })
            ] })
          },
          {
            image: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
              WelcomeGuideImage,
              {
                nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-library.svg",
                animatedSrc: "https://s.w.org/images/block-editor/welcome-library.gif"
              }
            ),
            content: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("h1", { className: "edit-widgets-welcome-guide__heading", children: (0, import_i18n20.__)("Explore all blocks") }),
              /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "edit-widgets-welcome-guide__text", children: (0, import_element24.createInterpolateElement)(
                (0, import_i18n20.__)(
                  "All of the blocks available to you live in the block library. You\u2019ll find it wherever you see the <InserterIconImage /> icon."
                ),
                {
                  InserterIconImage: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
                    "img",
                    {
                      className: "edit-widgets-welcome-guide__inserter-icon",
                      alt: (0, import_i18n20.__)("inserter"),
                      src: "data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A"
                    }
                  )
                }
              ) })
            ] })
          },
          {
            image: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
              WelcomeGuideImage,
              {
                nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.svg",
                animatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.gif"
              }
            ),
            content: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("h1", { className: "edit-widgets-welcome-guide__heading", children: (0, import_i18n20.__)("Learn more") }),
              /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "edit-widgets-welcome-guide__text", children: (0, import_element24.createInterpolateElement)(
                (0, import_i18n20.__)(
                  "New to the block editor? Want to learn more about using it? <a>Here's a detailed guide.</a>"
                ),
                {
                  a: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
                    import_components21.ExternalLink,
                    {
                      href: (0, import_i18n20.__)(
                        "https://wordpress.org/documentation/article/wordpress-block-editor/"
                      )
                    }
                  )
                }
              ) })
            ] })
          }
        ]
      }
    );
  }
  function WelcomeGuideImage({ nonAnimatedSrc, animatedSrc }) {
    return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("picture", { className: "edit-widgets-welcome-guide__image", children: [
      /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
        "source",
        {
          srcSet: nonAnimatedSrc,
          media: "(prefers-reduced-motion: reduce)"
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("img", { src: animatedSrc, width: "312", height: "240", alt: "" })
    ] });
  }

  // packages/edit-widgets/build-module/components/layout/index.mjs
  var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
  function Layout({ blockEditorSettings }) {
    const { createErrorNotice } = (0, import_data31.useDispatch)(import_notices4.store);
    function onPluginAreaError(name2) {
      createErrorNotice(
        (0, import_i18n21.sprintf)(
          /* translators: %s: plugin name */
          (0, import_i18n21.__)(
            'The "%s" plugin has encountered an error and cannot be rendered.'
          ),
          name2
        )
      );
    }
    const navigateRegionsProps = (0, import_components22.__unstableUseNavigateRegions)();
    return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ErrorBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
      "div",
      {
        className: navigateRegionsProps.className,
        ...navigateRegionsProps,
        ref: navigateRegionsProps.ref,
        children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
          WidgetAreasBlockEditorProvider,
          {
            blockEditorSettings,
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(interface_default, { blockEditorSettings }),
              /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Sidebar, {}),
              /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_plugins3.PluginArea, { onError: onPluginAreaError }),
              /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(UnsavedChangesWarning, {}),
              /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(WelcomeGuide, {})
            ]
          }
        )
      }
    ) });
  }
  var layout_default = Layout;

  // packages/edit-widgets/build-module/index.mjs
  var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
  var disabledBlocks = [
    "core/more",
    "core/freeform",
    "core/template-part",
    ...ALLOW_REUSABLE_BLOCKS ? [] : ["core/block"]
  ];
  function initializeEditor(id, settings2) {
    const target = document.getElementById(id);
    const root = (0, import_element25.createRoot)(target);
    const coreBlocks = (0, import_block_library2.__experimentalGetCoreBlocks)().filter((block) => {
      return !(disabledBlocks.includes(block.name) || block.name.startsWith("core/post") || block.name.startsWith("core/query") || block.name.startsWith("core/site") || block.name.startsWith("core/navigation") || block.name.startsWith("core/term"));
    });
    (0, import_data32.dispatch)(import_preferences10.store).setDefaults("core/edit-widgets", {
      fixedToolbar: false,
      welcomeGuide: true,
      showBlockBreadcrumbs: true,
      themeStyles: true
    });
    (0, import_data32.dispatch)(import_blocks3.store).reapplyBlockTypeFilters();
    (0, import_block_library2.registerCoreBlocks)(coreBlocks);
    (0, import_widgets5.registerLegacyWidgetBlock)();
    if (false) {
      (0, import_block_library2.__experimentalRegisterExperimentalCoreBlocks)({
        enableFSEBlocks: ENABLE_EXPERIMENTAL_FSE_BLOCKS
      });
    }
    (0, import_widgets5.registerLegacyWidgetVariations)(settings2);
    registerBlock(widget_area_exports);
    (0, import_widgets5.registerWidgetGroupBlock)();
    settings2.__experimentalFetchLinkSuggestions = (search, searchOptions) => (0, import_core_data12.__experimentalFetchLinkSuggestions)(search, searchOptions, settings2);
    (0, import_blocks3.setFreeformContentHandlerName)("core/html");
    root.render(
      /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_element25.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(layout_default, { blockEditorSettings: settings2 }) })
    );
    return root;
  }
  var initialize = initializeEditor;
  function reinitializeEditor() {
    (0, import_deprecated6.default)("wp.editWidgets.reinitializeEditor", {
      since: "6.2",
      version: "6.3"
    });
  }
  var registerBlock = (block) => {
    if (!block) {
      return;
    }
    const { metadata, settings: settings2, name: name2 } = block;
    if (metadata) {
      (0, import_blocks3.unstable__bootstrapServerSideBlockDefinitions)({ [name2]: metadata });
    }
    (0, import_blocks3.registerBlockType)(name2, settings2);
  };
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                  dist/edit-widgets.min.js                                                                            0000644                 00000173515 15212564012 0011232 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;(wp||={}).editWidgets=(()=>{var hd=Object.create;var St=Object.defineProperty;var wd=Object.getOwnPropertyDescriptor;var bd=Object.getOwnPropertyNames;var vd=Object.getPrototypeOf,_d=Object.prototype.hasOwnProperty;var _=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),we=(e,t)=>{for(var o in t)St(e,o,{get:t[o],enumerable:!0})},Oo=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of bd(t))!_d.call(e,i)&&i!==o&&St(e,i,{get:()=>t[i],enumerable:!(a=wd(t,i))||a.enumerable});return e};var r=(e,t,o)=>(o=e!=null?hd(vd(e)):{},Oo(t||!e||!e.__esModule?St(o,"default",{value:e,enumerable:!0}):o,e)),yd=e=>Oo(St({},"__esModule",{value:!0}),e);var kt=_((Sn,Vo)=>{Vo.exports=window.wp.blocks});var w=_((kn,Fo)=>{Fo.exports=window.wp.data});var $e=_((An,jo)=>{jo.exports=window.wp.deprecated});var y=_((xn,Go)=>{Go.exports=window.wp.element});var Nr=_((In,zo)=>{zo.exports=window.wp.blockLibrary});var G=_((En,Ho)=>{Ho.exports=window.wp.coreData});var Fe=_((Cn,Uo)=>{Uo.exports=window.wp.widgets});var J=_((Tn,Ko)=>{Ko.exports=window.wp.preferences});var $o=_((Wn,Yo)=>{Yo.exports=window.wp.apiFetch});var A=_((Bn,Qo)=>{Qo.exports=window.wp.i18n});var At=_((Nn,Xo)=>{Xo.exports=window.wp.notices});var k=_((Pn,ea)=>{ea.exports=window.wp.components});var F=_((Dn,ta)=>{ta.exports=window.wp.primitives});var f=_((Mn,ra)=>{ra.exports=window.ReactJSXRuntime});var aa=_((fm,oa)=>{oa.exports=window.wp.viewport});var z=_((cm,ia)=>{ia.exports=window.wp.compose});var Ot=_((um,sa)=>{sa.exports=window.wp.plugins});var Ta=_((Um,Ca)=>{Ca.exports=window.wp.privateApis});var L=_((af,Ba)=>{Ba.exports=window.wp.blockEditor});var Jt=_((Af,ja)=>{ja.exports=window.wp.hooks});var po=_((If,Ka)=>{Ka.exports=window.wp.mediaUtils});var li=_((Gf,di)=>{di.exports=window.wp.patterns});var nt=_((zf,ni)=>{ni.exports=window.wp.keyboardShortcuts});var De=_((Hf,mi)=>{mi.exports=window.wp.keycodes});var Ci=_((ac,Ei)=>{Ei.exports=window.wp.url});var Wi=_((ic,Ti)=>{Ti.exports=window.wp.dom});var _n={};we(_n,{initialize:()=>wn,initializeEditor:()=>dd,reinitializeEditor:()=>bn,store:()=>c});var Te=r(kt(),1),Ro=r(w(),1),ad=r($e(),1),Wr=r(y(),1),Lr=r(Nr(),1),id=r(G(),1),Ye=r(Fe(),1),sd=r(J(),1);var Fa=r($o(),1),Xt=r(w(),1);var qo=r(w(),1);function Sd(e={},t){let{type:o}=t;switch(o){case"SET_WIDGET_AREAS_OPEN_STATE":return t.widgetAreasOpenState;case"SET_IS_WIDGET_AREA_OPEN":{let{clientId:a,isOpen:i}=t;return{...e,[a]:i}}default:return e}}function kd(e=!1,t){switch(t.type){case"SET_IS_LIST_VIEW_OPENED":return t.isOpen?!1:e;case"SET_IS_INSERTER_OPENED":return t.value}return e}function Ad(e=!1,t){switch(t.type){case"SET_IS_INSERTER_OPENED":return t.value?!1:e;case"SET_IS_LIST_VIEW_OPENED":return t.isOpen}return e}function xd(e={current:null}){return e}function Id(e={current:null}){return e}function Ed(e={},t){switch(t.type){case"LOCK_WIDGET_SAVING":return{...e,[t.lockName]:!0};case"UNLOCK_WIDGET_SAVING":{let{[t.lockName]:o,...a}=e;return a}}return e}var Zo=(0,qo.combineReducers)({blockInserterPanel:kd,inserterSidebarToggleRef:Id,listViewPanel:Ad,listViewToggleRef:xd,widgetAreasOpenState:Sd,widgetSavingLock:Ed});var fo={};we(fo,{getWidgetAreas:()=>wl,getWidgets:()=>bl});var Ma=r(kt(),1),mo=r(G(),1);var no={};we(no,{closeGeneralSidebar:()=>ul,lockWidgetSaving:()=>hl,moveBlockToWidgetArea:()=>pl,persistStubPost:()=>dt,saveEditedWidgetAreas:()=>il,saveWidgetArea:()=>dl,saveWidgetAreas:()=>sl,setIsInserterOpened:()=>fl,setIsListViewOpened:()=>cl,setIsWidgetAreaOpen:()=>ml,setWidgetAreasOpenState:()=>lo,setWidgetIdForClientId:()=>nl,unlockWidgetSaving:()=>gl});var Re=r(A(),1),so=r(At(),1);function Jo(e){var t,o,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(o=Jo(e[t]))&&(a&&(a+=" "),a+=o)}else for(o in e)e[o]&&(a&&(a+=" "),a+=o);return a}function Cd(){for(var e,t,o=0,a="",i=arguments.length;o<i;o++)(e=arguments[o])&&(t=Jo(e))&&(a&&(a+=" "),a+=t);return a}var V=Cd;var K=r(k(),1),ot=r(w(),1),$t=r(A(),1);var xt=r(F(),1),Rr=r(f(),1),Pr=(0,Rr.jsx)(xt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Rr.jsx)(xt.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})});var It=r(F(),1),Dr=r(f(),1),qe=(0,Dr.jsx)(It.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Dr.jsx)(It.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var Et=r(F(),1),Mr=r(f(),1),Ze=(0,Mr.jsx)(Et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Mr.jsx)(Et.Path,{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"})});var Ct=r(F(),1),Or=r(f(),1),Vr=(0,Or.jsx)(Ct.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Or.jsx)(Ct.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.5 18.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h2.5v13zm10-.5c0 .3-.2.5-.5.5h-8v-13h8c.3 0 .5.2.5.5v12z"})});var Tt=r(F(),1),Fr=r(f(),1),jr=(0,Fr.jsx)(Tt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Fr.jsx)(Tt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z"})});var Wt=r(F(),1),Gr=r(f(),1),zr=(0,Gr.jsx)(Wt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Gr.jsx)(Wt.Path,{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"})});var Lt=r(F(),1),Hr=r(f(),1),Ur=(0,Hr.jsx)(Lt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Hr.jsx)(Lt.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});var Bt=r(F(),1),Kr=r(f(),1),Yr=(0,Kr.jsx)(Bt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Kr.jsx)(Bt.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var Nt=r(F(),1),$r=r(f(),1),qr=(0,$r.jsx)(Nt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$r.jsx)(Nt.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var Rt=r(F(),1),Zr=r(f(),1),Qe=(0,Zr.jsx)(Rt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Zr.jsx)(Rt.Path,{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"})});var Pt=r(F(),1),Qr=r(f(),1),Xr=(0,Qr.jsx)(Pt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Qr.jsx)(Pt.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var Dt=r(F(),1),Jr=r(f(),1),eo=(0,Jr.jsx)(Dt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Jr.jsx)(Dt.Path,{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"})});var Mt=r(F(),1),to=r(f(),1),Xe=(0,to.jsx)(Mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,to.jsx)(Mt.Path,{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"})});var se=r(y(),1),ao=r(aa(),1),ya=r(J(),1),ve=r(z(),1),Sa=r(Ot(),1);var fa=r(k(),1),Gt=r(w(),1),ca=r(Ot(),1);var jt=r(w(),1);var ro={};we(ro,{closeModal:()=>Od,disableComplementaryArea:()=>Ld,enableComplementaryArea:()=>Wd,openModal:()=>Md,pinItem:()=>Bd,setDefaultComplementaryArea:()=>Td,setFeatureDefaults:()=>Dd,setFeatureValue:()=>Pd,toggleFeature:()=>Rd,unpinItem:()=>Nd});var Ft=r($e(),1),U=r(J(),1);var Vt=r($e(),1);function ie(e){return["core/edit-post","core/edit-site"].includes(e)?((0,Vt.default)(`${e} interface scope`,{alternative:"core interface scope",hint:"core/edit-post and core/edit-site are merging.",version:"6.6"}),"core"):e}function Le(e,t){return e==="core"&&t==="edit-site/template"?((0,Vt.default)("edit-site/template sidebar",{alternative:"edit-post/document",version:"6.6"}),"edit-post/document"):e==="core"&&t==="edit-site/block-inspector"?((0,Vt.default)("edit-site/block-inspector sidebar",{alternative:"edit-post/block",version:"6.6"}),"edit-post/block"):t}var Td=(e,t)=>(e=ie(e),t=Le(e,t),{type:"SET_DEFAULT_COMPLEMENTARY_AREA",scope:e,area:t}),Wd=(e,t)=>({registry:o,dispatch:a})=>{if(!t)return;e=ie(e),t=Le(e,t),o.select(U.store).get(e,"isComplementaryAreaVisible")||o.dispatch(U.store).set(e,"isComplementaryAreaVisible",!0),a({type:"ENABLE_COMPLEMENTARY_AREA",scope:e,area:t})},Ld=e=>({registry:t})=>{e=ie(e),t.select(U.store).get(e,"isComplementaryAreaVisible")&&t.dispatch(U.store).set(e,"isComplementaryAreaVisible",!1)},Bd=(e,t)=>({registry:o})=>{if(!t)return;e=ie(e),t=Le(e,t);let a=o.select(U.store).get(e,"pinnedItems");a?.[t]!==!0&&o.dispatch(U.store).set(e,"pinnedItems",{...a,[t]:!0})},Nd=(e,t)=>({registry:o})=>{if(!t)return;e=ie(e),t=Le(e,t);let a=o.select(U.store).get(e,"pinnedItems");o.dispatch(U.store).set(e,"pinnedItems",{...a,[t]:!1})};function Rd(e,t){return function({registry:o}){(0,Ft.default)("dispatch( 'core/interface' ).toggleFeature",{since:"6.0",alternative:"dispatch( 'core/preferences' ).toggle"}),o.dispatch(U.store).toggle(e,t)}}function Pd(e,t,o){return function({registry:a}){(0,Ft.default)("dispatch( 'core/interface' ).setFeatureValue",{since:"6.0",alternative:"dispatch( 'core/preferences' ).set"}),a.dispatch(U.store).set(e,t,!!o)}}function Dd(e,t){return function({registry:o}){(0,Ft.default)("dispatch( 'core/interface' ).setFeatureDefaults",{since:"6.0",alternative:"dispatch( 'core/preferences' ).setDefaults"}),o.dispatch(U.store).setDefaults(e,t)}}function Md(e){return{type:"OPEN_MODAL",name:e}}function Od(){return{type:"CLOSE_MODAL"}}var oo={};we(oo,{getActiveComplementaryArea:()=>Vd,isComplementaryAreaLoading:()=>Fd,isFeatureActive:()=>Gd,isItemPinned:()=>jd,isModalActive:()=>zd});var Je=r(w(),1),da=r($e(),1),et=r(J(),1);var Vd=(0,Je.createRegistrySelector)(e=>(t,o)=>{o=ie(o);let a=e(et.store).get(o,"isComplementaryAreaVisible");if(a!==void 0)return a===!1?null:t?.complementaryAreas?.[o]}),Fd=(0,Je.createRegistrySelector)(e=>(t,o)=>{o=ie(o);let a=e(et.store).get(o,"isComplementaryAreaVisible"),i=t?.complementaryAreas?.[o];return a&&i===void 0}),jd=(0,Je.createRegistrySelector)(e=>(t,o,a)=>(o=ie(o),a=Le(o,a),e(et.store).get(o,"pinnedItems")?.[a]??!0)),Gd=(0,Je.createRegistrySelector)(e=>(t,o,a)=>((0,da.default)("select( 'core/interface' ).isFeatureActive( scope, featureName )",{since:"6.0",alternative:"select( 'core/preferences' ).get( scope, featureName )"}),!!e(et.store).get(o,a)));function zd(e,t){return e.activeModal===t}var la=r(w(),1);function Hd(e={},t){switch(t.type){case"SET_DEFAULT_COMPLEMENTARY_AREA":{let{scope:o,area:a}=t;return e[o]?e:{...e,[o]:a}}case"ENABLE_COMPLEMENTARY_AREA":{let{scope:o,area:a}=t;return{...e,[o]:a}}}return e}function Ud(e=null,t){switch(t.type){case"OPEN_MODAL":return t.name;case"CLOSE_MODAL":return null}return e}var na=(0,la.combineReducers)({complementaryAreas:Hd,activeModal:Ud});var ma="core/interface";var B=(0,jt.createReduxStore)(ma,{reducer:na,actions:ro,selectors:oo});(0,jt.register)(B);var ua=r(f(),1);function Kd(e){return["checkbox","option","radio","switch","menuitemcheckbox","menuitemradio","treeitem"].includes(e)}function je({as:e=fa.Button,scope:t,identifier:o,icon:a,selectedIcon:i,name:s,shortcut:l,...d}){let n=e,m=(0,ca.usePluginContext)(),b=a||m.icon,p=o||`${m.name}/${s}`,h=(0,Gt.useSelect)(M=>M(B).getActiveComplementaryArea(t)===p,[p,t]),{enableComplementaryArea:E,disableComplementaryArea:D}=(0,Gt.useDispatch)(B);return(0,ua.jsx)(n,{icon:i&&h?i:b,"aria-controls":p.replace("/",":"),"aria-checked":Kd(d.role)?h:void 0,onClick:()=>{h?D(t):E(t,p)},shortcut:l,...d})}var zt=r(f(),1),Yd=({children:e,className:t,toggleButtonProps:o})=>{let a=(0,zt.jsx)(je,{icon:Ze,...o});return(0,zt.jsxs)("div",{className:V("components-panel__header","interface-complementary-area-header",t),tabIndex:-1,children:[e,a]})},pa=Yd;var ba=r(k(),1);var be=r(k(),1),Ht=r(y(),1),tt=r(f(),1),ga=()=>{};function $d({name:e,as:t=be.MenuGroup,fillProps:o={},bubblesVirtually:a,...i}){return(0,tt.jsx)(be.Slot,{name:e,bubblesVirtually:a,fillProps:o,children:s=>{if(!Ht.Children.toArray(s).length)return null;let l=[];Ht.Children.forEach(s,({props:{__unstableExplicitMenuItem:n,__unstableTarget:m}})=>{m&&n&&l.push(m)});let d=Ht.Children.map(s,n=>!n.props.__unstableExplicitMenuItem&&l.includes(n.props.__unstableTarget)?null:n);return(0,tt.jsx)(t,{...i,children:d})}})}function ha({name:e,as:t=be.Button,onClick:o,...a}){return(0,tt.jsx)(be.Fill,{name:e,children:({onClick:i})=>(0,tt.jsx)(t,{onClick:o||i?(...s)=>{(o||ga)(...s),(i||ga)(...s)}:void 0,...a})})}ha.Slot=$d;var wa=ha;var Ut=r(f(),1),qd=({__unstableExplicitMenuItem:e,__unstableTarget:t,...o})=>(0,Ut.jsx)(ba.MenuItem,{...o});function va({scope:e,target:t,__unstableExplicitMenuItem:o,...a}){return(0,Ut.jsx)(je,{as:i=>(0,Ut.jsx)(wa,{__unstableExplicitMenuItem:o,__unstableTarget:`${e}/${t}`,as:qd,name:`${e}/plugin-more-menu`,...i}),role:"menuitemcheckbox",selectedIcon:qe,name:t,scope:e,...a})}var Yt=r(k(),1),Kt=r(f(),1);function _a({scope:e,...t}){return(0,Kt.jsx)(Yt.Fill,{name:`PinnedItems/${e}`,...t})}function Zd({scope:e,className:t,...o}){return(0,Kt.jsx)(Yt.Slot,{name:`PinnedItems/${e}`,...o,children:a=>a?.length>0&&(0,Kt.jsx)("div",{className:V(t,"interface-pinned-items"),children:a})})}_a.Slot=Zd;var rt=_a;var C=r(f(),1),Qd=.3;function Xd({scope:e,...t}){return(0,C.jsx)(K.Slot,{name:`ComplementaryArea/${e}`,...t})}var ka=280,Jd={open:{width:ka},closed:{width:0},mobileOpen:{width:"100vw"}};function el({activeArea:e,isActive:t,scope:o,children:a,className:i,id:s}){let l=(0,ve.useReducedMotion)(),d=(0,ve.useViewportMatch)("medium","<"),n=(0,ve.usePrevious)(e),m=(0,ve.usePrevious)(t),[,b]=(0,se.useState)({});(0,se.useEffect)(()=>{b({})},[t]);let p={type:"tween",duration:l||d||n&&e&&e!==n?0:Qd,ease:[.6,0,.4,1]};return(0,C.jsx)(K.Fill,{name:`ComplementaryArea/${o}`,children:(0,C.jsx)(K.__unstableAnimatePresence,{initial:!1,children:(m||t)&&(0,C.jsx)(K.__unstableMotion.div,{variants:Jd,initial:"closed",animate:d?"mobileOpen":"open",exit:"closed",transition:p,className:"interface-complementary-area__fill",children:(0,C.jsx)("div",{id:s,className:i,style:{width:d?"100vw":ka},children:a})})})})}function tl(e,t,o,a,i){let s=(0,se.useRef)(!1),l=(0,se.useRef)(!1),{enableComplementaryArea:d,disableComplementaryArea:n}=(0,ot.useDispatch)(B);(0,se.useEffect)(()=>{a&&i&&!s.current?(n(e),l.current=!0):l.current&&!i&&s.current?(l.current=!1,d(e,t)):l.current&&o&&o!==t&&(l.current=!1),i!==s.current&&(s.current=i)},[a,i,e,t,o,n,d])}function Aa({children:e,className:t,closeLabel:o=(0,$t.__)("Close plugin"),identifier:a,header:i,headerClassName:s,icon:l,isPinnable:d=!0,panelClassName:n,scope:m,name:b,title:p,toggleShortcut:h,isActiveByDefault:E}){let D=(0,Sa.usePluginContext)(),M=l||D.icon,u=a||`${D.name}/${b}`,[v,O]=(0,se.useState)(!1),{isLoading:H,isActive:X,isPinned:ce,activeArea:We,isSmall:vt,isLarge:ld,showIconLabels:_t}=(0,ot.useSelect)(yt=>{let{getActiveComplementaryArea:cd,isComplementaryAreaLoading:ud,isItemPinned:pd}=yt(B),{get:gd}=yt(ya.store),Mo=cd(m);return{isLoading:ud(m),isActive:Mo===u,isPinned:pd(m,u),activeArea:Mo,isSmall:yt(ao.store).isViewportMatch("< medium"),isLarge:yt(ao.store).isViewportMatch("large"),showIconLabels:gd("core","showIconLabels")}},[u,m]),nd=(0,ve.useViewportMatch)("medium","<");tl(m,u,We,X,vt);let{enableComplementaryArea:Do,disableComplementaryArea:Br,pinItem:md,unpinItem:fd}=(0,ot.useDispatch)(B);if((0,se.useEffect)(()=>{E&&We===void 0&&!vt?Do(m,u):We===void 0&&vt&&Br(m,u),O(!0)},[We,E,m,u,vt,Do,Br]),!!v)return(0,C.jsxs)(C.Fragment,{children:[d&&(0,C.jsx)(rt,{scope:m,children:ce&&(0,C.jsx)(je,{scope:m,identifier:u,isPressed:X&&(!_t||ld),"aria-expanded":X,"aria-disabled":H,label:p,icon:_t?qe:M,showTooltip:!_t,variant:_t?"tertiary":void 0,size:"compact",shortcut:h})}),b&&d&&(0,C.jsx)(va,{target:b,scope:m,icon:M,identifier:u,children:p}),(0,C.jsxs)(el,{activeArea:We,isActive:X,className:V("interface-complementary-area",t),scope:m,id:u.replace("/",":"),children:[(0,C.jsx)(pa,{className:s,closeLabel:o,onClose:()=>Br(m),toggleButtonProps:{label:o,size:"compact",shortcut:h,scope:m,identifier:u},children:i||(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("h2",{className:"interface-complementary-area-header__title",children:p}),d&&!nd&&(0,C.jsx)(K.Button,{className:"interface-complementary-area__pin-unpin-item",icon:ce?eo:Xr,label:ce?(0,$t.__)("Unpin from toolbar"):(0,$t.__)("Pin to toolbar"),onClick:()=>(ce?fd:md)(m,u),isPressed:ce,"aria-expanded":ce,size:"compact"})]})}),(0,C.jsx)(K.Panel,{className:n,children:e})]})]})}Aa.Slot=Xd;var at=Aa;var xa=r(y(),1),Ia=r(f(),1),Ea=(0,xa.forwardRef)(({children:e,className:t,ariaLabel:o,as:a="div",...i},s)=>(0,Ia.jsx)(a,{ref:s,className:V("admin-ui-navigable-region",t),"aria-label":o,role:"region",tabIndex:"-1",...i,children:e}));Ea.displayName="NavigableRegion";var _e=Ea;var qt=r(y(),1),Be=r(k(),1),ye=r(A(),1),Ge=r(z(),1),P=r(f(),1),La=.25,Wa={type:"tween",duration:La,ease:[.6,0,.4,1]};function rl(e){(0,qt.useEffect)(()=>{let t=document&&document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=>{t.classList.toggle(e)}},[e])}var ol={hidden:{opacity:1,marginTop:-60},visible:{opacity:1,marginTop:0},distractionFreeHover:{opacity:1,marginTop:0,transition:{...Wa,delay:.2,delayChildren:.2}},distractionFreeHidden:{opacity:0,marginTop:-60},distractionFreeDisabled:{opacity:0,marginTop:0,transition:{...Wa,delay:.8,delayChildren:.8}}};function al({isDistractionFree:e,footer:t,header:o,editorNotices:a,sidebar:i,secondarySidebar:s,content:l,actions:d,labels:n,className:m},b){let[p,h]=(0,Ge.useResizeObserver)(),E=(0,Ge.useViewportMatch)("medium","<"),M={type:"tween",duration:(0,Ge.useReducedMotion)()?0:La,ease:[.6,0,.4,1]};rl("interface-interface-skeleton__html-container");let v={...{header:(0,ye._x)("Header","header landmark area"),body:(0,ye.__)("Content"),secondarySidebar:(0,ye.__)("Block Library"),sidebar:(0,ye._x)("Settings","settings landmark area"),actions:(0,ye.__)("Publish"),footer:(0,ye.__)("Footer")},...n};return(0,P.jsxs)("div",{ref:b,className:V(m,"interface-interface-skeleton",!!t&&"has-footer"),children:[(0,P.jsxs)("div",{className:"interface-interface-skeleton__editor",children:[(0,P.jsx)(Be.__unstableAnimatePresence,{initial:!1,children:!!o&&(0,P.jsx)(_e,{as:Be.__unstableMotion.div,className:"interface-interface-skeleton__header","aria-label":v.header,initial:e&&!E?"distractionFreeHidden":"hidden",whileHover:e&&!E?"distractionFreeHover":"visible",animate:e&&!E?"distractionFreeDisabled":"visible",exit:e&&!E?"distractionFreeHidden":"hidden",variants:ol,transition:M,children:o})}),e&&(0,P.jsx)("div",{className:"interface-interface-skeleton__header",children:a}),(0,P.jsxs)("div",{className:"interface-interface-skeleton__body",children:[(0,P.jsx)(Be.__unstableAnimatePresence,{initial:!1,children:!!s&&(0,P.jsx)(_e,{className:"interface-interface-skeleton__secondary-sidebar",ariaLabel:v.secondarySidebar,as:Be.__unstableMotion.div,initial:"closed",animate:"open",exit:"closed",variants:{open:{width:h.width},closed:{width:0}},transition:M,children:(0,P.jsxs)(Be.__unstableMotion.div,{style:{position:"absolute",width:E?"100vw":"fit-content",height:"100%",left:0},variants:{open:{x:0},closed:{x:"-100%"}},transition:M,children:[p,s]})})}),(0,P.jsx)(_e,{className:"interface-interface-skeleton__content",ariaLabel:v.body,children:l}),!!i&&(0,P.jsx)(_e,{className:"interface-interface-skeleton__sidebar",ariaLabel:v.sidebar,children:i}),!!d&&(0,P.jsx)(_e,{className:"interface-interface-skeleton__actions",ariaLabel:v.actions,children:d})]})]}),!!t&&(0,P.jsx)(_e,{className:"interface-interface-skeleton__footer",ariaLabel:v.footer,children:t})]})}var io=(0,qt.forwardRef)(al);var Da=r(Fe(),1),te=r(G(),1),st=r(L(),1);var Ne=r(kt(),1),Zt=r(Fe(),1);function Na(e){if(e.id_base==="block"){let o=(0,Ne.parse)(e.instance.raw.content,{__unstableSkipAutop:!0});return o.length?(0,Zt.addWidgetIdToBlock)(o[0],e.id):(0,Zt.addWidgetIdToBlock)((0,Ne.createBlock)("core/paragraph",{},[]),e.id)}let t;return e._embedded.about[0].is_multi?t={idBase:e.id_base,instance:e.instance}:t={id:e.id},(0,Zt.addWidgetIdToBlock)((0,Ne.createBlock)("core/legacy-widget",t,[]),e.id)}function Ra(e,t={}){let o;return e.name==="core/legacy-widget"&&(e.attributes.id||e.attributes.instance)?o={...t,id:e.attributes.id??t.id,id_base:e.attributes.idBase??t.id_base,instance:e.attributes.instance??t.instance}:o={...t,id_base:"block",instance:{raw:{content:(0,Ne.serialize)(e)}}},delete o.rendered,delete o.rendered_form,o}var x="root",de="sidebar",j="postType",ue=e=>`widget-area-${e}`,Se=()=>"widget-areas";function ze(){return{per_page:-1}}function it(){return{per_page:-1,_embed:"about"}}var Pa=(e,t)=>({id:e,slug:e,status:"draft",type:"page",blocks:t,meta:{widgetAreaId:e}});var ee="core/edit-widgets";var dt=(e,t)=>({registry:o})=>{let a=Pa(e,t);return o.dispatch(te.store).receiveEntityRecords(x,j,a,{id:a.id},!1),a},il=()=>async({select:e,dispatch:t,registry:o})=>{let a=e.getEditedWidgetAreas();if(a?.length)try{await t.saveWidgetAreas(a),o.dispatch(so.store).createSuccessNotice((0,Re.__)("Widgets saved."),{type:"snackbar"})}catch(i){o.dispatch(so.store).createErrorNotice((0,Re.sprintf)((0,Re.__)("There was an error. %s"),i.message),{type:"snackbar"})}},sl=e=>async({dispatch:t,registry:o})=>{try{for(let a of e)await t.saveWidgetArea(a.id)}finally{await o.dispatch(te.store).finishResolution("getEntityRecord",x,de,ze())}},dl=e=>async({dispatch:t,select:o,registry:a})=>{let i=o.getWidgets(),s=a.select(te.store).getEditedEntityRecord(x,j,ue(e)),l=Object.values(i).filter(({sidebar:u})=>u===e),d=[],n=s.blocks.filter(u=>{let{id:v}=u.attributes;if(u.name==="core/legacy-widget"&&v){if(d.includes(v))return!1;d.push(v)}return!0}),m=[];for(let u of l)o.getWidgetAreaForWidgetId(u.id)||m.push(u);let b=[],p=[],h=[];for(let u=0;u<n.length;u++){let v=n[u],O=(0,Da.getWidgetIdFromBlock)(v),H=i[O],X=Ra(v,H);if(h.push(O),H){if(a.dispatch(te.store).editEntityRecord("root","widget",O,{...X,sidebar:e},{undoIgnore:!0}),!a.select(te.store).hasEditsForEntityRecord("root","widget",O))continue;p.push(({saveEditedEntityRecord:We})=>We("root","widget",O))}else p.push(({saveEntityRecord:ce})=>ce("root","widget",{...X,sidebar:e}));b.push({block:v,position:u,clientId:v.clientId})}for(let u of m)p.push(({deleteEntityRecord:v})=>v("root","widget",u.id,{force:!0}));let D=(await a.dispatch(te.store).__experimentalBatch(p)).filter(u=>!u.hasOwnProperty("deleted")),M=[];for(let u=0;u<D.length;u++){let v=D[u],{block:O,position:H}=b[u];s.blocks[H].attributes.__internalWidgetId=v.id,a.select(te.store).getLastEntitySaveError("root","widget",v.id)&&M.push(O.attributes?.name||O?.name),h[H]||(h[H]=v.id)}if(M.length)throw new Error((0,Re.sprintf)((0,Re.__)("Could not save the following widgets: %s."),M.join(", ")));a.dispatch(te.store).editEntityRecord(x,de,e,{widgets:h},{undoIgnore:!0}),t(ll(e)),a.dispatch(te.store).receiveEntityRecords(x,j,s,void 0)},ll=e=>({registry:t})=>{t.dispatch(te.store).saveEditedEntityRecord(x,de,e,{throwOnError:!0})};function nl(e,t){return{type:"SET_WIDGET_ID_FOR_CLIENT_ID",clientId:e,widgetId:t}}function lo(e){return{type:"SET_WIDGET_AREAS_OPEN_STATE",widgetAreasOpenState:e}}function ml(e,t){return{type:"SET_IS_WIDGET_AREA_OPEN",clientId:e,isOpen:t}}function fl(e){return{type:"SET_IS_INSERTER_OPENED",value:e}}function cl(e){return{type:"SET_IS_LIST_VIEW_OPENED",isOpen:e}}var ul=()=>({registry:e})=>{e.dispatch(B).disableComplementaryArea(ee)},pl=(e,t)=>async({dispatch:o,select:a,registry:i})=>{let s=i.select(st.store).getBlockRootClientId(e),n=i.select(st.store).getBlocks().find(({attributes:h})=>h.id===t).clientId,b=i.select(st.store).getBlockOrder(n).length;a.getIsWidgetAreaOpen(n)||o.setIsWidgetAreaOpen(n,!0),i.dispatch(st.store).moveBlocksToPosition([e],s,n,b)};function gl(e){return{type:"UNLOCK_WIDGET_SAVING",lockName:e}}function hl(e){return{type:"LOCK_WIDGET_SAVING",lockName:e}}var wl=()=>async({dispatch:e,registry:t})=>{let o=ze(),a=await t.resolveSelect(mo.store).getEntityRecords(x,de,o),i=[],s=a.sort((d,n)=>d.id==="wp_inactive_widgets"?1:n.id==="wp_inactive_widgets"?-1:0);for(let d of s)i.push((0,Ma.createBlock)("core/widget-area",{id:d.id,name:d.name})),d.widgets.length||e(dt(ue(d.id),[]));let l={};i.forEach((d,n)=>{l[d.clientId]=n===0}),e(lo(l)),e(dt(Se(),i))},bl=()=>async({dispatch:e,registry:t})=>{let o=it(),a=await t.resolveSelect(mo.store).getEntityRecords("root","widget",o),i={};for(let s of a){let l=Na(s);i[s.sidebar]=i[s.sidebar]||[],i[s.sidebar].push(l)}for(let s in i)i.hasOwnProperty(s)&&e(dt(ue(s),i[s]))};var co={};we(co,{__experimentalGetInsertionPoint:()=>Wl,canInsertBlockInWidgetArea:()=>Ll,getEditedWidgetAreas:()=>xl,getIsWidgetAreaOpen:()=>Cl,getParentWidgetAreaBlock:()=>Al,getReferenceWidgetBlocks:()=>Il,getWidget:()=>yl,getWidgetAreaForWidgetId:()=>kl,getWidgetAreas:()=>Sl,getWidgets:()=>_l,isInserterOpened:()=>Tl,isListViewOpened:()=>Bl,isSavingWidgetAreas:()=>El,isWidgetSavingLocked:()=>Nl});var Y=r(w(),1),Oa=r(Fe(),1),le=r(G(),1),Qt=r(L(),1);var vl={rootClientId:void 0,insertionIndex:void 0},_l=(0,Y.createRegistrySelector)(e=>(0,Y.createSelector)(()=>e(le.store).getEntityRecords("root","widget",it())?.reduce((o,a)=>({...o,[a.id]:a}),{})??{},()=>[e(le.store).getEntityRecords("root","widget",it())])),yl=(0,Y.createRegistrySelector)(e=>(t,o)=>e(ee).getWidgets()[o]),Sl=(0,Y.createRegistrySelector)(e=>()=>{let t=ze();return e(le.store).getEntityRecords(x,de,t)}),kl=(0,Y.createRegistrySelector)(e=>(t,o)=>e(ee).getWidgetAreas().find(i=>e(le.store).getEditedEntityRecord(x,j,ue(i.id)).blocks.map(d=>(0,Oa.getWidgetIdFromBlock)(d)).includes(o))),Al=(0,Y.createRegistrySelector)(e=>(t,o)=>{let{getBlock:a,getBlockName:i,getBlockParents:s}=e(Qt.store),d=s(o).find(n=>i(n)==="core/widget-area");return a(d)}),xl=(0,Y.createRegistrySelector)(e=>(t,o)=>{let a=e(ee).getWidgetAreas();return a?(o&&(a=a.filter(({id:i})=>o.includes(i))),a.filter(({id:i})=>e(le.store).hasEditsForEntityRecord(x,j,ue(i))).map(({id:i})=>e(le.store).getEditedEntityRecord(x,de,i))):[]}),Il=(0,Y.createRegistrySelector)(e=>(t,o=null)=>{let a=[],i=e(ee).getWidgetAreas();for(let s of i){let l=e(le.store).getEditedEntityRecord(x,j,ue(s.id));for(let d of l.blocks)d.name==="core/legacy-widget"&&(!o||d.attributes?.referenceWidgetName===o)&&a.push(d)}return a}),El=(0,Y.createRegistrySelector)(e=>()=>{let t=e(ee).getWidgetAreas()?.map(({id:a})=>a);if(!t)return!1;for(let a of t)if(e(le.store).isSavingEntityRecord(x,de,a))return!0;let o=[...Object.keys(e(ee).getWidgets()),void 0];for(let a of o)if(e(le.store).isSavingEntityRecord("root","widget",a))return!0;return!1}),Cl=(e,t)=>{let{widgetAreasOpenState:o}=e;return!!o[t]};function Tl(e){return!!e.blockInserterPanel}function Wl(e){return typeof e.blockInserterPanel=="boolean"?vl:e.blockInserterPanel}var Ll=(0,Y.createRegistrySelector)(e=>(t,o)=>{let a=e(Qt.store).getBlocks(),[i]=a;return e(Qt.store).canInsertBlockType(o,i.clientId)});function Bl(e){return e.listViewPanel}function Nl(e){return Object.keys(e.widgetSavingLock).length>0}var uo={};we(uo,{getInserterSidebarToggleRef:()=>Pl,getListViewToggleRef:()=>Rl});function Rl(e){return e.listViewToggleRef}function Pl(e){return e.inserterSidebarToggleRef}var Va=r(Ta(),1),{lock:bf,unlock:$}=(0,Va.__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-widgets");var Dl={reducer:Zo,selectors:co,resolvers:fo,actions:no},c=(0,Xt.createReduxStore)(ee,Dl);(0,Xt.register)(c);Fa.default.use(function(e,t){return e.path?.indexOf("/wp/v2/types/widget-area")===0?Promise.resolve({}):t(e)});$(c).registerPrivateSelectors(uo);var Ga=r(L(),1),za=r(z(),1),er=r(w(),1),Ha=r(Jt(),1),Ua=r(Fe(),1);var ke=r(f(),1),Ml=(0,za.createHigherOrderComponent)(e=>t=>{let{clientId:o,name:a}=t,{widgetAreas:i,currentWidgetAreaId:s,canInsertBlockInWidgetArea:l}=(0,er.useSelect)(b=>{if(a==="core/widget-area")return{};let p=b(c),h=p.getParentWidgetAreaBlock(o);return{widgetAreas:p.getWidgetAreas(),currentWidgetAreaId:h?.attributes?.id,canInsertBlockInWidgetArea:p.canInsertBlockInWidgetArea(a)}},[o,a]),{moveBlockToWidgetArea:d}=(0,er.useDispatch)(c),n=i?.length>1,m=a!=="core/widget-area"&&n&&l;return(0,ke.jsxs)(ke.Fragment,{children:[(0,ke.jsx)(e,{...t},"edit"),m&&(0,ke.jsx)(Ga.BlockControls,{children:(0,ke.jsx)(Ua.MoveToWidgetArea,{widgetAreas:i,currentWidgetAreaId:s,onSelect:b=>{d(t.clientId,b)}})})]})},"withMoveToWidgetAreaToolbarItem");(0,Ha.addFilter)("editor.BlockEdit","core/edit-widgets/block-edit",Ml);var Ya=r(Jt(),1),$a=r(po(),1),Ol=()=>$a.MediaUpload;(0,Ya.addFilter)("editor.MediaUpload","core/edit-widgets/replace-media-upload",Ol);var bo={};we(bo,{metadata:()=>go,name:()=>Gl,settings:()=>zl});var wo=r(A(),1);var go={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/widget-area",title:"Widget Area",category:"widgets",attributes:{id:{type:"string"},name:{type:"string"}},supports:{html:!1,inserter:!1,customClassName:!1,reusable:!1,renaming:!1,visibility:!1,__experimentalToolbar:!1,__experimentalParentSelector:!1,__experimentalDisableBlockOverlay:!0},editorStyle:"wp-block-widget-area-editor",style:"wp-block-widget-area"};var ne=r(y(),1),ar=r(w(),1),Xa=r(G(),1),He=r(k(),1),Ja=r(L(),1);var qa=r(G(),1),or=r(L(),1),Za=r(y(),1);var tr=r(y(),1),Fl=e=>{let[t,o]=(0,tr.useState)(!1);return(0,tr.useEffect)(()=>{let{ownerDocument:a}=e.current;function i(d){l(d)}function s(){o(!1)}function l(d){e.current.contains(d.target)?o(!0):o(!1)}return a.addEventListener("dragstart",i),a.addEventListener("dragend",s),a.addEventListener("dragenter",l),()=>{a.removeEventListener("dragstart",i),a.removeEventListener("dragend",s),a.removeEventListener("dragenter",l)}},[]),t},rr=Fl;var ho=r(f(),1);function Qa({id:e}){let[t,o,a]=(0,qa.useEntityBlockEditor)("root","postType"),i=(0,Za.useRef)(),l=rr(i),d=(0,or.useInnerBlocksProps)({ref:i},{value:t,onInput:o,onChange:a,templateLock:!1,renderAppender:or.InnerBlocks.ButtonBlockAppender});return(0,ho.jsx)("div",{"data-widget-area-id":e,className:V("wp-block-widget-area__inner-blocks block-editor-inner-blocks editor-styles-wrapper",{"wp-block-widget-area__highlight-drop-zone":l}),children:(0,ho.jsx)("div",{...d})})}var Pe=r(f(),1);function ei({clientId:e,attributes:{id:t,name:o}}){let a=(0,ar.useSelect)(h=>h(c).getIsWidgetAreaOpen(e),[e]),{setIsWidgetAreaOpen:i}=(0,ar.useDispatch)(c),s=(0,ne.useRef)(),l=(0,ne.useCallback)(h=>i(e,h),[e]),d=jl(s),n=rr(s),[m,b]=(0,ne.useState)(!1);(0,ne.useEffect)(()=>{if(!d){b(!1);return}n&&!a?(l(!0),b(!0)):!n&&a&&m&&l(!1)},[a,d,n,m]);let p=(0,Ja.useBlockProps)();return(0,Pe.jsx)("div",{...p,children:(0,Pe.jsx)(He.Panel,{ref:s,children:(0,Pe.jsx)(He.PanelBody,{title:o,opened:a,onToggle:()=>{i(e,!a)},scrollAfterOpen:!d,children:({opened:h})=>(0,Pe.jsx)(He.__unstableDisclosureContent,{className:"wp-block-widget-area__panel-body-content",visible:h,children:(0,Pe.jsx)(Xa.EntityProvider,{kind:"root",type:"postType",id:`widget-area-${t}`,children:(0,Pe.jsx)(Qa,{id:t})})})})})})}var jl=e=>{let[t,o]=(0,ne.useState)(!1);return(0,ne.useEffect)(()=>{let{ownerDocument:a}=e.current;function i(){o(!0)}function s(){o(!1)}return a.addEventListener("dragstart",i),a.addEventListener("dragend",s),()=>{a.removeEventListener("dragstart",i),a.removeEventListener("dragend",s)}},[]),t};var{name:Gl}=go,zl={title:(0,wo.__)("Widget Area"),description:(0,wo.__)("A widget area container."),__experimentalLabel:({name:e})=>e,edit:ei};var Tr=r(A(),1),Js=r(w(),1),ed=r(Ot(),1),td=r(At(),1),rd=r(k(),1);var ti=r(y(),1),vo=r(A(),1),ri=r(k(),1),oi=r(L(),1),ai=r(z(),1),ii=r(Jt(),1),lt=r(f(),1);function Hl({text:e,children:t}){let o=(0,ai.useCopyToClipboard)(e);return(0,lt.jsx)(ri.Button,{__next40pxDefaultSize:!0,variant:"secondary",ref:o,children:t})}function Ul({message:e,error:t}){let o=[(0,lt.jsx)(Hl,{text:t.stack,children:(0,vo.__)("Copy Error")},"copy-error")];return(0,lt.jsx)(oi.Warning,{className:"edit-widgets-error-boundary",actions:o,children:e})}var si=class extends ti.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){(0,ii.doAction)("editor.ErrorBoundary.errorLogged",e)}static getDerivedStateFromError(e){return{error:e}}render(){return this.state.error?(0,lt.jsx)(Ul,{message:(0,vo.__)("The editor has encountered an unexpected error."),error:this.state.error}):this.props.children}};var vi=r(k(),1),_i=r(z(),1),yi=r(po(),1),lr=r(w(),1),nr=r(G(),1),Si=r(y(),1),ki=r(L(),1),Ai=r(li(),1),_o=r(J(),1),xi=r(Nr(),1);var fi=r(y(),1),Ue=r(nt(),1),ci=r(De(),1),ir=r(w(),1),Me=r(A(),1),ui=r(G(),1);function pi(){let{redo:e,undo:t}=(0,ir.useDispatch)(ui.store),{saveEditedWidgetAreas:o}=(0,ir.useDispatch)(c);return(0,Ue.useShortcut)("core/edit-widgets/undo",a=>{t(),a.preventDefault()}),(0,Ue.useShortcut)("core/edit-widgets/redo",a=>{e(),a.preventDefault()}),(0,Ue.useShortcut)("core/edit-widgets/save",a=>{a.preventDefault(),o()}),null}function Kl(){let{registerShortcut:e}=(0,ir.useDispatch)(Ue.store);return(0,fi.useEffect)(()=>{e({name:"core/edit-widgets/undo",category:"global",description:(0,Me.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/edit-widgets/redo",category:"global",description:(0,Me.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"},aliases:(0,ci.isAppleOS)()?[]:[{modifier:"primary",character:"y"}]}),e({name:"core/edit-widgets/save",category:"global",description:(0,Me.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/edit-widgets/keyboard-shortcuts",category:"main",description:(0,Me.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}}),e({name:"core/edit-widgets/next-region",category:"global",description:(0,Me.__)("Navigate to the next part of the editor."),keyCombination:{modifier:"ctrl",character:"`"},aliases:[{modifier:"access",character:"n"}]}),e({name:"core/edit-widgets/previous-region",category:"global",description:(0,Me.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"},{modifier:"ctrlShift",character:"~"}]})},[e]),null}pi.Register=Kl;var sr=pi;var gi=r(w(),1),hi=r(L(),1),wi=r(G(),1);var Yl=()=>(0,gi.useSelect)(e=>{let{getBlockSelectionEnd:t,getBlockName:o}=e(hi.store),a=t();if(o(a)==="core/widget-area")return a;let{getParentWidgetAreaBlock:i}=e(c),l=i(a)?.clientId;if(l)return l;let{getEntityRecord:d}=e(wi.store);return d(x,j,Se())?.blocks[0]?.clientId},[]),bi=Yl;var dr=!1;var Oe=r(f(),1),{ExperimentalBlockEditorProvider:$l}=$(ki.privateApis),{PatternsMenuItems:ql}=$(Ai.privateApis),{BlockKeyboardShortcuts:Zl}=$(xi.privateApis),Ql=[];function Ii({blockEditorSettings:e,children:t,...o}){let a=(0,_i.useViewportMatch)("medium"),{hasUploadPermissions:i,reusableBlocks:s,isFixedToolbarActive:l,keepCaretInsideBlock:d,pageOnFront:n,pageForPosts:m}=(0,lr.useSelect)(u=>{let{canUser:v,getEntityRecord:O,getEntityRecords:H}=u(nr.store),X=v("read",{kind:"root",name:"site"})?O("root","site"):void 0;return{hasUploadPermissions:v("create",{kind:"postType",name:"attachment"})??!0,reusableBlocks:dr?H("postType","wp_block"):Ql,isFixedToolbarActive:!!u(_o.store).get("core/edit-widgets","fixedToolbar"),keepCaretInsideBlock:!!u(_o.store).get("core/edit-widgets","keepCaretInsideBlock"),pageOnFront:X?.page_on_front,pageForPosts:X?.page_for_posts}},[]),{setIsInserterOpened:b}=(0,lr.useDispatch)(c),p=(0,Si.useMemo)(()=>{let u;return i&&(u=({onError:v,...O})=>{(0,yi.uploadMedia)({wpAllowedMimeTypes:e.allowedMimeTypes,onError:({message:H})=>v(H),...O})}),{...e,__experimentalReusableBlocks:s,hasFixedToolbar:l||!a,keepCaretInsideBlock:d,mediaUpload:u,templateLock:"all",__experimentalSetIsInserterOpened:b,pageOnFront:n,pageForPosts:m,editorTool:"edit"}},[i,e,l,a,d,s,b,n,m]),h=bi(),[E,D,M]=(0,nr.useEntityBlockEditor)(x,j,{id:Se()});return(0,Oe.jsxs)(vi.SlotFillProvider,{children:[(0,Oe.jsx)(sr.Register,{}),(0,Oe.jsx)(Zl,{}),(0,Oe.jsxs)($l,{value:E,onInput:D,onChange:M,settings:p,useSubRegistry:!1,...o,children:[t,(0,Oe.jsx)(ql,{rootClientId:h})]})]})}var xe=r(y(),1),Ae=r(A(),1);var mr=r(L(),1);var Oi=r(k(),1),ut=r(w(),1);var Li=r(w(),1),Bi=r(y(),1);var Ni=r(L(),1),Ri=r(k(),1),mt=r(A(),1),Pi=r(Ci(),1),Di=r(Wi(),1);var pe=r(f(),1);function Mi({selectedWidgetAreaId:e}){let t=(0,Li.useSelect)(i=>i(c).getWidgetAreas(),[]),o=(0,Bi.useMemo)(()=>e&&t?.find(i=>i.id===e),[e,t]),a;return o?e==="wp_inactive_widgets"?a=(0,mt.__)("Blocks in this Widget Area will not be displayed in your site."):a=o.description:a=(0,mt.__)("Widget Areas are global parts in your site\u2019s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer."),(0,pe.jsx)("div",{className:"edit-widgets-widget-areas",children:(0,pe.jsxs)("div",{className:"edit-widgets-widget-areas__top-container",children:[(0,pe.jsx)(Ni.BlockIcon,{icon:Pr}),(0,pe.jsxs)("div",{children:[(0,pe.jsx)("p",{dangerouslySetInnerHTML:{__html:(0,Di.safeHTML)(a)}}),t?.length===0&&(0,pe.jsx)("p",{children:(0,mt.__)("Your theme does not contain any Widget Areas.")}),!o&&(0,pe.jsx)(Ri.Button,{__next40pxDefaultSize:!0,href:(0,Pi.addQueryArgs)("customize.php",{"autofocus[panel]":"widgets",return:window.location.pathname}),variant:"tertiary",children:(0,mt.__)("Manage with live preview")})]})]})})}var R=r(f(),1),Xl=xe.Platform.select({web:!0,native:!1}),ft="edit-widgets/block-inspector",ct="edit-widgets/block-areas",{Tabs:ge}=$(Oi.privateApis);function Jl({selectedWidgetAreaBlock:e}){return(0,R.jsxs)(ge.TabList,{children:[(0,R.jsx)(ge.Tab,{tabId:ct,children:e?e.attributes.name:(0,Ae.__)("Widget Areas")}),(0,R.jsx)(ge.Tab,{tabId:ft,children:(0,Ae.__)("Block")})]})}function en({hasSelectedNonAreaBlock:e,currentArea:t,isGeneralSidebarOpen:o,selectedWidgetAreaBlock:a}){let{enableComplementaryArea:i}=(0,ut.useDispatch)(B);(0,xe.useEffect)(()=>{e&&t===ct&&o&&i("core/edit-widgets",ft),!e&&t===ft&&o&&i("core/edit-widgets",ct)},[e,i]);let s=(0,xe.useContext)(ge.Context);return(0,R.jsx)(at,{className:"edit-widgets-sidebar",header:(0,R.jsx)(ge.Context.Provider,{value:s,children:(0,R.jsx)(Jl,{selectedWidgetAreaBlock:a})}),headerClassName:"edit-widgets-sidebar__panel-tabs",title:(0,Ae.__)("Settings"),closeLabel:(0,Ae.__)("Close Settings"),scope:"core/edit-widgets",identifier:t,icon:(0,Ae.isRTL)()?Vr:jr,isActiveByDefault:Xl,children:(0,R.jsxs)(ge.Context.Provider,{value:s,children:[(0,R.jsx)(ge.TabPanel,{tabId:ct,focusable:!1,children:(0,R.jsx)(Mi,{selectedWidgetAreaId:a?.attributes.id})}),(0,R.jsx)(ge.TabPanel,{tabId:ft,focusable:!1,children:e?(0,R.jsx)(mr.BlockInspector,{}):(0,R.jsx)("span",{className:"block-editor-block-inspector__no-blocks",children:(0,Ae.__)("No block selected.")})})]})})}function Vi(){let{currentArea:e,hasSelectedNonAreaBlock:t,isGeneralSidebarOpen:o,selectedWidgetAreaBlock:a}=(0,ut.useSelect)(l=>{let{getSelectedBlock:d,getBlock:n,getBlockParentsByBlockName:m}=l(mr.store),{getActiveComplementaryArea:b}=l(B),p=d(),h=b(c.name),E=h;E||(p?E=ft:E=ct);let D;return p&&(p.name==="core/widget-area"?D=p:D=n(m(p.clientId,"core/widget-area")[0])),{currentArea:E,hasSelectedNonAreaBlock:!!(p&&p.name!=="core/widget-area"),isGeneralSidebarOpen:!!h,selectedWidgetAreaBlock:D}},[]),{enableComplementaryArea:i}=(0,ut.useDispatch)(B),s=(0,xe.useCallback)(l=>{l&&i(c.name,l)},[i]);return(0,R.jsx)(ge,{selectedTabId:o?e:null,onSelect:s,selectOnMove:!1,children:(0,R.jsx)(en,{hasSelectedNonAreaBlock:t,currentArea:e,isGeneralSidebarOpen:o,selectedWidgetAreaBlock:a})})}var Wo=r(z(),1),Us=r(L(),1),Lo=r(y(),1),Er=r(w(),1);var Ce=r(A(),1),Ks=r(J(),1);var _s=r(L(),1),ys=r(w(),1),Ss=r(y(),1),Io=r(A(),1),yr=r(k(),1);var ks=r(z(),1),As=r(J(),1);var gr=r(w(),1),gt=r(A(),1),Ie=r(k(),1),qi=r(L(),1);var ko=r(y(),1),Zi=r(z(),1);var fr=r(A(),1),Fi=r(k(),1),cr=r(w(),1);var ji=r(De(),1),yo=r(G(),1),Gi=r(y(),1),zi=r(f(),1);function tn(e,t){let o=(0,cr.useSelect)(i=>i(yo.store).hasUndo(),[]),{undo:a}=(0,cr.useDispatch)(yo.store);return(0,zi.jsx)(Fi.Button,{...e,ref:t,icon:(0,fr.isRTL)()?Qe:Xe,label:(0,fr.__)("Undo"),shortcut:ji.displayShortcut.primary("z"),"aria-disabled":!o,onClick:o?a:void 0,size:"compact"})}var Hi=(0,Gi.forwardRef)(tn);var ur=r(A(),1),Ui=r(k(),1),pr=r(w(),1);var pt=r(De(),1),So=r(G(),1),Ki=r(y(),1),Yi=r(f(),1);function rn(e,t){let o=(0,pt.isAppleOS)()?pt.displayShortcut.primaryShift("z"):pt.displayShortcut.primary("y"),a=(0,pr.useSelect)(s=>s(So.store).hasRedo(),[]),{redo:i}=(0,pr.useDispatch)(So.store);return(0,Yi.jsx)(Ui.Button,{...e,ref:t,icon:(0,ur.isRTL)()?Xe:Qe,label:(0,ur.__)("Redo"),shortcut:o,"aria-disabled":!a,onClick:a?i:void 0,size:"compact"})}var $i=(0,Ki.forwardRef)(rn);var me=r(f(),1);function on(){let e=(0,Zi.useViewportMatch)("medium"),{isInserterOpen:t,isListViewOpen:o,inserterSidebarToggleRef:a,listViewToggleRef:i}=(0,gr.useSelect)(m=>{let{isInserterOpened:b,getInserterSidebarToggleRef:p,isListViewOpened:h,getListViewToggleRef:E}=$(m(c));return{isInserterOpen:b(),isListViewOpen:h(),inserterSidebarToggleRef:p(),listViewToggleRef:E()}},[]),{setIsInserterOpened:s,setIsListViewOpened:l}=(0,gr.useDispatch)(c),d=(0,ko.useCallback)(()=>l(!o),[l,o]),n=(0,ko.useCallback)(()=>s(!t),[s,t]);return(0,me.jsxs)(qi.NavigableToolbar,{className:"edit-widgets-header-toolbar","aria-label":(0,gt.__)("Document tools"),variant:"unstyled",children:[(0,me.jsx)(Ie.ToolbarItem,{ref:a,as:Ie.Button,className:"edit-widgets-header-toolbar__inserter-toggle",variant:"primary",isPressed:t,onMouseDown:m=>{m.preventDefault()},onClick:n,icon:qr,label:(0,gt._x)("Block Inserter","Generic label for block inserter button"),size:"compact"}),e&&(0,me.jsxs)(me.Fragment,{children:[(0,me.jsx)(Ie.ToolbarItem,{as:Hi}),(0,me.jsx)(Ie.ToolbarItem,{as:$i}),(0,me.jsx)(Ie.ToolbarItem,{as:Ie.Button,className:"edit-widgets-header-toolbar__list-view-toggle",icon:Ur,isPressed:o,label:(0,gt.__)("List View"),onClick:d,ref:i,size:"compact"})]})]})}var Qi=on;var Xi=r(k(),1),Ao=r(A(),1),hr=r(w(),1);var Ji=r(f(),1);function an(){let{hasEditedWidgetAreaIds:e,isSaving:t,isWidgetSaveLocked:o}=(0,hr.useSelect)(s=>{let{getEditedWidgetAreas:l,isSavingWidgetAreas:d,isWidgetSavingLocked:n}=s(c);return{hasEditedWidgetAreaIds:l()?.length>0,isSaving:d(),isWidgetSaveLocked:n()}},[]),{saveEditedWidgetAreas:a}=(0,hr.useDispatch)(c),i=o||t||!e;return(0,Ji.jsx)(Xi.Button,{variant:"primary",isBusy:t,"aria-disabled":i,onClick:i?void 0:a,size:"compact",children:t?(0,Ao.__)("Saving\u2026"):(0,Ao.__)("Update")})}var es=an;var re=r(k(),1),gs=r(y(),1),S=r(A(),1);var Ke=r(J(),1),hs=r(De(),1),ws=r(nt(),1),bs=r(z(),1);var ls=r(k(),1),he=r(A(),1),_r=r(nt(),1),ns=r(w(),1);var q=r(A(),1),ts=[{keyCombination:{modifier:"primary",character:"b"},description:(0,q.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:(0,q.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:(0,q.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:(0,q.__)("Remove a link.")},{keyCombination:{character:"[["},description:(0,q.__)("Insert a link to a post or page.")},{keyCombination:{modifier:"primary",character:"u"},description:(0,q.__)("Underline the selected text.")},{keyCombination:{modifier:"access",character:"d"},description:(0,q.__)("Strikethrough the selected text.")},{keyCombination:{modifier:"access",character:"x"},description:(0,q.__)("Make the selected text inline code.")},{keyCombination:{modifier:"access",character:"0"},aliases:[{modifier:"access",character:"7"}],description:(0,q.__)("Convert the current heading to a paragraph.")},{keyCombination:{modifier:"access",character:"1-6"},description:(0,q.__)("Convert the current paragraph or heading to a heading of level 1 to 6.")},{keyCombination:{modifier:"primaryShift",character:"SPACE"},description:(0,q.__)("Add non breaking space.")}];var os=r(y(),1),wr=r(De(),1),Z=r(f(),1);function rs({keyCombination:e,forceAriaLabel:t}){let o=e.modifier?wr.displayShortcutList[e.modifier](e.character):e.character,a=e.modifier?wr.shortcutAriaLabel[e.modifier](e.character):e.character,i=Array.isArray(o)?o:[o];return(0,Z.jsx)("kbd",{className:"edit-widgets-keyboard-shortcut-help-modal__shortcut-key-combination","aria-label":t||a,children:i.map((s,l)=>s==="+"?(0,Z.jsx)(os.Fragment,{children:s},l):(0,Z.jsx)("kbd",{className:"edit-widgets-keyboard-shortcut-help-modal__shortcut-key",children:s},l))})}function sn({description:e,keyCombination:t,aliases:o=[],ariaLabel:a}){return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("div",{className:"edit-widgets-keyboard-shortcut-help-modal__shortcut-description",children:e}),(0,Z.jsxs)("div",{className:"edit-widgets-keyboard-shortcut-help-modal__shortcut-term",children:[(0,Z.jsx)(rs,{keyCombination:t,forceAriaLabel:a}),o.map((i,s)=>(0,Z.jsx)(rs,{keyCombination:i,forceAriaLabel:a},s))]})]})}var br=sn;var as=r(w(),1),is=r(nt(),1);var ss=r(f(),1);function dn({name:e}){let{keyCombination:t,description:o,aliases:a}=(0,as.useSelect)(i=>{let{getShortcutKeyCombination:s,getShortcutDescription:l,getShortcutAliases:d}=i(is.store);return{keyCombination:s(e),aliases:d(e),description:l(e)}},[e]);return t?(0,ss.jsx)(br,{keyCombination:t,description:o,aliases:a}):null}var ds=dn;var N=r(f(),1),ln=({shortcuts:e})=>(0,N.jsx)("ul",{className:"edit-widgets-keyboard-shortcut-help-modal__shortcut-list",role:"list",children:e.map((t,o)=>(0,N.jsx)("li",{className:"edit-widgets-keyboard-shortcut-help-modal__shortcut",children:typeof t=="string"?(0,N.jsx)(ds,{name:t}):(0,N.jsx)(br,{...t})},o))}),xo=({title:e,shortcuts:t,className:o})=>(0,N.jsxs)("section",{className:V("edit-widgets-keyboard-shortcut-help-modal__section",o),children:[!!e&&(0,N.jsx)("h2",{className:"edit-widgets-keyboard-shortcut-help-modal__section-title",children:e}),(0,N.jsx)(ln,{shortcuts:t})]}),vr=({title:e,categoryName:t,additionalShortcuts:o=[]})=>{let a=(0,ns.useSelect)(i=>i(_r.store).getCategoryShortcuts(t),[t]);return(0,N.jsx)(xo,{title:e,shortcuts:a.concat(o)})};function ms({isModalActive:e,toggleModal:t}){return(0,_r.useShortcut)("core/edit-widgets/keyboard-shortcuts",t,{bindGlobal:!0}),e?(0,N.jsxs)(ls.Modal,{className:"edit-widgets-keyboard-shortcut-help-modal",title:(0,he.__)("Keyboard shortcuts"),onRequestClose:t,children:[(0,N.jsx)(xo,{className:"edit-widgets-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/edit-widgets/keyboard-shortcuts"]}),(0,N.jsx)(vr,{title:(0,he.__)("Global shortcuts"),categoryName:"global"}),(0,N.jsx)(vr,{title:(0,he.__)("Selection shortcuts"),categoryName:"selection"}),(0,N.jsx)(vr,{title:(0,he.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:(0,he.__)("Change the block type after adding a new paragraph."),ariaLabel:(0,he.__)("Forward-slash")}]}),(0,N.jsx)(xo,{title:(0,he.__)("Text formatting"),shortcuts:ts}),(0,N.jsx)(vr,{title:(0,he.__)("List View shortcuts"),categoryName:"list-view"})]}):null}var fs=r(k(),1),cs=r(f(),1),{Fill:us,Slot:nn}=(0,fs.createSlotFill)("EditWidgetsToolsMoreMenuGroup");us.Slot=({fillProps:e})=>(0,cs.jsx)(nn,{fillProps:e,children:t=>t.length>0&&t});var ps=us;var I=r(f(),1);function vs(){let[e,t]=(0,gs.useState)(!1),o=()=>t(!e);(0,ws.useShortcut)("core/edit-widgets/keyboard-shortcuts",o);let a=(0,bs.useViewportMatch)("medium");return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(re.DropdownMenu,{icon:Yr,label:(0,S.__)("Options"),popoverProps:{placement:"bottom-end",className:"more-menu-dropdown__content"},toggleProps:{tooltipPosition:"bottom",size:"compact"},children:i=>(0,I.jsxs)(I.Fragment,{children:[a&&(0,I.jsx)(re.MenuGroup,{label:(0,S._x)("View","noun"),children:(0,I.jsx)(Ke.PreferenceToggleMenuItem,{scope:"core/edit-widgets",name:"fixedToolbar",label:(0,S.__)("Top toolbar"),info:(0,S.__)("Access all block and document tools in a single place"),messageActivated:(0,S.__)("Top toolbar activated"),messageDeactivated:(0,S.__)("Top toolbar deactivated")})}),(0,I.jsxs)(re.MenuGroup,{label:(0,S.__)("Tools"),children:[(0,I.jsx)(re.MenuItem,{onClick:()=>{t(!0)},shortcut:hs.displayShortcut.access("h"),children:(0,S.__)("Keyboard shortcuts")}),(0,I.jsx)(Ke.PreferenceToggleMenuItem,{scope:"core/edit-widgets",name:"welcomeGuide",label:(0,S.__)("Welcome Guide")}),(0,I.jsxs)(re.MenuItem,{role:"menuitem",icon:zr,href:(0,S.__)("https://wordpress.org/documentation/article/block-based-widgets-editor/"),target:"_blank",rel:"noopener noreferrer",children:[(0,S.__)("Help"),(0,I.jsx)(re.VisuallyHidden,{as:"span",children:(0,S.__)("(opens in a new tab)")})]}),(0,I.jsx)(ps.Slot,{fillProps:{onClose:i}})]}),(0,I.jsxs)(re.MenuGroup,{label:(0,S.__)("Preferences"),children:[(0,I.jsx)(Ke.PreferenceToggleMenuItem,{scope:"core/edit-widgets",name:"keepCaretInsideBlock",label:(0,S.__)("Contain text cursor inside block"),info:(0,S.__)("Aids screen readers by stopping text caret from leaving blocks."),messageActivated:(0,S.__)("Contain text cursor inside block activated"),messageDeactivated:(0,S.__)("Contain text cursor inside block deactivated")}),(0,I.jsx)(Ke.PreferenceToggleMenuItem,{scope:"core/edit-widgets",name:"themeStyles",info:(0,S.__)("Make the editor look like your theme."),label:(0,S.__)("Use theme styles")}),a&&(0,I.jsx)(Ke.PreferenceToggleMenuItem,{scope:"core/edit-widgets",name:"showBlockBreadcrumbs",label:(0,S.__)("Display block breadcrumbs"),info:(0,S.__)("Shows block breadcrumbs at the bottom of the editor."),messageActivated:(0,S.__)("Display block breadcrumbs activated"),messageDeactivated:(0,S.__)("Display block breadcrumbs deactivated")})]})]})}),(0,I.jsx)(ms,{isModalActive:e,toggleModal:o})]})}var W=r(f(),1);function mn(){let e=(0,ks.useViewportMatch)("medium"),t=(0,Ss.useRef)(),{hasFixedToolbar:o}=(0,ys.useSelect)(a=>({hasFixedToolbar:!!a(As.store).get("core/edit-widgets","fixedToolbar")}),[]);return(0,W.jsx)(W.Fragment,{children:(0,W.jsxs)("div",{className:"edit-widgets-header",children:[(0,W.jsxs)("div",{className:"edit-widgets-header__navigable-toolbar-wrapper",children:[e&&(0,W.jsx)("h1",{className:"edit-widgets-header__title",children:(0,Io.__)("Widgets")}),!e&&(0,W.jsx)(yr.VisuallyHidden,{as:"h1",className:"edit-widgets-header__title",children:(0,Io.__)("Widgets")}),(0,W.jsx)(Qi,{}),o&&e&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)("div",{className:"selected-block-tools-wrapper",children:(0,W.jsx)(_s.BlockToolbar,{hideDragHandle:!0})}),(0,W.jsx)(yr.Popover.Slot,{ref:t,name:"block-toolbar"})]})]}),(0,W.jsxs)("div",{className:"edit-widgets-header__actions",children:[(0,W.jsx)(rt.Slot,{scope:"core/edit-widgets"}),(0,W.jsx)(es,{}),(0,W.jsx)(vs,{})]})]})})}var xs=mn;var Q=r(L(),1),Es=r(z(),1),Cs=r(w(),1),Ts=r(y(),1),Ws=r(J(),1);var Sr=r(At(),1),Ve=r(f(),1);function fn(){return(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)(Sr.InlineNotices,{pinnedNoticesClassName:"edit-widgets-notices__pinned",dismissibleNoticesClassName:"edit-widgets-notices__dismissible"}),(0,Ve.jsx)(Sr.SnackbarNotices,{className:"edit-widgets-notices__snackbar"})]})}var Is=fn;var oe=r(f(),1);function Ls({blockEditorSettings:e}){let t=(0,Cs.useSelect)(i=>!!i(Ws.store).get("core/edit-widgets","themeStyles"),[]),o=(0,Es.useViewportMatch)("medium"),a=(0,Ts.useMemo)(()=>t?e.styles:[],[e,t]);return(0,oe.jsxs)("div",{className:"edit-widgets-block-editor",children:[(0,oe.jsx)(Is,{}),!o&&(0,oe.jsx)(Q.BlockToolbar,{hideDragHandle:!0}),(0,oe.jsxs)(Q.BlockTools,{children:[(0,oe.jsx)(sr,{}),(0,oe.jsx)(Q.__unstableEditorStyles,{styles:a,scope:":where(.editor-styles-wrapper)"}),(0,oe.jsx)(Q.BlockSelectionClearer,{children:(0,oe.jsx)(Q.WritingFlow,{children:(0,oe.jsx)(Q.BlockList,{className:"edit-widgets-main-block-list"})})})]})]})}var zs=r(w(),1);var Ps=r(L(),1),Ds=r(z(),1),Ar=r(y(),1),Ms=r(w(),1);var Eo=r(w(),1),Bs=r(L(),1),Ns=r(G(),1);var cn=()=>{let e=(0,Eo.useSelect)(t=>{let{getEntityRecord:o}=t(Ns.store);return o(x,j,Se())?.blocks[0]?.clientId},[]);return(0,Eo.useSelect)(t=>{let{getBlockRootClientId:o,getBlockSelectionEnd:a,getBlockOrder:i,getBlockIndex:s}=t(Bs.store),l=t(c).__experimentalGetInsertionPoint();if(l.rootClientId)return l;let d=a()||e,n=o(d);return d&&n===""?{rootClientId:d,insertionIndex:i(d).length}:{rootClientId:n,insertionIndex:s(d)+1}},[e])},Rs=cn;var kr=r(f(),1);function Os(){let e=(0,Ds.useViewportMatch)("medium","<"),{rootClientId:t,insertionIndex:o}=Rs(),{setIsInserterOpened:a}=(0,Ms.useDispatch)(c),i=(0,Ar.useCallback)(()=>a(!1),[a]),s=(0,Ar.useRef)();return(0,kr.jsx)("div",{className:"edit-widgets-layout__inserter-panel",children:(0,kr.jsx)("div",{className:"edit-widgets-layout__inserter-panel-content",children:(0,kr.jsx)(Ps.__experimentalLibrary,{showInserterHelpPanel:!0,shouldFocusBlock:e,rootClientId:t,__experimentalInsertionIndex:o,ref:s,onClose:i})})})}var Vs=r(L(),1),Fs=r(k(),1),xr=r(z(),1),Ir=r(w(),1),ht=r(y(),1),Co=r(A(),1);var js=r(De(),1);var Ee=r(f(),1);function Gs(){let{setIsListViewOpened:e}=(0,Ir.useDispatch)(c),{getListViewToggleRef:t}=$((0,Ir.useSelect)(c)),[o,a]=(0,ht.useState)(null),i=(0,xr.useFocusOnMount)("firstElement"),s=(0,ht.useCallback)(()=>{e(!1),t().current?.focus()},[t,e]),l=(0,ht.useCallback)(d=>{d.keyCode===js.ESCAPE&&!d.defaultPrevented&&(d.preventDefault(),s())},[s]);return(0,Ee.jsxs)("div",{className:"edit-widgets-editor__list-view-panel",onKeyDown:l,children:[(0,Ee.jsxs)("div",{className:"edit-widgets-editor__list-view-panel-header",children:[(0,Ee.jsx)("strong",{children:(0,Co.__)("List View")}),(0,Ee.jsx)(Fs.Button,{icon:Ze,label:(0,Co.__)("Close"),onClick:s,size:"compact"})]}),(0,Ee.jsx)("div",{className:"edit-widgets-editor__list-view-panel-content",ref:(0,xr.useMergeRefs)([i,a]),children:(0,Ee.jsx)(Vs.__experimentalListView,{dropZoneElement:o})})]})}var To=r(f(),1);function Hs(){let{isInserterOpen:e,isListViewOpen:t}=(0,zs.useSelect)(o=>{let{isInserterOpened:a,isListViewOpened:i}=o(c);return{isInserterOpen:a(),isListViewOpen:i()}},[]);return e?(0,To.jsx)(Os,{}):t?(0,To.jsx)(Gs,{}):null}var ae=r(f(),1),un={header:(0,Ce.__)("Widgets top bar"),body:(0,Ce.__)("Widgets and blocks"),sidebar:(0,Ce.__)("Widgets settings"),footer:(0,Ce.__)("Widgets footer")};function pn({blockEditorSettings:e}){let t=(0,Wo.useViewportMatch)("medium","<"),o=(0,Wo.useViewportMatch)("huge",">="),{setIsInserterOpened:a,setIsListViewOpened:i,closeGeneralSidebar:s}=(0,Er.useDispatch)(c),{hasBlockBreadCrumbsEnabled:l,hasSidebarEnabled:d,isInserterOpened:n,isListViewOpened:m}=(0,Er.useSelect)(h=>({hasSidebarEnabled:!!h(B).getActiveComplementaryArea(c.name),isInserterOpened:!!h(c).isInserterOpened(),isListViewOpened:!!h(c).isListViewOpened(),hasBlockBreadCrumbsEnabled:!!h(Ks.store).get("core/edit-widgets","showBlockBreadcrumbs")}),[]);(0,Lo.useEffect)(()=>{d&&!o&&(a(!1),i(!1))},[d,o]),(0,Lo.useEffect)(()=>{(n||m)&&!o&&s()},[n,m,o]);let b=m?(0,Ce.__)("List View"):(0,Ce.__)("Block Library"),p=m||n;return(0,ae.jsx)(io,{labels:{...un,secondarySidebar:b},header:(0,ae.jsx)(xs,{}),secondarySidebar:p&&(0,ae.jsx)(Hs,{}),sidebar:(0,ae.jsx)(at.Slot,{scope:"core/edit-widgets"}),content:(0,ae.jsx)(ae.Fragment,{children:(0,ae.jsx)(Ls,{blockEditorSettings:e})}),footer:l&&!t&&(0,ae.jsx)("div",{className:"edit-widgets-layout__footer",children:(0,ae.jsx)(Us.BlockBreadcrumb,{rootLabelText:(0,Ce.__)("Widgets")})})})}var Ys=pn;var $s=r(A(),1),qs=r(y(),1),Zs=r(w(),1);function Qs(){let e=(0,Zs.useSelect)(t=>{let{getEditedWidgetAreas:o}=t(c);return o()?.length>0},[]);return(0,qs.useEffect)(()=>{let t=o=>{if(e)return o.returnValue=(0,$s.__)("You have unsaved changes. If you proceed, they will be lost."),o.returnValue};return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)}},[e]),null}var wt=r(w(),1),bt=r(k(),1),T=r(A(),1),Bo=r(y(),1),No=r(J(),1);var g=r(f(),1);function Xs(){let e=(0,wt.useSelect)(s=>!!s(No.store).get("core/edit-widgets","welcomeGuide"),[]),{toggle:t}=(0,wt.useDispatch)(No.store),o=(0,wt.useSelect)(s=>s(c).getWidgetAreas({per_page:-1}),[]);if(!e)return null;let a=o?.every(s=>s.id==="wp_inactive_widgets"||s.widgets.every(l=>l.startsWith("block-"))),i=o?.filter(s=>s.id!=="wp_inactive_widgets").length??0;return(0,g.jsx)(bt.Guide,{className:"edit-widgets-welcome-guide",contentLabel:(0,T.__)("Welcome to block Widgets"),finishButtonText:(0,T.__)("Get started"),onFinish:()=>t("core/edit-widgets","welcomeGuide"),pages:[{image:(0,g.jsx)(Cr,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-canvas.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-canvas.gif"}),content:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h1",{className:"edit-widgets-welcome-guide__heading",children:(0,T.__)("Welcome to block Widgets")}),a?(0,g.jsx)(g.Fragment,{children:(0,g.jsx)("p",{className:"edit-widgets-welcome-guide__text",children:(0,T.sprintf)((0,T._n)("Your theme provides %s \u201Cblock\u201D area for you to add and edit content.\xA0Try adding a search bar, social icons, or other types of blocks here and see how they\u2019ll look on your site.","Your theme provides %s different \u201Cblock\u201D areas for you to add and edit content.\xA0Try adding a search bar, social icons, or other types of blocks here and see how they\u2019ll look on your site.",i),i)})}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("p",{className:"edit-widgets-welcome-guide__text",children:(0,T.__)("You can now add any block to your site\u2019s widget areas. Don\u2019t worry, all of your favorite widgets still work flawlessly.")}),(0,g.jsxs)("p",{className:"edit-widgets-welcome-guide__text",children:[(0,g.jsx)("strong",{children:(0,T.__)("Want to stick with the old widgets?")})," ",(0,g.jsx)(bt.ExternalLink,{href:(0,T.__)("https://wordpress.org/plugins/classic-widgets/"),children:(0,T.__)("Get the Classic Widgets plugin.")})]})]})]})},{image:(0,g.jsx)(Cr,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-editor.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-editor.gif"}),content:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h1",{className:"edit-widgets-welcome-guide__heading",children:(0,T.__)("Customize each block")}),(0,g.jsx)("p",{className:"edit-widgets-welcome-guide__text",children:(0,T.__)("Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.")})]})},{image:(0,g.jsx)(Cr,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-library.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-library.gif"}),content:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h1",{className:"edit-widgets-welcome-guide__heading",children:(0,T.__)("Explore all blocks")}),(0,g.jsx)("p",{className:"edit-widgets-welcome-guide__text",children:(0,Bo.createInterpolateElement)((0,T.__)("All of the blocks available to you live in the block library. You\u2019ll find it wherever you see the <InserterIconImage /> icon."),{InserterIconImage:(0,g.jsx)("img",{className:"edit-widgets-welcome-guide__inserter-icon",alt:(0,T.__)("inserter"),src:"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A"})})})]})},{image:(0,g.jsx)(Cr,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h1",{className:"edit-widgets-welcome-guide__heading",children:(0,T.__)("Learn more")}),(0,g.jsx)("p",{className:"edit-widgets-welcome-guide__text",children:(0,Bo.createInterpolateElement)((0,T.__)("New to the block editor? Want to learn more about using it? <a>Here's a detailed guide.</a>"),{a:(0,g.jsx)(bt.ExternalLink,{href:(0,T.__)("https://wordpress.org/documentation/article/wordpress-block-editor/")})})})]})}]})}function Cr({nonAnimatedSrc:e,animatedSrc:t}){return(0,g.jsxs)("picture",{className:"edit-widgets-welcome-guide__image",children:[(0,g.jsx)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,g.jsx)("img",{src:t,width:"312",height:"240",alt:""})]})}var fe=r(f(),1);function gn({blockEditorSettings:e}){let{createErrorNotice:t}=(0,Js.useDispatch)(td.store);function o(i){t((0,Tr.sprintf)((0,Tr.__)('The "%s" plugin has encountered an error and cannot be rendered.'),i))}let a=(0,rd.__unstableUseNavigateRegions)();return(0,fe.jsx)(si,{children:(0,fe.jsx)("div",{className:a.className,...a,ref:a.ref,children:(0,fe.jsxs)(Ii,{blockEditorSettings:e,children:[(0,fe.jsx)(Ys,{blockEditorSettings:e}),(0,fe.jsx)(Vi,{}),(0,fe.jsx)(ed.PluginArea,{onError:o}),(0,fe.jsx)(Qs,{}),(0,fe.jsx)(Xs,{})]})})})}var od=gn;var Po=r(f(),1),hn=["core/more","core/freeform","core/template-part",...dr?[]:["core/block"]];function dd(e,t){let o=document.getElementById(e),a=(0,Wr.createRoot)(o),i=(0,Lr.__experimentalGetCoreBlocks)().filter(s=>!(hn.includes(s.name)||s.name.startsWith("core/post")||s.name.startsWith("core/query")||s.name.startsWith("core/site")||s.name.startsWith("core/navigation")||s.name.startsWith("core/term")));return(0,Ro.dispatch)(sd.store).setDefaults("core/edit-widgets",{fixedToolbar:!1,welcomeGuide:!0,showBlockBreadcrumbs:!0,themeStyles:!0}),(0,Ro.dispatch)(Te.store).reapplyBlockTypeFilters(),(0,Lr.registerCoreBlocks)(i),(0,Ye.registerLegacyWidgetBlock)(),(0,Ye.registerLegacyWidgetVariations)(t),vn(bo),(0,Ye.registerWidgetGroupBlock)(),t.__experimentalFetchLinkSuggestions=(s,l)=>(0,id.__experimentalFetchLinkSuggestions)(s,l,t),(0,Te.setFreeformContentHandlerName)("core/html"),a.render((0,Po.jsx)(Wr.StrictMode,{children:(0,Po.jsx)(od,{blockEditorSettings:t})})),a}var wn=dd;function bn(){(0,ad.default)("wp.editWidgets.reinitializeEditor",{since:"6.2",version:"6.3"})}var vn=e=>{if(!e)return;let{metadata:t,settings:o,name:a}=e;t&&(0,Te.unstable__bootstrapServerSideBlockDefinitions)({[a]:t}),(0,Te.registerBlockType)(a,o)};return yd(_n);})();
                                                                                                                                                                                   dist/editor.js                                                                                      0000644                 00011766464 15212564012 0007362 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).editor = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __require = /* @__PURE__ */ ((x2) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x2, {
    get: (a3, b3) => (typeof require !== "undefined" ? require : a3)[b3]
  }) : x2)(function(x2) {
    if (typeof require !== "undefined") return require.apply(this, arguments);
    throw Error('Dynamic require of "' + x2 + '" is not supported');
  });
  var __commonJS = (cb, mod) => function __require4() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name2 in all)
      __defProp(target, name2, { get: all[name2], enumerable: true });
  };
  var __copyProps = (to2, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to2, key) && key !== except)
          __defProp(to2, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to2;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/core-data
  var require_core_data = __commonJS({
    "package-external:@wordpress/core-data"(exports, module) {
      module.exports = window.wp.coreData;
    }
  });

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // package-external:@wordpress/hooks
  var require_hooks = __commonJS({
    "package-external:@wordpress/hooks"(exports, module) {
      module.exports = window.wp.hooks;
    }
  });

  // package-external:@wordpress/block-editor
  var require_block_editor = __commonJS({
    "package-external:@wordpress/block-editor"(exports, module) {
      module.exports = window.wp.blockEditor;
    }
  });

  // package-external:@wordpress/blocks
  var require_blocks = __commonJS({
    "package-external:@wordpress/blocks"(exports, module) {
      module.exports = window.wp.blocks;
    }
  });

  // package-external:@wordpress/date
  var require_date = __commonJS({
    "package-external:@wordpress/date"(exports, module) {
      module.exports = window.wp.date;
    }
  });

  // package-external:@wordpress/url
  var require_url = __commonJS({
    "package-external:@wordpress/url"(exports, module) {
      module.exports = window.wp.url;
    }
  });

  // package-external:@wordpress/deprecated
  var require_deprecated = __commonJS({
    "package-external:@wordpress/deprecated"(exports, module) {
      module.exports = window.wp.deprecated;
    }
  });

  // package-external:@wordpress/preferences
  var require_preferences = __commonJS({
    "package-external:@wordpress/preferences"(exports, module) {
      module.exports = window.wp.preferences;
    }
  });

  // package-external:@wordpress/primitives
  var require_primitives = __commonJS({
    "package-external:@wordpress/primitives"(exports, module) {
      module.exports = window.wp.primitives;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // package-external:@wordpress/private-apis
  var require_private_apis = __commonJS({
    "package-external:@wordpress/private-apis"(exports, module) {
      module.exports = window.wp.privateApis;
    }
  });

  // package-external:@wordpress/a11y
  var require_a11y = __commonJS({
    "package-external:@wordpress/a11y"(exports, module) {
      module.exports = window.wp.a11y;
    }
  });

  // package-external:@wordpress/api-fetch
  var require_api_fetch = __commonJS({
    "package-external:@wordpress/api-fetch"(exports, module) {
      module.exports = window.wp.apiFetch;
    }
  });

  // package-external:@wordpress/notices
  var require_notices = __commonJS({
    "package-external:@wordpress/notices"(exports, module) {
      module.exports = window.wp.notices;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // package-external:@wordpress/html-entities
  var require_html_entities = __commonJS({
    "package-external:@wordpress/html-entities"(exports, module) {
      module.exports = window.wp.htmlEntities;
    }
  });

  // node_modules/fast-deep-equal/index.js
  var require_fast_deep_equal = __commonJS({
    "node_modules/fast-deep-equal/index.js"(exports, module) {
      "use strict";
      module.exports = function equal(a3, b3) {
        if (a3 === b3) return true;
        if (a3 && b3 && typeof a3 == "object" && typeof b3 == "object") {
          if (a3.constructor !== b3.constructor) return false;
          var length, i3, keys;
          if (Array.isArray(a3)) {
            length = a3.length;
            if (length != b3.length) return false;
            for (i3 = length; i3-- !== 0; )
              if (!equal(a3[i3], b3[i3])) return false;
            return true;
          }
          if (a3.constructor === RegExp) return a3.source === b3.source && a3.flags === b3.flags;
          if (a3.valueOf !== Object.prototype.valueOf) return a3.valueOf() === b3.valueOf();
          if (a3.toString !== Object.prototype.toString) return a3.toString() === b3.toString();
          keys = Object.keys(a3);
          length = keys.length;
          if (length !== Object.keys(b3).length) return false;
          for (i3 = length; i3-- !== 0; )
            if (!Object.prototype.hasOwnProperty.call(b3, keys[i3])) return false;
          for (i3 = length; i3-- !== 0; ) {
            var key = keys[i3];
            if (!equal(a3[key], b3[key])) return false;
          }
          return true;
        }
        return a3 !== a3 && b3 !== b3;
      };
    }
  });

  // package-external:@wordpress/media-utils
  var require_media_utils = __commonJS({
    "package-external:@wordpress/media-utils"(exports, module) {
      module.exports = window.wp.mediaUtils;
    }
  });

  // package-external:@wordpress/components
  var require_components = __commonJS({
    "package-external:@wordpress/components"(exports, module) {
      module.exports = window.wp.components;
    }
  });

  // package-external:@wordpress/patterns
  var require_patterns = __commonJS({
    "package-external:@wordpress/patterns"(exports, module) {
      module.exports = window.wp.patterns;
    }
  });

  // package-external:@wordpress/blob
  var require_blob = __commonJS({
    "package-external:@wordpress/blob"(exports, module) {
      module.exports = window.wp.blob;
    }
  });

  // vendor-external:react
  var require_react = __commonJS({
    "vendor-external:react"(exports, module) {
      module.exports = window.React;
    }
  });

  // vendor-external:react-dom
  var require_react_dom = __commonJS({
    "vendor-external:react-dom"(exports, module) {
      module.exports = window.ReactDOM;
    }
  });

  // node_modules/remove-accents/index.js
  var require_remove_accents = __commonJS({
    "node_modules/remove-accents/index.js"(exports, module) {
      var characterMap = {
        "\xC0": "A",
        "\xC1": "A",
        "\xC2": "A",
        "\xC3": "A",
        "\xC4": "A",
        "\xC5": "A",
        "\u1EA4": "A",
        "\u1EAE": "A",
        "\u1EB2": "A",
        "\u1EB4": "A",
        "\u1EB6": "A",
        "\xC6": "AE",
        "\u1EA6": "A",
        "\u1EB0": "A",
        "\u0202": "A",
        "\u1EA2": "A",
        "\u1EA0": "A",
        "\u1EA8": "A",
        "\u1EAA": "A",
        "\u1EAC": "A",
        "\xC7": "C",
        "\u1E08": "C",
        "\xC8": "E",
        "\xC9": "E",
        "\xCA": "E",
        "\xCB": "E",
        "\u1EBE": "E",
        "\u1E16": "E",
        "\u1EC0": "E",
        "\u1E14": "E",
        "\u1E1C": "E",
        "\u0206": "E",
        "\u1EBA": "E",
        "\u1EBC": "E",
        "\u1EB8": "E",
        "\u1EC2": "E",
        "\u1EC4": "E",
        "\u1EC6": "E",
        "\xCC": "I",
        "\xCD": "I",
        "\xCE": "I",
        "\xCF": "I",
        "\u1E2E": "I",
        "\u020A": "I",
        "\u1EC8": "I",
        "\u1ECA": "I",
        "\xD0": "D",
        "\xD1": "N",
        "\xD2": "O",
        "\xD3": "O",
        "\xD4": "O",
        "\xD5": "O",
        "\xD6": "O",
        "\xD8": "O",
        "\u1ED0": "O",
        "\u1E4C": "O",
        "\u1E52": "O",
        "\u020E": "O",
        "\u1ECE": "O",
        "\u1ECC": "O",
        "\u1ED4": "O",
        "\u1ED6": "O",
        "\u1ED8": "O",
        "\u1EDC": "O",
        "\u1EDE": "O",
        "\u1EE0": "O",
        "\u1EDA": "O",
        "\u1EE2": "O",
        "\xD9": "U",
        "\xDA": "U",
        "\xDB": "U",
        "\xDC": "U",
        "\u1EE6": "U",
        "\u1EE4": "U",
        "\u1EEC": "U",
        "\u1EEE": "U",
        "\u1EF0": "U",
        "\xDD": "Y",
        "\xE0": "a",
        "\xE1": "a",
        "\xE2": "a",
        "\xE3": "a",
        "\xE4": "a",
        "\xE5": "a",
        "\u1EA5": "a",
        "\u1EAF": "a",
        "\u1EB3": "a",
        "\u1EB5": "a",
        "\u1EB7": "a",
        "\xE6": "ae",
        "\u1EA7": "a",
        "\u1EB1": "a",
        "\u0203": "a",
        "\u1EA3": "a",
        "\u1EA1": "a",
        "\u1EA9": "a",
        "\u1EAB": "a",
        "\u1EAD": "a",
        "\xE7": "c",
        "\u1E09": "c",
        "\xE8": "e",
        "\xE9": "e",
        "\xEA": "e",
        "\xEB": "e",
        "\u1EBF": "e",
        "\u1E17": "e",
        "\u1EC1": "e",
        "\u1E15": "e",
        "\u1E1D": "e",
        "\u0207": "e",
        "\u1EBB": "e",
        "\u1EBD": "e",
        "\u1EB9": "e",
        "\u1EC3": "e",
        "\u1EC5": "e",
        "\u1EC7": "e",
        "\xEC": "i",
        "\xED": "i",
        "\xEE": "i",
        "\xEF": "i",
        "\u1E2F": "i",
        "\u020B": "i",
        "\u1EC9": "i",
        "\u1ECB": "i",
        "\xF0": "d",
        "\xF1": "n",
        "\xF2": "o",
        "\xF3": "o",
        "\xF4": "o",
        "\xF5": "o",
        "\xF6": "o",
        "\xF8": "o",
        "\u1ED1": "o",
        "\u1E4D": "o",
        "\u1E53": "o",
        "\u020F": "o",
        "\u1ECF": "o",
        "\u1ECD": "o",
        "\u1ED5": "o",
        "\u1ED7": "o",
        "\u1ED9": "o",
        "\u1EDD": "o",
        "\u1EDF": "o",
        "\u1EE1": "o",
        "\u1EDB": "o",
        "\u1EE3": "o",
        "\xF9": "u",
        "\xFA": "u",
        "\xFB": "u",
        "\xFC": "u",
        "\u1EE7": "u",
        "\u1EE5": "u",
        "\u1EED": "u",
        "\u1EEF": "u",
        "\u1EF1": "u",
        "\xFD": "y",
        "\xFF": "y",
        "\u0100": "A",
        "\u0101": "a",
        "\u0102": "A",
        "\u0103": "a",
        "\u0104": "A",
        "\u0105": "a",
        "\u0106": "C",
        "\u0107": "c",
        "\u0108": "C",
        "\u0109": "c",
        "\u010A": "C",
        "\u010B": "c",
        "\u010C": "C",
        "\u010D": "c",
        "C\u0306": "C",
        "c\u0306": "c",
        "\u010E": "D",
        "\u010F": "d",
        "\u0110": "D",
        "\u0111": "d",
        "\u0112": "E",
        "\u0113": "e",
        "\u0114": "E",
        "\u0115": "e",
        "\u0116": "E",
        "\u0117": "e",
        "\u0118": "E",
        "\u0119": "e",
        "\u011A": "E",
        "\u011B": "e",
        "\u011C": "G",
        "\u01F4": "G",
        "\u011D": "g",
        "\u01F5": "g",
        "\u011E": "G",
        "\u011F": "g",
        "\u0120": "G",
        "\u0121": "g",
        "\u0122": "G",
        "\u0123": "g",
        "\u0124": "H",
        "\u0125": "h",
        "\u0126": "H",
        "\u0127": "h",
        "\u1E2A": "H",
        "\u1E2B": "h",
        "\u0128": "I",
        "\u0129": "i",
        "\u012A": "I",
        "\u012B": "i",
        "\u012C": "I",
        "\u012D": "i",
        "\u012E": "I",
        "\u012F": "i",
        "\u0130": "I",
        "\u0131": "i",
        "\u0132": "IJ",
        "\u0133": "ij",
        "\u0134": "J",
        "\u0135": "j",
        "\u0136": "K",
        "\u0137": "k",
        "\u1E30": "K",
        "\u1E31": "k",
        "K\u0306": "K",
        "k\u0306": "k",
        "\u0139": "L",
        "\u013A": "l",
        "\u013B": "L",
        "\u013C": "l",
        "\u013D": "L",
        "\u013E": "l",
        "\u013F": "L",
        "\u0140": "l",
        "\u0141": "l",
        "\u0142": "l",
        "\u1E3E": "M",
        "\u1E3F": "m",
        "M\u0306": "M",
        "m\u0306": "m",
        "\u0143": "N",
        "\u0144": "n",
        "\u0145": "N",
        "\u0146": "n",
        "\u0147": "N",
        "\u0148": "n",
        "\u0149": "n",
        "N\u0306": "N",
        "n\u0306": "n",
        "\u014C": "O",
        "\u014D": "o",
        "\u014E": "O",
        "\u014F": "o",
        "\u0150": "O",
        "\u0151": "o",
        "\u0152": "OE",
        "\u0153": "oe",
        "P\u0306": "P",
        "p\u0306": "p",
        "\u0154": "R",
        "\u0155": "r",
        "\u0156": "R",
        "\u0157": "r",
        "\u0158": "R",
        "\u0159": "r",
        "R\u0306": "R",
        "r\u0306": "r",
        "\u0212": "R",
        "\u0213": "r",
        "\u015A": "S",
        "\u015B": "s",
        "\u015C": "S",
        "\u015D": "s",
        "\u015E": "S",
        "\u0218": "S",
        "\u0219": "s",
        "\u015F": "s",
        "\u0160": "S",
        "\u0161": "s",
        "\u0162": "T",
        "\u0163": "t",
        "\u021B": "t",
        "\u021A": "T",
        "\u0164": "T",
        "\u0165": "t",
        "\u0166": "T",
        "\u0167": "t",
        "T\u0306": "T",
        "t\u0306": "t",
        "\u0168": "U",
        "\u0169": "u",
        "\u016A": "U",
        "\u016B": "u",
        "\u016C": "U",
        "\u016D": "u",
        "\u016E": "U",
        "\u016F": "u",
        "\u0170": "U",
        "\u0171": "u",
        "\u0172": "U",
        "\u0173": "u",
        "\u0216": "U",
        "\u0217": "u",
        "V\u0306": "V",
        "v\u0306": "v",
        "\u0174": "W",
        "\u0175": "w",
        "\u1E82": "W",
        "\u1E83": "w",
        "X\u0306": "X",
        "x\u0306": "x",
        "\u0176": "Y",
        "\u0177": "y",
        "\u0178": "Y",
        "Y\u0306": "Y",
        "y\u0306": "y",
        "\u0179": "Z",
        "\u017A": "z",
        "\u017B": "Z",
        "\u017C": "z",
        "\u017D": "Z",
        "\u017E": "z",
        "\u017F": "s",
        "\u0192": "f",
        "\u01A0": "O",
        "\u01A1": "o",
        "\u01AF": "U",
        "\u01B0": "u",
        "\u01CD": "A",
        "\u01CE": "a",
        "\u01CF": "I",
        "\u01D0": "i",
        "\u01D1": "O",
        "\u01D2": "o",
        "\u01D3": "U",
        "\u01D4": "u",
        "\u01D5": "U",
        "\u01D6": "u",
        "\u01D7": "U",
        "\u01D8": "u",
        "\u01D9": "U",
        "\u01DA": "u",
        "\u01DB": "U",
        "\u01DC": "u",
        "\u1EE8": "U",
        "\u1EE9": "u",
        "\u1E78": "U",
        "\u1E79": "u",
        "\u01FA": "A",
        "\u01FB": "a",
        "\u01FC": "AE",
        "\u01FD": "ae",
        "\u01FE": "O",
        "\u01FF": "o",
        "\xDE": "TH",
        "\xFE": "th",
        "\u1E54": "P",
        "\u1E55": "p",
        "\u1E64": "S",
        "\u1E65": "s",
        "X\u0301": "X",
        "x\u0301": "x",
        "\u0403": "\u0413",
        "\u0453": "\u0433",
        "\u040C": "\u041A",
        "\u045C": "\u043A",
        "A\u030B": "A",
        "a\u030B": "a",
        "E\u030B": "E",
        "e\u030B": "e",
        "I\u030B": "I",
        "i\u030B": "i",
        "\u01F8": "N",
        "\u01F9": "n",
        "\u1ED2": "O",
        "\u1ED3": "o",
        "\u1E50": "O",
        "\u1E51": "o",
        "\u1EEA": "U",
        "\u1EEB": "u",
        "\u1E80": "W",
        "\u1E81": "w",
        "\u1EF2": "Y",
        "\u1EF3": "y",
        "\u0200": "A",
        "\u0201": "a",
        "\u0204": "E",
        "\u0205": "e",
        "\u0208": "I",
        "\u0209": "i",
        "\u020C": "O",
        "\u020D": "o",
        "\u0210": "R",
        "\u0211": "r",
        "\u0214": "U",
        "\u0215": "u",
        "B\u030C": "B",
        "b\u030C": "b",
        "\u010C\u0323": "C",
        "\u010D\u0323": "c",
        "\xCA\u030C": "E",
        "\xEA\u030C": "e",
        "F\u030C": "F",
        "f\u030C": "f",
        "\u01E6": "G",
        "\u01E7": "g",
        "\u021E": "H",
        "\u021F": "h",
        "J\u030C": "J",
        "\u01F0": "j",
        "\u01E8": "K",
        "\u01E9": "k",
        "M\u030C": "M",
        "m\u030C": "m",
        "P\u030C": "P",
        "p\u030C": "p",
        "Q\u030C": "Q",
        "q\u030C": "q",
        "\u0158\u0329": "R",
        "\u0159\u0329": "r",
        "\u1E66": "S",
        "\u1E67": "s",
        "V\u030C": "V",
        "v\u030C": "v",
        "W\u030C": "W",
        "w\u030C": "w",
        "X\u030C": "X",
        "x\u030C": "x",
        "Y\u030C": "Y",
        "y\u030C": "y",
        "A\u0327": "A",
        "a\u0327": "a",
        "B\u0327": "B",
        "b\u0327": "b",
        "\u1E10": "D",
        "\u1E11": "d",
        "\u0228": "E",
        "\u0229": "e",
        "\u0190\u0327": "E",
        "\u025B\u0327": "e",
        "\u1E28": "H",
        "\u1E29": "h",
        "I\u0327": "I",
        "i\u0327": "i",
        "\u0197\u0327": "I",
        "\u0268\u0327": "i",
        "M\u0327": "M",
        "m\u0327": "m",
        "O\u0327": "O",
        "o\u0327": "o",
        "Q\u0327": "Q",
        "q\u0327": "q",
        "U\u0327": "U",
        "u\u0327": "u",
        "X\u0327": "X",
        "x\u0327": "x",
        "Z\u0327": "Z",
        "z\u0327": "z",
        "\u0439": "\u0438",
        "\u0419": "\u0418",
        "\u0451": "\u0435",
        "\u0401": "\u0415"
      };
      var chars = Object.keys(characterMap).join("|");
      var allAccents = new RegExp(chars, "g");
      var firstAccent = new RegExp(chars, "");
      function matcher(match3) {
        return characterMap[match3];
      }
      var removeAccents4 = function(string) {
        return string.replace(allAccents, matcher);
      };
      var hasAccents = function(string) {
        return !!string.match(firstAccent);
      };
      module.exports = removeAccents4;
      module.exports.has = hasAccents;
      module.exports.remove = removeAccents4;
    }
  });

  // package-external:@wordpress/style-engine
  var require_style_engine = __commonJS({
    "package-external:@wordpress/style-engine"(exports, module) {
      module.exports = window.wp.styleEngine;
    }
  });

  // node_modules/fast-deep-equal/es6/index.js
  var require_es6 = __commonJS({
    "node_modules/fast-deep-equal/es6/index.js"(exports, module) {
      "use strict";
      module.exports = function equal(a3, b3) {
        if (a3 === b3) return true;
        if (a3 && b3 && typeof a3 == "object" && typeof b3 == "object") {
          if (a3.constructor !== b3.constructor) return false;
          var length, i3, keys;
          if (Array.isArray(a3)) {
            length = a3.length;
            if (length != b3.length) return false;
            for (i3 = length; i3-- !== 0; )
              if (!equal(a3[i3], b3[i3])) return false;
            return true;
          }
          if (a3 instanceof Map && b3 instanceof Map) {
            if (a3.size !== b3.size) return false;
            for (i3 of a3.entries())
              if (!b3.has(i3[0])) return false;
            for (i3 of a3.entries())
              if (!equal(i3[1], b3.get(i3[0]))) return false;
            return true;
          }
          if (a3 instanceof Set && b3 instanceof Set) {
            if (a3.size !== b3.size) return false;
            for (i3 of a3.entries())
              if (!b3.has(i3[0])) return false;
            return true;
          }
          if (ArrayBuffer.isView(a3) && ArrayBuffer.isView(b3)) {
            length = a3.length;
            if (length != b3.length) return false;
            for (i3 = length; i3-- !== 0; )
              if (a3[i3] !== b3[i3]) return false;
            return true;
          }
          if (a3.constructor === RegExp) return a3.source === b3.source && a3.flags === b3.flags;
          if (a3.valueOf !== Object.prototype.valueOf) return a3.valueOf() === b3.valueOf();
          if (a3.toString !== Object.prototype.toString) return a3.toString() === b3.toString();
          keys = Object.keys(a3);
          length = keys.length;
          if (length !== Object.keys(b3).length) return false;
          for (i3 = length; i3-- !== 0; )
            if (!Object.prototype.hasOwnProperty.call(b3, keys[i3])) return false;
          for (i3 = length; i3-- !== 0; ) {
            var key = keys[i3];
            if (!equal(a3[key], b3[key])) return false;
          }
          return true;
        }
        return a3 !== a3 && b3 !== b3;
      };
    }
  });

  // node_modules/deepmerge/dist/cjs.js
  var require_cjs = __commonJS({
    "node_modules/deepmerge/dist/cjs.js"(exports, module) {
      "use strict";
      var isMergeableObject = function isMergeableObject2(value) {
        return isNonNullObject(value) && !isSpecial(value);
      };
      function isNonNullObject(value) {
        return !!value && typeof value === "object";
      }
      function isSpecial(value) {
        var stringValue = Object.prototype.toString.call(value);
        return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
      }
      var canUseSymbol = typeof Symbol === "function" && Symbol.for;
      var REACT_ELEMENT_TYPE = canUseSymbol ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
      function isReactElement(value) {
        return value.$$typeof === REACT_ELEMENT_TYPE;
      }
      function emptyTarget(val) {
        return Array.isArray(val) ? [] : {};
      }
      function cloneUnlessOtherwiseSpecified(value, options) {
        return options.clone !== false && options.isMergeableObject(value) ? deepmerge2(emptyTarget(value), value, options) : value;
      }
      function defaultArrayMerge(target, source, options) {
        return target.concat(source).map(function(element) {
          return cloneUnlessOtherwiseSpecified(element, options);
        });
      }
      function getMergeFunction(key, options) {
        if (!options.customMerge) {
          return deepmerge2;
        }
        var customMerge = options.customMerge(key);
        return typeof customMerge === "function" ? customMerge : deepmerge2;
      }
      function getEnumerableOwnPropertySymbols(target) {
        return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
          return Object.propertyIsEnumerable.call(target, symbol);
        }) : [];
      }
      function getKeys(target) {
        return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
      }
      function propertyIsOnObject(object, property) {
        try {
          return property in object;
        } catch (_) {
          return false;
        }
      }
      function propertyIsUnsafe(target, key) {
        return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
      }
      function mergeObject(target, source, options) {
        var destination = {};
        if (options.isMergeableObject(target)) {
          getKeys(target).forEach(function(key) {
            destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
          });
        }
        getKeys(source).forEach(function(key) {
          if (propertyIsUnsafe(target, key)) {
            return;
          }
          if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
            destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
          } else {
            destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
          }
        });
        return destination;
      }
      function deepmerge2(target, source, options) {
        options = options || {};
        options.arrayMerge = options.arrayMerge || defaultArrayMerge;
        options.isMergeableObject = options.isMergeableObject || isMergeableObject;
        options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
        var sourceIsArray = Array.isArray(source);
        var targetIsArray = Array.isArray(target);
        var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
        if (!sourceAndTargetTypesMatch) {
          return cloneUnlessOtherwiseSpecified(source, options);
        } else if (sourceIsArray) {
          return options.arrayMerge(target, source, options);
        } else {
          return mergeObject(target, source, options);
        }
      }
      deepmerge2.all = function deepmergeAll(array, options) {
        if (!Array.isArray(array)) {
          throw new Error("first argument should be an array");
        }
        return array.reduce(function(prev, next) {
          return deepmerge2(prev, next, options);
        }, {});
      };
      var deepmerge_1 = deepmerge2;
      module.exports = deepmerge_1;
    }
  });

  // node_modules/diff/lib/diff/base.js
  var require_base = __commonJS({
    "node_modules/diff/lib/diff/base.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", {
        value: true
      });
      exports.default = Diff;
      function Diff() {
      }
      Diff.prototype = {
        /*istanbul ignore start*/
        /*istanbul ignore end*/
        diff: function diff(oldString, newString) {
          var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
          var callback = options.callback;
          if (typeof options === "function") {
            callback = options;
            options = {};
          }
          this.options = options;
          var self = this;
          function done(value) {
            if (callback) {
              setTimeout(function() {
                callback(void 0, value);
              }, 0);
              return true;
            } else {
              return value;
            }
          }
          oldString = this.castInput(oldString);
          newString = this.castInput(newString);
          oldString = this.removeEmpty(this.tokenize(oldString));
          newString = this.removeEmpty(this.tokenize(newString));
          var newLen = newString.length, oldLen = oldString.length;
          var editLength = 1;
          var maxEditLength = newLen + oldLen;
          var bestPath = [{
            newPos: -1,
            components: []
          }];
          var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);
          if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {
            return done([{
              value: this.join(newString),
              count: newString.length
            }]);
          }
          function execEditLength() {
            for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {
              var basePath = (
                /*istanbul ignore start*/
                void 0
              );
              var addPath = bestPath[diagonalPath - 1], removePath = bestPath[diagonalPath + 1], _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;
              if (addPath) {
                bestPath[diagonalPath - 1] = void 0;
              }
              var canAdd = addPath && addPath.newPos + 1 < newLen, canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen;
              if (!canAdd && !canRemove) {
                bestPath[diagonalPath] = void 0;
                continue;
              }
              if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {
                basePath = clonePath(removePath);
                self.pushComponent(basePath.components, void 0, true);
              } else {
                basePath = addPath;
                basePath.newPos++;
                self.pushComponent(basePath.components, true, void 0);
              }
              _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath);
              if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) {
                return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken));
              } else {
                bestPath[diagonalPath] = basePath;
              }
            }
            editLength++;
          }
          if (callback) {
            (function exec() {
              setTimeout(function() {
                if (editLength > maxEditLength) {
                  return callback();
                }
                if (!execEditLength()) {
                  exec();
                }
              }, 0);
            })();
          } else {
            while (editLength <= maxEditLength) {
              var ret = execEditLength();
              if (ret) {
                return ret;
              }
            }
          }
        },
        /*istanbul ignore start*/
        /*istanbul ignore end*/
        pushComponent: function pushComponent(components, added, removed) {
          var last = components[components.length - 1];
          if (last && last.added === added && last.removed === removed) {
            components[components.length - 1] = {
              count: last.count + 1,
              added,
              removed
            };
          } else {
            components.push({
              count: 1,
              added,
              removed
            });
          }
        },
        /*istanbul ignore start*/
        /*istanbul ignore end*/
        extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) {
          var newLen = newString.length, oldLen = oldString.length, newPos = basePath.newPos, oldPos = newPos - diagonalPath, commonCount = 0;
          while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {
            newPos++;
            oldPos++;
            commonCount++;
          }
          if (commonCount) {
            basePath.components.push({
              count: commonCount
            });
          }
          basePath.newPos = newPos;
          return oldPos;
        },
        /*istanbul ignore start*/
        /*istanbul ignore end*/
        equals: function equals(left, right) {
          if (this.options.comparator) {
            return this.options.comparator(left, right);
          } else {
            return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase();
          }
        },
        /*istanbul ignore start*/
        /*istanbul ignore end*/
        removeEmpty: function removeEmpty(array) {
          var ret = [];
          for (var i3 = 0; i3 < array.length; i3++) {
            if (array[i3]) {
              ret.push(array[i3]);
            }
          }
          return ret;
        },
        /*istanbul ignore start*/
        /*istanbul ignore end*/
        castInput: function castInput(value) {
          return value;
        },
        /*istanbul ignore start*/
        /*istanbul ignore end*/
        tokenize: function tokenize(value) {
          return value.split("");
        },
        /*istanbul ignore start*/
        /*istanbul ignore end*/
        join: function join(chars) {
          return chars.join("");
        }
      };
      function buildValues(diff, components, newString, oldString, useLongestToken) {
        var componentPos = 0, componentLen = components.length, newPos = 0, oldPos = 0;
        for (; componentPos < componentLen; componentPos++) {
          var component = components[componentPos];
          if (!component.removed) {
            if (!component.added && useLongestToken) {
              var value = newString.slice(newPos, newPos + component.count);
              value = value.map(function(value2, i3) {
                var oldValue = oldString[oldPos + i3];
                return oldValue.length > value2.length ? oldValue : value2;
              });
              component.value = diff.join(value);
            } else {
              component.value = diff.join(newString.slice(newPos, newPos + component.count));
            }
            newPos += component.count;
            if (!component.added) {
              oldPos += component.count;
            }
          } else {
            component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));
            oldPos += component.count;
            if (componentPos && components[componentPos - 1].added) {
              var tmp = components[componentPos - 1];
              components[componentPos - 1] = components[componentPos];
              components[componentPos] = tmp;
            }
          }
        }
        var lastComponent = components[componentLen - 1];
        if (componentLen > 1 && typeof lastComponent.value === "string" && (lastComponent.added || lastComponent.removed) && diff.equals("", lastComponent.value)) {
          components[componentLen - 2].value += lastComponent.value;
          components.pop();
        }
        return components;
      }
      function clonePath(path) {
        return {
          newPos: path.newPos,
          components: path.components.slice(0)
        };
      }
    }
  });

  // node_modules/diff/lib/diff/array.js
  var require_array = __commonJS({
    "node_modules/diff/lib/diff/array.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", {
        value: true
      });
      exports.diffArrays = diffArrays3;
      exports.arrayDiff = void 0;
      var _base = _interopRequireDefault(require_base());
      function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : { default: obj };
      }
      var arrayDiff = new /*istanbul ignore start*/
      _base.default();
      exports.arrayDiff = arrayDiff;
      arrayDiff.tokenize = function(value) {
        return value.slice();
      };
      arrayDiff.join = arrayDiff.removeEmpty = function(value) {
        return value;
      };
      function diffArrays3(oldArr, newArr, callback) {
        return arrayDiff.diff(oldArr, newArr, callback);
      }
    }
  });

  // node_modules/diff/lib/util/params.js
  var require_params = __commonJS({
    "node_modules/diff/lib/util/params.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", {
        value: true
      });
      exports.generateOptions = generateOptions;
      function generateOptions(options, defaults2) {
        if (typeof options === "function") {
          defaults2.callback = options;
        } else if (options) {
          for (var name2 in options) {
            if (options.hasOwnProperty(name2)) {
              defaults2[name2] = options[name2];
            }
          }
        }
        return defaults2;
      }
    }
  });

  // node_modules/diff/lib/diff/word.js
  var require_word = __commonJS({
    "node_modules/diff/lib/diff/word.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", {
        value: true
      });
      exports.diffWords = diffWords3;
      exports.diffWordsWithSpace = diffWordsWithSpace;
      exports.wordDiff = void 0;
      var _base = _interopRequireDefault(require_base());
      var _params = require_params();
      function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : { default: obj };
      }
      var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/;
      var reWhitespace = /\S/;
      var wordDiff = new /*istanbul ignore start*/
      _base.default();
      exports.wordDiff = wordDiff;
      wordDiff.equals = function(left, right) {
        if (this.options.ignoreCase) {
          left = left.toLowerCase();
          right = right.toLowerCase();
        }
        return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right);
      };
      wordDiff.tokenize = function(value) {
        var tokens = value.split(/(\s+|[()[\]{}'"]|\b)/);
        for (var i3 = 0; i3 < tokens.length - 1; i3++) {
          if (!tokens[i3 + 1] && tokens[i3 + 2] && extendedWordChars.test(tokens[i3]) && extendedWordChars.test(tokens[i3 + 2])) {
            tokens[i3] += tokens[i3 + 2];
            tokens.splice(i3 + 1, 2);
            i3--;
          }
        }
        return tokens;
      };
      function diffWords3(oldStr, newStr, options) {
        options = /*istanbul ignore start*/
        (0, /*istanbul ignore end*/
        /*istanbul ignore start*/
        _params.generateOptions)(options, {
          ignoreWhitespace: true
        });
        return wordDiff.diff(oldStr, newStr, options);
      }
      function diffWordsWithSpace(oldStr, newStr, options) {
        return wordDiff.diff(oldStr, newStr, options);
      }
    }
  });

  // package-external:@wordpress/block-serialization-default-parser
  var require_block_serialization_default_parser = __commonJS({
    "package-external:@wordpress/block-serialization-default-parser"(exports, module) {
      module.exports = window.wp.blockSerializationDefaultParser;
    }
  });

  // package-external:@wordpress/rich-text
  var require_rich_text = __commonJS({
    "package-external:@wordpress/rich-text"(exports, module) {
      module.exports = window.wp.richText;
    }
  });

  // package-external:@wordpress/commands
  var require_commands = __commonJS({
    "package-external:@wordpress/commands"(exports, module) {
      module.exports = window.wp.commands;
    }
  });

  // package-external:@wordpress/viewport
  var require_viewport = __commonJS({
    "package-external:@wordpress/viewport"(exports, module) {
      module.exports = window.wp.viewport;
    }
  });

  // package-external:@wordpress/plugins
  var require_plugins = __commonJS({
    "package-external:@wordpress/plugins"(exports, module) {
      module.exports = window.wp.plugins;
    }
  });

  // package-external:@wordpress/upload-media
  var require_upload_media = __commonJS({
    "package-external:@wordpress/upload-media"(exports, module) {
      module.exports = window.wp.uploadMedia;
    }
  });

  // package-external:@wordpress/keyboard-shortcuts
  var require_keyboard_shortcuts = __commonJS({
    "package-external:@wordpress/keyboard-shortcuts"(exports, module) {
      module.exports = window.wp.keyboardShortcuts;
    }
  });

  // package-external:@wordpress/keycodes
  var require_keycodes = __commonJS({
    "package-external:@wordpress/keycodes"(exports, module) {
      module.exports = window.wp.keycodes;
    }
  });

  // package-external:@wordpress/dom
  var require_dom = __commonJS({
    "package-external:@wordpress/dom"(exports, module) {
      module.exports = window.wp.dom;
    }
  });

  // package-external:@wordpress/warning
  var require_warning = __commonJS({
    "package-external:@wordpress/warning"(exports, module) {
      module.exports = window.wp.warning;
    }
  });

  // node_modules/react-is/cjs/react-is.development.js
  var require_react_is_development = __commonJS({
    "node_modules/react-is/cjs/react-is.development.js"(exports) {
      "use strict";
      if (true) {
        (function() {
          "use strict";
          var hasSymbol = typeof Symbol === "function" && Symbol.for;
          var REACT_ELEMENT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
          var REACT_PORTAL_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.portal") : 60106;
          var REACT_FRAGMENT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107;
          var REACT_STRICT_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108;
          var REACT_PROFILER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114;
          var REACT_PROVIDER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.provider") : 60109;
          var REACT_CONTEXT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.context") : 60110;
          var REACT_ASYNC_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111;
          var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111;
          var REACT_FORWARD_REF_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112;
          var REACT_SUSPENSE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113;
          var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120;
          var REACT_MEMO_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.memo") : 60115;
          var REACT_LAZY_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116;
          var REACT_BLOCK_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.block") : 60121;
          var REACT_FUNDAMENTAL_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117;
          var REACT_RESPONDER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.responder") : 60118;
          var REACT_SCOPE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
          function isValidElementType(type) {
            return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
            type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
          }
          function typeOf(object) {
            if (typeof object === "object" && object !== null) {
              var $$typeof = object.$$typeof;
              switch ($$typeof) {
                case REACT_ELEMENT_TYPE:
                  var type = object.type;
                  switch (type) {
                    case REACT_ASYNC_MODE_TYPE:
                    case REACT_CONCURRENT_MODE_TYPE:
                    case REACT_FRAGMENT_TYPE:
                    case REACT_PROFILER_TYPE:
                    case REACT_STRICT_MODE_TYPE:
                    case REACT_SUSPENSE_TYPE:
                      return type;
                    default:
                      var $$typeofType = type && type.$$typeof;
                      switch ($$typeofType) {
                        case REACT_CONTEXT_TYPE:
                        case REACT_FORWARD_REF_TYPE:
                        case REACT_LAZY_TYPE:
                        case REACT_MEMO_TYPE:
                        case REACT_PROVIDER_TYPE:
                          return $$typeofType;
                        default:
                          return $$typeof;
                      }
                  }
                case REACT_PORTAL_TYPE:
                  return $$typeof;
              }
            }
            return void 0;
          }
          var AsyncMode = REACT_ASYNC_MODE_TYPE;
          var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
          var ContextConsumer = REACT_CONTEXT_TYPE;
          var ContextProvider = REACT_PROVIDER_TYPE;
          var Element2 = REACT_ELEMENT_TYPE;
          var ForwardRef = REACT_FORWARD_REF_TYPE;
          var Fragment96 = REACT_FRAGMENT_TYPE;
          var Lazy = REACT_LAZY_TYPE;
          var Memo = REACT_MEMO_TYPE;
          var Portal = REACT_PORTAL_TYPE;
          var Profiler = REACT_PROFILER_TYPE;
          var StrictMode = REACT_STRICT_MODE_TYPE;
          var Suspense = REACT_SUSPENSE_TYPE;
          var hasWarnedAboutDeprecatedIsAsyncMode = false;
          function isAsyncMode(object) {
            {
              if (!hasWarnedAboutDeprecatedIsAsyncMode) {
                hasWarnedAboutDeprecatedIsAsyncMode = true;
                console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
              }
            }
            return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
          }
          function isConcurrentMode(object) {
            return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
          }
          function isContextConsumer(object) {
            return typeOf(object) === REACT_CONTEXT_TYPE;
          }
          function isContextProvider(object) {
            return typeOf(object) === REACT_PROVIDER_TYPE;
          }
          function isElement2(object) {
            return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
          }
          function isForwardRef(object) {
            return typeOf(object) === REACT_FORWARD_REF_TYPE;
          }
          function isFragment(object) {
            return typeOf(object) === REACT_FRAGMENT_TYPE;
          }
          function isLazy(object) {
            return typeOf(object) === REACT_LAZY_TYPE;
          }
          function isMemo(object) {
            return typeOf(object) === REACT_MEMO_TYPE;
          }
          function isPortal(object) {
            return typeOf(object) === REACT_PORTAL_TYPE;
          }
          function isProfiler(object) {
            return typeOf(object) === REACT_PROFILER_TYPE;
          }
          function isStrictMode(object) {
            return typeOf(object) === REACT_STRICT_MODE_TYPE;
          }
          function isSuspense(object) {
            return typeOf(object) === REACT_SUSPENSE_TYPE;
          }
          exports.AsyncMode = AsyncMode;
          exports.ConcurrentMode = ConcurrentMode;
          exports.ContextConsumer = ContextConsumer;
          exports.ContextProvider = ContextProvider;
          exports.Element = Element2;
          exports.ForwardRef = ForwardRef;
          exports.Fragment = Fragment96;
          exports.Lazy = Lazy;
          exports.Memo = Memo;
          exports.Portal = Portal;
          exports.Profiler = Profiler;
          exports.StrictMode = StrictMode;
          exports.Suspense = Suspense;
          exports.isAsyncMode = isAsyncMode;
          exports.isConcurrentMode = isConcurrentMode;
          exports.isContextConsumer = isContextConsumer;
          exports.isContextProvider = isContextProvider;
          exports.isElement = isElement2;
          exports.isForwardRef = isForwardRef;
          exports.isFragment = isFragment;
          exports.isLazy = isLazy;
          exports.isMemo = isMemo;
          exports.isPortal = isPortal;
          exports.isProfiler = isProfiler;
          exports.isStrictMode = isStrictMode;
          exports.isSuspense = isSuspense;
          exports.isValidElementType = isValidElementType;
          exports.typeOf = typeOf;
        })();
      }
    }
  });

  // node_modules/react-is/index.js
  var require_react_is = __commonJS({
    "node_modules/react-is/index.js"(exports, module) {
      "use strict";
      if (false) {
        module.exports = null;
      } else {
        module.exports = require_react_is_development();
      }
    }
  });

  // node_modules/object-assign/index.js
  var require_object_assign = __commonJS({
    "node_modules/object-assign/index.js"(exports, module) {
      "use strict";
      var getOwnPropertySymbols = Object.getOwnPropertySymbols;
      var hasOwnProperty = Object.prototype.hasOwnProperty;
      var propIsEnumerable = Object.prototype.propertyIsEnumerable;
      function toObject(val) {
        if (val === null || val === void 0) {
          throw new TypeError("Object.assign cannot be called with null or undefined");
        }
        return Object(val);
      }
      function shouldUseNative() {
        try {
          if (!Object.assign) {
            return false;
          }
          var test1 = new String("abc");
          test1[5] = "de";
          if (Object.getOwnPropertyNames(test1)[0] === "5") {
            return false;
          }
          var test2 = {};
          for (var i3 = 0; i3 < 10; i3++) {
            test2["_" + String.fromCharCode(i3)] = i3;
          }
          var order2 = Object.getOwnPropertyNames(test2).map(function(n3) {
            return test2[n3];
          });
          if (order2.join("") !== "0123456789") {
            return false;
          }
          var test3 = {};
          "abcdefghijklmnopqrst".split("").forEach(function(letter) {
            test3[letter] = letter;
          });
          if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
            return false;
          }
          return true;
        } catch (err) {
          return false;
        }
      }
      module.exports = shouldUseNative() ? Object.assign : function(target, source) {
        var from;
        var to2 = toObject(target);
        var symbols;
        for (var s3 = 1; s3 < arguments.length; s3++) {
          from = Object(arguments[s3]);
          for (var key in from) {
            if (hasOwnProperty.call(from, key)) {
              to2[key] = from[key];
            }
          }
          if (getOwnPropertySymbols) {
            symbols = getOwnPropertySymbols(from);
            for (var i3 = 0; i3 < symbols.length; i3++) {
              if (propIsEnumerable.call(from, symbols[i3])) {
                to2[symbols[i3]] = from[symbols[i3]];
              }
            }
          }
        }
        return to2;
      };
    }
  });

  // node_modules/prop-types/lib/ReactPropTypesSecret.js
  var require_ReactPropTypesSecret = __commonJS({
    "node_modules/prop-types/lib/ReactPropTypesSecret.js"(exports, module) {
      "use strict";
      var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
      module.exports = ReactPropTypesSecret;
    }
  });

  // node_modules/prop-types/lib/has.js
  var require_has = __commonJS({
    "node_modules/prop-types/lib/has.js"(exports, module) {
      module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
    }
  });

  // node_modules/prop-types/checkPropTypes.js
  var require_checkPropTypes = __commonJS({
    "node_modules/prop-types/checkPropTypes.js"(exports, module) {
      "use strict";
      var printWarning = function() {
      };
      if (true) {
        ReactPropTypesSecret = require_ReactPropTypesSecret();
        loggedTypeFailures = {};
        has = require_has();
        printWarning = function(text) {
          var message2 = "Warning: " + text;
          if (typeof console !== "undefined") {
            console.error(message2);
          }
          try {
            throw new Error(message2);
          } catch (x2) {
          }
        };
      }
      var ReactPropTypesSecret;
      var loggedTypeFailures;
      var has;
      function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
        if (true) {
          for (var typeSpecName in typeSpecs) {
            if (has(typeSpecs, typeSpecName)) {
              var error;
              try {
                if (typeof typeSpecs[typeSpecName] !== "function") {
                  var err = Error(
                    (componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
                  );
                  err.name = "Invariant Violation";
                  throw err;
                }
                error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
              } catch (ex) {
                error = ex;
              }
              if (error && !(error instanceof Error)) {
                printWarning(
                  (componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
                );
              }
              if (error instanceof Error && !(error.message in loggedTypeFailures)) {
                loggedTypeFailures[error.message] = true;
                var stack = getStack ? getStack() : "";
                printWarning(
                  "Failed " + location + " type: " + error.message + (stack != null ? stack : "")
                );
              }
            }
          }
        }
      }
      checkPropTypes.resetWarningCache = function() {
        if (true) {
          loggedTypeFailures = {};
        }
      };
      module.exports = checkPropTypes;
    }
  });

  // node_modules/prop-types/factoryWithTypeCheckers.js
  var require_factoryWithTypeCheckers = __commonJS({
    "node_modules/prop-types/factoryWithTypeCheckers.js"(exports, module) {
      "use strict";
      var ReactIs = require_react_is();
      var assign2 = require_object_assign();
      var ReactPropTypesSecret = require_ReactPropTypesSecret();
      var has = require_has();
      var checkPropTypes = require_checkPropTypes();
      var printWarning = function() {
      };
      if (true) {
        printWarning = function(text) {
          var message2 = "Warning: " + text;
          if (typeof console !== "undefined") {
            console.error(message2);
          }
          try {
            throw new Error(message2);
          } catch (x2) {
          }
        };
      }
      function emptyFunctionThatReturnsNull() {
        return null;
      }
      module.exports = function(isValidElement2, throwOnDirectAccess) {
        var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
        var FAUX_ITERATOR_SYMBOL = "@@iterator";
        function getIteratorFn(maybeIterable) {
          var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
          if (typeof iteratorFn === "function") {
            return iteratorFn;
          }
        }
        var ANONYMOUS = "<<anonymous>>";
        var ReactPropTypes = {
          array: createPrimitiveTypeChecker("array"),
          bigint: createPrimitiveTypeChecker("bigint"),
          bool: createPrimitiveTypeChecker("boolean"),
          func: createPrimitiveTypeChecker("function"),
          number: createPrimitiveTypeChecker("number"),
          object: createPrimitiveTypeChecker("object"),
          string: createPrimitiveTypeChecker("string"),
          symbol: createPrimitiveTypeChecker("symbol"),
          any: createAnyTypeChecker(),
          arrayOf: createArrayOfTypeChecker,
          element: createElementTypeChecker(),
          elementType: createElementTypeTypeChecker(),
          instanceOf: createInstanceTypeChecker,
          node: createNodeChecker(),
          objectOf: createObjectOfTypeChecker,
          oneOf: createEnumTypeChecker,
          oneOfType: createUnionTypeChecker,
          shape: createShapeTypeChecker,
          exact: createStrictShapeTypeChecker
        };
        function is2(x2, y3) {
          if (x2 === y3) {
            return x2 !== 0 || 1 / x2 === 1 / y3;
          } else {
            return x2 !== x2 && y3 !== y3;
          }
        }
        function PropTypeError(message2, data) {
          this.message = message2;
          this.data = data && typeof data === "object" ? data : {};
          this.stack = "";
        }
        PropTypeError.prototype = Error.prototype;
        function createChainableTypeChecker(validate) {
          if (true) {
            var manualPropTypeCallCache = {};
            var manualPropTypeWarningCount = 0;
          }
          function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
            componentName = componentName || ANONYMOUS;
            propFullName = propFullName || propName;
            if (secret !== ReactPropTypesSecret) {
              if (throwOnDirectAccess) {
                var err = new Error(
                  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
                );
                err.name = "Invariant Violation";
                throw err;
              } else if (typeof console !== "undefined") {
                var cacheKey2 = componentName + ":" + propName;
                if (!manualPropTypeCallCache[cacheKey2] && // Avoid spamming the console because they are often not actionable except for lib authors
                manualPropTypeWarningCount < 3) {
                  printWarning(
                    "You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
                  );
                  manualPropTypeCallCache[cacheKey2] = true;
                  manualPropTypeWarningCount++;
                }
              }
            }
            if (props[propName] == null) {
              if (isRequired) {
                if (props[propName] === null) {
                  return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`."));
                }
                return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`."));
              }
              return null;
            } else {
              return validate(props, propName, componentName, location, propFullName);
            }
          }
          var chainedCheckType = checkType.bind(null, false);
          chainedCheckType.isRequired = checkType.bind(null, true);
          return chainedCheckType;
        }
        function createPrimitiveTypeChecker(expectedType) {
          function validate(props, propName, componentName, location, propFullName, secret) {
            var propValue = props[propName];
            var propType = getPropType(propValue);
            if (propType !== expectedType) {
              var preciseType = getPreciseType(propValue);
              return new PropTypeError(
                "Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."),
                { expectedType }
              );
            }
            return null;
          }
          return createChainableTypeChecker(validate);
        }
        function createAnyTypeChecker() {
          return createChainableTypeChecker(emptyFunctionThatReturnsNull);
        }
        function createArrayOfTypeChecker(typeChecker) {
          function validate(props, propName, componentName, location, propFullName) {
            if (typeof typeChecker !== "function") {
              return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
            }
            var propValue = props[propName];
            if (!Array.isArray(propValue)) {
              var propType = getPropType(propValue);
              return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
            }
            for (var i3 = 0; i3 < propValue.length; i3++) {
              var error = typeChecker(propValue, i3, componentName, location, propFullName + "[" + i3 + "]", ReactPropTypesSecret);
              if (error instanceof Error) {
                return error;
              }
            }
            return null;
          }
          return createChainableTypeChecker(validate);
        }
        function createElementTypeChecker() {
          function validate(props, propName, componentName, location, propFullName) {
            var propValue = props[propName];
            if (!isValidElement2(propValue)) {
              var propType = getPropType(propValue);
              return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
            }
            return null;
          }
          return createChainableTypeChecker(validate);
        }
        function createElementTypeTypeChecker() {
          function validate(props, propName, componentName, location, propFullName) {
            var propValue = props[propName];
            if (!ReactIs.isValidElementType(propValue)) {
              var propType = getPropType(propValue);
              return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type."));
            }
            return null;
          }
          return createChainableTypeChecker(validate);
        }
        function createInstanceTypeChecker(expectedClass) {
          function validate(props, propName, componentName, location, propFullName) {
            if (!(props[propName] instanceof expectedClass)) {
              var expectedClassName = expectedClass.name || ANONYMOUS;
              var actualClassName = getClassName(props[propName]);
              return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
            }
            return null;
          }
          return createChainableTypeChecker(validate);
        }
        function createEnumTypeChecker(expectedValues) {
          if (!Array.isArray(expectedValues)) {
            if (true) {
              if (arguments.length > 1) {
                printWarning(
                  "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
                );
              } else {
                printWarning("Invalid argument supplied to oneOf, expected an array.");
              }
            }
            return emptyFunctionThatReturnsNull;
          }
          function validate(props, propName, componentName, location, propFullName) {
            var propValue = props[propName];
            for (var i3 = 0; i3 < expectedValues.length; i3++) {
              if (is2(propValue, expectedValues[i3])) {
                return null;
              }
            }
            var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
              var type = getPreciseType(value);
              if (type === "symbol") {
                return String(value);
              }
              return value;
            });
            return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
          }
          return createChainableTypeChecker(validate);
        }
        function createObjectOfTypeChecker(typeChecker) {
          function validate(props, propName, componentName, location, propFullName) {
            if (typeof typeChecker !== "function") {
              return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
            }
            var propValue = props[propName];
            var propType = getPropType(propValue);
            if (propType !== "object") {
              return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
            }
            for (var key in propValue) {
              if (has(propValue, key)) {
                var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
                if (error instanceof Error) {
                  return error;
                }
              }
            }
            return null;
          }
          return createChainableTypeChecker(validate);
        }
        function createUnionTypeChecker(arrayOfTypeCheckers) {
          if (!Array.isArray(arrayOfTypeCheckers)) {
            true ? printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") : void 0;
            return emptyFunctionThatReturnsNull;
          }
          for (var i3 = 0; i3 < arrayOfTypeCheckers.length; i3++) {
            var checker = arrayOfTypeCheckers[i3];
            if (typeof checker !== "function") {
              printWarning(
                "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i3 + "."
              );
              return emptyFunctionThatReturnsNull;
            }
          }
          function validate(props, propName, componentName, location, propFullName) {
            var expectedTypes = [];
            for (var i4 = 0; i4 < arrayOfTypeCheckers.length; i4++) {
              var checker2 = arrayOfTypeCheckers[i4];
              var checkerResult = checker2(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
              if (checkerResult == null) {
                return null;
              }
              if (checkerResult.data && has(checkerResult.data, "expectedType")) {
                expectedTypes.push(checkerResult.data.expectedType);
              }
            }
            var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
            return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
          }
          return createChainableTypeChecker(validate);
        }
        function createNodeChecker() {
          function validate(props, propName, componentName, location, propFullName) {
            if (!isNode2(props[propName])) {
              return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
            }
            return null;
          }
          return createChainableTypeChecker(validate);
        }
        function invalidValidatorError(componentName, location, propFullName, key, type) {
          return new PropTypeError(
            (componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."
          );
        }
        function createShapeTypeChecker(shapeTypes) {
          function validate(props, propName, componentName, location, propFullName) {
            var propValue = props[propName];
            var propType = getPropType(propValue);
            if (propType !== "object") {
              return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
            }
            for (var key in shapeTypes) {
              var checker = shapeTypes[key];
              if (typeof checker !== "function") {
                return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
              }
              var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
              if (error) {
                return error;
              }
            }
            return null;
          }
          return createChainableTypeChecker(validate);
        }
        function createStrictShapeTypeChecker(shapeTypes) {
          function validate(props, propName, componentName, location, propFullName) {
            var propValue = props[propName];
            var propType = getPropType(propValue);
            if (propType !== "object") {
              return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
            }
            var allKeys = assign2({}, props[propName], shapeTypes);
            for (var key in allKeys) {
              var checker = shapeTypes[key];
              if (has(shapeTypes, key) && typeof checker !== "function") {
                return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
              }
              if (!checker) {
                return new PropTypeError(
                  "Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, "  ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, "  ")
                );
              }
              var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
              if (error) {
                return error;
              }
            }
            return null;
          }
          return createChainableTypeChecker(validate);
        }
        function isNode2(propValue) {
          switch (typeof propValue) {
            case "number":
            case "string":
            case "undefined":
              return true;
            case "boolean":
              return !propValue;
            case "object":
              if (Array.isArray(propValue)) {
                return propValue.every(isNode2);
              }
              if (propValue === null || isValidElement2(propValue)) {
                return true;
              }
              var iteratorFn = getIteratorFn(propValue);
              if (iteratorFn) {
                var iterator = iteratorFn.call(propValue);
                var step;
                if (iteratorFn !== propValue.entries) {
                  while (!(step = iterator.next()).done) {
                    if (!isNode2(step.value)) {
                      return false;
                    }
                  }
                } else {
                  while (!(step = iterator.next()).done) {
                    var entry = step.value;
                    if (entry) {
                      if (!isNode2(entry[1])) {
                        return false;
                      }
                    }
                  }
                }
              } else {
                return false;
              }
              return true;
            default:
              return false;
          }
        }
        function isSymbol(propType, propValue) {
          if (propType === "symbol") {
            return true;
          }
          if (!propValue) {
            return false;
          }
          if (propValue["@@toStringTag"] === "Symbol") {
            return true;
          }
          if (typeof Symbol === "function" && propValue instanceof Symbol) {
            return true;
          }
          return false;
        }
        function getPropType(propValue) {
          var propType = typeof propValue;
          if (Array.isArray(propValue)) {
            return "array";
          }
          if (propValue instanceof RegExp) {
            return "object";
          }
          if (isSymbol(propType, propValue)) {
            return "symbol";
          }
          return propType;
        }
        function getPreciseType(propValue) {
          if (typeof propValue === "undefined" || propValue === null) {
            return "" + propValue;
          }
          var propType = getPropType(propValue);
          if (propType === "object") {
            if (propValue instanceof Date) {
              return "date";
            } else if (propValue instanceof RegExp) {
              return "regexp";
            }
          }
          return propType;
        }
        function getPostfixForTypeWarning(value) {
          var type = getPreciseType(value);
          switch (type) {
            case "array":
            case "object":
              return "an " + type;
            case "boolean":
            case "date":
            case "regexp":
              return "a " + type;
            default:
              return type;
          }
        }
        function getClassName(propValue) {
          if (!propValue.constructor || !propValue.constructor.name) {
            return ANONYMOUS;
          }
          return propValue.constructor.name;
        }
        ReactPropTypes.checkPropTypes = checkPropTypes;
        ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
        ReactPropTypes.PropTypes = ReactPropTypes;
        return ReactPropTypes;
      };
    }
  });

  // node_modules/prop-types/index.js
  var require_prop_types = __commonJS({
    "node_modules/prop-types/index.js"(exports, module) {
      if (true) {
        ReactIs = require_react_is();
        throwOnDirectAccess = true;
        module.exports = require_factoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
      } else {
        module.exports = null();
      }
      var ReactIs;
      var throwOnDirectAccess;
    }
  });

  // node_modules/autosize/dist/autosize.js
  var require_autosize = __commonJS({
    "node_modules/autosize/dist/autosize.js"(exports, module) {
      (function(global, factory) {
        if (typeof define === "function" && define.amd) {
          define(["module", "exports"], factory);
        } else if (typeof exports !== "undefined") {
          factory(module, exports);
        } else {
          var mod = {
            exports: {}
          };
          factory(mod, mod.exports);
          global.autosize = mod.exports;
        }
      })(exports, function(module2, exports2) {
        "use strict";
        var map = typeof Map === "function" ? /* @__PURE__ */ new Map() : /* @__PURE__ */ (function() {
          var keys = [];
          var values = [];
          return {
            has: function has(key) {
              return keys.indexOf(key) > -1;
            },
            get: function get(key) {
              return values[keys.indexOf(key)];
            },
            set: function set(key, value) {
              if (keys.indexOf(key) === -1) {
                keys.push(key);
                values.push(value);
              }
            },
            delete: function _delete(key) {
              var index2 = keys.indexOf(key);
              if (index2 > -1) {
                keys.splice(index2, 1);
                values.splice(index2, 1);
              }
            }
          };
        })();
        var createEvent = function createEvent2(name2) {
          return new Event(name2, { bubbles: true });
        };
        try {
          new Event("test");
        } catch (e3) {
          createEvent = function createEvent2(name2) {
            var evt = document.createEvent("Event");
            evt.initEvent(name2, true, false);
            return evt;
          };
        }
        function assign2(ta) {
          if (!ta || !ta.nodeName || ta.nodeName !== "TEXTAREA" || map.has(ta)) return;
          var heightOffset = null;
          var clientWidth = null;
          var cachedHeight = null;
          function init() {
            var style = window.getComputedStyle(ta, null);
            if (style.resize === "vertical") {
              ta.style.resize = "none";
            } else if (style.resize === "both") {
              ta.style.resize = "horizontal";
            }
            if (style.boxSizing === "content-box") {
              heightOffset = -(parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));
            } else {
              heightOffset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
            }
            if (isNaN(heightOffset)) {
              heightOffset = 0;
            }
            update5();
          }
          function changeOverflow(value) {
            {
              var width = ta.style.width;
              ta.style.width = "0px";
              ta.offsetWidth;
              ta.style.width = width;
            }
            ta.style.overflowY = value;
          }
          function getParentOverflows(el) {
            var arr = [];
            while (el && el.parentNode && el.parentNode instanceof Element) {
              if (el.parentNode.scrollTop) {
                arr.push({
                  node: el.parentNode,
                  scrollTop: el.parentNode.scrollTop
                });
              }
              el = el.parentNode;
            }
            return arr;
          }
          function resize() {
            if (ta.scrollHeight === 0) {
              return;
            }
            var overflows = getParentOverflows(ta);
            var docTop = document.documentElement && document.documentElement.scrollTop;
            ta.style.height = "";
            ta.style.height = ta.scrollHeight + heightOffset + "px";
            clientWidth = ta.clientWidth;
            overflows.forEach(function(el) {
              el.node.scrollTop = el.scrollTop;
            });
            if (docTop) {
              document.documentElement.scrollTop = docTop;
            }
          }
          function update5() {
            resize();
            var styleHeight = Math.round(parseFloat(ta.style.height));
            var computed = window.getComputedStyle(ta, null);
            var actualHeight = computed.boxSizing === "content-box" ? Math.round(parseFloat(computed.height)) : ta.offsetHeight;
            if (actualHeight < styleHeight) {
              if (computed.overflowY === "hidden") {
                changeOverflow("scroll");
                resize();
                actualHeight = computed.boxSizing === "content-box" ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
              }
            } else {
              if (computed.overflowY !== "hidden") {
                changeOverflow("hidden");
                resize();
                actualHeight = computed.boxSizing === "content-box" ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
              }
            }
            if (cachedHeight !== actualHeight) {
              cachedHeight = actualHeight;
              var evt = createEvent("autosize:resized");
              try {
                ta.dispatchEvent(evt);
              } catch (err) {
              }
            }
          }
          var pageResize = function pageResize2() {
            if (ta.clientWidth !== clientWidth) {
              update5();
            }
          };
          var destroy2 = function(style) {
            window.removeEventListener("resize", pageResize, false);
            ta.removeEventListener("input", update5, false);
            ta.removeEventListener("keyup", update5, false);
            ta.removeEventListener("autosize:destroy", destroy2, false);
            ta.removeEventListener("autosize:update", update5, false);
            Object.keys(style).forEach(function(key) {
              ta.style[key] = style[key];
            });
            map.delete(ta);
          }.bind(ta, {
            height: ta.style.height,
            resize: ta.style.resize,
            overflowY: ta.style.overflowY,
            overflowX: ta.style.overflowX,
            wordWrap: ta.style.wordWrap
          });
          ta.addEventListener("autosize:destroy", destroy2, false);
          if ("onpropertychange" in ta && "oninput" in ta) {
            ta.addEventListener("keyup", update5, false);
          }
          window.addEventListener("resize", pageResize, false);
          ta.addEventListener("input", update5, false);
          ta.addEventListener("autosize:update", update5, false);
          ta.style.overflowX = "hidden";
          ta.style.wordWrap = "break-word";
          map.set(ta, {
            destroy: destroy2,
            update: update5
          });
          init();
        }
        function destroy(ta) {
          var methods = map.get(ta);
          if (methods) {
            methods.destroy();
          }
        }
        function update4(ta) {
          var methods = map.get(ta);
          if (methods) {
            methods.update();
          }
        }
        var autosize = null;
        if (typeof window === "undefined" || typeof window.getComputedStyle !== "function") {
          autosize = function autosize2(el) {
            return el;
          };
          autosize.destroy = function(el) {
            return el;
          };
          autosize.update = function(el) {
            return el;
          };
        } else {
          autosize = function autosize2(el, options) {
            if (el) {
              Array.prototype.forEach.call(el.length ? el : [el], function(x2) {
                return assign2(x2, options);
              });
            }
            return el;
          };
          autosize.destroy = function(el) {
            if (el) {
              Array.prototype.forEach.call(el.length ? el : [el], destroy);
            }
            return el;
          };
          autosize.update = function(el) {
            if (el) {
              Array.prototype.forEach.call(el.length ? el : [el], update4);
            }
            return el;
          };
        }
        exports2.default = autosize;
        module2.exports = exports2["default"];
      });
    }
  });

  // node_modules/computed-style/dist/computedStyle.commonjs.js
  var require_computedStyle_commonjs = __commonJS({
    "node_modules/computed-style/dist/computedStyle.commonjs.js"(exports, module) {
      var computedStyle = function(el, prop, getComputedStyle3) {
        getComputedStyle3 = window.getComputedStyle;
        return (
          // If we have getComputedStyle
          (getComputedStyle3 ? (
            // Query it
            // TODO: From CSS-Query notes, we might need (node, null) for FF
            getComputedStyle3(el)
          ) : (
            // Otherwise, we are in IE and use currentStyle
            el.currentStyle
          ))[
            // Switch to camelCase for CSSOM
            // DEV: Grabbed from jQuery
            // https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194
            // https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597
            prop.replace(/-(\w)/gi, function(word, letter) {
              return letter.toUpperCase();
            })
          ]
        );
      };
      module.exports = computedStyle;
    }
  });

  // node_modules/line-height/lib/line-height.js
  var require_line_height = __commonJS({
    "node_modules/line-height/lib/line-height.js"(exports, module) {
      var computedStyle = require_computedStyle_commonjs();
      function lineHeight(node) {
        var lnHeightStr = computedStyle(node, "line-height");
        var lnHeight = parseFloat(lnHeightStr, 10);
        if (lnHeightStr === lnHeight + "") {
          var _lnHeightStyle = node.style.lineHeight;
          node.style.lineHeight = lnHeightStr + "em";
          lnHeightStr = computedStyle(node, "line-height");
          lnHeight = parseFloat(lnHeightStr, 10);
          if (_lnHeightStyle) {
            node.style.lineHeight = _lnHeightStyle;
          } else {
            delete node.style.lineHeight;
          }
        }
        if (lnHeightStr.indexOf("pt") !== -1) {
          lnHeight *= 4;
          lnHeight /= 3;
        } else if (lnHeightStr.indexOf("mm") !== -1) {
          lnHeight *= 96;
          lnHeight /= 25.4;
        } else if (lnHeightStr.indexOf("cm") !== -1) {
          lnHeight *= 96;
          lnHeight /= 2.54;
        } else if (lnHeightStr.indexOf("in") !== -1) {
          lnHeight *= 96;
        } else if (lnHeightStr.indexOf("pc") !== -1) {
          lnHeight *= 16;
        }
        lnHeight = Math.round(lnHeight);
        if (lnHeightStr === "normal") {
          var nodeName = node.nodeName;
          var _node = document.createElement(nodeName);
          _node.innerHTML = "&nbsp;";
          if (nodeName.toUpperCase() === "TEXTAREA") {
            _node.setAttribute("rows", "1");
          }
          var fontSizeStr = computedStyle(node, "font-size");
          _node.style.fontSize = fontSizeStr;
          _node.style.padding = "0px";
          _node.style.border = "0px";
          var body = document.body;
          body.appendChild(_node);
          var height = _node.offsetHeight;
          lnHeight = height;
          body.removeChild(_node);
        }
        return lnHeight;
      }
      module.exports = lineHeight;
    }
  });

  // node_modules/react-autosize-textarea/lib/TextareaAutosize.js
  var require_TextareaAutosize = __commonJS({
    "node_modules/react-autosize-textarea/lib/TextareaAutosize.js"(exports) {
      "use strict";
      var __extends = exports && exports.__extends || (function() {
        var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
          d3.__proto__ = b3;
        } || function(d3, b3) {
          for (var p4 in b3) if (b3.hasOwnProperty(p4)) d3[p4] = b3[p4];
        };
        return function(d3, b3) {
          extendStatics(d3, b3);
          function __268() {
            this.constructor = d3;
          }
          d3.prototype = b3 === null ? Object.create(b3) : (__268.prototype = b3.prototype, new __268());
        };
      })();
      var __assign2 = exports && exports.__assign || Object.assign || function(t4) {
        for (var s3, i3 = 1, n3 = arguments.length; i3 < n3; i3++) {
          s3 = arguments[i3];
          for (var p4 in s3) if (Object.prototype.hasOwnProperty.call(s3, p4))
            t4[p4] = s3[p4];
        }
        return t4;
      };
      var __rest = exports && exports.__rest || function(s3, e3) {
        var t4 = {};
        for (var p4 in s3) if (Object.prototype.hasOwnProperty.call(s3, p4) && e3.indexOf(p4) < 0)
          t4[p4] = s3[p4];
        if (s3 != null && typeof Object.getOwnPropertySymbols === "function") {
          for (var i3 = 0, p4 = Object.getOwnPropertySymbols(s3); i3 < p4.length; i3++) if (e3.indexOf(p4[i3]) < 0)
            t4[p4[i3]] = s3[p4[i3]];
        }
        return t4;
      };
      exports.__esModule = true;
      var React8 = require_react();
      var PropTypes = require_prop_types();
      var autosize = require_autosize();
      var _getLineHeight = require_line_height();
      var getLineHeight = _getLineHeight;
      var RESIZED = "autosize:resized";
      var TextareaAutosizeClass = (
        /** @class */
        (function(_super) {
          __extends(TextareaAutosizeClass2, _super);
          function TextareaAutosizeClass2() {
            var _this = _super !== null && _super.apply(this, arguments) || this;
            _this.state = {
              lineHeight: null
            };
            _this.textarea = null;
            _this.onResize = function(e3) {
              if (_this.props.onResize) {
                _this.props.onResize(e3);
              }
            };
            _this.updateLineHeight = function() {
              if (_this.textarea) {
                _this.setState({
                  lineHeight: getLineHeight(_this.textarea)
                });
              }
            };
            _this.onChange = function(e3) {
              var onChange = _this.props.onChange;
              _this.currentValue = e3.currentTarget.value;
              onChange && onChange(e3);
            };
            return _this;
          }
          TextareaAutosizeClass2.prototype.componentDidMount = function() {
            var _this = this;
            var _a = this.props, maxRows = _a.maxRows, async = _a.async;
            if (typeof maxRows === "number") {
              this.updateLineHeight();
            }
            if (typeof maxRows === "number" || async) {
              setTimeout(function() {
                return _this.textarea && autosize(_this.textarea);
              });
            } else {
              this.textarea && autosize(this.textarea);
            }
            if (this.textarea) {
              this.textarea.addEventListener(RESIZED, this.onResize);
            }
          };
          TextareaAutosizeClass2.prototype.componentWillUnmount = function() {
            if (this.textarea) {
              this.textarea.removeEventListener(RESIZED, this.onResize);
              autosize.destroy(this.textarea);
            }
          };
          TextareaAutosizeClass2.prototype.render = function() {
            var _this = this;
            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;
            var maxHeight = maxRows && lineHeight ? lineHeight * maxRows : null;
            return React8.createElement("textarea", __assign2({}, props, { onChange: this.onChange, style: maxHeight ? __assign2({}, style, { maxHeight }) : style, ref: function(element) {
              _this.textarea = element;
              if (typeof _this.props.innerRef === "function") {
                _this.props.innerRef(element);
              } else if (_this.props.innerRef) {
                _this.props.innerRef.current = element;
              }
            } }), children);
          };
          TextareaAutosizeClass2.prototype.componentDidUpdate = function() {
            this.textarea && autosize.update(this.textarea);
          };
          TextareaAutosizeClass2.defaultProps = {
            rows: 1,
            async: false
          };
          TextareaAutosizeClass2.propTypes = {
            rows: PropTypes.number,
            maxRows: PropTypes.number,
            onResize: PropTypes.func,
            innerRef: PropTypes.any,
            async: PropTypes.bool
          };
          return TextareaAutosizeClass2;
        })(React8.Component)
      );
      exports.TextareaAutosize = React8.forwardRef(function(props, ref) {
        return React8.createElement(TextareaAutosizeClass, __assign2({}, props, { innerRef: ref }));
      });
    }
  });

  // node_modules/react-autosize-textarea/lib/index.js
  var require_lib = __commonJS({
    "node_modules/react-autosize-textarea/lib/index.js"(exports, module) {
      "use strict";
      var TextareaAutosize_1 = require_TextareaAutosize();
      module.exports = TextareaAutosize_1.TextareaAutosize;
    }
  });

  // package-external:@wordpress/wordcount
  var require_wordcount = __commonJS({
    "package-external:@wordpress/wordcount"(exports, module) {
      module.exports = window.wp.wordcount;
    }
  });

  // package-external:@wordpress/server-side-render
  var require_server_side_render = __commonJS({
    "package-external:@wordpress/server-side-render"(exports, module) {
      module.exports = window.wp.serverSideRender;
    }
  });

  // packages/editor/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    AlignmentToolbar: () => AlignmentToolbar,
    Autocomplete: () => Autocomplete,
    AutosaveMonitor: () => autosave_monitor_default,
    BlockAlignmentToolbar: () => BlockAlignmentToolbar,
    BlockControls: () => BlockControls,
    BlockEdit: () => BlockEdit,
    BlockEditorKeyboardShortcuts: () => BlockEditorKeyboardShortcuts2,
    BlockFormatControls: () => BlockFormatControls,
    BlockIcon: () => BlockIcon3,
    BlockInspector: () => BlockInspector,
    BlockList: () => BlockList4,
    BlockMover: () => BlockMover,
    BlockNavigationDropdown: () => BlockNavigationDropdown,
    BlockSelectionClearer: () => BlockSelectionClearer,
    BlockSettingsMenu: () => BlockSettingsMenu,
    BlockTitle: () => BlockTitle,
    BlockToolbar: () => BlockToolbar,
    CharacterCount: () => CharacterCount,
    ColorPalette: () => ColorPalette2,
    ContrastChecker: () => ContrastChecker,
    CopyHandler: () => CopyHandler,
    DefaultBlockAppender: () => DefaultBlockAppender,
    DocumentBar: () => DocumentBar,
    DocumentOutline: () => DocumentOutline,
    DocumentOutlineCheck: () => DocumentOutlineCheck,
    EditorHistoryRedo: () => redo_default2,
    EditorHistoryUndo: () => undo_default2,
    EditorKeyboardShortcuts: () => EditorKeyboardShortcuts,
    EditorKeyboardShortcutsRegister: () => register_shortcuts_default,
    EditorNotices: () => editor_notices_default,
    EditorProvider: () => provider_default,
    EditorSnackbars: () => EditorSnackbars,
    EntitiesSavedStates: () => EntitiesSavedStates,
    ErrorBoundary: () => error_boundary_default,
    FontSizePicker: () => FontSizePicker,
    InnerBlocks: () => InnerBlocks,
    Inserter: () => Inserter,
    InspectorAdvancedControls: () => InspectorAdvancedControls,
    InspectorControls: () => InspectorControls,
    LocalAutosaveMonitor: () => local_autosave_monitor_default,
    MediaPlaceholder: () => MediaPlaceholder,
    MediaUpload: () => MediaUpload3,
    MediaUploadCheck: () => MediaUploadCheck2,
    MultiSelectScrollIntoView: () => MultiSelectScrollIntoView,
    NavigableToolbar: () => NavigableToolbar,
    ObserveTyping: () => ObserveTyping,
    PageAttributesCheck: () => check_default2,
    PageAttributesOrder: () => PageAttributesOrderWithChecks,
    PageAttributesPanel: () => PageAttributesPanel,
    PageAttributesParent: () => parent_default2,
    PageTemplate: () => classic_theme_default,
    PanelColorSettings: () => PanelColorSettings,
    PlainText: () => PlainText,
    PluginBlockSettingsMenuItem: () => plugin_block_settings_menu_item_default,
    PluginDocumentSettingPanel: () => plugin_document_setting_panel_default,
    PluginMoreMenuItem: () => PluginMoreMenuItem,
    PluginPostPublishPanel: () => plugin_post_publish_panel_default,
    PluginPostStatusInfo: () => plugin_post_status_info_default,
    PluginPrePublishPanel: () => plugin_pre_publish_panel_default,
    PluginPreviewMenuItem: () => PluginPreviewMenuItem,
    PluginSidebar: () => PluginSidebar,
    PluginSidebarMoreMenuItem: () => PluginSidebarMoreMenuItem,
    PostAuthor: () => post_author_default,
    PostAuthorCheck: () => PostAuthorCheck,
    PostAuthorPanel: () => panel_default,
    PostComments: () => post_comments_default,
    PostDiscussionPanel: () => PostDiscussionPanel,
    PostExcerpt: () => PostExcerpt,
    PostExcerptCheck: () => check_default3,
    PostExcerptPanel: () => PostExcerptPanel,
    PostFeaturedImage: () => post_featured_image_default,
    PostFeaturedImageCheck: () => check_default4,
    PostFeaturedImagePanel: () => PostFeaturedImagePanel,
    PostFormat: () => PostFormat,
    PostFormatCheck: () => PostFormatCheck,
    PostLastRevision: () => post_last_revision_default,
    PostLastRevisionCheck: () => check_default5,
    PostLastRevisionPanel: () => panel_default2,
    PostLockedModal: () => post_locked_modal_default,
    PostPendingStatus: () => post_pending_status_default,
    PostPendingStatusCheck: () => check_default6,
    PostPingbacks: () => post_pingbacks_default,
    PostPreviewButton: () => PostPreviewButton,
    PostPublishButton: () => post_publish_button_default,
    PostPublishButtonLabel: () => PublishButtonLabel,
    PostPublishPanel: () => post_publish_panel_default,
    PostSavedState: () => PostSavedState,
    PostSchedule: () => PostSchedule,
    PostScheduleCheck: () => PostScheduleCheck,
    PostScheduleLabel: () => PostScheduleLabel,
    PostSchedulePanel: () => PostSchedulePanel,
    PostSticky: () => PostSticky,
    PostStickyCheck: () => PostStickyCheck,
    PostSwitchToDraftButton: () => PostSwitchToDraftButton,
    PostSyncStatus: () => PostSyncStatus,
    PostTaxonomies: () => post_taxonomies_default,
    PostTaxonomiesCheck: () => PostTaxonomiesCheck,
    PostTaxonomiesFlatTermSelector: () => FlatTermSelector,
    PostTaxonomiesHierarchicalTermSelector: () => HierarchicalTermSelector,
    PostTaxonomiesPanel: () => PostTaxonomies2,
    PostTemplatePanel: () => PostTemplatePanel,
    PostTextEditor: () => PostTextEditor,
    PostTitle: () => post_title_default,
    PostTitleRaw: () => post_title_raw_default,
    PostTrash: () => PostTrash,
    PostTrashCheck: () => PostTrashCheck,
    PostTypeSupportCheck: () => post_type_support_check_default,
    PostURL: () => PostURL,
    PostURLCheck: () => PostURLCheck,
    PostURLLabel: () => PostURLLabel,
    PostURLPanel: () => PostURLPanel,
    PostVisibility: () => PostVisibility,
    PostVisibilityCheck: () => PostVisibilityCheck,
    PostVisibilityLabel: () => PostVisibilityLabel,
    RichText: () => RichText,
    RichTextShortcut: () => RichTextShortcut,
    RichTextToolbarButton: () => RichTextToolbarButton,
    ServerSideRender: () => import_server_side_render.default,
    SkipToSelectedBlock: () => SkipToSelectedBlock,
    TableOfContents: () => table_of_contents_default,
    TextEditorGlobalKeyboardShortcuts: () => TextEditorGlobalKeyboardShortcuts,
    ThemeSupportCheck: () => ThemeSupportCheck,
    TimeToRead: () => TimeToRead,
    URLInput: () => URLInput,
    URLInputButton: () => URLInputButton,
    URLPopover: () => URLPopover,
    UnsavedChangesWarning: () => UnsavedChangesWarning,
    VisualEditorGlobalKeyboardShortcuts: () => VisualEditorGlobalKeyboardShortcuts,
    Warning: () => Warning,
    WordCount: () => WordCount,
    WritingFlow: () => WritingFlow,
    __unstableRichTextInputEvent: () => __unstableRichTextInputEvent,
    cleanForSlug: () => cleanForSlug2,
    createCustomColorsHOC: () => createCustomColorsHOC,
    getColorClassName: () => getColorClassName2,
    getColorObjectByAttributeValues: () => getColorObjectByAttributeValues,
    getColorObjectByColorValue: () => getColorObjectByColorValue,
    getFontSize: () => getFontSize,
    getFontSizeClass: () => getFontSizeClass,
    getTemplatePartIcon: () => getTemplatePartIcon,
    mediaUpload: () => mediaUpload,
    privateApis: () => privateApis18,
    registerEntityAction: () => registerEntityAction2,
    registerEntityField: () => registerEntityField2,
    store: () => store,
    storeConfig: () => storeConfig,
    transformStyles: () => import_block_editor105.transformStyles,
    unregisterEntityAction: () => unregisterEntityAction2,
    unregisterEntityField: () => unregisterEntityField2,
    useEntitiesSavedStatesIsDirty: () => useIsDirty,
    usePostScheduleLabel: () => usePostScheduleLabel,
    usePostURLLabel: () => usePostURLLabel,
    usePostVisibilityLabel: () => usePostVisibilityLabel,
    userAutocompleter: () => user_default,
    withColorContext: () => withColorContext,
    withColors: () => withColors,
    withFontSizes: () => withFontSizes
  });

  // packages/editor/build-module/hooks/custom-sources-backwards-compatibility.mjs
  var import_data73 = __toESM(require_data(), 1);
  var import_core_data54 = __toESM(require_core_data(), 1);
  var import_element82 = __toESM(require_element(), 1);
  var import_compose16 = __toESM(require_compose(), 1);
  var import_hooks39 = __toESM(require_hooks(), 1);

  // packages/editor/build-module/store/index.mjs
  var import_data72 = __toESM(require_data(), 1);

  // packages/editor/build-module/store/reducer.mjs
  var import_data2 = __toESM(require_data(), 1);

  // packages/editor/build-module/store/defaults.mjs
  var import_block_editor = __toESM(require_block_editor(), 1);
  var EDITOR_SETTINGS_DEFAULTS = {
    ...import_block_editor.SETTINGS_DEFAULTS,
    richEditingEnabled: true,
    codeEditingEnabled: true,
    fontLibraryEnabled: true,
    enableCustomFields: void 0,
    defaultRenderingMode: "post-only"
  };

  // packages/editor/build-module/dataviews/store/reducer.mjs
  var import_data = __toESM(require_data(), 1);
  function isReady(state = {}, action) {
    switch (action.type) {
      case "SET_IS_READY":
        return {
          ...state,
          [action.kind]: {
            ...state[action.kind],
            [action.name]: true
          }
        };
    }
    return state;
  }
  function actions(state = {}, action) {
    switch (action.type) {
      case "REGISTER_ENTITY_ACTION":
        return {
          ...state,
          [action.kind]: {
            ...state[action.kind],
            [action.name]: [
              ...(state[action.kind]?.[action.name] ?? []).filter(
                (_action) => _action.id !== action.config.id
              ),
              action.config
            ]
          }
        };
      case "UNREGISTER_ENTITY_ACTION": {
        return {
          ...state,
          [action.kind]: {
            ...state[action.kind],
            [action.name]: (state[action.kind]?.[action.name] ?? []).filter((_action) => _action.id !== action.actionId)
          }
        };
      }
    }
    return state;
  }
  function fields(state = {}, action) {
    switch (action.type) {
      case "REGISTER_ENTITY_FIELD":
        return {
          ...state,
          [action.kind]: {
            ...state[action.kind],
            [action.name]: [
              ...(state[action.kind]?.[action.name] ?? []).filter(
                (_field) => _field.id !== action.config.id
              ),
              action.config
            ]
          }
        };
      case "UNREGISTER_ENTITY_FIELD":
        return {
          ...state,
          [action.kind]: {
            ...state[action.kind],
            [action.name]: (state[action.kind]?.[action.name] ?? []).filter((_field) => _field.id !== action.fieldId)
          }
        };
    }
    return state;
  }
  var reducer_default = (0, import_data.combineReducers)({
    actions,
    fields,
    isReady
  });

  // packages/editor/build-module/store/reducer.mjs
  function getPostRawValue(value) {
    if (value && "object" === typeof value && "raw" in value) {
      return value.raw;
    }
    return value;
  }
  function postId(state = null, action) {
    switch (action.type) {
      case "SET_EDITED_POST":
        return action.postId;
    }
    return state;
  }
  function templateId(state = null, action) {
    switch (action.type) {
      case "SET_CURRENT_TEMPLATE_ID":
        return action.id;
    }
    return state;
  }
  function postType(state = null, action) {
    switch (action.type) {
      case "SET_EDITED_POST":
        return action.postType;
    }
    return state;
  }
  function template(state = { isValid: true }, action) {
    switch (action.type) {
      case "SET_TEMPLATE_VALIDITY":
        return {
          ...state,
          isValid: action.isValid
        };
    }
    return state;
  }
  function saving(state = {}, action) {
    switch (action.type) {
      case "REQUEST_POST_UPDATE_START":
      case "REQUEST_POST_UPDATE_FINISH":
        return {
          pending: action.type === "REQUEST_POST_UPDATE_START",
          options: action.options || {}
        };
    }
    return state;
  }
  function deleting(state = {}, action) {
    switch (action.type) {
      case "REQUEST_POST_DELETE_START":
      case "REQUEST_POST_DELETE_FINISH":
        return {
          pending: action.type === "REQUEST_POST_DELETE_START"
        };
    }
    return state;
  }
  function postLock(state = { isLocked: false }, action) {
    switch (action.type) {
      case "UPDATE_POST_LOCK":
        return action.lock;
    }
    return state;
  }
  function postSavingLock(state = {}, action) {
    switch (action.type) {
      case "LOCK_POST_SAVING":
        return { ...state, [action.lockName]: true };
      case "UNLOCK_POST_SAVING": {
        const { [action.lockName]: removedLockName, ...restState } = state;
        return restState;
      }
    }
    return state;
  }
  function postAutosavingLock(state = {}, action) {
    switch (action.type) {
      case "LOCK_POST_AUTOSAVING":
        return { ...state, [action.lockName]: true };
      case "UNLOCK_POST_AUTOSAVING": {
        const { [action.lockName]: removedLockName, ...restState } = state;
        return restState;
      }
    }
    return state;
  }
  function editorSettings(state = EDITOR_SETTINGS_DEFAULTS, action) {
    switch (action.type) {
      case "UPDATE_EDITOR_SETTINGS":
        return {
          ...state,
          ...action.settings
        };
    }
    return state;
  }
  function renderingMode(state = "post-only", action) {
    switch (action.type) {
      case "SET_RENDERING_MODE":
        return action.mode;
    }
    return state;
  }
  function deviceType(state = "Desktop", action) {
    switch (action.type) {
      case "SET_DEVICE_TYPE":
        return action.deviceType;
    }
    return state;
  }
  function removedPanels(state = [], action) {
    switch (action.type) {
      case "REMOVE_PANEL":
        if (!state.includes(action.panelName)) {
          return [...state, action.panelName];
        }
    }
    return state;
  }
  function blockInserterPanel(state = false, action) {
    switch (action.type) {
      case "SET_IS_LIST_VIEW_OPENED":
        return action.isOpen ? false : state;
      case "SET_IS_INSERTER_OPENED":
        return action.value;
    }
    return state;
  }
  function listViewPanel(state = false, action) {
    switch (action.type) {
      case "SET_IS_INSERTER_OPENED":
        return action.value ? false : state;
      case "SET_IS_LIST_VIEW_OPENED":
        return action.isOpen;
    }
    return state;
  }
  function listViewToggleRef(state = { current: null }) {
    return state;
  }
  function inserterSidebarToggleRef(state = { current: null }) {
    return state;
  }
  function publishSidebarActive(state = false, action) {
    switch (action.type) {
      case "OPEN_PUBLISH_SIDEBAR":
        return true;
      case "CLOSE_PUBLISH_SIDEBAR":
        return false;
      case "TOGGLE_PUBLISH_SIDEBAR":
        return !state;
    }
    return state;
  }
  function stylesPath(state = "/", action) {
    switch (action.type) {
      case "SET_STYLES_PATH":
        return action.path;
      case "RESET_STYLES_NAVIGATION":
        return "/";
    }
    return state;
  }
  function showStylebook(state = false, action) {
    switch (action.type) {
      case "SET_SHOW_STYLEBOOK":
        return action.show;
      case "RESET_STYLES_NAVIGATION":
        return false;
    }
    return state;
  }
  function canvasMinHeight(state = 0, action) {
    switch (action.type) {
      case "SET_CANVAS_MIN_HEIGHT":
        return action.minHeight;
    }
    return state;
  }
  function revisionId(state = null, action) {
    switch (action.type) {
      case "SET_CURRENT_REVISION_ID":
        return action.revisionId;
    }
    return state;
  }
  function revisionPage(state = 1, action) {
    switch (action.type) {
      case "SET_REVISION_PAGE":
        return action.page;
      case "SET_CURRENT_REVISION_ID":
        if (!action.revisionId) {
          return 1;
        }
        return state;
    }
    return state;
  }
  function showRevisionDiff(state = true, action) {
    switch (action.type) {
      case "SET_SHOW_REVISION_DIFF":
        return action.showDiff;
      case "SET_CURRENT_REVISION_ID":
        return !action.revisionId ? true : state;
    }
    return state;
  }
  function selectedNote(state = {}, action) {
    switch (action.type) {
      case "SELECT_NOTE":
        return { noteId: action.noteId, options: action.options };
    }
    return state;
  }
  var reducer_default2 = (0, import_data2.combineReducers)({
    postId,
    postType,
    templateId,
    saving,
    deleting,
    postLock,
    template,
    postSavingLock,
    editorSettings,
    postAutosavingLock,
    renderingMode,
    deviceType,
    removedPanels,
    blockInserterPanel,
    inserterSidebarToggleRef,
    listViewPanel,
    listViewToggleRef,
    publishSidebarActive,
    stylesPath,
    showStylebook,
    canvasMinHeight,
    revisionId,
    revisionPage,
    showRevisionDiff,
    selectedNote,
    dataviews: reducer_default
  });

  // packages/editor/build-module/store/selectors.mjs
  var selectors_exports = {};
  __export(selectors_exports, {
    __experimentalGetDefaultTemplatePartAreas: () => __experimentalGetDefaultTemplatePartAreas,
    __experimentalGetDefaultTemplateType: () => __experimentalGetDefaultTemplateType,
    __experimentalGetDefaultTemplateTypes: () => __experimentalGetDefaultTemplateTypes,
    __experimentalGetTemplateInfo: () => __experimentalGetTemplateInfo,
    __unstableIsEditorReady: () => __unstableIsEditorReady,
    canInsertBlockType: () => canInsertBlockType,
    canUserUseUnfilteredHTML: () => canUserUseUnfilteredHTML,
    didPostSaveRequestFail: () => didPostSaveRequestFail,
    didPostSaveRequestSucceed: () => didPostSaveRequestSucceed,
    getActivePostLock: () => getActivePostLock,
    getAdjacentBlockClientId: () => getAdjacentBlockClientId,
    getAutosaveAttribute: () => getAutosaveAttribute,
    getBlock: () => getBlock,
    getBlockAttributes: () => getBlockAttributes,
    getBlockCount: () => getBlockCount,
    getBlockHierarchyRootClientId: () => getBlockHierarchyRootClientId,
    getBlockIndex: () => getBlockIndex,
    getBlockInsertionPoint: () => getBlockInsertionPoint,
    getBlockListSettings: () => getBlockListSettings,
    getBlockMode: () => getBlockMode,
    getBlockName: () => getBlockName,
    getBlockOrder: () => getBlockOrder,
    getBlockRootClientId: () => getBlockRootClientId,
    getBlockSelectionEnd: () => getBlockSelectionEnd,
    getBlockSelectionStart: () => getBlockSelectionStart,
    getBlocks: () => getBlocks,
    getBlocksByClientId: () => getBlocksByClientId,
    getClientIdsOfDescendants: () => getClientIdsOfDescendants,
    getClientIdsWithDescendants: () => getClientIdsWithDescendants,
    getCurrentPost: () => getCurrentPost,
    getCurrentPostAttribute: () => getCurrentPostAttribute,
    getCurrentPostId: () => getCurrentPostId,
    getCurrentPostLastRevisionId: () => getCurrentPostLastRevisionId,
    getCurrentPostRevisionsCount: () => getCurrentPostRevisionsCount,
    getCurrentPostType: () => getCurrentPostType,
    getCurrentTemplateId: () => getCurrentTemplateId,
    getDeviceType: () => getDeviceType,
    getEditedPostAttribute: () => getEditedPostAttribute,
    getEditedPostContent: () => getEditedPostContent,
    getEditedPostPreviewLink: () => getEditedPostPreviewLink,
    getEditedPostSlug: () => getEditedPostSlug,
    getEditedPostVisibility: () => getEditedPostVisibility,
    getEditorBlocks: () => getEditorBlocks,
    getEditorMode: () => getEditorMode,
    getEditorSelection: () => getEditorSelection,
    getEditorSelectionEnd: () => getEditorSelectionEnd,
    getEditorSelectionStart: () => getEditorSelectionStart,
    getEditorSettings: () => getEditorSettings,
    getFirstMultiSelectedBlockClientId: () => getFirstMultiSelectedBlockClientId,
    getGlobalBlockCount: () => getGlobalBlockCount,
    getInserterItems: () => getInserterItems,
    getLastMultiSelectedBlockClientId: () => getLastMultiSelectedBlockClientId,
    getMultiSelectedBlockClientIds: () => getMultiSelectedBlockClientIds,
    getMultiSelectedBlocks: () => getMultiSelectedBlocks,
    getMultiSelectedBlocksEndClientId: () => getMultiSelectedBlocksEndClientId,
    getMultiSelectedBlocksStartClientId: () => getMultiSelectedBlocksStartClientId,
    getNextBlockClientId: () => getNextBlockClientId,
    getPermalink: () => getPermalink,
    getPermalinkParts: () => getPermalinkParts,
    getPostEdits: () => getPostEdits,
    getPostLockUser: () => getPostLockUser,
    getPostTypeLabel: () => getPostTypeLabel,
    getPreviousBlockClientId: () => getPreviousBlockClientId,
    getRenderingMode: () => getRenderingMode,
    getSelectedBlock: () => getSelectedBlock,
    getSelectedBlockClientId: () => getSelectedBlockClientId,
    getSelectedBlockCount: () => getSelectedBlockCount,
    getSelectedBlocksInitialCaretPosition: () => getSelectedBlocksInitialCaretPosition,
    getStateBeforeOptimisticTransaction: () => getStateBeforeOptimisticTransaction,
    getSuggestedPostFormat: () => getSuggestedPostFormat,
    getTemplate: () => getTemplate,
    getTemplateLock: () => getTemplateLock,
    hasChangedContent: () => hasChangedContent,
    hasEditorRedo: () => hasEditorRedo,
    hasEditorUndo: () => hasEditorUndo,
    hasInserterItems: () => hasInserterItems,
    hasMultiSelection: () => hasMultiSelection,
    hasNonPostEntityChanges: () => hasNonPostEntityChanges,
    hasSelectedBlock: () => hasSelectedBlock,
    hasSelectedInnerBlock: () => hasSelectedInnerBlock,
    inSomeHistory: () => inSomeHistory,
    isAncestorMultiSelected: () => isAncestorMultiSelected,
    isAutosavingPost: () => isAutosavingPost,
    isBlockInsertionPointVisible: () => isBlockInsertionPointVisible,
    isBlockMultiSelected: () => isBlockMultiSelected,
    isBlockSelected: () => isBlockSelected,
    isBlockValid: () => isBlockValid,
    isBlockWithinSelection: () => isBlockWithinSelection,
    isCaretWithinFormattedText: () => isCaretWithinFormattedText,
    isCleanNewPost: () => isCleanNewPost,
    isCurrentPostPending: () => isCurrentPostPending,
    isCurrentPostPublished: () => isCurrentPostPublished,
    isCurrentPostScheduled: () => isCurrentPostScheduled,
    isDeletingPost: () => isDeletingPost,
    isEditedPostAutosaveable: () => isEditedPostAutosaveable,
    isEditedPostBeingScheduled: () => isEditedPostBeingScheduled,
    isEditedPostDateFloating: () => isEditedPostDateFloating,
    isEditedPostDirty: () => isEditedPostDirty,
    isEditedPostEmpty: () => isEditedPostEmpty,
    isEditedPostNew: () => isEditedPostNew,
    isEditedPostPublishable: () => isEditedPostPublishable,
    isEditedPostSaveable: () => isEditedPostSaveable,
    isEditorPanelEnabled: () => isEditorPanelEnabled,
    isEditorPanelOpened: () => isEditorPanelOpened,
    isEditorPanelRemoved: () => isEditorPanelRemoved,
    isFirstMultiSelectedBlock: () => isFirstMultiSelectedBlock,
    isInserterOpened: () => isInserterOpened,
    isListViewOpened: () => isListViewOpened,
    isMultiSelecting: () => isMultiSelecting,
    isPermalinkEditable: () => isPermalinkEditable,
    isPostAutosavingLocked: () => isPostAutosavingLocked,
    isPostLockTakeover: () => isPostLockTakeover,
    isPostLocked: () => isPostLocked,
    isPostSavingLocked: () => isPostSavingLocked,
    isPreviewingPost: () => isPreviewingPost,
    isPublishSidebarEnabled: () => isPublishSidebarEnabled,
    isPublishSidebarOpened: () => isPublishSidebarOpened,
    isPublishingPost: () => isPublishingPost,
    isSavingNonPostEntityChanges: () => isSavingNonPostEntityChanges,
    isSavingPost: () => isSavingPost,
    isSelectionEnabled: () => isSelectionEnabled,
    isTyping: () => isTyping,
    isValidTemplate: () => isValidTemplate
  });
  var import_blocks = __toESM(require_blocks(), 1);
  var import_date = __toESM(require_date(), 1);
  var import_url = __toESM(require_url(), 1);
  var import_data3 = __toESM(require_data(), 1);
  var import_deprecated = __toESM(require_deprecated(), 1);
  var import_element2 = __toESM(require_element(), 1);
  var import_block_editor2 = __toESM(require_block_editor(), 1);
  var import_core_data = __toESM(require_core_data(), 1);
  var import_preferences = __toESM(require_preferences(), 1);

  // packages/editor/build-module/store/constants.mjs
  var EDIT_MERGE_PROPERTIES = /* @__PURE__ */ new Set(["meta"]);
  var STORE_NAME = "core/editor";
  var PERMALINK_POSTNAME_REGEX = /%(?:postname|pagename)%/;
  var ONE_MINUTE_IN_MS = 60 * 1e3;
  var AUTOSAVE_PROPERTIES = ["title", "excerpt", "content"];
  var TEMPLATE_POST_TYPE = "wp_template";
  var TEMPLATE_PART_POST_TYPE = "wp_template_part";
  var PATTERN_POST_TYPE = "wp_block";
  var NAVIGATION_POST_TYPE = "wp_navigation";
  var ATTACHMENT_POST_TYPE = "attachment";
  var TEMPLATE_ORIGINS = {
    custom: "custom",
    theme: "theme",
    plugin: "plugin"
  };
  var TEMPLATE_POST_TYPES = ["wp_template", "wp_template_part"];
  var GLOBAL_POST_TYPES = [
    ...TEMPLATE_POST_TYPES,
    "wp_block",
    "wp_navigation"
  ];
  var DESIGN_POST_TYPES = [
    TEMPLATE_POST_TYPE,
    TEMPLATE_PART_POST_TYPE,
    PATTERN_POST_TYPE,
    NAVIGATION_POST_TYPE
  ];

  // packages/icons/build-module/icon/index.mjs
  var import_element = __toESM(require_element(), 1);
  var icon_default = (0, import_element.forwardRef)(
    ({ icon, size: size3 = 24, ...props }, ref) => {
      return (0, import_element.cloneElement)(icon, {
        width: size3,
        height: size3,
        ...props,
        ref
      });
    }
  );

  // packages/icons/build-module/library/add-template.mjs
  var import_primitives = __toESM(require_primitives(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  var add_template_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M18.5 5.5V8H20V5.5H22.5V4H20V1.5H18.5V4H16V5.5H18.5ZM13.9624 4H6C4.89543 4 4 4.89543 4 6V18C4 19.1046 4.89543 20 6 20H18C19.1046 20 20 19.1046 20 18V10.0391H18.5V18C18.5 18.2761 18.2761 18.5 18 18.5H10L10 10.4917L16.4589 10.5139L16.4641 9.01389L5.5 8.97618V6C5.5 5.72386 5.72386 5.5 6 5.5H13.9624V4ZM5.5 10.4762V18C5.5 18.2761 5.72386 18.5 6 18.5H8.5L8.5 10.4865L5.5 10.4762Z" }) });

  // packages/icons/build-module/library/archive.mjs
  var import_primitives2 = __toESM(require_primitives(), 1);
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  var archive_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/audio.mjs
  var import_primitives3 = __toESM(require_primitives(), 1);
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
  var audio_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.Path, { d: "M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z" }) });

  // packages/icons/build-module/library/background.mjs
  var import_primitives4 = __toESM(require_primitives(), 1);
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
  var background_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M11.53 4.47a.75.75 0 1 0-1.06 1.06l8 8a.75.75 0 1 0 1.06-1.06l-8-8Zm5 1a.75.75 0 1 0-1.06 1.06l2 2a.75.75 0 1 0 1.06-1.06l-2-2Zm-11.06 10a.75.75 0 0 1 1.06 0l2 2a.75.75 0 1 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06Zm.06-5a.75.75 0 0 0-1.06 1.06l8 8a.75.75 0 1 0 1.06-1.06l-8-8Zm-.06-3a.75.75 0 0 1 1.06 0l10 10a.75.75 0 1 1-1.06 1.06l-10-10a.75.75 0 0 1 0-1.06Zm3.06-2a.75.75 0 0 0-1.06 1.06l10 10a.75.75 0 1 0 1.06-1.06l-10-10Z" }) });

  // packages/icons/build-module/library/backup.mjs
  var import_primitives5 = __toESM(require_primitives(), 1);
  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
  var backup_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.Path, { 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" }) });

  // packages/icons/build-module/library/block-default.mjs
  var import_primitives6 = __toESM(require_primitives(), 1);
  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
  var block_default_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.Path, { d: "M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z" }) });

  // packages/icons/build-module/library/check.mjs
  var import_primitives7 = __toESM(require_primitives(), 1);
  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
  var check_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.Path, { d: "M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z" }) });

  // packages/icons/build-module/library/chevron-down.mjs
  var import_primitives8 = __toESM(require_primitives(), 1);
  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
  var chevron_down_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.Path, { d: "M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z" }) });

  // packages/icons/build-module/library/chevron-left-small.mjs
  var import_primitives9 = __toESM(require_primitives(), 1);
  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
  var chevron_left_small_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.Path, { d: "m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z" }) });

  // packages/icons/build-module/library/chevron-left.mjs
  var import_primitives10 = __toESM(require_primitives(), 1);
  var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
  var chevron_left_default = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.Path, { d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z" }) });

  // packages/icons/build-module/library/chevron-right-small.mjs
  var import_primitives11 = __toESM(require_primitives(), 1);
  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
  var chevron_right_small_default = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives11.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives11.Path, { d: "M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z" }) });

  // packages/icons/build-module/library/chevron-right.mjs
  var import_primitives12 = __toESM(require_primitives(), 1);
  var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
  var chevron_right_default = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.Path, { d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z" }) });

  // packages/icons/build-module/library/chevron-up.mjs
  var import_primitives13 = __toESM(require_primitives(), 1);
  var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
  var chevron_up_default = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives13.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives13.Path, { d: "M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z" }) });

  // packages/icons/build-module/library/close-small.mjs
  var import_primitives14 = __toESM(require_primitives(), 1);
  var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
  var close_small_default = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives14.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives14.Path, { 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" }) });

  // packages/icons/build-module/library/close.mjs
  var import_primitives15 = __toESM(require_primitives(), 1);
  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
  var close_default = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives15.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives15.Path, { d: "m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z" }) });

  // packages/icons/build-module/library/cloud-upload.mjs
  var import_primitives16 = __toESM(require_primitives(), 1);
  var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
  var cloud_upload_default = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives16.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives16.Path, { d: "M17.3 10.1C17.3 7.60001 15.2 5.70001 12.5 5.70001C10.3 5.70001 8.4 7.10001 7.9 9.00001H7.7C5.7 9.00001 4 10.7 4 12.8C4 14.9 5.7 16.6 7.7 16.6H9.5V15.2H7.7C6.5 15.2 5.5 14.1 5.5 12.9C5.5 11.7 6.5 10.5 7.7 10.5H9L9.3 9.40001C9.7 8.10001 11 7.20001 12.5 7.20001C14.3 7.20001 15.8 8.50001 15.8 10.1V11.4L17.1 11.6C17.9 11.7 18.5 12.5 18.5 13.4C18.5 14.4 17.7 15.2 16.8 15.2H14.5V16.6H16.7C18.5 16.6 19.9 15.1 19.9 13.3C20 11.7 18.8 10.4 17.3 10.1Z M14.1245 14.2426L15.1852 13.182L12.0032 10L8.82007 13.1831L9.88072 14.2438L11.25 12.8745V18H12.75V12.8681L14.1245 14.2426Z" }) });

  // packages/icons/build-module/library/cloud.mjs
  var import_primitives17 = __toESM(require_primitives(), 1);
  var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
  var cloud_default = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives17.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives17.Path, { d: "M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-9c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4h1.3l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8-.1 1-.9 1.8-1.8 1.8z" }) });

  // packages/icons/build-module/library/code.mjs
  var import_primitives18 = __toESM(require_primitives(), 1);
  var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
  var code_default = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_primitives18.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_primitives18.Path, { d: "M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z" }) });

  // packages/icons/build-module/library/color.mjs
  var import_primitives19 = __toESM(require_primitives(), 1);
  var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
  var color_default = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_primitives19.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_primitives19.Path, { 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" }) });

  // packages/icons/build-module/library/comment-author-avatar.mjs
  var import_primitives20 = __toESM(require_primitives(), 1);
  var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
  var comment_author_avatar_default = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_primitives20.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_primitives20.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/comment.mjs
  var import_primitives21 = __toESM(require_primitives(), 1);
  var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
  var comment_default = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_primitives21.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_primitives21.Path, { d: "M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z" }) });

  // packages/icons/build-module/library/copy-small.mjs
  var import_primitives22 = __toESM(require_primitives(), 1);
  var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
  var copy_small_default = /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives22.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives22.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z" }) });

  // packages/icons/build-module/library/desktop.mjs
  var import_primitives23 = __toESM(require_primitives(), 1);
  var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
  var desktop_default = /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_primitives23.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_primitives23.Path, { d: "M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z" }) });

  // packages/icons/build-module/library/download.mjs
  var import_primitives24 = __toESM(require_primitives(), 1);
  var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
  var download_default = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_primitives24.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_primitives24.Path, { 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" }) });

  // packages/icons/build-module/library/drafts.mjs
  var import_primitives25 = __toESM(require_primitives(), 1);
  var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
  var drafts_default = /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_primitives25.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_primitives25.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/drawer-left.mjs
  var import_primitives26 = __toESM(require_primitives(), 1);
  var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
  var drawer_left_default = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_primitives26.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_primitives26.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.5 18.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h2.5v13zm10-.5c0 .3-.2.5-.5.5h-8v-13h8c.3 0 .5.2.5.5v12z" }) });

  // packages/icons/build-module/library/drawer-right.mjs
  var import_primitives27 = __toESM(require_primitives(), 1);
  var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
  var drawer_right_default = /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_primitives27.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_primitives27.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z" }) });

  // packages/icons/build-module/library/envelope.mjs
  var import_primitives28 = __toESM(require_primitives(), 1);
  var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
  var envelope_default = /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_primitives28.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_primitives28.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M3 7c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Zm2-.5h14c.3 0 .5.2.5.5v1L12 13.5 4.5 7.9V7c0-.3.2-.5.5-.5Zm-.5 3.3V17c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V9.8L12 15.4 4.5 9.8Z" }) });

  // packages/icons/build-module/library/error.mjs
  var import_primitives29 = __toESM(require_primitives(), 1);
  var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
  var error_default = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_primitives29.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_primitives29.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z" }) });

  // packages/icons/build-module/library/external.mjs
  var import_primitives30 = __toESM(require_primitives(), 1);
  var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
  var external_default = /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_primitives30.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_primitives30.Path, { 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" }) });

  // packages/icons/build-module/library/file.mjs
  var import_primitives31 = __toESM(require_primitives(), 1);
  var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
  var file_default = /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_primitives31.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_primitives31.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/footer.mjs
  var import_primitives32 = __toESM(require_primitives(), 1);
  var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
  var footer_default = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_primitives32.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_primitives32.Path, { fillRule: "evenodd", d: "M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z" }) });

  // packages/icons/build-module/library/format-list-bullets.mjs
  var import_primitives33 = __toESM(require_primitives(), 1);
  var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
  var format_list_bullets_default = /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_primitives33.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_primitives33.Path, { 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" }) });

  // packages/icons/build-module/library/header.mjs
  var import_primitives34 = __toESM(require_primitives(), 1);
  var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
  var header_default = /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_primitives34.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_primitives34.Path, { d: "M18.5 10.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" }) });

  // packages/icons/build-module/library/info.mjs
  var import_primitives35 = __toESM(require_primitives(), 1);
  var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
  var info_default = /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_primitives35.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_primitives35.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z" }) });

  // packages/icons/build-module/library/keyboard.mjs
  var import_primitives36 = __toESM(require_primitives(), 1);
  var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
  var keyboard_default = /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_primitives36.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_primitives36.Path, { d: "m16 15.5h-8v-1.5h8zm-7.5-2.5h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm-9-3h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2z" }),
    /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_primitives36.Path, { d: "m18.5 6.5h-13a.5.5 0 0 0 -.5.5v9.5a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-9.5a.5.5 0 0 0 -.5-.5zm-13-1.5h13a2 2 0 0 1 2 2v9.5a2 2 0 0 1 -2 2h-13a2 2 0 0 1 -2-2v-9.5a2 2 0 0 1 2-2z" })
  ] });

  // packages/icons/build-module/library/layout.mjs
  var import_primitives37 = __toESM(require_primitives(), 1);
  var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
  var layout_default = /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_primitives37.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_primitives37.Path, { 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" }) });

  // packages/icons/build-module/library/link.mjs
  var import_primitives38 = __toESM(require_primitives(), 1);
  var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
  var link_default = /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_primitives38.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_primitives38.Path, { d: "M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z" }) });

  // packages/icons/build-module/library/list-view.mjs
  var import_primitives39 = __toESM(require_primitives(), 1);
  var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
  var list_view_default = /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_primitives39.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_primitives39.Path, { d: "M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z" }) });

  // packages/icons/build-module/library/lock-small.mjs
  var import_primitives40 = __toESM(require_primitives(), 1);
  var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
  var lock_small_default = /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_primitives40.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_primitives40.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/mobile.mjs
  var import_primitives41 = __toESM(require_primitives(), 1);
  var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
  var mobile_default = /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_primitives41.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_primitives41.Path, { d: "M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z" }) });

  // packages/icons/build-module/library/more-vertical.mjs
  var import_primitives42 = __toESM(require_primitives(), 1);
  var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
  var more_vertical_default = /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_primitives42.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_primitives42.Path, { d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" }) });

  // packages/icons/build-module/library/navigation-overlay.mjs
  var import_primitives43 = __toESM(require_primitives(), 1);
  var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
  var navigation_overlay_default = /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_primitives43.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_primitives43.Path, { d: "M18.5 10a1.5 1.5 0 0 1 1.5 1.5v7a1.5 1.5 0 0 1-1.5 1.5h-7a1.5 1.5 0 0 1-1.5-1.5v-7a1.5 1.5 0 0 1 1.5-1.5zM16 4a2 2 0 0 1 2 2v2h-1.5V6a.5.5 0 0 0-.5-.5H6a.5.5 0 0 0-.5.5v3H8v1.5H5.5V16a.5.5 0 0 0 .5.5h2V18H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z" }) });

  // packages/icons/build-module/library/navigation.mjs
  var import_primitives44 = __toESM(require_primitives(), 1);
  var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
  var navigation_default = /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_primitives44.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_primitives44.Path, { 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" }) });

  // packages/icons/build-module/library/next.mjs
  var import_primitives45 = __toESM(require_primitives(), 1);
  var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
  var next_default = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_primitives45.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_primitives45.Path, { 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" }) });

  // packages/icons/build-module/library/not-allowed.mjs
  var import_primitives46 = __toESM(require_primitives(), 1);
  var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
  var not_allowed_default = /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_primitives46.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_primitives46.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/page.mjs
  var import_primitives47 = __toESM(require_primitives(), 1);
  var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
  var page_default = /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_primitives47.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_primitives47.Path, { d: "M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z" }),
    /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_primitives47.Path, { 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" })
  ] });

  // packages/icons/build-module/library/pencil.mjs
  var import_primitives48 = __toESM(require_primitives(), 1);
  var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
  var pencil_default = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_primitives48.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_primitives48.Path, { d: "m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z" }) });

  // packages/icons/build-module/library/pending.mjs
  var import_primitives49 = __toESM(require_primitives(), 1);
  var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
  var pending_default = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_primitives49.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_primitives49.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/plus.mjs
  var import_primitives50 = __toESM(require_primitives(), 1);
  var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
  var plus_default = /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_primitives50.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_primitives50.Path, { d: "M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z" }) });

  // packages/icons/build-module/library/previous.mjs
  var import_primitives51 = __toESM(require_primitives(), 1);
  var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
  var previous_default = /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_primitives51.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_primitives51.Path, { 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" }) });

  // packages/icons/build-module/library/published.mjs
  var import_primitives52 = __toESM(require_primitives(), 1);
  var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
  var published_default = /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_primitives52.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_primitives52.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/redo.mjs
  var import_primitives53 = __toESM(require_primitives(), 1);
  var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
  var redo_default = /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_primitives53.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_primitives53.Path, { 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" }) });

  // packages/icons/build-module/library/reset.mjs
  var import_primitives54 = __toESM(require_primitives(), 1);
  var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
  var reset_default = /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_primitives54.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_primitives54.Path, { d: "M7 11.5h10V13H7z" }) });

  // packages/icons/build-module/library/rotate-left.mjs
  var import_primitives55 = __toESM(require_primitives(), 1);
  var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
  var rotate_left_default = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_primitives55.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_primitives55.Path, { 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" }) });

  // packages/icons/build-module/library/rotate-right.mjs
  var import_primitives56 = __toESM(require_primitives(), 1);
  var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
  var rotate_right_default = /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_primitives56.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_primitives56.Path, { 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" }) });

  // packages/icons/build-module/library/scheduled.mjs
  var import_primitives57 = __toESM(require_primitives(), 1);
  var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1);
  var scheduled_default = /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_primitives57.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_primitives57.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/seen.mjs
  var import_primitives58 = __toESM(require_primitives(), 1);
  var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1);
  var seen_default = /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_primitives58.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_primitives58.Path, { 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" }) });

  // packages/icons/build-module/library/settings.mjs
  var import_primitives59 = __toESM(require_primitives(), 1);
  var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1);
  var settings_default = /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_primitives59.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_primitives59.Path, { 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" }),
    /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_primitives59.Path, { 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" })
  ] });

  // packages/icons/build-module/library/shadow.mjs
  var import_primitives60 = __toESM(require_primitives(), 1);
  var import_jsx_runtime60 = __toESM(require_jsx_runtime(), 1);
  var shadow_default = /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_primitives60.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_primitives60.Path, { 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" }) });

  // packages/icons/build-module/library/shuffle.mjs
  var import_primitives61 = __toESM(require_primitives(), 1);
  var import_jsx_runtime61 = __toESM(require_jsx_runtime(), 1);
  var shuffle_default = /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_primitives61.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_primitives61.Path, { 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" }) });

  // packages/icons/build-module/library/sidebar.mjs
  var import_primitives62 = __toESM(require_primitives(), 1);
  var import_jsx_runtime62 = __toESM(require_jsx_runtime(), 1);
  var sidebar_default = /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_primitives62.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_primitives62.Path, { 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.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z" }) });

  // packages/icons/build-module/library/square.mjs
  var import_primitives63 = __toESM(require_primitives(), 1);
  var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1);
  var square_default = /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_primitives63.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_primitives63.Path, { fill: "none", d: "M5.75 12.75V18.25H11.25M12.75 5.75H18.25V11.25", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "square" }) });

  // packages/icons/build-module/library/star-empty.mjs
  var import_primitives64 = __toESM(require_primitives(), 1);
  var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
  var star_empty_default = /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_primitives64.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_primitives64.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/star-filled.mjs
  var import_primitives65 = __toESM(require_primitives(), 1);
  var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1);
  var star_filled_default = /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_primitives65.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_primitives65.Path, { 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" }) });

  // packages/icons/build-module/library/styles.mjs
  var import_primitives66 = __toESM(require_primitives(), 1);
  var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1);
  var styles_default = /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_primitives66.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_primitives66.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z" }) });

  // packages/icons/build-module/library/symbol-filled.mjs
  var import_primitives67 = __toESM(require_primitives(), 1);
  var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
  var symbol_filled_default = /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_primitives67.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_primitives67.Path, { 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" }) });

  // packages/icons/build-module/library/symbol.mjs
  var import_primitives68 = __toESM(require_primitives(), 1);
  var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
  var symbol_default = /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_primitives68.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_primitives68.Path, { 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" }) });

  // packages/icons/build-module/library/tablet.mjs
  var import_primitives69 = __toESM(require_primitives(), 1);
  var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
  var tablet_default = /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_primitives69.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_primitives69.Path, { d: "M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z" }) });

  // packages/icons/build-module/library/trash.mjs
  var import_primitives70 = __toESM(require_primitives(), 1);
  var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
  var trash_default = /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_primitives70.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_primitives70.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/typography.mjs
  var import_primitives71 = __toESM(require_primitives(), 1);
  var import_jsx_runtime71 = __toESM(require_jsx_runtime(), 1);
  var typography_default = /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_primitives71.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_primitives71.Path, { d: "m8.6 7 3.9 10.8h-1.7l-1-2.8H5.7l-1 2.8H3L6.9 7h1.7Zm-2.4 6.6h3L7.7 9.3l-1.5 4.3ZM17.691 8.879c.473 0 .88.055 1.221.165.352.1.643.264.875.495.274.253.456.572.544.957.088.374.132.83.132 1.37v4.554c0 .274.033.472.099.593.077.11.198.166.363.166.11 0 .215-.028.313-.083.11-.055.237-.137.38-.247l.165.28a3.304 3.304 0 0 1-.71.446c-.23.11-.527.165-.89.165-.352 0-.639-.055-.858-.165-.22-.11-.386-.27-.495-.479-.1-.209-.149-.468-.149-.775-.286.462-.627.814-1.023 1.056-.396.242-.858.363-1.386.363-.462 0-.858-.088-1.188-.264a1.752 1.752 0 0 1-.742-.726 2.201 2.201 0 0 1-.248-1.056c0-.484.11-.875.33-1.172.22-.308.5-.556.841-.742.352-.187.721-.341 1.106-.462.396-.132.765-.253 1.106-.363.351-.121.637-.259.857-.413.232-.154.347-.357.347-.61V10.81c0-.396-.066-.71-.198-.941a1.05 1.05 0 0 0-.511-.511 1.763 1.763 0 0 0-.76-.149c-.253 0-.522.039-.808.116a1.165 1.165 0 0 0-.677.412 1.1 1.1 0 0 1 .595.396c.165.187.247.424.247.71 0 .307-.104.55-.313.726-.198.176-.451.263-.76.263-.34 0-.594-.104-.758-.313a1.231 1.231 0 0 1-.248-.759c0-.297.072-.539.214-.726.154-.187.352-.363.595-.528.264-.176.6-.324 1.006-.445.418-.121.88-.182 1.386-.182Zm.99 3.729a1.57 1.57 0 0 1-.528.462c-.231.121-.479.248-.742.38a5.377 5.377 0 0 0-.76.462c-.23.165-.423.38-.577.643-.154.264-.231.6-.231 1.007 0 .429.11.77.33 1.023.22.242.517.363.891.363.308 0 .594-.088.858-.264.275-.176.528-.44.759-.792v-3.284Z" }) });

  // packages/icons/build-module/library/undo.mjs
  var import_primitives72 = __toESM(require_primitives(), 1);
  var import_jsx_runtime72 = __toESM(require_jsx_runtime(), 1);
  var undo_default = /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_primitives72.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_primitives72.Path, { 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" }) });

  // packages/icons/build-module/library/unseen.mjs
  var import_primitives73 = __toESM(require_primitives(), 1);
  var import_jsx_runtime73 = __toESM(require_jsx_runtime(), 1);
  var unseen_default = /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_primitives73.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_primitives73.Path, { d: "M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z" }) });

  // packages/icons/build-module/library/verse.mjs
  var import_primitives74 = __toESM(require_primitives(), 1);
  var import_jsx_runtime74 = __toESM(require_jsx_runtime(), 1);
  var verse_default = /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_primitives74.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_primitives74.Path, { 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" }) });

  // packages/icons/build-module/library/video.mjs
  var import_primitives75 = __toESM(require_primitives(), 1);
  var import_jsx_runtime75 = __toESM(require_jsx_runtime(), 1);
  var video_default = /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_primitives75.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_primitives75.Path, { 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" }) });

  // packages/icons/build-module/library/wordpress.mjs
  var import_primitives76 = __toESM(require_primitives(), 1);
  var import_jsx_runtime76 = __toESM(require_jsx_runtime(), 1);
  var wordpress_default = /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_primitives76.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_primitives76.Path, { 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" }) });

  // packages/editor/build-module/utils/get-template-part-icon.mjs
  function getTemplatePartIcon(areaOrIconName) {
    if ("header" === areaOrIconName) {
      return header_default;
    } else if ("footer" === areaOrIconName) {
      return footer_default;
    } else if ("sidebar" === areaOrIconName) {
      return sidebar_default;
    } else if ("navigation-overlay" === areaOrIconName) {
      return navigation_overlay_default;
    }
    return symbol_filled_default;
  }

  // packages/editor/build-module/lock-unlock.mjs
  var import_private_apis = __toESM(require_private_apis(), 1);
  var { lock, unlock } = (0, import_private_apis.__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/editor"
  );

  // packages/editor/build-module/utils/get-template-info.mjs
  var EMPTY_OBJECT = {};
  var getTemplateInfo = (params) => {
    if (!params) {
      return EMPTY_OBJECT;
    }
    const { templateTypes, templateAreas, template: template2 } = params;
    const { description, slug, title, area } = template2;
    const { title: defaultTitle, description: defaultDescription } = Object.values(templateTypes).find((type) => type.slug === slug) ?? EMPTY_OBJECT;
    const templateTitle = typeof title === "string" ? title : title?.rendered;
    const templateDescription = typeof description === "string" ? description : description?.raw;
    const templateAreasWithIcon = templateAreas?.map((item) => ({
      ...item,
      icon: getTemplatePartIcon(item.icon)
    }));
    const templateIcon = templateAreasWithIcon?.find((item) => area === item.area)?.icon || layout_default;
    return {
      title: templateTitle && templateTitle !== slug ? templateTitle : defaultTitle || slug,
      description: templateDescription || defaultDescription,
      icon: templateIcon
    };
  };

  // packages/editor/build-module/store/selectors.mjs
  var EMPTY_OBJECT2 = {};
  var hasEditorUndo = (0, import_data3.createRegistrySelector)((select6) => () => {
    return select6(import_core_data.store).hasUndo();
  });
  var hasEditorRedo = (0, import_data3.createRegistrySelector)((select6) => () => {
    return select6(import_core_data.store).hasRedo();
  });
  function isEditedPostNew(state) {
    return getCurrentPost(state).status === "auto-draft";
  }
  function hasChangedContent(state) {
    const edits = getPostEdits(state);
    return "content" in edits;
  }
  var isEditedPostDirty = (0, import_data3.createRegistrySelector)(
    (select6) => (state) => {
      const postType2 = getCurrentPostType(state);
      const postId2 = getCurrentPostId(state);
      return select6(import_core_data.store).hasEditsForEntityRecord(
        "postType",
        postType2,
        postId2
      );
    }
  );
  var hasNonPostEntityChanges = (0, import_data3.createRegistrySelector)(
    (select6) => (state) => {
      const dirtyEntityRecords = select6(import_core_data.store).__experimentalGetDirtyEntityRecords();
      const { type, id } = getCurrentPost(state);
      return dirtyEntityRecords.some(
        (entityRecord) => entityRecord.kind !== "postType" || entityRecord.name !== type || entityRecord.key !== id
      );
    }
  );
  function isCleanNewPost(state) {
    return !isEditedPostDirty(state) && isEditedPostNew(state);
  }
  var getCurrentPost = (0, import_data3.createRegistrySelector)(
    (select6) => (state) => {
      const postId2 = getCurrentPostId(state);
      const postType2 = getCurrentPostType(state);
      const post2 = select6(import_core_data.store).getRawEntityRecord(
        "postType",
        postType2,
        postId2
      );
      if (post2) {
        return post2;
      }
      return EMPTY_OBJECT2;
    }
  );
  function getCurrentPostType(state) {
    return state.postType;
  }
  function getCurrentPostId(state) {
    return state.postId;
  }
  function getCurrentTemplateId(state) {
    return state.templateId;
  }
  function getCurrentPostRevisionsCount(state) {
    return getCurrentPost(state)._links?.["version-history"]?.[0]?.count ?? 0;
  }
  function getCurrentPostLastRevisionId(state) {
    return getCurrentPost(state)._links?.["predecessor-version"]?.[0]?.id ?? null;
  }
  var getPostEdits = (0, import_data3.createRegistrySelector)((select6) => (state) => {
    const postType2 = getCurrentPostType(state);
    const postId2 = getCurrentPostId(state);
    return select6(import_core_data.store).getEntityRecordEdits(
      "postType",
      postType2,
      postId2
    ) || EMPTY_OBJECT2;
  });
  function getCurrentPostAttribute(state, attributeName) {
    switch (attributeName) {
      case "type":
        return getCurrentPostType(state);
      case "id":
        return getCurrentPostId(state);
      default:
        const post2 = getCurrentPost(state);
        if (!post2.hasOwnProperty(attributeName)) {
          break;
        }
        return getPostRawValue(post2[attributeName]);
    }
  }
  var getNestedEditedPostProperty = (0, import_data3.createSelector)(
    (state, attributeName) => {
      const edits = getPostEdits(state);
      if (!edits.hasOwnProperty(attributeName)) {
        return getCurrentPostAttribute(state, attributeName);
      }
      return {
        ...getCurrentPostAttribute(state, attributeName),
        ...edits[attributeName]
      };
    },
    (state, attributeName) => [
      getCurrentPostAttribute(state, attributeName),
      getPostEdits(state)[attributeName]
    ]
  );
  function getEditedPostAttribute(state, attributeName) {
    switch (attributeName) {
      case "content":
        return getEditedPostContent(state);
    }
    const edits = getPostEdits(state);
    if (!edits.hasOwnProperty(attributeName)) {
      return getCurrentPostAttribute(state, attributeName);
    }
    if (EDIT_MERGE_PROPERTIES.has(attributeName)) {
      return getNestedEditedPostProperty(state, attributeName);
    }
    return edits[attributeName];
  }
  var getAutosaveAttribute = (0, import_data3.createRegistrySelector)(
    (select6) => (state, attributeName) => {
      if (!AUTOSAVE_PROPERTIES.includes(attributeName) && attributeName !== "preview_link") {
        return;
      }
      const postType2 = getCurrentPostType(state);
      const postId2 = getCurrentPostId(state);
      const currentUserId = select6(import_core_data.store).getCurrentUser()?.id;
      const autosave2 = select6(import_core_data.store).getAutosave(
        postType2,
        postId2,
        currentUserId
      );
      if (autosave2) {
        return getPostRawValue(autosave2[attributeName]);
      }
    }
  );
  function getEditedPostVisibility(state) {
    const status = getEditedPostAttribute(state, "status");
    if (status === "private") {
      return "private";
    }
    const password = getEditedPostAttribute(state, "password");
    if (password) {
      return "password";
    }
    return "public";
  }
  function isCurrentPostPending(state) {
    return getCurrentPost(state).status === "pending";
  }
  function isCurrentPostPublished(state, currentPost) {
    const post2 = currentPost || getCurrentPost(state);
    return ["publish", "private"].indexOf(post2.status) !== -1 || post2.status === "future" && !(0, import_date.isInTheFuture)(
      new Date(Number((0, import_date.getDate)(post2.date)) - ONE_MINUTE_IN_MS)
    );
  }
  function isCurrentPostScheduled(state) {
    return getCurrentPost(state).status === "future" && !isCurrentPostPublished(state);
  }
  function isEditedPostPublishable(state) {
    const post2 = getCurrentPost(state);
    if (post2.type === ATTACHMENT_POST_TYPE) {
      return isEditedPostDirty(state);
    }
    return isEditedPostDirty(state) || ["publish", "private", "future"].indexOf(post2.status) === -1;
  }
  function isEditedPostSaveable(state) {
    if (isSavingPost(state)) {
      return false;
    }
    return !!getEditedPostAttribute(state, "title") || !!getEditedPostAttribute(state, "excerpt") || !isEditedPostEmpty(state) || import_element2.Platform.OS === "native";
  }
  var isEditedPostEmpty = (0, import_data3.createRegistrySelector)(
    (select6) => (state) => {
      const postId2 = getCurrentPostId(state);
      const postType2 = getCurrentPostType(state);
      const record = select6(import_core_data.store).getEditedEntityRecord(
        "postType",
        postType2,
        postId2
      );
      if (typeof record.content !== "function") {
        return !record.content;
      }
      const blocks = getEditedPostAttribute(state, "blocks");
      if (blocks.length === 0) {
        return true;
      }
      if (blocks.length > 1) {
        return false;
      }
      const blockName = blocks[0].name;
      if (blockName !== (0, import_blocks.getDefaultBlockName)() && blockName !== (0, import_blocks.getFreeformContentHandlerName)()) {
        return false;
      }
      return !getEditedPostContent(state);
    }
  );
  var isEditedPostAutosaveable = (0, import_data3.createRegistrySelector)(
    (select6) => (state) => {
      if (!isEditedPostSaveable(state)) {
        return false;
      }
      if (isPostAutosavingLocked(state)) {
        return false;
      }
      const postType2 = getCurrentPostType(state);
      const postTypeObject = select6(import_core_data.store).getPostType(postType2);
      if (!postTypeObject?.supports?.autosave) {
        return false;
      }
      const postId2 = getCurrentPostId(state);
      const hasFetchedAutosave = select6(import_core_data.store).hasFetchedAutosaves(
        postType2,
        postId2
      );
      const currentUserId = select6(import_core_data.store).getCurrentUser()?.id;
      const autosave2 = select6(import_core_data.store).getAutosave(
        postType2,
        postId2,
        currentUserId
      );
      if (!hasFetchedAutosave) {
        return false;
      }
      if (!autosave2) {
        return true;
      }
      if (hasChangedContent(state)) {
        return true;
      }
      return ["title", "excerpt", "meta"].some(
        (field) => getPostRawValue(autosave2[field]) !== getEditedPostAttribute(state, field)
      );
    }
  );
  function isEditedPostBeingScheduled(state) {
    const date = getEditedPostAttribute(state, "date");
    const checkedDate = new Date(
      Number((0, import_date.getDate)(date)) - ONE_MINUTE_IN_MS
    );
    return (0, import_date.isInTheFuture)(checkedDate);
  }
  function isEditedPostDateFloating(state) {
    const date = getEditedPostAttribute(state, "date");
    const modified = getEditedPostAttribute(state, "modified");
    const status = getCurrentPost(state).status;
    if (status === "draft" || status === "auto-draft" || status === "pending") {
      return date === modified || date === null;
    }
    return false;
  }
  function isDeletingPost(state) {
    return !!state.deleting.pending;
  }
  function isSavingPost(state) {
    return !!state.saving.pending;
  }
  var isSavingNonPostEntityChanges = (0, import_data3.createRegistrySelector)(
    (select6) => (state) => {
      const entitiesBeingSaved = select6(import_core_data.store).__experimentalGetEntitiesBeingSaved();
      const { type, id } = getCurrentPost(state);
      return entitiesBeingSaved.some(
        (entityRecord) => entityRecord.kind !== "postType" || entityRecord.name !== type || entityRecord.key !== id
      );
    }
  );
  var didPostSaveRequestSucceed = (0, import_data3.createRegistrySelector)(
    (select6) => (state) => {
      const postType2 = getCurrentPostType(state);
      const postId2 = getCurrentPostId(state);
      return !select6(import_core_data.store).getLastEntitySaveError(
        "postType",
        postType2,
        postId2
      );
    }
  );
  var didPostSaveRequestFail = (0, import_data3.createRegistrySelector)(
    (select6) => (state) => {
      const postType2 = getCurrentPostType(state);
      const postId2 = getCurrentPostId(state);
      return !!select6(import_core_data.store).getLastEntitySaveError(
        "postType",
        postType2,
        postId2
      );
    }
  );
  function isAutosavingPost(state) {
    return isSavingPost(state) && Boolean(state.saving.options?.isAutosave);
  }
  function isPreviewingPost(state) {
    return isSavingPost(state) && Boolean(state.saving.options?.isPreview);
  }
  function getEditedPostPreviewLink(state) {
    if (state.saving.pending || isSavingPost(state)) {
      return;
    }
    let previewLink = getAutosaveAttribute(state, "preview_link");
    if (!previewLink || "draft" === getCurrentPost(state).status) {
      previewLink = getEditedPostAttribute(state, "link");
      if (previewLink) {
        previewLink = (0, import_url.addQueryArgs)(previewLink, { preview: true });
      }
    }
    const featuredImageId = getEditedPostAttribute(state, "featured_media");
    if (previewLink && featuredImageId) {
      return (0, import_url.addQueryArgs)(previewLink, { _thumbnail_id: featuredImageId });
    }
    return previewLink;
  }
  var getSuggestedPostFormat = (0, import_data3.createRegistrySelector)(
    (select6) => () => {
      const blocks = select6(import_block_editor2.store).getBlocks();
      if (blocks.length > 2) {
        return null;
      }
      let name2;
      if (blocks.length === 1) {
        name2 = blocks[0].name;
        if (name2 === "core/embed") {
          const provider = blocks[0].attributes?.providerNameSlug;
          if (["youtube", "vimeo"].includes(provider)) {
            name2 = "core/video";
          } else if (["spotify", "soundcloud"].includes(provider)) {
            name2 = "core/audio";
          }
        }
      }
      if (blocks.length === 2 && blocks[1].name === "core/paragraph") {
        name2 = blocks[0].name;
      }
      switch (name2) {
        case "core/image":
          return "image";
        case "core/quote":
        case "core/pullquote":
          return "quote";
        case "core/gallery":
          return "gallery";
        case "core/video":
          return "video";
        case "core/audio":
          return "audio";
        default:
          return null;
      }
    }
  );
  var getEditedPostContent = (0, import_data3.createRegistrySelector)(
    (select6) => (state) => {
      const postId2 = getCurrentPostId(state);
      const postType2 = getCurrentPostType(state);
      const record = select6(import_core_data.store).getEditedEntityRecord(
        "postType",
        postType2,
        postId2
      );
      if (record) {
        if (typeof record.content === "function") {
          return record.content(record);
        } else if (record.blocks) {
          return (0, import_blocks.__unstableSerializeAndClean)(record.blocks);
        } else if (record.content) {
          return record.content;
        }
      }
      return "";
    }
  );
  function isPublishingPost(state) {
    return isSavingPost(state) && !isCurrentPostPublished(state) && getEditedPostAttribute(state, "status") === "publish";
  }
  function isPermalinkEditable(state) {
    const permalinkTemplate = getEditedPostAttribute(
      state,
      "permalink_template"
    );
    return PERMALINK_POSTNAME_REGEX.test(permalinkTemplate);
  }
  function getPermalink(state) {
    const permalinkParts = getPermalinkParts(state);
    if (!permalinkParts) {
      return null;
    }
    const { prefix: prefix2, postName, suffix } = permalinkParts;
    if (isPermalinkEditable(state)) {
      return prefix2 + postName + suffix;
    }
    return prefix2;
  }
  function getEditedPostSlug(state) {
    return getEditedPostAttribute(state, "slug") || (0, import_url.cleanForSlug)(getEditedPostAttribute(state, "title")) || getCurrentPostId(state);
  }
  function getPermalinkParts(state) {
    const permalinkTemplate = getEditedPostAttribute(
      state,
      "permalink_template"
    );
    if (!permalinkTemplate) {
      return null;
    }
    const postName = getEditedPostAttribute(state, "slug") || getEditedPostAttribute(state, "generated_slug");
    const [prefix2, suffix] = permalinkTemplate.split(
      PERMALINK_POSTNAME_REGEX
    );
    return {
      prefix: prefix2,
      postName,
      suffix
    };
  }
  function isPostLocked(state) {
    return state.postLock.isLocked;
  }
  function isPostSavingLocked(state) {
    return Object.keys(state.postSavingLock).length > 0;
  }
  function isPostAutosavingLocked(state) {
    return Object.keys(state.postAutosavingLock).length > 0;
  }
  function isPostLockTakeover(state) {
    return state.postLock.isTakeover;
  }
  function getPostLockUser(state) {
    return state.postLock.user;
  }
  function getActivePostLock(state) {
    return state.postLock.activePostLock;
  }
  function canUserUseUnfilteredHTML(state) {
    return Boolean(
      getCurrentPost(state)._links?.hasOwnProperty(
        "wp:action-unfiltered-html"
      )
    );
  }
  var isPublishSidebarEnabled = (0, import_data3.createRegistrySelector)(
    (select6) => () => !!select6(import_preferences.store).get("core", "isPublishSidebarEnabled")
  );
  var getEditorBlocks = (0, import_data3.createSelector)(
    (state) => {
      return getEditedPostAttribute(state, "blocks") || (0, import_blocks.parse)(getEditedPostContent(state));
    },
    (state) => [
      getEditedPostAttribute(state, "blocks"),
      getEditedPostContent(state)
    ]
  );
  function isEditorPanelRemoved(state, panelName) {
    return state.removedPanels.includes(panelName);
  }
  var isEditorPanelEnabled = (0, import_data3.createRegistrySelector)(
    (select6) => (state, panelName) => {
      const inactivePanels = select6(import_preferences.store).get(
        "core",
        "inactivePanels"
      );
      return !isEditorPanelRemoved(state, panelName) && !inactivePanels?.includes(panelName);
    }
  );
  var isEditorPanelOpened = (0, import_data3.createRegistrySelector)(
    (select6) => (state, panelName) => {
      const openPanels = select6(import_preferences.store).get(
        "core",
        "openPanels"
      );
      return !!openPanels?.includes(panelName);
    }
  );
  function getEditorSelectionStart(state) {
    (0, import_deprecated.default)("select('core/editor').getEditorSelectionStart", {
      since: "5.8",
      alternative: "select('core/editor').getEditorSelection"
    });
    return getEditedPostAttribute(state, "selection")?.selectionStart;
  }
  function getEditorSelectionEnd(state) {
    (0, import_deprecated.default)("select('core/editor').getEditorSelectionStart", {
      since: "5.8",
      alternative: "select('core/editor').getEditorSelection"
    });
    return getEditedPostAttribute(state, "selection")?.selectionEnd;
  }
  function getEditorSelection(state) {
    return getEditedPostAttribute(state, "selection");
  }
  function __unstableIsEditorReady(state) {
    return !!state.postId;
  }
  function getEditorSettings(state) {
    return state.editorSettings;
  }
  function getRenderingMode(state) {
    return state.renderingMode;
  }
  var getDeviceType = (0, import_data3.createRegistrySelector)(
    (select6) => (state) => {
      const isZoomOut = unlock(select6(import_block_editor2.store)).isZoomOut();
      if (isZoomOut) {
        return "Desktop";
      }
      return state.deviceType;
    }
  );
  function isListViewOpened(state) {
    return state.listViewPanel;
  }
  function isInserterOpened(state) {
    return !!state.blockInserterPanel;
  }
  var getEditorMode = (0, import_data3.createRegistrySelector)(
    (select6) => () => select6(import_preferences.store).get("core", "editorMode") ?? "visual"
  );
  function getStateBeforeOptimisticTransaction() {
    (0, import_deprecated.default)("select('core/editor').getStateBeforeOptimisticTransaction", {
      since: "5.7",
      hint: "No state history is kept on this store anymore"
    });
    return null;
  }
  function inSomeHistory() {
    (0, import_deprecated.default)("select('core/editor').inSomeHistory", {
      since: "5.7",
      hint: "No state history is kept on this store anymore"
    });
    return false;
  }
  function getBlockEditorSelector(name2) {
    return (0, import_data3.createRegistrySelector)((select6) => (state, ...args) => {
      (0, import_deprecated.default)("`wp.data.select( 'core/editor' )." + name2 + "`", {
        since: "5.3",
        alternative: "`wp.data.select( 'core/block-editor' )." + name2 + "`",
        version: "6.2"
      });
      return select6(import_block_editor2.store)[name2](...args);
    });
  }
  var getBlockName = getBlockEditorSelector("getBlockName");
  var isBlockValid = getBlockEditorSelector("isBlockValid");
  var getBlockAttributes = getBlockEditorSelector("getBlockAttributes");
  var getBlock = getBlockEditorSelector("getBlock");
  var getBlocks = getBlockEditorSelector("getBlocks");
  var getClientIdsOfDescendants = getBlockEditorSelector(
    "getClientIdsOfDescendants"
  );
  var getClientIdsWithDescendants = getBlockEditorSelector(
    "getClientIdsWithDescendants"
  );
  var getGlobalBlockCount = getBlockEditorSelector(
    "getGlobalBlockCount"
  );
  var getBlocksByClientId = getBlockEditorSelector(
    "getBlocksByClientId"
  );
  var getBlockCount = getBlockEditorSelector("getBlockCount");
  var getBlockSelectionStart = getBlockEditorSelector(
    "getBlockSelectionStart"
  );
  var getBlockSelectionEnd = getBlockEditorSelector(
    "getBlockSelectionEnd"
  );
  var getSelectedBlockCount = getBlockEditorSelector(
    "getSelectedBlockCount"
  );
  var hasSelectedBlock = getBlockEditorSelector("hasSelectedBlock");
  var getSelectedBlockClientId = getBlockEditorSelector(
    "getSelectedBlockClientId"
  );
  var getSelectedBlock = getBlockEditorSelector("getSelectedBlock");
  var getBlockRootClientId = getBlockEditorSelector(
    "getBlockRootClientId"
  );
  var getBlockHierarchyRootClientId = getBlockEditorSelector(
    "getBlockHierarchyRootClientId"
  );
  var getAdjacentBlockClientId = getBlockEditorSelector(
    "getAdjacentBlockClientId"
  );
  var getPreviousBlockClientId = getBlockEditorSelector(
    "getPreviousBlockClientId"
  );
  var getNextBlockClientId = getBlockEditorSelector(
    "getNextBlockClientId"
  );
  var getSelectedBlocksInitialCaretPosition = getBlockEditorSelector(
    "getSelectedBlocksInitialCaretPosition"
  );
  var getMultiSelectedBlockClientIds = getBlockEditorSelector(
    "getMultiSelectedBlockClientIds"
  );
  var getMultiSelectedBlocks = getBlockEditorSelector(
    "getMultiSelectedBlocks"
  );
  var getFirstMultiSelectedBlockClientId = getBlockEditorSelector(
    "getFirstMultiSelectedBlockClientId"
  );
  var getLastMultiSelectedBlockClientId = getBlockEditorSelector(
    "getLastMultiSelectedBlockClientId"
  );
  var isFirstMultiSelectedBlock = getBlockEditorSelector(
    "isFirstMultiSelectedBlock"
  );
  var isBlockMultiSelected = getBlockEditorSelector(
    "isBlockMultiSelected"
  );
  var isAncestorMultiSelected = getBlockEditorSelector(
    "isAncestorMultiSelected"
  );
  var getMultiSelectedBlocksStartClientId = getBlockEditorSelector(
    "getMultiSelectedBlocksStartClientId"
  );
  var getMultiSelectedBlocksEndClientId = getBlockEditorSelector(
    "getMultiSelectedBlocksEndClientId"
  );
  var getBlockOrder = getBlockEditorSelector("getBlockOrder");
  var getBlockIndex = getBlockEditorSelector("getBlockIndex");
  var isBlockSelected = getBlockEditorSelector("isBlockSelected");
  var hasSelectedInnerBlock = getBlockEditorSelector(
    "hasSelectedInnerBlock"
  );
  var isBlockWithinSelection = getBlockEditorSelector(
    "isBlockWithinSelection"
  );
  var hasMultiSelection = getBlockEditorSelector("hasMultiSelection");
  var isMultiSelecting = getBlockEditorSelector("isMultiSelecting");
  var isSelectionEnabled = getBlockEditorSelector("isSelectionEnabled");
  var getBlockMode = getBlockEditorSelector("getBlockMode");
  var isTyping = getBlockEditorSelector("isTyping");
  var isCaretWithinFormattedText = getBlockEditorSelector(
    "isCaretWithinFormattedText"
  );
  var getBlockInsertionPoint = getBlockEditorSelector(
    "getBlockInsertionPoint"
  );
  var isBlockInsertionPointVisible = getBlockEditorSelector(
    "isBlockInsertionPointVisible"
  );
  var isValidTemplate = getBlockEditorSelector("isValidTemplate");
  var getTemplate = getBlockEditorSelector("getTemplate");
  var getTemplateLock = getBlockEditorSelector("getTemplateLock");
  var canInsertBlockType = getBlockEditorSelector("canInsertBlockType");
  var getInserterItems = getBlockEditorSelector("getInserterItems");
  var hasInserterItems = getBlockEditorSelector("hasInserterItems");
  var getBlockListSettings = getBlockEditorSelector(
    "getBlockListSettings"
  );
  var __experimentalGetDefaultTemplateTypes = (0, import_data3.createRegistrySelector)(
    (select6) => () => {
      (0, import_deprecated.default)(
        "select('core/editor').__experimentalGetDefaultTemplateTypes",
        {
          since: "6.8",
          alternative: "select('core/core-data').getCurrentTheme()?.default_template_types"
        }
      );
      return select6(import_core_data.store).getCurrentTheme()?.default_template_types;
    }
  );
  var __experimentalGetDefaultTemplatePartAreas = (0, import_data3.createRegistrySelector)(
    (select6) => (0, import_data3.createSelector)(() => {
      (0, import_deprecated.default)(
        "select('core/editor').__experimentalGetDefaultTemplatePartAreas",
        {
          since: "6.8",
          alternative: "select('core/core-data').getCurrentTheme()?.default_template_part_areas"
        }
      );
      const areas = select6(import_core_data.store).getCurrentTheme()?.default_template_part_areas || [];
      return areas.map((item) => {
        return { ...item, icon: getTemplatePartIcon(item.icon) };
      });
    })
  );
  var __experimentalGetDefaultTemplateType = (0, import_data3.createRegistrySelector)(
    (select6) => (0, import_data3.createSelector)((state, slug) => {
      (0, import_deprecated.default)(
        "select('core/editor').__experimentalGetDefaultTemplateType",
        {
          since: "6.8"
        }
      );
      const templateTypes = select6(import_core_data.store).getCurrentTheme()?.default_template_types;
      if (!templateTypes) {
        return EMPTY_OBJECT2;
      }
      return Object.values(templateTypes).find(
        (type) => type.slug === slug
      ) ?? EMPTY_OBJECT2;
    })
  );
  var __experimentalGetTemplateInfo = (0, import_data3.createRegistrySelector)(
    (select6) => (0, import_data3.createSelector)((state, template2) => {
      (0, import_deprecated.default)("select('core/editor').__experimentalGetTemplateInfo", {
        since: "6.8"
      });
      if (!template2) {
        return EMPTY_OBJECT2;
      }
      const currentTheme = select6(import_core_data.store).getCurrentTheme();
      const templateTypes = currentTheme?.default_template_types || [];
      const templateAreas = currentTheme?.default_template_part_areas || [];
      return getTemplateInfo({
        template: template2,
        templateAreas,
        templateTypes
      });
    })
  );
  var getPostTypeLabel = (0, import_data3.createRegistrySelector)(
    (select6) => (state) => {
      const currentPostType = getCurrentPostType(state);
      const postType2 = select6(import_core_data.store).getPostType(currentPostType);
      return postType2?.labels?.singular_name;
    }
  );
  function isPublishSidebarOpened(state) {
    return state.publishSidebarActive;
  }

  // packages/editor/build-module/store/actions.mjs
  var actions_exports = {};
  __export(actions_exports, {
    __experimentalTearDownEditor: () => __experimentalTearDownEditor,
    __unstableSaveForPreview: () => __unstableSaveForPreview,
    autosave: () => autosave,
    clearSelectedBlock: () => clearSelectedBlock,
    closePublishSidebar: () => closePublishSidebar,
    createUndoLevel: () => createUndoLevel,
    disablePublishSidebar: () => disablePublishSidebar,
    editPost: () => editPost,
    enablePublishSidebar: () => enablePublishSidebar,
    enterFormattedText: () => enterFormattedText,
    exitFormattedText: () => exitFormattedText,
    hideInsertionPoint: () => hideInsertionPoint,
    insertBlock: () => insertBlock,
    insertBlocks: () => insertBlocks,
    insertDefaultBlock: () => insertDefaultBlock,
    lockPostAutosaving: () => lockPostAutosaving,
    lockPostSaving: () => lockPostSaving,
    mergeBlocks: () => mergeBlocks,
    moveBlockToPosition: () => moveBlockToPosition,
    moveBlocksDown: () => moveBlocksDown,
    moveBlocksUp: () => moveBlocksUp,
    multiSelect: () => multiSelect,
    openPublishSidebar: () => openPublishSidebar,
    receiveBlocks: () => receiveBlocks,
    redo: () => redo,
    refreshPost: () => refreshPost,
    removeBlock: () => removeBlock,
    removeBlocks: () => removeBlocks,
    removeEditorPanel: () => removeEditorPanel,
    replaceBlock: () => replaceBlock,
    replaceBlocks: () => replaceBlocks,
    resetBlocks: () => resetBlocks,
    resetEditorBlocks: () => resetEditorBlocks,
    resetPost: () => resetPost,
    savePost: () => savePost,
    selectBlock: () => selectBlock,
    setDeviceType: () => setDeviceType,
    setEditedPost: () => setEditedPost,
    setIsInserterOpened: () => setIsInserterOpened,
    setIsListViewOpened: () => setIsListViewOpened,
    setRenderingMode: () => setRenderingMode,
    setTemplateValidity: () => setTemplateValidity,
    setupEditor: () => setupEditor,
    setupEditorState: () => setupEditorState,
    showInsertionPoint: () => showInsertionPoint,
    startMultiSelect: () => startMultiSelect,
    startTyping: () => startTyping,
    stopMultiSelect: () => stopMultiSelect,
    stopTyping: () => stopTyping,
    switchEditorMode: () => switchEditorMode,
    synchronizeTemplate: () => synchronizeTemplate,
    toggleBlockMode: () => toggleBlockMode,
    toggleDistractionFree: () => toggleDistractionFree,
    toggleEditorPanelEnabled: () => toggleEditorPanelEnabled,
    toggleEditorPanelOpened: () => toggleEditorPanelOpened,
    togglePublishSidebar: () => togglePublishSidebar,
    toggleSelection: () => toggleSelection,
    toggleSpotlightMode: () => toggleSpotlightMode,
    toggleTopToolbar: () => toggleTopToolbar,
    trashPost: () => trashPost,
    undo: () => undo,
    unlockPostAutosaving: () => unlockPostAutosaving,
    unlockPostSaving: () => unlockPostSaving,
    updateBlock: () => updateBlock,
    updateBlockAttributes: () => updateBlockAttributes,
    updateBlockListSettings: () => updateBlockListSettings,
    updateEditorSettings: () => updateEditorSettings,
    updatePost: () => updatePost,
    updatePostLock: () => updatePostLock
  });
  var import_a11y = __toESM(require_a11y(), 1);
  var import_api_fetch = __toESM(require_api_fetch(), 1);
  var import_deprecated2 = __toESM(require_deprecated(), 1);
  var import_blocks2 = __toESM(require_blocks(), 1);
  var import_notices = __toESM(require_notices(), 1);
  var import_core_data2 = __toESM(require_core_data(), 1);
  var import_block_editor3 = __toESM(require_block_editor(), 1);
  var import_hooks = __toESM(require_hooks(), 1);
  var import_preferences2 = __toESM(require_preferences(), 1);
  var import_i18n2 = __toESM(require_i18n(), 1);

  // packages/editor/build-module/store/local-autosave.mjs
  function postKey(postId2, isPostNew) {
    return `wp-autosave-block-editor-post-${isPostNew ? "auto-draft" : postId2}`;
  }
  function localAutosaveGet(postId2, isPostNew) {
    return window.sessionStorage.getItem(postKey(postId2, isPostNew));
  }
  function localAutosaveSet(postId2, isPostNew, title, content, excerpt) {
    window.sessionStorage.setItem(
      postKey(postId2, isPostNew),
      JSON.stringify({
        post_title: title,
        content,
        excerpt
      })
    );
  }
  function localAutosaveClear(postId2, isPostNew) {
    window.sessionStorage.removeItem(postKey(postId2, isPostNew));
  }

  // packages/editor/build-module/store/utils/notice-builder.mjs
  var import_i18n = __toESM(require_i18n(), 1);
  function getNotificationArgumentsForSaveSuccess(data) {
    const { previousPost, post: post2, postType: postType2 } = data;
    if (data.options?.isAutosave) {
      return [];
    }
    const publishStatus = ["publish", "private", "future"];
    const isPublished = publishStatus.includes(previousPost.status);
    const willPublish = publishStatus.includes(post2.status);
    const willTrash = post2.status === "trash" && previousPost.status !== "trash";
    let noticeMessage;
    let shouldShowLink = postType2?.viewable ?? false;
    let isDraft;
    if (willTrash) {
      noticeMessage = postType2.labels.item_trashed;
      shouldShowLink = false;
    } else if (post2.type === ATTACHMENT_POST_TYPE) {
      noticeMessage = (0, import_i18n.__)("Media updated.");
      shouldShowLink = false;
    } else if (!isPublished && !willPublish) {
      noticeMessage = (0, import_i18n.__)("Draft saved.");
      isDraft = true;
    } else if (isPublished && !willPublish) {
      noticeMessage = postType2.labels.item_reverted_to_draft;
      shouldShowLink = false;
    } else if (!isPublished && willPublish) {
      noticeMessage = {
        publish: postType2.labels.item_published,
        private: postType2.labels.item_published_privately,
        future: postType2.labels.item_scheduled
      }[post2.status];
    } else {
      noticeMessage = postType2.labels.item_updated;
    }
    const actions2 = [];
    if (shouldShowLink) {
      actions2.push({
        label: isDraft ? (0, import_i18n.__)("View Preview") : postType2.labels.view_item,
        url: post2.link,
        openInNewTab: true
      });
    }
    return [
      noticeMessage,
      {
        id: "editor-save",
        type: "snackbar",
        actions: actions2
      }
    ];
  }
  function getNotificationArgumentsForSaveFail(data) {
    const { post: post2, edits, error } = data;
    if (error && "rest_autosave_no_changes" === error.code) {
      return [];
    }
    const publishStatus = ["publish", "private", "future"];
    const isPublished = publishStatus.indexOf(post2.status) !== -1;
    if (error.code === "offline_error") {
      const messages2 = {
        publish: (0, import_i18n.__)(
          "Publishing failed because you were offline. Please verify your connection and try again."
        ),
        private: (0, import_i18n.__)(
          "Publishing failed because you were offline. Please verify your connection and try again."
        ),
        future: (0, import_i18n.__)(
          "Scheduling failed because you were offline. Please verify your connection and try again."
        ),
        default: (0, import_i18n.__)(
          "Updating failed because you were offline. Please verify your connection and try again."
        )
      };
      const noticeMessage2 = !isPublished && edits.status in messages2 ? messages2[edits.status] : messages2.default;
      return [noticeMessage2, { id: "editor-save" }];
    }
    const messages = {
      publish: (0, import_i18n.__)("Publishing failed."),
      private: (0, import_i18n.__)("Publishing failed."),
      future: (0, import_i18n.__)("Scheduling failed."),
      default: (0, import_i18n.__)("Updating failed.")
    };
    let noticeMessage = !isPublished && edits.status in messages ? messages[edits.status] : messages.default;
    if (error.message && !/<\/?[^>]*>/.test(error.message)) {
      noticeMessage = [noticeMessage, error.message].join(" ");
    }
    return [
      noticeMessage,
      {
        id: "editor-save"
      }
    ];
  }
  function getNotificationArgumentsForTrashFail(data) {
    return [
      data.error.message && data.error.code !== "unknown_error" ? data.error.message : (0, import_i18n.__)("Trashing failed"),
      {
        id: "editor-trash-fail"
      }
    ];
  }

  // packages/editor/build-module/store/actions.mjs
  var setupEditor = (post2, edits, template2) => ({ dispatch: dispatch7 }) => {
    dispatch7.setEditedPost(post2.type, post2.id);
    const isNewPost = post2.status === "auto-draft";
    if (isNewPost && template2) {
      let content;
      if ("content" in edits) {
        content = edits.content;
      } else {
        content = post2.content.raw;
      }
      let blocks = (0, import_blocks2.parse)(content);
      blocks = (0, import_blocks2.synchronizeBlocksWithTemplate)(blocks, template2);
      dispatch7.resetEditorBlocks(blocks, {
        __unstableShouldCreateUndoLevel: false
      });
    }
    if (edits && Object.entries(edits).some(
      ([key, edit]) => edit !== (post2[key]?.raw ?? post2[key])
    )) {
      dispatch7.editPost(edits);
    }
  };
  function __experimentalTearDownEditor() {
    (0, import_deprecated2.default)(
      "wp.data.dispatch( 'core/editor' ).__experimentalTearDownEditor",
      {
        since: "6.5"
      }
    );
    return { type: "DO_NOTHING" };
  }
  function resetPost() {
    (0, import_deprecated2.default)("wp.data.dispatch( 'core/editor' ).resetPost", {
      since: "6.0",
      version: "6.3",
      alternative: "Initialize the editor with the setupEditorState action"
    });
    return { type: "DO_NOTHING" };
  }
  function updatePost() {
    (0, import_deprecated2.default)("wp.data.dispatch( 'core/editor' ).updatePost", {
      since: "5.7",
      alternative: "Use the core entities store instead"
    });
    return {
      type: "DO_NOTHING"
    };
  }
  function setupEditorState(post2) {
    (0, import_deprecated2.default)("wp.data.dispatch( 'core/editor' ).setupEditorState", {
      since: "6.5",
      alternative: "wp.data.dispatch( 'core/editor' ).setEditedPost"
    });
    return setEditedPost(post2.type, post2.id);
  }
  function setEditedPost(postType2, postId2) {
    return {
      type: "SET_EDITED_POST",
      postType: postType2,
      postId: postId2
    };
  }
  var editPost = (edits, options) => ({ select: select6, registry }) => {
    const { id, type } = select6.getCurrentPost();
    registry.dispatch(import_core_data2.store).editEntityRecord("postType", type, id, edits, options);
  };
  var savePost = (options = {}) => async ({ select: select6, dispatch: dispatch7, registry }) => {
    if (!select6.isEditedPostSaveable()) {
      return;
    }
    const content = select6.getEditedPostContent();
    if (!options.isAutosave) {
      dispatch7.editPost({ content }, { undoIgnore: true });
    }
    const previousRecord = select6.getCurrentPost();
    let edits = {
      id: previousRecord.id,
      ...registry.select(import_core_data2.store).getEntityRecordNonTransientEdits(
        "postType",
        previousRecord.type,
        previousRecord.id
      ),
      content
    };
    dispatch7({ type: "REQUEST_POST_UPDATE_START", options });
    let error = false;
    try {
      edits = await (0, import_hooks.applyFiltersAsync)(
        "editor.preSavePost",
        edits,
        options
      );
    } catch (err) {
      error = err;
    }
    if (!error) {
      try {
        await registry.dispatch(import_core_data2.store).saveEntityRecord(
          "postType",
          previousRecord.type,
          edits,
          options
        );
      } catch (err) {
        error = err.message && err.code !== "unknown_error" ? err.message : (0, import_i18n2.__)("An error occurred while updating.");
      }
    }
    if (!error) {
      error = registry.select(import_core_data2.store).getLastEntitySaveError(
        "postType",
        previousRecord.type,
        previousRecord.id
      );
    }
    if (!error) {
      try {
        await (0, import_hooks.applyFilters)(
          "editor.__unstableSavePost",
          Promise.resolve(),
          options
        );
      } catch (err) {
        error = err;
      }
    }
    if (!error) {
      try {
        await (0, import_hooks.doActionAsync)(
          "editor.savePost",
          { id: previousRecord.id, type: previousRecord.type },
          options
        );
      } catch (err) {
        error = err;
      }
    }
    dispatch7({ type: "REQUEST_POST_UPDATE_FINISH", options });
    if (typeof window !== "undefined" && window.__experimentalTemplateActivate && !options.isAutosave && previousRecord.type === "wp_template" && (typeof previousRecord.id === "number" || /^\d+$/.test(previousRecord.id))) {
      templateActivationNotice({ select: select6, dispatch: dispatch7, registry });
    }
    if (error) {
      const args = getNotificationArgumentsForSaveFail({
        post: previousRecord,
        edits,
        error
      });
      if (args.length) {
        registry.dispatch(import_notices.store).createErrorNotice(...args);
      }
    } else {
      const updatedRecord = select6.getCurrentPost();
      const args = getNotificationArgumentsForSaveSuccess({
        previousPost: previousRecord,
        post: updatedRecord,
        postType: await registry.resolveSelect(import_core_data2.store).getPostType(updatedRecord.type),
        options
      });
      if (args.length) {
        registry.dispatch(import_notices.store).createSuccessNotice(...args);
      }
      if (!options.isAutosave) {
        registry.dispatch(import_block_editor3.store).__unstableMarkLastChangeAsPersistent();
      }
    }
  };
  async function templateActivationNotice({ select: select6, registry }) {
    const editorSettings2 = select6.getEditorSettings();
    if (editorSettings2.onNavigateToPreviousEntityRecord) {
      return;
    }
    const { id, slug } = select6.getCurrentPost();
    const site = await registry.select(import_core_data2.store).getEntityRecord("root", "site");
    if (site.active_templates[slug] === id) {
      return;
    }
    const currentTheme = await registry.resolveSelect(import_core_data2.store).getCurrentTheme();
    const templateType = currentTheme?.default_template_types.find(
      (type) => type.slug === slug
    );
    await registry.dispatch(import_notices.store).createNotice(
      "info",
      (0, import_i18n2.sprintf)(
        // translators: %s: The name (or slug) of the type of template.
        (0, import_i18n2.__)('Do you want to activate this "%s" template?'),
        templateType?.title ?? slug
      ),
      {
        id: "template-activate-notice",
        actions: [
          {
            label: (0, import_i18n2.__)("Activate"),
            onClick: async () => {
              await registry.dispatch(import_notices.store).createNotice(
                "info",
                (0, import_i18n2.__)("Activating template\u2026"),
                { id: "template-activate-notice" }
              );
              try {
                const currentSite = await registry.select(import_core_data2.store).getEntityRecord("root", "site");
                await registry.dispatch(import_core_data2.store).saveEntityRecord(
                  "root",
                  "site",
                  {
                    active_templates: {
                      ...currentSite.active_templates,
                      [slug]: id
                    }
                  },
                  { throwOnError: true }
                );
                await registry.dispatch(import_notices.store).createSuccessNotice(
                  (0, import_i18n2.__)("Template activated."),
                  { id: "template-activate-notice" }
                );
              } catch (error) {
                await registry.dispatch(import_notices.store).createErrorNotice(
                  (0, import_i18n2.__)("Template activation failed."),
                  { id: "template-activate-notice" }
                );
                throw error;
              }
            }
          }
        ]
      }
    );
  }
  function refreshPost() {
    (0, import_deprecated2.default)("wp.data.dispatch( 'core/editor' ).refreshPost", {
      since: "6.0",
      version: "6.3",
      alternative: "Use the core entities store instead"
    });
    return { type: "DO_NOTHING" };
  }
  var trashPost = () => async ({ select: select6, dispatch: dispatch7, registry }) => {
    const postTypeSlug = select6.getCurrentPostType();
    const postType2 = await registry.resolveSelect(import_core_data2.store).getPostType(postTypeSlug);
    const { rest_base: restBase, rest_namespace: restNamespace = "wp/v2" } = postType2;
    dispatch7({ type: "REQUEST_POST_DELETE_START" });
    try {
      const post2 = select6.getCurrentPost();
      await (0, import_api_fetch.default)({
        path: `/${restNamespace}/${restBase}/${post2.id}`,
        method: "DELETE"
      });
      await dispatch7.savePost();
    } catch (error) {
      registry.dispatch(import_notices.store).createErrorNotice(
        ...getNotificationArgumentsForTrashFail({ error })
      );
    }
    dispatch7({ type: "REQUEST_POST_DELETE_FINISH" });
  };
  var autosave = ({ local = false, ...options } = {}) => async ({ select: select6, dispatch: dispatch7 }) => {
    const post2 = select6.getCurrentPost();
    if (local) {
      const isPostNew = select6.isEditedPostNew();
      const title = select6.getEditedPostAttribute("title");
      const content = select6.getEditedPostAttribute("content");
      const excerpt = select6.getEditedPostAttribute("excerpt");
      localAutosaveSet(post2.id, isPostNew, title, content, excerpt);
    } else {
      await dispatch7.savePost({ isAutosave: true, ...options });
    }
  };
  var __unstableSaveForPreview = ({ forceIsAutosaveable } = {}) => async ({ select: select6, dispatch: dispatch7 }) => {
    if ((forceIsAutosaveable || select6.isEditedPostAutosaveable()) && !select6.isPostLocked()) {
      const isDraft = ["draft", "auto-draft"].includes(
        select6.getEditedPostAttribute("status")
      );
      if (isDraft) {
        await dispatch7.savePost({ isPreview: true });
      } else {
        await dispatch7.autosave({ isPreview: true });
      }
    }
    return select6.getEditedPostPreviewLink();
  };
  var redo = () => ({ registry }) => {
    registry.dispatch(import_core_data2.store).redo();
  };
  var undo = () => ({ registry }) => {
    registry.dispatch(import_core_data2.store).undo();
  };
  function createUndoLevel() {
    (0, import_deprecated2.default)("wp.data.dispatch( 'core/editor' ).createUndoLevel", {
      since: "6.0",
      version: "6.3",
      alternative: "Use the core entities store instead"
    });
    return { type: "DO_NOTHING" };
  }
  function updatePostLock(lock5) {
    return {
      type: "UPDATE_POST_LOCK",
      lock: lock5
    };
  }
  var enablePublishSidebar = () => ({ registry }) => {
    registry.dispatch(import_preferences2.store).set("core", "isPublishSidebarEnabled", true);
  };
  var disablePublishSidebar = () => ({ registry }) => {
    registry.dispatch(import_preferences2.store).set("core", "isPublishSidebarEnabled", false);
  };
  function lockPostSaving(lockName) {
    return {
      type: "LOCK_POST_SAVING",
      lockName
    };
  }
  function unlockPostSaving(lockName) {
    return {
      type: "UNLOCK_POST_SAVING",
      lockName
    };
  }
  function lockPostAutosaving(lockName) {
    return {
      type: "LOCK_POST_AUTOSAVING",
      lockName
    };
  }
  function unlockPostAutosaving(lockName) {
    return {
      type: "UNLOCK_POST_AUTOSAVING",
      lockName
    };
  }
  var resetEditorBlocks = (blocks, options = {}) => ({ select: select6, dispatch: dispatch7, registry }) => {
    const { __unstableShouldCreateUndoLevel, selection } = options;
    const edits = { blocks, selection };
    if (__unstableShouldCreateUndoLevel !== false) {
      const { id, type } = select6.getCurrentPost();
      const noChange = registry.select(import_core_data2.store).getEditedEntityRecord("postType", type, id).blocks === edits.blocks;
      if (noChange) {
        registry.dispatch(import_core_data2.store).__unstableCreateUndoLevel("postType", type, id);
        return;
      }
      edits.content = ({ blocks: blocksForSerialization = [] }) => (0, import_blocks2.__unstableSerializeAndClean)(blocksForSerialization);
    }
    dispatch7.editPost(edits);
  };
  function updateEditorSettings(settings) {
    return {
      type: "UPDATE_EDITOR_SETTINGS",
      settings
    };
  }
  var setRenderingMode = (mode) => ({ dispatch: dispatch7, registry, select: select6 }) => {
    if (select6.__unstableIsEditorReady() && !select6.getEditorSettings().isPreviewMode) {
      registry.dispatch(import_block_editor3.store).clearSelectedBlock();
    }
    dispatch7({
      type: "SET_RENDERING_MODE",
      mode
    });
  };
  function setDeviceType(deviceType2) {
    return {
      type: "SET_DEVICE_TYPE",
      deviceType: deviceType2
    };
  }
  var toggleEditorPanelEnabled = (panelName) => ({ registry }) => {
    const inactivePanels = registry.select(import_preferences2.store).get("core", "inactivePanels") ?? [];
    const isPanelInactive = !!inactivePanels?.includes(panelName);
    let updatedInactivePanels;
    if (isPanelInactive) {
      updatedInactivePanels = inactivePanels.filter(
        (invactivePanelName) => invactivePanelName !== panelName
      );
    } else {
      updatedInactivePanels = [...inactivePanels, panelName];
    }
    registry.dispatch(import_preferences2.store).set("core", "inactivePanels", updatedInactivePanels);
  };
  var toggleEditorPanelOpened = (panelName) => ({ registry }) => {
    const openPanels = registry.select(import_preferences2.store).get("core", "openPanels") ?? [];
    const isPanelOpen = !!openPanels?.includes(panelName);
    let updatedOpenPanels;
    if (isPanelOpen) {
      updatedOpenPanels = openPanels.filter(
        (openPanelName) => openPanelName !== panelName
      );
    } else {
      updatedOpenPanels = [...openPanels, panelName];
    }
    registry.dispatch(import_preferences2.store).set("core", "openPanels", updatedOpenPanels);
  };
  function removeEditorPanel(panelName) {
    return {
      type: "REMOVE_PANEL",
      panelName
    };
  }
  var setIsInserterOpened = (value) => ({ dispatch: dispatch7, registry }) => {
    if (typeof value === "object" && value.hasOwnProperty("rootClientId") && value.hasOwnProperty("insertionIndex")) {
      unlock(registry.dispatch(import_block_editor3.store)).setInsertionPoint({
        rootClientId: value.rootClientId,
        index: value.insertionIndex
      });
    }
    dispatch7({
      type: "SET_IS_INSERTER_OPENED",
      value
    });
  };
  function setIsListViewOpened(isOpen) {
    return {
      type: "SET_IS_LIST_VIEW_OPENED",
      isOpen
    };
  }
  var toggleDistractionFree = ({ createNotice = true } = {}) => ({ dispatch: dispatch7, registry }) => {
    const isDistractionFree = registry.select(import_preferences2.store).get("core", "distractionFree");
    if (isDistractionFree) {
      registry.dispatch(import_preferences2.store).set("core", "fixedToolbar", false);
    }
    if (!isDistractionFree) {
      registry.batch(() => {
        registry.dispatch(import_preferences2.store).set("core", "fixedToolbar", true);
        dispatch7.setIsInserterOpened(false);
        dispatch7.setIsListViewOpened(false);
        unlock(
          registry.dispatch(import_block_editor3.store)
        ).resetZoomLevel();
      });
    }
    registry.batch(() => {
      registry.dispatch(import_preferences2.store).set("core", "distractionFree", !isDistractionFree);
      if (createNotice) {
        registry.dispatch(import_notices.store).createInfoNotice(
          isDistractionFree ? (0, import_i18n2.__)("Distraction free mode deactivated.") : (0, import_i18n2.__)("Distraction free mode activated."),
          {
            id: "core/editor/distraction-free-mode/notice",
            type: "snackbar",
            actions: [
              {
                label: (0, import_i18n2.__)("Undo"),
                onClick: () => {
                  registry.batch(() => {
                    registry.dispatch(import_preferences2.store).set(
                      "core",
                      "fixedToolbar",
                      isDistractionFree
                    );
                    registry.dispatch(import_preferences2.store).toggle(
                      "core",
                      "distractionFree"
                    );
                  });
                }
              }
            ]
          }
        );
      }
    });
  };
  var toggleSpotlightMode = () => ({ registry }) => {
    registry.dispatch(import_preferences2.store).toggle("core", "focusMode");
    const isFocusMode = registry.select(import_preferences2.store).get("core", "focusMode");
    registry.dispatch(import_notices.store).createInfoNotice(
      isFocusMode ? (0, import_i18n2.__)("Spotlight mode activated.") : (0, import_i18n2.__)("Spotlight mode deactivated."),
      {
        id: "core/editor/toggle-spotlight-mode/notice",
        type: "snackbar",
        actions: [
          {
            label: (0, import_i18n2.__)("Undo"),
            onClick: () => {
              registry.dispatch(import_preferences2.store).toggle("core", "focusMode");
            }
          }
        ]
      }
    );
  };
  var toggleTopToolbar = () => ({ registry }) => {
    registry.dispatch(import_preferences2.store).toggle("core", "fixedToolbar");
    const isTopToolbar = registry.select(import_preferences2.store).get("core", "fixedToolbar");
    registry.dispatch(import_notices.store).createInfoNotice(
      isTopToolbar ? (0, import_i18n2.__)("Top toolbar activated.") : (0, import_i18n2.__)("Top toolbar deactivated."),
      {
        id: "core/editor/toggle-top-toolbar/notice",
        type: "snackbar",
        actions: [
          {
            label: (0, import_i18n2.__)("Undo"),
            onClick: () => {
              registry.dispatch(import_preferences2.store).toggle("core", "fixedToolbar");
            }
          }
        ]
      }
    );
  };
  var switchEditorMode = (mode) => ({ dispatch: dispatch7, registry }) => {
    registry.dispatch(import_preferences2.store).set("core", "editorMode", mode);
    if (mode !== "visual") {
      registry.dispatch(import_block_editor3.store).clearSelectedBlock();
      unlock(registry.dispatch(import_block_editor3.store)).resetZoomLevel();
    }
    if (mode === "visual") {
      (0, import_a11y.speak)((0, import_i18n2.__)("Visual editor selected"), "assertive");
    } else if (mode === "text") {
      const isDistractionFree = registry.select(import_preferences2.store).get("core", "distractionFree");
      if (isDistractionFree) {
        dispatch7.toggleDistractionFree();
      }
      (0, import_a11y.speak)((0, import_i18n2.__)("Code editor selected"), "assertive");
    }
  };
  function openPublishSidebar() {
    return {
      type: "OPEN_PUBLISH_SIDEBAR"
    };
  }
  function closePublishSidebar() {
    return {
      type: "CLOSE_PUBLISH_SIDEBAR"
    };
  }
  function togglePublishSidebar() {
    return {
      type: "TOGGLE_PUBLISH_SIDEBAR"
    };
  }
  var getBlockEditorAction = (name2) => (...args) => ({ registry }) => {
    (0, import_deprecated2.default)("`wp.data.dispatch( 'core/editor' )." + name2 + "`", {
      since: "5.3",
      alternative: "`wp.data.dispatch( 'core/block-editor' )." + name2 + "`",
      version: "6.2"
    });
    registry.dispatch(import_block_editor3.store)[name2](...args);
  };
  var resetBlocks = getBlockEditorAction("resetBlocks");
  var receiveBlocks = getBlockEditorAction("receiveBlocks");
  var updateBlock = getBlockEditorAction("updateBlock");
  var updateBlockAttributes = getBlockEditorAction(
    "updateBlockAttributes"
  );
  var selectBlock = getBlockEditorAction("selectBlock");
  var startMultiSelect = getBlockEditorAction("startMultiSelect");
  var stopMultiSelect = getBlockEditorAction("stopMultiSelect");
  var multiSelect = getBlockEditorAction("multiSelect");
  var clearSelectedBlock = getBlockEditorAction("clearSelectedBlock");
  var toggleSelection = getBlockEditorAction("toggleSelection");
  var replaceBlocks = getBlockEditorAction("replaceBlocks");
  var replaceBlock = getBlockEditorAction("replaceBlock");
  var moveBlocksDown = getBlockEditorAction("moveBlocksDown");
  var moveBlocksUp = getBlockEditorAction("moveBlocksUp");
  var moveBlockToPosition = getBlockEditorAction(
    "moveBlockToPosition"
  );
  var insertBlock = getBlockEditorAction("insertBlock");
  var insertBlocks = getBlockEditorAction("insertBlocks");
  var showInsertionPoint = getBlockEditorAction("showInsertionPoint");
  var hideInsertionPoint = getBlockEditorAction("hideInsertionPoint");
  var setTemplateValidity = getBlockEditorAction(
    "setTemplateValidity"
  );
  var synchronizeTemplate = getBlockEditorAction(
    "synchronizeTemplate"
  );
  var mergeBlocks = getBlockEditorAction("mergeBlocks");
  var removeBlocks = getBlockEditorAction("removeBlocks");
  var removeBlock = getBlockEditorAction("removeBlock");
  var toggleBlockMode = getBlockEditorAction("toggleBlockMode");
  var startTyping = getBlockEditorAction("startTyping");
  var stopTyping = getBlockEditorAction("stopTyping");
  var enterFormattedText = getBlockEditorAction("enterFormattedText");
  var exitFormattedText = getBlockEditorAction("exitFormattedText");
  var insertDefaultBlock = getBlockEditorAction("insertDefaultBlock");
  var updateBlockListSettings = getBlockEditorAction(
    "updateBlockListSettings"
  );

  // packages/editor/build-module/store/private-actions.mjs
  var private_actions_exports = {};
  __export(private_actions_exports, {
    createTemplate: () => createTemplate,
    hideBlockTypes: () => hideBlockTypes,
    registerEntityAction: () => registerEntityAction,
    registerEntityField: () => registerEntityField,
    registerPostTypeSchema: () => registerPostTypeSchema,
    removeTemplates: () => removeTemplates,
    resetStylesNavigation: () => resetStylesNavigation,
    restoreRevision: () => restoreRevision,
    revertTemplate: () => revertTemplate2,
    saveDirtyEntities: () => saveDirtyEntities,
    selectNote: () => selectNote,
    setCanvasMinHeight: () => setCanvasMinHeight,
    setCurrentRevisionId: () => setCurrentRevisionId,
    setCurrentTemplateId: () => setCurrentTemplateId,
    setDefaultRenderingMode: () => setDefaultRenderingMode,
    setIsReady: () => setIsReady,
    setRevisionPage: () => setRevisionPage,
    setShowRevisionDiff: () => setShowRevisionDiff,
    setShowStylebook: () => setShowStylebook,
    setStylesPath: () => setStylesPath,
    showBlockTypes: () => showBlockTypes,
    unregisterEntityAction: () => unregisterEntityAction,
    unregisterEntityField: () => unregisterEntityField
  });
  var import_core_data53 = __toESM(require_core_data(), 1);
  var import_i18n122 = __toESM(require_i18n(), 1);
  var import_notices17 = __toESM(require_notices(), 1);
  var import_block_editor35 = __toESM(require_block_editor(), 1);
  var import_preferences10 = __toESM(require_preferences(), 1);
  var import_url11 = __toESM(require_url(), 1);
  var import_api_fetch5 = __toESM(require_api_fetch(), 1);
  var import_blocks20 = __toESM(require_blocks(), 1);
  var import_html_entities9 = __toESM(require_html_entities(), 1);
  var import_date6 = __toESM(require_date(), 1);

  // packages/editor/build-module/store/utils/is-template-revertable.mjs
  function isTemplateRevertable(templateOrTemplatePart) {
    if (!templateOrTemplatePart) {
      return false;
    }
    return templateOrTemplatePart.source === TEMPLATE_ORIGINS.custom && (Boolean(templateOrTemplatePart?.plugin) || templateOrTemplatePart?.has_theme_file);
  }

  // packages/editor/build-module/store/private-selectors.mjs
  var private_selectors_exports = {};
  __export(private_selectors_exports, {
    buildRevisionsPageQuery: () => buildRevisionsPageQuery,
    getCanvasMinHeight: () => getCanvasMinHeight,
    getCurrentRevision: () => getCurrentRevision,
    getCurrentRevisionId: () => getCurrentRevisionId,
    getDefaultRenderingMode: () => getDefaultRenderingMode,
    getEntityActions: () => getEntityActions2,
    getEntityFields: () => getEntityFields2,
    getInserter: () => getInserter,
    getInserterSidebarToggleRef: () => getInserterSidebarToggleRef,
    getListViewToggleRef: () => getListViewToggleRef,
    getPageRevisions: () => getPageRevisions,
    getPostBlocksByName: () => getPostBlocksByName,
    getPostIcon: () => getPostIcon,
    getPreviousRevision: () => getPreviousRevision,
    getRevisionPage: () => getRevisionPage,
    getRevisionsPerPage: () => getRevisionsPerPage,
    getSelectedNote: () => getSelectedNote,
    getShowStylebook: () => getShowStylebook,
    getStylesPath: () => getStylesPath,
    hasPostMetaChanges: () => hasPostMetaChanges,
    isCollaborationEnabledForCurrentPost: () => isCollaborationEnabledForCurrentPost,
    isEntityReady: () => isEntityReady2,
    isNoteFocused: () => isNoteFocused,
    isRevisionsMode: () => isRevisionsMode,
    isShowingRevisionDiff: () => isShowingRevisionDiff
  });
  var import_fast_deep_equal = __toESM(require_fast_deep_equal(), 1);
  var import_block_editor4 = __toESM(require_block_editor(), 1);
  var import_data5 = __toESM(require_data(), 1);
  var import_core_data4 = __toESM(require_core_data(), 1);
  var import_preferences3 = __toESM(require_preferences(), 1);

  // packages/editor/build-module/dataviews/store/private-selectors.mjs
  var EMPTY_ARRAY = [];
  function getEntityActions(state, kind, name2) {
    return state.actions[kind]?.[name2] ?? EMPTY_ARRAY;
  }
  function getEntityFields(state, kind, name2) {
    return state.fields[kind]?.[name2] ?? EMPTY_ARRAY;
  }
  function isEntityReady(state, kind, name2) {
    return state.isReady[kind]?.[name2];
  }

  // node_modules/uuid/dist/esm-browser/rng.js
  var getRandomValues;
  var rnds8 = new Uint8Array(16);
  function rng() {
    if (!getRandomValues) {
      getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
      if (!getRandomValues) {
        throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
      }
    }
    return getRandomValues(rnds8);
  }

  // node_modules/uuid/dist/esm-browser/stringify.js
  var byteToHex = [];
  for (let i3 = 0; i3 < 256; ++i3) {
    byteToHex.push((i3 + 256).toString(16).slice(1));
  }
  function unsafeStringify(arr, offset3 = 0) {
    return byteToHex[arr[offset3 + 0]] + byteToHex[arr[offset3 + 1]] + byteToHex[arr[offset3 + 2]] + byteToHex[arr[offset3 + 3]] + "-" + byteToHex[arr[offset3 + 4]] + byteToHex[arr[offset3 + 5]] + "-" + byteToHex[arr[offset3 + 6]] + byteToHex[arr[offset3 + 7]] + "-" + byteToHex[arr[offset3 + 8]] + byteToHex[arr[offset3 + 9]] + "-" + byteToHex[arr[offset3 + 10]] + byteToHex[arr[offset3 + 11]] + byteToHex[arr[offset3 + 12]] + byteToHex[arr[offset3 + 13]] + byteToHex[arr[offset3 + 14]] + byteToHex[arr[offset3 + 15]];
  }

  // node_modules/uuid/dist/esm-browser/native.js
  var randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
  var native_default = {
    randomUUID
  };

  // node_modules/uuid/dist/esm-browser/v4.js
  function v4(options, buf, offset3) {
    if (native_default.randomUUID && !buf && !options) {
      return native_default.randomUUID();
    }
    options = options || {};
    const rnds = options.random || (options.rng || rng)();
    rnds[6] = rnds[6] & 15 | 64;
    rnds[8] = rnds[8] & 63 | 128;
    if (buf) {
      offset3 = offset3 || 0;
      for (let i3 = 0; i3 < 16; ++i3) {
        buf[offset3 + i3] = rnds[i3];
      }
      return buf;
    }
    return unsafeStringify(rnds);
  }
  var v4_default = v4;

  // packages/editor/build-module/utils/media-upload/index.mjs
  var import_data4 = __toESM(require_data(), 1);
  var import_core_data3 = __toESM(require_core_data(), 1);
  var import_media_utils = __toESM(require_media_utils(), 1);
  var noop = () => {
  };
  function mediaUpload({
    additionalData = {},
    allowedTypes,
    filesList,
    maxUploadFileSize,
    onError = noop,
    onFileChange,
    onSuccess,
    multiple = true
  }) {
    const { receiveEntityRecords } = (0, import_data4.dispatch)(import_core_data3.store);
    const { getCurrentPost: getCurrentPost2, getEditorSettings: getEditorSettings2 } = (0, import_data4.select)(store);
    const {
      lockPostAutosaving: lockPostAutosaving2,
      unlockPostAutosaving: unlockPostAutosaving2,
      lockPostSaving: lockPostSaving2,
      unlockPostSaving: unlockPostSaving2
    } = (0, import_data4.dispatch)(store);
    const wpAllowedMimeTypes = getEditorSettings2().allowedMimeTypes;
    const lockKey = `image-upload-${v4_default()}`;
    let imageIsUploading = false;
    maxUploadFileSize = maxUploadFileSize || getEditorSettings2().maxUploadFileSize;
    const currentPost = getCurrentPost2();
    const currentPostId = typeof currentPost?.id === "number" ? currentPost.id : currentPost?.wp_id;
    const setSaveLock = () => {
      if (window.__clientSideMediaProcessing) {
        return;
      }
      lockPostSaving2(lockKey);
      lockPostAutosaving2(lockKey);
      imageIsUploading = true;
    };
    const postData = currentPostId ? { post: currentPostId } : {};
    const clearSaveLock = () => {
      if (window.__clientSideMediaProcessing) {
        return;
      }
      unlockPostSaving2(lockKey);
      unlockPostAutosaving2(lockKey);
      imageIsUploading = false;
    };
    (0, import_media_utils.uploadMedia)({
      allowedTypes,
      filesList,
      onFileChange: (file) => {
        if (!window.__clientSideMediaProcessing) {
          if (!imageIsUploading) {
            setSaveLock();
          } else {
            clearSaveLock();
          }
        }
        onFileChange?.(file);
        const entityFiles = file.filter((_file) => _file?.id);
        if (entityFiles?.length) {
          const invalidateCache = true;
          receiveEntityRecords(
            "postType",
            "attachment",
            entityFiles,
            void 0,
            invalidateCache
          );
        }
      },
      onSuccess,
      additionalData: {
        ...postData,
        ...additionalData
      },
      maxUploadFileSize,
      onError: ({ message: message2 }) => {
        if (!window.__clientSideMediaProcessing) {
          clearSaveLock();
        }
        onError(message2);
      },
      wpAllowedMimeTypes,
      multiple
    });
  }

  // packages/editor/build-module/utils/url.mjs
  var import_url2 = __toESM(require_url(), 1);
  var import_deprecated3 = __toESM(require_deprecated(), 1);
  function cleanForSlug2(string) {
    (0, import_deprecated3.default)("wp.editor.cleanForSlug", {
      since: "12.7",
      plugin: "Gutenberg",
      alternative: "wp.url.cleanForSlug"
    });
    return (0, import_url2.cleanForSlug)(string);
  }

  // packages/editor/build-module/store/private-selectors.mjs
  var EMPTY_INSERTION_POINT = {
    rootClientId: void 0,
    insertionIndex: void 0,
    filterValue: void 0
  };
  var RENDERING_MODES = ["post-only", "template-locked"];
  var getInserter = (0, import_data5.createRegistrySelector)(
    (select6) => (0, import_data5.createSelector)(
      (state) => {
        if (typeof state.blockInserterPanel === "object") {
          return state.blockInserterPanel;
        }
        if (getRenderingMode(state) === "template-locked") {
          const {
            getBlocksByName,
            getSelectedBlockClientId: getSelectedBlockClientId2,
            getBlockParents,
            getBlockOrder: getBlockOrder2
          } = select6(import_block_editor4.store);
          const [postContentClientId] = getBlocksByName("core/post-content");
          if (postContentClientId) {
            const selectedBlockClientId = getSelectedBlockClientId2();
            if (selectedBlockClientId && selectedBlockClientId !== postContentClientId && getBlockParents(selectedBlockClientId).includes(
              postContentClientId
            )) {
              return EMPTY_INSERTION_POINT;
            }
            return {
              rootClientId: postContentClientId,
              insertionIndex: getBlockOrder2(postContentClientId).length,
              filterValue: void 0
            };
          }
        }
        return EMPTY_INSERTION_POINT;
      },
      (state) => {
        const {
          getBlocksByName,
          getSelectedBlockClientId: getSelectedBlockClientId2,
          getBlockParents,
          getBlockOrder: getBlockOrder2
        } = select6(import_block_editor4.store);
        const [postContentClientId] = getBlocksByName("core/post-content");
        const selectedBlockClientId = getSelectedBlockClientId2();
        return [
          state.blockInserterPanel,
          getRenderingMode(state),
          postContentClientId,
          selectedBlockClientId,
          selectedBlockClientId ? getBlockParents(selectedBlockClientId) : void 0,
          postContentClientId ? getBlockOrder2(postContentClientId).length : void 0
        ];
      }
    )
  );
  function getListViewToggleRef(state) {
    return state.listViewToggleRef;
  }
  function getInserterSidebarToggleRef(state) {
    return state.inserterSidebarToggleRef;
  }
  var CARD_ICONS = {
    wp_block: symbol_default,
    wp_navigation: navigation_default,
    page: page_default,
    post: verse_default
  };
  var getPostIcon = (0, import_data5.createRegistrySelector)(
    (select6) => (state, postType2, options) => {
      {
        if (postType2 === "wp_template_part" || postType2 === "wp_template") {
          const templateAreas = select6(import_core_data4.store).getCurrentTheme()?.default_template_part_areas || [];
          const areaData = templateAreas.find(
            (item) => options.area === item.area
          );
          if (areaData?.icon) {
            return getTemplatePartIcon(areaData.icon);
          }
          return layout_default;
        }
        if (CARD_ICONS[postType2]) {
          return CARD_ICONS[postType2];
        }
        const postTypeEntity = select6(import_core_data4.store).getPostType(postType2);
        if (typeof postTypeEntity?.icon === "string" && postTypeEntity.icon.startsWith("dashicons-")) {
          return postTypeEntity.icon.slice(10);
        }
        return page_default;
      }
    }
  );
  var hasPostMetaChanges = (0, import_data5.createRegistrySelector)(
    (select6) => (state, postType2, postId2) => {
      const { type: currentPostType, id: currentPostId } = getCurrentPost(state);
      const edits = select6(import_core_data4.store).getEntityRecordNonTransientEdits(
        "postType",
        postType2 || currentPostType,
        postId2 || currentPostId
      );
      if (!edits?.meta) {
        return false;
      }
      const originalPostMeta = select6(import_core_data4.store).getEntityRecord(
        "postType",
        postType2 || currentPostType,
        postId2 || currentPostId
      )?.meta;
      return !(0, import_fast_deep_equal.default)(
        { ...originalPostMeta, footnotes: void 0 },
        { ...edits.meta, footnotes: void 0 }
      );
    }
  );
  function getEntityActions2(state, ...args) {
    return getEntityActions(state.dataviews, ...args);
  }
  function isEntityReady2(state, ...args) {
    return isEntityReady(state.dataviews, ...args);
  }
  function getEntityFields2(state, ...args) {
    return getEntityFields(state.dataviews, ...args);
  }
  var getPostBlocksByName = (0, import_data5.createRegistrySelector)(
    (select6) => (0, import_data5.createSelector)(
      (state, blockNames) => {
        blockNames = Array.isArray(blockNames) ? blockNames : [blockNames];
        const { getBlocksByName, getBlockParents, getBlockName: getBlockName2 } = select6(import_block_editor4.store);
        return getBlocksByName(blockNames).filter(
          (clientId) => getBlockParents(clientId).every((parentClientId) => {
            const parentBlockName = getBlockName2(parentClientId);
            return (
              // Ignore descendents of the query block.
              parentBlockName !== "core/query" && // Enable only the top-most block.
              !blockNames.includes(parentBlockName)
            );
          })
        );
      },
      (state, blockNames) => {
        blockNames = Array.isArray(blockNames) ? blockNames : [blockNames];
        const { getBlocksByName, getBlockParents } = select6(import_block_editor4.store);
        const clientIds = getBlocksByName(blockNames);
        const parentsOfClientIds = clientIds.map(
          (id) => getBlockParents(id)
        );
        return [clientIds, ...parentsOfClientIds];
      }
    )
  );
  var getDefaultRenderingMode = (0, import_data5.createRegistrySelector)(
    (select6) => (state, postType2) => {
      const { getPostType, getCurrentTheme, hasFinishedResolution } = select6(import_core_data4.store);
      const currentTheme = getCurrentTheme();
      const postTypeEntity = getPostType(postType2);
      if (!hasFinishedResolution("getPostType", [postType2]) || !hasFinishedResolution("getCurrentTheme")) {
        return void 0;
      }
      const theme = currentTheme?.stylesheet;
      const defaultModePreference = select6(import_preferences3.store).get(
        "core",
        "renderingModes"
      )?.[theme]?.[postType2];
      const postTypeDefaultMode = Array.isArray(
        postTypeEntity?.supports?.editor
      ) ? postTypeEntity.supports.editor.find(
        (features) => "default-mode" in features
      )?.["default-mode"] : void 0;
      const defaultMode = defaultModePreference || postTypeDefaultMode;
      if (!RENDERING_MODES.includes(defaultMode)) {
        return "post-only";
      }
      return defaultMode;
    }
  );
  function getStylesPath(state) {
    return state.stylesPath ?? "/";
  }
  function getShowStylebook(state) {
    return state.showStylebook ?? false;
  }
  function getCanvasMinHeight(state) {
    return state.canvasMinHeight;
  }
  function getRevisionPage(state) {
    return state.revisionPage;
  }
  function buildRevisionsPageQuery(revisionKey, page) {
    return {
      per_page: REVISIONS_PER_PAGE,
      page,
      context: "edit",
      orderby: "date",
      order: "desc",
      _fields: [
        .../* @__PURE__ */ new Set([
          "id",
          "date",
          "modified",
          "author",
          "meta",
          "title.raw",
          "excerpt.raw",
          "content.raw",
          revisionKey
        ])
      ].join()
    };
  }
  var REVISIONS_PER_PAGE = 100;
  function getRevisionsPerPage() {
    return REVISIONS_PER_PAGE;
  }
  var getPageRevisions = (0, import_data5.createRegistrySelector)(
    (select6) => (state, page) => {
      if (!page) {
        return null;
      }
      const { type: postType2, id: postId2 } = getCurrentPost(state);
      if (!postType2 || !postId2) {
        return null;
      }
      const entityConfig = select6(import_core_data4.store).getEntityConfig(
        "postType",
        postType2
      );
      const revisionKey = entityConfig?.revisionKey || "id";
      return select6(import_core_data4.store).getRevisions(
        "postType",
        postType2,
        postId2,
        buildRevisionsPageQuery(revisionKey, page)
      );
    }
  );
  function isRevisionsMode(state) {
    return state.revisionId !== null;
  }
  function isShowingRevisionDiff(state) {
    return state.showRevisionDiff;
  }
  function getCurrentRevisionId(state) {
    return state.revisionId;
  }
  var getCurrentRevision = (0, import_data5.createRegistrySelector)(
    (select6) => (state) => {
      const revisionId2 = getCurrentRevisionId(state);
      if (!revisionId2) {
        return void 0;
      }
      const page = getRevisionPage(state);
      if (!page) {
        return null;
      }
      const { type: postType2, id: postId2 } = getCurrentPost(state);
      const entityConfig = select6(import_core_data4.store).getEntityConfig(
        "postType",
        postType2
      );
      const revisionKey = entityConfig?.revisionKey || "id";
      const revisions = select6(import_core_data4.store).getRevisions(
        "postType",
        postType2,
        postId2,
        buildRevisionsPageQuery(revisionKey, page)
      );
      if (!revisions) {
        return null;
      }
      return revisions.find((r4) => r4[revisionKey] === revisionId2) ?? null;
    }
  );
  function getSelectedNote(state) {
    return state.selectedNote?.noteId;
  }
  function isNoteFocused(state) {
    return !!state.selectedNote?.options?.focus;
  }
  var getPreviousRevision = (0, import_data5.createRegistrySelector)(
    (select6) => (state) => {
      const currentRevisionId = getCurrentRevisionId(state);
      if (!currentRevisionId) {
        return void 0;
      }
      const page = getRevisionPage(state);
      if (!page) {
        return null;
      }
      const { type: postType2, id: postId2 } = getCurrentPost(state);
      const entityConfig = select6(import_core_data4.store).getEntityConfig(
        "postType",
        postType2
      );
      const revisionKey = entityConfig?.revisionKey || "id";
      const query = buildRevisionsPageQuery(revisionKey, page);
      const revisions = select6(import_core_data4.store).getRevisions(
        "postType",
        postType2,
        postId2,
        query
      );
      if (!revisions) {
        return null;
      }
      const currentIndex = revisions.findIndex(
        (r4) => r4[revisionKey] === currentRevisionId
      );
      if (currentIndex >= 0 && currentIndex < revisions.length - 1) {
        return revisions[currentIndex + 1];
      }
      const totalRevisions = getCurrentPostRevisionsCount(state);
      const totalPages = Math.ceil(totalRevisions / query.per_page) || 1;
      if (currentIndex === revisions.length - 1 && page < totalPages) {
        const nextPageRevisions = select6(import_core_data4.store).getRevisions(
          "postType",
          postType2,
          postId2,
          buildRevisionsPageQuery(revisionKey, page + 1)
        );
        return nextPageRevisions?.[0] ?? null;
      }
      return null;
    }
  );
  var isCollaborationEnabledForCurrentPost = (0, import_data5.createRegistrySelector)(
    (select6) => (state) => {
      if (!unlock(select6(import_core_data4.store)).isCollaborationSupported()) {
        return false;
      }
      const currentPostType = getCurrentPostType(state);
      const entityConfig = select6(import_core_data4.store).getEntityConfig(
        "postType",
        currentPostType
      );
      return Boolean(
        entityConfig?.syncConfig && window._wpCollaborationEnabled
      );
    }
  );

  // packages/editor/build-module/dataviews/store/private-actions.mjs
  var import_core_data52 = __toESM(require_core_data(), 1);
  var import_hooks38 = __toESM(require_hooks(), 1);

  // packages/fields/build-module/fields/slug/index.mjs
  var import_i18n5 = __toESM(require_i18n(), 1);

  // packages/fields/build-module/fields/slug/slug-edit.mjs
  var import_components = __toESM(require_components(), 1);
  var import_compose = __toESM(require_compose(), 1);
  var import_data6 = __toESM(require_data(), 1);
  var import_element3 = __toESM(require_element(), 1);
  var import_notices2 = __toESM(require_notices(), 1);
  var import_url5 = __toESM(require_url(), 1);
  var import_i18n4 = __toESM(require_i18n(), 1);

  // packages/fields/build-module/fields/slug/utils.mjs
  var import_url4 = __toESM(require_url(), 1);

  // packages/fields/build-module/actions/utils.mjs
  var import_html_entities = __toESM(require_html_entities(), 1);
  var import_i18n3 = __toESM(require_i18n(), 1);
  function isTemplate(post2) {
    return post2.type === "wp_template";
  }
  function isTemplatePart(post2) {
    return post2.type === "wp_template_part";
  }
  function isTemplateOrTemplatePart(p4) {
    return p4.type === "wp_template" || p4.type === "wp_template_part";
  }
  function getItemTitle(item, fallback = (0, import_i18n3.__)("(no title)")) {
    let title = "";
    if (typeof item.title === "string") {
      title = (0, import_html_entities.decodeEntities)(item.title);
    } else if (item.title && "rendered" in item.title) {
      title = (0, import_html_entities.decodeEntities)(item.title.rendered);
    } else if (item.title && "raw" in item.title) {
      title = (0, import_html_entities.decodeEntities)(item.title.raw);
    }
    return title || fallback;
  }
  function isTemplateRemovable(template2) {
    if (!template2) {
      return false;
    }
    return [template2.source, template2.source].includes("custom") && !Boolean(template2.type === "wp_template" && template2?.plugin) && !template2.has_theme_file;
  }

  // packages/fields/build-module/fields/slug/utils.mjs
  var getSlug = (item) => {
    if (typeof item !== "object") {
      return "";
    }
    return item.slug || (0, import_url4.cleanForSlug)(getItemTitle(item)) || item.id.toString();
  };

  // packages/fields/build-module/fields/slug/slug-edit.mjs
  var import_jsx_runtime77 = __toESM(require_jsx_runtime(), 1);
  var SlugEdit = ({
    field,
    onChange,
    data
  }) => {
    const { id } = field;
    const slug = field.getValue({ item: data }) || getSlug(data);
    const permalinkTemplate = data.permalink_template || "";
    const PERMALINK_POSTNAME_REGEX2 = /%(?:postname|pagename)%/;
    const [prefix2, suffix] = permalinkTemplate.split(
      PERMALINK_POSTNAME_REGEX2
    );
    const permalinkPrefix = prefix2;
    const permalinkSuffix = suffix;
    const isEditable = PERMALINK_POSTNAME_REGEX2.test(permalinkTemplate);
    const originalSlugRef = (0, import_element3.useRef)(slug);
    const slugToDisplay = slug || originalSlugRef.current;
    const permalink = isEditable ? `${permalinkPrefix}${slugToDisplay}${permalinkSuffix}` : (0, import_url5.safeDecodeURIComponent)(data.link || "");
    (0, import_element3.useEffect)(() => {
      if (slug && originalSlugRef.current === void 0) {
        originalSlugRef.current = slug;
      }
    }, [slug]);
    const onChangeControl = (0, import_element3.useCallback)(
      (newValue) => onChange({
        [id]: newValue
      }),
      [id, onChange]
    );
    const { createNotice } = (0, import_data6.useDispatch)(import_notices2.store);
    const copyButtonRef = (0, import_compose.useCopyToClipboard)(permalink, () => {
      createNotice("info", (0, import_i18n4.__)("Copied Permalink to clipboard."), {
        isDismissible: true,
        type: "snackbar"
      });
    });
    const postUrlSlugDescriptionId = "editor-post-url__slug-description-" + (0, import_compose.useInstanceId)(SlugEdit);
    return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("fieldset", { className: "fields-controls__slug", children: [
      isEditable && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_components.__experimentalVStack, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_components.__experimentalVStack, { spacing: "0px", children: [
          /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { children: (0, import_i18n4.__)(
            "Customize the last part of the Permalink."
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components.ExternalLink, { href: "https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink", children: (0, import_i18n4.__)("Learn more") })
        ] }),
        /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
          import_components.__experimentalInputControl,
          {
            __next40pxDefaultSize: true,
            prefix: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components.__experimentalInputControlPrefixWrapper, { children: "/" }),
            suffix: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components.__experimentalInputControlSuffixWrapper, { variant: "control", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
              import_components.Button,
              {
                size: "small",
                icon: copy_small_default,
                ref: copyButtonRef,
                label: (0, import_i18n4.__)("Copy")
              }
            ) }),
            label: (0, import_i18n4.__)("Link"),
            hideLabelFromVision: true,
            value: slug,
            autoComplete: "off",
            spellCheck: "false",
            type: "text",
            className: "fields-controls__slug-input",
            onChange: (newValue) => {
              onChangeControl(newValue);
            },
            onBlur: () => {
              if (slug === "") {
                onChangeControl(originalSlugRef.current);
              }
            },
            "aria-describedby": postUrlSlugDescriptionId
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "fields-controls__slug-help", children: [
          /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "fields-controls__slug-help-visual-label", children: (0, import_i18n4.__)("Permalink:") }),
          /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
            import_components.ExternalLink,
            {
              className: "fields-controls__slug-help-link",
              href: permalink,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "fields-controls__slug-help-prefix", children: permalinkPrefix }),
                /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "fields-controls__slug-help-slug", children: slugToDisplay }),
                /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "fields-controls__slug-help-suffix", children: permalinkSuffix })
              ]
            }
          )
        ] })
      ] }),
      !isEditable && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
        import_components.ExternalLink,
        {
          className: "fields-controls__slug-help",
          href: permalink,
          children: permalink
        }
      )
    ] });
  };
  var slug_edit_default = SlugEdit;

  // packages/fields/build-module/fields/slug/slug-view.mjs
  var import_element4 = __toESM(require_element(), 1);
  var SlugView = ({ item }) => {
    const slug = getSlug(item);
    const originalSlugRef = (0, import_element4.useRef)(slug);
    (0, import_element4.useEffect)(() => {
      if (slug && originalSlugRef.current === void 0) {
        originalSlugRef.current = slug;
      }
    }, [slug]);
    const slugToDisplay = slug || originalSlugRef.current;
    return `${slugToDisplay}`;
  };
  var slug_view_default = SlugView;

  // packages/fields/build-module/fields/slug/index.mjs
  var slugField = {
    id: "slug",
    type: "text",
    label: (0, import_i18n5.__)("Slug"),
    Edit: slug_edit_default,
    render: slug_view_default,
    filterBy: false
  };
  var slug_default = slugField;

  // packages/fields/build-module/fields/title/index.mjs
  var import_i18n7 = __toESM(require_i18n(), 1);

  // node_modules/clsx/dist/clsx.mjs
  function r(e3) {
    var t4, f3, n3 = "";
    if ("string" == typeof e3 || "number" == typeof e3) n3 += e3;
    else if ("object" == typeof e3) if (Array.isArray(e3)) {
      var o4 = e3.length;
      for (t4 = 0; t4 < o4; t4++) e3[t4] && (f3 = r(e3[t4])) && (n3 && (n3 += " "), n3 += f3);
    } else for (f3 in e3) e3[f3] && (n3 && (n3 += " "), n3 += f3);
    return n3;
  }
  function clsx() {
    for (var e3, t4, f3 = 0, n3 = "", o4 = arguments.length; f3 < o4; f3++) (e3 = arguments[f3]) && (t4 = r(e3)) && (n3 && (n3 += " "), n3 += t4);
    return n3;
  }
  var clsx_default = clsx;

  // packages/fields/build-module/fields/title/view.mjs
  var import_components2 = __toESM(require_components(), 1);
  var import_i18n6 = __toESM(require_i18n(), 1);
  var import_jsx_runtime78 = __toESM(require_jsx_runtime(), 1);
  function BaseTitleView({
    item,
    className,
    children
  }) {
    const renderedTitle = getItemTitle(item);
    return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
      import_components2.__experimentalHStack,
      {
        className: clsx_default("fields-field__title", className),
        alignment: "center",
        justify: "flex-start",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { children: renderedTitle || (0, import_i18n6.__)("(no title)") }),
          children
        ]
      }
    );
  }
  function TitleView({ item }) {
    return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(BaseTitleView, { item });
  }

  // packages/fields/build-module/fields/title/index.mjs
  var titleField = {
    type: "text",
    id: "title",
    label: (0, import_i18n7.__)("Title"),
    placeholder: (0, import_i18n7.__)("No title"),
    getValue: ({ item }) => getItemTitle(item),
    render: TitleView,
    enableHiding: true,
    enableGlobalSearch: true,
    filterBy: false
  };
  var title_default = titleField;

  // packages/fields/build-module/fields/page-title/index.mjs
  var import_i18n9 = __toESM(require_i18n(), 1);

  // packages/fields/build-module/fields/page-title/view.mjs
  var import_i18n8 = __toESM(require_i18n(), 1);
  var import_data7 = __toESM(require_data(), 1);
  var import_core_data5 = __toESM(require_core_data(), 1);
  var import_components3 = __toESM(require_components(), 1);

  // packages/fields/build-module/lock-unlock.mjs
  var import_private_apis2 = __toESM(require_private_apis(), 1);
  var { lock: lock2, unlock: unlock2 } = (0, import_private_apis2.__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/fields"
  );

  // packages/fields/build-module/fields/page-title/view.mjs
  var import_jsx_runtime79 = __toESM(require_jsx_runtime(), 1);
  var { Badge } = unlock2(import_components3.privateApis);
  function PageTitleView({ item }) {
    const { frontPageId, postsPageId } = (0, import_data7.useSelect)((select6) => {
      const { getEntityRecord } = select6(import_core_data5.store);
      const siteSettings = getEntityRecord(
        "root",
        "site"
      );
      return {
        frontPageId: siteSettings?.page_on_front,
        postsPageId: siteSettings?.page_for_posts
      };
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(BaseTitleView, { item, className: "fields-field__page-title", children: [frontPageId, postsPageId].includes(item.id) && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Badge, { children: item.id === frontPageId ? (0, import_i18n8.__)("Homepage") : (0, import_i18n8.__)("Posts Page") }) });
  }

  // packages/fields/build-module/fields/page-title/index.mjs
  var pageTitleField = {
    type: "text",
    id: "title",
    label: (0, import_i18n9.__)("Title"),
    placeholder: (0, import_i18n9.__)("No title"),
    getValue: ({ item }) => getItemTitle(item),
    render: PageTitleView,
    enableHiding: false,
    enableGlobalSearch: true,
    filterBy: false
  };
  var page_title_default = pageTitleField;

  // packages/fields/build-module/fields/template-title/index.mjs
  var import_i18n10 = __toESM(require_i18n(), 1);
  var templateTitleField = {
    type: "text",
    label: (0, import_i18n10.__)("Template"),
    placeholder: (0, import_i18n10.__)("No title"),
    id: "title",
    getValue: ({ item }) => getItemTitle(item),
    render: TitleView,
    enableHiding: false,
    enableGlobalSearch: true,
    filterBy: false
  };
  var template_title_default = templateTitleField;

  // packages/fields/build-module/fields/pattern-title/index.mjs
  var import_i18n12 = __toESM(require_i18n(), 1);

  // packages/fields/build-module/fields/pattern-title/view.mjs
  var import_i18n11 = __toESM(require_i18n(), 1);
  var import_components4 = __toESM(require_components(), 1);
  var import_patterns = __toESM(require_patterns(), 1);
  var import_jsx_runtime80 = __toESM(require_jsx_runtime(), 1);
  var { PATTERN_TYPES } = unlock2(import_patterns.privateApis);
  function PatternTitleView({ item }) {
    return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(BaseTitleView, { item, className: "fields-field__pattern-title", children: item.type === PATTERN_TYPES.theme && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
      import_components4.Tooltip,
      {
        placement: "top",
        text: (0, import_i18n11.__)("This pattern cannot be edited."),
        children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(icon_default, { icon: lock_small_default, size: 24 })
      }
    ) });
  }

  // packages/fields/build-module/fields/pattern-title/index.mjs
  var patternTitleField = {
    type: "text",
    id: "title",
    label: (0, import_i18n12.__)("Title"),
    placeholder: (0, import_i18n12.__)("No title"),
    getValue: ({ item }) => getItemTitle(item),
    render: PatternTitleView,
    enableHiding: false,
    enableGlobalSearch: true,
    filterBy: false
  };
  var pattern_title_default = patternTitleField;

  // packages/fields/build-module/fields/featured-image/index.mjs
  var import_i18n14 = __toESM(require_i18n(), 1);

  // packages/fields/build-module/components/media-edit/index.mjs
  var import_components5 = __toESM(require_components(), 1);
  var import_blob = __toESM(require_blob(), 1);
  var import_core_data6 = __toESM(require_core_data(), 1);
  var import_data8 = __toESM(require_data(), 1);
  var import_element6 = __toESM(require_element(), 1);
  var import_i18n13 = __toESM(require_i18n(), 1);
  var import_media_utils2 = __toESM(require_media_utils(), 1);
  var import_notices3 = __toESM(require_notices(), 1);

  // node_modules/@react-spring/rafz/dist/react-spring-rafz.esm.js
  var updateQueue = makeQueue();
  var raf = (fn) => schedule(fn, updateQueue);
  var writeQueue = makeQueue();
  raf.write = (fn) => schedule(fn, writeQueue);
  var onStartQueue = makeQueue();
  raf.onStart = (fn) => schedule(fn, onStartQueue);
  var onFrameQueue = makeQueue();
  raf.onFrame = (fn) => schedule(fn, onFrameQueue);
  var onFinishQueue = makeQueue();
  raf.onFinish = (fn) => schedule(fn, onFinishQueue);
  var timeouts = [];
  raf.setTimeout = (handler, ms) => {
    let time = raf.now() + ms;
    let cancel = () => {
      let i3 = timeouts.findIndex((t4) => t4.cancel == cancel);
      if (~i3) timeouts.splice(i3, 1);
      pendingCount -= ~i3 ? 1 : 0;
    };
    let timeout = {
      time,
      handler,
      cancel
    };
    timeouts.splice(findTimeout(time), 0, timeout);
    pendingCount += 1;
    start();
    return timeout;
  };
  var findTimeout = (time) => ~(~timeouts.findIndex((t4) => t4.time > time) || ~timeouts.length);
  raf.cancel = (fn) => {
    onStartQueue.delete(fn);
    onFrameQueue.delete(fn);
    onFinishQueue.delete(fn);
    updateQueue.delete(fn);
    writeQueue.delete(fn);
  };
  raf.sync = (fn) => {
    sync = true;
    raf.batchedUpdates(fn);
    sync = false;
  };
  raf.throttle = (fn) => {
    let lastArgs;
    function queuedFn() {
      try {
        fn(...lastArgs);
      } finally {
        lastArgs = null;
      }
    }
    function throttled(...args) {
      lastArgs = args;
      raf.onStart(queuedFn);
    }
    throttled.handler = fn;
    throttled.cancel = () => {
      onStartQueue.delete(queuedFn);
      lastArgs = null;
    };
    return throttled;
  };
  var nativeRaf = typeof window != "undefined" ? window.requestAnimationFrame : () => {
  };
  raf.use = (impl) => nativeRaf = impl;
  raf.now = typeof performance != "undefined" ? () => performance.now() : Date.now;
  raf.batchedUpdates = (fn) => fn();
  raf.catch = console.error;
  raf.frameLoop = "always";
  raf.advance = () => {
    if (raf.frameLoop !== "demand") {
      console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand");
    } else {
      update();
    }
  };
  var ts = -1;
  var pendingCount = 0;
  var sync = false;
  function schedule(fn, queue) {
    if (sync) {
      queue.delete(fn);
      fn(0);
    } else {
      queue.add(fn);
      start();
    }
  }
  function start() {
    if (ts < 0) {
      ts = 0;
      if (raf.frameLoop !== "demand") {
        nativeRaf(loop);
      }
    }
  }
  function stop() {
    ts = -1;
  }
  function loop() {
    if (~ts) {
      nativeRaf(loop);
      raf.batchedUpdates(update);
    }
  }
  function update() {
    let prevTs = ts;
    ts = raf.now();
    let count = findTimeout(ts);
    if (count) {
      eachSafely(timeouts.splice(0, count), (t4) => t4.handler());
      pendingCount -= count;
    }
    if (!pendingCount) {
      stop();
      return;
    }
    onStartQueue.flush();
    updateQueue.flush(prevTs ? Math.min(64, ts - prevTs) : 16.667);
    onFrameQueue.flush();
    writeQueue.flush();
    onFinishQueue.flush();
  }
  function makeQueue() {
    let next = /* @__PURE__ */ new Set();
    let current = next;
    return {
      add(fn) {
        pendingCount += current == next && !next.has(fn) ? 1 : 0;
        next.add(fn);
      },
      delete(fn) {
        pendingCount -= current == next && next.has(fn) ? 1 : 0;
        return next.delete(fn);
      },
      flush(arg) {
        if (current.size) {
          next = /* @__PURE__ */ new Set();
          pendingCount -= current.size;
          eachSafely(current, (fn) => fn(arg) && next.add(fn));
          pendingCount += next.size;
          current = next;
        }
      }
    };
  }
  function eachSafely(values, each2) {
    values.forEach((value) => {
      try {
        each2(value);
      } catch (e3) {
        raf.catch(e3);
      }
    });
  }

  // node_modules/@react-spring/shared/dist/react-spring-shared.esm.js
  var import_react = __toESM(require_react());
  function noop2() {
  }
  var defineHidden = (obj, key, value) => Object.defineProperty(obj, key, {
    value,
    writable: true,
    configurable: true
  });
  var is = {
    arr: Array.isArray,
    obj: (a3) => !!a3 && a3.constructor.name === "Object",
    fun: (a3) => typeof a3 === "function",
    str: (a3) => typeof a3 === "string",
    num: (a3) => typeof a3 === "number",
    und: (a3) => a3 === void 0
  };
  function isEqual(a3, b3) {
    if (is.arr(a3)) {
      if (!is.arr(b3) || a3.length !== b3.length) return false;
      for (let i3 = 0; i3 < a3.length; i3++) {
        if (a3[i3] !== b3[i3]) return false;
      }
      return true;
    }
    return a3 === b3;
  }
  var each = (obj, fn) => obj.forEach(fn);
  function eachProp(obj, fn, ctx2) {
    if (is.arr(obj)) {
      for (let i3 = 0; i3 < obj.length; i3++) {
        fn.call(ctx2, obj[i3], `${i3}`);
      }
      return;
    }
    for (const key in obj) {
      if (obj.hasOwnProperty(key)) {
        fn.call(ctx2, obj[key], key);
      }
    }
  }
  var toArray = (a3) => is.und(a3) ? [] : is.arr(a3) ? a3 : [a3];
  function flush(queue, iterator) {
    if (queue.size) {
      const items = Array.from(queue);
      queue.clear();
      each(items, iterator);
    }
  }
  var flushCalls = (queue, ...args) => flush(queue, (fn) => fn(...args));
  var isSSR = () => typeof window === "undefined" || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent);
  var createStringInterpolator$1;
  var to;
  var colors$1 = null;
  var skipAnimation = false;
  var willAdvance = noop2;
  var assign = (globals2) => {
    if (globals2.to) to = globals2.to;
    if (globals2.now) raf.now = globals2.now;
    if (globals2.colors !== void 0) colors$1 = globals2.colors;
    if (globals2.skipAnimation != null) skipAnimation = globals2.skipAnimation;
    if (globals2.createStringInterpolator) createStringInterpolator$1 = globals2.createStringInterpolator;
    if (globals2.requestAnimationFrame) raf.use(globals2.requestAnimationFrame);
    if (globals2.batchedUpdates) raf.batchedUpdates = globals2.batchedUpdates;
    if (globals2.willAdvance) willAdvance = globals2.willAdvance;
    if (globals2.frameLoop) raf.frameLoop = globals2.frameLoop;
  };
  var globals = /* @__PURE__ */ Object.freeze({
    __proto__: null,
    get createStringInterpolator() {
      return createStringInterpolator$1;
    },
    get to() {
      return to;
    },
    get colors() {
      return colors$1;
    },
    get skipAnimation() {
      return skipAnimation;
    },
    get willAdvance() {
      return willAdvance;
    },
    assign
  });
  var startQueue = /* @__PURE__ */ new Set();
  var currentFrame = [];
  var prevFrame = [];
  var priority = 0;
  var frameLoop = {
    get idle() {
      return !startQueue.size && !currentFrame.length;
    },
    start(animation) {
      if (priority > animation.priority) {
        startQueue.add(animation);
        raf.onStart(flushStartQueue);
      } else {
        startSafely(animation);
        raf(advance);
      }
    },
    advance,
    sort(animation) {
      if (priority) {
        raf.onFrame(() => frameLoop.sort(animation));
      } else {
        const prevIndex = currentFrame.indexOf(animation);
        if (~prevIndex) {
          currentFrame.splice(prevIndex, 1);
          startUnsafely(animation);
        }
      }
    },
    clear() {
      currentFrame = [];
      startQueue.clear();
    }
  };
  function flushStartQueue() {
    startQueue.forEach(startSafely);
    startQueue.clear();
    raf(advance);
  }
  function startSafely(animation) {
    if (!currentFrame.includes(animation)) startUnsafely(animation);
  }
  function startUnsafely(animation) {
    currentFrame.splice(findIndex(currentFrame, (other) => other.priority > animation.priority), 0, animation);
  }
  function advance(dt) {
    const nextFrame = prevFrame;
    for (let i3 = 0; i3 < currentFrame.length; i3++) {
      const animation = currentFrame[i3];
      priority = animation.priority;
      if (!animation.idle) {
        willAdvance(animation);
        animation.advance(dt);
        if (!animation.idle) {
          nextFrame.push(animation);
        }
      }
    }
    priority = 0;
    prevFrame = currentFrame;
    prevFrame.length = 0;
    currentFrame = nextFrame;
    return currentFrame.length > 0;
  }
  function findIndex(arr, test) {
    const index2 = arr.findIndex(test);
    return index2 < 0 ? arr.length : index2;
  }
  var colors = {
    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 NUMBER = "[-+]?\\d*\\.?\\d+";
  var PERCENTAGE = NUMBER + "%";
  function call(...parts) {
    return "\\(\\s*(" + parts.join(")\\s*,\\s*(") + ")\\s*\\)";
  }
  var rgb = new RegExp("rgb" + call(NUMBER, NUMBER, NUMBER));
  var rgba = new RegExp("rgba" + call(NUMBER, NUMBER, NUMBER, NUMBER));
  var hsl = new RegExp("hsl" + call(NUMBER, PERCENTAGE, PERCENTAGE));
  var hsla = new RegExp("hsla" + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));
  var hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
  var hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
  var hex6 = /^#([0-9a-fA-F]{6})$/;
  var hex8 = /^#([0-9a-fA-F]{8})$/;
  function normalizeColor(color) {
    let match3;
    if (typeof color === "number") {
      return color >>> 0 === color && color >= 0 && color <= 4294967295 ? color : null;
    }
    if (match3 = hex6.exec(color)) return parseInt(match3[1] + "ff", 16) >>> 0;
    if (colors$1 && colors$1[color] !== void 0) {
      return colors$1[color];
    }
    if (match3 = rgb.exec(color)) {
      return (parse255(match3[1]) << 24 | parse255(match3[2]) << 16 | parse255(match3[3]) << 8 | 255) >>> 0;
    }
    if (match3 = rgba.exec(color)) {
      return (parse255(match3[1]) << 24 | parse255(match3[2]) << 16 | parse255(match3[3]) << 8 | parse1(match3[4])) >>> 0;
    }
    if (match3 = hex3.exec(color)) {
      return parseInt(match3[1] + match3[1] + match3[2] + match3[2] + match3[3] + match3[3] + "ff", 16) >>> 0;
    }
    if (match3 = hex8.exec(color)) return parseInt(match3[1], 16) >>> 0;
    if (match3 = hex4.exec(color)) {
      return parseInt(match3[1] + match3[1] + match3[2] + match3[2] + match3[3] + match3[3] + match3[4] + match3[4], 16) >>> 0;
    }
    if (match3 = hsl.exec(color)) {
      return (hslToRgb(parse360(match3[1]), parsePercentage(match3[2]), parsePercentage(match3[3])) | 255) >>> 0;
    }
    if (match3 = hsla.exec(color)) {
      return (hslToRgb(parse360(match3[1]), parsePercentage(match3[2]), parsePercentage(match3[3])) | parse1(match3[4])) >>> 0;
    }
    return null;
  }
  function hue2rgb(p4, q, t4) {
    if (t4 < 0) t4 += 1;
    if (t4 > 1) t4 -= 1;
    if (t4 < 1 / 6) return p4 + (q - p4) * 6 * t4;
    if (t4 < 1 / 2) return q;
    if (t4 < 2 / 3) return p4 + (q - p4) * (2 / 3 - t4) * 6;
    return p4;
  }
  function hslToRgb(h3, s3, l3) {
    const q = l3 < 0.5 ? l3 * (1 + s3) : l3 + s3 - l3 * s3;
    const p4 = 2 * l3 - q;
    const r4 = hue2rgb(p4, q, h3 + 1 / 3);
    const g3 = hue2rgb(p4, q, h3);
    const b3 = hue2rgb(p4, q, h3 - 1 / 3);
    return Math.round(r4 * 255) << 24 | Math.round(g3 * 255) << 16 | Math.round(b3 * 255) << 8;
  }
  function parse255(str) {
    const int = parseInt(str, 10);
    if (int < 0) return 0;
    if (int > 255) return 255;
    return int;
  }
  function parse360(str) {
    const int = parseFloat(str);
    return (int % 360 + 360) % 360 / 360;
  }
  function parse1(str) {
    const num = parseFloat(str);
    if (num < 0) return 0;
    if (num > 1) return 255;
    return Math.round(num * 255);
  }
  function parsePercentage(str) {
    const int = parseFloat(str);
    if (int < 0) return 0;
    if (int > 100) return 1;
    return int / 100;
  }
  function colorToRgba(input) {
    let int32Color = normalizeColor(input);
    if (int32Color === null) return input;
    int32Color = int32Color || 0;
    let r4 = (int32Color & 4278190080) >>> 24;
    let g3 = (int32Color & 16711680) >>> 16;
    let b3 = (int32Color & 65280) >>> 8;
    let a3 = (int32Color & 255) / 255;
    return `rgba(${r4}, ${g3}, ${b3}, ${a3})`;
  }
  var createInterpolator = (range, output, extrapolate) => {
    if (is.fun(range)) {
      return range;
    }
    if (is.arr(range)) {
      return createInterpolator({
        range,
        output,
        extrapolate
      });
    }
    if (is.str(range.output[0])) {
      return createStringInterpolator$1(range);
    }
    const config2 = range;
    const outputRange = config2.output;
    const inputRange = config2.range || [0, 1];
    const extrapolateLeft = config2.extrapolateLeft || config2.extrapolate || "extend";
    const extrapolateRight = config2.extrapolateRight || config2.extrapolate || "extend";
    const easing = config2.easing || ((t4) => t4);
    return (input) => {
      const range2 = findRange(input, inputRange);
      return interpolate(input, inputRange[range2], inputRange[range2 + 1], outputRange[range2], outputRange[range2 + 1], easing, extrapolateLeft, extrapolateRight, config2.map);
    };
  };
  function interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight, map) {
    let result = map ? map(input) : input;
    if (result < inputMin) {
      if (extrapolateLeft === "identity") return result;
      else if (extrapolateLeft === "clamp") result = inputMin;
    }
    if (result > inputMax) {
      if (extrapolateRight === "identity") return result;
      else if (extrapolateRight === "clamp") result = inputMax;
    }
    if (outputMin === outputMax) return outputMin;
    if (inputMin === inputMax) return input <= inputMin ? outputMin : outputMax;
    if (inputMin === -Infinity) result = -result;
    else if (inputMax === Infinity) result = result - inputMin;
    else result = (result - inputMin) / (inputMax - inputMin);
    result = easing(result);
    if (outputMin === -Infinity) result = -result;
    else if (outputMax === Infinity) result = result + outputMin;
    else result = result * (outputMax - outputMin) + outputMin;
    return result;
  }
  function findRange(input, inputRange) {
    for (var i3 = 1; i3 < inputRange.length - 1; ++i3) if (inputRange[i3] >= input) break;
    return i3 - 1;
  }
  function _extends() {
    _extends = Object.assign ? Object.assign.bind() : function(target) {
      for (var i3 = 1; i3 < arguments.length; i3++) {
        var source = arguments[i3];
        for (var key in source) {
          if (Object.prototype.hasOwnProperty.call(source, key)) {
            target[key] = source[key];
          }
        }
      }
      return target;
    };
    return _extends.apply(this, arguments);
  }
  var $get = /* @__PURE__ */ Symbol.for("FluidValue.get");
  var $observers = /* @__PURE__ */ Symbol.for("FluidValue.observers");
  var hasFluidValue = (arg) => Boolean(arg && arg[$get]);
  var getFluidValue = (arg) => arg && arg[$get] ? arg[$get]() : arg;
  var getFluidObservers = (target) => target[$observers] || null;
  function callFluidObserver(observer, event) {
    if (observer.eventObserved) {
      observer.eventObserved(event);
    } else {
      observer(event);
    }
  }
  function callFluidObservers(target, event) {
    let observers = target[$observers];
    if (observers) {
      observers.forEach((observer) => {
        callFluidObserver(observer, event);
      });
    }
  }
  var FluidValue = class {
    constructor(get) {
      this[$get] = void 0;
      this[$observers] = void 0;
      if (!get && !(get = this.get)) {
        throw Error("Unknown getter");
      }
      setFluidGetter(this, get);
    }
  };
  var setFluidGetter = (target, get) => setHidden(target, $get, get);
  function addFluidObserver(target, observer) {
    if (target[$get]) {
      let observers = target[$observers];
      if (!observers) {
        setHidden(target, $observers, observers = /* @__PURE__ */ new Set());
      }
      if (!observers.has(observer)) {
        observers.add(observer);
        if (target.observerAdded) {
          target.observerAdded(observers.size, observer);
        }
      }
    }
    return observer;
  }
  function removeFluidObserver(target, observer) {
    let observers = target[$observers];
    if (observers && observers.has(observer)) {
      const count = observers.size - 1;
      if (count) {
        observers.delete(observer);
      } else {
        target[$observers] = null;
      }
      if (target.observerRemoved) {
        target.observerRemoved(count, observer);
      }
    }
  }
  var setHidden = (target, key, value) => Object.defineProperty(target, key, {
    value,
    writable: true,
    configurable: true
  });
  var numberRegex = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g;
  var colorRegex = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi;
  var unitRegex = new RegExp(`(${numberRegex.source})(%|[a-z]+)`, "i");
  var rgbaRegex = /rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi;
  var cssVariableRegex = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;
  var variableToRgba = (input) => {
    const [token, fallback] = parseCSSVariable(input);
    if (!token || isSSR()) {
      return input;
    }
    const value = window.getComputedStyle(document.documentElement).getPropertyValue(token);
    if (value) {
      return value.trim();
    } else if (fallback && fallback.startsWith("--")) {
      const _value = window.getComputedStyle(document.documentElement).getPropertyValue(fallback);
      if (_value) {
        return _value;
      } else {
        return input;
      }
    } else if (fallback && cssVariableRegex.test(fallback)) {
      return variableToRgba(fallback);
    } else if (fallback) {
      return fallback;
    }
    return input;
  };
  var parseCSSVariable = (current) => {
    const match3 = cssVariableRegex.exec(current);
    if (!match3) return [,];
    const [, token, fallback] = match3;
    return [token, fallback];
  };
  var namedColorRegex;
  var rgbaRound = (_, p1, p22, p32, p4) => `rgba(${Math.round(p1)}, ${Math.round(p22)}, ${Math.round(p32)}, ${p4})`;
  var createStringInterpolator = (config2) => {
    if (!namedColorRegex) namedColorRegex = colors$1 ? new RegExp(`(${Object.keys(colors$1).join("|")})(?!\\w)`, "g") : /^\b$/;
    const output = config2.output.map((value) => {
      return getFluidValue(value).replace(cssVariableRegex, variableToRgba).replace(colorRegex, colorToRgba).replace(namedColorRegex, colorToRgba);
    });
    const keyframes = output.map((value) => value.match(numberRegex).map(Number));
    const outputRanges = keyframes[0].map((_, i3) => keyframes.map((values) => {
      if (!(i3 in values)) {
        throw Error('The arity of each "output" value must be equal');
      }
      return values[i3];
    }));
    const interpolators = outputRanges.map((output2) => createInterpolator(_extends({}, config2, {
      output: output2
    })));
    return (input) => {
      var _output$find;
      const missingUnit = !unitRegex.test(output[0]) && ((_output$find = output.find((value) => unitRegex.test(value))) == null ? void 0 : _output$find.replace(numberRegex, ""));
      let i3 = 0;
      return output[0].replace(numberRegex, () => `${interpolators[i3++](input)}${missingUnit || ""}`).replace(rgbaRegex, rgbaRound);
    };
  };
  var prefix = "react-spring: ";
  var once = (fn) => {
    const func = fn;
    let called = false;
    if (typeof func != "function") {
      throw new TypeError(`${prefix}once requires a function parameter`);
    }
    return (...args) => {
      if (!called) {
        func(...args);
        called = true;
      }
    };
  };
  var warnInterpolate = once(console.warn);
  function deprecateInterpolate() {
    warnInterpolate(`${prefix}The "interpolate" function is deprecated in v9 (use "to" instead)`);
  }
  var warnDirectCall = once(console.warn);
  function isAnimatedString(value) {
    return is.str(value) && (value[0] == "#" || /\d/.test(value) || !isSSR() && cssVariableRegex.test(value) || value in (colors$1 || {}));
  }
  var useIsomorphicLayoutEffect = isSSR() ? import_react.useEffect : import_react.useLayoutEffect;
  var useIsMounted = () => {
    const isMounted = (0, import_react.useRef)(false);
    useIsomorphicLayoutEffect(() => {
      isMounted.current = true;
      return () => {
        isMounted.current = false;
      };
    }, []);
    return isMounted;
  };
  function useForceUpdate() {
    const update4 = (0, import_react.useState)()[1];
    const isMounted = useIsMounted();
    return () => {
      if (isMounted.current) {
        update4(Math.random());
      }
    };
  }
  function useMemoOne(getResult, inputs) {
    const [initial] = (0, import_react.useState)(() => ({
      inputs,
      result: getResult()
    }));
    const committed = (0, import_react.useRef)();
    const prevCache = committed.current;
    let cache = prevCache;
    if (cache) {
      const useCache = Boolean(inputs && cache.inputs && areInputsEqual(inputs, cache.inputs));
      if (!useCache) {
        cache = {
          inputs,
          result: getResult()
        };
      }
    } else {
      cache = initial;
    }
    (0, import_react.useEffect)(() => {
      committed.current = cache;
      if (prevCache == initial) {
        initial.inputs = initial.result = void 0;
      }
    }, [cache]);
    return cache.result;
  }
  function areInputsEqual(next, prev) {
    if (next.length !== prev.length) {
      return false;
    }
    for (let i3 = 0; i3 < next.length; i3++) {
      if (next[i3] !== prev[i3]) {
        return false;
      }
    }
    return true;
  }
  var useOnce = (effect) => (0, import_react.useEffect)(effect, emptyDeps);
  var emptyDeps = [];

  // node_modules/@react-spring/core/dist/react-spring-core.esm.js
  var React2 = __toESM(require_react());
  var import_react3 = __toESM(require_react());

  // node_modules/@react-spring/animated/dist/react-spring-animated.esm.js
  var React = __toESM(require_react());
  var import_react2 = __toESM(require_react());
  var $node = /* @__PURE__ */ Symbol.for("Animated:node");
  var isAnimated = (value) => !!value && value[$node] === value;
  var getAnimated = (owner) => owner && owner[$node];
  var setAnimated = (owner, node) => defineHidden(owner, $node, node);
  var getPayload = (owner) => owner && owner[$node] && owner[$node].getPayload();
  var Animated = class {
    constructor() {
      this.payload = void 0;
      setAnimated(this, this);
    }
    getPayload() {
      return this.payload || [];
    }
  };
  var AnimatedValue = class _AnimatedValue extends Animated {
    constructor(_value) {
      super();
      this.done = true;
      this.elapsedTime = void 0;
      this.lastPosition = void 0;
      this.lastVelocity = void 0;
      this.v0 = void 0;
      this.durationProgress = 0;
      this._value = _value;
      if (is.num(this._value)) {
        this.lastPosition = this._value;
      }
    }
    static create(value) {
      return new _AnimatedValue(value);
    }
    getPayload() {
      return [this];
    }
    getValue() {
      return this._value;
    }
    setValue(value, step) {
      if (is.num(value)) {
        this.lastPosition = value;
        if (step) {
          value = Math.round(value / step) * step;
          if (this.done) {
            this.lastPosition = value;
          }
        }
      }
      if (this._value === value) {
        return false;
      }
      this._value = value;
      return true;
    }
    reset() {
      const {
        done
      } = this;
      this.done = false;
      if (is.num(this._value)) {
        this.elapsedTime = 0;
        this.durationProgress = 0;
        this.lastPosition = this._value;
        if (done) this.lastVelocity = null;
        this.v0 = null;
      }
    }
  };
  var AnimatedString = class _AnimatedString extends AnimatedValue {
    constructor(value) {
      super(0);
      this._string = null;
      this._toString = void 0;
      this._toString = createInterpolator({
        output: [value, value]
      });
    }
    static create(value) {
      return new _AnimatedString(value);
    }
    getValue() {
      let value = this._string;
      return value == null ? this._string = this._toString(this._value) : value;
    }
    setValue(value) {
      if (is.str(value)) {
        if (value == this._string) {
          return false;
        }
        this._string = value;
        this._value = 1;
      } else if (super.setValue(value)) {
        this._string = null;
      } else {
        return false;
      }
      return true;
    }
    reset(goal) {
      if (goal) {
        this._toString = createInterpolator({
          output: [this.getValue(), goal]
        });
      }
      this._value = 0;
      super.reset();
    }
  };
  var TreeContext = {
    dependencies: null
  };
  var AnimatedObject = class extends Animated {
    constructor(source) {
      super();
      this.source = source;
      this.setValue(source);
    }
    getValue(animated2) {
      const values = {};
      eachProp(this.source, (source, key) => {
        if (isAnimated(source)) {
          values[key] = source.getValue(animated2);
        } else if (hasFluidValue(source)) {
          values[key] = getFluidValue(source);
        } else if (!animated2) {
          values[key] = source;
        }
      });
      return values;
    }
    setValue(source) {
      this.source = source;
      this.payload = this._makePayload(source);
    }
    reset() {
      if (this.payload) {
        each(this.payload, (node) => node.reset());
      }
    }
    _makePayload(source) {
      if (source) {
        const payload = /* @__PURE__ */ new Set();
        eachProp(source, this._addToPayload, payload);
        return Array.from(payload);
      }
    }
    _addToPayload(source) {
      if (TreeContext.dependencies && hasFluidValue(source)) {
        TreeContext.dependencies.add(source);
      }
      const payload = getPayload(source);
      if (payload) {
        each(payload, (node) => this.add(node));
      }
    }
  };
  var AnimatedArray = class _AnimatedArray extends AnimatedObject {
    constructor(source) {
      super(source);
    }
    static create(source) {
      return new _AnimatedArray(source);
    }
    getValue() {
      return this.source.map((node) => node.getValue());
    }
    setValue(source) {
      const payload = this.getPayload();
      if (source.length == payload.length) {
        return payload.map((node, i3) => node.setValue(source[i3])).some(Boolean);
      }
      super.setValue(source.map(makeAnimated));
      return true;
    }
  };
  function makeAnimated(value) {
    const nodeType = isAnimatedString(value) ? AnimatedString : AnimatedValue;
    return nodeType.create(value);
  }
  function getAnimatedType(value) {
    const parentNode = getAnimated(value);
    return parentNode ? parentNode.constructor : is.arr(value) ? AnimatedArray : isAnimatedString(value) ? AnimatedString : AnimatedValue;
  }
  function _extends2() {
    _extends2 = Object.assign ? Object.assign.bind() : function(target) {
      for (var i3 = 1; i3 < arguments.length; i3++) {
        var source = arguments[i3];
        for (var key in source) {
          if (Object.prototype.hasOwnProperty.call(source, key)) {
            target[key] = source[key];
          }
        }
      }
      return target;
    };
    return _extends2.apply(this, arguments);
  }
  var withAnimated = (Component6, host2) => {
    const hasInstance = !is.fun(Component6) || Component6.prototype && Component6.prototype.isReactComponent;
    return (0, import_react2.forwardRef)((givenProps, givenRef) => {
      const instanceRef = (0, import_react2.useRef)(null);
      const ref = hasInstance && (0, import_react2.useCallback)((value) => {
        instanceRef.current = updateRef(givenRef, value);
      }, [givenRef]);
      const [props, deps] = getAnimatedState(givenProps, host2);
      const forceUpdate = useForceUpdate();
      const callback = () => {
        const instance = instanceRef.current;
        if (hasInstance && !instance) {
          return;
        }
        const didUpdate = instance ? host2.applyAnimatedValues(instance, props.getValue(true)) : false;
        if (didUpdate === false) {
          forceUpdate();
        }
      };
      const observer = new PropsObserver(callback, deps);
      const observerRef = (0, import_react2.useRef)();
      useIsomorphicLayoutEffect(() => {
        observerRef.current = observer;
        each(deps, (dep) => addFluidObserver(dep, observer));
        return () => {
          if (observerRef.current) {
            each(observerRef.current.deps, (dep) => removeFluidObserver(dep, observerRef.current));
            raf.cancel(observerRef.current.update);
          }
        };
      });
      (0, import_react2.useEffect)(callback, []);
      useOnce(() => () => {
        const observer2 = observerRef.current;
        each(observer2.deps, (dep) => removeFluidObserver(dep, observer2));
      });
      const usedProps = host2.getComponentProps(props.getValue());
      return React.createElement(Component6, _extends2({}, usedProps, {
        ref
      }));
    });
  };
  var PropsObserver = class {
    constructor(update4, deps) {
      this.update = update4;
      this.deps = deps;
    }
    eventObserved(event) {
      if (event.type == "change") {
        raf.write(this.update);
      }
    }
  };
  function getAnimatedState(props, host2) {
    const dependencies = /* @__PURE__ */ new Set();
    TreeContext.dependencies = dependencies;
    if (props.style) props = _extends2({}, props, {
      style: host2.createAnimatedStyle(props.style)
    });
    props = new AnimatedObject(props);
    TreeContext.dependencies = null;
    return [props, dependencies];
  }
  function updateRef(ref, value) {
    if (ref) {
      if (is.fun(ref)) ref(value);
      else ref.current = value;
    }
    return value;
  }
  var cacheKey = /* @__PURE__ */ Symbol.for("AnimatedComponent");
  var createHost = (components, {
    applyAnimatedValues: _applyAnimatedValues = () => false,
    createAnimatedStyle: _createAnimatedStyle = (style) => new AnimatedObject(style),
    getComponentProps: _getComponentProps = (props) => props
  } = {}) => {
    const hostConfig = {
      applyAnimatedValues: _applyAnimatedValues,
      createAnimatedStyle: _createAnimatedStyle,
      getComponentProps: _getComponentProps
    };
    const animated2 = (Component6) => {
      const displayName = getDisplayName(Component6) || "Anonymous";
      if (is.str(Component6)) {
        Component6 = animated2[Component6] || (animated2[Component6] = withAnimated(Component6, hostConfig));
      } else {
        Component6 = Component6[cacheKey] || (Component6[cacheKey] = withAnimated(Component6, hostConfig));
      }
      Component6.displayName = `Animated(${displayName})`;
      return Component6;
    };
    eachProp(components, (Component6, key) => {
      if (is.arr(components)) {
        key = getDisplayName(Component6);
      }
      animated2[key] = animated2(Component6);
    });
    return {
      animated: animated2
    };
  };
  var getDisplayName = (arg) => is.str(arg) ? arg : arg && is.str(arg.displayName) ? arg.displayName : is.fun(arg) && arg.name || null;

  // node_modules/@react-spring/core/dist/react-spring-core.esm.js
  function _extends3() {
    _extends3 = Object.assign ? Object.assign.bind() : function(target) {
      for (var i3 = 1; i3 < arguments.length; i3++) {
        var source = arguments[i3];
        for (var key in source) {
          if (Object.prototype.hasOwnProperty.call(source, key)) {
            target[key] = source[key];
          }
        }
      }
      return target;
    };
    return _extends3.apply(this, arguments);
  }
  function callProp(value, ...args) {
    return is.fun(value) ? value(...args) : value;
  }
  var matchProp = (value, key) => value === true || !!(key && value && (is.fun(value) ? value(key) : toArray(value).includes(key)));
  var resolveProp = (prop, key) => is.obj(prop) ? key && prop[key] : prop;
  var getDefaultProp = (props, key) => props.default === true ? props[key] : props.default ? props.default[key] : void 0;
  var noopTransform = (value) => value;
  var getDefaultProps = (props, transform = noopTransform) => {
    let keys = DEFAULT_PROPS;
    if (props.default && props.default !== true) {
      props = props.default;
      keys = Object.keys(props);
    }
    const defaults2 = {};
    for (const key of keys) {
      const value = transform(props[key], key);
      if (!is.und(value)) {
        defaults2[key] = value;
      }
    }
    return defaults2;
  };
  var DEFAULT_PROPS = ["config", "onProps", "onStart", "onChange", "onPause", "onResume", "onRest"];
  var RESERVED_PROPS = {
    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 getForwardProps(props) {
    const forward = {};
    let count = 0;
    eachProp(props, (value, prop) => {
      if (!RESERVED_PROPS[prop]) {
        forward[prop] = value;
        count++;
      }
    });
    if (count) {
      return forward;
    }
  }
  function inferTo(props) {
    const to2 = getForwardProps(props);
    if (to2) {
      const out = {
        to: to2
      };
      eachProp(props, (val, key) => key in to2 || (out[key] = val));
      return out;
    }
    return _extends3({}, props);
  }
  function computeGoal(value) {
    value = getFluidValue(value);
    return is.arr(value) ? value.map(computeGoal) : isAnimatedString(value) ? globals.createStringInterpolator({
      range: [0, 1],
      output: [value, value]
    })(1) : value;
  }
  function isAsyncTo(to2) {
    return is.fun(to2) || is.arr(to2) && is.obj(to2[0]);
  }
  var config = {
    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 c1 = 1.70158;
  var c2 = c1 * 1.525;
  var c3 = c1 + 1;
  var c4 = 2 * Math.PI / 3;
  var c5 = 2 * Math.PI / 4.5;
  var bounceOut = (x2) => {
    const n1 = 7.5625;
    const d1 = 2.75;
    if (x2 < 1 / d1) {
      return n1 * x2 * x2;
    } else if (x2 < 2 / d1) {
      return n1 * (x2 -= 1.5 / d1) * x2 + 0.75;
    } else if (x2 < 2.5 / d1) {
      return n1 * (x2 -= 2.25 / d1) * x2 + 0.9375;
    } else {
      return n1 * (x2 -= 2.625 / d1) * x2 + 0.984375;
    }
  };
  var easings = {
    linear: (x2) => x2,
    easeInQuad: (x2) => x2 * x2,
    easeOutQuad: (x2) => 1 - (1 - x2) * (1 - x2),
    easeInOutQuad: (x2) => x2 < 0.5 ? 2 * x2 * x2 : 1 - Math.pow(-2 * x2 + 2, 2) / 2,
    easeInCubic: (x2) => x2 * x2 * x2,
    easeOutCubic: (x2) => 1 - Math.pow(1 - x2, 3),
    easeInOutCubic: (x2) => x2 < 0.5 ? 4 * x2 * x2 * x2 : 1 - Math.pow(-2 * x2 + 2, 3) / 2,
    easeInQuart: (x2) => x2 * x2 * x2 * x2,
    easeOutQuart: (x2) => 1 - Math.pow(1 - x2, 4),
    easeInOutQuart: (x2) => x2 < 0.5 ? 8 * x2 * x2 * x2 * x2 : 1 - Math.pow(-2 * x2 + 2, 4) / 2,
    easeInQuint: (x2) => x2 * x2 * x2 * x2 * x2,
    easeOutQuint: (x2) => 1 - Math.pow(1 - x2, 5),
    easeInOutQuint: (x2) => x2 < 0.5 ? 16 * x2 * x2 * x2 * x2 * x2 : 1 - Math.pow(-2 * x2 + 2, 5) / 2,
    easeInSine: (x2) => 1 - Math.cos(x2 * Math.PI / 2),
    easeOutSine: (x2) => Math.sin(x2 * Math.PI / 2),
    easeInOutSine: (x2) => -(Math.cos(Math.PI * x2) - 1) / 2,
    easeInExpo: (x2) => x2 === 0 ? 0 : Math.pow(2, 10 * x2 - 10),
    easeOutExpo: (x2) => x2 === 1 ? 1 : 1 - Math.pow(2, -10 * x2),
    easeInOutExpo: (x2) => x2 === 0 ? 0 : x2 === 1 ? 1 : x2 < 0.5 ? Math.pow(2, 20 * x2 - 10) / 2 : (2 - Math.pow(2, -20 * x2 + 10)) / 2,
    easeInCirc: (x2) => 1 - Math.sqrt(1 - Math.pow(x2, 2)),
    easeOutCirc: (x2) => Math.sqrt(1 - Math.pow(x2 - 1, 2)),
    easeInOutCirc: (x2) => x2 < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * x2, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * x2 + 2, 2)) + 1) / 2,
    easeInBack: (x2) => c3 * x2 * x2 * x2 - c1 * x2 * x2,
    easeOutBack: (x2) => 1 + c3 * Math.pow(x2 - 1, 3) + c1 * Math.pow(x2 - 1, 2),
    easeInOutBack: (x2) => x2 < 0.5 ? Math.pow(2 * x2, 2) * ((c2 + 1) * 2 * x2 - c2) / 2 : (Math.pow(2 * x2 - 2, 2) * ((c2 + 1) * (x2 * 2 - 2) + c2) + 2) / 2,
    easeInElastic: (x2) => x2 === 0 ? 0 : x2 === 1 ? 1 : -Math.pow(2, 10 * x2 - 10) * Math.sin((x2 * 10 - 10.75) * c4),
    easeOutElastic: (x2) => x2 === 0 ? 0 : x2 === 1 ? 1 : Math.pow(2, -10 * x2) * Math.sin((x2 * 10 - 0.75) * c4) + 1,
    easeInOutElastic: (x2) => x2 === 0 ? 0 : x2 === 1 ? 1 : x2 < 0.5 ? -(Math.pow(2, 20 * x2 - 10) * Math.sin((20 * x2 - 11.125) * c5)) / 2 : Math.pow(2, -20 * x2 + 10) * Math.sin((20 * x2 - 11.125) * c5) / 2 + 1,
    easeInBounce: (x2) => 1 - bounceOut(1 - x2),
    easeOutBounce: bounceOut,
    easeInOutBounce: (x2) => x2 < 0.5 ? (1 - bounceOut(1 - 2 * x2)) / 2 : (1 + bounceOut(2 * x2 - 1)) / 2
  };
  var defaults = _extends3({}, config.default, {
    mass: 1,
    damping: 1,
    easing: easings.linear,
    clamp: false
  });
  var AnimationConfig = class {
    constructor() {
      this.tension = void 0;
      this.friction = void 0;
      this.frequency = void 0;
      this.damping = void 0;
      this.mass = void 0;
      this.velocity = 0;
      this.restVelocity = void 0;
      this.precision = void 0;
      this.progress = void 0;
      this.duration = void 0;
      this.easing = void 0;
      this.clamp = void 0;
      this.bounce = void 0;
      this.decay = void 0;
      this.round = void 0;
      Object.assign(this, defaults);
    }
  };
  function mergeConfig(config2, newConfig, defaultConfig) {
    if (defaultConfig) {
      defaultConfig = _extends3({}, defaultConfig);
      sanitizeConfig(defaultConfig, newConfig);
      newConfig = _extends3({}, defaultConfig, newConfig);
    }
    sanitizeConfig(config2, newConfig);
    Object.assign(config2, newConfig);
    for (const key in defaults) {
      if (config2[key] == null) {
        config2[key] = defaults[key];
      }
    }
    let {
      mass,
      frequency,
      damping
    } = config2;
    if (!is.und(frequency)) {
      if (frequency < 0.01) frequency = 0.01;
      if (damping < 0) damping = 0;
      config2.tension = Math.pow(2 * Math.PI / frequency, 2) * mass;
      config2.friction = 4 * Math.PI * damping * mass / frequency;
    }
    return config2;
  }
  function sanitizeConfig(config2, props) {
    if (!is.und(props.decay)) {
      config2.duration = void 0;
    } else {
      const isTensionConfig = !is.und(props.tension) || !is.und(props.friction);
      if (isTensionConfig || !is.und(props.frequency) || !is.und(props.damping) || !is.und(props.mass)) {
        config2.duration = void 0;
        config2.decay = void 0;
      }
      if (isTensionConfig) {
        config2.frequency = void 0;
      }
    }
  }
  var emptyArray = [];
  var Animation = class {
    constructor() {
      this.changed = false;
      this.values = emptyArray;
      this.toValues = null;
      this.fromValues = emptyArray;
      this.to = void 0;
      this.from = void 0;
      this.config = new AnimationConfig();
      this.immediate = false;
    }
  };
  function scheduleProps(callId, {
    key,
    props,
    defaultProps,
    state,
    actions: actions2
  }) {
    return new Promise((resolve, reject) => {
      var _props$cancel;
      let delay;
      let timeout;
      let cancel = matchProp((_props$cancel = props.cancel) != null ? _props$cancel : defaultProps == null ? void 0 : defaultProps.cancel, key);
      if (cancel) {
        onStart();
      } else {
        if (!is.und(props.pause)) {
          state.paused = matchProp(props.pause, key);
        }
        let pause = defaultProps == null ? void 0 : defaultProps.pause;
        if (pause !== true) {
          pause = state.paused || matchProp(pause, key);
        }
        delay = callProp(props.delay || 0, key);
        if (pause) {
          state.resumeQueue.add(onResume);
          actions2.pause();
        } else {
          actions2.resume();
          onResume();
        }
      }
      function onPause() {
        state.resumeQueue.add(onResume);
        state.timeouts.delete(timeout);
        timeout.cancel();
        delay = timeout.time - raf.now();
      }
      function onResume() {
        if (delay > 0 && !globals.skipAnimation) {
          state.delayed = true;
          timeout = raf.setTimeout(onStart, delay);
          state.pauseQueue.add(onPause);
          state.timeouts.add(timeout);
        } else {
          onStart();
        }
      }
      function onStart() {
        if (state.delayed) {
          state.delayed = false;
        }
        state.pauseQueue.delete(onPause);
        state.timeouts.delete(timeout);
        if (callId <= (state.cancelId || 0)) {
          cancel = true;
        }
        try {
          actions2.start(_extends3({}, props, {
            callId,
            cancel
          }), resolve);
        } catch (err) {
          reject(err);
        }
      }
    });
  }
  var getCombinedResult = (target, results) => results.length == 1 ? results[0] : results.some((result) => result.cancelled) ? getCancelledResult(target.get()) : results.every((result) => result.noop) ? getNoopResult(target.get()) : getFinishedResult(target.get(), results.every((result) => result.finished));
  var getNoopResult = (value) => ({
    value,
    noop: true,
    finished: true,
    cancelled: false
  });
  var getFinishedResult = (value, finished, cancelled = false) => ({
    value,
    finished,
    cancelled
  });
  var getCancelledResult = (value) => ({
    value,
    cancelled: true,
    finished: false
  });
  function runAsync(to2, props, state, target) {
    const {
      callId,
      parentId,
      onRest
    } = props;
    const {
      asyncTo: prevTo,
      promise: prevPromise
    } = state;
    if (!parentId && to2 === prevTo && !props.reset) {
      return prevPromise;
    }
    return state.promise = (async () => {
      state.asyncId = callId;
      state.asyncTo = to2;
      const defaultProps = getDefaultProps(props, (value, key) => key === "onRest" ? void 0 : value);
      let preventBail;
      let bail;
      const bailPromise = new Promise((resolve, reject) => (preventBail = resolve, bail = reject));
      const bailIfEnded = (bailSignal) => {
        const bailResult = callId <= (state.cancelId || 0) && getCancelledResult(target) || callId !== state.asyncId && getFinishedResult(target, false);
        if (bailResult) {
          bailSignal.result = bailResult;
          bail(bailSignal);
          throw bailSignal;
        }
      };
      const animate = (arg1, arg2) => {
        const bailSignal = new BailSignal();
        const skipAnimationSignal = new SkipAniamtionSignal();
        return (async () => {
          if (globals.skipAnimation) {
            stopAsync(state);
            skipAnimationSignal.result = getFinishedResult(target, false);
            bail(skipAnimationSignal);
            throw skipAnimationSignal;
          }
          bailIfEnded(bailSignal);
          const props2 = is.obj(arg1) ? _extends3({}, arg1) : _extends3({}, arg2, {
            to: arg1
          });
          props2.parentId = callId;
          eachProp(defaultProps, (value, key) => {
            if (is.und(props2[key])) {
              props2[key] = value;
            }
          });
          const result2 = await target.start(props2);
          bailIfEnded(bailSignal);
          if (state.paused) {
            await new Promise((resume) => {
              state.resumeQueue.add(resume);
            });
          }
          return result2;
        })();
      };
      let result;
      if (globals.skipAnimation) {
        stopAsync(state);
        return getFinishedResult(target, false);
      }
      try {
        let animating;
        if (is.arr(to2)) {
          animating = (async (queue) => {
            for (const props2 of queue) {
              await animate(props2);
            }
          })(to2);
        } else {
          animating = Promise.resolve(to2(animate, target.stop.bind(target)));
        }
        await Promise.all([animating.then(preventBail), bailPromise]);
        result = getFinishedResult(target.get(), true, false);
      } catch (err) {
        if (err instanceof BailSignal) {
          result = err.result;
        } else if (err instanceof SkipAniamtionSignal) {
          result = err.result;
        } else {
          throw err;
        }
      } finally {
        if (callId == state.asyncId) {
          state.asyncId = parentId;
          state.asyncTo = parentId ? prevTo : void 0;
          state.promise = parentId ? prevPromise : void 0;
        }
      }
      if (is.fun(onRest)) {
        raf.batchedUpdates(() => {
          onRest(result, target, target.item);
        });
      }
      return result;
    })();
  }
  function stopAsync(state, cancelId) {
    flush(state.timeouts, (t4) => t4.cancel());
    state.pauseQueue.clear();
    state.resumeQueue.clear();
    state.asyncId = state.asyncTo = state.promise = void 0;
    if (cancelId) state.cancelId = cancelId;
  }
  var BailSignal = class extends Error {
    constructor() {
      super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.");
      this.result = void 0;
    }
  };
  var SkipAniamtionSignal = class extends Error {
    constructor() {
      super("SkipAnimationSignal");
      this.result = void 0;
    }
  };
  var isFrameValue = (value) => value instanceof FrameValue;
  var nextId$1 = 1;
  var FrameValue = class extends FluidValue {
    constructor(...args) {
      super(...args);
      this.id = nextId$1++;
      this.key = void 0;
      this._priority = 0;
    }
    get priority() {
      return this._priority;
    }
    set priority(priority2) {
      if (this._priority != priority2) {
        this._priority = priority2;
        this._onPriorityChange(priority2);
      }
    }
    get() {
      const node = getAnimated(this);
      return node && node.getValue();
    }
    to(...args) {
      return globals.to(this, args);
    }
    interpolate(...args) {
      deprecateInterpolate();
      return globals.to(this, args);
    }
    toJSON() {
      return this.get();
    }
    observerAdded(count) {
      if (count == 1) this._attach();
    }
    observerRemoved(count) {
      if (count == 0) this._detach();
    }
    _attach() {
    }
    _detach() {
    }
    _onChange(value, idle = false) {
      callFluidObservers(this, {
        type: "change",
        parent: this,
        value,
        idle
      });
    }
    _onPriorityChange(priority2) {
      if (!this.idle) {
        frameLoop.sort(this);
      }
      callFluidObservers(this, {
        type: "priority",
        parent: this,
        priority: priority2
      });
    }
  };
  var $P = /* @__PURE__ */ Symbol.for("SpringPhase");
  var HAS_ANIMATED = 1;
  var IS_ANIMATING = 2;
  var IS_PAUSED = 4;
  var hasAnimated = (target) => (target[$P] & HAS_ANIMATED) > 0;
  var isAnimating = (target) => (target[$P] & IS_ANIMATING) > 0;
  var isPaused = (target) => (target[$P] & IS_PAUSED) > 0;
  var setActiveBit = (target, active) => active ? target[$P] |= IS_ANIMATING | HAS_ANIMATED : target[$P] &= ~IS_ANIMATING;
  var setPausedBit = (target, paused) => paused ? target[$P] |= IS_PAUSED : target[$P] &= ~IS_PAUSED;
  var SpringValue = class extends FrameValue {
    constructor(arg1, arg2) {
      super();
      this.key = void 0;
      this.animation = new Animation();
      this.queue = void 0;
      this.defaultProps = {};
      this._state = {
        paused: false,
        delayed: false,
        pauseQueue: /* @__PURE__ */ new Set(),
        resumeQueue: /* @__PURE__ */ new Set(),
        timeouts: /* @__PURE__ */ new Set()
      };
      this._pendingCalls = /* @__PURE__ */ new Set();
      this._lastCallId = 0;
      this._lastToId = 0;
      this._memoizedDuration = 0;
      if (!is.und(arg1) || !is.und(arg2)) {
        const props = is.obj(arg1) ? _extends3({}, arg1) : _extends3({}, arg2, {
          from: arg1
        });
        if (is.und(props.default)) {
          props.default = true;
        }
        this.start(props);
      }
    }
    get idle() {
      return !(isAnimating(this) || this._state.asyncTo) || isPaused(this);
    }
    get goal() {
      return getFluidValue(this.animation.to);
    }
    get velocity() {
      const node = getAnimated(this);
      return node instanceof AnimatedValue ? node.lastVelocity || 0 : node.getPayload().map((node2) => node2.lastVelocity || 0);
    }
    get hasAnimated() {
      return hasAnimated(this);
    }
    get isAnimating() {
      return isAnimating(this);
    }
    get isPaused() {
      return isPaused(this);
    }
    get isDelayed() {
      return this._state.delayed;
    }
    advance(dt) {
      let idle = true;
      let changed = false;
      const anim = this.animation;
      let {
        config: config2,
        toValues
      } = anim;
      const payload = getPayload(anim.to);
      if (!payload && hasFluidValue(anim.to)) {
        toValues = toArray(getFluidValue(anim.to));
      }
      anim.values.forEach((node2, i3) => {
        if (node2.done) return;
        const to2 = node2.constructor == AnimatedString ? 1 : payload ? payload[i3].lastPosition : toValues[i3];
        let finished = anim.immediate;
        let position = to2;
        if (!finished) {
          position = node2.lastPosition;
          if (config2.tension <= 0) {
            node2.done = true;
            return;
          }
          let elapsed = node2.elapsedTime += dt;
          const from = anim.fromValues[i3];
          const v0 = node2.v0 != null ? node2.v0 : node2.v0 = is.arr(config2.velocity) ? config2.velocity[i3] : config2.velocity;
          let velocity;
          const precision = config2.precision || (from == to2 ? 5e-3 : Math.min(1, Math.abs(to2 - from) * 1e-3));
          if (!is.und(config2.duration)) {
            let p4 = 1;
            if (config2.duration > 0) {
              if (this._memoizedDuration !== config2.duration) {
                this._memoizedDuration = config2.duration;
                if (node2.durationProgress > 0) {
                  node2.elapsedTime = config2.duration * node2.durationProgress;
                  elapsed = node2.elapsedTime += dt;
                }
              }
              p4 = (config2.progress || 0) + elapsed / this._memoizedDuration;
              p4 = p4 > 1 ? 1 : p4 < 0 ? 0 : p4;
              node2.durationProgress = p4;
            }
            position = from + config2.easing(p4) * (to2 - from);
            velocity = (position - node2.lastPosition) / dt;
            finished = p4 == 1;
          } else if (config2.decay) {
            const decay = config2.decay === true ? 0.998 : config2.decay;
            const e3 = Math.exp(-(1 - decay) * elapsed);
            position = from + v0 / (1 - decay) * (1 - e3);
            finished = Math.abs(node2.lastPosition - position) <= precision;
            velocity = v0 * e3;
          } else {
            velocity = node2.lastVelocity == null ? v0 : node2.lastVelocity;
            const restVelocity = config2.restVelocity || precision / 10;
            const bounceFactor = config2.clamp ? 0 : config2.bounce;
            const canBounce = !is.und(bounceFactor);
            const isGrowing = from == to2 ? node2.v0 > 0 : from < to2;
            let isMoving;
            let isBouncing = false;
            const step = 1;
            const numSteps = Math.ceil(dt / step);
            for (let n3 = 0; n3 < numSteps; ++n3) {
              isMoving = Math.abs(velocity) > restVelocity;
              if (!isMoving) {
                finished = Math.abs(to2 - position) <= precision;
                if (finished) {
                  break;
                }
              }
              if (canBounce) {
                isBouncing = position == to2 || position > to2 == isGrowing;
                if (isBouncing) {
                  velocity = -velocity * bounceFactor;
                  position = to2;
                }
              }
              const springForce = -config2.tension * 1e-6 * (position - to2);
              const dampingForce = -config2.friction * 1e-3 * velocity;
              const acceleration = (springForce + dampingForce) / config2.mass;
              velocity = velocity + acceleration * step;
              position = position + velocity * step;
            }
          }
          node2.lastVelocity = velocity;
          if (Number.isNaN(position)) {
            console.warn(`Got NaN while animating:`, this);
            finished = true;
          }
        }
        if (payload && !payload[i3].done) {
          finished = false;
        }
        if (finished) {
          node2.done = true;
        } else {
          idle = false;
        }
        if (node2.setValue(position, config2.round)) {
          changed = true;
        }
      });
      const node = getAnimated(this);
      const currVal = node.getValue();
      if (idle) {
        const finalVal = getFluidValue(anim.to);
        if ((currVal !== finalVal || changed) && !config2.decay) {
          node.setValue(finalVal);
          this._onChange(finalVal);
        } else if (changed && config2.decay) {
          this._onChange(currVal);
        }
        this._stop();
      } else if (changed) {
        this._onChange(currVal);
      }
    }
    set(value) {
      raf.batchedUpdates(() => {
        this._stop();
        this._focus(value);
        this._set(value);
      });
      return this;
    }
    pause() {
      this._update({
        pause: true
      });
    }
    resume() {
      this._update({
        pause: false
      });
    }
    finish() {
      if (isAnimating(this)) {
        const {
          to: to2,
          config: config2
        } = this.animation;
        raf.batchedUpdates(() => {
          this._onStart();
          if (!config2.decay) {
            this._set(to2, false);
          }
          this._stop();
        });
      }
      return this;
    }
    update(props) {
      const queue = this.queue || (this.queue = []);
      queue.push(props);
      return this;
    }
    start(to2, arg2) {
      let queue;
      if (!is.und(to2)) {
        queue = [is.obj(to2) ? to2 : _extends3({}, arg2, {
          to: to2
        })];
      } else {
        queue = this.queue || [];
        this.queue = [];
      }
      return Promise.all(queue.map((props) => {
        const up = this._update(props);
        return up;
      })).then((results) => getCombinedResult(this, results));
    }
    stop(cancel) {
      const {
        to: to2
      } = this.animation;
      this._focus(this.get());
      stopAsync(this._state, cancel && this._lastCallId);
      raf.batchedUpdates(() => this._stop(to2, cancel));
      return this;
    }
    reset() {
      this._update({
        reset: true
      });
    }
    eventObserved(event) {
      if (event.type == "change") {
        this._start();
      } else if (event.type == "priority") {
        this.priority = event.priority + 1;
      }
    }
    _prepareNode(props) {
      const key = this.key || "";
      let {
        to: to2,
        from
      } = props;
      to2 = is.obj(to2) ? to2[key] : to2;
      if (to2 == null || isAsyncTo(to2)) {
        to2 = void 0;
      }
      from = is.obj(from) ? from[key] : from;
      if (from == null) {
        from = void 0;
      }
      const range = {
        to: to2,
        from
      };
      if (!hasAnimated(this)) {
        if (props.reverse) [to2, from] = [from, to2];
        from = getFluidValue(from);
        if (!is.und(from)) {
          this._set(from);
        } else if (!getAnimated(this)) {
          this._set(to2);
        }
      }
      return range;
    }
    _update(_ref, isLoop) {
      let props = _extends3({}, _ref);
      const {
        key,
        defaultProps
      } = this;
      if (props.default) Object.assign(defaultProps, getDefaultProps(props, (value, prop) => /^on/.test(prop) ? resolveProp(value, key) : value));
      mergeActiveFn(this, props, "onProps");
      sendEvent(this, "onProps", props, this);
      const range = this._prepareNode(props);
      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?");
      }
      const state = this._state;
      return scheduleProps(++this._lastCallId, {
        key,
        props,
        defaultProps,
        state,
        actions: {
          pause: () => {
            if (!isPaused(this)) {
              setPausedBit(this, true);
              flushCalls(state.pauseQueue);
              sendEvent(this, "onPause", getFinishedResult(this, checkFinished(this, this.animation.to)), this);
            }
          },
          resume: () => {
            if (isPaused(this)) {
              setPausedBit(this, false);
              if (isAnimating(this)) {
                this._resume();
              }
              flushCalls(state.resumeQueue);
              sendEvent(this, "onResume", getFinishedResult(this, checkFinished(this, this.animation.to)), this);
            }
          },
          start: this._merge.bind(this, range)
        }
      }).then((result) => {
        if (props.loop && result.finished && !(isLoop && result.noop)) {
          const nextProps = createLoopUpdate(props);
          if (nextProps) {
            return this._update(nextProps, true);
          }
        }
        return result;
      });
    }
    _merge(range, props, resolve) {
      if (props.cancel) {
        this.stop(true);
        return resolve(getCancelledResult(this));
      }
      const hasToProp = !is.und(range.to);
      const hasFromProp = !is.und(range.from);
      if (hasToProp || hasFromProp) {
        if (props.callId > this._lastToId) {
          this._lastToId = props.callId;
        } else {
          return resolve(getCancelledResult(this));
        }
      }
      const {
        key,
        defaultProps,
        animation: anim
      } = this;
      const {
        to: prevTo,
        from: prevFrom
      } = anim;
      let {
        to: to2 = prevTo,
        from = prevFrom
      } = range;
      if (hasFromProp && !hasToProp && (!props.default || is.und(to2))) {
        to2 = from;
      }
      if (props.reverse) [to2, from] = [from, to2];
      const hasFromChanged = !isEqual(from, prevFrom);
      if (hasFromChanged) {
        anim.from = from;
      }
      from = getFluidValue(from);
      const hasToChanged = !isEqual(to2, prevTo);
      if (hasToChanged) {
        this._focus(to2);
      }
      const hasAsyncTo = isAsyncTo(props.to);
      const {
        config: config2
      } = anim;
      const {
        decay,
        velocity
      } = config2;
      if (hasToProp || hasFromProp) {
        config2.velocity = 0;
      }
      if (props.config && !hasAsyncTo) {
        mergeConfig(config2, callProp(props.config, key), props.config !== defaultProps.config ? callProp(defaultProps.config, key) : void 0);
      }
      let node = getAnimated(this);
      if (!node || is.und(to2)) {
        return resolve(getFinishedResult(this, true));
      }
      const reset = is.und(props.reset) ? hasFromProp && !props.default : !is.und(from) && matchProp(props.reset, key);
      const value = reset ? from : this.get();
      const goal = computeGoal(to2);
      const isAnimatable = is.num(goal) || is.arr(goal) || isAnimatedString(goal);
      const immediate = !hasAsyncTo && (!isAnimatable || matchProp(defaultProps.immediate || props.immediate, key));
      if (hasToChanged) {
        const nodeType = getAnimatedType(to2);
        if (nodeType !== node.constructor) {
          if (immediate) {
            node = this._set(goal);
          } else throw Error(`Cannot animate between ${node.constructor.name} and ${nodeType.name}, as the "to" prop suggests`);
        }
      }
      const goalType = node.constructor;
      let started = hasFluidValue(to2);
      let finished = false;
      if (!started) {
        const hasValueChanged = reset || !hasAnimated(this) && hasFromChanged;
        if (hasToChanged || hasValueChanged) {
          finished = isEqual(computeGoal(value), goal);
          started = !finished;
        }
        if (!isEqual(anim.immediate, immediate) && !immediate || !isEqual(config2.decay, decay) || !isEqual(config2.velocity, velocity)) {
          started = true;
        }
      }
      if (finished && isAnimating(this)) {
        if (anim.changed && !reset) {
          started = true;
        } else if (!started) {
          this._stop(prevTo);
        }
      }
      if (!hasAsyncTo) {
        if (started || hasFluidValue(prevTo)) {
          anim.values = node.getPayload();
          anim.toValues = hasFluidValue(to2) ? null : goalType == AnimatedString ? [1] : toArray(goal);
        }
        if (anim.immediate != immediate) {
          anim.immediate = immediate;
          if (!immediate && !reset) {
            this._set(prevTo);
          }
        }
        if (started) {
          const {
            onRest
          } = anim;
          each(ACTIVE_EVENTS, (type) => mergeActiveFn(this, props, type));
          const result = getFinishedResult(this, checkFinished(this, prevTo));
          flushCalls(this._pendingCalls, result);
          this._pendingCalls.add(resolve);
          if (anim.changed) raf.batchedUpdates(() => {
            anim.changed = !reset;
            onRest == null ? void 0 : onRest(result, this);
            if (reset) {
              callProp(defaultProps.onRest, result);
            } else {
              anim.onStart == null ? void 0 : anim.onStart(result, this);
            }
          });
        }
      }
      if (reset) {
        this._set(value);
      }
      if (hasAsyncTo) {
        resolve(runAsync(props.to, props, this._state, this));
      } else if (started) {
        this._start();
      } else if (isAnimating(this) && !hasToChanged) {
        this._pendingCalls.add(resolve);
      } else {
        resolve(getNoopResult(value));
      }
    }
    _focus(value) {
      const anim = this.animation;
      if (value !== anim.to) {
        if (getFluidObservers(this)) {
          this._detach();
        }
        anim.to = value;
        if (getFluidObservers(this)) {
          this._attach();
        }
      }
    }
    _attach() {
      let priority2 = 0;
      const {
        to: to2
      } = this.animation;
      if (hasFluidValue(to2)) {
        addFluidObserver(to2, this);
        if (isFrameValue(to2)) {
          priority2 = to2.priority + 1;
        }
      }
      this.priority = priority2;
    }
    _detach() {
      const {
        to: to2
      } = this.animation;
      if (hasFluidValue(to2)) {
        removeFluidObserver(to2, this);
      }
    }
    _set(arg, idle = true) {
      const value = getFluidValue(arg);
      if (!is.und(value)) {
        const oldNode = getAnimated(this);
        if (!oldNode || !isEqual(value, oldNode.getValue())) {
          const nodeType = getAnimatedType(value);
          if (!oldNode || oldNode.constructor != nodeType) {
            setAnimated(this, nodeType.create(value));
          } else {
            oldNode.setValue(value);
          }
          if (oldNode) {
            raf.batchedUpdates(() => {
              this._onChange(value, idle);
            });
          }
        }
      }
      return getAnimated(this);
    }
    _onStart() {
      const anim = this.animation;
      if (!anim.changed) {
        anim.changed = true;
        sendEvent(this, "onStart", getFinishedResult(this, checkFinished(this, anim.to)), this);
      }
    }
    _onChange(value, idle) {
      if (!idle) {
        this._onStart();
        callProp(this.animation.onChange, value, this);
      }
      callProp(this.defaultProps.onChange, value, this);
      super._onChange(value, idle);
    }
    _start() {
      const anim = this.animation;
      getAnimated(this).reset(getFluidValue(anim.to));
      if (!anim.immediate) {
        anim.fromValues = anim.values.map((node) => node.lastPosition);
      }
      if (!isAnimating(this)) {
        setActiveBit(this, true);
        if (!isPaused(this)) {
          this._resume();
        }
      }
    }
    _resume() {
      if (globals.skipAnimation) {
        this.finish();
      } else {
        frameLoop.start(this);
      }
    }
    _stop(goal, cancel) {
      if (isAnimating(this)) {
        setActiveBit(this, false);
        const anim = this.animation;
        each(anim.values, (node) => {
          node.done = true;
        });
        if (anim.toValues) {
          anim.onChange = anim.onPause = anim.onResume = void 0;
        }
        callFluidObservers(this, {
          type: "idle",
          parent: this
        });
        const result = cancel ? getCancelledResult(this.get()) : getFinishedResult(this.get(), checkFinished(this, goal != null ? goal : anim.to));
        flushCalls(this._pendingCalls, result);
        if (anim.changed) {
          anim.changed = false;
          sendEvent(this, "onRest", result, this);
        }
      }
    }
  };
  function checkFinished(target, to2) {
    const goal = computeGoal(to2);
    const value = computeGoal(target.get());
    return isEqual(value, goal);
  }
  function createLoopUpdate(props, loop2 = props.loop, to2 = props.to) {
    let loopRet = callProp(loop2);
    if (loopRet) {
      const overrides = loopRet !== true && inferTo(loopRet);
      const reverse = (overrides || props).reverse;
      const reset = !overrides || overrides.reset;
      return createUpdate(_extends3({}, props, {
        loop: loop2,
        default: false,
        pause: void 0,
        to: !reverse || isAsyncTo(to2) ? to2 : void 0,
        from: reset ? props.from : void 0,
        reset
      }, overrides));
    }
  }
  function createUpdate(props) {
    const {
      to: to2,
      from
    } = props = inferTo(props);
    const keys = /* @__PURE__ */ new Set();
    if (is.obj(to2)) findDefined(to2, keys);
    if (is.obj(from)) findDefined(from, keys);
    props.keys = keys.size ? Array.from(keys) : null;
    return props;
  }
  function findDefined(values, keys) {
    eachProp(values, (value, key) => value != null && keys.add(key));
  }
  var ACTIVE_EVENTS = ["onStart", "onRest", "onChange", "onPause", "onResume"];
  function mergeActiveFn(target, props, type) {
    target.animation[type] = props[type] !== getDefaultProp(props, type) ? resolveProp(props[type], target.key) : void 0;
  }
  function sendEvent(target, type, ...args) {
    var _target$animation$typ, _target$animation, _target$defaultProps$, _target$defaultProps;
    (_target$animation$typ = (_target$animation = target.animation)[type]) == null ? void 0 : _target$animation$typ.call(_target$animation, ...args);
    (_target$defaultProps$ = (_target$defaultProps = target.defaultProps)[type]) == null ? void 0 : _target$defaultProps$.call(_target$defaultProps, ...args);
  }
  var BATCHED_EVENTS = ["onStart", "onChange", "onRest"];
  var nextId = 1;
  var Controller = class {
    constructor(props, flush2) {
      this.id = nextId++;
      this.springs = {};
      this.queue = [];
      this.ref = void 0;
      this._flush = void 0;
      this._initialProps = void 0;
      this._lastAsyncId = 0;
      this._active = /* @__PURE__ */ new Set();
      this._changed = /* @__PURE__ */ new Set();
      this._started = false;
      this._item = void 0;
      this._state = {
        paused: false,
        pauseQueue: /* @__PURE__ */ new Set(),
        resumeQueue: /* @__PURE__ */ new Set(),
        timeouts: /* @__PURE__ */ new Set()
      };
      this._events = {
        onStart: /* @__PURE__ */ new Map(),
        onChange: /* @__PURE__ */ new Map(),
        onRest: /* @__PURE__ */ new Map()
      };
      this._onFrame = this._onFrame.bind(this);
      if (flush2) {
        this._flush = flush2;
      }
      if (props) {
        this.start(_extends3({
          default: true
        }, props));
      }
    }
    get idle() {
      return !this._state.asyncTo && Object.values(this.springs).every((spring) => {
        return spring.idle && !spring.isDelayed && !spring.isPaused;
      });
    }
    get item() {
      return this._item;
    }
    set item(item) {
      this._item = item;
    }
    get() {
      const values = {};
      this.each((spring, key) => values[key] = spring.get());
      return values;
    }
    set(values) {
      for (const key in values) {
        const value = values[key];
        if (!is.und(value)) {
          this.springs[key].set(value);
        }
      }
    }
    update(props) {
      if (props) {
        this.queue.push(createUpdate(props));
      }
      return this;
    }
    start(props) {
      let {
        queue
      } = this;
      if (props) {
        queue = toArray(props).map(createUpdate);
      } else {
        this.queue = [];
      }
      if (this._flush) {
        return this._flush(this, queue);
      }
      prepareKeys(this, queue);
      return flushUpdateQueue(this, queue);
    }
    stop(arg, keys) {
      if (arg !== !!arg) {
        keys = arg;
      }
      if (keys) {
        const springs = this.springs;
        each(toArray(keys), (key) => springs[key].stop(!!arg));
      } else {
        stopAsync(this._state, this._lastAsyncId);
        this.each((spring) => spring.stop(!!arg));
      }
      return this;
    }
    pause(keys) {
      if (is.und(keys)) {
        this.start({
          pause: true
        });
      } else {
        const springs = this.springs;
        each(toArray(keys), (key) => springs[key].pause());
      }
      return this;
    }
    resume(keys) {
      if (is.und(keys)) {
        this.start({
          pause: false
        });
      } else {
        const springs = this.springs;
        each(toArray(keys), (key) => springs[key].resume());
      }
      return this;
    }
    each(iterator) {
      eachProp(this.springs, iterator);
    }
    _onFrame() {
      const {
        onStart,
        onChange,
        onRest
      } = this._events;
      const active = this._active.size > 0;
      const changed = this._changed.size > 0;
      if (active && !this._started || changed && !this._started) {
        this._started = true;
        flush(onStart, ([onStart2, result]) => {
          result.value = this.get();
          onStart2(result, this, this._item);
        });
      }
      const idle = !active && this._started;
      const values = changed || idle && onRest.size ? this.get() : null;
      if (changed && onChange.size) {
        flush(onChange, ([onChange2, result]) => {
          result.value = values;
          onChange2(result, this, this._item);
        });
      }
      if (idle) {
        this._started = false;
        flush(onRest, ([onRest2, result]) => {
          result.value = values;
          onRest2(result, this, this._item);
        });
      }
    }
    eventObserved(event) {
      if (event.type == "change") {
        this._changed.add(event.parent);
        if (!event.idle) {
          this._active.add(event.parent);
        }
      } else if (event.type == "idle") {
        this._active.delete(event.parent);
      } else return;
      raf.onFrame(this._onFrame);
    }
  };
  function flushUpdateQueue(ctrl, queue) {
    return Promise.all(queue.map((props) => flushUpdate(ctrl, props))).then((results) => getCombinedResult(ctrl, results));
  }
  async function flushUpdate(ctrl, props, isLoop) {
    const {
      keys,
      to: to2,
      from,
      loop: loop2,
      onRest,
      onResolve
    } = props;
    const defaults2 = is.obj(props.default) && props.default;
    if (loop2) {
      props.loop = false;
    }
    if (to2 === false) props.to = null;
    if (from === false) props.from = null;
    const asyncTo = is.arr(to2) || is.fun(to2) ? to2 : void 0;
    if (asyncTo) {
      props.to = void 0;
      props.onRest = void 0;
      if (defaults2) {
        defaults2.onRest = void 0;
      }
    } else {
      each(BATCHED_EVENTS, (key) => {
        const handler = props[key];
        if (is.fun(handler)) {
          const queue = ctrl["_events"][key];
          props[key] = ({
            finished,
            cancelled
          }) => {
            const result2 = queue.get(handler);
            if (result2) {
              if (!finished) result2.finished = false;
              if (cancelled) result2.cancelled = true;
            } else {
              queue.set(handler, {
                value: null,
                finished: finished || false,
                cancelled: cancelled || false
              });
            }
          };
          if (defaults2) {
            defaults2[key] = props[key];
          }
        }
      });
    }
    const state = ctrl["_state"];
    if (props.pause === !state.paused) {
      state.paused = props.pause;
      flushCalls(props.pause ? state.pauseQueue : state.resumeQueue);
    } else if (state.paused) {
      props.pause = true;
    }
    const promises = (keys || Object.keys(ctrl.springs)).map((key) => ctrl.springs[key].start(props));
    const cancel = props.cancel === true || getDefaultProp(props, "cancel") === true;
    if (asyncTo || cancel && state.asyncId) {
      promises.push(scheduleProps(++ctrl["_lastAsyncId"], {
        props,
        state,
        actions: {
          pause: noop2,
          resume: noop2,
          start(props2, resolve) {
            if (cancel) {
              stopAsync(state, ctrl["_lastAsyncId"]);
              resolve(getCancelledResult(ctrl));
            } else {
              props2.onRest = onRest;
              resolve(runAsync(asyncTo, props2, state, ctrl));
            }
          }
        }
      }));
    }
    if (state.paused) {
      await new Promise((resume) => {
        state.resumeQueue.add(resume);
      });
    }
    const result = getCombinedResult(ctrl, await Promise.all(promises));
    if (loop2 && result.finished && !(isLoop && result.noop)) {
      const nextProps = createLoopUpdate(props, loop2, to2);
      if (nextProps) {
        prepareKeys(ctrl, [nextProps]);
        return flushUpdate(ctrl, nextProps, true);
      }
    }
    if (onResolve) {
      raf.batchedUpdates(() => onResolve(result, ctrl, ctrl.item));
    }
    return result;
  }
  function createSpring(key, observer) {
    const spring = new SpringValue();
    spring.key = key;
    if (observer) {
      addFluidObserver(spring, observer);
    }
    return spring;
  }
  function prepareSprings(springs, props, create4) {
    if (props.keys) {
      each(props.keys, (key) => {
        const spring = springs[key] || (springs[key] = create4(key));
        spring["_prepareNode"](props);
      });
    }
  }
  function prepareKeys(ctrl, queue) {
    each(queue, (props) => {
      prepareSprings(ctrl.springs, props, (key) => {
        return createSpring(key, ctrl);
      });
    });
  }
  function _objectWithoutPropertiesLoose(source, excluded) {
    if (source == null) return {};
    var target = {};
    var sourceKeys = Object.keys(source);
    var key, i3;
    for (i3 = 0; i3 < sourceKeys.length; i3++) {
      key = sourceKeys[i3];
      if (excluded.indexOf(key) >= 0) continue;
      target[key] = source[key];
    }
    return target;
  }
  var _excluded$3 = ["children"];
  var SpringContext = (_ref) => {
    let {
      children
    } = _ref, props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
    const inherited = (0, import_react3.useContext)(ctx);
    const pause = props.pause || !!inherited.pause, immediate = props.immediate || !!inherited.immediate;
    props = useMemoOne(() => ({
      pause,
      immediate
    }), [pause, immediate]);
    const {
      Provider
    } = ctx;
    return React2.createElement(Provider, {
      value: props
    }, children);
  };
  var ctx = makeContext(SpringContext, {});
  SpringContext.Provider = ctx.Provider;
  SpringContext.Consumer = ctx.Consumer;
  function makeContext(target, init) {
    Object.assign(target, React2.createContext(init));
    target.Provider._context = target;
    target.Consumer._context = target;
    return target;
  }
  var TransitionPhase;
  (function(TransitionPhase2) {
    TransitionPhase2["MOUNT"] = "mount";
    TransitionPhase2["ENTER"] = "enter";
    TransitionPhase2["UPDATE"] = "update";
    TransitionPhase2["LEAVE"] = "leave";
  })(TransitionPhase || (TransitionPhase = {}));
  var Interpolation = class extends FrameValue {
    constructor(source, args) {
      super();
      this.key = void 0;
      this.idle = true;
      this.calc = void 0;
      this._active = /* @__PURE__ */ new Set();
      this.source = source;
      this.calc = createInterpolator(...args);
      const value = this._get();
      const nodeType = getAnimatedType(value);
      setAnimated(this, nodeType.create(value));
    }
    advance(_dt) {
      const value = this._get();
      const oldValue = this.get();
      if (!isEqual(value, oldValue)) {
        getAnimated(this).setValue(value);
        this._onChange(value, this.idle);
      }
      if (!this.idle && checkIdle(this._active)) {
        becomeIdle(this);
      }
    }
    _get() {
      const inputs = is.arr(this.source) ? this.source.map(getFluidValue) : toArray(getFluidValue(this.source));
      return this.calc(...inputs);
    }
    _start() {
      if (this.idle && !checkIdle(this._active)) {
        this.idle = false;
        each(getPayload(this), (node) => {
          node.done = false;
        });
        if (globals.skipAnimation) {
          raf.batchedUpdates(() => this.advance());
          becomeIdle(this);
        } else {
          frameLoop.start(this);
        }
      }
    }
    _attach() {
      let priority2 = 1;
      each(toArray(this.source), (source) => {
        if (hasFluidValue(source)) {
          addFluidObserver(source, this);
        }
        if (isFrameValue(source)) {
          if (!source.idle) {
            this._active.add(source);
          }
          priority2 = Math.max(priority2, source.priority + 1);
        }
      });
      this.priority = priority2;
      this._start();
    }
    _detach() {
      each(toArray(this.source), (source) => {
        if (hasFluidValue(source)) {
          removeFluidObserver(source, this);
        }
      });
      this._active.clear();
      becomeIdle(this);
    }
    eventObserved(event) {
      if (event.type == "change") {
        if (event.idle) {
          this.advance();
        } else {
          this._active.add(event.parent);
          this._start();
        }
      } else if (event.type == "idle") {
        this._active.delete(event.parent);
      } else if (event.type == "priority") {
        this.priority = toArray(this.source).reduce((highest, parent) => Math.max(highest, (isFrameValue(parent) ? parent.priority : 0) + 1), 0);
      }
    }
  };
  function isIdle(source) {
    return source.idle !== false;
  }
  function checkIdle(active) {
    return !active.size || Array.from(active).every(isIdle);
  }
  function becomeIdle(self) {
    if (!self.idle) {
      self.idle = true;
      each(getPayload(self), (node) => {
        node.done = true;
      });
      callFluidObservers(self, {
        type: "idle",
        parent: self
      });
    }
  }
  globals.assign({
    createStringInterpolator,
    to: (source, args) => new Interpolation(source, args)
  });
  var update2 = frameLoop.advance;

  // node_modules/@react-spring/web/dist/react-spring-web.esm.js
  var import_react_dom = __toESM(require_react_dom());
  function _objectWithoutPropertiesLoose2(source, excluded) {
    if (source == null) return {};
    var target = {};
    var sourceKeys = Object.keys(source);
    var key, i3;
    for (i3 = 0; i3 < sourceKeys.length; i3++) {
      key = sourceKeys[i3];
      if (excluded.indexOf(key) >= 0) continue;
      target[key] = source[key];
    }
    return target;
  }
  var _excluded$2 = ["style", "children", "scrollTop", "scrollLeft"];
  var isCustomPropRE = /^--/;
  function dangerousStyleValue(name2, value) {
    if (value == null || typeof value === "boolean" || value === "") return "";
    if (typeof value === "number" && value !== 0 && !isCustomPropRE.test(name2) && !(isUnitlessNumber.hasOwnProperty(name2) && isUnitlessNumber[name2])) return value + "px";
    return ("" + value).trim();
  }
  var attributeCache = {};
  function applyAnimatedValues(instance, props) {
    if (!instance.nodeType || !instance.setAttribute) {
      return false;
    }
    const isFilterElement = instance.nodeName === "filter" || instance.parentNode && instance.parentNode.nodeName === "filter";
    const _ref = props, {
      style,
      children,
      scrollTop,
      scrollLeft
    } = _ref, attributes = _objectWithoutPropertiesLoose2(_ref, _excluded$2);
    const values = Object.values(attributes);
    const names = Object.keys(attributes).map((name2) => isFilterElement || instance.hasAttribute(name2) ? name2 : attributeCache[name2] || (attributeCache[name2] = name2.replace(/([A-Z])/g, (n3) => "-" + n3.toLowerCase())));
    if (children !== void 0) {
      instance.textContent = children;
    }
    for (let name2 in style) {
      if (style.hasOwnProperty(name2)) {
        const value = dangerousStyleValue(name2, style[name2]);
        if (isCustomPropRE.test(name2)) {
          instance.style.setProperty(name2, value);
        } else {
          instance.style[name2] = value;
        }
      }
    }
    names.forEach((name2, i3) => {
      instance.setAttribute(name2, values[i3]);
    });
    if (scrollTop !== void 0) {
      instance.scrollTop = scrollTop;
    }
    if (scrollLeft !== void 0) {
      instance.scrollLeft = scrollLeft;
    }
  }
  var isUnitlessNumber = {
    animationIterationCount: true,
    borderImageOutset: true,
    borderImageSlice: true,
    borderImageWidth: true,
    boxFlex: true,
    boxFlexGroup: true,
    boxOrdinalGroup: true,
    columnCount: true,
    columns: true,
    flex: true,
    flexGrow: true,
    flexPositive: true,
    flexShrink: true,
    flexNegative: true,
    flexOrder: true,
    gridRow: true,
    gridRowEnd: true,
    gridRowSpan: true,
    gridRowStart: true,
    gridColumn: true,
    gridColumnEnd: true,
    gridColumnSpan: true,
    gridColumnStart: true,
    fontWeight: true,
    lineClamp: true,
    lineHeight: true,
    opacity: true,
    order: true,
    orphans: true,
    tabSize: true,
    widows: true,
    zIndex: true,
    zoom: true,
    fillOpacity: true,
    floodOpacity: true,
    stopOpacity: true,
    strokeDasharray: true,
    strokeDashoffset: true,
    strokeMiterlimit: true,
    strokeOpacity: true,
    strokeWidth: true
  };
  var prefixKey = (prefix2, key) => prefix2 + key.charAt(0).toUpperCase() + key.substring(1);
  var prefixes = ["Webkit", "Ms", "Moz", "O"];
  isUnitlessNumber = Object.keys(isUnitlessNumber).reduce((acc, prop) => {
    prefixes.forEach((prefix2) => acc[prefixKey(prefix2, prop)] = acc[prop]);
    return acc;
  }, isUnitlessNumber);
  var _excluded$1 = ["x", "y", "z"];
  var domTransforms = /^(matrix|translate|scale|rotate|skew)/;
  var pxTransforms = /^(translate)/;
  var degTransforms = /^(rotate|skew)/;
  var addUnit = (value, unit) => is.num(value) && value !== 0 ? value + unit : value;
  var isValueIdentity = (value, id) => is.arr(value) ? value.every((v3) => isValueIdentity(v3, id)) : is.num(value) ? value === id : parseFloat(value) === id;
  var AnimatedStyle = class extends AnimatedObject {
    constructor(_ref) {
      let {
        x: x2,
        y: y3,
        z
      } = _ref, style = _objectWithoutPropertiesLoose2(_ref, _excluded$1);
      const inputs = [];
      const transforms = [];
      if (x2 || y3 || z) {
        inputs.push([x2 || 0, y3 || 0, z || 0]);
        transforms.push((xyz) => [`translate3d(${xyz.map((v3) => addUnit(v3, "px")).join(",")})`, isValueIdentity(xyz, 0)]);
      }
      eachProp(style, (value, key) => {
        if (key === "transform") {
          inputs.push([value || ""]);
          transforms.push((transform) => [transform, transform === ""]);
        } else if (domTransforms.test(key)) {
          delete style[key];
          if (is.und(value)) return;
          const unit = pxTransforms.test(key) ? "px" : degTransforms.test(key) ? "deg" : "";
          inputs.push(toArray(value));
          transforms.push(key === "rotate3d" ? ([x3, y4, z2, deg]) => [`rotate3d(${x3},${y4},${z2},${addUnit(deg, unit)})`, isValueIdentity(deg, 0)] : (input) => [`${key}(${input.map((v3) => addUnit(v3, unit)).join(",")})`, isValueIdentity(input, key.startsWith("scale") ? 1 : 0)]);
        }
      });
      if (inputs.length) {
        style.transform = new FluidTransform(inputs, transforms);
      }
      super(style);
    }
  };
  var FluidTransform = class extends FluidValue {
    constructor(inputs, transforms) {
      super();
      this._value = null;
      this.inputs = inputs;
      this.transforms = transforms;
    }
    get() {
      return this._value || (this._value = this._get());
    }
    _get() {
      let transform = "";
      let identity3 = true;
      each(this.inputs, (input, i3) => {
        const arg1 = getFluidValue(input[0]);
        const [t4, id] = this.transforms[i3](is.arr(arg1) ? arg1 : input.map(getFluidValue));
        transform += " " + t4;
        identity3 = identity3 && id;
      });
      return identity3 ? "none" : transform;
    }
    observerAdded(count) {
      if (count == 1) each(this.inputs, (input) => each(input, (value) => hasFluidValue(value) && addFluidObserver(value, this)));
    }
    observerRemoved(count) {
      if (count == 0) each(this.inputs, (input) => each(input, (value) => hasFluidValue(value) && removeFluidObserver(value, this)));
    }
    eventObserved(event) {
      if (event.type == "change") {
        this._value = null;
      }
      callFluidObservers(this, event);
    }
  };
  var primitives = ["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"];
  var _excluded = ["scrollTop", "scrollLeft"];
  globals.assign({
    batchedUpdates: import_react_dom.unstable_batchedUpdates,
    createStringInterpolator,
    colors
  });
  var host = createHost(primitives, {
    applyAnimatedValues,
    createAnimatedStyle: (style) => new AnimatedStyle(style),
    getComponentProps: (_ref) => {
      let props = _objectWithoutPropertiesLoose2(_ref, _excluded);
      return props;
    }
  });
  var animated = host.animated;

  // packages/fields/build-module/components/media-edit/use-moving-animation.mjs
  var import_element5 = __toESM(require_element(), 1);
  function getAbsolutePosition(element) {
    return {
      top: element.offsetTop,
      left: element.offsetLeft
    };
  }
  function useMovingAnimation(triggerAnimationOnChange) {
    const ref = (0, import_element5.useRef)(null);
    const previousRef = (0, import_element5.useRef)(void 0);
    if (ref.current) {
      previousRef.current = getAbsolutePosition(ref.current);
    }
    (0, import_element5.useLayoutEffect)(() => {
      const previous = previousRef.current;
      if (!previous || !ref.current) {
        return;
      }
      if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
        return;
      }
      const controller = new Controller({
        x: 0,
        y: 0,
        config: { mass: 5, tension: 2e3, friction: 200 },
        onChange({ value }) {
          if (!ref.current) {
            return;
          }
          let { x: x22, y: y22 } = value;
          x22 = Math.round(x22);
          y22 = Math.round(y22);
          const finishedMoving = x22 === 0 && y22 === 0;
          ref.current.style.transform = finishedMoving ? "" : `translate3d(${x22}px,${y22}px,0)`;
        }
      });
      ref.current.style.transform = "";
      const destination = getAbsolutePosition(ref.current);
      const x2 = Math.round(previous.left - destination.left);
      const y3 = Math.round(previous.top - destination.top);
      controller.start({ x: 0, y: 0, from: { x: x2, y: y3 } });
      return () => {
        controller.stop();
        controller.set({ x: 0, y: 0 });
      };
    }, [triggerAnimationOnChange]);
    return ref;
  }

  // packages/fields/build-module/components/media-edit/index.mjs
  var import_jsx_runtime81 = __toESM(require_jsx_runtime(), 1);
  var { MediaUploadModal } = unlock2(import_media_utils2.privateApis);
  function AnimatedMediaItem({
    children,
    index: index2,
    className
  }) {
    const ref = useMovingAnimation(index2);
    return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { ref, className, children });
  }
  function normalizeValue(value) {
    if (Array.isArray(value)) {
      return value;
    }
    return value ? [value] : [];
  }
  function ConditionalMediaUpload({ render: render4, multiple, ...props }) {
    const [isModalOpen, setIsModalOpen] = (0, import_element6.useState)(false);
    if (window.__experimentalDataViewsMediaModal) {
      return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
        render4 && render4({ open: () => setIsModalOpen(true) }),
        isModalOpen && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
          MediaUploadModal,
          {
            ...props,
            multiple,
            isOpen: isModalOpen,
            onClose: () => {
              setIsModalOpen(false);
              props.onClose?.();
            },
            onSelect: (media) => {
              setIsModalOpen(false);
              props.onSelect?.(media);
            }
          }
        )
      ] });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
      import_media_utils2.MediaUpload,
      {
        ...props,
        render: render4,
        multiple: multiple ? "add" : void 0
      }
    );
  }
  function MediaPickerButton({
    open,
    children,
    label,
    showTooltip = false,
    onFilesDrop,
    attachment,
    isUploading = false
  }) {
    const isBlob = attachment && (0, import_blob.isBlobURL)(attachment.source_url);
    const mediaPickerButton = /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
      "div",
      {
        className: clsx_default("fields__media-edit-picker-button", {
          "has-attachment": attachment
        }),
        role: "button",
        tabIndex: 0,
        onClick: () => {
          if (!isUploading) {
            open();
          }
        },
        onKeyDown: (event) => {
          if (isUploading) {
            return;
          }
          if (event.key === "Enter" || event.key === " ") {
            event.preventDefault();
            open();
          }
        },
        "aria-label": label,
        "aria-disabled": isUploading,
        children: [
          children,
          isBlob && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "fields__media-edit-picker-button-spinner", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components5.Spinner, {}) }),
          !isUploading && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
            import_components5.DropZone,
            {
              onFilesDrop: (files) => onFilesDrop(files, attachment?.id)
            }
          )
        ]
      }
    );
    if (!showTooltip) {
      return mediaPickerButton;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components5.Tooltip, { text: label, placement: "top", children: mediaPickerButton });
  }
  var archiveMimeTypes = [
    "application/zip",
    "application/x-zip-compressed",
    "application/x-rar-compressed",
    "application/x-7z-compressed",
    "application/x-tar",
    "application/x-gzip"
  ];
  function MediaTitle({ attachment }) {
    return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components5.__experimentalTruncate, { className: "fields__media-edit-filename", children: attachment.title.rendered });
  }
  function MediaEditPlaceholder(props) {
    return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(MediaPickerButton, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "fields__media-edit-placeholder", children: props.label }) });
  }
  function MoveButtons({
    itemId,
    index: index2,
    totalItems,
    isUploading,
    moveItem,
    orientation = "vertical"
  }) {
    const isHorizontal = orientation === "horizontal";
    return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
        import_components5.Button,
        {
          __next40pxDefaultSize: true,
          icon: isHorizontal ? chevron_left_default : chevron_up_default,
          label: isHorizontal ? (0, import_i18n13.__)("Move left") : (0, import_i18n13.__)("Move up"),
          size: "small",
          disabled: isUploading || index2 === 0,
          accessibleWhenDisabled: true,
          tooltipPosition: "top",
          onClick: (event) => {
            event.stopPropagation();
            moveItem(itemId, "up");
          }
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
        import_components5.Button,
        {
          __next40pxDefaultSize: true,
          icon: isHorizontal ? chevron_right_default : chevron_down_default,
          label: isHorizontal ? (0, import_i18n13.__)("Move right") : (0, import_i18n13.__)("Move down"),
          size: "small",
          disabled: isUploading || index2 === totalItems - 1,
          accessibleWhenDisabled: true,
          tooltipPosition: "top",
          onClick: (event) => {
            event.stopPropagation();
            moveItem(itemId, "down");
          }
        }
      )
    ] });
  }
  function MediaPreview({ attachment }) {
    const url = attachment.source_url;
    const mimeType = attachment.mime_type || "";
    if (mimeType.startsWith("image")) {
      return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
        "img",
        {
          className: "fields__media-edit-thumbnail",
          alt: attachment.alt_text || "",
          src: url
        }
      );
    } else if (mimeType.startsWith("audio")) {
      return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components5.Icon, { icon: audio_default });
    } else if (mimeType.startsWith("video")) {
      return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components5.Icon, { icon: video_default });
    } else if (archiveMimeTypes.includes(mimeType)) {
      return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components5.Icon, { icon: archive_default });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components5.Icon, { icon: file_default });
  }
  function ExpandedMediaEditAttachments({
    allItems,
    addButtonLabel,
    multiple,
    removeItem,
    moveItem,
    open,
    onFilesDrop,
    isUploading,
    setTargetItemId
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
      "div",
      {
        className: clsx_default("fields__media-edit-expanded", {
          "is-multiple": multiple,
          "is-single": !multiple,
          "is-empty": !allItems?.length
        }),
        children: [
          allItems?.map((attachment, index2) => {
            const hasPreviewImage = attachment.mime_type?.startsWith("image");
            const isBlob = (0, import_blob.isBlobURL)(attachment.source_url);
            const attachmentNumericId = attachment.id;
            return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
              AnimatedMediaItem,
              {
                index: index2,
                className: clsx_default("fields__media-edit-expanded-item", {
                  "has-preview-image": hasPreviewImage
                }),
                children: [
                  /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
                    MediaPickerButton,
                    {
                      open: () => {
                        setTargetItemId(attachmentNumericId);
                        open();
                      },
                      label: !isBlob ? (0, import_i18n13.sprintf)(
                        /* translators: %s: The title of the media item. */
                        (0, import_i18n13.__)("Replace %s"),
                        attachment.title.rendered
                      ) : (0, import_i18n13.__)("Replace"),
                      showTooltip: true,
                      onFilesDrop,
                      attachment,
                      isUploading,
                      children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "fields__media-edit-expanded-preview", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
                        import_components5.__experimentalVStack,
                        {
                          spacing: 0,
                          alignment: "center",
                          justify: "center",
                          className: "fields__media-edit-expanded-preview-stack",
                          children: (!isBlob || hasPreviewImage) && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
                            MediaPreview,
                            {
                              attachment
                            }
                          )
                        }
                      ) })
                    }
                  ),
                  !isBlob && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "fields__media-edit-expanded-overlay", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
                    import_components5.__experimentalHStack,
                    {
                      className: "fields__media-edit-expanded-actions",
                      spacing: 0,
                      alignment: "flex-end",
                      expanded: false,
                      children: [
                        multiple && allItems.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
                          MoveButtons,
                          {
                            itemId: attachmentNumericId,
                            index: index2,
                            totalItems: allItems.length,
                            isUploading,
                            moveItem,
                            orientation: "horizontal"
                          }
                        ),
                        /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
                          import_components5.Button,
                          {
                            __next40pxDefaultSize: true,
                            icon: close_small_default,
                            label: (0, import_i18n13.__)("Remove"),
                            size: "small",
                            disabled: isUploading,
                            accessibleWhenDisabled: true,
                            tooltipPosition: "top",
                            onClick: (event) => {
                              event.stopPropagation();
                              removeItem(attachmentNumericId);
                            }
                          }
                        )
                      ]
                    }
                  ) })
                ]
              },
              attachment.id
            );
          }),
          (multiple || !allItems?.length) && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
            MediaEditPlaceholder,
            {
              open: () => {
                setTargetItemId(void 0);
                open();
              },
              label: addButtonLabel,
              onFilesDrop,
              isUploading
            }
          )
        ]
      }
    );
  }
  function CompactMediaEditAttachments({
    allItems,
    addButtonLabel,
    multiple,
    removeItem,
    moveItem,
    open,
    onFilesDrop,
    isUploading,
    setTargetItemId
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
      !!allItems?.length && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
        "div",
        {
          className: clsx_default("fields__media-edit-compact-group", {
            "is-single": allItems.length === 1
          }),
          children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components5.__experimentalVStack, { spacing: 0, children: allItems.map((attachment, index2) => {
            const isBlob = (0, import_blob.isBlobURL)(attachment.source_url);
            const showMoveButtons = multiple && allItems.length > 1;
            const attachmentNumericId = attachment.id;
            return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
              AnimatedMediaItem,
              {
                index: index2,
                className: "fields__media-edit-compact",
                children: [
                  /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
                    MediaPickerButton,
                    {
                      open: () => {
                        setTargetItemId(
                          attachmentNumericId
                        );
                        open();
                      },
                      label: (0, import_i18n13.__)("Replace"),
                      showTooltip: true,
                      onFilesDrop,
                      attachment,
                      isUploading,
                      children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
                        /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
                          MediaPreview,
                          {
                            attachment
                          }
                        ),
                        !isBlob && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
                          MediaTitle,
                          {
                            attachment
                          }
                        )
                      ] })
                    }
                  ),
                  !isBlob && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
                    import_components5.__experimentalHStack,
                    {
                      className: "fields__media-edit-compact-movers",
                      spacing: 0,
                      alignment: "flex-end",
                      expanded: false,
                      children: [
                        showMoveButtons && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
                          MoveButtons,
                          {
                            itemId: attachmentNumericId,
                            index: index2,
                            totalItems: allItems.length,
                            isUploading,
                            moveItem,
                            orientation: "vertical"
                          }
                        ),
                        /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
                          import_components5.Button,
                          {
                            __next40pxDefaultSize: true,
                            icon: close_small_default,
                            label: (0, import_i18n13.__)("Remove"),
                            size: "small",
                            disabled: isUploading,
                            accessibleWhenDisabled: true,
                            tooltipPosition: "top",
                            onClick: (event) => {
                              event.stopPropagation();
                              removeItem(
                                attachmentNumericId
                              );
                            }
                          }
                        )
                      ]
                    }
                  )
                ]
              },
              attachment.id
            );
          }) })
        }
      ),
      (multiple || !allItems?.length) && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
        MediaEditPlaceholder,
        {
          open: () => {
            setTargetItemId(void 0);
            open();
          },
          label: addButtonLabel,
          onFilesDrop,
          isUploading
        }
      )
    ] });
  }
  function MediaEdit({
    data,
    field,
    onChange,
    hideLabelFromVision,
    allowedTypes = ["image"],
    multiple,
    isExpanded,
    validity
  }) {
    const value = field.getValue({ item: data });
    const [isTouched, setIsTouched] = (0, import_element6.useState)(false);
    const validityTargetRef = (0, import_element6.useRef)(null);
    const [customValidity, setCustomValidity] = (0, import_element6.useState)(void 0);
    (0, import_element6.useEffect)(() => {
      const validityTarget = validityTargetRef.current;
      const handler = () => {
        setIsTouched(true);
      };
      validityTarget?.addEventListener("invalid", handler);
      return () => validityTarget?.removeEventListener("invalid", handler);
    }, []);
    const attachments = (0, import_data8.useSelect)(
      (select6) => {
        if (!value) {
          return null;
        }
        const normalizedValue = normalizeValue(value);
        const sortedIds = [...normalizedValue].sort((a3, b3) => a3 - b3);
        const { getEntityRecords } = select6(import_core_data6.store);
        return getEntityRecords("postType", "attachment", {
          include: sortedIds
        });
      },
      [value]
    );
    const stableAttachmentsRef = (0, import_element6.useRef)(
      null
    );
    if (attachments !== null) {
      stableAttachmentsRef.current = attachments;
    }
    let stableAttachments = attachments;
    if (attachments === null && stableAttachmentsRef.current && value) {
      const stableIds = new Set(
        stableAttachmentsRef.current.map((a3) => a3.id)
      );
      if (normalizeValue(value).every((id) => stableIds.has(id))) {
        stableAttachments = stableAttachmentsRef.current;
      }
    }
    const orderedAttachments = (0, import_element6.useMemo)(() => {
      if (!stableAttachments) {
        return null;
      }
      const normalizedValue = normalizeValue(value);
      const attachmentMap = new Map(
        stableAttachments.map((a3) => [a3.id, a3])
      );
      return normalizedValue.map((id) => attachmentMap.get(id)).filter((a3) => a3 !== void 0);
    }, [stableAttachments, value]);
    const { createErrorNotice } = (0, import_data8.useDispatch)(import_notices3.store);
    const { receiveEntityRecords } = (0, import_data8.useDispatch)(import_core_data6.store);
    const [targetItemId, setTargetItemId] = (0, import_element6.useState)();
    const openModalRef = (0, import_element6.useRef)(void 0);
    const [pendingOpen, setPendingOpen] = (0, import_element6.useState)(false);
    const [blobs, setBlobs] = (0, import_element6.useState)([]);
    (0, import_element6.useEffect)(() => {
      if (pendingOpen) {
        setPendingOpen(false);
        openModalRef.current?.();
      }
    }, [pendingOpen]);
    const onChangeControl = (0, import_element6.useCallback)(
      (newValue) => onChange(field.setValue({ item: data, value: newValue })),
      [data, field, onChange]
    );
    const removeItem = (0, import_element6.useCallback)(
      (itemId) => {
        const currentIds = normalizeValue(value);
        const newIds = currentIds.filter((id) => id !== itemId);
        setIsTouched(true);
        onChangeControl(newIds.length ? newIds : void 0);
      },
      [value, onChangeControl]
    );
    const moveItem = (0, import_element6.useCallback)(
      (itemId, direction) => {
        if (!orderedAttachments) {
          return;
        }
        const currentIds = orderedAttachments.map((a3) => a3.id);
        const index2 = currentIds.indexOf(itemId);
        const newIndex = direction === "up" ? index2 - 1 : index2 + 1;
        [currentIds[index2], currentIds[newIndex]] = [
          currentIds[newIndex],
          currentIds[index2]
        ];
        onChangeControl(currentIds);
      },
      [orderedAttachments, onChangeControl]
    );
    const onFilesDrop = (0, import_element6.useCallback)(
      (files, _targetItemId) => {
        setTargetItemId(_targetItemId);
        (0, import_media_utils2.uploadMedia)({
          allowedTypes: allowedTypes?.length ? allowedTypes : void 0,
          filesList: files,
          onFileChange(uploadedMedia) {
            const blobUrls = uploadedMedia.filter((item) => (0, import_blob.isBlobURL)(item.url)).map((item) => item.url);
            setBlobs(blobUrls);
            if (!!blobUrls.length) {
              return;
            }
            receiveEntityRecords(
              "postType",
              "attachment",
              [],
              void 0,
              true
            );
            const uploadedIds = uploadedMedia.map(
              (item) => item.id
            );
            if (!multiple) {
              onChangeControl(uploadedIds[0]);
              setTargetItemId(void 0);
              return;
            }
            const currentValue = normalizeValue(value);
            if (_targetItemId === void 0) {
              onChangeControl([...currentValue, ...uploadedIds]);
            } else {
              const newValue = [...currentValue];
              newValue.splice(
                currentValue.indexOf(_targetItemId),
                1,
                ...uploadedIds
              );
              onChangeControl(newValue);
            }
            setTargetItemId(void 0);
          },
          onError(error) {
            setTargetItemId(void 0);
            setBlobs([]);
            createErrorNotice(error.message, { type: "snackbar" });
          },
          multiple: !!multiple
        });
      },
      [
        allowedTypes,
        value,
        multiple,
        createErrorNotice,
        onChangeControl,
        receiveEntityRecords
      ]
    );
    const addButtonLabel = field.placeholder || (multiple ? (0, import_i18n13.__)("Choose files") : (0, import_i18n13.__)("Choose file"));
    const allItems = (0, import_element6.useMemo)(() => {
      if (!blobs.length) {
        return orderedAttachments;
      }
      const items = [
        ...orderedAttachments || []
      ];
      const blobItems = blobs.map((url) => ({
        id: url,
        source_url: url,
        mime_type: (0, import_blob.getBlobTypeByURL)(url)
      }));
      if (targetItemId !== void 0) {
        const targetIndex = items.findIndex(
          (a3) => a3.id === targetItemId
        );
        items.splice(targetIndex, 1, ...blobItems);
      } else {
        items.push(...blobItems);
      }
      return items;
    }, [orderedAttachments, targetItemId, blobs]);
    (0, import_element6.useEffect)(() => {
      if (!isTouched) {
        return;
      }
      const input = validityTargetRef.current;
      if (!input) {
        return;
      }
      if (validity) {
        const customValidityResult = validity?.custom;
        setCustomValidity(customValidityResult);
        if (customValidityResult?.type === "invalid") {
          input.setCustomValidity(
            customValidityResult.message || (0, import_i18n13.__)("Invalid")
          );
        } else {
          input.setCustomValidity("");
        }
      } else {
        input.setCustomValidity("");
        setCustomValidity(void 0);
      }
    }, [isTouched, field.isValid, validity]);
    const onBlur = (0, import_element6.useCallback)(
      (event) => {
        if (isTouched) {
          return;
        }
        if (!event.relatedTarget || !event.currentTarget.contains(event.relatedTarget)) {
          setIsTouched(true);
        }
      },
      [isTouched]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { onBlur, children: [
      /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("fieldset", { className: "fields__media-edit", "data-field-id": field.id, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
        ConditionalMediaUpload,
        {
          onSelect: (selectedMedia) => {
            if (!multiple) {
              onChangeControl(selectedMedia.id);
              setTargetItemId(void 0);
              return;
            }
            const newIds = Array.isArray(selectedMedia) ? selectedMedia.map((m2) => m2.id) : [selectedMedia.id];
            const currentValue = normalizeValue(value);
            if (!currentValue.length) {
              onChangeControl(newIds);
            } else if (targetItemId === void 0) {
              const existingItems = currentValue.filter(
                (id) => newIds.includes(id)
              );
              const newItems = newIds.filter(
                (id) => !currentValue.includes(id)
              );
              onChangeControl([
                ...existingItems,
                ...newItems
              ]);
            } else if (selectedMedia.id !== targetItemId) {
              const filtered = currentValue.filter(
                (id) => id !== selectedMedia.id
              );
              onChangeControl(
                filtered.map(
                  (id) => id === targetItemId ? selectedMedia.id : id
                )
              );
            }
            setTargetItemId(void 0);
          },
          onClose: () => setTargetItemId(void 0),
          allowedTypes,
          value: targetItemId !== void 0 ? targetItemId : value,
          multiple: multiple && targetItemId === void 0,
          title: field.label,
          render: ({ open }) => {
            openModalRef.current = open;
            const AttachmentsComponent = isExpanded ? ExpandedMediaEditAttachments : CompactMediaEditAttachments;
            return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_components5.__experimentalVStack, { spacing: 2, children: [
              field.label && (hideLabelFromVision ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components5.VisuallyHidden, { as: "legend", children: field.label }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
                import_components5.BaseControl.VisualLabel,
                {
                  as: "legend",
                  style: { marginBottom: 0 },
                  children: field.label
                }
              )),
              /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
                AttachmentsComponent,
                {
                  allItems,
                  addButtonLabel,
                  multiple,
                  removeItem,
                  moveItem,
                  open: () => setPendingOpen(true),
                  onFilesDrop,
                  isUploading: !!blobs.length,
                  setTargetItemId
                }
              ),
              field.description && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components5.__experimentalText, { variant: "muted", children: field.description })
            ] });
          }
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components5.VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
        "input",
        {
          type: "text",
          ref: validityTargetRef,
          value: value ?? "",
          tabIndex: -1,
          "aria-hidden": "true",
          onChange: () => {
          }
        }
      ) }),
      customValidity && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { "aria-live": "polite", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
        "p",
        {
          className: clsx_default(
            "components-validated-control__indicator",
            {
              "is-invalid": customValidity.type === "invalid",
              "is-valid": customValidity.type === "valid"
            }
          ),
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
              import_components5.Icon,
              {
                className: "components-validated-control__indicator-icon",
                icon: error_default,
                size: 16,
                fill: "currentColor"
              }
            ),
            customValidity.message
          ]
        }
      ) })
    ] });
  }

  // packages/fields/build-module/fields/featured-image/featured-image-view.mjs
  var import_jsx_runtime82 = __toESM(require_jsx_runtime(), 1);
  var FeaturedImageView = ({
    item,
    config: config2
  }) => {
    const media = item?._embedded?.["wp:featuredmedia"]?.[0];
    const url = media?.source_url;
    if (url) {
      return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
        "img",
        {
          className: "fields-controls__featured-image-image",
          src: url,
          alt: "",
          srcSet: media?.media_details?.sizes ? Object.values(media.media_details.sizes).map(
            (size3) => `${size3.source_url} ${size3.width}w`
          ).join(", ") : void 0,
          sizes: config2?.sizes || "100vw"
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "fields-controls__featured-image-placeholder" });
  };

  // packages/fields/build-module/fields/featured-image/index.mjs
  var import_jsx_runtime83 = __toESM(require_jsx_runtime(), 1);
  var featuredImageField = {
    id: "featured_media",
    type: "media",
    label: (0, import_i18n14.__)("Featured Image"),
    Edit: (props) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(MediaEdit, { ...props, isExpanded: true }),
    render: FeaturedImageView,
    setValue: ({ value }) => ({
      featured_media: value ?? 0
    }),
    enableSorting: false,
    filterBy: false
  };
  var featured_image_default = featuredImageField;

  // packages/fields/build-module/fields/template/index.mjs
  var import_i18n16 = __toESM(require_i18n(), 1);

  // packages/fields/build-module/fields/template/template-edit.mjs
  var import_element7 = __toESM(require_element(), 1);
  var import_core_data8 = __toESM(require_core_data(), 1);
  var import_components6 = __toESM(require_components(), 1);
  var import_data10 = __toESM(require_data(), 1);
  var import_i18n15 = __toESM(require_i18n(), 1);

  // packages/fields/build-module/fields/template/hooks.mjs
  var import_data9 = __toESM(require_data(), 1);
  var import_core_data7 = __toESM(require_core_data(), 1);
  function getTemplateSlugToCheck(postType2, slug) {
    if (slug) {
      return postType2 === "page" ? `${postType2}-${slug}` : `single-${postType2}-${slug}`;
    }
    return postType2 === "page" ? "page" : `single-${postType2}`;
  }
  var NAME_NOT_FOUND = "";
  function useDefaultTemplateLabel(postType2, postId2, slug) {
    return (0, import_data9.useSelect)(
      (select6) => {
        if (!postType2 || !postId2) {
          return NAME_NOT_FOUND;
        }
        const postIdStr = String(postId2);
        const homePage = unlock2(select6(import_core_data7.store)).getHomePage();
        if (postType2 === "page" && homePage?.postType === "page" && homePage?.postId === postIdStr) {
          const templates = select6(
            import_core_data7.store
          ).getEntityRecords("postType", "wp_template", {
            per_page: -1
          });
          const frontPage = templates?.find(
            (t4) => t4.slug === "front-page"
          );
          if (frontPage) {
            return getItemTitle(frontPage);
          }
        }
        const postsPageId = unlock2(select6(import_core_data7.store)).getPostsPageId();
        if (postType2 === "page" && postsPageId === postIdStr) {
          const templateId22 = select6(import_core_data7.store).getDefaultTemplateId({
            slug: "home"
          });
          if (!templateId22) {
            return NAME_NOT_FOUND;
          }
          const template22 = select6(
            import_core_data7.store
          ).getEntityRecord(
            "postType",
            "wp_template",
            templateId22
          );
          return template22 ? getItemTitle(template22) : NAME_NOT_FOUND;
        }
        const slugToCheck = getTemplateSlugToCheck(postType2, slug);
        const templateId2 = select6(import_core_data7.store).getDefaultTemplateId({
          slug: slugToCheck
        });
        if (!templateId2) {
          return NAME_NOT_FOUND;
        }
        const template2 = select6(import_core_data7.store).getEntityRecord(
          "postType",
          "wp_template",
          templateId2
        );
        return template2 ? getItemTitle(template2) : NAME_NOT_FOUND;
      },
      [postType2, postId2, slug]
    );
  }

  // packages/fields/build-module/fields/template/template-edit.mjs
  var import_jsx_runtime84 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_ARRAY2 = [];
  var TemplateEdit = ({
    data,
    field,
    onChange
  }) => {
    const { id } = field;
    const postType2 = data.type;
    const postId2 = typeof data.id === "number" ? data.id : parseInt(data.id, 10);
    const slug = data.slug;
    const { templates, canSwitchTemplate } = (0, import_data10.useSelect)(
      (select6) => {
        const allTemplates = select6(import_core_data8.store).getEntityRecords(
          "postType",
          "wp_template",
          {
            per_page: -1,
            post_type: postType2
          }
        ) ?? EMPTY_ARRAY2;
        const { getHomePage, getPostsPageId } = unlock2(
          select6(import_core_data8.store)
        );
        const singlePostId = String(postId2);
        const isPostsPage = singlePostId !== void 0 && getPostsPageId() === singlePostId;
        const isFrontPage = singlePostId !== void 0 && postType2 === "page" && getHomePage()?.postId === singlePostId;
        return {
          templates: allTemplates,
          canSwitchTemplate: !isPostsPage && !isFrontPage
        };
      },
      [postId2, postType2]
    );
    const defaultTemplateLabel = useDefaultTemplateLabel(
      postType2,
      postId2,
      slug
    );
    const value = field.getValue({ item: data });
    const onChangeControl = (0, import_element7.useCallback)(
      (newValue) => onChange({
        [id]: newValue
      }),
      [id, onChange]
    );
    const options = (0, import_element7.useMemo)(() => {
      const templateOptions = templates.map((template2) => ({
        label: getItemTitle(template2),
        value: template2.slug
      }));
      return [
        { label: defaultTemplateLabel, value: "" },
        ...templateOptions
      ];
    }, [templates, defaultTemplateLabel]);
    return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
      import_components6.SelectControl,
      {
        __next40pxDefaultSize: true,
        label: (0, import_i18n15.__)("Template"),
        hideLabelFromVision: true,
        value,
        options,
        onChange: onChangeControl,
        disabled: !canSwitchTemplate
      }
    );
  };

  // packages/fields/build-module/fields/template/template-view.mjs
  var import_data11 = __toESM(require_data(), 1);
  var import_core_data9 = __toESM(require_core_data(), 1);
  var import_jsx_runtime85 = __toESM(require_jsx_runtime(), 1);
  var TemplateView = ({
    item,
    field
  }) => {
    const postType2 = item.type;
    const slug = item.slug;
    const postId2 = item.id;
    const templateSlug = field.getValue({ item });
    const defaultTemplateLabel = useDefaultTemplateLabel(
      postType2,
      postId2,
      slug
    );
    const templateLabel = (0, import_data11.useSelect)(
      (select6) => {
        if (!templateSlug) {
          return;
        }
        const allTemplates = select6(
          import_core_data9.store
        ).getEntityRecords("postType", "wp_template", {
          per_page: -1,
          post_type: postType2
        });
        const match3 = allTemplates?.find(
          (t4) => t4.slug === templateSlug
        );
        return match3 ? getItemTitle(match3) : void 0;
      },
      [postType2, templateSlug]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_jsx_runtime85.Fragment, { children: templateLabel ?? defaultTemplateLabel });
  };

  // packages/fields/build-module/fields/template/index.mjs
  var templateField = {
    id: "template",
    type: "text",
    label: (0, import_i18n16.__)("Template"),
    Edit: TemplateEdit,
    render: TemplateView,
    enableSorting: false,
    filterBy: false
  };
  var template_default = templateField;

  // packages/fields/build-module/fields/parent/index.mjs
  var import_i18n20 = __toESM(require_i18n(), 1);

  // packages/fields/build-module/fields/parent/parent-edit.mjs
  var import_remove_accents = __toESM(require_remove_accents(), 1);
  var import_components7 = __toESM(require_components(), 1);
  var import_data12 = __toESM(require_data(), 1);
  var import_element8 = __toESM(require_element(), 1);
  var import_core_data10 = __toESM(require_core_data(), 1);
  var import_compose2 = __toESM(require_compose(), 1);
  var import_html_entities3 = __toESM(require_html_entities(), 1);
  var import_i18n18 = __toESM(require_i18n(), 1);
  var import_url6 = __toESM(require_url(), 1);

  // packages/fields/build-module/fields/parent/utils.mjs
  var import_html_entities2 = __toESM(require_html_entities(), 1);
  var import_i18n17 = __toESM(require_i18n(), 1);
  function getTitleWithFallbackName(post2) {
    return typeof post2.title === "object" && "rendered" in post2.title && post2.title.rendered ? (0, import_html_entities2.decodeEntities)(post2.title.rendered) : `#${post2?.id} (${(0, import_i18n17.__)("no title")})`;
  }

  // packages/fields/build-module/fields/parent/parent-edit.mjs
  var import_jsx_runtime86 = __toESM(require_jsx_runtime(), 1);
  function buildTermsTree(flatTerms) {
    const flatTermsWithParentAndChildren = flatTerms.map((term) => {
      return {
        children: [],
        ...term
      };
    });
    if (flatTermsWithParentAndChildren.some(
      ({ parent }) => parent === null || parent === void 0
    )) {
      return flatTermsWithParentAndChildren;
    }
    const termsByParent = flatTermsWithParentAndChildren.reduce(
      (acc, term) => {
        const { parent } = term;
        if (!acc[parent]) {
          acc[parent] = [];
        }
        acc[parent].push(term);
        return acc;
      },
      {}
    );
    const fillWithChildren = (terms) => {
      return terms.map((term) => {
        const children = termsByParent[term.id];
        return {
          ...term,
          children: children && children.length ? fillWithChildren(children) : []
        };
      });
    };
    return fillWithChildren(termsByParent["0"] || []);
  }
  var getItemPriority = (name2, searchValue) => {
    const normalizedName = (0, import_remove_accents.default)(name2 || "").toLowerCase();
    const normalizedSearch = (0, import_remove_accents.default)(searchValue || "").toLowerCase();
    if (normalizedName === normalizedSearch) {
      return 0;
    }
    if (normalizedName.startsWith(normalizedSearch)) {
      return normalizedName.length;
    }
    return Infinity;
  };
  function PageAttributesParent({
    data,
    onChangeControl
  }) {
    const [fieldValue, setFieldValue] = (0, import_element8.useState)(null);
    const pageId = data.parent;
    const postId2 = data.id;
    const postTypeSlug = data.type;
    const { parentPostTitle, pageItems, isHierarchical } = (0, import_data12.useSelect)(
      (select6) => {
        const { getEntityRecord, getEntityRecords, getPostType } = select6(import_core_data10.store);
        const postTypeInfo = getPostType(postTypeSlug);
        const postIsHierarchical = postTypeInfo?.hierarchical && postTypeInfo.viewable;
        const parentPost = pageId ? getEntityRecord(
          "postType",
          postTypeSlug,
          pageId
        ) : null;
        const query = {
          per_page: 100,
          exclude: postId2,
          parent_exclude: postId2,
          orderby: "menu_order",
          order: "asc",
          _fields: "id,title,parent",
          ...fieldValue !== null && {
            // Perform a search by relevance when the field is changed.
            search: fieldValue,
            orderby: "relevance"
          }
        };
        return {
          isHierarchical: postIsHierarchical,
          parentPostTitle: parentPost ? getTitleWithFallbackName(parentPost) : "",
          pageItems: postIsHierarchical ? getEntityRecords(
            "postType",
            postTypeSlug,
            query
          ) : null
        };
      },
      [fieldValue, pageId, postId2, postTypeSlug]
    );
    const parentOptions = (0, import_element8.useMemo)(() => {
      const getOptionsFromTree = (tree2, level = 0) => {
        const mappedNodes = tree2.map((treeNode) => [
          {
            value: treeNode.id,
            label: "\u2014 ".repeat(level) + (0, import_html_entities3.decodeEntities)(treeNode.name),
            rawName: treeNode.name
          },
          ...getOptionsFromTree(treeNode.children || [], level + 1)
        ]);
        const sortedNodes = mappedNodes.sort(([a3], [b3]) => {
          const priorityA = getItemPriority(
            a3.rawName,
            fieldValue ?? ""
          );
          const priorityB = getItemPriority(
            b3.rawName,
            fieldValue ?? ""
          );
          return priorityA >= priorityB ? 1 : -1;
        });
        return sortedNodes.flat();
      };
      if (!pageItems) {
        return [];
      }
      let tree = pageItems.map((item) => ({
        id: item.id,
        parent: item.parent ?? null,
        name: getTitleWithFallbackName(item)
      }));
      if (!fieldValue) {
        tree = buildTermsTree(tree);
      }
      const opts = getOptionsFromTree(tree);
      const optsHasParent = opts.find((item) => item.value === pageId);
      if (pageId && parentPostTitle && !optsHasParent) {
        opts.unshift({
          value: pageId,
          label: parentPostTitle,
          rawName: ""
        });
      }
      return opts.map((option) => ({
        ...option,
        value: option.value.toString()
      }));
    }, [pageItems, fieldValue, parentPostTitle, pageId]);
    if (!isHierarchical) {
      return null;
    }
    const handleKeydown = (inputValue) => {
      setFieldValue(inputValue);
    };
    const handleChange = (selectedPostId) => {
      if (selectedPostId) {
        return onChangeControl(parseInt(selectedPostId, 10) ?? 0);
      }
      onChangeControl(0);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
      import_components7.ComboboxControl,
      {
        __next40pxDefaultSize: true,
        label: (0, import_i18n18.__)("Parent"),
        help: (0, import_i18n18.__)("Choose a parent page."),
        value: pageId?.toString(),
        options: parentOptions,
        onFilterValueChange: (0, import_compose2.debounce)(
          (value) => handleKeydown(value),
          300
        ),
        onChange: handleChange,
        hideLabelFromVision: true
      }
    );
  }
  var ParentEdit = ({
    data,
    field,
    onChange
  }) => {
    const { id } = field;
    const homeUrl = (0, import_data12.useSelect)((select6) => {
      return select6(import_core_data10.store).getEntityRecord("root", "__unstableBase")?.home;
    }, []);
    const onChangeControl = (0, import_element8.useCallback)(
      (newValue) => onChange({
        [id]: newValue
      }),
      [id, onChange]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("fieldset", { className: "fields-controls__parent", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { children: [
      (0, import_element8.createInterpolateElement)(
        (0, import_i18n18.sprintf)(
          /* translators: %1$s The home URL of the WordPress installation without the scheme. */
          (0, import_i18n18.__)(
            'Child pages inherit characteristics from their parent, such as URL structure. For instance, if "Pricing" is a child of "Services", its URL would be %1$s<wbr />/services<wbr />/pricing.'
          ),
          (0, import_url6.filterURLForDisplay)(homeUrl).replace(
            /([/.])/g,
            "<wbr />$1"
          )
        ),
        {
          wbr: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("wbr", {})
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("p", { children: (0, import_element8.createInterpolateElement)(
        (0, import_i18n18.__)(
          "They also show up as sub-items in the default navigation menu. <a>Learn more.</a>"
        ),
        {
          a: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
            import_components7.ExternalLink,
            {
              href: (0, import_i18n18.__)(
                "https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes"
              ),
              children: void 0
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
        PageAttributesParent,
        {
          data,
          onChangeControl
        }
      )
    ] }) });
  };

  // packages/fields/build-module/fields/parent/parent-view.mjs
  var import_data13 = __toESM(require_data(), 1);
  var import_core_data11 = __toESM(require_core_data(), 1);
  var import_i18n19 = __toESM(require_i18n(), 1);
  var import_jsx_runtime87 = __toESM(require_jsx_runtime(), 1);
  var ParentView = ({
    item
  }) => {
    const parent = (0, import_data13.useSelect)(
      (select6) => {
        const { getEntityRecord } = select6(import_core_data11.store);
        return item?.parent ? getEntityRecord("postType", item.type, item.parent) : null;
      },
      [item.parent, item.type]
    );
    if (parent) {
      return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_jsx_runtime87.Fragment, { children: getTitleWithFallbackName(parent) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_jsx_runtime87.Fragment, { children: (0, import_i18n19.__)("None") });
  };

  // packages/fields/build-module/fields/parent/index.mjs
  var parentField = {
    id: "parent",
    type: "text",
    label: (0, import_i18n20.__)("Parent"),
    Edit: ParentEdit,
    render: ParentView,
    enableSorting: true,
    filterBy: false
  };
  var parent_default = parentField;

  // packages/fields/build-module/fields/password/index.mjs
  var import_i18n22 = __toESM(require_i18n(), 1);

  // packages/fields/build-module/fields/password/edit.mjs
  var import_components8 = __toESM(require_components(), 1);
  var import_element9 = __toESM(require_element(), 1);
  var import_i18n21 = __toESM(require_i18n(), 1);
  var import_jsx_runtime88 = __toESM(require_jsx_runtime(), 1);
  function PasswordEdit({
    data,
    onChange,
    field
  }) {
    const [showPassword, setShowPassword] = (0, import_element9.useState)(
      !!field.getValue({ item: data })
    );
    const handleTogglePassword = (value) => {
      setShowPassword(value);
      if (!value) {
        onChange({ password: "" });
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
      import_components8.__experimentalVStack,
      {
        as: "fieldset",
        spacing: 4,
        className: "fields-controls__password",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
            import_components8.CheckboxControl,
            {
              label: (0, import_i18n21.__)("Password protected"),
              help: (0, import_i18n21.__)("Only visible to those who know the password"),
              checked: showPassword,
              onChange: handleTogglePassword
            }
          ),
          showPassword && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "fields-controls__password-input", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
            import_components8.TextControl,
            {
              label: (0, import_i18n21.__)("Password"),
              onChange: (value) => onChange({
                password: value
              }),
              value: field.getValue({ item: data }) || "",
              placeholder: (0, import_i18n21.__)("Use a secure password"),
              type: "text",
              __next40pxDefaultSize: true,
              maxLength: 255
            }
          ) })
        ]
      }
    );
  }
  var edit_default = PasswordEdit;

  // packages/fields/build-module/fields/password/index.mjs
  var passwordField = {
    id: "password",
    type: "text",
    label: (0, import_i18n22.__)("Password"),
    Edit: edit_default,
    enableSorting: false,
    enableHiding: false,
    isVisible: (item) => item.status !== "private",
    filterBy: false
  };
  var password_default = passwordField;

  // packages/fields/build-module/fields/status/index.mjs
  var import_i18n24 = __toESM(require_i18n(), 1);

  // packages/fields/build-module/fields/status/status-view.mjs
  var import_components9 = __toESM(require_components(), 1);

  // packages/fields/build-module/fields/status/status-elements.mjs
  var import_i18n23 = __toESM(require_i18n(), 1);
  var STATUSES = [
    {
      value: "draft",
      label: (0, import_i18n23.__)("Draft"),
      icon: drafts_default,
      description: (0, import_i18n23.__)("Not ready to publish.")
    },
    {
      value: "future",
      label: (0, import_i18n23.__)("Scheduled"),
      icon: scheduled_default,
      description: (0, import_i18n23.__)("Publish automatically on a chosen date.")
    },
    {
      value: "pending",
      label: (0, import_i18n23.__)("Pending Review"),
      icon: pending_default,
      description: (0, import_i18n23.__)("Waiting for review before publishing.")
    },
    {
      value: "private",
      label: (0, import_i18n23.__)("Private"),
      icon: not_allowed_default,
      description: (0, import_i18n23.__)("Only visible to site admins and editors.")
    },
    {
      value: "publish",
      label: (0, import_i18n23.__)("Published"),
      icon: published_default,
      description: (0, import_i18n23.__)("Visible to everyone.")
    },
    { value: "trash", label: (0, import_i18n23.__)("Trash"), icon: trash_default }
  ];
  var status_elements_default = STATUSES;

  // packages/fields/build-module/fields/status/status-view.mjs
  var import_jsx_runtime89 = __toESM(require_jsx_runtime(), 1);
  function StatusView({ item }) {
    const status = status_elements_default.find(({ value }) => value === item.status);
    const label = status?.label || item.status;
    const icon = status?.icon;
    return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_components9.__experimentalHStack, { alignment: "left", spacing: 0, children: [
      icon && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "edit-site-post-list__status-icon", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_components9.Icon, { icon }) }),
      /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { children: label })
    ] });
  }
  var status_view_default = StatusView;

  // packages/fields/build-module/fields/status/index.mjs
  var OPERATOR_IS_ANY = "isAny";
  var statusField = {
    label: (0, import_i18n24.__)("Status"),
    id: "status",
    type: "text",
    elements: status_elements_default,
    render: status_view_default,
    Edit: "radio",
    enableSorting: false,
    filterBy: {
      operators: [OPERATOR_IS_ANY]
    }
  };
  var status_default = statusField;

  // packages/fields/build-module/fields/comment-status/index.mjs
  var import_i18n25 = __toESM(require_i18n(), 1);
  var commentStatusField = {
    id: "comment_status",
    label: (0, import_i18n25.__)("Comments"),
    type: "text",
    Edit: "radio",
    enableSorting: false,
    enableHiding: false,
    filterBy: false,
    elements: [
      {
        value: "open",
        label: (0, import_i18n25.__)("Open"),
        description: (0, import_i18n25.__)("Visitors can add new comments and replies.")
      },
      {
        value: "closed",
        label: (0, import_i18n25.__)("Closed"),
        description: (0, import_i18n25.__)(
          "Visitors cannot add new comments or replies. Existing comments remain visible."
        )
      }
    ]
  };
  var comment_status_default = commentStatusField;

  // packages/fields/build-module/fields/ping-status/index.mjs
  var import_i18n26 = __toESM(require_i18n(), 1);
  var import_components10 = __toESM(require_components(), 1);
  var import_jsx_runtime90 = __toESM(require_jsx_runtime(), 1);
  function PingStatusEdit({
    data,
    onChange
  }) {
    const pingStatus = data?.ping_status ?? "open";
    const onTogglePingback = (checked) => {
      onChange({
        ...data,
        ping_status: checked ? "open" : "closed"
      });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
      import_components10.CheckboxControl,
      {
        label: (0, import_i18n26.__)("Enable pingbacks & trackbacks"),
        checked: pingStatus === "open",
        onChange: onTogglePingback,
        help: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
          import_components10.ExternalLink,
          {
            href: (0, import_i18n26.__)(
              "https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"
            ),
            children: (0, import_i18n26.__)("Learn more about pingbacks & trackbacks")
          }
        )
      }
    );
  }
  var pingStatusField = {
    id: "ping_status",
    label: (0, import_i18n26.__)("Trackbacks & Pingbacks"),
    type: "text",
    Edit: PingStatusEdit,
    enableSorting: false,
    enableHiding: false,
    filterBy: false,
    elements: [
      {
        value: "open",
        label: (0, import_i18n26.__)("Allow"),
        description: (0, import_i18n26.__)(
          "Allow link notifications from other blogs (pingbacks and trackbacks) on new articles."
        )
      },
      {
        value: "closed",
        label: (0, import_i18n26.__)("Don't allow"),
        description: (0, import_i18n26.__)(
          "Don't allow link notifications from other blogs (pingbacks and trackbacks) on new articles."
        )
      }
    ]
  };
  var ping_status_default = pingStatusField;

  // packages/fields/build-module/fields/discussion/index.mjs
  var import_i18n27 = __toESM(require_i18n(), 1);
  var discussionField = {
    id: "discussion",
    label: (0, import_i18n27.__)("Discussion"),
    type: "text",
    render: ({ item }) => {
      const commentsOpen = item.comment_status === "open";
      const pingsOpen = item.ping_status === "open";
      if (commentsOpen && pingsOpen) {
        return (0, import_i18n27.__)("Open");
      }
      if (commentsOpen && !pingsOpen) {
        return (0, import_i18n27.__)("Comments only");
      }
      if (!commentsOpen && pingsOpen) {
        return (0, import_i18n27.__)("Pings only");
      }
      return (0, import_i18n27.__)("Closed");
    },
    filterBy: false
  };
  var discussion_default = discussionField;

  // packages/fields/build-module/fields/date/index.mjs
  var import_i18n29 = __toESM(require_i18n(), 1);

  // packages/fields/build-module/fields/date/date-view.mjs
  var import_i18n28 = __toESM(require_i18n(), 1);
  var import_element10 = __toESM(require_element(), 1);
  var import_date2 = __toESM(require_date(), 1);
  var import_jsx_runtime91 = __toESM(require_jsx_runtime(), 1);
  var getFormattedDate = (dateToDisplay) => (0, import_date2.dateI18n)(
    (0, import_date2.getSettings)().formats.datetimeAbbreviated,
    (0, import_date2.getDate)(dateToDisplay)
  );
  var DateView = ({ item }) => {
    const isDraftOrPrivate = ["draft", "private"].includes(
      item.status ?? ""
    );
    if (isDraftOrPrivate) {
      return (0, import_element10.createInterpolateElement)(
        (0, import_i18n28.sprintf)(
          /* translators: %s: page creation or modification date. */
          (0, import_i18n28.__)("<span>Modified: <time>%s</time></span>"),
          getFormattedDate(item.date ?? null)
        ),
        {
          span: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", {}),
          time: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("time", {})
        }
      );
    }
    const isScheduled = item.status === "future";
    if (isScheduled) {
      return (0, import_element10.createInterpolateElement)(
        (0, import_i18n28.sprintf)(
          /* translators: %s: page creation date */
          (0, import_i18n28.__)("<span>Scheduled: <time>%s</time></span>"),
          getFormattedDate(item.date ?? null)
        ),
        {
          span: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", {}),
          time: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("time", {})
        }
      );
    }
    const isPublished = item.status === "publish";
    if (isPublished) {
      return (0, import_element10.createInterpolateElement)(
        (0, import_i18n28.sprintf)(
          /* translators: %s: page creation time */
          (0, import_i18n28.__)("<span>Published: <time>%s</time></span>"),
          getFormattedDate(item.date ?? null)
        ),
        {
          span: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", {}),
          time: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("time", {})
        }
      );
    }
    const dateToDisplay = (0, import_date2.getDate)(item.modified ?? null) > (0, import_date2.getDate)(item.date ?? null) ? item.modified : item.date;
    const isPending = item.status === "pending";
    if (isPending) {
      return (0, import_element10.createInterpolateElement)(
        (0, import_i18n28.sprintf)(
          /* translators: %s: page creation or modification date. */
          (0, import_i18n28.__)("<span>Modified: <time>%s</time></span>"),
          getFormattedDate(dateToDisplay ?? null)
        ),
        {
          span: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", {}),
          time: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("time", {})
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("time", { children: getFormattedDate(item.date ?? null) });
  };
  var date_view_default = DateView;

  // packages/fields/build-module/fields/date/index.mjs
  var dateField = {
    id: "date",
    type: "datetime",
    label: (0, import_i18n29.__)("Date"),
    render: date_view_default,
    filterBy: {
      operators: ["before", "after"]
    }
  };
  var date_default = dateField;

  // packages/fields/build-module/fields/author/index.mjs
  var import_i18n31 = __toESM(require_i18n(), 1);
  var import_data15 = __toESM(require_data(), 1);
  var import_core_data13 = __toESM(require_core_data(), 1);

  // packages/fields/build-module/fields/author/author-view.mjs
  var import_i18n30 = __toESM(require_i18n(), 1);
  var import_element11 = __toESM(require_element(), 1);
  var import_components11 = __toESM(require_components(), 1);
  var import_data14 = __toESM(require_data(), 1);
  var import_core_data12 = __toESM(require_core_data(), 1);
  var import_jsx_runtime92 = __toESM(require_jsx_runtime(), 1);
  function AuthorView({ item }) {
    const authorId = item?.author;
    const embeddedAuthorId = item?._embedded?.author?.[0]?.id;
    const shouldFetch = Boolean(
      authorId && embeddedAuthorId && authorId !== embeddedAuthorId
    );
    const author = (0, import_data14.useSelect)(
      (select6) => {
        if (!shouldFetch) {
          return null;
        }
        const { getEntityRecord } = select6(import_core_data12.store);
        return authorId ? getEntityRecord("root", "user", authorId) : null;
      },
      [authorId, shouldFetch]
    );
    const text = author?.name || item?._embedded?.author?.[0]?.name;
    const imageUrl = author?.avatar_urls?.[48] || item?._embedded?.author?.[0]?.avatar_urls?.[48];
    const [isImageLoaded, setIsImageLoaded] = (0, import_element11.useState)(false);
    return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_components11.__experimentalHStack, { alignment: "left", spacing: 0, children: [
      !!imageUrl && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
        "div",
        {
          className: clsx_default("page-templates-author-field__avatar", {
            "is-loaded": isImageLoaded
          }),
          children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
            "img",
            {
              onLoad: () => setIsImageLoaded(true),
              alt: (0, import_i18n30.__)("Author avatar"),
              src: imageUrl
            }
          )
        }
      ),
      !imageUrl && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "page-templates-author-field__icon", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_components11.Icon, { icon: comment_author_avatar_default }) }),
      /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "page-templates-author-field__name", children: text })
    ] });
  }
  var author_view_default = AuthorView;

  // packages/fields/build-module/fields/author/index.mjs
  var authorField = {
    label: (0, import_i18n31.__)("Author"),
    id: "author",
    type: "integer",
    getElements: async () => {
      const authors = await (0, import_data15.resolveSelect)(import_core_data13.store).getEntityRecords(
        "root",
        "user",
        {
          per_page: -1,
          who: "authors",
          _fields: "id,name",
          context: "view"
        }
      ) ?? [];
      return authors.map(({ id, name: name2 }) => ({
        value: id,
        label: name2
      }));
    },
    setValue: ({ value }) => ({ author: Number(value) }),
    render: author_view_default,
    sort: (a3, b3, direction) => {
      const nameA = a3._embedded?.author?.[0]?.name || "";
      const nameB = b3._embedded?.author?.[0]?.name || "";
      return direction === "asc" ? nameA.localeCompare(nameB) : nameB.localeCompare(nameA);
    },
    filterBy: {
      operators: ["isAny", "isNone"]
    }
  };
  var author_default = authorField;

  // packages/fields/build-module/fields/notes/index.mjs
  var import_i18n32 = __toESM(require_i18n(), 1);
  var notesField = {
    id: "notesCount",
    label: (0, import_i18n32.__)("Notes"),
    type: "integer",
    enableSorting: false,
    filterBy: false
  };
  var notes_default = notesField;

  // packages/fields/build-module/actions/view-post.mjs
  var import_i18n33 = __toESM(require_i18n(), 1);
  var viewPost = {
    id: "view-post",
    label: (0, import_i18n33._x)("View", "verb"),
    isPrimary: true,
    icon: external_default,
    isEligible(post2) {
      return post2.status !== "trash";
    },
    callback(posts, { onActionPerformed }) {
      const post2 = posts[0];
      window.open(post2?.link, "_blank");
      if (onActionPerformed) {
        onActionPerformed(posts);
      }
    }
  };
  var view_post_default = viewPost;

  // packages/fields/build-module/actions/reorder-page.mjs
  var import_data16 = __toESM(require_data(), 1);
  var import_core_data14 = __toESM(require_core_data(), 1);
  var import_i18n34 = __toESM(require_i18n(), 1);
  var import_notices4 = __toESM(require_notices(), 1);
  var import_element12 = __toESM(require_element(), 1);
  var import_components12 = __toESM(require_components(), 1);
  var import_jsx_runtime93 = __toESM(require_jsx_runtime(), 1);
  function isItemValid(item) {
    return typeof item.menu_order === "number" && Number.isInteger(item.menu_order);
  }
  function ReorderModal({
    items,
    closeModal: closeModal2,
    onActionPerformed
  }) {
    const [item, setItem] = (0, import_element12.useState)(items[0]);
    const { editEntityRecord, saveEditedEntityRecord } = (0, import_data16.useDispatch)(import_core_data14.store);
    const { createSuccessNotice, createErrorNotice } = (0, import_data16.useDispatch)(import_notices4.store);
    const isValid2 = isItemValid(item);
    async function onOrder(event) {
      event.preventDefault();
      if (!isValid2) {
        return;
      }
      try {
        await editEntityRecord("postType", item.type, item.id, {
          menu_order: item.menu_order
        });
        closeModal2?.();
        await saveEditedEntityRecord("postType", item.type, item.id, {
          throwOnError: true
        });
        createSuccessNotice((0, import_i18n34.__)("Order updated."), {
          type: "snackbar"
        });
        onActionPerformed?.(items);
      } catch (error) {
        const typedError = error;
        const errorMessage = typedError.message && typedError.code !== "unknown_error" ? typedError.message : (0, import_i18n34.__)("An error occurred while updating the order");
        createErrorNotice(errorMessage, {
          type: "snackbar"
        });
      }
    }
    return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("form", { onSubmit: onOrder, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_components12.__experimentalVStack, { spacing: "5", children: [
      /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { children: (0, import_i18n34.__)(
        "Determines the order of pages. Pages with the same order value are sorted alphabetically. Negative order values are supported."
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
        import_components12.__experimentalInputControl,
        {
          __next40pxDefaultSize: true,
          label: (0, import_i18n34.__)("Order"),
          type: "number",
          value: typeof item.menu_order === "number" && Number.isInteger(item.menu_order) ? String(item.menu_order) : "",
          onChange: (value) => {
            const parsed = parseInt(value, 10);
            setItem({
              ...item,
              menu_order: isNaN(parsed) ? void 0 : parsed
            });
          }
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_components12.__experimentalHStack, { justify: "right", children: [
        /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
          import_components12.Button,
          {
            __next40pxDefaultSize: true,
            variant: "tertiary",
            onClick: () => {
              closeModal2?.();
            },
            children: (0, import_i18n34.__)("Cancel")
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
          import_components12.Button,
          {
            __next40pxDefaultSize: true,
            variant: "primary",
            type: "submit",
            accessibleWhenDisabled: true,
            disabled: !isValid2,
            children: (0, import_i18n34.__)("Save")
          }
        )
      ] })
    ] }) });
  }
  var reorderPage = {
    id: "order-pages",
    label: (0, import_i18n34.__)("Order"),
    isEligible({ status }) {
      return status !== "trash";
    },
    modalFocusOnMount: "firstContentElement",
    RenderModal: ReorderModal
  };
  var reorder_page_default = reorderPage;

  // packages/fields/build-module/actions/duplicate-post.mjs
  var import_data17 = __toESM(require_data(), 1);
  var import_core_data15 = __toESM(require_core_data(), 1);
  var import_i18n35 = __toESM(require_i18n(), 1);
  var import_notices5 = __toESM(require_notices(), 1);
  var import_element13 = __toESM(require_element(), 1);
  var import_components13 = __toESM(require_components(), 1);
  var import_jsx_runtime94 = __toESM(require_jsx_runtime(), 1);
  var duplicatePost = {
    id: "duplicate-post",
    label: (0, import_i18n35._x)("Duplicate", "action label"),
    isEligible({ status }) {
      return status !== "trash";
    },
    modalFocusOnMount: "firstContentElement",
    RenderModal: ({ items, closeModal: closeModal2, onActionPerformed }) => {
      const [item, setItem] = (0, import_element13.useState)({
        ...items[0],
        title: (0, import_i18n35.sprintf)(
          /* translators: %s: Existing post title */
          (0, import_i18n35._x)("%s (Copy)", "post"),
          getItemTitle(items[0])
        )
      });
      const [isCreatingPage, setIsCreatingPage] = (0, import_element13.useState)(false);
      const { saveEntityRecord } = (0, import_data17.useDispatch)(import_core_data15.store);
      const { createSuccessNotice, createErrorNotice } = (0, import_data17.useDispatch)(import_notices5.store);
      async function createPage(event) {
        event.preventDefault();
        if (isCreatingPage) {
          return;
        }
        const isTemplate2 = item.type === "wp_template";
        const newItemObject = {
          status: isTemplate2 ? "publish" : "draft",
          title: item.title,
          slug: isTemplate2 ? item.slug : item.title || (0, import_i18n35.__)("No title"),
          comment_status: item.comment_status,
          content: typeof item.content === "string" ? item.content : item.content.raw,
          excerpt: typeof item.excerpt === "string" ? item.excerpt : item.excerpt?.raw,
          meta: item.meta,
          parent: item.parent,
          password: item.password,
          template: item.template,
          format: item.format,
          featured_media: item.featured_media,
          menu_order: item.menu_order,
          ping_status: item.ping_status
        };
        const assignablePropertiesPrefix = "wp:action-assign-";
        const assignableProperties = Object.keys(item?._links || {}).filter(
          (property) => property.startsWith(assignablePropertiesPrefix)
        ).map(
          (property) => property.slice(assignablePropertiesPrefix.length)
        );
        assignableProperties.forEach((property) => {
          if (item.hasOwnProperty(property)) {
            newItemObject[property] = item[property];
          }
        });
        setIsCreatingPage(true);
        try {
          const newItem = await saveEntityRecord(
            "postType",
            item.type,
            newItemObject,
            { throwOnError: true }
          );
          createSuccessNotice(
            (0, import_i18n35.sprintf)(
              // translators: %s: Title of the created post, e.g: "Hello world".
              (0, import_i18n35.__)('"%s" successfully created.'),
              getItemTitle(newItem)
            ),
            {
              id: "duplicate-post-action",
              type: "snackbar"
            }
          );
          if (onActionPerformed) {
            onActionPerformed([newItem]);
          }
        } catch (error) {
          const typedError = error;
          const errorMessage = typedError.message && typedError.code !== "unknown_error" ? typedError.message : (0, import_i18n35.__)("An error occurred while duplicating the page.");
          createErrorNotice(errorMessage, {
            type: "snackbar"
          });
        } finally {
          setIsCreatingPage(false);
          closeModal2?.();
        }
      }
      return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("form", { onSubmit: createPage, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_components13.__experimentalVStack, { spacing: 3, children: [
        typeof item.id === "string" && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { children: (0, import_i18n35.__)(
          "You are about to duplicate a bundled template. Changes will not be live until you activate the new template."
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
          import_components13.__experimentalInputControl,
          {
            __next40pxDefaultSize: true,
            label: (0, import_i18n35.__)("Title"),
            placeholder: (0, import_i18n35.__)("No title"),
            value: getItemTitle(item),
            onChange: (value) => setItem((prev) => ({
              ...prev,
              title: value || (0, import_i18n35.__)("No title")
            }))
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_components13.__experimentalHStack, { spacing: 2, justify: "end", children: [
          /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
            import_components13.Button,
            {
              variant: "tertiary",
              onClick: closeModal2,
              __next40pxDefaultSize: true,
              children: (0, import_i18n35.__)("Cancel")
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
            import_components13.Button,
            {
              variant: "primary",
              type: "submit",
              isBusy: isCreatingPage,
              "aria-disabled": isCreatingPage,
              __next40pxDefaultSize: true,
              children: (0, import_i18n35._x)("Duplicate", "action label")
            }
          )
        ] })
      ] }) });
    }
  };
  var duplicate_post_default = duplicatePost;

  // packages/fields/build-module/actions/rename-post.mjs
  var import_data18 = __toESM(require_data(), 1);
  var import_core_data16 = __toESM(require_core_data(), 1);
  var import_i18n36 = __toESM(require_i18n(), 1);
  var import_element14 = __toESM(require_element(), 1);
  var import_patterns2 = __toESM(require_patterns(), 1);
  var import_components14 = __toESM(require_components(), 1);
  var import_notices6 = __toESM(require_notices(), 1);
  var import_jsx_runtime95 = __toESM(require_jsx_runtime(), 1);
  var { PATTERN_TYPES: PATTERN_TYPES2 } = unlock2(import_patterns2.privateApis);
  var renamePost = {
    id: "rename-post",
    label: (0, import_i18n36.__)("Rename"),
    modalFocusOnMount: "firstContentElement",
    isEligible(post2) {
      if (post2.status === "trash") {
        return false;
      }
      if (post2.type === "wp_template" && typeof post2.id === "string" && window?.__experimentalTemplateActivate) {
        return false;
      }
      const specialChecks = ["wp_template", "wp_template_part"];
      if (!window?.__experimentalTemplateActivate) {
        specialChecks.push("wp_template");
      }
      if (!specialChecks.includes(post2.type)) {
        return post2.permissions?.update;
      }
      if (isTemplate(post2) && !window?.__experimentalTemplateActivate) {
        return isTemplateRemovable(post2) && post2.is_custom && post2.permissions?.update;
      }
      if (isTemplatePart(post2)) {
        return post2.source === "custom" && !post2?.has_theme_file && post2.permissions?.update;
      }
      return post2.type === PATTERN_TYPES2.user && post2.permissions?.update;
    },
    RenderModal: ({ items, closeModal: closeModal2, onActionPerformed }) => {
      const [item] = items;
      const [title, setTitle] = (0, import_element14.useState)(() => getItemTitle(item, ""));
      const { editEntityRecord, saveEditedEntityRecord } = (0, import_data18.useDispatch)(import_core_data16.store);
      const { createSuccessNotice, createErrorNotice } = (0, import_data18.useDispatch)(import_notices6.store);
      async function onRename(event) {
        event.preventDefault();
        try {
          await editEntityRecord("postType", item.type, item.id, {
            title
          });
          setTitle("");
          closeModal2?.();
          await saveEditedEntityRecord("postType", item.type, item.id, {
            throwOnError: true
          });
          createSuccessNotice((0, import_i18n36.__)("Name updated"), {
            type: "snackbar"
          });
          onActionPerformed?.(items);
        } catch (error) {
          const typedError = error;
          const errorMessage = typedError.message && typedError.code !== "unknown_error" ? typedError.message : (0, import_i18n36.__)("An error occurred while updating the name");
          createErrorNotice(errorMessage, { type: "snackbar" });
        }
      }
      return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("form", { onSubmit: onRename, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_components14.__experimentalVStack, { spacing: "5", children: [
        /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
          import_components14.TextControl,
          {
            __next40pxDefaultSize: true,
            label: (0, import_i18n36.__)("Name"),
            value: title,
            onChange: setTitle,
            required: true
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_components14.__experimentalHStack, { justify: "right", children: [
          /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
            import_components14.Button,
            {
              __next40pxDefaultSize: true,
              variant: "tertiary",
              onClick: () => {
                closeModal2?.();
              },
              children: (0, import_i18n36.__)("Cancel")
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
            import_components14.Button,
            {
              __next40pxDefaultSize: true,
              variant: "primary",
              type: "submit",
              children: (0, import_i18n36.__)("Save")
            }
          )
        ] })
      ] }) });
    }
  };
  var rename_post_default = renamePost;

  // packages/fields/build-module/actions/reset-post.mjs
  var import_data19 = __toESM(require_data(), 1);
  var import_core_data17 = __toESM(require_core_data(), 1);
  var import_i18n37 = __toESM(require_i18n(), 1);
  var import_notices7 = __toESM(require_notices(), 1);
  var import_element15 = __toESM(require_element(), 1);
  var import_blocks3 = __toESM(require_blocks(), 1);
  var import_components15 = __toESM(require_components(), 1);
  var import_url7 = __toESM(require_url(), 1);
  var import_api_fetch2 = __toESM(require_api_fetch(), 1);
  var import_jsx_runtime96 = __toESM(require_jsx_runtime(), 1);
  var isTemplateRevertable2 = (templateOrTemplatePart) => {
    if (!templateOrTemplatePart) {
      return false;
    }
    return templateOrTemplatePart.source === "custom" && (Boolean(templateOrTemplatePart?.plugin) || templateOrTemplatePart?.has_theme_file);
  };
  var revertTemplate = async (template2, { allowUndo = true } = {}) => {
    const noticeId = "edit-site-template-reverted";
    (0, import_data19.dispatch)(import_notices7.store).removeNotice(noticeId);
    if (!isTemplateRevertable2(template2)) {
      (0, import_data19.dispatch)(import_notices7.store).createErrorNotice(
        (0, import_i18n37.__)("This template is not revertable."),
        {
          type: "snackbar"
        }
      );
      return;
    }
    try {
      const templateEntityConfig = (0, import_data19.select)(import_core_data17.store).getEntityConfig(
        "postType",
        template2.type
      );
      if (!templateEntityConfig) {
        (0, import_data19.dispatch)(import_notices7.store).createErrorNotice(
          (0, import_i18n37.__)(
            "The editor has encountered an unexpected error. Please reload."
          ),
          { type: "snackbar" }
        );
        return;
      }
      const fileTemplatePath = (0, import_url7.addQueryArgs)(
        `${templateEntityConfig.baseURL}/${template2.id}`,
        { context: "edit", source: template2.origin }
      );
      const fileTemplate = await (0, import_api_fetch2.default)({
        path: fileTemplatePath
      });
      if (!fileTemplate) {
        (0, import_data19.dispatch)(import_notices7.store).createErrorNotice(
          (0, import_i18n37.__)(
            "The editor has encountered an unexpected error. Please reload."
          ),
          { type: "snackbar" }
        );
        return;
      }
      const serializeBlocks = ({ blocks: blocksForSerialization = [] }) => (0, import_blocks3.__unstableSerializeAndClean)(blocksForSerialization);
      const edited = (0, import_data19.select)(import_core_data17.store).getEditedEntityRecord(
        "postType",
        template2.type,
        template2.id
      );
      (0, import_data19.dispatch)(import_core_data17.store).editEntityRecord(
        "postType",
        template2.type,
        template2.id,
        {
          content: serializeBlocks,
          // Required to make the `undo` behave correctly.
          blocks: edited.blocks,
          // Required to revert the blocks in the editor.
          source: "custom"
          // required to avoid turning the editor into a dirty state
        },
        {
          undoIgnore: true
          // Required to merge this edit with the last undo level.
        }
      );
      const blocks = (0, import_blocks3.parse)(fileTemplate?.content?.raw);
      (0, import_data19.dispatch)(import_core_data17.store).editEntityRecord(
        "postType",
        template2.type,
        fileTemplate.id,
        {
          content: serializeBlocks,
          blocks,
          source: "theme"
        }
      );
      if (allowUndo) {
        const undoRevert = () => {
          (0, import_data19.dispatch)(import_core_data17.store).editEntityRecord(
            "postType",
            template2.type,
            edited.id,
            {
              content: serializeBlocks,
              blocks: edited.blocks,
              source: "custom"
            }
          );
        };
        (0, import_data19.dispatch)(import_notices7.store).createSuccessNotice(
          (0, import_i18n37.__)("Template reset."),
          {
            type: "snackbar",
            id: noticeId,
            actions: [
              {
                label: (0, import_i18n37.__)("Undo"),
                onClick: undoRevert
              }
            ]
          }
        );
      }
    } catch (error) {
      const errorMessage = error.message && error.code !== "unknown_error" ? error.message : (0, import_i18n37.__)("Template revert failed. Please reload.");
      (0, import_data19.dispatch)(import_notices7.store).createErrorNotice(errorMessage, {
        type: "snackbar"
      });
    }
  };
  var resetPostAction = {
    id: "reset-post",
    label: (0, import_i18n37.__)("Reset"),
    isEligible: (item) => {
      if (window?.__experimentalTemplateActivate) {
        return item.type === "wp_template_part" && item?.source === "custom" && item?.has_theme_file;
      }
      return isTemplateOrTemplatePart(item) && item?.source === "custom" && (Boolean(item.type === "wp_template" && item?.plugin) || item?.has_theme_file);
    },
    icon: backup_default,
    supportsBulk: true,
    hideModalHeader: true,
    modalFocusOnMount: "firstContentElement",
    RenderModal: ({ items, closeModal: closeModal2, onActionPerformed }) => {
      const [isBusy, setIsBusy] = (0, import_element15.useState)(false);
      const { saveEditedEntityRecord } = (0, import_data19.useDispatch)(import_core_data17.store);
      const { createSuccessNotice, createErrorNotice } = (0, import_data19.useDispatch)(import_notices7.store);
      const onConfirm = async () => {
        try {
          for (const template2 of items) {
            await revertTemplate(template2, {
              allowUndo: false
            });
            await saveEditedEntityRecord(
              "postType",
              template2.type,
              template2.id
            );
          }
          createSuccessNotice(
            items.length > 1 ? (0, import_i18n37.sprintf)(
              /* translators: %d: The number of items. */
              (0, import_i18n37.__)("%d items reset."),
              items.length
            ) : (0, import_i18n37.sprintf)(
              /* translators: %s: The template/part's name. */
              (0, import_i18n37.__)('"%s" reset.'),
              getItemTitle(items[0])
            ),
            {
              type: "snackbar",
              id: "revert-template-action"
            }
          );
        } catch (error) {
          let fallbackErrorMessage;
          if (items[0].type === "wp_template") {
            fallbackErrorMessage = items.length === 1 ? (0, import_i18n37.__)(
              "An error occurred while reverting the template."
            ) : (0, import_i18n37.__)(
              "An error occurred while reverting the templates."
            );
          } else {
            fallbackErrorMessage = items.length === 1 ? (0, import_i18n37.__)(
              "An error occurred while reverting the template part."
            ) : (0, import_i18n37.__)(
              "An error occurred while reverting the template parts."
            );
          }
          const typedError = error;
          const errorMessage = typedError.message && typedError.code !== "unknown_error" ? typedError.message : fallbackErrorMessage;
          createErrorNotice(errorMessage, { type: "snackbar" });
        }
      };
      return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_components15.__experimentalVStack, { spacing: "5", children: [
        /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_components15.__experimentalText, { children: (0, import_i18n37.__)("Reset to default and clear all customizations?") }),
        /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_components15.__experimentalHStack, { justify: "right", children: [
          /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
            import_components15.Button,
            {
              __next40pxDefaultSize: true,
              variant: "tertiary",
              onClick: closeModal2,
              disabled: isBusy,
              accessibleWhenDisabled: true,
              children: (0, import_i18n37.__)("Cancel")
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
            import_components15.Button,
            {
              __next40pxDefaultSize: true,
              variant: "primary",
              onClick: async () => {
                setIsBusy(true);
                await onConfirm();
                onActionPerformed?.(items);
                setIsBusy(false);
                closeModal2?.();
              },
              isBusy,
              disabled: isBusy,
              accessibleWhenDisabled: true,
              children: (0, import_i18n37.__)("Reset")
            }
          )
        ] })
      ] });
    }
  };
  var reset_post_default = resetPostAction;

  // packages/fields/build-module/actions/duplicate-pattern.mjs
  var import_i18n38 = __toESM(require_i18n(), 1);
  var import_patterns3 = __toESM(require_patterns(), 1);
  var import_jsx_runtime97 = __toESM(require_jsx_runtime(), 1);
  var { CreatePatternModalContents, useDuplicatePatternProps } = unlock2(import_patterns3.privateApis);
  var duplicatePattern = {
    id: "duplicate-pattern",
    label: (0, import_i18n38._x)("Duplicate", "action label"),
    isEligible: (item) => item.type !== "wp_template_part",
    modalHeader: (0, import_i18n38._x)("Duplicate pattern", "action label"),
    modalFocusOnMount: "firstContentElement",
    RenderModal: ({ items, closeModal: closeModal2 }) => {
      const [item] = items;
      const duplicatedProps = useDuplicatePatternProps({
        pattern: item,
        onSuccess: () => closeModal2?.()
      });
      return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
        CreatePatternModalContents,
        {
          onClose: closeModal2,
          confirmLabel: (0, import_i18n38._x)("Duplicate", "action label"),
          ...duplicatedProps
        }
      );
    }
  };
  var duplicate_pattern_default = duplicatePattern;

  // node_modules/tslib/tslib.es6.mjs
  var __assign = function() {
    __assign = Object.assign || function __assign2(t4) {
      for (var s3, i3 = 1, n3 = arguments.length; i3 < n3; i3++) {
        s3 = arguments[i3];
        for (var p4 in s3) if (Object.prototype.hasOwnProperty.call(s3, p4)) t4[p4] = s3[p4];
      }
      return t4;
    };
    return __assign.apply(this, arguments);
  };

  // node_modules/lower-case/dist.es2015/index.js
  function lowerCase(str) {
    return str.toLowerCase();
  }

  // node_modules/no-case/dist.es2015/index.js
  var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
  var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
  function noCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    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;
    var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
    var start2 = 0;
    var end = result.length;
    while (result.charAt(start2) === "\0")
      start2++;
    while (result.charAt(end - 1) === "\0")
      end--;
    return result.slice(start2, end).split("\0").map(transform).join(delimiter);
  }
  function replace(input, re, value) {
    if (re instanceof RegExp)
      return input.replace(re, value);
    return re.reduce(function(input2, re2) {
      return input2.replace(re2, value);
    }, input);
  }

  // node_modules/dot-case/dist.es2015/index.js
  function dotCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    return noCase(input, __assign({ delimiter: "." }, options));
  }

  // node_modules/param-case/dist.es2015/index.js
  function paramCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    return dotCase(input, __assign({ delimiter: "-" }, options));
  }

  // node_modules/client-zip/index.js
  "stream" in Blob.prototype || Object.defineProperty(Blob.prototype, "stream", { value() {
    return new Response(this).body;
  } }), "setBigUint64" in DataView.prototype || Object.defineProperty(DataView.prototype, "setBigUint64", { value(e3, n3, t4) {
    const i3 = Number(0xffffffffn & n3), r4 = Number(n3 >> 32n);
    this.setUint32(e3 + (t4 ? 0 : 4), i3, t4), this.setUint32(e3 + (t4 ? 4 : 0), r4, t4);
  } });
  var e = (e3) => new DataView(new ArrayBuffer(e3));
  var n = (e3) => new Uint8Array(e3.buffer || e3);
  var t = (e3) => new TextEncoder().encode(String(e3));
  var i = (e3) => Math.min(4294967295, Number(e3));
  var r2 = (e3) => Math.min(65535, Number(e3));
  function f(e3, i3) {
    if (void 0 === i3 || i3 instanceof Date || (i3 = new Date(i3)), e3 instanceof File) return { isFile: 1, t: i3 || new Date(e3.lastModified), i: e3.stream() };
    if (e3 instanceof Response) return { isFile: 1, t: i3 || new Date(e3.headers.get("Last-Modified") || Date.now()), i: e3.body };
    if (void 0 === i3) i3 = /* @__PURE__ */ new Date();
    else if (isNaN(i3)) throw new Error("Invalid modification date.");
    if (void 0 === e3) return { isFile: 0, t: i3 };
    if ("string" == typeof e3) return { isFile: 1, t: i3, i: t(e3) };
    if (e3 instanceof Blob) return { isFile: 1, t: i3, i: e3.stream() };
    if (e3 instanceof Uint8Array || e3 instanceof ReadableStream) return { isFile: 1, t: i3, i: e3 };
    if (e3 instanceof ArrayBuffer || ArrayBuffer.isView(e3)) return { isFile: 1, t: i3, i: n(e3) };
    if (Symbol.asyncIterator in e3) return { isFile: 1, t: i3, i: o(e3[Symbol.asyncIterator]()) };
    throw new TypeError("Unsupported input format.");
  }
  function o(e3, n3 = e3) {
    return new ReadableStream({ async pull(n4) {
      let t4 = 0;
      for (; n4.desiredSize > t4; ) {
        const i3 = await e3.next();
        if (!i3.value) {
          n4.close();
          break;
        }
        {
          const e4 = a(i3.value);
          n4.enqueue(e4), t4 += e4.byteLength;
        }
      }
    }, cancel(e4) {
      n3.throw?.(e4);
    } });
  }
  function a(e3) {
    return "string" == typeof e3 ? t(e3) : e3 instanceof Uint8Array ? e3 : n(e3);
  }
  function s(e3, i3, r4) {
    let [f3, o4] = (function(e4) {
      return e4 ? e4 instanceof Uint8Array ? [e4, 1] : ArrayBuffer.isView(e4) || e4 instanceof ArrayBuffer ? [n(e4), 1] : [t(e4), 0] : [void 0, 0];
    })(i3);
    if (e3 instanceof File) return { o: d(f3 || t(e3.name)), u: BigInt(e3.size), l: o4 };
    if (e3 instanceof Response) {
      const n3 = e3.headers.get("content-disposition"), i4 = n3 && n3.match(/;\s*filename\*?=["']?(.*?)["']?$/i), a3 = i4 && i4[1] || e3.url && new URL(e3.url).pathname.split("/").findLast(Boolean), s3 = a3 && decodeURIComponent(a3), u3 = r4 || +e3.headers.get("content-length");
      return { o: d(f3 || t(s3)), u: BigInt(u3), l: o4 };
    }
    return f3 = d(f3, void 0 !== e3 || void 0 !== r4), "string" == typeof e3 ? { o: f3, u: BigInt(t(e3).length), l: o4 } : e3 instanceof Blob ? { o: f3, u: BigInt(e3.size), l: o4 } : e3 instanceof ArrayBuffer || ArrayBuffer.isView(e3) ? { o: f3, u: BigInt(e3.byteLength), l: o4 } : { o: f3, u: u(e3, r4), l: o4 };
  }
  function u(e3, n3) {
    return n3 > -1 ? BigInt(n3) : e3 ? void 0 : 0n;
  }
  function d(e3, n3 = 1) {
    if (!e3 || e3.every(((c6) => 47 === c6))) throw new Error("The file must have a name.");
    if (n3) for (; 47 === e3[e3.length - 1]; ) e3 = e3.subarray(0, -1);
    else 47 !== e3[e3.length - 1] && (e3 = new Uint8Array([...e3, 47]));
    return e3;
  }
  var l = new Uint32Array(256);
  for (let e3 = 0; e3 < 256; ++e3) {
    let n3 = e3;
    for (let e4 = 0; e4 < 8; ++e4) n3 = n3 >>> 1 ^ (1 & n3 && 3988292384);
    l[e3] = n3;
  }
  function y(e3, n3 = 0) {
    n3 ^= -1;
    for (var t4 = 0, i3 = e3.length; t4 < i3; t4++) n3 = n3 >>> 8 ^ l[255 & n3 ^ e3[t4]];
    return (-1 ^ n3) >>> 0;
  }
  function w(e3, n3, t4 = 0) {
    const i3 = e3.getSeconds() >> 1 | e3.getMinutes() << 5 | e3.getHours() << 11, r4 = e3.getDate() | e3.getMonth() + 1 << 5 | e3.getFullYear() - 1980 << 9;
    n3.setUint16(t4, i3, 1), n3.setUint16(t4 + 2, r4, 1);
  }
  function B({ o: e3, l: n3 }, t4) {
    return 8 * (!n3 || (t4 ?? (function(e4) {
      try {
        b.decode(e4);
      } catch {
        return 0;
      }
      return 1;
    })(e3)));
  }
  var b = new TextDecoder("utf8", { fatal: 1 });
  function p2(t4, i3 = 0) {
    const r4 = e(30);
    return r4.setUint32(0, 1347093252), r4.setUint32(4, 754976768 | i3), w(t4.t, r4, 10), r4.setUint16(26, t4.o.length, 1), n(r4);
  }
  async function* g(e3) {
    let { i: n3 } = e3;
    if ("then" in n3 && (n3 = await n3), n3 instanceof Uint8Array) yield n3, e3.m = y(n3, 0), e3.u = BigInt(n3.length);
    else {
      e3.u = 0n;
      const t4 = n3.getReader();
      for (; ; ) {
        const { value: n4, done: i3 } = await t4.read();
        if (i3) break;
        e3.m = y(n4, e3.m), e3.u += BigInt(n4.length), yield n4;
      }
    }
  }
  function I(t4, r4) {
    const f3 = e(16 + (r4 ? 8 : 0));
    return f3.setUint32(0, 1347094280), f3.setUint32(4, t4.isFile ? t4.m : 0, 1), r4 ? (f3.setBigUint64(8, t4.u, 1), f3.setBigUint64(16, t4.u, 1)) : (f3.setUint32(8, i(t4.u), 1), f3.setUint32(12, i(t4.u), 1)), n(f3);
  }
  function v(t4, r4, f3 = 0, o4 = 0) {
    const a3 = e(46);
    return a3.setUint32(0, 1347092738), a3.setUint32(4, 755182848), a3.setUint16(8, 2048 | f3), w(t4.t, a3, 12), a3.setUint32(16, t4.isFile ? t4.m : 0, 1), a3.setUint32(20, i(t4.u), 1), a3.setUint32(24, i(t4.u), 1), a3.setUint16(28, t4.o.length, 1), a3.setUint16(30, o4, 1), a3.setUint16(40, t4.isFile ? 33204 : 16893, 1), a3.setUint32(42, i(r4), 1), n(a3);
  }
  function h(t4, i3, r4) {
    const f3 = e(r4);
    return f3.setUint16(0, 1, 1), f3.setUint16(2, r4 - 4, 1), 16 & r4 && (f3.setBigUint64(4, t4.u, 1), f3.setBigUint64(12, t4.u, 1)), f3.setBigUint64(r4 - 8, i3, 1), n(f3);
  }
  function D(e3) {
    return e3 instanceof File || e3 instanceof Response ? [[e3], [e3]] : [[e3.input, e3.name, e3.size], [e3.input, e3.lastModified]];
  }
  var S = (e3) => (function(e4) {
    let n3 = BigInt(22), t4 = 0n, i3 = 0;
    for (const r4 of e4) {
      if (!r4.o) throw new Error("Every file must have a non-empty name.");
      if (void 0 === r4.u) throw new Error(`Missing size for file "${new TextDecoder().decode(r4.o)}".`);
      const e5 = r4.u >= 0xffffffffn, f3 = t4 >= 0xffffffffn;
      t4 += BigInt(46 + r4.o.length + (e5 && 8)) + r4.u, n3 += BigInt(r4.o.length + 46 + (12 * f3 | 28 * e5)), i3 || (i3 = e5);
    }
    return (i3 || t4 >= 0xffffffffn) && (n3 += BigInt(76)), n3 + t4;
  })((function* (e4) {
    for (const n3 of e4) yield s(...D(n3)[0]);
  })(e3));
  function A(e3, n3 = {}) {
    const t4 = { "Content-Type": "application/zip", "Content-Disposition": "attachment" };
    return ("bigint" == typeof n3.length || Number.isInteger(n3.length)) && n3.length > 0 && (t4["Content-Length"] = String(n3.length)), n3.metadata && (t4["Content-Length"] = String(S(n3.metadata))), new Response(N(e3, n3), { headers: t4 });
  }
  function N(t4, a3 = {}) {
    const u3 = (function(e3) {
      const n3 = e3[Symbol.iterator in e3 ? Symbol.iterator : Symbol.asyncIterator]();
      return { async next() {
        const e4 = await n3.next();
        if (e4.done) return e4;
        const [t5, i3] = D(e4.value);
        return { done: 0, value: Object.assign(f(...i3), s(...t5)) };
      }, throw: n3.throw?.bind(n3), [Symbol.asyncIterator]() {
        return this;
      } };
    })(t4);
    return o((async function* (t5, f3) {
      const o4 = [];
      let a4 = 0n, s3 = 0n, u4 = 0;
      for await (const e3 of t5) {
        const n3 = B(e3, f3.buffersAreUTF8);
        yield p2(e3, n3), yield new Uint8Array(e3.o), e3.isFile && (yield* g(e3));
        const t6 = e3.u >= 0xffffffffn, i3 = 12 * (a4 >= 0xffffffffn) | 28 * t6;
        yield I(e3, t6), o4.push(v(e3, a4, n3, i3)), o4.push(e3.o), i3 && o4.push(h(e3, a4, i3)), t6 && (a4 += 8n), s3++, a4 += BigInt(46 + e3.o.length) + e3.u, u4 || (u4 = t6);
      }
      let d3 = 0n;
      for (const e3 of o4) yield e3, d3 += BigInt(e3.length);
      if (u4 || a4 >= 0xffffffffn) {
        const t6 = e(76);
        t6.setUint32(0, 1347094022), t6.setBigUint64(4, BigInt(44), 1), t6.setUint32(12, 755182848), t6.setBigUint64(24, s3, 1), t6.setBigUint64(32, s3, 1), t6.setBigUint64(40, d3, 1), t6.setBigUint64(48, a4, 1), t6.setUint32(56, 1347094023), t6.setBigUint64(64, a4 + d3, 1), t6.setUint32(72, 1, 1), yield n(t6);
      }
      const l3 = e(22);
      l3.setUint32(0, 1347093766), l3.setUint16(8, r2(s3), 1), l3.setUint16(10, r2(s3), 1), l3.setUint32(12, i(d3), 1), l3.setUint32(16, i(a4), 1), yield n(l3);
    })(u3, a3), u3);
  }

  // packages/fields/build-module/actions/export-pattern.mjs
  var import_blob2 = __toESM(require_blob(), 1);
  var import_i18n39 = __toESM(require_i18n(), 1);
  function getJsonFromItem(item) {
    return JSON.stringify(
      {
        __file: item.type,
        title: getItemTitle(item),
        content: typeof item.content === "string" ? item.content : item.content?.raw,
        syncStatus: item.wp_pattern_sync_status
      },
      null,
      2
    );
  }
  var exportPattern = {
    id: "export-pattern",
    label: (0, import_i18n39.__)("Export as JSON"),
    icon: download_default,
    supportsBulk: true,
    isEligible: (item) => item.type === "wp_block",
    callback: async (items) => {
      if (items.length === 1) {
        return (0, import_blob2.downloadBlob)(
          `${paramCase(
            getItemTitle(items[0]) || items[0].slug
          )}.json`,
          getJsonFromItem(items[0]),
          "application/json"
        );
      }
      const nameCount = {};
      const filesToZip = items.map((item) => {
        const name2 = paramCase(getItemTitle(item) || item.slug);
        nameCount[name2] = (nameCount[name2] || 0) + 1;
        return {
          name: `${name2 + (nameCount[name2] > 1 ? "-" + (nameCount[name2] - 1) : "")}.json`,
          lastModified: /* @__PURE__ */ new Date(),
          input: getJsonFromItem(item)
        };
      });
      return (0, import_blob2.downloadBlob)(
        (0, import_i18n39.__)("patterns-export") + ".zip",
        await A(filesToZip).blob(),
        "application/zip"
      );
    }
  };
  var export_pattern_default = exportPattern;

  // packages/fields/build-module/actions/view-post-revisions.mjs
  var import_url8 = __toESM(require_url(), 1);
  var import_i18n40 = __toESM(require_i18n(), 1);
  var viewPostRevisions = {
    id: "view-post-revisions",
    context: "list",
    label(items) {
      const revisionsCount = items[0]._links?.["version-history"]?.[0]?.count ?? 0;
      return (0, import_i18n40.sprintf)(
        /* translators: %d: number of revisions. */
        (0, import_i18n40.__)("View revisions (%d)"),
        revisionsCount
      );
    },
    isEligible(post2) {
      if (post2.status === "trash") {
        return false;
      }
      const lastRevisionId = post2?._links?.["predecessor-version"]?.[0]?.id ?? null;
      const revisionsCount = post2?._links?.["version-history"]?.[0]?.count ?? 0;
      return !!lastRevisionId && revisionsCount > 1;
    },
    callback(posts, { onActionPerformed }) {
      const post2 = posts[0];
      const href = (0, import_url8.addQueryArgs)("revision.php", {
        revision: post2?._links?.["predecessor-version"]?.[0]?.id
      });
      document.location.href = href;
      if (onActionPerformed) {
        onActionPerformed(posts);
      }
    }
  };
  var view_post_revisions_default = viewPostRevisions;

  // packages/fields/build-module/actions/permanently-delete-post.mjs
  var import_core_data18 = __toESM(require_core_data(), 1);
  var import_i18n41 = __toESM(require_i18n(), 1);
  var import_notices8 = __toESM(require_notices(), 1);
  var import_element16 = __toESM(require_element(), 1);
  var import_data20 = __toESM(require_data(), 1);
  var import_components16 = __toESM(require_components(), 1);
  var import_html_entities4 = __toESM(require_html_entities(), 1);
  var import_jsx_runtime98 = __toESM(require_jsx_runtime(), 1);
  var permanentlyDeletePost = {
    id: "permanently-delete",
    label: (0, import_i18n41.__)("Permanently delete"),
    supportsBulk: true,
    icon: trash_default,
    isEligible(item) {
      if (isTemplateOrTemplatePart(item) || item.type === "wp_block") {
        return false;
      }
      const { status, permissions } = item;
      return status === "trash" && permissions?.delete;
    },
    hideModalHeader: true,
    modalFocusOnMount: "firstContentElement",
    RenderModal: ({ items, closeModal: closeModal2, onActionPerformed }) => {
      const [isBusy, setIsBusy] = (0, import_element16.useState)(false);
      const { createSuccessNotice, createErrorNotice } = (0, import_data20.useDispatch)(import_notices8.store);
      const { deleteEntityRecord } = (0, import_data20.useDispatch)(import_core_data18.store);
      return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_components16.__experimentalVStack, { spacing: "5", children: [
        /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_components16.__experimentalText, { children: items.length > 1 ? (0, import_i18n41.sprintf)(
          // translators: %d: number of items to delete.
          (0, import_i18n41._n)(
            "Are you sure you want to permanently delete %d item?",
            "Are you sure you want to permanently delete %d items?",
            items.length
          ),
          items.length
        ) : (0, import_i18n41.sprintf)(
          // translators: %s: The post's title
          (0, import_i18n41.__)(
            'Are you sure you want to permanently delete "%s"?'
          ),
          (0, import_html_entities4.decodeEntities)(getItemTitle(items[0]))
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_components16.__experimentalHStack, { justify: "right", children: [
          /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
            import_components16.Button,
            {
              variant: "tertiary",
              onClick: closeModal2,
              disabled: isBusy,
              accessibleWhenDisabled: true,
              __next40pxDefaultSize: true,
              children: (0, import_i18n41.__)("Cancel")
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
            import_components16.Button,
            {
              variant: "primary",
              onClick: async () => {
                setIsBusy(true);
                const promiseResult = await Promise.allSettled(
                  items.map(
                    (post2) => deleteEntityRecord(
                      "postType",
                      post2.type,
                      post2.id,
                      { force: true },
                      { throwOnError: true }
                    )
                  )
                );
                if (promiseResult.every(
                  ({ status }) => status === "fulfilled"
                )) {
                  let successMessage;
                  if (promiseResult.length === 1) {
                    successMessage = (0, import_i18n41.sprintf)(
                      /* translators: %s: The posts's title. */
                      (0, import_i18n41.__)('"%s" permanently deleted.'),
                      getItemTitle(items[0])
                    );
                  } else {
                    successMessage = (0, import_i18n41.__)(
                      "The items were permanently deleted."
                    );
                  }
                  createSuccessNotice(successMessage, {
                    type: "snackbar",
                    id: "permanently-delete-post-action"
                  });
                  onActionPerformed?.(items);
                } else {
                  let errorMessage;
                  if (promiseResult.length === 1) {
                    const typedError = promiseResult[0];
                    if (typedError.reason?.message) {
                      errorMessage = typedError.reason.message;
                    } else {
                      errorMessage = (0, import_i18n41.__)(
                        "An error occurred while permanently deleting the item."
                      );
                    }
                  } else {
                    const errorMessages = /* @__PURE__ */ new Set();
                    const failedPromises = promiseResult.filter(
                      ({ status }) => status === "rejected"
                    );
                    for (const failedPromise of failedPromises) {
                      const typedError = failedPromise;
                      if (typedError.reason?.message) {
                        errorMessages.add(
                          typedError.reason.message
                        );
                      }
                    }
                    if (errorMessages.size === 0) {
                      errorMessage = (0, import_i18n41.__)(
                        "An error occurred while permanently deleting the items."
                      );
                    } else if (errorMessages.size === 1) {
                      errorMessage = (0, import_i18n41.sprintf)(
                        /* translators: %s: an error message */
                        (0, import_i18n41.__)(
                          "An error occurred while permanently deleting the items: %s"
                        ),
                        [...errorMessages][0]
                      );
                    } else {
                      errorMessage = (0, import_i18n41.sprintf)(
                        /* translators: %s: a list of comma separated error messages */
                        (0, import_i18n41.__)(
                          "Some errors occurred while permanently deleting the items: %s"
                        ),
                        [...errorMessages].join(",")
                      );
                    }
                  }
                  createErrorNotice(errorMessage, {
                    type: "snackbar"
                  });
                }
                setIsBusy(false);
                closeModal2?.();
              },
              isBusy,
              disabled: isBusy,
              accessibleWhenDisabled: true,
              __next40pxDefaultSize: true,
              children: (0, import_i18n41.__)("Delete permanently")
            }
          )
        ] })
      ] });
    }
  };
  var permanently_delete_post_default = permanentlyDeletePost;

  // packages/fields/build-module/actions/restore-post.mjs
  var import_core_data19 = __toESM(require_core_data(), 1);
  var import_i18n42 = __toESM(require_i18n(), 1);
  var import_notices9 = __toESM(require_notices(), 1);
  var restorePost = {
    id: "restore",
    label: (0, import_i18n42.__)("Restore"),
    isPrimary: true,
    icon: backup_default,
    supportsBulk: true,
    isEligible(item) {
      return !isTemplateOrTemplatePart(item) && item.type !== "wp_block" && item.status === "trash" && item.permissions?.update;
    },
    async callback(posts, { registry, onActionPerformed }) {
      const { createSuccessNotice, createErrorNotice } = registry.dispatch(import_notices9.store);
      const { editEntityRecord, saveEditedEntityRecord } = registry.dispatch(import_core_data19.store);
      await Promise.allSettled(
        posts.map((post2) => {
          return editEntityRecord("postType", post2.type, post2.id, {
            status: "draft"
          });
        })
      );
      const promiseResult = await Promise.allSettled(
        posts.map((post2) => {
          return saveEditedEntityRecord("postType", post2.type, post2.id, {
            throwOnError: true
          });
        })
      );
      if (promiseResult.every(({ status }) => status === "fulfilled")) {
        let successMessage;
        if (posts.length === 1) {
          successMessage = (0, import_i18n42.sprintf)(
            /* translators: %s: The number of posts. */
            (0, import_i18n42.__)('"%s" has been restored.'),
            getItemTitle(posts[0])
          );
        } else if (posts[0].type === "page") {
          successMessage = (0, import_i18n42.sprintf)(
            /* translators: %d: The number of posts. */
            (0, import_i18n42.__)("%d pages have been restored."),
            posts.length
          );
        } else {
          successMessage = (0, import_i18n42.sprintf)(
            /* translators: %d: The number of posts. */
            (0, import_i18n42.__)("%d posts have been restored."),
            posts.length
          );
        }
        createSuccessNotice(successMessage, {
          type: "snackbar",
          id: "restore-post-action"
        });
        if (onActionPerformed) {
          onActionPerformed(posts);
        }
      } else {
        let errorMessage;
        if (promiseResult.length === 1) {
          const typedError = promiseResult[0];
          if (typedError.reason?.message) {
            errorMessage = typedError.reason.message;
          } else {
            errorMessage = (0, import_i18n42.__)(
              "An error occurred while restoring the post."
            );
          }
        } else {
          const errorMessages = /* @__PURE__ */ new Set();
          const failedPromises = promiseResult.filter(
            ({ status }) => status === "rejected"
          );
          for (const failedPromise of failedPromises) {
            const typedError = failedPromise;
            if (typedError.reason?.message) {
              errorMessages.add(typedError.reason.message);
            }
          }
          if (errorMessages.size === 0) {
            errorMessage = (0, import_i18n42.__)(
              "An error occurred while restoring the posts."
            );
          } else if (errorMessages.size === 1) {
            errorMessage = (0, import_i18n42.sprintf)(
              /* translators: %s: an error message */
              (0, import_i18n42.__)("An error occurred while restoring the posts: %s"),
              [...errorMessages][0]
            );
          } else {
            errorMessage = (0, import_i18n42.sprintf)(
              /* translators: %s: a list of comma separated error messages */
              (0, import_i18n42.__)(
                "Some errors occurred while restoring the posts: %s"
              ),
              [...errorMessages].join(",")
            );
          }
        }
        createErrorNotice(errorMessage, {
          type: "snackbar"
        });
      }
    }
  };
  var restore_post_default = restorePost;

  // packages/fields/build-module/actions/trash-post.mjs
  var import_data21 = __toESM(require_data(), 1);
  var import_core_data20 = __toESM(require_core_data(), 1);
  var import_i18n43 = __toESM(require_i18n(), 1);
  var import_notices10 = __toESM(require_notices(), 1);
  var import_element17 = __toESM(require_element(), 1);
  var import_components17 = __toESM(require_components(), 1);
  var import_jsx_runtime99 = __toESM(require_jsx_runtime(), 1);
  var trashPost2 = {
    id: "move-to-trash",
    label: (0, import_i18n43._x)("Trash", "verb"),
    isPrimary: true,
    icon: trash_default,
    isEligible(item) {
      if (item.type === "wp_template_part" || item.type === "wp_block") {
        return false;
      }
      if (item.type === "wp_template" && typeof item.id === "string") {
        return false;
      }
      return !!item.status && !["auto-draft", "trash"].includes(item.status) && item.permissions?.delete;
    },
    supportsBulk: true,
    hideModalHeader: true,
    modalFocusOnMount: "firstContentElement",
    RenderModal: ({ items, closeModal: closeModal2, onActionPerformed }) => {
      const [isBusy, setIsBusy] = (0, import_element17.useState)(false);
      const { createSuccessNotice, createErrorNotice } = (0, import_data21.useDispatch)(import_notices10.store);
      const { deleteEntityRecord } = (0, import_data21.useDispatch)(import_core_data20.store);
      return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_components17.__experimentalVStack, { spacing: "5", children: [
        /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_components17.__experimentalText, { children: items.length === 1 ? (0, import_i18n43.sprintf)(
          // translators: %s: The item's title.
          (0, import_i18n43.__)(
            'Are you sure you want to move "%s" to the trash?'
          ),
          getItemTitle(items[0])
        ) : (0, import_i18n43.sprintf)(
          // translators: %d: The number of items (2 or more).
          (0, import_i18n43._n)(
            "Are you sure you want to move %d item to the trash ?",
            "Are you sure you want to move %d items to the trash ?",
            items.length
          ),
          items.length
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_components17.__experimentalHStack, { justify: "right", children: [
          /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
            import_components17.Button,
            {
              __next40pxDefaultSize: true,
              variant: "tertiary",
              onClick: closeModal2,
              disabled: isBusy,
              accessibleWhenDisabled: true,
              children: (0, import_i18n43.__)("Cancel")
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
            import_components17.Button,
            {
              __next40pxDefaultSize: true,
              variant: "primary",
              onClick: async () => {
                setIsBusy(true);
                const promiseResult = await Promise.allSettled(
                  items.map(
                    (item) => deleteEntityRecord(
                      "postType",
                      item.type,
                      item.id.toString(),
                      {},
                      { throwOnError: true }
                    )
                  )
                );
                if (promiseResult.every(
                  ({ status }) => status === "fulfilled"
                )) {
                  let successMessage;
                  if (promiseResult.length === 1) {
                    successMessage = (0, import_i18n43.sprintf)(
                      /* translators: %s: The item's title. */
                      (0, import_i18n43.__)('"%s" moved to the trash.'),
                      getItemTitle(items[0])
                    );
                  } else {
                    successMessage = (0, import_i18n43.sprintf)(
                      /* translators: %d: The number of items. */
                      (0, import_i18n43._n)(
                        "%d item moved to the trash.",
                        "%d items moved to the trash.",
                        items.length
                      ),
                      items.length
                    );
                  }
                  createSuccessNotice(successMessage, {
                    type: "snackbar",
                    id: "move-to-trash-action"
                  });
                } else {
                  let errorMessage;
                  if (promiseResult.length === 1) {
                    const typedError = promiseResult[0];
                    if (typedError.reason?.message) {
                      errorMessage = typedError.reason.message;
                    } else {
                      errorMessage = (0, import_i18n43.__)(
                        "An error occurred while moving the item to the trash."
                      );
                    }
                  } else {
                    const errorMessages = /* @__PURE__ */ new Set();
                    const failedPromises = promiseResult.filter(
                      ({ status }) => status === "rejected"
                    );
                    for (const failedPromise of failedPromises) {
                      const typedError = failedPromise;
                      if (typedError.reason?.message) {
                        errorMessages.add(
                          typedError.reason.message
                        );
                      }
                    }
                    if (errorMessages.size === 0) {
                      errorMessage = (0, import_i18n43.__)(
                        "An error occurred while moving the items to the trash."
                      );
                    } else if (errorMessages.size === 1) {
                      errorMessage = (0, import_i18n43.sprintf)(
                        /* translators: %s: an error message */
                        (0, import_i18n43.__)(
                          "An error occurred while moving the item to the trash: %s"
                        ),
                        [...errorMessages][0]
                      );
                    } else {
                      errorMessage = (0, import_i18n43.sprintf)(
                        /* translators: %s: a list of comma separated error messages */
                        (0, import_i18n43.__)(
                          "Some errors occurred while moving the items to the trash: %s"
                        ),
                        [...errorMessages].join(",")
                      );
                    }
                  }
                  createErrorNotice(errorMessage, {
                    type: "snackbar"
                  });
                }
                if (onActionPerformed) {
                  onActionPerformed(items);
                }
                setIsBusy(false);
                closeModal2?.();
              },
              isBusy,
              disabled: isBusy,
              accessibleWhenDisabled: true,
              children: (0, import_i18n43._x)("Trash", "verb")
            }
          )
        ] })
      ] });
    }
  };
  var trash_post_default = trashPost2;

  // packages/fields/build-module/actions/delete-post.mjs
  var import_i18n44 = __toESM(require_i18n(), 1);
  var import_element18 = __toESM(require_element(), 1);
  var import_components18 = __toESM(require_components(), 1);
  var import_patterns4 = __toESM(require_patterns(), 1);
  var import_html_entities5 = __toESM(require_html_entities(), 1);

  // packages/fields/build-module/mutation/index.mjs
  var import_notices11 = __toESM(require_notices(), 1);
  var import_core_data21 = __toESM(require_core_data(), 1);
  var import_data22 = __toESM(require_data(), 1);
  function getErrorMessagesFromPromises(allSettledResults) {
    const errorMessages = /* @__PURE__ */ new Set();
    if (allSettledResults.length === 1) {
      const typedError = allSettledResults[0];
      if (typedError.reason?.message) {
        errorMessages.add(typedError.reason.message);
      }
    } else {
      const failedPromises = allSettledResults.filter(
        ({ status }) => status === "rejected"
      );
      for (const failedPromise of failedPromises) {
        const typedError = failedPromise;
        if (typedError.reason?.message) {
          errorMessages.add(typedError.reason.message);
        }
      }
    }
    return errorMessages;
  }
  var deletePostWithNotices = async (posts, notice, callbacks) => {
    const { createSuccessNotice, createErrorNotice } = (0, import_data22.dispatch)(import_notices11.store);
    const { deleteEntityRecord } = (0, import_data22.dispatch)(import_core_data21.store);
    const allSettledResults = await Promise.allSettled(
      posts.map((post2) => {
        return deleteEntityRecord(
          "postType",
          post2.type,
          post2.id,
          { force: true },
          { throwOnError: true }
        );
      })
    );
    if (allSettledResults.every(({ status }) => status === "fulfilled")) {
      let successMessage;
      if (allSettledResults.length === 1) {
        successMessage = notice.success.messages.getMessage(posts[0]);
      } else {
        successMessage = notice.success.messages.getBatchMessage(posts);
      }
      createSuccessNotice(successMessage, {
        type: notice.success.type ?? "snackbar",
        id: notice.success.id
      });
      callbacks.onActionPerformed?.(posts);
    } else {
      const errorMessages = getErrorMessagesFromPromises(allSettledResults);
      let errorMessage = "";
      if (allSettledResults.length === 1) {
        errorMessage = notice.error.messages.getMessage(errorMessages);
      } else {
        errorMessage = notice.error.messages.getBatchMessage(errorMessages);
      }
      createErrorNotice(errorMessage, {
        type: notice.error.type ?? "snackbar",
        id: notice.error.id
      });
      callbacks.onActionError?.();
    }
  };

  // packages/fields/build-module/actions/delete-post.mjs
  var import_jsx_runtime100 = __toESM(require_jsx_runtime(), 1);
  var { PATTERN_TYPES: PATTERN_TYPES3 } = unlock2(import_patterns4.privateApis);
  var deletePostAction = {
    id: "delete-post",
    label: (0, import_i18n44.__)("Delete"),
    isPrimary: true,
    icon: trash_default,
    isEligible(post2) {
      if (isTemplateOrTemplatePart(post2)) {
        return isTemplateRemovable(post2);
      }
      return post2.type === PATTERN_TYPES3.user;
    },
    supportsBulk: true,
    hideModalHeader: true,
    modalFocusOnMount: "firstContentElement",
    RenderModal: ({ items, closeModal: closeModal2, onActionPerformed }) => {
      const [isBusy, setIsBusy] = (0, import_element18.useState)(false);
      const isResetting = items.every(
        (item) => isTemplateOrTemplatePart(item) && item?.has_theme_file
      );
      return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(import_components18.__experimentalVStack, { spacing: "5", children: [
        /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_components18.__experimentalText, { children: items.length > 1 ? (0, import_i18n44.sprintf)(
          // translators: %d: number of items to delete.
          (0, import_i18n44._n)(
            "Delete %d item?",
            "Delete %d items?",
            items.length
          ),
          items.length
        ) : (0, import_i18n44.sprintf)(
          // translators: %s: The template or template part's title
          (0, import_i18n44._x)('Delete "%s"?', "template part"),
          getItemTitle(items[0])
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(import_components18.__experimentalHStack, { justify: "right", children: [
          /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
            import_components18.Button,
            {
              variant: "tertiary",
              onClick: closeModal2,
              disabled: isBusy,
              accessibleWhenDisabled: true,
              __next40pxDefaultSize: true,
              children: (0, import_i18n44.__)("Cancel")
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
            import_components18.Button,
            {
              variant: "primary",
              onClick: async () => {
                setIsBusy(true);
                const notice = {
                  success: {
                    messages: {
                      getMessage: (item) => {
                        return isResetting ? (0, import_i18n44.sprintf)(
                          /* translators: %s: The template/part's name. */
                          (0, import_i18n44.__)('"%s" reset.'),
                          (0, import_html_entities5.decodeEntities)(
                            getItemTitle(item)
                          )
                        ) : (0, import_i18n44.sprintf)(
                          /* translators: %s: The template/part's name. */
                          (0, import_i18n44._x)(
                            '"%s" deleted.',
                            "template part"
                          ),
                          (0, import_html_entities5.decodeEntities)(
                            getItemTitle(item)
                          )
                        );
                      },
                      getBatchMessage: () => {
                        return isResetting ? (0, import_i18n44.__)("Items reset.") : (0, import_i18n44.__)("Items deleted.");
                      }
                    }
                  },
                  error: {
                    messages: {
                      getMessage: (error) => {
                        if (error.size === 1) {
                          return [...error][0];
                        }
                        return isResetting ? (0, import_i18n44.__)(
                          "An error occurred while reverting the item."
                        ) : (0, import_i18n44.__)(
                          "An error occurred while deleting the item."
                        );
                      },
                      getBatchMessage: (errors) => {
                        if (errors.size === 0) {
                          return isResetting ? (0, import_i18n44.__)(
                            "An error occurred while reverting the items."
                          ) : (0, import_i18n44.__)(
                            "An error occurred while deleting the items."
                          );
                        }
                        if (errors.size === 1) {
                          return isResetting ? (0, import_i18n44.sprintf)(
                            /* translators: %s: an error message */
                            (0, import_i18n44.__)(
                              "An error occurred while reverting the items: %s"
                            ),
                            [...errors][0]
                          ) : (0, import_i18n44.sprintf)(
                            /* translators: %s: an error message */
                            (0, import_i18n44.__)(
                              "An error occurred while deleting the items: %s"
                            ),
                            [...errors][0]
                          );
                        }
                        return isResetting ? (0, import_i18n44.sprintf)(
                          /* translators: %s: a list of comma separated error messages */
                          (0, import_i18n44.__)(
                            "Some errors occurred while reverting the items: %s"
                          ),
                          [...errors].join(
                            ","
                          )
                        ) : (0, import_i18n44.sprintf)(
                          /* translators: %s: a list of comma separated error messages */
                          (0, import_i18n44.__)(
                            "Some errors occurred while deleting the items: %s"
                          ),
                          [...errors].join(
                            ","
                          )
                        );
                      }
                    }
                  }
                };
                await deletePostWithNotices(items, notice, {
                  onActionPerformed
                });
                setIsBusy(false);
                closeModal2?.();
              },
              isBusy,
              disabled: isBusy,
              accessibleWhenDisabled: true,
              __next40pxDefaultSize: true,
              children: (0, import_i18n44.__)("Delete")
            }
          )
        ] })
      ] });
    }
  };
  var delete_post_default = deletePostAction;

  // packages/fields/build-module/actions/duplicate-template-part.mjs
  var import_data25 = __toESM(require_data(), 1);
  var import_i18n46 = __toESM(require_i18n(), 1);
  var import_notices13 = __toESM(require_notices(), 1);
  var import_element20 = __toESM(require_element(), 1);
  var import_blocks5 = __toESM(require_blocks(), 1);

  // packages/fields/build-module/components/create-template-part-modal/index.mjs
  var import_components19 = __toESM(require_components(), 1);
  var import_compose3 = __toESM(require_compose(), 1);
  var import_core_data23 = __toESM(require_core_data(), 1);
  var import_data24 = __toESM(require_data(), 1);
  var import_element19 = __toESM(require_element(), 1);
  var import_i18n45 = __toESM(require_i18n(), 1);
  var import_notices12 = __toESM(require_notices(), 1);
  var import_blocks4 = __toESM(require_blocks(), 1);

  // packages/fields/build-module/components/create-template-part-modal/utils.mjs
  var import_data23 = __toESM(require_data(), 1);
  var import_core_data22 = __toESM(require_core_data(), 1);
  var useExistingTemplateParts = () => {
    return (0, import_data23.useSelect)(
      (select6) => select6(import_core_data22.store).getEntityRecords(
        "postType",
        "wp_template_part",
        {
          per_page: -1
        }
      ),
      []
    ) ?? [];
  };
  var getUniqueTemplatePartTitle = (title, templateParts) => {
    const lowercaseTitle = title.toLowerCase();
    const existingTitles = templateParts.map(
      (templatePart) => templatePart.title.rendered.toLowerCase()
    );
    if (!existingTitles.includes(lowercaseTitle)) {
      return title;
    }
    let suffix = 2;
    while (existingTitles.includes(`${lowercaseTitle} ${suffix}`)) {
      suffix++;
    }
    return `${title} ${suffix}`;
  };
  var getCleanTemplatePartSlug = (title) => {
    return paramCase(title).replace(/[^\w-]+/g, "") || "wp-custom-part";
  };

  // packages/fields/build-module/components/create-template-part-modal/index.mjs
  var import_jsx_runtime101 = __toESM(require_jsx_runtime(), 1);
  function getAreaRadioId(value, instanceId) {
    return `fields-create-template-part-modal__area-option-${value}-${instanceId}`;
  }
  function getAreaRadioDescriptionId(value, instanceId) {
    return `fields-create-template-part-modal__area-option-description-${value}-${instanceId}`;
  }
  function CreateTemplatePartModal({
    modalTitle,
    ...restProps
  }) {
    const defaultModalTitle = (0, import_data24.useSelect)(
      (select6) => select6(import_core_data23.store).getPostType("wp_template_part")?.labels?.add_new_item,
      []
    );
    return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
      import_components19.Modal,
      {
        title: modalTitle || defaultModalTitle,
        onRequestClose: restProps.closeModal,
        overlayClassName: "fields-create-template-part-modal",
        focusOnMount: "firstContentElement",
        size: "medium",
        children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(CreateTemplatePartModalContents, { ...restProps })
      }
    );
  }
  var getTemplatePartIcon2 = (areaOrIconName) => {
    if ("header" === areaOrIconName) {
      return header_default;
    } else if ("footer" === areaOrIconName) {
      return footer_default;
    } else if ("sidebar" === areaOrIconName) {
      return sidebar_default;
    } else if ("navigation-overlay" === areaOrIconName) {
      return navigation_overlay_default;
    }
    return symbol_filled_default;
  };
  function CreateTemplatePartModalContents({
    defaultArea = "uncategorized",
    blocks = [],
    confirmLabel = (0, import_i18n45.__)("Add"),
    closeModal: closeModal2,
    onCreate,
    onError,
    defaultTitle = ""
  }) {
    const { createErrorNotice } = (0, import_data24.useDispatch)(import_notices12.store);
    const { saveEntityRecord } = (0, import_data24.useDispatch)(import_core_data23.store);
    const existingTemplateParts = useExistingTemplateParts();
    const [title, setTitle] = (0, import_element19.useState)(defaultTitle);
    const [area, setArea] = (0, import_element19.useState)(defaultArea);
    const [isSubmitting, setIsSubmitting] = (0, import_element19.useState)(false);
    const instanceId = (0, import_compose3.useInstanceId)(CreateTemplatePartModal);
    const defaultTemplatePartAreas = (0, import_data24.useSelect)(
      (select6) => select6(import_core_data23.store).getCurrentTheme()?.default_template_part_areas,
      []
    );
    async function createTemplatePart() {
      if (!title || isSubmitting) {
        return;
      }
      try {
        setIsSubmitting(true);
        const uniqueTitle = getUniqueTemplatePartTitle(
          title,
          existingTemplateParts
        );
        const cleanSlug = getCleanTemplatePartSlug(uniqueTitle);
        const templatePart = await saveEntityRecord(
          "postType",
          "wp_template_part",
          {
            slug: cleanSlug,
            title: uniqueTitle,
            content: (0, import_blocks4.serialize)(blocks),
            area
          },
          { throwOnError: true }
        );
        await onCreate(templatePart);
      } catch (error) {
        const errorMessage = error instanceof Error && "code" in error && error.message && error.code !== "unknown_error" ? error.message : (0, import_i18n45.__)(
          "An error occurred while creating the template part."
        );
        createErrorNotice(errorMessage, { type: "snackbar" });
        onError?.();
      } finally {
        setIsSubmitting(false);
      }
    }
    return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
      "form",
      {
        onSubmit: async (event) => {
          event.preventDefault();
          await createTemplatePart();
        },
        children: /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(import_components19.__experimentalVStack, { spacing: "4", children: [
          /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
            import_components19.TextControl,
            {
              __next40pxDefaultSize: true,
              label: (0, import_i18n45.__)("Name"),
              value: title,
              onChange: setTitle,
              required: true
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("fieldset", { className: "fields-create-template-part-modal__area-fieldset", children: [
            /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_components19.BaseControl.VisualLabel, { as: "legend", children: (0, import_i18n45.__)("Area") }),
            /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "fields-create-template-part-modal__area-radio-group", children: (defaultTemplatePartAreas ?? []).map(
              (item) => {
                const icon = getTemplatePartIcon2(item.icon);
                return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
                  "div",
                  {
                    className: "fields-create-template-part-modal__area-radio-wrapper",
                    children: [
                      /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
                        "input",
                        {
                          type: "radio",
                          id: getAreaRadioId(
                            item.area,
                            instanceId
                          ),
                          name: `fields-create-template-part-modal__area-${instanceId}`,
                          value: item.area,
                          checked: area === item.area,
                          onChange: () => {
                            setArea(item.area);
                          },
                          "aria-describedby": getAreaRadioDescriptionId(
                            item.area,
                            instanceId
                          )
                        }
                      ),
                      /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
                        import_components19.Icon,
                        {
                          icon,
                          className: "fields-create-template-part-modal__area-radio-icon"
                        }
                      ),
                      /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
                        "label",
                        {
                          htmlFor: getAreaRadioId(
                            item.area,
                            instanceId
                          ),
                          className: "fields-create-template-part-modal__area-radio-label",
                          children: item.label
                        }
                      ),
                      /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
                        import_components19.Icon,
                        {
                          icon: check_default,
                          className: "fields-create-template-part-modal__area-radio-checkmark"
                        }
                      ),
                      /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
                        "p",
                        {
                          className: "fields-create-template-part-modal__area-radio-description",
                          id: getAreaRadioDescriptionId(
                            item.area,
                            instanceId
                          ),
                          children: item.description
                        }
                      )
                    ]
                  },
                  item.area
                );
              }
            ) })
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(import_components19.__experimentalHStack, { justify: "right", children: [
            /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
              import_components19.Button,
              {
                __next40pxDefaultSize: true,
                variant: "tertiary",
                onClick: () => {
                  closeModal2();
                },
                children: (0, import_i18n45.__)("Cancel")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
              import_components19.Button,
              {
                __next40pxDefaultSize: true,
                variant: "primary",
                type: "submit",
                "aria-disabled": !title || isSubmitting,
                isBusy: isSubmitting,
                children: confirmLabel
              }
            )
          ] })
        ] })
      }
    );
  }

  // packages/fields/build-module/actions/duplicate-template-part.mjs
  var import_jsx_runtime102 = __toESM(require_jsx_runtime(), 1);
  var duplicateTemplatePart = {
    id: "duplicate-template-part",
    label: (0, import_i18n46._x)("Duplicate", "action label"),
    isEligible: (item) => item.type === "wp_template_part",
    modalHeader: (0, import_i18n46._x)("Duplicate template part", "action label"),
    modalFocusOnMount: "firstContentElement",
    RenderModal: ({ items, closeModal: closeModal2 }) => {
      const [item] = items;
      const blocks = (0, import_element20.useMemo)(() => {
        return item.blocks ?? (0, import_blocks5.parse)(
          typeof item.content === "string" ? item.content : item.content.raw,
          {
            __unstableSkipMigrationLogs: true
          }
        );
      }, [item.content, item.blocks]);
      const { createSuccessNotice } = (0, import_data25.useDispatch)(import_notices13.store);
      function onTemplatePartSuccess(templatePart) {
        createSuccessNotice(
          (0, import_i18n46.sprintf)(
            // translators: %s: The new template part's title e.g. 'Call to action (copy)'.
            (0, import_i18n46._x)('"%s" duplicated.', "template part"),
            getItemTitle(templatePart)
          ),
          { type: "snackbar", id: "edit-site-patterns-success" }
        );
        closeModal2?.();
      }
      return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
        CreateTemplatePartModalContents,
        {
          blocks,
          defaultArea: item.area,
          defaultTitle: (0, import_i18n46.sprintf)(
            /* translators: %s: Existing template part title */
            (0, import_i18n46._x)("%s (Copy)", "template part"),
            getItemTitle(item)
          ),
          onCreate: onTemplatePartSuccess,
          onError: closeModal2,
          confirmLabel: (0, import_i18n46._x)("Duplicate", "action label"),
          closeModal: closeModal2 ?? (() => {
          })
        }
      );
    }
  };
  var duplicate_template_part_default = duplicateTemplatePart;

  // packages/media-fields/build-module/alt_text/index.mjs
  var import_i18n47 = __toESM(require_i18n(), 1);
  var import_components20 = __toESM(require_components(), 1);
  var import_jsx_runtime103 = __toESM(require_jsx_runtime(), 1);
  var altTextField = {
    id: "alt_text",
    type: "text",
    label: (0, import_i18n47.__)("Alt text"),
    isVisible: (item) => item?.media_type === "image",
    render: ({ item }) => item?.alt_text || "-",
    Edit: ({ field, onChange, data }) => {
      return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
        import_components20.TextareaControl,
        {
          label: field.label,
          value: data.alt_text || "",
          onChange: (value) => onChange({ alt_text: value }),
          rows: 2
        }
      );
    },
    enableSorting: false,
    filterBy: false
  };
  var alt_text_default = altTextField;

  // packages/media-fields/build-module/attached_to/index.mjs
  var import_i18n50 = __toESM(require_i18n(), 1);

  // packages/media-fields/build-module/attached_to/view.mjs
  var import_element21 = __toESM(require_element(), 1);
  var import_i18n48 = __toESM(require_i18n(), 1);

  // packages/media-fields/build-module/utils/get-rendered-content.mjs
  function getRenderedContent(content) {
    if (!content) {
      return "";
    }
    if (typeof content === "string") {
      return content;
    }
    if (typeof content === "object") {
      return content.rendered || content.raw || "";
    }
    return "";
  }

  // packages/media-fields/build-module/attached_to/view.mjs
  var import_jsx_runtime104 = __toESM(require_jsx_runtime(), 1);
  function MediaAttachedToView({
    item
  }) {
    const [attachedPostTitle, setAttachedPostTitle] = (0, import_element21.useState)(null);
    const parentId = item.post;
    const embeddedPostId = item._embedded?.["wp:attached-to"]?.[0]?.id;
    const embeddedPostTitle = item._embedded?.["wp:attached-to"]?.[0]?.title;
    (0, import_element21.useEffect)(() => {
      if (!!parentId && parentId === embeddedPostId) {
        setAttachedPostTitle(
          getRenderedContent(embeddedPostTitle) || embeddedPostId?.toString() || ""
        );
      }
      if (!parentId) {
        setAttachedPostTitle((0, import_i18n48.__)("(Unattached)"));
      }
    }, [parentId, embeddedPostId, embeddedPostTitle]);
    return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_jsx_runtime104.Fragment, { children: attachedPostTitle });
  }

  // packages/media-fields/build-module/attached_to/edit.mjs
  var import_core_data24 = __toESM(require_core_data(), 1);
  var import_components21 = __toESM(require_components(), 1);
  var import_i18n49 = __toESM(require_i18n(), 1);
  var import_element22 = __toESM(require_element(), 1);
  var import_compose4 = __toESM(require_compose(), 1);
  var import_data26 = __toESM(require_data(), 1);
  var import_jsx_runtime105 = __toESM(require_jsx_runtime(), 1);
  function MediaAttachedToEdit({
    data,
    onChange
  }) {
    const defaultPost = !!data.post && !!data?._embedded?.["wp:attached-to"]?.[0] ? [
      {
        label: getRenderedContent(
          data._embedded?.["wp:attached-to"]?.[0]?.title
        ),
        value: data.post.toString()
      }
    ] : [];
    const [options, setOptions] = (0, import_element22.useState)(defaultPost);
    const [searchResults, setSearchResults] = (0, import_element22.useState)(
      []
    );
    const [isLoading, setIsLoading] = (0, import_element22.useState)(false);
    const [value, setValue] = (0, import_element22.useState)(
      data?.post?.toString() ?? null
    );
    const postTypes = (0, import_data26.useSelect)(
      (select6) => select6(import_core_data24.store).getPostTypes(),
      []
    );
    const handleDetach = () => {
      onChange({
        post: 0,
        _embedded: { ...data?._embedded, "wp:attached-to": void 0 }
      });
      setOptions([]);
    };
    const onValueChange = async (filterValue) => {
      setIsLoading(true);
      const results = await (0, import_core_data24.__experimentalFetchLinkSuggestions)(
        filterValue,
        /*
         * @TODO `fetchLinkSuggestions()` should accept `perPage` as an option argument.
         * `isInitialSuggestions` limits the result to 3, otherwise it's hardcoded to 20.
         */
        { type: "post", isInitialSuggestions: true },
        {}
      );
      setSearchResults(results);
      const mappedSuggestions = results.map((result) => {
        return {
          label: result.title,
          value: result.id.toString()
        };
      });
      setOptions(mappedSuggestions);
      setIsLoading(false);
    };
    const handleSelectOption = (selectedPostId) => {
      if (!selectedPostId) {
        handleDetach();
        return;
      }
      setValue(selectedPostId);
      if (selectedPostId) {
        const selectedPost = searchResults.find(
          (result) => result.id === Number(selectedPostId)
        );
        if (selectedPost && postTypes) {
          const postType2 = postTypes.find(
            (_postType) => _postType.slug === selectedPost?.type
          );
          const attachedTo = {
            ...postType2 && { type: postType2.slug },
            id: Number(selectedPostId),
            title: {
              raw: selectedPost.title,
              rendered: selectedPost.title
            }
          };
          onChange({
            post: Number(selectedPostId),
            _embedded: {
              ...data?._embedded,
              "wp:attached-to": [attachedTo]
            }
          });
        }
      }
    };
    const help = !!data.post ? (0, import_element22.createInterpolateElement)(
      (0, import_i18n49.__)(
        "Search for a post or page to attach this media to or <button>detach current</button>."
      ),
      {
        button: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
          import_components21.Button,
          {
            __next40pxDefaultSize: true,
            onClick: handleDetach,
            variant: "link",
            accessibleWhenDisabled: true
          }
        )
      }
    ) : (0, import_i18n49.__)("Search for a post or page to attach this media to.");
    return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
      import_components21.ComboboxControl,
      {
        className: "dataviews-media-field__attached-to",
        __next40pxDefaultSize: true,
        isLoading,
        label: (0, import_i18n49.__)("Attached to"),
        help,
        value,
        options,
        onFilterValueChange: (0, import_compose4.debounce)(
          (filterValue) => onValueChange(filterValue),
          300
        ),
        onChange: handleSelectOption,
        hideLabelFromVision: true
      }
    );
  }

  // packages/media-fields/build-module/attached_to/index.mjs
  var attachedToField = {
    id: "attached_to",
    type: "text",
    label: (0, import_i18n50.__)("Attached to"),
    Edit: MediaAttachedToEdit,
    render: MediaAttachedToView,
    enableSorting: false,
    filterBy: false
  };
  var attached_to_default = attachedToField;

  // packages/media-fields/build-module/author/index.mjs
  var import_i18n52 = __toESM(require_i18n(), 1);
  var import_data27 = __toESM(require_data(), 1);
  var import_core_data25 = __toESM(require_core_data(), 1);

  // packages/media-fields/build-module/author/view.mjs
  var import_i18n51 = __toESM(require_i18n(), 1);
  var import_element23 = __toESM(require_element(), 1);
  var import_components22 = __toESM(require_components(), 1);
  var import_jsx_runtime106 = __toESM(require_jsx_runtime(), 1);
  function AuthorView2({
    item
  }) {
    const author = item?._embedded?.author?.[0];
    const text = author?.name;
    const imageUrl = author?.avatar_urls?.[48];
    const [loadingState, setLoadingState] = (0, import_element23.useState)("loading");
    (0, import_element23.useEffect)(() => {
      setLoadingState("loading");
    }, [imageUrl]);
    const imgRef = (0, import_element23.useCallback)((img) => {
      if (img?.complete) {
        setLoadingState("instant");
      }
    }, []);
    const handleLoad = () => {
      if (loadingState === "loading") {
        setLoadingState("loaded");
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(import_components22.__experimentalHStack, { alignment: "left", spacing: 0, children: [
      !!imageUrl && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
        "div",
        {
          className: clsx_default("media-author-field__avatar", {
            "is-loading": loadingState === "loading",
            "is-loaded": loadingState === "loaded"
          }),
          children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
            "img",
            {
              ref: imgRef,
              onLoad: handleLoad,
              alt: (0, import_i18n51.__)("Author avatar"),
              src: imageUrl
            }
          )
        }
      ),
      !imageUrl && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "media-author-field__icon", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_components22.Icon, { icon: comment_author_avatar_default }) }),
      /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "media-author-field__name", children: text })
    ] });
  }

  // packages/media-fields/build-module/author/index.mjs
  var authorField2 = {
    label: (0, import_i18n52.__)("Author"),
    id: "author",
    type: "integer",
    getElements: async () => {
      const authors = await (0, import_data27.resolveSelect)(import_core_data25.store).getEntityRecords(
        "root",
        "user",
        {
          per_page: -1,
          who: "authors",
          _fields: "id,name",
          context: "view"
        }
      ) ?? [];
      return authors.map(({ id, name: name2 }) => ({
        value: id,
        label: name2
      }));
    },
    render: AuthorView2,
    sort: (a3, b3, direction) => {
      const nameA = a3._embedded?.author?.[0]?.name || "";
      const nameB = b3._embedded?.author?.[0]?.name || "";
      return direction === "asc" ? nameA.localeCompare(nameB) : nameB.localeCompare(nameA);
    },
    filterBy: {
      operators: ["isAny", "isNone"]
    },
    readOnly: true
  };
  var author_default2 = authorField2;

  // packages/media-fields/build-module/caption/index.mjs
  var import_i18n53 = __toESM(require_i18n(), 1);
  var import_components23 = __toESM(require_components(), 1);

  // packages/media-fields/build-module/utils/get-raw-content.mjs
  function getRawContent(content) {
    if (!content) {
      return "";
    }
    if (typeof content === "string") {
      return content;
    }
    if (typeof content === "object" && "raw" in content) {
      return content.raw || "";
    }
    return "";
  }

  // packages/media-fields/build-module/caption/index.mjs
  var import_jsx_runtime107 = __toESM(require_jsx_runtime(), 1);
  var captionField = {
    id: "caption",
    type: "text",
    label: (0, import_i18n53.__)("Caption"),
    getValue: ({ item }) => getRawContent(item?.caption),
    render: ({ item }) => getRawContent(item?.caption) || "-",
    Edit: ({ field, onChange, data }) => {
      return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
        import_components23.TextareaControl,
        {
          label: field.label,
          value: getRawContent(data.caption) || "",
          onChange: (value) => onChange({ caption: value }),
          rows: 2
        }
      );
    },
    enableSorting: false,
    filterBy: false
  };
  var caption_default = captionField;

  // packages/media-fields/build-module/date_added/index.mjs
  var import_i18n54 = __toESM(require_i18n(), 1);
  var import_date4 = __toESM(require_date(), 1);
  var dateAddedField = {
    id: "date",
    type: "datetime",
    label: (0, import_i18n54.__)("Date added"),
    filterBy: {
      operators: ["before", "after"]
    },
    format: {
      datetime: (0, import_date4.getSettings)().formats.datetimeAbbreviated
    },
    readOnly: true
  };
  var date_added_default = dateAddedField;

  // packages/media-fields/build-module/description/index.mjs
  var import_i18n55 = __toESM(require_i18n(), 1);
  var import_components24 = __toESM(require_components(), 1);
  var import_jsx_runtime108 = __toESM(require_jsx_runtime(), 1);
  var descriptionField = {
    id: "description",
    type: "text",
    label: (0, import_i18n55.__)("Description"),
    getValue: ({ item }) => getRawContent(item?.description),
    render: ({ item }) => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { children: getRawContent(item?.description) || "-" }),
    Edit: ({ field, onChange, data }) => {
      return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
        import_components24.TextareaControl,
        {
          label: field.label,
          value: getRawContent(data.description) || "",
          onChange: (value) => onChange({ description: value }),
          rows: 5
        }
      );
    },
    enableSorting: false,
    filterBy: false
  };
  var description_default = descriptionField;

  // packages/media-fields/build-module/filename/index.mjs
  var import_i18n56 = __toESM(require_i18n(), 1);
  var import_url10 = __toESM(require_url(), 1);

  // packages/media-fields/build-module/filename/view.mjs
  var import_components25 = __toESM(require_components(), 1);
  var import_element24 = __toESM(require_element(), 1);
  var import_url9 = __toESM(require_url(), 1);
  var import_jsx_runtime109 = __toESM(require_jsx_runtime(), 1);
  var TRUNCATE_LENGTH = 15;
  function FileNameView({
    item
  }) {
    const fileName = (0, import_element24.useMemo)(
      () => item?.source_url ? (0, import_url9.getFilename)(item.source_url) : null,
      [item?.source_url]
    );
    if (!fileName) {
      return "";
    }
    return fileName.length > TRUNCATE_LENGTH ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_components25.Tooltip, { text: fileName, children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_components25.__experimentalTruncate, { limit: TRUNCATE_LENGTH, ellipsizeMode: "tail", children: fileName }) }) : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_jsx_runtime109.Fragment, { children: fileName });
  }

  // packages/media-fields/build-module/filename/index.mjs
  var filenameField = {
    id: "filename",
    type: "text",
    label: (0, import_i18n56.__)("File name"),
    getValue: ({ item }) => (0, import_url10.getFilename)(item?.source_url || ""),
    render: FileNameView,
    enableSorting: false,
    filterBy: false,
    readOnly: true
  };
  var filename_default = filenameField;

  // packages/media-fields/build-module/filesize/index.mjs
  var import_i18n57 = __toESM(require_i18n(), 1);
  var KB_IN_BYTES = 1024;
  var MB_IN_BYTES = 1024 * KB_IN_BYTES;
  var GB_IN_BYTES = 1024 * MB_IN_BYTES;
  var TB_IN_BYTES = 1024 * GB_IN_BYTES;
  var PB_IN_BYTES = 1024 * TB_IN_BYTES;
  var EB_IN_BYTES = 1024 * PB_IN_BYTES;
  var ZB_IN_BYTES = 1024 * EB_IN_BYTES;
  var YB_IN_BYTES = 1024 * ZB_IN_BYTES;
  function getBytesString(bytes, unitSymbol, decimals = 2) {
    return (0, import_i18n57.sprintf)(
      // translators: 1: Actual bytes of a file. 2: The unit symbol (e.g. MB).
      (0, import_i18n57._x)("%1$s %2$s", "file size"),
      bytes.toLocaleString(void 0, {
        minimumFractionDigits: 0,
        maximumFractionDigits: decimals
      }),
      unitSymbol
    );
  }
  function formatFileSize(bytes, decimals = 2) {
    if (bytes === 0) {
      return getBytesString(0, (0, import_i18n57._x)("B", "unit symbol"), decimals);
    }
    const quant = {
      /* translators: Unit symbol for yottabyte. */
      [(0, import_i18n57._x)("YB", "unit symbol")]: YB_IN_BYTES,
      /* translators: Unit symbol for zettabyte. */
      [(0, import_i18n57._x)("ZB", "unit symbol")]: ZB_IN_BYTES,
      /* translators: Unit symbol for exabyte. */
      [(0, import_i18n57._x)("EB", "unit symbol")]: EB_IN_BYTES,
      /* translators: Unit symbol for petabyte. */
      [(0, import_i18n57._x)("PB", "unit symbol")]: PB_IN_BYTES,
      /* translators: Unit symbol for terabyte. */
      [(0, import_i18n57._x)("TB", "unit symbol")]: TB_IN_BYTES,
      /* translators: Unit symbol for gigabyte. */
      [(0, import_i18n57._x)("GB", "unit symbol")]: GB_IN_BYTES,
      /* translators: Unit symbol for megabyte. */
      [(0, import_i18n57._x)("MB", "unit symbol")]: MB_IN_BYTES,
      /* translators: Unit symbol for kilobyte. */
      [(0, import_i18n57._x)("KB", "unit symbol")]: KB_IN_BYTES,
      /* translators: Unit symbol for byte. */
      [(0, import_i18n57._x)("B", "unit symbol")]: 1
    };
    for (const [unit, mag] of Object.entries(quant)) {
      if (bytes >= mag) {
        return getBytesString(bytes / mag, unit, decimals);
      }
    }
    return "";
  }
  var filesizeField = {
    id: "filesize",
    type: "text",
    label: (0, import_i18n57.__)("File size"),
    getValue: ({ item }) => item?.media_details?.filesize ? formatFileSize(item?.media_details?.filesize) : "",
    isVisible: (item) => {
      return !!item?.media_details?.filesize;
    },
    enableSorting: false,
    filterBy: false,
    readOnly: true
  };
  var filesize_default = filesizeField;

  // packages/media-fields/build-module/media_dimensions/index.mjs
  var import_i18n58 = __toESM(require_i18n(), 1);
  var mediaDimensionsField = {
    id: "media_dimensions",
    type: "text",
    label: (0, import_i18n58.__)("Dimensions"),
    getValue: ({ item }) => item?.media_details?.width && item?.media_details?.height ? (0, import_i18n58.sprintf)(
      // translators: 1: Width. 2: Height.
      (0, import_i18n58._x)("%1$s \xD7 %2$s", "image dimensions"),
      item?.media_details?.width?.toString(),
      item?.media_details?.height?.toString()
    ) : "",
    isVisible: (item) => {
      return !!(item?.media_details?.width && item?.media_details?.height);
    },
    enableSorting: false,
    filterBy: false,
    readOnly: true
  };
  var media_dimensions_default = mediaDimensionsField;

  // packages/media-fields/build-module/mime_type/index.mjs
  var import_i18n59 = __toESM(require_i18n(), 1);
  var mimeTypeField = {
    id: "mime_type",
    type: "text",
    label: (0, import_i18n59.__)("File type"),
    getValue: ({ item }) => item?.mime_type || "",
    render: ({ item }) => item?.mime_type || "-",
    // Disable sorting until REST API support for ordering my `mime_type` is added.
    // See: https://core.trac.wordpress.org/ticket/64073
    enableSorting: false,
    filterBy: false,
    readOnly: true
  };
  var mime_type_default = mimeTypeField;

  // packages/editor/build-module/dataviews/fields/content-preview/index.mjs
  var import_i18n121 = __toESM(require_i18n(), 1);

  // packages/editor/build-module/dataviews/fields/content-preview/content-preview-view.mjs
  var import_i18n120 = __toESM(require_i18n(), 1);
  var import_block_editor34 = __toESM(require_block_editor(), 1);
  var import_data71 = __toESM(require_data(), 1);
  var import_core_data51 = __toESM(require_core_data(), 1);

  // packages/editor/build-module/components/provider/index.mjs
  var import_element47 = __toESM(require_element(), 1);
  var import_data55 = __toESM(require_data(), 1);
  var import_i18n74 = __toESM(require_i18n(), 1);
  var import_core_data37 = __toESM(require_core_data(), 1);
  var import_block_editor18 = __toESM(require_block_editor(), 1);
  var import_notices16 = __toESM(require_notices(), 1);
  var import_patterns7 = __toESM(require_patterns(), 1);
  var import_blocks14 = __toESM(require_blocks(), 1);

  // packages/editor/build-module/components/provider/with-registry-provider.mjs
  var import_element25 = __toESM(require_element(), 1);
  var import_data28 = __toESM(require_data(), 1);
  var import_compose5 = __toESM(require_compose(), 1);
  var import_block_editor5 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime110 = __toESM(require_jsx_runtime(), 1);
  function getSubRegistry(subRegistries, registry, useSubRegistry) {
    if (!useSubRegistry) {
      return registry;
    }
    let subRegistry = subRegistries.get(registry);
    if (!subRegistry) {
      subRegistry = (0, import_data28.createRegistry)(
        {
          "core/block-editor": import_block_editor5.storeConfig
        },
        registry
      );
      subRegistry.registerStore("core/editor", storeConfig);
      subRegistries.set(registry, subRegistry);
    }
    return subRegistry;
  }
  var withRegistryProvider = (0, import_compose5.createHigherOrderComponent)(
    (WrappedComponent) => ({ useSubRegistry = true, ...props }) => {
      const registry = (0, import_data28.useRegistry)();
      const [subRegistries] = (0, import_element25.useState)(() => /* @__PURE__ */ new WeakMap());
      const subRegistry = getSubRegistry(
        subRegistries,
        registry,
        useSubRegistry
      );
      if (subRegistry === registry) {
        return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(WrappedComponent, { registry, ...props });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_data28.RegistryProvider, { value: subRegistry, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(WrappedComponent, { registry: subRegistry, ...props }) });
    },
    "withRegistryProvider"
  );
  var with_registry_provider_default = withRegistryProvider;

  // packages/editor/build-module/components/provider/use-block-editor-settings.mjs
  var import_element27 = __toESM(require_element(), 1);
  var import_data33 = __toESM(require_data(), 1);
  var import_core_data29 = __toESM(require_core_data(), 1);
  var import_i18n62 = __toESM(require_i18n(), 1);
  var import_preferences4 = __toESM(require_preferences(), 1);
  var import_compose6 = __toESM(require_compose(), 1);
  var import_blocks8 = __toESM(require_blocks(), 1);
  var import_block_editor7 = __toESM(require_block_editor(), 1);

  // packages/editor/build-module/components/media-categories/index.mjs
  var import_i18n60 = __toESM(require_i18n(), 1);
  var import_data29 = __toESM(require_data(), 1);
  var import_html_entities6 = __toESM(require_html_entities(), 1);
  var import_core_data26 = __toESM(require_core_data(), 1);
  var getExternalLink = (url, text) => `<a ${getExternalLinkAttributes(url)}>${text}</a>`;
  var getExternalLinkAttributes = (url) => `href="${url}" target="_blank" rel="noreferrer noopener"`;
  var getOpenverseLicense = (license, licenseVersion) => {
    let licenseName = license.trim();
    if (license !== "pdm") {
      licenseName = license.toUpperCase().replace("SAMPLING", "Sampling");
    }
    if (licenseVersion) {
      licenseName += ` ${licenseVersion}`;
    }
    if (!["pdm", "cc0"].includes(license)) {
      licenseName = `CC ${licenseName}`;
    }
    return licenseName;
  };
  var getOpenverseCaption = (item) => {
    const {
      title,
      foreign_landing_url: foreignLandingUrl,
      creator,
      creator_url: creatorUrl,
      license,
      license_version: licenseVersion,
      license_url: licenseUrl
    } = item;
    const fullLicense = getOpenverseLicense(license, licenseVersion);
    const _creator = (0, import_html_entities6.decodeEntities)(creator);
    let _caption;
    if (_creator) {
      _caption = title ? (0, import_i18n60.sprintf)(
        // translators: %1s: Title of a media work from Openverse; %2$s: Name of the work's creator; %3s: Work's licence e.g: "CC0 1.0".
        (0, import_i18n60._x)('"%1$s" by %2$s/ %3$s', "caption"),
        getExternalLink(
          foreignLandingUrl,
          (0, import_html_entities6.decodeEntities)(title)
        ),
        creatorUrl ? getExternalLink(creatorUrl, _creator) : _creator,
        licenseUrl ? getExternalLink(
          `${licenseUrl}?ref=openverse`,
          fullLicense
        ) : fullLicense
      ) : (0, import_i18n60.sprintf)(
        // translators: %1s: Link attributes for a given Openverse media work; %2s: Name of the work's creator; %3s: Works's licence e.g: "CC0 1.0".
        (0, import_i18n60._x)("<a %1$s>Work</a> by %2$s/ %3$s", "caption"),
        getExternalLinkAttributes(foreignLandingUrl),
        creatorUrl ? getExternalLink(creatorUrl, _creator) : _creator,
        licenseUrl ? getExternalLink(
          `${licenseUrl}?ref=openverse`,
          fullLicense
        ) : fullLicense
      );
    } else {
      _caption = title ? (0, import_i18n60.sprintf)(
        // translators: %1s: Title of a media work from Openverse; %2s: Work's licence e.g: "CC0 1.0".
        (0, import_i18n60._x)('"%1$s"/ %2$s', "caption"),
        getExternalLink(
          foreignLandingUrl,
          (0, import_html_entities6.decodeEntities)(title)
        ),
        licenseUrl ? getExternalLink(
          `${licenseUrl}?ref=openverse`,
          fullLicense
        ) : fullLicense
      ) : (0, import_i18n60.sprintf)(
        // translators: %1s: Link attributes for a given Openverse media work; %2s: Works's licence e.g: "CC0 1.0".
        (0, import_i18n60._x)("<a %1$s>Work</a>/ %2$s", "caption"),
        getExternalLinkAttributes(foreignLandingUrl),
        licenseUrl ? getExternalLink(
          `${licenseUrl}?ref=openverse`,
          fullLicense
        ) : fullLicense
      );
    }
    return _caption.replace(/\s{2}/g, " ");
  };
  var coreMediaFetch = async (query = {}) => {
    const mediaItems = await (0, import_data29.resolveSelect)(import_core_data26.store).getEntityRecords(
      "postType",
      "attachment",
      {
        ...query,
        orderBy: !!query?.search ? "relevance" : "date"
      }
    );
    return mediaItems.map((mediaItem) => ({
      ...mediaItem,
      alt: mediaItem.alt_text,
      url: mediaItem.source_url,
      previewUrl: mediaItem.media_details?.sizes?.medium?.source_url,
      caption: mediaItem.caption?.raw
    }));
  };
  var inserterMediaCategories = [
    {
      name: "images",
      labels: {
        name: (0, import_i18n60.__)("Images"),
        search_items: (0, import_i18n60.__)("Search images")
      },
      mediaType: "image",
      async fetch(query = {}) {
        return coreMediaFetch({ ...query, media_type: "image" });
      }
    },
    {
      name: "videos",
      labels: {
        name: (0, import_i18n60.__)("Videos"),
        search_items: (0, import_i18n60.__)("Search videos")
      },
      mediaType: "video",
      async fetch(query = {}) {
        return coreMediaFetch({ ...query, media_type: "video" });
      }
    },
    {
      name: "audio",
      labels: {
        name: (0, import_i18n60.__)("Audio"),
        search_items: (0, import_i18n60.__)("Search audio")
      },
      mediaType: "audio",
      async fetch(query = {}) {
        return coreMediaFetch({ ...query, media_type: "audio" });
      }
    },
    {
      name: "openverse",
      labels: {
        name: (0, import_i18n60.__)("Openverse"),
        search_items: (0, import_i18n60.__)("Search Openverse")
      },
      mediaType: "image",
      async fetch(query = {}) {
        const defaultArgs = {
          mature: false,
          excluded_source: "flickr,inaturalist,wikimedia",
          license: "pdm,cc0"
        };
        const finalQuery = { ...query, ...defaultArgs };
        const mapFromInserterMediaRequest = {
          per_page: "page_size",
          search: "q"
        };
        const url = new URL("https://api.openverse.org/v1/images/");
        Object.entries(finalQuery).forEach(([key, value]) => {
          const queryKey = mapFromInserterMediaRequest[key] || key;
          url.searchParams.set(queryKey, value);
        });
        const response = await window.fetch(url, {
          headers: {
            "User-Agent": "WordPress/inserter-media-fetch"
          }
        });
        const jsonResponse = await response.json();
        const results = jsonResponse.results;
        return results.map((result) => ({
          ...result,
          // This is a temp solution for better titles, until Openverse API
          // completes the cleaning up of some titles of their upstream data.
          title: result.title?.toLowerCase().startsWith("file:") ? result.title.slice(5) : result.title,
          sourceId: result.id,
          id: void 0,
          caption: getOpenverseCaption(result),
          previewUrl: result.thumbnail
        }));
      },
      getReportUrl: ({ sourceId }) => `https://wordpress.org/openverse/image/${sourceId}/report/`,
      isExternalResource: true
    }
  ];
  var media_categories_default = inserterMediaCategories;

  // packages/editor/build-module/utils/media-upload/on-success.mjs
  var import_data30 = __toESM(require_data(), 1);
  var import_core_data27 = __toESM(require_core_data(), 1);
  function mediaUploadOnSuccess(attachments) {
    const { invalidateResolution } = (0, import_data30.dispatch)(import_core_data27.store);
    for (const attachment of attachments) {
      if (attachment.id) {
        invalidateResolution("getEntityRecord", [
          "postType",
          "attachment",
          attachment.id,
          { context: "view" }
        ]);
        invalidateResolution("getEntityRecord", [
          "postType",
          "attachment",
          attachment.id
        ]);
      }
    }
  }

  // packages/editor/build-module/utils/media-sideload/index.mjs
  var import_media_utils3 = __toESM(require_media_utils(), 1);
  var { sideloadMedia: mediaSideload } = unlock(import_media_utils3.privateApis);
  var media_sideload_default = mediaSideload;

  // packages/editor/build-module/utils/media-finalize/index.mjs
  var import_api_fetch3 = __toESM(require_api_fetch(), 1);
  async function mediaFinalize(id) {
    await (0, import_api_fetch3.default)({
      path: `/wp/v2/media/${id}/finalize`,
      method: "POST"
    });
  }

  // packages/editor/build-module/components/global-styles-provider/index.mjs
  var import_block_editor6 = __toESM(require_block_editor(), 1);
  var import_core_data28 = __toESM(require_core_data(), 1);
  var import_data32 = __toESM(require_data(), 1);
  var import_element26 = __toESM(require_element(), 1);

  // packages/global-styles-engine/build-module/utils/object.mjs
  function setImmutably(object, path, value) {
    path = Array.isArray(path) ? [...path] : [path];
    object = Array.isArray(object) ? [...object] : { ...object };
    const leaf = path.pop();
    let prev = object;
    for (const key of path) {
      const lvl = prev[key];
      prev = prev[key] = Array.isArray(lvl) ? [...lvl] : { ...lvl };
    }
    prev[leaf] = value;
    return object;
  }
  var getValueFromObjectPath = (object, path, defaultValue) => {
    const arrayPath = Array.isArray(path) ? path : path.split(".");
    let value = object;
    arrayPath.forEach((fieldName) => {
      value = value?.[fieldName];
    });
    return value ?? defaultValue;
  };

  // packages/global-styles-engine/build-module/settings/get-setting.mjs
  var VALID_SETTINGS = [
    "appearanceTools",
    "useRootPaddingAwareAlignments",
    "background.backgroundImage",
    "background.backgroundRepeat",
    "background.backgroundSize",
    "background.backgroundPosition",
    "border.color",
    "border.radius",
    "border.radiusSizes",
    "border.style",
    "border.width",
    "shadow.presets",
    "shadow.defaultPresets",
    "color.background",
    "color.button",
    "color.caption",
    "color.custom",
    "color.customDuotone",
    "color.customGradient",
    "color.defaultDuotone",
    "color.defaultGradients",
    "color.defaultPalette",
    "color.duotone",
    "color.gradients",
    "color.heading",
    "color.link",
    "color.palette",
    "color.text",
    "custom",
    "dimensions.aspectRatio",
    "dimensions.height",
    "dimensions.minHeight",
    "dimensions.width",
    "dimensions.dimensionSizes",
    "layout.contentSize",
    "layout.definitions",
    "layout.wideSize",
    "lightbox.enabled",
    "lightbox.allowEditing",
    "position.fixed",
    "position.sticky",
    "spacing.customSpacingSize",
    "spacing.defaultSpacingSizes",
    "spacing.spacingSizes",
    "spacing.spacingScale",
    "spacing.blockGap",
    "spacing.margin",
    "spacing.padding",
    "spacing.units",
    "typography.fluid",
    "typography.customFontSize",
    "typography.defaultFontSizes",
    "typography.dropCap",
    "typography.fontFamilies",
    "typography.fontSizes",
    "typography.fontStyle",
    "typography.fontWeight",
    "typography.letterSpacing",
    "typography.lineHeight",
    "typography.textAlign",
    "typography.textColumns",
    "typography.textDecoration",
    "typography.textIndent",
    "typography.textTransform",
    "typography.writingMode"
  ];
  function getSetting(globalStyles, path, blockName) {
    const appendedBlockPath = blockName ? ".blocks." + blockName : "";
    const appendedPropertyPath = path ? "." + path : "";
    const contextualPath = `settings${appendedBlockPath}${appendedPropertyPath}`;
    const globalPath = `settings${appendedPropertyPath}`;
    if (path) {
      return getValueFromObjectPath(globalStyles, contextualPath) ?? getValueFromObjectPath(globalStyles, globalPath);
    }
    let result = {};
    VALID_SETTINGS.forEach((setting) => {
      const value = getValueFromObjectPath(
        globalStyles,
        `settings${appendedBlockPath}.${setting}`
      ) ?? getValueFromObjectPath(globalStyles, `settings.${setting}`);
      if (value !== void 0) {
        result = setImmutably(result, setting.split("."), value);
      }
    });
    return result;
  }

  // packages/global-styles-engine/build-module/settings/set-setting.mjs
  function setSetting(globalStyles, path, newValue, blockName) {
    const appendedBlockPath = blockName ? ".blocks." + blockName : "";
    const appendedPropertyPath = path ? "." + path : "";
    const finalPath = `settings${appendedBlockPath}${appendedPropertyPath}`;
    return setImmutably(
      globalStyles,
      finalPath.split("."),
      newValue
    );
  }

  // packages/global-styles-engine/build-module/utils/common.mjs
  var import_style_engine = __toESM(require_style_engine(), 1);

  // packages/global-styles-engine/build-module/utils/fluid.mjs
  var DEFAULT_MAXIMUM_VIEWPORT_WIDTH = "1600px";
  var DEFAULT_MINIMUM_VIEWPORT_WIDTH = "320px";
  var DEFAULT_SCALE_FACTOR = 1;
  var DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN = 0.25;
  var DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX = 0.75;
  var DEFAULT_MINIMUM_FONT_SIZE_LIMIT = "14px";
  function getComputedFluidTypographyValue({
    minimumFontSize,
    maximumFontSize,
    fontSize,
    minimumViewportWidth = DEFAULT_MINIMUM_VIEWPORT_WIDTH,
    maximumViewportWidth = DEFAULT_MAXIMUM_VIEWPORT_WIDTH,
    scaleFactor = DEFAULT_SCALE_FACTOR,
    minimumFontSizeLimit
  }) {
    minimumFontSizeLimit = !!getTypographyValueAndUnit(minimumFontSizeLimit) ? minimumFontSizeLimit : DEFAULT_MINIMUM_FONT_SIZE_LIMIT;
    if (fontSize) {
      const fontSizeParsed = getTypographyValueAndUnit(fontSize);
      if (!fontSizeParsed?.unit || !fontSizeParsed?.value) {
        return null;
      }
      const minimumFontSizeLimitParsed = getTypographyValueAndUnit(
        minimumFontSizeLimit,
        {
          coerceTo: fontSizeParsed.unit
        }
      );
      if (!!minimumFontSizeLimitParsed?.value && !minimumFontSize && !maximumFontSize) {
        if (fontSizeParsed?.value <= minimumFontSizeLimitParsed?.value) {
          return null;
        }
      }
      if (!maximumFontSize) {
        maximumFontSize = `${fontSizeParsed.value}${fontSizeParsed.unit}`;
      }
      if (!minimumFontSize) {
        const fontSizeValueInPx = fontSizeParsed.unit === "px" ? fontSizeParsed.value : fontSizeParsed.value * 16;
        const minimumFontSizeFactor = Math.min(
          Math.max(
            1 - 0.075 * Math.log2(fontSizeValueInPx),
            DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN
          ),
          DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX
        );
        const calculatedMinimumFontSize = roundToPrecision(
          fontSizeParsed.value * minimumFontSizeFactor,
          3
        );
        if (!!minimumFontSizeLimitParsed?.value && calculatedMinimumFontSize < minimumFontSizeLimitParsed?.value) {
          minimumFontSize = `${minimumFontSizeLimitParsed.value}${minimumFontSizeLimitParsed.unit}`;
        } else {
          minimumFontSize = `${calculatedMinimumFontSize}${fontSizeParsed.unit}`;
        }
      }
    }
    const minimumFontSizeParsed = getTypographyValueAndUnit(minimumFontSize);
    const fontSizeUnit = minimumFontSizeParsed?.unit || "rem";
    const maximumFontSizeParsed = getTypographyValueAndUnit(maximumFontSize, {
      coerceTo: fontSizeUnit
    });
    if (!minimumFontSizeParsed || !maximumFontSizeParsed) {
      return null;
    }
    const minimumFontSizeRem = getTypographyValueAndUnit(minimumFontSize, {
      coerceTo: "rem"
    });
    const maximumViewportWidthParsed = getTypographyValueAndUnit(
      maximumViewportWidth,
      { coerceTo: fontSizeUnit }
    );
    const minimumViewportWidthParsed = getTypographyValueAndUnit(
      minimumViewportWidth,
      { coerceTo: fontSizeUnit }
    );
    if (!maximumViewportWidthParsed || !minimumViewportWidthParsed || !minimumFontSizeRem) {
      return null;
    }
    const linearDenominator = maximumViewportWidthParsed.value - minimumViewportWidthParsed.value;
    if (!linearDenominator) {
      return null;
    }
    const minViewportWidthOffsetValue = roundToPrecision(
      minimumViewportWidthParsed.value / 100,
      3
    );
    const viewportWidthOffset = roundToPrecision(minViewportWidthOffsetValue, 3) + fontSizeUnit;
    const linearFactor = 100 * ((maximumFontSizeParsed.value - minimumFontSizeParsed.value) / linearDenominator);
    const linearFactorScaled = roundToPrecision(
      (linearFactor || 1) * scaleFactor,
      3
    );
    const fluidTargetFontSize = `${minimumFontSizeRem.value}${minimumFontSizeRem.unit} + ((1vw - ${viewportWidthOffset}) * ${linearFactorScaled})`;
    return `clamp(${minimumFontSize}, ${fluidTargetFontSize}, ${maximumFontSize})`;
  }
  function getTypographyValueAndUnit(rawValue, options = {}) {
    if (typeof rawValue !== "string" && typeof rawValue !== "number") {
      return null;
    }
    if (isFinite(rawValue)) {
      rawValue = `${rawValue}px`;
    }
    const { coerceTo, rootSizeValue, acceptableUnits } = {
      coerceTo: "",
      // Default browser font size. Later we could inject some JS to compute this `getComputedStyle( document.querySelector( "html" ) ).fontSize`.
      rootSizeValue: 16,
      acceptableUnits: ["rem", "px", "em"],
      ...options
    };
    const acceptableUnitsGroup = acceptableUnits?.join("|");
    const regexUnits = new RegExp(
      `^(\\d*\\.?\\d+)(${acceptableUnitsGroup}){1,1}$`
    );
    const matches = rawValue.toString().match(regexUnits);
    if (!matches || matches.length < 3) {
      return null;
    }
    let [, value, unit] = matches;
    let returnValue = parseFloat(value);
    if ("px" === coerceTo && ("em" === unit || "rem" === unit)) {
      returnValue = returnValue * rootSizeValue;
      unit = coerceTo;
    }
    if ("px" === unit && ("em" === coerceTo || "rem" === coerceTo)) {
      returnValue = returnValue / rootSizeValue;
      unit = coerceTo;
    }
    if (("em" === coerceTo || "rem" === coerceTo) && ("em" === unit || "rem" === unit)) {
      unit = coerceTo;
    }
    if (!unit) {
      return null;
    }
    return {
      value: roundToPrecision(returnValue, 3),
      unit
    };
  }
  function roundToPrecision(value, digits = 3) {
    const base = Math.pow(10, digits);
    return Math.round(value * base) / base;
  }

  // packages/global-styles-engine/build-module/utils/typography.mjs
  function isFluidTypographyEnabled(typographySettings) {
    const fluidSettings = typographySettings?.fluid;
    return true === fluidSettings || fluidSettings && typeof fluidSettings === "object" && Object.keys(fluidSettings).length > 0;
  }
  function getFluidTypographyOptionsFromSettings(settings) {
    const typographySettings = settings?.typography ?? {};
    const layoutSettings = settings?.layout;
    const defaultMaxViewportWidth = getTypographyValueAndUnit(
      layoutSettings?.wideSize
    ) ? layoutSettings?.wideSize : null;
    return isFluidTypographyEnabled(typographySettings) && defaultMaxViewportWidth ? {
      fluid: {
        maxViewportWidth: defaultMaxViewportWidth,
        ...typeof typographySettings.fluid === "object" ? typographySettings.fluid : {}
      }
    } : {
      fluid: typographySettings?.fluid
    };
  }
  function getTypographyFontSizeValue(preset, settings) {
    const { size: defaultSize } = preset;
    if (!defaultSize || "0" === defaultSize || false === preset?.fluid) {
      return defaultSize;
    }
    if (!isFluidTypographyEnabled(settings?.typography) && !isFluidTypographyEnabled(preset)) {
      return defaultSize;
    }
    const fluidTypographySettings = getFluidTypographyOptionsFromSettings(settings)?.fluid ?? {};
    const fluidFontSizeValue = getComputedFluidTypographyValue({
      minimumFontSize: typeof preset?.fluid === "boolean" ? void 0 : preset?.fluid?.min,
      maximumFontSize: typeof preset?.fluid === "boolean" ? void 0 : preset?.fluid?.max,
      fontSize: defaultSize,
      minimumFontSizeLimit: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.minFontSize : void 0,
      maximumViewportWidth: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.maxViewportWidth : void 0,
      minimumViewportWidth: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.minViewportWidth : void 0
    });
    if (!!fluidFontSizeValue) {
      return fluidFontSizeValue;
    }
    return defaultSize;
  }

  // packages/global-styles-engine/build-module/utils/common.mjs
  var ROOT_BLOCK_SELECTOR = "body";
  var ROOT_CSS_PROPERTIES_SELECTOR = ":root";
  var PRESET_METADATA = [
    {
      path: ["color", "palette"],
      valueKey: "color",
      cssVarInfix: "color",
      classes: [
        { classSuffix: "color", propertyName: "color" },
        {
          classSuffix: "background-color",
          propertyName: "background-color"
        },
        {
          classSuffix: "border-color",
          propertyName: "border-color"
        }
      ]
    },
    {
      path: ["color", "gradients"],
      valueKey: "gradient",
      cssVarInfix: "gradient",
      classes: [
        {
          classSuffix: "gradient-background",
          propertyName: "background"
        }
      ]
    },
    {
      path: ["color", "duotone"],
      valueKey: "colors",
      cssVarInfix: "duotone",
      valueFunc: ({ slug }) => `url( '#wp-duotone-${slug}' )`,
      classes: []
    },
    {
      path: ["shadow", "presets"],
      valueKey: "shadow",
      cssVarInfix: "shadow",
      classes: []
    },
    {
      path: ["typography", "fontSizes"],
      valueFunc: (preset, settings) => getTypographyFontSizeValue(preset, settings),
      valueKey: "size",
      cssVarInfix: "font-size",
      classes: [{ classSuffix: "font-size", propertyName: "font-size" }]
    },
    {
      path: ["typography", "fontFamilies"],
      valueKey: "fontFamily",
      cssVarInfix: "font-family",
      classes: [
        { classSuffix: "font-family", propertyName: "font-family" }
      ]
    },
    {
      path: ["spacing", "spacingSizes"],
      valueKey: "size",
      cssVarInfix: "spacing",
      valueFunc: ({ size: size3 }) => size3,
      classes: []
    },
    {
      path: ["border", "radiusSizes"],
      valueKey: "size",
      cssVarInfix: "border-radius",
      classes: []
    },
    {
      path: ["dimensions", "dimensionSizes"],
      valueKey: "size",
      cssVarInfix: "dimension",
      classes: []
    }
  ];
  function scopeSelector(scope, selector) {
    if (!scope || !selector) {
      return selector;
    }
    const scopes = scope.split(",");
    const selectors = selector.split(",");
    const selectorsScoped = [];
    scopes.forEach((outer) => {
      selectors.forEach((inner) => {
        selectorsScoped.push(`${outer.trim()} ${inner.trim()}`);
      });
    });
    return selectorsScoped.join(", ");
  }
  function scopeFeatureSelectors(scope, selectors) {
    if (!scope || !selectors) {
      return;
    }
    const featureSelectors = {};
    Object.entries(selectors).forEach(([feature, selector]) => {
      if (typeof selector === "string") {
        featureSelectors[feature] = scopeSelector(scope, selector);
      }
      if (typeof selector === "object") {
        featureSelectors[feature] = {};
        Object.entries(selector).forEach(
          ([subfeature, subfeatureSelector]) => {
            featureSelectors[feature][subfeature] = scopeSelector(
              scope,
              subfeatureSelector
            );
          }
        );
      }
    });
    return featureSelectors;
  }
  function appendToSelector(selector, toAppend) {
    if (!selector.includes(",")) {
      return selector + toAppend;
    }
    const selectors = selector.split(",");
    const newSelectors = selectors.map((sel) => sel + toAppend);
    return newSelectors.join(",");
  }
  function getBlockStyleVariationSelector(variation, blockSelector) {
    const variationClass = `.is-style-${variation}`;
    if (!blockSelector) {
      return variationClass;
    }
    const ancestorRegex = /((?::\([^)]+\))?\s*)([^\s:]+)/;
    const addVariationClass = (_match, group1, group2) => {
      return group1 + group2 + variationClass;
    };
    const result = blockSelector.split(",").map((part) => part.replace(ancestorRegex, addVariationClass));
    return result.join(",");
  }
  function getResolvedRefValue(ruleValue, tree) {
    if (!ruleValue || !tree) {
      return ruleValue;
    }
    if (typeof ruleValue === "object" && "ref" in ruleValue && ruleValue?.ref) {
      const resolvedRuleValue = (0, import_style_engine.getCSSValueFromRawStyle)(
        getValueFromObjectPath(tree, ruleValue.ref)
      );
      if (typeof resolvedRuleValue === "object" && resolvedRuleValue !== null && "ref" in resolvedRuleValue && resolvedRuleValue?.ref) {
        return void 0;
      }
      if (resolvedRuleValue === void 0) {
        return ruleValue;
      }
      return resolvedRuleValue;
    }
    return ruleValue;
  }
  function getResolvedThemeFilePath(file, themeFileURIs) {
    if (!file || !themeFileURIs || !Array.isArray(themeFileURIs)) {
      return file;
    }
    const uri = themeFileURIs.find(
      (themeFileUri) => themeFileUri?.name === file
    );
    if (!uri?.href) {
      return file;
    }
    return uri?.href;
  }
  function getResolvedValue(ruleValue, tree) {
    if (!ruleValue || !tree) {
      return ruleValue;
    }
    const resolvedValue = getResolvedRefValue(ruleValue, tree);
    if (typeof resolvedValue === "object" && resolvedValue !== null && "url" in resolvedValue && resolvedValue?.url) {
      resolvedValue.url = getResolvedThemeFilePath(
        resolvedValue.url,
        tree?._links?.["wp:theme-file"]
      );
    }
    return resolvedValue;
  }
  function findInPresetsBy(settings, blockName, presetPath = [], presetProperty = "slug", presetValueValue) {
    const orderedPresetsByOrigin = [
      blockName ? getValueFromObjectPath(settings, [
        "blocks",
        blockName,
        ...presetPath
      ]) : void 0,
      getValueFromObjectPath(settings, presetPath)
    ].filter(Boolean);
    for (const presetByOrigin of orderedPresetsByOrigin) {
      if (presetByOrigin) {
        const origins = ["custom", "theme", "default"];
        for (const origin of origins) {
          const presets = presetByOrigin[origin];
          if (presets) {
            const presetObject = presets.find(
              (preset) => preset[presetProperty] === presetValueValue
            );
            if (presetObject) {
              if (presetProperty === "slug") {
                return presetObject;
              }
              const highestPresetObjectWithSameSlug = findInPresetsBy(
                settings,
                blockName,
                presetPath,
                "slug",
                presetObject.slug
              );
              if (highestPresetObjectWithSameSlug[presetProperty] === presetObject[presetProperty]) {
                return presetObject;
              }
              return void 0;
            }
          }
        }
      }
    }
  }
  function getValueFromPresetVariable(features, blockName, variable, [presetType, slug] = []) {
    const metadata = PRESET_METADATA.find(
      (data) => data.cssVarInfix === presetType
    );
    if (!metadata || !features.settings) {
      return variable;
    }
    const presetObject = findInPresetsBy(
      features.settings,
      blockName,
      metadata.path,
      "slug",
      slug
    );
    if (presetObject) {
      const { valueKey } = metadata;
      const result = presetObject[valueKey];
      return getValueFromVariable(features, blockName, result);
    }
    return variable;
  }
  function getValueFromCustomVariable(features, blockName, variable, path = []) {
    const result = (blockName ? getValueFromObjectPath(features?.settings ?? {}, [
      "blocks",
      blockName,
      "custom",
      ...path
    ]) : void 0) ?? getValueFromObjectPath(features?.settings ?? {}, [
      "custom",
      ...path
    ]);
    if (!result) {
      return variable;
    }
    return getValueFromVariable(features, blockName, result);
  }
  function getValueFromVariable(features, blockName, variable) {
    if (!variable || typeof variable !== "string") {
      if (typeof variable === "object" && variable !== null && "ref" in variable && typeof variable.ref === "string") {
        const resolvedVariable = getValueFromObjectPath(
          features,
          variable.ref
        );
        if (!resolvedVariable || typeof resolvedVariable === "object" && "ref" in resolvedVariable) {
          return resolvedVariable;
        }
        variable = resolvedVariable;
      } else {
        return variable;
      }
    }
    const USER_VALUE_PREFIX = "var:";
    const THEME_VALUE_PREFIX = "var(--wp--";
    const THEME_VALUE_SUFFIX = ")";
    let parsedVar;
    if (variable.startsWith(USER_VALUE_PREFIX)) {
      parsedVar = variable.slice(USER_VALUE_PREFIX.length).split("|");
    } else if (variable.startsWith(THEME_VALUE_PREFIX) && variable.endsWith(THEME_VALUE_SUFFIX)) {
      parsedVar = variable.slice(THEME_VALUE_PREFIX.length, -THEME_VALUE_SUFFIX.length).split("--");
    } else {
      return variable;
    }
    const [type, ...path] = parsedVar;
    if (type === "preset") {
      return getValueFromPresetVariable(
        features,
        blockName,
        variable,
        path
      );
    }
    if (type === "custom") {
      return getValueFromCustomVariable(
        features,
        blockName,
        variable,
        path
      );
    }
    return variable;
  }

  // packages/global-styles-engine/build-module/settings/get-style.mjs
  function getStyle(globalStyles, path, blockName, shouldDecodeEncode = true) {
    const appendedPath = path ? "." + path : "";
    const finalPath = !blockName ? `styles${appendedPath}` : `styles.blocks.${blockName}${appendedPath}`;
    if (!globalStyles) {
      return void 0;
    }
    const rawResult = getValueFromObjectPath(globalStyles, finalPath);
    const result = shouldDecodeEncode ? getValueFromVariable(globalStyles, blockName, rawResult) : rawResult;
    return result;
  }

  // packages/global-styles-engine/build-module/settings/set-style.mjs
  function setStyle(globalStyles, path, newValue, blockName) {
    const appendedPath = path ? "." + path : "";
    const finalPath = !blockName ? `styles${appendedPath}` : `styles.blocks.${blockName}${appendedPath}`;
    return setImmutably(
      globalStyles,
      finalPath.split("."),
      newValue
    );
  }

  // packages/global-styles-engine/build-module/core/equal.mjs
  var import_es6 = __toESM(require_es6(), 1);
  function areGlobalStylesEqual(original, variation) {
    if (typeof original !== "object" || typeof variation !== "object") {
      return original === variation;
    }
    return (0, import_es6.default)(original?.styles, variation?.styles) && (0, import_es6.default)(original?.settings, variation?.settings);
  }

  // packages/global-styles-engine/build-module/core/merge.mjs
  var import_deepmerge = __toESM(require_cjs(), 1);

  // node_modules/is-plain-object/dist/is-plain-object.mjs
  function isObject(o4) {
    return Object.prototype.toString.call(o4) === "[object Object]";
  }
  function isPlainObject(o4) {
    var ctor, prot;
    if (isObject(o4) === false) return false;
    ctor = o4.constructor;
    if (ctor === void 0) return true;
    prot = ctor.prototype;
    if (isObject(prot) === false) return false;
    if (prot.hasOwnProperty("isPrototypeOf") === false) {
      return false;
    }
    return true;
  }

  // packages/global-styles-engine/build-module/core/merge.mjs
  function mergeGlobalStyles(base, user) {
    return (0, import_deepmerge.default)(base, user, {
      /*
       * We only pass as arrays the presets,
       * in which case we want the new array of values
       * to override the old array (no merging).
       */
      isMergeableObject: isPlainObject,
      /*
       * Exceptions to the above rule.
       * Background images should be replaced, not merged,
       * as they themselves are specific object definitions for the style.
       */
      customMerge: (key) => {
        if (key === "backgroundImage") {
          return (baseConfig, userConfig) => userConfig ?? baseConfig;
        }
        return void 0;
      }
    });
  }

  // node_modules/memize/dist/index.js
  function memize(fn, options) {
    var size3 = 0;
    var head2;
    var tail;
    options = options || {};
    function memoized() {
      var node = head2, len = arguments.length, args, i3;
      searchCache: while (node) {
        if (node.args.length !== arguments.length) {
          node = node.next;
          continue;
        }
        for (i3 = 0; i3 < len; i3++) {
          if (node.args[i3] !== arguments[i3]) {
            node = node.next;
            continue searchCache;
          }
        }
        if (node !== head2) {
          if (node === tail) {
            tail = node.prev;
          }
          node.prev.next = node.next;
          if (node.next) {
            node.next.prev = node.prev;
          }
          node.next = head2;
          node.prev = null;
          head2.prev = node;
          head2 = node;
        }
        return node.val;
      }
      args = new Array(len);
      for (i3 = 0; i3 < len; i3++) {
        args[i3] = arguments[i3];
      }
      node = {
        args,
        // Generate the result from original function
        val: fn.apply(null, args)
      };
      if (head2) {
        head2.prev = node;
        node.next = head2;
      } else {
        tail = node;
      }
      if (size3 === /** @type {MemizeOptions} */
      options.maxSize) {
        tail = /** @type {MemizeCacheNode} */
        tail.prev;
        tail.next = null;
      } else {
        size3++;
      }
      head2 = node;
      return node.val;
    }
    memoized.clear = function() {
      head2 = null;
      tail = null;
      size3 = 0;
    };
    return memoized;
  }

  // packages/global-styles-engine/build-module/utils/get-global-styles-changes.mjs
  var import_i18n61 = __toESM(require_i18n(), 1);
  var import_blocks6 = __toESM(require_blocks(), 1);
  var globalStylesChangesCache = /* @__PURE__ */ new Map();
  var EMPTY_ARRAY3 = [];
  var translationMap = {
    caption: (0, import_i18n61.__)("Caption"),
    link: (0, import_i18n61.__)("Link"),
    button: (0, import_i18n61.__)("Button"),
    heading: (0, import_i18n61.__)("Heading"),
    h1: (0, import_i18n61.__)("H1"),
    h2: (0, import_i18n61.__)("H2"),
    h3: (0, import_i18n61.__)("H3"),
    h4: (0, import_i18n61.__)("H4"),
    h5: (0, import_i18n61.__)("H5"),
    h6: (0, import_i18n61.__)("H6"),
    "settings.color": (0, import_i18n61.__)("Color"),
    "settings.typography": (0, import_i18n61.__)("Typography"),
    "settings.shadow": (0, import_i18n61.__)("Shadow"),
    "settings.layout": (0, import_i18n61.__)("Layout"),
    "styles.color": (0, import_i18n61.__)("Colors"),
    "styles.spacing": (0, import_i18n61.__)("Spacing"),
    "styles.background": (0, import_i18n61.__)("Background"),
    "styles.typography": (0, import_i18n61.__)("Typography")
  };
  var getBlockNames = memize(
    () => (0, import_blocks6.getBlockTypes)().reduce(
      (accumulator, {
        name: name2,
        title
      }) => {
        accumulator[name2] = title;
        return accumulator;
      },
      {}
    )
  );
  var isObject2 = (obj) => obj !== null && typeof obj === "object";
  function getTranslation(key) {
    if (translationMap[key]) {
      return translationMap[key];
    }
    const keyArray = key.split(".");
    if (keyArray?.[0] === "blocks") {
      const blockName = getBlockNames()?.[keyArray[1]];
      return blockName || keyArray[1];
    }
    if (keyArray?.[0] === "elements") {
      return translationMap[keyArray[1]] || keyArray[1];
    }
    return void 0;
  }
  function deepCompare(changedObject, originalObject, parentPath = "") {
    if (!isObject2(changedObject) && !isObject2(originalObject)) {
      return changedObject !== originalObject ? parentPath.split(".").slice(0, 2).join(".") : void 0;
    }
    changedObject = isObject2(changedObject) ? changedObject : {};
    originalObject = isObject2(originalObject) ? originalObject : {};
    const allKeys = /* @__PURE__ */ new Set([
      ...Object.keys(changedObject),
      ...Object.keys(originalObject)
    ]);
    let diffs = [];
    for (const key of allKeys) {
      const path = parentPath ? parentPath + "." + key : key;
      const changedPath = deepCompare(
        changedObject[key],
        originalObject[key],
        path
      );
      if (changedPath) {
        diffs = diffs.concat(changedPath);
      }
    }
    return diffs;
  }
  function getGlobalStylesChangelist(next, previous) {
    const cacheKey2 = JSON.stringify({ next, previous });
    if (globalStylesChangesCache.has(cacheKey2)) {
      return globalStylesChangesCache.get(cacheKey2);
    }
    const changedValueTree = deepCompare(
      {
        styles: {
          background: next?.styles?.background,
          color: next?.styles?.color,
          typography: next?.styles?.typography,
          spacing: next?.styles?.spacing
        },
        blocks: next?.styles?.blocks,
        elements: next?.styles?.elements,
        settings: next?.settings
      },
      {
        styles: {
          background: previous?.styles?.background,
          color: previous?.styles?.color,
          typography: previous?.styles?.typography,
          spacing: previous?.styles?.spacing
        },
        blocks: previous?.styles?.blocks,
        elements: previous?.styles?.elements,
        settings: previous?.settings
      }
    );
    if (!changedValueTree || Array.isArray(changedValueTree) && !changedValueTree.length) {
      globalStylesChangesCache.set(cacheKey2, []);
      return [];
    }
    const changedValueArray = Array.isArray(changedValueTree) ? changedValueTree : [changedValueTree];
    const result = [...new Set(changedValueArray)].reduce((acc, curr) => {
      const translation = getTranslation(curr);
      if (translation) {
        acc.push([curr.split(".")[0], translation]);
      }
      return acc;
    }, []);
    globalStylesChangesCache.set(cacheKey2, result);
    return result;
  }
  function getGlobalStylesChanges(next, previous, options = {}) {
    let changeList = getGlobalStylesChangelist(next, previous);
    const changesLength = changeList.length;
    const { maxResults } = options;
    if (changesLength) {
      if (!!maxResults && changesLength > maxResults) {
        changeList = changeList.slice(0, maxResults);
      }
      return Object.entries(
        changeList.reduce((acc, curr) => {
          const group = acc[curr[0]] || [];
          if (!group.includes(curr[1])) {
            acc[curr[0]] = [...group, curr[1]];
          }
          return acc;
        }, {})
      ).map(([key, changeValues]) => {
        const changeValuesLength = changeValues.length;
        const joinedChangesValue = changeValues.join(
          /* translators: Used between list items, there is a space after the comma. */
          (0, import_i18n61.__)(", ")
          // eslint-disable-line @wordpress/i18n-no-flanking-whitespace
        );
        switch (key) {
          case "blocks": {
            return (0, import_i18n61.sprintf)(
              // translators: %s: a list of block names separated by a comma.
              (0, import_i18n61._n)("%s block.", "%s blocks.", changeValuesLength),
              joinedChangesValue
            );
          }
          case "elements": {
            return (0, import_i18n61.sprintf)(
              // translators: %s: a list of element names separated by a comma.
              (0, import_i18n61._n)("%s element.", "%s elements.", changeValuesLength),
              joinedChangesValue
            );
          }
          case "settings": {
            return (0, import_i18n61.sprintf)(
              // translators: %s: a list of theme.json setting labels separated by a comma.
              (0, import_i18n61.__)("%s settings."),
              joinedChangesValue
            );
          }
          case "styles": {
            return (0, import_i18n61.sprintf)(
              // translators: %s: a list of theme.json top-level styles labels separated by a comma.
              (0, import_i18n61.__)("%s styles."),
              joinedChangesValue
            );
          }
          default: {
            return (0, import_i18n61.sprintf)(
              // translators: %s: a list of global styles changes separated by a comma.
              (0, import_i18n61.__)("%s."),
              joinedChangesValue
            );
          }
        }
      });
    }
    return EMPTY_ARRAY3;
  }

  // packages/global-styles-engine/build-module/core/render.mjs
  var import_blocks7 = __toESM(require_blocks(), 1);
  var import_style_engine2 = __toESM(require_style_engine(), 1);
  var import_data31 = __toESM(require_data(), 1);

  // packages/global-styles-engine/build-module/core/selectors.mjs
  function getBlockSelector(blockType, target = "root", options = {}) {
    if (!target) {
      return null;
    }
    const { fallback = false } = options;
    const { name: name2, selectors, supports } = blockType;
    const hasSelectors = selectors && Object.keys(selectors).length > 0;
    const path = Array.isArray(target) ? target.join(".") : target;
    let rootSelector = null;
    if (hasSelectors && selectors.root) {
      rootSelector = selectors?.root;
    } else if (supports?.__experimentalSelector) {
      rootSelector = supports.__experimentalSelector;
    } else {
      rootSelector = ".wp-block-" + name2.replace("core/", "").replace("/", "-");
    }
    if (path === "root") {
      return rootSelector;
    }
    const pathArray = Array.isArray(target) ? target : target.split(".");
    if (pathArray.length === 1) {
      const fallbackSelector = fallback ? rootSelector : null;
      if (hasSelectors) {
        const featureSelector2 = getValueFromObjectPath(
          selectors,
          `${path}.root`,
          null
        ) || getValueFromObjectPath(selectors, path, null);
        return featureSelector2 || fallbackSelector;
      }
      const featureSelector = supports ? getValueFromObjectPath(
        supports,
        `${path}.__experimentalSelector`,
        null
      ) : void 0;
      if (!featureSelector) {
        return fallbackSelector;
      }
      return scopeSelector(rootSelector, featureSelector);
    }
    let subfeatureSelector;
    if (hasSelectors) {
      subfeatureSelector = getValueFromObjectPath(selectors, path, null);
    }
    if (subfeatureSelector) {
      return subfeatureSelector;
    }
    if (fallback) {
      return getBlockSelector(blockType, pathArray[0], options);
    }
    return null;
  }

  // node_modules/colord/index.mjs
  var r3 = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) };
  var t2 = function(r4) {
    return "string" == typeof r4 ? r4.length > 0 : "number" == typeof r4;
  };
  var n2 = function(r4, t4, n3) {
    return void 0 === t4 && (t4 = 0), void 0 === n3 && (n3 = Math.pow(10, t4)), Math.round(n3 * r4) / n3 + 0;
  };
  var e2 = function(r4, t4, n3) {
    return void 0 === t4 && (t4 = 0), void 0 === n3 && (n3 = 1), r4 > n3 ? n3 : r4 > t4 ? r4 : t4;
  };
  var u2 = function(r4) {
    return (r4 = isFinite(r4) ? r4 % 360 : 0) > 0 ? r4 : r4 + 360;
  };
  var a2 = function(r4) {
    return { r: e2(r4.r, 0, 255), g: e2(r4.g, 0, 255), b: e2(r4.b, 0, 255), a: e2(r4.a) };
  };
  var o2 = function(r4) {
    return { r: n2(r4.r), g: n2(r4.g), b: n2(r4.b), a: n2(r4.a, 3) };
  };
  var i2 = /^#([0-9a-f]{3,8})$/i;
  var s2 = function(r4) {
    var t4 = r4.toString(16);
    return t4.length < 2 ? "0" + t4 : t4;
  };
  var h2 = function(r4) {
    var t4 = r4.r, n3 = r4.g, e3 = r4.b, u3 = r4.a, a3 = Math.max(t4, n3, e3), o4 = a3 - Math.min(t4, n3, e3), i3 = o4 ? a3 === t4 ? (n3 - e3) / o4 : a3 === n3 ? 2 + (e3 - t4) / o4 : 4 + (t4 - n3) / o4 : 0;
    return { h: 60 * (i3 < 0 ? i3 + 6 : i3), s: a3 ? o4 / a3 * 100 : 0, v: a3 / 255 * 100, a: u3 };
  };
  var b2 = function(r4) {
    var t4 = r4.h, n3 = r4.s, e3 = r4.v, u3 = r4.a;
    t4 = t4 / 360 * 6, n3 /= 100, e3 /= 100;
    var a3 = Math.floor(t4), o4 = e3 * (1 - n3), i3 = e3 * (1 - (t4 - a3) * n3), s3 = e3 * (1 - (1 - t4 + a3) * n3), h3 = a3 % 6;
    return { r: 255 * [e3, i3, o4, o4, s3, e3][h3], g: 255 * [s3, e3, e3, i3, o4, o4][h3], b: 255 * [o4, o4, s3, e3, e3, i3][h3], a: u3 };
  };
  var g2 = function(r4) {
    return { h: u2(r4.h), s: e2(r4.s, 0, 100), l: e2(r4.l, 0, 100), a: e2(r4.a) };
  };
  var d2 = function(r4) {
    return { h: n2(r4.h), s: n2(r4.s), l: n2(r4.l), a: n2(r4.a, 3) };
  };
  var f2 = function(r4) {
    return b2((n3 = (t4 = r4).s, { h: t4.h, s: (n3 *= ((e3 = t4.l) < 50 ? e3 : 100 - e3) / 100) > 0 ? 2 * n3 / (e3 + n3) * 100 : 0, v: e3 + n3, a: t4.a }));
    var t4, n3, e3;
  };
  var c = function(r4) {
    return { h: (t4 = h2(r4)).h, s: (u3 = (200 - (n3 = t4.s)) * (e3 = t4.v) / 100) > 0 && u3 < 200 ? n3 * e3 / 100 / (u3 <= 100 ? u3 : 200 - u3) * 100 : 0, l: u3 / 2, a: t4.a };
    var t4, n3, e3, u3;
  };
  var l2 = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var p3 = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var v2 = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var m = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var y2 = { string: [[function(r4) {
    var t4 = i2.exec(r4);
    return t4 ? (r4 = t4[1]).length <= 4 ? { r: parseInt(r4[0] + r4[0], 16), g: parseInt(r4[1] + r4[1], 16), b: parseInt(r4[2] + r4[2], 16), a: 4 === r4.length ? n2(parseInt(r4[3] + r4[3], 16) / 255, 2) : 1 } : 6 === r4.length || 8 === r4.length ? { r: parseInt(r4.substr(0, 2), 16), g: parseInt(r4.substr(2, 2), 16), b: parseInt(r4.substr(4, 2), 16), a: 8 === r4.length ? n2(parseInt(r4.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
  }, "hex"], [function(r4) {
    var t4 = v2.exec(r4) || m.exec(r4);
    return t4 ? t4[2] !== t4[4] || t4[4] !== t4[6] ? null : a2({ r: Number(t4[1]) / (t4[2] ? 100 / 255 : 1), g: Number(t4[3]) / (t4[4] ? 100 / 255 : 1), b: Number(t4[5]) / (t4[6] ? 100 / 255 : 1), a: void 0 === t4[7] ? 1 : Number(t4[7]) / (t4[8] ? 100 : 1) }) : null;
  }, "rgb"], [function(t4) {
    var n3 = l2.exec(t4) || p3.exec(t4);
    if (!n3) return null;
    var e3, u3, a3 = g2({ h: (e3 = n3[1], u3 = n3[2], void 0 === u3 && (u3 = "deg"), Number(e3) * (r3[u3] || 1)), s: Number(n3[3]), l: Number(n3[4]), a: void 0 === n3[5] ? 1 : Number(n3[5]) / (n3[6] ? 100 : 1) });
    return f2(a3);
  }, "hsl"]], object: [[function(r4) {
    var n3 = r4.r, e3 = r4.g, u3 = r4.b, o4 = r4.a, i3 = void 0 === o4 ? 1 : o4;
    return t2(n3) && t2(e3) && t2(u3) ? a2({ r: Number(n3), g: Number(e3), b: Number(u3), a: Number(i3) }) : null;
  }, "rgb"], [function(r4) {
    var n3 = r4.h, e3 = r4.s, u3 = r4.l, a3 = r4.a, o4 = void 0 === a3 ? 1 : a3;
    if (!t2(n3) || !t2(e3) || !t2(u3)) return null;
    var i3 = g2({ h: Number(n3), s: Number(e3), l: Number(u3), a: Number(o4) });
    return f2(i3);
  }, "hsl"], [function(r4) {
    var n3 = r4.h, a3 = r4.s, o4 = r4.v, i3 = r4.a, s3 = void 0 === i3 ? 1 : i3;
    if (!t2(n3) || !t2(a3) || !t2(o4)) return null;
    var h3 = (function(r5) {
      return { h: u2(r5.h), s: e2(r5.s, 0, 100), v: e2(r5.v, 0, 100), a: e2(r5.a) };
    })({ h: Number(n3), s: Number(a3), v: Number(o4), a: Number(s3) });
    return b2(h3);
  }, "hsv"]] };
  var N2 = function(r4, t4) {
    for (var n3 = 0; n3 < t4.length; n3++) {
      var e3 = t4[n3][0](r4);
      if (e3) return [e3, t4[n3][1]];
    }
    return [null, void 0];
  };
  var x = function(r4) {
    return "string" == typeof r4 ? N2(r4.trim(), y2.string) : "object" == typeof r4 && null !== r4 ? N2(r4, y2.object) : [null, void 0];
  };
  var M = function(r4, t4) {
    var n3 = c(r4);
    return { h: n3.h, s: e2(n3.s + 100 * t4, 0, 100), l: n3.l, a: n3.a };
  };
  var H = function(r4) {
    return (299 * r4.r + 587 * r4.g + 114 * r4.b) / 1e3 / 255;
  };
  var $ = function(r4, t4) {
    var n3 = c(r4);
    return { h: n3.h, s: n3.s, l: e2(n3.l + 100 * t4, 0, 100), a: n3.a };
  };
  var j = (function() {
    function r4(r5) {
      this.parsed = x(r5)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
    }
    return r4.prototype.isValid = function() {
      return null !== this.parsed;
    }, r4.prototype.brightness = function() {
      return n2(H(this.rgba), 2);
    }, r4.prototype.isDark = function() {
      return H(this.rgba) < 0.5;
    }, r4.prototype.isLight = function() {
      return H(this.rgba) >= 0.5;
    }, r4.prototype.toHex = function() {
      return r5 = o2(this.rgba), t4 = r5.r, e3 = r5.g, u3 = r5.b, i3 = (a3 = r5.a) < 1 ? s2(n2(255 * a3)) : "", "#" + s2(t4) + s2(e3) + s2(u3) + i3;
      var r5, t4, e3, u3, a3, i3;
    }, r4.prototype.toRgb = function() {
      return o2(this.rgba);
    }, r4.prototype.toRgbString = function() {
      return r5 = o2(this.rgba), t4 = r5.r, n3 = r5.g, e3 = r5.b, (u3 = r5.a) < 1 ? "rgba(" + t4 + ", " + n3 + ", " + e3 + ", " + u3 + ")" : "rgb(" + t4 + ", " + n3 + ", " + e3 + ")";
      var r5, t4, n3, e3, u3;
    }, r4.prototype.toHsl = function() {
      return d2(c(this.rgba));
    }, r4.prototype.toHslString = function() {
      return r5 = d2(c(this.rgba)), t4 = r5.h, n3 = r5.s, e3 = r5.l, (u3 = r5.a) < 1 ? "hsla(" + t4 + ", " + n3 + "%, " + e3 + "%, " + u3 + ")" : "hsl(" + t4 + ", " + n3 + "%, " + e3 + "%)";
      var r5, t4, n3, e3, u3;
    }, r4.prototype.toHsv = function() {
      return r5 = h2(this.rgba), { h: n2(r5.h), s: n2(r5.s), v: n2(r5.v), a: n2(r5.a, 3) };
      var r5;
    }, r4.prototype.invert = function() {
      return w2({ r: 255 - (r5 = this.rgba).r, g: 255 - r5.g, b: 255 - r5.b, a: r5.a });
      var r5;
    }, r4.prototype.saturate = function(r5) {
      return void 0 === r5 && (r5 = 0.1), w2(M(this.rgba, r5));
    }, r4.prototype.desaturate = function(r5) {
      return void 0 === r5 && (r5 = 0.1), w2(M(this.rgba, -r5));
    }, r4.prototype.grayscale = function() {
      return w2(M(this.rgba, -1));
    }, r4.prototype.lighten = function(r5) {
      return void 0 === r5 && (r5 = 0.1), w2($(this.rgba, r5));
    }, r4.prototype.darken = function(r5) {
      return void 0 === r5 && (r5 = 0.1), w2($(this.rgba, -r5));
    }, r4.prototype.rotate = function(r5) {
      return void 0 === r5 && (r5 = 15), this.hue(this.hue() + r5);
    }, r4.prototype.alpha = function(r5) {
      return "number" == typeof r5 ? w2({ r: (t4 = this.rgba).r, g: t4.g, b: t4.b, a: r5 }) : n2(this.rgba.a, 3);
      var t4;
    }, r4.prototype.hue = function(r5) {
      var t4 = c(this.rgba);
      return "number" == typeof r5 ? w2({ h: r5, s: t4.s, l: t4.l, a: t4.a }) : n2(t4.h);
    }, r4.prototype.isEqual = function(r5) {
      return this.toHex() === w2(r5).toHex();
    }, r4;
  })();
  var w2 = function(r4) {
    return r4 instanceof j ? r4 : new j(r4);
  };
  var S2 = [];
  var k = function(r4) {
    r4.forEach(function(r5) {
      S2.indexOf(r5) < 0 && (r5(j, y2), S2.push(r5));
    });
  };

  // packages/global-styles-engine/build-module/utils/duotone.mjs
  function getValuesFromColors(colors2 = []) {
    const values = {
      r: [],
      g: [],
      b: [],
      a: []
    };
    colors2.forEach((color) => {
      const rgbColor = w2(color).toRgb();
      values.r.push(rgbColor.r / 255);
      values.g.push(rgbColor.g / 255);
      values.b.push(rgbColor.b / 255);
      values.a.push(rgbColor.a);
    });
    return values;
  }
  function getDuotoneFilter(id, colors2) {
    const values = getValuesFromColors(colors2);
    return `
<svg
	xmlns:xlink="http://www.w3.org/1999/xlink"
	viewBox="0 0 0 0"
	width="0"
	height="0"
	focusable="false"
	role="none"
	aria-hidden="true"
	style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
>
	<defs>
		<filter id="${id}">
			<!--
				Use sRGB instead of linearRGB so transparency looks correct.
				Use perceptual brightness to convert to grayscale.
			-->
			<feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix>
			<!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. -->
			<feComponentTransfer color-interpolation-filters="sRGB">
				<feFuncR type="table" tableValues="${values.r.join(" ")}"></feFuncR>
				<feFuncG type="table" tableValues="${values.g.join(" ")}"></feFuncG>
				<feFuncB type="table" tableValues="${values.b.join(" ")}"></feFuncB>
				<feFuncA type="table" tableValues="${values.a.join(" ")}"></feFuncA>
			</feComponentTransfer>
			<!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. -->
			<feComposite in2="SourceGraphic" operator="in"></feComposite>
		</filter>
	</defs>
</svg>`;
  }

  // packages/global-styles-engine/build-module/utils/string.mjs
  function kebabCase(str) {
    return str.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([0-9])([a-zA-Z])/g, "$1-$2").replace(/([a-zA-Z])([0-9])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
  }

  // packages/global-styles-engine/build-module/utils/spacing.mjs
  function getSpacingPresetCssVar(value) {
    if (!value) {
      return;
    }
    const slug = value.match(/var:preset\|spacing\|(.+)/);
    if (!slug) {
      return value;
    }
    return `var(--wp--preset--spacing--${slug[1]})`;
  }

  // packages/global-styles-engine/build-module/utils/gap.mjs
  function getGapBoxControlValueFromStyle(blockGapValue) {
    if (!blockGapValue) {
      return null;
    }
    const isValueString = typeof blockGapValue === "string";
    return {
      top: isValueString ? blockGapValue : blockGapValue?.top,
      left: isValueString ? blockGapValue : blockGapValue?.left
    };
  }
  function getGapCSSValue(blockGapValue, defaultValue = "0") {
    const blockGapBoxControlValue = getGapBoxControlValueFromStyle(blockGapValue);
    if (!blockGapBoxControlValue) {
      return null;
    }
    const row = getSpacingPresetCssVar(blockGapBoxControlValue?.top) || defaultValue;
    const column = getSpacingPresetCssVar(blockGapBoxControlValue?.left) || defaultValue;
    return row === column ? row : `${row} ${column}`;
  }

  // packages/global-styles-engine/build-module/utils/background.mjs
  var BACKGROUND_BLOCK_DEFAULT_VALUES = {
    backgroundSize: "cover",
    backgroundPosition: "50% 50%"
    // used only when backgroundSize is 'contain'.
  };
  function setBackgroundStyleDefaults(backgroundStyle) {
    if (!backgroundStyle || // @ts-expect-error
    !backgroundStyle?.backgroundImage?.url) {
      return;
    }
    let backgroundStylesWithDefaults;
    if (!backgroundStyle?.backgroundSize) {
      backgroundStylesWithDefaults = {
        backgroundSize: BACKGROUND_BLOCK_DEFAULT_VALUES.backgroundSize
      };
    }
    if ("contain" === backgroundStyle?.backgroundSize && !backgroundStyle?.backgroundPosition) {
      backgroundStylesWithDefaults = {
        backgroundPosition: BACKGROUND_BLOCK_DEFAULT_VALUES.backgroundPosition
      };
    }
    return backgroundStylesWithDefaults;
  }

  // packages/global-styles-engine/build-module/utils/layout.mjs
  var LAYOUT_DEFINITIONS = {
    default: {
      name: "default",
      slug: "flow",
      className: "is-layout-flow",
      baseStyles: [
        {
          selector: " > .alignleft",
          rules: {
            float: "left",
            "margin-inline-start": "0",
            "margin-inline-end": "2em"
          }
        },
        {
          selector: " > .alignright",
          rules: {
            float: "right",
            "margin-inline-start": "2em",
            "margin-inline-end": "0"
          }
        },
        {
          selector: " > .aligncenter",
          rules: {
            "margin-left": "auto !important",
            "margin-right": "auto !important"
          }
        }
      ],
      spacingStyles: [
        {
          selector: " > :first-child",
          rules: {
            "margin-block-start": "0"
          }
        },
        {
          selector: " > :last-child",
          rules: {
            "margin-block-end": "0"
          }
        },
        {
          selector: " > *",
          rules: {
            "margin-block-start": null,
            "margin-block-end": "0"
          }
        }
      ]
    },
    constrained: {
      name: "constrained",
      slug: "constrained",
      className: "is-layout-constrained",
      baseStyles: [
        {
          selector: " > .alignleft",
          rules: {
            float: "left",
            "margin-inline-start": "0",
            "margin-inline-end": "2em"
          }
        },
        {
          selector: " > .alignright",
          rules: {
            float: "right",
            "margin-inline-start": "2em",
            "margin-inline-end": "0"
          }
        },
        {
          selector: " > .aligncenter",
          rules: {
            "margin-left": "auto !important",
            "margin-right": "auto !important"
          }
        },
        {
          selector: " > :where(:not(.alignleft):not(.alignright):not(.alignfull))",
          rules: {
            "max-width": "var(--wp--style--global--content-size)",
            "margin-left": "auto !important",
            "margin-right": "auto !important"
          }
        },
        {
          selector: " > .alignwide",
          rules: {
            "max-width": "var(--wp--style--global--wide-size)"
          }
        }
      ],
      spacingStyles: [
        {
          selector: " > :first-child",
          rules: {
            "margin-block-start": "0"
          }
        },
        {
          selector: " > :last-child",
          rules: {
            "margin-block-end": "0"
          }
        },
        {
          selector: " > *",
          rules: {
            "margin-block-start": null,
            "margin-block-end": "0"
          }
        }
      ]
    },
    flex: {
      name: "flex",
      slug: "flex",
      className: "is-layout-flex",
      displayMode: "flex",
      baseStyles: [
        {
          selector: "",
          rules: {
            "flex-wrap": "wrap",
            "align-items": "center"
          }
        },
        {
          selector: " > :is(*, div)",
          // :is(*, div) instead of just * increases the specificity by 001.
          rules: {
            margin: "0"
          }
        }
      ],
      spacingStyles: [
        {
          selector: "",
          rules: {
            gap: null
          }
        }
      ]
    },
    grid: {
      name: "grid",
      slug: "grid",
      className: "is-layout-grid",
      displayMode: "grid",
      baseStyles: [
        {
          selector: " > :is(*, div)",
          // :is(*, div) instead of just * increases the specificity by 001.
          rules: {
            margin: "0"
          }
        }
      ],
      spacingStyles: [
        {
          selector: "",
          rules: {
            gap: null
          }
        }
      ]
    }
  };

  // packages/global-styles-engine/build-module/core/render.mjs
  var ELEMENT_CLASS_NAMES = {
    button: "wp-element-button",
    caption: "wp-element-caption"
  };
  var BLOCK_SUPPORT_FEATURE_LEVEL_SELECTORS = {
    __experimentalBorder: "border",
    color: "color",
    dimensions: "dimensions",
    spacing: "spacing",
    typography: "typography"
  };
  function getPresetsDeclarations(blockPresets = {}, mergedSettings) {
    return PRESET_METADATA.reduce(
      (declarations, { path, valueKey, valueFunc, cssVarInfix }) => {
        const presetByOrigin = getValueFromObjectPath(
          blockPresets,
          path,
          []
        );
        ["default", "theme", "custom"].forEach((origin) => {
          if (presetByOrigin[origin]) {
            presetByOrigin[origin].forEach((value) => {
              if (valueKey && !valueFunc) {
                declarations.push(
                  `--wp--preset--${cssVarInfix}--${kebabCase(
                    value.slug
                  )}: ${value[valueKey]}`
                );
              } else if (valueFunc && typeof valueFunc === "function") {
                declarations.push(
                  `--wp--preset--${cssVarInfix}--${kebabCase(
                    value.slug
                  )}: ${valueFunc(value, mergedSettings)}`
                );
              }
            });
          }
        });
        return declarations;
      },
      []
    );
  }
  function getPresetsClasses(blockSelector = "*", blockPresets = {}) {
    return PRESET_METADATA.reduce(
      (declarations, { path, cssVarInfix, classes }) => {
        if (!classes) {
          return declarations;
        }
        const presetByOrigin = getValueFromObjectPath(
          blockPresets,
          path,
          []
        );
        ["default", "theme", "custom"].forEach((origin) => {
          if (presetByOrigin[origin]) {
            presetByOrigin[origin].forEach(
              ({ slug }) => {
                classes.forEach(
                  ({
                    classSuffix,
                    propertyName
                  }) => {
                    const classSelectorToUse = `.has-${kebabCase(
                      slug
                    )}-${classSuffix}`;
                    const selectorToUse = blockSelector.split(",").map(
                      (selector) => `${selector}${classSelectorToUse}`
                    ).join(",");
                    const value = `var(--wp--preset--${cssVarInfix}--${kebabCase(
                      slug
                    )})`;
                    declarations += `${selectorToUse}{${propertyName}: ${value} !important;}`;
                  }
                );
              }
            );
          }
        });
        return declarations;
      },
      ""
    );
  }
  function getPresetsSvgFilters(blockPresets = {}) {
    return PRESET_METADATA.filter(
      // Duotone are the only type of filters for now.
      (metadata) => metadata.path.at(-1) === "duotone"
    ).flatMap((metadata) => {
      const presetByOrigin = getValueFromObjectPath(
        blockPresets,
        metadata.path,
        {}
      );
      return ["default", "theme"].filter((origin) => presetByOrigin[origin]).flatMap(
        (origin) => presetByOrigin[origin].map(
          (preset) => getDuotoneFilter(
            `wp-duotone-${preset.slug}`,
            preset.colors
          )
        )
      ).join("");
    });
  }
  function flattenTree(input = {}, prefix2, token) {
    let result = [];
    Object.keys(input).forEach((key) => {
      const newKey = prefix2 + kebabCase(key.replace("/", "-"));
      const newLeaf = input[key];
      if (newLeaf instanceof Object) {
        const newPrefix = newKey + token;
        result = [...result, ...flattenTree(newLeaf, newPrefix, token)];
      } else {
        result.push(`${newKey}: ${newLeaf}`);
      }
    });
    return result;
  }
  function concatFeatureVariationSelectorString(featureSelector, styleVariationSelector) {
    const featureSelectors = featureSelector.split(",");
    const combinedSelectors = [];
    featureSelectors.forEach((selector) => {
      combinedSelectors.push(
        `${styleVariationSelector.trim()}${selector.trim()}`
      );
    });
    return combinedSelectors.join(", ");
  }
  var updateParagraphTextIndentSelector = (featureDeclarations, settings, blockName) => {
    if (blockName !== "core/paragraph") {
      return featureDeclarations;
    }
    const blockSettings = settings?.blocks?.["core/paragraph"];
    const textIndentSetting = blockSettings?.typography?.textIndent ?? settings?.typography?.textIndent ?? "subsequent";
    if (textIndentSetting !== "all") {
      return featureDeclarations;
    }
    const oldSelector = ".wp-block-paragraph + .wp-block-paragraph";
    const newSelector = ".wp-block-paragraph";
    if (oldSelector in featureDeclarations) {
      const declarations = featureDeclarations[oldSelector];
      const updated = { ...featureDeclarations };
      delete updated[oldSelector];
      updated[newSelector] = declarations;
      return updated;
    }
    return featureDeclarations;
  };
  var getFeatureDeclarations = (selectors, styles) => {
    const declarations = {};
    Object.entries(selectors).forEach(([feature, selector]) => {
      if (feature === "root" || !styles?.[feature]) {
        return;
      }
      const isShorthand = typeof selector === "string";
      if (!isShorthand && typeof selector === "object" && selector !== null) {
        Object.entries(selector).forEach(
          ([subfeature, subfeatureSelector]) => {
            if (subfeature === "root" || !styles?.[feature][subfeature]) {
              return;
            }
            const subfeatureStyles = {
              [feature]: {
                [subfeature]: styles[feature][subfeature]
              }
            };
            const newDeclarations = getStylesDeclarations(subfeatureStyles);
            declarations[subfeatureSelector] = [
              ...declarations[subfeatureSelector] || [],
              ...newDeclarations
            ];
            delete styles[feature][subfeature];
          }
        );
      }
      if (isShorthand || typeof selector === "object" && selector !== null && "root" in selector) {
        const featureSelector = isShorthand ? selector : selector.root;
        const featureStyles = { [feature]: styles[feature] };
        const newDeclarations = getStylesDeclarations(featureStyles);
        declarations[featureSelector] = [
          ...declarations[featureSelector] || [],
          ...newDeclarations
        ];
        delete styles[feature];
      }
    });
    return declarations;
  };
  function getStylesDeclarations(blockStyles = {}, selector = "", useRootPaddingAlign, tree = {}, disableRootPadding = false) {
    const isRoot = ROOT_BLOCK_SELECTOR === selector;
    const output = Object.entries(
      import_blocks7.__EXPERIMENTAL_STYLE_PROPERTY
    ).reduce(
      (declarations, [key, { value, properties, useEngine, rootOnly }]) => {
        if (rootOnly && !isRoot) {
          return declarations;
        }
        const pathToValue = value;
        if (pathToValue[0] === "elements" || useEngine) {
          return declarations;
        }
        const styleValue = getValueFromObjectPath(
          blockStyles,
          pathToValue
        );
        if (key === "--wp--style--root--padding" && (typeof styleValue === "string" || !useRootPaddingAlign)) {
          return declarations;
        }
        if (properties && typeof styleValue !== "string") {
          Object.entries(properties).forEach((entry) => {
            const [name2, prop] = entry;
            if (!getValueFromObjectPath(styleValue, [prop], false)) {
              return;
            }
            const cssProperty = name2.startsWith("--") ? name2 : kebabCase(name2);
            declarations.push(
              `${cssProperty}: ${(0, import_style_engine2.getCSSValueFromRawStyle)(
                getValueFromObjectPath(styleValue, [prop])
              )}`
            );
          });
        } else if (getValueFromObjectPath(blockStyles, pathToValue, false)) {
          const cssProperty = key.startsWith("--") ? key : kebabCase(key);
          declarations.push(
            `${cssProperty}: ${(0, import_style_engine2.getCSSValueFromRawStyle)(
              getValueFromObjectPath(blockStyles, pathToValue)
            )}`
          );
        }
        return declarations;
      },
      []
    );
    if (!!blockStyles.background) {
      if (blockStyles.background?.backgroundImage) {
        blockStyles.background.backgroundImage = getResolvedValue(
          blockStyles.background.backgroundImage,
          tree
        );
      }
      if (!isRoot && !!blockStyles.background?.backgroundImage?.id) {
        blockStyles = {
          ...blockStyles,
          background: {
            ...blockStyles.background,
            ...setBackgroundStyleDefaults(blockStyles.background)
          }
        };
      }
    }
    const extraRules = (0, import_style_engine2.getCSSRules)(blockStyles);
    extraRules.forEach((rule) => {
      if (isRoot && (useRootPaddingAlign || disableRootPadding) && rule.key.startsWith("padding")) {
        return;
      }
      const cssProperty = rule.key.startsWith("--") ? rule.key : kebabCase(rule.key);
      let ruleValue = getResolvedValue(rule.value, tree);
      if (cssProperty === "font-size") {
        ruleValue = getTypographyFontSizeValue(
          { name: "", slug: "", size: ruleValue },
          tree?.settings
        );
      }
      if (cssProperty === "aspect-ratio") {
        output.push("min-height: unset");
      }
      output.push(`${cssProperty}: ${ruleValue}`);
    });
    return output;
  }
  function getLayoutStyles({
    layoutDefinitions = LAYOUT_DEFINITIONS,
    style,
    selector,
    hasBlockGapSupport,
    hasFallbackGapSupport,
    fallbackGapValue
  }) {
    let ruleset = "";
    let gapValue = hasBlockGapSupport ? getGapCSSValue(style?.spacing?.blockGap) : "";
    if (hasFallbackGapSupport) {
      if (selector === ROOT_BLOCK_SELECTOR) {
        gapValue = !gapValue ? "0.5em" : gapValue;
      } else if (!hasBlockGapSupport && fallbackGapValue) {
        gapValue = fallbackGapValue;
      }
    }
    if (gapValue && layoutDefinitions) {
      Object.values(layoutDefinitions).forEach(
        ({ className, name: name2, spacingStyles }) => {
          if (!hasBlockGapSupport && "flex" !== name2 && "grid" !== name2) {
            return;
          }
          if (spacingStyles?.length) {
            spacingStyles.forEach((spacingStyle) => {
              const declarations = [];
              if (spacingStyle.rules) {
                Object.entries(spacingStyle.rules).forEach(
                  ([cssProperty, cssValue]) => {
                    declarations.push(
                      `${cssProperty}: ${cssValue ? cssValue : gapValue}`
                    );
                  }
                );
              }
              if (declarations.length) {
                let combinedSelector = "";
                if (!hasBlockGapSupport) {
                  combinedSelector = selector === ROOT_BLOCK_SELECTOR ? `:where(.${className}${spacingStyle?.selector || ""})` : `:where(${selector}.${className}${spacingStyle?.selector || ""})`;
                } else {
                  combinedSelector = selector === ROOT_BLOCK_SELECTOR ? `:root :where(.${className})${spacingStyle?.selector || ""}` : `:root :where(${selector}-${className})${spacingStyle?.selector || ""}`;
                }
                ruleset += `${combinedSelector} { ${declarations.join(
                  "; "
                )}; }`;
              }
            });
          }
        }
      );
      if (selector === ROOT_BLOCK_SELECTOR && hasBlockGapSupport) {
        ruleset += `${ROOT_CSS_PROPERTIES_SELECTOR} { --wp--style--block-gap: ${gapValue}; }`;
      }
    }
    if (selector === ROOT_BLOCK_SELECTOR && layoutDefinitions) {
      const validDisplayModes = ["block", "flex", "grid"];
      Object.values(layoutDefinitions).forEach(
        ({ className, displayMode, baseStyles }) => {
          if (displayMode && validDisplayModes.includes(displayMode)) {
            ruleset += `${selector} .${className} { display:${displayMode}; }`;
          }
          if (baseStyles?.length) {
            baseStyles.forEach((baseStyle) => {
              const declarations = [];
              if (baseStyle.rules) {
                Object.entries(baseStyle.rules).forEach(
                  ([cssProperty, cssValue]) => {
                    declarations.push(
                      `${cssProperty}: ${cssValue}`
                    );
                  }
                );
              }
              if (declarations.length) {
                const combinedSelector = `.${className}${baseStyle?.selector || ""}`;
                ruleset += `${combinedSelector} { ${declarations.join(
                  "; "
                )}; }`;
              }
            });
          }
        }
      );
    }
    return ruleset;
  }
  var STYLE_KEYS = [
    "border",
    "color",
    "dimensions",
    "spacing",
    "typography",
    "filter",
    "outline",
    "shadow",
    "background"
  ];
  function pickStyleKeys(treeToPickFrom) {
    if (!treeToPickFrom) {
      return {};
    }
    const entries = Object.entries(treeToPickFrom);
    const pickedEntries = entries.filter(
      ([key]) => STYLE_KEYS.includes(key)
    );
    const clonedEntries = pickedEntries.map(([key, style]) => [
      key,
      JSON.parse(JSON.stringify(style))
    ]);
    return Object.fromEntries(clonedEntries);
  }
  var getNodesWithStyles = (tree, blockSelectors) => {
    const nodes = [];
    if (!tree?.styles) {
      return nodes;
    }
    const styles = pickStyleKeys(tree.styles);
    if (styles) {
      nodes.push({
        styles,
        selector: ROOT_BLOCK_SELECTOR,
        // Root selector (body) styles should not be wrapped in `:root where()` to keep
        // specificity at (0,0,1) and maintain backwards compatibility.
        skipSelectorWrapper: true
      });
    }
    Object.entries(import_blocks7.__EXPERIMENTAL_ELEMENTS).forEach(([name2, selector]) => {
      if (tree.styles?.elements?.[name2]) {
        nodes.push({
          styles: tree.styles?.elements?.[name2] ?? {},
          selector,
          // Top level elements that don't use a class name should not receive the
          // `:root :where()` wrapper to maintain backwards compatibility.
          skipSelectorWrapper: !ELEMENT_CLASS_NAMES[name2]
        });
      }
    });
    Object.entries(tree.styles?.blocks ?? {}).forEach(
      ([blockName, node]) => {
        const blockStyles = pickStyleKeys(node);
        const typedNode = node;
        const variationNodesToAdd = [];
        if (typedNode?.variations) {
          const variations = {};
          Object.entries(typedNode.variations).forEach(
            ([variationName, variation]) => {
              const typedVariation = variation;
              variations[variationName] = pickStyleKeys(typedVariation);
              if (typedVariation?.css) {
                variations[variationName].css = typedVariation.css;
              }
              const variationSelector = typeof blockSelectors !== "string" ? blockSelectors[blockName]?.styleVariationSelectors?.[variationName] : void 0;
              Object.entries(
                typedVariation?.elements ?? {}
              ).forEach(([element, elementStyles]) => {
                if (elementStyles && import_blocks7.__EXPERIMENTAL_ELEMENTS[element]) {
                  variationNodesToAdd.push({
                    styles: elementStyles,
                    selector: scopeSelector(
                      variationSelector,
                      import_blocks7.__EXPERIMENTAL_ELEMENTS[element]
                    )
                  });
                }
              });
              Object.entries(typedVariation?.blocks ?? {}).forEach(
                ([
                  variationBlockName,
                  variationBlockStyles
                ]) => {
                  const variationBlockSelector = typeof blockSelectors !== "string" ? scopeSelector(
                    variationSelector,
                    blockSelectors[variationBlockName]?.selector
                  ) : void 0;
                  const variationDuotoneSelector = typeof blockSelectors !== "string" ? scopeSelector(
                    variationSelector,
                    blockSelectors[variationBlockName]?.duotoneSelector
                  ) : void 0;
                  const variationFeatureSelectors = typeof blockSelectors !== "string" ? scopeFeatureSelectors(
                    variationSelector,
                    blockSelectors[variationBlockName]?.featureSelectors ?? {}
                  ) : void 0;
                  const variationBlockStyleNodes = pickStyleKeys(variationBlockStyles);
                  if (variationBlockStyles?.css) {
                    variationBlockStyleNodes.css = variationBlockStyles.css;
                  }
                  if (!variationBlockSelector || typeof blockSelectors === "string") {
                    return;
                  }
                  variationNodesToAdd.push({
                    selector: variationBlockSelector,
                    duotoneSelector: variationDuotoneSelector,
                    featureSelectors: variationFeatureSelectors,
                    fallbackGapValue: blockSelectors[variationBlockName]?.fallbackGapValue,
                    hasLayoutSupport: blockSelectors[variationBlockName]?.hasLayoutSupport,
                    styles: variationBlockStyleNodes
                  });
                  Object.entries(
                    variationBlockStyles.elements ?? {}
                  ).forEach(
                    ([
                      variationBlockElement,
                      variationBlockElementStyles
                    ]) => {
                      if (variationBlockElementStyles && import_blocks7.__EXPERIMENTAL_ELEMENTS[variationBlockElement]) {
                        variationNodesToAdd.push({
                          styles: variationBlockElementStyles,
                          selector: scopeSelector(
                            variationBlockSelector,
                            import_blocks7.__EXPERIMENTAL_ELEMENTS[variationBlockElement]
                          )
                        });
                      }
                    }
                  );
                }
              );
            }
          );
          blockStyles.variations = variations;
        }
        if (typeof blockSelectors !== "string" && blockSelectors?.[blockName]?.selector) {
          nodes.push({
            duotoneSelector: blockSelectors[blockName].duotoneSelector,
            fallbackGapValue: blockSelectors[blockName].fallbackGapValue,
            hasLayoutSupport: blockSelectors[blockName].hasLayoutSupport,
            selector: blockSelectors[blockName].selector,
            styles: blockStyles,
            featureSelectors: blockSelectors[blockName].featureSelectors,
            styleVariationSelectors: blockSelectors[blockName].styleVariationSelectors,
            name: blockName
          });
        }
        Object.entries(typedNode?.elements ?? {}).forEach(
          ([elementName, value]) => {
            if (typeof blockSelectors !== "string" && value && blockSelectors?.[blockName] && import_blocks7.__EXPERIMENTAL_ELEMENTS[elementName]) {
              nodes.push({
                styles: value,
                selector: blockSelectors[blockName]?.selector.split(",").map((sel) => {
                  const elementSelectors = import_blocks7.__EXPERIMENTAL_ELEMENTS[elementName].split(",");
                  return elementSelectors.map(
                    (elementSelector) => sel + " " + elementSelector
                  );
                }).join(",")
              });
            }
          }
        );
        nodes.push(...variationNodesToAdd);
      }
    );
    return nodes;
  };
  var getNodesWithSettings = (tree, blockSelectors) => {
    const nodes = [];
    if (!tree?.settings) {
      return nodes;
    }
    const pickPresets = (treeToPickFrom) => {
      let presets2 = {};
      PRESET_METADATA.forEach(({ path }) => {
        const value = getValueFromObjectPath(treeToPickFrom, path, false);
        if (value !== false) {
          presets2 = setImmutably(presets2, path, value);
        }
      });
      return presets2;
    };
    const presets = pickPresets(tree.settings);
    const custom = tree.settings?.custom;
    if (Object.keys(presets).length > 0 || custom) {
      nodes.push({
        presets,
        custom,
        selector: ROOT_CSS_PROPERTIES_SELECTOR
      });
    }
    Object.entries(tree.settings?.blocks ?? {}).forEach(
      ([blockName, node]) => {
        const blockCustom = node.custom;
        if (typeof blockSelectors === "string" || !blockSelectors[blockName]) {
          return;
        }
        const blockPresets = pickPresets(node);
        if (Object.keys(blockPresets).length > 0 || blockCustom) {
          nodes.push({
            presets: blockPresets,
            custom: blockCustom,
            selector: blockSelectors[blockName]?.selector
          });
        }
      }
    );
    return nodes;
  };
  var generateCustomProperties = (tree, blockSelectors) => {
    const settings = getNodesWithSettings(tree, blockSelectors);
    let ruleset = "";
    settings.forEach(({ presets, custom, selector }) => {
      const declarations = tree?.settings ? getPresetsDeclarations(presets, tree?.settings) : [];
      const customProps = flattenTree(custom, "--wp--custom--", "--");
      if (customProps.length > 0) {
        declarations.push(...customProps);
      }
      if (declarations.length > 0) {
        ruleset += `${selector}{${declarations.join(";")};}`;
      }
    });
    return ruleset;
  };
  var transformToStyles = (tree, blockSelectors, hasBlockGapSupport, hasFallbackGapSupport, disableLayoutStyles = false, disableRootPadding = false, styleOptions = {}) => {
    const options = {
      blockGap: true,
      blockStyles: true,
      layoutStyles: true,
      marginReset: true,
      presets: true,
      rootPadding: true,
      variationStyles: false,
      ...styleOptions
    };
    const nodesWithStyles = getNodesWithStyles(tree, blockSelectors);
    const nodesWithSettings = getNodesWithSettings(tree, blockSelectors);
    const useRootPaddingAlign = tree?.settings?.useRootPaddingAwareAlignments;
    const { contentSize, wideSize } = tree?.settings?.layout || {};
    const hasBodyStyles = options.marginReset || options.rootPadding || options.layoutStyles;
    let ruleset = "";
    if (options.presets && (contentSize || wideSize)) {
      ruleset += `${ROOT_CSS_PROPERTIES_SELECTOR} {`;
      ruleset = contentSize ? ruleset + ` --wp--style--global--content-size: ${contentSize};` : ruleset;
      ruleset = wideSize ? ruleset + ` --wp--style--global--wide-size: ${wideSize};` : ruleset;
      ruleset += "}";
    }
    if (hasBodyStyles) {
      ruleset += ":where(body) {margin: 0;";
      if (options.rootPadding && useRootPaddingAlign) {
        ruleset += `padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }
				.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
				.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;
				`;
      }
      ruleset += "}";
    }
    if (options.blockStyles) {
      nodesWithStyles.forEach(
        ({
          selector,
          duotoneSelector,
          styles,
          fallbackGapValue,
          hasLayoutSupport,
          featureSelectors,
          styleVariationSelectors,
          skipSelectorWrapper,
          name: name2
        }) => {
          if (featureSelectors) {
            let featureDeclarations = getFeatureDeclarations(
              featureSelectors,
              styles
            );
            featureDeclarations = updateParagraphTextIndentSelector(
              featureDeclarations,
              tree.settings,
              name2
            );
            Object.entries(featureDeclarations).forEach(
              ([cssSelector, declarations]) => {
                if (declarations.length) {
                  const rules = declarations.join(";");
                  ruleset += `:root :where(${cssSelector}){${rules};}`;
                }
              }
            );
          }
          if (duotoneSelector) {
            const duotoneStyles = {};
            if (styles?.filter) {
              duotoneStyles.filter = styles.filter;
              delete styles.filter;
            }
            const duotoneDeclarations = getStylesDeclarations(duotoneStyles);
            if (duotoneDeclarations.length) {
              ruleset += `${duotoneSelector}{${duotoneDeclarations.join(
                ";"
              )};}`;
            }
          }
          if (!disableLayoutStyles && (ROOT_BLOCK_SELECTOR === selector || hasLayoutSupport)) {
            ruleset += getLayoutStyles({
              style: styles,
              selector,
              hasBlockGapSupport,
              hasFallbackGapSupport,
              fallbackGapValue
            });
          }
          const styleDeclarations = getStylesDeclarations(
            styles,
            selector,
            useRootPaddingAlign,
            tree,
            disableRootPadding
          );
          if (styleDeclarations?.length) {
            const generalSelector = skipSelectorWrapper ? selector : `:root :where(${selector})`;
            ruleset += `${generalSelector}{${styleDeclarations.join(
              ";"
            )};}`;
          }
          if (styles?.css) {
            ruleset += processCSSNesting(
              styles.css,
              `:root :where(${selector})`
            );
          }
          if (options.variationStyles && styleVariationSelectors) {
            Object.entries(styleVariationSelectors).forEach(
              ([styleVariationName, styleVariationSelector]) => {
                const styleVariations = styles?.variations?.[styleVariationName];
                if (styleVariations) {
                  if (featureSelectors) {
                    let featureDeclarations = getFeatureDeclarations(
                      featureSelectors,
                      styleVariations
                    );
                    featureDeclarations = updateParagraphTextIndentSelector(
                      featureDeclarations,
                      tree.settings,
                      name2
                    );
                    Object.entries(
                      featureDeclarations
                    ).forEach(
                      ([baseSelector, declarations]) => {
                        if (declarations.length) {
                          const cssSelector = concatFeatureVariationSelectorString(
                            baseSelector,
                            styleVariationSelector
                          );
                          const rules = declarations.join(";");
                          ruleset += `:root :where(${cssSelector}){${rules};}`;
                        }
                      }
                    );
                  }
                  const styleVariationDeclarations = getStylesDeclarations(
                    styleVariations,
                    styleVariationSelector,
                    useRootPaddingAlign,
                    tree
                  );
                  if (styleVariationDeclarations.length) {
                    ruleset += `:root :where(${styleVariationSelector}){${styleVariationDeclarations.join(
                      ";"
                    )};}`;
                  }
                  if (styleVariations?.css) {
                    ruleset += processCSSNesting(
                      styleVariations.css,
                      `:root :where(${styleVariationSelector})`
                    );
                  }
                  if (hasLayoutSupport && styleVariations?.spacing?.blockGap) {
                    const variationSelectorWithBlock = styleVariationSelector + selector;
                    ruleset += getLayoutStyles({
                      style: styleVariations,
                      selector: variationSelectorWithBlock,
                      hasBlockGapSupport: true,
                      hasFallbackGapSupport,
                      fallbackGapValue
                    });
                  }
                }
              }
            );
          }
          const pseudoSelectorStyles = Object.entries(styles).filter(
            ([key]) => key.startsWith(":")
          );
          if (pseudoSelectorStyles?.length) {
            pseudoSelectorStyles.forEach(
              ([pseudoKey, pseudoStyle]) => {
                const pseudoDeclarations = getStylesDeclarations(pseudoStyle);
                if (!pseudoDeclarations?.length) {
                  return;
                }
                const _selector = selector.split(",").map((sel) => sel + pseudoKey).join(",");
                const pseudoRule = `:root :where(${_selector}){${pseudoDeclarations.join(
                  ";"
                )};}`;
                ruleset += pseudoRule;
              }
            );
          }
        }
      );
    }
    if (options.layoutStyles) {
      ruleset = ruleset + ".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }";
      ruleset = ruleset + ".wp-site-blocks > .alignright { float: right; margin-left: 2em; }";
      ruleset = ruleset + ".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }";
    }
    if (options.blockGap && hasBlockGapSupport) {
      const gapValue = getGapCSSValue(tree?.styles?.spacing?.blockGap) || "0.5em";
      ruleset = ruleset + `:root :where(.wp-site-blocks) > * { margin-block-start: ${gapValue}; margin-block-end: 0; }`;
      ruleset = ruleset + ":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }";
      ruleset = ruleset + ":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }";
    }
    if (options.presets) {
      nodesWithSettings.forEach(({ selector, presets }) => {
        if (ROOT_BLOCK_SELECTOR === selector || ROOT_CSS_PROPERTIES_SELECTOR === selector) {
          selector = "";
        }
        const classes = getPresetsClasses(selector, presets);
        if (classes.length > 0) {
          ruleset += classes;
        }
      });
    }
    return ruleset;
  };
  function generateSvgFilters(tree, blockSelectors) {
    const nodesWithSettings = getNodesWithSettings(tree, blockSelectors);
    return nodesWithSettings.flatMap(({ presets }) => {
      return getPresetsSvgFilters(presets);
    });
  }
  var getSelectorsConfig = (blockType, rootSelector) => {
    if (blockType?.selectors && Object.keys(blockType.selectors).length > 0) {
      return blockType.selectors;
    }
    const config2 = {
      root: rootSelector
    };
    Object.entries(BLOCK_SUPPORT_FEATURE_LEVEL_SELECTORS).forEach(
      ([featureKey, featureName]) => {
        const featureSelector = getBlockSelector(blockType, featureKey);
        if (featureSelector) {
          config2[featureName] = featureSelector;
        }
      }
    );
    return config2;
  };
  var getBlockSelectors = (blockTypes, variationInstanceId) => {
    const { getBlockStyles } = (0, import_data31.select)(import_blocks7.store);
    const result = {};
    blockTypes.forEach((blockType) => {
      const name2 = blockType.name;
      const selector = getBlockSelector(blockType);
      if (!selector) {
        return;
      }
      let duotoneSelector = getBlockSelector(blockType, "filter.duotone");
      if (!duotoneSelector) {
        const rootSelector = getBlockSelector(blockType);
        const duotoneSupport = (0, import_blocks7.getBlockSupport)(
          blockType,
          "color.__experimentalDuotone",
          false
        );
        duotoneSelector = duotoneSupport && rootSelector && scopeSelector(rootSelector, duotoneSupport);
      }
      const hasLayoutSupport = !!blockType?.supports?.layout || !!blockType?.supports?.__experimentalLayout;
      const fallbackGapValue = (
        // @ts-expect-error
        blockType?.supports?.spacing?.blockGap?.__experimentalDefault
      );
      const blockStyleVariations = getBlockStyles(name2);
      const styleVariationSelectors = {};
      blockStyleVariations?.forEach((variation) => {
        const variationSuffix = variationInstanceId ? `-${variationInstanceId}` : "";
        const variationName = `${variation.name}${variationSuffix}`;
        const styleVariationSelector = getBlockStyleVariationSelector(
          variationName,
          selector
        );
        styleVariationSelectors[variationName] = styleVariationSelector;
      });
      const featureSelectors = getSelectorsConfig(blockType, selector);
      result[name2] = {
        duotoneSelector: duotoneSelector ?? void 0,
        fallbackGapValue,
        featureSelectors: Object.keys(featureSelectors).length ? featureSelectors : void 0,
        hasLayoutSupport,
        name: name2,
        selector,
        styleVariationSelectors: blockStyleVariations?.length ? styleVariationSelectors : void 0
      };
    });
    return result;
  };
  function updateConfigWithSeparator(config2) {
    const blocks = config2.styles?.blocks;
    const separatorBlock = blocks?.["core/separator"];
    const needsSeparatorStyleUpdate = separatorBlock && separatorBlock.color?.background && !separatorBlock.color?.text && !separatorBlock.border?.color;
    if (needsSeparatorStyleUpdate) {
      return {
        ...config2,
        styles: {
          ...config2.styles,
          blocks: {
            ...blocks,
            "core/separator": {
              ...separatorBlock,
              color: {
                ...separatorBlock.color,
                text: separatorBlock.color?.background
              }
            }
          }
        }
      };
    }
    return config2;
  }
  function processCSSNesting(css, blockSelector) {
    let processedCSS = "";
    if (!css || css.trim() === "") {
      return processedCSS;
    }
    const parts = css.split("&");
    parts.forEach((part) => {
      if (!part || part.trim() === "") {
        return;
      }
      const isRootCss = !part.includes("{");
      if (isRootCss) {
        processedCSS += `:root :where(${blockSelector}){${part.trim()}}`;
      } else {
        const splitPart = part.replace("}", "").split("{");
        if (splitPart.length !== 2) {
          return;
        }
        const [nestedSelector, cssValue] = splitPart;
        const matches = nestedSelector.match(/([>+~\s]*::[a-zA-Z-]+)/);
        const pseudoPart = matches ? matches[1] : "";
        const withoutPseudoElement = matches ? nestedSelector.replace(pseudoPart, "").trim() : nestedSelector.trim();
        let combinedSelector;
        if (withoutPseudoElement === "") {
          combinedSelector = blockSelector;
        } else {
          combinedSelector = nestedSelector.startsWith(" ") ? scopeSelector(blockSelector, withoutPseudoElement) : appendToSelector(blockSelector, withoutPseudoElement);
        }
        processedCSS += `:root :where(${combinedSelector})${pseudoPart}{${cssValue.trim()}}`;
      }
    });
    return processedCSS;
  }
  function generateGlobalStyles(config2 = {}, blockTypes = [], options = {}) {
    const {
      hasBlockGapSupport: hasBlockGapSupportOption,
      hasFallbackGapSupport: hasFallbackGapSupportOption,
      disableLayoutStyles = false,
      disableRootPadding = false,
      styleOptions = {}
    } = options;
    const blocks = blockTypes.length > 0 ? blockTypes : (0, import_blocks7.getBlockTypes)();
    const blockGap = getSetting(config2, "spacing.blockGap");
    const hasBlockGapSupport = hasBlockGapSupportOption ?? blockGap !== null;
    const hasFallbackGapSupport = hasFallbackGapSupportOption ?? !hasBlockGapSupport;
    if (!config2?.styles || !config2?.settings) {
      return [[], {}];
    }
    const updatedConfig = updateConfigWithSeparator(config2);
    const blockSelectors = getBlockSelectors(blocks);
    const customProperties = generateCustomProperties(
      updatedConfig,
      blockSelectors
    );
    const globalStyles = transformToStyles(
      updatedConfig,
      blockSelectors,
      hasBlockGapSupport,
      hasFallbackGapSupport,
      disableLayoutStyles,
      disableRootPadding,
      styleOptions
    );
    const svgs = generateSvgFilters(updatedConfig, blockSelectors);
    const styles = [
      {
        css: customProperties,
        isGlobalStyles: true
      },
      {
        css: globalStyles,
        isGlobalStyles: true
      },
      // Load custom CSS in own stylesheet so that any invalid CSS entered in the input won't break all the global styles in the editor.
      {
        css: updatedConfig?.styles?.css ?? "",
        isGlobalStyles: true
      },
      {
        assets: svgs,
        __unstableType: "svg",
        isGlobalStyles: true
      }
    ];
    blocks.forEach((blockType) => {
      const blockStyles = updatedConfig?.styles?.blocks?.[blockType.name];
      if (blockStyles?.css) {
        const selector = blockSelectors[blockType.name].selector;
        styles.push({
          css: processCSSNesting(blockStyles.css, selector),
          isGlobalStyles: true
        });
      }
    });
    return [styles, updatedConfig.settings];
  }

  // packages/editor/build-module/components/global-styles-provider/index.mjs
  var { cleanEmptyObject } = unlock(import_block_editor6.privateApis);
  function useGlobalStylesUserConfig() {
    const { globalStylesId, isReady: isReady2, settings, styles, _links } = (0, import_data32.useSelect)(
      (select6) => {
        const {
          getEntityRecord,
          getEditedEntityRecord: getEditedEntityRecord2,
          hasFinishedResolution,
          canUser
        } = select6(import_core_data28.store);
        const _globalStylesId = select6(import_core_data28.store).__experimentalGetCurrentGlobalStylesId();
        let record;
        const userCanEditGlobalStyles = _globalStylesId ? canUser("update", {
          kind: "root",
          name: "globalStyles",
          id: _globalStylesId
        }) : null;
        if (_globalStylesId && /*
        * Test that the OPTIONS request for user capabilities is complete
        * before fetching the global styles entity record.
        * This is to avoid fetching the global styles entity unnecessarily.
        */
        typeof userCanEditGlobalStyles === "boolean") {
          if (userCanEditGlobalStyles) {
            record = getEditedEntityRecord2(
              "root",
              "globalStyles",
              _globalStylesId
            );
          } else {
            record = getEntityRecord(
              "root",
              "globalStyles",
              _globalStylesId,
              { context: "view" }
            );
          }
        }
        let hasResolved = false;
        if (hasFinishedResolution(
          "__experimentalGetCurrentGlobalStylesId"
        )) {
          if (_globalStylesId) {
            hasResolved = userCanEditGlobalStyles ? hasFinishedResolution("getEditedEntityRecord", [
              "root",
              "globalStyles",
              _globalStylesId
            ]) : hasFinishedResolution("getEntityRecord", [
              "root",
              "globalStyles",
              _globalStylesId,
              { context: "view" }
            ]);
          } else {
            hasResolved = true;
          }
        }
        return {
          globalStylesId: _globalStylesId,
          isReady: hasResolved,
          settings: record?.settings,
          styles: record?.styles,
          _links: record?._links
        };
      },
      []
    );
    const { getEditedEntityRecord } = (0, import_data32.useSelect)(import_core_data28.store);
    const { editEntityRecord } = (0, import_data32.useDispatch)(import_core_data28.store);
    const config2 = (0, import_element26.useMemo)(() => {
      return {
        settings: settings ?? {},
        styles: styles ?? {},
        _links: _links ?? {}
      };
    }, [settings, styles, _links]);
    const setConfig = (0, import_element26.useCallback)(
      /**
       * Set the global styles config.
       * @param {Function|Object} callbackOrObject If the callbackOrObject is a function, pass the current config to the callback so the consumer can merge values.
       *                                           Otherwise, overwrite the current config with the incoming object.
       * @param {Object}          options          Options for editEntityRecord Core selector.
       */
      (callbackOrObject, options = {}) => {
        const record = getEditedEntityRecord(
          "root",
          "globalStyles",
          globalStylesId
        );
        const currentConfig = {
          styles: record?.styles ?? {},
          settings: record?.settings ?? {},
          _links: record?._links ?? {}
        };
        const updatedConfig = typeof callbackOrObject === "function" ? callbackOrObject(currentConfig) : callbackOrObject;
        editEntityRecord(
          "root",
          "globalStyles",
          globalStylesId,
          {
            styles: cleanEmptyObject(updatedConfig.styles) || {},
            settings: cleanEmptyObject(updatedConfig.settings) || {},
            _links: cleanEmptyObject(updatedConfig._links) || {}
          },
          options
        );
      },
      [globalStylesId, editEntityRecord, getEditedEntityRecord]
    );
    return [isReady2, config2, setConfig];
  }
  function useGlobalStylesBaseConfig() {
    const baseConfig = (0, import_data32.useSelect)(
      (select6) => select6(import_core_data28.store).__experimentalGetCurrentThemeBaseGlobalStyles(),
      []
    );
    return [!!baseConfig, baseConfig];
  }
  function useGlobalStylesContext() {
    const [isUserConfigReady, userConfig, setUserConfig] = useGlobalStylesUserConfig();
    const [isBaseConfigReady, baseConfig] = useGlobalStylesBaseConfig();
    const mergedConfig = (0, import_element26.useMemo)(() => {
      if (!baseConfig || !userConfig) {
        return {};
      }
      return mergeGlobalStyles(baseConfig, userConfig);
    }, [userConfig, baseConfig]);
    const context = (0, import_element26.useMemo)(() => {
      return {
        isReady: isUserConfigReady && isBaseConfigReady,
        user: userConfig,
        base: baseConfig,
        merged: mergedConfig,
        setUserConfig
      };
    }, [
      mergedConfig,
      userConfig,
      baseConfig,
      setUserConfig,
      isUserConfigReady,
      isBaseConfigReady
    ]);
    return context;
  }

  // packages/editor/build-module/components/provider/use-block-editor-settings.mjs
  var EMPTY_OBJECT3 = {};
  function __experimentalReusableBlocksSelect(select6) {
    const { RECEIVE_INTERMEDIATE_RESULTS: RECEIVE_INTERMEDIATE_RESULTS2 } = unlock(import_core_data29.privateApis);
    const { getEntityRecords } = select6(import_core_data29.store);
    return getEntityRecords("postType", "wp_block", {
      per_page: -1,
      [RECEIVE_INTERMEDIATE_RESULTS2]: true
    });
  }
  var BLOCK_EDITOR_SETTINGS = [
    "__experimentalBlockBindingsSupportedAttributes",
    "__experimentalBlockDirectory",
    "__experimentalDiscussionSettings",
    "__experimentalFeatures",
    "__experimentalGlobalStylesBaseStyles",
    "allImageSizes",
    "alignWide",
    "blockInspectorTabs",
    "maxUploadFileSize",
    "allowedMimeTypes",
    "bodyPlaceholder",
    "canEditCSS",
    "canLockBlocks",
    "canUpdateBlockBindings",
    "capabilities",
    "clearBlockSelection",
    "codeEditingEnabled",
    "colors",
    "disableContentOnlyForUnsyncedPatterns",
    "disableCustomColors",
    "disableCustomFontSizes",
    "disableCustomSpacingSizes",
    "disableCustomGradients",
    "disableLayoutStyles",
    "enableCustomLineHeight",
    "enableCustomSpacing",
    "enableCustomUnits",
    "enableOpenverseMediaCategory",
    "fontSizes",
    "gradients",
    "generateAnchors",
    "onNavigateToEntityRecord",
    "imageDefaultSize",
    "imageDimensions",
    "imageEditing",
    "imageSizes",
    "isPreviewMode",
    "isRTL",
    "locale",
    "maxWidth",
    "postContentAttributes",
    "postsPerPage",
    "readOnly",
    "styles",
    "titlePlaceholder",
    "supportsLayout",
    "widgetTypesToHideFromLegacyWidgetBlock",
    "__unstableHasCustomAppender",
    "__unstableResolvedAssets",
    "__unstableIsBlockBasedTheme"
  ];
  var {
    globalStylesDataKey,
    globalStylesLinksDataKey,
    selectBlockPatternsKey,
    reusableBlocksSelectKey,
    sectionRootClientIdKey,
    mediaEditKey,
    getMediaSelectKey,
    isIsolatedEditorKey,
    deviceTypeKey,
    isNavigationOverlayContextKey,
    mediaUploadOnSuccessKey
  } = unlock(import_block_editor7.privateApis);
  function useBlockEditorSettings(settings, postType2, postId2, renderingMode2) {
    const isLargeViewport = (0, import_compose6.useViewportMatch)("medium");
    const {
      allImageSizes,
      bigImageSizeThreshold,
      allowRightClickOverrides,
      blockTypes,
      focusMode,
      hasFixedToolbar,
      isDistractionFree,
      keepCaretInsideBlock,
      hasUploadPermissions,
      hiddenBlockTypes,
      canUseUnfilteredHTML,
      userCanCreatePages,
      pageOnFront,
      pageForPosts,
      userPatternCategories,
      restBlockPatternCategories,
      sectionRootClientId,
      deviceType: deviceType2,
      isNavigationOverlayContext,
      isRevisionsMode: isRevisionsMode2
    } = (0, import_data33.useSelect)(
      (select6) => {
        const {
          canUser,
          getRawEntityRecord,
          getEntityRecord,
          getUserPatternCategories,
          getBlockPatternCategories
        } = select6(import_core_data29.store);
        const { get } = select6(import_preferences4.store);
        const { getBlockTypes: getBlockTypes6 } = select6(import_blocks8.store);
        const { getDeviceType: getDeviceType2, isRevisionsMode: _isRevisionsMode } = unlock(
          select6(store)
        );
        const { getBlocksByName, getBlockAttributes: getBlockAttributes2 } = select6(import_block_editor7.store);
        const siteSettings = canUser("read", {
          kind: "root",
          name: "site"
        }) ? getEntityRecord("root", "site") : void 0;
        const baseData = getEntityRecord("root", "__unstableBase");
        function getSectionRootBlock() {
          if (renderingMode2 === "template-locked") {
            return getBlocksByName("core/post-content")?.[0] ?? "";
          }
          return getBlocksByName("core/group").find(
            (clientId) => getBlockAttributes2(clientId)?.tagName === "main"
          ) ?? "";
        }
        return {
          allImageSizes: baseData?.image_sizes,
          bigImageSizeThreshold: baseData?.image_size_threshold,
          allowRightClickOverrides: get(
            "core",
            "allowRightClickOverrides"
          ),
          blockTypes: getBlockTypes6(),
          canUseUnfilteredHTML: getRawEntityRecord(
            "postType",
            postType2,
            postId2
          )?._links?.hasOwnProperty("wp:action-unfiltered-html"),
          focusMode: get("core", "focusMode"),
          hasFixedToolbar: get("core", "fixedToolbar") || !isLargeViewport,
          hiddenBlockTypes: get("core", "hiddenBlockTypes"),
          isDistractionFree: get("core", "distractionFree"),
          keepCaretInsideBlock: get("core", "keepCaretInsideBlock"),
          hasUploadPermissions: canUser("create", {
            kind: "postType",
            name: "attachment"
          }) ?? true,
          userCanCreatePages: canUser("create", {
            kind: "postType",
            name: "page"
          }),
          pageOnFront: siteSettings?.page_on_front,
          pageForPosts: siteSettings?.page_for_posts,
          userPatternCategories: getUserPatternCategories(),
          restBlockPatternCategories: getBlockPatternCategories(),
          sectionRootClientId: getSectionRootBlock(),
          deviceType: getDeviceType2(),
          isNavigationOverlayContext: postType2 === "wp_template_part" && postId2 ? getEntityRecord(
            "postType",
            "wp_template_part",
            postId2
          )?.area === "navigation-overlay" : false,
          isRevisionsMode: _isRevisionsMode()
        };
      },
      [postType2, postId2, isLargeViewport, renderingMode2]
    );
    const { merged: mergedGlobalStyles } = useGlobalStylesContext();
    const globalStylesData = mergedGlobalStyles.styles ?? EMPTY_OBJECT3;
    const globalStylesLinksData = mergedGlobalStyles._links ?? EMPTY_OBJECT3;
    const settingsBlockPatterns = settings.__experimentalAdditionalBlockPatterns ?? // WP 6.0
    settings.__experimentalBlockPatterns;
    const settingsBlockPatternCategories = settings.__experimentalAdditionalBlockPatternCategories ?? // WP 6.0
    settings.__experimentalBlockPatternCategories;
    const blockPatterns = (0, import_element27.useMemo)(
      () => [...settingsBlockPatterns || []].filter(
        ({ postTypes }) => {
          return !postTypes || Array.isArray(postTypes) && postTypes.includes(postType2);
        }
      ),
      [settingsBlockPatterns, postType2]
    );
    const blockPatternCategories = (0, import_element27.useMemo)(
      () => [
        ...settingsBlockPatternCategories || [],
        ...restBlockPatternCategories || []
      ].filter(
        (x2, index2, arr) => index2 === arr.findIndex((y3) => x2.name === y3.name)
      ),
      [settingsBlockPatternCategories, restBlockPatternCategories]
    );
    const { undo: undo2, setIsInserterOpened: setIsInserterOpened2 } = (0, import_data33.useDispatch)(store);
    const { editMediaEntity } = unlock((0, import_data33.useDispatch)(import_core_data29.store));
    const { saveEntityRecord } = (0, import_data33.useDispatch)(import_core_data29.store);
    const createPageEntity = (0, import_element27.useCallback)(
      (options) => {
        if (!userCanCreatePages) {
          return Promise.reject({
            message: (0, import_i18n62.__)(
              "You do not have permission to create Pages."
            )
          });
        }
        return saveEntityRecord("postType", "page", options);
      },
      [saveEntityRecord, userCanCreatePages]
    );
    const allowedBlockTypes = (0, import_element27.useMemo)(() => {
      if (hiddenBlockTypes && hiddenBlockTypes.length > 0) {
        const defaultAllowedBlockTypes = true === settings.allowedBlockTypes ? blockTypes.map(({ name: name2 }) => name2) : settings.allowedBlockTypes || [];
        return defaultAllowedBlockTypes.filter(
          (type) => !hiddenBlockTypes.includes(type)
        );
      }
      return settings.allowedBlockTypes;
    }, [settings.allowedBlockTypes, hiddenBlockTypes, blockTypes]);
    const forceDisableFocusMode = settings.focusMode === false;
    return (0, import_element27.useMemo)(() => {
      const blockEditorSettings = {
        ...Object.fromEntries(
          Object.entries(settings).filter(
            ([key]) => BLOCK_EDITOR_SETTINGS.includes(key)
          ).filter(([key]) => key !== "onNavigateToEntityRecord")
        ),
        [globalStylesDataKey]: globalStylesData,
        [globalStylesLinksDataKey]: globalStylesLinksData,
        allImageSizes,
        bigImageSizeThreshold,
        allowedBlockTypes,
        allowRightClickOverrides,
        focusMode: focusMode && !forceDisableFocusMode,
        hasFixedToolbar,
        isDistractionFree,
        keepCaretInsideBlock,
        onNavigateToEntityRecord: settings.onNavigateToEntityRecord,
        [getMediaSelectKey]: (select6, attachmentId) => {
          return select6(import_core_data29.store).getEntityRecord(
            "postType",
            "attachment",
            attachmentId
          );
        },
        [mediaEditKey]: hasUploadPermissions ? editMediaEntity : void 0,
        mediaUpload: hasUploadPermissions ? mediaUpload : void 0,
        [mediaUploadOnSuccessKey]: hasUploadPermissions ? mediaUploadOnSuccess : void 0,
        mediaSideload: hasUploadPermissions ? media_sideload_default : void 0,
        mediaFinalize: hasUploadPermissions ? mediaFinalize : void 0,
        __experimentalBlockPatterns: blockPatterns,
        [selectBlockPatternsKey]: (select6) => {
          const { hasFinishedResolution, getBlockPatternsForPostType } = unlock(select6(import_core_data29.store));
          const patterns2 = getBlockPatternsForPostType(postType2);
          return hasFinishedResolution("getBlockPatterns") ? patterns2 : void 0;
        },
        [reusableBlocksSelectKey]: __experimentalReusableBlocksSelect,
        __experimentalBlockPatternCategories: blockPatternCategories,
        __experimentalUserPatternCategories: userPatternCategories,
        __experimentalFetchLinkSuggestions: (search, searchOptions) => (0, import_core_data29.__experimentalFetchLinkSuggestions)(search, searchOptions, settings),
        inserterMediaCategories: media_categories_default,
        __experimentalFetchRichUrlData: import_core_data29.__experimentalFetchUrlData,
        // Todo: This only checks the top level post, not the post within a template or any other entity that can be edited.
        // This might be better as a generic "canUser" selector.
        __experimentalCanUserUseUnfilteredHTML: canUseUnfilteredHTML,
        //Todo: this is only needed for native and should probably be removed.
        __experimentalUndo: undo2,
        // Check whether we want all site editor frames to have outlines
        // including the navigation / pattern / parts editors.
        outlineMode: !isDistractionFree && postType2 === "wp_template",
        // Check these two properties: they were not present in the site editor.
        __experimentalCreatePageEntity: createPageEntity,
        __experimentalUserCanCreatePages: userCanCreatePages,
        pageOnFront,
        pageForPosts,
        __experimentalPreferPatternsOnRoot: postType2 === "wp_template",
        templateLock: postType2 === "wp_navigation" ? "insert" : settings.templateLock,
        template: postType2 === "wp_navigation" ? [["core/navigation", {}, []]] : settings.template,
        __experimentalSetIsInserterOpened: setIsInserterOpened2,
        [sectionRootClientIdKey]: sectionRootClientId,
        editorTool: renderingMode2 === "post-only" && postType2 !== "wp_template" ? "edit" : void 0,
        // When editing template parts, patterns, or navigation directly,
        // we're in an isolated editing context (focused on that entity alone).
        [isIsolatedEditorKey]: [
          "wp_template_part",
          "wp_block",
          "wp_navigation"
        ].includes(postType2),
        // When in template-locked mode (e.g., "Show Template" in the post editor),
        // don't treat template parts as contentOnly sections.
        disableContentOnlyForTemplateParts: renderingMode2 === "template-locked",
        ...deviceType2 ? { [deviceTypeKey]: deviceType2 } : {},
        [isNavigationOverlayContextKey]: isNavigationOverlayContext
      };
      if (isRevisionsMode2) {
        blockEditorSettings.isPreviewMode = true;
      }
      return blockEditorSettings;
    }, [
      isRevisionsMode2,
      allowedBlockTypes,
      allowRightClickOverrides,
      focusMode,
      forceDisableFocusMode,
      hasFixedToolbar,
      isDistractionFree,
      keepCaretInsideBlock,
      settings,
      hasUploadPermissions,
      userPatternCategories,
      blockPatterns,
      blockPatternCategories,
      canUseUnfilteredHTML,
      undo2,
      createPageEntity,
      userCanCreatePages,
      pageOnFront,
      pageForPosts,
      postType2,
      setIsInserterOpened2,
      sectionRootClientId,
      globalStylesData,
      globalStylesLinksData,
      renderingMode2,
      editMediaEntity,
      settings.onNavigateToEntityRecord,
      deviceType2,
      allImageSizes,
      bigImageSizeThreshold,
      isNavigationOverlayContext
    ]);
  }
  var use_block_editor_settings_default = useBlockEditorSettings;

  // packages/editor/build-module/components/provider/disable-non-page-content-blocks.mjs
  var import_data34 = __toESM(require_data(), 1);
  var import_block_editor8 = __toESM(require_block_editor(), 1);
  var import_element29 = __toESM(require_element(), 1);

  // packages/editor/build-module/components/provider/use-post-content-block-types.mjs
  var import_element28 = __toESM(require_element(), 1);
  var import_hooks4 = __toESM(require_hooks(), 1);
  var POST_CONTENT_BLOCK_TYPES = [
    "core/post-title",
    "core/post-featured-image",
    "core/post-content"
  ];
  function usePostContentBlockTypes() {
    return (0, import_element28.useMemo)(
      () => [
        ...(0, import_hooks4.applyFilters)(
          "editor.postContentBlockTypes",
          POST_CONTENT_BLOCK_TYPES
        )
      ],
      []
    );
  }

  // packages/editor/build-module/components/provider/disable-non-page-content-blocks.mjs
  function DisableNonPageContentBlocks() {
    const postContentBlockTypes = usePostContentBlockTypes();
    const { contentOnlyIds, templateParts } = (0, import_data34.useSelect)(
      (select6) => {
        const { getPostBlocksByName: getPostBlocksByName2 } = unlock(select6(store));
        const { getBlocksByName } = select6(import_block_editor8.store);
        return {
          contentOnlyIds: getPostBlocksByName2(postContentBlockTypes),
          templateParts: getBlocksByName("core/template-part")
        };
      },
      [postContentBlockTypes]
    );
    const templatePartChildren = (0, import_data34.useSelect)(
      (select6) => {
        const { getBlockOrder: getBlockOrder2 } = select6(import_block_editor8.store);
        return templateParts.flatMap(
          (clientId) => getBlockOrder2(clientId)
        );
      },
      [templateParts]
    );
    const registry = (0, import_data34.useRegistry)();
    (0, import_element29.useEffect)(() => {
      const { setBlockEditingMode, unsetBlockEditingMode } = registry.dispatch(import_block_editor8.store);
      setBlockEditingMode("", "disabled");
      return () => {
        unsetBlockEditingMode("");
      };
    }, [registry]);
    (0, import_element29.useEffect)(() => {
      const { setBlockEditingMode, unsetBlockEditingMode } = registry.dispatch(import_block_editor8.store);
      registry.batch(() => {
        for (const clientId of templateParts) {
          setBlockEditingMode(clientId, "contentOnly");
        }
      });
      return () => {
        registry.batch(() => {
          for (const clientId of templateParts) {
            unsetBlockEditingMode(clientId);
          }
        });
      };
    }, [templateParts, registry]);
    (0, import_element29.useEffect)(() => {
      const { setBlockEditingMode, unsetBlockEditingMode } = registry.dispatch(import_block_editor8.store);
      const contentOnlySet = new Set(contentOnlyIds);
      registry.batch(() => {
        for (const clientId of contentOnlyIds) {
          setBlockEditingMode(clientId, "contentOnly");
        }
        for (const clientId of templatePartChildren) {
          if (!contentOnlySet.has(clientId)) {
            setBlockEditingMode(clientId, "disabled");
          }
        }
      });
      return () => {
        registry.batch(() => {
          for (const clientId of contentOnlyIds) {
            unsetBlockEditingMode(clientId);
          }
          for (const clientId of templatePartChildren) {
            if (!contentOnlySet.has(clientId)) {
              unsetBlockEditingMode(clientId);
            }
          }
        });
      };
    }, [contentOnlyIds, templatePartChildren, registry]);
    return null;
  }

  // packages/editor/build-module/components/provider/navigation-block-editing-mode.mjs
  var import_element30 = __toESM(require_element(), 1);
  var import_data35 = __toESM(require_data(), 1);
  var import_block_editor9 = __toESM(require_block_editor(), 1);
  function NavigationBlockEditingMode() {
    const blockClientId = (0, import_data35.useSelect)(
      (select6) => select6(import_block_editor9.store).getBlockOrder()?.[0],
      []
    );
    const { setBlockEditingMode, unsetBlockEditingMode } = (0, import_data35.useDispatch)(import_block_editor9.store);
    (0, import_element30.useEffect)(() => {
      if (!blockClientId) {
        return;
      }
      setBlockEditingMode(blockClientId, "contentOnly");
      return () => {
        unsetBlockEditingMode(blockClientId);
      };
    }, [blockClientId, unsetBlockEditingMode, setBlockEditingMode]);
  }

  // packages/editor/build-module/components/provider/use-hide-blocks-from-inserter.mjs
  var import_element31 = __toESM(require_element(), 1);
  var import_hooks5 = __toESM(require_hooks(), 1);
  var POST_TYPES_ALLOWING_POST_CONTENT_TEMPLATE_PART = [
    "wp_block",
    "wp_template",
    "wp_template_part"
  ];
  function useHideBlocksFromInserter(postType2, mode) {
    (0, import_element31.useEffect)(() => {
      (0, import_hooks5.addFilter)(
        "blockEditor.__unstableCanInsertBlockType",
        "removeTemplatePartsFromInserter",
        (canInsert, blockType) => {
          if (!POST_TYPES_ALLOWING_POST_CONTENT_TEMPLATE_PART.includes(
            postType2
          ) && blockType.name === "core/template-part" && mode === "post-only") {
            return false;
          }
          return canInsert;
        }
      );
      (0, import_hooks5.addFilter)(
        "blockEditor.__unstableCanInsertBlockType",
        "removePostContentFromInserter",
        (canInsert, blockType, rootClientId, { getBlockParentsByBlockName }) => {
          if (!POST_TYPES_ALLOWING_POST_CONTENT_TEMPLATE_PART.includes(
            postType2
          ) && blockType.name === "core/post-content") {
            return getBlockParentsByBlockName(rootClientId, "core/query").length > 0;
          }
          return canInsert;
        }
      );
      return () => {
        (0, import_hooks5.removeFilter)(
          "blockEditor.__unstableCanInsertBlockType",
          "removeTemplatePartsFromInserter"
        );
        (0, import_hooks5.removeFilter)(
          "blockEditor.__unstableCanInsertBlockType",
          "removePostContentFromInserter"
        );
      };
    }, [postType2, mode]);
  }

  // packages/editor/build-module/components/provider/use-revision-blocks.mjs
  var import_data36 = __toESM(require_data(), 1);
  var import_element32 = __toESM(require_element(), 1);
  var import_blocks10 = __toESM(require_blocks(), 1);

  // packages/editor/build-module/components/post-revisions-preview/block-diff.mjs
  var import_array = __toESM(require_array(), 1);
  var import_word = __toESM(require_word(), 1);
  var import_block_serialization_default_parser = __toESM(require_block_serialization_default_parser(), 1);
  var import_blocks9 = __toESM(require_blocks(), 1);
  var import_rich_text = __toESM(require_rich_text(), 1);
  var import_i18n63 = __toESM(require_i18n(), 1);
  var { parseRawBlock } = unlock(import_blocks9.privateApis);
  function stringifyValue(value) {
    if (value === null || value === void 0) {
      return "";
    }
    if (typeof value === "object") {
      return JSON.stringify(value, null, 2);
    }
    return String(value);
  }
  function textSimilarity(text1, text2) {
    if (!text1 && !text2) {
      return 1;
    }
    if (!text1 || !text2) {
      return 0;
    }
    const segmenter = new Intl.Segmenter(void 0, {
      granularity: "word"
    });
    const wordLikeRegex = /[\p{L}\p{N}]/u;
    const getWords = (text) => {
      const words = [];
      for (const { segment, isWordLike } of segmenter.segment(text)) {
        if (isWordLike || wordLikeRegex.test(segment)) {
          words.push(segment);
        }
      }
      return words;
    };
    const words1 = getWords(text1);
    const words2 = getWords(text2);
    if (words1.length === 0 && words2.length === 0) {
      return 1;
    }
    const set1 = new Set(words1);
    let intersection = 0;
    for (const word of words2) {
      if (set1.has(word)) {
        intersection++;
      }
    }
    const total = Math.max(words1.length, words2.length);
    return total > 0 ? intersection / total : 0;
  }
  function pairSimilarBlocks(blocks) {
    const removed = [];
    const added = [];
    blocks.forEach((block, index2) => {
      const status = block.__revisionDiffStatus?.status;
      if (status === "removed") {
        removed.push({ block, index: index2 });
      } else if (status === "added") {
        added.push({ block, index: index2 });
      }
    });
    if (removed.length === 0 || added.length === 0) {
      return blocks;
    }
    const pairedRemoved = /* @__PURE__ */ new Set();
    const pairedAdded = /* @__PURE__ */ new Set();
    const modifications = /* @__PURE__ */ new Map();
    const SIMILARITY_THRESHOLD = 0.5;
    const addedByName = /* @__PURE__ */ new Map();
    for (const add of added) {
      const name2 = add.block.blockName;
      if (!addedByName.has(name2)) {
        addedByName.set(name2, []);
      }
      addedByName.get(name2).push(add);
    }
    const removedByName = /* @__PURE__ */ new Map();
    for (const rem of removed) {
      const name2 = rem.block.blockName;
      if (!removedByName.has(name2)) {
        removedByName.set(name2, []);
      }
      removedByName.get(name2).push(rem);
    }
    let maxPairedAddedIndex = -1;
    for (const rem of removed) {
      const candidates = addedByName.get(rem.block.blockName) || [];
      const sameNameRemoved = removedByName.get(rem.block.blockName) || [];
      const unpaired = candidates.filter(
        (add) => !modifications.has(add.index) && add.index > maxPairedAddedIndex
      );
      if (unpaired.length === 0) {
        continue;
      }
      let bestMatch = null;
      if (sameNameRemoved.length === 1 && unpaired.length === 1) {
        const add = unpaired[0];
        const attrsMatch = JSON.stringify(rem.block.attrs) === JSON.stringify(add.block.attrs);
        const contentMatch = (rem.block.innerHTML || "") === (add.block.innerHTML || "");
        if (!contentMatch || !attrsMatch) {
          bestMatch = add;
        }
      } else {
        let bestScore = 0;
        for (const add of unpaired) {
          const score = textSimilarity(
            rem.block.innerHTML || "",
            add.block.innerHTML || ""
          );
          const attrsMatch = JSON.stringify(rem.block.attrs) === JSON.stringify(add.block.attrs);
          if (score > bestScore && score > SIMILARITY_THRESHOLD && (score < 1 || !attrsMatch)) {
            bestScore = score;
            bestMatch = add;
          }
        }
      }
      if (bestMatch) {
        maxPairedAddedIndex = bestMatch.index;
        const modifiedBlock = {
          ...bestMatch.block,
          __revisionDiffStatus: { status: "modified" },
          __previousRawBlock: rem.block
        };
        const lo = Math.min(rem.index, bestMatch.index);
        const hi = Math.max(rem.index, bestMatch.index);
        let hasAddedBetween = false;
        for (let i3 = lo + 1; i3 < hi; i3++) {
          if (blocks[i3].__revisionDiffStatus?.status === "added" && !pairedAdded.has(i3)) {
            hasAddedBetween = true;
            break;
          }
        }
        if (hasAddedBetween) {
          modifications.set(bestMatch.index, modifiedBlock);
          pairedRemoved.add(rem.index);
        } else {
          modifications.set(rem.index, modifiedBlock);
          pairedAdded.add(bestMatch.index);
        }
      }
    }
    return blocks.map((block, index2) => {
      if (pairedRemoved.has(index2) || pairedAdded.has(index2)) {
        return null;
      }
      if (modifications.has(index2)) {
        return modifications.get(index2);
      }
      return block;
    }).filter(Boolean);
  }
  function diffRawBlocks(currentRaw, previousRaw) {
    const createBlockSignature = (rawBlock) => JSON.stringify({
      name: rawBlock.blockName,
      attrs: rawBlock.attrs,
      // Use innerContent filtered to non-null and non-whitespace-only strings.
      // This excludes whitespace between inner blocks which changes based on count.
      html: (rawBlock.innerContent || []).filter(
        (c6) => c6 !== null && c6.trim() !== ""
      )
    });
    const currentSigs = currentRaw.map(createBlockSignature);
    const previousSigs = previousRaw.map(createBlockSignature);
    const diff = (0, import_array.diffArrays)(previousSigs, currentSigs);
    const result = [];
    let currIdx = 0;
    let prevIdx = 0;
    for (const part of diff) {
      if (part.added) {
        for (let i3 = 0; i3 < part.count; i3++) {
          result.push({
            ...currentRaw[currIdx++],
            __revisionDiffStatus: { status: "added" }
          });
        }
      } else if (part.removed) {
        for (let i3 = 0; i3 < part.count; i3++) {
          result.push({
            ...previousRaw[prevIdx++],
            __revisionDiffStatus: { status: "removed" }
          });
        }
      } else {
        for (let i3 = 0; i3 < part.count; i3++) {
          const currBlock = currentRaw[currIdx++];
          const prevBlock = previousRaw[prevIdx++];
          const diffedInnerBlocks = diffRawBlocks(
            currBlock.innerBlocks || [],
            prevBlock.innerBlocks || []
          );
          result.push({
            ...currBlock,
            innerBlocks: diffedInnerBlocks
          });
        }
      }
    }
    return pairSimilarBlocks(result);
  }
  function hasFormatChangedAtIndex(currentFormats, previousFormats, currentIndex, previousIndex) {
    const currFmts = currentFormats[currentIndex] || [];
    const prevFmts = previousFormats[previousIndex] || [];
    if (currFmts.length !== prevFmts.length) {
      return true;
    }
    for (const fmt of currFmts) {
      const match3 = prevFmts.find(
        (pf) => pf.type === fmt.type && JSON.stringify(pf.attributes) === JSON.stringify(fmt.attributes)
      );
      if (!match3) {
        return true;
      }
    }
    return false;
  }
  function describeFormatChange(currentFormats, previousFormats, currIdx, prevIdx) {
    const currFmts = currentFormats[currIdx] || [];
    const prevFmts = previousFormats[prevIdx] || [];
    let addedCount = 0;
    let removedCount = 0;
    let changedCount = 0;
    for (const fmt of currFmts) {
      const match3 = prevFmts.find((pf) => pf.type === fmt.type);
      if (!match3) {
        addedCount++;
      } else if (JSON.stringify(fmt.attributes) !== JSON.stringify(match3.attributes)) {
        changedCount++;
      }
    }
    for (const fmt of prevFmts) {
      const match3 = currFmts.find((cf) => cf.type === fmt.type);
      if (!match3) {
        removedCount++;
      }
    }
    if (addedCount > 0 && removedCount === 0 && changedCount === 0) {
      return {
        type: "added",
        description: (0, import_i18n63.sprintf)(
          /* translators: %d: number of formats added */
          (0, import_i18n63._n)("%d format added", "%d formats added", addedCount),
          addedCount
        )
      };
    }
    if (removedCount > 0 && addedCount === 0 && changedCount === 0) {
      return {
        type: "removed",
        description: (0, import_i18n63.sprintf)(
          /* translators: %d: number of formats removed */
          (0, import_i18n63._n)("%d format removed", "%d formats removed", removedCount),
          removedCount
        )
      };
    }
    const parts = [];
    if (addedCount > 0) {
      parts.push(
        (0, import_i18n63.sprintf)(
          /* translators: %d: number of formats added */
          (0, import_i18n63._n)("%d format added", "%d formats added", addedCount),
          addedCount
        )
      );
    }
    if (removedCount > 0) {
      parts.push(
        (0, import_i18n63.sprintf)(
          /* translators: %d: number of formats removed */
          (0, import_i18n63._n)("%d format removed", "%d formats removed", removedCount),
          removedCount
        )
      );
    }
    if (changedCount > 0) {
      parts.push(
        (0, import_i18n63.sprintf)(
          /* translators: %d: number of formats changed */
          (0, import_i18n63._n)("%d format changed", "%d formats changed", changedCount),
          changedCount
        )
      );
    }
    return {
      type: "changed",
      description: parts.join(", ") || (0, import_i18n63.__)("Formatting changed")
    };
  }
  function applyRichTextDiff(currentRichText, previousRichText) {
    const currentText = currentRichText.toPlainText();
    const previousText = previousRichText.toPlainText();
    const textDiff = (0, import_word.diffWords)(previousText, currentText);
    let result = (0, import_rich_text.create)({ text: "" });
    let currentIdx = 0;
    let previousIdx = 0;
    for (const part of textDiff) {
      if (part.removed) {
        const removedSlice = (0, import_rich_text.slice)(
          previousRichText,
          previousIdx,
          previousIdx + part.value.length
        );
        const formatted = (0, import_rich_text.applyFormat)(
          removedSlice,
          {
            type: "revision/diff-removed",
            attributes: { title: (0, import_i18n63.__)("Removed") }
          },
          0,
          part.value.length
        );
        result = (0, import_rich_text.concat)(result, formatted);
        previousIdx += part.value.length;
      } else if (part.added) {
        const addedSlice = (0, import_rich_text.slice)(
          currentRichText,
          currentIdx,
          currentIdx + part.value.length
        );
        const formatted = (0, import_rich_text.applyFormat)(
          addedSlice,
          {
            type: "revision/diff-added",
            attributes: { title: (0, import_i18n63.__)("Added") }
          },
          0,
          part.value.length
        );
        result = (0, import_rich_text.concat)(result, formatted);
        currentIdx += part.value.length;
      } else {
        const currentFormats = currentRichText.formats || [];
        const previousFormats = previousRichText.formats || [];
        const len = part.value.length;
        const checkFormatChanged = (offset3) => hasFormatChangedAtIndex(
          currentFormats,
          previousFormats,
          currentIdx + offset3,
          previousIdx + offset3
        );
        let rangeStart = 0;
        let rangeFormatChanged = checkFormatChanged(0);
        for (let i3 = 1; i3 <= len; i3++) {
          const formatChanged = i3 < len && checkFormatChanged(i3);
          if (i3 === len || formatChanged !== rangeFormatChanged) {
            const rangeSlice = (0, import_rich_text.slice)(
              currentRichText,
              currentIdx + rangeStart,
              currentIdx + i3
            );
            if (rangeFormatChanged) {
              const { type, description } = describeFormatChange(
                currentFormats,
                previousFormats,
                currentIdx + rangeStart,
                previousIdx + rangeStart
              );
              const formatType = {
                added: "revision/diff-format-added",
                removed: "revision/diff-format-removed",
                changed: "revision/diff-format-changed"
              }[type];
              const marked = (0, import_rich_text.applyFormat)(
                rangeSlice,
                {
                  type: formatType,
                  attributes: { title: description }
                },
                0,
                i3 - rangeStart
              );
              result = (0, import_rich_text.concat)(result, marked);
            } else {
              result = (0, import_rich_text.concat)(result, rangeSlice);
            }
            rangeStart = i3;
            rangeFormatChanged = formatChanged;
          }
        }
        currentIdx += part.value.length;
        previousIdx += part.value.length;
      }
    }
    return new import_rich_text.RichTextData(result);
  }
  function applyDiffToBlock(currentBlock, previousBlock, diffStatus) {
    const blockType = (0, import_blocks9.getBlockType)(currentBlock.name);
    if (!blockType) {
      return;
    }
    const changedAttributes = {};
    for (const [attrName, attrDef] of Object.entries(
      blockType.attributes
    )) {
      if (attrDef.source === "rich-text") {
        const currentRichText = currentBlock.attributes[attrName];
        const previousRichText = previousBlock.attributes[attrName];
        if (currentRichText instanceof import_rich_text.RichTextData && previousRichText instanceof import_rich_text.RichTextData) {
          currentBlock.attributes[attrName] = applyRichTextDiff(
            currentRichText,
            previousRichText
          );
        }
      } else {
        const currStr = stringifyValue(
          currentBlock.attributes[attrName]
        );
        const prevStr = stringifyValue(
          previousBlock.attributes[attrName]
        );
        if (currStr !== prevStr) {
          changedAttributes[attrName] = (0, import_word.diffWords)(prevStr, currStr);
        }
      }
    }
    if (Object.keys(changedAttributes).length > 0) {
      diffStatus.changedAttributes = changedAttributes;
    }
  }
  function applyDiffRecursively(parsedBlock, rawBlock) {
    if (rawBlock.__revisionDiffStatus) {
      if (rawBlock.__revisionDiffStatus.status === "modified" && rawBlock.__previousRawBlock) {
        const previousParsed = parseRawBlock(rawBlock.__previousRawBlock);
        if (previousParsed) {
          applyDiffToBlock(
            parsedBlock,
            previousParsed,
            rawBlock.__revisionDiffStatus
          );
        }
      }
      parsedBlock.__revisionDiffStatus = rawBlock.__revisionDiffStatus;
      parsedBlock.attributes.__revisionDiffStatus = rawBlock.__revisionDiffStatus;
    }
    if (parsedBlock.innerBlocks && rawBlock.innerBlocks) {
      for (let i3 = 0; i3 < parsedBlock.innerBlocks.length; i3++) {
        const parsedInner = parsedBlock.innerBlocks[i3];
        const rawInner = rawBlock.innerBlocks[i3];
        if (parsedInner && rawInner) {
          applyDiffRecursively(parsedInner, rawInner);
        }
      }
    }
  }
  function diffRevisionContent(currentContent, previousContent) {
    const currentRaw = (0, import_block_serialization_default_parser.parse)(currentContent || "");
    const previousRaw = (0, import_block_serialization_default_parser.parse)(previousContent || "");
    const mergedRaw = diffRawBlocks(currentRaw, previousRaw);
    return mergedRaw.map((rawBlock) => {
      const parsed = parseRawBlock(rawBlock);
      if (parsed) {
        applyDiffRecursively(parsed, rawBlock);
      }
      return parsed;
    }).filter(Boolean);
  }

  // packages/editor/build-module/components/post-revisions-preview/preserve-client-ids.mjs
  var import_array2 = __toESM(require_array(), 1);
  function preserveClientIds(newBlocks, prevBlocks) {
    if (!prevBlocks?.length || !newBlocks?.length) {
      return newBlocks;
    }
    const newSigs = newBlocks.map((block) => block.name);
    const prevSigs = prevBlocks.map((block) => block.name);
    const diffResult = (0, import_array2.diffArrays)(prevSigs, newSigs);
    let newIndex = 0;
    let prevIndex = 0;
    const result = [];
    for (const chunk of diffResult) {
      if (chunk.removed) {
        prevIndex += chunk.count;
      } else if (chunk.added) {
        for (let i3 = 0; i3 < chunk.count; i3++) {
          result.push(newBlocks[newIndex++]);
        }
      } else {
        for (let i3 = 0; i3 < chunk.count; i3++) {
          const newBlock = newBlocks[newIndex++];
          const prevBlock = prevBlocks[prevIndex++];
          result.push({
            ...newBlock,
            clientId: prevBlock.clientId,
            innerBlocks: preserveClientIds(
              newBlock.innerBlocks,
              prevBlock.innerBlocks
            )
          });
        }
      }
    }
    return result;
  }

  // packages/editor/build-module/components/provider/use-revision-blocks.mjs
  function useRevisionBlocks() {
    const {
      isInRevisionsMode,
      showDiff,
      revision,
      previousRevision,
      postType: postType2
    } = (0, import_data36.useSelect)((select6) => {
      const {
        isRevisionsMode: isRevisionsMode2,
        isShowingRevisionDiff: isShowingRevisionDiff2,
        getCurrentRevision: getCurrentRevision2,
        getPreviousRevision: getPreviousRevision2
      } = unlock(select6(store));
      const { getCurrentPostType: getCurrentPostType2 } = select6(store);
      const inRevisions = isRevisionsMode2();
      return {
        isInRevisionsMode: inRevisions,
        showDiff: isShowingRevisionDiff2(),
        revision: inRevisions ? getCurrentRevision2() : void 0,
        previousRevision: inRevisions ? getPreviousRevision2() : void 0,
        postType: getCurrentPostType2()
      };
    }, []);
    const previousBlocksRef = (0, import_element32.useRef)([]);
    const blocks = (0, import_element32.useMemo)(() => {
      if (!isInRevisionsMode) {
        previousBlocksRef.current = [];
        return null;
      }
      if (!revision) {
        return [];
      }
      const currentContent = revision?.content?.raw ?? "";
      let parsedBlocks;
      if (showDiff) {
        const previousContent = previousRevision?.content?.raw || "";
        parsedBlocks = diffRevisionContent(
          currentContent,
          previousContent
        );
      } else {
        parsedBlocks = (0, import_blocks10.parse)(currentContent);
      }
      if (postType2 === "wp_navigation") {
        parsedBlocks = [
          (0, import_blocks10.createBlock)(
            "core/navigation",
            { templateLock: false },
            parsedBlocks
          )
        ];
      }
      const blocksWithStableIds = preserveClientIds(
        parsedBlocks,
        previousBlocksRef.current
      );
      previousBlocksRef.current = blocksWithStableIds;
      return blocksWithStableIds;
    }, [
      isInRevisionsMode,
      revision,
      revision?.content?.raw,
      previousRevision?.content?.raw,
      postType2,
      showDiff
    ]);
    return blocks;
  }

  // packages/editor/build-module/components/commands/index.mjs
  var import_data44 = __toESM(require_data(), 1);
  var import_i18n66 = __toESM(require_i18n(), 1);
  var import_commands = __toESM(require_commands(), 1);
  var import_preferences8 = __toESM(require_preferences(), 1);
  var import_notices14 = __toESM(require_notices(), 1);
  var import_block_editor10 = __toESM(require_block_editor(), 1);
  var import_core_data32 = __toESM(require_core_data(), 1);

  // packages/interface/build-module/index.mjs
  var build_module_exports = {};
  __export(build_module_exports, {
    ActionItem: () => action_item_default,
    ComplementaryArea: () => complementary_area_default,
    ComplementaryAreaMoreMenuItem: () => ComplementaryAreaMoreMenuItem,
    FullscreenMode: () => fullscreen_mode_default,
    InterfaceSkeleton: () => interface_skeleton_default,
    PinnedItems: () => pinned_items_default,
    store: () => store2
  });

  // packages/interface/build-module/components/complementary-area/index.mjs
  var import_components30 = __toESM(require_components(), 1);
  var import_data41 = __toESM(require_data(), 1);
  var import_i18n64 = __toESM(require_i18n(), 1);
  var import_element34 = __toESM(require_element(), 1);
  var import_viewport = __toESM(require_viewport(), 1);
  var import_preferences7 = __toESM(require_preferences(), 1);
  var import_compose7 = __toESM(require_compose(), 1);
  var import_plugins2 = __toESM(require_plugins(), 1);

  // packages/interface/build-module/components/complementary-area-toggle/index.mjs
  var import_components26 = __toESM(require_components(), 1);
  var import_data40 = __toESM(require_data(), 1);
  var import_plugins = __toESM(require_plugins(), 1);

  // packages/interface/build-module/store/index.mjs
  var import_data39 = __toESM(require_data(), 1);

  // packages/interface/build-module/store/actions.mjs
  var actions_exports2 = {};
  __export(actions_exports2, {
    closeModal: () => closeModal,
    disableComplementaryArea: () => disableComplementaryArea,
    enableComplementaryArea: () => enableComplementaryArea,
    openModal: () => openModal,
    pinItem: () => pinItem,
    setDefaultComplementaryArea: () => setDefaultComplementaryArea,
    setFeatureDefaults: () => setFeatureDefaults,
    setFeatureValue: () => setFeatureValue,
    toggleFeature: () => toggleFeature,
    unpinItem: () => unpinItem
  });
  var import_deprecated5 = __toESM(require_deprecated(), 1);
  var import_preferences5 = __toESM(require_preferences(), 1);

  // packages/interface/build-module/store/deprecated.mjs
  var import_deprecated4 = __toESM(require_deprecated(), 1);
  function normalizeComplementaryAreaScope(scope) {
    if (["core/edit-post", "core/edit-site"].includes(scope)) {
      (0, import_deprecated4.default)(`${scope} interface scope`, {
        alternative: "core interface scope",
        hint: "core/edit-post and core/edit-site are merging.",
        version: "6.6"
      });
      return "core";
    }
    return scope;
  }
  function normalizeComplementaryAreaName(scope, name2) {
    if (scope === "core" && name2 === "edit-site/template") {
      (0, import_deprecated4.default)(`edit-site/template sidebar`, {
        alternative: "edit-post/document",
        version: "6.6"
      });
      return "edit-post/document";
    }
    if (scope === "core" && name2 === "edit-site/block-inspector") {
      (0, import_deprecated4.default)(`edit-site/block-inspector sidebar`, {
        alternative: "edit-post/block",
        version: "6.6"
      });
      return "edit-post/block";
    }
    return name2;
  }

  // packages/interface/build-module/store/actions.mjs
  var setDefaultComplementaryArea = (scope, area) => {
    scope = normalizeComplementaryAreaScope(scope);
    area = normalizeComplementaryAreaName(scope, area);
    return {
      type: "SET_DEFAULT_COMPLEMENTARY_AREA",
      scope,
      area
    };
  };
  var enableComplementaryArea = (scope, area) => ({ registry, dispatch: dispatch7 }) => {
    if (!area) {
      return;
    }
    scope = normalizeComplementaryAreaScope(scope);
    area = normalizeComplementaryAreaName(scope, area);
    const isComplementaryAreaVisible = registry.select(import_preferences5.store).get(scope, "isComplementaryAreaVisible");
    if (!isComplementaryAreaVisible) {
      registry.dispatch(import_preferences5.store).set(scope, "isComplementaryAreaVisible", true);
    }
    dispatch7({
      type: "ENABLE_COMPLEMENTARY_AREA",
      scope,
      area
    });
  };
  var disableComplementaryArea = (scope) => ({ registry }) => {
    scope = normalizeComplementaryAreaScope(scope);
    const isComplementaryAreaVisible = registry.select(import_preferences5.store).get(scope, "isComplementaryAreaVisible");
    if (isComplementaryAreaVisible) {
      registry.dispatch(import_preferences5.store).set(scope, "isComplementaryAreaVisible", false);
    }
  };
  var pinItem = (scope, item) => ({ registry }) => {
    if (!item) {
      return;
    }
    scope = normalizeComplementaryAreaScope(scope);
    item = normalizeComplementaryAreaName(scope, item);
    const pinnedItems = registry.select(import_preferences5.store).get(scope, "pinnedItems");
    if (pinnedItems?.[item] === true) {
      return;
    }
    registry.dispatch(import_preferences5.store).set(scope, "pinnedItems", {
      ...pinnedItems,
      [item]: true
    });
  };
  var unpinItem = (scope, item) => ({ registry }) => {
    if (!item) {
      return;
    }
    scope = normalizeComplementaryAreaScope(scope);
    item = normalizeComplementaryAreaName(scope, item);
    const pinnedItems = registry.select(import_preferences5.store).get(scope, "pinnedItems");
    registry.dispatch(import_preferences5.store).set(scope, "pinnedItems", {
      ...pinnedItems,
      [item]: false
    });
  };
  function toggleFeature(scope, featureName) {
    return function({ registry }) {
      (0, import_deprecated5.default)(`dispatch( 'core/interface' ).toggleFeature`, {
        since: "6.0",
        alternative: `dispatch( 'core/preferences' ).toggle`
      });
      registry.dispatch(import_preferences5.store).toggle(scope, featureName);
    };
  }
  function setFeatureValue(scope, featureName, value) {
    return function({ registry }) {
      (0, import_deprecated5.default)(`dispatch( 'core/interface' ).setFeatureValue`, {
        since: "6.0",
        alternative: `dispatch( 'core/preferences' ).set`
      });
      registry.dispatch(import_preferences5.store).set(scope, featureName, !!value);
    };
  }
  function setFeatureDefaults(scope, defaults2) {
    return function({ registry }) {
      (0, import_deprecated5.default)(`dispatch( 'core/interface' ).setFeatureDefaults`, {
        since: "6.0",
        alternative: `dispatch( 'core/preferences' ).setDefaults`
      });
      registry.dispatch(import_preferences5.store).setDefaults(scope, defaults2);
    };
  }
  function openModal(name2) {
    return {
      type: "OPEN_MODAL",
      name: name2
    };
  }
  function closeModal() {
    return {
      type: "CLOSE_MODAL"
    };
  }

  // packages/interface/build-module/store/selectors.mjs
  var selectors_exports2 = {};
  __export(selectors_exports2, {
    getActiveComplementaryArea: () => getActiveComplementaryArea,
    isComplementaryAreaLoading: () => isComplementaryAreaLoading,
    isFeatureActive: () => isFeatureActive,
    isItemPinned: () => isItemPinned,
    isModalActive: () => isModalActive
  });
  var import_data37 = __toESM(require_data(), 1);
  var import_deprecated7 = __toESM(require_deprecated(), 1);
  var import_preferences6 = __toESM(require_preferences(), 1);
  var getActiveComplementaryArea = (0, import_data37.createRegistrySelector)(
    (select6) => (state, scope) => {
      scope = normalizeComplementaryAreaScope(scope);
      const isComplementaryAreaVisible = select6(import_preferences6.store).get(
        scope,
        "isComplementaryAreaVisible"
      );
      if (isComplementaryAreaVisible === void 0) {
        return void 0;
      }
      if (isComplementaryAreaVisible === false) {
        return null;
      }
      return state?.complementaryAreas?.[scope];
    }
  );
  var isComplementaryAreaLoading = (0, import_data37.createRegistrySelector)(
    (select6) => (state, scope) => {
      scope = normalizeComplementaryAreaScope(scope);
      const isVisible = select6(import_preferences6.store).get(
        scope,
        "isComplementaryAreaVisible"
      );
      const identifier = state?.complementaryAreas?.[scope];
      return isVisible && identifier === void 0;
    }
  );
  var isItemPinned = (0, import_data37.createRegistrySelector)(
    (select6) => (state, scope, item) => {
      scope = normalizeComplementaryAreaScope(scope);
      item = normalizeComplementaryAreaName(scope, item);
      const pinnedItems = select6(import_preferences6.store).get(
        scope,
        "pinnedItems"
      );
      return pinnedItems?.[item] ?? true;
    }
  );
  var isFeatureActive = (0, import_data37.createRegistrySelector)(
    (select6) => (state, scope, featureName) => {
      (0, import_deprecated7.default)(
        `select( 'core/interface' ).isFeatureActive( scope, featureName )`,
        {
          since: "6.0",
          alternative: `select( 'core/preferences' ).get( scope, featureName )`
        }
      );
      return !!select6(import_preferences6.store).get(scope, featureName);
    }
  );
  function isModalActive(state, modalName3) {
    return state.activeModal === modalName3;
  }

  // packages/interface/build-module/store/reducer.mjs
  var import_data38 = __toESM(require_data(), 1);
  function complementaryAreas(state = {}, action) {
    switch (action.type) {
      case "SET_DEFAULT_COMPLEMENTARY_AREA": {
        const { scope, area } = action;
        if (state[scope]) {
          return state;
        }
        return {
          ...state,
          [scope]: area
        };
      }
      case "ENABLE_COMPLEMENTARY_AREA": {
        const { scope, area } = action;
        return {
          ...state,
          [scope]: area
        };
      }
    }
    return state;
  }
  function activeModal(state = null, action) {
    switch (action.type) {
      case "OPEN_MODAL":
        return action.name;
      case "CLOSE_MODAL":
        return null;
    }
    return state;
  }
  var reducer_default3 = (0, import_data38.combineReducers)({
    complementaryAreas,
    activeModal
  });

  // packages/interface/build-module/store/constants.mjs
  var STORE_NAME2 = "core/interface";

  // packages/interface/build-module/store/index.mjs
  var store2 = (0, import_data39.createReduxStore)(STORE_NAME2, {
    reducer: reducer_default3,
    actions: actions_exports2,
    selectors: selectors_exports2
  });
  (0, import_data39.register)(store2);

  // packages/interface/build-module/components/complementary-area-toggle/index.mjs
  var import_jsx_runtime111 = __toESM(require_jsx_runtime(), 1);
  function roleSupportsCheckedState(role) {
    return [
      "checkbox",
      "option",
      "radio",
      "switch",
      "menuitemcheckbox",
      "menuitemradio",
      "treeitem"
    ].includes(role);
  }
  function ComplementaryAreaToggle({
    as = import_components26.Button,
    scope,
    identifier: identifierProp,
    icon: iconProp,
    selectedIcon,
    name: name2,
    shortcut,
    ...props
  }) {
    const ComponentToUse = as;
    const context = (0, import_plugins.usePluginContext)();
    const icon = iconProp || context.icon;
    const identifier = identifierProp || `${context.name}/${name2}`;
    const isSelected = (0, import_data40.useSelect)(
      (select6) => select6(store2).getActiveComplementaryArea(scope) === identifier,
      [identifier, scope]
    );
    const { enableComplementaryArea: enableComplementaryArea2, disableComplementaryArea: disableComplementaryArea2 } = (0, import_data40.useDispatch)(store2);
    return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
      ComponentToUse,
      {
        icon: selectedIcon && isSelected ? selectedIcon : icon,
        "aria-controls": identifier.replace("/", ":"),
        "aria-checked": roleSupportsCheckedState(props.role) ? isSelected : void 0,
        onClick: () => {
          if (isSelected) {
            disableComplementaryArea2(scope);
          } else {
            enableComplementaryArea2(scope, identifier);
          }
        },
        shortcut,
        ...props
      }
    );
  }

  // packages/interface/build-module/components/complementary-area-header/index.mjs
  var import_jsx_runtime112 = __toESM(require_jsx_runtime(), 1);
  var ComplementaryAreaHeader = ({
    children,
    className,
    toggleButtonProps
  }) => {
    const toggleButton = /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(ComplementaryAreaToggle, { icon: close_small_default, ...toggleButtonProps });
    return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
      "div",
      {
        className: clsx_default(
          "components-panel__header",
          "interface-complementary-area-header",
          className
        ),
        tabIndex: -1,
        children: [
          children,
          toggleButton
        ]
      }
    );
  };
  var complementary_area_header_default = ComplementaryAreaHeader;

  // packages/interface/build-module/components/complementary-area-more-menu-item/index.mjs
  var import_components28 = __toESM(require_components(), 1);

  // packages/interface/build-module/components/action-item/index.mjs
  var import_components27 = __toESM(require_components(), 1);
  var import_element33 = __toESM(require_element(), 1);
  var import_jsx_runtime113 = __toESM(require_jsx_runtime(), 1);
  var noop3 = () => {
  };
  function ActionItemSlot({
    name: name2,
    as: Component6 = import_components27.MenuGroup,
    fillProps = {},
    bubblesVirtually,
    ...props
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
      import_components27.Slot,
      {
        name: name2,
        bubblesVirtually,
        fillProps,
        children: (fills) => {
          if (!import_element33.Children.toArray(fills).length) {
            return null;
          }
          const initializedByPlugins = [];
          import_element33.Children.forEach(
            fills,
            ({
              props: { __unstableExplicitMenuItem, __unstableTarget }
            }) => {
              if (__unstableTarget && __unstableExplicitMenuItem) {
                initializedByPlugins.push(__unstableTarget);
              }
            }
          );
          const children = import_element33.Children.map(fills, (child) => {
            if (!child.props.__unstableExplicitMenuItem && initializedByPlugins.includes(
              child.props.__unstableTarget
            )) {
              return null;
            }
            return child;
          });
          return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Component6, { ...props, children });
        }
      }
    );
  }
  function ActionItem({ name: name2, as: Component6 = import_components27.Button, onClick, ...props }) {
    return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_components27.Fill, { name: name2, children: ({ onClick: fpOnClick }) => {
      return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
        Component6,
        {
          onClick: onClick || fpOnClick ? (...args) => {
            (onClick || noop3)(...args);
            (fpOnClick || noop3)(...args);
          } : void 0,
          ...props
        }
      );
    } });
  }
  ActionItem.Slot = ActionItemSlot;
  var action_item_default = ActionItem;

  // packages/interface/build-module/components/complementary-area-more-menu-item/index.mjs
  var import_jsx_runtime114 = __toESM(require_jsx_runtime(), 1);
  var PluginsMenuItem = ({
    // Menu item is marked with unstable prop for backward compatibility.
    // They are removed so they don't leak to DOM elements.
    // @see https://github.com/WordPress/gutenberg/issues/14457
    __unstableExplicitMenuItem,
    __unstableTarget,
    ...restProps
  }) => /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_components28.MenuItem, { ...restProps });
  function ComplementaryAreaMoreMenuItem({
    scope,
    target,
    __unstableExplicitMenuItem,
    ...props
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
      ComplementaryAreaToggle,
      {
        as: (toggleProps) => {
          return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
            action_item_default,
            {
              __unstableExplicitMenuItem,
              __unstableTarget: `${scope}/${target}`,
              as: PluginsMenuItem,
              name: `${scope}/plugin-more-menu`,
              ...toggleProps
            }
          );
        },
        role: "menuitemcheckbox",
        selectedIcon: check_default,
        name: target,
        scope,
        ...props
      }
    );
  }

  // packages/interface/build-module/components/pinned-items/index.mjs
  var import_components29 = __toESM(require_components(), 1);
  var import_jsx_runtime115 = __toESM(require_jsx_runtime(), 1);
  function PinnedItems({ scope, ...props }) {
    return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_components29.Fill, { name: `PinnedItems/${scope}`, ...props });
  }
  function PinnedItemsSlot({ scope, className, ...props }) {
    return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_components29.Slot, { name: `PinnedItems/${scope}`, ...props, children: (fills) => fills?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
      "div",
      {
        className: clsx_default(
          className,
          "interface-pinned-items"
        ),
        children: fills
      }
    ) });
  }
  PinnedItems.Slot = PinnedItemsSlot;
  var pinned_items_default = PinnedItems;

  // packages/interface/build-module/components/complementary-area/index.mjs
  var import_jsx_runtime116 = __toESM(require_jsx_runtime(), 1);
  var ANIMATION_DURATION = 0.3;
  function ComplementaryAreaSlot({ scope, ...props }) {
    return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_components30.Slot, { name: `ComplementaryArea/${scope}`, ...props });
  }
  var SIDEBAR_WIDTH = 280;
  var variants = {
    open: { width: SIDEBAR_WIDTH },
    closed: { width: 0 },
    mobileOpen: { width: "100vw" }
  };
  function ComplementaryAreaFill({
    activeArea,
    isActive,
    scope,
    children,
    className,
    id
  }) {
    const disableMotion = (0, import_compose7.useReducedMotion)();
    const isMobileViewport = (0, import_compose7.useViewportMatch)("medium", "<");
    const previousActiveArea = (0, import_compose7.usePrevious)(activeArea);
    const previousIsActive = (0, import_compose7.usePrevious)(isActive);
    const [, setState] = (0, import_element34.useState)({});
    (0, import_element34.useEffect)(() => {
      setState({});
    }, [isActive]);
    const transition = {
      type: "tween",
      duration: disableMotion || isMobileViewport || !!previousActiveArea && !!activeArea && activeArea !== previousActiveArea ? 0 : ANIMATION_DURATION,
      ease: [0.6, 0, 0.4, 1]
    };
    return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_components30.Fill, { name: `ComplementaryArea/${scope}`, children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_components30.__unstableAnimatePresence, { initial: false, children: (previousIsActive || isActive) && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
      import_components30.__unstableMotion.div,
      {
        variants,
        initial: "closed",
        animate: isMobileViewport ? "mobileOpen" : "open",
        exit: "closed",
        transition,
        className: "interface-complementary-area__fill",
        children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
          "div",
          {
            id,
            className,
            style: {
              width: isMobileViewport ? "100vw" : SIDEBAR_WIDTH
            },
            children
          }
        )
      }
    ) }) });
  }
  function useAdjustComplementaryListener(scope, identifier, activeArea, isActive, isSmall) {
    const previousIsSmallRef = (0, import_element34.useRef)(false);
    const shouldOpenWhenNotSmallRef = (0, import_element34.useRef)(false);
    const { enableComplementaryArea: enableComplementaryArea2, disableComplementaryArea: disableComplementaryArea2 } = (0, import_data41.useDispatch)(store2);
    (0, import_element34.useEffect)(() => {
      if (isActive && isSmall && !previousIsSmallRef.current) {
        disableComplementaryArea2(scope);
        shouldOpenWhenNotSmallRef.current = true;
      } else if (
        // If there is a flag indicating the complementary area should be
        // enabled when we go from small to big window size and we are going
        // from a small to big window size.
        shouldOpenWhenNotSmallRef.current && !isSmall && previousIsSmallRef.current
      ) {
        shouldOpenWhenNotSmallRef.current = false;
        enableComplementaryArea2(scope, identifier);
      } else if (
        // If the flag is indicating the current complementary should be
        // reopened but another complementary area becomes active, remove
        // the flag.
        shouldOpenWhenNotSmallRef.current && activeArea && activeArea !== identifier
      ) {
        shouldOpenWhenNotSmallRef.current = false;
      }
      if (isSmall !== previousIsSmallRef.current) {
        previousIsSmallRef.current = isSmall;
      }
    }, [
      isActive,
      isSmall,
      scope,
      identifier,
      activeArea,
      disableComplementaryArea2,
      enableComplementaryArea2
    ]);
  }
  function ComplementaryArea({
    children,
    className,
    closeLabel = (0, import_i18n64.__)("Close plugin"),
    identifier: identifierProp,
    header,
    headerClassName,
    icon: iconProp,
    isPinnable = true,
    panelClassName,
    scope,
    name: name2,
    title,
    toggleShortcut,
    isActiveByDefault
  }) {
    const context = (0, import_plugins2.usePluginContext)();
    const icon = iconProp || context.icon;
    const identifier = identifierProp || `${context.name}/${name2}`;
    const [isReady2, setIsReady2] = (0, import_element34.useState)(false);
    const {
      isLoading,
      isActive,
      isPinned,
      activeArea,
      isSmall,
      isLarge,
      showIconLabels
    } = (0, import_data41.useSelect)(
      (select6) => {
        const {
          getActiveComplementaryArea: getActiveComplementaryArea2,
          isComplementaryAreaLoading: isComplementaryAreaLoading2,
          isItemPinned: isItemPinned2
        } = select6(store2);
        const { get } = select6(import_preferences7.store);
        const _activeArea = getActiveComplementaryArea2(scope);
        return {
          isLoading: isComplementaryAreaLoading2(scope),
          isActive: _activeArea === identifier,
          isPinned: isItemPinned2(scope, identifier),
          activeArea: _activeArea,
          isSmall: select6(import_viewport.store).isViewportMatch("< medium"),
          isLarge: select6(import_viewport.store).isViewportMatch("large"),
          showIconLabels: get("core", "showIconLabels")
        };
      },
      [identifier, scope]
    );
    const isMobileViewport = (0, import_compose7.useViewportMatch)("medium", "<");
    useAdjustComplementaryListener(
      scope,
      identifier,
      activeArea,
      isActive,
      isSmall
    );
    const {
      enableComplementaryArea: enableComplementaryArea2,
      disableComplementaryArea: disableComplementaryArea2,
      pinItem: pinItem2,
      unpinItem: unpinItem2
    } = (0, import_data41.useDispatch)(store2);
    (0, import_element34.useEffect)(() => {
      if (isActiveByDefault && activeArea === void 0 && !isSmall) {
        enableComplementaryArea2(scope, identifier);
      } else if (activeArea === void 0 && isSmall) {
        disableComplementaryArea2(scope, identifier);
      }
      setIsReady2(true);
    }, [
      activeArea,
      isActiveByDefault,
      scope,
      identifier,
      isSmall,
      enableComplementaryArea2,
      disableComplementaryArea2
    ]);
    if (!isReady2) {
      return;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(import_jsx_runtime116.Fragment, { children: [
      isPinnable && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(pinned_items_default, { scope, children: isPinned && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
        ComplementaryAreaToggle,
        {
          scope,
          identifier,
          isPressed: isActive && (!showIconLabels || isLarge),
          "aria-expanded": isActive,
          "aria-disabled": isLoading,
          label: title,
          icon: showIconLabels ? check_default : icon,
          showTooltip: !showIconLabels,
          variant: showIconLabels ? "tertiary" : void 0,
          size: "compact",
          shortcut: toggleShortcut
        }
      ) }),
      name2 && isPinnable && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
        ComplementaryAreaMoreMenuItem,
        {
          target: name2,
          scope,
          icon,
          identifier,
          children: title
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
        ComplementaryAreaFill,
        {
          activeArea,
          isActive,
          className: clsx_default("interface-complementary-area", className),
          scope,
          id: identifier.replace("/", ":"),
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
              complementary_area_header_default,
              {
                className: headerClassName,
                closeLabel,
                onClose: () => disableComplementaryArea2(scope),
                toggleButtonProps: {
                  label: closeLabel,
                  size: "compact",
                  shortcut: toggleShortcut,
                  scope,
                  identifier
                },
                children: header || /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(import_jsx_runtime116.Fragment, { children: [
                  /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("h2", { className: "interface-complementary-area-header__title", children: title }),
                  isPinnable && !isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
                    import_components30.Button,
                    {
                      className: "interface-complementary-area__pin-unpin-item",
                      icon: isPinned ? star_filled_default : star_empty_default,
                      label: isPinned ? (0, import_i18n64.__)("Unpin from toolbar") : (0, import_i18n64.__)("Pin to toolbar"),
                      onClick: () => (isPinned ? unpinItem2 : pinItem2)(
                        scope,
                        identifier
                      ),
                      isPressed: isPinned,
                      "aria-expanded": isPinned,
                      size: "compact"
                    }
                  )
                ] })
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_components30.Panel, { className: panelClassName, children })
          ]
        }
      )
    ] });
  }
  ComplementaryArea.Slot = ComplementaryAreaSlot;
  var complementary_area_default = ComplementaryArea;

  // packages/interface/build-module/components/fullscreen-mode/index.mjs
  var import_element35 = __toESM(require_element(), 1);
  var FullscreenMode = ({ isActive }) => {
    (0, import_element35.useEffect)(() => {
      let isSticky = false;
      if (document.body.classList.contains("sticky-menu")) {
        isSticky = true;
        document.body.classList.remove("sticky-menu");
      }
      return () => {
        if (isSticky) {
          document.body.classList.add("sticky-menu");
        }
      };
    }, []);
    (0, import_element35.useEffect)(() => {
      if (isActive) {
        document.body.classList.add("is-fullscreen-mode");
      } else {
        document.body.classList.remove("is-fullscreen-mode");
      }
      return () => {
        if (isActive) {
          document.body.classList.remove("is-fullscreen-mode");
        }
      };
    }, [isActive]);
    return null;
  };
  var fullscreen_mode_default = FullscreenMode;

  // packages/admin-ui/build-module/navigable-region/index.mjs
  var import_element36 = __toESM(require_element(), 1);
  var import_jsx_runtime117 = __toESM(require_jsx_runtime(), 1);
  var NavigableRegion = (0, import_element36.forwardRef)(
    ({ children, className, ariaLabel, as: Tag = "div", ...props }, ref) => {
      return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
        Tag,
        {
          ref,
          className: clsx_default("admin-ui-navigable-region", className),
          "aria-label": ariaLabel,
          role: "region",
          tabIndex: "-1",
          ...props,
          children
        }
      );
    }
  );
  NavigableRegion.displayName = "NavigableRegion";
  var navigable_region_default = NavigableRegion;

  // node_modules/@base-ui/utils/esm/useRefWithInit.js
  var React3 = __toESM(require_react(), 1);
  var UNINITIALIZED = {};
  function useRefWithInit(init, initArg) {
    const ref = React3.useRef(UNINITIALIZED);
    if (ref.current === UNINITIALIZED) {
      ref.current = init(initArg);
    }
    return ref;
  }

  // node_modules/@base-ui/react/esm/utils/useRenderElement.js
  var React6 = __toESM(require_react(), 1);

  // node_modules/@base-ui/utils/esm/useMergedRefs.js
  function useMergedRefs(a3, b3, c6, d3) {
    const forkRef = useRefWithInit(createForkRef).current;
    if (didChange(forkRef, a3, b3, c6, d3)) {
      update3(forkRef, [a3, b3, c6, d3]);
    }
    return forkRef.callback;
  }
  function useMergedRefsN(refs) {
    const forkRef = useRefWithInit(createForkRef).current;
    if (didChangeN(forkRef, refs)) {
      update3(forkRef, refs);
    }
    return forkRef.callback;
  }
  function createForkRef() {
    return {
      callback: null,
      cleanup: null,
      refs: []
    };
  }
  function didChange(forkRef, a3, b3, c6, d3) {
    return forkRef.refs[0] !== a3 || forkRef.refs[1] !== b3 || forkRef.refs[2] !== c6 || forkRef.refs[3] !== d3;
  }
  function didChangeN(forkRef, newRefs) {
    return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index2) => ref !== newRefs[index2]);
  }
  function update3(forkRef, refs) {
    forkRef.refs = refs;
    if (refs.every((ref) => ref == null)) {
      forkRef.callback = null;
      return;
    }
    forkRef.callback = (instance) => {
      if (forkRef.cleanup) {
        forkRef.cleanup();
        forkRef.cleanup = null;
      }
      if (instance != null) {
        const cleanupCallbacks = Array(refs.length).fill(null);
        for (let i3 = 0; i3 < refs.length; i3 += 1) {
          const ref = refs[i3];
          if (ref == null) {
            continue;
          }
          switch (typeof ref) {
            case "function": {
              const refCleanup = ref(instance);
              if (typeof refCleanup === "function") {
                cleanupCallbacks[i3] = refCleanup;
              }
              break;
            }
            case "object": {
              ref.current = instance;
              break;
            }
            default:
          }
        }
        forkRef.cleanup = () => {
          for (let i3 = 0; i3 < refs.length; i3 += 1) {
            const ref = refs[i3];
            if (ref == null) {
              continue;
            }
            switch (typeof ref) {
              case "function": {
                const cleanupCallback = cleanupCallbacks[i3];
                if (typeof cleanupCallback === "function") {
                  cleanupCallback();
                } else {
                  ref(null);
                }
                break;
              }
              case "object": {
                ref.current = null;
                break;
              }
              default:
            }
          }
        };
      }
    };
  }

  // node_modules/@base-ui/utils/esm/getReactElementRef.js
  var React5 = __toESM(require_react(), 1);

  // node_modules/@base-ui/utils/esm/reactVersion.js
  var React4 = __toESM(require_react(), 1);
  var majorVersion = parseInt(React4.version, 10);
  function isReactVersionAtLeast(reactVersionToCheck) {
    return majorVersion >= reactVersionToCheck;
  }

  // node_modules/@base-ui/utils/esm/getReactElementRef.js
  function getReactElementRef(element) {
    if (!/* @__PURE__ */ React5.isValidElement(element)) {
      return null;
    }
    const reactElement = element;
    const propsWithRef = reactElement.props;
    return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
  }

  // node_modules/@base-ui/utils/esm/mergeObjects.js
  function mergeObjects(a3, b3) {
    if (a3 && !b3) {
      return a3;
    }
    if (!a3 && b3) {
      return b3;
    }
    if (a3 || b3) {
      return {
        ...a3,
        ...b3
      };
    }
    return void 0;
  }

  // node_modules/@base-ui/react/esm/utils/getStateAttributesProps.js
  function getStateAttributesProps(state, customMapping) {
    const props = {};
    for (const key in state) {
      const value = state[key];
      if (customMapping?.hasOwnProperty(key)) {
        const customProps = customMapping[key](value);
        if (customProps != null) {
          Object.assign(props, customProps);
        }
        continue;
      }
      if (value === true) {
        props[`data-${key.toLowerCase()}`] = "";
      } else if (value) {
        props[`data-${key.toLowerCase()}`] = value.toString();
      }
    }
    return props;
  }

  // node_modules/@base-ui/react/esm/utils/resolveClassName.js
  function resolveClassName(className, state) {
    return typeof className === "function" ? className(state) : className;
  }

  // node_modules/@base-ui/react/esm/utils/resolveStyle.js
  function resolveStyle(style, state) {
    return typeof style === "function" ? style(state) : style;
  }

  // node_modules/@base-ui/react/esm/merge-props/mergeProps.js
  var EMPTY_PROPS = {};
  function mergeProps(a3, b3, c6, d3, e3) {
    let merged = {
      ...resolvePropsGetter(a3, EMPTY_PROPS)
    };
    if (b3) {
      merged = mergeOne(merged, b3);
    }
    if (c6) {
      merged = mergeOne(merged, c6);
    }
    if (d3) {
      merged = mergeOne(merged, d3);
    }
    if (e3) {
      merged = mergeOne(merged, e3);
    }
    return merged;
  }
  function mergePropsN(props) {
    if (props.length === 0) {
      return EMPTY_PROPS;
    }
    if (props.length === 1) {
      return resolvePropsGetter(props[0], EMPTY_PROPS);
    }
    let merged = {
      ...resolvePropsGetter(props[0], EMPTY_PROPS)
    };
    for (let i3 = 1; i3 < props.length; i3 += 1) {
      merged = mergeOne(merged, props[i3]);
    }
    return merged;
  }
  function mergeOne(merged, inputProps) {
    if (isPropsGetter(inputProps)) {
      return inputProps(merged);
    }
    return mutablyMergeInto(merged, inputProps);
  }
  function mutablyMergeInto(mergedProps, externalProps) {
    if (!externalProps) {
      return mergedProps;
    }
    for (const propName in externalProps) {
      const externalPropValue = externalProps[propName];
      switch (propName) {
        case "style": {
          mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
          break;
        }
        case "className": {
          mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
          break;
        }
        default: {
          if (isEventHandler(propName, externalPropValue)) {
            mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
          } else {
            mergedProps[propName] = externalPropValue;
          }
        }
      }
    }
    return mergedProps;
  }
  function isEventHandler(key, value) {
    const code0 = key.charCodeAt(0);
    const code1 = key.charCodeAt(1);
    const code2 = key.charCodeAt(2);
    return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
  }
  function isPropsGetter(inputProps) {
    return typeof inputProps === "function";
  }
  function resolvePropsGetter(inputProps, previousProps) {
    if (isPropsGetter(inputProps)) {
      return inputProps(previousProps);
    }
    return inputProps ?? EMPTY_PROPS;
  }
  function mergeEventHandlers(ourHandler, theirHandler) {
    if (!theirHandler) {
      return ourHandler;
    }
    if (!ourHandler) {
      return theirHandler;
    }
    return (event) => {
      if (isSyntheticEvent(event)) {
        const baseUIEvent = event;
        makeEventPreventable(baseUIEvent);
        const result2 = theirHandler(baseUIEvent);
        if (!baseUIEvent.baseUIHandlerPrevented) {
          ourHandler?.(baseUIEvent);
        }
        return result2;
      }
      const result = theirHandler(event);
      ourHandler?.(event);
      return result;
    };
  }
  function makeEventPreventable(event) {
    event.preventBaseUIHandler = () => {
      event.baseUIHandlerPrevented = true;
    };
    return event;
  }
  function mergeClassNames(ourClassName, theirClassName) {
    if (theirClassName) {
      if (ourClassName) {
        return theirClassName + " " + ourClassName;
      }
      return theirClassName;
    }
    return ourClassName;
  }
  function isSyntheticEvent(event) {
    return event != null && typeof event === "object" && "nativeEvent" in event;
  }

  // node_modules/@base-ui/utils/esm/empty.js
  var EMPTY_ARRAY4 = Object.freeze([]);
  var EMPTY_OBJECT4 = Object.freeze({});

  // node_modules/@base-ui/react/esm/utils/useRenderElement.js
  var import_react4 = __toESM(require_react(), 1);
  function useRenderElement(element, componentProps, params = {}) {
    const renderProp = componentProps.render;
    const outProps = useRenderElementProps(componentProps, params);
    if (params.enabled === false) {
      return null;
    }
    const state = params.state ?? EMPTY_OBJECT4;
    return evaluateRenderProp(element, renderProp, outProps, state);
  }
  function useRenderElementProps(componentProps, params = {}) {
    const {
      className: classNameProp,
      style: styleProp,
      render: renderProp
    } = componentProps;
    const {
      state = EMPTY_OBJECT4,
      ref,
      props,
      stateAttributesMapping,
      enabled = true
    } = params;
    const className = enabled ? resolveClassName(classNameProp, state) : void 0;
    const style = enabled ? resolveStyle(styleProp, state) : void 0;
    const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT4;
    const outProps = enabled ? mergeObjects(stateProps, Array.isArray(props) ? mergePropsN(props) : props) ?? EMPTY_OBJECT4 : EMPTY_OBJECT4;
    if (typeof document !== "undefined") {
      if (!enabled) {
        useMergedRefs(null, null);
      } else if (Array.isArray(ref)) {
        outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
      } else {
        outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
      }
    }
    if (!enabled) {
      return EMPTY_OBJECT4;
    }
    if (className !== void 0) {
      outProps.className = mergeClassNames(outProps.className, className);
    }
    if (style !== void 0) {
      outProps.style = mergeObjects(outProps.style, style);
    }
    return outProps;
  }
  function evaluateRenderProp(element, render4, props, state) {
    if (render4) {
      if (typeof render4 === "function") {
        return render4(props, state);
      }
      const mergedProps = mergeProps(props, render4.props);
      mergedProps.ref = props.ref;
      return /* @__PURE__ */ React6.cloneElement(render4, mergedProps);
    }
    if (element) {
      if (typeof element === "string") {
        return renderTag(element, props);
      }
    }
    throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage(8));
  }
  function renderTag(Tag, props) {
    if (Tag === "button") {
      return /* @__PURE__ */ (0, import_react4.createElement)("button", {
        type: "button",
        ...props,
        key: props.key
      });
    }
    if (Tag === "img") {
      return /* @__PURE__ */ (0, import_react4.createElement)("img", {
        alt: "",
        ...props,
        key: props.key
      });
    }
    return /* @__PURE__ */ React6.createElement(Tag, props);
  }

  // node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
  function hasWindow() {
    return typeof window !== "undefined";
  }
  function getNodeName(node) {
    if (isNode(node)) {
      return (node.nodeName || "").toLowerCase();
    }
    return "#document";
  }
  function getWindow(node) {
    var _node$ownerDocument;
    return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
  }
  function getDocumentElement(node) {
    var _ref;
    return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
  }
  function isNode(value) {
    if (!hasWindow()) {
      return false;
    }
    return value instanceof Node || value instanceof getWindow(value).Node;
  }
  function isElement(value) {
    if (!hasWindow()) {
      return false;
    }
    return value instanceof Element || value instanceof getWindow(value).Element;
  }
  function isHTMLElement(value) {
    if (!hasWindow()) {
      return false;
    }
    return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
  }
  function isShadowRoot(value) {
    if (!hasWindow() || typeof ShadowRoot === "undefined") {
      return false;
    }
    return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
  }
  var invalidOverflowDisplayValues = /* @__PURE__ */ new Set(["inline", "contents"]);
  function isOverflowElement(element) {
    const {
      overflow,
      overflowX,
      overflowY,
      display
    } = getComputedStyle2(element);
    return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
  }
  var tableElements = /* @__PURE__ */ new Set(["table", "td", "th"]);
  function isTableElement(element) {
    return tableElements.has(getNodeName(element));
  }
  var topLayerSelectors = [":popover-open", ":modal"];
  function isTopLayer(element) {
    return topLayerSelectors.some((selector) => {
      try {
        return element.matches(selector);
      } catch (_e) {
        return false;
      }
    });
  }
  var transformProperties = ["transform", "translate", "scale", "rotate", "perspective"];
  var willChangeValues = ["transform", "translate", "scale", "rotate", "perspective", "filter"];
  var containValues = ["paint", "layout", "strict", "content"];
  function isContainingBlock(elementOrCss) {
    const webkit = isWebKit();
    const css = isElement(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss;
    return transformProperties.some((value) => css[value] ? css[value] !== "none" : false) || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || willChangeValues.some((value) => (css.willChange || "").includes(value)) || containValues.some((value) => (css.contain || "").includes(value));
  }
  function getContainingBlock(element) {
    let currentNode = getParentNode(element);
    while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
      if (isContainingBlock(currentNode)) {
        return currentNode;
      } else if (isTopLayer(currentNode)) {
        return null;
      }
      currentNode = getParentNode(currentNode);
    }
    return null;
  }
  function isWebKit() {
    if (typeof CSS === "undefined" || !CSS.supports) return false;
    return CSS.supports("-webkit-backdrop-filter", "none");
  }
  var lastTraversableNodeNames = /* @__PURE__ */ new Set(["html", "body", "#document"]);
  function isLastTraversableNode(node) {
    return lastTraversableNodeNames.has(getNodeName(node));
  }
  function getComputedStyle2(element) {
    return getWindow(element).getComputedStyle(element);
  }
  function getNodeScroll(element) {
    if (isElement(element)) {
      return {
        scrollLeft: element.scrollLeft,
        scrollTop: element.scrollTop
      };
    }
    return {
      scrollLeft: element.scrollX,
      scrollTop: element.scrollY
    };
  }
  function getParentNode(node) {
    if (getNodeName(node) === "html") {
      return node;
    }
    const result = (
      // Step into the shadow DOM of the parent of a slotted node.
      node.assignedSlot || // DOM Element detected.
      node.parentNode || // ShadowRoot detected.
      isShadowRoot(node) && node.host || // Fallback.
      getDocumentElement(node)
    );
    return isShadowRoot(result) ? result.host : result;
  }
  function getNearestOverflowAncestor(node) {
    const parentNode = getParentNode(node);
    if (isLastTraversableNode(parentNode)) {
      return node.ownerDocument ? node.ownerDocument.body : node.body;
    }
    if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
      return parentNode;
    }
    return getNearestOverflowAncestor(parentNode);
  }
  function getOverflowAncestors(node, list, traverseIframes) {
    var _node$ownerDocument2;
    if (list === void 0) {
      list = [];
    }
    if (traverseIframes === void 0) {
      traverseIframes = true;
    }
    const scrollableAncestor = getNearestOverflowAncestor(node);
    const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
    const win = getWindow(scrollableAncestor);
    if (isBody) {
      const frameElement = getFrameElement(win);
      return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
    }
    return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
  }
  function getFrameElement(win) {
    return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
  }

  // node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
  var min = Math.min;
  var max = Math.max;
  var round = Math.round;
  var floor = Math.floor;
  var createCoords = (v3) => ({
    x: v3,
    y: v3
  });
  function evaluate(value, param) {
    return typeof value === "function" ? value(param) : value;
  }
  function getSide(placement) {
    return placement.split("-")[0];
  }
  function getAlignment(placement) {
    return placement.split("-")[1];
  }
  function getOppositeAxis(axis) {
    return axis === "x" ? "y" : "x";
  }
  function getAxisLength(axis) {
    return axis === "y" ? "height" : "width";
  }
  var yAxisSides = /* @__PURE__ */ new Set(["top", "bottom"]);
  function getSideAxis(placement) {
    return yAxisSides.has(getSide(placement)) ? "y" : "x";
  }
  function getAlignmentAxis(placement) {
    return getOppositeAxis(getSideAxis(placement));
  }
  function rectToClientRect(rect) {
    const {
      x: x2,
      y: y3,
      width,
      height
    } = rect;
    return {
      width,
      height,
      top: y3,
      left: x2,
      right: x2 + width,
      bottom: y3 + height,
      x: x2,
      y: y3
    };
  }

  // node_modules/@floating-ui/core/dist/floating-ui.core.mjs
  function computeCoordsFromPlacement(_ref, placement, rtl) {
    let {
      reference,
      floating
    } = _ref;
    const sideAxis = getSideAxis(placement);
    const alignmentAxis = getAlignmentAxis(placement);
    const alignLength = getAxisLength(alignmentAxis);
    const side = getSide(placement);
    const isVertical = sideAxis === "y";
    const commonX = reference.x + reference.width / 2 - floating.width / 2;
    const commonY = reference.y + reference.height / 2 - floating.height / 2;
    const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
    let coords;
    switch (side) {
      case "top":
        coords = {
          x: commonX,
          y: reference.y - floating.height
        };
        break;
      case "bottom":
        coords = {
          x: commonX,
          y: reference.y + reference.height
        };
        break;
      case "right":
        coords = {
          x: reference.x + reference.width,
          y: commonY
        };
        break;
      case "left":
        coords = {
          x: reference.x - floating.width,
          y: commonY
        };
        break;
      default:
        coords = {
          x: reference.x,
          y: reference.y
        };
    }
    switch (getAlignment(placement)) {
      case "start":
        coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
        break;
      case "end":
        coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
        break;
    }
    return coords;
  }
  var computePosition = async (reference, floating, config2) => {
    const {
      placement = "bottom",
      strategy = "absolute",
      middleware = [],
      platform: platform2
    } = config2;
    const validMiddleware = middleware.filter(Boolean);
    const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(floating));
    let rects = await platform2.getElementRects({
      reference,
      floating,
      strategy
    });
    let {
      x: x2,
      y: y3
    } = computeCoordsFromPlacement(rects, placement, rtl);
    let statefulPlacement = placement;
    let middlewareData = {};
    let resetCount = 0;
    for (let i3 = 0; i3 < validMiddleware.length; i3++) {
      const {
        name: name2,
        fn
      } = validMiddleware[i3];
      const {
        x: nextX,
        y: nextY,
        data,
        reset
      } = await fn({
        x: x2,
        y: y3,
        initialPlacement: placement,
        placement: statefulPlacement,
        strategy,
        middlewareData,
        rects,
        platform: platform2,
        elements: {
          reference,
          floating
        }
      });
      x2 = nextX != null ? nextX : x2;
      y3 = nextY != null ? nextY : y3;
      middlewareData = {
        ...middlewareData,
        [name2]: {
          ...middlewareData[name2],
          ...data
        }
      };
      if (reset && resetCount <= 50) {
        resetCount++;
        if (typeof reset === "object") {
          if (reset.placement) {
            statefulPlacement = reset.placement;
          }
          if (reset.rects) {
            rects = reset.rects === true ? await platform2.getElementRects({
              reference,
              floating,
              strategy
            }) : reset.rects;
          }
          ({
            x: x2,
            y: y3
          } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
        }
        i3 = -1;
      }
    }
    return {
      x: x2,
      y: y3,
      placement: statefulPlacement,
      strategy,
      middlewareData
    };
  };
  var originSides = /* @__PURE__ */ new Set(["left", "top"]);
  async function convertValueToCoords(state, options) {
    const {
      placement,
      platform: platform2,
      elements: elements2
    } = state;
    const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements2.floating));
    const side = getSide(placement);
    const alignment = getAlignment(placement);
    const isVertical = getSideAxis(placement) === "y";
    const mainAxisMulti = originSides.has(side) ? -1 : 1;
    const crossAxisMulti = rtl && isVertical ? -1 : 1;
    const rawValue = evaluate(options, state);
    let {
      mainAxis,
      crossAxis,
      alignmentAxis
    } = typeof rawValue === "number" ? {
      mainAxis: rawValue,
      crossAxis: 0,
      alignmentAxis: null
    } : {
      mainAxis: rawValue.mainAxis || 0,
      crossAxis: rawValue.crossAxis || 0,
      alignmentAxis: rawValue.alignmentAxis
    };
    if (alignment && typeof alignmentAxis === "number") {
      crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
    }
    return isVertical ? {
      x: crossAxis * crossAxisMulti,
      y: mainAxis * mainAxisMulti
    } : {
      x: mainAxis * mainAxisMulti,
      y: crossAxis * crossAxisMulti
    };
  }
  var offset = function(options) {
    if (options === void 0) {
      options = 0;
    }
    return {
      name: "offset",
      options,
      async fn(state) {
        var _middlewareData$offse, _middlewareData$arrow;
        const {
          x: x2,
          y: y3,
          placement,
          middlewareData
        } = state;
        const diffCoords = await convertValueToCoords(state, options);
        if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
          return {};
        }
        return {
          x: x2 + diffCoords.x,
          y: y3 + diffCoords.y,
          data: {
            ...diffCoords,
            placement
          }
        };
      }
    };
  };

  // node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
  function getCssDimensions(element) {
    const css = getComputedStyle2(element);
    let width = parseFloat(css.width) || 0;
    let height = parseFloat(css.height) || 0;
    const hasOffset = isHTMLElement(element);
    const offsetWidth = hasOffset ? element.offsetWidth : width;
    const offsetHeight = hasOffset ? element.offsetHeight : height;
    const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
    if (shouldFallback) {
      width = offsetWidth;
      height = offsetHeight;
    }
    return {
      width,
      height,
      $: shouldFallback
    };
  }
  function unwrapElement(element) {
    return !isElement(element) ? element.contextElement : element;
  }
  function getScale(element) {
    const domElement = unwrapElement(element);
    if (!isHTMLElement(domElement)) {
      return createCoords(1);
    }
    const rect = domElement.getBoundingClientRect();
    const {
      width,
      height,
      $: $2
    } = getCssDimensions(domElement);
    let x2 = ($2 ? round(rect.width) : rect.width) / width;
    let y3 = ($2 ? round(rect.height) : rect.height) / height;
    if (!x2 || !Number.isFinite(x2)) {
      x2 = 1;
    }
    if (!y3 || !Number.isFinite(y3)) {
      y3 = 1;
    }
    return {
      x: x2,
      y: y3
    };
  }
  var noOffsets = /* @__PURE__ */ createCoords(0);
  function getVisualOffsets(element) {
    const win = getWindow(element);
    if (!isWebKit() || !win.visualViewport) {
      return noOffsets;
    }
    return {
      x: win.visualViewport.offsetLeft,
      y: win.visualViewport.offsetTop
    };
  }
  function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
    if (isFixed === void 0) {
      isFixed = false;
    }
    if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
      return false;
    }
    return isFixed;
  }
  function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
    if (includeScale === void 0) {
      includeScale = false;
    }
    if (isFixedStrategy === void 0) {
      isFixedStrategy = false;
    }
    const clientRect = element.getBoundingClientRect();
    const domElement = unwrapElement(element);
    let scale = createCoords(1);
    if (includeScale) {
      if (offsetParent) {
        if (isElement(offsetParent)) {
          scale = getScale(offsetParent);
        }
      } else {
        scale = getScale(element);
      }
    }
    const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
    let x2 = (clientRect.left + visualOffsets.x) / scale.x;
    let y3 = (clientRect.top + visualOffsets.y) / scale.y;
    let width = clientRect.width / scale.x;
    let height = clientRect.height / scale.y;
    if (domElement) {
      const win = getWindow(domElement);
      const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
      let currentWin = win;
      let currentIFrame = getFrameElement(currentWin);
      while (currentIFrame && offsetParent && offsetWin !== currentWin) {
        const iframeScale = getScale(currentIFrame);
        const iframeRect = currentIFrame.getBoundingClientRect();
        const css = getComputedStyle2(currentIFrame);
        const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
        const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
        x2 *= iframeScale.x;
        y3 *= iframeScale.y;
        width *= iframeScale.x;
        height *= iframeScale.y;
        x2 += left;
        y3 += top;
        currentWin = getWindow(currentIFrame);
        currentIFrame = getFrameElement(currentWin);
      }
    }
    return rectToClientRect({
      width,
      height,
      x: x2,
      y: y3
    });
  }
  function getWindowScrollBarX(element, rect) {
    const leftScroll = getNodeScroll(element).scrollLeft;
    if (!rect) {
      return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
    }
    return rect.left + leftScroll;
  }
  function getHTMLOffset(documentElement, scroll) {
    const htmlRect = documentElement.getBoundingClientRect();
    const x2 = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
    const y3 = htmlRect.top + scroll.scrollTop;
    return {
      x: x2,
      y: y3
    };
  }
  function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
    let {
      elements: elements2,
      rect,
      offsetParent,
      strategy
    } = _ref;
    const isFixed = strategy === "fixed";
    const documentElement = getDocumentElement(offsetParent);
    const topLayer = elements2 ? isTopLayer(elements2.floating) : false;
    if (offsetParent === documentElement || topLayer && isFixed) {
      return rect;
    }
    let scroll = {
      scrollLeft: 0,
      scrollTop: 0
    };
    let scale = createCoords(1);
    const offsets = createCoords(0);
    const isOffsetParentAnElement = isHTMLElement(offsetParent);
    if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
      if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
        scroll = getNodeScroll(offsetParent);
      }
      if (isHTMLElement(offsetParent)) {
        const offsetRect = getBoundingClientRect(offsetParent);
        scale = getScale(offsetParent);
        offsets.x = offsetRect.x + offsetParent.clientLeft;
        offsets.y = offsetRect.y + offsetParent.clientTop;
      }
    }
    const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
    return {
      width: rect.width * scale.x,
      height: rect.height * scale.y,
      x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
      y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
    };
  }
  function getClientRects(element) {
    return Array.from(element.getClientRects());
  }
  function getDocumentRect(element) {
    const html = getDocumentElement(element);
    const scroll = getNodeScroll(element);
    const body = element.ownerDocument.body;
    const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
    const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
    let x2 = -scroll.scrollLeft + getWindowScrollBarX(element);
    const y3 = -scroll.scrollTop;
    if (getComputedStyle2(body).direction === "rtl") {
      x2 += max(html.clientWidth, body.clientWidth) - width;
    }
    return {
      width,
      height,
      x: x2,
      y: y3
    };
  }
  var SCROLLBAR_MAX = 25;
  function getViewportRect(element, strategy) {
    const win = getWindow(element);
    const html = getDocumentElement(element);
    const visualViewport = win.visualViewport;
    let width = html.clientWidth;
    let height = html.clientHeight;
    let x2 = 0;
    let y3 = 0;
    if (visualViewport) {
      width = visualViewport.width;
      height = visualViewport.height;
      const visualViewportBased = isWebKit();
      if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
        x2 = visualViewport.offsetLeft;
        y3 = visualViewport.offsetTop;
      }
    }
    const windowScrollbarX = getWindowScrollBarX(html);
    if (windowScrollbarX <= 0) {
      const doc = html.ownerDocument;
      const body = doc.body;
      const bodyStyles = getComputedStyle(body);
      const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
      const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
      if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
        width -= clippingStableScrollbarWidth;
      }
    } else if (windowScrollbarX <= SCROLLBAR_MAX) {
      width += windowScrollbarX;
    }
    return {
      width,
      height,
      x: x2,
      y: y3
    };
  }
  var absoluteOrFixed = /* @__PURE__ */ new Set(["absolute", "fixed"]);
  function getInnerBoundingClientRect(element, strategy) {
    const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
    const top = clientRect.top + element.clientTop;
    const left = clientRect.left + element.clientLeft;
    const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
    const width = element.clientWidth * scale.x;
    const height = element.clientHeight * scale.y;
    const x2 = left * scale.x;
    const y3 = top * scale.y;
    return {
      width,
      height,
      x: x2,
      y: y3
    };
  }
  function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
    let rect;
    if (clippingAncestor === "viewport") {
      rect = getViewportRect(element, strategy);
    } else if (clippingAncestor === "document") {
      rect = getDocumentRect(getDocumentElement(element));
    } else if (isElement(clippingAncestor)) {
      rect = getInnerBoundingClientRect(clippingAncestor, strategy);
    } else {
      const visualOffsets = getVisualOffsets(element);
      rect = {
        x: clippingAncestor.x - visualOffsets.x,
        y: clippingAncestor.y - visualOffsets.y,
        width: clippingAncestor.width,
        height: clippingAncestor.height
      };
    }
    return rectToClientRect(rect);
  }
  function hasFixedPositionAncestor(element, stopNode) {
    const parentNode = getParentNode(element);
    if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
      return false;
    }
    return getComputedStyle2(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
  }
  function getClippingElementAncestors(element, cache) {
    const cachedResult = cache.get(element);
    if (cachedResult) {
      return cachedResult;
    }
    let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
    let currentContainingBlockComputedStyle = null;
    const elementIsFixed = getComputedStyle2(element).position === "fixed";
    let currentNode = elementIsFixed ? getParentNode(element) : element;
    while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
      const computedStyle = getComputedStyle2(currentNode);
      const currentNodeIsContaining = isContainingBlock(currentNode);
      if (!currentNodeIsContaining && computedStyle.position === "fixed") {
        currentContainingBlockComputedStyle = null;
      }
      const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
      if (shouldDropCurrentNode) {
        result = result.filter((ancestor) => ancestor !== currentNode);
      } else {
        currentContainingBlockComputedStyle = computedStyle;
      }
      currentNode = getParentNode(currentNode);
    }
    cache.set(element, result);
    return result;
  }
  function getClippingRect(_ref) {
    let {
      element,
      boundary,
      rootBoundary,
      strategy
    } = _ref;
    const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
    const clippingAncestors = [...elementClippingAncestors, rootBoundary];
    const firstClippingAncestor = clippingAncestors[0];
    const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
      const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
      accRect.top = max(rect.top, accRect.top);
      accRect.right = min(rect.right, accRect.right);
      accRect.bottom = min(rect.bottom, accRect.bottom);
      accRect.left = max(rect.left, accRect.left);
      return accRect;
    }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
    return {
      width: clippingRect.right - clippingRect.left,
      height: clippingRect.bottom - clippingRect.top,
      x: clippingRect.left,
      y: clippingRect.top
    };
  }
  function getDimensions(element) {
    const {
      width,
      height
    } = getCssDimensions(element);
    return {
      width,
      height
    };
  }
  function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
    const isOffsetParentAnElement = isHTMLElement(offsetParent);
    const documentElement = getDocumentElement(offsetParent);
    const isFixed = strategy === "fixed";
    const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
    let scroll = {
      scrollLeft: 0,
      scrollTop: 0
    };
    const offsets = createCoords(0);
    function setLeftRTLScrollbarOffset() {
      offsets.x = getWindowScrollBarX(documentElement);
    }
    if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
      if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
        scroll = getNodeScroll(offsetParent);
      }
      if (isOffsetParentAnElement) {
        const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
        offsets.x = offsetRect.x + offsetParent.clientLeft;
        offsets.y = offsetRect.y + offsetParent.clientTop;
      } else if (documentElement) {
        setLeftRTLScrollbarOffset();
      }
    }
    if (isFixed && !isOffsetParentAnElement && documentElement) {
      setLeftRTLScrollbarOffset();
    }
    const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
    const x2 = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
    const y3 = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
    return {
      x: x2,
      y: y3,
      width: rect.width,
      height: rect.height
    };
  }
  function isStaticPositioned(element) {
    return getComputedStyle2(element).position === "static";
  }
  function getTrueOffsetParent(element, polyfill) {
    if (!isHTMLElement(element) || getComputedStyle2(element).position === "fixed") {
      return null;
    }
    if (polyfill) {
      return polyfill(element);
    }
    let rawOffsetParent = element.offsetParent;
    if (getDocumentElement(element) === rawOffsetParent) {
      rawOffsetParent = rawOffsetParent.ownerDocument.body;
    }
    return rawOffsetParent;
  }
  function getOffsetParent(element, polyfill) {
    const win = getWindow(element);
    if (isTopLayer(element)) {
      return win;
    }
    if (!isHTMLElement(element)) {
      let svgOffsetParent = getParentNode(element);
      while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
        if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
          return svgOffsetParent;
        }
        svgOffsetParent = getParentNode(svgOffsetParent);
      }
      return win;
    }
    let offsetParent = getTrueOffsetParent(element, polyfill);
    while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
      offsetParent = getTrueOffsetParent(offsetParent, polyfill);
    }
    if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
      return win;
    }
    return offsetParent || getContainingBlock(element) || win;
  }
  var getElementRects = async function(data) {
    const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
    const getDimensionsFn = this.getDimensions;
    const floatingDimensions = await getDimensionsFn(data.floating);
    return {
      reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
      floating: {
        x: 0,
        y: 0,
        width: floatingDimensions.width,
        height: floatingDimensions.height
      }
    };
  };
  function isRTL(element) {
    return getComputedStyle2(element).direction === "rtl";
  }
  var platform = {
    convertOffsetParentRelativeRectToViewportRelativeRect,
    getDocumentElement,
    getClippingRect,
    getOffsetParent,
    getElementRects,
    getClientRects,
    getDimensions,
    getScale,
    isElement,
    isRTL
  };
  function rectsAreEqual(a3, b3) {
    return a3.x === b3.x && a3.y === b3.y && a3.width === b3.width && a3.height === b3.height;
  }
  function observeMove(element, onMove) {
    let io = null;
    let timeoutId;
    const root = getDocumentElement(element);
    function cleanup() {
      var _io;
      clearTimeout(timeoutId);
      (_io = io) == null || _io.disconnect();
      io = null;
    }
    function refresh(skip, threshold) {
      if (skip === void 0) {
        skip = false;
      }
      if (threshold === void 0) {
        threshold = 1;
      }
      cleanup();
      const elementRectForRootMargin = element.getBoundingClientRect();
      const {
        left,
        top,
        width,
        height
      } = elementRectForRootMargin;
      if (!skip) {
        onMove();
      }
      if (!width || !height) {
        return;
      }
      const insetTop = floor(top);
      const insetRight = floor(root.clientWidth - (left + width));
      const insetBottom = floor(root.clientHeight - (top + height));
      const insetLeft = floor(left);
      const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
      const options = {
        rootMargin,
        threshold: max(0, min(1, threshold)) || 1
      };
      let isFirstUpdate = true;
      function handleObserve(entries) {
        const ratio = entries[0].intersectionRatio;
        if (ratio !== threshold) {
          if (!isFirstUpdate) {
            return refresh();
          }
          if (!ratio) {
            timeoutId = setTimeout(() => {
              refresh(false, 1e-7);
            }, 1e3);
          } else {
            refresh(false, ratio);
          }
        }
        if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
          refresh();
        }
        isFirstUpdate = false;
      }
      try {
        io = new IntersectionObserver(handleObserve, {
          ...options,
          // Handle <iframe>s
          root: root.ownerDocument
        });
      } catch (_e) {
        io = new IntersectionObserver(handleObserve, options);
      }
      io.observe(element);
    }
    refresh(true);
    return cleanup;
  }
  function autoUpdate(reference, floating, update4, options) {
    if (options === void 0) {
      options = {};
    }
    const {
      ancestorScroll = true,
      ancestorResize = true,
      elementResize = typeof ResizeObserver === "function",
      layoutShift = typeof IntersectionObserver === "function",
      animationFrame = false
    } = options;
    const referenceEl = unwrapElement(reference);
    const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...getOverflowAncestors(floating)] : [];
    ancestors.forEach((ancestor) => {
      ancestorScroll && ancestor.addEventListener("scroll", update4, {
        passive: true
      });
      ancestorResize && ancestor.addEventListener("resize", update4);
    });
    const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update4) : null;
    let reobserveFrame = -1;
    let resizeObserver = null;
    if (elementResize) {
      resizeObserver = new ResizeObserver((_ref) => {
        let [firstEntry] = _ref;
        if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
          resizeObserver.unobserve(floating);
          cancelAnimationFrame(reobserveFrame);
          reobserveFrame = requestAnimationFrame(() => {
            var _resizeObserver;
            (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
          });
        }
        update4();
      });
      if (referenceEl && !animationFrame) {
        resizeObserver.observe(referenceEl);
      }
      resizeObserver.observe(floating);
    }
    let frameId;
    let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
    if (animationFrame) {
      frameLoop2();
    }
    function frameLoop2() {
      const nextRefRect = getBoundingClientRect(reference);
      if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
        update4();
      }
      prevRefRect = nextRefRect;
      frameId = requestAnimationFrame(frameLoop2);
    }
    update4();
    return () => {
      var _resizeObserver2;
      ancestors.forEach((ancestor) => {
        ancestorScroll && ancestor.removeEventListener("scroll", update4);
        ancestorResize && ancestor.removeEventListener("resize", update4);
      });
      cleanupIo == null || cleanupIo();
      (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
      resizeObserver = null;
      if (animationFrame) {
        cancelAnimationFrame(frameId);
      }
    };
  }
  var offset2 = offset;
  var computePosition2 = (reference, floating, options) => {
    const cache = /* @__PURE__ */ new Map();
    const mergedOptions = {
      platform,
      ...options
    };
    const platformWithCache = {
      ...mergedOptions.platform,
      _c: cache
    };
    return computePosition(reference, floating, {
      ...mergedOptions,
      platform: platformWithCache
    });
  };

  // node_modules/@base-ui/react/esm/use-render/useRender.js
  function useRender(params) {
    return useRenderElement(params.defaultTagName ?? "div", params, params);
  }

  // packages/ui/build-module/badge/badge.mjs
  var import_element37 = __toESM(require_element(), 1);
  if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='244b5c59c0']")) {
    const style = document.createElement("style");
    style.setAttribute("data-wp-hash", "244b5c59c0");
    style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-sm,12px);font-weight:var(--wpds-font-weight-regular,400);line-height:var(--wpds-font-line-height-xs,16px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-bg-surface-error,#f6e6e3);color:var(--wpds-color-fg-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-bg-surface-warning,#fde6bd);color:var(--wpds-color-fg-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution,#fee994);color:var(--wpds-color-fg-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success,#c5f7cc);color:var(--wpds-color-fg-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-bg-surface-info,#deebfa);color:var(--wpds-color-fg-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);color:var(--wpds-color-fg-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-bg-surface-neutral,#f8f8f8);color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d)}}'));
    document.head.appendChild(style);
  }
  var style_default = { "badge": "_96e6251aad1a6136__badge", "is-high-intent": "_99f7158cb520f750__is-high-intent", "is-medium-intent": "c20ebef2365bc8b7__is-medium-intent", "is-low-intent": "_365e1626c6202e52__is-low-intent", "is-stable-intent": "_33f8198127ddf4ef__is-stable-intent", "is-informational-intent": "_04c1aca8fc449412__is-informational-intent", "is-draft-intent": "_90726e69d495ec19__is-draft-intent", "is-none-intent": "_898f4a544993bd39__is-none-intent" };
  var Badge2 = (0, import_element37.forwardRef)(function Badge22({ children, intent = "none", render: render4, className, ...props }, ref) {
    const element = useRender({
      render: render4,
      defaultTagName: "span",
      ref,
      props: mergeProps(props, {
        className: clsx_default(
          style_default.badge,
          style_default[`is-${intent}-intent`],
          className
        ),
        children
      })
    });
    return element;
  });

  // packages/ui/build-module/stack/stack.mjs
  var import_element38 = __toESM(require_element(), 1);
  if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='71d20935c2']")) {
    const style = document.createElement("style");
    style.setAttribute("data-wp-hash", "71d20935c2");
    style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}"));
    document.head.appendChild(style);
  }
  var style_default2 = { "stack": "_19ce0419607e1896__stack" };
  var gapTokens = {
    xs: "var(--wpds-dimension-gap-xs, 4px)",
    sm: "var(--wpds-dimension-gap-sm, 8px)",
    md: "var(--wpds-dimension-gap-md, 12px)",
    lg: "var(--wpds-dimension-gap-lg, 16px)",
    xl: "var(--wpds-dimension-gap-xl, 24px)",
    "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
    "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
  };
  var Stack = (0, import_element38.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render: render4, ...props }, ref) {
    const style = {
      gap: gap && gapTokens[gap],
      alignItems: align,
      justifyContent: justify,
      flexDirection: direction,
      flexWrap: wrap
    };
    const element = useRender({
      render: render4,
      ref,
      props: mergeProps(props, { style, className: style_default2.stack })
    });
    return element;
  });

  // packages/interface/build-module/components/interface-skeleton/index.mjs
  var import_element39 = __toESM(require_element(), 1);
  var import_components31 = __toESM(require_components(), 1);
  var import_i18n65 = __toESM(require_i18n(), 1);
  var import_compose8 = __toESM(require_compose(), 1);
  var import_jsx_runtime118 = __toESM(require_jsx_runtime(), 1);
  var ANIMATION_DURATION2 = 0.25;
  var commonTransition = {
    type: "tween",
    duration: ANIMATION_DURATION2,
    ease: [0.6, 0, 0.4, 1]
  };
  function useHTMLClass(className) {
    (0, import_element39.useEffect)(() => {
      const element = document && document.querySelector(`html:not(.${className})`);
      if (!element) {
        return;
      }
      element.classList.toggle(className);
      return () => {
        element.classList.toggle(className);
      };
    }, [className]);
  }
  var headerVariants = {
    hidden: { opacity: 1, marginTop: -60 },
    visible: { opacity: 1, marginTop: 0 },
    distractionFreeHover: {
      opacity: 1,
      marginTop: 0,
      transition: {
        ...commonTransition,
        delay: 0.2,
        delayChildren: 0.2
      }
    },
    distractionFreeHidden: {
      opacity: 0,
      marginTop: -60
    },
    distractionFreeDisabled: {
      opacity: 0,
      marginTop: 0,
      transition: {
        ...commonTransition,
        delay: 0.8,
        delayChildren: 0.8
      }
    }
  };
  function InterfaceSkeleton({
    isDistractionFree,
    footer,
    header,
    editorNotices,
    sidebar,
    secondarySidebar,
    content,
    actions: actions2,
    labels,
    className
  }, ref) {
    const [secondarySidebarResizeListener, secondarySidebarSize] = (0, import_compose8.useResizeObserver)();
    const isMobileViewport = (0, import_compose8.useViewportMatch)("medium", "<");
    const disableMotion = (0, import_compose8.useReducedMotion)();
    const defaultTransition = {
      type: "tween",
      duration: disableMotion ? 0 : ANIMATION_DURATION2,
      ease: [0.6, 0, 0.4, 1]
    };
    useHTMLClass("interface-interface-skeleton__html-container");
    const defaultLabels = {
      /* translators: accessibility text for the top bar landmark region. */
      header: (0, import_i18n65._x)("Header", "header landmark area"),
      /* translators: accessibility text for the content landmark region. */
      body: (0, import_i18n65.__)("Content"),
      /* translators: accessibility text for the secondary sidebar landmark region. */
      secondarySidebar: (0, import_i18n65.__)("Block Library"),
      /* translators: accessibility text for the settings landmark region. */
      sidebar: (0, import_i18n65._x)("Settings", "settings landmark area"),
      /* translators: accessibility text for the publish landmark region. */
      actions: (0, import_i18n65.__)("Publish"),
      /* translators: accessibility text for the footer landmark region. */
      footer: (0, import_i18n65.__)("Footer")
    };
    const mergedLabels = { ...defaultLabels, ...labels };
    return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
      "div",
      {
        ref,
        className: clsx_default(
          className,
          "interface-interface-skeleton",
          !!footer && "has-footer"
        ),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("div", { className: "interface-interface-skeleton__editor", children: [
            /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_components31.__unstableAnimatePresence, { initial: false, children: !!header && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
              navigable_region_default,
              {
                as: import_components31.__unstableMotion.div,
                className: "interface-interface-skeleton__header",
                "aria-label": mergedLabels.header,
                initial: isDistractionFree && !isMobileViewport ? "distractionFreeHidden" : "hidden",
                whileHover: isDistractionFree && !isMobileViewport ? "distractionFreeHover" : "visible",
                animate: isDistractionFree && !isMobileViewport ? "distractionFreeDisabled" : "visible",
                exit: isDistractionFree && !isMobileViewport ? "distractionFreeHidden" : "hidden",
                variants: headerVariants,
                transition: defaultTransition,
                children: header
              }
            ) }),
            isDistractionFree && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { className: "interface-interface-skeleton__header", children: editorNotices }),
            /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("div", { className: "interface-interface-skeleton__body", children: [
              /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_components31.__unstableAnimatePresence, { initial: false, children: !!secondarySidebar && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
                navigable_region_default,
                {
                  className: "interface-interface-skeleton__secondary-sidebar",
                  ariaLabel: mergedLabels.secondarySidebar,
                  as: import_components31.__unstableMotion.div,
                  initial: "closed",
                  animate: "open",
                  exit: "closed",
                  variants: {
                    open: { width: secondarySidebarSize.width },
                    closed: { width: 0 }
                  },
                  transition: defaultTransition,
                  children: /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
                    import_components31.__unstableMotion.div,
                    {
                      style: {
                        position: "absolute",
                        width: isMobileViewport ? "100vw" : "fit-content",
                        height: "100%",
                        left: 0
                      },
                      variants: {
                        open: { x: 0 },
                        closed: { x: "-100%" }
                      },
                      transition: defaultTransition,
                      children: [
                        secondarySidebarResizeListener,
                        secondarySidebar
                      ]
                    }
                  )
                }
              ) }),
              /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
                navigable_region_default,
                {
                  className: "interface-interface-skeleton__content",
                  ariaLabel: mergedLabels.body,
                  children: content
                }
              ),
              !!sidebar && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
                navigable_region_default,
                {
                  className: "interface-interface-skeleton__sidebar",
                  ariaLabel: mergedLabels.sidebar,
                  children: sidebar
                }
              ),
              !!actions2 && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
                navigable_region_default,
                {
                  className: "interface-interface-skeleton__actions",
                  ariaLabel: mergedLabels.actions,
                  children: actions2
                }
              )
            ] })
          ] }),
          !!footer && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
            navigable_region_default,
            {
              className: "interface-interface-skeleton__footer",
              ariaLabel: mergedLabels.footer,
              children: footer
            }
          )
        ]
      }
    );
  }
  var interface_skeleton_default = (0, import_element39.forwardRef)(InterfaceSkeleton);

  // packages/editor/build-module/components/commands/index.mjs
  var import_html_entities7 = __toESM(require_html_entities(), 1);

  // packages/editor/build-module/components/pattern-rename-modal/index.mjs
  var import_data42 = __toESM(require_data(), 1);
  var import_patterns5 = __toESM(require_patterns(), 1);
  var import_core_data30 = __toESM(require_core_data(), 1);
  var import_jsx_runtime119 = __toESM(require_jsx_runtime(), 1);
  var { RenamePatternModal } = unlock(import_patterns5.privateApis);
  var modalName = "editor/pattern-rename";
  function PatternRenameModal() {
    const isActive = (0, import_data42.useSelect)(
      (select6) => select6(store2).isModalActive(modalName)
    );
    const { record, postType: postType2 } = (0, import_data42.useSelect)(
      (select6) => {
        if (!isActive) {
          return {};
        }
        const { getCurrentPostType: getCurrentPostType2, getCurrentPostId: getCurrentPostId2 } = select6(store);
        const { getEditedEntityRecord } = select6(import_core_data30.store);
        const _postType = getCurrentPostType2();
        return {
          record: getEditedEntityRecord(
            "postType",
            _postType,
            getCurrentPostId2()
          ),
          postType: _postType
        };
      },
      [isActive]
    );
    const { closeModal: closeModal2 } = (0, import_data42.useDispatch)(store2);
    if (!isActive || postType2 !== PATTERN_POST_TYPE) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(RenamePatternModal, { onClose: closeModal2, pattern: record });
  }

  // packages/editor/build-module/components/pattern-duplicate-modal/index.mjs
  var import_data43 = __toESM(require_data(), 1);
  var import_patterns6 = __toESM(require_patterns(), 1);
  var import_core_data31 = __toESM(require_core_data(), 1);
  var import_jsx_runtime120 = __toESM(require_jsx_runtime(), 1);
  var { DuplicatePatternModal } = unlock(import_patterns6.privateApis);
  var modalName2 = "editor/pattern-duplicate";
  function PatternDuplicateModal() {
    const isActive = (0, import_data43.useSelect)(
      (select6) => select6(store2).isModalActive(modalName2)
    );
    const { record, postType: postType2 } = (0, import_data43.useSelect)(
      (select6) => {
        if (!isActive) {
          return {};
        }
        const { getCurrentPostType: getCurrentPostType2, getCurrentPostId: getCurrentPostId2 } = select6(store);
        const { getEditedEntityRecord } = select6(import_core_data31.store);
        const _postType = getCurrentPostType2();
        return {
          record: getEditedEntityRecord(
            "postType",
            _postType,
            getCurrentPostId2()
          ),
          postType: _postType
        };
      },
      [isActive]
    );
    const { closeModal: closeModal2 } = (0, import_data43.useDispatch)(store2);
    if (!isActive || postType2 !== PATTERN_POST_TYPE) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
      DuplicatePatternModal,
      {
        onClose: closeModal2,
        onSuccess: () => closeModal2(),
        pattern: record
      }
    );
  }

  // packages/editor/build-module/components/commands/index.mjs
  var getEditorCommandLoader = () => function useEditorCommandLoader() {
    const {
      editorMode,
      isListViewOpen,
      showBlockBreadcrumbs,
      isDistractionFree,
      isFocusMode,
      isPreviewMode,
      isViewable,
      isCodeEditingEnabled,
      isRichEditingEnabled,
      isPublishSidebarEnabled: isPublishSidebarEnabled2
    } = (0, import_data44.useSelect)((select6) => {
      const { get } = select6(import_preferences8.store);
      const { isListViewOpened: isListViewOpened2, getCurrentPostType: getCurrentPostType2, getEditorSettings: getEditorSettings2 } = select6(store);
      const { getSettings: getSettings10 } = select6(import_block_editor10.store);
      const { getPostType } = select6(import_core_data32.store);
      return {
        editorMode: get("core", "editorMode") ?? "visual",
        isListViewOpen: isListViewOpened2(),
        showBlockBreadcrumbs: get("core", "showBlockBreadcrumbs"),
        isDistractionFree: get("core", "distractionFree"),
        isFocusMode: get("core", "focusMode"),
        isPreviewMode: getSettings10().isPreviewMode,
        isViewable: getPostType(getCurrentPostType2())?.viewable ?? false,
        isCodeEditingEnabled: getEditorSettings2().codeEditingEnabled,
        isRichEditingEnabled: getEditorSettings2().richEditingEnabled,
        isPublishSidebarEnabled: select6(store).isPublishSidebarEnabled()
      };
    }, []);
    const { getActiveComplementaryArea: getActiveComplementaryArea2 } = (0, import_data44.useSelect)(store2);
    const { toggle } = (0, import_data44.useDispatch)(import_preferences8.store);
    const { createInfoNotice } = (0, import_data44.useDispatch)(import_notices14.store);
    const {
      __unstableSaveForPreview: __unstableSaveForPreview2,
      setIsListViewOpened: setIsListViewOpened2,
      switchEditorMode: switchEditorMode2,
      toggleDistractionFree: toggleDistractionFree2,
      toggleSpotlightMode: toggleSpotlightMode2,
      toggleTopToolbar: toggleTopToolbar2
    } = (0, import_data44.useDispatch)(store);
    const { openModal: openModal2, enableComplementaryArea: enableComplementaryArea2, disableComplementaryArea: disableComplementaryArea2 } = (0, import_data44.useDispatch)(store2);
    const { getCurrentPostId: getCurrentPostId2 } = (0, import_data44.useSelect)(store);
    const allowSwitchEditorMode = isCodeEditingEnabled && isRichEditingEnabled;
    if (isPreviewMode) {
      return { commands: [], isLoading: false };
    }
    const commands = [];
    commands.push({
      name: "core/open-shortcut-help",
      label: (0, import_i18n66.__)("Keyboard shortcuts"),
      icon: keyboard_default,
      category: "view",
      callback: ({ close }) => {
        close();
        openModal2("editor/keyboard-shortcut-help");
      }
    });
    commands.push({
      name: "core/toggle-distraction-free",
      label: isDistractionFree ? (0, import_i18n66.__)("Exit Distraction free") : (0, import_i18n66.__)("Enter Distraction free"),
      category: "command",
      callback: ({ close }) => {
        toggleDistractionFree2();
        close();
      }
    });
    commands.push({
      name: "core/open-preferences",
      label: (0, import_i18n66.__)("Editor preferences"),
      category: "view",
      callback: ({ close }) => {
        close();
        openModal2("editor/preferences");
      }
    });
    commands.push({
      name: "core/toggle-spotlight-mode",
      label: isFocusMode ? (0, import_i18n66.__)("Exit Spotlight mode") : (0, import_i18n66.__)("Enter Spotlight mode"),
      category: "command",
      callback: ({ close }) => {
        toggleSpotlightMode2();
        close();
      }
    });
    commands.push({
      name: "core/toggle-list-view",
      label: isListViewOpen ? (0, import_i18n66.__)("Close List View") : (0, import_i18n66.__)("Open List View"),
      icon: list_view_default,
      category: "command",
      callback: ({ close }) => {
        setIsListViewOpened2(!isListViewOpen);
        close();
        createInfoNotice(
          isListViewOpen ? (0, import_i18n66.__)("List View off.") : (0, import_i18n66.__)("List View on."),
          {
            id: "core/editor/toggle-list-view/notice",
            type: "snackbar"
          }
        );
      }
    });
    commands.push({
      name: "core/toggle-top-toolbar",
      label: (0, import_i18n66.__)("Top toolbar"),
      category: "command",
      callback: ({ close }) => {
        toggleTopToolbar2();
        close();
      }
    });
    if (allowSwitchEditorMode) {
      commands.push({
        name: "core/toggle-code-editor",
        label: editorMode === "visual" ? (0, import_i18n66.__)("Open code editor") : (0, import_i18n66.__)("Exit code editor"),
        icon: code_default,
        category: "command",
        callback: ({ close }) => {
          switchEditorMode2(
            editorMode === "visual" ? "text" : "visual"
          );
          close();
        }
      });
    }
    commands.push({
      name: "core/toggle-breadcrumbs",
      label: showBlockBreadcrumbs ? (0, import_i18n66.__)("Hide block breadcrumbs") : (0, import_i18n66.__)("Show block breadcrumbs"),
      category: "command",
      callback: ({ close }) => {
        toggle("core", "showBlockBreadcrumbs");
        close();
        createInfoNotice(
          showBlockBreadcrumbs ? (0, import_i18n66.__)("Breadcrumbs hidden.") : (0, import_i18n66.__)("Breadcrumbs visible."),
          {
            id: "core/editor/toggle-breadcrumbs/notice",
            type: "snackbar"
          }
        );
      }
    });
    commands.push({
      name: "core/open-settings-sidebar",
      label: (0, import_i18n66.__)("Show or hide the Settings panel"),
      icon: (0, import_i18n66.isRTL)() ? drawer_left_default : drawer_right_default,
      category: "command",
      callback: ({ close }) => {
        const activeSidebar = getActiveComplementaryArea2("core");
        close();
        if (activeSidebar === "edit-post/document") {
          disableComplementaryArea2("core");
        } else {
          enableComplementaryArea2("core", "edit-post/document");
        }
      }
    });
    commands.push({
      name: "core/open-block-inspector",
      label: (0, import_i18n66.__)("Show or hide the Block settings panel"),
      icon: block_default_default,
      category: "command",
      callback: ({ close }) => {
        const activeSidebar = getActiveComplementaryArea2("core");
        close();
        if (activeSidebar === "edit-post/block") {
          disableComplementaryArea2("core");
        } else {
          enableComplementaryArea2("core", "edit-post/block");
        }
      }
    });
    commands.push({
      name: "core/toggle-publish-sidebar",
      label: isPublishSidebarEnabled2 ? (0, import_i18n66.__)("Disable pre-publish checks") : (0, import_i18n66.__)("Enable pre-publish checks"),
      icon: format_list_bullets_default,
      category: "command",
      callback: ({ close }) => {
        close();
        toggle("core", "isPublishSidebarEnabled");
        createInfoNotice(
          isPublishSidebarEnabled2 ? (0, import_i18n66.__)("Pre-publish checks disabled.") : (0, import_i18n66.__)("Pre-publish checks enabled."),
          {
            id: "core/editor/publish-sidebar/notice",
            type: "snackbar"
          }
        );
      }
    });
    if (isViewable) {
      commands.push({
        name: "core/preview-link",
        label: (0, import_i18n66.__)("Preview in a new tab"),
        icon: external_default,
        category: "view",
        callback: async ({ close }) => {
          close();
          const postId2 = getCurrentPostId2();
          const link = await __unstableSaveForPreview2();
          window.open(link, `wp-preview-${postId2}`);
        }
      });
    }
    return {
      commands,
      isLoading: false
    };
  };
  var getEditedEntityContextualCommands = () => function useEditedEntityContextualCommands() {
    const { postType: postType2 } = (0, import_data44.useSelect)((select6) => {
      const { getCurrentPostType: getCurrentPostType2 } = select6(store);
      return {
        postType: getCurrentPostType2()
      };
    }, []);
    const { openModal: openModal2 } = (0, import_data44.useDispatch)(store2);
    const commands = [];
    if (postType2 === PATTERN_POST_TYPE) {
      commands.push({
        name: "core/rename-pattern",
        label: (0, import_i18n66.__)("Rename pattern"),
        icon: pencil_default,
        category: "edit",
        callback: ({ close }) => {
          openModal2(modalName);
          close();
        }
      });
      commands.push({
        name: "core/duplicate-pattern",
        label: (0, import_i18n66.__)("Duplicate pattern"),
        icon: symbol_default,
        category: "command",
        callback: ({ close }) => {
          openModal2(modalName2);
          close();
        }
      });
    }
    return { isLoading: false, commands };
  };
  var getPageContentFocusCommands = () => function usePageContentFocusCommands() {
    const {
      onNavigateToEntityRecord,
      goBack,
      templateId: templateId2,
      isPreviewMode,
      canEditTemplate
    } = (0, import_data44.useSelect)((select6) => {
      const {
        getRenderingMode: getRenderingMode2,
        getEditorSettings: _getEditorSettings,
        getCurrentTemplateId: getCurrentTemplateId2
      } = unlock(select6(store));
      const editorSettings2 = _getEditorSettings();
      const _templateId = getCurrentTemplateId2();
      return {
        isTemplateHidden: getRenderingMode2() === "post-only",
        onNavigateToEntityRecord: editorSettings2.onNavigateToEntityRecord,
        getEditorSettings: _getEditorSettings,
        goBack: editorSettings2.onNavigateToPreviousEntityRecord,
        templateId: _templateId,
        isPreviewMode: editorSettings2.isPreviewMode,
        canEditTemplate: !!_templateId && select6(import_core_data32.store).canUser("update", {
          kind: "postType",
          name: "wp_template",
          id: _templateId
        })
      };
    }, []);
    const { editedRecord: template2, hasResolved } = (0, import_core_data32.useEntityRecord)(
      "postType",
      "wp_template",
      templateId2
    );
    if (isPreviewMode) {
      return { isLoading: false, commands: [] };
    }
    const commands = [];
    if (templateId2 && hasResolved && canEditTemplate) {
      commands.push({
        name: "core/switch-to-template-focus",
        label: (0, import_i18n66.sprintf)(
          /* translators: %s: template title */
          (0, import_i18n66.__)("Edit template: %s"),
          (0, import_html_entities7.decodeEntities)(template2.title)
        ),
        icon: layout_default,
        category: "edit",
        callback: ({ close }) => {
          onNavigateToEntityRecord({
            postId: templateId2,
            postType: "wp_template"
          });
          close();
        }
      });
    }
    if (!!goBack) {
      commands.push({
        name: "core/switch-to-previous-entity",
        label: (0, import_i18n66.__)("Go back"),
        icon: page_default,
        category: "view",
        callback: ({ close }) => {
          goBack();
          close();
        }
      });
    }
    return { isLoading: false, commands };
  };
  var getManipulateDocumentCommands = () => function useManipulateDocumentCommands() {
    const { postType: postType2, postId: postId2 } = (0, import_data44.useSelect)((select6) => {
      const { getCurrentPostId: getCurrentPostId2, getCurrentPostType: getCurrentPostType2 } = select6(store);
      return {
        postType: getCurrentPostType2(),
        postId: getCurrentPostId2()
      };
    }, []);
    const { editedRecord: template2, hasResolved } = (0, import_core_data32.useEntityRecord)(
      "postType",
      postType2,
      postId2
    );
    const { revertTemplate: revertTemplate3 } = unlock((0, import_data44.useDispatch)(store));
    if (!hasResolved || ![TEMPLATE_PART_POST_TYPE, TEMPLATE_POST_TYPE].includes(
      postType2
    )) {
      return { isLoading: true, commands: [] };
    }
    const commands = [];
    if (isTemplateRevertable(template2)) {
      const label = template2.type === TEMPLATE_POST_TYPE ? (0, import_i18n66.sprintf)(
        /* translators: %s: template title */
        (0, import_i18n66.__)("Reset template: %s"),
        (0, import_html_entities7.decodeEntities)(template2.title)
      ) : (0, import_i18n66.sprintf)(
        /* translators: %s: template part title */
        (0, import_i18n66.__)("Reset template part: %s"),
        (0, import_html_entities7.decodeEntities)(template2.title)
      );
      commands.push({
        name: "core/reset-template",
        label,
        icon: (0, import_i18n66.isRTL)() ? rotate_right_default : rotate_left_default,
        category: "command",
        callback: ({ close }) => {
          revertTemplate3(template2);
          close();
        }
      });
    }
    return {
      isLoading: !hasResolved,
      commands
    };
  };
  function useCommands() {
    (0, import_commands.useCommandLoader)({
      name: "core/editor/edit-ui",
      hook: getEditorCommandLoader()
    });
    (0, import_commands.useCommandLoader)({
      name: "core/editor/contextual-commands",
      hook: getEditedEntityContextualCommands(),
      context: "entity-edit"
    });
    (0, import_commands.useCommandLoader)({
      name: "core/editor/page-content-focus",
      hook: getPageContentFocusCommands(),
      context: "entity-edit"
    });
    (0, import_commands.useCommandLoader)({
      name: "core/edit-site/manipulate-document",
      hook: getManipulateDocumentCommands()
    });
  }

  // packages/editor/build-module/components/provider/use-upload-save-lock.mjs
  var import_data45 = __toESM(require_data(), 1);
  var import_element40 = __toESM(require_element(), 1);
  var import_upload_media = __toESM(require_upload_media(), 1);
  var LOCK_NAME = "upload-in-progress";
  function useUploadSaveLock() {
    const isClientSideMediaProcessingEnabled = window.__clientSideMediaProcessing;
    const isUploading = (0, import_data45.useSelect)(
      (select6) => {
        if (!isClientSideMediaProcessingEnabled) {
          return false;
        }
        return select6(import_upload_media.store).isUploading();
      },
      [isClientSideMediaProcessingEnabled]
    );
    const {
      lockPostSaving: lockPostSaving2,
      unlockPostSaving: unlockPostSaving2,
      lockPostAutosaving: lockPostAutosaving2,
      unlockPostAutosaving: unlockPostAutosaving2
    } = (0, import_data45.useDispatch)(store);
    (0, import_element40.useEffect)(() => {
      if (!isClientSideMediaProcessingEnabled) {
        return;
      }
      if (isUploading) {
        lockPostSaving2(LOCK_NAME);
        lockPostAutosaving2(LOCK_NAME);
      } else {
        unlockPostSaving2(LOCK_NAME);
        unlockPostAutosaving2(LOCK_NAME);
      }
      return () => {
        unlockPostSaving2(LOCK_NAME);
        unlockPostAutosaving2(LOCK_NAME);
      };
    }, [
      isClientSideMediaProcessingEnabled,
      isUploading,
      lockPostSaving2,
      unlockPostSaving2,
      lockPostAutosaving2,
      unlockPostAutosaving2
    ]);
  }

  // packages/editor/build-module/components/block-removal-warnings/index.mjs
  var import_i18n67 = __toESM(require_i18n(), 1);
  var import_block_editor11 = __toESM(require_block_editor(), 1);
  var import_data46 = __toESM(require_data(), 1);
  var import_element41 = __toESM(require_element(), 1);
  var import_jsx_runtime121 = __toESM(require_jsx_runtime(), 1);
  var { BlockRemovalWarningModal } = unlock(import_block_editor11.privateApis);
  var TEMPLATE_BLOCKS = [
    "core/post-content",
    "core/post-template",
    "core/query"
  ];
  var BLOCK_REMOVAL_RULES = [
    {
      // Template blocks.
      // The warning is only shown when a user manipulates templates or template parts.
      postTypes: ["wp_template", "wp_template_part"],
      callback(removedBlocks) {
        const removedPostContentBlocks = removedBlocks.filter(
          ({ name: name2 }) => name2 === "core/post-content"
        );
        if (removedPostContentBlocks.length) {
          return {
            description: (0, import_i18n67.__)(
              "This block displays the content of posts and pages using this template."
            ),
            warning: (0, import_i18n67.__)(
              "If you delete it, posts or pages using this template will not display any content."
            ),
            subtext: (0, import_i18n67.__)("Visitors will see blank pages."),
            requireConfirmation: true
          };
        }
        const removedTemplateBlocks = removedBlocks.filter(
          ({ name: name2 }) => TEMPLATE_BLOCKS.includes(name2)
        );
        if (removedTemplateBlocks.length) {
          return (0, import_i18n67._n)(
            "Deleting this block will stop your post or page content from displaying on this template. It is not recommended.",
            "Some of the deleted blocks will stop your post or page content from displaying on this template. It is not recommended.",
            removedBlocks.length
          );
        }
      }
    },
    {
      // Pattern overrides.
      // The warning is only shown when the user edits a pattern.
      postTypes: ["wp_block"],
      callback(removedBlocks) {
        const removedBlocksWithOverrides = removedBlocks.filter(
          ({ attributes }) => attributes?.metadata?.bindings && Object.values(attributes.metadata.bindings).some(
            (binding) => binding.source === "core/pattern-overrides"
          )
        );
        if (removedBlocksWithOverrides.length) {
          return (0, import_i18n67._n)(
            "The deleted block allows instance overrides. Removing it may result in content not displaying where this pattern is used. Are you sure you want to proceed?",
            "Some of the deleted blocks allow instance overrides. Removing them may result in content not displaying where this pattern is used. Are you sure you want to proceed?",
            removedBlocks.length
          );
        }
      }
    }
  ];
  function BlockRemovalWarnings() {
    const currentPostType = (0, import_data46.useSelect)(
      (select6) => select6(store).getCurrentPostType(),
      []
    );
    const removalRulesForPostType = (0, import_element41.useMemo)(
      () => BLOCK_REMOVAL_RULES.filter(
        (rule) => rule.postTypes.includes(currentPostType)
      ),
      [currentPostType]
    );
    if (!BlockRemovalWarningModal) {
      return null;
    }
    if (!removalRulesForPostType) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(BlockRemovalWarningModal, { rules: removalRulesForPostType });
  }

  // packages/editor/build-module/components/start-page-options/index.mjs
  var import_components32 = __toESM(require_components(), 1);
  var import_i18n68 = __toESM(require_i18n(), 1);
  var import_element42 = __toESM(require_element(), 1);
  var import_block_editor12 = __toESM(require_block_editor(), 1);
  var import_data47 = __toESM(require_data(), 1);
  var import_core_data33 = __toESM(require_core_data(), 1);
  var import_blocks11 = __toESM(require_blocks(), 1);
  var import_preferences9 = __toESM(require_preferences(), 1);
  var import_jsx_runtime122 = __toESM(require_jsx_runtime(), 1);
  function useStartPatterns() {
    const { blockPatternsWithPostContentBlockType, postType: postType2 } = (0, import_data47.useSelect)(
      (select6) => {
        const { getPatternsByBlockTypes, getBlocksByName } = select6(import_block_editor12.store);
        const { getCurrentPostType: getCurrentPostType2, getRenderingMode: getRenderingMode2 } = select6(store);
        const rootClientId = getRenderingMode2() === "post-only" ? "" : getBlocksByName("core/post-content")?.[0];
        return {
          blockPatternsWithPostContentBlockType: getPatternsByBlockTypes(
            "core/post-content",
            rootClientId
          ),
          postType: getCurrentPostType2()
        };
      },
      []
    );
    return (0, import_element42.useMemo)(() => {
      if (!blockPatternsWithPostContentBlockType?.length) {
        return [];
      }
      return blockPatternsWithPostContentBlockType.filter((pattern) => {
        return postType2 === "page" && !pattern.postTypes || Array.isArray(pattern.postTypes) && pattern.postTypes.includes(postType2);
      });
    }, [postType2, blockPatternsWithPostContentBlockType]);
  }
  function PatternSelection({ blockPatterns, onChoosePattern }) {
    const { editEntityRecord } = (0, import_data47.useDispatch)(import_core_data33.store);
    const { postType: postType2, postId: postId2 } = (0, import_data47.useSelect)((select6) => {
      const { getCurrentPostType: getCurrentPostType2, getCurrentPostId: getCurrentPostId2 } = select6(store);
      return {
        postType: getCurrentPostType2(),
        postId: getCurrentPostId2()
      };
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
      import_block_editor12.__experimentalBlockPatternsList,
      {
        blockPatterns,
        onClickPattern: (_pattern, blocks) => {
          editEntityRecord("postType", postType2, postId2, {
            blocks,
            content: ({ blocks: blocksForSerialization = [] }) => (0, import_blocks11.__unstableSerializeAndClean)(blocksForSerialization)
          });
          onChoosePattern();
        }
      }
    );
  }
  function StartPageOptionsModal({ onClose }) {
    const [showStartPatterns, setShowStartPatterns] = (0, import_element42.useState)(true);
    const { set: setPreference } = (0, import_data47.useDispatch)(import_preferences9.store);
    const startPatterns = useStartPatterns();
    const hasStartPattern = startPatterns.length > 0;
    if (!hasStartPattern) {
      return null;
    }
    function handleClose() {
      onClose();
      setPreference("core", "enableChoosePatternModal", showStartPatterns);
    }
    return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
      import_components32.Modal,
      {
        className: "editor-start-page-options__modal",
        title: (0, import_i18n68.__)("Choose a pattern"),
        isFullScreen: true,
        onRequestClose: handleClose,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { className: "editor-start-page-options__modal-content", children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
            PatternSelection,
            {
              blockPatterns: startPatterns,
              onChoosePattern: handleClose
            }
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
            import_components32.Flex,
            {
              className: "editor-start-page-options__modal__actions",
              justify: "flex-start",
              expanded: false,
              children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_components32.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
                import_components32.CheckboxControl,
                {
                  checked: showStartPatterns,
                  label: (0, import_i18n68.__)(
                    "Always show starter patterns for new pages"
                  ),
                  onChange: (newValue) => {
                    setShowStartPatterns(newValue);
                  }
                }
              ) })
            }
          )
        ]
      }
    );
  }
  function StartPageOptions() {
    const [isOpen, setIsOpen] = (0, import_element42.useState)(false);
    const { isEditedPostDirty: isEditedPostDirty2, isEditedPostEmpty: isEditedPostEmpty2 } = (0, import_data47.useSelect)(store);
    const { isModalActive: isModalActive2 } = (0, import_data47.useSelect)(store2);
    const { enabled, postId: postId2 } = (0, import_data47.useSelect)((select6) => {
      const { getCurrentPostId: getCurrentPostId2, getCurrentPostType: getCurrentPostType2 } = select6(store);
      const choosePatternModalEnabled = select6(import_preferences9.store).get(
        "core",
        "enableChoosePatternModal"
      );
      const currentPostType = getCurrentPostType2();
      return {
        postId: getCurrentPostId2(),
        enabled: choosePatternModalEnabled && ATTACHMENT_POST_TYPE !== currentPostType && TEMPLATE_POST_TYPE !== currentPostType && TEMPLATE_PART_POST_TYPE !== currentPostType
      };
    }, []);
    (0, import_element42.useEffect)(() => {
      const isFreshPage = !isEditedPostDirty2() && isEditedPostEmpty2();
      const isPreferencesModalActive = isModalActive2("editor/preferences");
      if (!enabled || !isFreshPage || isPreferencesModalActive) {
        return;
      }
      setIsOpen(true);
    }, [
      enabled,
      postId2,
      isEditedPostDirty2,
      isEditedPostEmpty2,
      isModalActive2
    ]);
    if (!isOpen) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(StartPageOptionsModal, { onClose: () => setIsOpen(false) });
  }

  // packages/editor/build-module/components/keyboard-shortcut-help-modal/index.mjs
  var import_components33 = __toESM(require_components(), 1);
  var import_i18n70 = __toESM(require_i18n(), 1);
  var import_keyboard_shortcuts2 = __toESM(require_keyboard_shortcuts(), 1);
  var import_data49 = __toESM(require_data(), 1);

  // packages/editor/build-module/components/keyboard-shortcut-help-modal/config.mjs
  var import_i18n69 = __toESM(require_i18n(), 1);
  var textFormattingShortcuts = [
    {
      keyCombination: { modifier: "primary", character: "b" },
      description: (0, import_i18n69.__)("Make the selected text bold.")
    },
    {
      keyCombination: { modifier: "primary", character: "i" },
      description: (0, import_i18n69.__)("Make the selected text italic.")
    },
    {
      keyCombination: { modifier: "primary", character: "k" },
      description: (0, import_i18n69.__)("Convert the selected text into a link.")
    },
    {
      keyCombination: { modifier: "primaryShift", character: "k" },
      description: (0, import_i18n69.__)("Remove a link.")
    },
    {
      keyCombination: { character: "[[" },
      description: (0, import_i18n69.__)("Insert a link to a post or page.")
    },
    {
      keyCombination: { modifier: "primary", character: "u" },
      description: (0, import_i18n69.__)("Underline the selected text.")
    },
    {
      keyCombination: { modifier: "access", character: "d" },
      description: (0, import_i18n69.__)("Strikethrough the selected text.")
    },
    {
      keyCombination: { modifier: "access", character: "x" },
      description: (0, import_i18n69.__)("Make the selected text inline code.")
    },
    {
      keyCombination: {
        modifier: "access",
        character: "0"
      },
      aliases: [
        {
          modifier: "access",
          character: "7"
        }
      ],
      description: (0, import_i18n69.__)("Convert the current heading to a paragraph.")
    },
    {
      keyCombination: { modifier: "access", character: "1-6" },
      description: (0, import_i18n69.__)(
        "Convert the current paragraph or heading to a heading of level 1 to 6."
      )
    },
    {
      keyCombination: { modifier: "primaryShift", character: "SPACE" },
      description: (0, import_i18n69.__)("Add non breaking space.")
    }
  ];

  // packages/editor/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs
  var import_element43 = __toESM(require_element(), 1);
  var import_keycodes = __toESM(require_keycodes(), 1);
  var import_jsx_runtime123 = __toESM(require_jsx_runtime(), 1);
  function KeyCombination({ keyCombination, forceAriaLabel }) {
    const shortcut = keyCombination.modifier ? import_keycodes.displayShortcutList[keyCombination.modifier](
      keyCombination.character
    ) : keyCombination.character;
    const ariaLabel = keyCombination.modifier ? import_keycodes.shortcutAriaLabel[keyCombination.modifier](
      keyCombination.character
    ) : keyCombination.character;
    return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
      "kbd",
      {
        className: "editor-keyboard-shortcut-help-modal__shortcut-key-combination",
        "aria-label": forceAriaLabel || ariaLabel,
        children: (Array.isArray(shortcut) ? shortcut : [shortcut]).map(
          (character, index2) => {
            if (character === "+") {
              return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_element43.Fragment, { children: character }, index2);
            }
            return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
              "kbd",
              {
                className: "editor-keyboard-shortcut-help-modal__shortcut-key",
                children: character
              },
              index2
            );
          }
        )
      }
    );
  }
  function Shortcut({ description, keyCombination, aliases = [], ariaLabel }) {
    return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(import_jsx_runtime123.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "editor-keyboard-shortcut-help-modal__shortcut-description", children: description }),
      /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: "editor-keyboard-shortcut-help-modal__shortcut-term", children: [
        /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
          KeyCombination,
          {
            keyCombination,
            forceAriaLabel: ariaLabel
          }
        ),
        aliases.map((alias, index2) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
          KeyCombination,
          {
            keyCombination: alias,
            forceAriaLabel: ariaLabel
          },
          index2
        ))
      ] })
    ] });
  }
  var shortcut_default = Shortcut;

  // packages/editor/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.mjs
  var import_data48 = __toESM(require_data(), 1);
  var import_keyboard_shortcuts = __toESM(require_keyboard_shortcuts(), 1);
  var import_jsx_runtime124 = __toESM(require_jsx_runtime(), 1);
  function DynamicShortcut({ name: name2 }) {
    const { keyCombination, description, aliases } = (0, import_data48.useSelect)(
      (select6) => {
        const {
          getShortcutKeyCombination,
          getShortcutDescription,
          getShortcutAliases
        } = select6(import_keyboard_shortcuts.store);
        return {
          keyCombination: getShortcutKeyCombination(name2),
          aliases: getShortcutAliases(name2),
          description: getShortcutDescription(name2)
        };
      },
      [name2]
    );
    if (!keyCombination) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
      shortcut_default,
      {
        keyCombination,
        description,
        aliases
      }
    );
  }
  var dynamic_shortcut_default = DynamicShortcut;

  // packages/editor/build-module/components/keyboard-shortcut-help-modal/index.mjs
  var import_jsx_runtime125 = __toESM(require_jsx_runtime(), 1);
  var KEYBOARD_SHORTCUT_HELP_MODAL_NAME = "editor/keyboard-shortcut-help";
  var ShortcutList = ({ shortcuts }) => (
    /*
     * Disable reason: The `list` ARIA role is redundant but
     * Safari+VoiceOver won't announce the list otherwise.
     */
    /* eslint-disable jsx-a11y/no-redundant-roles */
    /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
      "ul",
      {
        className: "editor-keyboard-shortcut-help-modal__shortcut-list",
        role: "list",
        children: shortcuts.map((shortcut, index2) => /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
          "li",
          {
            className: "editor-keyboard-shortcut-help-modal__shortcut",
            children: typeof shortcut === "string" ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(dynamic_shortcut_default, { name: shortcut }) : /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(shortcut_default, { ...shortcut })
          },
          index2
        ))
      }
    )
  );
  var ShortcutSection = ({ title, shortcuts, className }) => /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
    "section",
    {
      className: clsx_default(
        "editor-keyboard-shortcut-help-modal__section",
        className
      ),
      children: [
        !!title && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("h2", { className: "editor-keyboard-shortcut-help-modal__section-title", children: title }),
        /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ShortcutList, { shortcuts })
      ]
    }
  );
  var ShortcutCategorySection = ({
    title,
    categoryName,
    additionalShortcuts = []
  }) => {
    const categoryShortcuts = (0, import_data49.useSelect)(
      (select6) => {
        return select6(import_keyboard_shortcuts2.store).getCategoryShortcuts(
          categoryName
        );
      },
      [categoryName]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
      ShortcutSection,
      {
        title,
        shortcuts: categoryShortcuts.concat(additionalShortcuts)
      }
    );
  };
  function KeyboardShortcutHelpModal() {
    const isModalActive2 = (0, import_data49.useSelect)(
      (select6) => select6(store2).isModalActive(
        KEYBOARD_SHORTCUT_HELP_MODAL_NAME
      ),
      []
    );
    const { openModal: openModal2, closeModal: closeModal2 } = (0, import_data49.useDispatch)(store2);
    const toggleModal = () => {
      if (isModalActive2) {
        closeModal2();
      } else {
        openModal2(KEYBOARD_SHORTCUT_HELP_MODAL_NAME);
      }
    };
    (0, import_keyboard_shortcuts2.useShortcut)("core/editor/keyboard-shortcuts", toggleModal);
    if (!isModalActive2) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
      import_components33.Modal,
      {
        className: "editor-keyboard-shortcut-help-modal",
        title: (0, import_i18n70.__)("Keyboard shortcuts"),
        closeButtonLabel: (0, import_i18n70.__)("Close"),
        onRequestClose: toggleModal,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
            ShortcutSection,
            {
              className: "editor-keyboard-shortcut-help-modal__main-shortcuts",
              shortcuts: ["core/editor/keyboard-shortcuts"]
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
            ShortcutCategorySection,
            {
              title: (0, import_i18n70.__)("Global shortcuts"),
              categoryName: "global"
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
            ShortcutCategorySection,
            {
              title: (0, import_i18n70.__)("Selection shortcuts"),
              categoryName: "selection"
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
            ShortcutCategorySection,
            {
              title: (0, import_i18n70.__)("Block shortcuts"),
              categoryName: "block",
              additionalShortcuts: [
                {
                  keyCombination: { character: "/" },
                  description: (0, import_i18n70.__)(
                    "Change the block type after adding a new paragraph."
                  ),
                  /* translators: The forward-slash character. e.g. '/'. */
                  ariaLabel: (0, import_i18n70.__)("Forward-slash")
                }
              ]
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
            ShortcutSection,
            {
              title: (0, import_i18n70.__)("Text formatting"),
              shortcuts: textFormattingShortcuts
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
            ShortcutCategorySection,
            {
              title: (0, import_i18n70.__)("List View shortcuts"),
              categoryName: "list-view"
            }
          )
        ]
      }
    );
  }
  var keyboard_shortcut_help_modal_default = KeyboardShortcutHelpModal;

  // packages/editor/build-module/components/start-template-options/index.mjs
  var import_components34 = __toESM(require_components(), 1);
  var import_i18n71 = __toESM(require_i18n(), 1);
  var import_element44 = __toESM(require_element(), 1);
  var import_block_editor13 = __toESM(require_block_editor(), 1);
  var import_data50 = __toESM(require_data(), 1);
  var import_blocks12 = __toESM(require_blocks(), 1);
  var import_core_data34 = __toESM(require_core_data(), 1);
  var import_jsx_runtime126 = __toESM(require_jsx_runtime(), 1);
  function useFallbackTemplateContent(slug, isCustom = false) {
    return (0, import_data50.useSelect)(
      (select6) => {
        const { getEntityRecord, getDefaultTemplateId } = select6(import_core_data34.store);
        const templateId2 = getDefaultTemplateId({
          slug,
          is_custom: isCustom,
          ignore_empty: true
        });
        return templateId2 ? getEntityRecord("postType", TEMPLATE_POST_TYPE, templateId2)?.content?.raw : void 0;
      },
      [slug, isCustom]
    );
  }
  function useStartPatterns2(fallbackContent) {
    const { slug, patterns: patterns2 } = (0, import_data50.useSelect)((select6) => {
      const { getCurrentPostType: getCurrentPostType2, getCurrentPostId: getCurrentPostId2 } = select6(store);
      const { getEntityRecord, getBlockPatterns } = select6(import_core_data34.store);
      const postId2 = getCurrentPostId2();
      const postType2 = getCurrentPostType2();
      const record = getEntityRecord("postType", postType2, postId2);
      return {
        slug: record.slug,
        patterns: getBlockPatterns()
      };
    }, []);
    const currentThemeStylesheet = (0, import_data50.useSelect)(
      (select6) => select6(import_core_data34.store).getCurrentTheme().stylesheet
    );
    function injectThemeAttributeInBlockTemplateContent2(block) {
      if (block.innerBlocks.find(
        (innerBlock) => innerBlock.name === "core/template-part"
      )) {
        block.innerBlocks = block.innerBlocks.map((innerBlock) => {
          if (innerBlock.name === "core/template-part" && innerBlock.attributes.theme === void 0) {
            innerBlock.attributes.theme = currentThemeStylesheet;
          }
          return innerBlock;
        });
      }
      if (block.name === "core/template-part" && block.attributes.theme === void 0) {
        block.attributes.theme = currentThemeStylesheet;
      }
      return block;
    }
    return (0, import_element44.useMemo)(() => {
      return [
        {
          name: "fallback",
          blocks: (0, import_blocks12.parse)(fallbackContent),
          title: (0, import_i18n71.__)("Fallback content")
        },
        ...patterns2.filter((pattern) => {
          return Array.isArray(pattern.templateTypes) && pattern.templateTypes.some(
            (templateType) => slug.startsWith(templateType)
          );
        }).map((pattern) => {
          return {
            ...pattern,
            blocks: (0, import_blocks12.parse)(pattern.content).map(
              (block) => injectThemeAttributeInBlockTemplateContent2(block)
            )
          };
        })
      ];
    }, [fallbackContent, slug, patterns2]);
  }
  function PatternSelection2({ fallbackContent, onChoosePattern, postType: postType2 }) {
    const [, , onChange] = (0, import_core_data34.useEntityBlockEditor)("postType", postType2);
    const blockPatterns = useStartPatterns2(fallbackContent);
    return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
      import_block_editor13.__experimentalBlockPatternsList,
      {
        blockPatterns,
        onClickPattern: (pattern, blocks) => {
          onChange(blocks, { selection: void 0 });
          onChoosePattern();
        }
      }
    );
  }
  function StartModal({ slug, isCustom, onClose, postType: postType2 }) {
    const fallbackContent = useFallbackTemplateContent(slug, isCustom);
    if (!fallbackContent) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
      import_components34.Modal,
      {
        className: "editor-start-template-options__modal",
        title: (0, import_i18n71.__)("Choose a pattern"),
        closeLabel: (0, import_i18n71.__)("Cancel"),
        focusOnMount: "firstElement",
        onRequestClose: onClose,
        isFullScreen: true,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "editor-start-template-options__modal-content", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
            PatternSelection2,
            {
              fallbackContent,
              slug,
              isCustom,
              postType: postType2,
              onChoosePattern: () => {
                onClose();
              }
            }
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
            import_components34.Flex,
            {
              className: "editor-start-template-options__modal__actions",
              justify: "flex-end",
              expanded: false,
              children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_components34.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
                import_components34.Button,
                {
                  __next40pxDefaultSize: true,
                  variant: "tertiary",
                  onClick: onClose,
                  children: (0, import_i18n71.__)("Skip")
                }
              ) })
            }
          )
        ]
      }
    );
  }
  function StartTemplateOptions() {
    const [isClosed, setIsClosed] = (0, import_element44.useState)(false);
    const { shouldOpenModal, slug, isCustom, postType: postType2, postId: postId2 } = (0, import_data50.useSelect)(
      (select6) => {
        const { getCurrentPostType: getCurrentPostType2, getCurrentPostId: getCurrentPostId2 } = select6(store);
        const _postType = getCurrentPostType2();
        const _postId = getCurrentPostId2();
        const { getEditedEntityRecord, hasEditsForEntityRecord } = select6(import_core_data34.store);
        const templateRecord = getEditedEntityRecord(
          "postType",
          _postType,
          _postId
        );
        const hasEdits = hasEditsForEntityRecord(
          "postType",
          _postType,
          _postId
        );
        return {
          shouldOpenModal: !hasEdits && "" === templateRecord.content && TEMPLATE_POST_TYPE === _postType,
          slug: templateRecord.slug,
          isCustom: templateRecord.is_custom,
          postType: _postType,
          postId: _postId
        };
      },
      []
    );
    (0, import_element44.useEffect)(() => {
      setIsClosed(false);
    }, [postType2, postId2]);
    if (!shouldOpenModal || isClosed) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
      StartModal,
      {
        slug,
        isCustom,
        postType: postType2,
        onClose: () => setIsClosed(true)
      }
    );
  }

  // packages/editor/build-module/components/global-keyboard-shortcuts/index.mjs
  var import_keyboard_shortcuts3 = __toESM(require_keyboard_shortcuts(), 1);
  var import_data51 = __toESM(require_data(), 1);
  var import_block_editor14 = __toESM(require_block_editor(), 1);
  function EditorKeyboardShortcuts() {
    const isModeToggleDisabled = (0, import_data51.useSelect)((select6) => {
      const { richEditingEnabled, codeEditingEnabled } = select6(store).getEditorSettings();
      return !richEditingEnabled || !codeEditingEnabled;
    }, []);
    const { getBlockSelectionStart: getBlockSelectionStart2 } = (0, import_data51.useSelect)(import_block_editor14.store);
    const { getActiveComplementaryArea: getActiveComplementaryArea2 } = (0, import_data51.useSelect)(store2);
    const { enableComplementaryArea: enableComplementaryArea2, disableComplementaryArea: disableComplementaryArea2 } = (0, import_data51.useDispatch)(store2);
    const {
      redo: redo2,
      undo: undo2,
      savePost: savePost2,
      setIsListViewOpened: setIsListViewOpened2,
      switchEditorMode: switchEditorMode2,
      toggleDistractionFree: toggleDistractionFree2
    } = (0, import_data51.useDispatch)(store);
    const {
      isEditedPostDirty: isEditedPostDirty2,
      isPostSavingLocked: isPostSavingLocked2,
      isListViewOpened: isListViewOpened2,
      getEditorMode: getEditorMode2
    } = (0, import_data51.useSelect)(store);
    (0, import_keyboard_shortcuts3.useShortcut)(
      "core/editor/toggle-mode",
      () => {
        switchEditorMode2(
          getEditorMode2() === "visual" ? "text" : "visual"
        );
      },
      {
        isDisabled: isModeToggleDisabled
      }
    );
    (0, import_keyboard_shortcuts3.useShortcut)("core/editor/toggle-distraction-free", () => {
      toggleDistractionFree2();
    });
    (0, import_keyboard_shortcuts3.useShortcut)("core/editor/undo", (event) => {
      undo2();
      event.preventDefault();
    });
    (0, import_keyboard_shortcuts3.useShortcut)("core/editor/redo", (event) => {
      redo2();
      event.preventDefault();
    });
    (0, import_keyboard_shortcuts3.useShortcut)("core/editor/save", (event) => {
      event.preventDefault();
      if (isPostSavingLocked2()) {
        return;
      }
      if (!isEditedPostDirty2()) {
        return;
      }
      savePost2();
    });
    (0, import_keyboard_shortcuts3.useShortcut)("core/editor/toggle-list-view", (event) => {
      if (!isListViewOpened2()) {
        event.preventDefault();
        setIsListViewOpened2(true);
      }
    });
    (0, import_keyboard_shortcuts3.useShortcut)("core/editor/toggle-sidebar", (event) => {
      event.preventDefault();
      const isEditorSidebarOpened = [
        "edit-post/document",
        "edit-post/block"
      ].includes(getActiveComplementaryArea2("core"));
      if (isEditorSidebarOpened) {
        disableComplementaryArea2("core");
      } else {
        const sidebarToOpen = getBlockSelectionStart2() ? "edit-post/block" : "edit-post/document";
        enableComplementaryArea2("core", sidebarToOpen);
      }
    });
    return null;
  }

  // packages/editor/build-module/components/template-part-menu-items/index.mjs
  var import_data54 = __toESM(require_data(), 1);
  var import_block_editor17 = __toESM(require_block_editor(), 1);

  // packages/editor/build-module/components/template-part-menu-items/convert-to-regular.mjs
  var import_data52 = __toESM(require_data(), 1);
  var import_block_editor15 = __toESM(require_block_editor(), 1);
  var import_core_data35 = __toESM(require_core_data(), 1);
  var import_components35 = __toESM(require_components(), 1);
  var import_i18n72 = __toESM(require_i18n(), 1);
  var import_html_entities8 = __toESM(require_html_entities(), 1);
  var import_element45 = __toESM(require_element(), 1);
  var import_jsx_runtime127 = __toESM(require_jsx_runtime(), 1);
  function ConvertToRegularBlocks({ clientId, onClose }) {
    const [showConfirmDialog, setShowConfirmDialog] = (0, import_element45.useState)(false);
    const { getBlocks: getBlocks2 } = (0, import_data52.useSelect)(import_block_editor15.store);
    const { replaceBlocks: replaceBlocks2 } = (0, import_data52.useDispatch)(import_block_editor15.store);
    const { canRemove, templatePartTitle } = (0, import_data52.useSelect)(
      (select6) => {
        const { canRemoveBlock, getBlock: getBlock2 } = select6(import_block_editor15.store);
        const { getEntityRecord, getCurrentTheme } = select6(import_core_data35.store);
        const block = getBlock2(clientId);
        const { slug, theme } = block?.attributes ?? {};
        const themeSlug = theme || getCurrentTheme()?.stylesheet;
        const templatePartId = themeSlug && slug ? `${themeSlug}//${slug}` : null;
        const entity = templatePartId ? getEntityRecord(
          "postType",
          "wp_template_part",
          templatePartId
        ) : null;
        return {
          canRemove: canRemoveBlock(clientId),
          templatePartTitle: entity?.title?.rendered ? (0, import_html_entities8.decodeEntities)(entity.title.rendered) : null
        };
      },
      [clientId]
    );
    if (!canRemove) {
      return null;
    }
    const title = templatePartTitle ? (0, import_i18n72.sprintf)(
      /* translators: %s: template part title, e.g. "Header" */
      (0, import_i18n72.__)("Detach %s?"),
      templatePartTitle
    ) : (0, import_i18n72.__)("Detach template part?");
    const message2 = templatePartTitle ? (0, import_i18n72.sprintf)(
      /* translators: %s: template part title, e.g. "Header" */
      (0, import_i18n72.__)(
        "The blocks will be separated from the original template part and will be fully editable. Future changes to the %s template part will not apply here."
      ),
      templatePartTitle
    ) : (0, import_i18n72.__)(
      "The blocks will be separated from the original template part and will be fully editable. Future changes to the template part will not apply here."
    );
    return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_jsx_runtime127.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_components35.MenuItem, { onClick: () => setShowConfirmDialog(true), children: (0, import_i18n72.__)("Detach") }),
      /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
        import_components35.__experimentalConfirmDialog,
        {
          isOpen: showConfirmDialog,
          onConfirm: () => {
            replaceBlocks2(clientId, getBlocks2(clientId));
            onClose();
          },
          onCancel: () => setShowConfirmDialog(false),
          confirmButtonText: (0, import_i18n72.__)("Detach"),
          size: "medium",
          title,
          __experimentalHideHeader: false,
          children: message2
        }
      )
    ] });
  }

  // packages/editor/build-module/components/template-part-menu-items/convert-to-template-part.mjs
  var import_data53 = __toESM(require_data(), 1);
  var import_block_editor16 = __toESM(require_block_editor(), 1);
  var import_components36 = __toESM(require_components(), 1);
  var import_blocks13 = __toESM(require_blocks(), 1);
  var import_i18n73 = __toESM(require_i18n(), 1);
  var import_element46 = __toESM(require_element(), 1);
  var import_notices15 = __toESM(require_notices(), 1);
  var import_core_data36 = __toESM(require_core_data(), 1);
  var import_jsx_runtime128 = __toESM(require_jsx_runtime(), 1);
  function ConvertToTemplatePart({ clientIds, blocks }) {
    const [isModalOpen, setIsModalOpen] = (0, import_element46.useState)(false);
    const { replaceBlocks: replaceBlocks2 } = (0, import_data53.useDispatch)(import_block_editor16.store);
    const { createSuccessNotice } = (0, import_data53.useDispatch)(import_notices15.store);
    const { isBlockBasedTheme, canCreate } = (0, import_data53.useSelect)((select6) => {
      return {
        isBlockBasedTheme: select6(import_core_data36.store).getCurrentTheme()?.is_block_theme,
        canCreate: select6(import_block_editor16.store).canInsertBlockType(
          "core/template-part"
        )
      };
    }, []);
    if (!isBlockBasedTheme || !canCreate) {
      return null;
    }
    const onConvert = async (templatePart) => {
      replaceBlocks2(
        clientIds,
        (0, import_blocks13.createBlock)("core/template-part", {
          slug: templatePart.slug,
          theme: templatePart.theme
        })
      );
      createSuccessNotice((0, import_i18n73.__)("Template part created."), {
        type: "snackbar"
      });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_jsx_runtime128.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
        import_components36.MenuItem,
        {
          icon: symbol_filled_default,
          onClick: () => {
            setIsModalOpen(true);
          },
          "aria-expanded": isModalOpen,
          "aria-haspopup": "dialog",
          children: (0, import_i18n73.__)("Create template part")
        }
      ),
      isModalOpen && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
        CreateTemplatePartModal,
        {
          closeModal: () => {
            setIsModalOpen(false);
          },
          blocks,
          onCreate: onConvert
        }
      )
    ] });
  }

  // packages/editor/build-module/components/template-part-menu-items/index.mjs
  var import_jsx_runtime129 = __toESM(require_jsx_runtime(), 1);
  function TemplatePartMenuItems() {
    return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_block_editor17.BlockSettingsMenuControls, { children: ({ selectedClientIds, onClose }) => /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
      TemplatePartConverterMenuItem,
      {
        clientIds: selectedClientIds,
        onClose
      }
    ) });
  }
  function TemplatePartConverterMenuItem({ clientIds, onClose }) {
    const { blocks } = (0, import_data54.useSelect)(
      (select6) => {
        const { getBlocksByClientId: getBlocksByClientId2 } = select6(import_block_editor17.store);
        return {
          blocks: getBlocksByClientId2(clientIds)
        };
      },
      [clientIds]
    );
    if (blocks.length === 1 && blocks[0]?.name === "core/template-part") {
      return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
        ConvertToRegularBlocks,
        {
          clientId: clientIds[0],
          onClose
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(ConvertToTemplatePart, { clientIds, blocks });
  }

  // packages/editor/build-module/components/provider/index.mjs
  var import_jsx_runtime130 = __toESM(require_jsx_runtime(), 1);
  var { ExperimentalBlockEditorProvider } = unlock(import_block_editor18.privateApis);
  var { PatternsMenuItems } = unlock(import_patterns7.privateApis);
  var noop4 = () => {
  };
  var NON_CONTEXTUAL_POST_TYPES = [
    "wp_block",
    "wp_navigation",
    "wp_template_part"
  ];
  function useBlockEditorProps(post2, template2, mode) {
    const revisionBlocks = useRevisionBlocks();
    const rootLevelPost = mode === "template-locked" ? "template" : "post";
    const [postBlocks, onInput, onChange] = (0, import_core_data37.useEntityBlockEditor)(
      "postType",
      post2.type,
      { id: post2.id }
    );
    const [templateBlocks, onInputTemplate, onChangeTemplate] = (0, import_core_data37.useEntityBlockEditor)("postType", template2?.type, {
      id: template2?.id
    });
    const maybeNavigationBlocks = (0, import_element47.useMemo)(() => {
      if (post2.type === "wp_navigation") {
        return [
          (0, import_blocks14.createBlock)("core/navigation", {
            ref: post2.id,
            // As the parent editor is locked with `templateLock`, the template locking
            // must be explicitly "unset" on the block itself to allow the user to modify
            // the block's content.
            templateLock: false
          })
        ];
      }
    }, [post2.type, post2.id]);
    const blocks = (0, import_element47.useMemo)(() => {
      if (maybeNavigationBlocks) {
        return maybeNavigationBlocks;
      }
      if (rootLevelPost === "template") {
        return templateBlocks;
      }
      return postBlocks;
    }, [maybeNavigationBlocks, rootLevelPost, templateBlocks, postBlocks]);
    if (revisionBlocks !== null) {
      return [revisionBlocks, noop4, noop4];
    }
    const disableRootLevelChanges = !!template2 && mode === "template-locked" || post2.type === "wp_navigation";
    if (disableRootLevelChanges) {
      return [blocks, noop4, noop4];
    }
    return [
      blocks,
      rootLevelPost === "post" ? onInput : onInputTemplate,
      rootLevelPost === "post" ? onChange : onChangeTemplate
    ];
  }
  var ExperimentalEditorProvider = with_registry_provider_default(
    ({
      post: post2,
      settings,
      recovery,
      initialEdits,
      children,
      BlockEditorProviderComponent = ExperimentalBlockEditorProvider,
      __unstableTemplate: template2
    }) => {
      const hasTemplate = !!template2;
      const {
        editorSettings: editorSettings2,
        selection,
        isReady: isReady2,
        mode,
        defaultMode,
        postTypeEntities,
        isInRevisionsMode,
        currentRevisionId
      } = (0, import_data55.useSelect)(
        (select6) => {
          const {
            getEditorSettings: getEditorSettings2,
            getRenderingMode: getRenderingMode2,
            __unstableIsEditorReady: __unstableIsEditorReady2,
            getDefaultRenderingMode: getDefaultRenderingMode2,
            isRevisionsMode: _isRevisionsMode,
            getCurrentRevisionId: _getCurrentRevisionId
          } = unlock(select6(store));
          const { getEntitiesConfig, getEntityRecordEdits } = select6(import_core_data37.store);
          const _mode = getRenderingMode2();
          const _defaultMode = getDefaultRenderingMode2(post2.type);
          const hasResolvedDefaultMode = _defaultMode === "template-locked" ? hasTemplate : _defaultMode !== void 0;
          const isRenderingModeReady = _defaultMode !== void 0;
          const entityEdits = getEntityRecordEdits(
            "postType",
            post2.type,
            post2.id
          );
          return {
            editorSettings: getEditorSettings2(),
            isReady: __unstableIsEditorReady2(),
            mode: isRenderingModeReady ? _mode : void 0,
            defaultMode: hasResolvedDefaultMode ? _defaultMode : void 0,
            selection: entityEdits?.selection,
            postTypeEntities: post2.type === "wp_template" ? getEntitiesConfig("postType") : null,
            isInRevisionsMode: _isRevisionsMode(),
            currentRevisionId: _getCurrentRevisionId()
          };
        },
        [post2.type, post2.id, hasTemplate]
      );
      const shouldRenderTemplate = hasTemplate && mode !== "post-only";
      const rootLevelPost = shouldRenderTemplate ? template2 : post2;
      const defaultBlockContext = (0, import_element47.useMemo)(() => {
        const postContext = {};
        if (post2.type === "wp_template") {
          if (post2.slug === "page") {
            postContext.postType = "page";
          } else if (post2.slug === "single") {
            postContext.postType = "post";
          } else if (post2.slug.split("-")[0] === "single") {
            const postTypeNames = postTypeEntities?.map((entity) => entity.name) || [];
            const match3 = post2.slug.match(
              `^single-(${postTypeNames.join("|")})(?:-.+)?$`
            );
            if (match3) {
              postContext.postType = match3[1];
            }
          }
        } else if (!NON_CONTEXTUAL_POST_TYPES.includes(rootLevelPost.type) || shouldRenderTemplate) {
          postContext.postId = post2.id;
          postContext.postType = post2.type;
        }
        return {
          ...postContext,
          templateSlug: rootLevelPost.type === "wp_template" ? rootLevelPost.slug : void 0
        };
      }, [
        shouldRenderTemplate,
        post2.id,
        post2.type,
        post2.slug,
        rootLevelPost.type,
        rootLevelPost.slug,
        postTypeEntities
      ]);
      const { id, type } = rootLevelPost;
      const blockEditorSettings = use_block_editor_settings_default(
        editorSettings2,
        type,
        id,
        mode
      );
      const [blocks, onInput, onChange] = useBlockEditorProps(
        post2,
        template2,
        mode
      );
      const {
        updatePostLock: updatePostLock2,
        setupEditor: setupEditor2,
        updateEditorSettings: updateEditorSettings2,
        setCurrentTemplateId: setCurrentTemplateId2,
        setEditedPost: setEditedPost2,
        setRenderingMode: setRenderingMode2
      } = unlock((0, import_data55.useDispatch)(store));
      const { editEntityRecord } = (0, import_data55.useDispatch)(import_core_data37.store);
      const onChangeSelection = (0, import_element47.useCallback)(
        (newSelection) => {
          editEntityRecord(
            "postType",
            post2.type,
            post2.id,
            { selection: newSelection },
            { undoIgnore: true }
          );
        },
        [editEntityRecord, post2.type, post2.id]
      );
      const { createWarningNotice, removeNotice } = (0, import_data55.useDispatch)(import_notices16.store);
      (0, import_element47.useLayoutEffect)(() => {
        if (recovery) {
          return;
        }
        updatePostLock2(settings.postLock);
        setupEditor2(post2, initialEdits, settings.template);
        if (settings.autosave) {
          createWarningNotice(
            (0, import_i18n74.__)(
              "There is an autosave of this post that is more recent than the version below."
            ),
            {
              id: "autosave-exists",
              actions: [
                {
                  label: (0, import_i18n74.__)("View the autosave"),
                  url: settings.autosave.editLink
                }
              ]
            }
          );
        }
      }, []);
      (0, import_element47.useEffect)(() => {
        setEditedPost2(post2.type, post2.id);
        if (typeof window !== "undefined" && window.__experimentalTemplateActivate) {
          removeNotice("template-activate-notice");
        }
        return () => setEditedPost2(null, null);
      }, [post2.type, post2.id, setEditedPost2, removeNotice]);
      (0, import_element47.useEffect)(() => {
        updateEditorSettings2(settings);
      }, [settings, updateEditorSettings2]);
      (0, import_element47.useEffect)(() => {
        setCurrentTemplateId2(template2?.id);
      }, [template2?.id, setCurrentTemplateId2]);
      (0, import_element47.useEffect)(() => {
        if (defaultMode) {
          setRenderingMode2(defaultMode);
        }
      }, [defaultMode, setRenderingMode2]);
      useHideBlocksFromInserter(post2.type, mode);
      useCommands();
      useUploadSaveLock();
      if (!isReady2 || !mode) {
        return null;
      }
      const isAttachment = post2.type === ATTACHMENT_POST_TYPE && window?.__experimentalMediaEditor;
      if (isAttachment) {
        return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_core_data37.EntityProvider, { kind: "root", type: "site", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
          import_core_data37.EntityProvider,
          {
            kind: "postType",
            type: post2.type,
            id: post2.id,
            children: [
              children,
              !settings.isPreviewMode && /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_jsx_runtime130.Fragment, { children: [
                /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(EditorKeyboardShortcuts, {}),
                /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(keyboard_shortcut_help_modal_default, {})
              ] })
            ]
          }
        ) });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_core_data37.EntityProvider, { kind: "root", type: "site", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
        import_core_data37.EntityProvider,
        {
          kind: "postType",
          type: post2.type,
          id: post2.id,
          revisionId: currentRevisionId ?? void 0,
          children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_block_editor18.BlockContextProvider, { value: defaultBlockContext, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
            BlockEditorProviderComponent,
            {
              value: blocks,
              onChange,
              onInput,
              selection: isInRevisionsMode ? void 0 : selection,
              onChangeSelection: isInRevisionsMode ? noop4 : onChangeSelection,
              settings: blockEditorSettings,
              useSubRegistry: false,
              children: [
                children,
                !settings.isPreviewMode && /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_jsx_runtime130.Fragment, { children: [
                  /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(PatternsMenuItems, {}),
                  /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(TemplatePartMenuItems, {}),
                  mode === "template-locked" && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(DisableNonPageContentBlocks, {}),
                  type === "wp_navigation" && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(NavigationBlockEditingMode, {}),
                  /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(EditorKeyboardShortcuts, {}),
                  /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(keyboard_shortcut_help_modal_default, {}),
                  /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(BlockRemovalWarnings, {}),
                  /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(StartPageOptions, {}),
                  /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(StartTemplateOptions, {}),
                  /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(PatternRenameModal, {}),
                  /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(PatternDuplicateModal, {})
                ] })
              ]
            }
          ) })
        }
      ) });
    }
  );
  function EditorProvider(props) {
    return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
      ExperimentalEditorProvider,
      {
        ...props,
        BlockEditorProviderComponent: import_block_editor18.BlockEditorProvider,
        children: props.children
      }
    );
  }
  var provider_default = EditorProvider;

  // packages/editor/build-module/components/global-styles/index.mjs
  var import_core_data50 = __toESM(require_core_data(), 1);
  var import_data70 = __toESM(require_data(), 1);
  var import_element81 = __toESM(require_element(), 1);

  // packages/global-styles-ui/build-module/global-styles-ui.mjs
  var import_components96 = __toESM(require_components(), 1);
  var import_blocks19 = __toESM(require_blocks(), 1);
  var import_data67 = __toESM(require_data(), 1);
  var import_block_editor31 = __toESM(require_block_editor(), 1);
  var import_element78 = __toESM(require_element(), 1);
  var import_compose14 = __toESM(require_compose(), 1);

  // packages/global-styles-ui/build-module/provider.mjs
  var import_element49 = __toESM(require_element(), 1);

  // packages/global-styles-ui/build-module/context.mjs
  var import_element48 = __toESM(require_element(), 1);
  var GlobalStylesContext = (0, import_element48.createContext)({
    user: { styles: {}, settings: {} },
    base: { styles: {}, settings: {} },
    merged: { styles: {}, settings: {} },
    onChange: () => {
    },
    fontLibraryEnabled: false
  });

  // packages/global-styles-ui/build-module/provider.mjs
  var import_jsx_runtime131 = __toESM(require_jsx_runtime(), 1);
  function GlobalStylesProvider({
    children,
    value,
    baseValue,
    onChange,
    fontLibraryEnabled
  }) {
    const merged = (0, import_element49.useMemo)(() => {
      return mergeGlobalStyles(baseValue, value);
    }, [baseValue, value]);
    const contextValue = (0, import_element49.useMemo)(
      () => ({
        user: value,
        base: baseValue,
        merged,
        onChange,
        fontLibraryEnabled
      }),
      [value, baseValue, merged, onChange, fontLibraryEnabled]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(GlobalStylesContext.Provider, { value: contextValue, children });
  }

  // packages/global-styles-ui/build-module/screen-root.mjs
  var import_components43 = __toESM(require_components(), 1);
  var import_i18n78 = __toESM(require_i18n(), 1);
  var import_data57 = __toESM(require_data(), 1);
  var import_core_data39 = __toESM(require_core_data(), 1);

  // packages/global-styles-ui/build-module/icon-with-current-color.mjs
  var import_jsx_runtime132 = __toESM(require_jsx_runtime(), 1);
  function IconWithCurrentColor({
    className,
    ...props
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
      icon_default,
      {
        className: clsx_default(
          className,
          "global-styles-ui-icon-with-current-color"
        ),
        ...props
      }
    );
  }

  // packages/global-styles-ui/build-module/navigation-button.mjs
  var import_components37 = __toESM(require_components(), 1);
  var import_jsx_runtime133 = __toESM(require_jsx_runtime(), 1);
  function GenericNavigationButton({
    icon,
    children,
    ...props
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_components37.__experimentalItem, { ...props, children: [
      icon && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_components37.__experimentalHStack, { justify: "flex-start", children: [
        /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(IconWithCurrentColor, { icon, size: 24 }),
        /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_components37.FlexItem, { children })
      ] }),
      !icon && children
    ] });
  }
  function NavigationButtonAsItem(props) {
    return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_components37.Navigator.Button, { as: GenericNavigationButton, ...props });
  }

  // packages/global-styles-ui/build-module/root-menu.mjs
  var import_components38 = __toESM(require_components(), 1);
  var import_i18n76 = __toESM(require_i18n(), 1);
  var import_block_editor19 = __toESM(require_block_editor(), 1);

  // node_modules/colord/plugins/a11y.mjs
  var o3 = function(o4) {
    var t4 = o4 / 255;
    return t4 < 0.04045 ? t4 / 12.92 : Math.pow((t4 + 0.055) / 1.055, 2.4);
  };
  var t3 = function(t4) {
    return 0.2126 * o3(t4.r) + 0.7152 * o3(t4.g) + 0.0722 * o3(t4.b);
  };
  function a11y_default(o4) {
    o4.prototype.luminance = function() {
      return o5 = t3(this.rgba), void 0 === (r4 = 2) && (r4 = 0), void 0 === n3 && (n3 = Math.pow(10, r4)), Math.round(n3 * o5) / n3 + 0;
      var o5, r4, n3;
    }, o4.prototype.contrast = function(r4) {
      void 0 === r4 && (r4 = "#FFF");
      var n3, a3, i3, e3, v3, u3, d3, c6 = r4 instanceof o4 ? r4 : new o4(r4);
      return e3 = this.rgba, v3 = c6.toRgb(), u3 = t3(e3), d3 = t3(v3), n3 = u3 > d3 ? (u3 + 0.05) / (d3 + 0.05) : (d3 + 0.05) / (u3 + 0.05), void 0 === (a3 = 2) && (a3 = 0), void 0 === i3 && (i3 = Math.pow(10, a3)), Math.floor(i3 * n3) / i3 + 0;
    }, o4.prototype.isReadable = function(o5, t4) {
      return void 0 === o5 && (o5 = "#FFF"), void 0 === t4 && (t4 = {}), this.contrast(o5) >= (e3 = void 0 === (i3 = (r4 = t4).size) ? "normal" : i3, "AAA" === (a3 = void 0 === (n3 = r4.level) ? "AA" : n3) && "normal" === e3 ? 7 : "AA" === a3 && "large" === e3 ? 3 : 4.5);
      var r4, n3, a3, i3, e3;
    };
  }

  // packages/global-styles-ui/build-module/hooks.mjs
  var import_element50 = __toESM(require_element(), 1);
  var import_data56 = __toESM(require_data(), 1);
  var import_core_data38 = __toESM(require_core_data(), 1);
  var import_i18n75 = __toESM(require_i18n(), 1);

  // packages/global-styles-ui/build-module/utils.mjs
  function removePropertiesFromObject(object, properties) {
    if (!properties?.length) {
      return object;
    }
    if (typeof object !== "object" || !object || !Object.keys(object).length) {
      return object;
    }
    for (const key in object) {
      if (properties.includes(key)) {
        delete object[key];
      } else if (typeof object[key] === "object") {
        removePropertiesFromObject(object[key], properties);
      }
    }
    return object;
  }
  var filterObjectByProperties = (object, properties) => {
    if (!object || !properties?.length) {
      return {};
    }
    const newObject = {};
    Object.keys(object).forEach((key) => {
      if (properties.includes(key)) {
        newObject[key] = object[key];
      } else if (typeof object[key] === "object") {
        const newFilter = filterObjectByProperties(
          object[key],
          properties
        );
        if (Object.keys(newFilter).length) {
          newObject[key] = newFilter;
        }
      }
    });
    return newObject;
  };
  function isVariationWithProperties(variation, properties) {
    const variationWithProperties = filterObjectByProperties(
      structuredClone(variation),
      properties
    );
    return areGlobalStylesEqual(variationWithProperties, variation);
  }
  function getFontFamilyFromSetting(fontFamilies, setting) {
    if (!Array.isArray(fontFamilies) || !setting) {
      return null;
    }
    const fontFamilyVariable = setting.replace("var(", "").replace(")", "");
    const fontFamilySlug = fontFamilyVariable?.split("--").slice(-1)[0];
    return fontFamilies.find(
      (fontFamily) => fontFamily.slug === fontFamilySlug
    );
  }
  function getFontFamilies(themeJson) {
    const themeFontFamilies = themeJson?.settings?.typography?.fontFamilies?.theme;
    const customFontFamilies = themeJson?.settings?.typography?.fontFamilies?.custom;
    let fontFamilies = [];
    if (themeFontFamilies && customFontFamilies) {
      fontFamilies = [...themeFontFamilies, ...customFontFamilies];
    } else if (themeFontFamilies) {
      fontFamilies = themeFontFamilies;
    } else if (customFontFamilies) {
      fontFamilies = customFontFamilies;
    }
    const bodyFontFamilySetting = themeJson?.styles?.typography?.fontFamily;
    const bodyFontFamily = getFontFamilyFromSetting(
      fontFamilies,
      bodyFontFamilySetting
    );
    const headingFontFamilySetting = themeJson?.styles?.elements?.heading?.typography?.fontFamily;
    let headingFontFamily;
    if (!headingFontFamilySetting) {
      headingFontFamily = bodyFontFamily;
    } else {
      headingFontFamily = getFontFamilyFromSetting(
        fontFamilies,
        themeJson?.styles?.elements?.heading?.typography?.fontFamily
      );
    }
    return [bodyFontFamily, headingFontFamily];
  }
  function getVariationClassName(variation) {
    if (!variation) {
      return "";
    }
    return `is-style-${variation}`;
  }
  function getNewIndexFromPresets(presets, slugPrefix) {
    const nameRegex = new RegExp(`^${slugPrefix}([\\d]+)$`);
    const highestPresetValue = presets.reduce((currentHighest, preset) => {
      if (typeof preset?.slug === "string") {
        const matches = preset?.slug.match(nameRegex);
        if (matches) {
          const id = parseInt(matches[1], 10);
          if (id > currentHighest) {
            return id;
          }
        }
      }
      return currentHighest;
    }, 0);
    return highestPresetValue + 1;
  }

  // packages/global-styles-ui/build-module/hooks.mjs
  k([a11y_default]);
  function useStyle(path, blockName, readFrom = "merged", shouldDecodeEncode = true) {
    const { user, base, merged, onChange } = (0, import_element50.useContext)(GlobalStylesContext);
    let sourceValue = merged;
    if (readFrom === "base") {
      sourceValue = base;
    } else if (readFrom === "user") {
      sourceValue = user;
    }
    const styleValue = (0, import_element50.useMemo)(
      () => getStyle(sourceValue, path, blockName, shouldDecodeEncode),
      [sourceValue, path, blockName, shouldDecodeEncode]
    );
    const setStyleValue = (0, import_element50.useCallback)(
      (newValue) => {
        const newGlobalStyles = setStyle(
          user,
          path,
          newValue,
          blockName
        );
        onChange(newGlobalStyles);
      },
      [user, onChange, path, blockName]
    );
    return [styleValue, setStyleValue];
  }
  function useSetting(path, blockName, readFrom = "merged") {
    const { user, base, merged, onChange } = (0, import_element50.useContext)(GlobalStylesContext);
    let sourceValue = merged;
    if (readFrom === "base") {
      sourceValue = base;
    } else if (readFrom === "user") {
      sourceValue = user;
    }
    const settingValue = (0, import_element50.useMemo)(
      () => getSetting(sourceValue, path, blockName),
      [sourceValue, path, blockName]
    );
    const setSettingValue = (0, import_element50.useCallback)(
      (newValue) => {
        const newGlobalStyles = setSetting(
          user,
          path,
          newValue,
          blockName
        );
        onChange(newGlobalStyles);
      },
      [user, onChange, path, blockName]
    );
    return [settingValue, setSettingValue];
  }
  var EMPTY_ARRAY5 = [];
  function hasThemeVariation({
    title,
    settings,
    styles
  }) {
    return title === (0, import_i18n75.__)("Default") || Object.keys(settings || {}).length > 0 || Object.keys(styles || {}).length > 0;
  }
  function useCurrentMergeThemeStyleVariationsWithUserConfig(properties = []) {
    const { variationsFromTheme } = (0, import_data56.useSelect)((select6) => {
      const _variationsFromTheme = select6(
        import_core_data38.store
      ).__experimentalGetCurrentThemeGlobalStylesVariations?.();
      return {
        variationsFromTheme: _variationsFromTheme || EMPTY_ARRAY5
      };
    }, []);
    const { user: userVariation } = (0, import_element50.useContext)(GlobalStylesContext);
    return (0, import_element50.useMemo)(() => {
      const clonedUserVariation = structuredClone(userVariation);
      const userVariationWithoutProperties = removePropertiesFromObject(
        clonedUserVariation,
        properties
      );
      userVariationWithoutProperties.title = (0, import_i18n75.__)("Default");
      const variationsWithPropertiesAndBase = variationsFromTheme.filter((variation) => {
        return isVariationWithProperties(variation, properties);
      }).map((variation) => {
        return mergeGlobalStyles(
          userVariationWithoutProperties,
          variation
        );
      });
      const variationsByProperties = [
        userVariationWithoutProperties,
        ...variationsWithPropertiesAndBase
      ];
      return variationsByProperties?.length ? variationsByProperties.filter(hasThemeVariation) : [];
    }, [properties, userVariation, variationsFromTheme]);
  }
  function useColorRandomizer(blockName) {
    const [themeColors, setThemeColors] = useSetting(
      "color.palette.theme",
      blockName
    );
    const randomizeColors = (0, import_element50.useCallback)(() => {
      if (!themeColors || !themeColors.length) {
        return;
      }
      const randomRotationValue = Math.floor(Math.random() * 225);
      const newColors = themeColors.map((colorObject) => {
        const { color } = colorObject;
        const newColor = w2(color).rotate(randomRotationValue).toHex();
        return {
          ...colorObject,
          color: newColor
        };
      });
      setThemeColors(newColors);
    }, [themeColors, setThemeColors]);
    return window.__experimentalEnableColorRandomizer ? [randomizeColors] : [];
  }

  // packages/global-styles-ui/build-module/lock-unlock.mjs
  var import_private_apis3 = __toESM(require_private_apis(), 1);
  var { lock: lock3, unlock: unlock3 } = (0, import_private_apis3.__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/global-styles-ui"
  );

  // packages/global-styles-ui/build-module/root-menu.mjs
  var import_jsx_runtime134 = __toESM(require_jsx_runtime(), 1);
  var {
    useHasDimensionsPanel,
    useHasTypographyPanel,
    useHasColorPanel,
    useSettingsForBlockElement,
    useHasBackgroundPanel
  } = unlock3(import_block_editor19.privateApis);
  function RootMenu() {
    const [rawSettings] = useSetting("");
    const settings = useSettingsForBlockElement(rawSettings);
    const hasBackgroundPanel = useHasBackgroundPanel(rawSettings);
    const hasTypographyPanel = useHasTypographyPanel(settings);
    const hasColorPanel = useHasColorPanel(settings);
    const hasShadowPanel = true;
    const hasDimensionsPanel = useHasDimensionsPanel(settings);
    const hasLayoutPanel = hasDimensionsPanel;
    return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_jsx_runtime134.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_components38.__experimentalItemGroup, { children: [
      hasTypographyPanel && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
        NavigationButtonAsItem,
        {
          icon: typography_default,
          path: "/typography",
          children: (0, import_i18n76.__)("Typography")
        }
      ),
      hasColorPanel && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(NavigationButtonAsItem, { icon: color_default, path: "/colors", children: (0, import_i18n76.__)("Colors") }),
      hasBackgroundPanel && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
        NavigationButtonAsItem,
        {
          icon: background_default,
          path: "/background",
          "aria-label": (0, import_i18n76.__)("Background styles"),
          children: (0, import_i18n76.__)("Background")
        }
      ),
      hasShadowPanel && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(NavigationButtonAsItem, { icon: shadow_default, path: "/shadows", children: (0, import_i18n76.__)("Shadows") }),
      hasLayoutPanel && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(NavigationButtonAsItem, { icon: layout_default, path: "/layout", children: (0, import_i18n76.__)("Layout") })
    ] }) });
  }
  var root_menu_default = RootMenu;

  // packages/global-styles-ui/build-module/preview-styles.mjs
  var import_components42 = __toESM(require_components(), 1);

  // packages/global-styles-ui/build-module/preview-hooks.mjs
  function useStylesPreviewColors() {
    const [textColor = "black"] = useStyle("color.text");
    const [backgroundColor = "white"] = useStyle("color.background");
    const [headingColor = textColor] = useStyle(
      "elements.h1.color.text"
    );
    const [linkColor = headingColor] = useStyle(
      "elements.link.color.text"
    );
    const [buttonBackgroundColor = linkColor] = useStyle(
      "elements.button.color.background"
    );
    const [coreColors] = useSetting("color.palette.core") || [];
    const [themeColors] = useSetting("color.palette.theme") || [];
    const [customColors] = useSetting("color.palette.custom") || [];
    const paletteColors = (themeColors ?? []).concat(customColors ?? []).concat(coreColors ?? []);
    const textColorObject = paletteColors.filter(
      ({ color }) => color === textColor
    );
    const buttonBackgroundColorObject = paletteColors.filter(
      ({ color }) => color === buttonBackgroundColor
    );
    const highlightedColors = textColorObject.concat(buttonBackgroundColorObject).concat(paletteColors).filter(
      // we exclude these background color because it is already visible in the preview.
      ({ color }) => color !== backgroundColor
    ).slice(0, 2);
    return {
      paletteColors,
      highlightedColors
    };
  }

  // packages/global-styles-ui/build-module/typography-example.mjs
  var import_element51 = __toESM(require_element(), 1);
  var import_components39 = __toESM(require_components(), 1);
  var import_i18n77 = __toESM(require_i18n(), 1);

  // packages/global-styles-ui/build-module/font-library/utils/preview-styles.mjs
  function findNearest(input, numbers) {
    if (numbers.length === 0) {
      return null;
    }
    numbers.sort((a3, b3) => Math.abs(input - a3) - Math.abs(input - b3));
    return numbers[0];
  }
  function extractFontWeights(fontFaces) {
    const result = [];
    fontFaces.forEach((face) => {
      const weights = String(face.fontWeight).split(" ");
      if (weights.length === 2) {
        const start2 = parseInt(weights[0]);
        const end = parseInt(weights[1]);
        for (let i3 = start2; i3 <= end; i3 += 100) {
          result.push(i3);
        }
      } else if (weights.length === 1) {
        result.push(parseInt(weights[0]));
      }
    });
    return result;
  }
  function formatFontFamily(input) {
    const regex = /^(?!generic\([ a-zA-Z\-]+\)$)(?!^[a-zA-Z\-]+$).+/;
    const output = input.trim();
    const formatItem = (item) => {
      item = item.trim();
      if (item.match(regex)) {
        item = item.replace(/^["']|["']$/g, "");
        return `"${item}"`;
      }
      return item;
    };
    if (output.includes(",")) {
      return output.split(",").map(formatItem).filter((item) => item !== "").join(", ");
    }
    return formatItem(output);
  }
  function formatFontFaceName(input) {
    if (!input) {
      return "";
    }
    let output = input.trim();
    if (output.includes(",")) {
      output = (output.split(",").find((item) => item.trim() !== "") ?? "").trim();
    }
    output = output.replace(/^["']|["']$/g, "");
    if (window.navigator.userAgent.toLowerCase().includes("firefox")) {
      output = `"${output}"`;
    }
    return output;
  }
  function getFamilyPreviewStyle(family) {
    const style = {
      fontFamily: formatFontFamily(family.fontFamily)
    };
    if (!("fontFace" in family) || !Array.isArray(family.fontFace)) {
      style.fontWeight = "400";
      style.fontStyle = "normal";
      return style;
    }
    if (family.fontFace) {
      const normalFaces = family.fontFace.filter(
        (face) => face?.fontStyle && face.fontStyle.toLowerCase() === "normal"
      );
      if (normalFaces.length > 0) {
        style.fontStyle = "normal";
        const normalWeights = extractFontWeights(normalFaces);
        const nearestWeight = findNearest(400, normalWeights);
        style.fontWeight = String(nearestWeight) || "400";
      } else {
        style.fontStyle = family.fontFace.length && family.fontFace[0].fontStyle || "normal";
        style.fontWeight = family.fontFace.length && String(family.fontFace[0].fontWeight) || "400";
      }
    }
    return style;
  }
  function getFacePreviewStyle(face) {
    return {
      fontFamily: formatFontFamily(face.fontFamily),
      fontStyle: face.fontStyle || "normal",
      fontWeight: face.fontWeight || "400"
    };
  }

  // packages/global-styles-ui/build-module/typography-example.mjs
  var import_jsx_runtime135 = __toESM(require_jsx_runtime(), 1);
  function PreviewTypography({
    fontSize,
    variation
  }) {
    const { base } = (0, import_element51.useContext)(GlobalStylesContext);
    let config2 = base;
    if (variation) {
      config2 = { ...base, ...variation };
    }
    const [textColor] = useStyle("color.text");
    const [bodyFontFamilies, headingFontFamilies] = getFontFamilies(config2);
    const bodyPreviewStyle = bodyFontFamilies ? getFamilyPreviewStyle(bodyFontFamilies) : {};
    const headingPreviewStyle = headingFontFamilies ? getFamilyPreviewStyle(headingFontFamilies) : {};
    if (textColor) {
      bodyPreviewStyle.color = textColor;
      headingPreviewStyle.color = textColor;
    }
    if (fontSize) {
      bodyPreviewStyle.fontSize = fontSize;
      headingPreviewStyle.fontSize = fontSize;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
      import_components39.__unstableMotion.div,
      {
        animate: {
          scale: 1,
          opacity: 1
        },
        initial: {
          scale: 0.1,
          opacity: 0
        },
        transition: {
          delay: 0.3,
          type: "tween"
        },
        style: {
          textAlign: "center",
          lineHeight: 1
        },
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { style: headingPreviewStyle, children: (0, import_i18n77._x)("A", "Uppercase letter A") }),
          /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { style: bodyPreviewStyle, children: (0, import_i18n77._x)("a", "Lowercase letter A") })
        ]
      }
    );
  }

  // packages/global-styles-ui/build-module/highlighted-colors.mjs
  var import_components40 = __toESM(require_components(), 1);
  var import_jsx_runtime136 = __toESM(require_jsx_runtime(), 1);
  function HighlightedColors({
    normalizedColorSwatchSize,
    ratio
  }) {
    const { highlightedColors } = useStylesPreviewColors();
    const scaledSwatchSize = normalizedColorSwatchSize * ratio;
    return highlightedColors.map(({ slug, color }, index2) => /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
      import_components40.__unstableMotion.div,
      {
        style: {
          height: scaledSwatchSize,
          width: scaledSwatchSize,
          background: color,
          borderRadius: scaledSwatchSize / 2
        },
        animate: {
          scale: 1,
          opacity: 1
        },
        initial: {
          scale: 0.1,
          opacity: 0
        },
        transition: {
          delay: index2 === 1 ? 0.2 : 0.1
        }
      },
      `${slug}-${index2}`
    ));
  }

  // packages/global-styles-ui/build-module/preview-wrapper.mjs
  var import_components41 = __toESM(require_components(), 1);
  var import_compose9 = __toESM(require_compose(), 1);
  var import_element52 = __toESM(require_element(), 1);
  var import_jsx_runtime137 = __toESM(require_jsx_runtime(), 1);
  var normalizedWidth = 248;
  var normalizedHeight = 152;
  var THROTTLE_OPTIONS = {
    leading: true,
    trailing: true
  };
  function PreviewWrapper({
    children,
    label,
    isFocused,
    withHoverView
  }) {
    const [backgroundColor = "white"] = useStyle("color.background");
    const [gradientValue] = useStyle("color.gradient");
    const disableMotion = (0, import_compose9.useReducedMotion)();
    const [isHovered, setIsHovered] = (0, import_element52.useState)(false);
    const [containerResizeListener, { width }] = (0, import_compose9.useResizeObserver)();
    const [throttledWidth, setThrottledWidthState] = (0, import_element52.useState)(width);
    const [ratioState, setRatioState] = (0, import_element52.useState)();
    const setThrottledWidth = (0, import_compose9.useThrottle)(
      setThrottledWidthState,
      250,
      THROTTLE_OPTIONS
    );
    (0, import_element52.useLayoutEffect)(() => {
      if (width) {
        setThrottledWidth(width);
      }
    }, [width, setThrottledWidth]);
    (0, import_element52.useLayoutEffect)(() => {
      const newRatio = throttledWidth ? throttledWidth / normalizedWidth : 1;
      const ratioDiff = newRatio - (ratioState || 0);
      const isRatioDiffBigEnough = Math.abs(ratioDiff) > 0.1;
      if (isRatioDiffBigEnough || !ratioState) {
        setRatioState(newRatio);
      }
    }, [throttledWidth, ratioState]);
    const fallbackRatio = width ? width / normalizedWidth : 1;
    const ratio = ratioState ? ratioState : fallbackRatio;
    const isReady2 = !!width;
    return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_jsx_runtime137.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { style: { position: "relative" }, children: containerResizeListener }),
      isReady2 && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
        "div",
        {
          className: "global-styles-ui-preview__wrapper",
          style: {
            height: normalizedHeight * ratio
          },
          onMouseEnter: () => setIsHovered(true),
          onMouseLeave: () => setIsHovered(false),
          tabIndex: -1,
          children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
            import_components41.__unstableMotion.div,
            {
              style: {
                height: normalizedHeight * ratio,
                width: "100%",
                background: gradientValue ?? backgroundColor,
                cursor: withHoverView ? "pointer" : void 0
              },
              initial: "start",
              animate: (isHovered || isFocused) && !disableMotion && label ? "hover" : "start",
              children: [].concat(children).map(
                (child, key) => child({ ratio, key })
              )
            }
          )
        }
      )
    ] });
  }
  var preview_wrapper_default = PreviewWrapper;

  // packages/global-styles-ui/build-module/preview-styles.mjs
  var import_jsx_runtime138 = __toESM(require_jsx_runtime(), 1);
  var firstFrameVariants = {
    start: {
      scale: 1,
      opacity: 1
    },
    hover: {
      scale: 0,
      opacity: 0
    }
  };
  var midFrameVariants = {
    hover: {
      opacity: 1
    },
    start: {
      opacity: 0.5
    }
  };
  var secondFrameVariants = {
    hover: {
      scale: 1,
      opacity: 1
    },
    start: {
      scale: 0,
      opacity: 0
    }
  };
  function PreviewStyles({
    label,
    isFocused,
    withHoverView,
    variation
  }) {
    const [fontWeight] = useStyle("typography.fontWeight");
    const [fontFamily = "serif"] = useStyle(
      "typography.fontFamily"
    );
    const [headingFontFamily = fontFamily] = useStyle(
      "elements.h1.typography.fontFamily"
    );
    const [headingFontWeight = fontWeight] = useStyle(
      "elements.h1.typography.fontWeight"
    );
    const [textColor = "black"] = useStyle("color.text");
    const [headingColor = textColor] = useStyle(
      "elements.h1.color.text"
    );
    const { paletteColors } = useStylesPreviewColors();
    return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
      preview_wrapper_default,
      {
        label,
        isFocused,
        withHoverView,
        children: [
          ({ ratio, key }) => /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
            import_components42.__unstableMotion.div,
            {
              variants: firstFrameVariants,
              style: {
                height: "100%",
                overflow: "hidden"
              },
              children: /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
                import_components42.__experimentalHStack,
                {
                  spacing: 10 * ratio,
                  justify: "center",
                  style: {
                    height: "100%",
                    overflow: "hidden"
                  },
                  children: [
                    /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
                      PreviewTypography,
                      {
                        fontSize: 65 * ratio,
                        variation
                      }
                    ),
                    /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_components42.__experimentalVStack, { spacing: 4 * ratio, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
                      HighlightedColors,
                      {
                        normalizedColorSwatchSize: 32,
                        ratio
                      }
                    ) })
                  ]
                }
              )
            },
            key
          ),
          ({ key }) => /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
            import_components42.__unstableMotion.div,
            {
              variants: withHoverView ? midFrameVariants : void 0,
              style: {
                height: "100%",
                width: "100%",
                position: "absolute",
                top: 0,
                overflow: "hidden",
                filter: "blur(60px)",
                opacity: 0.1
              },
              children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
                import_components42.__experimentalHStack,
                {
                  spacing: 0,
                  justify: "flex-start",
                  style: {
                    height: "100%",
                    overflow: "hidden"
                  },
                  children: paletteColors.slice(0, 4).map(({ color }, index2) => /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
                    "div",
                    {
                      style: {
                        height: "100%",
                        background: color,
                        flexGrow: 1
                      }
                    },
                    index2
                  ))
                }
              )
            },
            key
          ),
          ({ ratio, key }) => /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
            import_components42.__unstableMotion.div,
            {
              variants: secondFrameVariants,
              style: {
                height: "100%",
                width: "100%",
                overflow: "hidden",
                position: "absolute",
                top: 0
              },
              children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
                import_components42.__experimentalVStack,
                {
                  spacing: 3 * ratio,
                  justify: "center",
                  style: {
                    height: "100%",
                    overflow: "hidden",
                    padding: 10 * ratio,
                    boxSizing: "border-box"
                  },
                  children: label && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
                    "div",
                    {
                      style: {
                        fontSize: 40 * ratio,
                        fontFamily: headingFontFamily,
                        color: headingColor,
                        fontWeight: headingFontWeight,
                        lineHeight: "1em",
                        textAlign: "center"
                      },
                      children: label
                    }
                  )
                }
              )
            },
            key
          )
        ]
      }
    );
  }
  var preview_styles_default = PreviewStyles;

  // packages/global-styles-ui/build-module/screen-root.mjs
  var import_jsx_runtime139 = __toESM(require_jsx_runtime(), 1);
  function ScreenRoot() {
    const hasVariations = (0, import_data57.useSelect)((select6) => {
      const { __experimentalGetCurrentThemeGlobalStylesVariations } = select6(import_core_data39.store);
      return !!__experimentalGetCurrentThemeGlobalStylesVariations()?.length;
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
      import_components43.Card,
      {
        size: "small",
        isBorderless: true,
        className: "global-styles-ui-screen-root",
        isRounded: false,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_components43.CardBody, { children: /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_components43.__experimentalVStack, { spacing: 4, children: [
            /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_components43.Card, { className: "global-styles-ui-screen-root__active-style-tile", children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_components43.CardMedia, { className: "global-styles-ui-screen-root__active-style-tile-preview", children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(preview_styles_default, {}) }) }),
            hasVariations && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_components43.__experimentalItemGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(NavigationButtonAsItem, { path: "/variations", children: /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_components43.__experimentalHStack, { justify: "space-between", children: [
              /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_components43.FlexItem, { children: (0, import_i18n78.__)("Browse styles") }),
              /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
                IconWithCurrentColor,
                {
                  icon: (0, import_i18n78.isRTL)() ? chevron_left_default : chevron_right_default
                }
              )
            ] }) }) }),
            /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(root_menu_default, {})
          ] }) }),
          /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_components43.CardDivider, {}),
          /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_components43.CardBody, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
              import_components43.__experimentalSpacer,
              {
                as: "p",
                paddingTop: 2,
                paddingX: "13px",
                marginBottom: 4,
                children: (0, import_i18n78.__)(
                  "Customize the appearance of specific blocks for the whole site."
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_components43.__experimentalItemGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(NavigationButtonAsItem, { path: "/blocks", children: /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_components43.__experimentalHStack, { justify: "space-between", children: [
              /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_components43.FlexItem, { children: (0, import_i18n78.__)("Blocks") }),
              /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
                IconWithCurrentColor,
                {
                  icon: (0, import_i18n78.isRTL)() ? chevron_left_default : chevron_right_default
                }
              )
            ] }) }) })
          ] })
        ]
      }
    );
  }
  var screen_root_default = ScreenRoot;

  // packages/global-styles-ui/build-module/screen-block-list.mjs
  var import_blocks16 = __toESM(require_blocks(), 1);
  var import_i18n80 = __toESM(require_i18n(), 1);
  var import_components46 = __toESM(require_components(), 1);
  var import_data59 = __toESM(require_data(), 1);
  var import_element53 = __toESM(require_element(), 1);
  var import_block_editor20 = __toESM(require_block_editor(), 1);
  var import_compose10 = __toESM(require_compose(), 1);
  var import_a11y3 = __toESM(require_a11y(), 1);

  // packages/global-styles-ui/build-module/variations/variations-panel.mjs
  var import_blocks15 = __toESM(require_blocks(), 1);
  var import_data58 = __toESM(require_data(), 1);
  var import_components44 = __toESM(require_components(), 1);
  var import_jsx_runtime140 = __toESM(require_jsx_runtime(), 1);
  function getFilteredBlockStyles(blockStyles, variations) {
    return blockStyles?.filter(
      (style) => style.source === "block" || variations.includes(style.name)
    ) || [];
  }
  function useBlockVariations(name2) {
    const blockStyles = (0, import_data58.useSelect)(
      (select6) => {
        const { getBlockStyles } = select6(import_blocks15.store);
        return getBlockStyles(name2);
      },
      [name2]
    );
    const [variations] = useStyle("variations", name2);
    const variationNames = Object.keys(variations ?? {});
    return getFilteredBlockStyles(blockStyles, variationNames);
  }
  function VariationsPanel({ name: name2 }) {
    const coreBlockStyles = useBlockVariations(name2);
    return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_components44.__experimentalItemGroup, { isBordered: true, isSeparated: true, children: coreBlockStyles.map((style, index2) => {
      if (style?.isDefault) {
        return null;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
        NavigationButtonAsItem,
        {
          path: "/blocks/" + encodeURIComponent(name2) + "/variations/" + encodeURIComponent(style.name),
          children: style.label
        },
        index2
      );
    }) });
  }

  // packages/global-styles-ui/build-module/screen-header.mjs
  var import_components45 = __toESM(require_components(), 1);
  var import_i18n79 = __toESM(require_i18n(), 1);
  var import_jsx_runtime141 = __toESM(require_jsx_runtime(), 1);
  function ScreenHeader({
    title,
    description,
    onBack
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_components45.__experimentalVStack, { spacing: 0, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_components45.__experimentalView, { children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_components45.__experimentalSpacer, { marginBottom: 0, paddingX: 4, paddingY: 3, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_components45.__experimentalVStack, { spacing: 2, children: [
      /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_components45.__experimentalHStack, { spacing: 2, children: [
        /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
          import_components45.Navigator.BackButton,
          {
            icon: (0, import_i18n79.isRTL)() ? chevron_right_default : chevron_left_default,
            size: "small",
            label: (0, import_i18n79.__)("Back"),
            onClick: onBack
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_components45.__experimentalSpacer, { children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
          import_components45.__experimentalHeading,
          {
            className: "global-styles-ui-header",
            level: 2,
            size: 13,
            children: title
          }
        ) })
      ] }),
      description && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_components45.__experimentalText, { className: "global-styles-ui-header__description", children: description })
    ] }) }) }) });
  }

  // packages/global-styles-ui/build-module/screen-block-list.mjs
  var import_jsx_runtime142 = __toESM(require_jsx_runtime(), 1);
  var {
    useHasDimensionsPanel: useHasDimensionsPanel2,
    useHasTypographyPanel: useHasTypographyPanel2,
    useHasBorderPanel,
    useSettingsForBlockElement: useSettingsForBlockElement2,
    useHasColorPanel: useHasColorPanel2
  } = unlock3(import_block_editor20.privateApis);
  function useSortedBlockTypes() {
    const blockItems = (0, import_data59.useSelect)(
      (select6) => select6(import_blocks16.store).getBlockTypes(),
      []
    );
    const groupByType = (blocks, block) => {
      const { core, noncore } = blocks;
      const type = block.name.startsWith("core/") ? core : noncore;
      type.push(block);
      return blocks;
    };
    const { core: coreItems, noncore: nonCoreItems } = blockItems.reduce(
      groupByType,
      { core: [], noncore: [] }
    );
    return [...coreItems, ...nonCoreItems];
  }
  function useBlockHasGlobalStyles(blockName) {
    const [rawSettings] = useSetting("", blockName);
    const settings = useSettingsForBlockElement2(rawSettings, blockName);
    const hasTypographyPanel = useHasTypographyPanel2(settings);
    const hasColorPanel = useHasColorPanel2(settings);
    const hasBorderPanel = useHasBorderPanel(settings);
    const hasDimensionsPanel = useHasDimensionsPanel2(settings);
    const hasLayoutPanel = hasBorderPanel || hasDimensionsPanel;
    const hasVariationsPanel = !!useBlockVariations(blockName)?.length;
    const hasGlobalStyles = hasTypographyPanel || hasColorPanel || hasLayoutPanel || hasVariationsPanel;
    return hasGlobalStyles;
  }
  function BlockMenuItem({ block }) {
    const hasBlockMenuItem = useBlockHasGlobalStyles(block.name);
    if (!hasBlockMenuItem) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
      NavigationButtonAsItem,
      {
        path: "/blocks/" + encodeURIComponent(block.name),
        children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_components46.__experimentalHStack, { justify: "flex-start", children: [
          /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_block_editor20.BlockIcon, { icon: block.icon }),
          /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_components46.FlexItem, { children: block.title })
        ] })
      }
    );
  }
  function BlockList({ filterValue }) {
    const sortedBlockTypes = useSortedBlockTypes();
    const debouncedSpeak = (0, import_compose10.useDebounce)(import_a11y3.speak, 500);
    const { isMatchingSearchTerm } = (0, import_data59.useSelect)(import_blocks16.store);
    const filteredBlockTypes = !filterValue ? sortedBlockTypes : sortedBlockTypes.filter(
      (blockType) => isMatchingSearchTerm(blockType, filterValue)
    );
    const blockTypesListRef = (0, import_element53.useRef)(null);
    (0, import_element53.useEffect)(() => {
      if (!filterValue) {
        return;
      }
      const count = blockTypesListRef.current?.childElementCount || 0;
      const resultsFoundMessage = (0, import_i18n80.sprintf)(
        /* translators: %d: number of results. */
        (0, import_i18n80._n)("%d result found.", "%d results found.", count),
        count
      );
      debouncedSpeak(resultsFoundMessage, "polite");
    }, [filterValue, debouncedSpeak]);
    return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
      "div",
      {
        ref: blockTypesListRef,
        className: "global-styles-ui-block-types-item-list",
        role: "list",
        children: filteredBlockTypes.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_components46.__experimentalText, { align: "center", as: "p", children: (0, import_i18n80.__)("No blocks found.") }) : filteredBlockTypes.map((block) => /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
          BlockMenuItem,
          {
            block
          },
          "menu-itemblock-" + block.name
        ))
      }
    );
  }
  var MemoizedBlockList = (0, import_element53.memo)(BlockList);
  function ScreenBlockList() {
    const [filterValue, setFilterValue] = (0, import_element53.useState)("");
    const deferredFilterValue = (0, import_element53.useDeferredValue)(filterValue);
    return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_jsx_runtime142.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
        ScreenHeader,
        {
          title: (0, import_i18n80.__)("Blocks"),
          description: (0, import_i18n80.__)(
            "Customize the appearance of specific blocks and for the whole site."
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
        import_components46.SearchControl,
        {
          className: "global-styles-ui-block-types-search",
          onChange: setFilterValue,
          value: filterValue,
          label: (0, import_i18n80.__)("Search"),
          placeholder: (0, import_i18n80.__)("Search")
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(MemoizedBlockList, { filterValue: deferredFilterValue })
    ] });
  }
  var screen_block_list_default = ScreenBlockList;

  // packages/global-styles-ui/build-module/screen-block.mjs
  var import_blocks18 = __toESM(require_blocks(), 1);
  var import_block_editor22 = __toESM(require_block_editor(), 1);
  var import_element55 = __toESM(require_element(), 1);
  var import_data60 = __toESM(require_data(), 1);
  var import_core_data40 = __toESM(require_core_data(), 1);
  var import_components49 = __toESM(require_components(), 1);
  var import_i18n81 = __toESM(require_i18n(), 1);

  // packages/global-styles-ui/build-module/block-preview-panel.mjs
  var import_block_editor21 = __toESM(require_block_editor(), 1);
  var import_blocks17 = __toESM(require_blocks(), 1);
  var import_components47 = __toESM(require_components(), 1);
  var import_element54 = __toESM(require_element(), 1);
  var import_jsx_runtime143 = __toESM(require_jsx_runtime(), 1);
  var BlockPreviewPanel = ({
    name: name2,
    variation = ""
  }) => {
    const blockExample = (0, import_blocks17.getBlockType)(name2)?.example;
    const blocks = (0, import_element54.useMemo)(() => {
      if (!blockExample) {
        return null;
      }
      const example = {
        ...blockExample,
        attributes: {
          ...blockExample.attributes,
          style: void 0,
          className: variation ? getVariationClassName(variation) : blockExample.attributes?.className
        }
      };
      return (0, import_blocks17.getBlockFromExample)(name2, example);
    }, [name2, blockExample, variation]);
    const viewportWidth = blockExample?.viewportWidth ?? 500;
    const previewHeight = 144;
    const sidebarWidth = 235;
    const scale = sidebarWidth / viewportWidth;
    const minHeight = scale !== 0 && scale < 1 && previewHeight ? previewHeight / scale : previewHeight;
    if (!blockExample) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_components47.__experimentalSpacer, { marginX: 4, marginBottom: 4, children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
      "div",
      {
        className: "global-styles-ui__block-preview-panel",
        style: { maxHeight: previewHeight, boxSizing: "initial" },
        children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
          import_block_editor21.BlockPreview,
          {
            blocks,
            viewportWidth,
            minHeight: previewHeight,
            additionalStyles: (
              //We want this CSS to be in sync with the one in InserterPreviewPanel.
              [
                {
                  css: `
								body{
									padding: 24px;
									min-height:${Math.round(minHeight)}px;
									display:flex;
									align-items:center;
								}
								.is-root-container { width: 100%; }
							`
                }
              ]
            )
          }
        )
      }
    ) });
  };
  var block_preview_panel_default = BlockPreviewPanel;

  // packages/global-styles-ui/build-module/subtitle.mjs
  var import_components48 = __toESM(require_components(), 1);
  var import_jsx_runtime144 = __toESM(require_jsx_runtime(), 1);
  function Subtitle({ children, level = 2 }) {
    return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_components48.__experimentalHeading, { className: "global-styles-ui-subtitle", level, children });
  }

  // packages/global-styles-ui/build-module/screen-block.mjs
  var import_jsx_runtime145 = __toESM(require_jsx_runtime(), 1);
  var BACKGROUND_BLOCK_DEFAULT_VALUES2 = {
    backgroundSize: "cover",
    backgroundPosition: "50% 50%"
    // used only when backgroundSize is 'contain'.
  };
  function applyFallbackStyle(border) {
    if (!border) {
      return border;
    }
    const hasColorOrWidth = border.color || border.width;
    if (!border.style && hasColorOrWidth) {
      return { ...border, style: "solid" };
    }
    if (border.style && !hasColorOrWidth) {
      return void 0;
    }
    return border;
  }
  function applyAllFallbackStyles(border) {
    if (!border) {
      return border;
    }
    if ((0, import_components49.__experimentalHasSplitBorders)(border)) {
      return {
        top: applyFallbackStyle(border.top),
        right: applyFallbackStyle(border.right),
        bottom: applyFallbackStyle(border.bottom),
        left: applyFallbackStyle(border.left)
      };
    }
    return applyFallbackStyle(border);
  }
  var {
    useHasDimensionsPanel: useHasDimensionsPanel3,
    useHasTypographyPanel: useHasTypographyPanel3,
    useHasBorderPanel: useHasBorderPanel2,
    useSettingsForBlockElement: useSettingsForBlockElement3,
    useHasColorPanel: useHasColorPanel3,
    useHasFiltersPanel,
    useHasImageSettingsPanel,
    useHasBackgroundPanel: useHasBackgroundPanel2,
    BackgroundPanel: StylesBackgroundPanel,
    BorderPanel: StylesBorderPanel,
    ColorPanel: StylesColorPanel,
    TypographyPanel: StylesTypographyPanel,
    DimensionsPanel: StylesDimensionsPanel,
    FiltersPanel: StylesFiltersPanel,
    ImageSettingsPanel,
    AdvancedPanel: StylesAdvancedPanel
  } = unlock3(import_block_editor22.privateApis);
  function ScreenBlock({ name: name2, variation }) {
    const { user: userConfig, onChange: onChangeGlobalStyles } = (0, import_element55.useContext)(GlobalStylesContext);
    let prefixParts = [];
    if (variation) {
      prefixParts = ["variations", variation].concat(prefixParts);
    }
    const prefix2 = prefixParts.join(".");
    const [style] = useStyle(prefix2, name2, "user", false);
    const [inheritedStyle, setStyle2] = useStyle(
      prefix2,
      name2,
      "merged",
      false
    );
    const [userSettings] = useSetting("", name2, "user");
    const [rawSettings, setSettings] = useSetting("", name2);
    const settingsForBlockElement = useSettingsForBlockElement3(
      rawSettings,
      name2
    );
    const blockType = (0, import_blocks18.getBlockType)(name2);
    let disableBlockGap = false;
    if (settingsForBlockElement?.spacing?.blockGap && blockType?.supports?.spacing?.blockGap && (blockType?.supports?.spacing?.__experimentalSkipSerialization === true || blockType?.supports?.spacing?.__experimentalSkipSerialization?.some?.(
      (spacingType) => spacingType === "blockGap"
    ))) {
      disableBlockGap = true;
    }
    let disableAspectRatio = false;
    if (settingsForBlockElement?.dimensions?.aspectRatio && name2 === "core/group") {
      disableAspectRatio = true;
    }
    const settings = (0, import_element55.useMemo)(() => {
      const updatedSettings = structuredClone(settingsForBlockElement);
      if (disableBlockGap) {
        updatedSettings.spacing.blockGap = false;
      }
      if (disableAspectRatio) {
        updatedSettings.dimensions.aspectRatio = false;
      }
      return updatedSettings;
    }, [settingsForBlockElement, disableBlockGap, disableAspectRatio]);
    const blockVariations = useBlockVariations(name2);
    const hasBackgroundPanel = useHasBackgroundPanel2(settings);
    const hasTypographyPanel = useHasTypographyPanel3(settings);
    const hasColorPanel = useHasColorPanel3(settings);
    const hasBorderPanel = useHasBorderPanel2(settings);
    const hasDimensionsPanel = useHasDimensionsPanel3(settings);
    const hasFiltersPanel = useHasFiltersPanel(settings);
    const hasImageSettingsPanel = useHasImageSettingsPanel(
      name2,
      userSettings,
      settings
    );
    const hasVariationsPanel = !!blockVariations?.length && !variation;
    const { canEditCSS } = (0, import_data60.useSelect)((select6) => {
      const { getEntityRecord, __experimentalGetCurrentGlobalStylesId } = select6(import_core_data40.store);
      const globalStylesId = __experimentalGetCurrentGlobalStylesId();
      const globalStyles = globalStylesId ? getEntityRecord("root", "globalStyles", globalStylesId) : void 0;
      return {
        canEditCSS: !!globalStyles?._links?.["wp:action-edit-css"]
      };
    }, []);
    const currentBlockStyle = variation ? blockVariations.find((s3) => s3.name === variation) : null;
    const inheritedStyleWithLayout = (0, import_element55.useMemo)(() => {
      return {
        ...inheritedStyle,
        layout: settings.layout
      };
    }, [inheritedStyle, settings.layout]);
    const styleWithLayout = (0, import_element55.useMemo)(() => {
      return {
        ...style,
        layout: userSettings.layout
      };
    }, [style, userSettings.layout]);
    const onChangeDimensions = (newStyle) => {
      const updatedStyle = { ...newStyle };
      delete updatedStyle.layout;
      setStyle2(updatedStyle);
      if (newStyle.layout !== userSettings.layout) {
        setSettings({
          ...userSettings,
          layout: newStyle.layout
        });
      }
    };
    const onChangeLightbox = (newSetting) => {
      if (newSetting === void 0) {
        setSettings({
          ...rawSettings,
          lightbox: void 0
        });
      } else {
        setSettings({
          ...rawSettings,
          lightbox: {
            ...rawSettings.lightbox,
            ...newSetting
          }
        });
      }
    };
    const onChangeTypography = (newStyle) => {
      const { settings: newSettings, ...styleWithoutSettings } = newStyle;
      if (newSettings?.typography) {
        let updatedConfig = setStyle(
          userConfig,
          prefix2,
          styleWithoutSettings,
          name2
        );
        updatedConfig = setSetting(
          updatedConfig,
          "typography",
          {
            ...userSettings.typography,
            ...newSettings.typography
          },
          name2
        );
        onChangeGlobalStyles(updatedConfig);
      } else {
        setStyle2(styleWithoutSettings);
      }
    };
    const onChangeBorders = (newStyle) => {
      if (!newStyle?.border) {
        setStyle2(newStyle);
        return;
      }
      const { radius, ...newBorder } = newStyle.border;
      const border = applyAllFallbackStyles(newBorder);
      const updatedBorder = !(0, import_components49.__experimentalHasSplitBorders)(border) ? {
        top: border,
        right: border,
        bottom: border,
        left: border
      } : {
        color: null,
        style: null,
        width: null,
        ...border
      };
      setStyle2({ ...newStyle, border: { ...updatedBorder, radius } });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_jsx_runtime145.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
        ScreenHeader,
        {
          title: variation ? currentBlockStyle?.label : blockType?.title
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(block_preview_panel_default, { name: name2, variation }),
      hasVariationsPanel && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "global-styles-ui-screen-variations", children: /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_components49.__experimentalVStack, { spacing: 3, children: [
        /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Subtitle, { children: (0, import_i18n81.__)("Style Variations") }),
        /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(VariationsPanel, { name: name2 })
      ] }) }),
      hasColorPanel && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
        StylesColorPanel,
        {
          inheritedValue: inheritedStyle,
          value: style,
          onChange: setStyle2,
          settings
        }
      ),
      hasBackgroundPanel && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
        StylesBackgroundPanel,
        {
          inheritedValue: inheritedStyle,
          value: style,
          onChange: setStyle2,
          settings,
          defaultValues: BACKGROUND_BLOCK_DEFAULT_VALUES2
        }
      ),
      hasTypographyPanel && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
        StylesTypographyPanel,
        {
          inheritedValue: inheritedStyle,
          value: style,
          onChange: onChangeTypography,
          settings,
          isGlobalStyles: true
        }
      ),
      hasDimensionsPanel && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
        StylesDimensionsPanel,
        {
          inheritedValue: inheritedStyleWithLayout,
          value: styleWithLayout,
          onChange: onChangeDimensions,
          settings,
          includeLayoutControls: true
        }
      ),
      hasBorderPanel && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
        StylesBorderPanel,
        {
          inheritedValue: inheritedStyle,
          value: style,
          onChange: onChangeBorders,
          settings
        }
      ),
      hasFiltersPanel && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
        StylesFiltersPanel,
        {
          inheritedValue: inheritedStyleWithLayout,
          value: styleWithLayout,
          onChange: setStyle2,
          settings,
          includeLayoutControls: true
        }
      ),
      hasImageSettingsPanel && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
        ImageSettingsPanel,
        {
          onChange: onChangeLightbox,
          value: userSettings,
          inheritedValue: settings
        }
      ),
      canEditCSS && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_components49.PanelBody, { title: (0, import_i18n81.__)("Advanced"), initialOpen: false, children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
        StylesAdvancedPanel,
        {
          value: style,
          onChange: setStyle2,
          inheritedValue: inheritedStyle,
          help: (0, import_i18n81.sprintf)(
            // translators: %s: is the name of a block e.g., 'Image' or 'Table'.
            (0, import_i18n81.__)(
              "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
          )
        }
      ) })
    ] });
  }
  var screen_block_default = ScreenBlock;

  // packages/global-styles-ui/build-module/screen-typography.mjs
  var import_i18n95 = __toESM(require_i18n(), 1);
  var import_components69 = __toESM(require_components(), 1);
  var import_element66 = __toESM(require_element(), 1);

  // packages/global-styles-ui/build-module/screen-body.mjs
  var import_components50 = __toESM(require_components(), 1);
  var import_jsx_runtime146 = __toESM(require_jsx_runtime(), 1);
  function ScreenBody({ children, className }) {
    return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
      import_components50.__experimentalSpacer,
      {
        className: clsx_default("global-styles-ui-screen-body", className),
        padding: 4,
        children
      }
    );
  }

  // packages/global-styles-ui/build-module/typography-elements.mjs
  var import_i18n82 = __toESM(require_i18n(), 1);
  var import_components51 = __toESM(require_components(), 1);
  var import_jsx_runtime147 = __toESM(require_jsx_runtime(), 1);
  function ElementItem({ parentMenu, element, label }) {
    const prefix2 = element === "text" || !element ? "" : `elements.${element}.`;
    const extraStyles = element === "link" ? {
      textDecoration: "underline"
    } : {};
    const [fontFamily] = useStyle(
      prefix2 + "typography.fontFamily"
    );
    const [fontStyle] = useStyle(prefix2 + "typography.fontStyle");
    const [fontWeight] = useStyle(
      prefix2 + "typography.fontWeight"
    );
    const [backgroundColor] = useStyle(
      prefix2 + "color.background"
    );
    const [fallbackBackgroundColor] = useStyle("color.background");
    const [gradientValue] = useStyle(prefix2 + "color.gradient");
    const [color] = useStyle(prefix2 + "color.text");
    return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(NavigationButtonAsItem, { path: parentMenu + "/typography/" + element, children: /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(import_components51.__experimentalHStack, { justify: "flex-start", children: [
      /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
        import_components51.FlexItem,
        {
          className: "global-styles-ui-screen-typography__indicator",
          "aria-hidden": "true",
          style: {
            fontFamily: fontFamily ?? "serif",
            background: gradientValue ?? backgroundColor ?? fallbackBackgroundColor,
            color,
            fontStyle,
            fontWeight,
            ...extraStyles
          },
          children: (0, import_i18n82.__)("Aa")
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_components51.FlexItem, { children: label })
    ] }) });
  }
  function TypographyElements() {
    const parentMenu = "";
    return /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(import_components51.__experimentalVStack, { spacing: 3, children: [
      /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Subtitle, { level: 3, children: (0, import_i18n82.__)("Elements") }),
      /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(import_components51.__experimentalItemGroup, { isBordered: true, isSeparated: true, children: [
        /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
          ElementItem,
          {
            parentMenu,
            element: "text",
            label: (0, import_i18n82.__)("Text")
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
          ElementItem,
          {
            parentMenu,
            element: "link",
            label: (0, import_i18n82.__)("Links")
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
          ElementItem,
          {
            parentMenu,
            element: "heading",
            label: (0, import_i18n82.__)("Headings")
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
          ElementItem,
          {
            parentMenu,
            element: "caption",
            label: (0, import_i18n82.__)("Captions")
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
          ElementItem,
          {
            parentMenu,
            element: "button",
            label: (0, import_i18n82.__)("Buttons")
          }
        )
      ] })
    ] });
  }
  var typography_elements_default = TypographyElements;

  // packages/global-styles-ui/build-module/variations/variations-typography.mjs
  var import_components54 = __toESM(require_components(), 1);

  // packages/global-styles-ui/build-module/preview-typography.mjs
  var import_components52 = __toESM(require_components(), 1);
  var import_jsx_runtime148 = __toESM(require_jsx_runtime(), 1);
  var StylesPreviewTypography = ({
    variation,
    isFocused,
    withHoverView
  }) => {
    return /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
      preview_wrapper_default,
      {
        label: variation.title,
        isFocused,
        withHoverView,
        children: ({ ratio, key }) => /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
          import_components52.__experimentalHStack,
          {
            spacing: 10 * ratio,
            justify: "center",
            style: {
              height: "100%",
              overflow: "hidden"
            },
            children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
              PreviewTypography,
              {
                variation,
                fontSize: 85 * ratio
              }
            )
          },
          key
        )
      }
    );
  };
  var preview_typography_default = StylesPreviewTypography;

  // packages/global-styles-ui/build-module/variations/variation.mjs
  var import_components53 = __toESM(require_components(), 1);
  var import_element56 = __toESM(require_element(), 1);
  var import_keycodes2 = __toESM(require_keycodes(), 1);
  var import_i18n83 = __toESM(require_i18n(), 1);
  var import_jsx_runtime149 = __toESM(require_jsx_runtime(), 1);
  function Variation({
    variation,
    children,
    isPill = false,
    properties,
    showTooltip = false
  }) {
    const [isFocused, setIsFocused] = (0, import_element56.useState)(false);
    const {
      base,
      user,
      onChange: setUserConfig
    } = (0, import_element56.useContext)(GlobalStylesContext);
    const context = (0, import_element56.useMemo)(() => {
      let merged = mergeGlobalStyles(base, variation);
      if (properties) {
        merged = filterObjectByProperties(merged, properties);
      }
      return {
        user: variation,
        base,
        merged,
        onChange: () => {
        }
      };
    }, [variation, base, properties]);
    const selectVariation = () => setUserConfig(variation);
    const selectOnEnter = (event) => {
      if (event.keyCode === import_keycodes2.ENTER) {
        event.preventDefault();
        selectVariation();
      }
    };
    const isActive = (0, import_element56.useMemo)(
      () => areGlobalStylesEqual(user, variation),
      [user, variation]
    );
    let label = variation?.title;
    if (variation?.description) {
      label = (0, import_i18n83.sprintf)(
        /* translators: 1: variation title. 2: variation description. */
        (0, import_i18n83._x)("%1$s (%2$s)", "variation label"),
        variation?.title,
        variation?.description
      );
    }
    const content = /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
      "div",
      {
        className: clsx_default("global-styles-ui-variations_item", {
          "is-active": isActive
        }),
        role: "button",
        onClick: selectVariation,
        onKeyDown: selectOnEnter,
        tabIndex: 0,
        "aria-label": label,
        "aria-current": isActive,
        onFocus: () => setIsFocused(true),
        onBlur: () => setIsFocused(false),
        children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
          "div",
          {
            className: clsx_default("global-styles-ui-variations_item-preview", {
              "is-pill": isPill
            }),
            children: children(isFocused)
          }
        )
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(GlobalStylesContext.Provider, { value: context, children: showTooltip ? /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_components53.Tooltip, { text: variation?.title, children: content }) : content });
  }

  // packages/global-styles-ui/build-module/variations/variations-typography.mjs
  var import_jsx_runtime150 = __toESM(require_jsx_runtime(), 1);
  var propertiesToFilter = ["typography"];
  function TypographyVariations({
    title,
    gap = 2
  }) {
    const typographyVariations = useCurrentMergeThemeStyleVariationsWithUserConfig(propertiesToFilter);
    if (typographyVariations?.length <= 1) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(import_components54.__experimentalVStack, { spacing: 3, children: [
      title && /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(Subtitle, { level: 3, children: title }),
      /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
        import_components54.__experimentalGrid,
        {
          columns: 3,
          gap,
          className: "global-styles-ui-style-variations-container",
          children: typographyVariations.map(
            (variation, index2) => {
              return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
                Variation,
                {
                  variation,
                  properties: propertiesToFilter,
                  showTooltip: true,
                  children: () => /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
                    preview_typography_default,
                    {
                      variation
                    }
                  )
                },
                index2
              );
            }
          )
        }
      )
    ] });
  }

  // packages/global-styles-ui/build-module/font-families.mjs
  var import_i18n93 = __toESM(require_i18n(), 1);
  var import_components67 = __toESM(require_components(), 1);
  var import_element65 = __toESM(require_element(), 1);

  // packages/global-styles-ui/build-module/font-library/context.mjs
  var import_element57 = __toESM(require_element(), 1);
  var import_data61 = __toESM(require_data(), 1);
  var import_core_data42 = __toESM(require_core_data(), 1);
  var import_i18n85 = __toESM(require_i18n(), 1);

  // packages/global-styles-ui/build-module/font-library/api.mjs
  var import_api_fetch4 = __toESM(require_api_fetch(), 1);
  var import_core_data41 = __toESM(require_core_data(), 1);
  var FONT_FAMILIES_URL = "/wp/v2/font-families";
  function invalidateFontFamilyCache(registry) {
    const { receiveEntityRecords } = registry.dispatch(import_core_data41.store);
    receiveEntityRecords(
      "postType",
      "wp_font_family",
      [],
      void 0,
      true
      // invalidateCache
    );
  }
  async function fetchInstallFontFamily(data, registry) {
    const config2 = {
      path: FONT_FAMILIES_URL,
      method: "POST",
      body: data
    };
    const response = await (0, import_api_fetch4.default)(config2);
    invalidateFontFamilyCache(registry);
    return {
      id: response.id,
      ...response.font_family_settings,
      fontFace: []
    };
  }
  async function fetchInstallFontFace(fontFamilyId, data, registry) {
    const config2 = {
      path: `${FONT_FAMILIES_URL}/${fontFamilyId}/font-faces`,
      method: "POST",
      body: data
    };
    const response = await (0, import_api_fetch4.default)(config2);
    invalidateFontFamilyCache(registry);
    return {
      id: response.id,
      ...response.font_face_settings
    };
  }

  // packages/global-styles-ui/build-module/font-library/utils/index.mjs
  var import_components55 = __toESM(require_components(), 1);

  // packages/global-styles-ui/build-module/font-library/utils/constants.mjs
  var import_i18n84 = __toESM(require_i18n(), 1);
  var ALLOWED_FILE_EXTENSIONS = ["otf", "ttf", "woff", "woff2"];
  var FONT_WEIGHTS = {
    100: (0, import_i18n84._x)("Thin", "font weight"),
    200: (0, import_i18n84._x)("Extra-light", "font weight"),
    300: (0, import_i18n84._x)("Light", "font weight"),
    400: (0, import_i18n84._x)("Normal", "font weight"),
    500: (0, import_i18n84._x)("Medium", "font weight"),
    600: (0, import_i18n84._x)("Semi-bold", "font weight"),
    700: (0, import_i18n84._x)("Bold", "font weight"),
    800: (0, import_i18n84._x)("Extra-bold", "font weight"),
    900: (0, import_i18n84._x)("Black", "font weight")
  };
  var FONT_STYLES = {
    normal: (0, import_i18n84._x)("Normal", "font style"),
    italic: (0, import_i18n84._x)("Italic", "font style")
  };

  // packages/global-styles-ui/build-module/font-library/utils/index.mjs
  var { File: File2 } = window;
  var { kebabCase: kebabCase2 } = unlock3(import_components55.privateApis);
  function setUIValuesNeeded(font2, extraValues = {}) {
    if (!font2.name && (font2.fontFamily || font2.slug)) {
      font2.name = font2.fontFamily || font2.slug;
    }
    return {
      ...font2,
      ...extraValues
    };
  }
  function isUrlEncoded(url) {
    if (typeof url !== "string") {
      return false;
    }
    return url !== decodeURIComponent(url);
  }
  function getFontFaceVariantName(face) {
    const weightName = FONT_WEIGHTS[face.fontWeight ?? ""] || face.fontWeight;
    const styleName = face.fontStyle === "normal" ? "" : FONT_STYLES[face.fontStyle ?? ""] || face.fontStyle;
    return `${weightName} ${styleName}`;
  }
  function mergeFontFaces(existing = [], incoming = []) {
    const map = /* @__PURE__ */ new Map();
    for (const face of existing) {
      map.set(`${face.fontWeight}${face.fontStyle}`, face);
    }
    for (const face of incoming) {
      map.set(`${face.fontWeight}${face.fontStyle}`, face);
    }
    return Array.from(map.values());
  }
  function mergeFontFamilies(existing = [], incoming = []) {
    const map = /* @__PURE__ */ new Map();
    for (const font2 of existing) {
      map.set(font2.slug, { ...font2 });
    }
    for (const font2 of incoming) {
      if (map.has(font2.slug)) {
        const { fontFace: incomingFontFaces, ...restIncoming } = font2;
        const existingFont = map.get(font2.slug);
        const mergedFontFaces = mergeFontFaces(
          existingFont.fontFace,
          incomingFontFaces
        );
        map.set(font2.slug, {
          ...restIncoming,
          fontFace: mergedFontFaces
        });
      } else {
        map.set(font2.slug, { ...font2 });
      }
    }
    return Array.from(map.values());
  }
  async function loadFontFaceInBrowser(fontFace, source, addTo = "all") {
    let dataSource;
    if (typeof source === "string") {
      dataSource = `url(${source})`;
    } else if (source instanceof File2) {
      dataSource = await source.arrayBuffer();
    } else {
      return;
    }
    const newFont = new window.FontFace(
      formatFontFaceName(fontFace.fontFamily),
      dataSource,
      {
        style: fontFace.fontStyle,
        weight: String(fontFace.fontWeight)
      }
    );
    const loadedFace = await newFont.load();
    if (addTo === "document" || addTo === "all") {
      document.fonts.add(loadedFace);
    }
    if (addTo === "iframe" || addTo === "all") {
      const iframe = document.querySelector(
        'iframe[name="editor-canvas"]'
      );
      if (iframe?.contentDocument) {
        iframe.contentDocument.fonts.add(loadedFace);
      }
    }
  }
  function unloadFontFaceInBrowser(fontFace, removeFrom = "all") {
    const unloadFontFace = (fonts) => {
      fonts.forEach((f3) => {
        if (f3.family === formatFontFaceName(fontFace?.fontFamily) && f3.weight === fontFace?.fontWeight && f3.style === fontFace?.fontStyle) {
          fonts.delete(f3);
        }
      });
    };
    if (removeFrom === "document" || removeFrom === "all") {
      unloadFontFace(document.fonts);
    }
    if (removeFrom === "iframe" || removeFrom === "all") {
      const iframe = document.querySelector(
        'iframe[name="editor-canvas"]'
      );
      if (iframe?.contentDocument) {
        unloadFontFace(iframe.contentDocument.fonts);
      }
    }
  }
  function getDisplaySrcFromFontFace(input) {
    if (!input) {
      return;
    }
    let src;
    if (Array.isArray(input)) {
      src = input[0];
    } else {
      src = input;
    }
    if (src.startsWith("file:.")) {
      return;
    }
    if (!isUrlEncoded(src)) {
      src = encodeURI(src);
    }
    return src;
  }
  function makeFontFamilyFormData(fontFamily) {
    const formData = new FormData();
    const { fontFace, category, ...familyWithValidParameters } = fontFamily;
    const fontFamilySettings = {
      ...familyWithValidParameters,
      slug: kebabCase2(fontFamily.slug)
    };
    formData.append(
      "font_family_settings",
      JSON.stringify(fontFamilySettings)
    );
    return formData;
  }
  function makeFontFacesFormData(font2) {
    const fontFacesFormData = (font2?.fontFace ?? []).map(
      (item, faceIndex) => {
        const face = { ...item };
        const formData = new FormData();
        if (face.file) {
          const files = Array.isArray(face.file) ? face.file : [face.file];
          const src = [];
          files.forEach((file, key) => {
            const fileId = `file-${faceIndex}-${key}`;
            formData.append(fileId, file, file.name);
            src.push(fileId);
          });
          face.src = src.length === 1 ? src[0] : src;
          delete face.file;
          formData.append("font_face_settings", JSON.stringify(face));
        } else {
          formData.append("font_face_settings", JSON.stringify(face));
        }
        return formData;
      }
    );
    return fontFacesFormData;
  }
  async function batchInstallFontFaces(fontFamilyId, fontFacesData, registry) {
    const responses = [];
    for (const faceData of fontFacesData) {
      try {
        const response = await fetchInstallFontFace(
          fontFamilyId,
          faceData,
          registry
        );
        responses.push({ status: "fulfilled", value: response });
      } catch (error) {
        responses.push({ status: "rejected", reason: error });
      }
    }
    const results = {
      errors: [],
      successes: []
    };
    responses.forEach((result, index2) => {
      if (result.status === "fulfilled" && result.value) {
        const response = result.value;
        results.successes.push(response);
      } else if (result.reason) {
        results.errors.push({
          data: fontFacesData[index2],
          message: result.reason.message
        });
      }
    });
    return results;
  }
  async function downloadFontFaceAssets(src) {
    src = Array.isArray(src) ? src : [src];
    const files = await Promise.all(
      src.map(async (url) => {
        return fetch(new Request(url)).then((response) => {
          if (!response.ok) {
            throw new Error(
              `Error downloading font face asset from ${url}. Server responded with status: ${response.status}`
            );
          }
          return response.blob();
        }).then((blob) => {
          const filename = url.split("/").pop();
          const file = new File2([blob], filename, {
            type: blob.type
          });
          return file;
        });
      })
    );
    return files.length === 1 ? files[0] : files;
  }
  function checkFontFaceInstalled(fontFace, collection) {
    return -1 !== collection.findIndex((collectionFontFace) => {
      return collectionFontFace.fontWeight === fontFace.fontWeight && collectionFontFace.fontStyle === fontFace.fontStyle;
    });
  }

  // packages/global-styles-ui/build-module/font-library/utils/set-immutably.mjs
  function setImmutably2(object, path, value) {
    path = Array.isArray(path) ? [...path] : [path];
    object = Array.isArray(object) ? [...object] : { ...object };
    const leaf = path.pop();
    let prev = object;
    for (const key of path) {
      const lvl = prev[key];
      prev = prev[key] = Array.isArray(lvl) ? [...lvl] : { ...lvl };
    }
    prev[leaf] = value;
    return object;
  }

  // packages/global-styles-ui/build-module/font-library/utils/toggleFont.mjs
  function toggleFont(font2, face, initialfonts = []) {
    const isFontActivated = (f3) => f3.slug === font2.slug;
    const getActivatedFont = (fonts) => fonts.find(isFontActivated);
    const toggleEntireFontFamily = (activatedFont2) => {
      if (!activatedFont2) {
        return [...initialfonts, font2];
      }
      return initialfonts.filter(
        (f3) => !isFontActivated(f3)
      );
    };
    const toggleFontVariant = (activatedFont2) => {
      const isFaceActivated = (f3) => f3.fontWeight === face.fontWeight && f3.fontStyle === face.fontStyle;
      if (!activatedFont2) {
        return [...initialfonts, { ...font2, fontFace: [face] }];
      }
      let newFontFaces = activatedFont2.fontFace || [];
      if (newFontFaces.find(isFaceActivated)) {
        newFontFaces = newFontFaces.filter(
          (f3) => !isFaceActivated(f3)
        );
      } else {
        newFontFaces = [...newFontFaces, face];
      }
      if (newFontFaces.length === 0) {
        return initialfonts.filter(
          (f3) => !isFontActivated(f3)
        );
      }
      return initialfonts.map(
        (f3) => isFontActivated(f3) ? { ...f3, fontFace: newFontFaces } : f3
      );
    };
    const activatedFont = getActivatedFont(initialfonts);
    if (!face) {
      return toggleEntireFontFamily(activatedFont);
    }
    return toggleFontVariant(activatedFont);
  }

  // packages/global-styles-ui/build-module/font-library/context.mjs
  var import_jsx_runtime151 = __toESM(require_jsx_runtime(), 1);
  var FontLibraryContext = (0, import_element57.createContext)(
    {}
  );
  FontLibraryContext.displayName = "FontLibraryContext";
  function FontLibraryProvider({ children }) {
    const registry = (0, import_data61.useRegistry)();
    const { saveEntityRecord, deleteEntityRecord } = (0, import_data61.useDispatch)(import_core_data42.store);
    const { globalStylesId } = (0, import_data61.useSelect)((select6) => {
      const { __experimentalGetCurrentGlobalStylesId } = select6(import_core_data42.store);
      return { globalStylesId: __experimentalGetCurrentGlobalStylesId() };
    }, []);
    const globalStyles = (0, import_core_data42.useEntityRecord)(
      "root",
      "globalStyles",
      globalStylesId
    );
    const [isInstalling, setIsInstalling] = (0, import_element57.useState)(false);
    const { records: libraryPosts = [], isResolving: isResolvingLibrary } = (0, import_core_data42.useEntityRecords)(
      "postType",
      "wp_font_family",
      {
        _embed: true
      }
    );
    const libraryFonts = (libraryPosts || []).map((fontFamilyPost) => {
      return {
        id: fontFamilyPost.id,
        ...fontFamilyPost.font_family_settings || {},
        fontFace: fontFamilyPost?._embedded?.font_faces?.map(
          (face) => face.font_face_settings
        ) || []
      };
    }) || [];
    const [fontFamilies, setFontFamilies] = useSetting("typography.fontFamilies");
    const saveFontFamilies = async (fonts) => {
      if (!globalStyles.record) {
        return;
      }
      const updatedGlobalStyles = globalStyles.record;
      const finalGlobalStyles = setImmutably2(
        updatedGlobalStyles ?? {},
        ["settings", "typography", "fontFamilies"],
        fonts
      );
      await saveEntityRecord("root", "globalStyles", finalGlobalStyles);
    };
    const [modalTabOpen, setModalTabOpen] = (0, import_element57.useState)("");
    const [libraryFontSelected, setLibraryFontSelected] = (0, import_element57.useState)(void 0);
    const themeFonts = fontFamilies?.theme ? fontFamilies.theme.map((f3) => setUIValuesNeeded(f3, { source: "theme" })).sort((a3, b3) => a3.name.localeCompare(b3.name)) : [];
    const customFonts = fontFamilies?.custom ? fontFamilies.custom.map((f3) => setUIValuesNeeded(f3, { source: "custom" })).sort((a3, b3) => a3.name.localeCompare(b3.name)) : [];
    const baseCustomFonts = libraryFonts ? libraryFonts.map((f3) => setUIValuesNeeded(f3, { source: "custom" })).sort((a3, b3) => a3.name.localeCompare(b3.name)) : [];
    (0, import_element57.useEffect)(() => {
      if (!modalTabOpen) {
        setLibraryFontSelected(void 0);
      }
    }, [modalTabOpen]);
    const handleSetLibraryFontSelected = (font2) => {
      if (!font2) {
        setLibraryFontSelected(void 0);
        return;
      }
      const fonts = font2.source === "theme" ? themeFonts : baseCustomFonts;
      const fontSelected = fonts.find((f3) => f3.slug === font2.slug);
      setLibraryFontSelected({
        ...fontSelected || font2,
        source: font2.source
      });
    };
    const [loadedFontUrls] = (0, import_element57.useState)(/* @__PURE__ */ new Set());
    const getAvailableFontsOutline = (availableFontFamilies) => {
      const outline = availableFontFamilies.reduce(
        (acc, font2) => {
          const availableFontFaces = font2?.fontFace && font2.fontFace?.length > 0 ? font2?.fontFace.map(
            (face) => `${face.fontStyle ?? ""}${face.fontWeight ?? ""}`
          ) : ["normal400"];
          acc[font2.slug] = availableFontFaces;
          return acc;
        },
        {}
      );
      return outline;
    };
    const getActivatedFontsOutline = (source) => {
      switch (source) {
        case "theme":
          return getAvailableFontsOutline(themeFonts);
        case "custom":
        default:
          return getAvailableFontsOutline(customFonts);
      }
    };
    const isFontActivated = (slug, style, weight, source) => {
      if (!style && !weight) {
        return !!getActivatedFontsOutline(source)[slug];
      }
      return !!getActivatedFontsOutline(source)[slug]?.includes(
        (style ?? "") + (weight ?? "")
      );
    };
    const getFontFacesActivated = (slug, source) => {
      return getActivatedFontsOutline(source)[slug] || [];
    };
    async function installFonts(fontFamiliesToInstall) {
      setIsInstalling(true);
      try {
        const fontFamiliesToActivate = [];
        let installationErrors = [];
        for (const fontFamilyToInstall of fontFamiliesToInstall) {
          let isANewFontFamily = false;
          const fontFamilyRecords = await (0, import_data61.resolveSelect)(
            import_core_data42.store
          ).getEntityRecords(
            "postType",
            "wp_font_family",
            {
              slug: fontFamilyToInstall.slug,
              per_page: 1,
              _embed: true
            }
          );
          const fontFamilyPost = fontFamilyRecords && fontFamilyRecords.length > 0 ? fontFamilyRecords[0] : null;
          let installedFontFamily = fontFamilyPost ? {
            id: fontFamilyPost.id,
            ...fontFamilyPost.font_family_settings,
            fontFace: (fontFamilyPost?._embedded?.font_faces ?? []).map(
              (face) => face.font_face_settings
            ) || []
          } : null;
          if (!installedFontFamily) {
            isANewFontFamily = true;
            installedFontFamily = await fetchInstallFontFamily(
              makeFontFamilyFormData(fontFamilyToInstall),
              registry
            );
          }
          const alreadyInstalledFontFaces = installedFontFamily.fontFace && fontFamilyToInstall.fontFace ? installedFontFamily.fontFace.filter(
            (fontFaceToInstall) => fontFaceToInstall && fontFamilyToInstall.fontFace && checkFontFaceInstalled(
              fontFaceToInstall,
              fontFamilyToInstall.fontFace
            )
          ) : [];
          if (installedFontFamily.fontFace && fontFamilyToInstall.fontFace) {
            fontFamilyToInstall.fontFace = fontFamilyToInstall.fontFace.filter(
              (fontFaceToInstall) => !checkFontFaceInstalled(
                fontFaceToInstall,
                installedFontFamily.fontFace
              )
            );
          }
          let successfullyInstalledFontFaces = [];
          let unsuccessfullyInstalledFontFaces = [];
          if (fontFamilyToInstall?.fontFace?.length ?? 0 > 0) {
            const response = await batchInstallFontFaces(
              // @ts-expect-error - Type mismatch: WpFontFamily.id can be number | string, but batchInstallFontFaces expects only string.
              installedFontFamily.id,
              makeFontFacesFormData(
                fontFamilyToInstall
              ),
              registry
            );
            successfullyInstalledFontFaces = response?.successes;
            unsuccessfullyInstalledFontFaces = response?.errors;
          }
          if (successfullyInstalledFontFaces?.length > 0 || alreadyInstalledFontFaces?.length > 0) {
            installedFontFamily.fontFace = [
              ...successfullyInstalledFontFaces
            ];
            fontFamiliesToActivate.push(installedFontFamily);
          }
          if (installedFontFamily && !fontFamilyToInstall?.fontFace?.length) {
            fontFamiliesToActivate.push(installedFontFamily);
          }
          if (isANewFontFamily && (fontFamilyToInstall?.fontFace?.length ?? 0) > 0 && successfullyInstalledFontFaces?.length === 0) {
            await deleteEntityRecord(
              "postType",
              "wp_font_family",
              installedFontFamily.id,
              { force: true }
            );
          }
          installationErrors = installationErrors.concat(
            unsuccessfullyInstalledFontFaces
          );
        }
        const installationErrorMessages = installationErrors.reduce(
          (unique, item) => unique.includes(item.message) ? unique : [...unique, item.message],
          []
        );
        if (fontFamiliesToActivate.length > 0) {
          const activeFonts = activateCustomFontFamilies(
            // @ts-expect-error - Type mismatch: items may have id as number | string, but FontFamily.id should be string | undefined.
            fontFamiliesToActivate
          );
          await saveFontFamilies(activeFonts);
        }
        if (installationErrorMessages.length > 0) {
          const installError = new Error((0, import_i18n85.__)("There was an error installing fonts."));
          installError.installationErrors = installationErrorMessages;
          throw installError;
        }
      } finally {
        setIsInstalling(false);
      }
    }
    async function uninstallFontFamily(fontFamilyToUninstall) {
      if (!fontFamilyToUninstall?.id) {
        throw new Error((0, import_i18n85.__)("Font family to uninstall is not defined."));
      }
      try {
        await deleteEntityRecord(
          "postType",
          "wp_font_family",
          fontFamilyToUninstall.id,
          { force: true }
        );
        const activeFonts = deactivateFontFamily(fontFamilyToUninstall);
        await saveFontFamilies(activeFonts);
        return { deleted: true };
      } catch (error) {
        console.error(
          `There was an error uninstalling the font family:`,
          error
        );
        throw error;
      }
    }
    const deactivateFontFamily = (font2) => {
      const initialCustomFonts = fontFamilies?.[font2.source ?? ""] ?? [];
      const newCustomFonts = initialCustomFonts.filter(
        (f3) => f3.slug !== font2.slug
      );
      const activeFonts = {
        ...fontFamilies,
        [font2.source ?? ""]: newCustomFonts
      };
      setFontFamilies(activeFonts);
      if (font2.fontFace) {
        font2.fontFace.forEach((face) => {
          unloadFontFaceInBrowser(face, "all");
        });
      }
      return activeFonts;
    };
    const activateCustomFontFamilies = (fontsToAdd) => {
      const fontsToActivate = cleanFontsForSave(fontsToAdd);
      const activeFonts = {
        ...fontFamilies,
        // Merge the existing custom fonts with the new fonts.
        custom: mergeFontFamilies(fontFamilies?.custom, fontsToActivate)
      };
      setFontFamilies(activeFonts);
      loadFontsInBrowser(fontsToActivate);
      return activeFonts;
    };
    const cleanFontsForSave = (fonts) => {
      return fonts.map(({ id: _familyDbId, fontFace, ...font2 }) => ({
        ...font2,
        ...fontFace && fontFace.length > 0 ? {
          fontFace: fontFace.map(
            ({ id: _faceDbId, ...face }) => face
          )
        } : {}
      }));
    };
    const loadFontsInBrowser = (fonts) => {
      fonts.forEach((font2) => {
        if (font2.fontFace) {
          font2.fontFace.forEach((face) => {
            const displaySrc = getDisplaySrcFromFontFace(
              face?.src ?? ""
            );
            if (displaySrc) {
              loadFontFaceInBrowser(face, displaySrc, "all");
            }
          });
        }
      });
    };
    const toggleActivateFont = (font2, face) => {
      const initialFonts = fontFamilies?.[font2.source ?? ""] ?? [];
      const newFonts = toggleFont(font2, face, initialFonts);
      setFontFamilies({
        ...fontFamilies,
        [font2.source ?? ""]: newFonts
      });
      const isFaceActivated = isFontActivated(
        font2.slug,
        face?.fontStyle ?? "",
        face?.fontWeight ?? "",
        font2.source ?? "custom"
      );
      if (face && isFaceActivated) {
        unloadFontFaceInBrowser(face, "all");
      } else {
        const displaySrc = getDisplaySrcFromFontFace(face?.src ?? "");
        if (face && displaySrc) {
          loadFontFaceInBrowser(face, displaySrc, "all");
        }
      }
    };
    const loadFontFaceAsset = async (fontFace) => {
      if (!fontFace.src) {
        return;
      }
      const src = getDisplaySrcFromFontFace(fontFace.src);
      if (!src || loadedFontUrls.has(src)) {
        return;
      }
      loadFontFaceInBrowser(fontFace, src, "document");
      loadedFontUrls.add(src);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
      FontLibraryContext.Provider,
      {
        value: {
          libraryFontSelected,
          handleSetLibraryFontSelected,
          fontFamilies: fontFamilies ?? {},
          baseCustomFonts,
          isFontActivated,
          getFontFacesActivated,
          loadFontFaceAsset,
          installFonts,
          uninstallFontFamily,
          toggleActivateFont,
          getAvailableFontsOutline,
          modalTabOpen,
          setModalTabOpen,
          saveFontFamilies,
          isResolvingLibrary,
          isInstalling
        },
        children
      }
    );
  }
  var context_default = FontLibraryProvider;

  // packages/global-styles-ui/build-module/font-library/modal.mjs
  var import_i18n91 = __toESM(require_i18n(), 1);
  var import_components65 = __toESM(require_components(), 1);
  var import_core_data45 = __toESM(require_core_data(), 1);
  var import_data63 = __toESM(require_data(), 1);

  // packages/global-styles-ui/build-module/font-library/installed-fonts.mjs
  var import_components59 = __toESM(require_components(), 1);
  var import_core_data43 = __toESM(require_core_data(), 1);
  var import_data62 = __toESM(require_data(), 1);
  var import_element60 = __toESM(require_element(), 1);
  var import_i18n87 = __toESM(require_i18n(), 1);

  // packages/global-styles-ui/build-module/font-library/font-card.mjs
  var import_i18n86 = __toESM(require_i18n(), 1);
  var import_components57 = __toESM(require_components(), 1);

  // packages/global-styles-ui/build-module/font-library/font-demo.mjs
  var import_components56 = __toESM(require_components(), 1);
  var import_element58 = __toESM(require_element(), 1);
  var import_jsx_runtime152 = __toESM(require_jsx_runtime(), 1);
  function getPreviewUrl(fontFace) {
    if (fontFace.preview) {
      return fontFace.preview;
    }
    if (fontFace.src) {
      return Array.isArray(fontFace.src) ? fontFace.src[0] : fontFace.src;
    }
    return void 0;
  }
  function getDisplayFontFace(font2) {
    if ("fontStyle" in font2 && font2.fontStyle || "fontWeight" in font2 && font2.fontWeight) {
      return font2;
    }
    if ("fontFace" in font2 && font2.fontFace && font2.fontFace.length) {
      return font2.fontFace.find(
        (face) => face.fontStyle === "normal" && face.fontWeight === "400"
      ) || font2.fontFace[0];
    }
    return {
      fontStyle: "normal",
      fontWeight: "400",
      fontFamily: font2.fontFamily
    };
  }
  function FontDemo({ font: font2, text }) {
    const ref = (0, import_element58.useRef)(null);
    const fontFace = getDisplayFontFace(font2);
    const style = getFamilyPreviewStyle(font2);
    text = text || ("name" in font2 ? font2.name : "");
    const customPreviewUrl = font2.preview;
    const [isIntersecting, setIsIntersecting] = (0, import_element58.useState)(false);
    const [isAssetLoaded, setIsAssetLoaded] = (0, import_element58.useState)(false);
    const { loadFontFaceAsset } = (0, import_element58.useContext)(FontLibraryContext);
    const previewUrl = customPreviewUrl ?? getPreviewUrl(fontFace);
    const isPreviewImage = previewUrl && previewUrl.match(/\.(png|jpg|jpeg|gif|svg)$/i);
    const faceStyles = getFacePreviewStyle(fontFace);
    const textDemoStyle = {
      fontSize: "18px",
      lineHeight: 1,
      opacity: isAssetLoaded ? "1" : "0",
      ...style,
      ...faceStyles
    };
    (0, import_element58.useEffect)(() => {
      const observer = new window.IntersectionObserver(([entry]) => {
        setIsIntersecting(entry.isIntersecting);
      }, {});
      if (ref.current) {
        observer.observe(ref.current);
      }
      return () => observer.disconnect();
    }, [ref]);
    (0, import_element58.useEffect)(() => {
      const loadAsset = async () => {
        if (isIntersecting) {
          if (!isPreviewImage && fontFace.src) {
            await loadFontFaceAsset(fontFace);
          }
          setIsAssetLoaded(true);
        }
      };
      loadAsset();
    }, [fontFace, isIntersecting, loadFontFaceAsset, isPreviewImage]);
    return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("div", { ref, children: isPreviewImage ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
      "img",
      {
        src: previewUrl,
        loading: "lazy",
        alt: text,
        className: "font-library__font-variant_demo-image"
      }
    ) : /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
      import_components56.__experimentalText,
      {
        style: textDemoStyle,
        className: "font-library__font-variant_demo-text",
        children: text
      }
    ) });
  }
  var font_demo_default = FontDemo;

  // packages/global-styles-ui/build-module/font-library/font-card.mjs
  var import_jsx_runtime153 = __toESM(require_jsx_runtime(), 1);
  function FontCard({
    font: font2,
    onClick,
    variantsText,
    navigatorPath
  }) {
    const variantsCount = font2.fontFace?.length || 1;
    const style = {
      cursor: !!onClick ? "pointer" : "default"
    };
    const navigator = (0, import_components57.useNavigator)();
    return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
      import_components57.Button,
      {
        __next40pxDefaultSize: true,
        onClick: () => {
          onClick();
          if (navigatorPath) {
            navigator.goTo(navigatorPath);
          }
        },
        style,
        className: "font-library__font-card",
        children: /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(import_components57.Flex, { justify: "space-between", wrap: false, children: [
          /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(font_demo_default, { font: font2 }),
          /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(import_components57.Flex, { justify: "flex-end", children: [
            /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(import_components57.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(import_components57.__experimentalText, { className: "font-library__font-card__count", children: variantsText || (0, import_i18n86.sprintf)(
              /* translators: %d: Number of font variants. */
              (0, import_i18n86._n)(
                "%d variant",
                "%d variants",
                variantsCount
              ),
              variantsCount
            ) }) }),
            /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(import_components57.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(icon_default, { icon: (0, import_i18n86.isRTL)() ? chevron_left_default : chevron_right_default }) })
          ] })
        ] })
      }
    );
  }
  var font_card_default = FontCard;

  // packages/global-styles-ui/build-module/font-library/library-font-variant.mjs
  var import_element59 = __toESM(require_element(), 1);
  var import_components58 = __toESM(require_components(), 1);
  var import_jsx_runtime154 = __toESM(require_jsx_runtime(), 1);
  function LibraryFontVariant({
    face,
    font: font2
  }) {
    const { isFontActivated, toggleActivateFont } = (0, import_element59.useContext)(FontLibraryContext);
    const isInstalled = (font2?.fontFace?.length ?? 0) > 0 ? isFontActivated(
      font2.slug,
      face.fontStyle,
      face.fontWeight,
      font2.source
    ) : isFontActivated(font2.slug, void 0, void 0, font2.source);
    const handleToggleActivation = () => {
      if ((font2?.fontFace?.length ?? 0) > 0) {
        toggleActivateFont(font2, face);
        return;
      }
      toggleActivateFont(font2);
    };
    const displayName = font2.name + " " + getFontFaceVariantName(face);
    const checkboxId = (0, import_element59.useId)();
    return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)("div", { className: "font-library__font-card", children: /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(import_components58.Flex, { justify: "flex-start", align: "center", gap: "1rem", children: [
      /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
        import_components58.CheckboxControl,
        {
          checked: isInstalled,
          onChange: handleToggleActivation,
          id: checkboxId
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime154.jsx)("label", { htmlFor: checkboxId, children: /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
        font_demo_default,
        {
          font: face,
          text: displayName,
          onClick: handleToggleActivation
        }
      ) })
    ] }) });
  }
  var library_font_variant_default = LibraryFontVariant;

  // packages/global-styles-ui/build-module/font-library/utils/sort-font-faces.mjs
  function getNumericFontWeight(value) {
    switch (value) {
      case "normal":
        return 400;
      case "bold":
        return 700;
      case "bolder":
        return 500;
      case "lighter":
        return 300;
      default:
        return parseInt(value, 10);
    }
  }
  function sortFontFaces(faces) {
    return faces.sort((a3, b3) => {
      if (a3.fontStyle === "normal" && b3.fontStyle !== "normal") {
        return -1;
      }
      if (b3.fontStyle === "normal" && a3.fontStyle !== "normal") {
        return 1;
      }
      if (a3.fontStyle === b3.fontStyle) {
        return getNumericFontWeight(a3.fontWeight?.toString() ?? "normal") - getNumericFontWeight(b3.fontWeight?.toString() ?? "normal");
      }
      if (!a3.fontStyle || !b3.fontStyle) {
        return !a3.fontStyle ? 1 : -1;
      }
      return a3.fontStyle.localeCompare(b3.fontStyle);
    });
  }

  // packages/global-styles-ui/build-module/font-library/installed-fonts.mjs
  var import_jsx_runtime155 = __toESM(require_jsx_runtime(), 1);
  function InstalledFonts() {
    const {
      baseCustomFonts,
      libraryFontSelected,
      handleSetLibraryFontSelected,
      uninstallFontFamily,
      isResolvingLibrary,
      isInstalling,
      saveFontFamilies,
      getFontFacesActivated
    } = (0, import_element60.useContext)(FontLibraryContext);
    const [fontFamilies, setFontFamilies] = useSetting("typography.fontFamilies");
    const [isConfirmDeleteOpen, setIsConfirmDeleteOpen] = (0, import_element60.useState)(false);
    const [notice, setNotice] = (0, import_element60.useState)(null);
    const [baseFontFamilies] = useSetting("typography.fontFamilies", void 0, "base");
    const globalStylesId = (0, import_data62.useSelect)((select6) => {
      const { __experimentalGetCurrentGlobalStylesId } = select6(import_core_data43.store);
      return __experimentalGetCurrentGlobalStylesId();
    }, []);
    const globalStyles = (0, import_core_data43.useEntityRecord)(
      "root",
      "globalStyles",
      globalStylesId
    );
    const fontFamiliesHasChanges = !!globalStyles?.edits?.settings?.typography?.fontFamilies;
    const themeFonts = fontFamilies?.theme ? fontFamilies.theme.map((f3) => setUIValuesNeeded(f3, { source: "theme" })).sort((a3, b3) => a3.name.localeCompare(b3.name)) : [];
    const themeFontsSlugs = new Set(themeFonts.map((f3) => f3.slug));
    const baseThemeFonts = baseFontFamilies?.theme ? themeFonts.concat(
      baseFontFamilies.theme.filter((f3) => !themeFontsSlugs.has(f3.slug)).map((f3) => setUIValuesNeeded(f3, { source: "theme" })).sort((a3, b3) => a3.name.localeCompare(b3.name))
    ) : [];
    const customFontFamilyId = libraryFontSelected?.source === "custom" && libraryFontSelected?.id;
    const canUserDelete = (0, import_data62.useSelect)(
      (select6) => {
        const { canUser } = select6(import_core_data43.store);
        return customFontFamilyId && canUser("delete", {
          kind: "postType",
          name: "wp_font_family",
          id: customFontFamilyId
        });
      },
      [customFontFamilyId]
    );
    const shouldDisplayDeleteButton = !!libraryFontSelected && libraryFontSelected?.source !== "theme" && canUserDelete;
    const handleUninstallClick = () => {
      setIsConfirmDeleteOpen(true);
    };
    const handleUpdate = async () => {
      setNotice(null);
      try {
        await saveFontFamilies(fontFamilies);
        setNotice({
          type: "success",
          message: (0, import_i18n87.__)("Font family updated successfully.")
        });
      } catch (error) {
        setNotice({
          type: "error",
          message: (0, import_i18n87.sprintf)(
            /* translators: %s: error message */
            (0, import_i18n87.__)("There was an error updating the font family. %s"),
            error.message
          )
        });
      }
    };
    const getFontFacesToDisplay = (font2) => {
      if (!font2) {
        return [];
      }
      if (!font2.fontFace || !font2.fontFace.length) {
        return [
          {
            fontFamily: font2.fontFamily,
            fontStyle: "normal",
            fontWeight: "400"
          }
        ];
      }
      return sortFontFaces(font2.fontFace);
    };
    const getFontCardVariantsText = (font2) => {
      const variantsInstalled = font2?.fontFace && (font2?.fontFace?.length ?? 0) > 0 ? font2.fontFace.length : 1;
      const variantsActive = getFontFacesActivated(
        font2.slug,
        font2.source
      ).length;
      return (0, import_i18n87.sprintf)(
        /* translators: 1: Active font variants, 2: Total font variants. */
        (0, import_i18n87.__)("%1$d/%2$d variants active"),
        variantsActive,
        variantsInstalled
      );
    };
    (0, import_element60.useEffect)(() => {
      handleSetLibraryFontSelected(libraryFontSelected);
    }, []);
    const activeFontsCount = libraryFontSelected ? getFontFacesActivated(
      libraryFontSelected.slug,
      libraryFontSelected.source
    ).length : 0;
    const selectedFontsCount = libraryFontSelected?.fontFace?.length ?? (libraryFontSelected?.fontFamily ? 1 : 0);
    const isIndeterminate = activeFontsCount > 0 && activeFontsCount !== selectedFontsCount;
    const isSelectAllChecked = activeFontsCount === selectedFontsCount;
    const toggleSelectAll = () => {
      if (!libraryFontSelected || !libraryFontSelected?.source) {
        return;
      }
      const initialFonts = fontFamilies?.[libraryFontSelected.source]?.filter(
        (f3) => f3.slug !== libraryFontSelected.slug
      ) ?? [];
      const newFonts = isSelectAllChecked ? initialFonts : [...initialFonts, libraryFontSelected];
      setFontFamilies({
        ...fontFamilies,
        [libraryFontSelected.source]: newFonts
      });
      if (libraryFontSelected.fontFace) {
        libraryFontSelected.fontFace.forEach((face) => {
          if (isSelectAllChecked) {
            unloadFontFaceInBrowser(face, "all");
          } else {
            const displaySrc = getDisplaySrcFromFontFace(
              face?.src ?? ""
            );
            if (displaySrc) {
              loadFontFaceInBrowser(face, displaySrc, "all");
            }
          }
        });
      }
    };
    const hasFonts = baseThemeFonts.length > 0 || baseCustomFonts.length > 0;
    return /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)("div", { className: "font-library__tabpanel-layout", children: [
      isResolvingLibrary && /* @__PURE__ */ (0, import_jsx_runtime155.jsx)("div", { className: "font-library__loading", children: /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(import_components59.ProgressBar, {}) }),
      !isResolvingLibrary && /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)(import_jsx_runtime155.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)(
          import_components59.Navigator,
          {
            initialPath: libraryFontSelected ? "/fontFamily" : "/",
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(import_components59.Navigator.Screen, { path: "/", children: /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)(import_components59.__experimentalVStack, { spacing: "8", children: [
                notice && /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
                  import_components59.Notice,
                  {
                    status: notice.type,
                    onRemove: () => setNotice(null),
                    children: notice.message
                  }
                ),
                !hasFonts && /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(import_components59.__experimentalText, { as: "p", children: (0, import_i18n87.__)("No fonts installed.") }),
                baseThemeFonts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)(import_components59.__experimentalVStack, { children: [
                  /* @__PURE__ */ (0, import_jsx_runtime155.jsx)("h2", {
                    className: "font-library__fonts-title",
                    /* translators: Heading for a list of fonts provided by the theme. */
                    children: (0, import_i18n87._x)("Theme", "font source")
                  }),
                  /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
                    "ul",
                    {
                      role: "list",
                      className: "font-library__fonts-list",
                      children: baseThemeFonts.map((font2) => /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
                        "li",
                        {
                          className: "font-library__fonts-list-item",
                          children: /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
                            font_card_default,
                            {
                              font: font2,
                              navigatorPath: "/fontFamily",
                              variantsText: getFontCardVariantsText(
                                font2
                              ),
                              onClick: () => {
                                setNotice(null);
                                handleSetLibraryFontSelected(
                                  font2
                                );
                              }
                            }
                          )
                        },
                        font2.slug
                      ))
                    }
                  )
                ] }),
                baseCustomFonts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)(import_components59.__experimentalVStack, { children: [
                  /* @__PURE__ */ (0, import_jsx_runtime155.jsx)("h2", {
                    className: "font-library__fonts-title",
                    /* translators: Heading for a list of fonts installed by the user. */
                    children: (0, import_i18n87._x)("Custom", "font source")
                  }),
                  /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
                    "ul",
                    {
                      role: "list",
                      className: "font-library__fonts-list",
                      children: baseCustomFonts.map((font2) => /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
                        "li",
                        {
                          className: "font-library__fonts-list-item",
                          children: /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
                            font_card_default,
                            {
                              font: font2,
                              navigatorPath: "/fontFamily",
                              variantsText: getFontCardVariantsText(
                                font2
                              ),
                              onClick: () => {
                                setNotice(null);
                                handleSetLibraryFontSelected(
                                  font2
                                );
                              }
                            }
                          )
                        },
                        font2.slug
                      ))
                    }
                  )
                ] })
              ] }) }),
              /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)(import_components59.Navigator.Screen, { path: "/fontFamily", children: [
                libraryFontSelected && /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
                  ConfirmDeleteDialog,
                  {
                    font: libraryFontSelected,
                    isOpen: isConfirmDeleteOpen,
                    setIsOpen: setIsConfirmDeleteOpen,
                    setNotice,
                    uninstallFontFamily,
                    handleSetLibraryFontSelected
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)(import_components59.Flex, { justify: "flex-start", children: [
                  /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
                    import_components59.Navigator.BackButton,
                    {
                      icon: (0, import_i18n87.isRTL)() ? chevron_right_default : chevron_left_default,
                      size: "small",
                      onClick: () => {
                        handleSetLibraryFontSelected(
                          void 0
                        );
                        setNotice(null);
                      },
                      label: (0, import_i18n87.__)("Back")
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
                    import_components59.__experimentalHeading,
                    {
                      level: 2,
                      size: 13,
                      className: "global-styles-ui-header",
                      children: libraryFontSelected?.name
                    }
                  )
                ] }),
                notice && /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)(import_jsx_runtime155.Fragment, { children: [
                  /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(import_components59.__experimentalSpacer, { margin: 1 }),
                  /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
                    import_components59.Notice,
                    {
                      status: notice.type,
                      onRemove: () => setNotice(null),
                      children: notice.message
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(import_components59.__experimentalSpacer, { margin: 1 })
                ] }),
                /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(import_components59.__experimentalSpacer, { margin: 4 }),
                /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(import_components59.__experimentalText, { children: (0, import_i18n87.__)(
                  "Choose font variants. Keep in mind that too many variants could make your site slower."
                ) }),
                /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(import_components59.__experimentalSpacer, { margin: 4 }),
                /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)(import_components59.__experimentalVStack, { spacing: 0, children: [
                  /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
                    import_components59.CheckboxControl,
                    {
                      className: "font-library__select-all",
                      label: (0, import_i18n87.__)("Select all"),
                      checked: isSelectAllChecked,
                      onChange: toggleSelectAll,
                      indeterminate: isIndeterminate
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(import_components59.__experimentalSpacer, { margin: 8 }),
                  /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
                    "ul",
                    {
                      role: "list",
                      className: "font-library__fonts-list",
                      children: libraryFontSelected && getFontFacesToDisplay(
                        libraryFontSelected
                      ).map((face, i3) => /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
                        "li",
                        {
                          className: "font-library__fonts-list-item",
                          children: /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
                            library_font_variant_default,
                            {
                              font: libraryFontSelected,
                              face
                            },
                            `face${i3}`
                          )
                        },
                        `face${i3}`
                      ))
                    }
                  )
                ] })
              ] })
            ]
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)(import_components59.__experimentalHStack, { justify: "flex-end", className: "font-library__footer", children: [
          isInstalling && /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(import_components59.ProgressBar, {}),
          shouldDisplayDeleteButton && /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
            import_components59.Button,
            {
              __next40pxDefaultSize: true,
              isDestructive: true,
              variant: "tertiary",
              onClick: handleUninstallClick,
              children: (0, import_i18n87.__)("Delete")
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
            import_components59.Button,
            {
              __next40pxDefaultSize: true,
              variant: "primary",
              onClick: handleUpdate,
              disabled: !fontFamiliesHasChanges,
              accessibleWhenDisabled: true,
              children: (0, import_i18n87.__)("Update")
            }
          )
        ] })
      ] })
    ] });
  }
  function ConfirmDeleteDialog({
    font: font2,
    isOpen,
    setIsOpen,
    setNotice,
    uninstallFontFamily,
    handleSetLibraryFontSelected
  }) {
    const navigator = (0, import_components59.useNavigator)();
    const handleConfirmUninstall = async () => {
      setNotice(null);
      setIsOpen(false);
      try {
        await uninstallFontFamily(font2);
        navigator.goBack();
        handleSetLibraryFontSelected(void 0);
        setNotice({
          type: "success",
          message: (0, import_i18n87.__)("Font family uninstalled successfully.")
        });
      } catch (error) {
        setNotice({
          type: "error",
          message: (0, import_i18n87.__)("There was an error uninstalling the font family.") + error.message
        });
      }
    };
    const handleCancelUninstall = () => {
      setIsOpen(false);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
      import_components59.__experimentalConfirmDialog,
      {
        isOpen,
        cancelButtonText: (0, import_i18n87.__)("Cancel"),
        confirmButtonText: (0, import_i18n87.__)("Delete"),
        onCancel: handleCancelUninstall,
        onConfirm: handleConfirmUninstall,
        size: "medium",
        children: font2 && (0, import_i18n87.sprintf)(
          /* translators: %s: Name of the font. */
          (0, import_i18n87.__)(
            'Are you sure you want to delete "%s" font and all its variants and assets?'
          ),
          font2.name
        )
      }
    );
  }
  var installed_fonts_default = InstalledFonts;

  // packages/global-styles-ui/build-module/font-library/font-collection.mjs
  var import_element62 = __toESM(require_element(), 1);
  var import_components62 = __toESM(require_components(), 1);
  var import_compose11 = __toESM(require_compose(), 1);
  var import_i18n89 = __toESM(require_i18n(), 1);
  var import_core_data44 = __toESM(require_core_data(), 1);

  // packages/global-styles-ui/build-module/font-library/utils/filter-fonts.mjs
  function filterFonts(fonts, filters) {
    const { category, search } = filters;
    let filteredFonts = fonts || [];
    if (category && category !== "all") {
      filteredFonts = filteredFonts.filter(
        (font2) => font2.categories && font2.categories.indexOf(category) !== -1
      );
    }
    if (search) {
      filteredFonts = filteredFonts.filter(
        (font2) => font2.font_family_settings && font2.font_family_settings.name.toLowerCase().includes(search.toLowerCase())
      );
    }
    return filteredFonts;
  }

  // packages/global-styles-ui/build-module/font-library/utils/fonts-outline.mjs
  function getFontsOutline(fonts) {
    return fonts.reduce(
      (acc, font2) => ({
        ...acc,
        [font2.slug]: (font2?.fontFace || []).reduce(
          (faces, face) => ({
            ...faces,
            [`${face.fontStyle}-${face.fontWeight}`]: true
          }),
          {}
        )
      }),
      {}
    );
  }
  function isFontFontFaceInOutline(slug, face, outline) {
    if (!face) {
      return !!outline[slug];
    }
    return !!outline[slug]?.[`${face.fontStyle}-${face.fontWeight}`];
  }

  // packages/global-styles-ui/build-module/font-library/google-fonts-confirm-dialog.mjs
  var import_i18n88 = __toESM(require_i18n(), 1);
  var import_components60 = __toESM(require_components(), 1);
  var import_jsx_runtime156 = __toESM(require_jsx_runtime(), 1);
  function GoogleFontsConfirmDialog() {
    const handleConfirm = () => {
      window.localStorage.setItem(
        "wp-font-library-google-fonts-permission",
        "true"
      );
      window.dispatchEvent(new Event("storage"));
    };
    return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)("div", { className: "font-library__google-fonts-confirm", children: /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(import_components60.Card, { children: /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(import_components60.CardBody, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(import_components60.__experimentalHeading, { level: 2, children: (0, import_i18n88.__)("Connect to Google Fonts") }),
      /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(import_components60.__experimentalSpacer, { margin: 6 }),
      /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(import_components60.__experimentalText, { as: "p", children: (0, import_i18n88.__)(
        "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."
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(import_components60.__experimentalSpacer, { margin: 3 }),
      /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(import_components60.__experimentalText, { as: "p", children: (0, import_i18n88.__)(
        "You can alternatively upload files directly on the Upload tab."
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(import_components60.__experimentalSpacer, { margin: 6 }),
      /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
        import_components60.Button,
        {
          __next40pxDefaultSize: true,
          variant: "primary",
          onClick: handleConfirm,
          children: (0, import_i18n88.__)("Allow access to Google Fonts")
        }
      )
    ] }) }) });
  }
  var google_fonts_confirm_dialog_default = GoogleFontsConfirmDialog;

  // packages/global-styles-ui/build-module/font-library/collection-font-variant.mjs
  var import_element61 = __toESM(require_element(), 1);
  var import_components61 = __toESM(require_components(), 1);
  var import_jsx_runtime157 = __toESM(require_jsx_runtime(), 1);
  function CollectionFontVariant({
    face,
    font: font2,
    handleToggleVariant,
    selected
  }) {
    const handleToggleActivation = () => {
      if (font2?.fontFace) {
        handleToggleVariant(font2, face);
        return;
      }
      handleToggleVariant(font2);
    };
    const displayName = font2.name + " " + getFontFaceVariantName(face);
    const checkboxId = (0, import_element61.useId)();
    return /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("div", { className: "font-library__font-card", children: /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)(import_components61.Flex, { justify: "flex-start", align: "center", gap: "1rem", children: [
      /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
        import_components61.CheckboxControl,
        {
          checked: selected,
          onChange: handleToggleActivation,
          id: checkboxId
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("label", { htmlFor: checkboxId, children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
        font_demo_default,
        {
          font: face,
          text: displayName,
          onClick: handleToggleActivation
        }
      ) })
    ] }) });
  }
  var collection_font_variant_default = CollectionFontVariant;

  // packages/global-styles-ui/build-module/font-library/font-collection.mjs
  var import_jsx_runtime158 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_CATEGORY = {
    slug: "all",
    name: (0, import_i18n89._x)("All", "font categories")
  };
  var LOCAL_STORAGE_ITEM = "wp-font-library-google-fonts-permission";
  var MIN_WINDOW_HEIGHT = 500;
  function FontCollection({ slug }) {
    const requiresPermission = slug === "google-fonts";
    const getGoogleFontsPermissionFromStorage = () => {
      return window.localStorage.getItem(LOCAL_STORAGE_ITEM) === "true";
    };
    const [selectedFont, setSelectedFont] = (0, import_element62.useState)(
      null
    );
    const [notice, setNotice] = (0, import_element62.useState)(null);
    const [fontsToInstall, setFontsToInstall] = (0, import_element62.useState)(
      []
    );
    const [page, setPage] = (0, import_element62.useState)(1);
    const [filters, setFilters] = (0, import_element62.useState)({});
    const [renderConfirmDialog, setRenderConfirmDialog] = (0, import_element62.useState)(
      requiresPermission && !getGoogleFontsPermissionFromStorage()
    );
    const { installFonts, isInstalling } = (0, import_element62.useContext)(FontLibraryContext);
    const { record: selectedCollection, isResolving: isLoading } = (0, import_core_data44.useEntityRecord)("root", "fontCollection", slug);
    (0, import_element62.useEffect)(() => {
      const handleStorage = () => {
        setRenderConfirmDialog(
          requiresPermission && !getGoogleFontsPermissionFromStorage()
        );
      };
      handleStorage();
      window.addEventListener("storage", handleStorage);
      return () => window.removeEventListener("storage", handleStorage);
    }, [slug, requiresPermission]);
    const revokeAccess = () => {
      window.localStorage.setItem(LOCAL_STORAGE_ITEM, "false");
      window.dispatchEvent(new Event("storage"));
    };
    (0, import_element62.useEffect)(() => {
      setSelectedFont(null);
    }, [slug]);
    (0, import_element62.useEffect)(() => {
      setFontsToInstall([]);
    }, [selectedFont]);
    const collectionFonts = (0, import_element62.useMemo)(
      () => selectedCollection?.font_families ?? [],
      [selectedCollection]
    );
    const collectionCategories = selectedCollection?.categories ?? [];
    const categories = [DEFAULT_CATEGORY, ...collectionCategories];
    const fonts = (0, import_element62.useMemo)(
      () => filterFonts(collectionFonts, filters),
      [collectionFonts, filters]
    );
    const windowHeight = Math.max(window.innerHeight, MIN_WINDOW_HEIGHT);
    const pageSize = Math.floor((windowHeight - 417) / 61);
    const totalPages = Math.ceil(fonts.length / pageSize);
    const itemsStart = (page - 1) * pageSize;
    const itemsLimit = page * pageSize;
    const items = fonts.slice(itemsStart, itemsLimit);
    const handleCategoryFilter = (category) => {
      setFilters({ ...filters, category });
      setPage(1);
    };
    const handleUpdateSearchInput = (value) => {
      setFilters({ ...filters, search: value });
      setPage(1);
    };
    const debouncedUpdateSearchInput = (0, import_compose11.debounce)(handleUpdateSearchInput, 300);
    const handleToggleVariant = (font2, face) => {
      const newFontsToInstall = toggleFont(font2, face, fontsToInstall);
      setFontsToInstall(newFontsToInstall);
    };
    const fontToInstallOutline = getFontsOutline(fontsToInstall);
    const resetFontsToInstall = () => {
      setFontsToInstall([]);
    };
    const selectFontCount = fontsToInstall.length > 0 ? fontsToInstall[0]?.fontFace?.length ?? 0 : 0;
    const isIndeterminate = selectFontCount > 0 && selectFontCount !== selectedFont?.fontFace?.length;
    const isSelectAllChecked = selectFontCount === selectedFont?.fontFace?.length;
    const toggleSelectAll = () => {
      const newFonts = [];
      if (!isSelectAllChecked && selectedFont) {
        newFonts.push(selectedFont);
      }
      setFontsToInstall(newFonts);
    };
    const handleInstall = async () => {
      setNotice(null);
      const fontFamily = fontsToInstall[0];
      try {
        if (fontFamily?.fontFace) {
          await Promise.all(
            fontFamily.fontFace.map(async (fontFace) => {
              if (fontFace.src) {
                fontFace.file = await downloadFontFaceAssets(
                  fontFace.src
                );
              }
            })
          );
        }
      } catch (error) {
        setNotice({
          type: "error",
          message: (0, import_i18n89.__)(
            "Error installing the fonts, could not be downloaded."
          )
        });
        return;
      }
      try {
        await installFonts([fontFamily]);
        setNotice({
          type: "success",
          message: (0, import_i18n89.__)("Fonts were installed successfully.")
        });
      } catch (error) {
        setNotice({
          type: "error",
          message: error.message
        });
      }
      resetFontsToInstall();
    };
    const getSortedFontFaces = (fontFamily) => {
      if (!fontFamily) {
        return [];
      }
      if (!fontFamily.fontFace || !fontFamily.fontFace.length) {
        return [
          {
            fontFamily: fontFamily.fontFamily,
            fontStyle: "normal",
            fontWeight: "400"
          }
        ];
      }
      return sortFontFaces(fontFamily.fontFace);
    };
    if (renderConfirmDialog) {
      return /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(google_fonts_confirm_dialog_default, {});
    }
    const ActionsComponent = () => {
      if (slug !== "google-fonts" || renderConfirmDialog || selectedFont) {
        return null;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
        import_components62.DropdownMenu,
        {
          icon: more_vertical_default,
          label: (0, import_i18n89.__)("Actions"),
          popoverProps: {
            position: "bottom left"
          },
          controls: [
            {
              title: (0, import_i18n89.__)("Revoke access to Google Fonts"),
              onClick: revokeAccess
            }
          ]
        }
      );
    };
    return /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)("div", { className: "font-library__tabpanel-layout", children: [
      isLoading && /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("div", { className: "font-library__loading", children: /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(import_components62.ProgressBar, {}) }),
      !isLoading && selectedCollection && /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(import_jsx_runtime158.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(
          import_components62.Navigator,
          {
            initialPath: "/",
            className: "font-library__tabpanel-layout",
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(import_components62.Navigator.Screen, { path: "/", children: [
                /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(import_components62.__experimentalHStack, { justify: "space-between", children: [
                  /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(import_components62.__experimentalVStack, { children: [
                    /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(import_components62.__experimentalHeading, { level: 2, size: 13, children: selectedCollection.name }),
                    /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(import_components62.__experimentalText, { children: selectedCollection.description })
                  ] }),
                  /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(ActionsComponent, {})
                ] }),
                /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(import_components62.__experimentalSpacer, { margin: 4 }),
                /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(import_components62.__experimentalHStack, { spacing: 4, justify: "space-between", children: [
                  /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
                    import_components62.SearchControl,
                    {
                      value: filters.search,
                      placeholder: (0, import_i18n89.__)("Font name\u2026"),
                      label: (0, import_i18n89.__)("Search"),
                      onChange: debouncedUpdateSearchInput,
                      hideLabelFromVision: false
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
                    import_components62.SelectControl,
                    {
                      __next40pxDefaultSize: true,
                      label: (0, import_i18n89.__)("Category"),
                      value: filters.category,
                      onChange: handleCategoryFilter,
                      children: categories && categories.map((category) => /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
                        "option",
                        {
                          value: category.slug,
                          children: category.name
                        },
                        category.slug
                      ))
                    }
                  )
                ] }),
                /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(import_components62.__experimentalSpacer, { margin: 4 }),
                !!selectedCollection?.font_families?.length && !fonts.length && /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(import_components62.__experimentalText, { children: (0, import_i18n89.__)(
                  "No fonts found. Try with a different search term."
                ) }),
                /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("div", { className: "font-library__fonts-grid__main", children: /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
                  "ul",
                  {
                    role: "list",
                    className: "font-library__fonts-list",
                    children: items.map((font2) => /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
                      "li",
                      {
                        className: "font-library__fonts-list-item",
                        children: /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
                          font_card_default,
                          {
                            font: font2.font_family_settings,
                            navigatorPath: "/fontFamily",
                            onClick: () => {
                              setSelectedFont(
                                font2.font_family_settings
                              );
                            }
                          }
                        )
                      },
                      font2.font_family_settings.slug
                    ))
                  }
                ) })
              ] }),
              /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(import_components62.Navigator.Screen, { path: "/fontFamily", children: [
                /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(import_components62.Flex, { justify: "flex-start", children: [
                  /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
                    import_components62.Navigator.BackButton,
                    {
                      icon: (0, import_i18n89.isRTL)() ? chevron_right_default : chevron_left_default,
                      size: "small",
                      onClick: () => {
                        setSelectedFont(null);
                        setNotice(null);
                      },
                      label: (0, import_i18n89.__)("Back")
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
                    import_components62.__experimentalHeading,
                    {
                      level: 2,
                      size: 13,
                      className: "global-styles-ui-header",
                      children: selectedFont?.name
                    }
                  )
                ] }),
                notice && /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(import_jsx_runtime158.Fragment, { children: [
                  /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(import_components62.__experimentalSpacer, { margin: 1 }),
                  /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
                    import_components62.Notice,
                    {
                      status: notice.type,
                      onRemove: () => setNotice(null),
                      children: notice.message
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(import_components62.__experimentalSpacer, { margin: 1 })
                ] }),
                /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(import_components62.__experimentalSpacer, { margin: 4 }),
                /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(import_components62.__experimentalText, { children: (0, import_i18n89.__)("Select font variants to install.") }),
                /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(import_components62.__experimentalSpacer, { margin: 4 }),
                /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
                  import_components62.CheckboxControl,
                  {
                    className: "font-library__select-all",
                    label: (0, import_i18n89.__)("Select all"),
                    checked: isSelectAllChecked,
                    onChange: toggleSelectAll,
                    indeterminate: isIndeterminate
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(import_components62.__experimentalVStack, { spacing: 0, children: /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
                  "ul",
                  {
                    role: "list",
                    className: "font-library__fonts-list",
                    children: selectedFont && getSortedFontFaces(selectedFont).map(
                      (face, i3) => /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
                        "li",
                        {
                          className: "font-library__fonts-list-item",
                          children: /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
                            collection_font_variant_default,
                            {
                              font: selectedFont,
                              face,
                              handleToggleVariant,
                              selected: isFontFontFaceInOutline(
                                selectedFont.slug,
                                selectedFont.fontFace ? face : null,
                                // If the font has no fontFace, we want to check if the font is in the outline
                                fontToInstallOutline
                              )
                            }
                          )
                        },
                        `face${i3}`
                      )
                    )
                  }
                ) }),
                /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(import_components62.__experimentalSpacer, { margin: 16 })
              ] })
            ]
          }
        ),
        selectedFont && /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
          import_components62.Flex,
          {
            justify: "flex-end",
            className: "font-library__footer",
            children: /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
              import_components62.Button,
              {
                __next40pxDefaultSize: true,
                variant: "primary",
                onClick: handleInstall,
                isBusy: isInstalling,
                disabled: fontsToInstall.length === 0 || isInstalling,
                accessibleWhenDisabled: true,
                children: (0, import_i18n89.__)("Install")
              }
            )
          }
        ),
        !selectedFont && /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(
          import_components62.__experimentalHStack,
          {
            expanded: false,
            className: "font-library__footer",
            justify: "end",
            spacing: 6,
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
                import_components62.__experimentalHStack,
                {
                  justify: "flex-start",
                  expanded: false,
                  spacing: 1,
                  className: "font-library__page-selection",
                  children: (0, import_element62.createInterpolateElement)(
                    (0, import_i18n89.sprintf)(
                      // translators: 1: Current page number, 2: Total number of pages.
                      (0, import_i18n89._x)(
                        "<div>Page</div>%1$s<div>of %2$d</div>",
                        "paging"
                      ),
                      "<CurrentPage />",
                      totalPages
                    ),
                    {
                      div: /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("div", { "aria-hidden": true }),
                      CurrentPage: /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
                        import_components62.SelectControl,
                        {
                          "aria-label": (0, import_i18n89.__)(
                            "Current page"
                          ),
                          value: page.toString(),
                          options: [
                            ...Array(totalPages)
                          ].map((e3, i3) => {
                            return {
                              label: (i3 + 1).toString(),
                              value: (i3 + 1).toString()
                            };
                          }),
                          onChange: (newPage) => setPage(
                            parseInt(newPage)
                          ),
                          size: "small",
                          variant: "minimal"
                        }
                      )
                    }
                  )
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(import_components62.__experimentalHStack, { expanded: false, spacing: 1, children: [
                /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
                  import_components62.Button,
                  {
                    onClick: () => setPage(page - 1),
                    disabled: page === 1,
                    accessibleWhenDisabled: true,
                    label: (0, import_i18n89.__)("Previous page"),
                    icon: (0, import_i18n89.isRTL)() ? next_default : previous_default,
                    showTooltip: true,
                    size: "compact",
                    tooltipPosition: "top"
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
                  import_components62.Button,
                  {
                    onClick: () => setPage(page + 1),
                    disabled: page === totalPages,
                    accessibleWhenDisabled: true,
                    label: (0, import_i18n89.__)("Next page"),
                    icon: (0, import_i18n89.isRTL)() ? previous_default : next_default,
                    showTooltip: true,
                    size: "compact",
                    tooltipPosition: "top"
                  }
                )
              ] })
            ]
          }
        )
      ] })
    ] });
  }
  var font_collection_default = FontCollection;

  // packages/global-styles-ui/build-module/font-library/upload-fonts.mjs
  var import_i18n90 = __toESM(require_i18n(), 1);
  var import_components64 = __toESM(require_components(), 1);
  var import_element63 = __toESM(require_element(), 1);

  // packages/global-styles-ui/build-module/font-library/lib/unbrotli.mjs
  var __require2 = /* @__PURE__ */ ((x2) => typeof __require !== "undefined" ? __require : typeof Proxy !== "undefined" ? new Proxy(x2, {
    get: (a3, b3) => (typeof __require !== "undefined" ? __require : a3)[b3]
  }) : x2)(function(x2) {
    if (typeof __require !== "undefined") return __require.apply(this, arguments);
    throw Error('Dynamic require of "' + x2 + '" is not supported');
  });
  var unbrotli_default = (function() {
    var define2, module, exports;
    return (/* @__PURE__ */ (function() {
      function r4(e3, n3, t4) {
        function o4(i22, f3) {
          if (!n3[i22]) {
            if (!e3[i22]) {
              var c6 = "function" == typeof __require2 && __require2;
              if (!f3 && c6) return c6(i22, true);
              if (u3) return u3(i22, true);
              var a3 = new Error("Cannot find module '" + i22 + "'");
              throw a3.code = "MODULE_NOT_FOUND", a3;
            }
            var p4 = n3[i22] = { exports: {} };
            e3[i22][0].call(
              p4.exports,
              function(r22) {
                var n22 = e3[i22][1][r22];
                return o4(n22 || r22);
              },
              p4,
              p4.exports,
              r4,
              e3,
              n3,
              t4
            );
          }
          return n3[i22].exports;
        }
        for (var u3 = "function" == typeof __require2 && __require2, i3 = 0; i3 < t4.length; i3++)
          o4(t4[i3]);
        return o4;
      }
      return r4;
    })())(
      {
        1: [
          function(require2, module2, exports2) {
            var BROTLI_READ_SIZE = 4096;
            var BROTLI_IBUF_SIZE = 2 * BROTLI_READ_SIZE + 32;
            var BROTLI_IBUF_MASK = 2 * BROTLI_READ_SIZE - 1;
            var kBitMask = new Uint32Array([
              0,
              1,
              3,
              7,
              15,
              31,
              63,
              127,
              255,
              511,
              1023,
              2047,
              4095,
              8191,
              16383,
              32767,
              65535,
              131071,
              262143,
              524287,
              1048575,
              2097151,
              4194303,
              8388607,
              16777215
            ]);
            function BrotliBitReader(input) {
              this.buf_ = new Uint8Array(BROTLI_IBUF_SIZE);
              this.input_ = input;
              this.reset();
            }
            BrotliBitReader.READ_SIZE = BROTLI_READ_SIZE;
            BrotliBitReader.IBUF_MASK = BROTLI_IBUF_MASK;
            BrotliBitReader.prototype.reset = function() {
              this.buf_ptr_ = 0;
              this.val_ = 0;
              this.pos_ = 0;
              this.bit_pos_ = 0;
              this.bit_end_pos_ = 0;
              this.eos_ = 0;
              this.readMoreInput();
              for (var i3 = 0; i3 < 4; i3++) {
                this.val_ |= this.buf_[this.pos_] << 8 * i3;
                ++this.pos_;
              }
              return this.bit_end_pos_ > 0;
            };
            BrotliBitReader.prototype.readMoreInput = function() {
              if (this.bit_end_pos_ > 256) {
                return;
              } else if (this.eos_) {
                if (this.bit_pos_ > this.bit_end_pos_)
                  throw new Error(
                    "Unexpected end of input " + this.bit_pos_ + " " + this.bit_end_pos_
                  );
              } else {
                var dst = this.buf_ptr_;
                var bytes_read = this.input_.read(
                  this.buf_,
                  dst,
                  BROTLI_READ_SIZE
                );
                if (bytes_read < 0) {
                  throw new Error("Unexpected end of input");
                }
                if (bytes_read < BROTLI_READ_SIZE) {
                  this.eos_ = 1;
                  for (var p4 = 0; p4 < 32; p4++)
                    this.buf_[dst + bytes_read + p4] = 0;
                }
                if (dst === 0) {
                  for (var p4 = 0; p4 < 32; p4++)
                    this.buf_[(BROTLI_READ_SIZE << 1) + p4] = this.buf_[p4];
                  this.buf_ptr_ = BROTLI_READ_SIZE;
                } else {
                  this.buf_ptr_ = 0;
                }
                this.bit_end_pos_ += bytes_read << 3;
              }
            };
            BrotliBitReader.prototype.fillBitWindow = function() {
              while (this.bit_pos_ >= 8) {
                this.val_ >>>= 8;
                this.val_ |= this.buf_[this.pos_ & BROTLI_IBUF_MASK] << 24;
                ++this.pos_;
                this.bit_pos_ = this.bit_pos_ - 8 >>> 0;
                this.bit_end_pos_ = this.bit_end_pos_ - 8 >>> 0;
              }
            };
            BrotliBitReader.prototype.readBits = function(n_bits) {
              if (32 - this.bit_pos_ < n_bits) {
                this.fillBitWindow();
              }
              var val = this.val_ >>> this.bit_pos_ & kBitMask[n_bits];
              this.bit_pos_ += n_bits;
              return val;
            };
            module2.exports = BrotliBitReader;
          },
          {}
        ],
        2: [
          function(require2, module2, exports2) {
            var CONTEXT_LSB6 = 0;
            var CONTEXT_MSB6 = 1;
            var CONTEXT_UTF8 = 2;
            var CONTEXT_SIGNED = 3;
            exports2.lookup = new Uint8Array([
              /* CONTEXT_UTF8, last byte. */
              /* ASCII range. */
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              4,
              4,
              0,
              0,
              4,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              8,
              12,
              16,
              12,
              12,
              20,
              12,
              16,
              24,
              28,
              12,
              12,
              32,
              12,
              36,
              12,
              44,
              44,
              44,
              44,
              44,
              44,
              44,
              44,
              44,
              44,
              32,
              32,
              24,
              40,
              28,
              12,
              12,
              48,
              52,
              52,
              52,
              48,
              52,
              52,
              52,
              48,
              52,
              52,
              52,
              52,
              52,
              48,
              52,
              52,
              52,
              52,
              52,
              48,
              52,
              52,
              52,
              52,
              52,
              24,
              12,
              28,
              12,
              12,
              12,
              56,
              60,
              60,
              60,
              56,
              60,
              60,
              60,
              56,
              60,
              60,
              60,
              60,
              60,
              56,
              60,
              60,
              60,
              60,
              60,
              56,
              60,
              60,
              60,
              60,
              60,
              24,
              12,
              28,
              12,
              0,
              /* UTF8 continuation byte range. */
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              0,
              1,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              2,
              3,
              /* ASCII range. */
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              1,
              1,
              1,
              1,
              1,
              1,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              1,
              1,
              1,
              1,
              0,
              /* UTF8 continuation byte range. */
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              0,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              2,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              5,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              6,
              7,
              /* CONTEXT_SIGNED, last byte, same as the above values shifted by 3 bits. */
              0,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              8,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              24,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              32,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              40,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              48,
              56,
              /* CONTEXT_LSB6, last byte. */
              0,
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              12,
              13,
              14,
              15,
              16,
              17,
              18,
              19,
              20,
              21,
              22,
              23,
              24,
              25,
              26,
              27,
              28,
              29,
              30,
              31,
              32,
              33,
              34,
              35,
              36,
              37,
              38,
              39,
              40,
              41,
              42,
              43,
              44,
              45,
              46,
              47,
              48,
              49,
              50,
              51,
              52,
              53,
              54,
              55,
              56,
              57,
              58,
              59,
              60,
              61,
              62,
              63,
              0,
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              12,
              13,
              14,
              15,
              16,
              17,
              18,
              19,
              20,
              21,
              22,
              23,
              24,
              25,
              26,
              27,
              28,
              29,
              30,
              31,
              32,
              33,
              34,
              35,
              36,
              37,
              38,
              39,
              40,
              41,
              42,
              43,
              44,
              45,
              46,
              47,
              48,
              49,
              50,
              51,
              52,
              53,
              54,
              55,
              56,
              57,
              58,
              59,
              60,
              61,
              62,
              63,
              0,
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              12,
              13,
              14,
              15,
              16,
              17,
              18,
              19,
              20,
              21,
              22,
              23,
              24,
              25,
              26,
              27,
              28,
              29,
              30,
              31,
              32,
              33,
              34,
              35,
              36,
              37,
              38,
              39,
              40,
              41,
              42,
              43,
              44,
              45,
              46,
              47,
              48,
              49,
              50,
              51,
              52,
              53,
              54,
              55,
              56,
              57,
              58,
              59,
              60,
              61,
              62,
              63,
              0,
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              12,
              13,
              14,
              15,
              16,
              17,
              18,
              19,
              20,
              21,
              22,
              23,
              24,
              25,
              26,
              27,
              28,
              29,
              30,
              31,
              32,
              33,
              34,
              35,
              36,
              37,
              38,
              39,
              40,
              41,
              42,
              43,
              44,
              45,
              46,
              47,
              48,
              49,
              50,
              51,
              52,
              53,
              54,
              55,
              56,
              57,
              58,
              59,
              60,
              61,
              62,
              63,
              /* CONTEXT_MSB6, last byte. */
              0,
              0,
              0,
              0,
              1,
              1,
              1,
              1,
              2,
              2,
              2,
              2,
              3,
              3,
              3,
              3,
              4,
              4,
              4,
              4,
              5,
              5,
              5,
              5,
              6,
              6,
              6,
              6,
              7,
              7,
              7,
              7,
              8,
              8,
              8,
              8,
              9,
              9,
              9,
              9,
              10,
              10,
              10,
              10,
              11,
              11,
              11,
              11,
              12,
              12,
              12,
              12,
              13,
              13,
              13,
              13,
              14,
              14,
              14,
              14,
              15,
              15,
              15,
              15,
              16,
              16,
              16,
              16,
              17,
              17,
              17,
              17,
              18,
              18,
              18,
              18,
              19,
              19,
              19,
              19,
              20,
              20,
              20,
              20,
              21,
              21,
              21,
              21,
              22,
              22,
              22,
              22,
              23,
              23,
              23,
              23,
              24,
              24,
              24,
              24,
              25,
              25,
              25,
              25,
              26,
              26,
              26,
              26,
              27,
              27,
              27,
              27,
              28,
              28,
              28,
              28,
              29,
              29,
              29,
              29,
              30,
              30,
              30,
              30,
              31,
              31,
              31,
              31,
              32,
              32,
              32,
              32,
              33,
              33,
              33,
              33,
              34,
              34,
              34,
              34,
              35,
              35,
              35,
              35,
              36,
              36,
              36,
              36,
              37,
              37,
              37,
              37,
              38,
              38,
              38,
              38,
              39,
              39,
              39,
              39,
              40,
              40,
              40,
              40,
              41,
              41,
              41,
              41,
              42,
              42,
              42,
              42,
              43,
              43,
              43,
              43,
              44,
              44,
              44,
              44,
              45,
              45,
              45,
              45,
              46,
              46,
              46,
              46,
              47,
              47,
              47,
              47,
              48,
              48,
              48,
              48,
              49,
              49,
              49,
              49,
              50,
              50,
              50,
              50,
              51,
              51,
              51,
              51,
              52,
              52,
              52,
              52,
              53,
              53,
              53,
              53,
              54,
              54,
              54,
              54,
              55,
              55,
              55,
              55,
              56,
              56,
              56,
              56,
              57,
              57,
              57,
              57,
              58,
              58,
              58,
              58,
              59,
              59,
              59,
              59,
              60,
              60,
              60,
              60,
              61,
              61,
              61,
              61,
              62,
              62,
              62,
              62,
              63,
              63,
              63,
              63,
              /* CONTEXT_{M,L}SB6, second last byte, */
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0
            ]);
            exports2.lookupOffsets = new Uint16Array([
              /* CONTEXT_LSB6 */
              1024,
              1536,
              1280,
              1536,
              0,
              256,
              768,
              512
            ]);
          },
          {}
        ],
        3: [
          function(require2, module2, exports2) {
            var BrotliInput = require2("./streams").BrotliInput;
            var BrotliOutput = require2("./streams").BrotliOutput;
            var BrotliBitReader = require2("./bit_reader");
            var BrotliDictionary = require2("./dictionary");
            var HuffmanCode = require2("./huffman").HuffmanCode;
            var BrotliBuildHuffmanTable = require2("./huffman").BrotliBuildHuffmanTable;
            var Context = require2("./context");
            var Prefix = require2("./prefix");
            var Transform = require2("./transform");
            var kDefaultCodeLength = 8;
            var kCodeLengthRepeatCode = 16;
            var kNumLiteralCodes = 256;
            var kNumInsertAndCopyCodes = 704;
            var kNumBlockLengthCodes = 26;
            var kLiteralContextBits = 6;
            var kDistanceContextBits = 2;
            var HUFFMAN_TABLE_BITS = 8;
            var HUFFMAN_TABLE_MASK = 255;
            var HUFFMAN_MAX_TABLE_SIZE = 1080;
            var CODE_LENGTH_CODES = 18;
            var kCodeLengthCodeOrder = new Uint8Array([
              1,
              2,
              3,
              4,
              0,
              5,
              17,
              6,
              16,
              7,
              8,
              9,
              10,
              11,
              12,
              13,
              14,
              15
            ]);
            var NUM_DISTANCE_SHORT_CODES = 16;
            var kDistanceShortCodeIndexOffset = new Uint8Array([
              3,
              2,
              1,
              0,
              3,
              3,
              3,
              3,
              3,
              3,
              2,
              2,
              2,
              2,
              2,
              2
            ]);
            var kDistanceShortCodeValueOffset = new Int8Array([
              0,
              0,
              0,
              0,
              -1,
              1,
              -2,
              2,
              -3,
              3,
              -1,
              1,
              -2,
              2,
              -3,
              3
            ]);
            var kMaxHuffmanTableSize = new Uint16Array([
              256,
              402,
              436,
              468,
              500,
              534,
              566,
              598,
              630,
              662,
              694,
              726,
              758,
              790,
              822,
              854,
              886,
              920,
              952,
              984,
              1016,
              1048,
              1080
            ]);
            function DecodeWindowBits(br) {
              var n3;
              if (br.readBits(1) === 0) {
                return 16;
              }
              n3 = br.readBits(3);
              if (n3 > 0) {
                return 17 + n3;
              }
              n3 = br.readBits(3);
              if (n3 > 0) {
                return 8 + n3;
              }
              return 17;
            }
            function DecodeVarLenUint8(br) {
              if (br.readBits(1)) {
                var nbits = br.readBits(3);
                if (nbits === 0) {
                  return 1;
                } else {
                  return br.readBits(nbits) + (1 << nbits);
                }
              }
              return 0;
            }
            function MetaBlockLength() {
              this.meta_block_length = 0;
              this.input_end = 0;
              this.is_uncompressed = 0;
              this.is_metadata = false;
            }
            function DecodeMetaBlockLength(br) {
              var out = new MetaBlockLength();
              var size_nibbles;
              var size_bytes;
              var i3;
              out.input_end = br.readBits(1);
              if (out.input_end && br.readBits(1)) {
                return out;
              }
              size_nibbles = br.readBits(2) + 4;
              if (size_nibbles === 7) {
                out.is_metadata = true;
                if (br.readBits(1) !== 0)
                  throw new Error("Invalid reserved bit");
                size_bytes = br.readBits(2);
                if (size_bytes === 0) return out;
                for (i3 = 0; i3 < size_bytes; i3++) {
                  var next_byte = br.readBits(8);
                  if (i3 + 1 === size_bytes && size_bytes > 1 && next_byte === 0)
                    throw new Error("Invalid size byte");
                  out.meta_block_length |= next_byte << i3 * 8;
                }
              } else {
                for (i3 = 0; i3 < size_nibbles; ++i3) {
                  var next_nibble = br.readBits(4);
                  if (i3 + 1 === size_nibbles && size_nibbles > 4 && next_nibble === 0)
                    throw new Error("Invalid size nibble");
                  out.meta_block_length |= next_nibble << i3 * 4;
                }
              }
              ++out.meta_block_length;
              if (!out.input_end && !out.is_metadata) {
                out.is_uncompressed = br.readBits(1);
              }
              return out;
            }
            function ReadSymbol(table, index2, br) {
              var start_index = index2;
              var nbits;
              br.fillBitWindow();
              index2 += br.val_ >>> br.bit_pos_ & HUFFMAN_TABLE_MASK;
              nbits = table[index2].bits - HUFFMAN_TABLE_BITS;
              if (nbits > 0) {
                br.bit_pos_ += HUFFMAN_TABLE_BITS;
                index2 += table[index2].value;
                index2 += br.val_ >>> br.bit_pos_ & (1 << nbits) - 1;
              }
              br.bit_pos_ += table[index2].bits;
              return table[index2].value;
            }
            function ReadHuffmanCodeLengths(code_length_code_lengths, num_symbols, code_lengths, br) {
              var symbol = 0;
              var prev_code_len = kDefaultCodeLength;
              var repeat = 0;
              var repeat_code_len = 0;
              var space = 32768;
              var table = [];
              for (var i3 = 0; i3 < 32; i3++)
                table.push(new HuffmanCode(0, 0));
              BrotliBuildHuffmanTable(
                table,
                0,
                5,
                code_length_code_lengths,
                CODE_LENGTH_CODES
              );
              while (symbol < num_symbols && space > 0) {
                var p4 = 0;
                var code_len;
                br.readMoreInput();
                br.fillBitWindow();
                p4 += br.val_ >>> br.bit_pos_ & 31;
                br.bit_pos_ += table[p4].bits;
                code_len = table[p4].value & 255;
                if (code_len < kCodeLengthRepeatCode) {
                  repeat = 0;
                  code_lengths[symbol++] = code_len;
                  if (code_len !== 0) {
                    prev_code_len = code_len;
                    space -= 32768 >> code_len;
                  }
                } else {
                  var extra_bits = code_len - 14;
                  var old_repeat;
                  var repeat_delta;
                  var new_len = 0;
                  if (code_len === kCodeLengthRepeatCode) {
                    new_len = prev_code_len;
                  }
                  if (repeat_code_len !== new_len) {
                    repeat = 0;
                    repeat_code_len = new_len;
                  }
                  old_repeat = repeat;
                  if (repeat > 0) {
                    repeat -= 2;
                    repeat <<= extra_bits;
                  }
                  repeat += br.readBits(extra_bits) + 3;
                  repeat_delta = repeat - old_repeat;
                  if (symbol + repeat_delta > num_symbols) {
                    throw new Error(
                      "[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols"
                    );
                  }
                  for (var x2 = 0; x2 < repeat_delta; x2++)
                    code_lengths[symbol + x2] = repeat_code_len;
                  symbol += repeat_delta;
                  if (repeat_code_len !== 0) {
                    space -= repeat_delta << 15 - repeat_code_len;
                  }
                }
              }
              if (space !== 0) {
                throw new Error(
                  "[ReadHuffmanCodeLengths] space = " + space
                );
              }
              for (; symbol < num_symbols; symbol++)
                code_lengths[symbol] = 0;
            }
            function ReadHuffmanCode(alphabet_size, tables, table, br) {
              var table_size = 0;
              var simple_code_or_skip;
              var code_lengths = new Uint8Array(alphabet_size);
              br.readMoreInput();
              simple_code_or_skip = br.readBits(2);
              if (simple_code_or_skip === 1) {
                var i3;
                var max_bits_counter = alphabet_size - 1;
                var max_bits = 0;
                var symbols = new Int32Array(4);
                var num_symbols = br.readBits(2) + 1;
                while (max_bits_counter) {
                  max_bits_counter >>= 1;
                  ++max_bits;
                }
                for (i3 = 0; i3 < num_symbols; ++i3) {
                  symbols[i3] = br.readBits(max_bits) % alphabet_size;
                  code_lengths[symbols[i3]] = 2;
                }
                code_lengths[symbols[0]] = 1;
                switch (num_symbols) {
                  case 1:
                    break;
                  case 3:
                    if (symbols[0] === symbols[1] || symbols[0] === symbols[2] || symbols[1] === symbols[2]) {
                      throw new Error(
                        "[ReadHuffmanCode] invalid symbols"
                      );
                    }
                    break;
                  case 2:
                    if (symbols[0] === symbols[1]) {
                      throw new Error(
                        "[ReadHuffmanCode] invalid symbols"
                      );
                    }
                    code_lengths[symbols[1]] = 1;
                    break;
                  case 4:
                    if (symbols[0] === symbols[1] || symbols[0] === symbols[2] || symbols[0] === symbols[3] || symbols[1] === symbols[2] || symbols[1] === symbols[3] || symbols[2] === symbols[3]) {
                      throw new Error(
                        "[ReadHuffmanCode] invalid symbols"
                      );
                    }
                    if (br.readBits(1)) {
                      code_lengths[symbols[2]] = 3;
                      code_lengths[symbols[3]] = 3;
                    } else {
                      code_lengths[symbols[0]] = 2;
                    }
                    break;
                }
              } else {
                var i3;
                var code_length_code_lengths = new Uint8Array(
                  CODE_LENGTH_CODES
                );
                var space = 32;
                var num_codes = 0;
                var huff = [
                  new HuffmanCode(2, 0),
                  new HuffmanCode(2, 4),
                  new HuffmanCode(2, 3),
                  new HuffmanCode(3, 2),
                  new HuffmanCode(2, 0),
                  new HuffmanCode(2, 4),
                  new HuffmanCode(2, 3),
                  new HuffmanCode(4, 1),
                  new HuffmanCode(2, 0),
                  new HuffmanCode(2, 4),
                  new HuffmanCode(2, 3),
                  new HuffmanCode(3, 2),
                  new HuffmanCode(2, 0),
                  new HuffmanCode(2, 4),
                  new HuffmanCode(2, 3),
                  new HuffmanCode(4, 5)
                ];
                for (i3 = simple_code_or_skip; i3 < CODE_LENGTH_CODES && space > 0; ++i3) {
                  var code_len_idx = kCodeLengthCodeOrder[i3];
                  var p4 = 0;
                  var v3;
                  br.fillBitWindow();
                  p4 += br.val_ >>> br.bit_pos_ & 15;
                  br.bit_pos_ += huff[p4].bits;
                  v3 = huff[p4].value;
                  code_length_code_lengths[code_len_idx] = v3;
                  if (v3 !== 0) {
                    space -= 32 >> v3;
                    ++num_codes;
                  }
                }
                if (!(num_codes === 1 || space === 0))
                  throw new Error(
                    "[ReadHuffmanCode] invalid num_codes or space"
                  );
                ReadHuffmanCodeLengths(
                  code_length_code_lengths,
                  alphabet_size,
                  code_lengths,
                  br
                );
              }
              table_size = BrotliBuildHuffmanTable(
                tables,
                table,
                HUFFMAN_TABLE_BITS,
                code_lengths,
                alphabet_size
              );
              if (table_size === 0) {
                throw new Error(
                  "[ReadHuffmanCode] BuildHuffmanTable failed: "
                );
              }
              return table_size;
            }
            function ReadBlockLength(table, index2, br) {
              var code;
              var nbits;
              code = ReadSymbol(table, index2, br);
              nbits = Prefix.kBlockLengthPrefixCode[code].nbits;
              return Prefix.kBlockLengthPrefixCode[code].offset + br.readBits(nbits);
            }
            function TranslateShortCodes(code, ringbuffer, index2) {
              var val;
              if (code < NUM_DISTANCE_SHORT_CODES) {
                index2 += kDistanceShortCodeIndexOffset[code];
                index2 &= 3;
                val = ringbuffer[index2] + kDistanceShortCodeValueOffset[code];
              } else {
                val = code - NUM_DISTANCE_SHORT_CODES + 1;
              }
              return val;
            }
            function MoveToFront(v3, index2) {
              var value = v3[index2];
              var i3 = index2;
              for (; i3; --i3) v3[i3] = v3[i3 - 1];
              v3[0] = value;
            }
            function InverseMoveToFrontTransform(v3, v_len) {
              var mtf = new Uint8Array(256);
              var i3;
              for (i3 = 0; i3 < 256; ++i3) {
                mtf[i3] = i3;
              }
              for (i3 = 0; i3 < v_len; ++i3) {
                var index2 = v3[i3];
                v3[i3] = mtf[index2];
                if (index2) MoveToFront(mtf, index2);
              }
            }
            function HuffmanTreeGroup(alphabet_size, num_htrees) {
              this.alphabet_size = alphabet_size;
              this.num_htrees = num_htrees;
              this.codes = new Array(
                num_htrees + num_htrees * kMaxHuffmanTableSize[alphabet_size + 31 >>> 5]
              );
              this.htrees = new Uint32Array(num_htrees);
            }
            HuffmanTreeGroup.prototype.decode = function(br) {
              var i3;
              var table_size;
              var next = 0;
              for (i3 = 0; i3 < this.num_htrees; ++i3) {
                this.htrees[i3] = next;
                table_size = ReadHuffmanCode(
                  this.alphabet_size,
                  this.codes,
                  next,
                  br
                );
                next += table_size;
              }
            };
            function DecodeContextMap(context_map_size, br) {
              var out = { num_htrees: null, context_map: null };
              var use_rle_for_zeros;
              var max_run_length_prefix = 0;
              var table;
              var i3;
              br.readMoreInput();
              var num_htrees = out.num_htrees = DecodeVarLenUint8(br) + 1;
              var context_map = out.context_map = new Uint8Array(
                context_map_size
              );
              if (num_htrees <= 1) {
                return out;
              }
              use_rle_for_zeros = br.readBits(1);
              if (use_rle_for_zeros) {
                max_run_length_prefix = br.readBits(4) + 1;
              }
              table = [];
              for (i3 = 0; i3 < HUFFMAN_MAX_TABLE_SIZE; i3++) {
                table[i3] = new HuffmanCode(0, 0);
              }
              ReadHuffmanCode(
                num_htrees + max_run_length_prefix,
                table,
                0,
                br
              );
              for (i3 = 0; i3 < context_map_size; ) {
                var code;
                br.readMoreInput();
                code = ReadSymbol(table, 0, br);
                if (code === 0) {
                  context_map[i3] = 0;
                  ++i3;
                } else if (code <= max_run_length_prefix) {
                  var reps = 1 + (1 << code) + br.readBits(code);
                  while (--reps) {
                    if (i3 >= context_map_size) {
                      throw new Error(
                        "[DecodeContextMap] i >= context_map_size"
                      );
                    }
                    context_map[i3] = 0;
                    ++i3;
                  }
                } else {
                  context_map[i3] = code - max_run_length_prefix;
                  ++i3;
                }
              }
              if (br.readBits(1)) {
                InverseMoveToFrontTransform(
                  context_map,
                  context_map_size
                );
              }
              return out;
            }
            function DecodeBlockType(max_block_type, trees, tree_type, block_types, ringbuffers, indexes, br) {
              var ringbuffer = tree_type * 2;
              var index2 = tree_type;
              var type_code = ReadSymbol(
                trees,
                tree_type * HUFFMAN_MAX_TABLE_SIZE,
                br
              );
              var block_type;
              if (type_code === 0) {
                block_type = ringbuffers[ringbuffer + (indexes[index2] & 1)];
              } else if (type_code === 1) {
                block_type = ringbuffers[ringbuffer + (indexes[index2] - 1 & 1)] + 1;
              } else {
                block_type = type_code - 2;
              }
              if (block_type >= max_block_type) {
                block_type -= max_block_type;
              }
              block_types[tree_type] = block_type;
              ringbuffers[ringbuffer + (indexes[index2] & 1)] = block_type;
              ++indexes[index2];
            }
            function CopyUncompressedBlockToOutput(output, len, pos, ringbuffer, ringbuffer_mask, br) {
              var rb_size = ringbuffer_mask + 1;
              var rb_pos = pos & ringbuffer_mask;
              var br_pos = br.pos_ & BrotliBitReader.IBUF_MASK;
              var nbytes;
              if (len < 8 || br.bit_pos_ + (len << 3) < br.bit_end_pos_) {
                while (len-- > 0) {
                  br.readMoreInput();
                  ringbuffer[rb_pos++] = br.readBits(8);
                  if (rb_pos === rb_size) {
                    output.write(ringbuffer, rb_size);
                    rb_pos = 0;
                  }
                }
                return;
              }
              if (br.bit_end_pos_ < 32) {
                throw new Error(
                  "[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32"
                );
              }
              while (br.bit_pos_ < 32) {
                ringbuffer[rb_pos] = br.val_ >>> br.bit_pos_;
                br.bit_pos_ += 8;
                ++rb_pos;
                --len;
              }
              nbytes = br.bit_end_pos_ - br.bit_pos_ >> 3;
              if (br_pos + nbytes > BrotliBitReader.IBUF_MASK) {
                var tail = BrotliBitReader.IBUF_MASK + 1 - br_pos;
                for (var x2 = 0; x2 < tail; x2++)
                  ringbuffer[rb_pos + x2] = br.buf_[br_pos + x2];
                nbytes -= tail;
                rb_pos += tail;
                len -= tail;
                br_pos = 0;
              }
              for (var x2 = 0; x2 < nbytes; x2++)
                ringbuffer[rb_pos + x2] = br.buf_[br_pos + x2];
              rb_pos += nbytes;
              len -= nbytes;
              if (rb_pos >= rb_size) {
                output.write(ringbuffer, rb_size);
                rb_pos -= rb_size;
                for (var x2 = 0; x2 < rb_pos; x2++)
                  ringbuffer[x2] = ringbuffer[rb_size + x2];
              }
              while (rb_pos + len >= rb_size) {
                nbytes = rb_size - rb_pos;
                if (br.input_.read(ringbuffer, rb_pos, nbytes) < nbytes) {
                  throw new Error(
                    "[CopyUncompressedBlockToOutput] not enough bytes"
                  );
                }
                output.write(ringbuffer, rb_size);
                len -= nbytes;
                rb_pos = 0;
              }
              if (br.input_.read(ringbuffer, rb_pos, len) < len) {
                throw new Error(
                  "[CopyUncompressedBlockToOutput] not enough bytes"
                );
              }
              br.reset();
            }
            function JumpToByteBoundary(br) {
              var new_bit_pos = br.bit_pos_ + 7 & ~7;
              var pad_bits = br.readBits(new_bit_pos - br.bit_pos_);
              return pad_bits == 0;
            }
            function BrotliDecompressedSize(buffer) {
              var input = new BrotliInput(buffer);
              var br = new BrotliBitReader(input);
              DecodeWindowBits(br);
              var out = DecodeMetaBlockLength(br);
              return out.meta_block_length;
            }
            exports2.BrotliDecompressedSize = BrotliDecompressedSize;
            function BrotliDecompressBuffer(buffer, output_size) {
              var input = new BrotliInput(buffer);
              if (output_size == null) {
                output_size = BrotliDecompressedSize(buffer);
              }
              var output_buffer = new Uint8Array(output_size);
              var output = new BrotliOutput(output_buffer);
              BrotliDecompress(input, output);
              if (output.pos < output.buffer.length) {
                output.buffer = output.buffer.subarray(
                  0,
                  output.pos
                );
              }
              return output.buffer;
            }
            exports2.BrotliDecompressBuffer = BrotliDecompressBuffer;
            function BrotliDecompress(input, output) {
              var i3;
              var pos = 0;
              var input_end = 0;
              var window_bits = 0;
              var max_backward_distance;
              var max_distance = 0;
              var ringbuffer_size;
              var ringbuffer_mask;
              var ringbuffer;
              var ringbuffer_end;
              var dist_rb = [16, 15, 11, 4];
              var dist_rb_idx = 0;
              var prev_byte1 = 0;
              var prev_byte2 = 0;
              var hgroup = [
                new HuffmanTreeGroup(0, 0),
                new HuffmanTreeGroup(0, 0),
                new HuffmanTreeGroup(0, 0)
              ];
              var block_type_trees;
              var block_len_trees;
              var br;
              var kRingBufferWriteAheadSlack = 128 + BrotliBitReader.READ_SIZE;
              br = new BrotliBitReader(input);
              window_bits = DecodeWindowBits(br);
              max_backward_distance = (1 << window_bits) - 16;
              ringbuffer_size = 1 << window_bits;
              ringbuffer_mask = ringbuffer_size - 1;
              ringbuffer = new Uint8Array(
                ringbuffer_size + kRingBufferWriteAheadSlack + BrotliDictionary.maxDictionaryWordLength
              );
              ringbuffer_end = ringbuffer_size;
              block_type_trees = [];
              block_len_trees = [];
              for (var x2 = 0; x2 < 3 * HUFFMAN_MAX_TABLE_SIZE; x2++) {
                block_type_trees[x2] = new HuffmanCode(0, 0);
                block_len_trees[x2] = new HuffmanCode(0, 0);
              }
              while (!input_end) {
                var meta_block_remaining_len = 0;
                var is_uncompressed;
                var block_length = [1 << 28, 1 << 28, 1 << 28];
                var block_type = [0];
                var num_block_types = [1, 1, 1];
                var block_type_rb = [0, 1, 0, 1, 0, 1];
                var block_type_rb_index = [0];
                var distance_postfix_bits;
                var num_direct_distance_codes;
                var distance_postfix_mask;
                var num_distance_codes;
                var context_map = null;
                var context_modes = null;
                var num_literal_htrees;
                var dist_context_map = null;
                var num_dist_htrees;
                var context_offset = 0;
                var context_map_slice = null;
                var literal_htree_index = 0;
                var dist_context_offset = 0;
                var dist_context_map_slice = null;
                var dist_htree_index = 0;
                var context_lookup_offset1 = 0;
                var context_lookup_offset2 = 0;
                var context_mode;
                var htree_command;
                for (i3 = 0; i3 < 3; ++i3) {
                  hgroup[i3].codes = null;
                  hgroup[i3].htrees = null;
                }
                br.readMoreInput();
                var _out = DecodeMetaBlockLength(br);
                meta_block_remaining_len = _out.meta_block_length;
                if (pos + meta_block_remaining_len > output.buffer.length) {
                  var tmp = new Uint8Array(
                    pos + meta_block_remaining_len
                  );
                  tmp.set(output.buffer);
                  output.buffer = tmp;
                }
                input_end = _out.input_end;
                is_uncompressed = _out.is_uncompressed;
                if (_out.is_metadata) {
                  JumpToByteBoundary(br);
                  for (; meta_block_remaining_len > 0; --meta_block_remaining_len) {
                    br.readMoreInput();
                    br.readBits(8);
                  }
                  continue;
                }
                if (meta_block_remaining_len === 0) {
                  continue;
                }
                if (is_uncompressed) {
                  br.bit_pos_ = br.bit_pos_ + 7 & ~7;
                  CopyUncompressedBlockToOutput(
                    output,
                    meta_block_remaining_len,
                    pos,
                    ringbuffer,
                    ringbuffer_mask,
                    br
                  );
                  pos += meta_block_remaining_len;
                  continue;
                }
                for (i3 = 0; i3 < 3; ++i3) {
                  num_block_types[i3] = DecodeVarLenUint8(br) + 1;
                  if (num_block_types[i3] >= 2) {
                    ReadHuffmanCode(
                      num_block_types[i3] + 2,
                      block_type_trees,
                      i3 * HUFFMAN_MAX_TABLE_SIZE,
                      br
                    );
                    ReadHuffmanCode(
                      kNumBlockLengthCodes,
                      block_len_trees,
                      i3 * HUFFMAN_MAX_TABLE_SIZE,
                      br
                    );
                    block_length[i3] = ReadBlockLength(
                      block_len_trees,
                      i3 * HUFFMAN_MAX_TABLE_SIZE,
                      br
                    );
                    block_type_rb_index[i3] = 1;
                  }
                }
                br.readMoreInput();
                distance_postfix_bits = br.readBits(2);
                num_direct_distance_codes = NUM_DISTANCE_SHORT_CODES + (br.readBits(4) << distance_postfix_bits);
                distance_postfix_mask = (1 << distance_postfix_bits) - 1;
                num_distance_codes = num_direct_distance_codes + (48 << distance_postfix_bits);
                context_modes = new Uint8Array(
                  num_block_types[0]
                );
                for (i3 = 0; i3 < num_block_types[0]; ++i3) {
                  br.readMoreInput();
                  context_modes[i3] = br.readBits(2) << 1;
                }
                var _o1 = DecodeContextMap(
                  num_block_types[0] << kLiteralContextBits,
                  br
                );
                num_literal_htrees = _o1.num_htrees;
                context_map = _o1.context_map;
                var _o2 = DecodeContextMap(
                  num_block_types[2] << kDistanceContextBits,
                  br
                );
                num_dist_htrees = _o2.num_htrees;
                dist_context_map = _o2.context_map;
                hgroup[0] = new HuffmanTreeGroup(
                  kNumLiteralCodes,
                  num_literal_htrees
                );
                hgroup[1] = new HuffmanTreeGroup(
                  kNumInsertAndCopyCodes,
                  num_block_types[1]
                );
                hgroup[2] = new HuffmanTreeGroup(
                  num_distance_codes,
                  num_dist_htrees
                );
                for (i3 = 0; i3 < 3; ++i3) {
                  hgroup[i3].decode(br);
                }
                context_map_slice = 0;
                dist_context_map_slice = 0;
                context_mode = context_modes[block_type[0]];
                context_lookup_offset1 = Context.lookupOffsets[context_mode];
                context_lookup_offset2 = Context.lookupOffsets[context_mode + 1];
                htree_command = hgroup[1].htrees[0];
                while (meta_block_remaining_len > 0) {
                  var cmd_code;
                  var range_idx;
                  var insert_code;
                  var copy_code;
                  var insert_length;
                  var copy_length;
                  var distance_code;
                  var distance;
                  var context;
                  var j2;
                  var copy_dst;
                  br.readMoreInput();
                  if (block_length[1] === 0) {
                    DecodeBlockType(
                      num_block_types[1],
                      block_type_trees,
                      1,
                      block_type,
                      block_type_rb,
                      block_type_rb_index,
                      br
                    );
                    block_length[1] = ReadBlockLength(
                      block_len_trees,
                      HUFFMAN_MAX_TABLE_SIZE,
                      br
                    );
                    htree_command = hgroup[1].htrees[block_type[1]];
                  }
                  --block_length[1];
                  cmd_code = ReadSymbol(
                    hgroup[1].codes,
                    htree_command,
                    br
                  );
                  range_idx = cmd_code >> 6;
                  if (range_idx >= 2) {
                    range_idx -= 2;
                    distance_code = -1;
                  } else {
                    distance_code = 0;
                  }
                  insert_code = Prefix.kInsertRangeLut[range_idx] + (cmd_code >> 3 & 7);
                  copy_code = Prefix.kCopyRangeLut[range_idx] + (cmd_code & 7);
                  insert_length = Prefix.kInsertLengthPrefixCode[insert_code].offset + br.readBits(
                    Prefix.kInsertLengthPrefixCode[insert_code].nbits
                  );
                  copy_length = Prefix.kCopyLengthPrefixCode[copy_code].offset + br.readBits(
                    Prefix.kCopyLengthPrefixCode[copy_code].nbits
                  );
                  prev_byte1 = ringbuffer[pos - 1 & ringbuffer_mask];
                  prev_byte2 = ringbuffer[pos - 2 & ringbuffer_mask];
                  for (j2 = 0; j2 < insert_length; ++j2) {
                    br.readMoreInput();
                    if (block_length[0] === 0) {
                      DecodeBlockType(
                        num_block_types[0],
                        block_type_trees,
                        0,
                        block_type,
                        block_type_rb,
                        block_type_rb_index,
                        br
                      );
                      block_length[0] = ReadBlockLength(
                        block_len_trees,
                        0,
                        br
                      );
                      context_offset = block_type[0] << kLiteralContextBits;
                      context_map_slice = context_offset;
                      context_mode = context_modes[block_type[0]];
                      context_lookup_offset1 = Context.lookupOffsets[context_mode];
                      context_lookup_offset2 = Context.lookupOffsets[context_mode + 1];
                    }
                    context = Context.lookup[context_lookup_offset1 + prev_byte1] | Context.lookup[context_lookup_offset2 + prev_byte2];
                    literal_htree_index = context_map[context_map_slice + context];
                    --block_length[0];
                    prev_byte2 = prev_byte1;
                    prev_byte1 = ReadSymbol(
                      hgroup[0].codes,
                      hgroup[0].htrees[literal_htree_index],
                      br
                    );
                    ringbuffer[pos & ringbuffer_mask] = prev_byte1;
                    if ((pos & ringbuffer_mask) === ringbuffer_mask) {
                      output.write(
                        ringbuffer,
                        ringbuffer_size
                      );
                    }
                    ++pos;
                  }
                  meta_block_remaining_len -= insert_length;
                  if (meta_block_remaining_len <= 0) break;
                  if (distance_code < 0) {
                    var context;
                    br.readMoreInput();
                    if (block_length[2] === 0) {
                      DecodeBlockType(
                        num_block_types[2],
                        block_type_trees,
                        2,
                        block_type,
                        block_type_rb,
                        block_type_rb_index,
                        br
                      );
                      block_length[2] = ReadBlockLength(
                        block_len_trees,
                        2 * HUFFMAN_MAX_TABLE_SIZE,
                        br
                      );
                      dist_context_offset = block_type[2] << kDistanceContextBits;
                      dist_context_map_slice = dist_context_offset;
                    }
                    --block_length[2];
                    context = (copy_length > 4 ? 3 : copy_length - 2) & 255;
                    dist_htree_index = dist_context_map[dist_context_map_slice + context];
                    distance_code = ReadSymbol(
                      hgroup[2].codes,
                      hgroup[2].htrees[dist_htree_index],
                      br
                    );
                    if (distance_code >= num_direct_distance_codes) {
                      var nbits;
                      var postfix;
                      var offset3;
                      distance_code -= num_direct_distance_codes;
                      postfix = distance_code & distance_postfix_mask;
                      distance_code >>= distance_postfix_bits;
                      nbits = (distance_code >> 1) + 1;
                      offset3 = (2 + (distance_code & 1) << nbits) - 4;
                      distance_code = num_direct_distance_codes + (offset3 + br.readBits(nbits) << distance_postfix_bits) + postfix;
                    }
                  }
                  distance = TranslateShortCodes(
                    distance_code,
                    dist_rb,
                    dist_rb_idx
                  );
                  if (distance < 0) {
                    throw new Error(
                      "[BrotliDecompress] invalid distance"
                    );
                  }
                  if (pos < max_backward_distance && max_distance !== max_backward_distance) {
                    max_distance = pos;
                  } else {
                    max_distance = max_backward_distance;
                  }
                  copy_dst = pos & ringbuffer_mask;
                  if (distance > max_distance) {
                    if (copy_length >= BrotliDictionary.minDictionaryWordLength && copy_length <= BrotliDictionary.maxDictionaryWordLength) {
                      var offset3 = BrotliDictionary.offsetsByLength[copy_length];
                      var word_id = distance - max_distance - 1;
                      var shift3 = BrotliDictionary.sizeBitsByLength[copy_length];
                      var mask = (1 << shift3) - 1;
                      var word_idx = word_id & mask;
                      var transform_idx = word_id >> shift3;
                      offset3 += word_idx * copy_length;
                      if (transform_idx < Transform.kNumTransforms) {
                        var len = Transform.transformDictionaryWord(
                          ringbuffer,
                          copy_dst,
                          offset3,
                          copy_length,
                          transform_idx
                        );
                        copy_dst += len;
                        pos += len;
                        meta_block_remaining_len -= len;
                        if (copy_dst >= ringbuffer_end) {
                          output.write(
                            ringbuffer,
                            ringbuffer_size
                          );
                          for (var _x44 = 0; _x44 < copy_dst - ringbuffer_end; _x44++)
                            ringbuffer[_x44] = ringbuffer[ringbuffer_end + _x44];
                        }
                      } else {
                        throw new Error(
                          "Invalid backward reference. pos: " + pos + " distance: " + distance + " len: " + copy_length + " bytes left: " + meta_block_remaining_len
                        );
                      }
                    } else {
                      throw new Error(
                        "Invalid backward reference. pos: " + pos + " distance: " + distance + " len: " + copy_length + " bytes left: " + meta_block_remaining_len
                      );
                    }
                  } else {
                    if (distance_code > 0) {
                      dist_rb[dist_rb_idx & 3] = distance;
                      ++dist_rb_idx;
                    }
                    if (copy_length > meta_block_remaining_len) {
                      throw new Error(
                        "Invalid backward reference. pos: " + pos + " distance: " + distance + " len: " + copy_length + " bytes left: " + meta_block_remaining_len
                      );
                    }
                    for (j2 = 0; j2 < copy_length; ++j2) {
                      ringbuffer[pos & ringbuffer_mask] = ringbuffer[pos - distance & ringbuffer_mask];
                      if ((pos & ringbuffer_mask) === ringbuffer_mask) {
                        output.write(
                          ringbuffer,
                          ringbuffer_size
                        );
                      }
                      ++pos;
                      --meta_block_remaining_len;
                    }
                  }
                  prev_byte1 = ringbuffer[pos - 1 & ringbuffer_mask];
                  prev_byte2 = ringbuffer[pos - 2 & ringbuffer_mask];
                }
                pos &= 1073741823;
              }
              output.write(ringbuffer, pos & ringbuffer_mask);
            }
            exports2.BrotliDecompress = BrotliDecompress;
            BrotliDictionary.init();
          },
          {
            "./bit_reader": 1,
            "./context": 2,
            "./dictionary": 6,
            "./huffman": 7,
            "./prefix": 9,
            "./streams": 10,
            "./transform": 11
          }
        ],
        4: [
          function(require2, module2, exports2) {
            var base64 = require2("base64-js");
            exports2.init = function() {
              var BrotliDecompressBuffer = require2("./decode").BrotliDecompressBuffer;
              var compressed = base64.toByteArray(
                require2("./dictionary.bin.js")
              );
              return BrotliDecompressBuffer(compressed);
            };
          },
          { "./decode": 3, "./dictionary.bin.js": 5, "base64-js": 8 }
        ],
        5: [
          function(require2, module2, exports2) {
            module2.exports = "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=";
          },
          {}
        ],
        6: [
          function(require2, module2, exports2) {
            var data = require2("./dictionary-browser");
            exports2.init = function() {
              exports2.dictionary = data.init();
            };
            exports2.offsetsByLength = new Uint32Array([
              0,
              0,
              0,
              0,
              0,
              4096,
              9216,
              21504,
              35840,
              44032,
              53248,
              63488,
              74752,
              87040,
              93696,
              100864,
              104704,
              106752,
              108928,
              113536,
              115968,
              118528,
              119872,
              121280,
              122016
            ]);
            exports2.sizeBitsByLength = new Uint8Array([
              0,
              0,
              0,
              0,
              10,
              10,
              11,
              11,
              10,
              10,
              10,
              10,
              10,
              9,
              9,
              8,
              7,
              7,
              8,
              7,
              7,
              6,
              6,
              5,
              5
            ]);
            exports2.minDictionaryWordLength = 4;
            exports2.maxDictionaryWordLength = 24;
          },
          { "./dictionary-browser": 4 }
        ],
        7: [
          function(require2, module2, exports2) {
            function HuffmanCode(bits, value) {
              this.bits = bits;
              this.value = value;
            }
            exports2.HuffmanCode = HuffmanCode;
            var MAX_LENGTH = 15;
            function GetNextKey(key, len) {
              var step = 1 << len - 1;
              while (key & step) {
                step >>= 1;
              }
              return (key & step - 1) + step;
            }
            function ReplicateValue(table, i3, step, end, code) {
              do {
                end -= step;
                table[i3 + end] = new HuffmanCode(
                  code.bits,
                  code.value
                );
              } while (end > 0);
            }
            function NextTableBitSize(count, len, root_bits) {
              var left = 1 << len - root_bits;
              while (len < MAX_LENGTH) {
                left -= count[len];
                if (left <= 0) break;
                ++len;
                left <<= 1;
              }
              return len - root_bits;
            }
            exports2.BrotliBuildHuffmanTable = function(root_table, table, root_bits, code_lengths, code_lengths_size) {
              var start_table = table;
              var code;
              var len;
              var symbol;
              var key;
              var step;
              var low;
              var mask;
              var table_bits;
              var table_size;
              var total_size;
              var sorted;
              var count = new Int32Array(
                MAX_LENGTH + 1
              );
              var offset3 = new Int32Array(
                MAX_LENGTH + 1
              );
              sorted = new Int32Array(code_lengths_size);
              for (symbol = 0; symbol < code_lengths_size; symbol++) {
                count[code_lengths[symbol]]++;
              }
              offset3[1] = 0;
              for (len = 1; len < MAX_LENGTH; len++) {
                offset3[len + 1] = offset3[len] + count[len];
              }
              for (symbol = 0; symbol < code_lengths_size; symbol++) {
                if (code_lengths[symbol] !== 0) {
                  sorted[offset3[code_lengths[symbol]]++] = symbol;
                }
              }
              table_bits = root_bits;
              table_size = 1 << table_bits;
              total_size = table_size;
              if (offset3[MAX_LENGTH] === 1) {
                for (key = 0; key < total_size; ++key) {
                  root_table[table + key] = new HuffmanCode(
                    0,
                    sorted[0] & 65535
                  );
                }
                return total_size;
              }
              key = 0;
              symbol = 0;
              for (len = 1, step = 2; len <= root_bits; ++len, step <<= 1) {
                for (; count[len] > 0; --count[len]) {
                  code = new HuffmanCode(
                    len & 255,
                    sorted[symbol++] & 65535
                  );
                  ReplicateValue(
                    root_table,
                    table + key,
                    step,
                    table_size,
                    code
                  );
                  key = GetNextKey(key, len);
                }
              }
              mask = total_size - 1;
              low = -1;
              for (len = root_bits + 1, step = 2; len <= MAX_LENGTH; ++len, step <<= 1) {
                for (; count[len] > 0; --count[len]) {
                  if ((key & mask) !== low) {
                    table += table_size;
                    table_bits = NextTableBitSize(
                      count,
                      len,
                      root_bits
                    );
                    table_size = 1 << table_bits;
                    total_size += table_size;
                    low = key & mask;
                    root_table[start_table + low] = new HuffmanCode(
                      table_bits + root_bits & 255,
                      table - start_table - low & 65535
                    );
                  }
                  code = new HuffmanCode(
                    len - root_bits & 255,
                    sorted[symbol++] & 65535
                  );
                  ReplicateValue(
                    root_table,
                    table + (key >> root_bits),
                    step,
                    table_size,
                    code
                  );
                  key = GetNextKey(key, len);
                }
              }
              return total_size;
            };
          },
          {}
        ],
        8: [
          function(require2, module2, exports2) {
            "use strict";
            exports2.byteLength = byteLength;
            exports2.toByteArray = toByteArray;
            exports2.fromByteArray = fromByteArray;
            var lookup = [];
            var revLookup = [];
            var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
            var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
            for (var i3 = 0, len = code.length; i3 < len; ++i3) {
              lookup[i3] = code[i3];
              revLookup[code.charCodeAt(i3)] = i3;
            }
            revLookup["-".charCodeAt(0)] = 62;
            revLookup["_".charCodeAt(0)] = 63;
            function getLens(b64) {
              var len2 = b64.length;
              if (len2 % 4 > 0) {
                throw new Error(
                  "Invalid string. Length must be a multiple of 4"
                );
              }
              var validLen = b64.indexOf("=");
              if (validLen === -1) validLen = len2;
              var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;
              return [validLen, placeHoldersLen];
            }
            function byteLength(b64) {
              var lens = getLens(b64);
              var validLen = lens[0];
              var placeHoldersLen = lens[1];
              return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
            }
            function _byteLength(b64, validLen, placeHoldersLen) {
              return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
            }
            function toByteArray(b64) {
              var tmp;
              var lens = getLens(b64);
              var validLen = lens[0];
              var placeHoldersLen = lens[1];
              var arr = new Arr(
                _byteLength(b64, validLen, placeHoldersLen)
              );
              var curByte = 0;
              var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen;
              for (var i22 = 0; i22 < len2; i22 += 4) {
                tmp = revLookup[b64.charCodeAt(i22)] << 18 | revLookup[b64.charCodeAt(i22 + 1)] << 12 | revLookup[b64.charCodeAt(i22 + 2)] << 6 | revLookup[b64.charCodeAt(i22 + 3)];
                arr[curByte++] = tmp >> 16 & 255;
                arr[curByte++] = tmp >> 8 & 255;
                arr[curByte++] = tmp & 255;
              }
              if (placeHoldersLen === 2) {
                tmp = revLookup[b64.charCodeAt(i22)] << 2 | revLookup[b64.charCodeAt(i22 + 1)] >> 4;
                arr[curByte++] = tmp & 255;
              }
              if (placeHoldersLen === 1) {
                tmp = revLookup[b64.charCodeAt(i22)] << 10 | revLookup[b64.charCodeAt(i22 + 1)] << 4 | revLookup[b64.charCodeAt(i22 + 2)] >> 2;
                arr[curByte++] = tmp >> 8 & 255;
                arr[curByte++] = tmp & 255;
              }
              return arr;
            }
            function tripletToBase64(num) {
              return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
            }
            function encodeChunk(uint8, start2, end) {
              var tmp;
              var output = [];
              for (var i22 = start2; i22 < end; i22 += 3) {
                tmp = (uint8[i22] << 16 & 16711680) + (uint8[i22 + 1] << 8 & 65280) + (uint8[i22 + 2] & 255);
                output.push(tripletToBase64(tmp));
              }
              return output.join("");
            }
            function fromByteArray(uint8) {
              var tmp;
              var len2 = uint8.length;
              var extraBytes = len2 % 3;
              var parts = [];
              var maxChunkLength = 16383;
              for (var i22 = 0, len22 = len2 - extraBytes; i22 < len22; i22 += maxChunkLength) {
                parts.push(
                  encodeChunk(
                    uint8,
                    i22,
                    i22 + maxChunkLength > len22 ? len22 : i22 + maxChunkLength
                  )
                );
              }
              if (extraBytes === 1) {
                tmp = uint8[len2 - 1];
                parts.push(
                  lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "=="
                );
              } else if (extraBytes === 2) {
                tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1];
                parts.push(
                  lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "="
                );
              }
              return parts.join("");
            }
          },
          {}
        ],
        9: [
          function(require2, module2, exports2) {
            function PrefixCodeRange(offset3, nbits) {
              this.offset = offset3;
              this.nbits = nbits;
            }
            exports2.kBlockLengthPrefixCode = [
              new PrefixCodeRange(1, 2),
              new PrefixCodeRange(5, 2),
              new PrefixCodeRange(9, 2),
              new PrefixCodeRange(13, 2),
              new PrefixCodeRange(17, 3),
              new PrefixCodeRange(25, 3),
              new PrefixCodeRange(33, 3),
              new PrefixCodeRange(41, 3),
              new PrefixCodeRange(49, 4),
              new PrefixCodeRange(65, 4),
              new PrefixCodeRange(81, 4),
              new PrefixCodeRange(97, 4),
              new PrefixCodeRange(113, 5),
              new PrefixCodeRange(145, 5),
              new PrefixCodeRange(177, 5),
              new PrefixCodeRange(209, 5),
              new PrefixCodeRange(241, 6),
              new PrefixCodeRange(305, 6),
              new PrefixCodeRange(369, 7),
              new PrefixCodeRange(497, 8),
              new PrefixCodeRange(753, 9),
              new PrefixCodeRange(1265, 10),
              new PrefixCodeRange(2289, 11),
              new PrefixCodeRange(4337, 12),
              new PrefixCodeRange(8433, 13),
              new PrefixCodeRange(16625, 24)
            ];
            exports2.kInsertLengthPrefixCode = [
              new PrefixCodeRange(0, 0),
              new PrefixCodeRange(1, 0),
              new PrefixCodeRange(2, 0),
              new PrefixCodeRange(3, 0),
              new PrefixCodeRange(4, 0),
              new PrefixCodeRange(5, 0),
              new PrefixCodeRange(6, 1),
              new PrefixCodeRange(8, 1),
              new PrefixCodeRange(10, 2),
              new PrefixCodeRange(14, 2),
              new PrefixCodeRange(18, 3),
              new PrefixCodeRange(26, 3),
              new PrefixCodeRange(34, 4),
              new PrefixCodeRange(50, 4),
              new PrefixCodeRange(66, 5),
              new PrefixCodeRange(98, 5),
              new PrefixCodeRange(130, 6),
              new PrefixCodeRange(194, 7),
              new PrefixCodeRange(322, 8),
              new PrefixCodeRange(578, 9),
              new PrefixCodeRange(1090, 10),
              new PrefixCodeRange(2114, 12),
              new PrefixCodeRange(6210, 14),
              new PrefixCodeRange(22594, 24)
            ];
            exports2.kCopyLengthPrefixCode = [
              new PrefixCodeRange(2, 0),
              new PrefixCodeRange(3, 0),
              new PrefixCodeRange(4, 0),
              new PrefixCodeRange(5, 0),
              new PrefixCodeRange(6, 0),
              new PrefixCodeRange(7, 0),
              new PrefixCodeRange(8, 0),
              new PrefixCodeRange(9, 0),
              new PrefixCodeRange(10, 1),
              new PrefixCodeRange(12, 1),
              new PrefixCodeRange(14, 2),
              new PrefixCodeRange(18, 2),
              new PrefixCodeRange(22, 3),
              new PrefixCodeRange(30, 3),
              new PrefixCodeRange(38, 4),
              new PrefixCodeRange(54, 4),
              new PrefixCodeRange(70, 5),
              new PrefixCodeRange(102, 5),
              new PrefixCodeRange(134, 6),
              new PrefixCodeRange(198, 7),
              new PrefixCodeRange(326, 8),
              new PrefixCodeRange(582, 9),
              new PrefixCodeRange(1094, 10),
              new PrefixCodeRange(2118, 24)
            ];
            exports2.kInsertRangeLut = [0, 0, 8, 8, 0, 16, 8, 16, 16];
            exports2.kCopyRangeLut = [0, 8, 0, 8, 16, 0, 16, 8, 16];
          },
          {}
        ],
        10: [
          function(require2, module2, exports2) {
            function BrotliInput(buffer) {
              this.buffer = buffer;
              this.pos = 0;
            }
            BrotliInput.prototype.read = function(buf, i3, count) {
              if (this.pos + count > this.buffer.length) {
                count = this.buffer.length - this.pos;
              }
              for (var p4 = 0; p4 < count; p4++)
                buf[i3 + p4] = this.buffer[this.pos + p4];
              this.pos += count;
              return count;
            };
            exports2.BrotliInput = BrotliInput;
            function BrotliOutput(buf) {
              this.buffer = buf;
              this.pos = 0;
            }
            BrotliOutput.prototype.write = function(buf, count) {
              if (this.pos + count > this.buffer.length)
                throw new Error(
                  "Output buffer is not large enough"
                );
              this.buffer.set(buf.subarray(0, count), this.pos);
              this.pos += count;
              return count;
            };
            exports2.BrotliOutput = BrotliOutput;
          },
          {}
        ],
        11: [
          function(require2, module2, exports2) {
            var BrotliDictionary = require2("./dictionary");
            var kIdentity = 0;
            var kOmitLast1 = 1;
            var kOmitLast2 = 2;
            var kOmitLast3 = 3;
            var kOmitLast4 = 4;
            var kOmitLast5 = 5;
            var kOmitLast6 = 6;
            var kOmitLast7 = 7;
            var kOmitLast8 = 8;
            var kOmitLast9 = 9;
            var kUppercaseFirst = 10;
            var kUppercaseAll = 11;
            var kOmitFirst1 = 12;
            var kOmitFirst2 = 13;
            var kOmitFirst3 = 14;
            var kOmitFirst4 = 15;
            var kOmitFirst5 = 16;
            var kOmitFirst6 = 17;
            var kOmitFirst7 = 18;
            var kOmitFirst8 = 19;
            var kOmitFirst9 = 20;
            function Transform(prefix2, transform, suffix) {
              this.prefix = new Uint8Array(prefix2.length);
              this.transform = transform;
              this.suffix = new Uint8Array(suffix.length);
              for (var i3 = 0; i3 < prefix2.length; i3++)
                this.prefix[i3] = prefix2.charCodeAt(i3);
              for (var i3 = 0; i3 < suffix.length; i3++)
                this.suffix[i3] = suffix.charCodeAt(i3);
            }
            var kTransforms = [
              new Transform("", kIdentity, ""),
              new Transform("", kIdentity, " "),
              new Transform(" ", kIdentity, " "),
              new Transform("", kOmitFirst1, ""),
              new Transform("", kUppercaseFirst, " "),
              new Transform("", kIdentity, " the "),
              new Transform(" ", kIdentity, ""),
              new Transform("s ", kIdentity, " "),
              new Transform("", kIdentity, " of "),
              new Transform("", kUppercaseFirst, ""),
              new Transform("", kIdentity, " and "),
              new Transform("", kOmitFirst2, ""),
              new Transform("", kOmitLast1, ""),
              new Transform(", ", kIdentity, " "),
              new Transform("", kIdentity, ", "),
              new Transform(" ", kUppercaseFirst, " "),
              new Transform("", kIdentity, " in "),
              new Transform("", kIdentity, " to "),
              new Transform("e ", kIdentity, " "),
              new Transform("", kIdentity, '"'),
              new Transform("", kIdentity, "."),
              new Transform("", kIdentity, '">'),
              new Transform("", kIdentity, "\n"),
              new Transform("", kOmitLast3, ""),
              new Transform("", kIdentity, "]"),
              new Transform("", kIdentity, " for "),
              new Transform("", kOmitFirst3, ""),
              new Transform("", kOmitLast2, ""),
              new Transform("", kIdentity, " a "),
              new Transform("", kIdentity, " that "),
              new Transform(" ", kUppercaseFirst, ""),
              new Transform("", kIdentity, ". "),
              new Transform(".", kIdentity, ""),
              new Transform(" ", kIdentity, ", "),
              new Transform("", kOmitFirst4, ""),
              new Transform("", kIdentity, " with "),
              new Transform("", kIdentity, "'"),
              new Transform("", kIdentity, " from "),
              new Transform("", kIdentity, " by "),
              new Transform("", kOmitFirst5, ""),
              new Transform("", kOmitFirst6, ""),
              new Transform(" the ", kIdentity, ""),
              new Transform("", kOmitLast4, ""),
              new Transform("", kIdentity, ". The "),
              new Transform("", kUppercaseAll, ""),
              new Transform("", kIdentity, " on "),
              new Transform("", kIdentity, " as "),
              new Transform("", kIdentity, " is "),
              new Transform("", kOmitLast7, ""),
              new Transform("", kOmitLast1, "ing "),
              new Transform("", kIdentity, "\n	"),
              new Transform("", kIdentity, ":"),
              new Transform(" ", kIdentity, ". "),
              new Transform("", kIdentity, "ed "),
              new Transform("", kOmitFirst9, ""),
              new Transform("", kOmitFirst7, ""),
              new Transform("", kOmitLast6, ""),
              new Transform("", kIdentity, "("),
              new Transform("", kUppercaseFirst, ", "),
              new Transform("", kOmitLast8, ""),
              new Transform("", kIdentity, " at "),
              new Transform("", kIdentity, "ly "),
              new Transform(" the ", kIdentity, " of "),
              new Transform("", kOmitLast5, ""),
              new Transform("", kOmitLast9, ""),
              new Transform(" ", kUppercaseFirst, ", "),
              new Transform("", kUppercaseFirst, '"'),
              new Transform(".", kIdentity, "("),
              new Transform("", kUppercaseAll, " "),
              new Transform("", kUppercaseFirst, '">'),
              new Transform("", kIdentity, '="'),
              new Transform(" ", kIdentity, "."),
              new Transform(".com/", kIdentity, ""),
              new Transform(" the ", kIdentity, " of the "),
              new Transform("", kUppercaseFirst, "'"),
              new Transform("", kIdentity, ". This "),
              new Transform("", kIdentity, ","),
              new Transform(".", kIdentity, " "),
              new Transform("", kUppercaseFirst, "("),
              new Transform("", kUppercaseFirst, "."),
              new Transform("", kIdentity, " not "),
              new Transform(" ", kIdentity, '="'),
              new Transform("", kIdentity, "er "),
              new Transform(" ", kUppercaseAll, " "),
              new Transform("", kIdentity, "al "),
              new Transform(" ", kUppercaseAll, ""),
              new Transform("", kIdentity, "='"),
              new Transform("", kUppercaseAll, '"'),
              new Transform("", kUppercaseFirst, ". "),
              new Transform(" ", kIdentity, "("),
              new Transform("", kIdentity, "ful "),
              new Transform(" ", kUppercaseFirst, ". "),
              new Transform("", kIdentity, "ive "),
              new Transform("", kIdentity, "less "),
              new Transform("", kUppercaseAll, "'"),
              new Transform("", kIdentity, "est "),
              new Transform(" ", kUppercaseFirst, "."),
              new Transform("", kUppercaseAll, '">'),
              new Transform(" ", kIdentity, "='"),
              new Transform("", kUppercaseFirst, ","),
              new Transform("", kIdentity, "ize "),
              new Transform("", kUppercaseAll, "."),
              new Transform("\xC2\xA0", kIdentity, ""),
              new Transform(" ", kIdentity, ","),
              new Transform("", kUppercaseFirst, '="'),
              new Transform("", kUppercaseAll, '="'),
              new Transform("", kIdentity, "ous "),
              new Transform("", kUppercaseAll, ", "),
              new Transform("", kUppercaseFirst, "='"),
              new Transform(" ", kUppercaseFirst, ","),
              new Transform(" ", kUppercaseAll, '="'),
              new Transform(" ", kUppercaseAll, ", "),
              new Transform("", kUppercaseAll, ","),
              new Transform("", kUppercaseAll, "("),
              new Transform("", kUppercaseAll, ". "),
              new Transform(" ", kUppercaseAll, "."),
              new Transform("", kUppercaseAll, "='"),
              new Transform(" ", kUppercaseAll, ". "),
              new Transform(" ", kUppercaseFirst, '="'),
              new Transform(" ", kUppercaseAll, "='"),
              new Transform(" ", kUppercaseFirst, "='")
            ];
            exports2.kTransforms = kTransforms;
            exports2.kNumTransforms = kTransforms.length;
            function ToUpperCase(p4, i3) {
              if (p4[i3] < 192) {
                if (p4[i3] >= 97 && p4[i3] <= 122) {
                  p4[i3] ^= 32;
                }
                return 1;
              }
              if (p4[i3] < 224) {
                p4[i3 + 1] ^= 32;
                return 2;
              }
              p4[i3 + 2] ^= 5;
              return 3;
            }
            exports2.transformDictionaryWord = function(dst, idx, word, len, transform) {
              var prefix2 = kTransforms[transform].prefix;
              var suffix = kTransforms[transform].suffix;
              var t4 = kTransforms[transform].transform;
              var skip = t4 < kOmitFirst1 ? 0 : t4 - (kOmitFirst1 - 1);
              var i3 = 0;
              var start_idx = idx;
              var uppercase;
              if (skip > len) {
                skip = len;
              }
              var prefix_pos = 0;
              while (prefix_pos < prefix2.length) {
                dst[idx++] = prefix2[prefix_pos++];
              }
              word += skip;
              len -= skip;
              if (t4 <= kOmitLast9) {
                len -= t4;
              }
              for (i3 = 0; i3 < len; i3++) {
                dst[idx++] = BrotliDictionary.dictionary[word + i3];
              }
              uppercase = idx - len;
              if (t4 === kUppercaseFirst) {
                ToUpperCase(dst, uppercase);
              } else if (t4 === kUppercaseAll) {
                while (len > 0) {
                  var step = ToUpperCase(dst, uppercase);
                  uppercase += step;
                  len -= step;
                }
              }
              var suffix_pos = 0;
              while (suffix_pos < suffix.length) {
                dst[idx++] = suffix[suffix_pos++];
              }
              return idx - start_idx;
            };
          },
          { "./dictionary": 6 }
        ],
        12: [
          function(require2, module2, exports2) {
            module2.exports = require2("./dec/decode").BrotliDecompressBuffer;
          },
          { "./dec/decode": 3 }
        ]
      },
      {},
      [12]
    )(12);
  })();

  // packages/global-styles-ui/build-module/font-library/lib/inflate.mjs
  var __require3 = /* @__PURE__ */ ((x2) => typeof __require !== "undefined" ? __require : typeof Proxy !== "undefined" ? new Proxy(x2, {
    get: (a3, b3) => (typeof __require !== "undefined" ? __require : a3)[b3]
  }) : x2)(function(x2) {
    if (typeof __require !== "undefined") return __require.apply(this, arguments);
    throw Error('Dynamic require of "' + x2 + '" is not supported');
  });
  var inflate_default = (function() {
    var define2, module, exports;
    return (/* @__PURE__ */ (function() {
      function r4(e3, n3, t4) {
        function o4(i22, f3) {
          if (!n3[i22]) {
            if (!e3[i22]) {
              var c6 = "function" == typeof __require3 && __require3;
              if (!f3 && c6) return c6(i22, true);
              if (u3) return u3(i22, true);
              var a3 = new Error("Cannot find module '" + i22 + "'");
              throw a3.code = "MODULE_NOT_FOUND", a3;
            }
            var p4 = n3[i22] = { exports: {} };
            e3[i22][0].call(
              p4.exports,
              function(r22) {
                var n22 = e3[i22][1][r22];
                return o4(n22 || r22);
              },
              p4,
              p4.exports,
              r4,
              e3,
              n3,
              t4
            );
          }
          return n3[i22].exports;
        }
        for (var u3 = "function" == typeof __require3 && __require3, i3 = 0; i3 < t4.length; i3++)
          o4(t4[i3]);
        return o4;
      }
      return r4;
    })())(
      {
        1: [
          function(require2, module2, exports2) {
            "use strict";
            var TYPED_OK = typeof Uint8Array !== "undefined" && typeof Uint16Array !== "undefined" && typeof Int32Array !== "undefined";
            function _has(obj, key) {
              return Object.prototype.hasOwnProperty.call(obj, key);
            }
            exports2.assign = function(obj) {
              var sources = Array.prototype.slice.call(
                arguments,
                1
              );
              while (sources.length) {
                var source = sources.shift();
                if (!source) {
                  continue;
                }
                if (typeof source !== "object") {
                  throw new TypeError(
                    source + "must be non-object"
                  );
                }
                for (var p4 in source) {
                  if (_has(source, p4)) {
                    obj[p4] = source[p4];
                  }
                }
              }
              return obj;
            };
            exports2.shrinkBuf = function(buf, size3) {
              if (buf.length === size3) {
                return buf;
              }
              if (buf.subarray) {
                return buf.subarray(0, size3);
              }
              buf.length = size3;
              return buf;
            };
            var fnTyped = {
              arraySet: function(dest, src, src_offs, len, dest_offs) {
                if (src.subarray && dest.subarray) {
                  dest.set(
                    src.subarray(src_offs, src_offs + len),
                    dest_offs
                  );
                  return;
                }
                for (var i3 = 0; i3 < len; i3++) {
                  dest[dest_offs + i3] = src[src_offs + i3];
                }
              },
              // Join array of chunks to single array.
              flattenChunks: function(chunks) {
                var i3, l3, len, pos, chunk, result;
                len = 0;
                for (i3 = 0, l3 = chunks.length; i3 < l3; i3++) {
                  len += chunks[i3].length;
                }
                result = new Uint8Array(len);
                pos = 0;
                for (i3 = 0, l3 = chunks.length; i3 < l3; i3++) {
                  chunk = chunks[i3];
                  result.set(chunk, pos);
                  pos += chunk.length;
                }
                return result;
              }
            };
            var fnUntyped = {
              arraySet: function(dest, src, src_offs, len, dest_offs) {
                for (var i3 = 0; i3 < len; i3++) {
                  dest[dest_offs + i3] = src[src_offs + i3];
                }
              },
              // Join array of chunks to single array.
              flattenChunks: function(chunks) {
                return [].concat.apply([], chunks);
              }
            };
            exports2.setTyped = function(on) {
              if (on) {
                exports2.Buf8 = Uint8Array;
                exports2.Buf16 = Uint16Array;
                exports2.Buf32 = Int32Array;
                exports2.assign(exports2, fnTyped);
              } else {
                exports2.Buf8 = Array;
                exports2.Buf16 = Array;
                exports2.Buf32 = Array;
                exports2.assign(exports2, fnUntyped);
              }
            };
            exports2.setTyped(TYPED_OK);
          },
          {}
        ],
        2: [
          function(require2, module2, exports2) {
            "use strict";
            var utils = require2("./common");
            var STR_APPLY_OK = true;
            var STR_APPLY_UIA_OK = true;
            try {
              String.fromCharCode.apply(null, [0]);
            } catch (__268) {
              STR_APPLY_OK = false;
            }
            try {
              String.fromCharCode.apply(null, new Uint8Array(1));
            } catch (__268) {
              STR_APPLY_UIA_OK = false;
            }
            var _utf8len = new utils.Buf8(256);
            for (var q = 0; q < 256; q++) {
              _utf8len[q] = q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1;
            }
            _utf8len[254] = _utf8len[254] = 1;
            exports2.string2buf = function(str) {
              var buf, c6, c22, m_pos, i3, str_len = str.length, buf_len = 0;
              for (m_pos = 0; m_pos < str_len; m_pos++) {
                c6 = str.charCodeAt(m_pos);
                if ((c6 & 64512) === 55296 && m_pos + 1 < str_len) {
                  c22 = str.charCodeAt(m_pos + 1);
                  if ((c22 & 64512) === 56320) {
                    c6 = 65536 + (c6 - 55296 << 10) + (c22 - 56320);
                    m_pos++;
                  }
                }
                buf_len += c6 < 128 ? 1 : c6 < 2048 ? 2 : c6 < 65536 ? 3 : 4;
              }
              buf = new utils.Buf8(buf_len);
              for (i3 = 0, m_pos = 0; i3 < buf_len; m_pos++) {
                c6 = str.charCodeAt(m_pos);
                if ((c6 & 64512) === 55296 && m_pos + 1 < str_len) {
                  c22 = str.charCodeAt(m_pos + 1);
                  if ((c22 & 64512) === 56320) {
                    c6 = 65536 + (c6 - 55296 << 10) + (c22 - 56320);
                    m_pos++;
                  }
                }
                if (c6 < 128) {
                  buf[i3++] = c6;
                } else if (c6 < 2048) {
                  buf[i3++] = 192 | c6 >>> 6;
                  buf[i3++] = 128 | c6 & 63;
                } else if (c6 < 65536) {
                  buf[i3++] = 224 | c6 >>> 12;
                  buf[i3++] = 128 | c6 >>> 6 & 63;
                  buf[i3++] = 128 | c6 & 63;
                } else {
                  buf[i3++] = 240 | c6 >>> 18;
                  buf[i3++] = 128 | c6 >>> 12 & 63;
                  buf[i3++] = 128 | c6 >>> 6 & 63;
                  buf[i3++] = 128 | c6 & 63;
                }
              }
              return buf;
            };
            function buf2binstring(buf, len) {
              if (len < 65534) {
                if (buf.subarray && STR_APPLY_UIA_OK || !buf.subarray && STR_APPLY_OK) {
                  return String.fromCharCode.apply(
                    null,
                    utils.shrinkBuf(buf, len)
                  );
                }
              }
              var result = "";
              for (var i3 = 0; i3 < len; i3++) {
                result += String.fromCharCode(buf[i3]);
              }
              return result;
            }
            exports2.buf2binstring = function(buf) {
              return buf2binstring(buf, buf.length);
            };
            exports2.binstring2buf = function(str) {
              var buf = new utils.Buf8(str.length);
              for (var i3 = 0, len = buf.length; i3 < len; i3++) {
                buf[i3] = str.charCodeAt(i3);
              }
              return buf;
            };
            exports2.buf2string = function(buf, max2) {
              var i3, out, c6, c_len;
              var len = max2 || buf.length;
              var utf16buf = new Array(len * 2);
              for (out = 0, i3 = 0; i3 < len; ) {
                c6 = buf[i3++];
                if (c6 < 128) {
                  utf16buf[out++] = c6;
                  continue;
                }
                c_len = _utf8len[c6];
                if (c_len > 4) {
                  utf16buf[out++] = 65533;
                  i3 += c_len - 1;
                  continue;
                }
                c6 &= c_len === 2 ? 31 : c_len === 3 ? 15 : 7;
                while (c_len > 1 && i3 < len) {
                  c6 = c6 << 6 | buf[i3++] & 63;
                  c_len--;
                }
                if (c_len > 1) {
                  utf16buf[out++] = 65533;
                  continue;
                }
                if (c6 < 65536) {
                  utf16buf[out++] = c6;
                } else {
                  c6 -= 65536;
                  utf16buf[out++] = 55296 | c6 >> 10 & 1023;
                  utf16buf[out++] = 56320 | c6 & 1023;
                }
              }
              return buf2binstring(utf16buf, out);
            };
            exports2.utf8border = function(buf, max2) {
              var pos;
              max2 = max2 || buf.length;
              if (max2 > buf.length) {
                max2 = buf.length;
              }
              pos = max2 - 1;
              while (pos >= 0 && (buf[pos] & 192) === 128) {
                pos--;
              }
              if (pos < 0) {
                return max2;
              }
              if (pos === 0) {
                return max2;
              }
              return pos + _utf8len[buf[pos]] > max2 ? pos : max2;
            };
          },
          { "./common": 1 }
        ],
        3: [
          function(require2, module2, exports2) {
            "use strict";
            function adler32(adler, buf, len, pos) {
              var s1 = adler & 65535 | 0, s22 = adler >>> 16 & 65535 | 0, n3 = 0;
              while (len !== 0) {
                n3 = len > 2e3 ? 2e3 : len;
                len -= n3;
                do {
                  s1 = s1 + buf[pos++] | 0;
                  s22 = s22 + s1 | 0;
                } while (--n3);
                s1 %= 65521;
                s22 %= 65521;
              }
              return s1 | s22 << 16 | 0;
            }
            module2.exports = adler32;
          },
          {}
        ],
        4: [
          function(require2, module2, exports2) {
            "use strict";
            module2.exports = {
              /* Allowed flush values; see deflate() and inflate() below for details */
              Z_NO_FLUSH: 0,
              Z_PARTIAL_FLUSH: 1,
              Z_SYNC_FLUSH: 2,
              Z_FULL_FLUSH: 3,
              Z_FINISH: 4,
              Z_BLOCK: 5,
              Z_TREES: 6,
              /* Return codes for the compression/decompression functions. Negative values
               * are errors, positive values are used for special but normal events.
               */
              Z_OK: 0,
              Z_STREAM_END: 1,
              Z_NEED_DICT: 2,
              Z_ERRNO: -1,
              Z_STREAM_ERROR: -2,
              Z_DATA_ERROR: -3,
              //Z_MEM_ERROR:     -4,
              Z_BUF_ERROR: -5,
              //Z_VERSION_ERROR: -6,
              /* compression levels */
              Z_NO_COMPRESSION: 0,
              Z_BEST_SPEED: 1,
              Z_BEST_COMPRESSION: 9,
              Z_DEFAULT_COMPRESSION: -1,
              Z_FILTERED: 1,
              Z_HUFFMAN_ONLY: 2,
              Z_RLE: 3,
              Z_FIXED: 4,
              Z_DEFAULT_STRATEGY: 0,
              /* Possible values of the data_type field (though see inflate()) */
              Z_BINARY: 0,
              Z_TEXT: 1,
              //Z_ASCII:                1, // = Z_TEXT (deprecated)
              Z_UNKNOWN: 2,
              /* The deflate compression method */
              Z_DEFLATED: 8
              //Z_NULL:                 null // Use -1 or null inline, depending on var type
            };
          },
          {}
        ],
        5: [
          function(require2, module2, exports2) {
            "use strict";
            function makeTable() {
              var c6, table = [];
              for (var n3 = 0; n3 < 256; n3++) {
                c6 = n3;
                for (var k2 = 0; k2 < 8; k2++) {
                  c6 = c6 & 1 ? 3988292384 ^ c6 >>> 1 : c6 >>> 1;
                }
                table[n3] = c6;
              }
              return table;
            }
            var crcTable = makeTable();
            function crc32(crc, buf, len, pos) {
              var t4 = crcTable, end = pos + len;
              crc ^= -1;
              for (var i3 = pos; i3 < end; i3++) {
                crc = crc >>> 8 ^ t4[(crc ^ buf[i3]) & 255];
              }
              return crc ^ -1;
            }
            module2.exports = crc32;
          },
          {}
        ],
        6: [
          function(require2, module2, exports2) {
            "use strict";
            function GZheader() {
              this.text = 0;
              this.time = 0;
              this.xflags = 0;
              this.os = 0;
              this.extra = null;
              this.extra_len = 0;
              this.name = "";
              this.comment = "";
              this.hcrc = 0;
              this.done = false;
            }
            module2.exports = GZheader;
          },
          {}
        ],
        7: [
          function(require2, module2, exports2) {
            "use strict";
            var BAD = 30;
            var TYPE = 12;
            module2.exports = function inflate_fast(strm, start2) {
              var state;
              var _in;
              var last;
              var _out;
              var beg;
              var end;
              var dmax;
              var wsize;
              var whave;
              var wnext;
              var s_window;
              var hold;
              var bits;
              var lcode;
              var dcode;
              var lmask;
              var dmask;
              var here;
              var op;
              var len;
              var dist;
              var from;
              var from_source;
              var input, output;
              state = strm.state;
              _in = strm.next_in;
              input = strm.input;
              last = _in + (strm.avail_in - 5);
              _out = strm.next_out;
              output = strm.output;
              beg = _out - (start2 - strm.avail_out);
              end = _out + (strm.avail_out - 257);
              dmax = state.dmax;
              wsize = state.wsize;
              whave = state.whave;
              wnext = state.wnext;
              s_window = state.window;
              hold = state.hold;
              bits = state.bits;
              lcode = state.lencode;
              dcode = state.distcode;
              lmask = (1 << state.lenbits) - 1;
              dmask = (1 << state.distbits) - 1;
              top: do {
                if (bits < 15) {
                  hold += input[_in++] << bits;
                  bits += 8;
                  hold += input[_in++] << bits;
                  bits += 8;
                }
                here = lcode[hold & lmask];
                dolen: for (; ; ) {
                  op = here >>> 24;
                  hold >>>= op;
                  bits -= op;
                  op = here >>> 16 & 255;
                  if (op === 0) {
                    output[_out++] = here & 65535;
                  } else if (op & 16) {
                    len = here & 65535;
                    op &= 15;
                    if (op) {
                      if (bits < op) {
                        hold += input[_in++] << bits;
                        bits += 8;
                      }
                      len += hold & (1 << op) - 1;
                      hold >>>= op;
                      bits -= op;
                    }
                    if (bits < 15) {
                      hold += input[_in++] << bits;
                      bits += 8;
                      hold += input[_in++] << bits;
                      bits += 8;
                    }
                    here = dcode[hold & dmask];
                    dodist: for (; ; ) {
                      op = here >>> 24;
                      hold >>>= op;
                      bits -= op;
                      op = here >>> 16 & 255;
                      if (op & 16) {
                        dist = here & 65535;
                        op &= 15;
                        if (bits < op) {
                          hold += input[_in++] << bits;
                          bits += 8;
                          if (bits < op) {
                            hold += input[_in++] << bits;
                            bits += 8;
                          }
                        }
                        dist += hold & (1 << op) - 1;
                        if (dist > dmax) {
                          strm.msg = "invalid distance too far back";
                          state.mode = BAD;
                          break top;
                        }
                        hold >>>= op;
                        bits -= op;
                        op = _out - beg;
                        if (dist > op) {
                          op = dist - op;
                          if (op > whave) {
                            if (state.sane) {
                              strm.msg = "invalid distance too far back";
                              state.mode = BAD;
                              break top;
                            }
                          }
                          from = 0;
                          from_source = s_window;
                          if (wnext === 0) {
                            from += wsize - op;
                            if (op < len) {
                              len -= op;
                              do {
                                output[_out++] = s_window[from++];
                              } while (--op);
                              from = _out - dist;
                              from_source = output;
                            }
                          } else if (wnext < op) {
                            from += wsize + wnext - op;
                            op -= wnext;
                            if (op < len) {
                              len -= op;
                              do {
                                output[_out++] = s_window[from++];
                              } while (--op);
                              from = 0;
                              if (wnext < len) {
                                op = wnext;
                                len -= op;
                                do {
                                  output[_out++] = s_window[from++];
                                } while (--op);
                                from = _out - dist;
                                from_source = output;
                              }
                            }
                          } else {
                            from += wnext - op;
                            if (op < len) {
                              len -= op;
                              do {
                                output[_out++] = s_window[from++];
                              } while (--op);
                              from = _out - dist;
                              from_source = output;
                            }
                          }
                          while (len > 2) {
                            output[_out++] = from_source[from++];
                            output[_out++] = from_source[from++];
                            output[_out++] = from_source[from++];
                            len -= 3;
                          }
                          if (len) {
                            output[_out++] = from_source[from++];
                            if (len > 1) {
                              output[_out++] = from_source[from++];
                            }
                          }
                        } else {
                          from = _out - dist;
                          do {
                            output[_out++] = output[from++];
                            output[_out++] = output[from++];
                            output[_out++] = output[from++];
                            len -= 3;
                          } while (len > 2);
                          if (len) {
                            output[_out++] = output[from++];
                            if (len > 1) {
                              output[_out++] = output[from++];
                            }
                          }
                        }
                      } else if ((op & 64) === 0) {
                        here = dcode[(here & 65535) + (hold & (1 << op) - 1)];
                        continue dodist;
                      } else {
                        strm.msg = "invalid distance code";
                        state.mode = BAD;
                        break top;
                      }
                      break;
                    }
                  } else if ((op & 64) === 0) {
                    here = lcode[(here & 65535) + (hold & (1 << op) - 1)];
                    continue dolen;
                  } else if (op & 32) {
                    state.mode = TYPE;
                    break top;
                  } else {
                    strm.msg = "invalid literal/length code";
                    state.mode = BAD;
                    break top;
                  }
                  break;
                }
              } while (_in < last && _out < end);
              len = bits >> 3;
              _in -= len;
              bits -= len << 3;
              hold &= (1 << bits) - 1;
              strm.next_in = _in;
              strm.next_out = _out;
              strm.avail_in = _in < last ? 5 + (last - _in) : 5 - (_in - last);
              strm.avail_out = _out < end ? 257 + (end - _out) : 257 - (_out - end);
              state.hold = hold;
              state.bits = bits;
              return;
            };
          },
          {}
        ],
        8: [
          function(require2, module2, exports2) {
            "use strict";
            var utils = require2("../utils/common");
            var adler32 = require2("./adler32");
            var crc32 = require2("./crc32");
            var inflate_fast = require2("./inffast");
            var inflate_table = require2("./inftrees");
            var CODES = 0;
            var LENS = 1;
            var DISTS = 2;
            var Z_FINISH = 4;
            var Z_BLOCK = 5;
            var Z_TREES = 6;
            var Z_OK = 0;
            var Z_STREAM_END = 1;
            var Z_NEED_DICT = 2;
            var Z_STREAM_ERROR = -2;
            var Z_DATA_ERROR = -3;
            var Z_MEM_ERROR = -4;
            var Z_BUF_ERROR = -5;
            var Z_DEFLATED = 8;
            var HEAD = 1;
            var FLAGS = 2;
            var TIME = 3;
            var OS = 4;
            var EXLEN = 5;
            var EXTRA = 6;
            var NAME = 7;
            var COMMENT = 8;
            var HCRC = 9;
            var DICTID = 10;
            var DICT = 11;
            var TYPE = 12;
            var TYPEDO = 13;
            var STORED = 14;
            var COPY_ = 15;
            var COPY = 16;
            var TABLE = 17;
            var LENLENS = 18;
            var CODELENS = 19;
            var LEN_ = 20;
            var LEN = 21;
            var LENEXT = 22;
            var DIST = 23;
            var DISTEXT = 24;
            var MATCH = 25;
            var LIT = 26;
            var CHECK = 27;
            var LENGTH = 28;
            var DONE = 29;
            var BAD = 30;
            var MEM = 31;
            var SYNC = 32;
            var ENOUGH_LENS = 852;
            var ENOUGH_DISTS = 592;
            var MAX_WBITS = 15;
            var DEF_WBITS = MAX_WBITS;
            function zswap32(q) {
              return (q >>> 24 & 255) + (q >>> 8 & 65280) + ((q & 65280) << 8) + ((q & 255) << 24);
            }
            function InflateState() {
              this.mode = 0;
              this.last = false;
              this.wrap = 0;
              this.havedict = false;
              this.flags = 0;
              this.dmax = 0;
              this.check = 0;
              this.total = 0;
              this.head = null;
              this.wbits = 0;
              this.wsize = 0;
              this.whave = 0;
              this.wnext = 0;
              this.window = null;
              this.hold = 0;
              this.bits = 0;
              this.length = 0;
              this.offset = 0;
              this.extra = 0;
              this.lencode = null;
              this.distcode = null;
              this.lenbits = 0;
              this.distbits = 0;
              this.ncode = 0;
              this.nlen = 0;
              this.ndist = 0;
              this.have = 0;
              this.next = null;
              this.lens = new utils.Buf16(
                320
              );
              this.work = new utils.Buf16(
                288
              );
              this.lendyn = null;
              this.distdyn = null;
              this.sane = 0;
              this.back = 0;
              this.was = 0;
            }
            function inflateResetKeep(strm) {
              var state;
              if (!strm || !strm.state) {
                return Z_STREAM_ERROR;
              }
              state = strm.state;
              strm.total_in = strm.total_out = state.total = 0;
              strm.msg = "";
              if (state.wrap) {
                strm.adler = state.wrap & 1;
              }
              state.mode = HEAD;
              state.last = 0;
              state.havedict = 0;
              state.dmax = 32768;
              state.head = null;
              state.hold = 0;
              state.bits = 0;
              state.lencode = state.lendyn = new utils.Buf32(
                ENOUGH_LENS
              );
              state.distcode = state.distdyn = new utils.Buf32(
                ENOUGH_DISTS
              );
              state.sane = 1;
              state.back = -1;
              return Z_OK;
            }
            function inflateReset(strm) {
              var state;
              if (!strm || !strm.state) {
                return Z_STREAM_ERROR;
              }
              state = strm.state;
              state.wsize = 0;
              state.whave = 0;
              state.wnext = 0;
              return inflateResetKeep(strm);
            }
            function inflateReset2(strm, windowBits) {
              var wrap;
              var state;
              if (!strm || !strm.state) {
                return Z_STREAM_ERROR;
              }
              state = strm.state;
              if (windowBits < 0) {
                wrap = 0;
                windowBits = -windowBits;
              } else {
                wrap = (windowBits >> 4) + 1;
                if (windowBits < 48) {
                  windowBits &= 15;
                }
              }
              if (windowBits && (windowBits < 8 || windowBits > 15)) {
                return Z_STREAM_ERROR;
              }
              if (state.window !== null && state.wbits !== windowBits) {
                state.window = null;
              }
              state.wrap = wrap;
              state.wbits = windowBits;
              return inflateReset(strm);
            }
            function inflateInit2(strm, windowBits) {
              var ret;
              var state;
              if (!strm) {
                return Z_STREAM_ERROR;
              }
              state = new InflateState();
              strm.state = state;
              state.window = null;
              ret = inflateReset2(strm, windowBits);
              if (ret !== Z_OK) {
                strm.state = null;
              }
              return ret;
            }
            function inflateInit(strm) {
              return inflateInit2(strm, DEF_WBITS);
            }
            var virgin = true;
            var lenfix, distfix;
            function fixedtables(state) {
              if (virgin) {
                var sym;
                lenfix = new utils.Buf32(512);
                distfix = new utils.Buf32(32);
                sym = 0;
                while (sym < 144) {
                  state.lens[sym++] = 8;
                }
                while (sym < 256) {
                  state.lens[sym++] = 9;
                }
                while (sym < 280) {
                  state.lens[sym++] = 7;
                }
                while (sym < 288) {
                  state.lens[sym++] = 8;
                }
                inflate_table(
                  LENS,
                  state.lens,
                  0,
                  288,
                  lenfix,
                  0,
                  state.work,
                  { bits: 9 }
                );
                sym = 0;
                while (sym < 32) {
                  state.lens[sym++] = 5;
                }
                inflate_table(
                  DISTS,
                  state.lens,
                  0,
                  32,
                  distfix,
                  0,
                  state.work,
                  { bits: 5 }
                );
                virgin = false;
              }
              state.lencode = lenfix;
              state.lenbits = 9;
              state.distcode = distfix;
              state.distbits = 5;
            }
            function updatewindow(strm, src, end, copy) {
              var dist;
              var state = strm.state;
              if (state.window === null) {
                state.wsize = 1 << state.wbits;
                state.wnext = 0;
                state.whave = 0;
                state.window = new utils.Buf8(state.wsize);
              }
              if (copy >= state.wsize) {
                utils.arraySet(
                  state.window,
                  src,
                  end - state.wsize,
                  state.wsize,
                  0
                );
                state.wnext = 0;
                state.whave = state.wsize;
              } else {
                dist = state.wsize - state.wnext;
                if (dist > copy) {
                  dist = copy;
                }
                utils.arraySet(
                  state.window,
                  src,
                  end - copy,
                  dist,
                  state.wnext
                );
                copy -= dist;
                if (copy) {
                  utils.arraySet(
                    state.window,
                    src,
                    end - copy,
                    copy,
                    0
                  );
                  state.wnext = copy;
                  state.whave = state.wsize;
                } else {
                  state.wnext += dist;
                  if (state.wnext === state.wsize) {
                    state.wnext = 0;
                  }
                  if (state.whave < state.wsize) {
                    state.whave += dist;
                  }
                }
              }
              return 0;
            }
            function inflate(strm, flush2) {
              var state;
              var input, output;
              var next;
              var put;
              var have, left;
              var hold;
              var bits;
              var _in, _out;
              var copy;
              var from;
              var from_source;
              var here = 0;
              var here_bits, here_op, here_val;
              var last_bits, last_op, last_val;
              var len;
              var ret;
              var hbuf = new utils.Buf8(
                4
              );
              var opts;
              var n3;
              var order = (
                /* permutation of code lengths */
                [
                  16,
                  17,
                  18,
                  0,
                  8,
                  7,
                  9,
                  6,
                  10,
                  5,
                  11,
                  4,
                  12,
                  3,
                  13,
                  2,
                  14,
                  1,
                  15
                ]
              );
              if (!strm || !strm.state || !strm.output || !strm.input && strm.avail_in !== 0) {
                return Z_STREAM_ERROR;
              }
              state = strm.state;
              if (state.mode === TYPE) {
                state.mode = TYPEDO;
              }
              put = strm.next_out;
              output = strm.output;
              left = strm.avail_out;
              next = strm.next_in;
              input = strm.input;
              have = strm.avail_in;
              hold = state.hold;
              bits = state.bits;
              _in = have;
              _out = left;
              ret = Z_OK;
              inf_leave: for (; ; ) {
                switch (state.mode) {
                  case HEAD:
                    if (state.wrap === 0) {
                      state.mode = TYPEDO;
                      break;
                    }
                    while (bits < 16) {
                      if (have === 0) {
                        break inf_leave;
                      }
                      have--;
                      hold += input[next++] << bits;
                      bits += 8;
                    }
                    if (state.wrap & 2 && hold === 35615) {
                      state.check = 0;
                      hbuf[0] = hold & 255;
                      hbuf[1] = hold >>> 8 & 255;
                      state.check = crc32(
                        state.check,
                        hbuf,
                        2,
                        0
                      );
                      hold = 0;
                      bits = 0;
                      state.mode = FLAGS;
                      break;
                    }
                    state.flags = 0;
                    if (state.head) {
                      state.head.done = false;
                    }
                    if (!(state.wrap & 1) || (((hold & 255) << 8) + (hold >> 8)) % 31) {
                      strm.msg = "incorrect header check";
                      state.mode = BAD;
                      break;
                    }
                    if ((hold & 15) !== Z_DEFLATED) {
                      strm.msg = "unknown compression method";
                      state.mode = BAD;
                      break;
                    }
                    hold >>>= 4;
                    bits -= 4;
                    len = (hold & 15) + 8;
                    if (state.wbits === 0) {
                      state.wbits = len;
                    } else if (len > state.wbits) {
                      strm.msg = "invalid window size";
                      state.mode = BAD;
                      break;
                    }
                    state.dmax = 1 << len;
                    strm.adler = state.check = 1;
                    state.mode = hold & 512 ? DICTID : TYPE;
                    hold = 0;
                    bits = 0;
                    break;
                  case FLAGS:
                    while (bits < 16) {
                      if (have === 0) {
                        break inf_leave;
                      }
                      have--;
                      hold += input[next++] << bits;
                      bits += 8;
                    }
                    state.flags = hold;
                    if ((state.flags & 255) !== Z_DEFLATED) {
                      strm.msg = "unknown compression method";
                      state.mode = BAD;
                      break;
                    }
                    if (state.flags & 57344) {
                      strm.msg = "unknown header flags set";
                      state.mode = BAD;
                      break;
                    }
                    if (state.head) {
                      state.head.text = hold >> 8 & 1;
                    }
                    if (state.flags & 512) {
                      hbuf[0] = hold & 255;
                      hbuf[1] = hold >>> 8 & 255;
                      state.check = crc32(
                        state.check,
                        hbuf,
                        2,
                        0
                      );
                    }
                    hold = 0;
                    bits = 0;
                    state.mode = TIME;
                  /* falls through */
                  case TIME:
                    while (bits < 32) {
                      if (have === 0) {
                        break inf_leave;
                      }
                      have--;
                      hold += input[next++] << bits;
                      bits += 8;
                    }
                    if (state.head) {
                      state.head.time = hold;
                    }
                    if (state.flags & 512) {
                      hbuf[0] = hold & 255;
                      hbuf[1] = hold >>> 8 & 255;
                      hbuf[2] = hold >>> 16 & 255;
                      hbuf[3] = hold >>> 24 & 255;
                      state.check = crc32(
                        state.check,
                        hbuf,
                        4,
                        0
                      );
                    }
                    hold = 0;
                    bits = 0;
                    state.mode = OS;
                  /* falls through */
                  case OS:
                    while (bits < 16) {
                      if (have === 0) {
                        break inf_leave;
                      }
                      have--;
                      hold += input[next++] << bits;
                      bits += 8;
                    }
                    if (state.head) {
                      state.head.xflags = hold & 255;
                      state.head.os = hold >> 8;
                    }
                    if (state.flags & 512) {
                      hbuf[0] = hold & 255;
                      hbuf[1] = hold >>> 8 & 255;
                      state.check = crc32(
                        state.check,
                        hbuf,
                        2,
                        0
                      );
                    }
                    hold = 0;
                    bits = 0;
                    state.mode = EXLEN;
                  /* falls through */
                  case EXLEN:
                    if (state.flags & 1024) {
                      while (bits < 16) {
                        if (have === 0) {
                          break inf_leave;
                        }
                        have--;
                        hold += input[next++] << bits;
                        bits += 8;
                      }
                      state.length = hold;
                      if (state.head) {
                        state.head.extra_len = hold;
                      }
                      if (state.flags & 512) {
                        hbuf[0] = hold & 255;
                        hbuf[1] = hold >>> 8 & 255;
                        state.check = crc32(
                          state.check,
                          hbuf,
                          2,
                          0
                        );
                      }
                      hold = 0;
                      bits = 0;
                    } else if (state.head) {
                      state.head.extra = null;
                    }
                    state.mode = EXTRA;
                  /* falls through */
                  case EXTRA:
                    if (state.flags & 1024) {
                      copy = state.length;
                      if (copy > have) {
                        copy = have;
                      }
                      if (copy) {
                        if (state.head) {
                          len = state.head.extra_len - state.length;
                          if (!state.head.extra) {
                            state.head.extra = new Array(
                              state.head.extra_len
                            );
                          }
                          utils.arraySet(
                            state.head.extra,
                            input,
                            next,
                            // extra field is limited to 65536 bytes
                            // - no need for additional size check
                            copy,
                            /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/
                            len
                          );
                        }
                        if (state.flags & 512) {
                          state.check = crc32(
                            state.check,
                            input,
                            copy,
                            next
                          );
                        }
                        have -= copy;
                        next += copy;
                        state.length -= copy;
                      }
                      if (state.length) {
                        break inf_leave;
                      }
                    }
                    state.length = 0;
                    state.mode = NAME;
                  /* falls through */
                  case NAME:
                    if (state.flags & 2048) {
                      if (have === 0) {
                        break inf_leave;
                      }
                      copy = 0;
                      do {
                        len = input[next + copy++];
                        if (state.head && len && state.length < 65536) {
                          state.head.name += String.fromCharCode(len);
                        }
                      } while (len && copy < have);
                      if (state.flags & 512) {
                        state.check = crc32(
                          state.check,
                          input,
                          copy,
                          next
                        );
                      }
                      have -= copy;
                      next += copy;
                      if (len) {
                        break inf_leave;
                      }
                    } else if (state.head) {
                      state.head.name = null;
                    }
                    state.length = 0;
                    state.mode = COMMENT;
                  /* falls through */
                  case COMMENT:
                    if (state.flags & 4096) {
                      if (have === 0) {
                        break inf_leave;
                      }
                      copy = 0;
                      do {
                        len = input[next + copy++];
                        if (state.head && len && state.length < 65536) {
                          state.head.comment += String.fromCharCode(len);
                        }
                      } while (len && copy < have);
                      if (state.flags & 512) {
                        state.check = crc32(
                          state.check,
                          input,
                          copy,
                          next
                        );
                      }
                      have -= copy;
                      next += copy;
                      if (len) {
                        break inf_leave;
                      }
                    } else if (state.head) {
                      state.head.comment = null;
                    }
                    state.mode = HCRC;
                  /* falls through */
                  case HCRC:
                    if (state.flags & 512) {
                      while (bits < 16) {
                        if (have === 0) {
                          break inf_leave;
                        }
                        have--;
                        hold += input[next++] << bits;
                        bits += 8;
                      }
                      if (hold !== (state.check & 65535)) {
                        strm.msg = "header crc mismatch";
                        state.mode = BAD;
                        break;
                      }
                      hold = 0;
                      bits = 0;
                    }
                    if (state.head) {
                      state.head.hcrc = state.flags >> 9 & 1;
                      state.head.done = true;
                    }
                    strm.adler = state.check = 0;
                    state.mode = TYPE;
                    break;
                  case DICTID:
                    while (bits < 32) {
                      if (have === 0) {
                        break inf_leave;
                      }
                      have--;
                      hold += input[next++] << bits;
                      bits += 8;
                    }
                    strm.adler = state.check = zswap32(hold);
                    hold = 0;
                    bits = 0;
                    state.mode = DICT;
                  /* falls through */
                  case DICT:
                    if (state.havedict === 0) {
                      strm.next_out = put;
                      strm.avail_out = left;
                      strm.next_in = next;
                      strm.avail_in = have;
                      state.hold = hold;
                      state.bits = bits;
                      return Z_NEED_DICT;
                    }
                    strm.adler = state.check = 1;
                    state.mode = TYPE;
                  /* falls through */
                  case TYPE:
                    if (flush2 === Z_BLOCK || flush2 === Z_TREES) {
                      break inf_leave;
                    }
                  /* falls through */
                  case TYPEDO:
                    if (state.last) {
                      hold >>>= bits & 7;
                      bits -= bits & 7;
                      state.mode = CHECK;
                      break;
                    }
                    while (bits < 3) {
                      if (have === 0) {
                        break inf_leave;
                      }
                      have--;
                      hold += input[next++] << bits;
                      bits += 8;
                    }
                    state.last = hold & 1;
                    hold >>>= 1;
                    bits -= 1;
                    switch (hold & 3) {
                      case 0:
                        state.mode = STORED;
                        break;
                      case 1:
                        fixedtables(state);
                        state.mode = LEN_;
                        if (flush2 === Z_TREES) {
                          hold >>>= 2;
                          bits -= 2;
                          break inf_leave;
                        }
                        break;
                      case 2:
                        state.mode = TABLE;
                        break;
                      case 3:
                        strm.msg = "invalid block type";
                        state.mode = BAD;
                    }
                    hold >>>= 2;
                    bits -= 2;
                    break;
                  case STORED:
                    hold >>>= bits & 7;
                    bits -= bits & 7;
                    while (bits < 32) {
                      if (have === 0) {
                        break inf_leave;
                      }
                      have--;
                      hold += input[next++] << bits;
                      bits += 8;
                    }
                    if ((hold & 65535) !== (hold >>> 16 ^ 65535)) {
                      strm.msg = "invalid stored block lengths";
                      state.mode = BAD;
                      break;
                    }
                    state.length = hold & 65535;
                    hold = 0;
                    bits = 0;
                    state.mode = COPY_;
                    if (flush2 === Z_TREES) {
                      break inf_leave;
                    }
                  /* falls through */
                  case COPY_:
                    state.mode = COPY;
                  /* falls through */
                  case COPY:
                    copy = state.length;
                    if (copy) {
                      if (copy > have) {
                        copy = have;
                      }
                      if (copy > left) {
                        copy = left;
                      }
                      if (copy === 0) {
                        break inf_leave;
                      }
                      utils.arraySet(
                        output,
                        input,
                        next,
                        copy,
                        put
                      );
                      have -= copy;
                      next += copy;
                      left -= copy;
                      put += copy;
                      state.length -= copy;
                      break;
                    }
                    state.mode = TYPE;
                    break;
                  case TABLE:
                    while (bits < 14) {
                      if (have === 0) {
                        break inf_leave;
                      }
                      have--;
                      hold += input[next++] << bits;
                      bits += 8;
                    }
                    state.nlen = (hold & 31) + 257;
                    hold >>>= 5;
                    bits -= 5;
                    state.ndist = (hold & 31) + 1;
                    hold >>>= 5;
                    bits -= 5;
                    state.ncode = (hold & 15) + 4;
                    hold >>>= 4;
                    bits -= 4;
                    if (state.nlen > 286 || state.ndist > 30) {
                      strm.msg = "too many length or distance symbols";
                      state.mode = BAD;
                      break;
                    }
                    state.have = 0;
                    state.mode = LENLENS;
                  /* falls through */
                  case LENLENS:
                    while (state.have < state.ncode) {
                      while (bits < 3) {
                        if (have === 0) {
                          break inf_leave;
                        }
                        have--;
                        hold += input[next++] << bits;
                        bits += 8;
                      }
                      state.lens[order[state.have++]] = hold & 7;
                      hold >>>= 3;
                      bits -= 3;
                    }
                    while (state.have < 19) {
                      state.lens[order[state.have++]] = 0;
                    }
                    state.lencode = state.lendyn;
                    state.lenbits = 7;
                    opts = { bits: state.lenbits };
                    ret = inflate_table(
                      CODES,
                      state.lens,
                      0,
                      19,
                      state.lencode,
                      0,
                      state.work,
                      opts
                    );
                    state.lenbits = opts.bits;
                    if (ret) {
                      strm.msg = "invalid code lengths set";
                      state.mode = BAD;
                      break;
                    }
                    state.have = 0;
                    state.mode = CODELENS;
                  /* falls through */
                  case CODELENS:
                    while (state.have < state.nlen + state.ndist) {
                      for (; ; ) {
                        here = state.lencode[hold & (1 << state.lenbits) - 1];
                        here_bits = here >>> 24;
                        here_op = here >>> 16 & 255;
                        here_val = here & 65535;
                        if (here_bits <= bits) {
                          break;
                        }
                        if (have === 0) {
                          break inf_leave;
                        }
                        have--;
                        hold += input[next++] << bits;
                        bits += 8;
                      }
                      if (here_val < 16) {
                        hold >>>= here_bits;
                        bits -= here_bits;
                        state.lens[state.have++] = here_val;
                      } else {
                        if (here_val === 16) {
                          n3 = here_bits + 2;
                          while (bits < n3) {
                            if (have === 0) {
                              break inf_leave;
                            }
                            have--;
                            hold += input[next++] << bits;
                            bits += 8;
                          }
                          hold >>>= here_bits;
                          bits -= here_bits;
                          if (state.have === 0) {
                            strm.msg = "invalid bit length repeat";
                            state.mode = BAD;
                            break;
                          }
                          len = state.lens[state.have - 1];
                          copy = 3 + (hold & 3);
                          hold >>>= 2;
                          bits -= 2;
                        } else if (here_val === 17) {
                          n3 = here_bits + 3;
                          while (bits < n3) {
                            if (have === 0) {
                              break inf_leave;
                            }
                            have--;
                            hold += input[next++] << bits;
                            bits += 8;
                          }
                          hold >>>= here_bits;
                          bits -= here_bits;
                          len = 0;
                          copy = 3 + (hold & 7);
                          hold >>>= 3;
                          bits -= 3;
                        } else {
                          n3 = here_bits + 7;
                          while (bits < n3) {
                            if (have === 0) {
                              break inf_leave;
                            }
                            have--;
                            hold += input[next++] << bits;
                            bits += 8;
                          }
                          hold >>>= here_bits;
                          bits -= here_bits;
                          len = 0;
                          copy = 11 + (hold & 127);
                          hold >>>= 7;
                          bits -= 7;
                        }
                        if (state.have + copy > state.nlen + state.ndist) {
                          strm.msg = "invalid bit length repeat";
                          state.mode = BAD;
                          break;
                        }
                        while (copy--) {
                          state.lens[state.have++] = len;
                        }
                      }
                    }
                    if (state.mode === BAD) {
                      break;
                    }
                    if (state.lens[256] === 0) {
                      strm.msg = "invalid code -- missing end-of-block";
                      state.mode = BAD;
                      break;
                    }
                    state.lenbits = 9;
                    opts = { bits: state.lenbits };
                    ret = inflate_table(
                      LENS,
                      state.lens,
                      0,
                      state.nlen,
                      state.lencode,
                      0,
                      state.work,
                      opts
                    );
                    state.lenbits = opts.bits;
                    if (ret) {
                      strm.msg = "invalid literal/lengths set";
                      state.mode = BAD;
                      break;
                    }
                    state.distbits = 6;
                    state.distcode = state.distdyn;
                    opts = { bits: state.distbits };
                    ret = inflate_table(
                      DISTS,
                      state.lens,
                      state.nlen,
                      state.ndist,
                      state.distcode,
                      0,
                      state.work,
                      opts
                    );
                    state.distbits = opts.bits;
                    if (ret) {
                      strm.msg = "invalid distances set";
                      state.mode = BAD;
                      break;
                    }
                    state.mode = LEN_;
                    if (flush2 === Z_TREES) {
                      break inf_leave;
                    }
                  /* falls through */
                  case LEN_:
                    state.mode = LEN;
                  /* falls through */
                  case LEN:
                    if (have >= 6 && left >= 258) {
                      strm.next_out = put;
                      strm.avail_out = left;
                      strm.next_in = next;
                      strm.avail_in = have;
                      state.hold = hold;
                      state.bits = bits;
                      inflate_fast(strm, _out);
                      put = strm.next_out;
                      output = strm.output;
                      left = strm.avail_out;
                      next = strm.next_in;
                      input = strm.input;
                      have = strm.avail_in;
                      hold = state.hold;
                      bits = state.bits;
                      if (state.mode === TYPE) {
                        state.back = -1;
                      }
                      break;
                    }
                    state.back = 0;
                    for (; ; ) {
                      here = state.lencode[hold & (1 << state.lenbits) - 1];
                      here_bits = here >>> 24;
                      here_op = here >>> 16 & 255;
                      here_val = here & 65535;
                      if (here_bits <= bits) {
                        break;
                      }
                      if (have === 0) {
                        break inf_leave;
                      }
                      have--;
                      hold += input[next++] << bits;
                      bits += 8;
                    }
                    if (here_op && (here_op & 240) === 0) {
                      last_bits = here_bits;
                      last_op = here_op;
                      last_val = here_val;
                      for (; ; ) {
                        here = state.lencode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)];
                        here_bits = here >>> 24;
                        here_op = here >>> 16 & 255;
                        here_val = here & 65535;
                        if (last_bits + here_bits <= bits) {
                          break;
                        }
                        if (have === 0) {
                          break inf_leave;
                        }
                        have--;
                        hold += input[next++] << bits;
                        bits += 8;
                      }
                      hold >>>= last_bits;
                      bits -= last_bits;
                      state.back += last_bits;
                    }
                    hold >>>= here_bits;
                    bits -= here_bits;
                    state.back += here_bits;
                    state.length = here_val;
                    if (here_op === 0) {
                      state.mode = LIT;
                      break;
                    }
                    if (here_op & 32) {
                      state.back = -1;
                      state.mode = TYPE;
                      break;
                    }
                    if (here_op & 64) {
                      strm.msg = "invalid literal/length code";
                      state.mode = BAD;
                      break;
                    }
                    state.extra = here_op & 15;
                    state.mode = LENEXT;
                  /* falls through */
                  case LENEXT:
                    if (state.extra) {
                      n3 = state.extra;
                      while (bits < n3) {
                        if (have === 0) {
                          break inf_leave;
                        }
                        have--;
                        hold += input[next++] << bits;
                        bits += 8;
                      }
                      state.length += hold & (1 << state.extra) - 1;
                      hold >>>= state.extra;
                      bits -= state.extra;
                      state.back += state.extra;
                    }
                    state.was = state.length;
                    state.mode = DIST;
                  /* falls through */
                  case DIST:
                    for (; ; ) {
                      here = state.distcode[hold & (1 << state.distbits) - 1];
                      here_bits = here >>> 24;
                      here_op = here >>> 16 & 255;
                      here_val = here & 65535;
                      if (here_bits <= bits) {
                        break;
                      }
                      if (have === 0) {
                        break inf_leave;
                      }
                      have--;
                      hold += input[next++] << bits;
                      bits += 8;
                    }
                    if ((here_op & 240) === 0) {
                      last_bits = here_bits;
                      last_op = here_op;
                      last_val = here_val;
                      for (; ; ) {
                        here = state.distcode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)];
                        here_bits = here >>> 24;
                        here_op = here >>> 16 & 255;
                        here_val = here & 65535;
                        if (last_bits + here_bits <= bits) {
                          break;
                        }
                        if (have === 0) {
                          break inf_leave;
                        }
                        have--;
                        hold += input[next++] << bits;
                        bits += 8;
                      }
                      hold >>>= last_bits;
                      bits -= last_bits;
                      state.back += last_bits;
                    }
                    hold >>>= here_bits;
                    bits -= here_bits;
                    state.back += here_bits;
                    if (here_op & 64) {
                      strm.msg = "invalid distance code";
                      state.mode = BAD;
                      break;
                    }
                    state.offset = here_val;
                    state.extra = here_op & 15;
                    state.mode = DISTEXT;
                  /* falls through */
                  case DISTEXT:
                    if (state.extra) {
                      n3 = state.extra;
                      while (bits < n3) {
                        if (have === 0) {
                          break inf_leave;
                        }
                        have--;
                        hold += input[next++] << bits;
                        bits += 8;
                      }
                      state.offset += hold & (1 << state.extra) - 1;
                      hold >>>= state.extra;
                      bits -= state.extra;
                      state.back += state.extra;
                    }
                    if (state.offset > state.dmax) {
                      strm.msg = "invalid distance too far back";
                      state.mode = BAD;
                      break;
                    }
                    state.mode = MATCH;
                  /* falls through */
                  case MATCH:
                    if (left === 0) {
                      break inf_leave;
                    }
                    copy = _out - left;
                    if (state.offset > copy) {
                      copy = state.offset - copy;
                      if (copy > state.whave) {
                        if (state.sane) {
                          strm.msg = "invalid distance too far back";
                          state.mode = BAD;
                          break;
                        }
                      }
                      if (copy > state.wnext) {
                        copy -= state.wnext;
                        from = state.wsize - copy;
                      } else {
                        from = state.wnext - copy;
                      }
                      if (copy > state.length) {
                        copy = state.length;
                      }
                      from_source = state.window;
                    } else {
                      from_source = output;
                      from = put - state.offset;
                      copy = state.length;
                    }
                    if (copy > left) {
                      copy = left;
                    }
                    left -= copy;
                    state.length -= copy;
                    do {
                      output[put++] = from_source[from++];
                    } while (--copy);
                    if (state.length === 0) {
                      state.mode = LEN;
                    }
                    break;
                  case LIT:
                    if (left === 0) {
                      break inf_leave;
                    }
                    output[put++] = state.length;
                    left--;
                    state.mode = LEN;
                    break;
                  case CHECK:
                    if (state.wrap) {
                      while (bits < 32) {
                        if (have === 0) {
                          break inf_leave;
                        }
                        have--;
                        hold |= input[next++] << bits;
                        bits += 8;
                      }
                      _out -= left;
                      strm.total_out += _out;
                      state.total += _out;
                      if (_out) {
                        strm.adler = state.check = /*UPDATE(state.check, put - _out, _out);*/
                        state.flags ? crc32(
                          state.check,
                          output,
                          _out,
                          put - _out
                        ) : adler32(
                          state.check,
                          output,
                          _out,
                          put - _out
                        );
                      }
                      _out = left;
                      if ((state.flags ? hold : zswap32(hold)) !== state.check) {
                        strm.msg = "incorrect data check";
                        state.mode = BAD;
                        break;
                      }
                      hold = 0;
                      bits = 0;
                    }
                    state.mode = LENGTH;
                  /* falls through */
                  case LENGTH:
                    if (state.wrap && state.flags) {
                      while (bits < 32) {
                        if (have === 0) {
                          break inf_leave;
                        }
                        have--;
                        hold += input[next++] << bits;
                        bits += 8;
                      }
                      if (hold !== (state.total & 4294967295)) {
                        strm.msg = "incorrect length check";
                        state.mode = BAD;
                        break;
                      }
                      hold = 0;
                      bits = 0;
                    }
                    state.mode = DONE;
                  /* falls through */
                  case DONE:
                    ret = Z_STREAM_END;
                    break inf_leave;
                  case BAD:
                    ret = Z_DATA_ERROR;
                    break inf_leave;
                  case MEM:
                    return Z_MEM_ERROR;
                  case SYNC:
                  /* falls through */
                  default:
                    return Z_STREAM_ERROR;
                }
              }
              strm.next_out = put;
              strm.avail_out = left;
              strm.next_in = next;
              strm.avail_in = have;
              state.hold = hold;
              state.bits = bits;
              if (state.wsize || _out !== strm.avail_out && state.mode < BAD && (state.mode < CHECK || flush2 !== Z_FINISH)) {
                if (updatewindow(
                  strm,
                  strm.output,
                  strm.next_out,
                  _out - strm.avail_out
                )) {
                  state.mode = MEM;
                  return Z_MEM_ERROR;
                }
              }
              _in -= strm.avail_in;
              _out -= strm.avail_out;
              strm.total_in += _in;
              strm.total_out += _out;
              state.total += _out;
              if (state.wrap && _out) {
                strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
                state.flags ? crc32(
                  state.check,
                  output,
                  _out,
                  strm.next_out - _out
                ) : adler32(
                  state.check,
                  output,
                  _out,
                  strm.next_out - _out
                );
              }
              strm.data_type = state.bits + (state.last ? 64 : 0) + (state.mode === TYPE ? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);
              if ((_in === 0 && _out === 0 || flush2 === Z_FINISH) && ret === Z_OK) {
                ret = Z_BUF_ERROR;
              }
              return ret;
            }
            function inflateEnd(strm) {
              if (!strm || !strm.state) {
                return Z_STREAM_ERROR;
              }
              var state = strm.state;
              if (state.window) {
                state.window = null;
              }
              strm.state = null;
              return Z_OK;
            }
            function inflateGetHeader(strm, head2) {
              var state;
              if (!strm || !strm.state) {
                return Z_STREAM_ERROR;
              }
              state = strm.state;
              if ((state.wrap & 2) === 0) {
                return Z_STREAM_ERROR;
              }
              state.head = head2;
              head2.done = false;
              return Z_OK;
            }
            function inflateSetDictionary(strm, dictionary) {
              var dictLength = dictionary.length;
              var state;
              var dictid;
              var ret;
              if (!strm || !strm.state) {
                return Z_STREAM_ERROR;
              }
              state = strm.state;
              if (state.wrap !== 0 && state.mode !== DICT) {
                return Z_STREAM_ERROR;
              }
              if (state.mode === DICT) {
                dictid = 1;
                dictid = adler32(
                  dictid,
                  dictionary,
                  dictLength,
                  0
                );
                if (dictid !== state.check) {
                  return Z_DATA_ERROR;
                }
              }
              ret = updatewindow(
                strm,
                dictionary,
                dictLength,
                dictLength
              );
              if (ret) {
                state.mode = MEM;
                return Z_MEM_ERROR;
              }
              state.havedict = 1;
              return Z_OK;
            }
            exports2.inflateReset = inflateReset;
            exports2.inflateReset2 = inflateReset2;
            exports2.inflateResetKeep = inflateResetKeep;
            exports2.inflateInit = inflateInit;
            exports2.inflateInit2 = inflateInit2;
            exports2.inflate = inflate;
            exports2.inflateEnd = inflateEnd;
            exports2.inflateGetHeader = inflateGetHeader;
            exports2.inflateSetDictionary = inflateSetDictionary;
            exports2.inflateInfo = "pako inflate (from Nodeca project)";
          },
          {
            "../utils/common": 1,
            "./adler32": 3,
            "./crc32": 5,
            "./inffast": 7,
            "./inftrees": 9
          }
        ],
        9: [
          function(require2, module2, exports2) {
            "use strict";
            var utils = require2("../utils/common");
            var MAXBITS = 15;
            var ENOUGH_LENS = 852;
            var ENOUGH_DISTS = 592;
            var CODES = 0;
            var LENS = 1;
            var DISTS = 2;
            var lbase = [
              /* Length codes 257..285 base */
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              13,
              15,
              17,
              19,
              23,
              27,
              31,
              35,
              43,
              51,
              59,
              67,
              83,
              99,
              115,
              131,
              163,
              195,
              227,
              258,
              0,
              0
            ];
            var lext = [
              /* Length codes 257..285 extra */
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              16,
              17,
              17,
              17,
              17,
              18,
              18,
              18,
              18,
              19,
              19,
              19,
              19,
              20,
              20,
              20,
              20,
              21,
              21,
              21,
              21,
              16,
              72,
              78
            ];
            var dbase = [
              /* Distance codes 0..29 base */
              1,
              2,
              3,
              4,
              5,
              7,
              9,
              13,
              17,
              25,
              33,
              49,
              65,
              97,
              129,
              193,
              257,
              385,
              513,
              769,
              1025,
              1537,
              2049,
              3073,
              4097,
              6145,
              8193,
              12289,
              16385,
              24577,
              0,
              0
            ];
            var dext = [
              /* Distance codes 0..29 extra */
              16,
              16,
              16,
              16,
              17,
              17,
              18,
              18,
              19,
              19,
              20,
              20,
              21,
              21,
              22,
              22,
              23,
              23,
              24,
              24,
              25,
              25,
              26,
              26,
              27,
              27,
              28,
              28,
              29,
              29,
              64,
              64
            ];
            module2.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) {
              var bits = opts.bits;
              var len = 0;
              var sym = 0;
              var min2 = 0, max2 = 0;
              var root = 0;
              var curr = 0;
              var drop = 0;
              var left = 0;
              var used = 0;
              var huff = 0;
              var incr;
              var fill;
              var low;
              var mask;
              var next;
              var base = null;
              var base_index = 0;
              var end;
              var count = new utils.Buf16(MAXBITS + 1);
              var offs = new utils.Buf16(MAXBITS + 1);
              var extra = null;
              var extra_index = 0;
              var here_bits, here_op, here_val;
              for (len = 0; len <= MAXBITS; len++) {
                count[len] = 0;
              }
              for (sym = 0; sym < codes; sym++) {
                count[lens[lens_index + sym]]++;
              }
              root = bits;
              for (max2 = MAXBITS; max2 >= 1; max2--) {
                if (count[max2] !== 0) {
                  break;
                }
              }
              if (root > max2) {
                root = max2;
              }
              if (max2 === 0) {
                table[table_index++] = 1 << 24 | 64 << 16 | 0;
                table[table_index++] = 1 << 24 | 64 << 16 | 0;
                opts.bits = 1;
                return 0;
              }
              for (min2 = 1; min2 < max2; min2++) {
                if (count[min2] !== 0) {
                  break;
                }
              }
              if (root < min2) {
                root = min2;
              }
              left = 1;
              for (len = 1; len <= MAXBITS; len++) {
                left <<= 1;
                left -= count[len];
                if (left < 0) {
                  return -1;
                }
              }
              if (left > 0 && (type === CODES || max2 !== 1)) {
                return -1;
              }
              offs[1] = 0;
              for (len = 1; len < MAXBITS; len++) {
                offs[len + 1] = offs[len] + count[len];
              }
              for (sym = 0; sym < codes; sym++) {
                if (lens[lens_index + sym] !== 0) {
                  work[offs[lens[lens_index + sym]]++] = sym;
                }
              }
              if (type === CODES) {
                base = extra = work;
                end = 19;
              } else if (type === LENS) {
                base = lbase;
                base_index -= 257;
                extra = lext;
                extra_index -= 257;
                end = 256;
              } else {
                base = dbase;
                extra = dext;
                end = -1;
              }
              huff = 0;
              sym = 0;
              len = min2;
              next = table_index;
              curr = root;
              drop = 0;
              low = -1;
              used = 1 << root;
              mask = used - 1;
              if (type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS) {
                return 1;
              }
              for (; ; ) {
                here_bits = len - drop;
                if (work[sym] < end) {
                  here_op = 0;
                  here_val = work[sym];
                } else if (work[sym] > end) {
                  here_op = extra[extra_index + work[sym]];
                  here_val = base[base_index + work[sym]];
                } else {
                  here_op = 32 + 64;
                  here_val = 0;
                }
                incr = 1 << len - drop;
                fill = 1 << curr;
                min2 = fill;
                do {
                  fill -= incr;
                  table[next + (huff >> drop) + fill] = here_bits << 24 | here_op << 16 | here_val | 0;
                } while (fill !== 0);
                incr = 1 << len - 1;
                while (huff & incr) {
                  incr >>= 1;
                }
                if (incr !== 0) {
                  huff &= incr - 1;
                  huff += incr;
                } else {
                  huff = 0;
                }
                sym++;
                if (--count[len] === 0) {
                  if (len === max2) {
                    break;
                  }
                  len = lens[lens_index + work[sym]];
                }
                if (len > root && (huff & mask) !== low) {
                  if (drop === 0) {
                    drop = root;
                  }
                  next += min2;
                  curr = len - drop;
                  left = 1 << curr;
                  while (curr + drop < max2) {
                    left -= count[curr + drop];
                    if (left <= 0) {
                      break;
                    }
                    curr++;
                    left <<= 1;
                  }
                  used += 1 << curr;
                  if (type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS) {
                    return 1;
                  }
                  low = huff & mask;
                  table[low] = root << 24 | curr << 16 | next - table_index | 0;
                }
              }
              if (huff !== 0) {
                table[next + huff] = len - drop << 24 | 64 << 16 | 0;
              }
              opts.bits = root;
              return 0;
            };
          },
          { "../utils/common": 1 }
        ],
        10: [
          function(require2, module2, exports2) {
            "use strict";
            module2.exports = {
              2: "need dictionary",
              1: "stream end",
              0: "",
              "-1": "file error",
              "-2": "stream error",
              "-3": "data error",
              "-4": "insufficient memory",
              "-5": "buffer error",
              "-6": "incompatible version"
            };
          },
          {}
        ],
        11: [
          function(require2, module2, exports2) {
            "use strict";
            function ZStream() {
              this.input = null;
              this.next_in = 0;
              this.avail_in = 0;
              this.total_in = 0;
              this.output = null;
              this.next_out = 0;
              this.avail_out = 0;
              this.total_out = 0;
              this.msg = "";
              this.state = null;
              this.data_type = 2;
              this.adler = 0;
            }
            module2.exports = ZStream;
          },
          {}
        ],
        "/lib/inflate.js": [
          function(require2, module2, exports2) {
            "use strict";
            var zlib_inflate = require2("./zlib/inflate");
            var utils = require2("./utils/common");
            var strings = require2("./utils/strings");
            var c6 = require2("./zlib/constants");
            var msg = require2("./zlib/messages");
            var ZStream = require2("./zlib/zstream");
            var GZheader = require2("./zlib/gzheader");
            var toString = Object.prototype.toString;
            function Inflate(options) {
              if (!(this instanceof Inflate))
                return new Inflate(options);
              this.options = utils.assign(
                {
                  chunkSize: 16384,
                  windowBits: 0,
                  to: ""
                },
                options || {}
              );
              var opt = this.options;
              if (opt.raw && opt.windowBits >= 0 && opt.windowBits < 16) {
                opt.windowBits = -opt.windowBits;
                if (opt.windowBits === 0) {
                  opt.windowBits = -15;
                }
              }
              if (opt.windowBits >= 0 && opt.windowBits < 16 && !(options && options.windowBits)) {
                opt.windowBits += 32;
              }
              if (opt.windowBits > 15 && opt.windowBits < 48) {
                if ((opt.windowBits & 15) === 0) {
                  opt.windowBits |= 15;
                }
              }
              this.err = 0;
              this.msg = "";
              this.ended = false;
              this.chunks = [];
              this.strm = new ZStream();
              this.strm.avail_out = 0;
              var status = zlib_inflate.inflateInit2(
                this.strm,
                opt.windowBits
              );
              if (status !== c6.Z_OK) {
                throw new Error(msg[status]);
              }
              this.header = new GZheader();
              zlib_inflate.inflateGetHeader(this.strm, this.header);
              if (opt.dictionary) {
                if (typeof opt.dictionary === "string") {
                  opt.dictionary = strings.string2buf(
                    opt.dictionary
                  );
                } else if (toString.call(opt.dictionary) === "[object ArrayBuffer]") {
                  opt.dictionary = new Uint8Array(
                    opt.dictionary
                  );
                }
                if (opt.raw) {
                  status = zlib_inflate.inflateSetDictionary(
                    this.strm,
                    opt.dictionary
                  );
                  if (status !== c6.Z_OK) {
                    throw new Error(msg[status]);
                  }
                }
              }
            }
            Inflate.prototype.push = function(data, mode) {
              var strm = this.strm;
              var chunkSize = this.options.chunkSize;
              var dictionary = this.options.dictionary;
              var status, _mode;
              var next_out_utf8, tail, utf8str;
              var allowBufError = false;
              if (this.ended) {
                return false;
              }
              _mode = mode === ~~mode ? mode : mode === true ? c6.Z_FINISH : c6.Z_NO_FLUSH;
              if (typeof data === "string") {
                strm.input = strings.binstring2buf(data);
              } else if (toString.call(data) === "[object ArrayBuffer]") {
                strm.input = new Uint8Array(data);
              } else {
                strm.input = data;
              }
              strm.next_in = 0;
              strm.avail_in = strm.input.length;
              do {
                if (strm.avail_out === 0) {
                  strm.output = new utils.Buf8(chunkSize);
                  strm.next_out = 0;
                  strm.avail_out = chunkSize;
                }
                status = zlib_inflate.inflate(
                  strm,
                  c6.Z_NO_FLUSH
                );
                if (status === c6.Z_NEED_DICT && dictionary) {
                  status = zlib_inflate.inflateSetDictionary(
                    this.strm,
                    dictionary
                  );
                }
                if (status === c6.Z_BUF_ERROR && allowBufError === true) {
                  status = c6.Z_OK;
                  allowBufError = false;
                }
                if (status !== c6.Z_STREAM_END && status !== c6.Z_OK) {
                  this.onEnd(status);
                  this.ended = true;
                  return false;
                }
                if (strm.next_out) {
                  if (strm.avail_out === 0 || status === c6.Z_STREAM_END || strm.avail_in === 0 && (_mode === c6.Z_FINISH || _mode === c6.Z_SYNC_FLUSH)) {
                    if (this.options.to === "string") {
                      next_out_utf8 = strings.utf8border(
                        strm.output,
                        strm.next_out
                      );
                      tail = strm.next_out - next_out_utf8;
                      utf8str = strings.buf2string(
                        strm.output,
                        next_out_utf8
                      );
                      strm.next_out = tail;
                      strm.avail_out = chunkSize - tail;
                      if (tail) {
                        utils.arraySet(
                          strm.output,
                          strm.output,
                          next_out_utf8,
                          tail,
                          0
                        );
                      }
                      this.onData(utf8str);
                    } else {
                      this.onData(
                        utils.shrinkBuf(
                          strm.output,
                          strm.next_out
                        )
                      );
                    }
                  }
                }
                if (strm.avail_in === 0 && strm.avail_out === 0) {
                  allowBufError = true;
                }
              } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c6.Z_STREAM_END);
              if (status === c6.Z_STREAM_END) {
                _mode = c6.Z_FINISH;
              }
              if (_mode === c6.Z_FINISH) {
                status = zlib_inflate.inflateEnd(this.strm);
                this.onEnd(status);
                this.ended = true;
                return status === c6.Z_OK;
              }
              if (_mode === c6.Z_SYNC_FLUSH) {
                this.onEnd(c6.Z_OK);
                strm.avail_out = 0;
                return true;
              }
              return true;
            };
            Inflate.prototype.onData = function(chunk) {
              this.chunks.push(chunk);
            };
            Inflate.prototype.onEnd = function(status) {
              if (status === c6.Z_OK) {
                if (this.options.to === "string") {
                  this.result = this.chunks.join("");
                } else {
                  this.result = utils.flattenChunks(
                    this.chunks
                  );
                }
              }
              this.chunks = [];
              this.err = status;
              this.msg = this.strm.msg;
            };
            function inflate(input, options) {
              var inflator = new Inflate(options);
              inflator.push(input, true);
              if (inflator.err) {
                throw inflator.msg || msg[inflator.err];
              }
              return inflator.result;
            }
            function inflateRaw(input, options) {
              options = options || {};
              options.raw = true;
              return inflate(input, options);
            }
            exports2.Inflate = Inflate;
            exports2.inflate = inflate;
            exports2.inflateRaw = inflateRaw;
            exports2.ungzip = inflate;
          },
          {
            "./utils/common": 1,
            "./utils/strings": 2,
            "./zlib/constants": 4,
            "./zlib/gzheader": 6,
            "./zlib/inflate": 8,
            "./zlib/messages": 10,
            "./zlib/zstream": 11
          }
        ]
      },
      {},
      []
    )("/lib/inflate.js");
  })();

  // packages/global-styles-ui/build-module/font-library/lib/lib-font.browser.mjs
  var fetchFunction = globalThis.fetch;
  var Event2 = class {
    constructor(type, detail = {}, msg) {
      this.type = type;
      this.detail = detail;
      this.msg = msg;
      Object.defineProperty(this, `__mayPropagate`, {
        enumerable: false,
        writable: true
      });
      this.__mayPropagate = true;
    }
    preventDefault() {
    }
    stopPropagation() {
      this.__mayPropagate = false;
    }
    valueOf() {
      return this;
    }
    toString() {
      return this.msg ? `[${this.type} event]: ${this.msg}` : `[${this.type} event]`;
    }
  };
  var EventManager = class {
    constructor() {
      this.listeners = {};
    }
    addEventListener(type, listener, useCapture) {
      let bin = this.listeners[type] || [];
      if (useCapture) bin.unshift(listener);
      else bin.push(listener);
      this.listeners[type] = bin;
    }
    removeEventListener(type, listener) {
      let bin = this.listeners[type] || [];
      let pos = bin.findIndex((e3) => e3 === listener);
      if (pos > -1) {
        bin.splice(pos, 1);
        this.listeners[type] = bin;
      }
    }
    dispatch(event) {
      let bin = this.listeners[event.type];
      if (bin) {
        for (let l3 = 0, e3 = bin.length; l3 < e3; l3++) {
          if (!event.__mayPropagate) break;
          bin[l3](event);
        }
      }
    }
  };
  var startDate = (/* @__PURE__ */ new Date(`1904-01-01T00:00:00+0000`)).getTime();
  function asText(data) {
    return Array.from(data).map((v3) => String.fromCharCode(v3)).join(``);
  }
  var Parser = class {
    constructor(dict, dataview, name2) {
      this.name = (name2 || dict.tag || ``).trim();
      this.length = dict.length;
      this.start = dict.offset;
      this.offset = 0;
      this.data = dataview;
      [
        `getInt8`,
        `getUint8`,
        `getInt16`,
        `getUint16`,
        `getInt32`,
        `getUint32`,
        `getBigInt64`,
        `getBigUint64`
      ].forEach((name3) => {
        let fn = name3.replace(/get(Big)?/, "").toLowerCase();
        let increment = parseInt(name3.replace(/[^\d]/g, "")) / 8;
        Object.defineProperty(this, fn, {
          get: () => this.getValue(name3, increment)
        });
      });
    }
    get currentPosition() {
      return this.start + this.offset;
    }
    set currentPosition(position) {
      this.start = position;
      this.offset = 0;
    }
    skip(n3 = 0, bits = 8) {
      this.offset += n3 * bits / 8;
    }
    getValue(type, increment) {
      let pos = this.start + this.offset;
      this.offset += increment;
      try {
        return this.data[type](pos);
      } catch (e3) {
        console.error(`parser`, type, increment, this);
        console.error(`parser`, this.start, this.offset);
        throw e3;
      }
    }
    flags(n3) {
      if (n3 === 8 || n3 === 16 || n3 === 32 || n3 === 64) {
        return this[`uint${n3}`].toString(2).padStart(n3, 0).split(``).map((v3) => v3 === "1");
      }
      console.error(
        `Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long`
      );
      console.trace();
    }
    get tag() {
      const t4 = this.uint32;
      return asText([
        t4 >> 24 & 255,
        t4 >> 16 & 255,
        t4 >> 8 & 255,
        t4 & 255
      ]);
    }
    get fixed() {
      let major = this.int16;
      let minor = Math.round(1e3 * this.uint16 / 65356);
      return major + minor / 1e3;
    }
    get legacyFixed() {
      let major = this.uint16;
      let minor = this.uint16.toString(16).padStart(4, 0);
      return parseFloat(`${major}.${minor}`);
    }
    get uint24() {
      return (this.uint8 << 16) + (this.uint8 << 8) + this.uint8;
    }
    get uint128() {
      let value = 0;
      for (let i3 = 0; i3 < 5; i3++) {
        let byte = this.uint8;
        value = value * 128 + (byte & 127);
        if (byte < 128) break;
      }
      return value;
    }
    get longdatetime() {
      return new Date(startDate + 1e3 * parseInt(this.int64.toString()));
    }
    get fword() {
      return this.int16;
    }
    get ufword() {
      return this.uint16;
    }
    get Offset16() {
      return this.uint16;
    }
    get Offset32() {
      return this.uint32;
    }
    get F2DOT14() {
      const bits = p.uint16;
      const integer = [0, 1, -2, -1][bits >> 14];
      const fraction = bits & 16383;
      return integer + fraction / 16384;
    }
    verifyLength() {
      if (this.offset != this.length) {
        console.error(
          `unexpected parsed table size (${this.offset}) for "${this.name}" (expected ${this.length})`
        );
      }
    }
    readBytes(n3 = 0, position = 0, bits = 8, signed = false) {
      n3 = n3 || this.length;
      if (n3 === 0) return [];
      if (position) this.currentPosition = position;
      const fn = `${signed ? `` : `u`}int${bits}`, slice2 = [];
      while (n3--) slice2.push(this[fn]);
      return slice2;
    }
  };
  var ParsedData = class {
    constructor(parser) {
      const pGetter = { enumerable: false, get: () => parser };
      Object.defineProperty(this, `parser`, pGetter);
      const start2 = parser.currentPosition;
      const startGetter = { enumerable: false, get: () => start2 };
      Object.defineProperty(this, `start`, startGetter);
    }
    load(struct) {
      Object.keys(struct).forEach((p22) => {
        let props = Object.getOwnPropertyDescriptor(struct, p22);
        if (props.get) {
          this[p22] = props.get.bind(this);
        } else if (props.value !== void 0) {
          this[p22] = props.value;
        }
      });
      if (this.parser.length) {
        this.parser.verifyLength();
      }
    }
  };
  var SimpleTable = class extends ParsedData {
    constructor(dict, dataview, name2) {
      const { parser, start: start2 } = super(
        new Parser(dict, dataview, name2)
      );
      const pGetter = { enumerable: false, get: () => parser };
      Object.defineProperty(this, `p`, pGetter);
      const startGetter = { enumerable: false, get: () => start2 };
      Object.defineProperty(this, `tableStart`, startGetter);
    }
  };
  function lazy$1(object, property, getter) {
    let val;
    Object.defineProperty(object, property, {
      get: () => {
        if (val) return val;
        val = getter();
        return val;
      },
      enumerable: true
    });
  }
  var SFNT = class extends SimpleTable {
    constructor(font2, dataview, createTable2) {
      const { p: p22 } = super({ offset: 0, length: 12 }, dataview, `sfnt`);
      this.version = p22.uint32;
      this.numTables = p22.uint16;
      this.searchRange = p22.uint16;
      this.entrySelector = p22.uint16;
      this.rangeShift = p22.uint16;
      p22.verifyLength();
      this.directory = [...new Array(this.numTables)].map(
        (_) => new TableRecord(p22)
      );
      this.tables = {};
      this.directory.forEach((entry) => {
        const getter = () => createTable2(
          this.tables,
          {
            tag: entry.tag,
            offset: entry.offset,
            length: entry.length
          },
          dataview
        );
        lazy$1(this.tables, entry.tag.trim(), getter);
      });
    }
  };
  var TableRecord = class {
    constructor(p22) {
      this.tag = p22.tag;
      this.checksum = p22.uint32;
      this.offset = p22.uint32;
      this.length = p22.uint32;
    }
  };
  var gzipDecode = inflate_default.inflate || void 0;
  var nativeGzipDecode = void 0;
  var WOFF$1 = class extends SimpleTable {
    constructor(font2, dataview, createTable2) {
      const { p: p22 } = super({ offset: 0, length: 44 }, dataview, `woff`);
      this.signature = p22.tag;
      this.flavor = p22.uint32;
      this.length = p22.uint32;
      this.numTables = p22.uint16;
      p22.uint16;
      this.totalSfntSize = p22.uint32;
      this.majorVersion = p22.uint16;
      this.minorVersion = p22.uint16;
      this.metaOffset = p22.uint32;
      this.metaLength = p22.uint32;
      this.metaOrigLength = p22.uint32;
      this.privOffset = p22.uint32;
      this.privLength = p22.uint32;
      p22.verifyLength();
      this.directory = [...new Array(this.numTables)].map(
        (_) => new WoffTableDirectoryEntry(p22)
      );
      buildWoffLazyLookups(this, dataview, createTable2);
    }
  };
  var WoffTableDirectoryEntry = class {
    constructor(p22) {
      this.tag = p22.tag;
      this.offset = p22.uint32;
      this.compLength = p22.uint32;
      this.origLength = p22.uint32;
      this.origChecksum = p22.uint32;
    }
  };
  function buildWoffLazyLookups(woff, dataview, createTable2) {
    woff.tables = {};
    woff.directory.forEach((entry) => {
      lazy$1(woff.tables, entry.tag.trim(), () => {
        let offset3 = 0;
        let view = dataview;
        if (entry.compLength !== entry.origLength) {
          const data = dataview.buffer.slice(
            entry.offset,
            entry.offset + entry.compLength
          );
          let unpacked;
          if (gzipDecode) {
            unpacked = gzipDecode(new Uint8Array(data));
          } else if (nativeGzipDecode) {
            unpacked = nativeGzipDecode(new Uint8Array(data));
          } else {
            const msg = `no brotli decoder available to decode WOFF2 font`;
            if (font.onerror) font.onerror(msg);
            throw new Error(msg);
          }
          view = new DataView(unpacked.buffer);
        } else {
          offset3 = entry.offset;
        }
        return createTable2(
          woff.tables,
          { tag: entry.tag, offset: offset3, length: entry.origLength },
          view
        );
      });
    });
  }
  var brotliDecode = unbrotli_default;
  var nativeBrotliDecode = void 0;
  var WOFF2$1 = class extends SimpleTable {
    constructor(font2, dataview, createTable2) {
      const { p: p22 } = super({ offset: 0, length: 48 }, dataview, `woff2`);
      this.signature = p22.tag;
      this.flavor = p22.uint32;
      this.length = p22.uint32;
      this.numTables = p22.uint16;
      p22.uint16;
      this.totalSfntSize = p22.uint32;
      this.totalCompressedSize = p22.uint32;
      this.majorVersion = p22.uint16;
      this.minorVersion = p22.uint16;
      this.metaOffset = p22.uint32;
      this.metaLength = p22.uint32;
      this.metaOrigLength = p22.uint32;
      this.privOffset = p22.uint32;
      this.privLength = p22.uint32;
      p22.verifyLength();
      this.directory = [...new Array(this.numTables)].map(
        (_) => new Woff2TableDirectoryEntry(p22)
      );
      let dictOffset = p22.currentPosition;
      this.directory[0].offset = 0;
      this.directory.forEach((e3, i3) => {
        let next = this.directory[i3 + 1];
        if (next) {
          next.offset = e3.offset + (e3.transformLength !== void 0 ? e3.transformLength : e3.origLength);
        }
      });
      let decoded;
      let buffer = dataview.buffer.slice(dictOffset);
      if (brotliDecode) {
        decoded = brotliDecode(new Uint8Array(buffer));
      } else if (nativeBrotliDecode) {
        decoded = new Uint8Array(nativeBrotliDecode(buffer));
      } else {
        const msg = `no brotli decoder available to decode WOFF2 font`;
        if (font2.onerror) font2.onerror(msg);
        throw new Error(msg);
      }
      buildWoff2LazyLookups(this, decoded, createTable2);
    }
  };
  var Woff2TableDirectoryEntry = class {
    constructor(p22) {
      this.flags = p22.uint8;
      const tagNumber = this.tagNumber = this.flags & 63;
      if (tagNumber === 63) {
        this.tag = p22.tag;
      } else {
        this.tag = getWOFF2Tag(tagNumber);
      }
      const transformVersion = this.transformVersion = (this.flags & 192) >> 6;
      let hasTransforms = transformVersion !== 0;
      if (this.tag === `glyf` || this.tag === `loca`) {
        hasTransforms = this.transformVersion !== 3;
      }
      this.origLength = p22.uint128;
      if (hasTransforms) {
        this.transformLength = p22.uint128;
      }
    }
  };
  function buildWoff2LazyLookups(woff2, decoded, createTable2) {
    woff2.tables = {};
    woff2.directory.forEach((entry) => {
      lazy$1(woff2.tables, entry.tag.trim(), () => {
        const start2 = entry.offset;
        const end = start2 + (entry.transformLength ? entry.transformLength : entry.origLength);
        const data = new DataView(decoded.slice(start2, end).buffer);
        try {
          return createTable2(
            woff2.tables,
            { tag: entry.tag, offset: 0, length: entry.origLength },
            data
          );
        } catch (e3) {
          console.error(e3);
        }
      });
    });
  }
  function getWOFF2Tag(flag) {
    return [
      `cmap`,
      `head`,
      `hhea`,
      `hmtx`,
      `maxp`,
      `name`,
      `OS/2`,
      `post`,
      `cvt `,
      `fpgm`,
      `glyf`,
      `loca`,
      `prep`,
      `CFF `,
      `VORG`,
      `EBDT`,
      `EBLC`,
      `gasp`,
      `hdmx`,
      `kern`,
      `LTSH`,
      `PCLT`,
      `VDMX`,
      `vhea`,
      `vmtx`,
      `BASE`,
      `GDEF`,
      `GPOS`,
      `GSUB`,
      `EBSC`,
      `JSTF`,
      `MATH`,
      `CBDT`,
      `CBLC`,
      `COLR`,
      `CPAL`,
      `SVG `,
      `sbix`,
      `acnt`,
      `avar`,
      `bdat`,
      `bloc`,
      `bsln`,
      `cvar`,
      `fdsc`,
      `feat`,
      `fmtx`,
      `fvar`,
      `gvar`,
      `hsty`,
      `just`,
      `lcar`,
      `mort`,
      `morx`,
      `opbd`,
      `prop`,
      `trak`,
      `Zapf`,
      `Silf`,
      `Glat`,
      `Gloc`,
      `Feat`,
      `Sill`
    ][flag & 63];
  }
  var tableClasses = {};
  var tableClassesLoaded = false;
  Promise.all([
    Promise.resolve().then(function() {
      return cmap$1;
    }),
    Promise.resolve().then(function() {
      return head$1;
    }),
    Promise.resolve().then(function() {
      return hhea$1;
    }),
    Promise.resolve().then(function() {
      return hmtx$1;
    }),
    Promise.resolve().then(function() {
      return maxp$1;
    }),
    Promise.resolve().then(function() {
      return name$1;
    }),
    Promise.resolve().then(function() {
      return OS2$1;
    }),
    Promise.resolve().then(function() {
      return post$1;
    }),
    Promise.resolve().then(function() {
      return BASE$1;
    }),
    Promise.resolve().then(function() {
      return GDEF$1;
    }),
    Promise.resolve().then(function() {
      return GSUB$1;
    }),
    Promise.resolve().then(function() {
      return GPOS$1;
    }),
    Promise.resolve().then(function() {
      return SVG$1;
    }),
    Promise.resolve().then(function() {
      return fvar$1;
    }),
    Promise.resolve().then(function() {
      return cvt$1;
    }),
    Promise.resolve().then(function() {
      return fpgm$1;
    }),
    Promise.resolve().then(function() {
      return gasp$1;
    }),
    Promise.resolve().then(function() {
      return glyf$1;
    }),
    Promise.resolve().then(function() {
      return loca$1;
    }),
    Promise.resolve().then(function() {
      return prep$1;
    }),
    Promise.resolve().then(function() {
      return CFF$1;
    }),
    Promise.resolve().then(function() {
      return CFF2$1;
    }),
    Promise.resolve().then(function() {
      return VORG$1;
    }),
    Promise.resolve().then(function() {
      return EBLC$1;
    }),
    Promise.resolve().then(function() {
      return EBDT$1;
    }),
    Promise.resolve().then(function() {
      return EBSC$1;
    }),
    Promise.resolve().then(function() {
      return CBLC$1;
    }),
    Promise.resolve().then(function() {
      return CBDT$1;
    }),
    Promise.resolve().then(function() {
      return sbix$1;
    }),
    Promise.resolve().then(function() {
      return COLR$1;
    }),
    Promise.resolve().then(function() {
      return CPAL$1;
    }),
    Promise.resolve().then(function() {
      return DSIG$1;
    }),
    Promise.resolve().then(function() {
      return hdmx$1;
    }),
    Promise.resolve().then(function() {
      return kern$1;
    }),
    Promise.resolve().then(function() {
      return LTSH$1;
    }),
    Promise.resolve().then(function() {
      return MERG$1;
    }),
    Promise.resolve().then(function() {
      return meta$1;
    }),
    Promise.resolve().then(function() {
      return PCLT$1;
    }),
    Promise.resolve().then(function() {
      return VDMX$1;
    }),
    Promise.resolve().then(function() {
      return vhea$1;
    }),
    Promise.resolve().then(function() {
      return vmtx$1;
    })
  ]).then((data) => {
    data.forEach((e3) => {
      let name2 = Object.keys(e3)[0];
      tableClasses[name2] = e3[name2];
    });
    tableClassesLoaded = true;
  });
  function createTable(tables, dict, dataview) {
    let name2 = dict.tag.replace(/[^\w\d]/g, ``);
    let Type = tableClasses[name2];
    if (Type) return new Type(dict, dataview, tables);
    console.warn(
      `lib-font has no definition for ${name2}. The table was skipped.`
    );
    return {};
  }
  function loadTableClasses() {
    let count = 0;
    function checkLoaded(resolve, reject) {
      if (!tableClassesLoaded) {
        if (count > 10) {
          return reject(new Error(`loading took too long`));
        }
        count++;
        return setTimeout(() => checkLoaded(resolve), 250);
      }
      resolve(createTable);
    }
    return new Promise((resolve, reject) => checkLoaded(resolve));
  }
  function getFontCSSFormat(path, errorOnStyle) {
    let pos = path.lastIndexOf(`.`);
    let ext = (path.substring(pos + 1) || ``).toLowerCase();
    let format6 = {
      ttf: `truetype`,
      otf: `opentype`,
      woff: `woff`,
      woff2: `woff2`
    }[ext];
    if (format6) return format6;
    let msg = {
      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.`,
      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.`,
      fon: `The .fon format is not supported: this is an ancient Windows bitmap font format.`,
      ttc: `Based on the current CSS specification, font collections are not (yet?) supported.`
    }[ext];
    if (!msg) msg = `${path} is not a known webfont format.`;
    if (errorOnStyle) {
      throw new Error(msg);
    } else {
      console.warn(`Could not load font: ${msg}`);
    }
  }
  async function setupFontFace(name2, url, options = {}) {
    if (!globalThis.document) return;
    let format6 = getFontCSSFormat(url, options.errorOnStyle);
    if (!format6) return;
    let style = document.createElement(`style`);
    style.className = `injected-by-Font-js`;
    let rules = [];
    if (options.styleRules) {
      rules = Object.entries(options.styleRules).map(
        ([key, value]) => `${key}: ${value};`
      );
    }
    style.textContent = `
@font-face {
    font-family: "${name2}";
    ${rules.join(
      `
	`
    )}
    src: url("${url}") format("${format6}");
}`;
    globalThis.document.head.appendChild(style);
    return style;
  }
  var TTF = [0, 1, 0, 0];
  var OTF = [79, 84, 84, 79];
  var WOFF = [119, 79, 70, 70];
  var WOFF2 = [119, 79, 70, 50];
  function match(ar1, ar2) {
    if (ar1.length !== ar2.length) return;
    for (let i3 = 0; i3 < ar1.length; i3++) {
      if (ar1[i3] !== ar2[i3]) return;
    }
    return true;
  }
  function validFontFormat(dataview) {
    const LEAD_BYTES = [
      dataview.getUint8(0),
      dataview.getUint8(1),
      dataview.getUint8(2),
      dataview.getUint8(3)
    ];
    if (match(LEAD_BYTES, TTF) || match(LEAD_BYTES, OTF)) return `SFNT`;
    if (match(LEAD_BYTES, WOFF)) return `WOFF`;
    if (match(LEAD_BYTES, WOFF2)) return `WOFF2`;
  }
  function checkFetchResponseStatus(response) {
    if (!response.ok) {
      throw new Error(
        `HTTP ${response.status} - ${response.statusText}`
      );
    }
    return response;
  }
  var Font = class extends EventManager {
    constructor(name2, options = {}) {
      super();
      this.name = name2;
      this.options = options;
      this.metrics = false;
    }
    get src() {
      return this.__src;
    }
    set src(src) {
      this.__src = src;
      (async () => {
        if (globalThis.document && !this.options.skipStyleSheet) {
          await setupFontFace(this.name, src, this.options);
        }
        this.loadFont(src);
      })();
    }
    async loadFont(url, filename) {
      fetch(url).then(
        (response) => checkFetchResponseStatus(response) && response.arrayBuffer()
      ).then(
        (buffer) => this.fromDataBuffer(buffer, filename || url)
      ).catch((err) => {
        const evt = new Event2(
          `error`,
          err,
          `Failed to load font at ${filename || url}`
        );
        this.dispatch(evt);
        if (this.onerror) this.onerror(evt);
      });
    }
    async fromDataBuffer(buffer, filenameOrUrL) {
      this.fontData = new DataView(buffer);
      let type = validFontFormat(this.fontData);
      if (!type) {
        throw new Error(
          `${filenameOrUrL} is either an unsupported font format, or not a font at all.`
        );
      }
      await this.parseBasicData(type);
      const evt = new Event2("load", { font: this });
      this.dispatch(evt);
      if (this.onload) this.onload(evt);
    }
    async parseBasicData(type) {
      return loadTableClasses().then((createTable2) => {
        if (type === `SFNT`) {
          this.opentype = new SFNT(this, this.fontData, createTable2);
        }
        if (type === `WOFF`) {
          this.opentype = new WOFF$1(this, this.fontData, createTable2);
        }
        if (type === `WOFF2`) {
          this.opentype = new WOFF2$1(this, this.fontData, createTable2);
        }
        return this.opentype;
      });
    }
    getGlyphId(char) {
      return this.opentype.tables.cmap.getGlyphId(char);
    }
    reverse(glyphid) {
      return this.opentype.tables.cmap.reverse(glyphid);
    }
    supports(char) {
      return this.getGlyphId(char) !== 0;
    }
    supportsVariation(variation) {
      return this.opentype.tables.cmap.supportsVariation(variation) !== false;
    }
    measureText(text, size3 = 16) {
      if (this.__unloaded)
        throw new Error(
          "Cannot measure text: font was unloaded. Please reload before calling measureText()"
        );
      let d3 = document.createElement("div");
      d3.textContent = text;
      d3.style.fontFamily = this.name;
      d3.style.fontSize = `${size3}px`;
      d3.style.color = `transparent`;
      d3.style.background = `transparent`;
      d3.style.top = `0`;
      d3.style.left = `0`;
      d3.style.position = `absolute`;
      document.body.appendChild(d3);
      let bbox = d3.getBoundingClientRect();
      document.body.removeChild(d3);
      const OS22 = this.opentype.tables["OS/2"];
      bbox.fontSize = size3;
      bbox.ascender = OS22.sTypoAscender;
      bbox.descender = OS22.sTypoDescender;
      return bbox;
    }
    unload() {
      if (this.styleElement.parentNode) {
        this.styleElement.parentNode.removeElement(this.styleElement);
        const evt = new Event2("unload", { font: this });
        this.dispatch(evt);
        if (this.onunload) this.onunload(evt);
      }
      this._unloaded = true;
    }
    load() {
      if (this.__unloaded) {
        delete this.__unloaded;
        document.head.appendChild(this.styleElement);
        const evt = new Event2("load", { font: this });
        this.dispatch(evt);
        if (this.onload) this.onload(evt);
      }
    }
  };
  globalThis.Font = Font;
  var Subtable = class extends ParsedData {
    constructor(p22, plaformID, encodingID) {
      super(p22);
      this.plaformID = plaformID;
      this.encodingID = encodingID;
    }
  };
  var Format0 = class extends Subtable {
    constructor(p22, platformID, encodingID) {
      super(p22, platformID, encodingID);
      this.format = 0;
      this.length = p22.uint16;
      this.language = p22.uint16;
      this.glyphIdArray = [...new Array(256)].map((_) => p22.uint8);
    }
    supports(charCode) {
      if (charCode.charCodeAt) {
        charCode = -1;
        console.warn(
          `supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.`
        );
      }
      return 0 <= charCode && charCode <= 255;
    }
    reverse(glyphID) {
      console.warn(`reverse not implemented for cmap subtable format 0`);
      return {};
    }
    getSupportedCharCodes() {
      return [{ start: 1, end: 256 }];
    }
  };
  var Format2 = class extends Subtable {
    constructor(p22, platformID, encodingID) {
      super(p22, platformID, encodingID);
      this.format = 2;
      this.length = p22.uint16;
      this.language = p22.uint16;
      this.subHeaderKeys = [...new Array(256)].map((_) => p22.uint16);
      const subHeaderCount = Math.max(...this.subHeaderKeys);
      const subHeaderOffset = p22.currentPosition;
      lazy$1(this, `subHeaders`, () => {
        p22.currentPosition = subHeaderOffset;
        return [...new Array(subHeaderCount)].map(
          (_) => new SubHeader(p22)
        );
      });
      const glyphIndexOffset = subHeaderOffset + subHeaderCount * 8;
      lazy$1(this, `glyphIndexArray`, () => {
        p22.currentPosition = glyphIndexOffset;
        return [...new Array(subHeaderCount)].map((_) => p22.uint16);
      });
    }
    supports(charCode) {
      if (charCode.charCodeAt) {
        charCode = -1;
        console.warn(
          `supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented.`
        );
      }
      const low = charCode && 255;
      const high = charCode && 65280;
      const subHeaderKey = this.subHeaders[high];
      const subheader = this.subHeaders[subHeaderKey];
      const first = subheader.firstCode;
      const last = first + subheader.entryCount;
      return first <= low && low <= last;
    }
    reverse(glyphID) {
      console.warn(`reverse not implemented for cmap subtable format 2`);
      return {};
    }
    getSupportedCharCodes(preservePropNames = false) {
      if (preservePropNames) {
        return this.subHeaders.map((h3) => ({
          firstCode: h3.firstCode,
          lastCode: h3.lastCode
        }));
      }
      return this.subHeaders.map((h3) => ({
        start: h3.firstCode,
        end: h3.lastCode
      }));
    }
  };
  var SubHeader = class {
    constructor(p22) {
      this.firstCode = p22.uint16;
      this.entryCount = p22.uint16;
      this.lastCode = this.first + this.entryCount;
      this.idDelta = p22.int16;
      this.idRangeOffset = p22.uint16;
    }
  };
  var Format4 = class extends Subtable {
    constructor(p22, platformID, encodingID) {
      super(p22, platformID, encodingID);
      this.format = 4;
      this.length = p22.uint16;
      this.language = p22.uint16;
      this.segCountX2 = p22.uint16;
      this.segCount = this.segCountX2 / 2;
      this.searchRange = p22.uint16;
      this.entrySelector = p22.uint16;
      this.rangeShift = p22.uint16;
      const endCodePosition = p22.currentPosition;
      lazy$1(
        this,
        `endCode`,
        () => p22.readBytes(this.segCount, endCodePosition, 16)
      );
      const startCodePosition = endCodePosition + 2 + this.segCountX2;
      lazy$1(
        this,
        `startCode`,
        () => p22.readBytes(this.segCount, startCodePosition, 16)
      );
      const idDeltaPosition = startCodePosition + this.segCountX2;
      lazy$1(
        this,
        `idDelta`,
        () => p22.readBytes(this.segCount, idDeltaPosition, 16, true)
      );
      const idRangePosition = idDeltaPosition + this.segCountX2;
      lazy$1(
        this,
        `idRangeOffset`,
        () => p22.readBytes(this.segCount, idRangePosition, 16)
      );
      const glyphIdArrayPosition = idRangePosition + this.segCountX2;
      const glyphIdArrayLength = this.length - (glyphIdArrayPosition - this.tableStart);
      lazy$1(
        this,
        `glyphIdArray`,
        () => p22.readBytes(glyphIdArrayLength, glyphIdArrayPosition, 16)
      );
      lazy$1(
        this,
        `segments`,
        () => this.buildSegments(idRangePosition, glyphIdArrayPosition, p22)
      );
    }
    buildSegments(idRangePosition, glyphIdArrayPosition, p22) {
      const build = (_, i3) => {
        let startCode = this.startCode[i3], endCode = this.endCode[i3], idDelta = this.idDelta[i3], idRangeOffset = this.idRangeOffset[i3], idRangeOffsetPointer = idRangePosition + 2 * i3, glyphIDs = [];
        if (idRangeOffset === 0) {
          for (let i22 = startCode + idDelta, e3 = endCode + idDelta; i22 <= e3; i22++) {
            glyphIDs.push(i22);
          }
        } else {
          for (let i22 = 0, e3 = endCode - startCode; i22 <= e3; i22++) {
            p22.currentPosition = idRangeOffsetPointer + idRangeOffset + i22 * 2;
            glyphIDs.push(p22.uint16);
          }
        }
        return {
          startCode,
          endCode,
          idDelta,
          idRangeOffset,
          glyphIDs
        };
      };
      return [...new Array(this.segCount)].map(build);
    }
    reverse(glyphID) {
      let s3 = this.segments.find((v3) => v3.glyphIDs.includes(glyphID));
      if (!s3) return {};
      const code = s3.startCode + s3.glyphIDs.indexOf(glyphID);
      return { code, unicode: String.fromCodePoint(code) };
    }
    getGlyphId(charCode) {
      if (charCode.charCodeAt) charCode = charCode.charCodeAt(0);
      if (55296 <= charCode && charCode <= 57343) return 0;
      if ((charCode & 65534) === 65534 || (charCode & 65535) === 65535)
        return 0;
      let segment = this.segments.find(
        (s3) => s3.startCode <= charCode && charCode <= s3.endCode
      );
      if (!segment) return 0;
      return segment.glyphIDs[charCode - segment.startCode];
    }
    supports(charCode) {
      return this.getGlyphId(charCode) !== 0;
    }
    getSupportedCharCodes(preservePropNames = false) {
      if (preservePropNames) return this.segments;
      return this.segments.map((v3) => ({
        start: v3.startCode,
        end: v3.endCode
      }));
    }
  };
  var Format6 = class extends Subtable {
    constructor(p22, platformID, encodingID) {
      super(p22, platformID, encodingID);
      this.format = 6;
      this.length = p22.uint16;
      this.language = p22.uint16;
      this.firstCode = p22.uint16;
      this.entryCount = p22.uint16;
      this.lastCode = this.firstCode + this.entryCount - 1;
      const getter = () => [...new Array(this.entryCount)].map((_) => p22.uint16);
      lazy$1(this, `glyphIdArray`, getter);
    }
    supports(charCode) {
      if (charCode.charCodeAt) {
        charCode = -1;
        console.warn(
          `supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.`
        );
      }
      if (charCode < this.firstCode) return {};
      if (charCode > this.firstCode + this.entryCount) return {};
      const code = charCode - this.firstCode;
      return { code, unicode: String.fromCodePoint(code) };
    }
    reverse(glyphID) {
      let pos = this.glyphIdArray.indexOf(glyphID);
      if (pos > -1) return this.firstCode + pos;
    }
    getSupportedCharCodes(preservePropNames = false) {
      if (preservePropNames) {
        return [{ firstCode: this.firstCode, lastCode: this.lastCode }];
      }
      return [{ start: this.firstCode, end: this.lastCode }];
    }
  };
  var Format8 = class extends Subtable {
    constructor(p22, platformID, encodingID) {
      super(p22, platformID, encodingID);
      this.format = 8;
      p22.uint16;
      this.length = p22.uint32;
      this.language = p22.uint32;
      this.is32 = [...new Array(8192)].map((_) => p22.uint8);
      this.numGroups = p22.uint32;
      const getter = () => [...new Array(this.numGroups)].map(
        (_) => new SequentialMapGroup$1(p22)
      );
      lazy$1(this, `groups`, getter);
    }
    supports(charCode) {
      if (charCode.charCodeAt) {
        charCode = -1;
        console.warn(
          `supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.`
        );
      }
      return this.groups.findIndex(
        (s3) => s3.startcharCode <= charCode && charCode <= s3.endcharCode
      ) !== -1;
    }
    reverse(glyphID) {
      console.warn(`reverse not implemented for cmap subtable format 8`);
      return {};
    }
    getSupportedCharCodes(preservePropNames = false) {
      if (preservePropNames) return this.groups;
      return this.groups.map((v3) => ({
        start: v3.startcharCode,
        end: v3.endcharCode
      }));
    }
  };
  var SequentialMapGroup$1 = class {
    constructor(p22) {
      this.startcharCode = p22.uint32;
      this.endcharCode = p22.uint32;
      this.startGlyphID = p22.uint32;
    }
  };
  var Format10 = class extends Subtable {
    constructor(p22, platformID, encodingID) {
      super(p22, platformID, encodingID);
      this.format = 10;
      p22.uint16;
      this.length = p22.uint32;
      this.language = p22.uint32;
      this.startCharCode = p22.uint32;
      this.numChars = p22.uint32;
      this.endCharCode = this.startCharCode + this.numChars;
      const getter = () => [...new Array(this.numChars)].map((_) => p22.uint16);
      lazy$1(this, `glyphs`, getter);
    }
    supports(charCode) {
      if (charCode.charCodeAt) {
        charCode = -1;
        console.warn(
          `supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.`
        );
      }
      if (charCode < this.startCharCode) return false;
      if (charCode > this.startCharCode + this.numChars) return false;
      return charCode - this.startCharCode;
    }
    reverse(glyphID) {
      console.warn(`reverse not implemented for cmap subtable format 10`);
      return {};
    }
    getSupportedCharCodes(preservePropNames = false) {
      if (preservePropNames) {
        return [
          {
            startCharCode: this.startCharCode,
            endCharCode: this.endCharCode
          }
        ];
      }
      return [{ start: this.startCharCode, end: this.endCharCode }];
    }
  };
  var Format12 = class extends Subtable {
    constructor(p22, platformID, encodingID) {
      super(p22, platformID, encodingID);
      this.format = 12;
      p22.uint16;
      this.length = p22.uint32;
      this.language = p22.uint32;
      this.numGroups = p22.uint32;
      const getter = () => [...new Array(this.numGroups)].map(
        (_) => new SequentialMapGroup(p22)
      );
      lazy$1(this, `groups`, getter);
    }
    supports(charCode) {
      if (charCode.charCodeAt) charCode = charCode.charCodeAt(0);
      if (55296 <= charCode && charCode <= 57343) return 0;
      if ((charCode & 65534) === 65534 || (charCode & 65535) === 65535)
        return 0;
      return this.groups.findIndex(
        (s3) => s3.startCharCode <= charCode && charCode <= s3.endCharCode
      ) !== -1;
    }
    reverse(glyphID) {
      for (let group of this.groups) {
        let start2 = group.startGlyphID;
        if (start2 > glyphID) continue;
        if (start2 === glyphID) return group.startCharCode;
        let end = start2 + (group.endCharCode - group.startCharCode);
        if (end < glyphID) continue;
        const code = group.startCharCode + (glyphID - start2);
        return { code, unicode: String.fromCodePoint(code) };
      }
      return {};
    }
    getSupportedCharCodes(preservePropNames = false) {
      if (preservePropNames) return this.groups;
      return this.groups.map((v3) => ({
        start: v3.startCharCode,
        end: v3.endCharCode
      }));
    }
  };
  var SequentialMapGroup = class {
    constructor(p22) {
      this.startCharCode = p22.uint32;
      this.endCharCode = p22.uint32;
      this.startGlyphID = p22.uint32;
    }
  };
  var Format13 = class extends Subtable {
    constructor(p22, platformID, encodingID) {
      super(p22, platformID, encodingID);
      this.format = 13;
      p22.uint16;
      this.length = p22.uint32;
      this.language = p22.uint32;
      this.numGroups = p22.uint32;
      const getter = [...new Array(this.numGroups)].map(
        (_) => new ConstantMapGroup(p22)
      );
      lazy$1(this, `groups`, getter);
    }
    supports(charCode) {
      if (charCode.charCodeAt) charCode = charCode.charCodeAt(0);
      return this.groups.findIndex(
        (s3) => s3.startCharCode <= charCode && charCode <= s3.endCharCode
      ) !== -1;
    }
    reverse(glyphID) {
      console.warn(`reverse not implemented for cmap subtable format 13`);
      return {};
    }
    getSupportedCharCodes(preservePropNames = false) {
      if (preservePropNames) return this.groups;
      return this.groups.map((v3) => ({
        start: v3.startCharCode,
        end: v3.endCharCode
      }));
    }
  };
  var ConstantMapGroup = class {
    constructor(p22) {
      this.startCharCode = p22.uint32;
      this.endCharCode = p22.uint32;
      this.glyphID = p22.uint32;
    }
  };
  var Format14 = class extends Subtable {
    constructor(p22, platformID, encodingID) {
      super(p22, platformID, encodingID);
      this.subTableStart = p22.currentPosition;
      this.format = 14;
      this.length = p22.uint32;
      this.numVarSelectorRecords = p22.uint32;
      lazy$1(
        this,
        `varSelectors`,
        () => [...new Array(this.numVarSelectorRecords)].map(
          (_) => new VariationSelector(p22)
        )
      );
    }
    supports() {
      console.warn(`supports not implemented for cmap subtable format 14`);
      return 0;
    }
    getSupportedCharCodes() {
      console.warn(
        `getSupportedCharCodes not implemented for cmap subtable format 14`
      );
      return [];
    }
    reverse(glyphID) {
      console.warn(`reverse not implemented for cmap subtable format 14`);
      return {};
    }
    supportsVariation(variation) {
      let v3 = this.varSelector.find(
        (uvs) => uvs.varSelector === variation
      );
      return v3 ? v3 : false;
    }
    getSupportedVariations() {
      return this.varSelectors.map((v3) => v3.varSelector);
    }
  };
  var VariationSelector = class {
    constructor(p22) {
      this.varSelector = p22.uint24;
      this.defaultUVSOffset = p22.Offset32;
      this.nonDefaultUVSOffset = p22.Offset32;
    }
  };
  function createSubTable(parser, platformID, encodingID) {
    const format6 = parser.uint16;
    if (format6 === 0) return new Format0(parser, platformID, encodingID);
    if (format6 === 2) return new Format2(parser, platformID, encodingID);
    if (format6 === 4) return new Format4(parser, platformID, encodingID);
    if (format6 === 6) return new Format6(parser, platformID, encodingID);
    if (format6 === 8) return new Format8(parser, platformID, encodingID);
    if (format6 === 10) return new Format10(parser, platformID, encodingID);
    if (format6 === 12) return new Format12(parser, platformID, encodingID);
    if (format6 === 13) return new Format13(parser, platformID, encodingID);
    if (format6 === 14) return new Format14(parser, platformID, encodingID);
    return {};
  }
  var cmap = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint16;
      this.numTables = p22.uint16;
      this.encodingRecords = [...new Array(this.numTables)].map(
        (_) => new EncodingRecord(p22, this.tableStart)
      );
    }
    getSubTable(tableID) {
      return this.encodingRecords[tableID].table;
    }
    getSupportedEncodings() {
      return this.encodingRecords.map((r4) => ({
        platformID: r4.platformID,
        encodingId: r4.encodingID
      }));
    }
    getSupportedCharCodes(platformID, encodingID) {
      const recordID = this.encodingRecords.findIndex(
        (r4) => r4.platformID === platformID && r4.encodingID === encodingID
      );
      if (recordID === -1) return false;
      const subtable = this.getSubTable(recordID);
      return subtable.getSupportedCharCodes();
    }
    reverse(glyphid) {
      for (let i3 = 0; i3 < this.numTables; i3++) {
        let code = this.getSubTable(i3).reverse(glyphid);
        if (code) return code;
      }
    }
    getGlyphId(char) {
      let last = 0;
      this.encodingRecords.some((_, tableID) => {
        let t4 = this.getSubTable(tableID);
        if (!t4.getGlyphId) return false;
        last = t4.getGlyphId(char);
        return last !== 0;
      });
      return last;
    }
    supports(char) {
      return this.encodingRecords.some((_, tableID) => {
        const t4 = this.getSubTable(tableID);
        return t4.supports && t4.supports(char) !== false;
      });
    }
    supportsVariation(variation) {
      return this.encodingRecords.some((_, tableID) => {
        const t4 = this.getSubTable(tableID);
        return t4.supportsVariation && t4.supportsVariation(variation) !== false;
      });
    }
  };
  var EncodingRecord = class {
    constructor(p22, tableStart) {
      const platformID = this.platformID = p22.uint16;
      const encodingID = this.encodingID = p22.uint16;
      const offset3 = this.offset = p22.Offset32;
      lazy$1(this, `table`, () => {
        p22.currentPosition = tableStart + offset3;
        return createSubTable(p22, platformID, encodingID);
      });
    }
  };
  var cmap$1 = Object.freeze({ __proto__: null, cmap });
  var head = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.load({
        majorVersion: p22.uint16,
        minorVersion: p22.uint16,
        fontRevision: p22.fixed,
        checkSumAdjustment: p22.uint32,
        magicNumber: p22.uint32,
        flags: p22.flags(16),
        unitsPerEm: p22.uint16,
        created: p22.longdatetime,
        modified: p22.longdatetime,
        xMin: p22.int16,
        yMin: p22.int16,
        xMax: p22.int16,
        yMax: p22.int16,
        macStyle: p22.flags(16),
        lowestRecPPEM: p22.uint16,
        fontDirectionHint: p22.uint16,
        indexToLocFormat: p22.uint16,
        glyphDataFormat: p22.uint16
      });
    }
  };
  var head$1 = Object.freeze({ __proto__: null, head });
  var hhea = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.majorVersion = p22.uint16;
      this.minorVersion = p22.uint16;
      this.ascender = p22.fword;
      this.descender = p22.fword;
      this.lineGap = p22.fword;
      this.advanceWidthMax = p22.ufword;
      this.minLeftSideBearing = p22.fword;
      this.minRightSideBearing = p22.fword;
      this.xMaxExtent = p22.fword;
      this.caretSlopeRise = p22.int16;
      this.caretSlopeRun = p22.int16;
      this.caretOffset = p22.int16;
      p22.int16;
      p22.int16;
      p22.int16;
      p22.int16;
      this.metricDataFormat = p22.int16;
      this.numberOfHMetrics = p22.uint16;
      p22.verifyLength();
    }
  };
  var hhea$1 = Object.freeze({ __proto__: null, hhea });
  var hmtx = class extends SimpleTable {
    constructor(dict, dataview, tables) {
      const { p: p22 } = super(dict, dataview);
      const numberOfHMetrics = tables.hhea.numberOfHMetrics;
      const numGlyphs = tables.maxp.numGlyphs;
      const metricsStart = p22.currentPosition;
      lazy$1(this, `hMetrics`, () => {
        p22.currentPosition = metricsStart;
        return [...new Array(numberOfHMetrics)].map(
          (_) => new LongHorMetric(p22.uint16, p22.int16)
        );
      });
      if (numberOfHMetrics < numGlyphs) {
        const lsbStart = metricsStart + numberOfHMetrics * 4;
        lazy$1(this, `leftSideBearings`, () => {
          p22.currentPosition = lsbStart;
          return [...new Array(numGlyphs - numberOfHMetrics)].map(
            (_) => p22.int16
          );
        });
      }
    }
  };
  var LongHorMetric = class {
    constructor(w3, b3) {
      this.advanceWidth = w3;
      this.lsb = b3;
    }
  };
  var hmtx$1 = Object.freeze({ __proto__: null, hmtx });
  var maxp = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.legacyFixed;
      this.numGlyphs = p22.uint16;
      if (this.version === 1) {
        this.maxPoints = p22.uint16;
        this.maxContours = p22.uint16;
        this.maxCompositePoints = p22.uint16;
        this.maxCompositeContours = p22.uint16;
        this.maxZones = p22.uint16;
        this.maxTwilightPoints = p22.uint16;
        this.maxStorage = p22.uint16;
        this.maxFunctionDefs = p22.uint16;
        this.maxInstructionDefs = p22.uint16;
        this.maxStackElements = p22.uint16;
        this.maxSizeOfInstructions = p22.uint16;
        this.maxComponentElements = p22.uint16;
        this.maxComponentDepth = p22.uint16;
      }
      p22.verifyLength();
    }
  };
  var maxp$1 = Object.freeze({ __proto__: null, maxp });
  var name = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.format = p22.uint16;
      this.count = p22.uint16;
      this.stringOffset = p22.Offset16;
      this.nameRecords = [...new Array(this.count)].map(
        (_) => new NameRecord(p22, this)
      );
      if (this.format === 1) {
        this.langTagCount = p22.uint16;
        this.langTagRecords = [...new Array(this.langTagCount)].map(
          (_) => new LangTagRecord(p22.uint16, p22.Offset16)
        );
      }
      this.stringStart = this.tableStart + this.stringOffset;
    }
    get(nameID) {
      let record = this.nameRecords.find(
        (record2) => record2.nameID === nameID
      );
      if (record) return record.string;
    }
  };
  var LangTagRecord = class {
    constructor(length, offset3) {
      this.length = length;
      this.offset = offset3;
    }
  };
  var NameRecord = class {
    constructor(p22, nameTable) {
      this.platformID = p22.uint16;
      this.encodingID = p22.uint16;
      this.languageID = p22.uint16;
      this.nameID = p22.uint16;
      this.length = p22.uint16;
      this.offset = p22.Offset16;
      lazy$1(this, `string`, () => {
        p22.currentPosition = nameTable.stringStart + this.offset;
        return decodeString(p22, this);
      });
    }
  };
  function decodeString(p22, record) {
    const { platformID, length } = record;
    if (length === 0) return ``;
    if (platformID === 0 || platformID === 3) {
      const str2 = [];
      for (let i3 = 0, e3 = length / 2; i3 < e3; i3++)
        str2[i3] = String.fromCharCode(p22.uint16);
      return str2.join(``);
    }
    const bytes = p22.readBytes(length);
    const str = [];
    bytes.forEach(function(b3, i3) {
      str[i3] = String.fromCharCode(b3);
    });
    return str.join(``);
  }
  var name$1 = Object.freeze({ __proto__: null, name });
  var OS2 = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint16;
      this.xAvgCharWidth = p22.int16;
      this.usWeightClass = p22.uint16;
      this.usWidthClass = p22.uint16;
      this.fsType = p22.uint16;
      this.ySubscriptXSize = p22.int16;
      this.ySubscriptYSize = p22.int16;
      this.ySubscriptXOffset = p22.int16;
      this.ySubscriptYOffset = p22.int16;
      this.ySuperscriptXSize = p22.int16;
      this.ySuperscriptYSize = p22.int16;
      this.ySuperscriptXOffset = p22.int16;
      this.ySuperscriptYOffset = p22.int16;
      this.yStrikeoutSize = p22.int16;
      this.yStrikeoutPosition = p22.int16;
      this.sFamilyClass = p22.int16;
      this.panose = [...new Array(10)].map((_) => p22.uint8);
      this.ulUnicodeRange1 = p22.flags(32);
      this.ulUnicodeRange2 = p22.flags(32);
      this.ulUnicodeRange3 = p22.flags(32);
      this.ulUnicodeRange4 = p22.flags(32);
      this.achVendID = p22.tag;
      this.fsSelection = p22.uint16;
      this.usFirstCharIndex = p22.uint16;
      this.usLastCharIndex = p22.uint16;
      this.sTypoAscender = p22.int16;
      this.sTypoDescender = p22.int16;
      this.sTypoLineGap = p22.int16;
      this.usWinAscent = p22.uint16;
      this.usWinDescent = p22.uint16;
      if (this.version === 0) return p22.verifyLength();
      this.ulCodePageRange1 = p22.flags(32);
      this.ulCodePageRange2 = p22.flags(32);
      if (this.version === 1) return p22.verifyLength();
      this.sxHeight = p22.int16;
      this.sCapHeight = p22.int16;
      this.usDefaultChar = p22.uint16;
      this.usBreakChar = p22.uint16;
      this.usMaxContext = p22.uint16;
      if (this.version <= 4) return p22.verifyLength();
      this.usLowerOpticalPointSize = p22.uint16;
      this.usUpperOpticalPointSize = p22.uint16;
      if (this.version === 5) return p22.verifyLength();
    }
  };
  var OS2$1 = Object.freeze({ __proto__: null, OS2 });
  var post = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.legacyFixed;
      this.italicAngle = p22.fixed;
      this.underlinePosition = p22.fword;
      this.underlineThickness = p22.fword;
      this.isFixedPitch = p22.uint32;
      this.minMemType42 = p22.uint32;
      this.maxMemType42 = p22.uint32;
      this.minMemType1 = p22.uint32;
      this.maxMemType1 = p22.uint32;
      if (this.version === 1 || this.version === 3) return p22.verifyLength();
      this.numGlyphs = p22.uint16;
      if (this.version === 2) {
        this.glyphNameIndex = [...new Array(this.numGlyphs)].map(
          (_) => p22.uint16
        );
        this.namesOffset = p22.currentPosition;
        this.glyphNameOffsets = [1];
        for (let i3 = 0; i3 < this.numGlyphs; i3++) {
          let index2 = this.glyphNameIndex[i3];
          if (index2 < macStrings.length) {
            this.glyphNameOffsets.push(this.glyphNameOffsets[i3]);
            continue;
          }
          let bytelength = p22.int8;
          p22.skip(bytelength);
          this.glyphNameOffsets.push(
            this.glyphNameOffsets[i3] + bytelength + 1
          );
        }
      }
      if (this.version === 2.5) {
        this.offset = [...new Array(this.numGlyphs)].map(
          (_) => p22.int8
        );
      }
    }
    getGlyphName(glyphid) {
      if (this.version !== 2) {
        console.warn(
          `post table version ${this.version} does not support glyph name lookups`
        );
        return ``;
      }
      let index2 = this.glyphNameIndex[glyphid];
      if (index2 < 258) return macStrings[index2];
      let offset3 = this.glyphNameOffsets[glyphid];
      let next = this.glyphNameOffsets[glyphid + 1];
      let len = next - offset3 - 1;
      if (len === 0) return `.notdef.`;
      this.parser.currentPosition = this.namesOffset + offset3;
      const data = this.parser.readBytes(
        len,
        this.namesOffset + offset3,
        8,
        true
      );
      return data.map((b3) => String.fromCharCode(b3)).join(``);
    }
  };
  var macStrings = [
    `.notdef`,
    `.null`,
    `nonmarkingreturn`,
    `space`,
    `exclam`,
    `quotedbl`,
    `numbersign`,
    `dollar`,
    `percent`,
    `ampersand`,
    `quotesingle`,
    `parenleft`,
    `parenright`,
    `asterisk`,
    `plus`,
    `comma`,
    `hyphen`,
    `period`,
    `slash`,
    `zero`,
    `one`,
    `two`,
    `three`,
    `four`,
    `five`,
    `six`,
    `seven`,
    `eight`,
    `nine`,
    `colon`,
    `semicolon`,
    `less`,
    `equal`,
    `greater`,
    `question`,
    `at`,
    `A`,
    `B`,
    `C`,
    `D`,
    `E`,
    `F`,
    `G`,
    `H`,
    `I`,
    `J`,
    `K`,
    `L`,
    `M`,
    `N`,
    `O`,
    `P`,
    `Q`,
    `R`,
    `S`,
    `T`,
    `U`,
    `V`,
    `W`,
    `X`,
    `Y`,
    `Z`,
    `bracketleft`,
    `backslash`,
    `bracketright`,
    `asciicircum`,
    `underscore`,
    `grave`,
    `a`,
    `b`,
    `c`,
    `d`,
    `e`,
    `f`,
    `g`,
    `h`,
    `i`,
    `j`,
    `k`,
    `l`,
    `m`,
    `n`,
    `o`,
    `p`,
    `q`,
    `r`,
    `s`,
    `t`,
    `u`,
    `v`,
    `w`,
    `x`,
    `y`,
    `z`,
    `braceleft`,
    `bar`,
    `braceright`,
    `asciitilde`,
    `Adieresis`,
    `Aring`,
    `Ccedilla`,
    `Eacute`,
    `Ntilde`,
    `Odieresis`,
    `Udieresis`,
    `aacute`,
    `agrave`,
    `acircumflex`,
    `adieresis`,
    `atilde`,
    `aring`,
    `ccedilla`,
    `eacute`,
    `egrave`,
    `ecircumflex`,
    `edieresis`,
    `iacute`,
    `igrave`,
    `icircumflex`,
    `idieresis`,
    `ntilde`,
    `oacute`,
    `ograve`,
    `ocircumflex`,
    `odieresis`,
    `otilde`,
    `uacute`,
    `ugrave`,
    `ucircumflex`,
    `udieresis`,
    `dagger`,
    `degree`,
    `cent`,
    `sterling`,
    `section`,
    `bullet`,
    `paragraph`,
    `germandbls`,
    `registered`,
    `copyright`,
    `trademark`,
    `acute`,
    `dieresis`,
    `notequal`,
    `AE`,
    `Oslash`,
    `infinity`,
    `plusminus`,
    `lessequal`,
    `greaterequal`,
    `yen`,
    `mu`,
    `partialdiff`,
    `summation`,
    `product`,
    `pi`,
    `integral`,
    `ordfeminine`,
    `ordmasculine`,
    `Omega`,
    `ae`,
    `oslash`,
    `questiondown`,
    `exclamdown`,
    `logicalnot`,
    `radical`,
    `florin`,
    `approxequal`,
    `Delta`,
    `guillemotleft`,
    `guillemotright`,
    `ellipsis`,
    `nonbreakingspace`,
    `Agrave`,
    `Atilde`,
    `Otilde`,
    `OE`,
    `oe`,
    `endash`,
    `emdash`,
    `quotedblleft`,
    `quotedblright`,
    `quoteleft`,
    `quoteright`,
    `divide`,
    `lozenge`,
    `ydieresis`,
    `Ydieresis`,
    `fraction`,
    `currency`,
    `guilsinglleft`,
    `guilsinglright`,
    `fi`,
    `fl`,
    `daggerdbl`,
    `periodcentered`,
    `quotesinglbase`,
    `quotedblbase`,
    `perthousand`,
    `Acircumflex`,
    `Ecircumflex`,
    `Aacute`,
    `Edieresis`,
    `Egrave`,
    `Iacute`,
    `Icircumflex`,
    `Idieresis`,
    `Igrave`,
    `Oacute`,
    `Ocircumflex`,
    `apple`,
    `Ograve`,
    `Uacute`,
    `Ucircumflex`,
    `Ugrave`,
    `dotlessi`,
    `circumflex`,
    `tilde`,
    `macron`,
    `breve`,
    `dotaccent`,
    `ring`,
    `cedilla`,
    `hungarumlaut`,
    `ogonek`,
    `caron`,
    `Lslash`,
    `lslash`,
    `Scaron`,
    `scaron`,
    `Zcaron`,
    `zcaron`,
    `brokenbar`,
    `Eth`,
    `eth`,
    `Yacute`,
    `yacute`,
    `Thorn`,
    `thorn`,
    `minus`,
    `multiply`,
    `onesuperior`,
    `twosuperior`,
    `threesuperior`,
    `onehalf`,
    `onequarter`,
    `threequarters`,
    `franc`,
    `Gbreve`,
    `gbreve`,
    `Idotaccent`,
    `Scedilla`,
    `scedilla`,
    `Cacute`,
    `cacute`,
    `Ccaron`,
    `ccaron`,
    `dcroat`
  ];
  var post$1 = Object.freeze({ __proto__: null, post });
  var BASE = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.majorVersion = p22.uint16;
      this.minorVersion = p22.uint16;
      this.horizAxisOffset = p22.Offset16;
      this.vertAxisOffset = p22.Offset16;
      lazy$1(
        this,
        `horizAxis`,
        () => new AxisTable(
          { offset: dict.offset + this.horizAxisOffset },
          dataview
        )
      );
      lazy$1(
        this,
        `vertAxis`,
        () => new AxisTable(
          { offset: dict.offset + this.vertAxisOffset },
          dataview
        )
      );
      if (this.majorVersion === 1 && this.minorVersion === 1) {
        this.itemVarStoreOffset = p22.Offset32;
        lazy$1(
          this,
          `itemVarStore`,
          () => new AxisTable(
            { offset: dict.offset + this.itemVarStoreOffset },
            dataview
          )
        );
      }
    }
  };
  var AxisTable = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview, `AxisTable`);
      this.baseTagListOffset = p22.Offset16;
      this.baseScriptListOffset = p22.Offset16;
      lazy$1(
        this,
        `baseTagList`,
        () => new BaseTagListTable(
          { offset: dict.offset + this.baseTagListOffset },
          dataview
        )
      );
      lazy$1(
        this,
        `baseScriptList`,
        () => new BaseScriptListTable(
          { offset: dict.offset + this.baseScriptListOffset },
          dataview
        )
      );
    }
  };
  var BaseTagListTable = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview, `BaseTagListTable`);
      this.baseTagCount = p22.uint16;
      this.baselineTags = [...new Array(this.baseTagCount)].map(
        (_) => p22.tag
      );
    }
  };
  var BaseScriptListTable = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview, `BaseScriptListTable`);
      this.baseScriptCount = p22.uint16;
      const recordStart = p22.currentPosition;
      lazy$1(this, `baseScriptRecords`, () => {
        p22.currentPosition = recordStart;
        return [...new Array(this.baseScriptCount)].map(
          (_) => new BaseScriptRecord(this.start, p22)
        );
      });
    }
  };
  var BaseScriptRecord = class {
    constructor(baseScriptListTableStart, p22) {
      this.baseScriptTag = p22.tag;
      this.baseScriptOffset = p22.Offset16;
      lazy$1(this, `baseScriptTable`, () => {
        p22.currentPosition = baseScriptListTableStart + this.baseScriptOffset;
        return new BaseScriptTable(p22);
      });
    }
  };
  var BaseScriptTable = class {
    constructor(p22) {
      this.start = p22.currentPosition;
      this.baseValuesOffset = p22.Offset16;
      this.defaultMinMaxOffset = p22.Offset16;
      this.baseLangSysCount = p22.uint16;
      this.baseLangSysRecords = [...new Array(this.baseLangSysCount)].map(
        (_) => new BaseLangSysRecord(this.start, p22)
      );
      lazy$1(this, `baseValues`, () => {
        p22.currentPosition = this.start + this.baseValuesOffset;
        return new BaseValuesTable(p22);
      });
      lazy$1(this, `defaultMinMax`, () => {
        p22.currentPosition = this.start + this.defaultMinMaxOffset;
        return new MinMaxTable(p22);
      });
    }
  };
  var BaseLangSysRecord = class {
    constructor(baseScriptTableStart, p22) {
      this.baseLangSysTag = p22.tag;
      this.minMaxOffset = p22.Offset16;
      lazy$1(this, `minMax`, () => {
        p22.currentPosition = baseScriptTableStart + this.minMaxOffset;
        return new MinMaxTable(p22);
      });
    }
  };
  var BaseValuesTable = class {
    constructor(p22) {
      this.parser = p22;
      this.start = p22.currentPosition;
      this.defaultBaselineIndex = p22.uint16;
      this.baseCoordCount = p22.uint16;
      this.baseCoords = [...new Array(this.baseCoordCount)].map(
        (_) => p22.Offset16
      );
    }
    getTable(id) {
      this.parser.currentPosition = this.start + this.baseCoords[id];
      return new BaseCoordTable(this.parser);
    }
  };
  var MinMaxTable = class {
    constructor(p22) {
      this.minCoord = p22.Offset16;
      this.maxCoord = p22.Offset16;
      this.featMinMaxCount = p22.uint16;
      const recordStart = p22.currentPosition;
      lazy$1(this, `featMinMaxRecords`, () => {
        p22.currentPosition = recordStart;
        return [...new Array(this.featMinMaxCount)].map(
          (_) => new FeatMinMaxRecord(p22)
        );
      });
    }
  };
  var FeatMinMaxRecord = class {
    constructor(p22) {
      this.featureTableTag = p22.tag;
      this.minCoord = p22.Offset16;
      this.maxCoord = p22.Offset16;
    }
  };
  var BaseCoordTable = class {
    constructor(p22) {
      this.baseCoordFormat = p22.uint16;
      this.coordinate = p22.int16;
      if (this.baseCoordFormat === 2) {
        this.referenceGlyph = p22.uint16;
        this.baseCoordPoint = p22.uint16;
      }
      if (this.baseCoordFormat === 3) {
        this.deviceTable = p22.Offset16;
      }
    }
  };
  var BASE$1 = Object.freeze({ __proto__: null, BASE });
  var ClassDefinition = class {
    constructor(p22) {
      this.classFormat = p22.uint16;
      if (this.classFormat === 1) {
        this.startGlyphID = p22.uint16;
        this.glyphCount = p22.uint16;
        this.classValueArray = [...new Array(this.glyphCount)].map(
          (_) => p22.uint16
        );
      }
      if (this.classFormat === 2) {
        this.classRangeCount = p22.uint16;
        this.classRangeRecords = [
          ...new Array(this.classRangeCount)
        ].map((_) => new ClassRangeRecord(p22));
      }
    }
  };
  var ClassRangeRecord = class {
    constructor(p22) {
      this.startGlyphID = p22.uint16;
      this.endGlyphID = p22.uint16;
      this.class = p22.uint16;
    }
  };
  var CoverageTable = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.coverageFormat = p22.uint16;
      if (this.coverageFormat === 1) {
        this.glyphCount = p22.uint16;
        this.glyphArray = [...new Array(this.glyphCount)].map(
          (_) => p22.uint16
        );
      }
      if (this.coverageFormat === 2) {
        this.rangeCount = p22.uint16;
        this.rangeRecords = [...new Array(this.rangeCount)].map(
          (_) => new CoverageRangeRecord(p22)
        );
      }
    }
  };
  var CoverageRangeRecord = class {
    constructor(p22) {
      this.startGlyphID = p22.uint16;
      this.endGlyphID = p22.uint16;
      this.startCoverageIndex = p22.uint16;
    }
  };
  var ItemVariationStoreTable = class {
    constructor(table, p22) {
      this.table = table;
      this.parser = p22;
      this.start = p22.currentPosition;
      this.format = p22.uint16;
      this.variationRegionListOffset = p22.Offset32;
      this.itemVariationDataCount = p22.uint16;
      this.itemVariationDataOffsets = [
        ...new Array(this.itemVariationDataCount)
      ].map((_) => p22.Offset32);
    }
  };
  var GDEF = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.majorVersion = p22.uint16;
      this.minorVersion = p22.uint16;
      this.glyphClassDefOffset = p22.Offset16;
      lazy$1(this, `glyphClassDefs`, () => {
        if (this.glyphClassDefOffset === 0) return void 0;
        p22.currentPosition = this.tableStart + this.glyphClassDefOffset;
        return new ClassDefinition(p22);
      });
      this.attachListOffset = p22.Offset16;
      lazy$1(this, `attachList`, () => {
        if (this.attachListOffset === 0) return void 0;
        p22.currentPosition = this.tableStart + this.attachListOffset;
        return new AttachList(p22);
      });
      this.ligCaretListOffset = p22.Offset16;
      lazy$1(this, `ligCaretList`, () => {
        if (this.ligCaretListOffset === 0) return void 0;
        p22.currentPosition = this.tableStart + this.ligCaretListOffset;
        return new LigCaretList(p22);
      });
      this.markAttachClassDefOffset = p22.Offset16;
      lazy$1(this, `markAttachClassDef`, () => {
        if (this.markAttachClassDefOffset === 0) return void 0;
        p22.currentPosition = this.tableStart + this.markAttachClassDefOffset;
        return new ClassDefinition(p22);
      });
      if (this.minorVersion >= 2) {
        this.markGlyphSetsDefOffset = p22.Offset16;
        lazy$1(this, `markGlyphSetsDef`, () => {
          if (this.markGlyphSetsDefOffset === 0) return void 0;
          p22.currentPosition = this.tableStart + this.markGlyphSetsDefOffset;
          return new MarkGlyphSetsTable(p22);
        });
      }
      if (this.minorVersion === 3) {
        this.itemVarStoreOffset = p22.Offset32;
        lazy$1(this, `itemVarStore`, () => {
          if (this.itemVarStoreOffset === 0) return void 0;
          p22.currentPosition = this.tableStart + this.itemVarStoreOffset;
          return new ItemVariationStoreTable(p22);
        });
      }
    }
  };
  var AttachList = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.coverageOffset = p22.Offset16;
      this.glyphCount = p22.uint16;
      this.attachPointOffsets = [...new Array(this.glyphCount)].map(
        (_) => p22.Offset16
      );
    }
    getPoint(pointID) {
      this.parser.currentPosition = this.start + this.attachPointOffsets[pointID];
      return new AttachPoint(this.parser);
    }
  };
  var AttachPoint = class {
    constructor(p22) {
      this.pointCount = p22.uint16;
      this.pointIndices = [...new Array(this.pointCount)].map(
        (_) => p22.uint16
      );
    }
  };
  var LigCaretList = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.coverageOffset = p22.Offset16;
      lazy$1(this, `coverage`, () => {
        p22.currentPosition = this.start + this.coverageOffset;
        return new CoverageTable(p22);
      });
      this.ligGlyphCount = p22.uint16;
      this.ligGlyphOffsets = [...new Array(this.ligGlyphCount)].map(
        (_) => p22.Offset16
      );
    }
    getLigGlyph(ligGlyphID) {
      this.parser.currentPosition = this.start + this.ligGlyphOffsets[ligGlyphID];
      return new LigGlyph(this.parser);
    }
  };
  var LigGlyph = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.caretCount = p22.uint16;
      this.caretValueOffsets = [...new Array(this.caretCount)].map(
        (_) => p22.Offset16
      );
    }
    getCaretValue(caretID) {
      this.parser.currentPosition = this.start + this.caretValueOffsets[caretID];
      return new CaretValue(this.parser);
    }
  };
  var CaretValue = class {
    constructor(p22) {
      this.caretValueFormat = p22.uint16;
      if (this.caretValueFormat === 1) {
        this.coordinate = p22.int16;
      }
      if (this.caretValueFormat === 2) {
        this.caretValuePointIndex = p22.uint16;
      }
      if (this.caretValueFormat === 3) {
        this.coordinate = p22.int16;
        this.deviceOffset = p22.Offset16;
      }
    }
  };
  var MarkGlyphSetsTable = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.markGlyphSetTableFormat = p22.uint16;
      this.markGlyphSetCount = p22.uint16;
      this.coverageOffsets = [...new Array(this.markGlyphSetCount)].map(
        (_) => p22.Offset32
      );
    }
    getMarkGlyphSet(markGlyphSetID) {
      this.parser.currentPosition = this.start + this.coverageOffsets[markGlyphSetID];
      return new CoverageTable(this.parser);
    }
  };
  var GDEF$1 = Object.freeze({ __proto__: null, GDEF });
  var ScriptList = class extends ParsedData {
    static EMPTY = { scriptCount: 0, scriptRecords: [] };
    constructor(p22) {
      super(p22);
      this.scriptCount = p22.uint16;
      this.scriptRecords = [...new Array(this.scriptCount)].map(
        (_) => new ScriptRecord(p22)
      );
    }
  };
  var ScriptRecord = class {
    constructor(p22) {
      this.scriptTag = p22.tag;
      this.scriptOffset = p22.Offset16;
    }
  };
  var ScriptTable = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.defaultLangSys = p22.Offset16;
      this.langSysCount = p22.uint16;
      this.langSysRecords = [...new Array(this.langSysCount)].map(
        (_) => new LangSysRecord(p22)
      );
    }
  };
  var LangSysRecord = class {
    constructor(p22) {
      this.langSysTag = p22.tag;
      this.langSysOffset = p22.Offset16;
    }
  };
  var LangSysTable = class {
    constructor(p22) {
      this.lookupOrder = p22.Offset16;
      this.requiredFeatureIndex = p22.uint16;
      this.featureIndexCount = p22.uint16;
      this.featureIndices = [...new Array(this.featureIndexCount)].map(
        (_) => p22.uint16
      );
    }
  };
  var FeatureList = class extends ParsedData {
    static EMPTY = { featureCount: 0, featureRecords: [] };
    constructor(p22) {
      super(p22);
      this.featureCount = p22.uint16;
      this.featureRecords = [...new Array(this.featureCount)].map(
        (_) => new FeatureRecord(p22)
      );
    }
  };
  var FeatureRecord = class {
    constructor(p22) {
      this.featureTag = p22.tag;
      this.featureOffset = p22.Offset16;
    }
  };
  var FeatureTable = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.featureParams = p22.Offset16;
      this.lookupIndexCount = p22.uint16;
      this.lookupListIndices = [...new Array(this.lookupIndexCount)].map(
        (_) => p22.uint16
      );
    }
    getFeatureParams() {
      if (this.featureParams > 0) {
        const p22 = this.parser;
        p22.currentPosition = this.start + this.featureParams;
        const tag = this.featureTag;
        if (tag === `size`) return new Size(p22);
        if (tag.startsWith(`cc`)) return new CharacterVariant(p22);
        if (tag.startsWith(`ss`)) return new StylisticSet(p22);
      }
    }
  };
  var CharacterVariant = class {
    constructor(p22) {
      this.format = p22.uint16;
      this.featUiLabelNameId = p22.uint16;
      this.featUiTooltipTextNameId = p22.uint16;
      this.sampleTextNameId = p22.uint16;
      this.numNamedParameters = p22.uint16;
      this.firstParamUiLabelNameId = p22.uint16;
      this.charCount = p22.uint16;
      this.character = [...new Array(this.charCount)].map(
        (_) => p22.uint24
      );
    }
  };
  var Size = class {
    constructor(p22) {
      this.designSize = p22.uint16;
      this.subfamilyIdentifier = p22.uint16;
      this.subfamilyNameID = p22.uint16;
      this.smallEnd = p22.uint16;
      this.largeEnd = p22.uint16;
    }
  };
  var StylisticSet = class {
    constructor(p22) {
      this.version = p22.uint16;
      this.UINameID = p22.uint16;
    }
  };
  function undoCoverageOffsetParsing(instance) {
    instance.parser.currentPosition -= 2;
    delete instance.coverageOffset;
    delete instance.getCoverageTable;
  }
  var LookupType$1 = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.substFormat = p22.uint16;
      this.coverageOffset = p22.Offset16;
    }
    getCoverageTable() {
      let p22 = this.parser;
      p22.currentPosition = this.start + this.coverageOffset;
      return new CoverageTable(p22);
    }
  };
  var SubstLookupRecord = class {
    constructor(p22) {
      this.glyphSequenceIndex = p22.uint16;
      this.lookupListIndex = p22.uint16;
    }
  };
  var LookupType1$1 = class extends LookupType$1 {
    constructor(p22) {
      super(p22);
      this.deltaGlyphID = p22.int16;
    }
  };
  var LookupType2$1 = class extends LookupType$1 {
    constructor(p22) {
      super(p22);
      this.sequenceCount = p22.uint16;
      this.sequenceOffsets = [...new Array(this.sequenceCount)].map(
        (_) => p22.Offset16
      );
    }
    getSequence(index2) {
      let p22 = this.parser;
      p22.currentPosition = this.start + this.sequenceOffsets[index2];
      return new SequenceTable(p22);
    }
  };
  var SequenceTable = class {
    constructor(p22) {
      this.glyphCount = p22.uint16;
      this.substituteGlyphIDs = [...new Array(this.glyphCount)].map(
        (_) => p22.uint16
      );
    }
  };
  var LookupType3$1 = class extends LookupType$1 {
    constructor(p22) {
      super(p22);
      this.alternateSetCount = p22.uint16;
      this.alternateSetOffsets = [
        ...new Array(this.alternateSetCount)
      ].map((_) => p22.Offset16);
    }
    getAlternateSet(index2) {
      let p22 = this.parser;
      p22.currentPosition = this.start + this.alternateSetOffsets[index2];
      return new AlternateSetTable(p22);
    }
  };
  var AlternateSetTable = class {
    constructor(p22) {
      this.glyphCount = p22.uint16;
      this.alternateGlyphIDs = [...new Array(this.glyphCount)].map(
        (_) => p22.uint16
      );
    }
  };
  var LookupType4$1 = class extends LookupType$1 {
    constructor(p22) {
      super(p22);
      this.ligatureSetCount = p22.uint16;
      this.ligatureSetOffsets = [...new Array(this.ligatureSetCount)].map(
        (_) => p22.Offset16
      );
    }
    getLigatureSet(index2) {
      let p22 = this.parser;
      p22.currentPosition = this.start + this.ligatureSetOffsets[index2];
      return new LigatureSetTable(p22);
    }
  };
  var LigatureSetTable = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.ligatureCount = p22.uint16;
      this.ligatureOffsets = [...new Array(this.ligatureCount)].map(
        (_) => p22.Offset16
      );
    }
    getLigature(index2) {
      let p22 = this.parser;
      p22.currentPosition = this.start + this.ligatureOffsets[index2];
      return new LigatureTable(p22);
    }
  };
  var LigatureTable = class {
    constructor(p22) {
      this.ligatureGlyph = p22.uint16;
      this.componentCount = p22.uint16;
      this.componentGlyphIDs = [
        ...new Array(this.componentCount - 1)
      ].map((_) => p22.uint16);
    }
  };
  var LookupType5$1 = class extends LookupType$1 {
    constructor(p22) {
      super(p22);
      if (this.substFormat === 1) {
        this.subRuleSetCount = p22.uint16;
        this.subRuleSetOffsets = [
          ...new Array(this.subRuleSetCount)
        ].map((_) => p22.Offset16);
      }
      if (this.substFormat === 2) {
        this.classDefOffset = p22.Offset16;
        this.subClassSetCount = p22.uint16;
        this.subClassSetOffsets = [
          ...new Array(this.subClassSetCount)
        ].map((_) => p22.Offset16);
      }
      if (this.substFormat === 3) {
        undoCoverageOffsetParsing(this);
        this.glyphCount = p22.uint16;
        this.substitutionCount = p22.uint16;
        this.coverageOffsets = [...new Array(this.glyphCount)].map(
          (_) => p22.Offset16
        );
        this.substLookupRecords = [
          ...new Array(this.substitutionCount)
        ].map((_) => new SubstLookupRecord(p22));
      }
    }
    getSubRuleSet(index2) {
      if (this.substFormat !== 1)
        throw new Error(
          `lookup type 5.${this.substFormat} has no subrule sets.`
        );
      let p22 = this.parser;
      p22.currentPosition = this.start + this.subRuleSetOffsets[index2];
      return new SubRuleSetTable(p22);
    }
    getSubClassSet(index2) {
      if (this.substFormat !== 2)
        throw new Error(
          `lookup type 5.${this.substFormat} has no subclass sets.`
        );
      let p22 = this.parser;
      p22.currentPosition = this.start + this.subClassSetOffsets[index2];
      return new SubClassSetTable(p22);
    }
    getCoverageTable(index2) {
      if (this.substFormat !== 3 && !index2)
        return super.getCoverageTable();
      if (!index2)
        throw new Error(
          `lookup type 5.${this.substFormat} requires an coverage table index.`
        );
      let p22 = this.parser;
      p22.currentPosition = this.start + this.coverageOffsets[index2];
      return new CoverageTable(p22);
    }
  };
  var SubRuleSetTable = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.subRuleCount = p22.uint16;
      this.subRuleOffsets = [...new Array(this.subRuleCount)].map(
        (_) => p22.Offset16
      );
    }
    getSubRule(index2) {
      let p22 = this.parser;
      p22.currentPosition = this.start + this.subRuleOffsets[index2];
      return new SubRuleTable(p22);
    }
  };
  var SubRuleTable = class {
    constructor(p22) {
      this.glyphCount = p22.uint16;
      this.substitutionCount = p22.uint16;
      this.inputSequence = [...new Array(this.glyphCount - 1)].map(
        (_) => p22.uint16
      );
      this.substLookupRecords = [
        ...new Array(this.substitutionCount)
      ].map((_) => new SubstLookupRecord(p22));
    }
  };
  var SubClassSetTable = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.subClassRuleCount = p22.uint16;
      this.subClassRuleOffsets = [
        ...new Array(this.subClassRuleCount)
      ].map((_) => p22.Offset16);
    }
    getSubClass(index2) {
      let p22 = this.parser;
      p22.currentPosition = this.start + this.subClassRuleOffsets[index2];
      return new SubClassRuleTable(p22);
    }
  };
  var SubClassRuleTable = class extends SubRuleTable {
    constructor(p22) {
      super(p22);
    }
  };
  var LookupType6$1 = class extends LookupType$1 {
    constructor(p22) {
      super(p22);
      if (this.substFormat === 1) {
        this.chainSubRuleSetCount = p22.uint16;
        this.chainSubRuleSetOffsets = [
          ...new Array(this.chainSubRuleSetCount)
        ].map((_) => p22.Offset16);
      }
      if (this.substFormat === 2) {
        this.backtrackClassDefOffset = p22.Offset16;
        this.inputClassDefOffset = p22.Offset16;
        this.lookaheadClassDefOffset = p22.Offset16;
        this.chainSubClassSetCount = p22.uint16;
        this.chainSubClassSetOffsets = [
          ...new Array(this.chainSubClassSetCount)
        ].map((_) => p22.Offset16);
      }
      if (this.substFormat === 3) {
        undoCoverageOffsetParsing(this);
        this.backtrackGlyphCount = p22.uint16;
        this.backtrackCoverageOffsets = [
          ...new Array(this.backtrackGlyphCount)
        ].map((_) => p22.Offset16);
        this.inputGlyphCount = p22.uint16;
        this.inputCoverageOffsets = [
          ...new Array(this.inputGlyphCount)
        ].map((_) => p22.Offset16);
        this.lookaheadGlyphCount = p22.uint16;
        this.lookaheadCoverageOffsets = [
          ...new Array(this.lookaheadGlyphCount)
        ].map((_) => p22.Offset16);
        this.seqLookupCount = p22.uint16;
        this.seqLookupRecords = [
          ...new Array(this.substitutionCount)
        ].map((_) => new SequenceLookupRecord(p22));
      }
    }
    getChainSubRuleSet(index2) {
      if (this.substFormat !== 1)
        throw new Error(
          `lookup type 6.${this.substFormat} has no chainsubrule sets.`
        );
      let p22 = this.parser;
      p22.currentPosition = this.start + this.chainSubRuleSetOffsets[index2];
      return new ChainSubRuleSetTable(p22);
    }
    getChainSubClassSet(index2) {
      if (this.substFormat !== 2)
        throw new Error(
          `lookup type 6.${this.substFormat} has no chainsubclass sets.`
        );
      let p22 = this.parser;
      p22.currentPosition = this.start + this.chainSubClassSetOffsets[index2];
      return new ChainSubClassSetTable(p22);
    }
    getCoverageFromOffset(offset3) {
      if (this.substFormat !== 3)
        throw new Error(
          `lookup type 6.${this.substFormat} does not use contextual coverage offsets.`
        );
      let p22 = this.parser;
      p22.currentPosition = this.start + offset3;
      return new CoverageTable(p22);
    }
  };
  var ChainSubRuleSetTable = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.chainSubRuleCount = p22.uint16;
      this.chainSubRuleOffsets = [
        ...new Array(this.chainSubRuleCount)
      ].map((_) => p22.Offset16);
    }
    getSubRule(index2) {
      let p22 = this.parser;
      p22.currentPosition = this.start + this.chainSubRuleOffsets[index2];
      return new ChainSubRuleTable(p22);
    }
  };
  var ChainSubRuleTable = class {
    constructor(p22) {
      this.backtrackGlyphCount = p22.uint16;
      this.backtrackSequence = [
        ...new Array(this.backtrackGlyphCount)
      ].map((_) => p22.uint16);
      this.inputGlyphCount = p22.uint16;
      this.inputSequence = [...new Array(this.inputGlyphCount - 1)].map(
        (_) => p22.uint16
      );
      this.lookaheadGlyphCount = p22.uint16;
      this.lookAheadSequence = [
        ...new Array(this.lookAheadGlyphCount)
      ].map((_) => p22.uint16);
      this.substitutionCount = p22.uint16;
      this.substLookupRecords = [...new Array(this.SubstCount)].map(
        (_) => new SubstLookupRecord(p22)
      );
    }
  };
  var ChainSubClassSetTable = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.chainSubClassRuleCount = p22.uint16;
      this.chainSubClassRuleOffsets = [
        ...new Array(this.chainSubClassRuleCount)
      ].map((_) => p22.Offset16);
    }
    getSubClass(index2) {
      let p22 = this.parser;
      p22.currentPosition = this.start + this.chainSubRuleOffsets[index2];
      return new ChainSubClassRuleTable(p22);
    }
  };
  var ChainSubClassRuleTable = class {
    constructor(p22) {
      this.backtrackGlyphCount = p22.uint16;
      this.backtrackSequence = [
        ...new Array(this.backtrackGlyphCount)
      ].map((_) => p22.uint16);
      this.inputGlyphCount = p22.uint16;
      this.inputSequence = [...new Array(this.inputGlyphCount - 1)].map(
        (_) => p22.uint16
      );
      this.lookaheadGlyphCount = p22.uint16;
      this.lookAheadSequence = [
        ...new Array(this.lookAheadGlyphCount)
      ].map((_) => p22.uint16);
      this.substitutionCount = p22.uint16;
      this.substLookupRecords = [
        ...new Array(this.substitutionCount)
      ].map((_) => new SequenceLookupRecord(p22));
    }
  };
  var SequenceLookupRecord = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.sequenceIndex = p22.uint16;
      this.lookupListIndex = p22.uint16;
    }
  };
  var LookupType7$1 = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.substFormat = p22.uint16;
      this.extensionLookupType = p22.uint16;
      this.extensionOffset = p22.Offset32;
    }
  };
  var LookupType8$1 = class extends LookupType$1 {
    constructor(p22) {
      super(p22);
      this.backtrackGlyphCount = p22.uint16;
      this.backtrackCoverageOffsets = [
        ...new Array(this.backtrackGlyphCount)
      ].map((_) => p22.Offset16);
      this.lookaheadGlyphCount = p22.uint16;
      this.lookaheadCoverageOffsets = [
        new Array(this.lookaheadGlyphCount)
      ].map((_) => p22.Offset16);
      this.glyphCount = p22.uint16;
      this.substituteGlyphIDs = [...new Array(this.glyphCount)].map(
        (_) => p22.uint16
      );
    }
  };
  var GSUBtables = {
    buildSubtable: function(type, p22) {
      const subtable = new [
        void 0,
        LookupType1$1,
        LookupType2$1,
        LookupType3$1,
        LookupType4$1,
        LookupType5$1,
        LookupType6$1,
        LookupType7$1,
        LookupType8$1
      ][type](p22);
      subtable.type = type;
      return subtable;
    }
  };
  var LookupType = class extends ParsedData {
    constructor(p22) {
      super(p22);
    }
  };
  var LookupType1 = class extends LookupType {
    constructor(p22) {
      super(p22);
      console.log(`lookup type 1`);
    }
  };
  var LookupType2 = class extends LookupType {
    constructor(p22) {
      super(p22);
      console.log(`lookup type 2`);
    }
  };
  var LookupType3 = class extends LookupType {
    constructor(p22) {
      super(p22);
      console.log(`lookup type 3`);
    }
  };
  var LookupType4 = class extends LookupType {
    constructor(p22) {
      super(p22);
      console.log(`lookup type 4`);
    }
  };
  var LookupType5 = class extends LookupType {
    constructor(p22) {
      super(p22);
      console.log(`lookup type 5`);
    }
  };
  var LookupType6 = class extends LookupType {
    constructor(p22) {
      super(p22);
      console.log(`lookup type 6`);
    }
  };
  var LookupType7 = class extends LookupType {
    constructor(p22) {
      super(p22);
      console.log(`lookup type 7`);
    }
  };
  var LookupType8 = class extends LookupType {
    constructor(p22) {
      super(p22);
      console.log(`lookup type 8`);
    }
  };
  var LookupType9 = class extends LookupType {
    constructor(p22) {
      super(p22);
      console.log(`lookup type 9`);
    }
  };
  var GPOStables = {
    buildSubtable: function(type, p22) {
      const subtable = new [
        void 0,
        LookupType1,
        LookupType2,
        LookupType3,
        LookupType4,
        LookupType5,
        LookupType6,
        LookupType7,
        LookupType8,
        LookupType9
      ][type](p22);
      subtable.type = type;
      return subtable;
    }
  };
  var LookupList = class extends ParsedData {
    static EMPTY = { lookupCount: 0, lookups: [] };
    constructor(p22) {
      super(p22);
      this.lookupCount = p22.uint16;
      this.lookups = [...new Array(this.lookupCount)].map(
        (_) => p22.Offset16
      );
    }
  };
  var LookupTable = class extends ParsedData {
    constructor(p22, type) {
      super(p22);
      this.ctType = type;
      this.lookupType = p22.uint16;
      this.lookupFlag = p22.uint16;
      this.subTableCount = p22.uint16;
      this.subtableOffsets = [...new Array(this.subTableCount)].map(
        (_) => p22.Offset16
      );
      this.markFilteringSet = p22.uint16;
    }
    get rightToLeft() {
      return this.lookupFlag & true;
    }
    get ignoreBaseGlyphs() {
      return this.lookupFlag & true;
    }
    get ignoreLigatures() {
      return this.lookupFlag & true;
    }
    get ignoreMarks() {
      return this.lookupFlag & true;
    }
    get useMarkFilteringSet() {
      return this.lookupFlag & true;
    }
    get markAttachmentType() {
      return this.lookupFlag & true;
    }
    getSubTable(index2) {
      const builder = this.ctType === `GSUB` ? GSUBtables : GPOStables;
      this.parser.currentPosition = this.start + this.subtableOffsets[index2];
      return builder.buildSubtable(this.lookupType, this.parser);
    }
  };
  var CommonLayoutTable = class extends SimpleTable {
    constructor(dict, dataview, name2) {
      const { p: p22, tableStart } = super(dict, dataview, name2);
      this.majorVersion = p22.uint16;
      this.minorVersion = p22.uint16;
      this.scriptListOffset = p22.Offset16;
      this.featureListOffset = p22.Offset16;
      this.lookupListOffset = p22.Offset16;
      if (this.majorVersion === 1 && this.minorVersion === 1) {
        this.featureVariationsOffset = p22.Offset32;
      }
      const no_content = !(this.scriptListOffset || this.featureListOffset || this.lookupListOffset);
      lazy$1(this, `scriptList`, () => {
        if (no_content) return ScriptList.EMPTY;
        p22.currentPosition = tableStart + this.scriptListOffset;
        return new ScriptList(p22);
      });
      lazy$1(this, `featureList`, () => {
        if (no_content) return FeatureList.EMPTY;
        p22.currentPosition = tableStart + this.featureListOffset;
        return new FeatureList(p22);
      });
      lazy$1(this, `lookupList`, () => {
        if (no_content) return LookupList.EMPTY;
        p22.currentPosition = tableStart + this.lookupListOffset;
        return new LookupList(p22);
      });
      if (this.featureVariationsOffset) {
        lazy$1(this, `featureVariations`, () => {
          if (no_content) return FeatureVariations.EMPTY;
          p22.currentPosition = tableStart + this.featureVariationsOffset;
          return new FeatureVariations(p22);
        });
      }
    }
    getSupportedScripts() {
      return this.scriptList.scriptRecords.map((r4) => r4.scriptTag);
    }
    getScriptTable(scriptTag) {
      let record = this.scriptList.scriptRecords.find(
        (r4) => r4.scriptTag === scriptTag
      );
      this.parser.currentPosition = this.scriptList.start + record.scriptOffset;
      let table = new ScriptTable(this.parser);
      table.scriptTag = scriptTag;
      return table;
    }
    ensureScriptTable(arg) {
      if (typeof arg === "string") {
        return this.getScriptTable(arg);
      }
      return arg;
    }
    getSupportedLangSys(scriptTable) {
      scriptTable = this.ensureScriptTable(scriptTable);
      const hasDefault = scriptTable.defaultLangSys !== 0;
      const supported = scriptTable.langSysRecords.map(
        (l3) => l3.langSysTag
      );
      if (hasDefault) supported.unshift(`dflt`);
      return supported;
    }
    getDefaultLangSysTable(scriptTable) {
      scriptTable = this.ensureScriptTable(scriptTable);
      let offset3 = scriptTable.defaultLangSys;
      if (offset3 !== 0) {
        this.parser.currentPosition = scriptTable.start + offset3;
        let table = new LangSysTable(this.parser);
        table.langSysTag = ``;
        table.defaultForScript = scriptTable.scriptTag;
        return table;
      }
    }
    getLangSysTable(scriptTable, langSysTag = `dflt`) {
      if (langSysTag === `dflt`)
        return this.getDefaultLangSysTable(scriptTable);
      scriptTable = this.ensureScriptTable(scriptTable);
      let record = scriptTable.langSysRecords.find(
        (l3) => l3.langSysTag === langSysTag
      );
      this.parser.currentPosition = scriptTable.start + record.langSysOffset;
      let table = new LangSysTable(this.parser);
      table.langSysTag = langSysTag;
      return table;
    }
    getFeatures(langSysTable) {
      return langSysTable.featureIndices.map(
        (index2) => this.getFeature(index2)
      );
    }
    getFeature(indexOrTag) {
      let record;
      if (parseInt(indexOrTag) == indexOrTag) {
        record = this.featureList.featureRecords[indexOrTag];
      } else {
        record = this.featureList.featureRecords.find(
          (f3) => f3.featureTag === indexOrTag
        );
      }
      if (!record) return;
      this.parser.currentPosition = this.featureList.start + record.featureOffset;
      let table = new FeatureTable(this.parser);
      table.featureTag = record.featureTag;
      return table;
    }
    getLookups(featureTable) {
      return featureTable.lookupListIndices.map(
        (index2) => this.getLookup(index2)
      );
    }
    getLookup(lookupIndex, type) {
      let lookupOffset = this.lookupList.lookups[lookupIndex];
      this.parser.currentPosition = this.lookupList.start + lookupOffset;
      return new LookupTable(this.parser, type);
    }
  };
  var GSUB = class extends CommonLayoutTable {
    constructor(dict, dataview) {
      super(dict, dataview, `GSUB`);
    }
    getLookup(lookupIndex) {
      return super.getLookup(lookupIndex, `GSUB`);
    }
  };
  var GSUB$1 = Object.freeze({ __proto__: null, GSUB });
  var GPOS = class extends CommonLayoutTable {
    constructor(dict, dataview) {
      super(dict, dataview, `GPOS`);
    }
    getLookup(lookupIndex) {
      return super.getLookup(lookupIndex, `GPOS`);
    }
  };
  var GPOS$1 = Object.freeze({ __proto__: null, GPOS });
  var SVG77 = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint16;
      this.offsetToSVGDocumentList = p22.Offset32;
      p22.currentPosition = this.tableStart + this.offsetToSVGDocumentList;
      this.documentList = new SVGDocumentList(p22);
    }
  };
  var SVGDocumentList = class extends ParsedData {
    constructor(p22) {
      super(p22);
      this.numEntries = p22.uint16;
      this.documentRecords = [...new Array(this.numEntries)].map(
        (_) => new SVGDocumentRecord(p22)
      );
    }
    getDocument(documentID) {
      let record = this.documentRecords[documentID];
      if (!record) return "";
      let offset3 = this.start + record.svgDocOffset;
      this.parser.currentPosition = offset3;
      return this.parser.readBytes(record.svgDocLength);
    }
    getDocumentForGlyph(glyphID) {
      let id = this.documentRecords.findIndex(
        (d3) => d3.startGlyphID <= glyphID && glyphID <= d3.endGlyphID
      );
      if (id === -1) return "";
      return this.getDocument(id);
    }
  };
  var SVGDocumentRecord = class {
    constructor(p22) {
      this.startGlyphID = p22.uint16;
      this.endGlyphID = p22.uint16;
      this.svgDocOffset = p22.Offset32;
      this.svgDocLength = p22.uint32;
    }
  };
  var SVG$1 = Object.freeze({ __proto__: null, SVG: SVG77 });
  var fvar = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.majorVersion = p22.uint16;
      this.minorVersion = p22.uint16;
      this.axesArrayOffset = p22.Offset16;
      p22.uint16;
      this.axisCount = p22.uint16;
      this.axisSize = p22.uint16;
      this.instanceCount = p22.uint16;
      this.instanceSize = p22.uint16;
      const axisStart = this.tableStart + this.axesArrayOffset;
      lazy$1(this, `axes`, () => {
        p22.currentPosition = axisStart;
        return [...new Array(this.axisCount)].map(
          (_) => new VariationAxisRecord(p22)
        );
      });
      const instanceStart = axisStart + this.axisCount * this.axisSize;
      lazy$1(this, `instances`, () => {
        let instances = [];
        for (let i3 = 0; i3 < this.instanceCount; i3++) {
          p22.currentPosition = instanceStart + i3 * this.instanceSize;
          instances.push(
            new InstanceRecord(p22, this.axisCount, this.instanceSize)
          );
        }
        return instances;
      });
    }
    getSupportedAxes() {
      return this.axes.map((a3) => a3.tag);
    }
    getAxis(name2) {
      return this.axes.find((a3) => a3.tag === name2);
    }
  };
  var VariationAxisRecord = class {
    constructor(p22) {
      this.tag = p22.tag;
      this.minValue = p22.fixed;
      this.defaultValue = p22.fixed;
      this.maxValue = p22.fixed;
      this.flags = p22.flags(16);
      this.axisNameID = p22.uint16;
    }
  };
  var InstanceRecord = class {
    constructor(p22, axisCount, size3) {
      let start2 = p22.currentPosition;
      this.subfamilyNameID = p22.uint16;
      p22.uint16;
      this.coordinates = [...new Array(axisCount)].map(
        (_) => p22.fixed
      );
      if (p22.currentPosition - start2 < size3) {
        this.postScriptNameID = p22.uint16;
      }
    }
  };
  var fvar$1 = Object.freeze({ __proto__: null, fvar });
  var cvt = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      const n3 = dict.length / 2;
      lazy$1(
        this,
        `items`,
        () => [...new Array(n3)].map((_) => p22.fword)
      );
    }
  };
  var cvt$1 = Object.freeze({ __proto__: null, cvt });
  var fpgm = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      lazy$1(
        this,
        `instructions`,
        () => [...new Array(dict.length)].map((_) => p22.uint8)
      );
    }
  };
  var fpgm$1 = Object.freeze({ __proto__: null, fpgm });
  var gasp = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint16;
      this.numRanges = p22.uint16;
      const getter = () => [...new Array(this.numRanges)].map(
        (_) => new GASPRange(p22)
      );
      lazy$1(this, `gaspRanges`, getter);
    }
  };
  var GASPRange = class {
    constructor(p22) {
      this.rangeMaxPPEM = p22.uint16;
      this.rangeGaspBehavior = p22.uint16;
    }
  };
  var gasp$1 = Object.freeze({ __proto__: null, gasp });
  var glyf = class extends SimpleTable {
    constructor(dict, dataview) {
      super(dict, dataview);
    }
    getGlyphData(offset3, length) {
      this.parser.currentPosition = this.tableStart + offset3;
      return this.parser.readBytes(length);
    }
  };
  var glyf$1 = Object.freeze({ __proto__: null, glyf });
  var loca = class extends SimpleTable {
    constructor(dict, dataview, tables) {
      const { p: p22 } = super(dict, dataview);
      const n3 = tables.maxp.numGlyphs + 1;
      if (tables.head.indexToLocFormat === 0) {
        this.x2 = true;
        lazy$1(
          this,
          `offsets`,
          () => [...new Array(n3)].map((_) => p22.Offset16)
        );
      } else {
        lazy$1(
          this,
          `offsets`,
          () => [...new Array(n3)].map((_) => p22.Offset32)
        );
      }
    }
    getGlyphDataOffsetAndLength(glyphID) {
      let offset3 = this.offsets[glyphID] * this.x2 ? 2 : 1;
      let nextOffset = this.offsets[glyphID + 1] * this.x2 ? 2 : 1;
      return { offset: offset3, length: nextOffset - offset3 };
    }
  };
  var loca$1 = Object.freeze({ __proto__: null, loca });
  var prep = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      lazy$1(
        this,
        `instructions`,
        () => [...new Array(dict.length)].map((_) => p22.uint8)
      );
    }
  };
  var prep$1 = Object.freeze({ __proto__: null, prep });
  var CFF = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      lazy$1(this, `data`, () => p22.readBytes());
    }
  };
  var CFF$1 = Object.freeze({ __proto__: null, CFF });
  var CFF2 = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      lazy$1(this, `data`, () => p22.readBytes());
    }
  };
  var CFF2$1 = Object.freeze({ __proto__: null, CFF2 });
  var VORG = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.majorVersion = p22.uint16;
      this.minorVersion = p22.uint16;
      this.defaultVertOriginY = p22.int16;
      this.numVertOriginYMetrics = p22.uint16;
      lazy$1(
        this,
        `vertORiginYMetrics`,
        () => [...new Array(this.numVertOriginYMetrics)].map(
          (_) => new VertOriginYMetric(p22)
        )
      );
    }
  };
  var VertOriginYMetric = class {
    constructor(p22) {
      this.glyphIndex = p22.uint16;
      this.vertOriginY = p22.int16;
    }
  };
  var VORG$1 = Object.freeze({ __proto__: null, VORG });
  var BitmapSize = class {
    constructor(p22) {
      this.indexSubTableArrayOffset = p22.Offset32;
      this.indexTablesSize = p22.uint32;
      this.numberofIndexSubTables = p22.uint32;
      this.colorRef = p22.uint32;
      this.hori = new SbitLineMetrics(p22);
      this.vert = new SbitLineMetrics(p22);
      this.startGlyphIndex = p22.uint16;
      this.endGlyphIndex = p22.uint16;
      this.ppemX = p22.uint8;
      this.ppemY = p22.uint8;
      this.bitDepth = p22.uint8;
      this.flags = p22.int8;
    }
  };
  var BitmapScale = class {
    constructor(p22) {
      this.hori = new SbitLineMetrics(p22);
      this.vert = new SbitLineMetrics(p22);
      this.ppemX = p22.uint8;
      this.ppemY = p22.uint8;
      this.substitutePpemX = p22.uint8;
      this.substitutePpemY = p22.uint8;
    }
  };
  var SbitLineMetrics = class {
    constructor(p22) {
      this.ascender = p22.int8;
      this.descender = p22.int8;
      this.widthMax = p22.uint8;
      this.caretSlopeNumerator = p22.int8;
      this.caretSlopeDenominator = p22.int8;
      this.caretOffset = p22.int8;
      this.minOriginSB = p22.int8;
      this.minAdvanceSB = p22.int8;
      this.maxBeforeBL = p22.int8;
      this.minAfterBL = p22.int8;
      this.pad1 = p22.int8;
      this.pad2 = p22.int8;
    }
  };
  var EBLC = class extends SimpleTable {
    constructor(dict, dataview, name2) {
      const { p: p22 } = super(dict, dataview, name2);
      this.majorVersion = p22.uint16;
      this.minorVersion = p22.uint16;
      this.numSizes = p22.uint32;
      lazy$1(
        this,
        `bitMapSizes`,
        () => [...new Array(this.numSizes)].map(
          (_) => new BitmapSize(p22)
        )
      );
    }
  };
  var EBLC$1 = Object.freeze({ __proto__: null, EBLC });
  var EBDT = class extends SimpleTable {
    constructor(dict, dataview, name2) {
      const { p: p22 } = super(dict, dataview, name2);
      this.majorVersion = p22.uint16;
      this.minorVersion = p22.uint16;
    }
  };
  var EBDT$1 = Object.freeze({ __proto__: null, EBDT });
  var EBSC = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.majorVersion = p22.uint16;
      this.minorVersion = p22.uint16;
      this.numSizes = p22.uint32;
      lazy$1(
        this,
        `bitmapScales`,
        () => [...new Array(this.numSizes)].map(
          (_) => new BitmapScale(p22)
        )
      );
    }
  };
  var EBSC$1 = Object.freeze({ __proto__: null, EBSC });
  var CBLC = class extends EBLC {
    constructor(dict, dataview) {
      super(dict, dataview, `CBLC`);
    }
  };
  var CBLC$1 = Object.freeze({ __proto__: null, CBLC });
  var CBDT = class extends EBDT {
    constructor(dict, dataview) {
      super(dict, dataview, `CBDT`);
    }
  };
  var CBDT$1 = Object.freeze({ __proto__: null, CBDT });
  var sbix = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint16;
      this.flags = p22.flags(16);
      this.numStrikes = p22.uint32;
      lazy$1(
        this,
        `strikeOffsets`,
        () => [...new Array(this.numStrikes)].map((_) => p22.Offset32)
      );
    }
  };
  var sbix$1 = Object.freeze({ __proto__: null, sbix });
  var COLR = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint16;
      this.numBaseGlyphRecords = p22.uint16;
      this.baseGlyphRecordsOffset = p22.Offset32;
      this.layerRecordsOffset = p22.Offset32;
      this.numLayerRecords = p22.uint16;
    }
    getBaseGlyphRecord(glyphID) {
      let start2 = this.tableStart + this.baseGlyphRecordsOffset;
      this.parser.currentPosition = start2;
      let first = new BaseGlyphRecord(this.parser);
      let firstID = first.gID;
      let end = this.tableStart + this.layerRecordsOffset - 6;
      this.parser.currentPosition = end;
      let last = new BaseGlyphRecord(this.parser);
      let lastID = last.gID;
      if (firstID === glyphID) return first;
      if (lastID === glyphID) return last;
      while (true) {
        if (start2 === end) break;
        let mid = start2 + (end - start2) / 12;
        this.parser.currentPosition = mid;
        let middle = new BaseGlyphRecord(this.parser);
        let midID = middle.gID;
        if (midID === glyphID) return middle;
        else if (midID > glyphID) {
          end = mid;
        } else if (midID < glyphID) {
          start2 = mid;
        }
      }
      return false;
    }
    getLayers(glyphID) {
      let record = this.getBaseGlyphRecord(glyphID);
      this.parser.currentPosition = this.tableStart + this.layerRecordsOffset + 4 * record.firstLayerIndex;
      return [...new Array(record.numLayers)].map(
        (_) => new LayerRecord(p)
      );
    }
  };
  var BaseGlyphRecord = class {
    constructor(p22) {
      this.gID = p22.uint16;
      this.firstLayerIndex = p22.uint16;
      this.numLayers = p22.uint16;
    }
  };
  var LayerRecord = class {
    constructor(p22) {
      this.gID = p22.uint16;
      this.paletteIndex = p22.uint16;
    }
  };
  var COLR$1 = Object.freeze({ __proto__: null, COLR });
  var CPAL = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint16;
      this.numPaletteEntries = p22.uint16;
      const numPalettes = this.numPalettes = p22.uint16;
      this.numColorRecords = p22.uint16;
      this.offsetFirstColorRecord = p22.Offset32;
      this.colorRecordIndices = [...new Array(this.numPalettes)].map(
        (_) => p22.uint16
      );
      lazy$1(this, `colorRecords`, () => {
        p22.currentPosition = this.tableStart + this.offsetFirstColorRecord;
        return [...new Array(this.numColorRecords)].map(
          (_) => new ColorRecord(p22)
        );
      });
      if (this.version === 1) {
        this.offsetPaletteTypeArray = p22.Offset32;
        this.offsetPaletteLabelArray = p22.Offset32;
        this.offsetPaletteEntryLabelArray = p22.Offset32;
        lazy$1(this, `paletteTypeArray`, () => {
          p22.currentPosition = this.tableStart + this.offsetPaletteTypeArray;
          return new PaletteTypeArray(p22, numPalettes);
        });
        lazy$1(this, `paletteLabelArray`, () => {
          p22.currentPosition = this.tableStart + this.offsetPaletteLabelArray;
          return new PaletteLabelsArray(p22, numPalettes);
        });
        lazy$1(this, `paletteEntryLabelArray`, () => {
          p22.currentPosition = this.tableStart + this.offsetPaletteEntryLabelArray;
          return new PaletteEntryLabelArray(p22, numPalettes);
        });
      }
    }
  };
  var ColorRecord = class {
    constructor(p22) {
      this.blue = p22.uint8;
      this.green = p22.uint8;
      this.red = p22.uint8;
      this.alpha = p22.uint8;
    }
  };
  var PaletteTypeArray = class {
    constructor(p22, numPalettes) {
      this.paletteTypes = [...new Array(numPalettes)].map(
        (_) => p22.uint32
      );
    }
  };
  var PaletteLabelsArray = class {
    constructor(p22, numPalettes) {
      this.paletteLabels = [...new Array(numPalettes)].map(
        (_) => p22.uint16
      );
    }
  };
  var PaletteEntryLabelArray = class {
    constructor(p22, numPalettes) {
      this.paletteEntryLabels = [...new Array(numPalettes)].map(
        (_) => p22.uint16
      );
    }
  };
  var CPAL$1 = Object.freeze({ __proto__: null, CPAL });
  var DSIG = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint32;
      this.numSignatures = p22.uint16;
      this.flags = p22.uint16;
      this.signatureRecords = [...new Array(this.numSignatures)].map(
        (_) => new SignatureRecord(p22)
      );
    }
    getData(signatureID) {
      const record = this.signatureRecords[signatureID];
      this.parser.currentPosition = this.tableStart + record.offset;
      return new SignatureBlockFormat1(this.parser);
    }
  };
  var SignatureRecord = class {
    constructor(p22) {
      this.format = p22.uint32;
      this.length = p22.uint32;
      this.offset = p22.Offset32;
    }
  };
  var SignatureBlockFormat1 = class {
    constructor(p22) {
      p22.uint16;
      p22.uint16;
      this.signatureLength = p22.uint32;
      this.signature = p22.readBytes(this.signatureLength);
    }
  };
  var DSIG$1 = Object.freeze({ __proto__: null, DSIG });
  var hdmx = class extends SimpleTable {
    constructor(dict, dataview, tables) {
      const { p: p22 } = super(dict, dataview);
      const numGlyphs = tables.hmtx.numGlyphs;
      this.version = p22.uint16;
      this.numRecords = p22.int16;
      this.sizeDeviceRecord = p22.int32;
      this.records = [...new Array(numRecords)].map(
        (_) => new DeviceRecord(p22, numGlyphs)
      );
    }
  };
  var DeviceRecord = class {
    constructor(p22, numGlyphs) {
      this.pixelSize = p22.uint8;
      this.maxWidth = p22.uint8;
      this.widths = p22.readBytes(numGlyphs);
    }
  };
  var hdmx$1 = Object.freeze({ __proto__: null, hdmx });
  var kern = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint16;
      this.nTables = p22.uint16;
      lazy$1(this, `tables`, () => {
        let offset3 = this.tableStart + 4;
        const tables = [];
        for (let i3 = 0; i3 < this.nTables; i3++) {
          p22.currentPosition = offset3;
          let subtable = new KernSubTable(p22);
          tables.push(subtable);
          offset3 += subtable;
        }
        return tables;
      });
    }
  };
  var KernSubTable = class {
    constructor(p22) {
      this.version = p22.uint16;
      this.length = p22.uint16;
      this.coverage = p22.flags(8);
      this.format = p22.uint8;
      if (this.format === 0) {
        this.nPairs = p22.uint16;
        this.searchRange = p22.uint16;
        this.entrySelector = p22.uint16;
        this.rangeShift = p22.uint16;
        lazy$1(
          this,
          `pairs`,
          () => [...new Array(this.nPairs)].map((_) => new Pair(p22))
        );
      }
      if (this.format === 2) {
        console.warn(
          `Kern subtable format 2 is not supported: this parser currently only parses universal table data.`
        );
      }
    }
    get horizontal() {
      return this.coverage[0];
    }
    get minimum() {
      return this.coverage[1];
    }
    get crossstream() {
      return this.coverage[2];
    }
    get override() {
      return this.coverage[3];
    }
  };
  var Pair = class {
    constructor(p22) {
      this.left = p22.uint16;
      this.right = p22.uint16;
      this.value = p22.fword;
    }
  };
  var kern$1 = Object.freeze({ __proto__: null, kern });
  var LTSH = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint16;
      this.numGlyphs = p22.uint16;
      this.yPels = p22.readBytes(this.numGlyphs);
    }
  };
  var LTSH$1 = Object.freeze({ __proto__: null, LTSH });
  var MERG = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint16;
      this.mergeClassCount = p22.uint16;
      this.mergeDataOffset = p22.Offset16;
      this.classDefCount = p22.uint16;
      this.offsetToClassDefOffsets = p22.Offset16;
      lazy$1(
        this,
        `mergeEntryMatrix`,
        () => [...new Array(this.mergeClassCount)].map(
          (_) => p22.readBytes(this.mergeClassCount)
        )
      );
      console.warn(`Full MERG parsing is currently not supported.`);
      console.warn(
        `If you need this table parsed, please file an issue, or better yet, a PR.`
      );
    }
  };
  var MERG$1 = Object.freeze({ __proto__: null, MERG });
  var meta = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint32;
      this.flags = p22.uint32;
      p22.uint32;
      this.dataMapsCount = p22.uint32;
      this.dataMaps = [...new Array(this.dataMapsCount)].map(
        (_) => new DataMap(this.tableStart, p22)
      );
    }
  };
  var DataMap = class {
    constructor(tableStart, p22) {
      this.tableStart = tableStart;
      this.parser = p22;
      this.tag = p22.tag;
      this.dataOffset = p22.Offset32;
      this.dataLength = p22.uint32;
    }
    getData() {
      this.parser.currentField = this.tableStart + this.dataOffset;
      return this.parser.readBytes(this.dataLength);
    }
  };
  var meta$1 = Object.freeze({ __proto__: null, meta });
  var PCLT = class extends SimpleTable {
    constructor(dict, dataview) {
      super(dict, dataview);
      console.warn(
        `This font uses a PCLT table, which is currently not supported by this parser.`
      );
      console.warn(
        `If you need this table parsed, please file an issue, or better yet, a PR.`
      );
    }
  };
  var PCLT$1 = Object.freeze({ __proto__: null, PCLT });
  var VDMX = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.uint16;
      this.numRecs = p22.uint16;
      this.numRatios = p22.uint16;
      this.ratRanges = [...new Array(this.numRatios)].map(
        (_) => new RatioRange(p22)
      );
      this.offsets = [...new Array(this.numRatios)].map(
        (_) => p22.Offset16
      );
      this.VDMXGroups = [...new Array(this.numRecs)].map(
        (_) => new VDMXGroup(p22)
      );
    }
  };
  var RatioRange = class {
    constructor(p22) {
      this.bCharSet = p22.uint8;
      this.xRatio = p22.uint8;
      this.yStartRatio = p22.uint8;
      this.yEndRatio = p22.uint8;
    }
  };
  var VDMXGroup = class {
    constructor(p22) {
      this.recs = p22.uint16;
      this.startsz = p22.uint8;
      this.endsz = p22.uint8;
      this.records = [...new Array(this.recs)].map(
        (_) => new vTable(p22)
      );
    }
  };
  var vTable = class {
    constructor(p22) {
      this.yPelHeight = p22.uint16;
      this.yMax = p22.int16;
      this.yMin = p22.int16;
    }
  };
  var VDMX$1 = Object.freeze({ __proto__: null, VDMX });
  var vhea = class extends SimpleTable {
    constructor(dict, dataview) {
      const { p: p22 } = super(dict, dataview);
      this.version = p22.fixed;
      this.ascent = this.vertTypoAscender = p22.int16;
      this.descent = this.vertTypoDescender = p22.int16;
      this.lineGap = this.vertTypoLineGap = p22.int16;
      this.advanceHeightMax = p22.int16;
      this.minTopSideBearing = p22.int16;
      this.minBottomSideBearing = p22.int16;
      this.yMaxExtent = p22.int16;
      this.caretSlopeRise = p22.int16;
      this.caretSlopeRun = p22.int16;
      this.caretOffset = p22.int16;
      this.reserved = p22.int16;
      this.reserved = p22.int16;
      this.reserved = p22.int16;
      this.reserved = p22.int16;
      this.metricDataFormat = p22.int16;
      this.numOfLongVerMetrics = p22.uint16;
      p22.verifyLength();
    }
  };
  var vhea$1 = Object.freeze({ __proto__: null, vhea });
  var vmtx = class extends SimpleTable {
    constructor(dict, dataview, tables) {
      super(dict, dataview);
      const numOfLongVerMetrics = tables.vhea.numOfLongVerMetrics;
      const numGlyphs = tables.maxp.numGlyphs;
      const metricsStart = p.currentPosition;
      lazy(this, `vMetrics`, () => {
        p.currentPosition = metricsStart;
        return [...new Array(numOfLongVerMetrics)].map(
          (_) => new LongVertMetric(p.uint16, p.int16)
        );
      });
      if (numOfLongVerMetrics < numGlyphs) {
        const tsbStart = metricsStart + numOfLongVerMetrics * 4;
        lazy(this, `topSideBearings`, () => {
          p.currentPosition = tsbStart;
          return [...new Array(numGlyphs - numOfLongVerMetrics)].map(
            (_) => p.int16
          );
        });
      }
    }
  };
  var LongVertMetric = class {
    constructor(h3, b3) {
      this.advanceHeight = h3;
      this.topSideBearing = b3;
    }
  };
  var vmtx$1 = Object.freeze({ __proto__: null, vmtx });

  // packages/global-styles-ui/build-module/font-library/utils/make-families-from-faces.mjs
  var import_components63 = __toESM(require_components(), 1);
  var { kebabCase: kebabCase3 } = unlock3(import_components63.privateApis);
  function makeFamiliesFromFaces(fontFaces) {
    const fontFamiliesObject = fontFaces.reduce(
      (acc, item) => {
        if (!acc[item.fontFamily]) {
          acc[item.fontFamily] = {
            name: item.fontFamily,
            fontFamily: item.fontFamily,
            slug: kebabCase3(item.fontFamily.toLowerCase()),
            fontFace: []
          };
        }
        acc[item.fontFamily].fontFace.push(item);
        return acc;
      },
      {}
    );
    return Object.values(fontFamiliesObject);
  }

  // packages/global-styles-ui/build-module/font-library/upload-fonts.mjs
  var import_jsx_runtime159 = __toESM(require_jsx_runtime(), 1);
  function UploadFonts() {
    const { installFonts } = (0, import_element63.useContext)(FontLibraryContext);
    const [isUploading, setIsUploading] = (0, import_element63.useState)(false);
    const [notice, setNotice] = (0, import_element63.useState)(null);
    const handleDropZone = (files) => {
      handleFilesUpload(files);
    };
    const onFilesUpload = (event) => {
      handleFilesUpload(event.target.files);
    };
    const handleFilesUpload = async (files) => {
      if (!files) {
        return;
      }
      setNotice(null);
      setIsUploading(true);
      const uniqueFilenames = /* @__PURE__ */ new Set();
      const selectedFiles = [...files];
      let hasInvalidFiles = false;
      const checkFilesPromises = selectedFiles.map(async (file) => {
        const isFont = await isFontFile(file);
        if (!isFont) {
          hasInvalidFiles = true;
          return null;
        }
        if (uniqueFilenames.has(file.name)) {
          return null;
        }
        const fileExtension = (((file.name ?? "").split(".") ?? []).pop() ?? "").toLowerCase();
        if (ALLOWED_FILE_EXTENSIONS.includes(fileExtension)) {
          uniqueFilenames.add(file.name);
          return file;
        }
        return null;
      });
      const allowedFiles = (await Promise.all(checkFilesPromises)).filter((file) => null !== file);
      if (allowedFiles.length > 0) {
        loadFiles(allowedFiles);
      } else {
        const message2 = hasInvalidFiles ? (0, import_i18n90.__)("Sorry, you are not allowed to upload this file type.") : (0, import_i18n90.__)("No fonts found to install.");
        setNotice({
          type: "error",
          message: message2
        });
        setIsUploading(false);
      }
    };
    const loadFiles = async (files) => {
      const fontFacesLoaded = await Promise.all(
        files.map(async (fontFile) => {
          const fontFaceData = await getFontFaceMetadata(fontFile);
          await loadFontFaceInBrowser(
            fontFaceData,
            fontFaceData.file,
            "all"
          );
          return fontFaceData;
        })
      );
      handleInstall(fontFacesLoaded);
    };
    async function isFontFile(file) {
      const font2 = new Font("Uploaded Font");
      try {
        const buffer = await readFileAsArrayBuffer(file);
        await font2.fromDataBuffer(buffer, "font");
        return true;
      } catch (error) {
        return false;
      }
    }
    async function readFileAsArrayBuffer(file) {
      return new Promise((resolve, reject) => {
        const reader = new window.FileReader();
        reader.readAsArrayBuffer(file);
        reader.onload = () => resolve(reader.result);
        reader.onerror = reject;
      });
    }
    const getFontFaceMetadata = async (fontFile) => {
      const buffer = await readFileAsArrayBuffer(fontFile);
      const fontObj = new Font("Uploaded Font");
      fontObj.fromDataBuffer(buffer, fontFile.name);
      const onloadEvent = await new Promise(
        (resolve) => fontObj.onload = resolve
      );
      const font2 = onloadEvent.detail.font;
      const { name: name2 } = font2.opentype.tables;
      const fontName = name2.get(16) || name2.get(1);
      const isItalic = name2.get(2).toLowerCase().includes("italic");
      const fontWeight = font2.opentype.tables["OS/2"].usWeightClass || "normal";
      const isVariable = !!font2.opentype.tables.fvar;
      const weightAxis = isVariable && font2.opentype.tables.fvar.axes.find(
        ({ tag }) => tag === "wght"
      );
      const weightRange = weightAxis ? `${weightAxis.minValue} ${weightAxis.maxValue}` : null;
      return {
        file: fontFile,
        fontFamily: fontName,
        fontStyle: isItalic ? "italic" : "normal",
        fontWeight: weightRange || fontWeight
      };
    };
    const handleInstall = async (fontFaces) => {
      const fontFamilies = makeFamiliesFromFaces(fontFaces);
      try {
        await installFonts(fontFamilies);
        setNotice({
          type: "success",
          message: (0, import_i18n90.__)("Fonts were installed successfully.")
        });
      } catch (error) {
        const typedError = error;
        setNotice({
          type: "error",
          message: typedError.message,
          errors: typedError?.installationErrors
        });
      }
      setIsUploading(false);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)("div", { className: "font-library__tabpanel-layout", children: [
      /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(import_components64.DropZone, { onFilesDrop: handleDropZone }),
      /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)(import_components64.__experimentalVStack, { className: "font-library__local-fonts", justify: "start", children: [
        notice && /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)(
          import_components64.Notice,
          {
            status: notice.type,
            __unstableHTML: true,
            onRemove: () => setNotice(null),
            children: [
              notice.message,
              notice.errors && /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("ul", { children: notice.errors.map((error, index2) => /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("li", { children: error }, index2)) })
            ]
          }
        ),
        isUploading && /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(import_components64.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { className: "font-library__upload-area", children: /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(import_components64.ProgressBar, {}) }) }),
        !isUploading && /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
          import_components64.FormFileUpload,
          {
            accept: ALLOWED_FILE_EXTENSIONS.map(
              (ext) => `.${ext}`
            ).join(","),
            multiple: true,
            onChange: onFilesUpload,
            render: ({ openFileDialog }) => /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
              import_components64.Button,
              {
                __next40pxDefaultSize: true,
                className: "font-library__upload-area",
                onClick: openFileDialog,
                children: (0, import_i18n90.__)("Upload font")
              }
            )
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(import_components64.__experimentalText, { className: "font-library__upload-area__text", children: (0, import_i18n90.__)(
          "Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2."
        ) })
      ] })
    ] });
  }
  var upload_fonts_default = UploadFonts;

  // packages/global-styles-ui/build-module/font-library/modal.mjs
  var import_jsx_runtime160 = __toESM(require_jsx_runtime(), 1);
  var { Tabs } = unlock3(import_components65.privateApis);
  var DEFAULT_TAB = {
    id: "installed-fonts",
    title: (0, import_i18n91._x)("Library", "Font library")
  };
  var UPLOAD_TAB = {
    id: "upload-fonts",
    title: (0, import_i18n91._x)("Upload", "noun")
  };
  var tabsFromCollections = (collections) => collections.map(({ slug, name: name2 }) => ({
    id: slug,
    title: collections.length === 1 && slug === "google-fonts" ? (0, import_i18n91.__)("Install Fonts") : name2
  }));
  function FontLibraryModal({
    onRequestClose,
    defaultTabId = "installed-fonts"
  }) {
    const { records: collections = [] } = (0, import_core_data45.useEntityRecords)("root", "fontCollection", {
      _fields: "slug,name,description"
    });
    const canUserCreate = (0, import_data63.useSelect)((select6) => {
      return select6(import_core_data45.store).canUser("create", {
        kind: "postType",
        name: "wp_font_family"
      });
    }, []);
    const tabs = [DEFAULT_TAB];
    if (canUserCreate) {
      tabs.push(UPLOAD_TAB);
      tabs.push(...tabsFromCollections(collections || []));
    }
    return /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
      import_components65.Modal,
      {
        title: (0, import_i18n91.__)("Fonts"),
        onRequestClose,
        isFullScreen: true,
        className: "font-library-modal",
        children: /* @__PURE__ */ (0, import_jsx_runtime160.jsxs)(Tabs, { defaultTabId, children: [
          /* @__PURE__ */ (0, import_jsx_runtime160.jsx)("div", { className: "font-library-modal__tablist-container", children: /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(Tabs.TabList, { children: tabs.map(({ id, title }) => /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(Tabs.Tab, { tabId: id, children: title }, id)) }) }),
          tabs.map(({ id }) => {
            let contents;
            switch (id) {
              case "upload-fonts":
                contents = /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(upload_fonts_default, {});
                break;
              case "installed-fonts":
                contents = /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(installed_fonts_default, {});
                break;
              default:
                contents = /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(font_collection_default, { slug: id });
            }
            return /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
              Tabs.TabPanel,
              {
                tabId: id,
                focusable: false,
                className: "font-library-modal__tab-panel",
                children: contents
              },
              id
            );
          })
        ] })
      }
    );
  }
  var modal_default = FontLibraryModal;

  // packages/global-styles-ui/build-module/font-family-item.mjs
  var import_i18n92 = __toESM(require_i18n(), 1);
  var import_components66 = __toESM(require_components(), 1);
  var import_element64 = __toESM(require_element(), 1);
  var import_jsx_runtime161 = __toESM(require_jsx_runtime(), 1);
  function FontFamilyItem({ font: font2 }) {
    const { handleSetLibraryFontSelected, setModalTabOpen } = (0, import_element64.useContext)(FontLibraryContext);
    const variantsCount = font2?.fontFace?.length || 1;
    const handleClick = () => {
      handleSetLibraryFontSelected?.(font2);
      setModalTabOpen?.("installed-fonts");
    };
    const previewStyle = getFamilyPreviewStyle(font2);
    return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(import_components66.__experimentalItem, { onClick: handleClick, children: /* @__PURE__ */ (0, import_jsx_runtime161.jsxs)(import_components66.__experimentalHStack, { justify: "space-between", children: [
      /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(import_components66.FlexItem, { style: previewStyle, children: font2.name }),
      /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(import_components66.FlexItem, { className: "global-styles-ui-screen-typography__font-variants-count", children: (0, import_i18n92.sprintf)(
        /* translators: %d: Number of font variants. */
        (0, import_i18n92._n)("%d variant", "%d variants", variantsCount),
        variantsCount
      ) })
    ] }) });
  }
  var font_family_item_default = FontFamilyItem;

  // packages/global-styles-ui/build-module/font-families.mjs
  var import_jsx_runtime162 = __toESM(require_jsx_runtime(), 1);
  function mapFontsWithSource(fonts, source) {
    return fonts ? fonts.map((f3) => setUIValuesNeeded(f3, { source })) : [];
  }
  function FontFamiliesInner() {
    const { baseCustomFonts, modalTabOpen, setModalTabOpen } = (0, import_element65.useContext)(FontLibraryContext);
    const [fontFamilies] = useSetting("typography.fontFamilies");
    const [baseFontFamilies] = useSetting(
      "typography.fontFamilies",
      void 0,
      "base"
    );
    const themeFonts = mapFontsWithSource(fontFamilies?.theme, "theme");
    const customFonts = mapFontsWithSource(fontFamilies?.custom, "custom");
    const activeFonts = [...themeFonts, ...customFonts].sort(
      (a3, b3) => a3.name.localeCompare(b3.name)
    );
    const hasFonts = 0 < activeFonts.length;
    const hasInstalledFonts = hasFonts || baseFontFamilies?.theme?.length > 0 || (baseCustomFonts?.length ?? 0) > 0;
    return /* @__PURE__ */ (0, import_jsx_runtime162.jsxs)(import_jsx_runtime162.Fragment, { children: [
      !!modalTabOpen && /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
        modal_default,
        {
          onRequestClose: () => setModalTabOpen?.(""),
          defaultTabId: modalTabOpen
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime162.jsxs)(import_components67.__experimentalVStack, { spacing: 2, children: [
        /* @__PURE__ */ (0, import_jsx_runtime162.jsxs)(import_components67.__experimentalHStack, { justify: "space-between", children: [
          /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(Subtitle, { level: 3, children: (0, import_i18n93.__)("Fonts") }),
          /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
            import_components67.Button,
            {
              onClick: () => setModalTabOpen?.("installed-fonts"),
              label: (0, import_i18n93.__)("Manage fonts"),
              icon: settings_default,
              size: "small"
            }
          )
        ] }),
        activeFonts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(import_jsx_runtime162.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(import_components67.__experimentalItemGroup, { size: "large", isBordered: true, isSeparated: true, children: activeFonts.map((font2) => /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
          font_family_item_default,
          {
            font: font2
          },
          font2.slug
        )) }) }),
        !hasFonts && /* @__PURE__ */ (0, import_jsx_runtime162.jsxs)(import_jsx_runtime162.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(import_components67.__experimentalText, { as: "p", children: hasInstalledFonts ? (0, import_i18n93.__)("No fonts activated.") : (0, import_i18n93.__)("No fonts installed.") }),
          /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
            import_components67.Button,
            {
              className: "global-styles-ui-font-families__manage-fonts",
              variant: "secondary",
              __next40pxDefaultSize: true,
              onClick: () => {
                setModalTabOpen?.(
                  hasInstalledFonts ? "installed-fonts" : "upload-fonts"
                );
              },
              children: hasInstalledFonts ? (0, import_i18n93.__)("Manage fonts") : (0, import_i18n93.__)("Add fonts")
            }
          )
        ] })
      ] })
    ] });
  }
  function FontFamilies({ ...props }) {
    return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(context_default, { children: /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(FontFamiliesInner, { ...props }) });
  }

  // packages/global-styles-ui/build-module/font-sizes/font-sizes-count.mjs
  var import_i18n94 = __toESM(require_i18n(), 1);
  var import_components68 = __toESM(require_components(), 1);
  var import_jsx_runtime163 = __toESM(require_jsx_runtime(), 1);
  function FontSizes() {
    return /* @__PURE__ */ (0, import_jsx_runtime163.jsxs)(import_components68.__experimentalVStack, { spacing: 2, children: [
      /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(import_components68.__experimentalHStack, { justify: "space-between", children: /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(Subtitle, { level: 3, children: (0, import_i18n94.__)("Font Sizes") }) }),
      /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(import_components68.__experimentalItemGroup, { isBordered: true, isSeparated: true, children: /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(NavigationButtonAsItem, { path: "/typography/font-sizes", children: /* @__PURE__ */ (0, import_jsx_runtime163.jsxs)(import_components68.__experimentalHStack, { direction: "row", children: [
        /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(import_components68.FlexItem, { children: (0, import_i18n94.__)("Font size presets") }),
        /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(icon_default, { icon: (0, import_i18n94.isRTL)() ? chevron_left_default : chevron_right_default })
      ] }) }) })
    ] });
  }
  var font_sizes_count_default = FontSizes;

  // packages/global-styles-ui/build-module/screen-typography.mjs
  var import_jsx_runtime164 = __toESM(require_jsx_runtime(), 1);
  function ScreenTypography() {
    const { fontLibraryEnabled } = (0, import_element66.useContext)(GlobalStylesContext);
    return /* @__PURE__ */ (0, import_jsx_runtime164.jsxs)(import_jsx_runtime164.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
        ScreenHeader,
        {
          title: (0, import_i18n95.__)("Typography"),
          description: (0, import_i18n95.__)(
            "Available fonts, typographic styles, and the application of those styles."
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(ScreenBody, { children: /* @__PURE__ */ (0, import_jsx_runtime164.jsxs)(import_components69.__experimentalVStack, { spacing: 7, children: [
        /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(TypographyVariations, { title: (0, import_i18n95.__)("Typesets") }),
        fontLibraryEnabled && /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(FontFamilies, {}),
        /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(typography_elements_default, {}),
        /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(font_sizes_count_default, {})
      ] }) })
    ] });
  }
  var screen_typography_default = ScreenTypography;

  // packages/global-styles-ui/build-module/screen-typography-element.mjs
  var import_i18n96 = __toESM(require_i18n(), 1);
  var import_components70 = __toESM(require_components(), 1);
  var import_element67 = __toESM(require_element(), 1);

  // packages/global-styles-ui/build-module/typography-panel.mjs
  var import_block_editor23 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime165 = __toESM(require_jsx_runtime(), 1);
  var { useSettingsForBlockElement: useSettingsForBlockElement4, TypographyPanel: StylesTypographyPanel2 } = unlock3(import_block_editor23.privateApis);
  function TypographyPanel({
    element,
    headingLevel
  }) {
    let prefixParts = [];
    if (element === "heading") {
      prefixParts = prefixParts.concat(["elements", headingLevel]);
    } else if (element && element !== "text") {
      prefixParts = prefixParts.concat(["elements", element]);
    }
    const prefix2 = prefixParts.join(".");
    const [style] = useStyle(prefix2, "", "user", false);
    const [inheritedStyle, setStyle2] = useStyle(
      prefix2,
      "",
      "merged",
      false
    );
    const [rawSettings] = useSetting("");
    const usedElement = element === "heading" ? headingLevel : element;
    const settings = useSettingsForBlockElement4(
      rawSettings,
      void 0,
      usedElement
    );
    return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(
      StylesTypographyPanel2,
      {
        inheritedValue: inheritedStyle,
        value: style,
        onChange: setStyle2,
        settings
      }
    );
  }

  // packages/global-styles-ui/build-module/typography-preview.mjs
  var import_jsx_runtime166 = __toESM(require_jsx_runtime(), 1);
  function TypographyPreview({
    name: name2,
    element,
    headingLevel
  }) {
    let prefix2 = "";
    if (element === "heading") {
      prefix2 = `elements.${headingLevel}.`;
    } else if (element && element !== "text") {
      prefix2 = `elements.${element}.`;
    }
    const [fontFamily] = useStyle(prefix2 + "typography.fontFamily", name2);
    const [gradientValue] = useStyle(prefix2 + "color.gradient", name2);
    const [backgroundColor] = useStyle(prefix2 + "color.background", name2);
    const [fallbackBackgroundColor] = useStyle("color.background");
    const [color] = useStyle(prefix2 + "color.text", name2);
    const [fontSize] = useStyle(prefix2 + "typography.fontSize", name2);
    const [fontStyle] = useStyle(prefix2 + "typography.fontStyle", name2);
    const [fontWeight] = useStyle(prefix2 + "typography.fontWeight", name2);
    const [letterSpacing] = useStyle(
      prefix2 + "typography.letterSpacing",
      name2
    );
    const extraStyles = element === "link" ? {
      textDecoration: "underline"
    } : {};
    return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
      "div",
      {
        className: "global-styles-ui-typography-preview",
        style: {
          fontFamily: fontFamily ?? "serif",
          background: gradientValue ?? backgroundColor ?? fallbackBackgroundColor,
          color,
          fontSize,
          fontStyle,
          fontWeight,
          letterSpacing,
          ...extraStyles
        },
        children: "Aa"
      }
    );
  }

  // packages/global-styles-ui/build-module/screen-typography-element.mjs
  var import_jsx_runtime167 = __toESM(require_jsx_runtime(), 1);
  var elements = {
    text: {
      description: (0, import_i18n96.__)("Manage the fonts used on the site."),
      title: (0, import_i18n96.__)("Text")
    },
    link: {
      description: (0, import_i18n96.__)("Manage the fonts and typography used on the links."),
      title: (0, import_i18n96.__)("Links")
    },
    heading: {
      description: (0, import_i18n96.__)("Manage the fonts and typography used on headings."),
      title: (0, import_i18n96.__)("Headings")
    },
    caption: {
      description: (0, import_i18n96.__)("Manage the fonts and typography used on captions."),
      title: (0, import_i18n96.__)("Captions")
    },
    button: {
      description: (0, import_i18n96.__)("Manage the fonts and typography used on buttons."),
      title: (0, import_i18n96.__)("Buttons")
    }
  };
  function ScreenTypographyElement({ element }) {
    const [headingLevel, setHeadingLevel] = (0, import_element67.useState)("heading");
    return /* @__PURE__ */ (0, import_jsx_runtime167.jsxs)(import_jsx_runtime167.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
        ScreenHeader,
        {
          title: elements[element].title,
          description: elements[element].description
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(import_components70.__experimentalSpacer, { marginX: 4, children: /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
        TypographyPreview,
        {
          element,
          headingLevel
        }
      ) }),
      element === "heading" && /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(import_components70.__experimentalSpacer, { marginX: 4, marginBottom: "1em", children: /* @__PURE__ */ (0, import_jsx_runtime167.jsxs)(
        import_components70.__experimentalToggleGroupControl,
        {
          label: (0, import_i18n96.__)("Select heading level"),
          hideLabelFromVision: true,
          value: headingLevel,
          onChange: (value) => setHeadingLevel(value),
          isBlock: true,
          size: "__unstable-large",
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
              import_components70.__experimentalToggleGroupControlOption,
              {
                value: "heading",
                showTooltip: true,
                "aria-label": (0, import_i18n96.__)("All headings"),
                label: (0, import_i18n96._x)("All", "heading levels")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
              import_components70.__experimentalToggleGroupControlOption,
              {
                value: "h1",
                showTooltip: true,
                "aria-label": (0, import_i18n96.__)("Heading 1"),
                label: (0, import_i18n96.__)("H1")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
              import_components70.__experimentalToggleGroupControlOption,
              {
                value: "h2",
                showTooltip: true,
                "aria-label": (0, import_i18n96.__)("Heading 2"),
                label: (0, import_i18n96.__)("H2")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
              import_components70.__experimentalToggleGroupControlOption,
              {
                value: "h3",
                showTooltip: true,
                "aria-label": (0, import_i18n96.__)("Heading 3"),
                label: (0, import_i18n96.__)("H3")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
              import_components70.__experimentalToggleGroupControlOption,
              {
                value: "h4",
                showTooltip: true,
                "aria-label": (0, import_i18n96.__)("Heading 4"),
                label: (0, import_i18n96.__)("H4")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
              import_components70.__experimentalToggleGroupControlOption,
              {
                value: "h5",
                showTooltip: true,
                "aria-label": (0, import_i18n96.__)("Heading 5"),
                label: (0, import_i18n96.__)("H5")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
              import_components70.__experimentalToggleGroupControlOption,
              {
                value: "h6",
                showTooltip: true,
                "aria-label": (0, import_i18n96.__)("Heading 6"),
                label: (0, import_i18n96.__)("H6")
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
        TypographyPanel,
        {
          element,
          headingLevel
        }
      )
    ] });
  }
  var screen_typography_element_default = ScreenTypographyElement;

  // packages/global-styles-ui/build-module/screen-colors.mjs
  var import_i18n98 = __toESM(require_i18n(), 1);
  var import_components73 = __toESM(require_components(), 1);
  var import_block_editor24 = __toESM(require_block_editor(), 1);

  // packages/global-styles-ui/build-module/palette.mjs
  var import_components72 = __toESM(require_components(), 1);
  var import_i18n97 = __toESM(require_i18n(), 1);
  var import_element68 = __toESM(require_element(), 1);

  // packages/global-styles-ui/build-module/color-indicator-wrapper.mjs
  var import_components71 = __toESM(require_components(), 1);
  var import_jsx_runtime168 = __toESM(require_jsx_runtime(), 1);
  function ColorIndicatorWrapper({
    className,
    children,
    ...props
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
      import_components71.Flex,
      {
        className: clsx_default(
          "global-styles-ui__color-indicator-wrapper",
          className
        ),
        ...props,
        children
      }
    );
  }
  var color_indicator_wrapper_default = ColorIndicatorWrapper;

  // packages/global-styles-ui/build-module/palette.mjs
  var import_jsx_runtime169 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_COLORS = [];
  function Palette({ name: name2 }) {
    const [customColors] = useSetting("color.palette.custom");
    const [themeColors] = useSetting("color.palette.theme");
    const [defaultColors] = useSetting("color.palette.default");
    const [defaultPaletteEnabled] = useSetting(
      "color.defaultPalette",
      name2
    );
    const safeCustomColors = customColors || EMPTY_COLORS;
    const safeThemeColors = themeColors || EMPTY_COLORS;
    const safeDefaultColors = defaultColors || EMPTY_COLORS;
    const safeDefaultPaletteEnabled = defaultPaletteEnabled ?? true;
    const colors2 = (0, import_element68.useMemo)(
      () => [
        ...safeCustomColors,
        ...safeThemeColors,
        ...safeDefaultColors && safeDefaultPaletteEnabled ? safeDefaultColors : EMPTY_COLORS
      ],
      [
        safeCustomColors,
        safeThemeColors,
        safeDefaultColors,
        safeDefaultPaletteEnabled
      ]
    );
    const screenPath = !name2 ? "/colors/palette" : "/blocks/" + encodeURIComponent(name2) + "/colors/palette";
    return /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)(import_components72.__experimentalVStack, { spacing: 3, children: [
      /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(Subtitle, { level: 3, children: (0, import_i18n97.__)("Palette") }),
      /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(import_components72.__experimentalItemGroup, { isBordered: true, isSeparated: true, children: /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(NavigationButtonAsItem, { path: screenPath, children: /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)(import_components72.__experimentalHStack, { direction: "row", children: [
        colors2.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)(import_jsx_runtime169.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(import_components72.__experimentalZStack, { isLayered: false, offset: -8, children: colors2.slice(0, 5).map(({ color }, index2) => /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
            color_indicator_wrapper_default,
            {
              children: /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
                import_components72.ColorIndicator,
                {
                  colorValue: color
                }
              )
            },
            `${color}-${index2}`
          )) }),
          /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(import_components72.FlexItem, { isBlock: true, children: (0, import_i18n97.__)("Edit palette") })
        ] }) : /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(import_components72.FlexItem, { children: (0, import_i18n97.__)("Add colors") }),
        /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(icon_default, { icon: (0, import_i18n97.isRTL)() ? chevron_left_default : chevron_right_default })
      ] }) }) })
    ] });
  }
  var palette_default = Palette;

  // packages/global-styles-ui/build-module/screen-colors.mjs
  var import_jsx_runtime170 = __toESM(require_jsx_runtime(), 1);
  var { useSettingsForBlockElement: useSettingsForBlockElement5, ColorPanel: StylesColorPanel2 } = unlock3(
    import_block_editor24.privateApis
  );
  function ScreenColors() {
    const [style, setStyle2] = useStyle(
      "",
      void 0,
      "user",
      false
    );
    const [inheritedStyle] = useStyle(
      "",
      void 0,
      "merged",
      false
    );
    const [rawSettings] = useSetting("");
    const settings = useSettingsForBlockElement5(rawSettings);
    return /* @__PURE__ */ (0, import_jsx_runtime170.jsxs)(import_jsx_runtime170.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
        ScreenHeader,
        {
          title: (0, import_i18n98.__)("Colors"),
          description: (0, import_i18n98.__)(
            "Palette colors and the application of those colors on site elements."
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(ScreenBody, { children: /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(import_components73.__experimentalVStack, { spacing: 7, children: /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(palette_default, {}) }) }),
      /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
        StylesColorPanel2,
        {
          inheritedValue: inheritedStyle,
          value: style,
          onChange: setStyle2,
          settings
        }
      )
    ] });
  }
  var screen_colors_default = ScreenColors;

  // packages/global-styles-ui/build-module/screen-color-palette.mjs
  var import_i18n101 = __toESM(require_i18n(), 1);
  var import_components78 = __toESM(require_components(), 1);

  // packages/global-styles-ui/build-module/color-palette-panel.mjs
  var import_compose12 = __toESM(require_compose(), 1);
  var import_components76 = __toESM(require_components(), 1);
  var import_i18n99 = __toESM(require_i18n(), 1);

  // packages/global-styles-ui/build-module/variations/variations-color.mjs
  var import_components75 = __toESM(require_components(), 1);

  // packages/global-styles-ui/build-module/preview-colors.mjs
  var import_components74 = __toESM(require_components(), 1);

  // packages/global-styles-ui/build-module/preset-colors.mjs
  var import_jsx_runtime171 = __toESM(require_jsx_runtime(), 1);
  function PresetColors() {
    const { paletteColors } = useStylesPreviewColors();
    return paletteColors.slice(0, 4).map(({ slug, color }, index2) => /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
      "div",
      {
        style: {
          flexGrow: 1,
          height: "100%",
          background: color
        }
      },
      `${slug}-${index2}`
    ));
  }

  // packages/global-styles-ui/build-module/preview-colors.mjs
  var import_jsx_runtime172 = __toESM(require_jsx_runtime(), 1);
  var firstFrameVariants2 = {
    start: {
      scale: 1,
      opacity: 1
    },
    hover: {
      scale: 0,
      opacity: 0
    }
  };
  var StylesPreviewColors = ({
    label,
    isFocused,
    withHoverView
  }) => {
    return /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
      preview_wrapper_default,
      {
        label,
        isFocused,
        withHoverView,
        children: ({ key }) => /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
          import_components74.__unstableMotion.div,
          {
            variants: firstFrameVariants2,
            style: {
              height: "100%",
              overflow: "hidden"
            },
            children: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
              import_components74.__experimentalHStack,
              {
                spacing: 0,
                justify: "center",
                style: {
                  height: "100%",
                  overflow: "hidden"
                },
                children: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(PresetColors, {})
              }
            )
          },
          key
        )
      }
    );
  };
  var preview_colors_default = StylesPreviewColors;

  // packages/global-styles-ui/build-module/variations/variations-color.mjs
  var import_jsx_runtime173 = __toESM(require_jsx_runtime(), 1);
  var propertiesToFilter2 = ["color"];
  function ColorVariations({
    title,
    gap = 2
  }) {
    const colorVariations = useCurrentMergeThemeStyleVariationsWithUserConfig(propertiesToFilter2);
    if (colorVariations?.length <= 1) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime173.jsxs)(import_components75.__experimentalVStack, { spacing: 3, children: [
      title && /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(Subtitle, { level: 3, children: title }),
      /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(import_components75.__experimentalGrid, { gap, children: colorVariations.map((variation, index2) => /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
        Variation,
        {
          variation,
          isPill: true,
          properties: propertiesToFilter2,
          showTooltip: true,
          children: () => /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(preview_colors_default, {})
        },
        index2
      )) })
    ] });
  }

  // packages/global-styles-ui/build-module/color-palette-panel.mjs
  var import_jsx_runtime174 = __toESM(require_jsx_runtime(), 1);
  var mobilePopoverProps = { placement: "bottom-start", offset: 8 };
  function ColorPalettePanel({ name: name2 }) {
    const [themeColors, setThemeColors] = useSetting(
      "color.palette.theme",
      name2
    );
    const [baseThemeColors] = useSetting(
      "color.palette.theme",
      name2,
      "base"
    );
    const [defaultColors, setDefaultColors] = useSetting(
      "color.palette.default",
      name2
    );
    const [baseDefaultColors] = useSetting(
      "color.palette.default",
      name2,
      "base"
    );
    const [customColors, setCustomColors] = useSetting(
      "color.palette.custom",
      name2
    );
    const [defaultPaletteEnabled] = useSetting(
      "color.defaultPalette",
      name2
    );
    const isMobileViewport = (0, import_compose12.useViewportMatch)("small", "<");
    const popoverProps = isMobileViewport ? mobilePopoverProps : void 0;
    const [randomizeThemeColors] = useColorRandomizer(name2);
    return /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(import_components76.__experimentalVStack, { className: "global-styles-ui-color-palette-panel", spacing: 8, children: [
      /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(import_components76.__experimentalVStack, { spacing: 4, children: [
        !!themeColors && !!themeColors.length && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
          import_components76.__experimentalPaletteEdit,
          {
            canReset: themeColors !== baseThemeColors,
            canOnlyChangeValues: true,
            colors: themeColors,
            onChange: setThemeColors,
            paletteLabel: (0, import_i18n99.__)("Theme"),
            paletteLabelHeadingLevel: 3,
            popoverProps
          }
        ),
        window.__experimentalEnableColorRandomizer && themeColors?.length > 0 && randomizeThemeColors && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
          import_components76.Button,
          {
            __next40pxDefaultSize: true,
            variant: "secondary",
            icon: shuffle_default,
            onClick: randomizeThemeColors,
            children: (0, import_i18n99.__)("Randomize colors")
          }
        )
      ] }),
      !!defaultColors && !!defaultColors.length && !!defaultPaletteEnabled && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
        import_components76.__experimentalPaletteEdit,
        {
          canReset: defaultColors !== baseDefaultColors,
          canOnlyChangeValues: true,
          colors: defaultColors,
          onChange: setDefaultColors,
          paletteLabel: (0, import_i18n99.__)("Default"),
          paletteLabelHeadingLevel: 3,
          popoverProps
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
        import_components76.__experimentalPaletteEdit,
        {
          colors: customColors,
          onChange: setCustomColors,
          paletteLabel: (0, import_i18n99.__)("Custom"),
          paletteLabelHeadingLevel: 3,
          slugPrefix: "custom-",
          popoverProps
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(ColorVariations, { title: (0, import_i18n99.__)("Palettes") })
    ] });
  }

  // packages/global-styles-ui/build-module/gradients-palette-panel.mjs
  var import_compose13 = __toESM(require_compose(), 1);
  var import_components77 = __toESM(require_components(), 1);
  var import_i18n100 = __toESM(require_i18n(), 1);
  var import_jsx_runtime175 = __toESM(require_jsx_runtime(), 1);
  var mobilePopoverProps2 = { placement: "bottom-start", offset: 8 };
  var noop5 = () => {
  };
  function GradientPalettePanel({
    name: name2
  }) {
    const [themeGradients, setThemeGradients] = useSetting(
      "color.gradients.theme",
      name2
    );
    const [baseThemeGradients] = useSetting(
      "color.gradients.theme",
      name2,
      "base"
    );
    const [defaultGradients, setDefaultGradients] = useSetting(
      "color.gradients.default",
      name2
    );
    const [baseDefaultGradients] = useSetting(
      "color.gradients.default",
      name2,
      "base"
    );
    const [customGradients, setCustomGradients] = useSetting(
      "color.gradients.custom",
      name2
    );
    const [defaultPaletteEnabled] = useSetting(
      "color.defaultGradients",
      name2
    );
    const [customDuotone] = useSetting("color.duotone.custom") || [];
    const [defaultDuotone] = useSetting("color.duotone.default") || [];
    const [themeDuotone] = useSetting("color.duotone.theme") || [];
    const [defaultDuotoneEnabled] = useSetting("color.defaultDuotone");
    const duotonePalette = [
      ...customDuotone || [],
      ...themeDuotone || [],
      ...defaultDuotone && defaultDuotoneEnabled ? defaultDuotone : []
    ];
    const isMobileViewport = (0, import_compose13.useViewportMatch)("small", "<");
    const popoverProps = isMobileViewport ? mobilePopoverProps2 : void 0;
    return /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)(
      import_components77.__experimentalVStack,
      {
        className: "global-styles-ui-gradient-palette-panel",
        spacing: 8,
        children: [
          !!themeGradients && !!themeGradients.length && /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
            import_components77.__experimentalPaletteEdit,
            {
              canReset: themeGradients !== baseThemeGradients,
              canOnlyChangeValues: true,
              gradients: themeGradients,
              onChange: setThemeGradients,
              paletteLabel: (0, import_i18n100.__)("Theme"),
              paletteLabelHeadingLevel: 3,
              popoverProps
            }
          ),
          !!defaultGradients && !!defaultGradients.length && !!defaultPaletteEnabled && /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
            import_components77.__experimentalPaletteEdit,
            {
              canReset: defaultGradients !== baseDefaultGradients,
              canOnlyChangeValues: true,
              gradients: defaultGradients,
              onChange: setDefaultGradients,
              paletteLabel: (0, import_i18n100.__)("Default"),
              paletteLabelHeadingLevel: 3,
              popoverProps
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
            import_components77.__experimentalPaletteEdit,
            {
              gradients: customGradients,
              onChange: setCustomGradients,
              paletteLabel: (0, import_i18n100.__)("Custom"),
              paletteLabelHeadingLevel: 3,
              slugPrefix: "custom-",
              popoverProps
            }
          ),
          !!duotonePalette && !!duotonePalette.length && /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)("div", { children: [
            /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(Subtitle, { level: 3, children: (0, import_i18n100.__)("Duotone") }),
            /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(import_components77.__experimentalSpacer, { margin: 3 }),
            /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
              import_components77.DuotonePicker,
              {
                duotonePalette,
                disableCustomDuotone: true,
                disableCustomColors: true,
                clearable: false,
                onChange: noop5,
                colorPalette: []
              }
            )
          ] })
        ]
      }
    );
  }

  // packages/global-styles-ui/build-module/screen-color-palette.mjs
  var import_jsx_runtime176 = __toESM(require_jsx_runtime(), 1);
  var { Tabs: Tabs2 } = unlock3(import_components78.privateApis);
  function ScreenColorPalette({ name: name2 }) {
    return /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(import_jsx_runtime176.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
        ScreenHeader,
        {
          title: (0, import_i18n101.__)("Edit palette"),
          description: (0, import_i18n101.__)(
            "The combination of colors used across the site and in color pickers."
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(Tabs2, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(Tabs2.TabList, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(Tabs2.Tab, { tabId: "color", children: (0, import_i18n101.__)("Color") }),
          /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(Tabs2.Tab, { tabId: "gradient", children: (0, import_i18n101.__)("Gradient") })
        ] }),
        /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(Tabs2.TabPanel, { tabId: "color", focusable: false, children: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(ColorPalettePanel, { name: name2 }) }),
        /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(Tabs2.TabPanel, { tabId: "gradient", focusable: false, children: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(GradientPalettePanel, { name: name2 }) })
      ] })
    ] });
  }
  var screen_color_palette_default = ScreenColorPalette;

  // packages/global-styles-ui/build-module/screen-background.mjs
  var import_i18n102 = __toESM(require_i18n(), 1);
  var import_block_editor26 = __toESM(require_block_editor(), 1);
  var import_components79 = __toESM(require_components(), 1);

  // packages/global-styles-ui/build-module/background-panel.mjs
  var import_block_editor25 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime177 = __toESM(require_jsx_runtime(), 1);
  var BACKGROUND_DEFAULT_VALUES = {
    backgroundSize: "auto"
  };
  var { BackgroundPanel: StylesBackgroundPanel2 } = unlock3(
    import_block_editor25.privateApis
  );
  function BackgroundPanel() {
    const [style] = useStyle("", void 0, "user", false);
    const [inheritedStyle, setStyle2] = useStyle(
      "",
      void 0,
      "merged",
      false
    );
    const [settings] = useSetting("");
    return /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(
      StylesBackgroundPanel2,
      {
        inheritedValue: inheritedStyle,
        value: style,
        onChange: setStyle2,
        settings,
        defaultValues: BACKGROUND_DEFAULT_VALUES
      }
    );
  }

  // packages/global-styles-ui/build-module/screen-background.mjs
  var import_jsx_runtime178 = __toESM(require_jsx_runtime(), 1);
  var { useHasBackgroundPanel: useHasBackgroundPanel3 } = unlock3(import_block_editor26.privateApis);
  function ScreenBackground() {
    const [settings] = useSetting("");
    const hasBackgroundPanel = useHasBackgroundPanel3(settings);
    return /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)(import_jsx_runtime178.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
        ScreenHeader,
        {
          title: (0, import_i18n102.__)("Background"),
          description: /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(import_components79.__experimentalText, { children: (0, import_i18n102.__)("Set styles for the site's background.") })
        }
      ),
      hasBackgroundPanel && /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(BackgroundPanel, {})
    ] });
  }
  var screen_background_default = ScreenBackground;

  // packages/global-styles-ui/build-module/shadows-panel.mjs
  var import_components81 = __toESM(require_components(), 1);
  var import_i18n104 = __toESM(require_i18n(), 1);
  var import_element69 = __toESM(require_element(), 1);

  // packages/global-styles-ui/build-module/confirm-reset-shadow-dialog.mjs
  var import_components80 = __toESM(require_components(), 1);
  var import_i18n103 = __toESM(require_i18n(), 1);
  var import_jsx_runtime179 = __toESM(require_jsx_runtime(), 1);
  function ConfirmResetShadowDialog({
    text,
    confirmButtonText,
    isOpen,
    toggleOpen,
    onConfirm
  }) {
    const handleConfirm = async () => {
      toggleOpen();
      onConfirm();
    };
    const handleCancel = () => {
      toggleOpen();
    };
    return /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
      import_components80.__experimentalConfirmDialog,
      {
        isOpen,
        cancelButtonText: (0, import_i18n103.__)("Cancel"),
        confirmButtonText,
        onCancel: handleCancel,
        onConfirm: handleConfirm,
        size: "medium",
        children: text
      }
    );
  }
  var confirm_reset_shadow_dialog_default = ConfirmResetShadowDialog;

  // packages/global-styles-ui/build-module/shadows-panel.mjs
  var import_jsx_runtime180 = __toESM(require_jsx_runtime(), 1);
  var { Menu } = unlock3(import_components81.privateApis);
  var defaultShadow = "6px 6px 9px rgba(0, 0, 0, 0.2)";
  function ShadowsPanel() {
    const [defaultShadows] = useSetting("shadow.presets.default");
    const [defaultShadowsEnabled] = useSetting("shadow.defaultPresets");
    const [themeShadows] = useSetting("shadow.presets.theme");
    const [customShadows, setCustomShadows] = useSetting(
      "shadow.presets.custom"
    );
    const onCreateShadow = (shadow) => {
      setCustomShadows([...customShadows || [], shadow]);
    };
    const handleResetShadows = () => {
      setCustomShadows([]);
    };
    const [isResetDialogOpen, setIsResetDialogOpen] = (0, import_element69.useState)(false);
    const toggleResetDialog = () => setIsResetDialogOpen(!isResetDialogOpen);
    return /* @__PURE__ */ (0, import_jsx_runtime180.jsxs)(import_jsx_runtime180.Fragment, { children: [
      isResetDialogOpen && /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
        confirm_reset_shadow_dialog_default,
        {
          text: (0, import_i18n104.__)(
            "Are you sure you want to remove all custom shadows?"
          ),
          confirmButtonText: (0, import_i18n104.__)("Remove"),
          isOpen: isResetDialogOpen,
          toggleOpen: toggleResetDialog,
          onConfirm: handleResetShadows
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
        ScreenHeader,
        {
          title: (0, import_i18n104.__)("Shadows"),
          description: (0, import_i18n104.__)(
            "Manage and create shadow styles for use across the site."
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(ScreenBody, { children: /* @__PURE__ */ (0, import_jsx_runtime180.jsxs)(
        import_components81.__experimentalVStack,
        {
          className: "global-styles-ui__shadows-panel",
          spacing: 7,
          children: [
            defaultShadowsEnabled && /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
              ShadowList,
              {
                label: (0, import_i18n104.__)("Default"),
                shadows: defaultShadows || [],
                category: "default"
              }
            ),
            themeShadows && themeShadows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
              ShadowList,
              {
                label: (0, import_i18n104.__)("Theme"),
                shadows: themeShadows || [],
                category: "theme"
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
              ShadowList,
              {
                label: (0, import_i18n104.__)("Custom"),
                shadows: customShadows || [],
                category: "custom",
                canCreate: true,
                onCreate: onCreateShadow,
                onReset: toggleResetDialog
              }
            )
          ]
        }
      ) })
    ] });
  }
  function ShadowList({
    label,
    shadows,
    category,
    canCreate,
    onCreate,
    onReset
  }) {
    const handleAddShadow = () => {
      const newIndex = getNewIndexFromPresets(shadows, "shadow-");
      onCreate?.({
        name: (0, import_i18n104.sprintf)(
          /* translators: %d: is an index for a preset */
          (0, import_i18n104.__)("Shadow %d"),
          newIndex
        ),
        shadow: defaultShadow,
        slug: `shadow-${newIndex}`
      });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime180.jsxs)(import_components81.__experimentalVStack, { spacing: 2, children: [
      /* @__PURE__ */ (0, import_jsx_runtime180.jsxs)(import_components81.__experimentalHStack, { justify: "space-between", children: [
        /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(Subtitle, { level: 3, children: label }),
        /* @__PURE__ */ (0, import_jsx_runtime180.jsxs)(import_components81.FlexItem, { className: "global-styles-ui__shadows-panel__options-container", children: [
          canCreate && /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
            import_components81.Button,
            {
              size: "small",
              icon: plus_default,
              label: (0, import_i18n104.__)("Add shadow"),
              onClick: () => {
                handleAddShadow();
              }
            }
          ),
          !!shadows?.length && category === "custom" && /* @__PURE__ */ (0, import_jsx_runtime180.jsxs)(Menu, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
              Menu.TriggerButton,
              {
                render: /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
                  import_components81.Button,
                  {
                    size: "small",
                    icon: more_vertical_default,
                    label: (0, import_i18n104.__)("Shadow options")
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(Menu.Popover, { children: /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(Menu.Item, { onClick: onReset, children: /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(Menu.ItemLabel, { children: (0, import_i18n104.__)("Remove all custom shadows") }) }) })
          ] })
        ] })
      ] }),
      shadows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(import_components81.__experimentalItemGroup, { isBordered: true, isSeparated: true, children: shadows.map((shadow) => /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
        ShadowItem,
        {
          shadow,
          category
        },
        shadow.slug
      )) })
    ] });
  }
  function ShadowItem({ shadow, category }) {
    return /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
      NavigationButtonAsItem,
      {
        path: `/shadows/edit/${category}/${shadow.slug}`,
        children: /* @__PURE__ */ (0, import_jsx_runtime180.jsxs)(import_components81.__experimentalHStack, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(import_components81.FlexItem, { children: shadow.name }),
          /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(icon_default, { icon: (0, import_i18n104.isRTL)() ? chevron_left_default : chevron_right_default })
        ] })
      }
    );
  }

  // packages/global-styles-ui/build-module/shadows-edit-panel.mjs
  var import_components82 = __toESM(require_components(), 1);
  var import_i18n105 = __toESM(require_i18n(), 1);
  var import_element70 = __toESM(require_element(), 1);

  // packages/global-styles-ui/build-module/shadow-utils.mjs
  function getShadowParts(shadow) {
    const shadowValues = shadow.match(/(?:[^,(]|\([^)]*\))+/g) || [];
    return shadowValues.map((value) => value.trim());
  }
  function shadowStringToObject(shadowValue) {
    const defaultShadow2 = {
      x: "0",
      y: "0",
      blur: "0",
      spread: "0",
      color: "#000",
      inset: false
    };
    if (!shadowValue) {
      return defaultShadow2;
    }
    if (shadowValue.includes("none")) {
      return defaultShadow2;
    }
    const lengthsRegex = /((?:^|\s+)(-?\d*\.?\d+(?:px|%|in|cm|mm|em|rem|ex|pt|pc|vh|vw|vmin|vmax|ch|lh)?)(?=\s|$)(?![^(]*\))){1,4}/g;
    const matches = shadowValue.match(lengthsRegex) || [];
    if (matches.length !== 1) {
      return defaultShadow2;
    }
    const lengths = matches[0].split(" ").map((value) => value.trim()).filter((value) => value);
    if (lengths.length < 2) {
      return defaultShadow2;
    }
    const insets = shadowValue.match(/inset/gi) || [];
    if (insets.length > 1) {
      return defaultShadow2;
    }
    const hasInset = insets.length === 1;
    let colorString = shadowValue.replace(lengthsRegex, "").trim();
    if (hasInset) {
      colorString = colorString.replace("inset", "").replace("INSET", "").trim();
    }
    const colorRegex2 = /^#([0-9a-f]{3}){1,2}$|^#([0-9a-f]{4}){1,2}$|^(?:rgb|hsl)a?\(?[\d*\.?\d+%?,?\/?\s]*\)$/gi;
    let colorMatches = (colorString.match(colorRegex2) || []).map((value) => value?.trim()).filter((value) => value);
    if (colorMatches.length > 1) {
      return defaultShadow2;
    } else if (colorMatches.length === 0) {
      colorMatches = colorString.trim().split(" ").filter((value) => value);
      if (colorMatches.length > 1) {
        return defaultShadow2;
      }
    }
    const [x2, y3, blur, spread] = lengths;
    return {
      x: x2,
      y: y3,
      blur: blur || defaultShadow2.blur,
      spread: spread || defaultShadow2.spread,
      inset: hasInset,
      color: colorString || defaultShadow2.color
    };
  }
  function shadowObjectToString(shadowObj) {
    const shadowString = `${shadowObj.x || "0px"} ${shadowObj.y || "0px"} ${shadowObj.blur || "0px"} ${shadowObj.spread || "0px"}`;
    return `${shadowObj.inset ? "inset" : ""} ${shadowString} ${shadowObj.color || ""}`.trim();
  }

  // packages/global-styles-ui/build-module/shadows-edit-panel.mjs
  var import_jsx_runtime181 = __toESM(require_jsx_runtime(), 1);
  var { Menu: Menu2 } = unlock3(import_components82.privateApis);
  var customShadowMenuItems = [
    {
      label: (0, import_i18n105.__)("Rename"),
      action: "rename"
    },
    {
      label: (0, import_i18n105.__)("Delete"),
      action: "delete"
    }
  ];
  var presetShadowMenuItems = [
    {
      label: (0, import_i18n105.__)("Reset"),
      action: "reset"
    }
  ];
  function ShadowsEditPanel() {
    const { goBack, params } = (0, import_components82.useNavigator)();
    const { category, slug } = params;
    const [shadows, setShadows] = useSetting(
      `shadow.presets.${category}`
    );
    (0, import_element70.useEffect)(() => {
      const hasCurrentShadow = shadows?.some(
        (shadow) => shadow.slug === slug
      );
      if (!!slug && !hasCurrentShadow) {
        goBack();
      }
    }, [shadows, slug, goBack]);
    const [baseShadows] = useSetting(
      `shadow.presets.${category}`,
      void 0,
      "base"
    );
    const [selectedShadow, setSelectedShadow] = (0, import_element70.useState)(
      () => (shadows || []).find((shadow) => shadow.slug === slug)
    );
    const baseSelectedShadow = (0, import_element70.useMemo)(
      () => (baseShadows || []).find((b3) => b3.slug === slug),
      [baseShadows, slug]
    );
    const [isConfirmDialogVisible, setIsConfirmDialogVisible] = (0, import_element70.useState)(false);
    const [isRenameModalVisible, setIsRenameModalVisible] = (0, import_element70.useState)(false);
    const [shadowName, setShadowName] = (0, import_element70.useState)(
      selectedShadow?.name
    );
    if (!category || !slug) {
      return null;
    }
    const onShadowChange = (shadow) => {
      setSelectedShadow({ ...selectedShadow, shadow });
      const updatedShadows = shadows.map(
        (s3) => s3.slug === slug ? { ...selectedShadow, shadow } : s3
      );
      setShadows(updatedShadows);
    };
    const onMenuClick = (action) => {
      if (action === "reset") {
        const updatedShadows = shadows.map(
          (s3) => s3.slug === slug ? baseSelectedShadow : s3
        );
        setSelectedShadow(baseSelectedShadow);
        setShadows(updatedShadows);
      } else if (action === "delete") {
        setIsConfirmDialogVisible(true);
      } else if (action === "rename") {
        setIsRenameModalVisible(true);
      }
    };
    const handleShadowDelete = () => {
      setShadows(shadows.filter((s3) => s3.slug !== slug));
    };
    const handleShadowRename = (newName) => {
      if (!newName) {
        return;
      }
      const updatedShadows = shadows.map(
        (s3) => s3.slug === slug ? { ...selectedShadow, name: newName } : s3
      );
      setSelectedShadow({ ...selectedShadow, name: newName });
      setShadows(updatedShadows);
    };
    return !selectedShadow ? /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(ScreenHeader, { title: "" }) : /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(import_jsx_runtime181.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(import_components82.__experimentalHStack, { justify: "space-between", children: [
        /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(ScreenHeader, { title: selectedShadow.name }),
        /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(import_components82.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(import_components82.__experimentalSpacer, { marginTop: 2, marginBottom: 0, paddingX: 4, children: /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(Menu2, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
            Menu2.TriggerButton,
            {
              render: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
                import_components82.Button,
                {
                  size: "small",
                  icon: more_vertical_default,
                  label: (0, import_i18n105.__)("Menu")
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(Menu2.Popover, { children: (category === "custom" ? customShadowMenuItems : presetShadowMenuItems).map((item) => /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
            Menu2.Item,
            {
              onClick: () => onMenuClick(item.action),
              disabled: item.action === "reset" && selectedShadow.shadow === baseSelectedShadow?.shadow,
              children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(Menu2.ItemLabel, { children: item.label })
            },
            item.action
          )) })
        ] }) }) })
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(ScreenBody, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(ShadowsPreview, { shadow: selectedShadow.shadow }),
        /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
          ShadowEditor,
          {
            shadow: selectedShadow.shadow,
            onChange: onShadowChange
          }
        )
      ] }),
      isConfirmDialogVisible && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
        import_components82.__experimentalConfirmDialog,
        {
          isOpen: true,
          onConfirm: () => {
            handleShadowDelete();
            setIsConfirmDialogVisible(false);
          },
          onCancel: () => {
            setIsConfirmDialogVisible(false);
          },
          confirmButtonText: (0, import_i18n105.__)("Delete"),
          size: "medium",
          children: (0, import_i18n105.sprintf)(
            /* translators: %s: Name of the shadow preset. */
            (0, import_i18n105.__)(
              'Are you sure you want to delete "%s" shadow preset?'
            ),
            selectedShadow.name
          )
        }
      ),
      isRenameModalVisible && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
        import_components82.Modal,
        {
          title: (0, import_i18n105.__)("Rename"),
          onRequestClose: () => setIsRenameModalVisible(false),
          size: "small",
          children: /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(
            "form",
            {
              onSubmit: (event) => {
                event.preventDefault();
                handleShadowRename(shadowName);
                setIsRenameModalVisible(false);
              },
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
                  import_components82.__experimentalInputControl,
                  {
                    __next40pxDefaultSize: true,
                    autoComplete: "off",
                    label: (0, import_i18n105.__)("Name"),
                    placeholder: (0, import_i18n105.__)("Shadow name"),
                    value: shadowName ?? "",
                    onChange: setShadowName
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(import_components82.__experimentalSpacer, { marginBottom: 6 }),
                /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(
                  import_components82.Flex,
                  {
                    className: "block-editor-shadow-edit-modal__actions",
                    justify: "flex-end",
                    expanded: false,
                    children: [
                      /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(import_components82.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
                        import_components82.Button,
                        {
                          __next40pxDefaultSize: true,
                          variant: "tertiary",
                          onClick: () => setIsRenameModalVisible(false),
                          children: (0, import_i18n105.__)("Cancel")
                        }
                      ) }),
                      /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(import_components82.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
                        import_components82.Button,
                        {
                          __next40pxDefaultSize: true,
                          variant: "primary",
                          type: "submit",
                          children: (0, import_i18n105.__)("Save")
                        }
                      ) })
                    ]
                  }
                )
              ]
            }
          )
        }
      )
    ] });
  }
  function ShadowsPreview({ shadow }) {
    const shadowStyle = {
      boxShadow: shadow
    };
    return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(import_components82.__experimentalSpacer, { marginBottom: 4, marginTop: -2, children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
      import_components82.__experimentalHStack,
      {
        alignment: "center",
        justify: "center",
        className: "global-styles-ui__shadow-preview-panel",
        children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
          "div",
          {
            className: "global-styles-ui__shadow-preview-block",
            style: shadowStyle
          }
        )
      }
    ) });
  }
  function ShadowEditor({ shadow, onChange }) {
    const addShadowButtonRef = (0, import_element70.useRef)(null);
    const shadowParts = (0, import_element70.useMemo)(() => getShadowParts(shadow), [shadow]);
    const onChangeShadowPart = (index2, part) => {
      const newShadowParts = [...shadowParts];
      newShadowParts[index2] = part;
      onChange(newShadowParts.join(", "));
    };
    const onAddShadowPart = () => {
      onChange([...shadowParts, defaultShadow].join(", "));
    };
    const onRemoveShadowPart = (index2) => {
      onChange(shadowParts.filter((p4, i3) => i3 !== index2).join(", "));
      addShadowButtonRef.current?.focus();
    };
    return /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(import_jsx_runtime181.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(import_components82.__experimentalVStack, { spacing: 2, children: /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(import_components82.__experimentalHStack, { justify: "space-between", children: [
        /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(Subtitle, { level: 3, children: (0, import_i18n105.__)("Shadows") }),
        /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(import_components82.FlexItem, { className: "global-styles-ui__shadows-panel__options-container", children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
          import_components82.Button,
          {
            size: "small",
            icon: plus_default,
            label: (0, import_i18n105.__)("Add shadow"),
            onClick: () => {
              onAddShadowPart();
            },
            ref: addShadowButtonRef
          }
        ) })
      ] }) }),
      /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(import_components82.__experimentalSpacer, {}),
      /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(import_components82.__experimentalItemGroup, { isBordered: true, isSeparated: true, children: shadowParts.map((part, index2) => /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
        ShadowItem2,
        {
          shadow: part,
          onChange: (value) => onChangeShadowPart(index2, value),
          canRemove: shadowParts.length > 1,
          onRemove: () => onRemoveShadowPart(index2)
        },
        index2
      )) })
    ] });
  }
  function ShadowItem2({
    shadow,
    onChange,
    canRemove,
    onRemove
  }) {
    const popoverProps = {
      placement: "left-start",
      offset: 36,
      shift: true
    };
    const shadowObj = (0, import_element70.useMemo)(
      () => shadowStringToObject(shadow),
      [shadow]
    );
    const onShadowChange = (newShadow) => {
      onChange(shadowObjectToString(newShadow));
    };
    return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
      import_components82.Dropdown,
      {
        popoverProps,
        className: "global-styles-ui__shadow-editor__dropdown",
        renderToggle: ({ onToggle, isOpen }) => {
          const toggleProps = {
            onClick: onToggle,
            className: clsx_default(
              "global-styles-ui__shadow-editor__dropdown-toggle",
              { "is-open": isOpen }
            ),
            "aria-expanded": isOpen
          };
          const removeButtonProps = {
            onClick: () => {
              if (isOpen) {
                onToggle();
              }
              onRemove();
            },
            className: clsx_default(
              "global-styles-ui__shadow-editor__remove-button",
              { "is-open": isOpen }
            ),
            label: (0, import_i18n105.__)("Remove shadow")
          };
          return /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(import_jsx_runtime181.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
              import_components82.Button,
              {
                __next40pxDefaultSize: true,
                icon: shadow_default,
                ...toggleProps,
                children: shadowObj.inset ? (0, import_i18n105.__)("Inner shadow") : (0, import_i18n105.__)("Drop shadow")
              }
            ),
            canRemove && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
              import_components82.Button,
              {
                size: "small",
                icon: reset_default,
                ...removeButtonProps
              }
            )
          ] });
        },
        renderContent: () => /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
          import_components82.__experimentalDropdownContentWrapper,
          {
            paddingSize: "medium",
            className: "global-styles-ui__shadow-editor__dropdown-content",
            children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
              ShadowPopover,
              {
                shadowObj,
                onChange: onShadowChange
              }
            )
          }
        )
      }
    );
  }
  function ShadowPopover({ shadowObj, onChange }) {
    const __experimentalIsRenderedInSidebar = true;
    const enableAlpha = true;
    const onShadowChange = (key, value) => {
      const newShadow = {
        ...shadowObj,
        [key]: value
      };
      onChange(newShadow);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(import_components82.__experimentalVStack, { spacing: 4, className: "global-styles-ui__shadow-editor-panel", children: [
      /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
        import_components82.ColorPalette,
        {
          clearable: false,
          enableAlpha,
          __experimentalIsRenderedInSidebar,
          value: shadowObj.color,
          onChange: (value) => onShadowChange("color", value)
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(
        import_components82.__experimentalToggleGroupControl,
        {
          label: (0, import_i18n105.__)("Shadow Type"),
          value: shadowObj.inset ? "inset" : "outset",
          isBlock: true,
          onChange: (value) => onShadowChange("inset", value === "inset"),
          hideLabelFromVision: true,
          __next40pxDefaultSize: true,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
              import_components82.__experimentalToggleGroupControlOption,
              {
                value: "outset",
                label: (0, import_i18n105.__)("Outset")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
              import_components82.__experimentalToggleGroupControlOption,
              {
                value: "inset",
                label: (0, import_i18n105.__)("Inset")
              }
            )
          ]
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(import_components82.__experimentalGrid, { columns: 2, gap: 4, children: [
        /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
          ShadowInputControl,
          {
            label: (0, import_i18n105.__)("X Position"),
            value: shadowObj.x,
            onChange: (value) => onShadowChange("x", value)
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
          ShadowInputControl,
          {
            label: (0, import_i18n105.__)("Y Position"),
            value: shadowObj.y,
            onChange: (value) => onShadowChange("y", value)
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
          ShadowInputControl,
          {
            label: (0, import_i18n105.__)("Blur"),
            value: shadowObj.blur,
            onChange: (value) => onShadowChange("blur", value)
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
          ShadowInputControl,
          {
            label: (0, import_i18n105.__)("Spread"),
            value: shadowObj.spread,
            onChange: (value) => onShadowChange("spread", value)
          }
        )
      ] })
    ] });
  }
  function ShadowInputControl({
    label,
    value,
    onChange
  }) {
    const onValueChange = (next) => {
      const isNumeric = next !== void 0 && !isNaN(parseFloat(next));
      const nextValue = isNumeric ? next : "0px";
      onChange(nextValue);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
      import_components82.__experimentalUnitControl,
      {
        label,
        __next40pxDefaultSize: true,
        value,
        onChange: onValueChange
      }
    );
  }

  // packages/global-styles-ui/build-module/screen-shadows.mjs
  var import_jsx_runtime182 = __toESM(require_jsx_runtime(), 1);
  function ScreenShadows() {
    return /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(ShadowsPanel, {});
  }
  function ScreenShadowsEdit() {
    return /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(ShadowsEditPanel, {});
  }

  // packages/global-styles-ui/build-module/screen-layout.mjs
  var import_i18n106 = __toESM(require_i18n(), 1);
  var import_block_editor28 = __toESM(require_block_editor(), 1);

  // packages/global-styles-ui/build-module/dimensions-panel.mjs
  var import_block_editor27 = __toESM(require_block_editor(), 1);
  var import_element71 = __toESM(require_element(), 1);
  var import_jsx_runtime183 = __toESM(require_jsx_runtime(), 1);
  var { useSettingsForBlockElement: useSettingsForBlockElement6, DimensionsPanel: StylesDimensionsPanel2 } = unlock3(import_block_editor27.privateApis);
  var DEFAULT_CONTROLS = {
    contentSize: true,
    wideSize: true,
    padding: true,
    margin: true,
    blockGap: true,
    height: true,
    minHeight: true,
    width: true,
    childLayout: false
  };
  function DimensionsPanel() {
    const [style] = useStyle("", void 0, "user", false);
    const [inheritedStyle, setStyle2] = useStyle(
      "",
      void 0,
      "merged",
      false
    );
    const [userSettings] = useSetting("", void 0, "user");
    const [rawSettings, setSettings] = useSetting("");
    const settings = useSettingsForBlockElement6(rawSettings);
    const inheritedStyleWithLayout = (0, import_element71.useMemo)(() => {
      return {
        ...inheritedStyle,
        layout: settings.layout
      };
    }, [inheritedStyle, settings.layout]);
    const styleWithLayout = (0, import_element71.useMemo)(() => {
      return {
        ...style,
        layout: userSettings.layout
      };
    }, [style, userSettings.layout]);
    const onChange = (newStyle) => {
      const updatedStyle = { ...newStyle };
      delete updatedStyle.layout;
      setStyle2(updatedStyle);
      if (newStyle.layout !== userSettings.layout) {
        const updatedSettings = {
          ...userSettings,
          layout: newStyle.layout
        };
        if (updatedSettings.layout?.definitions) {
          delete updatedSettings.layout.definitions;
        }
        setSettings(updatedSettings);
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
      StylesDimensionsPanel2,
      {
        inheritedValue: inheritedStyleWithLayout,
        value: styleWithLayout,
        onChange,
        settings,
        includeLayoutControls: true,
        defaultControls: DEFAULT_CONTROLS
      }
    );
  }

  // packages/global-styles-ui/build-module/screen-layout.mjs
  var import_jsx_runtime184 = __toESM(require_jsx_runtime(), 1);
  var { useHasDimensionsPanel: useHasDimensionsPanel4, useSettingsForBlockElement: useSettingsForBlockElement7 } = unlock3(
    import_block_editor28.privateApis
  );
  function ScreenLayout() {
    const [rawSettings] = useSetting("");
    const settings = useSettingsForBlockElement7(rawSettings);
    const hasDimensionsPanel = useHasDimensionsPanel4(settings);
    return /* @__PURE__ */ (0, import_jsx_runtime184.jsxs)(import_jsx_runtime184.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(ScreenHeader, { title: (0, import_i18n106.__)("Layout") }),
      hasDimensionsPanel && /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(DimensionsPanel, {})
    ] });
  }
  var screen_layout_default = ScreenLayout;

  // packages/global-styles-ui/build-module/screen-style-variations.mjs
  var import_components85 = __toESM(require_components(), 1);
  var import_i18n109 = __toESM(require_i18n(), 1);

  // packages/global-styles-ui/build-module/style-variations-content.mjs
  var import_i18n108 = __toESM(require_i18n(), 1);
  var import_components84 = __toESM(require_components(), 1);

  // packages/global-styles-ui/build-module/style-variations-container.mjs
  var import_core_data46 = __toESM(require_core_data(), 1);
  var import_data64 = __toESM(require_data(), 1);
  var import_element72 = __toESM(require_element(), 1);
  var import_components83 = __toESM(require_components(), 1);
  var import_i18n107 = __toESM(require_i18n(), 1);
  var import_jsx_runtime185 = __toESM(require_jsx_runtime(), 1);
  function StyleVariationsContainer({
    gap = 2
  }) {
    const { user } = (0, import_element72.useContext)(GlobalStylesContext);
    const userStyles = user?.styles;
    const variations = (0, import_data64.useSelect)((select6) => {
      const result = select6(
        import_core_data46.store
      ).__experimentalGetCurrentThemeGlobalStylesVariations();
      return Array.isArray(result) ? result : void 0;
    }, []);
    const fullStyleVariations = variations?.filter(
      (variation) => {
        return !isVariationWithProperties(variation, ["color"]) && !isVariationWithProperties(variation, [
          "typography",
          "spacing"
        ]);
      }
    );
    const themeVariations = (0, import_element72.useMemo)(() => {
      const withEmptyVariation = [
        {
          title: (0, import_i18n107.__)("Default"),
          settings: {},
          styles: {}
        },
        ...fullStyleVariations ?? []
      ];
      return [
        ...withEmptyVariation.map((variation) => {
          const blockStyles = variation?.styles?.blocks ? { ...variation.styles.blocks } : {};
          if (userStyles?.blocks) {
            Object.keys(userStyles.blocks).forEach((blockName) => {
              if (userStyles.blocks?.[blockName]?.css) {
                const variationBlockStyles = blockStyles[blockName] || {};
                const customCSS = {
                  css: `${blockStyles[blockName]?.css || ""} ${userStyles.blocks?.[blockName]?.css?.trim() || ""}`
                };
                blockStyles[blockName] = {
                  ...variationBlockStyles,
                  ...customCSS
                };
              }
            });
          }
          const css = userStyles?.css || variation.styles?.css ? {
            css: `${variation.styles?.css || ""} ${userStyles?.css || ""}`
          } : {};
          const blocks = Object.keys(blockStyles).length > 0 ? { blocks: blockStyles } : {};
          const styles = {
            ...variation.styles,
            ...css,
            ...blocks
          };
          return {
            ...variation,
            settings: variation.settings ?? {},
            styles
          };
        })
      ];
    }, [fullStyleVariations, userStyles?.blocks, userStyles?.css]);
    if (!fullStyleVariations || fullStyleVariations.length < 1) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
      import_components83.__experimentalGrid,
      {
        columns: 2,
        className: "global-styles-ui-style-variations-container",
        gap,
        children: themeVariations.map(
          (variation, index2) => /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(Variation, { variation, children: (isFocused) => /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
            preview_styles_default,
            {
              label: variation?.title,
              withHoverView: true,
              isFocused,
              variation
            }
          ) }, index2)
        )
      }
    );
  }
  var style_variations_container_default = StyleVariationsContainer;

  // packages/global-styles-ui/build-module/style-variations-content.mjs
  var import_jsx_runtime186 = __toESM(require_jsx_runtime(), 1);
  function StyleVariationsContent() {
    const gap = 3;
    return /* @__PURE__ */ (0, import_jsx_runtime186.jsxs)(import_components84.__experimentalVStack, { spacing: 10, className: "global-styles-ui-variation-container", children: [
      /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(style_variations_container_default, { gap }),
      /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(ColorVariations, { title: (0, import_i18n108.__)("Color Variations"), gap }),
      /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(TypographyVariations, { title: (0, import_i18n108.__)("Typography"), gap })
    ] });
  }

  // packages/global-styles-ui/build-module/screen-style-variations.mjs
  var import_jsx_runtime187 = __toESM(require_jsx_runtime(), 1);
  function ScreenStyleVariations() {
    return /* @__PURE__ */ (0, import_jsx_runtime187.jsxs)(import_jsx_runtime187.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
        ScreenHeader,
        {
          title: (0, import_i18n109.__)("Browse styles"),
          description: (0, import_i18n109.__)(
            "Choose a variation to change the look of the site."
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
        import_components85.Card,
        {
          size: "small",
          isBorderless: true,
          className: "global-styles-ui-screen-style-variations",
          children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(import_components85.CardBody, { children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(StyleVariationsContent, {}) })
        }
      )
    ] });
  }
  var screen_style_variations_default = ScreenStyleVariations;

  // packages/global-styles-ui/build-module/screen-css.mjs
  var import_i18n110 = __toESM(require_i18n(), 1);
  var import_components86 = __toESM(require_components(), 1);
  var import_block_editor29 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime188 = __toESM(require_jsx_runtime(), 1);
  var { AdvancedPanel: StylesAdvancedPanel2 } = unlock3(import_block_editor29.privateApis);
  function ScreenCSS() {
    const [style] = useStyle("", void 0, "user", false);
    const [inheritedStyle, setStyle2] = useStyle(
      "",
      void 0,
      "merged",
      false
    );
    return /* @__PURE__ */ (0, import_jsx_runtime188.jsxs)(import_jsx_runtime188.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(
        ScreenHeader,
        {
          title: (0, import_i18n110.__)("Additional CSS"),
          description: /* @__PURE__ */ (0, import_jsx_runtime188.jsxs)(import_jsx_runtime188.Fragment, { children: [
            (0, import_i18n110.__)(
              "You can add custom CSS to further customize the appearance and layout of your site."
            ),
            /* @__PURE__ */ (0, import_jsx_runtime188.jsx)("br", {}),
            /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(
              import_components86.ExternalLink,
              {
                href: (0, import_i18n110.__)(
                  "https://developer.wordpress.org/advanced-administration/wordpress/css/"
                ),
                className: "global-styles-ui-screen-css-help-link",
                children: (0, import_i18n110.__)("Learn more about CSS")
              }
            )
          ] })
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime188.jsx)("div", { className: "global-styles-ui-screen-css", children: /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(
        StylesAdvancedPanel2,
        {
          value: style,
          onChange: setStyle2,
          inheritedValue: inheritedStyle
        }
      ) })
    ] });
  }
  var screen_css_default = ScreenCSS;

  // packages/global-styles-ui/build-module/screen-revisions/index.mjs
  var import_i18n113 = __toESM(require_i18n(), 1);
  var import_components89 = __toESM(require_components(), 1);
  var import_element74 = __toESM(require_element(), 1);

  // packages/global-styles-ui/build-module/screen-revisions/use-global-styles-revisions.mjs
  var import_data65 = __toESM(require_data(), 1);
  var import_core_data47 = __toESM(require_core_data(), 1);
  var import_element73 = __toESM(require_element(), 1);
  var SITE_EDITOR_AUTHORS_QUERY = {
    per_page: -1,
    _fields: "id,name,avatar_urls",
    context: "view",
    capabilities: ["edit_theme_options"]
  };
  var DEFAULT_QUERY = { per_page: 100, page: 1 };
  var EMPTY_ARRAY6 = [];
  function useGlobalStylesRevisions({
    query
  } = {}) {
    const { user: userConfig } = (0, import_element73.useContext)(GlobalStylesContext);
    const _query = (0, import_element73.useMemo)(
      () => ({ ...DEFAULT_QUERY, ...query }),
      [query]
    );
    const {
      authors,
      currentUser,
      isDirty,
      revisions,
      isLoadingGlobalStylesRevisions,
      revisionsCount
    } = (0, import_data65.useSelect)(
      (select6) => {
        const {
          __experimentalGetDirtyEntityRecords,
          getCurrentUser,
          getUsers,
          getRevisions,
          __experimentalGetCurrentGlobalStylesId,
          getEntityRecord,
          // @ts-expect-error
          isResolving
        } = select6(import_core_data47.store);
        const dirtyEntityRecords = __experimentalGetDirtyEntityRecords() || [];
        const _currentUser = getCurrentUser();
        const _isDirty = dirtyEntityRecords.length > 0;
        const globalStylesId = __experimentalGetCurrentGlobalStylesId();
        const globalStyles = globalStylesId ? getEntityRecord(
          "root",
          "globalStyles",
          globalStylesId
        ) : void 0;
        const _revisionsCount = (
          // @ts-expect-error - _links is not typed in GlobalStylesRevision
          globalStyles?._links?.["version-history"]?.[0]?.count ?? 0
        );
        const globalStylesRevisions = globalStylesId ? getRevisions(
          "root",
          "globalStyles",
          globalStylesId,
          _query
        ) || EMPTY_ARRAY6 : EMPTY_ARRAY6;
        const _authors = getUsers(SITE_EDITOR_AUTHORS_QUERY) || EMPTY_ARRAY6;
        const _isResolving = globalStylesId ? isResolving("getRevisions", [
          "root",
          "globalStyles",
          globalStylesId,
          _query
        ]) : false;
        return {
          authors: _authors,
          currentUser: _currentUser,
          isDirty: _isDirty,
          revisions: globalStylesRevisions,
          isLoadingGlobalStylesRevisions: _isResolving,
          revisionsCount: _revisionsCount
        };
      },
      [_query]
    );
    return (0, import_element73.useMemo)(() => {
      if (!authors.length || isLoadingGlobalStylesRevisions) {
        return {
          revisions: EMPTY_ARRAY6,
          hasUnsavedChanges: isDirty,
          isLoading: true,
          revisionsCount
        };
      }
      const _modifiedRevisions = revisions.map((revision) => {
        return {
          ...revision,
          author: authors.find(
            (author) => author.id === revision.author
          )
        };
      });
      const fetchedRevisionsCount = revisions.length;
      if (fetchedRevisionsCount) {
        if (_modifiedRevisions[0].id !== "unsaved" && _query.page === 1) {
          _modifiedRevisions[0].isLatest = true;
        }
        if (isDirty && userConfig && Object.keys(userConfig).length > 0 && currentUser && _query.page === 1) {
          const unsavedRevision = {
            id: "unsaved",
            styles: userConfig?.styles,
            settings: userConfig?.settings,
            _links: userConfig?._links,
            author: {
              name: currentUser?.name || "",
              // @ts-expect-error - avatar_urls is not typed in User
              avatar_urls: currentUser?.avatar_urls || {}
            },
            modified: /* @__PURE__ */ new Date()
          };
          _modifiedRevisions.unshift(unsavedRevision);
        }
        if (_query.per_page && _query.page === Math.ceil(revisionsCount / _query.per_page)) {
          _modifiedRevisions.push({
            id: "parent",
            styles: {},
            settings: {}
          });
        }
      }
      return {
        revisions: _modifiedRevisions,
        hasUnsavedChanges: isDirty,
        isLoading: false,
        revisionsCount
      };
    }, [
      isDirty,
      revisions,
      currentUser,
      authors,
      userConfig,
      isLoadingGlobalStylesRevisions,
      revisionsCount,
      _query.page,
      _query.per_page
    ]);
  }

  // packages/global-styles-ui/build-module/screen-revisions/revisions-buttons.mjs
  var import_i18n111 = __toESM(require_i18n(), 1);
  var import_components87 = __toESM(require_components(), 1);
  var import_date5 = __toESM(require_date(), 1);
  var import_core_data48 = __toESM(require_core_data(), 1);
  var import_data66 = __toESM(require_data(), 1);
  var import_keycodes3 = __toESM(require_keycodes(), 1);
  var import_jsx_runtime189 = __toESM(require_jsx_runtime(), 1);
  var DAY_IN_MILLISECONDS = 60 * 60 * 1e3 * 24;
  function ChangesSummary({ revision, previousRevision }) {
    const changes = getGlobalStylesChanges(
      revision,
      previousRevision,
      {
        maxResults: 7
      }
    );
    if (!changes.length) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
      "ul",
      {
        "data-testid": "global-styles-revision-changes",
        className: "global-styles-ui-screen-revisions__changes",
        children: changes.map((change) => /* @__PURE__ */ (0, import_jsx_runtime189.jsx)("li", { children: change }, change))
      }
    );
  }
  function getRevisionLabel(id, authorDisplayName, formattedModifiedDate, areStylesEqual) {
    if ("parent" === id) {
      return (0, import_i18n111.__)("Reset the styles to the theme defaults");
    }
    if ("unsaved" === id) {
      return (0, import_i18n111.sprintf)(
        /* translators: %s: author display name */
        (0, import_i18n111.__)("Unsaved changes by %s"),
        authorDisplayName
      );
    }
    return areStylesEqual ? (0, import_i18n111.sprintf)(
      // translators: 1: author display name. 2: revision creation date.
      (0, import_i18n111.__)(
        "Changes saved by %1$s on %2$s. This revision matches current editor styles."
      ),
      authorDisplayName,
      formattedModifiedDate
    ) : (0, import_i18n111.sprintf)(
      // translators: 1: author display name. 2: revision creation date.
      (0, import_i18n111.__)("Changes saved by %1$s on %2$s"),
      authorDisplayName,
      formattedModifiedDate
    );
  }
  function RevisionsButtons({
    userRevisions,
    selectedRevisionId,
    onChange,
    canApplyRevision,
    onApplyRevision
  }) {
    const { currentThemeName, currentUser } = (0, import_data66.useSelect)((select6) => {
      const { getCurrentTheme, getCurrentUser } = select6(import_core_data48.store);
      const currentTheme = getCurrentTheme();
      return {
        currentThemeName: currentTheme?.name?.rendered || currentTheme?.stylesheet,
        currentUser: getCurrentUser()
      };
    }, []);
    const dateNowInMs = (0, import_date5.getDate)(null).getTime();
    const { datetimeAbbreviated } = (0, import_date5.getSettings)().formats;
    return /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
      import_components87.Composite,
      {
        orientation: "vertical",
        className: "global-styles-ui-screen-revisions__revisions-list",
        "aria-label": (0, import_i18n111.__)("Global styles revisions list"),
        role: "listbox",
        children: userRevisions.map((revision, index2) => {
          const { id, author, modified } = revision;
          const isUnsaved = "unsaved" === id;
          const revisionAuthor = isUnsaved ? currentUser : author;
          const authorDisplayName = revisionAuthor?.name || (0, import_i18n111.__)("User");
          const authorAvatar = revisionAuthor?.avatar_urls?.["48"];
          const isFirstItem = index2 === 0;
          const isSelected = selectedRevisionId ? selectedRevisionId === id : isFirstItem;
          const areStylesEqual = !canApplyRevision && isSelected;
          const isReset = "parent" === id;
          const modifiedString = modified instanceof Date ? modified.toISOString() : modified;
          const modifiedDate = (0, import_date5.getDate)(modifiedString ?? null);
          const displayDate = modifiedString && dateNowInMs - modifiedDate.getTime() > DAY_IN_MILLISECONDS ? (0, import_date5.dateI18n)(datetimeAbbreviated, modifiedDate) : (0, import_date5.humanTimeDiff)(
            modifiedString ?? modifiedDate,
            void 0
          );
          const revisionLabel = getRevisionLabel(
            id,
            authorDisplayName,
            (0, import_date5.dateI18n)(datetimeAbbreviated, modifiedDate),
            areStylesEqual
          );
          return /* @__PURE__ */ (0, import_jsx_runtime189.jsxs)(
            import_components87.Composite.Item,
            {
              className: "global-styles-ui-screen-revisions__revision-item",
              "aria-current": isSelected,
              role: "option",
              onKeyDown: (event) => {
                const { keyCode } = event;
                if (keyCode === import_keycodes3.ENTER || keyCode === import_keycodes3.SPACE) {
                  onChange(revision);
                }
              },
              onClick: (event) => {
                event.preventDefault();
                onChange(revision);
              },
              "aria-selected": isSelected,
              "aria-label": revisionLabel,
              render: /* @__PURE__ */ (0, import_jsx_runtime189.jsx)("div", {}),
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime189.jsx)("span", { className: "global-styles-ui-screen-revisions__revision-item-wrapper", children: isReset ? /* @__PURE__ */ (0, import_jsx_runtime189.jsxs)("span", { className: "global-styles-ui-screen-revisions__description", children: [
                  (0, import_i18n111.__)("Default styles"),
                  /* @__PURE__ */ (0, import_jsx_runtime189.jsx)("span", { className: "global-styles-ui-screen-revisions__meta", children: currentThemeName })
                ] }) : /* @__PURE__ */ (0, import_jsx_runtime189.jsxs)("span", { className: "global-styles-ui-screen-revisions__description", children: [
                  isUnsaved ? /* @__PURE__ */ (0, import_jsx_runtime189.jsx)("span", { className: "global-styles-ui-screen-revisions__date", children: (0, import_i18n111.__)("(Unsaved)") }) : /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
                    "time",
                    {
                      className: "global-styles-ui-screen-revisions__date",
                      dateTime: modifiedString,
                      children: displayDate
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime189.jsxs)("span", { className: "global-styles-ui-screen-revisions__meta", children: [
                    /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
                      "img",
                      {
                        alt: authorDisplayName,
                        src: authorAvatar
                      }
                    ),
                    authorDisplayName
                  ] }),
                  isSelected && /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
                    ChangesSummary,
                    {
                      revision,
                      previousRevision: index2 < userRevisions.length ? userRevisions[index2 + 1] : void 0
                    }
                  )
                ] }) }),
                isSelected && (areStylesEqual ? /* @__PURE__ */ (0, import_jsx_runtime189.jsx)("p", { className: "global-styles-ui-screen-revisions__applied-text", children: (0, import_i18n111.__)(
                  "These styles are already applied to your site."
                ) }) : /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
                  import_components87.Button,
                  {
                    size: "compact",
                    variant: "primary",
                    className: "global-styles-ui-screen-revisions__apply-button",
                    onClick: onApplyRevision,
                    "aria-label": (0, import_i18n111.__)(
                      "Apply the selected revision to your site."
                    ),
                    children: isReset ? (0, import_i18n111.__)("Reset to defaults") : (0, import_i18n111.__)("Apply")
                  }
                ))
              ]
            },
            id
          );
        })
      }
    );
  }
  var revisions_buttons_default = RevisionsButtons;

  // packages/global-styles-ui/build-module/pagination/index.mjs
  var import_components88 = __toESM(require_components(), 1);
  var import_i18n112 = __toESM(require_i18n(), 1);
  var import_jsx_runtime190 = __toESM(require_jsx_runtime(), 1);
  function Pagination({
    currentPage,
    numPages,
    changePage,
    totalItems,
    className,
    disabled = false,
    buttonVariant = "tertiary",
    label = (0, import_i18n112.__)("Pagination")
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(
      import_components88.__experimentalHStack,
      {
        expanded: false,
        as: "nav",
        "aria-label": label,
        spacing: 3,
        justify: "flex-start",
        className: clsx_default("global-styles-ui-pagination", className),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
            import_components88.__experimentalText,
            {
              variant: "muted",
              className: "global-styles-ui-pagination__total",
              children: (0, import_i18n112.sprintf)(
                // translators: %d: Total number of patterns.
                (0, import_i18n112._n)("%d item", "%d items", totalItems),
                totalItems
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(import_components88.__experimentalHStack, { expanded: false, spacing: 1, children: [
            /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
              import_components88.Button,
              {
                variant: buttonVariant,
                onClick: () => changePage(1),
                accessibleWhenDisabled: true,
                disabled: disabled || currentPage === 1,
                label: (0, import_i18n112.__)("First page"),
                icon: (0, import_i18n112.isRTL)() ? next_default : previous_default,
                size: "compact"
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
              import_components88.Button,
              {
                variant: buttonVariant,
                onClick: () => changePage(currentPage - 1),
                accessibleWhenDisabled: true,
                disabled: disabled || currentPage === 1,
                label: (0, import_i18n112.__)("Previous page"),
                icon: (0, import_i18n112.isRTL)() ? chevron_right_default : chevron_left_default,
                size: "compact"
              }
            )
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(import_components88.__experimentalText, { variant: "muted", children: (0, import_i18n112.sprintf)(
            // translators: 1: Current page number. 2: Total number of pages.
            (0, import_i18n112._x)("%1$d of %2$d", "paging"),
            currentPage,
            numPages
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(import_components88.__experimentalHStack, { expanded: false, spacing: 1, children: [
            /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
              import_components88.Button,
              {
                variant: buttonVariant,
                onClick: () => changePage(currentPage + 1),
                accessibleWhenDisabled: true,
                disabled: disabled || currentPage === numPages,
                label: (0, import_i18n112.__)("Next page"),
                icon: (0, import_i18n112.isRTL)() ? chevron_left_default : chevron_right_default,
                size: "compact"
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
              import_components88.Button,
              {
                variant: buttonVariant,
                onClick: () => changePage(numPages),
                accessibleWhenDisabled: true,
                disabled: disabled || currentPage === numPages,
                label: (0, import_i18n112.__)("Last page"),
                icon: (0, import_i18n112.isRTL)() ? previous_default : next_default,
                size: "compact"
              }
            )
          ] })
        ]
      }
    );
  }

  // packages/global-styles-ui/build-module/screen-revisions/index.mjs
  var import_jsx_runtime191 = __toESM(require_jsx_runtime(), 1);
  var PAGE_SIZE = 10;
  function ScreenRevisions({ onClose } = {}) {
    const { user: currentEditorGlobalStyles, onChange: setUserConfig } = (0, import_element74.useContext)(GlobalStylesContext);
    const { params, goTo } = (0, import_components89.useNavigator)();
    const { revisionId: revisionId2 } = params;
    const [currentPage, setCurrentPage] = (0, import_element74.useState)(1);
    const { revisions, isLoading, hasUnsavedChanges, revisionsCount } = useGlobalStylesRevisions({
      query: {
        per_page: PAGE_SIZE,
        page: currentPage
      }
    });
    const numPages = Math.ceil(revisionsCount / PAGE_SIZE);
    const [
      isLoadingRevisionWithUnsavedChanges,
      setIsLoadingRevisionWithUnsavedChanges
    ] = (0, import_element74.useState)(false);
    const currentlySelectedRevision = (0, import_element74.useMemo)(() => {
      if (!revisionId2) {
        return currentEditorGlobalStyles;
      }
      const revision = revisions.find(
        (rev) => String(rev.id) === String(revisionId2)
      );
      return revision || currentEditorGlobalStyles;
    }, [revisionId2, revisions, currentEditorGlobalStyles]);
    const selectedRevisionMatchesEditorStyles = areGlobalStylesEqual(
      currentlySelectedRevision,
      currentEditorGlobalStyles
    );
    const onCloseRevisions = () => {
      if (onClose) {
        onClose();
      }
    };
    const restoreRevision2 = (revision) => {
      setUserConfig(revision);
      setIsLoadingRevisionWithUnsavedChanges(false);
      onCloseRevisions();
    };
    const handleRevisionSelect = (revision) => {
      goTo(`/revisions/${revision.id}`);
    };
    const currentlySelectedRevisionId = (
      // @ts-expect-error: revision id is not present in the fallback (default object).
      currentlySelectedRevision?.id ?? revisions[0]?.id
    );
    const isLoadButtonEnabled = !!currentlySelectedRevisionId && currentlySelectedRevisionId !== "unsaved" && !selectedRevisionMatchesEditorStyles;
    const hasRevisions = !!revisions.length;
    return /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(import_jsx_runtime191.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
        ScreenHeader,
        {
          title: revisionsCount ? (0, import_i18n113.sprintf)(
            // translators: %d: number of revisions.
            (0, import_i18n113.__)("Revisions (%d)"),
            revisionsCount
          ) : (0, import_i18n113.__)("Revisions"),
          description: (0, import_i18n113.__)(
            `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.`
          ),
          onBack: onCloseRevisions
        }
      ),
      !hasRevisions && /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(import_components89.Spinner, { className: "global-styles-ui-screen-revisions__loading" }),
      /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
        revisions_buttons_default,
        {
          onChange: handleRevisionSelect,
          selectedRevisionId: currentlySelectedRevisionId,
          userRevisions: revisions,
          canApplyRevision: isLoadButtonEnabled,
          onApplyRevision: () => hasUnsavedChanges ? setIsLoadingRevisionWithUnsavedChanges(true) : restoreRevision2(currentlySelectedRevision)
        }
      ),
      numPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("div", { className: "global-styles-ui-screen-revisions__footer", children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
        Pagination,
        {
          className: "global-styles-ui-screen-revisions__pagination",
          currentPage,
          numPages,
          changePage: setCurrentPage,
          totalItems: revisionsCount,
          disabled: isLoading,
          label: (0, import_i18n113.__)("Global Styles pagination")
        }
      ) }),
      isLoadingRevisionWithUnsavedChanges && /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
        import_components89.__experimentalConfirmDialog,
        {
          isOpen: isLoadingRevisionWithUnsavedChanges,
          confirmButtonText: (0, import_i18n113.__)("Apply"),
          onConfirm: () => restoreRevision2(currentlySelectedRevision),
          onCancel: () => setIsLoadingRevisionWithUnsavedChanges(false),
          size: "medium",
          children: (0, import_i18n113.__)(
            "Are you sure you want to apply this revision? Any unsaved changes will be lost."
          )
        }
      )
    ] });
  }
  var screen_revisions_default = ScreenRevisions;

  // packages/global-styles-ui/build-module/font-sizes/font-sizes.mjs
  var import_i18n115 = __toESM(require_i18n(), 1);
  var import_components91 = __toESM(require_components(), 1);
  var import_element75 = __toESM(require_element(), 1);

  // packages/global-styles-ui/build-module/font-sizes/confirm-reset-font-sizes-dialog.mjs
  var import_components90 = __toESM(require_components(), 1);
  var import_i18n114 = __toESM(require_i18n(), 1);
  var import_jsx_runtime192 = __toESM(require_jsx_runtime(), 1);
  function ConfirmResetFontSizesDialog({
    text,
    confirmButtonText,
    isOpen,
    toggleOpen,
    onConfirm
  }) {
    const handleConfirm = async () => {
      toggleOpen();
      onConfirm();
    };
    const handleCancel = () => {
      toggleOpen();
    };
    return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
      import_components90.__experimentalConfirmDialog,
      {
        isOpen,
        cancelButtonText: (0, import_i18n114.__)("Cancel"),
        confirmButtonText,
        onCancel: handleCancel,
        onConfirm: handleConfirm,
        size: "medium",
        children: text
      }
    );
  }
  var confirm_reset_font_sizes_dialog_default = ConfirmResetFontSizesDialog;

  // packages/global-styles-ui/build-module/font-sizes/font-sizes.mjs
  var import_jsx_runtime193 = __toESM(require_jsx_runtime(), 1);
  var { Menu: Menu3 } = unlock3(import_components91.privateApis);
  function FontSizeGroup({
    label,
    origin,
    sizes,
    handleAddFontSize,
    handleResetFontSizes
  }) {
    const [isResetDialogOpen, setIsResetDialogOpen] = (0, import_element75.useState)(false);
    const toggleResetDialog = () => setIsResetDialogOpen(!isResetDialogOpen);
    const resetDialogText = origin === "custom" ? (0, import_i18n115.__)(
      "Are you sure you want to remove all custom font size presets?"
    ) : (0, import_i18n115.__)(
      "Are you sure you want to reset all font size presets to their default values?"
    );
    return /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(import_jsx_runtime193.Fragment, { children: [
      handleResetFontSizes && isResetDialogOpen && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
        confirm_reset_font_sizes_dialog_default,
        {
          text: resetDialogText,
          confirmButtonText: origin === "custom" ? (0, import_i18n115.__)("Remove") : (0, import_i18n115.__)("Reset"),
          isOpen: isResetDialogOpen,
          toggleOpen: toggleResetDialog,
          onConfirm: handleResetFontSizes
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(import_components91.__experimentalVStack, { spacing: 4, children: [
        /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(import_components91.__experimentalHStack, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(Subtitle, { level: 3, children: label }),
          /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(import_components91.FlexItem, { className: "global-styles-ui__typography-panel__options-container", children: [
            origin === "custom" && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
              import_components91.Button,
              {
                label: (0, import_i18n115.__)("Add font size"),
                icon: plus_default,
                size: "small",
                onClick: handleAddFontSize
              }
            ),
            !!handleResetFontSizes && /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(Menu3, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
                Menu3.TriggerButton,
                {
                  render: /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
                    import_components91.Button,
                    {
                      size: "small",
                      icon: more_vertical_default,
                      label: (0, import_i18n115.__)(
                        "Font size presets options"
                      )
                    }
                  )
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(Menu3.Popover, { children: /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(Menu3.Item, { onClick: toggleResetDialog, children: /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(Menu3.ItemLabel, { children: origin === "custom" ? (0, import_i18n115.__)(
                "Remove font size presets"
              ) : (0, import_i18n115.__)(
                "Reset font size presets"
              ) }) }) })
            ] })
          ] })
        ] }),
        !!sizes.length && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(import_components91.__experimentalItemGroup, { isBordered: true, isSeparated: true, children: sizes.map((size3) => /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
          NavigationButtonAsItem,
          {
            path: `/typography/font-sizes/${origin}/${size3.slug}`,
            children: /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(import_components91.__experimentalHStack, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(import_components91.FlexItem, { className: "global-styles-ui-font-size__item", children: size3.name }),
              /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(import_components91.FlexItem, { display: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
                icon_default,
                {
                  icon: (0, import_i18n115.isRTL)() ? chevron_left_default : chevron_right_default
                }
              ) })
            ] })
          },
          size3.slug
        )) })
      ] })
    ] });
  }
  function FontSizes2() {
    const [themeFontSizes, setThemeFontSizes] = useSetting(
      "typography.fontSizes.theme"
    );
    const [baseThemeFontSizes] = useSetting(
      "typography.fontSizes.theme",
      "base"
    );
    const [defaultFontSizes, setDefaultFontSizes] = useSetting(
      "typography.fontSizes.default"
    );
    const [baseDefaultFontSizes] = useSetting(
      "typography.fontSizes.default",
      "base"
    );
    const [customFontSizes = [], setCustomFontSizes] = useSetting(
      "typography.fontSizes.custom"
    );
    const [defaultFontSizesEnabled] = useSetting(
      "typography.defaultFontSizes"
    );
    const handleAddFontSize = () => {
      const index2 = getNewIndexFromPresets(customFontSizes, "custom-");
      const newFontSize = {
        /* translators: %d: font size index */
        name: (0, import_i18n115.sprintf)((0, import_i18n115.__)("New Font Size %d"), index2),
        size: "16px",
        slug: `custom-${index2}`
      };
      setCustomFontSizes([...customFontSizes, newFontSize]);
    };
    const hasSameSizeValues = (arr1, arr2) => arr1.map((item) => item.size).join("") === arr2.map((item) => item.size).join("");
    return /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(import_components91.__experimentalVStack, { spacing: 2, children: [
      /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
        ScreenHeader,
        {
          title: (0, import_i18n115.__)("Font size presets"),
          description: (0, import_i18n115.__)(
            "Create and edit the presets used for font sizes across the site."
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(import_components91.__experimentalView, { children: /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(import_components91.__experimentalSpacer, { paddingX: 4, children: /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(import_components91.__experimentalVStack, { spacing: 8, children: [
        !!themeFontSizes?.length && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
          FontSizeGroup,
          {
            label: (0, import_i18n115.__)("Theme"),
            origin: "theme",
            sizes: themeFontSizes,
            handleAddFontSize,
            handleResetFontSizes: hasSameSizeValues(
              themeFontSizes,
              baseThemeFontSizes
            ) ? void 0 : () => setThemeFontSizes(
              baseThemeFontSizes
            )
          }
        ),
        defaultFontSizesEnabled && !!defaultFontSizes?.length && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
          FontSizeGroup,
          {
            label: (0, import_i18n115.__)("Default"),
            origin: "default",
            sizes: defaultFontSizes,
            handleAddFontSize,
            handleResetFontSizes: hasSameSizeValues(
              defaultFontSizes,
              baseDefaultFontSizes
            ) ? void 0 : () => setDefaultFontSizes(
              baseDefaultFontSizes
            )
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
          FontSizeGroup,
          {
            label: (0, import_i18n115.__)("Custom"),
            origin: "custom",
            sizes: customFontSizes,
            handleAddFontSize,
            handleResetFontSizes: customFontSizes.length > 0 ? () => setCustomFontSizes([]) : void 0
          }
        )
      ] }) }) })
    ] });
  }
  var font_sizes_default = FontSizes2;

  // packages/global-styles-ui/build-module/font-sizes/font-size.mjs
  var import_i18n119 = __toESM(require_i18n(), 1);
  var import_components95 = __toESM(require_components(), 1);
  var import_element77 = __toESM(require_element(), 1);

  // packages/global-styles-ui/build-module/font-sizes/font-size-preview.mjs
  var import_block_editor30 = __toESM(require_block_editor(), 1);
  var import_i18n116 = __toESM(require_i18n(), 1);
  var import_jsx_runtime194 = __toESM(require_jsx_runtime(), 1);
  function FontSizePreview({ fontSize }) {
    const [font2] = useStyle("typography");
    const input = typeof fontSize?.fluid === "object" && fontSize?.fluid?.min && fontSize?.fluid?.max ? {
      minimumFontSize: fontSize.fluid.min,
      maximumFontSize: fontSize.fluid.max
    } : {
      fontSize: fontSize.size
    };
    const computedFontSize = (0, import_block_editor30.getComputedFluidTypographyValue)(input);
    return /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
      "div",
      {
        className: "global-styles-ui-typography-preview",
        style: {
          fontSize: computedFontSize,
          fontFamily: font2?.fontFamily ?? "serif"
        },
        children: (0, import_i18n116.__)("Aa")
      }
    );
  }
  var font_size_preview_default = FontSizePreview;

  // packages/global-styles-ui/build-module/font-sizes/confirm-delete-font-size-dialog.mjs
  var import_components92 = __toESM(require_components(), 1);
  var import_i18n117 = __toESM(require_i18n(), 1);
  var import_jsx_runtime195 = __toESM(require_jsx_runtime(), 1);
  function ConfirmDeleteFontSizeDialog({
    fontSize,
    isOpen,
    toggleOpen,
    handleRemoveFontSize
  }) {
    const handleConfirm = async () => {
      toggleOpen();
      handleRemoveFontSize(fontSize);
    };
    const handleCancel = () => {
      toggleOpen();
    };
    return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
      import_components92.__experimentalConfirmDialog,
      {
        isOpen,
        cancelButtonText: (0, import_i18n117.__)("Cancel"),
        confirmButtonText: (0, import_i18n117.__)("Delete"),
        onCancel: handleCancel,
        onConfirm: handleConfirm,
        size: "medium",
        children: fontSize && (0, import_i18n117.sprintf)(
          /* translators: %s: Name of the font size preset. */
          (0, import_i18n117.__)(
            'Are you sure you want to delete "%s" font size preset?'
          ),
          fontSize.name
        )
      }
    );
  }
  var confirm_delete_font_size_dialog_default = ConfirmDeleteFontSizeDialog;

  // packages/global-styles-ui/build-module/font-sizes/rename-font-size-dialog.mjs
  var import_components93 = __toESM(require_components(), 1);
  var import_i18n118 = __toESM(require_i18n(), 1);
  var import_element76 = __toESM(require_element(), 1);
  var import_jsx_runtime196 = __toESM(require_jsx_runtime(), 1);
  function RenameFontSizeDialog({
    fontSize,
    toggleOpen,
    handleRename
  }) {
    const [newName, setNewName] = (0, import_element76.useState)(
      fontSize.name
    );
    const handleConfirm = () => {
      if (newName && newName.trim()) {
        handleRename(newName);
      }
      toggleOpen();
    };
    return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
      import_components93.Modal,
      {
        onRequestClose: toggleOpen,
        focusOnMount: "firstContentElement",
        title: (0, import_i18n118.__)("Rename"),
        size: "small",
        children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
          "form",
          {
            onSubmit: (event) => {
              event.preventDefault();
              handleConfirm();
              toggleOpen();
            },
            children: /* @__PURE__ */ (0, import_jsx_runtime196.jsxs)(import_components93.__experimentalVStack, { spacing: "3", children: [
              /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
                import_components93.__experimentalInputControl,
                {
                  __next40pxDefaultSize: true,
                  autoComplete: "off",
                  value: newName,
                  onChange: setNewName,
                  label: (0, import_i18n118.__)("Name"),
                  placeholder: (0, import_i18n118.__)("Font size preset name")
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime196.jsxs)(import_components93.__experimentalHStack, { justify: "right", children: [
                /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
                  import_components93.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "tertiary",
                    onClick: toggleOpen,
                    children: (0, import_i18n118.__)("Cancel")
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
                  import_components93.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "primary",
                    type: "submit",
                    children: (0, import_i18n118.__)("Save")
                  }
                )
              ] })
            ] })
          }
        )
      }
    );
  }
  var rename_font_size_dialog_default = RenameFontSizeDialog;

  // packages/global-styles-ui/build-module/size-control/index.mjs
  var import_components94 = __toESM(require_components(), 1);
  var import_jsx_runtime197 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_UNITS = ["px", "em", "rem", "vw", "vh"];
  function SizeControl(props) {
    const { baseControlProps } = (0, import_components94.useBaseControlProps)(props);
    const { value, onChange, fallbackValue, disabled, label } = props;
    const units = (0, import_components94.__experimentalUseCustomUnits)({
      availableUnits: DEFAULT_UNITS
    });
    const [valueQuantity, valueUnit = "px"] = (0, import_components94.__experimentalParseQuantityAndUnitFromRawValue)(value, units);
    const isValueUnitRelative = !!valueUnit && ["em", "rem", "vw", "vh"].includes(valueUnit);
    const handleUnitControlChange = (newValue) => {
      onChange?.(newValue);
    };
    const handleRangeControlChange = (newValue) => {
      if (newValue !== void 0) {
        onChange?.(newValue + valueUnit);
      } else {
        onChange?.(void 0);
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(import_components94.BaseControl, { ...baseControlProps, children: /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(import_components94.Flex, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(import_components94.FlexItem, { isBlock: true, children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
        import_components94.__experimentalUnitControl,
        {
          __next40pxDefaultSize: true,
          label,
          hideLabelFromVision: true,
          value,
          onChange: handleUnitControlChange,
          units,
          min: 0,
          disabled
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(import_components94.FlexItem, { isBlock: true, children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(import_components94.__experimentalSpacer, { marginX: 2, marginBottom: 0, children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
        import_components94.RangeControl,
        {
          __next40pxDefaultSize: true,
          label,
          hideLabelFromVision: true,
          value: valueQuantity,
          initialPosition: fallbackValue,
          withInputField: false,
          onChange: handleRangeControlChange,
          min: 0,
          max: isValueUnitRelative ? 10 : 100,
          step: isValueUnitRelative ? 0.1 : 1,
          disabled
        }
      ) }) })
    ] }) });
  }

  // packages/global-styles-ui/build-module/font-sizes/font-size.mjs
  var import_jsx_runtime198 = __toESM(require_jsx_runtime(), 1);
  var { Menu: Menu4 } = unlock3(import_components95.privateApis);
  function FontSize() {
    const [isDeleteConfirmOpen, setIsDeleteConfirmOpen] = (0, import_element77.useState)(false);
    const [isRenameDialogOpen, setIsRenameDialogOpen] = (0, import_element77.useState)(false);
    const {
      params: { origin, slug },
      goBack
    } = (0, import_components95.useNavigator)();
    const [fontSizes, setFontSizes] = useSetting("typography.fontSizes");
    const [globalFluid] = useSetting("typography.fluid");
    const sizes = fontSizes?.[origin] ?? [];
    const fontSize = sizes.find(
      (size3) => size3.slug === slug
    );
    (0, import_element77.useEffect)(() => {
      if (!!slug && !fontSize) {
        goBack();
      }
    }, [slug, fontSize, goBack]);
    if (!origin || !slug || !fontSize) {
      return null;
    }
    const isFluid = fontSize?.fluid !== void 0 ? !!fontSize.fluid : !!globalFluid;
    const isCustomFluid = typeof fontSize?.fluid === "object";
    const handleNameChange = (value) => {
      updateFontSize("name", value);
    };
    const handleFontSizeChange = (value) => {
      updateFontSize("size", value);
    };
    const handleFluidChange = (value) => {
      updateFontSize("fluid", value);
    };
    const handleCustomFluidValues = (value) => {
      if (value) {
        updateFontSize("fluid", {
          min: fontSize.size,
          max: fontSize.size
        });
      } else {
        updateFontSize("fluid", true);
      }
    };
    const handleMinChange = (value) => {
      const fluid = typeof fontSize.fluid === "object" ? fontSize.fluid : {};
      updateFontSize("fluid", { ...fluid, min: value });
    };
    const handleMaxChange = (value) => {
      const fluid = typeof fontSize.fluid === "object" ? fontSize.fluid : {};
      updateFontSize("fluid", { ...fluid, max: value });
    };
    const updateFontSize = (key, value) => {
      const newFontSizes = sizes.map((size3) => {
        if (size3.slug === slug) {
          return { ...size3, [key]: value };
        }
        return size3;
      });
      setFontSizes({
        ...fontSizes,
        [origin]: newFontSizes
      });
    };
    const handleRemoveFontSize = () => {
      const newFontSizes = sizes.filter((size3) => size3.slug !== slug);
      setFontSizes({
        ...fontSizes,
        [origin]: newFontSizes
      });
    };
    const toggleDeleteConfirm = () => {
      setIsDeleteConfirmOpen(!isDeleteConfirmOpen);
    };
    const toggleRenameDialog = () => {
      setIsRenameDialogOpen(!isRenameDialogOpen);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(import_jsx_runtime198.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
        confirm_delete_font_size_dialog_default,
        {
          fontSize,
          isOpen: isDeleteConfirmOpen,
          toggleOpen: toggleDeleteConfirm,
          handleRemoveFontSize
        }
      ),
      isRenameDialogOpen && /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
        rename_font_size_dialog_default,
        {
          fontSize,
          toggleOpen: toggleRenameDialog,
          handleRename: handleNameChange
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(import_components95.__experimentalVStack, { spacing: 4, children: [
        /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(import_components95.__experimentalHStack, { justify: "space-between", alignment: "flex-start", children: [
          /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
            ScreenHeader,
            {
              title: fontSize.name,
              description: (0, import_i18n119.sprintf)(
                /* translators: %s: font size preset name. */
                (0, import_i18n119.__)("Manage the font size %s."),
                fontSize.name
              )
            }
          ),
          origin === "custom" && /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(import_components95.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
            import_components95.__experimentalSpacer,
            {
              marginTop: 3,
              marginBottom: 0,
              paddingX: 4,
              children: /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(Menu4, { children: [
                /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
                  Menu4.TriggerButton,
                  {
                    render: /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
                      import_components95.Button,
                      {
                        size: "small",
                        icon: more_vertical_default,
                        label: (0, import_i18n119.__)(
                          "Font size options"
                        )
                      }
                    )
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(Menu4.Popover, { children: [
                  /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
                    Menu4.Item,
                    {
                      onClick: toggleRenameDialog,
                      children: /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(Menu4.ItemLabel, { children: (0, import_i18n119.__)("Rename") })
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
                    Menu4.Item,
                    {
                      onClick: toggleDeleteConfirm,
                      children: /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(Menu4.ItemLabel, { children: (0, import_i18n119.__)("Delete") })
                    }
                  )
                ] })
              ] })
            }
          ) })
        ] }),
        /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(import_components95.__experimentalView, { children: /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
          import_components95.__experimentalSpacer,
          {
            paddingX: 4,
            marginBottom: 0,
            paddingBottom: 6,
            children: /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(import_components95.__experimentalVStack, { spacing: 4, children: [
              /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(import_components95.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(font_size_preview_default, { fontSize }) }),
              /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
                SizeControl,
                {
                  label: (0, import_i18n119.__)("Size"),
                  value: !isCustomFluid && fontSize.size ? String(fontSize.size) : "",
                  onChange: handleFontSizeChange,
                  disabled: isCustomFluid
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
                import_components95.ToggleControl,
                {
                  label: (0, import_i18n119.__)("Fluid typography"),
                  help: (0, import_i18n119.__)(
                    "Scale the font size dynamically to fit the screen or viewport."
                  ),
                  checked: isFluid,
                  onChange: handleFluidChange
                }
              ),
              isFluid && /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
                import_components95.ToggleControl,
                {
                  label: (0, import_i18n119.__)("Custom fluid values"),
                  help: (0, import_i18n119.__)(
                    "Set custom min and max values for the fluid font size."
                  ),
                  checked: isCustomFluid,
                  onChange: handleCustomFluidValues
                }
              ),
              isCustomFluid && /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(import_jsx_runtime198.Fragment, { children: [
                /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
                  SizeControl,
                  {
                    label: (0, import_i18n119.__)("Minimum"),
                    value: typeof fontSize?.fluid === "object" ? fontSize.fluid?.min : void 0,
                    onChange: handleMinChange
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
                  SizeControl,
                  {
                    label: (0, import_i18n119.__)("Maximum"),
                    value: typeof fontSize?.fluid === "object" ? fontSize.fluid?.max : void 0,
                    onChange: handleMaxChange
                  }
                )
              ] })
            ] })
          }
        ) })
      ] })
    ] });
  }
  var font_size_default = FontSize;

  // packages/global-styles-ui/build-module/global-styles-ui.mjs
  var import_jsx_runtime199 = __toESM(require_jsx_runtime(), 1);
  function BlockStylesNavigationScreens({
    parentMenu,
    blockStyles,
    blockName
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(import_jsx_runtime199.Fragment, { children: blockStyles.map((style, index2) => /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
      import_components96.Navigator.Screen,
      {
        path: parentMenu + "/variations/" + style.name,
        children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(screen_block_default, { name: blockName, variation: style.name })
      },
      index2
    )) });
  }
  function ContextScreens({ name: name2, parentMenu = "" }) {
    const blockStyleVariations = (0, import_data67.useSelect)(
      (select6) => {
        if (!name2) {
          return [];
        }
        const { getBlockStyles } = select6(import_blocks19.store);
        return getBlockStyles(name2);
      },
      [name2]
    );
    if (!blockStyleVariations?.length) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
      BlockStylesNavigationScreens,
      {
        parentMenu,
        blockStyles: blockStyleVariations,
        blockName: name2 || ""
      }
    );
  }
  function GlobalStylesUI({
    value,
    baseValue,
    onChange,
    path,
    onPathChange,
    fontLibraryEnabled = false,
    serverCSS,
    serverSettings
  }) {
    const blocks = (0, import_blocks19.getBlockTypes)();
    const mergedValue = (0, import_element78.useMemo)(() => {
      return mergeGlobalStyles(baseValue, value);
    }, [baseValue, value]);
    const [globalStylesCSS, globalSettings] = generateGlobalStyles(
      mergedValue,
      [],
      {
        styleOptions: { variationStyles: true }
      }
    );
    const styles = (0, import_element78.useMemo)(
      () => [...serverCSS ?? [], ...globalStylesCSS ?? []],
      [serverCSS, globalStylesCSS]
    );
    const settings = (0, import_element78.useMemo)(() => {
      return {
        ...serverSettings,
        __experimentalFeatures: globalSettings,
        styles
      };
    }, [globalSettings, serverSettings, styles]);
    return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
      GlobalStylesProvider,
      {
        value,
        baseValue,
        onChange,
        fontLibraryEnabled,
        children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(import_block_editor31.BlockEditorProvider, { settings, children: /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)(
          import_components96.Navigator,
          {
            className: "global-styles-ui-sidebar__navigator-provider",
            initialPath: path || "/",
            children: [
              (path || onPathChange) && /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
                PathSynchronizer,
                {
                  path,
                  onPathChange
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(GlobalStylesNavigationScreen, { path: "/", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(screen_root_default, {}) }),
              /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(GlobalStylesNavigationScreen, { path: "/colors", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(screen_colors_default, {}) }),
              /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(GlobalStylesNavigationScreen, { path: "/typography", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(screen_typography_default, {}) }),
              /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(GlobalStylesNavigationScreen, { path: "/typography/font-sizes", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(font_sizes_default, {}) }),
              /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(GlobalStylesNavigationScreen, { path: "/typography/font-sizes/:origin/:slug", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(font_size_default, {}) }),
              /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(GlobalStylesNavigationScreen, { path: "/layout", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(screen_layout_default, {}) }),
              /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(GlobalStylesNavigationScreen, { path: "/colors/palette", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(screen_color_palette_default, {}) }),
              /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(GlobalStylesNavigationScreen, { path: "/variations", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(screen_style_variations_default, {}) }),
              /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(GlobalStylesNavigationScreen, { path: "/css", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(screen_css_default, {}) }),
              /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(GlobalStylesNavigationScreen, { path: "/revisions/:revisionId?", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(screen_revisions_default, {}) }),
              /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(GlobalStylesNavigationScreen, { path: "/shadows", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(ScreenShadows, {}) }),
              /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(GlobalStylesNavigationScreen, { path: "/shadows/edit/:category/:slug", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(ScreenShadowsEdit, {}) }),
              /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(GlobalStylesNavigationScreen, { path: "/background", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(screen_background_default, {}) }),
              /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(GlobalStylesNavigationScreen, { path: "/typography/text", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(screen_typography_element_default, { element: "text" }) }),
              /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(GlobalStylesNavigationScreen, { path: "/typography/link", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(screen_typography_element_default, { element: "link" }) }),
              /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(GlobalStylesNavigationScreen, { path: "/typography/heading", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(screen_typography_element_default, { element: "heading" }) }),
              /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(GlobalStylesNavigationScreen, { path: "/typography/caption", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(screen_typography_element_default, { element: "caption" }) }),
              /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(GlobalStylesNavigationScreen, { path: "/typography/button", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(screen_typography_element_default, { element: "button" }) }),
              /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(GlobalStylesNavigationScreen, { path: "/blocks", children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(screen_block_list_default, {}) }),
              blocks.map((block) => /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)(import_element78.Fragment, { children: [
                /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
                  GlobalStylesNavigationScreen,
                  {
                    path: "/blocks/" + encodeURIComponent(block.name),
                    children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(screen_block_default, { name: block.name })
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
                  ContextScreens,
                  {
                    name: block.name,
                    parentMenu: "/blocks/" + encodeURIComponent(block.name)
                  }
                )
              ] }, block.name))
            ]
          }
        ) })
      }
    );
  }
  function GlobalStylesNavigationScreen({
    path,
    children
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
      import_components96.Navigator.Screen,
      {
        className: "global-styles-ui-sidebar__navigator-screen",
        path,
        children
      }
    );
  }
  function PathSynchronizer({
    path,
    onPathChange
  }) {
    const navigator = (0, import_components96.useNavigator)();
    const { path: childPath } = navigator.location;
    const previousParentPath = (0, import_compose14.usePrevious)(path);
    const previousChildPath = (0, import_compose14.usePrevious)(childPath);
    (0, import_element78.useEffect)(() => {
      if (path && path !== childPath) {
        if (path !== previousParentPath) {
          navigator.goTo(path);
        } else if (childPath !== previousChildPath && onPathChange) {
          onPathChange(childPath ?? "/");
        }
      }
    }, [
      onPathChange,
      path,
      previousChildPath,
      previousParentPath,
      childPath,
      navigator
    ]);
    return null;
  }

  // packages/global-styles-ui/build-module/with-global-styles-provider.mjs
  var import_jsx_runtime200 = __toESM(require_jsx_runtime(), 1);
  function withGlobalStylesProvider(Component6) {
    return function WrappedComponent({
      value,
      baseValue,
      onChange,
      ...props
    }) {
      return /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
        GlobalStylesProvider,
        {
          value,
          baseValue,
          onChange,
          children: /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(Component6, { ...props })
        }
      );
    };
  }

  // packages/global-styles-ui/build-module/style-variations.mjs
  var StyleVariations = withGlobalStylesProvider(style_variations_container_default);

  // packages/global-styles-ui/build-module/color-variations.mjs
  var ColorVariations2 = withGlobalStylesProvider(ColorVariations);

  // packages/global-styles-ui/build-module/typography-variations.mjs
  var TypographyVariations2 = withGlobalStylesProvider(TypographyVariations);

  // packages/global-styles-ui/build-module/font-library/font-library.mjs
  var import_jsx_runtime201 = __toESM(require_jsx_runtime(), 1);

  // packages/editor/build-module/components/global-styles/index.mjs
  var import_media_utils4 = __toESM(require_media_utils(), 1);

  // packages/editor/build-module/components/global-styles/block-link.mjs
  var import_data68 = __toESM(require_data(), 1);
  var import_element79 = __toESM(require_element(), 1);
  var import_block_editor32 = __toESM(require_block_editor(), 1);
  var import_compose15 = __toESM(require_compose(), 1);
  function GlobalStylesBlockLink({ path, onPathChange }) {
    const { selectedBlockName, selectedBlockClientId } = (0, import_data68.useSelect)(
      (select6) => {
        const { getSelectedBlockClientId: getSelectedBlockClientId2, getBlockName: getBlockName2 } = select6(import_block_editor32.store);
        const clientId = getSelectedBlockClientId2();
        return {
          selectedBlockName: getBlockName2(clientId),
          selectedBlockClientId: clientId
        };
      },
      []
    );
    const blockHasGlobalStyles = true;
    const previousBlockClientId = (0, import_compose15.usePrevious)(selectedBlockClientId);
    (0, import_element79.useEffect)(() => {
      if (selectedBlockClientId === previousBlockClientId) {
        return;
      }
      if (!selectedBlockClientId || !blockHasGlobalStyles) {
        return;
      }
      if (!path || path !== "/blocks" && !path.startsWith("/blocks/")) {
        return;
      }
      const newPath = "/blocks/" + encodeURIComponent(selectedBlockName);
      if (newPath !== path) {
        onPathChange?.(newPath);
      }
    }, [
      selectedBlockClientId,
      previousBlockClientId,
      selectedBlockName,
      blockHasGlobalStyles,
      path,
      onPathChange
    ]);
    return null;
  }

  // packages/editor/build-module/components/global-styles/hooks.mjs
  var import_element80 = __toESM(require_element(), 1);
  var import_core_data49 = __toESM(require_core_data(), 1);
  var import_data69 = __toESM(require_data(), 1);
  var import_block_editor33 = __toESM(require_block_editor(), 1);
  var { cleanEmptyObject: cleanEmptyObject2 } = unlock(import_block_editor33.privateApis);
  function useGlobalStylesUserConfig2() {
    const { globalStylesId, isReady: isReady2, settings, styles, _links } = (0, import_data69.useSelect)(
      (select6) => {
        const {
          getEntityRecord,
          getEditedEntityRecord: getEditedEntityRecord2,
          hasFinishedResolution,
          canUser
        } = select6(import_core_data49.store);
        const _globalStylesId = select6(import_core_data49.store).__experimentalGetCurrentGlobalStylesId();
        let record;
        const userCanEditGlobalStyles = _globalStylesId ? canUser("update", {
          kind: "root",
          name: "globalStyles",
          id: _globalStylesId
        }) : null;
        if (_globalStylesId && typeof userCanEditGlobalStyles === "boolean") {
          if (userCanEditGlobalStyles) {
            record = getEditedEntityRecord2(
              "root",
              "globalStyles",
              _globalStylesId
            );
          } else {
            record = getEntityRecord(
              "root",
              "globalStyles",
              _globalStylesId,
              { context: "view" }
            );
          }
        }
        let hasResolved = false;
        if (hasFinishedResolution(
          "__experimentalGetCurrentGlobalStylesId"
        )) {
          if (_globalStylesId) {
            hasResolved = userCanEditGlobalStyles ? hasFinishedResolution("getEditedEntityRecord", [
              "root",
              "globalStyles",
              _globalStylesId
            ]) : hasFinishedResolution("getEntityRecord", [
              "root",
              "globalStyles",
              _globalStylesId,
              { context: "view" }
            ]);
          } else {
            hasResolved = true;
          }
        }
        return {
          globalStylesId: _globalStylesId,
          isReady: hasResolved,
          settings: record?.settings,
          styles: record?.styles,
          _links: record?._links
        };
      },
      []
    );
    const { getEditedEntityRecord } = (0, import_data69.useSelect)(import_core_data49.store);
    const { editEntityRecord } = (0, import_data69.useDispatch)(import_core_data49.store);
    const config2 = (0, import_element80.useMemo)(() => {
      return {
        settings: settings ?? {},
        styles: styles ?? {},
        _links: _links ?? {}
      };
    }, [settings, styles, _links]);
    const setConfig = (0, import_element80.useCallback)(
      (callbackOrObject, options = {}) => {
        const record = getEditedEntityRecord(
          "root",
          "globalStyles",
          globalStylesId
        );
        const currentConfig = {
          styles: record?.styles ?? {},
          settings: record?.settings ?? {},
          _links: record?._links ?? {}
        };
        const updatedConfig = typeof callbackOrObject === "function" ? callbackOrObject(currentConfig) : callbackOrObject;
        editEntityRecord(
          "root",
          "globalStyles",
          globalStylesId,
          {
            styles: cleanEmptyObject2(updatedConfig.styles) || {},
            settings: cleanEmptyObject2(updatedConfig.settings) || {},
            _links: cleanEmptyObject2(updatedConfig._links) || {}
          },
          options
        );
      },
      [globalStylesId, editEntityRecord, getEditedEntityRecord]
    );
    return [isReady2, config2, setConfig];
  }
  function useGlobalStylesBaseConfig2() {
    const baseConfig = (0, import_data69.useSelect)(
      (select6) => select6(import_core_data49.store).__experimentalGetCurrentThemeBaseGlobalStyles(),
      []
    );
    return [!!baseConfig, baseConfig];
  }
  function useGlobalStyles() {
    const [isUserConfigReady, userConfig, setUserConfig] = useGlobalStylesUserConfig2();
    const [isBaseConfigReady, baseConfig] = useGlobalStylesBaseConfig2();
    const merged = (0, import_element80.useMemo)(() => {
      if (!isUserConfigReady || !isBaseConfigReady) {
        return {};
      }
      return mergeGlobalStyles(baseConfig || {}, userConfig);
    }, [isUserConfigReady, isBaseConfigReady, baseConfig, userConfig]);
    return {
      merged,
      base: baseConfig || {},
      user: userConfig,
      setUser: setUserConfig,
      isReady: isUserConfigReady && isBaseConfigReady
    };
  }
  function useStyle2(path, blockName) {
    const { merged } = useGlobalStyles();
    return (0, import_element80.useMemo)(
      () => getStyle(merged, path, blockName),
      [merged, path, blockName]
    );
  }
  function useSetting2(path, blockName) {
    const { merged } = useGlobalStyles();
    return (0, import_element80.useMemo)(
      () => getSetting(merged, path, blockName),
      [merged, path, blockName]
    );
  }

  // packages/editor/build-module/components/global-styles/index.mjs
  var import_jsx_runtime202 = __toESM(require_jsx_runtime(), 1);
  function useServerData() {
    const {
      styles,
      __unstableResolvedAssets,
      colors: colors2,
      gradients,
      __experimentalDiscussionSettings,
      mediaUploadHandler,
      fontLibraryEnabled
    } = (0, import_data70.useSelect)((select6) => {
      const { getEditorSettings: getEditorSettings2 } = select6(store);
      const { canUser } = select6(import_core_data50.store);
      const editorSettings2 = getEditorSettings2();
      const canUserUploadMedia = canUser("create", {
        kind: "postType",
        name: "attachment"
      });
      return {
        styles: editorSettings2?.styles,
        __unstableResolvedAssets: editorSettings2?.__unstableResolvedAssets,
        colors: editorSettings2?.colors,
        gradients: editorSettings2?.gradients,
        __experimentalDiscussionSettings: editorSettings2?.__experimentalDiscussionSettings,
        mediaUploadHandler: canUserUploadMedia ? import_media_utils4.uploadMedia : void 0,
        fontLibraryEnabled: editorSettings2?.fontLibraryEnabled ?? true
      };
    }, []);
    const serverCSS = (0, import_element81.useMemo)(() => {
      if (!styles) {
        return [];
      }
      return styles.filter((style) => !style.isGlobalStyles);
    }, [styles]);
    const serverSettings = (0, import_element81.useMemo)(() => {
      return {
        __unstableResolvedAssets,
        settings: {
          color: {
            palette: {
              theme: colors2 ?? []
            },
            gradients: {
              theme: gradients ?? []
            },
            duotone: {
              theme: []
            }
          }
        },
        __experimentalDiscussionSettings,
        mediaUpload: mediaUploadHandler
      };
    }, [
      __unstableResolvedAssets,
      colors2,
      gradients,
      __experimentalDiscussionSettings,
      mediaUploadHandler
    ]);
    return { serverCSS, serverSettings, fontLibraryEnabled };
  }
  function GlobalStylesUIWrapper({ path, onPathChange }) {
    const {
      user: userConfig,
      base: baseConfig,
      setUser: setUserConfig,
      isReady: isReady2
    } = useGlobalStyles();
    const { serverCSS, serverSettings, fontLibraryEnabled } = useServerData();
    if (!isReady2) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)(import_jsx_runtime202.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
        GlobalStylesUI,
        {
          value: userConfig,
          baseValue: baseConfig || {},
          onChange: setUserConfig,
          path,
          onPathChange,
          fontLibraryEnabled,
          serverCSS,
          serverSettings
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
        GlobalStylesBlockLink,
        {
          path,
          onPathChange
        }
      )
    ] });
  }

  // packages/editor/build-module/dataviews/fields/content-preview/content-preview-view.mjs
  var import_jsx_runtime203 = __toESM(require_jsx_runtime(), 1);
  function PostPreviewContainer({
    template: template2,
    post: post2
  }) {
    const [backgroundColor = "white"] = useStyle2("color.background");
    const [postBlocks] = (0, import_core_data51.useEntityBlockEditor)("postType", post2.type, {
      id: post2.id
    });
    const [templateBlocks] = (0, import_core_data51.useEntityBlockEditor)(
      "postType",
      template2?.type,
      {
        id: template2?.id
      }
    );
    const blocks = template2 && templateBlocks ? templateBlocks : postBlocks;
    const isEmpty2 = !blocks?.length;
    return /* @__PURE__ */ (0, import_jsx_runtime203.jsxs)(
      "div",
      {
        className: "editor-fields-content-preview",
        style: {
          backgroundColor
        },
        children: [
          isEmpty2 && /* @__PURE__ */ (0, import_jsx_runtime203.jsx)("span", { className: "editor-fields-content-preview__empty", children: (0, import_i18n120.__)("Empty content") }),
          !isEmpty2 && /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(import_block_editor34.BlockPreview.Async, { children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(import_block_editor34.BlockPreview, { blocks }) })
        ]
      }
    );
  }
  function PostPreviewView({ item }) {
    const { settings, template: template2 } = (0, import_data71.useSelect)(
      (select6) => {
        const { canUser, getPostType, getTemplateId, getEntityRecord } = unlock(select6(import_core_data51.store));
        const canViewTemplate = canUser("read", {
          kind: "postType",
          name: "wp_template"
        });
        const _settings = select6(store).getEditorSettings();
        const supportsTemplateMode = _settings.supportsTemplateMode;
        const isViewable = getPostType(item.type)?.viewable ?? false;
        const templateId2 = supportsTemplateMode && isViewable && canViewTemplate ? getTemplateId(item.type, item.id) : null;
        return {
          settings: _settings,
          template: templateId2 ? getEntityRecord("postType", "wp_template", templateId2) : void 0
        };
      },
      [item.type, item.id]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
      EditorProvider,
      {
        post: item,
        settings,
        __unstableTemplate: template2,
        children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(PostPreviewContainer, { template: template2, post: item })
      }
    );
  }

  // packages/editor/build-module/dataviews/fields/content-preview/index.mjs
  var postPreviewField = {
    type: "media",
    id: "content-preview",
    label: (0, import_i18n121.__)("Content preview"),
    render: PostPreviewView,
    enableSorting: false
  };
  var content_preview_default = postPreviewField;

  // packages/editor/build-module/dataviews/store/private-actions.mjs
  function hasEditorNotesSupport(supports) {
    const editor = supports?.editor;
    if (Array.isArray(editor)) {
      return !!editor[0]?.notes;
    }
    return false;
  }
  function registerEntityAction(kind, name2, config2) {
    return {
      type: "REGISTER_ENTITY_ACTION",
      kind,
      name: name2,
      config: config2
    };
  }
  function unregisterEntityAction(kind, name2, actionId) {
    return {
      type: "UNREGISTER_ENTITY_ACTION",
      kind,
      name: name2,
      actionId
    };
  }
  function registerEntityField(kind, name2, config2) {
    return {
      type: "REGISTER_ENTITY_FIELD",
      kind,
      name: name2,
      config: config2
    };
  }
  function unregisterEntityField(kind, name2, fieldId) {
    return {
      type: "UNREGISTER_ENTITY_FIELD",
      kind,
      name: name2,
      fieldId
    };
  }
  function setIsReady(kind, name2) {
    return {
      type: "SET_IS_READY",
      kind,
      name: name2
    };
  }
  var ORDERED_MEDIA_FIELDS = [
    // Metadata in panels (collapsed by default).
    date_added_default,
    author_default2,
    filename_default,
    mime_type_default,
    filesize_default,
    media_dimensions_default,
    attached_to_default,
    // Regular layout fields (always visible).
    title_default,
    alt_text_default,
    caption_default,
    description_default
  ];
  var registerPostTypeSchema = (postType2) => async ({ registry }) => {
    const isReady2 = unlock(registry.select(store)).isEntityReady(
      "postType",
      postType2
    );
    if (isReady2) {
      return;
    }
    unlock(registry.dispatch(store)).setIsReady(
      "postType",
      postType2
    );
    const postTypeConfig = await registry.resolveSelect(import_core_data52.store).getPostType(postType2);
    const canCreate = await registry.resolveSelect(import_core_data52.store).canUser("create", {
      kind: "postType",
      name: postType2
    });
    const currentTheme = await registry.resolveSelect(import_core_data52.store).getCurrentTheme();
    let canDuplicate = !["wp_block", "wp_template_part"].includes(
      postTypeConfig.slug
    ) && canCreate && duplicate_post_default;
    if (true) {
      if ("wp_template" !== postTypeConfig.slug) {
        canDuplicate = void 0;
      }
    }
    if (postTypeConfig.slug === "wp_template" && !window?.__experimentalTemplateActivate) {
      canDuplicate = void 0;
    }
    const actions2 = [
      postTypeConfig.viewable ? view_post_default : void 0,
      !!postTypeConfig.supports?.revisions ? view_post_revisions_default : void 0,
      // @ts-ignore
      canDuplicate,
      postTypeConfig.slug === "wp_template_part" && canCreate && currentTheme?.is_block_theme ? duplicate_template_part_default : void 0,
      canCreate && postTypeConfig.slug === "wp_block" ? duplicate_pattern_default : void 0,
      postTypeConfig.supports?.title ? rename_post_default : void 0,
      postTypeConfig.supports?.["page-attributes"] ? reorder_page_default : void 0,
      postTypeConfig.slug === "wp_block" ? export_pattern_default : void 0,
      restore_post_default,
      reset_post_default,
      delete_post_default,
      trash_post_default,
      permanently_delete_post_default
    ].filter(Boolean);
    let fields2;
    if (postType2 === ATTACHMENT_POST_TYPE) {
      fields2 = ORDERED_MEDIA_FIELDS;
    } else {
      fields2 = [
        postTypeConfig.supports?.thumbnail && currentTheme?.theme_supports?.["post-thumbnails"] && featured_image_default,
        postTypeConfig.supports?.author && author_default,
        status_default,
        !DESIGN_POST_TYPES.includes(postTypeConfig.slug) && date_default,
        slug_default,
        postTypeConfig.supports?.["page-attributes"] && parent_default,
        postTypeConfig.supports?.comments && comment_status_default,
        postTypeConfig.supports?.trackbacks && ping_status_default,
        (postTypeConfig.supports?.comments || postTypeConfig.supports?.trackbacks) && discussion_default,
        template_default,
        password_default,
        postTypeConfig.supports?.editor && postTypeConfig.viewable && content_preview_default,
        hasEditorNotesSupport(postTypeConfig.supports) && notes_default
      ].filter(Boolean);
      if (postTypeConfig.supports?.title) {
        let _titleField;
        if (postType2 === "page") {
          _titleField = page_title_default;
        } else if (postType2 === "wp_template") {
          _titleField = template_title_default;
        } else if (postType2 === "wp_block") {
          _titleField = pattern_title_default;
        } else {
          _titleField = title_default;
        }
        fields2.push(_titleField);
      }
    }
    registry.batch(() => {
      actions2.forEach((action) => {
        unlock(registry.dispatch(store)).registerEntityAction(
          "postType",
          postType2,
          action
        );
      });
      fields2.forEach((field) => {
        unlock(registry.dispatch(store)).registerEntityField(
          "postType",
          postType2,
          field
        );
      });
    });
    (0, import_hooks38.doAction)("core.registerPostTypeSchema", postType2);
  };

  // packages/editor/build-module/store/private-actions.mjs
  function setCurrentTemplateId(id) {
    return {
      type: "SET_CURRENT_TEMPLATE_ID",
      id
    };
  }
  var createTemplate = (template2) => async ({ select: select6, dispatch: dispatch7, registry }) => {
    const savedTemplate = await registry.dispatch(import_core_data53.store).saveEntityRecord("postType", "wp_template", template2);
    registry.dispatch(import_core_data53.store).editEntityRecord(
      "postType",
      select6.getCurrentPostType(),
      select6.getCurrentPostId(),
      {
        template: savedTemplate.slug
      }
    );
    registry.dispatch(import_notices17.store).createSuccessNotice(
      (0, import_i18n122.__)("Custom template created. You're in template mode now."),
      {
        type: "snackbar",
        actions: [
          {
            label: (0, import_i18n122.__)("Go back"),
            onClick: () => dispatch7.setRenderingMode(
              select6.getEditorSettings().defaultRenderingMode
            )
          }
        ]
      }
    );
    return savedTemplate;
  };
  var showBlockTypes = (blockNames) => ({ registry }) => {
    const existingBlockNames = registry.select(import_preferences10.store).get("core", "hiddenBlockTypes") ?? [];
    const newBlockNames = existingBlockNames.filter(
      (type) => !(Array.isArray(blockNames) ? blockNames : [blockNames]).includes(type)
    );
    registry.dispatch(import_preferences10.store).set("core", "hiddenBlockTypes", newBlockNames);
  };
  var hideBlockTypes = (blockNames) => ({ registry }) => {
    const existingBlockNames = registry.select(import_preferences10.store).get("core", "hiddenBlockTypes") ?? [];
    const mergedBlockNames = /* @__PURE__ */ new Set([
      ...existingBlockNames,
      ...Array.isArray(blockNames) ? blockNames : [blockNames]
    ]);
    registry.dispatch(import_preferences10.store).set("core", "hiddenBlockTypes", [...mergedBlockNames]);
  };
  var saveDirtyEntities = ({
    onSave,
    dirtyEntityRecords = [],
    entitiesToSkip = [],
    close,
    successNoticeContent
  } = {}) => ({ registry }) => {
    const PUBLISH_ON_SAVE_ENTITIES = [
      { kind: "postType", name: "wp_navigation" }
    ];
    const saveNoticeId = "site-editor-save-success";
    const homeUrl = registry.select(import_core_data53.store).getEntityRecord("root", "__unstableBase")?.home;
    registry.dispatch(import_notices17.store).removeNotice(saveNoticeId);
    const entitiesToSave = dirtyEntityRecords.filter(
      ({ kind, name: name2, key, property }) => {
        return !entitiesToSkip.some(
          (elt) => elt.kind === kind && elt.name === name2 && elt.key === key && elt.property === property
        );
      }
    );
    close?.(entitiesToSave);
    const siteItemsToSave = [];
    const pendingSavedRecords = [];
    entitiesToSave.forEach(({ kind, name: name2, key, property }) => {
      if ("root" === kind && "site" === name2) {
        siteItemsToSave.push(property);
      } else {
        if (PUBLISH_ON_SAVE_ENTITIES.some(
          (typeToPublish) => typeToPublish.kind === kind && typeToPublish.name === name2
        )) {
          registry.dispatch(import_core_data53.store).editEntityRecord(kind, name2, key, {
            status: "publish"
          });
        }
        pendingSavedRecords.push(
          registry.dispatch(import_core_data53.store).saveEditedEntityRecord(kind, name2, key)
        );
      }
    });
    if (siteItemsToSave.length) {
      pendingSavedRecords.push(
        registry.dispatch(import_core_data53.store).__experimentalSaveSpecifiedEntityEdits(
          "root",
          "site",
          void 0,
          siteItemsToSave
        )
      );
    }
    registry.dispatch(import_block_editor35.store).__unstableMarkLastChangeAsPersistent();
    Promise.all(pendingSavedRecords).then((values) => {
      return onSave ? onSave(values) : values;
    }).then((values) => {
      if (values.some((value) => typeof value === "undefined")) {
        registry.dispatch(import_notices17.store).createErrorNotice((0, import_i18n122.__)("Saving failed."));
      } else {
        registry.dispatch(import_notices17.store).createSuccessNotice(
          successNoticeContent || (0, import_i18n122.__)("Site updated."),
          {
            type: "snackbar",
            id: saveNoticeId,
            actions: [
              {
                label: (0, import_i18n122.__)("View site"),
                url: homeUrl,
                openInNewTab: true
              }
            ]
          }
        );
      }
    }).catch(
      (error) => registry.dispatch(import_notices17.store).createErrorNotice(
        `${(0, import_i18n122.__)("Saving failed.")} ${error}`
      )
    );
  };
  var revertTemplate2 = (template2, { allowUndo = true } = {}) => async ({ registry }) => {
    const noticeId = "edit-site-template-reverted";
    registry.dispatch(import_notices17.store).removeNotice(noticeId);
    if (!isTemplateRevertable(template2)) {
      registry.dispatch(import_notices17.store).createErrorNotice((0, import_i18n122.__)("This template is not revertable."), {
        type: "snackbar"
      });
      return;
    }
    try {
      const templateEntityConfig = registry.select(import_core_data53.store).getEntityConfig("postType", template2.type);
      if (!templateEntityConfig) {
        registry.dispatch(import_notices17.store).createErrorNotice(
          (0, import_i18n122.__)(
            "The editor has encountered an unexpected error. Please reload."
          ),
          { type: "snackbar" }
        );
        return;
      }
      const fileTemplatePath = (0, import_url11.addQueryArgs)(
        `${templateEntityConfig.baseURL}/${template2.id}`,
        { context: "edit", source: template2.origin }
      );
      const fileTemplate = await (0, import_api_fetch5.default)({ path: fileTemplatePath });
      if (!fileTemplate) {
        registry.dispatch(import_notices17.store).createErrorNotice(
          (0, import_i18n122.__)(
            "The editor has encountered an unexpected error. Please reload."
          ),
          { type: "snackbar" }
        );
        return;
      }
      const serializeBlocks = ({
        blocks: blocksForSerialization = []
      }) => (0, import_blocks20.__unstableSerializeAndClean)(blocksForSerialization);
      const edited = registry.select(import_core_data53.store).getEditedEntityRecord(
        "postType",
        template2.type,
        template2.id
      );
      registry.dispatch(import_core_data53.store).editEntityRecord(
        "postType",
        template2.type,
        template2.id,
        {
          content: serializeBlocks,
          // Required to make the `undo` behave correctly.
          blocks: edited.blocks,
          // Required to revert the blocks in the editor.
          source: "custom"
          // required to avoid turning the editor into a dirty state
        },
        {
          undoIgnore: true
          // Required to merge this edit with the last undo level.
        }
      );
      const blocks = (0, import_blocks20.parse)(fileTemplate?.content?.raw);
      registry.dispatch(import_core_data53.store).editEntityRecord("postType", template2.type, fileTemplate.id, {
        content: serializeBlocks,
        blocks,
        source: "theme"
      });
      if (allowUndo) {
        const undoRevert = () => {
          registry.dispatch(import_core_data53.store).editEntityRecord(
            "postType",
            template2.type,
            edited.id,
            {
              content: serializeBlocks,
              blocks: edited.blocks,
              source: "custom"
            }
          );
        };
        registry.dispatch(import_notices17.store).createSuccessNotice((0, import_i18n122.__)("Template reset."), {
          type: "snackbar",
          id: noticeId,
          actions: [
            {
              label: (0, import_i18n122.__)("Undo"),
              onClick: undoRevert
            }
          ]
        });
      }
    } catch (error) {
      const errorMessage = error.message && error.code !== "unknown_error" ? error.message : (0, import_i18n122.__)("Template revert failed. Please reload.");
      registry.dispatch(import_notices17.store).createErrorNotice(errorMessage, { type: "snackbar" });
    }
  };
  var removeTemplates = (items) => async ({ registry }) => {
    const isResetting = items.every((item) => item?.has_theme_file);
    const promiseResult = await Promise.allSettled(
      items.map((item) => {
        return registry.dispatch(import_core_data53.store).deleteEntityRecord(
          "postType",
          item.type,
          item.id,
          { force: true },
          { throwOnError: true }
        );
      })
    );
    if (promiseResult.every(({ status }) => status === "fulfilled")) {
      let successMessage;
      if (items.length === 1) {
        let title;
        if (typeof items[0].title === "string") {
          title = items[0].title;
        } else if (typeof items[0].title?.rendered === "string") {
          title = items[0].title?.rendered;
        } else if (typeof items[0].title?.raw === "string") {
          title = items[0].title?.raw;
        }
        successMessage = isResetting ? (0, import_i18n122.sprintf)(
          /* translators: %s: The template/part's name. */
          (0, import_i18n122.__)('"%s" reset.'),
          (0, import_html_entities9.decodeEntities)(title)
        ) : (0, import_i18n122.sprintf)(
          /* translators: %s: The template/part's name. */
          (0, import_i18n122._x)('"%s" deleted.', "template part"),
          (0, import_html_entities9.decodeEntities)(title)
        );
      } else {
        successMessage = isResetting ? (0, import_i18n122.__)("Items reset.") : (0, import_i18n122.__)("Items deleted.");
      }
      registry.dispatch(import_notices17.store).createSuccessNotice(successMessage, {
        type: "snackbar",
        id: "editor-template-deleted-success"
      });
    } else {
      let errorMessage;
      if (promiseResult.length === 1) {
        if (promiseResult[0].reason?.message) {
          errorMessage = promiseResult[0].reason.message;
        } else {
          errorMessage = isResetting ? (0, import_i18n122.__)("An error occurred while reverting the item.") : (0, import_i18n122.__)("An error occurred while deleting the item.");
        }
      } else {
        const errorMessages = /* @__PURE__ */ new Set();
        const failedPromises = promiseResult.filter(
          ({ status }) => status === "rejected"
        );
        for (const failedPromise of failedPromises) {
          if (failedPromise.reason?.message) {
            errorMessages.add(failedPromise.reason.message);
          }
        }
        if (errorMessages.size === 0) {
          errorMessage = (0, import_i18n122.__)(
            "An error occurred while deleting the items."
          );
        } else if (errorMessages.size === 1) {
          errorMessage = isResetting ? (0, import_i18n122.sprintf)(
            /* translators: %s: an error message */
            (0, import_i18n122.__)(
              "An error occurred while reverting the items: %s"
            ),
            [...errorMessages][0]
          ) : (0, import_i18n122.sprintf)(
            /* translators: %s: an error message */
            (0, import_i18n122.__)(
              "An error occurred while deleting the items: %s"
            ),
            [...errorMessages][0]
          );
        } else {
          errorMessage = isResetting ? (0, import_i18n122.sprintf)(
            /* translators: %s: a list of comma separated error messages */
            (0, import_i18n122.__)(
              "Some errors occurred while reverting the items: %s"
            ),
            [...errorMessages].join(",")
          ) : (0, import_i18n122.sprintf)(
            /* translators: %s: a list of comma separated error messages */
            (0, import_i18n122.__)(
              "Some errors occurred while deleting the items: %s"
            ),
            [...errorMessages].join(",")
          );
        }
      }
      registry.dispatch(import_notices17.store).createErrorNotice(errorMessage, { type: "snackbar" });
    }
  };
  var setDefaultRenderingMode = (mode) => ({ select: select6, registry }) => {
    const postType2 = select6.getCurrentPostType();
    const theme = registry.select(import_core_data53.store).getCurrentTheme()?.stylesheet;
    const renderingModes = registry.select(import_preferences10.store).get("core", "renderingModes")?.[theme] ?? {};
    if (renderingModes[postType2] === mode) {
      return;
    }
    const newModes = {
      [theme]: {
        ...renderingModes,
        [postType2]: mode
      }
    };
    registry.dispatch(import_preferences10.store).set("core", "renderingModes", newModes);
  };
  function setStylesPath(path) {
    return {
      type: "SET_STYLES_PATH",
      path
    };
  }
  function setShowStylebook(show) {
    return {
      type: "SET_SHOW_STYLEBOOK",
      show
    };
  }
  function resetStylesNavigation() {
    return {
      type: "RESET_STYLES_NAVIGATION"
    };
  }
  function setCanvasMinHeight(minHeight) {
    return {
      type: "SET_CANVAS_MIN_HEIGHT",
      minHeight
    };
  }
  function setCurrentRevisionId(revisionId2) {
    return {
      type: "SET_CURRENT_REVISION_ID",
      revisionId: revisionId2
    };
  }
  var setRevisionPage = (page) => async ({ dispatch: dispatch7, select: select6, registry }) => {
    const postType2 = select6.getCurrentPostType();
    const postId2 = select6.getCurrentPostId();
    const entityConfig = registry.select(import_core_data53.store).getEntityConfig("postType", postType2);
    const revisionKey = entityConfig?.revisionKey || "id";
    const revisions = await registry.resolveSelect(import_core_data53.store).getRevisions(
      "postType",
      postType2,
      postId2,
      buildRevisionsPageQuery(revisionKey, page)
    );
    registry.batch(() => {
      dispatch7({ type: "SET_REVISION_PAGE", page });
      if (revisions?.length) {
        dispatch7.setCurrentRevisionId(revisions[0][revisionKey]);
      }
    });
  };
  function setShowRevisionDiff(showDiff) {
    return {
      type: "SET_SHOW_REVISION_DIFF",
      showDiff
    };
  }
  var restoreRevision = (revisionId2) => async ({ select: select6, dispatch: dispatch7, registry }) => {
    const postType2 = select6.getCurrentPostType();
    const postId2 = select6.getCurrentPostId();
    const entityConfig = registry.select(import_core_data53.store).getEntityConfig("postType", postType2);
    const revisionKey = entityConfig?.revisionKey || "id";
    const revision = await registry.resolveSelect(import_core_data53.store).getRevision("postType", postType2, postId2, revisionId2, {
      context: "edit",
      _fields: [
        .../* @__PURE__ */ new Set([
          "id",
          "date",
          "modified",
          "author",
          "meta",
          "title.raw",
          "excerpt.raw",
          "content.raw",
          revisionKey
        ])
      ].join()
    });
    if (!revision) {
      return;
    }
    const edits = {
      blocks: void 0,
      content: revision.content.raw
    };
    if (revision.title?.raw !== void 0) {
      edits.title = revision.title.raw;
    }
    if (revision.excerpt?.raw !== void 0) {
      edits.excerpt = revision.excerpt.raw;
    }
    if (revision.meta !== void 0) {
      edits.meta = revision.meta;
    }
    dispatch7.editPost(edits);
    dispatch7.setCurrentRevisionId(null);
    await dispatch7.savePost();
    registry.dispatch(import_notices17.store).createSuccessNotice(
      (0, import_i18n122.sprintf)(
        /* translators: %s: Date and time of the revision. */
        (0, import_i18n122.__)("Restored to revision from %s."),
        (0, import_date6.dateI18n)((0, import_date6.getSettings)().formats.datetime, revision.date)
      ),
      {
        type: "snackbar",
        id: "editor-revision-restored"
      }
    );
  };
  function selectNote(noteId, options = { focus: false }) {
    return {
      type: "SELECT_NOTE",
      noteId,
      options
    };
  }

  // packages/editor/build-module/store/index.mjs
  var storeConfig = {
    reducer: reducer_default2,
    selectors: selectors_exports,
    actions: actions_exports
  };
  var store = (0, import_data72.createReduxStore)(STORE_NAME, {
    ...storeConfig
  });
  (0, import_data72.register)(store);
  unlock(store).registerPrivateActions(private_actions_exports);
  unlock(store).registerPrivateSelectors(private_selectors_exports);

  // packages/editor/build-module/hooks/custom-sources-backwards-compatibility.mjs
  var import_jsx_runtime204 = __toESM(require_jsx_runtime(), 1);
  var createWithMetaAttributeSource = (metaAttributes) => (0, import_compose16.createHigherOrderComponent)(
    (BlockEdit2) => ({ attributes, setAttributes, ...props }) => {
      const postType2 = (0, import_data73.useSelect)(
        (select6) => select6(store).getCurrentPostType(),
        []
      );
      const [meta2, setMeta] = (0, import_core_data54.useEntityProp)(
        "postType",
        postType2,
        "meta"
      );
      const mergedAttributes = (0, import_element82.useMemo)(
        () => ({
          ...attributes,
          ...Object.fromEntries(
            Object.entries(metaAttributes).map(
              ([attributeKey, metaKey]) => [
                attributeKey,
                meta2[metaKey]
              ]
            )
          )
        }),
        [attributes, meta2]
      );
      return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
        BlockEdit2,
        {
          attributes: mergedAttributes,
          setAttributes: (nextAttributes) => {
            const nextMeta = Object.fromEntries(
              Object.entries(nextAttributes ?? {}).filter(
                // Filter to intersection of keys between the updated
                // attributes and those with an associated meta key.
                ([key]) => key in metaAttributes
              ).map(([attributeKey, value]) => [
                // Rename the keys to the expected meta key name.
                metaAttributes[attributeKey],
                value
              ])
            );
            if (Object.entries(nextMeta).length) {
              setMeta(nextMeta);
            }
            setAttributes(nextAttributes);
          },
          ...props
        }
      );
    },
    "withMetaAttributeSource"
  );
  function shimAttributeSource(settings) {
    const metaAttributes = Object.fromEntries(
      Object.entries(settings.attributes ?? {}).filter(([, { source }]) => source === "meta").map(([attributeKey, { meta: meta2 }]) => [attributeKey, meta2])
    );
    if (Object.entries(metaAttributes).length) {
      settings.edit = createWithMetaAttributeSource(metaAttributes)(
        settings.edit
      );
    }
    return settings;
  }
  (0, import_hooks39.addFilter)(
    "blocks.registerBlockType",
    "core/editor/custom-sources-backwards-compatibility/shim-attribute-source",
    shimAttributeSource
  );

  // packages/editor/build-module/hooks/default-autocompleters.mjs
  var import_hooks49 = __toESM(require_hooks(), 1);

  // packages/editor/build-module/components/autocompleters/user.mjs
  var import_element83 = __toESM(require_element(), 1);
  var import_data74 = __toESM(require_data(), 1);
  var import_core_data55 = __toESM(require_core_data(), 1);
  var import_jsx_runtime205 = __toESM(require_jsx_runtime(), 1);
  function getUserLabel(user) {
    const avatar = user.avatar_urls && user.avatar_urls[24] ? /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
      "img",
      {
        className: "editor-autocompleters__user-avatar",
        alt: "",
        src: user.avatar_urls[24]
      }
    ) : /* @__PURE__ */ (0, import_jsx_runtime205.jsx)("span", { className: "editor-autocompleters__no-avatar" });
    return /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)(import_jsx_runtime205.Fragment, { children: [
      avatar,
      /* @__PURE__ */ (0, import_jsx_runtime205.jsx)("span", { className: "editor-autocompleters__user-name", children: user.name }),
      /* @__PURE__ */ (0, import_jsx_runtime205.jsx)("span", { className: "editor-autocompleters__user-slug", children: user.slug })
    ] });
  }
  var user_default = {
    name: "users",
    className: "editor-autocompleters__user",
    triggerPrefix: "@",
    useItems(filterValue) {
      const users = (0, import_data74.useSelect)(
        (select6) => {
          const { getUsers } = select6(import_core_data55.store);
          return getUsers({
            context: "view",
            search: encodeURIComponent(filterValue)
          });
        },
        [filterValue]
      );
      const options = (0, import_element83.useMemo)(
        () => users ? users.map((user) => ({
          key: `user-${user.slug}`,
          value: user,
          label: getUserLabel(user)
        })) : [],
        [users]
      );
      return [options];
    },
    getOptionCompletion(user) {
      return `@${user.slug}`;
    }
  };

  // packages/editor/build-module/components/autosave-monitor/index.mjs
  var import_element84 = __toESM(require_element(), 1);
  var import_compose17 = __toESM(require_compose(), 1);
  var import_data75 = __toESM(require_data(), 1);
  var import_core_data56 = __toESM(require_core_data(), 1);
  var AutosaveMonitor = class extends import_element84.Component {
    constructor(props) {
      super(props);
      this.needsAutosave = !!(props.isDirty && props.isAutosaveable);
    }
    componentDidMount() {
      if (!this.props.disableIntervalChecks) {
        this.setAutosaveTimer();
      }
    }
    componentDidUpdate(prevProps) {
      if (this.props.disableIntervalChecks) {
        if (this.props.editsReference !== prevProps.editsReference) {
          this.props.autosave();
        }
        return;
      }
      if (this.props.interval !== prevProps.interval) {
        clearTimeout(this.timerId);
        this.setAutosaveTimer();
      }
      if (!this.props.isDirty) {
        this.needsAutosave = false;
        return;
      }
      if (this.props.isAutosaving && !prevProps.isAutosaving) {
        this.needsAutosave = false;
        return;
      }
      if (this.props.editsReference !== prevProps.editsReference) {
        this.needsAutosave = true;
      }
    }
    componentWillUnmount() {
      clearTimeout(this.timerId);
    }
    setAutosaveTimer(timeout = this.props.interval * 1e3) {
      this.timerId = setTimeout(() => {
        this.autosaveTimerHandler();
      }, timeout);
    }
    autosaveTimerHandler() {
      if (!this.props.isAutosaveable) {
        this.setAutosaveTimer(1e3);
        return;
      }
      if (this.needsAutosave) {
        this.needsAutosave = false;
        this.props.autosave();
      }
      this.setAutosaveTimer();
    }
    render() {
      return null;
    }
  };
  var autosave_monitor_default = (0, import_compose17.compose)([
    (0, import_data75.withSelect)((select6, ownProps) => {
      const { getReferenceByDistinctEdits } = select6(import_core_data56.store);
      const {
        isEditedPostDirty: isEditedPostDirty2,
        isEditedPostAutosaveable: isEditedPostAutosaveable2,
        isAutosavingPost: isAutosavingPost2,
        getEditorSettings: getEditorSettings2
      } = select6(store);
      const { interval = getEditorSettings2().autosaveInterval } = ownProps;
      return {
        editsReference: getReferenceByDistinctEdits(),
        isDirty: isEditedPostDirty2(),
        isAutosaveable: isEditedPostAutosaveable2(),
        isAutosaving: isAutosavingPost2(),
        interval
      };
    }),
    (0, import_data75.withDispatch)((dispatch7, ownProps) => ({
      autosave() {
        const { autosave: autosave2 = dispatch7(store).autosave } = ownProps;
        autosave2();
      }
    }))
  ])(AutosaveMonitor);

  // packages/editor/build-module/components/document-bar/index.mjs
  var import_i18n129 = __toESM(require_i18n(), 1);
  var import_data83 = __toESM(require_data(), 1);
  var import_components104 = __toESM(require_components(), 1);
  var import_block_editor40 = __toESM(require_block_editor(), 1);
  var import_keycodes7 = __toESM(require_keycodes(), 1);
  var import_core_data60 = __toESM(require_core_data(), 1);
  var import_commands3 = __toESM(require_commands(), 1);
  var import_element91 = __toESM(require_element(), 1);
  var import_compose19 = __toESM(require_compose(), 1);
  var import_html_entities11 = __toESM(require_html_entities(), 1);
  var import_dom2 = __toESM(require_dom(), 1);

  // packages/editor/build-module/utils/pageTypeBadge.mjs
  var import_i18n123 = __toESM(require_i18n(), 1);
  var import_data76 = __toESM(require_data(), 1);
  var import_core_data57 = __toESM(require_core_data(), 1);
  function usePageTypeBadge(postId2) {
    const { isFrontPage, isPostsPage } = (0, import_data76.useSelect)((select6) => {
      const { canUser, getEditedEntityRecord } = select6(import_core_data57.store);
      const siteSettings = canUser("read", {
        kind: "root",
        name: "site"
      }) ? getEditedEntityRecord("root", "site") : void 0;
      const _postId = parseInt(postId2, 10);
      return {
        isFrontPage: siteSettings?.page_on_front === _postId,
        isPostsPage: siteSettings?.page_for_posts === _postId
      };
    });
    if (isFrontPage) {
      return (0, import_i18n123.__)("Homepage");
    } else if (isPostsPage) {
      return (0, import_i18n123.__)("Posts Page");
    }
    return false;
  }

  // packages/editor/build-module/components/styles-canvas/index.mjs
  var import_components103 = __toESM(require_components(), 1);
  var import_keycodes6 = __toESM(require_keycodes(), 1);
  var import_i18n128 = __toESM(require_i18n(), 1);
  var import_data81 = __toESM(require_data(), 1);
  var import_compose18 = __toESM(require_compose(), 1);
  var import_preferences11 = __toESM(require_preferences(), 1);

  // packages/editor/build-module/components/styles-canvas/style-book.mjs
  var import_element88 = __toESM(require_element(), 1);

  // packages/editor/build-module/components/style-book/index.mjs
  var import_components99 = __toESM(require_components(), 1);
  var import_i18n126 = __toESM(require_i18n(), 1);
  var import_block_editor37 = __toESM(require_block_editor(), 1);
  var import_data79 = __toESM(require_data(), 1);
  var import_element87 = __toESM(require_element(), 1);
  var import_keycodes4 = __toESM(require_keycodes(), 1);
  var import_media_utils5 = __toESM(require_media_utils(), 1);
  var import_core_data58 = __toESM(require_core_data(), 1);

  // packages/editor/build-module/components/style-book/constants.mjs
  var import_i18n124 = __toESM(require_i18n(), 1);
  var STYLE_BOOK_COLOR_GROUPS = [
    {
      slug: "theme-colors",
      title: (0, import_i18n124.__)("Theme Colors"),
      origin: "theme",
      type: "colors"
    },
    {
      slug: "theme-gradients",
      title: (0, import_i18n124.__)("Theme Gradients"),
      origin: "theme",
      type: "gradients"
    },
    {
      slug: "custom-colors",
      title: (0, import_i18n124.__)("Custom Colors"),
      origin: "custom",
      type: "colors"
    },
    {
      slug: "custom-gradients",
      title: (0, import_i18n124.__)("Custom Gradients"),
      origin: "custom",
      // User.
      type: "gradients"
    },
    {
      slug: "duotones",
      title: (0, import_i18n124.__)("Duotones"),
      origin: "theme",
      type: "duotones"
    },
    {
      slug: "default-colors",
      title: (0, import_i18n124.__)("Default Colors"),
      origin: "default",
      type: "colors"
    },
    {
      slug: "default-gradients",
      title: (0, import_i18n124.__)("Default Gradients"),
      origin: "default",
      type: "gradients"
    }
  ];
  var STYLE_BOOK_THEME_SUBCATEGORIES = [
    {
      slug: "site-identity",
      title: (0, import_i18n124.__)("Site Identity"),
      blocks: ["core/site-logo", "core/site-title", "core/site-tagline"]
    },
    {
      slug: "design",
      title: (0, import_i18n124.__)("Design"),
      blocks: ["core/navigation", "core/avatar", "core/post-time-to-read"],
      exclude: ["core/home-link", "core/navigation-link"]
    },
    {
      slug: "posts",
      title: (0, import_i18n124.__)("Posts"),
      blocks: [
        "core/post-title",
        "core/post-excerpt",
        "core/post-author",
        "core/post-author-name",
        "core/post-author-biography",
        "core/post-date",
        "core/post-terms",
        "core/term-description",
        "core/query-title",
        "core/query-no-results",
        "core/query-pagination",
        "core/query-numbers"
      ]
    },
    {
      slug: "comments",
      title: (0, import_i18n124.__)("Comments"),
      blocks: [
        "core/comments-title",
        "core/comments-pagination",
        "core/comments-pagination-numbers",
        "core/comments",
        "core/comments-author-name",
        "core/comment-content",
        "core/comment-date",
        "core/comment-edit-link",
        "core/comment-reply-link",
        "core/comment-template",
        "core/post-comments-count",
        "core/post-comments-link"
      ]
    }
  ];
  var STYLE_BOOK_CATEGORIES = [
    {
      slug: "overview",
      title: (0, import_i18n124.__)("Overview"),
      blocks: []
    },
    {
      slug: "text",
      title: (0, import_i18n124.__)("Text"),
      blocks: [
        "core/post-content",
        "core/home-link",
        "core/navigation-link"
      ]
    },
    {
      slug: "colors",
      title: (0, import_i18n124.__)("Colors"),
      blocks: []
    },
    {
      slug: "theme",
      title: (0, import_i18n124.__)("Theme"),
      subcategories: STYLE_BOOK_THEME_SUBCATEGORIES
    },
    {
      slug: "media",
      title: (0, import_i18n124.__)("Media"),
      blocks: ["core/post-featured-image"]
    },
    {
      slug: "widgets",
      title: (0, import_i18n124.__)("Widgets"),
      blocks: []
    },
    {
      slug: "embed",
      title: (0, import_i18n124.__)("Embeds"),
      include: []
    }
  ];
  var STYLE_BOOK_ALL_BLOCKS_SUBCATEGORIES = [
    ...STYLE_BOOK_THEME_SUBCATEGORIES,
    {
      slug: "media",
      title: (0, import_i18n124.__)("Media"),
      blocks: ["core/post-featured-image"]
    },
    {
      slug: "widgets",
      title: (0, import_i18n124.__)("Widgets"),
      blocks: []
    },
    {
      slug: "embed",
      title: (0, import_i18n124.__)("Embeds"),
      include: []
    }
  ];
  var STYLE_BOOK_PREVIEW_CATEGORIES = [
    {
      slug: "overview",
      title: (0, import_i18n124.__)("Overview"),
      blocks: []
    },
    {
      slug: "text",
      title: (0, import_i18n124.__)("Text"),
      blocks: [
        "core/post-content",
        "core/home-link",
        "core/navigation-link"
      ]
    },
    {
      slug: "colors",
      title: (0, import_i18n124.__)("Colors"),
      blocks: []
    },
    {
      slug: "blocks",
      title: (0, import_i18n124.__)("All Blocks"),
      blocks: [],
      subcategories: STYLE_BOOK_ALL_BLOCKS_SUBCATEGORIES
    }
  ];
  var ROOT_CONTAINER = `
	.is-root-container {
		display: flow-root;
	}
`;
  var STYLE_BOOK_IFRAME_STYLES = `
	body {
		position: relative;
		padding: 32px !important;
	}

	${ROOT_CONTAINER}

	.editor-style-book__examples {
		max-width: 1200px;
		margin: 0 auto;
	}

	.editor-style-book__example {
	    max-width: 900px;
		border-radius: 2px;
		cursor: pointer;
		display: flex;
		flex-direction: column;
		gap: 40px;
		padding: 16px;
		width: 100%;
		box-sizing: border-box;
		scroll-margin-top: 32px;
		scroll-margin-bottom: 32px;
		margin: 0 auto 40px auto;
	}

	.editor-style-book__example.is-selected {
		box-shadow: 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
	}

	.editor-style-book__example.is-disabled-example {
		pointer-events: none;
	}

	.editor-style-book__example:focus:not(:disabled) {
		box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
		outline: 3px solid transparent;
	}

	.editor-style-book__duotone-example > div:first-child {
		display: flex;
		aspect-ratio: 16 / 9;
		grid-row: span 1;
		grid-column: span 2;
	}
	.editor-style-book__duotone-example img {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}
	.editor-style-book__duotone-example > div:not(:first-child) {
		height: 20px;
		border: 1px solid color-mix( in srgb, currentColor 10%, transparent );
	}

	.editor-style-book__color-example {
		border: 1px solid color-mix( in srgb, currentColor 10%, transparent );
	}

	.editor-style-book__subcategory-title,
	.editor-style-book__example-title {
		font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
		font-size: 13px;
		font-weight: normal;
		line-height: normal;
		margin: 0;
		text-align: left;
		padding-top: 8px;
		border-top: 1px solid color-mix( in srgb, currentColor 10%, transparent );
		color: color-mix( in srgb, currentColor 60%, transparent );
	}

	.editor-style-book__subcategory-title {
		font-size: 16px;
		margin-bottom: 40px;
    	padding-bottom: 8px;
	}

	.editor-style-book__example-preview {
		width: 100%;
	}

	.editor-style-book__example-preview .block-editor-block-list__insertion-point,
	.editor-style-book__example-preview .block-list-appender {
		display: none;
	}
	:where(.is-root-container > .wp-block:first-child) {
		margin-top: 0;
	}
	:where(.is-root-container > .wp-block:last-child) {
		margin-bottom: 0;
	}
`;

  // packages/editor/build-module/components/style-book/categories.mjs
  var import_blocks21 = __toESM(require_blocks(), 1);
  function getExamplesByCategory(categoryDefinition, examples) {
    if (!categoryDefinition?.slug || !examples?.length) {
      return;
    }
    const categories = categoryDefinition?.subcategories ?? [];
    if (categories.length) {
      return categories.reduce(
        (acc, subcategoryDefinition) => {
          const subcategoryExamples = getExamplesByCategory(
            subcategoryDefinition,
            examples
          );
          if (subcategoryExamples) {
            if (!acc.subcategories) {
              acc.subcategories = [];
            }
            acc.subcategories = [
              ...acc.subcategories,
              subcategoryExamples
            ];
          }
          return acc;
        },
        {
          title: categoryDefinition.title,
          slug: categoryDefinition.slug
        }
      );
    }
    const blocksToInclude = categoryDefinition?.blocks || [];
    const blocksToExclude = categoryDefinition?.exclude || [];
    const categoryExamples = examples.filter((example) => {
      return !blocksToExclude.includes(example.name) && (example.category === categoryDefinition.slug || blocksToInclude.includes(example.name));
    });
    if (!categoryExamples.length) {
      return;
    }
    return {
      title: categoryDefinition.title,
      slug: categoryDefinition.slug,
      examples: categoryExamples
    };
  }
  function getTopLevelStyleBookCategories() {
    const reservedCategories = [
      ...STYLE_BOOK_THEME_SUBCATEGORIES,
      ...STYLE_BOOK_CATEGORIES
    ].map(({ slug }) => slug);
    const extraCategories = (0, import_blocks21.getCategories)();
    const extraCategoriesFiltered = extraCategories.filter(
      ({ slug }) => !reservedCategories.includes(slug)
    );
    return [...STYLE_BOOK_CATEGORIES, ...extraCategoriesFiltered];
  }

  // packages/editor/build-module/components/style-book/examples.mjs
  var import_i18n125 = __toESM(require_i18n(), 1);
  var import_blocks22 = __toESM(require_blocks(), 1);

  // packages/editor/build-module/components/style-book/color-examples.mjs
  var import_components97 = __toESM(require_components(), 1);
  var import_block_editor36 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime206 = __toESM(require_jsx_runtime(), 1);
  var ColorExamples = ({
    colors: colors2,
    type,
    templateColumns = "1fr 1fr",
    itemHeight = "52px"
  }) => {
    if (!colors2) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(import_components97.__experimentalGrid, { templateColumns, rowGap: 8, columnGap: 16, children: colors2.map((color) => {
      const className = type === "gradients" ? (0, import_block_editor36.__experimentalGetGradientClass)(color.slug) : (0, import_block_editor36.getColorClassName)("background-color", color.slug);
      const classes = clsx_default(
        "editor-style-book__color-example",
        className
      );
      return /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
        "div",
        {
          className: classes,
          style: { height: itemHeight }
        },
        color.slug
      );
    }) });
  };
  var color_examples_default = ColorExamples;

  // packages/editor/build-module/components/style-book/duotone-examples.mjs
  var import_components98 = __toESM(require_components(), 1);
  var import_jsx_runtime207 = __toESM(require_jsx_runtime(), 1);
  var DuotoneExamples = ({ duotones }) => {
    if (!duotones) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(import_components98.__experimentalGrid, { columns: 2, rowGap: 16, columnGap: 16, children: duotones.map((duotone) => {
      return /* @__PURE__ */ (0, import_jsx_runtime207.jsxs)(
        import_components98.__experimentalGrid,
        {
          className: "editor-style-book__duotone-example",
          columns: 2,
          rowGap: 8,
          columnGap: 8,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
              "img",
              {
                alt: `Duotone example: ${duotone.slug}`,
                src: "https://s.w.org/images/core/5.3/MtBlanc1.jpg",
                style: {
                  filter: `url(#wp-duotone-${duotone.slug})`
                }
              }
            ) }),
            duotone.colors.map((color) => {
              return /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
                "div",
                {
                  className: "editor-style-book__color-example",
                  style: { backgroundColor: color }
                },
                color
              );
            })
          ]
        },
        duotone.slug
      );
    }) });
  };
  var duotone_examples_default = DuotoneExamples;

  // packages/editor/build-module/components/style-book/examples.mjs
  var import_jsx_runtime208 = __toESM(require_jsx_runtime(), 1);
  function getColorExamples(colors2) {
    if (!colors2) {
      return [];
    }
    const examples = [];
    STYLE_BOOK_COLOR_GROUPS.forEach((group) => {
      const palette = colors2[group.type];
      const paletteFiltered = Array.isArray(palette) ? palette.find(
        (origin) => origin.slug === group.origin
      ) : void 0;
      if (paletteFiltered?.[group.type]) {
        const example = {
          name: group.slug,
          title: group.title,
          category: "colors"
        };
        if (group.type === "duotones") {
          example.content = /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
            duotone_examples_default,
            {
              duotones: paletteFiltered[group.type]
            }
          );
          examples.push(example);
        } else {
          example.content = /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
            color_examples_default,
            {
              colors: paletteFiltered[group.type],
              type: group.type
            }
          );
          examples.push(example);
        }
      }
    });
    return examples;
  }
  function getOverviewBlockExamples(colors2) {
    const examples = [];
    const themePalette = Array.isArray(colors2?.colors) ? colors2.colors.find(
      (origin) => origin.slug === "theme"
    ) : void 0;
    if (themePalette) {
      const themeColorexample = {
        name: "theme-colors",
        title: (0, import_i18n125.__)("Colors"),
        category: "overview",
        content: /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
          color_examples_default,
          {
            colors: themePalette.colors,
            type: "colors",
            templateColumns: "repeat(auto-fill, minmax( 200px, 1fr ))",
            itemHeight: "32px"
          }
        )
      };
      examples.push(themeColorexample);
    }
    const typographyBlockExamples = [];
    if ((0, import_blocks22.getBlockType)("core/heading")) {
      const headingBlock = (0, import_blocks22.createBlock)("core/heading", {
        // translators: Typography example. Your local alphabet, numbers and some common special characters.
        content: (0, import_i18n125.__)(
          `AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789X{(\u2026)},.-<>?!*&:/A@HELFO\u2122\xA9`
        ),
        level: 1
      });
      typographyBlockExamples.push(headingBlock);
    }
    if ((0, import_blocks22.getBlockType)("core/paragraph")) {
      const firstParagraphBlock = (0, import_blocks22.createBlock)("core/paragraph", {
        content: (0, import_i18n125.__)(
          `A paragraph in a website refers to a distinct block of text that is used to present and organize information. It is a fundamental unit of content in web design and is typically composed of a group of related sentences or thoughts focused on a particular topic or idea. Paragraphs play a crucial role in improving the readability and user experience of a website. They break down the text into smaller, manageable chunks, allowing readers to scan the content more easily.`
        )
      });
      const secondParagraphBlock = (0, import_blocks22.createBlock)("core/paragraph", {
        content: (0, import_i18n125.__)(
          `Additionally, paragraphs help structure the flow of information and provide logical breaks between different concepts or pieces of information. In terms of formatting, paragraphs in websites are commonly denoted by a vertical gap or indentation between each block of text. This visual separation helps visually distinguish one paragraph from another, creating a clear and organized layout that guides the reader through the content smoothly.`
        )
      });
      if ((0, import_blocks22.getBlockType)("core/group")) {
        const groupBlock = (0, import_blocks22.createBlock)(
          "core/group",
          {
            layout: {
              type: "grid",
              columnCount: 2,
              minimumColumnWidth: "12rem"
            },
            style: {
              spacing: {
                blockGap: "1.5rem"
              }
            }
          },
          [firstParagraphBlock, secondParagraphBlock]
        );
        typographyBlockExamples.push(groupBlock);
      } else {
        typographyBlockExamples.push(firstParagraphBlock);
      }
    }
    if (!!typographyBlockExamples.length) {
      examples.push({
        name: "typography",
        title: (0, import_i18n125.__)("Typography"),
        category: "overview",
        blocks: typographyBlockExamples
      });
    }
    const otherBlockExamples = [
      "core/image",
      "core/separator",
      "core/buttons",
      "core/pullquote",
      "core/search"
    ];
    otherBlockExamples.forEach((blockName) => {
      const blockType = (0, import_blocks22.getBlockType)(blockName);
      if (blockType && blockType.example) {
        const blockExample = {
          name: blockName,
          title: blockType.title,
          category: "overview",
          /*
           * CSS generated from style attributes will take precedence over global styles CSS,
           * so remove the style attribute from the example to ensure the example
           * demonstrates changes to global styles.
           */
          blocks: (0, import_blocks22.getBlockFromExample)(blockName, {
            ...blockType.example,
            attributes: {
              ...blockType.example.attributes,
              style: void 0
            }
          })
        };
        examples.push(blockExample);
      }
    });
    return examples;
  }
  function getExamples(colors2) {
    const nonHeadingBlockExamples = (0, import_blocks22.getBlockTypes)().filter((blockType) => {
      const { name: name2, example, supports } = blockType;
      return name2 !== "core/heading" && !!example && supports?.inserter !== false;
    }).map((blockType) => ({
      name: blockType.name,
      title: blockType.title,
      category: blockType.category,
      /*
       * CSS generated from style attributes will take precedence over global styles CSS,
       * so remove the style attribute from the example to ensure the example
       * demonstrates changes to global styles.
       */
      blocks: (0, import_blocks22.getBlockFromExample)(blockType.name, {
        ...blockType.example,
        attributes: {
          ...blockType.example.attributes,
          style: void 0
        }
      })
    }));
    const isHeadingBlockRegistered = !!(0, import_blocks22.getBlockType)("core/heading");
    if (!isHeadingBlockRegistered) {
      return nonHeadingBlockExamples;
    }
    const headingsExample = {
      name: "core/heading",
      title: (0, import_i18n125.__)("Headings"),
      category: "text",
      blocks: [1, 2, 3, 4, 5, 6].map((level) => {
        return (0, import_blocks22.createBlock)("core/heading", {
          content: (0, import_i18n125.sprintf)(
            // translators: %d: heading level e.g: "1", "2", "3"
            (0, import_i18n125.__)("Heading %d"),
            level
          ),
          level
        });
      })
    };
    const colorExamples = getColorExamples(colors2);
    const overviewBlockExamples = getOverviewBlockExamples(colors2);
    return [
      headingsExample,
      ...colorExamples,
      ...nonHeadingBlockExamples,
      ...overviewBlockExamples
    ];
  }

  // packages/editor/build-module/components/global-styles-renderer/index.mjs
  var import_element86 = __toESM(require_element(), 1);
  var import_data78 = __toESM(require_data(), 1);

  // packages/editor/build-module/hooks/use-global-styles-output.mjs
  var import_blocks23 = __toESM(require_blocks(), 1);
  var import_data77 = __toESM(require_data(), 1);
  var import_element85 = __toESM(require_element(), 1);
  function useGlobalStylesOutputWithConfig(mergedConfig = {}, disableRootPadding = false) {
    const blockGap = useSetting2("spacing.blockGap");
    const hasBlockGapSupport = blockGap !== null;
    const hasFallbackGapSupport = !hasBlockGapSupport;
    const { disableLayoutStyles, getBlockStyles } = (0, import_data77.useSelect)((select6) => {
      const { getEditorSettings: getEditorSettings2 } = select6(store);
      const { getBlockStyles: getBlockStylesSelector } = select6(import_blocks23.store);
      const settings = getEditorSettings2();
      return {
        disableLayoutStyles: !!settings?.disableLayoutStyles,
        getBlockStyles: getBlockStylesSelector
      };
    }, []);
    return (0, import_element85.useMemo)(() => {
      if (!mergedConfig?.styles || !mergedConfig?.settings) {
        return [[], {}];
      }
      const blockTypes = (0, import_blocks23.getBlockTypes)();
      return generateGlobalStyles(mergedConfig, blockTypes, {
        hasBlockGapSupport,
        hasFallbackGapSupport,
        disableLayoutStyles,
        disableRootPadding,
        getBlockStyles
      });
    }, [
      hasBlockGapSupport,
      hasFallbackGapSupport,
      mergedConfig,
      disableLayoutStyles,
      disableRootPadding,
      getBlockStyles
    ]);
  }
  function useGlobalStylesOutput(disableRootPadding = false) {
    const { merged: mergedConfig } = useGlobalStyles();
    return useGlobalStylesOutputWithConfig(mergedConfig, disableRootPadding);
  }

  // packages/editor/build-module/components/global-styles-renderer/index.mjs
  function useGlobalStylesRenderer(disableRootPadding) {
    const [styles, settings] = useGlobalStylesOutput(disableRootPadding);
    const { getEditorSettings: getEditorSettings2 } = (0, import_data78.useSelect)(store);
    const { updateEditorSettings: updateEditorSettings2 } = (0, import_data78.useDispatch)(store);
    (0, import_element86.useEffect)(() => {
      if (!styles || !settings) {
        return;
      }
      const currentStoreSettings = getEditorSettings2();
      const nonGlobalStyles = Object.values(
        currentStoreSettings.styles ?? []
      ).filter((style) => !style.isGlobalStyles);
      updateEditorSettings2({
        ...currentStoreSettings,
        styles: [...nonGlobalStyles, ...styles],
        __experimentalFeatures: settings
      });
    }, [styles, settings, updateEditorSettings2, getEditorSettings2]);
  }
  function GlobalStylesRenderer({ disableRootPadding }) {
    useGlobalStylesRenderer(disableRootPadding);
    return null;
  }

  // packages/editor/build-module/components/style-book/index.mjs
  var import_jsx_runtime209 = __toESM(require_jsx_runtime(), 1);
  var { ExperimentalBlockEditorProvider: ExperimentalBlockEditorProvider2 } = unlock(import_block_editor37.privateApis);
  var { Tabs: Tabs3 } = unlock(import_components99.privateApis);
  function isObjectEmpty(object) {
    return !object || Object.keys(object).length === 0;
  }
  var scrollToSection = (anchorId, iframe) => {
    if (!anchorId || !iframe || !iframe?.contentDocument) {
      return;
    }
    const element = anchorId === "top" ? iframe.contentDocument.body : iframe.contentDocument.getElementById(anchorId);
    if (element) {
      element.scrollIntoView({
        behavior: "smooth"
      });
    }
  };
  var getStyleBookNavigationFromPath = (path) => {
    if (path && typeof path === "string") {
      if (path === "/" || path.startsWith("/typography") || path.startsWith("/colors") || path.startsWith("/blocks")) {
        return {
          top: true
        };
      }
    }
    return null;
  };
  function useMultiOriginPalettes() {
    const { colors: colors2, gradients } = (0, import_block_editor37.__experimentalUseMultipleOriginColorsAndGradients)();
    const [
      shouldDisplayDefaultDuotones,
      customDuotones,
      themeDuotones,
      defaultDuotones
    ] = (0, import_block_editor37.useSettings)(
      "color.defaultDuotone",
      "color.duotone.custom",
      "color.duotone.theme",
      "color.duotone.default"
    );
    const palettes = (0, import_element87.useMemo)(() => {
      const result = { colors: colors2, gradients, duotones: [] };
      if (themeDuotones && themeDuotones.length) {
        result.duotones.push({
          name: (0, import_i18n126._x)(
            "Theme",
            "Indicates these duotone filters come from the theme."
          ),
          slug: "theme",
          duotones: themeDuotones
        });
      }
      if (shouldDisplayDefaultDuotones && defaultDuotones && defaultDuotones.length) {
        result.duotones.push({
          name: (0, import_i18n126._x)(
            "Default",
            "Indicates these duotone filters come from WordPress."
          ),
          slug: "default",
          duotones: defaultDuotones
        });
      }
      if (customDuotones && customDuotones.length) {
        result.duotones.push({
          name: (0, import_i18n126._x)(
            "Custom",
            "Indicates these doutone filters are created by the user."
          ),
          slug: "custom",
          duotones: customDuotones
        });
      }
      return result;
    }, [
      colors2,
      gradients,
      customDuotones,
      themeDuotones,
      defaultDuotones,
      shouldDisplayDefaultDuotones
    ]);
    return palettes;
  }
  function getExamplesForSinglePageUse(examples) {
    const examplesForSinglePageUse = [];
    const overviewCategoryExamples = getExamplesByCategory(
      { slug: "overview" },
      examples
    );
    examplesForSinglePageUse.push(...overviewCategoryExamples.examples);
    const otherExamples = examples.filter((example) => {
      return example.category !== "overview" && !overviewCategoryExamples.examples.find(
        (overviewExample) => overviewExample.name === example.name
      );
    });
    examplesForSinglePageUse.push(...otherExamples);
    return examplesForSinglePageUse;
  }
  function applyBlockVariationsToExamples(examples, variation) {
    if (!variation) {
      return examples;
    }
    return examples.map((example) => {
      return {
        ...example,
        variation,
        blocks: Array.isArray(example.blocks) ? example.blocks.map((block) => ({
          ...block,
          attributes: {
            ...block.attributes,
            style: void 0,
            className: `is-style-${variation}`
          }
        })) : {
          ...example.blocks,
          attributes: {
            ...example.blocks.attributes,
            style: void 0,
            className: `is-style-${variation}`
          }
        }
      };
    });
  }
  function StyleBook({
    isSelected,
    onClick,
    onSelect,
    showTabs = true,
    userConfig = {},
    path = ""
  }, ref) {
    const textColor = useStyle2("color.text");
    const backgroundColor = useStyle2("color.background");
    const colors2 = useMultiOriginPalettes();
    const examples = (0, import_element87.useMemo)(() => getExamples(colors2), [colors2]);
    const tabs = (0, import_element87.useMemo)(
      () => getTopLevelStyleBookCategories().filter(
        (category) => examples.some(
          (example) => example.category === category.slug
        )
      ),
      [examples]
    );
    const examplesForSinglePageUse = getExamplesForSinglePageUse(examples);
    const { base: baseConfig } = useGlobalStyles();
    const goTo = getStyleBookNavigationFromPath(path);
    const mergedConfig = (0, import_element87.useMemo)(() => {
      if (!isObjectEmpty(userConfig) && !isObjectEmpty(baseConfig)) {
        return mergeGlobalStyles(baseConfig, userConfig);
      }
      return {};
    }, [baseConfig, userConfig]);
    const originalSettings = (0, import_data79.useSelect)(
      (select6) => select6(import_block_editor37.store).getSettings(),
      []
    );
    const [globalStyles] = useGlobalStylesOutputWithConfig(mergedConfig);
    const settings = (0, import_element87.useMemo)(
      () => ({
        ...originalSettings,
        styles: !isObjectEmpty(globalStyles) && !isObjectEmpty(userConfig) ? globalStyles : originalSettings.styles,
        isPreviewMode: true
      }),
      [globalStyles, originalSettings, userConfig]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
      "div",
      {
        ref,
        className: clsx_default("editor-style-book", {
          "is-button": !!onClick
        }),
        style: {
          color: textColor,
          background: backgroundColor
        },
        children: showTabs ? /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)(Tabs3, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime209.jsx)("div", { className: "editor-style-book__tablist-container", children: /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(Tabs3.TabList, { children: tabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(Tabs3.Tab, { tabId: tab.slug, children: tab.title }, tab.slug)) }) }),
          tabs.map((tab) => {
            const categoryDefinition = tab.slug ? getTopLevelStyleBookCategories().find(
              (_category) => _category.slug === tab.slug
            ) : null;
            const filteredExamples = categoryDefinition ? getExamplesByCategory(
              categoryDefinition,
              examples
            ) : { examples };
            return /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
              Tabs3.TabPanel,
              {
                tabId: tab.slug,
                focusable: false,
                className: "editor-style-book__tabpanel",
                children: /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
                  StyleBookBody,
                  {
                    category: tab.slug,
                    examples: filteredExamples,
                    isSelected,
                    onSelect,
                    settings,
                    title: tab.title,
                    goTo
                  }
                )
              },
              tab.slug
            );
          })
        ] }) : /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
          StyleBookBody,
          {
            examples: { examples: examplesForSinglePageUse },
            isSelected,
            onClick,
            onSelect,
            settings,
            goTo
          }
        )
      }
    );
  }
  var StyleBookPreview = ({
    userConfig = {},
    isStatic = false,
    path,
    onPathChange,
    settings: settingsProp
  }) => {
    const editorSettings2 = (0, import_data79.useSelect)(
      (select6) => settingsProp ?? select6(store).getEditorSettings(),
      [settingsProp]
    );
    const canUserUploadMedia = (0, import_data79.useSelect)(
      (select6) => select6(import_core_data58.store).canUser("create", {
        kind: "postType",
        name: "attachment"
      }),
      []
    );
    (0, import_element87.useEffect)(() => {
      (0, import_data79.dispatch)(import_block_editor37.store).updateSettings({
        ...editorSettings2,
        mediaUpload: canUserUploadMedia ? import_media_utils5.uploadMedia : void 0
      });
    }, [editorSettings2, canUserUploadMedia]);
    const [internalPath, setInternalPath] = (0, import_element87.useState)("/");
    const section = path ?? internalPath;
    const onChangeSection = onPathChange ?? setInternalPath;
    const isSelected = (blockName) => {
      return section === `/blocks/${encodeURIComponent(blockName)}` || section.startsWith(
        `/blocks/${encodeURIComponent(blockName)}/`
      );
    };
    const onSelect = (blockName, isBlockVariation = false) => {
      if (STYLE_BOOK_COLOR_GROUPS.find(
        (group) => group.slug === blockName
      )) {
        onChangeSection("/colors/palette");
        return;
      }
      if (blockName === "typography") {
        onChangeSection("/typography");
        return;
      }
      if (isBlockVariation) {
        return;
      }
      onChangeSection(`/blocks/${encodeURIComponent(blockName)}`);
    };
    const colors2 = useMultiOriginPalettes();
    const examples = getExamples(colors2);
    const examplesForSinglePageUse = getExamplesForSinglePageUse(examples);
    let previewCategory = null;
    let blockVariation = null;
    if (section.includes("/colors")) {
      previewCategory = "colors";
    } else if (section.includes("/typography")) {
      previewCategory = "text";
    } else if (section.includes("/blocks")) {
      previewCategory = "blocks";
      let blockName = decodeURIComponent(section).split("/blocks/")[1];
      if (blockName?.includes("/variations")) {
        [blockName, blockVariation] = blockName.split("/variations/");
      }
      if (blockName && examples.find((example) => example.name === blockName)) {
        previewCategory = blockName;
      }
    } else if (!isStatic) {
      previewCategory = "overview";
    }
    const categoryDefinition = STYLE_BOOK_PREVIEW_CATEGORIES.find(
      (category) => category.slug === previewCategory
    );
    const filteredExamples = (0, import_element87.useMemo)(() => {
      if (!categoryDefinition) {
        return {
          examples: [
            examples.find(
              (example) => example.name === previewCategory
            )
          ]
        };
      }
      return getExamplesByCategory(categoryDefinition, examples);
    }, [categoryDefinition, examples, previewCategory]);
    const displayedExamples = (0, import_element87.useMemo)(() => {
      if (!previewCategory) {
        return { examples: examplesForSinglePageUse };
      }
      if (blockVariation) {
        return {
          examples: applyBlockVariationsToExamples(
            filteredExamples.examples,
            blockVariation
          )
        };
      }
      return filteredExamples;
    }, [
      previewCategory,
      examplesForSinglePageUse,
      blockVariation,
      filteredExamples
    ]);
    const { base: baseConfig } = useGlobalStyles();
    const goTo = getStyleBookNavigationFromPath(section);
    const mergedConfig = (0, import_element87.useMemo)(() => {
      if (!isObjectEmpty(userConfig) && !isObjectEmpty(baseConfig)) {
        return mergeGlobalStyles(baseConfig, userConfig);
      }
      return {};
    }, [baseConfig, userConfig]);
    const [globalStyles] = useGlobalStylesOutputWithConfig(mergedConfig);
    const settings = (0, import_element87.useMemo)(
      () => ({
        ...editorSettings2,
        styles: !isObjectEmpty(globalStyles) && !isObjectEmpty(userConfig) ? globalStyles : editorSettings2.styles,
        isPreviewMode: true
      }),
      [globalStyles, editorSettings2, userConfig]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime209.jsx)("div", { className: "editor-style-book", children: /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)(import_block_editor37.BlockEditorProvider, { settings, children: [
      /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(GlobalStylesRenderer, { disableRootPadding: true }),
      /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
        StyleBookBody,
        {
          examples: displayedExamples,
          settings,
          goTo,
          isSelected: !isStatic ? isSelected : null,
          onSelect: !isStatic ? onSelect : null
        }
      )
    ] }) });
  };
  var StyleBookBody = ({
    examples,
    isSelected,
    onClick,
    onSelect,
    settings,
    title,
    goTo
  }) => {
    const [isFocused, setIsFocused] = (0, import_element87.useState)(false);
    const [hasIframeLoaded, setHasIframeLoaded] = (0, import_element87.useState)(false);
    const iframeRef = (0, import_element87.useRef)(null);
    const buttonModeProps = {
      role: "button",
      onFocus: () => setIsFocused(true),
      onBlur: () => setIsFocused(false),
      onKeyDown: (event) => {
        if (event.defaultPrevented) {
          return;
        }
        const { keyCode } = event;
        if (onClick && (keyCode === import_keycodes4.ENTER || keyCode === import_keycodes4.SPACE)) {
          event.preventDefault();
          onClick(event);
        }
      },
      onClick: (event) => {
        if (event.defaultPrevented) {
          return;
        }
        if (onClick) {
          event.preventDefault();
          onClick(event);
        }
      },
      readonly: true
    };
    const handleLoad = () => setHasIframeLoaded(true);
    (0, import_element87.useLayoutEffect)(() => {
      if (hasIframeLoaded && iframeRef.current && goTo?.top) {
        scrollToSection("top", iframeRef.current);
      }
    }, [goTo?.top, hasIframeLoaded]);
    return /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)(
      import_block_editor37.__unstableIframe,
      {
        onLoad: handleLoad,
        ref: iframeRef,
        className: clsx_default("editor-style-book__iframe", {
          "is-focused": isFocused && !!onClick,
          "is-button": !!onClick
        }),
        name: "style-book-canvas",
        tabIndex: 0,
        ...onClick ? buttonModeProps : {},
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(import_block_editor37.__unstableEditorStyles, { styles: settings.styles }),
          /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)("style", { children: [
            STYLE_BOOK_IFRAME_STYLES,
            !!onClick && "body { cursor: pointer; } body * { pointer-events: none; }"
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
            Examples,
            {
              className: "editor-style-book__examples",
              filteredExamples: examples,
              label: title ? (0, import_i18n126.sprintf)(
                // translators: %s: Category of blocks, e.g. Text.
                (0, import_i18n126.__)("Examples of blocks in the %s category"),
                title
              ) : (0, import_i18n126.__)("Examples of blocks"),
              isSelected,
              onSelect
            },
            title
          )
        ]
      }
    );
  };
  var Examples = (0, import_element87.memo)(
    ({ className, filteredExamples, label, isSelected, onSelect }) => {
      return /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)(
        import_components99.Composite,
        {
          orientation: "vertical",
          className,
          "aria-label": label,
          role: "grid",
          children: [
            !!filteredExamples?.examples?.length && filteredExamples.examples.map((example) => /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
              Example,
              {
                id: `example-${example.name}`,
                title: example.title,
                content: example.content,
                blocks: example.blocks,
                isSelected: isSelected?.(example.name),
                onClick: !!onSelect ? () => onSelect(
                  example.name,
                  !!example.variation
                ) : null
              },
              example.name
            )),
            !!filteredExamples?.subcategories?.length && filteredExamples.subcategories.map((subcategory) => /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)(
              import_components99.Composite.Group,
              {
                className: "editor-style-book__subcategory",
                children: [
                  /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(import_components99.Composite.GroupLabel, { children: /* @__PURE__ */ (0, import_jsx_runtime209.jsx)("h2", { className: "editor-style-book__subcategory-title", children: subcategory.title }) }),
                  /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
                    Subcategory,
                    {
                      examples: subcategory.examples,
                      isSelected,
                      onSelect
                    }
                  )
                ]
              },
              `subcategory-${subcategory.slug}`
            ))
          ]
        }
      );
    }
  );
  var Subcategory = ({ examples, isSelected, onSelect }) => {
    return !!examples?.length && examples.map((example) => /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
      Example,
      {
        id: `example-${example.name}`,
        title: example.title,
        content: example.content,
        blocks: example.blocks,
        isSelected: isSelected?.(example.name),
        onClick: !!onSelect ? () => onSelect(example.name) : null
      },
      example.name
    ));
  };
  var disabledExamples = ["example-duotones"];
  var Example = ({ id, title, blocks, isSelected, onClick, content }) => {
    const originalSettings = (0, import_data79.useSelect)(
      (select6) => select6(import_block_editor37.store).getSettings(),
      []
    );
    const settings = (0, import_element87.useMemo)(
      () => ({
        ...originalSettings,
        focusMode: false,
        // Disable "Spotlight mode".
        isPreviewMode: true
      }),
      [originalSettings]
    );
    const renderedBlocks = (0, import_element87.useMemo)(
      () => Array.isArray(blocks) ? blocks : [blocks],
      [blocks]
    );
    const disabledProps = disabledExamples.includes(id) || !onClick ? {
      disabled: true,
      accessibleWhenDisabled: !!onClick
    } : {};
    return /* @__PURE__ */ (0, import_jsx_runtime209.jsx)("div", { role: "row", children: /* @__PURE__ */ (0, import_jsx_runtime209.jsx)("div", { role: "gridcell", children: /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)(
      import_components99.Composite.Item,
      {
        className: clsx_default("editor-style-book__example", {
          "is-selected": isSelected,
          "is-disabled-example": !!disabledProps?.disabled
        }),
        id,
        "aria-label": !!onClick ? (0, import_i18n126.sprintf)(
          // translators: %s: Title of a block, e.g. Heading.
          (0, import_i18n126.__)("Open %s styles in Styles panel"),
          title
        ) : void 0,
        render: /* @__PURE__ */ (0, import_jsx_runtime209.jsx)("div", {}),
        role: !!onClick ? "button" : null,
        onClick,
        ...disabledProps,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime209.jsx)("span", { className: "editor-style-book__example-title", children: title }),
          /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
            "div",
            {
              className: "editor-style-book__example-preview",
              "aria-hidden": true,
              children: /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(import_components99.Disabled, { className: "editor-style-book__example-preview__content", children: content ? content : /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)(
                ExperimentalBlockEditorProvider2,
                {
                  value: renderedBlocks,
                  settings,
                  children: [
                    /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(import_block_editor37.__unstableEditorStyles, {}),
                    /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(import_block_editor37.BlockList, { renderAppender: false })
                  ]
                }
              ) })
            }
          )
        ]
      }
    ) }) });
  };
  var style_book_default = (0, import_element87.forwardRef)(StyleBook);

  // packages/editor/build-module/components/styles-canvas/style-book.mjs
  var import_jsx_runtime210 = __toESM(require_jsx_runtime(), 1);
  function StylesCanvasStyleBook({ path, onPathChange }, ref) {
    return /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(
      style_book_default,
      {
        ref,
        isSelected: (blockName) => (
          // Match '/blocks/core%2Fbutton' and
          // '/blocks/core%2Fbutton/typography', but not
          // '/blocks/core%2Fbuttons'.
          path === `/blocks/${encodeURIComponent(blockName)}` || path?.startsWith(
            `/blocks/${encodeURIComponent(blockName)}/`
          )
        ),
        onSelect: (blockName) => {
          if (STYLE_BOOK_COLOR_GROUPS.find(
            (group) => group.slug === blockName
          )) {
            onPathChange?.("/colors/palette");
            return;
          }
          if (blockName === "typography") {
            onPathChange?.("/typography");
            return;
          }
          onPathChange?.("/blocks/" + encodeURIComponent(blockName));
        }
      }
    );
  }
  var style_book_default2 = (0, import_element88.forwardRef)(StylesCanvasStyleBook);

  // packages/editor/build-module/components/styles-canvas/revisions.mjs
  var import_components100 = __toESM(require_components(), 1);
  var import_block_editor38 = __toESM(require_block_editor(), 1);
  var import_data80 = __toESM(require_data(), 1);
  var import_element89 = __toESM(require_element(), 1);
  var import_jsx_runtime211 = __toESM(require_jsx_runtime(), 1);
  var {
    ExperimentalBlockEditorProvider: ExperimentalBlockEditorProvider3,
    __unstableBlockStyleVariationOverridesWithConfig
  } = unlock(import_block_editor38.privateApis);
  function isObjectEmpty2(object) {
    return !object || Object.keys(object).length === 0;
  }
  function StylesCanvasRevisions({ path }, ref) {
    const blocks = (0, import_data80.useSelect)((select6) => {
      return select6(import_block_editor38.store).getBlocks();
    }, []);
    const { user: userConfig, base: baseConfig } = useGlobalStyles();
    const { revisions, isLoading } = useGlobalStylesRevisions();
    const revisionId2 = (0, import_element89.useMemo)(() => {
      const match3 = path?.match(/^\/revisions\/(.+)$/);
      return match3 ? match3[1] : null;
    }, [path]);
    const selectedRevision = (0, import_element89.useMemo)(() => {
      if (!revisionId2 || !revisions.length) {
        return null;
      }
      return revisions.find(
        (rev) => String(rev.id) === String(revisionId2)
      );
    }, [revisionId2, revisions]);
    const displayConfig = selectedRevision || userConfig;
    const mergedConfig = (0, import_element89.useMemo)(() => {
      if (!isObjectEmpty2(displayConfig) && !isObjectEmpty2(baseConfig)) {
        return mergeGlobalStyles(baseConfig, displayConfig);
      }
      return {};
    }, [baseConfig, displayConfig]);
    const renderedBlocksArray = (0, import_element89.useMemo)(
      () => Array.isArray(blocks) ? blocks : [blocks],
      [blocks]
    );
    const originalSettings = (0, import_data80.useSelect)(
      (select6) => select6(import_block_editor38.store).getSettings(),
      []
    );
    const settings = (0, import_element89.useMemo)(
      () => ({
        ...originalSettings,
        isPreviewMode: true
      }),
      [originalSettings]
    );
    const [globalStyles] = useGlobalStylesOutputWithConfig(mergedConfig);
    const editorStyles = !isObjectEmpty2(globalStyles) && !isObjectEmpty2(displayConfig) ? globalStyles : settings.styles;
    if (isLoading) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime211.jsxs)(
      import_block_editor38.__unstableIframe,
      {
        ref,
        className: "editor-revisions__iframe",
        name: "revisions",
        tabIndex: 0,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime211.jsx)("style", {
            // Forming a "block formatting context" to prevent margin collapsing.
            // @see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context
            children: `.is-root-container { display: flow-root; }`
          }),
          /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(import_components100.Disabled, { className: "editor-revisions__example-preview__content", children: /* @__PURE__ */ (0, import_jsx_runtime211.jsxs)(
            ExperimentalBlockEditorProvider3,
            {
              value: renderedBlocksArray,
              settings,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(import_block_editor38.BlockList, { renderAppender: false }),
                /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(import_block_editor38.__unstableEditorStyles, { styles: editorStyles }),
                /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
                  __unstableBlockStyleVariationOverridesWithConfig,
                  {
                    config: mergedConfig
                  }
                )
              ]
            }
          ) })
        ]
      }
    );
  }
  var revisions_default = (0, import_element89.forwardRef)(StylesCanvasRevisions);

  // packages/editor/build-module/components/resizable-editor/index.mjs
  var import_element90 = __toESM(require_element(), 1);
  var import_components102 = __toESM(require_components(), 1);

  // packages/editor/build-module/components/resizable-editor/resize-handle.mjs
  var import_i18n127 = __toESM(require_i18n(), 1);
  var import_keycodes5 = __toESM(require_keycodes(), 1);
  var import_components101 = __toESM(require_components(), 1);
  var import_jsx_runtime212 = __toESM(require_jsx_runtime(), 1);
  var DELTA_DISTANCE = 20;
  function ResizeHandle({ direction, resizeWidthBy }) {
    function handleKeyDown(event) {
      const { keyCode } = event;
      if (keyCode !== import_keycodes5.LEFT && keyCode !== import_keycodes5.RIGHT) {
        return;
      }
      event.preventDefault();
      if (direction === "left" && keyCode === import_keycodes5.LEFT || direction === "right" && keyCode === import_keycodes5.RIGHT) {
        resizeWidthBy(DELTA_DISTANCE);
      } else if (direction === "left" && keyCode === import_keycodes5.RIGHT || direction === "right" && keyCode === import_keycodes5.LEFT) {
        resizeWidthBy(-DELTA_DISTANCE);
      }
    }
    const resizeHandleVariants = {
      active: {
        opacity: 1,
        scaleY: 1.3
      }
    };
    const resizableHandleHelpId = `resizable-editor__resize-help-${direction}`;
    return /* @__PURE__ */ (0, import_jsx_runtime212.jsxs)(import_jsx_runtime212.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(import_components101.Tooltip, { text: (0, import_i18n127.__)("Drag to resize"), children: /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(
        import_components101.__unstableMotion.button,
        {
          className: `editor-resizable-editor__resize-handle is-${direction}`,
          "aria-label": (0, import_i18n127.__)("Drag to resize"),
          "aria-describedby": resizableHandleHelpId,
          onKeyDown: handleKeyDown,
          variants: resizeHandleVariants,
          whileFocus: "active",
          whileHover: "active",
          whileTap: "active",
          role: "separator",
          "aria-orientation": "vertical"
        },
        "handle"
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(import_components101.VisuallyHidden, { id: resizableHandleHelpId, children: (0, import_i18n127.__)("Use left and right arrow keys to resize the canvas.") })
    ] });
  }

  // packages/editor/build-module/components/resizable-editor/index.mjs
  var import_jsx_runtime213 = __toESM(require_jsx_runtime(), 1);
  var HANDLE_STYLES_OVERRIDE = {
    position: void 0,
    userSelect: void 0,
    cursor: void 0,
    width: void 0,
    height: void 0,
    top: void 0,
    right: void 0,
    bottom: void 0,
    left: void 0
  };
  function ResizableEditor({ className, enableResizing, height, children }) {
    const [width, setWidth] = (0, import_element90.useState)("100%");
    const resizableRef = (0, import_element90.useRef)();
    const resizeWidthBy = (0, import_element90.useCallback)((deltaPixels) => {
      if (resizableRef.current) {
        setWidth(resizableRef.current.offsetWidth + deltaPixels);
      }
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
      import_components102.ResizableBox,
      {
        className: clsx_default("editor-resizable-editor", className, {
          "is-resizable": enableResizing
        }),
        ref: (api) => {
          resizableRef.current = api?.resizable;
        },
        size: {
          width: enableResizing ? width : "100%",
          height: enableResizing && height ? height : "100%"
        },
        onResizeStop: (event, direction, element) => {
          setWidth(element.style.width);
        },
        minWidth: 300,
        maxWidth: "100%",
        maxHeight: "100%",
        enable: {
          left: enableResizing,
          right: enableResizing
        },
        showHandle: enableResizing,
        resizeRatio: 2,
        handleComponent: {
          left: /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
            ResizeHandle,
            {
              direction: "left",
              resizeWidthBy
            }
          ),
          right: /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
            ResizeHandle,
            {
              direction: "right",
              resizeWidthBy
            }
          )
        },
        handleClasses: void 0,
        handleStyles: {
          left: HANDLE_STYLES_OVERRIDE,
          right: HANDLE_STYLES_OVERRIDE
        },
        children
      }
    );
  }
  var resizable_editor_default = ResizableEditor;

  // packages/editor/build-module/components/styles-canvas/index.mjs
  var import_jsx_runtime214 = __toESM(require_jsx_runtime(), 1);
  function getStylesCanvasTitle(path, showStylebook2) {
    if (showStylebook2) {
      return (0, import_i18n128.__)("Style Book");
    }
    if (path?.startsWith("/revisions")) {
      return (0, import_i18n128.__)("Style Revisions");
    }
    return "";
  }
  function StylesCanvas() {
    const { stylesPath: stylesPath2, showStylebook: showStylebook2, showListViewByDefault } = (0, import_data81.useSelect)(
      (select6) => {
        const { getStylesPath: getStylesPath2, getShowStylebook: getShowStylebook2 } = unlock(
          select6(store)
        );
        const _showListViewByDefault = select6(import_preferences11.store).get(
          "core",
          "showListViewByDefault"
        );
        return {
          stylesPath: getStylesPath2(),
          showStylebook: getShowStylebook2(),
          showListViewByDefault: _showListViewByDefault
        };
      },
      []
    );
    const { resetStylesNavigation: resetStylesNavigation2, setStylesPath: setStylesPath2 } = unlock(
      (0, import_data81.useDispatch)(store)
    );
    const { setIsListViewOpened: setIsListViewOpened2 } = (0, import_data81.useDispatch)(store);
    const focusOnMountRef = (0, import_compose18.useFocusOnMount)("firstElement");
    const sectionFocusReturnRef = (0, import_compose18.useFocusReturn)();
    let content = null;
    if (showStylebook2) {
      content = /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
        style_book_default2,
        {
          path: stylesPath2,
          onPathChange: setStylesPath2,
          ref: sectionFocusReturnRef
        }
      );
    } else if (stylesPath2?.startsWith("/revisions")) {
      content = /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
        revisions_default,
        {
          path: stylesPath2,
          ref: sectionFocusReturnRef
        }
      );
    }
    const title = getStylesCanvasTitle(stylesPath2, showStylebook2);
    const onCloseCanvas = () => {
      setIsListViewOpened2(showListViewByDefault);
      resetStylesNavigation2();
    };
    const closeOnEscape = (event) => {
      if (event.keyCode === import_keycodes6.ESCAPE && !event.defaultPrevented) {
        event.preventDefault();
        onCloseCanvas();
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)("div", { className: "editor-styles-canvas", children: /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(resizable_editor_default, { enableResizing: false, children: /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)(
      "section",
      {
        className: "editor-styles-canvas__section",
        ref: focusOnMountRef,
        onKeyDown: closeOnEscape,
        "aria-label": title,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
            import_components103.Button,
            {
              size: "compact",
              className: "editor-styles-canvas__close-button",
              icon: close_small_default,
              label: (0, import_i18n128.__)("Close"),
              onClick: onCloseCanvas
            }
          ),
          content
        ]
      }
    ) }) });
  }

  // packages/editor/build-module/components/document-bar/useEditedSectionDetails.mjs
  var import_data82 = __toESM(require_data(), 1);
  var import_html_entities10 = __toESM(require_html_entities(), 1);
  var import_block_editor39 = __toESM(require_block_editor(), 1);
  var import_core_data59 = __toESM(require_core_data(), 1);
  function useEditedSectionDetails() {
    return (0, import_data82.useSelect)((select6) => {
      const {
        getBlockAttributes: getBlockAttributes2,
        getBlockName: getBlockName2,
        __experimentalGetParsedPattern
      } = select6(import_block_editor39.store);
      const { getEditedEntityRecord, getCurrentTheme } = select6(import_core_data59.store);
      const { getEditedContentOnlySection } = unlock(
        select6(import_block_editor39.store)
      );
      const editedSectionId = getEditedContentOnlySection();
      if (!editedSectionId) {
        return null;
      }
      const attributes = getBlockAttributes2(editedSectionId);
      const patternName = attributes?.metadata?.patternName;
      if (patternName) {
        const pattern = typeof __experimentalGetParsedPattern === "function" ? __experimentalGetParsedPattern(patternName) : null;
        return {
          patternName,
          patternTitle: pattern?.title || attributes?.metadata?.name,
          type: "pattern"
        };
      }
      const blockName = getBlockName2(editedSectionId);
      if (blockName === "core/block" && !!attributes?.ref) {
        const entity = getEditedEntityRecord(
          "postType",
          "wp_block",
          attributes.ref
        );
        if (entity?.title) {
          return {
            patternName: attributes.ref,
            patternTitle: (0, import_html_entities10.decodeEntities)(entity.title),
            type: "synced-pattern"
          };
        }
      }
      if (blockName === "core/template-part" && !!attributes?.slug) {
        const theme = attributes.theme || getCurrentTheme()?.stylesheet;
        const templatePartId = theme ? `${theme}//${attributes.slug}` : null;
        if (templatePartId) {
          const entity = getEditedEntityRecord(
            "postType",
            "wp_template_part",
            templatePartId
          );
          if (entity?.title) {
            return {
              patternName: attributes.slug,
              patternTitle: (0, import_html_entities10.decodeEntities)(entity.title),
              type: "template-part"
            };
          }
        }
      }
      return null;
    }, []);
  }

  // packages/editor/build-module/components/document-bar/index.mjs
  var import_jsx_runtime215 = __toESM(require_jsx_runtime(), 1);
  var MotionButton = import_components104.__unstableMotion.create(import_components104.Button);
  function DocumentBar(props) {
    const { stopEditingContentOnlySection } = unlock(
      (0, import_data83.useDispatch)(import_block_editor40.store)
    );
    const unlockedPatternInfo = useEditedSectionDetails();
    const {
      postId: postId2,
      postType: postType2,
      postTypeLabel,
      documentTitle,
      isNotFound,
      templateTitle,
      onNavigateToPreviousEntityRecord,
      isTemplatePreview,
      stylesCanvasTitle
    } = (0, import_data83.useSelect)((select6) => {
      const {
        getCurrentPostType: getCurrentPostType2,
        getCurrentPostId: getCurrentPostId2,
        getEditorSettings: getEditorSettings2,
        getRenderingMode: getRenderingMode2
      } = select6(store);
      const {
        getEditedEntityRecord,
        getPostType,
        getCurrentTheme,
        isResolving: isResolvingSelector
      } = select6(import_core_data60.store);
      const _postType = getCurrentPostType2();
      const _postId = getCurrentPostId2();
      const _document = getEditedEntityRecord(
        "postType",
        _postType,
        _postId
      );
      const { default_template_types: templateTypes = [] } = getCurrentTheme() ?? {};
      const _templateInfo = getTemplateInfo({
        templateTypes,
        template: _document
      });
      const _postTypeLabel = getPostType(_postType)?.labels?.singular_name;
      const { getStylesPath: getStylesPath2, getShowStylebook: getShowStylebook2 } = unlock(
        select6(store)
      );
      const _stylesPath = getStylesPath2();
      const _showStylebook = getShowStylebook2();
      const _stylesCanvasTitle = getStylesCanvasTitle(
        _stylesPath,
        _showStylebook
      );
      return {
        postId: _postId,
        postType: _postType,
        postTypeLabel: _postTypeLabel,
        documentTitle: _document.title,
        isNotFound: !_document && !isResolvingSelector(
          "getEditedEntityRecord",
          "postType",
          _postType,
          _postId
        ),
        templateTitle: _templateInfo.title,
        onNavigateToPreviousEntityRecord: getEditorSettings2().onNavigateToPreviousEntityRecord,
        isTemplatePreview: getRenderingMode2() === "template-locked",
        stylesCanvasTitle: _stylesCanvasTitle
      };
    }, []);
    const { open: openCommandCenter } = (0, import_data83.useDispatch)(import_commands3.store);
    const isReducedMotion = (0, import_compose19.useReducedMotion)();
    const isTemplate2 = TEMPLATE_POST_TYPES.includes(postType2);
    const hasBackButton = !!onNavigateToPreviousEntityRecord || !!unlockedPatternInfo;
    const entityTitle = isTemplate2 ? templateTitle : documentTitle;
    const title = unlockedPatternInfo?.patternTitle || props.title || stylesCanvasTitle || entityTitle;
    const icon = props.icon;
    const handleBackClick = (event) => {
      event.stopPropagation();
      if (unlockedPatternInfo) {
        stopEditingContentOnlySection();
      } else if (onNavigateToPreviousEntityRecord) {
        onNavigateToPreviousEntityRecord();
      }
    };
    const pageTypeBadge = usePageTypeBadge(postId2);
    const mountedRef = (0, import_element91.useRef)(false);
    (0, import_element91.useEffect)(() => {
      mountedRef.current = true;
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)(
      "div",
      {
        className: clsx_default("editor-document-bar", {
          "has-back-button": hasBackButton
        }),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(import_components104.__unstableAnimatePresence, { children: hasBackButton && /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(
            MotionButton,
            {
              className: "editor-document-bar__back",
              icon: (0, import_i18n129.isRTL)() ? chevron_right_small_default : chevron_left_small_default,
              onClick: handleBackClick,
              size: "compact",
              initial: mountedRef.current ? { opacity: 0, transform: "translateX(15%)" } : false,
              animate: { opacity: 1, transform: "translateX(0%)" },
              exit: { opacity: 0, transform: "translateX(15%)" },
              transition: isReducedMotion ? { duration: 0 } : void 0,
              children: (0, import_i18n129.__)("Back")
            }
          ) }),
          !isTemplate2 && isTemplatePreview && !hasBackButton && /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(
            import_block_editor40.BlockIcon,
            {
              icon: layout_default,
              className: "editor-document-bar__icon-layout"
            }
          ),
          isNotFound ? /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(import_components104.__experimentalText, { children: (0, import_i18n129.__)("Document not found") }) : /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)(
            import_components104.Button,
            {
              className: "editor-document-bar__command",
              onClick: () => openCommandCenter(),
              size: "compact",
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)(
                  import_components104.__unstableMotion.div,
                  {
                    className: "editor-document-bar__title",
                    initial: mountedRef.current ? {
                      opacity: 0,
                      transform: hasBackButton ? "translateX(15%)" : "translateX(-15%)"
                    } : false,
                    animate: {
                      opacity: 1,
                      transform: "translateX(0%)"
                    },
                    transition: isReducedMotion ? { duration: 0 } : void 0,
                    children: [
                      icon && /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(import_block_editor40.BlockIcon, { icon }),
                      /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)(import_components104.__experimentalText, { size: "body", as: "h1", children: [
                        /* @__PURE__ */ (0, import_jsx_runtime215.jsx)("span", { className: "editor-document-bar__post-title", children: title ? (0, import_dom2.__unstableStripHTML)(title) : (0, import_i18n129.__)("No title") }),
                        unlockedPatternInfo && /* @__PURE__ */ (0, import_jsx_runtime215.jsx)("span", { className: "editor-document-bar__post-type-label", children: unlockedPatternInfo.type === "template-part" ? `\xB7 ${(0, import_i18n129.__)("Template Part")}` : `\xB7 ${(0, import_i18n129.__)("Pattern")}` }),
                        !unlockedPatternInfo && pageTypeBadge && /* @__PURE__ */ (0, import_jsx_runtime215.jsx)("span", { className: "editor-document-bar__post-type-label", children: `\xB7 ${pageTypeBadge}` }),
                        !unlockedPatternInfo && postTypeLabel && !props.title && !pageTypeBadge && /* @__PURE__ */ (0, import_jsx_runtime215.jsx)("span", { className: "editor-document-bar__post-type-label", children: `\xB7 ${(0, import_html_entities11.decodeEntities)(
                          postTypeLabel
                        )}` })
                      ] })
                    ]
                  },
                  hasBackButton
                ),
                /* @__PURE__ */ (0, import_jsx_runtime215.jsx)("span", { className: "editor-document-bar__shortcut", children: import_keycodes7.displayShortcut.primary("k") })
              ]
            }
          )
        ]
      }
    );
  }

  // packages/editor/build-module/components/document-outline/index.mjs
  var import_i18n130 = __toESM(require_i18n(), 1);
  var import_data84 = __toESM(require_data(), 1);
  var import_element92 = __toESM(require_element(), 1);
  var import_rich_text2 = __toESM(require_rich_text(), 1);
  var import_block_editor41 = __toESM(require_block_editor(), 1);
  var import_core_data61 = __toESM(require_core_data(), 1);
  var import_components105 = __toESM(require_components(), 1);

  // packages/editor/build-module/components/document-outline/item.mjs
  var import_jsx_runtime216 = __toESM(require_jsx_runtime(), 1);
  var TableOfContentsItem = ({
    children,
    isValid: isValid2,
    isDisabled,
    level,
    href,
    onSelect
  }) => {
    function handleClick(event) {
      if (isDisabled) {
        event.preventDefault();
        return;
      }
      onSelect();
    }
    return /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
      "li",
      {
        className: clsx_default(
          "document-outline__item",
          `is-${level.toLowerCase()}`,
          {
            "is-invalid": !isValid2,
            "is-disabled": isDisabled
          }
        ),
        children: /* @__PURE__ */ (0, import_jsx_runtime216.jsxs)(
          "a",
          {
            href,
            className: "document-outline__button",
            "aria-disabled": isDisabled,
            onClick: handleClick,
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
                "span",
                {
                  className: "document-outline__emdash",
                  "aria-hidden": "true"
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime216.jsx)("strong", { className: "document-outline__level", children: level }),
              /* @__PURE__ */ (0, import_jsx_runtime216.jsx)("span", { className: "document-outline__item-content", children })
            ]
          }
        )
      }
    );
  };
  var item_default = TableOfContentsItem;

  // packages/editor/build-module/components/document-outline/index.mjs
  var import_jsx_runtime217 = __toESM(require_jsx_runtime(), 1);
  var emptyHeadingContent = /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("em", { children: (0, import_i18n130.__)("(Empty heading)") });
  var incorrectLevelContent = [
    /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("br", {}, "incorrect-break"),
    /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("em", { children: (0, import_i18n130.__)("(Incorrect heading level)") }, "incorrect-message")
  ];
  var singleH1Headings = [
    /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("br", {}, "incorrect-break-h1"),
    /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("em", { children: (0, import_i18n130.__)("(Your theme may already use a H1 for the post title)") }, "incorrect-message-h1")
  ];
  var multipleH1Headings = [
    /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("br", {}, "incorrect-break-multiple-h1"),
    /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("em", { children: (0, import_i18n130.__)("(Multiple H1 headings are not recommended)") }, "incorrect-message-multiple-h1")
  ];
  function EmptyOutlineIllustration() {
    return /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)(
      import_components105.SVG,
      {
        width: "138",
        height: "148",
        viewBox: "0 0 138 148",
        fill: "none",
        xmlns: "http://www.w3.org/2000/svg",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(import_components105.Rect, { width: "138", height: "148", rx: "4", fill: "#F0F6FC" }),
          /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(import_components105.Line, { x1: "44", y1: "28", x2: "24", y2: "28", stroke: "#DDDDDD" }),
          /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(import_components105.Rect, { x: "48", y: "16", width: "27", height: "23", rx: "4", fill: "#DDDDDD" }),
          /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
            import_components105.Path,
            {
              d: "M54.7585 32V23.2727H56.6037V26.8736H60.3494V23.2727H62.1903V32H60.3494V28.3949H56.6037V32H54.7585ZM67.4574 23.2727V32H65.6122V25.0241H65.5611L63.5625 26.277V24.6406L65.723 23.2727H67.4574Z",
              fill: "black"
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(import_components105.Line, { x1: "55", y1: "59", x2: "24", y2: "59", stroke: "#DDDDDD" }),
          /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(import_components105.Rect, { x: "59", y: "47", width: "29", height: "23", rx: "4", fill: "#DDDDDD" }),
          /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
            import_components105.Path,
            {
              d: "M65.7585 63V54.2727H67.6037V57.8736H71.3494V54.2727H73.1903V63H71.3494V59.3949H67.6037V63H65.7585ZM74.6605 63V61.6705L77.767 58.794C78.0313 58.5384 78.2528 58.3082 78.4318 58.1037C78.6136 57.8991 78.7514 57.6989 78.8452 57.5028C78.9389 57.304 78.9858 57.0895 78.9858 56.8594C78.9858 56.6037 78.9276 56.3835 78.8111 56.1989C78.6946 56.0114 78.5355 55.8679 78.3338 55.7685C78.1321 55.6662 77.9034 55.6151 77.6477 55.6151C77.3807 55.6151 77.1477 55.669 76.9489 55.777C76.75 55.8849 76.5966 56.0398 76.4886 56.2415C76.3807 56.4432 76.3267 56.6832 76.3267 56.9616H74.5753C74.5753 56.3906 74.7045 55.8949 74.9631 55.4744C75.2216 55.054 75.5838 54.7287 76.0497 54.4986C76.5156 54.2685 77.0526 54.1534 77.6605 54.1534C78.2855 54.1534 78.8295 54.2642 79.2926 54.4858C79.7585 54.7045 80.1207 55.0085 80.3793 55.3977C80.6378 55.7869 80.767 56.233 80.767 56.7358C80.767 57.0653 80.7017 57.3906 80.571 57.7116C80.4432 58.0327 80.2145 58.3892 79.8849 58.7812C79.5554 59.1705 79.0909 59.6378 78.4915 60.1832L77.2173 61.4318V61.4915H80.8821V63H74.6605Z",
              fill: "black"
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(import_components105.Line, { x1: "80", y1: "90", x2: "24", y2: "90", stroke: "#DDDDDD" }),
          /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(import_components105.Rect, { x: "84", y: "78", width: "30", height: "23", rx: "4", fill: "#F0B849" }),
          /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
            import_components105.Path,
            {
              d: "M90.7585 94V85.2727H92.6037V88.8736H96.3494V85.2727H98.1903V94H96.3494V90.3949H92.6037V94H90.7585ZM99.5284 92.4659V91.0128L103.172 85.2727H104.425V87.2841H103.683L101.386 90.919V90.9872H106.564V92.4659H99.5284ZM103.717 94V92.0227L103.751 91.3793V85.2727H105.482V94H103.717Z",
              fill: "black"
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(import_components105.Line, { x1: "66", y1: "121", x2: "24", y2: "121", stroke: "#DDDDDD" }),
          /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(import_components105.Rect, { x: "70", y: "109", width: "29", height: "23", rx: "4", fill: "#DDDDDD" }),
          /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
            import_components105.Path,
            {
              d: "M76.7585 125V116.273H78.6037V119.874H82.3494V116.273H84.1903V125H82.3494V121.395H78.6037V125H76.7585ZM88.8864 125.119C88.25 125.119 87.6832 125.01 87.1861 124.791C86.6918 124.57 86.3011 124.266 86.0142 123.879C85.7301 123.49 85.5838 123.041 85.5753 122.533H87.4332C87.4446 122.746 87.5142 122.933 87.642 123.095C87.7727 123.254 87.946 123.378 88.1619 123.466C88.3778 123.554 88.6207 123.598 88.8906 123.598C89.1719 123.598 89.4205 123.548 89.6364 123.449C89.8523 123.349 90.0213 123.212 90.1435 123.036C90.2656 122.859 90.3267 122.656 90.3267 122.426C90.3267 122.193 90.2614 121.987 90.1307 121.808C90.0028 121.626 89.8182 121.484 89.5767 121.382C89.3381 121.28 89.054 121.229 88.7244 121.229H87.9105V119.874H88.7244C89.0028 119.874 89.2486 119.825 89.4616 119.729C89.6776 119.632 89.8452 119.499 89.9645 119.328C90.0838 119.155 90.1435 118.953 90.1435 118.723C90.1435 118.504 90.0909 118.312 89.9858 118.148C89.8835 117.98 89.7386 117.849 89.5511 117.756C89.3665 117.662 89.1506 117.615 88.9034 117.615C88.6534 117.615 88.4247 117.661 88.2173 117.751C88.0099 117.839 87.8438 117.966 87.7188 118.131C87.5938 118.295 87.527 118.489 87.5185 118.71H85.75C85.7585 118.207 85.902 117.764 86.1804 117.381C86.4588 116.997 86.8338 116.697 87.3054 116.482C87.7798 116.263 88.3153 116.153 88.9119 116.153C89.5142 116.153 90.0412 116.263 90.4929 116.482C90.9446 116.7 91.2955 116.996 91.5455 117.368C91.7983 117.737 91.9233 118.152 91.9205 118.612C91.9233 119.101 91.7713 119.509 91.4645 119.835C91.1605 120.162 90.7642 120.369 90.2756 120.457V120.526C90.9176 120.608 91.4063 120.831 91.7415 121.195C92.0795 121.555 92.2472 122.007 92.2443 122.55C92.2472 123.047 92.1037 123.489 91.8139 123.875C91.527 124.261 91.1307 124.565 90.625 124.787C90.1193 125.009 89.5398 125.119 88.8864 125.119Z",
              fill: "black"
            }
          )
        ]
      }
    );
  }
  var computeOutlineHeadings = (blocks = []) => {
    return blocks.filter((block) => block.name === "core/heading").map((block) => ({
      ...block,
      level: block.attributes.level,
      isEmpty: isEmptyHeading(block)
    }));
  };
  var isEmptyHeading = (heading) => !heading.attributes.content || heading.attributes.content.trim().length === 0;
  function DocumentOutline({
    onSelect,
    hasOutlineItemsDisabled
  }) {
    const { selectBlock: selectBlock2 } = (0, import_data84.useDispatch)(import_block_editor41.store);
    const { title, isTitleSupported } = (0, import_data84.useSelect)((select6) => {
      const { getEditedPostAttribute: getEditedPostAttribute2 } = select6(store);
      const { getPostType } = select6(import_core_data61.store);
      const postType2 = getPostType(getEditedPostAttribute2("type"));
      return {
        title: getEditedPostAttribute2("title"),
        isTitleSupported: postType2?.supports?.title ?? false
      };
    });
    const blocks = (0, import_data84.useSelect)((select6) => {
      const { getClientIdsWithDescendants: getClientIdsWithDescendants2, getBlock: getBlock2 } = select6(import_block_editor41.store);
      const clientIds = getClientIdsWithDescendants2();
      return clientIds.map((id) => getBlock2(id));
    });
    const contentBlocks = (0, import_data84.useSelect)((select6) => {
      if (select6(store).getRenderingMode() === "post-only") {
        return void 0;
      }
      const { getBlocksByName, getClientIdsOfDescendants: getClientIdsOfDescendants2 } = select6(import_block_editor41.store);
      const [postContentClientId] = getBlocksByName("core/post-content");
      if (!postContentClientId) {
        return void 0;
      }
      return getClientIdsOfDescendants2(postContentClientId);
    }, []);
    const prevHeadingLevelRef = (0, import_element92.useRef)(1);
    const headings = (0, import_element92.useMemo)(
      () => computeOutlineHeadings(blocks),
      [blocks]
    );
    if (headings.length < 1) {
      return /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)("div", { className: "editor-document-outline has-no-headings", children: [
        /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(EmptyOutlineIllustration, {}),
        /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("p", { children: (0, import_i18n130.__)(
          "Navigate the structure of your document and address issues like empty or incorrect heading levels."
        ) })
      ] });
    }
    const titleNode = document.querySelector(".editor-post-title__input");
    const hasTitle = isTitleSupported && title && titleNode;
    const countByLevel = headings.reduce(
      (acc, heading) => ({
        ...acc,
        [heading.level]: (acc[heading.level] || 0) + 1
      }),
      {}
    );
    const hasMultipleH1 = countByLevel[1] > 1;
    function isContentBlock(clientId) {
      return Array.isArray(contentBlocks) ? contentBlocks.includes(clientId) : true;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("div", { className: "document-outline", children: /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)("ul", { children: [
      hasTitle && /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
        item_default,
        {
          level: (0, import_i18n130.__)("Title"),
          isValid: true,
          onSelect,
          href: `#${titleNode.id}`,
          isDisabled: hasOutlineItemsDisabled,
          children: title
        }
      ),
      headings.map((item) => {
        const isIncorrectLevel = item.level > prevHeadingLevelRef.current + 1;
        const isValid2 = !item.isEmpty && !isIncorrectLevel && !!item.level && (item.level !== 1 || !hasMultipleH1 && !hasTitle);
        prevHeadingLevelRef.current = item.level;
        return /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)(
          item_default,
          {
            level: `H${item.level}`,
            isValid: isValid2,
            isDisabled: hasOutlineItemsDisabled || !isContentBlock(item.clientId),
            href: `#block-${item.clientId}`,
            onSelect: () => {
              selectBlock2(item.clientId);
              onSelect?.();
            },
            children: [
              item.isEmpty ? emptyHeadingContent : (0, import_rich_text2.getTextContent)(
                (0, import_rich_text2.create)({
                  html: item.attributes.content
                })
              ),
              isIncorrectLevel && incorrectLevelContent,
              item.level === 1 && hasMultipleH1 && multipleH1Headings,
              hasTitle && item.level === 1 && !hasMultipleH1 && singleH1Headings
            ]
          },
          item.clientId
        );
      })
    ] }) });
  }

  // packages/editor/build-module/components/document-outline/check.mjs
  var import_data85 = __toESM(require_data(), 1);
  var import_block_editor42 = __toESM(require_block_editor(), 1);
  function DocumentOutlineCheck({ children }) {
    const hasHeadings = (0, import_data85.useSelect)((select6) => {
      const { getGlobalBlockCount: getGlobalBlockCount2 } = select6(import_block_editor42.store);
      return getGlobalBlockCount2("core/heading") > 0;
    });
    if (!hasHeadings) {
      return null;
    }
    return children;
  }

  // packages/editor/build-module/components/global-keyboard-shortcuts/register-shortcuts.mjs
  var import_element93 = __toESM(require_element(), 1);
  var import_data86 = __toESM(require_data(), 1);
  var import_i18n131 = __toESM(require_i18n(), 1);
  var import_block_editor43 = __toESM(require_block_editor(), 1);
  var import_keyboard_shortcuts4 = __toESM(require_keyboard_shortcuts(), 1);
  var import_keycodes8 = __toESM(require_keycodes(), 1);
  var import_jsx_runtime218 = __toESM(require_jsx_runtime(), 1);
  function EditorKeyboardShortcutsRegister() {
    const { registerShortcut } = (0, import_data86.useDispatch)(import_keyboard_shortcuts4.store);
    (0, import_element93.useEffect)(() => {
      registerShortcut({
        name: "core/editor/toggle-mode",
        category: "global",
        description: (0, import_i18n131.__)("Switch between visual editor and code editor."),
        keyCombination: {
          modifier: "secondary",
          character: "m"
        }
      });
      registerShortcut({
        name: "core/editor/save",
        category: "global",
        description: (0, import_i18n131.__)("Save your changes."),
        keyCombination: {
          modifier: "primary",
          character: "s"
        }
      });
      registerShortcut({
        name: "core/editor/undo",
        category: "global",
        description: (0, import_i18n131.__)("Undo your last changes."),
        keyCombination: {
          modifier: "primary",
          character: "z"
        }
      });
      registerShortcut({
        name: "core/editor/redo",
        category: "global",
        description: (0, import_i18n131.__)("Redo your last undo."),
        keyCombination: {
          modifier: "primaryShift",
          character: "z"
        },
        // Disable on Apple OS because it conflicts with the browser's
        // history shortcut. It's a fine alias for both Windows and Linux.
        // Since there's no conflict for Ctrl+Shift+Z on both Windows and
        // Linux, we keep it as the default for consistency.
        aliases: (0, import_keycodes8.isAppleOS)() ? [] : [
          {
            modifier: "primary",
            character: "y"
          }
        ]
      });
      registerShortcut({
        name: "core/editor/toggle-list-view",
        category: "global",
        description: (0, import_i18n131.__)("Show or hide the List View."),
        keyCombination: {
          modifier: "access",
          character: "o"
        }
      });
      registerShortcut({
        name: "core/editor/toggle-distraction-free",
        category: "global",
        description: (0, import_i18n131.__)("Enter or exit distraction free mode."),
        keyCombination: {
          modifier: "primaryShift",
          character: "\\"
        }
      });
      registerShortcut({
        name: "core/editor/toggle-sidebar",
        category: "global",
        description: (0, import_i18n131.__)("Show or hide the Settings panel."),
        keyCombination: {
          modifier: "primaryShift",
          character: ","
        }
      });
      registerShortcut({
        name: "core/editor/keyboard-shortcuts",
        category: "main",
        description: (0, import_i18n131.__)("Display these keyboard shortcuts."),
        keyCombination: {
          modifier: "access",
          character: "h"
        }
      });
      registerShortcut({
        name: "core/editor/new-note",
        category: "block",
        description: (0, import_i18n131.__)("Add a new note."),
        keyCombination: {
          modifier: "primaryAlt",
          character: "m"
        }
      });
      registerShortcut({
        name: "core/editor/next-region",
        category: "global",
        description: (0, import_i18n131.__)("Navigate to the next part of the editor."),
        keyCombination: {
          modifier: "ctrl",
          character: "`"
        },
        aliases: [
          {
            modifier: "access",
            character: "n"
          }
        ]
      });
      registerShortcut({
        name: "core/editor/previous-region",
        category: "global",
        description: (0, import_i18n131.__)("Navigate to the previous part of the editor."),
        keyCombination: {
          modifier: "ctrlShift",
          character: "`"
        },
        aliases: [
          {
            modifier: "access",
            character: "p"
          },
          {
            modifier: "ctrlShift",
            character: "~"
          }
        ]
      });
    }, [registerShortcut]);
    return /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(import_block_editor43.BlockEditorKeyboardShortcuts.Register, {});
  }
  var register_shortcuts_default = EditorKeyboardShortcutsRegister;

  // packages/editor/build-module/components/editor-history/redo.mjs
  var import_i18n132 = __toESM(require_i18n(), 1);
  var import_components106 = __toESM(require_components(), 1);
  var import_data87 = __toESM(require_data(), 1);
  var import_keycodes9 = __toESM(require_keycodes(), 1);
  var import_element94 = __toESM(require_element(), 1);
  var import_jsx_runtime219 = __toESM(require_jsx_runtime(), 1);
  function EditorHistoryRedo(props, ref) {
    const shortcut = (0, import_keycodes9.isAppleOS)() ? import_keycodes9.displayShortcut.primaryShift("z") : import_keycodes9.displayShortcut.primary("y");
    const hasRedo = (0, import_data87.useSelect)(
      (select6) => select6(store).hasEditorRedo(),
      []
    );
    const { redo: redo2 } = (0, import_data87.useDispatch)(store);
    return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
      import_components106.Button,
      {
        __next40pxDefaultSize: true,
        ...props,
        ref,
        icon: !(0, import_i18n132.isRTL)() ? redo_default : undo_default,
        label: (0, import_i18n132.__)("Redo"),
        shortcut,
        "aria-disabled": !hasRedo,
        onClick: hasRedo ? redo2 : void 0,
        className: "editor-history__redo"
      }
    );
  }
  var redo_default2 = (0, import_element94.forwardRef)(EditorHistoryRedo);

  // packages/editor/build-module/components/editor-history/undo.mjs
  var import_i18n133 = __toESM(require_i18n(), 1);
  var import_components107 = __toESM(require_components(), 1);
  var import_data88 = __toESM(require_data(), 1);
  var import_keycodes10 = __toESM(require_keycodes(), 1);
  var import_element95 = __toESM(require_element(), 1);
  var import_jsx_runtime220 = __toESM(require_jsx_runtime(), 1);
  function EditorHistoryUndo(props, ref) {
    const hasUndo = (0, import_data88.useSelect)(
      (select6) => select6(store).hasEditorUndo(),
      []
    );
    const { undo: undo2 } = (0, import_data88.useDispatch)(store);
    return /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
      import_components107.Button,
      {
        __next40pxDefaultSize: true,
        ...props,
        ref,
        icon: !(0, import_i18n133.isRTL)() ? undo_default : redo_default,
        label: (0, import_i18n133.__)("Undo"),
        shortcut: import_keycodes10.displayShortcut.primary("z"),
        "aria-disabled": !hasUndo,
        onClick: hasUndo ? undo2 : void 0,
        className: "editor-history__undo"
      }
    );
  }
  var undo_default2 = (0, import_element95.forwardRef)(EditorHistoryUndo);

  // packages/editor/build-module/components/editor-notices/index.mjs
  var import_deprecated9 = __toESM(require_deprecated(), 1);
  var import_notices18 = __toESM(require_notices(), 1);

  // packages/editor/build-module/components/template-validation-notice/index.mjs
  var import_components108 = __toESM(require_components(), 1);
  var import_i18n134 = __toESM(require_i18n(), 1);
  var import_data89 = __toESM(require_data(), 1);
  var import_element96 = __toESM(require_element(), 1);
  var import_block_editor44 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime221 = __toESM(require_jsx_runtime(), 1);
  function TemplateValidationNotice() {
    const [showConfirmDialog, setShowConfirmDialog] = (0, import_element96.useState)(false);
    const isValid2 = (0, import_data89.useSelect)((select6) => {
      return select6(import_block_editor44.store).isValidTemplate();
    }, []);
    const { setTemplateValidity: setTemplateValidity2, synchronizeTemplate: synchronizeTemplate2 } = (0, import_data89.useDispatch)(import_block_editor44.store);
    if (isValid2) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)(import_jsx_runtime221.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
        import_components108.Notice,
        {
          className: "editor-template-validation-notice",
          isDismissible: false,
          status: "warning",
          actions: [
            {
              label: (0, import_i18n134.__)("Keep it as is"),
              onClick: () => setTemplateValidity2(true)
            },
            {
              label: (0, import_i18n134.__)("Reset the template"),
              onClick: () => setShowConfirmDialog(true)
            }
          ],
          children: (0, import_i18n134.__)(
            "The content of your post doesn\u2019t match the template assigned to your post type."
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
        import_components108.__experimentalConfirmDialog,
        {
          isOpen: showConfirmDialog,
          confirmButtonText: (0, import_i18n134.__)("Reset"),
          onConfirm: () => {
            setShowConfirmDialog(false);
            synchronizeTemplate2();
          },
          onCancel: () => setShowConfirmDialog(false),
          size: "medium",
          children: (0, import_i18n134.__)(
            "Resetting the template may result in loss of content, do you want to continue?"
          )
        }
      )
    ] });
  }

  // packages/editor/build-module/components/editor-notices/index.mjs
  var import_jsx_runtime222 = __toESM(require_jsx_runtime(), 1);
  function EditorNotices() {
    (0, import_deprecated9.default)("wp.editor.EditorNotices", {
      since: "7.0",
      version: "7.2",
      alternative: "wp.notices.InlineNotices"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(
      import_notices18.InlineNotices,
      {
        pinnedNoticesClassName: "components-editor-notices__pinned",
        dismissibleNoticesClassName: "components-editor-notices__dismissible",
        children: /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(TemplateValidationNotice, {})
      }
    );
  }
  var editor_notices_default = EditorNotices;

  // packages/editor/build-module/components/editor-snackbars/index.mjs
  var import_deprecated10 = __toESM(require_deprecated(), 1);
  var import_notices19 = __toESM(require_notices(), 1);
  var import_jsx_runtime223 = __toESM(require_jsx_runtime(), 1);
  function EditorSnackbars() {
    (0, import_deprecated10.default)("wp.editor.EditorSnackbars", {
      since: "7.0",
      version: "7.2",
      alternative: "wp.notices.SnackbarNotices"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(import_notices19.SnackbarNotices, { className: "components-editor-notices__snackbar" });
  }

  // packages/editor/build-module/components/entities-saved-states/index.mjs
  var import_components111 = __toESM(require_components(), 1);
  var import_i18n137 = __toESM(require_i18n(), 1);
  var import_element98 = __toESM(require_element(), 1);
  var import_compose20 = __toESM(require_compose(), 1);
  var import_data93 = __toESM(require_data(), 1);

  // packages/editor/build-module/components/entities-saved-states/entity-type-list.mjs
  var import_i18n136 = __toESM(require_i18n(), 1);
  var import_data91 = __toESM(require_data(), 1);
  var import_components110 = __toESM(require_components(), 1);
  var import_core_data63 = __toESM(require_core_data(), 1);

  // packages/editor/build-module/components/entities-saved-states/entity-record-item.mjs
  var import_components109 = __toESM(require_components(), 1);
  var import_i18n135 = __toESM(require_i18n(), 1);
  var import_data90 = __toESM(require_data(), 1);
  var import_core_data62 = __toESM(require_core_data(), 1);
  var import_html_entities12 = __toESM(require_html_entities(), 1);
  var import_jsx_runtime224 = __toESM(require_jsx_runtime(), 1);
  function EntityRecordItem({ record, checked, onChange }) {
    const { name: name2, kind, title, key } = record;
    const { entityRecordTitle, hasPostMetaChanges: hasPostMetaChanges2 } = (0, import_data90.useSelect)(
      (select6) => {
        if ("postType" !== kind || "wp_template" !== name2) {
          return {
            entityRecordTitle: title,
            hasPostMetaChanges: unlock(
              select6(store)
            ).hasPostMetaChanges(name2, key)
          };
        }
        const template2 = select6(import_core_data62.store).getEditedEntityRecord(
          kind,
          name2,
          key
        );
        const { default_template_types: templateTypes = [] } = select6(import_core_data62.store).getCurrentTheme() ?? {};
        return {
          entityRecordTitle: getTemplateInfo({
            template: template2,
            templateTypes
          }).title,
          hasPostMetaChanges: unlock(
            select6(store)
          ).hasPostMetaChanges(name2, key)
        };
      },
      [name2, kind, title, key]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)(import_jsx_runtime224.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_components109.PanelRow, { children: /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
        import_components109.CheckboxControl,
        {
          label: (0, import_html_entities12.decodeEntities)(entityRecordTitle) || (0, import_i18n135.__)("Untitled"),
          checked,
          onChange,
          className: "entities-saved-states__change-control"
        }
      ) }),
      hasPostMetaChanges2 && /* @__PURE__ */ (0, import_jsx_runtime224.jsx)("ul", { className: "entities-saved-states__changes", children: /* @__PURE__ */ (0, import_jsx_runtime224.jsx)("li", { children: (0, import_i18n135.__)("Post Meta.") }) })
    ] });
  }

  // packages/editor/build-module/components/entities-saved-states/entity-type-list.mjs
  var import_jsx_runtime225 = __toESM(require_jsx_runtime(), 1);
  function getEntityDescription(entity, count) {
    switch (entity) {
      case "site":
        return 1 === count ? (0, import_i18n136.__)("This change will affect your whole site.") : (0, import_i18n136.__)("These changes will affect your whole site.");
      case "wp_template":
        return (0, import_i18n136.__)(
          "This change will affect other parts of your site that use this template."
        );
      case "page":
      case "post":
        return (0, import_i18n136.__)("The following has been modified.");
    }
  }
  function GlobalStylesDescription({ record }) {
    const { editedRecord, savedRecord } = (0, import_data91.useSelect)(
      (select6) => {
        const { getEditedEntityRecord, getEntityRecord } = select6(import_core_data63.store);
        return {
          editedRecord: getEditedEntityRecord(
            record.kind,
            record.name,
            record.key
          ),
          savedRecord: getEntityRecord(
            record.kind,
            record.name,
            record.key
          )
        };
      },
      [record.kind, record.name, record.key]
    );
    const globalStylesChanges = getGlobalStylesChanges(
      editedRecord,
      savedRecord,
      {
        maxResults: 10
      }
    );
    return globalStylesChanges.length ? /* @__PURE__ */ (0, import_jsx_runtime225.jsx)("ul", { className: "entities-saved-states__changes", children: globalStylesChanges.map((change) => /* @__PURE__ */ (0, import_jsx_runtime225.jsx)("li", { children: change }, change)) }) : null;
  }
  function EntityDescription({ record, count }) {
    if ("globalStyles" === record?.name) {
      return null;
    }
    const description = getEntityDescription(record?.name, count);
    return description ? /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(import_components110.PanelRow, { children: description }) : null;
  }
  function EntityTypeList({
    list,
    unselectedEntities,
    setUnselectedEntities
  }) {
    const count = list.length;
    const firstRecord = list[0];
    const entityConfig = (0, import_data91.useSelect)(
      (select6) => select6(import_core_data63.store).getEntityConfig(
        firstRecord.kind,
        firstRecord.name
      ),
      [firstRecord.kind, firstRecord.name]
    );
    let entityLabel = entityConfig.label;
    if (firstRecord?.name === "wp_template_part") {
      entityLabel = 1 === count ? (0, import_i18n136.__)("Template Part") : (0, import_i18n136.__)("Template Parts");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime225.jsxs)(
      import_components110.PanelBody,
      {
        title: entityLabel,
        initialOpen: true,
        className: "entities-saved-states__panel-body",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(EntityDescription, { record: firstRecord, count }),
          list.map((record) => {
            return /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
              EntityRecordItem,
              {
                record,
                checked: !unselectedEntities.some(
                  (elt) => elt.kind === record.kind && elt.name === record.name && elt.key === record.key && elt.property === record.property
                ),
                onChange: (value) => setUnselectedEntities(record, value)
              },
              record.key || record.property
            );
          }),
          "globalStyles" === firstRecord?.name && /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(GlobalStylesDescription, { record: firstRecord })
        ]
      }
    );
  }

  // packages/editor/build-module/components/entities-saved-states/hooks/use-is-dirty.mjs
  var import_data92 = __toESM(require_data(), 1);
  var import_core_data64 = __toESM(require_core_data(), 1);
  var import_element97 = __toESM(require_element(), 1);
  var useIsDirty = () => {
    const { editedEntities, siteEdits, siteEntityConfig } = (0, import_data92.useSelect)(
      (select6) => {
        const {
          __experimentalGetDirtyEntityRecords,
          getEntityRecordEdits,
          getEntityConfig
        } = select6(import_core_data64.store);
        return {
          editedEntities: __experimentalGetDirtyEntityRecords(),
          siteEdits: getEntityRecordEdits("root", "site"),
          siteEntityConfig: getEntityConfig("root", "site")
        };
      },
      []
    );
    const dirtyEntityRecords = (0, import_element97.useMemo)(() => {
      const editedEntitiesWithoutSite = editedEntities.filter(
        (record) => !(record.kind === "root" && record.name === "site")
      );
      const siteEntityLabels = siteEntityConfig?.meta?.labels ?? {};
      const editedSiteEntities = [];
      for (const property in siteEdits) {
        editedSiteEntities.push({
          kind: "root",
          name: "site",
          title: siteEntityLabels[property] || property,
          property
        });
      }
      return [...editedEntitiesWithoutSite, ...editedSiteEntities];
    }, [editedEntities, siteEdits, siteEntityConfig]);
    const [unselectedEntities, _setUnselectedEntities] = (0, import_element97.useState)([]);
    const setUnselectedEntities = ({ kind, name: name2, key, property }, checked) => {
      if (checked) {
        _setUnselectedEntities(
          unselectedEntities.filter(
            (elt) => elt.kind !== kind || elt.name !== name2 || elt.key !== key || elt.property !== property
          )
        );
      } else {
        _setUnselectedEntities([
          ...unselectedEntities,
          { kind, name: name2, key, property }
        ]);
      }
    };
    const isDirty = dirtyEntityRecords.length - unselectedEntities.length > 0;
    return {
      dirtyEntityRecords,
      isDirty,
      setUnselectedEntities,
      unselectedEntities
    };
  };

  // packages/editor/build-module/components/entities-saved-states/index.mjs
  var import_jsx_runtime226 = __toESM(require_jsx_runtime(), 1);
  function identity(values) {
    return values;
  }
  function EntitiesSavedStates({
    close,
    renderDialog,
    variant
  }) {
    const isDirtyProps = useIsDirty();
    return /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
      EntitiesSavedStatesExtensible,
      {
        close,
        renderDialog,
        variant,
        ...isDirtyProps
      }
    );
  }
  function EntitiesSavedStatesExtensible({
    additionalPrompt = void 0,
    close,
    onSave = identity,
    saveEnabled: saveEnabledProp = void 0,
    saveLabel = (0, import_i18n137.__)("Save"),
    renderDialog,
    dirtyEntityRecords,
    isDirty,
    setUnselectedEntities,
    unselectedEntities,
    variant = "default",
    successNoticeContent
  }) {
    const saveButtonRef = (0, import_element98.useRef)();
    const { saveDirtyEntities: saveDirtyEntities2 } = unlock((0, import_data93.useDispatch)(store));
    const partitionedSavables = dirtyEntityRecords.reduce((acc, record) => {
      const { name: name2 } = record;
      if (!acc[name2]) {
        acc[name2] = [];
      }
      acc[name2].push(record);
      return acc;
    }, {});
    const {
      site: siteSavables,
      wp_template: templateSavables,
      wp_template_part: templatePartSavables,
      ...contentSavables
    } = partitionedSavables;
    const sortedPartitionedSavables = [
      siteSavables,
      templateSavables,
      templatePartSavables,
      ...Object.values(contentSavables)
    ].filter(Array.isArray);
    const saveEnabled = saveEnabledProp ?? isDirty;
    const dismissPanel = (0, import_element98.useCallback)(() => close(), [close]);
    const [saveDialogRef, saveDialogProps] = (0, import_compose20.__experimentalUseDialog)({
      onClose: () => dismissPanel()
    });
    const dialogLabelId = (0, import_compose20.useInstanceId)(
      EntitiesSavedStatesExtensible,
      "entities-saved-states__panel-label"
    );
    const dialogDescriptionId = (0, import_compose20.useInstanceId)(
      EntitiesSavedStatesExtensible,
      "entities-saved-states__panel-description"
    );
    const selectItemsToSaveDescription = !!dirtyEntityRecords.length ? (0, import_i18n137.__)("Select the items you want to save.") : void 0;
    const isInline = variant === "inline";
    const actionButtons = /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(import_jsx_runtime226.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
        import_components111.FlexItem,
        {
          isBlock: isInline ? false : true,
          as: import_components111.Button,
          variant: isInline ? "tertiary" : "secondary",
          size: isInline ? void 0 : "compact",
          onClick: dismissPanel,
          children: (0, import_i18n137.__)("Cancel")
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
        import_components111.FlexItem,
        {
          isBlock: isInline ? false : true,
          as: import_components111.Button,
          ref: saveButtonRef,
          variant: "primary",
          size: isInline ? void 0 : "compact",
          disabled: !saveEnabled,
          accessibleWhenDisabled: true,
          onClick: () => saveDirtyEntities2({
            onSave,
            dirtyEntityRecords,
            entitiesToSkip: unselectedEntities,
            close,
            successNoticeContent
          }),
          className: "editor-entities-saved-states__save-button",
          children: saveLabel
        }
      )
    ] });
    return /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(
      "div",
      {
        ref: renderDialog ? saveDialogRef : void 0,
        ...renderDialog && saveDialogProps,
        className: clsx_default("entities-saved-states__panel", {
          "is-inline": isInline
        }),
        role: renderDialog ? "dialog" : void 0,
        "aria-labelledby": renderDialog ? dialogLabelId : void 0,
        "aria-describedby": renderDialog ? dialogDescriptionId : void 0,
        children: [
          !isInline && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(import_components111.Flex, { className: "entities-saved-states__panel-header", gap: 2, children: actionButtons }),
          /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)("div", { className: "entities-saved-states__text-prompt", children: [
            /* @__PURE__ */ (0, import_jsx_runtime226.jsx)("div", { className: "entities-saved-states__text-prompt--header-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
              "strong",
              {
                id: renderDialog ? dialogLabelId : void 0,
                className: "entities-saved-states__text-prompt--header",
                children: (0, import_i18n137.__)("Are you ready to save?")
              }
            ) }),
            /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)("div", { id: renderDialog ? dialogDescriptionId : void 0, children: [
              additionalPrompt,
              /* @__PURE__ */ (0, import_jsx_runtime226.jsx)("p", { className: "entities-saved-states__text-prompt--changes-count", children: isDirty ? (0, import_element98.createInterpolateElement)(
                (0, import_i18n137.sprintf)(
                  /* translators: %d: number of site changes waiting to be saved. */
                  (0, import_i18n137._n)(
                    "There is <strong>%d site change</strong> waiting to be saved.",
                    "There are <strong>%d site changes</strong> waiting to be saved.",
                    dirtyEntityRecords.length
                  ),
                  dirtyEntityRecords.length
                ),
                { strong: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)("strong", {}) }
              ) : selectItemsToSaveDescription })
            ] })
          ] }),
          sortedPartitionedSavables.map((list) => {
            return /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
              EntityTypeList,
              {
                list,
                unselectedEntities,
                setUnselectedEntities
              },
              list[0].name
            );
          }),
          isInline && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
            import_components111.Flex,
            {
              direction: "row",
              justify: "flex-end",
              className: "entities-saved-states__panel-footer",
              children: actionButtons
            }
          )
        ]
      }
    );
  }

  // packages/editor/build-module/components/error-boundary/index.mjs
  var import_element99 = __toESM(require_element(), 1);
  var import_i18n138 = __toESM(require_i18n(), 1);
  var import_components112 = __toESM(require_components(), 1);
  var import_data94 = __toESM(require_data(), 1);
  var import_compose21 = __toESM(require_compose(), 1);
  var import_hooks41 = __toESM(require_hooks(), 1);
  var import_jsx_runtime227 = __toESM(require_jsx_runtime(), 1);
  function getContent() {
    try {
      return (0, import_data94.select)(store).getEditedPostContent();
    } catch (error) {
    }
  }
  function CopyButton({ text, children, variant = "secondary" }) {
    const ref = (0, import_compose21.useCopyToClipboard)(text);
    return /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(import_components112.Button, { __next40pxDefaultSize: true, variant, ref, children });
  }
  var ErrorBoundary = class extends import_element99.Component {
    constructor() {
      super(...arguments);
      this.state = {
        error: null
      };
    }
    componentDidCatch(error) {
      (0, import_hooks41.doAction)("editor.ErrorBoundary.errorLogged", error);
    }
    static getDerivedStateFromError(error) {
      return { error };
    }
    render() {
      const { error } = this.state;
      const { canCopyContent = false } = this.props;
      if (!error) {
        return this.props.children;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(
        import_components112.__experimentalHStack,
        {
          className: "editor-error-boundary",
          alignment: "baseline",
          spacing: 4,
          justify: "space-between",
          expanded: false,
          wrap: true,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(import_components112.__experimentalText, { as: "p", children: (0, import_i18n138.__)("The editor has encountered an unexpected error.") }),
            /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(import_components112.__experimentalHStack, { expanded: false, children: [
              canCopyContent && /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(CopyButton, { text: getContent, children: (0, import_i18n138.__)("Copy contents") }),
              /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(CopyButton, { variant: "primary", text: error?.stack, children: (0, import_i18n138.__)("Copy error") })
            ] })
          ]
        }
      );
    }
  };
  var error_boundary_default = ErrorBoundary;

  // packages/editor/build-module/components/local-autosave-monitor/index.mjs
  var import_element100 = __toESM(require_element(), 1);
  var import_compose22 = __toESM(require_compose(), 1);
  var import_data95 = __toESM(require_data(), 1);
  var import_i18n139 = __toESM(require_i18n(), 1);
  var import_blocks24 = __toESM(require_blocks(), 1);
  var import_notices20 = __toESM(require_notices(), 1);
  var import_jsx_runtime228 = __toESM(require_jsx_runtime(), 1);
  var requestIdleCallback = window.requestIdleCallback ? window.requestIdleCallback : window.requestAnimationFrame;
  var hasStorageSupport;
  var hasSessionStorageSupport = () => {
    if (hasStorageSupport !== void 0) {
      return hasStorageSupport;
    }
    try {
      window.sessionStorage.setItem("__wpEditorTestSessionStorage", "");
      window.sessionStorage.removeItem("__wpEditorTestSessionStorage");
      hasStorageSupport = true;
    } catch {
      hasStorageSupport = false;
    }
    return hasStorageSupport;
  };
  function useAutosaveNotice() {
    const { postId: postId2, isEditedPostNew: isEditedPostNew2, hasRemoteAutosave } = (0, import_data95.useSelect)(
      (select6) => ({
        postId: select6(store).getCurrentPostId(),
        isEditedPostNew: select6(store).isEditedPostNew(),
        hasRemoteAutosave: !!select6(store).getEditorSettings().autosave
      }),
      []
    );
    const { getEditedPostAttribute: getEditedPostAttribute2 } = (0, import_data95.useSelect)(store);
    const { createWarningNotice, removeNotice } = (0, import_data95.useDispatch)(import_notices20.store);
    const { editPost: editPost2, resetEditorBlocks: resetEditorBlocks2 } = (0, import_data95.useDispatch)(store);
    (0, import_element100.useEffect)(() => {
      let localAutosave = localAutosaveGet(postId2, isEditedPostNew2);
      if (!localAutosave) {
        return;
      }
      try {
        localAutosave = JSON.parse(localAutosave);
      } catch {
        return;
      }
      const { post_title: title, content, excerpt } = localAutosave;
      const edits = { title, content, excerpt };
      {
        const hasDifference = Object.keys(edits).some((key) => {
          return edits[key] !== getEditedPostAttribute2(key);
        });
        if (!hasDifference) {
          localAutosaveClear(postId2, isEditedPostNew2);
          return;
        }
      }
      if (hasRemoteAutosave) {
        return;
      }
      const id = "wpEditorAutosaveRestore";
      createWarningNotice(
        (0, import_i18n139.__)(
          "The backup of this post in your browser is different from the version below."
        ),
        {
          id,
          actions: [
            {
              label: (0, import_i18n139.__)("Restore the backup"),
              onClick() {
                const {
                  content: editsContent,
                  ...editsWithoutContent
                } = edits;
                editPost2(editsWithoutContent);
                resetEditorBlocks2((0, import_blocks24.parse)(edits.content));
                removeNotice(id);
              }
            }
          ]
        }
      );
    }, [isEditedPostNew2, postId2]);
  }
  function useAutosavePurge() {
    const { postId: postId2, isEditedPostNew: isEditedPostNew2, isDirty, isAutosaving, didError } = (0, import_data95.useSelect)(
      (select6) => ({
        postId: select6(store).getCurrentPostId(),
        isEditedPostNew: select6(store).isEditedPostNew(),
        isDirty: select6(store).isEditedPostDirty(),
        isAutosaving: select6(store).isAutosavingPost(),
        didError: select6(store).didPostSaveRequestFail()
      }),
      []
    );
    const lastIsDirtyRef = (0, import_element100.useRef)(isDirty);
    const lastIsAutosavingRef = (0, import_element100.useRef)(isAutosaving);
    (0, import_element100.useEffect)(() => {
      if (!didError && (lastIsAutosavingRef.current && !isAutosaving || lastIsDirtyRef.current && !isDirty)) {
        localAutosaveClear(postId2, isEditedPostNew2);
      }
      lastIsDirtyRef.current = isDirty;
      lastIsAutosavingRef.current = isAutosaving;
    }, [isDirty, isAutosaving, didError]);
    const wasEditedPostNew = (0, import_compose22.usePrevious)(isEditedPostNew2);
    const prevPostId = (0, import_compose22.usePrevious)(postId2);
    (0, import_element100.useEffect)(() => {
      if (prevPostId === postId2 && wasEditedPostNew && !isEditedPostNew2) {
        localAutosaveClear(postId2, true);
      }
    }, [isEditedPostNew2, postId2]);
  }
  function LocalAutosaveMonitor() {
    const { autosave: autosave2 } = (0, import_data95.useDispatch)(store);
    const deferredAutosave = (0, import_element100.useCallback)(() => {
      requestIdleCallback(() => autosave2({ local: true }));
    }, []);
    useAutosaveNotice();
    useAutosavePurge();
    const localAutosaveInterval = (0, import_data95.useSelect)(
      (select6) => select6(store).getEditorSettings().localAutosaveInterval,
      []
    );
    return /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
      autosave_monitor_default,
      {
        interval: localAutosaveInterval,
        autosave: deferredAutosave
      }
    );
  }
  var local_autosave_monitor_default = (0, import_compose22.ifCondition)(hasSessionStorageSupport)(LocalAutosaveMonitor);

  // packages/editor/build-module/components/page-attributes/check.mjs
  var import_data96 = __toESM(require_data(), 1);
  var import_core_data65 = __toESM(require_core_data(), 1);
  function PageAttributesCheck({ children }) {
    const supportsPageAttributes = (0, import_data96.useSelect)((select6) => {
      const { getEditedPostAttribute: getEditedPostAttribute2 } = select6(store);
      const { getPostType } = select6(import_core_data65.store);
      const postType2 = getPostType(getEditedPostAttribute2("type"));
      return !!postType2?.supports?.["page-attributes"];
    }, []);
    if (!supportsPageAttributes) {
      return null;
    }
    return children;
  }
  var check_default2 = PageAttributesCheck;

  // packages/editor/build-module/components/page-attributes/order.mjs
  var import_i18n140 = __toESM(require_i18n(), 1);
  var import_components113 = __toESM(require_components(), 1);
  var import_data98 = __toESM(require_data(), 1);
  var import_element101 = __toESM(require_element(), 1);

  // packages/editor/build-module/components/post-type-support-check/index.mjs
  var import_data97 = __toESM(require_data(), 1);
  var import_core_data66 = __toESM(require_core_data(), 1);
  function checkSupport(supports = {}, key) {
    if (supports[key] !== void 0) {
      return !!supports[key];
    }
    const [topKey, subKey] = key.split(".");
    const [subProperties] = Array.isArray(supports[topKey]) ? supports[topKey] : [];
    return Array.isArray(subProperties) ? subProperties.includes(subKey) : !!subProperties?.[subKey];
  }
  function PostTypeSupportCheck({ children, supportKeys }) {
    const postType2 = (0, import_data97.useSelect)((select6) => {
      const { getEditedPostAttribute: getEditedPostAttribute2 } = select6(store);
      const { getPostType } = select6(import_core_data66.store);
      return getPostType(getEditedPostAttribute2("type"));
    }, []);
    let isSupported = !!postType2;
    if (postType2) {
      isSupported = (Array.isArray(supportKeys) ? supportKeys : [supportKeys]).some((key) => checkSupport(postType2.supports, key));
    }
    if (!isSupported) {
      return null;
    }
    return children;
  }
  var post_type_support_check_default = PostTypeSupportCheck;

  // packages/editor/build-module/components/page-attributes/order.mjs
  var import_jsx_runtime229 = __toESM(require_jsx_runtime(), 1);
  function PageAttributesOrder() {
    const order = (0, import_data98.useSelect)(
      (select6) => select6(store).getEditedPostAttribute("menu_order") ?? 0,
      []
    );
    const { editPost: editPost2 } = (0, import_data98.useDispatch)(store);
    const [orderInput, setOrderInput] = (0, import_element101.useState)(null);
    const setUpdatedOrder = (value2) => {
      setOrderInput(value2);
      const newOrder = Number(value2);
      if (Number.isInteger(newOrder) && value2.trim?.() !== "") {
        editPost2({ menu_order: newOrder });
      }
    };
    const value = orderInput ?? order;
    return /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(import_components113.Flex, { children: /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(import_components113.FlexBlock, { children: /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
      import_components113.__experimentalNumberControl,
      {
        __next40pxDefaultSize: true,
        label: (0, import_i18n140.__)("Order"),
        help: (0, import_i18n140.__)("Set the page order."),
        value,
        onChange: setUpdatedOrder,
        hideLabelFromVision: true,
        onBlur: () => {
          setOrderInput(null);
        }
      }
    ) }) });
  }
  function PageAttributesOrderWithChecks() {
    return /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(post_type_support_check_default, { supportKeys: "page-attributes", children: /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(PageAttributesOrder, {}) });
  }

  // packages/editor/build-module/components/page-attributes/panel.mjs
  var import_data100 = __toESM(require_data(), 1);
  var import_core_data68 = __toESM(require_core_data(), 1);

  // packages/editor/build-module/components/page-attributes/parent.mjs
  var import_remove_accents2 = __toESM(require_remove_accents(), 1);
  var import_i18n141 = __toESM(require_i18n(), 1);
  var import_components115 = __toESM(require_components(), 1);
  var import_compose23 = __toESM(require_compose(), 1);
  var import_element103 = __toESM(require_element(), 1);
  var import_data99 = __toESM(require_data(), 1);
  var import_html_entities14 = __toESM(require_html_entities(), 1);
  var import_core_data67 = __toESM(require_core_data(), 1);
  var import_block_editor45 = __toESM(require_block_editor(), 1);
  var import_url12 = __toESM(require_url(), 1);

  // packages/editor/build-module/components/post-panel-row/index.mjs
  var import_components114 = __toESM(require_components(), 1);
  var import_element102 = __toESM(require_element(), 1);
  var import_jsx_runtime230 = __toESM(require_jsx_runtime(), 1);
  var PostPanelRow = (0, import_element102.forwardRef)(({ className, label, children }, ref) => {
    return /* @__PURE__ */ (0, import_jsx_runtime230.jsxs)(
      import_components114.__experimentalHStack,
      {
        className: clsx_default("editor-post-panel__row", className),
        ref,
        children: [
          label && /* @__PURE__ */ (0, import_jsx_runtime230.jsx)("div", { className: "editor-post-panel__row-label", children: label }),
          /* @__PURE__ */ (0, import_jsx_runtime230.jsx)("div", { className: "editor-post-panel__row-control", children })
        ]
      }
    );
  });
  var post_panel_row_default = PostPanelRow;

  // packages/editor/build-module/utils/terms.mjs
  var import_html_entities13 = __toESM(require_html_entities(), 1);
  function buildTermsTree2(flatTerms) {
    const flatTermsWithParentAndChildren = flatTerms.map((term) => {
      return {
        children: [],
        parent: void 0,
        ...term
      };
    });
    if (flatTermsWithParentAndChildren.some(
      ({ parent }) => parent === void 0
    )) {
      return flatTermsWithParentAndChildren;
    }
    const termsByParent = flatTermsWithParentAndChildren.reduce(
      (acc, term) => {
        const { parent } = term;
        if (!acc[parent]) {
          acc[parent] = [];
        }
        acc[parent].push(term);
        return acc;
      },
      {}
    );
    const fillWithChildren = (terms) => {
      return terms.map((term) => {
        const children = termsByParent[term.id];
        return {
          ...term,
          children: children && children.length ? fillWithChildren(children) : []
        };
      });
    };
    return fillWithChildren(termsByParent["0"] || []);
  }
  var unescapeString = (arg) => {
    return (0, import_html_entities13.decodeEntities)(arg);
  };
  var unescapeTerm = (term) => {
    return {
      ...term,
      name: unescapeString(term.name)
    };
  };
  var unescapeTerms = (terms) => {
    return (terms ?? []).map(unescapeTerm);
  };

  // packages/editor/build-module/components/page-attributes/parent.mjs
  var import_jsx_runtime231 = __toESM(require_jsx_runtime(), 1);
  function getTitle(post2) {
    return post2?.title?.rendered ? (0, import_html_entities14.decodeEntities)(post2.title.rendered) : `#${post2.id} (${(0, import_i18n141.__)("no title")})`;
  }
  var getItemPriority2 = (name2, searchValue) => {
    const normalizedName = (0, import_remove_accents2.default)(name2 || "").toLowerCase();
    const normalizedSearch = (0, import_remove_accents2.default)(searchValue || "").toLowerCase();
    if (normalizedName === normalizedSearch) {
      return 0;
    }
    if (normalizedName.startsWith(normalizedSearch)) {
      return normalizedName.length;
    }
    return Infinity;
  };
  function PageAttributesParent2() {
    const { editPost: editPost2 } = (0, import_data99.useDispatch)(store);
    const [fieldValue, setFieldValue] = (0, import_element103.useState)(false);
    const {
      isHierarchical,
      parentPostId,
      parentPostTitle,
      pageItems,
      isLoading
    } = (0, import_data99.useSelect)(
      (select6) => {
        const {
          getPostType,
          getEntityRecords,
          getEntityRecord,
          isResolving
        } = select6(import_core_data67.store);
        const { getCurrentPostId: getCurrentPostId2, getEditedPostAttribute: getEditedPostAttribute2 } = select6(store);
        const postTypeSlug = getEditedPostAttribute2("type");
        const pageId = getEditedPostAttribute2("parent");
        const pType = getPostType(postTypeSlug);
        const postId2 = getCurrentPostId2();
        const postIsHierarchical = pType?.hierarchical ?? false;
        const query = {
          per_page: 100,
          exclude: postId2,
          parent_exclude: postId2,
          orderby: "menu_order",
          order: "asc",
          _fields: "id,title,parent"
        };
        if (!!fieldValue) {
          query.search = fieldValue;
          query.orderby = "relevance";
        }
        const parentPost = pageId ? getEntityRecord("postType", postTypeSlug, pageId) : null;
        return {
          isHierarchical: postIsHierarchical,
          parentPostId: pageId,
          parentPostTitle: parentPost ? getTitle(parentPost) : "",
          pageItems: postIsHierarchical ? getEntityRecords("postType", postTypeSlug, query) : null,
          isLoading: postIsHierarchical ? isResolving("getEntityRecords", [
            "postType",
            postTypeSlug,
            query
          ]) : false
        };
      },
      [fieldValue]
    );
    const parentOptions = (0, import_element103.useMemo)(() => {
      const getOptionsFromTree = (tree2, level = 0) => {
        const mappedNodes = tree2.map((treeNode) => [
          {
            value: treeNode.id,
            label: "\u2014 ".repeat(level) + (0, import_html_entities14.decodeEntities)(treeNode.name),
            rawName: treeNode.name
          },
          ...getOptionsFromTree(treeNode.children || [], level + 1)
        ]);
        const sortedNodes = mappedNodes.sort(([a3], [b3]) => {
          const priorityA = getItemPriority2(a3.rawName, fieldValue);
          const priorityB = getItemPriority2(b3.rawName, fieldValue);
          return priorityA >= priorityB ? 1 : -1;
        });
        return sortedNodes.flat();
      };
      if (!pageItems) {
        return [];
      }
      let tree = pageItems.map((item) => ({
        id: item.id,
        parent: item.parent,
        name: getTitle(item)
      }));
      if (!fieldValue) {
        tree = buildTermsTree2(tree);
      }
      const opts = getOptionsFromTree(tree);
      const optsHasParent = opts.find(
        (item) => item.value === parentPostId
      );
      if (parentPostTitle && !optsHasParent) {
        opts.unshift({
          value: parentPostId,
          label: parentPostTitle
        });
      }
      return opts;
    }, [pageItems, fieldValue, parentPostTitle, parentPostId]);
    if (!isHierarchical) {
      return null;
    }
    const handleKeydown = (inputValue) => {
      setFieldValue(inputValue);
    };
    const handleChange = (selectedPostId) => {
      editPost2({ parent: selectedPostId });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
      import_components115.ComboboxControl,
      {
        __next40pxDefaultSize: true,
        className: "editor-page-attributes__parent",
        label: (0, import_i18n141.__)("Parent"),
        help: (0, import_i18n141.__)("Choose a parent page."),
        value: parentPostId,
        options: parentOptions,
        onFilterValueChange: (0, import_compose23.debounce)(handleKeydown, 300),
        onChange: handleChange,
        hideLabelFromVision: true,
        isLoading
      }
    );
  }
  function PostParentToggle({ isOpen, onClick }) {
    const parentPost = (0, import_data99.useSelect)((select6) => {
      const { getEditedPostAttribute: getEditedPostAttribute2 } = select6(store);
      const parentPostId = getEditedPostAttribute2("parent");
      if (!parentPostId) {
        return null;
      }
      const { getEntityRecord } = select6(import_core_data67.store);
      const postTypeSlug = getEditedPostAttribute2("type");
      return getEntityRecord("postType", postTypeSlug, parentPostId);
    }, []);
    const parentTitle = (0, import_element103.useMemo)(
      () => !parentPost ? (0, import_i18n141.__)("None") : getTitle(parentPost),
      [parentPost]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
      import_components115.Button,
      {
        size: "compact",
        className: "editor-post-parent__panel-toggle",
        variant: "tertiary",
        "aria-expanded": isOpen,
        "aria-label": (
          // translators: %s: Current post parent.
          (0, import_i18n141.sprintf)((0, import_i18n141.__)("Change parent: %s"), parentTitle)
        ),
        onClick,
        children: parentTitle
      }
    );
  }
  function ParentRow() {
    const homeUrl = (0, import_data99.useSelect)((select6) => {
      return select6(import_core_data67.store).getEntityRecord("root", "__unstableBase")?.home;
    }, []);
    const [popoverAnchor, setPopoverAnchor] = (0, import_element103.useState)(null);
    const popoverProps = (0, import_element103.useMemo)(
      () => ({
        // Anchor the popover to the middle of the entire row so that it doesn't
        // move around when the label changes.
        anchor: popoverAnchor,
        placement: "left-start",
        offset: 36,
        shift: true
      }),
      [popoverAnchor]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(post_panel_row_default, { label: (0, import_i18n141.__)("Parent"), ref: setPopoverAnchor, children: /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
      import_components115.Dropdown,
      {
        popoverProps,
        className: "editor-post-parent__panel-dropdown",
        contentClassName: "editor-post-parent__panel-dialog",
        focusOnMount: true,
        renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(PostParentToggle, { isOpen, onClick: onToggle }),
        renderContent: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime231.jsxs)("div", { className: "editor-post-parent", children: [
          /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
            import_block_editor45.__experimentalInspectorPopoverHeader,
            {
              title: (0, import_i18n141.__)("Parent"),
              onClose
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime231.jsxs)("div", { children: [
            (0, import_element103.createInterpolateElement)(
              (0, import_i18n141.sprintf)(
                /* translators: %s: The home URL of the WordPress installation without the scheme. */
                (0, import_i18n141.__)(
                  'Child pages inherit characteristics from their parent, such as URL structure. For instance, if "Pricing" is a child of "Services", its URL would be %s<wbr />/services<wbr />/pricing.'
                ),
                (0, import_url12.filterURLForDisplay)(homeUrl).replace(
                  /([/.])/g,
                  "<wbr />$1"
                )
              ),
              {
                wbr: /* @__PURE__ */ (0, import_jsx_runtime231.jsx)("wbr", {})
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime231.jsx)("p", { children: (0, import_element103.createInterpolateElement)(
              (0, import_i18n141.__)(
                "They also show up as sub-items in the default navigation menu. <a>Learn more.</a>"
              ),
              {
                a: /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
                  import_components115.ExternalLink,
                  {
                    href: (0, import_i18n141.__)(
                      "https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes"
                    )
                  }
                )
              }
            ) })
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(PageAttributesParent2, {})
        ] })
      }
    ) });
  }
  var parent_default2 = PageAttributesParent2;

  // packages/editor/build-module/components/page-attributes/panel.mjs
  var import_jsx_runtime232 = __toESM(require_jsx_runtime(), 1);
  var PANEL_NAME = "page-attributes";
  function AttributesPanel() {
    const { isEnabled, postType: postType2 } = (0, import_data100.useSelect)((select6) => {
      const { getEditedPostAttribute: getEditedPostAttribute2, isEditorPanelEnabled: isEditorPanelEnabled2 } = select6(store);
      const { getPostType } = select6(import_core_data68.store);
      return {
        isEnabled: isEditorPanelEnabled2(PANEL_NAME),
        postType: getPostType(getEditedPostAttribute2("type"))
      };
    }, []);
    if (!isEnabled || !postType2) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(ParentRow, {});
  }
  function PageAttributesPanel() {
    return /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(check_default2, { children: /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(AttributesPanel, {}) });
  }

  // packages/editor/build-module/components/post-template/classic-theme.mjs
  var import_i18n143 = __toESM(require_i18n(), 1);
  var import_components117 = __toESM(require_components(), 1);
  var import_data103 = __toESM(require_data(), 1);
  var import_core_data70 = __toESM(require_core_data(), 1);
  var import_block_editor46 = __toESM(require_block_editor(), 1);
  var import_element106 = __toESM(require_element(), 1);
  var import_notices21 = __toESM(require_notices(), 1);

  // packages/editor/build-module/components/post-template/create-new-template-modal.mjs
  var import_data101 = __toESM(require_data(), 1);
  var import_element104 = __toESM(require_element(), 1);
  var import_blocks25 = __toESM(require_blocks(), 1);
  var import_components116 = __toESM(require_components(), 1);
  var import_i18n142 = __toESM(require_i18n(), 1);
  var import_jsx_runtime233 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_TITLE = (0, import_i18n142.__)("Custom Template");
  function CreateNewTemplateModal({ onClose }) {
    const { defaultBlockTemplate, onNavigateToEntityRecord } = (0, import_data101.useSelect)(
      (select6) => {
        const { getEditorSettings: getEditorSettings2, getCurrentTemplateId: getCurrentTemplateId2 } = select6(store);
        return {
          defaultBlockTemplate: getEditorSettings2().defaultBlockTemplate,
          onNavigateToEntityRecord: getEditorSettings2().onNavigateToEntityRecord,
          getTemplateId: getCurrentTemplateId2
        };
      }
    );
    const { createTemplate: createTemplate2 } = unlock((0, import_data101.useDispatch)(store));
    const [title, setTitle] = (0, import_element104.useState)("");
    const [isBusy, setIsBusy] = (0, import_element104.useState)(false);
    const cancel = () => {
      setTitle("");
      onClose();
    };
    const submit = async (event) => {
      event.preventDefault();
      if (isBusy) {
        return;
      }
      setIsBusy(true);
      const newTemplateContent = defaultBlockTemplate ?? (0, import_blocks25.serialize)([
        (0, import_blocks25.createBlock)(
          "core/group",
          {
            tagName: "header",
            layout: { inherit: true }
          },
          [
            (0, import_blocks25.createBlock)("core/site-title"),
            (0, import_blocks25.createBlock)("core/site-tagline")
          ]
        ),
        (0, import_blocks25.createBlock)("core/separator"),
        (0, import_blocks25.createBlock)(
          "core/group",
          {
            tagName: "main"
          },
          [
            (0, import_blocks25.createBlock)(
              "core/group",
              {
                layout: { inherit: true }
              },
              [(0, import_blocks25.createBlock)("core/post-title")]
            ),
            (0, import_blocks25.createBlock)("core/post-content", {
              layout: { inherit: true }
            })
          ]
        )
      ]);
      const newTemplate = await createTemplate2({
        slug: paramCase(title || DEFAULT_TITLE) || "wp-custom-template",
        content: newTemplateContent,
        title: title || DEFAULT_TITLE,
        status: "publish"
      });
      setIsBusy(false);
      onNavigateToEntityRecord({
        postId: newTemplate.id,
        postType: "wp_template"
      });
      cancel();
    };
    return /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
      import_components116.Modal,
      {
        title: (0, import_i18n142.__)("Create custom template"),
        onRequestClose: cancel,
        focusOnMount: "firstContentElement",
        size: "small",
        overlayClassName: "editor-post-template__create-template-modal",
        children: /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
          "form",
          {
            className: "editor-post-template__create-form",
            onSubmit: submit,
            children: /* @__PURE__ */ (0, import_jsx_runtime233.jsxs)(import_components116.__experimentalVStack, { spacing: "3", children: [
              /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
                import_components116.TextControl,
                {
                  __next40pxDefaultSize: true,
                  label: (0, import_i18n142.__)("Name"),
                  value: title,
                  onChange: setTitle,
                  placeholder: DEFAULT_TITLE,
                  disabled: isBusy,
                  help: (0, import_i18n142.__)(
                    // eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts
                    'Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.'
                  )
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime233.jsxs)(import_components116.__experimentalHStack, { justify: "right", children: [
                /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
                  import_components116.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "tertiary",
                    onClick: cancel,
                    children: (0, import_i18n142.__)("Cancel")
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
                  import_components116.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "primary",
                    type: "submit",
                    isBusy,
                    "aria-disabled": isBusy,
                    children: (0, import_i18n142.__)("Create")
                  }
                )
              ] })
            ] })
          }
        )
      }
    );
  }

  // packages/editor/build-module/components/post-template/hooks.mjs
  var import_data102 = __toESM(require_data(), 1);
  var import_element105 = __toESM(require_element(), 1);
  var import_core_data69 = __toESM(require_core_data(), 1);
  function useEditedPostContext() {
    return (0, import_data102.useSelect)((select6) => {
      const { getCurrentPostId: getCurrentPostId2, getCurrentPostType: getCurrentPostType2 } = select6(store);
      return {
        postId: getCurrentPostId2(),
        postType: getCurrentPostType2()
      };
    }, []);
  }
  function useAllowSwitchingTemplates() {
    const { postType: postType2, postId: postId2 } = useEditedPostContext();
    return (0, import_data102.useSelect)(
      (select6) => {
        const { canUser, getEntityRecord, getEntityRecords } = select6(import_core_data69.store);
        const siteSettings = canUser("read", {
          kind: "root",
          name: "site"
        }) ? getEntityRecord("root", "site") : void 0;
        const isPostsPage = +postId2 === siteSettings?.page_for_posts;
        const isFrontPage = postType2 === "page" && +postId2 === siteSettings?.page_on_front;
        const templates = isFrontPage ? getEntityRecords("postType", "wp_template", {
          per_page: -1
        }) : [];
        const hasFrontPage = isFrontPage && !!templates?.some(({ slug }) => slug === "front-page");
        return !isPostsPage && !hasFrontPage;
      },
      [postId2, postType2]
    );
  }
  function useTemplates(postType2) {
    return (0, import_data102.useSelect)(
      (select6) => select6(import_core_data69.store).getEntityRecords("postType", "wp_template", {
        per_page: -1,
        post_type: postType2
        // We look at the combined templates for now (old endpoint)
        // because posts only accept slugs for templates, not IDs.
      }),
      [postType2]
    );
  }
  function useAvailableTemplates(postType2) {
    const currentTemplateSlug = useCurrentTemplateSlug();
    const allowSwitchingTemplate = useAllowSwitchingTemplates();
    const templates = useTemplates(postType2);
    return (0, import_element105.useMemo)(
      () => allowSwitchingTemplate && templates?.filter(
        (template2) => template2.is_custom && template2.slug !== currentTemplateSlug && !!template2.content.raw
        // Skip empty templates.
      ),
      [templates, currentTemplateSlug, allowSwitchingTemplate]
    );
  }
  function useCurrentTemplateSlug() {
    const { postType: postType2, postId: postId2 } = useEditedPostContext();
    const templates = useTemplates(postType2);
    const entityTemplate = (0, import_data102.useSelect)(
      (select6) => {
        const post2 = select6(import_core_data69.store).getEditedEntityRecord(
          "postType",
          postType2,
          postId2
        );
        return post2?.template;
      },
      [postType2, postId2]
    );
    if (!entityTemplate) {
      return;
    }
    return templates?.find((template2) => template2.slug === entityTemplate)?.slug;
  }

  // packages/editor/build-module/components/post-template/classic-theme.mjs
  var import_jsx_runtime234 = __toESM(require_jsx_runtime(), 1);
  function PostTemplateToggle({ isOpen, onClick }) {
    const templateTitle = (0, import_data103.useSelect)((select6) => {
      const templateSlug = select6(store).getEditedPostAttribute("template");
      const { supportsTemplateMode, availableTemplates } = select6(store).getEditorSettings();
      if (!supportsTemplateMode && availableTemplates[templateSlug]) {
        return availableTemplates[templateSlug];
      }
      const template2 = select6(import_core_data70.store).canUser("create", {
        kind: "postType",
        name: "wp_template"
      }) && select6(store).getCurrentTemplateId();
      return template2?.title || template2?.slug || availableTemplates?.[templateSlug];
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
      import_components117.Button,
      {
        __next40pxDefaultSize: true,
        variant: "tertiary",
        "aria-expanded": isOpen,
        "aria-label": (0, import_i18n143.__)("Template options"),
        onClick,
        children: templateTitle ?? (0, import_i18n143.__)("Default template")
      }
    );
  }
  function PostTemplateDropdownContent({ onClose }) {
    const allowSwitchingTemplate = useAllowSwitchingTemplates();
    const {
      availableTemplates,
      fetchedTemplates,
      selectedTemplateSlug,
      canCreate,
      canEdit,
      currentTemplateId,
      onNavigateToEntityRecord,
      getEditorSettings: getEditorSettings2
    } = (0, import_data103.useSelect)(
      (select6) => {
        const { canUser, getEntityRecords } = select6(import_core_data70.store);
        const editorSettings2 = select6(store).getEditorSettings();
        const canCreateTemplates = canUser("create", {
          kind: "postType",
          name: "wp_template"
        });
        const _currentTemplateId = select6(store).getCurrentTemplateId();
        return {
          availableTemplates: editorSettings2.availableTemplates,
          fetchedTemplates: canCreateTemplates ? getEntityRecords("postType", "wp_template", {
            post_type: select6(store).getCurrentPostType(),
            per_page: -1
          }) : void 0,
          selectedTemplateSlug: select6(store).getEditedPostAttribute("template"),
          canCreate: allowSwitchingTemplate && canCreateTemplates && editorSettings2.supportsTemplateMode,
          canEdit: allowSwitchingTemplate && canCreateTemplates && editorSettings2.supportsTemplateMode && !!_currentTemplateId,
          currentTemplateId: _currentTemplateId,
          onNavigateToEntityRecord: editorSettings2.onNavigateToEntityRecord,
          getEditorSettings: select6(store).getEditorSettings
        };
      },
      [allowSwitchingTemplate]
    );
    const options = (0, import_element106.useMemo)(
      () => Object.entries({
        ...availableTemplates,
        ...Object.fromEntries(
          (fetchedTemplates ?? []).map(({ slug, title }) => [
            slug,
            title.rendered
          ])
        )
      }).map(([slug, title]) => ({ value: slug, label: title })),
      [availableTemplates, fetchedTemplates]
    );
    const selectedOption = options.find((option) => option.value === selectedTemplateSlug) ?? options.find((option) => !option.value);
    const { editPost: editPost2 } = (0, import_data103.useDispatch)(store);
    const { createSuccessNotice } = (0, import_data103.useDispatch)(import_notices21.store);
    const [isCreateModalOpen, setIsCreateModalOpen] = (0, import_element106.useState)(false);
    return /* @__PURE__ */ (0, import_jsx_runtime234.jsxs)("div", { className: "editor-post-template__classic-theme-dropdown", children: [
      /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
        import_block_editor46.__experimentalInspectorPopoverHeader,
        {
          title: (0, import_i18n143.__)("Template"),
          help: (0, import_i18n143.__)(
            "Templates define the way content is displayed when viewing your site."
          ),
          actions: canCreate ? [
            {
              icon: add_template_default,
              label: (0, import_i18n143.__)("Add template"),
              onClick: () => setIsCreateModalOpen(true)
            }
          ] : [],
          onClose
        }
      ),
      !allowSwitchingTemplate ? /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(import_components117.Notice, { status: "warning", isDismissible: false, children: (0, import_i18n143.__)("The posts page template cannot be changed.") }) : /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
        import_components117.SelectControl,
        {
          __next40pxDefaultSize: true,
          hideLabelFromVision: true,
          label: (0, import_i18n143.__)("Template"),
          value: selectedOption?.value ?? "",
          options,
          onChange: (slug) => editPost2({ template: slug || "" })
        }
      ),
      canEdit && onNavigateToEntityRecord && /* @__PURE__ */ (0, import_jsx_runtime234.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
        import_components117.Button,
        {
          __next40pxDefaultSize: true,
          variant: "link",
          onClick: () => {
            onNavigateToEntityRecord({
              postId: currentTemplateId,
              postType: "wp_template"
            });
            onClose();
            createSuccessNotice(
              (0, import_i18n143.__)(
                "Editing template. Changes made here affect all posts and pages that use the template."
              ),
              {
                type: "snackbar",
                actions: [
                  {
                    label: (0, import_i18n143.__)("Go back"),
                    onClick: () => getEditorSettings2().onNavigateToPreviousEntityRecord()
                  }
                ]
              }
            );
          },
          children: (0, import_i18n143.__)("Edit template")
        }
      ) }),
      isCreateModalOpen && /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
        CreateNewTemplateModal,
        {
          onClose: () => setIsCreateModalOpen(false)
        }
      )
    ] });
  }
  function ClassicThemeControl() {
    const [popoverAnchor, setPopoverAnchor] = (0, import_element106.useState)(null);
    const popoverProps = (0, import_element106.useMemo)(
      () => ({
        // Anchor the popover to the middle of the entire row so that it doesn't
        // move around when the label changes.
        anchor: popoverAnchor,
        className: "editor-post-template__dropdown",
        placement: "left-start",
        offset: 36,
        shift: true
      }),
      [popoverAnchor]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(post_panel_row_default, { label: (0, import_i18n143.__)("Template"), ref: setPopoverAnchor, children: /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
      import_components117.Dropdown,
      {
        popoverProps,
        focusOnMount: true,
        renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
          PostTemplateToggle,
          {
            isOpen,
            onClick: onToggle
          }
        ),
        renderContent: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(PostTemplateDropdownContent, { onClose })
      }
    ) });
  }
  var classic_theme_default = ClassicThemeControl;

  // packages/editor/build-module/components/plugin-document-setting-panel/index.mjs
  var import_components119 = __toESM(require_components(), 1);
  var import_plugins3 = __toESM(require_plugins(), 1);
  var import_data105 = __toESM(require_data(), 1);
  var import_warning = __toESM(require_warning(), 1);

  // packages/editor/build-module/components/preferences-modal/enable-plugin-document-setting-panel.mjs
  var import_components118 = __toESM(require_components(), 1);

  // packages/editor/build-module/components/preferences-modal/enable-panel.mjs
  var import_data104 = __toESM(require_data(), 1);
  var import_preferences12 = __toESM(require_preferences(), 1);
  var import_jsx_runtime235 = __toESM(require_jsx_runtime(), 1);
  var { PreferenceBaseOption } = unlock(import_preferences12.privateApis);
  function EnablePanelOption(props) {
    const { toggleEditorPanelEnabled: toggleEditorPanelEnabled2 } = (0, import_data104.useDispatch)(store);
    const { isChecked, isRemoved } = (0, import_data104.useSelect)(
      (select6) => {
        const { isEditorPanelEnabled: isEditorPanelEnabled2, isEditorPanelRemoved: isEditorPanelRemoved2 } = select6(store);
        return {
          isChecked: isEditorPanelEnabled2(props.panelName),
          isRemoved: isEditorPanelRemoved2(props.panelName)
        };
      },
      [props.panelName]
    );
    if (isRemoved) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(
      PreferenceBaseOption,
      {
        isChecked,
        onChange: () => toggleEditorPanelEnabled2(props.panelName),
        ...props
      }
    );
  }

  // packages/editor/build-module/components/preferences-modal/enable-plugin-document-setting-panel.mjs
  var import_jsx_runtime236 = __toESM(require_jsx_runtime(), 1);
  var { Fill: Fill4, Slot: Slot4 } = (0, import_components118.createSlotFill)(
    "EnablePluginDocumentSettingPanelOption"
  );
  var EnablePluginDocumentSettingPanelOption = ({ label, panelName }) => /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(Fill4, { children: /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(EnablePanelOption, { label, panelName }) });
  EnablePluginDocumentSettingPanelOption.Slot = Slot4;
  var enable_plugin_document_setting_panel_default = EnablePluginDocumentSettingPanelOption;

  // packages/editor/build-module/components/plugin-document-setting-panel/index.mjs
  var import_jsx_runtime237 = __toESM(require_jsx_runtime(), 1);
  var { Fill: Fill5, Slot: Slot5 } = (0, import_components119.createSlotFill)("PluginDocumentSettingPanel");
  var PluginDocumentSettingPanel = ({
    name: name2,
    className,
    title,
    icon,
    children
  }) => {
    const { name: pluginName } = (0, import_plugins3.usePluginContext)();
    const panelName = `${pluginName}/${name2}`;
    const { opened, isEnabled } = (0, import_data105.useSelect)(
      (select6) => {
        const { isEditorPanelOpened: isEditorPanelOpened2, isEditorPanelEnabled: isEditorPanelEnabled2 } = select6(store);
        return {
          opened: isEditorPanelOpened2(panelName),
          isEnabled: isEditorPanelEnabled2(panelName)
        };
      },
      [panelName]
    );
    const { toggleEditorPanelOpened: toggleEditorPanelOpened2 } = (0, import_data105.useDispatch)(store);
    if (void 0 === name2) {
      (0, import_warning.default)("PluginDocumentSettingPanel requires a name property.");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime237.jsxs)(import_jsx_runtime237.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(
        enable_plugin_document_setting_panel_default,
        {
          label: title,
          panelName
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(Fill5, { children: isEnabled && /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(
        import_components119.PanelBody,
        {
          className,
          title,
          icon,
          opened,
          onToggle: () => toggleEditorPanelOpened2(panelName),
          children
        }
      ) })
    ] });
  };
  PluginDocumentSettingPanel.Slot = Slot5;
  var plugin_document_setting_panel_default = PluginDocumentSettingPanel;

  // packages/editor/build-module/components/block-settings-menu/plugin-block-settings-menu-item.mjs
  var import_block_editor47 = __toESM(require_block_editor(), 1);
  var import_components120 = __toESM(require_components(), 1);
  var import_compose24 = __toESM(require_compose(), 1);
  var import_jsx_runtime238 = __toESM(require_jsx_runtime(), 1);
  var isEverySelectedBlockAllowed = (selected, allowed) => selected.filter((id) => !allowed.includes(id)).length === 0;
  var shouldRenderItem = (selectedBlocks, allowedBlocks) => !Array.isArray(allowedBlocks) || isEverySelectedBlockAllowed(selectedBlocks, allowedBlocks);
  var PluginBlockSettingsMenuItem = ({
    allowedBlocks,
    icon,
    label,
    onClick,
    small,
    role
  }) => /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(import_block_editor47.BlockSettingsMenuControls, { children: ({ selectedBlocks, onClose }) => {
    if (!shouldRenderItem(selectedBlocks, allowedBlocks)) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
      import_components120.MenuItem,
      {
        onClick: (0, import_compose24.compose)(onClick, onClose),
        icon,
        label: small ? label : void 0,
        role,
        children: !small && label
      }
    );
  } });
  var plugin_block_settings_menu_item_default = PluginBlockSettingsMenuItem;

  // packages/editor/build-module/components/plugin-more-menu-item/index.mjs
  var import_components121 = __toESM(require_components(), 1);
  var import_plugins4 = __toESM(require_plugins(), 1);
  var import_jsx_runtime239 = __toESM(require_jsx_runtime(), 1);
  function PluginMoreMenuItem(props) {
    const context = (0, import_plugins4.usePluginContext)();
    return /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
      action_item_default,
      {
        name: "core/plugin-more-menu",
        as: props.as ?? import_components121.MenuItem,
        icon: props.icon || context.icon,
        ...props
      }
    );
  }

  // packages/editor/build-module/components/plugin-post-publish-panel/index.mjs
  var import_plugins5 = __toESM(require_plugins(), 1);
  var import_components122 = __toESM(require_components(), 1);
  var import_jsx_runtime240 = __toESM(require_jsx_runtime(), 1);
  var { Fill: Fill6, Slot: Slot6 } = (0, import_components122.createSlotFill)("PluginPostPublishPanel");
  var PluginPostPublishPanel = ({
    children,
    className,
    title,
    initialOpen = false,
    icon
  }) => {
    const { icon: pluginIcon } = (0, import_plugins5.usePluginContext)();
    return /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(Fill6, { children: /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(
      import_components122.PanelBody,
      {
        className,
        initialOpen: initialOpen || !title,
        title,
        icon: icon ?? pluginIcon,
        children
      }
    ) });
  };
  PluginPostPublishPanel.Slot = Slot6;
  var plugin_post_publish_panel_default = PluginPostPublishPanel;

  // packages/editor/build-module/components/plugin-post-status-info/index.mjs
  var import_components123 = __toESM(require_components(), 1);
  var import_jsx_runtime241 = __toESM(require_jsx_runtime(), 1);
  var { Fill: Fill7, Slot: Slot7 } = (0, import_components123.createSlotFill)("PluginPostStatusInfo");
  var PluginPostStatusInfo = ({ children, className }) => /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(Fill7, { children: /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(import_components123.PanelRow, { className, children }) });
  PluginPostStatusInfo.Slot = Slot7;
  var plugin_post_status_info_default = PluginPostStatusInfo;

  // packages/editor/build-module/components/plugin-pre-publish-panel/index.mjs
  var import_components124 = __toESM(require_components(), 1);
  var import_plugins6 = __toESM(require_plugins(), 1);
  var import_jsx_runtime242 = __toESM(require_jsx_runtime(), 1);
  var { Fill: Fill8, Slot: Slot8 } = (0, import_components124.createSlotFill)("PluginPrePublishPanel");
  var PluginPrePublishPanel = ({
    children,
    className,
    title,
    initialOpen = false,
    icon
  }) => {
    const { icon: pluginIcon } = (0, import_plugins6.usePluginContext)();
    return /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(Fill8, { children: /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
      import_components124.PanelBody,
      {
        className,
        initialOpen: initialOpen || !title,
        title,
        icon: icon ?? pluginIcon,
        children
      }
    ) });
  };
  PluginPrePublishPanel.Slot = Slot8;
  var plugin_pre_publish_panel_default = PluginPrePublishPanel;

  // packages/editor/build-module/components/plugin-preview-menu-item/index.mjs
  var import_components125 = __toESM(require_components(), 1);
  var import_plugins7 = __toESM(require_plugins(), 1);
  var import_jsx_runtime243 = __toESM(require_jsx_runtime(), 1);
  function PluginPreviewMenuItem(props) {
    const context = (0, import_plugins7.usePluginContext)();
    return /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
      action_item_default,
      {
        name: "core/plugin-preview-menu",
        as: props.as ?? import_components125.MenuItem,
        icon: props.icon || context.icon,
        ...props
      }
    );
  }

  // packages/editor/build-module/components/plugin-sidebar/index.mjs
  var import_jsx_runtime244 = __toESM(require_jsx_runtime(), 1);
  function PluginSidebar({ className, ...props }) {
    return /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(
      complementary_area_default,
      {
        panelClassName: className,
        className: "editor-sidebar",
        scope: "core",
        ...props
      }
    );
  }

  // packages/editor/build-module/components/plugin-sidebar-more-menu-item/index.mjs
  var import_jsx_runtime245 = __toESM(require_jsx_runtime(), 1);
  function PluginSidebarMoreMenuItem(props) {
    return /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(
      ComplementaryAreaMoreMenuItem,
      {
        __unstableExplicitMenuItem: true,
        scope: "core",
        ...props
      }
    );
  }

  // packages/editor/build-module/components/post-template/panel.mjs
  var import_data110 = __toESM(require_data(), 1);
  var import_core_data75 = __toESM(require_core_data(), 1);

  // packages/editor/build-module/components/post-template/block-theme.mjs
  var import_data109 = __toESM(require_data(), 1);
  var import_html_entities16 = __toESM(require_html_entities(), 1);
  var import_components129 = __toESM(require_components(), 1);
  var import_element109 = __toESM(require_element(), 1);
  var import_i18n147 = __toESM(require_i18n(), 1);
  var import_core_data74 = __toESM(require_core_data(), 1);
  var import_notices22 = __toESM(require_notices(), 1);
  var import_preferences13 = __toESM(require_preferences(), 1);

  // packages/editor/build-module/components/post-template/swap-template-button.mjs
  var import_element107 = __toESM(require_element(), 1);
  var import_html_entities15 = __toESM(require_html_entities(), 1);
  var import_block_editor48 = __toESM(require_block_editor(), 1);
  var import_components126 = __toESM(require_components(), 1);
  var import_i18n144 = __toESM(require_i18n(), 1);
  var import_data106 = __toESM(require_data(), 1);
  var import_core_data71 = __toESM(require_core_data(), 1);
  var import_blocks26 = __toESM(require_blocks(), 1);

  // packages/editor/build-module/utils/search-templates.mjs
  var import_remove_accents3 = __toESM(require_remove_accents(), 1);
  function normalizeSearchInput(input = "") {
    input = (0, import_remove_accents3.default)(input);
    input = input.trim().toLowerCase();
    return input;
  }
  function getTemplateSearchRank(template2, searchValue) {
    const normalizedSearchValue = normalizeSearchInput(searchValue);
    const normalizedTitle = normalizeSearchInput(template2.title);
    let rank = 0;
    if (normalizedSearchValue === normalizedTitle) {
      rank += 30;
    } else if (normalizedTitle.startsWith(normalizedSearchValue)) {
      rank += 20;
    } else {
      const searchTerms = normalizedSearchValue.split(" ");
      const hasMatchedTerms = searchTerms.every(
        (searchTerm) => normalizedTitle.includes(searchTerm)
      );
      if (hasMatchedTerms) {
        rank += 10;
      }
    }
    return rank;
  }
  function searchTemplates(templates = [], searchValue = "") {
    if (!searchValue) {
      return templates;
    }
    const rankedTemplates = templates.map((template2) => {
      return [template2, getTemplateSearchRank(template2, searchValue)];
    }).filter(([, rank]) => rank > 0);
    rankedTemplates.sort(([, rank1], [, rank2]) => rank2 - rank1);
    return rankedTemplates.map(([template2]) => template2);
  }

  // packages/editor/build-module/components/post-template/swap-template-button.mjs
  var import_jsx_runtime246 = __toESM(require_jsx_runtime(), 1);
  function SwapTemplateButton({ onClick }) {
    const [showModal, setShowModal] = (0, import_element107.useState)(false);
    const { postType: postType2, postId: postId2 } = useEditedPostContext();
    const availableTemplates = useAvailableTemplates(postType2);
    const { editEntityRecord } = (0, import_data106.useDispatch)(import_core_data71.store);
    const onTemplateSelect = async (template2) => {
      editEntityRecord(
        "postType",
        postType2,
        postId2,
        { template: template2.name },
        { undoIgnore: true }
      );
      setShowModal(false);
      onClick();
    };
    return /* @__PURE__ */ (0, import_jsx_runtime246.jsxs)(import_jsx_runtime246.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
        import_components126.MenuItem,
        {
          disabled: !availableTemplates?.length,
          accessibleWhenDisabled: true,
          onClick: () => setShowModal(true),
          children: (0, import_i18n144.__)("Change template")
        }
      ),
      showModal && /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
        import_components126.Modal,
        {
          title: (0, import_i18n144.__)("Choose a template"),
          onRequestClose: () => setShowModal(false),
          overlayClassName: "editor-post-template__swap-template-modal",
          isFullScreen: true,
          children: /* @__PURE__ */ (0, import_jsx_runtime246.jsx)("div", { className: "editor-post-template__swap-template-modal-content", children: /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
            TemplatesList,
            {
              postType: postType2,
              onSelect: onTemplateSelect
            }
          ) })
        }
      )
    ] });
  }
  function TemplatesList({ postType: postType2, onSelect }) {
    const [searchValue, setSearchValue] = (0, import_element107.useState)("");
    const availableTemplates = useAvailableTemplates(postType2);
    const templatesAsPatterns = (0, import_element107.useMemo)(
      () => availableTemplates.map((template2) => ({
        name: template2.slug,
        blocks: (0, import_blocks26.parse)(template2.content.raw),
        title: (0, import_html_entities15.decodeEntities)(template2.title.rendered),
        id: template2.id
      })),
      [availableTemplates]
    );
    const filteredBlockTemplates = (0, import_element107.useMemo)(() => {
      return searchTemplates(templatesAsPatterns, searchValue);
    }, [templatesAsPatterns, searchValue]);
    return /* @__PURE__ */ (0, import_jsx_runtime246.jsxs)(import_jsx_runtime246.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
        import_components126.SearchControl,
        {
          onChange: setSearchValue,
          value: searchValue,
          label: (0, import_i18n144.__)("Search"),
          placeholder: (0, import_i18n144.__)("Search"),
          className: "editor-post-template__swap-template-search"
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
        import_block_editor48.__experimentalBlockPatternsList,
        {
          label: (0, import_i18n144.__)("Templates"),
          blockPatterns: filteredBlockTemplates,
          onClickPattern: onSelect
        }
      )
    ] });
  }

  // packages/editor/build-module/components/post-template/reset-default-template.mjs
  var import_components127 = __toESM(require_components(), 1);
  var import_i18n145 = __toESM(require_i18n(), 1);
  var import_data107 = __toESM(require_data(), 1);
  var import_core_data72 = __toESM(require_core_data(), 1);
  var import_jsx_runtime247 = __toESM(require_jsx_runtime(), 1);
  function ResetDefaultTemplate({ onClick }) {
    const currentTemplateSlug = useCurrentTemplateSlug();
    const allowSwitchingTemplate = useAllowSwitchingTemplates();
    const { postType: postType2, postId: postId2 } = useEditedPostContext();
    const { editEntityRecord } = (0, import_data107.useDispatch)(import_core_data72.store);
    if (!currentTemplateSlug || !allowSwitchingTemplate) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
      import_components127.MenuItem,
      {
        onClick: () => {
          editEntityRecord(
            "postType",
            postType2,
            postId2,
            { template: "" },
            { undoIgnore: true }
          );
          onClick();
        },
        children: (0, import_i18n145.__)("Use default template")
      }
    );
  }

  // packages/editor/build-module/components/post-template/create-new-template.mjs
  var import_components128 = __toESM(require_components(), 1);
  var import_i18n146 = __toESM(require_i18n(), 1);
  var import_data108 = __toESM(require_data(), 1);
  var import_core_data73 = __toESM(require_core_data(), 1);
  var import_element108 = __toESM(require_element(), 1);
  var import_jsx_runtime248 = __toESM(require_jsx_runtime(), 1);
  function CreateNewTemplate() {
    const { canCreateTemplates } = (0, import_data108.useSelect)((select6) => {
      const { canUser } = select6(import_core_data73.store);
      return {
        canCreateTemplates: canUser("create", {
          kind: "postType",
          name: "wp_template"
        })
      };
    }, []);
    const [isCreateModalOpen, setIsCreateModalOpen] = (0, import_element108.useState)(false);
    const allowSwitchingTemplate = useAllowSwitchingTemplates();
    if (!canCreateTemplates || !allowSwitchingTemplate) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime248.jsxs)(import_jsx_runtime248.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(
        import_components128.MenuItem,
        {
          onClick: () => {
            setIsCreateModalOpen(true);
          },
          children: (0, import_i18n146.__)("Create new template")
        }
      ),
      isCreateModalOpen && /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(
        CreateNewTemplateModal,
        {
          onClose: () => {
            setIsCreateModalOpen(false);
          }
        }
      )
    ] });
  }

  // packages/editor/build-module/components/post-template/block-theme.mjs
  var import_jsx_runtime249 = __toESM(require_jsx_runtime(), 1);
  function BlockThemeControl({ id }) {
    const {
      isTemplateHidden,
      onNavigateToEntityRecord,
      getEditorSettings: getEditorSettings2,
      hasGoBack,
      hasSpecificTemplate
    } = (0, import_data109.useSelect)((select6) => {
      const {
        getRenderingMode: getRenderingMode2,
        getEditorSettings: _getEditorSettings,
        getCurrentPost: getCurrentPost2
      } = unlock(select6(store));
      const editorSettings2 = _getEditorSettings();
      const currentPost = getCurrentPost2();
      return {
        isTemplateHidden: getRenderingMode2() === "post-only",
        onNavigateToEntityRecord: editorSettings2.onNavigateToEntityRecord,
        getEditorSettings: _getEditorSettings,
        hasGoBack: editorSettings2.hasOwnProperty(
          "onNavigateToPreviousEntityRecord"
        ),
        hasSpecificTemplate: !!currentPost.template
      };
    }, []);
    const { get: getPreference } = (0, import_data109.useSelect)(import_preferences13.store);
    const { editedRecord: template2, hasResolved } = (0, import_core_data74.useEntityRecord)(
      "postType",
      "wp_template",
      id
    );
    const { getEntityRecord } = (0, import_data109.useSelect)(import_core_data74.store);
    const { editEntityRecord } = (0, import_data109.useDispatch)(import_core_data74.store);
    const { createSuccessNotice } = (0, import_data109.useDispatch)(import_notices22.store);
    const { setRenderingMode: setRenderingMode2, setDefaultRenderingMode: setDefaultRenderingMode2 } = unlock(
      (0, import_data109.useDispatch)(store)
    );
    const canCreateTemplate = (0, import_data109.useSelect)(
      (select6) => !!select6(import_core_data74.store).canUser("create", {
        kind: "postType",
        name: "wp_template"
      }),
      []
    );
    const [popoverAnchor, setPopoverAnchor] = (0, import_element109.useState)(null);
    const popoverProps = (0, import_element109.useMemo)(
      () => ({
        // Anchor the popover to the middle of the entire row so that it doesn't
        // move around when the label changes.
        anchor: popoverAnchor,
        className: "editor-post-template__dropdown",
        placement: "left-start",
        offset: 36,
        shift: true
      }),
      [popoverAnchor]
    );
    if (!hasResolved) {
      return null;
    }
    const notificationAction = hasGoBack ? [
      {
        label: (0, import_i18n147.__)("Go back"),
        onClick: () => getEditorSettings2().onNavigateToPreviousEntityRecord()
      }
    ] : void 0;
    const mayShowTemplateEditNotice = () => {
      if (!getPreference("core/edit-site", "welcomeGuideTemplate")) {
        createSuccessNotice(
          (0, import_i18n147.__)(
            "Editing template. Changes made here affect all posts and pages that use the template."
          ),
          { type: "snackbar", actions: notificationAction }
        );
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(post_panel_row_default, { label: (0, import_i18n147.__)("Template"), ref: setPopoverAnchor, children: /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
      import_components129.DropdownMenu,
      {
        popoverProps,
        focusOnMount: true,
        toggleProps: {
          size: "compact",
          variant: "tertiary",
          tooltipPosition: "middle left"
        },
        label: (0, import_i18n147.__)("Template options"),
        text: (0, import_html_entities16.decodeEntities)(template2.title),
        icon: null,
        children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime249.jsxs)(import_jsx_runtime249.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime249.jsxs)(import_components129.MenuGroup, { children: [
            canCreateTemplate && /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
              import_components129.MenuItem,
              {
                onClick: async () => {
                  onNavigateToEntityRecord({
                    postId: template2.id,
                    postType: "wp_template"
                  });
                  if (!hasSpecificTemplate && window?.__experimentalTemplateActivate) {
                    const activeTemplates = await getEntityRecord(
                      "root",
                      "site"
                    ).active_templates;
                    if (activeTemplates[template2.slug] !== template2.id) {
                      editEntityRecord(
                        "root",
                        "site",
                        void 0,
                        {
                          active_templates: {
                            ...activeTemplates,
                            [template2.slug]: template2.id
                          }
                        }
                      );
                    }
                  }
                  onClose();
                  mayShowTemplateEditNotice();
                },
                children: (0, import_i18n147.__)("Edit template")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(SwapTemplateButton, { onClick: onClose }),
            /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(ResetDefaultTemplate, { onClick: onClose }),
            canCreateTemplate && /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(CreateNewTemplate, {})
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(import_components129.MenuGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
            import_components129.MenuItem,
            {
              icon: !isTemplateHidden ? check_default : void 0,
              isSelected: !isTemplateHidden,
              role: "menuitemcheckbox",
              onClick: () => {
                const newRenderingMode = isTemplateHidden ? "template-locked" : "post-only";
                setRenderingMode2(newRenderingMode);
                setDefaultRenderingMode2(newRenderingMode);
              },
              children: (0, import_i18n147.__)("Show template")
            }
          ) })
        ] })
      }
    ) });
  }

  // packages/editor/build-module/components/post-template/panel.mjs
  var import_jsx_runtime250 = __toESM(require_jsx_runtime(), 1);
  function PostTemplatePanel() {
    const { templateId: templateId2, isBlockTheme } = (0, import_data110.useSelect)((select6) => {
      const { getCurrentTemplateId: getCurrentTemplateId2, getEditorSettings: getEditorSettings2 } = select6(store);
      return {
        templateId: getCurrentTemplateId2(),
        isBlockTheme: getEditorSettings2().__unstableIsBlockBasedTheme
      };
    }, []);
    const isVisible = (0, import_data110.useSelect)((select6) => {
      const postTypeSlug = select6(store).getCurrentPostType();
      const postType2 = select6(import_core_data75.store).getPostType(postTypeSlug);
      if (!postType2?.viewable) {
        return false;
      }
      const settings = select6(store).getEditorSettings();
      const hasTemplates = !!settings.availableTemplates && Object.keys(settings.availableTemplates).length > 0;
      if (hasTemplates) {
        return true;
      }
      if (!settings.supportsTemplateMode) {
        return false;
      }
      const canCreateTemplates = select6(import_core_data75.store).canUser("create", {
        kind: "postType",
        name: "wp_template"
      }) ?? false;
      return canCreateTemplates;
    }, []);
    const canViewTemplates = (0, import_data110.useSelect)(
      (select6) => {
        return isVisible ? select6(import_core_data75.store).canUser("read", {
          kind: "postType",
          name: "wp_template"
        }) : false;
      },
      [isVisible]
    );
    if ((!isBlockTheme || !canViewTemplates) && isVisible) {
      return /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(classic_theme_default, {});
    }
    if (isBlockTheme && !!templateId2) {
      return /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(BlockThemeControl, { id: templateId2 });
    }
    return null;
  }

  // packages/editor/build-module/components/post-author/index.mjs
  var import_data114 = __toESM(require_data(), 1);
  var import_core_data77 = __toESM(require_core_data(), 1);

  // packages/editor/build-module/components/post-author/combobox.mjs
  var import_compose25 = __toESM(require_compose(), 1);
  var import_element111 = __toESM(require_element(), 1);
  var import_data112 = __toESM(require_data(), 1);
  var import_i18n149 = __toESM(require_i18n(), 1);
  var import_components130 = __toESM(require_components(), 1);

  // packages/editor/build-module/components/post-author/hook.mjs
  var import_i18n148 = __toESM(require_i18n(), 1);
  var import_element110 = __toESM(require_element(), 1);
  var import_data111 = __toESM(require_data(), 1);
  var import_html_entities17 = __toESM(require_html_entities(), 1);
  var import_core_data76 = __toESM(require_core_data(), 1);

  // packages/editor/build-module/components/post-author/constants.mjs
  var BASE_QUERY = {
    _fields: "id,name",
    context: "view"
    // Allows non-admins to perform requests.
  };
  var AUTHORS_QUERY = {
    who: "authors",
    per_page: 100,
    ...BASE_QUERY
  };

  // packages/editor/build-module/components/post-author/hook.mjs
  function useAuthorsQuery(search) {
    const { authorId, authors, postAuthor, isLoading } = (0, import_data111.useSelect)(
      (select6) => {
        const { getUser, getUsers, isResolving } = select6(import_core_data76.store);
        const { getEditedPostAttribute: getEditedPostAttribute2 } = select6(store);
        const _authorId = getEditedPostAttribute2("author");
        const query = { ...AUTHORS_QUERY };
        if (search) {
          query.search = search;
          query.search_columns = ["name"];
        }
        return {
          authorId: _authorId,
          authors: getUsers(query),
          postAuthor: getUser(_authorId, BASE_QUERY),
          isLoading: isResolving("getUsers", [query])
        };
      },
      [search]
    );
    const authorOptions = (0, import_element110.useMemo)(() => {
      const fetchedAuthors = (authors ?? []).map((author) => {
        return {
          value: author.id,
          label: (0, import_html_entities17.decodeEntities)(author.name)
        };
      });
      const foundAuthor = fetchedAuthors.findIndex(
        ({ value }) => postAuthor?.id === value
      );
      let currentAuthor = [];
      if (foundAuthor < 0 && postAuthor) {
        currentAuthor = [
          {
            value: postAuthor.id,
            label: (0, import_html_entities17.decodeEntities)(postAuthor.name)
          }
        ];
      } else if (foundAuthor < 0 && !postAuthor) {
        currentAuthor = [
          {
            value: 0,
            label: (0, import_i18n148.__)("(No author)")
          }
        ];
      }
      return [...currentAuthor, ...fetchedAuthors];
    }, [authors, postAuthor]);
    return { authorId, authorOptions, postAuthor, isLoading };
  }

  // packages/editor/build-module/components/post-author/combobox.mjs
  var import_jsx_runtime251 = __toESM(require_jsx_runtime(), 1);
  function PostAuthorCombobox() {
    const [fieldValue, setFieldValue] = (0, import_element111.useState)();
    const { editPost: editPost2 } = (0, import_data112.useDispatch)(store);
    const { authorId, authorOptions, isLoading } = useAuthorsQuery(fieldValue);
    const handleSelect = (postAuthorId) => {
      if (!postAuthorId) {
        return;
      }
      editPost2({ author: postAuthorId });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(
      import_components130.ComboboxControl,
      {
        __next40pxDefaultSize: true,
        label: (0, import_i18n149.__)("Author"),
        options: authorOptions,
        value: authorId,
        onFilterValueChange: (0, import_compose25.debounce)(setFieldValue, 300),
        onChange: handleSelect,
        allowReset: false,
        hideLabelFromVision: true,
        isLoading
      }
    );
  }

  // packages/editor/build-module/components/post-author/select.mjs
  var import_i18n150 = __toESM(require_i18n(), 1);
  var import_data113 = __toESM(require_data(), 1);
  var import_components131 = __toESM(require_components(), 1);
  var import_jsx_runtime252 = __toESM(require_jsx_runtime(), 1);
  function PostAuthorSelect() {
    const { editPost: editPost2 } = (0, import_data113.useDispatch)(store);
    const { authorId, authorOptions } = useAuthorsQuery();
    const setAuthorId = (value) => {
      const author = Number(value);
      editPost2({ author });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(
      import_components131.SelectControl,
      {
        __next40pxDefaultSize: true,
        className: "post-author-selector",
        label: (0, import_i18n150.__)("Author"),
        options: authorOptions,
        onChange: setAuthorId,
        value: authorId,
        hideLabelFromVision: true
      }
    );
  }

  // packages/editor/build-module/components/post-author/index.mjs
  var import_jsx_runtime253 = __toESM(require_jsx_runtime(), 1);
  var minimumUsersForCombobox = 25;
  function PostAuthor() {
    const showCombobox = (0, import_data114.useSelect)((select6) => {
      const authors = select6(import_core_data77.store).getUsers(AUTHORS_QUERY);
      return authors?.length >= minimumUsersForCombobox;
    }, []);
    if (showCombobox) {
      return /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(PostAuthorCombobox, {});
    }
    return /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(PostAuthorSelect, {});
  }
  var post_author_default = PostAuthor;

  // packages/editor/build-module/components/post-author/check.mjs
  var import_data115 = __toESM(require_data(), 1);
  var import_jsx_runtime254 = __toESM(require_jsx_runtime(), 1);
  function PostAuthorCheck({ children }) {
    const { hasAssignAuthorAction } = (0, import_data115.useSelect)((select6) => {
      const post2 = select6(store).getCurrentPost();
      const canAssignAuthor = post2?._links?.["wp:action-assign-author"] ? true : false;
      return {
        hasAssignAuthorAction: canAssignAuthor
      };
    }, []);
    if (!hasAssignAuthorAction) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(post_type_support_check_default, { supportKeys: "author", children });
  }

  // packages/editor/build-module/components/post-author/panel.mjs
  var import_i18n151 = __toESM(require_i18n(), 1);
  var import_components132 = __toESM(require_components(), 1);
  var import_element112 = __toESM(require_element(), 1);
  var import_html_entities18 = __toESM(require_html_entities(), 1);
  var import_block_editor49 = __toESM(require_block_editor(), 1);
  var import_data116 = __toESM(require_data(), 1);
  var import_core_data78 = __toESM(require_core_data(), 1);
  var import_jsx_runtime255 = __toESM(require_jsx_runtime(), 1);
  function PostAuthorToggle({ isOpen, onClick }) {
    const { postAuthor } = (0, import_data116.useSelect)((select6) => {
      const id = select6(store).getEditedPostAttribute("author");
      return {
        postAuthor: select6(import_core_data78.store).getUser(id, BASE_QUERY)
      };
    }, []);
    const authorName = (0, import_html_entities18.decodeEntities)(postAuthor?.name) || (0, import_i18n151.__)("(No author)");
    return /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
      import_components132.Button,
      {
        size: "compact",
        className: "editor-post-author__panel-toggle",
        variant: "tertiary",
        "aria-expanded": isOpen,
        "aria-label": (
          // translators: %s: Author name.
          (0, import_i18n151.sprintf)((0, import_i18n151.__)("Change author: %s"), authorName)
        ),
        onClick,
        children: authorName
      }
    );
  }
  function PostAuthor2() {
    const [popoverAnchor, setPopoverAnchor] = (0, import_element112.useState)(null);
    const popoverProps = (0, import_element112.useMemo)(
      () => ({
        // Anchor the popover to the middle of the entire row so that it doesn't
        // move around when the label changes.
        anchor: popoverAnchor,
        placement: "left-start",
        offset: 36,
        shift: true
      }),
      [popoverAnchor]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(PostAuthorCheck, { children: /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(post_panel_row_default, { label: (0, import_i18n151.__)("Author"), ref: setPopoverAnchor, children: /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
      import_components132.Dropdown,
      {
        popoverProps,
        contentClassName: "editor-post-author__panel-dialog",
        focusOnMount: true,
        renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
          PostAuthorToggle,
          {
            isOpen,
            onClick: onToggle
          }
        ),
        renderContent: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime255.jsxs)("div", { className: "editor-post-author", children: [
          /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
            import_block_editor49.__experimentalInspectorPopoverHeader,
            {
              title: (0, import_i18n151.__)("Author"),
              onClose
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(post_author_default, { onClose })
        ] })
      }
    ) }) });
  }
  var panel_default = PostAuthor2;

  // packages/editor/build-module/components/post-comments/index.mjs
  var import_i18n152 = __toESM(require_i18n(), 1);
  var import_components133 = __toESM(require_components(), 1);
  var import_data117 = __toESM(require_data(), 1);
  var import_jsx_runtime256 = __toESM(require_jsx_runtime(), 1);
  var COMMENT_OPTIONS = [
    {
      label: (0, import_i18n152._x)("Open", 'Adjective: e.g. "Comments are open"'),
      value: "open",
      description: (0, import_i18n152.__)("Visitors can add new comments and replies.")
    },
    {
      label: (0, import_i18n152.__)("Closed"),
      value: "closed",
      description: [
        (0, import_i18n152.__)("Visitors cannot add new comments or replies."),
        (0, import_i18n152.__)("Existing comments remain visible.")
      ].join(" ")
    }
  ];
  function PostComments() {
    const commentStatus = (0, import_data117.useSelect)(
      (select6) => select6(store).getEditedPostAttribute("comment_status") ?? "open",
      []
    );
    const { editPost: editPost2 } = (0, import_data117.useDispatch)(store);
    const handleStatus = (newCommentStatus) => editPost2({
      comment_status: newCommentStatus
    });
    return /* @__PURE__ */ (0, import_jsx_runtime256.jsx)("form", { children: /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(import_components133.__experimentalVStack, { spacing: 4, children: /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(
      import_components133.RadioControl,
      {
        className: "editor-change-status__options",
        hideLabelFromVision: true,
        label: (0, import_i18n152.__)("Comment status"),
        options: COMMENT_OPTIONS,
        onChange: handleStatus,
        selected: commentStatus
      }
    ) }) });
  }
  var post_comments_default = PostComments;

  // packages/editor/build-module/components/post-discussion/panel.mjs
  var import_i18n154 = __toESM(require_i18n(), 1);
  var import_components135 = __toESM(require_components(), 1);
  var import_data119 = __toESM(require_data(), 1);
  var import_element113 = __toESM(require_element(), 1);
  var import_block_editor50 = __toESM(require_block_editor(), 1);
  var import_core_data79 = __toESM(require_core_data(), 1);

  // packages/editor/build-module/components/post-pingbacks/index.mjs
  var import_i18n153 = __toESM(require_i18n(), 1);
  var import_components134 = __toESM(require_components(), 1);
  var import_data118 = __toESM(require_data(), 1);
  var import_jsx_runtime257 = __toESM(require_jsx_runtime(), 1);
  function PostPingbacks() {
    const pingStatus = (0, import_data118.useSelect)(
      (select6) => select6(store).getEditedPostAttribute("ping_status") ?? "open",
      []
    );
    const { editPost: editPost2 } = (0, import_data118.useDispatch)(store);
    const onTogglePingback = () => editPost2({
      ping_status: pingStatus === "open" ? "closed" : "open"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
      import_components134.CheckboxControl,
      {
        label: (0, import_i18n153.__)("Enable pingbacks & trackbacks"),
        checked: pingStatus === "open",
        onChange: onTogglePingback,
        help: /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
          import_components134.ExternalLink,
          {
            href: (0, import_i18n153.__)(
              "https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"
            ),
            children: (0, import_i18n153.__)("Learn more about pingbacks & trackbacks")
          }
        )
      }
    );
  }
  var post_pingbacks_default = PostPingbacks;

  // packages/editor/build-module/components/post-discussion/panel.mjs
  var import_jsx_runtime258 = __toESM(require_jsx_runtime(), 1);
  var PANEL_NAME2 = "discussion-panel";
  function ModalContents({ onClose }) {
    return /* @__PURE__ */ (0, import_jsx_runtime258.jsxs)("div", { className: "editor-post-discussion", children: [
      /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
        import_block_editor50.__experimentalInspectorPopoverHeader,
        {
          title: (0, import_i18n154.__)("Discussion"),
          onClose
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime258.jsxs)(import_components135.__experimentalVStack, { spacing: 4, children: [
        /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(post_type_support_check_default, { supportKeys: "comments", children: /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(post_comments_default, {}) }),
        /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(post_type_support_check_default, { supportKeys: "trackbacks", children: /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(post_pingbacks_default, {}) })
      ] })
    ] });
  }
  function PostDiscussionToggle({ isOpen, onClick }) {
    const {
      commentStatus,
      pingStatus,
      commentsSupported,
      trackbacksSupported
    } = (0, import_data119.useSelect)((select6) => {
      const { getEditedPostAttribute: getEditedPostAttribute2 } = select6(store);
      const { getPostType } = select6(import_core_data79.store);
      const postType2 = getPostType(getEditedPostAttribute2("type"));
      return {
        commentStatus: getEditedPostAttribute2("comment_status") ?? "open",
        pingStatus: getEditedPostAttribute2("ping_status") ?? "open",
        commentsSupported: !!postType2.supports.comments,
        trackbacksSupported: !!postType2.supports.trackbacks
      };
    }, []);
    let label;
    if (commentStatus === "open") {
      if (pingStatus === "open") {
        label = (0, import_i18n154._x)("Open", 'Adjective: e.g. "Comments are open"');
      } else {
        label = trackbacksSupported ? (0, import_i18n154.__)("Comments only") : (0, import_i18n154._x)("Open", 'Adjective: e.g. "Comments are open"');
      }
    } else if (pingStatus === "open") {
      label = commentsSupported ? (0, import_i18n154.__)("Pings only") : (0, import_i18n154.__)("Pings enabled");
    } else {
      label = (0, import_i18n154.__)("Closed");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
      import_components135.Button,
      {
        size: "compact",
        className: "editor-post-discussion__panel-toggle",
        variant: "tertiary",
        "aria-label": (0, import_i18n154.__)("Change discussion options"),
        "aria-expanded": isOpen,
        onClick,
        children: label
      }
    );
  }
  function PostDiscussionPanel() {
    const { isEnabled } = (0, import_data119.useSelect)((select6) => {
      const { isEditorPanelEnabled: isEditorPanelEnabled2 } = select6(store);
      return {
        isEnabled: isEditorPanelEnabled2(PANEL_NAME2)
      };
    }, []);
    const [popoverAnchor, setPopoverAnchor] = (0, import_element113.useState)(null);
    const popoverProps = (0, import_element113.useMemo)(
      () => ({
        // Anchor the popover to the middle of the entire row so that it doesn't
        // move around when the label changes.
        anchor: popoverAnchor,
        placement: "left-start",
        offset: 36,
        shift: true
      }),
      [popoverAnchor]
    );
    if (!isEnabled) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(post_type_support_check_default, { supportKeys: ["comments", "trackbacks"], children: /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(post_panel_row_default, { label: (0, import_i18n154.__)("Discussion"), ref: setPopoverAnchor, children: /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
      import_components135.Dropdown,
      {
        popoverProps,
        className: "editor-post-discussion__panel-dropdown",
        contentClassName: "editor-post-discussion__panel-dialog",
        focusOnMount: true,
        renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
          PostDiscussionToggle,
          {
            isOpen,
            onClick: onToggle
          }
        ),
        renderContent: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(ModalContents, { onClose })
      }
    ) }) });
  }

  // packages/editor/build-module/components/post-excerpt/index.mjs
  var import_i18n155 = __toESM(require_i18n(), 1);
  var import_components136 = __toESM(require_components(), 1);
  var import_data120 = __toESM(require_data(), 1);
  var import_element114 = __toESM(require_element(), 1);
  var import_html_entities19 = __toESM(require_html_entities(), 1);
  var import_jsx_runtime259 = __toESM(require_jsx_runtime(), 1);
  function PostExcerpt({
    hideLabelFromVision = false,
    updateOnBlur = false
  }) {
    const { excerpt, shouldUseDescriptionLabel, usedAttribute } = (0, import_data120.useSelect)(
      (select6) => {
        const { getCurrentPostType: getCurrentPostType2, getEditedPostAttribute: getEditedPostAttribute2 } = select6(store);
        const postType2 = getCurrentPostType2();
        const _usedAttribute = [
          "wp_template",
          "wp_template_part"
        ].includes(postType2) ? "description" : "excerpt";
        return {
          excerpt: getEditedPostAttribute2(_usedAttribute),
          // There are special cases where we want to label the excerpt as a description.
          shouldUseDescriptionLabel: [
            "wp_template",
            "wp_template_part",
            "wp_block"
          ].includes(postType2),
          usedAttribute: _usedAttribute
        };
      },
      []
    );
    const { editPost: editPost2 } = (0, import_data120.useDispatch)(store);
    const [localExcerpt, setLocalExcerpt] = (0, import_element114.useState)(
      (0, import_html_entities19.decodeEntities)(excerpt)
    );
    const updatePost2 = (value) => {
      editPost2({ [usedAttribute]: value });
    };
    const label = shouldUseDescriptionLabel ? (0, import_i18n155.__)("Write a description (optional)") : (0, import_i18n155.__)("Write an excerpt (optional)");
    return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)("div", { className: "editor-post-excerpt", children: /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
      import_components136.TextareaControl,
      {
        label,
        hideLabelFromVision,
        className: "editor-post-excerpt__textarea",
        onChange: updateOnBlur ? setLocalExcerpt : updatePost2,
        onBlur: updateOnBlur ? () => updatePost2(localExcerpt) : void 0,
        value: updateOnBlur ? localExcerpt : excerpt,
        help: !shouldUseDescriptionLabel ? /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
          import_components136.ExternalLink,
          {
            href: (0, import_i18n155.__)(
              "https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt"
            ),
            children: (0, import_i18n155.__)("Learn more about manual excerpts")
          }
        ) : (0, import_i18n155.__)("Write a description")
      }
    ) });
  }

  // packages/editor/build-module/components/post-excerpt/check.mjs
  var import_jsx_runtime260 = __toESM(require_jsx_runtime(), 1);
  function PostExcerptCheck({ children }) {
    return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(post_type_support_check_default, { supportKeys: "excerpt", children });
  }
  var check_default3 = PostExcerptCheck;

  // packages/editor/build-module/components/post-excerpt/panel.mjs
  var import_i18n156 = __toESM(require_i18n(), 1);
  var import_components138 = __toESM(require_components(), 1);
  var import_data121 = __toESM(require_data(), 1);
  var import_element115 = __toESM(require_element(), 1);
  var import_block_editor51 = __toESM(require_block_editor(), 1);
  var import_core_data80 = __toESM(require_core_data(), 1);
  var import_html_entities20 = __toESM(require_html_entities(), 1);

  // packages/editor/build-module/components/post-excerpt/plugin.mjs
  var import_components137 = __toESM(require_components(), 1);
  var import_jsx_runtime261 = __toESM(require_jsx_runtime(), 1);
  var { Fill: Fill9, Slot: Slot9 } = (0, import_components137.createSlotFill)("PluginPostExcerpt");
  var PluginPostExcerpt = ({ children, className }) => {
    return /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(Fill9, { children: /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(import_components137.PanelRow, { className, children }) });
  };
  PluginPostExcerpt.Slot = Slot9;
  var plugin_default = PluginPostExcerpt;

  // packages/editor/build-module/components/post-excerpt/panel.mjs
  var import_jsx_runtime262 = __toESM(require_jsx_runtime(), 1);
  var PANEL_NAME3 = "post-excerpt";
  function ExcerptPanel() {
    const { isOpened, isEnabled, postType: postType2 } = (0, import_data121.useSelect)((select6) => {
      const {
        isEditorPanelOpened: isEditorPanelOpened2,
        isEditorPanelEnabled: isEditorPanelEnabled2,
        getCurrentPostType: getCurrentPostType2
      } = select6(store);
      return {
        isOpened: isEditorPanelOpened2(PANEL_NAME3),
        isEnabled: isEditorPanelEnabled2(PANEL_NAME3),
        postType: getCurrentPostType2()
      };
    }, []);
    const { toggleEditorPanelOpened: toggleEditorPanelOpened2 } = (0, import_data121.useDispatch)(store);
    const toggleExcerptPanel = () => toggleEditorPanelOpened2(PANEL_NAME3);
    if (!isEnabled) {
      return null;
    }
    const shouldUseDescriptionLabel = [
      "wp_template",
      "wp_template_part",
      "wp_block"
    ].includes(postType2);
    return /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
      import_components138.PanelBody,
      {
        title: shouldUseDescriptionLabel ? (0, import_i18n156.__)("Description") : (0, import_i18n156.__)("Excerpt"),
        opened: isOpened,
        onToggle: toggleExcerptPanel,
        children: /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(plugin_default.Slot, { children: (fills) => /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)(import_jsx_runtime262.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(PostExcerpt, {}),
          fills
        ] }) })
      }
    );
  }
  function PostExcerptPanel() {
    return /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(check_default3, { children: /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(ExcerptPanel, {}) });
  }
  function PrivatePostExcerptPanel() {
    return /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(check_default3, { children: /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(PrivateExcerpt, {}) });
  }
  function PrivateExcerpt() {
    const { shouldRender, excerpt, shouldBeUsedAsDescription, allowEditing } = (0, import_data121.useSelect)((select6) => {
      const {
        getCurrentPostType: getCurrentPostType2,
        getCurrentPostId: getCurrentPostId2,
        getEditedPostAttribute: getEditedPostAttribute2,
        isEditorPanelEnabled: isEditorPanelEnabled2
      } = select6(store);
      const postType2 = getCurrentPostType2();
      const isTemplateOrTemplatePart2 = [
        "wp_template",
        "wp_template_part"
      ].includes(postType2);
      const isPattern = postType2 === "wp_block";
      const _shouldBeUsedAsDescription = isTemplateOrTemplatePart2 || isPattern;
      const _usedAttribute = isTemplateOrTemplatePart2 ? "description" : "excerpt";
      const _excerpt = getEditedPostAttribute2(_usedAttribute);
      const template2 = isTemplateOrTemplatePart2 && select6(import_core_data80.store).getEntityRecord(
        "postType",
        postType2,
        getCurrentPostId2()
      );
      const fallback = !_excerpt && isTemplateOrTemplatePart2 ? getTemplateInfo({
        template: template2,
        templateTypes: select6(import_core_data80.store).getCurrentTheme()?.default_template_types
      })?.description : void 0;
      const _shouldRender = isEditorPanelEnabled2(PANEL_NAME3) || _shouldBeUsedAsDescription;
      return {
        excerpt: _excerpt ?? fallback,
        shouldRender: _shouldRender,
        shouldBeUsedAsDescription: _shouldBeUsedAsDescription,
        // If we should render, allow editing for all post types that are not used as description.
        // For the rest allow editing only for user generated entities.
        allowEditing: _shouldRender && (!_shouldBeUsedAsDescription || isPattern || template2 && template2.source === TEMPLATE_ORIGINS.custom && !template2.has_theme_file && template2.is_custom)
      };
    }, []);
    const [popoverAnchor, setPopoverAnchor] = (0, import_element115.useState)(null);
    const label = shouldBeUsedAsDescription ? (0, import_i18n156.__)("Description") : (0, import_i18n156.__)("Excerpt");
    const popoverProps = (0, import_element115.useMemo)(
      () => ({
        // Anchor the popover to the middle of the entire row so that it doesn't
        // move around when the label changes.
        anchor: popoverAnchor,
        "aria-label": label,
        headerTitle: label,
        placement: "left-start",
        offset: 36,
        shift: true
      }),
      [popoverAnchor, label]
    );
    if (!shouldRender) {
      return false;
    }
    const excerptText = !!excerpt && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(import_components138.__experimentalText, { align: "left", numberOfLines: 4, truncate: allowEditing, children: (0, import_html_entities20.decodeEntities)(excerpt) });
    if (!allowEditing) {
      return excerptText;
    }
    const excerptPlaceholder = shouldBeUsedAsDescription ? (0, import_i18n156.__)("Add a description\u2026") : (0, import_i18n156.__)("Add an excerpt\u2026");
    const triggerEditLabel = shouldBeUsedAsDescription ? (0, import_i18n156.__)("Edit description") : (0, import_i18n156.__)("Edit excerpt");
    return /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)(import_components138.__experimentalVStack, { children: [
      excerptText,
      /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
        import_components138.Dropdown,
        {
          className: "editor-post-excerpt__dropdown",
          contentClassName: "editor-post-excerpt__dropdown__content",
          popoverProps,
          focusOnMount: true,
          ref: setPopoverAnchor,
          renderToggle: ({ onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
            import_components138.Button,
            {
              __next40pxDefaultSize: true,
              onClick: onToggle,
              variant: "link",
              children: excerptText ? triggerEditLabel : excerptPlaceholder
            }
          ),
          renderContent: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)(import_jsx_runtime262.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
              import_block_editor51.__experimentalInspectorPopoverHeader,
              {
                title: label,
                onClose
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(import_components138.__experimentalVStack, { spacing: 4, children: /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(plugin_default.Slot, { children: (fills) => /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)(import_jsx_runtime262.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
                PostExcerpt,
                {
                  hideLabelFromVision: true,
                  updateOnBlur: true
                }
              ),
              fills
            ] }) }) })
          ] })
        }
      )
    ] });
  }

  // packages/editor/build-module/components/post-featured-image/index.mjs
  var import_i18n157 = __toESM(require_i18n(), 1);
  var import_hooks46 = __toESM(require_hooks(), 1);
  var import_components139 = __toESM(require_components(), 1);
  var import_blob3 = __toESM(require_blob(), 1);
  var import_element116 = __toESM(require_element(), 1);
  var import_compose26 = __toESM(require_compose(), 1);
  var import_data123 = __toESM(require_data(), 1);
  var import_block_editor52 = __toESM(require_block_editor(), 1);
  var import_core_data82 = __toESM(require_core_data(), 1);

  // packages/editor/build-module/components/theme-support-check/index.mjs
  var import_data122 = __toESM(require_data(), 1);
  var import_core_data81 = __toESM(require_core_data(), 1);
  function ThemeSupportCheck({ children, supportKeys }) {
    const { postType: postType2, themeSupports } = (0, import_data122.useSelect)((select6) => {
      return {
        postType: select6(store).getEditedPostAttribute("type"),
        themeSupports: select6(import_core_data81.store).getThemeSupports()
      };
    }, []);
    const isSupported = (Array.isArray(supportKeys) ? supportKeys : [supportKeys]).some((key) => {
      const supported = themeSupports?.[key] ?? false;
      if ("post-thumbnails" === key && Array.isArray(supported)) {
        return supported.includes(postType2);
      }
      return supported;
    });
    if (!isSupported) {
      return null;
    }
    return children;
  }

  // packages/editor/build-module/components/post-featured-image/check.mjs
  var import_jsx_runtime263 = __toESM(require_jsx_runtime(), 1);
  function PostFeaturedImageCheck({ children }) {
    return /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(ThemeSupportCheck, { supportKeys: "post-thumbnails", children: /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(post_type_support_check_default, { supportKeys: "thumbnail", children }) });
  }
  var check_default4 = PostFeaturedImageCheck;

  // packages/editor/build-module/components/post-featured-image/index.mjs
  var import_jsx_runtime264 = __toESM(require_jsx_runtime(), 1);
  var ALLOWED_MEDIA_TYPES = ["image"];
  var DEFAULT_FEATURE_IMAGE_LABEL = (0, import_i18n157.__)("Featured image");
  var DEFAULT_SET_FEATURE_IMAGE_LABEL = (0, import_i18n157.__)("Add a featured image");
  var instructions = /* @__PURE__ */ (0, import_jsx_runtime264.jsx)("p", { children: (0, import_i18n157.__)(
    "To edit the featured image, you need permission to upload media."
  ) });
  function getMediaDetails(media, postId2) {
    if (!media) {
      return {};
    }
    const defaultSize = (0, import_hooks46.applyFilters)(
      "editor.PostFeaturedImage.imageSize",
      "large",
      media.id,
      postId2
    );
    if (defaultSize in (media?.media_details?.sizes ?? {})) {
      return {
        mediaWidth: media.media_details.sizes[defaultSize].width,
        mediaHeight: media.media_details.sizes[defaultSize].height,
        mediaSourceUrl: media.media_details.sizes[defaultSize].source_url
      };
    }
    const fallbackSize = (0, import_hooks46.applyFilters)(
      "editor.PostFeaturedImage.imageSize",
      "thumbnail",
      media.id,
      postId2
    );
    if (fallbackSize in (media?.media_details?.sizes ?? {})) {
      return {
        mediaWidth: media.media_details.sizes[fallbackSize].width,
        mediaHeight: media.media_details.sizes[fallbackSize].height,
        mediaSourceUrl: media.media_details.sizes[fallbackSize].source_url
      };
    }
    return {
      mediaWidth: media.media_details.width,
      mediaHeight: media.media_details.height,
      mediaSourceUrl: media.source_url
    };
  }
  function PostFeaturedImage({
    currentPostId,
    featuredImageId,
    onUpdateImage,
    onRemoveImage,
    media,
    postType: postType2,
    noticeUI,
    noticeOperations,
    isRequestingFeaturedImageMedia
  }) {
    const returnsFocusRef = (0, import_element116.useRef)(false);
    const [isLoading, setIsLoading] = (0, import_element116.useState)(false);
    const { getSettings: getSettings10 } = (0, import_data123.useSelect)(import_block_editor52.store);
    const { mediaSourceUrl } = getMediaDetails(media, currentPostId);
    function onDropFiles(filesList) {
      getSettings10().mediaUpload({
        allowedTypes: ALLOWED_MEDIA_TYPES,
        filesList,
        onFileChange([image]) {
          if ((0, import_blob3.isBlobURL)(image?.url)) {
            setIsLoading(true);
            return;
          }
          if (image) {
            onUpdateImage(image);
          }
          setIsLoading(false);
        },
        onError(message2) {
          noticeOperations.removeAllNotices();
          noticeOperations.createErrorNotice(message2);
        },
        multiple: false
      });
    }
    function getImageDescription(imageMedia) {
      if (imageMedia.alt_text) {
        return (0, import_i18n157.sprintf)(
          // Translators: %s: The selected image alt text.
          (0, import_i18n157.__)("Current image: %s"),
          imageMedia.alt_text
        );
      }
      return (0, import_i18n157.sprintf)(
        // Translators: %s: The selected image filename.
        (0, import_i18n157.__)(
          "The current image has no alternative text. The file name is: %s"
        ),
        imageMedia.media_details.sizes?.full?.file || imageMedia.slug
      );
    }
    function returnFocus(node) {
      if (returnsFocusRef.current && node) {
        node.focus();
        returnsFocusRef.current = false;
      }
    }
    const isMissingMedia = !isRequestingFeaturedImageMedia && !!featuredImageId && !media;
    return /* @__PURE__ */ (0, import_jsx_runtime264.jsxs)(check_default4, { children: [
      noticeUI,
      /* @__PURE__ */ (0, import_jsx_runtime264.jsxs)("div", { className: "editor-post-featured-image", children: [
        media && /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(
          "div",
          {
            id: `editor-post-featured-image-${featuredImageId}-describedby`,
            className: "hidden",
            children: getImageDescription(media)
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(import_block_editor52.MediaUploadCheck, { fallback: instructions, children: /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(
          import_block_editor52.MediaUpload,
          {
            title: postType2?.labels?.featured_image || DEFAULT_FEATURE_IMAGE_LABEL,
            onSelect: onUpdateImage,
            unstableFeaturedImageFlow: true,
            allowedTypes: ALLOWED_MEDIA_TYPES,
            modalClass: "editor-post-featured-image__media-modal",
            render: ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime264.jsxs)("div", { className: "editor-post-featured-image__container", children: [
              isMissingMedia ? /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(
                import_components139.Notice,
                {
                  status: "warning",
                  isDismissible: false,
                  children: (0, import_i18n157.__)(
                    "Could not retrieve the featured image data."
                  )
                }
              ) : /* @__PURE__ */ (0, import_jsx_runtime264.jsxs)(
                import_components139.Button,
                {
                  __next40pxDefaultSize: true,
                  ref: returnFocus,
                  className: !featuredImageId ? "editor-post-featured-image__toggle" : "editor-post-featured-image__preview",
                  onClick: open,
                  "aria-label": !featuredImageId ? null : (0, import_i18n157.__)(
                    "Edit or replace the featured image"
                  ),
                  "aria-describedby": !featuredImageId ? null : `editor-post-featured-image-${featuredImageId}-describedby`,
                  "aria-haspopup": "dialog",
                  disabled: isLoading,
                  accessibleWhenDisabled: true,
                  children: [
                    !!featuredImageId && media && /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(
                      "img",
                      {
                        className: "editor-post-featured-image__preview-image",
                        src: mediaSourceUrl,
                        alt: getImageDescription(
                          media
                        )
                      }
                    ),
                    (isLoading || isRequestingFeaturedImageMedia) && /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(import_components139.Spinner, {}),
                    !featuredImageId && !isLoading && (postType2?.labels?.set_featured_image || DEFAULT_SET_FEATURE_IMAGE_LABEL)
                  ]
                }
              ),
              !!featuredImageId && /* @__PURE__ */ (0, import_jsx_runtime264.jsxs)(
                import_components139.__experimentalHStack,
                {
                  className: clsx_default(
                    "editor-post-featured-image__actions",
                    {
                      "editor-post-featured-image__actions-missing-image": isMissingMedia,
                      "editor-post-featured-image__actions-is-requesting-image": isRequestingFeaturedImageMedia
                    }
                  ),
                  children: [
                    /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(
                      import_components139.Button,
                      {
                        __next40pxDefaultSize: true,
                        className: "editor-post-featured-image__action",
                        onClick: open,
                        "aria-haspopup": "dialog",
                        variant: isMissingMedia ? "secondary" : void 0,
                        children: (0, import_i18n157.__)("Replace")
                      }
                    ),
                    /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(
                      import_components139.Button,
                      {
                        __next40pxDefaultSize: true,
                        className: "editor-post-featured-image__action",
                        onClick: () => {
                          onRemoveImage();
                          returnsFocusRef.current = true;
                        },
                        variant: isMissingMedia ? "secondary" : void 0,
                        isDestructive: isMissingMedia,
                        children: (0, import_i18n157.__)("Remove")
                      }
                    )
                  ]
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(import_components139.DropZone, { onFilesDrop: onDropFiles })
            ] }),
            value: featuredImageId
          }
        ) })
      ] })
    ] });
  }
  var applyWithSelect = (0, import_data123.withSelect)((select6) => {
    const { getEntityRecord, getPostType, hasFinishedResolution } = select6(import_core_data82.store);
    const { getCurrentPostId: getCurrentPostId2, getEditedPostAttribute: getEditedPostAttribute2 } = select6(store);
    const featuredImageId = getEditedPostAttribute2("featured_media");
    return {
      media: featuredImageId ? getEntityRecord("postType", "attachment", featuredImageId, {
        context: "view"
      }) : null,
      currentPostId: getCurrentPostId2(),
      postType: getPostType(getEditedPostAttribute2("type")),
      featuredImageId,
      isRequestingFeaturedImageMedia: !!featuredImageId && !hasFinishedResolution("getEntityRecord", [
        "postType",
        "attachment",
        featuredImageId,
        { context: "view" }
      ])
    };
  });
  var applyWithDispatch = (0, import_data123.withDispatch)(
    (dispatch7, { noticeOperations }, { select: select6 }) => {
      const { editPost: editPost2 } = dispatch7(store);
      return {
        onUpdateImage(image) {
          editPost2({ featured_media: image.id });
        },
        onDropImage(filesList) {
          select6(import_block_editor52.store).getSettings().mediaUpload({
            allowedTypes: ["image"],
            filesList,
            onFileChange([image]) {
              editPost2({ featured_media: image.id });
            },
            onError(message2) {
              noticeOperations.removeAllNotices();
              noticeOperations.createErrorNotice(message2);
            },
            multiple: false
          });
        },
        onRemoveImage() {
          editPost2({ featured_media: 0 });
        }
      };
    }
  );
  var post_featured_image_default = (0, import_compose26.compose)(
    import_components139.withNotices,
    applyWithSelect,
    applyWithDispatch,
    (0, import_components139.withFilters)("editor.PostFeaturedImage")
  )(PostFeaturedImage);

  // packages/editor/build-module/components/post-featured-image/panel.mjs
  var import_i18n158 = __toESM(require_i18n(), 1);
  var import_components140 = __toESM(require_components(), 1);
  var import_data124 = __toESM(require_data(), 1);
  var import_core_data83 = __toESM(require_core_data(), 1);
  var import_jsx_runtime265 = __toESM(require_jsx_runtime(), 1);
  var PANEL_NAME4 = "featured-image";
  function PostFeaturedImagePanel({ withPanelBody = true }) {
    const { postType: postType2, isEnabled, isOpened } = (0, import_data124.useSelect)((select6) => {
      const {
        getEditedPostAttribute: getEditedPostAttribute2,
        isEditorPanelEnabled: isEditorPanelEnabled2,
        isEditorPanelOpened: isEditorPanelOpened2
      } = select6(store);
      const { getPostType } = select6(import_core_data83.store);
      return {
        postType: getPostType(getEditedPostAttribute2("type")),
        isEnabled: isEditorPanelEnabled2(PANEL_NAME4),
        isOpened: isEditorPanelOpened2(PANEL_NAME4)
      };
    }, []);
    const { toggleEditorPanelOpened: toggleEditorPanelOpened2 } = (0, import_data124.useDispatch)(store);
    if (!isEnabled) {
      return null;
    }
    if (!withPanelBody) {
      return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(check_default4, { children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(post_featured_image_default, {}) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(check_default4, { children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
      import_components140.PanelBody,
      {
        title: postType2?.labels?.featured_image ?? (0, import_i18n158.__)("Featured image"),
        opened: isOpened,
        onToggle: () => toggleEditorPanelOpened2(PANEL_NAME4),
        children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(post_featured_image_default, {})
      }
    ) });
  }

  // packages/editor/build-module/components/post-format/index.mjs
  var import_i18n159 = __toESM(require_i18n(), 1);
  var import_components141 = __toESM(require_components(), 1);
  var import_data126 = __toESM(require_data(), 1);
  var import_compose27 = __toESM(require_compose(), 1);
  var import_core_data84 = __toESM(require_core_data(), 1);

  // packages/editor/build-module/components/post-format/check.mjs
  var import_data125 = __toESM(require_data(), 1);
  var import_jsx_runtime266 = __toESM(require_jsx_runtime(), 1);
  function PostFormatCheck({ children }) {
    const disablePostFormats = (0, import_data125.useSelect)(
      (select6) => select6(store).getEditorSettings().disablePostFormats,
      []
    );
    if (disablePostFormats) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(post_type_support_check_default, { supportKeys: "post-formats", children });
  }

  // packages/editor/build-module/components/post-format/index.mjs
  var import_jsx_runtime267 = __toESM(require_jsx_runtime(), 1);
  var POST_FORMATS = [
    { id: "aside", caption: (0, import_i18n159.__)("Aside") },
    { id: "audio", caption: (0, import_i18n159.__)("Audio") },
    { id: "chat", caption: (0, import_i18n159.__)("Chat") },
    { id: "gallery", caption: (0, import_i18n159.__)("Gallery") },
    { id: "image", caption: (0, import_i18n159.__)("Image") },
    { id: "link", caption: (0, import_i18n159.__)("Link") },
    { id: "quote", caption: (0, import_i18n159.__)("Quote") },
    { id: "standard", caption: (0, import_i18n159.__)("Standard") },
    { id: "status", caption: (0, import_i18n159.__)("Status") },
    { id: "video", caption: (0, import_i18n159.__)("Video") }
  ].sort((a3, b3) => {
    const normalizedA = a3.caption.toUpperCase();
    const normalizedB = b3.caption.toUpperCase();
    if (normalizedA < normalizedB) {
      return -1;
    }
    if (normalizedA > normalizedB) {
      return 1;
    }
    return 0;
  });
  function PostFormat() {
    const instanceId = (0, import_compose27.useInstanceId)(PostFormat);
    const postFormatSelectorId = `post-format-selector-${instanceId}`;
    const { postFormat, suggestedFormat, supportedFormats } = (0, import_data126.useSelect)(
      (select6) => {
        const { getEditedPostAttribute: getEditedPostAttribute2, getSuggestedPostFormat: getSuggestedPostFormat2 } = select6(store);
        const _postFormat = getEditedPostAttribute2("format");
        const themeSupports = select6(import_core_data84.store).getThemeSupports();
        return {
          postFormat: _postFormat ?? "standard",
          suggestedFormat: getSuggestedPostFormat2(),
          supportedFormats: themeSupports.formats
        };
      },
      []
    );
    const formats = POST_FORMATS.filter((format6) => {
      return supportedFormats?.includes(format6.id) || postFormat === format6.id;
    });
    const suggestion = formats.find(
      (format6) => format6.id === suggestedFormat
    );
    const { editPost: editPost2 } = (0, import_data126.useDispatch)(store);
    const onUpdatePostFormat = (format6) => editPost2({ format: format6 });
    return /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(PostFormatCheck, { children: /* @__PURE__ */ (0, import_jsx_runtime267.jsxs)("div", { className: "editor-post-format", children: [
      /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
        import_components141.RadioControl,
        {
          className: "editor-post-format__options",
          label: (0, import_i18n159.__)("Post Format"),
          selected: postFormat,
          onChange: (format6) => onUpdatePostFormat(format6),
          id: postFormatSelectorId,
          options: formats.map((format6) => ({
            label: format6.caption,
            value: format6.id
          })),
          hideLabelFromVision: true
        }
      ),
      suggestion && suggestion.id !== postFormat && /* @__PURE__ */ (0, import_jsx_runtime267.jsx)("p", { className: "editor-post-format__suggestion", children: /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
        import_components141.Button,
        {
          __next40pxDefaultSize: true,
          variant: "link",
          onClick: () => onUpdatePostFormat(suggestion.id),
          children: (0, import_i18n159.sprintf)(
            /* translators: %s: post format */
            (0, import_i18n159.__)("Apply suggested format: %s"),
            suggestion.caption
          )
        }
      ) })
    ] }) });
  }

  // packages/editor/build-module/components/post-last-revision/index.mjs
  var import_i18n160 = __toESM(require_i18n(), 1);
  var import_components142 = __toESM(require_components(), 1);
  var import_data128 = __toESM(require_data(), 1);
  var import_url13 = __toESM(require_url(), 1);

  // packages/editor/build-module/components/post-last-revision/check.mjs
  var import_data127 = __toESM(require_data(), 1);
  var import_jsx_runtime268 = __toESM(require_jsx_runtime(), 1);
  function PostLastRevisionCheck({ children }) {
    const { lastRevisionId, revisionsCount } = (0, import_data127.useSelect)((select6) => {
      const { getCurrentPostLastRevisionId: getCurrentPostLastRevisionId2, getCurrentPostRevisionsCount: getCurrentPostRevisionsCount2 } = select6(store);
      return {
        lastRevisionId: getCurrentPostLastRevisionId2(),
        revisionsCount: getCurrentPostRevisionsCount2()
      };
    }, []);
    if (!lastRevisionId || revisionsCount < 2) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(post_type_support_check_default, { supportKeys: "revisions", children });
  }
  var check_default5 = PostLastRevisionCheck;

  // packages/editor/build-module/components/post-last-revision/index.mjs
  var import_jsx_runtime269 = __toESM(require_jsx_runtime(), 1);
  function usePostLastRevisionInfo() {
    return (0, import_data128.useSelect)((select6) => {
      const {
        getCurrentPostLastRevisionId: getCurrentPostLastRevisionId2,
        getCurrentPostRevisionsCount: getCurrentPostRevisionsCount2,
        getEditorSettings: getEditorSettings2
      } = select6(store);
      return {
        lastRevisionId: getCurrentPostLastRevisionId2(),
        revisionsCount: getCurrentPostRevisionsCount2(),
        disableVisualRevisions: !!getEditorSettings2().disableVisualRevisions
      };
    }, []);
  }
  function PostLastRevision() {
    const { lastRevisionId, revisionsCount, disableVisualRevisions } = usePostLastRevisionInfo();
    const { setCurrentRevisionId: setCurrentRevisionId2 } = unlock((0, import_data128.useDispatch)(store));
    const buttonProps = disableVisualRevisions ? {
      href: (0, import_url13.addQueryArgs)("revision.php", {
        revision: lastRevisionId
      })
    } : { onClick: () => setCurrentRevisionId2(lastRevisionId) };
    return /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(check_default5, { children: /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
      import_components142.Button,
      {
        __next40pxDefaultSize: true,
        ...buttonProps,
        className: "editor-post-last-revision__title",
        icon: backup_default,
        iconPosition: "right",
        text: (0, import_i18n160.sprintf)(
          /* translators: %s: number of revisions. */
          (0, import_i18n160.__)("Revisions (%s)"),
          revisionsCount
        )
      }
    ) });
  }
  function PrivatePostLastRevision() {
    const { lastRevisionId, revisionsCount, disableVisualRevisions } = usePostLastRevisionInfo();
    const { setCurrentRevisionId: setCurrentRevisionId2 } = unlock((0, import_data128.useDispatch)(store));
    const buttonProps = disableVisualRevisions ? {
      href: (0, import_url13.addQueryArgs)("revision.php", {
        revision: lastRevisionId
      })
    } : { onClick: () => setCurrentRevisionId2(lastRevisionId) };
    return /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(check_default5, { children: /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(post_panel_row_default, { label: (0, import_i18n160.__)("Revisions"), children: /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
      import_components142.Button,
      {
        ...buttonProps,
        className: "editor-private-post-last-revision__button",
        text: revisionsCount,
        "aria-label": (0, import_i18n160.sprintf)(
          /* translators: %s: number of revisions. */
          (0, import_i18n160.__)("Open revisions screen: %s revisions"),
          revisionsCount
        ),
        variant: "tertiary",
        size: "compact"
      }
    ) }) });
  }
  var post_last_revision_default = PostLastRevision;

  // packages/editor/build-module/components/post-last-revision/panel.mjs
  var import_components143 = __toESM(require_components(), 1);
  var import_jsx_runtime270 = __toESM(require_jsx_runtime(), 1);
  function PostLastRevisionPanel() {
    return /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(check_default5, { children: /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(import_components143.PanelBody, { className: "editor-post-last-revision__panel", children: /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(post_last_revision_default, {}) }) });
  }
  var panel_default2 = PostLastRevisionPanel;

  // packages/editor/build-module/components/post-locked-modal/index.mjs
  var import_i18n162 = __toESM(require_i18n(), 1);
  var import_components144 = __toESM(require_components(), 1);
  var import_data129 = __toESM(require_data(), 1);
  var import_url14 = __toESM(require_url(), 1);
  var import_element117 = __toESM(require_element(), 1);
  var import_hooks47 = __toESM(require_hooks(), 1);
  var import_compose28 = __toESM(require_compose(), 1);
  var import_core_data85 = __toESM(require_core_data(), 1);

  // packages/editor/build-module/utils/sync-error-messages.mjs
  var import_i18n161 = __toESM(require_i18n(), 1);
  var AUTHENTICATION_FAILED = "authentication-failed";
  var CONNECTION_EXPIRED = "connection-expired";
  var CONNECTION_LIMIT_EXCEEDED = "connection-limit-exceeded";
  var DOCUMENT_SIZE_LIMIT_EXCEEDED = "document-size-limit-exceeded";
  var UNKNOWN_ERROR = "unknown-error";
  var ERROR_MESSAGES = {
    [AUTHENTICATION_FAILED]: {
      title: (0, import_i18n161.__)("Unable to connect"),
      description: (0, import_i18n161.__)(
        "Real-time collaboration couldn't verify your permissions. Check that you have access to edit this post or contact your site administrator."
      )
    },
    [CONNECTION_EXPIRED]: {
      title: (0, import_i18n161.__)("Connection expired"),
      description: (0, import_i18n161.__)(
        "Your connection to real-time collaboration has timed out. Editing is paused to prevent conflicts with other editors."
      )
    },
    [CONNECTION_LIMIT_EXCEEDED]: {
      title: (0, import_i18n161.__)("Too many editors connected"),
      description: (0, import_i18n161.__)(
        "Real-time collaboration has reached its connection limit. Try again later or contact your site administrator."
      )
    },
    // DOCUMENT_SIZE_LIMIT_EXCEEDED is not included here because it results in
    // collaboration being disabled entirely.
    [UNKNOWN_ERROR]: {
      title: (0, import_i18n161.__)("Connection lost"),
      description: (0, import_i18n161.__)(
        "The connection to real-time collaboration was interrupted. Editing is paused to prevent conflicts with other editors."
      )
    }
  };
  function getSyncErrorMessages(error) {
    if (error?.code && ERROR_MESSAGES[error?.code]) {
      return ERROR_MESSAGES[error.code];
    }
    return ERROR_MESSAGES[UNKNOWN_ERROR];
  }

  // packages/editor/build-module/components/post-locked-modal/index.mjs
  var import_jsx_runtime271 = __toESM(require_jsx_runtime(), 1);
  function CollaborationContext() {
    const { isCollaborationSupported, syncConnectionStatus } = (0, import_data129.useSelect)(
      (select6) => {
        const {
          isCollaborationSupported: isSupported,
          getSyncConnectionStatus
        } = unlock(select6(import_core_data85.store));
        return {
          isCollaborationSupported: isSupported(),
          syncConnectionStatus: getSyncConnectionStatus()
        };
      },
      []
    );
    if (isCollaborationSupported) {
      return null;
    }
    if (DOCUMENT_SIZE_LIMIT_EXCEEDED === syncConnectionStatus?.error?.code) {
      return /* @__PURE__ */ (0, import_jsx_runtime271.jsx)("p", { children: (0, import_i18n162.__)(
        "Because this post is too large for real-time collaboration, only one person can edit at a time."
      ) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime271.jsx)("p", { children: (0, import_i18n162.__)(
      "Because this post uses plugins that aren\u2019t compatible with real-time collaboration, only one person can edit at a time."
    ) });
  }
  function PostLockedModal() {
    const instanceId = (0, import_compose28.useInstanceId)(PostLockedModal);
    const hookName = "core/editor/post-locked-modal-" + instanceId;
    const { autosave: autosave2, updatePostLock: updatePostLock2 } = (0, import_data129.useDispatch)(store);
    const {
      isCollaborationEnabled,
      isLocked,
      isTakeover,
      user,
      postId: postId2,
      postLockUtils,
      activePostLock,
      postType: postType2,
      previewLink
    } = (0, import_data129.useSelect)((select6) => {
      const {
        isPostLocked: isPostLocked2,
        isPostLockTakeover: isPostLockTakeover2,
        getPostLockUser: getPostLockUser2,
        getCurrentPostId: getCurrentPostId2,
        getActivePostLock: getActivePostLock2,
        getEditedPostAttribute: getEditedPostAttribute2,
        getEditedPostPreviewLink: getEditedPostPreviewLink2,
        getEditorSettings: getEditorSettings2,
        isCollaborationEnabledForCurrentPost: isCollaborationEnabledForCurrentPost2
      } = unlock(select6(store));
      const { getPostType } = select6(import_core_data85.store);
      return {
        isCollaborationEnabled: isCollaborationEnabledForCurrentPost2(),
        isLocked: isPostLocked2(),
        isTakeover: isPostLockTakeover2(),
        user: getPostLockUser2(),
        postId: getCurrentPostId2(),
        postLockUtils: getEditorSettings2().postLockUtils,
        activePostLock: getActivePostLock2(),
        postType: getPostType(getEditedPostAttribute2("type")),
        previewLink: getEditedPostPreviewLink2()
      };
    }, []);
    (0, import_element117.useEffect)(() => {
      function sendPostLock(data) {
        if (isLocked) {
          return;
        }
        data["wp-refresh-post-lock"] = {
          lock: activePostLock,
          post_id: postId2
        };
      }
      function receivePostLock(data) {
        if (!data["wp-refresh-post-lock"]) {
          return;
        }
        const received = data["wp-refresh-post-lock"];
        if (received.lock_error) {
          autosave2();
          updatePostLock2({
            isLocked: true,
            isTakeover: true,
            user: {
              name: received.lock_error.name,
              avatar: received.lock_error.avatar_src_2x
            }
          });
        } else if (received.new_lock) {
          updatePostLock2({
            isLocked: false,
            activePostLock: received.new_lock
          });
        }
      }
      function releasePostLock() {
        if (isLocked || !activePostLock) {
          return;
        }
        const data = new window.FormData();
        data.append("action", "wp-remove-post-lock");
        data.append("_wpnonce", postLockUtils.unlockNonce);
        data.append("post_ID", postId2);
        data.append("active_post_lock", activePostLock);
        if (window.navigator.sendBeacon) {
          window.navigator.sendBeacon(postLockUtils.ajaxUrl, data);
        } else {
          const xhr = new window.XMLHttpRequest();
          xhr.open("POST", postLockUtils.ajaxUrl, false);
          xhr.send(data);
        }
      }
      (0, import_hooks47.addAction)("heartbeat.send", hookName, sendPostLock);
      (0, import_hooks47.addAction)("heartbeat.tick", hookName, receivePostLock);
      window.addEventListener("beforeunload", releasePostLock);
      return () => {
        (0, import_hooks47.removeAction)("heartbeat.send", hookName);
        (0, import_hooks47.removeAction)("heartbeat.tick", hookName);
        window.removeEventListener("beforeunload", releasePostLock);
      };
    }, []);
    if (!isLocked) {
      return null;
    }
    if (isCollaborationEnabled) {
      return null;
    }
    const userDisplayName = user.name;
    const userAvatar = user.avatar;
    const unlockUrl = (0, import_url14.addQueryArgs)("post.php", {
      "get-post-lock": "1",
      lockKey: true,
      post: postId2,
      action: "edit",
      _wpnonce: postLockUtils.nonce
    });
    const allPostsUrl = (0, import_url14.addQueryArgs)("edit.php", {
      post_type: postType2?.slug
    });
    const allPostsLabel = (0, import_i18n162.__)("Exit editor");
    return /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
      import_components144.Modal,
      {
        title: isTakeover ? (0, import_i18n162.__)("Someone else has taken over this post") : (0, import_i18n162.__)("This post is already being edited"),
        focusOnMount: true,
        shouldCloseOnClickOutside: false,
        shouldCloseOnEsc: false,
        isDismissible: false,
        className: "editor-post-locked-modal",
        size: "medium",
        children: /* @__PURE__ */ (0, import_jsx_runtime271.jsxs)(import_components144.__experimentalHStack, { alignment: "top", spacing: 6, children: [
          !!userAvatar && /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
            "img",
            {
              src: userAvatar,
              alt: (0, import_i18n162.__)("Avatar"),
              className: "editor-post-locked-modal__avatar",
              width: 64,
              height: 64
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime271.jsxs)("div", { children: [
            !!isTakeover && /* @__PURE__ */ (0, import_jsx_runtime271.jsxs)(import_jsx_runtime271.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime271.jsx)("p", { children: (0, import_element117.createInterpolateElement)(
                userDisplayName ? (0, import_i18n162.sprintf)(
                  /* translators: %s: user's display name */
                  (0, import_i18n162.__)(
                    "<strong>%s</strong> now has editing control of this post (<PreviewLink />). Don\u2019t worry, your changes up to this moment have been saved."
                  ),
                  userDisplayName
                ) : (0, import_i18n162.__)(
                  "Another user now has editing control of this post (<PreviewLink />). Don\u2019t worry, your changes up to this moment have been saved."
                ),
                {
                  strong: /* @__PURE__ */ (0, import_jsx_runtime271.jsx)("strong", {}),
                  PreviewLink: /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(import_components144.ExternalLink, { href: previewLink, children: (0, import_i18n162.__)("preview") })
                }
              ) }),
              /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(CollaborationContext, {})
            ] }),
            !isTakeover && /* @__PURE__ */ (0, import_jsx_runtime271.jsxs)(import_jsx_runtime271.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime271.jsx)("p", { children: (0, import_element117.createInterpolateElement)(
                userDisplayName ? (0, import_i18n162.sprintf)(
                  /* translators: %s: user's display name */
                  (0, import_i18n162.__)(
                    "<strong>%s</strong> is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."
                  ),
                  userDisplayName
                ) : (0, import_i18n162.__)(
                  "Another user is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."
                ),
                {
                  strong: /* @__PURE__ */ (0, import_jsx_runtime271.jsx)("strong", {}),
                  PreviewLink: /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(import_components144.ExternalLink, { href: previewLink, children: (0, import_i18n162.__)("preview") })
                }
              ) }),
              /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(CollaborationContext, {}),
              /* @__PURE__ */ (0, import_jsx_runtime271.jsx)("p", { children: (0, import_i18n162.__)(
                "If you take over, the other user will lose editing control to the post, but their changes will be saved."
              ) })
            ] }),
            /* @__PURE__ */ (0, import_jsx_runtime271.jsxs)(
              import_components144.__experimentalHStack,
              {
                className: "editor-post-locked-modal__buttons",
                justify: "flex-end",
                children: [
                  !isTakeover && /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
                    import_components144.Button,
                    {
                      __next40pxDefaultSize: true,
                      variant: "tertiary",
                      href: unlockUrl,
                      children: (0, import_i18n162.__)("Take over")
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
                    import_components144.Button,
                    {
                      __next40pxDefaultSize: true,
                      variant: "primary",
                      href: allPostsUrl,
                      children: allPostsLabel
                    }
                  )
                ]
              }
            )
          ] })
        ] })
      }
    );
  }
  var post_locked_modal_default = false ? (0, import_components144.withFilters)("editor.PostLockedModal")(PostLockedModal) : PostLockedModal;

  // packages/editor/build-module/components/post-pending-status/index.mjs
  var import_i18n163 = __toESM(require_i18n(), 1);
  var import_components145 = __toESM(require_components(), 1);
  var import_data131 = __toESM(require_data(), 1);

  // packages/editor/build-module/components/post-pending-status/check.mjs
  var import_data130 = __toESM(require_data(), 1);
  function PostPendingStatusCheck({ children }) {
    const { hasPublishAction, isPublished } = (0, import_data130.useSelect)((select6) => {
      const { isCurrentPostPublished: isCurrentPostPublished2, getCurrentPost: getCurrentPost2 } = select6(store);
      return {
        hasPublishAction: getCurrentPost2()._links?.["wp:action-publish"] ?? false,
        isPublished: isCurrentPostPublished2()
      };
    }, []);
    if (isPublished || !hasPublishAction) {
      return null;
    }
    return children;
  }
  var check_default6 = PostPendingStatusCheck;

  // packages/editor/build-module/components/post-pending-status/index.mjs
  var import_jsx_runtime272 = __toESM(require_jsx_runtime(), 1);
  function PostPendingStatus() {
    const status = (0, import_data131.useSelect)(
      (select6) => select6(store).getEditedPostAttribute("status"),
      []
    );
    const { editPost: editPost2 } = (0, import_data131.useDispatch)(store);
    const togglePendingStatus = () => {
      const updatedStatus = status === "pending" ? "draft" : "pending";
      editPost2({ status: updatedStatus });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(check_default6, { children: /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(
      import_components145.CheckboxControl,
      {
        label: (0, import_i18n163.__)("Pending review"),
        checked: status === "pending",
        onChange: togglePendingStatus
      }
    ) });
  }
  var post_pending_status_default = PostPendingStatus;

  // packages/editor/build-module/components/post-preview-button/index.mjs
  var import_element118 = __toESM(require_element(), 1);
  var import_components146 = __toESM(require_components(), 1);
  var import_i18n164 = __toESM(require_i18n(), 1);
  var import_data132 = __toESM(require_data(), 1);
  var import_hooks48 = __toESM(require_hooks(), 1);
  var import_core_data86 = __toESM(require_core_data(), 1);
  var import_jsx_runtime273 = __toESM(require_jsx_runtime(), 1);
  function writeInterstitialMessage(targetDocument) {
    let markup = (0, import_element118.renderToString)(
      /* @__PURE__ */ (0, import_jsx_runtime273.jsxs)("div", { className: "editor-post-preview-button__interstitial-message", children: [
        /* @__PURE__ */ (0, import_jsx_runtime273.jsxs)(import_components146.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 96 96", children: [
          /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
            import_components146.Path,
            {
              className: "outer",
              d: "M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",
              fill: "none"
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
            import_components146.Path,
            {
              className: "inner",
              d: "M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",
              fill: "none"
            }
          )
        ] }),
        /* @__PURE__ */ (0, import_jsx_runtime273.jsx)("p", { children: (0, import_i18n164.__)("Generating preview\u2026") })
      ] })
    );
    markup += `
		<style>
			body {
				margin: 0;
			}
			.editor-post-preview-button__interstitial-message {
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: center;
				height: 100vh;
				width: 100vw;
			}
			@-webkit-keyframes paint {
				0% {
					stroke-dashoffset: 0;
				}
			}
			@-moz-keyframes paint {
				0% {
					stroke-dashoffset: 0;
				}
			}
			@-o-keyframes paint {
				0% {
					stroke-dashoffset: 0;
				}
			}
			@keyframes paint {
				0% {
					stroke-dashoffset: 0;
				}
			}
			.editor-post-preview-button__interstitial-message svg {
				width: 192px;
				height: 192px;
				stroke: #555d66;
				stroke-width: 0.75;
			}
			.editor-post-preview-button__interstitial-message svg .outer,
			.editor-post-preview-button__interstitial-message svg .inner {
				stroke-dasharray: 280;
				stroke-dashoffset: 280;
				-webkit-animation: paint 1.5s ease infinite alternate;
				-moz-animation: paint 1.5s ease infinite alternate;
				-o-animation: paint 1.5s ease infinite alternate;
				animation: paint 1.5s ease infinite alternate;
			}
			p {
				text-align: center;
				font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
			}
		</style>
	`;
    markup = (0, import_hooks48.applyFilters)("editor.PostPreview.interstitialMarkup", markup);
    targetDocument.write(markup);
    targetDocument.title = (0, import_i18n164.__)("Generating preview\u2026");
    targetDocument.close();
  }
  function PostPreviewButton({
    className,
    textContent,
    forceIsAutosaveable,
    role,
    onPreview
  }) {
    const { postId: postId2, currentPostLink, previewLink, isSaveable, isViewable } = (0, import_data132.useSelect)((select6) => {
      const editor = select6(store);
      const core = select6(import_core_data86.store);
      const postType2 = core.getPostType(
        editor.getCurrentPostType("type")
      );
      const canView = postType2?.viewable ?? false;
      if (!canView) {
        return { isViewable: canView };
      }
      return {
        postId: editor.getCurrentPostId(),
        currentPostLink: editor.getCurrentPostAttribute("link"),
        previewLink: editor.getEditedPostPreviewLink(),
        isSaveable: editor.isEditedPostSaveable(),
        isViewable: canView
      };
    }, []);
    const { __unstableSaveForPreview: __unstableSaveForPreview2 } = (0, import_data132.useDispatch)(store);
    if (!isViewable) {
      return null;
    }
    const targetId = `wp-preview-${postId2}`;
    const openPreviewWindow = async (event) => {
      event.preventDefault();
      const previewWindow = window.open("", targetId);
      previewWindow.focus();
      writeInterstitialMessage(previewWindow.document);
      const link = await __unstableSaveForPreview2({ forceIsAutosaveable });
      previewWindow.location = link;
      onPreview?.();
    };
    const href = previewLink || currentPostLink;
    return /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(
      import_components146.Button,
      {
        variant: !className ? "tertiary" : void 0,
        className: className || "editor-post-preview",
        href,
        target: targetId,
        accessibleWhenDisabled: true,
        disabled: !isSaveable,
        onClick: openPreviewWindow,
        role,
        size: "compact",
        children: textContent || /* @__PURE__ */ (0, import_jsx_runtime273.jsxs)(import_jsx_runtime273.Fragment, { children: [
          (0, import_i18n164._x)("Preview", "imperative verb"),
          /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(import_components146.VisuallyHidden, {
            as: "span",
            /* translators: accessibility text */
            children: (0, import_i18n164.__)("(opens in a new tab)")
          })
        ] })
      }
    );
  }

  // packages/editor/build-module/components/post-publish-button/index.mjs
  var import_components147 = __toESM(require_components(), 1);
  var import_element119 = __toESM(require_element(), 1);
  var import_data134 = __toESM(require_data(), 1);
  var import_compose30 = __toESM(require_compose(), 1);

  // packages/editor/build-module/components/post-publish-button/label.mjs
  var import_i18n165 = __toESM(require_i18n(), 1);
  var import_data133 = __toESM(require_data(), 1);
  var import_compose29 = __toESM(require_compose(), 1);
  function PublishButtonLabel() {
    const isSmallerThanMediumViewport = (0, import_compose29.useViewportMatch)("medium", "<");
    const {
      isPublished,
      isBeingScheduled,
      isSaving,
      isPublishing,
      hasPublishAction,
      isAutosaving,
      hasNonPostEntityChanges: hasNonPostEntityChanges2,
      postStatusHasChanged,
      postStatus,
      postType: postType2
    } = (0, import_data133.useSelect)((select6) => {
      const {
        isCurrentPostPublished: isCurrentPostPublished2,
        isEditedPostBeingScheduled: isEditedPostBeingScheduled2,
        isSavingPost: isSavingPost2,
        isPublishingPost: isPublishingPost2,
        getCurrentPost: getCurrentPost2,
        getCurrentPostType: getCurrentPostType2,
        isAutosavingPost: isAutosavingPost2,
        getPostEdits: getPostEdits2,
        getEditedPostAttribute: getEditedPostAttribute2
      } = select6(store);
      return {
        isPublished: isCurrentPostPublished2(),
        isBeingScheduled: isEditedPostBeingScheduled2(),
        isSaving: isSavingPost2(),
        isPublishing: isPublishingPost2(),
        hasPublishAction: getCurrentPost2()._links?.["wp:action-publish"] ?? false,
        postType: getCurrentPostType2(),
        isAutosaving: isAutosavingPost2(),
        hasNonPostEntityChanges: select6(store).hasNonPostEntityChanges(),
        postStatusHasChanged: !!getPostEdits2()?.status,
        postStatus: getEditedPostAttribute2("status")
      };
    }, []);
    if (isPublishing) {
      return (0, import_i18n165.__)("Publishing\u2026");
    } else if ((isPublished || isBeingScheduled) && isSaving && !isAutosaving) {
      return (0, import_i18n165.__)("Saving\u2026");
    }
    if (!hasPublishAction) {
      if (postType2 === ATTACHMENT_POST_TYPE && window?.__experimentalMediaEditor) {
        return (0, import_i18n165.__)("Save");
      }
      return isSmallerThanMediumViewport ? (0, import_i18n165.__)("Publish") : (0, import_i18n165.__)("Submit for Review");
    }
    if (hasNonPostEntityChanges2 || isPublished || postStatusHasChanged && !["future", "publish"].includes(postStatus) || !postStatusHasChanged && postStatus === "future") {
      return (0, import_i18n165.__)("Save");
    }
    if (isBeingScheduled) {
      return (0, import_i18n165.__)("Schedule");
    }
    return (0, import_i18n165.__)("Publish");
  }

  // packages/editor/build-module/components/post-publish-button/index.mjs
  var import_jsx_runtime274 = __toESM(require_jsx_runtime(), 1);
  var noop6 = () => {
  };
  var PostPublishButton = class extends import_element119.Component {
    constructor(props) {
      super(props);
      this.createOnClick = this.createOnClick.bind(this);
      this.closeEntitiesSavedStates = this.closeEntitiesSavedStates.bind(this);
      this.state = {
        entitiesSavedStatesCallback: false
      };
    }
    createOnClick(callback) {
      return (...args) => {
        const { hasNonPostEntityChanges: hasNonPostEntityChanges2, setEntitiesSavedStatesCallback } = this.props;
        if (hasNonPostEntityChanges2 && setEntitiesSavedStatesCallback) {
          this.setState({
            entitiesSavedStatesCallback: () => callback(...args)
          });
          setEntitiesSavedStatesCallback(
            () => this.closeEntitiesSavedStates
          );
          return noop6;
        }
        return callback(...args);
      };
    }
    closeEntitiesSavedStates(savedEntities) {
      const { postType: postType2, postId: postId2 } = this.props;
      const { entitiesSavedStatesCallback } = this.state;
      this.setState({ entitiesSavedStatesCallback: false }, () => {
        if (savedEntities && savedEntities.some(
          (elt) => elt.kind === "postType" && elt.name === postType2 && elt.key === postId2
        )) {
          entitiesSavedStatesCallback();
        }
      });
    }
    render() {
      const {
        forceIsDirty,
        hasPublishAction,
        isBeingScheduled,
        isOpen,
        isPostSavingLocked: isPostSavingLocked2,
        isPublishable,
        isPublished,
        isSaveable,
        isSaving,
        isAutoSaving,
        isToggle,
        savePostStatus,
        onSubmit = noop6,
        onToggle,
        visibility,
        hasNonPostEntityChanges: hasNonPostEntityChanges2,
        isSavingNonPostEntityChanges: isSavingNonPostEntityChanges2,
        postStatus,
        postStatusHasChanged
      } = this.props;
      const isButtonDisabled = (isSaving || !isSaveable || isPostSavingLocked2 || !isPublishable && !forceIsDirty) && (!hasNonPostEntityChanges2 || isSavingNonPostEntityChanges2);
      const isToggleDisabled = (isPublished || isSaving || !isSaveable || !isPublishable && !forceIsDirty) && (!hasNonPostEntityChanges2 || isSavingNonPostEntityChanges2);
      let publishStatus = "publish";
      if (postStatusHasChanged) {
        publishStatus = postStatus;
      } else if (!hasPublishAction) {
        publishStatus = "pending";
      } else if (visibility === "private") {
        publishStatus = "private";
      } else if (isBeingScheduled) {
        publishStatus = "future";
      }
      const onClickButton = () => {
        if (isButtonDisabled) {
          return;
        }
        onSubmit();
        savePostStatus(publishStatus);
      };
      const onClickToggle = () => {
        if (isToggleDisabled) {
          return;
        }
        onToggle();
      };
      const buttonProps = {
        "aria-disabled": isButtonDisabled,
        className: "editor-post-publish-button",
        isBusy: !isAutoSaving && isSaving,
        variant: "primary",
        onClick: this.createOnClick(onClickButton),
        "aria-haspopup": hasNonPostEntityChanges2 ? "dialog" : void 0
      };
      const toggleProps = {
        "aria-disabled": isToggleDisabled,
        "aria-expanded": isOpen,
        className: "editor-post-publish-panel__toggle",
        isBusy: isSaving && isPublished,
        variant: "primary",
        size: "compact",
        onClick: this.createOnClick(onClickToggle),
        "aria-haspopup": hasNonPostEntityChanges2 ? "dialog" : void 0
      };
      const componentProps = isToggle ? toggleProps : buttonProps;
      return /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(import_jsx_runtime274.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
        import_components147.Button,
        {
          ...componentProps,
          className: `${componentProps.className} editor-post-publish-button__button`,
          size: "compact",
          children: /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(PublishButtonLabel, {})
        }
      ) });
    }
  };
  var post_publish_button_default = (0, import_compose30.compose)([
    (0, import_data134.withSelect)((select6) => {
      const {
        isSavingPost: isSavingPost2,
        isAutosavingPost: isAutosavingPost2,
        isEditedPostBeingScheduled: isEditedPostBeingScheduled2,
        getEditedPostVisibility: getEditedPostVisibility2,
        isCurrentPostPublished: isCurrentPostPublished2,
        isEditedPostSaveable: isEditedPostSaveable2,
        isEditedPostPublishable: isEditedPostPublishable2,
        isPostSavingLocked: isPostSavingLocked2,
        getCurrentPost: getCurrentPost2,
        getCurrentPostType: getCurrentPostType2,
        getCurrentPostId: getCurrentPostId2,
        hasNonPostEntityChanges: hasNonPostEntityChanges2,
        isSavingNonPostEntityChanges: isSavingNonPostEntityChanges2,
        getEditedPostAttribute: getEditedPostAttribute2,
        getPostEdits: getPostEdits2
      } = select6(store);
      return {
        isSaving: isSavingPost2(),
        isAutoSaving: isAutosavingPost2(),
        isBeingScheduled: isEditedPostBeingScheduled2(),
        visibility: getEditedPostVisibility2(),
        isSaveable: isEditedPostSaveable2(),
        isPostSavingLocked: isPostSavingLocked2(),
        isPublishable: isEditedPostPublishable2(),
        isPublished: isCurrentPostPublished2(),
        hasPublishAction: getCurrentPost2()._links?.["wp:action-publish"] ?? false,
        postType: getCurrentPostType2(),
        postId: getCurrentPostId2(),
        postStatus: getEditedPostAttribute2("status"),
        postStatusHasChanged: getPostEdits2()?.status,
        hasNonPostEntityChanges: hasNonPostEntityChanges2(),
        isSavingNonPostEntityChanges: isSavingNonPostEntityChanges2()
      };
    }),
    (0, import_data134.withDispatch)((dispatch7) => {
      const { editPost: editPost2, savePost: savePost2 } = dispatch7(store);
      return {
        savePostStatus: (status) => {
          editPost2({ status }, { undoIgnore: true });
          savePost2();
        }
      };
    })
  ])(PostPublishButton);

  // packages/editor/build-module/components/post-publish-panel/index.mjs
  var import_i18n178 = __toESM(require_i18n(), 1);
  var import_element128 = __toESM(require_element(), 1);
  var import_components158 = __toESM(require_components(), 1);
  var import_data148 = __toESM(require_data(), 1);
  var import_compose35 = __toESM(require_compose(), 1);
  var import_core_data96 = __toESM(require_core_data(), 1);

  // packages/editor/build-module/components/post-publish-panel/prepublish.mjs
  var import_i18n176 = __toESM(require_i18n(), 1);
  var import_components156 = __toESM(require_components(), 1);
  var import_data146 = __toESM(require_data(), 1);
  var import_url16 = __toESM(require_url(), 1);
  var import_core_data94 = __toESM(require_core_data(), 1);
  var import_html_entities22 = __toESM(require_html_entities(), 1);

  // packages/editor/build-module/components/post-visibility/index.mjs
  var import_i18n167 = __toESM(require_i18n(), 1);
  var import_element120 = __toESM(require_element(), 1);
  var import_components148 = __toESM(require_components(), 1);
  var import_compose31 = __toESM(require_compose(), 1);
  var import_data135 = __toESM(require_data(), 1);
  var import_block_editor53 = __toESM(require_block_editor(), 1);

  // packages/editor/build-module/components/post-visibility/utils.mjs
  var import_i18n166 = __toESM(require_i18n(), 1);
  var VISIBILITY_OPTIONS = [
    {
      label: (0, import_i18n166.__)("Public"),
      value: "public",
      description: (0, import_i18n166.__)("Visible to everyone.")
    },
    {
      label: (0, import_i18n166.__)("Private"),
      value: "private",
      description: (0, import_i18n166.__)("Only visible to site admins and editors.")
    },
    {
      label: (0, import_i18n166.__)("Password protected"),
      value: "password",
      description: (0, import_i18n166.__)("Only visible to those who know the password.")
    }
  ];

  // packages/editor/build-module/components/post-visibility/index.mjs
  var import_jsx_runtime275 = __toESM(require_jsx_runtime(), 1);
  function PostVisibility({ onClose }) {
    const instanceId = (0, import_compose31.useInstanceId)(PostVisibility);
    const { status, visibility, password } = (0, import_data135.useSelect)((select6) => ({
      status: select6(store).getEditedPostAttribute("status"),
      visibility: select6(store).getEditedPostVisibility(),
      password: select6(store).getEditedPostAttribute("password")
    }));
    const { editPost: editPost2 } = (0, import_data135.useDispatch)(store);
    const [hasPassword, setHasPassword] = (0, import_element120.useState)(!!password);
    function updateVisibility(value) {
      const nextValues = {
        public: {
          status: visibility === "private" ? "draft" : status,
          password: ""
        },
        private: { status: "private", password: "" },
        password: {
          status: visibility === "private" ? "draft" : status,
          password: password || ""
        }
      };
      editPost2(nextValues[value]);
      setHasPassword(value === "password");
    }
    const updatePassword = (value) => {
      editPost2({ password: value });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime275.jsxs)("div", { className: "editor-post-visibility", children: [
      /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
        import_block_editor53.__experimentalInspectorPopoverHeader,
        {
          title: (0, import_i18n167.__)("Visibility"),
          help: (0, import_i18n167.__)("Control how this post is viewed."),
          onClose
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime275.jsxs)(import_components148.__experimentalVStack, { spacing: 4, children: [
        /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
          import_components148.RadioControl,
          {
            label: (0, import_i18n167.__)("Visibility"),
            hideLabelFromVision: true,
            options: VISIBILITY_OPTIONS,
            selected: hasPassword ? "password" : visibility,
            onChange: updateVisibility
          }
        ),
        hasPassword && /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
          import_components148.TextControl,
          {
            label: (0, import_i18n167.__)("Password"),
            onChange: updatePassword,
            value: password,
            placeholder: (0, import_i18n167.__)("Use a secure password"),
            type: "text",
            id: `editor-post-visibility__password-input-${instanceId}`,
            __next40pxDefaultSize: true,
            maxLength: 255
          }
        )
      ] })
    ] });
  }

  // packages/editor/build-module/components/post-visibility/label.mjs
  var import_data136 = __toESM(require_data(), 1);
  function PostVisibilityLabel() {
    return usePostVisibilityLabel();
  }
  function usePostVisibilityLabel() {
    const visibility = (0, import_data136.useSelect)(
      (select6) => select6(store).getEditedPostVisibility(),
      []
    );
    return VISIBILITY_OPTIONS.find((option) => option.value === visibility)?.label;
  }

  // node_modules/date-fns/toDate.mjs
  function toDate(argument) {
    const argStr = Object.prototype.toString.call(argument);
    if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") {
      return new argument.constructor(+argument);
    } else if (typeof argument === "number" || argStr === "[object Number]" || typeof argument === "string" || argStr === "[object String]") {
      return new Date(argument);
    } else {
      return /* @__PURE__ */ new Date(NaN);
    }
  }

  // node_modules/date-fns/constants.mjs
  var daysInYear = 365.2425;
  var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1e3;
  var minTime = -maxTime;
  var millisecondsInMinute = 6e4;
  var millisecondsInHour = 36e5;
  var secondsInHour = 3600;
  var secondsInDay = secondsInHour * 24;
  var secondsInWeek = secondsInDay * 7;
  var secondsInYear = secondsInDay * daysInYear;
  var secondsInMonth = secondsInYear / 12;
  var secondsInQuarter = secondsInMonth * 3;

  // node_modules/date-fns/endOfMonth.mjs
  function endOfMonth(date) {
    const _date = toDate(date);
    const month = _date.getMonth();
    _date.setFullYear(_date.getFullYear(), month + 1, 0);
    _date.setHours(23, 59, 59, 999);
    return _date;
  }

  // node_modules/date-fns/startOfMonth.mjs
  function startOfMonth(date) {
    const _date = toDate(date);
    _date.setDate(1);
    _date.setHours(0, 0, 0, 0);
    return _date;
  }

  // node_modules/date-fns/parseISO.mjs
  function parseISO(argument, options) {
    const additionalDigits = options?.additionalDigits ?? 2;
    const dateStrings = splitDateString(argument);
    let date;
    if (dateStrings.date) {
      const parseYearResult = parseYear(dateStrings.date, additionalDigits);
      date = parseDate(parseYearResult.restDateString, parseYearResult.year);
    }
    if (!date || isNaN(date.getTime())) {
      return /* @__PURE__ */ new Date(NaN);
    }
    const timestamp = date.getTime();
    let time = 0;
    let offset3;
    if (dateStrings.time) {
      time = parseTime(dateStrings.time);
      if (isNaN(time)) {
        return /* @__PURE__ */ new Date(NaN);
      }
    }
    if (dateStrings.timezone) {
      offset3 = parseTimezone(dateStrings.timezone);
      if (isNaN(offset3)) {
        return /* @__PURE__ */ new Date(NaN);
      }
    } else {
      const dirtyDate = new Date(timestamp + time);
      const result = /* @__PURE__ */ new Date(0);
      result.setFullYear(
        dirtyDate.getUTCFullYear(),
        dirtyDate.getUTCMonth(),
        dirtyDate.getUTCDate()
      );
      result.setHours(
        dirtyDate.getUTCHours(),
        dirtyDate.getUTCMinutes(),
        dirtyDate.getUTCSeconds(),
        dirtyDate.getUTCMilliseconds()
      );
      return result;
    }
    return new Date(timestamp + time + offset3);
  }
  var patterns = {
    dateTimeDelimiter: /[T ]/,
    timeZoneDelimiter: /[Z ]/i,
    timezone: /([Z+-].*)$/
  };
  var dateRegex = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/;
  var timeRegex = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/;
  var timezoneRegex = /^([+-])(\d{2})(?::?(\d{2}))?$/;
  function splitDateString(dateString) {
    const dateStrings = {};
    const array = dateString.split(patterns.dateTimeDelimiter);
    let timeString;
    if (array.length > 2) {
      return dateStrings;
    }
    if (/:/.test(array[0])) {
      timeString = array[0];
    } else {
      dateStrings.date = array[0];
      timeString = array[1];
      if (patterns.timeZoneDelimiter.test(dateStrings.date)) {
        dateStrings.date = dateString.split(patterns.timeZoneDelimiter)[0];
        timeString = dateString.substr(
          dateStrings.date.length,
          dateString.length
        );
      }
    }
    if (timeString) {
      const token = patterns.timezone.exec(timeString);
      if (token) {
        dateStrings.time = timeString.replace(token[1], "");
        dateStrings.timezone = token[1];
      } else {
        dateStrings.time = timeString;
      }
    }
    return dateStrings;
  }
  function parseYear(dateString, additionalDigits) {
    const regex = new RegExp(
      "^(?:(\\d{4}|[+-]\\d{" + (4 + additionalDigits) + "})|(\\d{2}|[+-]\\d{" + (2 + additionalDigits) + "})$)"
    );
    const captures = dateString.match(regex);
    if (!captures) return { year: NaN, restDateString: "" };
    const year = captures[1] ? parseInt(captures[1]) : null;
    const century = captures[2] ? parseInt(captures[2]) : null;
    return {
      year: century === null ? year : century * 100,
      restDateString: dateString.slice((captures[1] || captures[2]).length)
    };
  }
  function parseDate(dateString, year) {
    if (year === null) return /* @__PURE__ */ new Date(NaN);
    const captures = dateString.match(dateRegex);
    if (!captures) return /* @__PURE__ */ new Date(NaN);
    const isWeekDate = !!captures[4];
    const dayOfYear = parseDateUnit(captures[1]);
    const month = parseDateUnit(captures[2]) - 1;
    const day = parseDateUnit(captures[3]);
    const week = parseDateUnit(captures[4]);
    const dayOfWeek = parseDateUnit(captures[5]) - 1;
    if (isWeekDate) {
      if (!validateWeekDate(year, week, dayOfWeek)) {
        return /* @__PURE__ */ new Date(NaN);
      }
      return dayOfISOWeekYear(year, week, dayOfWeek);
    } else {
      const date = /* @__PURE__ */ new Date(0);
      if (!validateDate(year, month, day) || !validateDayOfYearDate(year, dayOfYear)) {
        return /* @__PURE__ */ new Date(NaN);
      }
      date.setUTCFullYear(year, month, Math.max(dayOfYear, day));
      return date;
    }
  }
  function parseDateUnit(value) {
    return value ? parseInt(value) : 1;
  }
  function parseTime(timeString) {
    const captures = timeString.match(timeRegex);
    if (!captures) return NaN;
    const hours = parseTimeUnit(captures[1]);
    const minutes = parseTimeUnit(captures[2]);
    const seconds = parseTimeUnit(captures[3]);
    if (!validateTime(hours, minutes, seconds)) {
      return NaN;
    }
    return hours * millisecondsInHour + minutes * millisecondsInMinute + seconds * 1e3;
  }
  function parseTimeUnit(value) {
    return value && parseFloat(value.replace(",", ".")) || 0;
  }
  function parseTimezone(timezoneString) {
    if (timezoneString === "Z") return 0;
    const captures = timezoneString.match(timezoneRegex);
    if (!captures) return 0;
    const sign = captures[1] === "+" ? -1 : 1;
    const hours = parseInt(captures[2]);
    const minutes = captures[3] && parseInt(captures[3]) || 0;
    if (!validateTimezone(hours, minutes)) {
      return NaN;
    }
    return sign * (hours * millisecondsInHour + minutes * millisecondsInMinute);
  }
  function dayOfISOWeekYear(isoWeekYear, week, day) {
    const date = /* @__PURE__ */ new Date(0);
    date.setUTCFullYear(isoWeekYear, 0, 4);
    const fourthOfJanuaryDay = date.getUTCDay() || 7;
    const diff = (week - 1) * 7 + day + 1 - fourthOfJanuaryDay;
    date.setUTCDate(date.getUTCDate() + diff);
    return date;
  }
  var daysInMonths = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
  function isLeapYearIndex(year) {
    return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;
  }
  function validateDate(year, month, date) {
    return month >= 0 && month <= 11 && date >= 1 && date <= (daysInMonths[month] || (isLeapYearIndex(year) ? 29 : 28));
  }
  function validateDayOfYearDate(year, dayOfYear) {
    return dayOfYear >= 1 && dayOfYear <= (isLeapYearIndex(year) ? 366 : 365);
  }
  function validateWeekDate(_year, week, day) {
    return week >= 1 && week <= 53 && day >= 0 && day <= 6;
  }
  function validateTime(hours, minutes, seconds) {
    if (hours === 24) {
      return minutes === 0 && seconds === 0;
    }
    return seconds >= 0 && seconds < 60 && minutes >= 0 && minutes < 60 && hours >= 0 && hours < 25;
  }
  function validateTimezone(_hours, minutes) {
    return minutes >= 0 && minutes <= 59;
  }

  // packages/editor/build-module/components/post-schedule/index.mjs
  var import_date7 = __toESM(require_date(), 1);
  var import_i18n168 = __toESM(require_i18n(), 1);
  var import_data137 = __toESM(require_data(), 1);
  var import_block_editor54 = __toESM(require_block_editor(), 1);
  var import_element121 = __toESM(require_element(), 1);
  var import_core_data87 = __toESM(require_core_data(), 1);
  var import_jsx_runtime276 = __toESM(require_jsx_runtime(), 1);
  var { PrivatePublishDateTimePicker } = unlock(import_block_editor54.privateApis);
  function PostSchedule(props) {
    return /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
      PrivatePostSchedule,
      {
        ...props,
        showPopoverHeaderActions: true,
        isCompact: false
      }
    );
  }
  function PrivatePostSchedule({
    onClose,
    showPopoverHeaderActions,
    isCompact
  }) {
    const { postDate, postType: postType2 } = (0, import_data137.useSelect)(
      (select6) => ({
        postDate: select6(store).getEditedPostAttribute("date"),
        postType: select6(store).getCurrentPostType()
      }),
      []
    );
    const { editPost: editPost2 } = (0, import_data137.useDispatch)(store);
    const onUpdateDate = (date) => editPost2({ date });
    const [previewedMonth, setPreviewedMonth] = (0, import_element121.useState)(
      startOfMonth(new Date(postDate))
    );
    const eventsByPostType = (0, import_data137.useSelect)(
      (select6) => select6(import_core_data87.store).getEntityRecords("postType", postType2, {
        status: "publish,future",
        after: startOfMonth(previewedMonth).toISOString(),
        before: endOfMonth(previewedMonth).toISOString(),
        exclude: [select6(store).getCurrentPostId()],
        per_page: 100,
        _fields: "id,date"
      }),
      [previewedMonth, postType2]
    );
    const events = (0, import_element121.useMemo)(
      () => (eventsByPostType || []).map(({ date: eventDate }) => ({
        date: new Date(eventDate)
      })),
      [eventsByPostType]
    );
    const settings = (0, import_date7.getSettings)();
    const is12HourTime = /a(?!\\)/i.test(
      settings.formats.time.toLowerCase().replace(/\\\\/g, "").split("").reverse().join("")
      // Reverse the string and test for "a" not followed by a slash.
    );
    return /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
      PrivatePublishDateTimePicker,
      {
        currentDate: postDate,
        onChange: onUpdateDate,
        is12Hour: is12HourTime,
        dateOrder: (
          /* translators: Order of day, month, and year. Available formats are 'dmy', 'mdy', and 'ymd'. */
          (0, import_i18n168._x)("dmy", "date order")
        ),
        events,
        onMonthPreviewed: (date) => setPreviewedMonth(parseISO(date)),
        onClose,
        isCompact,
        showPopoverHeaderActions
      }
    );
  }

  // packages/editor/build-module/components/post-schedule/label.mjs
  var import_i18n169 = __toESM(require_i18n(), 1);
  var import_date8 = __toESM(require_date(), 1);
  var import_data138 = __toESM(require_data(), 1);
  function PostScheduleLabel(props) {
    return usePostScheduleLabel(props);
  }
  function usePostScheduleLabel({ full = false } = {}) {
    const { date, isFloating } = (0, import_data138.useSelect)(
      (select6) => ({
        date: select6(store).getEditedPostAttribute("date"),
        isFloating: select6(store).isEditedPostDateFloating()
      }),
      []
    );
    return full ? getFullPostScheduleLabel(date) : getPostScheduleLabel(date, { isFloating });
  }
  function getFullPostScheduleLabel(dateAttribute) {
    const date = (0, import_date8.getDate)(dateAttribute);
    const timezoneAbbreviation = getTimezoneAbbreviation();
    const formattedDate = (0, import_date8.dateI18n)(
      // translators: Use a non-breaking space between 'g:i' and 'a' if appropriate.
      (0, import_i18n169._x)("F j, Y g:i\xA0a", "post schedule full date format"),
      date
    );
    return (0, import_i18n169.isRTL)() ? `${timezoneAbbreviation} ${formattedDate}` : `${formattedDate} ${timezoneAbbreviation}`;
  }
  function getPostScheduleLabel(dateAttribute, { isFloating = false, now = /* @__PURE__ */ new Date() } = {}) {
    if (!dateAttribute || isFloating) {
      return (0, import_i18n169.__)("Immediately");
    }
    if (!isTimezoneSameAsSiteTimezone(now)) {
      return getFullPostScheduleLabel(dateAttribute);
    }
    const date = (0, import_date8.getDate)(dateAttribute);
    if (isSameDay(date, now)) {
      return (0, import_i18n169.sprintf)(
        // translators: %s: Time of day the post is scheduled for.
        (0, import_i18n169.__)("Today at %s"),
        // translators: If using a space between 'g:i' and 'a', use a non-breaking space.
        (0, import_date8.dateI18n)((0, import_i18n169._x)("g:i\xA0a", "post schedule time format"), date)
      );
    }
    const tomorrow = new Date(now);
    tomorrow.setDate(tomorrow.getDate() + 1);
    if (isSameDay(date, tomorrow)) {
      return (0, import_i18n169.sprintf)(
        // translators: %s: Time of day the post is scheduled for.
        (0, import_i18n169.__)("Tomorrow at %s"),
        // translators: If using a space between 'g:i' and 'a', use a non-breaking space.
        (0, import_date8.dateI18n)((0, import_i18n169._x)("g:i\xA0a", "post schedule time format"), date)
      );
    }
    if (date.getFullYear() === now.getFullYear()) {
      return (0, import_date8.dateI18n)(
        // translators: If using a space between 'g:i' and 'a', use a non-breaking space.
        (0, import_i18n169._x)("F j g:i\xA0a", "post schedule date format without year"),
        date
      );
    }
    return (0, import_date8.dateI18n)(
      // translators: Use a non-breaking space between 'g:i' and 'a' if appropriate.
      (0, import_i18n169._x)("F j, Y g:i\xA0a", "post schedule full date format"),
      date
    );
  }
  function getTimezoneAbbreviation() {
    const { timezone } = (0, import_date8.getSettings)();
    if (timezone.abbr && isNaN(Number(timezone.abbr))) {
      return timezone.abbr;
    }
    const symbol = timezone.offset < 0 ? "" : "+";
    return `UTC${symbol}${timezone.offsetFormatted}`;
  }
  function isTimezoneSameAsSiteTimezone(date) {
    const { timezone } = (0, import_date8.getSettings)();
    const siteOffset = Number(timezone.offset);
    const dateOffset = -1 * (date.getTimezoneOffset() / 60);
    return siteOffset === dateOffset;
  }
  function isSameDay(left, right) {
    return left.getDate() === right.getDate() && left.getMonth() === right.getMonth() && left.getFullYear() === right.getFullYear();
  }

  // packages/editor/build-module/components/post-publish-panel/maybe-tags-panel.mjs
  var import_i18n171 = __toESM(require_i18n(), 1);
  var import_element123 = __toESM(require_element(), 1);
  var import_data141 = __toESM(require_data(), 1);
  var import_components151 = __toESM(require_components(), 1);
  var import_core_data90 = __toESM(require_core_data(), 1);

  // packages/editor/build-module/components/post-taxonomies/flat-term-selector.mjs
  var import_i18n170 = __toESM(require_i18n(), 1);
  var import_element122 = __toESM(require_element(), 1);
  var import_components150 = __toESM(require_components(), 1);
  var import_data140 = __toESM(require_data(), 1);
  var import_core_data89 = __toESM(require_core_data(), 1);
  var import_compose32 = __toESM(require_compose(), 1);
  var import_a11y4 = __toESM(require_a11y(), 1);
  var import_notices23 = __toESM(require_notices(), 1);

  // packages/editor/build-module/components/post-taxonomies/most-used-terms.mjs
  var import_components149 = __toESM(require_components(), 1);
  var import_data139 = __toESM(require_data(), 1);
  var import_core_data88 = __toESM(require_core_data(), 1);
  var import_jsx_runtime277 = __toESM(require_jsx_runtime(), 1);
  var MIN_MOST_USED_TERMS = 3;
  var DEFAULT_QUERY2 = {
    per_page: 10,
    orderby: "count",
    order: "desc",
    hide_empty: true,
    _fields: "id,name,count",
    context: "view"
  };
  function MostUsedTerms({ onSelect, taxonomy }) {
    const { _terms, showTerms } = (0, import_data139.useSelect)(
      (select6) => {
        const mostUsedTerms = select6(import_core_data88.store).getEntityRecords(
          "taxonomy",
          taxonomy.slug,
          DEFAULT_QUERY2
        );
        return {
          _terms: mostUsedTerms,
          showTerms: mostUsedTerms?.length >= MIN_MOST_USED_TERMS
        };
      },
      [taxonomy.slug]
    );
    if (!showTerms) {
      return null;
    }
    const terms = unescapeTerms(_terms);
    return /* @__PURE__ */ (0, import_jsx_runtime277.jsxs)("div", { className: "editor-post-taxonomies__flat-term-most-used", children: [
      /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
        import_components149.BaseControl.VisualLabel,
        {
          as: "h3",
          className: "editor-post-taxonomies__flat-term-most-used-label",
          children: taxonomy.labels.most_used
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
        "ul",
        {
          role: "list",
          className: "editor-post-taxonomies__flat-term-most-used-list",
          children: terms.map((term) => /* @__PURE__ */ (0, import_jsx_runtime277.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
            import_components149.Button,
            {
              __next40pxDefaultSize: true,
              variant: "link",
              onClick: () => onSelect(term),
              children: term.name
            }
          ) }, term.id))
        }
      )
    ] });
  }

  // packages/editor/build-module/components/post-taxonomies/flat-term-selector.mjs
  var import_jsx_runtime278 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_ARRAY7 = [];
  var MAX_TERMS_SUGGESTIONS = 100;
  var DEFAULT_QUERY3 = {
    per_page: MAX_TERMS_SUGGESTIONS,
    _fields: "id,name",
    context: "view"
  };
  var isSameTermName = (termA, termB) => unescapeString(termA).toLowerCase() === unescapeString(termB).toLowerCase();
  var termNamesToIds = (names, terms) => {
    return names.map(
      (termName) => terms.find((term) => isSameTermName(term.name, termName))?.id
    ).filter((id) => id !== void 0);
  };
  function FlatTermSelector({ slug }) {
    const [values, setValues] = (0, import_element122.useState)([]);
    const [search, setSearch] = (0, import_element122.useState)("");
    const debouncedSearch = (0, import_compose32.useDebounce)(setSearch, 500);
    const {
      terms,
      termIds,
      taxonomy,
      hasAssignAction,
      hasCreateAction,
      hasResolvedTerms
    } = (0, import_data140.useSelect)(
      (select6) => {
        const { getCurrentPost: getCurrentPost2, getEditedPostAttribute: getEditedPostAttribute2 } = select6(store);
        const { getEntityRecords, getEntityRecord, hasFinishedResolution } = select6(import_core_data89.store);
        const post2 = getCurrentPost2();
        const _taxonomy = getEntityRecord("root", "taxonomy", slug);
        const _termIds = _taxonomy ? getEditedPostAttribute2(_taxonomy.rest_base) : EMPTY_ARRAY7;
        const query = {
          ...DEFAULT_QUERY3,
          include: _termIds?.join(","),
          per_page: -1
        };
        return {
          hasCreateAction: _taxonomy ? post2._links?.["wp:action-create-" + _taxonomy.rest_base] ?? false : false,
          hasAssignAction: _taxonomy ? post2._links?.["wp:action-assign-" + _taxonomy.rest_base] ?? false : false,
          taxonomy: _taxonomy,
          termIds: _termIds,
          terms: _termIds?.length ? getEntityRecords("taxonomy", slug, query) : EMPTY_ARRAY7,
          hasResolvedTerms: hasFinishedResolution("getEntityRecords", [
            "taxonomy",
            slug,
            query
          ])
        };
      },
      [slug]
    );
    const { searchResults } = (0, import_data140.useSelect)(
      (select6) => {
        const { getEntityRecords } = select6(import_core_data89.store);
        return {
          searchResults: !!search ? getEntityRecords("taxonomy", slug, {
            ...DEFAULT_QUERY3,
            search
          }) : EMPTY_ARRAY7
        };
      },
      [search, slug]
    );
    (0, import_element122.useEffect)(() => {
      if (hasResolvedTerms) {
        const newValues = (terms ?? []).map(
          (term) => unescapeString(term.name)
        );
        setValues(newValues);
      }
    }, [terms, hasResolvedTerms]);
    const suggestions = (0, import_element122.useMemo)(() => {
      return (searchResults ?? []).map(
        (term) => unescapeString(term.name)
      );
    }, [searchResults]);
    const { editPost: editPost2 } = (0, import_data140.useDispatch)(store);
    const { saveEntityRecord } = (0, import_data140.useDispatch)(import_core_data89.store);
    const { createErrorNotice } = (0, import_data140.useDispatch)(import_notices23.store);
    if (!hasAssignAction) {
      return null;
    }
    async function findOrCreateTerm(term) {
      try {
        const newTerm = await saveEntityRecord("taxonomy", slug, term, {
          throwOnError: true
        });
        return unescapeTerm(newTerm);
      } catch (error) {
        if (error.code !== "term_exists") {
          throw error;
        }
        return {
          id: error.data.term_id,
          name: term.name
        };
      }
    }
    function onUpdateTerms(newTermIds) {
      editPost2({ [taxonomy.rest_base]: newTermIds });
    }
    function onChange(termNames) {
      const availableTerms = [
        ...terms ?? [],
        ...searchResults ?? []
      ];
      const uniqueTerms = termNames.reduce((acc, name2) => {
        if (!acc.some((n3) => n3.toLowerCase() === name2.toLowerCase())) {
          acc.push(name2);
        }
        return acc;
      }, []);
      const newTermNames = uniqueTerms.filter(
        (termName) => !availableTerms.find(
          (term) => isSameTermName(term.name, termName)
        )
      );
      setValues(uniqueTerms);
      if (newTermNames.length === 0) {
        onUpdateTerms(termNamesToIds(uniqueTerms, availableTerms));
        return;
      }
      if (!hasCreateAction) {
        return;
      }
      Promise.all(
        newTermNames.map(
          (termName) => findOrCreateTerm({ name: termName })
        )
      ).then((newTerms) => {
        const newAvailableTerms = availableTerms.concat(newTerms);
        onUpdateTerms(
          termNamesToIds(uniqueTerms, newAvailableTerms)
        );
      }).catch((error) => {
        createErrorNotice(error.message, {
          type: "snackbar"
        });
        onUpdateTerms(termNamesToIds(uniqueTerms, availableTerms));
      });
    }
    function appendTerm(newTerm) {
      if (termIds.includes(newTerm.id)) {
        return;
      }
      const newTermIds = [...termIds, newTerm.id];
      const defaultName = slug === "post_tag" ? (0, import_i18n170.__)("Tag") : (0, import_i18n170.__)("Term");
      const termAddedMessage = (0, import_i18n170.sprintf)(
        /* translators: %s: term name. */
        (0, import_i18n170._x)("%s added", "term"),
        taxonomy?.labels?.singular_name ?? defaultName
      );
      (0, import_a11y4.speak)(termAddedMessage, "assertive");
      onUpdateTerms(newTermIds);
    }
    const newTermLabel = taxonomy?.labels?.add_new_item ?? (slug === "post_tag" ? (0, import_i18n170.__)("Add Tag") : (0, import_i18n170.__)("Add Term"));
    const singularName = taxonomy?.labels?.singular_name ?? (slug === "post_tag" ? (0, import_i18n170.__)("Tag") : (0, import_i18n170.__)("Term"));
    const termAddedLabel = (0, import_i18n170.sprintf)(
      /* translators: %s: term name. */
      (0, import_i18n170._x)("%s added", "term"),
      singularName
    );
    const termRemovedLabel = (0, import_i18n170.sprintf)(
      /* translators: %s: term name. */
      (0, import_i18n170._x)("%s removed", "term"),
      singularName
    );
    const removeTermLabel = (0, import_i18n170.sprintf)(
      /* translators: %s: term name. */
      (0, import_i18n170._x)("Remove %s", "term"),
      singularName
    );
    return /* @__PURE__ */ (0, import_jsx_runtime278.jsxs)(import_components150.__experimentalVStack, { spacing: 4, children: [
      /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
        import_components150.FormTokenField,
        {
          __next40pxDefaultSize: true,
          value: values,
          suggestions,
          onChange,
          onInputChange: debouncedSearch,
          maxSuggestions: MAX_TERMS_SUGGESTIONS,
          label: newTermLabel,
          messages: {
            added: termAddedLabel,
            removed: termRemovedLabel,
            remove: removeTermLabel
          }
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(MostUsedTerms, { taxonomy, onSelect: appendTerm })
    ] });
  }
  var flat_term_selector_default = (0, import_components150.withFilters)("editor.PostTaxonomyType")(FlatTermSelector);

  // packages/editor/build-module/components/post-publish-panel/maybe-tags-panel.mjs
  var import_jsx_runtime279 = __toESM(require_jsx_runtime(), 1);
  var TagsPanel = () => {
    const tagLabels = (0, import_data141.useSelect)((select6) => {
      const taxonomy = select6(import_core_data90.store).getTaxonomy("post_tag");
      return taxonomy?.labels;
    }, []);
    const addNewItem = tagLabels?.add_new_item ?? (0, import_i18n171.__)("Add tag");
    const tagLabel = tagLabels?.name ?? (0, import_i18n171.__)("Tags");
    const panelBodyTitle = [
      (0, import_i18n171.__)("Suggestion:"),
      /* @__PURE__ */ (0, import_jsx_runtime279.jsx)("span", { className: "editor-post-publish-panel__link", children: addNewItem }, "label")
    ];
    return /* @__PURE__ */ (0, import_jsx_runtime279.jsxs)(import_components151.PanelBody, { initialOpen: false, title: panelBodyTitle, children: [
      /* @__PURE__ */ (0, import_jsx_runtime279.jsx)("p", { children: (0, import_i18n171.sprintf)(
        // translators: %s is the taxonomy name (e.g., "Tags").
        (0, import_i18n171.__)(
          "%s help users and search engines navigate your site and find your content. Add a few keywords to describe your post."
        ),
        tagLabel
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(flat_term_selector_default, { slug: "post_tag" })
    ] });
  };
  var MaybeTagsPanel = () => {
    const { postHasTags, siteHasTags, isPostTypeSupported } = (0, import_data141.useSelect)(
      (select6) => {
        const postType2 = select6(store).getCurrentPostType();
        const tagsTaxonomy = select6(import_core_data90.store).getEntityRecord(
          "root",
          "taxonomy",
          "post_tag"
        );
        const _isPostTypeSupported = tagsTaxonomy?.types?.includes(postType2);
        const areTagsFetched = tagsTaxonomy !== void 0;
        const tags = tagsTaxonomy && select6(store).getEditedPostAttribute(
          tagsTaxonomy.rest_base
        );
        const siteTags = _isPostTypeSupported ? !!select6(import_core_data90.store).getEntityRecords(
          "taxonomy",
          "post_tag",
          { per_page: 1 }
        )?.length : false;
        return {
          postHasTags: !!tags?.length,
          siteHasTags: siteTags,
          isPostTypeSupported: areTagsFetched && _isPostTypeSupported
        };
      },
      []
    );
    const [hadTagsWhenOpeningThePanel] = (0, import_element123.useState)(postHasTags);
    if (!isPostTypeSupported || !siteHasTags) {
      return null;
    }
    if (!hadTagsWhenOpeningThePanel) {
      return /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(TagsPanel, {});
    }
    return null;
  };
  var maybe_tags_panel_default = MaybeTagsPanel;

  // packages/editor/build-module/components/post-publish-panel/maybe-post-format-panel.mjs
  var import_components152 = __toESM(require_components(), 1);
  var import_data142 = __toESM(require_data(), 1);
  var import_i18n172 = __toESM(require_i18n(), 1);
  var import_core_data91 = __toESM(require_core_data(), 1);
  var import_jsx_runtime280 = __toESM(require_jsx_runtime(), 1);
  var getSuggestion = (supportedFormats, suggestedPostFormat) => {
    const formats = POST_FORMATS.filter(
      (format6) => supportedFormats?.includes(format6.id)
    );
    return formats.find((format6) => format6.id === suggestedPostFormat);
  };
  var PostFormatSuggestion = ({
    suggestedPostFormat,
    suggestionText,
    onUpdatePostFormat
  }) => /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
    import_components152.Button,
    {
      __next40pxDefaultSize: true,
      variant: "link",
      onClick: () => onUpdatePostFormat(suggestedPostFormat),
      children: suggestionText
    }
  );
  function PostFormatPanel() {
    const { currentPostFormat, suggestion } = (0, import_data142.useSelect)((select6) => {
      const { getEditedPostAttribute: getEditedPostAttribute2, getSuggestedPostFormat: getSuggestedPostFormat2 } = select6(store);
      const supportedFormats = select6(import_core_data91.store).getThemeSupports().formats ?? [];
      return {
        currentPostFormat: getEditedPostAttribute2("format"),
        suggestion: getSuggestion(
          supportedFormats,
          getSuggestedPostFormat2()
        )
      };
    }, []);
    const { editPost: editPost2 } = (0, import_data142.useDispatch)(store);
    const onUpdatePostFormat = (format6) => editPost2({ format: format6 });
    const panelBodyTitle = [
      (0, import_i18n172.__)("Suggestion:"),
      /* @__PURE__ */ (0, import_jsx_runtime280.jsx)("span", { className: "editor-post-publish-panel__link", children: (0, import_i18n172.__)("Use a post format") }, "label")
    ];
    if (!suggestion || suggestion.id === currentPostFormat) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime280.jsxs)(import_components152.PanelBody, { initialOpen: false, title: panelBodyTitle, children: [
      /* @__PURE__ */ (0, import_jsx_runtime280.jsx)("p", { children: (0, import_i18n172.__)(
        "Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling."
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime280.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
        PostFormatSuggestion,
        {
          onUpdatePostFormat,
          suggestedPostFormat: suggestion.id,
          suggestionText: (0, import_i18n172.sprintf)(
            /* translators: %1s: post format */
            (0, import_i18n172.__)('Apply the "%1$s" format.'),
            suggestion.caption
          )
        }
      ) })
    ] });
  }

  // packages/editor/build-module/components/post-publish-panel/maybe-category-panel.mjs
  var import_i18n174 = __toESM(require_i18n(), 1);
  var import_data144 = __toESM(require_data(), 1);
  var import_components154 = __toESM(require_components(), 1);
  var import_core_data93 = __toESM(require_core_data(), 1);
  var import_element125 = __toESM(require_element(), 1);

  // packages/editor/build-module/components/post-taxonomies/hierarchical-term-selector.mjs
  var import_i18n173 = __toESM(require_i18n(), 1);
  var import_element124 = __toESM(require_element(), 1);
  var import_notices24 = __toESM(require_notices(), 1);
  var import_components153 = __toESM(require_components(), 1);
  var import_data143 = __toESM(require_data(), 1);
  var import_compose33 = __toESM(require_compose(), 1);
  var import_core_data92 = __toESM(require_core_data(), 1);
  var import_a11y5 = __toESM(require_a11y(), 1);
  var import_html_entities21 = __toESM(require_html_entities(), 1);
  var import_jsx_runtime281 = __toESM(require_jsx_runtime(), 1);
  var { normalizeTextString } = unlock(import_components153.privateApis);
  var { RECEIVE_INTERMEDIATE_RESULTS } = unlock(import_core_data92.privateApis);
  var DEFAULT_QUERY4 = {
    per_page: -1,
    orderby: "name",
    order: "asc",
    _fields: "id,name,parent",
    context: "view",
    [RECEIVE_INTERMEDIATE_RESULTS]: true
  };
  var MIN_TERMS_COUNT_FOR_FILTER = 8;
  var EMPTY_ARRAY8 = [];
  function sortBySelected(termsTree, terms) {
    const treeHasSelection = (termTree) => {
      if (terms.indexOf(termTree.id) !== -1) {
        return true;
      }
      if (void 0 === termTree.children) {
        return false;
      }
      return termTree.children.map(treeHasSelection).filter((child) => child).length > 0;
    };
    const termOrChildIsSelected = (termA, termB) => {
      const termASelected = treeHasSelection(termA);
      const termBSelected = treeHasSelection(termB);
      if (termASelected === termBSelected) {
        return 0;
      }
      if (termASelected && !termBSelected) {
        return -1;
      }
      if (!termASelected && termBSelected) {
        return 1;
      }
      return 0;
    };
    const newTermTree = [...termsTree];
    newTermTree.sort(termOrChildIsSelected);
    return newTermTree;
  }
  function findTerm(terms, parent, name2) {
    return terms.find((term) => {
      return (!term.parent && !parent || parseInt(term.parent) === parseInt(parent)) && term.name.toLowerCase() === name2.toLowerCase();
    });
  }
  function getFilterMatcher(filterValue) {
    const matchTermsForFilter = (originalTerm) => {
      if ("" === filterValue) {
        return originalTerm;
      }
      const term = { ...originalTerm };
      if (term.children.length > 0) {
        term.children = term.children.map(matchTermsForFilter).filter((child) => child);
      }
      if (-1 !== normalizeTextString(term.name).indexOf(
        normalizeTextString(filterValue)
      ) || term.children.length > 0) {
        return term;
      }
      return false;
    };
    return matchTermsForFilter;
  }
  function HierarchicalTermSelector({ slug }) {
    const [adding, setAdding] = (0, import_element124.useState)(false);
    const [formName, setFormName] = (0, import_element124.useState)("");
    const [formParent, setFormParent] = (0, import_element124.useState)("");
    const [showForm, setShowForm] = (0, import_element124.useState)(false);
    const [filterValue, setFilterValue] = (0, import_element124.useState)("");
    const [filteredTermsTree, setFilteredTermsTree] = (0, import_element124.useState)([]);
    const debouncedSpeak = (0, import_compose33.useDebounce)(import_a11y5.speak, 500);
    const {
      hasCreateAction,
      hasAssignAction,
      terms,
      loading,
      availableTerms,
      taxonomy
    } = (0, import_data143.useSelect)(
      (select6) => {
        const { getCurrentPost: getCurrentPost2, getEditedPostAttribute: getEditedPostAttribute2 } = select6(store);
        const { getEntityRecord, getEntityRecords, isResolving } = select6(import_core_data92.store);
        const _taxonomy = getEntityRecord("root", "taxonomy", slug);
        const post2 = getCurrentPost2();
        return {
          hasCreateAction: _taxonomy ? !!post2._links?.["wp:action-create-" + _taxonomy.rest_base] : false,
          hasAssignAction: _taxonomy ? !!post2._links?.["wp:action-assign-" + _taxonomy.rest_base] : false,
          terms: _taxonomy ? getEditedPostAttribute2(_taxonomy.rest_base) : EMPTY_ARRAY8,
          loading: isResolving("getEntityRecords", [
            "taxonomy",
            slug,
            DEFAULT_QUERY4
          ]),
          availableTerms: getEntityRecords("taxonomy", slug, DEFAULT_QUERY4) || EMPTY_ARRAY8,
          taxonomy: _taxonomy
        };
      },
      [slug]
    );
    const { editPost: editPost2 } = (0, import_data143.useDispatch)(store);
    const { saveEntityRecord } = (0, import_data143.useDispatch)(import_core_data92.store);
    const availableTermsTree = (0, import_element124.useMemo)(
      () => sortBySelected(buildTermsTree2(availableTerms), terms),
      // Remove `terms` from the dependency list to avoid reordering every time
      // checking or unchecking a term.
      [availableTerms]
    );
    const { createErrorNotice } = (0, import_data143.useDispatch)(import_notices24.store);
    if (!hasAssignAction) {
      return null;
    }
    const addTerm = (term) => {
      return saveEntityRecord("taxonomy", slug, term, {
        throwOnError: true
      });
    };
    const onUpdateTerms = (termIds) => {
      editPost2({ [taxonomy.rest_base]: termIds });
    };
    const onChange = (termId) => {
      const hasTerm = terms.includes(termId);
      const newTerms = hasTerm ? terms.filter((id) => id !== termId) : [...terms, termId];
      onUpdateTerms(newTerms);
    };
    const onChangeFormName = (value) => {
      setFormName(value);
    };
    const onChangeFormParent = (parentId) => {
      setFormParent(parentId);
    };
    const onToggleForm = () => {
      setShowForm(!showForm);
    };
    const onAddTerm = async (event) => {
      event.preventDefault();
      if (formName === "" || adding) {
        return;
      }
      const existingTerm = findTerm(availableTerms, formParent, formName);
      if (existingTerm) {
        if (!terms.some((term) => term === existingTerm.id)) {
          onUpdateTerms([...terms, existingTerm.id]);
        }
        setFormName("");
        setFormParent("");
        return;
      }
      setAdding(true);
      let newTerm;
      try {
        newTerm = await addTerm({
          name: formName,
          parent: formParent ? formParent : void 0
        });
      } catch (error) {
        createErrorNotice(error.message, {
          type: "snackbar"
        });
        return;
      }
      const defaultName = slug === "category" ? (0, import_i18n173.__)("Category") : (0, import_i18n173.__)("Term");
      const termAddedMessage = (0, import_i18n173.sprintf)(
        /* translators: %s: term name. */
        (0, import_i18n173._x)("%s added", "term"),
        taxonomy?.labels?.singular_name ?? defaultName
      );
      (0, import_a11y5.speak)(termAddedMessage, "assertive");
      setAdding(false);
      setFormName("");
      setFormParent("");
      onUpdateTerms([...terms, newTerm.id]);
    };
    const setFilter = (value) => {
      const newFilteredTermsTree = availableTermsTree.map(getFilterMatcher(value)).filter((term) => term);
      const getResultCount = (termsTree) => {
        let count = 0;
        for (let i3 = 0; i3 < termsTree.length; i3++) {
          count++;
          if (void 0 !== termsTree[i3].children) {
            count += getResultCount(termsTree[i3].children);
          }
        }
        return count;
      };
      setFilterValue(value);
      setFilteredTermsTree(newFilteredTermsTree);
      const resultCount = getResultCount(newFilteredTermsTree);
      const resultsFoundMessage = (0, import_i18n173.sprintf)(
        /* translators: %d: number of results. */
        (0, import_i18n173._n)("%d result found.", "%d results found.", resultCount),
        resultCount
      );
      debouncedSpeak(resultsFoundMessage, "assertive");
    };
    const renderTerms = (renderedTerms) => {
      return renderedTerms.map((term) => {
        return /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)(
          "div",
          {
            className: "editor-post-taxonomies__hierarchical-terms-choice",
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
                import_components153.CheckboxControl,
                {
                  checked: terms.indexOf(term.id) !== -1,
                  onChange: () => {
                    const termId = parseInt(term.id, 10);
                    onChange(termId);
                  },
                  label: (0, import_html_entities21.decodeEntities)(term.name)
                }
              ),
              !!term.children.length && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)("div", { className: "editor-post-taxonomies__hierarchical-terms-subchoices", children: renderTerms(term.children) })
            ]
          },
          term.id
        );
      });
    };
    const labelWithFallback = (labelProperty, fallbackIsCategory, fallbackIsNotCategory) => taxonomy?.labels?.[labelProperty] ?? (slug === "category" ? fallbackIsCategory : fallbackIsNotCategory);
    const newTermButtonLabel = labelWithFallback(
      "add_new_item",
      (0, import_i18n173.__)("Add Category"),
      (0, import_i18n173.__)("Add Term")
    );
    const newTermLabel = labelWithFallback(
      "new_item_name",
      (0, import_i18n173.__)("Add Category"),
      (0, import_i18n173.__)("Add Term")
    );
    const parentSelectLabel = labelWithFallback(
      "parent_item",
      (0, import_i18n173.__)("Parent Category"),
      (0, import_i18n173.__)("Parent Term")
    );
    const noParentOption = `\u2014 ${parentSelectLabel} \u2014`;
    const newTermSubmitLabel = newTermButtonLabel;
    const filterLabel = taxonomy?.labels?.search_items ?? (0, import_i18n173.__)("Search Terms");
    const groupLabel = taxonomy?.name ?? (0, import_i18n173.__)("Terms");
    const showFilter = availableTerms.length >= MIN_TERMS_COUNT_FOR_FILTER;
    return /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)(import_components153.Flex, { direction: "column", gap: "4", children: [
      showFilter && !loading && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
        import_components153.SearchControl,
        {
          __next40pxDefaultSize: true,
          label: filterLabel,
          placeholder: filterLabel,
          value: filterValue,
          onChange: setFilter
        }
      ),
      loading && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
        import_components153.Flex,
        {
          justify: "center",
          style: {
            // Match SearchControl height to prevent layout shift.
            height: "40px"
          },
          children: /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(import_components153.Spinner, {})
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
        "div",
        {
          className: "editor-post-taxonomies__hierarchical-terms-list",
          tabIndex: "0",
          role: "group",
          "aria-label": groupLabel,
          children: renderTerms(
            "" !== filterValue ? filteredTermsTree : availableTermsTree
          )
        }
      ),
      !loading && hasCreateAction && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(import_components153.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
        import_components153.Button,
        {
          __next40pxDefaultSize: true,
          onClick: onToggleForm,
          className: "editor-post-taxonomies__hierarchical-terms-add",
          "aria-expanded": showForm,
          variant: "link",
          children: newTermButtonLabel
        }
      ) }),
      showForm && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)("form", { onSubmit: onAddTerm, children: /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)(import_components153.Flex, { direction: "column", gap: "4", children: [
        /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
          import_components153.TextControl,
          {
            __next40pxDefaultSize: true,
            className: "editor-post-taxonomies__hierarchical-terms-input",
            label: newTermLabel,
            value: formName,
            onChange: onChangeFormName,
            required: true
          }
        ),
        !!availableTerms.length && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
          import_components153.TreeSelect,
          {
            __next40pxDefaultSize: true,
            label: parentSelectLabel,
            noOptionLabel: noParentOption,
            onChange: onChangeFormParent,
            selectedId: formParent,
            tree: availableTermsTree
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(import_components153.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
          import_components153.Button,
          {
            __next40pxDefaultSize: true,
            variant: "secondary",
            type: "submit",
            className: "editor-post-taxonomies__hierarchical-terms-submit",
            children: newTermSubmitLabel
          }
        ) })
      ] }) })
    ] });
  }
  var hierarchical_term_selector_default = (0, import_components153.withFilters)("editor.PostTaxonomyType")(
    HierarchicalTermSelector
  );

  // packages/editor/build-module/components/post-publish-panel/maybe-category-panel.mjs
  var import_jsx_runtime282 = __toESM(require_jsx_runtime(), 1);
  function MaybeCategoryPanel() {
    const { hasNoCategory, hasSiteCategories } = (0, import_data144.useSelect)((select6) => {
      const postType2 = select6(store).getCurrentPostType();
      const { canUser, getEntityRecord } = select6(import_core_data93.store);
      const categoriesTaxonomy = getEntityRecord(
        "root",
        "taxonomy",
        "category"
      );
      const defaultCategoryId = canUser("read", {
        kind: "root",
        name: "site"
      }) ? getEntityRecord("root", "site")?.default_category : void 0;
      const defaultCategory = defaultCategoryId ? getEntityRecord("taxonomy", "category", defaultCategoryId) : void 0;
      const postTypeSupportsCategories = categoriesTaxonomy && categoriesTaxonomy.types.some((type) => type === postType2);
      const categories = categoriesTaxonomy && select6(store).getEditedPostAttribute(
        categoriesTaxonomy.rest_base
      );
      const siteCategories = postTypeSupportsCategories ? !!select6(import_core_data93.store).getEntityRecords("taxonomy", "category", {
        exclude: [defaultCategoryId],
        per_page: 1
      })?.length : false;
      const noCategory = !!categoriesTaxonomy && !!defaultCategory && postTypeSupportsCategories && (categories?.length === 0 || categories?.length === 1 && defaultCategory?.id === categories[0]);
      return {
        hasNoCategory: noCategory,
        hasSiteCategories: siteCategories
      };
    }, []);
    const [shouldShowPanel, setShouldShowPanel] = (0, import_element125.useState)(false);
    (0, import_element125.useEffect)(() => {
      if (hasNoCategory) {
        setShouldShowPanel(true);
      }
    }, [hasNoCategory]);
    if (!shouldShowPanel || !hasSiteCategories) {
      return null;
    }
    const panelBodyTitle = [
      (0, import_i18n174.__)("Suggestion:"),
      /* @__PURE__ */ (0, import_jsx_runtime282.jsx)("span", { className: "editor-post-publish-panel__link", children: (0, import_i18n174.__)("Assign a category") }, "label")
    ];
    return /* @__PURE__ */ (0, import_jsx_runtime282.jsxs)(import_components154.PanelBody, { initialOpen: false, title: panelBodyTitle, children: [
      /* @__PURE__ */ (0, import_jsx_runtime282.jsx)("p", { children: (0, import_i18n174.__)(
        "Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about."
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(hierarchical_term_selector_default, { slug: "category" })
    ] });
  }
  var maybe_category_panel_default = MaybeCategoryPanel;

  // packages/editor/build-module/components/post-publish-panel/maybe-upload-media.mjs
  var import_components155 = __toESM(require_components(), 1);
  var import_data145 = __toESM(require_data(), 1);
  var import_i18n175 = __toESM(require_i18n(), 1);
  var import_block_editor55 = __toESM(require_block_editor(), 1);
  var import_element126 = __toESM(require_element(), 1);
  var import_blob4 = __toESM(require_blob(), 1);

  // packages/editor/build-module/components/post-publish-panel/media-util.mjs
  var import_url15 = __toESM(require_url(), 1);
  function generateUniqueBasenames(urls) {
    const basenames = /* @__PURE__ */ new Set();
    return Object.fromEntries(
      urls.map((url) => {
        const filename = (0, import_url15.getFilename)(url);
        let basename = "";
        if (filename) {
          const parts = filename.split(".");
          if (parts.length > 1) {
            parts.pop();
          }
          basename = parts.join(".");
        }
        if (!basename) {
          basename = v4_default();
        }
        if (basenames.has(basename)) {
          basename = `${basename}-${v4_default()}`;
        }
        basenames.add(basename);
        return [url, basename];
      })
    );
  }
  function fetchMedia(urls) {
    return Object.fromEntries(
      Object.entries(generateUniqueBasenames(urls)).map(
        ([url, basename]) => {
          const filePromise = window.fetch(url.includes("?") ? url : url + "?").then((response) => response.blob()).then((blob) => {
            return new File([blob], `${basename}.png`, {
              type: blob.type
            });
          });
          return [url, filePromise];
        }
      )
    );
  }

  // packages/editor/build-module/components/post-publish-panel/maybe-upload-media.mjs
  var import_jsx_runtime283 = __toESM(require_jsx_runtime(), 1);
  function flattenBlocks(blocks) {
    const result = [];
    blocks.forEach((block) => {
      result.push(block);
      result.push(...flattenBlocks(block.innerBlocks));
    });
    return result;
  }
  function hasExternalMedia(block) {
    if (block.name === "core/image" || block.name === "core/cover") {
      return block.attributes.url && !block.attributes.id;
    }
    if (block.name === "core/media-text") {
      return block.attributes.mediaUrl && !block.attributes.mediaId;
    }
    return void 0;
  }
  function getMediaInfo(block) {
    if (block.name === "core/image" || block.name === "core/cover") {
      const { url, alt, id } = block.attributes;
      return { url, alt, id };
    }
    if (block.name === "core/media-text") {
      const { mediaUrl: url, mediaAlt: alt, mediaId: id } = block.attributes;
      return { url, alt, id };
    }
    return {};
  }
  function Image({ clientId, alt, url }) {
    const { selectBlock: selectBlock2 } = (0, import_data145.useDispatch)(import_block_editor55.store);
    return /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
      import_components155.__unstableMotion.img,
      {
        tabIndex: 0,
        role: "button",
        "aria-label": (0, import_i18n175.__)("Select image block."),
        onClick: () => {
          selectBlock2(clientId);
        },
        onKeyDown: (event) => {
          if (event.key === "Enter" || event.key === " ") {
            selectBlock2(clientId);
            event.preventDefault();
          }
        },
        alt,
        src: url,
        animate: { opacity: 1 },
        exit: { opacity: 0, scale: 0 },
        style: {
          width: "32px",
          height: "32px",
          objectFit: "cover",
          borderRadius: "2px",
          cursor: "pointer"
        },
        whileHover: { scale: 1.08 }
      },
      clientId
    );
  }
  function MaybeUploadMediaPanel() {
    const [isUploading, setIsUploading] = (0, import_element126.useState)(false);
    const [isAnimating2, setIsAnimating] = (0, import_element126.useState)(false);
    const [hadUploadError, setHadUploadError] = (0, import_element126.useState)(false);
    const { editorBlocks, mediaUpload: mediaUpload2 } = (0, import_data145.useSelect)(
      (select6) => ({
        editorBlocks: select6(import_block_editor55.store).getBlocks(),
        mediaUpload: select6(import_block_editor55.store).getSettings().mediaUpload
      }),
      []
    );
    const blocksWithExternalMedia = flattenBlocks(editorBlocks).filter(
      (block) => hasExternalMedia(block)
    );
    const { updateBlockAttributes: updateBlockAttributes2 } = (0, import_data145.useDispatch)(import_block_editor55.store);
    if (!mediaUpload2 || !blocksWithExternalMedia.length) {
      return null;
    }
    const panelBodyTitle = [
      (0, import_i18n175.__)("Suggestion:"),
      /* @__PURE__ */ (0, import_jsx_runtime283.jsx)("span", { className: "editor-post-publish-panel__link", children: (0, import_i18n175.__)("External media") }, "label")
    ];
    function updateBlockWithUploadedMedia(block, media) {
      if (block.name === "core/image" || block.name === "core/cover") {
        updateBlockAttributes2(block.clientId, {
          id: media.id,
          url: media.url
        });
      }
      if (block.name === "core/media-text") {
        updateBlockAttributes2(block.clientId, {
          mediaId: media.id,
          mediaUrl: media.url
        });
      }
    }
    function uploadImages() {
      setIsUploading(true);
      setHadUploadError(false);
      const mediaUrls = new Set(
        blocksWithExternalMedia.map((block) => {
          const { url } = getMediaInfo(block);
          return url;
        })
      );
      const uploadPromises = Object.fromEntries(
        Object.entries(fetchMedia([...mediaUrls])).map(
          ([url, filePromise]) => {
            const uploadPromise = filePromise.then(
              (blob) => new Promise((resolve, reject) => {
                mediaUpload2({
                  filesList: [blob],
                  onFileChange: ([media]) => {
                    if ((0, import_blob4.isBlobURL)(media.url)) {
                      return;
                    }
                    resolve(media);
                  },
                  onError() {
                    reject();
                  }
                });
              })
            );
            return [url, uploadPromise];
          }
        )
      );
      Promise.allSettled(
        blocksWithExternalMedia.map((block) => {
          const { url } = getMediaInfo(block);
          return uploadPromises[url].then(
            (media) => updateBlockWithUploadedMedia(block, media)
          ).then(() => setIsAnimating(true)).catch(() => setHadUploadError(true));
        })
      ).finally(() => {
        setIsUploading(false);
      });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(import_components155.PanelBody, { initialOpen: true, title: panelBodyTitle, children: [
      /* @__PURE__ */ (0, import_jsx_runtime283.jsx)("p", { children: (0, import_i18n175.__)(
        "Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly."
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(
        "div",
        {
          style: {
            display: "inline-flex",
            flexWrap: "wrap",
            gap: "8px"
          },
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
              import_components155.__unstableAnimatePresence,
              {
                onExitComplete: () => setIsAnimating(false),
                children: blocksWithExternalMedia.map((block) => {
                  const { url, alt } = getMediaInfo(block);
                  return /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
                    Image,
                    {
                      clientId: block.clientId,
                      url,
                      alt
                    },
                    block.clientId
                  );
                })
              }
            ),
            isUploading || isAnimating2 ? /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(import_components155.Spinner, {}) : /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
              import_components155.Button,
              {
                size: "compact",
                variant: "primary",
                onClick: uploadImages,
                children: (0, import_i18n175._x)("Upload", "verb")
              }
            )
          ]
        }
      ),
      hadUploadError && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)("p", { children: (0, import_i18n175.__)("Upload failed, try again.") })
    ] });
  }

  // packages/editor/build-module/components/post-publish-panel/prepublish.mjs
  var import_jsx_runtime284 = __toESM(require_jsx_runtime(), 1);
  function PostPublishPanelPrepublish({ children }) {
    const {
      isBeingScheduled,
      isRequestingSiteIcon,
      hasPublishAction,
      siteIconUrl,
      siteTitle,
      siteHome
    } = (0, import_data146.useSelect)((select6) => {
      const { getCurrentPost: getCurrentPost2, isEditedPostBeingScheduled: isEditedPostBeingScheduled2 } = select6(store);
      const { getEntityRecord, isResolving } = select6(import_core_data94.store);
      const siteData = getEntityRecord("root", "__unstableBase", void 0) || {};
      return {
        hasPublishAction: getCurrentPost2()._links?.["wp:action-publish"] ?? false,
        isBeingScheduled: isEditedPostBeingScheduled2(),
        isRequestingSiteIcon: isResolving("getEntityRecord", [
          "root",
          "__unstableBase",
          void 0
        ]),
        siteIconUrl: siteData.site_icon_url,
        siteTitle: siteData.name,
        siteHome: siteData.home && (0, import_url16.filterURLForDisplay)(siteData.home)
      };
    }, []);
    let siteIcon = /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(import_components156.Icon, { className: "components-site-icon", size: "36px", icon: wordpress_default });
    if (siteIconUrl) {
      siteIcon = /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
        "img",
        {
          alt: (0, import_i18n176.__)("Site Icon"),
          className: "components-site-icon",
          src: siteIconUrl
        }
      );
    }
    if (isRequestingSiteIcon) {
      siteIcon = null;
    }
    let prePublishTitle, prePublishBodyText;
    if (!hasPublishAction) {
      prePublishTitle = (0, import_i18n176.__)("Are you ready to submit for review?");
      prePublishBodyText = (0, import_i18n176.__)(
        "Your work will be reviewed and then approved."
      );
    } else if (isBeingScheduled) {
      prePublishTitle = (0, import_i18n176.__)("Are you ready to schedule?");
      prePublishBodyText = (0, import_i18n176.__)(
        "Your work will be published at the specified date and time."
      );
    } else {
      prePublishTitle = (0, import_i18n176.__)("Are you ready to publish?");
      prePublishBodyText = (0, import_i18n176.__)(
        "Double-check your settings before publishing."
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime284.jsxs)("div", { className: "editor-post-publish-panel__prepublish", children: [
      /* @__PURE__ */ (0, import_jsx_runtime284.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime284.jsx)("strong", { children: prePublishTitle }) }),
      /* @__PURE__ */ (0, import_jsx_runtime284.jsx)("p", { children: prePublishBodyText }),
      /* @__PURE__ */ (0, import_jsx_runtime284.jsxs)("div", { className: "components-site-card", children: [
        siteIcon,
        /* @__PURE__ */ (0, import_jsx_runtime284.jsxs)("div", { className: "components-site-info", children: [
          /* @__PURE__ */ (0, import_jsx_runtime284.jsx)("span", { className: "components-site-name", children: (0, import_html_entities22.decodeEntities)(siteTitle) || (0, import_i18n176.__)("(Untitled)") }),
          /* @__PURE__ */ (0, import_jsx_runtime284.jsx)("span", { className: "components-site-home", children: siteHome })
        ] })
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(MaybeUploadMediaPanel, {}),
      hasPublishAction && /* @__PURE__ */ (0, import_jsx_runtime284.jsxs)(import_jsx_runtime284.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
          import_components156.PanelBody,
          {
            initialOpen: false,
            title: [
              (0, import_i18n176.__)("Visibility:"),
              /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
                "span",
                {
                  className: "editor-post-publish-panel__link",
                  children: /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(PostVisibilityLabel, {})
                },
                "label"
              )
            ],
            children: /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(PostVisibility, {})
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
          import_components156.PanelBody,
          {
            initialOpen: false,
            title: [
              (0, import_i18n176.__)("Publish:"),
              /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
                "span",
                {
                  className: "editor-post-publish-panel__link",
                  children: /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(PostScheduleLabel, {})
                },
                "label"
              )
            ],
            children: /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(PostSchedule, {})
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(PostFormatPanel, {}),
      /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(maybe_tags_panel_default, {}),
      /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(maybe_category_panel_default, {}),
      children
    ] });
  }
  var prepublish_default = PostPublishPanelPrepublish;

  // packages/editor/build-module/components/post-publish-panel/postpublish.mjs
  var import_components157 = __toESM(require_components(), 1);
  var import_i18n177 = __toESM(require_i18n(), 1);
  var import_element127 = __toESM(require_element(), 1);
  var import_data147 = __toESM(require_data(), 1);
  var import_url17 = __toESM(require_url(), 1);
  var import_html_entities23 = __toESM(require_html_entities(), 1);
  var import_compose34 = __toESM(require_compose(), 1);
  var import_core_data95 = __toESM(require_core_data(), 1);
  var import_jsx_runtime285 = __toESM(require_jsx_runtime(), 1);
  var POSTNAME = "%postname%";
  var PAGENAME = "%pagename%";
  var getFuturePostUrl = (post2) => {
    const { slug } = post2;
    if (post2.permalink_template.includes(POSTNAME)) {
      return post2.permalink_template.replace(POSTNAME, slug);
    }
    if (post2.permalink_template.includes(PAGENAME)) {
      return post2.permalink_template.replace(PAGENAME, slug);
    }
    return post2.permalink_template;
  };
  function CopyButton2({ text }) {
    const [showCopyConfirmation, setShowCopyConfirmation] = (0, import_element127.useState)(false);
    const timeoutIdRef = (0, import_element127.useRef)();
    const ref = (0, import_compose34.useCopyToClipboard)(text, () => {
      setShowCopyConfirmation(true);
      if (timeoutIdRef.current) {
        clearTimeout(timeoutIdRef.current);
      }
      timeoutIdRef.current = setTimeout(() => {
        setShowCopyConfirmation(false);
      }, 4e3);
    });
    (0, import_element127.useEffect)(() => {
      return () => {
        if (timeoutIdRef.current) {
          clearTimeout(timeoutIdRef.current);
        }
      };
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(import_components157.Button, { __next40pxDefaultSize: true, variant: "secondary", ref, children: showCopyConfirmation ? (0, import_i18n177.__)("Copied!") : (0, import_i18n177.__)("Copy") });
  }
  function PostPublishPanelPostpublish({
    focusOnMount,
    children
  }) {
    const { post: post2, postType: postType2, isScheduled } = (0, import_data147.useSelect)((select6) => {
      const {
        getEditedPostAttribute: getEditedPostAttribute2,
        getCurrentPost: getCurrentPost2,
        isCurrentPostScheduled: isCurrentPostScheduled2
      } = select6(store);
      const { getPostType } = select6(import_core_data95.store);
      return {
        post: getCurrentPost2(),
        postType: getPostType(getEditedPostAttribute2("type")),
        isScheduled: isCurrentPostScheduled2()
      };
    }, []);
    const postLabel = postType2?.labels?.singular_name;
    const viewPostLabel = postType2?.labels?.view_item;
    const addNewPostLabel = postType2?.labels?.add_new_item;
    const link = post2.status === "future" ? getFuturePostUrl(post2) : post2.link;
    const addLink = (0, import_url17.addQueryArgs)("post-new.php", {
      post_type: post2.type
    });
    const postLinkRef = (0, import_element127.useCallback)(
      (node) => {
        if (focusOnMount && node) {
          node.focus();
        }
      },
      [focusOnMount]
    );
    const postPublishNonLinkHeader = isScheduled ? /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(import_jsx_runtime285.Fragment, { children: [
      (0, import_i18n177.__)("is now scheduled. It will go live on"),
      " ",
      /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(PostScheduleLabel, {}),
      "."
    ] }) : (0, import_i18n177.__)("is now live.");
    return /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)("div", { className: "post-publish-panel__postpublish", children: [
      /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(import_components157.PanelBody, { className: "post-publish-panel__postpublish-header", children: [
        /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(import_components157.ExternalLink, { ref: postLinkRef, href: link, children: (0, import_html_entities23.decodeEntities)(post2.title) || (0, import_i18n177.__)("(no title)") }),
        " ",
        postPublishNonLinkHeader
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(import_components157.PanelBody, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime285.jsx)("p", { className: "post-publish-panel__postpublish-subheader", children: /* @__PURE__ */ (0, import_jsx_runtime285.jsx)("strong", { children: (0, import_i18n177.__)("What\u2019s next?") }) }),
        /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)("div", { className: "post-publish-panel__postpublish-post-address-container", children: [
          /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
            import_components157.TextControl,
            {
              __next40pxDefaultSize: true,
              className: "post-publish-panel__postpublish-post-address",
              readOnly: true,
              label: (0, import_i18n177.sprintf)(
                /* translators: %s: post type singular name */
                (0, import_i18n177.__)("%s address"),
                postLabel
              ),
              value: (0, import_url17.safeDecodeURIComponent)(link),
              onFocus: (event) => event.target.select()
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime285.jsx)("div", { className: "post-publish-panel__postpublish-post-address__copy-button-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(CopyButton2, { text: link }) })
        ] }),
        /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)("div", { className: "post-publish-panel__postpublish-buttons", children: [
          !isScheduled && /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(
            import_components157.Button,
            {
              variant: "primary",
              href: link,
              __next40pxDefaultSize: true,
              icon: external_default,
              iconPosition: "right",
              target: "_blank",
              children: [
                viewPostLabel,
                /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(import_components157.VisuallyHidden, {
                  as: "span",
                  /* translators: accessibility text */
                  children: (0, import_i18n177.__)("(opens in a new tab)")
                })
              ]
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
            import_components157.Button,
            {
              variant: isScheduled ? "primary" : "secondary",
              __next40pxDefaultSize: true,
              href: addLink,
              children: addNewPostLabel
            }
          )
        ] })
      ] }),
      children
    ] });
  }

  // packages/editor/build-module/components/post-publish-panel/index.mjs
  var import_jsx_runtime286 = __toESM(require_jsx_runtime(), 1);
  var PostPublishPanel = class extends import_element128.Component {
    constructor() {
      super(...arguments);
      this.onSubmit = this.onSubmit.bind(this);
      this.cancelButtonNode = (0, import_element128.createRef)();
    }
    componentDidMount() {
      this.timeoutID = setTimeout(() => {
        this.cancelButtonNode.current.focus();
      }, 0);
    }
    componentWillUnmount() {
      clearTimeout(this.timeoutID);
    }
    componentDidUpdate(prevProps) {
      if (prevProps.isPublished && !this.props.isSaving && this.props.isDirty || this.props.currentPostId !== prevProps.currentPostId) {
        this.props.onClose();
      }
    }
    onSubmit() {
      const { onClose, hasPublishAction, isPostTypeViewable } = this.props;
      if (!hasPublishAction || !isPostTypeViewable) {
        onClose();
      }
    }
    render() {
      const {
        forceIsDirty,
        isBeingScheduled,
        isPublished,
        isPublishSidebarEnabled: isPublishSidebarEnabled2,
        isScheduled,
        isSaving,
        isSavingNonPostEntityChanges: isSavingNonPostEntityChanges2,
        onClose,
        onTogglePublishSidebar,
        PostPublishExtension,
        PrePublishExtension,
        currentPostId,
        ...additionalProps
      } = this.props;
      const {
        hasPublishAction,
        isDirty,
        isPostTypeViewable,
        ...propsForPanel
      } = additionalProps;
      const isPublishedOrScheduled = isPublished || isScheduled && isBeingScheduled;
      const isPrePublish = !isPublishedOrScheduled && !isSaving;
      const isPostPublish = isPublishedOrScheduled && !isSaving;
      return /* @__PURE__ */ (0, import_jsx_runtime286.jsxs)("div", { className: "editor-post-publish-panel", ...propsForPanel, children: [
        /* @__PURE__ */ (0, import_jsx_runtime286.jsx)("div", { className: "editor-post-publish-panel__header", children: isPostPublish ? /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(
          import_components158.Button,
          {
            size: "compact",
            onClick: onClose,
            icon: close_small_default,
            label: (0, import_i18n178.__)("Close panel")
          }
        ) : /* @__PURE__ */ (0, import_jsx_runtime286.jsxs)(import_jsx_runtime286.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime286.jsx)("div", { className: "editor-post-publish-panel__header-cancel-button", children: /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(
            import_components158.Button,
            {
              ref: this.cancelButtonNode,
              accessibleWhenDisabled: true,
              disabled: isSavingNonPostEntityChanges2,
              onClick: onClose,
              variant: "secondary",
              size: "compact",
              children: (0, import_i18n178.__)("Cancel")
            }
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime286.jsx)("div", { className: "editor-post-publish-panel__header-publish-button", children: /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(
            post_publish_button_default,
            {
              onSubmit: this.onSubmit,
              forceIsDirty
            }
          ) })
        ] }) }),
        /* @__PURE__ */ (0, import_jsx_runtime286.jsxs)("div", { className: "editor-post-publish-panel__content", children: [
          isPrePublish && /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(prepublish_default, { children: PrePublishExtension && /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(PrePublishExtension, {}) }),
          isPostPublish && /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(PostPublishPanelPostpublish, { focusOnMount: true, children: PostPublishExtension && /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(PostPublishExtension, {}) }),
          isSaving && /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(import_components158.Spinner, {})
        ] }),
        /* @__PURE__ */ (0, import_jsx_runtime286.jsx)("div", { className: "editor-post-publish-panel__footer", children: /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(
          import_components158.CheckboxControl,
          {
            label: (0, import_i18n178.__)("Always show pre-publish checks."),
            checked: isPublishSidebarEnabled2,
            onChange: onTogglePublishSidebar
          }
        ) })
      ] });
    }
  };
  var post_publish_panel_default = (0, import_compose35.compose)([
    (0, import_data148.withSelect)((select6) => {
      const { getPostType } = select6(import_core_data96.store);
      const {
        getCurrentPost: getCurrentPost2,
        getCurrentPostId: getCurrentPostId2,
        getEditedPostAttribute: getEditedPostAttribute2,
        isCurrentPostPublished: isCurrentPostPublished2,
        isCurrentPostScheduled: isCurrentPostScheduled2,
        isEditedPostBeingScheduled: isEditedPostBeingScheduled2,
        isEditedPostDirty: isEditedPostDirty2,
        isAutosavingPost: isAutosavingPost2,
        isSavingPost: isSavingPost2,
        isSavingNonPostEntityChanges: isSavingNonPostEntityChanges2
      } = select6(store);
      const { isPublishSidebarEnabled: isPublishSidebarEnabled2 } = select6(store);
      const postType2 = getPostType(getEditedPostAttribute2("type"));
      return {
        hasPublishAction: getCurrentPost2()._links?.["wp:action-publish"] ?? false,
        isPostTypeViewable: postType2?.viewable,
        isBeingScheduled: isEditedPostBeingScheduled2(),
        isDirty: isEditedPostDirty2(),
        isPublished: isCurrentPostPublished2(),
        isPublishSidebarEnabled: isPublishSidebarEnabled2(),
        isSaving: isSavingPost2() && !isAutosavingPost2(),
        isSavingNonPostEntityChanges: isSavingNonPostEntityChanges2(),
        isScheduled: isCurrentPostScheduled2(),
        currentPostId: getCurrentPostId2()
      };
    }),
    (0, import_data148.withDispatch)((dispatch7, { isPublishSidebarEnabled: isPublishSidebarEnabled2 }) => {
      const { disablePublishSidebar: disablePublishSidebar2, enablePublishSidebar: enablePublishSidebar2 } = dispatch7(store);
      return {
        onTogglePublishSidebar: () => {
          if (isPublishSidebarEnabled2) {
            disablePublishSidebar2();
          } else {
            enablePublishSidebar2();
          }
        }
      };
    }),
    import_components158.withFocusReturn,
    import_components158.withConstrainedTabbing
  ])(PostPublishPanel);

  // packages/editor/build-module/components/post-saved-state/index.mjs
  var import_components161 = __toESM(require_components(), 1);
  var import_compose37 = __toESM(require_compose(), 1);
  var import_data152 = __toESM(require_data(), 1);
  var import_element130 = __toESM(require_element(), 1);
  var import_i18n181 = __toESM(require_i18n(), 1);
  var import_keycodes11 = __toESM(require_keycodes(), 1);
  var import_preferences14 = __toESM(require_preferences(), 1);

  // packages/editor/build-module/components/post-status/index.mjs
  var import_components160 = __toESM(require_components(), 1);
  var import_i18n180 = __toESM(require_i18n(), 1);
  var import_data151 = __toESM(require_data(), 1);
  var import_element129 = __toESM(require_element(), 1);
  var import_core_data97 = __toESM(require_core_data(), 1);
  var import_block_editor56 = __toESM(require_block_editor(), 1);
  var import_compose36 = __toESM(require_compose(), 1);

  // packages/editor/build-module/components/post-sticky/index.mjs
  var import_i18n179 = __toESM(require_i18n(), 1);
  var import_components159 = __toESM(require_components(), 1);
  var import_data150 = __toESM(require_data(), 1);

  // packages/editor/build-module/components/post-sticky/check.mjs
  var import_data149 = __toESM(require_data(), 1);
  function PostStickyCheck({ children }) {
    const { hasStickyAction, postType: postType2 } = (0, import_data149.useSelect)((select6) => {
      const post2 = select6(store).getCurrentPost();
      return {
        hasStickyAction: post2._links?.["wp:action-sticky"] ?? false,
        postType: select6(store).getCurrentPostType()
      };
    }, []);
    if (postType2 !== "post" || !hasStickyAction) {
      return null;
    }
    return children;
  }

  // packages/editor/build-module/components/post-sticky/index.mjs
  var import_jsx_runtime287 = __toESM(require_jsx_runtime(), 1);
  function PostSticky() {
    const postSticky = (0, import_data150.useSelect)((select6) => {
      return select6(store).getEditedPostAttribute("sticky") ?? false;
    }, []);
    const { editPost: editPost2 } = (0, import_data150.useDispatch)(store);
    return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(PostStickyCheck, { children: /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
      import_components159.CheckboxControl,
      {
        className: "editor-post-sticky__checkbox-control",
        label: (0, import_i18n179.__)("Sticky"),
        help: (0, import_i18n179.__)("Pin this post to the top of the blog."),
        checked: postSticky,
        onChange: () => editPost2({ sticky: !postSticky })
      }
    ) });
  }

  // packages/editor/build-module/components/post-status/index.mjs
  var import_jsx_runtime288 = __toESM(require_jsx_runtime(), 1);
  var postStatusesInfo = {
    "auto-draft": { label: (0, import_i18n180.__)("Draft"), icon: drafts_default },
    draft: { label: (0, import_i18n180.__)("Draft"), icon: drafts_default },
    pending: { label: (0, import_i18n180.__)("Pending"), icon: pending_default },
    private: { label: (0, import_i18n180.__)("Private"), icon: not_allowed_default },
    future: { label: (0, import_i18n180.__)("Scheduled"), icon: scheduled_default },
    publish: { label: (0, import_i18n180.__)("Published"), icon: published_default }
  };
  var STATUS_OPTIONS = [
    {
      label: (0, import_i18n180.__)("Draft"),
      value: "draft",
      description: (0, import_i18n180.__)("Not ready to publish.")
    },
    {
      label: (0, import_i18n180.__)("Pending"),
      value: "pending",
      description: (0, import_i18n180.__)("Waiting for review before publishing.")
    },
    {
      label: (0, import_i18n180.__)("Private"),
      value: "private",
      description: (0, import_i18n180.__)("Only visible to site admins and editors.")
    },
    {
      label: (0, import_i18n180.__)("Scheduled"),
      value: "future",
      description: (0, import_i18n180.__)("Publish automatically on a chosen date.")
    },
    {
      label: (0, import_i18n180.__)("Published"),
      value: "publish",
      description: (0, import_i18n180.__)("Visible to everyone.")
    }
  ];
  function PostStatus() {
    const { status, date, password, postId: postId2, postType: postType2, canEdit } = (0, import_data151.useSelect)(
      (select6) => {
        const {
          getEditedPostAttribute: getEditedPostAttribute2,
          getCurrentPostId: getCurrentPostId2,
          getCurrentPostType: getCurrentPostType2,
          getCurrentPost: getCurrentPost2
        } = select6(store);
        return {
          status: getEditedPostAttribute2("status"),
          date: getEditedPostAttribute2("date"),
          password: getEditedPostAttribute2("password"),
          postId: getCurrentPostId2(),
          postType: getCurrentPostType2(),
          canEdit: getCurrentPost2()._links?.["wp:action-publish"] ?? false
        };
      },
      []
    );
    const [showPassword, setShowPassword] = (0, import_element129.useState)(!!password);
    const passwordInputId = (0, import_compose36.useInstanceId)(
      PostStatus,
      "editor-change-status__password-input"
    );
    const { editEntityRecord } = (0, import_data151.useDispatch)(import_core_data97.store);
    const [popoverAnchor, setPopoverAnchor] = (0, import_element129.useState)(null);
    const popoverProps = (0, import_element129.useMemo)(
      () => ({
        // Anchor the popover to the middle of the entire row so that it doesn't
        // move around when the label changes.
        anchor: popoverAnchor,
        "aria-label": (0, import_i18n180.__)("Status & visibility"),
        headerTitle: (0, import_i18n180.__)("Status & visibility"),
        placement: "left-start",
        offset: 36,
        shift: true
      }),
      [popoverAnchor]
    );
    if (DESIGN_POST_TYPES.includes(postType2)) {
      return null;
    }
    const updatePost2 = ({
      status: newStatus = status,
      password: newPassword = password,
      date: newDate = date
    }) => {
      editEntityRecord("postType", postType2, postId2, {
        status: newStatus,
        date: newDate,
        password: newPassword
      });
    };
    const handleTogglePassword = (value) => {
      setShowPassword(value);
      if (!value) {
        updatePost2({ password: "" });
      }
    };
    const handleStatus = (value) => {
      let newDate = date;
      let newPassword = password;
      if (status === "future" && new Date(date) > /* @__PURE__ */ new Date()) {
        newDate = null;
      }
      if (value === "private" && password) {
        newPassword = "";
      }
      updatePost2({
        status: value,
        date: newDate,
        password: newPassword
      });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(post_panel_row_default, { label: (0, import_i18n180.__)("Status"), ref: setPopoverAnchor, children: canEdit ? /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
      import_components160.Dropdown,
      {
        className: "editor-post-status",
        contentClassName: "editor-change-status__content",
        popoverProps,
        focusOnMount: true,
        renderToggle: ({ onToggle, isOpen }) => /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
          import_components160.Button,
          {
            className: "editor-post-status__toggle",
            variant: "tertiary",
            size: "compact",
            onClick: onToggle,
            icon: postStatusesInfo[status]?.icon,
            "aria-label": (0, import_i18n180.sprintf)(
              // translators: %s: Current post status.
              (0, import_i18n180.__)("Change status: %s"),
              postStatusesInfo[status]?.label
            ),
            "aria-expanded": isOpen,
            children: postStatusesInfo[status]?.label
          }
        ),
        renderContent: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime288.jsxs)(import_jsx_runtime288.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
            import_block_editor56.__experimentalInspectorPopoverHeader,
            {
              title: (0, import_i18n180.__)("Status & visibility"),
              onClose
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
            "form",
            {
              onSubmit: (event) => {
                event.preventDefault();
                onClose();
              },
              children: /* @__PURE__ */ (0, import_jsx_runtime288.jsxs)(import_components160.__experimentalVStack, { spacing: 4, children: [
                /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
                  import_components160.RadioControl,
                  {
                    className: "editor-change-status__options",
                    hideLabelFromVision: true,
                    label: (0, import_i18n180.__)("Status"),
                    options: STATUS_OPTIONS,
                    onChange: handleStatus,
                    selected: status === "auto-draft" ? "draft" : status
                  }
                ),
                status === "future" && /* @__PURE__ */ (0, import_jsx_runtime288.jsx)("div", { className: "editor-change-status__publish-date-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
                  PrivatePostSchedule,
                  {
                    showPopoverHeaderActions: false,
                    isCompact: true
                  }
                ) }),
                status !== "private" && /* @__PURE__ */ (0, import_jsx_runtime288.jsxs)(
                  import_components160.__experimentalVStack,
                  {
                    as: "fieldset",
                    spacing: 4,
                    className: "editor-change-status__password-fieldset",
                    children: [
                      /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
                        import_components160.CheckboxControl,
                        {
                          label: (0, import_i18n180.__)(
                            "Password protected"
                          ),
                          help: (0, import_i18n180.__)(
                            "Only visible to those who know the password."
                          ),
                          checked: showPassword,
                          onChange: handleTogglePassword
                        }
                      ),
                      showPassword && /* @__PURE__ */ (0, import_jsx_runtime288.jsx)("div", { className: "editor-change-status__password-input", children: /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
                        import_components160.TextControl,
                        {
                          label: (0, import_i18n180.__)(
                            "Password"
                          ),
                          onChange: (value) => updatePost2({
                            password: value
                          }),
                          value: password,
                          placeholder: (0, import_i18n180.__)(
                            "Use a secure password"
                          ),
                          type: "text",
                          id: passwordInputId,
                          __next40pxDefaultSize: true,
                          maxLength: 255
                        }
                      ) })
                    ]
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(PostSticky, {})
              ] })
            }
          )
        ] })
      }
    ) : /* @__PURE__ */ (0, import_jsx_runtime288.jsx)("div", { className: "editor-post-status is-read-only", children: postStatusesInfo[status]?.label }) });
  }

  // packages/editor/build-module/components/post-saved-state/index.mjs
  var import_jsx_runtime289 = __toESM(require_jsx_runtime(), 1);
  function PostSavedState({ forceIsDirty }) {
    const [forceSavedMessage, setForceSavedMessage] = (0, import_element130.useState)(false);
    const isLargeViewport = (0, import_compose37.useViewportMatch)("small");
    const {
      isAutosaving,
      isDirty,
      isNew,
      isPublished,
      isSaveable,
      isSaving,
      isScheduled,
      hasPublishAction,
      showIconLabels,
      postStatus,
      postStatusHasChanged,
      postType: postType2
    } = (0, import_data152.useSelect)(
      (select6) => {
        const {
          isEditedPostNew: isEditedPostNew2,
          isCurrentPostPublished: isCurrentPostPublished2,
          isCurrentPostScheduled: isCurrentPostScheduled2,
          isEditedPostDirty: isEditedPostDirty2,
          isSavingPost: isSavingPost2,
          isEditedPostSaveable: isEditedPostSaveable2,
          getCurrentPost: getCurrentPost2,
          isAutosavingPost: isAutosavingPost2,
          getEditedPostAttribute: getEditedPostAttribute2,
          getPostEdits: getPostEdits2
        } = select6(store);
        const { get } = select6(import_preferences14.store);
        return {
          isAutosaving: isAutosavingPost2(),
          isDirty: forceIsDirty || isEditedPostDirty2(),
          isNew: isEditedPostNew2(),
          isPublished: isCurrentPostPublished2(),
          isSaving: isSavingPost2(),
          isSaveable: isEditedPostSaveable2(),
          isScheduled: isCurrentPostScheduled2(),
          hasPublishAction: getCurrentPost2()?._links?.["wp:action-publish"] ?? false,
          showIconLabels: get("core", "showIconLabels"),
          postStatus: getEditedPostAttribute2("status"),
          postStatusHasChanged: !!getPostEdits2()?.status,
          postType: select6(store).getCurrentPostType()
        };
      },
      [forceIsDirty]
    );
    const isPending = postStatus === "pending";
    const { savePost: savePost2 } = (0, import_data152.useDispatch)(store);
    const wasSaving = (0, import_compose37.usePrevious)(isSaving);
    (0, import_element130.useEffect)(() => {
      let timeoutId;
      if (wasSaving && !isSaving) {
        setForceSavedMessage(true);
        timeoutId = setTimeout(() => {
          setForceSavedMessage(false);
        }, 1e3);
      }
      return () => clearTimeout(timeoutId);
    }, [isSaving]);
    if (postType2 === ATTACHMENT_POST_TYPE) {
      return null;
    }
    if (!hasPublishAction && isPending) {
      return null;
    }
    const isIneligibleStatus = !["pending", "draft", "auto-draft"].includes(postStatus) && STATUS_OPTIONS.map(({ value }) => value).includes(postStatus);
    if (isPublished || isScheduled || isIneligibleStatus || postStatusHasChanged && ["pending", "draft"].includes(postStatus)) {
      return null;
    }
    const label = isPending ? (0, import_i18n181.__)("Save as pending") : (0, import_i18n181.__)("Save draft");
    const shortLabel = (0, import_i18n181.__)("Save");
    const isSaved = forceSavedMessage || !isNew && !isDirty;
    const isSavedState = isSaving || isSaved;
    const isDisabled = isSaving || isSaved || !isSaveable;
    let text;
    if (isSaving) {
      text = isAutosaving ? (0, import_i18n181.__)("Autosaving") : (0, import_i18n181.__)("Saving");
    } else if (isSaved) {
      text = (0, import_i18n181.__)("Saved");
    } else if (isLargeViewport) {
      text = label;
    } else if (showIconLabels) {
      text = shortLabel;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime289.jsxs)(
      import_components161.Button,
      {
        className: isSaveable || isSaving ? clsx_default({
          "editor-post-save-draft": !isSavedState,
          "editor-post-saved-state": isSavedState,
          "is-saving": isSaving,
          "is-autosaving": isAutosaving,
          "is-saved": isSaved,
          [(0, import_components161.__unstableGetAnimateClassName)({
            type: "loading"
          })]: isSaving
        }) : void 0,
        onClick: isDisabled ? void 0 : () => savePost2(),
        shortcut: isDisabled ? void 0 : import_keycodes11.displayShortcut.primary("s"),
        variant: "tertiary",
        size: "compact",
        icon: isLargeViewport ? void 0 : cloud_upload_default,
        label: text || label,
        "aria-disabled": isDisabled,
        children: [
          isSavedState && /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(icon_default, { icon: isSaved ? check_default : cloud_default }),
          text
        ]
      }
    );
  }

  // packages/editor/build-module/components/post-schedule/check.mjs
  var import_data153 = __toESM(require_data(), 1);
  function PostScheduleCheck({ children }) {
    const hasPublishAction = (0, import_data153.useSelect)((select6) => {
      return select6(store).getCurrentPost()._links?.["wp:action-publish"] ?? false;
    }, []);
    if (!hasPublishAction) {
      return null;
    }
    return children;
  }

  // packages/editor/build-module/components/post-schedule/panel.mjs
  var import_components162 = __toESM(require_components(), 1);
  var import_i18n182 = __toESM(require_i18n(), 1);
  var import_element131 = __toESM(require_element(), 1);
  var import_data154 = __toESM(require_data(), 1);
  var import_jsx_runtime290 = __toESM(require_jsx_runtime(), 1);
  function PostSchedulePanel() {
    const [popoverAnchor, setPopoverAnchor] = (0, import_element131.useState)(null);
    const postType2 = (0, import_data154.useSelect)(
      (select6) => select6(store).getCurrentPostType(),
      []
    );
    const popoverProps = (0, import_element131.useMemo)(
      () => ({
        // Anchor the popover to the middle of the entire row so that it doesn't
        // move around when the label changes.
        anchor: popoverAnchor,
        "aria-label": (0, import_i18n182.__)("Change publish date"),
        placement: "left-start",
        offset: 36,
        shift: true
      }),
      [popoverAnchor]
    );
    const label = usePostScheduleLabel();
    const fullLabel = usePostScheduleLabel({ full: true });
    if (DESIGN_POST_TYPES.includes(postType2)) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(PostScheduleCheck, { children: /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(post_panel_row_default, { label: (0, import_i18n182.__)("Publish"), ref: setPopoverAnchor, children: /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
      import_components162.Dropdown,
      {
        popoverProps,
        focusOnMount: true,
        className: "editor-post-schedule__panel-dropdown",
        contentClassName: "editor-post-schedule__dialog",
        renderToggle: ({ onToggle, isOpen }) => /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
          import_components162.Button,
          {
            size: "compact",
            className: "editor-post-schedule__dialog-toggle",
            variant: "tertiary",
            tooltipPosition: "middle left",
            onClick: onToggle,
            "aria-label": (0, import_i18n182.sprintf)(
              // translators: %s: Current post date.
              (0, import_i18n182.__)("Change date: %s"),
              label
            ),
            label: fullLabel,
            showTooltip: label !== fullLabel,
            "aria-expanded": isOpen,
            children: label
          }
        ),
        renderContent: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(PostSchedule, { onClose })
      }
    ) }) });
  }

  // packages/editor/build-module/components/post-switch-to-draft-button/index.mjs
  var import_components163 = __toESM(require_components(), 1);
  var import_i18n183 = __toESM(require_i18n(), 1);
  var import_data155 = __toESM(require_data(), 1);
  var import_element132 = __toESM(require_element(), 1);
  var import_deprecated11 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime291 = __toESM(require_jsx_runtime(), 1);
  function PostSwitchToDraftButton() {
    (0, import_deprecated11.default)("wp.editor.PostSwitchToDraftButton", {
      since: "6.7",
      version: "6.9"
    });
    const [showConfirmDialog, setShowConfirmDialog] = (0, import_element132.useState)(false);
    const { editPost: editPost2, savePost: savePost2 } = (0, import_data155.useDispatch)(store);
    const { isSaving, isPublished, isScheduled } = (0, import_data155.useSelect)((select6) => {
      const { isSavingPost: isSavingPost2, isCurrentPostPublished: isCurrentPostPublished2, isCurrentPostScheduled: isCurrentPostScheduled2 } = select6(store);
      return {
        isSaving: isSavingPost2(),
        isPublished: isCurrentPostPublished2(),
        isScheduled: isCurrentPostScheduled2()
      };
    }, []);
    const isDisabled = isSaving || !isPublished && !isScheduled;
    let alertMessage;
    let confirmButtonText;
    if (isPublished) {
      alertMessage = (0, import_i18n183.__)("Are you sure you want to unpublish this post?");
      confirmButtonText = (0, import_i18n183.__)("Unpublish");
    } else if (isScheduled) {
      alertMessage = (0, import_i18n183.__)("Are you sure you want to unschedule this post?");
      confirmButtonText = (0, import_i18n183.__)("Unschedule");
    }
    const handleConfirm = () => {
      setShowConfirmDialog(false);
      editPost2({ status: "draft" });
      savePost2();
    };
    return /* @__PURE__ */ (0, import_jsx_runtime291.jsxs)(import_jsx_runtime291.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
        import_components163.Button,
        {
          __next40pxDefaultSize: true,
          className: "editor-post-switch-to-draft",
          onClick: () => {
            if (!isDisabled) {
              setShowConfirmDialog(true);
            }
          },
          "aria-disabled": isDisabled,
          variant: "secondary",
          style: { flexGrow: "1", justifyContent: "center" },
          children: (0, import_i18n183.__)("Switch to draft")
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
        import_components163.__experimentalConfirmDialog,
        {
          isOpen: showConfirmDialog,
          onConfirm: handleConfirm,
          onCancel: () => setShowConfirmDialog(false),
          confirmButtonText,
          children: alertMessage
        }
      )
    ] });
  }

  // packages/editor/build-module/components/post-sync-status/index.mjs
  var import_data156 = __toESM(require_data(), 1);
  var import_i18n184 = __toESM(require_i18n(), 1);
  var import_jsx_runtime292 = __toESM(require_jsx_runtime(), 1);
  function PostSyncStatus() {
    const { syncStatus, postType: postType2 } = (0, import_data156.useSelect)((select6) => {
      const { getEditedPostAttribute: getEditedPostAttribute2 } = select6(store);
      const meta2 = getEditedPostAttribute2("meta");
      const currentSyncStatus = meta2?.wp_pattern_sync_status === "unsynced" ? "unsynced" : getEditedPostAttribute2("wp_pattern_sync_status");
      return {
        syncStatus: currentSyncStatus,
        postType: getEditedPostAttribute2("type")
      };
    });
    if (postType2 !== "wp_block") {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime292.jsx)(post_panel_row_default, { label: (0, import_i18n184.__)("Sync status"), children: /* @__PURE__ */ (0, import_jsx_runtime292.jsx)("div", { className: "editor-post-sync-status__value", children: syncStatus === "unsynced" ? (0, import_i18n184._x)("Not synced", "pattern (singular)") : (0, import_i18n184._x)("Synced", "pattern (singular)") }) });
  }

  // packages/editor/build-module/components/post-taxonomies/index.mjs
  var import_element133 = __toESM(require_element(), 1);
  var import_data157 = __toESM(require_data(), 1);
  var import_core_data98 = __toESM(require_core_data(), 1);
  var import_jsx_runtime293 = __toESM(require_jsx_runtime(), 1);
  var identity2 = (x2) => x2;
  function PostTaxonomies({ taxonomyWrapper = identity2 }) {
    const { postType: postType2, taxonomies } = (0, import_data157.useSelect)((select6) => {
      return {
        postType: select6(store).getCurrentPostType(),
        taxonomies: select6(import_core_data98.store).getEntityRecords(
          "root",
          "taxonomy",
          { per_page: -1 }
        )
      };
    }, []);
    const visibleTaxonomies = (taxonomies ?? []).filter(
      (taxonomy) => (
        // In some circumstances .visibility can end up as undefined so optional chaining operator required.
        // https://github.com/WordPress/gutenberg/issues/40326
        taxonomy.types.includes(postType2) && taxonomy.visibility?.show_ui
      )
    );
    return visibleTaxonomies.map((taxonomy) => {
      const TaxonomyComponent = taxonomy.hierarchical ? hierarchical_term_selector_default : flat_term_selector_default;
      return /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(import_element133.Fragment, { children: taxonomyWrapper(
        /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(TaxonomyComponent, { slug: taxonomy.slug }),
        taxonomy
      ) }, `taxonomy-${taxonomy.slug}`);
    });
  }
  var post_taxonomies_default = PostTaxonomies;

  // packages/editor/build-module/components/post-taxonomies/check.mjs
  var import_data158 = __toESM(require_data(), 1);
  var import_core_data99 = __toESM(require_core_data(), 1);
  function PostTaxonomiesCheck({ children }) {
    const hasTaxonomies = (0, import_data158.useSelect)((select6) => {
      const postType2 = select6(store).getCurrentPostType();
      const taxonomies = select6(import_core_data99.store).getEntityRecords(
        "root",
        "taxonomy",
        { per_page: -1 }
      );
      return taxonomies?.some(
        (taxonomy) => taxonomy.types.includes(postType2)
      );
    }, []);
    if (!hasTaxonomies) {
      return null;
    }
    return children;
  }

  // packages/editor/build-module/components/post-taxonomies/panel.mjs
  var import_components164 = __toESM(require_components(), 1);
  var import_data159 = __toESM(require_data(), 1);
  var import_jsx_runtime294 = __toESM(require_jsx_runtime(), 1);
  function TaxonomyPanel({ taxonomy, children }) {
    const slug = taxonomy?.slug;
    const panelName = slug ? `taxonomy-panel-${slug}` : "";
    const { isEnabled, isOpened } = (0, import_data159.useSelect)(
      (select6) => {
        const { isEditorPanelEnabled: isEditorPanelEnabled2, isEditorPanelOpened: isEditorPanelOpened2 } = select6(store);
        return {
          isEnabled: slug ? isEditorPanelEnabled2(panelName) : false,
          isOpened: slug ? isEditorPanelOpened2(panelName) : false
        };
      },
      [panelName, slug]
    );
    const { toggleEditorPanelOpened: toggleEditorPanelOpened2 } = (0, import_data159.useDispatch)(store);
    if (!isEnabled) {
      return null;
    }
    const taxonomyMenuName = taxonomy?.labels?.menu_name;
    if (!taxonomyMenuName) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
      import_components164.PanelBody,
      {
        title: taxonomyMenuName,
        opened: isOpened,
        onToggle: () => toggleEditorPanelOpened2(panelName),
        children
      }
    );
  }
  function PostTaxonomies2() {
    return /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(PostTaxonomiesCheck, { children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
      post_taxonomies_default,
      {
        taxonomyWrapper: (content, taxonomy) => {
          return /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(TaxonomyPanel, { taxonomy, children: content });
        }
      }
    ) });
  }

  // packages/editor/build-module/components/post-text-editor/index.mjs
  var import_react_autosize_textarea = __toESM(require_lib(), 1);
  var import_i18n185 = __toESM(require_i18n(), 1);
  var import_core_data100 = __toESM(require_core_data(), 1);
  var import_element134 = __toESM(require_element(), 1);
  var import_blocks27 = __toESM(require_blocks(), 1);
  var import_data160 = __toESM(require_data(), 1);
  var import_compose38 = __toESM(require_compose(), 1);
  var import_components165 = __toESM(require_components(), 1);
  var import_jsx_runtime295 = __toESM(require_jsx_runtime(), 1);
  function PostTextEditor() {
    const instanceId = (0, import_compose38.useInstanceId)(PostTextEditor);
    const { content, blocks, type, id } = (0, import_data160.useSelect)((select6) => {
      const { getEditedEntityRecord } = select6(import_core_data100.store);
      const { getCurrentPostType: getCurrentPostType2, getCurrentPostId: getCurrentPostId2 } = select6(store);
      const _type = getCurrentPostType2();
      const _id = getCurrentPostId2();
      const editedRecord = getEditedEntityRecord("postType", _type, _id);
      return {
        content: editedRecord?.content,
        blocks: editedRecord?.blocks,
        type: _type,
        id: _id
      };
    }, []);
    const { editEntityRecord } = (0, import_data160.useDispatch)(import_core_data100.store);
    const value = (0, import_element134.useMemo)(() => {
      if (content instanceof Function) {
        return content({ blocks });
      } else if (blocks) {
        return (0, import_blocks27.__unstableSerializeAndClean)(blocks);
      }
      return content;
    }, [content, blocks]);
    return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)(import_jsx_runtime295.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
        import_components165.VisuallyHidden,
        {
          as: "label",
          htmlFor: `post-content-${instanceId}`,
          children: (0, import_i18n185.__)("Type text or HTML")
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
        import_react_autosize_textarea.default,
        {
          autoComplete: "off",
          dir: "auto",
          value,
          onChange: (event) => {
            editEntityRecord("postType", type, id, {
              content: event.target.value,
              blocks: void 0,
              selection: void 0
            });
          },
          className: "editor-post-text-editor",
          id: `post-content-${instanceId}`,
          placeholder: (0, import_i18n185.__)("Start writing with text or HTML")
        }
      )
    ] });
  }

  // packages/editor/build-module/components/post-title/index.mjs
  var import_i18n186 = __toESM(require_i18n(), 1);
  var import_element136 = __toESM(require_element(), 1);
  var import_html_entities24 = __toESM(require_html_entities(), 1);
  var import_data163 = __toESM(require_data(), 1);
  var import_block_editor57 = __toESM(require_block_editor(), 1);
  var import_keycodes12 = __toESM(require_keycodes(), 1);
  var import_blocks28 = __toESM(require_blocks(), 1);
  var import_rich_text3 = __toESM(require_rich_text(), 1);
  var import_compose39 = __toESM(require_compose(), 1);
  var import_dom3 = __toESM(require_dom(), 1);

  // packages/editor/build-module/components/post-title/constants.mjs
  var DEFAULT_CLASSNAMES = "wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text";
  var REGEXP_NEWLINES = /[\r\n]+/g;

  // packages/editor/build-module/components/post-title/use-post-title-focus.mjs
  var import_element135 = __toESM(require_element(), 1);
  var import_data161 = __toESM(require_data(), 1);
  function usePostTitleFocus(forwardedRef) {
    const ref = (0, import_element135.useRef)();
    const { isCleanNewPost: isCleanNewPost2 } = (0, import_data161.useSelect)((select6) => {
      const { isCleanNewPost: _isCleanNewPost } = select6(store);
      return {
        isCleanNewPost: _isCleanNewPost()
      };
    }, []);
    (0, import_element135.useImperativeHandle)(forwardedRef, () => ({
      focus: () => {
        ref?.current?.focus();
      }
    }));
    (0, import_element135.useEffect)(() => {
      if (!ref.current) {
        return;
      }
      const { defaultView } = ref.current.ownerDocument;
      const { name: name2, parent } = defaultView;
      const ownerDocument = name2 === "editor-canvas" ? parent.document : defaultView.document;
      const { activeElement, body } = ownerDocument;
      if (isCleanNewPost2 && (!activeElement || body === activeElement)) {
        ref.current.focus();
      }
    }, [isCleanNewPost2]);
    return { ref };
  }

  // packages/editor/build-module/components/post-title/use-post-title.mjs
  var import_data162 = __toESM(require_data(), 1);
  function usePostTitle() {
    const { editPost: editPost2 } = (0, import_data162.useDispatch)(store);
    const { title } = (0, import_data162.useSelect)((select6) => {
      const { getEditedPostAttribute: getEditedPostAttribute2 } = select6(store);
      return {
        title: getEditedPostAttribute2("title")
      };
    }, []);
    function updateTitle(newTitle) {
      editPost2({ title: newTitle });
    }
    return { title, setTitle: updateTitle };
  }

  // packages/editor/build-module/components/post-title/index.mjs
  var import_jsx_runtime296 = __toESM(require_jsx_runtime(), 1);
  var { useRichText } = unlock(import_rich_text3.privateApis);
  var PostTitle = (0, import_element136.forwardRef)((_, forwardedRef) => {
    const { placeholder, isEditingContentOnlySection, isPreview } = (0, import_data163.useSelect)(
      (select6) => {
        const { getSettings: getSettings10, getEditedContentOnlySection } = unlock(
          select6(import_block_editor57.store)
        );
        const { titlePlaceholder, isPreviewMode } = getSettings10();
        return {
          placeholder: titlePlaceholder,
          isEditingContentOnlySection: !!getEditedContentOnlySection(),
          isPreview: isPreviewMode
        };
      },
      []
    );
    const [isSelected, setIsSelected] = (0, import_element136.useState)(false);
    const { ref: focusRef } = usePostTitleFocus(forwardedRef);
    const { title, setTitle: onUpdate } = usePostTitle();
    const [selection, setSelection] = (0, import_element136.useState)({});
    const { clearSelectedBlock: clearSelectedBlock2, insertBlocks: insertBlocks2, insertDefaultBlock: insertDefaultBlock2 } = (0, import_data163.useDispatch)(import_block_editor57.store);
    const decodedPlaceholder = (0, import_html_entities24.decodeEntities)(placeholder) || (0, import_i18n186.__)("Add title");
    const {
      value,
      onChange,
      ref: richTextRef
    } = useRichText({
      value: title,
      onChange(newValue) {
        onUpdate(newValue.replace(REGEXP_NEWLINES, " "));
      },
      placeholder: decodedPlaceholder,
      selectionStart: selection.start,
      selectionEnd: selection.end,
      onSelectionChange(newStart, newEnd) {
        setSelection((sel) => {
          const { start: start2, end } = sel;
          if (start2 === newStart && end === newEnd) {
            return sel;
          }
          return {
            start: newStart,
            end: newEnd
          };
        });
      },
      __unstableDisableFormats: false
    });
    function onInsertBlockAfter(blocks) {
      insertBlocks2(blocks, 0);
    }
    function onSelect() {
      setIsSelected(true);
      clearSelectedBlock2();
    }
    function onUnselect() {
      setIsSelected(false);
      setSelection({});
    }
    function onEnterPress() {
      insertDefaultBlock2(void 0, void 0, 0);
    }
    function onKeyDown(event) {
      if (event.keyCode === import_keycodes12.ENTER) {
        event.preventDefault();
        onEnterPress();
      }
    }
    function onPaste(event) {
      const clipboardData = event.clipboardData;
      let plainText = "";
      let html = "";
      try {
        plainText = clipboardData.getData("text/plain");
        html = clipboardData.getData("text/html");
      } catch (error) {
        return;
      }
      const content = (0, import_blocks28.pasteHandler)({
        HTML: html,
        plainText
      });
      event.preventDefault();
      if (!content.length) {
        return;
      }
      if (typeof content !== "string") {
        const [firstBlock] = content;
        if (!title && (firstBlock.name === "core/heading" || firstBlock.name === "core/paragraph")) {
          const contentNoHTML = (0, import_dom3.__unstableStripHTML)(
            firstBlock.attributes.content
          );
          onUpdate(contentNoHTML);
          onInsertBlockAfter(content.slice(1));
        } else {
          onInsertBlockAfter(content);
        }
      } else {
        const contentNoHTML = (0, import_dom3.__unstableStripHTML)(content);
        onChange((0, import_rich_text3.insert)(value, (0, import_rich_text3.create)({ html: contentNoHTML })));
      }
    }
    const className = clsx_default(DEFAULT_CLASSNAMES, {
      "is-selected": isSelected
    });
    const style = isEditingContentOnlySection ? { opacity: 0.2 } : void 0;
    return (
      /* eslint-disable jsx-a11y/heading-has-content, jsx-a11y/no-noninteractive-element-to-interactive-role */
      /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
        "h1",
        {
          ref: (0, import_compose39.useMergeRefs)([richTextRef, focusRef]),
          contentEditable: !isEditingContentOnlySection && !isPreview,
          className,
          "aria-label": decodedPlaceholder,
          role: "textbox",
          "aria-multiline": "true",
          onFocus: onSelect,
          onBlur: onUnselect,
          onKeyDown,
          onPaste,
          style
        }
      )
    );
  });
  var post_title_default = (0, import_element136.forwardRef)((_, forwardedRef) => /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(post_type_support_check_default, { supportKeys: "title", children: /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(PostTitle, { ref: forwardedRef }) }));

  // packages/editor/build-module/components/post-title/post-title-raw.mjs
  var import_components166 = __toESM(require_components(), 1);
  var import_i18n187 = __toESM(require_i18n(), 1);
  var import_html_entities25 = __toESM(require_html_entities(), 1);
  var import_data164 = __toESM(require_data(), 1);
  var import_block_editor58 = __toESM(require_block_editor(), 1);
  var import_element137 = __toESM(require_element(), 1);
  var import_jsx_runtime297 = __toESM(require_jsx_runtime(), 1);
  function PostTitleRaw(_, forwardedRef) {
    const { placeholder } = (0, import_data164.useSelect)((select6) => {
      const { getSettings: getSettings10 } = select6(import_block_editor58.store);
      const { titlePlaceholder } = getSettings10();
      return {
        placeholder: titlePlaceholder
      };
    }, []);
    const [isSelected, setIsSelected] = (0, import_element137.useState)(false);
    const { title, setTitle: onUpdate } = usePostTitle();
    const { ref: focusRef } = usePostTitleFocus(forwardedRef);
    function onChange(value) {
      onUpdate(value.replace(REGEXP_NEWLINES, " "));
    }
    function onSelect() {
      setIsSelected(true);
    }
    function onUnselect() {
      setIsSelected(false);
    }
    const className = clsx_default(DEFAULT_CLASSNAMES, {
      "is-selected": isSelected,
      "is-raw-text": true
    });
    const decodedPlaceholder = (0, import_html_entities25.decodeEntities)(placeholder) || (0, import_i18n187.__)("Add title");
    return /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
      import_components166.TextareaControl,
      {
        ref: focusRef,
        value: title,
        onChange,
        onFocus: onSelect,
        onBlur: onUnselect,
        label: placeholder,
        className,
        placeholder: decodedPlaceholder,
        hideLabelFromVision: true,
        autoComplete: "off",
        dir: "auto",
        rows: 1
      }
    );
  }
  var post_title_raw_default = (0, import_element137.forwardRef)(PostTitleRaw);

  // packages/editor/build-module/components/post-trash/index.mjs
  var import_i18n188 = __toESM(require_i18n(), 1);
  var import_components167 = __toESM(require_components(), 1);
  var import_data166 = __toESM(require_data(), 1);
  var import_element138 = __toESM(require_element(), 1);

  // packages/editor/build-module/components/post-trash/check.mjs
  var import_data165 = __toESM(require_data(), 1);
  var import_core_data101 = __toESM(require_core_data(), 1);
  function PostTrashCheck({ children }) {
    const { canTrashPost } = (0, import_data165.useSelect)((select6) => {
      const { isEditedPostNew: isEditedPostNew2, getCurrentPostId: getCurrentPostId2, getCurrentPostType: getCurrentPostType2 } = select6(store);
      const { canUser } = select6(import_core_data101.store);
      const postType2 = getCurrentPostType2();
      const postId2 = getCurrentPostId2();
      const isNew = isEditedPostNew2();
      const canUserDelete = !!postId2 ? canUser("delete", {
        kind: "postType",
        name: postType2,
        id: postId2
      }) : false;
      return {
        canTrashPost: (!isNew || postId2) && canUserDelete && !GLOBAL_POST_TYPES.includes(postType2)
      };
    }, []);
    if (!canTrashPost) {
      return null;
    }
    return children;
  }

  // packages/editor/build-module/components/post-trash/index.mjs
  var import_jsx_runtime298 = __toESM(require_jsx_runtime(), 1);
  function PostTrash({ onActionPerformed }) {
    const registry = (0, import_data166.useRegistry)();
    const { isNew, isDeleting, postId: postId2, title } = (0, import_data166.useSelect)((select6) => {
      const store3 = select6(store);
      return {
        isNew: store3.isEditedPostNew(),
        isDeleting: store3.isDeletingPost(),
        postId: store3.getCurrentPostId(),
        title: store3.getCurrentPostAttribute("title")
      };
    }, []);
    const { trashPost: trashPost3 } = (0, import_data166.useDispatch)(store);
    const [showConfirmDialog, setShowConfirmDialog] = (0, import_element138.useState)(false);
    if (isNew || !postId2) {
      return null;
    }
    const handleConfirm = async () => {
      setShowConfirmDialog(false);
      await trashPost3();
      const item = await registry.resolveSelect(store).getCurrentPost();
      onActionPerformed?.("move-to-trash", [item]);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime298.jsxs)(PostTrashCheck, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
        import_components167.Button,
        {
          __next40pxDefaultSize: true,
          className: "editor-post-trash",
          isDestructive: true,
          variant: "secondary",
          isBusy: isDeleting,
          "aria-disabled": isDeleting,
          onClick: isDeleting ? void 0 : () => setShowConfirmDialog(true),
          children: (0, import_i18n188.__)("Move to trash")
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
        import_components167.__experimentalConfirmDialog,
        {
          isOpen: showConfirmDialog,
          onConfirm: handleConfirm,
          onCancel: () => setShowConfirmDialog(false),
          confirmButtonText: (0, import_i18n188.__)("Move to trash"),
          size: "small",
          children: (0, import_i18n188.sprintf)(
            // translators: %s: The item's title.
            (0, import_i18n188.__)('Are you sure you want to move "%s" to the trash?'),
            title
          )
        }
      )
    ] });
  }

  // packages/editor/build-module/components/post-url/index.mjs
  var import_data167 = __toESM(require_data(), 1);
  var import_url18 = __toESM(require_url(), 1);
  var import_element139 = __toESM(require_element(), 1);
  var import_block_editor59 = __toESM(require_block_editor(), 1);
  var import_i18n189 = __toESM(require_i18n(), 1);
  var import_components168 = __toESM(require_components(), 1);
  var import_notices25 = __toESM(require_notices(), 1);
  var import_core_data102 = __toESM(require_core_data(), 1);
  var import_compose40 = __toESM(require_compose(), 1);
  var import_jsx_runtime299 = __toESM(require_jsx_runtime(), 1);
  function PostURL({ onClose }) {
    const {
      isEditable,
      postSlug,
      postLink,
      permalinkPrefix,
      permalinkSuffix,
      permalink
    } = (0, import_data167.useSelect)((select6) => {
      const post2 = select6(store).getCurrentPost();
      const postTypeSlug = select6(store).getCurrentPostType();
      const postType2 = select6(import_core_data102.store).getPostType(postTypeSlug);
      const permalinkParts = select6(store).getPermalinkParts();
      const hasPublishAction = post2?._links?.["wp:action-publish"] ?? false;
      return {
        isEditable: select6(store).isPermalinkEditable() && hasPublishAction,
        postSlug: (0, import_url18.safeDecodeURIComponent)(
          select6(store).getEditedPostSlug()
        ),
        viewPostLabel: postType2?.labels.view_item,
        postLink: post2.link,
        permalinkPrefix: permalinkParts?.prefix,
        permalinkSuffix: permalinkParts?.suffix,
        permalink: (0, import_url18.safeDecodeURIComponent)(
          select6(store).getPermalink()
        )
      };
    }, []);
    const { editPost: editPost2 } = (0, import_data167.useDispatch)(store);
    const { createNotice } = (0, import_data167.useDispatch)(import_notices25.store);
    const [forceEmptyField, setForceEmptyField] = (0, import_element139.useState)(false);
    const copyButtonRef = (0, import_compose40.useCopyToClipboard)(permalink, () => {
      createNotice("info", (0, import_i18n189.__)("Copied Permalink to clipboard."), {
        isDismissible: true,
        type: "snackbar"
      });
    });
    const postUrlSlugDescriptionId = "editor-post-url__slug-description-" + (0, import_compose40.useInstanceId)(PostURL);
    return /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "editor-post-url", children: [
      /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
        import_block_editor59.__experimentalInspectorPopoverHeader,
        {
          title: (0, import_i18n189.__)("Slug"),
          onClose
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)(import_components168.__experimentalVStack, { spacing: 3, children: [
        isEditable && /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("p", { className: "editor-post-url__intro", children: (0, import_element139.createInterpolateElement)(
          (0, import_i18n189.__)(
            "<span>Customize the last part of the Permalink.</span> <a>Learn more.</a>"
          ),
          {
            span: /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("span", { id: postUrlSlugDescriptionId }),
            a: /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
              import_components168.ExternalLink,
              {
                href: (0, import_i18n189.__)(
                  "https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink"
                )
              }
            )
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { children: [
          isEditable && /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)(import_jsx_runtime299.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
              import_components168.__experimentalInputControl,
              {
                __next40pxDefaultSize: true,
                prefix: /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(import_components168.__experimentalInputControlPrefixWrapper, { children: "/" }),
                suffix: /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(import_components168.__experimentalInputControlSuffixWrapper, { variant: "control", children: /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
                  import_components168.Button,
                  {
                    icon: copy_small_default,
                    ref: copyButtonRef,
                    size: "small",
                    label: "Copy"
                  }
                ) }),
                label: (0, import_i18n189.__)("Slug"),
                hideLabelFromVision: true,
                value: forceEmptyField ? "" : postSlug,
                autoComplete: "off",
                spellCheck: "false",
                type: "text",
                className: "editor-post-url__input",
                onChange: (newValue) => {
                  editPost2({ slug: newValue });
                  if (!newValue) {
                    if (!forceEmptyField) {
                      setForceEmptyField(true);
                    }
                    return;
                  }
                  if (forceEmptyField) {
                    setForceEmptyField(false);
                  }
                },
                onBlur: (event) => {
                  editPost2({
                    slug: (0, import_url18.cleanForSlug)(
                      event.target.value
                    )
                  });
                  if (forceEmptyField) {
                    setForceEmptyField(false);
                  }
                },
                "aria-describedby": postUrlSlugDescriptionId
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("p", { className: "editor-post-url__permalink", children: [
              /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("span", { className: "editor-post-url__permalink-visual-label", children: (0, import_i18n189.__)("Permalink:") }),
              /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)(
                import_components168.ExternalLink,
                {
                  className: "editor-post-url__link",
                  href: postLink,
                  target: "_blank",
                  children: [
                    /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("span", { className: "editor-post-url__link-prefix", children: permalinkPrefix }),
                    /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("span", { className: "editor-post-url__link-slug", children: postSlug }),
                    /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("span", { className: "editor-post-url__link-suffix", children: permalinkSuffix })
                  ]
                }
              )
            ] })
          ] }),
          !isEditable && /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
            import_components168.ExternalLink,
            {
              className: "editor-post-url__link",
              href: postLink,
              target: "_blank",
              children: postLink
            }
          )
        ] })
      ] })
    ] });
  }

  // packages/editor/build-module/components/post-url/check.mjs
  var import_data168 = __toESM(require_data(), 1);
  var import_core_data103 = __toESM(require_core_data(), 1);
  function PostURLCheck({ children }) {
    const isVisible = (0, import_data168.useSelect)((select6) => {
      const postTypeSlug = select6(store).getCurrentPostType();
      const postType2 = select6(import_core_data103.store).getPostType(postTypeSlug);
      if (!postType2?.viewable) {
        return false;
      }
      const post2 = select6(store).getCurrentPost();
      if (!post2.link) {
        return false;
      }
      const permalinkParts = select6(store).getPermalinkParts();
      if (!permalinkParts) {
        return false;
      }
      return true;
    }, []);
    if (!isVisible) {
      return null;
    }
    return children;
  }

  // packages/editor/build-module/components/post-url/label.mjs
  var import_data169 = __toESM(require_data(), 1);
  var import_url19 = __toESM(require_url(), 1);
  function PostURLLabel() {
    return usePostURLLabel();
  }
  function usePostURLLabel() {
    const postLink = (0, import_data169.useSelect)(
      (select6) => select6(store).getPermalink(),
      []
    );
    return (0, import_url19.filterURLForDisplay)((0, import_url19.safeDecodeURIComponent)(postLink));
  }

  // packages/editor/build-module/components/post-url/panel.mjs
  var import_element140 = __toESM(require_element(), 1);
  var import_data170 = __toESM(require_data(), 1);
  var import_components169 = __toESM(require_components(), 1);
  var import_i18n190 = __toESM(require_i18n(), 1);
  var import_url20 = __toESM(require_url(), 1);
  var import_core_data104 = __toESM(require_core_data(), 1);
  var import_jsx_runtime300 = __toESM(require_jsx_runtime(), 1);
  function PostURLPanel() {
    const { isFrontPage } = (0, import_data170.useSelect)((select6) => {
      const { getCurrentPostId: getCurrentPostId2 } = select6(store);
      const { getEditedEntityRecord, canUser } = select6(import_core_data104.store);
      const siteSettings = canUser("read", {
        kind: "root",
        name: "site"
      }) ? getEditedEntityRecord("root", "site") : void 0;
      const _id = getCurrentPostId2();
      return {
        isFrontPage: siteSettings?.page_on_front === _id
      };
    }, []);
    const [popoverAnchor, setPopoverAnchor] = (0, import_element140.useState)(null);
    const popoverProps = (0, import_element140.useMemo)(
      () => ({
        // Anchor the popover to the middle of the entire row so that it doesn't
        // move around when the label changes.
        anchor: popoverAnchor,
        placement: "left-start",
        offset: 36,
        shift: true
      }),
      [popoverAnchor]
    );
    const label = isFrontPage ? (0, import_i18n190.__)("Link") : (0, import_i18n190.__)("Slug");
    return /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(PostURLCheck, { children: /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(post_panel_row_default, { label, ref: setPopoverAnchor, children: [
      !isFrontPage && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
        import_components169.Dropdown,
        {
          popoverProps,
          className: "editor-post-url__panel-dropdown",
          contentClassName: "editor-post-url__panel-dialog",
          focusOnMount: true,
          renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
            PostURLToggle,
            {
              isOpen,
              onClick: onToggle
            }
          ),
          renderContent: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(PostURL, { onClose })
        }
      ),
      isFrontPage && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(FrontPageLink, {})
    ] }) });
  }
  function PostURLToggle({ isOpen, onClick }) {
    const { slug } = (0, import_data170.useSelect)((select6) => {
      return {
        slug: select6(store).getEditedPostSlug()
      };
    }, []);
    const decodedSlug = (0, import_url20.safeDecodeURIComponent)(slug);
    return /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
      import_components169.Button,
      {
        size: "compact",
        className: "editor-post-url__panel-toggle",
        variant: "tertiary",
        "aria-expanded": isOpen,
        "aria-label": (
          // translators: %s: Current post link.
          (0, import_i18n190.sprintf)((0, import_i18n190.__)("Change link: %s"), decodedSlug)
        ),
        onClick,
        children: /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(import_jsx_runtime300.Fragment, { children: decodedSlug })
      }
    );
  }
  function FrontPageLink() {
    const { postLink } = (0, import_data170.useSelect)((select6) => {
      const { getCurrentPost: getCurrentPost2 } = select6(store);
      return {
        postLink: getCurrentPost2()?.link
      };
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
      import_components169.ExternalLink,
      {
        className: "editor-post-url__front-page-link",
        href: postLink,
        target: "_blank",
        children: postLink
      }
    );
  }

  // packages/editor/build-module/components/post-visibility/check.mjs
  var import_data171 = __toESM(require_data(), 1);
  function PostVisibilityCheck({ render: render4 }) {
    const canEdit = (0, import_data171.useSelect)((select6) => {
      return select6(store).getCurrentPost()._links?.["wp:action-publish"] ?? false;
    });
    return render4({ canEdit });
  }

  // packages/editor/build-module/components/table-of-contents/index.mjs
  var import_i18n194 = __toESM(require_i18n(), 1);
  var import_components170 = __toESM(require_components(), 1);
  var import_data176 = __toESM(require_data(), 1);
  var import_element142 = __toESM(require_element(), 1);
  var import_block_editor61 = __toESM(require_block_editor(), 1);

  // packages/editor/build-module/components/table-of-contents/panel.mjs
  var import_i18n193 = __toESM(require_i18n(), 1);
  var import_data175 = __toESM(require_data(), 1);
  var import_block_editor60 = __toESM(require_block_editor(), 1);

  // packages/editor/build-module/components/word-count/index.mjs
  var import_data172 = __toESM(require_data(), 1);
  var import_i18n191 = __toESM(require_i18n(), 1);
  var import_wordcount = __toESM(require_wordcount(), 1);
  var import_jsx_runtime301 = __toESM(require_jsx_runtime(), 1);
  function WordCount() {
    const content = (0, import_data172.useSelect)(
      (select6) => select6(store).getEditedPostAttribute("content"),
      []
    );
    const wordCountType = (0, import_i18n191._x)("words", "Word count type. Do not translate!");
    return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)("span", { className: "word-count", children: (0, import_wordcount.count)(content, wordCountType) });
  }

  // packages/editor/build-module/components/time-to-read/index.mjs
  var import_data173 = __toESM(require_data(), 1);
  var import_i18n192 = __toESM(require_i18n(), 1);
  var import_wordcount2 = __toESM(require_wordcount(), 1);
  var import_element141 = __toESM(require_element(), 1);
  var import_jsx_runtime302 = __toESM(require_jsx_runtime(), 1);
  var AVERAGE_READING_RATE = 189;
  function TimeToRead() {
    const content = (0, import_data173.useSelect)(
      (select6) => select6(store).getEditedPostAttribute("content"),
      []
    );
    const wordCountType = (0, import_i18n192._x)("words", "Word count type. Do not translate!");
    const minutesToRead = Math.round(
      (0, import_wordcount2.count)(content, wordCountType) / AVERAGE_READING_RATE
    );
    const minutesToReadString = minutesToRead === 0 ? (0, import_element141.createInterpolateElement)((0, import_i18n192.__)("<span>< 1</span> minute"), {
      span: /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("span", {})
    }) : (0, import_element141.createInterpolateElement)(
      (0, import_i18n192.sprintf)(
        /* translators: %s: the number of minutes to read the post. */
        (0, import_i18n192._n)(
          "<span>%s</span> minute",
          "<span>%s</span> minutes",
          minutesToRead
        ),
        minutesToRead
      ),
      {
        span: /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("span", {})
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("span", { className: "time-to-read", children: minutesToReadString });
  }

  // packages/editor/build-module/components/character-count/index.mjs
  var import_data174 = __toESM(require_data(), 1);
  var import_wordcount3 = __toESM(require_wordcount(), 1);
  function CharacterCount() {
    const content = (0, import_data174.useSelect)(
      (select6) => select6(store).getEditedPostAttribute("content"),
      []
    );
    return (0, import_wordcount3.count)(content, "characters_including_spaces");
  }

  // packages/editor/build-module/components/table-of-contents/panel.mjs
  var import_jsx_runtime303 = __toESM(require_jsx_runtime(), 1);
  function TableOfContentsPanel({ hasOutlineItemsDisabled, onRequestClose }) {
    const { headingCount, paragraphCount, numberOfBlocks } = (0, import_data175.useSelect)(
      (select6) => {
        const { getGlobalBlockCount: getGlobalBlockCount2 } = select6(import_block_editor60.store);
        return {
          headingCount: getGlobalBlockCount2("core/heading"),
          paragraphCount: getGlobalBlockCount2("core/paragraph"),
          numberOfBlocks: getGlobalBlockCount2()
        };
      },
      []
    );
    return (
      /*
       * Disable reason: The `list` ARIA role is redundant but
       * Safari+VoiceOver won't announce the list otherwise.
       */
      /* eslint-disable jsx-a11y/no-redundant-roles */
      /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(import_jsx_runtime303.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
          "div",
          {
            className: "table-of-contents__wrapper",
            role: "note",
            "aria-label": (0, import_i18n193.__)("Document Statistics"),
            tabIndex: "0",
            children: /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("ul", { role: "list", className: "table-of-contents__counts", children: [
              /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("li", { className: "table-of-contents__count", children: [
                (0, import_i18n193.__)("Words"),
                /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(WordCount, {})
              ] }),
              /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("li", { className: "table-of-contents__count", children: [
                (0, import_i18n193.__)("Characters"),
                /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("span", { className: "table-of-contents__number", children: /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(CharacterCount, {}) })
              ] }),
              /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("li", { className: "table-of-contents__count", children: [
                (0, import_i18n193.__)("Time to read"),
                /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(TimeToRead, {})
              ] }),
              /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("li", { className: "table-of-contents__count", children: [
                (0, import_i18n193.__)("Headings"),
                /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("span", { className: "table-of-contents__number", children: headingCount })
              ] }),
              /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("li", { className: "table-of-contents__count", children: [
                (0, import_i18n193.__)("Paragraphs"),
                /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("span", { className: "table-of-contents__number", children: paragraphCount })
              ] }),
              /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("li", { className: "table-of-contents__count", children: [
                (0, import_i18n193.__)("Blocks"),
                /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("span", { className: "table-of-contents__number", children: numberOfBlocks })
              ] })
            ] })
          }
        ),
        headingCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(import_jsx_runtime303.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("hr", {}),
          /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("h2", { className: "table-of-contents__title", children: (0, import_i18n193.__)("Document Outline") }),
          /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
            DocumentOutline,
            {
              onSelect: onRequestClose,
              hasOutlineItemsDisabled
            }
          )
        ] })
      ] })
    );
  }
  var panel_default3 = TableOfContentsPanel;

  // packages/editor/build-module/components/table-of-contents/index.mjs
  var import_jsx_runtime304 = __toESM(require_jsx_runtime(), 1);
  function TableOfContents({ hasOutlineItemsDisabled, repositionDropdown, ...props }, ref) {
    const hasBlocks = (0, import_data176.useSelect)(
      (select6) => !!select6(import_block_editor61.store).getBlockCount(),
      []
    );
    return /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
      import_components170.Dropdown,
      {
        popoverProps: {
          placement: repositionDropdown ? "right" : "bottom"
        },
        className: "table-of-contents",
        contentClassName: "table-of-contents__popover",
        renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
          import_components170.Button,
          {
            __next40pxDefaultSize: true,
            ...props,
            ref,
            onClick: hasBlocks ? onToggle : void 0,
            icon: info_default,
            "aria-expanded": isOpen,
            "aria-haspopup": "true",
            label: (0, import_i18n194.__)("Details"),
            tooltipPosition: "bottom",
            "aria-disabled": !hasBlocks
          }
        ),
        renderContent: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
          panel_default3,
          {
            onRequestClose: onClose,
            hasOutlineItemsDisabled
          }
        )
      }
    );
  }
  var table_of_contents_default = (0, import_element142.forwardRef)(TableOfContents);

  // packages/editor/build-module/components/unsaved-changes-warning/index.mjs
  var import_i18n195 = __toESM(require_i18n(), 1);
  var import_element143 = __toESM(require_element(), 1);
  var import_data177 = __toESM(require_data(), 1);
  var import_core_data105 = __toESM(require_core_data(), 1);
  function UnsavedChangesWarning() {
    const { __experimentalGetDirtyEntityRecords } = (0, import_data177.useSelect)(import_core_data105.store);
    (0, import_element143.useEffect)(() => {
      const warnIfUnsavedChanges = (event) => {
        const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
        if (dirtyEntityRecords.length > 0) {
          event.returnValue = (0, import_i18n195.__)(
            "You have unsaved changes. If you proceed, they will be lost."
          );
          return event.returnValue;
        }
      };
      window.addEventListener("beforeunload", warnIfUnsavedChanges);
      return () => {
        window.removeEventListener("beforeunload", warnIfUnsavedChanges);
      };
    }, [__experimentalGetDirtyEntityRecords]);
    return null;
  }

  // packages/editor/build-module/components/deprecated.mjs
  var import_deprecated12 = __toESM(require_deprecated(), 1);
  var import_element144 = __toESM(require_element(), 1);
  var import_block_editor62 = __toESM(require_block_editor(), 1);
  var import_server_side_render = __toESM(require_server_side_render(), 1);
  var import_jsx_runtime305 = __toESM(require_jsx_runtime(), 1);
  function deprecateComponent(name2, Wrapped, staticsToHoist = []) {
    const Component6 = (0, import_element144.forwardRef)((props, ref) => {
      (0, import_deprecated12.default)("wp.editor." + name2, {
        since: "5.3",
        alternative: "wp.blockEditor." + name2,
        version: "6.2"
      });
      return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(Wrapped, { ref, ...props });
    });
    staticsToHoist.forEach((staticName) => {
      Component6[staticName] = deprecateComponent(
        name2 + "." + staticName,
        Wrapped[staticName]
      );
    });
    return Component6;
  }
  function deprecateFunction(name2, func) {
    return (...args) => {
      (0, import_deprecated12.default)("wp.editor." + name2, {
        since: "5.3",
        alternative: "wp.blockEditor." + name2,
        version: "6.2"
      });
      return func(...args);
    };
  }
  var RichText = deprecateComponent("RichText", import_block_editor62.RichText, ["Content"]);
  RichText.isEmpty = deprecateFunction(
    "RichText.isEmpty",
    import_block_editor62.RichText.isEmpty
  );
  var Autocomplete = deprecateComponent(
    "Autocomplete",
    import_block_editor62.Autocomplete
  );
  var AlignmentToolbar = deprecateComponent(
    "AlignmentToolbar",
    import_block_editor62.AlignmentToolbar
  );
  var BlockAlignmentToolbar = deprecateComponent(
    "BlockAlignmentToolbar",
    import_block_editor62.BlockAlignmentToolbar
  );
  var BlockControls = deprecateComponent(
    "BlockControls",
    import_block_editor62.BlockControls,
    ["Slot"]
  );
  var BlockEdit = deprecateComponent("BlockEdit", import_block_editor62.BlockEdit);
  var BlockEditorKeyboardShortcuts2 = deprecateComponent(
    "BlockEditorKeyboardShortcuts",
    import_block_editor62.BlockEditorKeyboardShortcuts
  );
  var BlockFormatControls = deprecateComponent(
    "BlockFormatControls",
    import_block_editor62.BlockFormatControls,
    ["Slot"]
  );
  var BlockIcon3 = deprecateComponent("BlockIcon", import_block_editor62.BlockIcon);
  var BlockInspector = deprecateComponent(
    "BlockInspector",
    import_block_editor62.BlockInspector
  );
  var BlockList4 = deprecateComponent("BlockList", import_block_editor62.BlockList);
  var BlockMover = deprecateComponent("BlockMover", import_block_editor62.BlockMover);
  var BlockNavigationDropdown = deprecateComponent(
    "BlockNavigationDropdown",
    import_block_editor62.BlockNavigationDropdown
  );
  var BlockSelectionClearer = deprecateComponent(
    "BlockSelectionClearer",
    import_block_editor62.BlockSelectionClearer
  );
  var BlockSettingsMenu = deprecateComponent(
    "BlockSettingsMenu",
    import_block_editor62.BlockSettingsMenu
  );
  var BlockTitle = deprecateComponent("BlockTitle", import_block_editor62.BlockTitle);
  var BlockToolbar = deprecateComponent(
    "BlockToolbar",
    import_block_editor62.BlockToolbar
  );
  var ColorPalette2 = deprecateComponent(
    "ColorPalette",
    import_block_editor62.ColorPalette
  );
  var ContrastChecker = deprecateComponent(
    "ContrastChecker",
    import_block_editor62.ContrastChecker
  );
  var CopyHandler = deprecateComponent("CopyHandler", import_block_editor62.CopyHandler);
  var DefaultBlockAppender = deprecateComponent(
    "DefaultBlockAppender",
    import_block_editor62.DefaultBlockAppender
  );
  var FontSizePicker = deprecateComponent(
    "FontSizePicker",
    import_block_editor62.FontSizePicker
  );
  var Inserter = deprecateComponent("Inserter", import_block_editor62.Inserter);
  var InnerBlocks = deprecateComponent("InnerBlocks", import_block_editor62.InnerBlocks, [
    "ButtonBlockAppender",
    "DefaultBlockAppender",
    "Content"
  ]);
  var InspectorAdvancedControls = deprecateComponent(
    "InspectorAdvancedControls",
    import_block_editor62.InspectorAdvancedControls,
    ["Slot"]
  );
  var InspectorControls = deprecateComponent(
    "InspectorControls",
    import_block_editor62.InspectorControls,
    ["Slot"]
  );
  var PanelColorSettings = deprecateComponent(
    "PanelColorSettings",
    import_block_editor62.PanelColorSettings
  );
  var PlainText = deprecateComponent("PlainText", import_block_editor62.PlainText);
  var RichTextShortcut = deprecateComponent(
    "RichTextShortcut",
    import_block_editor62.RichTextShortcut
  );
  var RichTextToolbarButton = deprecateComponent(
    "RichTextToolbarButton",
    import_block_editor62.RichTextToolbarButton
  );
  var __unstableRichTextInputEvent = deprecateComponent(
    "__unstableRichTextInputEvent",
    import_block_editor62.__unstableRichTextInputEvent
  );
  var MediaPlaceholder = deprecateComponent(
    "MediaPlaceholder",
    import_block_editor62.MediaPlaceholder
  );
  var MediaUpload3 = deprecateComponent("MediaUpload", import_block_editor62.MediaUpload);
  var MediaUploadCheck2 = deprecateComponent(
    "MediaUploadCheck",
    import_block_editor62.MediaUploadCheck
  );
  var MultiSelectScrollIntoView = deprecateComponent(
    "MultiSelectScrollIntoView",
    import_block_editor62.MultiSelectScrollIntoView
  );
  var NavigableToolbar = deprecateComponent(
    "NavigableToolbar",
    import_block_editor62.NavigableToolbar
  );
  var ObserveTyping = deprecateComponent(
    "ObserveTyping",
    import_block_editor62.ObserveTyping
  );
  var SkipToSelectedBlock = deprecateComponent(
    "SkipToSelectedBlock",
    import_block_editor62.SkipToSelectedBlock
  );
  var URLInput = deprecateComponent("URLInput", import_block_editor62.URLInput);
  var URLInputButton = deprecateComponent(
    "URLInputButton",
    import_block_editor62.URLInputButton
  );
  var URLPopover = deprecateComponent("URLPopover", import_block_editor62.URLPopover);
  var Warning = deprecateComponent("Warning", import_block_editor62.Warning);
  var WritingFlow = deprecateComponent("WritingFlow", import_block_editor62.WritingFlow);
  var createCustomColorsHOC = deprecateFunction(
    "createCustomColorsHOC",
    import_block_editor62.createCustomColorsHOC
  );
  var getColorClassName2 = deprecateFunction(
    "getColorClassName",
    import_block_editor62.getColorClassName
  );
  var getColorObjectByAttributeValues = deprecateFunction(
    "getColorObjectByAttributeValues",
    import_block_editor62.getColorObjectByAttributeValues
  );
  var getColorObjectByColorValue = deprecateFunction(
    "getColorObjectByColorValue",
    import_block_editor62.getColorObjectByColorValue
  );
  var getFontSize = deprecateFunction("getFontSize", import_block_editor62.getFontSize);
  var getFontSizeClass = deprecateFunction(
    "getFontSizeClass",
    import_block_editor62.getFontSizeClass
  );
  var withColorContext = deprecateFunction(
    "withColorContext",
    import_block_editor62.withColorContext
  );
  var withColors = deprecateFunction("withColors", import_block_editor62.withColors);
  var withFontSizes = deprecateFunction(
    "withFontSizes",
    import_block_editor62.withFontSizes
  );

  // packages/editor/build-module/components/index.mjs
  var VisualEditorGlobalKeyboardShortcuts = EditorKeyboardShortcuts;
  var TextEditorGlobalKeyboardShortcuts = EditorKeyboardShortcuts;

  // packages/editor/build-module/hooks/default-autocompleters.mjs
  function setDefaultCompleters(completers = []) {
    completers.push({ ...user_default });
    return completers;
  }
  (0, import_hooks49.addFilter)(
    "editor.Autocomplete.completers",
    "editor/autocompleters/set-default-completers",
    setDefaultCompleters
  );

  // packages/editor/build-module/hooks/media-upload.mjs
  var import_element145 = __toESM(require_element(), 1);
  var import_hooks50 = __toESM(require_hooks(), 1);
  var import_deprecated13 = __toESM(require_deprecated(), 1);
  var import_media_utils6 = __toESM(require_media_utils(), 1);
  var import_jsx_runtime306 = __toESM(require_jsx_runtime(), 1);
  var { MediaUploadModal: MediaUploadModalComponent } = unlock(
    import_media_utils6.privateApis
  );
  var MediaUploadModalWrapper = class extends import_element145.Component {
    constructor(props) {
      super(props);
      this.state = {
        isOpen: false
      };
      this.openModal = this.openModal.bind(this);
      this.closeModal = this.closeModal.bind(this);
    }
    openModal() {
      this.setState({ isOpen: true });
    }
    closeModal() {
      this.setState({ isOpen: false });
      this.props.onClose?.();
    }
    render() {
      const {
        allowedTypes,
        multiple,
        value,
        onSelect,
        title,
        modalClass,
        render: render4
      } = this.props;
      const { isOpen } = this.state;
      return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)(import_jsx_runtime306.Fragment, { children: [
        render4({ open: this.openModal }),
        /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
          MediaUploadModalComponent,
          {
            allowedTypes,
            multiple,
            value,
            onSelect: (media) => {
              onSelect(media);
              this.closeModal();
            },
            onClose: this.closeModal,
            title,
            isOpen,
            modalClass
          }
        )
      ] });
    }
  };
  if (window.__experimentalDataViewsMediaModal) {
    (0, import_hooks50.addFilter)(
      "editor.MediaUpload",
      "core/editor/components/media-upload",
      () => {
        (0, import_deprecated13.default)("Extending MediaUpload as a class component", {
          since: "7.0",
          version: "7.2",
          hint: "MediaUpload will become a function component in WordPress 7.2 Please update any custom implementations to use function components instead."
        });
        return MediaUploadModalWrapper;
      }
    );
  } else {
    (0, import_hooks50.addFilter)(
      "editor.MediaUpload",
      "core/editor/components/media-upload",
      () => {
        return import_media_utils6.MediaUpload;
      }
    );
  }

  // packages/editor/build-module/hooks/pattern-overrides.mjs
  var import_hooks51 = __toESM(require_hooks(), 1);
  var import_patterns8 = __toESM(require_patterns(), 1);
  var import_compose41 = __toESM(require_compose(), 1);
  var import_block_editor63 = __toESM(require_block_editor(), 1);
  var import_data178 = __toESM(require_data(), 1);
  var import_blocks29 = __toESM(require_blocks(), 1);
  var import_jsx_runtime307 = __toESM(require_jsx_runtime(), 1);
  var {
    PatternOverridesControls,
    ResetOverridesControl,
    PATTERN_TYPES: PATTERN_TYPES4,
    PATTERN_SYNC_TYPES
  } = unlock(import_patterns8.privateApis);
  var withPatternOverrideControls = (0, import_compose41.createHigherOrderComponent)(
    (BlockEdit2) => (props) => {
      const isSupportedBlock = (0, import_data178.useSelect)(
        (select6) => {
          const { __experimentalBlockBindingsSupportedAttributes } = select6(import_block_editor63.store).getSettings();
          return !!__experimentalBlockBindingsSupportedAttributes?.[props.name];
        },
        [props.name]
      );
      return /* @__PURE__ */ (0, import_jsx_runtime307.jsxs)(import_jsx_runtime307.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(BlockEdit2, { ...props }, "edit"),
        props.isSelected && isSupportedBlock && /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(ControlsWithStoreSubscription, { ...props })
      ] });
    },
    "withPatternOverrideControls"
  );
  function ControlsWithStoreSubscription(props) {
    const blockEditingMode = (0, import_block_editor63.useBlockEditingMode)();
    const { hasPatternOverridesSource, isEditingSyncedPattern } = (0, import_data178.useSelect)(
      (select6) => {
        const { getCurrentPostType: getCurrentPostType2, getEditedPostAttribute: getEditedPostAttribute2 } = select6(store);
        return {
          // For editing link to the site editor if the theme and user permissions support it.
          hasPatternOverridesSource: !!(0, import_blocks29.getBlockBindingsSource)(
            "core/pattern-overrides"
          ),
          isEditingSyncedPattern: getCurrentPostType2() === PATTERN_TYPES4.user && getEditedPostAttribute2("meta")?.wp_pattern_sync_status !== PATTERN_SYNC_TYPES.unsynced && getEditedPostAttribute2("wp_pattern_sync_status") !== PATTERN_SYNC_TYPES.unsynced
        };
      },
      []
    );
    const bindings = props.attributes.metadata?.bindings;
    const hasPatternBindings = !!bindings && Object.values(bindings).some(
      (binding) => binding.source === "core/pattern-overrides"
    );
    const shouldShowPatternOverridesControls = isEditingSyncedPattern && blockEditingMode === "default";
    const shouldShowResetOverridesControl = !isEditingSyncedPattern && !!props.attributes.metadata?.name && blockEditingMode !== "disabled" && hasPatternBindings;
    if (!hasPatternOverridesSource) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime307.jsxs)(import_jsx_runtime307.Fragment, { children: [
      shouldShowPatternOverridesControls && /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(PatternOverridesControls, { ...props }),
      shouldShowResetOverridesControl && /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(ResetOverridesControl, { ...props })
    ] });
  }
  (0, import_hooks51.addFilter)(
    "editor.BlockEdit",
    "core/editor/with-pattern-override-controls",
    withPatternOverrideControls
  );

  // packages/editor/build-module/hooks/navigation-link-view-button.mjs
  var import_hooks52 = __toESM(require_hooks(), 1);
  var import_compose42 = __toESM(require_compose(), 1);
  var import_element146 = __toESM(require_element(), 1);
  var import_i18n196 = __toESM(require_i18n(), 1);
  var import_block_editor64 = __toESM(require_block_editor(), 1);
  var import_components172 = __toESM(require_components(), 1);
  var import_data179 = __toESM(require_data(), 1);
  var import_jsx_runtime308 = __toESM(require_jsx_runtime(), 1);
  var SUPPORTED_BLOCKS = ["core/navigation-link", "core/navigation-submenu"];
  function NavigationViewButton({ attributes }) {
    const { kind, id, type } = attributes;
    const blockEditingMode = (0, import_block_editor64.useBlockEditingMode)();
    const onNavigateToEntityRecord = (0, import_data179.useSelect)(
      (select6) => select6(import_block_editor64.store).getSettings().onNavigateToEntityRecord,
      []
    );
    const onViewPage = (0, import_element146.useCallback)(() => {
      if (kind === "post-type" && type === "page" && id && onNavigateToEntityRecord) {
        onNavigateToEntityRecord({
          postId: id,
          postType: type
        });
      }
    }, [kind, id, type, onNavigateToEntityRecord]);
    if (kind !== "post-type" || type !== "page" || !id || !onNavigateToEntityRecord || blockEditingMode !== "contentOnly") {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(import_block_editor64.__unstableBlockToolbarLastItem, { children: /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(import_components172.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(
      import_components172.ToolbarButton,
      {
        name: "view",
        title: (0, import_i18n196.__)("View"),
        onClick: onViewPage,
        children: (0, import_i18n196.__)("View")
      }
    ) }) });
  }
  var withNavigationViewButton = (0, import_compose42.createHigherOrderComponent)(
    (BlockEdit2) => (props) => {
      const isSupportedBlock = SUPPORTED_BLOCKS.includes(props.name);
      return /* @__PURE__ */ (0, import_jsx_runtime308.jsxs)(import_jsx_runtime308.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(BlockEdit2, { ...props }, "edit"),
        props.isSelected && isSupportedBlock && /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(NavigationViewButton, { ...props })
      ] });
    },
    "withNavigationViewButton"
  );
  (0, import_hooks52.addFilter)(
    "editor.BlockEdit",
    "core/editor/with-navigation-view-button",
    withNavigationViewButton
  );

  // packages/editor/build-module/hooks/template-part-navigation-edit-button.mjs
  var import_hooks53 = __toESM(require_hooks(), 1);
  var import_compose43 = __toESM(require_compose(), 1);
  var import_element147 = __toESM(require_element(), 1);
  var import_i18n197 = __toESM(require_i18n(), 1);
  var import_block_editor65 = __toESM(require_block_editor(), 1);
  var import_components173 = __toESM(require_components(), 1);
  var import_data180 = __toESM(require_data(), 1);
  var import_jsx_runtime309 = __toESM(require_jsx_runtime(), 1);
  var NAVIGATION_BLOCK_NAME = "core/navigation";
  var TEMPLATE_PART_BLOCK_NAME = "core/template-part";
  var BLOCK_INSPECTOR_AREA = "edit-post/block";
  function TemplatePartNavigationEditButton({ clientId }) {
    const registry = (0, import_data180.useRegistry)();
    const { selectBlock: selectBlock2, flashBlock } = (0, import_data180.useDispatch)(import_block_editor65.store);
    const { requestInspectorTab } = unlock((0, import_data180.useDispatch)(import_block_editor65.store));
    const { enableComplementaryArea: enableComplementaryArea2 } = (0, import_data180.useDispatch)(store2);
    const {
      hasNavigationBlocks,
      firstNavigationBlockId,
      isNavigationEditable
    } = (0, import_data180.useSelect)(
      (select6) => {
        const {
          getClientIdsOfDescendants: getClientIdsOfDescendants2,
          getBlockName: getBlockName2,
          getBlockEditingMode
        } = select6(import_block_editor65.store);
        const descendants = getClientIdsOfDescendants2(clientId);
        const navigationBlocksInTemplatePart = descendants.filter(
          (blockId) => getBlockName2(blockId) === NAVIGATION_BLOCK_NAME
        );
        const _hasNavigationBlocks = navigationBlocksInTemplatePart.length > 0;
        const _firstNavigationBlockId = _hasNavigationBlocks ? navigationBlocksInTemplatePart[0] : null;
        return {
          hasNavigationBlocks: _hasNavigationBlocks,
          firstNavigationBlockId: _firstNavigationBlockId,
          // We can't use the useBlockEditingMode hook here because the current
          // context is the template part, not the navigation block.
          isNavigationEditable: getBlockEditingMode(_firstNavigationBlockId) !== "disabled"
        };
      },
      [clientId]
    );
    const onEditNavigation = (0, import_element147.useCallback)(() => {
      if (firstNavigationBlockId) {
        registry.batch(() => {
          selectBlock2(firstNavigationBlockId);
          flashBlock(firstNavigationBlockId, 500);
          enableComplementaryArea2("core", BLOCK_INSPECTOR_AREA);
          requestInspectorTab("list", {
            openPanel: firstNavigationBlockId
          });
        });
      }
    }, [
      firstNavigationBlockId,
      registry,
      selectBlock2,
      flashBlock,
      enableComplementaryArea2,
      requestInspectorTab
    ]);
    if (!hasNavigationBlocks || !isNavigationEditable) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(import_block_editor65.__unstableBlockToolbarLastItem, { children: /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(import_components173.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
      import_components173.ToolbarButton,
      {
        label: (0, import_i18n197.__)("Edit navigation"),
        onClick: onEditNavigation,
        children: (0, import_i18n197.__)("Edit navigation")
      }
    ) }) });
  }
  var withTemplatePartNavigationEditButton = (0, import_compose43.createHigherOrderComponent)(
    (BlockEdit2) => (props) => {
      const isTemplatePart2 = props.name === TEMPLATE_PART_BLOCK_NAME;
      return /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)(import_jsx_runtime309.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(BlockEdit2, { ...props }, "edit"),
        props.isSelected && isTemplatePart2 && /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
          TemplatePartNavigationEditButton,
          {
            clientId: props.clientId
          }
        )
      ] });
    },
    "withTemplatePartNavigationEditButton"
  );
  (0, import_hooks53.addFilter)(
    "editor.BlockEdit",
    "core/editor/with-template-part-navigation-edit-button",
    withTemplatePartNavigationEditButton
  );

  // packages/editor/build-module/hooks/push-changes-to-global-styles/index.mjs
  var import_hooks54 = __toESM(require_hooks(), 1);
  var import_compose44 = __toESM(require_compose(), 1);
  var import_block_editor66 = __toESM(require_block_editor(), 1);
  var import_components174 = __toESM(require_components(), 1);
  var import_i18n198 = __toESM(require_i18n(), 1);
  var import_blocks30 = __toESM(require_blocks(), 1);
  var import_element148 = __toESM(require_element(), 1);
  var import_data181 = __toESM(require_data(), 1);
  var import_notices26 = __toESM(require_notices(), 1);
  var import_core_data106 = __toESM(require_core_data(), 1);

  // packages/editor/build-module/utils/set-nested-value.mjs
  function setNestedValue(object, path, value) {
    if (!object || typeof object !== "object") {
      return object;
    }
    path.reduce((acc, key, idx) => {
      if (acc[key] === void 0) {
        if (Number.isInteger(path[idx + 1])) {
          acc[key] = [];
        } else {
          acc[key] = {};
        }
      }
      if (idx === path.length - 1) {
        acc[key] = value;
      }
      return acc[key];
    }, object);
    return object;
  }

  // packages/editor/build-module/hooks/push-changes-to-global-styles/index.mjs
  var import_jsx_runtime310 = __toESM(require_jsx_runtime(), 1);
  var { cleanEmptyObject: cleanEmptyObject3 } = unlock(import_block_editor66.privateApis);
  var STYLE_PROPERTY2 = {
    ...import_blocks30.__EXPERIMENTAL_STYLE_PROPERTY,
    blockGap: { value: ["spacing", "blockGap"] }
  };
  var STYLE_PATH_TO_CSS_VAR_INFIX = {
    "border.color": "color",
    "color.background": "color",
    "color.text": "color",
    "elements.link.color.text": "color",
    "elements.link.:hover.color.text": "color",
    "elements.link.typography.fontFamily": "font-family",
    "elements.link.typography.fontSize": "font-size",
    "elements.button.color.text": "color",
    "elements.button.color.background": "color",
    "elements.button.typography.fontFamily": "font-family",
    "elements.button.typography.fontSize": "font-size",
    "elements.caption.color.text": "color",
    "elements.heading.color": "color",
    "elements.heading.color.background": "color",
    "elements.heading.typography.fontFamily": "font-family",
    "elements.heading.gradient": "gradient",
    "elements.heading.color.gradient": "gradient",
    "elements.h1.color": "color",
    "elements.h1.color.background": "color",
    "elements.h1.typography.fontFamily": "font-family",
    "elements.h1.color.gradient": "gradient",
    "elements.h2.color": "color",
    "elements.h2.color.background": "color",
    "elements.h2.typography.fontFamily": "font-family",
    "elements.h2.color.gradient": "gradient",
    "elements.h3.color": "color",
    "elements.h3.color.background": "color",
    "elements.h3.typography.fontFamily": "font-family",
    "elements.h3.color.gradient": "gradient",
    "elements.h4.color": "color",
    "elements.h4.color.background": "color",
    "elements.h4.typography.fontFamily": "font-family",
    "elements.h4.color.gradient": "gradient",
    "elements.h5.color": "color",
    "elements.h5.color.background": "color",
    "elements.h5.typography.fontFamily": "font-family",
    "elements.h5.color.gradient": "gradient",
    "elements.h6.color": "color",
    "elements.h6.color.background": "color",
    "elements.h6.typography.fontFamily": "font-family",
    "elements.h6.color.gradient": "gradient",
    "color.gradient": "gradient",
    blockGap: "spacing",
    "typography.fontSize": "font-size",
    "typography.fontFamily": "font-family"
  };
  var STYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE = {
    "border.color": "borderColor",
    "color.background": "backgroundColor",
    "color.text": "textColor",
    "color.gradient": "gradient",
    "typography.fontSize": "fontSize",
    "typography.fontFamily": "fontFamily"
  };
  var SUPPORTED_STYLES = ["border", "color", "spacing", "typography"];
  var getValueFromObjectPath2 = (object, path) => {
    let value = object;
    path.forEach((fieldName) => {
      value = value?.[fieldName];
    });
    return value;
  };
  var flatBorderProperties = ["borderColor", "borderWidth", "borderStyle"];
  var sides2 = ["top", "right", "bottom", "left"];
  function getBorderStyleChanges(border, presetColor, userStyle) {
    if (!border && !presetColor) {
      return [];
    }
    const changes = [
      ...getFallbackBorderStyleChange("top", border, userStyle),
      ...getFallbackBorderStyleChange("right", border, userStyle),
      ...getFallbackBorderStyleChange("bottom", border, userStyle),
      ...getFallbackBorderStyleChange("left", border, userStyle)
    ];
    const { color: customColor, style, width } = border || {};
    const hasColorOrWidth = presetColor || customColor || width;
    if (hasColorOrWidth && !style) {
      sides2.forEach((side) => {
        if (!userStyle?.[side]?.style) {
          changes.push({
            path: ["border", side, "style"],
            value: "solid"
          });
        }
      });
    }
    return changes;
  }
  function getFallbackBorderStyleChange(side, border, globalBorderStyle) {
    if (!border?.[side] || globalBorderStyle?.[side]?.style) {
      return [];
    }
    const { color, style, width } = border[side];
    const hasColorOrWidth = color || width;
    if (!hasColorOrWidth || style) {
      return [];
    }
    return [{ path: ["border", side, "style"], value: "solid" }];
  }
  function useChangesToPush(name2, attributes, userConfig) {
    const supports = (0, import_data181.useSelect)(
      (select6) => {
        return unlock(select6(import_blocks30.store)).getSupportedStyles(name2);
      },
      [name2]
    );
    const blockUserConfig = userConfig?.styles?.blocks?.[name2];
    return (0, import_element148.useMemo)(() => {
      const changes = supports.flatMap((key) => {
        if (!STYLE_PROPERTY2[key]) {
          return [];
        }
        const { value: path } = STYLE_PROPERTY2[key];
        const presetAttributeKey = path.join(".");
        const presetAttributeValue = attributes[STYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE[presetAttributeKey]];
        const value = presetAttributeValue ? `var:preset|${STYLE_PATH_TO_CSS_VAR_INFIX[presetAttributeKey]}|${presetAttributeValue}` : getValueFromObjectPath2(attributes.style, path);
        if (key === "linkColor") {
          const linkChanges = value ? [{ path, value }] : [];
          const hoverPath = [
            "elements",
            "link",
            ":hover",
            "color",
            "text"
          ];
          const hoverValue = getValueFromObjectPath2(
            attributes.style,
            hoverPath
          );
          if (hoverValue) {
            linkChanges.push({ path: hoverPath, value: hoverValue });
          }
          return linkChanges;
        }
        if (flatBorderProperties.includes(key) && value) {
          const borderChanges = [{ path, value }];
          sides2.forEach((side) => {
            const currentPath = [...path];
            currentPath.splice(-1, 0, side);
            borderChanges.push({ path: currentPath, value });
          });
          return borderChanges;
        }
        return value ? [{ path, value }] : [];
      });
      getBorderStyleChanges(
        attributes.style?.border,
        attributes.borderColor,
        blockUserConfig?.border
      ).forEach((change) => changes.push(change));
      return changes;
    }, [supports, attributes, blockUserConfig]);
  }
  function PushChangesToGlobalStylesControl({
    name: name2,
    attributes,
    setAttributes
  }) {
    const { user: userConfig, setUser: setUserConfig } = useGlobalStyles();
    const changes = useChangesToPush(name2, attributes, userConfig);
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data181.useDispatch)(import_block_editor66.store);
    const { createSuccessNotice } = (0, import_data181.useDispatch)(import_notices26.store);
    const pushChanges = (0, import_element148.useCallback)(() => {
      if (changes.length === 0) {
        return;
      }
      if (changes.length > 0) {
        const { style: blockStyles } = attributes;
        const newBlockStyles = structuredClone(blockStyles);
        const newUserConfig = structuredClone(userConfig);
        for (const { path, value } of changes) {
          setNestedValue(newBlockStyles, path, void 0);
          setNestedValue(
            newUserConfig,
            ["styles", "blocks", name2, ...path],
            value
          );
        }
        const newBlockAttributes = {
          borderColor: void 0,
          backgroundColor: void 0,
          textColor: void 0,
          gradient: void 0,
          fontSize: void 0,
          fontFamily: void 0,
          style: cleanEmptyObject3(newBlockStyles)
        };
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes(newBlockAttributes);
        setUserConfig(newUserConfig, { undoIgnore: true });
        createSuccessNotice(
          (0, import_i18n198.sprintf)(
            // translators: %s: Title of the block e.g. 'Heading'.
            (0, import_i18n198.__)("%s styles applied."),
            (0, import_blocks30.getBlockType)(name2).title
          ),
          {
            type: "snackbar",
            actions: [
              {
                label: (0, import_i18n198.__)("Undo"),
                onClick() {
                  __unstableMarkNextChangeAsNotPersistent();
                  setAttributes(attributes);
                  setUserConfig(userConfig, {
                    undoIgnore: true
                  });
                }
              }
            ]
          }
        );
      }
    }, [
      __unstableMarkNextChangeAsNotPersistent,
      attributes,
      changes,
      createSuccessNotice,
      name2,
      setAttributes,
      setUserConfig,
      userConfig
    ]);
    return /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)(
      import_components174.BaseControl,
      {
        className: "editor-push-changes-to-global-styles-control",
        help: (0, import_i18n198.sprintf)(
          // translators: %s: Title of the block e.g. 'Heading'.
          (0, import_i18n198.__)(
            "Apply this block\u2019s typography, spacing, dimensions, and color styles to all %s blocks."
          ),
          (0, import_blocks30.getBlockType)(name2).title
        ),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(import_components174.BaseControl.VisualLabel, { children: (0, import_i18n198.__)("Styles") }),
          /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
            import_components174.Button,
            {
              __next40pxDefaultSize: true,
              variant: "secondary",
              accessibleWhenDisabled: true,
              disabled: changes.length === 0,
              onClick: pushChanges,
              children: (0, import_i18n198.__)("Apply globally")
            }
          )
        ]
      }
    );
  }
  function PushChangesToGlobalStyles(props) {
    const blockEditingMode = (0, import_block_editor66.useBlockEditingMode)();
    const isBlockBasedTheme = (0, import_data181.useSelect)(
      (select6) => select6(import_core_data106.store).getCurrentTheme()?.is_block_theme,
      []
    );
    const supportsStyles = SUPPORTED_STYLES.some(
      (feature) => (0, import_blocks30.hasBlockSupport)(props.name, feature)
    );
    const isDisplayed = blockEditingMode === "default" && supportsStyles && isBlockBasedTheme;
    if (!isDisplayed) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(import_block_editor66.InspectorAdvancedControls, { children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(PushChangesToGlobalStylesControl, { ...props }) });
  }
  var withPushChangesToGlobalStyles = (0, import_compose44.createHigherOrderComponent)(
    (BlockEdit2) => (props) => /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)(import_jsx_runtime310.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(BlockEdit2, { ...props }, "edit"),
      props.isSelected && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(PushChangesToGlobalStyles, { ...props })
    ] })
  );
  (0, import_hooks54.addFilter)(
    "editor.BlockEdit",
    "core/editor/push-changes-to-global-styles",
    withPushChangesToGlobalStyles
  );

  // packages/editor/build-module/components/header/back-button.mjs
  var import_components175 = __toESM(require_components(), 1);
  var import_jsx_runtime311 = __toESM(require_jsx_runtime(), 1);
  var slotName = "__experimentalMainDashboardButton";
  var useHasBackButton = () => {
    const fills = (0, import_components175.__experimentalUseSlotFills)(slotName);
    return Boolean(fills && fills.length);
  };
  var { Fill: Fill10, Slot: Slot10 } = (0, import_components175.createSlotFill)(slotName);
  var BackButton = Fill10;
  var BackButtonSlot = () => {
    const fills = (0, import_components175.__experimentalUseSlotFills)(slotName);
    return /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
      Slot10,
      {
        bubblesVirtually: true,
        fillProps: { length: !fills ? 0 : fills.length }
      }
    );
  };
  BackButton.Slot = BackButtonSlot;
  var back_button_default = BackButton;

  // packages/editor/build-module/components/editor/index.mjs
  var import_data246 = __toESM(require_data(), 1);
  var import_core_data136 = __toESM(require_core_data(), 1);
  var import_components255 = __toESM(require_components(), 1);
  var import_i18n277 = __toESM(require_i18n(), 1);

  // packages/editor/build-module/components/editor-interface/index.mjs
  var import_data217 = __toESM(require_data(), 1);
  var import_i18n249 = __toESM(require_i18n(), 1);
  var import_preferences24 = __toESM(require_preferences(), 1);
  var import_block_editor83 = __toESM(require_block_editor(), 1);
  var import_compose64 = __toESM(require_compose(), 1);
  var import_element213 = __toESM(require_element(), 1);
  var import_html_entities27 = __toESM(require_html_entities(), 1);
  var import_notices31 = __toESM(require_notices(), 1);

  // packages/editor/build-module/components/header/index.mjs
  var import_block_editor72 = __toESM(require_block_editor(), 1);
  var import_data192 = __toESM(require_data(), 1);
  var import_compose50 = __toESM(require_compose(), 1);
  var import_preferences21 = __toESM(require_preferences(), 1);
  var import_element161 = __toESM(require_element(), 1);

  // packages/editor/build-module/components/collapsible-block-toolbar/index.mjs
  var import_block_editor67 = __toESM(require_block_editor(), 1);
  var import_element149 = __toESM(require_element(), 1);
  var import_components176 = __toESM(require_components(), 1);
  var import_i18n199 = __toESM(require_i18n(), 1);
  var import_data182 = __toESM(require_data(), 1);
  var import_jsx_runtime312 = __toESM(require_jsx_runtime(), 1);
  var { useHasBlockToolbar } = unlock(import_block_editor67.privateApis);
  function CollapsibleBlockToolbar({ isCollapsed, onToggle }) {
    const { blockSelectionStart } = (0, import_data182.useSelect)((select6) => {
      return {
        blockSelectionStart: select6(import_block_editor67.store).getBlockSelectionStart()
      };
    }, []);
    const hasBlockToolbar = useHasBlockToolbar();
    const hasBlockSelection = !!blockSelectionStart;
    (0, import_element149.useEffect)(() => {
      if (blockSelectionStart) {
        onToggle(false);
      }
    }, [blockSelectionStart, onToggle]);
    if (!hasBlockToolbar) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(import_jsx_runtime312.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
        "div",
        {
          className: clsx_default("editor-collapsible-block-toolbar", {
            "is-collapsed": isCollapsed || !hasBlockSelection
          }),
          children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(import_block_editor67.BlockToolbar, { hideDragHandle: true })
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(import_components176.Popover.Slot, { name: "block-toolbar" }),
      /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
        import_components176.Button,
        {
          className: "editor-collapsible-block-toolbar__toggle",
          icon: isCollapsed ? next_default : previous_default,
          onClick: () => {
            onToggle(!isCollapsed);
          },
          label: isCollapsed ? (0, import_i18n199.__)("Show block tools") : (0, import_i18n199.__)("Hide block tools"),
          size: "compact"
        }
      )
    ] });
  }

  // packages/editor/build-module/components/document-tools/index.mjs
  var import_compose45 = __toESM(require_compose(), 1);
  var import_data183 = __toESM(require_data(), 1);
  var import_i18n200 = __toESM(require_i18n(), 1);
  var import_block_editor68 = __toESM(require_block_editor(), 1);
  var import_components177 = __toESM(require_components(), 1);
  var import_element150 = __toESM(require_element(), 1);
  var import_keyboard_shortcuts5 = __toESM(require_keyboard_shortcuts(), 1);
  var import_preferences15 = __toESM(require_preferences(), 1);
  var import_jsx_runtime313 = __toESM(require_jsx_runtime(), 1);
  function DocumentTools({ className, disableBlockTools = false }) {
    const { setIsInserterOpened: setIsInserterOpened2, setIsListViewOpened: setIsListViewOpened2 } = (0, import_data183.useDispatch)(store);
    const {
      isDistractionFree,
      isInserterOpened: isInserterOpened2,
      isListViewOpen,
      listViewShortcut,
      inserterSidebarToggleRef: inserterSidebarToggleRef2,
      listViewToggleRef: listViewToggleRef2,
      showIconLabels
    } = (0, import_data183.useSelect)((select6) => {
      const { get } = select6(import_preferences15.store);
      const {
        isListViewOpened: isListViewOpened2,
        getEditorMode: getEditorMode2,
        getInserterSidebarToggleRef: getInserterSidebarToggleRef2,
        getListViewToggleRef: getListViewToggleRef2
      } = unlock(select6(store));
      const { getShortcutRepresentation } = select6(import_keyboard_shortcuts5.store);
      return {
        isInserterOpened: select6(store).isInserterOpened(),
        isListViewOpen: isListViewOpened2(),
        listViewShortcut: getShortcutRepresentation(
          "core/editor/toggle-list-view"
        ),
        inserterSidebarToggleRef: getInserterSidebarToggleRef2(),
        listViewToggleRef: getListViewToggleRef2(),
        showIconLabels: get("core", "showIconLabels"),
        isDistractionFree: get("core", "distractionFree"),
        isVisualMode: getEditorMode2() === "visual"
      };
    }, []);
    const preventDefault = (event) => {
      if (isInserterOpened2) {
        event.preventDefault();
      }
    };
    const isWideViewport = (0, import_compose45.useViewportMatch)("wide");
    const toolbarAriaLabel = (0, import_i18n200.__)("Document tools");
    const toggleListView = (0, import_element150.useCallback)(
      () => setIsListViewOpened2(!isListViewOpen),
      [setIsListViewOpened2, isListViewOpen]
    );
    const toggleInserter = (0, import_element150.useCallback)(
      () => setIsInserterOpened2(!isInserterOpened2),
      [isInserterOpened2, setIsInserterOpened2]
    );
    const longLabel = (0, import_i18n200._x)(
      "Block Inserter",
      "Generic label for block inserter button"
    );
    const shortLabel = !isInserterOpened2 ? (0, import_i18n200.__)("Add") : (0, import_i18n200.__)("Close");
    return (
      // Some plugins expect and use the `edit-post-header-toolbar` CSS class to
      // find the toolbar and inject UI elements into it. This is not officially
      // supported, but we're keeping it in the list of class names for backwards
      // compatibility.
      /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
        import_block_editor68.NavigableToolbar,
        {
          className: clsx_default(
            "editor-document-tools",
            "edit-post-header-toolbar",
            className
          ),
          "aria-label": toolbarAriaLabel,
          variant: "unstyled",
          children: /* @__PURE__ */ (0, import_jsx_runtime313.jsxs)("div", { className: "editor-document-tools__left", children: [
            !isDistractionFree && /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
              import_components177.ToolbarButton,
              {
                ref: inserterSidebarToggleRef2,
                className: "editor-document-tools__inserter-toggle",
                variant: "primary",
                isPressed: isInserterOpened2,
                onMouseDown: preventDefault,
                onClick: toggleInserter,
                disabled: disableBlockTools,
                icon: plus_default,
                label: showIconLabels ? shortLabel : longLabel,
                showTooltip: !showIconLabels,
                "aria-expanded": isInserterOpened2
              }
            ),
            (isWideViewport || !showIconLabels) && /* @__PURE__ */ (0, import_jsx_runtime313.jsxs)(import_jsx_runtime313.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
                import_components177.ToolbarItem,
                {
                  as: undo_default2,
                  showTooltip: !showIconLabels,
                  variant: showIconLabels ? "tertiary" : void 0,
                  size: "compact"
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
                import_components177.ToolbarItem,
                {
                  as: redo_default2,
                  showTooltip: !showIconLabels,
                  variant: showIconLabels ? "tertiary" : void 0,
                  size: "compact"
                }
              ),
              !isDistractionFree && /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
                import_components177.ToolbarButton,
                {
                  className: "editor-document-tools__document-overview-toggle",
                  icon: list_view_default,
                  disabled: disableBlockTools,
                  isPressed: isListViewOpen,
                  label: (0, import_i18n200.__)("Document Overview"),
                  onClick: toggleListView,
                  shortcut: listViewShortcut,
                  showTooltip: !showIconLabels,
                  variant: showIconLabels ? "tertiary" : void 0,
                  "aria-expanded": isListViewOpen,
                  ref: listViewToggleRef2
                }
              )
            ] })
          ] })
        }
      )
    );
  }
  var document_tools_default = DocumentTools;

  // packages/editor/build-module/components/header/header-skeleton.mjs
  var import_components178 = __toESM(require_components(), 1);
  var import_jsx_runtime314 = __toESM(require_jsx_runtime(), 1);
  var toolbarVariations = {
    distractionFreeDisabled: { y: "-50px" },
    distractionFreeHover: { y: 0 },
    distractionFreeHidden: { y: "-50px" },
    visible: { y: 0 },
    hidden: { y: 0 }
  };
  var backButtonVariations = {
    distractionFreeDisabled: { x: "-100%" },
    distractionFreeHover: { x: 0 },
    distractionFreeHidden: { x: "-100%" },
    visible: { x: 0 },
    hidden: { x: 0 }
  };
  function HeaderSkeleton({
    className,
    toolbar,
    center,
    settings
  }) {
    const hasBackButton = useHasBackButton();
    return /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: clsx_default("editor-header edit-post-header", className), children: [
      hasBackButton && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
        import_components178.__unstableMotion.div,
        {
          className: "editor-header__back-button",
          variants: backButtonVariations,
          transition: { type: "tween" },
          children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(back_button_default.Slot, {})
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
        import_components178.__unstableMotion.div,
        {
          variants: toolbarVariations,
          className: "editor-header__toolbar",
          transition: { type: "tween" },
          children: toolbar
        }
      ),
      center && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
        import_components178.__unstableMotion.div,
        {
          variants: toolbarVariations,
          className: "editor-header__center",
          transition: { type: "tween" },
          children: center
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
        import_components178.__unstableMotion.div,
        {
          variants: toolbarVariations,
          transition: { type: "tween" },
          className: "editor-header__settings",
          children: settings
        }
      )
    ] });
  }

  // packages/editor/build-module/components/more-menu/index.mjs
  var import_i18n203 = __toESM(require_i18n(), 1);
  var import_data186 = __toESM(require_data(), 1);
  var import_keycodes13 = __toESM(require_keycodes(), 1);
  var import_components183 = __toESM(require_components(), 1);
  var import_preferences16 = __toESM(require_preferences(), 1);

  // packages/editor/build-module/components/more-menu/copy-content-menu-item.mjs
  var import_components179 = __toESM(require_components(), 1);
  var import_data184 = __toESM(require_data(), 1);
  var import_i18n201 = __toESM(require_i18n(), 1);
  var import_compose46 = __toESM(require_compose(), 1);
  var import_notices27 = __toESM(require_notices(), 1);
  var import_core_data107 = __toESM(require_core_data(), 1);
  var import_blocks31 = __toESM(require_blocks(), 1);
  var import_jsx_runtime315 = __toESM(require_jsx_runtime(), 1);
  function CopyContentMenuItem() {
    const { createNotice } = (0, import_data184.useDispatch)(import_notices27.store);
    const { getCurrentPostId: getCurrentPostId2, getCurrentPostType: getCurrentPostType2 } = (0, import_data184.useSelect)(store);
    const { getEditedEntityRecord } = (0, import_data184.useSelect)(import_core_data107.store);
    function getText() {
      const record = getEditedEntityRecord(
        "postType",
        getCurrentPostType2(),
        getCurrentPostId2()
      );
      if (!record) {
        return "";
      }
      if (typeof record.content === "function") {
        return record.content(record);
      } else if (record.blocks) {
        return (0, import_blocks31.__unstableSerializeAndClean)(record.blocks);
      } else if (record.content) {
        return record.content;
      }
    }
    function onSuccess() {
      createNotice("info", (0, import_i18n201.__)("All content copied."), {
        isDismissible: true,
        type: "snackbar"
      });
    }
    const ref = (0, import_compose46.useCopyToClipboard)(getText, onSuccess);
    return /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(import_components179.MenuItem, { ref, children: (0, import_i18n201.__)("Copy all blocks") });
  }

  // packages/editor/build-module/components/mode-switcher/index.mjs
  var import_i18n202 = __toESM(require_i18n(), 1);
  var import_components180 = __toESM(require_components(), 1);
  var import_data185 = __toESM(require_data(), 1);
  var import_keyboard_shortcuts6 = __toESM(require_keyboard_shortcuts(), 1);
  var import_jsx_runtime316 = __toESM(require_jsx_runtime(), 1);
  var MODES = [
    {
      value: "visual",
      label: (0, import_i18n202.__)("Visual editor")
    },
    {
      value: "text",
      label: (0, import_i18n202.__)("Code editor")
    }
  ];
  function ModeSwitcher() {
    const { shortcut, isRichEditingEnabled, isCodeEditingEnabled, mode } = (0, import_data185.useSelect)(
      (select6) => ({
        shortcut: select6(
          import_keyboard_shortcuts6.store
        ).getShortcutRepresentation("core/editor/toggle-mode"),
        isRichEditingEnabled: select6(store).getEditorSettings().richEditingEnabled,
        isCodeEditingEnabled: select6(store).getEditorSettings().codeEditingEnabled,
        mode: select6(store).getEditorMode()
      }),
      []
    );
    const { switchEditorMode: switchEditorMode2 } = (0, import_data185.useDispatch)(store);
    let selectedMode = mode;
    if (!isRichEditingEnabled && mode === "visual") {
      selectedMode = "text";
    }
    if (!isCodeEditingEnabled && mode === "text") {
      selectedMode = "visual";
    }
    const choices = MODES.map((choice) => {
      if (!isCodeEditingEnabled && choice.value === "text") {
        choice = {
          ...choice,
          disabled: true
        };
      }
      if (!isRichEditingEnabled && choice.value === "visual") {
        choice = {
          ...choice,
          disabled: true,
          info: (0, import_i18n202.__)(
            "You can enable the visual editor in your profile settings."
          )
        };
      }
      if (choice.value !== selectedMode && !choice.disabled) {
        return { ...choice, shortcut };
      }
      return choice;
    });
    return /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(import_components180.MenuGroup, { label: (0, import_i18n202.__)("Editor"), children: /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
      import_components180.MenuItemsChoice,
      {
        choices,
        value: selectedMode,
        onSelect: switchEditorMode2
      }
    ) });
  }
  var mode_switcher_default = ModeSwitcher;

  // packages/editor/build-module/components/more-menu/tools-more-menu-group.mjs
  var import_components181 = __toESM(require_components(), 1);
  var import_jsx_runtime317 = __toESM(require_jsx_runtime(), 1);
  var { Fill: ToolsMoreMenuGroup, Slot: Slot11 } = (0, import_components181.createSlotFill)("ToolsMoreMenuGroup");
  ToolsMoreMenuGroup.Slot = ({ fillProps }) => /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(Slot11, { fillProps });
  var tools_more_menu_group_default = ToolsMoreMenuGroup;

  // packages/editor/build-module/components/more-menu/view-more-menu-group.mjs
  var import_components182 = __toESM(require_components(), 1);
  var import_element151 = __toESM(require_element(), 1);
  var import_jsx_runtime318 = __toESM(require_jsx_runtime(), 1);
  var { Fill: ViewMoreMenuGroup, Slot: Slot12 } = (0, import_components182.createSlotFill)(
    import_element151.Platform.OS === "web" ? /* @__PURE__ */ Symbol("ViewMoreMenuGroup") : "ViewMoreMenuGroup"
  );
  ViewMoreMenuGroup.Slot = ({ fillProps }) => /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(Slot12, { fillProps });
  var view_more_menu_group_default = ViewMoreMenuGroup;

  // packages/editor/build-module/components/more-menu/index.mjs
  var import_jsx_runtime319 = __toESM(require_jsx_runtime(), 1);
  function MoreMenu({ disabled = false }) {
    const { openModal: openModal2 } = (0, import_data186.useDispatch)(store2);
    const { set: setPreference } = (0, import_data186.useDispatch)(import_preferences16.store);
    const { toggleDistractionFree: toggleDistractionFree2 } = (0, import_data186.useDispatch)(store);
    const showIconLabels = (0, import_data186.useSelect)(
      (select6) => select6(import_preferences16.store).get("core", "showIconLabels"),
      []
    );
    const turnOffDistractionFree = () => {
      setPreference("core", "distractionFree", false);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(import_jsx_runtime319.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
      import_components183.DropdownMenu,
      {
        icon: more_vertical_default,
        label: (0, import_i18n203.__)("Options"),
        popoverProps: {
          placement: "bottom-end",
          className: "more-menu-dropdown__content"
        },
        toggleProps: {
          showTooltip: !showIconLabels,
          ...showIconLabels && { variant: "tertiary" },
          tooltipPosition: "bottom",
          size: "compact",
          disabled
        },
        children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)(import_jsx_runtime319.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)(import_components183.MenuGroup, { label: (0, import_i18n203._x)("View", "noun"), children: [
            /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
              import_preferences16.PreferenceToggleMenuItem,
              {
                scope: "core",
                name: "fixedToolbar",
                onToggle: turnOffDistractionFree,
                label: (0, import_i18n203.__)("Top toolbar"),
                info: (0, import_i18n203.__)(
                  "Access all block and document tools in a single place"
                ),
                messageActivated: (0, import_i18n203.__)(
                  "Top toolbar activated."
                ),
                messageDeactivated: (0, import_i18n203.__)(
                  "Top toolbar deactivated."
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
              import_preferences16.PreferenceToggleMenuItem,
              {
                scope: "core",
                name: "distractionFree",
                label: (0, import_i18n203.__)("Distraction free"),
                info: (0, import_i18n203.__)("Write with calmness"),
                handleToggling: false,
                onToggle: () => toggleDistractionFree2({
                  createNotice: false
                }),
                messageActivated: (0, import_i18n203.__)(
                  "Distraction free mode activated."
                ),
                messageDeactivated: (0, import_i18n203.__)(
                  "Distraction free mode deactivated."
                ),
                shortcut: import_keycodes13.displayShortcut.primaryShift(
                  "\\"
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
              import_preferences16.PreferenceToggleMenuItem,
              {
                scope: "core",
                name: "focusMode",
                label: (0, import_i18n203.__)("Spotlight mode"),
                info: (0, import_i18n203.__)("Focus on one block at a time"),
                messageActivated: (0, import_i18n203.__)(
                  "Spotlight mode activated."
                ),
                messageDeactivated: (0, import_i18n203.__)(
                  "Spotlight mode deactivated."
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(view_more_menu_group_default.Slot, { fillProps: { onClose } })
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(mode_switcher_default, {}),
          /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
            action_item_default.Slot,
            {
              name: "core/plugin-more-menu",
              label: (0, import_i18n203.__)("Panels"),
              fillProps: { onClick: onClose }
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)(import_components183.MenuGroup, { label: (0, import_i18n203.__)("Tools"), children: [
            /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
              import_components183.MenuItem,
              {
                onClick: () => openModal2("editor/keyboard-shortcut-help"),
                shortcut: import_keycodes13.displayShortcut.access("h"),
                children: (0, import_i18n203.__)("Keyboard shortcuts")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(CopyContentMenuItem, {}),
            /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)(
              import_components183.MenuItem,
              {
                icon: external_default,
                href: (0, import_i18n203.__)(
                  "https://wordpress.org/documentation/article/wordpress-block-editor/"
                ),
                target: "_blank",
                rel: "noopener noreferrer",
                children: [
                  (0, import_i18n203.__)("Help"),
                  /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(import_components183.VisuallyHidden, {
                    as: "span",
                    /* translators: accessibility text */
                    children: (0, import_i18n203.__)("(opens in a new tab)")
                  })
                ]
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
              tools_more_menu_group_default.Slot,
              {
                fillProps: { onClose }
              }
            )
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(import_components183.MenuGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
            import_components183.MenuItem,
            {
              onClick: () => openModal2("editor/preferences"),
              children: (0, import_i18n203.__)("Preferences")
            }
          ) })
        ] })
      }
    ) });
  }

  // packages/editor/build-module/components/post-publish-button/post-publish-button-or-toggle.mjs
  var import_compose47 = __toESM(require_compose(), 1);
  var import_data187 = __toESM(require_data(), 1);
  var import_jsx_runtime320 = __toESM(require_jsx_runtime(), 1);
  var IS_TOGGLE = "toggle";
  var IS_BUTTON = "button";
  function PostPublishButtonOrToggle({
    forceIsDirty,
    setEntitiesSavedStatesCallback
  }) {
    let component;
    const isSmallerThanMediumViewport = (0, import_compose47.useViewportMatch)("medium", "<");
    const { togglePublishSidebar: togglePublishSidebar2 } = (0, import_data187.useDispatch)(store);
    const {
      hasPublishAction,
      isBeingScheduled,
      isPending,
      isPublished,
      isPublishSidebarEnabled: isPublishSidebarEnabled2,
      isPublishSidebarOpened: isPublishSidebarOpened2,
      isScheduled,
      postStatus,
      postStatusHasChanged,
      postType: postType2
    } = (0, import_data187.useSelect)((select6) => {
      return {
        hasPublishAction: !!select6(store).getCurrentPost()?._links?.["wp:action-publish"],
        isBeingScheduled: select6(store).isEditedPostBeingScheduled(),
        isPending: select6(store).isCurrentPostPending(),
        isPublished: select6(store).isCurrentPostPublished(),
        isPublishSidebarEnabled: select6(store).isPublishSidebarEnabled(),
        isPublishSidebarOpened: select6(store).isPublishSidebarOpened(),
        isScheduled: select6(store).isCurrentPostScheduled(),
        postStatus: select6(store).getEditedPostAttribute("status"),
        postStatusHasChanged: select6(store).getPostEdits()?.status,
        postType: select6(store).getCurrentPostType()
      };
    }, []);
    if (postType2 === ATTACHMENT_POST_TYPE) {
      component = IS_BUTTON;
    } else if (isPublished || postStatusHasChanged && !["future", "publish"].includes(postStatus) || isScheduled && isBeingScheduled || isPending && !hasPublishAction && !isSmallerThanMediumViewport) {
      component = IS_BUTTON;
    } else if (isSmallerThanMediumViewport || isPublishSidebarEnabled2) {
      component = IS_TOGGLE;
    } else {
      component = IS_BUTTON;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
      post_publish_button_default,
      {
        forceIsDirty,
        isOpen: isPublishSidebarOpened2,
        isToggle: component === IS_TOGGLE,
        onToggle: togglePublishSidebar2,
        setEntitiesSavedStatesCallback
      }
    );
  }

  // packages/editor/build-module/components/post-view-link/index.mjs
  var import_i18n204 = __toESM(require_i18n(), 1);
  var import_components184 = __toESM(require_components(), 1);
  var import_core_data108 = __toESM(require_core_data(), 1);
  var import_data188 = __toESM(require_data(), 1);
  var import_preferences17 = __toESM(require_preferences(), 1);
  var import_jsx_runtime321 = __toESM(require_jsx_runtime(), 1);
  function PostViewLink() {
    const { hasLoaded, permalink, isPublished, label, showIconLabels } = (0, import_data188.useSelect)((select6) => {
      const postTypeSlug = select6(store).getCurrentPostType();
      const postType2 = select6(import_core_data108.store).getPostType(postTypeSlug);
      const { get } = select6(import_preferences17.store);
      return {
        permalink: select6(store).getPermalink(),
        isPublished: select6(store).isCurrentPostPublished(),
        label: postType2?.labels.view_item,
        hasLoaded: !!postType2,
        showIconLabels: get("core", "showIconLabels")
      };
    }, []);
    if (!isPublished || !permalink || !hasLoaded) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(
      import_components184.Button,
      {
        icon: external_default,
        label: label || (0, import_i18n204.__)("View post"),
        href: permalink,
        target: "_blank",
        showTooltip: !showIconLabels,
        size: "compact"
      }
    );
  }

  // packages/editor/build-module/components/preview-dropdown/index.mjs
  var import_compose48 = __toESM(require_compose(), 1);
  var import_components185 = __toESM(require_components(), 1);
  var import_i18n205 = __toESM(require_i18n(), 1);
  var import_data189 = __toESM(require_data(), 1);
  var import_core_data109 = __toESM(require_core_data(), 1);
  var import_preferences18 = __toESM(require_preferences(), 1);
  var import_block_editor69 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime322 = __toESM(require_jsx_runtime(), 1);
  function PreviewDropdown({ forceIsAutosaveable, disabled }) {
    const {
      deviceType: deviceType2,
      homeUrl,
      isTemplate: isTemplate2,
      isViewable,
      showIconLabels,
      isTemplateHidden,
      templateId: templateId2
    } = (0, import_data189.useSelect)((select6) => {
      const {
        getDeviceType: getDeviceType2,
        getCurrentPostType: getCurrentPostType2,
        getCurrentTemplateId: getCurrentTemplateId2,
        getRenderingMode: getRenderingMode2
      } = select6(store);
      const { getEntityRecord, getPostType } = select6(import_core_data109.store);
      const { get } = select6(import_preferences18.store);
      const _currentPostType = getCurrentPostType2();
      return {
        deviceType: getDeviceType2(),
        homeUrl: getEntityRecord("root", "__unstableBase")?.home,
        isTemplate: _currentPostType === "wp_template",
        isViewable: getPostType(_currentPostType)?.viewable ?? false,
        showIconLabels: get("core", "showIconLabels"),
        isTemplateHidden: getRenderingMode2() === "post-only",
        templateId: getCurrentTemplateId2()
      };
    }, []);
    const { setDeviceType: setDeviceType2, setRenderingMode: setRenderingMode2, setDefaultRenderingMode: setDefaultRenderingMode2 } = unlock(
      (0, import_data189.useDispatch)(store)
    );
    const { resetZoomLevel } = unlock((0, import_data189.useDispatch)(import_block_editor69.store));
    const handleDevicePreviewChange = (newDeviceType) => {
      setDeviceType2(newDeviceType);
      resetZoomLevel();
    };
    const isMobile = (0, import_compose48.useViewportMatch)("medium", "<");
    if (isMobile) {
      return null;
    }
    const popoverProps = {
      placement: "bottom-end"
    };
    const toggleProps = {
      className: "editor-preview-dropdown__toggle",
      iconPosition: "right",
      size: "compact",
      showTooltip: !showIconLabels,
      disabled,
      accessibleWhenDisabled: disabled
    };
    const menuProps = {
      "aria-label": (0, import_i18n205.__)("View options")
    };
    const deviceIcons = {
      desktop: desktop_default,
      mobile: mobile_default,
      tablet: tablet_default
    };
    const choices = [
      {
        value: "Desktop",
        label: (0, import_i18n205.__)("Desktop"),
        icon: desktop_default
      },
      {
        value: "Tablet",
        label: (0, import_i18n205.__)("Tablet"),
        icon: tablet_default
      },
      {
        value: "Mobile",
        label: (0, import_i18n205.__)("Mobile"),
        icon: mobile_default
      }
    ];
    return /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
      import_components185.DropdownMenu,
      {
        className: clsx_default(
          "editor-preview-dropdown",
          `editor-preview-dropdown--${deviceType2.toLowerCase()}`
        ),
        popoverProps,
        toggleProps,
        menuProps,
        icon: deviceIcons[deviceType2.toLowerCase()],
        label: (0, import_i18n205.__)("View"),
        disableOpenOnArrowDown: disabled,
        children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)(import_jsx_runtime322.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(import_components185.MenuGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
            import_components185.MenuItemsChoice,
            {
              choices,
              value: deviceType2,
              onSelect: handleDevicePreviewChange
            }
          ) }),
          isTemplate2 && /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(import_components185.MenuGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)(
            import_components185.MenuItem,
            {
              href: homeUrl,
              target: "_blank",
              icon: external_default,
              onClick: onClose,
              children: [
                (0, import_i18n205.__)("View site"),
                /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(import_components185.VisuallyHidden, {
                  as: "span",
                  /* translators: accessibility text */
                  children: (0, import_i18n205.__)("(opens in a new tab)")
                })
              ]
            }
          ) }),
          !isTemplate2 && !!templateId2 && /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(import_components185.MenuGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
            import_components185.MenuItem,
            {
              icon: !isTemplateHidden ? check_default : void 0,
              isSelected: !isTemplateHidden,
              role: "menuitemcheckbox",
              onClick: () => {
                const newRenderingMode = isTemplateHidden ? "template-locked" : "post-only";
                setRenderingMode2(newRenderingMode);
                setDefaultRenderingMode2(newRenderingMode);
                resetZoomLevel();
              },
              children: (0, import_i18n205.__)("Show template")
            }
          ) }),
          isViewable && /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(import_components185.MenuGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
            PostPreviewButton,
            {
              className: "editor-preview-dropdown__button-external",
              role: "menuitem",
              forceIsAutosaveable,
              "aria-label": (0, import_i18n205.__)("Preview in new tab"),
              textContent: /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)(import_jsx_runtime322.Fragment, { children: [
                (0, import_i18n205.__)("Preview in new tab"),
                /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(import_components185.Icon, { icon: external_default })
              ] }),
              onPreview: onClose
            }
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
            action_item_default.Slot,
            {
              name: "core/plugin-preview-menu",
              fillProps: { onClick: onClose }
            }
          )
        ] })
      }
    );
  }

  // packages/editor/build-module/components/zoom-out-toggle/index.mjs
  var import_components186 = __toESM(require_components(), 1);
  var import_i18n206 = __toESM(require_i18n(), 1);
  var import_element152 = __toESM(require_element(), 1);
  var import_data190 = __toESM(require_data(), 1);
  var import_block_editor70 = __toESM(require_block_editor(), 1);
  var import_preferences19 = __toESM(require_preferences(), 1);
  var import_keyboard_shortcuts7 = __toESM(require_keyboard_shortcuts(), 1);
  var import_keycodes14 = __toESM(require_keycodes(), 1);
  var import_jsx_runtime323 = __toESM(require_jsx_runtime(), 1);
  var ZoomOutToggle = ({ disabled }) => {
    const { isZoomOut, showIconLabels, isDistractionFree } = (0, import_data190.useSelect)(
      (select6) => ({
        isZoomOut: unlock(select6(import_block_editor70.store)).isZoomOut(),
        showIconLabels: select6(import_preferences19.store).get(
          "core",
          "showIconLabels"
        ),
        isDistractionFree: select6(import_preferences19.store).get(
          "core",
          "distractionFree"
        )
      })
    );
    const { resetZoomLevel, setZoomLevel } = unlock(
      (0, import_data190.useDispatch)(import_block_editor70.store)
    );
    const { registerShortcut, unregisterShortcut } = (0, import_data190.useDispatch)(
      import_keyboard_shortcuts7.store
    );
    (0, import_element152.useEffect)(() => {
      registerShortcut({
        name: "core/editor/zoom",
        category: "global",
        description: (0, import_i18n206.__)("Enter or exit zoom out."),
        keyCombination: {
          // `primaryShift+0` (`ctrl+shift+0`) is the shortcut for switching
          // to input mode in Windows, so apply a different key combination.
          modifier: (0, import_keycodes14.isAppleOS)() ? "primaryShift" : "secondary",
          character: "0"
        }
      });
      return () => {
        unregisterShortcut("core/editor/zoom");
      };
    }, [registerShortcut, unregisterShortcut]);
    (0, import_keyboard_shortcuts7.useShortcut)(
      "core/editor/zoom",
      () => {
        if (isZoomOut) {
          resetZoomLevel();
        } else {
          setZoomLevel("auto-scaled");
        }
      },
      {
        isDisabled: isDistractionFree
      }
    );
    const handleZoomOut = () => {
      if (isZoomOut) {
        resetZoomLevel();
      } else {
        setZoomLevel("auto-scaled");
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
      import_components186.Button,
      {
        accessibleWhenDisabled: true,
        disabled,
        onClick: handleZoomOut,
        icon: square_default,
        label: (0, import_i18n206.__)("Zoom Out"),
        isPressed: isZoomOut,
        size: "compact",
        showTooltip: !showIconLabels,
        className: "editor-zoom-out-toggle"
      }
    );
  };
  var zoom_out_toggle_default = ZoomOutToggle;

  // packages/editor/build-module/components/collaborators-presence/index.mjs
  var import_components189 = __toESM(require_components(), 1);
  var import_element160 = __toESM(require_element(), 1);
  var import_core_data113 = __toESM(require_core_data(), 1);
  var import_i18n211 = __toESM(require_i18n(), 1);

  // packages/editor/build-module/components/collaborators-presence/avatar/component.mjs
  var import_components187 = __toESM(require_components(), 1);
  var import_element154 = __toESM(require_element(), 1);

  // packages/editor/build-module/components/collaborators-presence/avatar/use-image-loading-status.mjs
  var import_element153 = __toESM(require_element(), 1);
  function useImageLoadingStatus(src) {
    const [prevSrc, setPrevSrc] = (0, import_element153.useState)(src);
    const [status, setStatus] = (0, import_element153.useState)(
      src ? "loading" : "idle"
    );
    if (prevSrc !== src) {
      setPrevSrc(src);
      setStatus(src ? "loading" : "idle");
    }
    const handleLoad = (0, import_element153.useCallback)(() => setStatus("loaded"), []);
    const handleError = (0, import_element153.useCallback)(() => setStatus("error"), []);
    return { status, handleLoad, handleError };
  }

  // packages/editor/build-module/components/collaborators-presence/avatar/component.mjs
  var import_jsx_runtime324 = __toESM(require_jsx_runtime(), 1);
  k([a11y_default]);
  var GRAY_900 = "#1e1e1e";
  var WHITE = "#fff";
  function Avatar({
    className,
    src,
    name: name2,
    label,
    variant,
    size: size3 = "default",
    borderColor,
    dimmed = false,
    statusIndicator,
    style,
    ...props
  }) {
    const {
      status: imageStatus,
      handleLoad,
      handleError
    } = useImageLoadingStatus(src);
    const imageLoaded = imageStatus === "loaded";
    const showBadge = variant === "badge" && !!name2;
    const initials = name2 ? name2.split(/\s+/).slice(0, 2).map((word) => word[0]).join("").toUpperCase() : void 0;
    const nameColor = (0, import_element154.useMemo)(
      () => borderColor && w2(borderColor).isReadable(GRAY_900, {
        level: "AA",
        size: "normal"
      }) ? GRAY_900 : WHITE,
      [borderColor]
    );
    const customProperties = {
      ...style,
      ...borderColor ? {
        "--editor-avatar-outline-color": borderColor,
        "--editor-avatar-name-color": nameColor
      } : {}
    };
    const avatar = /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)(
      "div",
      {
        className: clsx_default("editor-avatar", className, {
          "has-avatar-border-color": !!borderColor,
          "has-src": imageLoaded,
          "is-badge": showBadge,
          "is-small": size3 === "small",
          "is-dimmed": dimmed
        }),
        style: customProperties,
        role: name2 ? "img" : void 0,
        "aria-label": name2 || void 0,
        ...props,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)("span", { className: "editor-avatar__image", children: [
            src && /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
              "img",
              {
                src,
                alt: "",
                crossOrigin: "anonymous",
                className: "editor-avatar__img",
                onLoad: handleLoad,
                onError: handleError
              }
            ),
            !imageLoaded && initials
          ] }),
          dimmed && !!statusIndicator && /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("span", { className: "editor-avatar__status-indicator", children: /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(import_components187.Icon, { icon: statusIndicator }) }),
          showBadge && /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("span", { className: "editor-avatar__name", children: label || name2 })
        ]
      }
    );
    if (name2 && (!showBadge || label)) {
      return /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(import_components187.Tooltip, { text: name2, children: avatar });
    }
    return avatar;
  }
  var component_default = Avatar;

  // packages/editor/build-module/components/collaborators-presence/avatar-group/component.mjs
  var import_element155 = __toESM(require_element(), 1);
  var import_i18n207 = __toESM(require_i18n(), 1);
  var import_jsx_runtime325 = __toESM(require_jsx_runtime(), 1);
  function AvatarGroup({
    className,
    max: max2 = 3,
    children,
    ...props
  }) {
    const childArray = import_element155.Children.toArray(children);
    const visible = childArray.slice(0, max2);
    const overflowCount = childArray.length - max2;
    return /* @__PURE__ */ (0, import_jsx_runtime325.jsxs)(
      "div",
      {
        role: "group",
        className: clsx_default("editor-avatar-group", className),
        ...props,
        children: [
          visible,
          overflowCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
            "span",
            {
              className: "editor-avatar-group__overflow",
              "aria-label": (0, import_i18n207.sprintf)(
                /* translators: %d: number of additional collaborators not shown */
                (0, import_i18n207._n)(
                  "%d more collaborator",
                  "%d more collaborators",
                  overflowCount
                ),
                overflowCount
              ),
              children: `+${overflowCount}`
            }
          )
        ]
      }
    );
  }
  var component_default2 = AvatarGroup;

  // packages/editor/build-module/components/collaborators-presence/list.mjs
  var import_i18n209 = __toESM(require_i18n(), 1);
  var import_components188 = __toESM(require_components(), 1);
  var import_a11y7 = __toESM(require_a11y(), 1);

  // packages/editor/build-module/components/collaborators-overlay/get-avatar-url.mjs
  function getAvatarUrl(avatarUrls) {
    return avatarUrls?.["48"] || avatarUrls?.["96"] || avatarUrls?.["24"];
  }

  // packages/editor/build-module/components/collab-sidebar/utils.mjs
  var import_i18n208 = __toESM(require_i18n(), 1);
  function sanitizeCommentString(str) {
    return str.trim();
  }
  function noop7() {
  }
  var AVATAR_BORDER_COLORS = [
    "#C36EFF",
    // Purple
    "#FF51A8",
    // Pink
    "#E4780A",
    // Orange
    "#FF35EE",
    // Magenta
    "#879F11",
    // Olive
    "#46A494",
    // Teal
    "#00A2C3"
    // Cyan
  ];
  function getAvatarBorderColor(userId) {
    return AVATAR_BORDER_COLORS[userId % AVATAR_BORDER_COLORS.length];
  }
  function getCommentExcerpt(text, excerptLength = 10) {
    if (!text) {
      return "";
    }
    const wordCountType = (0, import_i18n208._x)("words", "Word count type. Do not translate!");
    const rawText = text.trim();
    let trimmedExcerpt = "";
    if (wordCountType === "words") {
      trimmedExcerpt = rawText.split(" ", excerptLength).join(" ");
    } else if (wordCountType === "characters_excluding_spaces") {
      const textWithSpaces = rawText.split("", excerptLength).join("");
      const numberOfSpaces = textWithSpaces.length - textWithSpaces.replaceAll(" ", "").length;
      trimmedExcerpt = rawText.split("", excerptLength + numberOfSpaces).join("");
    } else if (wordCountType === "characters_including_spaces") {
      trimmedExcerpt = rawText.split("", excerptLength).join("");
    }
    const isTrimmed = trimmedExcerpt !== rawText;
    return isTrimmed ? trimmedExcerpt + "\u2026" : trimmedExcerpt;
  }
  function focusCommentThread(commentId, container, additionalSelector) {
    if (!container) {
      return;
    }
    const threadSelector = commentId && commentId !== "new" ? `[role=treeitem][id="comment-thread-${commentId}"]` : "[role=treeitem]:not([id])";
    const selector = additionalSelector ? `${threadSelector} ${additionalSelector}` : threadSelector;
    return new Promise((resolve) => {
      if (container.querySelector(selector)) {
        return resolve(container.querySelector(selector));
      }
      let timer = null;
      const observer = new window.MutationObserver(() => {
        if (container.querySelector(selector)) {
          clearTimeout(timer);
          observer.disconnect();
          resolve(container.querySelector(selector));
        }
      });
      observer.observe(container, {
        childList: true,
        subtree: true
      });
      timer = setTimeout(() => {
        observer.disconnect();
        resolve(null);
      }, 3e3);
    }).then((element) => element?.focus());
  }

  // packages/editor/build-module/components/collaborators-presence/list.mjs
  var import_jsx_runtime326 = __toESM(require_jsx_runtime(), 1);
  if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='9537a5e604']")) {
    const style = document.createElement("style");
    style.setAttribute("data-wp-hash", "9537a5e604");
    style.appendChild(document.createTextNode(".editor-collaborators-presence__list.components-popover .components-popover__content{background:#fff;border:1px solid #ddd;border-radius:8px;border-width:1px 0 0 1px;box-shadow:0 1px 2px #0000000d,0 2px 3px #0000000a,0 6px 6px #00000008,0 8px 8px #00000005}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-content{min-width:280px}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-header{align-items:center;display:flex;justify-content:space-between;padding:8px 16px}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-header-title{display:flex;font-size:13px;font-weight:499;gap:4px;line-height:20px}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-header-title span{color:#757575}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-header-action{padding:0}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-header-action button{color:#1e1e1e;height:32px;padding:0;width:32px}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-items{display:flex;flex-direction:column;padding-bottom:16px}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item{all:unset;align-items:center;box-sizing:border-box;cursor:pointer;display:flex;gap:8px;padding:12px 16px;transition:background-color .2s ease;width:100%}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item:hover:not(:disabled){background-color:rgba(var(--wp-admin-theme-color--rgb),.04)}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item:active:not(:disabled){background-color:rgba(var(--wp-admin-theme-color--rgb),.08)}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item:focus-visible{outline:2px solid var(--wp-admin-theme-color,#3858e9);outline-offset:-2px}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item:disabled{cursor:default}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item-info{display:flex;flex:1;flex-direction:column;min-width:0}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item-name{color:#1e1e1e;font-size:13px;font-weight:499;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"));
    document.head.appendChild(style);
  }
  function CollaboratorsList({
    activeCollaborators,
    popoverAnchor,
    setIsPopoverVisible,
    cursorRegistry
  }) {
    const handleCollaboratorClick = (clientId) => {
      const success = cursorRegistry.scrollToCursor(clientId, {
        behavior: "smooth",
        block: "center",
        highlightDuration: 2e3
      });
      if (success) {
        (0, import_a11y7.speak)((0, import_i18n209.__)("Scrolled to cursor"), "polite");
        setIsPopoverVisible(false);
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
      import_components188.Popover,
      {
        anchor: popoverAnchor,
        placement: "bottom",
        offset: 8,
        className: "editor-collaborators-presence__list",
        onClose: () => setIsPopoverVisible(false),
        children: /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)("div", { className: "editor-collaborators-presence__list-content", children: [
          /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)("div", { className: "editor-collaborators-presence__list-header", children: [
            /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)("div", { className: "editor-collaborators-presence__list-header-title", children: [
              (0, import_i18n209.__)("Collaborators"),
              /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("span", { children: activeCollaborators.length })
            ] }),
            /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("div", { className: "editor-collaborators-presence__list-header-action", children: /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
              import_components188.Button,
              {
                __next40pxDefaultSize: true,
                icon: close_small_default,
                iconSize: 24,
                label: (0, import_i18n209.__)("Close Collaborators List"),
                onClick: () => setIsPopoverVisible(false)
              }
            ) })
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("div", { className: "editor-collaborators-presence__list-items", children: activeCollaborators.map((collaboratorState) => {
            const isCurrentUser = collaboratorState.isMe;
            return /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)(
              "button",
              {
                className: "editor-collaborators-presence__list-item",
                disabled: isCurrentUser,
                onClick: () => handleCollaboratorClick(
                  collaboratorState.clientId
                ),
                children: [
                  /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
                    component_default,
                    {
                      src: getAvatarUrl(
                        collaboratorState.collaboratorInfo.avatar_urls
                      ),
                      name: collaboratorState.collaboratorInfo.name,
                      borderColor: isCurrentUser ? "var(--wp-admin-theme-color)" : getAvatarBorderColor(
                        collaboratorState.collaboratorInfo.id
                      ),
                      dimmed: !collaboratorState.isConnected
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("div", { className: "editor-collaborators-presence__list-item-info", children: /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("div", { className: "editor-collaborators-presence__list-item-name", children: isCurrentUser ? (0, import_i18n209.__)("You") : collaboratorState.collaboratorInfo.name }) })
                ]
              },
              collaboratorState.clientId
            );
          }) })
        ] })
      }
    );
  }

  // packages/editor/build-module/components/collaborators-overlay/cursor-registry.mjs
  function highlightCursor(element, duration) {
    element.classList.add("collaborators-overlay-cursor-highlighted");
    setTimeout(() => {
      element.classList.remove("collaborators-overlay-cursor-highlighted");
    }, duration);
  }
  function createCursorRegistry() {
    const cursorMap = /* @__PURE__ */ new Map();
    return {
      /**
       * Register a cursor element when it's created.
       *
       * @param clientId - The clientId of the cursor to register.
       * @param element  - The cursor element to register.
       */
      registerCursor(clientId, element) {
        cursorMap.set(clientId, element);
      },
      /**
       * Unregister a cursor element when it's removed.
       *
       * @param clientId - The clientId of the cursor to unregister.
       */
      unregisterCursor(clientId) {
        cursorMap.delete(clientId);
      },
      /**
       * Scroll to a cursor by clientId.
       *
       * @param clientId - The clientId of the cursor to scroll to.
       * @param options  - The options for the scroll.
       * @return true if cursor was found and scrolled to, false otherwise.
       */
      scrollToCursor(clientId, options) {
        const cursorElement = cursorMap.get(clientId);
        if (!cursorElement) {
          return false;
        }
        cursorElement.scrollIntoView({
          behavior: options?.behavior ?? "smooth",
          block: options?.block ?? "center",
          inline: options?.inline ?? "nearest"
        });
        if (options?.highlightDuration) {
          highlightCursor(cursorElement, options.highlightDuration);
        }
        return true;
      },
      /**
       * Clear the registry.
       */
      removeAll() {
        cursorMap.clear();
      }
    };
  }

  // packages/editor/build-module/components/collaborators-overlay/index.mjs
  var import_block_editor71 = __toESM(require_block_editor(), 1);

  // packages/editor/build-module/components/collaborators-overlay/overlay.mjs
  var import_compose49 = __toESM(require_compose(), 1);
  var import_element159 = __toESM(require_element(), 1);
  var import_i18n210 = __toESM(require_i18n(), 1);

  // packages/editor/build-module/components/collaborators-overlay/collaborator-styles.mjs
  var ELEVATION_X_SMALL = "0 1px 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 3px rgba(0, 0, 0, 0.02), 0 4px 4px rgba(0, 0, 0, 0.01)";
  var RADIUS_FULL = "9999px";
  var BUTTON_SIZE_COMPACT = "32px";
  var BUTTON_SIZE_SMALL = "24px";
  var GRID_UNIT_05 = "4px";
  var GRID_UNIT_10 = "8px";
  var BORDER_WIDTH = "1px";
  var BORDER_WIDTH_FOCUS_FALLBACK = "2px";
  var WHITE2 = "#fff";
  var FONT_SIZE_X_SMALL = "11px";
  var FONT_SIZE_MEDIUM = "13px";
  var FONT_WEIGHT_MEDIUM = "499";
  var FONT_LINE_HEIGHT_SMALL = "20px";

  // packages/editor/build-module/components/collaborators-overlay/avatar-iframe-styles.mjs
  var AVATAR_IFRAME_STYLES = `
.editor-avatar {
	position: relative;
	display: inline-flex;
	align-items: center;
	border-radius: ${RADIUS_FULL};
	flex-shrink: 0;
	box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 2px) ${WHITE2}, ${ELEVATION_X_SMALL};
}
.editor-avatar__image {
	box-sizing: border-box;
	position: relative;
	width: ${BUTTON_SIZE_COMPACT};
	height: ${BUTTON_SIZE_COMPACT};
	border-radius: ${RADIUS_FULL};
	border: 0;
	background-color: var(--wp-admin-theme-color, #3858e9);
	overflow: hidden;
	overflow: clip;
	flex-shrink: 0;
	font-size: 0;
	color: ${WHITE2};
}
.is-small > .editor-avatar__image {
	width: ${BUTTON_SIZE_SMALL};
	height: ${BUTTON_SIZE_SMALL};
}
.has-avatar-border-color > .editor-avatar__image {
	border: var(--wp-admin-border-width-focus, 2px) solid var(--editor-avatar-outline-color);
	background-clip: padding-box;
}
.has-avatar-border-color > .editor-avatar__image::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus, 2px) ${WHITE2};
	pointer-events: none;
	z-index: 1;
}
.editor-avatar__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: inherit;
	opacity: 0;
}
.has-src > .editor-avatar__image > .editor-avatar__img {
	opacity: 1;
}
.editor-avatar:not(.has-src) > .editor-avatar__image {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: ${FONT_SIZE_X_SMALL};
	font-weight: ${FONT_WEIGHT_MEDIUM};
	border: 0;
	background-clip: border-box;
}
.editor-avatar:not(.has-src) > .editor-avatar__image::after {
	content: none;
}
.editor-avatar:not(.has-src).has-avatar-border-color > .editor-avatar__image {
	background-color: var(--editor-avatar-outline-color);
}
.editor-avatar__name {
	font-size: ${FONT_SIZE_MEDIUM};
	font-weight: ${FONT_WEIGHT_MEDIUM};
	line-height: ${FONT_LINE_HEIGHT_SMALL};
	color: var(--editor-avatar-name-color, ${WHITE2});
	min-width: 0;
	padding-bottom: 2px; /* $grid-unit-05 / 2 */
	overflow: hidden;
	opacity: 0;
	white-space: nowrap;
	transition: opacity 0.15s cubic-bezier(0.15, 0, 0.15, 1);
}
.editor-avatar.is-badge {
	display: inline-grid;
	grid-template-columns: min-content 0fr;
	column-gap: 0;
	padding-inline-end: 0;
	background-color: var(--wp-admin-theme-color, #3858e9);
	transition:
		grid-template-columns 0.3s cubic-bezier(0.15, 0, 0.15, 1),
		column-gap 0.3s cubic-bezier(0.15, 0, 0.15, 1),
		padding-inline-end 0.3s cubic-bezier(0.15, 0, 0.15, 1);
}
.editor-avatar.is-badge:hover {
	grid-template-columns: min-content 1fr;
	column-gap: ${GRID_UNIT_05};
	padding-inline-end: ${GRID_UNIT_10};
	transition-timing-function: cubic-bezier(0.85, 0, 0.85, 1);
}
.editor-avatar.is-badge:hover .editor-avatar__name {
	opacity: 1;
	transition-timing-function: cubic-bezier(0.85, 0, 0.85, 1);
}
.editor-avatar.is-badge.has-avatar-border-color {
	background-color: var(--editor-avatar-outline-color);
}
@media (prefers-reduced-motion: reduce) {
	.editor-avatar.is-badge,
	.editor-avatar__name {
		transition: none;
	}
}
`;

  // packages/editor/build-module/components/collaborators-overlay/overlay-iframe-styles.mjs
  var OVERLAY_IFRAME_STYLES = `
.block-canvas-cover {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 20000;
}
.block-canvas-cover .collaborators-overlay-full {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}
.block-canvas-cover .collaborators-overlay-fixed {
	position: fixed;
	width: 100%;
	height: 100%;
}
.collaborators-overlay-user {
	position: absolute;
}
/* Cursor lines render below avatar labels across all users. The parent
   .collaborators-overlay-user has no z-index so it does not create a
   stacking context \u2014 children participate in the shared overlay context. */
.collaborators-overlay-user-cursor {
	position: absolute;
	z-index: 0;
	width: ${BORDER_WIDTH_FOCUS_FALLBACK};
	border-radius: ${BORDER_WIDTH};
	outline: ${BORDER_WIDTH} solid ${WHITE2};
	box-shadow: ${ELEVATION_X_SMALL};
	animation: collaborators-overlay-cursor-blink 1s infinite;
}
.collaborators-overlay-selection-rect {
	position: absolute;
	opacity: 0.15;
	pointer-events: none;
	border-radius: 2px;
}

/* Overlay-specific positioning applied to the Avatar cursor label. */
.collaborators-overlay-user-label.editor-avatar {
	position: absolute;
	z-index: 1;
	transform: translate(-11px, -100%);
	margin-top: -${GRID_UNIT_05};
	pointer-events: auto;
	overflow: visible;
	width: max-content;
}
/* Avatar positioned above a highlighted block as a label. */
.collaborators-overlay-block-label.editor-avatar {
	position: absolute;
	z-index: 1;
	transform: translateY(calc(-100% - ${GRID_UNIT_10}));
	pointer-events: auto;
	overflow: visible;
	width: max-content;
}

@keyframes collaborators-overlay-cursor-blink {
	0%, 45% { opacity: 1; }
	55%, 95% { opacity: 0; }
	100% { opacity: 1; }
}
.collaborators-overlay-cursor-highlighted .collaborators-overlay-user-cursor {
	animation: collaborators-overlay-cursor-highlight 0.6s ease-in-out 3;
}
.collaborators-overlay-cursor-highlighted .collaborators-overlay-user-label {
	animation: collaborators-overlay-label-highlight 0.6s ease-in-out 3;
}
@keyframes collaborators-overlay-cursor-highlight {
	0%, 100% {
		transform: scale(1);
		filter: drop-shadow(0 0 0 transparent);
	}
	50% {
		transform: scale(1.2);
		filter: drop-shadow(0 0 8px currentColor);
	}
}
@keyframes collaborators-overlay-label-highlight {
	0%, 100% {
		transform: translate(-11px, -100%) scale(1);
		filter: drop-shadow(0 0 0 transparent);
	}
	50% {
		transform: translate(-11px, -100%) scale(1.1);
		filter: drop-shadow(0 0 6px currentColor);
	}
}
.block-editor-block-list__block.is-collaborator-selected:not(:focus)::after {
	content: "";
	position: absolute;
	pointer-events: none;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	outline-color: var(--collaborator-outline-color);
	outline-style: solid;
	outline-width: calc(var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
	outline-offset: calc(-1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
	box-shadow: inset 0 0 0 calc((var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1)) + 0.5px) rgba(${WHITE2}, 0.7);
	z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
	.collaborators-overlay-user-label,
	.collaborators-overlay-user-cursor {
		animation: none;
	}
}
`;

  // packages/editor/build-module/components/collaborators-overlay/timing-utils.mjs
  function setDelayedInterval(callback, delayMs) {
    let timerHandle = null;
    const runner = () => {
      try {
        callback();
      } catch (error) {
      }
      timerHandle = setTimeout(runner, delayMs);
    };
    timerHandle = setTimeout(runner, delayMs);
    return () => {
      if (timerHandle) {
        clearTimeout(timerHandle);
      }
    };
  }

  // packages/editor/build-module/components/collaborators-overlay/use-block-highlighting.mjs
  var import_core_data110 = __toESM(require_core_data(), 1);
  var import_element157 = __toESM(require_element(), 1);

  // packages/editor/build-module/components/collaborators-overlay/use-debounced-recompute.mjs
  var import_element156 = __toESM(require_element(), 1);
  function useDebouncedRecompute(delayMs) {
    const [recomputeToken, setRecomputeToken] = (0, import_element156.useState)(0);
    const timeoutRef = (0, import_element156.useRef)(null);
    const rerenderAfterDelay = (0, import_element156.useCallback)(() => {
      if (timeoutRef.current) {
        clearTimeout(timeoutRef.current);
      }
      timeoutRef.current = setTimeout(() => {
        setRecomputeToken((t4) => t4 + 1);
      }, delayMs);
      return () => {
        if (timeoutRef.current) {
          clearTimeout(timeoutRef.current);
        }
      };
    }, [delayMs]);
    return [recomputeToken, rerenderAfterDelay];
  }

  // packages/editor/build-module/components/collaborators-overlay/use-block-highlighting.mjs
  var { useActiveCollaborators, useResolvedSelection } = unlock(import_core_data110.privateApis);
  var { SelectionType } = unlock(import_core_data110.privateApis);
  function useBlockHighlighting(overlayElement, blockEditorDocument, postId2, postType2, delayMs) {
    const highlightedBlockIds = (0, import_element157.useRef)(/* @__PURE__ */ new Set());
    const userStates = useActiveCollaborators(
      postId2 ?? null,
      postType2 ?? null
    );
    const resolveSelection = useResolvedSelection(
      postId2 ?? null,
      postType2 ?? null
    );
    const [highlights, setHighlights] = (0, import_element157.useState)(
      []
    );
    const [recomputeToken, rerenderHighlightsAfterDelay] = useDebouncedRecompute(delayMs);
    (0, import_element157.useEffect)(() => {
      if (!blockEditorDocument) {
        setHighlights([]);
        return;
      }
      const currentHighlightedIds = highlightedBlockIds.current;
      const seen = /* @__PURE__ */ new Set();
      const blocksToHighlight = userStates.filter((userState) => {
        const isWholeBlockSelected = userState.editorState?.selection?.type === SelectionType.WholeBlock;
        return !userState.isMe && isWholeBlockSelected;
      }).map((userState) => {
        let localClientId;
        try {
          ({ localClientId } = resolveSelection(
            userState.editorState?.selection
          ));
        } catch {
          return null;
        }
        if (!localClientId) {
          return null;
        }
        return {
          blockId: localClientId,
          color: userState.isMe ? "var(--wp-admin-theme-color)" : getAvatarBorderColor(userState.collaboratorInfo.id),
          userName: userState.collaboratorInfo.name,
          avatarUrl: getAvatarUrl(
            userState.collaboratorInfo.avatar_urls
          )
        };
      }).filter((block) => {
        if (!block) {
          return false;
        }
        if (seen.has(block.blockId)) {
          return false;
        }
        seen.add(block.blockId);
        return true;
      });
      const selectedBlockIds = new Set(
        blocksToHighlight.map((block) => block.blockId)
      );
      for (const blockId of currentHighlightedIds) {
        if (!selectedBlockIds.has(blockId)) {
          const blockElement = getBlockElementById(
            blockEditorDocument,
            blockId
          );
          if (blockElement) {
            blockElement.classList.remove("is-collaborator-selected");
            blockElement.style.removeProperty(
              "--collaborator-outline-color"
            );
          }
          currentHighlightedIds.delete(blockId);
        }
      }
      const results = [];
      const overlayRect = overlayElement?.getBoundingClientRect() ?? null;
      blocksToHighlight.forEach((block) => {
        const { color, blockId, userName, avatarUrl } = block;
        const blockElement = getBlockElementById(
          blockEditorDocument,
          blockId
        );
        if (!blockElement) {
          return;
        }
        blockElement.classList.add("is-collaborator-selected");
        blockElement.style.setProperty(
          "--collaborator-outline-color",
          color
        );
        currentHighlightedIds.add(blockId);
        if (overlayRect) {
          const blockRect = blockElement.getBoundingClientRect();
          results.push({
            blockId,
            userName,
            avatarUrl,
            color,
            x: blockRect.left - overlayRect.left,
            y: blockRect.top - overlayRect.top
          });
        }
      });
      setHighlights(results);
      return () => {
        for (const blockId of currentHighlightedIds) {
          const el = getBlockElementById(blockEditorDocument, blockId);
          if (el) {
            el.classList.remove("is-collaborator-selected");
            el.style.removeProperty("--collaborator-outline-color");
          }
        }
        currentHighlightedIds.clear();
      };
    }, [
      userStates,
      blockEditorDocument,
      overlayElement,
      recomputeToken,
      resolveSelection
    ]);
    return { highlights, rerenderHighlightsAfterDelay };
  }
  var getBlockElementById = (blockEditorDocument, blockId) => {
    return blockEditorDocument.querySelector(`[data-block="${blockId}"]`);
  };

  // packages/editor/build-module/components/collaborators-overlay/use-render-cursors.mjs
  var import_core_data112 = __toESM(require_core_data(), 1);
  var import_data191 = __toESM(require_data(), 1);
  var import_element158 = __toESM(require_element(), 1);
  var import_preferences20 = __toESM(require_preferences(), 1);

  // packages/editor/build-module/components/collaborators-overlay/compute-selection.mjs
  var import_core_data111 = __toESM(require_core_data(), 1);

  // packages/editor/build-module/components/collaborators-overlay/cursor-dom-utils.mjs
  var MAX_NODE_OFFSET_COUNT = 500;
  var getCursorPosition = (absolutePositionIndex, blockElement, editorDocument, overlayRect) => {
    if (absolutePositionIndex === null || !blockElement) {
      return null;
    }
    return getOffsetPositionInBlock(
      blockElement,
      absolutePositionIndex,
      editorDocument,
      overlayRect
    ) ?? null;
  };
  var getOffsetPositionInBlock = (blockElement, charOffset, editorDocument, overlayRect) => {
    const { node, offset: offset3 } = findInnerBlockOffset(
      blockElement,
      charOffset,
      editorDocument
    );
    const cursorRange = editorDocument.createRange();
    try {
      cursorRange.setStart(node, offset3);
    } catch (error) {
      return null;
    }
    cursorRange.collapse(true);
    const cursorRect = cursorRange.getBoundingClientRect();
    const blockRect = blockElement.getBoundingClientRect();
    let cursorX = 0;
    let cursorY = 0;
    if (cursorRect.x === 0 && cursorRect.y === 0 && cursorRect.width === 0 && cursorRect.height === 0) {
      cursorX = blockRect.left - overlayRect.left;
      cursorY = blockRect.top - overlayRect.top;
    } else {
      cursorX = cursorRect.left - overlayRect.left;
      cursorY = cursorRect.top - overlayRect.top;
    }
    let cursorHeight = cursorRect.height;
    if (cursorHeight === 0) {
      const view = editorDocument.defaultView ?? window;
      cursorHeight = parseInt(view.getComputedStyle(blockElement).lineHeight, 10) || blockRect.height;
    }
    return {
      x: cursorX,
      y: cursorY,
      height: cursorHeight
    };
  };
  var getSelectionRects = (blockElement, startOffset, endOffset, editorDocument, overlayRect) => {
    let normalizedStart = startOffset;
    let normalizedEnd = endOffset;
    if (normalizedStart > normalizedEnd) {
      [normalizedStart, normalizedEnd] = [normalizedEnd, normalizedStart];
    }
    const startPos = findInnerBlockOffset(
      blockElement,
      normalizedStart,
      editorDocument
    );
    const endPos = findInnerBlockOffset(
      blockElement,
      normalizedEnd,
      editorDocument
    );
    const range = editorDocument.createRange();
    try {
      range.setStart(startPos.node, startPos.offset);
      range.setEnd(endPos.node, endPos.offset);
    } catch {
      return null;
    }
    const clientRects = range.getClientRects();
    const rects = [];
    for (const rect of clientRects) {
      if (rect.width === 0 && rect.height === 0) {
        continue;
      }
      const x2 = rect.left - overlayRect.left;
      const y3 = rect.top - overlayRect.top;
      const isDuplicate = rects.some(
        (r4) => r4.x === x2 && r4.y === y3 && r4.width === rect.width && r4.height === rect.height
      );
      if (isDuplicate) {
        continue;
      }
      rects.push({
        x: x2,
        y: y3,
        width: rect.width,
        height: rect.height
      });
    }
    return rects.length > 0 ? rects : null;
  };
  var getFullBlockSelectionRects = (blockElement, editorDocument, overlayRect) => {
    const range = editorDocument.createRange();
    range.selectNodeContents(blockElement);
    const clientRects = range.getClientRects();
    const rects = [];
    for (const rect of clientRects) {
      if (rect.width === 0 && rect.height === 0) {
        continue;
      }
      rects.push({
        x: rect.left - overlayRect.left,
        y: rect.top - overlayRect.top,
        width: rect.width,
        height: rect.height
      });
    }
    if (rects.length === 0) {
      const blockRect = blockElement.getBoundingClientRect();
      if (blockRect.width > 0 && blockRect.height > 0) {
        rects.push({
          x: blockRect.left - overlayRect.left,
          y: blockRect.top - overlayRect.top,
          width: blockRect.width,
          height: blockRect.height
        });
      }
    }
    return rects;
  };
  var getBlocksBetween = (startBlockId, endBlockId, editorDocument) => {
    const allBlocks = editorDocument.querySelectorAll("[data-block]");
    let startIndex = -1;
    let endIndex = -1;
    for (let i3 = 0; i3 < allBlocks.length; i3++) {
      const blockId = allBlocks[i3].getAttribute("data-block");
      if (blockId === startBlockId) {
        startIndex = i3;
      }
      if (blockId === endBlockId) {
        endIndex = i3;
      }
    }
    if (startIndex === -1 || endIndex === -1) {
      return [];
    }
    if (startIndex > endIndex) {
      [startIndex, endIndex] = [endIndex, startIndex];
    }
    const result = [];
    for (let i3 = startIndex + 1; i3 < endIndex; i3++) {
      result.push(allBlocks[i3]);
    }
    return result;
  };
  var findInnerBlockOffset = (blockElement, offset3, editorDocument) => {
    const treeWalker = editorDocument.createTreeWalker(
      blockElement,
      NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT
      // eslint-disable-line no-bitwise
    );
    let currentOffset = 0;
    let lastTextNode = null;
    let node = null;
    let nodeCount = 1;
    while (node = treeWalker.nextNode()) {
      nodeCount++;
      if (nodeCount > MAX_NODE_OFFSET_COUNT) {
        if (lastTextNode) {
          return { node: lastTextNode, offset: 0 };
        }
        return { node: blockElement, offset: 0 };
      }
      const nodeLength = node.nodeValue?.length ?? 0;
      if (node.nodeType === Node.ELEMENT_NODE) {
        if (node.nodeName === "BR") {
          if (currentOffset + 1 >= offset3) {
            const nodeAfterBr = treeWalker.nextNode();
            if (nodeAfterBr?.nodeType === Node.TEXT_NODE) {
              return { node: nodeAfterBr, offset: 0 };
            } else if (lastTextNode) {
              return {
                node: lastTextNode,
                offset: lastTextNode.nodeValue?.length ?? 0
              };
            }
            return { node: blockElement, offset: 0 };
          }
          currentOffset += 1;
          continue;
        } else {
          continue;
        }
      }
      if (nodeLength === 0) {
        continue;
      }
      if (currentOffset + nodeLength >= offset3) {
        return { node, offset: offset3 - currentOffset };
      }
      currentOffset += nodeLength;
      if (node.nodeType === Node.TEXT_NODE) {
        lastTextNode = node;
      }
    }
    if (lastTextNode && lastTextNode.nodeValue?.length) {
      return { node: lastTextNode, offset: lastTextNode.nodeValue.length };
    }
    return { node: blockElement, offset: 0 };
  };
  var isNodeBefore = (a3, b3) => a3.compareDocumentPosition(b3) === Node.DOCUMENT_POSITION_FOLLOWING;

  // packages/editor/build-module/components/collaborators-overlay/compute-selection.mjs
  var { SelectionDirection, SelectionType: SelectionType2 } = unlock(
    import_core_data111.privateApis
  );
  function computeSelectionVisual(selection, start2, end, overlayContext) {
    if (selection.type === SelectionType2.None || selection.type === SelectionType2.WholeBlock) {
      return {};
    }
    if (selection.type === SelectionType2.Cursor) {
      return computeCursorOnly(start2, overlayContext);
    }
    if (!end) {
      return {};
    }
    return computeTextSelection(selection, start2, end, overlayContext);
  }
  function computeCursorOnly(start2, overlayContext) {
    if (!start2.localClientId) {
      return {};
    }
    const blockElement = overlayContext.editorDocument.querySelector(
      `[data-block="${start2.localClientId}"]`
    );
    return {
      coords: getCursorPosition(
        start2.richTextOffset,
        blockElement,
        overlayContext.editorDocument,
        overlayContext.overlayRect
      )
    };
  }
  function computeTextSelection(selection, start2, end, overlayContext) {
    if (!start2.localClientId || !end.localClientId || start2.richTextOffset === null || end.richTextOffset === null) {
      return {};
    }
    const isReverse = selection.selectionDirection === SelectionDirection.Backward;
    const activeEnd = isReverse ? start2 : end;
    let allRects;
    let activeEndBlock = null;
    if (selection.type === SelectionType2.SelectionInOneBlock) {
      const result = computeSingleBlockRects(start2, end, overlayContext);
      allRects = result.rects;
      activeEndBlock = result.blockElement;
    } else {
      const result = computeMultiBlockRects(start2, end, overlayContext);
      allRects = result.rects;
      activeEndBlock = activeEnd.localClientId === result.firstBlockClientId ? result.firstBlock : result.lastBlock;
    }
    if (allRects.length > 0) {
      return {
        coords: getCursorPosition(
          activeEnd.richTextOffset,
          activeEndBlock,
          overlayContext.editorDocument,
          overlayContext.overlayRect
        ),
        selectionRects: allRects
      };
    }
    const startBlock = overlayContext.editorDocument.querySelector(
      `[data-block="${start2.localClientId}"]`
    );
    return {
      coords: getCursorPosition(
        start2.richTextOffset,
        startBlock,
        overlayContext.editorDocument,
        overlayContext.overlayRect
      )
    };
  }
  function computeSingleBlockRects(start2, end, overlayContext) {
    const blockElement = overlayContext.editorDocument.querySelector(
      `[data-block="${start2.localClientId}"]`
    );
    if (!blockElement || start2.richTextOffset === null || end.richTextOffset === null) {
      return { rects: [], blockElement: null };
    }
    return {
      rects: getSelectionRects(
        blockElement,
        start2.richTextOffset,
        end.richTextOffset,
        overlayContext.editorDocument,
        overlayContext.overlayRect
      ) ?? [],
      blockElement
    };
  }
  function computeMultiBlockRects(start2, end, overlayContext) {
    let docFirst = start2;
    let docLast = end;
    let firstBlock = overlayContext.editorDocument.querySelector(
      `[data-block="${docFirst.localClientId}"]`
    );
    let lastBlock = overlayContext.editorDocument.querySelector(
      `[data-block="${docLast.localClientId}"]`
    );
    if (firstBlock && lastBlock && isNodeBefore(lastBlock, firstBlock)) {
      docFirst = end;
      docLast = start2;
      [firstBlock, lastBlock] = [lastBlock, firstBlock];
    }
    if (!firstBlock || !lastBlock || docFirst.richTextOffset === null || docLast.richTextOffset === null || !docFirst.localClientId || !docLast.localClientId) {
      return {
        rects: [],
        firstBlock: null,
        lastBlock: null,
        firstBlockClientId: null
      };
    }
    const allRects = [];
    const startRects = getSelectionRects(
      firstBlock,
      docFirst.richTextOffset,
      Number.MAX_SAFE_INTEGER,
      overlayContext.editorDocument,
      overlayContext.overlayRect
    );
    if (startRects) {
      allRects.push(...startRects);
    }
    const intermediateBlocks = getBlocksBetween(
      docFirst.localClientId,
      docLast.localClientId,
      overlayContext.editorDocument
    );
    for (const intermediateBlock of intermediateBlocks) {
      const rects = getFullBlockSelectionRects(
        intermediateBlock,
        overlayContext.editorDocument,
        overlayContext.overlayRect
      );
      allRects.push(...rects);
    }
    const endRects = getSelectionRects(
      lastBlock,
      0,
      docLast.richTextOffset,
      overlayContext.editorDocument,
      overlayContext.overlayRect
    );
    if (endRects) {
      allRects.push(...endRects);
    }
    return {
      rects: allRects,
      firstBlock,
      lastBlock,
      firstBlockClientId: docFirst.localClientId
    };
  }

  // packages/editor/build-module/components/collaborators-overlay/use-render-cursors.mjs
  var { useActiveCollaborators: useActiveCollaborators2, useResolvedSelection: useResolvedSelection2 } = unlock(import_core_data112.privateApis);
  var { SelectionType: SelectionType3 } = unlock(import_core_data112.privateApis);
  function useRenderCursors(overlayElement, blockEditorDocument, postId2, postType2, delayMs) {
    const sortedUsers = useActiveCollaborators2(
      postId2 ?? null,
      postType2 ?? null
    );
    const resolveSelection = useResolvedSelection2(
      postId2 ?? null,
      postType2 ?? null
    );
    const showOwnCursor = (0, import_data191.useSelect)(
      (select6) => select6(import_preferences20.store).get("core", "showCollaborationCursor"),
      []
    );
    const [cursorPositions, setCursorPositions] = (0, import_element158.useState)(
      []
    );
    const [recomputeToken, rerenderCursorsAfterDelay] = useDebouncedRecompute(delayMs);
    (0, import_element158.useEffect)(() => {
      if (!overlayElement || !blockEditorDocument) {
        setCursorPositions([]);
        return;
      }
      const overlayRect = overlayElement.getBoundingClientRect();
      const overlayContext = {
        editorDocument: blockEditorDocument,
        overlayRect
      };
      const results = [];
      const hasOtherCollaborators = sortedUsers.some(
        (u3) => !u3.isMe
      );
      sortedUsers.forEach((user) => {
        if (user.isMe && (!showOwnCursor || !hasOtherCollaborators)) {
          return;
        }
        const selection = user.editorState?.selection ?? {
          type: SelectionType3.None
        };
        let start2 = {
          richTextOffset: null,
          localClientId: null
        };
        let end;
        if (selection.type === SelectionType3.Cursor) {
          try {
            start2 = resolveSelection(selection);
          } catch {
            return;
          }
        } else if (selection.type === SelectionType3.SelectionInOneBlock || selection.type === SelectionType3.SelectionInMultipleBlocks) {
          try {
            start2 = resolveSelection({
              type: SelectionType3.Cursor,
              cursorPosition: selection.cursorStartPosition
            });
            end = resolveSelection({
              type: SelectionType3.Cursor,
              cursorPosition: selection.cursorEndPosition
            });
          } catch {
            return;
          }
        }
        const userName = user.collaboratorInfo.name;
        const clientId = user.clientId;
        const color = user.isMe ? "var(--wp-admin-theme-color)" : getAvatarBorderColor(user.collaboratorInfo.id);
        const avatarUrl = getAvatarUrl(user.collaboratorInfo.avatar_urls);
        const selectionVisual = computeSelectionVisual(
          selection,
          start2,
          end,
          overlayContext
        );
        if (selectionVisual.coords) {
          const cursorData = {
            userName,
            clientId,
            color,
            avatarUrl,
            isMe: user.isMe,
            ...selectionVisual.coords
          };
          if (selectionVisual.selectionRects) {
            cursorData.selectionRects = selectionVisual.selectionRects;
          }
          results.push(cursorData);
        }
      });
      setCursorPositions(results);
    }, [
      blockEditorDocument,
      resolveSelection,
      overlayElement,
      sortedUsers,
      showOwnCursor,
      recomputeToken
    ]);
    return { cursors: cursorPositions, rerenderCursorsAfterDelay };
  }

  // packages/editor/build-module/components/collaborators-overlay/overlay.mjs
  var import_jsx_runtime327 = __toESM(require_jsx_runtime(), 1);
  var RERENDER_DELAY_MS = 500;
  var CURSOR_REDRAW_INTERVAL_MS = 1e4;
  function Overlay({
    blockEditorDocument,
    postId: postId2,
    postType: postType2,
    cursorRegistry
  }) {
    const [overlayElement, setOverlayElement] = (0, import_element159.useState)(null);
    const { cursors, rerenderCursorsAfterDelay } = useRenderCursors(
      overlayElement,
      blockEditorDocument ?? null,
      postId2 ?? null,
      postType2 ?? null,
      RERENDER_DELAY_MS
    );
    const { highlights, rerenderHighlightsAfterDelay } = useBlockHighlighting(
      overlayElement,
      blockEditorDocument ?? null,
      postId2 ?? null,
      postType2 ?? null,
      RERENDER_DELAY_MS
    );
    const onResize = (0, import_element159.useCallback)(() => {
      rerenderCursorsAfterDelay();
      rerenderHighlightsAfterDelay();
    }, [rerenderCursorsAfterDelay, rerenderHighlightsAfterDelay]);
    const resizeObserverRef = (0, import_compose49.useResizeObserver)(onResize);
    (0, import_element159.useEffect)(() => {
      const cleanupCursors = rerenderCursorsAfterDelay();
      const cleanupHighlights = rerenderHighlightsAfterDelay();
      return () => {
        cleanupCursors();
        cleanupHighlights();
      };
    }, [rerenderCursorsAfterDelay, rerenderHighlightsAfterDelay]);
    (0, import_element159.useEffect)(() => {
      if (cursors.length === 0) {
        return;
      }
      return setDelayedInterval(
        rerenderCursorsAfterDelay,
        CURSOR_REDRAW_INTERVAL_MS
      );
    }, [cursors.length, rerenderCursorsAfterDelay]);
    const mergedRef = (0, import_compose49.useMergeRefs)([
      setOverlayElement,
      resizeObserverRef
    ]);
    const cursorRefsMap = (0, import_element159.useRef)(/* @__PURE__ */ new Map());
    (0, import_element159.useEffect)(() => {
      if (!cursorRegistry) {
        return;
      }
      const refs = cursorRefsMap.current;
      const currentIds = new Set(cursors.map((c6) => c6.clientId));
      for (const id of refs.keys()) {
        if (!currentIds.has(id)) {
          cursorRegistry.unregisterCursor(id);
          refs.delete(id);
        }
      }
      for (const [id, el] of refs.entries()) {
        cursorRegistry.registerCursor(id, el);
      }
      return () => cursorRegistry.removeAll();
    }, [cursors, cursorRegistry]);
    const setCursorRef = (0, import_element159.useCallback)(
      (clientId) => (el) => {
        if (el) {
          cursorRefsMap.current.set(clientId, el);
        } else {
          cursorRefsMap.current.delete(clientId);
        }
      },
      []
    );
    return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("div", { className: "collaborators-overlay-full", ref: mergedRef, children: [
      /* @__PURE__ */ (0, import_jsx_runtime327.jsx)("style", { children: AVATAR_IFRAME_STYLES + OVERLAY_IFRAME_STYLES }),
      cursors.map((cursor) => /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("div", { children: [
        cursor.selectionRects?.map((rect, index2) => /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
          "div",
          {
            className: "collaborators-overlay-selection-rect",
            style: {
              left: `${rect.x}px`,
              top: `${rect.y}px`,
              width: `${rect.width}px`,
              height: `${rect.height}px`,
              backgroundColor: cursor.color
            }
          },
          `${cursor.clientId}-sel-${index2}`
        )),
        /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)(
          "div",
          {
            ref: setCursorRef(cursor.clientId),
            className: "collaborators-overlay-user",
            style: {
              left: `${cursor.x}px`,
              top: `${cursor.y}px`
            },
            children: [
              !cursor.isMe && /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
                "div",
                {
                  className: "collaborators-overlay-user-cursor",
                  style: {
                    backgroundColor: cursor.color,
                    height: `${cursor.height}px`
                  }
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
                component_default,
                {
                  className: "collaborators-overlay-user-label",
                  variant: "badge",
                  size: "small",
                  src: cursor.avatarUrl,
                  name: cursor.userName,
                  label: cursor.isMe ? (0, import_i18n210.__)("You") : void 0,
                  borderColor: cursor.color
                }
              )
            ]
          }
        )
      ] }, cursor.clientId)),
      highlights.map((highlight) => /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
        component_default,
        {
          className: "collaborators-overlay-block-label",
          variant: "badge",
          size: "small",
          src: highlight.avatarUrl,
          name: highlight.userName,
          borderColor: highlight.color,
          style: {
            left: `${highlight.x}px`,
            top: `${highlight.y}px`
          }
        },
        highlight.blockId
      ))
    ] });
  }

  // packages/editor/build-module/components/collaborators-overlay/index.mjs
  var import_jsx_runtime328 = __toESM(require_jsx_runtime(), 1);
  var { BlockCanvasCover } = unlock(import_block_editor71.privateApis);
  function CollaboratorsOverlay({
    postId: postId2,
    postType: postType2,
    cursorRegistry
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(BlockCanvasCover.Fill, { children: ({
      containerRef
    }) => /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
      Overlay,
      {
        blockEditorDocument: containerRef.current?.ownerDocument,
        postId: postId2,
        postType: postType2,
        cursorRegistry
      }
    ) });
  }

  // packages/editor/build-module/components/collaborators-presence/index.mjs
  var import_jsx_runtime329 = __toESM(require_jsx_runtime(), 1);
  if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='eee1778bc0']")) {
    const style = document.createElement("style");
    style.setAttribute("data-wp-hash", "eee1778bc0");
    style.appendChild(document.createTextNode(".editor-collaborators-presence{align-items:center;background:#f0f0f0;border-radius:4px;display:flex;flex-shrink:0;height:32px;margin-right:8px}.editor-collaborators-presence:has(.is-pressed),.editor-collaborators-presence:hover{background-color:#e0e0e0}.editor-collaborators-presence__button.editor-collaborators-presence__button.components-button{align-items:center;background:#0000;border-radius:4px;box-sizing:border-box;color:#2f2f2f;cursor:pointer;display:flex;height:100%;padding:4px;position:relative}.editor-collaborators-presence__button.editor-collaborators-presence__button.components-button.is-pressed,.editor-collaborators-presence__button.editor-collaborators-presence__button.components-button.is-pressed:hover,.editor-collaborators-presence__button.editor-collaborators-presence__button.components-button:hover{background:#0000;color:#2f2f2f}.editor-collaborators-presence__button.editor-collaborators-presence__button.components-button:focus:not(:active){box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus,2px) var(--wp-admin-theme-color,#007cba);outline:none}"));
    document.head.appendChild(style);
  }
  var { useActiveCollaborators: useActiveCollaborators3 } = unlock(import_core_data113.privateApis);
  function CollaboratorsPresence({
    postId: postId2,
    postType: postType2
  }) {
    const activeCollaborators = useActiveCollaborators3(
      postId2,
      postType2
    );
    const otherActiveCollaborators = activeCollaborators.filter(
      (c6) => !c6.isMe
    );
    const collaboratorsForList = (0, import_element160.useMemo)(() => {
      return [...activeCollaborators].sort((a3, b3) => {
        if (a3.isMe && !b3.isMe) {
          return -1;
        }
        if (!a3.isMe && b3.isMe) {
          return 1;
        }
        return 0;
      });
    }, [activeCollaborators]);
    const [cursorRegistry] = (0, import_element160.useState)(createCursorRegistry);
    const [isPopoverVisible, setIsPopoverVisible] = (0, import_element160.useState)(false);
    const [popoverAnchor, setPopoverAnchor] = (0, import_element160.useState)(
      null
    );
    if (otherActiveCollaborators.length === 0) {
      return null;
    }
    const me = activeCollaborators.find((c6) => c6.isMe);
    return /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)(import_jsx_runtime329.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)("div", { className: "editor-collaborators-presence", children: [
        /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
          import_components189.Button,
          {
            __next40pxDefaultSize: true,
            className: "editor-collaborators-presence__button",
            onClick: () => setIsPopoverVisible(!isPopoverVisible),
            isPressed: isPopoverVisible,
            ref: setPopoverAnchor,
            "aria-label": (0, import_i18n211.sprintf)(
              // translators: %d: number of online collaborators.
              (0, import_i18n211.__)("Collaborators list, %d online"),
              collaboratorsForList.length
            ),
            children: /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)(component_default2, { max: 4, children: [
              me && /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
                component_default,
                {
                  src: getAvatarUrl(
                    me.collaboratorInfo.avatar_urls
                  ),
                  name: me.collaboratorInfo.name,
                  borderColor: "var(--wp-admin-theme-color)",
                  size: "small"
                },
                me.clientId
              ),
              otherActiveCollaborators.map(
                (collaboratorState) => /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
                  component_default,
                  {
                    src: getAvatarUrl(
                      collaboratorState.collaboratorInfo.avatar_urls
                    ),
                    name: collaboratorState.collaboratorInfo.name,
                    borderColor: getAvatarBorderColor(
                      collaboratorState.collaboratorInfo.id
                    ),
                    size: "small"
                  },
                  collaboratorState.clientId
                )
              )
            ] })
          }
        ),
        isPopoverVisible && /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
          CollaboratorsList,
          {
            activeCollaborators: collaboratorsForList,
            popoverAnchor,
            setIsPopoverVisible,
            cursorRegistry
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
        CollaboratorsOverlay,
        {
          postId: postId2,
          postType: postType2,
          cursorRegistry
        }
      )
    ] });
  }

  // packages/editor/build-module/components/header/index.mjs
  var import_jsx_runtime330 = __toESM(require_jsx_runtime(), 1);
  function Header({
    customSaveButton,
    forceIsDirty,
    setEntitiesSavedStatesCallback
  }) {
    const isWideViewport = (0, import_compose50.useViewportMatch)("large");
    const isLargeViewport = (0, import_compose50.useViewportMatch)("medium");
    const isTooNarrowForDocumentBar = (0, import_compose50.useMediaQuery)("(max-width: 403px)");
    const {
      postId: postId2,
      postType: postType2,
      isTextEditor,
      isPublishSidebarOpened: isPublishSidebarOpened2,
      showIconLabels,
      hasFixedToolbar,
      hasBlockSelection,
      hasSectionRootClientId,
      isStylesCanvasActive,
      isAttachment
    } = (0, import_data192.useSelect)((select6) => {
      const { get: getPreference } = select6(import_preferences21.store);
      const {
        getEditorMode: getEditorMode2,
        getCurrentPostType: getCurrentPostType2,
        getCurrentPostId: getCurrentPostId2,
        isPublishSidebarOpened: _isPublishSidebarOpened
      } = select6(store);
      const { getStylesPath: getStylesPath2, getShowStylebook: getShowStylebook2 } = unlock(
        select6(store)
      );
      const { getBlockSelectionStart: getBlockSelectionStart2, getSectionRootClientId } = unlock(
        select6(import_block_editor72.store)
      );
      return {
        postId: getCurrentPostId2(),
        postType: getCurrentPostType2(),
        isTextEditor: getEditorMode2() === "text",
        isPublishSidebarOpened: _isPublishSidebarOpened(),
        showIconLabels: getPreference("core", "showIconLabels"),
        hasFixedToolbar: getPreference("core", "fixedToolbar"),
        hasBlockSelection: !!getBlockSelectionStart2(),
        hasSectionRootClientId: !!getSectionRootClientId(),
        isStylesCanvasActive: !!getStylesPath2()?.startsWith("/revisions") || getShowStylebook2(),
        isAttachment: getCurrentPostType2() === ATTACHMENT_POST_TYPE && window?.__experimentalMediaEditor
      };
    }, []);
    const canBeZoomedOut = ["post", "page", "wp_template"].includes(postType2) && hasSectionRootClientId;
    const disablePreviewOption = [
      ATTACHMENT_POST_TYPE,
      NAVIGATION_POST_TYPE,
      TEMPLATE_PART_POST_TYPE,
      PATTERN_POST_TYPE
    ].includes(postType2) || isStylesCanvasActive;
    const [isBlockToolsCollapsed, setIsBlockToolsCollapsed] = (0, import_element161.useState)(true);
    const hasCenter = !isTooNarrowForDocumentBar && (!hasFixedToolbar || hasFixedToolbar && (!hasBlockSelection || isBlockToolsCollapsed));
    return /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
      HeaderSkeleton,
      {
        toolbar: /* @__PURE__ */ (0, import_jsx_runtime330.jsxs)(import_jsx_runtime330.Fragment, { children: [
          !isAttachment && /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
            document_tools_default,
            {
              disableBlockTools: isStylesCanvasActive || isTextEditor
            }
          ),
          hasFixedToolbar && isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
            CollapsibleBlockToolbar,
            {
              isCollapsed: isBlockToolsCollapsed,
              onToggle: setIsBlockToolsCollapsed
            }
          )
        ] }),
        center: hasCenter ? /* @__PURE__ */ (0, import_jsx_runtime330.jsxs)(import_jsx_runtime330.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
            CollaboratorsPresence,
            {
              postType: postType2,
              postId: postId2
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(DocumentBar, {})
        ] }) : void 0,
        settings: /* @__PURE__ */ (0, import_jsx_runtime330.jsxs)(import_jsx_runtime330.Fragment, { children: [
          !customSaveButton && !isPublishSidebarOpened2 && /*
          * This button isn't completely hidden by the publish sidebar.
          * We can't hide the whole toolbar when the publish sidebar is open because
          * we want to prevent mounting/unmounting the PostPublishButtonOrToggle DOM node.
          * We track that DOM node to return focus to the PostPublishButtonOrToggle
          * when the publish sidebar has been closed.
          */
          /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(PostSavedState, { forceIsDirty }),
          /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(PostViewLink, {}),
          /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
            PreviewDropdown,
            {
              forceIsAutosaveable: forceIsDirty,
              disabled: disablePreviewOption
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
            PostPreviewButton,
            {
              className: "editor-header__post-preview-button",
              forceIsAutosaveable: forceIsDirty
            }
          ),
          isWideViewport && canBeZoomedOut && /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(zoom_out_toggle_default, { disabled: isStylesCanvasActive }),
          (isWideViewport || !showIconLabels) && /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(pinned_items_default.Slot, { scope: "core" }),
          !customSaveButton && /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
            PostPublishButtonOrToggle,
            {
              forceIsDirty,
              setEntitiesSavedStatesCallback
            }
          ),
          customSaveButton,
          !isAttachment && /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(MoreMenu, {})
        ] })
      }
    );
  }
  var header_default2 = Header;

  // packages/editor/build-module/components/inserter-sidebar/index.mjs
  var import_data193 = __toESM(require_data(), 1);
  var import_block_editor73 = __toESM(require_block_editor(), 1);
  var import_compose51 = __toESM(require_compose(), 1);
  var import_element162 = __toESM(require_element(), 1);
  var import_preferences22 = __toESM(require_preferences(), 1);
  var import_keycodes15 = __toESM(require_keycodes(), 1);
  var import_jsx_runtime331 = __toESM(require_jsx_runtime(), 1);
  var { PrivateInserterLibrary } = unlock(import_block_editor73.privateApis);
  function InserterSidebar() {
    const {
      blockSectionRootClientId,
      inserterSidebarToggleRef: inserterSidebarToggleRef2,
      inserter,
      showMostUsedBlocks,
      sidebarIsOpened
    } = (0, import_data193.useSelect)((select6) => {
      const {
        getInserterSidebarToggleRef: getInserterSidebarToggleRef2,
        getInserter: getInserter2,
        isPublishSidebarOpened: isPublishSidebarOpened2
      } = unlock(select6(store));
      const { getBlockRootClientId: getBlockRootClientId2, isZoomOut, getSectionRootClientId } = unlock(select6(import_block_editor73.store));
      const { get } = select6(import_preferences22.store);
      const { getActiveComplementaryArea: getActiveComplementaryArea2 } = select6(store2);
      const getBlockSectionRootClientId = () => {
        if (isZoomOut()) {
          const sectionRootClientId = getSectionRootClientId();
          if (sectionRootClientId) {
            return sectionRootClientId;
          }
        }
        return getBlockRootClientId2();
      };
      return {
        inserterSidebarToggleRef: getInserterSidebarToggleRef2(),
        inserter: getInserter2(),
        showMostUsedBlocks: get("core", "mostUsedBlocks"),
        blockSectionRootClientId: getBlockSectionRootClientId(),
        sidebarIsOpened: !!(getActiveComplementaryArea2("core") || isPublishSidebarOpened2())
      };
    }, []);
    const { setIsInserterOpened: setIsInserterOpened2 } = (0, import_data193.useDispatch)(store);
    const { disableComplementaryArea: disableComplementaryArea2 } = (0, import_data193.useDispatch)(store2);
    const isMobileViewport = (0, import_compose51.useViewportMatch)("medium", "<");
    const libraryRef = (0, import_element162.useRef)();
    const closeInserterSidebar = (0, import_element162.useCallback)(() => {
      setIsInserterOpened2(false);
      inserterSidebarToggleRef2.current?.focus();
    }, [inserterSidebarToggleRef2, setIsInserterOpened2]);
    const closeOnEscape = (0, import_element162.useCallback)(
      (event) => {
        if (event.keyCode === import_keycodes15.ESCAPE && !event.defaultPrevented) {
          event.preventDefault();
          closeInserterSidebar();
        }
      },
      [closeInserterSidebar]
    );
    const inserterContents = /* @__PURE__ */ (0, import_jsx_runtime331.jsx)("div", { className: "editor-inserter-sidebar__content", children: /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
      PrivateInserterLibrary,
      {
        showMostUsedBlocks,
        showInserterHelpPanel: true,
        shouldFocusBlock: isMobileViewport,
        rootClientId: blockSectionRootClientId ?? inserter.rootClientId,
        __experimentalInsertionIndex: inserter.insertionIndex,
        onSelect: inserter.onSelect,
        __experimentalInitialTab: inserter.tab,
        __experimentalInitialCategory: inserter.category,
        __experimentalFilterValue: inserter.filterValue,
        onPatternCategorySelection: sidebarIsOpened ? () => disableComplementaryArea2("core") : void 0,
        ref: libraryRef,
        onClose: closeInserterSidebar
      }
    ) });
    return (
      // eslint-disable-next-line jsx-a11y/no-static-element-interactions
      /* @__PURE__ */ (0, import_jsx_runtime331.jsx)("div", { onKeyDown: closeOnEscape, className: "editor-inserter-sidebar", children: inserterContents })
    );
  }

  // packages/editor/build-module/components/list-view-sidebar/index.mjs
  var import_block_editor74 = __toESM(require_block_editor(), 1);
  var import_compose52 = __toESM(require_compose(), 1);
  var import_data194 = __toESM(require_data(), 1);
  var import_dom4 = __toESM(require_dom(), 1);
  var import_element163 = __toESM(require_element(), 1);
  var import_i18n213 = __toESM(require_i18n(), 1);
  var import_keyboard_shortcuts8 = __toESM(require_keyboard_shortcuts(), 1);
  var import_keycodes16 = __toESM(require_keycodes(), 1);

  // packages/editor/build-module/components/list-view-sidebar/list-view-outline.mjs
  var import_components190 = __toESM(require_components(), 1);
  var import_i18n212 = __toESM(require_i18n(), 1);
  var import_jsx_runtime332 = __toESM(require_jsx_runtime(), 1);
  function ListViewOutline() {
    return /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)(import_jsx_runtime332.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)("div", { className: "editor-list-view-sidebar__outline", children: [
        /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)("div", { children: [
          /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(import_components190.__experimentalText, { children: (0, import_i18n212.__)("Characters:") }),
          /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(import_components190.__experimentalText, { children: /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(CharacterCount, {}) })
        ] }),
        /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)("div", { children: [
          /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(import_components190.__experimentalText, { children: (0, import_i18n212.__)("Words:") }),
          /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(WordCount, {})
        ] }),
        /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)("div", { children: [
          /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(import_components190.__experimentalText, { children: (0, import_i18n212.__)("Time to read:") }),
          /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(TimeToRead, {})
        ] })
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(DocumentOutline, {})
    ] });
  }

  // packages/editor/build-module/components/list-view-sidebar/index.mjs
  var import_jsx_runtime333 = __toESM(require_jsx_runtime(), 1);
  var { TabbedSidebar } = unlock(import_block_editor74.privateApis);
  function ListViewSidebar() {
    const { setIsListViewOpened: setIsListViewOpened2 } = (0, import_data194.useDispatch)(store);
    const { getListViewToggleRef: getListViewToggleRef2 } = unlock((0, import_data194.useSelect)(store));
    const focusOnMountRef = (0, import_compose52.useFocusOnMount)("firstElement");
    const closeListView = (0, import_element163.useCallback)(() => {
      setIsListViewOpened2(false);
      getListViewToggleRef2().current?.focus();
    }, [getListViewToggleRef2, setIsListViewOpened2]);
    const closeOnEscape = (0, import_element163.useCallback)(
      (event) => {
        if (event.keyCode === import_keycodes16.ESCAPE && !event.defaultPrevented) {
          event.preventDefault();
          closeListView();
        }
      },
      [closeListView]
    );
    const [dropZoneElement, setDropZoneElement] = (0, import_element163.useState)(null);
    const [tab, setTab] = (0, import_element163.useState)("list-view");
    const sidebarRef = (0, import_element163.useRef)();
    const tabsRef = (0, import_element163.useRef)();
    const listViewRef = (0, import_element163.useRef)();
    const listViewContainerRef = (0, import_compose52.useMergeRefs)([
      focusOnMountRef,
      listViewRef,
      setDropZoneElement
    ]);
    function handleSidebarFocus(currentTab) {
      const tabPanelFocus = import_dom4.focus.tabbable.find(tabsRef.current)[0];
      if (currentTab === "list-view") {
        const listViewApplicationFocus = import_dom4.focus.tabbable.find(
          listViewRef.current
        )[0];
        const listViewFocusArea = sidebarRef.current.contains(
          listViewApplicationFocus
        ) ? listViewApplicationFocus : tabPanelFocus;
        listViewFocusArea.focus();
      } else {
        tabPanelFocus.focus();
      }
    }
    const handleToggleListViewShortcut = (0, import_element163.useCallback)(() => {
      if (sidebarRef.current.contains(
        sidebarRef.current.ownerDocument.activeElement
      )) {
        closeListView();
      } else {
        handleSidebarFocus(tab);
      }
    }, [closeListView, tab]);
    (0, import_keyboard_shortcuts8.useShortcut)("core/editor/toggle-list-view", handleToggleListViewShortcut);
    return (
      // eslint-disable-next-line jsx-a11y/no-static-element-interactions
      /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
        "div",
        {
          className: "editor-list-view-sidebar",
          onKeyDown: closeOnEscape,
          ref: sidebarRef,
          children: /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
            TabbedSidebar,
            {
              tabs: [
                {
                  name: "list-view",
                  title: (0, import_i18n213._x)("List View", "Post overview"),
                  panel: /* @__PURE__ */ (0, import_jsx_runtime333.jsx)("div", { className: "editor-list-view-sidebar__list-view-container", children: /* @__PURE__ */ (0, import_jsx_runtime333.jsx)("div", { className: "editor-list-view-sidebar__list-view-panel-content", children: /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
                    import_block_editor74.__experimentalListView,
                    {
                      dropZoneElement
                    }
                  ) }) }),
                  panelRef: listViewContainerRef
                },
                {
                  name: "outline",
                  title: (0, import_i18n213._x)("Outline", "Post overview"),
                  panel: /* @__PURE__ */ (0, import_jsx_runtime333.jsx)("div", { className: "editor-list-view-sidebar__list-view-container", children: /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(ListViewOutline, {}) })
                }
              ],
              onClose: closeListView,
              onSelect: (tabName) => setTab(tabName),
              defaultTabId: "list-view",
              ref: tabsRef,
              closeButtonLabel: (0, import_i18n213.__)("Close")
            }
          )
        }
      )
    );
  }

  // packages/editor/build-module/components/post-revisions-preview/revisions-header.mjs
  var import_data196 = __toESM(require_data(), 1);
  var import_components192 = __toESM(require_components(), 1);
  var import_i18n215 = __toESM(require_i18n(), 1);

  // packages/editor/build-module/components/post-revisions-preview/revisions-slider.mjs
  var import_data195 = __toESM(require_data(), 1);
  var import_components191 = __toESM(require_components(), 1);
  var import_core_data114 = __toESM(require_core_data(), 1);
  var import_i18n214 = __toESM(require_i18n(), 1);
  var import_date9 = __toESM(require_date(), 1);
  var import_element164 = __toESM(require_element(), 1);
  var import_jsx_runtime334 = __toESM(require_jsx_runtime(), 1);
  function RevisionsSlider() {
    const {
      revisions: rawRevisions,
      perPage,
      currentRevisionId,
      revisionKey,
      revisionPage: revisionPage2,
      totalRevisions
    } = (0, import_data195.useSelect)((select6) => {
      const {
        getCurrentRevisionId: getCurrentRevisionId2,
        getRevisionPage: getRevisionPage2,
        getPageRevisions: getPageRevisions2,
        getRevisionsPerPage: getRevisionsPerPage2
      } = unlock(select6(store));
      const postType2 = select6(store).getCurrentPostType();
      if (!postType2) {
        return {};
      }
      const entityConfig = select6(import_core_data114.store).getEntityConfig(
        "postType",
        postType2
      );
      const _revisionKey = entityConfig?.revisionKey || "id";
      const _revisionPage = getRevisionPage2();
      return {
        revisions: getPageRevisions2(_revisionPage),
        perPage: getRevisionsPerPage2(),
        currentRevisionId: getCurrentRevisionId2(),
        revisionKey: _revisionKey,
        revisionPage: _revisionPage,
        totalRevisions: select6(store).getCurrentPostRevisionsCount()
      };
    }, []);
    const { setCurrentRevisionId: setCurrentRevisionId2, setRevisionPage: setRevisionPage2 } = unlock(
      (0, import_data195.useDispatch)(store)
    );
    const isLoading = !rawRevisions;
    const totalPages = Math.ceil(totalRevisions / perPage) || 1;
    const revisions = (0, import_element164.useMemo)(
      () => rawRevisions && [...rawRevisions].reverse(),
      [rawRevisions]
    );
    const selectedIndex = revisions?.findIndex(
      (r4) => r4[revisionKey] === currentRevisionId
    );
    const handleSliderChange = (index2) => {
      const revision = revisions?.[index2];
      if (revision) {
        setCurrentRevisionId2(revision[revisionKey]);
      }
    };
    const dateSettings = (0, import_date9.getSettings)();
    const renderTooltipContent = (index2) => {
      const revision = revisions?.[index2];
      if (!revision) {
        return index2;
      }
      return (0, import_date9.dateI18n)(dateSettings.formats.datetime, revision.date);
    };
    const showPagination = totalPages > 1;
    if (isLoading && !showPagination) {
      return /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(import_components191.Spinner, {});
    }
    if (!isLoading && !revisions?.length) {
      return /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("span", { className: "editor-revisions-header__no-revisions", children: (0, import_i18n214.__)("No revisions found.") });
    }
    if (totalRevisions <= 1) {
      return /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("span", { className: "editor-revisions-header__no-revisions", children: (0, import_i18n214.__)("Only one revision found.") });
    }
    const getPageRangeLabel = (page) => {
      const end = totalRevisions - (page - 1) * perPage;
      const start2 = Math.max(1, end - perPage + 1);
      return (0, import_i18n214.sprintf)(
        /* translators: 1: first revision number, 2: last revision number */
        (0, import_i18n214.__)("Revisions %1$s\u2013%2$s"),
        start2,
        end
      );
    };
    const sliderOrSpinner = isLoading || selectedIndex === -1 ? /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(import_components191.Spinner, {}) : /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
      import_components191.RangeControl,
      {
        __next40pxDefaultSize: true,
        "aria-valuetext": renderTooltipContent(selectedIndex),
        className: "editor-revisions-header__slider",
        hideLabelFromVision: true,
        label: (0, import_i18n214.__)("Revision"),
        max: revisions?.length - 1,
        min: 0,
        marks: true,
        onChange: handleSliderChange,
        renderTooltipContent,
        value: selectedIndex,
        withInputField: false
      }
    );
    if (!showPagination) {
      return sliderOrSpinner;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)(import_components191.__experimentalHStack, { spacing: 2, expanded: true, wrap: false, children: [
      /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
        import_components191.Button,
        {
          icon: chevron_left_default,
          label: revisionPage2 < totalPages ? getPageRangeLabel(revisionPage2 + 1) : (0, import_i18n214.__)("No older revisions"),
          onClick: () => setRevisionPage2(revisionPage2 + 1),
          disabled: isLoading || revisionPage2 >= totalPages,
          size: "compact",
          accessibleWhenDisabled: true
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
        "div",
        {
          style: {
            flex: 1,
            minWidth: 0,
            display: "flex",
            justifyContent: "center"
          },
          children: sliderOrSpinner
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
        import_components191.Button,
        {
          icon: chevron_right_default,
          label: revisionPage2 > 1 ? getPageRangeLabel(revisionPage2 - 1) : (0, import_i18n214.__)("No newer revisions"),
          onClick: () => setRevisionPage2(revisionPage2 - 1),
          disabled: isLoading || revisionPage2 <= 1,
          size: "compact",
          accessibleWhenDisabled: true
        }
      )
    ] });
  }
  var revisions_slider_default = RevisionsSlider;

  // packages/editor/build-module/components/sidebar/constants.mjs
  var sidebars = {
    document: "edit-post/document",
    block: "edit-post/block"
  };

  // packages/editor/build-module/components/post-revisions-preview/revisions-header.mjs
  var import_jsx_runtime335 = __toESM(require_jsx_runtime(), 1);
  function RevisionsHeader({ showDiff, onToggleDiff }) {
    const { currentRevisionId, sidebarIsOpened } = (0, import_data196.useSelect)((select6) => {
      return {
        currentRevisionId: unlock(
          select6(store)
        ).getCurrentRevisionId(),
        sidebarIsOpened: !!select6(store2).getActiveComplementaryArea(
          "core"
        )
      };
    }, []);
    const { setCurrentRevisionId: setCurrentRevisionId2, restoreRevision: restoreRevision2 } = unlock(
      (0, import_data196.useDispatch)(store)
    );
    const { enableComplementaryArea: enableComplementaryArea2, disableComplementaryArea: disableComplementaryArea2 } = (0, import_data196.useDispatch)(store2);
    const canRestore = !!currentRevisionId;
    const handleRestore = () => {
      if (currentRevisionId) {
        restoreRevision2(currentRevisionId);
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
      HeaderSkeleton,
      {
        className: "editor-revisions-header",
        toolbar: /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
          import_components192.Button,
          {
            __next40pxDefaultSize: true,
            size: "compact",
            icon: seen_default,
            label: (0, import_i18n215._x)("Show changes", "revisions"),
            isPressed: showDiff,
            onClick: onToggleDiff
          }
        ),
        center: /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(revisions_slider_default, {}),
        settings: /* @__PURE__ */ (0, import_jsx_runtime335.jsxs)(import_jsx_runtime335.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(PostPreviewButton, { className: "editor-header__post-preview-button" }),
          /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
            import_components192.Button,
            {
              __next40pxDefaultSize: true,
              icon: (0, import_i18n215.isRTL)() ? drawer_left_default : drawer_right_default,
              label: (0, import_i18n215._x)("Settings", "panel button label"),
              isPressed: sidebarIsOpened,
              "aria-expanded": sidebarIsOpened,
              onClick: () => {
                if (sidebarIsOpened) {
                  disableComplementaryArea2("core");
                } else {
                  enableComplementaryArea2(
                    "core",
                    sidebars.document
                  );
                }
              },
              size: "compact"
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
            import_components192.Button,
            {
              __next40pxDefaultSize: true,
              variant: "secondary",
              size: "compact",
              onClick: () => setCurrentRevisionId2(null),
              children: (0, import_i18n215.__)("Exit")
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
            import_components192.Button,
            {
              __next40pxDefaultSize: true,
              accessibleWhenDisabled: true,
              variant: "primary",
              size: "compact",
              className: "editor-revisions-header__restore-button",
              disabled: !canRestore,
              onClick: handleRestore,
              children: (0, import_i18n215.__)("Restore")
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(MoreMenu, { disabled: true })
        ] })
      }
    );
  }
  var revisions_header_default = RevisionsHeader;

  // packages/editor/build-module/components/post-revisions-preview/revisions-canvas.mjs
  var import_components196 = __toESM(require_components(), 1);
  var import_block_editor82 = __toESM(require_block_editor(), 1);
  var import_data205 = __toESM(require_data(), 1);
  var import_element170 = __toESM(require_element(), 1);
  var import_hooks57 = __toESM(require_hooks(), 1);

  // packages/editor/build-module/components/visual-editor/index.mjs
  var import_block_editor80 = __toESM(require_block_editor(), 1);
  var import_element168 = __toESM(require_element(), 1);
  var import_data203 = __toESM(require_data(), 1);
  var import_blocks34 = __toESM(require_blocks(), 1);
  var import_core_data117 = __toESM(require_core_data(), 1);
  var import_compose58 = __toESM(require_compose(), 1);

  // packages/editor/build-module/components/visual-editor/edit-template-blocks-notification.mjs
  var import_data197 = __toESM(require_data(), 1);
  var import_core_data115 = __toESM(require_core_data(), 1);
  var import_element165 = __toESM(require_element(), 1);
  var import_i18n216 = __toESM(require_i18n(), 1);
  var import_components193 = __toESM(require_components(), 1);
  var import_jsx_runtime336 = __toESM(require_jsx_runtime(), 1);
  function EditTemplateBlocksNotification({ contentRef }) {
    const { onNavigateToEntityRecord, templateId: templateId2 } = (0, import_data197.useSelect)((select6) => {
      const { getEditorSettings: getEditorSettings2, getCurrentTemplateId: getCurrentTemplateId2 } = select6(store);
      return {
        onNavigateToEntityRecord: getEditorSettings2().onNavigateToEntityRecord,
        templateId: getCurrentTemplateId2()
      };
    }, []);
    const canEditTemplate = (0, import_data197.useSelect)(
      (select6) => !!select6(import_core_data115.store).canUser("create", {
        kind: "postType",
        name: "wp_template"
      }),
      []
    );
    const [isDialogOpen, setIsDialogOpen] = (0, import_element165.useState)(false);
    (0, import_element165.useEffect)(() => {
      const handleDblClick = (event) => {
        if (!canEditTemplate) {
          return;
        }
        if (!event.target.classList.contains("is-root-container") || event.target.dataset?.type === "core/template-part") {
          return;
        }
        if (!event.defaultPrevented) {
          event.preventDefault();
          setIsDialogOpen(true);
        }
      };
      const canvas = contentRef.current;
      canvas?.addEventListener("dblclick", handleDblClick);
      return () => {
        canvas?.removeEventListener("dblclick", handleDblClick);
      };
    }, [contentRef, canEditTemplate]);
    if (!canEditTemplate) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
      import_components193.__experimentalConfirmDialog,
      {
        isOpen: isDialogOpen,
        confirmButtonText: (0, import_i18n216.__)("Edit template"),
        onConfirm: () => {
          setIsDialogOpen(false);
          onNavigateToEntityRecord({
            postId: templateId2,
            postType: "wp_template"
          });
        },
        onCancel: () => setIsDialogOpen(false),
        size: "medium",
        children: (0, import_i18n216.__)(
          "You\u2019ve tried to select a block that is part of a template that may be used elsewhere on your site. Would you like to edit the template?"
        )
      }
    );
  }

  // packages/editor/build-module/components/visual-editor/use-select-nearest-editable-block.mjs
  var import_compose53 = __toESM(require_compose(), 1);
  var import_data198 = __toESM(require_data(), 1);
  var import_block_editor75 = __toESM(require_block_editor(), 1);
  var DISTANCE_THRESHOLD = 500;
  function clamp2(value, min2, max2) {
    return Math.min(Math.max(value, min2), max2);
  }
  function distanceFromRect(x2, y3, rect) {
    const dx = x2 - clamp2(x2, rect.left, rect.right);
    const dy = y3 - clamp2(y3, rect.top, rect.bottom);
    return Math.sqrt(dx * dx + dy * dy);
  }
  function useSelectNearestEditableBlock({
    isEnabled = true
  } = {}) {
    const { getEnabledClientIdsTree, getBlockName: getBlockName2, getBlockOrder: getBlockOrder2 } = unlock(
      (0, import_data198.useSelect)(import_block_editor75.store)
    );
    const { selectBlock: selectBlock2 } = (0, import_data198.useDispatch)(import_block_editor75.store);
    return (0, import_compose53.useRefEffect)(
      (element) => {
        if (!isEnabled) {
          return;
        }
        const selectNearestEditableBlock = (x2, y3) => {
          const editableBlockClientIds = getEnabledClientIdsTree().flatMap(({ clientId }) => {
            const blockName = getBlockName2(clientId);
            if (blockName === "core/template-part") {
              return [];
            }
            if (blockName === "core/post-content") {
              const innerBlocks = getBlockOrder2(clientId);
              if (innerBlocks.length) {
                return innerBlocks;
              }
            }
            return [clientId];
          });
          let nearestDistance = Infinity, nearestClientId = null;
          for (const clientId of editableBlockClientIds) {
            const block = element.querySelector(
              `[data-block="${clientId}"]`
            );
            if (!block) {
              continue;
            }
            const rect = block.getBoundingClientRect();
            const distance = distanceFromRect(x2, y3, rect);
            if (distance < nearestDistance && distance < DISTANCE_THRESHOLD) {
              nearestDistance = distance;
              nearestClientId = clientId;
            }
          }
          if (nearestClientId) {
            selectBlock2(nearestClientId);
          }
        };
        const handleClick = (event) => {
          const shouldSelect = event.target === element || event.target.classList.contains("is-root-container");
          if (shouldSelect) {
            selectNearestEditableBlock(event.clientX, event.clientY);
          }
        };
        element.addEventListener("click", handleClick);
        return () => element.removeEventListener("click", handleClick);
      },
      [isEnabled]
    );
  }

  // packages/editor/build-module/components/visual-editor/use-zoom-out-mode-exit.mjs
  var import_data199 = __toESM(require_data(), 1);
  var import_compose54 = __toESM(require_compose(), 1);
  var import_block_editor76 = __toESM(require_block_editor(), 1);
  function useZoomOutModeExit() {
    const { getSettings: getSettings10, isZoomOut } = unlock((0, import_data199.useSelect)(import_block_editor76.store));
    const { resetZoomLevel } = unlock((0, import_data199.useDispatch)(import_block_editor76.store));
    return (0, import_compose54.useRefEffect)(
      (node) => {
        function onDoubleClick(event) {
          if (!isZoomOut()) {
            return;
          }
          if (!event.defaultPrevented) {
            event.preventDefault();
            const { __experimentalSetIsInserterOpened } = getSettings10();
            if (typeof __experimentalSetIsInserterOpened === "function") {
              __experimentalSetIsInserterOpened(false);
            }
            resetZoomLevel();
          }
        }
        node.addEventListener("dblclick", onDoubleClick);
        return () => {
          node.removeEventListener("dblclick", onDoubleClick);
        };
      },
      [getSettings10, isZoomOut, resetZoomLevel]
    );
  }

  // packages/editor/build-module/components/visual-editor/use-padding-appender.mjs
  var import_data200 = __toESM(require_data(), 1);
  var import_compose55 = __toESM(require_compose(), 1);
  var import_block_editor77 = __toESM(require_block_editor(), 1);
  var import_blocks32 = __toESM(require_blocks(), 1);
  var CSS2 = ':root :where(.editor-styles-wrapper)::after {content: ""; display: block; height: 40vh;}';
  function usePaddingAppender(enabled) {
    const registry = (0, import_data200.useRegistry)();
    const effect = (0, import_compose55.useRefEffect)(
      (node) => {
        function onMouseDown(event) {
          if (event.target !== node && // Tests for the parent element because in the iframed editor if the click is
          // below the padding the target will be the parent element (html) and should
          // still be treated as intent to append.
          event.target !== node.parentElement) {
            return;
          }
          const lastChild = node.lastElementChild;
          if (!lastChild) {
            return;
          }
          const lastChildRect = lastChild.getBoundingClientRect();
          if (event.clientY < lastChildRect.bottom) {
            return;
          }
          event.preventDefault();
          const blockOrder = registry.select(import_block_editor77.store).getBlockOrder("");
          const lastBlockClientId = blockOrder[blockOrder.length - 1];
          const lastBlock = registry.select(import_block_editor77.store).getBlock(lastBlockClientId);
          const { selectBlock: selectBlock2, insertDefaultBlock: insertDefaultBlock2 } = registry.dispatch(import_block_editor77.store);
          if (lastBlock && (0, import_blocks32.isUnmodifiedDefaultBlock)(lastBlock)) {
            selectBlock2(lastBlockClientId);
          } else {
            insertDefaultBlock2();
          }
        }
        const { ownerDocument } = node;
        ownerDocument.addEventListener("pointerdown", onMouseDown);
        return () => {
          ownerDocument.removeEventListener("pointerdown", onMouseDown);
        };
      },
      [registry]
    );
    return enabled ? [effect, CSS2] : [];
  }

  // packages/editor/build-module/components/visual-editor/use-edit-content-only-section-exit.mjs
  var import_data201 = __toESM(require_data(), 1);
  var import_compose56 = __toESM(require_compose(), 1);
  var import_block_editor78 = __toESM(require_block_editor(), 1);
  function useEditContentOnlySectionExit() {
    const { getEditedContentOnlySection } = unlock(
      (0, import_data201.useSelect)(import_block_editor78.store)
    );
    const { stopEditingContentOnlySection } = unlock(
      (0, import_data201.useDispatch)(import_block_editor78.store)
    );
    return (0, import_compose56.useRefEffect)(
      (node) => {
        function onClick(event) {
          const editedContentOnlySection = getEditedContentOnlySection();
          if (!editedContentOnlySection) {
            return;
          }
          const isClickOutside = !event.target.closest(
            `[data-block="${editedContentOnlySection}"]`
          );
          if (isClickOutside && !event.defaultPrevented) {
            event.preventDefault();
            stopEditingContentOnlySection();
          }
        }
        node.addEventListener("click", onClick);
        return () => {
          node.removeEventListener("click", onClick);
        };
      },
      [getEditedContentOnlySection, stopEditingContentOnlySection]
    );
  }

  // packages/editor/build-module/components/sync-connection-error-modal/index.mjs
  var import_data202 = __toESM(require_data(), 1);
  var import_compose57 = __toESM(require_compose(), 1);
  var import_blocks33 = __toESM(require_blocks(), 1);
  var import_core_data116 = __toESM(require_core_data(), 1);
  var import_block_editor79 = __toESM(require_block_editor(), 1);
  var import_components194 = __toESM(require_components(), 1);
  var import_hooks56 = __toESM(require_hooks(), 1);
  var import_element167 = __toESM(require_element(), 1);
  var import_i18n217 = __toESM(require_i18n(), 1);

  // packages/editor/build-module/components/sync-connection-error-modal/use-retry-countdown.mjs
  var import_element166 = __toESM(require_element(), 1);
  function useRetryCountdown(connectionStatus) {
    const [secondsRemaining, setSecondsRemaining] = (0, import_element166.useState)();
    const hasRetriedRef = (0, import_element166.useRef)(false);
    (0, import_element166.useEffect)(() => {
      if (!connectionStatus) {
        return;
      }
      if ("connected" === connectionStatus.status) {
        setSecondsRemaining(void 0);
        hasRetriedRef.current = false;
        return;
      }
      if ("disconnected" !== connectionStatus.status || !connectionStatus.willAutoRetryInMs) {
        return;
      }
      const { willAutoRetryInMs: retryInMs } = connectionStatus;
      const retryAt = Date.now() + retryInMs;
      const hasRetried = hasRetriedRef.current;
      hasRetriedRef.current = true;
      if (hasRetried) {
        setSecondsRemaining(0);
      }
      let countdownIntervalId = null;
      const startCountdown = () => {
        setSecondsRemaining(Math.ceil((retryAt - Date.now()) / 1e3));
        countdownIntervalId = setInterval(() => {
          const remaining = Math.ceil((retryAt - Date.now()) / 1e3);
          setSecondsRemaining(Math.max(0, remaining));
          if (remaining <= 0 && countdownIntervalId) {
            clearInterval(countdownIntervalId);
          }
        }, 1e3);
      };
      const retryingDelayId = hasRetried ? setTimeout(startCountdown, 500) : null;
      if (!retryingDelayId) {
        startCountdown();
      }
      return () => {
        if (retryingDelayId) {
          clearTimeout(retryingDelayId);
        }
        if (countdownIntervalId) {
          clearInterval(countdownIntervalId);
        }
      };
    }, [connectionStatus]);
    return {
      onManualRetry: () => {
        setSecondsRemaining(0);
      },
      secondsRemaining
    };
  }

  // packages/editor/build-module/components/sync-connection-error-modal/index.mjs
  var import_jsx_runtime337 = __toESM(require_jsx_runtime(), 1);
  var { BlockCanvasCover: BlockCanvasCover2 } = unlock(import_block_editor79.privateApis);
  var { retrySyncConnection } = unlock(import_core_data116.privateApis);
  var INITIAL_DISCONNECTED_DEBOUNCE_MS = 2e4;
  function SyncConnectionErrorModal() {
    const [hasInitialized, setHasInitialized] = (0, import_element167.useState)(false);
    const [showModal, setShowModal] = (0, import_element167.useState)(false);
    const [isManualRetryAvailable, setIsManualRetryAvailable] = (0, import_element167.useState)(false);
    const { connectionStatus, isCollaborationEnabled, postType: postType2 } = (0, import_data202.useSelect)(
      (selectFn) => {
        const { getSyncConnectionStatus, getPostType } = unlock(
          selectFn(import_core_data116.store)
        );
        const { getCurrentPostType: getCurrentPostType2, isCollaborationEnabledForCurrentPost: isCollaborationEnabledForCurrentPost2 } = unlock(selectFn(store));
        const currentPostType = getCurrentPostType2();
        return {
          connectionStatus: getSyncConnectionStatus() || null,
          isCollaborationEnabled: isCollaborationEnabledForCurrentPost2(),
          postType: currentPostType ? getPostType(currentPostType) : null
        };
      },
      []
    );
    const { onManualRetry, secondsRemaining } = useRetryCountdown(connectionStatus);
    const copyButtonRef = (0, import_compose57.useCopyToClipboard)(() => {
      const blocks = (0, import_data202.select)(import_block_editor79.store).getBlocks();
      return (0, import_blocks33.serialize)(blocks);
    });
    (0, import_element167.useEffect)(() => {
      const timeout = setTimeout(() => {
        setHasInitialized(true);
      }, INITIAL_DISCONNECTED_DEBOUNCE_MS);
      return () => clearTimeout(timeout);
    }, []);
    (0, import_element167.useEffect)(() => {
      if ("connecting" === connectionStatus?.status) {
        return;
      }
      setIsManualRetryAvailable(
        connectionStatus !== null && "canManuallyRetry" in connectionStatus && connectionStatus.canManuallyRetry === true
      );
    }, [connectionStatus]);
    const canRetry = connectionStatus && "disconnected" === connectionStatus.status && (connectionStatus.canManuallyRetry || connectionStatus.willAutoRetryInMs);
    (0, import_element167.useEffect)(() => {
      if ("connected" === connectionStatus?.status) {
        setShowModal(false);
        return;
      }
      if (connectionStatus?.status && "connecting" !== connectionStatus.status && (!canRetry || connectionStatus.backgroundRetriesFailed)) {
        setShowModal(true);
      }
    }, [connectionStatus, canRetry]);
    if (!isCollaborationEnabled || !hasInitialized || !showModal) {
      return null;
    }
    const error = connectionStatus && "error" in connectionStatus ? connectionStatus?.error : void 0;
    if (!canRetry && (0, import_hooks56.applyFilters)(
      "editor.isSyncConnectionErrorHandled",
      false,
      error?.code
    ) !== false) {
      return null;
    }
    const manualRetry = isManualRetryAvailable ? () => {
      onManualRetry();
      retrySyncConnection();
    } : void 0;
    const messages = getSyncErrorMessages(error);
    let retryCountdownText = "";
    let isRetrying = false;
    if (secondsRemaining && secondsRemaining > 0) {
      retryCountdownText = (0, import_i18n217.sprintf)(
        /* translators: %d: number of seconds until retry */
        (0, import_i18n217._n)(
          "Retrying connection in %d second\u2026",
          "Retrying connection in %d seconds\u2026",
          secondsRemaining
        ),
        secondsRemaining
      );
    } else if (0 === secondsRemaining) {
      isRetrying = true;
      retryCountdownText = (0, import_i18n217.__)("Retrying\u2026");
    }
    let editPostHref = "edit.php";
    if (postType2?.slug) {
      editPostHref = `edit.php?post_type=${postType2.slug}`;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(BlockCanvasCover2.Fill, { children: /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
      import_components194.Modal,
      {
        overlayClassName: "editor-sync-connection-error-modal",
        isDismissible: false,
        onRequestClose: () => {
        },
        shouldCloseOnClickOutside: false,
        shouldCloseOnEsc: false,
        size: "medium",
        title: messages.title,
        children: /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)(import_components194.__experimentalVStack, { spacing: 6, children: [
          /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("p", { children: messages.description }),
          retryCountdownText && /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("p", { className: "editor-sync-connection-error-modal__retry-countdown", children: retryCountdownText }),
          /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)(import_components194.__experimentalHStack, { justify: "right", children: [
            /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
              import_components194.Button,
              {
                __next40pxDefaultSize: true,
                href: editPostHref,
                isDestructive: true,
                variant: "tertiary",
                children: (0, import_i18n217.sprintf)(
                  /* translators: %s: Post type name (e.g., "Posts", "Pages"). */
                  (0, import_i18n217.__)("Back to %s"),
                  postType2?.labels?.name ?? (0, import_i18n217.__)("Posts")
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
              import_components194.Button,
              {
                __next40pxDefaultSize: true,
                ref: copyButtonRef,
                variant: manualRetry ? "secondary" : "primary",
                children: (0, import_i18n217.__)("Copy Post Content")
              }
            ),
            manualRetry && /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
              import_components194.Button,
              {
                __next40pxDefaultSize: true,
                accessibleWhenDisabled: true,
                "aria-disabled": isRetrying,
                disabled: isRetrying,
                isBusy: isRetrying,
                variant: "primary",
                onClick: manualRetry,
                children: (0, import_i18n217.__)("Retry")
              }
            )
          ] })
        ] })
      }
    ) });
  }

  // packages/editor/build-module/components/visual-editor/index.mjs
  var import_jsx_runtime338 = __toESM(require_jsx_runtime(), 1);
  var {
    LayoutStyle,
    useLayoutClasses,
    useLayoutStyles,
    ExperimentalBlockCanvas: BlockCanvas,
    useFlashEditableBlocks
  } = unlock(import_block_editor80.privateApis);
  function getPostContentAttributes(blocks) {
    for (let i3 = 0; i3 < blocks.length; i3++) {
      if (blocks[i3].name === "core/post-content") {
        return blocks[i3].attributes;
      }
      if (blocks[i3].innerBlocks.length) {
        const nestedPostContent = getPostContentAttributes(
          blocks[i3].innerBlocks
        );
        if (nestedPostContent) {
          return nestedPostContent;
        }
      }
    }
  }
  function checkForPostContentAtRootLevel(blocks) {
    for (let i3 = 0; i3 < blocks.length; i3++) {
      if (blocks[i3].name === "core/post-content") {
        return true;
      }
    }
    return false;
  }
  function VisualEditor({
    // Ideally as we unify post and site editors, we won't need these props.
    autoFocus,
    disableIframe = false,
    iframeProps,
    contentRef,
    className
  }) {
    const isMobileViewport = (0, import_compose58.useViewportMatch)("small", "<");
    const {
      renderingMode: renderingMode2,
      postContentAttributes,
      editedPostTemplate = {},
      wrapperBlockName,
      wrapperUniqueId,
      deviceType: deviceType2,
      isFocusedEntity,
      isDesignPostType,
      postType: postType2,
      isPreview,
      styles,
      canvasMinHeight: canvasMinHeight2
    } = (0, import_data203.useSelect)((select6) => {
      const {
        getCurrentPostId: getCurrentPostId2,
        getCurrentPostType: getCurrentPostType2,
        getCurrentTemplateId: getCurrentTemplateId2,
        getEditorSettings: getEditorSettings2,
        getRenderingMode: getRenderingMode2,
        getDeviceType: getDeviceType2,
        getCanvasMinHeight: getCanvasMinHeight2
      } = unlock(select6(store));
      const { getPostType, getEditedEntityRecord } = select6(import_core_data117.store);
      const postTypeSlug = getCurrentPostType2();
      const _renderingMode = getRenderingMode2();
      let _wrapperBlockName;
      if (postTypeSlug === PATTERN_POST_TYPE) {
        _wrapperBlockName = "core/block";
      } else if (_renderingMode === "post-only") {
        _wrapperBlockName = "core/post-content";
      }
      const editorSettings2 = getEditorSettings2();
      const supportsTemplateMode = editorSettings2.supportsTemplateMode;
      const postTypeObject = getPostType(postTypeSlug);
      const currentTemplateId = getCurrentTemplateId2();
      const template2 = currentTemplateId ? getEditedEntityRecord(
        "postType",
        TEMPLATE_POST_TYPE,
        currentTemplateId
      ) : void 0;
      return {
        renderingMode: _renderingMode,
        postContentAttributes: editorSettings2.postContentAttributes,
        isDesignPostType: DESIGN_POST_TYPES.includes(postTypeSlug),
        // Post template fetch returns a 404 on classic themes, which
        // messes with e2e tests, so check it's a block theme first.
        editedPostTemplate: postTypeObject?.viewable && supportsTemplateMode ? template2 : void 0,
        wrapperBlockName: _wrapperBlockName,
        wrapperUniqueId: getCurrentPostId2(),
        deviceType: getDeviceType2(),
        isFocusedEntity: !!editorSettings2.onNavigateToPreviousEntityRecord,
        postType: postTypeSlug,
        isPreview: editorSettings2.isPreviewMode,
        styles: editorSettings2.styles,
        canvasMinHeight: getCanvasMinHeight2()
      };
    }, []);
    const { isCleanNewPost: isCleanNewPost2 } = (0, import_data203.useSelect)(store);
    const {
      hasRootPaddingAwareAlignments,
      themeHasDisabledLayoutStyles,
      themeSupportsLayout,
      isZoomedOut
    } = (0, import_data203.useSelect)((select6) => {
      const { getSettings: getSettings10, isZoomOut: _isZoomOut } = unlock(
        select6(import_block_editor80.store)
      );
      const _settings = getSettings10();
      return {
        themeHasDisabledLayoutStyles: _settings.disableLayoutStyles,
        themeSupportsLayout: _settings.supportsLayout,
        hasRootPaddingAwareAlignments: _settings.__experimentalFeatures?.useRootPaddingAwareAlignments,
        isZoomedOut: _isZoomOut()
      };
    }, []);
    const localRef = (0, import_element168.useRef)();
    const deviceStyles = (0, import_block_editor80.__experimentalUseResizeCanvas)(deviceType2);
    const [globalLayoutSettings] = (0, import_block_editor80.useSettings)("layout");
    const fallbackLayout = (0, import_element168.useMemo)(() => {
      if (renderingMode2 !== "post-only" || isDesignPostType) {
        return { type: "default" };
      }
      if (themeSupportsLayout) {
        return { ...globalLayoutSettings, type: "constrained" };
      }
      return { type: "default" };
    }, [
      renderingMode2,
      themeSupportsLayout,
      globalLayoutSettings,
      isDesignPostType
    ]);
    const newestPostContentAttributes = (0, import_element168.useMemo)(() => {
      if (!editedPostTemplate?.content && !editedPostTemplate?.blocks && postContentAttributes) {
        return postContentAttributes;
      }
      if (editedPostTemplate?.blocks) {
        return getPostContentAttributes(editedPostTemplate?.blocks);
      }
      const parseableContent = typeof editedPostTemplate?.content === "string" ? editedPostTemplate?.content : "";
      return getPostContentAttributes((0, import_blocks34.parse)(parseableContent)) || {};
    }, [
      editedPostTemplate?.content,
      editedPostTemplate?.blocks,
      postContentAttributes
    ]);
    const hasPostContentAtRootLevel = (0, import_element168.useMemo)(() => {
      if (!editedPostTemplate?.content && !editedPostTemplate?.blocks) {
        return false;
      }
      if (editedPostTemplate?.blocks) {
        return checkForPostContentAtRootLevel(editedPostTemplate?.blocks);
      }
      const parseableContent = typeof editedPostTemplate?.content === "string" ? editedPostTemplate?.content : "";
      return checkForPostContentAtRootLevel((0, import_blocks34.parse)(parseableContent)) || false;
    }, [editedPostTemplate?.content, editedPostTemplate?.blocks]);
    const { layout = {}, align = "" } = newestPostContentAttributes || {};
    const postContentLayoutClasses = useLayoutClasses(
      newestPostContentAttributes,
      "core/post-content"
    );
    const blockListLayoutClass = clsx_default(
      {
        "is-layout-flow": !themeSupportsLayout
      },
      themeSupportsLayout && postContentLayoutClasses,
      align && `align${align}`
    );
    const postContentLayoutStyles = useLayoutStyles(
      newestPostContentAttributes,
      "core/post-content",
      ".block-editor-block-list__layout.is-root-container"
    );
    const postContentLayout = (0, import_element168.useMemo)(() => {
      return layout && (layout?.type === "constrained" || layout?.inherit || layout?.contentSize || layout?.wideSize) ? { ...globalLayoutSettings, ...layout, type: "constrained" } : { ...globalLayoutSettings, ...layout, type: "default" };
    }, [
      layout?.type,
      layout?.inherit,
      layout?.contentSize,
      layout?.wideSize,
      globalLayoutSettings
    ]);
    const blockListLayout = postContentAttributes ? postContentLayout : fallbackLayout;
    const postEditorLayout = blockListLayout?.type === "default" && !hasPostContentAtRootLevel ? fallbackLayout : blockListLayout;
    const observeTypingRef = (0, import_block_editor80.__unstableUseTypingObserver)();
    const titleRef = (0, import_element168.useRef)();
    (0, import_element168.useEffect)(() => {
      if (!autoFocus || !isCleanNewPost2()) {
        return;
      }
      titleRef?.current?.focus();
    }, [autoFocus, isCleanNewPost2]);
    const alignCSS = `.is-root-container.alignwide { max-width: var(--wp--style--global--wide-size); margin-left: auto; margin-right: auto;}
		.is-root-container.alignwide:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: var(--wp--style--global--wide-size);}
		.is-root-container.alignfull { max-width: none; margin-left: auto; margin-right: auto;}
		.is-root-container.alignfull:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: none;}`;
    const enableResizing = [
      NAVIGATION_POST_TYPE,
      TEMPLATE_PART_POST_TYPE,
      PATTERN_POST_TYPE
    ].includes(postType2) && // Disable in previews / view mode.
    !isPreview && // Disable resizing in mobile viewport.
    !isMobileViewport && // Disable resizing in zoomed-out mode.
    !isZoomedOut;
    const calculatedMinHeight = (0, import_element168.useMemo)(() => {
      if (!localRef.current) {
        return canvasMinHeight2;
      }
      const { ownerDocument } = localRef.current;
      const scrollTop = ownerDocument.documentElement.scrollTop || ownerDocument.body.scrollTop;
      return canvasMinHeight2 + scrollTop;
    }, [canvasMinHeight2]);
    const [paddingAppenderRef, paddingStyle] = usePaddingAppender(
      !isPreview && renderingMode2 === "post-only" && !isDesignPostType
    );
    const iframeStyles = (0, import_element168.useMemo)(() => {
      return [
        ...styles ?? [],
        {
          // Ensures margins of children are contained so that the body background paints behind them.
          // Otherwise, the background of html (when zoomed out) would show there and appear broken. It's
          // important mostly for post-only views yet conceivably an issue in templated views too.
          css: `:where(.block-editor-iframe__body){display:flow-root;${calculatedMinHeight ? `min-height:${calculatedMinHeight}px;` : ""}}.is-root-container{display:flow-root;${// Some themes will have `min-height: 100vh` for the root container,
          // which isn't a requirement in auto resize mode.
          enableResizing ? "min-height:0!important;" : ""}}
				${paddingStyle ? paddingStyle : ""}
				${enableResizing ? `.block-editor-iframe__html{background:var(--wp-editor-canvas-background);display:flex;align-items:center;justify-content:center;min-height:100vh;}.block-editor-iframe__body{width:100%;}` : ""}`
          // The CSS above centers the body content vertically when resizing is enabled and applies a background
          // color to the iframe HTML element to match the background color of the editor canvas.
        }
      ];
    }, [styles, enableResizing, calculatedMinHeight, paddingStyle]);
    const typewriterRef = (0, import_block_editor80.__unstableUseTypewriter)();
    contentRef = (0, import_compose58.useMergeRefs)([
      localRef,
      contentRef,
      renderingMode2 === "post-only" ? typewriterRef : null,
      useFlashEditableBlocks({
        isEnabled: renderingMode2 === "template-locked"
      }),
      useSelectNearestEditableBlock({
        isEnabled: renderingMode2 === "template-locked"
      }),
      useZoomOutModeExit(),
      paddingAppenderRef,
      useEditContentOnlySectionExit()
    ]);
    return /* @__PURE__ */ (0, import_jsx_runtime338.jsxs)(
      "div",
      {
        className: clsx_default(
          "editor-visual-editor",
          // this class is here for backward compatibility reasons.
          "edit-post-visual-editor",
          className,
          {
            "has-padding": isFocusedEntity || enableResizing,
            "is-resizable": enableResizing,
            "is-iframed": !disableIframe
          }
        ),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(SyncConnectionErrorModal, {}),
          /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(resizable_editor_default, { enableResizing, height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime338.jsxs)(
            BlockCanvas,
            {
              shouldIframe: !disableIframe,
              contentRef,
              styles: iframeStyles,
              height: "100%",
              iframeProps: {
                ...iframeProps,
                style: {
                  ...iframeProps?.style,
                  ...deviceStyles
                }
              },
              children: [
                themeSupportsLayout && !themeHasDisabledLayoutStyles && renderingMode2 === "post-only" && !isDesignPostType && /* @__PURE__ */ (0, import_jsx_runtime338.jsxs)(import_jsx_runtime338.Fragment, { children: [
                  /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(
                    LayoutStyle,
                    {
                      selector: ".editor-visual-editor__post-title-wrapper",
                      layout: fallbackLayout
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(
                    LayoutStyle,
                    {
                      selector: ".block-editor-block-list__layout.is-root-container",
                      layout: postEditorLayout
                    }
                  ),
                  align && /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(LayoutStyle, { css: alignCSS }),
                  postContentLayoutStyles && /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(
                    LayoutStyle,
                    {
                      layout: postContentLayout,
                      css: postContentLayoutStyles
                    }
                  )
                ] }),
                renderingMode2 === "post-only" && !isDesignPostType && /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(
                  "div",
                  {
                    className: clsx_default(
                      "editor-visual-editor__post-title-wrapper",
                      // The following class is only here for backward compatibility
                      // some themes might be using it to style the post title.
                      "edit-post-visual-editor__post-title-wrapper",
                      {
                        "has-global-padding": hasRootPaddingAwareAlignments
                      }
                    ),
                    contentEditable: false,
                    ref: observeTypingRef,
                    style: {
                      // This is using inline styles
                      // so it's applied for both iframed and non iframed editors.
                      marginTop: "4rem"
                    },
                    children: /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(post_title_default, { ref: titleRef })
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime338.jsxs)(
                  import_block_editor80.RecursionProvider,
                  {
                    blockName: wrapperBlockName,
                    uniqueId: wrapperUniqueId,
                    children: [
                      /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(
                        import_block_editor80.BlockList,
                        {
                          className: clsx_default(
                            "is-" + deviceType2.toLowerCase() + "-preview",
                            renderingMode2 !== "post-only" || isDesignPostType ? "wp-site-blocks" : `${blockListLayoutClass} wp-block-post-content`,
                            // Ensure root level blocks receive default/flow blockGap styling rules.
                            {
                              "has-global-padding": renderingMode2 === "post-only" && !isDesignPostType && hasRootPaddingAwareAlignments
                            }
                          ),
                          layout: blockListLayout,
                          dropZoneElement: (
                            // When iframed, pass in the html element of the iframe to
                            // ensure the drop zone extends to the edges of the iframe.
                            disableIframe ? localRef.current : localRef.current?.parentNode
                          ),
                          __unstableDisableDropZone: (
                            // In template preview mode, disable drop zones at the root of the template.
                            renderingMode2 === "template-locked" ? true : false
                          )
                        }
                      ),
                      renderingMode2 === "template-locked" && /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(
                        EditTemplateBlocksNotification,
                        {
                          contentRef: localRef
                        }
                      )
                    ]
                  }
                )
              ]
            }
          ) })
        ]
      }
    );
  }
  var visual_editor_default = VisualEditor;

  // packages/editor/build-module/components/post-revisions-preview/diff-format-types.mjs
  var import_i18n218 = __toESM(require_i18n(), 1);
  var import_rich_text4 = __toESM(require_rich_text(), 1);
  var DIFF_FORMAT_TYPES = [
    {
      name: "revision/diff-removed",
      title: (0, import_i18n218.__)("Removed"),
      tagName: "del",
      className: "revision-diff-removed"
    },
    {
      name: "revision/diff-added",
      title: (0, import_i18n218.__)("Added"),
      tagName: "ins",
      className: "revision-diff-added"
    },
    {
      name: "revision/diff-format-added",
      title: (0, import_i18n218.__)("Format added"),
      tagName: "span",
      className: "revision-diff-format-added"
    },
    {
      name: "revision/diff-format-removed",
      title: (0, import_i18n218.__)("Format removed"),
      tagName: "span",
      className: "revision-diff-format-removed"
    },
    {
      name: "revision/diff-format-changed",
      title: (0, import_i18n218.__)("Format changed"),
      tagName: "span",
      className: "revision-diff-format-changed"
    }
  ];
  function registerDiffFormatTypes() {
    for (const formatType of DIFF_FORMAT_TYPES) {
      (0, import_rich_text4.registerFormatType)(formatType.name, {
        ...formatType,
        attributes: { title: "title" },
        edit: () => null
      });
    }
  }
  function unregisterDiffFormatTypes() {
    for (const formatType of DIFF_FORMAT_TYPES) {
      (0, import_rich_text4.unregisterFormatType)(formatType.name);
    }
  }

  // packages/editor/build-module/components/post-revisions-preview/diff-markers.mjs
  var import_element169 = __toESM(require_element(), 1);
  var import_compose59 = __toESM(require_compose(), 1);
  var import_data204 = __toESM(require_data(), 1);
  var import_block_editor81 = __toESM(require_block_editor(), 1);
  var import_i18n219 = __toESM(require_i18n(), 1);
  var import_components195 = __toESM(require_components(), 1);
  var import_jsx_runtime339 = __toESM(require_jsx_runtime(), 1);
  var { useBlockElementRef } = unlock(import_block_editor81.privateApis);
  function collectDiffBlocks(blocks) {
    const result = [];
    for (const block of blocks) {
      if (block.__revisionDiffStatus?.status) {
        result.push({
          clientId: block.clientId,
          status: block.__revisionDiffStatus.status
        });
      }
      if (block.innerBlocks?.length) {
        result.push(...collectDiffBlocks(block.innerBlocks));
      }
    }
    return result;
  }
  var STATUS_LABELS = {
    added: (0, import_i18n219.__)("Go to added block"),
    removed: (0, import_i18n219.__)("Go to removed block"),
    modified: (0, import_i18n219.__)("Go to modified block")
  };
  function calculatePosition(el) {
    if (!el) {
      return null;
    }
    const doc = el.ownerDocument;
    const scrollHeight = doc.documentElement.scrollHeight;
    const rect = el.getBoundingClientRect();
    const scrollTop = doc.documentElement.scrollTop;
    const top = rect.top + scrollTop;
    return {
      top: top / scrollHeight * 100,
      height: rect.height / scrollHeight * 100
    };
  }
  function DiffMarkerButton({ clientId, status, subscribe }) {
    const blockRef = (0, import_element169.useRef)();
    useBlockElementRef(clientId, blockRef);
    const [position, setPosition] = (0, import_element169.useState)(
      () => calculatePosition(blockRef.current)
    );
    (0, import_element169.useEffect)(() => {
      return subscribe(() => {
        setPosition(calculatePosition(blockRef.current));
      });
    }, [subscribe]);
    (0, import_element169.useEffect)(() => {
      setPosition(calculatePosition(blockRef.current));
    }, [status]);
    if (!position) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(import_components195.Tooltip, { text: STATUS_LABELS[status], children: /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
      "button",
      {
        className: `revision-diff-marker is-${status}`,
        style: {
          top: `${position.top}%`,
          height: `${Math.max(position.height, 0.5)}%`
        },
        onClick: () => blockRef.current?.focus(),
        "aria-label": STATUS_LABELS[status]
      }
    ) });
  }
  function useDiffMarkers() {
    const [isMounted, setIsMounted] = (0, import_element169.useState)(false);
    const subscribersRef = (0, import_element169.useRef)(/* @__PURE__ */ new Set());
    const blocks = (0, import_data204.useSelect)(
      (select6) => select6(import_block_editor81.store).getBlocks(),
      []
    );
    const diffBlocks = (0, import_element169.useMemo)(() => collectDiffBlocks(blocks), [blocks]);
    const subscribe = (0, import_element169.useCallback)((callback) => {
      subscribersRef.current.add(callback);
      return () => subscribersRef.current.delete(callback);
    }, []);
    const contentRef = (0, import_compose59.useRefEffect)((element) => {
      const { ownerDocument } = element;
      const { defaultView } = ownerDocument;
      const resizeObserver = new defaultView.ResizeObserver(() => {
        subscribersRef.current.forEach((cb) => cb());
      });
      resizeObserver.observe(ownerDocument.body);
      return () => {
        resizeObserver.disconnect();
      };
    }, []);
    return [
      (0, import_compose59.useMergeRefs)([contentRef, setIsMounted]),
      /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
        "div",
        {
          className: "revision-diff-markers",
          role: "navigation",
          "aria-label": (0, import_i18n219.__)("Document changes"),
          children: isMounted && diffBlocks.map(({ clientId, status }) => /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
            DiffMarkerButton,
            {
              clientId,
              status,
              subscribe
            },
            clientId
          ))
        },
        "diff-markers"
      )
    ];
  }

  // packages/editor/build-module/components/post-revisions-preview/revisions-canvas.mjs
  var import_jsx_runtime340 = __toESM(require_jsx_runtime(), 1);
  var { usePrivateStyleOverride } = unlock(import_block_editor82.privateApis);
  var REVISION_REMOVED_FILTER_SVG = `
<svg
	xmlns="http://www.w3.org/2000/svg"
	viewBox="0 0 0 0"
	width="0"
	height="0"
	focusable="false"
	role="none"
	aria-hidden="true"
	style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
>
	<defs>
		<filter id="revision-removed-filter" x="0" y="0" width="100%" height="100%">
			<!-- Desaturate and add red tint -->
			<feColorMatrix type="matrix"
				values="0.5 0.3 0.2 0 0.15
				        0.2 0.2 0.1 0 0
				        0.2 0.2 0.1 0 0
				        0   0   0   0.8 0"/>
		</filter>
	</defs>
</svg>
`;
  var REVISION_DIFF_STYLES = `
	.is-revision-added {
		box-shadow: inset 0 0 0 9999px color-mix(in srgb, currentColor 5%, #00a32a 15%), 0 0 0 4px color-mix(in srgb, currentColor 5%, #00a32a 15%);
	}
	.is-revision-removed,
	.revision-diff-removed {
		text-decoration: line-through;
		filter: url(#revision-removed-filter);
	}
	.is-revision-modified {
		outline: 2px solid color-mix(in srgb, currentColor 30%, #dba617 70%) !important;
		outline-offset: 2px;
	}
	.revision-diff-added {
		background-color: color-mix(in srgb, currentColor 5%, #00a32a 15%);
		text-decoration: none;
	}
	.revision-diff-format-added {
		text-decoration: underline wavy color-mix(in srgb, currentColor 30%, #00a32a 70%);
		text-decoration-thickness: 2px;
	}
	.revision-diff-format-removed {
		text-decoration: underline wavy color-mix(in srgb, currentColor 20%, #d63638 80%);
		text-decoration-thickness: 2px;
	}
	.revision-diff-format-changed {
		text-decoration: underline wavy color-mix(in srgb, currentColor 30%, #dba617 70%);
		text-decoration-thickness: 2px;
	}
`;
  function withRevisionDiffClasses(BlockListBlock) {
    return (props) => {
      const { block, className } = props;
      const diffStatus = block?.__revisionDiffStatus?.status;
      const enhancedClassName = clsx_default(className, {
        "is-revision-added": diffStatus === "added",
        "is-revision-removed": diffStatus === "removed",
        "is-revision-modified": diffStatus === "modified"
      });
      return /* @__PURE__ */ (0, import_jsx_runtime340.jsx)(BlockListBlock, { ...props, className: enhancedClassName });
    };
  }
  var FILTER_NAME = "editor/revisions-canvas/withRevisionDiffClasses";
  (0, import_hooks57.addFilter)("editor.BlockListBlock", FILTER_NAME, withRevisionDiffClasses);
  function DiffStyleOverrides({ showDiff }) {
    usePrivateStyleOverride({
      css: showDiff ? REVISION_DIFF_STYLES : ""
    });
    usePrivateStyleOverride({
      assets: showDiff ? REVISION_REMOVED_FILTER_SVG : "",
      __unstableType: "svgs"
    });
    return null;
  }
  function CanvasContent({ showDiff }) {
    const [contentRef, diffMarkers] = useDiffMarkers();
    return /* @__PURE__ */ (0, import_jsx_runtime340.jsxs)(import_jsx_runtime340.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime340.jsx)(visual_editor_default, { contentRef }),
      showDiff && diffMarkers
    ] });
  }
  function RevisionsCanvas() {
    (0, import_element170.useEffect)(() => {
      registerDiffFormatTypes();
      return () => {
        unregisterDiffFormatTypes();
      };
    }, []);
    const { revision, showDiff } = (0, import_data205.useSelect)((select6) => {
      const { getCurrentRevision: getCurrentRevision2, isShowingRevisionDiff: isShowingRevisionDiff2 } = unlock(
        select6(store)
      );
      return {
        revision: getCurrentRevision2(),
        showDiff: isShowingRevisionDiff2()
      };
    }, []);
    return revision ? /* @__PURE__ */ (0, import_jsx_runtime340.jsxs)(import_jsx_runtime340.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime340.jsx)(DiffStyleOverrides, { showDiff }),
      /* @__PURE__ */ (0, import_jsx_runtime340.jsx)("div", { className: "editor-revisions-canvas__content", children: /* @__PURE__ */ (0, import_jsx_runtime340.jsx)(CanvasContent, { showDiff }) })
    ] }) : /* @__PURE__ */ (0, import_jsx_runtime340.jsx)("div", { className: "editor-revisions-canvas__loading", children: /* @__PURE__ */ (0, import_jsx_runtime340.jsx)(import_components196.Spinner, {}) });
  }

  // packages/editor/build-module/components/collaborators-presence/use-collaborator-notifications.mjs
  var import_data206 = __toESM(require_data(), 1);
  var import_element171 = __toESM(require_element(), 1);
  var import_i18n220 = __toESM(require_i18n(), 1);
  var import_notices28 = __toESM(require_notices(), 1);
  var import_core_data118 = __toESM(require_core_data(), 1);
  var import_preferences23 = __toESM(require_preferences(), 1);
  var { useOnCollaboratorJoin, useOnCollaboratorLeave, useOnPostSave } = unlock(import_core_data118.privateApis);
  var NOTIFICATION_TYPE = {
    COLLAB_POST_UPDATED: "collab-post-updated",
    COLLAB_USER_ENTERED: "collab-user-entered",
    COLLAB_USER_EXITED: "collab-user-exited"
  };
  var PUBLISHED_STATUSES = ["publish", "private", "future"];
  function getPostUpdatedMessage(name2, status, isFirstPublish) {
    if (isFirstPublish) {
      return (0, import_i18n220.sprintf)((0, import_i18n220.__)("Post published by %s."), name2);
    }
    if (PUBLISHED_STATUSES.includes(status)) {
      return (0, import_i18n220.sprintf)((0, import_i18n220.__)("Post updated by %s."), name2);
    }
    return (0, import_i18n220.sprintf)((0, import_i18n220.__)("Draft saved by %s."), name2);
  }
  function useCollaboratorNotifications(postId2, postType2) {
    const { postStatus, isCollaborationEnabled, showNotifications } = (0, import_data206.useSelect)(
      (select6) => {
        const {
          getCurrentPostAttribute: getCurrentPostAttribute2,
          isCollaborationEnabledForCurrentPost: isCollaborationEnabledForCurrentPost2
        } = unlock(select6(store));
        return {
          postStatus: getCurrentPostAttribute2("status"),
          isCollaborationEnabled: isCollaborationEnabledForCurrentPost2(),
          showNotifications: select6(import_preferences23.store).get(
            "core",
            "showCollaborationNotifications"
          ) ?? true
        };
      },
      []
    );
    const { createNotice } = (0, import_data206.useDispatch)(import_notices28.store);
    const shouldSubscribe = isCollaborationEnabled && showNotifications;
    const effectivePostId = shouldSubscribe ? postId2 : null;
    const effectivePostType = shouldSubscribe ? postType2 : null;
    useOnCollaboratorJoin(
      effectivePostId,
      effectivePostType,
      (0, import_element171.useCallback)(
        (collaborator, me) => {
          if (me && collaborator.collaboratorInfo.enteredAt < me.collaboratorInfo.enteredAt) {
            return;
          }
          void createNotice(
            "info",
            (0, import_i18n220.sprintf)(
              /* translators: %s: collaborator display name */
              (0, import_i18n220.__)("%s has joined the post."),
              collaborator.collaboratorInfo.name
            ),
            {
              id: `${NOTIFICATION_TYPE.COLLAB_USER_ENTERED}-${collaborator.collaboratorInfo.id}`,
              type: "snackbar",
              isDismissible: false
            }
          );
        },
        [createNotice]
      )
    );
    useOnCollaboratorLeave(
      effectivePostId,
      effectivePostType,
      (0, import_element171.useCallback)(
        (collaborator) => {
          void createNotice(
            "info",
            (0, import_i18n220.sprintf)(
              /* translators: %s: collaborator display name */
              (0, import_i18n220.__)("%s has left the post."),
              collaborator.collaboratorInfo.name
            ),
            {
              id: `${NOTIFICATION_TYPE.COLLAB_USER_EXITED}-${collaborator.collaboratorInfo.id}`,
              type: "snackbar",
              isDismissible: false
            }
          );
        },
        [createNotice]
      )
    );
    useOnPostSave(
      effectivePostId,
      effectivePostType,
      (0, import_element171.useCallback)(
        (saveEvent, saver, prevEvent) => {
          if (!postStatus) {
            return;
          }
          const effectiveStatus = saveEvent.postStatus ?? postStatus ?? "draft";
          const prevStatus = prevEvent?.postStatus ?? postStatus;
          const isFirstPublish = !(prevStatus && PUBLISHED_STATUSES.includes(prevStatus)) && PUBLISHED_STATUSES.includes(effectiveStatus);
          const message2 = getPostUpdatedMessage(
            saver.collaboratorInfo.name,
            effectiveStatus,
            isFirstPublish
          );
          void createNotice("info", message2, {
            id: `${NOTIFICATION_TYPE.COLLAB_POST_UPDATED}-${saver.collaboratorInfo.id}`,
            type: "snackbar",
            isDismissible: false
          });
        },
        [createNotice, postStatus]
      )
    );
  }

  // packages/editor/build-module/components/save-publish-panels/index.mjs
  var import_data207 = __toESM(require_data(), 1);
  var import_components197 = __toESM(require_components(), 1);
  var import_i18n221 = __toESM(require_i18n(), 1);
  var import_element172 = __toESM(require_element(), 1);
  var import_jsx_runtime341 = __toESM(require_jsx_runtime(), 1);
  var { Fill: Fill11, Slot: Slot13 } = (0, import_components197.createSlotFill)("ActionsPanel");
  function SavePublishPanels({
    setEntitiesSavedStatesCallback,
    closeEntitiesSavedStates,
    isEntitiesSavedStatesOpen,
    forceIsDirtyPublishPanel
  }) {
    const { closePublishSidebar: closePublishSidebar2, togglePublishSidebar: togglePublishSidebar2 } = (0, import_data207.useDispatch)(store);
    const {
      publishSidebarOpened,
      isPublishable,
      isDirty,
      hasOtherEntitiesChanges
    } = (0, import_data207.useSelect)((select6) => {
      const {
        isPublishSidebarOpened: isPublishSidebarOpened2,
        isEditedPostPublishable: isEditedPostPublishable2,
        isCurrentPostPublished: isCurrentPostPublished2,
        isEditedPostDirty: isEditedPostDirty2,
        hasNonPostEntityChanges: hasNonPostEntityChanges2
      } = select6(store);
      const _hasOtherEntitiesChanges = hasNonPostEntityChanges2();
      return {
        publishSidebarOpened: isPublishSidebarOpened2(),
        isPublishable: !isCurrentPostPublished2() && isEditedPostPublishable2(),
        isDirty: _hasOtherEntitiesChanges || isEditedPostDirty2(),
        hasOtherEntitiesChanges: _hasOtherEntitiesChanges
      };
    }, []);
    const openEntitiesSavedStates = (0, import_element172.useCallback)(
      () => setEntitiesSavedStatesCallback(true),
      []
    );
    let unmountableContent;
    if (publishSidebarOpened) {
      unmountableContent = /* @__PURE__ */ (0, import_jsx_runtime341.jsx)(
        post_publish_panel_default,
        {
          onClose: closePublishSidebar2,
          forceIsDirty: forceIsDirtyPublishPanel,
          PrePublishExtension: plugin_pre_publish_panel_default.Slot,
          PostPublishExtension: plugin_post_publish_panel_default.Slot
        }
      );
    } else if (isPublishable && !hasOtherEntitiesChanges) {
      unmountableContent = /* @__PURE__ */ (0, import_jsx_runtime341.jsx)("div", { className: "editor-layout__toggle-publish-panel", children: /* @__PURE__ */ (0, import_jsx_runtime341.jsx)(
        import_components197.Button,
        {
          __next40pxDefaultSize: true,
          variant: "secondary",
          onClick: togglePublishSidebar2,
          "aria-expanded": false,
          children: (0, import_i18n221.__)("Open publish panel")
        }
      ) });
    } else {
      unmountableContent = /* @__PURE__ */ (0, import_jsx_runtime341.jsx)("div", { className: "editor-layout__toggle-entities-saved-states-panel", children: /* @__PURE__ */ (0, import_jsx_runtime341.jsx)(
        import_components197.Button,
        {
          __next40pxDefaultSize: true,
          variant: "secondary",
          onClick: openEntitiesSavedStates,
          "aria-expanded": false,
          "aria-haspopup": "dialog",
          disabled: !isDirty,
          accessibleWhenDisabled: true,
          children: (0, import_i18n221.__)("Open save panel")
        }
      ) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime341.jsxs)(import_jsx_runtime341.Fragment, { children: [
      isEntitiesSavedStatesOpen && /* @__PURE__ */ (0, import_jsx_runtime341.jsx)(
        EntitiesSavedStates,
        {
          close: closeEntitiesSavedStates,
          renderDialog: true
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime341.jsx)(Slot13, { bubblesVirtually: true }),
      !isEntitiesSavedStatesOpen && unmountableContent
    ] });
  }

  // packages/editor/build-module/components/text-editor/index.mjs
  var import_components198 = __toESM(require_components(), 1);
  var import_data208 = __toESM(require_data(), 1);
  var import_i18n222 = __toESM(require_i18n(), 1);
  var import_keyboard_shortcuts9 = __toESM(require_keyboard_shortcuts(), 1);
  var import_element173 = __toESM(require_element(), 1);
  var import_jsx_runtime342 = __toESM(require_jsx_runtime(), 1);
  function TextEditor({ autoFocus = false }) {
    const { switchEditorMode: switchEditorMode2 } = (0, import_data208.useDispatch)(store);
    const { shortcut, isRichEditingEnabled } = (0, import_data208.useSelect)((select6) => {
      const { getEditorSettings: getEditorSettings2 } = select6(store);
      const { getShortcutRepresentation } = select6(import_keyboard_shortcuts9.store);
      return {
        shortcut: getShortcutRepresentation("core/editor/toggle-mode"),
        isRichEditingEnabled: getEditorSettings2().richEditingEnabled
      };
    }, []);
    const titleRef = (0, import_element173.useRef)();
    (0, import_element173.useEffect)(() => {
      if (autoFocus) {
        return;
      }
      titleRef?.current?.focus();
    }, [autoFocus]);
    return /* @__PURE__ */ (0, import_jsx_runtime342.jsxs)("div", { className: "editor-text-editor", children: [
      isRichEditingEnabled && /* @__PURE__ */ (0, import_jsx_runtime342.jsxs)("div", { className: "editor-text-editor__toolbar", children: [
        /* @__PURE__ */ (0, import_jsx_runtime342.jsx)("h2", { children: (0, import_i18n222.__)("Editing code") }),
        /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(
          import_components198.Button,
          {
            __next40pxDefaultSize: true,
            variant: "tertiary",
            onClick: () => switchEditorMode2("visual"),
            shortcut,
            children: (0, import_i18n222.__)("Exit code editor")
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime342.jsxs)("div", { className: "editor-text-editor__body", children: [
        /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(post_title_raw_default, { ref: titleRef }),
        /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(PostTextEditor, {})
      ] })
    ] });
  }

  // packages/media-editor/build-module/components/media-editor-provider/index.mjs
  var import_element174 = __toESM(require_element(), 1);
  var import_jsx_runtime343 = __toESM(require_jsx_runtime(), 1);
  var MediaEditorContext = (0, import_element174.createContext)(
    void 0
  );
  function MediaEditorProvider({
    value,
    onChange,
    settings = {},
    children
  }) {
    const contextValue = {
      media: value,
      onChange,
      fields: settings.fields || []
    };
    return /* @__PURE__ */ (0, import_jsx_runtime343.jsx)(MediaEditorContext.Provider, { value: contextValue, children });
  }
  function useMediaEditorContext() {
    const context = (0, import_element174.useContext)(MediaEditorContext);
    if (!context) {
      throw new Error(
        "useMediaEditorContext must be used within MediaEditorProvider"
      );
    }
    return context;
  }

  // packages/media-editor/build-module/components/media-preview/index.mjs
  var import_components199 = __toESM(require_components(), 1);
  var import_element175 = __toESM(require_element(), 1);
  var import_i18n223 = __toESM(require_i18n(), 1);

  // packages/media-editor/build-module/utils/get-media-type.mjs
  function getMediaTypeFromMimeType(mimeType) {
    if (!mimeType) {
      return { type: "application" };
    }
    if (mimeType.startsWith("image/")) {
      return { type: "image" };
    }
    if (mimeType.startsWith("video/")) {
      return { type: "video" };
    }
    if (mimeType.startsWith("audio/")) {
      return { type: "audio" };
    }
    return { type: "application" };
  }

  // packages/media-editor/build-module/components/media-preview/index.mjs
  var import_jsx_runtime344 = __toESM(require_jsx_runtime(), 1);
  function MediaPreviewContent({
    mediaType,
    mediaUrl,
    altText,
    displayTitle,
    mimeType,
    onLoad,
    onError,
    loadingState
  }) {
    switch (mediaType.type) {
      case "image":
        return /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(
          "img",
          {
            className: loadingState === "loaded" ? "loaded" : "",
            src: mediaUrl,
            alt: altText || "",
            onLoad,
            onError
          }
        );
      case "video":
        return /* @__PURE__ */ (0, import_jsx_runtime344.jsx)("video", { src: mediaUrl, controls: true, onError, children: displayTitle });
      case "audio":
        return /* @__PURE__ */ (0, import_jsx_runtime344.jsx)("audio", { src: mediaUrl, controls: true, onError, children: displayTitle });
      default:
        return /* @__PURE__ */ (0, import_jsx_runtime344.jsxs)("div", { className: "media-editor-preview__file-info", children: [
          /* @__PURE__ */ (0, import_jsx_runtime344.jsx)("p", { className: "media-editor-preview__file-name", children: displayTitle }),
          /* @__PURE__ */ (0, import_jsx_runtime344.jsx)("p", { className: "media-editor-preview__mime-type", children: mimeType }),
          /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(
            "a",
            {
              href: mediaUrl,
              target: "_blank",
              rel: "noopener noreferrer",
              className: "media-editor-preview__download-link",
              children: (0, import_i18n223.__)("View file")
            }
          )
        ] });
    }
  }
  function MediaPreview2(props) {
    const [loadingState, setLoadingState] = (0, import_element175.useState)("loading");
    const { media } = useMediaEditorContext();
    const {
      source_url: mediaUrl,
      mime_type: mimeType,
      alt_text: altText,
      title
    } = media || {};
    const mediaType = getMediaTypeFromMimeType(mimeType);
    if (!mediaUrl) {
      return /* @__PURE__ */ (0, import_jsx_runtime344.jsx)("div", { className: "media-editor-preview media-editor-preview--empty", children: /* @__PURE__ */ (0, import_jsx_runtime344.jsx)("p", { children: (0, import_i18n223.__)("No media file available.") }) });
    }
    if (loadingState === "error") {
      return /* @__PURE__ */ (0, import_jsx_runtime344.jsxs)("div", { className: "media-editor-preview media-editor-preview--error", children: [
        /* @__PURE__ */ (0, import_jsx_runtime344.jsx)("p", { children: (0, import_i18n223.__)("Failed to load media file.") }),
        /* @__PURE__ */ (0, import_jsx_runtime344.jsx)("p", { className: "media-editor-preview__url", children: mediaUrl })
      ] });
    }
    const displayTitle = typeof title === "string" ? title : title?.rendered || title?.raw;
    return /* @__PURE__ */ (0, import_jsx_runtime344.jsxs)(
      "div",
      {
        ...props,
        className: `media-editor-preview media-editor-preview--${mediaType.type}`,
        children: [
          mediaType.type === "image" && loadingState === "loading" && /* @__PURE__ */ (0, import_jsx_runtime344.jsx)("div", { className: "media-editor-preview__spinner", children: /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(import_components199.Spinner, {}) }),
          /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(
            MediaPreviewContent,
            {
              mediaType,
              mediaUrl,
              altText,
              displayTitle,
              mimeType,
              onLoad: () => setLoadingState("loaded"),
              onError: () => setLoadingState("error"),
              loadingState
            }
          )
        ]
      }
    );
  }

  // packages/dataviews/build-module/constants.mjs
  var import_i18n224 = __toESM(require_i18n(), 1);
  var OPERATOR_IS_ANY2 = "isAny";
  var OPERATOR_IS_NONE = "isNone";
  var OPERATOR_IS_ALL = "isAll";
  var OPERATOR_IS_NOT_ALL = "isNotAll";
  var OPERATOR_BETWEEN = "between";
  var OPERATOR_IN_THE_PAST = "inThePast";
  var OPERATOR_OVER = "over";
  var OPERATOR_IS = "is";
  var OPERATOR_IS_NOT = "isNot";
  var OPERATOR_LESS_THAN = "lessThan";
  var OPERATOR_GREATER_THAN = "greaterThan";
  var OPERATOR_LESS_THAN_OR_EQUAL = "lessThanOrEqual";
  var OPERATOR_GREATER_THAN_OR_EQUAL = "greaterThanOrEqual";
  var OPERATOR_BEFORE = "before";
  var OPERATOR_AFTER = "after";
  var OPERATOR_BEFORE_INC = "beforeInc";
  var OPERATOR_AFTER_INC = "afterInc";
  var OPERATOR_CONTAINS = "contains";
  var OPERATOR_NOT_CONTAINS = "notContains";
  var OPERATOR_STARTS_WITH = "startsWith";
  var OPERATOR_ON = "on";
  var OPERATOR_NOT_ON = "notOn";
  var sortLabels = {
    asc: (0, import_i18n224.__)("Sort ascending"),
    desc: (0, import_i18n224.__)("Sort descending")
  };

  // packages/dataviews/build-module/lock-unlock.mjs
  var import_private_apis4 = __toESM(require_private_apis(), 1);
  var { lock: lock4, unlock: unlock4 } = (0, import_private_apis4.__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"
  );

  // packages/dataviews/build-module/hooks/use-elements.mjs
  var import_element176 = __toESM(require_element(), 1);
  var EMPTY_ARRAY9 = [];
  function useElements({
    elements: elements2,
    getElements
  }) {
    const staticElements = Array.isArray(elements2) && elements2.length > 0 ? elements2 : EMPTY_ARRAY9;
    const [records, setRecords] = (0, import_element176.useState)(staticElements);
    const [isLoading, setIsLoading] = (0, import_element176.useState)(false);
    (0, import_element176.useEffect)(() => {
      if (!getElements) {
        setRecords(staticElements);
        return;
      }
      let cancelled = false;
      setIsLoading(true);
      getElements().then((fetchedElements) => {
        if (!cancelled) {
          const dynamicElements = Array.isArray(fetchedElements) && fetchedElements.length > 0 ? fetchedElements : staticElements;
          setRecords(dynamicElements);
        }
      }).catch(() => {
        if (!cancelled) {
          setRecords(staticElements);
        }
      }).finally(() => {
        if (!cancelled) {
          setIsLoading(false);
        }
      });
      return () => {
        cancelled = true;
      };
    }, [getElements, staticElements]);
    return {
      elements: records,
      isLoading
    };
  }

  // packages/dataviews/node_modules/date-fns/constants.js
  var daysInYear2 = 365.2425;
  var maxTime2 = Math.pow(10, 8) * 24 * 60 * 60 * 1e3;
  var minTime2 = -maxTime2;
  var millisecondsInWeek = 6048e5;
  var millisecondsInDay = 864e5;
  var secondsInHour2 = 3600;
  var secondsInDay2 = secondsInHour2 * 24;
  var secondsInWeek2 = secondsInDay2 * 7;
  var secondsInYear2 = secondsInDay2 * daysInYear2;
  var secondsInMonth2 = secondsInYear2 / 12;
  var secondsInQuarter2 = secondsInMonth2 * 3;
  var constructFromSymbol = /* @__PURE__ */ Symbol.for("constructDateFrom");

  // packages/dataviews/node_modules/date-fns/constructFrom.js
  function constructFrom(date, value) {
    if (typeof date === "function") return date(value);
    if (date && typeof date === "object" && constructFromSymbol in date)
      return date[constructFromSymbol](value);
    if (date instanceof Date) return new date.constructor(value);
    return new Date(value);
  }

  // packages/dataviews/node_modules/date-fns/toDate.js
  function toDate2(argument, context) {
    return constructFrom(context || argument, argument);
  }

  // packages/dataviews/node_modules/date-fns/addDays.js
  function addDays(date, amount, options) {
    const _date = toDate2(date, options?.in);
    if (isNaN(amount)) return constructFrom(options?.in || date, NaN);
    if (!amount) return _date;
    _date.setDate(_date.getDate() + amount);
    return _date;
  }

  // packages/dataviews/node_modules/date-fns/addMonths.js
  function addMonths(date, amount, options) {
    const _date = toDate2(date, options?.in);
    if (isNaN(amount)) return constructFrom(options?.in || date, NaN);
    if (!amount) {
      return _date;
    }
    const dayOfMonth = _date.getDate();
    const endOfDesiredMonth = constructFrom(options?.in || date, _date.getTime());
    endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);
    const daysInMonth = endOfDesiredMonth.getDate();
    if (dayOfMonth >= daysInMonth) {
      return endOfDesiredMonth;
    } else {
      _date.setFullYear(
        endOfDesiredMonth.getFullYear(),
        endOfDesiredMonth.getMonth(),
        dayOfMonth
      );
      return _date;
    }
  }

  // packages/dataviews/node_modules/date-fns/_lib/defaultOptions.js
  var defaultOptions = {};
  function getDefaultOptions() {
    return defaultOptions;
  }

  // packages/dataviews/node_modules/date-fns/startOfWeek.js
  function startOfWeek(date, options) {
    const defaultOptions2 = getDefaultOptions();
    const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
    const _date = toDate2(date, options?.in);
    const day = _date.getDay();
    const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
    _date.setDate(_date.getDate() - diff);
    _date.setHours(0, 0, 0, 0);
    return _date;
  }

  // packages/dataviews/node_modules/date-fns/startOfISOWeek.js
  function startOfISOWeek(date, options) {
    return startOfWeek(date, { ...options, weekStartsOn: 1 });
  }

  // packages/dataviews/node_modules/date-fns/getISOWeekYear.js
  function getISOWeekYear(date, options) {
    const _date = toDate2(date, options?.in);
    const year = _date.getFullYear();
    const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);
    fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
    fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
    const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
    const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);
    fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
    fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
    const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
    if (_date.getTime() >= startOfNextYear.getTime()) {
      return year + 1;
    } else if (_date.getTime() >= startOfThisYear.getTime()) {
      return year;
    } else {
      return year - 1;
    }
  }

  // packages/dataviews/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
  function getTimezoneOffsetInMilliseconds(date) {
    const _date = toDate2(date);
    const utcDate = new Date(
      Date.UTC(
        _date.getFullYear(),
        _date.getMonth(),
        _date.getDate(),
        _date.getHours(),
        _date.getMinutes(),
        _date.getSeconds(),
        _date.getMilliseconds()
      )
    );
    utcDate.setUTCFullYear(_date.getFullYear());
    return +date - +utcDate;
  }

  // packages/dataviews/node_modules/date-fns/_lib/normalizeDates.js
  function normalizeDates(context, ...dates) {
    const normalize = constructFrom.bind(
      null,
      context || dates.find((date) => typeof date === "object")
    );
    return dates.map(normalize);
  }

  // packages/dataviews/node_modules/date-fns/startOfDay.js
  function startOfDay(date, options) {
    const _date = toDate2(date, options?.in);
    _date.setHours(0, 0, 0, 0);
    return _date;
  }

  // packages/dataviews/node_modules/date-fns/differenceInCalendarDays.js
  function differenceInCalendarDays(laterDate, earlierDate, options) {
    const [laterDate_, earlierDate_] = normalizeDates(
      options?.in,
      laterDate,
      earlierDate
    );
    const laterStartOfDay = startOfDay(laterDate_);
    const earlierStartOfDay = startOfDay(earlierDate_);
    const laterTimestamp = +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);
    const earlierTimestamp = +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);
    return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);
  }

  // packages/dataviews/node_modules/date-fns/startOfISOWeekYear.js
  function startOfISOWeekYear(date, options) {
    const year = getISOWeekYear(date, options);
    const fourthOfJanuary = constructFrom(options?.in || date, 0);
    fourthOfJanuary.setFullYear(year, 0, 4);
    fourthOfJanuary.setHours(0, 0, 0, 0);
    return startOfISOWeek(fourthOfJanuary);
  }

  // packages/dataviews/node_modules/date-fns/addWeeks.js
  function addWeeks(date, amount, options) {
    return addDays(date, amount * 7, options);
  }

  // packages/dataviews/node_modules/date-fns/addYears.js
  function addYears(date, amount, options) {
    return addMonths(date, amount * 12, options);
  }

  // packages/dataviews/node_modules/date-fns/isDate.js
  function isDate(value) {
    return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]";
  }

  // packages/dataviews/node_modules/date-fns/isValid.js
  function isValid(date) {
    return !(!isDate(date) && typeof date !== "number" || isNaN(+toDate2(date)));
  }

  // packages/dataviews/node_modules/date-fns/startOfMonth.js
  function startOfMonth2(date, options) {
    const _date = toDate2(date, options?.in);
    _date.setDate(1);
    _date.setHours(0, 0, 0, 0);
    return _date;
  }

  // packages/dataviews/node_modules/date-fns/startOfYear.js
  function startOfYear(date, options) {
    const date_ = toDate2(date, options?.in);
    date_.setFullYear(date_.getFullYear(), 0, 1);
    date_.setHours(0, 0, 0, 0);
    return date_;
  }

  // packages/dataviews/node_modules/date-fns/locale/en-US/_lib/formatDistance.js
  var formatDistanceLocale = {
    lessThanXSeconds: {
      one: "less than a second",
      other: "less than {{count}} seconds"
    },
    xSeconds: {
      one: "1 second",
      other: "{{count}} seconds"
    },
    halfAMinute: "half a minute",
    lessThanXMinutes: {
      one: "less than a minute",
      other: "less than {{count}} minutes"
    },
    xMinutes: {
      one: "1 minute",
      other: "{{count}} minutes"
    },
    aboutXHours: {
      one: "about 1 hour",
      other: "about {{count}} hours"
    },
    xHours: {
      one: "1 hour",
      other: "{{count}} hours"
    },
    xDays: {
      one: "1 day",
      other: "{{count}} days"
    },
    aboutXWeeks: {
      one: "about 1 week",
      other: "about {{count}} weeks"
    },
    xWeeks: {
      one: "1 week",
      other: "{{count}} weeks"
    },
    aboutXMonths: {
      one: "about 1 month",
      other: "about {{count}} months"
    },
    xMonths: {
      one: "1 month",
      other: "{{count}} months"
    },
    aboutXYears: {
      one: "about 1 year",
      other: "about {{count}} years"
    },
    xYears: {
      one: "1 year",
      other: "{{count}} years"
    },
    overXYears: {
      one: "over 1 year",
      other: "over {{count}} years"
    },
    almostXYears: {
      one: "almost 1 year",
      other: "almost {{count}} years"
    }
  };
  var formatDistance = (token, count, options) => {
    let result;
    const tokenValue = formatDistanceLocale[token];
    if (typeof tokenValue === "string") {
      result = tokenValue;
    } else if (count === 1) {
      result = tokenValue.one;
    } else {
      result = tokenValue.other.replace("{{count}}", count.toString());
    }
    if (options?.addSuffix) {
      if (options.comparison && options.comparison > 0) {
        return "in " + result;
      } else {
        return result + " ago";
      }
    }
    return result;
  };

  // packages/dataviews/node_modules/date-fns/locale/_lib/buildFormatLongFn.js
  function buildFormatLongFn(args) {
    return (options = {}) => {
      const width = options.width ? String(options.width) : args.defaultWidth;
      const format6 = args.formats[width] || args.formats[args.defaultWidth];
      return format6;
    };
  }

  // packages/dataviews/node_modules/date-fns/locale/en-US/_lib/formatLong.js
  var dateFormats = {
    full: "EEEE, MMMM do, y",
    long: "MMMM do, y",
    medium: "MMM d, y",
    short: "MM/dd/yyyy"
  };
  var timeFormats = {
    full: "h:mm:ss a zzzz",
    long: "h:mm:ss a z",
    medium: "h:mm:ss a",
    short: "h:mm a"
  };
  var dateTimeFormats = {
    full: "{{date}} 'at' {{time}}",
    long: "{{date}} 'at' {{time}}",
    medium: "{{date}}, {{time}}",
    short: "{{date}}, {{time}}"
  };
  var formatLong = {
    date: buildFormatLongFn({
      formats: dateFormats,
      defaultWidth: "full"
    }),
    time: buildFormatLongFn({
      formats: timeFormats,
      defaultWidth: "full"
    }),
    dateTime: buildFormatLongFn({
      formats: dateTimeFormats,
      defaultWidth: "full"
    })
  };

  // packages/dataviews/node_modules/date-fns/locale/en-US/_lib/formatRelative.js
  var formatRelativeLocale = {
    lastWeek: "'last' eeee 'at' p",
    yesterday: "'yesterday at' p",
    today: "'today at' p",
    tomorrow: "'tomorrow at' p",
    nextWeek: "eeee 'at' p",
    other: "P"
  };
  var formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];

  // packages/dataviews/node_modules/date-fns/locale/_lib/buildLocalizeFn.js
  function buildLocalizeFn(args) {
    return (value, options) => {
      const context = options?.context ? String(options.context) : "standalone";
      let valuesArray;
      if (context === "formatting" && args.formattingValues) {
        const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
        const width = options?.width ? String(options.width) : defaultWidth;
        valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
      } else {
        const defaultWidth = args.defaultWidth;
        const width = options?.width ? String(options.width) : args.defaultWidth;
        valuesArray = args.values[width] || args.values[defaultWidth];
      }
      const index2 = args.argumentCallback ? args.argumentCallback(value) : value;
      return valuesArray[index2];
    };
  }

  // packages/dataviews/node_modules/date-fns/locale/en-US/_lib/localize.js
  var eraValues = {
    narrow: ["B", "A"],
    abbreviated: ["BC", "AD"],
    wide: ["Before Christ", "Anno Domini"]
  };
  var quarterValues = {
    narrow: ["1", "2", "3", "4"],
    abbreviated: ["Q1", "Q2", "Q3", "Q4"],
    wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
  };
  var monthValues = {
    narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
    abbreviated: [
      "Jan",
      "Feb",
      "Mar",
      "Apr",
      "May",
      "Jun",
      "Jul",
      "Aug",
      "Sep",
      "Oct",
      "Nov",
      "Dec"
    ],
    wide: [
      "January",
      "February",
      "March",
      "April",
      "May",
      "June",
      "July",
      "August",
      "September",
      "October",
      "November",
      "December"
    ]
  };
  var dayValues = {
    narrow: ["S", "M", "T", "W", "T", "F", "S"],
    short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
    abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
    wide: [
      "Sunday",
      "Monday",
      "Tuesday",
      "Wednesday",
      "Thursday",
      "Friday",
      "Saturday"
    ]
  };
  var dayPeriodValues = {
    narrow: {
      am: "a",
      pm: "p",
      midnight: "mi",
      noon: "n",
      morning: "morning",
      afternoon: "afternoon",
      evening: "evening",
      night: "night"
    },
    abbreviated: {
      am: "AM",
      pm: "PM",
      midnight: "midnight",
      noon: "noon",
      morning: "morning",
      afternoon: "afternoon",
      evening: "evening",
      night: "night"
    },
    wide: {
      am: "a.m.",
      pm: "p.m.",
      midnight: "midnight",
      noon: "noon",
      morning: "morning",
      afternoon: "afternoon",
      evening: "evening",
      night: "night"
    }
  };
  var formattingDayPeriodValues = {
    narrow: {
      am: "a",
      pm: "p",
      midnight: "mi",
      noon: "n",
      morning: "in the morning",
      afternoon: "in the afternoon",
      evening: "in the evening",
      night: "at night"
    },
    abbreviated: {
      am: "AM",
      pm: "PM",
      midnight: "midnight",
      noon: "noon",
      morning: "in the morning",
      afternoon: "in the afternoon",
      evening: "in the evening",
      night: "at night"
    },
    wide: {
      am: "a.m.",
      pm: "p.m.",
      midnight: "midnight",
      noon: "noon",
      morning: "in the morning",
      afternoon: "in the afternoon",
      evening: "in the evening",
      night: "at night"
    }
  };
  var ordinalNumber = (dirtyNumber, _options) => {
    const number = Number(dirtyNumber);
    const rem100 = number % 100;
    if (rem100 > 20 || rem100 < 10) {
      switch (rem100 % 10) {
        case 1:
          return number + "st";
        case 2:
          return number + "nd";
        case 3:
          return number + "rd";
      }
    }
    return number + "th";
  };
  var localize = {
    ordinalNumber,
    era: buildLocalizeFn({
      values: eraValues,
      defaultWidth: "wide"
    }),
    quarter: buildLocalizeFn({
      values: quarterValues,
      defaultWidth: "wide",
      argumentCallback: (quarter) => quarter - 1
    }),
    month: buildLocalizeFn({
      values: monthValues,
      defaultWidth: "wide"
    }),
    day: buildLocalizeFn({
      values: dayValues,
      defaultWidth: "wide"
    }),
    dayPeriod: buildLocalizeFn({
      values: dayPeriodValues,
      defaultWidth: "wide",
      formattingValues: formattingDayPeriodValues,
      defaultFormattingWidth: "wide"
    })
  };

  // packages/dataviews/node_modules/date-fns/locale/_lib/buildMatchFn.js
  function buildMatchFn(args) {
    return (string, options = {}) => {
      const width = options.width;
      const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
      const matchResult = string.match(matchPattern);
      if (!matchResult) {
        return null;
      }
      const matchedString = matchResult[0];
      const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
      const key = Array.isArray(parsePatterns) ? findIndex2(parsePatterns, (pattern) => pattern.test(matchedString)) : (
        // [TODO] -- I challenge you to fix the type
        findKey(parsePatterns, (pattern) => pattern.test(matchedString))
      );
      let value;
      value = args.valueCallback ? args.valueCallback(key) : key;
      value = options.valueCallback ? (
        // [TODO] -- I challenge you to fix the type
        options.valueCallback(value)
      ) : value;
      const rest = string.slice(matchedString.length);
      return { value, rest };
    };
  }
  function findKey(object, predicate) {
    for (const key in object) {
      if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
        return key;
      }
    }
    return void 0;
  }
  function findIndex2(array, predicate) {
    for (let key = 0; key < array.length; key++) {
      if (predicate(array[key])) {
        return key;
      }
    }
    return void 0;
  }

  // packages/dataviews/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
  function buildMatchPatternFn(args) {
    return (string, options = {}) => {
      const matchResult = string.match(args.matchPattern);
      if (!matchResult) return null;
      const matchedString = matchResult[0];
      const parseResult = string.match(args.parsePattern);
      if (!parseResult) return null;
      let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
      value = options.valueCallback ? options.valueCallback(value) : value;
      const rest = string.slice(matchedString.length);
      return { value, rest };
    };
  }

  // packages/dataviews/node_modules/date-fns/locale/en-US/_lib/match.js
  var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
  var parseOrdinalNumberPattern = /\d+/i;
  var matchEraPatterns = {
    narrow: /^(b|a)/i,
    abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
    wide: /^(before christ|before common era|anno domini|common era)/i
  };
  var parseEraPatterns = {
    any: [/^b/i, /^(a|c)/i]
  };
  var matchQuarterPatterns = {
    narrow: /^[1234]/i,
    abbreviated: /^q[1234]/i,
    wide: /^[1234](th|st|nd|rd)? quarter/i
  };
  var parseQuarterPatterns = {
    any: [/1/i, /2/i, /3/i, /4/i]
  };
  var matchMonthPatterns = {
    narrow: /^[jfmasond]/i,
    abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
    wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
  };
  var parseMonthPatterns = {
    narrow: [
      /^j/i,
      /^f/i,
      /^m/i,
      /^a/i,
      /^m/i,
      /^j/i,
      /^j/i,
      /^a/i,
      /^s/i,
      /^o/i,
      /^n/i,
      /^d/i
    ],
    any: [
      /^ja/i,
      /^f/i,
      /^mar/i,
      /^ap/i,
      /^may/i,
      /^jun/i,
      /^jul/i,
      /^au/i,
      /^s/i,
      /^o/i,
      /^n/i,
      /^d/i
    ]
  };
  var matchDayPatterns = {
    narrow: /^[smtwf]/i,
    short: /^(su|mo|tu|we|th|fr|sa)/i,
    abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
    wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
  };
  var parseDayPatterns = {
    narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
    any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
  };
  var matchDayPeriodPatterns = {
    narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
    any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
  };
  var parseDayPeriodPatterns = {
    any: {
      am: /^a/i,
      pm: /^p/i,
      midnight: /^mi/i,
      noon: /^no/i,
      morning: /morning/i,
      afternoon: /afternoon/i,
      evening: /evening/i,
      night: /night/i
    }
  };
  var match2 = {
    ordinalNumber: buildMatchPatternFn({
      matchPattern: matchOrdinalNumberPattern,
      parsePattern: parseOrdinalNumberPattern,
      valueCallback: (value) => parseInt(value, 10)
    }),
    era: buildMatchFn({
      matchPatterns: matchEraPatterns,
      defaultMatchWidth: "wide",
      parsePatterns: parseEraPatterns,
      defaultParseWidth: "any"
    }),
    quarter: buildMatchFn({
      matchPatterns: matchQuarterPatterns,
      defaultMatchWidth: "wide",
      parsePatterns: parseQuarterPatterns,
      defaultParseWidth: "any",
      valueCallback: (index2) => index2 + 1
    }),
    month: buildMatchFn({
      matchPatterns: matchMonthPatterns,
      defaultMatchWidth: "wide",
      parsePatterns: parseMonthPatterns,
      defaultParseWidth: "any"
    }),
    day: buildMatchFn({
      matchPatterns: matchDayPatterns,
      defaultMatchWidth: "wide",
      parsePatterns: parseDayPatterns,
      defaultParseWidth: "any"
    }),
    dayPeriod: buildMatchFn({
      matchPatterns: matchDayPeriodPatterns,
      defaultMatchWidth: "any",
      parsePatterns: parseDayPeriodPatterns,
      defaultParseWidth: "any"
    })
  };

  // packages/dataviews/node_modules/date-fns/locale/en-US.js
  var enUS = {
    code: "en-US",
    formatDistance,
    formatLong,
    formatRelative,
    localize,
    match: match2,
    options: {
      weekStartsOn: 0,
      firstWeekContainsDate: 1
    }
  };

  // packages/dataviews/node_modules/date-fns/getDayOfYear.js
  function getDayOfYear(date, options) {
    const _date = toDate2(date, options?.in);
    const diff = differenceInCalendarDays(_date, startOfYear(_date));
    const dayOfYear = diff + 1;
    return dayOfYear;
  }

  // packages/dataviews/node_modules/date-fns/getISOWeek.js
  function getISOWeek(date, options) {
    const _date = toDate2(date, options?.in);
    const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);
    return Math.round(diff / millisecondsInWeek) + 1;
  }

  // packages/dataviews/node_modules/date-fns/getWeekYear.js
  function getWeekYear(date, options) {
    const _date = toDate2(date, options?.in);
    const year = _date.getFullYear();
    const defaultOptions2 = getDefaultOptions();
    const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
    const firstWeekOfNextYear = constructFrom(options?.in || date, 0);
    firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
    firstWeekOfNextYear.setHours(0, 0, 0, 0);
    const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);
    const firstWeekOfThisYear = constructFrom(options?.in || date, 0);
    firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);
    firstWeekOfThisYear.setHours(0, 0, 0, 0);
    const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);
    if (+_date >= +startOfNextYear) {
      return year + 1;
    } else if (+_date >= +startOfThisYear) {
      return year;
    } else {
      return year - 1;
    }
  }

  // packages/dataviews/node_modules/date-fns/startOfWeekYear.js
  function startOfWeekYear(date, options) {
    const defaultOptions2 = getDefaultOptions();
    const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
    const year = getWeekYear(date, options);
    const firstWeek = constructFrom(options?.in || date, 0);
    firstWeek.setFullYear(year, 0, firstWeekContainsDate);
    firstWeek.setHours(0, 0, 0, 0);
    const _date = startOfWeek(firstWeek, options);
    return _date;
  }

  // packages/dataviews/node_modules/date-fns/getWeek.js
  function getWeek(date, options) {
    const _date = toDate2(date, options?.in);
    const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);
    return Math.round(diff / millisecondsInWeek) + 1;
  }

  // packages/dataviews/node_modules/date-fns/_lib/addLeadingZeros.js
  function addLeadingZeros(number, targetLength) {
    const sign = number < 0 ? "-" : "";
    const output = Math.abs(number).toString().padStart(targetLength, "0");
    return sign + output;
  }

  // packages/dataviews/node_modules/date-fns/_lib/format/lightFormatters.js
  var lightFormatters = {
    // Year
    y(date, token) {
      const signedYear = date.getFullYear();
      const year = signedYear > 0 ? signedYear : 1 - signedYear;
      return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
    },
    // Month
    M(date, token) {
      const month = date.getMonth();
      return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
    },
    // Day of the month
    d(date, token) {
      return addLeadingZeros(date.getDate(), token.length);
    },
    // AM or PM
    a(date, token) {
      const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am";
      switch (token) {
        case "a":
        case "aa":
          return dayPeriodEnumValue.toUpperCase();
        case "aaa":
          return dayPeriodEnumValue;
        case "aaaaa":
          return dayPeriodEnumValue[0];
        case "aaaa":
        default:
          return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
      }
    },
    // Hour [1-12]
    h(date, token) {
      return addLeadingZeros(date.getHours() % 12 || 12, token.length);
    },
    // Hour [0-23]
    H(date, token) {
      return addLeadingZeros(date.getHours(), token.length);
    },
    // Minute
    m(date, token) {
      return addLeadingZeros(date.getMinutes(), token.length);
    },
    // Second
    s(date, token) {
      return addLeadingZeros(date.getSeconds(), token.length);
    },
    // Fraction of second
    S(date, token) {
      const numberOfDigits = token.length;
      const milliseconds = date.getMilliseconds();
      const fractionalSeconds = Math.trunc(
        milliseconds * Math.pow(10, numberOfDigits - 3)
      );
      return addLeadingZeros(fractionalSeconds, token.length);
    }
  };

  // packages/dataviews/node_modules/date-fns/_lib/format/formatters.js
  var dayPeriodEnum = {
    am: "am",
    pm: "pm",
    midnight: "midnight",
    noon: "noon",
    morning: "morning",
    afternoon: "afternoon",
    evening: "evening",
    night: "night"
  };
  var formatters = {
    // Era
    G: function(date, token, localize2) {
      const era = date.getFullYear() > 0 ? 1 : 0;
      switch (token) {
        // AD, BC
        case "G":
        case "GG":
        case "GGG":
          return localize2.era(era, { width: "abbreviated" });
        // A, B
        case "GGGGG":
          return localize2.era(era, { width: "narrow" });
        // Anno Domini, Before Christ
        case "GGGG":
        default:
          return localize2.era(era, { width: "wide" });
      }
    },
    // Year
    y: function(date, token, localize2) {
      if (token === "yo") {
        const signedYear = date.getFullYear();
        const year = signedYear > 0 ? signedYear : 1 - signedYear;
        return localize2.ordinalNumber(year, { unit: "year" });
      }
      return lightFormatters.y(date, token);
    },
    // Local week-numbering year
    Y: function(date, token, localize2, options) {
      const signedWeekYear = getWeekYear(date, options);
      const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
      if (token === "YY") {
        const twoDigitYear = weekYear % 100;
        return addLeadingZeros(twoDigitYear, 2);
      }
      if (token === "Yo") {
        return localize2.ordinalNumber(weekYear, { unit: "year" });
      }
      return addLeadingZeros(weekYear, token.length);
    },
    // ISO week-numbering year
    R: function(date, token) {
      const isoWeekYear = getISOWeekYear(date);
      return addLeadingZeros(isoWeekYear, token.length);
    },
    // Extended year. This is a single number designating the year of this calendar system.
    // The main difference between `y` and `u` localizers are B.C. years:
    // | Year | `y` | `u` |
    // |------|-----|-----|
    // | AC 1 |   1 |   1 |
    // | BC 1 |   1 |   0 |
    // | BC 2 |   2 |  -1 |
    // Also `yy` always returns the last two digits of a year,
    // while `uu` pads single digit years to 2 characters and returns other years unchanged.
    u: function(date, token) {
      const year = date.getFullYear();
      return addLeadingZeros(year, token.length);
    },
    // Quarter
    Q: function(date, token, localize2) {
      const quarter = Math.ceil((date.getMonth() + 1) / 3);
      switch (token) {
        // 1, 2, 3, 4
        case "Q":
          return String(quarter);
        // 01, 02, 03, 04
        case "QQ":
          return addLeadingZeros(quarter, 2);
        // 1st, 2nd, 3rd, 4th
        case "Qo":
          return localize2.ordinalNumber(quarter, { unit: "quarter" });
        // Q1, Q2, Q3, Q4
        case "QQQ":
          return localize2.quarter(quarter, {
            width: "abbreviated",
            context: "formatting"
          });
        // 1, 2, 3, 4 (narrow quarter; could be not numerical)
        case "QQQQQ":
          return localize2.quarter(quarter, {
            width: "narrow",
            context: "formatting"
          });
        // 1st quarter, 2nd quarter, ...
        case "QQQQ":
        default:
          return localize2.quarter(quarter, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // Stand-alone quarter
    q: function(date, token, localize2) {
      const quarter = Math.ceil((date.getMonth() + 1) / 3);
      switch (token) {
        // 1, 2, 3, 4
        case "q":
          return String(quarter);
        // 01, 02, 03, 04
        case "qq":
          return addLeadingZeros(quarter, 2);
        // 1st, 2nd, 3rd, 4th
        case "qo":
          return localize2.ordinalNumber(quarter, { unit: "quarter" });
        // Q1, Q2, Q3, Q4
        case "qqq":
          return localize2.quarter(quarter, {
            width: "abbreviated",
            context: "standalone"
          });
        // 1, 2, 3, 4 (narrow quarter; could be not numerical)
        case "qqqqq":
          return localize2.quarter(quarter, {
            width: "narrow",
            context: "standalone"
          });
        // 1st quarter, 2nd quarter, ...
        case "qqqq":
        default:
          return localize2.quarter(quarter, {
            width: "wide",
            context: "standalone"
          });
      }
    },
    // Month
    M: function(date, token, localize2) {
      const month = date.getMonth();
      switch (token) {
        case "M":
        case "MM":
          return lightFormatters.M(date, token);
        // 1st, 2nd, ..., 12th
        case "Mo":
          return localize2.ordinalNumber(month + 1, { unit: "month" });
        // Jan, Feb, ..., Dec
        case "MMM":
          return localize2.month(month, {
            width: "abbreviated",
            context: "formatting"
          });
        // J, F, ..., D
        case "MMMMM":
          return localize2.month(month, {
            width: "narrow",
            context: "formatting"
          });
        // January, February, ..., December
        case "MMMM":
        default:
          return localize2.month(month, { width: "wide", context: "formatting" });
      }
    },
    // Stand-alone month
    L: function(date, token, localize2) {
      const month = date.getMonth();
      switch (token) {
        // 1, 2, ..., 12
        case "L":
          return String(month + 1);
        // 01, 02, ..., 12
        case "LL":
          return addLeadingZeros(month + 1, 2);
        // 1st, 2nd, ..., 12th
        case "Lo":
          return localize2.ordinalNumber(month + 1, { unit: "month" });
        // Jan, Feb, ..., Dec
        case "LLL":
          return localize2.month(month, {
            width: "abbreviated",
            context: "standalone"
          });
        // J, F, ..., D
        case "LLLLL":
          return localize2.month(month, {
            width: "narrow",
            context: "standalone"
          });
        // January, February, ..., December
        case "LLLL":
        default:
          return localize2.month(month, { width: "wide", context: "standalone" });
      }
    },
    // Local week of year
    w: function(date, token, localize2, options) {
      const week = getWeek(date, options);
      if (token === "wo") {
        return localize2.ordinalNumber(week, { unit: "week" });
      }
      return addLeadingZeros(week, token.length);
    },
    // ISO week of year
    I: function(date, token, localize2) {
      const isoWeek = getISOWeek(date);
      if (token === "Io") {
        return localize2.ordinalNumber(isoWeek, { unit: "week" });
      }
      return addLeadingZeros(isoWeek, token.length);
    },
    // Day of the month
    d: function(date, token, localize2) {
      if (token === "do") {
        return localize2.ordinalNumber(date.getDate(), { unit: "date" });
      }
      return lightFormatters.d(date, token);
    },
    // Day of year
    D: function(date, token, localize2) {
      const dayOfYear = getDayOfYear(date);
      if (token === "Do") {
        return localize2.ordinalNumber(dayOfYear, { unit: "dayOfYear" });
      }
      return addLeadingZeros(dayOfYear, token.length);
    },
    // Day of week
    E: function(date, token, localize2) {
      const dayOfWeek = date.getDay();
      switch (token) {
        // Tue
        case "E":
        case "EE":
        case "EEE":
          return localize2.day(dayOfWeek, {
            width: "abbreviated",
            context: "formatting"
          });
        // T
        case "EEEEE":
          return localize2.day(dayOfWeek, {
            width: "narrow",
            context: "formatting"
          });
        // Tu
        case "EEEEEE":
          return localize2.day(dayOfWeek, {
            width: "short",
            context: "formatting"
          });
        // Tuesday
        case "EEEE":
        default:
          return localize2.day(dayOfWeek, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // Local day of week
    e: function(date, token, localize2, options) {
      const dayOfWeek = date.getDay();
      const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
      switch (token) {
        // Numerical value (Nth day of week with current locale or weekStartsOn)
        case "e":
          return String(localDayOfWeek);
        // Padded numerical value
        case "ee":
          return addLeadingZeros(localDayOfWeek, 2);
        // 1st, 2nd, ..., 7th
        case "eo":
          return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
        case "eee":
          return localize2.day(dayOfWeek, {
            width: "abbreviated",
            context: "formatting"
          });
        // T
        case "eeeee":
          return localize2.day(dayOfWeek, {
            width: "narrow",
            context: "formatting"
          });
        // Tu
        case "eeeeee":
          return localize2.day(dayOfWeek, {
            width: "short",
            context: "formatting"
          });
        // Tuesday
        case "eeee":
        default:
          return localize2.day(dayOfWeek, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // Stand-alone local day of week
    c: function(date, token, localize2, options) {
      const dayOfWeek = date.getDay();
      const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
      switch (token) {
        // Numerical value (same as in `e`)
        case "c":
          return String(localDayOfWeek);
        // Padded numerical value
        case "cc":
          return addLeadingZeros(localDayOfWeek, token.length);
        // 1st, 2nd, ..., 7th
        case "co":
          return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
        case "ccc":
          return localize2.day(dayOfWeek, {
            width: "abbreviated",
            context: "standalone"
          });
        // T
        case "ccccc":
          return localize2.day(dayOfWeek, {
            width: "narrow",
            context: "standalone"
          });
        // Tu
        case "cccccc":
          return localize2.day(dayOfWeek, {
            width: "short",
            context: "standalone"
          });
        // Tuesday
        case "cccc":
        default:
          return localize2.day(dayOfWeek, {
            width: "wide",
            context: "standalone"
          });
      }
    },
    // ISO day of week
    i: function(date, token, localize2) {
      const dayOfWeek = date.getDay();
      const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
      switch (token) {
        // 2
        case "i":
          return String(isoDayOfWeek);
        // 02
        case "ii":
          return addLeadingZeros(isoDayOfWeek, token.length);
        // 2nd
        case "io":
          return localize2.ordinalNumber(isoDayOfWeek, { unit: "day" });
        // Tue
        case "iii":
          return localize2.day(dayOfWeek, {
            width: "abbreviated",
            context: "formatting"
          });
        // T
        case "iiiii":
          return localize2.day(dayOfWeek, {
            width: "narrow",
            context: "formatting"
          });
        // Tu
        case "iiiiii":
          return localize2.day(dayOfWeek, {
            width: "short",
            context: "formatting"
          });
        // Tuesday
        case "iiii":
        default:
          return localize2.day(dayOfWeek, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // AM or PM
    a: function(date, token, localize2) {
      const hours = date.getHours();
      const dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
      switch (token) {
        case "a":
        case "aa":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          });
        case "aaa":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          }).toLowerCase();
        case "aaaaa":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "narrow",
            context: "formatting"
          });
        case "aaaa":
        default:
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // AM, PM, midnight, noon
    b: function(date, token, localize2) {
      const hours = date.getHours();
      let dayPeriodEnumValue;
      if (hours === 12) {
        dayPeriodEnumValue = dayPeriodEnum.noon;
      } else if (hours === 0) {
        dayPeriodEnumValue = dayPeriodEnum.midnight;
      } else {
        dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
      }
      switch (token) {
        case "b":
        case "bb":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          });
        case "bbb":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          }).toLowerCase();
        case "bbbbb":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "narrow",
            context: "formatting"
          });
        case "bbbb":
        default:
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // in the morning, in the afternoon, in the evening, at night
    B: function(date, token, localize2) {
      const hours = date.getHours();
      let dayPeriodEnumValue;
      if (hours >= 17) {
        dayPeriodEnumValue = dayPeriodEnum.evening;
      } else if (hours >= 12) {
        dayPeriodEnumValue = dayPeriodEnum.afternoon;
      } else if (hours >= 4) {
        dayPeriodEnumValue = dayPeriodEnum.morning;
      } else {
        dayPeriodEnumValue = dayPeriodEnum.night;
      }
      switch (token) {
        case "B":
        case "BB":
        case "BBB":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          });
        case "BBBBB":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "narrow",
            context: "formatting"
          });
        case "BBBB":
        default:
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // Hour [1-12]
    h: function(date, token, localize2) {
      if (token === "ho") {
        let hours = date.getHours() % 12;
        if (hours === 0) hours = 12;
        return localize2.ordinalNumber(hours, { unit: "hour" });
      }
      return lightFormatters.h(date, token);
    },
    // Hour [0-23]
    H: function(date, token, localize2) {
      if (token === "Ho") {
        return localize2.ordinalNumber(date.getHours(), { unit: "hour" });
      }
      return lightFormatters.H(date, token);
    },
    // Hour [0-11]
    K: function(date, token, localize2) {
      const hours = date.getHours() % 12;
      if (token === "Ko") {
        return localize2.ordinalNumber(hours, { unit: "hour" });
      }
      return addLeadingZeros(hours, token.length);
    },
    // Hour [1-24]
    k: function(date, token, localize2) {
      let hours = date.getHours();
      if (hours === 0) hours = 24;
      if (token === "ko") {
        return localize2.ordinalNumber(hours, { unit: "hour" });
      }
      return addLeadingZeros(hours, token.length);
    },
    // Minute
    m: function(date, token, localize2) {
      if (token === "mo") {
        return localize2.ordinalNumber(date.getMinutes(), { unit: "minute" });
      }
      return lightFormatters.m(date, token);
    },
    // Second
    s: function(date, token, localize2) {
      if (token === "so") {
        return localize2.ordinalNumber(date.getSeconds(), { unit: "second" });
      }
      return lightFormatters.s(date, token);
    },
    // Fraction of second
    S: function(date, token) {
      return lightFormatters.S(date, token);
    },
    // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
    X: function(date, token, _localize) {
      const timezoneOffset = date.getTimezoneOffset();
      if (timezoneOffset === 0) {
        return "Z";
      }
      switch (token) {
        // Hours and optional minutes
        case "X":
          return formatTimezoneWithOptionalMinutes(timezoneOffset);
        // Hours, minutes and optional seconds without `:` delimiter
        // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
        // so this token always has the same output as `XX`
        case "XXXX":
        case "XX":
          return formatTimezone(timezoneOffset);
        // Hours, minutes and optional seconds with `:` delimiter
        // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
        // so this token always has the same output as `XXX`
        case "XXXXX":
        case "XXX":
        // Hours and minutes with `:` delimiter
        default:
          return formatTimezone(timezoneOffset, ":");
      }
    },
    // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
    x: function(date, token, _localize) {
      const timezoneOffset = date.getTimezoneOffset();
      switch (token) {
        // Hours and optional minutes
        case "x":
          return formatTimezoneWithOptionalMinutes(timezoneOffset);
        // Hours, minutes and optional seconds without `:` delimiter
        // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
        // so this token always has the same output as `xx`
        case "xxxx":
        case "xx":
          return formatTimezone(timezoneOffset);
        // Hours, minutes and optional seconds with `:` delimiter
        // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
        // so this token always has the same output as `xxx`
        case "xxxxx":
        case "xxx":
        // Hours and minutes with `:` delimiter
        default:
          return formatTimezone(timezoneOffset, ":");
      }
    },
    // Timezone (GMT)
    O: function(date, token, _localize) {
      const timezoneOffset = date.getTimezoneOffset();
      switch (token) {
        // Short
        case "O":
        case "OO":
        case "OOO":
          return "GMT" + formatTimezoneShort(timezoneOffset, ":");
        // Long
        case "OOOO":
        default:
          return "GMT" + formatTimezone(timezoneOffset, ":");
      }
    },
    // Timezone (specific non-location)
    z: function(date, token, _localize) {
      const timezoneOffset = date.getTimezoneOffset();
      switch (token) {
        // Short
        case "z":
        case "zz":
        case "zzz":
          return "GMT" + formatTimezoneShort(timezoneOffset, ":");
        // Long
        case "zzzz":
        default:
          return "GMT" + formatTimezone(timezoneOffset, ":");
      }
    },
    // Seconds timestamp
    t: function(date, token, _localize) {
      const timestamp = Math.trunc(+date / 1e3);
      return addLeadingZeros(timestamp, token.length);
    },
    // Milliseconds timestamp
    T: function(date, token, _localize) {
      return addLeadingZeros(+date, token.length);
    }
  };
  function formatTimezoneShort(offset3, delimiter = "") {
    const sign = offset3 > 0 ? "-" : "+";
    const absOffset = Math.abs(offset3);
    const hours = Math.trunc(absOffset / 60);
    const minutes = absOffset % 60;
    if (minutes === 0) {
      return sign + String(hours);
    }
    return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
  }
  function formatTimezoneWithOptionalMinutes(offset3, delimiter) {
    if (offset3 % 60 === 0) {
      const sign = offset3 > 0 ? "-" : "+";
      return sign + addLeadingZeros(Math.abs(offset3) / 60, 2);
    }
    return formatTimezone(offset3, delimiter);
  }
  function formatTimezone(offset3, delimiter = "") {
    const sign = offset3 > 0 ? "-" : "+";
    const absOffset = Math.abs(offset3);
    const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);
    const minutes = addLeadingZeros(absOffset % 60, 2);
    return sign + hours + delimiter + minutes;
  }

  // packages/dataviews/node_modules/date-fns/_lib/format/longFormatters.js
  var dateLongFormatter = (pattern, formatLong2) => {
    switch (pattern) {
      case "P":
        return formatLong2.date({ width: "short" });
      case "PP":
        return formatLong2.date({ width: "medium" });
      case "PPP":
        return formatLong2.date({ width: "long" });
      case "PPPP":
      default:
        return formatLong2.date({ width: "full" });
    }
  };
  var timeLongFormatter = (pattern, formatLong2) => {
    switch (pattern) {
      case "p":
        return formatLong2.time({ width: "short" });
      case "pp":
        return formatLong2.time({ width: "medium" });
      case "ppp":
        return formatLong2.time({ width: "long" });
      case "pppp":
      default:
        return formatLong2.time({ width: "full" });
    }
  };
  var dateTimeLongFormatter = (pattern, formatLong2) => {
    const matchResult = pattern.match(/(P+)(p+)?/) || [];
    const datePattern = matchResult[1];
    const timePattern = matchResult[2];
    if (!timePattern) {
      return dateLongFormatter(pattern, formatLong2);
    }
    let dateTimeFormat;
    switch (datePattern) {
      case "P":
        dateTimeFormat = formatLong2.dateTime({ width: "short" });
        break;
      case "PP":
        dateTimeFormat = formatLong2.dateTime({ width: "medium" });
        break;
      case "PPP":
        dateTimeFormat = formatLong2.dateTime({ width: "long" });
        break;
      case "PPPP":
      default:
        dateTimeFormat = formatLong2.dateTime({ width: "full" });
        break;
    }
    return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
  };
  var longFormatters = {
    p: timeLongFormatter,
    P: dateTimeLongFormatter
  };

  // packages/dataviews/node_modules/date-fns/_lib/protectedTokens.js
  var dayOfYearTokenRE = /^D+$/;
  var weekYearTokenRE = /^Y+$/;
  var throwTokens = ["D", "DD", "YY", "YYYY"];
  function isProtectedDayOfYearToken(token) {
    return dayOfYearTokenRE.test(token);
  }
  function isProtectedWeekYearToken(token) {
    return weekYearTokenRE.test(token);
  }
  function warnOrThrowProtectedError(token, format6, input) {
    const _message = message(token, format6, input);
    console.warn(_message);
    if (throwTokens.includes(token)) throw new RangeError(_message);
  }
  function message(token, format6, input) {
    const subject = token[0] === "Y" ? "years" : "days of the month";
    return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format6}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
  }

  // packages/dataviews/node_modules/date-fns/format.js
  var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
  var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
  var escapedStringRegExp = /^'([^]*?)'?$/;
  var doubleQuoteRegExp = /''/g;
  var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
  function format(date, formatStr, options) {
    const defaultOptions2 = getDefaultOptions();
    const locale = options?.locale ?? defaultOptions2.locale ?? enUS;
    const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
    const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
    const originalDate = toDate2(date, options?.in);
    if (!isValid(originalDate)) {
      throw new RangeError("Invalid time value");
    }
    let parts = formatStr.match(longFormattingTokensRegExp).map((substring) => {
      const firstCharacter = substring[0];
      if (firstCharacter === "p" || firstCharacter === "P") {
        const longFormatter = longFormatters[firstCharacter];
        return longFormatter(substring, locale.formatLong);
      }
      return substring;
    }).join("").match(formattingTokensRegExp).map((substring) => {
      if (substring === "''") {
        return { isToken: false, value: "'" };
      }
      const firstCharacter = substring[0];
      if (firstCharacter === "'") {
        return { isToken: false, value: cleanEscapedString(substring) };
      }
      if (formatters[firstCharacter]) {
        return { isToken: true, value: substring };
      }
      if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
        throw new RangeError(
          "Format string contains an unescaped latin alphabet character `" + firstCharacter + "`"
        );
      }
      return { isToken: false, value: substring };
    });
    if (locale.localize.preprocessor) {
      parts = locale.localize.preprocessor(originalDate, parts);
    }
    const formatterOptions = {
      firstWeekContainsDate,
      weekStartsOn,
      locale
    };
    return parts.map((part) => {
      if (!part.isToken) return part.value;
      const token = part.value;
      if (!options?.useAdditionalWeekYearTokens && isProtectedWeekYearToken(token) || !options?.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(token)) {
        warnOrThrowProtectedError(token, formatStr, String(date));
      }
      const formatter = formatters[token[0]];
      return formatter(originalDate, token, locale.localize, formatterOptions);
    }).join("");
  }
  function cleanEscapedString(input) {
    const matched = input.match(escapedStringRegExp);
    if (!matched) {
      return input;
    }
    return matched[1].replace(doubleQuoteRegExp, "'");
  }

  // packages/dataviews/node_modules/date-fns/subDays.js
  function subDays(date, amount, options) {
    return addDays(date, -amount, options);
  }

  // packages/dataviews/node_modules/date-fns/subMonths.js
  function subMonths(date, amount, options) {
    return addMonths(date, -amount, options);
  }

  // packages/dataviews/node_modules/date-fns/subWeeks.js
  function subWeeks(date, amount, options) {
    return addWeeks(date, -amount, options);
  }

  // packages/dataviews/node_modules/date-fns/subYears.js
  function subYears(date, amount, options) {
    return addYears(date, -amount, options);
  }

  // packages/dataviews/build-module/utils/operators.mjs
  var import_i18n225 = __toESM(require_i18n(), 1);
  var import_element177 = __toESM(require_element(), 1);
  var import_date10 = __toESM(require_date(), 1);
  var import_jsx_runtime345 = __toESM(require_jsx_runtime(), 1);
  var filterTextWrappers = {
    Name: /* @__PURE__ */ (0, import_jsx_runtime345.jsx)("span", { className: "dataviews-filters__summary-filter-text-name" }),
    Value: /* @__PURE__ */ (0, import_jsx_runtime345.jsx)("span", { className: "dataviews-filters__summary-filter-text-value" })
  };
  function getRelativeDate(value, unit) {
    switch (unit) {
      case "days":
        return subDays(/* @__PURE__ */ new Date(), value);
      case "weeks":
        return subWeeks(/* @__PURE__ */ new Date(), value);
      case "months":
        return subMonths(/* @__PURE__ */ new Date(), value);
      case "years":
        return subYears(/* @__PURE__ */ new Date(), value);
      default:
        return /* @__PURE__ */ new Date();
    }
  }
  var isNoneOperatorDefinition = {
    /* translators: DataViews operator name */
    label: (0, import_i18n225.__)("Is none of"),
    filterText: (filter, activeElements) => (0, import_element177.createInterpolateElement)(
      (0, import_i18n225.sprintf)(
        /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is none of: Admin, Editor". */
        (0, import_i18n225.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),
        filter.name,
        activeElements.map((element) => element.label).join(", ")
      ),
      filterTextWrappers
    ),
    filter: ((item, field, filterValue) => {
      if (!filterValue?.length) {
        return true;
      }
      const fieldValue = field.getValue({ item });
      if (Array.isArray(fieldValue)) {
        return !filterValue.some(
          (fv) => fieldValue.includes(fv)
        );
      } else if (typeof fieldValue === "string") {
        return !filterValue.includes(fieldValue);
      }
      return false;
    }),
    selection: "multi"
  };
  var OPERATORS = [
    {
      name: OPERATOR_IS_ANY2,
      /* translators: DataViews operator name */
      label: (0, import_i18n225.__)("Includes"),
      filterText: (filter, activeElements) => (0, import_element177.createInterpolateElement)(
        (0, import_i18n225.sprintf)(
          /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is any: Admin, Editor". */
          (0, import_i18n225.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements.map((element) => element.label).join(", ")
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (!filterValue?.length) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        if (Array.isArray(fieldValue)) {
          return filterValue.some(
            (fv) => fieldValue.includes(fv)
          );
        } else if (typeof fieldValue === "string") {
          return filterValue.includes(fieldValue);
        }
        return false;
      },
      selection: "multi"
    },
    {
      name: OPERATOR_IS_NONE,
      ...isNoneOperatorDefinition
    },
    {
      name: OPERATOR_IS_ALL,
      /* translators: DataViews operator name */
      label: (0, import_i18n225.__)("Includes all"),
      filterText: (filter, activeElements) => (0, import_element177.createInterpolateElement)(
        (0, import_i18n225.sprintf)(
          /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author includes all: Admin, Editor". */
          (0, import_i18n225.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements.map((element) => element.label).join(", ")
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (!filterValue?.length) {
          return true;
        }
        return filterValue.every((value) => {
          return field.getValue({ item })?.includes(value);
        });
      },
      selection: "multi"
    },
    {
      name: OPERATOR_IS_NOT_ALL,
      ...isNoneOperatorDefinition
    },
    {
      name: OPERATOR_BETWEEN,
      /* translators: DataViews operator name */
      label: (0, import_i18n225.__)("Between (inc)"),
      filterText: (filter, activeElements) => (0, import_element177.createInterpolateElement)(
        (0, import_i18n225.sprintf)(
          /* translators: 1: Filter name (e.g. "Item count"). 2: Filter value min. 3: Filter value max. e.g.: "Item count between (inc): 10 and 180". */
          (0, import_i18n225.__)(
            "<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"
          ),
          filter.name,
          activeElements[0].label[0],
          activeElements[0].label[1]
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (!Array.isArray(filterValue) || filterValue.length !== 2 || filterValue[0] === void 0 || filterValue[1] === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        if (typeof fieldValue === "number" || fieldValue instanceof Date || typeof fieldValue === "string") {
          return fieldValue >= filterValue[0] && fieldValue <= filterValue[1];
        }
        return false;
      },
      selection: "custom"
    },
    {
      name: OPERATOR_IN_THE_PAST,
      /* translators: DataViews operator name */
      label: (0, import_i18n225.__)("In the past"),
      filterText: (filter, activeElements) => (0, import_element177.createInterpolateElement)(
        (0, import_i18n225.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "7 days"): "Date is in the past: 7 days". */
          (0, import_i18n225.__)(
            "<Name>%1$s is in the past: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          `${activeElements[0].value.value} ${activeElements[0].value.unit}`
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue?.value === void 0 || filterValue?.unit === void 0) {
          return true;
        }
        const targetDate = getRelativeDate(
          filterValue.value,
          filterValue.unit
        );
        const fieldValue = (0, import_date10.getDate)(field.getValue({ item }));
        return fieldValue >= targetDate && fieldValue <= /* @__PURE__ */ new Date();
      },
      selection: "custom"
    },
    {
      name: OPERATOR_OVER,
      /* translators: DataViews operator name */
      label: (0, import_i18n225.__)("Over"),
      filterText: (filter, activeElements) => (0, import_element177.createInterpolateElement)(
        (0, import_i18n225.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "7 days"): "Date is over: 7 days". */
          (0, import_i18n225.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),
          filter.name,
          `${activeElements[0].value.value} ${activeElements[0].value.unit}`
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue?.value === void 0 || filterValue?.unit === void 0) {
          return true;
        }
        const targetDate = getRelativeDate(
          filterValue.value,
          filterValue.unit
        );
        const fieldValue = (0, import_date10.getDate)(field.getValue({ item }));
        return fieldValue < targetDate;
      },
      selection: "custom"
    },
    {
      name: OPERATOR_IS,
      /* translators: DataViews operator name */
      label: (0, import_i18n225.__)("Is"),
      filterText: (filter, activeElements) => (0, import_element177.createInterpolateElement)(
        (0, import_i18n225.sprintf)(
          /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is: Admin". */
          (0, import_i18n225.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        return filterValue === field.getValue({ item }) || filterValue === void 0;
      },
      selection: "single"
    },
    {
      name: OPERATOR_IS_NOT,
      /* translators: DataViews operator name */
      label: (0, import_i18n225.__)("Is not"),
      filterText: (filter, activeElements) => (0, import_element177.createInterpolateElement)(
        (0, import_i18n225.sprintf)(
          /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is not: Admin". */
          (0, import_i18n225.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        return filterValue !== field.getValue({ item });
      },
      selection: "single"
    },
    {
      name: OPERATOR_LESS_THAN,
      /* translators: DataViews operator name */
      label: (0, import_i18n225.__)("Less than"),
      filterText: (filter, activeElements) => (0, import_element177.createInterpolateElement)(
        (0, import_i18n225.sprintf)(
          /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is less than: 10". */
          (0, import_i18n225.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return fieldValue < filterValue;
      },
      selection: "single"
    },
    {
      name: OPERATOR_GREATER_THAN,
      /* translators: DataViews operator name */
      label: (0, import_i18n225.__)("Greater than"),
      filterText: (filter, activeElements) => (0, import_element177.createInterpolateElement)(
        (0, import_i18n225.sprintf)(
          /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is greater than: 10". */
          (0, import_i18n225.__)(
            "<Name>%1$s is greater than: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return fieldValue > filterValue;
      },
      selection: "single"
    },
    {
      name: OPERATOR_LESS_THAN_OR_EQUAL,
      /* translators: DataViews operator name */
      label: (0, import_i18n225.__)("Less than or equal"),
      filterText: (filter, activeElements) => (0, import_element177.createInterpolateElement)(
        (0, import_i18n225.sprintf)(
          /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is less than or equal to: 10". */
          (0, import_i18n225.__)(
            "<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return fieldValue <= filterValue;
      },
      selection: "single"
    },
    {
      name: OPERATOR_GREATER_THAN_OR_EQUAL,
      /* translators: DataViews operator name */
      label: (0, import_i18n225.__)("Greater than or equal"),
      filterText: (filter, activeElements) => (0, import_element177.createInterpolateElement)(
        (0, import_i18n225.sprintf)(
          /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is greater than or equal to: 10". */
          (0, import_i18n225.__)(
            "<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return fieldValue >= filterValue;
      },
      selection: "single"
    },
    {
      name: OPERATOR_BEFORE,
      /* translators: DataViews operator name */
      label: (0, import_i18n225.__)("Before"),
      filterText: (filter, activeElements) => (0, import_element177.createInterpolateElement)(
        (0, import_i18n225.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is before: 2024-01-01". */
          (0, import_i18n225.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const filterDate = (0, import_date10.getDate)(filterValue);
        const fieldDate = (0, import_date10.getDate)(field.getValue({ item }));
        return fieldDate < filterDate;
      },
      selection: "single"
    },
    {
      name: OPERATOR_AFTER,
      /* translators: DataViews operator name */
      label: (0, import_i18n225.__)("After"),
      filterText: (filter, activeElements) => (0, import_element177.createInterpolateElement)(
        (0, import_i18n225.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is after: 2024-01-01". */
          (0, import_i18n225.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const filterDate = (0, import_date10.getDate)(filterValue);
        const fieldDate = (0, import_date10.getDate)(field.getValue({ item }));
        return fieldDate > filterDate;
      },
      selection: "single"
    },
    {
      name: OPERATOR_BEFORE_INC,
      /* translators: DataViews operator name */
      label: (0, import_i18n225.__)("Before (inc)"),
      filterText: (filter, activeElements) => (0, import_element177.createInterpolateElement)(
        (0, import_i18n225.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is on or before: 2024-01-01". */
          (0, import_i18n225.__)(
            "<Name>%1$s is on or before: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const filterDate = (0, import_date10.getDate)(filterValue);
        const fieldDate = (0, import_date10.getDate)(field.getValue({ item }));
        return fieldDate <= filterDate;
      },
      selection: "single"
    },
    {
      name: OPERATOR_AFTER_INC,
      /* translators: DataViews operator name */
      label: (0, import_i18n225.__)("After (inc)"),
      filterText: (filter, activeElements) => (0, import_element177.createInterpolateElement)(
        (0, import_i18n225.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is on or after: 2024-01-01". */
          (0, import_i18n225.__)(
            "<Name>%1$s is on or after: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const filterDate = (0, import_date10.getDate)(filterValue);
        const fieldDate = (0, import_date10.getDate)(field.getValue({ item }));
        return fieldDate >= filterDate;
      },
      selection: "single"
    },
    {
      name: OPERATOR_CONTAINS,
      /* translators: DataViews operator name */
      label: (0, import_i18n225.__)("Contains"),
      filterText: (filter, activeElements) => (0, import_element177.createInterpolateElement)(
        (0, import_i18n225.sprintf)(
          /* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title contains: Hello". */
          (0, import_i18n225.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return typeof fieldValue === "string" && filterValue && fieldValue.toLowerCase().includes(String(filterValue).toLowerCase());
      },
      selection: "single"
    },
    {
      name: OPERATOR_NOT_CONTAINS,
      /* translators: DataViews operator name */
      label: (0, import_i18n225.__)("Doesn't contain"),
      filterText: (filter, activeElements) => (0, import_element177.createInterpolateElement)(
        (0, import_i18n225.sprintf)(
          /* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title doesn't contain: Hello". */
          (0, import_i18n225.__)(
            "<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return typeof fieldValue === "string" && filterValue && !fieldValue.toLowerCase().includes(String(filterValue).toLowerCase());
      },
      selection: "single"
    },
    {
      name: OPERATOR_STARTS_WITH,
      /* translators: DataViews operator name */
      label: (0, import_i18n225.__)("Starts with"),
      filterText: (filter, activeElements) => (0, import_element177.createInterpolateElement)(
        (0, import_i18n225.sprintf)(
          /* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title starts with: Hello". */
          (0, import_i18n225.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return typeof fieldValue === "string" && filterValue && fieldValue.toLowerCase().startsWith(String(filterValue).toLowerCase());
      },
      selection: "single"
    },
    {
      name: OPERATOR_ON,
      /* translators: DataViews operator name */
      label: (0, import_i18n225.__)("On"),
      filterText: (filter, activeElements) => (0, import_element177.createInterpolateElement)(
        (0, import_i18n225.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is: 2024-01-01". */
          (0, import_i18n225.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const filterDate = (0, import_date10.getDate)(filterValue);
        const fieldDate = (0, import_date10.getDate)(field.getValue({ item }));
        return filterDate.getTime() === fieldDate.getTime();
      },
      selection: "single"
    },
    {
      name: OPERATOR_NOT_ON,
      /* translators: DataViews operator name */
      label: (0, import_i18n225.__)("Not on"),
      filterText: (filter, activeElements) => (0, import_element177.createInterpolateElement)(
        (0, import_i18n225.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is not: 2024-01-01". */
          (0, import_i18n225.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const filterDate = (0, import_date10.getDate)(filterValue);
        const fieldDate = (0, import_date10.getDate)(field.getValue({ item }));
        return filterDate.getTime() !== fieldDate.getTime();
      },
      selection: "single"
    }
  ];
  var getOperatorByName = (name2) => OPERATORS.find((op) => op.name === name2);
  var getAllOperatorNames = () => OPERATORS.map((op) => op.name);

  // packages/dataviews/build-module/components/dataform-controls/checkbox.mjs
  var import_components200 = __toESM(require_components(), 1);
  var import_element178 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/components/dataform-controls/utils/get-custom-validity.mjs
  function getCustomValidity(isValid2, validity) {
    let customValidity;
    if (isValid2?.required && validity?.required) {
      customValidity = validity?.required?.message ? validity.required : void 0;
    } else if (isValid2?.pattern && validity?.pattern) {
      customValidity = validity.pattern;
    } else if (isValid2?.min && validity?.min) {
      customValidity = validity.min;
    } else if (isValid2?.max && validity?.max) {
      customValidity = validity.max;
    } else if (isValid2?.minLength && validity?.minLength) {
      customValidity = validity.minLength;
    } else if (isValid2?.maxLength && validity?.maxLength) {
      customValidity = validity.maxLength;
    } else if (isValid2?.elements && validity?.elements) {
      customValidity = validity.elements;
    } else if (validity?.custom) {
      customValidity = validity.custom;
    }
    return customValidity;
  }

  // packages/dataviews/build-module/components/dataform-controls/checkbox.mjs
  var import_jsx_runtime346 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedCheckboxControl } = unlock4(import_components200.privateApis);
  function Checkbox({
    field,
    onChange,
    data,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { getValue: getValue2, setValue, label, description, isValid: isValid2 } = field;
    const onChangeControl = (0, import_element178.useCallback)(() => {
      onChange(
        setValue({ item: data, value: !getValue2({ item: data }) })
      );
    }, [data, getValue2, onChange, setValue]);
    return /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
      ValidatedCheckboxControl,
      {
        required: !!field.isValid?.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        hidden: hideLabelFromVision,
        label,
        help: description,
        checked: getValue2({ item: data }),
        onChange: onChangeControl
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/combobox.mjs
  var import_components201 = __toESM(require_components(), 1);
  var import_element179 = __toESM(require_element(), 1);
  var import_jsx_runtime347 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedComboboxControl } = unlock4(import_components201.privateApis);
  function Combobox({
    data,
    field,
    onChange,
    hideLabelFromVision,
    validity
  }) {
    const { label, description, placeholder, getValue: getValue2, setValue, isValid: isValid2 } = field;
    const value = getValue2({ item: data }) ?? "";
    const onChangeControl = (0, import_element179.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue ?? "" })),
      [data, onChange, setValue]
    );
    const { elements: elements2, isLoading } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(import_components201.Spinner, {});
    }
    return /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(
      ValidatedComboboxControl,
      {
        required: !!field.isValid?.required,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        value,
        help: description,
        placeholder,
        options: elements2,
        onChange: onChangeControl,
        hideLabelFromVision,
        allowReset: true,
        expandOnFocus: true
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/datetime.mjs
  var import_components203 = __toESM(require_components(), 1);
  var import_element181 = __toESM(require_element(), 1);
  var import_i18n227 = __toESM(require_i18n(), 1);
  var import_date12 = __toESM(require_date(), 1);

  // packages/dataviews/build-module/components/dataform-controls/utils/relative-date-control.mjs
  var import_components202 = __toESM(require_components(), 1);
  var import_element180 = __toESM(require_element(), 1);
  var import_i18n226 = __toESM(require_i18n(), 1);
  var import_jsx_runtime348 = __toESM(require_jsx_runtime(), 1);
  var TIME_UNITS_OPTIONS = {
    [OPERATOR_IN_THE_PAST]: [
      { value: "days", label: (0, import_i18n226.__)("Days") },
      { value: "weeks", label: (0, import_i18n226.__)("Weeks") },
      { value: "months", label: (0, import_i18n226.__)("Months") },
      { value: "years", label: (0, import_i18n226.__)("Years") }
    ],
    [OPERATOR_OVER]: [
      { value: "days", label: (0, import_i18n226.__)("Days ago") },
      { value: "weeks", label: (0, import_i18n226.__)("Weeks ago") },
      { value: "months", label: (0, import_i18n226.__)("Months ago") },
      { value: "years", label: (0, import_i18n226.__)("Years ago") }
    ]
  };
  function RelativeDateControl({
    className,
    data,
    field,
    onChange,
    hideLabelFromVision,
    operator
  }) {
    const options = TIME_UNITS_OPTIONS[operator === OPERATOR_IN_THE_PAST ? "inThePast" : "over"];
    const { id, label, getValue: getValue2, setValue } = field;
    const fieldValue = getValue2({ item: data });
    const { value: relValue = "", unit = options[0].value } = fieldValue && typeof fieldValue === "object" ? fieldValue : {};
    const onChangeValue = (0, import_element180.useCallback)(
      (newValue) => onChange(
        setValue({
          item: data,
          value: { value: Number(newValue), unit }
        })
      ),
      [onChange, setValue, data, unit]
    );
    const onChangeUnit = (0, import_element180.useCallback)(
      (newUnit) => onChange(
        setValue({
          item: data,
          value: { value: relValue, unit: newUnit }
        })
      ),
      [onChange, setValue, data, relValue]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime348.jsx)(
      import_components202.BaseControl,
      {
        id,
        className: clsx_default(className, "dataviews-controls__relative-date"),
        label,
        hideLabelFromVision,
        children: /* @__PURE__ */ (0, import_jsx_runtime348.jsxs)(Stack, { direction: "row", gap: "sm", children: [
          /* @__PURE__ */ (0, import_jsx_runtime348.jsx)(
            import_components202.__experimentalNumberControl,
            {
              __next40pxDefaultSize: true,
              className: "dataviews-controls__relative-date-number",
              spinControls: "none",
              min: 1,
              step: 1,
              value: relValue,
              onChange: onChangeValue
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime348.jsx)(
            import_components202.SelectControl,
            {
              className: "dataviews-controls__relative-date-unit",
              __next40pxDefaultSize: true,
              label: (0, import_i18n226.__)("Unit"),
              value: unit,
              options,
              onChange: onChangeUnit,
              hideLabelFromVision: true
            }
          )
        ] })
      }
    );
  }

  // packages/dataviews/build-module/field-types/utils/parse-date-time.mjs
  var import_date11 = __toESM(require_date(), 1);
  function parseDateTime(dateTimeString) {
    if (!dateTimeString) {
      return null;
    }
    const parsed = (0, import_date11.getDate)(dateTimeString);
    return parsed && isValid(parsed) ? parsed : null;
  }

  // packages/dataviews/build-module/components/dataform-controls/datetime.mjs
  var import_jsx_runtime349 = __toESM(require_jsx_runtime(), 1);
  var { DateCalendar, ValidatedInputControl } = unlock4(import_components203.privateApis);
  var formatDateTime = (value) => {
    if (!value) {
      return "";
    }
    return (0, import_date12.dateI18n)("Y-m-d\\TH:i", (0, import_date12.getDate)(value));
  };
  function CalendarDateTimeControl({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { id, label, description, setValue, getValue: getValue2, isValid: isValid2 } = field;
    const fieldValue = getValue2({ item: data });
    const value = typeof fieldValue === "string" ? fieldValue : void 0;
    const [calendarMonth, setCalendarMonth] = (0, import_element181.useState)(() => {
      const parsedDate = parseDateTime(value);
      return parsedDate || /* @__PURE__ */ new Date();
    });
    const inputControlRef = (0, import_element181.useRef)(null);
    const validationTimeoutRef = (0, import_element181.useRef)(void 0);
    const previousFocusRef = (0, import_element181.useRef)(null);
    const onChangeCallback = (0, import_element181.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue })),
      [data, onChange, setValue]
    );
    (0, import_element181.useEffect)(() => {
      return () => {
        if (validationTimeoutRef.current) {
          clearTimeout(validationTimeoutRef.current);
        }
      };
    }, []);
    const onSelectDate = (0, import_element181.useCallback)(
      (newDate) => {
        let dateTimeValue;
        if (newDate) {
          const wpDate = (0, import_date12.dateI18n)("Y-m-d", newDate);
          let wpTime;
          if (value) {
            wpTime = (0, import_date12.dateI18n)("H:i", (0, import_date12.getDate)(value));
          } else {
            wpTime = (0, import_date12.dateI18n)("H:i", newDate);
          }
          const finalDateTime = (0, import_date12.getDate)(`${wpDate}T${wpTime}`);
          dateTimeValue = finalDateTime.toISOString();
          onChangeCallback(dateTimeValue);
          if (validationTimeoutRef.current) {
            clearTimeout(validationTimeoutRef.current);
          }
        } else {
          onChangeCallback(void 0);
        }
        previousFocusRef.current = inputControlRef.current && inputControlRef.current.ownerDocument.activeElement;
        validationTimeoutRef.current = setTimeout(() => {
          if (inputControlRef.current) {
            inputControlRef.current.focus();
            inputControlRef.current.blur();
            onChangeCallback(dateTimeValue);
            if (previousFocusRef.current && previousFocusRef.current instanceof HTMLElement) {
              previousFocusRef.current.focus();
            }
          }
        }, 0);
      },
      [onChangeCallback, value]
    );
    const handleManualDateTimeChange = (0, import_element181.useCallback)(
      (newValue) => {
        if (newValue) {
          const dateTime = (0, import_date12.getDate)(newValue);
          onChangeCallback(dateTime.toISOString());
          const parsedDate = parseDateTime(dateTime.toISOString());
          if (parsedDate) {
            setCalendarMonth(parsedDate);
          }
        } else {
          onChangeCallback(void 0);
        }
      },
      [onChangeCallback]
    );
    const { format: fieldFormat } = field;
    const weekStartsOn = fieldFormat.weekStartsOn ?? (0, import_date12.getSettings)().l10n.startOfWeek;
    const {
      timezone: { string: timezoneString }
    } = (0, import_date12.getSettings)();
    let displayLabel = label;
    if (isValid2?.required && !markWhenOptional && !hideLabelFromVision) {
      displayLabel = `${label} (${(0, import_i18n227.__)("Required")})`;
    } else if (!isValid2?.required && markWhenOptional && !hideLabelFromVision) {
      displayLabel = `${label} (${(0, import_i18n227.__)("Optional")})`;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(
      import_components203.BaseControl,
      {
        id,
        label: displayLabel,
        help: description,
        hideLabelFromVision,
        children: /* @__PURE__ */ (0, import_jsx_runtime349.jsxs)(Stack, { direction: "column", gap: "lg", children: [
          /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(
            DateCalendar,
            {
              style: { width: "100%" },
              selected: value ? parseDateTime(value) || void 0 : void 0,
              onSelect: onSelectDate,
              month: calendarMonth,
              onMonthChange: setCalendarMonth,
              timeZone: timezoneString || void 0,
              weekStartsOn
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(
            ValidatedInputControl,
            {
              ref: inputControlRef,
              __next40pxDefaultSize: true,
              required: !!isValid2?.required,
              customValidity: getCustomValidity(isValid2, validity),
              type: "datetime-local",
              label: (0, import_i18n227.__)("Date time"),
              hideLabelFromVision: true,
              value: formatDateTime(value),
              onChange: handleManualDateTimeChange
            }
          )
        ] })
      }
    );
  }
  function DateTime({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    operator,
    validity
  }) {
    if (operator === OPERATOR_IN_THE_PAST || operator === OPERATOR_OVER) {
      return /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(
        RelativeDateControl,
        {
          className: "dataviews-controls__datetime",
          data,
          field,
          onChange,
          hideLabelFromVision,
          operator
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(
      CalendarDateTimeControl,
      {
        data,
        field,
        onChange,
        hideLabelFromVision,
        markWhenOptional,
        validity
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/date.mjs
  var import_components204 = __toESM(require_components(), 1);
  var import_element182 = __toESM(require_element(), 1);
  var import_i18n228 = __toESM(require_i18n(), 1);
  var import_date13 = __toESM(require_date(), 1);
  var import_jsx_runtime350 = __toESM(require_jsx_runtime(), 1);
  var { DateCalendar: DateCalendar2, DateRangeCalendar } = unlock4(import_components204.privateApis);
  var DATE_PRESETS = [
    {
      id: "today",
      label: (0, import_i18n228.__)("Today"),
      getValue: () => (0, import_date13.getDate)(null)
    },
    {
      id: "yesterday",
      label: (0, import_i18n228.__)("Yesterday"),
      getValue: () => {
        const today = (0, import_date13.getDate)(null);
        return subDays(today, 1);
      }
    },
    {
      id: "past-week",
      label: (0, import_i18n228.__)("Past week"),
      getValue: () => {
        const today = (0, import_date13.getDate)(null);
        return subDays(today, 7);
      }
    },
    {
      id: "past-month",
      label: (0, import_i18n228.__)("Past month"),
      getValue: () => {
        const today = (0, import_date13.getDate)(null);
        return subMonths(today, 1);
      }
    }
  ];
  var DATE_RANGE_PRESETS = [
    {
      id: "last-7-days",
      label: (0, import_i18n228.__)("Last 7 days"),
      getValue: () => {
        const today = (0, import_date13.getDate)(null);
        return [subDays(today, 7), today];
      }
    },
    {
      id: "last-30-days",
      label: (0, import_i18n228.__)("Last 30 days"),
      getValue: () => {
        const today = (0, import_date13.getDate)(null);
        return [subDays(today, 30), today];
      }
    },
    {
      id: "month-to-date",
      label: (0, import_i18n228.__)("Month to date"),
      getValue: () => {
        const today = (0, import_date13.getDate)(null);
        return [startOfMonth2(today), today];
      }
    },
    {
      id: "last-year",
      label: (0, import_i18n228.__)("Last year"),
      getValue: () => {
        const today = (0, import_date13.getDate)(null);
        return [subYears(today, 1), today];
      }
    },
    {
      id: "year-to-date",
      label: (0, import_i18n228.__)("Year to date"),
      getValue: () => {
        const today = (0, import_date13.getDate)(null);
        return [startOfYear(today), today];
      }
    }
  ];
  var parseDate2 = (dateString) => {
    if (!dateString) {
      return null;
    }
    const parsed = (0, import_date13.getDate)(dateString);
    return parsed && isValid(parsed) ? parsed : null;
  };
  var formatDate = (date) => {
    if (!date) {
      return "";
    }
    return typeof date === "string" ? date : format(date, "yyyy-MM-dd");
  };
  function ValidatedDateControl({
    field,
    validity,
    inputRefs,
    isTouched,
    setIsTouched,
    children
  }) {
    const { isValid: isValid2 } = field;
    const [customValidity, setCustomValidity] = (0, import_element182.useState)(void 0);
    const validateRefs = (0, import_element182.useCallback)(() => {
      const refs = Array.isArray(inputRefs) ? inputRefs : [inputRefs];
      for (const ref of refs) {
        const input = ref.current;
        if (input && !input.validity.valid) {
          setCustomValidity({
            type: "invalid",
            message: input.validationMessage
          });
          return;
        }
      }
      setCustomValidity(void 0);
    }, [inputRefs]);
    (0, import_element182.useEffect)(() => {
      const refs = Array.isArray(inputRefs) ? inputRefs : [inputRefs];
      const result = validity ? getCustomValidity(isValid2, validity) : void 0;
      for (const ref of refs) {
        const input = ref.current;
        if (input) {
          input.setCustomValidity(
            result?.type === "invalid" && result.message ? result.message : ""
          );
        }
      }
    }, [inputRefs, isValid2, validity]);
    (0, import_element182.useEffect)(() => {
      const refs = Array.isArray(inputRefs) ? inputRefs : [inputRefs];
      const handleInvalid = (event) => {
        event.preventDefault();
        setIsTouched(true);
      };
      for (const ref of refs) {
        ref.current?.addEventListener("invalid", handleInvalid);
      }
      return () => {
        for (const ref of refs) {
          ref.current?.removeEventListener("invalid", handleInvalid);
        }
      };
    }, [inputRefs, setIsTouched]);
    (0, import_element182.useEffect)(() => {
      if (!isTouched) {
        return;
      }
      const result = validity ? getCustomValidity(isValid2, validity) : void 0;
      if (result) {
        setCustomValidity(result);
      } else {
        validateRefs();
      }
    }, [isTouched, isValid2, validity, validateRefs]);
    const onBlur = (event) => {
      if (isTouched) {
        return;
      }
      if (!event.relatedTarget || !event.currentTarget.contains(event.relatedTarget)) {
        setIsTouched(true);
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime350.jsxs)("div", { onBlur, children: [
      children,
      /* @__PURE__ */ (0, import_jsx_runtime350.jsx)("div", { "aria-live": "polite", children: customValidity && /* @__PURE__ */ (0, import_jsx_runtime350.jsxs)(
        "p",
        {
          className: clsx_default(
            "components-validated-control__indicator",
            customValidity.type === "invalid" ? "is-invalid" : void 0
          ),
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
              import_components204.Icon,
              {
                className: "components-validated-control__indicator-icon",
                icon: error_default,
                size: 16,
                fill: "currentColor"
              }
            ),
            customValidity.message
          ]
        }
      ) })
    ] });
  }
  function CalendarDateControl({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const {
      id,
      label,
      setValue,
      getValue: getValue2,
      isValid: isValid2,
      format: fieldFormat
    } = field;
    const [selectedPresetId, setSelectedPresetId] = (0, import_element182.useState)(
      null
    );
    const weekStartsOn = fieldFormat.weekStartsOn ?? (0, import_date13.getSettings)().l10n.startOfWeek;
    const fieldValue = getValue2({ item: data });
    const value = typeof fieldValue === "string" ? fieldValue : void 0;
    const [calendarMonth, setCalendarMonth] = (0, import_element182.useState)(() => {
      const parsedDate = parseDate2(value);
      return parsedDate || /* @__PURE__ */ new Date();
    });
    const [isTouched, setIsTouched] = (0, import_element182.useState)(false);
    const validityTargetRef = (0, import_element182.useRef)(null);
    const onChangeCallback = (0, import_element182.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue })),
      [data, onChange, setValue]
    );
    const onSelectDate = (0, import_element182.useCallback)(
      (newDate) => {
        const dateValue = newDate ? format(newDate, "yyyy-MM-dd") : void 0;
        onChangeCallback(dateValue);
        setSelectedPresetId(null);
        setIsTouched(true);
      },
      [onChangeCallback]
    );
    const handlePresetClick = (0, import_element182.useCallback)(
      (preset) => {
        const presetDate = preset.getValue();
        const dateValue = formatDate(presetDate);
        setCalendarMonth(presetDate);
        onChangeCallback(dateValue);
        setSelectedPresetId(preset.id);
        setIsTouched(true);
      },
      [onChangeCallback]
    );
    const handleManualDateChange = (0, import_element182.useCallback)(
      (newValue) => {
        onChangeCallback(newValue);
        if (newValue) {
          const parsedDate = parseDate2(newValue);
          if (parsedDate) {
            setCalendarMonth(parsedDate);
          }
        }
        setSelectedPresetId(null);
        setIsTouched(true);
      },
      [onChangeCallback]
    );
    const {
      timezone: { string: timezoneString }
    } = (0, import_date13.getSettings)();
    let displayLabel = label;
    if (isValid2?.required && !markWhenOptional) {
      displayLabel = `${label} (${(0, import_i18n228.__)("Required")})`;
    } else if (!isValid2?.required && markWhenOptional) {
      displayLabel = `${label} (${(0, import_i18n228.__)("Optional")})`;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
      ValidatedDateControl,
      {
        field,
        validity,
        inputRefs: validityTargetRef,
        isTouched,
        setIsTouched,
        children: /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
          import_components204.BaseControl,
          {
            id,
            className: "dataviews-controls__date",
            label: displayLabel,
            hideLabelFromVision,
            children: /* @__PURE__ */ (0, import_jsx_runtime350.jsxs)(Stack, { direction: "column", gap: "lg", children: [
              /* @__PURE__ */ (0, import_jsx_runtime350.jsxs)(
                Stack,
                {
                  direction: "row",
                  gap: "sm",
                  wrap: "wrap",
                  justify: "flex-start",
                  children: [
                    DATE_PRESETS.map((preset) => {
                      const isSelected = selectedPresetId === preset.id;
                      return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
                        import_components204.Button,
                        {
                          className: "dataviews-controls__date-preset",
                          variant: "tertiary",
                          isPressed: isSelected,
                          size: "small",
                          onClick: () => handlePresetClick(preset),
                          children: preset.label
                        },
                        preset.id
                      );
                    }),
                    /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
                      import_components204.Button,
                      {
                        className: "dataviews-controls__date-preset",
                        variant: "tertiary",
                        isPressed: !selectedPresetId,
                        size: "small",
                        disabled: !!selectedPresetId,
                        accessibleWhenDisabled: false,
                        children: (0, import_i18n228.__)("Custom")
                      }
                    )
                  ]
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
                import_components204.__experimentalInputControl,
                {
                  __next40pxDefaultSize: true,
                  ref: validityTargetRef,
                  type: "date",
                  label: (0, import_i18n228.__)("Date"),
                  hideLabelFromVision: true,
                  value,
                  onChange: handleManualDateChange,
                  required: !!field.isValid?.required
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
                DateCalendar2,
                {
                  style: { width: "100%" },
                  selected: value ? parseDate2(value) || void 0 : void 0,
                  onSelect: onSelectDate,
                  month: calendarMonth,
                  onMonthChange: setCalendarMonth,
                  timeZone: timezoneString || void 0,
                  weekStartsOn
                }
              )
            ] })
          }
        )
      }
    );
  }
  function CalendarDateRangeControl({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { id, label, getValue: getValue2, setValue, format: fieldFormat } = field;
    let value;
    const fieldValue = getValue2({ item: data });
    if (Array.isArray(fieldValue) && fieldValue.length === 2 && fieldValue.every((date) => typeof date === "string")) {
      value = fieldValue;
    }
    const weekStartsOn = fieldFormat.weekStartsOn ?? (0, import_date13.getSettings)().l10n.startOfWeek;
    const onChangeCallback = (0, import_element182.useCallback)(
      (newValue) => {
        onChange(
          setValue({
            item: data,
            value: newValue
          })
        );
      },
      [data, onChange, setValue]
    );
    const [selectedPresetId, setSelectedPresetId] = (0, import_element182.useState)(
      null
    );
    const selectedRange = (0, import_element182.useMemo)(() => {
      if (!value) {
        return { from: void 0, to: void 0 };
      }
      const [from, to2] = value;
      return {
        from: parseDate2(from) || void 0,
        to: parseDate2(to2) || void 0
      };
    }, [value]);
    const [calendarMonth, setCalendarMonth] = (0, import_element182.useState)(() => {
      return selectedRange.from || /* @__PURE__ */ new Date();
    });
    const [isTouched, setIsTouched] = (0, import_element182.useState)(false);
    const fromInputRef = (0, import_element182.useRef)(null);
    const toInputRef = (0, import_element182.useRef)(null);
    const updateDateRange = (0, import_element182.useCallback)(
      (fromDate, toDate3) => {
        if (fromDate && toDate3) {
          onChangeCallback([
            formatDate(fromDate),
            formatDate(toDate3)
          ]);
        } else if (!fromDate && !toDate3) {
          onChangeCallback(void 0);
        }
      },
      [onChangeCallback]
    );
    const onSelectCalendarRange = (0, import_element182.useCallback)(
      (newRange) => {
        updateDateRange(newRange?.from, newRange?.to);
        setSelectedPresetId(null);
        setIsTouched(true);
      },
      [updateDateRange]
    );
    const handlePresetClick = (0, import_element182.useCallback)(
      (preset) => {
        const [startDate2, endDate] = preset.getValue();
        setCalendarMonth(startDate2);
        updateDateRange(startDate2, endDate);
        setSelectedPresetId(preset.id);
        setIsTouched(true);
      },
      [updateDateRange]
    );
    const handleManualDateChange = (0, import_element182.useCallback)(
      (fromOrTo, newValue) => {
        const [currentFrom, currentTo] = value || [
          void 0,
          void 0
        ];
        const updatedFrom = fromOrTo === "from" ? newValue : currentFrom;
        const updatedTo = fromOrTo === "to" ? newValue : currentTo;
        updateDateRange(updatedFrom, updatedTo);
        if (newValue) {
          const parsedDate = parseDate2(newValue);
          if (parsedDate) {
            setCalendarMonth(parsedDate);
          }
        }
        setSelectedPresetId(null);
        setIsTouched(true);
      },
      [value, updateDateRange]
    );
    const { timezone } = (0, import_date13.getSettings)();
    let displayLabel = label;
    if (field.isValid?.required && !markWhenOptional) {
      displayLabel = `${label} (${(0, import_i18n228.__)("Required")})`;
    } else if (!field.isValid?.required && markWhenOptional) {
      displayLabel = `${label} (${(0, import_i18n228.__)("Optional")})`;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
      ValidatedDateControl,
      {
        field,
        validity,
        inputRefs: [fromInputRef, toInputRef],
        isTouched,
        setIsTouched,
        children: /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
          import_components204.BaseControl,
          {
            id,
            className: "dataviews-controls__date",
            label: displayLabel,
            hideLabelFromVision,
            children: /* @__PURE__ */ (0, import_jsx_runtime350.jsxs)(Stack, { direction: "column", gap: "lg", children: [
              /* @__PURE__ */ (0, import_jsx_runtime350.jsxs)(
                Stack,
                {
                  direction: "row",
                  gap: "sm",
                  wrap: "wrap",
                  justify: "flex-start",
                  children: [
                    DATE_RANGE_PRESETS.map((preset) => {
                      const isSelected = selectedPresetId === preset.id;
                      return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
                        import_components204.Button,
                        {
                          className: "dataviews-controls__date-preset",
                          variant: "tertiary",
                          isPressed: isSelected,
                          size: "small",
                          onClick: () => handlePresetClick(preset),
                          children: preset.label
                        },
                        preset.id
                      );
                    }),
                    /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
                      import_components204.Button,
                      {
                        className: "dataviews-controls__date-preset",
                        variant: "tertiary",
                        isPressed: !selectedPresetId,
                        size: "small",
                        accessibleWhenDisabled: false,
                        disabled: !!selectedPresetId,
                        children: (0, import_i18n228.__)("Custom")
                      }
                    )
                  ]
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime350.jsxs)(
                Stack,
                {
                  direction: "row",
                  gap: "sm",
                  justify: "space-between",
                  className: "dataviews-controls__date-range-inputs",
                  children: [
                    /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
                      import_components204.__experimentalInputControl,
                      {
                        __next40pxDefaultSize: true,
                        ref: fromInputRef,
                        type: "date",
                        label: (0, import_i18n228.__)("From"),
                        hideLabelFromVision: true,
                        value: value?.[0],
                        onChange: (newValue) => handleManualDateChange("from", newValue),
                        required: !!field.isValid?.required
                      }
                    ),
                    /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
                      import_components204.__experimentalInputControl,
                      {
                        __next40pxDefaultSize: true,
                        ref: toInputRef,
                        type: "date",
                        label: (0, import_i18n228.__)("To"),
                        hideLabelFromVision: true,
                        value: value?.[1],
                        onChange: (newValue) => handleManualDateChange("to", newValue),
                        required: !!field.isValid?.required
                      }
                    )
                  ]
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
                DateRangeCalendar,
                {
                  style: { width: "100%" },
                  selected: selectedRange,
                  onSelect: onSelectCalendarRange,
                  month: calendarMonth,
                  onMonthChange: setCalendarMonth,
                  timeZone: timezone.string || void 0,
                  weekStartsOn
                }
              )
            ] })
          }
        )
      }
    );
  }
  function DateControl({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    operator,
    validity
  }) {
    if (operator === OPERATOR_IN_THE_PAST || operator === OPERATOR_OVER) {
      return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
        RelativeDateControl,
        {
          className: "dataviews-controls__date",
          data,
          field,
          onChange,
          hideLabelFromVision,
          operator
        }
      );
    }
    if (operator === OPERATOR_BETWEEN) {
      return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
        CalendarDateRangeControl,
        {
          data,
          field,
          onChange,
          hideLabelFromVision,
          markWhenOptional,
          validity
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
      CalendarDateControl,
      {
        data,
        field,
        onChange,
        hideLabelFromVision,
        markWhenOptional,
        validity
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/select.mjs
  var import_components205 = __toESM(require_components(), 1);
  var import_element183 = __toESM(require_element(), 1);
  var import_jsx_runtime351 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedSelectControl } = unlock4(import_components205.privateApis);
  function Select({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { type, label, description, getValue: getValue2, setValue, isValid: isValid2 } = field;
    const isMultiple = type === "array";
    const value = getValue2({ item: data }) ?? (isMultiple ? [] : "");
    const onChangeControl = (0, import_element183.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue })),
      [data, onChange, setValue]
    );
    const { elements: elements2, isLoading } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime351.jsx)(import_components205.Spinner, {});
    }
    return /* @__PURE__ */ (0, import_jsx_runtime351.jsx)(
      ValidatedSelectControl,
      {
        required: !!field.isValid?.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        value,
        help: description,
        options: elements2,
        onChange: onChangeControl,
        __next40pxDefaultSize: true,
        hideLabelFromVision,
        multiple: isMultiple
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/adaptive-select.mjs
  var import_jsx_runtime352 = __toESM(require_jsx_runtime(), 1);
  var ELEMENTS_THRESHOLD = 10;
  function AdaptiveSelect(props) {
    const { field } = props;
    const { elements: elements2 } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    if (elements2.length >= ELEMENTS_THRESHOLD) {
      return /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(Combobox, { ...props });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(Select, { ...props });
  }

  // packages/dataviews/build-module/components/dataform-controls/email.mjs
  var import_components207 = __toESM(require_components(), 1);

  // packages/dataviews/build-module/components/dataform-controls/utils/validated-input.mjs
  var import_components206 = __toESM(require_components(), 1);
  var import_element184 = __toESM(require_element(), 1);
  var import_jsx_runtime353 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedInputControl: ValidatedInputControl2 } = unlock4(import_components206.privateApis);
  function ValidatedText({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    type,
    prefix: prefix2,
    suffix,
    validity
  }) {
    const { label, placeholder, description, getValue: getValue2, setValue, isValid: isValid2 } = field;
    const value = getValue2({ item: data });
    const onChangeControl = (0, import_element184.useCallback)(
      (newValue) => onChange(
        setValue({
          item: data,
          value: newValue
        })
      ),
      [data, setValue, onChange]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
      ValidatedInputControl2,
      {
        required: !!isValid2.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        placeholder,
        value: value ?? "",
        help: description,
        onChange: onChangeControl,
        hideLabelFromVision,
        type,
        prefix: prefix2,
        suffix,
        pattern: isValid2.pattern ? isValid2.pattern.constraint : void 0,
        minLength: isValid2.minLength ? isValid2.minLength.constraint : void 0,
        maxLength: isValid2.maxLength ? isValid2.maxLength.constraint : void 0,
        __next40pxDefaultSize: true
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/email.mjs
  var import_jsx_runtime354 = __toESM(require_jsx_runtime(), 1);
  function Email({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime354.jsx)(
      ValidatedText,
      {
        ...{
          data,
          field,
          onChange,
          hideLabelFromVision,
          markWhenOptional,
          validity,
          type: "email",
          prefix: /* @__PURE__ */ (0, import_jsx_runtime354.jsx)(import_components207.__experimentalInputControlPrefixWrapper, { variant: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime354.jsx)(import_components207.Icon, { icon: envelope_default }) })
        }
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/telephone.mjs
  var import_components208 = __toESM(require_components(), 1);
  var import_jsx_runtime355 = __toESM(require_jsx_runtime(), 1);
  function Telephone({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
      ValidatedText,
      {
        ...{
          data,
          field,
          onChange,
          hideLabelFromVision,
          markWhenOptional,
          validity,
          type: "tel",
          prefix: /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(import_components208.__experimentalInputControlPrefixWrapper, { variant: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(import_components208.Icon, { icon: mobile_default }) })
        }
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/url.mjs
  var import_components209 = __toESM(require_components(), 1);
  var import_jsx_runtime356 = __toESM(require_jsx_runtime(), 1);
  function Url({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
      ValidatedText,
      {
        ...{
          data,
          field,
          onChange,
          hideLabelFromVision,
          markWhenOptional,
          validity,
          type: "url",
          prefix: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(import_components209.__experimentalInputControlPrefixWrapper, { variant: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(import_components209.Icon, { icon: link_default }) })
        }
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/utils/validated-number.mjs
  var import_components210 = __toESM(require_components(), 1);
  var import_element185 = __toESM(require_element(), 1);
  var import_i18n229 = __toESM(require_i18n(), 1);
  var import_jsx_runtime357 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedNumberControl } = unlock4(import_components210.privateApis);
  function toNumberOrEmpty(value) {
    if (value === "" || value === void 0) {
      return "";
    }
    const number = Number(value);
    return Number.isFinite(number) ? number : "";
  }
  function BetweenControls({
    value,
    onChange,
    hideLabelFromVision,
    step
  }) {
    const [min2 = "", max2 = ""] = value;
    const onChangeMin = (0, import_element185.useCallback)(
      (newValue) => onChange([toNumberOrEmpty(newValue), max2]),
      [onChange, max2]
    );
    const onChangeMax = (0, import_element185.useCallback)(
      (newValue) => onChange([min2, toNumberOrEmpty(newValue)]),
      [onChange, min2]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime357.jsx)(
      import_components210.BaseControl,
      {
        help: (0, import_i18n229.__)("The max. value must be greater than the min. value."),
        children: /* @__PURE__ */ (0, import_jsx_runtime357.jsxs)(import_components210.Flex, { direction: "row", gap: 4, children: [
          /* @__PURE__ */ (0, import_jsx_runtime357.jsx)(
            import_components210.__experimentalNumberControl,
            {
              label: (0, import_i18n229.__)("Min."),
              value: min2,
              max: max2 ? Number(max2) - step : void 0,
              onChange: onChangeMin,
              __next40pxDefaultSize: true,
              hideLabelFromVision,
              step
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime357.jsx)(
            import_components210.__experimentalNumberControl,
            {
              label: (0, import_i18n229.__)("Max."),
              value: max2,
              min: min2 ? Number(min2) + step : void 0,
              onChange: onChangeMax,
              __next40pxDefaultSize: true,
              hideLabelFromVision,
              step
            }
          )
        ] })
      }
    );
  }
  function ValidatedNumber({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    operator,
    validity
  }) {
    const decimals = field.format?.decimals ?? 0;
    const step = Math.pow(10, Math.abs(decimals) * -1);
    const { label, description, getValue: getValue2, setValue, isValid: isValid2 } = field;
    const value = getValue2({ item: data }) ?? "";
    const onChangeControl = (0, import_element185.useCallback)(
      (newValue) => {
        onChange(
          setValue({
            item: data,
            // Do not convert an empty string or undefined to a number,
            // otherwise there's a mismatch between the UI control (empty)
            // and the data relied by onChange (0).
            value: ["", void 0].includes(newValue) ? void 0 : Number(newValue)
          })
        );
      },
      [data, onChange, setValue]
    );
    const onChangeBetweenControls = (0, import_element185.useCallback)(
      (newValue) => {
        onChange(
          setValue({
            item: data,
            value: newValue
          })
        );
      },
      [data, onChange, setValue]
    );
    if (operator === OPERATOR_BETWEEN) {
      let valueBetween = ["", ""];
      if (Array.isArray(value) && value.length === 2 && value.every(
        (element) => typeof element === "number" || element === ""
      )) {
        valueBetween = value;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime357.jsx)(
        BetweenControls,
        {
          value: valueBetween,
          onChange: onChangeBetweenControls,
          hideLabelFromVision,
          step
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime357.jsx)(
      ValidatedNumberControl,
      {
        required: !!isValid2.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        help: description,
        value,
        onChange: onChangeControl,
        __next40pxDefaultSize: true,
        hideLabelFromVision,
        step,
        min: isValid2.min ? isValid2.min.constraint : void 0,
        max: isValid2.max ? isValid2.max.constraint : void 0
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/integer.mjs
  var import_jsx_runtime358 = __toESM(require_jsx_runtime(), 1);
  function Integer(props) {
    return /* @__PURE__ */ (0, import_jsx_runtime358.jsx)(ValidatedNumber, { ...props });
  }

  // packages/dataviews/build-module/components/dataform-controls/number.mjs
  var import_jsx_runtime359 = __toESM(require_jsx_runtime(), 1);
  function Number2(props) {
    return /* @__PURE__ */ (0, import_jsx_runtime359.jsx)(ValidatedNumber, { ...props });
  }

  // packages/dataviews/build-module/components/dataform-controls/radio.mjs
  var import_components211 = __toESM(require_components(), 1);
  var import_element186 = __toESM(require_element(), 1);
  var import_jsx_runtime360 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedRadioControl } = unlock4(import_components211.privateApis);
  function Radio({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { label, description, getValue: getValue2, setValue, isValid: isValid2 } = field;
    const { elements: elements2, isLoading } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    const value = getValue2({ item: data });
    const onChangeControl = (0, import_element186.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue })),
      [data, onChange, setValue]
    );
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(import_components211.Spinner, {});
    }
    return /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(
      ValidatedRadioControl,
      {
        required: !!field.isValid?.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        help: description,
        onChange: onChangeControl,
        options: elements2,
        selected: value,
        hideLabelFromVision
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/text.mjs
  var import_element187 = __toESM(require_element(), 1);
  var import_jsx_runtime361 = __toESM(require_jsx_runtime(), 1);
  function Text21({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    config: config2,
    validity
  }) {
    const { prefix: prefix2, suffix } = config2 || {};
    return /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
      ValidatedText,
      {
        ...{
          data,
          field,
          onChange,
          hideLabelFromVision,
          markWhenOptional,
          validity,
          prefix: prefix2 ? (0, import_element187.createElement)(prefix2) : void 0,
          suffix: suffix ? (0, import_element187.createElement)(suffix) : void 0
        }
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/toggle.mjs
  var import_components212 = __toESM(require_components(), 1);
  var import_element188 = __toESM(require_element(), 1);
  var import_jsx_runtime362 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedToggleControl } = unlock4(import_components212.privateApis);
  function Toggle({
    field,
    onChange,
    data,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { label, description, getValue: getValue2, setValue, isValid: isValid2 } = field;
    const onChangeControl = (0, import_element188.useCallback)(() => {
      onChange(
        setValue({ item: data, value: !getValue2({ item: data }) })
      );
    }, [onChange, setValue, data, getValue2]);
    return /* @__PURE__ */ (0, import_jsx_runtime362.jsx)(
      ValidatedToggleControl,
      {
        required: !!isValid2.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        hidden: hideLabelFromVision,
        label,
        help: description,
        checked: getValue2({ item: data }),
        onChange: onChangeControl
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/textarea.mjs
  var import_components213 = __toESM(require_components(), 1);
  var import_element189 = __toESM(require_element(), 1);
  var import_jsx_runtime363 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedTextareaControl } = unlock4(import_components213.privateApis);
  function Textarea2({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    config: config2,
    validity
  }) {
    const { rows = 4 } = config2 || {};
    const { label, placeholder, description, setValue, isValid: isValid2 } = field;
    const value = field.getValue({ item: data });
    const onChangeControl = (0, import_element189.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue })),
      [data, onChange, setValue]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime363.jsx)(
      ValidatedTextareaControl,
      {
        required: !!isValid2.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        placeholder,
        value: value ?? "",
        help: description,
        onChange: onChangeControl,
        rows,
        minLength: isValid2.minLength ? isValid2.minLength.constraint : void 0,
        maxLength: isValid2.maxLength ? isValid2.maxLength.constraint : void 0,
        __next40pxDefaultSize: true,
        hideLabelFromVision
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/toggle-group.mjs
  var import_components214 = __toESM(require_components(), 1);
  var import_element190 = __toESM(require_element(), 1);
  var import_jsx_runtime364 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedToggleGroupControl } = unlock4(import_components214.privateApis);
  function ToggleGroup({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { getValue: getValue2, setValue, isValid: isValid2 } = field;
    const value = getValue2({ item: data });
    const onChangeControl = (0, import_element190.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue })),
      [data, onChange, setValue]
    );
    const { elements: elements2, isLoading } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(import_components214.Spinner, {});
    }
    if (elements2.length === 0) {
      return null;
    }
    const selectedOption = elements2.find((el) => el.value === value);
    return /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
      ValidatedToggleGroupControl,
      {
        required: !!field.isValid?.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        __next40pxDefaultSize: true,
        isBlock: true,
        label: field.label,
        help: selectedOption?.description || field.description,
        onChange: onChangeControl,
        value,
        hideLabelFromVision,
        children: elements2.map((el) => /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
          import_components214.__experimentalToggleGroupControlOption,
          {
            label: el.label,
            value: el.value
          },
          el.value
        ))
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/array.mjs
  var import_components215 = __toESM(require_components(), 1);
  var import_element191 = __toESM(require_element(), 1);
  var import_jsx_runtime365 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedFormTokenField } = unlock4(import_components215.privateApis);
  function ArrayControl({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { label, placeholder, getValue: getValue2, setValue, isValid: isValid2 } = field;
    const value = getValue2({ item: data });
    const { elements: elements2, isLoading } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    const arrayValueAsElements = (0, import_element191.useMemo)(
      () => Array.isArray(value) ? value.map((token) => {
        const element = elements2?.find(
          (suggestion) => suggestion.value === token
        );
        return element || { value: token, label: token };
      }) : [],
      [value, elements2]
    );
    const onChangeControl = (0, import_element191.useCallback)(
      (tokens) => {
        const valueTokens = tokens.map((token) => {
          if (typeof token === "object" && "value" in token) {
            return token.value;
          }
          return token;
        });
        onChange(setValue({ item: data, value: valueTokens }));
      },
      [onChange, setValue, data]
    );
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(import_components215.Spinner, {});
    }
    return /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
      ValidatedFormTokenField,
      {
        required: !!isValid2?.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label: hideLabelFromVision ? void 0 : label,
        value: arrayValueAsElements,
        onChange: onChangeControl,
        placeholder,
        suggestions: elements2?.map((element) => element.value),
        __experimentalValidateInput: (token) => {
          if (field.isValid?.elements && elements2) {
            return elements2.some(
              (element) => element.value === token || element.label === token
            );
          }
          return true;
        },
        __experimentalExpandOnFocus: elements2 && elements2.length > 0,
        __experimentalShowHowTo: !field.isValid?.elements,
        displayTransform: (token) => {
          if (typeof token === "object" && "label" in token) {
            return token.label;
          }
          if (typeof token === "string" && elements2) {
            const element = elements2.find(
              (el) => el.value === token
            );
            return element?.label || token;
          }
          return token;
        },
        __experimentalRenderItem: ({ item }) => {
          if (typeof item === "string" && elements2) {
            const element = elements2.find(
              (el) => el.value === item
            );
            return /* @__PURE__ */ (0, import_jsx_runtime365.jsx)("span", { children: element?.label || item });
          }
          return /* @__PURE__ */ (0, import_jsx_runtime365.jsx)("span", { children: item });
        }
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/color.mjs
  var import_components216 = __toESM(require_components(), 1);
  var import_element192 = __toESM(require_element(), 1);
  var import_i18n230 = __toESM(require_i18n(), 1);
  var import_jsx_runtime366 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedInputControl: ValidatedInputControl3 } = unlock4(import_components216.privateApis);
  var ColorPickerDropdown = ({
    color,
    onColorChange
  }) => {
    const validColor = color && w2(color).isValid() ? color : "#ffffff";
    return /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
      import_components216.Dropdown,
      {
        className: "dataviews-controls__color-picker-dropdown",
        popoverProps: { resize: false },
        renderToggle: ({ onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
          import_components216.Button,
          {
            onClick: onToggle,
            "aria-label": (0, import_i18n230.__)("Open color picker"),
            size: "small",
            icon: () => /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(import_components216.ColorIndicator, { colorValue: validColor })
          }
        ),
        renderContent: () => /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(import_components216.__experimentalDropdownContentWrapper, { paddingSize: "none", children: /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
          import_components216.ColorPicker,
          {
            color: validColor,
            onChange: onColorChange,
            enableAlpha: true
          }
        ) })
      }
    );
  };
  function Color({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { label, placeholder, description, setValue, isValid: isValid2 } = field;
    const value = field.getValue({ item: data }) || "";
    const handleColorChange = (0, import_element192.useCallback)(
      (newColor) => {
        onChange(setValue({ item: data, value: newColor }));
      },
      [data, onChange, setValue]
    );
    const handleInputChange = (0, import_element192.useCallback)(
      (newValue) => {
        onChange(setValue({ item: data, value: newValue || "" }));
      },
      [data, onChange, setValue]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
      ValidatedInputControl3,
      {
        required: !!field.isValid?.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        placeholder,
        value,
        help: description,
        onChange: handleInputChange,
        hideLabelFromVision,
        type: "text",
        prefix: /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(import_components216.__experimentalInputControlPrefixWrapper, { variant: "control", children: /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
          ColorPickerDropdown,
          {
            color: value,
            onColorChange: handleColorChange
          }
        ) })
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/password.mjs
  var import_components217 = __toESM(require_components(), 1);
  var import_element193 = __toESM(require_element(), 1);
  var import_i18n231 = __toESM(require_i18n(), 1);
  var import_jsx_runtime367 = __toESM(require_jsx_runtime(), 1);
  function Password({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const [isVisible, setIsVisible] = (0, import_element193.useState)(false);
    const toggleVisibility = (0, import_element193.useCallback)(() => {
      setIsVisible((prev) => !prev);
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
      ValidatedText,
      {
        ...{
          data,
          field,
          onChange,
          hideLabelFromVision,
          markWhenOptional,
          validity,
          type: isVisible ? "text" : "password",
          suffix: /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(import_components217.__experimentalInputControlSuffixWrapper, { variant: "control", children: /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
            import_components217.Button,
            {
              icon: isVisible ? unseen_default : seen_default,
              onClick: toggleVisibility,
              size: "small",
              label: isVisible ? (0, import_i18n231.__)("Hide password") : (0, import_i18n231.__)("Show password")
            }
          ) })
        }
      }
    );
  }

  // packages/dataviews/build-module/field-types/utils/has-elements.mjs
  function hasElements(field) {
    return Array.isArray(field.elements) && field.elements.length > 0 || typeof field.getElements === "function";
  }

  // packages/dataviews/build-module/components/dataform-controls/index.mjs
  var import_jsx_runtime368 = __toESM(require_jsx_runtime(), 1);
  var FORM_CONTROLS = {
    adaptiveSelect: AdaptiveSelect,
    array: ArrayControl,
    checkbox: Checkbox,
    color: Color,
    combobox: Combobox,
    datetime: DateTime,
    date: DateControl,
    email: Email,
    telephone: Telephone,
    url: Url,
    integer: Integer,
    number: Number2,
    password: Password,
    radio: Radio,
    select: Select,
    text: Text21,
    toggle: Toggle,
    textarea: Textarea2,
    toggleGroup: ToggleGroup
  };
  function isEditConfig(value) {
    return value && typeof value === "object" && typeof value.control === "string";
  }
  function createConfiguredControl(config2) {
    const { control, ...controlConfig } = config2;
    const BaseControlType = getControlByType(control);
    if (BaseControlType === null) {
      return null;
    }
    return function ConfiguredControl(props) {
      return /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(BaseControlType, { ...props, config: controlConfig });
    };
  }
  function getControl(field, fallback) {
    if (typeof field.Edit === "function") {
      return field.Edit;
    }
    if (typeof field.Edit === "string") {
      return getControlByType(field.Edit);
    }
    if (isEditConfig(field.Edit)) {
      return createConfiguredControl(field.Edit);
    }
    if (hasElements(field) && field.type !== "array") {
      return getControlByType("adaptiveSelect");
    }
    if (fallback === null) {
      return null;
    }
    return getControlByType(fallback);
  }
  function getControlByType(type) {
    if (Object.keys(FORM_CONTROLS).includes(type)) {
      return FORM_CONTROLS[type];
    }
    return null;
  }

  // packages/dataviews/build-module/field-types/utils/get-filter-by.mjs
  function getFilterBy(field, defaultOperators, validOperators) {
    if (field.filterBy === false) {
      return false;
    }
    const operators = field.filterBy?.operators?.filter(
      (op) => validOperators.includes(op)
    ) ?? defaultOperators;
    if (operators.length === 0) {
      return false;
    }
    return {
      isPrimary: !!field.filterBy?.isPrimary,
      operators
    };
  }
  var get_filter_by_default = getFilterBy;

  // packages/dataviews/build-module/field-types/utils/get-value-from-id.mjs
  var getValueFromId = (id) => ({ item }) => {
    const path = id.split(".");
    let value = item;
    for (const segment of path) {
      if (value.hasOwnProperty(segment)) {
        value = value[segment];
      } else {
        value = void 0;
      }
    }
    return value;
  };
  var get_value_from_id_default = getValueFromId;

  // packages/dataviews/build-module/field-types/utils/set-value-from-id.mjs
  var setValueFromId = (id) => ({ value }) => {
    const path = id.split(".");
    const result = {};
    let current = result;
    for (const segment of path.slice(0, -1)) {
      current[segment] = {};
      current = current[segment];
    }
    current[path.at(-1)] = value;
    return result;
  };
  var set_value_from_id_default = setValueFromId;

  // packages/dataviews/build-module/field-types/email.mjs
  var import_i18n232 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/field-types/utils/render-from-elements.mjs
  function RenderFromElements({
    item,
    field
  }) {
    const { elements: elements2, isLoading } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    const value = field.getValue({ item });
    if (isLoading) {
      return value;
    }
    if (elements2.length === 0) {
      return value;
    }
    return elements2?.find((element) => element.value === value)?.label || field.getValue({ item });
  }

  // packages/dataviews/build-module/field-types/utils/render-default.mjs
  var import_jsx_runtime369 = __toESM(require_jsx_runtime(), 1);
  function render({
    item,
    field
  }) {
    if (field.hasElements) {
      return /* @__PURE__ */ (0, import_jsx_runtime369.jsx)(RenderFromElements, { item, field });
    }
    return field.getValueFormatted({ item, field });
  }

  // packages/dataviews/build-module/field-types/utils/sort-text.mjs
  var sort_text_default = (a3, b3, direction) => {
    return direction === "asc" ? a3.localeCompare(b3) : b3.localeCompare(a3);
  };

  // packages/dataviews/build-module/field-types/utils/is-valid-required.mjs
  function isValidRequired(item, field) {
    const value = field.getValue({ item });
    return ![void 0, "", null].includes(value);
  }

  // packages/dataviews/build-module/field-types/utils/is-valid-min-length.mjs
  function isValidMinLength(item, field) {
    if (typeof field.isValid.minLength?.constraint !== "number") {
      return false;
    }
    const value = field.getValue({ item });
    if ([void 0, "", null].includes(value)) {
      return true;
    }
    return String(value).length >= field.isValid.minLength.constraint;
  }

  // packages/dataviews/build-module/field-types/utils/is-valid-max-length.mjs
  function isValidMaxLength(item, field) {
    if (typeof field.isValid.maxLength?.constraint !== "number") {
      return false;
    }
    const value = field.getValue({ item });
    if ([void 0, "", null].includes(value)) {
      return true;
    }
    return String(value).length <= field.isValid.maxLength.constraint;
  }

  // packages/dataviews/build-module/field-types/utils/is-valid-pattern.mjs
  function isValidPattern(item, field) {
    if (field.isValid.pattern?.constraint === void 0) {
      return true;
    }
    try {
      const regexp = new RegExp(field.isValid.pattern.constraint);
      const value = field.getValue({ item });
      if ([void 0, "", null].includes(value)) {
        return true;
      }
      return regexp.test(String(value));
    } catch {
      return false;
    }
  }

  // packages/dataviews/build-module/field-types/utils/is-valid-elements.mjs
  function isValidElements(item, field) {
    const elements2 = field.elements ?? [];
    const validValues = elements2.map((el) => el.value);
    if (validValues.length === 0) {
      return true;
    }
    const value = field.getValue({ item });
    return [].concat(value).every((v3) => validValues.includes(v3));
  }

  // packages/dataviews/build-module/field-types/utils/get-value-formatted-default.mjs
  function getValueFormatted({
    item,
    field
  }) {
    return field.getValue({ item });
  }
  var get_value_formatted_default_default = getValueFormatted;

  // packages/dataviews/build-module/field-types/email.mjs
  var emailRegex = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
  function isValidCustom(item, field) {
    const value = field.getValue({ item });
    if (![void 0, "", null].includes(value) && !emailRegex.test(value)) {
      return (0, import_i18n232.__)("Value must be a valid email address.");
    }
    return null;
  }
  var email_default = {
    type: "email",
    render,
    Edit: "email",
    sort: sort_text_default,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS_ANY2, OPERATOR_IS_NONE],
    validOperators: [
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_CONTAINS,
      OPERATOR_NOT_CONTAINS,
      OPERATOR_STARTS_WITH,
      // Multiple selection
      OPERATOR_IS_ANY2,
      OPERATOR_IS_NONE,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    validate: {
      required: isValidRequired,
      pattern: isValidPattern,
      minLength: isValidMinLength,
      maxLength: isValidMaxLength,
      elements: isValidElements,
      custom: isValidCustom
    }
  };

  // packages/dataviews/build-module/field-types/integer.mjs
  var import_i18n233 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/field-types/utils/sort-number.mjs
  var sort_number_default = (a3, b3, direction) => {
    return direction === "asc" ? a3 - b3 : b3 - a3;
  };

  // packages/dataviews/build-module/field-types/utils/is-valid-min.mjs
  function isValidMin(item, field) {
    if (typeof field.isValid.min?.constraint !== "number") {
      return false;
    }
    const value = field.getValue({ item });
    if ([void 0, "", null].includes(value)) {
      return true;
    }
    return Number(value) >= field.isValid.min.constraint;
  }

  // packages/dataviews/build-module/field-types/utils/is-valid-max.mjs
  function isValidMax(item, field) {
    if (typeof field.isValid.max?.constraint !== "number") {
      return false;
    }
    const value = field.getValue({ item });
    if ([void 0, "", null].includes(value)) {
      return true;
    }
    return Number(value) <= field.isValid.max.constraint;
  }

  // packages/dataviews/build-module/field-types/integer.mjs
  var format2 = {
    separatorThousand: ","
  };
  function getValueFormatted2({
    item,
    field
  }) {
    let value = field.getValue({ item });
    if (value === null || value === void 0) {
      return "";
    }
    value = Number(value);
    if (!Number.isFinite(value)) {
      return String(value);
    }
    let formatInteger;
    if (field.type !== "integer") {
      formatInteger = format2;
    } else {
      formatInteger = field.format;
    }
    const { separatorThousand } = formatInteger;
    const integerValue = Math.trunc(value);
    if (!separatorThousand) {
      return String(integerValue);
    }
    return String(integerValue).replace(
      /\B(?=(\d{3})+(?!\d))/g,
      separatorThousand
    );
  }
  function isValidCustom2(item, field) {
    const value = field.getValue({ item });
    if (![void 0, "", null].includes(value) && !Number.isInteger(value)) {
      return (0, import_i18n233.__)("Value must be an integer.");
    }
    return null;
  }
  var integer_default = {
    type: "integer",
    render,
    Edit: "integer",
    sort: sort_number_default,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_LESS_THAN,
      OPERATOR_GREATER_THAN,
      OPERATOR_LESS_THAN_OR_EQUAL,
      OPERATOR_GREATER_THAN_OR_EQUAL,
      OPERATOR_BETWEEN
    ],
    validOperators: [
      // Single-selection
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_LESS_THAN,
      OPERATOR_GREATER_THAN,
      OPERATOR_LESS_THAN_OR_EQUAL,
      OPERATOR_GREATER_THAN_OR_EQUAL,
      OPERATOR_BETWEEN,
      // Multiple-selection
      OPERATOR_IS_ANY2,
      OPERATOR_IS_NONE,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: format2,
    getValueFormatted: getValueFormatted2,
    validate: {
      required: isValidRequired,
      min: isValidMin,
      max: isValidMax,
      elements: isValidElements,
      custom: isValidCustom2
    }
  };

  // packages/dataviews/build-module/field-types/number.mjs
  var import_i18n234 = __toESM(require_i18n(), 1);
  var format3 = {
    separatorThousand: ",",
    separatorDecimal: ".",
    decimals: 2
  };
  function getValueFormatted3({
    item,
    field
  }) {
    let value = field.getValue({ item });
    if (value === null || value === void 0) {
      return "";
    }
    value = Number(value);
    if (!Number.isFinite(value)) {
      return String(value);
    }
    let formatNumber;
    if (field.type !== "number") {
      formatNumber = format3;
    } else {
      formatNumber = field.format;
    }
    const { separatorThousand, separatorDecimal, decimals } = formatNumber;
    const fixedValue = value.toFixed(decimals);
    const [integerPart, decimalPart] = fixedValue.split(".");
    const formattedInteger = separatorThousand ? integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, separatorThousand) : integerPart;
    return decimals === 0 ? formattedInteger : formattedInteger + separatorDecimal + decimalPart;
  }
  function isEmpty(value) {
    return value === "" || value === void 0 || value === null;
  }
  function isValidCustom3(item, field) {
    const value = field.getValue({ item });
    if (!isEmpty(value) && !Number.isFinite(value)) {
      return (0, import_i18n234.__)("Value must be a number.");
    }
    return null;
  }
  var number_default = {
    type: "number",
    render,
    Edit: "number",
    sort: sort_number_default,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_LESS_THAN,
      OPERATOR_GREATER_THAN,
      OPERATOR_LESS_THAN_OR_EQUAL,
      OPERATOR_GREATER_THAN_OR_EQUAL,
      OPERATOR_BETWEEN
    ],
    validOperators: [
      // Single-selection
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_LESS_THAN,
      OPERATOR_GREATER_THAN,
      OPERATOR_LESS_THAN_OR_EQUAL,
      OPERATOR_GREATER_THAN_OR_EQUAL,
      OPERATOR_BETWEEN,
      // Multiple-selection
      OPERATOR_IS_ANY2,
      OPERATOR_IS_NONE,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: format3,
    getValueFormatted: getValueFormatted3,
    validate: {
      required: isValidRequired,
      min: isValidMin,
      max: isValidMax,
      elements: isValidElements,
      custom: isValidCustom3
    }
  };

  // packages/dataviews/build-module/field-types/text.mjs
  var text_default = {
    type: "text",
    render,
    Edit: "text",
    sort: sort_text_default,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS_ANY2, OPERATOR_IS_NONE],
    validOperators: [
      // Single selection
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_CONTAINS,
      OPERATOR_NOT_CONTAINS,
      OPERATOR_STARTS_WITH,
      // Multiple selection
      OPERATOR_IS_ANY2,
      OPERATOR_IS_NONE,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    validate: {
      required: isValidRequired,
      pattern: isValidPattern,
      minLength: isValidMinLength,
      maxLength: isValidMaxLength,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/datetime.mjs
  var import_date15 = __toESM(require_date(), 1);
  var format4 = {
    datetime: (0, import_date15.getSettings)().formats.datetime,
    weekStartsOn: (0, import_date15.getSettings)().l10n.startOfWeek
  };
  function getValueFormatted4({
    item,
    field
  }) {
    const value = field.getValue({ item });
    if (["", void 0, null].includes(value)) {
      return "";
    }
    let formatDatetime;
    if (field.type !== "datetime") {
      formatDatetime = format4;
    } else {
      formatDatetime = field.format;
    }
    return (0, import_date15.dateI18n)(formatDatetime.datetime, (0, import_date15.getDate)(value));
  }
  var sort = (a3, b3, direction) => {
    const timeA = new Date(a3).getTime();
    const timeB = new Date(b3).getTime();
    return direction === "asc" ? timeA - timeB : timeB - timeA;
  };
  var datetime_default = {
    type: "datetime",
    render,
    Edit: "datetime",
    sort,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [
      OPERATOR_ON,
      OPERATOR_NOT_ON,
      OPERATOR_BEFORE,
      OPERATOR_AFTER,
      OPERATOR_BEFORE_INC,
      OPERATOR_AFTER_INC,
      OPERATOR_IN_THE_PAST,
      OPERATOR_OVER
    ],
    validOperators: [
      OPERATOR_ON,
      OPERATOR_NOT_ON,
      OPERATOR_BEFORE,
      OPERATOR_AFTER,
      OPERATOR_BEFORE_INC,
      OPERATOR_AFTER_INC,
      OPERATOR_IN_THE_PAST,
      OPERATOR_OVER
    ],
    format: format4,
    getValueFormatted: getValueFormatted4,
    validate: {
      required: isValidRequired,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/date.mjs
  var import_date16 = __toESM(require_date(), 1);
  var format5 = {
    date: (0, import_date16.getSettings)().formats.date,
    weekStartsOn: (0, import_date16.getSettings)().l10n.startOfWeek
  };
  function getValueFormatted5({
    item,
    field
  }) {
    const value = field.getValue({ item });
    if (["", void 0, null].includes(value)) {
      return "";
    }
    let formatDate2;
    if (field.type !== "date") {
      formatDate2 = format5;
    } else {
      formatDate2 = field.format;
    }
    return (0, import_date16.dateI18n)(formatDate2.date, (0, import_date16.getDate)(value));
  }
  var sort2 = (a3, b3, direction) => {
    const timeA = new Date(a3).getTime();
    const timeB = new Date(b3).getTime();
    return direction === "asc" ? timeA - timeB : timeB - timeA;
  };
  var date_default2 = {
    type: "date",
    render,
    Edit: "date",
    sort: sort2,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [
      OPERATOR_ON,
      OPERATOR_NOT_ON,
      OPERATOR_BEFORE,
      OPERATOR_AFTER,
      OPERATOR_BEFORE_INC,
      OPERATOR_AFTER_INC,
      OPERATOR_IN_THE_PAST,
      OPERATOR_OVER,
      OPERATOR_BETWEEN
    ],
    validOperators: [
      OPERATOR_ON,
      OPERATOR_NOT_ON,
      OPERATOR_BEFORE,
      OPERATOR_AFTER,
      OPERATOR_BEFORE_INC,
      OPERATOR_AFTER_INC,
      OPERATOR_IN_THE_PAST,
      OPERATOR_OVER,
      OPERATOR_BETWEEN
    ],
    format: format5,
    getValueFormatted: getValueFormatted5,
    validate: {
      required: isValidRequired,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/boolean.mjs
  var import_i18n235 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/field-types/utils/is-valid-required-for-bool.mjs
  function isValidRequiredForBool(item, field) {
    const value = field.getValue({ item });
    return value === true;
  }

  // packages/dataviews/build-module/field-types/boolean.mjs
  function getValueFormatted6({
    item,
    field
  }) {
    const value = field.getValue({ item });
    if (value === true) {
      return (0, import_i18n235.__)("True");
    }
    if (value === false) {
      return (0, import_i18n235.__)("False");
    }
    return "";
  }
  function isValidCustom4(item, field) {
    const value = field.getValue({ item });
    if (![void 0, "", null].includes(value) && ![true, false].includes(value)) {
      return (0, import_i18n235.__)("Value must be true, false, or undefined");
    }
    return null;
  }
  var sort3 = (a3, b3, direction) => {
    const boolA = Boolean(a3);
    const boolB = Boolean(b3);
    if (boolA === boolB) {
      return 0;
    }
    if (direction === "asc") {
      return boolA ? 1 : -1;
    }
    return boolA ? -1 : 1;
  };
  var boolean_default = {
    type: "boolean",
    render,
    Edit: "checkbox",
    sort: sort3,
    validate: {
      required: isValidRequiredForBool,
      elements: isValidElements,
      custom: isValidCustom4
    },
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS, OPERATOR_IS_NOT],
    validOperators: [OPERATOR_IS, OPERATOR_IS_NOT],
    format: {},
    getValueFormatted: getValueFormatted6
  };

  // packages/dataviews/build-module/field-types/media.mjs
  var media_default = {
    type: "media",
    render: () => null,
    Edit: null,
    sort: () => 0,
    enableSorting: false,
    enableGlobalSearch: false,
    defaultOperators: [],
    validOperators: [],
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    // cannot validate any constraint, so
    // the only available validation for the field author
    // would be providing a custom validator.
    validate: {}
  };

  // packages/dataviews/build-module/field-types/array.mjs
  var import_i18n236 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/field-types/utils/is-valid-required-for-array.mjs
  function isValidRequiredForArray(item, field) {
    const value = field.getValue({ item });
    return Array.isArray(value) && value.length > 0 && value.every(
      (element) => ![void 0, "", null].includes(element)
    );
  }

  // packages/dataviews/build-module/field-types/array.mjs
  function getValueFormatted7({
    item,
    field
  }) {
    const value = field.getValue({ item });
    const arr = Array.isArray(value) ? value : [];
    return arr.join(", ");
  }
  function render2({ item, field }) {
    return getValueFormatted7({ item, field });
  }
  function isValidCustom5(item, field) {
    const value = field.getValue({ item });
    if (![void 0, "", null].includes(value) && !Array.isArray(value)) {
      return (0, import_i18n236.__)("Value must be an array.");
    }
    if (!value.every((v3) => typeof v3 === "string")) {
      return (0, import_i18n236.__)("Every value must be a string.");
    }
    return null;
  }
  var sort4 = (a3, b3, direction) => {
    const arrA = Array.isArray(a3) ? a3 : [];
    const arrB = Array.isArray(b3) ? b3 : [];
    if (arrA.length !== arrB.length) {
      return direction === "asc" ? arrA.length - arrB.length : arrB.length - arrA.length;
    }
    const joinedA = arrA.join(",");
    const joinedB = arrB.join(",");
    return direction === "asc" ? joinedA.localeCompare(joinedB) : joinedB.localeCompare(joinedA);
  };
  var array_default = {
    type: "array",
    render: render2,
    Edit: "array",
    sort: sort4,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS_ANY2, OPERATOR_IS_NONE],
    validOperators: [
      OPERATOR_IS_ANY2,
      OPERATOR_IS_NONE,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: {},
    getValueFormatted: getValueFormatted7,
    validate: {
      required: isValidRequiredForArray,
      elements: isValidElements,
      custom: isValidCustom5
    }
  };

  // packages/dataviews/build-module/field-types/password.mjs
  function getValueFormatted8({
    item,
    field
  }) {
    return field.getValue({ item }) ? "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" : "";
  }
  var password_default2 = {
    type: "password",
    render,
    Edit: "password",
    sort: () => 0,
    // Passwords should not be sortable for security reasons
    enableSorting: false,
    enableGlobalSearch: false,
    defaultOperators: [],
    validOperators: [],
    format: {},
    getValueFormatted: getValueFormatted8,
    validate: {
      required: isValidRequired,
      pattern: isValidPattern,
      minLength: isValidMinLength,
      maxLength: isValidMaxLength,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/telephone.mjs
  var telephone_default = {
    type: "telephone",
    render,
    Edit: "telephone",
    sort: sort_text_default,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS_ANY2, OPERATOR_IS_NONE],
    validOperators: [
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_CONTAINS,
      OPERATOR_NOT_CONTAINS,
      OPERATOR_STARTS_WITH,
      // Multiple selection
      OPERATOR_IS_ANY2,
      OPERATOR_IS_NONE,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    validate: {
      required: isValidRequired,
      pattern: isValidPattern,
      minLength: isValidMinLength,
      maxLength: isValidMaxLength,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/color.mjs
  var import_i18n237 = __toESM(require_i18n(), 1);
  var import_jsx_runtime370 = __toESM(require_jsx_runtime(), 1);
  function render3({ item, field }) {
    if (field.hasElements) {
      return /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(RenderFromElements, { item, field });
    }
    const value = get_value_formatted_default_default({ item, field });
    if (!value || !w2(value).isValid()) {
      return value;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime370.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
      /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
        "div",
        {
          style: {
            width: "16px",
            height: "16px",
            borderRadius: "50%",
            backgroundColor: value,
            border: "1px solid #ddd",
            flexShrink: 0
          }
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime370.jsx)("span", { children: value })
    ] });
  }
  function isValidCustom6(item, field) {
    const value = field.getValue({ item });
    if (![void 0, "", null].includes(value) && !w2(value).isValid()) {
      return (0, import_i18n237.__)("Value must be a valid color.");
    }
    return null;
  }
  var sort5 = (a3, b3, direction) => {
    const colorA = w2(a3);
    const colorB = w2(b3);
    if (!colorA.isValid() && !colorB.isValid()) {
      return 0;
    }
    if (!colorA.isValid()) {
      return direction === "asc" ? 1 : -1;
    }
    if (!colorB.isValid()) {
      return direction === "asc" ? -1 : 1;
    }
    const hslA = colorA.toHsl();
    const hslB = colorB.toHsl();
    if (hslA.h !== hslB.h) {
      return direction === "asc" ? hslA.h - hslB.h : hslB.h - hslA.h;
    }
    if (hslA.s !== hslB.s) {
      return direction === "asc" ? hslA.s - hslB.s : hslB.s - hslA.s;
    }
    return direction === "asc" ? hslA.l - hslB.l : hslB.l - hslA.l;
  };
  var color_default2 = {
    type: "color",
    render: render3,
    Edit: "color",
    sort: sort5,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS_ANY2, OPERATOR_IS_NONE],
    validOperators: [
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_IS_ANY2,
      OPERATOR_IS_NONE
    ],
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    validate: {
      required: isValidRequired,
      elements: isValidElements,
      custom: isValidCustom6
    }
  };

  // packages/dataviews/build-module/field-types/url.mjs
  var url_default = {
    type: "url",
    render,
    Edit: "url",
    sort: sort_text_default,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS_ANY2, OPERATOR_IS_NONE],
    validOperators: [
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_CONTAINS,
      OPERATOR_NOT_CONTAINS,
      OPERATOR_STARTS_WITH,
      // Multiple selection
      OPERATOR_IS_ANY2,
      OPERATOR_IS_NONE,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    validate: {
      required: isValidRequired,
      pattern: isValidPattern,
      minLength: isValidMinLength,
      maxLength: isValidMaxLength,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/no-type.mjs
  var sort6 = (a3, b3, direction) => {
    if (typeof a3 === "number" && typeof b3 === "number") {
      return sort_number_default(a3, b3, direction);
    }
    return sort_text_default(a3, b3, direction);
  };
  var no_type_default = {
    // type: no type for this one
    render,
    Edit: null,
    sort: sort6,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS, OPERATOR_IS_NOT],
    validOperators: getAllOperatorNames(),
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    validate: {
      required: isValidRequired,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/utils/get-is-valid.mjs
  function getIsValid(field, fieldType) {
    let required;
    if (field.isValid?.required === true && fieldType.validate.required !== void 0) {
      required = {
        constraint: true,
        validate: fieldType.validate.required
      };
    }
    let elements2;
    if ((field.isValid?.elements === true || // elements is enabled unless the field opts-out
    field.isValid?.elements === void 0 && (!!field.elements || !!field.getElements)) && fieldType.validate.elements !== void 0) {
      elements2 = {
        constraint: true,
        validate: fieldType.validate.elements
      };
    }
    let min2;
    if (typeof field.isValid?.min === "number" && fieldType.validate.min !== void 0) {
      min2 = {
        constraint: field.isValid.min,
        validate: fieldType.validate.min
      };
    }
    let max2;
    if (typeof field.isValid?.max === "number" && fieldType.validate.max !== void 0) {
      max2 = {
        constraint: field.isValid.max,
        validate: fieldType.validate.max
      };
    }
    let minLength;
    if (typeof field.isValid?.minLength === "number" && fieldType.validate.minLength !== void 0) {
      minLength = {
        constraint: field.isValid.minLength,
        validate: fieldType.validate.minLength
      };
    }
    let maxLength;
    if (typeof field.isValid?.maxLength === "number" && fieldType.validate.maxLength !== void 0) {
      maxLength = {
        constraint: field.isValid.maxLength,
        validate: fieldType.validate.maxLength
      };
    }
    let pattern;
    if (field.isValid?.pattern !== void 0 && fieldType.validate.pattern !== void 0) {
      pattern = {
        constraint: field.isValid?.pattern,
        validate: fieldType.validate.pattern
      };
    }
    const custom = field.isValid?.custom ?? fieldType.validate.custom;
    return {
      required,
      elements: elements2,
      min: min2,
      max: max2,
      minLength,
      maxLength,
      pattern,
      custom
    };
  }

  // packages/dataviews/build-module/field-types/utils/get-filter.mjs
  function getFilter(fieldType) {
    return fieldType.validOperators.reduce((accumulator, operator) => {
      const operatorObj = getOperatorByName(operator);
      if (operatorObj?.filter) {
        accumulator[operator] = operatorObj.filter;
      }
      return accumulator;
    }, {});
  }

  // packages/dataviews/build-module/field-types/utils/get-format.mjs
  function getFormat(field, fieldType) {
    return {
      ...fieldType.format,
      ...field.format
    };
  }
  var get_format_default = getFormat;

  // packages/dataviews/build-module/field-types/index.mjs
  function getFieldTypeByName(type) {
    const found = [
      email_default,
      integer_default,
      number_default,
      text_default,
      datetime_default,
      date_default2,
      boolean_default,
      media_default,
      array_default,
      password_default2,
      telephone_default,
      color_default2,
      url_default
    ].find((fieldType) => fieldType?.type === type);
    if (!!found) {
      return found;
    }
    return no_type_default;
  }
  function normalizeFields(fields2) {
    return fields2.map((field) => {
      const fieldType = getFieldTypeByName(field.type);
      const getValue2 = field.getValue || get_value_from_id_default(field.id);
      const sort7 = function(a3, b3, direction) {
        const aValue = getValue2({ item: a3 });
        const bValue = getValue2({ item: b3 });
        return field.sort ? field.sort(aValue, bValue, direction) : fieldType.sort(aValue, bValue, direction);
      };
      return {
        id: field.id,
        label: field.label || field.id,
        header: field.header || field.label || field.id,
        description: field.description,
        placeholder: field.placeholder,
        getValue: getValue2,
        setValue: field.setValue || set_value_from_id_default(field.id),
        elements: field.elements,
        getElements: field.getElements,
        hasElements: hasElements(field),
        isVisible: field.isVisible,
        enableHiding: field.enableHiding ?? true,
        readOnly: field.readOnly ?? false,
        // The type provides defaults for the following props
        type: fieldType.type,
        render: field.render ?? fieldType.render,
        Edit: getControl(field, fieldType.Edit),
        sort: sort7,
        enableSorting: field.enableSorting ?? fieldType.enableSorting,
        enableGlobalSearch: field.enableGlobalSearch ?? fieldType.enableGlobalSearch,
        isValid: getIsValid(field, fieldType),
        filterBy: get_filter_by_default(
          field,
          fieldType.defaultOperators,
          fieldType.validOperators
        ),
        filter: getFilter(fieldType),
        format: get_format_default(field, fieldType),
        getValueFormatted: field.getValueFormatted ?? fieldType.getValueFormatted
      };
    });
  }

  // packages/dataviews/build-module/dataform/index.mjs
  var import_element205 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/components/dataform-context/index.mjs
  var import_element194 = __toESM(require_element(), 1);
  var import_jsx_runtime371 = __toESM(require_jsx_runtime(), 1);
  var DataFormContext = (0, import_element194.createContext)({
    fields: []
  });
  DataFormContext.displayName = "DataFormContext";
  function DataFormProvider({
    fields: fields2,
    children
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(DataFormContext.Provider, { value: { fields: fields2 }, children });
  }
  var dataform_context_default = DataFormContext;

  // packages/dataviews/build-module/components/dataform-layouts/data-form-layout.mjs
  var import_element204 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/components/dataform-layouts/regular/index.mjs
  var import_element195 = __toESM(require_element(), 1);
  var import_components218 = __toESM(require_components(), 1);

  // packages/dataviews/build-module/components/dataform-layouts/normalize-form.mjs
  var DEFAULT_LAYOUT = {
    type: "regular",
    labelPosition: "top"
  };
  var normalizeCardSummaryField = (sum) => {
    if (typeof sum === "string") {
      return [{ id: sum, visibility: "when-collapsed" }];
    }
    return sum.map((item) => {
      if (typeof item === "string") {
        return { id: item, visibility: "when-collapsed" };
      }
      return { id: item.id, visibility: item.visibility };
    });
  };
  function normalizeLayout(layout) {
    let normalizedLayout = DEFAULT_LAYOUT;
    if (layout?.type === "regular") {
      normalizedLayout = {
        type: "regular",
        labelPosition: layout?.labelPosition ?? "top"
      };
    } else if (layout?.type === "panel") {
      const summary = layout.summary ?? [];
      const normalizedSummary = Array.isArray(summary) ? summary : [summary];
      normalizedLayout = {
        type: "panel",
        labelPosition: layout?.labelPosition ?? "side",
        openAs: layout?.openAs ?? "dropdown",
        summary: normalizedSummary,
        editVisibility: layout?.editVisibility ?? "on-hover"
      };
    } else if (layout?.type === "card") {
      if (layout.withHeader === false) {
        normalizedLayout = {
          type: "card",
          withHeader: false,
          isOpened: true,
          summary: [],
          isCollapsible: false
        };
      } else {
        const summary = layout.summary ?? [];
        normalizedLayout = {
          type: "card",
          withHeader: true,
          isOpened: typeof layout.isOpened === "boolean" ? layout.isOpened : true,
          summary: normalizeCardSummaryField(summary),
          isCollapsible: layout.isCollapsible === void 0 ? true : layout.isCollapsible
        };
      }
    } else if (layout?.type === "row") {
      normalizedLayout = {
        type: "row",
        alignment: layout?.alignment ?? "center",
        styles: layout?.styles ?? {}
      };
    } else if (layout?.type === "details") {
      normalizedLayout = {
        type: "details",
        summary: layout?.summary ?? ""
      };
    }
    return normalizedLayout;
  }
  function normalizeForm(form) {
    const normalizedFormLayout = normalizeLayout(form?.layout);
    const normalizedFields = (form.fields ?? []).map(
      (field) => {
        if (typeof field === "string") {
          return {
            id: field,
            layout: normalizedFormLayout
          };
        }
        const fieldLayout = field.layout ? normalizeLayout(field.layout) : normalizedFormLayout;
        return {
          id: field.id,
          layout: fieldLayout,
          ...!!field.label && { label: field.label },
          ...!!field.description && {
            description: field.description
          },
          ..."children" in field && Array.isArray(field.children) && {
            children: normalizeForm({
              fields: field.children,
              layout: DEFAULT_LAYOUT
            }).fields
          }
        };
      }
    );
    return {
      layout: normalizedFormLayout,
      fields: normalizedFields
    };
  }
  var normalize_form_default = normalizeForm;

  // packages/dataviews/build-module/components/dataform-layouts/regular/index.mjs
  var import_jsx_runtime372 = __toESM(require_jsx_runtime(), 1);
  function Header2({ title }) {
    return /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(
      Stack,
      {
        direction: "column",
        className: "dataforms-layouts-regular__header",
        gap: "lg",
        children: /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(Stack, { direction: "row", align: "center", children: /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(import_components218.__experimentalHeading, { level: 2, size: 13, children: title }) })
      }
    );
  }
  function FormRegularField({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { fields: fields2 } = (0, import_element195.useContext)(dataform_context_default);
    const layout = field.layout;
    const form = (0, import_element195.useMemo)(
      () => ({
        layout: DEFAULT_LAYOUT,
        fields: !!field.children ? field.children : []
      }),
      [field]
    );
    if (!!field.children) {
      return /* @__PURE__ */ (0, import_jsx_runtime372.jsxs)(import_jsx_runtime372.Fragment, { children: [
        !hideLabelFromVision && field.label && /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(Header2, { title: field.label }),
        /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(
          DataFormLayout,
          {
            data,
            form,
            onChange,
            validity: validity?.children
          }
        )
      ] });
    }
    const labelPosition = layout.labelPosition;
    const fieldDefinition = fields2.find(
      (fieldDef) => fieldDef.id === field.id
    );
    if (!fieldDefinition || !fieldDefinition.Edit) {
      return null;
    }
    if (labelPosition === "side") {
      return /* @__PURE__ */ (0, import_jsx_runtime372.jsxs)(
        Stack,
        {
          direction: "row",
          className: "dataforms-layouts-regular__field",
          gap: "sm",
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(
              "div",
              {
                className: clsx_default(
                  "dataforms-layouts-regular__field-label",
                  `dataforms-layouts-regular__field-label--label-position-${labelPosition}`
                ),
                children: /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(import_components218.BaseControl.VisualLabel, { children: fieldDefinition.label })
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime372.jsx)("div", { className: "dataforms-layouts-regular__field-control", children: fieldDefinition.readOnly === true ? /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(
              fieldDefinition.render,
              {
                item: data,
                field: fieldDefinition
              }
            ) : /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(
              fieldDefinition.Edit,
              {
                data,
                field: fieldDefinition,
                onChange,
                hideLabelFromVision: true,
                markWhenOptional,
                validity
              },
              fieldDefinition.id
            ) })
          ]
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime372.jsx)("div", { className: "dataforms-layouts-regular__field", children: fieldDefinition.readOnly === true ? /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(import_jsx_runtime372.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime372.jsxs)(import_jsx_runtime372.Fragment, { children: [
      !hideLabelFromVision && labelPosition !== "none" && /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(import_components218.BaseControl.VisualLabel, { children: fieldDefinition.label }),
      /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(
        fieldDefinition.render,
        {
          item: data,
          field: fieldDefinition
        }
      )
    ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(
      fieldDefinition.Edit,
      {
        data,
        field: fieldDefinition,
        onChange,
        hideLabelFromVision: labelPosition === "none" ? true : hideLabelFromVision,
        markWhenOptional,
        validity
      }
    ) });
  }

  // packages/dataviews/build-module/components/dataform-layouts/panel/modal.mjs
  var import_deepmerge3 = __toESM(require_cjs(), 1);
  var import_components221 = __toESM(require_components(), 1);
  var import_i18n240 = __toESM(require_i18n(), 1);
  var import_element200 = __toESM(require_element(), 1);
  var import_compose61 = __toESM(require_compose(), 1);

  // packages/dataviews/build-module/components/dataform-layouts/panel/summary-button.mjs
  var import_components220 = __toESM(require_components(), 1);
  var import_i18n238 = __toESM(require_i18n(), 1);
  var import_compose60 = __toESM(require_compose(), 1);
  var import_element196 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/components/dataform-layouts/panel/utils/get-label-classname.mjs
  function getLabelClassName(labelPosition, showError) {
    return clsx_default(
      "dataforms-layouts-panel__field-label",
      `dataforms-layouts-panel__field-label--label-position-${labelPosition}`,
      { "has-error": showError }
    );
  }
  var get_label_classname_default = getLabelClassName;

  // packages/dataviews/build-module/components/dataform-layouts/panel/utils/get-label-content.mjs
  var import_components219 = __toESM(require_components(), 1);
  var import_jsx_runtime373 = __toESM(require_jsx_runtime(), 1);
  function getLabelContent(showError, errorMessage, fieldLabel) {
    return showError ? /* @__PURE__ */ (0, import_jsx_runtime373.jsx)(import_components219.Tooltip, { text: errorMessage, placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime373.jsxs)("span", { className: "dataforms-layouts-panel__field-label-error-content", children: [
      /* @__PURE__ */ (0, import_jsx_runtime373.jsx)(import_components219.Icon, { icon: error_default, size: 16 }),
      fieldLabel
    ] }) }) : fieldLabel;
  }
  var get_label_content_default = getLabelContent;

  // packages/dataviews/build-module/components/dataform-layouts/panel/utils/get-first-validation-error.mjs
  function getFirstValidationError(validity) {
    if (!validity) {
      return void 0;
    }
    const validityRules = Object.keys(validity).filter(
      (key) => key !== "children"
    );
    for (const key of validityRules) {
      const rule = validity[key];
      if (rule === void 0) {
        continue;
      }
      if (rule.type === "invalid") {
        if (rule.message) {
          return rule.message;
        }
        if (key === "required") {
          return "A required field is empty";
        }
        return "Unidentified validation error";
      }
    }
    if (validity.children) {
      for (const childValidity of Object.values(validity.children)) {
        const childError = getFirstValidationError(childValidity);
        if (childError) {
          return childError;
        }
      }
    }
    return void 0;
  }
  var get_first_validation_error_default = getFirstValidationError;

  // packages/dataviews/build-module/components/dataform-layouts/panel/summary-button.mjs
  var import_jsx_runtime374 = __toESM(require_jsx_runtime(), 1);
  function SummaryButton({
    data,
    field,
    fieldLabel,
    summaryFields,
    validity,
    touched,
    disabled,
    onClick,
    "aria-expanded": ariaExpanded
  }) {
    const { labelPosition, editVisibility } = field.layout;
    const errorMessage = get_first_validation_error_default(validity);
    const showError = touched && !!errorMessage;
    const labelClassName = get_label_classname_default(labelPosition, showError);
    const labelContent = get_label_content_default(showError, errorMessage, fieldLabel);
    const className = clsx_default(
      "dataforms-layouts-panel__field-trigger",
      `dataforms-layouts-panel__field-trigger--label-${labelPosition}`,
      {
        "is-disabled": disabled,
        "dataforms-layouts-panel__field-trigger--edit-always": editVisibility === "always"
      }
    );
    const controlId = (0, import_compose60.useInstanceId)(
      SummaryButton,
      "dataforms-layouts-panel__field-control"
    );
    const ariaLabel = showError ? (0, import_i18n238.sprintf)(
      // translators: %s: Field name.
      (0, import_i18n238._x)("Edit %s (has errors)", "field"),
      fieldLabel || ""
    ) : (0, import_i18n238.sprintf)(
      // translators: %s: Field name.
      (0, import_i18n238._x)("Edit %s", "field"),
      fieldLabel || ""
    );
    const rowRef = (0, import_element196.useRef)(null);
    const handleRowClick = () => {
      const selection = rowRef.current?.ownerDocument.defaultView?.getSelection();
      if (selection && selection.toString().length > 0) {
        return;
      }
      onClick();
    };
    const handleKeyDown = (event) => {
      if (event.target === event.currentTarget && (event.key === "Enter" || event.key === " ")) {
        event.preventDefault();
        onClick();
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime374.jsxs)(
      "div",
      {
        ref: rowRef,
        className,
        onClick: !disabled ? handleRowClick : void 0,
        onKeyDown: !disabled ? handleKeyDown : void 0,
        children: [
          labelPosition !== "none" && /* @__PURE__ */ (0, import_jsx_runtime374.jsx)("span", { className: labelClassName, children: labelContent }),
          labelPosition === "none" && showError && /* @__PURE__ */ (0, import_jsx_runtime374.jsx)(import_components220.Tooltip, { text: errorMessage, placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime374.jsx)("span", { className: "dataforms-layouts-panel__field-label-error-content", children: /* @__PURE__ */ (0, import_jsx_runtime374.jsx)(import_components220.Icon, { icon: error_default, size: 16 }) }) }),
          /* @__PURE__ */ (0, import_jsx_runtime374.jsx)(
            "span",
            {
              id: `${controlId}`,
              className: "dataforms-layouts-panel__field-control",
              children: summaryFields.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime374.jsx)(
                "span",
                {
                  style: {
                    display: "flex",
                    flexDirection: "column",
                    alignItems: "flex-start",
                    width: "100%",
                    gap: "2px"
                  },
                  children: summaryFields.map((summaryField) => /* @__PURE__ */ (0, import_jsx_runtime374.jsx)(
                    "span",
                    {
                      style: { width: "100%" },
                      children: /* @__PURE__ */ (0, import_jsx_runtime374.jsx)(
                        summaryField.render,
                        {
                          item: data,
                          field: summaryField
                        }
                      )
                    },
                    summaryField.id
                  ))
                }
              ) : summaryFields.map((summaryField) => /* @__PURE__ */ (0, import_jsx_runtime374.jsx)(
                summaryField.render,
                {
                  item: data,
                  field: summaryField
                },
                summaryField.id
              ))
            }
          ),
          !disabled && /* @__PURE__ */ (0, import_jsx_runtime374.jsx)(
            import_components220.Button,
            {
              className: "dataforms-layouts-panel__field-trigger-icon",
              label: ariaLabel,
              showTooltip: false,
              icon: pencil_default,
              size: "small",
              "aria-expanded": ariaExpanded,
              "aria-haspopup": "dialog",
              "aria-describedby": `${controlId}`
            }
          )
        ]
      }
    );
  }

  // packages/dataviews/build-module/hooks/use-form-validity.mjs
  var import_deepmerge2 = __toESM(require_cjs(), 1);
  var import_es62 = __toESM(require_es6(), 1);
  var import_element197 = __toESM(require_element(), 1);
  var import_i18n239 = __toESM(require_i18n(), 1);
  function isFormValid(formValidity) {
    if (!formValidity) {
      return true;
    }
    return Object.values(formValidity).every((fieldValidation) => {
      return Object.entries(fieldValidation).every(
        ([key, validation]) => {
          if (key === "children" && validation && typeof validation === "object") {
            return isFormValid(validation);
          }
          return validation.type !== "invalid" && validation.type !== "validating";
        }
      );
    });
  }
  function getFormFieldsToValidate(form, fields2) {
    const normalizedForm = normalize_form_default(form);
    if (normalizedForm.fields.length === 0) {
      return [];
    }
    const fieldsMap = /* @__PURE__ */ new Map();
    fields2.forEach((field) => {
      fieldsMap.set(field.id, field);
    });
    function processFormField(formField) {
      if ("children" in formField && Array.isArray(formField.children)) {
        const processedChildren = formField.children.map(processFormField).filter((child) => child !== null);
        if (processedChildren.length === 0) {
          return null;
        }
        const fieldDef2 = fieldsMap.get(formField.id);
        if (fieldDef2) {
          const [normalizedField2] = normalizeFields([
            fieldDef2
          ]);
          return {
            id: formField.id,
            children: processedChildren,
            field: normalizedField2
          };
        }
        return {
          id: formField.id,
          children: processedChildren
        };
      }
      const fieldDef = fieldsMap.get(formField.id);
      if (!fieldDef) {
        return null;
      }
      const [normalizedField] = normalizeFields([fieldDef]);
      return {
        id: formField.id,
        children: [],
        field: normalizedField
      };
    }
    const toValidate = normalizedForm.fields.map(processFormField).filter((field) => field !== null);
    return toValidate;
  }
  function setValidityAtPath(formValidity, fieldValidity, path) {
    if (!formValidity) {
      formValidity = {};
    }
    if (path.length === 0) {
      return formValidity;
    }
    const result = { ...formValidity };
    let current = result;
    for (let i3 = 0; i3 < path.length - 1; i3++) {
      const segment = path[i3];
      if (!current[segment]) {
        current[segment] = {};
      }
      current[segment] = { ...current[segment] };
      current = current[segment];
    }
    const finalKey = path[path.length - 1];
    current[finalKey] = {
      ...current[finalKey] || {},
      ...fieldValidity
    };
    return result;
  }
  function removeValidationProperty(formValidity, path, property) {
    if (!formValidity || path.length === 0) {
      return formValidity;
    }
    const result = { ...formValidity };
    let current = result;
    for (let i3 = 0; i3 < path.length - 1; i3++) {
      const segment = path[i3];
      if (!current[segment]) {
        return formValidity;
      }
      current[segment] = { ...current[segment] };
      current = current[segment];
    }
    const finalKey = path[path.length - 1];
    if (!current[finalKey]) {
      return formValidity;
    }
    const fieldValidity = { ...current[finalKey] };
    delete fieldValidity[property];
    if (Object.keys(fieldValidity).length === 0) {
      delete current[finalKey];
    } else {
      current[finalKey] = fieldValidity;
    }
    if (Object.keys(result).length === 0) {
      return void 0;
    }
    return result;
  }
  function handleElementsValidationAsync(promise, formField, promiseHandler) {
    const { elementsCounterRef, setFormValidity, path, item } = promiseHandler;
    const currentToken = (elementsCounterRef.current[formField.id] || 0) + 1;
    elementsCounterRef.current[formField.id] = currentToken;
    promise.then((result) => {
      if (currentToken !== elementsCounterRef.current[formField.id]) {
        return;
      }
      if (!Array.isArray(result)) {
        setFormValidity((prev) => {
          const newFormValidity = setValidityAtPath(
            prev,
            {
              elements: {
                type: "invalid",
                message: (0, import_i18n239.__)("Could not validate elements.")
              }
            },
            [...path, formField.id]
          );
          return newFormValidity;
        });
        return;
      }
      if (formField.field?.isValid.elements && !formField.field.isValid.elements.validate(item, {
        ...formField.field,
        elements: result
      })) {
        setFormValidity((prev) => {
          const newFormValidity = setValidityAtPath(
            prev,
            {
              elements: {
                type: "invalid",
                message: (0, import_i18n239.__)(
                  "Value must be one of the elements."
                )
              }
            },
            [...path, formField.id]
          );
          return newFormValidity;
        });
      } else {
        setFormValidity((prev) => {
          return removeValidationProperty(
            prev,
            [...path, formField.id],
            "elements"
          );
        });
      }
    }).catch((error) => {
      if (currentToken !== elementsCounterRef.current[formField.id]) {
        return;
      }
      let errorMessage;
      if (error instanceof Error) {
        errorMessage = error.message;
      } else {
        errorMessage = String(error) || (0, import_i18n239.__)(
          "Unknown error when running elements validation asynchronously."
        );
      }
      setFormValidity((prev) => {
        const newFormValidity = setValidityAtPath(
          prev,
          {
            elements: {
              type: "invalid",
              message: errorMessage
            }
          },
          [...path, formField.id]
        );
        return newFormValidity;
      });
    });
  }
  function handleCustomValidationAsync(promise, formField, promiseHandler) {
    const { customCounterRef, setFormValidity, path } = promiseHandler;
    const currentToken = (customCounterRef.current[formField.id] || 0) + 1;
    customCounterRef.current[formField.id] = currentToken;
    promise.then((result) => {
      if (currentToken !== customCounterRef.current[formField.id]) {
        return;
      }
      if (result === null) {
        setFormValidity((prev) => {
          return removeValidationProperty(
            prev,
            [...path, formField.id],
            "custom"
          );
        });
        return;
      }
      if (typeof result === "string") {
        setFormValidity((prev) => {
          const newFormValidity = setValidityAtPath(
            prev,
            {
              custom: {
                type: "invalid",
                message: result
              }
            },
            [...path, formField.id]
          );
          return newFormValidity;
        });
        return;
      }
      setFormValidity((prev) => {
        const newFormValidity = setValidityAtPath(
          prev,
          {
            custom: {
              type: "invalid",
              message: (0, import_i18n239.__)("Validation could not be processed.")
            }
          },
          [...path, formField.id]
        );
        return newFormValidity;
      });
    }).catch((error) => {
      if (currentToken !== customCounterRef.current[formField.id]) {
        return;
      }
      let errorMessage;
      if (error instanceof Error) {
        errorMessage = error.message;
      } else {
        errorMessage = String(error) || (0, import_i18n239.__)(
          "Unknown error when running custom validation asynchronously."
        );
      }
      setFormValidity((prev) => {
        const newFormValidity = setValidityAtPath(
          prev,
          {
            custom: {
              type: "invalid",
              message: errorMessage
            }
          },
          [...path, formField.id]
        );
        return newFormValidity;
      });
    });
  }
  function validateFormField(item, formField, promiseHandler) {
    if (formField.field?.isValid.required && !formField.field.isValid.required.validate(item, formField.field)) {
      return {
        required: { type: "invalid" }
      };
    }
    if (formField.field?.isValid.pattern && !formField.field.isValid.pattern.validate(item, formField.field)) {
      return {
        pattern: {
          type: "invalid",
          message: (0, import_i18n239.__)("Value does not match the required pattern.")
        }
      };
    }
    if (formField.field?.isValid.min && !formField.field.isValid.min.validate(item, formField.field)) {
      return {
        min: {
          type: "invalid",
          message: (0, import_i18n239.__)("Value is below the minimum.")
        }
      };
    }
    if (formField.field?.isValid.max && !formField.field.isValid.max.validate(item, formField.field)) {
      return {
        max: {
          type: "invalid",
          message: (0, import_i18n239.__)("Value is above the maximum.")
        }
      };
    }
    if (formField.field?.isValid.minLength && !formField.field.isValid.minLength.validate(item, formField.field)) {
      return {
        minLength: {
          type: "invalid",
          message: (0, import_i18n239.__)("Value is too short.")
        }
      };
    }
    if (formField.field?.isValid.maxLength && !formField.field.isValid.maxLength.validate(item, formField.field)) {
      return {
        maxLength: {
          type: "invalid",
          message: (0, import_i18n239.__)("Value is too long.")
        }
      };
    }
    if (formField.field?.isValid.elements && formField.field.hasElements && !formField.field.getElements && Array.isArray(formField.field.elements) && !formField.field.isValid.elements.validate(item, formField.field)) {
      return {
        elements: {
          type: "invalid",
          message: (0, import_i18n239.__)("Value must be one of the elements.")
        }
      };
    }
    let customError;
    if (!!formField.field && formField.field.isValid.custom) {
      try {
        const value = formField.field.getValue({ item });
        customError = formField.field.isValid.custom(
          (0, import_deepmerge2.default)(
            item,
            formField.field.setValue({
              item,
              value
            })
          ),
          formField.field
        );
      } catch (error) {
        let errorMessage;
        if (error instanceof Error) {
          errorMessage = error.message;
        } else {
          errorMessage = String(error) || (0, import_i18n239.__)("Unknown error when running custom validation.");
        }
        return {
          custom: {
            type: "invalid",
            message: errorMessage
          }
        };
      }
    }
    if (typeof customError === "string") {
      return {
        custom: {
          type: "invalid",
          message: customError
        }
      };
    }
    const fieldValidity = {};
    if (!!formField.field && formField.field.isValid.elements && formField.field.hasElements && typeof formField.field.getElements === "function") {
      handleElementsValidationAsync(
        formField.field.getElements(),
        formField,
        promiseHandler
      );
      fieldValidity.elements = {
        type: "validating",
        message: (0, import_i18n239.__)("Validating\u2026")
      };
    }
    if (customError instanceof Promise) {
      handleCustomValidationAsync(customError, formField, promiseHandler);
      fieldValidity.custom = {
        type: "validating",
        message: (0, import_i18n239.__)("Validating\u2026")
      };
    }
    if (Object.keys(fieldValidity).length > 0) {
      return fieldValidity;
    }
    if (formField.children.length > 0) {
      const result = {};
      formField.children.forEach((child) => {
        result[child.id] = validateFormField(item, child, {
          ...promiseHandler,
          path: [...promiseHandler.path, formField.id, "children"]
        });
      });
      const filteredResult = {};
      Object.entries(result).forEach(([key, value]) => {
        if (value !== void 0) {
          filteredResult[key] = value;
        }
      });
      if (Object.keys(filteredResult).length === 0) {
        return void 0;
      }
      return {
        children: filteredResult
      };
    }
    return void 0;
  }
  function getFormFieldValue(formField, item) {
    const fieldValue = formField?.field?.getValue({ item });
    if (formField.children.length === 0) {
      return fieldValue;
    }
    const childrenValues = formField.children.map(
      (child) => getFormFieldValue(child, item)
    );
    if (!childrenValues) {
      return fieldValue;
    }
    return {
      value: fieldValue,
      children: childrenValues
    };
  }
  function useFormValidity(item, fields2, form) {
    const [formValidity, setFormValidity] = (0, import_element197.useState)();
    const customCounterRef = (0, import_element197.useRef)({});
    const elementsCounterRef = (0, import_element197.useRef)({});
    const previousValuesRef = (0, import_element197.useRef)({});
    const validate = (0, import_element197.useCallback)(() => {
      const promiseHandler = {
        customCounterRef,
        elementsCounterRef,
        setFormValidity,
        path: [],
        item
      };
      const formFieldsToValidate = getFormFieldsToValidate(form, fields2);
      if (formFieldsToValidate.length === 0) {
        setFormValidity(void 0);
        return;
      }
      const newFormValidity = {};
      const untouchedFields = [];
      formFieldsToValidate.forEach((formField) => {
        const value = getFormFieldValue(formField, item);
        if (previousValuesRef.current.hasOwnProperty(formField.id) && (0, import_es62.default)(
          previousValuesRef.current[formField.id],
          value
        )) {
          untouchedFields.push(formField.id);
          return;
        }
        previousValuesRef.current[formField.id] = value;
        const fieldValidity = validateFormField(
          item,
          formField,
          promiseHandler
        );
        if (fieldValidity !== void 0) {
          newFormValidity[formField.id] = fieldValidity;
        }
      });
      setFormValidity((existingFormValidity) => {
        let validity = {
          ...existingFormValidity,
          ...newFormValidity
        };
        const fieldsToKeep = [
          ...untouchedFields,
          ...Object.keys(newFormValidity)
        ];
        Object.keys(validity).forEach((key) => {
          if (validity && !fieldsToKeep.includes(key)) {
            delete validity[key];
          }
        });
        if (Object.keys(validity).length === 0) {
          validity = void 0;
        }
        const areEqual = (0, import_es62.default)(existingFormValidity, validity);
        if (areEqual) {
          return existingFormValidity;
        }
        return validity;
      });
    }, [item, fields2, form]);
    (0, import_element197.useEffect)(() => {
      validate();
    }, [validate]);
    return {
      validity: formValidity,
      isValid: isFormValid(formValidity)
    };
  }
  var use_form_validity_default = useFormValidity;

  // packages/dataviews/build-module/hooks/use-report-validity.mjs
  var import_element198 = __toESM(require_element(), 1);
  function useReportValidity(ref, shouldReport) {
    (0, import_element198.useEffect)(() => {
      if (shouldReport && ref.current) {
        const inputs = ref.current.querySelectorAll(
          "input, textarea, select"
        );
        inputs.forEach((input) => {
          input.reportValidity();
        });
      }
    }, [shouldReport, ref]);
  }

  // packages/dataviews/build-module/components/dataform-layouts/panel/utils/use-field-from-form-field.mjs
  var import_element199 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/components/dataform-layouts/get-summary-fields.mjs
  function extractSummaryIds(summary) {
    if (Array.isArray(summary)) {
      return summary.map(
        (item) => typeof item === "string" ? item : item.id
      );
    }
    return [];
  }
  var getSummaryFields = (summaryField, fields2) => {
    if (Array.isArray(summaryField) && summaryField.length > 0) {
      const summaryIds = extractSummaryIds(summaryField);
      return summaryIds.map(
        (summaryId) => fields2.find((_field) => _field.id === summaryId)
      ).filter((_field) => _field !== void 0);
    }
    return [];
  };

  // packages/dataviews/build-module/components/dataform-layouts/panel/utils/use-field-from-form-field.mjs
  var getFieldDefinition = (field, fields2) => {
    const fieldDefinition = fields2.find((_field) => _field.id === field.id);
    if (!fieldDefinition) {
      return fields2.find((_field) => {
        if (!!field.children) {
          const simpleChildren = field.children.filter(
            (child) => !child.children
          );
          if (simpleChildren.length === 0) {
            return false;
          }
          return _field.id === simpleChildren[0].id;
        }
        return _field.id === field.id;
      });
    }
    return fieldDefinition;
  };
  function useFieldFromFormField(field) {
    const { fields: fields2 } = (0, import_element199.useContext)(dataform_context_default);
    const layout = field.layout;
    const summaryFields = getSummaryFields(layout.summary, fields2);
    const fieldDefinition = getFieldDefinition(field, fields2);
    const fieldLabel = !!field.children ? field.label : fieldDefinition?.label;
    if (summaryFields.length === 0) {
      return {
        summaryFields: fieldDefinition ? [fieldDefinition] : [],
        fieldDefinition,
        fieldLabel
      };
    }
    return {
      summaryFields,
      fieldDefinition,
      fieldLabel
    };
  }
  var use_field_from_form_field_default = useFieldFromFormField;

  // packages/dataviews/build-module/components/dataform-layouts/panel/modal.mjs
  var import_jsx_runtime375 = __toESM(require_jsx_runtime(), 1);
  function ModalContent({
    data,
    field,
    onChange,
    fieldLabel,
    onClose,
    touched
  }) {
    const { fields: fields2 } = (0, import_element200.useContext)(dataform_context_default);
    const [changes, setChanges] = (0, import_element200.useState)({});
    const modalData = (0, import_element200.useMemo)(() => {
      return (0, import_deepmerge3.default)(data, changes, {
        arrayMerge: (target, source) => source
      });
    }, [data, changes]);
    const form = (0, import_element200.useMemo)(
      () => ({
        layout: DEFAULT_LAYOUT,
        fields: !!field.children ? field.children : (
          // If not explicit children return the field id itself.
          [{ id: field.id, layout: DEFAULT_LAYOUT }]
        )
      }),
      [field]
    );
    const fieldsAsFieldType = fields2.map((f3) => ({
      ...f3,
      Edit: f3.Edit === null ? void 0 : f3.Edit,
      isValid: {
        required: f3.isValid.required?.constraint,
        elements: f3.isValid.elements?.constraint,
        min: f3.isValid.min?.constraint,
        max: f3.isValid.max?.constraint,
        pattern: f3.isValid.pattern?.constraint,
        minLength: f3.isValid.minLength?.constraint,
        maxLength: f3.isValid.maxLength?.constraint
      }
    }));
    const { validity } = use_form_validity_default(modalData, fieldsAsFieldType, form);
    const onApply = () => {
      onChange(changes);
      onClose();
    };
    const handleOnChange = (newValue) => {
      setChanges(
        (prev) => (0, import_deepmerge3.default)(prev, newValue, {
          arrayMerge: (target, source) => source
        })
      );
    };
    const focusOnMountRef = (0, import_compose61.useFocusOnMount)("firstInputElement");
    const contentRef = (0, import_element200.useRef)(null);
    const mergedRef = (0, import_compose61.useMergeRefs)([focusOnMountRef, contentRef]);
    useReportValidity(contentRef, touched);
    return /* @__PURE__ */ (0, import_jsx_runtime375.jsxs)(
      import_components221.Modal,
      {
        className: "dataforms-layouts-panel__modal",
        onRequestClose: onClose,
        isFullScreen: false,
        title: fieldLabel,
        size: "medium",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime375.jsx)("div", { ref: mergedRef, children: /* @__PURE__ */ (0, import_jsx_runtime375.jsx)(
            DataFormLayout,
            {
              data: modalData,
              form,
              onChange: handleOnChange,
              validity,
              children: (FieldLayout, childField, childFieldValidity, markWhenOptional) => /* @__PURE__ */ (0, import_jsx_runtime375.jsx)(
                FieldLayout,
                {
                  data: modalData,
                  field: childField,
                  onChange: handleOnChange,
                  hideLabelFromVision: form.fields.length < 2,
                  markWhenOptional,
                  validity: childFieldValidity
                },
                childField.id
              )
            }
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime375.jsxs)(
            Stack,
            {
              direction: "row",
              className: "dataforms-layouts-panel__modal-footer",
              gap: "md",
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime375.jsx)(import_components221.__experimentalSpacer, { style: { flex: 1 } }),
                /* @__PURE__ */ (0, import_jsx_runtime375.jsx)(
                  import_components221.Button,
                  {
                    variant: "tertiary",
                    onClick: onClose,
                    __next40pxDefaultSize: true,
                    children: (0, import_i18n240.__)("Cancel")
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime375.jsx)(
                  import_components221.Button,
                  {
                    variant: "primary",
                    onClick: onApply,
                    __next40pxDefaultSize: true,
                    children: (0, import_i18n240.__)("Apply")
                  }
                )
              ]
            }
          )
        ]
      }
    );
  }
  function PanelModal({
    data,
    field,
    onChange,
    validity
  }) {
    const [touched, setTouched] = (0, import_element200.useState)(false);
    const [isOpen, setIsOpen] = (0, import_element200.useState)(false);
    const { fieldDefinition, fieldLabel, summaryFields } = use_field_from_form_field_default(field);
    if (!fieldDefinition) {
      return null;
    }
    const handleClose = () => {
      setIsOpen(false);
      setTouched(true);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime375.jsxs)(import_jsx_runtime375.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime375.jsx)(
        SummaryButton,
        {
          data,
          field,
          fieldLabel,
          summaryFields,
          validity,
          touched,
          disabled: fieldDefinition.readOnly === true,
          onClick: () => setIsOpen(true),
          "aria-expanded": isOpen
        }
      ),
      isOpen && /* @__PURE__ */ (0, import_jsx_runtime375.jsx)(
        ModalContent,
        {
          data,
          field,
          onChange,
          fieldLabel: fieldLabel ?? "",
          onClose: handleClose,
          touched
        }
      )
    ] });
  }
  var modal_default2 = PanelModal;

  // packages/dataviews/build-module/components/dataform-layouts/panel/dropdown.mjs
  var import_components222 = __toESM(require_components(), 1);
  var import_i18n241 = __toESM(require_i18n(), 1);
  var import_element201 = __toESM(require_element(), 1);
  var import_compose62 = __toESM(require_compose(), 1);
  var import_jsx_runtime376 = __toESM(require_jsx_runtime(), 1);
  function DropdownHeader({
    title,
    onClose
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(
      Stack,
      {
        direction: "column",
        className: "dataforms-layouts-panel__dropdown-header",
        gap: "lg",
        children: /* @__PURE__ */ (0, import_jsx_runtime376.jsxs)(Stack, { direction: "row", gap: "sm", align: "center", children: [
          title && /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(import_components222.__experimentalHeading, { level: 2, size: 13, children: title }),
          /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(import_components222.__experimentalSpacer, { style: { flex: 1 } }),
          onClose && /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(
            import_components222.Button,
            {
              label: (0, import_i18n241.__)("Close"),
              icon: close_small_default,
              onClick: onClose,
              size: "small"
            }
          )
        ] })
      }
    );
  }
  function DropdownContentWithValidation({
    touched,
    children
  }) {
    const ref = (0, import_element201.useRef)(null);
    useReportValidity(ref, touched);
    return /* @__PURE__ */ (0, import_jsx_runtime376.jsx)("div", { ref, children });
  }
  function PanelDropdown({
    data,
    field,
    onChange,
    validity
  }) {
    const [touched, setTouched] = (0, import_element201.useState)(false);
    const [popoverAnchor, setPopoverAnchor] = (0, import_element201.useState)(
      null
    );
    const popoverProps = (0, import_element201.useMemo)(
      () => ({
        // Anchor the popover to the middle of the entire row so that it doesn't
        // move around when the label changes.
        anchor: popoverAnchor,
        placement: "left-start",
        offset: 36,
        shift: true
      }),
      [popoverAnchor]
    );
    const [dialogRef, dialogProps] = (0, import_compose62.__experimentalUseDialog)({
      focusOnMount: "firstInputElement"
    });
    const form = (0, import_element201.useMemo)(
      () => ({
        layout: DEFAULT_LAYOUT,
        fields: !!field.children ? field.children : (
          // If not explicit children return the field id itself.
          [{ id: field.id, layout: DEFAULT_LAYOUT }]
        )
      }),
      [field]
    );
    const formValidity = (0, import_element201.useMemo)(() => {
      if (validity === void 0) {
        return void 0;
      }
      if (!!field.children) {
        return validity?.children;
      }
      return { [field.id]: validity };
    }, [validity, field]);
    const { fieldDefinition, fieldLabel, summaryFields } = use_field_from_form_field_default(field);
    if (!fieldDefinition) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(
      "div",
      {
        ref: setPopoverAnchor,
        className: "dataforms-layouts-panel__field-dropdown-anchor",
        children: /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(
          import_components222.Dropdown,
          {
            contentClassName: "dataforms-layouts-panel__field-dropdown",
            popoverProps,
            focusOnMount: false,
            onToggle: (willOpen) => {
              if (!willOpen) {
                setTouched(true);
              }
            },
            renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(
              SummaryButton,
              {
                data,
                field,
                fieldLabel,
                summaryFields,
                validity,
                touched,
                disabled: fieldDefinition.readOnly === true,
                onClick: onToggle,
                "aria-expanded": isOpen
              }
            ),
            renderContent: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(DropdownContentWithValidation, { touched, children: /* @__PURE__ */ (0, import_jsx_runtime376.jsxs)("div", { ref: dialogRef, ...dialogProps, children: [
              /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(
                DropdownHeader,
                {
                  title: fieldLabel,
                  onClose
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(
                DataFormLayout,
                {
                  data,
                  form,
                  onChange,
                  validity: formValidity,
                  children: (FieldLayout, childField, childFieldValidity, markWhenOptional) => /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(
                    FieldLayout,
                    {
                      data,
                      field: childField,
                      onChange,
                      hideLabelFromVision: (form?.fields ?? []).length < 2,
                      markWhenOptional,
                      validity: childFieldValidity
                    },
                    childField.id
                  )
                }
              )
            ] }) })
          }
        )
      }
    );
  }
  var dropdown_default = PanelDropdown;

  // packages/dataviews/build-module/components/dataform-layouts/panel/index.mjs
  var import_jsx_runtime377 = __toESM(require_jsx_runtime(), 1);
  function FormPanelField({
    data,
    field,
    onChange,
    validity
  }) {
    const layout = field.layout;
    if (layout.openAs === "modal") {
      return /* @__PURE__ */ (0, import_jsx_runtime377.jsx)(
        modal_default2,
        {
          data,
          field,
          onChange,
          validity
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime377.jsx)(
      dropdown_default,
      {
        data,
        field,
        onChange,
        validity
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-layouts/card/index.mjs
  var import_components223 = __toESM(require_components(), 1);
  var import_compose63 = __toESM(require_compose(), 1);
  var import_element202 = __toESM(require_element(), 1);
  var import_i18n243 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/components/dataform-layouts/validation-badge.mjs
  var import_i18n242 = __toESM(require_i18n(), 1);
  var import_jsx_runtime378 = __toESM(require_jsx_runtime(), 1);
  function countInvalidFields(validity) {
    if (!validity) {
      return 0;
    }
    let count = 0;
    const validityRules = Object.keys(validity).filter(
      (key) => key !== "children"
    );
    for (const key of validityRules) {
      const rule = validity[key];
      if (rule?.type === "invalid") {
        count++;
      }
    }
    if (validity.children) {
      for (const childValidity of Object.values(validity.children)) {
        count += countInvalidFields(childValidity);
      }
    }
    return count;
  }
  function ValidationBadge({
    validity
  }) {
    const invalidCount = countInvalidFields(validity);
    if (invalidCount === 0) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime378.jsx)(Badge2, { intent: "high", children: (0, import_i18n242.sprintf)(
      /* translators: %d: Number of fields that need attention */
      (0, import_i18n242._n)(
        "%d field needs attention",
        "%d fields need attention",
        invalidCount
      ),
      invalidCount
    ) });
  }

  // packages/dataviews/build-module/components/dataform-layouts/card/index.mjs
  var import_jsx_runtime379 = __toESM(require_jsx_runtime(), 1);
  function isSummaryFieldVisible(summaryField, summaryConfig, isOpen) {
    if (!summaryConfig || Array.isArray(summaryConfig) && summaryConfig.length === 0) {
      return false;
    }
    const summaryConfigArray = Array.isArray(summaryConfig) ? summaryConfig : [summaryConfig];
    const fieldConfig = summaryConfigArray.find((config2) => {
      if (typeof config2 === "string") {
        return config2 === summaryField.id;
      }
      if (typeof config2 === "object" && "id" in config2) {
        return config2.id === summaryField.id;
      }
      return false;
    });
    if (!fieldConfig) {
      return false;
    }
    if (typeof fieldConfig === "string") {
      return true;
    }
    if (typeof fieldConfig === "object" && "visibility" in fieldConfig) {
      return fieldConfig.visibility === "always" || fieldConfig.visibility === "when-collapsed" && !isOpen;
    }
    return true;
  }
  function FormCardField({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { fields: fields2 } = (0, import_element202.useContext)(dataform_context_default);
    const layout = field.layout;
    const cardBodyRef = (0, import_element202.useRef)(null);
    const bodyId = (0, import_compose63.useInstanceId)(
      FormCardField,
      "dataforms-layouts-card-card-body"
    );
    const form = (0, import_element202.useMemo)(
      () => ({
        layout: DEFAULT_LAYOUT,
        fields: field.children ?? []
      }),
      [field]
    );
    const { isOpened, isCollapsible } = layout;
    const [internalIsOpen, setIsOpen] = (0, import_element202.useState)(isOpened);
    const [touched, setTouched] = (0, import_element202.useState)(false);
    (0, import_element202.useEffect)(() => {
      setIsOpen(isOpened);
    }, [isOpened]);
    const toggle = (0, import_element202.useCallback)(() => {
      setIsOpen((prev) => {
        if (prev) {
          setTouched(true);
        }
        return !prev;
      });
    }, []);
    const isOpen = isCollapsible ? internalIsOpen : true;
    const handleBlur = (0, import_element202.useCallback)(() => {
      setTouched(true);
    }, [setTouched]);
    useReportValidity(cardBodyRef, isOpen && touched);
    const summaryFields = getSummaryFields(layout.summary, fields2);
    const visibleSummaryFields = summaryFields.filter(
      (summaryField) => isSummaryFieldVisible(summaryField, layout.summary, isOpen)
    );
    const validationBadge = touched && layout.isCollapsible ? /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(ValidationBadge, { validity }) : null;
    const sizeCard = {
      blockStart: "medium",
      blockEnd: "medium",
      inlineStart: "medium",
      inlineEnd: "medium"
    };
    let label = field.label;
    let withHeader;
    let bodyContent;
    if (field.children) {
      withHeader = !!label && layout.withHeader;
      bodyContent = /* @__PURE__ */ (0, import_jsx_runtime379.jsxs)(import_jsx_runtime379.Fragment, { children: [
        field.description && /* @__PURE__ */ (0, import_jsx_runtime379.jsx)("div", { className: "dataforms-layouts-card__field-description", children: field.description }),
        /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(
          DataFormLayout,
          {
            data,
            form,
            onChange,
            validity: validity?.children
          }
        )
      ] });
    } else {
      const fieldDefinition = fields2.find(
        (fieldDef) => fieldDef.id === field.id
      );
      if (!fieldDefinition || !fieldDefinition.Edit) {
        return null;
      }
      const SingleFieldLayout = getFormFieldLayout("regular")?.component;
      if (!SingleFieldLayout) {
        return null;
      }
      label = fieldDefinition.label;
      withHeader = !!label && layout.withHeader;
      bodyContent = /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(
        SingleFieldLayout,
        {
          data,
          field,
          onChange,
          hideLabelFromVision: hideLabelFromVision || withHeader,
          markWhenOptional,
          validity
        }
      );
    }
    const sizeCardBody = {
      blockStart: withHeader ? "none" : "medium",
      blockEnd: "medium",
      inlineStart: "medium",
      inlineEnd: "medium"
    };
    return /* @__PURE__ */ (0, import_jsx_runtime379.jsxs)(import_components223.Card, { className: "dataforms-layouts-card__field", size: sizeCard, children: [
      withHeader && /* @__PURE__ */ (0, import_jsx_runtime379.jsxs)(
        import_components223.CardHeader,
        {
          className: "dataforms-layouts-card__field-header",
          onClick: isCollapsible ? toggle : void 0,
          style: {
            cursor: isCollapsible ? "pointer" : void 0
          },
          isBorderless: true,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime379.jsxs)(
              "div",
              {
                style: {
                  // Match the expand/collapse button's height to avoid layout
                  // differences when that button is not displayed.
                  height: isCollapsible ? void 0 : "40px",
                  width: "100%",
                  display: "flex",
                  justifyContent: "space-between",
                  alignItems: "center"
                },
                children: [
                  /* @__PURE__ */ (0, import_jsx_runtime379.jsx)("span", { className: "dataforms-layouts-card__field-header-label", children: label }),
                  validationBadge,
                  visibleSummaryFields.length > 0 && layout.withHeader && /* @__PURE__ */ (0, import_jsx_runtime379.jsx)("div", { className: "dataforms-layouts-card__field-summary", children: visibleSummaryFields.map(
                    (summaryField) => /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(
                      summaryField.render,
                      {
                        item: data,
                        field: summaryField
                      },
                      summaryField.id
                    )
                  ) })
                ]
              }
            ),
            isCollapsible && /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(
              import_components223.Button,
              {
                __next40pxDefaultSize: true,
                variant: "tertiary",
                icon: isOpen ? chevron_up_default : chevron_down_default,
                "aria-expanded": isOpen,
                "aria-controls": bodyId,
                "aria-label": isOpen ? (0, import_i18n243.__)("Collapse") : (0, import_i18n243.__)("Expand")
              }
            )
          ]
        }
      ),
      (isOpen || !withHeader) && // If it doesn't have a header, keep it open.
      // Otherwise, the card will not be visible.
      /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(
        import_components223.CardBody,
        {
          id: bodyId,
          size: sizeCardBody,
          className: "dataforms-layouts-card__field-control",
          ref: cardBodyRef,
          onBlur: handleBlur,
          children: bodyContent
        }
      )
    ] });
  }

  // packages/dataviews/build-module/components/dataform-layouts/row/index.mjs
  var import_components224 = __toESM(require_components(), 1);
  var import_jsx_runtime380 = __toESM(require_jsx_runtime(), 1);
  function Header3({ title }) {
    return /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(
      Stack,
      {
        direction: "column",
        className: "dataforms-layouts-row__header",
        gap: "lg",
        children: /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(Stack, { direction: "row", align: "center", children: /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(import_components224.__experimentalHeading, { level: 2, size: 13, children: title }) })
      }
    );
  }
  var EMPTY_WRAPPER = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(import_jsx_runtime380.Fragment, { children });
  function FormRowField({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const layout = field.layout;
    if (!!field.children) {
      const form = {
        layout: DEFAULT_LAYOUT,
        fields: field.children
      };
      return /* @__PURE__ */ (0, import_jsx_runtime380.jsxs)("div", { className: "dataforms-layouts-row__field", children: [
        !hideLabelFromVision && field.label && /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(Header3, { title: field.label }),
        /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(Stack, { direction: "row", align: layout.alignment, gap: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(
          DataFormLayout,
          {
            data,
            form,
            onChange,
            validity: validity?.children,
            as: EMPTY_WRAPPER,
            children: (FieldLayout, childField, childFieldValidity) => /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(
              "div",
              {
                className: "dataforms-layouts-row__field-control",
                style: layout.styles[childField.id],
                children: /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(
                  FieldLayout,
                  {
                    data,
                    field: childField,
                    onChange,
                    hideLabelFromVision,
                    markWhenOptional,
                    validity: childFieldValidity
                  }
                )
              },
              childField.id
            )
          }
        ) })
      ] });
    }
    const RegularLayout = getFormFieldLayout("regular")?.component;
    if (!RegularLayout) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(import_jsx_runtime380.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime380.jsx)("div", { className: "dataforms-layouts-row__field-control", children: /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(
      RegularLayout,
      {
        data,
        field,
        onChange,
        markWhenOptional,
        validity
      }
    ) }) });
  }

  // packages/dataviews/build-module/components/dataform-layouts/details/index.mjs
  var import_element203 = __toESM(require_element(), 1);
  var import_i18n244 = __toESM(require_i18n(), 1);
  var import_jsx_runtime381 = __toESM(require_jsx_runtime(), 1);
  function FormDetailsField({
    data,
    field,
    onChange,
    validity
  }) {
    const { fields: fields2 } = (0, import_element203.useContext)(dataform_context_default);
    const detailsRef = (0, import_element203.useRef)(null);
    const contentRef = (0, import_element203.useRef)(null);
    const [touched, setTouched] = (0, import_element203.useState)(false);
    const [isOpen, setIsOpen] = (0, import_element203.useState)(false);
    const form = (0, import_element203.useMemo)(
      () => ({
        layout: DEFAULT_LAYOUT,
        fields: field.children ?? []
      }),
      [field]
    );
    (0, import_element203.useEffect)(() => {
      const details = detailsRef.current;
      if (!details) {
        return;
      }
      const handleToggle = () => {
        const nowOpen = details.open;
        if (!nowOpen) {
          setTouched(true);
        }
        setIsOpen(nowOpen);
      };
      details.addEventListener("toggle", handleToggle);
      return () => {
        details.removeEventListener("toggle", handleToggle);
      };
    }, []);
    useReportValidity(contentRef, isOpen && touched);
    const handleBlur = (0, import_element203.useCallback)(() => {
      setTouched(true);
    }, []);
    if (!field.children) {
      return null;
    }
    const summaryFieldId = field.layout.summary ?? "";
    const summaryField = summaryFieldId ? fields2.find((fieldDef) => fieldDef.id === summaryFieldId) : void 0;
    let summaryContent;
    if (summaryField && summaryField.render) {
      summaryContent = /* @__PURE__ */ (0, import_jsx_runtime381.jsx)(summaryField.render, { item: data, field: summaryField });
    } else {
      summaryContent = field.label || (0, import_i18n244.__)("More details");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime381.jsxs)(
      "details",
      {
        ref: detailsRef,
        className: "dataforms-layouts-details__details",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime381.jsx)("summary", { className: "dataforms-layouts-details__summary", children: /* @__PURE__ */ (0, import_jsx_runtime381.jsxs)(
            Stack,
            {
              direction: "row",
              align: "center",
              gap: "md",
              className: "dataforms-layouts-details__summary-content",
              children: [
                summaryContent,
                touched && /* @__PURE__ */ (0, import_jsx_runtime381.jsx)(ValidationBadge, { validity })
              ]
            }
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime381.jsx)(
            "div",
            {
              ref: contentRef,
              className: "dataforms-layouts-details__content",
              onBlur: handleBlur,
              children: /* @__PURE__ */ (0, import_jsx_runtime381.jsx)(
                DataFormLayout,
                {
                  data,
                  form,
                  onChange,
                  validity: validity?.children
                }
              )
            }
          )
        ]
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-layouts/index.mjs
  var import_jsx_runtime382 = __toESM(require_jsx_runtime(), 1);
  var FORM_FIELD_LAYOUTS = [
    {
      type: "regular",
      component: FormRegularField,
      wrapper: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(
        Stack,
        {
          direction: "column",
          className: "dataforms-layouts__wrapper",
          gap: "lg",
          children
        }
      )
    },
    {
      type: "panel",
      component: FormPanelField,
      wrapper: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(
        Stack,
        {
          direction: "column",
          className: "dataforms-layouts__wrapper",
          gap: "md",
          children
        }
      )
    },
    {
      type: "card",
      component: FormCardField,
      wrapper: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(
        Stack,
        {
          direction: "column",
          className: "dataforms-layouts__wrapper",
          gap: "xl",
          children
        }
      )
    },
    {
      type: "row",
      component: FormRowField,
      wrapper: ({
        children,
        layout
      }) => /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(
        Stack,
        {
          direction: "column",
          className: "dataforms-layouts__wrapper",
          gap: "lg",
          children: /* @__PURE__ */ (0, import_jsx_runtime382.jsx)("div", { className: "dataforms-layouts-row__field", children: /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(
            Stack,
            {
              direction: "row",
              gap: "lg",
              align: layout.alignment,
              children
            }
          ) })
        }
      )
    },
    {
      type: "details",
      component: FormDetailsField
    }
  ];
  function getFormFieldLayout(type) {
    return FORM_FIELD_LAYOUTS.find((layout) => layout.type === type);
  }

  // packages/dataviews/build-module/components/dataform-layouts/data-form-layout.mjs
  var import_jsx_runtime383 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_WRAPPER = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime383.jsx)(Stack, { direction: "column", className: "dataforms-layouts__wrapper", gap: "lg", children });
  function DataFormLayout({
    data,
    form,
    onChange,
    validity,
    children,
    as
  }) {
    const { fields: fieldDefinitions } = (0, import_element204.useContext)(dataform_context_default);
    const markWhenOptional = (0, import_element204.useMemo)(() => {
      const requiredCount = fieldDefinitions.filter(
        (f3) => !!f3.isValid?.required
      ).length;
      const optionalCount = fieldDefinitions.length - requiredCount;
      return requiredCount > optionalCount;
    }, [fieldDefinitions]);
    function getFieldDefinition2(field) {
      return fieldDefinitions.find(
        (fieldDefinition) => fieldDefinition.id === field.id
      );
    }
    const Wrapper = as ?? getFormFieldLayout(form.layout.type)?.wrapper ?? DEFAULT_WRAPPER;
    return /* @__PURE__ */ (0, import_jsx_runtime383.jsx)(Wrapper, { layout: form.layout, children: form.fields.map((formField) => {
      const FieldLayout = getFormFieldLayout(formField.layout.type)?.component;
      if (!FieldLayout) {
        return null;
      }
      const fieldDefinition = !formField.children ? getFieldDefinition2(formField) : void 0;
      if (fieldDefinition && fieldDefinition.isVisible && !fieldDefinition.isVisible(data)) {
        return null;
      }
      if (children) {
        return children(
          FieldLayout,
          formField,
          validity?.[formField.id],
          markWhenOptional
        );
      }
      return /* @__PURE__ */ (0, import_jsx_runtime383.jsx)(
        FieldLayout,
        {
          data,
          field: formField,
          onChange,
          markWhenOptional,
          validity: validity?.[formField.id]
        },
        formField.id
      );
    }) });
  }

  // packages/dataviews/build-module/dataform/index.mjs
  var import_jsx_runtime384 = __toESM(require_jsx_runtime(), 1);
  function DataForm({
    data,
    form,
    fields: fields2,
    onChange,
    validity
  }) {
    const normalizedForm = (0, import_element205.useMemo)(() => normalize_form_default(form), [form]);
    const normalizedFields = (0, import_element205.useMemo)(
      () => normalizeFields(fields2),
      [fields2]
    );
    if (!form.fields) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime384.jsx)(DataFormProvider, { fields: normalizedFields, children: /* @__PURE__ */ (0, import_jsx_runtime384.jsx)(
      DataFormLayout,
      {
        data,
        form: normalizedForm,
        onChange,
        validity
      }
    ) });
  }

  // packages/media-editor/build-module/components/media-form/index.mjs
  var import_components225 = __toESM(require_components(), 1);
  var import_jsx_runtime385 = __toESM(require_jsx_runtime(), 1);
  function MediaForm({
    form: formOverrides,
    header
  }) {
    const { media, fields: fields2, onChange } = useMediaEditorContext();
    if (!media || !onChange) {
      return /* @__PURE__ */ (0, import_jsx_runtime385.jsx)("div", { className: "media-editor-form media-editor-form--loading", children: /* @__PURE__ */ (0, import_jsx_runtime385.jsx)(import_components225.Spinner, {}) });
    }
    const defaultForm = {
      layout: {
        type: "panel"
      },
      fields: fields2.map((field) => {
        if (["title", "alt_text", "caption", "description"].includes(
          field.id
        )) {
          return {
            id: field.id,
            layout: {
              type: "regular",
              labelPosition: "top"
            }
          };
        }
        return field.id;
      })
    };
    const form = formOverrides || defaultForm;
    return /* @__PURE__ */ (0, import_jsx_runtime385.jsx)("div", { className: "media-editor-form", children: /* @__PURE__ */ (0, import_jsx_runtime385.jsxs)(import_components225.__experimentalVStack, { spacing: 4, children: [
      header,
      /* @__PURE__ */ (0, import_jsx_runtime385.jsx)(
        DataForm,
        {
          data: media,
          fields: fields2,
          form,
          onChange
        }
      )
    ] }) });
  }

  // packages/editor/build-module/components/media/preview.mjs
  var import_data209 = __toESM(require_data(), 1);
  var import_jsx_runtime386 = __toESM(require_jsx_runtime(), 1);
  function MediaPreview3(props) {
    const { media } = (0, import_data209.useSelect)((select6) => {
      const currentPost = select6(store).getCurrentPost();
      return {
        media: currentPost
      };
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime386.jsx)(MediaEditorProvider, { value: media, children: /* @__PURE__ */ (0, import_jsx_runtime386.jsx)(MediaPreview2, { ...props }) });
  }

  // packages/editor/build-module/components/media/metadata-panel.mjs
  var import_data216 = __toESM(require_data(), 1);
  var import_element212 = __toESM(require_element(), 1);
  var import_core_data124 = __toESM(require_core_data(), 1);

  // packages/editor/build-module/components/post-fields/index.mjs
  var import_element206 = __toESM(require_element(), 1);
  var import_data210 = __toESM(require_data(), 1);
  function usePostFields({
    postType: postType2
  }) {
    const { registerPostTypeSchema: registerPostTypeSchema2 } = unlock((0, import_data210.useDispatch)(store));
    (0, import_element206.useEffect)(() => {
      registerPostTypeSchema2(postType2);
    }, [registerPostTypeSchema2, postType2]);
    const { fields: fields2 } = (0, import_data210.useSelect)(
      (select6) => {
        const { getEntityFields: getEntityFields3 } = unlock(select6(store));
        return {
          fields: getEntityFields3("postType", postType2)
        };
      },
      [postType2]
    );
    return fields2;
  }
  var post_fields_default = usePostFields;

  // packages/editor/build-module/components/post-card-panel/index.mjs
  var import_components229 = __toESM(require_components(), 1);
  var import_core_data123 = __toESM(require_core_data(), 1);
  var import_data215 = __toESM(require_data(), 1);
  var import_element211 = __toESM(require_element(), 1);
  var import_i18n248 = __toESM(require_i18n(), 1);
  var import_dom5 = __toESM(require_dom(), 1);

  // packages/editor/build-module/components/post-actions/index.mjs
  var import_data214 = __toESM(require_data(), 1);
  var import_element210 = __toESM(require_element(), 1);
  var import_i18n247 = __toESM(require_i18n(), 1);
  var import_components228 = __toESM(require_components(), 1);
  var import_core_data122 = __toESM(require_core_data(), 1);

  // packages/editor/build-module/components/post-actions/actions.mjs
  var import_data213 = __toESM(require_data(), 1);
  var import_element209 = __toESM(require_element(), 1);
  var import_core_data121 = __toESM(require_core_data(), 1);

  // packages/editor/build-module/components/post-actions/set-as-homepage.mjs
  var import_i18n245 = __toESM(require_i18n(), 1);
  var import_element207 = __toESM(require_element(), 1);
  var import_components226 = __toESM(require_components(), 1);
  var import_data211 = __toESM(require_data(), 1);
  var import_core_data119 = __toESM(require_core_data(), 1);
  var import_notices29 = __toESM(require_notices(), 1);

  // packages/editor/build-module/utils/get-item-title.mjs
  var import_html_entities26 = __toESM(require_html_entities(), 1);
  function getItemTitle2(item) {
    if (typeof item.title === "string") {
      return (0, import_html_entities26.decodeEntities)(item.title);
    }
    if (item.title && "rendered" in item.title) {
      return (0, import_html_entities26.decodeEntities)(item.title.rendered);
    }
    if (item.title && "raw" in item.title) {
      return (0, import_html_entities26.decodeEntities)(item.title.raw);
    }
    return "";
  }

  // packages/editor/build-module/components/post-actions/set-as-homepage.mjs
  var import_jsx_runtime387 = __toESM(require_jsx_runtime(), 1);
  var SetAsHomepageModal = ({ items, closeModal: closeModal2 }) => {
    const [item] = items;
    const pageTitle = getItemTitle2(item);
    const { showOnFront, currentHomePage, isSaving } = (0, import_data211.useSelect)(
      (select6) => {
        const { getEntityRecord, isSavingEntityRecord } = select6(import_core_data119.store);
        const siteSettings = getEntityRecord("root", "site");
        const currentHomePageItem = getEntityRecord(
          "postType",
          "page",
          siteSettings?.page_on_front
        );
        return {
          showOnFront: siteSettings?.show_on_front,
          currentHomePage: currentHomePageItem,
          isSaving: isSavingEntityRecord("root", "site")
        };
      }
    );
    const { saveEntityRecord } = (0, import_data211.useDispatch)(import_core_data119.store);
    const { createSuccessNotice, createErrorNotice } = (0, import_data211.useDispatch)(import_notices29.store);
    async function onSetPageAsHomepage(event) {
      event.preventDefault();
      try {
        await saveEntityRecord("root", "site", {
          page_on_front: item.id,
          show_on_front: "page"
        });
        createSuccessNotice((0, import_i18n245.__)("Homepage updated."), {
          type: "snackbar"
        });
      } catch (error) {
        const errorMessage = error.message && error.code !== "unknown_error" ? error.message : (0, import_i18n245.__)("An error occurred while setting the homepage.");
        createErrorNotice(errorMessage, { type: "snackbar" });
      } finally {
        closeModal2?.();
      }
    }
    let modalWarning = "";
    if ("posts" === showOnFront) {
      modalWarning = (0, import_i18n245.__)(
        "This will replace the current homepage which is set to display latest posts."
      );
    } else if (currentHomePage) {
      modalWarning = (0, import_i18n245.sprintf)(
        // translators: %s: title of the current home page.
        (0, import_i18n245.__)('This will replace the current homepage: "%s"'),
        getItemTitle2(currentHomePage)
      );
    }
    const modalText = (0, import_i18n245.sprintf)(
      // translators: %1$s: title of the page to be set as the homepage, %2$s: homepage replacement warning message.
      (0, import_i18n245.__)('Set "%1$s" as the site homepage? %2$s'),
      pageTitle,
      modalWarning
    ).trim();
    const modalButtonLabel = (0, import_i18n245.__)("Set homepage");
    return /* @__PURE__ */ (0, import_jsx_runtime387.jsx)("form", { onSubmit: onSetPageAsHomepage, children: /* @__PURE__ */ (0, import_jsx_runtime387.jsxs)(import_components226.__experimentalVStack, { spacing: "5", children: [
      /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(import_components226.__experimentalText, { children: modalText }),
      /* @__PURE__ */ (0, import_jsx_runtime387.jsxs)(import_components226.__experimentalHStack, { justify: "right", children: [
        /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
          import_components226.Button,
          {
            __next40pxDefaultSize: true,
            variant: "tertiary",
            onClick: () => {
              closeModal2?.();
            },
            disabled: isSaving,
            accessibleWhenDisabled: true,
            children: (0, import_i18n245.__)("Cancel")
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
          import_components226.Button,
          {
            __next40pxDefaultSize: true,
            variant: "primary",
            type: "submit",
            disabled: isSaving,
            accessibleWhenDisabled: true,
            children: modalButtonLabel
          }
        )
      ] })
    ] }) });
  };
  var useSetAsHomepageAction = () => {
    const { pageOnFront, pageForPosts } = (0, import_data211.useSelect)((select6) => {
      const { getEntityRecord, canUser } = select6(import_core_data119.store);
      const siteSettings = canUser("read", {
        kind: "root",
        name: "site"
      }) ? getEntityRecord("root", "site") : void 0;
      return {
        pageOnFront: siteSettings?.page_on_front,
        pageForPosts: siteSettings?.page_for_posts
      };
    });
    return (0, import_element207.useMemo)(
      () => ({
        id: "set-as-homepage",
        label: (0, import_i18n245.__)("Set as homepage"),
        isEligible(post2) {
          if (post2.status !== "publish") {
            return false;
          }
          if (post2.type !== "page") {
            return false;
          }
          if (pageOnFront === post2.id) {
            return false;
          }
          if (pageForPosts === post2.id) {
            return false;
          }
          return true;
        },
        modalFocusOnMount: "firstContentElement",
        RenderModal: SetAsHomepageModal
      }),
      [pageForPosts, pageOnFront]
    );
  };

  // packages/editor/build-module/components/post-actions/set-as-posts-page.mjs
  var import_i18n246 = __toESM(require_i18n(), 1);
  var import_element208 = __toESM(require_element(), 1);
  var import_components227 = __toESM(require_components(), 1);
  var import_data212 = __toESM(require_data(), 1);
  var import_core_data120 = __toESM(require_core_data(), 1);
  var import_notices30 = __toESM(require_notices(), 1);
  var import_jsx_runtime388 = __toESM(require_jsx_runtime(), 1);
  var SetAsPostsPageModal = ({ items, closeModal: closeModal2 }) => {
    const [item] = items;
    const pageTitle = getItemTitle2(item);
    const { currentPostsPage, isPageForPostsSet, isSaving } = (0, import_data212.useSelect)(
      (select6) => {
        const { getEntityRecord, isSavingEntityRecord } = select6(import_core_data120.store);
        const siteSettings = getEntityRecord("root", "site");
        const currentPostsPageItem = getEntityRecord(
          "postType",
          "page",
          siteSettings?.page_for_posts
        );
        return {
          currentPostsPage: currentPostsPageItem,
          isPageForPostsSet: siteSettings?.page_for_posts !== 0,
          isSaving: isSavingEntityRecord("root", "site")
        };
      }
    );
    const { saveEntityRecord } = (0, import_data212.useDispatch)(import_core_data120.store);
    const { createSuccessNotice, createErrorNotice } = (0, import_data212.useDispatch)(import_notices30.store);
    async function onSetPageAsPostsPage(event) {
      event.preventDefault();
      try {
        await saveEntityRecord("root", "site", {
          page_for_posts: item.id,
          show_on_front: "page"
        });
        createSuccessNotice((0, import_i18n246.__)("Posts page updated."), {
          type: "snackbar"
        });
      } catch (error) {
        const errorMessage = error.message && error.code !== "unknown_error" ? error.message : (0, import_i18n246.__)("An error occurred while setting the posts page.");
        createErrorNotice(errorMessage, { type: "snackbar" });
      } finally {
        closeModal2?.();
      }
    }
    const modalWarning = isPageForPostsSet && currentPostsPage ? (0, import_i18n246.sprintf)(
      // translators: %s: title of the current posts page.
      (0, import_i18n246.__)('This will replace the current posts page: "%s"'),
      getItemTitle2(currentPostsPage)
    ) : (0, import_i18n246.__)("This page will show the latest posts.");
    const modalText = (0, import_i18n246.sprintf)(
      // translators: %1$s: title of the page to be set as the posts page, %2$s: posts page replacement warning message.
      (0, import_i18n246.__)('Set "%1$s" as the posts page? %2$s'),
      pageTitle,
      modalWarning
    );
    const modalButtonLabel = (0, import_i18n246.__)("Set posts page");
    return /* @__PURE__ */ (0, import_jsx_runtime388.jsx)("form", { onSubmit: onSetPageAsPostsPage, children: /* @__PURE__ */ (0, import_jsx_runtime388.jsxs)(import_components227.__experimentalVStack, { spacing: "5", children: [
      /* @__PURE__ */ (0, import_jsx_runtime388.jsx)(import_components227.__experimentalText, { children: modalText }),
      /* @__PURE__ */ (0, import_jsx_runtime388.jsxs)(import_components227.__experimentalHStack, { justify: "right", children: [
        /* @__PURE__ */ (0, import_jsx_runtime388.jsx)(
          import_components227.Button,
          {
            __next40pxDefaultSize: true,
            variant: "tertiary",
            onClick: () => {
              closeModal2?.();
            },
            disabled: isSaving,
            accessibleWhenDisabled: true,
            children: (0, import_i18n246.__)("Cancel")
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime388.jsx)(
          import_components227.Button,
          {
            __next40pxDefaultSize: true,
            variant: "primary",
            type: "submit",
            disabled: isSaving,
            accessibleWhenDisabled: true,
            children: modalButtonLabel
          }
        )
      ] })
    ] }) });
  };
  var useSetAsPostsPageAction = () => {
    const { pageOnFront, pageForPosts } = (0, import_data212.useSelect)((select6) => {
      const { getEntityRecord, canUser } = select6(import_core_data120.store);
      const siteSettings = canUser("read", {
        kind: "root",
        name: "site"
      }) ? getEntityRecord("root", "site") : void 0;
      return {
        pageOnFront: siteSettings?.page_on_front,
        pageForPosts: siteSettings?.page_for_posts
      };
    });
    return (0, import_element208.useMemo)(
      () => ({
        id: "set-as-posts-page",
        label: (0, import_i18n246.__)("Set as posts page"),
        isEligible(post2) {
          if (post2.status !== "publish") {
            return false;
          }
          if (post2.type !== "page") {
            return false;
          }
          if (pageOnFront === post2.id) {
            return false;
          }
          if (pageForPosts === post2.id) {
            return false;
          }
          return true;
        },
        modalFocusOnMount: "firstContentElement",
        RenderModal: SetAsPostsPageModal
      }),
      [pageForPosts, pageOnFront]
    );
  };

  // packages/editor/build-module/components/post-actions/actions.mjs
  var import_jsx_runtime389 = __toESM(require_jsx_runtime(), 1);
  function usePostActions({ postType: postType2, onActionPerformed, context }) {
    const { defaultActions } = (0, import_data213.useSelect)(
      (select6) => {
        const { getEntityActions: getEntityActions3 } = unlock(select6(store));
        return {
          defaultActions: getEntityActions3("postType", postType2)
        };
      },
      [postType2]
    );
    const shouldShowHomepageActions = (0, import_data213.useSelect)(
      (select6) => {
        if (postType2 !== "page") {
          return false;
        }
        const { getDefaultTemplateId, getEntityRecord, canUser } = select6(import_core_data121.store);
        const canUpdateSettings = canUser("update", {
          kind: "root",
          name: "site"
        });
        if (!canUpdateSettings) {
          return false;
        }
        const frontPageTemplateId = getDefaultTemplateId({
          slug: "front-page"
        });
        if (!frontPageTemplateId) {
          return true;
        }
        const frontPageTemplate = getEntityRecord(
          "postType",
          "wp_template",
          frontPageTemplateId
        );
        if (!frontPageTemplate) {
          return true;
        }
        return frontPageTemplate.slug !== "front-page";
      },
      [postType2]
    );
    const setAsHomepageAction = useSetAsHomepageAction();
    const setAsPostsPageAction = useSetAsPostsPageAction();
    const { registerPostTypeSchema: registerPostTypeSchema2 } = unlock((0, import_data213.useDispatch)(store));
    (0, import_element209.useEffect)(() => {
      registerPostTypeSchema2(postType2);
    }, [registerPostTypeSchema2, postType2]);
    return (0, import_element209.useMemo)(() => {
      let actions2 = [...defaultActions];
      if (shouldShowHomepageActions) {
        actions2.push(setAsHomepageAction, setAsPostsPageAction);
      }
      actions2 = actions2.sort(
        (a3, b3) => b3.id === "move-to-trash" ? -1 : 0
      );
      actions2 = actions2.filter((action) => {
        if (!action.context) {
          return true;
        }
        return action.context === context;
      });
      if (onActionPerformed) {
        for (let i3 = 0; i3 < actions2.length; ++i3) {
          if (actions2[i3].callback) {
            const existingCallback = actions2[i3].callback;
            actions2[i3] = {
              ...actions2[i3],
              callback: (items, argsObject) => {
                existingCallback(items, {
                  ...argsObject,
                  onActionPerformed: (_items) => {
                    if (argsObject?.onActionPerformed) {
                      argsObject.onActionPerformed(_items);
                    }
                    onActionPerformed(
                      actions2[i3].id,
                      _items
                    );
                  }
                });
              }
            };
          }
          if (actions2[i3].RenderModal) {
            const ExistingRenderModal = actions2[i3].RenderModal;
            actions2[i3] = {
              ...actions2[i3],
              RenderModal: (props) => {
                return /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(
                  ExistingRenderModal,
                  {
                    ...props,
                    onActionPerformed: (_items) => {
                      if (props.onActionPerformed) {
                        props.onActionPerformed(_items);
                      }
                      onActionPerformed(
                        actions2[i3].id,
                        _items
                      );
                    }
                  }
                );
              }
            };
          }
        }
      }
      return actions2;
    }, [
      context,
      defaultActions,
      onActionPerformed,
      setAsHomepageAction,
      setAsPostsPageAction,
      shouldShowHomepageActions
    ]);
  }

  // packages/editor/build-module/components/post-actions/index.mjs
  var import_jsx_runtime390 = __toESM(require_jsx_runtime(), 1);
  var { Menu: Menu5, kebabCase: kebabCase4 } = unlock(import_components228.privateApis);
  function PostActions({ postType: postType2, postId: postId2, onActionPerformed }) {
    const [activeModalAction, setActiveModalAction] = (0, import_element210.useState)(null);
    const { item, permissions } = (0, import_data214.useSelect)(
      (select6) => {
        const { getEditedEntityRecord, getEntityRecordPermissions } = unlock(select6(import_core_data122.store));
        return {
          item: getEditedEntityRecord("postType", postType2, postId2),
          permissions: getEntityRecordPermissions(
            "postType",
            postType2,
            postId2
          )
        };
      },
      [postId2, postType2]
    );
    const itemWithPermissions = (0, import_element210.useMemo)(() => {
      return {
        ...item,
        permissions
      };
    }, [item, permissions]);
    const allActions = usePostActions({ postType: postType2, onActionPerformed });
    const actions2 = (0, import_element210.useMemo)(() => {
      return allActions.filter((action) => {
        return !action.isEligible || action.isEligible(itemWithPermissions);
      });
    }, [allActions, itemWithPermissions]);
    return /* @__PURE__ */ (0, import_jsx_runtime390.jsxs)(import_jsx_runtime390.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime390.jsxs)(Menu5, { placement: "bottom-end", children: [
        /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
          Menu5.TriggerButton,
          {
            render: /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
              import_components228.Button,
              {
                size: "small",
                icon: more_vertical_default,
                label: (0, import_i18n247.__)("Actions"),
                disabled: !actions2.length,
                accessibleWhenDisabled: true,
                className: "editor-all-actions-button"
              }
            )
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(Menu5.Popover, { children: /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
          ActionsDropdownMenuGroup,
          {
            actions: actions2,
            items: [itemWithPermissions],
            setActiveModalAction
          }
        ) })
      ] }),
      !!activeModalAction && /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
        ActionModal,
        {
          action: activeModalAction,
          items: [itemWithPermissions],
          closeModal: () => setActiveModalAction(null)
        }
      )
    ] });
  }
  function DropdownMenuItemTrigger({ action, onClick, items }) {
    const label = typeof action.label === "string" ? action.label : action.label(items);
    return /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(Menu5.Item, { onClick, children: /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(Menu5.ItemLabel, { children: label }) });
  }
  function ActionModal({ action, items, closeModal: closeModal2 }) {
    const label = typeof action.label === "string" ? action.label : action.label(items);
    return /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
      import_components228.Modal,
      {
        title: action.modalHeader || label,
        __experimentalHideHeader: !!action.hideModalHeader,
        onRequestClose: closeModal2 ?? (() => {
        }),
        focusOnMount: "firstContentElement",
        size: "medium",
        overlayClassName: `editor-action-modal editor-action-modal__${kebabCase4(
          action.id
        )}`,
        children: /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(action.RenderModal, { items, closeModal: closeModal2 })
      }
    );
  }
  function ActionsDropdownMenuGroup({ actions: actions2, items, setActiveModalAction }) {
    const registry = (0, import_data214.useRegistry)();
    return /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(Menu5.Group, { children: actions2.map((action) => {
      return /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
        DropdownMenuItemTrigger,
        {
          action,
          onClick: () => {
            if ("RenderModal" in action) {
              setActiveModalAction(action);
              return;
            }
            action.callback(items, { registry });
          },
          items
        },
        action.id
      );
    }) });
  }

  // packages/editor/build-module/components/post-card-panel/index.mjs
  var import_jsx_runtime391 = __toESM(require_jsx_runtime(), 1);
  var { Badge: Badge3 } = unlock(import_components229.privateApis);
  function PostCardPanel({
    postType: postType2,
    postId: postId2,
    hideActions = false,
    onActionPerformed,
    onClose
  }) {
    const postIds = (0, import_element211.useMemo)(
      () => Array.isArray(postId2) ? postId2 : [postId2],
      [postId2]
    );
    const { postTitle, icon, labels, isRevision } = (0, import_data215.useSelect)(
      (select6) => {
        const { getEditedEntityRecord, getCurrentTheme, getPostType } = select6(import_core_data123.store);
        const {
          getPostIcon: getPostIcon2,
          getCurrentPostType: getCurrentPostType2,
          isRevisionsMode: isRevisionsMode2,
          getCurrentRevision: getCurrentRevision2
        } = unlock(select6(store));
        let _title = "";
        if (isRevisionsMode2()) {
          const parentPostType = getCurrentPostType2();
          const _record2 = getCurrentRevision2();
          _title = _record2?.title?.rendered || _record2?.title?.raw || "";
          return {
            postTitle: _title,
            icon: getPostIcon2(parentPostType, {
              area: _record2?.area
            }),
            labels: getPostType(parentPostType)?.labels,
            isRevision: true
          };
        }
        const _record = getEditedEntityRecord(
          "postType",
          postType2,
          postIds[0]
        );
        if (postIds.length === 1) {
          const { default_template_types: templateTypes = [] } = getCurrentTheme() ?? {};
          const _templateInfo = [
            TEMPLATE_POST_TYPE,
            TEMPLATE_PART_POST_TYPE
          ].includes(postType2) ? getTemplateInfo({
            template: _record,
            templateTypes
          }) : {};
          _title = _templateInfo?.title || _record?.title;
        }
        return {
          postTitle: _title,
          icon: getPostIcon2(postType2, {
            area: _record?.area
          }),
          labels: getPostType(postType2)?.labels
        };
      },
      [postIds, postType2]
    );
    const pageTypeBadge = usePageTypeBadge(postId2);
    let title = (0, import_i18n248.__)("No title");
    if (labels?.name && postIds.length > 1) {
      title = (0, import_i18n248.sprintf)(
        // translators: %1$d number of selected items %2$s: Name of the plural post type e.g: "Posts".
        (0, import_i18n248.__)("%1$d %2$s"),
        postIds.length,
        labels?.name
      );
    } else if (postTitle) {
      title = (0, import_dom5.__unstableStripHTML)(postTitle);
    }
    return /* @__PURE__ */ (0, import_jsx_runtime391.jsxs)(import_components229.__experimentalVStack, { spacing: 1, className: "editor-post-card-panel", children: [
      /* @__PURE__ */ (0, import_jsx_runtime391.jsxs)(
        import_components229.__experimentalHStack,
        {
          spacing: 2,
          className: "editor-post-card-panel__header",
          alignment: "flex-start",
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime391.jsx)(import_components229.Icon, { className: "editor-post-card-panel__icon", icon }),
            /* @__PURE__ */ (0, import_jsx_runtime391.jsxs)(
              import_components229.__experimentalText,
              {
                numberOfLines: 2,
                truncate: true,
                className: "editor-post-card-panel__title",
                as: "h2",
                children: [
                  /* @__PURE__ */ (0, import_jsx_runtime391.jsx)("span", { className: "editor-post-card-panel__title-name", children: title }),
                  pageTypeBadge && postIds.length === 1 && /* @__PURE__ */ (0, import_jsx_runtime391.jsx)(Badge3, { children: pageTypeBadge })
                ]
              }
            ),
            !hideActions && postIds.length === 1 && /* @__PURE__ */ (0, import_jsx_runtime391.jsx)(import_jsx_runtime391.Fragment, { children: isRevision ? /* @__PURE__ */ (0, import_jsx_runtime391.jsx)(
              import_components229.Button,
              {
                size: "small",
                icon: more_vertical_default,
                label: (0, import_i18n248.__)("Actions"),
                disabled: true,
                accessibleWhenDisabled: true,
                className: "editor-all-actions-button"
              }
            ) : /* @__PURE__ */ (0, import_jsx_runtime391.jsx)(
              PostActions,
              {
                postType: postType2,
                postId: postIds[0],
                onActionPerformed
              }
            ) }),
            onClose && /* @__PURE__ */ (0, import_jsx_runtime391.jsx)(
              import_components229.Button,
              {
                size: "small",
                icon: close_default,
                label: (0, import_i18n248.__)("Close"),
                onClick: onClose
              }
            )
          ]
        }
      ),
      postIds.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime391.jsx)(import_components229.__experimentalText, { className: "editor-post-card-panel__description", children: (0, import_i18n248.sprintf)(
        // translators: %s: Name of the plural post type e.g: "Posts".
        (0, import_i18n248.__)("Changes will be applied to all selected %s."),
        labels?.name.toLowerCase()
      ) })
    ] });
  }

  // packages/editor/build-module/components/post-panel-section/index.mjs
  var import_components230 = __toESM(require_components(), 1);
  var import_jsx_runtime392 = __toESM(require_jsx_runtime(), 1);
  function PostPanelSection({ className, children }) {
    return /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(import_components230.__experimentalVStack, { className: clsx_default("editor-post-panel__section", className), children });
  }
  var post_panel_section_default = PostPanelSection;

  // packages/editor/build-module/components/media/metadata-panel.mjs
  var import_jsx_runtime393 = __toESM(require_jsx_runtime(), 1);
  function MediaMetadataPanel({ onActionPerformed }) {
    const { media, postType: postType2, postId: postId2 } = (0, import_data216.useSelect)((select6) => {
      const _postType = select6(store).getCurrentPostType();
      const _postId = select6(store).getCurrentPostId();
      const currentPost = select6(import_core_data124.store).getEditedEntityRecord(
        "postType",
        _postType,
        _postId,
        {
          _embed: "author,wp:attached-to"
        }
      );
      return {
        media: currentPost,
        postType: _postType,
        postId: _postId
      };
    }, []);
    const { editPost: editPost2 } = (0, import_data216.useDispatch)(store);
    const fields2 = post_fields_default({ postType: "attachment" });
    const settings = (0, import_element212.useMemo)(
      () => ({
        fields: fields2
      }),
      [fields2]
    );
    const handleUpdate = (updates) => {
      editPost2(updates);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(post_panel_section_default, { className: "editor-media-metadata-panel", children: /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
      MediaEditorProvider,
      {
        value: media,
        settings,
        onChange: handleUpdate,
        children: /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
          MediaForm,
          {
            header: /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
              PostCardPanel,
              {
                postType: postType2,
                postId: postId2,
                onActionPerformed
              }
            )
          }
        )
      }
    ) });
  }

  // packages/editor/build-module/components/editor-interface/index.mjs
  var import_jsx_runtime394 = __toESM(require_jsx_runtime(), 1);
  var interfaceLabels = {
    /* translators: accessibility text for the editor top bar landmark region. */
    header: (0, import_i18n249.__)("Editor top bar"),
    /* translators: accessibility text for the editor content landmark region. */
    body: (0, import_i18n249.__)("Editor content"),
    /* translators: accessibility text for the editor settings landmark region. */
    sidebar: (0, import_i18n249.__)("Editor settings"),
    /* translators: accessibility text for the editor publish landmark region. */
    actions: (0, import_i18n249.__)("Editor publish"),
    /* translators: accessibility text for the editor footer landmark region. */
    footer: (0, import_i18n249.__)("Editor footer")
  };
  var Notices = () => /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
    import_notices31.InlineNotices,
    {
      pinnedNoticesClassName: "editor-notices__pinned",
      dismissibleNoticesClassName: "editor-notices__dismissible",
      children: /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(TemplateValidationNotice, {})
    }
  );
  function EditorInterface({
    className,
    children,
    forceIsDirty,
    contentRef,
    disableIframe,
    autoFocus,
    customSaveButton,
    customSavePanel,
    forceDisableBlockTools,
    iframeProps
  }) {
    const {
      mode,
      postId: postId2,
      postType: postType2,
      isAttachment,
      isInserterOpened: isInserterOpened2,
      isListViewOpened: isListViewOpened2,
      isDistractionFree,
      isPreviewMode,
      showBlockBreadcrumbs,
      postTypeLabel,
      stylesPath: stylesPath2,
      showStylebook: showStylebook2,
      isRevisionsMode: isRevisionsMode2,
      showDiff
    } = (0, import_data217.useSelect)((select6) => {
      const { get } = select6(import_preferences24.store);
      const {
        getEditorSettings: getEditorSettings2,
        getPostTypeLabel: getPostTypeLabel2,
        getCurrentPostType: getCurrentPostType2,
        getCurrentPostId: getCurrentPostId2
      } = select6(store);
      const {
        getStylesPath: getStylesPath2,
        getShowStylebook: getShowStylebook2,
        isRevisionsMode: _isRevisionsMode,
        isShowingRevisionDiff: isShowingRevisionDiff2
      } = unlock(select6(store));
      const editorSettings2 = getEditorSettings2();
      let _mode = select6(store).getEditorMode();
      if (!editorSettings2.richEditingEnabled && _mode === "visual") {
        _mode = "text";
      }
      if (!editorSettings2.codeEditingEnabled && _mode === "text") {
        _mode = "visual";
      }
      return {
        mode: _mode,
        postId: getCurrentPostId2(),
        postType: getCurrentPostType2(),
        isInserterOpened: select6(store).isInserterOpened(),
        isListViewOpened: select6(store).isListViewOpened(),
        isDistractionFree: get("core", "distractionFree"),
        isPreviewMode: editorSettings2.isPreviewMode,
        showBlockBreadcrumbs: get("core", "showBlockBreadcrumbs"),
        postTypeLabel: getPostTypeLabel2(),
        stylesPath: getStylesPath2(),
        showStylebook: getShowStylebook2(),
        isAttachment: getCurrentPostType2() === "attachment" && window?.__experimentalMediaEditor,
        isRevisionsMode: _isRevisionsMode(),
        showDiff: isShowingRevisionDiff2()
      };
    }, []);
    const { setShowRevisionDiff: setShowRevisionDiff2 } = unlock((0, import_data217.useDispatch)(store));
    useCollaboratorNotifications(postId2, postType2);
    const isLargeViewport = (0, import_compose64.useViewportMatch)("medium");
    const secondarySidebarLabel = isListViewOpened2 ? (0, import_i18n249.__)("Document Overview") : (0, import_i18n249.__)("Block Library");
    const shouldShowMediaEditor = !!isAttachment;
    const shouldShowStylesCanvas = !isAttachment && (showStylebook2 || stylesPath2?.startsWith("/revisions"));
    const shouldShowBlockEditor = !shouldShowMediaEditor && !shouldShowStylesCanvas;
    const [entitiesSavedStatesCallback, setEntitiesSavedStatesCallback] = (0, import_element213.useState)(false);
    const closeEntitiesSavedStates = (0, import_element213.useCallback)(
      (arg) => {
        if (typeof entitiesSavedStatesCallback === "function") {
          entitiesSavedStatesCallback(arg);
        }
        setEntitiesSavedStatesCallback(false);
      },
      [entitiesSavedStatesCallback]
    );
    if (isRevisionsMode2) {
      return /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
        interface_skeleton_default,
        {
          className: clsx_default("editor-editor-interface", className),
          labels: interfaceLabels,
          header: /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
            revisions_header_default,
            {
              showDiff,
              onToggleDiff: () => setShowRevisionDiff2(!showDiff)
            }
          ),
          content: /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(RevisionsCanvas, {}),
          sidebar: /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(complementary_area_default.Slot, { scope: "core" })
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
      interface_skeleton_default,
      {
        isDistractionFree,
        className: clsx_default("editor-editor-interface", className, {
          "is-entity-save-view-open": !!entitiesSavedStatesCallback,
          "is-distraction-free": isDistractionFree && !isPreviewMode
        }),
        labels: {
          ...interfaceLabels,
          secondarySidebar: secondarySidebarLabel
        },
        header: !isPreviewMode && /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
          header_default2,
          {
            forceIsDirty,
            setEntitiesSavedStatesCallback,
            customSaveButton,
            forceDisableBlockTools
          }
        ),
        editorNotices: /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(Notices, {}),
        secondarySidebar: !isAttachment && !isPreviewMode && mode === "visual" && (isInserterOpened2 && /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(InserterSidebar, {}) || isListViewOpened2 && /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(ListViewSidebar, {})),
        sidebar: !isPreviewMode && !isDistractionFree && /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(complementary_area_default.Slot, { scope: "core" }),
        content: /* @__PURE__ */ (0, import_jsx_runtime394.jsxs)(import_jsx_runtime394.Fragment, { children: [
          !isDistractionFree && !isPreviewMode && /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(Notices, {}),
          shouldShowMediaEditor && /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(MediaPreview3, { ...iframeProps }),
          shouldShowStylesCanvas && /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(StylesCanvas, {}),
          shouldShowBlockEditor && /* @__PURE__ */ (0, import_jsx_runtime394.jsxs)(import_jsx_runtime394.Fragment, { children: [
            !isPreviewMode && mode === "text" && /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
              TextEditor,
              {
                autoFocus
              }
            ),
            !isPreviewMode && !isLargeViewport && mode === "visual" && /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(import_block_editor83.BlockToolbar, { hideDragHandle: true }),
            (isPreviewMode || mode === "visual") && /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
              visual_editor_default,
              {
                contentRef,
                disableIframe,
                autoFocus,
                iframeProps
              }
            ),
            children,
            /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
              CollaboratorsOverlay,
              {
                postId: postId2,
                postType: postType2
              }
            )
          ] })
        ] }),
        footer: !isPreviewMode && !isDistractionFree && isLargeViewport && showBlockBreadcrumbs && mode === "visual" && /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
          import_block_editor83.BlockBreadcrumb,
          {
            rootLabelText: postTypeLabel ? (0, import_html_entities27.decodeEntities)(postTypeLabel) : void 0
          }
        ),
        actions: !isPreviewMode ? customSavePanel || /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(
          SavePublishPanels,
          {
            closeEntitiesSavedStates,
            isEntitiesSavedStatesOpen: entitiesSavedStatesCallback,
            setEntitiesSavedStatesCallback,
            forceIsDirtyPublishPanel: forceIsDirty
          }
        ) : void 0
      }
    );
  }

  // packages/editor/build-module/components/sidebar/index.mjs
  var import_block_editor93 = __toESM(require_block_editor(), 1);
  var import_data236 = __toESM(require_data(), 1);
  var import_element224 = __toESM(require_element(), 1);
  var import_i18n265 = __toESM(require_i18n(), 1);
  var import_keyboard_shortcuts10 = __toESM(require_keyboard_shortcuts(), 1);
  var import_components244 = __toESM(require_components(), 1);

  // packages/editor/build-module/components/pattern-overrides-panel/index.mjs
  var import_data218 = __toESM(require_data(), 1);
  var import_patterns9 = __toESM(require_patterns(), 1);
  var import_jsx_runtime395 = __toESM(require_jsx_runtime(), 1);
  var { OverridesPanel } = unlock(import_patterns9.privateApis);
  function PatternOverridesPanel() {
    const supportsPatternOverridesPanel = (0, import_data218.useSelect)(
      (select6) => select6(store).getCurrentPostType() === "wp_block",
      []
    );
    if (!supportsPatternOverridesPanel) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime395.jsx)(OverridesPanel, {});
  }

  // packages/editor/build-module/components/sidebar/post-summary.mjs
  var import_components238 = __toESM(require_components(), 1);
  var import_data227 = __toESM(require_data(), 1);
  var import_i18n258 = __toESM(require_i18n(), 1);
  var import_url23 = __toESM(require_url(), 1);

  // packages/editor/build-module/components/post-content-information/index.mjs
  var import_components231 = __toESM(require_components(), 1);
  var import_data219 = __toESM(require_data(), 1);
  var import_i18n250 = __toESM(require_i18n(), 1);
  var import_wordcount4 = __toESM(require_wordcount(), 1);
  var import_element214 = __toESM(require_element(), 1);
  var import_core_data125 = __toESM(require_core_data(), 1);
  var import_jsx_runtime396 = __toESM(require_jsx_runtime(), 1);
  var AVERAGE_READING_RATE2 = 189;
  function PostContentInformation() {
    const { postContent } = (0, import_data219.useSelect)((select6) => {
      const { getEditedPostAttribute: getEditedPostAttribute2, getCurrentPostType: getCurrentPostType2, getCurrentPostId: getCurrentPostId2 } = select6(store);
      const { getCurrentRevision: getCurrentRevision2, isRevisionsMode: isRevisionsMode2 } = unlock(
        select6(store)
      );
      if (isRevisionsMode2()) {
        return {
          postContent: getCurrentRevision2()?.content?.raw
        };
      }
      const { canUser } = select6(import_core_data125.store);
      const { getEntityRecord } = select6(import_core_data125.store);
      const siteSettings = canUser("read", {
        kind: "root",
        name: "site"
      }) ? getEntityRecord("root", "site") : void 0;
      const postType2 = getCurrentPostType2();
      const _id = getCurrentPostId2();
      const isPostsPage = +_id === siteSettings?.page_for_posts;
      const showPostContentInfo = !isPostsPage && ![TEMPLATE_POST_TYPE, TEMPLATE_PART_POST_TYPE].includes(
        postType2
      );
      return {
        postContent: showPostContentInfo && getEditedPostAttribute2("content")
      };
    }, []);
    const wordCountType = (0, import_i18n250._x)("words", "Word count type. Do not translate!");
    const wordsCounted = (0, import_element214.useMemo)(
      () => postContent ? (0, import_wordcount4.count)(postContent, wordCountType) : 0,
      [postContent, wordCountType]
    );
    if (!wordsCounted) {
      return null;
    }
    const readingTime = Math.round(wordsCounted / AVERAGE_READING_RATE2);
    const wordsCountText = (0, import_i18n250.sprintf)(
      // translators: %s: the number of words in the post.
      (0, import_i18n250._n)("%s word", "%s words", wordsCounted),
      wordsCounted.toLocaleString()
    );
    const minutesText = readingTime <= 1 ? (0, import_i18n250.__)("1 minute") : (0, import_i18n250.sprintf)(
      /* translators: %s: the number of minutes to read the post. */
      (0, import_i18n250._n)("%s minute", "%s minutes", readingTime),
      readingTime.toLocaleString()
    );
    return /* @__PURE__ */ (0, import_jsx_runtime396.jsx)("div", { className: "editor-post-content-information", children: /* @__PURE__ */ (0, import_jsx_runtime396.jsx)(import_components231.__experimentalText, { children: (0, import_i18n250.sprintf)(
      /* translators: 1: How many words a post has. 2: the number of minutes to read the post (e.g. 130 words, 2 minutes read time.) */
      (0, import_i18n250.__)("%1$s, %2$s read time."),
      wordsCountText,
      minutesText
    ) }) });
  }

  // packages/editor/build-module/components/post-format/panel.mjs
  var import_components232 = __toESM(require_components(), 1);
  var import_i18n251 = __toESM(require_i18n(), 1);
  var import_data220 = __toESM(require_data(), 1);
  var import_element215 = __toESM(require_element(), 1);
  var import_block_editor84 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime397 = __toESM(require_jsx_runtime(), 1);
  function PostFormat2() {
    const { postFormat } = (0, import_data220.useSelect)((select6) => {
      const { getEditedPostAttribute: getEditedPostAttribute2 } = select6(store);
      const _postFormat = getEditedPostAttribute2("format");
      return {
        postFormat: _postFormat ?? "standard"
      };
    }, []);
    const activeFormat = POST_FORMATS.find(
      (format6) => format6.id === postFormat
    );
    const [popoverAnchor, setPopoverAnchor] = (0, import_element215.useState)(null);
    const popoverProps = (0, import_element215.useMemo)(
      () => ({
        // Anchor the popover to the middle of the entire row so that it doesn't
        // move around when the label changes.
        anchor: popoverAnchor,
        placement: "left-start",
        offset: 36,
        shift: true
      }),
      [popoverAnchor]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime397.jsx)(PostFormatCheck, { children: /* @__PURE__ */ (0, import_jsx_runtime397.jsx)(post_panel_row_default, { label: (0, import_i18n251.__)("Format"), ref: setPopoverAnchor, children: /* @__PURE__ */ (0, import_jsx_runtime397.jsx)(
      import_components232.Dropdown,
      {
        popoverProps,
        contentClassName: "editor-post-format__dialog",
        focusOnMount: true,
        renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime397.jsx)(
          import_components232.Button,
          {
            size: "compact",
            variant: "tertiary",
            "aria-expanded": isOpen,
            "aria-label": (0, import_i18n251.sprintf)(
              // translators: %s: Current post format.
              (0, import_i18n251.__)("Change format: %s"),
              activeFormat?.caption
            ),
            onClick: onToggle,
            children: activeFormat?.caption
          }
        ),
        renderContent: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime397.jsxs)("div", { className: "editor-post-format__dialog-content", children: [
          /* @__PURE__ */ (0, import_jsx_runtime397.jsx)(
            import_block_editor84.__experimentalInspectorPopoverHeader,
            {
              title: (0, import_i18n251.__)("Format"),
              onClose
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime397.jsx)(PostFormat, {})
        ] })
      }
    ) }) });
  }
  var panel_default4 = PostFormat2;

  // packages/editor/build-module/components/post-last-edited-panel/index.mjs
  var import_components233 = __toESM(require_components(), 1);
  var import_data221 = __toESM(require_data(), 1);
  var import_i18n252 = __toESM(require_i18n(), 1);
  var import_date18 = __toESM(require_date(), 1);
  var import_jsx_runtime398 = __toESM(require_jsx_runtime(), 1);
  function PostLastEditedPanel() {
    const modified = (0, import_data221.useSelect)(
      (select6) => select6(store).getEditedPostAttribute("modified"),
      []
    );
    if (!modified) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime398.jsx)("div", { className: "editor-post-last-edited-panel", children: /* @__PURE__ */ (0, import_jsx_runtime398.jsx)(import_components233.__experimentalText, { children: (0, import_i18n252.sprintf)(
      // translators: %s: Human-readable time difference, e.g. "2 days ago".
      (0, import_i18n252.__)("Last edited %s."),
      (0, import_date18.humanTimeDiff)(modified)
    ) }) });
  }

  // packages/editor/build-module/components/revision-created-panel/index.mjs
  var import_components234 = __toESM(require_components(), 1);
  var import_data222 = __toESM(require_data(), 1);
  var import_i18n253 = __toESM(require_i18n(), 1);
  var import_date19 = __toESM(require_date(), 1);
  var import_jsx_runtime399 = __toESM(require_jsx_runtime(), 1);
  function RevisionCreatedPanel() {
    const date = (0, import_data222.useSelect)((select6) => {
      const { getCurrentRevision: getCurrentRevision2 } = unlock(select6(store));
      return getCurrentRevision2()?.date;
    }, []);
    if (!date) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime399.jsx)("div", { className: "editor-post-last-edited-panel", children: /* @__PURE__ */ (0, import_jsx_runtime399.jsx)(import_components234.__experimentalText, { children: (0, import_i18n253.sprintf)(
      // translators: %s: Human-readable time difference, e.g. "2 days ago".
      (0, import_i18n253.__)("Created %s."),
      (0, import_date19.humanTimeDiff)(date)
    ) }) });
  }

  // packages/editor/build-module/components/blog-title/index.mjs
  var import_i18n254 = __toESM(require_i18n(), 1);
  var import_compose65 = __toESM(require_compose(), 1);
  var import_data223 = __toESM(require_data(), 1);
  var import_core_data126 = __toESM(require_core_data(), 1);
  var import_html_entities28 = __toESM(require_html_entities(), 1);
  var import_components235 = __toESM(require_components(), 1);
  var import_element216 = __toESM(require_element(), 1);
  var import_block_editor85 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime400 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_OBJECT5 = {};
  function BlogTitle() {
    const { editEntityRecord } = (0, import_data223.useDispatch)(import_core_data126.store);
    const { postsPageTitle, postsPageId, isTemplate: isTemplate2, postSlug } = (0, import_data223.useSelect)(
      (select6) => {
        const { getEntityRecord, getEditedEntityRecord, canUser } = select6(import_core_data126.store);
        const siteSettings = canUser("read", {
          kind: "root",
          name: "site"
        }) ? getEntityRecord("root", "site") : void 0;
        const _postsPageRecord = siteSettings?.page_for_posts ? getEditedEntityRecord(
          "postType",
          "page",
          siteSettings?.page_for_posts
        ) : EMPTY_OBJECT5;
        const { getEditedPostAttribute: getEditedPostAttribute2, getCurrentPostType: getCurrentPostType2 } = select6(store);
        return {
          postsPageId: _postsPageRecord?.id,
          postsPageTitle: _postsPageRecord?.title,
          isTemplate: getCurrentPostType2() === TEMPLATE_POST_TYPE,
          postSlug: getEditedPostAttribute2("slug")
        };
      },
      []
    );
    const [popoverAnchor, setPopoverAnchor] = (0, import_element216.useState)(null);
    const popoverProps = (0, import_element216.useMemo)(
      () => ({
        // Anchor the popover to the middle of the entire row so that it doesn't
        // move around when the label changes.
        anchor: popoverAnchor,
        placement: "left-start",
        offset: 36,
        shift: true
      }),
      [popoverAnchor]
    );
    if (!isTemplate2 || !["home", "index"].includes(postSlug) || !postsPageId) {
      return null;
    }
    const setPostsPageTitle = (newValue) => {
      editEntityRecord("postType", "page", postsPageId, {
        title: newValue
      });
    };
    const decodedTitle = (0, import_html_entities28.decodeEntities)(postsPageTitle);
    return /* @__PURE__ */ (0, import_jsx_runtime400.jsx)(post_panel_row_default, { label: (0, import_i18n254.__)("Blog title"), ref: setPopoverAnchor, children: /* @__PURE__ */ (0, import_jsx_runtime400.jsx)(
      import_components235.Dropdown,
      {
        popoverProps,
        contentClassName: "editor-blog-title-dropdown__content",
        focusOnMount: true,
        renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime400.jsx)(
          import_components235.Button,
          {
            size: "compact",
            variant: "tertiary",
            "aria-expanded": isOpen,
            "aria-label": (0, import_i18n254.sprintf)(
              // translators: %s: Current post link.
              (0, import_i18n254.__)("Change blog title: %s"),
              decodedTitle
            ),
            onClick: onToggle,
            children: decodedTitle
          }
        ),
        renderContent: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime400.jsxs)(import_jsx_runtime400.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime400.jsx)(
            import_block_editor85.__experimentalInspectorPopoverHeader,
            {
              title: (0, import_i18n254.__)("Blog title"),
              onClose
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime400.jsx)(
            import_components235.__experimentalInputControl,
            {
              placeholder: (0, import_i18n254.__)("No title"),
              size: "__unstable-large",
              value: postsPageTitle,
              onChange: (0, import_compose65.debounce)(setPostsPageTitle, 300),
              label: (0, import_i18n254.__)("Blog title"),
              help: (0, import_i18n254.__)(
                "Set the Posts Page title. Appears in search results, and when the page is shared on social media."
              ),
              hideLabelFromVision: true
            }
          )
        ] })
      }
    ) });
  }

  // packages/editor/build-module/components/posts-per-page/index.mjs
  var import_i18n255 = __toESM(require_i18n(), 1);
  var import_data224 = __toESM(require_data(), 1);
  var import_core_data127 = __toESM(require_core_data(), 1);
  var import_components236 = __toESM(require_components(), 1);
  var import_element217 = __toESM(require_element(), 1);
  var import_block_editor86 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime401 = __toESM(require_jsx_runtime(), 1);
  function PostsPerPage() {
    const { editEntityRecord } = (0, import_data224.useDispatch)(import_core_data127.store);
    const { postsPerPage, isTemplate: isTemplate2, postSlug } = (0, import_data224.useSelect)((select6) => {
      const { getEditedPostAttribute: getEditedPostAttribute2, getCurrentPostType: getCurrentPostType2 } = select6(store);
      const { getEditedEntityRecord, canUser } = select6(import_core_data127.store);
      const siteSettings = canUser("read", {
        kind: "root",
        name: "site"
      }) ? getEditedEntityRecord("root", "site") : void 0;
      return {
        isTemplate: getCurrentPostType2() === TEMPLATE_POST_TYPE,
        postSlug: getEditedPostAttribute2("slug"),
        postsPerPage: siteSettings?.posts_per_page || 1
      };
    }, []);
    const [popoverAnchor, setPopoverAnchor] = (0, import_element217.useState)(null);
    const popoverProps = (0, import_element217.useMemo)(
      () => ({
        // Anchor the popover to the middle of the entire row so that it doesn't
        // move around when the label changes.
        anchor: popoverAnchor,
        placement: "left-start",
        offset: 36,
        shift: true
      }),
      [popoverAnchor]
    );
    if (!isTemplate2 || !["home", "index"].includes(postSlug)) {
      return null;
    }
    const setPostsPerPage = (newValue) => {
      editEntityRecord("root", "site", void 0, {
        posts_per_page: newValue
      });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime401.jsx)(post_panel_row_default, { label: (0, import_i18n255.__)("Posts per page"), ref: setPopoverAnchor, children: /* @__PURE__ */ (0, import_jsx_runtime401.jsx)(
      import_components236.Dropdown,
      {
        popoverProps,
        contentClassName: "editor-posts-per-page-dropdown__content",
        focusOnMount: true,
        renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime401.jsx)(
          import_components236.Button,
          {
            size: "compact",
            variant: "tertiary",
            "aria-expanded": isOpen,
            "aria-label": (0, import_i18n255.__)("Change posts per page"),
            onClick: onToggle,
            children: postsPerPage
          }
        ),
        renderContent: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime401.jsxs)(import_jsx_runtime401.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime401.jsx)(
            import_block_editor86.__experimentalInspectorPopoverHeader,
            {
              title: (0, import_i18n255.__)("Posts per page"),
              onClose
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime401.jsx)(
            import_components236.__experimentalNumberControl,
            {
              placeholder: 0,
              value: postsPerPage,
              size: "__unstable-large",
              spinControls: "custom",
              step: "1",
              min: "1",
              onChange: setPostsPerPage,
              label: (0, import_i18n255.__)("Posts per page"),
              help: (0, import_i18n255.__)(
                "Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting."
              ),
              hideLabelFromVision: true
            }
          )
        ] })
      }
    ) });
  }

  // packages/editor/build-module/components/site-discussion/index.mjs
  var import_i18n256 = __toESM(require_i18n(), 1);
  var import_data225 = __toESM(require_data(), 1);
  var import_core_data128 = __toESM(require_core_data(), 1);
  var import_components237 = __toESM(require_components(), 1);
  var import_element218 = __toESM(require_element(), 1);
  var import_block_editor87 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime402 = __toESM(require_jsx_runtime(), 1);
  var COMMENT_OPTIONS2 = [
    {
      label: (0, import_i18n256._x)("Open", 'Adjective: e.g. "Comments are open"'),
      value: "open",
      description: (0, import_i18n256.__)("Visitors can add new comments and replies.")
    },
    {
      label: (0, import_i18n256.__)("Closed"),
      value: "",
      description: [
        (0, import_i18n256.__)("Visitors cannot add new comments or replies."),
        (0, import_i18n256.__)("Existing comments remain visible.")
      ].join(" ")
    }
  ];
  function SiteDiscussion() {
    const { editEntityRecord } = (0, import_data225.useDispatch)(import_core_data128.store);
    const { allowCommentsOnNewPosts, isTemplate: isTemplate2, postSlug } = (0, import_data225.useSelect)(
      (select6) => {
        const { getEditedPostAttribute: getEditedPostAttribute2, getCurrentPostType: getCurrentPostType2 } = select6(store);
        const { getEditedEntityRecord, canUser } = select6(import_core_data128.store);
        const siteSettings = canUser("read", {
          kind: "root",
          name: "site"
        }) ? getEditedEntityRecord("root", "site") : void 0;
        return {
          isTemplate: getCurrentPostType2() === TEMPLATE_POST_TYPE,
          postSlug: getEditedPostAttribute2("slug"),
          allowCommentsOnNewPosts: siteSettings?.default_comment_status || ""
        };
      },
      []
    );
    const [popoverAnchor, setPopoverAnchor] = (0, import_element218.useState)(null);
    const popoverProps = (0, import_element218.useMemo)(
      () => ({
        // Anchor the popover to the middle of the entire row so that it doesn't
        // move around when the label changes.
        anchor: popoverAnchor,
        placement: "left-start",
        offset: 36,
        shift: true
      }),
      [popoverAnchor]
    );
    if (!isTemplate2 || !["home", "index"].includes(postSlug)) {
      return null;
    }
    const setAllowCommentsOnNewPosts = (newValue) => {
      editEntityRecord("root", "site", void 0, {
        default_comment_status: newValue ? "open" : null
      });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime402.jsx)(post_panel_row_default, { label: (0, import_i18n256.__)("Discussion"), ref: setPopoverAnchor, children: /* @__PURE__ */ (0, import_jsx_runtime402.jsx)(
      import_components237.Dropdown,
      {
        popoverProps,
        contentClassName: "editor-site-discussion-dropdown__content",
        focusOnMount: true,
        renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime402.jsx)(
          import_components237.Button,
          {
            size: "compact",
            variant: "tertiary",
            "aria-expanded": isOpen,
            "aria-label": (0, import_i18n256.__)("Change discussion settings"),
            onClick: onToggle,
            children: allowCommentsOnNewPosts ? (0, import_i18n256.__)("Comments open") : (0, import_i18n256.__)("Comments closed")
          }
        ),
        renderContent: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime402.jsxs)(import_jsx_runtime402.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime402.jsx)(
            import_block_editor87.__experimentalInspectorPopoverHeader,
            {
              title: (0, import_i18n256.__)("Discussion"),
              onClose
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime402.jsxs)(import_components237.__experimentalVStack, { spacing: 3, children: [
            /* @__PURE__ */ (0, import_jsx_runtime402.jsx)(import_components237.__experimentalText, { children: (0, import_i18n256.__)(
              "Changes will apply to new posts only. Individual posts may override these settings."
            ) }),
            /* @__PURE__ */ (0, import_jsx_runtime402.jsx)(
              import_components237.RadioControl,
              {
                className: "editor-site-discussion__options",
                hideLabelFromVision: true,
                label: (0, import_i18n256.__)("Comment status"),
                options: COMMENT_OPTIONS2,
                onChange: setAllowCommentsOnNewPosts,
                selected: allowCommentsOnNewPosts
              }
            )
          ] })
        ] })
      }
    ) });
  }

  // packages/editor/build-module/components/revision-author-panel/index.mjs
  var import_data226 = __toESM(require_data(), 1);
  var import_core_data129 = __toESM(require_core_data(), 1);
  var import_html_entities29 = __toESM(require_html_entities(), 1);
  var import_i18n257 = __toESM(require_i18n(), 1);
  var import_jsx_runtime403 = __toESM(require_jsx_runtime(), 1);
  function RevisionAuthorPanel() {
    const authorName = (0, import_data226.useSelect)((select6) => {
      const { getCurrentRevision: getCurrentRevision2 } = unlock(select6(store));
      const revision = getCurrentRevision2();
      if (!revision?.author) {
        return null;
      }
      const author = select6(import_core_data129.store).getUser(revision.author);
      return author?.name;
    }, []);
    if (!authorName) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime403.jsx)(post_panel_row_default, { label: (0, import_i18n257.__)("Author"), children: (0, import_html_entities29.decodeEntities)(authorName) });
  }

  // packages/editor/build-module/components/sidebar/post-summary.mjs
  var import_jsx_runtime404 = __toESM(require_jsx_runtime(), 1);
  var PANEL_NAME5 = "post-status";
  function PostSummary({ onActionPerformed }) {
    const { isRemovedPostStatusPanel, postType: postType2, postId: postId2, revisionId: revisionId2 } = (0, import_data227.useSelect)((select6) => {
      const {
        isEditorPanelRemoved: isEditorPanelRemoved2,
        getCurrentPostType: getCurrentPostType2,
        getCurrentPostId: getCurrentPostId2,
        getCurrentRevisionId: getCurrentRevisionId2
      } = unlock(select6(store));
      return {
        isRemovedPostStatusPanel: isEditorPanelRemoved2(PANEL_NAME5),
        postType: getCurrentPostType2(),
        postId: getCurrentPostId2(),
        revisionId: getCurrentRevisionId2()
      };
    }, []);
    const isRevisionsMode2 = !!revisionId2;
    const shouldShowPostStatusPanel = !isRemovedPostStatusPanel && !isRevisionsMode2;
    return /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(post_panel_section_default, { className: "editor-post-summary", children: /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(plugin_post_status_info_default.Slot, { children: (fills) => /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(import_jsx_runtime404.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime404.jsxs)(import_components238.__experimentalVStack, { spacing: 4, children: [
      /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
        PostCardPanel,
        {
          postType: postType2,
          postId: postId2,
          onActionPerformed
        }
      ),
      !isRevisionsMode2 && /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
        PostFeaturedImagePanel,
        {
          withPanelBody: false
        }
      ),
      !isRevisionsMode2 && /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(PrivatePostExcerptPanel, {}),
      /* @__PURE__ */ (0, import_jsx_runtime404.jsxs)(import_components238.__experimentalVStack, { spacing: 1, children: [
        /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(PostContentInformation, {}),
        isRevisionsMode2 ? /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(RevisionCreatedPanel, {}) : /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(PostLastEditedPanel, {})
      ] }),
      isRevisionsMode2 && revisionId2 && /* @__PURE__ */ (0, import_jsx_runtime404.jsxs)(import_jsx_runtime404.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
          import_components238.ExternalLink,
          {
            href: (0, import_url23.addQueryArgs)("revision.php", {
              revision: revisionId2
            }),
            children: (0, import_i18n258.__)(
              "Open classic revisions screen"
            )
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(RevisionAuthorPanel, {})
      ] }),
      shouldShowPostStatusPanel && /* @__PURE__ */ (0, import_jsx_runtime404.jsxs)(import_components238.__experimentalVStack, { spacing: 4, children: [
        /* @__PURE__ */ (0, import_jsx_runtime404.jsxs)(import_components238.__experimentalVStack, { spacing: 1, children: [
          /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(PostStatus, {}),
          /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(PostSchedulePanel, {}),
          /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(PostURLPanel, {}),
          /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(panel_default, {}),
          /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(PostTemplatePanel, {}),
          /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(PostDiscussionPanel, {}),
          /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(PrivatePostLastRevision, {}),
          /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(PageAttributesPanel, {}),
          /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(PostSyncStatus, {}),
          /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(BlogTitle, {}),
          /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(PostsPerPage, {}),
          /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(SiteDiscussion, {}),
          /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(panel_default4, {}),
          fills
        ] }),
        /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
          PostTrash,
          {
            onActionPerformed
          }
        )
      ] })
    ] }) }) }) });
  }

  // packages/editor/build-module/components/revision-fields-diff/index.mjs
  var import_word2 = __toESM(require_word(), 1);
  var import_data228 = __toESM(require_data(), 1);
  var import_element219 = __toESM(require_element(), 1);
  var import_i18n259 = __toESM(require_i18n(), 1);

  // packages/editor/build-module/components/revision-diff-panel/index.mjs
  var import_components239 = __toESM(require_components(), 1);
  var import_jsx_runtime405 = __toESM(require_jsx_runtime(), 1);
  function RevisionDiffPanel({ title, entries, initialOpen }) {
    if (!entries) {
      return null;
    }
    const fields2 = Object.entries(entries).map(([key, parts]) => /* @__PURE__ */ (0, import_jsx_runtime405.jsx)(post_panel_row_default, { label: key, children: /* @__PURE__ */ (0, import_jsx_runtime405.jsx)("span", { className: "editor-revision-fields-diff__value", children: parts.map((part, index2) => {
      if (part.added) {
        return /* @__PURE__ */ (0, import_jsx_runtime405.jsx)(
          "ins",
          {
            className: "editor-revision-fields-diff__added",
            children: part.value
          },
          index2
        );
      }
      if (part.removed) {
        return /* @__PURE__ */ (0, import_jsx_runtime405.jsx)(
          "del",
          {
            className: "editor-revision-fields-diff__removed",
            children: part.value
          },
          index2
        );
      }
      return /* @__PURE__ */ (0, import_jsx_runtime405.jsx)("span", { children: part.value }, index2);
    }) }) }, key));
    return /* @__PURE__ */ (0, import_jsx_runtime405.jsx)(import_components239.PanelBody, { title, initialOpen, children: fields2 });
  }

  // packages/editor/build-module/components/revision-fields-diff/index.mjs
  var import_jsx_runtime406 = __toESM(require_jsx_runtime(), 1);
  function stringifyValue2(value) {
    if (value === null || value === void 0) {
      return "";
    }
    if (typeof value === "object") {
      return JSON.stringify(value, null, 2);
    }
    return String(value);
  }
  function RevisionFieldsDiffPanel() {
    const { revision, previousRevision } = (0, import_data228.useSelect)((select6) => {
      const { getCurrentRevision: getCurrentRevision2, getPreviousRevision: getPreviousRevision2 } = unlock(
        select6(store)
      );
      return {
        revision: getCurrentRevision2(),
        previousRevision: getPreviousRevision2()
      };
    }, []);
    const entries = (0, import_element219.useMemo)(() => {
      if (!revision) {
        return null;
      }
      const revisionMeta = revision.meta ?? {};
      const previousMeta = previousRevision?.meta ?? {};
      const allMetaKeys = /* @__PURE__ */ new Set([
        ...Object.keys(revisionMeta),
        ...Object.keys(previousMeta)
      ]);
      const result = {};
      for (const key of allMetaKeys) {
        const revStr = stringifyValue2(revisionMeta[key]);
        const prevStr = stringifyValue2(previousMeta[key]);
        if (!revStr && !prevStr) {
          continue;
        }
        result[key] = (0, import_word2.diffWords)(prevStr, revStr);
      }
      if (Object.keys(result).length === 0) {
        return null;
      }
      return result;
    }, [revision, previousRevision]);
    return /* @__PURE__ */ (0, import_jsx_runtime406.jsx)(
      RevisionDiffPanel,
      {
        title: (0, import_i18n259.__)("Meta"),
        entries,
        initialOpen: false
      }
    );
  }

  // packages/editor/build-module/components/post-transform-panel/index.mjs
  var import_data230 = __toESM(require_data(), 1);
  var import_core_data131 = __toESM(require_core_data(), 1);
  var import_components240 = __toESM(require_components(), 1);
  var import_i18n260 = __toESM(require_i18n(), 1);
  var import_block_editor88 = __toESM(require_block_editor(), 1);
  var import_blocks36 = __toESM(require_blocks(), 1);

  // packages/editor/build-module/components/post-transform-panel/hooks.mjs
  var import_data229 = __toESM(require_data(), 1);
  var import_element220 = __toESM(require_element(), 1);
  var import_core_data130 = __toESM(require_core_data(), 1);
  var import_blocks35 = __toESM(require_blocks(), 1);
  var import_patterns10 = __toESM(require_patterns(), 1);
  var { EXCLUDED_PATTERN_SOURCES, PATTERN_TYPES: PATTERN_TYPES5 } = unlock(import_patterns10.privateApis);
  function injectThemeAttributeInBlockTemplateContent(block, currentThemeStylesheet) {
    block.innerBlocks = block.innerBlocks.map((innerBlock) => {
      return injectThemeAttributeInBlockTemplateContent(
        innerBlock,
        currentThemeStylesheet
      );
    });
    if (block.name === "core/template-part" && block.attributes.theme === void 0) {
      block.attributes.theme = currentThemeStylesheet;
    }
    return block;
  }
  function filterPatterns(patterns2, template2) {
    const filterOutDuplicatesByName = (currentItem, index2, items) => index2 === items.findIndex((item) => currentItem.name === item.name);
    const filterOutExcludedPatternSources = (pattern) => {
      if (template2.area === "navigation-overlay" && pattern.blockTypes?.includes(
        "core/template-part/navigation-overlay"
      )) {
        return true;
      }
      return !EXCLUDED_PATTERN_SOURCES.includes(pattern.source);
    };
    const filterCompatiblePatterns = (pattern) => pattern.templateTypes?.includes(template2.slug) || pattern.blockTypes?.includes("core/template-part/" + template2.area);
    return patterns2.filter((pattern, index2, items) => {
      return filterOutDuplicatesByName(pattern, index2, items) && filterOutExcludedPatternSources(pattern) && filterCompatiblePatterns(pattern);
    });
  }
  function preparePatterns(patterns2, currentThemeStylesheet) {
    return patterns2.map((pattern) => ({
      ...pattern,
      keywords: pattern.keywords || [],
      type: PATTERN_TYPES5.theme,
      blocks: (0, import_blocks35.parse)(pattern.content, {
        __unstableSkipMigrationLogs: true
      }).map(
        (block) => injectThemeAttributeInBlockTemplateContent(
          block,
          currentThemeStylesheet
        )
      )
    }));
  }
  function useAvailablePatterns({ area, name: name2, slug }) {
    const { blockPatterns, restBlockPatterns, currentThemeStylesheet } = (0, import_data229.useSelect)((select6) => {
      const { getEditorSettings: getEditorSettings2 } = select6(store);
      const settings = getEditorSettings2();
      return {
        blockPatterns: settings.__experimentalAdditionalBlockPatterns ?? settings.__experimentalBlockPatterns,
        restBlockPatterns: select6(import_core_data130.store).getBlockPatterns(),
        currentThemeStylesheet: select6(import_core_data130.store).getCurrentTheme().stylesheet
      };
    }, []);
    return (0, import_element220.useMemo)(() => {
      const mergedPatterns = [
        ...blockPatterns || [],
        ...restBlockPatterns || []
      ];
      const filteredPatterns = filterPatterns(mergedPatterns, {
        area,
        name: name2,
        slug
      });
      return preparePatterns(filteredPatterns, currentThemeStylesheet);
    }, [
      area,
      name2,
      slug,
      blockPatterns,
      restBlockPatterns,
      currentThemeStylesheet
    ]);
  }

  // packages/editor/build-module/components/post-transform-panel/index.mjs
  var import_jsx_runtime407 = __toESM(require_jsx_runtime(), 1);
  function TemplatesList2({ availableTemplates, onSelect }) {
    if (!availableTemplates || availableTemplates?.length === 0) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime407.jsx)(
      import_block_editor88.__experimentalBlockPatternsList,
      {
        label: (0, import_i18n260.__)("Templates"),
        blockPatterns: availableTemplates,
        onClickPattern: onSelect,
        showTitlesAsTooltip: true
      }
    );
  }
  function PostTransform() {
    const { area, name: name2, slug, postType: postType2, postId: postId2 } = (0, import_data230.useSelect)((select6) => {
      const { getCurrentPostType: getCurrentPostType2, getCurrentPostId: getCurrentPostId2 } = select6(store);
      const { getEditedEntityRecord } = select6(import_core_data131.store);
      const type = getCurrentPostType2();
      const id = getCurrentPostId2();
      const record = getEditedEntityRecord("postType", type, id);
      return {
        area: record?.area,
        name: record?.name,
        slug: record?.slug,
        postType: type,
        postId: id
      };
    }, []);
    const { editEntityRecord } = (0, import_data230.useDispatch)(import_core_data131.store);
    const availablePatterns = useAvailablePatterns({ area, name: name2, slug });
    const onTemplateSelect = async (selectedTemplate) => {
      await editEntityRecord("postType", postType2, postId2, {
        blocks: selectedTemplate.blocks,
        content: (0, import_blocks36.serialize)(selectedTemplate.blocks)
      });
    };
    if (!availablePatterns?.length) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime407.jsx)(
      import_components240.PanelBody,
      {
        title: (0, import_i18n260.__)("Design"),
        initialOpen: postType2 === TEMPLATE_PART_POST_TYPE,
        children: /* @__PURE__ */ (0, import_jsx_runtime407.jsx)(
          TemplatesList2,
          {
            availableTemplates: availablePatterns,
            onSelect: onTemplateSelect
          }
        )
      }
    );
  }
  function PostTransformPanel() {
    const { postType: postType2 } = (0, import_data230.useSelect)((select6) => {
      const { getCurrentPostType: getCurrentPostType2 } = select6(store);
      return {
        postType: getCurrentPostType2()
      };
    }, []);
    if (![TEMPLATE_PART_POST_TYPE, TEMPLATE_POST_TYPE].includes(postType2)) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime407.jsx)(PostTransform, {});
  }

  // packages/editor/build-module/components/sidebar/header.mjs
  var import_components241 = __toESM(require_components(), 1);
  var import_i18n261 = __toESM(require_i18n(), 1);
  var import_data231 = __toESM(require_data(), 1);
  var import_element221 = __toESM(require_element(), 1);
  var import_html_entities30 = __toESM(require_html_entities(), 1);
  var import_jsx_runtime408 = __toESM(require_jsx_runtime(), 1);
  var { Tabs: Tabs4 } = unlock(import_components241.privateApis);
  var SidebarHeader = (_, ref) => {
    const { postTypeLabel, isAttachment, isRevisionsMode: isRevisionsMode2 } = (0, import_data231.useSelect)(
      (select6) => {
        const { getPostTypeLabel: getPostTypeLabel2, getCurrentPostType: getCurrentPostType2 } = select6(store);
        const { isRevisionsMode: _isRevisionsMode } = unlock(
          select6(store)
        );
        return {
          postTypeLabel: getPostTypeLabel2(),
          isAttachment: getCurrentPostType2() === ATTACHMENT_POST_TYPE && window?.__experimentalMediaEditor,
          isRevisionsMode: _isRevisionsMode()
        };
      },
      []
    );
    let documentLabel;
    if (isRevisionsMode2) {
      documentLabel = (0, import_i18n261.__)("Revision");
    } else if (postTypeLabel) {
      documentLabel = (0, import_html_entities30.decodeEntities)(postTypeLabel);
    } else {
      documentLabel = (0, import_i18n261._x)("Document", "noun, panel");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime408.jsxs)(Tabs4.TabList, { ref, children: [
      /* @__PURE__ */ (0, import_jsx_runtime408.jsx)(
        Tabs4.Tab,
        {
          tabId: sidebars.document,
          "data-tab-id": sidebars.document,
          children: documentLabel
        }
      ),
      !isAttachment && /* @__PURE__ */ (0, import_jsx_runtime408.jsx)(
        Tabs4.Tab,
        {
          tabId: sidebars.block,
          "data-tab-id": sidebars.block,
          children: (0, import_i18n261.__)("Block")
        }
      )
    ] });
  };
  var header_default3 = (0, import_element221.forwardRef)(SidebarHeader);

  // packages/editor/build-module/components/template-content-panel/index.mjs
  var import_data232 = __toESM(require_data(), 1);
  var import_block_editor89 = __toESM(require_block_editor(), 1);
  var import_components242 = __toESM(require_components(), 1);
  var import_i18n262 = __toESM(require_i18n(), 1);
  var import_jsx_runtime409 = __toESM(require_jsx_runtime(), 1);
  var { BlockQuickNavigation } = unlock(import_block_editor89.privateApis);
  var TEMPLATE_PART_BLOCK = "core/template-part";
  function TemplateContentPanelInner({ postType: postType2 }) {
    const postContentBlockTypes = usePostContentBlockTypes();
    const clientIds = (0, import_data232.useSelect)(
      (select6) => {
        const { getPostBlocksByName: getPostBlocksByName2 } = unlock(select6(store));
        return getPostBlocksByName2(
          TEMPLATE_POST_TYPE === postType2 ? TEMPLATE_PART_BLOCK : postContentBlockTypes
        );
      },
      [postType2, postContentBlockTypes]
    );
    const { enableComplementaryArea: enableComplementaryArea2 } = (0, import_data232.useDispatch)(store2);
    if (clientIds.length === 0) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime409.jsx)(import_components242.PanelBody, { title: (0, import_i18n262.__)("Content"), children: /* @__PURE__ */ (0, import_jsx_runtime409.jsx)(
      BlockQuickNavigation,
      {
        clientIds,
        onSelect: () => {
          enableComplementaryArea2("core", "edit-post/document");
        }
      }
    ) });
  }
  function TemplateContentPanel() {
    const { postType: postType2, renderingMode: renderingMode2 } = (0, import_data232.useSelect)((select6) => {
      const { getCurrentPostType: getCurrentPostType2, getRenderingMode: getRenderingMode2 } = unlock(
        select6(store)
      );
      return {
        postType: getCurrentPostType2(),
        renderingMode: getRenderingMode2()
      };
    }, []);
    if (renderingMode2 === "post-only" && postType2 !== TEMPLATE_POST_TYPE) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime409.jsx)(TemplateContentPanelInner, { postType: postType2 });
  }

  // packages/editor/build-module/components/template-part-content-panel/index.mjs
  var import_data233 = __toESM(require_data(), 1);
  var import_element222 = __toESM(require_element(), 1);
  var import_blocks37 = __toESM(require_blocks(), 1);
  var import_block_editor90 = __toESM(require_block_editor(), 1);
  var import_components243 = __toESM(require_components(), 1);
  var import_i18n263 = __toESM(require_i18n(), 1);
  var import_jsx_runtime410 = __toESM(require_jsx_runtime(), 1);
  var { BlockQuickNavigation: BlockQuickNavigation2 } = unlock(import_block_editor90.privateApis);
  function TemplatePartContentPanelInner() {
    const blockTypes = (0, import_data233.useSelect)((select6) => {
      const { getBlockTypes: getBlockTypes6 } = select6(import_blocks37.store);
      return getBlockTypes6();
    }, []);
    const themeBlockNames = (0, import_element222.useMemo)(() => {
      return blockTypes.filter((blockType) => {
        return blockType.category === "theme";
      }).map(({ name: name2 }) => name2);
    }, [blockTypes]);
    const themeBlocks = (0, import_data233.useSelect)(
      (select6) => {
        const { getBlocksByName } = select6(import_block_editor90.store);
        return getBlocksByName(themeBlockNames);
      },
      [themeBlockNames]
    );
    if (themeBlocks.length === 0) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(import_components243.PanelBody, { title: (0, import_i18n263.__)("Content"), children: /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(BlockQuickNavigation2, { clientIds: themeBlocks }) });
  }
  function TemplatePartContentPanel() {
    const postType2 = (0, import_data233.useSelect)((select6) => {
      const { getCurrentPostType: getCurrentPostType2 } = select6(store);
      return getCurrentPostType2();
    }, []);
    if (postType2 !== TEMPLATE_PART_POST_TYPE) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(TemplatePartContentPanelInner, {});
  }

  // packages/editor/build-module/components/revision-block-diff/index.mjs
  var import_block_editor91 = __toESM(require_block_editor(), 1);
  var import_data234 = __toESM(require_data(), 1);
  var import_i18n264 = __toESM(require_i18n(), 1);
  var import_jsx_runtime411 = __toESM(require_jsx_runtime(), 1);
  function RevisionBlockDiffPanel() {
    const { block } = (0, import_data234.useSelect)((select6) => {
      const { getSelectedBlock: getSelectedBlock2 } = select6(import_block_editor91.store);
      return {
        block: getSelectedBlock2()
      };
    }, []);
    if (!block) {
      return null;
    }
    const changedAttributes = block.attributes?.__revisionDiffStatus?.changedAttributes;
    return /* @__PURE__ */ (0, import_jsx_runtime411.jsx)(
      RevisionDiffPanel,
      {
        title: (0, import_i18n264.__)("Changed attributes"),
        entries: changedAttributes,
        initialOpen: true
      }
    );
  }

  // packages/editor/build-module/components/provider/use-auto-switch-editor-sidebars.mjs
  var import_data235 = __toESM(require_data(), 1);
  var import_element223 = __toESM(require_element(), 1);
  var import_block_editor92 = __toESM(require_block_editor(), 1);
  var import_preferences25 = __toESM(require_preferences(), 1);
  function useAutoSwitchEditorSidebars() {
    const { hasBlockSelection } = (0, import_data235.useSelect)((select6) => {
      return {
        hasBlockSelection: !!select6(import_block_editor92.store).getBlockSelectionStart()
      };
    }, []);
    const { getActiveComplementaryArea: getActiveComplementaryArea2 } = (0, import_data235.useSelect)(store2);
    const { enableComplementaryArea: enableComplementaryArea2 } = (0, import_data235.useDispatch)(store2);
    const { get: getPreference } = (0, import_data235.useSelect)(import_preferences25.store);
    (0, import_element223.useEffect)(() => {
      const activeGeneralSidebar = getActiveComplementaryArea2("core");
      const isEditorSidebarOpened = [
        "edit-post/document",
        "edit-post/block"
      ].includes(activeGeneralSidebar);
      const isDistractionFree = getPreference("core", "distractionFree");
      if (!isEditorSidebarOpened || isDistractionFree) {
        return;
      }
      if (hasBlockSelection) {
        enableComplementaryArea2("core", "edit-post/block");
      } else {
        enableComplementaryArea2("core", "edit-post/document");
      }
    }, [
      hasBlockSelection,
      getActiveComplementaryArea2,
      enableComplementaryArea2,
      getPreference
    ]);
  }
  var use_auto_switch_editor_sidebars_default = useAutoSwitchEditorSidebars;

  // packages/editor/build-module/components/sidebar/index.mjs
  var import_jsx_runtime412 = __toESM(require_jsx_runtime(), 1);
  var { Tabs: Tabs5 } = unlock(import_components244.privateApis);
  var SIDEBAR_ACTIVE_BY_DEFAULT = import_element224.Platform.select({
    web: true,
    native: false
  });
  var SidebarContent = ({
    tabName,
    keyboardShortcut,
    onActionPerformed,
    extraPanels,
    postType: postType2
  }) => {
    const tabListRef = (0, import_element224.useRef)(null);
    const tabsContextValue = (0, import_element224.useContext)(Tabs5.Context);
    const isAttachment = postType2 === ATTACHMENT_POST_TYPE;
    const isRevisionsMode2 = (0, import_data236.useSelect)((select6) => {
      return unlock(select6(store)).isRevisionsMode();
    });
    (0, import_element224.useEffect)(() => {
      const tabsElements = Array.from(
        tabListRef.current?.querySelectorAll('[role="tab"]') || []
      );
      const selectedTabElement = tabsElements.find(
        // We are purposefully using a custom `data-tab-id` attribute here
        // because we don't want rely on any assumptions about `Tabs`
        // component internals.
        (element) => element.getAttribute("data-tab-id") === tabName
      );
      const activeElement = selectedTabElement?.ownerDocument.activeElement;
      const tabsHasFocus = tabsElements.some((element) => {
        return activeElement && activeElement.id === element.id;
      });
      if (tabsHasFocus && selectedTabElement && selectedTabElement.id !== activeElement?.id) {
        selectedTabElement?.focus();
      }
    }, [tabName]);
    return /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(
      PluginSidebar,
      {
        identifier: tabName,
        header: /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(Tabs5.Context.Provider, { value: tabsContextValue, children: /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(header_default3, { ref: tabListRef }) }),
        closeLabel: (0, import_i18n265.__)("Close Settings"),
        className: "editor-sidebar__panel",
        headerClassName: "editor-sidebar__panel-tabs",
        title: (
          /* translators: button label text should, if possible, be under 16 characters. */
          (0, import_i18n265._x)("Settings", "panel button label")
        ),
        toggleShortcut: keyboardShortcut,
        icon: (0, import_i18n265.isRTL)() ? drawer_left_default : drawer_right_default,
        isActiveByDefault: SIDEBAR_ACTIVE_BY_DEFAULT,
        children: /* @__PURE__ */ (0, import_jsx_runtime412.jsxs)(Tabs5.Context.Provider, { value: tabsContextValue, children: [
          /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(Tabs5.TabPanel, { tabId: sidebars.document, focusable: false, children: isAttachment ? /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(
            MediaMetadataPanel,
            {
              onActionPerformed
            }
          ) : /* @__PURE__ */ (0, import_jsx_runtime412.jsxs)(import_jsx_runtime412.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(
              PostSummary,
              {
                onActionPerformed
              }
            ),
            isRevisionsMode2 && /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(RevisionFieldsDiffPanel, {}),
            !isRevisionsMode2 && /* @__PURE__ */ (0, import_jsx_runtime412.jsxs)(import_jsx_runtime412.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(plugin_document_setting_panel_default.Slot, {}),
              /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(TemplateContentPanel, {}),
              /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(TemplatePartContentPanel, {}),
              /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(PostTransformPanel, {}),
              /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(PostTaxonomies2, {}),
              /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(PatternOverridesPanel, {}),
              extraPanels
            ] })
          ] }) }),
          !isAttachment && /* @__PURE__ */ (0, import_jsx_runtime412.jsxs)(Tabs5.TabPanel, { tabId: sidebars.block, focusable: false, children: [
            /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(import_block_editor93.BlockInspector, {}),
            isRevisionsMode2 && /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(RevisionBlockDiffPanel, {})
          ] })
        ] })
      }
    );
  };
  var Sidebar = ({ extraPanels, onActionPerformed }) => {
    use_auto_switch_editor_sidebars_default();
    const { tabName, keyboardShortcut, showSummary, postType: postType2 } = (0, import_data236.useSelect)(
      (select6) => {
        const shortcut = select6(
          import_keyboard_shortcuts10.store
        ).getShortcutRepresentation("core/editor/toggle-sidebar");
        const sidebar = select6(store2).getActiveComplementaryArea("core");
        const _isEditorSidebarOpened = [
          sidebars.block,
          sidebars.document
        ].includes(sidebar);
        let _tabName = sidebar;
        if (!_isEditorSidebarOpened) {
          _tabName = !!select6(
            import_block_editor93.store
          ).getBlockSelectionStart() ? sidebars.block : sidebars.document;
        }
        const _postType = select6(store).getCurrentPostType();
        return {
          tabName: _tabName,
          keyboardShortcut: shortcut,
          showSummary: ![
            TEMPLATE_POST_TYPE,
            TEMPLATE_PART_POST_TYPE,
            NAVIGATION_POST_TYPE
          ].includes(_postType),
          postType: _postType
        };
      },
      []
    );
    const { enableComplementaryArea: enableComplementaryArea2 } = (0, import_data236.useDispatch)(store2);
    const onTabSelect = (0, import_element224.useCallback)(
      (newSelectedTabId) => {
        if (!!newSelectedTabId) {
          enableComplementaryArea2("core", newSelectedTabId);
        }
      },
      [enableComplementaryArea2]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(
      Tabs5,
      {
        selectedTabId: tabName,
        onSelect: onTabSelect,
        selectOnMove: false,
        children: /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(
          SidebarContent,
          {
            tabName,
            keyboardShortcut,
            showSummary,
            onActionPerformed,
            extraPanels,
            postType: postType2
          }
        )
      }
    );
  };
  var sidebar_default2 = Sidebar;

  // packages/editor/build-module/components/collab-sidebar/index.mjs
  var import_i18n273 = __toESM(require_i18n(), 1);
  var import_data242 = __toESM(require_data(), 1);
  var import_components251 = __toESM(require_components(), 1);
  var import_element229 = __toESM(require_element(), 1);
  var import_compose68 = __toESM(require_compose(), 1);
  var import_keyboard_shortcuts12 = __toESM(require_keyboard_shortcuts(), 1);
  var import_block_editor100 = __toESM(require_block_editor(), 1);
  var import_preferences26 = __toESM(require_preferences(), 1);

  // packages/editor/build-module/components/collab-sidebar/constants.mjs
  var ALL_NOTES_SIDEBAR = "edit-post/collab-history-sidebar";
  var FLOATING_NOTES_SIDEBAR = "edit-post/collab-sidebar";
  var SIDEBARS = [ALL_NOTES_SIDEBAR, FLOATING_NOTES_SIDEBAR];

  // packages/editor/build-module/components/collab-sidebar/comments.mjs
  var import_element227 = __toESM(require_element(), 1);
  var import_components248 = __toESM(require_components(), 1);
  var import_compose67 = __toESM(require_compose(), 1);
  var import_i18n270 = __toESM(require_i18n(), 1);
  var import_data240 = __toESM(require_data(), 1);
  var import_dom8 = __toESM(require_dom(), 1);
  var import_block_editor97 = __toESM(require_block_editor(), 1);

  // packages/editor/build-module/components/collab-sidebar/comment-author-info.mjs
  var import_components245 = __toESM(require_components(), 1);
  var import_i18n266 = __toESM(require_i18n(), 1);
  var import_date20 = __toESM(require_date(), 1);
  var import_core_data132 = __toESM(require_core_data(), 1);
  var import_data237 = __toESM(require_data(), 1);
  var import_block_editor94 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime413 = __toESM(require_jsx_runtime(), 1);
  function CommentAuthorInfo({ avatar, name: name2, date, userId }) {
    const hasAvatar = !!avatar;
    const dateSettings = (0, import_date20.getSettings)();
    const {
      currentUserAvatar,
      currentUserName,
      currentUserId,
      dateFormat = dateSettings.formats.date
    } = (0, import_data237.useSelect)(
      (select6) => {
        const { canUser, getCurrentUser, getEntityRecord } = select6(import_core_data132.store);
        const siteSettings = canUser("read", {
          kind: "root",
          name: "site"
        }) ? getEntityRecord("root", "site") : void 0;
        if (hasAvatar) {
          return {
            dateFormat: siteSettings?.date_format
          };
        }
        const { getSettings: getSettings10 } = select6(import_block_editor94.store);
        const { __experimentalDiscussionSettings } = getSettings10();
        const defaultAvatar = __experimentalDiscussionSettings?.avatarURL;
        const userData = getCurrentUser();
        return {
          currentUserAvatar: userData?.avatar_urls?.[48] ?? defaultAvatar,
          currentUserName: userData?.name,
          currentUserId: userData?.id,
          dateFormat: siteSettings?.date_format
        };
      },
      [hasAvatar]
    );
    const commentDate = (0, import_date20.getDate)(date);
    const commentDateTime = (0, import_date20.dateI18n)("c", commentDate);
    const shouldShowHumanTimeDiff = Math.floor((/* @__PURE__ */ new Date() - commentDate) / (1e3 * 60 * 60 * 24)) < 30;
    const commentDateText = shouldShowHumanTimeDiff ? (0, import_date20.humanTimeDiff)(commentDate) : (0, import_date20.dateI18n)(dateFormat, commentDate);
    const tooltipText = (0, import_date20.dateI18n)(
      // translators: Use a non-breaking space between 'g:i' and 'a' if appropriate.
      (0, import_i18n266._x)("F j, Y g:i\xA0a", "Note date full date format"),
      date
    );
    return /* @__PURE__ */ (0, import_jsx_runtime413.jsxs)(import_jsx_runtime413.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(
        "img",
        {
          src: avatar || currentUserAvatar,
          className: "editor-collab-sidebar-panel__user-avatar",
          alt: (0, import_i18n266.__)("User avatar"),
          width: 32,
          height: 32,
          style: {
            borderColor: getAvatarBorderColor(
              userId ?? currentUserId
            )
          }
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime413.jsxs)(import_components245.__experimentalVStack, { spacing: "0", children: [
        /* @__PURE__ */ (0, import_jsx_runtime413.jsx)("span", { className: "editor-collab-sidebar-panel__user-name", children: name2 ?? currentUserName }),
        date && /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(import_components245.Tooltip, { text: tooltipText, children: /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(
          "time",
          {
            dateTime: commentDateTime,
            className: "editor-collab-sidebar-panel__user-time",
            children: commentDateText
          }
        ) })
      ] })
    ] });
  }
  var comment_author_info_default = CommentAuthorInfo;

  // packages/editor/build-module/components/collab-sidebar/comment-form.mjs
  var import_react_autosize_textarea2 = __toESM(require_lib(), 1);
  var import_element225 = __toESM(require_element(), 1);
  var import_components246 = __toESM(require_components(), 1);
  var import_i18n267 = __toESM(require_i18n(), 1);
  var import_compose66 = __toESM(require_compose(), 1);
  var import_keycodes17 = __toESM(require_keycodes(), 1);
  var import_jsx_runtime414 = __toESM(require_jsx_runtime(), 1);
  function CommentForm({
    onSubmit,
    onCancel,
    thread,
    submitButtonText,
    labelText,
    reflowComments = noop7
  }) {
    const [inputComment, setInputComment] = (0, import_element225.useState)(
      thread?.content?.raw ?? ""
    );
    const debouncedCommentUpdated = (0, import_compose66.useDebounce)(reflowComments, 100);
    const updateComment = (value) => {
      setInputComment(value);
    };
    const inputId = (0, import_compose66.useInstanceId)(CommentForm, "comment-input");
    const isDisabled = inputComment === thread?.content?.raw || !sanitizeCommentString(inputComment).length;
    return /* @__PURE__ */ (0, import_jsx_runtime414.jsxs)(
      import_components246.__experimentalVStack,
      {
        className: "editor-collab-sidebar-panel__comment-form",
        spacing: "4",
        as: "form",
        onSubmit: (event) => {
          event.preventDefault();
          onSubmit(inputComment);
          setInputComment("");
        },
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime414.jsx)(import_components246.VisuallyHidden, { as: "label", htmlFor: inputId, children: labelText ?? (0, import_i18n267.__)("Note") }),
          /* @__PURE__ */ (0, import_jsx_runtime414.jsx)(
            import_react_autosize_textarea2.default,
            {
              id: inputId,
              value: inputComment ?? "",
              onChange: (comment) => {
                updateComment(comment.target.value);
                debouncedCommentUpdated();
              },
              rows: 1,
              maxRows: 20,
              onKeyDown: (event) => {
                if (import_keycodes17.isKeyboardEvent.primary(event, "Enter") && !isDisabled) {
                  event.target.parentNode.requestSubmit();
                }
                if (event.key === "Escape") {
                  event.preventDefault();
                  onCancel(event);
                }
              }
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime414.jsxs)(import_components246.__experimentalHStack, { spacing: "2", justify: "flex-end", wrap: true, children: [
            /* @__PURE__ */ (0, import_jsx_runtime414.jsx)(import_components246.Button, { size: "compact", variant: "tertiary", onClick: onCancel, children: /* @__PURE__ */ (0, import_jsx_runtime414.jsx)(import_components246.__experimentalTruncate, { children: (0, import_i18n267.__)("Cancel") }) }),
            /* @__PURE__ */ (0, import_jsx_runtime414.jsx)(
              import_components246.Button,
              {
                size: "compact",
                accessibleWhenDisabled: true,
                variant: "primary",
                type: "submit",
                disabled: isDisabled,
                children: /* @__PURE__ */ (0, import_jsx_runtime414.jsx)(import_components246.__experimentalTruncate, { children: submitButtonText })
              }
            )
          ] })
        ]
      }
    );
  }
  var comment_form_default = CommentForm;

  // node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
  var React7 = __toESM(require_react(), 1);
  var import_react7 = __toESM(require_react(), 1);
  var ReactDOM = __toESM(require_react_dom(), 1);
  var index = typeof document !== "undefined" ? import_react7.useLayoutEffect : import_react7.useEffect;
  function deepEqual(a3, b3) {
    if (a3 === b3) {
      return true;
    }
    if (typeof a3 !== typeof b3) {
      return false;
    }
    if (typeof a3 === "function" && a3.toString() === b3.toString()) {
      return true;
    }
    let length;
    let i3;
    let keys;
    if (a3 && b3 && typeof a3 === "object") {
      if (Array.isArray(a3)) {
        length = a3.length;
        if (length !== b3.length) return false;
        for (i3 = length; i3-- !== 0; ) {
          if (!deepEqual(a3[i3], b3[i3])) {
            return false;
          }
        }
        return true;
      }
      keys = Object.keys(a3);
      length = keys.length;
      if (length !== Object.keys(b3).length) {
        return false;
      }
      for (i3 = length; i3-- !== 0; ) {
        if (!{}.hasOwnProperty.call(b3, keys[i3])) {
          return false;
        }
      }
      for (i3 = length; i3-- !== 0; ) {
        const key = keys[i3];
        if (key === "_owner" && a3.$$typeof) {
          continue;
        }
        if (!deepEqual(a3[key], b3[key])) {
          return false;
        }
      }
      return true;
    }
    return a3 !== a3 && b3 !== b3;
  }
  function getDPR(element) {
    if (typeof window === "undefined") {
      return 1;
    }
    const win = element.ownerDocument.defaultView || window;
    return win.devicePixelRatio || 1;
  }
  function roundByDPR(element, value) {
    const dpr = getDPR(element);
    return Math.round(value * dpr) / dpr;
  }
  function useLatestRef(value) {
    const ref = React7.useRef(value);
    index(() => {
      ref.current = value;
    });
    return ref;
  }
  function useFloating(options) {
    if (options === void 0) {
      options = {};
    }
    const {
      placement = "bottom",
      strategy = "absolute",
      middleware = [],
      platform: platform2,
      elements: {
        reference: externalReference,
        floating: externalFloating
      } = {},
      transform = true,
      whileElementsMounted,
      open
    } = options;
    const [data, setData] = React7.useState({
      x: 0,
      y: 0,
      strategy,
      placement,
      middlewareData: {},
      isPositioned: false
    });
    const [latestMiddleware, setLatestMiddleware] = React7.useState(middleware);
    if (!deepEqual(latestMiddleware, middleware)) {
      setLatestMiddleware(middleware);
    }
    const [_reference, _setReference] = React7.useState(null);
    const [_floating, _setFloating] = React7.useState(null);
    const setReference = React7.useCallback((node) => {
      if (node !== referenceRef.current) {
        referenceRef.current = node;
        _setReference(node);
      }
    }, []);
    const setFloating = React7.useCallback((node) => {
      if (node !== floatingRef.current) {
        floatingRef.current = node;
        _setFloating(node);
      }
    }, []);
    const referenceEl = externalReference || _reference;
    const floatingEl = externalFloating || _floating;
    const referenceRef = React7.useRef(null);
    const floatingRef = React7.useRef(null);
    const dataRef = React7.useRef(data);
    const hasWhileElementsMounted = whileElementsMounted != null;
    const whileElementsMountedRef = useLatestRef(whileElementsMounted);
    const platformRef = useLatestRef(platform2);
    const update4 = React7.useCallback(() => {
      if (!referenceRef.current || !floatingRef.current) {
        return;
      }
      const config2 = {
        placement,
        strategy,
        middleware: latestMiddleware
      };
      if (platformRef.current) {
        config2.platform = platformRef.current;
      }
      computePosition2(referenceRef.current, floatingRef.current, config2).then((data2) => {
        const fullData = {
          ...data2,
          isPositioned: true
        };
        if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
          dataRef.current = fullData;
          ReactDOM.flushSync(() => {
            setData(fullData);
          });
        }
      });
    }, [latestMiddleware, placement, strategy, platformRef]);
    index(() => {
      if (open === false && dataRef.current.isPositioned) {
        dataRef.current.isPositioned = false;
        setData((data2) => ({
          ...data2,
          isPositioned: false
        }));
      }
    }, [open]);
    const isMountedRef = React7.useRef(false);
    index(() => {
      isMountedRef.current = true;
      return () => {
        isMountedRef.current = false;
      };
    }, []);
    index(() => {
      if (referenceEl) referenceRef.current = referenceEl;
      if (floatingEl) floatingRef.current = floatingEl;
      if (referenceEl && floatingEl) {
        if (whileElementsMountedRef.current) {
          return whileElementsMountedRef.current(referenceEl, floatingEl, update4);
        }
        update4();
      }
    }, [referenceEl, floatingEl, update4, whileElementsMountedRef, hasWhileElementsMounted]);
    const refs = React7.useMemo(() => ({
      reference: referenceRef,
      floating: floatingRef,
      setReference,
      setFloating
    }), [setReference, setFloating]);
    const elements2 = React7.useMemo(() => ({
      reference: referenceEl,
      floating: floatingEl
    }), [referenceEl, floatingEl]);
    const floatingStyles = React7.useMemo(() => {
      const initialStyles = {
        position: strategy,
        left: 0,
        top: 0
      };
      if (!elements2.floating) {
        return initialStyles;
      }
      const x2 = roundByDPR(elements2.floating, data.x);
      const y3 = roundByDPR(elements2.floating, data.y);
      if (transform) {
        return {
          ...initialStyles,
          transform: "translate(" + x2 + "px, " + y3 + "px)",
          ...getDPR(elements2.floating) >= 1.5 && {
            willChange: "transform"
          }
        };
      }
      return {
        position: strategy,
        left: x2,
        top: y3
      };
    }, [strategy, transform, elements2.floating, data.x, data.y]);
    return React7.useMemo(() => ({
      ...data,
      update: update4,
      refs,
      elements: elements2,
      floatingStyles
    }), [data, update4, refs, elements2, floatingStyles]);
  }

  // packages/editor/build-module/components/collab-sidebar/hooks.mjs
  var import_i18n268 = __toESM(require_i18n(), 1);
  var import_element226 = __toESM(require_element(), 1);
  var import_core_data133 = __toESM(require_core_data(), 1);
  var import_data238 = __toESM(require_data(), 1);
  var import_block_editor95 = __toESM(require_block_editor(), 1);
  var import_notices32 = __toESM(require_notices(), 1);
  var import_html_entities31 = __toESM(require_html_entities(), 1);
  var { useBlockElement, cleanEmptyObject: cleanEmptyObject4 } = unlock(import_block_editor95.privateApis);
  function useBlockComments(postId2) {
    const [commentLastUpdated, reflowComments] = (0, import_element226.useReducer)(
      () => Date.now(),
      0
    );
    const queryArgs = {
      post: postId2,
      type: "note",
      status: "all",
      per_page: -1
    };
    const { records: threads } = (0, import_core_data133.useEntityRecords)(
      "root",
      "comment",
      queryArgs,
      { enabled: !!postId2 && typeof postId2 === "number" }
    );
    const { getBlockAttributes: getBlockAttributes2 } = (0, import_data238.useSelect)(import_block_editor95.store);
    const { clientIds } = (0, import_data238.useSelect)((select6) => {
      const { getClientIdsWithDescendants: getClientIdsWithDescendants2 } = select6(import_block_editor95.store);
      return {
        clientIds: getClientIdsWithDescendants2()
      };
    }, []);
    const { resultComments, unresolvedSortedThreads } = (0, import_element226.useMemo)(() => {
      if (!threads || threads.length === 0) {
        return { resultComments: [], unresolvedSortedThreads: [] };
      }
      const blocksWithComments = clientIds.reduce((results, clientId) => {
        const commentId = getBlockAttributes2(clientId)?.metadata?.noteId;
        if (commentId) {
          results[clientId] = commentId;
        }
        return results;
      }, {});
      const compare = {};
      const result = [];
      const commentIdToBlockClientId = Object.keys(
        blocksWithComments
      ).reduce((mapping, clientId) => {
        mapping[blocksWithComments[clientId]] = clientId;
        return mapping;
      }, {});
      threads.forEach((item) => {
        const itemBlock = commentIdToBlockClientId[item.id];
        compare[item.id] = {
          ...item,
          reply: [],
          blockClientId: item.parent === 0 ? itemBlock : null
        };
      });
      threads.forEach((item) => {
        if (item.parent === 0) {
          result.push(compare[item.id]);
        } else if (compare[item.parent]) {
          compare[item.parent].reply.push(compare[item.id]);
        }
      });
      if (0 === result?.length) {
        return { resultComments: [], unresolvedSortedThreads: [] };
      }
      const updatedResult = result.map((item) => ({
        ...item,
        reply: [...item.reply].reverse()
      }));
      const threadIdMap = new Map(
        updatedResult.map((thread) => [String(thread.id), thread])
      );
      const mappedIds = new Set(
        Object.values(blocksWithComments).map((id) => String(id))
      );
      const unresolvedSortedComments = Object.values(blocksWithComments).map((commentId) => threadIdMap.get(String(commentId))).filter(
        (thread) => thread !== void 0 && thread.status === "hold"
      );
      const resolvedSortedComments = Object.values(blocksWithComments).map((commentId) => threadIdMap.get(String(commentId))).filter(
        (thread) => thread !== void 0 && thread.status === "approved"
      );
      const orphanedComments = updatedResult.filter(
        (thread) => !mappedIds.has(String(thread.id))
      );
      const allSortedComments = [
        ...unresolvedSortedComments,
        ...resolvedSortedComments,
        ...orphanedComments
      ];
      return {
        resultComments: allSortedComments,
        unresolvedSortedThreads: unresolvedSortedComments
      };
    }, [clientIds, threads, getBlockAttributes2]);
    return {
      resultComments,
      unresolvedSortedThreads,
      reflowComments,
      commentLastUpdated
    };
  }
  function useBlockCommentsActions(reflowComments = noop7) {
    const { createNotice } = (0, import_data238.useDispatch)(import_notices32.store);
    const { saveEntityRecord, deleteEntityRecord } = (0, import_data238.useDispatch)(import_core_data133.store);
    const { getCurrentPostId: getCurrentPostId2 } = (0, import_data238.useSelect)(store);
    const { getBlockAttributes: getBlockAttributes2, getSelectedBlockClientId: getSelectedBlockClientId2 } = (0, import_data238.useSelect)(import_block_editor95.store);
    const { updateBlockAttributes: updateBlockAttributes2 } = (0, import_data238.useDispatch)(import_block_editor95.store);
    const onError = (error) => {
      const errorMessage = error.message && error.code !== "unknown_error" ? (0, import_html_entities31.decodeEntities)(error.message) : (0, import_i18n268.__)("An error occurred while performing an update.");
      createNotice("error", errorMessage, {
        type: "snackbar",
        isDismissible: true
      });
    };
    const onCreate = async ({ content, parent }) => {
      try {
        const savedRecord = await saveEntityRecord(
          "root",
          "comment",
          {
            post: getCurrentPostId2(),
            content,
            status: "hold",
            type: "note",
            parent: parent || 0
          },
          { throwOnError: true }
        );
        if (!parent && savedRecord?.id) {
          const clientId = getSelectedBlockClientId2();
          const metadata = getBlockAttributes2(clientId)?.metadata;
          updateBlockAttributes2(clientId, {
            metadata: {
              ...metadata,
              noteId: savedRecord.id
            }
          });
        }
        createNotice(
          "snackbar",
          parent ? (0, import_i18n268.__)("Reply added.") : (0, import_i18n268.__)("Note added."),
          {
            type: "snackbar",
            isDismissible: true
          }
        );
        setTimeout(reflowComments, 300);
        return savedRecord;
      } catch (error) {
        reflowComments();
        onError(error);
      }
    };
    const onEdit = async ({ id, content, status }) => {
      const messageType = status ? status : "updated";
      const messages = {
        approved: (0, import_i18n268.__)("Note marked as resolved."),
        hold: (0, import_i18n268.__)("Note reopened."),
        updated: (0, import_i18n268.__)("Note updated.")
      };
      try {
        if (status === "approved" || status === "hold") {
          await saveEntityRecord(
            "root",
            "comment",
            {
              id,
              status
            },
            {
              throwOnError: true
            }
          );
          const newCommentData = {
            post: getCurrentPostId2(),
            content: content || "",
            // Empty content for resolve, content for reopen.
            type: "note",
            status,
            parent: id,
            meta: {
              _wp_note_status: status === "approved" ? "resolved" : "reopen"
            }
          };
          await saveEntityRecord("root", "comment", newCommentData, {
            throwOnError: true
          });
        } else {
          const updateData = {
            id,
            content,
            status
          };
          await saveEntityRecord("root", "comment", updateData, {
            throwOnError: true
          });
        }
        createNotice(
          "snackbar",
          messages[messageType] ?? (0, import_i18n268.__)("Note updated."),
          {
            type: "snackbar",
            isDismissible: true
          }
        );
        reflowComments();
      } catch (error) {
        reflowComments();
        onError(error);
      }
    };
    const onDelete = async (comment) => {
      try {
        await deleteEntityRecord(
          "root",
          "comment",
          comment.id,
          void 0,
          {
            throwOnError: true
          }
        );
        if (!comment.parent) {
          const clientId = getSelectedBlockClientId2();
          const metadata = getBlockAttributes2(clientId)?.metadata;
          updateBlockAttributes2(clientId, {
            metadata: cleanEmptyObject4({
              ...metadata,
              noteId: void 0
            })
          });
        }
        createNotice("snackbar", (0, import_i18n268.__)("Note deleted."), {
          type: "snackbar",
          isDismissible: true
        });
        reflowComments();
      } catch (error) {
        reflowComments();
        onError(error);
      }
    };
    return { onCreate, onEdit, onDelete };
  }
  function useEnableFloatingSidebar(enabled = false) {
    const registry = (0, import_data238.useRegistry)();
    (0, import_element226.useEffect)(() => {
      if (!enabled) {
        return;
      }
      const { getActiveComplementaryArea: getActiveComplementaryArea2 } = registry.select(store2);
      const { disableComplementaryArea: disableComplementaryArea2, enableComplementaryArea: enableComplementaryArea2 } = registry.dispatch(store2);
      const unsubscribe = registry.subscribe(() => {
        if (getActiveComplementaryArea2("core") === null) {
          enableComplementaryArea2("core", FLOATING_NOTES_SIDEBAR);
        }
      });
      return () => {
        unsubscribe();
        if (getActiveComplementaryArea2("core") === FLOATING_NOTES_SIDEBAR) {
          disableComplementaryArea2("core", FLOATING_NOTES_SIDEBAR);
        }
      };
    }, [enabled, registry]);
  }
  function useFloatingThread({
    thread,
    calculatedOffset,
    setHeights,
    selectedThread,
    setBlockRef,
    commentLastUpdated
  }) {
    const blockElement = useBlockElement(thread.blockClientId);
    const updateHeight = (0, import_element226.useCallback)(
      (id, newHeight) => {
        setHeights((prev) => {
          if (prev[id] !== newHeight) {
            return { ...prev, [id]: newHeight };
          }
          return prev;
        });
      },
      [setHeights]
    );
    const { y: y3, refs } = useFloating({
      placement: "right-start",
      middleware: [
        offset2({
          crossAxis: calculatedOffset || -16
        })
      ],
      whileElementsMounted: autoUpdate
    });
    (0, import_element226.useEffect)(() => {
      if (blockElement) {
        refs.setReference(blockElement);
      }
    }, [blockElement, refs, commentLastUpdated]);
    (0, import_element226.useEffect)(() => {
      if (refs.floating?.current) {
        setBlockRef(thread.id, blockElement);
      }
    }, [blockElement, thread.id, refs.floating, setBlockRef]);
    (0, import_element226.useEffect)(() => {
      if (refs.floating?.current) {
        const newHeight = refs.floating.current.scrollHeight;
        updateHeight(thread.id, newHeight);
      }
    }, [
      thread.id,
      updateHeight,
      refs.floating,
      selectedThread,
      commentLastUpdated
    ]);
    return {
      y: y3,
      refs
    };
  }

  // packages/editor/build-module/components/collab-sidebar/add-comment.mjs
  var import_i18n269 = __toESM(require_i18n(), 1);
  var import_data239 = __toESM(require_data(), 1);
  var import_components247 = __toESM(require_components(), 1);
  var import_block_editor96 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime415 = __toESM(require_jsx_runtime(), 1);
  var { useBlockElement: useBlockElement2 } = unlock(import_block_editor96.privateApis);
  function AddComment({
    onSubmit,
    commentSidebarRef,
    reflowComments = noop7,
    isFloating = false,
    y: y3,
    refs
  }) {
    const { clientId } = (0, import_data239.useSelect)((select6) => {
      const { getSelectedBlockClientId: getSelectedBlockClientId2 } = select6(import_block_editor96.store);
      return {
        clientId: getSelectedBlockClientId2()
      };
    }, []);
    const selectedNote2 = (0, import_data239.useSelect)(
      (select6) => unlock(select6(store)).getSelectedNote(),
      []
    );
    const blockElement = useBlockElement2(clientId);
    const { toggleBlockSpotlight } = unlock((0, import_data239.useDispatch)(import_block_editor96.store));
    const { selectNote: selectNote2 } = unlock((0, import_data239.useDispatch)(store));
    const unselectThread = () => {
      selectNote2(void 0);
      blockElement?.focus();
      toggleBlockSpotlight(clientId, false);
    };
    if (selectedNote2 !== "new" || !clientId) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime415.jsxs)(
      import_components247.__experimentalVStack,
      {
        className: clsx_default(
          "editor-collab-sidebar-panel__thread is-selected",
          {
            "is-floating": isFloating
          }
        ),
        spacing: "3",
        tabIndex: 0,
        "aria-label": (0, import_i18n269.__)("New note"),
        role: "treeitem",
        ref: isFloating ? refs.setFloating : void 0,
        style: isFloating ? (
          // Delay showing the floating note box until a Y position is known to prevent blink.
          { top: y3, opacity: !y3 ? 0 : void 0 }
        ) : void 0,
        onBlur: (event) => {
          if (event.currentTarget.contains(event.relatedTarget)) {
            return;
          }
          toggleBlockSpotlight(clientId, false);
          selectNote2(void 0);
        },
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime415.jsx)(import_components247.__experimentalHStack, { alignment: "left", spacing: "3", children: /* @__PURE__ */ (0, import_jsx_runtime415.jsx)(comment_author_info_default, {}) }),
          /* @__PURE__ */ (0, import_jsx_runtime415.jsx)(
            comment_form_default,
            {
              onSubmit: async (inputComment) => {
                const { id } = await onSubmit({ content: inputComment });
                selectNote2(id);
                focusCommentThread(id, commentSidebarRef.current);
              },
              onCancel: unselectThread,
              reflowComments,
              submitButtonText: (0, import_i18n269.__)("Add note"),
              labelText: (0, import_i18n269.__)("New note")
            }
          )
        ]
      }
    );
  }

  // packages/editor/build-module/components/collab-sidebar/comments.mjs
  var import_jsx_runtime416 = __toESM(require_jsx_runtime(), 1);
  var { useBlockElement: useBlockElement3 } = unlock(import_block_editor97.privateApis);
  var { Menu: Menu6 } = unlock(import_components248.privateApis);
  function Comments({
    threads: noteThreads,
    onEditComment,
    onAddReply,
    onCommentDelete,
    commentSidebarRef,
    reflowComments,
    isFloating = false,
    commentLastUpdated
  }) {
    const [heights, setHeights] = (0, import_element227.useState)({});
    const [boardOffsets, setBoardOffsets] = (0, import_element227.useState)({});
    const [blockRefs, setBlockRefs] = (0, import_element227.useState)({});
    const { setCanvasMinHeight: setCanvasMinHeight2, selectNote: selectNote2 } = unlock(
      (0, import_data240.useDispatch)(store)
    );
    const { selectBlock: selectBlock2, toggleBlockSpotlight } = unlock(
      (0, import_data240.useDispatch)(import_block_editor97.store)
    );
    const { blockCommentId, selectedBlockClientId, orderedBlockIds } = (0, import_data240.useSelect)((select6) => {
      const {
        getBlockAttributes: getBlockAttributes2,
        getSelectedBlockClientId: getSelectedBlockClientId2,
        getClientIdsWithDescendants: getClientIdsWithDescendants2
      } = select6(import_block_editor97.store);
      const clientId = getSelectedBlockClientId2();
      return {
        blockCommentId: clientId ? getBlockAttributes2(clientId)?.metadata?.noteId : null,
        selectedBlockClientId: clientId,
        orderedBlockIds: getClientIdsWithDescendants2()
      };
    }, []);
    const { selectedNote: selectedNote2, noteFocused } = (0, import_data240.useSelect)((select6) => {
      const { getSelectedNote: getSelectedNote2, isNoteFocused: isNoteFocused2 } = unlock(
        select6(store)
      );
      return {
        selectedNote: getSelectedNote2(),
        noteFocused: isNoteFocused2()
      };
    }, []);
    const relatedBlockElement = useBlockElement3(selectedBlockClientId);
    const threads = (0, import_element227.useMemo)(() => {
      const t4 = [...noteThreads];
      const orderedThreads = [];
      if (isFloating && selectedNote2 === "new") {
        const newNoteThread = {
          id: "new",
          blockClientId: selectedBlockClientId,
          content: { rendered: "" }
        };
        orderedBlockIds.forEach((blockId) => {
          if (blockId === selectedBlockClientId) {
            orderedThreads.push(newNoteThread);
          } else {
            const threadForBlock = t4.find(
              (thread) => thread.blockClientId === blockId
            );
            if (threadForBlock) {
              orderedThreads.push(threadForBlock);
            }
          }
        });
        return orderedThreads;
      }
      return t4;
    }, [
      noteThreads,
      isFloating,
      selectedNote2,
      selectedBlockClientId,
      orderedBlockIds
    ]);
    const handleDelete = async (comment) => {
      const currentIndex = threads.findIndex((t4) => t4.id === comment.id);
      const nextThread = threads[currentIndex + 1];
      const prevThread = threads[currentIndex - 1];
      await onCommentDelete(comment);
      if (comment.parent !== 0) {
        selectNote2(comment.parent);
        focusCommentThread(comment.parent, commentSidebarRef.current);
        return;
      }
      if (nextThread) {
        selectNote2(nextThread.id);
        focusCommentThread(nextThread.id, commentSidebarRef.current);
      } else if (prevThread) {
        selectNote2(prevThread.id);
        focusCommentThread(prevThread.id, commentSidebarRef.current);
      } else {
        selectNote2(void 0);
        toggleBlockSpotlight(comment.blockClientId, false);
        relatedBlockElement?.focus();
      }
    };
    (0, import_element227.useEffect)(() => {
      selectNote2(blockCommentId ?? void 0);
    }, [blockCommentId, selectNote2]);
    (0, import_element227.useEffect)(() => {
      if (noteFocused && selectedNote2) {
        focusCommentThread(
          selectedNote2,
          commentSidebarRef.current,
          selectedNote2 === "new" ? "textarea" : void 0
        );
        selectNote2(selectedNote2);
      }
    }, [noteFocused, selectedNote2, selectNote2, commentSidebarRef]);
    (0, import_element227.useEffect)(() => {
      const calculateAllOffsets = () => {
        const offsets = {};
        if (!isFloating) {
          return { offsets, minHeight: 0 };
        }
        const selectedThreadIndex = threads.findIndex(
          (t4) => t4.id === selectedNote2
        );
        const breakIndex = selectedThreadIndex === -1 ? 0 : selectedThreadIndex;
        const selectedThreadData = threads[breakIndex];
        if (!selectedThreadData || !blockRefs[selectedThreadData.id]) {
          return { offsets, minHeight: 0 };
        }
        let blockElement = blockRefs[selectedThreadData.id];
        let blockRect = blockElement?.getBoundingClientRect();
        const selectedThreadTop = blockRect?.top || 0;
        const selectedThreadHeight = heights[selectedThreadData.id] || 0;
        offsets[selectedThreadData.id] = -16;
        let previousThreadData = {
          threadTop: selectedThreadTop - 16,
          threadHeight: selectedThreadHeight
        };
        for (let i3 = breakIndex + 1; i3 < threads.length; i3++) {
          const thread = threads[i3];
          if (!blockRefs[thread.id]) {
            continue;
          }
          blockElement = blockRefs[thread.id];
          blockRect = blockElement?.getBoundingClientRect();
          const threadTop = blockRect?.top || 0;
          const threadHeight = heights[thread.id] || 0;
          let additionalOffset = -16;
          const previousBottom = previousThreadData.threadTop + previousThreadData.threadHeight;
          if (threadTop < previousBottom + 16) {
            additionalOffset = previousBottom - threadTop + 20;
          }
          offsets[thread.id] = additionalOffset;
          previousThreadData = {
            threadTop: threadTop + additionalOffset,
            threadHeight
          };
        }
        let nextThreadData = {
          threadTop: selectedThreadTop - 16
        };
        for (let i3 = selectedThreadIndex - 1; i3 >= 0; i3--) {
          const thread = threads[i3];
          if (!blockRefs[thread.id]) {
            continue;
          }
          blockElement = blockRefs[thread.id];
          blockRect = blockElement?.getBoundingClientRect();
          const threadTop = blockRect?.top || 0;
          const threadHeight = heights[thread.id] || 0;
          let additionalOffset = -16;
          const threadBottom = threadTop + threadHeight;
          if (threadBottom > nextThreadData.threadTop) {
            additionalOffset = nextThreadData.threadTop - threadTop - threadHeight - 20;
          }
          offsets[thread.id] = additionalOffset;
          nextThreadData = {
            threadTop: threadTop + additionalOffset
          };
        }
        let editorMinHeight = 0;
        const lastThread = threads[threads.length - 1];
        if (blockRefs[lastThread.id]) {
          const lastBlockElement = blockRefs[lastThread.id];
          const lastBlockRect = lastBlockElement?.getBoundingClientRect();
          const lastThreadTop = lastBlockRect?.top || 0;
          const lastThreadHeight = heights[lastThread.id] || 0;
          const lastThreadOffset = offsets[lastThread.id] || 0;
          editorMinHeight = lastThreadTop + lastThreadHeight + lastThreadOffset + 32;
        }
        return { offsets, minHeight: editorMinHeight };
      };
      const { offsets: newOffsets, minHeight } = calculateAllOffsets();
      if (Object.keys(newOffsets).length > 0) {
        setBoardOffsets(newOffsets);
      }
      setCanvasMinHeight2(minHeight);
    }, [
      heights,
      blockRefs,
      isFloating,
      threads,
      selectedNote2,
      setCanvasMinHeight2
    ]);
    const handleThreadNavigation = (event, thread, isSelected) => {
      if (event.defaultPrevented) {
        return;
      }
      const currentIndex = threads.findIndex((t4) => t4.id === thread.id);
      if ((event.key === "Enter" || event.key === "ArrowRight") && event.currentTarget === event.target && !isSelected) {
        selectNote2(thread.id);
        if (!!thread.blockClientId) {
          selectBlock2(thread.blockClientId, null);
          toggleBlockSpotlight(thread.blockClientId, true);
        }
      } else if ((event.key === "Enter" || event.key === "ArrowLeft") && event.currentTarget === event.target && isSelected || event.key === "Escape") {
        selectNote2(void 0);
        if (thread.blockClientId) {
          toggleBlockSpotlight(thread.blockClientId, false);
        }
        focusCommentThread(thread.id, commentSidebarRef.current);
      } else if (event.key === "ArrowDown" && currentIndex < threads.length - 1 && event.currentTarget === event.target) {
        const nextThread = threads[currentIndex + 1];
        focusCommentThread(nextThread.id, commentSidebarRef.current);
      } else if (event.key === "ArrowUp" && currentIndex > 0 && event.currentTarget === event.target) {
        const prevThread = threads[currentIndex - 1];
        focusCommentThread(prevThread.id, commentSidebarRef.current);
      } else if (event.key === "Home" && event.currentTarget === event.target) {
        focusCommentThread(threads[0].id, commentSidebarRef.current);
      } else if (event.key === "End" && event.currentTarget === event.target) {
        focusCommentThread(
          threads[threads.length - 1].id,
          commentSidebarRef.current
        );
      }
    };
    const setBlockRef = (0, import_element227.useCallback)((id, blockRef) => {
      setBlockRefs((prev) => ({ ...prev, [id]: blockRef }));
    }, []);
    const hasThreads = Array.isArray(threads) && threads.length > 0;
    if (!hasThreads && !isFloating) {
      return /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
        AddComment,
        {
          onSubmit: onAddReply,
          commentSidebarRef
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime416.jsxs)(import_jsx_runtime416.Fragment, { children: [
      !isFloating && selectedNote2 === "new" && /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
        AddComment,
        {
          onSubmit: onAddReply,
          commentSidebarRef
        }
      ),
      threads.map((thread) => /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
        Thread,
        {
          thread,
          onAddReply,
          onCommentDelete: handleDelete,
          onEditComment,
          isSelected: selectedNote2 === thread.id,
          commentSidebarRef,
          reflowComments,
          isFloating,
          calculatedOffset: boardOffsets[thread.id] ?? 0,
          setHeights,
          setBlockRef,
          commentLastUpdated,
          onKeyDown: (event) => handleThreadNavigation(
            event,
            thread,
            selectedNote2 === thread.id
          )
        },
        thread.id
      ))
    ] });
  }
  function Thread({
    thread,
    onEditComment,
    onAddReply,
    onCommentDelete,
    isSelected,
    commentSidebarRef,
    reflowComments,
    isFloating,
    calculatedOffset,
    setHeights,
    setBlockRef,
    commentLastUpdated,
    onKeyDown
  }) {
    const { toggleBlockHighlight, selectBlock: selectBlock2, toggleBlockSpotlight } = unlock(
      (0, import_data240.useDispatch)(import_block_editor97.store)
    );
    const { selectNote: selectNote2 } = unlock((0, import_data240.useDispatch)(store));
    const selectedNote2 = (0, import_data240.useSelect)(
      (select6) => unlock(select6(store)).getSelectedNote(),
      []
    );
    const relatedBlockElement = useBlockElement3(thread.blockClientId);
    const debouncedToggleBlockHighlight = (0, import_compose67.useDebounce)(
      toggleBlockHighlight,
      50
    );
    const { y: y3, refs } = useFloatingThread({
      thread,
      calculatedOffset,
      setHeights,
      setBlockRef,
      selectedThread: selectedNote2,
      commentLastUpdated
    });
    const isKeyboardTabbingRef = (0, import_element227.useRef)(false);
    const onMouseEnter = () => {
      debouncedToggleBlockHighlight(thread.blockClientId, true);
    };
    const onMouseLeave = () => {
      debouncedToggleBlockHighlight(thread.blockClientId, false);
    };
    const onFocus = () => {
      toggleBlockHighlight(thread.blockClientId, true);
    };
    const onBlur = (event) => {
      const isNoteFocused2 = event.relatedTarget?.closest(
        ".editor-collab-sidebar-panel__thread"
      );
      const isDialogFocused = event.relatedTarget?.closest('[role="dialog"]');
      const isTabbing = isKeyboardTabbingRef.current;
      if (isNoteFocused2 && !isTabbing) {
        return;
      }
      if (isDialogFocused) {
        return;
      }
      if (isTabbing && event.currentTarget.contains(event.relatedTarget)) {
        return;
      }
      toggleBlockHighlight(thread.blockClientId, false);
      unselectThread();
    };
    const handleCommentSelect = () => {
      selectNote2(thread.id);
      toggleBlockSpotlight(thread.blockClientId, true);
      if (!!thread.blockClientId) {
        selectBlock2(thread.blockClientId, null);
      }
    };
    const unselectThread = () => {
      selectNote2(void 0);
      toggleBlockSpotlight(thread.blockClientId, false);
    };
    const allReplies = thread?.reply || [];
    const lastReply = allReplies.length > 0 ? allReplies[allReplies.length - 1] : void 0;
    const restReplies = allReplies.length > 0 ? allReplies.slice(0, -1) : [];
    const commentExcerpt = getCommentExcerpt(
      (0, import_dom8.__unstableStripHTML)(thread.content?.rendered),
      10
    );
    const ariaLabel = !!thread.blockClientId ? (0, import_i18n270.sprintf)(
      // translators: %s: note excerpt
      (0, import_i18n270.__)("Note: %s"),
      commentExcerpt
    ) : (0, import_i18n270.sprintf)(
      // translators: %s: note excerpt
      (0, import_i18n270.__)("Original block deleted. Note: %s"),
      commentExcerpt
    );
    if (isFloating && thread.id === "new") {
      return /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
        AddComment,
        {
          onSubmit: onAddReply,
          commentSidebarRef,
          reflowComments,
          isFloating,
          y: y3,
          refs
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime416.jsxs)(
      import_components248.__experimentalVStack,
      {
        className: clsx_default("editor-collab-sidebar-panel__thread", {
          "is-selected": isSelected,
          "is-floating": isFloating
        }),
        id: `comment-thread-${thread.id}`,
        spacing: "3",
        onClick: handleCommentSelect,
        onMouseEnter,
        onMouseLeave,
        onFocus,
        onBlur,
        onKeyUp: (event) => {
          if (event.key === "Tab") {
            isKeyboardTabbingRef.current = false;
          }
        },
        onKeyDown: (event) => {
          if (event.key === "Tab") {
            isKeyboardTabbingRef.current = true;
          } else {
            onKeyDown(event);
          }
        },
        tabIndex: 0,
        role: "treeitem",
        "aria-label": ariaLabel,
        "aria-expanded": isSelected,
        ref: isFloating ? refs.setFloating : void 0,
        style: isFloating ? { top: y3 } : void 0,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
            import_components248.Button,
            {
              className: "editor-collab-sidebar-panel__skip-to-comment",
              variant: "secondary",
              size: "compact",
              onClick: () => {
                focusCommentThread(
                  thread.id,
                  commentSidebarRef.current,
                  "textarea"
                );
              },
              children: (0, import_i18n270.__)("Add new reply")
            }
          ),
          !thread.blockClientId && /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(import_components248.__experimentalText, { as: "p", weight: 500, variant: "muted", children: (0, import_i18n270.__)("Original block deleted.") }),
          /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
            CommentBoard,
            {
              thread,
              isExpanded: isSelected,
              onEdit: (params = {}) => {
                onEditComment(params);
                if (params.status === "approved") {
                  unselectThread();
                  if (isFloating) {
                    relatedBlockElement?.focus();
                  } else {
                    focusCommentThread(
                      thread.id,
                      commentSidebarRef.current
                    );
                  }
                }
              },
              onDelete: onCommentDelete,
              reflowComments
            }
          ),
          isSelected && allReplies.map((reply) => /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
            CommentBoard,
            {
              thread: reply,
              parent: thread,
              isExpanded: isSelected,
              onEdit: onEditComment,
              onDelete: onCommentDelete,
              reflowComments
            },
            reply.id
          )),
          !isSelected && restReplies.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(import_components248.__experimentalHStack, { className: "editor-collab-sidebar-panel__more-reply-separator", children: /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
            import_components248.Button,
            {
              size: "compact",
              variant: "tertiary",
              className: "editor-collab-sidebar-panel__more-reply-button",
              onClick: () => {
                selectNote2(thread.id);
                focusCommentThread(
                  thread.id,
                  commentSidebarRef.current
                );
              },
              children: (0, import_i18n270.sprintf)(
                // translators: %s: number of replies.
                (0, import_i18n270._n)(
                  "%s more reply",
                  "%s more replies",
                  restReplies.length
                ),
                restReplies.length
              )
            }
          ) }),
          !isSelected && lastReply && /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
            CommentBoard,
            {
              thread: lastReply,
              parent: thread,
              isExpanded: isSelected,
              onEdit: onEditComment,
              onDelete: onCommentDelete,
              reflowComments
            }
          ),
          isSelected && /* @__PURE__ */ (0, import_jsx_runtime416.jsxs)(import_components248.__experimentalVStack, { spacing: "2", role: "treeitem", children: [
            /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(import_components248.__experimentalHStack, { alignment: "left", spacing: "3", justify: "flex-start", children: /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(comment_author_info_default, {}) }),
            /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(import_components248.__experimentalVStack, { spacing: "2", children: /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
              comment_form_default,
              {
                onSubmit: (inputComment) => {
                  if ("approved" === thread.status) {
                    onEditComment({
                      id: thread.id,
                      status: "hold",
                      content: inputComment
                    });
                  } else {
                    onAddReply({
                      content: inputComment,
                      parent: thread.id
                    });
                  }
                },
                onCancel: (event) => {
                  event.stopPropagation();
                  unselectThread();
                  focusCommentThread(
                    thread.id,
                    commentSidebarRef.current
                  );
                },
                submitButtonText: "approved" === thread.status ? (0, import_i18n270.__)("Reopen & Reply") : (0, import_i18n270.__)("Reply"),
                rows: "approved" === thread.status ? 2 : 4,
                labelText: (0, import_i18n270.sprintf)(
                  // translators: %1$s: note identifier, %2$s: author name
                  (0, import_i18n270.__)("Reply to note %1$s by %2$s"),
                  thread.id,
                  thread.author_name
                ),
                reflowComments
              }
            ) })
          ] }),
          !!thread.blockClientId && /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
            import_components248.Button,
            {
              className: "editor-collab-sidebar-panel__skip-to-block",
              variant: "secondary",
              size: "compact",
              onClick: (event) => {
                event.stopPropagation();
                relatedBlockElement?.focus();
              },
              children: (0, import_i18n270.__)("Back to block")
            }
          )
        ]
      }
    );
  }
  var CommentBoard = ({
    thread,
    parent,
    isExpanded,
    onEdit,
    onDelete,
    reflowComments
  }) => {
    const [actionState, setActionState] = (0, import_element227.useState)(false);
    const [showConfirmDialog, setShowConfirmDialog] = (0, import_element227.useState)(false);
    const actionButtonRef = (0, import_element227.useRef)(null);
    const handleConfirmDelete = () => {
      onDelete(thread);
      setActionState(false);
      setShowConfirmDialog(false);
    };
    const handleCancel = () => {
      setActionState(false);
      setShowConfirmDialog(false);
      actionButtonRef.current?.focus();
    };
    const isResolutionComment = thread.type === "note" && thread.meta && (thread.meta._wp_note_status === "resolved" || thread.meta._wp_note_status === "reopen");
    const actions2 = [
      {
        id: "edit",
        title: (0, import_i18n270.__)("Edit"),
        isEligible: ({ status }) => status !== "approved",
        onClick: () => {
          setActionState("edit");
        }
      },
      {
        id: "reopen",
        title: (0, import_i18n270._x)("Reopen", "Reopen note"),
        isEligible: ({ status }) => status === "approved",
        onClick: () => {
          onEdit({ id: thread.id, status: "hold" });
        }
      },
      {
        id: "delete",
        title: (0, import_i18n270.__)("Delete"),
        isEligible: () => true,
        onClick: () => {
          setActionState("delete");
          setShowConfirmDialog(true);
        }
      }
    ];
    const canResolve = thread.parent === 0;
    const moreActions = parent?.status !== "approved" ? actions2.filter((item) => item.isEligible(thread)) : [];
    const deleteConfirmMessage = (
      // When deleting a top level note, descendants will also be deleted.
      thread.parent === 0 ? (0, import_i18n270.__)(
        "Are you sure you want to delete this note? This will also delete all of this note's replies."
      ) : (0, import_i18n270.__)("Are you sure you want to delete this reply?")
    );
    return /* @__PURE__ */ (0, import_jsx_runtime416.jsxs)(
      import_components248.__experimentalVStack,
      {
        spacing: "2",
        role: thread.parent !== 0 ? "treeitem" : void 0,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime416.jsxs)(import_components248.__experimentalHStack, { alignment: "left", spacing: "3", justify: "flex-start", children: [
            /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
              comment_author_info_default,
              {
                avatar: thread?.author_avatar_urls?.[48],
                name: thread?.author_name,
                date: thread?.date,
                userId: thread?.author
              }
            ),
            isExpanded && /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
              import_components248.FlexItem,
              {
                className: "editor-collab-sidebar-panel__comment-status",
                onClick: (event) => {
                  event.stopPropagation();
                },
                children: /* @__PURE__ */ (0, import_jsx_runtime416.jsxs)(import_components248.__experimentalHStack, { spacing: "0", children: [
                  canResolve && /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
                    import_components248.Button,
                    {
                      label: (0, import_i18n270._x)(
                        "Resolve",
                        "Mark note as resolved"
                      ),
                      size: "small",
                      icon: published_default,
                      disabled: thread.status === "approved",
                      accessibleWhenDisabled: thread.status === "approved",
                      onClick: () => {
                        onEdit({
                          id: thread.id,
                          status: "approved"
                        });
                      }
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime416.jsxs)(Menu6, { placement: "bottom-end", children: [
                    /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
                      Menu6.TriggerButton,
                      {
                        render: /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
                          import_components248.Button,
                          {
                            ref: actionButtonRef,
                            size: "small",
                            icon: more_vertical_default,
                            label: (0, import_i18n270.__)("Actions"),
                            disabled: !moreActions.length,
                            accessibleWhenDisabled: true
                          }
                        )
                      }
                    ),
                    /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
                      Menu6.Popover,
                      {
                        modal: false,
                        children: moreActions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
                          Menu6.Item,
                          {
                            onClick: () => action.onClick(),
                            children: /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(Menu6.ItemLabel, { children: action.title })
                          },
                          action.id
                        ))
                      }
                    )
                  ] })
                ] })
              }
            )
          ] }),
          "edit" === actionState ? /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
            comment_form_default,
            {
              onSubmit: (value) => {
                onEdit({
                  id: thread.id,
                  content: value
                });
                setActionState(false);
                actionButtonRef.current?.focus();
              },
              onCancel: () => handleCancel(),
              thread,
              submitButtonText: (0, import_i18n270._x)("Update", "verb"),
              labelText: (0, import_i18n270.sprintf)(
                // translators: %1$s: note identifier, %2$s: author name.
                (0, import_i18n270.__)("Edit note %1$s by %2$s"),
                thread.id,
                thread.author_name
              ),
              reflowComments
            }
          ) : /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
            import_element227.RawHTML,
            {
              className: clsx_default(
                "editor-collab-sidebar-panel__user-comment",
                {
                  "editor-collab-sidebar-panel__resolution-text": isResolutionComment
                }
              ),
              children: isResolutionComment ? (() => {
                const actionText = thread.meta._wp_note_status === "resolved" ? (0, import_i18n270.__)("Marked as resolved") : (0, import_i18n270.__)("Reopened");
                const content = thread?.content?.raw;
                if (content && typeof content === "string" && content.trim() !== "") {
                  return (0, import_i18n270.sprintf)(
                    // translators: %1$s: action label ("Marked as resolved" or "Reopened"); %2$s: note text.
                    (0, import_i18n270.__)("%1$s: %2$s"),
                    actionText,
                    content
                  );
                }
                return actionText;
              })() : thread?.content?.rendered
            }
          ),
          "delete" === actionState && /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
            import_components248.__experimentalConfirmDialog,
            {
              isOpen: showConfirmDialog,
              onConfirm: handleConfirmDelete,
              onCancel: handleCancel,
              confirmButtonText: (0, import_i18n270.__)("Delete"),
              children: deleteConfirmMessage
            }
          )
        ]
      }
    );
  };

  // packages/editor/build-module/components/collab-sidebar/comment-menu-item.mjs
  var import_components249 = __toESM(require_components(), 1);
  var import_i18n271 = __toESM(require_i18n(), 1);
  var import_block_editor98 = __toESM(require_block_editor(), 1);
  var import_data241 = __toESM(require_data(), 1);
  var import_blocks38 = __toESM(require_blocks(), 1);
  var import_keyboard_shortcuts11 = __toESM(require_keyboard_shortcuts(), 1);
  var import_jsx_runtime417 = __toESM(require_jsx_runtime(), 1);
  var { CommentIconSlotFill } = unlock(import_block_editor98.privateApis);
  var AddCommentMenuItem = ({ clientId, onClick, isDistractionFree }) => {
    const block = (0, import_data241.useSelect)(
      (select6) => {
        return select6(import_block_editor98.store).getBlock(clientId);
      },
      [clientId]
    );
    const shortcut = (0, import_data241.useSelect)(
      (select6) => select6(import_keyboard_shortcuts11.store).getShortcutRepresentation(
        "core/editor/new-note"
      ),
      []
    );
    if (!block?.isValid || block?.name === (0, import_blocks38.getUnregisteredTypeHandlerName)()) {
      return null;
    }
    const isDisabled = isDistractionFree || block?.name === "core/freeform";
    let infoText;
    if (isDistractionFree) {
      infoText = (0, import_i18n271.__)("Notes are disabled in distraction free mode.");
    } else if (block?.name === "core/freeform") {
      infoText = (0, import_i18n271.__)("Convert to blocks to add notes.");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime417.jsx)(
      import_components249.MenuItem,
      {
        onClick,
        "aria-haspopup": "dialog",
        disabled: isDisabled,
        info: infoText,
        shortcut,
        children: (0, import_i18n271.__)("Add note")
      }
    );
  };
  var AddCommentMenuItemFill = ({ onClick, isDistractionFree }) => {
    return /* @__PURE__ */ (0, import_jsx_runtime417.jsx)(CommentIconSlotFill.Fill, { children: ({ clientId, onClose }) => /* @__PURE__ */ (0, import_jsx_runtime417.jsx)(
      AddCommentMenuItem,
      {
        clientId,
        isDistractionFree,
        onClick: () => {
          onClick(clientId);
          onClose();
        }
      }
    ) });
  };
  var comment_menu_item_default = AddCommentMenuItemFill;

  // packages/editor/build-module/components/collab-sidebar/comment-indicator-toolbar.mjs
  var import_components250 = __toESM(require_components(), 1);
  var import_i18n272 = __toESM(require_i18n(), 1);
  var import_element228 = __toESM(require_element(), 1);
  var import_block_editor99 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime418 = __toESM(require_jsx_runtime(), 1);
  var { CommentIconToolbarSlotFill } = unlock(import_block_editor99.privateApis);
  var CommentAvatarIndicator = ({ onClick, thread }) => {
    const threadParticipants = (0, import_element228.useMemo)(() => {
      if (!thread) {
        return [];
      }
      const participantsMap = /* @__PURE__ */ new Map();
      const allComments = [thread, ...thread.reply];
      allComments.sort((a3, b3) => new Date(a3.date) - new Date(b3.date));
      allComments.forEach((comment) => {
        if (comment.author_name && comment.author_avatar_urls) {
          if (!participantsMap.has(comment.author)) {
            participantsMap.set(comment.author, {
              name: comment.author_name,
              avatar: comment.author_avatar_urls?.["48"] || comment.author_avatar_urls?.["96"],
              id: comment.author,
              date: comment.date
            });
          }
        }
      });
      return Array.from(participantsMap.values());
    }, [thread]);
    if (!threadParticipants.length) {
      return null;
    }
    const maxAvatars = 3;
    const isOverflow = threadParticipants.length > maxAvatars;
    const visibleParticipants = isOverflow ? threadParticipants.slice(0, maxAvatars - 1) : threadParticipants;
    const overflowCount = Math.max(
      0,
      threadParticipants.length - visibleParticipants.length
    );
    const threadHasMoreParticipants = threadParticipants.length > 100;
    const overflowText = threadHasMoreParticipants && overflowCount > 0 ? (0, import_i18n272.__)("100+") : (0, import_i18n272.sprintf)(
      // translators: %s: Number of participants.
      (0, import_i18n272.__)("+%s"),
      overflowCount
    );
    return /* @__PURE__ */ (0, import_jsx_runtime418.jsx)(CommentIconToolbarSlotFill.Fill, { children: /* @__PURE__ */ (0, import_jsx_runtime418.jsx)(
      import_components250.ToolbarButton,
      {
        className: "comment-avatar-indicator",
        label: (0, import_i18n272.__)("View notes"),
        onClick: () => onClick(),
        showTooltip: true,
        children: /* @__PURE__ */ (0, import_jsx_runtime418.jsxs)(import_components250.__experimentalHStack, { spacing: "1", children: [
          visibleParticipants.map((participant) => /* @__PURE__ */ (0, import_jsx_runtime418.jsx)(
            "img",
            {
              src: participant.avatar,
              alt: participant.name,
              className: "comment-avatar",
              style: {
                borderColor: getAvatarBorderColor(
                  participant.id
                )
              }
            },
            participant.id
          )),
          overflowCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime418.jsx)(import_components250.__experimentalText, { weight: 500, children: overflowText })
        ] })
      }
    ) });
  };
  var comment_indicator_toolbar_default = CommentAvatarIndicator;

  // packages/editor/build-module/components/collab-sidebar/index.mjs
  var import_jsx_runtime419 = __toESM(require_jsx_runtime(), 1);
  function NotesSidebarContent({
    styles,
    comments,
    commentSidebarRef,
    reflowComments,
    commentLastUpdated,
    isFloating = false
  }) {
    const { onCreate, onEdit, onDelete } = useBlockCommentsActions(reflowComments);
    return /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(
      import_components251.__experimentalVStack,
      {
        className: "editor-collab-sidebar-panel",
        style: styles,
        role: "tree",
        spacing: "3",
        justify: "flex-start",
        ref: (node) => {
          if (node) {
            commentSidebarRef.current = node;
          }
        },
        "aria-label": isFloating ? (0, import_i18n273.__)("Unresolved notes") : (0, import_i18n273.__)("All notes"),
        children: /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(
          Comments,
          {
            threads: comments,
            onEditComment: onEdit,
            onAddReply: onCreate,
            onCommentDelete: onDelete,
            commentSidebarRef,
            reflowComments,
            commentLastUpdated,
            isFloating
          }
        )
      }
    );
  }
  function NotesSidebar({ postId: postId2 }) {
    const { getActiveComplementaryArea: getActiveComplementaryArea2 } = (0, import_data242.useSelect)(store2);
    const { enableComplementaryArea: enableComplementaryArea2 } = (0, import_data242.useDispatch)(store2);
    const { toggleBlockSpotlight, selectBlock: selectBlock2 } = unlock(
      (0, import_data242.useDispatch)(import_block_editor100.store)
    );
    const { selectNote: selectNote2 } = unlock((0, import_data242.useDispatch)(store));
    const isLargeViewport = (0, import_compose68.useViewportMatch)("medium");
    const commentSidebarRef = (0, import_element229.useRef)(null);
    const { clientId, blockCommentId, isClassicBlock } = (0, import_data242.useSelect)(
      (select6) => {
        const {
          getBlockAttributes: getBlockAttributes2,
          getSelectedBlockClientId: getSelectedBlockClientId2,
          getBlockName: getBlockName2
        } = select6(import_block_editor100.store);
        const _clientId = getSelectedBlockClientId2();
        return {
          clientId: _clientId,
          blockCommentId: _clientId ? getBlockAttributes2(_clientId)?.metadata?.noteId : null,
          isClassicBlock: _clientId ? getBlockName2(_clientId) === "core/freeform" : false
        };
      },
      []
    );
    const { isDistractionFree } = (0, import_data242.useSelect)((select6) => {
      const { get } = select6(import_preferences26.store);
      return {
        isDistractionFree: get("core", "distractionFree")
      };
    }, []);
    const selectedNote2 = (0, import_data242.useSelect)(
      (select6) => unlock(select6(store)).getSelectedNote(),
      []
    );
    const {
      resultComments,
      unresolvedSortedThreads,
      reflowComments,
      commentLastUpdated
    } = useBlockComments(postId2);
    const showFloatingSidebar = isLargeViewport;
    const showAllNotesSidebar = resultComments.length > 0 || !showFloatingSidebar;
    useEnableFloatingSidebar(
      showFloatingSidebar && (unresolvedSortedThreads.length > 0 || selectedNote2 !== void 0)
    );
    (0, import_keyboard_shortcuts12.useShortcut)(
      "core/editor/new-note",
      (event) => {
        event.preventDefault();
        openTheSidebar();
      },
      {
        // When multiple notes per block are supported. Remove note ID check.
        // See: https://github.com/WordPress/gutenberg/pull/75147.
        isDisabled: isDistractionFree || isClassicBlock || !clientId || !!blockCommentId
      }
    );
    const { merged: GlobalStyles } = useGlobalStylesContext();
    const backgroundColor = GlobalStyles?.styles?.color?.background;
    const currentThread = blockCommentId ? resultComments.find((thread) => thread.id === blockCommentId) : null;
    async function openTheSidebar(selectedClientId) {
      const prevArea = await getActiveComplementaryArea2("core");
      const activeNotesArea = SIDEBARS.find((name2) => name2 === prevArea);
      const targetClientId = selectedClientId && selectedClientId !== clientId ? selectedClientId : clientId;
      const targetNote = resultComments.find(
        (note) => note.blockClientId === targetClientId
      );
      if (targetNote?.status === "approved") {
        enableComplementaryArea2("core", ALL_NOTES_SIDEBAR);
      } else if (!activeNotesArea || !showAllNotesSidebar) {
        enableComplementaryArea2(
          "core",
          showFloatingSidebar ? FLOATING_NOTES_SIDEBAR : ALL_NOTES_SIDEBAR
        );
      }
      const currentArea = await getActiveComplementaryArea2("core");
      if (!SIDEBARS.includes(currentArea)) {
        return;
      }
      selectBlock2(targetClientId, null);
      toggleBlockSpotlight(targetClientId, true);
      selectNote2(targetNote ? targetNote.id : "new", { focus: true });
    }
    if (isDistractionFree) {
      return /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(comment_menu_item_default, { isDistractionFree: true });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime419.jsxs)(import_jsx_runtime419.Fragment, { children: [
      !!currentThread && /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(
        comment_indicator_toolbar_default,
        {
          thread: currentThread,
          onClick: openTheSidebar
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(comment_menu_item_default, { onClick: openTheSidebar }),
      showAllNotesSidebar && /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(
        PluginSidebar,
        {
          identifier: ALL_NOTES_SIDEBAR,
          name: ALL_NOTES_SIDEBAR,
          title: (0, import_i18n273.__)("All notes"),
          header: /* @__PURE__ */ (0, import_jsx_runtime419.jsx)("h2", { className: "interface-complementary-area-header__title", children: (0, import_i18n273.__)("All notes") }),
          icon: comment_default,
          closeLabel: (0, import_i18n273.__)("Close Notes"),
          children: /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(
            NotesSidebarContent,
            {
              comments: resultComments,
              commentSidebarRef
            }
          )
        }
      ),
      isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(
        PluginSidebar,
        {
          isPinnable: false,
          header: false,
          identifier: FLOATING_NOTES_SIDEBAR,
          className: "editor-collab-sidebar",
          headerClassName: "editor-collab-sidebar__header",
          backgroundColor,
          children: /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(
            NotesSidebarContent,
            {
              comments: unresolvedSortedThreads,
              commentSidebarRef,
              reflowComments,
              commentLastUpdated,
              styles: {
                backgroundColor
              },
              isFloating: true
            }
          )
        }
      )
    ] });
  }
  function NotesSidebarContainer() {
    const { postId: postId2, editorMode, revisionsMode } = (0, import_data242.useSelect)((select6) => {
      const { getCurrentPostId: getCurrentPostId2, getEditorMode: getEditorMode2, isRevisionsMode: isRevisionsMode2 } = unlock(
        select6(store)
      );
      return {
        postId: getCurrentPostId2(),
        editorMode: getEditorMode2(),
        revisionsMode: isRevisionsMode2()
      };
    }, []);
    if (!postId2 || typeof postId2 !== "number") {
      return null;
    }
    if (editorMode === "text" || revisionsMode) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(post_type_support_check_default, { supportKeys: "editor.notes", children: /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(NotesSidebar, { postId: postId2 }) });
  }

  // packages/editor/build-module/components/global-styles-sidebar/index.mjs
  var import_components254 = __toESM(require_components(), 1);
  var import_i18n276 = __toESM(require_i18n(), 1);
  var import_data245 = __toESM(require_data(), 1);
  var import_element230 = __toESM(require_element(), 1);
  var import_preferences29 = __toESM(require_preferences(), 1);
  var import_compose69 = __toESM(require_compose(), 1);
  var import_core_data135 = __toESM(require_core_data(), 1);

  // packages/editor/build-module/components/global-styles/menu.mjs
  var import_components252 = __toESM(require_components(), 1);
  var import_data243 = __toESM(require_data(), 1);
  var import_i18n274 = __toESM(require_i18n(), 1);
  var import_preferences27 = __toESM(require_preferences(), 1);
  var import_core_data134 = __toESM(require_core_data(), 1);
  var import_jsx_runtime420 = __toESM(require_jsx_runtime(), 1);
  function GlobalStylesActionMenu({
    hideWelcomeGuide = false,
    onChangePath
  }) {
    const { user, setUser } = useGlobalStyles();
    const canReset = !!user && (Object.keys(user?.styles ?? {}).length > 0 || Object.keys(user?.settings ?? {}).length > 0);
    const onReset = () => {
      setUser({ styles: {}, settings: {} });
    };
    const { toggle } = (0, import_data243.useDispatch)(import_preferences27.store);
    const { canEditCSS } = (0, import_data243.useSelect)((select6) => {
      const { getEntityRecord, __experimentalGetCurrentGlobalStylesId } = select6(import_core_data134.store);
      const globalStylesId = __experimentalGetCurrentGlobalStylesId();
      const globalStyles = globalStylesId ? getEntityRecord("root", "globalStyles", globalStylesId) : void 0;
      return {
        canEditCSS: !!globalStyles?._links?.["wp:action-edit-css"]
      };
    }, []);
    const loadCustomCSS = () => {
      onChangePath("/css");
    };
    return /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
      import_components252.DropdownMenu,
      {
        icon: more_vertical_default,
        label: (0, import_i18n274.__)("More"),
        toggleProps: { size: "compact" },
        children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime420.jsxs)(import_jsx_runtime420.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime420.jsxs)(import_components252.MenuGroup, { children: [
            canEditCSS && /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(import_components252.MenuItem, { onClick: loadCustomCSS, children: (0, import_i18n274.__)("Additional CSS") }),
            !hideWelcomeGuide && /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
              import_components252.MenuItem,
              {
                onClick: () => {
                  toggle(
                    "core/edit-site",
                    "welcomeGuideStyles"
                  );
                  onClose();
                },
                children: (0, import_i18n274.__)("Welcome Guide")
              }
            )
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(import_components252.MenuGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
            import_components252.MenuItem,
            {
              onClick: () => {
                onReset();
                onClose();
              },
              disabled: !canReset,
              children: (0, import_i18n274.__)("Reset styles")
            }
          ) })
        ] })
      }
    );
  }

  // packages/editor/build-module/components/global-styles-sidebar/default-sidebar.mjs
  var import_jsx_runtime421 = __toESM(require_jsx_runtime(), 1);
  function DefaultSidebar({
    className,
    identifier,
    title,
    icon,
    children,
    closeLabel,
    header,
    headerClassName,
    panelClassName,
    isActiveByDefault
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime421.jsxs)(import_jsx_runtime421.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime421.jsx)(
        complementary_area_default,
        {
          className,
          scope: "core",
          identifier,
          title,
          icon,
          closeLabel,
          header,
          headerClassName,
          panelClassName,
          isActiveByDefault,
          children
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime421.jsx)(
        ComplementaryAreaMoreMenuItem,
        {
          scope: "core",
          identifier,
          icon,
          children: title
        }
      )
    ] });
  }

  // packages/editor/build-module/components/global-styles-sidebar/welcome-guide.mjs
  var import_data244 = __toESM(require_data(), 1);
  var import_components253 = __toESM(require_components(), 1);
  var import_i18n275 = __toESM(require_i18n(), 1);
  var import_preferences28 = __toESM(require_preferences(), 1);

  // packages/editor/build-module/components/global-styles-sidebar/welcome-guide-image.mjs
  var import_jsx_runtime422 = __toESM(require_jsx_runtime(), 1);
  function WelcomeGuideImage({ nonAnimatedSrc, animatedSrc }) {
    return /* @__PURE__ */ (0, import_jsx_runtime422.jsxs)("picture", { className: "editor-welcome-guide__image", children: [
      /* @__PURE__ */ (0, import_jsx_runtime422.jsx)(
        "source",
        {
          srcSet: nonAnimatedSrc,
          media: "(prefers-reduced-motion: reduce)"
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime422.jsx)("img", { src: animatedSrc, width: "312", height: "240", alt: "" })
    ] });
  }

  // packages/editor/build-module/components/global-styles-sidebar/welcome-guide.mjs
  var import_jsx_runtime423 = __toESM(require_jsx_runtime(), 1);
  function WelcomeGuideStyles() {
    const { toggle } = (0, import_data244.useDispatch)(import_preferences28.store);
    const { isActive, isStylesOpen } = (0, import_data244.useSelect)((select6) => {
      const sidebar = select6(store2).getActiveComplementaryArea("core");
      return {
        isActive: !!select6(import_preferences28.store).get(
          "core/edit-site",
          "welcomeGuideStyles"
        ),
        isStylesOpen: sidebar === "edit-site/global-styles"
      };
    }, []);
    if (!isActive || !isStylesOpen) {
      return null;
    }
    const welcomeLabel = (0, import_i18n275.__)("Welcome to Styles");
    return /* @__PURE__ */ (0, import_jsx_runtime423.jsx)(
      import_components253.Guide,
      {
        className: "editor-welcome-guide guide-styles",
        contentLabel: welcomeLabel,
        finishButtonText: (0, import_i18n275.__)("Get started"),
        onFinish: () => toggle("core/edit-site", "welcomeGuideStyles"),
        pages: [
          {
            image: /* @__PURE__ */ (0, import_jsx_runtime423.jsx)(
              WelcomeGuideImage,
              {
                nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-to-styles.svg?1",
                animatedSrc: "https://s.w.org/images/block-editor/welcome-to-styles.gif?1"
              }
            ),
            content: /* @__PURE__ */ (0, import_jsx_runtime423.jsxs)(import_jsx_runtime423.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime423.jsx)("h1", { className: "editor-welcome-guide__heading", children: welcomeLabel }),
              /* @__PURE__ */ (0, import_jsx_runtime423.jsx)("p", { className: "editor-welcome-guide__text", children: (0, import_i18n275.__)(
                "Tweak your site, or give it a whole new look! Get creative \u2014 how about a new color palette for your buttons, or choosing a new font? Take a look at what you can do here."
              ) })
            ] })
          },
          {
            image: /* @__PURE__ */ (0, import_jsx_runtime423.jsx)(
              WelcomeGuideImage,
              {
                nonAnimatedSrc: "https://s.w.org/images/block-editor/set-the-design.svg?1",
                animatedSrc: "https://s.w.org/images/block-editor/set-the-design.gif?1"
              }
            ),
            content: /* @__PURE__ */ (0, import_jsx_runtime423.jsxs)(import_jsx_runtime423.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime423.jsx)("h1", { className: "editor-welcome-guide__heading", children: (0, import_i18n275.__)("Set the design") }),
              /* @__PURE__ */ (0, import_jsx_runtime423.jsx)("p", { className: "editor-welcome-guide__text", children: (0, import_i18n275.__)(
                "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!"
              ) })
            ] })
          },
          {
            image: /* @__PURE__ */ (0, import_jsx_runtime423.jsx)(
              WelcomeGuideImage,
              {
                nonAnimatedSrc: "https://s.w.org/images/block-editor/personalize-blocks.svg?1",
                animatedSrc: "https://s.w.org/images/block-editor/personalize-blocks.gif?1"
              }
            ),
            content: /* @__PURE__ */ (0, import_jsx_runtime423.jsxs)(import_jsx_runtime423.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime423.jsx)("h1", { className: "editor-welcome-guide__heading", children: (0, import_i18n275.__)("Personalize blocks") }),
              /* @__PURE__ */ (0, import_jsx_runtime423.jsx)("p", { className: "editor-welcome-guide__text", children: (0, import_i18n275.__)(
                "You can adjust your blocks to ensure a cohesive experience across your site \u2014 add your unique colors to a branded Button block, or adjust the Heading block to your preferred size."
              ) })
            ] })
          },
          {
            image: /* @__PURE__ */ (0, import_jsx_runtime423.jsx)(
              WelcomeGuideImage,
              {
                nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.svg",
                animatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.gif"
              }
            ),
            content: /* @__PURE__ */ (0, import_jsx_runtime423.jsxs)(import_jsx_runtime423.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime423.jsx)("h1", { className: "editor-welcome-guide__heading", children: (0, import_i18n275.__)("Learn more") }),
              /* @__PURE__ */ (0, import_jsx_runtime423.jsxs)("p", { className: "editor-welcome-guide__text", children: [
                (0, import_i18n275.__)(
                  "New to block themes and styling your site?"
                ),
                " ",
                /* @__PURE__ */ (0, import_jsx_runtime423.jsx)(
                  import_components253.ExternalLink,
                  {
                    href: (0, import_i18n275.__)(
                      "https://wordpress.org/documentation/article/styles-overview/"
                    ),
                    children: (0, import_i18n275.__)(
                      "Here\u2019s a detailed guide to learn how to make the most of it."
                    )
                  }
                )
              ] })
            ] })
          }
        ]
      }
    );
  }

  // packages/editor/build-module/components/global-styles-sidebar/index.mjs
  var import_jsx_runtime424 = __toESM(require_jsx_runtime(), 1);
  function GlobalStylesSidebar() {
    const {
      shouldResetNavigation,
      stylesPath: stylesPath2,
      showStylebook: showStylebook2,
      showListViewByDefault,
      hasRevisions,
      activeComplementaryArea
    } = (0, import_data245.useSelect)((select6) => {
      const { getActiveComplementaryArea: getActiveComplementaryArea2 } = select6(store2);
      const { getStylesPath: getStylesPath2, getShowStylebook: getShowStylebook2 } = unlock(
        select6(store)
      );
      const _isVisualEditorMode = "visual" === select6(store).getEditorMode();
      const _showListViewByDefault = select6(import_preferences29.store).get(
        "core",
        "showListViewByDefault"
      );
      const { getEntityRecord, __experimentalGetCurrentGlobalStylesId } = select6(import_core_data135.store);
      const globalStylesId = __experimentalGetCurrentGlobalStylesId();
      const globalStyles = globalStylesId ? getEntityRecord("root", "globalStyles", globalStylesId) : void 0;
      return {
        stylesPath: getStylesPath2(),
        showStylebook: getShowStylebook2(),
        shouldResetNavigation: "edit-site/global-styles" !== getActiveComplementaryArea2("core") || !_isVisualEditorMode,
        showListViewByDefault: _showListViewByDefault,
        hasRevisions: !!globalStyles?._links?.["version-history"]?.[0]?.count,
        activeComplementaryArea: select6(store2).getActiveComplementaryArea("core")
      };
    }, []);
    const { setStylesPath: setStylesPath2, setShowStylebook: setShowStylebook2, resetStylesNavigation: resetStylesNavigation2 } = unlock(
      (0, import_data245.useDispatch)(store)
    );
    const isMobileViewport = (0, import_compose69.useViewportMatch)("medium", "<");
    const isRevisionsOpened = stylesPath2.startsWith("/revisions") && !showStylebook2;
    const isRevisionsStyleBookOpened = stylesPath2.startsWith("/revisions") && showStylebook2;
    const previousActiveArea = (0, import_compose69.usePrevious)(activeComplementaryArea);
    (0, import_element230.useEffect)(() => {
      if (activeComplementaryArea === "edit-site/global-styles" && previousActiveArea !== "edit-site/global-styles") {
        resetStylesNavigation2();
      }
    }, [activeComplementaryArea, previousActiveArea, resetStylesNavigation2]);
    (0, import_element230.useEffect)(() => {
      if (shouldResetNavigation) {
        resetStylesNavigation2();
      }
    }, [shouldResetNavigation, resetStylesNavigation2]);
    const { setIsListViewOpened: setIsListViewOpened2 } = (0, import_data245.useDispatch)(store);
    const toggleRevisions = () => {
      setIsListViewOpened2(false);
      if (isRevisionsOpened || isRevisionsStyleBookOpened) {
        setStylesPath2("/");
      } else {
        setStylesPath2("/revisions");
      }
    };
    const toggleStyleBook = () => {
      setIsListViewOpened2(showStylebook2 && showListViewByDefault);
      setShowStylebook2(!showStylebook2);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime424.jsxs)(import_jsx_runtime424.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime424.jsx)(
        DefaultSidebar,
        {
          className: "editor-global-styles-sidebar",
          identifier: "edit-site/global-styles",
          title: (0, import_i18n276.__)("Styles"),
          icon: styles_default,
          closeLabel: (0, import_i18n276.__)("Close Styles"),
          panelClassName: "editor-global-styles-sidebar__panel",
          header: /* @__PURE__ */ (0, import_jsx_runtime424.jsxs)(
            import_components254.Flex,
            {
              className: "editor-global-styles-sidebar__header",
              gap: 1,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime424.jsx)(import_components254.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime424.jsx)("h2", { className: "editor-global-styles-sidebar__header-title", children: (0, import_i18n276.__)("Styles") }) }),
                /* @__PURE__ */ (0, import_jsx_runtime424.jsxs)(
                  import_components254.Flex,
                  {
                    justify: "flex-end",
                    gap: 1,
                    className: "editor-global-styles-sidebar__header-actions",
                    children: [
                      !isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime424.jsx)(import_components254.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime424.jsx)(
                        import_components254.Button,
                        {
                          icon: seen_default,
                          label: (0, import_i18n276.__)("Style Book"),
                          isPressed: showStylebook2,
                          accessibleWhenDisabled: true,
                          disabled: shouldResetNavigation,
                          onClick: toggleStyleBook,
                          size: "compact"
                        }
                      ) }),
                      /* @__PURE__ */ (0, import_jsx_runtime424.jsx)(import_components254.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime424.jsx)(
                        import_components254.Button,
                        {
                          label: (0, import_i18n276.__)("Revisions"),
                          icon: backup_default,
                          onClick: toggleRevisions,
                          accessibleWhenDisabled: true,
                          disabled: !hasRevisions,
                          isPressed: isRevisionsOpened || isRevisionsStyleBookOpened,
                          size: "compact"
                        }
                      ) }),
                      /* @__PURE__ */ (0, import_jsx_runtime424.jsx)(
                        GlobalStylesActionMenu,
                        {
                          onChangePath: setStylesPath2
                        }
                      )
                    ]
                  }
                )
              ]
            }
          ),
          children: /* @__PURE__ */ (0, import_jsx_runtime424.jsx)(
            GlobalStylesUIWrapper,
            {
              path: stylesPath2,
              onPathChange: setStylesPath2
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime424.jsx)(WelcomeGuideStyles, {})
    ] });
  }

  // packages/editor/build-module/components/editor/index.mjs
  var import_jsx_runtime425 = __toESM(require_jsx_runtime(), 1);
  function Editor({
    postType: postType2,
    postId: postId2,
    templateId: templateId2,
    settings,
    children,
    initialEdits,
    // This could be part of the settings.
    onActionPerformed,
    // The following abstractions are not ideal but necessary
    // to account for site editor and post editor differences for now.
    extraContent,
    extraSidebarPanels,
    ...props
  }) {
    const {
      post: post2,
      template: template2,
      hasLoadedPost,
      error,
      isBlockTheme,
      showGlobalStyles
    } = (0, import_data246.useSelect)(
      (select6) => {
        const {
          getEntityRecord,
          getResolutionError,
          hasFinishedResolution,
          getCurrentTheme,
          __experimentalGetCurrentGlobalStylesId,
          canUser
        } = select6(import_core_data136.store);
        const { getRenderingMode: getRenderingMode2, getCurrentPostType: getCurrentPostType2 } = select6(store);
        const postArgs = ["postType", postType2, postId2];
        const renderingMode2 = getRenderingMode2();
        const currentPostType = getCurrentPostType2();
        const _isBlockTheme = getCurrentTheme()?.is_block_theme;
        const globalStylesId = __experimentalGetCurrentGlobalStylesId();
        const userCanEditGlobalStyles = globalStylesId ? canUser("update", {
          kind: "root",
          name: "globalStyles",
          id: globalStylesId
        }) : false;
        return {
          post: getEntityRecord(...postArgs),
          template: templateId2 ? getEntityRecord(
            "postType",
            TEMPLATE_POST_TYPE,
            templateId2
          ) : void 0,
          hasLoadedPost: hasFinishedResolution(
            "getEntityRecord",
            postArgs
          ),
          error: getResolutionError("getEntityRecord", postArgs)?.message,
          isBlockTheme: _isBlockTheme,
          showGlobalStyles: _isBlockTheme && userCanEditGlobalStyles && (currentPostType === "wp_template" || renderingMode2 === "template-locked")
        };
      },
      [postType2, postId2, templateId2]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime425.jsxs)(import_jsx_runtime425.Fragment, { children: [
      hasLoadedPost && !post2 && /* @__PURE__ */ (0, import_jsx_runtime425.jsx)(
        import_components255.Notice,
        {
          status: !!error ? "error" : "warning",
          isDismissible: false,
          children: !error ? (0, import_i18n277.__)(
            "You attempted to edit an item that doesn't exist. Perhaps it was deleted?"
          ) : error
        }
      ),
      !!post2 && /* @__PURE__ */ (0, import_jsx_runtime425.jsxs)(
        ExperimentalEditorProvider,
        {
          post: post2,
          __unstableTemplate: template2,
          settings,
          initialEdits,
          useSubRegistry: false,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime425.jsx)(EditorInterface, { ...props, children: extraContent }),
            children,
            /* @__PURE__ */ (0, import_jsx_runtime425.jsx)(
              sidebar_default2,
              {
                onActionPerformed,
                extraPanels: extraSidebarPanels
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime425.jsx)(NotesSidebarContainer, {}),
            isBlockTheme && /* @__PURE__ */ (0, import_jsx_runtime425.jsx)(GlobalStylesRenderer, {}),
            showGlobalStyles && /* @__PURE__ */ (0, import_jsx_runtime425.jsx)(GlobalStylesSidebar, {})
          ]
        }
      )
    ] });
  }
  var editor_default = Editor;

  // packages/editor/build-module/components/preferences-modal/index.mjs
  var import_i18n279 = __toESM(require_i18n(), 1);
  var import_compose70 = __toESM(require_compose(), 1);
  var import_data249 = __toESM(require_data(), 1);
  var import_element232 = __toESM(require_element(), 1);
  var import_preferences32 = __toESM(require_preferences(), 1);

  // packages/editor/build-module/components/preferences-modal/enable-publish-sidebar.mjs
  var import_data247 = __toESM(require_data(), 1);
  var import_preferences30 = __toESM(require_preferences(), 1);
  var import_jsx_runtime426 = __toESM(require_jsx_runtime(), 1);
  var { PreferenceBaseOption: PreferenceBaseOption2 } = unlock(import_preferences30.privateApis);
  function EnablePublishSidebarOption(props) {
    const isChecked = (0, import_data247.useSelect)((select6) => {
      return select6(store).isPublishSidebarEnabled();
    }, []);
    const { enablePublishSidebar: enablePublishSidebar2, disablePublishSidebar: disablePublishSidebar2 } = (0, import_data247.useDispatch)(store);
    return /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
      PreferenceBaseOption2,
      {
        isChecked,
        onChange: (isEnabled) => isEnabled ? enablePublishSidebar2() : disablePublishSidebar2(),
        ...props
      }
    );
  }

  // packages/editor/build-module/components/block-visibility/index.mjs
  var import_data248 = __toESM(require_data(), 1);
  var import_preferences31 = __toESM(require_preferences(), 1);
  var import_blocks39 = __toESM(require_blocks(), 1);
  var import_element231 = __toESM(require_element(), 1);
  var import_components256 = __toESM(require_components(), 1);
  var import_i18n278 = __toESM(require_i18n(), 1);
  var import_block_editor101 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime427 = __toESM(require_jsx_runtime(), 1);
  var { BlockManager } = unlock(import_block_editor101.privateApis);
  var EMPTY_ARRAY10 = [];
  function BlockVisibility() {
    const { showBlockTypes: showBlockTypes2, hideBlockTypes: hideBlockTypes2 } = unlock(
      (0, import_data248.useDispatch)(store)
    );
    const {
      blockTypes,
      allowedBlockTypes: _allowedBlockTypes,
      hiddenBlockTypes: _hiddenBlockTypes
    } = (0, import_data248.useSelect)((select6) => {
      return {
        blockTypes: select6(import_blocks39.store).getBlockTypes(),
        allowedBlockTypes: select6(store).getEditorSettings().allowedBlockTypes,
        hiddenBlockTypes: select6(import_preferences31.store).get("core", "hiddenBlockTypes") ?? EMPTY_ARRAY10
      };
    }, []);
    const allowedBlockTypes = (0, import_element231.useMemo)(() => {
      if (_allowedBlockTypes === true) {
        return blockTypes;
      }
      return blockTypes.filter(({ name: name2 }) => {
        return _allowedBlockTypes?.includes(name2);
      });
    }, [_allowedBlockTypes, blockTypes]);
    const filteredBlockTypes = allowedBlockTypes.filter(
      (blockType) => (0, import_blocks39.hasBlockSupport)(blockType, "inserter", true) && (!blockType.parent || blockType.parent.includes("core/post-content"))
    );
    const hiddenBlockTypes = _hiddenBlockTypes.filter((hiddenBlock) => {
      return filteredBlockTypes.some(
        (registeredBlock) => registeredBlock.name === hiddenBlock
      );
    });
    const selectedBlockTypes = filteredBlockTypes.filter(
      (blockType) => !hiddenBlockTypes.includes(blockType.name)
    );
    const numberOfHiddenBlocks = filteredBlockTypes.length - selectedBlockTypes.length;
    function enableAllBlockTypes() {
      onChangeSelectedBlockTypes(filteredBlockTypes);
    }
    const onChangeSelectedBlockTypes = (newSelectedBlockTypes) => {
      if (selectedBlockTypes.length > newSelectedBlockTypes.length) {
        const blockTypesToHide = selectedBlockTypes.filter(
          (blockType) => !newSelectedBlockTypes.find(
            ({ name: name2 }) => name2 === blockType.name
          )
        );
        hideBlockTypes2(blockTypesToHide.map(({ name: name2 }) => name2));
      } else if (selectedBlockTypes.length < newSelectedBlockTypes.length) {
        const blockTypesToShow = newSelectedBlockTypes.filter(
          (blockType) => !selectedBlockTypes.find(
            ({ name: name2 }) => name2 === blockType.name
          )
        );
        showBlockTypes2(blockTypesToShow.map(({ name: name2 }) => name2));
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime427.jsxs)("div", { className: "editor-block-visibility", children: [
      !!numberOfHiddenBlocks && /* @__PURE__ */ (0, import_jsx_runtime427.jsxs)("div", { className: "editor-block-visibility__disabled-blocks-count", children: [
        (0, import_i18n278.sprintf)(
          /* translators: %d: number of blocks. */
          (0, import_i18n278._n)(
            "%d block is hidden.",
            "%d blocks are hidden.",
            numberOfHiddenBlocks
          ),
          numberOfHiddenBlocks
        ),
        /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
          import_components256.Button,
          {
            __next40pxDefaultSize: true,
            variant: "link",
            onClick: enableAllBlockTypes,
            children: (0, import_i18n278.__)("Reset")
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
        BlockManager,
        {
          blockTypes: filteredBlockTypes,
          selectedBlockTypes,
          onChange: onChangeSelectedBlockTypes,
          showSelectAll: false
        }
      )
    ] });
  }

  // packages/editor/build-module/components/preferences-modal/index.mjs
  var import_jsx_runtime428 = __toESM(require_jsx_runtime(), 1);
  var {
    PreferencesModal,
    PreferencesModalTabs,
    PreferencesModalSection,
    PreferenceToggleControl
  } = unlock(import_preferences32.privateApis);
  function EditorPreferencesModal({ extraSections = {} }) {
    const isActive = (0, import_data249.useSelect)((select6) => {
      return select6(store2).isModalActive("editor/preferences");
    }, []);
    const { closeModal: closeModal2 } = (0, import_data249.useDispatch)(store2);
    if (!isActive) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(PreferencesModal, { closeModal: closeModal2, children: /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(PreferencesModalContents, { extraSections }) });
  }
  function PreferencesModalContents({ extraSections = {} }) {
    const isLargeViewport = (0, import_compose70.useViewportMatch)("medium");
    const { showBlockBreadcrumbsOption, showCollaborationOptions } = (0, import_data249.useSelect)(
      (select6) => {
        const { getEditorSettings: getEditorSettings2, isCollaborationEnabledForCurrentPost: isCollaborationEnabledForCurrentPost2 } = unlock(select6(store));
        const { get } = select6(import_preferences32.store);
        const isRichEditingEnabled = getEditorSettings2().richEditingEnabled;
        const isDistractionFreeEnabled = get("core", "distractionFree");
        return {
          showBlockBreadcrumbsOption: !isDistractionFreeEnabled && isLargeViewport && isRichEditingEnabled,
          showCollaborationOptions: isCollaborationEnabledForCurrentPost2()
        };
      },
      [isLargeViewport]
    );
    const { setIsListViewOpened: setIsListViewOpened2, setIsInserterOpened: setIsInserterOpened2 } = (0, import_data249.useDispatch)(store);
    const { set: setPreference } = (0, import_data249.useDispatch)(import_preferences32.store);
    const sections = (0, import_element232.useMemo)(
      () => [
        {
          name: "general",
          tabLabel: (0, import_i18n279.__)("General"),
          content: /* @__PURE__ */ (0, import_jsx_runtime428.jsxs)(import_jsx_runtime428.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime428.jsxs)(
              PreferencesModalSection,
              {
                title: (0, import_i18n279.__)("Interface"),
                children: [
                  /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
                    PreferenceToggleControl,
                    {
                      scope: "core",
                      featureName: "showListViewByDefault",
                      help: (0, import_i18n279.__)(
                        "Opens the List View panel by default."
                      ),
                      label: (0, import_i18n279.__)("Always open List View")
                    }
                  ),
                  showBlockBreadcrumbsOption && /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
                    PreferenceToggleControl,
                    {
                      scope: "core",
                      featureName: "showBlockBreadcrumbs",
                      help: (0, import_i18n279.__)(
                        "Display the block hierarchy trail at the bottom of the editor."
                      ),
                      label: (0, import_i18n279.__)("Show block breadcrumbs")
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
                    PreferenceToggleControl,
                    {
                      scope: "core",
                      featureName: "allowRightClickOverrides",
                      help: (0, import_i18n279.__)(
                        "Allows contextual List View menus via right-click, overriding browser defaults."
                      ),
                      label: (0, import_i18n279.__)(
                        "Allow right-click contextual menus"
                      )
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
                    PreferenceToggleControl,
                    {
                      scope: "core",
                      featureName: "enableChoosePatternModal",
                      help: (0, import_i18n279.__)(
                        "Pick from starter content when creating a new page."
                      ),
                      label: (0, import_i18n279.__)("Show starter patterns")
                    }
                  ),
                  showCollaborationOptions && /* @__PURE__ */ (0, import_jsx_runtime428.jsxs)(import_jsx_runtime428.Fragment, { children: [
                    /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
                      PreferenceToggleControl,
                      {
                        scope: "core",
                        featureName: "showCollaborationCursor",
                        help: (0, import_i18n279.__)(
                          "Show your own avatar inside blocks during collaborative editing sessions."
                        ),
                        label: (0, import_i18n279.__)(
                          "Show avatar in blocks"
                        )
                      }
                    ),
                    /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
                      PreferenceToggleControl,
                      {
                        scope: "core",
                        featureName: "showCollaborationNotifications",
                        help: (0, import_i18n279.__)(
                          "Show notifications when collaborators join, leave, or save the post."
                        ),
                        label: (0, import_i18n279.__)(
                          "Show collaboration notifications"
                        )
                      }
                    )
                  ] })
                ]
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime428.jsxs)(
              PreferencesModalSection,
              {
                title: (0, import_i18n279.__)("Document settings"),
                description: (0, import_i18n279.__)(
                  "Select what settings are shown in the document panel."
                ),
                children: [
                  /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(enable_plugin_document_setting_panel_default.Slot, {}),
                  /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
                    post_taxonomies_default,
                    {
                      taxonomyWrapper: (content, taxonomy) => /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
                        EnablePanelOption,
                        {
                          label: taxonomy.labels.menu_name,
                          panelName: `taxonomy-panel-${taxonomy.slug}`
                        }
                      )
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(check_default4, { children: /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
                    EnablePanelOption,
                    {
                      label: (0, import_i18n279.__)("Featured image"),
                      panelName: "featured-image"
                    }
                  ) }),
                  /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(check_default3, { children: /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
                    EnablePanelOption,
                    {
                      label: (0, import_i18n279.__)("Excerpt"),
                      panelName: "post-excerpt"
                    }
                  ) }),
                  /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
                    post_type_support_check_default,
                    {
                      supportKeys: ["comments", "trackbacks"],
                      children: /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
                        EnablePanelOption,
                        {
                          label: (0, import_i18n279.__)("Discussion"),
                          panelName: "discussion-panel"
                        }
                      )
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(check_default2, { children: /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
                    EnablePanelOption,
                    {
                      label: (0, import_i18n279.__)("Page attributes"),
                      panelName: "page-attributes"
                    }
                  ) })
                ]
              }
            ),
            isLargeViewport && /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
              PreferencesModalSection,
              {
                title: (0, import_i18n279.__)("Publishing"),
                children: /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
                  EnablePublishSidebarOption,
                  {
                    help: (0, import_i18n279.__)(
                      "Review settings, such as visibility and tags."
                    ),
                    label: (0, import_i18n279.__)(
                      "Enable pre-publish checks"
                    )
                  }
                )
              }
            ),
            extraSections?.general
          ] })
        },
        {
          name: "appearance",
          tabLabel: (0, import_i18n279.__)("Appearance"),
          content: /* @__PURE__ */ (0, import_jsx_runtime428.jsxs)(
            PreferencesModalSection,
            {
              title: (0, import_i18n279.__)("Appearance"),
              description: (0, import_i18n279.__)(
                "Customize the editor interface to suit your needs."
              ),
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
                  PreferenceToggleControl,
                  {
                    scope: "core",
                    featureName: "fixedToolbar",
                    onToggle: () => setPreference(
                      "core",
                      "distractionFree",
                      false
                    ),
                    help: (0, import_i18n279.__)(
                      "Access all block and document tools in a single place."
                    ),
                    label: (0, import_i18n279.__)("Top toolbar")
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
                  PreferenceToggleControl,
                  {
                    scope: "core",
                    featureName: "distractionFree",
                    onToggle: () => {
                      setPreference(
                        "core",
                        "fixedToolbar",
                        true
                      );
                      setIsInserterOpened2(false);
                      setIsListViewOpened2(false);
                    },
                    help: (0, import_i18n279.__)(
                      "Reduce visual distractions by hiding the toolbar and other elements to focus on writing."
                    ),
                    label: (0, import_i18n279.__)("Distraction free")
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
                  PreferenceToggleControl,
                  {
                    scope: "core",
                    featureName: "focusMode",
                    help: (0, import_i18n279.__)(
                      "Highlights the current block and fades other content."
                    ),
                    label: (0, import_i18n279.__)("Spotlight mode")
                  }
                ),
                extraSections?.appearance
              ]
            }
          )
        },
        {
          name: "accessibility",
          tabLabel: (0, import_i18n279.__)("Accessibility"),
          content: /* @__PURE__ */ (0, import_jsx_runtime428.jsxs)(import_jsx_runtime428.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
              PreferencesModalSection,
              {
                title: (0, import_i18n279.__)("Navigation"),
                description: (0, import_i18n279.__)(
                  "Optimize the editing experience for enhanced control."
                ),
                children: /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
                  PreferenceToggleControl,
                  {
                    scope: "core",
                    featureName: "keepCaretInsideBlock",
                    help: (0, import_i18n279.__)(
                      "Keeps the text cursor within blocks while navigating with arrow keys, preventing it from moving to other blocks and enhancing accessibility for keyboard users."
                    ),
                    label: (0, import_i18n279.__)(
                      "Contain text cursor inside block"
                    )
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
              PreferencesModalSection,
              {
                title: (0, import_i18n279.__)("Interface"),
                children: /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
                  PreferenceToggleControl,
                  {
                    scope: "core",
                    featureName: "showIconLabels",
                    label: (0, import_i18n279.__)("Show button text labels"),
                    help: (0, import_i18n279.__)(
                      "Show text instead of icons on buttons across the interface."
                    )
                  }
                )
              }
            )
          ] })
        },
        {
          name: "blocks",
          tabLabel: (0, import_i18n279.__)("Blocks"),
          content: /* @__PURE__ */ (0, import_jsx_runtime428.jsxs)(import_jsx_runtime428.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(PreferencesModalSection, { title: (0, import_i18n279.__)("Inserter"), children: /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
              PreferenceToggleControl,
              {
                scope: "core",
                featureName: "mostUsedBlocks",
                help: (0, import_i18n279.__)(
                  "Adds a category with the most frequently used blocks in the inserter."
                ),
                label: (0, import_i18n279.__)("Show most used blocks")
              }
            ) }),
            /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
              PreferencesModalSection,
              {
                title: (0, import_i18n279.__)("Manage block visibility"),
                description: (0, import_i18n279.__)(
                  "Disable blocks that you don't want to appear in the inserter. They can always be toggled back on later."
                ),
                children: /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(BlockVisibility, {})
              }
            )
          ] })
        },
        window.__clientSideMediaProcessing && {
          name: "media",
          tabLabel: (0, import_i18n279.__)("Media"),
          content: /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(import_jsx_runtime428.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime428.jsxs)(
            PreferencesModalSection,
            {
              title: (0, import_i18n279.__)("General"),
              description: (0, import_i18n279.__)(
                "Customize options related to the media upload flow."
              ),
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
                  PreferenceToggleControl,
                  {
                    scope: "core/media",
                    featureName: "optimizeOnUpload",
                    help: (0, import_i18n279.__)(
                      "Compress media items before uploading to the server."
                    ),
                    label: (0, import_i18n279.__)("Pre-upload compression")
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
                  PreferenceToggleControl,
                  {
                    scope: "core/media",
                    featureName: "requireApproval",
                    help: (0, import_i18n279.__)(
                      "Require approval step when optimizing existing media."
                    ),
                    label: (0, import_i18n279.__)("Approval step")
                  }
                )
              ]
            }
          ) })
        }
      ].filter(Boolean),
      [
        showBlockBreadcrumbsOption,
        showCollaborationOptions,
        extraSections,
        setIsInserterOpened2,
        setIsListViewOpened2,
        setPreference,
        isLargeViewport
      ]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(PreferencesModalTabs, { sections });
  }

  // packages/editor/build-module/bindings/api.mjs
  var import_blocks40 = __toESM(require_blocks(), 1);

  // packages/editor/build-module/bindings/pattern-overrides.mjs
  var import_block_editor102 = __toESM(require_block_editor(), 1);
  var CONTENT = "content";
  var pattern_overrides_default = {
    name: "core/pattern-overrides",
    getValues({ select: select6, clientId, context, bindings }) {
      const patternOverridesContent = context["pattern/overrides"];
      const { getBlockAttributes: getBlockAttributes2 } = select6(import_block_editor102.store);
      const currentBlockAttributes = getBlockAttributes2(clientId);
      const overridesValues = {};
      for (const attributeName of Object.keys(bindings)) {
        const overridableValue = patternOverridesContent?.[currentBlockAttributes?.metadata?.name]?.[attributeName];
        if (overridableValue === void 0) {
          overridesValues[attributeName] = currentBlockAttributes[attributeName];
          continue;
        } else {
          overridesValues[attributeName] = overridableValue === "" ? void 0 : overridableValue;
        }
      }
      return overridesValues;
    },
    setValues({ select: select6, dispatch: dispatch7, clientId, bindings }) {
      const { getBlockAttributes: getBlockAttributes2, getBlockParentsByBlockName, getBlocks: getBlocks2 } = select6(import_block_editor102.store);
      const currentBlockAttributes = getBlockAttributes2(clientId);
      const blockName = currentBlockAttributes?.metadata?.name;
      if (!blockName) {
        return;
      }
      const [patternClientId] = getBlockParentsByBlockName(
        clientId,
        "core/block",
        true
      );
      const attributes = Object.entries(bindings).reduce(
        (attrs, [key, { newValue }]) => {
          attrs[key] = newValue;
          return attrs;
        },
        {}
      );
      if (!patternClientId) {
        const syncBlocksWithSameName = (blocks) => {
          for (const block of blocks) {
            if (block.attributes?.metadata?.name === blockName) {
              dispatch7(import_block_editor102.store).updateBlockAttributes(
                block.clientId,
                attributes
              );
            }
            syncBlocksWithSameName(block.innerBlocks);
          }
        };
        syncBlocksWithSameName(getBlocks2());
        return;
      }
      const currentBindingValue = getBlockAttributes2(patternClientId)?.[CONTENT];
      dispatch7(import_block_editor102.store).updateBlockAttributes(patternClientId, {
        [CONTENT]: {
          ...currentBindingValue,
          [blockName]: {
            ...currentBindingValue?.[blockName],
            ...Object.entries(attributes).reduce(
              (acc, [key, value]) => {
                acc[key] = value === void 0 ? "" : value;
                return acc;
              },
              {}
            )
          }
        }
      });
    },
    canUserEditValue: () => true
  };

  // packages/editor/build-module/bindings/post-data.mjs
  var import_i18n280 = __toESM(require_i18n(), 1);
  var import_core_data137 = __toESM(require_core_data(), 1);
  var import_block_editor103 = __toESM(require_block_editor(), 1);
  var NAVIGATION_BLOCK_TYPES = [
    "core/navigation-link",
    "core/navigation-submenu"
  ];
  var postDataFields = [
    {
      label: (0, import_i18n280.__)("Post Date"),
      args: { field: "date" },
      type: "string"
    },
    {
      label: (0, import_i18n280.__)("Post Modified Date"),
      args: { field: "modified" },
      type: "string"
    },
    {
      label: (0, import_i18n280.__)("Post Link"),
      args: { field: "link" },
      type: "string"
    }
  ];
  var post_data_default = {
    name: "core/post-data",
    getValues({ select: select6, context, bindings, clientId }) {
      const { getBlockAttributes: getBlockAttributes2, getBlockName: getBlockName2 } = select6(import_block_editor103.store);
      const blockName = getBlockName2(clientId);
      const isNavigationBlock = NAVIGATION_BLOCK_TYPES.includes(blockName);
      let postId2, postType2;
      if (isNavigationBlock) {
        const blockAttributes = getBlockAttributes2(clientId);
        postId2 = blockAttributes?.id;
        postType2 = blockAttributes?.type;
      } else {
        postId2 = context?.postId;
        postType2 = context?.postType;
      }
      const { getEditedEntityRecord } = select6(import_core_data137.store);
      const entityDataValues = getEditedEntityRecord(
        "postType",
        postType2,
        postId2
      );
      const newValues = {};
      for (const [attributeName, binding] of Object.entries(bindings)) {
        const postDataField = postDataFields.find(
          (field) => field.args.field === binding.args.field
        );
        if (!postDataField) {
          newValues[attributeName] = binding.args.field;
        } else if (!entityDataValues) {
          newValues[attributeName] = postDataField.label;
        } else {
          newValues[attributeName] = entityDataValues[binding.args.field];
        }
      }
      return newValues;
    },
    setValues({ dispatch: dispatch7, context, bindings, clientId, select: select6 }) {
      const { getBlockName: getBlockName2 } = select6(import_block_editor103.store);
      const blockName = getBlockName2(clientId);
      if (NAVIGATION_BLOCK_TYPES.includes(blockName)) {
        return false;
      }
      const newData = {};
      Object.values(bindings).forEach(({ args, newValue }) => {
        newData[args.field] = newValue;
      });
      dispatch7(import_core_data137.store).editEntityRecord(
        "postType",
        context?.postType,
        context?.postId,
        newData
      );
    },
    canUserEditValue({ select: select6, context }) {
      const { getBlockName: getBlockName2, getSelectedBlockClientId: getSelectedBlockClientId2 } = select6(import_block_editor103.store);
      const clientId = getSelectedBlockClientId2();
      const blockName = getBlockName2(clientId);
      if (NAVIGATION_BLOCK_TYPES.includes(blockName)) {
        return false;
      }
      if (context?.query || context?.queryId) {
        return false;
      }
      if (!context?.postType) {
        return false;
      }
      const canUserEdit = select6(import_core_data137.store).canUser("update", {
        kind: "postType",
        name: context?.postType,
        id: context?.postId
      });
      if (!canUserEdit) {
        return false;
      }
      return true;
    },
    getFieldsList({ context, select: select6 }) {
      const selectedBlock = select6(import_block_editor103.store).getSelectedBlock();
      if (selectedBlock?.name !== "core/post-date") {
        return [];
      }
      if (!context || !context.postId || !context.postType) {
        return [];
      }
      return postDataFields;
    }
  };

  // packages/editor/build-module/bindings/post-meta.mjs
  var import_core_data138 = __toESM(require_core_data(), 1);
  function getPostMetaFields(select6, context) {
    const { getRegisteredPostMeta } = unlock(select6(import_core_data138.store));
    const registeredFields = getRegisteredPostMeta(context?.postType);
    const metaFields = [];
    Object.entries(registeredFields).forEach(([key, props]) => {
      if (key === "footnotes" || key.charAt(0) === "_") {
        return;
      }
      metaFields.push({
        label: props.title || key,
        args: { key },
        default: props.default,
        type: props.type
      });
    });
    return metaFields;
  }
  function getValue({ select: select6, context, args }) {
    const metaFields = getPostMetaFields(select6, context);
    const metaField = metaFields.find(
      (field) => field.args.key === args.key
    );
    if (!metaField) {
      return args.key;
    }
    if (!context?.postId) {
      return metaField.default || metaField.label || args.key;
    }
    const { getEditedEntityRecord } = select6(import_core_data138.store);
    const entityMetaValues = getEditedEntityRecord(
      "postType",
      context?.postType,
      context?.postId
    ).meta;
    return entityMetaValues?.[args.key] ?? metaField?.label ?? args.key;
  }
  var post_meta_default = {
    name: "core/post-meta",
    getValues({ select: select6, context, bindings }) {
      const newValues = {};
      for (const [attributeName, binding] of Object.entries(bindings)) {
        newValues[attributeName] = getValue({
          select: select6,
          context,
          args: binding.args
        });
      }
      return newValues;
    },
    setValues({ dispatch: dispatch7, context, bindings }) {
      const newMeta = {};
      Object.values(bindings).forEach(({ args, newValue }) => {
        newMeta[args.key] = newValue;
      });
      dispatch7(import_core_data138.store).editEntityRecord(
        "postType",
        context?.postType,
        context?.postId,
        {
          meta: newMeta
        }
      );
    },
    canUserEditValue({ select: select6, context, args }) {
      if (context?.query || context?.queryId) {
        return false;
      }
      if (!context?.postType) {
        return false;
      }
      const metaFields = getPostMetaFields(select6, context);
      const hasMatchingMetaField = metaFields.some(
        (field) => field.args.key === args.key
      );
      if (!hasMatchingMetaField) {
        return false;
      }
      const areCustomFieldsEnabled = select6(store).getEditorSettings().enableCustomFields;
      if (areCustomFieldsEnabled) {
        return false;
      }
      const canUserEdit = select6(import_core_data138.store).canUser("update", {
        kind: "postType",
        name: context?.postType,
        id: context?.postId
      });
      if (!canUserEdit) {
        return false;
      }
      return true;
    },
    getFieldsList({ select: select6, context }) {
      const metaFields = getPostMetaFields(select6, context);
      return metaFields.map(
        ({ default: defaultProp, ...otherProps }) => ({
          ...otherProps
        })
      );
    }
  };

  // packages/editor/build-module/bindings/term-data.mjs
  var import_i18n281 = __toESM(require_i18n(), 1);
  var import_core_data139 = __toESM(require_core_data(), 1);
  var import_block_editor104 = __toESM(require_block_editor(), 1);
  var NAVIGATION_BLOCK_TYPES2 = [
    "core/navigation-link",
    "core/navigation-submenu"
  ];
  var termDataFields = [
    {
      label: (0, import_i18n281.__)("Term ID"),
      args: { field: "id" },
      type: "string"
    },
    {
      label: (0, import_i18n281.__)("Name"),
      args: { field: "name" },
      type: "string"
    },
    {
      label: (0, import_i18n281.__)("Slug"),
      args: { field: "slug" },
      type: "string"
    },
    {
      label: (0, import_i18n281.__)("Link"),
      args: { field: "link" },
      type: "string"
    },
    {
      label: (0, import_i18n281.__)("Description"),
      args: { field: "description" },
      type: "string"
    },
    {
      label: (0, import_i18n281.__)("Parent ID"),
      args: { field: "parent" },
      type: "string"
    },
    {
      label: (0, import_i18n281.__)("Count"),
      args: { field: "count" },
      type: "string"
    }
  ];
  var term_data_default = {
    name: "core/term-data",
    usesContext: ["taxonomy", "termId", "termData"],
    getValues({ select: select6, context, bindings, clientId }) {
      const { getEntityRecord } = select6(import_core_data139.store);
      const { getBlockAttributes: getBlockAttributes2, getBlockName: getBlockName2 } = select6(import_block_editor104.store);
      const blockName = getBlockName2(clientId);
      const isNavigationBlock = NAVIGATION_BLOCK_TYPES2.includes(blockName);
      let termDataValues;
      if (isNavigationBlock) {
        const blockAttributes = getBlockAttributes2(clientId);
        const typeFromAttributes = blockAttributes?.type;
        const taxonomy = typeFromAttributes === "tag" ? "post_tag" : typeFromAttributes;
        termDataValues = getEntityRecord(
          "taxonomy",
          taxonomy,
          blockAttributes?.id
        );
      } else if (context.termId && context.taxonomy) {
        termDataValues = getEntityRecord(
          "taxonomy",
          context.taxonomy,
          context.termId
        );
      }
      if (!termDataValues && context?.termData && !isNavigationBlock) {
        termDataValues = context.termData;
      }
      const newValues = {};
      for (const [attributeName, binding] of Object.entries(bindings)) {
        const termDataField = termDataFields.find(
          (field) => field.args.field === binding.args.field
        );
        if (!termDataField) {
          newValues[attributeName] = binding.args.field;
        } else if (!termDataValues || termDataValues[binding.args.field] === void 0) {
          newValues[attributeName] = termDataField.label;
        } else if (binding.args.field === "count") {
          newValues[attributeName] = "(" + termDataValues[binding.args.field] + ")";
        } else {
          newValues[attributeName] = termDataValues[binding.args.field];
        }
      }
      return newValues;
    },
    // eslint-disable-next-line no-unused-vars
    setValues({ dispatch: dispatch7, context, bindings }) {
      return false;
    },
    canUserEditValue({ select: select6, context }) {
      const { getBlockName: getBlockName2, getSelectedBlockClientId: getSelectedBlockClientId2 } = select6(import_block_editor104.store);
      const clientId = getSelectedBlockClientId2();
      const blockName = getBlockName2(clientId);
      if (NAVIGATION_BLOCK_TYPES2.includes(blockName)) {
        return false;
      }
      if (context?.termQuery) {
        return false;
      }
      if (!context?.taxonomy || !context?.termId) {
        return false;
      }
      return false;
    },
    getFieldsList({ context, select: select6 }) {
      const { getBlockAttributes: getBlockAttributes2, getBlockName: getBlockName2, getSelectedBlockClientId: getSelectedBlockClientId2 } = select6(import_block_editor104.store);
      const clientId = getSelectedBlockClientId2();
      const blockName = getBlockName2(clientId);
      if (NAVIGATION_BLOCK_TYPES2.includes(blockName)) {
        const blockAttributes = getBlockAttributes2(clientId);
        if (!blockAttributes || !blockAttributes.id || !blockAttributes.type) {
          return [];
        }
        return termDataFields;
      }
      if (!context) {
        return [];
      }
      if (context.taxonomy && context.termId || context.termData) {
        return termDataFields;
      }
      return [];
    }
  };

  // packages/editor/build-module/bindings/api.mjs
  function registerCoreBlockBindingsSources() {
    (0, import_blocks40.registerBlockBindingsSource)(pattern_overrides_default);
    (0, import_blocks40.registerBlockBindingsSource)(post_data_default);
    (0, import_blocks40.registerBlockBindingsSource)(post_meta_default);
    (0, import_blocks40.registerBlockBindingsSource)(term_data_default);
  }

  // packages/editor/build-module/private-apis.mjs
  var { store: interfaceStore, ...remainingInterfaceApis } = build_module_exports;
  var privateApis18 = {};
  lock(privateApis18, {
    CreateTemplatePartModal,
    patternTitleField: pattern_title_default,
    templateTitleField: template_title_default,
    BackButton: back_button_default,
    EntitiesSavedStatesExtensible,
    Editor: editor_default,
    PluginPostExcerpt: plugin_default,
    PostCardPanel,
    PreferencesModal: EditorPreferencesModal,
    usePostActions,
    usePostFields: post_fields_default,
    ToolsMoreMenuGroup: tools_more_menu_group_default,
    ViewMoreMenuGroup: view_more_menu_group_default,
    ResizableEditor: resizable_editor_default,
    registerCoreBlockBindingsSources,
    getTemplateInfo,
    // Global Styles
    GlobalStylesUIWrapper,
    GlobalStylesActionMenu,
    StyleBookPreview,
    useGlobalStyles,
    useStyle: useStyle2,
    // This is a temporary private API while we're updating the site editor to use EditorProvider.
    interfaceStore,
    ...remainingInterfaceApis
  });

  // packages/editor/build-module/dataviews/api.mjs
  var import_data250 = __toESM(require_data(), 1);
  function registerEntityAction2(kind, name2, config2) {
    const { registerEntityAction: _registerEntityAction } = unlock(
      (0, import_data250.dispatch)(store)
    );
    if (false) {
      _registerEntityAction(kind, name2, config2);
    }
  }
  function unregisterEntityAction2(kind, name2, actionId) {
    const { unregisterEntityAction: _unregisterEntityAction } = unlock(
      (0, import_data250.dispatch)(store)
    );
    if (false) {
      _unregisterEntityAction(kind, name2, actionId);
    }
  }
  function registerEntityField2(kind, name2, config2) {
    const { registerEntityField: _registerEntityField } = unlock(
      (0, import_data250.dispatch)(store)
    );
    if (false) {
      _registerEntityField(kind, name2, config2);
    }
  }
  function unregisterEntityField2(kind, name2, fieldId) {
    const { unregisterEntityField: _unregisterEntityField } = unlock(
      (0, import_data250.dispatch)(store)
    );
    if (false) {
      _unregisterEntityField(kind, name2, fieldId);
    }
  }

  // packages/editor/build-module/index.mjs
  var import_block_editor105 = __toESM(require_block_editor(), 1);
  return __toCommonJS(index_exports);
})();
/*! Bundled license information:

react-is/cjs/react-is.development.js:
  (** @license React v16.13.1
   * react-is.development.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

object-assign/index.js:
  (*
  object-assign
  (c) Sindre Sorhus
  @license MIT
  *)

autosize/dist/autosize.js:
  (*!
  	autosize 4.0.2
  	license: MIT
  	http://www.jacklmoore.com/autosize
  *)

is-plain-object/dist/is-plain-object.mjs:
  (*!
   * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
   *
   * Copyright (c) 2014-2017, Jon Schlinkert.
   * Released under the MIT License.
   *)
*/
                                                                                                                                                                                                            dist/editor.min.js                                                                                  0000644                 00003772344 15212564016 0010143 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).editor=(()=>{var iae=Object.create;var T1=Object.defineProperty;var sae=Object.getOwnPropertyDescriptor;var aae=Object.getOwnPropertyNames;var lae=Object.getPrototypeOf,cae=Object.prototype.hasOwnProperty;var Zn=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ie=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Qc=(e,t)=>{for(var r in t)T1(e,r,{get:t[r],enumerable:!0})},PF=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of aae(t))!cae.call(e,n)&&n!==r&&T1(e,n,{get:()=>t[n],enumerable:!(o=sae(t,n))||o.enumerable});return e};var s=(e,t,r)=>(r=e!=null?iae(lae(e)):{},PF(t||!e||!e.__esModule?T1(r,"default",{value:e,enumerable:!0}):r,e)),uae=e=>PF(T1({},"__esModule",{value:!0}),e);var O=Ie((wAe,kF)=>{kF.exports=window.wp.data});var W=Ie((xAe,EF)=>{EF.exports=window.wp.coreData});var D=Ie((CAe,RF)=>{RF.exports=window.wp.element});var he=Ie((TAe,AF)=>{AF.exports=window.wp.compose});var mo=Ie((PAe,OF)=>{OF.exports=window.wp.hooks});var $=Ie((kAe,IF)=>{IF.exports=window.wp.blockEditor});var Xe=Ie((NAe,VF)=>{VF.exports=window.wp.blocks});var po=Ie((FAe,jF)=>{jF.exports=window.wp.date});var Ir=Ie((DAe,zF)=>{zF.exports=window.wp.url});var Yi=Ie((BAe,UF)=>{UF.exports=window.wp.deprecated});var lt=Ie((MAe,HF)=>{HF.exports=window.wp.preferences});var de=Ie((jAe,ZF)=>{ZF.exports=window.wp.primitives});var C=Ie((zAe,KF)=>{KF.exports=window.ReactJSXRuntime});var qv=Ie((LIe,XF)=>{XF.exports=window.wp.privateApis});var Xm=Ie((ZIe,uD)=>{uD.exports=window.wp.a11y});var Qm=Ie((KIe,dD)=>{dD.exports=window.wp.apiFetch});var ct=Ie((XIe,fD)=>{fD.exports=window.wp.notices});var E=Ie((QIe,mD)=>{mD.exports=window.wp.i18n});var ft=Ie((n6e,_D)=>{_D.exports=window.wp.htmlEntities});var xD=Ie((a6e,wD)=>{"use strict";wD.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),o=i.length,o!==Object.keys(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}});var Yd=Ie((y6e,RD)=>{RD.exports=window.wp.mediaUtils});var A=Ie((I6e,jD)=>{jD.exports=window.wp.components});var Ls=Ie((l3e,sB)=>{sB.exports=window.wp.patterns});var sy=Ie((g3e,dB)=>{dB.exports=window.wp.blob});var Jn=Ie((y3e,vB)=>{vB.exports=window.React});var s5=Ie((D3e,lM)=>{lM.exports=window.ReactDOM});var M_=Ie((f4e,B_)=>{var NM={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u1EA4:"A",\u1EAE:"A",\u1EB2:"A",\u1EB4:"A",\u1EB6:"A",\u00C6:"AE",\u1EA6:"A",\u1EB0:"A",\u0202:"A",\u1EA2:"A",\u1EA0:"A",\u1EA8:"A",\u1EAA:"A",\u1EAC:"A",\u00C7:"C",\u1E08:"C",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u1EBE:"E",\u1E16:"E",\u1EC0:"E",\u1E14:"E",\u1E1C:"E",\u0206:"E",\u1EBA:"E",\u1EBC:"E",\u1EB8:"E",\u1EC2:"E",\u1EC4:"E",\u1EC6:"E",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u1E2E:"I",\u020A:"I",\u1EC8:"I",\u1ECA:"I",\u00D0:"D",\u00D1:"N",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u1ED0:"O",\u1E4C:"O",\u1E52:"O",\u020E:"O",\u1ECE:"O",\u1ECC:"O",\u1ED4:"O",\u1ED6:"O",\u1ED8:"O",\u1EDC:"O",\u1EDE:"O",\u1EE0:"O",\u1EDA:"O",\u1EE2:"O",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u1EE6:"U",\u1EE4:"U",\u1EEC:"U",\u1EEE:"U",\u1EF0:"U",\u00DD:"Y",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u1EA5:"a",\u1EAF:"a",\u1EB3:"a",\u1EB5:"a",\u1EB7:"a",\u00E6:"ae",\u1EA7:"a",\u1EB1:"a",\u0203:"a",\u1EA3:"a",\u1EA1:"a",\u1EA9:"a",\u1EAB:"a",\u1EAD:"a",\u00E7:"c",\u1E09:"c",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u1EBF:"e",\u1E17:"e",\u1EC1:"e",\u1E15:"e",\u1E1D:"e",\u0207:"e",\u1EBB:"e",\u1EBD:"e",\u1EB9:"e",\u1EC3:"e",\u1EC5:"e",\u1EC7:"e",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u1E2F:"i",\u020B:"i",\u1EC9:"i",\u1ECB:"i",\u00F0:"d",\u00F1:"n",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u1ED1:"o",\u1E4D:"o",\u1E53:"o",\u020F:"o",\u1ECF:"o",\u1ECD:"o",\u1ED5:"o",\u1ED7:"o",\u1ED9:"o",\u1EDD:"o",\u1EDF:"o",\u1EE1:"o",\u1EDB:"o",\u1EE3:"o",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u1EE7:"u",\u1EE5:"u",\u1EED:"u",\u1EEF:"u",\u1EF1:"u",\u00FD:"y",\u00FF:"y",\u0100:"A",\u0101:"a",\u0102:"A",\u0103:"a",\u0104:"A",\u0105:"a",\u0106:"C",\u0107:"c",\u0108:"C",\u0109:"c",\u010A:"C",\u010B:"c",\u010C:"C",\u010D:"c",C\u0306:"C",c\u0306:"c",\u010E:"D",\u010F:"d",\u0110:"D",\u0111:"d",\u0112:"E",\u0113:"e",\u0114:"E",\u0115:"e",\u0116:"E",\u0117:"e",\u0118:"E",\u0119:"e",\u011A:"E",\u011B:"e",\u011C:"G",\u01F4:"G",\u011D:"g",\u01F5:"g",\u011E:"G",\u011F:"g",\u0120:"G",\u0121:"g",\u0122:"G",\u0123:"g",\u0124:"H",\u0125:"h",\u0126:"H",\u0127:"h",\u1E2A:"H",\u1E2B:"h",\u0128:"I",\u0129:"i",\u012A:"I",\u012B:"i",\u012C:"I",\u012D:"i",\u012E:"I",\u012F:"i",\u0130:"I",\u0131:"i",\u0132:"IJ",\u0133:"ij",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u1E30:"K",\u1E31:"k",K\u0306:"K",k\u0306:"k",\u0139:"L",\u013A:"l",\u013B:"L",\u013C:"l",\u013D:"L",\u013E:"l",\u013F:"L",\u0140:"l",\u0141:"l",\u0142:"l",\u1E3E:"M",\u1E3F:"m",M\u0306:"M",m\u0306:"m",\u0143:"N",\u0144:"n",\u0145:"N",\u0146:"n",\u0147:"N",\u0148:"n",\u0149:"n",N\u0306:"N",n\u0306:"n",\u014C:"O",\u014D:"o",\u014E:"O",\u014F:"o",\u0150:"O",\u0151:"o",\u0152:"OE",\u0153:"oe",P\u0306:"P",p\u0306:"p",\u0154:"R",\u0155:"r",\u0156:"R",\u0157:"r",\u0158:"R",\u0159:"r",R\u0306:"R",r\u0306:"r",\u0212:"R",\u0213:"r",\u015A:"S",\u015B:"s",\u015C:"S",\u015D:"s",\u015E:"S",\u0218:"S",\u0219:"s",\u015F:"s",\u0160:"S",\u0161:"s",\u0162:"T",\u0163:"t",\u021B:"t",\u021A:"T",\u0164:"T",\u0165:"t",\u0166:"T",\u0167:"t",T\u0306:"T",t\u0306:"t",\u0168:"U",\u0169:"u",\u016A:"U",\u016B:"u",\u016C:"U",\u016D:"u",\u016E:"U",\u016F:"u",\u0170:"U",\u0171:"u",\u0172:"U",\u0173:"u",\u0216:"U",\u0217:"u",V\u0306:"V",v\u0306:"v",\u0174:"W",\u0175:"w",\u1E82:"W",\u1E83:"w",X\u0306:"X",x\u0306:"x",\u0176:"Y",\u0177:"y",\u0178:"Y",Y\u0306:"Y",y\u0306:"y",\u0179:"Z",\u017A:"z",\u017B:"Z",\u017C:"z",\u017D:"Z",\u017E:"z",\u017F:"s",\u0192:"f",\u01A0:"O",\u01A1:"o",\u01AF:"U",\u01B0:"u",\u01CD:"A",\u01CE:"a",\u01CF:"I",\u01D0:"i",\u01D1:"O",\u01D2:"o",\u01D3:"U",\u01D4:"u",\u01D5:"U",\u01D6:"u",\u01D7:"U",\u01D8:"u",\u01D9:"U",\u01DA:"u",\u01DB:"U",\u01DC:"u",\u1EE8:"U",\u1EE9:"u",\u1E78:"U",\u1E79:"u",\u01FA:"A",\u01FB:"a",\u01FC:"AE",\u01FD:"ae",\u01FE:"O",\u01FF:"o",\u00DE:"TH",\u00FE:"th",\u1E54:"P",\u1E55:"p",\u1E64:"S",\u1E65:"s",X\u0301:"X",x\u0301:"x",\u0403:"\u0413",\u0453:"\u0433",\u040C:"\u041A",\u045C:"\u043A",A\u030B:"A",a\u030B:"a",E\u030B:"E",e\u030B:"e",I\u030B:"I",i\u030B:"i",\u01F8:"N",\u01F9:"n",\u1ED2:"O",\u1ED3:"o",\u1E50:"O",\u1E51:"o",\u1EEA:"U",\u1EEB:"u",\u1E80:"W",\u1E81:"w",\u1EF2:"Y",\u1EF3:"y",\u0200:"A",\u0201:"a",\u0204:"E",\u0205:"e",\u0208:"I",\u0209:"i",\u020C:"O",\u020D:"o",\u0210:"R",\u0211:"r",\u0214:"U",\u0215:"u",B\u030C:"B",b\u030C:"b",\u010C\u0323:"C",\u010D\u0323:"c",\u00CA\u030C:"E",\u00EA\u030C:"e",F\u030C:"F",f\u030C:"f",\u01E6:"G",\u01E7:"g",\u021E:"H",\u021F:"h",J\u030C:"J",\u01F0:"j",\u01E8:"K",\u01E9:"k",M\u030C:"M",m\u030C:"m",P\u030C:"P",p\u030C:"p",Q\u030C:"Q",q\u030C:"q",\u0158\u0329:"R",\u0159\u0329:"r",\u1E66:"S",\u1E67:"s",V\u030C:"V",v\u030C:"v",W\u030C:"W",w\u030C:"w",X\u030C:"X",x\u030C:"x",Y\u030C:"Y",y\u030C:"y",A\u0327:"A",a\u0327:"a",B\u0327:"B",b\u0327:"b",\u1E10:"D",\u1E11:"d",\u0228:"E",\u0229:"e",\u0190\u0327:"E",\u025B\u0327:"e",\u1E28:"H",\u1E29:"h",I\u0327:"I",i\u0327:"i",\u0197\u0327:"I",\u0268\u0327:"i",M\u0327:"M",m\u0327:"m",O\u0327:"O",o\u0327:"o",Q\u0327:"Q",q\u0327:"q",U\u0327:"U",u\u0327:"u",X\u0327:"X",x\u0327:"x",Z\u0327:"Z",z\u0327:"z",\u0439:"\u0438",\u0419:"\u0418",\u0451:"\u0435",\u0401:"\u0415"},FM=Object.keys(NM).join("|"),Yfe=new RegExp(FM,"g"),qfe=new RegExp(FM,"");function Zfe(e){return NM[e]}var DM=function(e){return e.replace(Yfe,Zfe)},Kfe=function(e){return!!e.match(qfe)};B_.exports=DM;B_.exports.has=Kfe;B_.exports.remove=DM});var hI=Ie((yDe,u8)=>{u8.exports=window.wp.styleEngine});var yI=Ie((ADe,v8)=>{"use strict";v8.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;for(n of t.entries())if(!e(n[1],r.get(n[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(t[n]!==r[n])return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),o=i.length,o!==Object.keys(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}});var sw=Ie((IDe,S8)=>{"use strict";var kpe=function(t){return Epe(t)&&!Rpe(t)};function Epe(e){return!!e&&typeof e=="object"}function Rpe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Ipe(e)}var Ape=typeof Symbol=="function"&&Symbol.for,Ope=Ape?Symbol.for("react.element"):60103;function Ipe(e){return e.$$typeof===Ope}function Npe(e){return Array.isArray(e)?[]:{}}function By(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ap(Npe(e),e,t):e}function Fpe(e,t,r){return e.concat(t).map(function(o){return By(o,r)})}function Dpe(e,t){if(!t.customMerge)return Ap;var r=t.customMerge(e);return typeof r=="function"?r:Ap}function Bpe(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function y8(e){return Object.keys(e).concat(Bpe(e))}function b8(e,t){try{return t in e}catch{return!1}}function Mpe(e,t){return b8(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function Lpe(e,t,r){var o={};return r.isMergeableObject(e)&&y8(e).forEach(function(n){o[n]=By(e[n],r)}),y8(t).forEach(function(n){Mpe(e,n)||(b8(e,n)&&r.isMergeableObject(t[n])?o[n]=Dpe(n,r)(e[n],t[n],r):o[n]=By(t[n],r))}),o}function Ap(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||Fpe,r.isMergeableObject=r.isMergeableObject||kpe,r.cloneUnlessOtherwiseSpecified=By;var o=Array.isArray(t),n=Array.isArray(e),i=o===n;return i?o?r.arrayMerge(e,t,r):Lpe(e,t,r):By(t,r)}Ap.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(o,n){return Ap(o,n,r)},{})};var Vpe=Ap;S8.exports=Vpe});var NI=Ie(II=>{"use strict";Object.defineProperty(II,"__esModule",{value:!0});II.default=a7;function a7(){}a7.prototype={diff:function(t,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=o.callback;typeof o=="function"&&(n=o,o={}),this.options=o;var i=this;function a(v){return n?(setTimeout(function(){n(void 0,v)},0),!0):v}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var l=r.length,c=t.length,u=1,d=l+c,f=[{newPos:-1,components:[]}],m=this.extractCommon(f[0],r,t,0);if(f[0].newPos+1>=l&&m+1>=c)return a([{value:this.join(r),count:r.length}]);function h(){for(var v=-1*u;v<=u;v+=2){var y=void 0,b=f[v-1],_=f[v+1],S=(_?_.newPos:0)-v;b&&(f[v-1]=void 0);var x=b&&b.newPos+1<l,T=_&&0<=S&&S<c;if(!x&&!T){f[v]=void 0;continue}if(!x||T&&b.newPos<_.newPos?(y=Ohe(_),i.pushComponent(y.components,void 0,!0)):(y=b,y.newPos++,i.pushComponent(y.components,!0,void 0)),S=i.extractCommon(y,r,t,v),y.newPos+1>=l&&S+1>=c)return a(Ahe(i,y.components,r,t,i.useLongestToken));f[v]=y}u++}if(n)(function v(){setTimeout(function(){if(u>d)return n();h()||v()},0)})();else for(;u<=d;){var g=h();if(g)return g}},pushComponent:function(t,r,o){var n=t[t.length-1];n&&n.added===r&&n.removed===o?t[t.length-1]={count:n.count+1,added:r,removed:o}:t.push({count:1,added:r,removed:o})},extractCommon:function(t,r,o,n){for(var i=r.length,a=o.length,l=t.newPos,c=l-n,u=0;l+1<i&&c+1<a&&this.equals(r[l+1],o[c+1]);)l++,c++,u++;return u&&t.components.push({count:u}),t.newPos=l,c},equals:function(t,r){return this.options.comparator?this.options.comparator(t,r):t===r||this.options.ignoreCase&&t.toLowerCase()===r.toLowerCase()},removeEmpty:function(t){for(var r=[],o=0;o<t.length;o++)t[o]&&r.push(t[o]);return r},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function Ahe(e,t,r,o,n){for(var i=0,a=t.length,l=0,c=0;i<a;i++){var u=t[i];if(u.removed){if(u.value=e.join(o.slice(c,c+u.count)),c+=u.count,i&&t[i-1].added){var f=t[i-1];t[i-1]=t[i],t[i]=f}}else{if(!u.added&&n){var d=r.slice(l,l+u.count);d=d.map(function(h,g){var v=o[c+g];return v.length>h.length?v:h}),u.value=e.join(d)}else u.value=e.join(r.slice(l,l+u.count));l+=u.count,u.added||(c+=u.count)}}var m=t[a-1];return a>1&&typeof m.value=="string"&&(m.added||m.removed)&&e.equals("",m.value)&&(t[a-2].value+=m.value,t.pop()),t}function Ohe(e){return{newPos:e.newPos,components:e.components.slice(0)}}});var FI=Ie(Hy=>{"use strict";Object.defineProperty(Hy,"__esModule",{value:!0});Hy.diffArrays=Fhe;Hy.arrayDiff=void 0;var Ihe=Nhe(NI());function Nhe(e){return e&&e.__esModule?e:{default:e}}var Uy=new Ihe.default;Hy.arrayDiff=Uy;Uy.tokenize=function(e){return e.slice()};Uy.join=Uy.removeEmpty=function(e){return e};function Fhe(e,t,r){return Uy.diff(e,t,r)}});var l7=Ie(DI=>{"use strict";Object.defineProperty(DI,"__esModule",{value:!0});DI.generateOptions=Dhe;function Dhe(e,t){if(typeof e=="function")t.callback=e;else if(e)for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}});var BI=Ie(Vp=>{"use strict";Object.defineProperty(Vp,"__esModule",{value:!0});Vp.diffWords=Vhe;Vp.diffWordsWithSpace=jhe;Vp.wordDiff=void 0;var Bhe=Lhe(NI()),Mhe=l7();function Lhe(e){return e&&e.__esModule?e:{default:e}}var c7=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,u7=/\S/,Gy=new Bhe.default;Vp.wordDiff=Gy;Gy.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!u7.test(e)&&!u7.test(t)};Gy.tokenize=function(e){for(var t=e.split(/(\s+|[()[\]{}'"]|\b)/),r=0;r<t.length-1;r++)!t[r+1]&&t[r+2]&&c7.test(t[r])&&c7.test(t[r+2])&&(t[r]+=t[r+2],t.splice(r+1,2),r--);return t};function Vhe(e,t,r){return r=(0,Mhe.generateOptions)(r,{ignoreWhitespace:!0}),Gy.diff(e,t,r)}function jhe(e,t,r){return Gy.diff(e,t,r)}});var f7=Ie((jBe,d7)=>{d7.exports=window.wp.blockSerializationDefaultParser});var Wy=Ie((zBe,m7)=>{m7.exports=window.wp.richText});var jI=Ie((XBe,x7)=>{x7.exports=window.wp.commands});var T7=Ie((QBe,C7)=>{C7.exports=window.wp.viewport});var _u=Ie((JBe,P7)=>{P7.exports=window.wp.plugins});var Y9=Ie((SVe,W9)=>{W9.exports=window.wp.uploadMedia});var Oi=Ie((AVe,ij)=>{ij.exports=window.wp.keyboardShortcuts});var yo=Ie((IVe,aj)=>{aj.exports=window.wp.keycodes});var xh=Ie((nZe,qG)=>{qG.exports=window.wp.dom});var qY=Ie((kXe,YY)=>{YY.exports=window.wp.warning});var FX=Ie((ltt,NX)=>{"use strict";var fTe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";NX.exports=fTe});var LX=Ie((ctt,MX)=>{"use strict";var mTe=FX();function DX(){}function BX(){}BX.resetWarningCache=DX;MX.exports=function(){function e(o,n,i,a,l,c){if(c!==mTe){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:BX,resetWarningCache:DX};return r.PropTypes=r,r}});var jX=Ie((ftt,VX)=>{VX.exports=LX()();var utt,dtt});var UX=Ie((TP,zX)=>{(function(e,t){if(typeof define=="function"&&define.amd)define(["module","exports"],t);else if(typeof TP<"u")t(zX,TP);else{var r={exports:{}};t(r,r.exports),e.autosize=r.exports}})(TP,function(e,t){"use strict";var r=typeof Map=="function"?new Map:(function(){var c=[],u=[];return{has:function(f){return c.indexOf(f)>-1},get:function(f){return u[c.indexOf(f)]},set:function(f,m){c.indexOf(f)===-1&&(c.push(f),u.push(m))},delete:function(f){var m=c.indexOf(f);m>-1&&(c.splice(m,1),u.splice(m,1))}}})(),o=function(u){return new Event(u,{bubbles:!0})};try{new Event("test")}catch{o=function(d){var f=document.createEvent("Event");return f.initEvent(d,!0,!1),f}}function n(c){if(!c||!c.nodeName||c.nodeName!=="TEXTAREA"||r.has(c))return;var u=null,d=null,f=null;function m(){var S=window.getComputedStyle(c,null);S.resize==="vertical"?c.style.resize="none":S.resize==="both"&&(c.style.resize="horizontal"),S.boxSizing==="content-box"?u=-(parseFloat(S.paddingTop)+parseFloat(S.paddingBottom)):u=parseFloat(S.borderTopWidth)+parseFloat(S.borderBottomWidth),isNaN(u)&&(u=0),y()}function h(S){{var x=c.style.width;c.style.width="0px",c.offsetWidth,c.style.width=x}c.style.overflowY=S}function g(S){for(var x=[];S&&S.parentNode&&S.parentNode instanceof Element;)S.parentNode.scrollTop&&x.push({node:S.parentNode,scrollTop:S.parentNode.scrollTop}),S=S.parentNode;return x}function v(){if(c.scrollHeight!==0){var S=g(c),x=document.documentElement&&document.documentElement.scrollTop;c.style.height="",c.style.height=c.scrollHeight+u+"px",d=c.clientWidth,S.forEach(function(T){T.node.scrollTop=T.scrollTop}),x&&(document.documentElement.scrollTop=x)}}function y(){v();var S=Math.round(parseFloat(c.style.height)),x=window.getComputedStyle(c,null),T=x.boxSizing==="content-box"?Math.round(parseFloat(x.height)):c.offsetHeight;if(T<S?x.overflowY==="hidden"&&(h("scroll"),v(),T=x.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight):x.overflowY!=="hidden"&&(h("hidden"),v(),T=x.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight),f!==T){f=T;var R=o("autosize:resized");try{c.dispatchEvent(R)}catch{}}}var b=function(){c.clientWidth!==d&&y()},_=function(S){window.removeEventListener("resize",b,!1),c.removeEventListener("input",y,!1),c.removeEventListener("keyup",y,!1),c.removeEventListener("autosize:destroy",_,!1),c.removeEventListener("autosize:update",y,!1),Object.keys(S).forEach(function(x){c.style[x]=S[x]}),r.delete(c)}.bind(c,{height:c.style.height,resize:c.style.resize,overflowY:c.style.overflowY,overflowX:c.style.overflowX,wordWrap:c.style.wordWrap});c.addEventListener("autosize:destroy",_,!1),"onpropertychange"in c&&"oninput"in c&&c.addEventListener("keyup",y,!1),window.addEventListener("resize",b,!1),c.addEventListener("input",y,!1),c.addEventListener("autosize:update",y,!1),c.style.overflowX="hidden",c.style.wordWrap="break-word",r.set(c,{destroy:_,update:y}),m()}function i(c){var u=r.get(c);u&&u.destroy()}function a(c){var u=r.get(c);u&&u.update()}var l=null;typeof window>"u"||typeof window.getComputedStyle!="function"?(l=function(u){return u},l.destroy=function(c){return c},l.update=function(c){return c}):(l=function(u,d){return u&&Array.prototype.forEach.call(u.length?u:[u],function(f){return n(f,d)}),u},l.destroy=function(c){return c&&Array.prototype.forEach.call(c.length?c:[c],i),c},l.update=function(c){return c&&Array.prototype.forEach.call(c.length?c:[c],a),c}),t.default=l,e.exports=t.default})});var GX=Ie((mtt,HX)=>{var pTe=function(e,t,r){return r=window.getComputedStyle,(r?r(e):e.currentStyle)[t.replace(/-(\w)/gi,function(o,n){return n.toUpperCase()})]};HX.exports=pTe});var YX=Ie((ptt,WX)=>{var _4=GX();function hTe(e){var t=_4(e,"line-height"),r=parseFloat(t,10);if(t===r+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=_4(e,"line-height"),r=parseFloat(t,10),o?e.style.lineHeight=o:delete e.style.lineHeight}if(t.indexOf("pt")!==-1?(r*=4,r/=3):t.indexOf("mm")!==-1?(r*=96,r/=25.4):t.indexOf("cm")!==-1?(r*=96,r/=2.54):t.indexOf("in")!==-1?r*=96:t.indexOf("pc")!==-1&&(r*=16),r=Math.round(r),t==="normal"){var n=e.nodeName,i=document.createElement(n);i.innerHTML="&nbsp;",n.toUpperCase()==="TEXTAREA"&&i.setAttribute("rows","1");var a=_4(e,"font-size");i.style.fontSize=a,i.style.padding="0px",i.style.border="0px";var l=document.body;l.appendChild(i);var c=i.offsetHeight;r=c,l.removeChild(i)}return r}WX.exports=hTe});var ZX=Ie(Pc=>{"use strict";var gTe=Pc&&Pc.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var o in r)r.hasOwnProperty(o)&&(t[o]=r[o])};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})(),w4=Pc&&Pc.__assign||Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++){t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},vTe=Pc&&Pc.__rest||function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&(r[o[n]]=e[o[n]]);return r};Pc.__esModule=!0;var kP=Jn(),_0=jX(),PP=UX(),yTe=YX(),bTe=yTe,qX="autosize:resized",STe=(function(e){gTe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={lineHeight:null},r.textarea=null,r.onResize=function(o){r.props.onResize&&r.props.onResize(o)},r.updateLineHeight=function(){r.textarea&&r.setState({lineHeight:bTe(r.textarea)})},r.onChange=function(o){var n=r.props.onChange;r.currentValue=o.currentTarget.value,n&&n(o)},r}return t.prototype.componentDidMount=function(){var r=this,o=this.props,n=o.maxRows,i=o.async;typeof n=="number"&&this.updateLineHeight(),typeof n=="number"||i?setTimeout(function(){return r.textarea&&PP(r.textarea)}):this.textarea&&PP(this.textarea),this.textarea&&this.textarea.addEventListener(qX,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(qX,this.onResize),PP.destroy(this.textarea))},t.prototype.render=function(){var r=this,o=this,n=o.props,i=n.onResize,a=n.maxRows,l=n.onChange,c=n.style,u=n.innerRef,d=n.children,f=vTe(n,["onResize","maxRows","onChange","style","innerRef","children"]),m=o.state.lineHeight,h=a&&m?m*a:null;return kP.createElement("textarea",w4({},f,{onChange:this.onChange,style:h?w4({},c,{maxHeight:h}):c,ref:function(g){r.textarea=g,typeof r.props.innerRef=="function"?r.props.innerRef(g):r.props.innerRef&&(r.props.innerRef.current=g)}}),d)},t.prototype.componentDidUpdate=function(){this.textarea&&PP.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:_0.number,maxRows:_0.number,onResize:_0.func,innerRef:_0.any,async:_0.bool},t})(kP.Component);Pc.TextareaAutosize=kP.forwardRef(function(e,t){return kP.createElement(STe,w4({},e,{innerRef:t}))})});var x4=Ie((gtt,KX)=>{"use strict";var _Te=ZX();KX.exports=_Te.TextareaAutosize});var k0=Ie((rrt,kQ)=>{kQ.exports=window.wp.wordcount});var XQ=Ie((yrt,KQ)=>{KQ.exports=window.wp.serverSideRender});var SAe={};Qc(SAe,{AlignmentToolbar:()=>OTe,Autocomplete:()=>ATe,AutosaveMonitor:()=>Xx,BlockAlignmentToolbar:()=>ITe,BlockControls:()=>NTe,BlockEdit:()=>FTe,BlockEditorKeyboardShortcuts:()=>DTe,BlockFormatControls:()=>BTe,BlockIcon:()=>MTe,BlockInspector:()=>LTe,BlockList:()=>VTe,BlockMover:()=>jTe,BlockNavigationDropdown:()=>zTe,BlockSelectionClearer:()=>UTe,BlockSettingsMenu:()=>HTe,BlockTitle:()=>GTe,BlockToolbar:()=>WTe,CharacterCount:()=>wg,ColorPalette:()=>YTe,ContrastChecker:()=>qTe,CopyHandler:()=>ZTe,DefaultBlockAppender:()=>KTe,DocumentBar:()=>fC,DocumentOutline:()=>Ah,DocumentOutlineCheck:()=>MW,EditorHistoryRedo:()=>yC,EditorHistoryUndo:()=>_C,EditorKeyboardShortcuts:()=>Tf,EditorKeyboardShortcutsRegister:()=>GW,EditorNotices:()=>tY,EditorProvider:()=>Fj,EditorSnackbars:()=>iY,EntitiesSavedStates:()=>RC,ErrorBoundary:()=>yY,FontSizePicker:()=>XTe,InnerBlocks:()=>JTe,Inserter:()=>QTe,InspectorAdvancedControls:()=>$Te,InspectorControls:()=>ePe,LocalAutosaveMonitor:()=>wY,MediaPlaceholder:()=>sPe,MediaUpload:()=>aPe,MediaUploadCheck:()=>lPe,MultiSelectScrollIntoView:()=>cPe,NavigableToolbar:()=>uPe,ObserveTyping:()=>dPe,PageAttributesCheck:()=>Nh,PageAttributesOrder:()=>EY,PageAttributesPanel:()=>DC,PageAttributesParent:()=>VY,PageTemplate:()=>VC,PanelColorSettings:()=>tPe,PlainText:()=>rPe,PluginBlockSettingsMenuItem:()=>nq,PluginDocumentSettingPanel:()=>GC,PluginMoreMenuItem:()=>lq,PluginPostPublishPanel:()=>YC,PluginPostStatusInfo:()=>ZC,PluginPrePublishPanel:()=>XC,PluginPreviewMenuItem:()=>vq,PluginSidebar:()=>nm,PluginSidebarMoreMenuItem:()=>Sq,PostAuthor:()=>oT,PostAuthorCheck:()=>nT,PostAuthorPanel:()=>aT,PostComments:()=>dT,PostDiscussionPanel:()=>vT,PostExcerpt:()=>t0,PostExcerptCheck:()=>lm,PostExcerptPanel:()=>CZ,PostFeaturedImage:()=>n0,PostFeaturedImageCheck:()=>_c,PostFeaturedImagePanel:()=>kT,PostFormat:()=>s0,PostFormatCheck:()=>Kh,PostLastRevision:()=>AT,PostLastRevisionCheck:()=>dm,PostLastRevisionPanel:()=>GZ,PostLockedModal:()=>QZ,PostPendingStatus:()=>tK,PostPendingStatusCheck:()=>IT,PostPingbacks:()=>hT,PostPreviewButton:()=>od,PostPublishButton:()=>eg,PostPublishButtonLabel:()=>DT,PostPublishPanel:()=>oP,PostSavedState:()=>pP,PostSchedule:()=>og,PostScheduleCheck:()=>hP,PostScheduleLabel:()=>ng,PostSchedulePanel:()=>yP,PostSticky:()=>sP,PostStickyCheck:()=>nP,PostSwitchToDraftButton:()=>TX,PostSyncStatus:()=>_P,PostTaxonomies:()=>fg,PostTaxonomiesCheck:()=>wP,PostTaxonomiesFlatTermSelector:()=>c4,PostTaxonomiesHierarchicalTermSelector:()=>f4,PostTaxonomiesPanel:()=>CP,PostTemplatePanel:()=>eT,PostTextEditor:()=>w0,PostTitle:()=>BP,PostTitleRaw:()=>LP,PostTrash:()=>zP,PostTrashCheck:()=>VP,PostTypeSupportCheck:()=>tr,PostURL:()=>P0,PostURLCheck:()=>GP,PostURLLabel:()=>wQ,PostURLPanel:()=>ZP,PostVisibility:()=>u0,PostVisibilityCheck:()=>PQ,PostVisibilityLabel:()=>VT,RichText:()=>eJ,RichTextShortcut:()=>oPe,RichTextToolbarButton:()=>nPe,ServerSideRender:()=>JQ.default,SkipToSelectedBlock:()=>fPe,TableOfContents:()=>HQ,TextEditorGlobalKeyboardShortcuts:()=>EPe,ThemeSupportCheck:()=>CT,TimeToRead:()=>_g,URLInput:()=>mPe,URLInputButton:()=>pPe,URLPopover:()=>hPe,UnsavedChangesWarning:()=>ZQ,VisualEditorGlobalKeyboardShortcuts:()=>kPe,Warning:()=>gPe,WordCount:()=>Sg,WritingFlow:()=>vPe,__unstableRichTextInputEvent:()=>iPe,cleanForSlug:()=>FD,createCustomColorsHOC:()=>yPe,getColorClassName:()=>bPe,getColorObjectByAttributeValues:()=>SPe,getColorObjectByColorValue:()=>_Pe,getFontSize:()=>wPe,getFontSizeClass:()=>xPe,getTemplatePartIcon:()=>$c,mediaUpload:()=>r_,privateApis:()=>tae,registerEntityAction:()=>gAe,registerEntityField:()=>yAe,store:()=>w,storeConfig:()=>Ay,transformStyles:()=>rae.transformStyles,unregisterEntityAction:()=>vAe,unregisterEntityField:()=>bAe,useEntitiesSavedStatesIsDirty:()=>EC,usePostScheduleLabel:()=>ig,usePostURLLabel:()=>E4,usePostVisibilityLabel:()=>e4,userAutocompleter:()=>Zx,withColorContext:()=>CPe,withColors:()=>TPe,withFontSizes:()=>PPe});var DG=s(O(),1),BG=s(W(),1),MG=s(D(),1),LG=s(he(),1),VG=s(mo(),1);var qx=s(O(),1);var MF=s(O(),1);var NF=s($(),1),FF={...NF.SETTINGS_DEFAULTS,richEditingEnabled:!0,codeEditingEnabled:!0,fontLibraryEnabled:!0,enableCustomFields:void 0,defaultRenderingMode:"post-only"};var DF=s(O(),1);function dae(e={},t){return t.type==="SET_IS_READY"?{...e,[t.kind]:{...e[t.kind],[t.name]:!0}}:e}function fae(e={},t){switch(t.type){case"REGISTER_ENTITY_ACTION":return{...e,[t.kind]:{...e[t.kind],[t.name]:[...(e[t.kind]?.[t.name]??[]).filter(r=>r.id!==t.config.id),t.config]}};case"UNREGISTER_ENTITY_ACTION":return{...e,[t.kind]:{...e[t.kind],[t.name]:(e[t.kind]?.[t.name]??[]).filter(r=>r.id!==t.actionId)}}}return e}function mae(e={},t){switch(t.type){case"REGISTER_ENTITY_FIELD":return{...e,[t.kind]:{...e[t.kind],[t.name]:[...(e[t.kind]?.[t.name]??[]).filter(r=>r.id!==t.config.id),t.config]}};case"UNREGISTER_ENTITY_FIELD":return{...e,[t.kind]:{...e[t.kind],[t.name]:(e[t.kind]?.[t.name]??[]).filter(r=>r.id!==t.fieldId)}}}return e}var BF=(0,DF.combineReducers)({actions:fae,fields:mae,isReady:dae});function P1(e){return e&&typeof e=="object"&&"raw"in e?e.raw:e}function pae(e=null,t){return t.type==="SET_EDITED_POST"?t.postId:e}function hae(e=null,t){return t.type==="SET_CURRENT_TEMPLATE_ID"?t.id:e}function gae(e=null,t){return t.type==="SET_EDITED_POST"?t.postType:e}function vae(e={isValid:!0},t){return t.type==="SET_TEMPLATE_VALIDITY"?{...e,isValid:t.isValid}:e}function yae(e={},t){switch(t.type){case"REQUEST_POST_UPDATE_START":case"REQUEST_POST_UPDATE_FINISH":return{pending:t.type==="REQUEST_POST_UPDATE_START",options:t.options||{}}}return e}function bae(e={},t){switch(t.type){case"REQUEST_POST_DELETE_START":case"REQUEST_POST_DELETE_FINISH":return{pending:t.type==="REQUEST_POST_DELETE_START"}}return e}function Sae(e={isLocked:!1},t){return t.type==="UPDATE_POST_LOCK"?t.lock:e}function _ae(e={},t){switch(t.type){case"LOCK_POST_SAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_SAVING":{let{[t.lockName]:r,...o}=e;return o}}return e}function wae(e={},t){switch(t.type){case"LOCK_POST_AUTOSAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_AUTOSAVING":{let{[t.lockName]:r,...o}=e;return o}}return e}function xae(e=FF,t){return t.type==="UPDATE_EDITOR_SETTINGS"?{...e,...t.settings}:e}function Cae(e="post-only",t){return t.type==="SET_RENDERING_MODE"?t.mode:e}function Tae(e="Desktop",t){return t.type==="SET_DEVICE_TYPE"?t.deviceType:e}function Pae(e=[],t){switch(t.type){case"REMOVE_PANEL":if(!e.includes(t.panelName))return[...e,t.panelName]}return e}function kae(e=!1,t){switch(t.type){case"SET_IS_LIST_VIEW_OPENED":return t.isOpen?!1:e;case"SET_IS_INSERTER_OPENED":return t.value}return e}function Eae(e=!1,t){switch(t.type){case"SET_IS_INSERTER_OPENED":return t.value?!1:e;case"SET_IS_LIST_VIEW_OPENED":return t.isOpen}return e}function Rae(e={current:null}){return e}function Aae(e={current:null}){return e}function Oae(e=!1,t){switch(t.type){case"OPEN_PUBLISH_SIDEBAR":return!0;case"CLOSE_PUBLISH_SIDEBAR":return!1;case"TOGGLE_PUBLISH_SIDEBAR":return!e}return e}function Iae(e="/",t){switch(t.type){case"SET_STYLES_PATH":return t.path;case"RESET_STYLES_NAVIGATION":return"/"}return e}function Nae(e=!1,t){switch(t.type){case"SET_SHOW_STYLEBOOK":return t.show;case"RESET_STYLES_NAVIGATION":return!1}return e}function Fae(e=0,t){return t.type==="SET_CANVAS_MIN_HEIGHT"?t.minHeight:e}function Dae(e=null,t){return t.type==="SET_CURRENT_REVISION_ID"?t.revisionId:e}function Bae(e=1,t){switch(t.type){case"SET_REVISION_PAGE":return t.page;case"SET_CURRENT_REVISION_ID":return t.revisionId?e:1}return e}function Mae(e=!0,t){switch(t.type){case"SET_SHOW_REVISION_DIFF":return t.showDiff;case"SET_CURRENT_REVISION_ID":return t.revisionId?e:!0}return e}function Lae(e={},t){return t.type==="SELECT_NOTE"?{noteId:t.noteId,options:t.options}:e}var LF=(0,MF.combineReducers)({postId:pae,postType:gae,templateId:hae,saving:yae,deleting:bae,postLock:Sae,template:vae,postSavingLock:_ae,editorSettings:xae,postAutosavingLock:wae,renderingMode:Cae,deviceType:Tae,removedPanels:Pae,blockInserterPanel:kae,inserterSidebarToggleRef:Aae,listViewPanel:Eae,listViewToggleRef:Rae,publishSidebarActive:Oae,stylesPath:Iae,showStylebook:Nae,canvasMinHeight:Fae,revisionId:Dae,revisionPage:Bae,showRevisionDiff:Mae,selectedNote:Lae,dataviews:BF});var uO={};Qc(uO,{__experimentalGetDefaultTemplatePartAreas:()=>Rce,__experimentalGetDefaultTemplateType:()=>Ace,__experimentalGetDefaultTemplateTypes:()=>Ece,__experimentalGetTemplateInfo:()=>Oce,__unstableIsEditorReady:()=>xle,canInsertBlockType:()=>Cce,canUserUseUnfilteredHTML:()=>hle,didPostSaveRequestFail:()=>rle,didPostSaveRequestSucceed:()=>tle,getActivePostLock:()=>ple,getAdjacentBlockClientId:()=>Kle,getAutosaveAttribute:()=>oD,getBlock:()=>Fle,getBlockAttributes:()=>Nle,getBlockCount:()=>jle,getBlockHierarchyRootClientId:()=>Zle,getBlockIndex:()=>cce,getBlockInsertionPoint:()=>bce,getBlockListSettings:()=>kce,getBlockMode:()=>gce,getBlockName:()=>Ole,getBlockOrder:()=>lce,getBlockRootClientId:()=>qle,getBlockSelectionEnd:()=>Ule,getBlockSelectionStart:()=>zle,getBlocks:()=>Dle,getBlocksByClientId:()=>Vle,getClientIdsOfDescendants:()=>Ble,getClientIdsWithDescendants:()=>Mle,getCurrentPost:()=>$r,getCurrentPostAttribute:()=>Zv,getCurrentPostId:()=>Ki,getCurrentPostLastRevisionId:()=>Gae,getCurrentPostRevisionsCount:()=>lO,getCurrentPostType:()=>Qn,getCurrentTemplateId:()=>Hae,getDeviceType:()=>Tle,getEditedPostAttribute:()=>Jt,getEditedPostContent:()=>Jv,getEditedPostPreviewLink:()=>ile,getEditedPostSlug:()=>cle,getEditedPostVisibility:()=>Yae,getEditorBlocks:()=>vle,getEditorMode:()=>Ele,getEditorSelection:()=>wle,getEditorSelectionEnd:()=>_le,getEditorSelectionStart:()=>Sle,getEditorSettings:()=>Cle,getFirstMultiSelectedBlockClientId:()=>tce,getGlobalBlockCount:()=>Lle,getInserterItems:()=>Tce,getLastMultiSelectedBlockClientId:()=>rce,getMultiSelectedBlockClientIds:()=>$le,getMultiSelectedBlocks:()=>ece,getMultiSelectedBlocksEndClientId:()=>ace,getMultiSelectedBlocksStartClientId:()=>sce,getNextBlockClientId:()=>Qle,getPermalink:()=>lle,getPermalinkParts:()=>aD,getPostEdits:()=>Qv,getPostLockUser:()=>mle,getPostTypeLabel:()=>Ice,getPreviousBlockClientId:()=>Xle,getRenderingMode:()=>JS,getSelectedBlock:()=>Yle,getSelectedBlockClientId:()=>Wle,getSelectedBlockCount:()=>Hle,getSelectedBlocksInitialCaretPosition:()=>Jle,getStateBeforeOptimisticTransaction:()=>Rle,getSuggestedPostFormat:()=>sle,getTemplate:()=>wce,getTemplateLock:()=>xce,hasChangedContent:()=>rD,hasEditorRedo:()=>jae,hasEditorUndo:()=>Vae,hasInserterItems:()=>Pce,hasMultiSelection:()=>mce,hasNonPostEntityChanges:()=>zae,hasSelectedBlock:()=>Gle,hasSelectedInnerBlock:()=>dce,inSomeHistory:()=>Ale,isAncestorMultiSelected:()=>ice,isAutosavingPost:()=>ole,isBlockInsertionPointVisible:()=>Sce,isBlockMultiSelected:()=>nce,isBlockSelected:()=>uce,isBlockValid:()=>Ile,isBlockWithinSelection:()=>fce,isCaretWithinFormattedText:()=>yce,isCleanNewPost:()=>Uae,isCurrentPostPending:()=>qae,isCurrentPostPublished:()=>cO,isCurrentPostScheduled:()=>Zae,isDeletingPost:()=>$ae,isEditedPostAutosaveable:()=>Xae,isEditedPostBeingScheduled:()=>Qae,isEditedPostDateFloating:()=>Jae,isEditedPostDirty:()=>XS,isEditedPostEmpty:()=>iD,isEditedPostNew:()=>tD,isEditedPostPublishable:()=>Kae,isEditedPostSaveable:()=>nD,isEditorPanelEnabled:()=>yle,isEditorPanelOpened:()=>ble,isEditorPanelRemoved:()=>cD,isFirstMultiSelectedBlock:()=>oce,isInserterOpened:()=>kle,isListViewOpened:()=>Ple,isMultiSelecting:()=>pce,isPermalinkEditable:()=>sD,isPostAutosavingLocked:()=>lD,isPostLockTakeover:()=>fle,isPostLocked:()=>ule,isPostSavingLocked:()=>dle,isPreviewingPost:()=>nle,isPublishSidebarEnabled:()=>gle,isPublishSidebarOpened:()=>Nce,isPublishingPost:()=>ale,isSavingNonPostEntityChanges:()=>ele,isSavingPost:()=>Km,isSelectionEnabled:()=>hce,isTyping:()=>vce,isValidTemplate:()=>_ce});var eu=s(Xe(),1),Zm=s(po(),1),Kv=s(Ir(),1),dt=s(O(),1),Ca=s(Yi(),1),eD=s(D(),1),QS=s($(),1),dr=s(W(),1),$v=s(lt(),1);var GF=new Set(["meta"]),WF="core/editor",nR=/%(?:postname|pagename)%/,iR=60*1e3,YF=["title","excerpt","content"];var xt="wp_template",Ur="wp_template_part",qi="wp_block",jd="wp_navigation",ur="attachment",k1={custom:"custom",theme:"theme",plugin:"plugin"},sR=["wp_template","wp_template_part"],qF=[...sR,"wp_block","wp_navigation"],Jc=[xt,Ur,qi,jd];var E1=s(D(),1),No=(0,E1.forwardRef)(({icon:e,size:t=24,...r},o)=>(0,E1.cloneElement)(e,{width:t,height:t,...r,ref:o}));var R1=s(de(),1),aR=s(C(),1),lR=(0,aR.jsx)(R1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aR.jsx)(R1.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18.5 5.5V8H20V5.5H22.5V4H20V1.5H18.5V4H16V5.5H18.5ZM13.9624 4H6C4.89543 4 4 4.89543 4 6V18C4 19.1046 4.89543 20 6 20H18C19.1046 20 20 19.1046 20 18V10.0391H18.5V18C18.5 18.2761 18.2761 18.5 18 18.5H10L10 10.4917L16.4589 10.5139L16.4641 9.01389L5.5 8.97618V6C5.5 5.72386 5.72386 5.5 6 5.5H13.9624V4ZM5.5 10.4762V18C5.5 18.2761 5.72386 18.5 6 18.5H8.5L8.5 10.4865L5.5 10.4762Z"})});var A1=s(de(),1),cR=s(C(),1),uR=(0,cR.jsx)(A1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cR.jsx)(A1.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var O1=s(de(),1),dR=s(C(),1),fR=(0,dR.jsx)(O1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,dR.jsx)(O1.Path,{d:"M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z"})});var I1=s(de(),1),mR=s(C(),1),pR=(0,mR.jsx)(I1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mR.jsx)(I1.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.53 4.47a.75.75 0 1 0-1.06 1.06l8 8a.75.75 0 1 0 1.06-1.06l-8-8Zm5 1a.75.75 0 1 0-1.06 1.06l2 2a.75.75 0 1 0 1.06-1.06l-2-2Zm-11.06 10a.75.75 0 0 1 1.06 0l2 2a.75.75 0 1 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06Zm.06-5a.75.75 0 0 0-1.06 1.06l8 8a.75.75 0 1 0 1.06-1.06l-8-8Zm-.06-3a.75.75 0 0 1 1.06 0l10 10a.75.75 0 1 1-1.06 1.06l-10-10a.75.75 0 0 1 0-1.06Zm3.06-2a.75.75 0 0 0-1.06 1.06l10 10a.75.75 0 1 0 1.06-1.06l-10-10Z"})});var N1=s(de(),1),hR=s(C(),1),xl=(0,hR.jsx)(N1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hR.jsx)(N1.Path,{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"})});var F1=s(de(),1),gR=s(C(),1),vR=(0,gR.jsx)(F1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gR.jsx)(F1.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})});var D1=s(de(),1),yR=s(C(),1),Pi=(0,yR.jsx)(D1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yR.jsx)(D1.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var B1=s(de(),1),bR=s(C(),1),Cv=(0,bR.jsx)(B1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bR.jsx)(B1.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var M1=s(de(),1),SR=s(C(),1),_R=(0,SR.jsx)(M1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,SR.jsx)(M1.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});var L1=s(de(),1),wR=s(C(),1),Nt=(0,wR.jsx)(L1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wR.jsx)(L1.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var V1=s(de(),1),xR=s(C(),1),CR=(0,xR.jsx)(V1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xR.jsx)(V1.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})});var j1=s(de(),1),TR=s(C(),1),Ft=(0,TR.jsx)(j1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TR.jsx)(j1.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var z1=s(de(),1),PR=s(C(),1),Tv=(0,PR.jsx)(z1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PR.jsx)(z1.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var U1=s(de(),1),kR=s(C(),1),Kn=(0,kR.jsx)(U1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kR.jsx)(U1.Path,{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"})});var H1=s(de(),1),ER=s(C(),1),RR=(0,ER.jsx)(H1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ER.jsx)(H1.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})});var G1=s(de(),1),AR=s(C(),1),OR=(0,AR.jsx)(G1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AR.jsx)(G1.Path,{d:"M17.3 10.1C17.3 7.60001 15.2 5.70001 12.5 5.70001C10.3 5.70001 8.4 7.10001 7.9 9.00001H7.7C5.7 9.00001 4 10.7 4 12.8C4 14.9 5.7 16.6 7.7 16.6H9.5V15.2H7.7C6.5 15.2 5.5 14.1 5.5 12.9C5.5 11.7 6.5 10.5 7.7 10.5H9L9.3 9.40001C9.7 8.10001 11 7.20001 12.5 7.20001C14.3 7.20001 15.8 8.50001 15.8 10.1V11.4L17.1 11.6C17.9 11.7 18.5 12.5 18.5 13.4C18.5 14.4 17.7 15.2 16.8 15.2H14.5V16.6H16.7C18.5 16.6 19.9 15.1 19.9 13.3C20 11.7 18.8 10.4 17.3 10.1Z M14.1245 14.2426L15.1852 13.182L12.0032 10L8.82007 13.1831L9.88072 14.2438L11.25 12.8745V18H12.75V12.8681L14.1245 14.2426Z"})});var W1=s(de(),1),IR=s(C(),1),NR=(0,IR.jsx)(W1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,IR.jsx)(W1.Path,{d:"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-9c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4h1.3l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8-.1 1-.9 1.8-1.8 1.8z"})});var Y1=s(de(),1),FR=s(C(),1),DR=(0,FR.jsx)(Y1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FR.jsx)(Y1.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"})});var q1=s(de(),1),BR=s(C(),1),MR=(0,BR.jsx)(q1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BR.jsx)(q1.Path,{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"})});var Z1=s(de(),1),LR=s(C(),1),Pv=(0,LR.jsx)(Z1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LR.jsx)(Z1.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var K1=s(de(),1),VR=s(C(),1),jR=(0,VR.jsx)(K1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VR.jsx)(K1.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"})});var X1=s(de(),1),zR=s(C(),1),kv=(0,zR.jsx)(X1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zR.jsx)(X1.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"})});var Q1=s(de(),1),UR=s(C(),1),J1=(0,UR.jsx)(Q1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,UR.jsx)(Q1.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"})});var $1=s(de(),1),HR=s(C(),1),GR=(0,HR.jsx)($1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,HR.jsx)($1.Path,{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"})});var eS=s(de(),1),WR=s(C(),1),Wm=(0,WR.jsx)(eS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,WR.jsx)(eS.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var tS=s(de(),1),YR=s(C(),1),zd=(0,YR.jsx)(tS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YR.jsx)(tS.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.5 18.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h2.5v13zm10-.5c0 .3-.2.5-.5.5h-8v-13h8c.3 0 .5.2.5.5v12z"})});var rS=s(de(),1),qR=s(C(),1),Ud=(0,qR.jsx)(rS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,qR.jsx)(rS.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z"})});var oS=s(de(),1),ZR=s(C(),1),KR=(0,ZR.jsx)(oS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZR.jsx)(oS.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M3 7c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Zm2-.5h14c.3 0 .5.2.5.5v1L12 13.5 4.5 7.9V7c0-.3.2-.5.5-.5Zm-.5 3.3V17c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V9.8L12 15.4 4.5 9.8Z"})});var nS=s(de(),1),XR=s(C(),1),Cl=(0,XR.jsx)(nS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,XR.jsx)(nS.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z"})});var iS=s(de(),1),QR=s(C(),1),Xn=(0,QR.jsx)(iS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QR.jsx)(iS.Path,{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"})});var sS=s(de(),1),JR=s(C(),1),$R=(0,JR.jsx)(sS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,JR.jsx)(sS.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var aS=s(de(),1),eA=s(C(),1),Ev=(0,eA.jsx)(aS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eA.jsx)(aS.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})});var lS=s(de(),1),tA=s(C(),1),rA=(0,tA.jsx)(lS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,tA.jsx)(lS.Path,{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"})});var cS=s(de(),1),oA=s(C(),1),Rv=(0,oA.jsx)(cS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oA.jsx)(cS.Path,{d:"M18.5 10.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"})});var uS=s(de(),1),nA=s(C(),1),iA=(0,nA.jsx)(uS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nA.jsx)(uS.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})});var Av=s(de(),1),Ov=s(C(),1),sA=(0,Ov.jsxs)(Av.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Ov.jsx)(Av.Path,{d:"m16 15.5h-8v-1.5h8zm-7.5-2.5h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm-9-3h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2z"}),(0,Ov.jsx)(Av.Path,{d:"m18.5 6.5h-13a.5.5 0 0 0 -.5.5v9.5a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-9.5a.5.5 0 0 0 -.5-.5zm-13-1.5h13a2 2 0 0 1 2 2v9.5a2 2 0 0 1 -2 2h-13a2 2 0 0 1 -2-2v-9.5a2 2 0 0 1 2-2z"})]});var dS=s(de(),1),aA=s(C(),1),Bs=(0,aA.jsx)(dS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aA.jsx)(dS.Path,{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"})});var fS=s(de(),1),lA=s(C(),1),cA=(0,lA.jsx)(fS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,lA.jsx)(fS.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});var mS=s(de(),1),uA=s(C(),1),Iv=(0,uA.jsx)(mS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,uA.jsx)(mS.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});var pS=s(de(),1),dA=s(C(),1),fA=(0,dA.jsx)(pS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,dA.jsx)(pS.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var hS=s(de(),1),mA=s(C(),1),Ym=(0,mA.jsx)(hS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mA.jsx)(hS.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"})});var gS=s(de(),1),pA=s(C(),1),Nr=(0,pA.jsx)(gS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pA.jsx)(gS.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var vS=s(de(),1),hA=s(C(),1),Nv=(0,hA.jsx)(vS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hA.jsx)(vS.Path,{d:"M18.5 10a1.5 1.5 0 0 1 1.5 1.5v7a1.5 1.5 0 0 1-1.5 1.5h-7a1.5 1.5 0 0 1-1.5-1.5v-7a1.5 1.5 0 0 1 1.5-1.5zM16 4a2 2 0 0 1 2 2v2h-1.5V6a.5.5 0 0 0-.5-.5H6a.5.5 0 0 0-.5.5v3H8v1.5H5.5V16a.5.5 0 0 0 .5.5h2V18H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z"})});var yS=s(de(),1),gA=s(C(),1),vA=(0,gA.jsx)(yS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gA.jsx)(yS.Path,{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"})});var bS=s(de(),1),yA=s(C(),1),Tl=(0,yA.jsx)(bS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yA.jsx)(bS.Path,{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"})});var SS=s(de(),1),bA=s(C(),1),Fv=(0,bA.jsx)(SS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bA.jsx)(SS.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var Dv=s(de(),1),Bv=s(C(),1),qm=(0,Bv.jsxs)(Dv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Bv.jsx)(Dv.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,Bv.jsx)(Dv.Path,{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"})]});var _S=s(de(),1),SA=s(C(),1),Mv=(0,SA.jsx)(_S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,SA.jsx)(_S.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});var wS=s(de(),1),_A=s(C(),1),Lv=(0,_A.jsx)(wS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_A.jsx)(wS.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var xS=s(de(),1),wA=s(C(),1),Pl=(0,wA.jsx)(xS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wA.jsx)(xS.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var CS=s(de(),1),xA=s(C(),1),kl=(0,xA.jsx)(CS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xA.jsx)(CS.Path,{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"})});var TS=s(de(),1),CA=s(C(),1),Hd=(0,CA.jsx)(TS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,CA.jsx)(TS.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var PS=s(de(),1),TA=s(C(),1),Vv=(0,TA.jsx)(PS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TA.jsx)(PS.Path,{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"})});var kS=s(de(),1),PA=s(C(),1),kA=(0,PA.jsx)(kS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PA.jsx)(kS.Path,{d:"M7 11.5h10V13H7z"})});var ES=s(de(),1),EA=s(C(),1),RA=(0,EA.jsx)(ES.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,EA.jsx)(ES.Path,{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"})});var RS=s(de(),1),AA=s(C(),1),OA=(0,AA.jsx)(RS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AA.jsx)(RS.Path,{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"})});var AS=s(de(),1),IA=s(C(),1),jv=(0,IA.jsx)(AS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,IA.jsx)(AS.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var OS=s(de(),1),NA=s(C(),1),Gd=(0,NA.jsx)(OS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,NA.jsx)(OS.Path,{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"})});var zv=s(de(),1),Uv=s(C(),1),FA=(0,Uv.jsxs)(zv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Uv.jsx)(zv.Path,{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"}),(0,Uv.jsx)(zv.Path,{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"})]});var IS=s(de(),1),DA=s(C(),1),Hv=(0,DA.jsx)(IS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,DA.jsx)(IS.Path,{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"})});var NS=s(de(),1),BA=s(C(),1),MA=(0,BA.jsx)(NS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BA.jsx)(NS.Path,{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"})});var FS=s(de(),1),LA=s(C(),1),Gv=(0,LA.jsx)(FS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LA.jsx)(FS.Path,{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.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})});var DS=s(de(),1),VA=s(C(),1),jA=(0,VA.jsx)(DS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VA.jsx)(DS.Path,{fill:"none",d:"M5.75 12.75V18.25H11.25M12.75 5.75H18.25V11.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})});var BS=s(de(),1),zA=s(C(),1),UA=(0,zA.jsx)(BS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zA.jsx)(BS.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var MS=s(de(),1),HA=s(C(),1),GA=(0,HA.jsx)(MS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,HA.jsx)(MS.Path,{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"})});var LS=s(de(),1),WA=s(C(),1),YA=(0,WA.jsx)(LS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,WA.jsx)(LS.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z"})});var VS=s(de(),1),qA=s(C(),1),Wd=(0,qA.jsx)(VS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,qA.jsx)(VS.Path,{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"})});var jS=s(de(),1),ZA=s(C(),1),Wv=(0,ZA.jsx)(jS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZA.jsx)(jS.Path,{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"})});var zS=s(de(),1),KA=s(C(),1),US=(0,KA.jsx)(zS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,KA.jsx)(zS.Path,{d:"M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z"})});var HS=s(de(),1),XA=s(C(),1),El=(0,XA.jsx)(HS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,XA.jsx)(HS.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var GS=s(de(),1),QA=s(C(),1),JA=(0,QA.jsx)(GS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QA.jsx)(GS.Path,{d:"m8.6 7 3.9 10.8h-1.7l-1-2.8H5.7l-1 2.8H3L6.9 7h1.7Zm-2.4 6.6h3L7.7 9.3l-1.5 4.3ZM17.691 8.879c.473 0 .88.055 1.221.165.352.1.643.264.875.495.274.253.456.572.544.957.088.374.132.83.132 1.37v4.554c0 .274.033.472.099.593.077.11.198.166.363.166.11 0 .215-.028.313-.083.11-.055.237-.137.38-.247l.165.28a3.304 3.304 0 0 1-.71.446c-.23.11-.527.165-.89.165-.352 0-.639-.055-.858-.165-.22-.11-.386-.27-.495-.479-.1-.209-.149-.468-.149-.775-.286.462-.627.814-1.023 1.056-.396.242-.858.363-1.386.363-.462 0-.858-.088-1.188-.264a1.752 1.752 0 0 1-.742-.726 2.201 2.201 0 0 1-.248-1.056c0-.484.11-.875.33-1.172.22-.308.5-.556.841-.742.352-.187.721-.341 1.106-.462.396-.132.765-.253 1.106-.363.351-.121.637-.259.857-.413.232-.154.347-.357.347-.61V10.81c0-.396-.066-.71-.198-.941a1.05 1.05 0 0 0-.511-.511 1.763 1.763 0 0 0-.76-.149c-.253 0-.522.039-.808.116a1.165 1.165 0 0 0-.677.412 1.1 1.1 0 0 1 .595.396c.165.187.247.424.247.71 0 .307-.104.55-.313.726-.198.176-.451.263-.76.263-.34 0-.594-.104-.758-.313a1.231 1.231 0 0 1-.248-.759c0-.297.072-.539.214-.726.154-.187.352-.363.595-.528.264-.176.6-.324 1.006-.445.418-.121.88-.182 1.386-.182Zm.99 3.729a1.57 1.57 0 0 1-.528.462c-.231.121-.479.248-.742.38a5.377 5.377 0 0 0-.76.462c-.23.165-.423.38-.577.643-.154.264-.231.6-.231 1.007 0 .429.11.77.33 1.023.22.242.517.363.891.363.308 0 .594-.088.858-.264.275-.176.528-.44.759-.792v-3.284Z"})});var WS=s(de(),1),$A=s(C(),1),Yv=(0,$A.jsx)(WS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$A.jsx)(WS.Path,{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"})});var YS=s(de(),1),eO=s(C(),1),tO=(0,eO.jsx)(YS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eO.jsx)(YS.Path,{d:"M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"})});var qS=s(de(),1),rO=s(C(),1),oO=(0,rO.jsx)(qS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rO.jsx)(qS.Path,{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"})});var ZS=s(de(),1),nO=s(C(),1),iO=(0,nO.jsx)(ZS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nO.jsx)(ZS.Path,{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"})});var KS=s(de(),1),sO=s(C(),1),aO=(0,sO.jsx)(KS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,sO.jsx)(KS.Path,{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"})});function $c(e){return e==="header"?Rv:e==="footer"?Ev:e==="sidebar"?Gv:e==="navigation-overlay"?Nv:Wd}var QF=s(qv(),1),{lock:JF,unlock:N}=(0,QF.__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/editor");var $F={},Zi=e=>{if(!e)return $F;let{templateTypes:t,templateAreas:r,template:o}=e,{description:n,slug:i,title:a,area:l}=o,{title:c,description:u}=Object.values(t).find(g=>g.slug===i)??$F,d=typeof a=="string"?a:a?.rendered,f=typeof n=="string"?n:n?.raw,h=r?.map(g=>({...g,icon:$c(g.icon)}))?.find(g=>l===g.area)?.icon||Bs;return{title:d&&d!==i?d:c||i,description:f||u,icon:h}};var Xv={},Vae=(0,dt.createRegistrySelector)(e=>()=>e(dr.store).hasUndo()),jae=(0,dt.createRegistrySelector)(e=>()=>e(dr.store).hasRedo());function tD(e){return $r(e).status==="auto-draft"}function rD(e){return"content"in Qv(e)}var XS=(0,dt.createRegistrySelector)(e=>t=>{let r=Qn(t),o=Ki(t);return e(dr.store).hasEditsForEntityRecord("postType",r,o)}),zae=(0,dt.createRegistrySelector)(e=>t=>{let r=e(dr.store).__experimentalGetDirtyEntityRecords(),{type:o,id:n}=$r(t);return r.some(i=>i.kind!=="postType"||i.name!==o||i.key!==n)});function Uae(e){return!XS(e)&&tD(e)}var $r=(0,dt.createRegistrySelector)(e=>t=>{let r=Ki(t),o=Qn(t),n=e(dr.store).getRawEntityRecord("postType",o,r);return n||Xv});function Qn(e){return e.postType}function Ki(e){return e.postId}function Hae(e){return e.templateId}function lO(e){return $r(e)._links?.["version-history"]?.[0]?.count??0}function Gae(e){return $r(e)._links?.["predecessor-version"]?.[0]?.id??null}var Qv=(0,dt.createRegistrySelector)(e=>t=>{let r=Qn(t),o=Ki(t);return e(dr.store).getEntityRecordEdits("postType",r,o)||Xv});function Zv(e,t){switch(t){case"type":return Qn(e);case"id":return Ki(e);default:let r=$r(e);if(!r.hasOwnProperty(t))break;return P1(r[t])}}var Wae=(0,dt.createSelector)((e,t)=>{let r=Qv(e);return r.hasOwnProperty(t)?{...Zv(e,t),...r[t]}:Zv(e,t)},(e,t)=>[Zv(e,t),Qv(e)[t]]);function Jt(e,t){if(t==="content")return Jv(e);let r=Qv(e);return r.hasOwnProperty(t)?GF.has(t)?Wae(e,t):r[t]:Zv(e,t)}var oD=(0,dt.createRegistrySelector)(e=>(t,r)=>{if(!YF.includes(r)&&r!=="preview_link")return;let o=Qn(t),n=Ki(t),i=e(dr.store).getCurrentUser()?.id,a=e(dr.store).getAutosave(o,n,i);if(a)return P1(a[r])});function Yae(e){return Jt(e,"status")==="private"?"private":Jt(e,"password")?"password":"public"}function qae(e){return $r(e).status==="pending"}function cO(e,t){let r=t||$r(e);return["publish","private"].indexOf(r.status)!==-1||r.status==="future"&&!(0,Zm.isInTheFuture)(new Date(Number((0,Zm.getDate)(r.date))-iR))}function Zae(e){return $r(e).status==="future"&&!cO(e)}function Kae(e){let t=$r(e);return t.type===ur?XS(e):XS(e)||["publish","private","future"].indexOf(t.status)===-1}function nD(e){return Km(e)?!1:!!Jt(e,"title")||!!Jt(e,"excerpt")||!iD(e)||eD.Platform.OS==="native"}var iD=(0,dt.createRegistrySelector)(e=>t=>{let r=Ki(t),o=Qn(t),n=e(dr.store).getEditedEntityRecord("postType",o,r);if(typeof n.content!="function")return!n.content;let i=Jt(t,"blocks");if(i.length===0)return!0;if(i.length>1)return!1;let a=i[0].name;return a!==(0,eu.getDefaultBlockName)()&&a!==(0,eu.getFreeformContentHandlerName)()?!1:!Jv(t)}),Xae=(0,dt.createRegistrySelector)(e=>t=>{if(!nD(t)||lD(t))return!1;let r=Qn(t);if(!e(dr.store).getPostType(r)?.supports?.autosave)return!1;let n=Ki(t),i=e(dr.store).hasFetchedAutosaves(r,n),a=e(dr.store).getCurrentUser()?.id,l=e(dr.store).getAutosave(r,n,a);return i?!l||rD(t)?!0:["title","excerpt","meta"].some(c=>P1(l[c])!==Jt(t,c)):!1});function Qae(e){let t=Jt(e,"date"),r=new Date(Number((0,Zm.getDate)(t))-iR);return(0,Zm.isInTheFuture)(r)}function Jae(e){let t=Jt(e,"date"),r=Jt(e,"modified"),o=$r(e).status;return o==="draft"||o==="auto-draft"||o==="pending"?t===r||t===null:!1}function $ae(e){return!!e.deleting.pending}function Km(e){return!!e.saving.pending}var ele=(0,dt.createRegistrySelector)(e=>t=>{let r=e(dr.store).__experimentalGetEntitiesBeingSaved(),{type:o,id:n}=$r(t);return r.some(i=>i.kind!=="postType"||i.name!==o||i.key!==n)}),tle=(0,dt.createRegistrySelector)(e=>t=>{let r=Qn(t),o=Ki(t);return!e(dr.store).getLastEntitySaveError("postType",r,o)}),rle=(0,dt.createRegistrySelector)(e=>t=>{let r=Qn(t),o=Ki(t);return!!e(dr.store).getLastEntitySaveError("postType",r,o)});function ole(e){return Km(e)&&!!e.saving.options?.isAutosave}function nle(e){return Km(e)&&!!e.saving.options?.isPreview}function ile(e){if(e.saving.pending||Km(e))return;let t=oD(e,"preview_link");(!t||$r(e).status==="draft")&&(t=Jt(e,"link"),t&&(t=(0,Kv.addQueryArgs)(t,{preview:!0})));let r=Jt(e,"featured_media");return t&&r?(0,Kv.addQueryArgs)(t,{_thumbnail_id:r}):t}var sle=(0,dt.createRegistrySelector)(e=>()=>{let t=e(QS.store).getBlocks();if(t.length>2)return null;let r;if(t.length===1&&(r=t[0].name,r==="core/embed")){let o=t[0].attributes?.providerNameSlug;["youtube","vimeo"].includes(o)?r="core/video":["spotify","soundcloud"].includes(o)&&(r="core/audio")}switch(t.length===2&&t[1].name==="core/paragraph"&&(r=t[0].name),r){case"core/image":return"image";case"core/quote":case"core/pullquote":return"quote";case"core/gallery":return"gallery";case"core/video":return"video";case"core/audio":return"audio";default:return null}}),Jv=(0,dt.createRegistrySelector)(e=>t=>{let r=Ki(t),o=Qn(t),n=e(dr.store).getEditedEntityRecord("postType",o,r);if(n){if(typeof n.content=="function")return n.content(n);if(n.blocks)return(0,eu.__unstableSerializeAndClean)(n.blocks);if(n.content)return n.content}return""});function ale(e){return Km(e)&&!cO(e)&&Jt(e,"status")==="publish"}function sD(e){let t=Jt(e,"permalink_template");return nR.test(t)}function lle(e){let t=aD(e);if(!t)return null;let{prefix:r,postName:o,suffix:n}=t;return sD(e)?r+o+n:r}function cle(e){return Jt(e,"slug")||(0,Kv.cleanForSlug)(Jt(e,"title"))||Ki(e)}function aD(e){let t=Jt(e,"permalink_template");if(!t)return null;let r=Jt(e,"slug")||Jt(e,"generated_slug"),[o,n]=t.split(nR);return{prefix:o,postName:r,suffix:n}}function ule(e){return e.postLock.isLocked}function dle(e){return Object.keys(e.postSavingLock).length>0}function lD(e){return Object.keys(e.postAutosavingLock).length>0}function fle(e){return e.postLock.isTakeover}function mle(e){return e.postLock.user}function ple(e){return e.postLock.activePostLock}function hle(e){return!!$r(e)._links?.hasOwnProperty("wp:action-unfiltered-html")}var gle=(0,dt.createRegistrySelector)(e=>()=>!!e($v.store).get("core","isPublishSidebarEnabled")),vle=(0,dt.createSelector)(e=>Jt(e,"blocks")||(0,eu.parse)(Jv(e)),e=>[Jt(e,"blocks"),Jv(e)]);function cD(e,t){return e.removedPanels.includes(t)}var yle=(0,dt.createRegistrySelector)(e=>(t,r)=>{let o=e($v.store).get("core","inactivePanels");return!cD(t,r)&&!o?.includes(r)}),ble=(0,dt.createRegistrySelector)(e=>(t,r)=>!!e($v.store).get("core","openPanels")?.includes(r));function Sle(e){return(0,Ca.default)("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),Jt(e,"selection")?.selectionStart}function _le(e){return(0,Ca.default)("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),Jt(e,"selection")?.selectionEnd}function wle(e){return Jt(e,"selection")}function xle(e){return!!e.postId}function Cle(e){return e.editorSettings}function JS(e){return e.renderingMode}var Tle=(0,dt.createRegistrySelector)(e=>t=>N(e(QS.store)).isZoomOut()?"Desktop":t.deviceType);function Ple(e){return e.listViewPanel}function kle(e){return!!e.blockInserterPanel}var Ele=(0,dt.createRegistrySelector)(e=>()=>e($v.store).get("core","editorMode")??"visual");function Rle(){return(0,Ca.default)("select('core/editor').getStateBeforeOptimisticTransaction",{since:"5.7",hint:"No state history is kept on this store anymore"}),null}function Ale(){return(0,Ca.default)("select('core/editor').inSomeHistory",{since:"5.7",hint:"No state history is kept on this store anymore"}),!1}function Le(e){return(0,dt.createRegistrySelector)(t=>(r,...o)=>((0,Ca.default)("`wp.data.select( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.select( 'core/block-editor' )."+e+"`",version:"6.2"}),t(QS.store)[e](...o)))}var Ole=Le("getBlockName"),Ile=Le("isBlockValid"),Nle=Le("getBlockAttributes"),Fle=Le("getBlock"),Dle=Le("getBlocks"),Ble=Le("getClientIdsOfDescendants"),Mle=Le("getClientIdsWithDescendants"),Lle=Le("getGlobalBlockCount"),Vle=Le("getBlocksByClientId"),jle=Le("getBlockCount"),zle=Le("getBlockSelectionStart"),Ule=Le("getBlockSelectionEnd"),Hle=Le("getSelectedBlockCount"),Gle=Le("hasSelectedBlock"),Wle=Le("getSelectedBlockClientId"),Yle=Le("getSelectedBlock"),qle=Le("getBlockRootClientId"),Zle=Le("getBlockHierarchyRootClientId"),Kle=Le("getAdjacentBlockClientId"),Xle=Le("getPreviousBlockClientId"),Qle=Le("getNextBlockClientId"),Jle=Le("getSelectedBlocksInitialCaretPosition"),$le=Le("getMultiSelectedBlockClientIds"),ece=Le("getMultiSelectedBlocks"),tce=Le("getFirstMultiSelectedBlockClientId"),rce=Le("getLastMultiSelectedBlockClientId"),oce=Le("isFirstMultiSelectedBlock"),nce=Le("isBlockMultiSelected"),ice=Le("isAncestorMultiSelected"),sce=Le("getMultiSelectedBlocksStartClientId"),ace=Le("getMultiSelectedBlocksEndClientId"),lce=Le("getBlockOrder"),cce=Le("getBlockIndex"),uce=Le("isBlockSelected"),dce=Le("hasSelectedInnerBlock"),fce=Le("isBlockWithinSelection"),mce=Le("hasMultiSelection"),pce=Le("isMultiSelecting"),hce=Le("isSelectionEnabled"),gce=Le("getBlockMode"),vce=Le("isTyping"),yce=Le("isCaretWithinFormattedText"),bce=Le("getBlockInsertionPoint"),Sce=Le("isBlockInsertionPointVisible"),_ce=Le("isValidTemplate"),wce=Le("getTemplate"),xce=Le("getTemplateLock"),Cce=Le("canInsertBlockType"),Tce=Le("getInserterItems"),Pce=Le("hasInserterItems"),kce=Le("getBlockListSettings"),Ece=(0,dt.createRegistrySelector)(e=>()=>((0,Ca.default)("select('core/editor').__experimentalGetDefaultTemplateTypes",{since:"6.8",alternative:"select('core/core-data').getCurrentTheme()?.default_template_types"}),e(dr.store).getCurrentTheme()?.default_template_types)),Rce=(0,dt.createRegistrySelector)(e=>(0,dt.createSelector)(()=>((0,Ca.default)("select('core/editor').__experimentalGetDefaultTemplatePartAreas",{since:"6.8",alternative:"select('core/core-data').getCurrentTheme()?.default_template_part_areas"}),(e(dr.store).getCurrentTheme()?.default_template_part_areas||[]).map(r=>({...r,icon:$c(r.icon)}))))),Ace=(0,dt.createRegistrySelector)(e=>(0,dt.createSelector)((t,r)=>{(0,Ca.default)("select('core/editor').__experimentalGetDefaultTemplateType",{since:"6.8"});let o=e(dr.store).getCurrentTheme()?.default_template_types;return o?Object.values(o).find(n=>n.slug===r)??Xv:Xv})),Oce=(0,dt.createRegistrySelector)(e=>(0,dt.createSelector)((t,r)=>{if((0,Ca.default)("select('core/editor').__experimentalGetTemplateInfo",{since:"6.8"}),!r)return Xv;let o=e(dr.store).getCurrentTheme(),n=o?.default_template_types||[],i=o?.default_template_part_areas||[];return Zi({template:r,templateAreas:i,templateTypes:n})})),Ice=(0,dt.createRegistrySelector)(e=>t=>{let r=Qn(t);return e(dr.store).getPostType(r)?.labels?.singular_name});function Nce(e){return e.publishSidebarActive}var mO={};Qc(mO,{__experimentalTearDownEditor:()=>Dce,__unstableSaveForPreview:()=>Wce,autosave:()=>Gce,clearSelectedBlock:()=>Pue,closePublishSidebar:()=>gue,createUndoLevel:()=>Zce,disablePublishSidebar:()=>Qce,editPost:()=>Vce,enablePublishSidebar:()=>Xce,enterFormattedText:()=>Wue,exitFormattedText:()=>Yue,hideInsertionPoint:()=>Bue,insertBlock:()=>Nue,insertBlocks:()=>Fue,insertDefaultBlock:()=>que,lockPostAutosaving:()=>eue,lockPostSaving:()=>Jce,mergeBlocks:()=>Vue,moveBlockToPosition:()=>Iue,moveBlocksDown:()=>Aue,moveBlocksUp:()=>Oue,multiSelect:()=>Tue,openPublishSidebar:()=>hue,receiveBlocks:()=>bue,redo:()=>Yce,refreshPost:()=>Uce,removeBlock:()=>zue,removeBlocks:()=>jue,removeEditorPanel:()=>lue,replaceBlock:()=>Rue,replaceBlocks:()=>Eue,resetBlocks:()=>yue,resetEditorBlocks:()=>rue,resetPost:()=>Bce,savePost:()=>jce,selectBlock:()=>wue,setDeviceType:()=>iue,setEditedPost:()=>SD,setIsInserterOpened:()=>cue,setIsListViewOpened:()=>uue,setRenderingMode:()=>nue,setTemplateValidity:()=>Mue,setupEditor:()=>Fce,setupEditorState:()=>Lce,showInsertionPoint:()=>Due,startMultiSelect:()=>xue,startTyping:()=>Hue,stopMultiSelect:()=>Cue,stopTyping:()=>Gue,switchEditorMode:()=>pue,synchronizeTemplate:()=>Lue,toggleBlockMode:()=>Uue,toggleDistractionFree:()=>due,toggleEditorPanelEnabled:()=>sue,toggleEditorPanelOpened:()=>aue,togglePublishSidebar:()=>vue,toggleSelection:()=>kue,toggleSpotlightMode:()=>fue,toggleTopToolbar:()=>mue,trashPost:()=>Hce,undo:()=>qce,unlockPostAutosaving:()=>tue,unlockPostSaving:()=>$ce,updateBlock:()=>Sue,updateBlockAttributes:()=>_ue,updateBlockListSettings:()=>Zue,updateEditorSettings:()=>oue,updatePost:()=>Mce,updatePostLock:()=>Kce});var fO=s(Xm(),1),bD=s(Qm(),1),ru=s(Yi(),1),Jm=s(Xe(),1),Ms=s(ct(),1),Tn=s(W(),1),tu=s($(),1),$m=s(mo(),1),Fr=s(lt(),1),Hr=s(E(),1);function dO(e,t){return`wp-autosave-block-editor-post-${t?"auto-draft":e}`}function pD(e,t){return window.sessionStorage.getItem(dO(e,t))}function hD(e,t,r,o,n){window.sessionStorage.setItem(dO(e,t),JSON.stringify({post_title:r,content:o,excerpt:n}))}function $S(e,t){window.sessionStorage.removeItem(dO(e,t))}var ki=s(E(),1);function gD(e){let{previousPost:t,post:r,postType:o}=e;if(e.options?.isAutosave)return[];let n=["publish","private","future"],i=n.includes(t.status),a=n.includes(r.status),l=r.status==="trash"&&t.status!=="trash",c,u=o?.viewable??!1,d;l?(c=o.labels.item_trashed,u=!1):r.type===ur?(c=(0,ki.__)("Media updated."),u=!1):!i&&!a?(c=(0,ki.__)("Draft saved."),d=!0):i&&!a?(c=o.labels.item_reverted_to_draft,u=!1):!i&&a?c={publish:o.labels.item_published,private:o.labels.item_published_privately,future:o.labels.item_scheduled}[r.status]:c=o.labels.item_updated;let f=[];return u&&f.push({label:d?(0,ki.__)("View Preview"):o.labels.view_item,url:r.link,openInNewTab:!0}),[c,{id:"editor-save",type:"snackbar",actions:f}]}function vD(e){let{post:t,edits:r,error:o}=e;if(o&&o.code==="rest_autosave_no_changes")return[];let i=["publish","private","future"].indexOf(t.status)!==-1;if(o.code==="offline_error"){let c={publish:(0,ki.__)("Publishing failed because you were offline. Please verify your connection and try again."),private:(0,ki.__)("Publishing failed because you were offline. Please verify your connection and try again."),future:(0,ki.__)("Scheduling failed because you were offline. Please verify your connection and try again."),default:(0,ki.__)("Updating failed because you were offline. Please verify your connection and try again.")};return[!i&&r.status in c?c[r.status]:c.default,{id:"editor-save"}]}let a={publish:(0,ki.__)("Publishing failed."),private:(0,ki.__)("Publishing failed."),future:(0,ki.__)("Scheduling failed."),default:(0,ki.__)("Updating failed.")},l=!i&&r.status in a?a[r.status]:a.default;return o.message&&!/<\/?[^>]*>/.test(o.message)&&(l=[l,o.message].join(" ")),[l,{id:"editor-save"}]}function yD(e){return[e.error.message&&e.error.code!=="unknown_error"?e.error.message:(0,ki.__)("Trashing failed"),{id:"editor-trash-fail"}]}var Fce=(e,t,r)=>({dispatch:o})=>{if(o.setEditedPost(e.type,e.id),e.status==="auto-draft"&&r){let i;"content"in t?i=t.content:i=e.content.raw;let a=(0,Jm.parse)(i);a=(0,Jm.synchronizeBlocksWithTemplate)(a,r),o.resetEditorBlocks(a,{__unstableShouldCreateUndoLevel:!1})}t&&Object.entries(t).some(([i,a])=>a!==(e[i]?.raw??e[i]))&&o.editPost(t)};function Dce(){return(0,ru.default)("wp.data.dispatch( 'core/editor' ).__experimentalTearDownEditor",{since:"6.5"}),{type:"DO_NOTHING"}}function Bce(){return(0,ru.default)("wp.data.dispatch( 'core/editor' ).resetPost",{since:"6.0",version:"6.3",alternative:"Initialize the editor with the setupEditorState action"}),{type:"DO_NOTHING"}}function Mce(){return(0,ru.default)("wp.data.dispatch( 'core/editor' ).updatePost",{since:"5.7",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function Lce(e){return(0,ru.default)("wp.data.dispatch( 'core/editor' ).setupEditorState",{since:"6.5",alternative:"wp.data.dispatch( 'core/editor' ).setEditedPost"}),SD(e.type,e.id)}function SD(e,t){return{type:"SET_EDITED_POST",postType:e,postId:t}}var Vce=(e,t)=>({select:r,registry:o})=>{let{id:n,type:i}=r.getCurrentPost();o.dispatch(Tn.store).editEntityRecord("postType",i,n,e,t)},jce=(e={})=>async({select:t,dispatch:r,registry:o})=>{if(!t.isEditedPostSaveable())return;let n=t.getEditedPostContent();e.isAutosave||r.editPost({content:n},{undoIgnore:!0});let i=t.getCurrentPost(),a={id:i.id,...o.select(Tn.store).getEntityRecordNonTransientEdits("postType",i.type,i.id),content:n};r({type:"REQUEST_POST_UPDATE_START",options:e});let l=!1;try{a=await(0,$m.applyFiltersAsync)("editor.preSavePost",a,e)}catch(c){l=c}if(!l)try{await o.dispatch(Tn.store).saveEntityRecord("postType",i.type,a,e)}catch(c){l=c.message&&c.code!=="unknown_error"?c.message:(0,Hr.__)("An error occurred while updating.")}if(l||(l=o.select(Tn.store).getLastEntitySaveError("postType",i.type,i.id)),!l)try{await(0,$m.applyFilters)("editor.__unstableSavePost",Promise.resolve(),e)}catch(c){l=c}if(!l)try{await(0,$m.doActionAsync)("editor.savePost",{id:i.id,type:i.type},e)}catch(c){l=c}if(r({type:"REQUEST_POST_UPDATE_FINISH",options:e}),typeof window<"u"&&window.__experimentalTemplateActivate&&!e.isAutosave&&i.type==="wp_template"&&(typeof i.id=="number"||/^\d+$/.test(i.id))&&zce({select:t,dispatch:r,registry:o}),l){let c=vD({post:i,edits:a,error:l});c.length&&o.dispatch(Ms.store).createErrorNotice(...c)}else{let c=t.getCurrentPost(),u=gD({previousPost:i,post:c,postType:await o.resolveSelect(Tn.store).getPostType(c.type),options:e});u.length&&o.dispatch(Ms.store).createSuccessNotice(...u),e.isAutosave||o.dispatch(tu.store).__unstableMarkLastChangeAsPersistent()}};async function zce({select:e,registry:t}){if(e.getEditorSettings().onNavigateToPreviousEntityRecord)return;let{id:o,slug:n}=e.getCurrentPost();if((await t.select(Tn.store).getEntityRecord("root","site")).active_templates[n]===o)return;let l=(await t.resolveSelect(Tn.store).getCurrentTheme())?.default_template_types.find(c=>c.slug===n);await t.dispatch(Ms.store).createNotice("info",(0,Hr.sprintf)((0,Hr.__)('Do you want to activate this "%s" template?'),l?.title??n),{id:"template-activate-notice",actions:[{label:(0,Hr.__)("Activate"),onClick:async()=>{await t.dispatch(Ms.store).createNotice("info",(0,Hr.__)("Activating template\u2026"),{id:"template-activate-notice"});try{let c=await t.select(Tn.store).getEntityRecord("root","site");await t.dispatch(Tn.store).saveEntityRecord("root","site",{active_templates:{...c.active_templates,[n]:o}},{throwOnError:!0}),await t.dispatch(Ms.store).createSuccessNotice((0,Hr.__)("Template activated."),{id:"template-activate-notice"})}catch(c){throw await t.dispatch(Ms.store).createErrorNotice((0,Hr.__)("Template activation failed."),{id:"template-activate-notice"}),c}}}]})}function Uce(){return(0,ru.default)("wp.data.dispatch( 'core/editor' ).refreshPost",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}var Hce=()=>async({select:e,dispatch:t,registry:r})=>{let o=e.getCurrentPostType(),n=await r.resolveSelect(Tn.store).getPostType(o),{rest_base:i,rest_namespace:a="wp/v2"}=n;t({type:"REQUEST_POST_DELETE_START"});try{let l=e.getCurrentPost();await(0,bD.default)({path:`/${a}/${i}/${l.id}`,method:"DELETE"}),await t.savePost()}catch(l){r.dispatch(Ms.store).createErrorNotice(...yD({error:l}))}t({type:"REQUEST_POST_DELETE_FINISH"})},Gce=({local:e=!1,...t}={})=>async({select:r,dispatch:o})=>{let n=r.getCurrentPost();if(e){let i=r.isEditedPostNew(),a=r.getEditedPostAttribute("title"),l=r.getEditedPostAttribute("content"),c=r.getEditedPostAttribute("excerpt");hD(n.id,i,a,l,c)}else await o.savePost({isAutosave:!0,...t})},Wce=({forceIsAutosaveable:e}={})=>async({select:t,dispatch:r})=>((e||t.isEditedPostAutosaveable())&&!t.isPostLocked()&&(["draft","auto-draft"].includes(t.getEditedPostAttribute("status"))?await r.savePost({isPreview:!0}):await r.autosave({isPreview:!0})),t.getEditedPostPreviewLink()),Yce=()=>({registry:e})=>{e.dispatch(Tn.store).redo()},qce=()=>({registry:e})=>{e.dispatch(Tn.store).undo()};function Zce(){return(0,ru.default)("wp.data.dispatch( 'core/editor' ).createUndoLevel",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function Kce(e){return{type:"UPDATE_POST_LOCK",lock:e}}var Xce=()=>({registry:e})=>{e.dispatch(Fr.store).set("core","isPublishSidebarEnabled",!0)},Qce=()=>({registry:e})=>{e.dispatch(Fr.store).set("core","isPublishSidebarEnabled",!1)};function Jce(e){return{type:"LOCK_POST_SAVING",lockName:e}}function $ce(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function eue(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function tue(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}var rue=(e,t={})=>({select:r,dispatch:o,registry:n})=>{let{__unstableShouldCreateUndoLevel:i,selection:a}=t,l={blocks:e,selection:a};if(i!==!1){let{id:c,type:u}=r.getCurrentPost();if(n.select(Tn.store).getEditedEntityRecord("postType",u,c).blocks===l.blocks){n.dispatch(Tn.store).__unstableCreateUndoLevel("postType",u,c);return}l.content=({blocks:f=[]})=>(0,Jm.__unstableSerializeAndClean)(f)}o.editPost(l)};function oue(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}var nue=e=>({dispatch:t,registry:r,select:o})=>{o.__unstableIsEditorReady()&&!o.getEditorSettings().isPreviewMode&&r.dispatch(tu.store).clearSelectedBlock(),t({type:"SET_RENDERING_MODE",mode:e})};function iue(e){return{type:"SET_DEVICE_TYPE",deviceType:e}}var sue=e=>({registry:t})=>{let r=t.select(Fr.store).get("core","inactivePanels")??[],o=!!r?.includes(e),n;o?n=r.filter(i=>i!==e):n=[...r,e],t.dispatch(Fr.store).set("core","inactivePanels",n)},aue=e=>({registry:t})=>{let r=t.select(Fr.store).get("core","openPanels")??[],o=!!r?.includes(e),n;o?n=r.filter(i=>i!==e):n=[...r,e],t.dispatch(Fr.store).set("core","openPanels",n)};function lue(e){return{type:"REMOVE_PANEL",panelName:e}}var cue=e=>({dispatch:t,registry:r})=>{typeof e=="object"&&e.hasOwnProperty("rootClientId")&&e.hasOwnProperty("insertionIndex")&&N(r.dispatch(tu.store)).setInsertionPoint({rootClientId:e.rootClientId,index:e.insertionIndex}),t({type:"SET_IS_INSERTER_OPENED",value:e})};function uue(e){return{type:"SET_IS_LIST_VIEW_OPENED",isOpen:e}}var due=({createNotice:e=!0}={})=>({dispatch:t,registry:r})=>{let o=r.select(Fr.store).get("core","distractionFree");o&&r.dispatch(Fr.store).set("core","fixedToolbar",!1),o||r.batch(()=>{r.dispatch(Fr.store).set("core","fixedToolbar",!0),t.setIsInserterOpened(!1),t.setIsListViewOpened(!1),N(r.dispatch(tu.store)).resetZoomLevel()}),r.batch(()=>{r.dispatch(Fr.store).set("core","distractionFree",!o),e&&r.dispatch(Ms.store).createInfoNotice(o?(0,Hr.__)("Distraction free mode deactivated."):(0,Hr.__)("Distraction free mode activated."),{id:"core/editor/distraction-free-mode/notice",type:"snackbar",actions:[{label:(0,Hr.__)("Undo"),onClick:()=>{r.batch(()=>{r.dispatch(Fr.store).set("core","fixedToolbar",o),r.dispatch(Fr.store).toggle("core","distractionFree")})}}]})})},fue=()=>({registry:e})=>{e.dispatch(Fr.store).toggle("core","focusMode");let t=e.select(Fr.store).get("core","focusMode");e.dispatch(Ms.store).createInfoNotice(t?(0,Hr.__)("Spotlight mode activated."):(0,Hr.__)("Spotlight mode deactivated."),{id:"core/editor/toggle-spotlight-mode/notice",type:"snackbar",actions:[{label:(0,Hr.__)("Undo"),onClick:()=>{e.dispatch(Fr.store).toggle("core","focusMode")}}]})},mue=()=>({registry:e})=>{e.dispatch(Fr.store).toggle("core","fixedToolbar");let t=e.select(Fr.store).get("core","fixedToolbar");e.dispatch(Ms.store).createInfoNotice(t?(0,Hr.__)("Top toolbar activated."):(0,Hr.__)("Top toolbar deactivated."),{id:"core/editor/toggle-top-toolbar/notice",type:"snackbar",actions:[{label:(0,Hr.__)("Undo"),onClick:()=>{e.dispatch(Fr.store).toggle("core","fixedToolbar")}}]})},pue=e=>({dispatch:t,registry:r})=>{r.dispatch(Fr.store).set("core","editorMode",e),e!=="visual"&&(r.dispatch(tu.store).clearSelectedBlock(),N(r.dispatch(tu.store)).resetZoomLevel()),e==="visual"?(0,fO.speak)((0,Hr.__)("Visual editor selected"),"assertive"):e==="text"&&(r.select(Fr.store).get("core","distractionFree")&&t.toggleDistractionFree(),(0,fO.speak)((0,Hr.__)("Code editor selected"),"assertive"))};function hue(){return{type:"OPEN_PUBLISH_SIDEBAR"}}function gue(){return{type:"CLOSE_PUBLISH_SIDEBAR"}}function vue(){return{type:"TOGGLE_PUBLISH_SIDEBAR"}}var bt=e=>(...t)=>({registry:r})=>{(0,ru.default)("`wp.data.dispatch( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`",version:"6.2"}),r.dispatch(tu.store)[e](...t)},yue=bt("resetBlocks"),bue=bt("receiveBlocks"),Sue=bt("updateBlock"),_ue=bt("updateBlockAttributes"),wue=bt("selectBlock"),xue=bt("startMultiSelect"),Cue=bt("stopMultiSelect"),Tue=bt("multiSelect"),Pue=bt("clearSelectedBlock"),kue=bt("toggleSelection"),Eue=bt("replaceBlocks"),Rue=bt("replaceBlock"),Aue=bt("moveBlocksDown"),Oue=bt("moveBlocksUp"),Iue=bt("moveBlockToPosition"),Nue=bt("insertBlock"),Fue=bt("insertBlocks"),Due=bt("showInsertionPoint"),Bue=bt("hideInsertionPoint"),Mue=bt("setTemplateValidity"),Lue=bt("synchronizeTemplate"),Vue=bt("mergeBlocks"),jue=bt("removeBlocks"),zue=bt("removeBlock"),Uue=bt("toggleBlockMode"),Hue=bt("startTyping"),Gue=bt("stopTyping"),Wue=bt("enterFormattedText"),Yue=bt("exitFormattedText"),que=bt("insertDefaultBlock"),Zue=bt("updateBlockListSettings");var t3={};Qc(t3,{createTemplate:()=>swe,hideBlockTypes:()=>lwe,registerEntityAction:()=>J_e,registerEntityField:()=>ewe,registerPostTypeSchema:()=>nwe,removeTemplates:()=>dwe,resetStylesNavigation:()=>hwe,restoreRevision:()=>Swe,revertTemplate:()=>uwe,saveDirtyEntities:()=>cwe,selectNote:()=>_we,setCanvasMinHeight:()=>gwe,setCurrentRevisionId:()=>vwe,setCurrentTemplateId:()=>iwe,setDefaultRenderingMode:()=>fwe,setIsReady:()=>rwe,setRevisionPage:()=>ywe,setShowRevisionDiff:()=>bwe,setShowStylebook:()=>pwe,setStylesPath:()=>mwe,showBlockTypes:()=>awe,unregisterEntityAction:()=>$_e,unregisterEntityField:()=>twe});var Co=s(W(),1),st=s(E(),1),Dn=s(ct(),1),IG=s($(),1),Zf=s(lt(),1),NG=s(Ir(),1),FG=s(Qm(),1),Wx=s(Xe(),1),e3=s(ft(),1),Yx=s(po(),1);function e_(e){return e?e.source===k1.custom&&(!!e?.plugin||e?.has_theme_file):!1}var yO={};Qc(yO,{buildRevisionsPageQuery:()=>qd,getCanvasMinHeight:()=>fde,getCurrentRevision:()=>vde,getCurrentRevisionId:()=>vO,getDefaultRenderingMode:()=>cde,getEntityActions:()=>ide,getEntityFields:()=>ade,getInserter:()=>ede,getInserterSidebarToggleRef:()=>rde,getListViewToggleRef:()=>tde,getPageRevisions:()=>pde,getPostBlocksByName:()=>lde,getPostIcon:()=>ode,getPreviousRevision:()=>Sde,getRevisionPage:()=>gO,getRevisionsPerPage:()=>mde,getSelectedNote:()=>yde,getShowStylebook:()=>dde,getStylesPath:()=>ude,hasPostMetaChanges:()=>nde,isCollaborationEnabledForCurrentPost:()=>_de,isEntityReady:()=>sde,isNoteFocused:()=>bde,isRevisionsMode:()=>hde,isShowingRevisionDiff:()=>gde});var MD=s(xD(),1),ty=s($(),1),Ei=s(O(),1);var Pn=s(W(),1),LD=s(lt(),1);var CD=[];function TD(e,t,r){return e.actions[t]?.[r]??CD}function PD(e,t,r){return e.fields[t]?.[r]??CD}function kD(e,t,r){return e.isReady[t]?.[r]}var t_,Kue=new Uint8Array(16);function pO(){if(!t_&&(t_=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!t_))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return t_(Kue)}var Fo=[];for(let e=0;e<256;++e)Fo.push((e+256).toString(16).slice(1));function ED(e,t=0){return Fo[e[t+0]]+Fo[e[t+1]]+Fo[e[t+2]]+Fo[e[t+3]]+"-"+Fo[e[t+4]]+Fo[e[t+5]]+"-"+Fo[e[t+6]]+Fo[e[t+7]]+"-"+Fo[e[t+8]]+Fo[e[t+9]]+"-"+Fo[e[t+10]]+Fo[e[t+11]]+Fo[e[t+12]]+Fo[e[t+13]]+Fo[e[t+14]]+Fo[e[t+15]]}var Xue=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),hO={randomUUID:Xue};function Que(e,t,r){if(hO.randomUUID&&!t&&!e)return hO.randomUUID();e=e||{};let o=e.random||(e.rng||pO)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){r=r||0;for(let n=0;n<16;++n)t[r+n]=o[n];return t}return ED(o)}var ep=Que;var ey=s(O(),1),AD=s(W(),1),OD=s(Yd(),1);var Jue=()=>{};function r_({additionalData:e={},allowedTypes:t,filesList:r,maxUploadFileSize:o,onError:n=Jue,onFileChange:i,onSuccess:a,multiple:l=!0}){let{receiveEntityRecords:c}=(0,ey.dispatch)(AD.store),{getCurrentPost:u,getEditorSettings:d}=(0,ey.select)(w),{lockPostAutosaving:f,unlockPostAutosaving:m,lockPostSaving:h,unlockPostSaving:g}=(0,ey.dispatch)(w),v=d().allowedMimeTypes,y=`image-upload-${ep()}`,b=!1;o=o||d().maxUploadFileSize;let _=u(),S=typeof _?.id=="number"?_.id:_?.wp_id,x=()=>{window.__clientSideMediaProcessing||(h(y),f(y),b=!0)},T=S?{post:S}:{},R=()=>{window.__clientSideMediaProcessing||(g(y),m(y),b=!1)};(0,OD.uploadMedia)({allowedTypes:t,filesList:r,onFileChange:F=>{window.__clientSideMediaProcessing||(b?R():x()),i?.(F);let B=F.filter(z=>z?.id);B?.length&&c("postType","attachment",B,void 0,!0)},onSuccess:a,additionalData:{...T,...e},maxUploadFileSize:o,onError:({message:F})=>{window.__clientSideMediaProcessing||R(),n(F)},wpAllowedMimeTypes:v,multiple:l})}var ID=s(Ir(),1),ND=s(Yi(),1);function FD(e){return(0,ND.default)("wp.editor.cleanForSlug",{since:"12.7",plugin:"Gutenberg",alternative:"wp.url.cleanForSlug"}),(0,ID.cleanForSlug)(e)}var DD={rootClientId:void 0,insertionIndex:void 0,filterValue:void 0},$ue=["post-only","template-locked"],ede=(0,Ei.createRegistrySelector)(e=>(0,Ei.createSelector)(t=>{if(typeof t.blockInserterPanel=="object")return t.blockInserterPanel;if(JS(t)==="template-locked"){let{getBlocksByName:r,getSelectedBlockClientId:o,getBlockParents:n,getBlockOrder:i}=e(ty.store),[a]=r("core/post-content");if(a){let l=o();return l&&l!==a&&n(l).includes(a)?DD:{rootClientId:a,insertionIndex:i(a).length,filterValue:void 0}}}return DD},t=>{let{getBlocksByName:r,getSelectedBlockClientId:o,getBlockParents:n,getBlockOrder:i}=e(ty.store),[a]=r("core/post-content"),l=o();return[t.blockInserterPanel,JS(t),a,l,l?n(l):void 0,a?i(a).length:void 0]}));function tde(e){return e.listViewToggleRef}function rde(e){return e.inserterSidebarToggleRef}var BD={wp_block:Wv,wp_navigation:vA,page:qm,post:oO},ode=(0,Ei.createRegistrySelector)(e=>(t,r,o)=>{{if(r==="wp_template_part"||r==="wp_template"){let a=(e(Pn.store).getCurrentTheme()?.default_template_part_areas||[]).find(l=>o.area===l.area);return a?.icon?$c(a.icon):Bs}if(BD[r])return BD[r];let n=e(Pn.store).getPostType(r);return typeof n?.icon=="string"&&n.icon.startsWith("dashicons-")?n.icon.slice(10):qm}}),nde=(0,Ei.createRegistrySelector)(e=>(t,r,o)=>{let{type:n,id:i}=$r(t),a=e(Pn.store).getEntityRecordNonTransientEdits("postType",r||n,o||i);if(!a?.meta)return!1;let l=e(Pn.store).getEntityRecord("postType",r||n,o||i)?.meta;return!(0,MD.default)({...l,footnotes:void 0},{...a.meta,footnotes:void 0})});function ide(e,...t){return TD(e.dataviews,...t)}function sde(e,...t){return kD(e.dataviews,...t)}function ade(e,...t){return PD(e.dataviews,...t)}var lde=(0,Ei.createRegistrySelector)(e=>(0,Ei.createSelector)((t,r)=>{r=Array.isArray(r)?r:[r];let{getBlocksByName:o,getBlockParents:n,getBlockName:i}=e(ty.store);return o(r).filter(a=>n(a).every(l=>{let c=i(l);return c!=="core/query"&&!r.includes(c)}))},(t,r)=>{r=Array.isArray(r)?r:[r];let{getBlocksByName:o,getBlockParents:n}=e(ty.store),i=o(r),a=i.map(l=>n(l));return[i,...a]})),cde=(0,Ei.createRegistrySelector)(e=>(t,r)=>{let{getPostType:o,getCurrentTheme:n,hasFinishedResolution:i}=e(Pn.store),a=n(),l=o(r);if(!i("getPostType",[r])||!i("getCurrentTheme"))return;let c=a?.stylesheet,u=e(LD.store).get("core","renderingModes")?.[c]?.[r],d=Array.isArray(l?.supports?.editor)?l.supports.editor.find(m=>"default-mode"in m)?.["default-mode"]:void 0,f=u||d;return $ue.includes(f)?f:"post-only"});function ude(e){return e.stylesPath??"/"}function dde(e){return e.showStylebook??!1}function fde(e){return e.canvasMinHeight}function gO(e){return e.revisionPage}function qd(e,t){return{per_page:VD,page:t,context:"edit",orderby:"date",order:"desc",_fields:[...new Set(["id","date","modified","author","meta","title.raw","excerpt.raw","content.raw",e])].join()}}var VD=100;function mde(){return VD}var pde=(0,Ei.createRegistrySelector)(e=>(t,r)=>{if(!r)return null;let{type:o,id:n}=$r(t);if(!o||!n)return null;let a=e(Pn.store).getEntityConfig("postType",o)?.revisionKey||"id";return e(Pn.store).getRevisions("postType",o,n,qd(a,r))});function hde(e){return e.revisionId!==null}function gde(e){return e.showRevisionDiff}function vO(e){return e.revisionId}var vde=(0,Ei.createRegistrySelector)(e=>t=>{let r=vO(t);if(!r)return;let o=gO(t);if(!o)return null;let{type:n,id:i}=$r(t),l=e(Pn.store).getEntityConfig("postType",n)?.revisionKey||"id",c=e(Pn.store).getRevisions("postType",n,i,qd(l,o));return c?c.find(u=>u[l]===r)??null:null});function yde(e){return e.selectedNote?.noteId}function bde(e){return!!e.selectedNote?.options?.focus}var Sde=(0,Ei.createRegistrySelector)(e=>t=>{let r=vO(t);if(!r)return;let o=gO(t);if(!o)return null;let{type:n,id:i}=$r(t),l=e(Pn.store).getEntityConfig("postType",n)?.revisionKey||"id",c=qd(l,o),u=e(Pn.store).getRevisions("postType",n,i,c);if(!u)return null;let d=u.findIndex(h=>h[l]===r);if(d>=0&&d<u.length-1)return u[d+1];let f=lO(t),m=Math.ceil(f/c.per_page)||1;return d===u.length-1&&o<m?e(Pn.store).getRevisions("postType",n,i,qd(l,o+1))?.[0]??null:null}),_de=(0,Ei.createRegistrySelector)(e=>t=>{if(!N(e(Pn.store)).isCollaborationSupported())return!1;let r=Qn(t);return!!(e(Pn.store).getEntityConfig("postType",r)?.syncConfig&&window._wpCollaborationEnabled)});var Gx=s(W(),1),OG=s(mo(),1);var QD=s(E(),1);var kn=s(A(),1);var s_=s(he(),1),WD=s(O(),1),tp=s(D(),1),YD=s(ct(),1),qD=s(Ir(),1),Zd=s(E(),1);var GD=s(Ir(),1);var o_=s(ft(),1),zD=s(E(),1);function UD(e){return e.type==="wp_template"}function HD(e){return e.type==="wp_template_part"}function Rl(e){return e.type==="wp_template"||e.type==="wp_template_part"}function He(e,t=(0,zD.__)("(no title)")){let r="";return typeof e.title=="string"?r=(0,o_.decodeEntities)(e.title):e.title&&"rendered"in e.title?r=(0,o_.decodeEntities)(e.title.rendered):e.title&&"raw"in e.title&&(r=(0,o_.decodeEntities)(e.title.raw)),r||t}function n_(e){return e?[e.source,e.source].includes("custom")&&!(e.type==="wp_template"&&e?.plugin)&&!e.has_theme_file:!1}var i_=e=>typeof e!="object"?"":e.slug||(0,GD.cleanForSlug)(He(e))||e.id.toString();var ho=s(C(),1),ZD=({field:e,onChange:t,data:r})=>{let{id:o}=e,n=e.getValue({item:r})||i_(r),i=r.permalink_template||"",a=/%(?:postname|pagename)%/,[l,c]=i.split(a),u=l,d=c,f=a.test(i),m=(0,tp.useRef)(n),h=n||m.current,g=f?`${u}${h}${d}`:(0,qD.safeDecodeURIComponent)(r.link||"");(0,tp.useEffect)(()=>{n&&m.current===void 0&&(m.current=n)},[n]);let v=(0,tp.useCallback)(S=>t({[o]:S}),[o,t]),{createNotice:y}=(0,WD.useDispatch)(YD.store),b=(0,s_.useCopyToClipboard)(g,()=>{y("info",(0,Zd.__)("Copied Permalink to clipboard."),{isDismissible:!0,type:"snackbar"})}),_="editor-post-url__slug-description-"+(0,s_.useInstanceId)(ZD);return(0,ho.jsxs)("fieldset",{className:"fields-controls__slug",children:[f&&(0,ho.jsxs)(kn.__experimentalVStack,{children:[(0,ho.jsxs)(kn.__experimentalVStack,{spacing:"0px",children:[(0,ho.jsx)("span",{children:(0,Zd.__)("Customize the last part of the Permalink.")}),(0,ho.jsx)(kn.ExternalLink,{href:"https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink",children:(0,Zd.__)("Learn more")})]}),(0,ho.jsx)(kn.__experimentalInputControl,{__next40pxDefaultSize:!0,prefix:(0,ho.jsx)(kn.__experimentalInputControlPrefixWrapper,{children:"/"}),suffix:(0,ho.jsx)(kn.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,ho.jsx)(kn.Button,{size:"small",icon:kv,ref:b,label:(0,Zd.__)("Copy")})}),label:(0,Zd.__)("Link"),hideLabelFromVision:!0,value:n,autoComplete:"off",spellCheck:"false",type:"text",className:"fields-controls__slug-input",onChange:S=>{v(S)},onBlur:()=>{n===""&&v(m.current)},"aria-describedby":_}),(0,ho.jsxs)("div",{className:"fields-controls__slug-help",children:[(0,ho.jsx)("span",{className:"fields-controls__slug-help-visual-label",children:(0,Zd.__)("Permalink:")}),(0,ho.jsxs)(kn.ExternalLink,{className:"fields-controls__slug-help-link",href:g,children:[(0,ho.jsx)("span",{className:"fields-controls__slug-help-prefix",children:u}),(0,ho.jsx)("span",{className:"fields-controls__slug-help-slug",children:h}),(0,ho.jsx)("span",{className:"fields-controls__slug-help-suffix",children:d})]})]})]}),!f&&(0,ho.jsx)(kn.ExternalLink,{className:"fields-controls__slug-help",href:g,children:g})]})},KD=ZD;var a_=s(D(),1);var wde=({item:e})=>{let t=i_(e),r=(0,a_.useRef)(t);return(0,a_.useEffect)(()=>{t&&r.current===void 0&&(r.current=t)},[t]),`${t||r.current}`},XD=wde;var xde={id:"slug",type:"text",label:(0,QD.__)("Slug"),Edit:KD,render:XD,filterBy:!1},bO=xde;var SO=s(E(),1);function JD(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=JD(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function Cde(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=JD(e))&&(o&&(o+=" "),o+=t);return o}var re=Cde;var $D=s(A(),1),eB=s(E(),1);var ry=s(C(),1);function oy({item:e,className:t,children:r}){let o=He(e);return(0,ry.jsxs)($D.__experimentalHStack,{className:re("fields-field__title",t),alignment:"center",justify:"flex-start",children:[(0,ry.jsx)("span",{children:o||(0,eB.__)("(no title)")}),r]})}function l_({item:e}){return(0,ry.jsx)(oy,{item:e})}var Tde={type:"text",id:"title",label:(0,SO.__)("Title"),placeholder:(0,SO.__)("No title"),getValue:({item:e})=>He(e),render:l_,enableHiding:!0,enableGlobalSearch:!0,filterBy:!1},c_=Tde;var xO=s(E(),1);var _O=s(E(),1),rB=s(O(),1),oB=s(W(),1),nB=s(A(),1);var tB=s(qv(),1),{lock:Q6e,unlock:Do}=(0,tB.__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/fields");var wO=s(C(),1),{Badge:Pde}=Do(nB.privateApis);function iB({item:e}){let{frontPageId:t,postsPageId:r}=(0,rB.useSelect)(o=>{let{getEntityRecord:n}=o(oB.store),i=n("root","site");return{frontPageId:i?.page_on_front,postsPageId:i?.page_for_posts}},[]);return(0,wO.jsx)(oy,{item:e,className:"fields-field__page-title",children:[t,r].includes(e.id)&&(0,wO.jsx)(Pde,{children:e.id===t?(0,_O.__)("Homepage"):(0,_O.__)("Posts Page")})})}var kde={type:"text",id:"title",label:(0,xO.__)("Title"),placeholder:(0,xO.__)("No title"),getValue:({item:e})=>He(e),render:iB,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},CO=kde;var TO=s(E(),1);var Ede={type:"text",label:(0,TO.__)("Template"),placeholder:(0,TO.__)("No title"),id:"title",getValue:({item:e})=>He(e),render:l_,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},ny=Ede;var PO=s(E(),1);var aB=s(E(),1);var lB=s(A(),1),cB=s(Ls(),1);var u_=s(C(),1),{PATTERN_TYPES:Rde}=Do(cB.privateApis);function uB({item:e}){return(0,u_.jsx)(oy,{item:e,className:"fields-field__pattern-title",children:e.type===Rde.theme&&(0,u_.jsx)(lB.Tooltip,{placement:"top",text:(0,aB.__)("This pattern cannot be edited."),children:(0,u_.jsx)(No,{icon:fA,size:24})})})}var Ade={type:"text",id:"title",label:(0,PO.__)("Title"),placeholder:(0,PO.__)("No title"),getValue:({item:e})=>He(e),render:uB,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},iy=Ade;var _M=s(E(),1);var ut=s(A(),1),rf=s(sy(),1),d5=s(W(),1),Cy=s(O(),1),$t=s(D(),1),An=s(E(),1);var fp=s(Yd(),1),pM=s(ct(),1);var EO=ly(),Ge=e=>ay(e,EO),RO=ly();Ge.write=e=>ay(e,RO);var d_=ly();Ge.onStart=e=>ay(e,d_);var AO=ly();Ge.onFrame=e=>ay(e,AO);var OO=ly();Ge.onFinish=e=>ay(e,OO);var rp=[];Ge.setTimeout=(e,t)=>{let r=Ge.now()+t,o=()=>{let i=rp.findIndex(a=>a.cancel==o);~i&&rp.splice(i,1),nu-=~i?1:0},n={time:r,handler:e,cancel:o};return rp.splice(fB(r),0,n),nu+=1,mB(),n};var fB=e=>~(~rp.findIndex(t=>t.time>e)||~rp.length);Ge.cancel=e=>{d_.delete(e),AO.delete(e),OO.delete(e),EO.delete(e),RO.delete(e)};Ge.sync=e=>{kO=!0,Ge.batchedUpdates(e),kO=!1};Ge.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function o(...n){t=n,Ge.onStart(r)}return o.handler=e,o.cancel=()=>{d_.delete(r),t=null},o};var IO=typeof window<"u"?window.requestAnimationFrame:()=>{};Ge.use=e=>IO=e;Ge.now=typeof performance<"u"?()=>performance.now():Date.now;Ge.batchedUpdates=e=>e();Ge.catch=console.error;Ge.frameLoop="always";Ge.advance=()=>{Ge.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):hB()};var ou=-1,nu=0,kO=!1;function ay(e,t){kO?(t.delete(e),e(0)):(t.add(e),mB())}function mB(){ou<0&&(ou=0,Ge.frameLoop!=="demand"&&IO(pB))}function Ode(){ou=-1}function pB(){~ou&&(IO(pB),Ge.batchedUpdates(hB))}function hB(){let e=ou;ou=Ge.now();let t=fB(ou);if(t&&(gB(rp.splice(0,t),r=>r.handler()),nu-=t),!nu){Ode();return}d_.flush(),EO.flush(e?Math.min(64,ou-e):16.667),AO.flush(),RO.flush(),OO.flush()}function ly(){let e=new Set,t=e;return{add(r){nu+=t==e&&!e.has(r)?1:0,e.add(r)},delete(r){return nu-=t==e&&e.has(r)?1:0,e.delete(r)},flush(r){t.size&&(e=new Set,nu-=t.size,gB(t,o=>o(r)&&e.add(o)),nu+=e.size,t=e)}}}function gB(e,t){e.forEach(r=>{try{t(r)}catch(o){Ge.catch(o)}})}var Qi=s(Jn());function g_(){}var xB=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),ce={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 Ta(e,t){if(ce.arr(e)){if(!ce.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 zt=(e,t)=>e.forEach(t);function Ji(e,t,r){if(ce.arr(e)){for(let o=0;o<e.length;o++)t.call(r,e[o],`${o}`);return}for(let o in e)e.hasOwnProperty(o)&&t.call(r,e[o],o)}var $n=e=>ce.und(e)?[]:ce.arr(e)?e:[e];function sp(e,t){if(e.size){let r=Array.from(e);e.clear(),zt(r,t)}}var ap=(e,...t)=>sp(e,r=>r(...t)),LO=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),VO,CB,iu=null,TB=!1,jO=g_,Ide=e=>{e.to&&(CB=e.to),e.now&&(Ge.now=e.now),e.colors!==void 0&&(iu=e.colors),e.skipAnimation!=null&&(TB=e.skipAnimation),e.createStringInterpolator&&(VO=e.createStringInterpolator),e.requestAnimationFrame&&Ge.use(e.requestAnimationFrame),e.batchedUpdates&&(Ge.batchedUpdates=e.batchedUpdates),e.willAdvance&&(jO=e.willAdvance),e.frameLoop&&(Ge.frameLoop=e.frameLoop)},Ri=Object.freeze({__proto__:null,get createStringInterpolator(){return VO},get to(){return CB},get colors(){return iu},get skipAnimation(){return TB},get willAdvance(){return jO},assign:Ide}),cy=new Set,Xi=[],NO=[],p_=0,lp={get idle(){return!cy.size&&!Xi.length},start(e){p_>e.priority?(cy.add(e),Ge.onStart(Nde)):(PB(e),Ge(BO))},advance:BO,sort(e){if(p_)Ge.onFrame(()=>lp.sort(e));else{let t=Xi.indexOf(e);~t&&(Xi.splice(t,1),kB(e))}},clear(){Xi=[],cy.clear()}};function Nde(){cy.forEach(PB),cy.clear(),Ge(BO)}function PB(e){Xi.includes(e)||kB(e)}function kB(e){Xi.splice(Fde(Xi,t=>t.priority>e.priority),0,e)}function BO(e){let t=NO;for(let r=0;r<Xi.length;r++){let o=Xi[r];p_=o.priority,o.idle||(jO(o),o.advance(e),o.idle||t.push(o))}return p_=0,NO=Xi,NO.length=0,Xi=t,Xi.length>0}function Fde(e,t){let r=e.findIndex(t);return r<0?e.length:r}var EB={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},Vs="[-+]?\\d*\\.?\\d+",h_=Vs+"%";function v_(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Dde=new RegExp("rgb"+v_(Vs,Vs,Vs)),Bde=new RegExp("rgba"+v_(Vs,Vs,Vs,Vs)),Mde=new RegExp("hsl"+v_(Vs,h_,h_)),Lde=new RegExp("hsla"+v_(Vs,h_,h_,Vs)),Vde=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,jde=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,zde=/^#([0-9a-fA-F]{6})$/,Ude=/^#([0-9a-fA-F]{8})$/;function Hde(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=zde.exec(e))?parseInt(t[1]+"ff",16)>>>0:iu&&iu[e]!==void 0?iu[e]:(t=Dde.exec(e))?(op(t[1])<<24|op(t[2])<<16|op(t[3])<<8|255)>>>0:(t=Bde.exec(e))?(op(t[1])<<24|op(t[2])<<16|op(t[3])<<8|SB(t[4]))>>>0:(t=Vde.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Ude.exec(e))?parseInt(t[1],16)>>>0:(t=jde.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Mde.exec(e))?(yB(bB(t[1]),f_(t[2]),f_(t[3]))|255)>>>0:(t=Lde.exec(e))?(yB(bB(t[1]),f_(t[2]),f_(t[3]))|SB(t[4]))>>>0:null}function FO(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 yB(e,t,r){let o=r<.5?r*(1+t):r+t-r*t,n=2*r-o,i=FO(n,o,e+1/3),a=FO(n,o,e),l=FO(n,o,e-1/3);return Math.round(i*255)<<24|Math.round(a*255)<<16|Math.round(l*255)<<8}function op(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function bB(e){return(parseFloat(e)%360+360)%360/360}function SB(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function f_(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function _B(e){let t=Hde(e);if(t===null)return e;t=t||0;let r=(t&4278190080)>>>24,o=(t&16711680)>>>16,n=(t&65280)>>>8,i=(t&255)/255;return`rgba(${r}, ${o}, ${n}, ${i})`}var su=(e,t,r)=>{if(ce.fun(e))return e;if(ce.arr(e))return su({range:e,output:t,extrapolate:r});if(ce.str(e.output[0]))return VO(e);let o=e,n=o.output,i=o.range||[0,1],a=o.extrapolateLeft||o.extrapolate||"extend",l=o.extrapolateRight||o.extrapolate||"extend",c=o.easing||(u=>u);return u=>{let d=Wde(u,i);return Gde(u,i[d],i[d+1],n[d],n[d+1],c,a,l,o.map)}};function Gde(e,t,r,o,n,i,a,l,c){let u=c?c(e):e;if(u<t){if(a==="identity")return u;a==="clamp"&&(u=t)}if(u>r){if(l==="identity")return u;l==="clamp"&&(u=r)}return o===n?o:t===r?e<=t?o:n:(t===-1/0?u=-u:r===1/0?u=u-t:u=(u-t)/(r-t),u=i(u),o===-1/0?u=-u:n===1/0?u=u+o:u=u*(n-o)+o,u)}function Wde(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}function MO(){return MO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},MO.apply(this,arguments)}var np=Symbol.for("FluidValue.get"),Kd=Symbol.for("FluidValue.observers"),En=e=>!!(e&&e[np]),Bo=e=>e&&e[np]?e[np]():e,zO=e=>e[Kd]||null;function Yde(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Xd(e,t){let r=e[Kd];r&&r.forEach(o=>{Yde(o,t)})}var ip=class{constructor(t){if(this[np]=void 0,this[Kd]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");qde(this,t)}},qde=(e,t)=>RB(e,np,t);function au(e,t){if(e[np]){let r=e[Kd];r||RB(e,Kd,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function lu(e,t){let r=e[Kd];if(r&&r.has(t)){let o=r.size-1;o?r.delete(t):e[Kd]=null,e.observerRemoved&&e.observerRemoved(o,t)}}var RB=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),m_=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Zde=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,wB=new RegExp(`(${m_.source})(%|[a-z]+)`,"i"),Kde=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,y_=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,AB=e=>{let[t,r]=Xde(e);if(!t||LO())return e;let o=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(o)return o.trim();if(r&&r.startsWith("--")){let n=window.getComputedStyle(document.documentElement).getPropertyValue(r);return n||e}else{if(r&&y_.test(r))return AB(r);if(r)return r}return e},Xde=e=>{let t=y_.exec(e);if(!t)return[,];let[,r,o]=t;return[r,o]},DO,Qde=(e,t,r,o,n)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(o)}, ${n})`,b_=e=>{DO||(DO=iu?new RegExp(`(${Object.keys(iu).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(i=>Bo(i).replace(y_,AB).replace(Zde,_B).replace(DO,_B)),r=t.map(i=>i.match(m_).map(Number)),n=r[0].map((i,a)=>r.map(l=>{if(!(a in l))throw Error('The arity of each "output" value must be equal');return l[a]})).map(i=>su(MO({},e,{output:i})));return i=>{var a;let l=!wB.test(t[0])&&((a=t.find(u=>wB.test(u)))==null?void 0:a.replace(m_,"")),c=0;return t[0].replace(m_,()=>`${n[c++](i)}${l||""}`).replace(Kde,Qde)}},OB="react-spring: ",IB=e=>{let t=e,r=!1;if(typeof t!="function")throw new TypeError(`${OB}once requires a function parameter`);return(...o)=>{r||(t(...o),r=!0)}},Jde=IB(console.warn);function NB(){Jde(`${OB}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var S3e=IB(console.warn);function cp(e){return ce.str(e)&&(e[0]=="#"||/\d/.test(e)||!LO()&&y_.test(e)||e in(iu||{}))}var uy=LO()?Qi.useEffect:Qi.useLayoutEffect,$de=()=>{let e=(0,Qi.useRef)(!1);return uy(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function UO(){let e=(0,Qi.useState)()[1],t=$de();return()=>{t.current&&e(Math.random())}}function FB(e,t){let[r]=(0,Qi.useState)(()=>({inputs:t,result:e()})),o=(0,Qi.useRef)(),n=o.current,i=n;return i?t&&i.inputs&&efe(t,i.inputs)||(i={inputs:t,result:e()}):i=r,(0,Qi.useEffect)(()=>{o.current=i,n==r&&(r.inputs=r.result=void 0)},[i]),i.result}function efe(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 HO=e=>(0,Qi.useEffect)(e,tfe),tfe=[];var Sy=s(Jn()),_y=s(Jn());var LB=s(Jn()),Al=s(Jn()),dy=Symbol.for("Animated:node"),rfe=e=>!!e&&e[dy]===e,js=e=>e&&e[dy],x_=(e,t)=>xB(e,dy,t),fy=e=>e&&e[dy]&&e[dy].getPayload(),S_=class{constructor(){this.payload=void 0,x_(this,this)}getPayload(){return this.payload||[]}},Qd=class e extends S_{constructor(t){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=t,ce.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new e(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,r){return ce.num(t)&&(this.lastPosition=t,r&&(t=Math.round(t/r)*r,this.done&&(this.lastPosition=t))),this._value===t?!1:(this._value=t,!0)}reset(){let{done:t}=this;this.done=!1,ce.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},Jd=class e extends Qd{constructor(t){super(0),this._string=null,this._toString=void 0,this._toString=su({output:[t,t]})}static create(t){return new e(t)}getValue(){let t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(ce.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=su({output:[this.getValue(),t]})),this._value=0,super.reset()}},__={dependencies:null},$d=class extends S_{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){let r={};return Ji(this.source,(o,n)=>{rfe(o)?r[n]=o.getValue(t):En(o)?r[n]=Bo(o):t||(r[n]=o)}),r}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&zt(this.payload,t=>t.reset())}_makePayload(t){if(t){let r=new Set;return Ji(t,this._addToPayload,r),Array.from(r)}}_addToPayload(t){__.dependencies&&En(t)&&__.dependencies.add(t);let r=fy(t);r&&zt(r,o=>this.add(o))}},GO=class e extends $d{constructor(t){super(t)}static create(t){return new e(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){let r=this.getPayload();return t.length==r.length?r.map((o,n)=>o.setValue(t[n])).some(Boolean):(super.setValue(t.map(ofe)),!0)}};function ofe(e){return(cp(e)?Jd:Qd).create(e)}function C_(e){let t=js(e);return t?t.constructor:ce.arr(e)?GO:cp(e)?Jd:Qd}function w_(){return w_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},w_.apply(this,arguments)}var DB=(e,t)=>{let r=!ce.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Al.forwardRef)((o,n)=>{let i=(0,Al.useRef)(null),a=r&&(0,Al.useCallback)(g=>{i.current=ife(n,g)},[n]),[l,c]=nfe(o,t),u=UO(),d=()=>{let g=i.current;if(r&&!g)return;(g?t.applyAnimatedValues(g,l.getValue(!0)):!1)===!1&&u()},f=new WO(d,c),m=(0,Al.useRef)();uy(()=>(m.current=f,zt(c,g=>au(g,f)),()=>{m.current&&(zt(m.current.deps,g=>lu(g,m.current)),Ge.cancel(m.current.update))})),(0,Al.useEffect)(d,[]),HO(()=>()=>{let g=m.current;zt(g.deps,v=>lu(v,g))});let h=t.getComponentProps(l.getValue());return LB.createElement(e,w_({},h,{ref:a}))})},WO=class{constructor(t,r){this.update=t,this.deps=r}eventObserved(t){t.type=="change"&&Ge.write(this.update)}};function nfe(e,t){let r=new Set;return __.dependencies=r,e.style&&(e=w_({},e,{style:t.createAnimatedStyle(e.style)})),e=new $d(e),__.dependencies=null,[e,r]}function ife(e,t){return e&&(ce.fun(e)?e(t):e.current=t),t}var BB=Symbol.for("AnimatedComponent"),VB=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=n=>new $d(n),getComponentProps:o=n=>n}={})=>{let n={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:o},i=a=>{let l=MB(a)||"Anonymous";return ce.str(a)?a=i[a]||(i[a]=DB(a,n)):a=a[BB]||(a[BB]=DB(a,n)),a.displayName=`Animated(${l})`,a};return Ji(e,(a,l)=>{ce.arr(e)&&(l=MB(a)),i[l]=i(a)}),{animated:i}},MB=e=>ce.str(e)?e:e&&ce.str(e.displayName)?e.displayName:ce.fun(e)&&e.name||null;function Rn(){return Rn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Rn.apply(this,arguments)}function ef(e,...t){return ce.fun(e)?e(...t):e}var gy=(e,t)=>e===!0||!!(t&&e&&(ce.fun(e)?e(t):$n(e).includes(t))),QB=(e,t)=>ce.obj(e)?t&&e[t]:e,JB=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,sfe=e=>e,$B=(e,t=sfe)=>{let r=afe;e.default&&e.default!==!0&&(e=e.default,r=Object.keys(e));let o={};for(let n of r){let i=t(e[n],n);ce.und(i)||(o[n]=i)}return o},afe=["config","onProps","onStart","onChange","onPause","onResume","onRest"],lfe={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 cfe(e){let t={},r=0;if(Ji(e,(o,n)=>{lfe[n]||(t[n]=o,r++)}),r)return t}function eM(e){let t=cfe(e);if(t){let r={to:t};return Ji(e,(o,n)=>n in t||(r[n]=o)),r}return Rn({},e)}function vy(e){return e=Bo(e),ce.arr(e)?e.map(vy):cp(e)?Ri.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function ZO(e){return ce.fun(e)||ce.arr(e)&&ce.obj(e[0])}var ufe={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}},k_=1.70158,T_=k_*1.525,jB=k_+1,zB=2*Math.PI/3,UB=2*Math.PI/4.5,P_=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,dfe={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=>jB*e*e*e-k_*e*e,easeOutBack:e=>1+jB*Math.pow(e-1,3)+k_*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((T_+1)*2*e-T_)/2:(Math.pow(2*e-2,2)*((T_+1)*(e*2-2)+T_)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*zB),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*zB)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*UB))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*UB)/2+1,easeInBounce:e=>1-P_(1-e),easeOutBounce:P_,easeInOutBounce:e=>e<.5?(1-P_(1-2*e))/2:(1+P_(2*e-1))/2},KO=Rn({},ufe.default,{mass:1,damping:1,easing:dfe.linear,clamp:!1}),XO=class{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,KO)}};function ffe(e,t,r){r&&(r=Rn({},r),HB(r,t),t=Rn({},r,t)),HB(e,t),Object.assign(e,t);for(let a in KO)e[a]==null&&(e[a]=KO[a]);let{mass:o,frequency:n,damping:i}=e;return ce.und(n)||(n<.01&&(n=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/n,2)*o,e.friction=4*Math.PI*i*o/n),e}function HB(e,t){if(!ce.und(t.decay))e.duration=void 0;else{let r=!ce.und(t.tension)||!ce.und(t.friction);(r||!ce.und(t.frequency)||!ce.und(t.damping)||!ce.und(t.mass))&&(e.duration=void 0,e.decay=void 0),r&&(e.frequency=void 0)}}var GB=[],QO=class{constructor(){this.changed=!1,this.values=GB,this.toValues=null,this.fromValues=GB,this.to=void 0,this.from=void 0,this.config=new XO,this.immediate=!1}};function tM(e,{key:t,props:r,defaultProps:o,state:n,actions:i}){return new Promise((a,l)=>{var c;let u,d,f=gy((c=r.cancel)!=null?c:o?.cancel,t);if(f)g();else{ce.und(r.pause)||(n.paused=gy(r.pause,t));let v=o?.pause;v!==!0&&(v=n.paused||gy(v,t)),u=ef(r.delay||0,t),v?(n.resumeQueue.add(h),i.pause()):(i.resume(),h())}function m(){n.resumeQueue.add(h),n.timeouts.delete(d),d.cancel(),u=d.time-Ge.now()}function h(){u>0&&!Ri.skipAnimation?(n.delayed=!0,d=Ge.setTimeout(g,u),n.pauseQueue.add(m),n.timeouts.add(d)):g()}function g(){n.delayed&&(n.delayed=!1),n.pauseQueue.delete(m),n.timeouts.delete(d),e<=(n.cancelId||0)&&(f=!0);try{i.start(Rn({},r,{callId:e,cancel:f}),a)}catch(v){l(v)}}})}var n5=(e,t)=>t.length==1?t[0]:t.some(r=>r.cancelled)?up(e.get()):t.every(r=>r.noop)?rM(e.get()):zs(e.get(),t.every(r=>r.finished)),rM=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),zs=(e,t,r=!1)=>({value:e,finished:t,cancelled:r}),up=e=>({value:e,cancelled:!0,finished:!1});function oM(e,t,r,o){let{callId:n,parentId:i,onRest:a}=t,{asyncTo:l,promise:c}=r;return!i&&e===l&&!t.reset?c:r.promise=(async()=>{r.asyncId=n,r.asyncTo=e;let u=$B(t,(y,b)=>b==="onRest"?void 0:y),d,f,m=new Promise((y,b)=>(d=y,f=b)),h=y=>{let b=n<=(r.cancelId||0)&&up(o)||n!==r.asyncId&&zs(o,!1);if(b)throw y.result=b,f(y),y},g=(y,b)=>{let _=new E_,S=new R_;return(async()=>{if(Ri.skipAnimation)throw yy(r),S.result=zs(o,!1),f(S),S;h(_);let x=ce.obj(y)?Rn({},y):Rn({},b,{to:y});x.parentId=n,Ji(u,(R,F)=>{ce.und(x[F])&&(x[F]=R)});let T=await o.start(x);return h(_),r.paused&&await new Promise(R=>{r.resumeQueue.add(R)}),T})()},v;if(Ri.skipAnimation)return yy(r),zs(o,!1);try{let y;ce.arr(e)?y=(async b=>{for(let _ of b)await g(_)})(e):y=Promise.resolve(e(g,o.stop.bind(o))),await Promise.all([y.then(d),m]),v=zs(o.get(),!0,!1)}catch(y){if(y instanceof E_)v=y.result;else if(y instanceof R_)v=y.result;else throw y}finally{n==r.asyncId&&(r.asyncId=i,r.asyncTo=i?l:void 0,r.promise=i?c:void 0)}return ce.fun(a)&&Ge.batchedUpdates(()=>{a(v,o,o.item)}),v})()}function yy(e,t){sp(e.timeouts,r=>r.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var E_=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."),this.result=void 0}},R_=class extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}},JO=e=>e instanceof by,mfe=1,by=class extends ip{constructor(...t){super(...t),this.id=mfe++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(t){this._priority!=t&&(this._priority=t,this._onPriorityChange(t))}get(){let t=js(this);return t&&t.getValue()}to(...t){return Ri.to(this,t)}interpolate(...t){return NB(),Ri.to(this,t)}toJSON(){return this.get()}observerAdded(t){t==1&&this._attach()}observerRemoved(t){t==0&&this._detach()}_attach(){}_detach(){}_onChange(t,r=!1){Xd(this,{type:"change",parent:this,value:t,idle:r})}_onPriorityChange(t){this.idle||lp.sort(this),Xd(this,{type:"priority",parent:this,priority:t})}},tf=Symbol.for("SpringPhase"),nM=1,$O=2,e5=4,YO=e=>(e[tf]&nM)>0,cu=e=>(e[tf]&$O)>0,my=e=>(e[tf]&e5)>0,WB=(e,t)=>t?e[tf]|=$O|nM:e[tf]&=~$O,YB=(e,t)=>t?e[tf]|=e5:e[tf]&=~e5,t5=class extends by{constructor(t,r){if(super(),this.key=void 0,this.animation=new QO,this.queue=void 0,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!ce.und(t)||!ce.und(r)){let o=ce.obj(t)?Rn({},t):Rn({},r,{from:t});ce.und(o.default)&&(o.default=!0),this.start(o)}}get idle(){return!(cu(this)||this._state.asyncTo)||my(this)}get goal(){return Bo(this.animation.to)}get velocity(){let t=js(this);return t instanceof Qd?t.lastVelocity||0:t.getPayload().map(r=>r.lastVelocity||0)}get hasAnimated(){return YO(this)}get isAnimating(){return cu(this)}get isPaused(){return my(this)}get isDelayed(){return this._state.delayed}advance(t){let r=!0,o=!1,n=this.animation,{config:i,toValues:a}=n,l=fy(n.to);!l&&En(n.to)&&(a=$n(Bo(n.to))),n.values.forEach((d,f)=>{if(d.done)return;let m=d.constructor==Jd?1:l?l[f].lastPosition:a[f],h=n.immediate,g=m;if(!h){if(g=d.lastPosition,i.tension<=0){d.done=!0;return}let v=d.elapsedTime+=t,y=n.fromValues[f],b=d.v0!=null?d.v0:d.v0=ce.arr(i.velocity)?i.velocity[f]:i.velocity,_,S=i.precision||(y==m?.005:Math.min(1,Math.abs(m-y)*.001));if(ce.und(i.duration))if(i.decay){let x=i.decay===!0?.998:i.decay,T=Math.exp(-(1-x)*v);g=y+b/(1-x)*(1-T),h=Math.abs(d.lastPosition-g)<=S,_=b*T}else{_=d.lastVelocity==null?b:d.lastVelocity;let x=i.restVelocity||S/10,T=i.clamp?0:i.bounce,R=!ce.und(T),F=y==m?d.v0>0:y<m,B,z=!1,L=1,M=Math.ceil(t/L);for(let k=0;k<M&&(B=Math.abs(_)>x,!(!B&&(h=Math.abs(m-g)<=S,h)));++k){R&&(z=g==m||g>m==F,z&&(_=-_*T,g=m));let I=-i.tension*1e-6*(g-m),U=-i.friction*.001*_,G=(I+U)/i.mass;_=_+G*L,g=g+_*L}}else{let x=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,d.durationProgress>0&&(d.elapsedTime=i.duration*d.durationProgress,v=d.elapsedTime+=t)),x=(i.progress||0)+v/this._memoizedDuration,x=x>1?1:x<0?0:x,d.durationProgress=x),g=y+i.easing(x)*(m-y),_=(g-d.lastPosition)/t,h=x==1}d.lastVelocity=_,Number.isNaN(g)&&(console.warn("Got NaN while animating:",this),h=!0)}l&&!l[f].done&&(h=!1),h?d.done=!0:r=!1,d.setValue(g,i.round)&&(o=!0)});let c=js(this),u=c.getValue();if(r){let d=Bo(n.to);(u!==d||o)&&!i.decay?(c.setValue(d),this._onChange(d)):o&&i.decay&&this._onChange(u),this._stop()}else o&&this._onChange(u)}set(t){return Ge.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(cu(this)){let{to:t,config:r}=this.animation;Ge.batchedUpdates(()=>{this._onStart(),r.decay||this._set(t,!1),this._stop()})}return this}update(t){return(this.queue||(this.queue=[])).push(t),this}start(t,r){let o;return ce.und(t)?(o=this.queue||[],this.queue=[]):o=[ce.obj(t)?t:Rn({},r,{to:t})],Promise.all(o.map(n=>this._update(n))).then(n=>n5(this,n))}stop(t){let{to:r}=this.animation;return this._focus(this.get()),yy(this._state,t&&this._lastCallId),Ge.batchedUpdates(()=>this._stop(r,t)),this}reset(){this._update({reset:!0})}eventObserved(t){t.type=="change"?this._start():t.type=="priority"&&(this.priority=t.priority+1)}_prepareNode(t){let r=this.key||"",{to:o,from:n}=t;o=ce.obj(o)?o[r]:o,(o==null||ZO(o))&&(o=void 0),n=ce.obj(n)?n[r]:n,n==null&&(n=void 0);let i={to:o,from:n};return YO(this)||(t.reverse&&([o,n]=[n,o]),n=Bo(n),ce.und(n)?js(this)||this._set(o):this._set(n)),i}_update(t,r){let o=Rn({},t),{key:n,defaultProps:i}=this;o.default&&Object.assign(i,$B(o,(c,u)=>/^on/.test(u)?QB(c,n):c)),ZB(this,o,"onProps"),hy(this,"onProps",o,this);let a=this._prepareNode(o);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 l=this._state;return tM(++this._lastCallId,{key:n,props:o,defaultProps:i,state:l,actions:{pause:()=>{my(this)||(YB(this,!0),ap(l.pauseQueue),hy(this,"onPause",zs(this,py(this,this.animation.to)),this))},resume:()=>{my(this)&&(YB(this,!1),cu(this)&&this._resume(),ap(l.resumeQueue),hy(this,"onResume",zs(this,py(this,this.animation.to)),this))},start:this._merge.bind(this,a)}}).then(c=>{if(o.loop&&c.finished&&!(r&&c.noop)){let u=iM(o);if(u)return this._update(u,!0)}return c})}_merge(t,r,o){if(r.cancel)return this.stop(!0),o(up(this));let n=!ce.und(t.to),i=!ce.und(t.from);if(n||i)if(r.callId>this._lastToId)this._lastToId=r.callId;else return o(up(this));let{key:a,defaultProps:l,animation:c}=this,{to:u,from:d}=c,{to:f=u,from:m=d}=t;i&&!n&&(!r.default||ce.und(f))&&(f=m),r.reverse&&([f,m]=[m,f]);let h=!Ta(m,d);h&&(c.from=m),m=Bo(m);let g=!Ta(f,u);g&&this._focus(f);let v=ZO(r.to),{config:y}=c,{decay:b,velocity:_}=y;(n||i)&&(y.velocity=0),r.config&&!v&&ffe(y,ef(r.config,a),r.config!==l.config?ef(l.config,a):void 0);let S=js(this);if(!S||ce.und(f))return o(zs(this,!0));let x=ce.und(r.reset)?i&&!r.default:!ce.und(m)&&gy(r.reset,a),T=x?m:this.get(),R=vy(f),F=ce.num(R)||ce.arr(R)||cp(R),B=!v&&(!F||gy(l.immediate||r.immediate,a));if(g){let k=C_(f);if(k!==S.constructor)if(B)S=this._set(R);else throw Error(`Cannot animate between ${S.constructor.name} and ${k.name}, as the "to" prop suggests`)}let z=S.constructor,L=En(f),M=!1;if(!L){let k=x||!YO(this)&&h;(g||k)&&(M=Ta(vy(T),R),L=!M),(!Ta(c.immediate,B)&&!B||!Ta(y.decay,b)||!Ta(y.velocity,_))&&(L=!0)}if(M&&cu(this)&&(c.changed&&!x?L=!0:L||this._stop(u)),!v&&((L||En(u))&&(c.values=S.getPayload(),c.toValues=En(f)?null:z==Jd?[1]:$n(R)),c.immediate!=B&&(c.immediate=B,!B&&!x&&this._set(u)),L)){let{onRest:k}=c;zt(pfe,U=>ZB(this,r,U));let I=zs(this,py(this,u));ap(this._pendingCalls,I),this._pendingCalls.add(o),c.changed&&Ge.batchedUpdates(()=>{c.changed=!x,k?.(I,this),x?ef(l.onRest,I):c.onStart==null||c.onStart(I,this)})}x&&this._set(T),v?o(oM(r.to,r,this._state,this)):L?this._start():cu(this)&&!g?this._pendingCalls.add(o):o(rM(T))}_focus(t){let r=this.animation;t!==r.to&&(zO(this)&&this._detach(),r.to=t,zO(this)&&this._attach())}_attach(){let t=0,{to:r}=this.animation;En(r)&&(au(r,this),JO(r)&&(t=r.priority+1)),this.priority=t}_detach(){let{to:t}=this.animation;En(t)&&lu(t,this)}_set(t,r=!0){let o=Bo(t);if(!ce.und(o)){let n=js(this);if(!n||!Ta(o,n.getValue())){let i=C_(o);!n||n.constructor!=i?x_(this,i.create(o)):n.setValue(o),n&&Ge.batchedUpdates(()=>{this._onChange(o,r)})}}return js(this)}_onStart(){let t=this.animation;t.changed||(t.changed=!0,hy(this,"onStart",zs(this,py(this,t.to)),this))}_onChange(t,r){r||(this._onStart(),ef(this.animation.onChange,t,this)),ef(this.defaultProps.onChange,t,this),super._onChange(t,r)}_start(){let t=this.animation;js(this).reset(Bo(t.to)),t.immediate||(t.fromValues=t.values.map(r=>r.lastPosition)),cu(this)||(WB(this,!0),my(this)||this._resume())}_resume(){Ri.skipAnimation?this.finish():lp.start(this)}_stop(t,r){if(cu(this)){WB(this,!1);let o=this.animation;zt(o.values,i=>{i.done=!0}),o.toValues&&(o.onChange=o.onPause=o.onResume=void 0),Xd(this,{type:"idle",parent:this});let n=r?up(this.get()):zs(this.get(),py(this,t??o.to));ap(this._pendingCalls,n),o.changed&&(o.changed=!1,hy(this,"onRest",n,this))}}};function py(e,t){let r=vy(t),o=vy(e.get());return Ta(o,r)}function iM(e,t=e.loop,r=e.to){let o=ef(t);if(o){let n=o!==!0&&eM(o),i=(n||e).reverse,a=!n||n.reset;return r5(Rn({},e,{loop:t,default:!1,pause:void 0,to:!i||ZO(r)?r:void 0,from:a?e.from:void 0,reset:a},n))}}function r5(e){let{to:t,from:r}=e=eM(e),o=new Set;return ce.obj(t)&&qB(t,o),ce.obj(r)&&qB(r,o),e.keys=o.size?Array.from(o):null,e}function qB(e,t){Ji(e,(r,o)=>r!=null&&t.add(o))}var pfe=["onStart","onRest","onChange","onPause","onResume"];function ZB(e,t,r){e.animation[r]=t[r]!==JB(t,r)?QB(t[r],e.key):void 0}function hy(e,t,...r){var o,n,i,a;(o=(n=e.animation)[t])==null||o.call(n,...r),(i=(a=e.defaultProps)[t])==null||i.call(a,...r)}var hfe=["onStart","onChange","onRest"],gfe=1,A_=class{constructor(t,r){this.id=gfe++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),r&&(this._flush=r),t&&this.start(Rn({default:!0},t))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){let t={};return this.each((r,o)=>t[o]=r.get()),t}set(t){for(let r in t){let o=t[r];ce.und(o)||this.springs[r].set(o)}}update(t){return t&&this.queue.push(r5(t)),this}start(t){let{queue:r}=this;return t?r=$n(t).map(r5):this.queue=[],this._flush?this._flush(this,r):(aM(this,r),vfe(this,r))}stop(t,r){if(t!==!!t&&(r=t),r){let o=this.springs;zt($n(r),n=>o[n].stop(!!t))}else yy(this._state,this._lastAsyncId),this.each(o=>o.stop(!!t));return this}pause(t){if(ce.und(t))this.start({pause:!0});else{let r=this.springs;zt($n(t),o=>r[o].pause())}return this}resume(t){if(ce.und(t))this.start({pause:!1});else{let r=this.springs;zt($n(t),o=>r[o].resume())}return this}each(t){Ji(this.springs,t)}_onFrame(){let{onStart:t,onChange:r,onRest:o}=this._events,n=this._active.size>0,i=this._changed.size>0;(n&&!this._started||i&&!this._started)&&(this._started=!0,sp(t,([c,u])=>{u.value=this.get(),c(u,this,this._item)}));let a=!n&&this._started,l=i||a&&o.size?this.get():null;i&&r.size&&sp(r,([c,u])=>{u.value=l,c(u,this,this._item)}),a&&(this._started=!1,sp(o,([c,u])=>{u.value=l,c(u,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;Ge.onFrame(this._onFrame)}};function vfe(e,t){return Promise.all(t.map(r=>sM(e,r))).then(r=>n5(e,r))}async function sM(e,t,r){let{keys:o,to:n,from:i,loop:a,onRest:l,onResolve:c}=t,u=ce.obj(t.default)&&t.default;a&&(t.loop=!1),n===!1&&(t.to=null),i===!1&&(t.from=null);let d=ce.arr(n)||ce.fun(n)?n:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):zt(hfe,v=>{let y=t[v];if(ce.fun(y)){let b=e._events[v];t[v]=({finished:_,cancelled:S})=>{let x=b.get(y);x?(_||(x.finished=!1),S&&(x.cancelled=!0)):b.set(y,{value:null,finished:_||!1,cancelled:S||!1})},u&&(u[v]=t[v])}});let f=e._state;t.pause===!f.paused?(f.paused=t.pause,ap(t.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(t.pause=!0);let m=(o||Object.keys(e.springs)).map(v=>e.springs[v].start(t)),h=t.cancel===!0||JB(t,"cancel")===!0;(d||h&&f.asyncId)&&m.push(tM(++e._lastAsyncId,{props:t,state:f,actions:{pause:g_,resume:g_,start(v,y){h?(yy(f,e._lastAsyncId),y(up(e))):(v.onRest=l,y(oM(d,v,f,e)))}}})),f.paused&&await new Promise(v=>{f.resumeQueue.add(v)});let g=n5(e,await Promise.all(m));if(a&&g.finished&&!(r&&g.noop)){let v=iM(t,a,n);if(v)return aM(e,[v]),sM(e,v,!0)}return c&&Ge.batchedUpdates(()=>c(g,e,e.item)),g}function yfe(e,t){let r=new t5;return r.key=e,t&&au(r,t),r}function bfe(e,t,r){t.keys&&zt(t.keys,o=>{(e[o]||(e[o]=r(o)))._prepareNode(t)})}function aM(e,t){zt(t,r=>{bfe(e.springs,r,o=>yfe(o,e))})}function Sfe(e,t){if(e==null)return{};var r={},o=Object.keys(e),n,i;for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}var _fe=["children"],i5=e=>{let{children:t}=e,r=Sfe(e,_fe),o=(0,_y.useContext)(O_),n=r.pause||!!o.pause,i=r.immediate||!!o.immediate;r=FB(()=>({pause:n,immediate:i}),[n,i]);let{Provider:a}=O_;return Sy.createElement(a,{value:r},t)},O_=wfe(i5,{});i5.Provider=O_.Provider;i5.Consumer=O_.Consumer;function wfe(e,t){return Object.assign(e,Sy.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var KB;(function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"})(KB||(KB={}));var o5=class extends by{constructor(t,r){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=su(...r);let o=this._get(),n=C_(o);x_(this,n.create(o))}advance(t){let r=this._get(),o=this.get();Ta(r,o)||(js(this).setValue(r),this._onChange(r,this.idle)),!this.idle&&XB(this._active)&&qO(this)}_get(){let t=ce.arr(this.source)?this.source.map(Bo):$n(Bo(this.source));return this.calc(...t)}_start(){this.idle&&!XB(this._active)&&(this.idle=!1,zt(fy(this),t=>{t.done=!1}),Ri.skipAnimation?(Ge.batchedUpdates(()=>this.advance()),qO(this)):lp.start(this))}_attach(){let t=1;zt($n(this.source),r=>{En(r)&&au(r,this),JO(r)&&(r.idle||this._active.add(r),t=Math.max(t,r.priority+1))}),this.priority=t,this._start()}_detach(){zt($n(this.source),t=>{En(t)&&lu(t,this)}),this._active.clear(),qO(this)}eventObserved(t){t.type=="change"?t.idle?this.advance():(this._active.add(t.parent),this._start()):t.type=="idle"?this._active.delete(t.parent):t.type=="priority"&&(this.priority=$n(this.source).reduce((r,o)=>Math.max(r,(JO(o)?o.priority:0)+1),0))}};function xfe(e){return e.idle!==!1}function XB(e){return!e.size||Array.from(e).every(xfe)}function qO(e){e.idle||(e.idle=!0,zt(fy(e),t=>{t.done=!0}),Xd(e,{type:"idle",parent:e}))}Ri.assign({createStringInterpolator:b_,to:(e,t)=>new o5(e,t)});var A3e=lp.advance;var uM=s(s5());function u5(e,t){if(e==null)return{};var r={},o=Object.keys(e),n,i;for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}var Cfe=["style","children","scrollTop","scrollLeft"],dM=/^--/;function Tfe(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!dM.test(e)&&!(wy.hasOwnProperty(e)&&wy[e])?t+"px":(""+t).trim()}var cM={};function Pfe(e,t){if(!e.nodeType||!e.setAttribute)return!1;let r=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",o=t,{style:n,children:i,scrollTop:a,scrollLeft:l}=o,c=u5(o,Cfe),u=Object.values(c),d=Object.keys(c).map(f=>r||e.hasAttribute(f)?f:cM[f]||(cM[f]=f.replace(/([A-Z])/g,m=>"-"+m.toLowerCase())));i!==void 0&&(e.textContent=i);for(let f in n)if(n.hasOwnProperty(f)){let m=Tfe(f,n[f]);dM.test(f)?e.style.setProperty(f,m):e.style[f]=m}d.forEach((f,m)=>{e.setAttribute(f,u[m])}),a!==void 0&&(e.scrollTop=a),l!==void 0&&(e.scrollLeft=l)}var wy={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},kfe=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Efe=["Webkit","Ms","Moz","O"];wy=Object.keys(wy).reduce((e,t)=>(Efe.forEach(r=>e[kfe(r,t)]=e[t]),e),wy);var Rfe=["x","y","z"],Afe=/^(matrix|translate|scale|rotate|skew)/,Ofe=/^(translate)/,Ife=/^(rotate|skew)/,a5=(e,t)=>ce.num(e)&&e!==0?e+t:e,I_=(e,t)=>ce.arr(e)?e.every(r=>I_(r,t)):ce.num(e)?e===t:parseFloat(e)===t,l5=class extends $d{constructor(t){let{x:r,y:o,z:n}=t,i=u5(t,Rfe),a=[],l=[];(r||o||n)&&(a.push([r||0,o||0,n||0]),l.push(c=>[`translate3d(${c.map(u=>a5(u,"px")).join(",")})`,I_(c,0)])),Ji(i,(c,u)=>{if(u==="transform")a.push([c||""]),l.push(d=>[d,d===""]);else if(Afe.test(u)){if(delete i[u],ce.und(c))return;let d=Ofe.test(u)?"px":Ife.test(u)?"deg":"";a.push($n(c)),l.push(u==="rotate3d"?([f,m,h,g])=>[`rotate3d(${f},${m},${h},${a5(g,d)})`,I_(g,0)]:f=>[`${u}(${f.map(m=>a5(m,d)).join(",")})`,I_(f,u.startsWith("scale")?1:0)])}}),a.length&&(i.transform=new c5(a,l)),super(i)}},c5=class extends ip{constructor(t,r){super(),this._value=null,this.inputs=t,this.transforms=r}get(){return this._value||(this._value=this._get())}_get(){let t="",r=!0;return zt(this.inputs,(o,n)=>{let i=Bo(o[0]),[a,l]=this.transforms[n](ce.arr(i)?i:o.map(Bo));t+=" "+a,r=r&&l}),r?"none":t}observerAdded(t){t==1&&zt(this.inputs,r=>zt(r,o=>En(o)&&au(o,this)))}observerRemoved(t){t==0&&zt(this.inputs,r=>zt(r,o=>En(o)&&lu(o,this)))}eventObserved(t){t.type=="change"&&(this._value=null),Xd(this,t)}},Nfe=["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"],Ffe=["scrollTop","scrollLeft"];Ri.assign({batchedUpdates:uM.unstable_batchedUpdates,createStringInterpolator:b_,colors:EB});var Dfe=VB(Nfe,{applyAnimatedValues:Pfe,createAnimatedStyle:e=>new l5(e),getComponentProps:e=>u5(e,Ffe)}),V3e=Dfe.animated;var xy=s(D(),1);function fM(e){return{top:e.offsetTop,left:e.offsetLeft}}function mM(e){let t=(0,xy.useRef)(null),r=(0,xy.useRef)(void 0);return t.current&&(r.current=fM(t.current)),(0,xy.useLayoutEffect)(()=>{let o=r.current;if(!o||!t.current||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let n=new A_({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:c}){if(!t.current)return;let{x:u,y:d}=c;u=Math.round(u),d=Math.round(d);let f=u===0&&d===0;t.current.style.transform=f?"":`translate3d(${u}px,${d}px,0)`}});t.current.style.transform="";let i=fM(t.current),a=Math.round(o.left-i.left),l=Math.round(o.top-i.top);return n.start({x:0,y:0,from:{x:a,y:l}}),()=>{n.stop(),n.set({x:0,y:0})}},[e]),t}var xe=s(C(),1),{MediaUploadModal:Bfe}=Do(fp.privateApis);function hM({children:e,index:t,className:r}){let o=mM(t);return(0,xe.jsx)("div",{ref:o,className:r,children:e})}function dp(e){return Array.isArray(e)?e:e?[e]:[]}function Mfe({render:e,multiple:t,...r}){let[o,n]=(0,$t.useState)(!1);return window.__experimentalDataViewsMediaModal?(0,xe.jsxs)(xe.Fragment,{children:[e&&e({open:()=>n(!0)}),o&&(0,xe.jsx)(Bfe,{...r,multiple:t,isOpen:o,onClose:()=>{n(!1),r.onClose?.()},onSelect:i=>{n(!1),r.onSelect?.(i)}})]}):(0,xe.jsx)(fp.MediaUpload,{...r,render:e,multiple:t?"add":void 0})}function f5({open:e,children:t,label:r,showTooltip:o=!1,onFilesDrop:n,attachment:i,isUploading:a=!1}){let l=i&&(0,rf.isBlobURL)(i.source_url),c=(0,xe.jsxs)("div",{className:re("fields__media-edit-picker-button",{"has-attachment":i}),role:"button",tabIndex:0,onClick:()=>{a||e()},onKeyDown:u=>{a||(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),e())},"aria-label":r,"aria-disabled":a,children:[t,l&&(0,xe.jsx)("span",{className:"fields__media-edit-picker-button-spinner",children:(0,xe.jsx)(ut.Spinner,{})}),!a&&(0,xe.jsx)(ut.DropZone,{onFilesDrop:u=>n(u,i?.id)})]});return o?(0,xe.jsx)(ut.Tooltip,{text:r,placement:"top",children:c}):c}var Lfe=["application/zip","application/x-zip-compressed","application/x-rar-compressed","application/x-7z-compressed","application/x-tar","application/x-gzip"];function Vfe({attachment:e}){return(0,xe.jsx)(ut.__experimentalTruncate,{className:"fields__media-edit-filename",children:e.title.rendered})}function gM(e){return(0,xe.jsx)(f5,{...e,children:(0,xe.jsx)("span",{className:"fields__media-edit-placeholder",children:e.label})})}function vM({itemId:e,index:t,totalItems:r,isUploading:o,moveItem:n,orientation:i="vertical"}){let a=i==="horizontal";return(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)(ut.Button,{__next40pxDefaultSize:!0,icon:a?Nt:Tv,label:a?(0,An.__)("Move left"):(0,An.__)("Move up"),size:"small",disabled:o||t===0,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:l=>{l.stopPropagation(),n(e,"up")}}),(0,xe.jsx)(ut.Button,{__next40pxDefaultSize:!0,icon:a?Ft:Cv,label:a?(0,An.__)("Move right"):(0,An.__)("Move down"),size:"small",disabled:o||t===r-1,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:l=>{l.stopPropagation(),n(e,"down")}})]})}function yM({attachment:e}){let t=e.source_url,r=e.mime_type||"";return r.startsWith("image")?(0,xe.jsx)("img",{className:"fields__media-edit-thumbnail",alt:e.alt_text||"",src:t}):r.startsWith("audio")?(0,xe.jsx)(ut.Icon,{icon:fR}):r.startsWith("video")?(0,xe.jsx)(ut.Icon,{icon:iO}):Lfe.includes(r)?(0,xe.jsx)(ut.Icon,{icon:uR}):(0,xe.jsx)(ut.Icon,{icon:$R})}function jfe({allItems:e,addButtonLabel:t,multiple:r,removeItem:o,moveItem:n,open:i,onFilesDrop:a,isUploading:l,setTargetItemId:c}){return(0,xe.jsxs)("div",{className:re("fields__media-edit-expanded",{"is-multiple":r,"is-single":!r,"is-empty":!e?.length}),children:[e?.map((u,d)=>{let f=u.mime_type?.startsWith("image"),m=(0,rf.isBlobURL)(u.source_url),h=u.id;return(0,xe.jsxs)(hM,{index:d,className:re("fields__media-edit-expanded-item",{"has-preview-image":f}),children:[(0,xe.jsx)(f5,{open:()=>{c(h),i()},label:m?(0,An.__)("Replace"):(0,An.sprintf)((0,An.__)("Replace %s"),u.title.rendered),showTooltip:!0,onFilesDrop:a,attachment:u,isUploading:l,children:(0,xe.jsx)("div",{className:"fields__media-edit-expanded-preview",children:(0,xe.jsx)(ut.__experimentalVStack,{spacing:0,alignment:"center",justify:"center",className:"fields__media-edit-expanded-preview-stack",children:(!m||f)&&(0,xe.jsx)(yM,{attachment:u})})})}),!m&&(0,xe.jsx)("div",{className:"fields__media-edit-expanded-overlay",children:(0,xe.jsxs)(ut.__experimentalHStack,{className:"fields__media-edit-expanded-actions",spacing:0,alignment:"flex-end",expanded:!1,children:[r&&e.length>1&&(0,xe.jsx)(vM,{itemId:h,index:d,totalItems:e.length,isUploading:l,moveItem:n,orientation:"horizontal"}),(0,xe.jsx)(ut.Button,{__next40pxDefaultSize:!0,icon:Kn,label:(0,An.__)("Remove"),size:"small",disabled:l,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:g=>{g.stopPropagation(),o(h)}})]})})]},u.id)}),(r||!e?.length)&&(0,xe.jsx)(gM,{open:()=>{c(void 0),i()},label:t,onFilesDrop:a,isUploading:l})]})}function zfe({allItems:e,addButtonLabel:t,multiple:r,removeItem:o,moveItem:n,open:i,onFilesDrop:a,isUploading:l,setTargetItemId:c}){return(0,xe.jsxs)(xe.Fragment,{children:[!!e?.length&&(0,xe.jsx)("div",{className:re("fields__media-edit-compact-group",{"is-single":e.length===1}),children:(0,xe.jsx)(ut.__experimentalVStack,{spacing:0,children:e.map((u,d)=>{let f=(0,rf.isBlobURL)(u.source_url),m=r&&e.length>1,h=u.id;return(0,xe.jsxs)(hM,{index:d,className:"fields__media-edit-compact",children:[(0,xe.jsx)(f5,{open:()=>{c(h),i()},label:(0,An.__)("Replace"),showTooltip:!0,onFilesDrop:a,attachment:u,isUploading:l,children:(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)(yM,{attachment:u}),!f&&(0,xe.jsx)(Vfe,{attachment:u})]})}),!f&&(0,xe.jsxs)(ut.__experimentalHStack,{className:"fields__media-edit-compact-movers",spacing:0,alignment:"flex-end",expanded:!1,children:[m&&(0,xe.jsx)(vM,{itemId:h,index:d,totalItems:e.length,isUploading:l,moveItem:n,orientation:"vertical"}),(0,xe.jsx)(ut.Button,{__next40pxDefaultSize:!0,icon:Kn,label:(0,An.__)("Remove"),size:"small",disabled:l,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:g=>{g.stopPropagation(),o(h)}})]})]},u.id)})})}),(r||!e?.length)&&(0,xe.jsx)(gM,{open:()=>{c(void 0),i()},label:t,onFilesDrop:a,isUploading:l})]})}function bM({data:e,field:t,onChange:r,hideLabelFromVision:o,allowedTypes:n=["image"],multiple:i,isExpanded:a,validity:l}){let c=t.getValue({item:e}),[u,d]=(0,$t.useState)(!1),f=(0,$t.useRef)(null),[m,h]=(0,$t.useState)(void 0);(0,$t.useEffect)(()=>{let V=f.current,j=()=>{d(!0)};return V?.addEventListener("invalid",j),()=>V?.removeEventListener("invalid",j)},[]);let g=(0,Cy.useSelect)(V=>{if(!c)return null;let H=[...dp(c)].sort((ae,ne)=>ae-ne),{getEntityRecords:X}=V(d5.store);return X("postType","attachment",{include:H})},[c]),v=(0,$t.useRef)(null);g!==null&&(v.current=g);let y=g;if(g===null&&v.current&&c){let V=new Set(v.current.map(j=>j.id));dp(c).every(j=>V.has(j))&&(y=v.current)}let b=(0,$t.useMemo)(()=>{if(!y)return null;let V=dp(c),j=new Map(y.map(H=>[H.id,H]));return V.map(H=>j.get(H)).filter(H=>H!==void 0)},[y,c]),{createErrorNotice:_}=(0,Cy.useDispatch)(pM.store),{receiveEntityRecords:S}=(0,Cy.useDispatch)(d5.store),[x,T]=(0,$t.useState)(),R=(0,$t.useRef)(void 0),[F,B]=(0,$t.useState)(!1),[z,L]=(0,$t.useState)([]);(0,$t.useEffect)(()=>{F&&(B(!1),R.current?.())},[F]);let M=(0,$t.useCallback)(V=>r(t.setValue({item:e,value:V})),[e,t,r]),k=(0,$t.useCallback)(V=>{let H=dp(c).filter(X=>X!==V);d(!0),M(H.length?H:void 0)},[c,M]),I=(0,$t.useCallback)((V,j)=>{if(!b)return;let H=b.map(ne=>ne.id),X=H.indexOf(V),ae=j==="up"?X-1:X+1;[H[X],H[ae]]=[H[ae],H[X]],M(H)},[b,M]),U=(0,$t.useCallback)((V,j)=>{T(j),(0,fp.uploadMedia)({allowedTypes:n?.length?n:void 0,filesList:V,onFileChange(H){let X=H.filter(ue=>(0,rf.isBlobURL)(ue.url)).map(ue=>ue.url);if(L(X),X.length)return;S("postType","attachment",[],void 0,!0);let ae=H.map(ue=>ue.id);if(!i){M(ae[0]),T(void 0);return}let ne=dp(c);if(j===void 0)M([...ne,...ae]);else{let ue=[...ne];ue.splice(ne.indexOf(j),1,...ae),M(ue)}T(void 0)},onError(H){T(void 0),L([]),_(H.message,{type:"snackbar"})},multiple:!!i})},[n,c,i,_,M,S]),G=t.placeholder||(i?(0,An.__)("Choose files"):(0,An.__)("Choose file")),Y=(0,$t.useMemo)(()=>{if(!z.length)return b;let V=[...b||[]],j=z.map(H=>({id:H,source_url:H,mime_type:(0,rf.getBlobTypeByURL)(H)}));if(x!==void 0){let H=V.findIndex(X=>X.id===x);V.splice(H,1,...j)}else V.push(...j);return V},[b,x,z]);(0,$t.useEffect)(()=>{if(!u)return;let V=f.current;if(V)if(l){let j=l?.custom;h(j),j?.type==="invalid"?V.setCustomValidity(j.message||(0,An.__)("Invalid")):V.setCustomValidity("")}else V.setCustomValidity(""),h(void 0)},[u,t.isValid,l]);let Z=(0,$t.useCallback)(V=>{u||(!V.relatedTarget||!V.currentTarget.contains(V.relatedTarget))&&d(!0)},[u]);return(0,xe.jsxs)("div",{onBlur:Z,children:[(0,xe.jsx)("fieldset",{className:"fields__media-edit","data-field-id":t.id,children:(0,xe.jsx)(Mfe,{onSelect:V=>{if(!i){M(V.id),T(void 0);return}let j=Array.isArray(V)?V.map(X=>X.id):[V.id],H=dp(c);if(!H.length)M(j);else if(x===void 0){let X=H.filter(ne=>j.includes(ne)),ae=j.filter(ne=>!H.includes(ne));M([...X,...ae])}else if(V.id!==x){let X=H.filter(ae=>ae!==V.id);M(X.map(ae=>ae===x?V.id:ae))}T(void 0)},onClose:()=>T(void 0),allowedTypes:n,value:x!==void 0?x:c,multiple:i&&x===void 0,title:t.label,render:({open:V})=>{R.current=V;let j=a?jfe:zfe;return(0,xe.jsxs)(ut.__experimentalVStack,{spacing:2,children:[t.label&&(o?(0,xe.jsx)(ut.VisuallyHidden,{as:"legend",children:t.label}):(0,xe.jsx)(ut.BaseControl.VisualLabel,{as:"legend",style:{marginBottom:0},children:t.label})),(0,xe.jsx)(j,{allItems:Y,addButtonLabel:G,multiple:i,removeItem:k,moveItem:I,open:()=>B(!0),onFilesDrop:U,isUploading:!!z.length,setTargetItemId:T}),t.description&&(0,xe.jsx)(ut.__experimentalText,{variant:"muted",children:t.description})]})}})}),(0,xe.jsx)(ut.VisuallyHidden,{children:(0,xe.jsx)("input",{type:"text",ref:f,value:c??"",tabIndex:-1,"aria-hidden":"true",onChange:()=>{}})}),m&&(0,xe.jsx)("div",{"aria-live":"polite",children:(0,xe.jsxs)("p",{className:re("components-validated-control__indicator",{"is-invalid":m.type==="invalid","is-valid":m.type==="valid"}),children:[(0,xe.jsx)(ut.Icon,{className:"components-validated-control__indicator-icon",icon:Cl,size:16,fill:"currentColor"}),m.message]})})]})}var m5=s(C(),1),SM=({item:e,config:t})=>{let r=e?._embedded?.["wp:featuredmedia"]?.[0],o=r?.source_url;return o?(0,m5.jsx)("img",{className:"fields-controls__featured-image-image",src:o,alt:"",srcSet:r?.media_details?.sizes?Object.values(r.media_details.sizes).map(n=>`${n.source_url} ${n.width}w`).join(", "):void 0,sizes:t?.sizes||"100vw"}):(0,m5.jsx)("span",{className:"fields-controls__featured-image-placeholder"})};var wM=s(C(),1),Ufe={id:"featured_media",type:"media",label:(0,_M.__)("Featured Image"),Edit:e=>(0,wM.jsx)(bM,{...e,isExpanded:!0}),render:SM,setValue:({value:e})=>({featured_media:e??0}),enableSorting:!1,filterBy:!1},p5=Ufe;var IM=s(E(),1);var F_=s(D(),1),h5=s(W(),1),CM=s(A(),1),TM=s(O(),1),PM=s(E(),1);var xM=s(O(),1),uu=s(W(),1);function Hfe(e,t){return t?e==="page"?`${e}-${t}`:`single-${e}-${t}`:e==="page"?"page":`single-${e}`}var Ty="";function N_(e,t,r){return(0,xM.useSelect)(o=>{if(!e||!t)return Ty;let n=String(t),i=Do(o(uu.store)).getHomePage();if(e==="page"&&i?.postType==="page"&&i?.postId===n){let f=o(uu.store).getEntityRecords("postType","wp_template",{per_page:-1})?.find(m=>m.slug==="front-page");if(f)return He(f)}let a=Do(o(uu.store)).getPostsPageId();if(e==="page"&&a===n){let d=o(uu.store).getDefaultTemplateId({slug:"home"});if(!d)return Ty;let f=o(uu.store).getEntityRecord("postType","wp_template",d);return f?He(f):Ty}let l=Hfe(e,r),c=o(uu.store).getDefaultTemplateId({slug:l});if(!c)return Ty;let u=o(uu.store).getEntityRecord("postType","wp_template",c);return u?He(u):Ty},[e,t,r])}var kM=s(C(),1),Gfe=[],EM=({data:e,field:t,onChange:r})=>{let{id:o}=t,n=e.type,i=typeof e.id=="number"?e.id:parseInt(e.id,10),a=e.slug,{templates:l,canSwitchTemplate:c}=(0,TM.useSelect)(h=>{let g=h(h5.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:n})??Gfe,{getHomePage:v,getPostsPageId:y}=Do(h(h5.store)),b=String(i),_=b!==void 0&&y()===b,S=b!==void 0&&n==="page"&&v()?.postId===b;return{templates:g,canSwitchTemplate:!_&&!S}},[i,n]),u=N_(n,i,a),d=t.getValue({item:e}),f=(0,F_.useCallback)(h=>r({[o]:h}),[o,r]),m=(0,F_.useMemo)(()=>{let h=l.map(g=>({label:He(g),value:g.slug}));return[{label:u,value:""},...h]},[l,u]);return(0,kM.jsx)(CM.SelectControl,{__next40pxDefaultSize:!0,label:(0,PM.__)("Template"),hideLabelFromVision:!0,value:d,options:m,onChange:f,disabled:!c})};var RM=s(O(),1),AM=s(W(),1);var D_=s(C(),1),OM=({item:e,field:t})=>{let r=e.type,o=e.slug,n=e.id,i=t.getValue({item:e}),a=N_(r,n,o),l=(0,RM.useSelect)(c=>{if(!i)return;let d=c(AM.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:r})?.find(f=>f.slug===i);return d?He(d):void 0},[r,i]);return(0,D_.jsx)(D_.Fragment,{children:l??a})};var Wfe={id:"template",type:"text",label:(0,IM.__)("Template"),Edit:EM,render:OM,enableSorting:!1,filterBy:!1},g5=Wfe;var qM=s(E(),1);var v5=s(M_(),1),L_=s(A(),1),y5=s(O(),1),Il=s(D(),1),b5=s(W(),1),VM=s(he(),1),jM=s(ft(),1),du=s(E(),1),zM=s(Ir(),1);var BM=s(ft(),1),MM=s(E(),1);function Py(e){return typeof e.title=="object"&&"rendered"in e.title&&e.title.rendered?(0,BM.decodeEntities)(e.title.rendered):`#${e?.id} (${(0,MM.__)("no title")})`}var Ol=s(C(),1);function Xfe(e){let t=e.map(n=>({children:[],...n}));if(t.some(({parent:n})=>n==null))return t;let r=t.reduce((n,i)=>{let{parent:a}=i;return n[a]||(n[a]=[]),n[a].push(i),n},{}),o=n=>n.map(i=>{let a=r[i.id];return{...i,children:a&&a.length?o(a):[]}});return o(r[0]||[])}var LM=(e,t)=>{let r=(0,v5.default)(e||"").toLowerCase(),o=(0,v5.default)(t||"").toLowerCase();return r===o?0:r.startsWith(o)?r.length:1/0};function Qfe({data:e,onChangeControl:t}){let[r,o]=(0,Il.useState)(null),n=e.parent,i=e.id,a=e.type,{parentPostTitle:l,pageItems:c,isHierarchical:u}=(0,y5.useSelect)(h=>{let{getEntityRecord:g,getEntityRecords:v,getPostType:y}=h(b5.store),b=y(a),_=b?.hierarchical&&b.viewable,S=n?g("postType",a,n):null,x={per_page:100,exclude:i,parent_exclude:i,orderby:"menu_order",order:"asc",_fields:"id,title,parent",...r!==null&&{search:r,orderby:"relevance"}};return{isHierarchical:_,parentPostTitle:S?Py(S):"",pageItems:_?v("postType",a,x):null}},[r,n,i,a]),d=(0,Il.useMemo)(()=>{let h=(b,_=0)=>b.map(T=>[{value:T.id,label:"\u2014 ".repeat(_)+(0,jM.decodeEntities)(T.name),rawName:T.name},...h(T.children||[],_+1)]).sort(([T],[R])=>{let F=LM(T.rawName,r??""),B=LM(R.rawName,r??"");return F>=B?1:-1}).flat();if(!c)return[];let g=c.map(b=>({id:b.id,parent:b.parent??null,name:Py(b)}));r||(g=Xfe(g));let v=h(g),y=v.find(b=>b.value===n);return n&&l&&!y&&v.unshift({value:n,label:l,rawName:""}),v.map(b=>({...b,value:b.value.toString()}))},[c,r,l,n]);if(!u)return null;let f=h=>{o(h)},m=h=>{if(h)return t(parseInt(h,10)??0);t(0)};return(0,Ol.jsx)(L_.ComboboxControl,{__next40pxDefaultSize:!0,label:(0,du.__)("Parent"),help:(0,du.__)("Choose a parent page."),value:n?.toString(),options:d,onFilterValueChange:(0,VM.debounce)(h=>f(h),300),onChange:m,hideLabelFromVision:!0})}var UM=({data:e,field:t,onChange:r})=>{let{id:o}=t,n=(0,y5.useSelect)(a=>a(b5.store).getEntityRecord("root","__unstableBase")?.home,[]),i=(0,Il.useCallback)(a=>r({[o]:a}),[o,r]);return(0,Ol.jsx)("fieldset",{className:"fields-controls__parent",children:(0,Ol.jsxs)("div",{children:[(0,Il.createInterpolateElement)((0,du.sprintf)((0,du.__)('Child pages inherit characteristics from their parent, such as URL structure. For instance, if "Pricing" is a child of "Services", its URL would be %1$s<wbr />/services<wbr />/pricing.'),(0,zM.filterURLForDisplay)(n).replace(/([/.])/g,"<wbr />$1")),{wbr:(0,Ol.jsx)("wbr",{})}),(0,Ol.jsx)("p",{children:(0,Il.createInterpolateElement)((0,du.__)("They also show up as sub-items in the default navigation menu. <a>Learn more.</a>"),{a:(0,Ol.jsx)(L_.ExternalLink,{href:(0,du.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes"),children:void 0})})}),(0,Ol.jsx)(Qfe,{data:e,onChangeControl:i})]})})};var HM=s(O(),1),GM=s(W(),1),WM=s(E(),1);var mp=s(C(),1),YM=({item:e})=>{let t=(0,HM.useSelect)(r=>{let{getEntityRecord:o}=r(GM.store);return e?.parent?o("postType",e.type,e.parent):null},[e.parent,e.type]);return t?(0,mp.jsx)(mp.Fragment,{children:Py(t)}):(0,mp.jsx)(mp.Fragment,{children:(0,WM.__)("None")})};var Jfe={id:"parent",type:"text",label:(0,qM.__)("Parent"),Edit:UM,render:YM,enableSorting:!0,filterBy:!1},S5=Jfe;var XM=s(E(),1);var hp=s(A(),1),ZM=s(D(),1),ky=s(E(),1),pp=s(C(),1);function $fe({data:e,onChange:t,field:r}){let[o,n]=(0,ZM.useState)(!!r.getValue({item:e})),i=a=>{n(a),a||t({password:""})};return(0,pp.jsxs)(hp.__experimentalVStack,{as:"fieldset",spacing:4,className:"fields-controls__password",children:[(0,pp.jsx)(hp.CheckboxControl,{label:(0,ky.__)("Password protected"),help:(0,ky.__)("Only visible to those who know the password"),checked:o,onChange:i}),o&&(0,pp.jsx)("div",{className:"fields-controls__password-input",children:(0,pp.jsx)(hp.TextControl,{label:(0,ky.__)("Password"),onChange:a=>t({password:a}),value:r.getValue({item:e})||"",placeholder:(0,ky.__)("Use a secure password"),type:"text",__next40pxDefaultSize:!0,maxLength:255})})]})}var KM=$fe;var eme={id:"password",type:"text",label:(0,XM.__)("Password"),Edit:KM,enableSorting:!1,enableHiding:!1,isVisible:e=>e.status!=="private",filterBy:!1},_5=eme;var JM=s(E(),1);var j_=s(A(),1);var $i=s(E(),1),tme=[{value:"draft",label:(0,$i.__)("Draft"),icon:Wm,description:(0,$i.__)("Not ready to publish.")},{value:"future",label:(0,$i.__)("Scheduled"),icon:jv,description:(0,$i.__)("Publish automatically on a chosen date.")},{value:"pending",label:(0,$i.__)("Pending Review"),icon:Lv,description:(0,$i.__)("Waiting for review before publishing.")},{value:"private",label:(0,$i.__)("Private"),icon:Fv,description:(0,$i.__)("Only visible to site admins and editors.")},{value:"publish",label:(0,$i.__)("Published"),icon:Hd,description:(0,$i.__)("Visible to everyone.")},{value:"trash",label:(0,$i.__)("Trash"),icon:El}],V_=tme;var gp=s(C(),1);function rme({item:e}){let t=V_.find(({value:n})=>n===e.status),r=t?.label||e.status,o=t?.icon;return(0,gp.jsxs)(j_.__experimentalHStack,{alignment:"left",spacing:0,children:[o&&(0,gp.jsx)("div",{className:"edit-site-post-list__status-icon",children:(0,gp.jsx)(j_.Icon,{icon:o})}),(0,gp.jsx)("span",{children:r})]})}var QM=rme;var ome="isAny",nme={label:(0,JM.__)("Status"),id:"status",type:"text",elements:V_,render:QM,Edit:"radio",enableSorting:!1,filterBy:{operators:[ome]}},w5=nme;var vp=s(E(),1),ime={id:"comment_status",label:(0,vp.__)("Comments"),type:"text",Edit:"radio",enableSorting:!1,enableHiding:!1,filterBy:!1,elements:[{value:"open",label:(0,vp.__)("Open"),description:(0,vp.__)("Visitors can add new comments and replies.")},{value:"closed",label:(0,vp.__)("Closed"),description:(0,vp.__)("Visitors cannot add new comments or replies. Existing comments remain visible.")}]},x5=ime;var Nl=s(E(),1),z_=s(A(),1),C5=s(C(),1);function sme({data:e,onChange:t}){let r=e?.ping_status??"open",o=n=>{t({...e,ping_status:n?"open":"closed"})};return(0,C5.jsx)(z_.CheckboxControl,{label:(0,Nl.__)("Enable pingbacks & trackbacks"),checked:r==="open",onChange:o,help:(0,C5.jsx)(z_.ExternalLink,{href:(0,Nl.__)("https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"),children:(0,Nl.__)("Learn more about pingbacks & trackbacks")})})}var ame={id:"ping_status",label:(0,Nl.__)("Trackbacks & Pingbacks"),type:"text",Edit:sme,enableSorting:!1,enableHiding:!1,filterBy:!1,elements:[{value:"open",label:(0,Nl.__)("Allow"),description:(0,Nl.__)("Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.")},{value:"closed",label:(0,Nl.__)("Don't allow"),description:(0,Nl.__)("Don't allow link notifications from other blogs (pingbacks and trackbacks) on new articles.")}]},T5=ame;var yp=s(E(),1),lme={id:"discussion",label:(0,yp.__)("Discussion"),type:"text",render:({item:e})=>{let t=e.comment_status==="open",r=e.ping_status==="open";return t&&r?(0,yp.__)("Open"):t&&!r?(0,yp.__)("Comments only"):!t&&r?(0,yp.__)("Pings only"):(0,yp.__)("Closed")},filterBy:!1},P5=lme;var eL=s(E(),1);var ka=s(E(),1),Ry=s(D(),1),fu=s(po(),1),Pa=s(C(),1),Ey=e=>(0,fu.dateI18n)((0,fu.getSettings)().formats.datetimeAbbreviated,(0,fu.getDate)(e)),cme=({item:e})=>{if(["draft","private"].includes(e.status??""))return(0,Ry.createInterpolateElement)((0,ka.sprintf)((0,ka.__)("<span>Modified: <time>%s</time></span>"),Ey(e.date??null)),{span:(0,Pa.jsx)("span",{}),time:(0,Pa.jsx)("time",{})});if(e.status==="future")return(0,Ry.createInterpolateElement)((0,ka.sprintf)((0,ka.__)("<span>Scheduled: <time>%s</time></span>"),Ey(e.date??null)),{span:(0,Pa.jsx)("span",{}),time:(0,Pa.jsx)("time",{})});if(e.status==="publish")return(0,Ry.createInterpolateElement)((0,ka.sprintf)((0,ka.__)("<span>Published: <time>%s</time></span>"),Ey(e.date??null)),{span:(0,Pa.jsx)("span",{}),time:(0,Pa.jsx)("time",{})});let n=(0,fu.getDate)(e.modified??null)>(0,fu.getDate)(e.date??null)?e.modified:e.date;return e.status==="pending"?(0,Ry.createInterpolateElement)((0,ka.sprintf)((0,ka.__)("<span>Modified: <time>%s</time></span>"),Ey(n??null)),{span:(0,Pa.jsx)("span",{}),time:(0,Pa.jsx)("time",{})}):(0,Pa.jsx)("time",{children:Ey(e.date??null)})},$M=cme;var ume={id:"date",type:"datetime",label:(0,eL.__)("Date"),render:$M,filterBy:{operators:["before","after"]}},k5=ume;var sL=s(E(),1),aL=s(O(),1),lL=s(W(),1);var tL=s(E(),1),rL=s(D(),1);var U_=s(A(),1),oL=s(O(),1),nL=s(W(),1),mu=s(C(),1);function dme({item:e}){let t=e?.author,r=e?._embedded?.author?.[0]?.id,o=!!(t&&r&&t!==r),n=(0,oL.useSelect)(u=>{if(!o)return null;let{getEntityRecord:d}=u(nL.store);return t?d("root","user",t):null},[t,o]),i=n?.name||e?._embedded?.author?.[0]?.name,a=n?.avatar_urls?.[48]||e?._embedded?.author?.[0]?.avatar_urls?.[48],[l,c]=(0,rL.useState)(!1);return(0,mu.jsxs)(U_.__experimentalHStack,{alignment:"left",spacing:0,children:[!!a&&(0,mu.jsx)("div",{className:re("page-templates-author-field__avatar",{"is-loaded":l}),children:(0,mu.jsx)("img",{onLoad:()=>c(!0),alt:(0,tL.__)("Author avatar"),src:a})}),!a&&(0,mu.jsx)("div",{className:"page-templates-author-field__icon",children:(0,mu.jsx)(U_.Icon,{icon:Pv})}),(0,mu.jsx)("span",{className:"page-templates-author-field__name",children:i})]})}var iL=dme;var fme={label:(0,sL.__)("Author"),id:"author",type:"integer",getElements:async()=>(await(0,aL.resolveSelect)(lL.store).getEntityRecords("root","user",{per_page:-1,who:"authors",_fields:"id,name",context:"view"})??[]).map(({id:t,name:r})=>({value:t,label:r})),setValue:({value:e})=>({author:Number(e)}),render:iL,sort:(e,t,r)=>{let o=e._embedded?.author?.[0]?.name||"",n=t._embedded?.author?.[0]?.name||"";return r==="asc"?o.localeCompare(n):n.localeCompare(o)},filterBy:{operators:["isAny","isNone"]}},E5=fme;var cL=s(E(),1),mme={id:"notesCount",label:(0,cL.__)("Notes"),type:"integer",enableSorting:!1,filterBy:!1},R5=mme;var uL=s(E(),1),pme={id:"view-post",label:(0,uL._x)("View","verb"),isPrimary:!0,icon:Xn,isEligible(e){return e.status!=="trash"},callback(e,{onActionPerformed:t}){let r=e[0];window.open(r?.link,"_blank"),t&&t(e)}},A5=pme;var O5=s(O(),1),dL=s(W(),1),pu=s(E(),1),fL=s(ct(),1),mL=s(D(),1),Dl=s(A(),1),Fl=s(C(),1);function hme(e){return typeof e.menu_order=="number"&&Number.isInteger(e.menu_order)}function gme({items:e,closeModal:t,onActionPerformed:r}){let[o,n]=(0,mL.useState)(e[0]),{editEntityRecord:i,saveEditedEntityRecord:a}=(0,O5.useDispatch)(dL.store),{createSuccessNotice:l,createErrorNotice:c}=(0,O5.useDispatch)(fL.store),u=hme(o);async function d(f){if(f.preventDefault(),!!u)try{await i("postType",o.type,o.id,{menu_order:o.menu_order}),t?.(),await a("postType",o.type,o.id,{throwOnError:!0}),l((0,pu.__)("Order updated."),{type:"snackbar"}),r?.(e)}catch(m){let h=m,g=h.message&&h.code!=="unknown_error"?h.message:(0,pu.__)("An error occurred while updating the order");c(g,{type:"snackbar"})}}return(0,Fl.jsx)("form",{onSubmit:d,children:(0,Fl.jsxs)(Dl.__experimentalVStack,{spacing:"5",children:[(0,Fl.jsx)("div",{children:(0,pu.__)("Determines the order of pages. Pages with the same order value are sorted alphabetically. Negative order values are supported.")}),(0,Fl.jsx)(Dl.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,pu.__)("Order"),type:"number",value:typeof o.menu_order=="number"&&Number.isInteger(o.menu_order)?String(o.menu_order):"",onChange:f=>{let m=parseInt(f,10);n({...o,menu_order:isNaN(m)?void 0:m})}}),(0,Fl.jsxs)(Dl.__experimentalHStack,{justify:"right",children:[(0,Fl.jsx)(Dl.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,pu.__)("Cancel")}),(0,Fl.jsx)(Dl.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",accessibleWhenDisabled:!0,disabled:!u,children:(0,pu.__)("Save")})]})]})})}var vme={id:"order-pages",label:(0,pu.__)("Order"),isEligible({status:e}){return e!=="trash"},modalFocusOnMount:"firstContentElement",RenderModal:gme},I5=vme;var N5=s(O(),1),pL=s(W(),1),Xo=s(E(),1),hL=s(ct(),1),F5=s(D(),1),Ml=s(A(),1);var Bl=s(C(),1),yme={id:"duplicate-post",label:(0,Xo._x)("Duplicate","action label"),isEligible({status:e}){return e!=="trash"},modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,F5.useState)({...e[0],title:(0,Xo.sprintf)((0,Xo._x)("%s (Copy)","post"),He(e[0]))}),[i,a]=(0,F5.useState)(!1),{saveEntityRecord:l}=(0,N5.useDispatch)(pL.store),{createSuccessNotice:c,createErrorNotice:u}=(0,N5.useDispatch)(hL.store);async function d(f){if(f.preventDefault(),i)return;let m=o.type==="wp_template",h={status:m?"publish":"draft",title:o.title,slug:m?o.slug:o.title||(0,Xo.__)("No title"),comment_status:o.comment_status,content:typeof o.content=="string"?o.content:o.content.raw,excerpt:typeof o.excerpt=="string"?o.excerpt:o.excerpt?.raw,meta:o.meta,parent:o.parent,password:o.password,template:o.template,format:o.format,featured_media:o.featured_media,menu_order:o.menu_order,ping_status:o.ping_status},g="wp:action-assign-";Object.keys(o?._links||{}).filter(y=>y.startsWith(g)).map(y=>y.slice(g.length)).forEach(y=>{o.hasOwnProperty(y)&&(h[y]=o[y])}),a(!0);try{let y=await l("postType",o.type,h,{throwOnError:!0});c((0,Xo.sprintf)((0,Xo.__)('"%s" successfully created.'),He(y)),{id:"duplicate-post-action",type:"snackbar"}),r&&r([y])}catch(y){let b=y,_=b.message&&b.code!=="unknown_error"?b.message:(0,Xo.__)("An error occurred while duplicating the page.");u(_,{type:"snackbar"})}finally{a(!1),t?.()}}return(0,Bl.jsx)("form",{onSubmit:d,children:(0,Bl.jsxs)(Ml.__experimentalVStack,{spacing:3,children:[typeof o.id=="string"&&(0,Bl.jsx)("div",{children:(0,Xo.__)("You are about to duplicate a bundled template. Changes will not be live until you activate the new template.")}),(0,Bl.jsx)(Ml.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,Xo.__)("Title"),placeholder:(0,Xo.__)("No title"),value:He(o),onChange:f=>n(m=>({...m,title:f||(0,Xo.__)("No title")}))}),(0,Bl.jsxs)(Ml.__experimentalHStack,{spacing:2,justify:"end",children:[(0,Bl.jsx)(Ml.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,Xo.__)("Cancel")}),(0,Bl.jsx)(Ml.Button,{variant:"primary",type:"submit",isBusy:i,"aria-disabled":i,__next40pxDefaultSize:!0,children:(0,Xo._x)("Duplicate","action label")})]})]})})}},D5=yme;var B5=s(O(),1),gL=s(W(),1),of=s(E(),1),vL=s(D(),1),yL=s(Ls(),1),Ll=s(A(),1),bL=s(ct(),1);var hu=s(C(),1),{PATTERN_TYPES:bme}=Do(yL.privateApis),Sme={id:"rename-post",label:(0,of.__)("Rename"),modalFocusOnMount:"firstContentElement",isEligible(e){if(e.status==="trash"||e.type==="wp_template"&&typeof e.id=="string"&&window?.__experimentalTemplateActivate)return!1;let t=["wp_template","wp_template_part"];return window?.__experimentalTemplateActivate||t.push("wp_template"),t.includes(e.type)?UD(e)&&!window?.__experimentalTemplateActivate?n_(e)&&e.is_custom&&e.permissions?.update:HD(e)?e.source==="custom"&&!e?.has_theme_file&&e.permissions?.update:e.type===bme.user&&e.permissions?.update:e.permissions?.update},RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o]=e,[n,i]=(0,vL.useState)(()=>He(o,"")),{editEntityRecord:a,saveEditedEntityRecord:l}=(0,B5.useDispatch)(gL.store),{createSuccessNotice:c,createErrorNotice:u}=(0,B5.useDispatch)(bL.store);async function d(f){f.preventDefault();try{await a("postType",o.type,o.id,{title:n}),i(""),t?.(),await l("postType",o.type,o.id,{throwOnError:!0}),c((0,of.__)("Name updated"),{type:"snackbar"}),r?.(e)}catch(m){let h=m,g=h.message&&h.code!=="unknown_error"?h.message:(0,of.__)("An error occurred while updating the name");u(g,{type:"snackbar"})}}return(0,hu.jsx)("form",{onSubmit:d,children:(0,hu.jsxs)(Ll.__experimentalVStack,{spacing:"5",children:[(0,hu.jsx)(Ll.TextControl,{__next40pxDefaultSize:!0,label:(0,of.__)("Name"),value:n,onChange:i,required:!0}),(0,hu.jsxs)(Ll.__experimentalHStack,{justify:"right",children:[(0,hu.jsx)(Ll.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,of.__)("Cancel")}),(0,hu.jsx)(Ll.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,of.__)("Save")})]})]})})}},M5=Sme;var Qo=s(O(),1),nf=s(W(),1),Gr=s(E(),1),gu=s(ct(),1),SL=s(D(),1),H_=s(Xe(),1),Vl=s(A(),1),_L=s(Ir(),1),wL=s(Qm(),1);var sf=s(C(),1),_me=e=>e?e.source==="custom"&&(!!e?.plugin||e?.has_theme_file):!1,wme=async(e,{allowUndo:t=!0}={})=>{let r="edit-site-template-reverted";if((0,Qo.dispatch)(gu.store).removeNotice(r),!_me(e)){(0,Qo.dispatch)(gu.store).createErrorNotice((0,Gr.__)("This template is not revertable."),{type:"snackbar"});return}try{let o=(0,Qo.select)(nf.store).getEntityConfig("postType",e.type);if(!o){(0,Qo.dispatch)(gu.store).createErrorNotice((0,Gr.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let n=(0,_L.addQueryArgs)(`${o.baseURL}/${e.id}`,{context:"edit",source:e.origin}),i=await(0,wL.default)({path:n});if(!i){(0,Qo.dispatch)(gu.store).createErrorNotice((0,Gr.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let a=({blocks:u=[]})=>(0,H_.__unstableSerializeAndClean)(u),l=(0,Qo.select)(nf.store).getEditedEntityRecord("postType",e.type,e.id);(0,Qo.dispatch)(nf.store).editEntityRecord("postType",e.type,e.id,{content:a,blocks:l.blocks,source:"custom"},{undoIgnore:!0});let c=(0,H_.parse)(i?.content?.raw);if((0,Qo.dispatch)(nf.store).editEntityRecord("postType",e.type,i.id,{content:a,blocks:c,source:"theme"}),t){let u=()=>{(0,Qo.dispatch)(nf.store).editEntityRecord("postType",e.type,l.id,{content:a,blocks:l.blocks,source:"custom"})};(0,Qo.dispatch)(gu.store).createSuccessNotice((0,Gr.__)("Template reset."),{type:"snackbar",id:r,actions:[{label:(0,Gr.__)("Undo"),onClick:u}]})}}catch(o){let n=o.message&&o.code!=="unknown_error"?o.message:(0,Gr.__)("Template revert failed. Please reload.");(0,Qo.dispatch)(gu.store).createErrorNotice(n,{type:"snackbar"})}},xme={id:"reset-post",label:(0,Gr.__)("Reset"),isEligible:e=>window?.__experimentalTemplateActivate?e.type==="wp_template_part"&&e?.source==="custom"&&e?.has_theme_file:Rl(e)&&e?.source==="custom"&&(!!(e.type==="wp_template"&&e?.plugin)||e?.has_theme_file),icon:xl,supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,SL.useState)(!1),{saveEditedEntityRecord:i}=(0,Qo.useDispatch)(nf.store),{createSuccessNotice:a,createErrorNotice:l}=(0,Qo.useDispatch)(gu.store),c=async()=>{try{for(let u of e)await wme(u,{allowUndo:!1}),await i("postType",u.type,u.id);a(e.length>1?(0,Gr.sprintf)((0,Gr.__)("%d items reset."),e.length):(0,Gr.sprintf)((0,Gr.__)('"%s" reset.'),He(e[0])),{type:"snackbar",id:"revert-template-action"})}catch(u){let d;e[0].type==="wp_template"?d=e.length===1?(0,Gr.__)("An error occurred while reverting the template."):(0,Gr.__)("An error occurred while reverting the templates."):d=e.length===1?(0,Gr.__)("An error occurred while reverting the template part."):(0,Gr.__)("An error occurred while reverting the template parts.");let f=u,m=f.message&&f.code!=="unknown_error"?f.message:d;l(m,{type:"snackbar"})}};return(0,sf.jsxs)(Vl.__experimentalVStack,{spacing:"5",children:[(0,sf.jsx)(Vl.__experimentalText,{children:(0,Gr.__)("Reset to default and clear all customizations?")}),(0,sf.jsxs)(Vl.__experimentalHStack,{justify:"right",children:[(0,sf.jsx)(Vl.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,children:(0,Gr.__)("Cancel")}),(0,sf.jsx)(Vl.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{n(!0),await c(),r?.(e),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,children:(0,Gr.__)("Reset")})]})]})}},L5=xme;var G_=s(E(),1),xL=s(Ls(),1);var CL=s(C(),1),{CreatePatternModalContents:Cme,useDuplicatePatternProps:Tme}=Do(xL.privateApis),Pme={id:"duplicate-pattern",label:(0,G_._x)("Duplicate","action label"),isEligible:e=>e.type!=="wp_template_part",modalHeader:(0,G_._x)("Duplicate pattern","action label"),modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t})=>{let[r]=e,o=Tme({pattern:r,onSuccess:()=>t?.()});return(0,CL.jsx)(Cme,{onClose:t,confirmLabel:(0,G_._x)("Duplicate","action label"),...o})}},V5=Pme;var bp=function(){return bp=Object.assign||function(t){for(var r,o=1,n=arguments.length;o<n;o++){r=arguments[o];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},bp.apply(this,arguments)};function TL(e){return e.toLowerCase()}var kme=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Eme=/[^A-Z0-9]+/gi;function kL(e,t){t===void 0&&(t={});for(var r=t.splitRegexp,o=r===void 0?kme:r,n=t.stripRegexp,i=n===void 0?Eme:n,a=t.transform,l=a===void 0?TL:a,c=t.delimiter,u=c===void 0?" ":c,d=PL(PL(e,o,"$1\0$2"),i,"\0"),f=0,m=d.length;d.charAt(f)==="\0";)f++;for(;d.charAt(m-1)==="\0";)m--;return d.slice(f,m).split("\0").map(l).join(u)}function PL(e,t,r){return t instanceof RegExp?e.replace(t,r):t.reduce(function(o,n){return o.replace(n,r)},e)}function EL(e,t){return t===void 0&&(t={}),kL(e,bp({delimiter:"."},t))}function af(e,t){return t===void 0&&(t={}),EL(e,bp({delimiter:"-"},t))}"stream"in Blob.prototype||Object.defineProperty(Blob.prototype,"stream",{value(){return new Response(this).body}}),"setBigUint64"in DataView.prototype||Object.defineProperty(DataView.prototype,"setBigUint64",{value(e,t,r){let o=Number(0xffffffffn&t),n=Number(t>>32n);this.setUint32(e+(r?0:4),o,r),this.setUint32(e+(r?4:0),n,r)}});var _p=e=>new DataView(new ArrayBuffer(e)),jl=e=>new Uint8Array(e.buffer||e),Sp=e=>new TextEncoder().encode(String(e)),lf=e=>Math.min(4294967295,Number(e)),RL=e=>Math.min(65535,Number(e));function Rme(e,t){if(t===void 0||t instanceof Date||(t=new Date(t)),e instanceof File)return{isFile:1,t:t||new Date(e.lastModified),i:e.stream()};if(e instanceof Response)return{isFile:1,t:t||new Date(e.headers.get("Last-Modified")||Date.now()),i:e.body};if(t===void 0)t=new Date;else if(isNaN(t))throw new Error("Invalid modification date.");if(e===void 0)return{isFile:0,t};if(typeof e=="string")return{isFile:1,t,i:Sp(e)};if(e instanceof Blob)return{isFile:1,t,i:e.stream()};if(e instanceof Uint8Array||e instanceof ReadableStream)return{isFile:1,t,i:e};if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return{isFile:1,t,i:jl(e)};if(Symbol.asyncIterator in e)return{isFile:1,t,i:OL(e[Symbol.asyncIterator]())};throw new TypeError("Unsupported input format.")}function OL(e,t=e){return new ReadableStream({async pull(r){let o=0;for(;r.desiredSize>o;){let n=await e.next();if(!n.value){r.close();break}{let i=Ame(n.value);r.enqueue(i),o+=i.byteLength}}},cancel(r){t.throw?.(r)}})}function Ame(e){return typeof e=="string"?Sp(e):e instanceof Uint8Array?e:jl(e)}function IL(e,t,r){let[o,n]=(function(i){return i?i instanceof Uint8Array?[i,1]:ArrayBuffer.isView(i)||i instanceof ArrayBuffer?[jl(i),1]:[Sp(i),0]:[void 0,0]})(t);if(e instanceof File)return{o:j5(o||Sp(e.name)),u:BigInt(e.size),l:n};if(e instanceof Response){let i=e.headers.get("content-disposition"),a=i&&i.match(/;\s*filename\*?=["']?(.*?)["']?$/i),l=a&&a[1]||e.url&&new URL(e.url).pathname.split("/").findLast(Boolean),c=l&&decodeURIComponent(l),u=r||+e.headers.get("content-length");return{o:j5(o||Sp(c)),u:BigInt(u),l:n}}return o=j5(o,e!==void 0||r!==void 0),typeof e=="string"?{o,u:BigInt(Sp(e).length),l:n}:e instanceof Blob?{o,u:BigInt(e.size),l:n}:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?{o,u:BigInt(e.byteLength),l:n}:{o,u:Ome(e,r),l:n}}function Ome(e,t){return t>-1?BigInt(t):e?void 0:0n}function j5(e,t=1){if(!e||e.every((r=>r===47)))throw new Error("The file must have a name.");if(t)for(;e[e.length-1]===47;)e=e.subarray(0,-1);else e[e.length-1]!==47&&(e=new Uint8Array([...e,47]));return e}var NL=new Uint32Array(256);for(let e=0;e<256;++e){let t=e;for(let r=0;r<8;++r)t=t>>>1^(1&t&&3988292384);NL[e]=t}function AL(e,t=0){t^=-1;for(var r=0,o=e.length;r<o;r++)t=t>>>8^NL[255&t^e[r]];return(-1^t)>>>0}function FL(e,t,r=0){let o=e.getSeconds()>>1|e.getMinutes()<<5|e.getHours()<<11,n=e.getDate()|e.getMonth()+1<<5|e.getFullYear()-1980<<9;t.setUint16(r,o,1),t.setUint16(r+2,n,1)}function Ime({o:e,l:t},r){return 8*(!t||(r??(function(o){try{Nme.decode(o)}catch{return 0}return 1})(e)))}var Nme=new TextDecoder("utf8",{fatal:1});function Fme(e,t=0){let r=_p(30);return r.setUint32(0,1347093252),r.setUint32(4,754976768|t),FL(e.t,r,10),r.setUint16(26,e.o.length,1),jl(r)}async function*Dme(e){let{i:t}=e;if("then"in t&&(t=await t),t instanceof Uint8Array)yield t,e.m=AL(t,0),e.u=BigInt(t.length);else{e.u=0n;let r=t.getReader();for(;;){let{value:o,done:n}=await r.read();if(n)break;e.m=AL(o,e.m),e.u+=BigInt(o.length),yield o}}}function Bme(e,t){let r=_p(16+(t?8:0));return r.setUint32(0,1347094280),r.setUint32(4,e.isFile?e.m:0,1),t?(r.setBigUint64(8,e.u,1),r.setBigUint64(16,e.u,1)):(r.setUint32(8,lf(e.u),1),r.setUint32(12,lf(e.u),1)),jl(r)}function Mme(e,t,r=0,o=0){let n=_p(46);return n.setUint32(0,1347092738),n.setUint32(4,755182848),n.setUint16(8,2048|r),FL(e.t,n,12),n.setUint32(16,e.isFile?e.m:0,1),n.setUint32(20,lf(e.u),1),n.setUint32(24,lf(e.u),1),n.setUint16(28,e.o.length,1),n.setUint16(30,o,1),n.setUint16(40,e.isFile?33204:16893,1),n.setUint32(42,lf(t),1),jl(n)}function Lme(e,t,r){let o=_p(r);return o.setUint16(0,1,1),o.setUint16(2,r-4,1),16&r&&(o.setBigUint64(4,e.u,1),o.setBigUint64(12,e.u,1)),o.setBigUint64(r-8,t,1),jl(o)}function DL(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified]]}var Vme=e=>(function(t){let r=BigInt(22),o=0n,n=0;for(let i of t){if(!i.o)throw new Error("Every file must have a non-empty name.");if(i.u===void 0)throw new Error(`Missing size for file "${new TextDecoder().decode(i.o)}".`);let a=i.u>=0xffffffffn,l=o>=0xffffffffn;o+=BigInt(46+i.o.length+(a&&8))+i.u,r+=BigInt(i.o.length+46+(12*l|28*a)),n||(n=a)}return(n||o>=0xffffffffn)&&(r+=BigInt(76)),r+o})((function*(t){for(let r of t)yield IL(...DL(r)[0])})(e));function BL(e,t={}){let r={"Content-Type":"application/zip","Content-Disposition":"attachment"};return(typeof t.length=="bigint"||Number.isInteger(t.length))&&t.length>0&&(r["Content-Length"]=String(t.length)),t.metadata&&(r["Content-Length"]=String(Vme(t.metadata))),new Response(jme(e,t),{headers:r})}function jme(e,t={}){let r=(function(o){let n=o[Symbol.iterator in o?Symbol.iterator:Symbol.asyncIterator]();return{async next(){let i=await n.next();if(i.done)return i;let[a,l]=DL(i.value);return{done:0,value:Object.assign(Rme(...l),IL(...a))}},throw:n.throw?.bind(n),[Symbol.asyncIterator](){return this}}})(e);return OL((async function*(o,n){let i=[],a=0n,l=0n,c=0;for await(let f of o){let m=Ime(f,n.buffersAreUTF8);yield Fme(f,m),yield new Uint8Array(f.o),f.isFile&&(yield*Dme(f));let h=f.u>=0xffffffffn,g=12*(a>=0xffffffffn)|28*h;yield Bme(f,h),i.push(Mme(f,a,m,g)),i.push(f.o),g&&i.push(Lme(f,a,g)),h&&(a+=8n),l++,a+=BigInt(46+f.o.length)+f.u,c||(c=h)}let u=0n;for(let f of i)yield f,u+=BigInt(f.length);if(c||a>=0xffffffffn){let f=_p(76);f.setUint32(0,1347094022),f.setBigUint64(4,BigInt(44),1),f.setUint32(12,755182848),f.setBigUint64(24,l,1),f.setBigUint64(32,l,1),f.setBigUint64(40,u,1),f.setBigUint64(48,a,1),f.setUint32(56,1347094023),f.setBigUint64(64,a+u,1),f.setUint32(72,1,1),yield jl(f)}let d=_p(22);d.setUint32(0,1347093766),d.setUint16(8,RL(l),1),d.setUint16(10,RL(l),1),d.setUint32(12,lf(u),1),d.setUint32(16,lf(a),1),yield jl(d)})(r,t),r)}var z5=s(sy(),1),U5=s(E(),1);function ML(e){return JSON.stringify({__file:e.type,title:He(e),content:typeof e.content=="string"?e.content:e.content?.raw,syncStatus:e.wp_pattern_sync_status},null,2)}var zme={id:"export-pattern",label:(0,U5.__)("Export as JSON"),icon:GR,supportsBulk:!0,isEligible:e=>e.type==="wp_block",callback:async e=>{if(e.length===1)return(0,z5.downloadBlob)(`${af(He(e[0])||e[0].slug)}.json`,ML(e[0]),"application/json");let t={},r=e.map(o=>{let n=af(He(o)||o.slug);return t[n]=(t[n]||0)+1,{name:`${n+(t[n]>1?"-"+(t[n]-1):"")}.json`,lastModified:new Date,input:ML(o)}});return(0,z5.downloadBlob)((0,U5.__)("patterns-export")+".zip",await BL(r).blob(),"application/zip")}},H5=zme;var LL=s(Ir(),1),W_=s(E(),1),Ume={id:"view-post-revisions",context:"list",label(e){let t=e[0]._links?.["version-history"]?.[0]?.count??0;return(0,W_.sprintf)((0,W_.__)("View revisions (%d)"),t)},isEligible(e){if(e.status==="trash")return!1;let t=e?._links?.["predecessor-version"]?.[0]?.id??null,r=e?._links?.["version-history"]?.[0]?.count??0;return!!t&&r>1},callback(e,{onActionPerformed:t}){let r=e[0],o=(0,LL.addQueryArgs)("revision.php",{revision:r?._links?.["predecessor-version"]?.[0]?.id});document.location.href=o,t&&t(e)}},G5=Ume;var VL=s(W(),1),eo=s(E(),1),jL=s(ct(),1);var zL=s(D(),1),W5=s(O(),1),zl=s(A(),1),UL=s(ft(),1);var cf=s(C(),1),Hme={id:"permanently-delete",label:(0,eo.__)("Permanently delete"),supportsBulk:!0,icon:El,isEligible(e){if(Rl(e)||e.type==="wp_block")return!1;let{status:t,permissions:r}=e;return t==="trash"&&r?.delete},hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,zL.useState)(!1),{createSuccessNotice:i,createErrorNotice:a}=(0,W5.useDispatch)(jL.store),{deleteEntityRecord:l}=(0,W5.useDispatch)(VL.store);return(0,cf.jsxs)(zl.__experimentalVStack,{spacing:"5",children:[(0,cf.jsx)(zl.__experimentalText,{children:e.length>1?(0,eo.sprintf)((0,eo._n)("Are you sure you want to permanently delete %d item?","Are you sure you want to permanently delete %d items?",e.length),e.length):(0,eo.sprintf)((0,eo.__)('Are you sure you want to permanently delete "%s"?'),(0,UL.decodeEntities)(He(e[0])))}),(0,cf.jsxs)(zl.__experimentalHStack,{justify:"right",children:[(0,cf.jsx)(zl.Button,{variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,eo.__)("Cancel")}),(0,cf.jsx)(zl.Button,{variant:"primary",onClick:async()=>{n(!0);let c=await Promise.allSettled(e.map(u=>l("postType",u.type,u.id,{force:!0},{throwOnError:!0})));if(c.every(({status:u})=>u==="fulfilled")){let u;c.length===1?u=(0,eo.sprintf)((0,eo.__)('"%s" permanently deleted.'),He(e[0])):u=(0,eo.__)("The items were permanently deleted."),i(u,{type:"snackbar",id:"permanently-delete-post-action"}),r?.(e)}else{let u;if(c.length===1){let d=c[0];d.reason?.message?u=d.reason.message:u=(0,eo.__)("An error occurred while permanently deleting the item.")}else{let d=new Set,f=c.filter(({status:m})=>m==="rejected");for(let m of f){let h=m;h.reason?.message&&d.add(h.reason.message)}d.size===0?u=(0,eo.__)("An error occurred while permanently deleting the items."):d.size===1?u=(0,eo.sprintf)((0,eo.__)("An error occurred while permanently deleting the items: %s"),[...d][0]):u=(0,eo.sprintf)((0,eo.__)("Some errors occurred while permanently deleting the items: %s"),[...d].join(","))}a(u,{type:"snackbar"})}n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,eo.__)("Delete permanently")})]})]})}},Y5=Hme;var HL=s(W(),1),On=s(E(),1),GL=s(ct(),1);var Gme={id:"restore",label:(0,On.__)("Restore"),isPrimary:!0,icon:xl,supportsBulk:!0,isEligible(e){return!Rl(e)&&e.type!=="wp_block"&&e.status==="trash"&&e.permissions?.update},async callback(e,{registry:t,onActionPerformed:r}){let{createSuccessNotice:o,createErrorNotice:n}=t.dispatch(GL.store),{editEntityRecord:i,saveEditedEntityRecord:a}=t.dispatch(HL.store);await Promise.allSettled(e.map(c=>i("postType",c.type,c.id,{status:"draft"})));let l=await Promise.allSettled(e.map(c=>a("postType",c.type,c.id,{throwOnError:!0})));if(l.every(({status:c})=>c==="fulfilled")){let c;e.length===1?c=(0,On.sprintf)((0,On.__)('"%s" has been restored.'),He(e[0])):e[0].type==="page"?c=(0,On.sprintf)((0,On.__)("%d pages have been restored."),e.length):c=(0,On.sprintf)((0,On.__)("%d posts have been restored."),e.length),o(c,{type:"snackbar",id:"restore-post-action"}),r&&r(e)}else{let c;if(l.length===1){let u=l[0];u.reason?.message?c=u.reason.message:c=(0,On.__)("An error occurred while restoring the post.")}else{let u=new Set,d=l.filter(({status:f})=>f==="rejected");for(let f of d){let m=f;m.reason?.message&&u.add(m.reason.message)}u.size===0?c=(0,On.__)("An error occurred while restoring the posts."):u.size===1?c=(0,On.sprintf)((0,On.__)("An error occurred while restoring the posts: %s"),[...u][0]):c=(0,On.sprintf)((0,On.__)("Some errors occurred while restoring the posts: %s"),[...u].join(","))}n(c,{type:"snackbar"})}}},q5=Gme;var Z5=s(O(),1),WL=s(W(),1),Dr=s(E(),1),YL=s(ct(),1),qL=s(D(),1),Ul=s(A(),1);var uf=s(C(),1),Wme={id:"move-to-trash",label:(0,Dr._x)("Trash","verb"),isPrimary:!0,icon:El,isEligible(e){return e.type==="wp_template_part"||e.type==="wp_block"||e.type==="wp_template"&&typeof e.id=="string"?!1:!!e.status&&!["auto-draft","trash"].includes(e.status)&&e.permissions?.delete},supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,qL.useState)(!1),{createSuccessNotice:i,createErrorNotice:a}=(0,Z5.useDispatch)(YL.store),{deleteEntityRecord:l}=(0,Z5.useDispatch)(WL.store);return(0,uf.jsxs)(Ul.__experimentalVStack,{spacing:"5",children:[(0,uf.jsx)(Ul.__experimentalText,{children:e.length===1?(0,Dr.sprintf)((0,Dr.__)('Are you sure you want to move "%s" to the trash?'),He(e[0])):(0,Dr.sprintf)((0,Dr._n)("Are you sure you want to move %d item to the trash ?","Are you sure you want to move %d items to the trash ?",e.length),e.length)}),(0,uf.jsxs)(Ul.__experimentalHStack,{justify:"right",children:[(0,uf.jsx)(Ul.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,children:(0,Dr.__)("Cancel")}),(0,uf.jsx)(Ul.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{n(!0);let c=await Promise.allSettled(e.map(u=>l("postType",u.type,u.id.toString(),{},{throwOnError:!0})));if(c.every(({status:u})=>u==="fulfilled")){let u;c.length===1?u=(0,Dr.sprintf)((0,Dr.__)('"%s" moved to the trash.'),He(e[0])):u=(0,Dr.sprintf)((0,Dr._n)("%d item moved to the trash.","%d items moved to the trash.",e.length),e.length),i(u,{type:"snackbar",id:"move-to-trash-action"})}else{let u;if(c.length===1){let d=c[0];d.reason?.message?u=d.reason.message:u=(0,Dr.__)("An error occurred while moving the item to the trash.")}else{let d=new Set,f=c.filter(({status:m})=>m==="rejected");for(let m of f){let h=m;h.reason?.message&&d.add(h.reason.message)}d.size===0?u=(0,Dr.__)("An error occurred while moving the items to the trash."):d.size===1?u=(0,Dr.sprintf)((0,Dr.__)("An error occurred while moving the item to the trash: %s"),[...d][0]):u=(0,Dr.sprintf)((0,Dr.__)("Some errors occurred while moving the items to the trash: %s"),[...d].join(","))}a(u,{type:"snackbar"})}r&&r(e),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,children:(0,Dr._x)("Trash","verb")})]})]})}},K5=Wme;var Tt=s(E(),1),QL=s(D(),1),Hl=s(A(),1),JL=s(Ls(),1),Q5=s(ft(),1);var ZL=s(ct(),1),KL=s(W(),1),X5=s(O(),1);function Yme(e){let t=new Set;if(e.length===1){let r=e[0];r.reason?.message&&t.add(r.reason.message)}else{let r=e.filter(({status:o})=>o==="rejected");for(let o of r){let n=o;n.reason?.message&&t.add(n.reason.message)}}return t}var XL=async(e,t,r)=>{let{createSuccessNotice:o,createErrorNotice:n}=(0,X5.dispatch)(ZL.store),{deleteEntityRecord:i}=(0,X5.dispatch)(KL.store),a=await Promise.allSettled(e.map(l=>i("postType",l.type,l.id,{force:!0},{throwOnError:!0})));if(a.every(({status:l})=>l==="fulfilled")){let l;a.length===1?l=t.success.messages.getMessage(e[0]):l=t.success.messages.getBatchMessage(e),o(l,{type:t.success.type??"snackbar",id:t.success.id}),r.onActionPerformed?.(e)}else{let l=Yme(a),c="";a.length===1?c=t.error.messages.getMessage(l):c=t.error.messages.getBatchMessage(l),n(c,{type:t.error.type??"snackbar",id:t.error.id}),r.onActionError?.()}};var df=s(C(),1),{PATTERN_TYPES:qme}=Do(JL.privateApis),Zme={id:"delete-post",label:(0,Tt.__)("Delete"),isPrimary:!0,icon:El,isEligible(e){return Rl(e)?n_(e):e.type===qme.user},supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,QL.useState)(!1),i=e.every(a=>Rl(a)&&a?.has_theme_file);return(0,df.jsxs)(Hl.__experimentalVStack,{spacing:"5",children:[(0,df.jsx)(Hl.__experimentalText,{children:e.length>1?(0,Tt.sprintf)((0,Tt._n)("Delete %d item?","Delete %d items?",e.length),e.length):(0,Tt.sprintf)((0,Tt._x)('Delete "%s"?',"template part"),He(e[0]))}),(0,df.jsxs)(Hl.__experimentalHStack,{justify:"right",children:[(0,df.jsx)(Hl.Button,{variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,Tt.__)("Cancel")}),(0,df.jsx)(Hl.Button,{variant:"primary",onClick:async()=>{n(!0),await XL(e,{success:{messages:{getMessage:l=>i?(0,Tt.sprintf)((0,Tt.__)('"%s" reset.'),(0,Q5.decodeEntities)(He(l))):(0,Tt.sprintf)((0,Tt._x)('"%s" deleted.',"template part"),(0,Q5.decodeEntities)(He(l))),getBatchMessage:()=>i?(0,Tt.__)("Items reset."):(0,Tt.__)("Items deleted.")}},error:{messages:{getMessage:l=>l.size===1?[...l][0]:i?(0,Tt.__)("An error occurred while reverting the item."):(0,Tt.__)("An error occurred while deleting the item."),getBatchMessage:l=>l.size===0?i?(0,Tt.__)("An error occurred while reverting the items."):(0,Tt.__)("An error occurred while deleting the items."):l.size===1?i?(0,Tt.sprintf)((0,Tt.__)("An error occurred while reverting the items: %s"),[...l][0]):(0,Tt.sprintf)((0,Tt.__)("An error occurred while deleting the items: %s"),[...l][0]):i?(0,Tt.sprintf)((0,Tt.__)("Some errors occurred while reverting the items: %s"),[...l].join(",")):(0,Tt.sprintf)((0,Tt.__)("Some errors occurred while deleting the items: %s"),[...l].join(","))}}},{onActionPerformed:r}),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,Tt.__)("Delete")})]})]})}},J5=Zme;var cV=s(O(),1),Gl=s(E(),1),uV=s(ct(),1),dV=s(D(),1),fV=s(Xe(),1);var Jo=s(A(),1),sV=s(he(),1),q_=s(W(),1),xp=s(O(),1),Y_=s(D(),1),wp=s(E(),1);var aV=s(ct(),1),lV=s(Xe(),1);var $L=s(O(),1),eV=s(W(),1),tV=()=>(0,$L.useSelect)(e=>e(eV.store).getEntityRecords("postType","wp_template_part",{per_page:-1}),[])??[],rV=(e,t)=>{let r=e.toLowerCase(),o=t.map(i=>i.title.rendered.toLowerCase());if(!o.includes(r))return e;let n=2;for(;o.includes(`${r} ${n}`);)n++;return`${e} ${n}`},oV=e=>af(e).replace(/[^\w-]+/g,"")||"wp-custom-part";var to=s(C(),1);function nV(e,t){return`fields-create-template-part-modal__area-option-${e}-${t}`}function iV(e,t){return`fields-create-template-part-modal__area-option-description-${e}-${t}`}function Cp({modalTitle:e,...t}){let r=(0,xp.useSelect)(o=>o(q_.store).getPostType("wp_template_part")?.labels?.add_new_item,[]);return(0,to.jsx)(Jo.Modal,{title:e||r,onRequestClose:t.closeModal,overlayClassName:"fields-create-template-part-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,to.jsx)($5,{...t})})}var Kme=e=>e==="header"?Rv:e==="footer"?Ev:e==="sidebar"?Gv:e==="navigation-overlay"?Nv:Wd;function $5({defaultArea:e="uncategorized",blocks:t=[],confirmLabel:r=(0,wp.__)("Add"),closeModal:o,onCreate:n,onError:i,defaultTitle:a=""}){let{createErrorNotice:l}=(0,xp.useDispatch)(aV.store),{saveEntityRecord:c}=(0,xp.useDispatch)(q_.store),u=tV(),[d,f]=(0,Y_.useState)(a),[m,h]=(0,Y_.useState)(e),[g,v]=(0,Y_.useState)(!1),y=(0,sV.useInstanceId)(Cp),b=(0,xp.useSelect)(S=>S(q_.store).getCurrentTheme()?.default_template_part_areas,[]);async function _(){if(!(!d||g))try{v(!0);let S=rV(d,u),x=oV(S),T=await c("postType","wp_template_part",{slug:x,title:S,content:(0,lV.serialize)(t),area:m},{throwOnError:!0});await n(T)}catch(S){let x=S instanceof Error&&"code"in S&&S.message&&S.code!=="unknown_error"?S.message:(0,wp.__)("An error occurred while creating the template part.");l(x,{type:"snackbar"}),i?.()}finally{v(!1)}}return(0,to.jsx)("form",{onSubmit:async S=>{S.preventDefault(),await _()},children:(0,to.jsxs)(Jo.__experimentalVStack,{spacing:"4",children:[(0,to.jsx)(Jo.TextControl,{__next40pxDefaultSize:!0,label:(0,wp.__)("Name"),value:d,onChange:f,required:!0}),(0,to.jsxs)("fieldset",{className:"fields-create-template-part-modal__area-fieldset",children:[(0,to.jsx)(Jo.BaseControl.VisualLabel,{as:"legend",children:(0,wp.__)("Area")}),(0,to.jsx)("div",{className:"fields-create-template-part-modal__area-radio-group",children:(b??[]).map(S=>{let x=Kme(S.icon);return(0,to.jsxs)("div",{className:"fields-create-template-part-modal__area-radio-wrapper",children:[(0,to.jsx)("input",{type:"radio",id:nV(S.area,y),name:`fields-create-template-part-modal__area-${y}`,value:S.area,checked:m===S.area,onChange:()=>{h(S.area)},"aria-describedby":iV(S.area,y)}),(0,to.jsx)(Jo.Icon,{icon:x,className:"fields-create-template-part-modal__area-radio-icon"}),(0,to.jsx)("label",{htmlFor:nV(S.area,y),className:"fields-create-template-part-modal__area-radio-label",children:S.label}),(0,to.jsx)(Jo.Icon,{icon:Pi,className:"fields-create-template-part-modal__area-radio-checkmark"}),(0,to.jsx)("p",{className:"fields-create-template-part-modal__area-radio-description",id:iV(S.area,y),children:S.description})]},S.area)})})]}),(0,to.jsxs)(Jo.__experimentalHStack,{justify:"right",children:[(0,to.jsx)(Jo.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{o()},children:(0,wp.__)("Cancel")}),(0,to.jsx)(Jo.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!d||g,isBusy:g,children:r})]})]})})}var mV=s(C(),1),Xme={id:"duplicate-template-part",label:(0,Gl._x)("Duplicate","action label"),isEligible:e=>e.type==="wp_template_part",modalHeader:(0,Gl._x)("Duplicate template part","action label"),modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t})=>{let[r]=e,o=(0,dV.useMemo)(()=>r.blocks??(0,fV.parse)(typeof r.content=="string"?r.content:r.content.raw,{__unstableSkipMigrationLogs:!0}),[r.content,r.blocks]),{createSuccessNotice:n}=(0,cV.useDispatch)(uV.store);function i(a){n((0,Gl.sprintf)((0,Gl._x)('"%s" duplicated.',"template part"),He(a)),{type:"snackbar",id:"edit-site-patterns-success"}),t?.()}return(0,mV.jsx)($5,{blocks:o,defaultArea:r.area,defaultTitle:(0,Gl.sprintf)((0,Gl._x)("%s (Copy)","template part"),He(r)),onCreate:i,onError:t,confirmLabel:(0,Gl._x)("Duplicate","action label"),closeModal:t??(()=>{})})}},eI=Xme;var pV=s(E(),1),hV=s(A(),1),gV=s(C(),1),Qme={id:"alt_text",type:"text",label:(0,pV.__)("Alt text"),isVisible:e=>e?.media_type==="image",render:({item:e})=>e?.alt_text||"-",Edit:({field:e,onChange:t,data:r})=>(0,gV.jsx)(hV.TextareaControl,{label:e.label,value:r.alt_text||"",onChange:o=>t({alt_text:o}),rows:2}),enableSorting:!1,filterBy:!1},tI=Qme;var wV=s(E(),1);var K_=s(D(),1),vV=s(E(),1);function Z_(e){return e?typeof e=="string"?e:typeof e=="object"&&(e.rendered||e.raw)||"":""}var X_=s(C(),1);function yV({item:e}){let[t,r]=(0,K_.useState)(null),o=e.post,n=e._embedded?.["wp:attached-to"]?.[0]?.id,i=e._embedded?.["wp:attached-to"]?.[0]?.title;return(0,K_.useEffect)(()=>{o&&o===n&&r(Z_(i)||n?.toString()||""),o||r((0,vV.__)("(Unattached)"))},[o,n,i]),(0,X_.jsx)(X_.Fragment,{children:t})}var J_=s(W(),1),$_=s(A(),1),Q_=s(E(),1),ff=s(D(),1),bV=s(he(),1),SV=s(O(),1);var rI=s(C(),1);function _V({data:e,onChange:t}){let r=e.post&&e?._embedded?.["wp:attached-to"]?.[0]?[{label:Z_(e._embedded?.["wp:attached-to"]?.[0]?.title),value:e.post.toString()}]:[],[o,n]=(0,ff.useState)(r),[i,a]=(0,ff.useState)([]),[l,c]=(0,ff.useState)(!1),[u,d]=(0,ff.useState)(e?.post?.toString()??null),f=(0,SV.useSelect)(y=>y(J_.store).getPostTypes(),[]),m=()=>{t({post:0,_embedded:{...e?._embedded,"wp:attached-to":void 0}}),n([])},h=async y=>{c(!0);let b=await(0,J_.__experimentalFetchLinkSuggestions)(y,{type:"post",isInitialSuggestions:!0},{});a(b);let _=b.map(S=>({label:S.title,value:S.id.toString()}));n(_),c(!1)},g=y=>{if(!y){m();return}if(d(y),y){let b=i.find(_=>_.id===Number(y));if(b&&f){let _=f.find(x=>x.slug===b?.type),S={..._&&{type:_.slug},id:Number(y),title:{raw:b.title,rendered:b.title}};t({post:Number(y),_embedded:{...e?._embedded,"wp:attached-to":[S]}})}}},v=e.post?(0,ff.createInterpolateElement)((0,Q_.__)("Search for a post or page to attach this media to or <button>detach current</button>."),{button:(0,rI.jsx)($_.Button,{__next40pxDefaultSize:!0,onClick:m,variant:"link",accessibleWhenDisabled:!0})}):(0,Q_.__)("Search for a post or page to attach this media to.");return(0,rI.jsx)($_.ComboboxControl,{className:"dataviews-media-field__attached-to",__next40pxDefaultSize:!0,isLoading:l,label:(0,Q_.__)("Attached to"),help:v,value:u,options:o,onFilterValueChange:(0,bV.debounce)(y=>h(y),300),onChange:g,hideLabelFromVision:!0})}var Jme={id:"attached_to",type:"text",label:(0,wV.__)("Attached to"),Edit:_V,render:yV,enableSorting:!1,filterBy:!1},oI=Jme;var TV=s(E(),1),PV=s(O(),1),kV=s(W(),1);var xV=s(E(),1),Tp=s(D(),1);var ew=s(A(),1),vu=s(C(),1);function CV({item:e}){let t=e?._embedded?.author?.[0],r=t?.name,o=t?.avatar_urls?.[48],[n,i]=(0,Tp.useState)("loading");(0,Tp.useEffect)(()=>{i("loading")},[o]);let a=(0,Tp.useCallback)(c=>{c?.complete&&i("instant")},[]),l=()=>{n==="loading"&&i("loaded")};return(0,vu.jsxs)(ew.__experimentalHStack,{alignment:"left",spacing:0,children:[!!o&&(0,vu.jsx)("div",{className:re("media-author-field__avatar",{"is-loading":n==="loading","is-loaded":n==="loaded"}),children:(0,vu.jsx)("img",{ref:a,onLoad:l,alt:(0,xV.__)("Author avatar"),src:o})}),!o&&(0,vu.jsx)("div",{className:"media-author-field__icon",children:(0,vu.jsx)(ew.Icon,{icon:Pv})}),(0,vu.jsx)("span",{className:"media-author-field__name",children:r})]})}var $me={label:(0,TV.__)("Author"),id:"author",type:"integer",getElements:async()=>(await(0,PV.resolveSelect)(kV.store).getEntityRecords("root","user",{per_page:-1,who:"authors",_fields:"id,name",context:"view"})??[]).map(({id:t,name:r})=>({value:t,label:r})),render:CV,sort:(e,t,r)=>{let o=e._embedded?.author?.[0]?.name||"",n=t._embedded?.author?.[0]?.name||"";return r==="asc"?o.localeCompare(n):n.localeCompare(o)},filterBy:{operators:["isAny","isNone"]},readOnly:!0},nI=$me;var EV=s(E(),1),RV=s(A(),1);function yu(e){return e?typeof e=="string"?e:typeof e=="object"&&"raw"in e&&e.raw||"":""}var AV=s(C(),1),epe={id:"caption",type:"text",label:(0,EV.__)("Caption"),getValue:({item:e})=>yu(e?.caption),render:({item:e})=>yu(e?.caption)||"-",Edit:({field:e,onChange:t,data:r})=>(0,AV.jsx)(RV.TextareaControl,{label:e.label,value:yu(r.caption)||"",onChange:o=>t({caption:o}),rows:2}),enableSorting:!1,filterBy:!1},iI=epe;var OV=s(E(),1),IV=s(po(),1),tpe={id:"date",type:"datetime",label:(0,OV.__)("Date added"),filterBy:{operators:["before","after"]},format:{datetime:(0,IV.getSettings)().formats.datetimeAbbreviated},readOnly:!0},sI=tpe;var NV=s(E(),1),FV=s(A(),1);var aI=s(C(),1),rpe={id:"description",type:"text",label:(0,NV.__)("Description"),getValue:({item:e})=>yu(e?.description),render:({item:e})=>(0,aI.jsx)("div",{children:yu(e?.description)||"-"}),Edit:({field:e,onChange:t,data:r})=>(0,aI.jsx)(FV.TextareaControl,{label:e.label,value:yu(r.description)||"",onChange:o=>t({description:o}),rows:5}),enableSorting:!1,filterBy:!1},lI=rpe;var VV=s(E(),1),jV=s(Ir(),1);var tw=s(A(),1),BV=s(D(),1),MV=s(Ir(),1),Pp=s(C(),1),DV=15;function LV({item:e}){let t=(0,BV.useMemo)(()=>e?.source_url?(0,MV.getFilename)(e.source_url):null,[e?.source_url]);return t?t.length>DV?(0,Pp.jsx)(tw.Tooltip,{text:t,children:(0,Pp.jsx)(tw.__experimentalTruncate,{limit:DV,ellipsizeMode:"tail",children:t})}):(0,Pp.jsx)(Pp.Fragment,{children:t}):""}var ope={id:"filename",type:"text",label:(0,VV.__)("File name"),getValue:({item:e})=>(0,jV.getFilename)(e?.source_url||""),render:LV,enableSorting:!1,filterBy:!1,readOnly:!0},cI=ope;var $o=s(E(),1),UV=1024,HV=1024*UV,GV=1024*HV,WV=1024*GV,YV=1024*WV,qV=1024*YV,ZV=1024*qV,npe=1024*ZV;function zV(e,t,r=2){return(0,$o.sprintf)((0,$o._x)("%1$s %2$s","file size"),e.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:r}),t)}function ipe(e,t=2){if(e===0)return zV(0,(0,$o._x)("B","unit symbol"),t);let r={[(0,$o._x)("YB","unit symbol")]:npe,[(0,$o._x)("ZB","unit symbol")]:ZV,[(0,$o._x)("EB","unit symbol")]:qV,[(0,$o._x)("PB","unit symbol")]:YV,[(0,$o._x)("TB","unit symbol")]:WV,[(0,$o._x)("GB","unit symbol")]:GV,[(0,$o._x)("MB","unit symbol")]:HV,[(0,$o._x)("KB","unit symbol")]:UV,[(0,$o._x)("B","unit symbol")]:1};for(let[o,n]of Object.entries(r))if(e>=n)return zV(e/n,o,t);return""}var spe={id:"filesize",type:"text",label:(0,$o.__)("File size"),getValue:({item:e})=>e?.media_details?.filesize?ipe(e?.media_details?.filesize):"",isVisible:e=>!!e?.media_details?.filesize,enableSorting:!1,filterBy:!1,readOnly:!0},uI=spe;var kp=s(E(),1),ape={id:"media_dimensions",type:"text",label:(0,kp.__)("Dimensions"),getValue:({item:e})=>e?.media_details?.width&&e?.media_details?.height?(0,kp.sprintf)((0,kp._x)("%1$s \xD7 %2$s","image dimensions"),e?.media_details?.width?.toString(),e?.media_details?.height?.toString()):"",isVisible:e=>!!(e?.media_details?.width&&e?.media_details?.height),enableSorting:!1,filterBy:!1,readOnly:!0},dI=ape;var KV=s(E(),1),lpe={id:"mime_type",type:"text",label:(0,KV.__)("File type"),getValue:({item:e})=>e?.mime_type||"",render:({item:e})=>e?.mime_type||"-",enableSorting:!1,filterBy:!1,readOnly:!0},fI=lpe;var RG=s(E(),1);var PG=s(E(),1),$6=s($(),1),kG=s(O(),1),Ub=s(W(),1);var Ii=s(D(),1),Kp=s(O(),1),g6=s(E(),1),Ys=s(W(),1),Xp=s($(),1),Oj=s(ct(),1),Ij=s(Ls(),1),Nj=s(Xe(),1);var XV=s(D(),1),Ep=s(O(),1),QV=s(he(),1),JV=s($(),1);var rw=s(C(),1);function cpe(e,t,r){if(!r)return t;let o=e.get(t);return o||(o=(0,Ep.createRegistry)({"core/block-editor":JV.storeConfig},t),o.registerStore("core/editor",Ay),e.set(t,o)),o}var upe=(0,QV.createHigherOrderComponent)(e=>({useSubRegistry:t=!0,...r})=>{let o=(0,Ep.useRegistry)(),[n]=(0,XV.useState)(()=>new WeakMap),i=cpe(n,o,t);return i===o?(0,rw.jsx)(e,{registry:o,...r}):(0,rw.jsx)(Ep.RegistryProvider,{value:i,children:(0,rw.jsx)(e,{registry:i,...r})})},"withRegistryProvider"),$V=upe;var hf=s(D(),1),Bp=s(O(),1),Ai=s(W(),1),Z8=s(E(),1),K8=s(lt(),1),X8=s(he(),1),Q8=s(Xe(),1),mw=s($(),1);var ro=s(E(),1),e8=s(O(),1),ow=s(ft(),1),t8=s(W(),1),bu=(e,t)=>`<a ${pI(e)}>${t}</a>`,pI=e=>`href="${e}" target="_blank" rel="noreferrer noopener"`,dpe=(e,t)=>{let r=e.trim();return e!=="pdm"&&(r=e.toUpperCase().replace("SAMPLING","Sampling")),t&&(r+=` ${t}`),["pdm","cc0"].includes(e)||(r=`CC ${r}`),r},fpe=e=>{let{title:t,foreign_landing_url:r,creator:o,creator_url:n,license:i,license_version:a,license_url:l}=e,c=dpe(i,a),u=(0,ow.decodeEntities)(o),d;return u?d=t?(0,ro.sprintf)((0,ro._x)('"%1$s" by %2$s/ %3$s',"caption"),bu(r,(0,ow.decodeEntities)(t)),n?bu(n,u):u,l?bu(`${l}?ref=openverse`,c):c):(0,ro.sprintf)((0,ro._x)("<a %1$s>Work</a> by %2$s/ %3$s","caption"),pI(r),n?bu(n,u):u,l?bu(`${l}?ref=openverse`,c):c):d=t?(0,ro.sprintf)((0,ro._x)('"%1$s"/ %2$s',"caption"),bu(r,(0,ow.decodeEntities)(t)),l?bu(`${l}?ref=openverse`,c):c):(0,ro.sprintf)((0,ro._x)("<a %1$s>Work</a>/ %2$s","caption"),pI(r),l?bu(`${l}?ref=openverse`,c):c),d.replace(/\s{2}/g," ")},mI=async(e={})=>(await(0,e8.resolveSelect)(t8.store).getEntityRecords("postType","attachment",{...e,orderBy:e?.search?"relevance":"date"})).map(r=>({...r,alt:r.alt_text,url:r.source_url,previewUrl:r.media_details?.sizes?.medium?.source_url,caption:r.caption?.raw})),mpe=[{name:"images",labels:{name:(0,ro.__)("Images"),search_items:(0,ro.__)("Search images")},mediaType:"image",async fetch(e={}){return mI({...e,media_type:"image"})}},{name:"videos",labels:{name:(0,ro.__)("Videos"),search_items:(0,ro.__)("Search videos")},mediaType:"video",async fetch(e={}){return mI({...e,media_type:"video"})}},{name:"audio",labels:{name:(0,ro.__)("Audio"),search_items:(0,ro.__)("Search audio")},mediaType:"audio",async fetch(e={}){return mI({...e,media_type:"audio"})}},{name:"openverse",labels:{name:(0,ro.__)("Openverse"),search_items:(0,ro.__)("Search Openverse")},mediaType:"image",async fetch(e={}){let r={...e,...{mature:!1,excluded_source:"flickr,inaturalist,wikimedia",license:"pdm,cc0"}},o={per_page:"page_size",search:"q"},n=new URL("https://api.openverse.org/v1/images/");return Object.entries(r).forEach(([c,u])=>{let d=o[c]||c;n.searchParams.set(d,u)}),(await(await window.fetch(n,{headers:{"User-Agent":"WordPress/inserter-media-fetch"}})).json()).results.map(c=>({...c,title:c.title?.toLowerCase().startsWith("file:")?c.title.slice(5):c.title,sourceId:c.id,id:void 0,caption:fpe(c),previewUrl:c.thumbnail}))},getReportUrl:({sourceId:e})=>`https://wordpress.org/openverse/image/${e}/report/`,isExternalResource:!0}],r8=mpe;var o8=s(O(),1),n8=s(W(),1);function i8(e){let{invalidateResolution:t}=(0,o8.dispatch)(n8.store);for(let r of e)r.id&&(t("getEntityRecord",["postType","attachment",r.id,{context:"view"}]),t("getEntityRecord",["postType","attachment",r.id]))}var s8=s(Yd(),1);var{sideloadMedia:ppe}=N(s8.privateApis),a8=ppe;var l8=s(Qm(),1);async function c8(e){await(0,l8.default)({path:`/wp/v2/media/${e}/finalize`,method:"POST"})}var Y8=s($(),1),Np=s(W(),1),Fp=s(O(),1),Dp=s(D(),1);function Su(e,t,r){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};let o=t.pop(),n=e;for(let i of t){let a=n[i];n=n[i]=Array.isArray(a)?[...a]:{...a}}return n[o]=r,e}var Pt=(e,t,r)=>{let o=Array.isArray(t)?t:t.split("."),n=e;return o.forEach(i=>{n=n?.[i]}),n??r};var hpe=["appearanceTools","useRootPaddingAwareAlignments","background.backgroundImage","background.backgroundRepeat","background.backgroundSize","background.backgroundPosition","border.color","border.radius","border.radiusSizes","border.style","border.width","shadow.presets","shadow.defaultPresets","color.background","color.button","color.caption","color.custom","color.customDuotone","color.customGradient","color.defaultDuotone","color.defaultGradients","color.defaultPalette","color.duotone","color.gradients","color.heading","color.link","color.palette","color.text","custom","dimensions.aspectRatio","dimensions.height","dimensions.minHeight","dimensions.width","dimensions.dimensionSizes","layout.contentSize","layout.definitions","layout.wideSize","lightbox.enabled","lightbox.allowEditing","position.fixed","position.sticky","spacing.customSpacingSize","spacing.defaultSpacingSizes","spacing.spacingSizes","spacing.spacingScale","spacing.blockGap","spacing.margin","spacing.padding","spacing.units","typography.fluid","typography.customFontSize","typography.defaultFontSizes","typography.dropCap","typography.fontFamilies","typography.fontSizes","typography.fontStyle","typography.fontWeight","typography.letterSpacing","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textIndent","typography.textTransform","typography.writingMode"];function mf(e,t,r){let o=r?".blocks."+r:"",n=t?"."+t:"",i=`settings${o}${n}`,a=`settings${n}`;if(t)return Pt(e,i)??Pt(e,a);let l={};return hpe.forEach(c=>{let u=Pt(e,`settings${o}.${c}`)??Pt(e,`settings.${c}`);u!==void 0&&(l=Su(l,c.split("."),u))}),l}function Oy(e,t,r,o){let n=o?".blocks."+o:"",i=t?"."+t:"",a=`settings${n}${i}`;return Su(e,a.split("."),r)}var f8=s(hI(),1);var gpe="1600px",vpe="320px",ype=1,bpe=.25,Spe=.75,_pe="14px";function d8({minimumFontSize:e,maximumFontSize:t,fontSize:r,minimumViewportWidth:o=vpe,maximumViewportWidth:n=gpe,scaleFactor:i=ype,minimumFontSizeLimit:a}){if(a=Ea(a)?a:_pe,r){let S=Ea(r);if(!S?.unit||!S?.value)return null;let x=Ea(a,{coerceTo:S.unit});if(x?.value&&!e&&!t&&S?.value<=x?.value)return null;if(t||(t=`${S.value}${S.unit}`),!e){let T=S.unit==="px"?S.value:S.value*16,R=Math.min(Math.max(1-.075*Math.log2(T),bpe),Spe),F=Iy(S.value*R,3);x?.value&&F<x?.value?e=`${x.value}${x.unit}`:e=`${F}${S.unit}`}}let l=Ea(e),c=l?.unit||"rem",u=Ea(t,{coerceTo:c});if(!l||!u)return null;let d=Ea(e,{coerceTo:"rem"}),f=Ea(n,{coerceTo:c}),m=Ea(o,{coerceTo:c});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let g=Iy(m.value/100,3),v=Iy(g,3)+c,y=100*((u.value-l.value)/h),b=Iy((y||1)*i,3),_=`${d.value}${d.unit} + ((1vw - ${v}) * ${b})`;return`clamp(${e}, ${_}, ${t})`}function Ea(e,t={}){if(typeof e!="string"&&typeof e!="number")return null;isFinite(e)&&(e=`${e}px`);let{coerceTo:r,rootSizeValue:o,acceptableUnits:n}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=n?.join("|"),a=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),l=e.toString().match(a);if(!l||l.length<3)return null;let[,c,u]=l,d=parseFloat(c);return r==="px"&&(u==="em"||u==="rem")&&(d=d*o,u=r),u==="px"&&(r==="em"||r==="rem")&&(d=d/o,u=r),(r==="em"||r==="rem")&&(u==="em"||u==="rem")&&(u=r),u?{value:Iy(d,3),unit:u}:null}function Iy(e,t=3){let r=Math.pow(10,t);return Math.round(e*r)/r}function gI(e){let t=e?.fluid;return t===!0||t&&typeof t=="object"&&Object.keys(t).length>0}function wpe(e){let t=e?.typography??{},r=e?.layout,o=Ea(r?.wideSize)?r?.wideSize:null;return gI(t)&&o?{fluid:{maxViewportWidth:o,...typeof t.fluid=="object"?t.fluid:{}}}:{fluid:t?.fluid}}function nw(e,t){let{size:r}=e;if(!r||r==="0"||e?.fluid===!1||!gI(t?.typography)&&!gI(e))return r;let o=wpe(t)?.fluid??{},n=d8({minimumFontSize:typeof e?.fluid=="boolean"?void 0:e?.fluid?.min,maximumFontSize:typeof e?.fluid=="boolean"?void 0:e?.fluid?.max,fontSize:r,minimumFontSizeLimit:typeof o=="object"?o?.minFontSize:void 0,maximumViewportWidth:typeof o=="object"?o?.maxViewportWidth:void 0,minimumViewportWidth:typeof o=="object"?o?.minViewportWidth:void 0});return n||r}var Ra="body",Ny=":root",Rp=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],valueKey:"colors",cssVarInfix:"duotone",valueFunc:({slug:e})=>`url( '#wp-duotone-${e}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>nw(e,t),valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:({size:e})=>e,classes:[]},{path:["border","radiusSizes"],valueKey:"size",cssVarInfix:"border-radius",classes:[]},{path:["dimensions","dimensionSizes"],valueKey:"size",cssVarInfix:"dimension",classes:[]}];function Us(e,t){if(!e||!t)return t;let r=e.split(","),o=t.split(","),n=[];return r.forEach(i=>{o.forEach(a=>{n.push(`${i.trim()} ${a.trim()}`)})}),n.join(", ")}function m8(e,t){if(!e||!t)return;let r={};return Object.entries(t).forEach(([o,n])=>{typeof n=="string"&&(r[o]=Us(e,n)),typeof n=="object"&&(r[o]={},Object.entries(n).forEach(([i,a])=>{r[o][i]=Us(e,a)}))}),r}function p8(e,t){return e.includes(",")?e.split(",").map(n=>n+t).join(","):e+t}function h8(e,t){let r=`.is-style-${e}`;if(!t)return r;let o=/((?::\([^)]+\))?\s*)([^\s:]+)/,n=(a,l,c)=>l+c+r;return t.split(",").map(a=>a.replace(o,n)).join(",")}function xpe(e,t){if(!e||!t)return e;if(typeof e=="object"&&"ref"in e&&e?.ref){let r=(0,f8.getCSSValueFromRawStyle)(Pt(t,e.ref));return typeof r=="object"&&r!==null&&"ref"in r&&r?.ref?void 0:r===void 0?e:r}return e}function Cpe(e,t){if(!e||!t||!Array.isArray(t))return e;let r=t.find(o=>o?.name===e);return r?.href?r?.href:e}function vI(e,t){if(!e||!t)return e;let r=xpe(e,t);return typeof r=="object"&&r!==null&&"url"in r&&r?.url&&(r.url=Cpe(r.url,t?._links?.["wp:theme-file"])),r}function g8(e,t,r=[],o="slug",n){let i=[t?Pt(e,["blocks",t,...r]):void 0,Pt(e,r)].filter(Boolean);for(let a of i)if(a){let l=["custom","theme","default"];for(let c of l){let u=a[c];if(u){let d=u.find(f=>f[o]===n);if(d)return o==="slug"||g8(e,t,r,"slug",d.slug)[o]===d[o]?d:void 0}}}}function Tpe(e,t,r,[o,n]=[]){let i=Rp.find(l=>l.cssVarInfix===o);if(!i||!e.settings)return r;let a=g8(e.settings,t,i.path,"slug",n);if(a){let{valueKey:l}=i,c=a[l];return iw(e,t,c)}return r}function Ppe(e,t,r,o=[]){let n=(t?Pt(e?.settings??{},["blocks",t,"custom",...o]):void 0)??Pt(e?.settings??{},["custom",...o]);return n?iw(e,t,n):r}function iw(e,t,r){if(!r||typeof r!="string")if(typeof r=="object"&&r!==null&&"ref"in r&&typeof r.ref=="string"){let u=Pt(e,r.ref);if(!u||typeof u=="object"&&"ref"in u)return u;r=u}else return r;let o="var:",n="var(--wp--",i=")",a;if(r.startsWith(o))a=r.slice(o.length).split("|");else if(r.startsWith(n)&&r.endsWith(i))a=r.slice(n.length,-i.length).split("--");else return r;let[l,...c]=a;return l==="preset"?Tpe(e,t,r,c):l==="custom"?Ppe(e,t,r,c):r}function Fy(e,t,r,o=!0){let n=t?"."+t:"",i=r?`styles.blocks.${r}${n}`:`styles${n}`;if(!e)return;let a=Pt(e,i);return o?iw(e,r,a):a}function Dy(e,t,r,o){let n=t?"."+t:"",i=o?`styles.blocks.${o}${n}`:`styles${n}`;return Su(e,i.split("."),r)}var bI=s(yI(),1);function pf(e,t){return typeof e!="object"||typeof t!="object"?e===t:(0,bI.default)(e?.styles,t?.styles)&&(0,bI.default)(e?.settings,t?.settings)}var x8=s(sw(),1);function _8(e){return Object.prototype.toString.call(e)==="[object Object]"}function w8(e){var t,r;return _8(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(_8(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}function go(e,t){return(0,x8.default)(e,t,{isMergeableObject:w8,customMerge:r=>{if(r==="backgroundImage")return(o,n)=>n??o}})}function C8(e,t){var r=0,o,n;t=t||{};function i(){var a=o,l=arguments.length,c,u;e:for(;a;){if(a.args.length!==arguments.length){a=a.next;continue}for(u=0;u<l;u++)if(a.args[u]!==arguments[u]){a=a.next;continue e}return a!==o&&(a===n&&(n=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=o,a.prev=null,o.prev=a,o=a),a.val}for(c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return a={args:c,val:e.apply(null,c)},o?(o.prev=a,a.next=o):n=a,r===t.maxSize?(n=n.prev,n.next=null):r++,o=a,a.val}return i.clear=function(){o=null,n=null,r=0},i}var mt=s(E(),1),T8=s(Xe(),1),aw=new Map,jpe=[],SI={caption:(0,mt.__)("Caption"),link:(0,mt.__)("Link"),button:(0,mt.__)("Button"),heading:(0,mt.__)("Heading"),h1:(0,mt.__)("H1"),h2:(0,mt.__)("H2"),h3:(0,mt.__)("H3"),h4:(0,mt.__)("H4"),h5:(0,mt.__)("H5"),h6:(0,mt.__)("H6"),"settings.color":(0,mt.__)("Color"),"settings.typography":(0,mt.__)("Typography"),"settings.shadow":(0,mt.__)("Shadow"),"settings.layout":(0,mt.__)("Layout"),"styles.color":(0,mt.__)("Colors"),"styles.spacing":(0,mt.__)("Spacing"),"styles.background":(0,mt.__)("Background"),"styles.typography":(0,mt.__)("Typography")},zpe=C8(()=>(0,T8.getBlockTypes)().reduce((e,{name:t,title:r})=>(e[t]=r,e),{})),lw=e=>e!==null&&typeof e=="object";function Upe(e){if(SI[e])return SI[e];let t=e.split(".");if(t?.[0]==="blocks")return zpe()?.[t[1]]||t[1];if(t?.[0]==="elements")return SI[t[1]]||t[1]}function P8(e,t,r=""){if(!lw(e)&&!lw(t))return e!==t?r.split(".").slice(0,2).join("."):void 0;e=lw(e)?e:{},t=lw(t)?t:{};let o=new Set([...Object.keys(e),...Object.keys(t)]),n=[];for(let i of o){let a=r?r+"."+i:i,l=P8(e[i],t[i],a);l&&(n=n.concat(l))}return n}function Hpe(e,t){let r=JSON.stringify({next:e,previous:t});if(aw.has(r))return aw.get(r);let o=P8({styles:{background:e?.styles?.background,color:e?.styles?.color,typography:e?.styles?.typography,spacing:e?.styles?.spacing},blocks:e?.styles?.blocks,elements:e?.styles?.elements,settings:e?.settings},{styles:{background:t?.styles?.background,color:t?.styles?.color,typography:t?.styles?.typography,spacing:t?.styles?.spacing},blocks:t?.styles?.blocks,elements:t?.styles?.elements,settings:t?.settings});if(!o||Array.isArray(o)&&!o.length)return aw.set(r,[]),[];let n=Array.isArray(o)?o:[o],i=[...new Set(n)].reduce((a,l)=>{let c=Upe(l);return c&&a.push([l.split(".")[0],c]),a},[]);return aw.set(r,i),i}function My(e,t,r={}){let o=Hpe(e,t),n=o.length,{maxResults:i}=r;return n?(i&&n>i&&(o=o.slice(0,i)),Object.entries(o.reduce((a,l)=>{let c=a[l[0]]||[];return c.includes(l[1])||(a[l[0]]=[...c,l[1]]),a},{})).map(([a,l])=>{let c=l.length,u=l.join((0,mt.__)(", "));switch(a){case"blocks":return(0,mt.sprintf)((0,mt._n)("%s block.","%s blocks.",c),u);case"elements":return(0,mt.sprintf)((0,mt._n)("%s element.","%s elements.",c),u);case"settings":return(0,mt.sprintf)((0,mt.__)("%s settings."),u);case"styles":return(0,mt.sprintf)((0,mt.__)("%s styles."),u);default:return(0,mt.sprintf)((0,mt.__)("%s."),u)}})):jpe}var en=s(Xe(),1),Vy=s(hI(),1),G8=s(O(),1);function Op(e,t="root",r={}){if(!t)return null;let{fallback:o=!1}=r,{name:n,selectors:i,supports:a}=e,l=i&&Object.keys(i).length>0,c=Array.isArray(t)?t.join("."):t,u=null;if(l&&i.root?u=i?.root:a?.__experimentalSelector?u=a.__experimentalSelector:u=".wp-block-"+n.replace("core/","").replace("/","-"),c==="root")return u;let d=Array.isArray(t)?t:t.split(".");if(d.length===1){let m=o?u:null;if(l)return Pt(i,`${c}.root`,null)||Pt(i,c,null)||m;let h=a?Pt(a,`${c}.__experimentalSelector`,null):void 0;return h?Us(u,h):m}let f;return l&&(f=Pt(i,c,null)),f||(o?Op(e,d[0],r):null)}var Gpe={grad:.9,turn:360,rad:360/(2*Math.PI)},Wl=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},vo=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},es=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},F8=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},k8=function(e){return{r:es(e.r,0,255),g:es(e.g,0,255),b:es(e.b,0,255),a:es(e.a)}},_I=function(e){return{r:vo(e.r),g:vo(e.g),b:vo(e.b),a:vo(e.a,3)}},Wpe=/^#([0-9a-f]{3,8})$/i,cw=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},D8=function(e){var t=e.r,r=e.g,o=e.b,n=e.a,i=Math.max(t,r,o),a=i-Math.min(t,r,o),l=a?i===t?(r-o)/a:i===r?2+(o-t)/a:4+(t-r)/a:0;return{h:60*(l<0?l+6:l),s:i?a/i*100:0,v:i/255*100,a:n}},B8=function(e){var t=e.h,r=e.s,o=e.v,n=e.a;t=t/360*6,r/=100,o/=100;var i=Math.floor(t),a=o*(1-r),l=o*(1-(t-i)*r),c=o*(1-(1-t+i)*r),u=i%6;return{r:255*[o,l,a,a,c,o][u],g:255*[c,o,o,l,a,a][u],b:255*[a,a,c,o,o,l][u],a:n}},E8=function(e){return{h:F8(e.h),s:es(e.s,0,100),l:es(e.l,0,100),a:es(e.a)}},R8=function(e){return{h:vo(e.h),s:vo(e.s),l:vo(e.l),a:vo(e.a,3)}},A8=function(e){return B8((r=(t=e).s,{h:t.h,s:(r*=((o=t.l)<50?o:100-o)/100)>0?2*r/(o+r)*100:0,v:o+r,a:t.a}));var t,r,o},Ly=function(e){return{h:(t=D8(e)).h,s:(n=(200-(r=t.s))*(o=t.v)/100)>0&&n<200?r*o/100/(n<=100?n:200-n)*100:0,l:n/2,a:t.a};var t,r,o,n},Ype=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,qpe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Zpe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Kpe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,CI={string:[[function(e){var t=Wpe.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?vo(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?vo(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Zpe.exec(e)||Kpe.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:k8({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:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Ype.exec(e)||qpe.exec(e);if(!t)return null;var r,o,n=E8({h:(r=t[1],o=t[2],o===void 0&&(o="deg"),Number(r)*(Gpe[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return A8(n)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,o=e.b,n=e.a,i=n===void 0?1:n;return Wl(t)&&Wl(r)&&Wl(o)?k8({r:Number(t),g:Number(r),b:Number(o),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,r=e.s,o=e.l,n=e.a,i=n===void 0?1:n;if(!Wl(t)||!Wl(r)||!Wl(o))return null;var a=E8({h:Number(t),s:Number(r),l:Number(o),a:Number(i)});return A8(a)},"hsl"],[function(e){var t=e.h,r=e.s,o=e.v,n=e.a,i=n===void 0?1:n;if(!Wl(t)||!Wl(r)||!Wl(o))return null;var a=(function(l){return{h:F8(l.h),s:es(l.s,0,100),v:es(l.v,0,100),a:es(l.a)}})({h:Number(t),s:Number(r),v:Number(o),a:Number(i)});return B8(a)},"hsv"]]},O8=function(e,t){for(var r=0;r<t.length;r++){var o=t[r][0](e);if(o)return[o,t[r][1]]}return[null,void 0]},Xpe=function(e){return typeof e=="string"?O8(e.trim(),CI.string):typeof e=="object"&&e!==null?O8(e,CI.object):[null,void 0]};var wI=function(e,t){var r=Ly(e);return{h:r.h,s:es(r.s+100*t,0,100),l:r.l,a:r.a}},xI=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},I8=function(e,t){var r=Ly(e);return{h:r.h,s:r.s,l:es(r.l+100*t,0,100),a:r.a}},TI=(function(){function e(t){this.parsed=Xpe(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return vo(xI(this.rgba),2)},e.prototype.isDark=function(){return xI(this.rgba)<.5},e.prototype.isLight=function(){return xI(this.rgba)>=.5},e.prototype.toHex=function(){return t=_I(this.rgba),r=t.r,o=t.g,n=t.b,a=(i=t.a)<1?cw(vo(255*i)):"","#"+cw(r)+cw(o)+cw(n)+a;var t,r,o,n,i,a},e.prototype.toRgb=function(){return _I(this.rgba)},e.prototype.toRgbString=function(){return t=_I(this.rgba),r=t.r,o=t.g,n=t.b,(i=t.a)<1?"rgba("+r+", "+o+", "+n+", "+i+")":"rgb("+r+", "+o+", "+n+")";var t,r,o,n,i},e.prototype.toHsl=function(){return R8(Ly(this.rgba))},e.prototype.toHslString=function(){return t=R8(Ly(this.rgba)),r=t.h,o=t.s,n=t.l,(i=t.a)<1?"hsla("+r+", "+o+"%, "+n+"%, "+i+")":"hsl("+r+", "+o+"%, "+n+"%)";var t,r,o,n,i},e.prototype.toHsv=function(){return t=D8(this.rgba),{h:vo(t.h),s:vo(t.s),v:vo(t.v),a:vo(t.a,3)};var t},e.prototype.invert=function(){return xr({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),xr(wI(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),xr(wI(this.rgba,-t))},e.prototype.grayscale=function(){return xr(wI(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),xr(I8(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),xr(I8(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?xr({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):vo(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=Ly(this.rgba);return typeof t=="number"?xr({h:t,s:r.s,l:r.l,a:r.a}):vo(r.h)},e.prototype.isEqual=function(t){return this.toHex()===xr(t).toHex()},e})(),xr=function(e){return e instanceof TI?e:new TI(e)},N8=[],uw=function(e){e.forEach(function(t){N8.indexOf(t)<0&&(t(TI,CI),N8.push(t))})};function Qpe(e=[]){let t={r:[],g:[],b:[],a:[]};return e.forEach(r=>{let o=xr(r).toRgb();t.r.push(o.r/255),t.g.push(o.g/255),t.b.push(o.b/255),t.a.push(o.a)}),t}function M8(e,t){let r=Qpe(t);return`
<svg
	xmlns:xlink="http://www.w3.org/1999/xlink"
	viewBox="0 0 0 0"
	width="0"
	height="0"
	focusable="false"
	role="none"
	aria-hidden="true"
	style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
>
	<defs>
		<filter id="${e}">
			<!--
				Use sRGB instead of linearRGB so transparency looks correct.
				Use perceptual brightness to convert to grayscale.
			-->
			<feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix>
			<!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. -->
			<feComponentTransfer color-interpolation-filters="sRGB">
				<feFuncR type="table" tableValues="${r.r.join(" ")}"></feFuncR>
				<feFuncG type="table" tableValues="${r.g.join(" ")}"></feFuncG>
				<feFuncB type="table" tableValues="${r.b.join(" ")}"></feFuncB>
				<feFuncA type="table" tableValues="${r.a.join(" ")}"></feFuncA>
			</feComponentTransfer>
			<!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. -->
			<feComposite in2="SourceGraphic" operator="in"></feComposite>
		</filter>
	</defs>
</svg>`}function Yl(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([0-9])([a-zA-Z])/g,"$1-$2").replace(/([a-zA-Z])([0-9])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function PI(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function Jpe(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function kI(e,t="0"){let r=Jpe(e);if(!r)return null;let o=PI(r?.top)||t,n=PI(r?.left)||t;return o===n?o:`${o} ${n}`}var L8={backgroundSize:"cover",backgroundPosition:"50% 50%"};function V8(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:L8.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:L8.backgroundPosition}),t}var j8={default:{name:"default",slug:"flow",className:"is-layout-flow",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},constrained:{name:"constrained",slug:"constrained",className:"is-layout-constrained",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > :where(:not(.alignleft):not(.alignright):not(.alignfull))",rules:{"max-width":"var(--wp--style--global--content-size)","margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > .alignwide",rules:{"max-width":"var(--wp--style--global--wide-size)"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},flex:{name:"flex",slug:"flex",className:"is-layout-flex",displayMode:"flex",baseStyles:[{selector:"",rules:{"flex-wrap":"wrap","align-items":"center"}},{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}};var $pe={button:"wp-element-button",caption:"wp-element-caption"},ehe={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"};function the(e={},t){return Rp.reduce((r,{path:o,valueKey:n,valueFunc:i,cssVarInfix:a})=>{let l=Pt(e,o,[]);return["default","theme","custom"].forEach(c=>{l[c]&&l[c].forEach(u=>{n&&!i?r.push(`--wp--preset--${a}--${Yl(u.slug)}: ${u[n]}`):i&&typeof i=="function"&&r.push(`--wp--preset--${a}--${Yl(u.slug)}: ${i(u,t)}`)})}),r},[])}function rhe(e="*",t={}){return Rp.reduce((r,{path:o,cssVarInfix:n,classes:i})=>{if(!i)return r;let a=Pt(t,o,[]);return["default","theme","custom"].forEach(l=>{a[l]&&a[l].forEach(({slug:c})=>{i.forEach(({classSuffix:u,propertyName:d})=>{let f=`.has-${Yl(c)}-${u}`,m=e.split(",").map(g=>`${g}${f}`).join(","),h=`var(--wp--preset--${n}--${Yl(c)})`;r+=`${m}{${d}: ${h} !important;}`})})}),r},"")}function ohe(e={}){return Rp.filter(t=>t.path.at(-1)==="duotone").flatMap(t=>{let r=Pt(e,t.path,{});return["default","theme"].filter(o=>r[o]).flatMap(o=>r[o].map(n=>M8(`wp-duotone-${n.slug}`,n.colors))).join("")})}function W8(e={},t,r){let o=[];return Object.keys(e).forEach(n=>{let i=t+Yl(n.replace("/","-")),a=e[n];if(a instanceof Object){let l=i+r;o=[...o,...W8(a,l,r)]}else o.push(`${i}: ${a}`)}),o}function nhe(e,t){let r=e.split(","),o=[];return r.forEach(n=>{o.push(`${t.trim()}${n.trim()}`)}),o.join(", ")}var z8=(e,t,r)=>{if(r!=="core/paragraph"||(t?.blocks?.["core/paragraph"]?.typography?.textIndent??t?.typography?.textIndent??"subsequent")!=="all")return e;let i=".wp-block-paragraph + .wp-block-paragraph",a=".wp-block-paragraph";if(i in e){let l=e[i],c={...e};return delete c[i],c[a]=l,c}return e},U8=(e,t)=>{let r={};return Object.entries(e).forEach(([o,n])=>{if(o==="root"||!t?.[o])return;let i=typeof n=="string";if(!i&&typeof n=="object"&&n!==null&&Object.entries(n).forEach(([a,l])=>{if(a==="root"||!t?.[o][a])return;let c={[o]:{[a]:t[o][a]}},u=Ip(c);r[l]=[...r[l]||[],...u],delete t[o][a]}),i||typeof n=="object"&&n!==null&&"root"in n){let a=i?n:n.root,l={[o]:t[o]},c=Ip(l);r[a]=[...r[a]||[],...c],delete t[o]}}),r};function Ip(e={},t="",r,o={},n=!1){let i=Ra===t,a=Object.entries(en.__EXPERIMENTAL_STYLE_PROPERTY).reduce((c,[u,{value:d,properties:f,useEngine:m,rootOnly:h}])=>{if(h&&!i)return c;let g=d;if(g[0]==="elements"||m)return c;let v=Pt(e,g);if(u==="--wp--style--root--padding"&&(typeof v=="string"||!r))return c;if(f&&typeof v!="string")Object.entries(f).forEach(y=>{let[b,_]=y;if(!Pt(v,[_],!1))return;let S=b.startsWith("--")?b:Yl(b);c.push(`${S}: ${(0,Vy.getCSSValueFromRawStyle)(Pt(v,[_]))}`)});else if(Pt(e,g,!1)){let y=u.startsWith("--")?u:Yl(u);c.push(`${y}: ${(0,Vy.getCSSValueFromRawStyle)(Pt(e,g))}`)}return c},[]);return e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=vI(e.background.backgroundImage,o)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...V8(e.background)}})),(0,Vy.getCSSRules)(e).forEach(c=>{if(i&&(r||n)&&c.key.startsWith("padding"))return;let u=c.key.startsWith("--")?c.key:Yl(c.key),d=vI(c.value,o);u==="font-size"&&(d=nw({name:"",slug:"",size:d},o?.settings)),u==="aspect-ratio"&&a.push("min-height: unset"),a.push(`${u}: ${d}`)}),a}function H8({layoutDefinitions:e=j8,style:t,selector:r,hasBlockGapSupport:o,hasFallbackGapSupport:n,fallbackGapValue:i}){let a="",l=o?kI(t?.spacing?.blockGap):"";if(n&&(r===Ra?l=l||"0.5em":!o&&i&&(l=i)),l&&e&&(Object.values(e).forEach(({className:c,name:u,spacingStyles:d})=>{!o&&u!=="flex"&&u!=="grid"||d?.length&&d.forEach(f=>{let m=[];if(f.rules&&Object.entries(f.rules).forEach(([h,g])=>{m.push(`${h}: ${g||l}`)}),m.length){let h="";o?h=r===Ra?`:root :where(.${c})${f?.selector||""}`:`:root :where(${r}-${c})${f?.selector||""}`:h=r===Ra?`:where(.${c}${f?.selector||""})`:`:where(${r}.${c}${f?.selector||""})`,a+=`${h} { ${m.join("; ")}; }`}})}),r===Ra&&o&&(a+=`${Ny} { --wp--style--block-gap: ${l}; }`)),r===Ra&&e){let c=["block","flex","grid"];Object.values(e).forEach(({className:u,displayMode:d,baseStyles:f})=>{d&&c.includes(d)&&(a+=`${r} .${u} { display:${d}; }`),f?.length&&f.forEach(m=>{let h=[];if(m.rules&&Object.entries(m.rules).forEach(([g,v])=>{h.push(`${g}: ${v}`)}),h.length){let g=`.${u}${m?.selector||""}`;a+=`${g} { ${h.join("; ")}; }`}})})}return a}var ihe=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function dw(e){if(!e)return{};let o=Object.entries(e).filter(([n])=>ihe.includes(n)).map(([n,i])=>[n,JSON.parse(JSON.stringify(i))]);return Object.fromEntries(o)}var she=(e,t)=>{let r=[];if(!e?.styles)return r;let o=dw(e.styles);return o&&r.push({styles:o,selector:Ra,skipSelectorWrapper:!0}),Object.entries(en.__EXPERIMENTAL_ELEMENTS).forEach(([n,i])=>{e.styles?.elements?.[n]&&r.push({styles:e.styles?.elements?.[n]??{},selector:i,skipSelectorWrapper:!$pe[n]})}),Object.entries(e.styles?.blocks??{}).forEach(([n,i])=>{let a=dw(i),l=i,c=[];if(l?.variations){let u={};Object.entries(l.variations).forEach(([d,f])=>{let m=f;u[d]=dw(m),m?.css&&(u[d].css=m.css);let h=typeof t!="string"?t[n]?.styleVariationSelectors?.[d]:void 0;Object.entries(m?.elements??{}).forEach(([g,v])=>{v&&en.__EXPERIMENTAL_ELEMENTS[g]&&c.push({styles:v,selector:Us(h,en.__EXPERIMENTAL_ELEMENTS[g])})}),Object.entries(m?.blocks??{}).forEach(([g,v])=>{let y=typeof t!="string"?Us(h,t[g]?.selector):void 0,b=typeof t!="string"?Us(h,t[g]?.duotoneSelector):void 0,_=typeof t!="string"?m8(h,t[g]?.featureSelectors??{}):void 0,S=dw(v);v?.css&&(S.css=v.css),!(!y||typeof t=="string")&&(c.push({selector:y,duotoneSelector:b,featureSelectors:_,fallbackGapValue:t[g]?.fallbackGapValue,hasLayoutSupport:t[g]?.hasLayoutSupport,styles:S}),Object.entries(v.elements??{}).forEach(([x,T])=>{T&&en.__EXPERIMENTAL_ELEMENTS[x]&&c.push({styles:T,selector:Us(y,en.__EXPERIMENTAL_ELEMENTS[x])})}))})}),a.variations=u}typeof t!="string"&&t?.[n]?.selector&&r.push({duotoneSelector:t[n].duotoneSelector,fallbackGapValue:t[n].fallbackGapValue,hasLayoutSupport:t[n].hasLayoutSupport,selector:t[n].selector,styles:a,featureSelectors:t[n].featureSelectors,styleVariationSelectors:t[n].styleVariationSelectors,name:n}),Object.entries(l?.elements??{}).forEach(([u,d])=>{typeof t!="string"&&d&&t?.[n]&&en.__EXPERIMENTAL_ELEMENTS[u]&&r.push({styles:d,selector:t[n]?.selector.split(",").map(f=>en.__EXPERIMENTAL_ELEMENTS[u].split(",").map(h=>f+" "+h)).join(",")})}),r.push(...c)}),r},RI=(e,t)=>{let r=[];if(!e?.settings)return r;let o=a=>{let l={};return Rp.forEach(({path:c})=>{let u=Pt(a,c,!1);u!==!1&&(l=Su(l,c,u))}),l},n=o(e.settings),i=e.settings?.custom;return(Object.keys(n).length>0||i)&&r.push({presets:n,custom:i,selector:Ny}),Object.entries(e.settings?.blocks??{}).forEach(([a,l])=>{let c=l.custom;if(typeof t=="string"||!t[a])return;let u=o(l);(Object.keys(u).length>0||c)&&r.push({presets:u,custom:c,selector:t[a]?.selector})}),r},ahe=(e,t)=>{let r=RI(e,t),o="";return r.forEach(({presets:n,custom:i,selector:a})=>{let l=e?.settings?the(n,e?.settings):[],c=W8(i,"--wp--custom--","--");c.length>0&&l.push(...c),l.length>0&&(o+=`${a}{${l.join(";")};}`)}),o},lhe=(e,t,r,o,n=!1,i=!1,a={})=>{let l={blockGap:!0,blockStyles:!0,layoutStyles:!0,marginReset:!0,presets:!0,rootPadding:!0,variationStyles:!1,...a},c=she(e,t),u=RI(e,t),d=e?.settings?.useRootPaddingAwareAlignments,{contentSize:f,wideSize:m}=e?.settings?.layout||{},h=l.marginReset||l.rootPadding||l.layoutStyles,g="";if(l.presets&&(f||m)&&(g+=`${Ny} {`,g=f?g+` --wp--style--global--content-size: ${f};`:g,g=m?g+` --wp--style--global--wide-size: ${m};`:g,g+="}"),h&&(g+=":where(body) {margin: 0;",l.rootPadding&&d&&(g+=`padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }
				.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
				.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;
				`),g+="}"),l.blockStyles&&c.forEach(({selector:v,duotoneSelector:y,styles:b,fallbackGapValue:_,hasLayoutSupport:S,featureSelectors:x,styleVariationSelectors:T,skipSelectorWrapper:R,name:F})=>{if(x){let L=U8(x,b);L=z8(L,e.settings,F),Object.entries(L).forEach(([M,k])=>{if(k.length){let I=k.join(";");g+=`:root :where(${M}){${I};}`}})}if(y){let L={};b?.filter&&(L.filter=b.filter,delete b.filter);let M=Ip(L);M.length&&(g+=`${y}{${M.join(";")};}`)}!n&&(Ra===v||S)&&(g+=H8({style:b,selector:v,hasBlockGapSupport:r,hasFallbackGapSupport:o,fallbackGapValue:_}));let B=Ip(b,v,d,e,i);if(B?.length){let L=R?v:`:root :where(${v})`;g+=`${L}{${B.join(";")};}`}b?.css&&(g+=EI(b.css,`:root :where(${v})`)),l.variationStyles&&T&&Object.entries(T).forEach(([L,M])=>{let k=b?.variations?.[L];if(k){if(x){let U=U8(x,k);U=z8(U,e.settings,F),Object.entries(U).forEach(([G,Y])=>{if(Y.length){let Z=nhe(G,M),V=Y.join(";");g+=`:root :where(${Z}){${V};}`}})}let I=Ip(k,M,d,e);if(I.length&&(g+=`:root :where(${M}){${I.join(";")};}`),k?.css&&(g+=EI(k.css,`:root :where(${M})`)),S&&k?.spacing?.blockGap){let U=M+v;g+=H8({style:k,selector:U,hasBlockGapSupport:!0,hasFallbackGapSupport:o,fallbackGapValue:_})}}});let z=Object.entries(b).filter(([L])=>L.startsWith(":"));z?.length&&z.forEach(([L,M])=>{let k=Ip(M);if(!k?.length)return;let U=`:root :where(${v.split(",").map(G=>G+L).join(",")}){${k.join(";")};}`;g+=U})}),l.layoutStyles&&(g=g+".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",g=g+".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",g=g+".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),l.blockGap&&r){let v=kI(e?.styles?.spacing?.blockGap)||"0.5em";g=g+`:root :where(.wp-site-blocks) > * { margin-block-start: ${v}; margin-block-end: 0; }`,g=g+":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",g=g+":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return l.presets&&u.forEach(({selector:v,presets:y})=>{(Ra===v||Ny===v)&&(v="");let b=rhe(v,y);b.length>0&&(g+=b)}),g};function che(e,t){return RI(e,t).flatMap(({presets:o})=>ohe(o))}var uhe=(e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;let r={root:t};return Object.entries(ehe).forEach(([o,n])=>{let i=Op(e,o);i&&(r[n]=i)}),r},dhe=(e,t)=>{let{getBlockStyles:r}=(0,G8.select)(en.store),o={};return e.forEach(n=>{let i=n.name,a=Op(n);if(!a)return;let l=Op(n,"filter.duotone");if(!l){let h=Op(n),g=(0,en.getBlockSupport)(n,"color.__experimentalDuotone",!1);l=g&&h&&Us(h,g)}let c=!!n?.supports?.layout||!!n?.supports?.__experimentalLayout,u=n?.supports?.spacing?.blockGap?.__experimentalDefault,d=r(i),f={};d?.forEach(h=>{let g=t?`-${t}`:"",v=`${h.name}${g}`,y=h8(v,a);f[v]=y});let m=uhe(n,a);o[i]={duotoneSelector:l??void 0,fallbackGapValue:u,featureSelectors:Object.keys(m).length?m:void 0,hasLayoutSupport:c,name:i,selector:a,styleVariationSelectors:d?.length?f:void 0}}),o};function fhe(e){let t=e.styles?.blocks,r=t?.["core/separator"];return r&&r.color?.background&&!r.color?.text&&!r.border?.color?{...e,styles:{...e.styles,blocks:{...t,"core/separator":{...r,color:{...r.color,text:r.color?.background}}}}}:e}function EI(e,t){let r="";return!e||e.trim()===""||e.split("&").forEach(n=>{if(!n||n.trim()==="")return;if(!n.includes("{"))r+=`:root :where(${t}){${n.trim()}}`;else{let a=n.replace("}","").split("{");if(a.length!==2)return;let[l,c]=a,u=l.match(/([>+~\s]*::[a-zA-Z-]+)/),d=u?u[1]:"",f=u?l.replace(d,"").trim():l.trim(),m;f===""?m=t:m=l.startsWith(" ")?Us(t,f):p8(t,f),r+=`:root :where(${m})${d}{${c.trim()}}`}}),r}function jy(e={},t=[],r={}){let{hasBlockGapSupport:o,hasFallbackGapSupport:n,disableLayoutStyles:i=!1,disableRootPadding:a=!1,styleOptions:l={}}=r,c=t.length>0?t:(0,en.getBlockTypes)(),u=mf(e,"spacing.blockGap"),d=o??u!==null,f=n??!d;if(!e?.styles||!e?.settings)return[[],{}];let m=fhe(e),h=dhe(c),g=ahe(m,h),v=lhe(m,h,d,f,i,a,l),y=che(m,h),b=[{css:g,isGlobalStyles:!0},{css:v,isGlobalStyles:!0},{css:m?.styles?.css??"",isGlobalStyles:!0},{assets:y,__unstableType:"svg",isGlobalStyles:!0}];return c.forEach(_=>{let S=m?.styles?.blocks?.[_.name];if(S?.css){let x=h[_.name].selector;b.push({css:EI(S.css,x),isGlobalStyles:!0})}}),[b,m.settings]}var{cleanEmptyObject:AI}=N(Y8.privateApis);function mhe(){let{globalStylesId:e,isReady:t,settings:r,styles:o,_links:n}=(0,Fp.useSelect)(u=>{let{getEntityRecord:d,getEditedEntityRecord:f,hasFinishedResolution:m,canUser:h}=u(Np.store),g=u(Np.store).__experimentalGetCurrentGlobalStylesId(),v,y=g?h("update",{kind:"root",name:"globalStyles",id:g}):null;g&&typeof y=="boolean"&&(y?v=f("root","globalStyles",g):v=d("root","globalStyles",g,{context:"view"}));let b=!1;return m("__experimentalGetCurrentGlobalStylesId")&&(g?b=y?m("getEditedEntityRecord",["root","globalStyles",g]):m("getEntityRecord",["root","globalStyles",g,{context:"view"}]):b=!0),{globalStylesId:g,isReady:b,settings:v?.settings,styles:v?.styles,_links:v?._links}},[]),{getEditedEntityRecord:i}=(0,Fp.useSelect)(Np.store),{editEntityRecord:a}=(0,Fp.useDispatch)(Np.store),l=(0,Dp.useMemo)(()=>({settings:r??{},styles:o??{},_links:n??{}}),[r,o,n]),c=(0,Dp.useCallback)((u,d={})=>{let f=i("root","globalStyles",e),m={styles:f?.styles??{},settings:f?.settings??{},_links:f?._links??{}},h=typeof u=="function"?u(m):u;a("root","globalStyles",e,{styles:AI(h.styles)||{},settings:AI(h.settings)||{},_links:AI(h._links)||{}},d)},[e,a,i]);return[t,l,c]}function phe(){let e=(0,Fp.useSelect)(t=>t(Np.store).__experimentalGetCurrentThemeBaseGlobalStyles(),[]);return[!!e,e]}function fw(){let[e,t,r]=mhe(),[o,n]=phe(),i=(0,Dp.useMemo)(()=>!n||!t?{}:go(n,t),[t,n]);return(0,Dp.useMemo)(()=>({isReady:e&&o,user:t,base:n,merged:i,setUserConfig:r}),[i,t,n,r,e,o])}var q8={};function hhe(e){let{RECEIVE_INTERMEDIATE_RESULTS:t}=N(Ai.privateApis),{getEntityRecords:r}=e(Ai.store);return r("postType","wp_block",{per_page:-1,[t]:!0})}var ghe=["__experimentalBlockBindingsSupportedAttributes","__experimentalBlockDirectory","__experimentalDiscussionSettings","__experimentalFeatures","__experimentalGlobalStylesBaseStyles","allImageSizes","alignWide","blockInspectorTabs","maxUploadFileSize","allowedMimeTypes","bodyPlaceholder","canEditCSS","canLockBlocks","canUpdateBlockBindings","capabilities","clearBlockSelection","codeEditingEnabled","colors","disableContentOnlyForUnsyncedPatterns","disableCustomColors","disableCustomFontSizes","disableCustomSpacingSizes","disableCustomGradients","disableLayoutStyles","enableCustomLineHeight","enableCustomSpacing","enableCustomUnits","enableOpenverseMediaCategory","fontSizes","gradients","generateAnchors","onNavigateToEntityRecord","imageDefaultSize","imageDimensions","imageEditing","imageSizes","isPreviewMode","isRTL","locale","maxWidth","postContentAttributes","postsPerPage","readOnly","styles","titlePlaceholder","supportsLayout","widgetTypesToHideFromLegacyWidgetBlock","__unstableHasCustomAppender","__unstableResolvedAssets","__unstableIsBlockBasedTheme"],{globalStylesDataKey:vhe,globalStylesLinksDataKey:yhe,selectBlockPatternsKey:bhe,reusableBlocksSelectKey:She,sectionRootClientIdKey:_he,mediaEditKey:whe,getMediaSelectKey:xhe,isIsolatedEditorKey:Che,deviceTypeKey:The,isNavigationOverlayContextKey:Phe,mediaUploadOnSuccessKey:khe}=N(mw.privateApis);function Ehe(e,t,r,o){let n=(0,X8.useViewportMatch)("medium"),{allImageSizes:i,bigImageSizeThreshold:a,allowRightClickOverrides:l,blockTypes:c,focusMode:u,hasFixedToolbar:d,isDistractionFree:f,keepCaretInsideBlock:m,hasUploadPermissions:h,hiddenBlockTypes:g,canUseUnfilteredHTML:v,userCanCreatePages:y,pageOnFront:b,pageForPosts:_,userPatternCategories:S,restBlockPatternCategories:x,sectionRootClientId:T,deviceType:R,isNavigationOverlayContext:F,isRevisionsMode:B}=(0,Bp.useSelect)(ne=>{let{canUser:ue,getRawEntityRecord:Ye,getEntityRecord:ye,getUserPatternCategories:oe,getBlockPatternCategories:ge}=ne(Ai.store),{get:Re}=ne(K8.store),{getBlockTypes:ze}=ne(Q8.store),{getDeviceType:Ve,isRevisionsMode:tt}=N(ne(w)),{getBlocksByName:vt,getBlockAttributes:le}=ne(mw.store),J=ue("read",{kind:"root",name:"site"})?ye("root","site"):void 0,ie=ye("root","__unstableBase");function ee(){return o==="template-locked"?vt("core/post-content")?.[0]??"":vt("core/group").find(se=>le(se)?.tagName==="main")??""}return{allImageSizes:ie?.image_sizes,bigImageSizeThreshold:ie?.image_size_threshold,allowRightClickOverrides:Re("core","allowRightClickOverrides"),blockTypes:ze(),canUseUnfilteredHTML:Ye("postType",t,r)?._links?.hasOwnProperty("wp:action-unfiltered-html"),focusMode:Re("core","focusMode"),hasFixedToolbar:Re("core","fixedToolbar")||!n,hiddenBlockTypes:Re("core","hiddenBlockTypes"),isDistractionFree:Re("core","distractionFree"),keepCaretInsideBlock:Re("core","keepCaretInsideBlock"),hasUploadPermissions:ue("create",{kind:"postType",name:"attachment"})??!0,userCanCreatePages:ue("create",{kind:"postType",name:"page"}),pageOnFront:J?.page_on_front,pageForPosts:J?.page_for_posts,userPatternCategories:oe(),restBlockPatternCategories:ge(),sectionRootClientId:ee(),deviceType:Ve(),isNavigationOverlayContext:t==="wp_template_part"&&r?ye("postType","wp_template_part",r)?.area==="navigation-overlay":!1,isRevisionsMode:tt()}},[t,r,n,o]),{merged:z}=fw(),L=z.styles??q8,M=z._links??q8,k=e.__experimentalAdditionalBlockPatterns??e.__experimentalBlockPatterns,I=e.__experimentalAdditionalBlockPatternCategories??e.__experimentalBlockPatternCategories,U=(0,hf.useMemo)(()=>[...k||[]].filter(({postTypes:ne})=>!ne||Array.isArray(ne)&&ne.includes(t)),[k,t]),G=(0,hf.useMemo)(()=>[...I||[],...x||[]].filter((ne,ue,Ye)=>ue===Ye.findIndex(ye=>ne.name===ye.name)),[I,x]),{undo:Y,setIsInserterOpened:Z}=(0,Bp.useDispatch)(w),{editMediaEntity:V}=N((0,Bp.useDispatch)(Ai.store)),{saveEntityRecord:j}=(0,Bp.useDispatch)(Ai.store),H=(0,hf.useCallback)(ne=>y?j("postType","page",ne):Promise.reject({message:(0,Z8.__)("You do not have permission to create Pages.")}),[j,y]),X=(0,hf.useMemo)(()=>g&&g.length>0?(e.allowedBlockTypes===!0?c.map(({name:ue})=>ue):e.allowedBlockTypes||[]).filter(ue=>!g.includes(ue)):e.allowedBlockTypes,[e.allowedBlockTypes,g,c]),ae=e.focusMode===!1;return(0,hf.useMemo)(()=>{let ne={...Object.fromEntries(Object.entries(e).filter(([ue])=>ghe.includes(ue)).filter(([ue])=>ue!=="onNavigateToEntityRecord")),[vhe]:L,[yhe]:M,allImageSizes:i,bigImageSizeThreshold:a,allowedBlockTypes:X,allowRightClickOverrides:l,focusMode:u&&!ae,hasFixedToolbar:d,isDistractionFree:f,keepCaretInsideBlock:m,onNavigateToEntityRecord:e.onNavigateToEntityRecord,[xhe]:(ue,Ye)=>ue(Ai.store).getEntityRecord("postType","attachment",Ye),[whe]:h?V:void 0,mediaUpload:h?r_:void 0,[khe]:h?i8:void 0,mediaSideload:h?a8:void 0,mediaFinalize:h?c8:void 0,__experimentalBlockPatterns:U,[bhe]:ue=>{let{hasFinishedResolution:Ye,getBlockPatternsForPostType:ye}=N(ue(Ai.store)),oe=ye(t);return Ye("getBlockPatterns")?oe:void 0},[She]:hhe,__experimentalBlockPatternCategories:G,__experimentalUserPatternCategories:S,__experimentalFetchLinkSuggestions:(ue,Ye)=>(0,Ai.__experimentalFetchLinkSuggestions)(ue,Ye,e),inserterMediaCategories:r8,__experimentalFetchRichUrlData:Ai.__experimentalFetchUrlData,__experimentalCanUserUseUnfilteredHTML:v,__experimentalUndo:Y,outlineMode:!f&&t==="wp_template",__experimentalCreatePageEntity:H,__experimentalUserCanCreatePages:y,pageOnFront:b,pageForPosts:_,__experimentalPreferPatternsOnRoot:t==="wp_template",templateLock:t==="wp_navigation"?"insert":e.templateLock,template:t==="wp_navigation"?[["core/navigation",{},[]]]:e.template,__experimentalSetIsInserterOpened:Z,[_he]:T,editorTool:o==="post-only"&&t!=="wp_template"?"edit":void 0,[Che]:["wp_template_part","wp_block","wp_navigation"].includes(t),disableContentOnlyForTemplateParts:o==="template-locked",...R?{[The]:R}:{},[Phe]:F};return B&&(ne.isPreviewMode=!0),ne},[B,X,l,u,ae,d,f,m,e,h,S,U,G,v,Y,H,y,b,_,t,Z,T,L,M,o,V,e.onNavigateToEntityRecord,R,i,a,F])}var J8=Ehe;var zy=s(O(),1),Mp=s($(),1),hw=s(D(),1);var $8=s(D(),1),e7=s(mo(),1),Rhe=["core/post-title","core/post-featured-image","core/post-content"];function pw(){return(0,$8.useMemo)(()=>[...(0,e7.applyFilters)("editor.postContentBlockTypes",Rhe)],[])}function t7(){let e=pw(),{contentOnlyIds:t,templateParts:r}=(0,zy.useSelect)(i=>{let{getPostBlocksByName:a}=N(i(w)),{getBlocksByName:l}=i(Mp.store);return{contentOnlyIds:a(e),templateParts:l("core/template-part")}},[e]),o=(0,zy.useSelect)(i=>{let{getBlockOrder:a}=i(Mp.store);return r.flatMap(l=>a(l))},[r]),n=(0,zy.useRegistry)();return(0,hw.useEffect)(()=>{let{setBlockEditingMode:i,unsetBlockEditingMode:a}=n.dispatch(Mp.store);return i("","disabled"),()=>{a("")}},[n]),(0,hw.useEffect)(()=>{let{setBlockEditingMode:i,unsetBlockEditingMode:a}=n.dispatch(Mp.store);return n.batch(()=>{for(let l of r)i(l,"contentOnly")}),()=>{n.batch(()=>{for(let l of r)a(l)})}},[r,n]),(0,hw.useEffect)(()=>{let{setBlockEditingMode:i,unsetBlockEditingMode:a}=n.dispatch(Mp.store),l=new Set(t);return n.batch(()=>{for(let c of t)i(c,"contentOnly");for(let c of o)l.has(c)||i(c,"disabled")}),()=>{n.batch(()=>{for(let c of t)a(c);for(let c of o)l.has(c)||a(c)})}},[t,o,n]),null}var r7=s(D(),1),gw=s(O(),1),OI=s($(),1);function o7(){let e=(0,gw.useSelect)(o=>o(OI.store).getBlockOrder()?.[0],[]),{setBlockEditingMode:t,unsetBlockEditingMode:r}=(0,gw.useDispatch)(OI.store);(0,r7.useEffect)(()=>{if(e)return t(e,"contentOnly"),()=>{r(e)}},[e,r,t])}var i7=s(D(),1),Lp=s(mo(),1),n7=["wp_block","wp_template","wp_template_part"];function s7(e,t){(0,i7.useEffect)(()=>((0,Lp.addFilter)("blockEditor.__unstableCanInsertBlockType","removeTemplatePartsFromInserter",(r,o)=>!n7.includes(e)&&o.name==="core/template-part"&&t==="post-only"?!1:r),(0,Lp.addFilter)("blockEditor.__unstableCanInsertBlockType","removePostContentFromInserter",(r,o,n,{getBlockParentsByBlockName:i})=>!n7.includes(e)&&o.name==="core/post-content"?i(n,"core/query").length>0:r),()=>{(0,Lp.removeFilter)("blockEditor.__unstableCanInsertBlockType","removeTemplatePartsFromInserter"),(0,Lp.removeFilter)("blockEditor.__unstableCanInsertBlockType","removePostContentFromInserter")}),[e,t])}var _7=s(O(),1),yw=s(D(),1),bw=s(Xe(),1);var h7=s(FI(),1),LI=s(BI(),1),MI=s(f7(),1),vw=s(Xe(),1),oo=s(Wy(),1),tn=s(E(),1);var{parseRawBlock:g7}=N(vw.privateApis);function p7(e){return e==null?"":typeof e=="object"?JSON.stringify(e,null,2):String(e)}function zhe(e,t){if(!e&&!t)return 1;if(!e||!t)return 0;let r=new Intl.Segmenter(void 0,{granularity:"word"}),o=/[\p{L}\p{N}]/u,n=d=>{let f=[];for(let{segment:m,isWordLike:h}of r.segment(d))(h||o.test(m))&&f.push(m);return f},i=n(e),a=n(t);if(i.length===0&&a.length===0)return 1;let l=new Set(i),c=0;for(let d of a)l.has(d)&&c++;let u=Math.max(i.length,a.length);return u>0?c/u:0}function Uhe(e){let t=[],r=[];if(e.forEach((d,f)=>{let m=d.__revisionDiffStatus?.status;m==="removed"?t.push({block:d,index:f}):m==="added"&&r.push({block:d,index:f})}),t.length===0||r.length===0)return e;let o=new Set,n=new Set,i=new Map,a=.5,l=new Map;for(let d of r){let f=d.block.blockName;l.has(f)||l.set(f,[]),l.get(f).push(d)}let c=new Map;for(let d of t){let f=d.block.blockName;c.has(f)||c.set(f,[]),c.get(f).push(d)}let u=-1;for(let d of t){let f=l.get(d.block.blockName)||[],m=c.get(d.block.blockName)||[],h=f.filter(v=>!i.has(v.index)&&v.index>u);if(h.length===0)continue;let g=null;if(m.length===1&&h.length===1){let v=h[0],y=JSON.stringify(d.block.attrs)===JSON.stringify(v.block.attrs);(!((d.block.innerHTML||"")===(v.block.innerHTML||""))||!y)&&(g=v)}else{let v=0;for(let y of h){let b=zhe(d.block.innerHTML||"",y.block.innerHTML||""),_=JSON.stringify(d.block.attrs)===JSON.stringify(y.block.attrs);b>v&&b>a&&(b<1||!_)&&(v=b,g=y)}}if(g){u=g.index;let v={...g.block,__revisionDiffStatus:{status:"modified"},__previousRawBlock:d.block},y=Math.min(d.index,g.index),b=Math.max(d.index,g.index),_=!1;for(let S=y+1;S<b;S++)if(e[S].__revisionDiffStatus?.status==="added"&&!n.has(S)){_=!0;break}_?(i.set(g.index,v),o.add(d.index)):(i.set(d.index,v),n.add(g.index))}}return e.map((d,f)=>o.has(f)||n.has(f)?null:i.has(f)?i.get(f):d).filter(Boolean)}function v7(e,t){let r=u=>JSON.stringify({name:u.blockName,attrs:u.attrs,html:(u.innerContent||[]).filter(d=>d!==null&&d.trim()!=="")}),o=e.map(r),n=t.map(r),i=(0,h7.diffArrays)(n,o),a=[],l=0,c=0;for(let u of i)if(u.added)for(let d=0;d<u.count;d++)a.push({...e[l++],__revisionDiffStatus:{status:"added"}});else if(u.removed)for(let d=0;d<u.count;d++)a.push({...t[c++],__revisionDiffStatus:{status:"removed"}});else for(let d=0;d<u.count;d++){let f=e[l++],m=t[c++],h=v7(f.innerBlocks||[],m.innerBlocks||[]);a.push({...f,innerBlocks:h})}return Uhe(a)}function Hhe(e,t,r,o){let n=e[r]||[],i=t[o]||[];if(n.length!==i.length)return!0;for(let a of n)if(!i.find(c=>c.type===a.type&&JSON.stringify(c.attributes)===JSON.stringify(a.attributes)))return!0;return!1}function Ghe(e,t,r,o){let n=e[r]||[],i=t[o]||[],a=0,l=0,c=0;for(let d of n){let f=i.find(m=>m.type===d.type);f?JSON.stringify(d.attributes)!==JSON.stringify(f.attributes)&&c++:a++}for(let d of i)n.find(m=>m.type===d.type)||l++;if(a>0&&l===0&&c===0)return{type:"added",description:(0,tn.sprintf)((0,tn._n)("%d format added","%d formats added",a),a)};if(l>0&&a===0&&c===0)return{type:"removed",description:(0,tn.sprintf)((0,tn._n)("%d format removed","%d formats removed",l),l)};let u=[];return a>0&&u.push((0,tn.sprintf)((0,tn._n)("%d format added","%d formats added",a),a)),l>0&&u.push((0,tn.sprintf)((0,tn._n)("%d format removed","%d formats removed",l),l)),c>0&&u.push((0,tn.sprintf)((0,tn._n)("%d format changed","%d formats changed",c),c)),{type:"changed",description:u.join(", ")||(0,tn.__)("Formatting changed")}}function Whe(e,t){let r=e.toPlainText(),o=t.toPlainText(),n=(0,LI.diffWords)(o,r),i=(0,oo.create)({text:""}),a=0,l=0;for(let c of n)if(c.removed){let u=(0,oo.slice)(t,l,l+c.value.length),d=(0,oo.applyFormat)(u,{type:"revision/diff-removed",attributes:{title:(0,tn.__)("Removed")}},0,c.value.length);i=(0,oo.concat)(i,d),l+=c.value.length}else if(c.added){let u=(0,oo.slice)(e,a,a+c.value.length),d=(0,oo.applyFormat)(u,{type:"revision/diff-added",attributes:{title:(0,tn.__)("Added")}},0,c.value.length);i=(0,oo.concat)(i,d),a+=c.value.length}else{let u=e.formats||[],d=t.formats||[],f=c.value.length,m=v=>Hhe(u,d,a+v,l+v),h=0,g=m(0);for(let v=1;v<=f;v++){let y=v<f&&m(v);if(v===f||y!==g){let b=(0,oo.slice)(e,a+h,a+v);if(g){let{type:_,description:S}=Ghe(u,d,a+h,l+h),x={added:"revision/diff-format-added",removed:"revision/diff-format-removed",changed:"revision/diff-format-changed"}[_],T=(0,oo.applyFormat)(b,{type:x,attributes:{title:S}},0,v-h);i=(0,oo.concat)(i,T)}else i=(0,oo.concat)(i,b);h=v,g=y}}a+=c.value.length,l+=c.value.length}return new oo.RichTextData(i)}function Yhe(e,t,r){let o=(0,vw.getBlockType)(e.name);if(!o)return;let n={};for(let[i,a]of Object.entries(o.attributes))if(a.source==="rich-text"){let l=e.attributes[i],c=t.attributes[i];l instanceof oo.RichTextData&&c instanceof oo.RichTextData&&(e.attributes[i]=Whe(l,c))}else{let l=p7(e.attributes[i]),c=p7(t.attributes[i]);l!==c&&(n[i]=(0,LI.diffWords)(c,l))}Object.keys(n).length>0&&(r.changedAttributes=n)}function y7(e,t){if(t.__revisionDiffStatus){if(t.__revisionDiffStatus.status==="modified"&&t.__previousRawBlock){let r=g7(t.__previousRawBlock);r&&Yhe(e,r,t.__revisionDiffStatus)}e.__revisionDiffStatus=t.__revisionDiffStatus,e.attributes.__revisionDiffStatus=t.__revisionDiffStatus}if(e.innerBlocks&&t.innerBlocks)for(let r=0;r<e.innerBlocks.length;r++){let o=e.innerBlocks[r],n=t.innerBlocks[r];o&&n&&y7(o,n)}}function b7(e,t){let r=(0,MI.parse)(e||""),o=(0,MI.parse)(t||"");return v7(r,o).map(i=>{let a=g7(i);return a&&y7(a,i),a}).filter(Boolean)}var S7=s(FI(),1);function VI(e,t){if(!t?.length||!e?.length)return e;let r=e.map(c=>c.name),o=t.map(c=>c.name),n=(0,S7.diffArrays)(o,r),i=0,a=0,l=[];for(let c of n)if(c.removed)a+=c.count;else if(c.added)for(let u=0;u<c.count;u++)l.push(e[i++]);else for(let u=0;u<c.count;u++){let d=e[i++],f=t[a++];l.push({...d,clientId:f.clientId,innerBlocks:VI(d.innerBlocks,f.innerBlocks)})}return l}function w7(){let{isInRevisionsMode:e,showDiff:t,revision:r,previousRevision:o,postType:n}=(0,_7.useSelect)(l=>{let{isRevisionsMode:c,isShowingRevisionDiff:u,getCurrentRevision:d,getPreviousRevision:f}=N(l(w)),{getCurrentPostType:m}=l(w),h=c();return{isInRevisionsMode:h,showDiff:u(),revision:h?d():void 0,previousRevision:h?f():void 0,postType:m()}},[]),i=(0,yw.useRef)([]);return(0,yw.useMemo)(()=>{if(!e)return i.current=[],null;if(!r)return[];let l=r?.content?.raw??"",c;if(t){let d=o?.content?.raw||"";c=b7(l,d)}else c=(0,bw.parse)(l);n==="wp_navigation"&&(c=[(0,bw.createBlock)("core/navigation",{templateLock:!1},c)]);let u=VI(c,i.current);return i.current=u,u},[e,r,r?.content?.raw,o?.content?.raw,n,t])}var ti=s(O(),1),$e=s(E(),1);var lb=s(jI(),1),l6=s(lt(),1),U9=s(ct(),1),H9=s($(),1),Yp=s(W(),1);var i6={};Qc(i6,{ActionItem:()=>rs,ComplementaryArea:()=>ql,ComplementaryAreaMoreMenuItem:()=>xu,FullscreenMode:()=>H7,InterfaceSkeleton:()=>ib,PinnedItems:()=>zp,store:()=>Ce});var os=s(A(),1),Ky=s(O(),1),Rw=s(E(),1);var Oa=s(D(),1),HI=s(T7(),1),V7=s(lt(),1),Cu=s(he(),1),j7=s(_u(),1);var O7=s(A(),1),xw=s(O(),1),I7=s(_u(),1);var ww=s(O(),1);var zI={};Qc(zI,{closeModal:()=>rge,disableComplementaryArea:()=>Khe,enableComplementaryArea:()=>Zhe,openModal:()=>tge,pinItem:()=>Xhe,setDefaultComplementaryArea:()=>qhe,setFeatureDefaults:()=>ege,setFeatureValue:()=>$he,toggleFeature:()=>Jhe,unpinItem:()=>Qhe});var _w=s(Yi(),1),ts=s(lt(),1);var Sw=s(Yi(),1);function Aa(e){return["core/edit-post","core/edit-site"].includes(e)?((0,Sw.default)(`${e} interface scope`,{alternative:"core interface scope",hint:"core/edit-post and core/edit-site are merging.",version:"6.6"}),"core"):e}function gf(e,t){return e==="core"&&t==="edit-site/template"?((0,Sw.default)("edit-site/template sidebar",{alternative:"edit-post/document",version:"6.6"}),"edit-post/document"):e==="core"&&t==="edit-site/block-inspector"?((0,Sw.default)("edit-site/block-inspector sidebar",{alternative:"edit-post/block",version:"6.6"}),"edit-post/block"):t}var qhe=(e,t)=>(e=Aa(e),t=gf(e,t),{type:"SET_DEFAULT_COMPLEMENTARY_AREA",scope:e,area:t}),Zhe=(e,t)=>({registry:r,dispatch:o})=>{if(!t)return;e=Aa(e),t=gf(e,t),r.select(ts.store).get(e,"isComplementaryAreaVisible")||r.dispatch(ts.store).set(e,"isComplementaryAreaVisible",!0),o({type:"ENABLE_COMPLEMENTARY_AREA",scope:e,area:t})},Khe=e=>({registry:t})=>{e=Aa(e),t.select(ts.store).get(e,"isComplementaryAreaVisible")&&t.dispatch(ts.store).set(e,"isComplementaryAreaVisible",!1)},Xhe=(e,t)=>({registry:r})=>{if(!t)return;e=Aa(e),t=gf(e,t);let o=r.select(ts.store).get(e,"pinnedItems");o?.[t]!==!0&&r.dispatch(ts.store).set(e,"pinnedItems",{...o,[t]:!0})},Qhe=(e,t)=>({registry:r})=>{if(!t)return;e=Aa(e),t=gf(e,t);let o=r.select(ts.store).get(e,"pinnedItems");r.dispatch(ts.store).set(e,"pinnedItems",{...o,[t]:!1})};function Jhe(e,t){return function({registry:r}){(0,_w.default)("dispatch( 'core/interface' ).toggleFeature",{since:"6.0",alternative:"dispatch( 'core/preferences' ).toggle"}),r.dispatch(ts.store).toggle(e,t)}}function $he(e,t,r){return function({registry:o}){(0,_w.default)("dispatch( 'core/interface' ).setFeatureValue",{since:"6.0",alternative:"dispatch( 'core/preferences' ).set"}),o.dispatch(ts.store).set(e,t,!!r)}}function ege(e,t){return function({registry:r}){(0,_w.default)("dispatch( 'core/interface' ).setFeatureDefaults",{since:"6.0",alternative:"dispatch( 'core/preferences' ).setDefaults"}),r.dispatch(ts.store).setDefaults(e,t)}}function tge(e){return{type:"OPEN_MODAL",name:e}}function rge(){return{type:"CLOSE_MODAL"}}var UI={};Qc(UI,{getActiveComplementaryArea:()=>oge,isComplementaryAreaLoading:()=>nge,isFeatureActive:()=>sge,isItemPinned:()=>ige,isModalActive:()=>age});var Yy=s(O(),1),k7=s(Yi(),1),qy=s(lt(),1);var oge=(0,Yy.createRegistrySelector)(e=>(t,r)=>{r=Aa(r);let o=e(qy.store).get(r,"isComplementaryAreaVisible");if(o!==void 0)return o===!1?null:t?.complementaryAreas?.[r]}),nge=(0,Yy.createRegistrySelector)(e=>(t,r)=>{r=Aa(r);let o=e(qy.store).get(r,"isComplementaryAreaVisible"),n=t?.complementaryAreas?.[r];return o&&n===void 0}),ige=(0,Yy.createRegistrySelector)(e=>(t,r,o)=>(r=Aa(r),o=gf(r,o),e(qy.store).get(r,"pinnedItems")?.[o]??!0)),sge=(0,Yy.createRegistrySelector)(e=>(t,r,o)=>((0,k7.default)("select( 'core/interface' ).isFeatureActive( scope, featureName )",{since:"6.0",alternative:"select( 'core/preferences' ).get( scope, featureName )"}),!!e(qy.store).get(r,o)));function age(e,t){return e.activeModal===t}var E7=s(O(),1);function lge(e={},t){switch(t.type){case"SET_DEFAULT_COMPLEMENTARY_AREA":{let{scope:r,area:o}=t;return e[r]?e:{...e,[r]:o}}case"ENABLE_COMPLEMENTARY_AREA":{let{scope:r,area:o}=t;return{...e,[r]:o}}}return e}function cge(e=null,t){switch(t.type){case"OPEN_MODAL":return t.name;case"CLOSE_MODAL":return null}return e}var R7=(0,E7.combineReducers)({complementaryAreas:lge,activeModal:cge});var A7="core/interface";var Ce=(0,ww.createReduxStore)(A7,{reducer:R7,actions:zI,selectors:UI});(0,ww.register)(Ce);var N7=s(C(),1);function uge(e){return["checkbox","option","radio","switch","menuitemcheckbox","menuitemradio","treeitem"].includes(e)}function jp({as:e=O7.Button,scope:t,identifier:r,icon:o,selectedIcon:n,name:i,shortcut:a,...l}){let c=e,u=(0,I7.usePluginContext)(),d=o||u.icon,f=r||`${u.name}/${i}`,m=(0,xw.useSelect)(v=>v(Ce).getActiveComplementaryArea(t)===f,[f,t]),{enableComplementaryArea:h,disableComplementaryArea:g}=(0,xw.useDispatch)(Ce);return(0,N7.jsx)(c,{icon:n&&m?n:d,"aria-controls":f.replace("/",":"),"aria-checked":uge(l.role)?m:void 0,onClick:()=>{m?g(t):h(t,f)},shortcut:a,...l})}var Cw=s(C(),1),dge=({children:e,className:t,toggleButtonProps:r})=>{let o=(0,Cw.jsx)(jp,{icon:Kn,...r});return(0,Cw.jsxs)("div",{className:re("components-panel__header","interface-complementary-area-header",t),tabIndex:-1,children:[e,o]})},F7=dge;var M7=s(A(),1);var wu=s(A(),1),Tw=s(D(),1),Zy=s(C(),1),D7=()=>{};function fge({name:e,as:t=wu.MenuGroup,fillProps:r={},bubblesVirtually:o,...n}){return(0,Zy.jsx)(wu.Slot,{name:e,bubblesVirtually:o,fillProps:r,children:i=>{if(!Tw.Children.toArray(i).length)return null;let a=[];Tw.Children.forEach(i,({props:{__unstableExplicitMenuItem:c,__unstableTarget:u}})=>{u&&c&&a.push(u)});let l=Tw.Children.map(i,c=>!c.props.__unstableExplicitMenuItem&&a.includes(c.props.__unstableTarget)?null:c);return(0,Zy.jsx)(t,{...n,children:l})}})}function B7({name:e,as:t=wu.Button,onClick:r,...o}){return(0,Zy.jsx)(wu.Fill,{name:e,children:({onClick:n})=>(0,Zy.jsx)(t,{onClick:r||n?(...i)=>{(r||D7)(...i),(n||D7)(...i)}:void 0,...o})})}B7.Slot=fge;var rs=B7;var Pw=s(C(),1),mge=({__unstableExplicitMenuItem:e,__unstableTarget:t,...r})=>(0,Pw.jsx)(M7.MenuItem,{...r});function xu({scope:e,target:t,__unstableExplicitMenuItem:r,...o}){return(0,Pw.jsx)(jp,{as:n=>(0,Pw.jsx)(rs,{__unstableExplicitMenuItem:r,__unstableTarget:`${e}/${t}`,as:mge,name:`${e}/plugin-more-menu`,...n}),role:"menuitemcheckbox",selectedIcon:Pi,name:t,scope:e,...o})}var Ew=s(A(),1),kw=s(C(),1);function L7({scope:e,...t}){return(0,kw.jsx)(Ew.Fill,{name:`PinnedItems/${e}`,...t})}function pge({scope:e,className:t,...r}){return(0,kw.jsx)(Ew.Slot,{name:`PinnedItems/${e}`,...r,children:o=>o?.length>0&&(0,kw.jsx)("div",{className:re(t,"interface-pinned-items"),children:o})})}L7.Slot=pge;var zp=L7;var Wr=s(C(),1),hge=.3;function gge({scope:e,...t}){return(0,Wr.jsx)(os.Slot,{name:`ComplementaryArea/${e}`,...t})}var z7=280,vge={open:{width:z7},closed:{width:0},mobileOpen:{width:"100vw"}};function yge({activeArea:e,isActive:t,scope:r,children:o,className:n,id:i}){let a=(0,Cu.useReducedMotion)(),l=(0,Cu.useViewportMatch)("medium","<"),c=(0,Cu.usePrevious)(e),u=(0,Cu.usePrevious)(t),[,d]=(0,Oa.useState)({});(0,Oa.useEffect)(()=>{d({})},[t]);let f={type:"tween",duration:a||l||c&&e&&e!==c?0:hge,ease:[.6,0,.4,1]};return(0,Wr.jsx)(os.Fill,{name:`ComplementaryArea/${r}`,children:(0,Wr.jsx)(os.__unstableAnimatePresence,{initial:!1,children:(u||t)&&(0,Wr.jsx)(os.__unstableMotion.div,{variants:vge,initial:"closed",animate:l?"mobileOpen":"open",exit:"closed",transition:f,className:"interface-complementary-area__fill",children:(0,Wr.jsx)("div",{id:i,className:n,style:{width:l?"100vw":z7},children:o})})})})}function bge(e,t,r,o,n){let i=(0,Oa.useRef)(!1),a=(0,Oa.useRef)(!1),{enableComplementaryArea:l,disableComplementaryArea:c}=(0,Ky.useDispatch)(Ce);(0,Oa.useEffect)(()=>{o&&n&&!i.current?(c(e),a.current=!0):a.current&&!n&&i.current?(a.current=!1,l(e,t)):a.current&&r&&r!==t&&(a.current=!1),n!==i.current&&(i.current=n)},[o,n,e,t,r,c,l])}function U7({children:e,className:t,closeLabel:r=(0,Rw.__)("Close plugin"),identifier:o,header:n,headerClassName:i,icon:a,isPinnable:l=!0,panelClassName:c,scope:u,name:d,title:f,toggleShortcut:m,isActiveByDefault:h}){let g=(0,j7.usePluginContext)(),v=a||g.icon,y=o||`${g.name}/${d}`,[b,_]=(0,Oa.useState)(!1),{isLoading:S,isActive:x,isPinned:T,activeArea:R,isSmall:F,isLarge:B,showIconLabels:z}=(0,Ky.useSelect)(G=>{let{getActiveComplementaryArea:Y,isComplementaryAreaLoading:Z,isItemPinned:V}=G(Ce),{get:j}=G(V7.store),H=Y(u);return{isLoading:Z(u),isActive:H===y,isPinned:V(u,y),activeArea:H,isSmall:G(HI.store).isViewportMatch("< medium"),isLarge:G(HI.store).isViewportMatch("large"),showIconLabels:j("core","showIconLabels")}},[y,u]),L=(0,Cu.useViewportMatch)("medium","<");bge(u,y,R,x,F);let{enableComplementaryArea:M,disableComplementaryArea:k,pinItem:I,unpinItem:U}=(0,Ky.useDispatch)(Ce);if((0,Oa.useEffect)(()=>{h&&R===void 0&&!F?M(u,y):R===void 0&&F&&k(u,y),_(!0)},[R,h,u,y,F,M,k]),!!b)return(0,Wr.jsxs)(Wr.Fragment,{children:[l&&(0,Wr.jsx)(zp,{scope:u,children:T&&(0,Wr.jsx)(jp,{scope:u,identifier:y,isPressed:x&&(!z||B),"aria-expanded":x,"aria-disabled":S,label:f,icon:z?Pi:v,showTooltip:!z,variant:z?"tertiary":void 0,size:"compact",shortcut:m})}),d&&l&&(0,Wr.jsx)(xu,{target:d,scope:u,icon:v,identifier:y,children:f}),(0,Wr.jsxs)(yge,{activeArea:R,isActive:x,className:re("interface-complementary-area",t),scope:u,id:y.replace("/",":"),children:[(0,Wr.jsx)(F7,{className:i,closeLabel:r,onClose:()=>k(u),toggleButtonProps:{label:r,size:"compact",shortcut:m,scope:u,identifier:y},children:n||(0,Wr.jsxs)(Wr.Fragment,{children:[(0,Wr.jsx)("h2",{className:"interface-complementary-area-header__title",children:f}),l&&!L&&(0,Wr.jsx)(os.Button,{className:"interface-complementary-area__pin-unpin-item",icon:T?GA:UA,label:T?(0,Rw.__)("Unpin from toolbar"):(0,Rw.__)("Pin to toolbar"),onClick:()=>(T?U:I)(u,y),isPressed:T,"aria-expanded":T,size:"compact"})]})}),(0,Wr.jsx)(os.Panel,{className:c,children:e})]})]})}U7.Slot=gge;var ql=U7;var GI=s(D(),1),Sge=({isActive:e})=>((0,GI.useEffect)(()=>{let t=!1;return document.body.classList.contains("sticky-menu")&&(t=!0,document.body.classList.remove("sticky-menu")),()=>{t&&document.body.classList.add("sticky-menu")}},[]),(0,GI.useEffect)(()=>(e?document.body.classList.add("is-fullscreen-mode"):document.body.classList.remove("is-fullscreen-mode"),()=>{e&&document.body.classList.remove("is-fullscreen-mode")}),[e]),null),H7=Sge;var G7=s(D(),1),W7=s(C(),1),Y7=(0,G7.forwardRef)(({children:e,className:t,ariaLabel:r,as:o="div",...n},i)=>(0,W7.jsx)(o,{ref:i,className:re("admin-ui-navigable-region",t),"aria-label":r,role:"region",tabIndex:"-1",...n,children:e}));Y7.displayName="NavigableRegion";var Tu=Y7;var Z7=s(Jn(),1),q7={};function WI(e,t){let r=Z7.useRef(q7);return r.current===q7&&(r.current=e(t)),r}function YI(e,...t){let r=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(o=>r.searchParams.append("args[]",o)),`Base UI error #${e}; visit ${r} for the full message.`}var Aw=s(Jn(),1);function qI(e,t,r,o){let n=WI(X7).current;return _ge(n,e,t,r,o)&&Q7(n,[e,t,r,o]),n.callback}function K7(e){let t=WI(X7).current;return wge(t,e)&&Q7(t,e),t.callback}function X7(){return{callback:null,cleanup:null,refs:[]}}function _ge(e,t,r,o,n){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==o||e.refs[3]!==n}function wge(e,t){return e.refs.length!==t.length||e.refs.some((r,o)=>r!==t[o])}function Q7(e,t){if(e.refs=t,t.every(r=>r==null)){e.callback=null;return}e.callback=r=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),r!=null){let o=Array(t.length).fill(null);for(let n=0;n<t.length;n+=1){let i=t[n];if(i!=null)switch(typeof i){case"function":{let a=i(r);typeof a=="function"&&(o[n]=a);break}case"object":{i.current=r;break}default:}}e.cleanup=()=>{for(let n=0;n<t.length;n+=1){let i=t[n];if(i!=null)switch(typeof i){case"function":{let a=o[n];typeof a=="function"?a():i(null);break}case"object":{i.current=null;break}default:}}}}}}var e9=s(Jn(),1);var J7=s(Jn(),1),xge=parseInt(J7.version,10);function $7(e){return xge>=e}function ZI(e){if(!e9.isValidElement(e))return null;let t=e,r=t.props;return($7(19)?r?.ref:t.ref)??null}function Xy(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function t9(e,t){let r={};for(let o in e){let n=e[o];if(t?.hasOwnProperty(o)){let i=t[o](n);i!=null&&Object.assign(r,i);continue}n===!0?r[`data-${o.toLowerCase()}`]="":n&&(r[`data-${o.toLowerCase()}`]=n.toString())}return r}function r9(e,t){return typeof e=="function"?e(t):e}function o9(e,t){return typeof e=="function"?e(t):e}var Jy={};function Up(e,t,r,o,n){let i={...KI(e,Jy)};return t&&(i=Qy(i,t)),r&&(i=Qy(i,r)),o&&(i=Qy(i,o)),n&&(i=Qy(i,n)),i}function n9(e){if(e.length===0)return Jy;if(e.length===1)return KI(e[0],Jy);let t={...KI(e[0],Jy)};for(let r=1;r<e.length;r+=1)t=Qy(t,e[r]);return t}function Qy(e,t){return i9(t)?t(e):Cge(e,t)}function Cge(e,t){if(!t)return e;for(let r in t){let o=t[r];switch(r){case"style":{e[r]=Xy(e.style,o);break}case"className":{e[r]=XI(e.className,o);break}default:Tge(r,o)?e[r]=Pge(e[r],o):e[r]=o}}return e}function Tge(e,t){let r=e.charCodeAt(0),o=e.charCodeAt(1),n=e.charCodeAt(2);return r===111&&o===110&&n>=65&&n<=90&&(typeof t=="function"||typeof t>"u")}function i9(e){return typeof e=="function"}function KI(e,t){return i9(e)?e(t):e??Jy}function Pge(e,t){return t?e?r=>{if(Ege(r)){let n=r;kge(n);let i=t(n);return n.baseUIHandlerPrevented||e?.(n),i}let o=t(r);return e?.(r),o}:t:e}function kge(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function XI(e,t){return t?e?t+" "+e:t:e}function Ege(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var Rge=Object.freeze([]),Pu=Object.freeze({});var QI=s(Jn(),1);function s9(e,t,r={}){let o=t.render,n=Age(t,r);if(r.enabled===!1)return null;let i=r.state??Pu;return Oge(e,o,n,i)}function Age(e,t={}){let{className:r,style:o,render:n}=e,{state:i=Pu,ref:a,props:l,stateAttributesMapping:c,enabled:u=!0}=t,d=u?r9(r,i):void 0,f=u?o9(o,i):void 0,m=u?t9(i,c):Pu,h=u?Xy(m,Array.isArray(l)?n9(l):l)??Pu:Pu;return typeof document<"u"&&(u?Array.isArray(a)?h.ref=K7([h.ref,ZI(n),...a]):h.ref=qI(h.ref,ZI(n),a):qI(null,null)),u?(d!==void 0&&(h.className=XI(h.className,d)),f!==void 0&&(h.style=Xy(h.style,f)),h):Pu}function Oge(e,t,r,o){if(t){if(typeof t=="function")return t(r,o);let n=Up(r,t.props);return n.ref=r.ref,Aw.cloneElement(t,n)}if(e&&typeof e=="string")return Ige(e,r);throw new Error(YI(8))}function Ige(e,t){return e==="button"?(0,QI.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,QI.createElement)("img",{alt:"",...t,key:t.key}):Aw.createElement(e,t)}function Ow(){return typeof window<"u"}function yf(e){return l9(e)?(e.nodeName||"").toLowerCase():"#document"}function ei(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Hs(e){var t;return(t=(l9(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function l9(e){return Ow()?e instanceof Node||e instanceof ei(e).Node:!1}function ns(e){return Ow()?e instanceof Element||e instanceof ei(e).Element:!1}function Gs(e){return Ow()?e instanceof HTMLElement||e instanceof ei(e).HTMLElement:!1}function a9(e){return!Ow()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ei(e).ShadowRoot}var Nge=new Set(["inline","contents"]);function Hp(e){let{overflow:t,overflowX:r,overflowY:o,display:n}=is(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&!Nge.has(n)}var Fge=new Set(["table","td","th"]);function c9(e){return Fge.has(yf(e))}var Dge=[":popover-open",":modal"];function $y(e){return Dge.some(t=>{try{return e.matches(t)}catch{return!1}})}var Bge=["transform","translate","scale","rotate","perspective"],Mge=["transform","translate","scale","rotate","perspective","filter"],Lge=["paint","layout","strict","content"];function Iw(e){let t=Nw(),r=ns(e)?is(e):e;return Bge.some(o=>r[o]?r[o]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Mge.some(o=>(r.willChange||"").includes(o))||Lge.some(o=>(r.contain||"").includes(o))}function u9(e){let t=Zl(e);for(;Gs(t)&&!bf(t);){if(Iw(t))return t;if($y(t))return null;t=Zl(t)}return null}function Nw(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var Vge=new Set(["html","body","#document"]);function bf(e){return Vge.has(yf(e))}function is(e){return ei(e).getComputedStyle(e)}function eb(e){return ns(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Zl(e){if(yf(e)==="html")return e;let t=e.assignedSlot||e.parentNode||a9(e)&&e.host||Hs(e);return a9(t)?t.host:t}function d9(e){let t=Zl(e);return bf(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gs(t)&&Hp(t)?t:d9(t)}function vf(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=d9(e),i=n===((o=e.ownerDocument)==null?void 0:o.body),a=ei(n);if(i){let l=Fw(a);return t.concat(a,a.visualViewport||[],Hp(n)?n:[],l&&r?vf(l):[])}return t.concat(n,vf(n,[],r))}function Fw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var tb=Math.min,ku=Math.max,rb=Math.round,ob=Math.floor,Ws=e=>({x:e,y:e});function f9(e,t){return typeof e=="function"?e(t):e}function Dw(e){return e.split("-")[0]}function JI(e){return e.split("-")[1]}function m9(e){return e==="x"?"y":"x"}function p9(e){return e==="y"?"height":"width"}var jge=new Set(["top","bottom"]);function Bw(e){return jge.has(Dw(e))?"y":"x"}function h9(e){return m9(Bw(e))}function nb(e){let{x:t,y:r,width:o,height:n}=e;return{width:o,height:n,top:r,left:t,right:t+o,bottom:r+n,x:t,y:r}}function g9(e,t,r){let{reference:o,floating:n}=e,i=Bw(t),a=h9(t),l=p9(a),c=Dw(t),u=i==="y",d=o.x+o.width/2-n.width/2,f=o.y+o.height/2-n.height/2,m=o[l]/2-n[l]/2,h;switch(c){case"top":h={x:d,y:o.y-n.height};break;case"bottom":h={x:d,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-n.width,y:f};break;default:h={x:o.x,y:o.y}}switch(JI(t)){case"start":h[a]-=m*(r&&u?-1:1);break;case"end":h[a]+=m*(r&&u?-1:1);break}return h}var v9=async(e,t,r)=>{let{placement:o="bottom",strategy:n="absolute",middleware:i=[],platform:a}=r,l=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t)),u=await a.getElementRects({reference:e,floating:t,strategy:n}),{x:d,y:f}=g9(u,o,c),m=o,h={},g=0;for(let v=0;v<l.length;v++){let{name:y,fn:b}=l[v],{x:_,y:S,data:x,reset:T}=await b({x:d,y:f,initialPlacement:o,placement:m,strategy:n,middlewareData:h,rects:u,platform:a,elements:{reference:e,floating:t}});d=_??d,f=S??f,h={...h,[y]:{...h[y],...x}},T&&g<=50&&(g++,typeof T=="object"&&(T.placement&&(m=T.placement),T.rects&&(u=T.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:n}):T.rects),{x:d,y:f}=g9(u,m,c)),v=-1)}return{x:d,y:f,placement:m,strategy:n,middlewareData:h}};var zge=new Set(["left","top"]);async function Uge(e,t){let{placement:r,platform:o,elements:n}=e,i=await(o.isRTL==null?void 0:o.isRTL(n.floating)),a=Dw(r),l=JI(r),c=Bw(r)==="y",u=zge.has(a)?-1:1,d=i&&c?-1:1,f=f9(t,e),{mainAxis:m,crossAxis:h,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof g=="number"&&(h=l==="end"?g*-1:g),c?{x:h*d,y:m*u}:{x:m*u,y:h*d}}var y9=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;let{x:n,y:i,placement:a,middlewareData:l}=t,c=await Uge(t,e);return a===((r=l.offset)==null?void 0:r.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:n+c.x,y:i+c.y,data:{...c,placement:a}}}}};function w9(e){let t=is(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=Gs(e),i=n?e.offsetWidth:r,a=n?e.offsetHeight:o,l=rb(r)!==i||rb(o)!==a;return l&&(r=i,o=a),{width:r,height:o,$:l}}function e6(e){return ns(e)?e:e.contextElement}function Gp(e){let t=e6(e);if(!Gs(t))return Ws(1);let r=t.getBoundingClientRect(),{width:o,height:n,$:i}=w9(t),a=(i?rb(r.width):r.width)/o,l=(i?rb(r.height):r.height)/n;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}var Hge=Ws(0);function x9(e){let t=ei(e);return!Nw()||!t.visualViewport?Hge:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gge(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ei(e)?!1:t}function Sf(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),i=e6(e),a=Ws(1);t&&(o?ns(o)&&(a=Gp(o)):a=Gp(e));let l=Gge(i,r,o)?x9(i):Ws(0),c=(n.left+l.x)/a.x,u=(n.top+l.y)/a.y,d=n.width/a.x,f=n.height/a.y;if(i){let m=ei(i),h=o&&ns(o)?ei(o):o,g=m,v=Fw(g);for(;v&&o&&h!==g;){let y=Gp(v),b=v.getBoundingClientRect(),_=is(v),S=b.left+(v.clientLeft+parseFloat(_.paddingLeft))*y.x,x=b.top+(v.clientTop+parseFloat(_.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,f*=y.y,c+=S,u+=x,g=ei(v),v=Fw(g)}}return nb({width:d,height:f,x:c,y:u})}function Mw(e,t){let r=eb(e).scrollLeft;return t?t.left+r:Sf(Hs(e)).left+r}function C9(e,t){let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-Mw(e,r),n=r.top+t.scrollTop;return{x:o,y:n}}function Wge(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e,i=n==="fixed",a=Hs(o),l=t?$y(t.floating):!1;if(o===a||l&&i)return r;let c={scrollLeft:0,scrollTop:0},u=Ws(1),d=Ws(0),f=Gs(o);if((f||!f&&!i)&&((yf(o)!=="body"||Hp(a))&&(c=eb(o)),Gs(o))){let h=Sf(o);u=Gp(o),d.x=h.x+o.clientLeft,d.y=h.y+o.clientTop}let m=a&&!f&&!i?C9(a,c):Ws(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+m.x,y:r.y*u.y-c.scrollTop*u.y+d.y+m.y}}function Yge(e){return Array.from(e.getClientRects())}function qge(e){let t=Hs(e),r=eb(e),o=e.ownerDocument.body,n=ku(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=ku(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),a=-r.scrollLeft+Mw(e),l=-r.scrollTop;return is(o).direction==="rtl"&&(a+=ku(t.clientWidth,o.clientWidth)-n),{width:n,height:i,x:a,y:l}}var b9=25;function Zge(e,t){let r=ei(e),o=Hs(e),n=r.visualViewport,i=o.clientWidth,a=o.clientHeight,l=0,c=0;if(n){i=n.width,a=n.height;let d=Nw();(!d||d&&t==="fixed")&&(l=n.offsetLeft,c=n.offsetTop)}let u=Mw(o);if(u<=0){let d=o.ownerDocument,f=d.body,m=getComputedStyle(f),h=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(o.clientWidth-f.clientWidth-h);g<=b9&&(i-=g)}else u<=b9&&(i+=u);return{width:i,height:a,x:l,y:c}}var Kge=new Set(["absolute","fixed"]);function Xge(e,t){let r=Sf(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,i=Gs(e)?Gp(e):Ws(1),a=e.clientWidth*i.x,l=e.clientHeight*i.y,c=n*i.x,u=o*i.y;return{width:a,height:l,x:c,y:u}}function S9(e,t,r){let o;if(t==="viewport")o=Zge(e,r);else if(t==="document")o=qge(Hs(e));else if(ns(t))o=Xge(t,r);else{let n=x9(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return nb(o)}function T9(e,t){let r=Zl(e);return r===t||!ns(r)||bf(r)?!1:is(r).position==="fixed"||T9(r,t)}function Qge(e,t){let r=t.get(e);if(r)return r;let o=vf(e,[],!1).filter(l=>ns(l)&&yf(l)!=="body"),n=null,i=is(e).position==="fixed",a=i?Zl(e):e;for(;ns(a)&&!bf(a);){let l=is(a),c=Iw(a);!c&&l.position==="fixed"&&(n=null),(i?!c&&!n:!c&&l.position==="static"&&!!n&&Kge.has(n.position)||Hp(a)&&!c&&T9(e,a))?o=o.filter(d=>d!==a):n=l,a=Zl(a)}return t.set(e,o),o}function Jge(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e,a=[...r==="clippingAncestors"?$y(t)?[]:Qge(t,this._c):[].concat(r),o],l=a[0],c=a.reduce((u,d)=>{let f=S9(t,d,n);return u.top=ku(f.top,u.top),u.right=tb(f.right,u.right),u.bottom=tb(f.bottom,u.bottom),u.left=ku(f.left,u.left),u},S9(t,l,n));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function $ge(e){let{width:t,height:r}=w9(e);return{width:t,height:r}}function eve(e,t,r){let o=Gs(t),n=Hs(t),i=r==="fixed",a=Sf(e,!0,i,t),l={scrollLeft:0,scrollTop:0},c=Ws(0);function u(){c.x=Mw(n)}if(o||!o&&!i)if((yf(t)!=="body"||Hp(n))&&(l=eb(t)),o){let h=Sf(t,!0,i,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else n&&u();i&&!o&&n&&u();let d=n&&!o&&!i?C9(n,l):Ws(0),f=a.left+l.scrollLeft-c.x-d.x,m=a.top+l.scrollTop-c.y-d.y;return{x:f,y:m,width:a.width,height:a.height}}function $I(e){return is(e).position==="static"}function _9(e,t){if(!Gs(e)||is(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Hs(e)===r&&(r=r.ownerDocument.body),r}function P9(e,t){let r=ei(e);if($y(e))return r;if(!Gs(e)){let n=Zl(e);for(;n&&!bf(n);){if(ns(n)&&!$I(n))return n;n=Zl(n)}return r}let o=_9(e,t);for(;o&&c9(o)&&$I(o);)o=_9(o,t);return o&&bf(o)&&$I(o)&&!Iw(o)?r:o||u9(e)||r}var tve=async function(e){let t=this.getOffsetParent||P9,r=this.getDimensions,o=await r(e.floating);return{reference:eve(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function rve(e){return is(e).direction==="rtl"}var k9={convertOffsetParentRelativeRectToViewportRelativeRect:Wge,getDocumentElement:Hs,getClippingRect:Jge,getOffsetParent:P9,getElementRects:tve,getClientRects:Yge,getDimensions:$ge,getScale:Gp,isElement:ns,isRTL:rve};function E9(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ove(e,t){let r=null,o,n=Hs(e);function i(){var l;clearTimeout(o),(l=r)==null||l.disconnect(),r=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();let u=e.getBoundingClientRect(),{left:d,top:f,width:m,height:h}=u;if(l||t(),!m||!h)return;let g=ob(f),v=ob(n.clientWidth-(d+m)),y=ob(n.clientHeight-(f+h)),b=ob(d),S={rootMargin:-g+"px "+-v+"px "+-y+"px "+-b+"px",threshold:ku(0,tb(1,c))||1},x=!0;function T(R){let F=R[0].intersectionRatio;if(F!==c){if(!x)return a();F?a(!1,F):o=setTimeout(()=>{a(!1,1e-7)},1e3)}F===1&&!E9(u,e.getBoundingClientRect())&&a(),x=!1}try{r=new IntersectionObserver(T,{...S,root:n.ownerDocument})}catch{r=new IntersectionObserver(T,S)}r.observe(e)}return a(!0),i}function t6(e,t,r,o){o===void 0&&(o={});let{ancestorScroll:n=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,u=e6(e),d=n||i?[...u?vf(u):[],...vf(t)]:[];d.forEach(b=>{n&&b.addEventListener("scroll",r,{passive:!0}),i&&b.addEventListener("resize",r)});let f=u&&l?ove(u,r):null,m=-1,h=null;a&&(h=new ResizeObserver(b=>{let[_]=b;_&&_.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var S;(S=h)==null||S.observe(t)})),r()}),u&&!c&&h.observe(u),h.observe(t));let g,v=c?Sf(e):null;c&&y();function y(){let b=Sf(e);v&&!E9(v,b)&&r(),v=b,g=requestAnimationFrame(y)}return r(),()=>{var b;d.forEach(_=>{n&&_.removeEventListener("scroll",r),i&&_.removeEventListener("resize",r)}),f?.(),(b=h)==null||b.disconnect(),h=null,c&&cancelAnimationFrame(g)}}var r6=y9;var o6=(e,t,r)=>{let o=new Map,n={platform:k9,...r},i={...n.platform,_c:o};return v9(e,t,{...n,platform:i})};function Lw(e){return s9(e.defaultTagName??"div",e,e)}var A9=s(D(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='244b5c59c0']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","244b5c59c0"),e.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-sm,12px);font-weight:var(--wpds-font-weight-regular,400);line-height:var(--wpds-font-line-height-xs,16px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-bg-surface-error,#f6e6e3);color:var(--wpds-color-fg-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-bg-surface-warning,#fde6bd);color:var(--wpds-color-fg-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution,#fee994);color:var(--wpds-color-fg-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success,#c5f7cc);color:var(--wpds-color-fg-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-bg-surface-info,#deebfa);color:var(--wpds-color-fg-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);color:var(--wpds-color-fg-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-bg-surface-neutral,#f8f8f8);color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d)}}')),document.head.appendChild(e)}var R9={badge:"_96e6251aad1a6136__badge","is-high-intent":"_99f7158cb520f750__is-high-intent","is-medium-intent":"c20ebef2365bc8b7__is-medium-intent","is-low-intent":"_365e1626c6202e52__is-low-intent","is-stable-intent":"_33f8198127ddf4ef__is-stable-intent","is-informational-intent":"_04c1aca8fc449412__is-informational-intent","is-draft-intent":"_90726e69d495ec19__is-draft-intent","is-none-intent":"_898f4a544993bd39__is-none-intent"},n6=(0,A9.forwardRef)(function({children:t,intent:r="none",render:o,className:n,...i},a){return Lw({render:o,defaultTagName:"span",ref:a,props:Up(i,{className:re(R9.badge,R9[`is-${r}-intent`],n),children:t})})});var O9=s(D(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='71d20935c2']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","71d20935c2"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}")),document.head.appendChild(e)}var nve={stack:"_19ce0419607e1896__stack"},ive={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},it=(0,O9.forwardRef)(function({direction:t,gap:r,align:o,justify:n,wrap:i,render:a,...l},c){let u={gap:r&&ive[r],alignItems:o,justifyContent:n,flexDirection:t,flexWrap:i};return Lw({render:a,ref:c,props:Up(l,{style:u,className:nve.stack})})});var Vw=s(D(),1),_f=s(A(),1),Eu=s(E(),1),Wp=s(he(),1),In=s(C(),1),N9=.25,I9={type:"tween",duration:N9,ease:[.6,0,.4,1]};function sve(e){(0,Vw.useEffect)(()=>{let t=document&&document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=>{t.classList.toggle(e)}},[e])}var ave={hidden:{opacity:1,marginTop:-60},visible:{opacity:1,marginTop:0},distractionFreeHover:{opacity:1,marginTop:0,transition:{...I9,delay:.2,delayChildren:.2}},distractionFreeHidden:{opacity:0,marginTop:-60},distractionFreeDisabled:{opacity:0,marginTop:0,transition:{...I9,delay:.8,delayChildren:.8}}};function lve({isDistractionFree:e,footer:t,header:r,editorNotices:o,sidebar:n,secondarySidebar:i,content:a,actions:l,labels:c,className:u},d){let[f,m]=(0,Wp.useResizeObserver)(),h=(0,Wp.useViewportMatch)("medium","<"),v={type:"tween",duration:(0,Wp.useReducedMotion)()?0:N9,ease:[.6,0,.4,1]};sve("interface-interface-skeleton__html-container");let b={...{header:(0,Eu._x)("Header","header landmark area"),body:(0,Eu.__)("Content"),secondarySidebar:(0,Eu.__)("Block Library"),sidebar:(0,Eu._x)("Settings","settings landmark area"),actions:(0,Eu.__)("Publish"),footer:(0,Eu.__)("Footer")},...c};return(0,In.jsxs)("div",{ref:d,className:re(u,"interface-interface-skeleton",!!t&&"has-footer"),children:[(0,In.jsxs)("div",{className:"interface-interface-skeleton__editor",children:[(0,In.jsx)(_f.__unstableAnimatePresence,{initial:!1,children:!!r&&(0,In.jsx)(Tu,{as:_f.__unstableMotion.div,className:"interface-interface-skeleton__header","aria-label":b.header,initial:e&&!h?"distractionFreeHidden":"hidden",whileHover:e&&!h?"distractionFreeHover":"visible",animate:e&&!h?"distractionFreeDisabled":"visible",exit:e&&!h?"distractionFreeHidden":"hidden",variants:ave,transition:v,children:r})}),e&&(0,In.jsx)("div",{className:"interface-interface-skeleton__header",children:o}),(0,In.jsxs)("div",{className:"interface-interface-skeleton__body",children:[(0,In.jsx)(_f.__unstableAnimatePresence,{initial:!1,children:!!i&&(0,In.jsx)(Tu,{className:"interface-interface-skeleton__secondary-sidebar",ariaLabel:b.secondarySidebar,as:_f.__unstableMotion.div,initial:"closed",animate:"open",exit:"closed",variants:{open:{width:m.width},closed:{width:0}},transition:v,children:(0,In.jsxs)(_f.__unstableMotion.div,{style:{position:"absolute",width:h?"100vw":"fit-content",height:"100%",left:0},variants:{open:{x:0},closed:{x:"-100%"}},transition:v,children:[f,i]})})}),(0,In.jsx)(Tu,{className:"interface-interface-skeleton__content",ariaLabel:b.body,children:a}),!!n&&(0,In.jsx)(Tu,{className:"interface-interface-skeleton__sidebar",ariaLabel:b.sidebar,children:n}),!!l&&(0,In.jsx)(Tu,{className:"interface-interface-skeleton__actions",ariaLabel:b.actions,children:l})]})]}),!!t&&(0,In.jsx)(Tu,{className:"interface-interface-skeleton__footer",ariaLabel:b.footer,children:t})]})}var ib=(0,Vw.forwardRef)(lve);var jw=s(ft(),1);var sb=s(O(),1),F9=s(Ls(),1),D9=s(W(),1);var B9=s(C(),1),{RenamePatternModal:cve}=N(F9.privateApis),s6="editor/pattern-rename";function M9(){let e=(0,sb.useSelect)(n=>n(Ce).isModalActive(s6)),{record:t,postType:r}=(0,sb.useSelect)(n=>{if(!e)return{};let{getCurrentPostType:i,getCurrentPostId:a}=n(w),{getEditedEntityRecord:l}=n(D9.store),c=i();return{record:l("postType",c,a()),postType:c}},[e]),{closeModal:o}=(0,sb.useDispatch)(Ce);return!e||r!==qi?null:(0,B9.jsx)(cve,{onClose:o,pattern:t})}var ab=s(O(),1),L9=s(Ls(),1),V9=s(W(),1);var j9=s(C(),1),{DuplicatePatternModal:uve}=N(L9.privateApis),a6="editor/pattern-duplicate";function z9(){let e=(0,ab.useSelect)(n=>n(Ce).isModalActive(a6)),{record:t,postType:r}=(0,ab.useSelect)(n=>{if(!e)return{};let{getCurrentPostType:i,getCurrentPostId:a}=n(w),{getEditedEntityRecord:l}=n(V9.store),c=i();return{record:l("postType",c,a()),postType:c}},[e]),{closeModal:o}=(0,ab.useDispatch)(Ce);return!e||r!==qi?null:(0,j9.jsx)(uve,{onClose:o,onSuccess:()=>o(),pattern:t})}var dve=()=>function(){let{editorMode:t,isListViewOpen:r,showBlockBreadcrumbs:o,isDistractionFree:n,isFocusMode:i,isPreviewMode:a,isViewable:l,isCodeEditingEnabled:c,isRichEditingEnabled:u,isPublishSidebarEnabled:d}=(0,ti.useSelect)(L=>{let{get:M}=L(l6.store),{isListViewOpened:k,getCurrentPostType:I,getEditorSettings:U}=L(w),{getSettings:G}=L(H9.store),{getPostType:Y}=L(Yp.store);return{editorMode:M("core","editorMode")??"visual",isListViewOpen:k(),showBlockBreadcrumbs:M("core","showBlockBreadcrumbs"),isDistractionFree:M("core","distractionFree"),isFocusMode:M("core","focusMode"),isPreviewMode:G().isPreviewMode,isViewable:Y(I())?.viewable??!1,isCodeEditingEnabled:U().codeEditingEnabled,isRichEditingEnabled:U().richEditingEnabled,isPublishSidebarEnabled:L(w).isPublishSidebarEnabled()}},[]),{getActiveComplementaryArea:f}=(0,ti.useSelect)(Ce),{toggle:m}=(0,ti.useDispatch)(l6.store),{createInfoNotice:h}=(0,ti.useDispatch)(U9.store),{__unstableSaveForPreview:g,setIsListViewOpened:v,switchEditorMode:y,toggleDistractionFree:b,toggleSpotlightMode:_,toggleTopToolbar:S}=(0,ti.useDispatch)(w),{openModal:x,enableComplementaryArea:T,disableComplementaryArea:R}=(0,ti.useDispatch)(Ce),{getCurrentPostId:F}=(0,ti.useSelect)(w),B=c&&u;if(a)return{commands:[],isLoading:!1};let z=[];return z.push({name:"core/open-shortcut-help",label:(0,$e.__)("Keyboard shortcuts"),icon:sA,category:"view",callback:({close:L})=>{L(),x("editor/keyboard-shortcut-help")}}),z.push({name:"core/toggle-distraction-free",label:n?(0,$e.__)("Exit Distraction free"):(0,$e.__)("Enter Distraction free"),category:"command",callback:({close:L})=>{b(),L()}}),z.push({name:"core/open-preferences",label:(0,$e.__)("Editor preferences"),category:"view",callback:({close:L})=>{L(),x("editor/preferences")}}),z.push({name:"core/toggle-spotlight-mode",label:i?(0,$e.__)("Exit Spotlight mode"):(0,$e.__)("Enter Spotlight mode"),category:"command",callback:({close:L})=>{_(),L()}}),z.push({name:"core/toggle-list-view",label:r?(0,$e.__)("Close List View"):(0,$e.__)("Open List View"),icon:Iv,category:"command",callback:({close:L})=>{v(!r),L(),h(r?(0,$e.__)("List View off."):(0,$e.__)("List View on."),{id:"core/editor/toggle-list-view/notice",type:"snackbar"})}}),z.push({name:"core/toggle-top-toolbar",label:(0,$e.__)("Top toolbar"),category:"command",callback:({close:L})=>{S(),L()}}),B&&z.push({name:"core/toggle-code-editor",label:t==="visual"?(0,$e.__)("Open code editor"):(0,$e.__)("Exit code editor"),icon:DR,category:"command",callback:({close:L})=>{y(t==="visual"?"text":"visual"),L()}}),z.push({name:"core/toggle-breadcrumbs",label:o?(0,$e.__)("Hide block breadcrumbs"):(0,$e.__)("Show block breadcrumbs"),category:"command",callback:({close:L})=>{m("core","showBlockBreadcrumbs"),L(),h(o?(0,$e.__)("Breadcrumbs hidden."):(0,$e.__)("Breadcrumbs visible."),{id:"core/editor/toggle-breadcrumbs/notice",type:"snackbar"})}}),z.push({name:"core/open-settings-sidebar",label:(0,$e.__)("Show or hide the Settings panel"),icon:(0,$e.isRTL)()?zd:Ud,category:"command",callback:({close:L})=>{let M=f("core");L(),M==="edit-post/document"?R("core"):T("core","edit-post/document")}}),z.push({name:"core/open-block-inspector",label:(0,$e.__)("Show or hide the Block settings panel"),icon:vR,category:"command",callback:({close:L})=>{let M=f("core");L(),M==="edit-post/block"?R("core"):T("core","edit-post/block")}}),z.push({name:"core/toggle-publish-sidebar",label:d?(0,$e.__)("Disable pre-publish checks"):(0,$e.__)("Enable pre-publish checks"),icon:rA,category:"command",callback:({close:L})=>{L(),m("core","isPublishSidebarEnabled"),h(d?(0,$e.__)("Pre-publish checks disabled."):(0,$e.__)("Pre-publish checks enabled."),{id:"core/editor/publish-sidebar/notice",type:"snackbar"})}}),l&&z.push({name:"core/preview-link",label:(0,$e.__)("Preview in a new tab"),icon:Xn,category:"view",callback:async({close:L})=>{L();let M=F(),k=await g();window.open(k,`wp-preview-${M}`)}}),{commands:z,isLoading:!1}},fve=()=>function(){let{postType:t}=(0,ti.useSelect)(n=>{let{getCurrentPostType:i}=n(w);return{postType:i()}},[]),{openModal:r}=(0,ti.useDispatch)(Ce),o=[];return t===qi&&(o.push({name:"core/rename-pattern",label:(0,$e.__)("Rename pattern"),icon:Mv,category:"edit",callback:({close:n})=>{r(s6),n()}}),o.push({name:"core/duplicate-pattern",label:(0,$e.__)("Duplicate pattern"),icon:Wv,category:"command",callback:({close:n})=>{r(a6),n()}})),{isLoading:!1,commands:o}},mve=()=>function(){let{onNavigateToEntityRecord:t,goBack:r,templateId:o,isPreviewMode:n,canEditTemplate:i}=(0,ti.useSelect)(u=>{let{getRenderingMode:d,getEditorSettings:f,getCurrentTemplateId:m}=N(u(w)),h=f(),g=m();return{isTemplateHidden:d()==="post-only",onNavigateToEntityRecord:h.onNavigateToEntityRecord,getEditorSettings:f,goBack:h.onNavigateToPreviousEntityRecord,templateId:g,isPreviewMode:h.isPreviewMode,canEditTemplate:!!g&&u(Yp.store).canUser("update",{kind:"postType",name:"wp_template",id:g})}},[]),{editedRecord:a,hasResolved:l}=(0,Yp.useEntityRecord)("postType","wp_template",o);if(n)return{isLoading:!1,commands:[]};let c=[];return o&&l&&i&&c.push({name:"core/switch-to-template-focus",label:(0,$e.sprintf)((0,$e.__)("Edit template: %s"),(0,jw.decodeEntities)(a.title)),icon:Bs,category:"edit",callback:({close:u})=>{t({postId:o,postType:"wp_template"}),u()}}),r&&c.push({name:"core/switch-to-previous-entity",label:(0,$e.__)("Go back"),icon:qm,category:"view",callback:({close:u})=>{r(),u()}}),{isLoading:!1,commands:c}},pve=()=>function(){let{postType:t,postId:r}=(0,ti.useSelect)(l=>{let{getCurrentPostId:c,getCurrentPostType:u}=l(w);return{postType:u(),postId:c()}},[]),{editedRecord:o,hasResolved:n}=(0,Yp.useEntityRecord)("postType",t,r),{revertTemplate:i}=N((0,ti.useDispatch)(w));if(!n||![Ur,xt].includes(t))return{isLoading:!0,commands:[]};let a=[];if(e_(o)){let l=o.type===xt?(0,$e.sprintf)((0,$e.__)("Reset template: %s"),(0,jw.decodeEntities)(o.title)):(0,$e.sprintf)((0,$e.__)("Reset template part: %s"),(0,jw.decodeEntities)(o.title));a.push({name:"core/reset-template",label:l,icon:(0,$e.isRTL)()?OA:RA,category:"command",callback:({close:c})=>{i(o),c()}})}return{isLoading:!n,commands:a}};function G9(){(0,lb.useCommandLoader)({name:"core/editor/edit-ui",hook:dve()}),(0,lb.useCommandLoader)({name:"core/editor/contextual-commands",hook:fve(),context:"entity-edit"}),(0,lb.useCommandLoader)({name:"core/editor/page-content-focus",hook:mve(),context:"entity-edit"}),(0,lb.useCommandLoader)({name:"core/edit-site/manipulate-document",hook:pve()})}var zw=s(O(),1),q9=s(D(),1),Z9=s(Y9(),1);var qp="upload-in-progress";function K9(){let e=window.__clientSideMediaProcessing,t=(0,zw.useSelect)(a=>e?a(Z9.store).isUploading():!1,[e]),{lockPostSaving:r,unlockPostSaving:o,lockPostAutosaving:n,unlockPostAutosaving:i}=(0,zw.useDispatch)(w);(0,q9.useEffect)(()=>{if(e)return t?(r(qp),n(qp)):(o(qp),i(qp)),()=>{o(qp),i(qp)}},[e,t,r,o,n,i])}var wf=s(E(),1),Q9=s($(),1),J9=s(O(),1),$9=s(D(),1);var ej=s(C(),1),{BlockRemovalWarningModal:X9}=N(Q9.privateApis),hve=["core/post-content","core/post-template","core/query"],gve=[{postTypes:["wp_template","wp_template_part"],callback(e){if(e.filter(({name:o})=>o==="core/post-content").length)return{description:(0,wf.__)("This block displays the content of posts and pages using this template."),warning:(0,wf.__)("If you delete it, posts or pages using this template will not display any content."),subtext:(0,wf.__)("Visitors will see blank pages."),requireConfirmation:!0};if(e.filter(({name:o})=>hve.includes(o)).length)return(0,wf._n)("Deleting this block will stop your post or page content from displaying on this template. It is not recommended.","Some of the deleted blocks will stop your post or page content from displaying on this template. It is not recommended.",e.length)}},{postTypes:["wp_block"],callback(e){if(e.filter(({attributes:r})=>r?.metadata?.bindings&&Object.values(r.metadata.bindings).some(o=>o.source==="core/pattern-overrides")).length)return(0,wf._n)("The deleted block allows instance overrides. Removing it may result in content not displaying where this pattern is used. Are you sure you want to proceed?","Some of the deleted blocks allow instance overrides. Removing them may result in content not displaying where this pattern is used. Are you sure you want to proceed?",e.length)}}];function tj(){let e=(0,J9.useSelect)(r=>r(w).getCurrentPostType(),[]),t=(0,$9.useMemo)(()=>gve.filter(r=>r.postTypes.includes(e)),[e]);return!X9||!t?null:(0,ej.jsx)(X9,{rules:t})}var Ru=s(A(),1),c6=s(E(),1),xf=s(D(),1),Uw=s($(),1),Kl=s(O(),1),rj=s(W(),1),oj=s(Xe(),1),u6=s(lt(),1);var Ia=s(C(),1);function vve(){let{blockPatternsWithPostContentBlockType:e,postType:t}=(0,Kl.useSelect)(r=>{let{getPatternsByBlockTypes:o,getBlocksByName:n}=r(Uw.store),{getCurrentPostType:i,getRenderingMode:a}=r(w),l=a()==="post-only"?"":n("core/post-content")?.[0];return{blockPatternsWithPostContentBlockType:o("core/post-content",l),postType:i()}},[]);return(0,xf.useMemo)(()=>e?.length?e.filter(r=>t==="page"&&!r.postTypes||Array.isArray(r.postTypes)&&r.postTypes.includes(t)):[],[t,e])}function yve({blockPatterns:e,onChoosePattern:t}){let{editEntityRecord:r}=(0,Kl.useDispatch)(rj.store),{postType:o,postId:n}=(0,Kl.useSelect)(i=>{let{getCurrentPostType:a,getCurrentPostId:l}=i(w);return{postType:a(),postId:l()}},[]);return(0,Ia.jsx)(Uw.__experimentalBlockPatternsList,{blockPatterns:e,onClickPattern:(i,a)=>{r("postType",o,n,{blocks:a,content:({blocks:l=[]})=>(0,oj.__unstableSerializeAndClean)(l)}),t()}})}function bve({onClose:e}){let[t,r]=(0,xf.useState)(!0),{set:o}=(0,Kl.useDispatch)(u6.store),n=vve();if(!(n.length>0))return null;function a(){e(),o("core","enableChoosePatternModal",t)}return(0,Ia.jsxs)(Ru.Modal,{className:"editor-start-page-options__modal",title:(0,c6.__)("Choose a pattern"),isFullScreen:!0,onRequestClose:a,children:[(0,Ia.jsx)("div",{className:"editor-start-page-options__modal-content",children:(0,Ia.jsx)(yve,{blockPatterns:n,onChoosePattern:a})}),(0,Ia.jsx)(Ru.Flex,{className:"editor-start-page-options__modal__actions",justify:"flex-start",expanded:!1,children:(0,Ia.jsx)(Ru.FlexItem,{children:(0,Ia.jsx)(Ru.CheckboxControl,{checked:t,label:(0,c6.__)("Always show starter patterns for new pages"),onChange:l=>{r(l)}})})})]})}function nj(){let[e,t]=(0,xf.useState)(!1),{isEditedPostDirty:r,isEditedPostEmpty:o}=(0,Kl.useSelect)(w),{isModalActive:n}=(0,Kl.useSelect)(Ce),{enabled:i,postId:a}=(0,Kl.useSelect)(l=>{let{getCurrentPostId:c,getCurrentPostType:u}=l(w),d=l(u6.store).get("core","enableChoosePatternModal"),f=u();return{postId:c(),enabled:d&&ur!==f&&xt!==f&&Ur!==f}},[]);return(0,xf.useEffect)(()=>{let l=!r()&&o(),c=n("editor/preferences");!i||!l||c||t(!0)},[i,a,r,o,n]),e?(0,Ia.jsx)(bve,{onClose:()=>t(!1)}):null}var hj=s(A(),1),Na=s(E(),1),Yw=s(Oi(),1),cb=s(O(),1);var ss=s(E(),1),sj=[{keyCombination:{modifier:"primary",character:"b"},description:(0,ss.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:(0,ss.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:(0,ss.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:(0,ss.__)("Remove a link.")},{keyCombination:{character:"[["},description:(0,ss.__)("Insert a link to a post or page.")},{keyCombination:{modifier:"primary",character:"u"},description:(0,ss.__)("Underline the selected text.")},{keyCombination:{modifier:"access",character:"d"},description:(0,ss.__)("Strikethrough the selected text.")},{keyCombination:{modifier:"access",character:"x"},description:(0,ss.__)("Make the selected text inline code.")},{keyCombination:{modifier:"access",character:"0"},aliases:[{modifier:"access",character:"7"}],description:(0,ss.__)("Convert the current heading to a paragraph.")},{keyCombination:{modifier:"access",character:"1-6"},description:(0,ss.__)("Convert the current paragraph or heading to a heading of level 1 to 6.")},{keyCombination:{modifier:"primaryShift",character:"SPACE"},description:(0,ss.__)("Add non breaking space.")}];var cj=s(D(),1),Hw=s(yo(),1),as=s(C(),1);function lj({keyCombination:e,forceAriaLabel:t}){let r=e.modifier?Hw.displayShortcutList[e.modifier](e.character):e.character,o=e.modifier?Hw.shortcutAriaLabel[e.modifier](e.character):e.character;return(0,as.jsx)("kbd",{className:"editor-keyboard-shortcut-help-modal__shortcut-key-combination","aria-label":t||o,children:(Array.isArray(r)?r:[r]).map((n,i)=>n==="+"?(0,as.jsx)(cj.Fragment,{children:n},i):(0,as.jsx)("kbd",{className:"editor-keyboard-shortcut-help-modal__shortcut-key",children:n},i))})}function Sve({description:e,keyCombination:t,aliases:r=[],ariaLabel:o}){return(0,as.jsxs)(as.Fragment,{children:[(0,as.jsx)("div",{className:"editor-keyboard-shortcut-help-modal__shortcut-description",children:e}),(0,as.jsxs)("div",{className:"editor-keyboard-shortcut-help-modal__shortcut-term",children:[(0,as.jsx)(lj,{keyCombination:t,forceAriaLabel:o}),r.map((n,i)=>(0,as.jsx)(lj,{keyCombination:n,forceAriaLabel:o},i))]})]})}var Gw=Sve;var uj=s(O(),1),dj=s(Oi(),1);var fj=s(C(),1);function _ve({name:e}){let{keyCombination:t,description:r,aliases:o}=(0,uj.useSelect)(n=>{let{getShortcutKeyCombination:i,getShortcutDescription:a,getShortcutAliases:l}=n(dj.store);return{keyCombination:i(e),aliases:l(e),description:a(e)}},[e]);return t?(0,fj.jsx)(Gw,{keyCombination:t,description:r,aliases:o}):null}var mj=_ve;var Mo=s(C(),1),pj="editor/keyboard-shortcut-help",wve=({shortcuts:e})=>(0,Mo.jsx)("ul",{className:"editor-keyboard-shortcut-help-modal__shortcut-list",role:"list",children:e.map((t,r)=>(0,Mo.jsx)("li",{className:"editor-keyboard-shortcut-help-modal__shortcut",children:typeof t=="string"?(0,Mo.jsx)(mj,{name:t}):(0,Mo.jsx)(Gw,{...t})},r))}),d6=({title:e,shortcuts:t,className:r})=>(0,Mo.jsxs)("section",{className:re("editor-keyboard-shortcut-help-modal__section",r),children:[!!e&&(0,Mo.jsx)("h2",{className:"editor-keyboard-shortcut-help-modal__section-title",children:e}),(0,Mo.jsx)(wve,{shortcuts:t})]}),Ww=({title:e,categoryName:t,additionalShortcuts:r=[]})=>{let o=(0,cb.useSelect)(n=>n(Yw.store).getCategoryShortcuts(t),[t]);return(0,Mo.jsx)(d6,{title:e,shortcuts:o.concat(r)})};function xve(){let e=(0,cb.useSelect)(n=>n(Ce).isModalActive(pj),[]),{openModal:t,closeModal:r}=(0,cb.useDispatch)(Ce),o=()=>{e?r():t(pj)};return(0,Yw.useShortcut)("core/editor/keyboard-shortcuts",o),e?(0,Mo.jsxs)(hj.Modal,{className:"editor-keyboard-shortcut-help-modal",title:(0,Na.__)("Keyboard shortcuts"),closeButtonLabel:(0,Na.__)("Close"),onRequestClose:o,children:[(0,Mo.jsx)(d6,{className:"editor-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/editor/keyboard-shortcuts"]}),(0,Mo.jsx)(Ww,{title:(0,Na.__)("Global shortcuts"),categoryName:"global"}),(0,Mo.jsx)(Ww,{title:(0,Na.__)("Selection shortcuts"),categoryName:"selection"}),(0,Mo.jsx)(Ww,{title:(0,Na.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:(0,Na.__)("Change the block type after adding a new paragraph."),ariaLabel:(0,Na.__)("Forward-slash")}]}),(0,Mo.jsx)(d6,{title:(0,Na.__)("Text formatting"),shortcuts:sj}),(0,Mo.jsx)(Ww,{title:(0,Na.__)("List View shortcuts"),categoryName:"list-view"})]}):null}var f6=xve;var Au=s(A(),1),ub=s(E(),1),Zp=s(D(),1),gj=s($(),1),db=s(O(),1),m6=s(Xe(),1),Cf=s(W(),1);var Fa=s(C(),1);function Cve(e,t=!1){return(0,db.useSelect)(r=>{let{getEntityRecord:o,getDefaultTemplateId:n}=r(Cf.store),i=n({slug:e,is_custom:t,ignore_empty:!0});return i?o("postType",xt,i)?.content?.raw:void 0},[e,t])}function Tve(e){let{slug:t,patterns:r}=(0,db.useSelect)(i=>{let{getCurrentPostType:a,getCurrentPostId:l}=i(w),{getEntityRecord:c,getBlockPatterns:u}=i(Cf.store),d=l(),f=a();return{slug:c("postType",f,d).slug,patterns:u()}},[]),o=(0,db.useSelect)(i=>i(Cf.store).getCurrentTheme().stylesheet);function n(i){return i.innerBlocks.find(a=>a.name==="core/template-part")&&(i.innerBlocks=i.innerBlocks.map(a=>(a.name==="core/template-part"&&a.attributes.theme===void 0&&(a.attributes.theme=o),a))),i.name==="core/template-part"&&i.attributes.theme===void 0&&(i.attributes.theme=o),i}return(0,Zp.useMemo)(()=>[{name:"fallback",blocks:(0,m6.parse)(e),title:(0,ub.__)("Fallback content")},...r.filter(i=>Array.isArray(i.templateTypes)&&i.templateTypes.some(a=>t.startsWith(a))).map(i=>({...i,blocks:(0,m6.parse)(i.content).map(a=>n(a))}))],[e,t,r])}function Pve({fallbackContent:e,onChoosePattern:t,postType:r}){let[,,o]=(0,Cf.useEntityBlockEditor)("postType",r),n=Tve(e);return(0,Fa.jsx)(gj.__experimentalBlockPatternsList,{blockPatterns:n,onClickPattern:(i,a)=>{o(a,{selection:void 0}),t()}})}function kve({slug:e,isCustom:t,onClose:r,postType:o}){let n=Cve(e,t);return n?(0,Fa.jsxs)(Au.Modal,{className:"editor-start-template-options__modal",title:(0,ub.__)("Choose a pattern"),closeLabel:(0,ub.__)("Cancel"),focusOnMount:"firstElement",onRequestClose:r,isFullScreen:!0,children:[(0,Fa.jsx)("div",{className:"editor-start-template-options__modal-content",children:(0,Fa.jsx)(Pve,{fallbackContent:n,slug:e,isCustom:t,postType:o,onChoosePattern:()=>{r()}})}),(0,Fa.jsx)(Au.Flex,{className:"editor-start-template-options__modal__actions",justify:"flex-end",expanded:!1,children:(0,Fa.jsx)(Au.FlexItem,{children:(0,Fa.jsx)(Au.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:r,children:(0,ub.__)("Skip")})})})]}):null}function vj(){let[e,t]=(0,Zp.useState)(!1),{shouldOpenModal:r,slug:o,isCustom:n,postType:i,postId:a}=(0,db.useSelect)(l=>{let{getCurrentPostType:c,getCurrentPostId:u}=l(w),d=c(),f=u(),{getEditedEntityRecord:m,hasEditsForEntityRecord:h}=l(Cf.store),g=m("postType",d,f);return{shouldOpenModal:!h("postType",d,f)&&g.content===""&&xt===d,slug:g.slug,isCustom:g.is_custom,postType:d,postId:f}},[]);return(0,Zp.useEffect)(()=>{t(!1)},[i,a]),!r||e?null:(0,Fa.jsx)(kve,{slug:o,isCustom:n,postType:i,onClose:()=>t(!0)})}var Ou=s(Oi(),1),Iu=s(O(),1);var yj=s($(),1);function Tf(){let e=(0,Iu.useSelect)(v=>{let{richEditingEnabled:y,codeEditingEnabled:b}=v(w).getEditorSettings();return!y||!b},[]),{getBlockSelectionStart:t}=(0,Iu.useSelect)(yj.store),{getActiveComplementaryArea:r}=(0,Iu.useSelect)(Ce),{enableComplementaryArea:o,disableComplementaryArea:n}=(0,Iu.useDispatch)(Ce),{redo:i,undo:a,savePost:l,setIsListViewOpened:c,switchEditorMode:u,toggleDistractionFree:d}=(0,Iu.useDispatch)(w),{isEditedPostDirty:f,isPostSavingLocked:m,isListViewOpened:h,getEditorMode:g}=(0,Iu.useSelect)(w);return(0,Ou.useShortcut)("core/editor/toggle-mode",()=>{u(g()==="visual"?"text":"visual")},{isDisabled:e}),(0,Ou.useShortcut)("core/editor/toggle-distraction-free",()=>{d()}),(0,Ou.useShortcut)("core/editor/undo",v=>{a(),v.preventDefault()}),(0,Ou.useShortcut)("core/editor/redo",v=>{i(),v.preventDefault()}),(0,Ou.useShortcut)("core/editor/save",v=>{v.preventDefault(),!m()&&f()&&l()}),(0,Ou.useShortcut)("core/editor/toggle-list-view",v=>{h()||(v.preventDefault(),c(!0))}),(0,Ou.useShortcut)("core/editor/toggle-sidebar",v=>{if(v.preventDefault(),["edit-post/document","edit-post/block"].includes(r("core")))n("core");else{let b=t()?"edit-post/block":"edit-post/document";o("core",b)}}),null}var Rj=s(O(),1),Kw=s($(),1);var fb=s(O(),1),qw=s($(),1),bj=s(W(),1),Zw=s(A(),1),Da=s(E(),1),Sj=s(ft(),1),_j=s(D(),1),Pf=s(C(),1);function wj({clientId:e,onClose:t}){let[r,o]=(0,_j.useState)(!1),{getBlocks:n}=(0,fb.useSelect)(qw.store),{replaceBlocks:i}=(0,fb.useDispatch)(qw.store),{canRemove:a,templatePartTitle:l}=(0,fb.useSelect)(d=>{let{canRemoveBlock:f,getBlock:m}=d(qw.store),{getEntityRecord:h,getCurrentTheme:g}=d(bj.store),v=m(e),{slug:y,theme:b}=v?.attributes??{},_=b||g()?.stylesheet,S=_&&y?`${_}//${y}`:null,x=S?h("postType","wp_template_part",S):null;return{canRemove:f(e),templatePartTitle:x?.title?.rendered?(0,Sj.decodeEntities)(x.title.rendered):null}},[e]);if(!a)return null;let c=l?(0,Da.sprintf)((0,Da.__)("Detach %s?"),l):(0,Da.__)("Detach template part?"),u=l?(0,Da.sprintf)((0,Da.__)("The blocks will be separated from the original template part and will be fully editable. Future changes to the %s template part will not apply here."),l):(0,Da.__)("The blocks will be separated from the original template part and will be fully editable. Future changes to the template part will not apply here.");return(0,Pf.jsxs)(Pf.Fragment,{children:[(0,Pf.jsx)(Zw.MenuItem,{onClick:()=>o(!0),children:(0,Da.__)("Detach")}),(0,Pf.jsx)(Zw.__experimentalConfirmDialog,{isOpen:r,onConfirm:()=>{i(e,n(e)),t()},onCancel:()=>o(!1),confirmButtonText:(0,Da.__)("Detach"),size:"medium",title:c,__experimentalHideHeader:!1,children:u})]})}var mb=s(O(),1),p6=s($(),1),xj=s(A(),1),Cj=s(Xe(),1),h6=s(E(),1),Tj=s(D(),1),Pj=s(ct(),1);var kj=s(W(),1);var kf=s(C(),1);function Ej({clientIds:e,blocks:t}){let[r,o]=(0,Tj.useState)(!1),{replaceBlocks:n}=(0,mb.useDispatch)(p6.store),{createSuccessNotice:i}=(0,mb.useDispatch)(Pj.store),{isBlockBasedTheme:a,canCreate:l}=(0,mb.useSelect)(u=>({isBlockBasedTheme:u(kj.store).getCurrentTheme()?.is_block_theme,canCreate:u(p6.store).canInsertBlockType("core/template-part")}),[]);if(!a||!l)return null;let c=async u=>{n(e,(0,Cj.createBlock)("core/template-part",{slug:u.slug,theme:u.theme})),i((0,h6.__)("Template part created."),{type:"snackbar"})};return(0,kf.jsxs)(kf.Fragment,{children:[(0,kf.jsx)(xj.MenuItem,{icon:Wd,onClick:()=>{o(!0)},"aria-expanded":r,"aria-haspopup":"dialog",children:(0,h6.__)("Create template part")}),r&&(0,kf.jsx)(Cp,{closeModal:()=>{o(!1)},blocks:t,onCreate:c})]})}var pb=s(C(),1);function Aj(){return(0,pb.jsx)(Kw.BlockSettingsMenuControls,{children:({selectedClientIds:e,onClose:t})=>(0,pb.jsx)(Eve,{clientIds:e,onClose:t})})}function Eve({clientIds:e,onClose:t}){let{blocks:r}=(0,Rj.useSelect)(o=>{let{getBlocksByClientId:n}=o(Kw.store);return{blocks:n(e)}},[e]);return r.length===1&&r[0]?.name==="core/template-part"?(0,pb.jsx)(wj,{clientId:e[0],onClose:t}):(0,pb.jsx)(Ej,{clientIds:e,blocks:r})}var Dt=s(C(),1),{ExperimentalBlockEditorProvider:Rve}=N(Xp.privateApis),{PatternsMenuItems:Ave}=N(Ij.privateApis),hb=()=>{},Ove=["wp_block","wp_navigation","wp_template_part"];function Ive(e,t,r){let o=w7(),n=r==="template-locked"?"template":"post",[i,a,l]=(0,Ys.useEntityBlockEditor)("postType",e.type,{id:e.id}),[c,u,d]=(0,Ys.useEntityBlockEditor)("postType",t?.type,{id:t?.id}),f=(0,Ii.useMemo)(()=>{if(e.type==="wp_navigation")return[(0,Nj.createBlock)("core/navigation",{ref:e.id,templateLock:!1})]},[e.type,e.id]),m=(0,Ii.useMemo)(()=>f||(n==="template"?c:i),[f,n,c,i]);return o!==null?[o,hb,hb]:!!t&&r==="template-locked"||e.type==="wp_navigation"?[m,hb,hb]:[m,n==="post"?a:u,n==="post"?l:d]}var v6=$V(({post:e,settings:t,recovery:r,initialEdits:o,children:n,BlockEditorProviderComponent:i=Rve,__unstableTemplate:a})=>{let l=!!a,{editorSettings:c,selection:u,isReady:d,mode:f,defaultMode:m,postTypeEntities:h,isInRevisionsMode:g,currentRevisionId:v}=(0,Kp.useSelect)(H=>{let{getEditorSettings:X,getRenderingMode:ae,__unstableIsEditorReady:ne,getDefaultRenderingMode:ue,isRevisionsMode:Ye,getCurrentRevisionId:ye}=N(H(w)),{getEntitiesConfig:oe,getEntityRecordEdits:ge}=H(Ys.store),Re=ae(),ze=ue(e.type),Ve=ze==="template-locked"?l:ze!==void 0,tt=ze!==void 0,vt=ge("postType",e.type,e.id);return{editorSettings:X(),isReady:ne(),mode:tt?Re:void 0,defaultMode:Ve?ze:void 0,selection:vt?.selection,postTypeEntities:e.type==="wp_template"?oe("postType"):null,isInRevisionsMode:Ye(),currentRevisionId:ye()}},[e.type,e.id,l]),y=l&&f!=="post-only",b=y?a:e,_=(0,Ii.useMemo)(()=>{let H={};if(e.type==="wp_template"){if(e.slug==="page")H.postType="page";else if(e.slug==="single")H.postType="post";else if(e.slug.split("-")[0]==="single"){let X=h?.map(ne=>ne.name)||[],ae=e.slug.match(`^single-(${X.join("|")})(?:-.+)?$`);ae&&(H.postType=ae[1])}}else(!Ove.includes(b.type)||y)&&(H.postId=e.id,H.postType=e.type);return{...H,templateSlug:b.type==="wp_template"?b.slug:void 0}},[y,e.id,e.type,e.slug,b.type,b.slug,h]),{id:S,type:x}=b,T=J8(c,x,S,f),[R,F,B]=Ive(e,a,f),{updatePostLock:z,setupEditor:L,updateEditorSettings:M,setCurrentTemplateId:k,setEditedPost:I,setRenderingMode:U}=N((0,Kp.useDispatch)(w)),{editEntityRecord:G}=(0,Kp.useDispatch)(Ys.store),Y=(0,Ii.useCallback)(H=>{G("postType",e.type,e.id,{selection:H},{undoIgnore:!0})},[G,e.type,e.id]),{createWarningNotice:Z,removeNotice:V}=(0,Kp.useDispatch)(Oj.store);return(0,Ii.useLayoutEffect)(()=>{r||(z(t.postLock),L(e,o,t.template),t.autosave&&Z((0,g6.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:(0,g6.__)("View the autosave"),url:t.autosave.editLink}]}))},[]),(0,Ii.useEffect)(()=>(I(e.type,e.id),typeof window<"u"&&window.__experimentalTemplateActivate&&V("template-activate-notice"),()=>I(null,null)),[e.type,e.id,I,V]),(0,Ii.useEffect)(()=>{M(t)},[t,M]),(0,Ii.useEffect)(()=>{k(a?.id)},[a?.id,k]),(0,Ii.useEffect)(()=>{m&&U(m)},[m,U]),s7(e.type,f),G9(),K9(),!d||!f?null:e.type===ur&&window?.__experimentalMediaEditor?(0,Dt.jsx)(Ys.EntityProvider,{kind:"root",type:"site",children:(0,Dt.jsxs)(Ys.EntityProvider,{kind:"postType",type:e.type,id:e.id,children:[n,!t.isPreviewMode&&(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsx)(Tf,{}),(0,Dt.jsx)(f6,{})]})]})}):(0,Dt.jsx)(Ys.EntityProvider,{kind:"root",type:"site",children:(0,Dt.jsx)(Ys.EntityProvider,{kind:"postType",type:e.type,id:e.id,revisionId:v??void 0,children:(0,Dt.jsx)(Xp.BlockContextProvider,{value:_,children:(0,Dt.jsxs)(i,{value:R,onChange:B,onInput:F,selection:g?void 0:u,onChangeSelection:g?hb:Y,settings:T,useSubRegistry:!1,children:[n,!t.isPreviewMode&&(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsx)(Ave,{}),(0,Dt.jsx)(Aj,{}),f==="template-locked"&&(0,Dt.jsx)(t7,{}),x==="wp_navigation"&&(0,Dt.jsx)(o7,{}),(0,Dt.jsx)(Tf,{}),(0,Dt.jsx)(f6,{}),(0,Dt.jsx)(tj,{}),(0,Dt.jsx)(nj,{}),(0,Dt.jsx)(vj,{}),(0,Dt.jsx)(M9,{}),(0,Dt.jsx)(z9,{})]})]})})})})});function y6(e){return(0,Dt.jsx)(v6,{...e,BlockEditorProviderComponent:Xp.BlockEditorProvider,children:e.children})}var Fj=y6;var xG=s(W(),1),CG=s(O(),1),J6=s(D(),1);var bh=s(A(),1),Ux=s(Xe(),1),hG=s(O(),1),gG=s($(),1),Uu=s(D(),1),q6=s(he(),1);var b6=s(D(),1);var Dj=s(D(),1),Br=(0,Dj.createContext)({user:{styles:{},settings:{}},base:{styles:{},settings:{}},merged:{styles:{},settings:{}},onChange:()=>{},fontLibraryEnabled:!1});var Bj=s(C(),1);function gb({children:e,value:t,baseValue:r,onChange:o,fontLibraryEnabled:n}){let i=(0,b6.useMemo)(()=>go(r,t),[r,t]),a=(0,b6.useMemo)(()=>({user:t,base:r,merged:i,onChange:o,fontLibraryEnabled:n}),[t,r,i,o,n]);return(0,Bj.jsx)(Br.Provider,{value:a,children:e})}var mr=s(A(),1),If=s(E(),1);var nz=s(O(),1),iz=s(W(),1);var Mj=s(C(),1);function vb({className:e,...t}){return(0,Mj.jsx)(No,{className:re(e,"global-styles-ui-icon-with-current-color"),...t})}var Nu=s(A(),1);var Ef=s(C(),1);function Nve({icon:e,children:t,...r}){return(0,Ef.jsxs)(Nu.__experimentalItem,{...r,children:[e&&(0,Ef.jsxs)(Nu.__experimentalHStack,{justify:"flex-start",children:[(0,Ef.jsx)(vb,{icon:e,size:24}),(0,Ef.jsx)(Nu.FlexItem,{children:t})]}),!e&&t]})}function fr(e){return(0,Ef.jsx)(Nu.Navigator.Button,{as:Nve,...e})}var Wj=s(A(),1);var Rf=s(E(),1),Yj=s($(),1);var S6=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},_6=function(e){return .2126*S6(e.r)+.7152*S6(e.g)+.0722*S6(e.b)};function Xw(e){e.prototype.luminance=function(){return t=_6(this.rgba),(r=2)===void 0&&(r=0),o===void 0&&(o=Math.pow(10,r)),Math.round(o*t)/o+0;var t,r,o},e.prototype.contrast=function(t){t===void 0&&(t="#FFF");var r,o,n,i,a,l,c,u=t instanceof e?t:new e(t);return i=this.rgba,a=u.toRgb(),l=_6(i),c=_6(a),r=l>c?(l+.05)/(c+.05):(c+.05)/(l+.05),(o=2)===void 0&&(o=0),n===void 0&&(n=Math.pow(10,o)),Math.floor(n*r)/n+0},e.prototype.isReadable=function(t,r){return t===void 0&&(t="#FFF"),r===void 0&&(r={}),this.contrast(t)>=(l=(a=(o=r).size)===void 0?"normal":a,(i=(n=o.level)===void 0?"AA":n)==="AAA"&&l==="normal"?7:i==="AA"&&l==="large"?3:4.5);var o,n,i,a,l}}var ls=s(D(),1),zj=s(O(),1),Uj=s(W(),1),x6=s(E(),1);function w6(e,t){if(!t?.length||typeof e!="object"||!e||!Object.keys(e).length)return e;for(let r in e)t.includes(r)?delete e[r]:typeof e[r]=="object"&&w6(e[r],t);return e}var Qw=(e,t)=>{if(!e||!t?.length)return{};let r={};return Object.keys(e).forEach(o=>{if(t.includes(o))r[o]=e[o];else if(typeof e[o]=="object"){let n=Qw(e[o],t);Object.keys(n).length&&(r[o]=n)}}),r};function yb(e,t){let r=Qw(structuredClone(e),t);return pf(r,e)}function Lj(e,t){if(!Array.isArray(e)||!t)return null;let o=t.replace("var(","").replace(")","")?.split("--").slice(-1)[0];return e.find(n=>n.slug===o)}function Vj(e){let t=e?.settings?.typography?.fontFamilies?.theme,r=e?.settings?.typography?.fontFamilies?.custom,o=[];t&&r?o=[...t,...r]:t?o=t:r&&(o=r);let n=e?.styles?.typography?.fontFamily,i=Lj(o,n),a=e?.styles?.elements?.heading?.typography?.fontFamily,l;return a?l=Lj(o,e?.styles?.elements?.heading?.typography?.fontFamily):l=i,[i,l]}function jj(e){return e?`is-style-${e}`:""}function Jw(e,t){let r=new RegExp(`^${t}([\\d]+)$`);return e.reduce((n,i)=>{if(typeof i?.slug=="string"){let a=i?.slug.match(r);if(a){let l=parseInt(a[1],10);if(l>n)return l}}return n},0)+1}uw([Xw]);function Ee(e,t,r="merged",o=!0){let{user:n,base:i,merged:a,onChange:l}=(0,ls.useContext)(Br),c=a;r==="base"?c=i:r==="user"&&(c=n);let u=(0,ls.useMemo)(()=>Fy(c,e,t,o),[c,e,t,o]),d=(0,ls.useCallback)(f=>{let m=Dy(n,e,f,t);l(m)},[n,l,e,t]);return[u,d]}function pe(e,t,r="merged"){let{user:o,base:n,merged:i,onChange:a}=(0,ls.useContext)(Br),l=i;r==="base"?l=n:r==="user"&&(l=o);let c=(0,ls.useMemo)(()=>mf(l,e,t),[l,e,t]),u=(0,ls.useCallback)(d=>{let f=Oy(o,e,d,t);a(f)},[o,a,e,t]);return[c,u]}var Fve=[];function Dve({title:e,settings:t,styles:r}){return e===(0,x6.__)("Default")||Object.keys(t||{}).length>0||Object.keys(r||{}).length>0}function $w(e=[]){let{variationsFromTheme:t}=(0,zj.useSelect)(o=>({variationsFromTheme:o(Uj.store).__experimentalGetCurrentThemeGlobalStylesVariations?.()||Fve}),[]),{user:r}=(0,ls.useContext)(Br);return(0,ls.useMemo)(()=>{let o=structuredClone(r),n=w6(o,e);n.title=(0,x6.__)("Default");let i=t.filter(l=>yb(l,e)).map(l=>go(n,l)),a=[n,...i];return a?.length?a.filter(Dve):[]},[e,r,t])}function Hj(e){let[t,r]=pe("color.palette.theme",e),o=(0,ls.useCallback)(()=>{if(!t||!t.length)return;let n=Math.floor(Math.random()*225),i=t.map(a=>{let{color:l}=a,c=xr(l).rotate(n).toHex();return{...a,color:c}});r(i)},[t,r]);return window.__experimentalEnableColorRandomizer?[o]:[]}var Gj=s(qv(),1),{lock:V8e,unlock:rt}=(0,Gj.__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/global-styles-ui");var qs=s(C(),1),{useHasDimensionsPanel:Bve,useHasTypographyPanel:Mve,useHasColorPanel:Lve,useSettingsForBlockElement:Vve,useHasBackgroundPanel:jve}=rt(Yj.privateApis);function zve(){let[e]=pe(""),t=Vve(e),r=jve(e),o=Mve(t),n=Lve(t),i=!0,l=Bve(t);return(0,qs.jsx)(qs.Fragment,{children:(0,qs.jsxs)(Wj.__experimentalItemGroup,{children:[o&&(0,qs.jsx)(fr,{icon:JA,path:"/typography",children:(0,Rf.__)("Typography")}),n&&(0,qs.jsx)(fr,{icon:MR,path:"/colors",children:(0,Rf.__)("Colors")}),r&&(0,qs.jsx)(fr,{icon:pR,path:"/background","aria-label":(0,Rf.__)("Background styles"),children:(0,Rf.__)("Background")}),i&&(0,qs.jsx)(fr,{icon:Hv,path:"/shadows",children:(0,Rf.__)("Shadows")}),l&&(0,qs.jsx)(fr,{icon:Bs,path:"/layout",children:(0,Rf.__)("Layout")})]})})}var qj=zve;var Ba=s(A(),1);function Qp(){let[e="black"]=Ee("color.text"),[t="white"]=Ee("color.background"),[r=e]=Ee("elements.h1.color.text"),[o=r]=Ee("elements.link.color.text"),[n=o]=Ee("elements.button.color.background"),[i]=pe("color.palette.core")||[],[a]=pe("color.palette.theme")||[],[l]=pe("color.palette.custom")||[],c=(a??[]).concat(l??[]).concat(i??[]),u=c.filter(({color:m})=>m===e),d=c.filter(({color:m})=>m===n),f=u.concat(d).concat(c).filter(({color:m})=>m!==t).slice(0,2);return{paletteColors:c,highlightedColors:f}}var Xj=s(D(),1),Qj=s(A(),1),T6=s(E(),1);function Uve(e,t){return t.length===0?null:(t.sort((r,o)=>Math.abs(e-r)-Math.abs(e-o)),t[0])}function Hve(e){let t=[];return e.forEach(r=>{let o=String(r.fontWeight).split(" ");if(o.length===2){let n=parseInt(o[0]),i=parseInt(o[1]);for(let a=n;a<=i;a+=100)t.push(a)}else o.length===1&&t.push(parseInt(o[0]))}),t}function Zj(e){let t=/^(?!generic\([ a-zA-Z\-]+\)$)(?!^[a-zA-Z\-]+$).+/,r=e.trim(),o=n=>(n=n.trim(),n.match(t)?(n=n.replace(/^["']|["']$/g,""),`"${n}"`):n);return r.includes(",")?r.split(",").map(o).filter(n=>n!=="").join(", "):o(r)}function C6(e){if(!e)return"";let t=e.trim();return t.includes(",")&&(t=(t.split(",").find(r=>r.trim()!=="")??"").trim()),t=t.replace(/^["']|["']$/g,""),window.navigator.userAgent.toLowerCase().includes("firefox")&&(t=`"${t}"`),t}function Af(e){let t={fontFamily:Zj(e.fontFamily)};if(!("fontFace"in e)||!Array.isArray(e.fontFace))return t.fontWeight="400",t.fontStyle="normal",t;if(e.fontFace){let r=e.fontFace.filter(o=>o?.fontStyle&&o.fontStyle.toLowerCase()==="normal");if(r.length>0){t.fontStyle="normal";let o=Hve(r),n=Uve(400,o);t.fontWeight=String(n)||"400"}else t.fontStyle=e.fontFace.length&&e.fontFace[0].fontStyle||"normal",t.fontWeight=e.fontFace.length&&String(e.fontFace[0].fontWeight)||"400"}return t}function Kj(e){return{fontFamily:Zj(e.fontFamily),fontStyle:e.fontStyle||"normal",fontWeight:e.fontWeight||"400"}}var bb=s(C(),1);function ex({fontSize:e,variation:t}){let{base:r}=(0,Xj.useContext)(Br),o=r;t&&(o={...r,...t});let[n]=Ee("color.text"),[i,a]=Vj(o),l=i?Af(i):{},c=a?Af(a):{};return n&&(l.color=n,c.color=n),e&&(l.fontSize=e,c.fontSize=e),(0,bb.jsxs)(Qj.__unstableMotion.div,{animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:.3,type:"tween"},style:{textAlign:"center",lineHeight:1},children:[(0,bb.jsx)("span",{style:c,children:(0,T6._x)("A","Uppercase letter A")}),(0,bb.jsx)("span",{style:l,children:(0,T6._x)("a","Lowercase letter A")})]})}var Jj=s(A(),1);var $j=s(C(),1);function ez({normalizedColorSwatchSize:e,ratio:t}){let{highlightedColors:r}=Qp(),o=e*t;return r.map(({slug:n,color:i},a)=>(0,$j.jsx)(Jj.__unstableMotion.div,{style:{height:o,width:o,background:i,borderRadius:o/2},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:a===1?.2:.1}},`${n}-${a}`))}var oz=s(A(),1),Jp=s(he(),1),Of=s(D(),1);var Fu=s(C(),1),tz=248,rz=152,Gve={leading:!0,trailing:!0};function Wve({children:e,label:t,isFocused:r,withHoverView:o}){let[n="white"]=Ee("color.background"),[i]=Ee("color.gradient"),a=(0,Jp.useReducedMotion)(),[l,c]=(0,Of.useState)(!1),[u,{width:d}]=(0,Jp.useResizeObserver)(),[f,m]=(0,Of.useState)(d),[h,g]=(0,Of.useState)(),v=(0,Jp.useThrottle)(m,250,Gve);(0,Of.useLayoutEffect)(()=>{d&&v(d)},[d,v]),(0,Of.useLayoutEffect)(()=>{let S=f?f/tz:1,x=S-(h||0);(Math.abs(x)>.1||!h)&&g(S)},[f,h]);let y=d?d/tz:1,b=h||y;return(0,Fu.jsxs)(Fu.Fragment,{children:[(0,Fu.jsx)("div",{style:{position:"relative"},children:u}),!!d&&(0,Fu.jsx)("div",{className:"global-styles-ui-preview__wrapper",style:{height:rz*b},onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),tabIndex:-1,children:(0,Fu.jsx)(oz.__unstableMotion.div,{style:{height:rz*b,width:"100%",background:i??n,cursor:o?"pointer":void 0},initial:"start",animate:(l||r)&&!a&&t?"hover":"start",children:[].concat(e).map((S,x)=>S({ratio:b,key:x}))})})]})}var $p=Wve;var ri=s(C(),1),Yve={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},qve={hover:{opacity:1},start:{opacity:.5}},Zve={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}};function Kve({label:e,isFocused:t,withHoverView:r,variation:o}){let[n]=Ee("typography.fontWeight"),[i="serif"]=Ee("typography.fontFamily"),[a=i]=Ee("elements.h1.typography.fontFamily"),[l=n]=Ee("elements.h1.typography.fontWeight"),[c="black"]=Ee("color.text"),[u=c]=Ee("elements.h1.color.text"),{paletteColors:d}=Qp();return(0,ri.jsxs)($p,{label:e,isFocused:t,withHoverView:r,children:[({ratio:f,key:m})=>(0,ri.jsx)(Ba.__unstableMotion.div,{variants:Yve,style:{height:"100%",overflow:"hidden"},children:(0,ri.jsxs)(Ba.__experimentalHStack,{spacing:10*f,justify:"center",style:{height:"100%",overflow:"hidden"},children:[(0,ri.jsx)(ex,{fontSize:65*f,variation:o}),(0,ri.jsx)(Ba.__experimentalVStack,{spacing:4*f,children:(0,ri.jsx)(ez,{normalizedColorSwatchSize:32,ratio:f})})]})},m),({key:f})=>(0,ri.jsx)(Ba.__unstableMotion.div,{variants:r?qve:void 0,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1},children:(0,ri.jsx)(Ba.__experimentalHStack,{spacing:0,justify:"flex-start",style:{height:"100%",overflow:"hidden"},children:d.slice(0,4).map(({color:m},h)=>(0,ri.jsx)("div",{style:{height:"100%",background:m,flexGrow:1}},h))})},f),({ratio:f,key:m})=>(0,ri.jsx)(Ba.__unstableMotion.div,{variants:Zve,style:{height:"100%",width:"100%",overflow:"hidden",position:"absolute",top:0},children:(0,ri.jsx)(Ba.__experimentalVStack,{spacing:3*f,justify:"center",style:{height:"100%",overflow:"hidden",padding:10*f,boxSizing:"border-box"},children:e&&(0,ri.jsx)("div",{style:{fontSize:40*f,fontFamily:a,color:u,fontWeight:l,lineHeight:"1em",textAlign:"center"},children:e})})},m)]})}var tx=Kve;var Cr=s(C(),1);function Xve(){let e=(0,nz.useSelect)(t=>{let{__experimentalGetCurrentThemeGlobalStylesVariations:r}=t(iz.store);return!!r()?.length},[]);return(0,Cr.jsxs)(mr.Card,{size:"small",isBorderless:!0,className:"global-styles-ui-screen-root",isRounded:!1,children:[(0,Cr.jsx)(mr.CardBody,{children:(0,Cr.jsxs)(mr.__experimentalVStack,{spacing:4,children:[(0,Cr.jsx)(mr.Card,{className:"global-styles-ui-screen-root__active-style-tile",children:(0,Cr.jsx)(mr.CardMedia,{className:"global-styles-ui-screen-root__active-style-tile-preview",children:(0,Cr.jsx)(tx,{})})}),e&&(0,Cr.jsx)(mr.__experimentalItemGroup,{children:(0,Cr.jsx)(fr,{path:"/variations",children:(0,Cr.jsxs)(mr.__experimentalHStack,{justify:"space-between",children:[(0,Cr.jsx)(mr.FlexItem,{children:(0,If.__)("Browse styles")}),(0,Cr.jsx)(vb,{icon:(0,If.isRTL)()?Nt:Ft})]})})}),(0,Cr.jsx)(qj,{})]})}),(0,Cr.jsx)(mr.CardDivider,{}),(0,Cr.jsxs)(mr.CardBody,{children:[(0,Cr.jsx)(mr.__experimentalSpacer,{as:"p",paddingTop:2,paddingX:"13px",marginBottom:4,children:(0,If.__)("Customize the appearance of specific blocks for the whole site.")}),(0,Cr.jsx)(mr.__experimentalItemGroup,{children:(0,Cr.jsx)(fr,{path:"/blocks",children:(0,Cr.jsxs)(mr.__experimentalHStack,{justify:"space-between",children:[(0,Cr.jsx)(mr.FlexItem,{children:(0,If.__)("Blocks")}),(0,Cr.jsx)(vb,{icon:(0,If.isRTL)()?Nt:Ft})]})})})]})]})}var sz=Xve;var k6=s(Xe(),1),Ma=s(E(),1),Du=s(A(),1),E6=s(O(),1),La=s(D(),1),ox=s($(),1),dz=s(he(),1),fz=s(Xm(),1);var az=s(Xe(),1),lz=s(O(),1),cz=s(A(),1);var P6=s(C(),1);function Qve(e,t){return e?.filter(r=>r.source==="block"||t.includes(r.name))||[]}function Sb(e){let t=(0,lz.useSelect)(n=>{let{getBlockStyles:i}=n(az.store);return i(e)},[e]),[r]=Ee("variations",e),o=Object.keys(r??{});return Qve(t,o)}function uz({name:e}){let t=Sb(e);return(0,P6.jsx)(cz.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map((r,o)=>r?.isDefault?null:(0,P6.jsx)(fr,{path:"/blocks/"+encodeURIComponent(e)+"/variations/"+encodeURIComponent(r.name),children:r.label},o))})}var rn=s(A(),1),rx=s(E(),1);var Zs=s(C(),1);function St({title:e,description:t,onBack:r}){return(0,Zs.jsx)(rn.__experimentalVStack,{spacing:0,children:(0,Zs.jsx)(rn.__experimentalView,{children:(0,Zs.jsx)(rn.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,Zs.jsxs)(rn.__experimentalVStack,{spacing:2,children:[(0,Zs.jsxs)(rn.__experimentalHStack,{spacing:2,children:[(0,Zs.jsx)(rn.Navigator.BackButton,{icon:(0,rx.isRTL)()?Ft:Nt,size:"small",label:(0,rx.__)("Back"),onClick:r}),(0,Zs.jsx)(rn.__experimentalSpacer,{children:(0,Zs.jsx)(rn.__experimentalHeading,{className:"global-styles-ui-header",level:2,size:13,children:e})})]}),t&&(0,Zs.jsx)(rn.__experimentalText,{className:"global-styles-ui-header__description",children:t})]})})})})}var Nn=s(C(),1),{useHasDimensionsPanel:Jve,useHasTypographyPanel:$ve,useHasBorderPanel:eye,useSettingsForBlockElement:tye,useHasColorPanel:rye}=rt(ox.privateApis);function oye(){let e=(0,E6.useSelect)(n=>n(k6.store).getBlockTypes(),[]),t=(n,i)=>{let{core:a,noncore:l}=n;return(i.name.startsWith("core/")?a:l).push(i),n},{core:r,noncore:o}=e.reduce(t,{core:[],noncore:[]});return[...r,...o]}function nye(e){let[t]=pe("",e),r=tye(t,e),o=$ve(r),n=rye(r),i=eye(r),a=Jve(r),l=i||a,c=!!Sb(e)?.length;return o||n||l||c}function iye({block:e}){return nye(e.name)?(0,Nn.jsx)(fr,{path:"/blocks/"+encodeURIComponent(e.name),children:(0,Nn.jsxs)(Du.__experimentalHStack,{justify:"flex-start",children:[(0,Nn.jsx)(ox.BlockIcon,{icon:e.icon}),(0,Nn.jsx)(Du.FlexItem,{children:e.title})]})}):null}function sye({filterValue:e}){let t=oye(),r=(0,dz.useDebounce)(fz.speak,500),{isMatchingSearchTerm:o}=(0,E6.useSelect)(k6.store),n=e?t.filter(a=>o(a,e)):t,i=(0,La.useRef)(null);return(0,La.useEffect)(()=>{if(!e)return;let a=i.current?.childElementCount||0,l=(0,Ma.sprintf)((0,Ma._n)("%d result found.","%d results found.",a),a);r(l,"polite")},[e,r]),(0,Nn.jsx)("div",{ref:i,className:"global-styles-ui-block-types-item-list",role:"list",children:n.length===0?(0,Nn.jsx)(Du.__experimentalText,{align:"center",as:"p",children:(0,Ma.__)("No blocks found.")}):n.map(a=>(0,Nn.jsx)(iye,{block:a},"menu-itemblock-"+a.name))})}var aye=(0,La.memo)(sye);function lye(){let[e,t]=(0,La.useState)(""),r=(0,La.useDeferredValue)(e);return(0,Nn.jsxs)(Nn.Fragment,{children:[(0,Nn.jsx)(St,{title:(0,Ma.__)("Blocks"),description:(0,Ma.__)("Customize the appearance of specific blocks and for the whole site.")}),(0,Nn.jsx)(Du.SearchControl,{className:"global-styles-ui-block-types-search",onChange:t,value:e,label:(0,Ma.__)("Search"),placeholder:(0,Ma.__)("Search")}),(0,Nn.jsx)(aye,{filterValue:r})]})}var mz=lye;var Sz=s(Xe(),1),_z=s($(),1),eh=s(D(),1),wz=s(O(),1),xz=s(W(),1),Nf=s(A(),1),th=s(E(),1);var pz=s($(),1),ix=s(Xe(),1),hz=s(A(),1),gz=s(D(),1);var nx=s(C(),1),cye=({name:e,variation:t=""})=>{let r=(0,ix.getBlockType)(e)?.example,o=(0,gz.useMemo)(()=>{if(!r)return null;let u={...r,attributes:{...r.attributes,style:void 0,className:t?jj(t):r.attributes?.className}};return(0,ix.getBlockFromExample)(e,u)},[e,r,t]),n=r?.viewportWidth??500,i=144,l=235/n,c=l!==0&&l<1&&i?i/l:i;return r?(0,nx.jsx)(hz.__experimentalSpacer,{marginX:4,marginBottom:4,children:(0,nx.jsx)("div",{className:"global-styles-ui__block-preview-panel",style:{maxHeight:i,boxSizing:"initial"},children:(0,nx.jsx)(pz.BlockPreview,{blocks:o,viewportWidth:n,minHeight:i,additionalStyles:[{css:`
								body{
									padding: 24px;
									min-height:${Math.round(c)}px;
									display:flex;
									align-items:center;
								}
								.is-root-container { width: 100%; }
							`}]})})}):null},vz=cye;var yz=s(A(),1),bz=s(C(),1);function Tr({children:e,level:t=2}){return(0,bz.jsx)(yz.__experimentalHeading,{className:"global-styles-ui-subtitle",level:t,children:e})}var Yr=s(C(),1),uye={backgroundSize:"cover",backgroundPosition:"50% 50%"};function _b(e){if(!e)return e;let t=e.color||e.width;if(!e.style&&t)return{...e,style:"solid"};if(!(e.style&&!t))return e}function dye(e){return e&&((0,Nf.__experimentalHasSplitBorders)(e)?{top:_b(e.top),right:_b(e.right),bottom:_b(e.bottom),left:_b(e.left)}:_b(e))}var{useHasDimensionsPanel:fye,useHasTypographyPanel:mye,useHasBorderPanel:pye,useSettingsForBlockElement:hye,useHasColorPanel:gye,useHasFiltersPanel:vye,useHasImageSettingsPanel:yye,useHasBackgroundPanel:bye,BackgroundPanel:Sye,BorderPanel:_ye,ColorPanel:wye,TypographyPanel:xye,DimensionsPanel:Cye,FiltersPanel:Tye,ImageSettingsPanel:Pye,AdvancedPanel:kye}=rt(_z.privateApis);function Eye({name:e,variation:t}){let{user:r,onChange:o}=(0,eh.useContext)(Br),n=[];t&&(n=["variations",t].concat(n));let i=n.join("."),[a]=Ee(i,e,"user",!1),[l,c]=Ee(i,e,"merged",!1),[u]=pe("",e,"user"),[d,f]=pe("",e),m=hye(d,e),h=(0,Sz.getBlockType)(e),g=!1;m?.spacing?.blockGap&&h?.supports?.spacing?.blockGap&&(h?.supports?.spacing?.__experimentalSkipSerialization===!0||h?.supports?.spacing?.__experimentalSkipSerialization?.some?.(V=>V==="blockGap"))&&(g=!0);let v=!1;m?.dimensions?.aspectRatio&&e==="core/group"&&(v=!0);let y=(0,eh.useMemo)(()=>{let V=structuredClone(m);return g&&(V.spacing.blockGap=!1),v&&(V.dimensions.aspectRatio=!1),V},[m,g,v]),b=Sb(e),_=bye(y),S=mye(y),x=gye(y),T=pye(y),R=fye(y),F=vye(y),B=yye(e,u,y),z=!!b?.length&&!t,{canEditCSS:L}=(0,wz.useSelect)(V=>{let{getEntityRecord:j,__experimentalGetCurrentGlobalStylesId:H}=V(xz.store),X=H();return{canEditCSS:!!(X?j("root","globalStyles",X):void 0)?._links?.["wp:action-edit-css"]}},[]),M=t?b.find(V=>V.name===t):null,k=(0,eh.useMemo)(()=>({...l,layout:y.layout}),[l,y.layout]),I=(0,eh.useMemo)(()=>({...a,layout:u.layout}),[a,u.layout]),U=V=>{let j={...V};delete j.layout,c(j),V.layout!==u.layout&&f({...u,layout:V.layout})},G=V=>{f(V===void 0?{...d,lightbox:void 0}:{...d,lightbox:{...d.lightbox,...V}})},Y=V=>{let{settings:j,...H}=V;if(j?.typography){let X=Dy(r,i,H,e);X=Oy(X,"typography",{...u.typography,...j.typography},e),o(X)}else c(H)},Z=V=>{if(!V?.border){c(V);return}let{radius:j,...H}=V.border,X=dye(H),ae=(0,Nf.__experimentalHasSplitBorders)(X)?{color:null,style:null,width:null,...X}:{top:X,right:X,bottom:X,left:X};c({...V,border:{...ae,radius:j}})};return(0,Yr.jsxs)(Yr.Fragment,{children:[(0,Yr.jsx)(St,{title:t?M?.label:h?.title}),(0,Yr.jsx)(vz,{name:e,variation:t}),z&&(0,Yr.jsx)("div",{className:"global-styles-ui-screen-variations",children:(0,Yr.jsxs)(Nf.__experimentalVStack,{spacing:3,children:[(0,Yr.jsx)(Tr,{children:(0,th.__)("Style Variations")}),(0,Yr.jsx)(uz,{name:e})]})}),x&&(0,Yr.jsx)(wye,{inheritedValue:l,value:a,onChange:c,settings:y}),_&&(0,Yr.jsx)(Sye,{inheritedValue:l,value:a,onChange:c,settings:y,defaultValues:uye}),S&&(0,Yr.jsx)(xye,{inheritedValue:l,value:a,onChange:Y,settings:y,isGlobalStyles:!0}),R&&(0,Yr.jsx)(Cye,{inheritedValue:k,value:I,onChange:U,settings:y,includeLayoutControls:!0}),T&&(0,Yr.jsx)(_ye,{inheritedValue:l,value:a,onChange:Z,settings:y}),F&&(0,Yr.jsx)(Tye,{inheritedValue:k,value:I,onChange:c,settings:y,includeLayoutControls:!0}),B&&(0,Yr.jsx)(Pye,{onChange:G,value:u,inheritedValue:y}),L&&(0,Yr.jsx)(Nf.PanelBody,{title:(0,th.__)("Advanced"),initialOpen:!1,children:(0,Yr.jsx)(kye,{value:a,onChange:c,inheritedValue:l,help:(0,th.sprintf)((0,th.__)("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."),h?.title)})})]})}var R6=Eye;var Ax=s(E(),1),MU=s(A(),1),LU=s(D(),1);var Cz=s(A(),1);var Tz=s(C(),1);function Bu({children:e,className:t}){return(0,Tz.jsx)(Cz.__experimentalSpacer,{className:re("global-styles-ui-screen-body",t),padding:4,children:e})}var Mu=s(E(),1),Xl=s(A(),1);var oi=s(C(),1);function wb({parentMenu:e,element:t,label:r}){let o=t==="text"||!t?"":`elements.${t}.`,n=t==="link"?{textDecoration:"underline"}:{},[i]=Ee(o+"typography.fontFamily"),[a]=Ee(o+"typography.fontStyle"),[l]=Ee(o+"typography.fontWeight"),[c]=Ee(o+"color.background"),[u]=Ee("color.background"),[d]=Ee(o+"color.gradient"),[f]=Ee(o+"color.text");return(0,oi.jsx)(fr,{path:e+"/typography/"+t,children:(0,oi.jsxs)(Xl.__experimentalHStack,{justify:"flex-start",children:[(0,oi.jsx)(Xl.FlexItem,{className:"global-styles-ui-screen-typography__indicator","aria-hidden":"true",style:{fontFamily:i??"serif",background:d??c??u,color:f,fontStyle:a,fontWeight:l,...n},children:(0,Mu.__)("Aa")}),(0,oi.jsx)(Xl.FlexItem,{children:r})]})})}function Rye(){return(0,oi.jsxs)(Xl.__experimentalVStack,{spacing:3,children:[(0,oi.jsx)(Tr,{level:3,children:(0,Mu.__)("Elements")}),(0,oi.jsxs)(Xl.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:[(0,oi.jsx)(wb,{parentMenu:"",element:"text",label:(0,Mu.__)("Text")}),(0,oi.jsx)(wb,{parentMenu:"",element:"link",label:(0,Mu.__)("Links")}),(0,oi.jsx)(wb,{parentMenu:"",element:"heading",label:(0,Mu.__)("Headings")}),(0,oi.jsx)(wb,{parentMenu:"",element:"caption",label:(0,Mu.__)("Captions")}),(0,oi.jsx)(wb,{parentMenu:"",element:"button",label:(0,Mu.__)("Buttons")})]})]})}var Pz=Rye;var lx=s(A(),1);var kz=s(A(),1);var sx=s(C(),1),Aye=({variation:e,isFocused:t,withHoverView:r})=>(0,sx.jsx)($p,{label:e.title,isFocused:t,withHoverView:r,children:({ratio:o,key:n})=>(0,sx.jsx)(kz.__experimentalHStack,{spacing:10*o,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,sx.jsx)(ex,{variation:e,fontSize:85*o})},n)}),Ez=Aye;var Rz=s(A(),1),Ff=s(D(),1),Az=s(yo(),1),ax=s(E(),1);var xb=s(C(),1);function rh({variation:e,children:t,isPill:r=!1,properties:o,showTooltip:n=!1}){let[i,a]=(0,Ff.useState)(!1),{base:l,user:c,onChange:u}=(0,Ff.useContext)(Br),d=(0,Ff.useMemo)(()=>{let y=go(l,e);return o&&(y=Qw(y,o)),{user:e,base:l,merged:y,onChange:()=>{}}},[e,l,o]),f=()=>u(e),m=y=>{y.keyCode===Az.ENTER&&(y.preventDefault(),f())},h=(0,Ff.useMemo)(()=>pf(c,e),[c,e]),g=e?.title;e?.description&&(g=(0,ax.sprintf)((0,ax._x)("%1$s (%2$s)","variation label"),e?.title,e?.description));let v=(0,xb.jsx)("div",{className:re("global-styles-ui-variations_item",{"is-active":h}),role:"button",onClick:f,onKeyDown:m,tabIndex:0,"aria-label":g,"aria-current":h,onFocus:()=>a(!0),onBlur:()=>a(!1),children:(0,xb.jsx)("div",{className:re("global-styles-ui-variations_item-preview",{"is-pill":r}),children:t(i)})});return(0,xb.jsx)(Br.Provider,{value:d,children:n?(0,xb.jsx)(Rz.Tooltip,{text:e?.title,children:v}):v})}var Df=s(C(),1),Oz=["typography"];function oh({title:e,gap:t=2}){let r=$w(Oz);return r?.length<=1?null:(0,Df.jsxs)(lx.__experimentalVStack,{spacing:3,children:[e&&(0,Df.jsx)(Tr,{level:3,children:e}),(0,Df.jsx)(lx.__experimentalGrid,{columns:3,gap:t,className:"global-styles-ui-style-variations-container",children:r.map((o,n)=>(0,Df.jsx)(rh,{variation:o,properties:Oz,showTooltip:!0,children:()=>(0,Df.jsx)(Ez,{variation:o})},n))})]})}var zf=s(E(),1),Xs=s(A(),1);var FU=s(D(),1);var Jl=s(D(),1),ju=s(O(),1),Vu=s(W(),1),N6=s(E(),1);var A6=s(Qm(),1),Iz=s(W(),1),Nz="/wp/v2/font-families";function Fz(e){let{receiveEntityRecords:t}=e.dispatch(Iz.store);t("postType","wp_font_family",[],void 0,!0)}async function Dz(e,t){let o=await(0,A6.default)({path:Nz,method:"POST",body:e});return Fz(t),{id:o.id,...o.font_family_settings,fontFace:[]}}async function Bz(e,t,r){let o={path:`${Nz}/${e}/font-faces`,method:"POST",body:t},n=await(0,A6.default)(o);return Fz(r),{id:n.id,...n.font_face_settings}}var Vz=s(A(),1);var cs=s(E(),1),O6=["otf","ttf","woff","woff2"],Mz={100:(0,cs._x)("Thin","font weight"),200:(0,cs._x)("Extra-light","font weight"),300:(0,cs._x)("Light","font weight"),400:(0,cs._x)("Normal","font weight"),500:(0,cs._x)("Medium","font weight"),600:(0,cs._x)("Semi-bold","font weight"),700:(0,cs._x)("Bold","font weight"),800:(0,cs._x)("Extra-bold","font weight"),900:(0,cs._x)("Black","font weight")},Lz={normal:(0,cs._x)("Normal","font style"),italic:(0,cs._x)("Italic","font style")};var{File:jz}=window,{kebabCase:Oye}=rt(Vz.privateApis);function Ql(e,t={}){return!e.name&&(e.fontFamily||e.slug)&&(e.name=e.fontFamily||e.slug),{...e,...t}}function Iye(e){return typeof e!="string"?!1:e!==decodeURIComponent(e)}function cx(e){let t=Mz[e.fontWeight??""]||e.fontWeight,r=e.fontStyle==="normal"?"":Lz[e.fontStyle??""]||e.fontStyle;return`${t} ${r}`}function Nye(e=[],t=[]){let r=new Map;for(let o of e)r.set(`${o.fontWeight}${o.fontStyle}`,o);for(let o of t)r.set(`${o.fontWeight}${o.fontStyle}`,o);return Array.from(r.values())}function zz(e=[],t=[]){let r=new Map;for(let o of e)r.set(o.slug,{...o});for(let o of t)if(r.has(o.slug)){let{fontFace:n,...i}=o,a=r.get(o.slug),l=Nye(a.fontFace,n);r.set(o.slug,{...i,fontFace:l})}else r.set(o.slug,{...o});return Array.from(r.values())}async function Lu(e,t,r="all"){let o;if(typeof t=="string")o=`url(${t})`;else if(t instanceof jz)o=await t.arrayBuffer();else return;let i=await new window.FontFace(C6(e.fontFamily),o,{style:e.fontStyle,weight:String(e.fontWeight)}).load();if((r==="document"||r==="all")&&document.fonts.add(i),r==="iframe"||r==="all"){let a=document.querySelector('iframe[name="editor-canvas"]');a?.contentDocument&&a.contentDocument.fonts.add(i)}}function Cb(e,t="all"){let r=o=>{o.forEach(n=>{n.family===C6(e?.fontFamily)&&n.weight===e?.fontWeight&&n.style===e?.fontStyle&&o.delete(n)})};if((t==="document"||t==="all")&&r(document.fonts),t==="iframe"||t==="all"){let o=document.querySelector('iframe[name="editor-canvas"]');o?.contentDocument&&r(o.contentDocument.fonts)}}function nh(e){if(!e)return;let t;if(Array.isArray(e)?t=e[0]:t=e,!t.startsWith("file:."))return Iye(t)||(t=encodeURI(t)),t}function Uz(e){let t=new FormData,{fontFace:r,category:o,...n}=e,i={...n,slug:Oye(e.slug)};return t.append("font_family_settings",JSON.stringify(i)),t}function Hz(e){return(e?.fontFace??[]).map((r,o)=>{let n={...r},i=new FormData;if(n.file){let a=Array.isArray(n.file)?n.file:[n.file],l=[];a.forEach((c,u)=>{let d=`file-${o}-${u}`;i.append(d,c,c.name),l.push(d)}),n.src=l.length===1?l[0]:l,delete n.file,i.append("font_face_settings",JSON.stringify(n))}else i.append("font_face_settings",JSON.stringify(n));return i})}async function Gz(e,t,r){let o=[];for(let i of t)try{let a=await Bz(e,i,r);o.push({status:"fulfilled",value:a})}catch(a){o.push({status:"rejected",reason:a})}let n={errors:[],successes:[]};return o.forEach((i,a)=>{if(i.status==="fulfilled"&&i.value){let l=i.value;n.successes.push(l)}else i.reason&&n.errors.push({data:t[a],message:i.reason.message})}),n}async function Wz(e){e=Array.isArray(e)?e:[e];let t=await Promise.all(e.map(async r=>fetch(new Request(r)).then(o=>{if(!o.ok)throw new Error(`Error downloading font face asset from ${r}. Server responded with status: ${o.status}`);return o.blob()}).then(o=>{let n=r.split("/").pop();return new jz([o],n,{type:o.type})})));return t.length===1?t[0]:t}function I6(e,t){return t.findIndex(r=>r.fontWeight===e.fontWeight&&r.fontStyle===e.fontStyle)!==-1}function Yz(e,t,r){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};let o=t.pop(),n=e;for(let i of t){let a=n[i];n=n[i]=Array.isArray(a)?[...a]:{...a}}return n[o]=r,e}function ux(e,t,r=[]){let o=c=>c.slug===e.slug,n=c=>c.find(o),i=c=>c?r.filter(u=>!o(u)):[...r,e],a=c=>{let u=f=>f.fontWeight===t.fontWeight&&f.fontStyle===t.fontStyle;if(!c)return[...r,{...e,fontFace:[t]}];let d=c.fontFace||[];return d.find(u)?d=d.filter(f=>!u(f)):d=[...d,t],d.length===0?r.filter(f=>!o(f)):r.map(f=>o(f)?{...f,fontFace:d}:f)},l=n(r);return t?a(l):i(l)}var qz=s(C(),1),Lo=(0,Jl.createContext)({});Lo.displayName="FontLibraryContext";function Fye({children:e}){let t=(0,ju.useRegistry)(),{saveEntityRecord:r,deleteEntityRecord:o}=(0,ju.useDispatch)(Vu.store),{globalStylesId:n}=(0,ju.useSelect)(j=>{let{__experimentalGetCurrentGlobalStylesId:H}=j(Vu.store);return{globalStylesId:H()}},[]),i=(0,Vu.useEntityRecord)("root","globalStyles",n),[a,l]=(0,Jl.useState)(!1),{records:c=[],isResolving:u}=(0,Vu.useEntityRecords)("postType","wp_font_family",{_embed:!0}),d=(c||[]).map(j=>({id:j.id,...j.font_family_settings||{},fontFace:j?._embedded?.font_faces?.map(H=>H.font_face_settings)||[]}))||[],[f,m]=pe("typography.fontFamilies"),h=async j=>{if(!i.record)return;let H=i.record,X=Yz(H??{},["settings","typography","fontFamilies"],j);await r("root","globalStyles",X)},[g,v]=(0,Jl.useState)(""),[y,b]=(0,Jl.useState)(void 0),_=f?.theme?f.theme.map(j=>Ql(j,{source:"theme"})).sort((j,H)=>j.name.localeCompare(H.name)):[],S=f?.custom?f.custom.map(j=>Ql(j,{source:"custom"})).sort((j,H)=>j.name.localeCompare(H.name)):[],x=d?d.map(j=>Ql(j,{source:"custom"})).sort((j,H)=>j.name.localeCompare(H.name)):[];(0,Jl.useEffect)(()=>{g||b(void 0)},[g]);let T=j=>{if(!j){b(void 0);return}let X=(j.source==="theme"?_:x).find(ae=>ae.slug===j.slug);b({...X||j,source:j.source})},[R]=(0,Jl.useState)(new Set),F=j=>j.reduce((X,ae)=>{let ne=ae?.fontFace&&ae.fontFace?.length>0?ae?.fontFace.map(ue=>`${ue.fontStyle??""}${ue.fontWeight??""}`):["normal400"];return X[ae.slug]=ne,X},{}),B=j=>F(j==="theme"?_:S),z=(j,H,X,ae)=>!H&&!X?!!B(ae)[j]:!!B(ae)[j]?.includes((H??"")+(X??"")),L=(j,H)=>B(H)[j]||[];async function M(j){l(!0);try{let H=[],X=[];for(let ne of j){let ue=!1,Ye=await(0,ju.resolveSelect)(Vu.store).getEntityRecords("postType","wp_font_family",{slug:ne.slug,per_page:1,_embed:!0}),ye=Ye&&Ye.length>0?Ye[0]:null,oe=ye?{id:ye.id,...ye.font_family_settings,fontFace:(ye?._embedded?.font_faces??[]).map(Ve=>Ve.font_face_settings)||[]}:null;oe||(ue=!0,oe=await Dz(Uz(ne),t));let ge=oe.fontFace&&ne.fontFace?oe.fontFace.filter(Ve=>Ve&&ne.fontFace&&I6(Ve,ne.fontFace)):[];oe.fontFace&&ne.fontFace&&(ne.fontFace=ne.fontFace.filter(Ve=>!I6(Ve,oe.fontFace)));let Re=[],ze=[];if(ne?.fontFace?.length??!1){let Ve=await Gz(oe.id,Hz(ne),t);Re=Ve?.successes,ze=Ve?.errors}(Re?.length>0||ge?.length>0)&&(oe.fontFace=[...Re],H.push(oe)),oe&&!ne?.fontFace?.length&&H.push(oe),ue&&(ne?.fontFace?.length??0)>0&&Re?.length===0&&await o("postType","wp_font_family",oe.id,{force:!0}),X=X.concat(ze)}let ae=X.reduce((ne,ue)=>ne.includes(ue.message)?ne:[...ne,ue.message],[]);if(H.length>0){let ne=U(H);await h(ne)}if(ae.length>0){let ne=new Error((0,N6.__)("There was an error installing fonts."));throw ne.installationErrors=ae,ne}}finally{l(!1)}}async function k(j){if(!j?.id)throw new Error((0,N6.__)("Font family to uninstall is not defined."));try{await o("postType","wp_font_family",j.id,{force:!0});let H=I(j);return await h(H),{deleted:!0}}catch(H){throw console.error("There was an error uninstalling the font family:",H),H}}let I=j=>{let X=(f?.[j.source??""]??[]).filter(ne=>ne.slug!==j.slug),ae={...f,[j.source??""]:X};return m(ae),j.fontFace&&j.fontFace.forEach(ne=>{Cb(ne,"all")}),ae},U=j=>{let H=G(j),X={...f,custom:zz(f?.custom,H)};return m(X),Y(H),X},G=j=>j.map(({id:H,fontFace:X,...ae})=>({...ae,...X&&X.length>0?{fontFace:X.map(({id:ne,...ue})=>ue)}:{}})),Y=j=>{j.forEach(H=>{H.fontFace&&H.fontFace.forEach(X=>{let ae=nh(X?.src??"");ae&&Lu(X,ae,"all")})})},Z=(j,H)=>{let X=f?.[j.source??""]??[],ae=ux(j,H,X);m({...f,[j.source??""]:ae});let ne=z(j.slug,H?.fontStyle??"",H?.fontWeight??"",j.source??"custom");if(H&&ne)Cb(H,"all");else{let ue=nh(H?.src??"");H&&ue&&Lu(H,ue,"all")}},V=async j=>{if(!j.src)return;let H=nh(j.src);!H||R.has(H)||(Lu(j,H,"document"),R.add(H))};return(0,qz.jsx)(Lo.Provider,{value:{libraryFontSelected:y,handleSetLibraryFontSelected:T,fontFamilies:f??{},baseCustomFonts:x,isFontActivated:z,getFontFacesActivated:L,loadFontFaceAsset:V,installFonts:M,uninstallFontFamily:k,toggleActivateFont:Z,getAvailableFontsOutline:F,modalTabOpen:g,setModalTabOpen:v,saveFontFamilies:h,isResolvingLibrary:u,isInstalling:a},children:e})}var dx=Fye;var lh=s(E(),1),kx=s(A(),1),Ex=s(W(),1),RU=s(O(),1);var Qe=s(A(),1),Pb=s(W(),1),F6=s(O(),1),Mf=s(D(),1),er=s(E(),1);var sh=s(E(),1),us=s(A(),1);var Zz=s(A(),1),Va=s(D(),1);var fx=s(C(),1);function Dye(e){if(e.preview)return e.preview;if(e.src)return Array.isArray(e.src)?e.src[0]:e.src}function Bye(e){return"fontStyle"in e&&e.fontStyle||"fontWeight"in e&&e.fontWeight?e:"fontFace"in e&&e.fontFace&&e.fontFace.length?e.fontFace.find(t=>t.fontStyle==="normal"&&t.fontWeight==="400")||e.fontFace[0]:{fontStyle:"normal",fontWeight:"400",fontFamily:e.fontFamily}}function Mye({font:e,text:t}){let r=(0,Va.useRef)(null),o=Bye(e),n=Af(e);t=t||("name"in e?e.name:"");let i=e.preview,[a,l]=(0,Va.useState)(!1),[c,u]=(0,Va.useState)(!1),{loadFontFaceAsset:d}=(0,Va.useContext)(Lo),f=i??Dye(o),m=f&&f.match(/\.(png|jpg|jpeg|gif|svg)$/i),h=Kj(o),g={fontSize:"18px",lineHeight:1,opacity:c?"1":"0",...n,...h};return(0,Va.useEffect)(()=>{let v=new window.IntersectionObserver(([y])=>{l(y.isIntersecting)},{});return r.current&&v.observe(r.current),()=>v.disconnect()},[r]),(0,Va.useEffect)(()=>{(async()=>a&&(!m&&o.src&&await d(o),u(!0)))()},[o,a,d,m]),(0,fx.jsx)("div",{ref:r,children:m?(0,fx.jsx)("img",{src:f,loading:"lazy",alt:t,className:"font-library__font-variant_demo-image"}):(0,fx.jsx)(Zz.__experimentalText,{style:g,className:"font-library__font-variant_demo-text",children:t})})}var ih=Mye;var ja=s(C(),1);function Lye({font:e,onClick:t,variantsText:r,navigatorPath:o}){let n=e.fontFace?.length||1,i={cursor:t?"pointer":"default"},a=(0,us.useNavigator)();return(0,ja.jsx)(us.Button,{__next40pxDefaultSize:!0,onClick:()=>{t(),o&&a.goTo(o)},style:i,className:"font-library__font-card",children:(0,ja.jsxs)(us.Flex,{justify:"space-between",wrap:!1,children:[(0,ja.jsx)(ih,{font:e}),(0,ja.jsxs)(us.Flex,{justify:"flex-end",children:[(0,ja.jsx)(us.FlexItem,{children:(0,ja.jsx)(us.__experimentalText,{className:"font-library__font-card__count",children:r||(0,sh.sprintf)((0,sh._n)("%d variant","%d variants",n),n)})}),(0,ja.jsx)(us.FlexItem,{children:(0,ja.jsx)(No,{icon:(0,sh.isRTL)()?Nt:Ft})})]})]})})}var Tb=Lye;var mx=s(D(),1),px=s(A(),1);var Bf=s(C(),1);function Vye({face:e,font:t}){let{isFontActivated:r,toggleActivateFont:o}=(0,mx.useContext)(Lo),n=(t?.fontFace?.length??0)>0?r(t.slug,e.fontStyle,e.fontWeight,t.source):r(t.slug,void 0,void 0,t.source),i=()=>{if((t?.fontFace?.length??0)>0){o(t,e);return}o(t)},a=t.name+" "+cx(e),l=(0,mx.useId)();return(0,Bf.jsx)("div",{className:"font-library__font-card",children:(0,Bf.jsxs)(px.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,Bf.jsx)(px.CheckboxControl,{checked:n,onChange:i,id:l}),(0,Bf.jsx)("label",{htmlFor:l,children:(0,Bf.jsx)(ih,{font:e,text:a,onClick:i})})]})})}var Kz=Vye;function Xz(e){switch(e){case"normal":return 400;case"bold":return 700;case"bolder":return 500;case"lighter":return 300;default:return parseInt(e,10)}}function hx(e){return e.sort((t,r)=>t.fontStyle==="normal"&&r.fontStyle!=="normal"?-1:r.fontStyle==="normal"&&t.fontStyle!=="normal"?1:t.fontStyle===r.fontStyle?Xz(t.fontWeight?.toString()??"normal")-Xz(r.fontWeight?.toString()??"normal"):!t.fontStyle||!r.fontStyle?t.fontStyle?-1:1:t.fontStyle.localeCompare(r.fontStyle))}var We=s(C(),1);function jye(){let{baseCustomFonts:e,libraryFontSelected:t,handleSetLibraryFontSelected:r,uninstallFontFamily:o,isResolvingLibrary:n,isInstalling:i,saveFontFamilies:a,getFontFacesActivated:l}=(0,Mf.useContext)(Lo),[c,u]=pe("typography.fontFamilies"),[d,f]=(0,Mf.useState)(!1),[m,h]=(0,Mf.useState)(null),[g]=pe("typography.fontFamilies",void 0,"base"),v=(0,F6.useSelect)(V=>{let{__experimentalGetCurrentGlobalStylesId:j}=V(Pb.store);return j()},[]),b=!!(0,Pb.useEntityRecord)("root","globalStyles",v)?.edits?.settings?.typography?.fontFamilies,_=c?.theme?c.theme.map(V=>Ql(V,{source:"theme"})).sort((V,j)=>V.name.localeCompare(j.name)):[],S=new Set(_.map(V=>V.slug)),x=g?.theme?_.concat(g.theme.filter(V=>!S.has(V.slug)).map(V=>Ql(V,{source:"theme"})).sort((V,j)=>V.name.localeCompare(j.name))):[],T=t?.source==="custom"&&t?.id,R=(0,F6.useSelect)(V=>{let{canUser:j}=V(Pb.store);return T&&j("delete",{kind:"postType",name:"wp_font_family",id:T})},[T]),F=!!t&&t?.source!=="theme"&&R,B=()=>{f(!0)},z=async()=>{h(null);try{await a(c),h({type:"success",message:(0,er.__)("Font family updated successfully.")})}catch(V){h({type:"error",message:(0,er.sprintf)((0,er.__)("There was an error updating the font family. %s"),V.message)})}},L=V=>V?!V.fontFace||!V.fontFace.length?[{fontFamily:V.fontFamily,fontStyle:"normal",fontWeight:"400"}]:hx(V.fontFace):[],M=V=>{let j=V?.fontFace&&(V?.fontFace?.length??0)>0?V.fontFace.length:1,H=l(V.slug,V.source).length;return(0,er.sprintf)((0,er.__)("%1$d/%2$d variants active"),H,j)};(0,Mf.useEffect)(()=>{r(t)},[]);let k=t?l(t.slug,t.source).length:0,I=t?.fontFace?.length??(t?.fontFamily?1:0),U=k>0&&k!==I,G=k===I,Y=()=>{if(!t||!t?.source)return;let V=c?.[t.source]?.filter(H=>H.slug!==t.slug)??[],j=G?V:[...V,t];u({...c,[t.source]:j}),t.fontFace&&t.fontFace.forEach(H=>{if(G)Cb(H,"all");else{let X=nh(H?.src??"");X&&Lu(H,X,"all")}})},Z=x.length>0||e.length>0;return(0,We.jsxs)("div",{className:"font-library__tabpanel-layout",children:[n&&(0,We.jsx)("div",{className:"font-library__loading",children:(0,We.jsx)(Qe.ProgressBar,{})}),!n&&(0,We.jsxs)(We.Fragment,{children:[(0,We.jsxs)(Qe.Navigator,{initialPath:t?"/fontFamily":"/",children:[(0,We.jsx)(Qe.Navigator.Screen,{path:"/",children:(0,We.jsxs)(Qe.__experimentalVStack,{spacing:"8",children:[m&&(0,We.jsx)(Qe.Notice,{status:m.type,onRemove:()=>h(null),children:m.message}),!Z&&(0,We.jsx)(Qe.__experimentalText,{as:"p",children:(0,er.__)("No fonts installed.")}),x.length>0&&(0,We.jsxs)(Qe.__experimentalVStack,{children:[(0,We.jsx)("h2",{className:"font-library__fonts-title",children:(0,er._x)("Theme","font source")}),(0,We.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:x.map(V=>(0,We.jsx)("li",{className:"font-library__fonts-list-item",children:(0,We.jsx)(Tb,{font:V,navigatorPath:"/fontFamily",variantsText:M(V),onClick:()=>{h(null),r(V)}})},V.slug))})]}),e.length>0&&(0,We.jsxs)(Qe.__experimentalVStack,{children:[(0,We.jsx)("h2",{className:"font-library__fonts-title",children:(0,er._x)("Custom","font source")}),(0,We.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:e.map(V=>(0,We.jsx)("li",{className:"font-library__fonts-list-item",children:(0,We.jsx)(Tb,{font:V,navigatorPath:"/fontFamily",variantsText:M(V),onClick:()=>{h(null),r(V)}})},V.slug))})]})]})}),(0,We.jsxs)(Qe.Navigator.Screen,{path:"/fontFamily",children:[t&&(0,We.jsx)(zye,{font:t,isOpen:d,setIsOpen:f,setNotice:h,uninstallFontFamily:o,handleSetLibraryFontSelected:r}),(0,We.jsxs)(Qe.Flex,{justify:"flex-start",children:[(0,We.jsx)(Qe.Navigator.BackButton,{icon:(0,er.isRTL)()?Ft:Nt,size:"small",onClick:()=>{r(void 0),h(null)},label:(0,er.__)("Back")}),(0,We.jsx)(Qe.__experimentalHeading,{level:2,size:13,className:"global-styles-ui-header",children:t?.name})]}),m&&(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)(Qe.__experimentalSpacer,{margin:1}),(0,We.jsx)(Qe.Notice,{status:m.type,onRemove:()=>h(null),children:m.message}),(0,We.jsx)(Qe.__experimentalSpacer,{margin:1})]}),(0,We.jsx)(Qe.__experimentalSpacer,{margin:4}),(0,We.jsx)(Qe.__experimentalText,{children:(0,er.__)("Choose font variants. Keep in mind that too many variants could make your site slower.")}),(0,We.jsx)(Qe.__experimentalSpacer,{margin:4}),(0,We.jsxs)(Qe.__experimentalVStack,{spacing:0,children:[(0,We.jsx)(Qe.CheckboxControl,{className:"font-library__select-all",label:(0,er.__)("Select all"),checked:G,onChange:Y,indeterminate:U}),(0,We.jsx)(Qe.__experimentalSpacer,{margin:8}),(0,We.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:t&&L(t).map((V,j)=>(0,We.jsx)("li",{className:"font-library__fonts-list-item",children:(0,We.jsx)(Kz,{font:t,face:V},`face${j}`)},`face${j}`))})]})]})]}),(0,We.jsxs)(Qe.__experimentalHStack,{justify:"flex-end",className:"font-library__footer",children:[i&&(0,We.jsx)(Qe.ProgressBar,{}),F&&(0,We.jsx)(Qe.Button,{__next40pxDefaultSize:!0,isDestructive:!0,variant:"tertiary",onClick:B,children:(0,er.__)("Delete")}),(0,We.jsx)(Qe.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:z,disabled:!b,accessibleWhenDisabled:!0,children:(0,er.__)("Update")})]})]})]})}function zye({font:e,isOpen:t,setIsOpen:r,setNotice:o,uninstallFontFamily:n,handleSetLibraryFontSelected:i}){let a=(0,Qe.useNavigator)(),l=async()=>{o(null),r(!1);try{await n(e),a.goBack(),i(void 0),o({type:"success",message:(0,er.__)("Font family uninstalled successfully.")})}catch(u){o({type:"error",message:(0,er.__)("There was an error uninstalling the font family.")+u.message})}},c=()=>{r(!1)};return(0,We.jsx)(Qe.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,er.__)("Cancel"),confirmButtonText:(0,er.__)("Delete"),onCancel:c,onConfirm:l,size:"medium",children:e&&(0,er.sprintf)((0,er.__)('Are you sure you want to delete "%s" font and all its variants and assets?'),e.name)})}var gx=jye;var bo=s(D(),1),je=s(A(),1),nU=s(he(),1),Zt=s(E(),1);var iU=s(W(),1);function Qz(e,t){let{category:r,search:o}=t,n=e||[];return r&&r!=="all"&&(n=n.filter(i=>i.categories&&i.categories.indexOf(r)!==-1)),o&&(n=n.filter(i=>i.font_family_settings&&i.font_family_settings.name.toLowerCase().includes(o.toLowerCase()))),n}function Jz(e){return e.reduce((t,r)=>({...t,[r.slug]:(r?.fontFace||[]).reduce((o,n)=>({...o,[`${n.fontStyle}-${n.fontWeight}`]:!0}),{})}),{})}function $z(e,t,r){return t?!!r[e]?.[`${t.fontStyle}-${t.fontWeight}`]:!!r[e]}var kb=s(E(),1),Fn=s(A(),1),ds=s(C(),1);function Uye(){let e=()=>{window.localStorage.setItem("wp-font-library-google-fonts-permission","true"),window.dispatchEvent(new Event("storage"))};return(0,ds.jsx)("div",{className:"font-library__google-fonts-confirm",children:(0,ds.jsx)(Fn.Card,{children:(0,ds.jsxs)(Fn.CardBody,{children:[(0,ds.jsx)(Fn.__experimentalHeading,{level:2,children:(0,kb.__)("Connect to Google Fonts")}),(0,ds.jsx)(Fn.__experimentalSpacer,{margin:6}),(0,ds.jsx)(Fn.__experimentalText,{as:"p",children:(0,kb.__)("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.")}),(0,ds.jsx)(Fn.__experimentalSpacer,{margin:3}),(0,ds.jsx)(Fn.__experimentalText,{as:"p",children:(0,kb.__)("You can alternatively upload files directly on the Upload tab.")}),(0,ds.jsx)(Fn.__experimentalSpacer,{margin:6}),(0,ds.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:e,children:(0,kb.__)("Allow access to Google Fonts")})]})})})}var eU=Uye;var tU=s(D(),1),vx=s(A(),1);var Lf=s(C(),1);function Hye({face:e,font:t,handleToggleVariant:r,selected:o}){let n=()=>{if(t?.fontFace){r(t,e);return}r(t)},i=t.name+" "+cx(e),a=(0,tU.useId)();return(0,Lf.jsx)("div",{className:"font-library__font-card",children:(0,Lf.jsxs)(vx.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,Lf.jsx)(vx.CheckboxControl,{checked:o,onChange:n,id:a}),(0,Lf.jsx)("label",{htmlFor:a,children:(0,Lf.jsx)(ih,{font:e,text:i,onClick:n})})]})})}var rU=Hye;var Ae=s(C(),1),Gye={slug:"all",name:(0,Zt._x)("All","font categories")},oU="wp-font-library-google-fonts-permission",Wye=500;function Yye({slug:e}){let t=e==="google-fonts",r=()=>window.localStorage.getItem(oU)==="true",[o,n]=(0,bo.useState)(null),[i,a]=(0,bo.useState)(null),[l,c]=(0,bo.useState)([]),[u,d]=(0,bo.useState)(1),[f,m]=(0,bo.useState)({}),[h,g]=(0,bo.useState)(t&&!r()),{installFonts:v,isInstalling:y}=(0,bo.useContext)(Lo),{record:b,isResolving:_}=(0,iU.useEntityRecord)("root","fontCollection",e);(0,bo.useEffect)(()=>{let oe=()=>{g(t&&!r())};return oe(),window.addEventListener("storage",oe),()=>window.removeEventListener("storage",oe)},[e,t]);let S=()=>{window.localStorage.setItem(oU,"false"),window.dispatchEvent(new Event("storage"))};(0,bo.useEffect)(()=>{n(null)},[e]),(0,bo.useEffect)(()=>{c([])},[o]);let x=(0,bo.useMemo)(()=>b?.font_families??[],[b]),T=b?.categories??[],R=[Gye,...T],F=(0,bo.useMemo)(()=>Qz(x,f),[x,f]),B=Math.max(window.innerHeight,Wye),z=Math.floor((B-417)/61),L=Math.ceil(F.length/z),M=(u-1)*z,k=u*z,I=F.slice(M,k),U=oe=>{m({...f,category:oe}),d(1)},Y=(0,nU.debounce)(oe=>{m({...f,search:oe}),d(1)},300),Z=(oe,ge)=>{let Re=ux(oe,ge,l);c(Re)},V=Jz(l),j=()=>{c([])},H=l.length>0?l[0]?.fontFace?.length??0:0,X=H>0&&H!==o?.fontFace?.length,ae=H===o?.fontFace?.length,ne=()=>{let oe=[];!ae&&o&&oe.push(o),c(oe)},ue=async()=>{a(null);let oe=l[0];try{oe?.fontFace&&await Promise.all(oe.fontFace.map(async ge=>{ge.src&&(ge.file=await Wz(ge.src))}))}catch{a({type:"error",message:(0,Zt.__)("Error installing the fonts, could not be downloaded.")});return}try{await v([oe]),a({type:"success",message:(0,Zt.__)("Fonts were installed successfully.")})}catch(ge){a({type:"error",message:ge.message})}j()},Ye=oe=>oe?!oe.fontFace||!oe.fontFace.length?[{fontFamily:oe.fontFamily,fontStyle:"normal",fontWeight:"400"}]:hx(oe.fontFace):[];if(h)return(0,Ae.jsx)(eU,{});let ye=()=>e!=="google-fonts"||h||o?null:(0,Ae.jsx)(je.DropdownMenu,{icon:Nr,label:(0,Zt.__)("Actions"),popoverProps:{position:"bottom left"},controls:[{title:(0,Zt.__)("Revoke access to Google Fonts"),onClick:S}]});return(0,Ae.jsxs)("div",{className:"font-library__tabpanel-layout",children:[_&&(0,Ae.jsx)("div",{className:"font-library__loading",children:(0,Ae.jsx)(je.ProgressBar,{})}),!_&&b&&(0,Ae.jsxs)(Ae.Fragment,{children:[(0,Ae.jsxs)(je.Navigator,{initialPath:"/",className:"font-library__tabpanel-layout",children:[(0,Ae.jsxs)(je.Navigator.Screen,{path:"/",children:[(0,Ae.jsxs)(je.__experimentalHStack,{justify:"space-between",children:[(0,Ae.jsxs)(je.__experimentalVStack,{children:[(0,Ae.jsx)(je.__experimentalHeading,{level:2,size:13,children:b.name}),(0,Ae.jsx)(je.__experimentalText,{children:b.description})]}),(0,Ae.jsx)(ye,{})]}),(0,Ae.jsx)(je.__experimentalSpacer,{margin:4}),(0,Ae.jsxs)(je.__experimentalHStack,{spacing:4,justify:"space-between",children:[(0,Ae.jsx)(je.SearchControl,{value:f.search,placeholder:(0,Zt.__)("Font name\u2026"),label:(0,Zt.__)("Search"),onChange:Y,hideLabelFromVision:!1}),(0,Ae.jsx)(je.SelectControl,{__next40pxDefaultSize:!0,label:(0,Zt.__)("Category"),value:f.category,onChange:U,children:R&&R.map(oe=>(0,Ae.jsx)("option",{value:oe.slug,children:oe.name},oe.slug))})]}),(0,Ae.jsx)(je.__experimentalSpacer,{margin:4}),!!b?.font_families?.length&&!F.length&&(0,Ae.jsx)(je.__experimentalText,{children:(0,Zt.__)("No fonts found. Try with a different search term.")}),(0,Ae.jsx)("div",{className:"font-library__fonts-grid__main",children:(0,Ae.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:I.map(oe=>(0,Ae.jsx)("li",{className:"font-library__fonts-list-item",children:(0,Ae.jsx)(Tb,{font:oe.font_family_settings,navigatorPath:"/fontFamily",onClick:()=>{n(oe.font_family_settings)}})},oe.font_family_settings.slug))})})]}),(0,Ae.jsxs)(je.Navigator.Screen,{path:"/fontFamily",children:[(0,Ae.jsxs)(je.Flex,{justify:"flex-start",children:[(0,Ae.jsx)(je.Navigator.BackButton,{icon:(0,Zt.isRTL)()?Ft:Nt,size:"small",onClick:()=>{n(null),a(null)},label:(0,Zt.__)("Back")}),(0,Ae.jsx)(je.__experimentalHeading,{level:2,size:13,className:"global-styles-ui-header",children:o?.name})]}),i&&(0,Ae.jsxs)(Ae.Fragment,{children:[(0,Ae.jsx)(je.__experimentalSpacer,{margin:1}),(0,Ae.jsx)(je.Notice,{status:i.type,onRemove:()=>a(null),children:i.message}),(0,Ae.jsx)(je.__experimentalSpacer,{margin:1})]}),(0,Ae.jsx)(je.__experimentalSpacer,{margin:4}),(0,Ae.jsx)(je.__experimentalText,{children:(0,Zt.__)("Select font variants to install.")}),(0,Ae.jsx)(je.__experimentalSpacer,{margin:4}),(0,Ae.jsx)(je.CheckboxControl,{className:"font-library__select-all",label:(0,Zt.__)("Select all"),checked:ae,onChange:ne,indeterminate:X}),(0,Ae.jsx)(je.__experimentalVStack,{spacing:0,children:(0,Ae.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:o&&Ye(o).map((oe,ge)=>(0,Ae.jsx)("li",{className:"font-library__fonts-list-item",children:(0,Ae.jsx)(rU,{font:o,face:oe,handleToggleVariant:Z,selected:$z(o.slug,o.fontFace?oe:null,V)})},`face${ge}`))})}),(0,Ae.jsx)(je.__experimentalSpacer,{margin:16})]})]}),o&&(0,Ae.jsx)(je.Flex,{justify:"flex-end",className:"font-library__footer",children:(0,Ae.jsx)(je.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:ue,isBusy:y,disabled:l.length===0||y,accessibleWhenDisabled:!0,children:(0,Zt.__)("Install")})}),!o&&(0,Ae.jsxs)(je.__experimentalHStack,{expanded:!1,className:"font-library__footer",justify:"end",spacing:6,children:[(0,Ae.jsx)(je.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:1,className:"font-library__page-selection",children:(0,bo.createInterpolateElement)((0,Zt.sprintf)((0,Zt._x)("<div>Page</div>%1$s<div>of %2$d</div>","paging"),"<CurrentPage />",L),{div:(0,Ae.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,Ae.jsx)(je.SelectControl,{"aria-label":(0,Zt.__)("Current page"),value:u.toString(),options:[...Array(L)].map((oe,ge)=>({label:(ge+1).toString(),value:(ge+1).toString()})),onChange:oe=>d(parseInt(oe)),size:"small",variant:"minimal"})})}),(0,Ae.jsxs)(je.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,Ae.jsx)(je.Button,{onClick:()=>d(u-1),disabled:u===1,accessibleWhenDisabled:!0,label:(0,Zt.__)("Previous page"),icon:(0,Zt.isRTL)()?Tl:kl,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,Ae.jsx)(je.Button,{onClick:()=>d(u+1),disabled:u===L,accessibleWhenDisabled:!0,label:(0,Zt.__)("Next page"),icon:(0,Zt.isRTL)()?kl:Tl,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})]})]})}var yx=Yye;var ah=s(E(),1),on=s(A(),1),Rb=s(D(),1);var bx=(e=>typeof Zn<"u"?Zn:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof Zn<"u"?Zn:t)[r]}):e)(function(e){if(typeof Zn<"u")return Zn.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),sU=(function(){var e,t,r;return(function(){function o(n,i,a){function l(d,f){if(!i[d]){if(!n[d]){var m=typeof bx=="function"&&bx;if(!f&&m)return m(d,!0);if(c)return c(d,!0);var h=new Error("Cannot find module '"+d+"'");throw h.code="MODULE_NOT_FOUND",h}var g=i[d]={exports:{}};n[d][0].call(g.exports,function(v){var y=n[d][1][v];return l(y||v)},g,g.exports,o,n,i,a)}return i[d].exports}for(var c=typeof bx=="function"&&bx,u=0;u<a.length;u++)l(a[u]);return l}return o})()({1:[function(o,n,i){var a=4096,l=2*a+32,c=2*a-1,u=new Uint32Array([0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215]);function d(f){this.buf_=new Uint8Array(l),this.input_=f,this.reset()}d.READ_SIZE=a,d.IBUF_MASK=c,d.prototype.reset=function(){this.buf_ptr_=0,this.val_=0,this.pos_=0,this.bit_pos_=0,this.bit_end_pos_=0,this.eos_=0,this.readMoreInput();for(var f=0;f<4;f++)this.val_|=this.buf_[this.pos_]<<8*f,++this.pos_;return this.bit_end_pos_>0},d.prototype.readMoreInput=function(){if(!(this.bit_end_pos_>256))if(this.eos_){if(this.bit_pos_>this.bit_end_pos_)throw new Error("Unexpected end of input "+this.bit_pos_+" "+this.bit_end_pos_)}else{var f=this.buf_ptr_,m=this.input_.read(this.buf_,f,a);if(m<0)throw new Error("Unexpected end of input");if(m<a){this.eos_=1;for(var h=0;h<32;h++)this.buf_[f+m+h]=0}if(f===0){for(var h=0;h<32;h++)this.buf_[(a<<1)+h]=this.buf_[h];this.buf_ptr_=a}else this.buf_ptr_=0;this.bit_end_pos_+=m<<3}},d.prototype.fillBitWindow=function(){for(;this.bit_pos_>=8;)this.val_>>>=8,this.val_|=this.buf_[this.pos_&c]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},d.prototype.readBits=function(f){32-this.bit_pos_<f&&this.fillBitWindow();var m=this.val_>>>this.bit_pos_&u[f];return this.bit_pos_+=f,m},n.exports=d},{}],2:[function(o,n,i){var a=0,l=1,c=2,u=3;i.lookup=new Uint8Array([0,0,0,0,0,0,0,0,0,4,4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,12,16,12,12,20,12,16,24,28,12,12,32,12,36,12,44,44,44,44,44,44,44,44,44,44,32,32,24,40,28,12,12,48,52,52,52,48,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,24,12,28,12,12,12,56,60,60,60,56,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,24,12,28,12,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,56,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),i.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])},{}],3:[function(o,n,i){var a=o("./streams").BrotliInput,l=o("./streams").BrotliOutput,c=o("./bit_reader"),u=o("./dictionary"),d=o("./huffman").HuffmanCode,f=o("./huffman").BrotliBuildHuffmanTable,m=o("./context"),h=o("./prefix"),g=o("./transform"),v=8,y=16,b=256,_=704,S=26,x=6,T=2,R=8,F=255,B=1080,z=18,L=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),M=16,k=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),I=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),U=new Uint16Array([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]);function G(le){var J;return le.readBits(1)===0?16:(J=le.readBits(3),J>0?17+J:(J=le.readBits(3),J>0?8+J:17))}function Y(le){if(le.readBits(1)){var J=le.readBits(3);return J===0?1:le.readBits(J)+(1<<J)}return 0}function Z(){this.meta_block_length=0,this.input_end=0,this.is_uncompressed=0,this.is_metadata=!1}function V(le){var J=new Z,ie,ee,se;if(J.input_end=le.readBits(1),J.input_end&&le.readBits(1))return J;if(ie=le.readBits(2)+4,ie===7){if(J.is_metadata=!0,le.readBits(1)!==0)throw new Error("Invalid reserved bit");if(ee=le.readBits(2),ee===0)return J;for(se=0;se<ee;se++){var Ue=le.readBits(8);if(se+1===ee&&ee>1&&Ue===0)throw new Error("Invalid size byte");J.meta_block_length|=Ue<<se*8}}else for(se=0;se<ie;++se){var ke=le.readBits(4);if(se+1===ie&&ie>4&&ke===0)throw new Error("Invalid size nibble");J.meta_block_length|=ke<<se*4}return++J.meta_block_length,!J.input_end&&!J.is_metadata&&(J.is_uncompressed=le.readBits(1)),J}function j(le,J,ie){var ee=J,se;return ie.fillBitWindow(),J+=ie.val_>>>ie.bit_pos_&F,se=le[J].bits-R,se>0&&(ie.bit_pos_+=R,J+=le[J].value,J+=ie.val_>>>ie.bit_pos_&(1<<se)-1),ie.bit_pos_+=le[J].bits,le[J].value}function H(le,J,ie,ee){for(var se=0,Ue=v,ke=0,Be=0,Je=32768,Fe=[],Se=0;Se<32;Se++)Fe.push(new d(0,0));for(f(Fe,0,5,le,z);se<J&&Je>0;){var yt=0,Jr;if(ee.readMoreInput(),ee.fillBitWindow(),yt+=ee.val_>>>ee.bit_pos_&31,ee.bit_pos_+=Fe[yt].bits,Jr=Fe[yt].value&255,Jr<y)ke=0,ie[se++]=Jr,Jr!==0&&(Ue=Jr,Je-=32768>>Jr);else{var bn=Jr-14,Sn,Zo,Sr=0;if(Jr===y&&(Sr=Ue),Be!==Sr&&(ke=0,Be=Sr),Sn=ke,ke>0&&(ke-=2,ke<<=bn),ke+=ee.readBits(bn)+3,Zo=ke-Sn,se+Zo>J)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var Ko=0;Ko<Zo;Ko++)ie[se+Ko]=Be;se+=Zo,Be!==0&&(Je-=Zo<<15-Be)}}if(Je!==0)throw new Error("[ReadHuffmanCodeLengths] space = "+Je);for(;se<J;se++)ie[se]=0}function X(le,J,ie,ee){var se=0,Ue,ke=new Uint8Array(le);if(ee.readMoreInput(),Ue=ee.readBits(2),Ue===1){for(var Be,Je=le-1,Fe=0,Se=new Int32Array(4),yt=ee.readBits(2)+1;Je;)Je>>=1,++Fe;for(Be=0;Be<yt;++Be)Se[Be]=ee.readBits(Fe)%le,ke[Se[Be]]=2;switch(ke[Se[0]]=1,yt){case 1:break;case 3:if(Se[0]===Se[1]||Se[0]===Se[2]||Se[1]===Se[2])throw new Error("[ReadHuffmanCode] invalid symbols");break;case 2:if(Se[0]===Se[1])throw new Error("[ReadHuffmanCode] invalid symbols");ke[Se[1]]=1;break;case 4:if(Se[0]===Se[1]||Se[0]===Se[2]||Se[0]===Se[3]||Se[1]===Se[2]||Se[1]===Se[3]||Se[2]===Se[3])throw new Error("[ReadHuffmanCode] invalid symbols");ee.readBits(1)?(ke[Se[2]]=3,ke[Se[3]]=3):ke[Se[0]]=2;break}}else{var Be,Jr=new Uint8Array(z),bn=32,Sn=0,Zo=[new d(2,0),new d(2,4),new d(2,3),new d(3,2),new d(2,0),new d(2,4),new d(2,3),new d(4,1),new d(2,0),new d(2,4),new d(2,3),new d(3,2),new d(2,0),new d(2,4),new d(2,3),new d(4,5)];for(Be=Ue;Be<z&&bn>0;++Be){var Sr=L[Be],Ko=0,_n;ee.fillBitWindow(),Ko+=ee.val_>>>ee.bit_pos_&15,ee.bit_pos_+=Zo[Ko].bits,_n=Zo[Ko].value,Jr[Sr]=_n,_n!==0&&(bn-=32>>_n,++Sn)}if(!(Sn===1||bn===0))throw new Error("[ReadHuffmanCode] invalid num_codes or space");H(Jr,le,ke,ee)}if(se=f(J,ie,R,ke,le),se===0)throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return se}function ae(le,J,ie){var ee,se;return ee=j(le,J,ie),se=h.kBlockLengthPrefixCode[ee].nbits,h.kBlockLengthPrefixCode[ee].offset+ie.readBits(se)}function ne(le,J,ie){var ee;return le<M?(ie+=k[le],ie&=3,ee=J[ie]+I[le]):ee=le-M+1,ee}function ue(le,J){for(var ie=le[J],ee=J;ee;--ee)le[ee]=le[ee-1];le[0]=ie}function Ye(le,J){var ie=new Uint8Array(256),ee;for(ee=0;ee<256;++ee)ie[ee]=ee;for(ee=0;ee<J;++ee){var se=le[ee];le[ee]=ie[se],se&&ue(ie,se)}}function ye(le,J){this.alphabet_size=le,this.num_htrees=J,this.codes=new Array(J+J*U[le+31>>>5]),this.htrees=new Uint32Array(J)}ye.prototype.decode=function(le){var J,ie,ee=0;for(J=0;J<this.num_htrees;++J)this.htrees[J]=ee,ie=X(this.alphabet_size,this.codes,ee,le),ee+=ie};function oe(le,J){var ie={num_htrees:null,context_map:null},ee,se=0,Ue,ke;J.readMoreInput();var Be=ie.num_htrees=Y(J)+1,Je=ie.context_map=new Uint8Array(le);if(Be<=1)return ie;for(ee=J.readBits(1),ee&&(se=J.readBits(4)+1),Ue=[],ke=0;ke<B;ke++)Ue[ke]=new d(0,0);for(X(Be+se,Ue,0,J),ke=0;ke<le;){var Fe;if(J.readMoreInput(),Fe=j(Ue,0,J),Fe===0)Je[ke]=0,++ke;else if(Fe<=se)for(var Se=1+(1<<Fe)+J.readBits(Fe);--Se;){if(ke>=le)throw new Error("[DecodeContextMap] i >= context_map_size");Je[ke]=0,++ke}else Je[ke]=Fe-se,++ke}return J.readBits(1)&&Ye(Je,le),ie}function ge(le,J,ie,ee,se,Ue,ke){var Be=ie*2,Je=ie,Fe=j(J,ie*B,ke),Se;Fe===0?Se=se[Be+(Ue[Je]&1)]:Fe===1?Se=se[Be+(Ue[Je]-1&1)]+1:Se=Fe-2,Se>=le&&(Se-=le),ee[ie]=Se,se[Be+(Ue[Je]&1)]=Se,++Ue[Je]}function Re(le,J,ie,ee,se,Ue){var ke=se+1,Be=ie&se,Je=Ue.pos_&c.IBUF_MASK,Fe;if(J<8||Ue.bit_pos_+(J<<3)<Ue.bit_end_pos_){for(;J-- >0;)Ue.readMoreInput(),ee[Be++]=Ue.readBits(8),Be===ke&&(le.write(ee,ke),Be=0);return}if(Ue.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;Ue.bit_pos_<32;)ee[Be]=Ue.val_>>>Ue.bit_pos_,Ue.bit_pos_+=8,++Be,--J;if(Fe=Ue.bit_end_pos_-Ue.bit_pos_>>3,Je+Fe>c.IBUF_MASK){for(var Se=c.IBUF_MASK+1-Je,yt=0;yt<Se;yt++)ee[Be+yt]=Ue.buf_[Je+yt];Fe-=Se,Be+=Se,J-=Se,Je=0}for(var yt=0;yt<Fe;yt++)ee[Be+yt]=Ue.buf_[Je+yt];if(Be+=Fe,J-=Fe,Be>=ke){le.write(ee,ke),Be-=ke;for(var yt=0;yt<Be;yt++)ee[yt]=ee[ke+yt]}for(;Be+J>=ke;){if(Fe=ke-Be,Ue.input_.read(ee,Be,Fe)<Fe)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");le.write(ee,ke),J-=Fe,Be=0}if(Ue.input_.read(ee,Be,J)<J)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");Ue.reset()}function ze(le){var J=le.bit_pos_+7&-8,ie=le.readBits(J-le.bit_pos_);return ie==0}function Ve(le){var J=new a(le),ie=new c(J);G(ie);var ee=V(ie);return ee.meta_block_length}i.BrotliDecompressedSize=Ve;function tt(le,J){var ie=new a(le);J==null&&(J=Ve(le));var ee=new Uint8Array(J),se=new l(ee);return vt(ie,se),se.pos<se.buffer.length&&(se.buffer=se.buffer.subarray(0,se.pos)),se.buffer}i.BrotliDecompressBuffer=tt;function vt(le,J){var ie,ee=0,se=0,Ue=0,ke,Be=0,Je,Fe,Se,yt,Jr=[16,15,11,4],bn=0,Sn=0,Zo=0,Sr=[new ye(0,0),new ye(0,0),new ye(0,0)],Ko,_n,Ke,Sv=128+c.READ_SIZE;Ke=new c(le),Ue=G(Ke),ke=(1<<Ue)-16,Je=1<<Ue,Fe=Je-1,Se=new Uint8Array(Je+Sv+u.maxDictionaryWordLength),yt=Je,Ko=[],_n=[];for(var Um=0;Um<3*B;Um++)Ko[Um]=new d(0,0),_n[Um]=new d(0,0);for(;!se;){var Vr=0,x1,Wi=[1<<28,1<<28,1<<28],xa=[0],Ci=[1,1,1],q=[0,1,0,1,0,1],fe=[0],P,be,jt,me,wn=null,ve=null,_r,Q=null,K,Bd=0,It=null,Pe=0,Md=0,Ld=null,lr=0,at=0,jr=0,zr,fo;for(ie=0;ie<3;++ie)Sr[ie].codes=null,Sr[ie].htrees=null;Ke.readMoreInput();var _l=V(Ke);if(Vr=_l.meta_block_length,ee+Vr>J.buffer.length){var Vd=new Uint8Array(ee+Vr);Vd.set(J.buffer),J.buffer=Vd}if(se=_l.input_end,x1=_l.is_uncompressed,_l.is_metadata){for(ze(Ke);Vr>0;--Vr)Ke.readMoreInput(),Ke.readBits(8);continue}if(Vr!==0){if(x1){Ke.bit_pos_=Ke.bit_pos_+7&-8,Re(J,Vr,ee,Se,Fe,Ke),ee+=Vr;continue}for(ie=0;ie<3;++ie)Ci[ie]=Y(Ke)+1,Ci[ie]>=2&&(X(Ci[ie]+2,Ko,ie*B,Ke),X(S,_n,ie*B,Ke),Wi[ie]=ae(_n,ie*B,Ke),fe[ie]=1);for(Ke.readMoreInput(),P=Ke.readBits(2),be=M+(Ke.readBits(4)<<P),jt=(1<<P)-1,me=be+(48<<P),ve=new Uint8Array(Ci[0]),ie=0;ie<Ci[0];++ie)Ke.readMoreInput(),ve[ie]=Ke.readBits(2)<<1;var cr=oe(Ci[0]<<x,Ke);_r=cr.num_htrees,wn=cr.context_map;var xn=oe(Ci[2]<<T,Ke);for(K=xn.num_htrees,Q=xn.context_map,Sr[0]=new ye(b,_r),Sr[1]=new ye(_,Ci[1]),Sr[2]=new ye(me,K),ie=0;ie<3;++ie)Sr[ie].decode(Ke);for(It=0,Ld=0,zr=ve[xa[0]],at=m.lookupOffsets[zr],jr=m.lookupOffsets[zr+1],fo=Sr[1].htrees[0];Vr>0;){var wr,Cn,Yn,Hm,tR,qn,Ti,wl,_v,Gm,wv;for(Ke.readMoreInput(),Wi[1]===0&&(ge(Ci[1],Ko,1,xa,q,fe,Ke),Wi[1]=ae(_n,B,Ke),fo=Sr[1].htrees[xa[1]]),--Wi[1],wr=j(Sr[1].codes,fo,Ke),Cn=wr>>6,Cn>=2?(Cn-=2,Ti=-1):Ti=0,Yn=h.kInsertRangeLut[Cn]+(wr>>3&7),Hm=h.kCopyRangeLut[Cn]+(wr&7),tR=h.kInsertLengthPrefixCode[Yn].offset+Ke.readBits(h.kInsertLengthPrefixCode[Yn].nbits),qn=h.kCopyLengthPrefixCode[Hm].offset+Ke.readBits(h.kCopyLengthPrefixCode[Hm].nbits),Sn=Se[ee-1&Fe],Zo=Se[ee-2&Fe],Gm=0;Gm<tR;++Gm)Ke.readMoreInput(),Wi[0]===0&&(ge(Ci[0],Ko,0,xa,q,fe,Ke),Wi[0]=ae(_n,0,Ke),Bd=xa[0]<<x,It=Bd,zr=ve[xa[0]],at=m.lookupOffsets[zr],jr=m.lookupOffsets[zr+1]),_v=m.lookup[at+Sn]|m.lookup[jr+Zo],Pe=wn[It+_v],--Wi[0],Zo=Sn,Sn=j(Sr[0].codes,Sr[0].htrees[Pe],Ke),Se[ee&Fe]=Sn,(ee&Fe)===Fe&&J.write(Se,Je),++ee;if(Vr-=tR,Vr<=0)break;if(Ti<0){var _v;if(Ke.readMoreInput(),Wi[2]===0&&(ge(Ci[2],Ko,2,xa,q,fe,Ke),Wi[2]=ae(_n,2*B,Ke),Md=xa[2]<<T,Ld=Md),--Wi[2],_v=(qn>4?3:qn-2)&255,lr=Q[Ld+_v],Ti=j(Sr[2].codes,Sr[2].htrees[lr],Ke),Ti>=be){var rR,wF,xv;Ti-=be,wF=Ti&jt,Ti>>=P,rR=(Ti>>1)+1,xv=(2+(Ti&1)<<rR)-4,Ti=be+(xv+Ke.readBits(rR)<<P)+wF}}if(wl=ne(Ti,Jr,bn),wl<0)throw new Error("[BrotliDecompress] invalid distance");if(ee<ke&&Be!==ke?Be=ee:Be=ke,wv=ee&Fe,wl>Be)if(qn>=u.minDictionaryWordLength&&qn<=u.maxDictionaryWordLength){var xv=u.offsetsByLength[qn],xF=wl-Be-1,CF=u.sizeBitsByLength[qn],oae=(1<<CF)-1,nae=xF&oae,TF=xF>>CF;if(xv+=nae*qn,TF<g.kNumTransforms){var oR=g.transformDictionaryWord(Se,wv,xv,qn,TF);if(wv+=oR,ee+=oR,Vr-=oR,wv>=yt){J.write(Se,Je);for(var C1=0;C1<wv-yt;C1++)Se[C1]=Se[yt+C1]}}else throw new Error("Invalid backward reference. pos: "+ee+" distance: "+wl+" len: "+qn+" bytes left: "+Vr)}else throw new Error("Invalid backward reference. pos: "+ee+" distance: "+wl+" len: "+qn+" bytes left: "+Vr);else{if(Ti>0&&(Jr[bn&3]=wl,++bn),qn>Vr)throw new Error("Invalid backward reference. pos: "+ee+" distance: "+wl+" len: "+qn+" bytes left: "+Vr);for(Gm=0;Gm<qn;++Gm)Se[ee&Fe]=Se[ee-wl&Fe],(ee&Fe)===Fe&&J.write(Se,Je),++ee,--Vr}Sn=Se[ee-1&Fe],Zo=Se[ee-2&Fe]}ee&=1073741823}}J.write(Se,ee&Fe)}i.BrotliDecompress=vt,u.init()},{"./bit_reader":1,"./context":2,"./dictionary":6,"./huffman":7,"./prefix":9,"./streams":10,"./transform":11}],4:[function(o,n,i){var a=o("base64-js");i.init=function(){var l=o("./decode").BrotliDecompressBuffer,c=a.toByteArray(o("./dictionary.bin.js"));return l(c)}},{"./decode":3,"./dictionary.bin.js":5,"base64-js":8}],5:[function(o,n,i){n.exports="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="},{}],6:[function(o,n,i){var a=o("./dictionary-browser");i.init=function(){i.dictionary=a.init()},i.offsetsByLength=new Uint32Array([0,0,0,0,0,4096,9216,21504,35840,44032,53248,63488,74752,87040,93696,100864,104704,106752,108928,113536,115968,118528,119872,121280,122016]),i.sizeBitsByLength=new Uint8Array([0,0,0,0,10,10,11,11,10,10,10,10,10,9,9,8,7,7,8,7,7,6,6,5,5]),i.minDictionaryWordLength=4,i.maxDictionaryWordLength=24},{"./dictionary-browser":4}],7:[function(o,n,i){function a(f,m){this.bits=f,this.value=m}i.HuffmanCode=a;var l=15;function c(f,m){for(var h=1<<m-1;f&h;)h>>=1;return(f&h-1)+h}function u(f,m,h,g,v){do g-=h,f[m+g]=new a(v.bits,v.value);while(g>0)}function d(f,m,h){for(var g=1<<m-h;m<l&&(g-=f[m],!(g<=0));)++m,g<<=1;return m-h}i.BrotliBuildHuffmanTable=function(f,m,h,g,v){var y=m,b,_,S,x,T,R,F,B,z,L,M,k=new Int32Array(l+1),I=new Int32Array(l+1);for(M=new Int32Array(v),S=0;S<v;S++)k[g[S]]++;for(I[1]=0,_=1;_<l;_++)I[_+1]=I[_]+k[_];for(S=0;S<v;S++)g[S]!==0&&(M[I[g[S]]++]=S);if(B=h,z=1<<B,L=z,I[l]===1){for(x=0;x<L;++x)f[m+x]=new a(0,M[0]&65535);return L}for(x=0,S=0,_=1,T=2;_<=h;++_,T<<=1)for(;k[_]>0;--k[_])b=new a(_&255,M[S++]&65535),u(f,m+x,T,z,b),x=c(x,_);for(F=L-1,R=-1,_=h+1,T=2;_<=l;++_,T<<=1)for(;k[_]>0;--k[_])(x&F)!==R&&(m+=z,B=d(k,_,h),z=1<<B,L+=z,R=x&F,f[y+R]=new a(B+h&255,m-y-R&65535)),b=new a(_-h&255,M[S++]&65535),u(f,m+(x>>h),T,z,b),x=c(x,_);return L}},{}],8:[function(o,n,i){"use strict";i.byteLength=h,i.toByteArray=v,i.fromByteArray=_;for(var a=[],l=[],c=typeof Uint8Array<"u"?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,f=u.length;d<f;++d)a[d]=u[d],l[u.charCodeAt(d)]=d;l[45]=62,l[95]=63;function m(S){var x=S.length;if(x%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var T=S.indexOf("=");T===-1&&(T=x);var R=T===x?0:4-T%4;return[T,R]}function h(S){var x=m(S),T=x[0],R=x[1];return(T+R)*3/4-R}function g(S,x,T){return(x+T)*3/4-T}function v(S){for(var x,T=m(S),R=T[0],F=T[1],B=new c(g(S,R,F)),z=0,L=F>0?R-4:R,M=0;M<L;M+=4)x=l[S.charCodeAt(M)]<<18|l[S.charCodeAt(M+1)]<<12|l[S.charCodeAt(M+2)]<<6|l[S.charCodeAt(M+3)],B[z++]=x>>16&255,B[z++]=x>>8&255,B[z++]=x&255;return F===2&&(x=l[S.charCodeAt(M)]<<2|l[S.charCodeAt(M+1)]>>4,B[z++]=x&255),F===1&&(x=l[S.charCodeAt(M)]<<10|l[S.charCodeAt(M+1)]<<4|l[S.charCodeAt(M+2)]>>2,B[z++]=x>>8&255,B[z++]=x&255),B}function y(S){return a[S>>18&63]+a[S>>12&63]+a[S>>6&63]+a[S&63]}function b(S,x,T){for(var R,F=[],B=x;B<T;B+=3)R=(S[B]<<16&16711680)+(S[B+1]<<8&65280)+(S[B+2]&255),F.push(y(R));return F.join("")}function _(S){for(var x,T=S.length,R=T%3,F=[],B=16383,z=0,L=T-R;z<L;z+=B)F.push(b(S,z,z+B>L?L:z+B));return R===1?(x=S[T-1],F.push(a[x>>2]+a[x<<4&63]+"==")):R===2&&(x=(S[T-2]<<8)+S[T-1],F.push(a[x>>10]+a[x>>4&63]+a[x<<2&63]+"=")),F.join("")}},{}],9:[function(o,n,i){function a(l,c){this.offset=l,this.nbits=c}i.kBlockLengthPrefixCode=[new a(1,2),new a(5,2),new a(9,2),new a(13,2),new a(17,3),new a(25,3),new a(33,3),new a(41,3),new a(49,4),new a(65,4),new a(81,4),new a(97,4),new a(113,5),new a(145,5),new a(177,5),new a(209,5),new a(241,6),new a(305,6),new a(369,7),new a(497,8),new a(753,9),new a(1265,10),new a(2289,11),new a(4337,12),new a(8433,13),new a(16625,24)],i.kInsertLengthPrefixCode=[new a(0,0),new a(1,0),new a(2,0),new a(3,0),new a(4,0),new a(5,0),new a(6,1),new a(8,1),new a(10,2),new a(14,2),new a(18,3),new a(26,3),new a(34,4),new a(50,4),new a(66,5),new a(98,5),new a(130,6),new a(194,7),new a(322,8),new a(578,9),new a(1090,10),new a(2114,12),new a(6210,14),new a(22594,24)],i.kCopyLengthPrefixCode=[new a(2,0),new a(3,0),new a(4,0),new a(5,0),new a(6,0),new a(7,0),new a(8,0),new a(9,0),new a(10,1),new a(12,1),new a(14,2),new a(18,2),new a(22,3),new a(30,3),new a(38,4),new a(54,4),new a(70,5),new a(102,5),new a(134,6),new a(198,7),new a(326,8),new a(582,9),new a(1094,10),new a(2118,24)],i.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],i.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},{}],10:[function(o,n,i){function a(c){this.buffer=c,this.pos=0}a.prototype.read=function(c,u,d){this.pos+d>this.buffer.length&&(d=this.buffer.length-this.pos);for(var f=0;f<d;f++)c[u+f]=this.buffer[this.pos+f];return this.pos+=d,d},i.BrotliInput=a;function l(c){this.buffer=c,this.pos=0}l.prototype.write=function(c,u){if(this.pos+u>this.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(c.subarray(0,u),this.pos),this.pos+=u,u},i.BrotliOutput=l},{}],11:[function(o,n,i){var a=o("./dictionary"),l=0,c=1,u=2,d=3,f=4,m=5,h=6,g=7,v=8,y=9,b=10,_=11,S=12,x=13,T=14,R=15,F=16,B=17,z=18,L=19,M=20;function k(G,Y,Z){this.prefix=new Uint8Array(G.length),this.transform=Y,this.suffix=new Uint8Array(Z.length);for(var V=0;V<G.length;V++)this.prefix[V]=G.charCodeAt(V);for(var V=0;V<Z.length;V++)this.suffix[V]=Z.charCodeAt(V)}var I=[new k("",l,""),new k("",l," "),new k(" ",l," "),new k("",S,""),new k("",b," "),new k("",l," the "),new k(" ",l,""),new k("s ",l," "),new k("",l," of "),new k("",b,""),new k("",l," and "),new k("",x,""),new k("",c,""),new k(", ",l," "),new k("",l,", "),new k(" ",b," "),new k("",l," in "),new k("",l," to "),new k("e ",l," "),new k("",l,'"'),new k("",l,"."),new k("",l,'">'),new k("",l,`
`),new k("",d,""),new k("",l,"]"),new k("",l," for "),new k("",T,""),new k("",u,""),new k("",l," a "),new k("",l," that "),new k(" ",b,""),new k("",l,". "),new k(".",l,""),new k(" ",l,", "),new k("",R,""),new k("",l," with "),new k("",l,"'"),new k("",l," from "),new k("",l," by "),new k("",F,""),new k("",B,""),new k(" the ",l,""),new k("",f,""),new k("",l,". The "),new k("",_,""),new k("",l," on "),new k("",l," as "),new k("",l," is "),new k("",g,""),new k("",c,"ing "),new k("",l,`
	`),new k("",l,":"),new k(" ",l,". "),new k("",l,"ed "),new k("",M,""),new k("",z,""),new k("",h,""),new k("",l,"("),new k("",b,", "),new k("",v,""),new k("",l," at "),new k("",l,"ly "),new k(" the ",l," of "),new k("",m,""),new k("",y,""),new k(" ",b,", "),new k("",b,'"'),new k(".",l,"("),new k("",_," "),new k("",b,'">'),new k("",l,'="'),new k(" ",l,"."),new k(".com/",l,""),new k(" the ",l," of the "),new k("",b,"'"),new k("",l,". This "),new k("",l,","),new k(".",l," "),new k("",b,"("),new k("",b,"."),new k("",l," not "),new k(" ",l,'="'),new k("",l,"er "),new k(" ",_," "),new k("",l,"al "),new k(" ",_,""),new k("",l,"='"),new k("",_,'"'),new k("",b,". "),new k(" ",l,"("),new k("",l,"ful "),new k(" ",b,". "),new k("",l,"ive "),new k("",l,"less "),new k("",_,"'"),new k("",l,"est "),new k(" ",b,"."),new k("",_,'">'),new k(" ",l,"='"),new k("",b,","),new k("",l,"ize "),new k("",_,"."),new k("\xC2\xA0",l,""),new k(" ",l,","),new k("",b,'="'),new k("",_,'="'),new k("",l,"ous "),new k("",_,", "),new k("",b,"='"),new k(" ",b,","),new k(" ",_,'="'),new k(" ",_,", "),new k("",_,","),new k("",_,"("),new k("",_,". "),new k(" ",_,"."),new k("",_,"='"),new k(" ",_,". "),new k(" ",b,'="'),new k(" ",_,"='"),new k(" ",b,"='")];i.kTransforms=I,i.kNumTransforms=I.length;function U(G,Y){return G[Y]<192?(G[Y]>=97&&G[Y]<=122&&(G[Y]^=32),1):G[Y]<224?(G[Y+1]^=32,2):(G[Y+2]^=5,3)}i.transformDictionaryWord=function(G,Y,Z,V,j){var H=I[j].prefix,X=I[j].suffix,ae=I[j].transform,ne=ae<S?0:ae-(S-1),ue=0,Ye=Y,ye;ne>V&&(ne=V);for(var oe=0;oe<H.length;)G[Y++]=H[oe++];for(Z+=ne,V-=ne,ae<=y&&(V-=ae),ue=0;ue<V;ue++)G[Y++]=a.dictionary[Z+ue];if(ye=Y-V,ae===b)U(G,ye);else if(ae===_)for(;V>0;){var ge=U(G,ye);ye+=ge,V-=ge}for(var Re=0;Re<X.length;)G[Y++]=X[Re++];return Y-Ye}},{"./dictionary":6}],12:[function(o,n,i){n.exports=o("./dec/decode").BrotliDecompressBuffer},{"./dec/decode":3}]},{},[12])(12)})();var Sx=(e=>typeof Zn<"u"?Zn:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof Zn<"u"?Zn:t)[r]}):e)(function(e){if(typeof Zn<"u")return Zn.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),aU=(function(){var e,t,r;return(function(){function o(n,i,a){function l(d,f){if(!i[d]){if(!n[d]){var m=typeof Sx=="function"&&Sx;if(!f&&m)return m(d,!0);if(c)return c(d,!0);var h=new Error("Cannot find module '"+d+"'");throw h.code="MODULE_NOT_FOUND",h}var g=i[d]={exports:{}};n[d][0].call(g.exports,function(v){var y=n[d][1][v];return l(y||v)},g,g.exports,o,n,i,a)}return i[d].exports}for(var c=typeof Sx=="function"&&Sx,u=0;u<a.length;u++)l(a[u]);return l}return o})()({1:[function(o,n,i){"use strict";var a=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function l(d,f){return Object.prototype.hasOwnProperty.call(d,f)}i.assign=function(d){for(var f=Array.prototype.slice.call(arguments,1);f.length;){var m=f.shift();if(m){if(typeof m!="object")throw new TypeError(m+"must be non-object");for(var h in m)l(m,h)&&(d[h]=m[h])}}return d},i.shrinkBuf=function(d,f){return d.length===f?d:d.subarray?d.subarray(0,f):(d.length=f,d)};var c={arraySet:function(d,f,m,h,g){if(f.subarray&&d.subarray){d.set(f.subarray(m,m+h),g);return}for(var v=0;v<h;v++)d[g+v]=f[m+v]},flattenChunks:function(d){var f,m,h,g,v,y;for(h=0,f=0,m=d.length;f<m;f++)h+=d[f].length;for(y=new Uint8Array(h),g=0,f=0,m=d.length;f<m;f++)v=d[f],y.set(v,g),g+=v.length;return y}},u={arraySet:function(d,f,m,h,g){for(var v=0;v<h;v++)d[g+v]=f[m+v]},flattenChunks:function(d){return[].concat.apply([],d)}};i.setTyped=function(d){d?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,c)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,u))},i.setTyped(a)},{}],2:[function(o,n,i){"use strict";var a=o("./common"),l=!0,c=!0;try{String.fromCharCode.apply(null,[0])}catch{l=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{c=!1}for(var u=new a.Buf8(256),d=0;d<256;d++)u[d]=d>=252?6:d>=248?5:d>=240?4:d>=224?3:d>=192?2:1;u[254]=u[254]=1,i.string2buf=function(m){var h,g,v,y,b,_=m.length,S=0;for(y=0;y<_;y++)g=m.charCodeAt(y),(g&64512)===55296&&y+1<_&&(v=m.charCodeAt(y+1),(v&64512)===56320&&(g=65536+(g-55296<<10)+(v-56320),y++)),S+=g<128?1:g<2048?2:g<65536?3:4;for(h=new a.Buf8(S),b=0,y=0;b<S;y++)g=m.charCodeAt(y),(g&64512)===55296&&y+1<_&&(v=m.charCodeAt(y+1),(v&64512)===56320&&(g=65536+(g-55296<<10)+(v-56320),y++)),g<128?h[b++]=g:g<2048?(h[b++]=192|g>>>6,h[b++]=128|g&63):g<65536?(h[b++]=224|g>>>12,h[b++]=128|g>>>6&63,h[b++]=128|g&63):(h[b++]=240|g>>>18,h[b++]=128|g>>>12&63,h[b++]=128|g>>>6&63,h[b++]=128|g&63);return h};function f(m,h){if(h<65534&&(m.subarray&&c||!m.subarray&&l))return String.fromCharCode.apply(null,a.shrinkBuf(m,h));for(var g="",v=0;v<h;v++)g+=String.fromCharCode(m[v]);return g}i.buf2binstring=function(m){return f(m,m.length)},i.binstring2buf=function(m){for(var h=new a.Buf8(m.length),g=0,v=h.length;g<v;g++)h[g]=m.charCodeAt(g);return h},i.buf2string=function(m,h){var g,v,y,b,_=h||m.length,S=new Array(_*2);for(v=0,g=0;g<_;){if(y=m[g++],y<128){S[v++]=y;continue}if(b=u[y],b>4){S[v++]=65533,g+=b-1;continue}for(y&=b===2?31:b===3?15:7;b>1&&g<_;)y=y<<6|m[g++]&63,b--;if(b>1){S[v++]=65533;continue}y<65536?S[v++]=y:(y-=65536,S[v++]=55296|y>>10&1023,S[v++]=56320|y&1023)}return f(S,v)},i.utf8border=function(m,h){var g;for(h=h||m.length,h>m.length&&(h=m.length),g=h-1;g>=0&&(m[g]&192)===128;)g--;return g<0||g===0?h:g+u[m[g]]>h?g:h}},{"./common":1}],3:[function(o,n,i){"use strict";function a(l,c,u,d){for(var f=l&65535|0,m=l>>>16&65535|0,h=0;u!==0;){h=u>2e3?2e3:u,u-=h;do f=f+c[d++]|0,m=m+f|0;while(--h);f%=65521,m%=65521}return f|m<<16|0}n.exports=a},{}],4:[function(o,n,i){"use strict";n.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(o,n,i){"use strict";function a(){for(var u,d=[],f=0;f<256;f++){u=f;for(var m=0;m<8;m++)u=u&1?3988292384^u>>>1:u>>>1;d[f]=u}return d}var l=a();function c(u,d,f,m){var h=l,g=m+f;u^=-1;for(var v=m;v<g;v++)u=u>>>8^h[(u^d[v])&255];return u^-1}n.exports=c},{}],6:[function(o,n,i){"use strict";function a(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}n.exports=a},{}],7:[function(o,n,i){"use strict";var a=30,l=12;n.exports=function(u,d){var f,m,h,g,v,y,b,_,S,x,T,R,F,B,z,L,M,k,I,U,G,Y,Z,V,j;f=u.state,m=u.next_in,V=u.input,h=m+(u.avail_in-5),g=u.next_out,j=u.output,v=g-(d-u.avail_out),y=g+(u.avail_out-257),b=f.dmax,_=f.wsize,S=f.whave,x=f.wnext,T=f.window,R=f.hold,F=f.bits,B=f.lencode,z=f.distcode,L=(1<<f.lenbits)-1,M=(1<<f.distbits)-1;e:do{F<15&&(R+=V[m++]<<F,F+=8,R+=V[m++]<<F,F+=8),k=B[R&L];t:for(;;){if(I=k>>>24,R>>>=I,F-=I,I=k>>>16&255,I===0)j[g++]=k&65535;else if(I&16){U=k&65535,I&=15,I&&(F<I&&(R+=V[m++]<<F,F+=8),U+=R&(1<<I)-1,R>>>=I,F-=I),F<15&&(R+=V[m++]<<F,F+=8,R+=V[m++]<<F,F+=8),k=z[R&M];r:for(;;){if(I=k>>>24,R>>>=I,F-=I,I=k>>>16&255,I&16){if(G=k&65535,I&=15,F<I&&(R+=V[m++]<<F,F+=8,F<I&&(R+=V[m++]<<F,F+=8)),G+=R&(1<<I)-1,G>b){u.msg="invalid distance too far back",f.mode=a;break e}if(R>>>=I,F-=I,I=g-v,G>I){if(I=G-I,I>S&&f.sane){u.msg="invalid distance too far back",f.mode=a;break e}if(Y=0,Z=T,x===0){if(Y+=_-I,I<U){U-=I;do j[g++]=T[Y++];while(--I);Y=g-G,Z=j}}else if(x<I){if(Y+=_+x-I,I-=x,I<U){U-=I;do j[g++]=T[Y++];while(--I);if(Y=0,x<U){I=x,U-=I;do j[g++]=T[Y++];while(--I);Y=g-G,Z=j}}}else if(Y+=x-I,I<U){U-=I;do j[g++]=T[Y++];while(--I);Y=g-G,Z=j}for(;U>2;)j[g++]=Z[Y++],j[g++]=Z[Y++],j[g++]=Z[Y++],U-=3;U&&(j[g++]=Z[Y++],U>1&&(j[g++]=Z[Y++]))}else{Y=g-G;do j[g++]=j[Y++],j[g++]=j[Y++],j[g++]=j[Y++],U-=3;while(U>2);U&&(j[g++]=j[Y++],U>1&&(j[g++]=j[Y++]))}}else if((I&64)===0){k=z[(k&65535)+(R&(1<<I)-1)];continue r}else{u.msg="invalid distance code",f.mode=a;break e}break}}else if((I&64)===0){k=B[(k&65535)+(R&(1<<I)-1)];continue t}else if(I&32){f.mode=l;break e}else{u.msg="invalid literal/length code",f.mode=a;break e}break}}while(m<h&&g<y);U=F>>3,m-=U,F-=U<<3,R&=(1<<F)-1,u.next_in=m,u.next_out=g,u.avail_in=m<h?5+(h-m):5-(m-h),u.avail_out=g<y?257+(y-g):257-(g-y),f.hold=R,f.bits=F}},{}],8:[function(o,n,i){"use strict";var a=o("../utils/common"),l=o("./adler32"),c=o("./crc32"),u=o("./inffast"),d=o("./inftrees"),f=0,m=1,h=2,g=4,v=5,y=6,b=0,_=1,S=2,x=-2,T=-3,R=-4,F=-5,B=8,z=1,L=2,M=3,k=4,I=5,U=6,G=7,Y=8,Z=9,V=10,j=11,H=12,X=13,ae=14,ne=15,ue=16,Ye=17,ye=18,oe=19,ge=20,Re=21,ze=22,Ve=23,tt=24,vt=25,le=26,J=27,ie=28,ee=29,se=30,Ue=31,ke=32,Be=852,Je=592,Fe=15,Se=Fe;function yt(q){return(q>>>24&255)+(q>>>8&65280)+((q&65280)<<8)+((q&255)<<24)}function Jr(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new a.Buf16(320),this.work=new a.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function bn(q){var fe;return!q||!q.state?x:(fe=q.state,q.total_in=q.total_out=fe.total=0,q.msg="",fe.wrap&&(q.adler=fe.wrap&1),fe.mode=z,fe.last=0,fe.havedict=0,fe.dmax=32768,fe.head=null,fe.hold=0,fe.bits=0,fe.lencode=fe.lendyn=new a.Buf32(Be),fe.distcode=fe.distdyn=new a.Buf32(Je),fe.sane=1,fe.back=-1,b)}function Sn(q){var fe;return!q||!q.state?x:(fe=q.state,fe.wsize=0,fe.whave=0,fe.wnext=0,bn(q))}function Zo(q,fe){var P,be;return!q||!q.state||(be=q.state,fe<0?(P=0,fe=-fe):(P=(fe>>4)+1,fe<48&&(fe&=15)),fe&&(fe<8||fe>15))?x:(be.window!==null&&be.wbits!==fe&&(be.window=null),be.wrap=P,be.wbits=fe,Sn(q))}function Sr(q,fe){var P,be;return q?(be=new Jr,q.state=be,be.window=null,P=Zo(q,fe),P!==b&&(q.state=null),P):x}function Ko(q){return Sr(q,Se)}var _n=!0,Ke,Sv;function Um(q){if(_n){var fe;for(Ke=new a.Buf32(512),Sv=new a.Buf32(32),fe=0;fe<144;)q.lens[fe++]=8;for(;fe<256;)q.lens[fe++]=9;for(;fe<280;)q.lens[fe++]=7;for(;fe<288;)q.lens[fe++]=8;for(d(m,q.lens,0,288,Ke,0,q.work,{bits:9}),fe=0;fe<32;)q.lens[fe++]=5;d(h,q.lens,0,32,Sv,0,q.work,{bits:5}),_n=!1}q.lencode=Ke,q.lenbits=9,q.distcode=Sv,q.distbits=5}function Vr(q,fe,P,be){var jt,me=q.state;return me.window===null&&(me.wsize=1<<me.wbits,me.wnext=0,me.whave=0,me.window=new a.Buf8(me.wsize)),be>=me.wsize?(a.arraySet(me.window,fe,P-me.wsize,me.wsize,0),me.wnext=0,me.whave=me.wsize):(jt=me.wsize-me.wnext,jt>be&&(jt=be),a.arraySet(me.window,fe,P-be,jt,me.wnext),be-=jt,be?(a.arraySet(me.window,fe,P-be,be,0),me.wnext=be,me.whave=me.wsize):(me.wnext+=jt,me.wnext===me.wsize&&(me.wnext=0),me.whave<me.wsize&&(me.whave+=jt))),0}function x1(q,fe){var P,be,jt,me,wn,ve,_r,Q,K,Bd,It,Pe,Md,Ld,lr=0,at,jr,zr,fo,_l,Vd,cr,xn,wr=new a.Buf8(4),Cn,Yn,Hm=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!q||!q.state||!q.output||!q.input&&q.avail_in!==0)return x;P=q.state,P.mode===H&&(P.mode=X),wn=q.next_out,jt=q.output,_r=q.avail_out,me=q.next_in,be=q.input,ve=q.avail_in,Q=P.hold,K=P.bits,Bd=ve,It=_r,xn=b;e:for(;;)switch(P.mode){case z:if(P.wrap===0){P.mode=X;break}for(;K<16;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}if(P.wrap&2&&Q===35615){P.check=0,wr[0]=Q&255,wr[1]=Q>>>8&255,P.check=c(P.check,wr,2,0),Q=0,K=0,P.mode=L;break}if(P.flags=0,P.head&&(P.head.done=!1),!(P.wrap&1)||(((Q&255)<<8)+(Q>>8))%31){q.msg="incorrect header check",P.mode=se;break}if((Q&15)!==B){q.msg="unknown compression method",P.mode=se;break}if(Q>>>=4,K-=4,cr=(Q&15)+8,P.wbits===0)P.wbits=cr;else if(cr>P.wbits){q.msg="invalid window size",P.mode=se;break}P.dmax=1<<cr,q.adler=P.check=1,P.mode=Q&512?V:H,Q=0,K=0;break;case L:for(;K<16;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}if(P.flags=Q,(P.flags&255)!==B){q.msg="unknown compression method",P.mode=se;break}if(P.flags&57344){q.msg="unknown header flags set",P.mode=se;break}P.head&&(P.head.text=Q>>8&1),P.flags&512&&(wr[0]=Q&255,wr[1]=Q>>>8&255,P.check=c(P.check,wr,2,0)),Q=0,K=0,P.mode=M;case M:for(;K<32;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}P.head&&(P.head.time=Q),P.flags&512&&(wr[0]=Q&255,wr[1]=Q>>>8&255,wr[2]=Q>>>16&255,wr[3]=Q>>>24&255,P.check=c(P.check,wr,4,0)),Q=0,K=0,P.mode=k;case k:for(;K<16;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}P.head&&(P.head.xflags=Q&255,P.head.os=Q>>8),P.flags&512&&(wr[0]=Q&255,wr[1]=Q>>>8&255,P.check=c(P.check,wr,2,0)),Q=0,K=0,P.mode=I;case I:if(P.flags&1024){for(;K<16;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}P.length=Q,P.head&&(P.head.extra_len=Q),P.flags&512&&(wr[0]=Q&255,wr[1]=Q>>>8&255,P.check=c(P.check,wr,2,0)),Q=0,K=0}else P.head&&(P.head.extra=null);P.mode=U;case U:if(P.flags&1024&&(Pe=P.length,Pe>ve&&(Pe=ve),Pe&&(P.head&&(cr=P.head.extra_len-P.length,P.head.extra||(P.head.extra=new Array(P.head.extra_len)),a.arraySet(P.head.extra,be,me,Pe,cr)),P.flags&512&&(P.check=c(P.check,be,Pe,me)),ve-=Pe,me+=Pe,P.length-=Pe),P.length))break e;P.length=0,P.mode=G;case G:if(P.flags&2048){if(ve===0)break e;Pe=0;do cr=be[me+Pe++],P.head&&cr&&P.length<65536&&(P.head.name+=String.fromCharCode(cr));while(cr&&Pe<ve);if(P.flags&512&&(P.check=c(P.check,be,Pe,me)),ve-=Pe,me+=Pe,cr)break e}else P.head&&(P.head.name=null);P.length=0,P.mode=Y;case Y:if(P.flags&4096){if(ve===0)break e;Pe=0;do cr=be[me+Pe++],P.head&&cr&&P.length<65536&&(P.head.comment+=String.fromCharCode(cr));while(cr&&Pe<ve);if(P.flags&512&&(P.check=c(P.check,be,Pe,me)),ve-=Pe,me+=Pe,cr)break e}else P.head&&(P.head.comment=null);P.mode=Z;case Z:if(P.flags&512){for(;K<16;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}if(Q!==(P.check&65535)){q.msg="header crc mismatch",P.mode=se;break}Q=0,K=0}P.head&&(P.head.hcrc=P.flags>>9&1,P.head.done=!0),q.adler=P.check=0,P.mode=H;break;case V:for(;K<32;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}q.adler=P.check=yt(Q),Q=0,K=0,P.mode=j;case j:if(P.havedict===0)return q.next_out=wn,q.avail_out=_r,q.next_in=me,q.avail_in=ve,P.hold=Q,P.bits=K,S;q.adler=P.check=1,P.mode=H;case H:if(fe===v||fe===y)break e;case X:if(P.last){Q>>>=K&7,K-=K&7,P.mode=J;break}for(;K<3;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}switch(P.last=Q&1,Q>>>=1,K-=1,Q&3){case 0:P.mode=ae;break;case 1:if(Um(P),P.mode=ge,fe===y){Q>>>=2,K-=2;break e}break;case 2:P.mode=Ye;break;case 3:q.msg="invalid block type",P.mode=se}Q>>>=2,K-=2;break;case ae:for(Q>>>=K&7,K-=K&7;K<32;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}if((Q&65535)!==(Q>>>16^65535)){q.msg="invalid stored block lengths",P.mode=se;break}if(P.length=Q&65535,Q=0,K=0,P.mode=ne,fe===y)break e;case ne:P.mode=ue;case ue:if(Pe=P.length,Pe){if(Pe>ve&&(Pe=ve),Pe>_r&&(Pe=_r),Pe===0)break e;a.arraySet(jt,be,me,Pe,wn),ve-=Pe,me+=Pe,_r-=Pe,wn+=Pe,P.length-=Pe;break}P.mode=H;break;case Ye:for(;K<14;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}if(P.nlen=(Q&31)+257,Q>>>=5,K-=5,P.ndist=(Q&31)+1,Q>>>=5,K-=5,P.ncode=(Q&15)+4,Q>>>=4,K-=4,P.nlen>286||P.ndist>30){q.msg="too many length or distance symbols",P.mode=se;break}P.have=0,P.mode=ye;case ye:for(;P.have<P.ncode;){for(;K<3;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}P.lens[Hm[P.have++]]=Q&7,Q>>>=3,K-=3}for(;P.have<19;)P.lens[Hm[P.have++]]=0;if(P.lencode=P.lendyn,P.lenbits=7,Cn={bits:P.lenbits},xn=d(f,P.lens,0,19,P.lencode,0,P.work,Cn),P.lenbits=Cn.bits,xn){q.msg="invalid code lengths set",P.mode=se;break}P.have=0,P.mode=oe;case oe:for(;P.have<P.nlen+P.ndist;){for(;lr=P.lencode[Q&(1<<P.lenbits)-1],at=lr>>>24,jr=lr>>>16&255,zr=lr&65535,!(at<=K);){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}if(zr<16)Q>>>=at,K-=at,P.lens[P.have++]=zr;else{if(zr===16){for(Yn=at+2;K<Yn;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}if(Q>>>=at,K-=at,P.have===0){q.msg="invalid bit length repeat",P.mode=se;break}cr=P.lens[P.have-1],Pe=3+(Q&3),Q>>>=2,K-=2}else if(zr===17){for(Yn=at+3;K<Yn;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}Q>>>=at,K-=at,cr=0,Pe=3+(Q&7),Q>>>=3,K-=3}else{for(Yn=at+7;K<Yn;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}Q>>>=at,K-=at,cr=0,Pe=11+(Q&127),Q>>>=7,K-=7}if(P.have+Pe>P.nlen+P.ndist){q.msg="invalid bit length repeat",P.mode=se;break}for(;Pe--;)P.lens[P.have++]=cr}}if(P.mode===se)break;if(P.lens[256]===0){q.msg="invalid code -- missing end-of-block",P.mode=se;break}if(P.lenbits=9,Cn={bits:P.lenbits},xn=d(m,P.lens,0,P.nlen,P.lencode,0,P.work,Cn),P.lenbits=Cn.bits,xn){q.msg="invalid literal/lengths set",P.mode=se;break}if(P.distbits=6,P.distcode=P.distdyn,Cn={bits:P.distbits},xn=d(h,P.lens,P.nlen,P.ndist,P.distcode,0,P.work,Cn),P.distbits=Cn.bits,xn){q.msg="invalid distances set",P.mode=se;break}if(P.mode=ge,fe===y)break e;case ge:P.mode=Re;case Re:if(ve>=6&&_r>=258){q.next_out=wn,q.avail_out=_r,q.next_in=me,q.avail_in=ve,P.hold=Q,P.bits=K,u(q,It),wn=q.next_out,jt=q.output,_r=q.avail_out,me=q.next_in,be=q.input,ve=q.avail_in,Q=P.hold,K=P.bits,P.mode===H&&(P.back=-1);break}for(P.back=0;lr=P.lencode[Q&(1<<P.lenbits)-1],at=lr>>>24,jr=lr>>>16&255,zr=lr&65535,!(at<=K);){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}if(jr&&(jr&240)===0){for(fo=at,_l=jr,Vd=zr;lr=P.lencode[Vd+((Q&(1<<fo+_l)-1)>>fo)],at=lr>>>24,jr=lr>>>16&255,zr=lr&65535,!(fo+at<=K);){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}Q>>>=fo,K-=fo,P.back+=fo}if(Q>>>=at,K-=at,P.back+=at,P.length=zr,jr===0){P.mode=le;break}if(jr&32){P.back=-1,P.mode=H;break}if(jr&64){q.msg="invalid literal/length code",P.mode=se;break}P.extra=jr&15,P.mode=ze;case ze:if(P.extra){for(Yn=P.extra;K<Yn;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}P.length+=Q&(1<<P.extra)-1,Q>>>=P.extra,K-=P.extra,P.back+=P.extra}P.was=P.length,P.mode=Ve;case Ve:for(;lr=P.distcode[Q&(1<<P.distbits)-1],at=lr>>>24,jr=lr>>>16&255,zr=lr&65535,!(at<=K);){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}if((jr&240)===0){for(fo=at,_l=jr,Vd=zr;lr=P.distcode[Vd+((Q&(1<<fo+_l)-1)>>fo)],at=lr>>>24,jr=lr>>>16&255,zr=lr&65535,!(fo+at<=K);){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}Q>>>=fo,K-=fo,P.back+=fo}if(Q>>>=at,K-=at,P.back+=at,jr&64){q.msg="invalid distance code",P.mode=se;break}P.offset=zr,P.extra=jr&15,P.mode=tt;case tt:if(P.extra){for(Yn=P.extra;K<Yn;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}P.offset+=Q&(1<<P.extra)-1,Q>>>=P.extra,K-=P.extra,P.back+=P.extra}if(P.offset>P.dmax){q.msg="invalid distance too far back",P.mode=se;break}P.mode=vt;case vt:if(_r===0)break e;if(Pe=It-_r,P.offset>Pe){if(Pe=P.offset-Pe,Pe>P.whave&&P.sane){q.msg="invalid distance too far back",P.mode=se;break}Pe>P.wnext?(Pe-=P.wnext,Md=P.wsize-Pe):Md=P.wnext-Pe,Pe>P.length&&(Pe=P.length),Ld=P.window}else Ld=jt,Md=wn-P.offset,Pe=P.length;Pe>_r&&(Pe=_r),_r-=Pe,P.length-=Pe;do jt[wn++]=Ld[Md++];while(--Pe);P.length===0&&(P.mode=Re);break;case le:if(_r===0)break e;jt[wn++]=P.length,_r--,P.mode=Re;break;case J:if(P.wrap){for(;K<32;){if(ve===0)break e;ve--,Q|=be[me++]<<K,K+=8}if(It-=_r,q.total_out+=It,P.total+=It,It&&(q.adler=P.check=P.flags?c(P.check,jt,It,wn-It):l(P.check,jt,It,wn-It)),It=_r,(P.flags?Q:yt(Q))!==P.check){q.msg="incorrect data check",P.mode=se;break}Q=0,K=0}P.mode=ie;case ie:if(P.wrap&&P.flags){for(;K<32;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}if(Q!==(P.total&4294967295)){q.msg="incorrect length check",P.mode=se;break}Q=0,K=0}P.mode=ee;case ee:xn=_;break e;case se:xn=T;break e;case Ue:return R;case ke:default:return x}return q.next_out=wn,q.avail_out=_r,q.next_in=me,q.avail_in=ve,P.hold=Q,P.bits=K,(P.wsize||It!==q.avail_out&&P.mode<se&&(P.mode<J||fe!==g))&&Vr(q,q.output,q.next_out,It-q.avail_out)?(P.mode=Ue,R):(Bd-=q.avail_in,It-=q.avail_out,q.total_in+=Bd,q.total_out+=It,P.total+=It,P.wrap&&It&&(q.adler=P.check=P.flags?c(P.check,jt,It,q.next_out-It):l(P.check,jt,It,q.next_out-It)),q.data_type=P.bits+(P.last?64:0)+(P.mode===H?128:0)+(P.mode===ge||P.mode===ne?256:0),(Bd===0&&It===0||fe===g)&&xn===b&&(xn=F),xn)}function Wi(q){if(!q||!q.state)return x;var fe=q.state;return fe.window&&(fe.window=null),q.state=null,b}function xa(q,fe){var P;return!q||!q.state||(P=q.state,(P.wrap&2)===0)?x:(P.head=fe,fe.done=!1,b)}function Ci(q,fe){var P=fe.length,be,jt,me;return!q||!q.state||(be=q.state,be.wrap!==0&&be.mode!==j)?x:be.mode===j&&(jt=1,jt=l(jt,fe,P,0),jt!==be.check)?T:(me=Vr(q,fe,P,P),me?(be.mode=Ue,R):(be.havedict=1,b))}i.inflateReset=Sn,i.inflateReset2=Zo,i.inflateResetKeep=bn,i.inflateInit=Ko,i.inflateInit2=Sr,i.inflate=x1,i.inflateEnd=Wi,i.inflateGetHeader=xa,i.inflateSetDictionary=Ci,i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(o,n,i){"use strict";var a=o("../utils/common"),l=15,c=852,u=592,d=0,f=1,m=2,h=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],v=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],y=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];n.exports=function(_,S,x,T,R,F,B,z){var L=z.bits,M=0,k=0,I=0,U=0,G=0,Y=0,Z=0,V=0,j=0,H=0,X,ae,ne,ue,Ye,ye=null,oe=0,ge,Re=new a.Buf16(l+1),ze=new a.Buf16(l+1),Ve=null,tt=0,vt,le,J;for(M=0;M<=l;M++)Re[M]=0;for(k=0;k<T;k++)Re[S[x+k]]++;for(G=L,U=l;U>=1&&Re[U]===0;U--);if(G>U&&(G=U),U===0)return R[F++]=1<<24|64<<16|0,R[F++]=1<<24|64<<16|0,z.bits=1,0;for(I=1;I<U&&Re[I]===0;I++);for(G<I&&(G=I),V=1,M=1;M<=l;M++)if(V<<=1,V-=Re[M],V<0)return-1;if(V>0&&(_===d||U!==1))return-1;for(ze[1]=0,M=1;M<l;M++)ze[M+1]=ze[M]+Re[M];for(k=0;k<T;k++)S[x+k]!==0&&(B[ze[S[x+k]]++]=k);if(_===d?(ye=Ve=B,ge=19):_===f?(ye=h,oe-=257,Ve=g,tt-=257,ge=256):(ye=v,Ve=y,ge=-1),H=0,k=0,M=I,Ye=F,Y=G,Z=0,ne=-1,j=1<<G,ue=j-1,_===f&&j>c||_===m&&j>u)return 1;for(;;){vt=M-Z,B[k]<ge?(le=0,J=B[k]):B[k]>ge?(le=Ve[tt+B[k]],J=ye[oe+B[k]]):(le=96,J=0),X=1<<M-Z,ae=1<<Y,I=ae;do ae-=X,R[Ye+(H>>Z)+ae]=vt<<24|le<<16|J|0;while(ae!==0);for(X=1<<M-1;H&X;)X>>=1;if(X!==0?(H&=X-1,H+=X):H=0,k++,--Re[M]===0){if(M===U)break;M=S[x+B[k]]}if(M>G&&(H&ue)!==ne){for(Z===0&&(Z=G),Ye+=I,Y=M-Z,V=1<<Y;Y+Z<U&&(V-=Re[Y+Z],!(V<=0));)Y++,V<<=1;if(j+=1<<Y,_===f&&j>c||_===m&&j>u)return 1;ne=H&ue,R[ne]=G<<24|Y<<16|Ye-F|0}}return H!==0&&(R[Ye+H]=M-Z<<24|64<<16|0),z.bits=G,0}},{"../utils/common":1}],10:[function(o,n,i){"use strict";n.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(o,n,i){"use strict";function a(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}n.exports=a},{}],"/lib/inflate.js":[function(o,n,i){"use strict";var a=o("./zlib/inflate"),l=o("./utils/common"),c=o("./utils/strings"),u=o("./zlib/constants"),d=o("./zlib/messages"),f=o("./zlib/zstream"),m=o("./zlib/gzheader"),h=Object.prototype.toString;function g(b){if(!(this instanceof g))return new g(b);this.options=l.assign({chunkSize:16384,windowBits:0,to:""},b||{});var _=this.options;_.raw&&_.windowBits>=0&&_.windowBits<16&&(_.windowBits=-_.windowBits,_.windowBits===0&&(_.windowBits=-15)),_.windowBits>=0&&_.windowBits<16&&!(b&&b.windowBits)&&(_.windowBits+=32),_.windowBits>15&&_.windowBits<48&&(_.windowBits&15)===0&&(_.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var S=a.inflateInit2(this.strm,_.windowBits);if(S!==u.Z_OK)throw new Error(d[S]);if(this.header=new m,a.inflateGetHeader(this.strm,this.header),_.dictionary&&(typeof _.dictionary=="string"?_.dictionary=c.string2buf(_.dictionary):h.call(_.dictionary)==="[object ArrayBuffer]"&&(_.dictionary=new Uint8Array(_.dictionary)),_.raw&&(S=a.inflateSetDictionary(this.strm,_.dictionary),S!==u.Z_OK)))throw new Error(d[S])}g.prototype.push=function(b,_){var S=this.strm,x=this.options.chunkSize,T=this.options.dictionary,R,F,B,z,L,M=!1;if(this.ended)return!1;F=_===~~_?_:_===!0?u.Z_FINISH:u.Z_NO_FLUSH,typeof b=="string"?S.input=c.binstring2buf(b):h.call(b)==="[object ArrayBuffer]"?S.input=new Uint8Array(b):S.input=b,S.next_in=0,S.avail_in=S.input.length;do{if(S.avail_out===0&&(S.output=new l.Buf8(x),S.next_out=0,S.avail_out=x),R=a.inflate(S,u.Z_NO_FLUSH),R===u.Z_NEED_DICT&&T&&(R=a.inflateSetDictionary(this.strm,T)),R===u.Z_BUF_ERROR&&M===!0&&(R=u.Z_OK,M=!1),R!==u.Z_STREAM_END&&R!==u.Z_OK)return this.onEnd(R),this.ended=!0,!1;S.next_out&&(S.avail_out===0||R===u.Z_STREAM_END||S.avail_in===0&&(F===u.Z_FINISH||F===u.Z_SYNC_FLUSH))&&(this.options.to==="string"?(B=c.utf8border(S.output,S.next_out),z=S.next_out-B,L=c.buf2string(S.output,B),S.next_out=z,S.avail_out=x-z,z&&l.arraySet(S.output,S.output,B,z,0),this.onData(L)):this.onData(l.shrinkBuf(S.output,S.next_out))),S.avail_in===0&&S.avail_out===0&&(M=!0)}while((S.avail_in>0||S.avail_out===0)&&R!==u.Z_STREAM_END);return R===u.Z_STREAM_END&&(F=u.Z_FINISH),F===u.Z_FINISH?(R=a.inflateEnd(this.strm),this.onEnd(R),this.ended=!0,R===u.Z_OK):(F===u.Z_SYNC_FLUSH&&(this.onEnd(u.Z_OK),S.avail_out=0),!0)},g.prototype.onData=function(b){this.chunks.push(b)},g.prototype.onEnd=function(b){b===u.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=l.flattenChunks(this.chunks)),this.chunks=[],this.err=b,this.msg=this.strm.msg};function v(b,_){var S=new g(_);if(S.push(b,!0),S.err)throw S.msg||d[S.err];return S.result}function y(b,_){return _=_||{},_.raw=!0,v(b,_)}i.Inflate=g,i.inflate=v,i.inflateRaw=y,i.ungzip=v},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")})();var aje=globalThis.fetch,_x=class{constructor(e,t={},r){this.type=e,this.detail=t,this.msg=r,Object.defineProperty(this,"__mayPropagate",{enumerable:!1,writable:!0}),this.__mayPropagate=!0}preventDefault(){}stopPropagation(){this.__mayPropagate=!1}valueOf(){return this}toString(){return this.msg?`[${this.type} event]: ${this.msg}`:`[${this.type} event]`}},qye=class{constructor(){this.listeners={}}addEventListener(e,t,r){let o=this.listeners[e]||[];r?o.unshift(t):o.push(t),this.listeners[e]=o}removeEventListener(e,t){let r=this.listeners[e]||[],o=r.findIndex(n=>n===t);o>-1&&(r.splice(o,1),this.listeners[e]=r)}dispatch(e){let t=this.listeners[e.type];if(t)for(let r=0,o=t.length;r<o&&e.__mayPropagate;r++)t[r](e)}},Zye=new Date("1904-01-01T00:00:00+0000").getTime();function Kye(e){return Array.from(e).map(t=>String.fromCharCode(t)).join("")}var Xye=class{constructor(e,t,r){this.name=(r||e.tag||"").trim(),this.length=e.length,this.start=e.offset,this.offset=0,this.data=t,["getInt8","getUint8","getInt16","getUint16","getInt32","getUint32","getBigInt64","getBigUint64"].forEach(o=>{let n=o.replace(/get(Big)?/,"").toLowerCase(),i=parseInt(o.replace(/[^\d]/g,""))/8;Object.defineProperty(this,n,{get:()=>this.getValue(o,i)})})}get currentPosition(){return this.start+this.offset}set currentPosition(e){this.start=e,this.offset=0}skip(e=0,t=8){this.offset+=e*t/8}getValue(e,t){let r=this.start+this.offset;this.offset+=t;try{return this.data[e](r)}catch(o){throw console.error("parser",e,t,this),console.error("parser",this.start,this.offset),o}}flags(e){if(e===8||e===16||e===32||e===64)return this[`uint${e}`].toString(2).padStart(e,0).split("").map(t=>t==="1");console.error("Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long"),console.trace()}get tag(){let e=this.uint32;return Kye([e>>24&255,e>>16&255,e>>8&255,e&255])}get fixed(){let e=this.int16,t=Math.round(1e3*this.uint16/65356);return e+t/1e3}get legacyFixed(){let e=this.uint16,t=this.uint16.toString(16).padStart(4,0);return parseFloat(`${e}.${t}`)}get uint24(){return(this.uint8<<16)+(this.uint8<<8)+this.uint8}get uint128(){let e=0;for(let t=0;t<5;t++){let r=this.uint8;if(e=e*128+(r&127),r<128)break}return e}get longdatetime(){return new Date(Zye+1e3*parseInt(this.int64.toString()))}get fword(){return this.int16}get ufword(){return this.uint16}get Offset16(){return this.uint16}get Offset32(){return this.uint32}get F2DOT14(){let e=p.uint16,t=[0,1,-2,-1][e>>14],r=e&16383;return t+r/16384}verifyLength(){this.offset!=this.length&&console.error(`unexpected parsed table size (${this.offset}) for "${this.name}" (expected ${this.length})`)}readBytes(e=0,t=0,r=8,o=!1){if(e=e||this.length,e===0)return[];t&&(this.currentPosition=t);let n=`${o?"":"u"}int${r}`,i=[];for(;e--;)i.push(this[n]);return i}},pr=class{constructor(e){Object.defineProperty(this,"parser",{enumerable:!1,get:()=>e});let r=e.currentPosition;Object.defineProperty(this,"start",{enumerable:!1,get:()=>r})}load(e){Object.keys(e).forEach(t=>{let r=Object.getOwnPropertyDescriptor(e,t);r.get?this[t]=r.get.bind(this):r.value!==void 0&&(this[t]=r.value)}),this.parser.length&&this.parser.verifyLength()}},qe=class extends pr{constructor(e,t,r){let{parser:o,start:n}=super(new Xye(e,t,r));Object.defineProperty(this,"p",{enumerable:!1,get:()=>o}),Object.defineProperty(this,"tableStart",{enumerable:!1,get:()=>n})}};function we(e,t,r){let o;Object.defineProperty(e,t,{get:()=>o||(o=r(),o),enumerable:!0})}var Qye=class extends qe{constructor(e,t,r){let{p:o}=super({offset:0,length:12},t,"sfnt");this.version=o.uint32,this.numTables=o.uint16,this.searchRange=o.uint16,this.entrySelector=o.uint16,this.rangeShift=o.uint16,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(n=>new Jye(o)),this.tables={},this.directory.forEach(n=>{let i=()=>r(this.tables,{tag:n.tag,offset:n.offset,length:n.length},t);we(this.tables,n.tag.trim(),i)})}},Jye=class{constructor(e){this.tag=e.tag,this.checksum=e.uint32,this.offset=e.uint32,this.length=e.uint32}},lU=aU.inflate||void 0,cU=void 0,$ye=class extends qe{constructor(e,t,r){let{p:o}=super({offset:0,length:44},t,"woff");this.signature=o.tag,this.flavor=o.uint32,this.length=o.uint32,this.numTables=o.uint16,o.uint16,this.totalSfntSize=o.uint32,this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.metaOffset=o.uint32,this.metaLength=o.uint32,this.metaOrigLength=o.uint32,this.privOffset=o.uint32,this.privLength=o.uint32,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(n=>new ebe(o)),tbe(this,t,r)}},ebe=class{constructor(e){this.tag=e.tag,this.offset=e.uint32,this.compLength=e.uint32,this.origLength=e.uint32,this.origChecksum=e.uint32}};function tbe(e,t,r){e.tables={},e.directory.forEach(o=>{we(e.tables,o.tag.trim(),()=>{let n=0,i=t;if(o.compLength!==o.origLength){let a=t.buffer.slice(o.offset,o.offset+o.compLength),l;if(lU)l=lU(new Uint8Array(a));else if(cU)l=cU(new Uint8Array(a));else{let c="no brotli decoder available to decode WOFF2 font";throw font.onerror&&font.onerror(c),new Error(c)}i=new DataView(l.buffer)}else n=o.offset;return r(e.tables,{tag:o.tag,offset:n,length:o.origLength},i)})})}var uU=sU,dU=void 0,rbe=class extends qe{constructor(e,t,r){let{p:o}=super({offset:0,length:48},t,"woff2");this.signature=o.tag,this.flavor=o.uint32,this.length=o.uint32,this.numTables=o.uint16,o.uint16,this.totalSfntSize=o.uint32,this.totalCompressedSize=o.uint32,this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.metaOffset=o.uint32,this.metaLength=o.uint32,this.metaOrigLength=o.uint32,this.privOffset=o.uint32,this.privLength=o.uint32,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(l=>new obe(o));let n=o.currentPosition;this.directory[0].offset=0,this.directory.forEach((l,c)=>{let u=this.directory[c+1];u&&(u.offset=l.offset+(l.transformLength!==void 0?l.transformLength:l.origLength))});let i,a=t.buffer.slice(n);if(uU)i=uU(new Uint8Array(a));else if(dU)i=new Uint8Array(dU(a));else{let l="no brotli decoder available to decode WOFF2 font";throw e.onerror&&e.onerror(l),new Error(l)}nbe(this,i,r)}},obe=class{constructor(e){this.flags=e.uint8;let t=this.tagNumber=this.flags&63;t===63?this.tag=e.tag:this.tag=ibe(t);let o=(this.transformVersion=(this.flags&192)>>6)!==0;(this.tag==="glyf"||this.tag==="loca")&&(o=this.transformVersion!==3),this.origLength=e.uint128,o&&(this.transformLength=e.uint128)}};function nbe(e,t,r){e.tables={},e.directory.forEach(o=>{we(e.tables,o.tag.trim(),()=>{let n=o.offset,i=n+(o.transformLength?o.transformLength:o.origLength),a=new DataView(t.slice(n,i).buffer);try{return r(e.tables,{tag:o.tag,offset:0,length:o.origLength},a)}catch(l){console.error(l)}})})}function ibe(e){return["cmap","head","hhea","hmtx","maxp","name","OS/2","post","cvt ","fpgm","glyf","loca","prep","CFF ","VORG","EBDT","EBLC","gasp","hdmx","kern","LTSH","PCLT","VDMX","vhea","vmtx","BASE","GDEF","GPOS","GSUB","EBSC","JSTF","MATH","CBDT","CBLC","COLR","CPAL","SVG ","sbix","acnt","avar","bdat","bloc","bsln","cvar","fdsc","feat","fmtx","fvar","gvar","hsty","just","lcar","mort","morx","opbd","prop","trak","Zapf","Silf","Glat","Gloc","Feat","Sill"][e&63]}var yU={},bU=!1;Promise.all([Promise.resolve().then(function(){return Nbe}),Promise.resolve().then(function(){return Dbe}),Promise.resolve().then(function(){return Mbe}),Promise.resolve().then(function(){return jbe}),Promise.resolve().then(function(){return Ube}),Promise.resolve().then(function(){return qbe}),Promise.resolve().then(function(){return Kbe}),Promise.resolve().then(function(){return Qbe}),Promise.resolve().then(function(){return a0e}),Promise.resolve().then(function(){return y0e}),Promise.resolve().then(function(){return i1e}),Promise.resolve().then(function(){return a1e}),Promise.resolve().then(function(){return d1e}),Promise.resolve().then(function(){return h1e}),Promise.resolve().then(function(){return v1e}),Promise.resolve().then(function(){return b1e}),Promise.resolve().then(function(){return w1e}),Promise.resolve().then(function(){return C1e}),Promise.resolve().then(function(){return P1e}),Promise.resolve().then(function(){return E1e}),Promise.resolve().then(function(){return A1e}),Promise.resolve().then(function(){return I1e}),Promise.resolve().then(function(){return D1e}),Promise.resolve().then(function(){return L1e}),Promise.resolve().then(function(){return V1e}),Promise.resolve().then(function(){return z1e}),Promise.resolve().then(function(){return H1e}),Promise.resolve().then(function(){return W1e}),Promise.resolve().then(function(){return q1e}),Promise.resolve().then(function(){return X1e}),Promise.resolve().then(function(){return rSe}),Promise.resolve().then(function(){return sSe}),Promise.resolve().then(function(){return cSe}),Promise.resolve().then(function(){return mSe}),Promise.resolve().then(function(){return hSe}),Promise.resolve().then(function(){return vSe}),Promise.resolve().then(function(){return SSe}),Promise.resolve().then(function(){return wSe}),Promise.resolve().then(function(){return kSe}),Promise.resolve().then(function(){return RSe}),Promise.resolve().then(function(){return ISe})]).then(e=>{e.forEach(t=>{let r=Object.keys(t)[0];yU[r]=t[r]}),bU=!0});function sbe(e,t,r){let o=t.tag.replace(/[^\w\d]/g,""),n=yU[o];return n?new n(t,r,e):(console.warn(`lib-font has no definition for ${o}. The table was skipped.`),{})}function abe(){let e=0;function t(r,o){if(!bU)return e>10?o(new Error("loading took too long")):(e++,setTimeout(()=>t(r),250));r(sbe)}return new Promise((r,o)=>t(r))}function lbe(e,t){let r=e.lastIndexOf("."),o=(e.substring(r+1)||"").toLowerCase(),n={ttf:"truetype",otf:"opentype",woff:"woff",woff2:"woff2"}[o];if(n)return n;let i={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.",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.",fon:"The .fon format is not supported: this is an ancient Windows bitmap font format.",ttc:"Based on the current CSS specification, font collections are not (yet?) supported."}[o];if(i||(i=`${e} is not a known webfont format.`),t)throw new Error(i);console.warn(`Could not load font: ${i}`)}async function cbe(e,t,r={}){if(!globalThis.document)return;let o=lbe(t,r.errorOnStyle);if(!o)return;let n=document.createElement("style");n.className="injected-by-Font-js";let i=[];return r.styleRules&&(i=Object.entries(r.styleRules).map(([a,l])=>`${a}: ${l};`)),n.textContent=`
@font-face {
    font-family: "${e}";
    ${i.join(`
	`)}
    src: url("${t}") format("${o}");
}`,globalThis.document.head.appendChild(n),n}var ube=[0,1,0,0],dbe=[79,84,84,79],fbe=[119,79,70,70],mbe=[119,79,70,50];function wx(e,t){if(e.length===t.length){for(let r=0;r<e.length;r++)if(e[r]!==t[r])return;return!0}}function pbe(e){let t=[e.getUint8(0),e.getUint8(1),e.getUint8(2),e.getUint8(3)];if(wx(t,ube)||wx(t,dbe))return"SFNT";if(wx(t,fbe))return"WOFF";if(wx(t,mbe))return"WOFF2"}function hbe(e){if(!e.ok)throw new Error(`HTTP ${e.status} - ${e.statusText}`);return e}var Cx=class extends qye{constructor(e,t={}){super(),this.name=e,this.options=t,this.metrics=!1}get src(){return this.__src}set src(e){this.__src=e,(async()=>(globalThis.document&&!this.options.skipStyleSheet&&await cbe(this.name,e,this.options),this.loadFont(e)))()}async loadFont(e,t){fetch(e).then(r=>hbe(r)&&r.arrayBuffer()).then(r=>this.fromDataBuffer(r,t||e)).catch(r=>{let o=new _x("error",r,`Failed to load font at ${t||e}`);this.dispatch(o),this.onerror&&this.onerror(o)})}async fromDataBuffer(e,t){this.fontData=new DataView(e);let r=pbe(this.fontData);if(!r)throw new Error(`${t} is either an unsupported font format, or not a font at all.`);await this.parseBasicData(r);let o=new _x("load",{font:this});this.dispatch(o),this.onload&&this.onload(o)}async parseBasicData(e){return abe().then(t=>(e==="SFNT"&&(this.opentype=new Qye(this,this.fontData,t)),e==="WOFF"&&(this.opentype=new $ye(this,this.fontData,t)),e==="WOFF2"&&(this.opentype=new rbe(this,this.fontData,t)),this.opentype))}getGlyphId(e){return this.opentype.tables.cmap.getGlyphId(e)}reverse(e){return this.opentype.tables.cmap.reverse(e)}supports(e){return this.getGlyphId(e)!==0}supportsVariation(e){return this.opentype.tables.cmap.supportsVariation(e)!==!1}measureText(e,t=16){if(this.__unloaded)throw new Error("Cannot measure text: font was unloaded. Please reload before calling measureText()");let r=document.createElement("div");r.textContent=e,r.style.fontFamily=this.name,r.style.fontSize=`${t}px`,r.style.color="transparent",r.style.background="transparent",r.style.top="0",r.style.left="0",r.style.position="absolute",document.body.appendChild(r);let o=r.getBoundingClientRect();document.body.removeChild(r);let n=this.opentype.tables["OS/2"];return o.fontSize=t,o.ascender=n.sTypoAscender,o.descender=n.sTypoDescender,o}unload(){if(this.styleElement.parentNode){this.styleElement.parentNode.removeElement(this.styleElement);let e=new _x("unload",{font:this});this.dispatch(e),this.onunload&&this.onunload(e)}this._unloaded=!0}load(){if(this.__unloaded){delete this.__unloaded,document.head.appendChild(this.styleElement);let e=new _x("load",{font:this});this.dispatch(e),this.onload&&this.onload(e)}}};globalThis.Font=Cx;var $l=class extends pr{constructor(e,t,r){super(e),this.plaformID=t,this.encodingID=r}},gbe=class extends $l{constructor(e,t,r){super(e,t,r),this.format=0,this.length=e.uint16,this.language=e.uint16,this.glyphIdArray=[...new Array(256)].map(o=>e.uint8)}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.")),0<=e&&e<=255}reverse(e){return console.warn("reverse not implemented for cmap subtable format 0"),{}}getSupportedCharCodes(){return[{start:1,end:256}]}},vbe=class extends $l{constructor(e,t,r){super(e,t,r),this.format=2,this.length=e.uint16,this.language=e.uint16,this.subHeaderKeys=[...new Array(256)].map(a=>e.uint16);let o=Math.max(...this.subHeaderKeys),n=e.currentPosition;we(this,"subHeaders",()=>(e.currentPosition=n,[...new Array(o)].map(a=>new ybe(e))));let i=n+o*8;we(this,"glyphIndexArray",()=>(e.currentPosition=i,[...new Array(o)].map(a=>e.uint16)))}supports(e){e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented."));let t=e&&255,r=e&&65280,o=this.subHeaders[r],n=this.subHeaders[o],i=n.firstCode,a=i+n.entryCount;return i<=t&&t<=a}reverse(e){return console.warn("reverse not implemented for cmap subtable format 2"),{}}getSupportedCharCodes(e=!1){return e?this.subHeaders.map(t=>({firstCode:t.firstCode,lastCode:t.lastCode})):this.subHeaders.map(t=>({start:t.firstCode,end:t.lastCode}))}},ybe=class{constructor(e){this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.first+this.entryCount,this.idDelta=e.int16,this.idRangeOffset=e.uint16}},bbe=class extends $l{constructor(e,t,r){super(e,t,r),this.format=4,this.length=e.uint16,this.language=e.uint16,this.segCountX2=e.uint16,this.segCount=this.segCountX2/2,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16;let o=e.currentPosition;we(this,"endCode",()=>e.readBytes(this.segCount,o,16));let n=o+2+this.segCountX2;we(this,"startCode",()=>e.readBytes(this.segCount,n,16));let i=n+this.segCountX2;we(this,"idDelta",()=>e.readBytes(this.segCount,i,16,!0));let a=i+this.segCountX2;we(this,"idRangeOffset",()=>e.readBytes(this.segCount,a,16));let l=a+this.segCountX2,c=this.length-(l-this.tableStart);we(this,"glyphIdArray",()=>e.readBytes(c,l,16)),we(this,"segments",()=>this.buildSegments(a,l,e))}buildSegments(e,t,r){let o=(n,i)=>{let a=this.startCode[i],l=this.endCode[i],c=this.idDelta[i],u=this.idRangeOffset[i],d=e+2*i,f=[];if(u===0)for(let m=a+c,h=l+c;m<=h;m++)f.push(m);else for(let m=0,h=l-a;m<=h;m++)r.currentPosition=d+u+m*2,f.push(r.uint16);return{startCode:a,endCode:l,idDelta:c,idRangeOffset:u,glyphIDs:f}};return[...new Array(this.segCount)].map(o)}reverse(e){let t=this.segments.find(o=>o.glyphIDs.includes(e));if(!t)return{};let r=t.startCode+t.glyphIDs.indexOf(e);return{code:r,unicode:String.fromCodePoint(r)}}getGlyphId(e){if(e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343||(e&65534)===65534||(e&65535)===65535)return 0;let t=this.segments.find(r=>r.startCode<=e&&e<=r.endCode);return t?t.glyphIDs[e-t.startCode]:0}supports(e){return this.getGlyphId(e)!==0}getSupportedCharCodes(e=!1){return e?this.segments:this.segments.map(t=>({start:t.startCode,end:t.endCode}))}},Sbe=class extends $l{constructor(e,t,r){super(e,t,r),this.format=6,this.length=e.uint16,this.language=e.uint16,this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.firstCode+this.entryCount-1,we(this,"glyphIdArray",()=>[...new Array(this.entryCount)].map(n=>e.uint16))}supports(e){if(e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.")),e<this.firstCode)return{};if(e>this.firstCode+this.entryCount)return{};let t=e-this.firstCode;return{code:t,unicode:String.fromCodePoint(t)}}reverse(e){let t=this.glyphIdArray.indexOf(e);if(t>-1)return this.firstCode+t}getSupportedCharCodes(e=!1){return e?[{firstCode:this.firstCode,lastCode:this.lastCode}]:[{start:this.firstCode,end:this.lastCode}]}},_be=class extends $l{constructor(e,t,r){super(e,t,r),this.format=8,e.uint16,this.length=e.uint32,this.language=e.uint32,this.is32=[...new Array(8192)].map(n=>e.uint8),this.numGroups=e.uint32,we(this,"groups",()=>[...new Array(this.numGroups)].map(n=>new wbe(e)))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.")),this.groups.findIndex(t=>t.startcharCode<=e&&e<=t.endcharCode)!==-1}reverse(e){return console.warn("reverse not implemented for cmap subtable format 8"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map(t=>({start:t.startcharCode,end:t.endcharCode}))}},wbe=class{constructor(e){this.startcharCode=e.uint32,this.endcharCode=e.uint32,this.startGlyphID=e.uint32}},xbe=class extends $l{constructor(e,t,r){super(e,t,r),this.format=10,e.uint16,this.length=e.uint32,this.language=e.uint32,this.startCharCode=e.uint32,this.numChars=e.uint32,this.endCharCode=this.startCharCode+this.numChars,we(this,"glyphs",()=>[...new Array(this.numChars)].map(n=>e.uint16))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.")),e<this.startCharCode||e>this.startCharCode+this.numChars?!1:e-this.startCharCode}reverse(e){return console.warn("reverse not implemented for cmap subtable format 10"),{}}getSupportedCharCodes(e=!1){return e?[{startCharCode:this.startCharCode,endCharCode:this.endCharCode}]:[{start:this.startCharCode,end:this.endCharCode}]}},Cbe=class extends $l{constructor(e,t,r){super(e,t,r),this.format=12,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32,we(this,"groups",()=>[...new Array(this.numGroups)].map(n=>new Tbe(e)))}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343||(e&65534)===65534||(e&65535)===65535?0:this.groups.findIndex(t=>t.startCharCode<=e&&e<=t.endCharCode)!==-1}reverse(e){for(let t of this.groups){let r=t.startGlyphID;if(r>e)continue;if(r===e)return t.startCharCode;if(r+(t.endCharCode-t.startCharCode)<e)continue;let n=t.startCharCode+(e-r);return{code:n,unicode:String.fromCodePoint(n)}}return{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map(t=>({start:t.startCharCode,end:t.endCharCode}))}},Tbe=class{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.startGlyphID=e.uint32}},Pbe=class extends $l{constructor(e,t,r){super(e,t,r),this.format=13,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32;let o=[...new Array(this.numGroups)].map(n=>new kbe(e));we(this,"groups",o)}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),this.groups.findIndex(t=>t.startCharCode<=e&&e<=t.endCharCode)!==-1}reverse(e){return console.warn("reverse not implemented for cmap subtable format 13"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map(t=>({start:t.startCharCode,end:t.endCharCode}))}},kbe=class{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.glyphID=e.uint32}},Ebe=class extends $l{constructor(e,t,r){super(e,t,r),this.subTableStart=e.currentPosition,this.format=14,this.length=e.uint32,this.numVarSelectorRecords=e.uint32,we(this,"varSelectors",()=>[...new Array(this.numVarSelectorRecords)].map(o=>new Rbe(e)))}supports(){return console.warn("supports not implemented for cmap subtable format 14"),0}getSupportedCharCodes(){return console.warn("getSupportedCharCodes not implemented for cmap subtable format 14"),[]}reverse(e){return console.warn("reverse not implemented for cmap subtable format 14"),{}}supportsVariation(e){let t=this.varSelector.find(r=>r.varSelector===e);return t||!1}getSupportedVariations(){return this.varSelectors.map(e=>e.varSelector)}},Rbe=class{constructor(e){this.varSelector=e.uint24,this.defaultUVSOffset=e.Offset32,this.nonDefaultUVSOffset=e.Offset32}};function Abe(e,t,r){let o=e.uint16;return o===0?new gbe(e,t,r):o===2?new vbe(e,t,r):o===4?new bbe(e,t,r):o===6?new Sbe(e,t,r):o===8?new _be(e,t,r):o===10?new xbe(e,t,r):o===12?new Cbe(e,t,r):o===13?new Pbe(e,t,r):o===14?new Ebe(e,t,r):{}}var Obe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numTables=r.uint16,this.encodingRecords=[...new Array(this.numTables)].map(o=>new Ibe(r,this.tableStart))}getSubTable(e){return this.encodingRecords[e].table}getSupportedEncodings(){return this.encodingRecords.map(e=>({platformID:e.platformID,encodingId:e.encodingID}))}getSupportedCharCodes(e,t){let r=this.encodingRecords.findIndex(n=>n.platformID===e&&n.encodingID===t);return r===-1?!1:this.getSubTable(r).getSupportedCharCodes()}reverse(e){for(let t=0;t<this.numTables;t++){let r=this.getSubTable(t).reverse(e);if(r)return r}}getGlyphId(e){let t=0;return this.encodingRecords.some((r,o)=>{let n=this.getSubTable(o);return n.getGlyphId?(t=n.getGlyphId(e),t!==0):!1}),t}supports(e){return this.encodingRecords.some((t,r)=>{let o=this.getSubTable(r);return o.supports&&o.supports(e)!==!1})}supportsVariation(e){return this.encodingRecords.some((t,r)=>{let o=this.getSubTable(r);return o.supportsVariation&&o.supportsVariation(e)!==!1})}},Ibe=class{constructor(e,t){let r=this.platformID=e.uint16,o=this.encodingID=e.uint16,n=this.offset=e.Offset32;we(this,"table",()=>(e.currentPosition=t+n,Abe(e,r,o)))}},Nbe=Object.freeze({__proto__:null,cmap:Obe}),Fbe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.load({majorVersion:r.uint16,minorVersion:r.uint16,fontRevision:r.fixed,checkSumAdjustment:r.uint32,magicNumber:r.uint32,flags:r.flags(16),unitsPerEm:r.uint16,created:r.longdatetime,modified:r.longdatetime,xMin:r.int16,yMin:r.int16,xMax:r.int16,yMax:r.int16,macStyle:r.flags(16),lowestRecPPEM:r.uint16,fontDirectionHint:r.uint16,indexToLocFormat:r.uint16,glyphDataFormat:r.uint16})}},Dbe=Object.freeze({__proto__:null,head:Fbe}),Bbe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.ascender=r.fword,this.descender=r.fword,this.lineGap=r.fword,this.advanceWidthMax=r.ufword,this.minLeftSideBearing=r.fword,this.minRightSideBearing=r.fword,this.xMaxExtent=r.fword,this.caretSlopeRise=r.int16,this.caretSlopeRun=r.int16,this.caretOffset=r.int16,r.int16,r.int16,r.int16,r.int16,this.metricDataFormat=r.int16,this.numberOfHMetrics=r.uint16,r.verifyLength()}},Mbe=Object.freeze({__proto__:null,hhea:Bbe}),Lbe=class extends qe{constructor(e,t,r){let{p:o}=super(e,t),n=r.hhea.numberOfHMetrics,i=r.maxp.numGlyphs,a=o.currentPosition;if(we(this,"hMetrics",()=>(o.currentPosition=a,[...new Array(n)].map(l=>new Vbe(o.uint16,o.int16)))),n<i){let l=a+n*4;we(this,"leftSideBearings",()=>(o.currentPosition=l,[...new Array(i-n)].map(c=>o.int16)))}}},Vbe=class{constructor(e,t){this.advanceWidth=e,this.lsb=t}},jbe=Object.freeze({__proto__:null,hmtx:Lbe}),zbe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.legacyFixed,this.numGlyphs=r.uint16,this.version===1&&(this.maxPoints=r.uint16,this.maxContours=r.uint16,this.maxCompositePoints=r.uint16,this.maxCompositeContours=r.uint16,this.maxZones=r.uint16,this.maxTwilightPoints=r.uint16,this.maxStorage=r.uint16,this.maxFunctionDefs=r.uint16,this.maxInstructionDefs=r.uint16,this.maxStackElements=r.uint16,this.maxSizeOfInstructions=r.uint16,this.maxComponentElements=r.uint16,this.maxComponentDepth=r.uint16),r.verifyLength()}},Ube=Object.freeze({__proto__:null,maxp:zbe}),Hbe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.format=r.uint16,this.count=r.uint16,this.stringOffset=r.Offset16,this.nameRecords=[...new Array(this.count)].map(o=>new Wbe(r,this)),this.format===1&&(this.langTagCount=r.uint16,this.langTagRecords=[...new Array(this.langTagCount)].map(o=>new Gbe(r.uint16,r.Offset16))),this.stringStart=this.tableStart+this.stringOffset}get(e){let t=this.nameRecords.find(r=>r.nameID===e);if(t)return t.string}},Gbe=class{constructor(e,t){this.length=e,this.offset=t}},Wbe=class{constructor(e,t){this.platformID=e.uint16,this.encodingID=e.uint16,this.languageID=e.uint16,this.nameID=e.uint16,this.length=e.uint16,this.offset=e.Offset16,we(this,"string",()=>(e.currentPosition=t.stringStart+this.offset,Ybe(e,this)))}};function Ybe(e,t){let{platformID:r,length:o}=t;if(o===0)return"";if(r===0||r===3){let a=[];for(let l=0,c=o/2;l<c;l++)a[l]=String.fromCharCode(e.uint16);return a.join("")}let n=e.readBytes(o),i=[];return n.forEach(function(a,l){i[l]=String.fromCharCode(a)}),i.join("")}var qbe=Object.freeze({__proto__:null,name:Hbe}),Zbe=class extends qe{constructor(e,t){let{p:r}=super(e,t);if(this.version=r.uint16,this.xAvgCharWidth=r.int16,this.usWeightClass=r.uint16,this.usWidthClass=r.uint16,this.fsType=r.uint16,this.ySubscriptXSize=r.int16,this.ySubscriptYSize=r.int16,this.ySubscriptXOffset=r.int16,this.ySubscriptYOffset=r.int16,this.ySuperscriptXSize=r.int16,this.ySuperscriptYSize=r.int16,this.ySuperscriptXOffset=r.int16,this.ySuperscriptYOffset=r.int16,this.yStrikeoutSize=r.int16,this.yStrikeoutPosition=r.int16,this.sFamilyClass=r.int16,this.panose=[...new Array(10)].map(o=>r.uint8),this.ulUnicodeRange1=r.flags(32),this.ulUnicodeRange2=r.flags(32),this.ulUnicodeRange3=r.flags(32),this.ulUnicodeRange4=r.flags(32),this.achVendID=r.tag,this.fsSelection=r.uint16,this.usFirstCharIndex=r.uint16,this.usLastCharIndex=r.uint16,this.sTypoAscender=r.int16,this.sTypoDescender=r.int16,this.sTypoLineGap=r.int16,this.usWinAscent=r.uint16,this.usWinDescent=r.uint16,this.version===0||(this.ulCodePageRange1=r.flags(32),this.ulCodePageRange2=r.flags(32),this.version===1)||(this.sxHeight=r.int16,this.sCapHeight=r.int16,this.usDefaultChar=r.uint16,this.usBreakChar=r.uint16,this.usMaxContext=r.uint16,this.version<=4)||(this.usLowerOpticalPointSize=r.uint16,this.usUpperOpticalPointSize=r.uint16,this.version===5))return r.verifyLength()}},Kbe=Object.freeze({__proto__:null,OS2:Zbe}),Xbe=class extends qe{constructor(e,t){let{p:r}=super(e,t);if(this.version=r.legacyFixed,this.italicAngle=r.fixed,this.underlinePosition=r.fword,this.underlineThickness=r.fword,this.isFixedPitch=r.uint32,this.minMemType42=r.uint32,this.maxMemType42=r.uint32,this.minMemType1=r.uint32,this.maxMemType1=r.uint32,this.version===1||this.version===3)return r.verifyLength();if(this.numGlyphs=r.uint16,this.version===2){this.glyphNameIndex=[...new Array(this.numGlyphs)].map(o=>r.uint16),this.namesOffset=r.currentPosition,this.glyphNameOffsets=[1];for(let o=0;o<this.numGlyphs;o++){if(this.glyphNameIndex[o]<fU.length){this.glyphNameOffsets.push(this.glyphNameOffsets[o]);continue}let i=r.int8;r.skip(i),this.glyphNameOffsets.push(this.glyphNameOffsets[o]+i+1)}}this.version===2.5&&(this.offset=[...new Array(this.numGlyphs)].map(o=>r.int8))}getGlyphName(e){if(this.version!==2)return console.warn(`post table version ${this.version} does not support glyph name lookups`),"";let t=this.glyphNameIndex[e];if(t<258)return fU[t];let r=this.glyphNameOffsets[e],n=this.glyphNameOffsets[e+1]-r-1;return n===0?".notdef.":(this.parser.currentPosition=this.namesOffset+r,this.parser.readBytes(n,this.namesOffset+r,8,!0).map(a=>String.fromCharCode(a)).join(""))}},fU=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"],Qbe=Object.freeze({__proto__:null,post:Xbe}),Jbe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.horizAxisOffset=r.Offset16,this.vertAxisOffset=r.Offset16,we(this,"horizAxis",()=>new D6({offset:e.offset+this.horizAxisOffset},t)),we(this,"vertAxis",()=>new D6({offset:e.offset+this.vertAxisOffset},t)),this.majorVersion===1&&this.minorVersion===1&&(this.itemVarStoreOffset=r.Offset32,we(this,"itemVarStore",()=>new D6({offset:e.offset+this.itemVarStoreOffset},t)))}},D6=class extends qe{constructor(e,t){let{p:r}=super(e,t,"AxisTable");this.baseTagListOffset=r.Offset16,this.baseScriptListOffset=r.Offset16,we(this,"baseTagList",()=>new $be({offset:e.offset+this.baseTagListOffset},t)),we(this,"baseScriptList",()=>new e0e({offset:e.offset+this.baseScriptListOffset},t))}},$be=class extends qe{constructor(e,t){let{p:r}=super(e,t,"BaseTagListTable");this.baseTagCount=r.uint16,this.baselineTags=[...new Array(this.baseTagCount)].map(o=>r.tag)}},e0e=class extends qe{constructor(e,t){let{p:r}=super(e,t,"BaseScriptListTable");this.baseScriptCount=r.uint16;let o=r.currentPosition;we(this,"baseScriptRecords",()=>(r.currentPosition=o,[...new Array(this.baseScriptCount)].map(n=>new t0e(this.start,r))))}},t0e=class{constructor(e,t){this.baseScriptTag=t.tag,this.baseScriptOffset=t.Offset16,we(this,"baseScriptTable",()=>(t.currentPosition=e+this.baseScriptOffset,new r0e(t)))}},r0e=class{constructor(e){this.start=e.currentPosition,this.baseValuesOffset=e.Offset16,this.defaultMinMaxOffset=e.Offset16,this.baseLangSysCount=e.uint16,this.baseLangSysRecords=[...new Array(this.baseLangSysCount)].map(t=>new o0e(this.start,e)),we(this,"baseValues",()=>(e.currentPosition=this.start+this.baseValuesOffset,new n0e(e))),we(this,"defaultMinMax",()=>(e.currentPosition=this.start+this.defaultMinMaxOffset,new SU(e)))}},o0e=class{constructor(e,t){this.baseLangSysTag=t.tag,this.minMaxOffset=t.Offset16,we(this,"minMax",()=>(t.currentPosition=e+this.minMaxOffset,new SU(t)))}},n0e=class{constructor(e){this.parser=e,this.start=e.currentPosition,this.defaultBaselineIndex=e.uint16,this.baseCoordCount=e.uint16,this.baseCoords=[...new Array(this.baseCoordCount)].map(t=>e.Offset16)}getTable(e){return this.parser.currentPosition=this.start+this.baseCoords[e],new s0e(this.parser)}},SU=class{constructor(e){this.minCoord=e.Offset16,this.maxCoord=e.Offset16,this.featMinMaxCount=e.uint16;let t=e.currentPosition;we(this,"featMinMaxRecords",()=>(e.currentPosition=t,[...new Array(this.featMinMaxCount)].map(r=>new i0e(e))))}},i0e=class{constructor(e){this.featureTableTag=e.tag,this.minCoord=e.Offset16,this.maxCoord=e.Offset16}},s0e=class{constructor(e){this.baseCoordFormat=e.uint16,this.coordinate=e.int16,this.baseCoordFormat===2&&(this.referenceGlyph=e.uint16,this.baseCoordPoint=e.uint16),this.baseCoordFormat===3&&(this.deviceTable=e.Offset16)}},a0e=Object.freeze({__proto__:null,BASE:Jbe}),mU=class{constructor(e){this.classFormat=e.uint16,this.classFormat===1&&(this.startGlyphID=e.uint16,this.glyphCount=e.uint16,this.classValueArray=[...new Array(this.glyphCount)].map(t=>e.uint16)),this.classFormat===2&&(this.classRangeCount=e.uint16,this.classRangeRecords=[...new Array(this.classRangeCount)].map(t=>new l0e(e)))}},l0e=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.class=e.uint16}},Eb=class extends pr{constructor(e){super(e),this.coverageFormat=e.uint16,this.coverageFormat===1&&(this.glyphCount=e.uint16,this.glyphArray=[...new Array(this.glyphCount)].map(t=>e.uint16)),this.coverageFormat===2&&(this.rangeCount=e.uint16,this.rangeRecords=[...new Array(this.rangeCount)].map(t=>new c0e(e)))}},c0e=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.startCoverageIndex=e.uint16}},u0e=class{constructor(e,t){this.table=e,this.parser=t,this.start=t.currentPosition,this.format=t.uint16,this.variationRegionListOffset=t.Offset32,this.itemVariationDataCount=t.uint16,this.itemVariationDataOffsets=[...new Array(this.itemVariationDataCount)].map(r=>t.Offset32)}},d0e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.glyphClassDefOffset=r.Offset16,we(this,"glyphClassDefs",()=>{if(this.glyphClassDefOffset!==0)return r.currentPosition=this.tableStart+this.glyphClassDefOffset,new mU(r)}),this.attachListOffset=r.Offset16,we(this,"attachList",()=>{if(this.attachListOffset!==0)return r.currentPosition=this.tableStart+this.attachListOffset,new f0e(r)}),this.ligCaretListOffset=r.Offset16,we(this,"ligCaretList",()=>{if(this.ligCaretListOffset!==0)return r.currentPosition=this.tableStart+this.ligCaretListOffset,new p0e(r)}),this.markAttachClassDefOffset=r.Offset16,we(this,"markAttachClassDef",()=>{if(this.markAttachClassDefOffset!==0)return r.currentPosition=this.tableStart+this.markAttachClassDefOffset,new mU(r)}),this.minorVersion>=2&&(this.markGlyphSetsDefOffset=r.Offset16,we(this,"markGlyphSetsDef",()=>{if(this.markGlyphSetsDefOffset!==0)return r.currentPosition=this.tableStart+this.markGlyphSetsDefOffset,new v0e(r)})),this.minorVersion===3&&(this.itemVarStoreOffset=r.Offset32,we(this,"itemVarStore",()=>{if(this.itemVarStoreOffset!==0)return r.currentPosition=this.tableStart+this.itemVarStoreOffset,new u0e(r)}))}},f0e=class extends pr{constructor(e){super(e),this.coverageOffset=e.Offset16,this.glyphCount=e.uint16,this.attachPointOffsets=[...new Array(this.glyphCount)].map(t=>e.Offset16)}getPoint(e){return this.parser.currentPosition=this.start+this.attachPointOffsets[e],new m0e(this.parser)}},m0e=class{constructor(e){this.pointCount=e.uint16,this.pointIndices=[...new Array(this.pointCount)].map(t=>e.uint16)}},p0e=class extends pr{constructor(e){super(e),this.coverageOffset=e.Offset16,we(this,"coverage",()=>(e.currentPosition=this.start+this.coverageOffset,new Eb(e))),this.ligGlyphCount=e.uint16,this.ligGlyphOffsets=[...new Array(this.ligGlyphCount)].map(t=>e.Offset16)}getLigGlyph(e){return this.parser.currentPosition=this.start+this.ligGlyphOffsets[e],new h0e(this.parser)}},h0e=class extends pr{constructor(e){super(e),this.caretCount=e.uint16,this.caretValueOffsets=[...new Array(this.caretCount)].map(t=>e.Offset16)}getCaretValue(e){return this.parser.currentPosition=this.start+this.caretValueOffsets[e],new g0e(this.parser)}},g0e=class{constructor(e){this.caretValueFormat=e.uint16,this.caretValueFormat===1&&(this.coordinate=e.int16),this.caretValueFormat===2&&(this.caretValuePointIndex=e.uint16),this.caretValueFormat===3&&(this.coordinate=e.int16,this.deviceOffset=e.Offset16)}},v0e=class extends pr{constructor(e){super(e),this.markGlyphSetTableFormat=e.uint16,this.markGlyphSetCount=e.uint16,this.coverageOffsets=[...new Array(this.markGlyphSetCount)].map(t=>e.Offset32)}getMarkGlyphSet(e){return this.parser.currentPosition=this.start+this.coverageOffsets[e],new Eb(this.parser)}},y0e=Object.freeze({__proto__:null,GDEF:d0e}),pU=class extends pr{static EMPTY={scriptCount:0,scriptRecords:[]};constructor(e){super(e),this.scriptCount=e.uint16,this.scriptRecords=[...new Array(this.scriptCount)].map(t=>new b0e(e))}},b0e=class{constructor(e){this.scriptTag=e.tag,this.scriptOffset=e.Offset16}},S0e=class extends pr{constructor(e){super(e),this.defaultLangSys=e.Offset16,this.langSysCount=e.uint16,this.langSysRecords=[...new Array(this.langSysCount)].map(t=>new _0e(e))}},_0e=class{constructor(e){this.langSysTag=e.tag,this.langSysOffset=e.Offset16}},hU=class{constructor(e){this.lookupOrder=e.Offset16,this.requiredFeatureIndex=e.uint16,this.featureIndexCount=e.uint16,this.featureIndices=[...new Array(this.featureIndexCount)].map(t=>e.uint16)}},gU=class extends pr{static EMPTY={featureCount:0,featureRecords:[]};constructor(e){super(e),this.featureCount=e.uint16,this.featureRecords=[...new Array(this.featureCount)].map(t=>new w0e(e))}},w0e=class{constructor(e){this.featureTag=e.tag,this.featureOffset=e.Offset16}},x0e=class extends pr{constructor(e){super(e),this.featureParams=e.Offset16,this.lookupIndexCount=e.uint16,this.lookupListIndices=[...new Array(this.lookupIndexCount)].map(t=>e.uint16)}getFeatureParams(){if(this.featureParams>0){let e=this.parser;e.currentPosition=this.start+this.featureParams;let t=this.featureTag;if(t==="size")return new T0e(e);if(t.startsWith("cc"))return new C0e(e);if(t.startsWith("ss"))return new P0e(e)}}},C0e=class{constructor(e){this.format=e.uint16,this.featUiLabelNameId=e.uint16,this.featUiTooltipTextNameId=e.uint16,this.sampleTextNameId=e.uint16,this.numNamedParameters=e.uint16,this.firstParamUiLabelNameId=e.uint16,this.charCount=e.uint16,this.character=[...new Array(this.charCount)].map(t=>e.uint24)}},T0e=class{constructor(e){this.designSize=e.uint16,this.subfamilyIdentifier=e.uint16,this.subfamilyNameID=e.uint16,this.smallEnd=e.uint16,this.largeEnd=e.uint16}},P0e=class{constructor(e){this.version=e.uint16,this.UINameID=e.uint16}};function _U(e){e.parser.currentPosition-=2,delete e.coverageOffset,delete e.getCoverageTable}var Vf=class extends pr{constructor(e){super(e),this.substFormat=e.uint16,this.coverageOffset=e.Offset16}getCoverageTable(){let e=this.parser;return e.currentPosition=this.start+this.coverageOffset,new Eb(e)}},M6=class{constructor(e){this.glyphSequenceIndex=e.uint16,this.lookupListIndex=e.uint16}},k0e=class extends Vf{constructor(e){super(e),this.deltaGlyphID=e.int16}},E0e=class extends Vf{constructor(e){super(e),this.sequenceCount=e.uint16,this.sequenceOffsets=[...new Array(this.sequenceCount)].map(t=>e.Offset16)}getSequence(e){let t=this.parser;return t.currentPosition=this.start+this.sequenceOffsets[e],new R0e(t)}},R0e=class{constructor(e){this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},A0e=class extends Vf{constructor(e){super(e),this.alternateSetCount=e.uint16,this.alternateSetOffsets=[...new Array(this.alternateSetCount)].map(t=>e.Offset16)}getAlternateSet(e){let t=this.parser;return t.currentPosition=this.start+this.alternateSetOffsets[e],new O0e(t)}},O0e=class{constructor(e){this.glyphCount=e.uint16,this.alternateGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},I0e=class extends Vf{constructor(e){super(e),this.ligatureSetCount=e.uint16,this.ligatureSetOffsets=[...new Array(this.ligatureSetCount)].map(t=>e.Offset16)}getLigatureSet(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureSetOffsets[e],new N0e(t)}},N0e=class extends pr{constructor(e){super(e),this.ligatureCount=e.uint16,this.ligatureOffsets=[...new Array(this.ligatureCount)].map(t=>e.Offset16)}getLigature(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureOffsets[e],new F0e(t)}},F0e=class{constructor(e){this.ligatureGlyph=e.uint16,this.componentCount=e.uint16,this.componentGlyphIDs=[...new Array(this.componentCount-1)].map(t=>e.uint16)}},D0e=class extends Vf{constructor(e){super(e),this.substFormat===1&&(this.subRuleSetCount=e.uint16,this.subRuleSetOffsets=[...new Array(this.subRuleSetCount)].map(t=>e.Offset16)),this.substFormat===2&&(this.classDefOffset=e.Offset16,this.subClassSetCount=e.uint16,this.subClassSetOffsets=[...new Array(this.subClassSetCount)].map(t=>e.Offset16)),this.substFormat===3&&(_U(this),this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.coverageOffsets=[...new Array(this.glyphCount)].map(t=>e.Offset16),this.substLookupRecords=[...new Array(this.substitutionCount)].map(t=>new M6(e)))}getSubRuleSet(e){if(this.substFormat!==1)throw new Error(`lookup type 5.${this.substFormat} has no subrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.subRuleSetOffsets[e],new B0e(t)}getSubClassSet(e){if(this.substFormat!==2)throw new Error(`lookup type 5.${this.substFormat} has no subclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.subClassSetOffsets[e],new M0e(t)}getCoverageTable(e){if(this.substFormat!==3&&!e)return super.getCoverageTable();if(!e)throw new Error(`lookup type 5.${this.substFormat} requires an coverage table index.`);let t=this.parser;return t.currentPosition=this.start+this.coverageOffsets[e],new Eb(t)}},B0e=class extends pr{constructor(e){super(e),this.subRuleCount=e.uint16,this.subRuleOffsets=[...new Array(this.subRuleCount)].map(t=>e.Offset16)}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.subRuleOffsets[e],new wU(t)}},wU=class{constructor(e){this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.inputSequence=[...new Array(this.glyphCount-1)].map(t=>e.uint16),this.substLookupRecords=[...new Array(this.substitutionCount)].map(t=>new M6(e))}},M0e=class extends pr{constructor(e){super(e),this.subClassRuleCount=e.uint16,this.subClassRuleOffsets=[...new Array(this.subClassRuleCount)].map(t=>e.Offset16)}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.subClassRuleOffsets[e],new L0e(t)}},L0e=class extends wU{constructor(e){super(e)}},V0e=class extends Vf{constructor(e){super(e),this.substFormat===1&&(this.chainSubRuleSetCount=e.uint16,this.chainSubRuleSetOffsets=[...new Array(this.chainSubRuleSetCount)].map(t=>e.Offset16)),this.substFormat===2&&(this.backtrackClassDefOffset=e.Offset16,this.inputClassDefOffset=e.Offset16,this.lookaheadClassDefOffset=e.Offset16,this.chainSubClassSetCount=e.uint16,this.chainSubClassSetOffsets=[...new Array(this.chainSubClassSetCount)].map(t=>e.Offset16)),this.substFormat===3&&(_U(this),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map(t=>e.Offset16),this.inputGlyphCount=e.uint16,this.inputCoverageOffsets=[...new Array(this.inputGlyphCount)].map(t=>e.Offset16),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[...new Array(this.lookaheadGlyphCount)].map(t=>e.Offset16),this.seqLookupCount=e.uint16,this.seqLookupRecords=[...new Array(this.substitutionCount)].map(t=>new xU(e)))}getChainSubRuleSet(e){if(this.substFormat!==1)throw new Error(`lookup type 6.${this.substFormat} has no chainsubrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleSetOffsets[e],new j0e(t)}getChainSubClassSet(e){if(this.substFormat!==2)throw new Error(`lookup type 6.${this.substFormat} has no chainsubclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubClassSetOffsets[e],new U0e(t)}getCoverageFromOffset(e){if(this.substFormat!==3)throw new Error(`lookup type 6.${this.substFormat} does not use contextual coverage offsets.`);let t=this.parser;return t.currentPosition=this.start+e,new Eb(t)}},j0e=class extends pr{constructor(e){super(e),this.chainSubRuleCount=e.uint16,this.chainSubRuleOffsets=[...new Array(this.chainSubRuleCount)].map(t=>e.Offset16)}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new z0e(t)}},z0e=class{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map(t=>e.uint16),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map(t=>e.uint16),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map(t=>e.uint16),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.SubstCount)].map(t=>new M6(e))}},U0e=class extends pr{constructor(e){super(e),this.chainSubClassRuleCount=e.uint16,this.chainSubClassRuleOffsets=[...new Array(this.chainSubClassRuleCount)].map(t=>e.Offset16)}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new H0e(t)}},H0e=class{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map(t=>e.uint16),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map(t=>e.uint16),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map(t=>e.uint16),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.substitutionCount)].map(t=>new xU(e))}},xU=class extends pr{constructor(e){super(e),this.sequenceIndex=e.uint16,this.lookupListIndex=e.uint16}},G0e=class extends pr{constructor(e){super(e),this.substFormat=e.uint16,this.extensionLookupType=e.uint16,this.extensionOffset=e.Offset32}},W0e=class extends Vf{constructor(e){super(e),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map(t=>e.Offset16),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[new Array(this.lookaheadGlyphCount)].map(t=>e.Offset16),this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},Y0e={buildSubtable:function(e,t){let r=new[void 0,k0e,E0e,A0e,I0e,D0e,V0e,G0e,W0e][e](t);return r.type=e,r}},ec=class extends pr{constructor(e){super(e)}},q0e=class extends ec{constructor(e){super(e),console.log("lookup type 1")}},Z0e=class extends ec{constructor(e){super(e),console.log("lookup type 2")}},K0e=class extends ec{constructor(e){super(e),console.log("lookup type 3")}},X0e=class extends ec{constructor(e){super(e),console.log("lookup type 4")}},Q0e=class extends ec{constructor(e){super(e),console.log("lookup type 5")}},J0e=class extends ec{constructor(e){super(e),console.log("lookup type 6")}},$0e=class extends ec{constructor(e){super(e),console.log("lookup type 7")}},e1e=class extends ec{constructor(e){super(e),console.log("lookup type 8")}},t1e=class extends ec{constructor(e){super(e),console.log("lookup type 9")}},r1e={buildSubtable:function(e,t){let r=new[void 0,q0e,Z0e,K0e,X0e,Q0e,J0e,$0e,e1e,t1e][e](t);return r.type=e,r}},vU=class extends pr{static EMPTY={lookupCount:0,lookups:[]};constructor(e){super(e),this.lookupCount=e.uint16,this.lookups=[...new Array(this.lookupCount)].map(t=>e.Offset16)}},o1e=class extends pr{constructor(e,t){super(e),this.ctType=t,this.lookupType=e.uint16,this.lookupFlag=e.uint16,this.subTableCount=e.uint16,this.subtableOffsets=[...new Array(this.subTableCount)].map(r=>e.Offset16),this.markFilteringSet=e.uint16}get rightToLeft(){return this.lookupFlag&!0}get ignoreBaseGlyphs(){return this.lookupFlag&!0}get ignoreLigatures(){return this.lookupFlag&!0}get ignoreMarks(){return this.lookupFlag&!0}get useMarkFilteringSet(){return this.lookupFlag&!0}get markAttachmentType(){return this.lookupFlag&!0}getSubTable(e){let t=this.ctType==="GSUB"?Y0e:r1e;return this.parser.currentPosition=this.start+this.subtableOffsets[e],t.buildSubtable(this.lookupType,this.parser)}},CU=class extends qe{constructor(e,t,r){let{p:o,tableStart:n}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.scriptListOffset=o.Offset16,this.featureListOffset=o.Offset16,this.lookupListOffset=o.Offset16,this.majorVersion===1&&this.minorVersion===1&&(this.featureVariationsOffset=o.Offset32);let i=!(this.scriptListOffset||this.featureListOffset||this.lookupListOffset);we(this,"scriptList",()=>i?pU.EMPTY:(o.currentPosition=n+this.scriptListOffset,new pU(o))),we(this,"featureList",()=>i?gU.EMPTY:(o.currentPosition=n+this.featureListOffset,new gU(o))),we(this,"lookupList",()=>i?vU.EMPTY:(o.currentPosition=n+this.lookupListOffset,new vU(o))),this.featureVariationsOffset&&we(this,"featureVariations",()=>i?FeatureVariations.EMPTY:(o.currentPosition=n+this.featureVariationsOffset,new FeatureVariations(o)))}getSupportedScripts(){return this.scriptList.scriptRecords.map(e=>e.scriptTag)}getScriptTable(e){let t=this.scriptList.scriptRecords.find(o=>o.scriptTag===e);this.parser.currentPosition=this.scriptList.start+t.scriptOffset;let r=new S0e(this.parser);return r.scriptTag=e,r}ensureScriptTable(e){return typeof e=="string"?this.getScriptTable(e):e}getSupportedLangSys(e){e=this.ensureScriptTable(e);let t=e.defaultLangSys!==0,r=e.langSysRecords.map(o=>o.langSysTag);return t&&r.unshift("dflt"),r}getDefaultLangSysTable(e){e=this.ensureScriptTable(e);let t=e.defaultLangSys;if(t!==0){this.parser.currentPosition=e.start+t;let r=new hU(this.parser);return r.langSysTag="",r.defaultForScript=e.scriptTag,r}}getLangSysTable(e,t="dflt"){if(t==="dflt")return this.getDefaultLangSysTable(e);e=this.ensureScriptTable(e);let r=e.langSysRecords.find(n=>n.langSysTag===t);this.parser.currentPosition=e.start+r.langSysOffset;let o=new hU(this.parser);return o.langSysTag=t,o}getFeatures(e){return e.featureIndices.map(t=>this.getFeature(t))}getFeature(e){let t;if(parseInt(e)==e?t=this.featureList.featureRecords[e]:t=this.featureList.featureRecords.find(o=>o.featureTag===e),!t)return;this.parser.currentPosition=this.featureList.start+t.featureOffset;let r=new x0e(this.parser);return r.featureTag=t.featureTag,r}getLookups(e){return e.lookupListIndices.map(t=>this.getLookup(t))}getLookup(e,t){let r=this.lookupList.lookups[e];return this.parser.currentPosition=this.lookupList.start+r,new o1e(this.parser,t)}},n1e=class extends CU{constructor(e,t){super(e,t,"GSUB")}getLookup(e){return super.getLookup(e,"GSUB")}},i1e=Object.freeze({__proto__:null,GSUB:n1e}),s1e=class extends CU{constructor(e,t){super(e,t,"GPOS")}getLookup(e){return super.getLookup(e,"GPOS")}},a1e=Object.freeze({__proto__:null,GPOS:s1e}),l1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.offsetToSVGDocumentList=r.Offset32,r.currentPosition=this.tableStart+this.offsetToSVGDocumentList,this.documentList=new c1e(r)}},c1e=class extends pr{constructor(e){super(e),this.numEntries=e.uint16,this.documentRecords=[...new Array(this.numEntries)].map(t=>new u1e(e))}getDocument(e){let t=this.documentRecords[e];if(!t)return"";let r=this.start+t.svgDocOffset;return this.parser.currentPosition=r,this.parser.readBytes(t.svgDocLength)}getDocumentForGlyph(e){let t=this.documentRecords.findIndex(r=>r.startGlyphID<=e&&e<=r.endGlyphID);return t===-1?"":this.getDocument(t)}},u1e=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.svgDocOffset=e.Offset32,this.svgDocLength=e.uint32}},d1e=Object.freeze({__proto__:null,SVG:l1e}),f1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.axesArrayOffset=r.Offset16,r.uint16,this.axisCount=r.uint16,this.axisSize=r.uint16,this.instanceCount=r.uint16,this.instanceSize=r.uint16;let o=this.tableStart+this.axesArrayOffset;we(this,"axes",()=>(r.currentPosition=o,[...new Array(this.axisCount)].map(i=>new m1e(r))));let n=o+this.axisCount*this.axisSize;we(this,"instances",()=>{let i=[];for(let a=0;a<this.instanceCount;a++)r.currentPosition=n+a*this.instanceSize,i.push(new p1e(r,this.axisCount,this.instanceSize));return i})}getSupportedAxes(){return this.axes.map(e=>e.tag)}getAxis(e){return this.axes.find(t=>t.tag===e)}},m1e=class{constructor(e){this.tag=e.tag,this.minValue=e.fixed,this.defaultValue=e.fixed,this.maxValue=e.fixed,this.flags=e.flags(16),this.axisNameID=e.uint16}},p1e=class{constructor(e,t,r){let o=e.currentPosition;this.subfamilyNameID=e.uint16,e.uint16,this.coordinates=[...new Array(t)].map(n=>e.fixed),e.currentPosition-o<r&&(this.postScriptNameID=e.uint16)}},h1e=Object.freeze({__proto__:null,fvar:f1e}),g1e=class extends qe{constructor(e,t){let{p:r}=super(e,t),o=e.length/2;we(this,"items",()=>[...new Array(o)].map(n=>r.fword))}},v1e=Object.freeze({__proto__:null,cvt:g1e}),y1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);we(this,"instructions",()=>[...new Array(e.length)].map(o=>r.uint8))}},b1e=Object.freeze({__proto__:null,fpgm:y1e}),S1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numRanges=r.uint16,we(this,"gaspRanges",()=>[...new Array(this.numRanges)].map(n=>new _1e(r)))}},_1e=class{constructor(e){this.rangeMaxPPEM=e.uint16,this.rangeGaspBehavior=e.uint16}},w1e=Object.freeze({__proto__:null,gasp:S1e}),x1e=class extends qe{constructor(e,t){super(e,t)}getGlyphData(e,t){return this.parser.currentPosition=this.tableStart+e,this.parser.readBytes(t)}},C1e=Object.freeze({__proto__:null,glyf:x1e}),T1e=class extends qe{constructor(e,t,r){let{p:o}=super(e,t),n=r.maxp.numGlyphs+1;r.head.indexToLocFormat===0?(this.x2=!0,we(this,"offsets",()=>[...new Array(n)].map(i=>o.Offset16))):we(this,"offsets",()=>[...new Array(n)].map(i=>o.Offset32))}getGlyphDataOffsetAndLength(e){let t=this.offsets[e]*this.x2?2:1,r=this.offsets[e+1]*this.x2?2:1;return{offset:t,length:r-t}}},P1e=Object.freeze({__proto__:null,loca:T1e}),k1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);we(this,"instructions",()=>[...new Array(e.length)].map(o=>r.uint8))}},E1e=Object.freeze({__proto__:null,prep:k1e}),R1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);we(this,"data",()=>r.readBytes())}},A1e=Object.freeze({__proto__:null,CFF:R1e}),O1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);we(this,"data",()=>r.readBytes())}},I1e=Object.freeze({__proto__:null,CFF2:O1e}),N1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.defaultVertOriginY=r.int16,this.numVertOriginYMetrics=r.uint16,we(this,"vertORiginYMetrics",()=>[...new Array(this.numVertOriginYMetrics)].map(o=>new F1e(r)))}},F1e=class{constructor(e){this.glyphIndex=e.uint16,this.vertOriginY=e.int16}},D1e=Object.freeze({__proto__:null,VORG:N1e}),B1e=class{constructor(e){this.indexSubTableArrayOffset=e.Offset32,this.indexTablesSize=e.uint32,this.numberofIndexSubTables=e.uint32,this.colorRef=e.uint32,this.hori=new xx(e),this.vert=new xx(e),this.startGlyphIndex=e.uint16,this.endGlyphIndex=e.uint16,this.ppemX=e.uint8,this.ppemY=e.uint8,this.bitDepth=e.uint8,this.flags=e.int8}},M1e=class{constructor(e){this.hori=new xx(e),this.vert=new xx(e),this.ppemX=e.uint8,this.ppemY=e.uint8,this.substitutePpemX=e.uint8,this.substitutePpemY=e.uint8}},xx=class{constructor(e){this.ascender=e.int8,this.descender=e.int8,this.widthMax=e.uint8,this.caretSlopeNumerator=e.int8,this.caretSlopeDenominator=e.int8,this.caretOffset=e.int8,this.minOriginSB=e.int8,this.minAdvanceSB=e.int8,this.maxBeforeBL=e.int8,this.minAfterBL=e.int8,this.pad1=e.int8,this.pad2=e.int8}},TU=class extends qe{constructor(e,t,r){let{p:o}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.numSizes=o.uint32,we(this,"bitMapSizes",()=>[...new Array(this.numSizes)].map(n=>new B1e(o)))}},L1e=Object.freeze({__proto__:null,EBLC:TU}),PU=class extends qe{constructor(e,t,r){let{p:o}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16}},V1e=Object.freeze({__proto__:null,EBDT:PU}),j1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.numSizes=r.uint32,we(this,"bitmapScales",()=>[...new Array(this.numSizes)].map(o=>new M1e(r)))}},z1e=Object.freeze({__proto__:null,EBSC:j1e}),U1e=class extends TU{constructor(e,t){super(e,t,"CBLC")}},H1e=Object.freeze({__proto__:null,CBLC:U1e}),G1e=class extends PU{constructor(e,t){super(e,t,"CBDT")}},W1e=Object.freeze({__proto__:null,CBDT:G1e}),Y1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.flags=r.flags(16),this.numStrikes=r.uint32,we(this,"strikeOffsets",()=>[...new Array(this.numStrikes)].map(o=>r.Offset32))}},q1e=Object.freeze({__proto__:null,sbix:Y1e}),Z1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numBaseGlyphRecords=r.uint16,this.baseGlyphRecordsOffset=r.Offset32,this.layerRecordsOffset=r.Offset32,this.numLayerRecords=r.uint16}getBaseGlyphRecord(e){let t=this.tableStart+this.baseGlyphRecordsOffset;this.parser.currentPosition=t;let r=new B6(this.parser),o=r.gID,n=this.tableStart+this.layerRecordsOffset-6;this.parser.currentPosition=n;let i=new B6(this.parser),a=i.gID;if(o===e)return r;if(a===e)return i;for(;t!==n;){let l=t+(n-t)/12;this.parser.currentPosition=l;let c=new B6(this.parser),u=c.gID;if(u===e)return c;u>e?n=l:u<e&&(t=l)}return!1}getLayers(e){let t=this.getBaseGlyphRecord(e);return this.parser.currentPosition=this.tableStart+this.layerRecordsOffset+4*t.firstLayerIndex,[...new Array(t.numLayers)].map(r=>new K1e(p))}},B6=class{constructor(e){this.gID=e.uint16,this.firstLayerIndex=e.uint16,this.numLayers=e.uint16}},K1e=class{constructor(e){this.gID=e.uint16,this.paletteIndex=e.uint16}},X1e=Object.freeze({__proto__:null,COLR:Z1e}),Q1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numPaletteEntries=r.uint16;let o=this.numPalettes=r.uint16;this.numColorRecords=r.uint16,this.offsetFirstColorRecord=r.Offset32,this.colorRecordIndices=[...new Array(this.numPalettes)].map(n=>r.uint16),we(this,"colorRecords",()=>(r.currentPosition=this.tableStart+this.offsetFirstColorRecord,[...new Array(this.numColorRecords)].map(n=>new J1e(r)))),this.version===1&&(this.offsetPaletteTypeArray=r.Offset32,this.offsetPaletteLabelArray=r.Offset32,this.offsetPaletteEntryLabelArray=r.Offset32,we(this,"paletteTypeArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteTypeArray,new $1e(r,o))),we(this,"paletteLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteLabelArray,new eSe(r,o))),we(this,"paletteEntryLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteEntryLabelArray,new tSe(r,o))))}},J1e=class{constructor(e){this.blue=e.uint8,this.green=e.uint8,this.red=e.uint8,this.alpha=e.uint8}},$1e=class{constructor(e,t){this.paletteTypes=[...new Array(t)].map(r=>e.uint32)}},eSe=class{constructor(e,t){this.paletteLabels=[...new Array(t)].map(r=>e.uint16)}},tSe=class{constructor(e,t){this.paletteEntryLabels=[...new Array(t)].map(r=>e.uint16)}},rSe=Object.freeze({__proto__:null,CPAL:Q1e}),oSe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint32,this.numSignatures=r.uint16,this.flags=r.uint16,this.signatureRecords=[...new Array(this.numSignatures)].map(o=>new nSe(r))}getData(e){let t=this.signatureRecords[e];return this.parser.currentPosition=this.tableStart+t.offset,new iSe(this.parser)}},nSe=class{constructor(e){this.format=e.uint32,this.length=e.uint32,this.offset=e.Offset32}},iSe=class{constructor(e){e.uint16,e.uint16,this.signatureLength=e.uint32,this.signature=e.readBytes(this.signatureLength)}},sSe=Object.freeze({__proto__:null,DSIG:oSe}),aSe=class extends qe{constructor(e,t,r){let{p:o}=super(e,t),n=r.hmtx.numGlyphs;this.version=o.uint16,this.numRecords=o.int16,this.sizeDeviceRecord=o.int32,this.records=[...new Array(numRecords)].map(i=>new lSe(o,n))}},lSe=class{constructor(e,t){this.pixelSize=e.uint8,this.maxWidth=e.uint8,this.widths=e.readBytes(t)}},cSe=Object.freeze({__proto__:null,hdmx:aSe}),uSe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.nTables=r.uint16,we(this,"tables",()=>{let o=this.tableStart+4,n=[];for(let i=0;i<this.nTables;i++){r.currentPosition=o;let a=new dSe(r);n.push(a),o+=a}return n})}},dSe=class{constructor(e){this.version=e.uint16,this.length=e.uint16,this.coverage=e.flags(8),this.format=e.uint8,this.format===0&&(this.nPairs=e.uint16,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16,we(this,"pairs",()=>[...new Array(this.nPairs)].map(t=>new fSe(e)))),this.format===2&&console.warn("Kern subtable format 2 is not supported: this parser currently only parses universal table data.")}get horizontal(){return this.coverage[0]}get minimum(){return this.coverage[1]}get crossstream(){return this.coverage[2]}get override(){return this.coverage[3]}},fSe=class{constructor(e){this.left=e.uint16,this.right=e.uint16,this.value=e.fword}},mSe=Object.freeze({__proto__:null,kern:uSe}),pSe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numGlyphs=r.uint16,this.yPels=r.readBytes(this.numGlyphs)}},hSe=Object.freeze({__proto__:null,LTSH:pSe}),gSe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.mergeClassCount=r.uint16,this.mergeDataOffset=r.Offset16,this.classDefCount=r.uint16,this.offsetToClassDefOffsets=r.Offset16,we(this,"mergeEntryMatrix",()=>[...new Array(this.mergeClassCount)].map(o=>r.readBytes(this.mergeClassCount))),console.warn("Full MERG parsing is currently not supported."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}},vSe=Object.freeze({__proto__:null,MERG:gSe}),ySe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint32,this.flags=r.uint32,r.uint32,this.dataMapsCount=r.uint32,this.dataMaps=[...new Array(this.dataMapsCount)].map(o=>new bSe(this.tableStart,r))}},bSe=class{constructor(e,t){this.tableStart=e,this.parser=t,this.tag=t.tag,this.dataOffset=t.Offset32,this.dataLength=t.uint32}getData(){return this.parser.currentField=this.tableStart+this.dataOffset,this.parser.readBytes(this.dataLength)}},SSe=Object.freeze({__proto__:null,meta:ySe}),_Se=class extends qe{constructor(e,t){super(e,t),console.warn("This font uses a PCLT table, which is currently not supported by this parser."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}},wSe=Object.freeze({__proto__:null,PCLT:_Se}),xSe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numRecs=r.uint16,this.numRatios=r.uint16,this.ratRanges=[...new Array(this.numRatios)].map(o=>new CSe(r)),this.offsets=[...new Array(this.numRatios)].map(o=>r.Offset16),this.VDMXGroups=[...new Array(this.numRecs)].map(o=>new TSe(r))}},CSe=class{constructor(e){this.bCharSet=e.uint8,this.xRatio=e.uint8,this.yStartRatio=e.uint8,this.yEndRatio=e.uint8}},TSe=class{constructor(e){this.recs=e.uint16,this.startsz=e.uint8,this.endsz=e.uint8,this.records=[...new Array(this.recs)].map(t=>new PSe(e))}},PSe=class{constructor(e){this.yPelHeight=e.uint16,this.yMax=e.int16,this.yMin=e.int16}},kSe=Object.freeze({__proto__:null,VDMX:xSe}),ESe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.fixed,this.ascent=this.vertTypoAscender=r.int16,this.descent=this.vertTypoDescender=r.int16,this.lineGap=this.vertTypoLineGap=r.int16,this.advanceHeightMax=r.int16,this.minTopSideBearing=r.int16,this.minBottomSideBearing=r.int16,this.yMaxExtent=r.int16,this.caretSlopeRise=r.int16,this.caretSlopeRun=r.int16,this.caretOffset=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.metricDataFormat=r.int16,this.numOfLongVerMetrics=r.uint16,r.verifyLength()}},RSe=Object.freeze({__proto__:null,vhea:ESe}),ASe=class extends qe{constructor(e,t,r){super(e,t);let o=r.vhea.numOfLongVerMetrics,n=r.maxp.numGlyphs,i=p.currentPosition;if(lazy(this,"vMetrics",()=>(p.currentPosition=i,[...new Array(o)].map(a=>new OSe(p.uint16,p.int16)))),o<n){let a=i+o*4;lazy(this,"topSideBearings",()=>(p.currentPosition=a,[...new Array(n-o)].map(l=>p.int16)))}}},OSe=class{constructor(e,t){this.advanceHeight=e,this.topSideBearing=t}},ISe=Object.freeze({__proto__:null,vmtx:ASe});var kU=s(A(),1);var{kebabCase:NSe}=rt(kU.privateApis);function EU(e){let t=e.reduce((r,o)=>(r[o.fontFamily]||(r[o.fontFamily]={name:o.fontFamily,fontFamily:o.fontFamily,slug:NSe(o.fontFamily.toLowerCase()),fontFace:[]}),r[o.fontFamily].fontFace.push(o),r),{});return Object.values(t)}var ni=s(C(),1);function FSe(){let{installFonts:e}=(0,Rb.useContext)(Lo),[t,r]=(0,Rb.useState)(!1),[o,n]=(0,Rb.useState)(null),i=h=>{l(h)},a=h=>{l(h.target.files)},l=async h=>{if(!h)return;n(null),r(!0);let g=new Set,v=[...h],y=!1,b=v.map(async S=>{if(!await u(S))return y=!0,null;if(g.has(S.name))return null;let T=(((S.name??"").split(".")??[]).pop()??"").toLowerCase();return O6.includes(T)?(g.add(S.name),S):null}),_=(await Promise.all(b)).filter(S=>S!==null);if(_.length>0)c(_);else{let S=y?(0,ah.__)("Sorry, you are not allowed to upload this file type."):(0,ah.__)("No fonts found to install.");n({type:"error",message:S}),r(!1)}},c=async h=>{let g=await Promise.all(h.map(async v=>{let y=await f(v);return await Lu(y,y.file,"all"),y}));m(g)};async function u(h){let g=new Cx("Uploaded Font");try{let v=await d(h);return await g.fromDataBuffer(v,"font"),!0}catch{return!1}}async function d(h){return new Promise((g,v)=>{let y=new window.FileReader;y.readAsArrayBuffer(h),y.onload=()=>g(y.result),y.onerror=v})}let f=async h=>{let g=await d(h),v=new Cx("Uploaded Font");v.fromDataBuffer(g,h.name);let b=(await new Promise(z=>v.onload=z)).detail.font,{name:_}=b.opentype.tables,S=_.get(16)||_.get(1),x=_.get(2).toLowerCase().includes("italic"),T=b.opentype.tables["OS/2"].usWeightClass||"normal",F=!!b.opentype.tables.fvar&&b.opentype.tables.fvar.axes.find(({tag:z})=>z==="wght"),B=F?`${F.minValue} ${F.maxValue}`:null;return{file:h,fontFamily:S,fontStyle:x?"italic":"normal",fontWeight:B||T}},m=async h=>{let g=EU(h);try{await e(g),n({type:"success",message:(0,ah.__)("Fonts were installed successfully.")})}catch(v){let y=v;n({type:"error",message:y.message,errors:y?.installationErrors})}r(!1)};return(0,ni.jsxs)("div",{className:"font-library__tabpanel-layout",children:[(0,ni.jsx)(on.DropZone,{onFilesDrop:i}),(0,ni.jsxs)(on.__experimentalVStack,{className:"font-library__local-fonts",justify:"start",children:[o&&(0,ni.jsxs)(on.Notice,{status:o.type,__unstableHTML:!0,onRemove:()=>n(null),children:[o.message,o.errors&&(0,ni.jsx)("ul",{children:o.errors.map((h,g)=>(0,ni.jsx)("li",{children:h},g))})]}),t&&(0,ni.jsx)(on.FlexItem,{children:(0,ni.jsx)("div",{className:"font-library__upload-area",children:(0,ni.jsx)(on.ProgressBar,{})})}),!t&&(0,ni.jsx)(on.FormFileUpload,{accept:O6.map(h=>`.${h}`).join(","),multiple:!0,onChange:a,render:({openFileDialog:h})=>(0,ni.jsx)(on.Button,{__next40pxDefaultSize:!0,className:"font-library__upload-area",onClick:h,children:(0,ah.__)("Upload font")})}),(0,ni.jsx)(on.__experimentalText,{className:"font-library__upload-area__text",children:(0,ah.__)("Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2.")})]})]})}var Tx=FSe;var Ks=s(C(),1),{Tabs:Px}=rt(kx.privateApis),DSe={id:"installed-fonts",title:(0,lh._x)("Library","Font library")},BSe={id:"upload-fonts",title:(0,lh._x)("Upload","noun")},MSe=e=>e.map(({slug:t,name:r})=>({id:t,title:e.length===1&&t==="google-fonts"?(0,lh.__)("Install Fonts"):r}));function LSe({onRequestClose:e,defaultTabId:t="installed-fonts"}){let{records:r=[]}=(0,Ex.useEntityRecords)("root","fontCollection",{_fields:"slug,name,description"}),o=(0,RU.useSelect)(i=>i(Ex.store).canUser("create",{kind:"postType",name:"wp_font_family"}),[]),n=[DSe];return o&&(n.push(BSe),n.push(...MSe(r||[]))),(0,Ks.jsx)(kx.Modal,{title:(0,lh.__)("Fonts"),onRequestClose:e,isFullScreen:!0,className:"font-library-modal",children:(0,Ks.jsxs)(Px,{defaultTabId:t,children:[(0,Ks.jsx)("div",{className:"font-library-modal__tablist-container",children:(0,Ks.jsx)(Px.TabList,{children:n.map(({id:i,title:a})=>(0,Ks.jsx)(Px.Tab,{tabId:i,children:a},i))})}),n.map(({id:i})=>{let a;switch(i){case"upload-fonts":a=(0,Ks.jsx)(Tx,{});break;case"installed-fonts":a=(0,Ks.jsx)(gx,{});break;default:a=(0,Ks.jsx)(yx,{slug:i})}return(0,Ks.jsx)(Px.TabPanel,{tabId:i,focusable:!1,className:"font-library-modal__tab-panel",children:a},i)})]})})}var AU=LSe;var Rx=s(E(),1),jf=s(A(),1),OU=s(D(),1);var ch=s(C(),1);function VSe({font:e}){let{handleSetLibraryFontSelected:t,setModalTabOpen:r}=(0,OU.useContext)(Lo),o=e?.fontFace?.length||1,n=()=>{t?.(e),r?.("installed-fonts")},i=Af(e);return(0,ch.jsx)(jf.__experimentalItem,{onClick:n,children:(0,ch.jsxs)(jf.__experimentalHStack,{justify:"space-between",children:[(0,ch.jsx)(jf.FlexItem,{style:i,children:e.name}),(0,ch.jsx)(jf.FlexItem,{className:"global-styles-ui-screen-typography__font-variants-count",children:(0,Rx.sprintf)((0,Rx._n)("%d variant","%d variants",o),o)})]})})}var IU=VSe;var qr=s(C(),1);function NU(e,t){return e?e.map(r=>Ql(r,{source:t})):[]}function jSe(){let{baseCustomFonts:e,modalTabOpen:t,setModalTabOpen:r}=(0,FU.useContext)(Lo),[o]=pe("typography.fontFamilies"),[n]=pe("typography.fontFamilies",void 0,"base"),i=NU(o?.theme,"theme"),a=NU(o?.custom,"custom"),l=[...i,...a].sort((d,f)=>d.name.localeCompare(f.name)),c=0<l.length,u=c||n?.theme?.length>0||(e?.length??0)>0;return(0,qr.jsxs)(qr.Fragment,{children:[!!t&&(0,qr.jsx)(AU,{onRequestClose:()=>r?.(""),defaultTabId:t}),(0,qr.jsxs)(Xs.__experimentalVStack,{spacing:2,children:[(0,qr.jsxs)(Xs.__experimentalHStack,{justify:"space-between",children:[(0,qr.jsx)(Tr,{level:3,children:(0,zf.__)("Fonts")}),(0,qr.jsx)(Xs.Button,{onClick:()=>r?.("installed-fonts"),label:(0,zf.__)("Manage fonts"),icon:FA,size:"small"})]}),l.length>0&&(0,qr.jsx)(qr.Fragment,{children:(0,qr.jsx)(Xs.__experimentalItemGroup,{size:"large",isBordered:!0,isSeparated:!0,children:l.map(d=>(0,qr.jsx)(IU,{font:d},d.slug))})}),!c&&(0,qr.jsxs)(qr.Fragment,{children:[(0,qr.jsx)(Xs.__experimentalText,{as:"p",children:u?(0,zf.__)("No fonts activated."):(0,zf.__)("No fonts installed.")}),(0,qr.jsx)(Xs.Button,{className:"global-styles-ui-font-families__manage-fonts",variant:"secondary",__next40pxDefaultSize:!0,onClick:()=>{r?.(u?"installed-fonts":"upload-fonts")},children:u?(0,zf.__)("Manage fonts"):(0,zf.__)("Add fonts")})]})]})]})}function DU({...e}){return(0,qr.jsx)(dx,{children:(0,qr.jsx)(jSe,{...e})})}var Ab=s(E(),1),tc=s(A(),1);var za=s(C(),1);function zSe(){return(0,za.jsxs)(tc.__experimentalVStack,{spacing:2,children:[(0,za.jsx)(tc.__experimentalHStack,{justify:"space-between",children:(0,za.jsx)(Tr,{level:3,children:(0,Ab.__)("Font Sizes")})}),(0,za.jsx)(tc.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,za.jsx)(fr,{path:"/typography/font-sizes",children:(0,za.jsxs)(tc.__experimentalHStack,{direction:"row",children:[(0,za.jsx)(tc.FlexItem,{children:(0,Ab.__)("Font size presets")}),(0,za.jsx)(No,{icon:(0,Ab.isRTL)()?Nt:Ft})]})})})]})}var BU=zSe;var fs=s(C(),1);function USe(){let{fontLibraryEnabled:e}=(0,LU.useContext)(Br);return(0,fs.jsxs)(fs.Fragment,{children:[(0,fs.jsx)(St,{title:(0,Ax.__)("Typography"),description:(0,Ax.__)("Available fonts, typographic styles, and the application of those styles.")}),(0,fs.jsx)(Bu,{children:(0,fs.jsxs)(MU.__experimentalVStack,{spacing:7,children:[(0,fs.jsx)(oh,{title:(0,Ax.__)("Typesets")}),e&&(0,fs.jsx)(DU,{}),(0,fs.jsx)(Pz,{}),(0,fs.jsx)(BU,{})]})})]})}var VU=USe;var Bt=s(E(),1),Ni=s(A(),1),YU=s(D(),1);var jU=s($(),1);var zU=s(C(),1),{useSettingsForBlockElement:HSe,TypographyPanel:GSe}=rt(jU.privateApis);function UU({element:e,headingLevel:t}){let r=[];e==="heading"?r=r.concat(["elements",t]):e&&e!=="text"&&(r=r.concat(["elements",e]));let o=r.join("."),[n]=Ee(o,"","user",!1),[i,a]=Ee(o,"","merged",!1),[l]=pe(""),u=HSe(l,void 0,e==="heading"?t:e);return(0,zU.jsx)(GSe,{inheritedValue:i,value:n,onChange:a,settings:u})}var HU=s(C(),1);function GU({name:e,element:t,headingLevel:r}){let o="";t==="heading"?o=`elements.${r}.`:t&&t!=="text"&&(o=`elements.${t}.`);let[n]=Ee(o+"typography.fontFamily",e),[i]=Ee(o+"color.gradient",e),[a]=Ee(o+"color.background",e),[l]=Ee("color.background"),[c]=Ee(o+"color.text",e),[u]=Ee(o+"typography.fontSize",e),[d]=Ee(o+"typography.fontStyle",e),[f]=Ee(o+"typography.fontWeight",e),[m]=Ee(o+"typography.letterSpacing",e);return(0,HU.jsx)("div",{className:"global-styles-ui-typography-preview",style:{fontFamily:n??"serif",background:i??a??l,color:c,fontSize:u,fontStyle:d,fontWeight:f,letterSpacing:m,...t==="link"?{textDecoration:"underline"}:{}},children:"Aa"})}var So=s(C(),1),WU={text:{description:(0,Bt.__)("Manage the fonts used on the site."),title:(0,Bt.__)("Text")},link:{description:(0,Bt.__)("Manage the fonts and typography used on the links."),title:(0,Bt.__)("Links")},heading:{description:(0,Bt.__)("Manage the fonts and typography used on headings."),title:(0,Bt.__)("Headings")},caption:{description:(0,Bt.__)("Manage the fonts and typography used on captions."),title:(0,Bt.__)("Captions")},button:{description:(0,Bt.__)("Manage the fonts and typography used on buttons."),title:(0,Bt.__)("Buttons")}};function WSe({element:e}){let[t,r]=(0,YU.useState)("heading");return(0,So.jsxs)(So.Fragment,{children:[(0,So.jsx)(St,{title:WU[e].title,description:WU[e].description}),(0,So.jsx)(Ni.__experimentalSpacer,{marginX:4,children:(0,So.jsx)(GU,{element:e,headingLevel:t})}),e==="heading"&&(0,So.jsx)(Ni.__experimentalSpacer,{marginX:4,marginBottom:"1em",children:(0,So.jsxs)(Ni.__experimentalToggleGroupControl,{label:(0,Bt.__)("Select heading level"),hideLabelFromVision:!0,value:t,onChange:o=>r(o),isBlock:!0,size:"__unstable-large",children:[(0,So.jsx)(Ni.__experimentalToggleGroupControlOption,{value:"heading",showTooltip:!0,"aria-label":(0,Bt.__)("All headings"),label:(0,Bt._x)("All","heading levels")}),(0,So.jsx)(Ni.__experimentalToggleGroupControlOption,{value:"h1",showTooltip:!0,"aria-label":(0,Bt.__)("Heading 1"),label:(0,Bt.__)("H1")}),(0,So.jsx)(Ni.__experimentalToggleGroupControlOption,{value:"h2",showTooltip:!0,"aria-label":(0,Bt.__)("Heading 2"),label:(0,Bt.__)("H2")}),(0,So.jsx)(Ni.__experimentalToggleGroupControlOption,{value:"h3",showTooltip:!0,"aria-label":(0,Bt.__)("Heading 3"),label:(0,Bt.__)("H3")}),(0,So.jsx)(Ni.__experimentalToggleGroupControlOption,{value:"h4",showTooltip:!0,"aria-label":(0,Bt.__)("Heading 4"),label:(0,Bt.__)("H4")}),(0,So.jsx)(Ni.__experimentalToggleGroupControlOption,{value:"h5",showTooltip:!0,"aria-label":(0,Bt.__)("Heading 5"),label:(0,Bt.__)("H5")}),(0,So.jsx)(Ni.__experimentalToggleGroupControlOption,{value:"h6",showTooltip:!0,"aria-label":(0,Bt.__)("Heading 6"),label:(0,Bt.__)("H6")})]})}),(0,So.jsx)(UU,{element:e,headingLevel:t})]})}var uh=WSe;var L6=s(E(),1),JU=s(A(),1),$U=s($(),1);var Fi=s(A(),1),dh=s(E(),1);var XU=s(D(),1);var qU=s(A(),1),ZU=s(C(),1);function YSe({className:e,children:t,...r}){return(0,ZU.jsx)(qU.Flex,{className:re("global-styles-ui__color-indicator-wrapper",e),...r,children:t})}var KU=YSe;var nn=s(C(),1),Ox=[];function qSe({name:e}){let[t]=pe("color.palette.custom"),[r]=pe("color.palette.theme"),[o]=pe("color.palette.default"),[n]=pe("color.defaultPalette",e),i=t||Ox,a=r||Ox,l=o||Ox,c=n??!0,u=(0,XU.useMemo)(()=>[...i,...a,...l&&c?l:Ox],[i,a,l,c]),d=e?"/blocks/"+encodeURIComponent(e)+"/colors/palette":"/colors/palette";return(0,nn.jsxs)(Fi.__experimentalVStack,{spacing:3,children:[(0,nn.jsx)(Tr,{level:3,children:(0,dh.__)("Palette")}),(0,nn.jsx)(Fi.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,nn.jsx)(fr,{path:d,children:(0,nn.jsxs)(Fi.__experimentalHStack,{direction:"row",children:[u.length>0?(0,nn.jsxs)(nn.Fragment,{children:[(0,nn.jsx)(Fi.__experimentalZStack,{isLayered:!1,offset:-8,children:u.slice(0,5).map(({color:f},m)=>(0,nn.jsx)(KU,{children:(0,nn.jsx)(Fi.ColorIndicator,{colorValue:f})},`${f}-${m}`))}),(0,nn.jsx)(Fi.FlexItem,{isBlock:!0,children:(0,dh.__)("Edit palette")})]}):(0,nn.jsx)(Fi.FlexItem,{children:(0,dh.__)("Add colors")}),(0,nn.jsx)(No,{icon:(0,dh.isRTL)()?Nt:Ft})]})})})]})}var QU=qSe;var Ua=s(C(),1),{useSettingsForBlockElement:ZSe,ColorPanel:KSe}=rt($U.privateApis);function XSe(){let[e,t]=Ee("",void 0,"user",!1),[r]=Ee("",void 0,"merged",!1),[o]=pe(""),n=ZSe(o);return(0,Ua.jsxs)(Ua.Fragment,{children:[(0,Ua.jsx)(St,{title:(0,L6.__)("Colors"),description:(0,L6.__)("Palette colors and the application of those colors on site elements.")}),(0,Ua.jsx)(Bu,{children:(0,Ua.jsx)(JU.__experimentalVStack,{spacing:7,children:(0,Ua.jsx)(QU,{})})}),(0,Ua.jsx)(KSe,{inheritedValue:r,value:e,onChange:t,settings:n})]})}var eH=XSe;var Nb=s(E(),1),cH=s(A(),1);var iH=s(he(),1),oc=s(A(),1),mh=s(E(),1);var Nx=s(A(),1);var Ix=s(A(),1);var tH=s(C(),1);function rH(){let{paletteColors:e}=Qp();return e.slice(0,4).map(({slug:t,color:r},o)=>(0,tH.jsx)("div",{style:{flexGrow:1,height:"100%",background:r}},`${t}-${o}`))}var Ob=s(C(),1),QSe={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},JSe=({label:e,isFocused:t,withHoverView:r})=>(0,Ob.jsx)($p,{label:e,isFocused:t,withHoverView:r,children:({key:o})=>(0,Ob.jsx)(Ix.__unstableMotion.div,{variants:QSe,style:{height:"100%",overflow:"hidden"},children:(0,Ob.jsx)(Ix.__experimentalHStack,{spacing:0,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,Ob.jsx)(rH,{})})},o)}),oH=JSe;var Uf=s(C(),1),nH=["color"];function fh({title:e,gap:t=2}){let r=$w(nH);return r?.length<=1?null:(0,Uf.jsxs)(Nx.__experimentalVStack,{spacing:3,children:[e&&(0,Uf.jsx)(Tr,{level:3,children:e}),(0,Uf.jsx)(Nx.__experimentalGrid,{gap:t,children:r.map((o,n)=>(0,Uf.jsx)(rh,{variation:o,isPill:!0,properties:nH,showTooltip:!0,children:()=>(0,Uf.jsx)(oH,{})},n))})]})}var rc=s(C(),1),$Se={placement:"bottom-start",offset:8};function sH({name:e}){let[t,r]=pe("color.palette.theme",e),[o]=pe("color.palette.theme",e,"base"),[n,i]=pe("color.palette.default",e),[a]=pe("color.palette.default",e,"base"),[l,c]=pe("color.palette.custom",e),[u]=pe("color.defaultPalette",e),f=(0,iH.useViewportMatch)("small","<")?$Se:void 0,[m]=Hj(e);return(0,rc.jsxs)(oc.__experimentalVStack,{className:"global-styles-ui-color-palette-panel",spacing:8,children:[(0,rc.jsxs)(oc.__experimentalVStack,{spacing:4,children:[!!t&&!!t.length&&(0,rc.jsx)(oc.__experimentalPaletteEdit,{canReset:t!==o,canOnlyChangeValues:!0,colors:t,onChange:r,paletteLabel:(0,mh.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:f}),window.__experimentalEnableColorRandomizer&&t?.length>0&&m&&(0,rc.jsx)(oc.Button,{__next40pxDefaultSize:!0,variant:"secondary",icon:MA,onClick:m,children:(0,mh.__)("Randomize colors")})]}),!!n&&!!n.length&&!!u&&(0,rc.jsx)(oc.__experimentalPaletteEdit,{canReset:n!==a,canOnlyChangeValues:!0,colors:n,onChange:i,paletteLabel:(0,mh.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:f}),(0,rc.jsx)(oc.__experimentalPaletteEdit,{colors:l,onChange:c,paletteLabel:(0,mh.__)("Custom"),paletteLabelHeadingLevel:3,slugPrefix:"custom-",popoverProps:f}),(0,rc.jsx)(fh,{title:(0,mh.__)("Palettes")})]})}var aH=s(he(),1),Ga=s(A(),1),Ib=s(E(),1);var Ha=s(C(),1),e_e={placement:"bottom-start",offset:8},t_e=()=>{};function lH({name:e}){let[t,r]=pe("color.gradients.theme",e),[o]=pe("color.gradients.theme",e,"base"),[n,i]=pe("color.gradients.default",e),[a]=pe("color.gradients.default",e,"base"),[l,c]=pe("color.gradients.custom",e),[u]=pe("color.defaultGradients",e),[d]=pe("color.duotone.custom")||[],[f]=pe("color.duotone.default")||[],[m]=pe("color.duotone.theme")||[],[h]=pe("color.defaultDuotone"),g=[...d||[],...m||[],...f&&h?f:[]],y=(0,aH.useViewportMatch)("small","<")?e_e:void 0;return(0,Ha.jsxs)(Ga.__experimentalVStack,{className:"global-styles-ui-gradient-palette-panel",spacing:8,children:[!!t&&!!t.length&&(0,Ha.jsx)(Ga.__experimentalPaletteEdit,{canReset:t!==o,canOnlyChangeValues:!0,gradients:t,onChange:r,paletteLabel:(0,Ib.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:y}),!!n&&!!n.length&&!!u&&(0,Ha.jsx)(Ga.__experimentalPaletteEdit,{canReset:n!==a,canOnlyChangeValues:!0,gradients:n,onChange:i,paletteLabel:(0,Ib.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:y}),(0,Ha.jsx)(Ga.__experimentalPaletteEdit,{gradients:l,onChange:c,paletteLabel:(0,Ib.__)("Custom"),paletteLabelHeadingLevel:3,slugPrefix:"custom-",popoverProps:y}),!!g&&!!g.length&&(0,Ha.jsxs)("div",{children:[(0,Ha.jsx)(Tr,{level:3,children:(0,Ib.__)("Duotone")}),(0,Ha.jsx)(Ga.__experimentalSpacer,{margin:3}),(0,Ha.jsx)(Ga.DuotonePicker,{duotonePalette:g,disableCustomDuotone:!0,disableCustomColors:!0,clearable:!1,onChange:t_e,colorPalette:[]})]})]})}var ii=s(C(),1),{Tabs:ph}=rt(cH.privateApis);function r_e({name:e}){return(0,ii.jsxs)(ii.Fragment,{children:[(0,ii.jsx)(St,{title:(0,Nb.__)("Edit palette"),description:(0,Nb.__)("The combination of colors used across the site and in color pickers.")}),(0,ii.jsxs)(ph,{children:[(0,ii.jsxs)(ph.TabList,{children:[(0,ii.jsx)(ph.Tab,{tabId:"color",children:(0,Nb.__)("Color")}),(0,ii.jsx)(ph.Tab,{tabId:"gradient",children:(0,Nb.__)("Gradient")})]}),(0,ii.jsx)(ph.TabPanel,{tabId:"color",focusable:!1,children:(0,ii.jsx)(sH,{name:e})}),(0,ii.jsx)(ph.TabPanel,{tabId:"gradient",focusable:!1,children:(0,ii.jsx)(lH,{name:e})})]})]})}var uH=r_e;var V6=s(E(),1),pH=s($(),1),hH=s(A(),1);var dH=s($(),1);var fH=s(C(),1),o_e={backgroundSize:"auto"},{BackgroundPanel:n_e}=rt(dH.privateApis);function mH(){let[e]=Ee("",void 0,"user",!1),[t,r]=Ee("",void 0,"merged",!1),[o]=pe("");return(0,fH.jsx)(n_e,{inheritedValue:t,value:e,onChange:r,settings:o,defaultValues:o_e})}var zu=s(C(),1),{useHasBackgroundPanel:i_e}=rt(pH.privateApis);function s_e(){let[e]=pe(""),t=i_e(e);return(0,zu.jsxs)(zu.Fragment,{children:[(0,zu.jsx)(St,{title:(0,V6.__)("Background"),description:(0,zu.jsx)(hH.__experimentalText,{children:(0,V6.__)("Set styles for the site's background.")})}),t&&(0,zu.jsx)(mH,{})]})}var gH=s_e;var an=s(A(),1),sn=s(E(),1);var _H=s(D(),1);var vH=s(A(),1),yH=s(E(),1),bH=s(C(),1);function a_e({text:e,confirmButtonText:t,isOpen:r,toggleOpen:o,onConfirm:n}){let i=async()=>{o(),n()},a=()=>{o()};return(0,bH.jsx)(vH.__experimentalConfirmDialog,{isOpen:r,cancelButtonText:(0,yH.__)("Cancel"),confirmButtonText:t,onCancel:a,onConfirm:i,size:"medium",children:e})}var SH=a_e;var kt=s(C(),1),{Menu:Fb}=rt(an.privateApis),z6="6px 6px 9px rgba(0, 0, 0, 0.2)";function wH(){let[e]=pe("shadow.presets.default"),[t]=pe("shadow.defaultPresets"),[r]=pe("shadow.presets.theme"),[o,n]=pe("shadow.presets.custom"),i=d=>{n([...o||[],d])},a=()=>{n([])},[l,c]=(0,_H.useState)(!1),u=()=>c(!l);return(0,kt.jsxs)(kt.Fragment,{children:[l&&(0,kt.jsx)(SH,{text:(0,sn.__)("Are you sure you want to remove all custom shadows?"),confirmButtonText:(0,sn.__)("Remove"),isOpen:l,toggleOpen:u,onConfirm:a}),(0,kt.jsx)(St,{title:(0,sn.__)("Shadows"),description:(0,sn.__)("Manage and create shadow styles for use across the site.")}),(0,kt.jsx)(Bu,{children:(0,kt.jsxs)(an.__experimentalVStack,{className:"global-styles-ui__shadows-panel",spacing:7,children:[t&&(0,kt.jsx)(j6,{label:(0,sn.__)("Default"),shadows:e||[],category:"default"}),r&&r.length>0&&(0,kt.jsx)(j6,{label:(0,sn.__)("Theme"),shadows:r||[],category:"theme"}),(0,kt.jsx)(j6,{label:(0,sn.__)("Custom"),shadows:o||[],category:"custom",canCreate:!0,onCreate:i,onReset:u})]})})]})}function j6({label:e,shadows:t,category:r,canCreate:o,onCreate:n,onReset:i}){let a=()=>{let l=Jw(t,"shadow-");n?.({name:(0,sn.sprintf)((0,sn.__)("Shadow %d"),l),shadow:z6,slug:`shadow-${l}`})};return(0,kt.jsxs)(an.__experimentalVStack,{spacing:2,children:[(0,kt.jsxs)(an.__experimentalHStack,{justify:"space-between",children:[(0,kt.jsx)(Tr,{level:3,children:e}),(0,kt.jsxs)(an.FlexItem,{className:"global-styles-ui__shadows-panel__options-container",children:[o&&(0,kt.jsx)(an.Button,{size:"small",icon:Pl,label:(0,sn.__)("Add shadow"),onClick:()=>{a()}}),!!t?.length&&r==="custom"&&(0,kt.jsxs)(Fb,{children:[(0,kt.jsx)(Fb.TriggerButton,{render:(0,kt.jsx)(an.Button,{size:"small",icon:Nr,label:(0,sn.__)("Shadow options")})}),(0,kt.jsx)(Fb.Popover,{children:(0,kt.jsx)(Fb.Item,{onClick:i,children:(0,kt.jsx)(Fb.ItemLabel,{children:(0,sn.__)("Remove all custom shadows")})})})]})]})]}),t.length>0&&(0,kt.jsx)(an.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map(l=>(0,kt.jsx)(l_e,{shadow:l,category:r},l.slug))})]})}function l_e({shadow:e,category:t}){return(0,kt.jsx)(fr,{path:`/shadows/edit/${t}/${e.slug}`,children:(0,kt.jsxs)(an.__experimentalHStack,{children:[(0,kt.jsx)(an.FlexItem,{children:e.name}),(0,kt.jsx)(No,{icon:(0,sn.isRTL)()?Nt:Ft})]})})}var De=s(A(),1),Ut=s(E(),1);var Di=s(D(),1);function xH(e){return(e.match(/(?:[^,(]|\([^)]*\))+/g)||[]).map(r=>r.trim())}function CH(e){let t={x:"0",y:"0",blur:"0",spread:"0",color:"#000",inset:!1};if(!e||e.includes("none"))return t;let r=/((?:^|\s+)(-?\d*\.?\d+(?:px|%|in|cm|mm|em|rem|ex|pt|pc|vh|vw|vmin|vmax|ch|lh)?)(?=\s|$)(?![^(]*\))){1,4}/g,o=e.match(r)||[];if(o.length!==1)return t;let n=o[0].split(" ").map(g=>g.trim()).filter(g=>g);if(n.length<2)return t;let i=e.match(/inset/gi)||[];if(i.length>1)return t;let a=i.length===1,l=e.replace(r,"").trim();a&&(l=l.replace("inset","").replace("INSET","").trim());let c=/^#([0-9a-f]{3}){1,2}$|^#([0-9a-f]{4}){1,2}$|^(?:rgb|hsl)a?\(?[\d*\.?\d+%?,?\/?\s]*\)$/gi,u=(l.match(c)||[]).map(g=>g?.trim()).filter(g=>g);if(u.length>1)return t;if(u.length===0&&(u=l.trim().split(" ").filter(g=>g),u.length>1))return t;let[d,f,m,h]=n;return{x:d,y:f,blur:m||t.blur,spread:h||t.spread,inset:a,color:l||t.color}}function TH(e){let t=`${e.x||"0px"} ${e.y||"0px"} ${e.blur||"0px"} ${e.spread||"0px"}`;return`${e.inset?"inset":""} ${t} ${e.color||""}`.trim()}var Te=s(C(),1),{Menu:Db}=rt(De.privateApis),c_e=[{label:(0,Ut.__)("Rename"),action:"rename"},{label:(0,Ut.__)("Delete"),action:"delete"}],u_e=[{label:(0,Ut.__)("Reset"),action:"reset"}];function PH(){let{goBack:e,params:t}=(0,De.useNavigator)(),{category:r,slug:o}=t,[n,i]=pe(`shadow.presets.${r}`);(0,Di.useEffect)(()=>{let x=n?.some(T=>T.slug===o);o&&!x&&e()},[n,o,e]);let[a]=pe(`shadow.presets.${r}`,void 0,"base"),[l,c]=(0,Di.useState)(()=>(n||[]).find(x=>x.slug===o)),u=(0,Di.useMemo)(()=>(a||[]).find(x=>x.slug===o),[a,o]),[d,f]=(0,Di.useState)(!1),[m,h]=(0,Di.useState)(!1),[g,v]=(0,Di.useState)(l?.name);if(!r||!o)return null;let y=x=>{c({...l,shadow:x});let T=n.map(R=>R.slug===o?{...l,shadow:x}:R);i(T)},b=x=>{if(x==="reset"){let T=n.map(R=>R.slug===o?u:R);c(u),i(T)}else x==="delete"?f(!0):x==="rename"&&h(!0)},_=()=>{i(n.filter(x=>x.slug!==o))},S=x=>{if(!x)return;let T=n.map(R=>R.slug===o?{...l,name:x}:R);c({...l,name:x}),i(T)};return l?(0,Te.jsxs)(Te.Fragment,{children:[(0,Te.jsxs)(De.__experimentalHStack,{justify:"space-between",children:[(0,Te.jsx)(St,{title:l.name}),(0,Te.jsx)(De.FlexItem,{children:(0,Te.jsx)(De.__experimentalSpacer,{marginTop:2,marginBottom:0,paddingX:4,children:(0,Te.jsxs)(Db,{children:[(0,Te.jsx)(Db.TriggerButton,{render:(0,Te.jsx)(De.Button,{size:"small",icon:Nr,label:(0,Ut.__)("Menu")})}),(0,Te.jsx)(Db.Popover,{children:(r==="custom"?c_e:u_e).map(x=>(0,Te.jsx)(Db.Item,{onClick:()=>b(x.action),disabled:x.action==="reset"&&l.shadow===u?.shadow,children:(0,Te.jsx)(Db.ItemLabel,{children:x.label})},x.action))})]})})})]}),(0,Te.jsxs)(Bu,{children:[(0,Te.jsx)(d_e,{shadow:l.shadow}),(0,Te.jsx)(f_e,{shadow:l.shadow,onChange:y})]}),d&&(0,Te.jsx)(De.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{_(),f(!1)},onCancel:()=>{f(!1)},confirmButtonText:(0,Ut.__)("Delete"),size:"medium",children:(0,Ut.sprintf)((0,Ut.__)('Are you sure you want to delete "%s" shadow preset?'),l.name)}),m&&(0,Te.jsx)(De.Modal,{title:(0,Ut.__)("Rename"),onRequestClose:()=>h(!1),size:"small",children:(0,Te.jsxs)("form",{onSubmit:x=>{x.preventDefault(),S(g),h(!1)},children:[(0,Te.jsx)(De.__experimentalInputControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,Ut.__)("Name"),placeholder:(0,Ut.__)("Shadow name"),value:g??"",onChange:v}),(0,Te.jsx)(De.__experimentalSpacer,{marginBottom:6}),(0,Te.jsxs)(De.Flex,{className:"block-editor-shadow-edit-modal__actions",justify:"flex-end",expanded:!1,children:[(0,Te.jsx)(De.FlexItem,{children:(0,Te.jsx)(De.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>h(!1),children:(0,Ut.__)("Cancel")})}),(0,Te.jsx)(De.FlexItem,{children:(0,Te.jsx)(De.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,Ut.__)("Save")})})]})]})})]}):(0,Te.jsx)(St,{title:""})}function d_e({shadow:e}){return(0,Te.jsx)(De.__experimentalSpacer,{marginBottom:4,marginTop:-2,children:(0,Te.jsx)(De.__experimentalHStack,{alignment:"center",justify:"center",className:"global-styles-ui__shadow-preview-panel",children:(0,Te.jsx)("div",{className:"global-styles-ui__shadow-preview-block",style:{boxShadow:e}})})})}function f_e({shadow:e,onChange:t}){let r=(0,Di.useRef)(null),o=(0,Di.useMemo)(()=>xH(e),[e]),n=(l,c)=>{let u=[...o];u[l]=c,t(u.join(", "))},i=()=>{t([...o,z6].join(", "))},a=l=>{t(o.filter((c,u)=>u!==l).join(", ")),r.current?.focus()};return(0,Te.jsxs)(Te.Fragment,{children:[(0,Te.jsx)(De.__experimentalVStack,{spacing:2,children:(0,Te.jsxs)(De.__experimentalHStack,{justify:"space-between",children:[(0,Te.jsx)(Tr,{level:3,children:(0,Ut.__)("Shadows")}),(0,Te.jsx)(De.FlexItem,{className:"global-styles-ui__shadows-panel__options-container",children:(0,Te.jsx)(De.Button,{size:"small",icon:Pl,label:(0,Ut.__)("Add shadow"),onClick:()=>{i()},ref:r})})]})}),(0,Te.jsx)(De.__experimentalSpacer,{}),(0,Te.jsx)(De.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:o.map((l,c)=>(0,Te.jsx)(m_e,{shadow:l,onChange:u=>n(c,u),canRemove:o.length>1,onRemove:()=>a(c)},c))})]})}function m_e({shadow:e,onChange:t,canRemove:r,onRemove:o}){let n={placement:"left-start",offset:36,shift:!0},i=(0,Di.useMemo)(()=>CH(e),[e]),a=l=>{t(TH(l))};return(0,Te.jsx)(De.Dropdown,{popoverProps:n,className:"global-styles-ui__shadow-editor__dropdown",renderToggle:({onToggle:l,isOpen:c})=>{let u={onClick:l,className:re("global-styles-ui__shadow-editor__dropdown-toggle",{"is-open":c}),"aria-expanded":c},d={onClick:()=>{c&&l(),o()},className:re("global-styles-ui__shadow-editor__remove-button",{"is-open":c}),label:(0,Ut.__)("Remove shadow")};return(0,Te.jsxs)(Te.Fragment,{children:[(0,Te.jsx)(De.Button,{__next40pxDefaultSize:!0,icon:Hv,...u,children:i.inset?(0,Ut.__)("Inner shadow"):(0,Ut.__)("Drop shadow")}),r&&(0,Te.jsx)(De.Button,{size:"small",icon:kA,...d})]})},renderContent:()=>(0,Te.jsx)(De.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"global-styles-ui__shadow-editor__dropdown-content",children:(0,Te.jsx)(p_e,{shadowObj:i,onChange:a})})})}function p_e({shadowObj:e,onChange:t}){let n=(i,a)=>{let l={...e,[i]:a};t(l)};return(0,Te.jsxs)(De.__experimentalVStack,{spacing:4,className:"global-styles-ui__shadow-editor-panel",children:[(0,Te.jsx)(De.ColorPalette,{clearable:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,value:e.color,onChange:i=>n("color",i)}),(0,Te.jsxs)(De.__experimentalToggleGroupControl,{label:(0,Ut.__)("Shadow Type"),value:e.inset?"inset":"outset",isBlock:!0,onChange:i=>n("inset",i==="inset"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,children:[(0,Te.jsx)(De.__experimentalToggleGroupControlOption,{value:"outset",label:(0,Ut.__)("Outset")}),(0,Te.jsx)(De.__experimentalToggleGroupControlOption,{value:"inset",label:(0,Ut.__)("Inset")})]}),(0,Te.jsxs)(De.__experimentalGrid,{columns:2,gap:4,children:[(0,Te.jsx)(Fx,{label:(0,Ut.__)("X Position"),value:e.x,onChange:i=>n("x",i)}),(0,Te.jsx)(Fx,{label:(0,Ut.__)("Y Position"),value:e.y,onChange:i=>n("y",i)}),(0,Te.jsx)(Fx,{label:(0,Ut.__)("Blur"),value:e.blur,onChange:i=>n("blur",i)}),(0,Te.jsx)(Fx,{label:(0,Ut.__)("Spread"),value:e.spread,onChange:i=>n("spread",i)})]})]})}function Fx({label:e,value:t,onChange:r}){return(0,Te.jsx)(De.__experimentalUnitControl,{label:e,__next40pxDefaultSize:!0,value:t,onChange:n=>{let a=n!==void 0&&!isNaN(parseFloat(n))?n:"0px";r(a)}})}var U6=s(C(),1);function kH(){return(0,U6.jsx)(wH,{})}function EH(){return(0,U6.jsx)(PH,{})}var IH=s(E(),1),NH=s($(),1);var RH=s($(),1),H6=s(D(),1);var AH=s(C(),1),{useSettingsForBlockElement:h_e,DimensionsPanel:g_e}=rt(RH.privateApis),v_e={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,height:!0,minHeight:!0,width:!0,childLayout:!1};function OH(){let[e]=Ee("",void 0,"user",!1),[t,r]=Ee("",void 0,"merged",!1),[o]=pe("",void 0,"user"),[n,i]=pe(""),a=h_e(n),l=(0,H6.useMemo)(()=>({...t,layout:a.layout}),[t,a.layout]),c=(0,H6.useMemo)(()=>({...e,layout:o.layout}),[e,o.layout]);return(0,AH.jsx)(g_e,{inheritedValue:l,value:c,onChange:d=>{let f={...d};if(delete f.layout,r(f),d.layout!==o.layout){let m={...o,layout:d.layout};m.layout?.definitions&&delete m.layout.definitions,i(m)}},settings:a,includeLayoutControls:!0,defaultControls:v_e})}var Hf=s(C(),1),{useHasDimensionsPanel:y_e,useSettingsForBlockElement:b_e}=rt(NH.privateApis);function S_e(){let[e]=pe(""),t=b_e(e),r=y_e(t);return(0,Hf.jsxs)(Hf.Fragment,{children:[(0,Hf.jsx)(St,{title:(0,IH.__)("Layout")}),r&&(0,Hf.jsx)(OH,{})]})}var FH=S_e;var Lx=s(A(),1),W6=s(E(),1);var G6=s(E(),1),VH=s(A(),1);var DH=s(W(),1),BH=s(O(),1),Bx=s(D(),1),MH=s(A(),1),LH=s(E(),1);var Dx=s(C(),1);function __e({gap:e=2}){let{user:t}=(0,Bx.useContext)(Br),r=t?.styles,n=(0,BH.useSelect)(a=>{let l=a(DH.store).__experimentalGetCurrentThemeGlobalStylesVariations();return Array.isArray(l)?l:void 0},[])?.filter(a=>!yb(a,["color"])&&!yb(a,["typography","spacing"])),i=(0,Bx.useMemo)(()=>[...[{title:(0,LH.__)("Default"),settings:{},styles:{}},...n??[]].map(l=>{let c=l?.styles?.blocks?{...l.styles.blocks}:{};r?.blocks&&Object.keys(r.blocks).forEach(m=>{if(r.blocks?.[m]?.css){let h=c[m]||{},g={css:`${c[m]?.css||""} ${r.blocks?.[m]?.css?.trim()||""}`};c[m]={...h,...g}}});let u=r?.css||l.styles?.css?{css:`${l.styles?.css||""} ${r?.css||""}`}:{},d=Object.keys(c).length>0?{blocks:c}:{},f={...l.styles,...u,...d};return{...l,settings:l.settings??{},styles:f}})],[n,r?.blocks,r?.css]);return!n||n.length<1?null:(0,Dx.jsx)(MH.__experimentalGrid,{columns:2,className:"global-styles-ui-style-variations-container",gap:e,children:i.map((a,l)=>(0,Dx.jsx)(rh,{variation:a,children:c=>(0,Dx.jsx)(tx,{label:a?.title,withHoverView:!0,isFocused:c,variation:a})},l))})}var Mx=__e;var hh=s(C(),1);function jH(){return(0,hh.jsxs)(VH.__experimentalVStack,{spacing:10,className:"global-styles-ui-variation-container",children:[(0,hh.jsx)(Mx,{gap:3}),(0,hh.jsx)(fh,{title:(0,G6.__)("Color Variations"),gap:3}),(0,hh.jsx)(oh,{title:(0,G6.__)("Typography"),gap:3})]})}var nc=s(C(),1);function w_e(){return(0,nc.jsxs)(nc.Fragment,{children:[(0,nc.jsx)(St,{title:(0,W6.__)("Browse styles"),description:(0,W6.__)("Choose a variation to change the look of the site.")}),(0,nc.jsx)(Lx.Card,{size:"small",isBorderless:!0,className:"global-styles-ui-screen-style-variations",children:(0,nc.jsx)(Lx.CardBody,{children:(0,nc.jsx)(jH,{})})})]})}var zH=w_e;var Bb=s(E(),1),UH=s(A(),1),HH=s($(),1);var ms=s(C(),1),{AdvancedPanel:x_e}=rt(HH.privateApis);function C_e(){let[e]=Ee("",void 0,"user",!1),[t,r]=Ee("",void 0,"merged",!1);return(0,ms.jsxs)(ms.Fragment,{children:[(0,ms.jsx)(St,{title:(0,Bb.__)("Additional CSS"),description:(0,ms.jsxs)(ms.Fragment,{children:[(0,Bb.__)("You can add custom CSS to further customize the appearance and layout of your site."),(0,ms.jsx)("br",{}),(0,ms.jsx)(UH.ExternalLink,{href:(0,Bb.__)("https://developer.wordpress.org/advanced-administration/wordpress/css/"),className:"global-styles-ui-screen-css-help-link",children:(0,Bb.__)("Learn more about CSS")})]})}),(0,ms.jsx)("div",{className:"global-styles-ui-screen-css",children:(0,ms.jsx)(x_e,{value:e,onChange:r,inheritedValue:t})})]})}var GH=C_e;var ic=s(E(),1),gh=s(A(),1),Gf=s(D(),1);var WH=s(O(),1),YH=s(W(),1),Mb=s(D(),1);var T_e={per_page:-1,_fields:"id,name,avatar_urls",context:"view",capabilities:["edit_theme_options"]},P_e={per_page:100,page:1},Vx=[];function Lb({query:e}={}){let{user:t}=(0,Mb.useContext)(Br),r=(0,Mb.useMemo)(()=>({...P_e,...e}),[e]),{authors:o,currentUser:n,isDirty:i,revisions:a,isLoadingGlobalStylesRevisions:l,revisionsCount:c}=(0,WH.useSelect)(u=>{let{__experimentalGetDirtyEntityRecords:d,getCurrentUser:f,getUsers:m,getRevisions:h,__experimentalGetCurrentGlobalStylesId:g,getEntityRecord:v,isResolving:y}=u(YH.store),b=d()||[],_=f(),S=b.length>0,x=g(),R=(x?v("root","globalStyles",x):void 0)?._links?.["version-history"]?.[0]?.count??0,F=x&&h("root","globalStyles",x,r)||Vx,B=m(T_e)||Vx,z=x?y("getRevisions",["root","globalStyles",x,r]):!1;return{authors:B,currentUser:_,isDirty:S,revisions:F,isLoadingGlobalStylesRevisions:z,revisionsCount:R}},[r]);return(0,Mb.useMemo)(()=>{if(!o.length||l)return{revisions:Vx,hasUnsavedChanges:i,isLoading:!0,revisionsCount:c};let u=a.map(f=>({...f,author:o.find(m=>m.id===f.author)}));if(a.length){if(u[0].id!=="unsaved"&&r.page===1&&(u[0].isLatest=!0),i&&t&&Object.keys(t).length>0&&n&&r.page===1){let f={id:"unsaved",styles:t?.styles,settings:t?.settings,_links:t?._links,author:{name:n?.name||"",avatar_urls:n?.avatar_urls||{}},modified:new Date};u.unshift(f)}r.per_page&&r.page===Math.ceil(c/r.per_page)&&u.push({id:"parent",styles:{},settings:{}})}return{revisions:u,hasUnsavedChanges:i,isLoading:!1,revisionsCount:c}},[i,a,n,o,t,l,c,r.page,r.per_page])}var Vo=s(E(),1),Vb=s(A(),1),Wa=s(po(),1),qH=s(W(),1),ZH=s(O(),1);var jx=s(yo(),1),_o=s(C(),1),k_e=3600*1e3*24;function E_e({revision:e,previousRevision:t}){let r=My(e,t,{maxResults:7});return r.length?(0,_o.jsx)("ul",{"data-testid":"global-styles-revision-changes",className:"global-styles-ui-screen-revisions__changes",children:r.map(o=>(0,_o.jsx)("li",{children:o},o))}):null}function R_e(e,t,r,o){return e==="parent"?(0,Vo.__)("Reset the styles to the theme defaults"):e==="unsaved"?(0,Vo.sprintf)((0,Vo.__)("Unsaved changes by %s"),t):o?(0,Vo.sprintf)((0,Vo.__)("Changes saved by %1$s on %2$s. This revision matches current editor styles."),t,r):(0,Vo.sprintf)((0,Vo.__)("Changes saved by %1$s on %2$s"),t,r)}function A_e({userRevisions:e,selectedRevisionId:t,onChange:r,canApplyRevision:o,onApplyRevision:n}){let{currentThemeName:i,currentUser:a}=(0,ZH.useSelect)(u=>{let{getCurrentTheme:d,getCurrentUser:f}=u(qH.store),m=d();return{currentThemeName:m?.name?.rendered||m?.stylesheet,currentUser:f()}},[]),l=(0,Wa.getDate)(null).getTime(),{datetimeAbbreviated:c}=(0,Wa.getSettings)().formats;return(0,_o.jsx)(Vb.Composite,{orientation:"vertical",className:"global-styles-ui-screen-revisions__revisions-list","aria-label":(0,Vo.__)("Global styles revisions list"),role:"listbox",children:e.map((u,d)=>{let{id:f,author:m,modified:h}=u,g=f==="unsaved",v=g?a:m,y=v?.name||(0,Vo.__)("User"),b=v?.avatar_urls?.["48"],S=t?t===f:d===0,x=!o&&S,T=f==="parent",R=h instanceof Date?h.toISOString():h,F=(0,Wa.getDate)(R??null),B=R&&l-F.getTime()>k_e?(0,Wa.dateI18n)(c,F):(0,Wa.humanTimeDiff)(R??F,void 0),z=R_e(f,y,(0,Wa.dateI18n)(c,F),x);return(0,_o.jsxs)(Vb.Composite.Item,{className:"global-styles-ui-screen-revisions__revision-item","aria-current":S,role:"option",onKeyDown:L=>{let{keyCode:M}=L;(M===jx.ENTER||M===jx.SPACE)&&r(u)},onClick:L=>{L.preventDefault(),r(u)},"aria-selected":S,"aria-label":z,render:(0,_o.jsx)("div",{}),children:[(0,_o.jsx)("span",{className:"global-styles-ui-screen-revisions__revision-item-wrapper",children:T?(0,_o.jsxs)("span",{className:"global-styles-ui-screen-revisions__description",children:[(0,Vo.__)("Default styles"),(0,_o.jsx)("span",{className:"global-styles-ui-screen-revisions__meta",children:i})]}):(0,_o.jsxs)("span",{className:"global-styles-ui-screen-revisions__description",children:[g?(0,_o.jsx)("span",{className:"global-styles-ui-screen-revisions__date",children:(0,Vo.__)("(Unsaved)")}):(0,_o.jsx)("time",{className:"global-styles-ui-screen-revisions__date",dateTime:R,children:B}),(0,_o.jsxs)("span",{className:"global-styles-ui-screen-revisions__meta",children:[(0,_o.jsx)("img",{alt:y,src:b}),y]}),S&&(0,_o.jsx)(E_e,{revision:u,previousRevision:d<e.length?e[d+1]:void 0})]})}),S&&(x?(0,_o.jsx)("p",{className:"global-styles-ui-screen-revisions__applied-text",children:(0,Vo.__)("These styles are already applied to your site.")}):(0,_o.jsx)(Vb.Button,{size:"compact",variant:"primary",className:"global-styles-ui-screen-revisions__apply-button",onClick:n,"aria-label":(0,Vo.__)("Apply the selected revision to your site."),children:T?(0,Vo.__)("Reset to defaults"):(0,Vo.__)("Apply")}))]},f)})})}var KH=A_e;var ps=s(A(),1),wo=s(E(),1);var Qs=s(C(),1);function XH({currentPage:e,numPages:t,changePage:r,totalItems:o,className:n,disabled:i=!1,buttonVariant:a="tertiary",label:l=(0,wo.__)("Pagination")}){return(0,Qs.jsxs)(ps.__experimentalHStack,{expanded:!1,as:"nav","aria-label":l,spacing:3,justify:"flex-start",className:re("global-styles-ui-pagination",n),children:[(0,Qs.jsx)(ps.__experimentalText,{variant:"muted",className:"global-styles-ui-pagination__total",children:(0,wo.sprintf)((0,wo._n)("%d item","%d items",o),o)}),(0,Qs.jsxs)(ps.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,Qs.jsx)(ps.Button,{variant:a,onClick:()=>r(1),accessibleWhenDisabled:!0,disabled:i||e===1,label:(0,wo.__)("First page"),icon:(0,wo.isRTL)()?Tl:kl,size:"compact"}),(0,Qs.jsx)(ps.Button,{variant:a,onClick:()=>r(e-1),accessibleWhenDisabled:!0,disabled:i||e===1,label:(0,wo.__)("Previous page"),icon:(0,wo.isRTL)()?Ft:Nt,size:"compact"})]}),(0,Qs.jsx)(ps.__experimentalText,{variant:"muted",children:(0,wo.sprintf)((0,wo._x)("%1$d of %2$d","paging"),e,t)}),(0,Qs.jsxs)(ps.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,Qs.jsx)(ps.Button,{variant:a,onClick:()=>r(e+1),accessibleWhenDisabled:!0,disabled:i||e===t,label:(0,wo.__)("Next page"),icon:(0,wo.isRTL)()?Nt:Ft,size:"compact"}),(0,Qs.jsx)(ps.Button,{variant:a,onClick:()=>r(t),accessibleWhenDisabled:!0,disabled:i||e===t,label:(0,wo.__)("Last page"),icon:(0,wo.isRTL)()?kl:Tl,size:"compact"})]})]})}var Js=s(C(),1),QH=10;function O_e({onClose:e}={}){let{user:t,onChange:r}=(0,Gf.useContext)(Br),{params:o,goTo:n}=(0,gh.useNavigator)(),{revisionId:i}=o,[a,l]=(0,Gf.useState)(1),{revisions:c,isLoading:u,hasUnsavedChanges:d,revisionsCount:f}=Lb({query:{per_page:QH,page:a}}),m=Math.ceil(f/QH),[h,g]=(0,Gf.useState)(!1),v=(0,Gf.useMemo)(()=>i&&c.find(B=>String(B.id)===String(i))||t,[i,c,t]),y=pf(v,t),b=()=>{e&&e()},_=F=>{r(F),g(!1),b()},S=F=>{n(`/revisions/${F.id}`)},x=v?.id??c[0]?.id,T=!!x&&x!=="unsaved"&&!y,R=!!c.length;return(0,Js.jsxs)(Js.Fragment,{children:[(0,Js.jsx)(St,{title:f?(0,ic.sprintf)((0,ic.__)("Revisions (%d)"),f):(0,ic.__)("Revisions"),description:(0,ic.__)(`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.`),onBack:b}),!R&&(0,Js.jsx)(gh.Spinner,{className:"global-styles-ui-screen-revisions__loading"}),(0,Js.jsx)(KH,{onChange:S,selectedRevisionId:x,userRevisions:c,canApplyRevision:T,onApplyRevision:()=>d?g(!0):_(v)}),m>1&&(0,Js.jsx)("div",{className:"global-styles-ui-screen-revisions__footer",children:(0,Js.jsx)(XH,{className:"global-styles-ui-screen-revisions__pagination",currentPage:a,numPages:m,changePage:l,totalItems:f,disabled:u,label:(0,ic.__)("Global Styles pagination")})}),h&&(0,Js.jsx)(gh.__experimentalConfirmDialog,{isOpen:h,confirmButtonText:(0,ic.__)("Apply"),onConfirm:()=>_(v),onCancel:()=>g(!1),size:"medium",children:(0,ic.__)("Are you sure you want to apply this revision? Any unsaved changes will be lost.")})]})}var JH=O_e;var no=s(E(),1),Pr=s(A(),1);var oG=s(D(),1);var $H=s(A(),1),eG=s(E(),1),tG=s(C(),1);function I_e({text:e,confirmButtonText:t,isOpen:r,toggleOpen:o,onConfirm:n}){let i=async()=>{o(),n()},a=()=>{o()};return(0,tG.jsx)($H.__experimentalConfirmDialog,{isOpen:r,cancelButtonText:(0,eG.__)("Cancel"),confirmButtonText:t,onCancel:a,onConfirm:i,size:"medium",children:e})}var rG=I_e;var _t=s(C(),1),{Menu:jb}=rt(Pr.privateApis);function Y6({label:e,origin:t,sizes:r,handleAddFontSize:o,handleResetFontSizes:n}){let[i,a]=(0,oG.useState)(!1),l=()=>a(!i),c=t==="custom"?(0,no.__)("Are you sure you want to remove all custom font size presets?"):(0,no.__)("Are you sure you want to reset all font size presets to their default values?");return(0,_t.jsxs)(_t.Fragment,{children:[n&&i&&(0,_t.jsx)(rG,{text:c,confirmButtonText:t==="custom"?(0,no.__)("Remove"):(0,no.__)("Reset"),isOpen:i,toggleOpen:l,onConfirm:n}),(0,_t.jsxs)(Pr.__experimentalVStack,{spacing:4,children:[(0,_t.jsxs)(Pr.__experimentalHStack,{children:[(0,_t.jsx)(Tr,{level:3,children:e}),(0,_t.jsxs)(Pr.FlexItem,{className:"global-styles-ui__typography-panel__options-container",children:[t==="custom"&&(0,_t.jsx)(Pr.Button,{label:(0,no.__)("Add font size"),icon:Pl,size:"small",onClick:o}),!!n&&(0,_t.jsxs)(jb,{children:[(0,_t.jsx)(jb.TriggerButton,{render:(0,_t.jsx)(Pr.Button,{size:"small",icon:Nr,label:(0,no.__)("Font size presets options")})}),(0,_t.jsx)(jb.Popover,{children:(0,_t.jsx)(jb.Item,{onClick:l,children:(0,_t.jsx)(jb.ItemLabel,{children:t==="custom"?(0,no.__)("Remove font size presets"):(0,no.__)("Reset font size presets")})})})]})]})]}),!!r.length&&(0,_t.jsx)(Pr.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:r.map(u=>(0,_t.jsx)(fr,{path:`/typography/font-sizes/${t}/${u.slug}`,children:(0,_t.jsxs)(Pr.__experimentalHStack,{children:[(0,_t.jsx)(Pr.FlexItem,{className:"global-styles-ui-font-size__item",children:u.name}),(0,_t.jsx)(Pr.FlexItem,{display:"flex",children:(0,_t.jsx)(No,{icon:(0,no.isRTL)()?Nt:Ft})})]})},u.slug))})]})]})}function N_e(){let[e,t]=pe("typography.fontSizes.theme"),[r]=pe("typography.fontSizes.theme","base"),[o,n]=pe("typography.fontSizes.default"),[i]=pe("typography.fontSizes.default","base"),[a=[],l]=pe("typography.fontSizes.custom"),[c]=pe("typography.defaultFontSizes"),u=()=>{let f=Jw(a,"custom-"),m={name:(0,no.sprintf)((0,no.__)("New Font Size %d"),f),size:"16px",slug:`custom-${f}`};l([...a,m])},d=(f,m)=>f.map(h=>h.size).join("")===m.map(h=>h.size).join("");return(0,_t.jsxs)(Pr.__experimentalVStack,{spacing:2,children:[(0,_t.jsx)(St,{title:(0,no.__)("Font size presets"),description:(0,no.__)("Create and edit the presets used for font sizes across the site.")}),(0,_t.jsx)(Pr.__experimentalView,{children:(0,_t.jsx)(Pr.__experimentalSpacer,{paddingX:4,children:(0,_t.jsxs)(Pr.__experimentalVStack,{spacing:8,children:[!!e?.length&&(0,_t.jsx)(Y6,{label:(0,no.__)("Theme"),origin:"theme",sizes:e,handleAddFontSize:u,handleResetFontSizes:d(e,r)?void 0:()=>t(r)}),c&&!!o?.length&&(0,_t.jsx)(Y6,{label:(0,no.__)("Default"),origin:"default",sizes:o,handleAddFontSize:u,handleResetFontSizes:d(o,i)?void 0:()=>n(i)}),(0,_t.jsx)(Y6,{label:(0,no.__)("Custom"),origin:"custom",sizes:a,handleAddFontSize:u,handleResetFontSizes:a.length>0?()=>l([]):void 0})]})})})]})}var nG=N_e;var si=s(E(),1),kr=s(A(),1);var zb=s(D(),1);var iG=s($(),1),sG=s(E(),1);var aG=s(C(),1);function F_e({fontSize:e}){let[t]=Ee("typography"),r=typeof e?.fluid=="object"&&e?.fluid?.min&&e?.fluid?.max?{minimumFontSize:e.fluid.min,maximumFontSize:e.fluid.max}:{fontSize:e.size},o=(0,iG.getComputedFluidTypographyValue)(r);return(0,aG.jsx)("div",{className:"global-styles-ui-typography-preview",style:{fontSize:o,fontFamily:t?.fontFamily??"serif"},children:(0,sG.__)("Aa")})}var lG=F_e;var cG=s(A(),1),vh=s(E(),1),uG=s(C(),1);function D_e({fontSize:e,isOpen:t,toggleOpen:r,handleRemoveFontSize:o}){let n=async()=>{r(),o(e)},i=()=>{r()};return(0,uG.jsx)(cG.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,vh.__)("Cancel"),confirmButtonText:(0,vh.__)("Delete"),onCancel:i,onConfirm:n,size:"medium",children:e&&(0,vh.sprintf)((0,vh.__)('Are you sure you want to delete "%s" font size preset?'),e.name)})}var dG=D_e;var $s=s(A(),1),yh=s(E(),1),fG=s(D(),1),sc=s(C(),1);function B_e({fontSize:e,toggleOpen:t,handleRename:r}){let[o,n]=(0,fG.useState)(e.name),i=()=>{o&&o.trim()&&r(o),t()};return(0,sc.jsx)($s.Modal,{onRequestClose:t,focusOnMount:"firstContentElement",title:(0,yh.__)("Rename"),size:"small",children:(0,sc.jsx)("form",{onSubmit:a=>{a.preventDefault(),i(),t()},children:(0,sc.jsxs)($s.__experimentalVStack,{spacing:"3",children:[(0,sc.jsx)($s.__experimentalInputControl,{__next40pxDefaultSize:!0,autoComplete:"off",value:o,onChange:n,label:(0,yh.__)("Name"),placeholder:(0,yh.__)("Font size preset name")}),(0,sc.jsxs)($s.__experimentalHStack,{justify:"right",children:[(0,sc.jsx)($s.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,yh.__)("Cancel")}),(0,sc.jsx)($s.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,yh.__)("Save")})]})]})})})}var mG=B_e;var io=s(A(),1),ac=s(C(),1),M_e=["px","em","rem","vw","vh"];function zx(e){let{baseControlProps:t}=(0,io.useBaseControlProps)(e),{value:r,onChange:o,fallbackValue:n,disabled:i,label:a}=e,l=(0,io.__experimentalUseCustomUnits)({availableUnits:M_e}),[c,u="px"]=(0,io.__experimentalParseQuantityAndUnitFromRawValue)(r,l),d=!!u&&["em","rem","vw","vh"].includes(u);return(0,ac.jsx)(io.BaseControl,{...t,children:(0,ac.jsxs)(io.Flex,{children:[(0,ac.jsx)(io.FlexItem,{isBlock:!0,children:(0,ac.jsx)(io.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:a,hideLabelFromVision:!0,value:r,onChange:h=>{o?.(h)},units:l,min:0,disabled:i})}),(0,ac.jsx)(io.FlexItem,{isBlock:!0,children:(0,ac.jsx)(io.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,ac.jsx)(io.RangeControl,{__next40pxDefaultSize:!0,label:a,hideLabelFromVision:!0,value:c,initialPosition:n,withInputField:!1,onChange:h=>{o?.(h!==void 0?h+u:void 0)},min:0,max:d?10:100,step:d?.1:1,disabled:i})})})]})})}var pt=s(C(),1),{Menu:Wf}=rt(kr.privateApis);function L_e(){let[e,t]=(0,zb.useState)(!1),[r,o]=(0,zb.useState)(!1),{params:{origin:n,slug:i},goBack:a}=(0,kr.useNavigator)(),[l,c]=pe("typography.fontSizes"),[u]=pe("typography.fluid"),d=l?.[n]??[],f=d.find(B=>B.slug===i);if((0,zb.useEffect)(()=>{i&&!f&&a()},[i,f,a]),!n||!i||!f)return null;let m=f?.fluid!==void 0?!!f.fluid:!!u,h=typeof f?.fluid=="object",g=B=>{x("name",B)},v=B=>{x("size",B)},y=B=>{x("fluid",B)},b=B=>{B?x("fluid",{min:f.size,max:f.size}):x("fluid",!0)},_=B=>{let z=typeof f.fluid=="object"?f.fluid:{};x("fluid",{...z,min:B})},S=B=>{let z=typeof f.fluid=="object"?f.fluid:{};x("fluid",{...z,max:B})},x=(B,z)=>{let L=d.map(M=>M.slug===i?{...M,[B]:z}:M);c({...l,[n]:L})},T=()=>{let B=d.filter(z=>z.slug!==i);c({...l,[n]:B})},R=()=>{t(!e)},F=()=>{o(!r)};return(0,pt.jsxs)(pt.Fragment,{children:[(0,pt.jsx)(dG,{fontSize:f,isOpen:e,toggleOpen:R,handleRemoveFontSize:T}),r&&(0,pt.jsx)(mG,{fontSize:f,toggleOpen:F,handleRename:g}),(0,pt.jsxs)(kr.__experimentalVStack,{spacing:4,children:[(0,pt.jsxs)(kr.__experimentalHStack,{justify:"space-between",alignment:"flex-start",children:[(0,pt.jsx)(St,{title:f.name,description:(0,si.sprintf)((0,si.__)("Manage the font size %s."),f.name)}),n==="custom"&&(0,pt.jsx)(kr.FlexItem,{children:(0,pt.jsx)(kr.__experimentalSpacer,{marginTop:3,marginBottom:0,paddingX:4,children:(0,pt.jsxs)(Wf,{children:[(0,pt.jsx)(Wf.TriggerButton,{render:(0,pt.jsx)(kr.Button,{size:"small",icon:Nr,label:(0,si.__)("Font size options")})}),(0,pt.jsxs)(Wf.Popover,{children:[(0,pt.jsx)(Wf.Item,{onClick:F,children:(0,pt.jsx)(Wf.ItemLabel,{children:(0,si.__)("Rename")})}),(0,pt.jsx)(Wf.Item,{onClick:R,children:(0,pt.jsx)(Wf.ItemLabel,{children:(0,si.__)("Delete")})})]})]})})})]}),(0,pt.jsx)(kr.__experimentalView,{children:(0,pt.jsx)(kr.__experimentalSpacer,{paddingX:4,marginBottom:0,paddingBottom:6,children:(0,pt.jsxs)(kr.__experimentalVStack,{spacing:4,children:[(0,pt.jsx)(kr.FlexItem,{children:(0,pt.jsx)(lG,{fontSize:f})}),(0,pt.jsx)(zx,{label:(0,si.__)("Size"),value:!h&&f.size?String(f.size):"",onChange:v,disabled:h}),(0,pt.jsx)(kr.ToggleControl,{label:(0,si.__)("Fluid typography"),help:(0,si.__)("Scale the font size dynamically to fit the screen or viewport."),checked:m,onChange:y}),m&&(0,pt.jsx)(kr.ToggleControl,{label:(0,si.__)("Custom fluid values"),help:(0,si.__)("Set custom min and max values for the fluid font size."),checked:h,onChange:b}),h&&(0,pt.jsxs)(pt.Fragment,{children:[(0,pt.jsx)(zx,{label:(0,si.__)("Minimum"),value:typeof f?.fluid=="object"?f.fluid?.min:void 0,onChange:_}),(0,pt.jsx)(zx,{label:(0,si.__)("Maximum"),value:typeof f?.fluid=="object"?f.fluid?.max:void 0,onChange:S})]})]})})})]})]})}var pG=L_e;var Oe=s(C(),1);function V_e({parentMenu:e,blockStyles:t,blockName:r}){return(0,Oe.jsx)(Oe.Fragment,{children:t.map((o,n)=>(0,Oe.jsx)(bh.Navigator.Screen,{path:e+"/variations/"+o.name,children:(0,Oe.jsx)(R6,{name:r,variation:o.name})},n))})}function j_e({name:e,parentMenu:t=""}){let r=(0,hG.useSelect)(o=>{if(!e)return[];let{getBlockStyles:n}=o(Ux.store);return n(e)},[e]);return r?.length?(0,Oe.jsx)(V_e,{parentMenu:t,blockStyles:r,blockName:e||""}):null}function Z6({value:e,baseValue:t,onChange:r,path:o,onPathChange:n,fontLibraryEnabled:i=!1,serverCSS:a,serverSettings:l}){let c=(0,Ux.getBlockTypes)(),u=(0,Uu.useMemo)(()=>go(t,e),[t,e]),[d,f]=jy(u,[],{styleOptions:{variationStyles:!0}}),m=(0,Uu.useMemo)(()=>[...a??[],...d??[]],[a,d]),h=(0,Uu.useMemo)(()=>({...l,__experimentalFeatures:f,styles:m}),[f,l,m]);return(0,Oe.jsx)(gb,{value:e,baseValue:t,onChange:r,fontLibraryEnabled:i,children:(0,Oe.jsx)(gG.BlockEditorProvider,{settings:h,children:(0,Oe.jsxs)(bh.Navigator,{className:"global-styles-ui-sidebar__navigator-provider",initialPath:o||"/",children:[(o||n)&&(0,Oe.jsx)(z_e,{path:o,onPathChange:n}),(0,Oe.jsx)(Zr,{path:"/",children:(0,Oe.jsx)(sz,{})}),(0,Oe.jsx)(Zr,{path:"/colors",children:(0,Oe.jsx)(eH,{})}),(0,Oe.jsx)(Zr,{path:"/typography",children:(0,Oe.jsx)(VU,{})}),(0,Oe.jsx)(Zr,{path:"/typography/font-sizes",children:(0,Oe.jsx)(nG,{})}),(0,Oe.jsx)(Zr,{path:"/typography/font-sizes/:origin/:slug",children:(0,Oe.jsx)(pG,{})}),(0,Oe.jsx)(Zr,{path:"/layout",children:(0,Oe.jsx)(FH,{})}),(0,Oe.jsx)(Zr,{path:"/colors/palette",children:(0,Oe.jsx)(uH,{})}),(0,Oe.jsx)(Zr,{path:"/variations",children:(0,Oe.jsx)(zH,{})}),(0,Oe.jsx)(Zr,{path:"/css",children:(0,Oe.jsx)(GH,{})}),(0,Oe.jsx)(Zr,{path:"/revisions/:revisionId?",children:(0,Oe.jsx)(JH,{})}),(0,Oe.jsx)(Zr,{path:"/shadows",children:(0,Oe.jsx)(kH,{})}),(0,Oe.jsx)(Zr,{path:"/shadows/edit/:category/:slug",children:(0,Oe.jsx)(EH,{})}),(0,Oe.jsx)(Zr,{path:"/background",children:(0,Oe.jsx)(gH,{})}),(0,Oe.jsx)(Zr,{path:"/typography/text",children:(0,Oe.jsx)(uh,{element:"text"})}),(0,Oe.jsx)(Zr,{path:"/typography/link",children:(0,Oe.jsx)(uh,{element:"link"})}),(0,Oe.jsx)(Zr,{path:"/typography/heading",children:(0,Oe.jsx)(uh,{element:"heading"})}),(0,Oe.jsx)(Zr,{path:"/typography/caption",children:(0,Oe.jsx)(uh,{element:"caption"})}),(0,Oe.jsx)(Zr,{path:"/typography/button",children:(0,Oe.jsx)(uh,{element:"button"})}),(0,Oe.jsx)(Zr,{path:"/blocks",children:(0,Oe.jsx)(mz,{})}),c.map(g=>(0,Oe.jsxs)(Uu.Fragment,{children:[(0,Oe.jsx)(Zr,{path:"/blocks/"+encodeURIComponent(g.name),children:(0,Oe.jsx)(R6,{name:g.name})}),(0,Oe.jsx)(j_e,{name:g.name,parentMenu:"/blocks/"+encodeURIComponent(g.name)})]},g.name))]})})})}function Zr({path:e,children:t}){return(0,Oe.jsx)(bh.Navigator.Screen,{className:"global-styles-ui-sidebar__navigator-screen",path:e,children:t})}function z_e({path:e,onPathChange:t}){let r=(0,bh.useNavigator)(),{path:o}=r.location,n=(0,q6.usePrevious)(e),i=(0,q6.usePrevious)(o);return(0,Uu.useEffect)(()=>{e&&e!==o&&(e!==n?r.goTo(e):o!==i&&t&&t(o??"/"))},[t,e,i,n,o,r]),null}var K6=s(C(),1);function Sh(e){return function({value:r,baseValue:o,onChange:n,...i}){return(0,K6.jsx)(gb,{value:r,baseValue:o,onChange:n,children:(0,K6.jsx)(e,{...i})})}}var U_e=Sh(Mx);var H_e=Sh(fh);var G_e=Sh(oh);var W_e=s(C(),1);var TG=s(Yd(),1);var vG=s(O(),1),yG=s(D(),1),bG=s($(),1),SG=s(he(),1);function _G({path:e,onPathChange:t}){let{selectedBlockName:r,selectedBlockClientId:o}=(0,vG.useSelect)(a=>{let{getSelectedBlockClientId:l,getBlockName:c}=a(bG.store),u=l();return{selectedBlockName:c(u),selectedBlockClientId:u}},[]),n=!0,i=(0,SG.usePrevious)(o);return(0,yG.useEffect)(()=>{if(o===i||!o||!n||!e||e!=="/blocks"&&!e.startsWith("/blocks/"))return;let a="/blocks/"+encodeURIComponent(r);a!==e&&t?.(a)},[o,i,r,n,e,t]),null}var Yf=s(D(),1);var _h=s(W(),1),wh=s(O(),1),wG=s($(),1);var{cleanEmptyObject:X6}=N(wG.privateApis);function Y_e(){let{globalStylesId:e,isReady:t,settings:r,styles:o,_links:n}=(0,wh.useSelect)(u=>{let{getEntityRecord:d,getEditedEntityRecord:f,hasFinishedResolution:m,canUser:h}=u(_h.store),g=u(_h.store).__experimentalGetCurrentGlobalStylesId(),v,y=g?h("update",{kind:"root",name:"globalStyles",id:g}):null;g&&typeof y=="boolean"&&(y?v=f("root","globalStyles",g):v=d("root","globalStyles",g,{context:"view"}));let b=!1;return m("__experimentalGetCurrentGlobalStylesId")&&(g?b=y?m("getEditedEntityRecord",["root","globalStyles",g]):m("getEntityRecord",["root","globalStyles",g,{context:"view"}]):b=!0),{globalStylesId:g,isReady:b,settings:v?.settings,styles:v?.styles,_links:v?._links}},[]),{getEditedEntityRecord:i}=(0,wh.useSelect)(_h.store),{editEntityRecord:a}=(0,wh.useDispatch)(_h.store),l=(0,Yf.useMemo)(()=>({settings:r??{},styles:o??{},_links:n??{}}),[r,o,n]),c=(0,Yf.useCallback)((u,d={})=>{let f=i("root","globalStyles",e),m={styles:f?.styles??{},settings:f?.settings??{},_links:f?._links??{}},h=typeof u=="function"?u(m):u;a("root","globalStyles",e,{styles:X6(h.styles)||{},settings:X6(h.settings)||{},_links:X6(h._links)||{}},d)},[e,a,i]);return[t,l,c]}function q_e(){let e=(0,wh.useSelect)(t=>t(_h.store).__experimentalGetCurrentThemeBaseGlobalStyles(),[]);return[!!e,e]}function xo(){let[e,t,r]=Y_e(),[o,n]=q_e();return{merged:(0,Yf.useMemo)(()=>!e||!o?{}:go(n||{},t),[e,o,n,t]),base:n||{},user:t,setUser:r,isReady:e&&o}}function Hu(e,t){let{merged:r}=xo();return(0,Yf.useMemo)(()=>Fy(r,e,t),[r,e,t])}function Q6(e,t){let{merged:r}=xo();return(0,Yf.useMemo)(()=>mf(r,e,t),[r,e,t])}var qf=s(C(),1);function Z_e(){let{styles:e,__unstableResolvedAssets:t,colors:r,gradients:o,__experimentalDiscussionSettings:n,mediaUploadHandler:i,fontLibraryEnabled:a}=(0,CG.useSelect)(u=>{let{getEditorSettings:d}=u(w),{canUser:f}=u(xG.store),m=d(),h=f("create",{kind:"postType",name:"attachment"});return{styles:m?.styles,__unstableResolvedAssets:m?.__unstableResolvedAssets,colors:m?.colors,gradients:m?.gradients,__experimentalDiscussionSettings:m?.__experimentalDiscussionSettings,mediaUploadHandler:h?TG.uploadMedia:void 0,fontLibraryEnabled:m?.fontLibraryEnabled??!0}},[]),l=(0,J6.useMemo)(()=>e?e.filter(u=>!u.isGlobalStyles):[],[e]),c=(0,J6.useMemo)(()=>({__unstableResolvedAssets:t,settings:{color:{palette:{theme:r??[]},gradients:{theme:o??[]},duotone:{theme:[]}}},__experimentalDiscussionSettings:n,mediaUpload:i}),[t,r,o,n,i]);return{serverCSS:l,serverSettings:c,fontLibraryEnabled:a}}function Hx({path:e,onPathChange:t}){let{user:r,base:o,setUser:n,isReady:i}=xo(),{serverCSS:a,serverSettings:l,fontLibraryEnabled:c}=Z_e();return i?(0,qf.jsxs)(qf.Fragment,{children:[(0,qf.jsx)(Z6,{value:r,baseValue:o||{},onChange:n,path:e,onPathChange:t,fontLibraryEnabled:c,serverCSS:a,serverSettings:l}),(0,qf.jsx)(_G,{path:e,onPathChange:t})]}):null}var Gu=s(C(),1);function K_e({template:e,post:t}){let[r="white"]=Hu("color.background"),[o]=(0,Ub.useEntityBlockEditor)("postType",t.type,{id:t.id}),[n]=(0,Ub.useEntityBlockEditor)("postType",e?.type,{id:e?.id}),i=e&&n?n:o,a=!i?.length;return(0,Gu.jsxs)("div",{className:"editor-fields-content-preview",style:{backgroundColor:r},children:[a&&(0,Gu.jsx)("span",{className:"editor-fields-content-preview__empty",children:(0,PG.__)("Empty content")}),!a&&(0,Gu.jsx)($6.BlockPreview.Async,{children:(0,Gu.jsx)($6.BlockPreview,{blocks:i})})]})}function EG({item:e}){let{settings:t,template:r}=(0,kG.useSelect)(o=>{let{canUser:n,getPostType:i,getTemplateId:a,getEntityRecord:l}=N(o(Ub.store)),c=n("read",{kind:"postType",name:"wp_template"}),u=o(w).getEditorSettings(),d=u.supportsTemplateMode,f=i(e.type)?.viewable??!1,m=d&&f&&c?a(e.type,e.id):null;return{settings:u,template:m?l("postType","wp_template",m):void 0}},[e.type,e.id]);return(0,Gu.jsx)(y6,{post:e,settings:t,__unstableTemplate:r,children:(0,Gu.jsx)(K_e,{template:r,post:e})})}var X_e={type:"media",id:"content-preview",label:(0,RG.__)("Content preview"),render:EG,enableSorting:!1},AG=X_e;function Q_e(e){let t=e?.editor;return Array.isArray(t)?!!t[0]?.notes:!1}function J_e(e,t,r){return{type:"REGISTER_ENTITY_ACTION",kind:e,name:t,config:r}}function $_e(e,t,r){return{type:"UNREGISTER_ENTITY_ACTION",kind:e,name:t,actionId:r}}function ewe(e,t,r){return{type:"REGISTER_ENTITY_FIELD",kind:e,name:t,config:r}}function twe(e,t,r){return{type:"UNREGISTER_ENTITY_FIELD",kind:e,name:t,fieldId:r}}function rwe(e,t){return{type:"SET_IS_READY",kind:e,name:t}}var owe=[sI,nI,cI,fI,uI,dI,oI,c_,tI,iI,lI],nwe=e=>async({registry:t})=>{if(N(t.select(w)).isEntityReady("postType",e))return;N(t.dispatch(w)).setIsReady("postType",e);let o=await t.resolveSelect(Gx.store).getPostType(e),n=await t.resolveSelect(Gx.store).canUser("create",{kind:"postType",name:e}),i=await t.resolveSelect(Gx.store).getCurrentTheme(),a=!["wp_block","wp_template_part"].includes(o.slug)&&n&&D5;o.slug!=="wp_template"&&(a=void 0),o.slug==="wp_template"&&!window?.__experimentalTemplateActivate&&(a=void 0);let l=[o.viewable?A5:void 0,o.supports?.revisions?G5:void 0,a,o.slug==="wp_template_part"&&n&&i?.is_block_theme?eI:void 0,n&&o.slug==="wp_block"?V5:void 0,o.supports?.title?M5:void 0,o.supports?.["page-attributes"]?I5:void 0,o.slug==="wp_block"?H5:void 0,q5,L5,J5,K5,Y5].filter(Boolean),c;if(e===ur)c=owe;else if(c=[o.supports?.thumbnail&&i?.theme_supports?.["post-thumbnails"]&&p5,o.supports?.author&&E5,w5,!Jc.includes(o.slug)&&k5,bO,o.supports?.["page-attributes"]&&S5,o.supports?.comments&&x5,o.supports?.trackbacks&&T5,(o.supports?.comments||o.supports?.trackbacks)&&P5,g5,_5,o.supports?.editor&&o.viewable&&AG,Q_e(o.supports)&&R5].filter(Boolean),o.supports?.title){let u;e==="page"?u=CO:e==="wp_template"?u=ny:e==="wp_block"?u=iy:u=c_,c.push(u)}t.batch(()=>{l.forEach(u=>{N(t.dispatch(w)).registerEntityAction("postType",e,u)}),c.forEach(u=>{N(t.dispatch(w)).registerEntityField("postType",e,u)})}),(0,OG.doAction)("core.registerPostTypeSchema",e)};function iwe(e){return{type:"SET_CURRENT_TEMPLATE_ID",id:e}}var swe=e=>async({select:t,dispatch:r,registry:o})=>{let n=await o.dispatch(Co.store).saveEntityRecord("postType","wp_template",e);return o.dispatch(Co.store).editEntityRecord("postType",t.getCurrentPostType(),t.getCurrentPostId(),{template:n.slug}),o.dispatch(Dn.store).createSuccessNotice((0,st.__)("Custom template created. You're in template mode now."),{type:"snackbar",actions:[{label:(0,st.__)("Go back"),onClick:()=>r.setRenderingMode(t.getEditorSettings().defaultRenderingMode)}]}),n},awe=e=>({registry:t})=>{let o=(t.select(Zf.store).get("core","hiddenBlockTypes")??[]).filter(n=>!(Array.isArray(e)?e:[e]).includes(n));t.dispatch(Zf.store).set("core","hiddenBlockTypes",o)},lwe=e=>({registry:t})=>{let r=t.select(Zf.store).get("core","hiddenBlockTypes")??[],o=new Set([...r,...Array.isArray(e)?e:[e]]);t.dispatch(Zf.store).set("core","hiddenBlockTypes",[...o])},cwe=({onSave:e,dirtyEntityRecords:t=[],entitiesToSkip:r=[],close:o,successNoticeContent:n}={})=>({registry:i})=>{let a=[{kind:"postType",name:"wp_navigation"}],l="site-editor-save-success",c=i.select(Co.store).getEntityRecord("root","__unstableBase")?.home;i.dispatch(Dn.store).removeNotice(l);let u=t.filter(({kind:m,name:h,key:g,property:v})=>!r.some(y=>y.kind===m&&y.name===h&&y.key===g&&y.property===v));o?.(u);let d=[],f=[];u.forEach(({kind:m,name:h,key:g,property:v})=>{m==="root"&&h==="site"?d.push(v):(a.some(y=>y.kind===m&&y.name===h)&&i.dispatch(Co.store).editEntityRecord(m,h,g,{status:"publish"}),f.push(i.dispatch(Co.store).saveEditedEntityRecord(m,h,g)))}),d.length&&f.push(i.dispatch(Co.store).__experimentalSaveSpecifiedEntityEdits("root","site",void 0,d)),i.dispatch(IG.store).__unstableMarkLastChangeAsPersistent(),Promise.all(f).then(m=>e?e(m):m).then(m=>{m.some(h=>typeof h>"u")?i.dispatch(Dn.store).createErrorNotice((0,st.__)("Saving failed.")):i.dispatch(Dn.store).createSuccessNotice(n||(0,st.__)("Site updated."),{type:"snackbar",id:l,actions:[{label:(0,st.__)("View site"),url:c,openInNewTab:!0}]})}).catch(m=>i.dispatch(Dn.store).createErrorNotice(`${(0,st.__)("Saving failed.")} ${m}`))},uwe=(e,{allowUndo:t=!0}={})=>async({registry:r})=>{let o="edit-site-template-reverted";if(r.dispatch(Dn.store).removeNotice(o),!e_(e)){r.dispatch(Dn.store).createErrorNotice((0,st.__)("This template is not revertable."),{type:"snackbar"});return}try{let n=r.select(Co.store).getEntityConfig("postType",e.type);if(!n){r.dispatch(Dn.store).createErrorNotice((0,st.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let i=(0,NG.addQueryArgs)(`${n.baseURL}/${e.id}`,{context:"edit",source:e.origin}),a=await(0,FG.default)({path:i});if(!a){r.dispatch(Dn.store).createErrorNotice((0,st.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let l=({blocks:d=[]})=>(0,Wx.__unstableSerializeAndClean)(d),c=r.select(Co.store).getEditedEntityRecord("postType",e.type,e.id);r.dispatch(Co.store).editEntityRecord("postType",e.type,e.id,{content:l,blocks:c.blocks,source:"custom"},{undoIgnore:!0});let u=(0,Wx.parse)(a?.content?.raw);if(r.dispatch(Co.store).editEntityRecord("postType",e.type,a.id,{content:l,blocks:u,source:"theme"}),t){let d=()=>{r.dispatch(Co.store).editEntityRecord("postType",e.type,c.id,{content:l,blocks:c.blocks,source:"custom"})};r.dispatch(Dn.store).createSuccessNotice((0,st.__)("Template reset."),{type:"snackbar",id:o,actions:[{label:(0,st.__)("Undo"),onClick:d}]})}}catch(n){let i=n.message&&n.code!=="unknown_error"?n.message:(0,st.__)("Template revert failed. Please reload.");r.dispatch(Dn.store).createErrorNotice(i,{type:"snackbar"})}},dwe=e=>async({registry:t})=>{let r=e.every(n=>n?.has_theme_file),o=await Promise.allSettled(e.map(n=>t.dispatch(Co.store).deleteEntityRecord("postType",n.type,n.id,{force:!0},{throwOnError:!0})));if(o.every(({status:n})=>n==="fulfilled")){let n;if(e.length===1){let i;typeof e[0].title=="string"?i=e[0].title:typeof e[0].title?.rendered=="string"?i=e[0].title?.rendered:typeof e[0].title?.raw=="string"&&(i=e[0].title?.raw),n=r?(0,st.sprintf)((0,st.__)('"%s" reset.'),(0,e3.decodeEntities)(i)):(0,st.sprintf)((0,st._x)('"%s" deleted.',"template part"),(0,e3.decodeEntities)(i))}else n=r?(0,st.__)("Items reset."):(0,st.__)("Items deleted.");t.dispatch(Dn.store).createSuccessNotice(n,{type:"snackbar",id:"editor-template-deleted-success"})}else{let n;if(o.length===1)o[0].reason?.message?n=o[0].reason.message:n=r?(0,st.__)("An error occurred while reverting the item."):(0,st.__)("An error occurred while deleting the item.");else{let i=new Set,a=o.filter(({status:l})=>l==="rejected");for(let l of a)l.reason?.message&&i.add(l.reason.message);i.size===0?n=(0,st.__)("An error occurred while deleting the items."):i.size===1?n=r?(0,st.sprintf)((0,st.__)("An error occurred while reverting the items: %s"),[...i][0]):(0,st.sprintf)((0,st.__)("An error occurred while deleting the items: %s"),[...i][0]):n=r?(0,st.sprintf)((0,st.__)("Some errors occurred while reverting the items: %s"),[...i].join(",")):(0,st.sprintf)((0,st.__)("Some errors occurred while deleting the items: %s"),[...i].join(","))}t.dispatch(Dn.store).createErrorNotice(n,{type:"snackbar"})}},fwe=e=>({select:t,registry:r})=>{let o=t.getCurrentPostType(),n=r.select(Co.store).getCurrentTheme()?.stylesheet,i=r.select(Zf.store).get("core","renderingModes")?.[n]??{};if(i[o]===e)return;let a={[n]:{...i,[o]:e}};r.dispatch(Zf.store).set("core","renderingModes",a)};function mwe(e){return{type:"SET_STYLES_PATH",path:e}}function pwe(e){return{type:"SET_SHOW_STYLEBOOK",show:e}}function hwe(){return{type:"RESET_STYLES_NAVIGATION"}}function gwe(e){return{type:"SET_CANVAS_MIN_HEIGHT",minHeight:e}}function vwe(e){return{type:"SET_CURRENT_REVISION_ID",revisionId:e}}var ywe=e=>async({dispatch:t,select:r,registry:o})=>{let n=r.getCurrentPostType(),i=r.getCurrentPostId(),l=o.select(Co.store).getEntityConfig("postType",n)?.revisionKey||"id",c=await o.resolveSelect(Co.store).getRevisions("postType",n,i,qd(l,e));o.batch(()=>{t({type:"SET_REVISION_PAGE",page:e}),c?.length&&t.setCurrentRevisionId(c[0][l])})};function bwe(e){return{type:"SET_SHOW_REVISION_DIFF",showDiff:e}}var Swe=e=>async({select:t,dispatch:r,registry:o})=>{let n=t.getCurrentPostType(),i=t.getCurrentPostId(),l=o.select(Co.store).getEntityConfig("postType",n)?.revisionKey||"id",c=await o.resolveSelect(Co.store).getRevision("postType",n,i,e,{context:"edit",_fields:[...new Set(["id","date","modified","author","meta","title.raw","excerpt.raw","content.raw",l])].join()});if(!c)return;let u={blocks:void 0,content:c.content.raw};c.title?.raw!==void 0&&(u.title=c.title.raw),c.excerpt?.raw!==void 0&&(u.excerpt=c.excerpt.raw),c.meta!==void 0&&(u.meta=c.meta),r.editPost(u),r.setCurrentRevisionId(null),await r.savePost(),o.dispatch(Dn.store).createSuccessNotice((0,st.sprintf)((0,st.__)("Restored to revision from %s."),(0,Yx.dateI18n)((0,Yx.getSettings)().formats.datetime,c.date)),{type:"snackbar",id:"editor-revision-restored"})};function _we(e,t={focus:!1}){return{type:"SELECT_NOTE",noteId:e,options:t}}var Ay={reducer:LF,selectors:uO,actions:mO},w=(0,qx.createReduxStore)(WF,{...Ay});(0,qx.register)(w);N(w).registerPrivateActions(t3);N(w).registerPrivateSelectors(yO);var jG=s(C(),1),wwe=e=>(0,LG.createHigherOrderComponent)(t=>({attributes:r,setAttributes:o,...n})=>{let i=(0,DG.useSelect)(u=>u(w).getCurrentPostType(),[]),[a,l]=(0,BG.useEntityProp)("postType",i,"meta"),c=(0,MG.useMemo)(()=>({...r,...Object.fromEntries(Object.entries(e).map(([u,d])=>[u,a[d]]))}),[r,a]);return(0,jG.jsx)(t,{attributes:c,setAttributes:u=>{let d=Object.fromEntries(Object.entries(u??{}).filter(([f])=>f in e).map(([f,m])=>[e[f],m]));Object.entries(d).length&&l(d),o(u)},...n})},"withMetaAttributeSource");function xwe(e){let t=Object.fromEntries(Object.entries(e.attributes??{}).filter(([,{source:r}])=>r==="meta").map(([r,{meta:o}])=>[r,o]));return Object.entries(t).length&&(e.edit=wwe(t)(e.edit)),e}(0,VG.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",xwe);var tJ=s(mo(),1);var zG=s(D(),1),UG=s(O(),1),HG=s(W(),1),lc=s(C(),1);function Cwe(e){let t=e.avatar_urls&&e.avatar_urls[24]?(0,lc.jsx)("img",{className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}):(0,lc.jsx)("span",{className:"editor-autocompleters__no-avatar"});return(0,lc.jsxs)(lc.Fragment,{children:[t,(0,lc.jsx)("span",{className:"editor-autocompleters__user-name",children:e.name}),(0,lc.jsx)("span",{className:"editor-autocompleters__user-slug",children:e.slug})]})}var Zx={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",useItems(e){let t=(0,UG.useSelect)(o=>{let{getUsers:n}=o(HG.store);return n({context:"view",search:encodeURIComponent(e)})},[e]);return[(0,zG.useMemo)(()=>t?t.map(o=>({key:`user-${o.slug}`,value:o,label:Cwe(o)})):[],[t])]},getOptionCompletion(e){return`@${e.slug}`}};var GG=s(D(),1),WG=s(he(),1),Kx=s(O(),1),YG=s(W(),1);var Twe=class extends GG.Component{constructor(e){super(e),this.needsAutosave=!!(e.isDirty&&e.isAutosaveable)}componentDidMount(){this.props.disableIntervalChecks||this.setAutosaveTimer()}componentDidUpdate(e){if(this.props.disableIntervalChecks){this.props.editsReference!==e.editsReference&&this.props.autosave();return}if(this.props.interval!==e.interval&&(clearTimeout(this.timerId),this.setAutosaveTimer()),!this.props.isDirty){this.needsAutosave=!1;return}if(this.props.isAutosaving&&!e.isAutosaving){this.needsAutosave=!1;return}this.props.editsReference!==e.editsReference&&(this.needsAutosave=!0)}componentWillUnmount(){clearTimeout(this.timerId)}setAutosaveTimer(e=this.props.interval*1e3){this.timerId=setTimeout(()=>{this.autosaveTimerHandler()},e)}autosaveTimerHandler(){if(!this.props.isAutosaveable){this.setAutosaveTimer(1e3);return}this.needsAutosave&&(this.needsAutosave=!1,this.props.autosave()),this.setAutosaveTimer()}render(){return null}},Xx=(0,WG.compose)([(0,Kx.withSelect)((e,t)=>{let{getReferenceByDistinctEdits:r}=e(YG.store),{isEditedPostDirty:o,isEditedPostAutosaveable:n,isAutosavingPost:i,getEditorSettings:a}=e(w),{interval:l=a().autosaveInterval}=t;return{editsReference:r(),isDirty:o(),isAutosaveable:n(),isAutosaving:i(),interval:l}}),(0,Kx.withDispatch)((e,t)=>({autosave(){let{autosave:r=e(w).autosave}=t;r()}}))])(Twe);var Xu=s(E(),1),Wb=s(O(),1),ra=s(A(),1),Yb=s($(),1);var EW=s(yo(),1),RW=s(W(),1),AW=s(jI(),1),dC=s(D(),1),OW=s(he(),1),IW=s(ft(),1),NW=s(xh(),1);var r3=s(E(),1),ZG=s(O(),1),KG=s(W(),1);function Qx(e){let{isFrontPage:t,isPostsPage:r}=(0,ZG.useSelect)(o=>{let{canUser:n,getEditedEntityRecord:i}=o(KG.store),a=n("read",{kind:"root",name:"site"})?i("root","site"):void 0,l=parseInt(e,10);return{isFrontPage:a?.page_on_front===l,isPostsPage:a?.page_for_posts===l}});return t?(0,r3.__)("Homepage"):r?(0,r3.__)("Posts Page"):!1}var _W=s(A(),1),wW=s(yo(),1),cC=s(E(),1),Gb=s(O(),1);var uC=s(he(),1),xW=s(lt(),1);var mW=s(D(),1);var cc=s(A(),1),ea=s(E(),1),so=s($(),1),Xf=s(O(),1);var Gt=s(D(),1),iC=s(yo(),1),iW=s(Yd(),1),sW=s(W(),1);var Ht=s(E(),1),Ch=[{slug:"theme-colors",title:(0,Ht.__)("Theme Colors"),origin:"theme",type:"colors"},{slug:"theme-gradients",title:(0,Ht.__)("Theme Gradients"),origin:"theme",type:"gradients"},{slug:"custom-colors",title:(0,Ht.__)("Custom Colors"),origin:"custom",type:"colors"},{slug:"custom-gradients",title:(0,Ht.__)("Custom Gradients"),origin:"custom",type:"gradients"},{slug:"duotones",title:(0,Ht.__)("Duotones"),origin:"theme",type:"duotones"},{slug:"default-colors",title:(0,Ht.__)("Default Colors"),origin:"default",type:"colors"},{slug:"default-gradients",title:(0,Ht.__)("Default Gradients"),origin:"default",type:"gradients"}],Jx=[{slug:"site-identity",title:(0,Ht.__)("Site Identity"),blocks:["core/site-logo","core/site-title","core/site-tagline"]},{slug:"design",title:(0,Ht.__)("Design"),blocks:["core/navigation","core/avatar","core/post-time-to-read"],exclude:["core/home-link","core/navigation-link"]},{slug:"posts",title:(0,Ht.__)("Posts"),blocks:["core/post-title","core/post-excerpt","core/post-author","core/post-author-name","core/post-author-biography","core/post-date","core/post-terms","core/term-description","core/query-title","core/query-no-results","core/query-pagination","core/query-numbers"]},{slug:"comments",title:(0,Ht.__)("Comments"),blocks:["core/comments-title","core/comments-pagination","core/comments-pagination-numbers","core/comments","core/comments-author-name","core/comment-content","core/comment-date","core/comment-edit-link","core/comment-reply-link","core/comment-template","core/post-comments-count","core/post-comments-link"]}],o3=[{slug:"overview",title:(0,Ht.__)("Overview"),blocks:[]},{slug:"text",title:(0,Ht.__)("Text"),blocks:["core/post-content","core/home-link","core/navigation-link"]},{slug:"colors",title:(0,Ht.__)("Colors"),blocks:[]},{slug:"theme",title:(0,Ht.__)("Theme"),subcategories:Jx},{slug:"media",title:(0,Ht.__)("Media"),blocks:["core/post-featured-image"]},{slug:"widgets",title:(0,Ht.__)("Widgets"),blocks:[]},{slug:"embed",title:(0,Ht.__)("Embeds"),include:[]}],Pwe=[...Jx,{slug:"media",title:(0,Ht.__)("Media"),blocks:["core/post-featured-image"]},{slug:"widgets",title:(0,Ht.__)("Widgets"),blocks:[]},{slug:"embed",title:(0,Ht.__)("Embeds"),include:[]}],XG=[{slug:"overview",title:(0,Ht.__)("Overview"),blocks:[]},{slug:"text",title:(0,Ht.__)("Text"),blocks:["core/post-content","core/home-link","core/navigation-link"]},{slug:"colors",title:(0,Ht.__)("Colors"),blocks:[]},{slug:"blocks",title:(0,Ht.__)("All Blocks"),blocks:[],subcategories:Pwe}],kwe=`
	.is-root-container {
		display: flow-root;
	}
`,QG=`
	body {
		position: relative;
		padding: 32px !important;
	}

	${kwe}

	.editor-style-book__examples {
		max-width: 1200px;
		margin: 0 auto;
	}

	.editor-style-book__example {
	    max-width: 900px;
		border-radius: 2px;
		cursor: pointer;
		display: flex;
		flex-direction: column;
		gap: 40px;
		padding: 16px;
		width: 100%;
		box-sizing: border-box;
		scroll-margin-top: 32px;
		scroll-margin-bottom: 32px;
		margin: 0 auto 40px auto;
	}

	.editor-style-book__example.is-selected {
		box-shadow: 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
	}

	.editor-style-book__example.is-disabled-example {
		pointer-events: none;
	}

	.editor-style-book__example:focus:not(:disabled) {
		box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
		outline: 3px solid transparent;
	}

	.editor-style-book__duotone-example > div:first-child {
		display: flex;
		aspect-ratio: 16 / 9;
		grid-row: span 1;
		grid-column: span 2;
	}
	.editor-style-book__duotone-example img {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}
	.editor-style-book__duotone-example > div:not(:first-child) {
		height: 20px;
		border: 1px solid color-mix( in srgb, currentColor 10%, transparent );
	}

	.editor-style-book__color-example {
		border: 1px solid color-mix( in srgb, currentColor 10%, transparent );
	}

	.editor-style-book__subcategory-title,
	.editor-style-book__example-title {
		font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
		font-size: 13px;
		font-weight: normal;
		line-height: normal;
		margin: 0;
		text-align: left;
		padding-top: 8px;
		border-top: 1px solid color-mix( in srgb, currentColor 10%, transparent );
		color: color-mix( in srgb, currentColor 60%, transparent );
	}

	.editor-style-book__subcategory-title {
		font-size: 16px;
		margin-bottom: 40px;
    	padding-bottom: 8px;
	}

	.editor-style-book__example-preview {
		width: 100%;
	}

	.editor-style-book__example-preview .block-editor-block-list__insertion-point,
	.editor-style-book__example-preview .block-list-appender {
		display: none;
	}
	:where(.is-root-container > .wp-block:first-child) {
		margin-top: 0;
	}
	:where(.is-root-container > .wp-block:last-child) {
		margin-bottom: 0;
	}
`;var JG=s(Xe(),1);function Hb(e,t){if(!e?.slug||!t?.length)return;let r=e?.subcategories??[];if(r.length)return r.reduce((a,l)=>{let c=Hb(l,t);return c&&(a.subcategories||(a.subcategories=[]),a.subcategories=[...a.subcategories,c]),a},{title:e.title,slug:e.slug});let o=e?.blocks||[],n=e?.exclude||[],i=t.filter(a=>!n.includes(a.name)&&(a.category===e.slug||o.includes(a.name)));if(i.length)return{title:e.title,slug:e.slug,examples:i}}function n3(){let e=[...Jx,...o3].map(({slug:o})=>o),r=(0,JG.getCategories)().filter(({slug:o})=>!e.includes(o));return[...o3,...r]}var Ya=s(E(),1),jo=s(Xe(),1);var $G=s(A(),1),$x=s($(),1),i3=s(C(),1),Ewe=({colors:e,type:t,templateColumns:r="1fr 1fr",itemHeight:o="52px"})=>e?(0,i3.jsx)($G.__experimentalGrid,{templateColumns:r,rowGap:8,columnGap:16,children:e.map(n=>{let i=t==="gradients"?(0,$x.__experimentalGetGradientClass)(n.slug):(0,$x.getColorClassName)("background-color",n.slug),a=re("editor-style-book__color-example",i);return(0,i3.jsx)("div",{className:a,style:{height:o}},n.slug)})}):null,s3=Ewe;var a3=s(A(),1),Kf=s(C(),1),Rwe=({duotones:e})=>e?(0,Kf.jsx)(a3.__experimentalGrid,{columns:2,rowGap:16,columnGap:16,children:e.map(t=>(0,Kf.jsxs)(a3.__experimentalGrid,{className:"editor-style-book__duotone-example",columns:2,rowGap:8,columnGap:8,children:[(0,Kf.jsx)("div",{children:(0,Kf.jsx)("img",{alt:`Duotone example: ${t.slug}`,src:"https://s.w.org/images/core/5.3/MtBlanc1.jpg",style:{filter:`url(#wp-duotone-${t.slug})`}})}),t.colors.map(r=>(0,Kf.jsx)("div",{className:"editor-style-book__color-example",style:{backgroundColor:r}},r))]},t.slug))}):null,eW=Rwe;var eC=s(C(),1);function Awe(e){if(!e)return[];let t=[];return Ch.forEach(r=>{let o=e[r.type],n=Array.isArray(o)?o.find(i=>i.slug===r.origin):void 0;if(n?.[r.type]){let i={name:r.slug,title:r.title,category:"colors"};r.type==="duotones"?(i.content=(0,eC.jsx)(eW,{duotones:n[r.type]}),t.push(i)):(i.content=(0,eC.jsx)(s3,{colors:n[r.type],type:r.type}),t.push(i))}}),t}function Owe(e){let t=[],r=Array.isArray(e?.colors)?e.colors.find(i=>i.slug==="theme"):void 0;if(r){let i={name:"theme-colors",title:(0,Ya.__)("Colors"),category:"overview",content:(0,eC.jsx)(s3,{colors:r.colors,type:"colors",templateColumns:"repeat(auto-fill, minmax( 200px, 1fr ))",itemHeight:"32px"})};t.push(i)}let o=[];if((0,jo.getBlockType)("core/heading")){let i=(0,jo.createBlock)("core/heading",{content:(0,Ya.__)("AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789X{(\u2026)},.-<>?!*&:/A@HELFO\u2122\xA9"),level:1});o.push(i)}if((0,jo.getBlockType)("core/paragraph")){let i=(0,jo.createBlock)("core/paragraph",{content:(0,Ya.__)("A paragraph in a website refers to a distinct block of text that is used to present and organize information. It is a fundamental unit of content in web design and is typically composed of a group of related sentences or thoughts focused on a particular topic or idea. Paragraphs play a crucial role in improving the readability and user experience of a website. They break down the text into smaller, manageable chunks, allowing readers to scan the content more easily.")}),a=(0,jo.createBlock)("core/paragraph",{content:(0,Ya.__)("Additionally, paragraphs help structure the flow of information and provide logical breaks between different concepts or pieces of information. In terms of formatting, paragraphs in websites are commonly denoted by a vertical gap or indentation between each block of text. This visual separation helps visually distinguish one paragraph from another, creating a clear and organized layout that guides the reader through the content smoothly.")});if((0,jo.getBlockType)("core/group")){let l=(0,jo.createBlock)("core/group",{layout:{type:"grid",columnCount:2,minimumColumnWidth:"12rem"},style:{spacing:{blockGap:"1.5rem"}}},[i,a]);o.push(l)}else o.push(i)}return o.length&&t.push({name:"typography",title:(0,Ya.__)("Typography"),category:"overview",blocks:o}),["core/image","core/separator","core/buttons","core/pullquote","core/search"].forEach(i=>{let a=(0,jo.getBlockType)(i);if(a&&a.example){let l={name:i,title:a.title,category:"overview",blocks:(0,jo.getBlockFromExample)(i,{...a.example,attributes:{...a.example.attributes,style:void 0}})};t.push(l)}}),t}function l3(e){let t=(0,jo.getBlockTypes)().filter(a=>{let{name:l,example:c,supports:u}=a;return l!=="core/heading"&&!!c&&u?.inserter!==!1}).map(a=>({name:a.name,title:a.title,category:a.category,blocks:(0,jo.getBlockFromExample)(a.name,{...a.example,attributes:{...a.example.attributes,style:void 0}})}));if(!!!(0,jo.getBlockType)("core/heading"))return t;let o={name:"core/heading",title:(0,Ya.__)("Headings"),category:"text",blocks:[1,2,3,4,5,6].map(a=>(0,jo.createBlock)("core/heading",{content:(0,Ya.sprintf)((0,Ya.__)("Heading %d"),a),level:a}))},n=Awe(e),i=Owe(e);return[o,...n,...t,...i]}var nW=s(D(),1),rC=s(O(),1);var tC=s(Xe(),1),tW=s(O(),1),rW=s(D(),1);function Th(e={},t=!1){let o=Q6("spacing.blockGap")!==null,n=!o,{disableLayoutStyles:i,getBlockStyles:a}=(0,tW.useSelect)(l=>{let{getEditorSettings:c}=l(w),{getBlockStyles:u}=l(tC.store);return{disableLayoutStyles:!!c()?.disableLayoutStyles,getBlockStyles:u}},[]);return(0,rW.useMemo)(()=>{if(!e?.styles||!e?.settings)return[[],{}];let l=(0,tC.getBlockTypes)();return jy(e,l,{hasBlockGapSupport:o,hasFallbackGapSupport:n,disableLayoutStyles:i,disableRootPadding:t,getBlockStyles:a})},[o,n,e,i,t,a])}function oW(e=!1){let{merged:t}=xo();return Th(t,e)}function Iwe(e){let[t,r]=oW(e),{getEditorSettings:o}=(0,rC.useSelect)(w),{updateEditorSettings:n}=(0,rC.useDispatch)(w);(0,nW.useEffect)(()=>{if(!t||!r)return;let i=o(),a=Object.values(i.styles??[]).filter(l=>!l.isGlobalStyles);n({...i,styles:[...a,...t],__experimentalFeatures:r})},[t,r,n,o])}function oC({disableRootPadding:e}){return Iwe(e),null}var ot=s(C(),1),{ExperimentalBlockEditorProvider:Nwe}=N(so.privateApis),{Tabs:nC}=N(cc.privateApis);function Wu(e){return!e||Object.keys(e).length===0}var Fwe=(e,t)=>{if(!e||!t||!t?.contentDocument)return;let r=e==="top"?t.contentDocument.body:t.contentDocument.getElementById(e);r&&r.scrollIntoView({behavior:"smooth"})},aW=e=>e&&typeof e=="string"&&(e==="/"||e.startsWith("/typography")||e.startsWith("/colors")||e.startsWith("/blocks"))?{top:!0}:null;function lW(){let{colors:e,gradients:t}=(0,so.__experimentalUseMultipleOriginColorsAndGradients)(),[r,o,n,i]=(0,so.useSettings)("color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default");return(0,Gt.useMemo)(()=>{let l={colors:e,gradients:t,duotones:[]};return n&&n.length&&l.duotones.push({name:(0,ea._x)("Theme","Indicates these duotone filters come from the theme."),slug:"theme",duotones:n}),r&&i&&i.length&&l.duotones.push({name:(0,ea._x)("Default","Indicates these duotone filters come from WordPress."),slug:"default",duotones:i}),o&&o.length&&l.duotones.push({name:(0,ea._x)("Custom","Indicates these doutone filters are created by the user."),slug:"custom",duotones:o}),l},[e,t,o,n,i,r])}function cW(e){let t=[],r=Hb({slug:"overview"},e);t.push(...r.examples);let o=e.filter(n=>n.category!=="overview"&&!r.examples.find(i=>i.name===n.name));return t.push(...o),t}function Dwe(e,t){return t?e.map(r=>({...r,variation:t,blocks:Array.isArray(r.blocks)?r.blocks.map(o=>({...o,attributes:{...o.attributes,style:void 0,className:`is-style-${t}`}})):{...r.blocks,attributes:{...r.blocks.attributes,style:void 0,className:`is-style-${t}`}}})):e}function Bwe({isSelected:e,onClick:t,onSelect:r,showTabs:o=!0,userConfig:n={},path:i=""},a){let l=Hu("color.text"),c=Hu("color.background"),u=lW(),d=(0,Gt.useMemo)(()=>l3(u),[u]),f=(0,Gt.useMemo)(()=>n3().filter(S=>d.some(x=>x.category===S.slug)),[d]),m=cW(d),{base:h}=xo(),g=aW(i),v=(0,Gt.useMemo)(()=>!Wu(n)&&!Wu(h)?go(h,n):{},[h,n]),y=(0,Xf.useSelect)(S=>S(so.store).getSettings(),[]),[b]=Th(v),_=(0,Gt.useMemo)(()=>({...y,styles:!Wu(b)&&!Wu(n)?b:y.styles,isPreviewMode:!0}),[b,y,n]);return(0,ot.jsx)("div",{ref:a,className:re("editor-style-book",{"is-button":!!t}),style:{color:l,background:c},children:o?(0,ot.jsxs)(nC,{children:[(0,ot.jsx)("div",{className:"editor-style-book__tablist-container",children:(0,ot.jsx)(nC.TabList,{children:f.map(S=>(0,ot.jsx)(nC.Tab,{tabId:S.slug,children:S.title},S.slug))})}),f.map(S=>{let x=S.slug?n3().find(R=>R.slug===S.slug):null,T=x?Hb(x,d):{examples:d};return(0,ot.jsx)(nC.TabPanel,{tabId:S.slug,focusable:!1,className:"editor-style-book__tabpanel",children:(0,ot.jsx)(c3,{category:S.slug,examples:T,isSelected:e,onSelect:r,settings:_,title:S.title,goTo:g})},S.slug)})]}):(0,ot.jsx)(c3,{examples:{examples:m},isSelected:e,onClick:t,onSelect:r,settings:_,goTo:g})})}var uW=({userConfig:e={},isStatic:t=!1,path:r,onPathChange:o,settings:n})=>{let i=(0,Xf.useSelect)(L=>n??L(w).getEditorSettings(),[n]),a=(0,Xf.useSelect)(L=>L(sW.store).canUser("create",{kind:"postType",name:"attachment"}),[]);(0,Gt.useEffect)(()=>{(0,Xf.dispatch)(so.store).updateSettings({...i,mediaUpload:a?iW.uploadMedia:void 0})},[i,a]);let[l,c]=(0,Gt.useState)("/"),u=r??l,d=o??c,f=L=>u===`/blocks/${encodeURIComponent(L)}`||u.startsWith(`/blocks/${encodeURIComponent(L)}/`),m=(L,M=!1)=>{if(Ch.find(k=>k.slug===L)){d("/colors/palette");return}if(L==="typography"){d("/typography");return}M||d(`/blocks/${encodeURIComponent(L)}`)},h=lW(),g=l3(h),v=cW(g),y=null,b=null;if(u.includes("/colors"))y="colors";else if(u.includes("/typography"))y="text";else if(u.includes("/blocks")){y="blocks";let L=decodeURIComponent(u).split("/blocks/")[1];L?.includes("/variations")&&([L,b]=L.split("/variations/")),L&&g.find(M=>M.name===L)&&(y=L)}else t||(y="overview");let _=XG.find(L=>L.slug===y),S=(0,Gt.useMemo)(()=>_?Hb(_,g):{examples:[g.find(L=>L.name===y)]},[_,g,y]),x=(0,Gt.useMemo)(()=>y?b?{examples:Dwe(S.examples,b)}:S:{examples:v},[y,v,b,S]),{base:T}=xo(),R=aW(u),F=(0,Gt.useMemo)(()=>!Wu(e)&&!Wu(T)?go(T,e):{},[T,e]),[B]=Th(F),z=(0,Gt.useMemo)(()=>({...i,styles:!Wu(B)&&!Wu(e)?B:i.styles,isPreviewMode:!0}),[B,i,e]);return(0,ot.jsx)("div",{className:"editor-style-book",children:(0,ot.jsxs)(so.BlockEditorProvider,{settings:z,children:[(0,ot.jsx)(oC,{disableRootPadding:!0}),(0,ot.jsx)(c3,{examples:x,settings:z,goTo:R,isSelected:t?null:f,onSelect:t?null:m})]})})},c3=({examples:e,isSelected:t,onClick:r,onSelect:o,settings:n,title:i,goTo:a})=>{let[l,c]=(0,Gt.useState)(!1),[u,d]=(0,Gt.useState)(!1),f=(0,Gt.useRef)(null),m={role:"button",onFocus:()=>c(!0),onBlur:()=>c(!1),onKeyDown:g=>{if(g.defaultPrevented)return;let{keyCode:v}=g;r&&(v===iC.ENTER||v===iC.SPACE)&&(g.preventDefault(),r(g))},onClick:g=>{g.defaultPrevented||r&&(g.preventDefault(),r(g))},readonly:!0},h=()=>d(!0);return(0,Gt.useLayoutEffect)(()=>{u&&f.current&&a?.top&&Fwe("top",f.current)},[a?.top,u]),(0,ot.jsxs)(so.__unstableIframe,{onLoad:h,ref:f,className:re("editor-style-book__iframe",{"is-focused":l&&!!r,"is-button":!!r}),name:"style-book-canvas",tabIndex:0,...r?m:{},children:[(0,ot.jsx)(so.__unstableEditorStyles,{styles:n.styles}),(0,ot.jsxs)("style",{children:[QG,!!r&&"body { cursor: pointer; } body * { pointer-events: none; }"]}),(0,ot.jsx)(Mwe,{className:"editor-style-book__examples",filteredExamples:e,label:i?(0,ea.sprintf)((0,ea.__)("Examples of blocks in the %s category"),i):(0,ea.__)("Examples of blocks"),isSelected:t,onSelect:o},i)]})},Mwe=(0,Gt.memo)(({className:e,filteredExamples:t,label:r,isSelected:o,onSelect:n})=>(0,ot.jsxs)(cc.Composite,{orientation:"vertical",className:e,"aria-label":r,role:"grid",children:[!!t?.examples?.length&&t.examples.map(i=>(0,ot.jsx)(dW,{id:`example-${i.name}`,title:i.title,content:i.content,blocks:i.blocks,isSelected:o?.(i.name),onClick:n?()=>n(i.name,!!i.variation):null},i.name)),!!t?.subcategories?.length&&t.subcategories.map(i=>(0,ot.jsxs)(cc.Composite.Group,{className:"editor-style-book__subcategory",children:[(0,ot.jsx)(cc.Composite.GroupLabel,{children:(0,ot.jsx)("h2",{className:"editor-style-book__subcategory-title",children:i.title})}),(0,ot.jsx)(Lwe,{examples:i.examples,isSelected:o,onSelect:n})]},`subcategory-${i.slug}`))]})),Lwe=({examples:e,isSelected:t,onSelect:r})=>!!e?.length&&e.map(o=>(0,ot.jsx)(dW,{id:`example-${o.name}`,title:o.title,content:o.content,blocks:o.blocks,isSelected:t?.(o.name),onClick:r?()=>r(o.name):null},o.name)),Vwe=["example-duotones"],dW=({id:e,title:t,blocks:r,isSelected:o,onClick:n,content:i})=>{let a=(0,Xf.useSelect)(d=>d(so.store).getSettings(),[]),l=(0,Gt.useMemo)(()=>({...a,focusMode:!1,isPreviewMode:!0}),[a]),c=(0,Gt.useMemo)(()=>Array.isArray(r)?r:[r],[r]),u=Vwe.includes(e)||!n?{disabled:!0,accessibleWhenDisabled:!!n}:{};return(0,ot.jsx)("div",{role:"row",children:(0,ot.jsx)("div",{role:"gridcell",children:(0,ot.jsxs)(cc.Composite.Item,{className:re("editor-style-book__example",{"is-selected":o,"is-disabled-example":!!u?.disabled}),id:e,"aria-label":n?(0,ea.sprintf)((0,ea.__)("Open %s styles in Styles panel"),t):void 0,render:(0,ot.jsx)("div",{}),role:n?"button":null,onClick:n,...u,children:[(0,ot.jsx)("span",{className:"editor-style-book__example-title",children:t}),(0,ot.jsx)("div",{className:"editor-style-book__example-preview","aria-hidden":!0,children:(0,ot.jsx)(cc.Disabled,{className:"editor-style-book__example-preview__content",children:i||(0,ot.jsxs)(Nwe,{value:c,settings:l,children:[(0,ot.jsx)(so.__unstableEditorStyles,{}),(0,ot.jsx)(so.BlockList,{renderAppender:!1})]})})})]})})})},fW=(0,Gt.forwardRef)(Bwe);var pW=s(C(),1);function jwe({path:e,onPathChange:t},r){return(0,pW.jsx)(fW,{ref:r,isSelected:o=>e===`/blocks/${encodeURIComponent(o)}`||e?.startsWith(`/blocks/${encodeURIComponent(o)}/`),onSelect:o=>{if(Ch.find(n=>n.slug===o)){t?.("/colors/palette");return}if(o==="typography"){t?.("/typography");return}t?.("/blocks/"+encodeURIComponent(o))}})}var hW=(0,mW.forwardRef)(jwe);var gW=s(A(),1),ta=s($(),1),u3=s(O(),1),Yu=s(D(),1);var uc=s(C(),1),{ExperimentalBlockEditorProvider:zwe,__unstableBlockStyleVariationOverridesWithConfig:Uwe}=N(ta.privateApis);function sC(e){return!e||Object.keys(e).length===0}function Hwe({path:e},t){let r=(0,u3.useSelect)(y=>y(ta.store).getBlocks(),[]),{user:o,base:n}=xo(),{revisions:i,isLoading:a}=Lb(),l=(0,Yu.useMemo)(()=>{let y=e?.match(/^\/revisions\/(.+)$/);return y?y[1]:null},[e]),u=(0,Yu.useMemo)(()=>!l||!i.length?null:i.find(y=>String(y.id)===String(l)),[l,i])||o,d=(0,Yu.useMemo)(()=>!sC(u)&&!sC(n)?go(n,u):{},[n,u]),f=(0,Yu.useMemo)(()=>Array.isArray(r)?r:[r],[r]),m=(0,u3.useSelect)(y=>y(ta.store).getSettings(),[]),h=(0,Yu.useMemo)(()=>({...m,isPreviewMode:!0}),[m]),[g]=Th(d),v=!sC(g)&&!sC(u)?g:h.styles;return a?null:(0,uc.jsxs)(ta.__unstableIframe,{ref:t,className:"editor-revisions__iframe",name:"revisions",tabIndex:0,children:[(0,uc.jsx)("style",{children:".is-root-container { display: flow-root; }"}),(0,uc.jsx)(gW.Disabled,{className:"editor-revisions__example-preview__content",children:(0,uc.jsxs)(zwe,{value:f,settings:h,children:[(0,uc.jsx)(ta.BlockList,{renderAppender:!1}),(0,uc.jsx)(ta.__unstableEditorStyles,{styles:v}),(0,uc.jsx)(Uwe,{config:d})]})})]})}var vW=(0,Yu.forwardRef)(Hwe);var kh=s(D(),1),SW=s(A(),1);var aC=s(E(),1),qu=s(yo(),1),Ph=s(A(),1),Zu=s(C(),1),yW=20;function d3({direction:e,resizeWidthBy:t}){function r(i){let{keyCode:a}=i;a!==qu.LEFT&&a!==qu.RIGHT||(i.preventDefault(),e==="left"&&a===qu.LEFT||e==="right"&&a===qu.RIGHT?t(yW):(e==="left"&&a===qu.RIGHT||e==="right"&&a===qu.LEFT)&&t(-yW))}let o={active:{opacity:1,scaleY:1.3}},n=`resizable-editor__resize-help-${e}`;return(0,Zu.jsxs)(Zu.Fragment,{children:[(0,Zu.jsx)(Ph.Tooltip,{text:(0,aC.__)("Drag to resize"),children:(0,Zu.jsx)(Ph.__unstableMotion.button,{className:`editor-resizable-editor__resize-handle is-${e}`,"aria-label":(0,aC.__)("Drag to resize"),"aria-describedby":n,onKeyDown:r,variants:o,whileFocus:"active",whileHover:"active",whileTap:"active",role:"separator","aria-orientation":"vertical"},"handle")}),(0,Zu.jsx)(Ph.VisuallyHidden,{id:n,children:(0,aC.__)("Use left and right arrow keys to resize the canvas.")})]})}var lC=s(C(),1),bW={position:void 0,userSelect:void 0,cursor:void 0,width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0};function Gwe({className:e,enableResizing:t,height:r,children:o}){let[n,i]=(0,kh.useState)("100%"),a=(0,kh.useRef)(),l=(0,kh.useCallback)(c=>{a.current&&i(a.current.offsetWidth+c)},[]);return(0,lC.jsx)(SW.ResizableBox,{className:re("editor-resizable-editor",e,{"is-resizable":t}),ref:c=>{a.current=c?.resizable},size:{width:t?n:"100%",height:t&&r?r:"100%"},onResizeStop:(c,u,d)=>{i(d.style.width)},minWidth:300,maxWidth:"100%",maxHeight:"100%",enable:{left:t,right:t},showHandle:t,resizeRatio:2,handleComponent:{left:(0,lC.jsx)(d3,{direction:"left",resizeWidthBy:l}),right:(0,lC.jsx)(d3,{direction:"right",resizeWidthBy:l})},handleClasses:void 0,handleStyles:{left:bW,right:bW},children:o})}var Eh=Gwe;var Ku=s(C(),1);function f3(e,t){return t?(0,cC.__)("Style Book"):e?.startsWith("/revisions")?(0,cC.__)("Style Revisions"):""}function CW(){let{stylesPath:e,showStylebook:t,showListViewByDefault:r}=(0,Gb.useSelect)(m=>{let{getStylesPath:h,getShowStylebook:g}=N(m(w)),v=m(xW.store).get("core","showListViewByDefault");return{stylesPath:h(),showStylebook:g(),showListViewByDefault:v}},[]),{resetStylesNavigation:o,setStylesPath:n}=N((0,Gb.useDispatch)(w)),{setIsListViewOpened:i}=(0,Gb.useDispatch)(w),a=(0,uC.useFocusOnMount)("firstElement"),l=(0,uC.useFocusReturn)(),c=null;t?c=(0,Ku.jsx)(hW,{path:e,onPathChange:n,ref:l}):e?.startsWith("/revisions")&&(c=(0,Ku.jsx)(vW,{path:e,ref:l}));let u=f3(e,t),d=()=>{i(r),o()};return(0,Ku.jsx)("div",{className:"editor-styles-canvas",children:(0,Ku.jsx)(Eh,{enableResizing:!1,children:(0,Ku.jsxs)("section",{className:"editor-styles-canvas__section",ref:a,onKeyDown:m=>{m.keyCode===wW.ESCAPE&&!m.defaultPrevented&&(m.preventDefault(),d())},"aria-label":u,children:[(0,Ku.jsx)(_W.Button,{size:"compact",className:"editor-styles-canvas__close-button",icon:Kn,label:(0,cC.__)("Close"),onClick:d}),c]})})})}var TW=s(O(),1),m3=s(ft(),1),p3=s($(),1),PW=s(W(),1);function kW(){return(0,TW.useSelect)(e=>{let{getBlockAttributes:t,getBlockName:r,__experimentalGetParsedPattern:o}=e(p3.store),{getEditedEntityRecord:n,getCurrentTheme:i}=e(PW.store),{getEditedContentOnlySection:a}=N(e(p3.store)),l=a();if(!l)return null;let c=t(l),u=c?.metadata?.patternName;if(u){let f=typeof o=="function"?o(u):null;return{patternName:u,patternTitle:f?.title||c?.metadata?.name,type:"pattern"}}let d=r(l);if(d==="core/block"&&c?.ref){let f=n("postType","wp_block",c.ref);if(f?.title)return{patternName:c.ref,patternTitle:(0,m3.decodeEntities)(f.title),type:"synced-pattern"}}if(d==="core/template-part"&&c?.slug){let f=c.theme||i()?.stylesheet,m=f?`${f}//${c.slug}`:null;if(m){let h=n("postType","wp_template_part",m);if(h?.title)return{patternName:c.slug,patternTitle:(0,m3.decodeEntities)(h.title),type:"template-part"}}}return null},[])}var ln=s(C(),1),Wwe=ra.__unstableMotion.create(ra.Button);function fC(e){let{stopEditingContentOnlySection:t}=N((0,Wb.useDispatch)(Yb.store)),r=kW(),{postId:o,postType:n,postTypeLabel:i,documentTitle:a,isNotFound:l,templateTitle:c,onNavigateToPreviousEntityRecord:u,isTemplatePreview:d,stylesCanvasTitle:f}=(0,Wb.useSelect)(R=>{let{getCurrentPostType:F,getCurrentPostId:B,getEditorSettings:z,getRenderingMode:L}=R(w),{getEditedEntityRecord:M,getPostType:k,getCurrentTheme:I,isResolving:U}=R(RW.store),G=F(),Y=B(),Z=M("postType",G,Y),{default_template_types:V=[]}=I()??{},j=Zi({templateTypes:V,template:Z}),H=k(G)?.labels?.singular_name,{getStylesPath:X,getShowStylebook:ae}=N(R(w)),ne=X(),ue=ae(),Ye=f3(ne,ue);return{postId:Y,postType:G,postTypeLabel:H,documentTitle:Z.title,isNotFound:!Z&&!U("getEditedEntityRecord","postType",G,Y),templateTitle:j.title,onNavigateToPreviousEntityRecord:z().onNavigateToPreviousEntityRecord,isTemplatePreview:L()==="template-locked",stylesCanvasTitle:Ye}},[]),{open:m}=(0,Wb.useDispatch)(AW.store),h=(0,OW.useReducedMotion)(),g=sR.includes(n),v=!!u||!!r,y=g?c:a,b=r?.patternTitle||e.title||f||y,_=e.icon,S=R=>{R.stopPropagation(),r?t():u&&u()},x=Qx(o),T=(0,dC.useRef)(!1);return(0,dC.useEffect)(()=>{T.current=!0},[]),(0,ln.jsxs)("div",{className:re("editor-document-bar",{"has-back-button":v}),children:[(0,ln.jsx)(ra.__unstableAnimatePresence,{children:v&&(0,ln.jsx)(Wwe,{className:"editor-document-bar__back",icon:(0,Xu.isRTL)()?CR:_R,onClick:S,size:"compact",initial:T.current?{opacity:0,transform:"translateX(15%)"}:!1,animate:{opacity:1,transform:"translateX(0%)"},exit:{opacity:0,transform:"translateX(15%)"},transition:h?{duration:0}:void 0,children:(0,Xu.__)("Back")})}),!g&&d&&!v&&(0,ln.jsx)(Yb.BlockIcon,{icon:Bs,className:"editor-document-bar__icon-layout"}),l?(0,ln.jsx)(ra.__experimentalText,{children:(0,Xu.__)("Document not found")}):(0,ln.jsxs)(ra.Button,{className:"editor-document-bar__command",onClick:()=>m(),size:"compact",children:[(0,ln.jsxs)(ra.__unstableMotion.div,{className:"editor-document-bar__title",initial:T.current?{opacity:0,transform:v?"translateX(15%)":"translateX(-15%)"}:!1,animate:{opacity:1,transform:"translateX(0%)"},transition:h?{duration:0}:void 0,children:[_&&(0,ln.jsx)(Yb.BlockIcon,{icon:_}),(0,ln.jsxs)(ra.__experimentalText,{size:"body",as:"h1",children:[(0,ln.jsx)("span",{className:"editor-document-bar__post-title",children:b?(0,NW.__unstableStripHTML)(b):(0,Xu.__)("No title")}),r&&(0,ln.jsx)("span",{className:"editor-document-bar__post-type-label",children:r.type==="template-part"?`\xB7 ${(0,Xu.__)("Template Part")}`:`\xB7 ${(0,Xu.__)("Pattern")}`}),!r&&x&&(0,ln.jsx)("span",{className:"editor-document-bar__post-type-label",children:`\xB7 ${x}`}),!r&&i&&!e.title&&!x&&(0,ln.jsx)("span",{className:"editor-document-bar__post-type-label",children:`\xB7 ${(0,IW.decodeEntities)(i)}`})]})]},v),(0,ln.jsx)("span",{className:"editor-document-bar__shortcut",children:EW.displayShortcut.primary("k")})]})]})}var Jf=s(E(),1),Rh=s(O(),1),pC=s(D(),1),hC=s(Wy(),1),mC=s($(),1),FW=s(W(),1),To=s(A(),1);var Qf=s(C(),1),Ywe=({children:e,isValid:t,isDisabled:r,level:o,href:n,onSelect:i})=>{function a(l){if(r){l.preventDefault();return}i()}return(0,Qf.jsx)("li",{className:re("document-outline__item",`is-${o.toLowerCase()}`,{"is-invalid":!t,"is-disabled":r}),children:(0,Qf.jsxs)("a",{href:n,className:"document-outline__button","aria-disabled":r,onClick:a,children:[(0,Qf.jsx)("span",{className:"document-outline__emdash","aria-hidden":"true"}),(0,Qf.jsx)("strong",{className:"document-outline__level",children:o}),(0,Qf.jsx)("span",{className:"document-outline__item-content",children:e})]})})},h3=Ywe;var Ct=s(C(),1),qwe=(0,Ct.jsx)("em",{children:(0,Jf.__)("(Empty heading)")}),Zwe=[(0,Ct.jsx)("br",{},"incorrect-break"),(0,Ct.jsx)("em",{children:(0,Jf.__)("(Incorrect heading level)")},"incorrect-message")],Kwe=[(0,Ct.jsx)("br",{},"incorrect-break-h1"),(0,Ct.jsx)("em",{children:(0,Jf.__)("(Your theme may already use a H1 for the post title)")},"incorrect-message-h1")],Xwe=[(0,Ct.jsx)("br",{},"incorrect-break-multiple-h1"),(0,Ct.jsx)("em",{children:(0,Jf.__)("(Multiple H1 headings are not recommended)")},"incorrect-message-multiple-h1")];function Qwe(){return(0,Ct.jsxs)(To.SVG,{width:"138",height:"148",viewBox:"0 0 138 148",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ct.jsx)(To.Rect,{width:"138",height:"148",rx:"4",fill:"#F0F6FC"}),(0,Ct.jsx)(To.Line,{x1:"44",y1:"28",x2:"24",y2:"28",stroke:"#DDDDDD"}),(0,Ct.jsx)(To.Rect,{x:"48",y:"16",width:"27",height:"23",rx:"4",fill:"#DDDDDD"}),(0,Ct.jsx)(To.Path,{d:"M54.7585 32V23.2727H56.6037V26.8736H60.3494V23.2727H62.1903V32H60.3494V28.3949H56.6037V32H54.7585ZM67.4574 23.2727V32H65.6122V25.0241H65.5611L63.5625 26.277V24.6406L65.723 23.2727H67.4574Z",fill:"black"}),(0,Ct.jsx)(To.Line,{x1:"55",y1:"59",x2:"24",y2:"59",stroke:"#DDDDDD"}),(0,Ct.jsx)(To.Rect,{x:"59",y:"47",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,Ct.jsx)(To.Path,{d:"M65.7585 63V54.2727H67.6037V57.8736H71.3494V54.2727H73.1903V63H71.3494V59.3949H67.6037V63H65.7585ZM74.6605 63V61.6705L77.767 58.794C78.0313 58.5384 78.2528 58.3082 78.4318 58.1037C78.6136 57.8991 78.7514 57.6989 78.8452 57.5028C78.9389 57.304 78.9858 57.0895 78.9858 56.8594C78.9858 56.6037 78.9276 56.3835 78.8111 56.1989C78.6946 56.0114 78.5355 55.8679 78.3338 55.7685C78.1321 55.6662 77.9034 55.6151 77.6477 55.6151C77.3807 55.6151 77.1477 55.669 76.9489 55.777C76.75 55.8849 76.5966 56.0398 76.4886 56.2415C76.3807 56.4432 76.3267 56.6832 76.3267 56.9616H74.5753C74.5753 56.3906 74.7045 55.8949 74.9631 55.4744C75.2216 55.054 75.5838 54.7287 76.0497 54.4986C76.5156 54.2685 77.0526 54.1534 77.6605 54.1534C78.2855 54.1534 78.8295 54.2642 79.2926 54.4858C79.7585 54.7045 80.1207 55.0085 80.3793 55.3977C80.6378 55.7869 80.767 56.233 80.767 56.7358C80.767 57.0653 80.7017 57.3906 80.571 57.7116C80.4432 58.0327 80.2145 58.3892 79.8849 58.7812C79.5554 59.1705 79.0909 59.6378 78.4915 60.1832L77.2173 61.4318V61.4915H80.8821V63H74.6605Z",fill:"black"}),(0,Ct.jsx)(To.Line,{x1:"80",y1:"90",x2:"24",y2:"90",stroke:"#DDDDDD"}),(0,Ct.jsx)(To.Rect,{x:"84",y:"78",width:"30",height:"23",rx:"4",fill:"#F0B849"}),(0,Ct.jsx)(To.Path,{d:"M90.7585 94V85.2727H92.6037V88.8736H96.3494V85.2727H98.1903V94H96.3494V90.3949H92.6037V94H90.7585ZM99.5284 92.4659V91.0128L103.172 85.2727H104.425V87.2841H103.683L101.386 90.919V90.9872H106.564V92.4659H99.5284ZM103.717 94V92.0227L103.751 91.3793V85.2727H105.482V94H103.717Z",fill:"black"}),(0,Ct.jsx)(To.Line,{x1:"66",y1:"121",x2:"24",y2:"121",stroke:"#DDDDDD"}),(0,Ct.jsx)(To.Rect,{x:"70",y:"109",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,Ct.jsx)(To.Path,{d:"M76.7585 125V116.273H78.6037V119.874H82.3494V116.273H84.1903V125H82.3494V121.395H78.6037V125H76.7585ZM88.8864 125.119C88.25 125.119 87.6832 125.01 87.1861 124.791C86.6918 124.57 86.3011 124.266 86.0142 123.879C85.7301 123.49 85.5838 123.041 85.5753 122.533H87.4332C87.4446 122.746 87.5142 122.933 87.642 123.095C87.7727 123.254 87.946 123.378 88.1619 123.466C88.3778 123.554 88.6207 123.598 88.8906 123.598C89.1719 123.598 89.4205 123.548 89.6364 123.449C89.8523 123.349 90.0213 123.212 90.1435 123.036C90.2656 122.859 90.3267 122.656 90.3267 122.426C90.3267 122.193 90.2614 121.987 90.1307 121.808C90.0028 121.626 89.8182 121.484 89.5767 121.382C89.3381 121.28 89.054 121.229 88.7244 121.229H87.9105V119.874H88.7244C89.0028 119.874 89.2486 119.825 89.4616 119.729C89.6776 119.632 89.8452 119.499 89.9645 119.328C90.0838 119.155 90.1435 118.953 90.1435 118.723C90.1435 118.504 90.0909 118.312 89.9858 118.148C89.8835 117.98 89.7386 117.849 89.5511 117.756C89.3665 117.662 89.1506 117.615 88.9034 117.615C88.6534 117.615 88.4247 117.661 88.2173 117.751C88.0099 117.839 87.8438 117.966 87.7188 118.131C87.5938 118.295 87.527 118.489 87.5185 118.71H85.75C85.7585 118.207 85.902 117.764 86.1804 117.381C86.4588 116.997 86.8338 116.697 87.3054 116.482C87.7798 116.263 88.3153 116.153 88.9119 116.153C89.5142 116.153 90.0412 116.263 90.4929 116.482C90.9446 116.7 91.2955 116.996 91.5455 117.368C91.7983 117.737 91.9233 118.152 91.9205 118.612C91.9233 119.101 91.7713 119.509 91.4645 119.835C91.1605 120.162 90.7642 120.369 90.2756 120.457V120.526C90.9176 120.608 91.4063 120.831 91.7415 121.195C92.0795 121.555 92.2472 122.007 92.2443 122.55C92.2472 123.047 92.1037 123.489 91.8139 123.875C91.527 124.261 91.1307 124.565 90.625 124.787C90.1193 125.009 89.5398 125.119 88.8864 125.119Z",fill:"black"})]})}var Jwe=(e=[])=>e.filter(t=>t.name==="core/heading").map(t=>({...t,level:t.attributes.level,isEmpty:$we(t)})),$we=e=>!e.attributes.content||e.attributes.content.trim().length===0;function Ah({onSelect:e,hasOutlineItemsDisabled:t}){let{selectBlock:r}=(0,Rh.useDispatch)(mC.store),{title:o,isTitleSupported:n}=(0,Rh.useSelect)(g=>{let{getEditedPostAttribute:v}=g(w),{getPostType:y}=g(FW.store),b=y(v("type"));return{title:v("title"),isTitleSupported:b?.supports?.title??!1}}),i=(0,Rh.useSelect)(g=>{let{getClientIdsWithDescendants:v,getBlock:y}=g(mC.store);return v().map(_=>y(_))}),a=(0,Rh.useSelect)(g=>{if(g(w).getRenderingMode()==="post-only")return;let{getBlocksByName:v,getClientIdsOfDescendants:y}=g(mC.store),[b]=v("core/post-content");if(b)return y(b)},[]),l=(0,pC.useRef)(1),c=(0,pC.useMemo)(()=>Jwe(i),[i]);if(c.length<1)return(0,Ct.jsxs)("div",{className:"editor-document-outline has-no-headings",children:[(0,Ct.jsx)(Qwe,{}),(0,Ct.jsx)("p",{children:(0,Jf.__)("Navigate the structure of your document and address issues like empty or incorrect heading levels.")})]});let u=document.querySelector(".editor-post-title__input"),d=n&&o&&u,m=c.reduce((g,v)=>({...g,[v.level]:(g[v.level]||0)+1}),{})[1]>1;function h(g){return Array.isArray(a)?a.includes(g):!0}return(0,Ct.jsx)("div",{className:"document-outline",children:(0,Ct.jsxs)("ul",{children:[d&&(0,Ct.jsx)(h3,{level:(0,Jf.__)("Title"),isValid:!0,onSelect:e,href:`#${u.id}`,isDisabled:t,children:o}),c.map(g=>{let v=g.level>l.current+1,y=!g.isEmpty&&!v&&!!g.level&&(g.level!==1||!m&&!d);return l.current=g.level,(0,Ct.jsxs)(h3,{level:`H${g.level}`,isValid:y,isDisabled:t||!h(g.clientId),href:`#block-${g.clientId}`,onSelect:()=>{r(g.clientId),e?.()},children:[g.isEmpty?qwe:(0,hC.getTextContent)((0,hC.create)({html:g.attributes.content})),v&&Zwe,g.level===1&&m&&Xwe,d&&g.level===1&&!m&&Kwe]},g.clientId)})]})})}var DW=s(O(),1),BW=s($(),1);function MW({children:e}){return(0,DW.useSelect)(r=>{let{getGlobalBlockCount:o}=r(BW.store);return o("core/heading")>0})?e:null}var LW=s(D(),1),VW=s(O(),1),hs=s(E(),1),jW=s($(),1),zW=s(Oi(),1),UW=s(yo(),1),HW=s(C(),1);function exe(){let{registerShortcut:e}=(0,VW.useDispatch)(zW.store);return(0,LW.useEffect)(()=>{e({name:"core/editor/toggle-mode",category:"global",description:(0,hs.__)("Switch between visual editor and code editor."),keyCombination:{modifier:"secondary",character:"m"}}),e({name:"core/editor/save",category:"global",description:(0,hs.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/editor/undo",category:"global",description:(0,hs.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/editor/redo",category:"global",description:(0,hs.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"},aliases:(0,UW.isAppleOS)()?[]:[{modifier:"primary",character:"y"}]}),e({name:"core/editor/toggle-list-view",category:"global",description:(0,hs.__)("Show or hide the List View."),keyCombination:{modifier:"access",character:"o"}}),e({name:"core/editor/toggle-distraction-free",category:"global",description:(0,hs.__)("Enter or exit distraction free mode."),keyCombination:{modifier:"primaryShift",character:"\\"}}),e({name:"core/editor/toggle-sidebar",category:"global",description:(0,hs.__)("Show or hide the Settings panel."),keyCombination:{modifier:"primaryShift",character:","}}),e({name:"core/editor/keyboard-shortcuts",category:"main",description:(0,hs.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}}),e({name:"core/editor/new-note",category:"block",description:(0,hs.__)("Add a new note."),keyCombination:{modifier:"primaryAlt",character:"m"}}),e({name:"core/editor/next-region",category:"global",description:(0,hs.__)("Navigate to the next part of the editor."),keyCombination:{modifier:"ctrl",character:"`"},aliases:[{modifier:"access",character:"n"}]}),e({name:"core/editor/previous-region",category:"global",description:(0,hs.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"},{modifier:"ctrlShift",character:"~"}]})},[e]),(0,HW.jsx)(jW.BlockEditorKeyboardShortcuts.Register,{})}var GW=exe;var gC=s(E(),1),WW=s(A(),1),vC=s(O(),1),qb=s(yo(),1);var YW=s(D(),1);var qW=s(C(),1);function txe(e,t){let r=(0,qb.isAppleOS)()?qb.displayShortcut.primaryShift("z"):qb.displayShortcut.primary("y"),o=(0,vC.useSelect)(i=>i(w).hasEditorRedo(),[]),{redo:n}=(0,vC.useDispatch)(w);return(0,qW.jsx)(WW.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,gC.isRTL)()?Yv:Vv,label:(0,gC.__)("Redo"),shortcut:r,"aria-disabled":!o,onClick:o?n:void 0,className:"editor-history__redo"})}var yC=(0,YW.forwardRef)(txe);var bC=s(E(),1),ZW=s(A(),1),SC=s(O(),1),KW=s(yo(),1);var XW=s(D(),1);var QW=s(C(),1);function rxe(e,t){let r=(0,SC.useSelect)(n=>n(w).hasEditorUndo(),[]),{undo:o}=(0,SC.useDispatch)(w);return(0,QW.jsx)(ZW.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,bC.isRTL)()?Vv:Yv,label:(0,bC.__)("Undo"),shortcut:KW.displayShortcut.primary("z"),"aria-disabled":!r,onClick:r?o:void 0,className:"editor-history__undo"})}var _C=(0,XW.forwardRef)(rxe);var $W=s(Yi(),1),eY=s(ct(),1);var wC=s(A(),1),Oh=s(E(),1),xC=s(O(),1),JW=s(D(),1),g3=s($(),1),$f=s(C(),1);function CC(){let[e,t]=(0,JW.useState)(!1),r=(0,xC.useSelect)(i=>i(g3.store).isValidTemplate(),[]),{setTemplateValidity:o,synchronizeTemplate:n}=(0,xC.useDispatch)(g3.store);return r?null:(0,$f.jsxs)($f.Fragment,{children:[(0,$f.jsx)(wC.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:(0,Oh.__)("Keep it as is"),onClick:()=>o(!0)},{label:(0,Oh.__)("Reset the template"),onClick:()=>t(!0)}],children:(0,Oh.__)("The content of your post doesn\u2019t match the template assigned to your post type.")}),(0,$f.jsx)(wC.__experimentalConfirmDialog,{isOpen:e,confirmButtonText:(0,Oh.__)("Reset"),onConfirm:()=>{t(!1),n()},onCancel:()=>t(!1),size:"medium",children:(0,Oh.__)("Resetting the template may result in loss of content, do you want to continue?")})]})}var v3=s(C(),1);function oxe(){return(0,$W.default)("wp.editor.EditorNotices",{since:"7.0",version:"7.2",alternative:"wp.notices.InlineNotices"}),(0,v3.jsx)(eY.InlineNotices,{pinnedNoticesClassName:"components-editor-notices__pinned",dismissibleNoticesClassName:"components-editor-notices__dismissible",children:(0,v3.jsx)(CC,{})})}var tY=oxe;var rY=s(Yi(),1),oY=s(ct(),1),nY=s(C(),1);function iY(){return(0,rY.default)("wp.editor.EditorSnackbars",{since:"7.0",version:"7.2",alternative:"wp.notices.SnackbarNotices"}),(0,nY.jsx)(oY.SnackbarNotices,{className:"components-editor-notices__snackbar"})}var pc=s(A(),1),mc=s(E(),1),Ih=s(D(),1),Zb=s(he(),1),fY=s(O(),1);var em=s(E(),1),S3=s(O(),1),PC=s(A(),1),_3=s(W(),1);var TC=s(A(),1),y3=s(E(),1),sY=s(O(),1),b3=s(W(),1),aY=s(ft(),1);var dc=s(C(),1);function lY({record:e,checked:t,onChange:r}){let{name:o,kind:n,title:i,key:a}=e,{entityRecordTitle:l,hasPostMetaChanges:c}=(0,sY.useSelect)(u=>{if(n!=="postType"||o!=="wp_template")return{entityRecordTitle:i,hasPostMetaChanges:N(u(w)).hasPostMetaChanges(o,a)};let d=u(b3.store).getEditedEntityRecord(n,o,a),{default_template_types:f=[]}=u(b3.store).getCurrentTheme()??{};return{entityRecordTitle:Zi({template:d,templateTypes:f}).title,hasPostMetaChanges:N(u(w)).hasPostMetaChanges(o,a)}},[o,n,i,a]);return(0,dc.jsxs)(dc.Fragment,{children:[(0,dc.jsx)(TC.PanelRow,{children:(0,dc.jsx)(TC.CheckboxControl,{label:(0,aY.decodeEntities)(l)||(0,y3.__)("Untitled"),checked:t,onChange:r,className:"entities-saved-states__change-control"})}),c&&(0,dc.jsx)("ul",{className:"entities-saved-states__changes",children:(0,dc.jsx)("li",{children:(0,y3.__)("Post Meta.")})})]})}var fc=s(C(),1);function nxe(e,t){switch(e){case"site":return t===1?(0,em.__)("This change will affect your whole site."):(0,em.__)("These changes will affect your whole site.");case"wp_template":return(0,em.__)("This change will affect other parts of your site that use this template.");case"page":case"post":return(0,em.__)("The following has been modified.")}}function ixe({record:e}){let{editedRecord:t,savedRecord:r}=(0,S3.useSelect)(n=>{let{getEditedEntityRecord:i,getEntityRecord:a}=n(_3.store);return{editedRecord:i(e.kind,e.name,e.key),savedRecord:a(e.kind,e.name,e.key)}},[e.kind,e.name,e.key]),o=My(t,r,{maxResults:10});return o.length?(0,fc.jsx)("ul",{className:"entities-saved-states__changes",children:o.map(n=>(0,fc.jsx)("li",{children:n},n))}):null}function sxe({record:e,count:t}){if(e?.name==="globalStyles")return null;let r=nxe(e?.name,t);return r?(0,fc.jsx)(PC.PanelRow,{children:r}):null}function cY({list:e,unselectedEntities:t,setUnselectedEntities:r}){let o=e.length,n=e[0],a=(0,S3.useSelect)(l=>l(_3.store).getEntityConfig(n.kind,n.name),[n.kind,n.name]).label;return n?.name==="wp_template_part"&&(a=o===1?(0,em.__)("Template Part"):(0,em.__)("Template Parts")),(0,fc.jsxs)(PC.PanelBody,{title:a,initialOpen:!0,className:"entities-saved-states__panel-body",children:[(0,fc.jsx)(sxe,{record:n,count:o}),e.map(l=>(0,fc.jsx)(lY,{record:l,checked:!t.some(c=>c.kind===l.kind&&c.name===l.name&&c.key===l.key&&c.property===l.property),onChange:c=>r(l,c)},l.key||l.property)),n?.name==="globalStyles"&&(0,fc.jsx)(ixe,{record:n})]})}var uY=s(O(),1),dY=s(W(),1),kC=s(D(),1),EC=()=>{let{editedEntities:e,siteEdits:t,siteEntityConfig:r}=(0,uY.useSelect)(c=>{let{__experimentalGetDirtyEntityRecords:u,getEntityRecordEdits:d,getEntityConfig:f}=c(dY.store);return{editedEntities:u(),siteEdits:d("root","site"),siteEntityConfig:f("root","site")}},[]),o=(0,kC.useMemo)(()=>{let c=e.filter(f=>!(f.kind==="root"&&f.name==="site")),u=r?.meta?.labels??{},d=[];for(let f in t)d.push({kind:"root",name:"site",title:u[f]||f,property:f});return[...c,...d]},[e,t,r]),[n,i]=(0,kC.useState)([]),a=({kind:c,name:u,key:d,property:f},m)=>{i(m?n.filter(h=>h.kind!==c||h.name!==u||h.key!==d||h.property!==f):[...n,{kind:c,name:u,key:d,property:f}])},l=o.length-n.length>0;return{dirtyEntityRecords:o,isDirty:l,setUnselectedEntities:a,unselectedEntities:n}};var Po=s(C(),1);function axe(e){return e}function RC({close:e,renderDialog:t,variant:r}){let o=EC();return(0,Po.jsx)(Kb,{close:e,renderDialog:t,variant:r,...o})}function Kb({additionalPrompt:e=void 0,close:t,onSave:r=axe,saveEnabled:o=void 0,saveLabel:n=(0,mc.__)("Save"),renderDialog:i,dirtyEntityRecords:a,isDirty:l,setUnselectedEntities:c,unselectedEntities:u,variant:d="default",successNoticeContent:f}){let m=(0,Ih.useRef)(),{saveDirtyEntities:h}=N((0,fY.useDispatch)(w)),g=a.reduce((I,U)=>{let{name:G}=U;return I[G]||(I[G]=[]),I[G].push(U),I},{}),{site:v,wp_template:y,wp_template_part:b,..._}=g,S=[v,y,b,...Object.values(_)].filter(Array.isArray),x=o??l,T=(0,Ih.useCallback)(()=>t(),[t]),[R,F]=(0,Zb.__experimentalUseDialog)({onClose:()=>T()}),B=(0,Zb.useInstanceId)(Kb,"entities-saved-states__panel-label"),z=(0,Zb.useInstanceId)(Kb,"entities-saved-states__panel-description"),L=a.length?(0,mc.__)("Select the items you want to save."):void 0,M=d==="inline",k=(0,Po.jsxs)(Po.Fragment,{children:[(0,Po.jsx)(pc.FlexItem,{isBlock:!M,as:pc.Button,variant:M?"tertiary":"secondary",size:M?void 0:"compact",onClick:T,children:(0,mc.__)("Cancel")}),(0,Po.jsx)(pc.FlexItem,{isBlock:!M,as:pc.Button,ref:m,variant:"primary",size:M?void 0:"compact",disabled:!x,accessibleWhenDisabled:!0,onClick:()=>h({onSave:r,dirtyEntityRecords:a,entitiesToSkip:u,close:t,successNoticeContent:f}),className:"editor-entities-saved-states__save-button",children:n})]});return(0,Po.jsxs)("div",{ref:i?R:void 0,...i&&F,className:re("entities-saved-states__panel",{"is-inline":M}),role:i?"dialog":void 0,"aria-labelledby":i?B:void 0,"aria-describedby":i?z:void 0,children:[!M&&(0,Po.jsx)(pc.Flex,{className:"entities-saved-states__panel-header",gap:2,children:k}),(0,Po.jsxs)("div",{className:"entities-saved-states__text-prompt",children:[(0,Po.jsx)("div",{className:"entities-saved-states__text-prompt--header-wrapper",children:(0,Po.jsx)("strong",{id:i?B:void 0,className:"entities-saved-states__text-prompt--header",children:(0,mc.__)("Are you ready to save?")})}),(0,Po.jsxs)("div",{id:i?z:void 0,children:[e,(0,Po.jsx)("p",{className:"entities-saved-states__text-prompt--changes-count",children:l?(0,Ih.createInterpolateElement)((0,mc.sprintf)((0,mc._n)("There is <strong>%d site change</strong> waiting to be saved.","There are <strong>%d site changes</strong> waiting to be saved.",a.length),a.length),{strong:(0,Po.jsx)("strong",{})}):L})]})]}),S.map(I=>(0,Po.jsx)(cY,{list:I,unselectedEntities:u,setUnselectedEntities:c},I[0].name)),M&&(0,Po.jsx)(pc.Flex,{direction:"row",justify:"flex-end",className:"entities-saved-states__panel-footer",children:k})]})}var pY=s(D(),1),AC=s(E(),1),tm=s(A(),1),hY=s(O(),1),gY=s(he(),1),vY=s(mo(),1);var Qu=s(C(),1);function lxe(){try{return(0,hY.select)(w).getEditedPostContent()}catch{}}function mY({text:e,children:t,variant:r="secondary"}){let o=(0,gY.useCopyToClipboard)(e);return(0,Qu.jsx)(tm.Button,{__next40pxDefaultSize:!0,variant:r,ref:o,children:t})}var cxe=class extends pY.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){(0,vY.doAction)("editor.ErrorBoundary.errorLogged",e)}static getDerivedStateFromError(e){return{error:e}}render(){let{error:e}=this.state,{canCopyContent:t=!1}=this.props;return e?(0,Qu.jsxs)(tm.__experimentalHStack,{className:"editor-error-boundary",alignment:"baseline",spacing:4,justify:"space-between",expanded:!1,wrap:!0,children:[(0,Qu.jsx)(tm.__experimentalText,{as:"p",children:(0,AC.__)("The editor has encountered an unexpected error.")}),(0,Qu.jsxs)(tm.__experimentalHStack,{expanded:!1,children:[t&&(0,Qu.jsx)(mY,{text:lxe,children:(0,AC.__)("Copy contents")}),(0,Qu.jsx)(mY,{variant:"primary",text:e?.stack,children:(0,AC.__)("Copy error")})]})]}):this.props.children}},yY=cxe;var hc=s(D(),1),Qb=s(he(),1),gc=s(O(),1),w3=s(E(),1),bY=s(Xe(),1),SY=s(ct(),1);var _Y=s(C(),1),uxe=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame,Xb,dxe=()=>{if(Xb!==void 0)return Xb;try{window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),Xb=!0}catch{Xb=!1}return Xb};function fxe(){let{postId:e,isEditedPostNew:t,hasRemoteAutosave:r}=(0,gc.useSelect)(c=>({postId:c(w).getCurrentPostId(),isEditedPostNew:c(w).isEditedPostNew(),hasRemoteAutosave:!!c(w).getEditorSettings().autosave}),[]),{getEditedPostAttribute:o}=(0,gc.useSelect)(w),{createWarningNotice:n,removeNotice:i}=(0,gc.useDispatch)(SY.store),{editPost:a,resetEditorBlocks:l}=(0,gc.useDispatch)(w);(0,hc.useEffect)(()=>{let c=pD(e,t);if(!c)return;try{c=JSON.parse(c)}catch{return}let{post_title:u,content:d,excerpt:f}=c,m={title:u,content:d,excerpt:f};if(!Object.keys(m).some(v=>m[v]!==o(v))){$S(e,t);return}if(r)return;let h="wpEditorAutosaveRestore";n((0,w3.__)("The backup of this post in your browser is different from the version below."),{id:h,actions:[{label:(0,w3.__)("Restore the backup"),onClick(){let{content:g,...v}=m;a(v),l((0,bY.parse)(m.content)),i(h)}}]})},[t,e])}function mxe(){let{postId:e,isEditedPostNew:t,isDirty:r,isAutosaving:o,didError:n}=(0,gc.useSelect)(u=>({postId:u(w).getCurrentPostId(),isEditedPostNew:u(w).isEditedPostNew(),isDirty:u(w).isEditedPostDirty(),isAutosaving:u(w).isAutosavingPost(),didError:u(w).didPostSaveRequestFail()}),[]),i=(0,hc.useRef)(r),a=(0,hc.useRef)(o);(0,hc.useEffect)(()=>{!n&&(a.current&&!o||i.current&&!r)&&$S(e,t),i.current=r,a.current=o},[r,o,n]);let l=(0,Qb.usePrevious)(t),c=(0,Qb.usePrevious)(e);(0,hc.useEffect)(()=>{c===e&&l&&!t&&$S(e,!0)},[t,e])}function pxe(){let{autosave:e}=(0,gc.useDispatch)(w),t=(0,hc.useCallback)(()=>{uxe(()=>e({local:!0}))},[]);fxe(),mxe();let r=(0,gc.useSelect)(o=>o(w).getEditorSettings().localAutosaveInterval,[]);return(0,_Y.jsx)(Xx,{interval:r,autosave:t})}var wY=(0,Qb.ifCondition)(dxe)(pxe);var xY=s(O(),1),CY=s(W(),1);function hxe({children:e}){return(0,xY.useSelect)(r=>{let{getEditedPostAttribute:o}=r(w),{getPostType:n}=r(CY.store);return!!n(o("type"))?.supports?.["page-attributes"]},[])?e:null}var Nh=hxe;var x3=s(E(),1),Dh=s(A(),1),OC=s(O(),1),kY=s(D(),1);var TY=s(O(),1),PY=s(W(),1);function gxe(e={},t){if(e[t]!==void 0)return!!e[t];let[r,o]=t.split("."),[n]=Array.isArray(e[r])?e[r]:[];return Array.isArray(n)?n.includes(o):!!n?.[o]}function vxe({children:e,supportKeys:t}){let r=(0,TY.useSelect)(n=>{let{getEditedPostAttribute:i}=n(w),{getPostType:a}=n(PY.store);return a(i("type"))},[]),o=!!r;return r&&(o=(Array.isArray(t)?t:[t]).some(n=>gxe(r.supports,n))),o?e:null}var tr=vxe;var Fh=s(C(),1);function yxe(){let e=(0,OC.useSelect)(a=>a(w).getEditedPostAttribute("menu_order")??0,[]),{editPost:t}=(0,OC.useDispatch)(w),[r,o]=(0,kY.useState)(null),n=a=>{o(a);let l=Number(a);Number.isInteger(l)&&a.trim?.()!==""&&t({menu_order:l})},i=r??e;return(0,Fh.jsx)(Dh.Flex,{children:(0,Fh.jsx)(Dh.FlexBlock,{children:(0,Fh.jsx)(Dh.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,x3.__)("Order"),help:(0,x3.__)("Set the page order."),value:i,onChange:n,hideLabelFromVision:!0,onBlur:()=>{o(null)}})})})}function EY(){return(0,Fh.jsx)(tr,{supportKeys:"page-attributes",children:(0,Fh.jsx)(yxe,{})})}var jY=s(O(),1),zY=s(W(),1);var T3=s(M_(),1),li=s(E(),1),Ju=s(A(),1),FY=s(he(),1),qa=s(D(),1),Mh=s(O(),1),k3=s(ft(),1),NC=s(W(),1),DY=s($(),1),BY=s(Ir(),1);var RY=s(A(),1),AY=s(D(),1),Jb=s(C(),1),bxe=(0,AY.forwardRef)(({className:e,label:t,children:r},o)=>(0,Jb.jsxs)(RY.__experimentalHStack,{className:re("editor-post-panel__row",e),ref:o,children:[t&&(0,Jb.jsx)("div",{className:"editor-post-panel__row-label",children:t}),(0,Jb.jsx)("div",{className:"editor-post-panel__row-control",children:r})]})),ht=bxe;var OY=s(ft(),1);function IC(e){let t=e.map(n=>({children:[],parent:void 0,...n}));if(t.some(({parent:n})=>n===void 0))return t;let r=t.reduce((n,i)=>{let{parent:a}=i;return n[a]||(n[a]=[]),n[a].push(i),n},{}),o=n=>n.map(i=>{let a=r[i.id];return{...i,children:a&&a.length?o(a):[]}});return o(r[0]||[])}var Bh=e=>(0,OY.decodeEntities)(e),C3=e=>({...e,name:Bh(e.name)}),IY=e=>(e??[]).map(C3);var ai=s(C(),1);function P3(e){return e?.title?.rendered?(0,k3.decodeEntities)(e.title.rendered):`#${e.id} (${(0,li.__)("no title")})`}var NY=(e,t)=>{let r=(0,T3.default)(e||"").toLowerCase(),o=(0,T3.default)(t||"").toLowerCase();return r===o?0:r.startsWith(o)?r.length:1/0};function MY(){let{editPost:e}=(0,Mh.useDispatch)(w),[t,r]=(0,qa.useState)(!1),{isHierarchical:o,parentPostId:n,parentPostTitle:i,pageItems:a,isLoading:l}=(0,Mh.useSelect)(f=>{let{getPostType:m,getEntityRecords:h,getEntityRecord:g,isResolving:v}=f(NC.store),{getCurrentPostId:y,getEditedPostAttribute:b}=f(w),_=b("type"),S=b("parent"),x=m(_),T=y(),R=x?.hierarchical??!1,F={per_page:100,exclude:T,parent_exclude:T,orderby:"menu_order",order:"asc",_fields:"id,title,parent"};t&&(F.search=t,F.orderby="relevance");let B=S?g("postType",_,S):null;return{isHierarchical:R,parentPostId:S,parentPostTitle:B?P3(B):"",pageItems:R?h("postType",_,F):null,isLoading:R?v("getEntityRecords",["postType",_,F]):!1}},[t]),c=(0,qa.useMemo)(()=>{let f=(v,y=0)=>v.map(S=>[{value:S.id,label:"\u2014 ".repeat(y)+(0,k3.decodeEntities)(S.name),rawName:S.name},...f(S.children||[],y+1)]).sort(([S],[x])=>{let T=NY(S.rawName,t),R=NY(x.rawName,t);return T>=R?1:-1}).flat();if(!a)return[];let m=a.map(v=>({id:v.id,parent:v.parent,name:P3(v)}));t||(m=IC(m));let h=f(m),g=h.find(v=>v.value===n);return i&&!g&&h.unshift({value:n,label:i}),h},[a,t,i,n]);if(!o)return null;let u=f=>{r(f)},d=f=>{e({parent:f})};return(0,ai.jsx)(Ju.ComboboxControl,{__next40pxDefaultSize:!0,className:"editor-page-attributes__parent",label:(0,li.__)("Parent"),help:(0,li.__)("Choose a parent page."),value:n,options:c,onFilterValueChange:(0,FY.debounce)(u,300),onChange:d,hideLabelFromVision:!0,isLoading:l})}function Sxe({isOpen:e,onClick:t}){let r=(0,Mh.useSelect)(n=>{let{getEditedPostAttribute:i}=n(w),a=i("parent");if(!a)return null;let{getEntityRecord:l}=n(NC.store),c=i("type");return l("postType",c,a)},[]),o=(0,qa.useMemo)(()=>r?P3(r):(0,li.__)("None"),[r]);return(0,ai.jsx)(Ju.Button,{size:"compact",className:"editor-post-parent__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,li.sprintf)((0,li.__)("Change parent: %s"),o),onClick:t,children:o})}function LY(){let e=(0,Mh.useSelect)(n=>n(NC.store).getEntityRecord("root","__unstableBase")?.home,[]),[t,r]=(0,qa.useState)(null),o=(0,qa.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]);return(0,ai.jsx)(ht,{label:(0,li.__)("Parent"),ref:r,children:(0,ai.jsx)(Ju.Dropdown,{popoverProps:o,className:"editor-post-parent__panel-dropdown",contentClassName:"editor-post-parent__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:n,onToggle:i})=>(0,ai.jsx)(Sxe,{isOpen:n,onClick:i}),renderContent:({onClose:n})=>(0,ai.jsxs)("div",{className:"editor-post-parent",children:[(0,ai.jsx)(DY.__experimentalInspectorPopoverHeader,{title:(0,li.__)("Parent"),onClose:n}),(0,ai.jsxs)("div",{children:[(0,qa.createInterpolateElement)((0,li.sprintf)((0,li.__)('Child pages inherit characteristics from their parent, such as URL structure. For instance, if "Pricing" is a child of "Services", its URL would be %s<wbr />/services<wbr />/pricing.'),(0,BY.filterURLForDisplay)(e).replace(/([/.])/g,"<wbr />$1")),{wbr:(0,ai.jsx)("wbr",{})}),(0,ai.jsx)("p",{children:(0,qa.createInterpolateElement)((0,li.__)("They also show up as sub-items in the default navigation menu. <a>Learn more.</a>"),{a:(0,ai.jsx)(Ju.ExternalLink,{href:(0,li.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes")})})})]}),(0,ai.jsx)(MY,{})]})})})}var VY=MY;var FC=s(C(),1),_xe="page-attributes";function wxe(){let{isEnabled:e,postType:t}=(0,jY.useSelect)(r=>{let{getEditedPostAttribute:o,isEditorPanelEnabled:n}=r(w),{getPostType:i}=r(zY.store);return{isEnabled:n(_xe),postType:i(o("type"))}},[]);return!e||!t?null:(0,FC.jsx)(LY,{})}function DC(){return(0,FC.jsx)(Nh,{children:(0,FC.jsx)(wxe,{})})}var gs=s(E(),1),yc=s(A(),1),Vh=s(O(),1),I3=s(W(),1),GY=s($(),1),jh=s(D(),1);var WY=s(ct(),1);var BC=s(O(),1),R3=s(D(),1),oa=s(Xe(),1),na=s(A(),1),rm=s(E(),1);var vc=s(C(),1),E3=(0,rm.__)("Custom Template");function MC({onClose:e}){let{defaultBlockTemplate:t,onNavigateToEntityRecord:r}=(0,BC.useSelect)(d=>{let{getEditorSettings:f,getCurrentTemplateId:m}=d(w);return{defaultBlockTemplate:f().defaultBlockTemplate,onNavigateToEntityRecord:f().onNavigateToEntityRecord,getTemplateId:m}}),{createTemplate:o}=N((0,BC.useDispatch)(w)),[n,i]=(0,R3.useState)(""),[a,l]=(0,R3.useState)(!1),c=()=>{i(""),e()},u=async d=>{if(d.preventDefault(),a)return;l(!0);let f=t??(0,oa.serialize)([(0,oa.createBlock)("core/group",{tagName:"header",layout:{inherit:!0}},[(0,oa.createBlock)("core/site-title"),(0,oa.createBlock)("core/site-tagline")]),(0,oa.createBlock)("core/separator"),(0,oa.createBlock)("core/group",{tagName:"main"},[(0,oa.createBlock)("core/group",{layout:{inherit:!0}},[(0,oa.createBlock)("core/post-title")]),(0,oa.createBlock)("core/post-content",{layout:{inherit:!0}})])]),m=await o({slug:af(n||E3)||"wp-custom-template",content:f,title:n||E3,status:"publish"});l(!1),r({postId:m.id,postType:"wp_template"}),c()};return(0,vc.jsx)(na.Modal,{title:(0,rm.__)("Create custom template"),onRequestClose:c,focusOnMount:"firstContentElement",size:"small",overlayClassName:"editor-post-template__create-template-modal",children:(0,vc.jsx)("form",{className:"editor-post-template__create-form",onSubmit:u,children:(0,vc.jsxs)(na.__experimentalVStack,{spacing:"3",children:[(0,vc.jsx)(na.TextControl,{__next40pxDefaultSize:!0,label:(0,rm.__)("Name"),value:n,onChange:i,placeholder:E3,disabled:a,help:(0,rm.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,vc.jsxs)(na.__experimentalHStack,{justify:"right",children:[(0,vc.jsx)(na.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:c,children:(0,rm.__)("Cancel")}),(0,vc.jsx)(na.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:a,"aria-disabled":a,children:(0,rm.__)("Create")})]})]})})})}var $b=s(O(),1),UY=s(D(),1),LC=s(W(),1);function Lh(){return(0,$b.useSelect)(e=>{let{getCurrentPostId:t,getCurrentPostType:r}=e(w);return{postId:t(),postType:r()}},[])}function om(){let{postType:e,postId:t}=Lh();return(0,$b.useSelect)(r=>{let{canUser:o,getEntityRecord:n,getEntityRecords:i}=r(LC.store),a=o("read",{kind:"root",name:"site"})?n("root","site"):void 0,l=+t===a?.page_for_posts,c=e==="page"&&+t===a?.page_on_front,u=c?i("postType","wp_template",{per_page:-1}):[],d=c&&!!u?.some(({slug:f})=>f==="front-page");return!l&&!d},[t,e])}function HY(e){return(0,$b.useSelect)(t=>t(LC.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:e}),[e])}function A3(e){let t=O3(),r=om(),o=HY(e);return(0,UY.useMemo)(()=>r&&o?.filter(n=>n.is_custom&&n.slug!==t&&!!n.content.raw),[o,t,r])}function O3(){let{postType:e,postId:t}=Lh(),r=HY(e),o=(0,$b.useSelect)(n=>n(LC.store).getEditedEntityRecord("postType",e,t)?.template,[e,t]);if(o)return r?.find(n=>n.slug===o)?.slug}var ci=s(C(),1);function xxe({isOpen:e,onClick:t}){let r=(0,Vh.useSelect)(o=>{let n=o(w).getEditedPostAttribute("template"),{supportsTemplateMode:i,availableTemplates:a}=o(w).getEditorSettings();if(!i&&a[n])return a[n];let l=o(I3.store).canUser("create",{kind:"postType",name:"wp_template"})&&o(w).getCurrentTemplateId();return l?.title||l?.slug||a?.[n]},[]);return(0,ci.jsx)(yc.Button,{__next40pxDefaultSize:!0,variant:"tertiary","aria-expanded":e,"aria-label":(0,gs.__)("Template options"),onClick:t,children:r??(0,gs.__)("Default template")})}function Cxe({onClose:e}){let t=om(),{availableTemplates:r,fetchedTemplates:o,selectedTemplateSlug:n,canCreate:i,canEdit:a,currentTemplateId:l,onNavigateToEntityRecord:c,getEditorSettings:u}=(0,Vh.useSelect)(y=>{let{canUser:b,getEntityRecords:_}=y(I3.store),S=y(w).getEditorSettings(),x=b("create",{kind:"postType",name:"wp_template"}),T=y(w).getCurrentTemplateId();return{availableTemplates:S.availableTemplates,fetchedTemplates:x?_("postType","wp_template",{post_type:y(w).getCurrentPostType(),per_page:-1}):void 0,selectedTemplateSlug:y(w).getEditedPostAttribute("template"),canCreate:t&&x&&S.supportsTemplateMode,canEdit:t&&x&&S.supportsTemplateMode&&!!T,currentTemplateId:T,onNavigateToEntityRecord:S.onNavigateToEntityRecord,getEditorSettings:y(w).getEditorSettings}},[t]),d=(0,jh.useMemo)(()=>Object.entries({...r,...Object.fromEntries((o??[]).map(({slug:y,title:b})=>[y,b.rendered]))}).map(([y,b])=>({value:y,label:b})),[r,o]),f=d.find(y=>y.value===n)??d.find(y=>!y.value),{editPost:m}=(0,Vh.useDispatch)(w),{createSuccessNotice:h}=(0,Vh.useDispatch)(WY.store),[g,v]=(0,jh.useState)(!1);return(0,ci.jsxs)("div",{className:"editor-post-template__classic-theme-dropdown",children:[(0,ci.jsx)(GY.__experimentalInspectorPopoverHeader,{title:(0,gs.__)("Template"),help:(0,gs.__)("Templates define the way content is displayed when viewing your site."),actions:i?[{icon:lR,label:(0,gs.__)("Add template"),onClick:()=>v(!0)}]:[],onClose:e}),t?(0,ci.jsx)(yc.SelectControl,{__next40pxDefaultSize:!0,hideLabelFromVision:!0,label:(0,gs.__)("Template"),value:f?.value??"",options:d,onChange:y=>m({template:y||""})}):(0,ci.jsx)(yc.Notice,{status:"warning",isDismissible:!1,children:(0,gs.__)("The posts page template cannot be changed.")}),a&&c&&(0,ci.jsx)("p",{children:(0,ci.jsx)(yc.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>{c({postId:l,postType:"wp_template"}),e(),h((0,gs.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:[{label:(0,gs.__)("Go back"),onClick:()=>u().onNavigateToPreviousEntityRecord()}]})},children:(0,gs.__)("Edit template")})}),g&&(0,ci.jsx)(MC,{onClose:()=>v(!1)})]})}function Txe(){let[e,t]=(0,jh.useState)(null),r=(0,jh.useMemo)(()=>({anchor:e,className:"editor-post-template__dropdown",placement:"left-start",offset:36,shift:!0}),[e]);return(0,ci.jsx)(ht,{label:(0,gs.__)("Template"),ref:t,children:(0,ci.jsx)(yc.Dropdown,{popoverProps:r,focusOnMount:!0,renderToggle:({isOpen:o,onToggle:n})=>(0,ci.jsx)(xxe,{isOpen:o,onClick:n}),renderContent:({onClose:o})=>(0,ci.jsx)(Cxe,{onClose:o})})})}var VC=Txe;var UC=s(A(),1),JY=s(_u(),1),HC=s(O(),1),$Y=s(qY(),1);var XY=s(A(),1);var jC=s(O(),1),ZY=s(lt(),1);var KY=s(C(),1),{PreferenceBaseOption:Pxe}=N(ZY.privateApis);function $u(e){let{toggleEditorPanelEnabled:t}=(0,jC.useDispatch)(w),{isChecked:r,isRemoved:o}=(0,jC.useSelect)(n=>{let{isEditorPanelEnabled:i,isEditorPanelRemoved:a}=n(w);return{isChecked:i(e.panelName),isRemoved:a(e.panelName)}},[e.panelName]);return o?null:(0,KY.jsx)(Pxe,{isChecked:r,onChange:()=>t(e.panelName),...e})}var N3=s(C(),1),{Fill:kxe,Slot:Exe}=(0,XY.createSlotFill)("EnablePluginDocumentSettingPanelOption"),QY=({label:e,panelName:t})=>(0,N3.jsx)(kxe,{children:(0,N3.jsx)($u,{label:e,panelName:t})});QY.Slot=Exe;var zC=QY;var ed=s(C(),1),{Fill:Rxe,Slot:Axe}=(0,UC.createSlotFill)("PluginDocumentSettingPanel"),eq=({name:e,className:t,title:r,icon:o,children:n})=>{let{name:i}=(0,JY.usePluginContext)(),a=`${i}/${e}`,{opened:l,isEnabled:c}=(0,HC.useSelect)(d=>{let{isEditorPanelOpened:f,isEditorPanelEnabled:m}=d(w);return{opened:f(a),isEnabled:m(a)}},[a]),{toggleEditorPanelOpened:u}=(0,HC.useDispatch)(w);return e===void 0&&(0,$Y.default)("PluginDocumentSettingPanel requires a name property."),(0,ed.jsxs)(ed.Fragment,{children:[(0,ed.jsx)(zC,{label:r,panelName:a}),(0,ed.jsx)(Rxe,{children:c&&(0,ed.jsx)(UC.PanelBody,{className:t,title:r,icon:o,opened:l,onToggle:()=>u(a),children:n})})]})};eq.Slot=Axe;var GC=eq;var tq=s($(),1),rq=s(A(),1),oq=s(he(),1),F3=s(C(),1),Oxe=(e,t)=>e.filter(r=>!t.includes(r)).length===0,Ixe=(e,t)=>!Array.isArray(t)||Oxe(e,t),Nxe=({allowedBlocks:e,icon:t,label:r,onClick:o,small:n,role:i})=>(0,F3.jsx)(tq.BlockSettingsMenuControls,{children:({selectedBlocks:a,onClose:l})=>Ixe(a,e)?(0,F3.jsx)(rq.MenuItem,{onClick:(0,oq.compose)(o,l),icon:t,label:n?r:void 0,role:i,children:!n&&r}):null}),nq=Nxe;var iq=s(A(),1),sq=s(_u(),1);var aq=s(C(),1);function lq(e){let t=(0,sq.usePluginContext)();return(0,aq.jsx)(rs,{name:"core/plugin-more-menu",as:e.as??iq.MenuItem,icon:e.icon||t.icon,...e})}var cq=s(_u(),1),WC=s(A(),1),D3=s(C(),1),{Fill:Fxe,Slot:Dxe}=(0,WC.createSlotFill)("PluginPostPublishPanel"),uq=({children:e,className:t,title:r,initialOpen:o=!1,icon:n})=>{let{icon:i}=(0,cq.usePluginContext)();return(0,D3.jsx)(Fxe,{children:(0,D3.jsx)(WC.PanelBody,{className:t,initialOpen:o||!r,title:r,icon:n??i,children:e})})};uq.Slot=Dxe;var YC=uq;var qC=s(A(),1),B3=s(C(),1),{Fill:Bxe,Slot:Mxe}=(0,qC.createSlotFill)("PluginPostStatusInfo"),dq=({children:e,className:t})=>(0,B3.jsx)(Bxe,{children:(0,B3.jsx)(qC.PanelRow,{className:t,children:e})});dq.Slot=Mxe;var ZC=dq;var KC=s(A(),1),fq=s(_u(),1),M3=s(C(),1),{Fill:Lxe,Slot:Vxe}=(0,KC.createSlotFill)("PluginPrePublishPanel"),mq=({children:e,className:t,title:r,initialOpen:o=!1,icon:n})=>{let{icon:i}=(0,fq.usePluginContext)();return(0,M3.jsx)(Lxe,{children:(0,M3.jsx)(KC.PanelBody,{className:t,initialOpen:o||!r,title:r,icon:n??i,children:e})})};mq.Slot=Vxe;var XC=mq;var pq=s(A(),1),hq=s(_u(),1);var gq=s(C(),1);function vq(e){let t=(0,hq.usePluginContext)();return(0,gq.jsx)(rs,{name:"core/plugin-preview-menu",as:e.as??pq.MenuItem,icon:e.icon||t.icon,...e})}var yq=s(C(),1);function nm({className:e,...t}){return(0,yq.jsx)(ql,{panelClassName:e,className:"editor-sidebar",scope:"core",...t})}var bq=s(C(),1);function Sq(e){return(0,bq.jsx)(xu,{__unstableExplicitMenuItem:!0,scope:"core",...e})}var JC=s(O(),1),$C=s(W(),1);var bc=s(O(),1),Uq=s(ft(),1),td=s(A(),1),QC=s(D(),1),sm=s(E(),1),Gh=s(W(),1);var Hq=s(ct(),1),Gq=s(lt(),1);var Uh=s(D(),1),Cq=s(ft(),1),Tq=s($(),1),Hh=s(A(),1),zh=s(E(),1),Pq=s(O(),1),kq=s(W(),1),Eq=s(Xe(),1);var wq=s(M_(),1);function _q(e=""){return e=(0,wq.default)(e),e=e.trim().toLowerCase(),e}function jxe(e,t){let r=_q(t),o=_q(e.title),n=0;return r===o?n+=30:o.startsWith(r)?n+=20:r.split(" ").every(l=>o.includes(l))&&(n+=10),n}function xq(e=[],t=""){if(!t)return e;let r=e.map(o=>[o,jxe(o,t)]).filter(([,o])=>o>0);return r.sort(([,o],[,n])=>n-o),r.map(([o])=>o)}var Bi=s(C(),1);function Rq({onClick:e}){let[t,r]=(0,Uh.useState)(!1),{postType:o,postId:n}=Lh(),i=A3(o),{editEntityRecord:a}=(0,Pq.useDispatch)(kq.store),l=async c=>{a("postType",o,n,{template:c.name},{undoIgnore:!0}),r(!1),e()};return(0,Bi.jsxs)(Bi.Fragment,{children:[(0,Bi.jsx)(Hh.MenuItem,{disabled:!i?.length,accessibleWhenDisabled:!0,onClick:()=>r(!0),children:(0,zh.__)("Change template")}),t&&(0,Bi.jsx)(Hh.Modal,{title:(0,zh.__)("Choose a template"),onRequestClose:()=>r(!1),overlayClassName:"editor-post-template__swap-template-modal",isFullScreen:!0,children:(0,Bi.jsx)("div",{className:"editor-post-template__swap-template-modal-content",children:(0,Bi.jsx)(zxe,{postType:o,onSelect:l})})})]})}function zxe({postType:e,onSelect:t}){let[r,o]=(0,Uh.useState)(""),n=A3(e),i=(0,Uh.useMemo)(()=>n.map(l=>({name:l.slug,blocks:(0,Eq.parse)(l.content.raw),title:(0,Cq.decodeEntities)(l.title.rendered),id:l.id})),[n]),a=(0,Uh.useMemo)(()=>xq(i,r),[i,r]);return(0,Bi.jsxs)(Bi.Fragment,{children:[(0,Bi.jsx)(Hh.SearchControl,{onChange:o,value:r,label:(0,zh.__)("Search"),placeholder:(0,zh.__)("Search"),className:"editor-post-template__swap-template-search"}),(0,Bi.jsx)(Tq.__experimentalBlockPatternsList,{label:(0,zh.__)("Templates"),blockPatterns:a,onClickPattern:t})]})}var Aq=s(A(),1),Oq=s(E(),1),Iq=s(O(),1),Nq=s(W(),1);var Fq=s(C(),1);function Dq({onClick:e}){let t=O3(),r=om(),{postType:o,postId:n}=Lh(),{editEntityRecord:i}=(0,Iq.useDispatch)(Nq.store);return!t||!r?null:(0,Fq.jsx)(Aq.MenuItem,{onClick:()=>{i("postType",o,n,{template:""},{undoIgnore:!0}),e()},children:(0,Oq.__)("Use default template")})}var Bq=s(A(),1),Mq=s(E(),1),Lq=s(O(),1),Vq=s(W(),1),jq=s(D(),1);var im=s(C(),1);function zq(){let{canCreateTemplates:e}=(0,Lq.useSelect)(n=>{let{canUser:i}=n(Vq.store);return{canCreateTemplates:i("create",{kind:"postType",name:"wp_template"})}},[]),[t,r]=(0,jq.useState)(!1),o=om();return!e||!o?null:(0,im.jsxs)(im.Fragment,{children:[(0,im.jsx)(Bq.MenuItem,{onClick:()=>{r(!0)},children:(0,Mq.__)("Create new template")}),t&&(0,im.jsx)(MC,{onClose:()=>{r(!1)}})]})}var ui=s(C(),1);function Wq({id:e}){let{isTemplateHidden:t,onNavigateToEntityRecord:r,getEditorSettings:o,hasGoBack:n,hasSpecificTemplate:i}=(0,bc.useSelect)(x=>{let{getRenderingMode:T,getEditorSettings:R,getCurrentPost:F}=N(x(w)),B=R(),z=F();return{isTemplateHidden:T()==="post-only",onNavigateToEntityRecord:B.onNavigateToEntityRecord,getEditorSettings:R,hasGoBack:B.hasOwnProperty("onNavigateToPreviousEntityRecord"),hasSpecificTemplate:!!z.template}},[]),{get:a}=(0,bc.useSelect)(Gq.store),{editedRecord:l,hasResolved:c}=(0,Gh.useEntityRecord)("postType","wp_template",e),{getEntityRecord:u}=(0,bc.useSelect)(Gh.store),{editEntityRecord:d}=(0,bc.useDispatch)(Gh.store),{createSuccessNotice:f}=(0,bc.useDispatch)(Hq.store),{setRenderingMode:m,setDefaultRenderingMode:h}=N((0,bc.useDispatch)(w)),g=(0,bc.useSelect)(x=>!!x(Gh.store).canUser("create",{kind:"postType",name:"wp_template"}),[]),[v,y]=(0,QC.useState)(null),b=(0,QC.useMemo)(()=>({anchor:v,className:"editor-post-template__dropdown",placement:"left-start",offset:36,shift:!0}),[v]);if(!c)return null;let _=n?[{label:(0,sm.__)("Go back"),onClick:()=>o().onNavigateToPreviousEntityRecord()}]:void 0,S=()=>{a("core/edit-site","welcomeGuideTemplate")||f((0,sm.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:_})};return(0,ui.jsx)(ht,{label:(0,sm.__)("Template"),ref:y,children:(0,ui.jsx)(td.DropdownMenu,{popoverProps:b,focusOnMount:!0,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},label:(0,sm.__)("Template options"),text:(0,Uq.decodeEntities)(l.title),icon:null,children:({onClose:x})=>(0,ui.jsxs)(ui.Fragment,{children:[(0,ui.jsxs)(td.MenuGroup,{children:[g&&(0,ui.jsx)(td.MenuItem,{onClick:async()=>{if(r({postId:l.id,postType:"wp_template"}),!i&&window?.__experimentalTemplateActivate){let T=await u("root","site").active_templates;T[l.slug]!==l.id&&d("root","site",void 0,{active_templates:{...T,[l.slug]:l.id}})}x(),S()},children:(0,sm.__)("Edit template")}),(0,ui.jsx)(Rq,{onClick:x}),(0,ui.jsx)(Dq,{onClick:x}),g&&(0,ui.jsx)(zq,{})]}),(0,ui.jsx)(td.MenuGroup,{children:(0,ui.jsx)(td.MenuItem,{icon:t?void 0:Pi,isSelected:!t,role:"menuitemcheckbox",onClick:()=>{let T=t?"template-locked":"post-only";m(T),h(T)},children:(0,sm.__)("Show template")})})]})})})}var L3=s(C(),1);function eT(){let{templateId:e,isBlockTheme:t}=(0,JC.useSelect)(n=>{let{getCurrentTemplateId:i,getEditorSettings:a}=n(w);return{templateId:i(),isBlockTheme:a().__unstableIsBlockBasedTheme}},[]),r=(0,JC.useSelect)(n=>{let i=n(w).getCurrentPostType();if(!n($C.store).getPostType(i)?.viewable)return!1;let l=n(w).getEditorSettings();return!!l.availableTemplates&&Object.keys(l.availableTemplates).length>0?!0:l.supportsTemplateMode?n($C.store).canUser("create",{kind:"postType",name:"wp_template"})??!1:!1},[]),o=(0,JC.useSelect)(n=>r?n($C.store).canUser("read",{kind:"postType",name:"wp_template"}):!1,[r]);return(!t||!o)&&r?(0,L3.jsx)(VC,{}):t&&e?(0,L3.jsx)(Wq,{id:e}):null}var lZ=s(O(),1),cZ=s(W(),1);var Xq=s(he(),1),Qq=s(D(),1),Jq=s(O(),1),$q=s(E(),1),eZ=s(A(),1);var Yq=s(E(),1),qq=s(D(),1),Zq=s(O(),1),V3=s(ft(),1),Kq=s(W(),1);var e0={_fields:"id,name",context:"view"},tT={who:"authors",per_page:100,...e0};function rT(e){let{authorId:t,authors:r,postAuthor:o,isLoading:n}=(0,Zq.useSelect)(a=>{let{getUser:l,getUsers:c,isResolving:u}=a(Kq.store),{getEditedPostAttribute:d}=a(w),f=d("author"),m={...tT};return e&&(m.search=e,m.search_columns=["name"]),{authorId:f,authors:c(m),postAuthor:l(f,e0),isLoading:u("getUsers",[m])}},[e]),i=(0,qq.useMemo)(()=>{let a=(r??[]).map(u=>({value:u.id,label:(0,V3.decodeEntities)(u.name)})),l=a.findIndex(({value:u})=>o?.id===u),c=[];return l<0&&o?c=[{value:o.id,label:(0,V3.decodeEntities)(o.name)}]:l<0&&!o&&(c=[{value:0,label:(0,Yq.__)("(No author)")}]),[...c,...a]},[r,o]);return{authorId:t,authorOptions:i,postAuthor:o,isLoading:n}}var tZ=s(C(),1);function rZ(){let[e,t]=(0,Qq.useState)(),{editPost:r}=(0,Jq.useDispatch)(w),{authorId:o,authorOptions:n,isLoading:i}=rT(e),a=l=>{l&&r({author:l})};return(0,tZ.jsx)(eZ.ComboboxControl,{__next40pxDefaultSize:!0,label:(0,$q.__)("Author"),options:n,value:o,onFilterValueChange:(0,Xq.debounce)(t,300),onChange:a,allowReset:!1,hideLabelFromVision:!0,isLoading:i})}var oZ=s(E(),1),nZ=s(O(),1),iZ=s(A(),1);var sZ=s(C(),1);function aZ(){let{editPost:e}=(0,nZ.useDispatch)(w),{authorId:t,authorOptions:r}=rT(),o=n=>{let i=Number(n);e({author:i})};return(0,sZ.jsx)(iZ.SelectControl,{__next40pxDefaultSize:!0,className:"post-author-selector",label:(0,oZ.__)("Author"),options:r,onChange:o,value:t,hideLabelFromVision:!0})}var j3=s(C(),1),Uxe=25;function Hxe(){return(0,lZ.useSelect)(t=>t(cZ.store).getUsers(tT)?.length>=Uxe,[])?(0,j3.jsx)(rZ,{}):(0,j3.jsx)(aZ,{})}var oT=Hxe;var uZ=s(O(),1);var dZ=s(C(),1);function nT({children:e}){let{hasAssignAuthorAction:t}=(0,uZ.useSelect)(r=>({hasAssignAuthorAction:!!r(w).getCurrentPost()?._links?.["wp:action-assign-author"]}),[]);return t?(0,dZ.jsx)(tr,{supportKeys:"author",children:e}):null}var am=s(E(),1),iT=s(A(),1),sT=s(D(),1),fZ=s(ft(),1),mZ=s($(),1),pZ=s(O(),1),hZ=s(W(),1);var Za=s(C(),1);function Gxe({isOpen:e,onClick:t}){let{postAuthor:r}=(0,pZ.useSelect)(n=>{let i=n(w).getEditedPostAttribute("author");return{postAuthor:n(hZ.store).getUser(i,e0)}},[]),o=(0,fZ.decodeEntities)(r?.name)||(0,am.__)("(No author)");return(0,Za.jsx)(iT.Button,{size:"compact",className:"editor-post-author__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,am.sprintf)((0,am.__)("Change author: %s"),o),onClick:t,children:o})}function Wxe(){let[e,t]=(0,sT.useState)(null),r=(0,sT.useMemo)(()=>({anchor:e,placement:"left-start",offset:36,shift:!0}),[e]);return(0,Za.jsx)(nT,{children:(0,Za.jsx)(ht,{label:(0,am.__)("Author"),ref:t,children:(0,Za.jsx)(iT.Dropdown,{popoverProps:r,contentClassName:"editor-post-author__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:o,onToggle:n})=>(0,Za.jsx)(Gxe,{isOpen:o,onClick:n}),renderContent:({onClose:o})=>(0,Za.jsxs)("div",{className:"editor-post-author",children:[(0,Za.jsx)(mZ.__experimentalInspectorPopoverHeader,{title:(0,am.__)("Author"),onClose:o}),(0,Za.jsx)(oT,{onClose:o})]})})})})}var aT=Wxe;var rd=s(E(),1),cT=s(A(),1),uT=s(O(),1);var lT=s(C(),1),Yxe=[{label:(0,rd._x)("Open",'Adjective: e.g. "Comments are open"'),value:"open",description:(0,rd.__)("Visitors can add new comments and replies.")},{label:(0,rd.__)("Closed"),value:"closed",description:[(0,rd.__)("Visitors cannot add new comments or replies."),(0,rd.__)("Existing comments remain visible.")].join(" ")}];function qxe(){let e=(0,uT.useSelect)(o=>o(w).getEditedPostAttribute("comment_status")??"open",[]),{editPost:t}=(0,uT.useDispatch)(w),r=o=>t({comment_status:o});return(0,lT.jsx)("form",{children:(0,lT.jsx)(cT.__experimentalVStack,{spacing:4,children:(0,lT.jsx)(cT.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,rd.__)("Comment status"),options:Yxe,onChange:r,selected:e})})})}var dT=qxe;var ia=s(E(),1),Wh=s(A(),1),U3=s(O(),1),gT=s(D(),1),gZ=s($(),1),vZ=s(W(),1);var fT=s(E(),1),mT=s(A(),1),pT=s(O(),1);var z3=s(C(),1);function Zxe(){let e=(0,pT.useSelect)(o=>o(w).getEditedPostAttribute("ping_status")??"open",[]),{editPost:t}=(0,pT.useDispatch)(w),r=()=>t({ping_status:e==="open"?"closed":"open"});return(0,z3.jsx)(mT.CheckboxControl,{label:(0,fT.__)("Enable pingbacks & trackbacks"),checked:e==="open",onChange:r,help:(0,z3.jsx)(mT.ExternalLink,{href:(0,fT.__)("https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"),children:(0,fT.__)("Learn more about pingbacks & trackbacks")})})}var hT=Zxe;var Bn=s(C(),1),Kxe="discussion-panel";function Xxe({onClose:e}){return(0,Bn.jsxs)("div",{className:"editor-post-discussion",children:[(0,Bn.jsx)(gZ.__experimentalInspectorPopoverHeader,{title:(0,ia.__)("Discussion"),onClose:e}),(0,Bn.jsxs)(Wh.__experimentalVStack,{spacing:4,children:[(0,Bn.jsx)(tr,{supportKeys:"comments",children:(0,Bn.jsx)(dT,{})}),(0,Bn.jsx)(tr,{supportKeys:"trackbacks",children:(0,Bn.jsx)(hT,{})})]})]})}function Qxe({isOpen:e,onClick:t}){let{commentStatus:r,pingStatus:o,commentsSupported:n,trackbacksSupported:i}=(0,U3.useSelect)(l=>{let{getEditedPostAttribute:c}=l(w),{getPostType:u}=l(vZ.store),d=u(c("type"));return{commentStatus:c("comment_status")??"open",pingStatus:c("ping_status")??"open",commentsSupported:!!d.supports.comments,trackbacksSupported:!!d.supports.trackbacks}},[]),a;return r==="open"?o==="open"?a=(0,ia._x)("Open",'Adjective: e.g. "Comments are open"'):a=i?(0,ia.__)("Comments only"):(0,ia._x)("Open",'Adjective: e.g. "Comments are open"'):o==="open"?a=n?(0,ia.__)("Pings only"):(0,ia.__)("Pings enabled"):a=(0,ia.__)("Closed"),(0,Bn.jsx)(Wh.Button,{size:"compact",className:"editor-post-discussion__panel-toggle",variant:"tertiary","aria-label":(0,ia.__)("Change discussion options"),"aria-expanded":e,onClick:t,children:a})}function vT(){let{isEnabled:e}=(0,U3.useSelect)(n=>{let{isEditorPanelEnabled:i}=n(w);return{isEnabled:i(Kxe)}},[]),[t,r]=(0,gT.useState)(null),o=(0,gT.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]);return e?(0,Bn.jsx)(tr,{supportKeys:["comments","trackbacks"],children:(0,Bn.jsx)(ht,{label:(0,ia.__)("Discussion"),ref:r,children:(0,Bn.jsx)(Wh.Dropdown,{popoverProps:o,className:"editor-post-discussion__panel-dropdown",contentClassName:"editor-post-discussion__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:n,onToggle:i})=>(0,Bn.jsx)(Qxe,{isOpen:n,onClick:i}),renderContent:({onClose:n})=>(0,Bn.jsx)(Xxe,{onClose:n})})})}):null}var Yh=s(E(),1),bT=s(A(),1),ST=s(O(),1),yZ=s(D(),1),bZ=s(ft(),1);var yT=s(C(),1);function t0({hideLabelFromVision:e=!1,updateOnBlur:t=!1}){let{excerpt:r,shouldUseDescriptionLabel:o,usedAttribute:n}=(0,ST.useSelect)(d=>{let{getCurrentPostType:f,getEditedPostAttribute:m}=d(w),h=f(),g=["wp_template","wp_template_part"].includes(h)?"description":"excerpt";return{excerpt:m(g),shouldUseDescriptionLabel:["wp_template","wp_template_part","wp_block"].includes(h),usedAttribute:g}},[]),{editPost:i}=(0,ST.useDispatch)(w),[a,l]=(0,yZ.useState)((0,bZ.decodeEntities)(r)),c=d=>{i({[n]:d})},u=o?(0,Yh.__)("Write a description (optional)"):(0,Yh.__)("Write an excerpt (optional)");return(0,yT.jsx)("div",{className:"editor-post-excerpt",children:(0,yT.jsx)(bT.TextareaControl,{label:u,hideLabelFromVision:e,className:"editor-post-excerpt__textarea",onChange:t?l:c,onBlur:t?()=>c(a):void 0,value:t?a:r,help:o?(0,Yh.__)("Write a description"):(0,yT.jsx)(bT.ExternalLink,{href:(0,Yh.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt"),children:(0,Yh.__)("Learn more about manual excerpts")})})})}var SZ=s(C(),1);function Jxe({children:e}){return(0,SZ.jsx)(tr,{supportKeys:"excerpt",children:e})}var lm=Jxe;var Sc=s(E(),1),sa=s(A(),1),o0=s(O(),1),xT=s(D(),1),wZ=s($(),1),G3=s(W(),1),xZ=s(ft(),1);var _T=s(A(),1),H3=s(C(),1),{Fill:$xe,Slot:eCe}=(0,_T.createSlotFill)("PluginPostExcerpt"),_Z=({children:e,className:t})=>(0,H3.jsx)($xe,{children:(0,H3.jsx)(_T.PanelRow,{className:t,children:e})});_Z.Slot=eCe;var r0=_Z;var rr=s(C(),1),wT="post-excerpt";function tCe(){let{isOpened:e,isEnabled:t,postType:r}=(0,o0.useSelect)(a=>{let{isEditorPanelOpened:l,isEditorPanelEnabled:c,getCurrentPostType:u}=a(w);return{isOpened:l(wT),isEnabled:c(wT),postType:u()}},[]),{toggleEditorPanelOpened:o}=(0,o0.useDispatch)(w),n=()=>o(wT);if(!t)return null;let i=["wp_template","wp_template_part","wp_block"].includes(r);return(0,rr.jsx)(sa.PanelBody,{title:i?(0,Sc.__)("Description"):(0,Sc.__)("Excerpt"),opened:e,onToggle:n,children:(0,rr.jsx)(r0.Slot,{children:a=>(0,rr.jsxs)(rr.Fragment,{children:[(0,rr.jsx)(t0,{}),a]})})})}function CZ(){return(0,rr.jsx)(lm,{children:(0,rr.jsx)(tCe,{})})}function TZ(){return(0,rr.jsx)(lm,{children:(0,rr.jsx)(rCe,{})})}function rCe(){let{shouldRender:e,excerpt:t,shouldBeUsedAsDescription:r,allowEditing:o}=(0,o0.useSelect)(f=>{let{getCurrentPostType:m,getCurrentPostId:h,getEditedPostAttribute:g,isEditorPanelEnabled:v}=f(w),y=m(),b=["wp_template","wp_template_part"].includes(y),_=y==="wp_block",S=b||_,T=g(b?"description":"excerpt"),R=b&&f(G3.store).getEntityRecord("postType",y,h()),F=!T&&b?Zi({template:R,templateTypes:f(G3.store).getCurrentTheme()?.default_template_types})?.description:void 0,B=v(wT)||S;return{excerpt:T??F,shouldRender:B,shouldBeUsedAsDescription:S,allowEditing:B&&(!S||_||R&&R.source===k1.custom&&!R.has_theme_file&&R.is_custom)}},[]),[n,i]=(0,xT.useState)(null),a=r?(0,Sc.__)("Description"):(0,Sc.__)("Excerpt"),l=(0,xT.useMemo)(()=>({anchor:n,"aria-label":a,headerTitle:a,placement:"left-start",offset:36,shift:!0}),[n,a]);if(!e)return!1;let c=!!t&&(0,rr.jsx)(sa.__experimentalText,{align:"left",numberOfLines:4,truncate:o,children:(0,xZ.decodeEntities)(t)});if(!o)return c;let u=r?(0,Sc.__)("Add a description\u2026"):(0,Sc.__)("Add an excerpt\u2026"),d=r?(0,Sc.__)("Edit description"):(0,Sc.__)("Edit excerpt");return(0,rr.jsxs)(sa.__experimentalVStack,{children:[c,(0,rr.jsx)(sa.Dropdown,{className:"editor-post-excerpt__dropdown",contentClassName:"editor-post-excerpt__dropdown__content",popoverProps:l,focusOnMount:!0,ref:i,renderToggle:({onToggle:f})=>(0,rr.jsx)(sa.Button,{__next40pxDefaultSize:!0,onClick:f,variant:"link",children:c?d:u}),renderContent:({onClose:f})=>(0,rr.jsxs)(rr.Fragment,{children:[(0,rr.jsx)(wZ.__experimentalInspectorPopoverHeader,{title:a,onClose:f}),(0,rr.jsx)(sa.__experimentalVStack,{spacing:4,children:(0,rr.jsx)(r0.Slot,{children:m=>(0,rr.jsxs)(rr.Fragment,{children:[(0,rr.jsx)(t0,{hideLabelFromVision:!0,updateOnBlur:!0}),m]})})})]})})]})}var Mi=s(E(),1),Y3=s(mo(),1),cn=s(A(),1),RZ=s(sy(),1),TT=s(D(),1),AZ=s(he(),1),qh=s(O(),1),cm=s($(),1),OZ=s(W(),1);var PZ=s(O(),1),kZ=s(W(),1);function CT({children:e,supportKeys:t}){let{postType:r,themeSupports:o}=(0,PZ.useSelect)(i=>({postType:i(w).getEditedPostAttribute("type"),themeSupports:i(kZ.store).getThemeSupports()}),[]);return(Array.isArray(t)?t:[t]).some(i=>{let a=o?.[i]??!1;return i==="post-thumbnails"&&Array.isArray(a)?a.includes(r):a})?e:null}var W3=s(C(),1);function oCe({children:e}){return(0,W3.jsx)(CT,{supportKeys:"post-thumbnails",children:(0,W3.jsx)(tr,{supportKeys:"thumbnail",children:e})})}var _c=oCe;var zo=s(C(),1),EZ=["image"],nCe=(0,Mi.__)("Featured image"),iCe=(0,Mi.__)("Add a featured image"),sCe=(0,zo.jsx)("p",{children:(0,Mi.__)("To edit the featured image, you need permission to upload media.")});function aCe(e,t){if(!e)return{};let r=(0,Y3.applyFilters)("editor.PostFeaturedImage.imageSize","large",e.id,t);if(r in(e?.media_details?.sizes??{}))return{mediaWidth:e.media_details.sizes[r].width,mediaHeight:e.media_details.sizes[r].height,mediaSourceUrl:e.media_details.sizes[r].source_url};let o=(0,Y3.applyFilters)("editor.PostFeaturedImage.imageSize","thumbnail",e.id,t);return o in(e?.media_details?.sizes??{})?{mediaWidth:e.media_details.sizes[o].width,mediaHeight:e.media_details.sizes[o].height,mediaSourceUrl:e.media_details.sizes[o].source_url}:{mediaWidth:e.media_details.width,mediaHeight:e.media_details.height,mediaSourceUrl:e.source_url}}function lCe({currentPostId:e,featuredImageId:t,onUpdateImage:r,onRemoveImage:o,media:n,postType:i,noticeUI:a,noticeOperations:l,isRequestingFeaturedImageMedia:c}){let u=(0,TT.useRef)(!1),[d,f]=(0,TT.useState)(!1),{getSettings:m}=(0,qh.useSelect)(cm.store),{mediaSourceUrl:h}=aCe(n,e);function g(_){m().mediaUpload({allowedTypes:EZ,filesList:_,onFileChange([S]){if((0,RZ.isBlobURL)(S?.url)){f(!0);return}S&&r(S),f(!1)},onError(S){l.removeAllNotices(),l.createErrorNotice(S)},multiple:!1})}function v(_){return _.alt_text?(0,Mi.sprintf)((0,Mi.__)("Current image: %s"),_.alt_text):(0,Mi.sprintf)((0,Mi.__)("The current image has no alternative text. The file name is: %s"),_.media_details.sizes?.full?.file||_.slug)}function y(_){u.current&&_&&(_.focus(),u.current=!1)}let b=!c&&!!t&&!n;return(0,zo.jsxs)(_c,{children:[a,(0,zo.jsxs)("div",{className:"editor-post-featured-image",children:[n&&(0,zo.jsx)("div",{id:`editor-post-featured-image-${t}-describedby`,className:"hidden",children:v(n)}),(0,zo.jsx)(cm.MediaUploadCheck,{fallback:sCe,children:(0,zo.jsx)(cm.MediaUpload,{title:i?.labels?.featured_image||nCe,onSelect:r,unstableFeaturedImageFlow:!0,allowedTypes:EZ,modalClass:"editor-post-featured-image__media-modal",render:({open:_})=>(0,zo.jsxs)("div",{className:"editor-post-featured-image__container",children:[b?(0,zo.jsx)(cn.Notice,{status:"warning",isDismissible:!1,children:(0,Mi.__)("Could not retrieve the featured image data.")}):(0,zo.jsxs)(cn.Button,{__next40pxDefaultSize:!0,ref:y,className:t?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:_,"aria-label":t?(0,Mi.__)("Edit or replace the featured image"):null,"aria-describedby":t?`editor-post-featured-image-${t}-describedby`:null,"aria-haspopup":"dialog",disabled:d,accessibleWhenDisabled:!0,children:[!!t&&n&&(0,zo.jsx)("img",{className:"editor-post-featured-image__preview-image",src:h,alt:v(n)}),(d||c)&&(0,zo.jsx)(cn.Spinner,{}),!t&&!d&&(i?.labels?.set_featured_image||iCe)]}),!!t&&(0,zo.jsxs)(cn.__experimentalHStack,{className:re("editor-post-featured-image__actions",{"editor-post-featured-image__actions-missing-image":b,"editor-post-featured-image__actions-is-requesting-image":c}),children:[(0,zo.jsx)(cn.Button,{__next40pxDefaultSize:!0,className:"editor-post-featured-image__action",onClick:_,"aria-haspopup":"dialog",variant:b?"secondary":void 0,children:(0,Mi.__)("Replace")}),(0,zo.jsx)(cn.Button,{__next40pxDefaultSize:!0,className:"editor-post-featured-image__action",onClick:()=>{o(),u.current=!0},variant:b?"secondary":void 0,isDestructive:b,children:(0,Mi.__)("Remove")})]}),(0,zo.jsx)(cn.DropZone,{onFilesDrop:g})]}),value:t})})]})]})}var cCe=(0,qh.withSelect)(e=>{let{getEntityRecord:t,getPostType:r,hasFinishedResolution:o}=e(OZ.store),{getCurrentPostId:n,getEditedPostAttribute:i}=e(w),a=i("featured_media");return{media:a?t("postType","attachment",a,{context:"view"}):null,currentPostId:n(),postType:r(i("type")),featuredImageId:a,isRequestingFeaturedImageMedia:!!a&&!o("getEntityRecord",["postType","attachment",a,{context:"view"}])}}),uCe=(0,qh.withDispatch)((e,{noticeOperations:t},{select:r})=>{let{editPost:o}=e(w);return{onUpdateImage(n){o({featured_media:n.id})},onDropImage(n){r(cm.store).getSettings().mediaUpload({allowedTypes:["image"],filesList:n,onFileChange([i]){o({featured_media:i.id})},onError(i){t.removeAllNotices(),t.createErrorNotice(i)},multiple:!1})},onRemoveImage(){o({featured_media:0})}}}),n0=(0,AZ.compose)(cn.withNotices,cCe,uCe,(0,cn.withFilters)("editor.PostFeaturedImage"))(lCe);var IZ=s(E(),1),NZ=s(A(),1),PT=s(O(),1),FZ=s(W(),1);var Zh=s(C(),1),q3="featured-image";function kT({withPanelBody:e=!0}){let{postType:t,isEnabled:r,isOpened:o}=(0,PT.useSelect)(i=>{let{getEditedPostAttribute:a,isEditorPanelEnabled:l,isEditorPanelOpened:c}=i(w),{getPostType:u}=i(FZ.store);return{postType:u(a("type")),isEnabled:l(q3),isOpened:c(q3)}},[]),{toggleEditorPanelOpened:n}=(0,PT.useDispatch)(w);return r?e?(0,Zh.jsx)(_c,{children:(0,Zh.jsx)(NZ.PanelBody,{title:t?.labels?.featured_image??(0,IZ.__)("Featured image"),opened:o,onToggle:()=>n(q3),children:(0,Zh.jsx)(n0,{})})}):(0,Zh.jsx)(_c,{children:(0,Zh.jsx)(n0,{})}):null}var Mn=s(E(),1),ET=s(A(),1),RT=s(O(),1),MZ=s(he(),1),LZ=s(W(),1);var DZ=s(O(),1);var BZ=s(C(),1);function Kh({children:e}){return(0,DZ.useSelect)(r=>r(w).getEditorSettings().disablePostFormats,[])?null:(0,BZ.jsx)(tr,{supportKeys:"post-formats",children:e})}var um=s(C(),1),i0=[{id:"aside",caption:(0,Mn.__)("Aside")},{id:"audio",caption:(0,Mn.__)("Audio")},{id:"chat",caption:(0,Mn.__)("Chat")},{id:"gallery",caption:(0,Mn.__)("Gallery")},{id:"image",caption:(0,Mn.__)("Image")},{id:"link",caption:(0,Mn.__)("Link")},{id:"quote",caption:(0,Mn.__)("Quote")},{id:"standard",caption:(0,Mn.__)("Standard")},{id:"status",caption:(0,Mn.__)("Status")},{id:"video",caption:(0,Mn.__)("Video")}].sort((e,t)=>{let r=e.caption.toUpperCase(),o=t.caption.toUpperCase();return r<o?-1:r>o?1:0});function s0(){let t=`post-format-selector-${(0,MZ.useInstanceId)(s0)}`,{postFormat:r,suggestedFormat:o,supportedFormats:n}=(0,RT.useSelect)(u=>{let{getEditedPostAttribute:d,getSuggestedPostFormat:f}=u(w),m=d("format"),h=u(LZ.store).getThemeSupports();return{postFormat:m??"standard",suggestedFormat:f(),supportedFormats:h.formats}},[]),i=i0.filter(u=>n?.includes(u.id)||r===u.id),a=i.find(u=>u.id===o),{editPost:l}=(0,RT.useDispatch)(w),c=u=>l({format:u});return(0,um.jsx)(Kh,{children:(0,um.jsxs)("div",{className:"editor-post-format",children:[(0,um.jsx)(ET.RadioControl,{className:"editor-post-format__options",label:(0,Mn.__)("Post Format"),selected:r,onChange:u=>c(u),id:t,options:i.map(u=>({label:u.caption,value:u.id})),hideLabelFromVision:!0}),a&&a.id!==r&&(0,um.jsx)("p",{className:"editor-post-format__suggestion",children:(0,um.jsx)(ET.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>c(a.id),children:(0,Mn.sprintf)((0,Mn.__)("Apply suggested format: %s"),a.caption)})})]})})}var fm=s(E(),1),Z3=s(A(),1),a0=s(O(),1);var K3=s(Ir(),1);var VZ=s(O(),1);var jZ=s(C(),1);function dCe({children:e}){let{lastRevisionId:t,revisionsCount:r}=(0,VZ.useSelect)(o=>{let{getCurrentPostLastRevisionId:n,getCurrentPostRevisionsCount:i}=o(w);return{lastRevisionId:n(),revisionsCount:i()}},[]);return!t||r<2?null:(0,jZ.jsx)(tr,{supportKeys:"revisions",children:e})}var dm=dCe;var Xh=s(C(),1);function zZ(){return(0,a0.useSelect)(e=>{let{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:r,getEditorSettings:o}=e(w);return{lastRevisionId:t(),revisionsCount:r(),disableVisualRevisions:!!o().disableVisualRevisions}},[])}function fCe(){let{lastRevisionId:e,revisionsCount:t,disableVisualRevisions:r}=zZ(),{setCurrentRevisionId:o}=N((0,a0.useDispatch)(w)),n=r?{href:(0,K3.addQueryArgs)("revision.php",{revision:e})}:{onClick:()=>o(e)};return(0,Xh.jsx)(dm,{children:(0,Xh.jsx)(Z3.Button,{__next40pxDefaultSize:!0,...n,className:"editor-post-last-revision__title",icon:xl,iconPosition:"right",text:(0,fm.sprintf)((0,fm.__)("Revisions (%s)"),t)})})}function UZ(){let{lastRevisionId:e,revisionsCount:t,disableVisualRevisions:r}=zZ(),{setCurrentRevisionId:o}=N((0,a0.useDispatch)(w)),n=r?{href:(0,K3.addQueryArgs)("revision.php",{revision:e})}:{onClick:()=>o(e)};return(0,Xh.jsx)(dm,{children:(0,Xh.jsx)(ht,{label:(0,fm.__)("Revisions"),children:(0,Xh.jsx)(Z3.Button,{...n,className:"editor-private-post-last-revision__button",text:t,"aria-label":(0,fm.sprintf)((0,fm.__)("Open revisions screen: %s revisions"),t),variant:"tertiary",size:"compact"})})})}var AT=fCe;var HZ=s(A(),1);var OT=s(C(),1);function mCe(){return(0,OT.jsx)(dm,{children:(0,OT.jsx)(HZ.PanelBody,{className:"editor-post-last-revision__panel",children:(0,OT.jsx)(AT,{})})})}var GZ=mCe;var ko=s(E(),1),aa=s(A(),1),c0=s(O(),1),Q3=s(Ir(),1),l0=s(D(),1),Qh=s(mo(),1),KZ=s(he(),1),J3=s(W(),1);var wc=s(E(),1),pCe="authentication-failed",hCe="connection-expired",gCe="connection-limit-exceeded",WZ="document-size-limit-exceeded",YZ="unknown-error",X3={[pCe]:{title:(0,wc.__)("Unable to connect"),description:(0,wc.__)("Real-time collaboration couldn't verify your permissions. Check that you have access to edit this post or contact your site administrator.")},[hCe]:{title:(0,wc.__)("Connection expired"),description:(0,wc.__)("Your connection to real-time collaboration has timed out. Editing is paused to prevent conflicts with other editors.")},[gCe]:{title:(0,wc.__)("Too many editors connected"),description:(0,wc.__)("Real-time collaboration has reached its connection limit. Try again later or contact your site administrator.")},[YZ]:{title:(0,wc.__)("Connection lost"),description:(0,wc.__)("The connection to real-time collaboration was interrupted. Editing is paused to prevent conflicts with other editors.")}};function qZ(e){return e?.code&&X3[e?.code]?X3[e.code]:X3[YZ]}var Kt=s(C(),1);function ZZ(){let{isCollaborationSupported:e,syncConnectionStatus:t}=(0,c0.useSelect)(r=>{let{isCollaborationSupported:o,getSyncConnectionStatus:n}=N(r(J3.store));return{isCollaborationSupported:o(),syncConnectionStatus:n()}},[]);return e?null:WZ===t?.error?.code?(0,Kt.jsx)("p",{children:(0,ko.__)("Because this post is too large for real-time collaboration, only one person can edit at a time.")}):(0,Kt.jsx)("p",{children:(0,ko.__)("Because this post uses plugins that aren\u2019t compatible with real-time collaboration, only one person can edit at a time.")})}function XZ(){let t="core/editor/post-locked-modal-"+(0,KZ.useInstanceId)(XZ),{autosave:r,updatePostLock:o}=(0,c0.useDispatch)(w),{isCollaborationEnabled:n,isLocked:i,isTakeover:a,user:l,postId:c,postLockUtils:u,activePostLock:d,postType:f,previewLink:m}=(0,c0.useSelect)(_=>{let{isPostLocked:S,isPostLockTakeover:x,getPostLockUser:T,getCurrentPostId:R,getActivePostLock:F,getEditedPostAttribute:B,getEditedPostPreviewLink:z,getEditorSettings:L,isCollaborationEnabledForCurrentPost:M}=N(_(w)),{getPostType:k}=_(J3.store);return{isCollaborationEnabled:M(),isLocked:S(),isTakeover:x(),user:T(),postId:R(),postLockUtils:L().postLockUtils,activePostLock:F(),postType:k(B("type")),previewLink:z()}},[]);if((0,l0.useEffect)(()=>{function _(T){i||(T["wp-refresh-post-lock"]={lock:d,post_id:c})}function S(T){if(!T["wp-refresh-post-lock"])return;let R=T["wp-refresh-post-lock"];R.lock_error?(r(),o({isLocked:!0,isTakeover:!0,user:{name:R.lock_error.name,avatar:R.lock_error.avatar_src_2x}})):R.new_lock&&o({isLocked:!1,activePostLock:R.new_lock})}function x(){if(i||!d)return;let T=new window.FormData;if(T.append("action","wp-remove-post-lock"),T.append("_wpnonce",u.unlockNonce),T.append("post_ID",c),T.append("active_post_lock",d),window.navigator.sendBeacon)window.navigator.sendBeacon(u.ajaxUrl,T);else{let R=new window.XMLHttpRequest;R.open("POST",u.ajaxUrl,!1),R.send(T)}}return(0,Qh.addAction)("heartbeat.send",t,_),(0,Qh.addAction)("heartbeat.tick",t,S),window.addEventListener("beforeunload",x),()=>{(0,Qh.removeAction)("heartbeat.send",t),(0,Qh.removeAction)("heartbeat.tick",t),window.removeEventListener("beforeunload",x)}},[]),!i||n)return null;let h=l.name,g=l.avatar,v=(0,Q3.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:c,action:"edit",_wpnonce:u.nonce}),y=(0,Q3.addQueryArgs)("edit.php",{post_type:f?.slug}),b=(0,ko.__)("Exit editor");return(0,Kt.jsx)(aa.Modal,{title:a?(0,ko.__)("Someone else has taken over this post"):(0,ko.__)("This post is already being edited"),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"editor-post-locked-modal",size:"medium",children:(0,Kt.jsxs)(aa.__experimentalHStack,{alignment:"top",spacing:6,children:[!!g&&(0,Kt.jsx)("img",{src:g,alt:(0,ko.__)("Avatar"),className:"editor-post-locked-modal__avatar",width:64,height:64}),(0,Kt.jsxs)("div",{children:[!!a&&(0,Kt.jsxs)(Kt.Fragment,{children:[(0,Kt.jsx)("p",{children:(0,l0.createInterpolateElement)(h?(0,ko.sprintf)((0,ko.__)("<strong>%s</strong> now has editing control of this post (<PreviewLink />). Don\u2019t worry, your changes up to this moment have been saved."),h):(0,ko.__)("Another user now has editing control of this post (<PreviewLink />). Don\u2019t worry, your changes up to this moment have been saved."),{strong:(0,Kt.jsx)("strong",{}),PreviewLink:(0,Kt.jsx)(aa.ExternalLink,{href:m,children:(0,ko.__)("preview")})})}),(0,Kt.jsx)(ZZ,{})]}),!a&&(0,Kt.jsxs)(Kt.Fragment,{children:[(0,Kt.jsx)("p",{children:(0,l0.createInterpolateElement)(h?(0,ko.sprintf)((0,ko.__)("<strong>%s</strong> is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),h):(0,ko.__)("Another user is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),{strong:(0,Kt.jsx)("strong",{}),PreviewLink:(0,Kt.jsx)(aa.ExternalLink,{href:m,children:(0,ko.__)("preview")})})}),(0,Kt.jsx)(ZZ,{}),(0,Kt.jsx)("p",{children:(0,ko.__)("If you take over, the other user will lose editing control to the post, but their changes will be saved.")})]}),(0,Kt.jsxs)(aa.__experimentalHStack,{className:"editor-post-locked-modal__buttons",justify:"flex-end",children:[!a&&(0,Kt.jsx)(aa.Button,{__next40pxDefaultSize:!0,variant:"tertiary",href:v,children:(0,ko.__)("Take over")}),(0,Kt.jsx)(aa.Button,{__next40pxDefaultSize:!0,variant:"primary",href:y,children:b})]})]})]})})}var QZ=XZ;var $Z=s(E(),1),eK=s(A(),1),NT=s(O(),1);var JZ=s(O(),1);function vCe({children:e}){let{hasPublishAction:t,isPublished:r}=(0,JZ.useSelect)(o=>{let{isCurrentPostPublished:n,getCurrentPost:i}=o(w);return{hasPublishAction:i()._links?.["wp:action-publish"]??!1,isPublished:n()}},[]);return r||!t?null:e}var IT=vCe;var $3=s(C(),1);function yCe(){let e=(0,NT.useSelect)(o=>o(w).getEditedPostAttribute("status"),[]),{editPost:t}=(0,NT.useDispatch)(w),r=()=>{t({status:e==="pending"?"draft":"pending"})};return(0,$3.jsx)(IT,{children:(0,$3.jsx)(eK.CheckboxControl,{label:(0,$Z.__)("Pending review"),checked:e==="pending",onChange:r})})}var tK=yCe;var rK=s(D(),1),xc=s(A(),1),Jh=s(E(),1),FT=s(O(),1),oK=s(mo(),1),nK=s(W(),1);var vs=s(C(),1);function bCe(e){let t=(0,rK.renderToString)((0,vs.jsxs)("div",{className:"editor-post-preview-button__interstitial-message",children:[(0,vs.jsxs)(xc.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96",children:[(0,vs.jsx)(xc.Path,{className:"outer",d:"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",fill:"none"}),(0,vs.jsx)(xc.Path,{className:"inner",d:"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",fill:"none"})]}),(0,vs.jsx)("p",{children:(0,Jh.__)("Generating preview\u2026")})]}));t+=`
		<style>
			body {
				margin: 0;
			}
			.editor-post-preview-button__interstitial-message {
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: center;
				height: 100vh;
				width: 100vw;
			}
			@-webkit-keyframes paint {
				0% {
					stroke-dashoffset: 0;
				}
			}
			@-moz-keyframes paint {
				0% {
					stroke-dashoffset: 0;
				}
			}
			@-o-keyframes paint {
				0% {
					stroke-dashoffset: 0;
				}
			}
			@keyframes paint {
				0% {
					stroke-dashoffset: 0;
				}
			}
			.editor-post-preview-button__interstitial-message svg {
				width: 192px;
				height: 192px;
				stroke: #555d66;
				stroke-width: 0.75;
			}
			.editor-post-preview-button__interstitial-message svg .outer,
			.editor-post-preview-button__interstitial-message svg .inner {
				stroke-dasharray: 280;
				stroke-dashoffset: 280;
				-webkit-animation: paint 1.5s ease infinite alternate;
				-moz-animation: paint 1.5s ease infinite alternate;
				-o-animation: paint 1.5s ease infinite alternate;
				animation: paint 1.5s ease infinite alternate;
			}
			p {
				text-align: center;
				font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
			}
		</style>
	`,t=(0,oK.applyFilters)("editor.PostPreview.interstitialMarkup",t),e.write(t),e.title=(0,Jh.__)("Generating preview\u2026"),e.close()}function od({className:e,textContent:t,forceIsAutosaveable:r,role:o,onPreview:n}){let{postId:i,currentPostLink:a,previewLink:l,isSaveable:c,isViewable:u}=(0,FT.useSelect)(g=>{let v=g(w),_=g(nK.store).getPostType(v.getCurrentPostType("type"))?.viewable??!1;return _?{postId:v.getCurrentPostId(),currentPostLink:v.getCurrentPostAttribute("link"),previewLink:v.getEditedPostPreviewLink(),isSaveable:v.isEditedPostSaveable(),isViewable:_}:{isViewable:_}},[]),{__unstableSaveForPreview:d}=(0,FT.useDispatch)(w);if(!u)return null;let f=`wp-preview-${i}`;return(0,vs.jsx)(xc.Button,{variant:e?void 0:"tertiary",className:e||"editor-post-preview",href:l||a,target:f,accessibleWhenDisabled:!0,disabled:!c,onClick:async g=>{g.preventDefault();let v=window.open("",f);v.focus(),bCe(v.document);let y=await d({forceIsAutosaveable:r});v.location=y,n?.()},role:o,size:"compact",children:t||(0,vs.jsxs)(vs.Fragment,{children:[(0,Jh._x)("Preview","imperative verb"),(0,vs.jsx)(xc.VisuallyHidden,{as:"span",children:(0,Jh.__)("(opens in a new tab)")})]})})}var lK=s(A(),1),cK=s(D(),1),BT=s(O(),1),uK=s(he(),1);var Cc=s(E(),1),iK=s(O(),1),sK=s(he(),1);function DT(){let e=(0,sK.useViewportMatch)("medium","<"),{isPublished:t,isBeingScheduled:r,isSaving:o,isPublishing:n,hasPublishAction:i,isAutosaving:a,hasNonPostEntityChanges:l,postStatusHasChanged:c,postStatus:u,postType:d}=(0,iK.useSelect)(f=>{let{isCurrentPostPublished:m,isEditedPostBeingScheduled:h,isSavingPost:g,isPublishingPost:v,getCurrentPost:y,getCurrentPostType:b,isAutosavingPost:_,getPostEdits:S,getEditedPostAttribute:x}=f(w);return{isPublished:m(),isBeingScheduled:h(),isSaving:g(),isPublishing:v(),hasPublishAction:y()._links?.["wp:action-publish"]??!1,postType:b(),isAutosaving:_(),hasNonPostEntityChanges:f(w).hasNonPostEntityChanges(),postStatusHasChanged:!!S()?.status,postStatus:x("status")}},[]);return n?(0,Cc.__)("Publishing\u2026"):(t||r)&&o&&!a?(0,Cc.__)("Saving\u2026"):i?l||t||c&&!["future","publish"].includes(u)||!c&&u==="future"?(0,Cc.__)("Save"):r?(0,Cc.__)("Schedule"):(0,Cc.__)("Publish"):d===ur&&window?.__experimentalMediaEditor?(0,Cc.__)("Save"):e?(0,Cc.__)("Publish"):(0,Cc.__)("Submit for Review")}var $h=s(C(),1),aK=()=>{},SCe=class extends cK.Component{constructor(e){super(e),this.createOnClick=this.createOnClick.bind(this),this.closeEntitiesSavedStates=this.closeEntitiesSavedStates.bind(this),this.state={entitiesSavedStatesCallback:!1}}createOnClick(e){return(...t)=>{let{hasNonPostEntityChanges:r,setEntitiesSavedStatesCallback:o}=this.props;return r&&o?(this.setState({entitiesSavedStatesCallback:()=>e(...t)}),o(()=>this.closeEntitiesSavedStates),aK):e(...t)}}closeEntitiesSavedStates(e){let{postType:t,postId:r}=this.props,{entitiesSavedStatesCallback:o}=this.state;this.setState({entitiesSavedStatesCallback:!1},()=>{e&&e.some(n=>n.kind==="postType"&&n.name===t&&n.key===r)&&o()})}render(){let{forceIsDirty:e,hasPublishAction:t,isBeingScheduled:r,isOpen:o,isPostSavingLocked:n,isPublishable:i,isPublished:a,isSaveable:l,isSaving:c,isAutoSaving:u,isToggle:d,savePostStatus:f,onSubmit:m=aK,onToggle:h,visibility:g,hasNonPostEntityChanges:v,isSavingNonPostEntityChanges:y,postStatus:b,postStatusHasChanged:_}=this.props,S=(c||!l||n||!i&&!e)&&(!v||y),x=(a||c||!l||!i&&!e)&&(!v||y),T="publish";_?T=b:t?g==="private"?T="private":r&&(T="future"):T="pending";let R=()=>{S||(m(),f(T))},F=()=>{x||h()},B={"aria-disabled":S,className:"editor-post-publish-button",isBusy:!u&&c,variant:"primary",onClick:this.createOnClick(R),"aria-haspopup":v?"dialog":void 0},z={"aria-disabled":x,"aria-expanded":o,className:"editor-post-publish-panel__toggle",isBusy:c&&a,variant:"primary",size:"compact",onClick:this.createOnClick(F),"aria-haspopup":v?"dialog":void 0},L=d?z:B;return(0,$h.jsx)($h.Fragment,{children:(0,$h.jsx)(lK.Button,{...L,className:`${L.className} editor-post-publish-button__button`,size:"compact",children:(0,$h.jsx)(DT,{})})})}},eg=(0,uK.compose)([(0,BT.withSelect)(e=>{let{isSavingPost:t,isAutosavingPost:r,isEditedPostBeingScheduled:o,getEditedPostVisibility:n,isCurrentPostPublished:i,isEditedPostSaveable:a,isEditedPostPublishable:l,isPostSavingLocked:c,getCurrentPost:u,getCurrentPostType:d,getCurrentPostId:f,hasNonPostEntityChanges:m,isSavingNonPostEntityChanges:h,getEditedPostAttribute:g,getPostEdits:v}=e(w);return{isSaving:t(),isAutoSaving:r(),isBeingScheduled:o(),visibility:n(),isSaveable:a(),isPostSavingLocked:c(),isPublishable:l(),isPublished:i(),hasPublishAction:u()._links?.["wp:action-publish"]??!1,postType:d(),postId:f(),postStatus:g("status"),postStatusHasChanged:v()?.status,hasNonPostEntityChanges:m(),isSavingNonPostEntityChanges:h()}}),(0,BT.withDispatch)(e=>{let{editPost:t,savePost:r}=e(w);return{savePostStatus:o=>{t({status:o},{undoIgnore:!0}),r()}}})])(SCe);var eP=s(E(),1),tP=s(D(),1),ua=s(A(),1),rP=s(O(),1),fX=s(he(),1);var mX=s(W(),1);var la=s(E(),1),v0=s(A(),1),eX=s(O(),1);var tX=s(Ir(),1),rX=s(W(),1),oX=s(ft(),1);var tg=s(E(),1),dK=s(D(),1),rg=s(A(),1),fK=s(he(),1),LT=s(O(),1),mK=s($(),1);var mm=s(E(),1),MT=[{label:(0,mm.__)("Public"),value:"public",description:(0,mm.__)("Visible to everyone.")},{label:(0,mm.__)("Private"),value:"private",description:(0,mm.__)("Only visible to site admins and editors.")},{label:(0,mm.__)("Password protected"),value:"password",description:(0,mm.__)("Only visible to those who know the password.")}];var pm=s(C(),1);function u0({onClose:e}){let t=(0,fK.useInstanceId)(u0),{status:r,visibility:o,password:n}=(0,LT.useSelect)(d=>({status:d(w).getEditedPostAttribute("status"),visibility:d(w).getEditedPostVisibility(),password:d(w).getEditedPostAttribute("password")})),{editPost:i}=(0,LT.useDispatch)(w),[a,l]=(0,dK.useState)(!!n);function c(d){i({public:{status:o==="private"?"draft":r,password:""},private:{status:"private",password:""},password:{status:o==="private"?"draft":r,password:n||""}}[d]),l(d==="password")}let u=d=>{i({password:d})};return(0,pm.jsxs)("div",{className:"editor-post-visibility",children:[(0,pm.jsx)(mK.__experimentalInspectorPopoverHeader,{title:(0,tg.__)("Visibility"),help:(0,tg.__)("Control how this post is viewed."),onClose:e}),(0,pm.jsxs)(rg.__experimentalVStack,{spacing:4,children:[(0,pm.jsx)(rg.RadioControl,{label:(0,tg.__)("Visibility"),hideLabelFromVision:!0,options:MT,selected:a?"password":o,onChange:c}),a&&(0,pm.jsx)(rg.TextControl,{label:(0,tg.__)("Password"),onChange:u,value:n,placeholder:(0,tg.__)("Use a secure password"),type:"text",id:`editor-post-visibility__password-input-${t}`,__next40pxDefaultSize:!0,maxLength:255})]})]})}var pK=s(O(),1);function VT(){return e4()}function e4(){let e=(0,pK.useSelect)(t=>t(w).getEditedPostVisibility(),[]);return MT.find(t=>t.value===e)?.label}function jT(e){let t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}var _Ce=Math.pow(10,8)*24*60*60*1e3,d$e=-_Ce;var t4=6e4,r4=36e5;var wCe=3600;var hK=wCe*24,f$e=hK*7,xCe=hK*365.2425,CCe=xCe/12,m$e=CCe*3;function gK(e){let t=jT(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function o4(e){let t=jT(e);return t.setDate(1),t.setHours(0,0,0,0),t}function vK(e,t){let r=t?.additionalDigits??2,o=ECe(e),n;if(o.date){let c=RCe(o.date,r);n=ACe(c.restDateString,c.year)}if(!n||isNaN(n.getTime()))return new Date(NaN);let i=n.getTime(),a=0,l;if(o.time&&(a=OCe(o.time),isNaN(a)))return new Date(NaN);if(o.timezone){if(l=ICe(o.timezone),isNaN(l))return new Date(NaN)}else{let c=new Date(i+a),u=new Date(0);return u.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),u.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),u}return new Date(i+a+l)}var zT={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},TCe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,PCe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,kCe=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ECe(e){let t={},r=e.split(zT.dateTimeDelimiter),o;if(r.length>2)return t;if(/:/.test(r[0])?o=r[0]:(t.date=r[0],o=r[1],zT.timeZoneDelimiter.test(t.date)&&(t.date=e.split(zT.timeZoneDelimiter)[0],o=e.substr(t.date.length,e.length))),o){let n=zT.timezone.exec(o);n?(t.time=o.replace(n[1],""),t.timezone=n[1]):t.time=o}return t}function RCe(e,t){let r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),o=e.match(r);if(!o)return{year:NaN,restDateString:""};let n=o[1]?parseInt(o[1]):null,i=o[2]?parseInt(o[2]):null;return{year:i===null?n:i*100,restDateString:e.slice((o[1]||o[2]).length)}}function ACe(e,t){if(t===null)return new Date(NaN);let r=e.match(TCe);if(!r)return new Date(NaN);let o=!!r[4],n=d0(r[1]),i=d0(r[2])-1,a=d0(r[3]),l=d0(r[4]),c=d0(r[5])-1;if(o)return MCe(t,l,c)?NCe(t,l,c):new Date(NaN);{let u=new Date(0);return!DCe(t,i,a)||!BCe(t,n)?new Date(NaN):(u.setUTCFullYear(t,i,Math.max(n,a)),u)}}function d0(e){return e?parseInt(e):1}function OCe(e){let t=e.match(PCe);if(!t)return NaN;let r=n4(t[1]),o=n4(t[2]),n=n4(t[3]);return LCe(r,o,n)?r*r4+o*t4+n*1e3:NaN}function n4(e){return e&&parseFloat(e.replace(",","."))||0}function ICe(e){if(e==="Z")return 0;let t=e.match(kCe);if(!t)return 0;let r=t[1]==="+"?-1:1,o=parseInt(t[2]),n=t[3]&&parseInt(t[3])||0;return VCe(o,n)?r*(o*r4+n*t4):NaN}function NCe(e,t,r){let o=new Date(0);o.setUTCFullYear(e,0,4);let n=o.getUTCDay()||7,i=(t-1)*7+r+1-n;return o.setUTCDate(o.getUTCDate()+i),o}var FCe=[31,null,31,30,31,30,31,31,30,31,30,31];function yK(e){return e%400===0||e%4===0&&e%100!==0}function DCe(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(FCe[t]||(yK(e)?29:28))}function BCe(e,t){return t>=1&&t<=(yK(e)?366:365)}function MCe(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function LCe(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function VCe(e,t){return t>=0&&t<=59}var bK=s(po(),1),SK=s(E(),1),f0=s(O(),1),_K=s($(),1),UT=s(D(),1),wK=s(W(),1);var i4=s(C(),1),{PrivatePublishDateTimePicker:jCe}=N(_K.privateApis);function og(e){return(0,i4.jsx)(s4,{...e,showPopoverHeaderActions:!0,isCompact:!1})}function s4({onClose:e,showPopoverHeaderActions:t,isCompact:r}){let{postDate:o,postType:n}=(0,f0.useSelect)(h=>({postDate:h(w).getEditedPostAttribute("date"),postType:h(w).getCurrentPostType()}),[]),{editPost:i}=(0,f0.useDispatch)(w),a=h=>i({date:h}),[l,c]=(0,UT.useState)(o4(new Date(o))),u=(0,f0.useSelect)(h=>h(wK.store).getEntityRecords("postType",n,{status:"publish,future",after:o4(l).toISOString(),before:gK(l).toISOString(),exclude:[h(w).getCurrentPostId()],per_page:100,_fields:"id,date"}),[l,n]),d=(0,UT.useMemo)(()=>(u||[]).map(({date:h})=>({date:new Date(h)})),[u]),f=(0,bK.getSettings)(),m=/a(?!\\)/i.test(f.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,i4.jsx)(jCe,{currentDate:o,onChange:a,is12Hour:m,dateOrder:(0,SK._x)("dmy","date order"),events:d,onMonthPreviewed:h=>c(vK(h)),onClose:e,isCompact:r,showPopoverHeaderActions:t})}var Ln=s(E(),1),ys=s(po(),1),CK=s(O(),1);function ng(e){return ig(e)}function ig({full:e=!1}={}){let{date:t,isFloating:r}=(0,CK.useSelect)(o=>({date:o(w).getEditedPostAttribute("date"),isFloating:o(w).isEditedPostDateFloating()}),[]);return e?TK(t):zCe(t,{isFloating:r})}function TK(e){let t=(0,ys.getDate)(e),r=UCe(),o=(0,ys.dateI18n)((0,Ln._x)("F j, Y g:i\xA0a","post schedule full date format"),t);return(0,Ln.isRTL)()?`${r} ${o}`:`${o} ${r}`}function zCe(e,{isFloating:t=!1,now:r=new Date}={}){if(!e||t)return(0,Ln.__)("Immediately");if(!HCe(r))return TK(e);let o=(0,ys.getDate)(e);if(xK(o,r))return(0,Ln.sprintf)((0,Ln.__)("Today at %s"),(0,ys.dateI18n)((0,Ln._x)("g:i\xA0a","post schedule time format"),o));let n=new Date(r);return n.setDate(n.getDate()+1),xK(o,n)?(0,Ln.sprintf)((0,Ln.__)("Tomorrow at %s"),(0,ys.dateI18n)((0,Ln._x)("g:i\xA0a","post schedule time format"),o)):o.getFullYear()===r.getFullYear()?(0,ys.dateI18n)((0,Ln._x)("F j g:i\xA0a","post schedule date format without year"),o):(0,ys.dateI18n)((0,Ln._x)("F j, Y g:i\xA0a","post schedule full date format"),o)}function UCe(){let{timezone:e}=(0,ys.getSettings)();return e.abbr&&isNaN(Number(e.abbr))?e.abbr:`UTC${e.offset<0?"":"+"}${e.offsetFormatted}`}function HCe(e){let{timezone:t}=(0,ys.getSettings)(),r=Number(t.offset),o=-1*(e.getTimezoneOffset()/60);return r===o}function xK(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}var ym=s(E(),1),DK=s(D(),1),u4=s(O(),1),BK=s(A(),1),YT=s(W(),1);var Uo=s(E(),1),vm=s(D(),1),sg=s(A(),1),gm=s(O(),1),GT=s(W(),1),AK=s(he(),1),OK=s(Xm(),1),IK=s(ct(),1);var HT=s(A(),1),PK=s(O(),1),kK=s(W(),1);var hm=s(C(),1),GCe=3,WCe={per_page:10,orderby:"count",order:"desc",hide_empty:!0,_fields:"id,name,count",context:"view"};function EK({onSelect:e,taxonomy:t}){let{_terms:r,showTerms:o}=(0,PK.useSelect)(i=>{let a=i(kK.store).getEntityRecords("taxonomy",t.slug,WCe);return{_terms:a,showTerms:a?.length>=GCe}},[t.slug]);if(!o)return null;let n=IY(r);return(0,hm.jsxs)("div",{className:"editor-post-taxonomies__flat-term-most-used",children:[(0,hm.jsx)(HT.BaseControl.VisualLabel,{as:"h3",className:"editor-post-taxonomies__flat-term-most-used-label",children:t.labels.most_used}),(0,hm.jsx)("ul",{role:"list",className:"editor-post-taxonomies__flat-term-most-used-list",children:n.map(i=>(0,hm.jsx)("li",{children:(0,hm.jsx)(HT.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>e(i),children:i.name})},i.id))})]})}var m0=s(C(),1),a4=[],NK=100,RK={per_page:NK,_fields:"id,name",context:"view"},FK=(e,t)=>Bh(e).toLowerCase()===Bh(t).toLowerCase(),l4=(e,t)=>e.map(r=>t.find(o=>FK(o.name,r))?.id).filter(r=>r!==void 0);function c4({slug:e}){let[t,r]=(0,vm.useState)([]),[o,n]=(0,vm.useState)(""),i=(0,AK.useDebounce)(n,500),{terms:a,termIds:l,taxonomy:c,hasAssignAction:u,hasCreateAction:d,hasResolvedTerms:f}=(0,gm.useSelect)(L=>{let{getCurrentPost:M,getEditedPostAttribute:k}=L(w),{getEntityRecords:I,getEntityRecord:U,hasFinishedResolution:G}=L(GT.store),Y=M(),Z=U("root","taxonomy",e),V=Z?k(Z.rest_base):a4,j={...RK,include:V?.join(","),per_page:-1};return{hasCreateAction:Z?Y._links?.["wp:action-create-"+Z.rest_base]??!1:!1,hasAssignAction:Z?Y._links?.["wp:action-assign-"+Z.rest_base]??!1:!1,taxonomy:Z,termIds:V,terms:V?.length?I("taxonomy",e,j):a4,hasResolvedTerms:G("getEntityRecords",["taxonomy",e,j])}},[e]),{searchResults:m}=(0,gm.useSelect)(L=>{let{getEntityRecords:M}=L(GT.store);return{searchResults:o?M("taxonomy",e,{...RK,search:o}):a4}},[o,e]);(0,vm.useEffect)(()=>{if(f){let L=(a??[]).map(M=>Bh(M.name));r(L)}},[a,f]);let h=(0,vm.useMemo)(()=>(m??[]).map(L=>Bh(L.name)),[m]),{editPost:g}=(0,gm.useDispatch)(w),{saveEntityRecord:v}=(0,gm.useDispatch)(GT.store),{createErrorNotice:y}=(0,gm.useDispatch)(IK.store);if(!u)return null;async function b(L){try{let M=await v("taxonomy",e,L,{throwOnError:!0});return C3(M)}catch(M){if(M.code!=="term_exists")throw M;return{id:M.data.term_id,name:L.name}}}function _(L){g({[c.rest_base]:L})}function S(L){let M=[...a??[],...m??[]],k=L.reduce((U,G)=>(U.some(Y=>Y.toLowerCase()===G.toLowerCase())||U.push(G),U),[]),I=k.filter(U=>!M.find(G=>FK(G.name,U)));if(r(k),I.length===0){_(l4(k,M));return}d&&Promise.all(I.map(U=>b({name:U}))).then(U=>{let G=M.concat(U);_(l4(k,G))}).catch(U=>{y(U.message,{type:"snackbar"}),_(l4(k,M))})}function x(L){if(l.includes(L.id))return;let M=[...l,L.id],k=e==="post_tag"?(0,Uo.__)("Tag"):(0,Uo.__)("Term"),I=(0,Uo.sprintf)((0,Uo._x)("%s added","term"),c?.labels?.singular_name??k);(0,OK.speak)(I,"assertive"),_(M)}let T=c?.labels?.add_new_item??(e==="post_tag"?(0,Uo.__)("Add Tag"):(0,Uo.__)("Add Term")),R=c?.labels?.singular_name??(e==="post_tag"?(0,Uo.__)("Tag"):(0,Uo.__)("Term")),F=(0,Uo.sprintf)((0,Uo._x)("%s added","term"),R),B=(0,Uo.sprintf)((0,Uo._x)("%s removed","term"),R),z=(0,Uo.sprintf)((0,Uo._x)("Remove %s","term"),R);return(0,m0.jsxs)(sg.__experimentalVStack,{spacing:4,children:[(0,m0.jsx)(sg.FormTokenField,{__next40pxDefaultSize:!0,value:t,suggestions:h,onChange:S,onInputChange:i,maxSuggestions:NK,label:T,messages:{added:F,removed:B,remove:z}}),(0,m0.jsx)(EK,{taxonomy:c,onSelect:x})]})}var WT=(0,sg.withFilters)("editor.PostTaxonomyType")(c4);var bm=s(C(),1),YCe=()=>{let e=(0,u4.useSelect)(n=>n(YT.store).getTaxonomy("post_tag")?.labels,[]),t=e?.add_new_item??(0,ym.__)("Add tag"),r=e?.name??(0,ym.__)("Tags"),o=[(0,ym.__)("Suggestion:"),(0,bm.jsx)("span",{className:"editor-post-publish-panel__link",children:t},"label")];return(0,bm.jsxs)(BK.PanelBody,{initialOpen:!1,title:o,children:[(0,bm.jsx)("p",{children:(0,ym.sprintf)((0,ym.__)("%s help users and search engines navigate your site and find your content. Add a few keywords to describe your post."),r)}),(0,bm.jsx)(WT,{slug:"post_tag"})]})},qCe=()=>{let{postHasTags:e,siteHasTags:t,isPostTypeSupported:r}=(0,u4.useSelect)(n=>{let i=n(w).getCurrentPostType(),a=n(YT.store).getEntityRecord("root","taxonomy","post_tag"),l=a?.types?.includes(i),c=a!==void 0,u=a&&n(w).getEditedPostAttribute(a.rest_base),d=l?!!n(YT.store).getEntityRecords("taxonomy","post_tag",{per_page:1})?.length:!1;return{postHasTags:!!u?.length,siteHasTags:d,isPostTypeSupported:c&&l}},[]),[o]=(0,DK.useState)(e);return!r||!t||o?null:(0,bm.jsx)(YCe,{})},MK=qCe;var qT=s(A(),1),ZT=s(O(),1),Sm=s(E(),1),LK=s(W(),1);var nd=s(C(),1),ZCe=(e,t)=>i0.filter(o=>e?.includes(o.id)).find(o=>o.id===t),KCe=({suggestedPostFormat:e,suggestionText:t,onUpdatePostFormat:r})=>(0,nd.jsx)(qT.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>r(e),children:t});function VK(){let{currentPostFormat:e,suggestion:t}=(0,ZT.useSelect)(i=>{let{getEditedPostAttribute:a,getSuggestedPostFormat:l}=i(w),c=i(LK.store).getThemeSupports().formats??[];return{currentPostFormat:a("format"),suggestion:ZCe(c,l())}},[]),{editPost:r}=(0,ZT.useDispatch)(w),o=i=>r({format:i}),n=[(0,Sm.__)("Suggestion:"),(0,nd.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Sm.__)("Use a post format")},"label")];return!t||t.id===e?null:(0,nd.jsxs)(qT.PanelBody,{initialOpen:!1,title:n,children:[(0,nd.jsx)("p",{children:(0,Sm.__)("Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.")}),(0,nd.jsx)("p",{children:(0,nd.jsx)(KCe,{onUpdatePostFormat:o,suggestedPostFormat:t.id,suggestionText:(0,Sm.sprintf)((0,Sm.__)('Apply the "%1$s" format.'),t.caption)})})]})}var XT=s(E(),1),YK=s(O(),1),qK=s(A(),1),m4=s(W(),1),QT=s(D(),1);var Ro=s(E(),1),Tc=s(D(),1),HK=s(ct(),1),or=s(A(),1),ag=s(O(),1),GK=s(he(),1),p0=s(W(),1),d4=s(Xm(),1),WK=s(ft(),1);var Eo=s(C(),1),{normalizeTextString:jK}=N(or.privateApis),{RECEIVE_INTERMEDIATE_RESULTS:XCe}=N(p0.privateApis),zK={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view",[XCe]:!0},QCe=8,UK=[];function JCe(e,t){let r=i=>t.indexOf(i.id)!==-1?!0:i.children===void 0?!1:i.children.map(r).filter(a=>a).length>0,o=(i,a)=>{let l=r(i),c=r(a);return l===c?0:l&&!c?-1:!l&&c?1:0},n=[...e];return n.sort(o),n}function $Ce(e,t,r){return e.find(o=>(!o.parent&&!t||parseInt(o.parent)===parseInt(t))&&o.name.toLowerCase()===r.toLowerCase())}function eTe(e){let t=r=>{if(e==="")return r;let o={...r};return o.children.length>0&&(o.children=o.children.map(t).filter(n=>n)),jK(o.name).indexOf(jK(e))!==-1||o.children.length>0?o:!1};return t}function f4({slug:e}){let[t,r]=(0,Tc.useState)(!1),[o,n]=(0,Tc.useState)(""),[i,a]=(0,Tc.useState)(""),[l,c]=(0,Tc.useState)(!1),[u,d]=(0,Tc.useState)(""),[f,m]=(0,Tc.useState)([]),h=(0,GK.useDebounce)(d4.speak,500),{hasCreateAction:g,hasAssignAction:v,terms:y,loading:b,availableTerms:_,taxonomy:S}=(0,ag.useSelect)(ye=>{let{getCurrentPost:oe,getEditedPostAttribute:ge}=ye(w),{getEntityRecord:Re,getEntityRecords:ze,isResolving:Ve}=ye(p0.store),tt=Re("root","taxonomy",e),vt=oe();return{hasCreateAction:tt?!!vt._links?.["wp:action-create-"+tt.rest_base]:!1,hasAssignAction:tt?!!vt._links?.["wp:action-assign-"+tt.rest_base]:!1,terms:tt?ge(tt.rest_base):UK,loading:Ve("getEntityRecords",["taxonomy",e,zK]),availableTerms:ze("taxonomy",e,zK)||UK,taxonomy:tt}},[e]),{editPost:x}=(0,ag.useDispatch)(w),{saveEntityRecord:T}=(0,ag.useDispatch)(p0.store),R=(0,Tc.useMemo)(()=>JCe(IC(_),y),[_]),{createErrorNotice:F}=(0,ag.useDispatch)(HK.store);if(!v)return null;let B=ye=>T("taxonomy",e,ye,{throwOnError:!0}),z=ye=>{x({[S.rest_base]:ye})},L=ye=>{let ge=y.includes(ye)?y.filter(Re=>Re!==ye):[...y,ye];z(ge)},M=ye=>{n(ye)},k=ye=>{a(ye)},I=()=>{c(!l)},U=async ye=>{if(ye.preventDefault(),o===""||t)return;let oe=$Ce(_,i,o);if(oe){y.some(Ve=>Ve===oe.id)||z([...y,oe.id]),n(""),a("");return}r(!0);let ge;try{ge=await B({name:o,parent:i||void 0})}catch(Ve){F(Ve.message,{type:"snackbar"});return}let Re=e==="category"?(0,Ro.__)("Category"):(0,Ro.__)("Term"),ze=(0,Ro.sprintf)((0,Ro._x)("%s added","term"),S?.labels?.singular_name??Re);(0,d4.speak)(ze,"assertive"),r(!1),n(""),a(""),z([...y,ge.id])},G=ye=>{let oe=R.map(eTe(ye)).filter(Ve=>Ve),ge=Ve=>{let tt=0;for(let vt=0;vt<Ve.length;vt++)tt++,Ve[vt].children!==void 0&&(tt+=ge(Ve[vt].children));return tt};d(ye),m(oe);let Re=ge(oe),ze=(0,Ro.sprintf)((0,Ro._n)("%d result found.","%d results found.",Re),Re);h(ze,"assertive")},Y=ye=>ye.map(oe=>(0,Eo.jsxs)("div",{className:"editor-post-taxonomies__hierarchical-terms-choice",children:[(0,Eo.jsx)(or.CheckboxControl,{checked:y.indexOf(oe.id)!==-1,onChange:()=>{let ge=parseInt(oe.id,10);L(ge)},label:(0,WK.decodeEntities)(oe.name)}),!!oe.children.length&&(0,Eo.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices",children:Y(oe.children)})]},oe.id)),Z=(ye,oe,ge)=>S?.labels?.[ye]??(e==="category"?oe:ge),V=Z("add_new_item",(0,Ro.__)("Add Category"),(0,Ro.__)("Add Term")),j=Z("new_item_name",(0,Ro.__)("Add Category"),(0,Ro.__)("Add Term")),H=Z("parent_item",(0,Ro.__)("Parent Category"),(0,Ro.__)("Parent Term")),X=`\u2014 ${H} \u2014`,ae=V,ne=S?.labels?.search_items??(0,Ro.__)("Search Terms"),ue=S?.name??(0,Ro.__)("Terms"),Ye=_.length>=QCe;return(0,Eo.jsxs)(or.Flex,{direction:"column",gap:"4",children:[Ye&&!b&&(0,Eo.jsx)(or.SearchControl,{__next40pxDefaultSize:!0,label:ne,placeholder:ne,value:u,onChange:G}),b&&(0,Eo.jsx)(or.Flex,{justify:"center",style:{height:"40px"},children:(0,Eo.jsx)(or.Spinner,{})}),(0,Eo.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",tabIndex:"0",role:"group","aria-label":ue,children:Y(u!==""?f:R)}),!b&&g&&(0,Eo.jsx)(or.FlexItem,{children:(0,Eo.jsx)(or.Button,{__next40pxDefaultSize:!0,onClick:I,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":l,variant:"link",children:V})}),l&&(0,Eo.jsx)("form",{onSubmit:U,children:(0,Eo.jsxs)(or.Flex,{direction:"column",gap:"4",children:[(0,Eo.jsx)(or.TextControl,{__next40pxDefaultSize:!0,className:"editor-post-taxonomies__hierarchical-terms-input",label:j,value:o,onChange:M,required:!0}),!!_.length&&(0,Eo.jsx)(or.TreeSelect,{__next40pxDefaultSize:!0,label:H,noOptionLabel:X,onChange:k,selectedId:i,tree:R}),(0,Eo.jsx)(or.FlexItem,{children:(0,Eo.jsx)(or.Button,{__next40pxDefaultSize:!0,variant:"secondary",type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit",children:ae})})]})})]})}var KT=(0,or.withFilters)("editor.PostTaxonomyType")(f4);var lg=s(C(),1);function tTe(){let{hasNoCategory:e,hasSiteCategories:t}=(0,YK.useSelect)(i=>{let a=i(w).getCurrentPostType(),{canUser:l,getEntityRecord:c}=i(m4.store),u=c("root","taxonomy","category"),d=l("read",{kind:"root",name:"site"})?c("root","site")?.default_category:void 0,f=d?c("taxonomy","category",d):void 0,m=u&&u.types.some(y=>y===a),h=u&&i(w).getEditedPostAttribute(u.rest_base),g=m?!!i(m4.store).getEntityRecords("taxonomy","category",{exclude:[d],per_page:1})?.length:!1;return{hasNoCategory:!!u&&!!f&&m&&(h?.length===0||h?.length===1&&f?.id===h[0]),hasSiteCategories:g}},[]),[r,o]=(0,QT.useState)(!1);if((0,QT.useEffect)(()=>{e&&o(!0)},[e]),!r||!t)return null;let n=[(0,XT.__)("Suggestion:"),(0,lg.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,XT.__)("Assign a category")},"label")];return(0,lg.jsxs)(qK.PanelBody,{initialOpen:!1,title:n,children:[(0,lg.jsx)("p",{children:(0,XT.__)("Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.")}),(0,lg.jsx)(KT,{slug:"category"})]})}var ZK=tTe;var Ka=s(A(),1),g0=s(O(),1),id=s(E(),1),h0=s($(),1),JT=s(D(),1),QK=s(sy(),1);var KK=s(Ir(),1);function rTe(e){let t=new Set;return Object.fromEntries(e.map(r=>{let o=(0,KK.getFilename)(r),n="";if(o){let i=o.split(".");i.length>1&&i.pop(),n=i.join(".")}return n||(n=ep()),t.has(n)&&(n=`${n}-${ep()}`),t.add(n),[r,n]}))}function XK(e){return Object.fromEntries(Object.entries(rTe(e)).map(([t,r])=>{let o=window.fetch(t.includes("?")?t:t+"?").then(n=>n.blob()).then(n=>new File([n],`${r}.png`,{type:n.type}));return[t,o]}))}var bs=s(C(),1);function JK(e){let t=[];return e.forEach(r=>{t.push(r),t.push(...JK(r.innerBlocks))}),t}function oTe(e){if(e.name==="core/image"||e.name==="core/cover")return e.attributes.url&&!e.attributes.id;if(e.name==="core/media-text")return e.attributes.mediaUrl&&!e.attributes.mediaId}function p4(e){if(e.name==="core/image"||e.name==="core/cover"){let{url:t,alt:r,id:o}=e.attributes;return{url:t,alt:r,id:o}}if(e.name==="core/media-text"){let{mediaUrl:t,mediaAlt:r,mediaId:o}=e.attributes;return{url:t,alt:r,id:o}}return{}}function nTe({clientId:e,alt:t,url:r}){let{selectBlock:o}=(0,g0.useDispatch)(h0.store);return(0,bs.jsx)(Ka.__unstableMotion.img,{tabIndex:0,role:"button","aria-label":(0,id.__)("Select image block."),onClick:()=>{o(e)},onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&(o(e),n.preventDefault())},alt:t,src:r,animate:{opacity:1},exit:{opacity:0,scale:0},style:{width:"32px",height:"32px",objectFit:"cover",borderRadius:"2px",cursor:"pointer"},whileHover:{scale:1.08}},e)}function $K(){let[e,t]=(0,JT.useState)(!1),[r,o]=(0,JT.useState)(!1),[n,i]=(0,JT.useState)(!1),{editorBlocks:a,mediaUpload:l}=(0,g0.useSelect)(h=>({editorBlocks:h(h0.store).getBlocks(),mediaUpload:h(h0.store).getSettings().mediaUpload}),[]),c=JK(a).filter(h=>oTe(h)),{updateBlockAttributes:u}=(0,g0.useDispatch)(h0.store);if(!l||!c.length)return null;let d=[(0,id.__)("Suggestion:"),(0,bs.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,id.__)("External media")},"label")];function f(h,g){(h.name==="core/image"||h.name==="core/cover")&&u(h.clientId,{id:g.id,url:g.url}),h.name==="core/media-text"&&u(h.clientId,{mediaId:g.id,mediaUrl:g.url})}function m(){t(!0),i(!1);let h=new Set(c.map(v=>{let{url:y}=p4(v);return y})),g=Object.fromEntries(Object.entries(XK([...h])).map(([v,y])=>{let b=y.then(_=>new Promise((S,x)=>{l({filesList:[_],onFileChange:([T])=>{(0,QK.isBlobURL)(T.url)||S(T)},onError(){x()}})}));return[v,b]}));Promise.allSettled(c.map(v=>{let{url:y}=p4(v);return g[y].then(b=>f(v,b)).then(()=>o(!0)).catch(()=>i(!0))})).finally(()=>{t(!1)})}return(0,bs.jsxs)(Ka.PanelBody,{initialOpen:!0,title:d,children:[(0,bs.jsx)("p",{children:(0,id.__)("Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.")}),(0,bs.jsxs)("div",{style:{display:"inline-flex",flexWrap:"wrap",gap:"8px"},children:[(0,bs.jsx)(Ka.__unstableAnimatePresence,{onExitComplete:()=>o(!1),children:c.map(h=>{let{url:g,alt:v}=p4(h);return(0,bs.jsx)(nTe,{clientId:h.clientId,url:g,alt:v},h.clientId)})}),e||r?(0,bs.jsx)(Ka.Spinner,{}):(0,bs.jsx)(Ka.Button,{size:"compact",variant:"primary",onClick:m,children:(0,id._x)("Upload","verb")})]}),n&&(0,bs.jsx)("p",{children:(0,id.__)("Upload failed, try again.")})]})}var Mt=s(C(),1);function iTe({children:e}){let{isBeingScheduled:t,isRequestingSiteIcon:r,hasPublishAction:o,siteIconUrl:n,siteTitle:i,siteHome:a}=(0,eX.useSelect)(d=>{let{getCurrentPost:f,isEditedPostBeingScheduled:m}=d(w),{getEntityRecord:h,isResolving:g}=d(rX.store),v=h("root","__unstableBase",void 0)||{};return{hasPublishAction:f()._links?.["wp:action-publish"]??!1,isBeingScheduled:m(),isRequestingSiteIcon:g("getEntityRecord",["root","__unstableBase",void 0]),siteIconUrl:v.site_icon_url,siteTitle:v.name,siteHome:v.home&&(0,tX.filterURLForDisplay)(v.home)}},[]),l=(0,Mt.jsx)(v0.Icon,{className:"components-site-icon",size:"36px",icon:aO});n&&(l=(0,Mt.jsx)("img",{alt:(0,la.__)("Site Icon"),className:"components-site-icon",src:n})),r&&(l=null);let c,u;return o?t?(c=(0,la.__)("Are you ready to schedule?"),u=(0,la.__)("Your work will be published at the specified date and time.")):(c=(0,la.__)("Are you ready to publish?"),u=(0,la.__)("Double-check your settings before publishing.")):(c=(0,la.__)("Are you ready to submit for review?"),u=(0,la.__)("Your work will be reviewed and then approved.")),(0,Mt.jsxs)("div",{className:"editor-post-publish-panel__prepublish",children:[(0,Mt.jsx)("div",{children:(0,Mt.jsx)("strong",{children:c})}),(0,Mt.jsx)("p",{children:u}),(0,Mt.jsxs)("div",{className:"components-site-card",children:[l,(0,Mt.jsxs)("div",{className:"components-site-info",children:[(0,Mt.jsx)("span",{className:"components-site-name",children:(0,oX.decodeEntities)(i)||(0,la.__)("(Untitled)")}),(0,Mt.jsx)("span",{className:"components-site-home",children:a})]})]}),(0,Mt.jsx)($K,{}),o&&(0,Mt.jsxs)(Mt.Fragment,{children:[(0,Mt.jsx)(v0.PanelBody,{initialOpen:!1,title:[(0,la.__)("Visibility:"),(0,Mt.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Mt.jsx)(VT,{})},"label")],children:(0,Mt.jsx)(u0,{})}),(0,Mt.jsx)(v0.PanelBody,{initialOpen:!1,title:[(0,la.__)("Publish:"),(0,Mt.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Mt.jsx)(ng,{})},"label")],children:(0,Mt.jsx)(og,{})})]}),(0,Mt.jsx)(VK,{}),(0,Mt.jsx)(MK,{}),(0,Mt.jsx)(ZK,{}),e]})}var nX=iTe;var Li=s(A(),1),ca=s(E(),1),sd=s(D(),1),aX=s(O(),1),$T=s(Ir(),1),lX=s(ft(),1),cX=s(he(),1),uX=s(W(),1);var Mr=s(C(),1),iX="%postname%",sX="%pagename%",sTe=e=>{let{slug:t}=e;return e.permalink_template.includes(iX)?e.permalink_template.replace(iX,t):e.permalink_template.includes(sX)?e.permalink_template.replace(sX,t):e.permalink_template};function aTe({text:e}){let[t,r]=(0,sd.useState)(!1),o=(0,sd.useRef)(),n=(0,cX.useCopyToClipboard)(e,()=>{r(!0),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(!1)},4e3)});return(0,sd.useEffect)(()=>()=>{o.current&&clearTimeout(o.current)},[]),(0,Mr.jsx)(Li.Button,{__next40pxDefaultSize:!0,variant:"secondary",ref:n,children:t?(0,ca.__)("Copied!"):(0,ca.__)("Copy")})}function dX({focusOnMount:e,children:t}){let{post:r,postType:o,isScheduled:n}=(0,aX.useSelect)(m=>{let{getEditedPostAttribute:h,getCurrentPost:g,isCurrentPostScheduled:v}=m(w),{getPostType:y}=m(uX.store);return{post:g(),postType:y(h("type")),isScheduled:v()}},[]),i=o?.labels?.singular_name,a=o?.labels?.view_item,l=o?.labels?.add_new_item,c=r.status==="future"?sTe(r):r.link,u=(0,$T.addQueryArgs)("post-new.php",{post_type:r.type}),d=(0,sd.useCallback)(m=>{e&&m&&m.focus()},[e]),f=n?(0,Mr.jsxs)(Mr.Fragment,{children:[(0,ca.__)("is now scheduled. It will go live on")," ",(0,Mr.jsx)(ng,{}),"."]}):(0,ca.__)("is now live.");return(0,Mr.jsxs)("div",{className:"post-publish-panel__postpublish",children:[(0,Mr.jsxs)(Li.PanelBody,{className:"post-publish-panel__postpublish-header",children:[(0,Mr.jsx)(Li.ExternalLink,{ref:d,href:c,children:(0,lX.decodeEntities)(r.title)||(0,ca.__)("(no title)")})," ",f]}),(0,Mr.jsxs)(Li.PanelBody,{children:[(0,Mr.jsx)("p",{className:"post-publish-panel__postpublish-subheader",children:(0,Mr.jsx)("strong",{children:(0,ca.__)("What\u2019s next?")})}),(0,Mr.jsxs)("div",{className:"post-publish-panel__postpublish-post-address-container",children:[(0,Mr.jsx)(Li.TextControl,{__next40pxDefaultSize:!0,className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:(0,ca.sprintf)((0,ca.__)("%s address"),i),value:(0,$T.safeDecodeURIComponent)(c),onFocus:m=>m.target.select()}),(0,Mr.jsx)("div",{className:"post-publish-panel__postpublish-post-address__copy-button-wrap",children:(0,Mr.jsx)(aTe,{text:c})})]}),(0,Mr.jsxs)("div",{className:"post-publish-panel__postpublish-buttons",children:[!n&&(0,Mr.jsxs)(Li.Button,{variant:"primary",href:c,__next40pxDefaultSize:!0,icon:Xn,iconPosition:"right",target:"_blank",children:[a,(0,Mr.jsx)(Li.VisuallyHidden,{as:"span",children:(0,ca.__)("(opens in a new tab)")})]}),(0,Mr.jsx)(Li.Button,{variant:n?"primary":"secondary",__next40pxDefaultSize:!0,href:u,children:l})]})]}),t]})}var Kr=s(C(),1),lTe=class extends tP.Component{constructor(){super(...arguments),this.onSubmit=this.onSubmit.bind(this),this.cancelButtonNode=(0,tP.createRef)()}componentDidMount(){this.timeoutID=setTimeout(()=>{this.cancelButtonNode.current.focus()},0)}componentWillUnmount(){clearTimeout(this.timeoutID)}componentDidUpdate(e){(e.isPublished&&!this.props.isSaving&&this.props.isDirty||this.props.currentPostId!==e.currentPostId)&&this.props.onClose()}onSubmit(){let{onClose:e,hasPublishAction:t,isPostTypeViewable:r}=this.props;(!t||!r)&&e()}render(){let{forceIsDirty:e,isBeingScheduled:t,isPublished:r,isPublishSidebarEnabled:o,isScheduled:n,isSaving:i,isSavingNonPostEntityChanges:a,onClose:l,onTogglePublishSidebar:c,PostPublishExtension:u,PrePublishExtension:d,currentPostId:f,...m}=this.props,{hasPublishAction:h,isDirty:g,isPostTypeViewable:v,...y}=m,b=r||n&&t,_=!b&&!i,S=b&&!i;return(0,Kr.jsxs)("div",{className:"editor-post-publish-panel",...y,children:[(0,Kr.jsx)("div",{className:"editor-post-publish-panel__header",children:S?(0,Kr.jsx)(ua.Button,{size:"compact",onClick:l,icon:Kn,label:(0,eP.__)("Close panel")}):(0,Kr.jsxs)(Kr.Fragment,{children:[(0,Kr.jsx)("div",{className:"editor-post-publish-panel__header-cancel-button",children:(0,Kr.jsx)(ua.Button,{ref:this.cancelButtonNode,accessibleWhenDisabled:!0,disabled:a,onClick:l,variant:"secondary",size:"compact",children:(0,eP.__)("Cancel")})}),(0,Kr.jsx)("div",{className:"editor-post-publish-panel__header-publish-button",children:(0,Kr.jsx)(eg,{onSubmit:this.onSubmit,forceIsDirty:e})})]})}),(0,Kr.jsxs)("div",{className:"editor-post-publish-panel__content",children:[_&&(0,Kr.jsx)(nX,{children:d&&(0,Kr.jsx)(d,{})}),S&&(0,Kr.jsx)(dX,{focusOnMount:!0,children:u&&(0,Kr.jsx)(u,{})}),i&&(0,Kr.jsx)(ua.Spinner,{})]}),(0,Kr.jsx)("div",{className:"editor-post-publish-panel__footer",children:(0,Kr.jsx)(ua.CheckboxControl,{label:(0,eP.__)("Always show pre-publish checks."),checked:o,onChange:c})})]})}},oP=(0,fX.compose)([(0,rP.withSelect)(e=>{let{getPostType:t}=e(mX.store),{getCurrentPost:r,getCurrentPostId:o,getEditedPostAttribute:n,isCurrentPostPublished:i,isCurrentPostScheduled:a,isEditedPostBeingScheduled:l,isEditedPostDirty:c,isAutosavingPost:u,isSavingPost:d,isSavingNonPostEntityChanges:f}=e(w),{isPublishSidebarEnabled:m}=e(w),h=t(n("type"));return{hasPublishAction:r()._links?.["wp:action-publish"]??!1,isPostTypeViewable:h?.viewable,isBeingScheduled:l(),isDirty:c(),isPublished:i(),isPublishSidebarEnabled:m(),isSaving:d()&&!u(),isSavingNonPostEntityChanges:f(),isScheduled:a(),currentPostId:o()}}),(0,rP.withDispatch)((e,{isPublishSidebarEnabled:t})=>{let{disablePublishSidebar:r,enablePublishSidebar:o}=e(w);return{onTogglePublishSidebar:()=>{t?r():o()}}}),ua.withFocusReturn,ua.withConstrainedTabbing])(lTe);var cP=s(A(),1),uP=s(he(),1),dP=s(O(),1),fP=s(D(),1),_m=s(E(),1);var bX=s(yo(),1),SX=s(lt(),1);var Vi=s(A(),1),Et=s(E(),1),lP=s(O(),1),y0=s(D(),1),gX=s(W(),1),vX=s($(),1),yX=s(he(),1);var h4=s(E(),1),hX=s(A(),1),iP=s(O(),1);var pX=s(O(),1);function nP({children:e}){let{hasStickyAction:t,postType:r}=(0,pX.useSelect)(o=>({hasStickyAction:o(w).getCurrentPost()._links?.["wp:action-sticky"]??!1,postType:o(w).getCurrentPostType()}),[]);return r!=="post"||!t?null:e}var g4=s(C(),1);function sP(){let e=(0,iP.useSelect)(r=>r(w).getEditedPostAttribute("sticky")??!1,[]),{editPost:t}=(0,iP.useDispatch)(w);return(0,g4.jsx)(nP,{children:(0,g4.jsx)(hX.CheckboxControl,{className:"editor-post-sticky__checkbox-control",label:(0,h4.__)("Sticky"),help:(0,h4.__)("Pin this post to the top of the blog."),checked:e,onChange:()=>t({sticky:!e})})})}var Xr=s(C(),1),aP={"auto-draft":{label:(0,Et.__)("Draft"),icon:Wm},draft:{label:(0,Et.__)("Draft"),icon:Wm},pending:{label:(0,Et.__)("Pending"),icon:Lv},private:{label:(0,Et.__)("Private"),icon:Fv},future:{label:(0,Et.__)("Scheduled"),icon:jv},publish:{label:(0,Et.__)("Published"),icon:Hd}},v4=[{label:(0,Et.__)("Draft"),value:"draft",description:(0,Et.__)("Not ready to publish.")},{label:(0,Et.__)("Pending"),value:"pending",description:(0,Et.__)("Waiting for review before publishing.")},{label:(0,Et.__)("Private"),value:"private",description:(0,Et.__)("Only visible to site admins and editors.")},{label:(0,Et.__)("Scheduled"),value:"future",description:(0,Et.__)("Publish automatically on a chosen date.")},{label:(0,Et.__)("Published"),value:"publish",description:(0,Et.__)("Visible to everyone.")}];function y4(){let{status:e,date:t,password:r,postId:o,postType:n,canEdit:i}=(0,lP.useSelect)(y=>{let{getEditedPostAttribute:b,getCurrentPostId:_,getCurrentPostType:S,getCurrentPost:x}=y(w);return{status:b("status"),date:b("date"),password:b("password"),postId:_(),postType:S(),canEdit:x()._links?.["wp:action-publish"]??!1}},[]),[a,l]=(0,y0.useState)(!!r),c=(0,yX.useInstanceId)(y4,"editor-change-status__password-input"),{editEntityRecord:u}=(0,lP.useDispatch)(gX.store),[d,f]=(0,y0.useState)(null),m=(0,y0.useMemo)(()=>({anchor:d,"aria-label":(0,Et.__)("Status & visibility"),headerTitle:(0,Et.__)("Status & visibility"),placement:"left-start",offset:36,shift:!0}),[d]);if(Jc.includes(n))return null;let h=({status:y=e,password:b=r,date:_=t})=>{u("postType",n,o,{status:y,date:_,password:b})},g=y=>{l(y),y||h({password:""})},v=y=>{let b=t,_=r;e==="future"&&new Date(t)>new Date&&(b=null),y==="private"&&r&&(_=""),h({status:y,date:b,password:_})};return(0,Xr.jsx)(ht,{label:(0,Et.__)("Status"),ref:f,children:i?(0,Xr.jsx)(Vi.Dropdown,{className:"editor-post-status",contentClassName:"editor-change-status__content",popoverProps:m,focusOnMount:!0,renderToggle:({onToggle:y,isOpen:b})=>(0,Xr.jsx)(Vi.Button,{className:"editor-post-status__toggle",variant:"tertiary",size:"compact",onClick:y,icon:aP[e]?.icon,"aria-label":(0,Et.sprintf)((0,Et.__)("Change status: %s"),aP[e]?.label),"aria-expanded":b,children:aP[e]?.label}),renderContent:({onClose:y})=>(0,Xr.jsxs)(Xr.Fragment,{children:[(0,Xr.jsx)(vX.__experimentalInspectorPopoverHeader,{title:(0,Et.__)("Status & visibility"),onClose:y}),(0,Xr.jsx)("form",{onSubmit:b=>{b.preventDefault(),y()},children:(0,Xr.jsxs)(Vi.__experimentalVStack,{spacing:4,children:[(0,Xr.jsx)(Vi.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,Et.__)("Status"),options:v4,onChange:v,selected:e==="auto-draft"?"draft":e}),e==="future"&&(0,Xr.jsx)("div",{className:"editor-change-status__publish-date-wrapper",children:(0,Xr.jsx)(s4,{showPopoverHeaderActions:!1,isCompact:!0})}),e!=="private"&&(0,Xr.jsxs)(Vi.__experimentalVStack,{as:"fieldset",spacing:4,className:"editor-change-status__password-fieldset",children:[(0,Xr.jsx)(Vi.CheckboxControl,{label:(0,Et.__)("Password protected"),help:(0,Et.__)("Only visible to those who know the password."),checked:a,onChange:g}),a&&(0,Xr.jsx)("div",{className:"editor-change-status__password-input",children:(0,Xr.jsx)(Vi.TextControl,{label:(0,Et.__)("Password"),onChange:b=>h({password:b}),value:r,placeholder:(0,Et.__)("Use a secure password"),type:"text",id:c,__next40pxDefaultSize:!0,maxLength:255})})]}),(0,Xr.jsx)(sP,{})]})})]})}):(0,Xr.jsx)("div",{className:"editor-post-status is-read-only",children:aP[e]?.label})})}var mP=s(C(),1);function pP({forceIsDirty:e}){let[t,r]=(0,fP.useState)(!1),o=(0,uP.useViewportMatch)("small"),{isAutosaving:n,isDirty:i,isNew:a,isPublished:l,isSaveable:c,isSaving:u,isScheduled:d,hasPublishAction:f,showIconLabels:m,postStatus:h,postStatusHasChanged:g,postType:v}=(0,dP.useSelect)(L=>{let{isEditedPostNew:M,isCurrentPostPublished:k,isCurrentPostScheduled:I,isEditedPostDirty:U,isSavingPost:G,isEditedPostSaveable:Y,getCurrentPost:Z,isAutosavingPost:V,getEditedPostAttribute:j,getPostEdits:H}=L(w),{get:X}=L(SX.store);return{isAutosaving:V(),isDirty:e||U(),isNew:M(),isPublished:k(),isSaving:G(),isSaveable:Y(),isScheduled:I(),hasPublishAction:Z()?._links?.["wp:action-publish"]??!1,showIconLabels:X("core","showIconLabels"),postStatus:j("status"),postStatusHasChanged:!!H()?.status,postType:L(w).getCurrentPostType()}},[e]),y=h==="pending",{savePost:b}=(0,dP.useDispatch)(w),_=(0,uP.usePrevious)(u);if((0,fP.useEffect)(()=>{let L;return _&&!u&&(r(!0),L=setTimeout(()=>{r(!1)},1e3)),()=>clearTimeout(L)},[u]),v===ur||!f&&y)return null;let S=!["pending","draft","auto-draft"].includes(h)&&v4.map(({value:L})=>L).includes(h);if(l||d||S||g&&["pending","draft"].includes(h))return null;let x=y?(0,_m.__)("Save as pending"):(0,_m.__)("Save draft"),T=(0,_m.__)("Save"),R=t||!a&&!i,F=u||R,B=u||R||!c,z;return u?z=n?(0,_m.__)("Autosaving"):(0,_m.__)("Saving"):R?z=(0,_m.__)("Saved"):o?z=x:m&&(z=T),(0,mP.jsxs)(cP.Button,{className:c||u?re({"editor-post-save-draft":!F,"editor-post-saved-state":F,"is-saving":u,"is-autosaving":n,"is-saved":R,[(0,cP.__unstableGetAnimateClassName)({type:"loading"})]:u}):void 0,onClick:B?void 0:()=>b(),shortcut:B?void 0:bX.displayShortcut.primary("s"),variant:"tertiary",size:"compact",icon:o?void 0:OR,label:z||x,"aria-disabled":B,children:[F&&(0,mP.jsx)(No,{icon:R?Pi:NR}),z]})}var _X=s(O(),1);function hP({children:e}){return(0,_X.useSelect)(r=>r(w).getCurrentPost()._links?.["wp:action-publish"]??!1,[])?e:null}var gP=s(A(),1),ug=s(E(),1),vP=s(D(),1),wX=s(O(),1);var cg=s(C(),1);function yP(){let[e,t]=(0,vP.useState)(null),r=(0,wX.useSelect)(a=>a(w).getCurrentPostType(),[]),o=(0,vP.useMemo)(()=>({anchor:e,"aria-label":(0,ug.__)("Change publish date"),placement:"left-start",offset:36,shift:!0}),[e]),n=ig(),i=ig({full:!0});return Jc.includes(r)?null:(0,cg.jsx)(hP,{children:(0,cg.jsx)(ht,{label:(0,ug.__)("Publish"),ref:t,children:(0,cg.jsx)(gP.Dropdown,{popoverProps:o,focusOnMount:!0,className:"editor-post-schedule__panel-dropdown",contentClassName:"editor-post-schedule__dialog",renderToggle:({onToggle:a,isOpen:l})=>(0,cg.jsx)(gP.Button,{size:"compact",className:"editor-post-schedule__dialog-toggle",variant:"tertiary",tooltipPosition:"middle left",onClick:a,"aria-label":(0,ug.sprintf)((0,ug.__)("Change date: %s"),n),label:i,showTooltip:n!==i,"aria-expanded":l,children:n}),renderContent:({onClose:a})=>(0,cg.jsx)(og,{onClose:a})})})})}var bP=s(A(),1),dg=s(E(),1),SP=s(O(),1),xX=s(D(),1),CX=s(Yi(),1);var wm=s(C(),1);function TX(){(0,CX.default)("wp.editor.PostSwitchToDraftButton",{since:"6.7",version:"6.9"});let[e,t]=(0,xX.useState)(!1),{editPost:r,savePost:o}=(0,SP.useDispatch)(w),{isSaving:n,isPublished:i,isScheduled:a}=(0,SP.useSelect)(f=>{let{isSavingPost:m,isCurrentPostPublished:h,isCurrentPostScheduled:g}=f(w);return{isSaving:m(),isPublished:h(),isScheduled:g()}},[]),l=n||!i&&!a,c,u;i?(c=(0,dg.__)("Are you sure you want to unpublish this post?"),u=(0,dg.__)("Unpublish")):a&&(c=(0,dg.__)("Are you sure you want to unschedule this post?"),u=(0,dg.__)("Unschedule"));let d=()=>{t(!1),r({status:"draft"}),o()};return(0,wm.jsxs)(wm.Fragment,{children:[(0,wm.jsx)(bP.Button,{__next40pxDefaultSize:!0,className:"editor-post-switch-to-draft",onClick:()=>{l||t(!0)},"aria-disabled":l,variant:"secondary",style:{flexGrow:"1",justifyContent:"center"},children:(0,dg.__)("Switch to draft")}),(0,wm.jsx)(bP.__experimentalConfirmDialog,{isOpen:e,onConfirm:d,onCancel:()=>t(!1),confirmButtonText:u,children:c})]})}var PX=s(O(),1),b0=s(E(),1);var b4=s(C(),1);function _P(){let{syncStatus:e,postType:t}=(0,PX.useSelect)(r=>{let{getEditedPostAttribute:o}=r(w);return{syncStatus:o("meta")?.wp_pattern_sync_status==="unsynced"?"unsynced":o("wp_pattern_sync_status"),postType:o("type")}});return t!=="wp_block"?null:(0,b4.jsx)(ht,{label:(0,b0.__)("Sync status"),children:(0,b4.jsx)("div",{className:"editor-post-sync-status__value",children:e==="unsynced"?(0,b0._x)("Not synced","pattern (singular)"):(0,b0._x)("Synced","pattern (singular)")})})}var kX=s(D(),1),EX=s(O(),1),RX=s(W(),1);var S4=s(C(),1),cTe=e=>e;function uTe({taxonomyWrapper:e=cTe}){let{postType:t,taxonomies:r}=(0,EX.useSelect)(n=>({postType:n(w).getCurrentPostType(),taxonomies:n(RX.store).getEntityRecords("root","taxonomy",{per_page:-1})}),[]);return(r??[]).filter(n=>n.types.includes(t)&&n.visibility?.show_ui).map(n=>{let i=n.hierarchical?KT:WT;return(0,S4.jsx)(kX.Fragment,{children:e((0,S4.jsx)(i,{slug:n.slug}),n)},`taxonomy-${n.slug}`)})}var fg=uTe;var AX=s(O(),1),OX=s(W(),1);function wP({children:e}){return(0,AX.useSelect)(r=>{let o=r(w).getCurrentPostType();return r(OX.store).getEntityRecords("root","taxonomy",{per_page:-1})?.some(i=>i.types.includes(o))},[])?e:null}var IX=s(A(),1),xP=s(O(),1);var S0=s(C(),1);function dTe({taxonomy:e,children:t}){let r=e?.slug,o=r?`taxonomy-panel-${r}`:"",{isEnabled:n,isOpened:i}=(0,xP.useSelect)(c=>{let{isEditorPanelEnabled:u,isEditorPanelOpened:d}=c(w);return{isEnabled:r?u(o):!1,isOpened:r?d(o):!1}},[o,r]),{toggleEditorPanelOpened:a}=(0,xP.useDispatch)(w);if(!n)return null;let l=e?.labels?.menu_name;return l?(0,S0.jsx)(IX.PanelBody,{title:l,opened:i,onToggle:()=>a(o),children:t}):null}function CP(){return(0,S0.jsx)(wP,{children:(0,S0.jsx)(fg,{taxonomyWrapper:(e,t)=>(0,S0.jsx)(dTe,{taxonomy:t,children:e})})})}var XX=s(x4(),1),C4=s(E(),1),T4=s(W(),1),QX=s(D(),1),JX=s(Xe(),1),EP=s(O(),1),$X=s(he(),1),eQ=s(A(),1);var xm=s(C(),1);function w0(){let e=(0,$X.useInstanceId)(w0),{content:t,blocks:r,type:o,id:n}=(0,EP.useSelect)(l=>{let{getEditedEntityRecord:c}=l(T4.store),{getCurrentPostType:u,getCurrentPostId:d}=l(w),f=u(),m=d(),h=c("postType",f,m);return{content:h?.content,blocks:h?.blocks,type:f,id:m}},[]),{editEntityRecord:i}=(0,EP.useDispatch)(T4.store),a=(0,QX.useMemo)(()=>t instanceof Function?t({blocks:r}):r?(0,JX.__unstableSerializeAndClean)(r):t,[t,r]);return(0,xm.jsxs)(xm.Fragment,{children:[(0,xm.jsx)(eQ.VisuallyHidden,{as:"label",htmlFor:`post-content-${e}`,children:(0,C4.__)("Type text or HTML")}),(0,xm.jsx)(XX.default,{autoComplete:"off",dir:"auto",value:a,onChange:l=>{i("postType",o,n,{content:l.target.value,blocks:void 0,selection:void 0})},className:"editor-post-text-editor",id:`post-content-${e}`,placeholder:(0,C4.__)("Start writing with text or HTML")})]})}var rQ=s(E(),1),pg=s(D(),1),oQ=s(ft(),1),DP=s(O(),1),P4=s($(),1),nQ=s(yo(),1),iQ=s(Xe(),1),hg=s(Wy(),1),sQ=s(he(),1),k4=s(xh(),1);var RP="wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text",AP=/[\r\n]+/g;var mg=s(D(),1),tQ=s(O(),1);function OP(e){let t=(0,mg.useRef)(),{isCleanNewPost:r}=(0,tQ.useSelect)(o=>{let{isCleanNewPost:n}=o(w);return{isCleanNewPost:n()}},[]);return(0,mg.useImperativeHandle)(e,()=>({focus:()=>{t?.current?.focus()}})),(0,mg.useEffect)(()=>{if(!t.current)return;let{defaultView:o}=t.current.ownerDocument,{name:n,parent:i}=o,a=n==="editor-canvas"?i.document:o.document,{activeElement:l,body:c}=a;r&&(!l||c===l)&&t.current.focus()},[r]),{ref:t}}var IP=s(O(),1);function NP(){let{editPost:e}=(0,IP.useDispatch)(w),{title:t}=(0,IP.useSelect)(o=>{let{getEditedPostAttribute:n}=o(w);return{title:n("title")}},[]);function r(o){e({title:o})}return{title:t,setTitle:r}}var FP=s(C(),1),{useRichText:wTe}=N(hg.privateApis),xTe=(0,pg.forwardRef)((e,t)=>{let{placeholder:r,isEditingContentOnlySection:o,isPreview:n}=(0,DP.useSelect)(M=>{let{getSettings:k,getEditedContentOnlySection:I}=N(M(P4.store)),{titlePlaceholder:U,isPreviewMode:G}=k();return{placeholder:U,isEditingContentOnlySection:!!I(),isPreview:G}},[]),[i,a]=(0,pg.useState)(!1),{ref:l}=OP(t),{title:c,setTitle:u}=NP(),[d,f]=(0,pg.useState)({}),{clearSelectedBlock:m,insertBlocks:h,insertDefaultBlock:g}=(0,DP.useDispatch)(P4.store),v=(0,oQ.decodeEntities)(r)||(0,rQ.__)("Add title"),{value:y,onChange:b,ref:_}=wTe({value:c,onChange(M){u(M.replace(AP," "))},placeholder:v,selectionStart:d.start,selectionEnd:d.end,onSelectionChange(M,k){f(I=>{let{start:U,end:G}=I;return U===M&&G===k?I:{start:M,end:k}})},__unstableDisableFormats:!1});function S(M){h(M,0)}function x(){a(!0),m()}function T(){a(!1),f({})}function R(){g(void 0,void 0,0)}function F(M){M.keyCode===nQ.ENTER&&(M.preventDefault(),R())}function B(M){let k=M.clipboardData,I="",U="";try{I=k.getData("text/plain"),U=k.getData("text/html")}catch{return}let G=(0,iQ.pasteHandler)({HTML:U,plainText:I});if(M.preventDefault(),!!G.length)if(typeof G!="string"){let[Y]=G;if(!c&&(Y.name==="core/heading"||Y.name==="core/paragraph")){let Z=(0,k4.__unstableStripHTML)(Y.attributes.content);u(Z),S(G.slice(1))}else S(G)}else{let Y=(0,k4.__unstableStripHTML)(G);b((0,hg.insert)(y,(0,hg.create)({html:Y})))}}let z=re(RP,{"is-selected":i}),L=o?{opacity:.2}:void 0;return(0,FP.jsx)("h1",{ref:(0,sQ.useMergeRefs)([_,l]),contentEditable:!o&&!n,className:z,"aria-label":v,role:"textbox","aria-multiline":"true",onFocus:x,onBlur:T,onKeyDown:F,onPaste:B,style:L})}),BP=(0,pg.forwardRef)((e,t)=>(0,FP.jsx)(tr,{supportKeys:"title",children:(0,FP.jsx)(xTe,{ref:t})}));var aQ=s(A(),1),lQ=s(E(),1),cQ=s(ft(),1),uQ=s(O(),1),dQ=s($(),1),MP=s(D(),1);var fQ=s(C(),1);function CTe(e,t){let{placeholder:r}=(0,uQ.useSelect)(h=>{let{getSettings:g}=h(dQ.store),{titlePlaceholder:v}=g();return{placeholder:v}},[]),[o,n]=(0,MP.useState)(!1),{title:i,setTitle:a}=NP(),{ref:l}=OP(t);function c(h){a(h.replace(AP," "))}function u(){n(!0)}function d(){n(!1)}let f=re(RP,{"is-selected":o,"is-raw-text":!0}),m=(0,cQ.decodeEntities)(r)||(0,lQ.__)("Add title");return(0,fQ.jsx)(aQ.TextareaControl,{ref:l,value:i,onChange:c,onFocus:u,onBlur:d,label:r,className:f,placeholder:m,hideLabelFromVision:!0,autoComplete:"off",dir:"auto",rows:1})}var LP=(0,MP.forwardRef)(CTe);var gg=s(E(),1),jP=s(A(),1),vg=s(O(),1),hQ=s(D(),1);var mQ=s(O(),1),pQ=s(W(),1);function VP({children:e}){let{canTrashPost:t}=(0,mQ.useSelect)(r=>{let{isEditedPostNew:o,getCurrentPostId:n,getCurrentPostType:i}=r(w),{canUser:a}=r(pQ.store),l=i(),c=n(),u=o(),d=c?a("delete",{kind:"postType",name:l,id:c}):!1;return{canTrashPost:(!u||c)&&d&&!qF.includes(l)}},[]);return t?e:null}var x0=s(C(),1);function zP({onActionPerformed:e}){let t=(0,vg.useRegistry)(),{isNew:r,isDeleting:o,postId:n,title:i}=(0,vg.useSelect)(d=>{let f=d(w);return{isNew:f.isEditedPostNew(),isDeleting:f.isDeletingPost(),postId:f.getCurrentPostId(),title:f.getCurrentPostAttribute("title")}},[]),{trashPost:a}=(0,vg.useDispatch)(w),[l,c]=(0,hQ.useState)(!1);if(r||!n)return null;let u=async()=>{c(!1),await a();let d=await t.resolveSelect(w).getCurrentPost();e?.("move-to-trash",[d])};return(0,x0.jsxs)(VP,{children:[(0,x0.jsx)(jP.Button,{__next40pxDefaultSize:!0,className:"editor-post-trash",isDestructive:!0,variant:"secondary",isBusy:o,"aria-disabled":o,onClick:o?void 0:()=>c(!0),children:(0,gg.__)("Move to trash")}),(0,x0.jsx)(jP.__experimentalConfirmDialog,{isOpen:l,onConfirm:u,onCancel:()=>c(!1),confirmButtonText:(0,gg.__)("Move to trash"),size:"small",children:(0,gg.sprintf)((0,gg.__)('Are you sure you want to move "%s" to the trash?'),i)})]})}var C0=s(O(),1),T0=s(Ir(),1),UP=s(D(),1),gQ=s($(),1),Cm=s(E(),1),di=s(A(),1),vQ=s(ct(),1);var yQ=s(W(),1),HP=s(he(),1);var hr=s(C(),1);function P0({onClose:e}){let{isEditable:t,postSlug:r,postLink:o,permalinkPrefix:n,permalinkSuffix:i,permalink:a}=(0,C0.useSelect)(h=>{let g=h(w).getCurrentPost(),v=h(w).getCurrentPostType(),y=h(yQ.store).getPostType(v),b=h(w).getPermalinkParts(),_=g?._links?.["wp:action-publish"]??!1;return{isEditable:h(w).isPermalinkEditable()&&_,postSlug:(0,T0.safeDecodeURIComponent)(h(w).getEditedPostSlug()),viewPostLabel:y?.labels.view_item,postLink:g.link,permalinkPrefix:b?.prefix,permalinkSuffix:b?.suffix,permalink:(0,T0.safeDecodeURIComponent)(h(w).getPermalink())}},[]),{editPost:l}=(0,C0.useDispatch)(w),{createNotice:c}=(0,C0.useDispatch)(vQ.store),[u,d]=(0,UP.useState)(!1),f=(0,HP.useCopyToClipboard)(a,()=>{c("info",(0,Cm.__)("Copied Permalink to clipboard."),{isDismissible:!0,type:"snackbar"})}),m="editor-post-url__slug-description-"+(0,HP.useInstanceId)(P0);return(0,hr.jsxs)("div",{className:"editor-post-url",children:[(0,hr.jsx)(gQ.__experimentalInspectorPopoverHeader,{title:(0,Cm.__)("Slug"),onClose:e}),(0,hr.jsxs)(di.__experimentalVStack,{spacing:3,children:[t&&(0,hr.jsx)("p",{className:"editor-post-url__intro",children:(0,UP.createInterpolateElement)((0,Cm.__)("<span>Customize the last part of the Permalink.</span> <a>Learn more.</a>"),{span:(0,hr.jsx)("span",{id:m}),a:(0,hr.jsx)(di.ExternalLink,{href:(0,Cm.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink")})})}),(0,hr.jsxs)("div",{children:[t&&(0,hr.jsxs)(hr.Fragment,{children:[(0,hr.jsx)(di.__experimentalInputControl,{__next40pxDefaultSize:!0,prefix:(0,hr.jsx)(di.__experimentalInputControlPrefixWrapper,{children:"/"}),suffix:(0,hr.jsx)(di.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,hr.jsx)(di.Button,{icon:kv,ref:f,size:"small",label:"Copy"})}),label:(0,Cm.__)("Slug"),hideLabelFromVision:!0,value:u?"":r,autoComplete:"off",spellCheck:"false",type:"text",className:"editor-post-url__input",onChange:h=>{if(l({slug:h}),!h){u||d(!0);return}u&&d(!1)},onBlur:h=>{l({slug:(0,T0.cleanForSlug)(h.target.value)}),u&&d(!1)},"aria-describedby":m}),(0,hr.jsxs)("p",{className:"editor-post-url__permalink",children:[(0,hr.jsx)("span",{className:"editor-post-url__permalink-visual-label",children:(0,Cm.__)("Permalink:")}),(0,hr.jsxs)(di.ExternalLink,{className:"editor-post-url__link",href:o,target:"_blank",children:[(0,hr.jsx)("span",{className:"editor-post-url__link-prefix",children:n}),(0,hr.jsx)("span",{className:"editor-post-url__link-slug",children:r}),(0,hr.jsx)("span",{className:"editor-post-url__link-suffix",children:i})]})]})]}),!t&&(0,hr.jsx)(di.ExternalLink,{className:"editor-post-url__link",href:o,target:"_blank",children:o})]})]})]})}var bQ=s(O(),1),SQ=s(W(),1);function GP({children:e}){return(0,bQ.useSelect)(r=>{let o=r(w).getCurrentPostType();return!(!r(SQ.store).getPostType(o)?.viewable||!r(w).getCurrentPost().link||!r(w).getPermalinkParts())},[])?e:null}var _Q=s(O(),1),WP=s(Ir(),1);function wQ(){return E4()}function E4(){let e=(0,_Q.useSelect)(t=>t(w).getPermalink(),[]);return(0,WP.filterURLForDisplay)((0,WP.safeDecodeURIComponent)(e))}var YP=s(D(),1),qP=s(O(),1),bg=s(A(),1),yg=s(E(),1),xQ=s(Ir(),1),CQ=s(W(),1);var ji=s(C(),1);function ZP(){let{isFrontPage:e}=(0,qP.useSelect)(i=>{let{getCurrentPostId:a}=i(w),{getEditedEntityRecord:l,canUser:c}=i(CQ.store),u=c("read",{kind:"root",name:"site"})?l("root","site"):void 0,d=a();return{isFrontPage:u?.page_on_front===d}},[]),[t,r]=(0,YP.useState)(null),o=(0,YP.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]),n=e?(0,yg.__)("Link"):(0,yg.__)("Slug");return(0,ji.jsx)(GP,{children:(0,ji.jsxs)(ht,{label:n,ref:r,children:[!e&&(0,ji.jsx)(bg.Dropdown,{popoverProps:o,className:"editor-post-url__panel-dropdown",contentClassName:"editor-post-url__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:i,onToggle:a})=>(0,ji.jsx)(TTe,{isOpen:i,onClick:a}),renderContent:({onClose:i})=>(0,ji.jsx)(P0,{onClose:i})}),e&&(0,ji.jsx)(PTe,{})]})})}function TTe({isOpen:e,onClick:t}){let{slug:r}=(0,qP.useSelect)(n=>({slug:n(w).getEditedPostSlug()}),[]),o=(0,xQ.safeDecodeURIComponent)(r);return(0,ji.jsx)(bg.Button,{size:"compact",className:"editor-post-url__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,yg.sprintf)((0,yg.__)("Change link: %s"),o),onClick:t,children:(0,ji.jsx)(ji.Fragment,{children:o})})}function PTe(){let{postLink:e}=(0,qP.useSelect)(t=>{let{getCurrentPost:r}=t(w);return{postLink:r()?.link}},[]);return(0,ji.jsx)(bg.ExternalLink,{className:"editor-post-url__front-page-link",href:e,target:"_blank",children:e})}var TQ=s(O(),1);function PQ({render:e}){let t=(0,TQ.useSelect)(r=>r(w).getCurrentPost()._links?.["wp:action-publish"]??!1);return e({canEdit:t})}var VQ=s(E(),1),QP=s(A(),1),jQ=s(O(),1);var zQ=s(D(),1),UQ=s($(),1);var kc=s(E(),1),BQ=s(O(),1),MQ=s($(),1);var EQ=s(O(),1),RQ=s(E(),1),AQ=s(k0(),1);var OQ=s(C(),1);function Sg(){let e=(0,EQ.useSelect)(r=>r(w).getEditedPostAttribute("content"),[]),t=(0,RQ._x)("words","Word count type. Do not translate!");return(0,OQ.jsx)("span",{className:"word-count",children:(0,AQ.count)(e,t)})}var IQ=s(O(),1),ad=s(E(),1),NQ=s(k0(),1),R4=s(D(),1);var KP=s(C(),1),kTe=189;function _g(){let e=(0,IQ.useSelect)(n=>n(w).getEditedPostAttribute("content"),[]),t=(0,ad._x)("words","Word count type. Do not translate!"),r=Math.round((0,NQ.count)(e,t)/kTe),o=r===0?(0,R4.createInterpolateElement)((0,ad.__)("<span>< 1</span> minute"),{span:(0,KP.jsx)("span",{})}):(0,R4.createInterpolateElement)((0,ad.sprintf)((0,ad._n)("<span>%s</span> minute","<span>%s</span> minutes",r),r),{span:(0,KP.jsx)("span",{})});return(0,KP.jsx)("span",{className:"time-to-read",children:o})}var FQ=s(O(),1),DQ=s(k0(),1);function wg(){let e=(0,FQ.useSelect)(t=>t(w).getEditedPostAttribute("content"),[]);return(0,DQ.count)(e,"characters_including_spaces")}var Xt=s(C(),1);function ETe({hasOutlineItemsDisabled:e,onRequestClose:t}){let{headingCount:r,paragraphCount:o,numberOfBlocks:n}=(0,BQ.useSelect)(i=>{let{getGlobalBlockCount:a}=i(MQ.store);return{headingCount:a("core/heading"),paragraphCount:a("core/paragraph"),numberOfBlocks:a()}},[]);return(0,Xt.jsxs)(Xt.Fragment,{children:[(0,Xt.jsx)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":(0,kc.__)("Document Statistics"),tabIndex:"0",children:(0,Xt.jsxs)("ul",{role:"list",className:"table-of-contents__counts",children:[(0,Xt.jsxs)("li",{className:"table-of-contents__count",children:[(0,kc.__)("Words"),(0,Xt.jsx)(Sg,{})]}),(0,Xt.jsxs)("li",{className:"table-of-contents__count",children:[(0,kc.__)("Characters"),(0,Xt.jsx)("span",{className:"table-of-contents__number",children:(0,Xt.jsx)(wg,{})})]}),(0,Xt.jsxs)("li",{className:"table-of-contents__count",children:[(0,kc.__)("Time to read"),(0,Xt.jsx)(_g,{})]}),(0,Xt.jsxs)("li",{className:"table-of-contents__count",children:[(0,kc.__)("Headings"),(0,Xt.jsx)("span",{className:"table-of-contents__number",children:r})]}),(0,Xt.jsxs)("li",{className:"table-of-contents__count",children:[(0,kc.__)("Paragraphs"),(0,Xt.jsx)("span",{className:"table-of-contents__number",children:o})]}),(0,Xt.jsxs)("li",{className:"table-of-contents__count",children:[(0,kc.__)("Blocks"),(0,Xt.jsx)("span",{className:"table-of-contents__number",children:n})]})]})}),r>0&&(0,Xt.jsxs)(Xt.Fragment,{children:[(0,Xt.jsx)("hr",{}),(0,Xt.jsx)("h2",{className:"table-of-contents__title",children:(0,kc.__)("Document Outline")}),(0,Xt.jsx)(Ah,{onSelect:t,hasOutlineItemsDisabled:e})]})]})}var LQ=ETe;var XP=s(C(),1);function RTe({hasOutlineItemsDisabled:e,repositionDropdown:t,...r},o){let n=(0,jQ.useSelect)(i=>!!i(UQ.store).getBlockCount(),[]);return(0,XP.jsx)(QP.Dropdown,{popoverProps:{placement:t?"right":"bottom"},className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:({isOpen:i,onToggle:a})=>(0,XP.jsx)(QP.Button,{__next40pxDefaultSize:!0,...r,ref:o,onClick:n?a:void 0,icon:iA,"aria-expanded":i,"aria-haspopup":"true",label:(0,VQ.__)("Details"),tooltipPosition:"bottom","aria-disabled":!n}),renderContent:({onClose:i})=>(0,XP.jsx)(LQ,{onRequestClose:i,hasOutlineItemsDisabled:e})})}var HQ=(0,zQ.forwardRef)(RTe);var GQ=s(E(),1),WQ=s(D(),1),YQ=s(O(),1),qQ=s(W(),1);function ZQ(){let{__experimentalGetDirtyEntityRecords:e}=(0,YQ.useSelect)(qQ.store);return(0,WQ.useEffect)(()=>{let t=r=>{if(e().length>0)return r.returnValue=(0,GQ.__)("You have unsaved changes. If you proceed, they will be lost."),r.returnValue};return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)}},[e]),null}var A4=s(Yi(),1),QQ=s(D(),1),te=s($(),1),JQ=s(XQ(),1),$Q=s(C(),1);function Ze(e,t,r=[]){let o=(0,QQ.forwardRef)((n,i)=>((0,A4.default)("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),(0,$Q.jsx)(t,{ref:i,...n})));return r.forEach(n=>{o[n]=Ze(e+"."+n,t[n])}),o}function Xa(e,t){return(...r)=>((0,A4.default)("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),t(...r))}var eJ=Ze("RichText",te.RichText,["Content"]);eJ.isEmpty=Xa("RichText.isEmpty",te.RichText.isEmpty);var ATe=Ze("Autocomplete",te.Autocomplete),OTe=Ze("AlignmentToolbar",te.AlignmentToolbar),ITe=Ze("BlockAlignmentToolbar",te.BlockAlignmentToolbar),NTe=Ze("BlockControls",te.BlockControls,["Slot"]),FTe=Ze("BlockEdit",te.BlockEdit),DTe=Ze("BlockEditorKeyboardShortcuts",te.BlockEditorKeyboardShortcuts),BTe=Ze("BlockFormatControls",te.BlockFormatControls,["Slot"]),MTe=Ze("BlockIcon",te.BlockIcon),LTe=Ze("BlockInspector",te.BlockInspector),VTe=Ze("BlockList",te.BlockList),jTe=Ze("BlockMover",te.BlockMover),zTe=Ze("BlockNavigationDropdown",te.BlockNavigationDropdown),UTe=Ze("BlockSelectionClearer",te.BlockSelectionClearer),HTe=Ze("BlockSettingsMenu",te.BlockSettingsMenu),GTe=Ze("BlockTitle",te.BlockTitle),WTe=Ze("BlockToolbar",te.BlockToolbar),YTe=Ze("ColorPalette",te.ColorPalette),qTe=Ze("ContrastChecker",te.ContrastChecker),ZTe=Ze("CopyHandler",te.CopyHandler),KTe=Ze("DefaultBlockAppender",te.DefaultBlockAppender),XTe=Ze("FontSizePicker",te.FontSizePicker),QTe=Ze("Inserter",te.Inserter),JTe=Ze("InnerBlocks",te.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),$Te=Ze("InspectorAdvancedControls",te.InspectorAdvancedControls,["Slot"]),ePe=Ze("InspectorControls",te.InspectorControls,["Slot"]),tPe=Ze("PanelColorSettings",te.PanelColorSettings),rPe=Ze("PlainText",te.PlainText),oPe=Ze("RichTextShortcut",te.RichTextShortcut),nPe=Ze("RichTextToolbarButton",te.RichTextToolbarButton),iPe=Ze("__unstableRichTextInputEvent",te.__unstableRichTextInputEvent),sPe=Ze("MediaPlaceholder",te.MediaPlaceholder),aPe=Ze("MediaUpload",te.MediaUpload),lPe=Ze("MediaUploadCheck",te.MediaUploadCheck),cPe=Ze("MultiSelectScrollIntoView",te.MultiSelectScrollIntoView),uPe=Ze("NavigableToolbar",te.NavigableToolbar),dPe=Ze("ObserveTyping",te.ObserveTyping),fPe=Ze("SkipToSelectedBlock",te.SkipToSelectedBlock),mPe=Ze("URLInput",te.URLInput),pPe=Ze("URLInputButton",te.URLInputButton),hPe=Ze("URLPopover",te.URLPopover),gPe=Ze("Warning",te.Warning),vPe=Ze("WritingFlow",te.WritingFlow),yPe=Xa("createCustomColorsHOC",te.createCustomColorsHOC),bPe=Xa("getColorClassName",te.getColorClassName),SPe=Xa("getColorObjectByAttributeValues",te.getColorObjectByAttributeValues),_Pe=Xa("getColorObjectByColorValue",te.getColorObjectByColorValue),wPe=Xa("getFontSize",te.getFontSize),xPe=Xa("getFontSizeClass",te.getFontSizeClass),CPe=Xa("withColorContext",te.withColorContext),TPe=Xa("withColors",te.withColors),PPe=Xa("withFontSizes",te.withFontSizes);var kPe=Tf,EPe=Tf;function RPe(e=[]){return e.push({...Zx}),e}(0,tJ.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",RPe);var rJ=s(D(),1),O4=s(mo(),1),oJ=s(Yi(),1),JP=s(Yd(),1);var xg=s(C(),1),{MediaUploadModal:APe}=N(JP.privateApis),OPe=class extends rJ.Component{constructor(e){super(e),this.state={isOpen:!1},this.openModal=this.openModal.bind(this),this.closeModal=this.closeModal.bind(this)}openModal(){this.setState({isOpen:!0})}closeModal(){this.setState({isOpen:!1}),this.props.onClose?.()}render(){let{allowedTypes:e,multiple:t,value:r,onSelect:o,title:n,modalClass:i,render:a}=this.props,{isOpen:l}=this.state;return(0,xg.jsxs)(xg.Fragment,{children:[a({open:this.openModal}),(0,xg.jsx)(APe,{allowedTypes:e,multiple:t,value:r,onSelect:c=>{o(c),this.closeModal()},onClose:this.closeModal,title:n,isOpen:l,modalClass:i})]})}};window.__experimentalDataViewsMediaModal?(0,O4.addFilter)("editor.MediaUpload","core/editor/components/media-upload",()=>((0,oJ.default)("Extending MediaUpload as a class component",{since:"7.0",version:"7.2",hint:"MediaUpload will become a function component in WordPress 7.2 Please update any custom implementations to use function components instead."}),OPe)):(0,O4.addFilter)("editor.MediaUpload","core/editor/components/media-upload",()=>JP.MediaUpload);var iJ=s(mo(),1),sJ=s(Ls(),1),aJ=s(he(),1),$P=s($(),1),I4=s(O(),1),lJ=s(Xe(),1);var da=s(C(),1),{PatternOverridesControls:IPe,ResetOverridesControl:NPe,PATTERN_TYPES:FPe,PATTERN_SYNC_TYPES:nJ}=N(sJ.privateApis),DPe=(0,aJ.createHigherOrderComponent)(e=>t=>{let r=(0,I4.useSelect)(o=>{let{__experimentalBlockBindingsSupportedAttributes:n}=o($P.store).getSettings();return!!n?.[t.name]},[t.name]);return(0,da.jsxs)(da.Fragment,{children:[(0,da.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,da.jsx)(BPe,{...t})]})},"withPatternOverrideControls");function BPe(e){let t=(0,$P.useBlockEditingMode)(),{hasPatternOverridesSource:r,isEditingSyncedPattern:o}=(0,I4.useSelect)(c=>{let{getCurrentPostType:u,getEditedPostAttribute:d}=c(w);return{hasPatternOverridesSource:!!(0,lJ.getBlockBindingsSource)("core/pattern-overrides"),isEditingSyncedPattern:u()===FPe.user&&d("meta")?.wp_pattern_sync_status!==nJ.unsynced&&d("wp_pattern_sync_status")!==nJ.unsynced}},[]),n=e.attributes.metadata?.bindings,i=!!n&&Object.values(n).some(c=>c.source==="core/pattern-overrides"),a=o&&t==="default",l=!o&&!!e.attributes.metadata?.name&&t!=="disabled"&&i;return r?(0,da.jsxs)(da.Fragment,{children:[a&&(0,da.jsx)(IPe,{...e}),l&&(0,da.jsx)(NPe,{...e})]}):null}(0,iJ.addFilter)("editor.BlockEdit","core/editor/with-pattern-override-controls",DPe);var cJ=s(mo(),1),uJ=s(he(),1),dJ=s(D(),1),N4=s(E(),1),Cg=s($(),1),ek=s(A(),1),fJ=s(O(),1),Qa=s(C(),1),MPe=["core/navigation-link","core/navigation-submenu"];function LPe({attributes:e}){let{kind:t,id:r,type:o}=e,n=(0,Cg.useBlockEditingMode)(),i=(0,fJ.useSelect)(l=>l(Cg.store).getSettings().onNavigateToEntityRecord,[]),a=(0,dJ.useCallback)(()=>{t==="post-type"&&o==="page"&&r&&i&&i({postId:r,postType:o})},[t,r,o,i]);return t!=="post-type"||o!=="page"||!r||!i||n!=="contentOnly"?null:(0,Qa.jsx)(Cg.__unstableBlockToolbarLastItem,{children:(0,Qa.jsx)(ek.ToolbarGroup,{children:(0,Qa.jsx)(ek.ToolbarButton,{name:"view",title:(0,N4.__)("View"),onClick:a,children:(0,N4.__)("View")})})})}var VPe=(0,uJ.createHigherOrderComponent)(e=>t=>{let r=MPe.includes(t.name);return(0,Qa.jsxs)(Qa.Fragment,{children:[(0,Qa.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,Qa.jsx)(LPe,{...t})]})},"withNavigationViewButton");(0,cJ.addFilter)("editor.BlockEdit","core/editor/with-navigation-view-button",VPe);var mJ=s(mo(),1),pJ=s(he(),1),hJ=s(D(),1),F4=s(E(),1),Tg=s($(),1),tk=s(A(),1),ld=s(O(),1);var Ja=s(C(),1),jPe="core/navigation",zPe="core/template-part",UPe="edit-post/block";function HPe({clientId:e}){let t=(0,ld.useRegistry)(),{selectBlock:r,flashBlock:o}=(0,ld.useDispatch)(Tg.store),{requestInspectorTab:n}=N((0,ld.useDispatch)(Tg.store)),{enableComplementaryArea:i}=(0,ld.useDispatch)(Ce),{hasNavigationBlocks:a,firstNavigationBlockId:l,isNavigationEditable:c}=(0,ld.useSelect)(d=>{let{getClientIdsOfDescendants:f,getBlockName:m,getBlockEditingMode:h}=d(Tg.store),v=f(e).filter(_=>m(_)===jPe),y=v.length>0,b=y?v[0]:null;return{hasNavigationBlocks:y,firstNavigationBlockId:b,isNavigationEditable:h(b)!=="disabled"}},[e]),u=(0,hJ.useCallback)(()=>{l&&t.batch(()=>{r(l),o(l,500),i("core",UPe),n("list",{openPanel:l})})},[l,t,r,o,i,n]);return!a||!c?null:(0,Ja.jsx)(Tg.__unstableBlockToolbarLastItem,{children:(0,Ja.jsx)(tk.ToolbarGroup,{children:(0,Ja.jsx)(tk.ToolbarButton,{label:(0,F4.__)("Edit navigation"),onClick:u,children:(0,F4.__)("Edit navigation")})})})}var GPe=(0,pJ.createHigherOrderComponent)(e=>t=>{let r=t.name===zPe;return(0,Ja.jsxs)(Ja.Fragment,{children:[(0,Ja.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,Ja.jsx)(HPe,{clientId:t.clientId})]})},"withTemplatePartNavigationEditButton");(0,mJ.addFilter)("editor.BlockEdit","core/editor/with-template-part-navigation-edit-button",GPe);var yJ=s(mo(),1),bJ=s(he(),1),cd=s($(),1),E0=s(A(),1),Ec=s(E(),1),Rc=s(Xe(),1),ok=s(D(),1),Pg=s(O(),1),SJ=s(ct(),1),_J=s(W(),1);function D4(e,t,r){return!e||typeof e!="object"||t.reduce((o,n,i)=>(o[n]===void 0&&(Number.isInteger(t[i+1])?o[n]=[]:o[n]={}),i===t.length-1&&(o[n]=r),o[n]),e),e}var Ss=s(C(),1),{cleanEmptyObject:WPe}=N(cd.privateApis),gJ={...Rc.__EXPERIMENTAL_STYLE_PROPERTY,blockGap:{value:["spacing","blockGap"]}},YPe={"border.color":"color","color.background":"color","color.text":"color","elements.link.color.text":"color","elements.link.:hover.color.text":"color","elements.link.typography.fontFamily":"font-family","elements.link.typography.fontSize":"font-size","elements.button.color.text":"color","elements.button.color.background":"color","elements.button.typography.fontFamily":"font-family","elements.button.typography.fontSize":"font-size","elements.caption.color.text":"color","elements.heading.color":"color","elements.heading.color.background":"color","elements.heading.typography.fontFamily":"font-family","elements.heading.gradient":"gradient","elements.heading.color.gradient":"gradient","elements.h1.color":"color","elements.h1.color.background":"color","elements.h1.typography.fontFamily":"font-family","elements.h1.color.gradient":"gradient","elements.h2.color":"color","elements.h2.color.background":"color","elements.h2.typography.fontFamily":"font-family","elements.h2.color.gradient":"gradient","elements.h3.color":"color","elements.h3.color.background":"color","elements.h3.typography.fontFamily":"font-family","elements.h3.color.gradient":"gradient","elements.h4.color":"color","elements.h4.color.background":"color","elements.h4.typography.fontFamily":"font-family","elements.h4.color.gradient":"gradient","elements.h5.color":"color","elements.h5.color.background":"color","elements.h5.typography.fontFamily":"font-family","elements.h5.color.gradient":"gradient","elements.h6.color":"color","elements.h6.color.background":"color","elements.h6.typography.fontFamily":"font-family","elements.h6.color.gradient":"gradient","color.gradient":"gradient",blockGap:"spacing","typography.fontSize":"font-size","typography.fontFamily":"font-family"},qPe={"border.color":"borderColor","color.background":"backgroundColor","color.text":"textColor","color.gradient":"gradient","typography.fontSize":"fontSize","typography.fontFamily":"fontFamily"},ZPe=["border","color","spacing","typography"],vJ=(e,t)=>{let r=e;return t.forEach(o=>{r=r?.[o]}),r},KPe=["borderColor","borderWidth","borderStyle"],wJ=["top","right","bottom","left"];function XPe(e,t,r){if(!e&&!t)return[];let o=[...rk("top",e,r),...rk("right",e,r),...rk("bottom",e,r),...rk("left",e,r)],{color:n,style:i,width:a}=e||{};return(t||n||a)&&!i&&wJ.forEach(c=>{r?.[c]?.style||o.push({path:["border",c,"style"],value:"solid"})}),o}function rk(e,t,r){if(!t?.[e]||r?.[e]?.style)return[];let{color:o,style:n,width:i}=t[e];return!(o||i)||n?[]:[{path:["border",e,"style"],value:"solid"}]}function QPe(e,t,r){let o=(0,Pg.useSelect)(i=>N(i(Rc.store)).getSupportedStyles(e),[e]),n=r?.styles?.blocks?.[e];return(0,ok.useMemo)(()=>{let i=o.flatMap(a=>{if(!gJ[a])return[];let{value:l}=gJ[a],c=l.join("."),u=t[qPe[c]],d=u?`var:preset|${YPe[c]}|${u}`:vJ(t.style,l);if(a==="linkColor"){let f=d?[{path:l,value:d}]:[],m=["elements","link",":hover","color","text"],h=vJ(t.style,m);return h&&f.push({path:m,value:h}),f}if(KPe.includes(a)&&d){let f=[{path:l,value:d}];return wJ.forEach(m=>{let h=[...l];h.splice(-1,0,m),f.push({path:h,value:d})}),f}return d?[{path:l,value:d}]:[]});return XPe(t.style?.border,t.borderColor,n?.border).forEach(a=>i.push(a)),i},[o,t,n])}function JPe({name:e,attributes:t,setAttributes:r}){let{user:o,setUser:n}=xo(),i=QPe(e,t,o),{__unstableMarkNextChangeAsNotPersistent:a}=(0,Pg.useDispatch)(cd.store),{createSuccessNotice:l}=(0,Pg.useDispatch)(SJ.store),c=(0,ok.useCallback)(()=>{if(i.length!==0&&i.length>0){let{style:u}=t,d=structuredClone(u),f=structuredClone(o);for(let{path:h,value:g}of i)D4(d,h,void 0),D4(f,["styles","blocks",e,...h],g);let m={borderColor:void 0,backgroundColor:void 0,textColor:void 0,gradient:void 0,fontSize:void 0,fontFamily:void 0,style:WPe(d)};a(),r(m),n(f,{undoIgnore:!0}),l((0,Ec.sprintf)((0,Ec.__)("%s styles applied."),(0,Rc.getBlockType)(e).title),{type:"snackbar",actions:[{label:(0,Ec.__)("Undo"),onClick(){a(),r(t),n(o,{undoIgnore:!0})}}]})}},[a,t,i,l,e,r,n,o]);return(0,Ss.jsxs)(E0.BaseControl,{className:"editor-push-changes-to-global-styles-control",help:(0,Ec.sprintf)((0,Ec.__)("Apply this block\u2019s typography, spacing, dimensions, and color styles to all %s blocks."),(0,Rc.getBlockType)(e).title),children:[(0,Ss.jsx)(E0.BaseControl.VisualLabel,{children:(0,Ec.__)("Styles")}),(0,Ss.jsx)(E0.Button,{__next40pxDefaultSize:!0,variant:"secondary",accessibleWhenDisabled:!0,disabled:i.length===0,onClick:c,children:(0,Ec.__)("Apply globally")})]})}function $Pe(e){let t=(0,cd.useBlockEditingMode)(),r=(0,Pg.useSelect)(i=>i(_J.store).getCurrentTheme()?.is_block_theme,[]),o=ZPe.some(i=>(0,Rc.hasBlockSupport)(e.name,i));return t==="default"&&o&&r?(0,Ss.jsx)(cd.InspectorAdvancedControls,{children:(0,Ss.jsx)(JPe,{...e})}):null}var eke=(0,bJ.createHigherOrderComponent)(e=>t=>(0,Ss.jsxs)(Ss.Fragment,{children:[(0,Ss.jsx)(e,{...t},"edit"),t.isSelected&&(0,Ss.jsx)($Pe,{...t})]}));(0,yJ.addFilter)("editor.BlockEdit","core/editor/push-changes-to-global-styles",eke);var R0=s(A(),1),xJ=s(C(),1),B4="__experimentalMainDashboardButton",CJ=()=>{let e=(0,R0.__experimentalUseSlotFills)(B4);return!!(e&&e.length)},{Fill:tke,Slot:rke}=(0,R0.createSlotFill)(B4),TJ=tke,oke=()=>{let e=(0,R0.__experimentalUseSlotFills)(B4);return(0,xJ.jsx)(rke,{bubblesVirtually:!0,fillProps:{length:e?e.length:0}})};TJ.Slot=oke;var nk=TJ;var Ose=s(O(),1),Ise=s(W(),1),Nse=s(A(),1),Fse=s(E(),1);var fE=s(O(),1),Nd=s(E(),1),une=s(lt(),1),mE=s($(),1),dne=s(he(),1),pE=s(D(),1),fne=s(ft(),1),mne=s(ct(),1);var Q$=s($(),1),J$=s(O(),1),B0=s(he(),1),$$=s(lt(),1),eee=s(D(),1);var kg=s($(),1),PJ=s(D(),1),ik=s(A(),1),M4=s(E(),1);var kJ=s(O(),1);var Ac=s(C(),1),{useHasBlockToolbar:nke}=N(kg.privateApis);function EJ({isCollapsed:e,onToggle:t}){let{blockSelectionStart:r}=(0,kJ.useSelect)(i=>({blockSelectionStart:i(kg.store).getBlockSelectionStart()}),[]),o=nke(),n=!!r;return(0,PJ.useEffect)(()=>{r&&t(!1)},[r,t]),o?(0,Ac.jsxs)(Ac.Fragment,{children:[(0,Ac.jsx)("div",{className:re("editor-collapsible-block-toolbar",{"is-collapsed":e||!n}),children:(0,Ac.jsx)(kg.BlockToolbar,{hideDragHandle:!0})}),(0,Ac.jsx)(ik.Popover.Slot,{name:"block-toolbar"}),(0,Ac.jsx)(ik.Button,{className:"editor-collapsible-block-toolbar__toggle",icon:e?Tl:kl,onClick:()=>{t(!e)},label:e?(0,M4.__)("Show block tools"):(0,M4.__)("Hide block tools"),size:"compact"})]}):null}var RJ=s(he(),1),sk=s(O(),1),Tm=s(E(),1),AJ=s($(),1),Eg=s(A(),1);var L4=s(D(),1),OJ=s(Oi(),1),IJ=s(lt(),1);var fa=s(C(),1);function ike({className:e,disableBlockTools:t=!1}){let{setIsInserterOpened:r,setIsListViewOpened:o}=(0,sk.useDispatch)(w),{isDistractionFree:n,isInserterOpened:i,isListViewOpen:a,listViewShortcut:l,inserterSidebarToggleRef:c,listViewToggleRef:u,showIconLabels:d}=(0,sk.useSelect)(_=>{let{get:S}=_(IJ.store),{isListViewOpened:x,getEditorMode:T,getInserterSidebarToggleRef:R,getListViewToggleRef:F}=N(_(w)),{getShortcutRepresentation:B}=_(OJ.store);return{isInserterOpened:_(w).isInserterOpened(),isListViewOpen:x(),listViewShortcut:B("core/editor/toggle-list-view"),inserterSidebarToggleRef:R(),listViewToggleRef:F(),showIconLabels:S("core","showIconLabels"),isDistractionFree:S("core","distractionFree"),isVisualMode:T()==="visual"}},[]),f=_=>{i&&_.preventDefault()},m=(0,RJ.useViewportMatch)("wide"),h=(0,Tm.__)("Document tools"),g=(0,L4.useCallback)(()=>o(!a),[o,a]),v=(0,L4.useCallback)(()=>r(!i),[i,r]),y=(0,Tm._x)("Block Inserter","Generic label for block inserter button"),b=i?(0,Tm.__)("Close"):(0,Tm.__)("Add");return(0,fa.jsx)(AJ.NavigableToolbar,{className:re("editor-document-tools","edit-post-header-toolbar",e),"aria-label":h,variant:"unstyled",children:(0,fa.jsxs)("div",{className:"editor-document-tools__left",children:[!n&&(0,fa.jsx)(Eg.ToolbarButton,{ref:c,className:"editor-document-tools__inserter-toggle",variant:"primary",isPressed:i,onMouseDown:f,onClick:v,disabled:t,icon:Pl,label:d?b:y,showTooltip:!d,"aria-expanded":i}),(m||!d)&&(0,fa.jsxs)(fa.Fragment,{children:[(0,fa.jsx)(Eg.ToolbarItem,{as:_C,showTooltip:!d,variant:d?"tertiary":void 0,size:"compact"}),(0,fa.jsx)(Eg.ToolbarItem,{as:yC,showTooltip:!d,variant:d?"tertiary":void 0,size:"compact"}),!n&&(0,fa.jsx)(Eg.ToolbarButton,{className:"editor-document-tools__document-overview-toggle",icon:Iv,disabled:t,isPressed:a,label:(0,Tm.__)("Document Overview"),onClick:g,shortcut:l,showTooltip:!d,variant:d?"tertiary":void 0,"aria-expanded":a,ref:u})]})]})})}var NJ=ike;var A0=s(A(),1);var ud=s(C(),1),V4={distractionFreeDisabled:{y:"-50px"},distractionFreeHover:{y:0},distractionFreeHidden:{y:"-50px"},visible:{y:0},hidden:{y:0}},ske={distractionFreeDisabled:{x:"-100%"},distractionFreeHover:{x:0},distractionFreeHidden:{x:"-100%"},visible:{x:0},hidden:{x:0}};function ak({className:e,toolbar:t,center:r,settings:o}){let n=CJ();return(0,ud.jsxs)("div",{className:re("editor-header edit-post-header",e),children:[n&&(0,ud.jsx)(A0.__unstableMotion.div,{className:"editor-header__back-button",variants:ske,transition:{type:"tween"},children:(0,ud.jsx)(nk.Slot,{})}),(0,ud.jsx)(A0.__unstableMotion.div,{variants:V4,className:"editor-header__toolbar",transition:{type:"tween"},children:t}),r&&(0,ud.jsx)(A0.__unstableMotion.div,{variants:V4,className:"editor-header__center",transition:{type:"tween"},children:r}),(0,ud.jsx)(A0.__unstableMotion.div,{variants:V4,transition:{type:"tween"},className:"editor-header__settings",children:o})]})}var gr=s(E(),1),Rg=s(O(),1),U4=s(yo(),1);var _s=s(A(),1),Pm=s(lt(),1);var FJ=s(A(),1),O0=s(O(),1),j4=s(E(),1),DJ=s(he(),1),BJ=s(ct(),1),MJ=s(W(),1),LJ=s(Xe(),1);var VJ=s(C(),1);function jJ(){let{createNotice:e}=(0,O0.useDispatch)(BJ.store),{getCurrentPostId:t,getCurrentPostType:r}=(0,O0.useSelect)(w),{getEditedEntityRecord:o}=(0,O0.useSelect)(MJ.store);function n(){let l=o("postType",r(),t());if(!l)return"";if(typeof l.content=="function")return l.content(l);if(l.blocks)return(0,LJ.__unstableSerializeAndClean)(l.blocks);if(l.content)return l.content}function i(){e("info",(0,j4.__)("All content copied."),{isDismissible:!0,type:"snackbar"})}let a=(0,DJ.useCopyToClipboard)(n,i);return(0,VJ.jsx)(FJ.MenuItem,{ref:a,children:(0,j4.__)("Copy all blocks")})}var I0=s(E(),1),lk=s(A(),1),ck=s(O(),1),zJ=s(Oi(),1);var z4=s(C(),1),ake=[{value:"visual",label:(0,I0.__)("Visual editor")},{value:"text",label:(0,I0.__)("Code editor")}];function lke(){let{shortcut:e,isRichEditingEnabled:t,isCodeEditingEnabled:r,mode:o}=(0,ck.useSelect)(l=>({shortcut:l(zJ.store).getShortcutRepresentation("core/editor/toggle-mode"),isRichEditingEnabled:l(w).getEditorSettings().richEditingEnabled,isCodeEditingEnabled:l(w).getEditorSettings().codeEditingEnabled,mode:l(w).getEditorMode()}),[]),{switchEditorMode:n}=(0,ck.useDispatch)(w),i=o;!t&&o==="visual"&&(i="text"),!r&&o==="text"&&(i="visual");let a=ake.map(l=>(!r&&l.value==="text"&&(l={...l,disabled:!0}),!t&&l.value==="visual"&&(l={...l,disabled:!0,info:(0,I0.__)("You can enable the visual editor in your profile settings.")}),l.value!==i&&!l.disabled?{...l,shortcut:e}:l));return(0,z4.jsx)(lk.MenuGroup,{label:(0,I0.__)("Editor"),children:(0,z4.jsx)(lk.MenuItemsChoice,{choices:a,value:i,onSelect:n})})}var UJ=lke;var HJ=s(A(),1),GJ=s(C(),1),{Fill:WJ,Slot:cke}=(0,HJ.createSlotFill)("ToolsMoreMenuGroup");WJ.Slot=({fillProps:e})=>(0,GJ.jsx)(cke,{fillProps:e});var uk=WJ;var YJ=s(A(),1),qJ=s(D(),1),ZJ=s(C(),1),{Fill:KJ,Slot:uke}=(0,YJ.createSlotFill)(qJ.Platform.OS==="web"?Symbol("ViewMoreMenuGroup"):"ViewMoreMenuGroup");KJ.Slot=({fillProps:e})=>(0,ZJ.jsx)(uke,{fillProps:e});var dk=KJ;var vr=s(C(),1);function fk({disabled:e=!1}){let{openModal:t}=(0,Rg.useDispatch)(Ce),{set:r}=(0,Rg.useDispatch)(Pm.store),{toggleDistractionFree:o}=(0,Rg.useDispatch)(w),n=(0,Rg.useSelect)(a=>a(Pm.store).get("core","showIconLabels"),[]),i=()=>{r("core","distractionFree",!1)};return(0,vr.jsx)(vr.Fragment,{children:(0,vr.jsx)(_s.DropdownMenu,{icon:Nr,label:(0,gr.__)("Options"),popoverProps:{placement:"bottom-end",className:"more-menu-dropdown__content"},toggleProps:{showTooltip:!n,...n&&{variant:"tertiary"},tooltipPosition:"bottom",size:"compact",disabled:e},children:({onClose:a})=>(0,vr.jsxs)(vr.Fragment,{children:[(0,vr.jsxs)(_s.MenuGroup,{label:(0,gr._x)("View","noun"),children:[(0,vr.jsx)(Pm.PreferenceToggleMenuItem,{scope:"core",name:"fixedToolbar",onToggle:i,label:(0,gr.__)("Top toolbar"),info:(0,gr.__)("Access all block and document tools in a single place"),messageActivated:(0,gr.__)("Top toolbar activated."),messageDeactivated:(0,gr.__)("Top toolbar deactivated.")}),(0,vr.jsx)(Pm.PreferenceToggleMenuItem,{scope:"core",name:"distractionFree",label:(0,gr.__)("Distraction free"),info:(0,gr.__)("Write with calmness"),handleToggling:!1,onToggle:()=>o({createNotice:!1}),messageActivated:(0,gr.__)("Distraction free mode activated."),messageDeactivated:(0,gr.__)("Distraction free mode deactivated."),shortcut:U4.displayShortcut.primaryShift("\\")}),(0,vr.jsx)(Pm.PreferenceToggleMenuItem,{scope:"core",name:"focusMode",label:(0,gr.__)("Spotlight mode"),info:(0,gr.__)("Focus on one block at a time"),messageActivated:(0,gr.__)("Spotlight mode activated."),messageDeactivated:(0,gr.__)("Spotlight mode deactivated.")}),(0,vr.jsx)(dk.Slot,{fillProps:{onClose:a}})]}),(0,vr.jsx)(UJ,{}),(0,vr.jsx)(rs.Slot,{name:"core/plugin-more-menu",label:(0,gr.__)("Panels"),fillProps:{onClick:a}}),(0,vr.jsxs)(_s.MenuGroup,{label:(0,gr.__)("Tools"),children:[(0,vr.jsx)(_s.MenuItem,{onClick:()=>t("editor/keyboard-shortcut-help"),shortcut:U4.displayShortcut.access("h"),children:(0,gr.__)("Keyboard shortcuts")}),(0,vr.jsx)(jJ,{}),(0,vr.jsxs)(_s.MenuItem,{icon:Xn,href:(0,gr.__)("https://wordpress.org/documentation/article/wordpress-block-editor/"),target:"_blank",rel:"noopener noreferrer",children:[(0,gr.__)("Help"),(0,vr.jsx)(_s.VisuallyHidden,{as:"span",children:(0,gr.__)("(opens in a new tab)")})]}),(0,vr.jsx)(uk.Slot,{fillProps:{onClose:a}})]}),(0,vr.jsx)(_s.MenuGroup,{children:(0,vr.jsx)(_s.MenuItem,{onClick:()=>t("editor/preferences"),children:(0,gr.__)("Preferences")})})]})})})}var QJ=s(he(),1),mk=s(O(),1);var JJ=s(C(),1),XJ="toggle",H4="button";function $J({forceIsDirty:e,setEntitiesSavedStatesCallback:t}){let r,o=(0,QJ.useViewportMatch)("medium","<"),{togglePublishSidebar:n}=(0,mk.useDispatch)(w),{hasPublishAction:i,isBeingScheduled:a,isPending:l,isPublished:c,isPublishSidebarEnabled:u,isPublishSidebarOpened:d,isScheduled:f,postStatus:m,postStatusHasChanged:h,postType:g}=(0,mk.useSelect)(v=>({hasPublishAction:!!v(w).getCurrentPost()?._links?.["wp:action-publish"],isBeingScheduled:v(w).isEditedPostBeingScheduled(),isPending:v(w).isCurrentPostPending(),isPublished:v(w).isCurrentPostPublished(),isPublishSidebarEnabled:v(w).isPublishSidebarEnabled(),isPublishSidebarOpened:v(w).isPublishSidebarOpened(),isScheduled:v(w).isCurrentPostScheduled(),postStatus:v(w).getEditedPostAttribute("status"),postStatusHasChanged:v(w).getPostEdits()?.status,postType:v(w).getCurrentPostType()}),[]);return g===ur||c||h&&!["future","publish"].includes(m)||f&&a||l&&!i&&!o?r=H4:o||u?r=XJ:r=H4,(0,JJ.jsx)(eg,{forceIsDirty:e,isOpen:d,isToggle:r===XJ,onToggle:n,setEntitiesSavedStatesCallback:t})}var e$=s(E(),1),t$=s(A(),1);var r$=s(W(),1),o$=s(O(),1),n$=s(lt(),1);var i$=s(C(),1);function s$(){let{hasLoaded:e,permalink:t,isPublished:r,label:o,showIconLabels:n}=(0,o$.useSelect)(i=>{let a=i(w).getCurrentPostType(),l=i(r$.store).getPostType(a),{get:c}=i(n$.store);return{permalink:i(w).getPermalink(),isPublished:i(w).isCurrentPostPublished(),label:l?.labels.view_item,hasLoaded:!!l,showIconLabels:c("core","showIconLabels")}},[]);return!r||!t||!e?null:(0,i$.jsx)(t$.Button,{icon:Xn,label:o||(0,e$.__)("View post"),href:t,target:"_blank",showTooltip:!n,size:"compact"})}var a$=s(he(),1),un=s(A(),1),ma=s(E(),1);var N0=s(O(),1),l$=s(W(),1),c$=s(lt(),1);var u$=s($(),1);var ao=s(C(),1);function d$({forceIsAutosaveable:e,disabled:t}){let{deviceType:r,homeUrl:o,isTemplate:n,isViewable:i,showIconLabels:a,isTemplateHidden:l,templateId:c}=(0,N0.useSelect)(x=>{let{getDeviceType:T,getCurrentPostType:R,getCurrentTemplateId:F,getRenderingMode:B}=x(w),{getEntityRecord:z,getPostType:L}=x(l$.store),{get:M}=x(c$.store),k=R();return{deviceType:T(),homeUrl:z("root","__unstableBase")?.home,isTemplate:k==="wp_template",isViewable:L(k)?.viewable??!1,showIconLabels:M("core","showIconLabels"),isTemplateHidden:B()==="post-only",templateId:F()}},[]),{setDeviceType:u,setRenderingMode:d,setDefaultRenderingMode:f}=N((0,N0.useDispatch)(w)),{resetZoomLevel:m}=N((0,N0.useDispatch)(u$.store)),h=x=>{u(x),m()};if((0,a$.useViewportMatch)("medium","<"))return null;let v={placement:"bottom-end"},y={className:"editor-preview-dropdown__toggle",iconPosition:"right",size:"compact",showTooltip:!a,disabled:t,accessibleWhenDisabled:t},b={"aria-label":(0,ma.__)("View options")},_={desktop:J1,mobile:Ym,tablet:US},S=[{value:"Desktop",label:(0,ma.__)("Desktop"),icon:J1},{value:"Tablet",label:(0,ma.__)("Tablet"),icon:US},{value:"Mobile",label:(0,ma.__)("Mobile"),icon:Ym}];return(0,ao.jsx)(un.DropdownMenu,{className:re("editor-preview-dropdown",`editor-preview-dropdown--${r.toLowerCase()}`),popoverProps:v,toggleProps:y,menuProps:b,icon:_[r.toLowerCase()],label:(0,ma.__)("View"),disableOpenOnArrowDown:t,children:({onClose:x})=>(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsx)(un.MenuGroup,{children:(0,ao.jsx)(un.MenuItemsChoice,{choices:S,value:r,onSelect:h})}),n&&(0,ao.jsx)(un.MenuGroup,{children:(0,ao.jsxs)(un.MenuItem,{href:o,target:"_blank",icon:Xn,onClick:x,children:[(0,ma.__)("View site"),(0,ao.jsx)(un.VisuallyHidden,{as:"span",children:(0,ma.__)("(opens in a new tab)")})]})}),!n&&!!c&&(0,ao.jsx)(un.MenuGroup,{children:(0,ao.jsx)(un.MenuItem,{icon:l?void 0:Pi,isSelected:!l,role:"menuitemcheckbox",onClick:()=>{let T=l?"template-locked":"post-only";d(T),f(T),m()},children:(0,ma.__)("Show template")})}),i&&(0,ao.jsx)(un.MenuGroup,{children:(0,ao.jsx)(od,{className:"editor-preview-dropdown__button-external",role:"menuitem",forceIsAutosaveable:e,"aria-label":(0,ma.__)("Preview in new tab"),textContent:(0,ao.jsxs)(ao.Fragment,{children:[(0,ma.__)("Preview in new tab"),(0,ao.jsx)(un.Icon,{icon:Xn})]}),onPreview:x})}),(0,ao.jsx)(rs.Slot,{name:"core/plugin-preview-menu",fillProps:{onClick:x}})]})})}var f$=s(A(),1),G4=s(E(),1),m$=s(D(),1),F0=s(O(),1),W4=s($(),1);var Y4=s(lt(),1),pk=s(Oi(),1),p$=s(yo(),1);var h$=s(C(),1),dke=({disabled:e})=>{let{isZoomOut:t,showIconLabels:r,isDistractionFree:o}=(0,F0.useSelect)(u=>({isZoomOut:N(u(W4.store)).isZoomOut(),showIconLabels:u(Y4.store).get("core","showIconLabels"),isDistractionFree:u(Y4.store).get("core","distractionFree")})),{resetZoomLevel:n,setZoomLevel:i}=N((0,F0.useDispatch)(W4.store)),{registerShortcut:a,unregisterShortcut:l}=(0,F0.useDispatch)(pk.store);return(0,m$.useEffect)(()=>(a({name:"core/editor/zoom",category:"global",description:(0,G4.__)("Enter or exit zoom out."),keyCombination:{modifier:(0,p$.isAppleOS)()?"primaryShift":"secondary",character:"0"}}),()=>{l("core/editor/zoom")}),[a,l]),(0,pk.useShortcut)("core/editor/zoom",()=>{t?n():i("auto-scaled")},{isDisabled:o}),(0,h$.jsx)(f$.Button,{accessibleWhenDisabled:!0,disabled:e,onClick:()=>{t?n():i("auto-scaled")},icon:jA,label:(0,G4.__)("Zoom Out"),isPressed:t,size:"compact",showTooltip:!r,className:"editor-zoom-out-toggle"})},g$=dke;var Z$=s(A(),1),Dg=s(D(),1),K$=s(W(),1),Rk=s(E(),1);var hk=s(A(),1),b$=s(D(),1);var Ag=s(D(),1);function v$(e){let[t,r]=(0,Ag.useState)(e),[o,n]=(0,Ag.useState)(e?"loading":"idle");t!==e&&(r(e),n(e?"loading":"idle"));let i=(0,Ag.useCallback)(()=>n("loaded"),[]),a=(0,Ag.useCallback)(()=>n("error"),[]);return{status:o,handleLoad:i,handleError:a}}var Oc=s(C(),1);uw([Xw]);var y$="#1e1e1e",fke="#fff";function mke({className:e,src:t,name:r,label:o,variant:n,size:i="default",borderColor:a,dimmed:l=!1,statusIndicator:c,style:u,...d}){let{status:f,handleLoad:m,handleError:h}=v$(t),g=f==="loaded",v=n==="badge"&&!!r,y=r?r.split(/\s+/).slice(0,2).map(x=>x[0]).join("").toUpperCase():void 0,b=(0,b$.useMemo)(()=>a&&xr(a).isReadable(y$,{level:"AA",size:"normal"})?y$:fke,[a]),_={...u,...a?{"--editor-avatar-outline-color":a,"--editor-avatar-name-color":b}:{}},S=(0,Oc.jsxs)("div",{className:re("editor-avatar",e,{"has-avatar-border-color":!!a,"has-src":g,"is-badge":v,"is-small":i==="small","is-dimmed":l}),style:_,role:r?"img":void 0,"aria-label":r||void 0,...d,children:[(0,Oc.jsxs)("span",{className:"editor-avatar__image",children:[t&&(0,Oc.jsx)("img",{src:t,alt:"",crossOrigin:"anonymous",className:"editor-avatar__img",onLoad:m,onError:h}),!g&&y]}),l&&!!c&&(0,Oc.jsx)("span",{className:"editor-avatar__status-indicator",children:(0,Oc.jsx)(hk.Icon,{icon:c})}),v&&(0,Oc.jsx)("span",{className:"editor-avatar__name",children:o||r})]});return r&&(!v||o)?(0,Oc.jsx)(hk.Tooltip,{text:r,children:S}):S}var Ic=mke;var S$=s(D(),1),gk=s(E(),1),vk=s(C(),1);function pke({className:e,max:t=3,children:r,...o}){let n=S$.Children.toArray(r),i=n.slice(0,t),a=n.length-t;return(0,vk.jsxs)("div",{role:"group",className:re("editor-avatar-group",e),...o,children:[i,a>0&&(0,vk.jsx)("span",{className:"editor-avatar-group__overflow","aria-label":(0,gk.sprintf)((0,gk._n)("%d more collaborator","%d more collaborators",a),a),children:`+${a}`})]})}var q4=pke;var D0=s(E(),1),yk=s(A(),1);var T$=s(Xm(),1);function Nc(e){return e?.["48"]||e?.["96"]||e?.["24"]}var w$=s(E(),1);function x$(e){return e.trim()}function Og(){}var _$=["#C36EFF","#FF51A8","#E4780A","#FF35EE","#879F11","#46A494","#00A2C3"];function ws(e){return _$[e%_$.length]}function C$(e,t=10){if(!e)return"";let r=(0,w$._x)("words","Word count type. Do not translate!"),o=e.trim(),n="";if(r==="words")n=o.split(" ",t).join(" ");else if(r==="characters_excluding_spaces"){let a=o.split("",t).join(""),l=a.length-a.replaceAll(" ","").length;n=o.split("",t+l).join("")}else r==="characters_including_spaces"&&(n=o.split("",t).join(""));return n!==o?n+"\u2026":n}function dn(e,t,r){if(!t)return;let o=e&&e!=="new"?`[role=treeitem][id="comment-thread-${e}"]`:"[role=treeitem]:not([id])",n=r?`${o} ${r}`:o;return new Promise(i=>{if(t.querySelector(n))return i(t.querySelector(n));let a=null,l=new window.MutationObserver(()=>{t.querySelector(n)&&(clearTimeout(a),l.disconnect(),i(t.querySelector(n)))});l.observe(t,{childList:!0,subtree:!0}),a=setTimeout(()=>{l.disconnect(),i(null)},3e3)}).then(i=>i?.focus())}var fi=s(C(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='9537a5e604']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","9537a5e604"),e.appendChild(document.createTextNode(".editor-collaborators-presence__list.components-popover .components-popover__content{background:#fff;border:1px solid #ddd;border-radius:8px;border-width:1px 0 0 1px;box-shadow:0 1px 2px #0000000d,0 2px 3px #0000000a,0 6px 6px #00000008,0 8px 8px #00000005}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-content{min-width:280px}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-header{align-items:center;display:flex;justify-content:space-between;padding:8px 16px}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-header-title{display:flex;font-size:13px;font-weight:499;gap:4px;line-height:20px}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-header-title span{color:#757575}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-header-action{padding:0}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-header-action button{color:#1e1e1e;height:32px;padding:0;width:32px}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-items{display:flex;flex-direction:column;padding-bottom:16px}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item{all:unset;align-items:center;box-sizing:border-box;cursor:pointer;display:flex;gap:8px;padding:12px 16px;transition:background-color .2s ease;width:100%}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item:hover:not(:disabled){background-color:rgba(var(--wp-admin-theme-color--rgb),.04)}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item:active:not(:disabled){background-color:rgba(var(--wp-admin-theme-color--rgb),.08)}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item:focus-visible{outline:2px solid var(--wp-admin-theme-color,#3858e9);outline-offset:-2px}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item:disabled{cursor:default}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item-info{display:flex;flex:1;flex-direction:column;min-width:0}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item-name{color:#1e1e1e;font-size:13px;font-weight:499;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}")),document.head.appendChild(e)}function P$({activeCollaborators:e,popoverAnchor:t,setIsPopoverVisible:r,cursorRegistry:o}){let n=i=>{o.scrollToCursor(i,{behavior:"smooth",block:"center",highlightDuration:2e3})&&((0,T$.speak)((0,D0.__)("Scrolled to cursor"),"polite"),r(!1))};return(0,fi.jsx)(yk.Popover,{anchor:t,placement:"bottom",offset:8,className:"editor-collaborators-presence__list",onClose:()=>r(!1),children:(0,fi.jsxs)("div",{className:"editor-collaborators-presence__list-content",children:[(0,fi.jsxs)("div",{className:"editor-collaborators-presence__list-header",children:[(0,fi.jsxs)("div",{className:"editor-collaborators-presence__list-header-title",children:[(0,D0.__)("Collaborators"),(0,fi.jsx)("span",{children:e.length})]}),(0,fi.jsx)("div",{className:"editor-collaborators-presence__list-header-action",children:(0,fi.jsx)(yk.Button,{__next40pxDefaultSize:!0,icon:Kn,iconSize:24,label:(0,D0.__)("Close Collaborators List"),onClick:()=>r(!1)})})]}),(0,fi.jsx)("div",{className:"editor-collaborators-presence__list-items",children:e.map(i=>{let a=i.isMe;return(0,fi.jsxs)("button",{className:"editor-collaborators-presence__list-item",disabled:a,onClick:()=>n(i.clientId),children:[(0,fi.jsx)(Ic,{src:Nc(i.collaboratorInfo.avatar_urls),name:i.collaboratorInfo.name,borderColor:a?"var(--wp-admin-theme-color)":ws(i.collaboratorInfo.id),dimmed:!i.isConnected}),(0,fi.jsx)("div",{className:"editor-collaborators-presence__list-item-info",children:(0,fi.jsx)("div",{className:"editor-collaborators-presence__list-item-name",children:a?(0,D0.__)("You"):i.collaboratorInfo.name})})]},i.clientId)})})]})})}function hke(e,t){e.classList.add("collaborators-overlay-cursor-highlighted"),setTimeout(()=>{e.classList.remove("collaborators-overlay-cursor-highlighted")},t)}function k$(){let e=new Map;return{registerCursor(t,r){e.set(t,r)},unregisterCursor(t){e.delete(t)},scrollToCursor(t,r){let o=e.get(t);return o?(o.scrollIntoView({behavior:r?.behavior??"smooth",block:r?.block??"center",inline:r?.inline??"nearest"}),r?.highlightDuration&&hke(o,r.highlightDuration),!0):!1},removeAll(){e.clear()}}}var q$=s($(),1);var kk=s(he(),1),pa=s(D(),1),W$=s(E(),1);var bk="0 1px 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 3px rgba(0, 0, 0, 0.02), 0 4px 4px rgba(0, 0, 0, 0.01)",Z4="9999px",K4="32px",X4="24px",Sk="4px",_k="8px",Q4="1px",E$="2px",dd="#fff",R$="11px",A$="13px",J4="499",O$="20px";var I$=`
.editor-avatar {
	position: relative;
	display: inline-flex;
	align-items: center;
	border-radius: ${Z4};
	flex-shrink: 0;
	box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 2px) ${dd}, ${bk};
}
.editor-avatar__image {
	box-sizing: border-box;
	position: relative;
	width: ${K4};
	height: ${K4};
	border-radius: ${Z4};
	border: 0;
	background-color: var(--wp-admin-theme-color, #3858e9);
	overflow: hidden;
	overflow: clip;
	flex-shrink: 0;
	font-size: 0;
	color: ${dd};
}
.is-small > .editor-avatar__image {
	width: ${X4};
	height: ${X4};
}
.has-avatar-border-color > .editor-avatar__image {
	border: var(--wp-admin-border-width-focus, 2px) solid var(--editor-avatar-outline-color);
	background-clip: padding-box;
}
.has-avatar-border-color > .editor-avatar__image::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus, 2px) ${dd};
	pointer-events: none;
	z-index: 1;
}
.editor-avatar__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: inherit;
	opacity: 0;
}
.has-src > .editor-avatar__image > .editor-avatar__img {
	opacity: 1;
}
.editor-avatar:not(.has-src) > .editor-avatar__image {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: ${R$};
	font-weight: ${J4};
	border: 0;
	background-clip: border-box;
}
.editor-avatar:not(.has-src) > .editor-avatar__image::after {
	content: none;
}
.editor-avatar:not(.has-src).has-avatar-border-color > .editor-avatar__image {
	background-color: var(--editor-avatar-outline-color);
}
.editor-avatar__name {
	font-size: ${A$};
	font-weight: ${J4};
	line-height: ${O$};
	color: var(--editor-avatar-name-color, ${dd});
	min-width: 0;
	padding-bottom: 2px; /* $grid-unit-05 / 2 */
	overflow: hidden;
	opacity: 0;
	white-space: nowrap;
	transition: opacity 0.15s cubic-bezier(0.15, 0, 0.15, 1);
}
.editor-avatar.is-badge {
	display: inline-grid;
	grid-template-columns: min-content 0fr;
	column-gap: 0;
	padding-inline-end: 0;
	background-color: var(--wp-admin-theme-color, #3858e9);
	transition:
		grid-template-columns 0.3s cubic-bezier(0.15, 0, 0.15, 1),
		column-gap 0.3s cubic-bezier(0.15, 0, 0.15, 1),
		padding-inline-end 0.3s cubic-bezier(0.15, 0, 0.15, 1);
}
.editor-avatar.is-badge:hover {
	grid-template-columns: min-content 1fr;
	column-gap: ${Sk};
	padding-inline-end: ${_k};
	transition-timing-function: cubic-bezier(0.85, 0, 0.85, 1);
}
.editor-avatar.is-badge:hover .editor-avatar__name {
	opacity: 1;
	transition-timing-function: cubic-bezier(0.85, 0, 0.85, 1);
}
.editor-avatar.is-badge.has-avatar-border-color {
	background-color: var(--editor-avatar-outline-color);
}
@media (prefers-reduced-motion: reduce) {
	.editor-avatar.is-badge,
	.editor-avatar__name {
		transition: none;
	}
}
`;var N$=`
.block-canvas-cover {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 20000;
}
.block-canvas-cover .collaborators-overlay-full {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}
.block-canvas-cover .collaborators-overlay-fixed {
	position: fixed;
	width: 100%;
	height: 100%;
}
.collaborators-overlay-user {
	position: absolute;
}
/* Cursor lines render below avatar labels across all users. The parent
   .collaborators-overlay-user has no z-index so it does not create a
   stacking context \u2014 children participate in the shared overlay context. */
.collaborators-overlay-user-cursor {
	position: absolute;
	z-index: 0;
	width: ${E$};
	border-radius: ${Q4};
	outline: ${Q4} solid ${dd};
	box-shadow: ${bk};
	animation: collaborators-overlay-cursor-blink 1s infinite;
}
.collaborators-overlay-selection-rect {
	position: absolute;
	opacity: 0.15;
	pointer-events: none;
	border-radius: 2px;
}

/* Overlay-specific positioning applied to the Avatar cursor label. */
.collaborators-overlay-user-label.editor-avatar {
	position: absolute;
	z-index: 1;
	transform: translate(-11px, -100%);
	margin-top: -${Sk};
	pointer-events: auto;
	overflow: visible;
	width: max-content;
}
/* Avatar positioned above a highlighted block as a label. */
.collaborators-overlay-block-label.editor-avatar {
	position: absolute;
	z-index: 1;
	transform: translateY(calc(-100% - ${_k}));
	pointer-events: auto;
	overflow: visible;
	width: max-content;
}

@keyframes collaborators-overlay-cursor-blink {
	0%, 45% { opacity: 1; }
	55%, 95% { opacity: 0; }
	100% { opacity: 1; }
}
.collaborators-overlay-cursor-highlighted .collaborators-overlay-user-cursor {
	animation: collaborators-overlay-cursor-highlight 0.6s ease-in-out 3;
}
.collaborators-overlay-cursor-highlighted .collaborators-overlay-user-label {
	animation: collaborators-overlay-label-highlight 0.6s ease-in-out 3;
}
@keyframes collaborators-overlay-cursor-highlight {
	0%, 100% {
		transform: scale(1);
		filter: drop-shadow(0 0 0 transparent);
	}
	50% {
		transform: scale(1.2);
		filter: drop-shadow(0 0 8px currentColor);
	}
}
@keyframes collaborators-overlay-label-highlight {
	0%, 100% {
		transform: translate(-11px, -100%) scale(1);
		filter: drop-shadow(0 0 0 transparent);
	}
	50% {
		transform: translate(-11px, -100%) scale(1.1);
		filter: drop-shadow(0 0 6px currentColor);
	}
}
.block-editor-block-list__block.is-collaborator-selected:not(:focus)::after {
	content: "";
	position: absolute;
	pointer-events: none;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	outline-color: var(--collaborator-outline-color);
	outline-style: solid;
	outline-width: calc(var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
	outline-offset: calc(-1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
	box-shadow: inset 0 0 0 calc((var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1)) + 0.5px) rgba(${dd}, 0.7);
	z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
	.collaborators-overlay-user-label,
	.collaborators-overlay-user-cursor {
		animation: none;
	}
}
`;function F$(e,t){let r=null,o=()=>{try{e()}catch{}r=setTimeout(o,t)};return r=setTimeout(o,t),()=>{r&&clearTimeout(r)}}var eN=s(W(),1),Ng=s(D(),1);var Ig=s(D(),1);function wk(e){let[t,r]=(0,Ig.useState)(0),o=(0,Ig.useRef)(null),n=(0,Ig.useCallback)(()=>(o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(i=>i+1)},e),()=>{o.current&&clearTimeout(o.current)}),[e]);return[t,n]}var{useActiveCollaborators:gke,useResolvedSelection:vke}=N(eN.privateApis),{SelectionType:yke}=N(eN.privateApis);function D$(e,t,r,o,n){let i=(0,Ng.useRef)(new Set),a=gke(r??null,o??null),l=vke(r??null,o??null),[c,u]=(0,Ng.useState)([]),[d,f]=wk(n);return(0,Ng.useEffect)(()=>{if(!t){u([]);return}let m=i.current,h=new Set,g=a.filter(_=>{let S=_.editorState?.selection?.type===yke.WholeBlock;return!_.isMe&&S}).map(_=>{let S;try{({localClientId:S}=l(_.editorState?.selection))}catch{return null}return S?{blockId:S,color:_.isMe?"var(--wp-admin-theme-color)":ws(_.collaboratorInfo.id),userName:_.collaboratorInfo.name,avatarUrl:Nc(_.collaboratorInfo.avatar_urls)}:null}).filter(_=>!_||h.has(_.blockId)?!1:(h.add(_.blockId),!0)),v=new Set(g.map(_=>_.blockId));for(let _ of m)if(!v.has(_)){let S=$4(t,_);S&&(S.classList.remove("is-collaborator-selected"),S.style.removeProperty("--collaborator-outline-color")),m.delete(_)}let y=[],b=e?.getBoundingClientRect()??null;return g.forEach(_=>{let{color:S,blockId:x,userName:T,avatarUrl:R}=_,F=$4(t,x);if(F&&(F.classList.add("is-collaborator-selected"),F.style.setProperty("--collaborator-outline-color",S),m.add(x),b)){let B=F.getBoundingClientRect();y.push({blockId:x,userName:T,avatarUrl:R,color:S,x:B.left-b.left,y:B.top-b.top})}}),u(y),()=>{for(let _ of m){let S=$4(t,_);S&&(S.classList.remove("is-collaborator-selected"),S.style.removeProperty("--collaborator-outline-color"))}m.clear()}},[a,t,e,d,l]),{highlights:c,rerenderHighlightsAfterDelay:f}}var $4=(e,t)=>e.querySelector(`[data-block="${t}"]`);var rN=s(W(),1),z$=s(O(),1),Pk=s(D(),1),U$=s(lt(),1);var V$=s(W(),1);var bke=500,xk=(e,t,r,o)=>e===null||!t?null:Ske(t,e,r,o)??null,Ske=(e,t,r,o)=>{let{node:n,offset:i}=tN(e,t,r),a=r.createRange();try{a.setStart(n,i)}catch{return null}a.collapse(!0);let l=a.getBoundingClientRect(),c=e.getBoundingClientRect(),u=0,d=0;l.x===0&&l.y===0&&l.width===0&&l.height===0?(u=c.left-o.left,d=c.top-o.top):(u=l.left-o.left,d=l.top-o.top);let f=l.height;if(f===0){let m=r.defaultView??window;f=parseInt(m.getComputedStyle(e).lineHeight,10)||c.height}return{x:u,y:d,height:f}},Ck=(e,t,r,o,n)=>{let i=t,a=r;i>a&&([i,a]=[a,i]);let l=tN(e,i,o),c=tN(e,a,o),u=o.createRange();try{u.setStart(l.node,l.offset),u.setEnd(c.node,c.offset)}catch{return null}let d=u.getClientRects(),f=[];for(let m of d){if(m.width===0&&m.height===0)continue;let h=m.left-n.left,g=m.top-n.top;f.some(y=>y.x===h&&y.y===g&&y.width===m.width&&y.height===m.height)||f.push({x:h,y:g,width:m.width,height:m.height})}return f.length>0?f:null},B$=(e,t,r)=>{let o=t.createRange();o.selectNodeContents(e);let n=o.getClientRects(),i=[];for(let a of n)a.width===0&&a.height===0||i.push({x:a.left-r.left,y:a.top-r.top,width:a.width,height:a.height});if(i.length===0){let a=e.getBoundingClientRect();a.width>0&&a.height>0&&i.push({x:a.left-r.left,y:a.top-r.top,width:a.width,height:a.height})}return i},M$=(e,t,r)=>{let o=r.querySelectorAll("[data-block]"),n=-1,i=-1;for(let l=0;l<o.length;l++){let c=o[l].getAttribute("data-block");c===e&&(n=l),c===t&&(i=l)}if(n===-1||i===-1)return[];n>i&&([n,i]=[i,n]);let a=[];for(let l=n+1;l<i;l++)a.push(o[l]);return a},tN=(e,t,r)=>{let o=r.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT),n=0,i=null,a=null,l=1;for(;a=o.nextNode();){if(l++,l>bke)return i?{node:i,offset:0}:{node:e,offset:0};let c=a.nodeValue?.length??0;if(a.nodeType===Node.ELEMENT_NODE)if(a.nodeName==="BR"){if(n+1>=t){let u=o.nextNode();return u?.nodeType===Node.TEXT_NODE?{node:u,offset:0}:i?{node:i,offset:i.nodeValue?.length??0}:{node:e,offset:0}}n+=1;continue}else continue;if(c!==0){if(n+c>=t)return{node:a,offset:t-n};n+=c,a.nodeType===Node.TEXT_NODE&&(i=a)}}return i&&i.nodeValue?.length?{node:i,offset:i.nodeValue.length}:{node:e,offset:0}},L$=(e,t)=>e.compareDocumentPosition(t)===Node.DOCUMENT_POSITION_FOLLOWING;var{SelectionDirection:_ke,SelectionType:Tk}=N(V$.privateApis);function j$(e,t,r,o){return e.type===Tk.None||e.type===Tk.WholeBlock?{}:e.type===Tk.Cursor?wke(t,o):r?xke(e,t,r,o):{}}function wke(e,t){if(!e.localClientId)return{};let r=t.editorDocument.querySelector(`[data-block="${e.localClientId}"]`);return{coords:xk(e.richTextOffset,r,t.editorDocument,t.overlayRect)}}function xke(e,t,r,o){if(!t.localClientId||!r.localClientId||t.richTextOffset===null||r.richTextOffset===null)return{};let i=e.selectionDirection===_ke.Backward?t:r,a,l=null;if(e.type===Tk.SelectionInOneBlock){let u=Cke(t,r,o);a=u.rects,l=u.blockElement}else{let u=Tke(t,r,o);a=u.rects,l=i.localClientId===u.firstBlockClientId?u.firstBlock:u.lastBlock}if(a.length>0)return{coords:xk(i.richTextOffset,l,o.editorDocument,o.overlayRect),selectionRects:a};let c=o.editorDocument.querySelector(`[data-block="${t.localClientId}"]`);return{coords:xk(t.richTextOffset,c,o.editorDocument,o.overlayRect)}}function Cke(e,t,r){let o=r.editorDocument.querySelector(`[data-block="${e.localClientId}"]`);return!o||e.richTextOffset===null||t.richTextOffset===null?{rects:[],blockElement:null}:{rects:Ck(o,e.richTextOffset,t.richTextOffset,r.editorDocument,r.overlayRect)??[],blockElement:o}}function Tke(e,t,r){let o=e,n=t,i=r.editorDocument.querySelector(`[data-block="${o.localClientId}"]`),a=r.editorDocument.querySelector(`[data-block="${n.localClientId}"]`);if(i&&a&&L$(a,i)&&(o=t,n=e,[i,a]=[a,i]),!i||!a||o.richTextOffset===null||n.richTextOffset===null||!o.localClientId||!n.localClientId)return{rects:[],firstBlock:null,lastBlock:null,firstBlockClientId:null};let l=[],c=Ck(i,o.richTextOffset,Number.MAX_SAFE_INTEGER,r.editorDocument,r.overlayRect);c&&l.push(...c);let u=M$(o.localClientId,n.localClientId,r.editorDocument);for(let f of u){let m=B$(f,r.editorDocument,r.overlayRect);l.push(...m)}let d=Ck(a,0,n.richTextOffset,r.editorDocument,r.overlayRect);return d&&l.push(...d),{rects:l,firstBlock:i,lastBlock:a,firstBlockClientId:o.localClientId}}var{useActiveCollaborators:Pke,useResolvedSelection:kke}=N(rN.privateApis),{SelectionType:Fg}=N(rN.privateApis);function H$(e,t,r,o,n){let i=Pke(r??null,o??null),a=kke(r??null,o??null),l=(0,z$.useSelect)(m=>m(U$.store).get("core","showCollaborationCursor"),[]),[c,u]=(0,Pk.useState)([]),[d,f]=wk(n);return(0,Pk.useEffect)(()=>{if(!e||!t){u([]);return}let m=e.getBoundingClientRect(),h={editorDocument:t,overlayRect:m},g=[],v=i.some(y=>!y.isMe);i.forEach(y=>{if(y.isMe&&(!l||!v))return;let b=y.editorState?.selection??{type:Fg.None},_={richTextOffset:null,localClientId:null},S;if(b.type===Fg.Cursor)try{_=a(b)}catch{return}else if(b.type===Fg.SelectionInOneBlock||b.type===Fg.SelectionInMultipleBlocks)try{_=a({type:Fg.Cursor,cursorPosition:b.cursorStartPosition}),S=a({type:Fg.Cursor,cursorPosition:b.cursorEndPosition})}catch{return}let x=y.collaboratorInfo.name,T=y.clientId,R=y.isMe?"var(--wp-admin-theme-color)":ws(y.collaboratorInfo.id),F=Nc(y.collaboratorInfo.avatar_urls),B=j$(b,_,S,h);if(B.coords){let z={userName:x,clientId:T,color:R,avatarUrl:F,isMe:y.isMe,...B.coords};B.selectionRects&&(z.selectionRects=B.selectionRects),g.push(z)}}),u(g)},[t,a,e,i,l,d]),{cursors:c,rerenderCursorsAfterDelay:f}}var $a=s(C(),1),G$=500,Eke=1e4;function Y$({blockEditorDocument:e,postId:t,postType:r,cursorRegistry:o}){let[n,i]=(0,pa.useState)(null),{cursors:a,rerenderCursorsAfterDelay:l}=H$(n,e??null,t??null,r??null,G$),{highlights:c,rerenderHighlightsAfterDelay:u}=D$(n,e??null,t??null,r??null,G$),d=(0,pa.useCallback)(()=>{l(),u()},[l,u]),f=(0,kk.useResizeObserver)(d);(0,pa.useEffect)(()=>{let v=l(),y=u();return()=>{v(),y()}},[l,u]),(0,pa.useEffect)(()=>{if(a.length!==0)return F$(l,Eke)},[a.length,l]);let m=(0,kk.useMergeRefs)([i,f]),h=(0,pa.useRef)(new Map);(0,pa.useEffect)(()=>{if(!o)return;let v=h.current,y=new Set(a.map(b=>b.clientId));for(let b of v.keys())y.has(b)||(o.unregisterCursor(b),v.delete(b));for(let[b,_]of v.entries())o.registerCursor(b,_);return()=>o.removeAll()},[a,o]);let g=(0,pa.useCallback)(v=>y=>{y?h.current.set(v,y):h.current.delete(v)},[]);return(0,$a.jsxs)("div",{className:"collaborators-overlay-full",ref:m,children:[(0,$a.jsx)("style",{children:I$+N$}),a.map(v=>(0,$a.jsxs)("div",{children:[v.selectionRects?.map((y,b)=>(0,$a.jsx)("div",{className:"collaborators-overlay-selection-rect",style:{left:`${y.x}px`,top:`${y.y}px`,width:`${y.width}px`,height:`${y.height}px`,backgroundColor:v.color}},`${v.clientId}-sel-${b}`)),(0,$a.jsxs)("div",{ref:g(v.clientId),className:"collaborators-overlay-user",style:{left:`${v.x}px`,top:`${v.y}px`},children:[!v.isMe&&(0,$a.jsx)("div",{className:"collaborators-overlay-user-cursor",style:{backgroundColor:v.color,height:`${v.height}px`}}),(0,$a.jsx)(Ic,{className:"collaborators-overlay-user-label",variant:"badge",size:"small",src:v.avatarUrl,name:v.userName,label:v.isMe?(0,W$.__)("You"):void 0,borderColor:v.color})]})]},v.clientId)),c.map(v=>(0,$a.jsx)(Ic,{className:"collaborators-overlay-block-label",variant:"badge",size:"small",src:v.avatarUrl,name:v.userName,borderColor:v.color,style:{left:`${v.x}px`,top:`${v.y}px`}},v.blockId))]})}var oN=s(C(),1),{BlockCanvasCover:Rke}=N(q$.privateApis);function Ek({postId:e,postType:t,cursorRegistry:r}){return(0,oN.jsx)(Rke.Fill,{children:({containerRef:o})=>(0,oN.jsx)(Y$,{blockEditorDocument:o.current?.ownerDocument,postId:e,postType:t,cursorRegistry:r})})}var xs=s(C(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='eee1778bc0']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","eee1778bc0"),e.appendChild(document.createTextNode(".editor-collaborators-presence{align-items:center;background:#f0f0f0;border-radius:4px;display:flex;flex-shrink:0;height:32px;margin-right:8px}.editor-collaborators-presence:has(.is-pressed),.editor-collaborators-presence:hover{background-color:#e0e0e0}.editor-collaborators-presence__button.editor-collaborators-presence__button.components-button{align-items:center;background:#0000;border-radius:4px;box-sizing:border-box;color:#2f2f2f;cursor:pointer;display:flex;height:100%;padding:4px;position:relative}.editor-collaborators-presence__button.editor-collaborators-presence__button.components-button.is-pressed,.editor-collaborators-presence__button.editor-collaborators-presence__button.components-button.is-pressed:hover,.editor-collaborators-presence__button.editor-collaborators-presence__button.components-button:hover{background:#0000;color:#2f2f2f}.editor-collaborators-presence__button.editor-collaborators-presence__button.components-button:focus:not(:active){box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus,2px) var(--wp-admin-theme-color,#007cba);outline:none}")),document.head.appendChild(e)}var{useActiveCollaborators:Ake}=N(K$.privateApis);function X$({postId:e,postType:t}){let r=Ake(e,t),o=r.filter(f=>!f.isMe),n=(0,Dg.useMemo)(()=>[...r].sort((f,m)=>f.isMe&&!m.isMe?-1:!f.isMe&&m.isMe?1:0),[r]),[i]=(0,Dg.useState)(k$),[a,l]=(0,Dg.useState)(!1),[c,u]=(0,Dg.useState)(null);if(o.length===0)return null;let d=r.find(f=>f.isMe);return(0,xs.jsxs)(xs.Fragment,{children:[(0,xs.jsxs)("div",{className:"editor-collaborators-presence",children:[(0,xs.jsx)(Z$.Button,{__next40pxDefaultSize:!0,className:"editor-collaborators-presence__button",onClick:()=>l(!a),isPressed:a,ref:u,"aria-label":(0,Rk.sprintf)((0,Rk.__)("Collaborators list, %d online"),n.length),children:(0,xs.jsxs)(q4,{max:4,children:[d&&(0,xs.jsx)(Ic,{src:Nc(d.collaboratorInfo.avatar_urls),name:d.collaboratorInfo.name,borderColor:"var(--wp-admin-theme-color)",size:"small"},d.clientId),o.map(f=>(0,xs.jsx)(Ic,{src:Nc(f.collaboratorInfo.avatar_urls),name:f.collaboratorInfo.name,borderColor:ws(f.collaboratorInfo.id),size:"small"},f.clientId))]})}),a&&(0,xs.jsx)(P$,{activeCollaborators:n,popoverAnchor:c,setIsPopoverVisible:l,cursorRegistry:i})]}),(0,xs.jsx)(Ek,{postId:e,postType:t,cursorRegistry:i})]})}var Er=s(C(),1);function Oke({customSaveButton:e,forceIsDirty:t,setEntitiesSavedStatesCallback:r}){let o=(0,B0.useViewportMatch)("large"),n=(0,B0.useViewportMatch)("medium"),i=(0,B0.useMediaQuery)("(max-width: 403px)"),{postId:a,postType:l,isTextEditor:c,isPublishSidebarOpened:u,showIconLabels:d,hasFixedToolbar:f,hasBlockSelection:m,hasSectionRootClientId:h,isStylesCanvasActive:g,isAttachment:v}=(0,J$.useSelect)(T=>{let{get:R}=T($$.store),{getEditorMode:F,getCurrentPostType:B,getCurrentPostId:z,isPublishSidebarOpened:L}=T(w),{getStylesPath:M,getShowStylebook:k}=N(T(w)),{getBlockSelectionStart:I,getSectionRootClientId:U}=N(T(Q$.store));return{postId:z(),postType:B(),isTextEditor:F()==="text",isPublishSidebarOpened:L(),showIconLabels:R("core","showIconLabels"),hasFixedToolbar:R("core","fixedToolbar"),hasBlockSelection:!!I(),hasSectionRootClientId:!!U(),isStylesCanvasActive:!!M()?.startsWith("/revisions")||k(),isAttachment:B()===ur&&window?.__experimentalMediaEditor}},[]),y=["post","page","wp_template"].includes(l)&&h,b=[ur,jd,Ur,qi].includes(l)||g,[_,S]=(0,eee.useState)(!0);return(0,Er.jsx)(ak,{toolbar:(0,Er.jsxs)(Er.Fragment,{children:[!v&&(0,Er.jsx)(NJ,{disableBlockTools:g||c}),f&&n&&(0,Er.jsx)(EJ,{isCollapsed:_,onToggle:S})]}),center:!i&&(!f||f&&(!m||_))?(0,Er.jsxs)(Er.Fragment,{children:[(0,Er.jsx)(X$,{postType:l,postId:a}),(0,Er.jsx)(fC,{})]}):void 0,settings:(0,Er.jsxs)(Er.Fragment,{children:[!e&&!u&&(0,Er.jsx)(pP,{forceIsDirty:t}),(0,Er.jsx)(s$,{}),(0,Er.jsx)(d$,{forceIsAutosaveable:t,disabled:b}),(0,Er.jsx)(od,{className:"editor-header__post-preview-button",forceIsAutosaveable:t}),o&&y&&(0,Er.jsx)(g$,{disabled:g}),(o||!d)&&(0,Er.jsx)(zp.Slot,{scope:"core"}),!e&&(0,Er.jsx)($J,{forceIsDirty:t,setEntitiesSavedStatesCallback:r}),e,!v&&(0,Er.jsx)(fk,{})]})})}var tee=Oke;var M0=s(O(),1),Ok=s($(),1),ree=s(he(),1),L0=s(D(),1),oee=s(lt(),1),nee=s(yo(),1);var Ak=s(C(),1),{PrivateInserterLibrary:Ike}=N(Ok.privateApis);function iee(){let{blockSectionRootClientId:e,inserterSidebarToggleRef:t,inserter:r,showMostUsedBlocks:o,sidebarIsOpened:n}=(0,M0.useSelect)(m=>{let{getInserterSidebarToggleRef:h,getInserter:g,isPublishSidebarOpened:v}=N(m(w)),{getBlockRootClientId:y,isZoomOut:b,getSectionRootClientId:_}=N(m(Ok.store)),{get:S}=m(oee.store),{getActiveComplementaryArea:x}=m(Ce),T=()=>{if(b()){let R=_();if(R)return R}return y()};return{inserterSidebarToggleRef:h(),inserter:g(),showMostUsedBlocks:S("core","mostUsedBlocks"),blockSectionRootClientId:T(),sidebarIsOpened:!!(x("core")||v())}},[]),{setIsInserterOpened:i}=(0,M0.useDispatch)(w),{disableComplementaryArea:a}=(0,M0.useDispatch)(Ce),l=(0,ree.useViewportMatch)("medium","<"),c=(0,L0.useRef)(),u=(0,L0.useCallback)(()=>{i(!1),t.current?.focus()},[t,i]),d=(0,L0.useCallback)(m=>{m.keyCode===nee.ESCAPE&&!m.defaultPrevented&&(m.preventDefault(),u())},[u]),f=(0,Ak.jsx)("div",{className:"editor-inserter-sidebar__content",children:(0,Ak.jsx)(Ike,{showMostUsedBlocks:o,showInserterHelpPanel:!0,shouldFocusBlock:l,rootClientId:e??r.rootClientId,__experimentalInsertionIndex:r.insertionIndex,onSelect:r.onSelect,__experimentalInitialTab:r.tab,__experimentalInitialCategory:r.category,__experimentalFilterValue:r.filterValue,onPatternCategorySelection:n?()=>a("core"):void 0,ref:c,onClose:u})});return(0,Ak.jsx)("div",{onKeyDown:d,className:"editor-inserter-sidebar",children:f})}var Nk=s($(),1),Fk=s(he(),1),Dk=s(O(),1),nN=s(xh(),1),ha=s(D(),1),j0=s(E(),1),aee=s(Oi(),1),lee=s(yo(),1);var V0=s(A(),1),Ik=s(E(),1);var Ho=s(C(),1);function see(){return(0,Ho.jsxs)(Ho.Fragment,{children:[(0,Ho.jsxs)("div",{className:"editor-list-view-sidebar__outline",children:[(0,Ho.jsxs)("div",{children:[(0,Ho.jsx)(V0.__experimentalText,{children:(0,Ik.__)("Characters:")}),(0,Ho.jsx)(V0.__experimentalText,{children:(0,Ho.jsx)(wg,{})})]}),(0,Ho.jsxs)("div",{children:[(0,Ho.jsx)(V0.__experimentalText,{children:(0,Ik.__)("Words:")}),(0,Ho.jsx)(Sg,{})]}),(0,Ho.jsxs)("div",{children:[(0,Ho.jsx)(V0.__experimentalText,{children:(0,Ik.__)("Time to read:")}),(0,Ho.jsx)(_g,{})]})]}),(0,Ho.jsx)(Ah,{})]})}var fd=s(C(),1),{TabbedSidebar:Nke}=N(Nk.privateApis);function cee(){let{setIsListViewOpened:e}=(0,Dk.useDispatch)(w),{getListViewToggleRef:t}=N((0,Dk.useSelect)(w)),r=(0,Fk.useFocusOnMount)("firstElement"),o=(0,ha.useCallback)(()=>{e(!1),t().current?.focus()},[t,e]),n=(0,ha.useCallback)(v=>{v.keyCode===lee.ESCAPE&&!v.defaultPrevented&&(v.preventDefault(),o())},[o]),[i,a]=(0,ha.useState)(null),[l,c]=(0,ha.useState)("list-view"),u=(0,ha.useRef)(),d=(0,ha.useRef)(),f=(0,ha.useRef)(),m=(0,Fk.useMergeRefs)([r,f,a]);function h(v){let y=nN.focus.tabbable.find(d.current)[0];if(v==="list-view"){let b=nN.focus.tabbable.find(f.current)[0];(u.current.contains(b)?b:y).focus()}else y.focus()}let g=(0,ha.useCallback)(()=>{u.current.contains(u.current.ownerDocument.activeElement)?o():h(l)},[o,l]);return(0,aee.useShortcut)("core/editor/toggle-list-view",g),(0,fd.jsx)("div",{className:"editor-list-view-sidebar",onKeyDown:n,ref:u,children:(0,fd.jsx)(Nke,{tabs:[{name:"list-view",title:(0,j0._x)("List View","Post overview"),panel:(0,fd.jsx)("div",{className:"editor-list-view-sidebar__list-view-container",children:(0,fd.jsx)("div",{className:"editor-list-view-sidebar__list-view-panel-content",children:(0,fd.jsx)(Nk.__experimentalListView,{dropZoneElement:i})})}),panelRef:m},{name:"outline",title:(0,j0._x)("Outline","Post overview"),panel:(0,fd.jsx)("div",{className:"editor-list-view-sidebar__list-view-container",children:(0,fd.jsx)(see,{})})}],onClose:o,onSelect:v=>c(v),defaultTabId:"list-view",ref:d,closeButtonLabel:(0,j0.__)("Close")})})}var U0=s(O(),1),z0=s(A(),1);var md=s(E(),1);var Bk=s(O(),1),el=s(A(),1),uee=s(W(),1),Fc=s(E(),1),Mk=s(po(),1),dee=s(D(),1);var ga=s(C(),1);function Fke(){let{revisions:e,perPage:t,currentRevisionId:r,revisionKey:o,revisionPage:n,totalRevisions:i}=(0,Bk.useSelect)(_=>{let{getCurrentRevisionId:S,getRevisionPage:x,getPageRevisions:T,getRevisionsPerPage:R}=N(_(w)),F=_(w).getCurrentPostType();if(!F)return{};let z=_(uee.store).getEntityConfig("postType",F)?.revisionKey||"id",L=x();return{revisions:T(L),perPage:R(),currentRevisionId:S(),revisionKey:z,revisionPage:L,totalRevisions:_(w).getCurrentPostRevisionsCount()}},[]),{setCurrentRevisionId:a,setRevisionPage:l}=N((0,Bk.useDispatch)(w)),c=!e,u=Math.ceil(i/t)||1,d=(0,dee.useMemo)(()=>e&&[...e].reverse(),[e]),f=d?.findIndex(_=>_[o]===r),m=_=>{let S=d?.[_];S&&a(S[o])},h=(0,Mk.getSettings)(),g=_=>{let S=d?.[_];return S?(0,Mk.dateI18n)(h.formats.datetime,S.date):_},v=u>1;if(c&&!v)return(0,ga.jsx)(el.Spinner,{});if(!c&&!d?.length)return(0,ga.jsx)("span",{className:"editor-revisions-header__no-revisions",children:(0,Fc.__)("No revisions found.")});if(i<=1)return(0,ga.jsx)("span",{className:"editor-revisions-header__no-revisions",children:(0,Fc.__)("Only one revision found.")});let y=_=>{let S=i-(_-1)*t,x=Math.max(1,S-t+1);return(0,Fc.sprintf)((0,Fc.__)("Revisions %1$s\u2013%2$s"),x,S)},b=c||f===-1?(0,ga.jsx)(el.Spinner,{}):(0,ga.jsx)(el.RangeControl,{__next40pxDefaultSize:!0,"aria-valuetext":g(f),className:"editor-revisions-header__slider",hideLabelFromVision:!0,label:(0,Fc.__)("Revision"),max:d?.length-1,min:0,marks:!0,onChange:m,renderTooltipContent:g,value:f,withInputField:!1});return v?(0,ga.jsxs)(el.__experimentalHStack,{spacing:2,expanded:!0,wrap:!1,children:[(0,ga.jsx)(el.Button,{icon:Nt,label:n<u?y(n+1):(0,Fc.__)("No older revisions"),onClick:()=>l(n+1),disabled:c||n>=u,size:"compact",accessibleWhenDisabled:!0}),(0,ga.jsx)("div",{style:{flex:1,minWidth:0,display:"flex",justifyContent:"center"},children:b}),(0,ga.jsx)(el.Button,{icon:Ft,label:n>1?y(n-1):(0,Fc.__)("No newer revisions"),onClick:()=>l(n-1),disabled:c||n<=1,size:"compact",accessibleWhenDisabled:!0})]}):b}var fee=Fke;var mi={document:"edit-post/document",block:"edit-post/block"};var zi=s(C(),1);function Dke({showDiff:e,onToggleDiff:t}){let{currentRevisionId:r,sidebarIsOpened:o}=(0,U0.useSelect)(d=>({currentRevisionId:N(d(w)).getCurrentRevisionId(),sidebarIsOpened:!!d(Ce).getActiveComplementaryArea("core")}),[]),{setCurrentRevisionId:n,restoreRevision:i}=N((0,U0.useDispatch)(w)),{enableComplementaryArea:a,disableComplementaryArea:l}=(0,U0.useDispatch)(Ce),c=!!r,u=()=>{r&&i(r)};return(0,zi.jsx)(ak,{className:"editor-revisions-header",toolbar:(0,zi.jsx)(z0.Button,{__next40pxDefaultSize:!0,size:"compact",icon:Gd,label:(0,md._x)("Show changes","revisions"),isPressed:e,onClick:t}),center:(0,zi.jsx)(fee,{}),settings:(0,zi.jsxs)(zi.Fragment,{children:[(0,zi.jsx)(od,{className:"editor-header__post-preview-button"}),(0,zi.jsx)(z0.Button,{__next40pxDefaultSize:!0,icon:(0,md.isRTL)()?zd:Ud,label:(0,md._x)("Settings","panel button label"),isPressed:o,"aria-expanded":o,onClick:()=>{o?l("core"):a("core",mi.document)},size:"compact"}),(0,zi.jsx)(z0.Button,{__next40pxDefaultSize:!0,variant:"secondary",size:"compact",onClick:()=>n(null),children:(0,md.__)("Exit")}),(0,zi.jsx)(z0.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,variant:"primary",size:"compact",className:"editor-revisions-header__restore-button",disabled:!c,onClick:u,children:(0,md.__)("Restore")}),(0,zi.jsx)(fk,{disabled:!0})]})})}var iN=Dke;var Gee=s(A(),1),Wee=s($(),1),Yee=s(O(),1),qee=s(D(),1),Zee=s(mo(),1);var fn=s($(),1),Cs=s(D(),1),qk=s(O(),1),dN=s(Xe(),1),Fee=s(W(),1),Zk=s(he(),1);var sN=s(O(),1),mee=s(W(),1),Lk=s(D(),1),aN=s(E(),1),pee=s(A(),1);var hee=s(C(),1);function gee({contentRef:e}){let{onNavigateToEntityRecord:t,templateId:r}=(0,sN.useSelect)(a=>{let{getEditorSettings:l,getCurrentTemplateId:c}=a(w);return{onNavigateToEntityRecord:l().onNavigateToEntityRecord,templateId:c()}},[]),o=(0,sN.useSelect)(a=>!!a(mee.store).canUser("create",{kind:"postType",name:"wp_template"}),[]),[n,i]=(0,Lk.useState)(!1);return(0,Lk.useEffect)(()=>{let a=c=>{o&&(!c.target.classList.contains("is-root-container")||c.target.dataset?.type==="core/template-part"||c.defaultPrevented||(c.preventDefault(),i(!0)))},l=e.current;return l?.addEventListener("dblclick",a),()=>{l?.removeEventListener("dblclick",a)}},[e,o]),o?(0,hee.jsx)(pee.__experimentalConfirmDialog,{isOpen:n,confirmButtonText:(0,aN.__)("Edit template"),onConfirm:()=>{i(!1),t({postId:r,postType:"wp_template"})},onCancel:()=>i(!1),size:"medium",children:(0,aN.__)("You\u2019ve tried to select a block that is part of a template that may be used elsewhere on your site. Would you like to edit the template?")}):null}var yee=s(he(),1),Vk=s(O(),1),lN=s($(),1);var Bke=500;function vee(e,t,r){return Math.min(Math.max(e,t),r)}function Mke(e,t,r){let o=e-vee(e,r.left,r.right),n=t-vee(t,r.top,r.bottom);return Math.sqrt(o*o+n*n)}function bee({isEnabled:e=!0}={}){let{getEnabledClientIdsTree:t,getBlockName:r,getBlockOrder:o}=N((0,Vk.useSelect)(lN.store)),{selectBlock:n}=(0,Vk.useDispatch)(lN.store);return(0,yee.useRefEffect)(i=>{if(!e)return;let a=(c,u)=>{let d=t().flatMap(({clientId:h})=>{let g=r(h);if(g==="core/template-part")return[];if(g==="core/post-content"){let v=o(h);if(v.length)return v}return[h]}),f=1/0,m=null;for(let h of d){let g=i.querySelector(`[data-block="${h}"]`);if(!g)continue;let v=g.getBoundingClientRect(),y=Mke(c,u,v);y<f&&y<Bke&&(f=y,m=h)}m&&n(m)},l=c=>{(c.target===i||c.target.classList.contains("is-root-container"))&&a(c.clientX,c.clientY)};return i.addEventListener("click",l),()=>i.removeEventListener("click",l)},[e])}var jk=s(O(),1),See=s(he(),1),cN=s($(),1);function _ee(){let{getSettings:e,isZoomOut:t}=N((0,jk.useSelect)(cN.store)),{resetZoomLevel:r}=N((0,jk.useDispatch)(cN.store));return(0,See.useRefEffect)(o=>{function n(i){if(t()&&!i.defaultPrevented){i.preventDefault();let{__experimentalSetIsInserterOpened:a}=e();typeof a=="function"&&a(!1),r()}}return o.addEventListener("dblclick",n),()=>{o.removeEventListener("dblclick",n)}},[e,t,r])}var wee=s(O(),1),xee=s(he(),1),zk=s($(),1),Cee=s(Xe(),1),Lke=':root :where(.editor-styles-wrapper)::after {content: ""; display: block; height: 40vh;}';function Tee(e){let t=(0,wee.useRegistry)(),r=(0,xee.useRefEffect)(o=>{function n(a){if(a.target!==o&&a.target!==o.parentElement)return;let l=o.lastElementChild;if(!l)return;let c=l.getBoundingClientRect();if(a.clientY<c.bottom)return;a.preventDefault();let u=t.select(zk.store).getBlockOrder(""),d=u[u.length-1],f=t.select(zk.store).getBlock(d),{selectBlock:m,insertDefaultBlock:h}=t.dispatch(zk.store);f&&(0,Cee.isUnmodifiedDefaultBlock)(f)?m(d):h()}let{ownerDocument:i}=o;return i.addEventListener("pointerdown",n),()=>{i.removeEventListener("pointerdown",n)}},[t]);return e?[r,Lke]:[]}var Uk=s(O(),1),Pee=s(he(),1),uN=s($(),1);function kee(){let{getEditedContentOnlySection:e}=N((0,Uk.useSelect)(uN.store)),{stopEditingContentOnlySection:t}=N((0,Uk.useDispatch)(uN.store));return(0,Pee.useRefEffect)(r=>{function o(n){let i=e();if(!i)return;!n.target.closest(`[data-block="${i}"]`)&&!n.defaultPrevented&&(n.preventDefault(),t())}return r.addEventListener("click",o),()=>{r.removeEventListener("click",o)}},[e,t])}var Hk=s(O(),1),Ree=s(he(),1),Aee=s(Xe(),1),Gk=s(W(),1),Wk=s($(),1),tl=s(A(),1),Oee=s(mo(),1),pd=s(D(),1),ya=s(E(),1);var Bg=s(D(),1);function Eee(e){let[t,r]=(0,Bg.useState)(),o=(0,Bg.useRef)(!1);return(0,Bg.useEffect)(()=>{if(!e)return;if(e.status==="connected"){r(void 0),o.current=!1;return}if(e.status!=="disconnected"||!e.willAutoRetryInMs)return;let{willAutoRetryInMs:n}=e,i=Date.now()+n,a=o.current;o.current=!0,a&&r(0);let l=null,c=()=>{r(Math.ceil((i-Date.now())/1e3)),l=setInterval(()=>{let d=Math.ceil((i-Date.now())/1e3);r(Math.max(0,d)),d<=0&&l&&clearInterval(l)},1e3)},u=a?setTimeout(c,500):null;return u||c(),()=>{u&&clearTimeout(u),l&&clearInterval(l)}},[e]),{onManualRetry:()=>{r(0)},secondsRemaining:t}}var va=s(C(),1),{BlockCanvasCover:Vke}=N(Wk.privateApis),{retrySyncConnection:jke}=N(Gk.privateApis),zke=2e4;function Iee(){let[e,t]=(0,pd.useState)(!1),[r,o]=(0,pd.useState)(!1),[n,i]=(0,pd.useState)(!1),{connectionStatus:a,isCollaborationEnabled:l,postType:c}=(0,Hk.useSelect)(S=>{let{getSyncConnectionStatus:x,getPostType:T}=N(S(Gk.store)),{getCurrentPostType:R,isCollaborationEnabledForCurrentPost:F}=N(S(w)),B=R();return{connectionStatus:x()||null,isCollaborationEnabled:F(),postType:B?T(B):null}},[]),{onManualRetry:u,secondsRemaining:d}=Eee(a),f=(0,Ree.useCopyToClipboard)(()=>{let S=(0,Hk.select)(Wk.store).getBlocks();return(0,Aee.serialize)(S)});(0,pd.useEffect)(()=>{let S=setTimeout(()=>{t(!0)},zke);return()=>clearTimeout(S)},[]),(0,pd.useEffect)(()=>{a?.status!=="connecting"&&i(a!==null&&"canManuallyRetry"in a&&a.canManuallyRetry===!0)},[a]);let m=a&&a.status==="disconnected"&&(a.canManuallyRetry||a.willAutoRetryInMs);if((0,pd.useEffect)(()=>{if(a?.status==="connected"){o(!1);return}a?.status&&a.status!=="connecting"&&(!m||a.backgroundRetriesFailed)&&o(!0)},[a,m]),!l||!e||!r)return null;let h=a&&"error"in a?a?.error:void 0;if(!m&&(0,Oee.applyFilters)("editor.isSyncConnectionErrorHandled",!1,h?.code)!==!1)return null;let g=n?()=>{u(),jke()}:void 0,v=qZ(h),y="",b=!1;d&&d>0?y=(0,ya.sprintf)((0,ya._n)("Retrying connection in %d second\u2026","Retrying connection in %d seconds\u2026",d),d):d===0&&(b=!0,y=(0,ya.__)("Retrying\u2026"));let _="edit.php";return c?.slug&&(_=`edit.php?post_type=${c.slug}`),(0,va.jsx)(Vke.Fill,{children:(0,va.jsx)(tl.Modal,{overlayClassName:"editor-sync-connection-error-modal",isDismissible:!1,onRequestClose:()=>{},shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,size:"medium",title:v.title,children:(0,va.jsxs)(tl.__experimentalVStack,{spacing:6,children:[(0,va.jsx)("p",{children:v.description}),y&&(0,va.jsx)("p",{className:"editor-sync-connection-error-modal__retry-countdown",children:y}),(0,va.jsxs)(tl.__experimentalHStack,{justify:"right",children:[(0,va.jsx)(tl.Button,{__next40pxDefaultSize:!0,href:_,isDestructive:!0,variant:"tertiary",children:(0,ya.sprintf)((0,ya.__)("Back to %s"),c?.labels?.name??(0,ya.__)("Posts"))}),(0,va.jsx)(tl.Button,{__next40pxDefaultSize:!0,ref:f,variant:g?"secondary":"primary",children:(0,ya.__)("Copy Post Content")}),g&&(0,va.jsx)(tl.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,"aria-disabled":b,disabled:b,isBusy:b,variant:"primary",onClick:g,children:(0,ya.__)("Retry")})]})]})})})}var Ao=s(C(),1),{LayoutStyle:Yk,useLayoutClasses:Uke,useLayoutStyles:Hke,ExperimentalBlockCanvas:Gke,useFlashEditableBlocks:Wke}=N(fn.privateApis);function fN(e){for(let t=0;t<e.length;t++){if(e[t].name==="core/post-content")return e[t].attributes;if(e[t].innerBlocks.length){let r=fN(e[t].innerBlocks);if(r)return r}}}function Nee(e){for(let t=0;t<e.length;t++)if(e[t].name==="core/post-content")return!0;return!1}function Yke({autoFocus:e,disableIframe:t=!1,iframeProps:r,contentRef:o,className:n}){let i=(0,Zk.useViewportMatch)("small","<"),{renderingMode:a,postContentAttributes:l,editedPostTemplate:c={},wrapperBlockName:u,wrapperUniqueId:d,deviceType:f,isFocusedEntity:m,isDesignPostType:h,postType:g,isPreview:v,styles:y,canvasMinHeight:b}=(0,qk.useSelect)(ze=>{let{getCurrentPostId:Ve,getCurrentPostType:tt,getCurrentTemplateId:vt,getEditorSettings:le,getRenderingMode:J,getDeviceType:ie,getCanvasMinHeight:ee}=N(ze(w)),{getPostType:se,getEditedEntityRecord:Ue}=ze(Fee.store),ke=tt(),Be=J(),Je;ke===qi?Je="core/block":Be==="post-only"&&(Je="core/post-content");let Fe=le(),Se=Fe.supportsTemplateMode,yt=se(ke),Jr=vt(),bn=Jr?Ue("postType",xt,Jr):void 0;return{renderingMode:Be,postContentAttributes:Fe.postContentAttributes,isDesignPostType:Jc.includes(ke),editedPostTemplate:yt?.viewable&&Se?bn:void 0,wrapperBlockName:Je,wrapperUniqueId:Ve(),deviceType:ie(),isFocusedEntity:!!Fe.onNavigateToPreviousEntityRecord,postType:ke,isPreview:Fe.isPreviewMode,styles:Fe.styles,canvasMinHeight:ee()}},[]),{isCleanNewPost:_}=(0,qk.useSelect)(w),{hasRootPaddingAwareAlignments:S,themeHasDisabledLayoutStyles:x,themeSupportsLayout:T,isZoomedOut:R}=(0,qk.useSelect)(ze=>{let{getSettings:Ve,isZoomOut:tt}=N(ze(fn.store)),vt=Ve();return{themeHasDisabledLayoutStyles:vt.disableLayoutStyles,themeSupportsLayout:vt.supportsLayout,hasRootPaddingAwareAlignments:vt.__experimentalFeatures?.useRootPaddingAwareAlignments,isZoomedOut:tt()}},[]),F=(0,Cs.useRef)(),B=(0,fn.__experimentalUseResizeCanvas)(f),[z]=(0,fn.useSettings)("layout"),L=(0,Cs.useMemo)(()=>a!=="post-only"||h?{type:"default"}:T?{...z,type:"constrained"}:{type:"default"},[a,T,z,h]),M=(0,Cs.useMemo)(()=>{if(!c?.content&&!c?.blocks&&l)return l;if(c?.blocks)return fN(c?.blocks);let ze=typeof c?.content=="string"?c?.content:"";return fN((0,dN.parse)(ze))||{}},[c?.content,c?.blocks,l]),k=(0,Cs.useMemo)(()=>{if(!c?.content&&!c?.blocks)return!1;if(c?.blocks)return Nee(c?.blocks);let ze=typeof c?.content=="string"?c?.content:"";return Nee((0,dN.parse)(ze))||!1},[c?.content,c?.blocks]),{layout:I={},align:U=""}=M||{},G=Uke(M,"core/post-content"),Y=re({"is-layout-flow":!T},T&&G,U&&`align${U}`),Z=Hke(M,"core/post-content",".block-editor-block-list__layout.is-root-container"),V=(0,Cs.useMemo)(()=>I&&(I?.type==="constrained"||I?.inherit||I?.contentSize||I?.wideSize)?{...z,...I,type:"constrained"}:{...z,...I,type:"default"},[I?.type,I?.inherit,I?.contentSize,I?.wideSize,z]),j=l?V:L,H=j?.type==="default"&&!k?L:j,X=(0,fn.__unstableUseTypingObserver)(),ae=(0,Cs.useRef)();(0,Cs.useEffect)(()=>{!e||!_()||ae?.current?.focus()},[e,_]);let ne=`.is-root-container.alignwide { max-width: var(--wp--style--global--wide-size); margin-left: auto; margin-right: auto;}
		.is-root-container.alignwide:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: var(--wp--style--global--wide-size);}
		.is-root-container.alignfull { max-width: none; margin-left: auto; margin-right: auto;}
		.is-root-container.alignfull:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: none;}`,ue=[jd,Ur,qi].includes(g)&&!v&&!i&&!R,Ye=(0,Cs.useMemo)(()=>{if(!F.current)return b;let{ownerDocument:ze}=F.current,Ve=ze.documentElement.scrollTop||ze.body.scrollTop;return b+Ve},[b]),[ye,oe]=Tee(!v&&a==="post-only"&&!h),ge=(0,Cs.useMemo)(()=>[...y??[],{css:`:where(.block-editor-iframe__body){display:flow-root;${Ye?`min-height:${Ye}px;`:""}}.is-root-container{display:flow-root;${ue?"min-height:0!important;":""}}
				${oe||""}
				${ue?".block-editor-iframe__html{background:var(--wp-editor-canvas-background);display:flex;align-items:center;justify-content:center;min-height:100vh;}.block-editor-iframe__body{width:100%;}":""}`}],[y,ue,Ye,oe]),Re=(0,fn.__unstableUseTypewriter)();return o=(0,Zk.useMergeRefs)([F,o,a==="post-only"?Re:null,Wke({isEnabled:a==="template-locked"}),bee({isEnabled:a==="template-locked"}),_ee(),ye,kee()]),(0,Ao.jsxs)("div",{className:re("editor-visual-editor","edit-post-visual-editor",n,{"has-padding":m||ue,"is-resizable":ue,"is-iframed":!t}),children:[(0,Ao.jsx)(Iee,{}),(0,Ao.jsx)(Eh,{enableResizing:ue,height:"100%",children:(0,Ao.jsxs)(Gke,{shouldIframe:!t,contentRef:o,styles:ge,height:"100%",iframeProps:{...r,style:{...r?.style,...B}},children:[T&&!x&&a==="post-only"&&!h&&(0,Ao.jsxs)(Ao.Fragment,{children:[(0,Ao.jsx)(Yk,{selector:".editor-visual-editor__post-title-wrapper",layout:L}),(0,Ao.jsx)(Yk,{selector:".block-editor-block-list__layout.is-root-container",layout:H}),U&&(0,Ao.jsx)(Yk,{css:ne}),Z&&(0,Ao.jsx)(Yk,{layout:V,css:Z})]}),a==="post-only"&&!h&&(0,Ao.jsx)("div",{className:re("editor-visual-editor__post-title-wrapper","edit-post-visual-editor__post-title-wrapper",{"has-global-padding":S}),contentEditable:!1,ref:X,style:{marginTop:"4rem"},children:(0,Ao.jsx)(BP,{ref:ae})}),(0,Ao.jsxs)(fn.RecursionProvider,{blockName:u,uniqueId:d,children:[(0,Ao.jsx)(fn.BlockList,{className:re("is-"+f.toLowerCase()+"-preview",a!=="post-only"||h?"wp-site-blocks":`${Y} wp-block-post-content`,{"has-global-padding":a==="post-only"&&!h&&S}),layout:j,dropZoneElement:t?F.current:F.current?.parentNode,__unstableDisableDropZone:a==="template-locked"}),a==="template-locked"&&(0,Ao.jsx)(gee,{contentRef:F})]})]})})]})}var Kk=Yke;var Mg=s(E(),1),Xk=s(Wy(),1),Dee=[{name:"revision/diff-removed",title:(0,Mg.__)("Removed"),tagName:"del",className:"revision-diff-removed"},{name:"revision/diff-added",title:(0,Mg.__)("Added"),tagName:"ins",className:"revision-diff-added"},{name:"revision/diff-format-added",title:(0,Mg.__)("Format added"),tagName:"span",className:"revision-diff-format-added"},{name:"revision/diff-format-removed",title:(0,Mg.__)("Format removed"),tagName:"span",className:"revision-diff-format-removed"},{name:"revision/diff-format-changed",title:(0,Mg.__)("Format changed"),tagName:"span",className:"revision-diff-format-changed"}];function Bee(){for(let e of Dee)(0,Xk.registerFormatType)(e.name,{...e,attributes:{title:"title"},edit:()=>null})}function Mee(){for(let e of Dee)(0,Xk.unregisterFormatType)(e.name)}var Ui=s(D(),1),Qk=s(he(),1),Vee=s(O(),1),Jk=s($(),1),H0=s(E(),1),jee=s(A(),1);var G0=s(C(),1),{useBlockElementRef:qke}=N(Jk.privateApis);function zee(e){let t=[];for(let r of e)r.__revisionDiffStatus?.status&&t.push({clientId:r.clientId,status:r.__revisionDiffStatus.status}),r.innerBlocks?.length&&t.push(...zee(r.innerBlocks));return t}var Lee={added:(0,H0.__)("Go to added block"),removed:(0,H0.__)("Go to removed block"),modified:(0,H0.__)("Go to modified block")};function mN(e){if(!e)return null;let t=e.ownerDocument,r=t.documentElement.scrollHeight,o=e.getBoundingClientRect(),n=t.documentElement.scrollTop;return{top:(o.top+n)/r*100,height:o.height/r*100}}function Zke({clientId:e,status:t,subscribe:r}){let o=(0,Ui.useRef)();qke(e,o);let[n,i]=(0,Ui.useState)(()=>mN(o.current));return(0,Ui.useEffect)(()=>r(()=>{i(mN(o.current))}),[r]),(0,Ui.useEffect)(()=>{i(mN(o.current))},[t]),n?(0,G0.jsx)(jee.Tooltip,{text:Lee[t],children:(0,G0.jsx)("button",{className:`revision-diff-marker is-${t}`,style:{top:`${n.top}%`,height:`${Math.max(n.height,.5)}%`},onClick:()=>o.current?.focus(),"aria-label":Lee[t]})}):null}function Uee(){let[e,t]=(0,Ui.useState)(!1),r=(0,Ui.useRef)(new Set),o=(0,Vee.useSelect)(l=>l(Jk.store).getBlocks(),[]),n=(0,Ui.useMemo)(()=>zee(o),[o]),i=(0,Ui.useCallback)(l=>(r.current.add(l),()=>r.current.delete(l)),[]),a=(0,Qk.useRefEffect)(l=>{let{ownerDocument:c}=l,{defaultView:u}=c,d=new u.ResizeObserver(()=>{r.current.forEach(f=>f())});return d.observe(c.body),()=>{d.disconnect()}},[]);return[(0,Qk.useMergeRefs)([a,t]),(0,G0.jsx)("div",{className:"revision-diff-markers",role:"navigation","aria-label":(0,H0.__)("Document changes"),children:e&&n.map(({clientId:l,status:c})=>(0,G0.jsx)(Zke,{clientId:l,status:c,subscribe:i},l))},"diff-markers")]}var pi=s(C(),1),{usePrivateStyleOverride:Hee}=N(Wee.privateApis),Kke=`
<svg
	xmlns="http://www.w3.org/2000/svg"
	viewBox="0 0 0 0"
	width="0"
	height="0"
	focusable="false"
	role="none"
	aria-hidden="true"
	style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
>
	<defs>
		<filter id="revision-removed-filter" x="0" y="0" width="100%" height="100%">
			<!-- Desaturate and add red tint -->
			<feColorMatrix type="matrix"
				values="0.5 0.3 0.2 0 0.15
				        0.2 0.2 0.1 0 0
				        0.2 0.2 0.1 0 0
				        0   0   0   0.8 0"/>
		</filter>
	</defs>
</svg>
`,Xke=`
	.is-revision-added {
		box-shadow: inset 0 0 0 9999px color-mix(in srgb, currentColor 5%, #00a32a 15%), 0 0 0 4px color-mix(in srgb, currentColor 5%, #00a32a 15%);
	}
	.is-revision-removed,
	.revision-diff-removed {
		text-decoration: line-through;
		filter: url(#revision-removed-filter);
	}
	.is-revision-modified {
		outline: 2px solid color-mix(in srgb, currentColor 30%, #dba617 70%) !important;
		outline-offset: 2px;
	}
	.revision-diff-added {
		background-color: color-mix(in srgb, currentColor 5%, #00a32a 15%);
		text-decoration: none;
	}
	.revision-diff-format-added {
		text-decoration: underline wavy color-mix(in srgb, currentColor 30%, #00a32a 70%);
		text-decoration-thickness: 2px;
	}
	.revision-diff-format-removed {
		text-decoration: underline wavy color-mix(in srgb, currentColor 20%, #d63638 80%);
		text-decoration-thickness: 2px;
	}
	.revision-diff-format-changed {
		text-decoration: underline wavy color-mix(in srgb, currentColor 30%, #dba617 70%);
		text-decoration-thickness: 2px;
	}
`;function Qke(e){return t=>{let{block:r,className:o}=t,n=r?.__revisionDiffStatus?.status,i=re(o,{"is-revision-added":n==="added","is-revision-removed":n==="removed","is-revision-modified":n==="modified"});return(0,pi.jsx)(e,{...t,className:i})}}var Jke="editor/revisions-canvas/withRevisionDiffClasses";(0,Zee.addFilter)("editor.BlockListBlock",Jke,Qke);function $ke({showDiff:e}){return Hee({css:e?Xke:""}),Hee({assets:e?Kke:"",__unstableType:"svgs"}),null}function e2e({showDiff:e}){let[t,r]=Uee();return(0,pi.jsxs)(pi.Fragment,{children:[(0,pi.jsx)(Kk,{contentRef:t}),e&&r]})}function pN(){(0,qee.useEffect)(()=>(Bee(),()=>{Mee()}),[]);let{revision:e,showDiff:t}=(0,Yee.useSelect)(r=>{let{getCurrentRevision:o,isShowingRevisionDiff:n}=N(r(w));return{revision:o(),showDiff:n()}},[]);return e?(0,pi.jsxs)(pi.Fragment,{children:[(0,pi.jsx)($ke,{showDiff:t}),(0,pi.jsx)("div",{className:"editor-revisions-canvas__content",children:(0,pi.jsx)(e2e,{showDiff:t})})]}):(0,pi.jsx)("div",{className:"editor-revisions-canvas__loading",children:(0,pi.jsx)(Gee.Spinner,{})})}var e2=s(O(),1),$k=s(D(),1),Ts=s(E(),1),Kee=s(ct(),1),Xee=s(W(),1),Qee=s(lt(),1);var{useOnCollaboratorJoin:t2e,useOnCollaboratorLeave:r2e,useOnPostSave:o2e}=N(Xee.privateApis),hN={COLLAB_POST_UPDATED:"collab-post-updated",COLLAB_USER_ENTERED:"collab-user-entered",COLLAB_USER_EXITED:"collab-user-exited"},gN=["publish","private","future"];function n2e(e,t,r){return r?(0,Ts.sprintf)((0,Ts.__)("Post published by %s."),e):gN.includes(t)?(0,Ts.sprintf)((0,Ts.__)("Post updated by %s."),e):(0,Ts.sprintf)((0,Ts.__)("Draft saved by %s."),e)}function Jee(e,t){let{postStatus:r,isCollaborationEnabled:o,showNotifications:n}=(0,e2.useSelect)(u=>{let{getCurrentPostAttribute:d,isCollaborationEnabledForCurrentPost:f}=N(u(w));return{postStatus:d("status"),isCollaborationEnabled:f(),showNotifications:u(Qee.store).get("core","showCollaborationNotifications")??!0}},[]),{createNotice:i}=(0,e2.useDispatch)(Kee.store),a=o&&n,l=a?e:null,c=a?t:null;t2e(l,c,(0,$k.useCallback)((u,d)=>{d&&u.collaboratorInfo.enteredAt<d.collaboratorInfo.enteredAt||i("info",(0,Ts.sprintf)((0,Ts.__)("%s has joined the post."),u.collaboratorInfo.name),{id:`${hN.COLLAB_USER_ENTERED}-${u.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[i])),r2e(l,c,(0,$k.useCallback)(u=>{i("info",(0,Ts.sprintf)((0,Ts.__)("%s has left the post."),u.collaboratorInfo.name),{id:`${hN.COLLAB_USER_EXITED}-${u.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[i])),o2e(l,c,(0,$k.useCallback)((u,d,f)=>{if(!r)return;let m=u.postStatus??r??"draft",h=f?.postStatus??r,g=!(h&&gN.includes(h))&&gN.includes(m),v=n2e(d.collaboratorInfo.name,m,g);i("info",v,{id:`${hN.COLLAB_POST_UPDATED}-${d.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[i,r]))}var t2=s(O(),1),W0=s(A(),1),vN=s(E(),1),$ee=s(D(),1);var Ps=s(C(),1),{Fill:ilt,Slot:i2e}=(0,W0.createSlotFill)("ActionsPanel");function ete({setEntitiesSavedStatesCallback:e,closeEntitiesSavedStates:t,isEntitiesSavedStatesOpen:r,forceIsDirtyPublishPanel:o}){let{closePublishSidebar:n,togglePublishSidebar:i}=(0,t2.useDispatch)(w),{publishSidebarOpened:a,isPublishable:l,isDirty:c,hasOtherEntitiesChanges:u}=(0,t2.useSelect)(m=>{let{isPublishSidebarOpened:h,isEditedPostPublishable:g,isCurrentPostPublished:v,isEditedPostDirty:y,hasNonPostEntityChanges:b}=m(w),_=b();return{publishSidebarOpened:h(),isPublishable:!v()&&g(),isDirty:_||y(),hasOtherEntitiesChanges:_}},[]),d=(0,$ee.useCallback)(()=>e(!0),[]),f;return a?f=(0,Ps.jsx)(oP,{onClose:n,forceIsDirty:o,PrePublishExtension:XC.Slot,PostPublishExtension:YC.Slot}):l&&!u?f=(0,Ps.jsx)("div",{className:"editor-layout__toggle-publish-panel",children:(0,Ps.jsx)(W0.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:i,"aria-expanded":!1,children:(0,vN.__)("Open publish panel")})}):f=(0,Ps.jsx)("div",{className:"editor-layout__toggle-entities-saved-states-panel",children:(0,Ps.jsx)(W0.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:d,"aria-expanded":!1,"aria-haspopup":"dialog",disabled:!c,accessibleWhenDisabled:!0,children:(0,vN.__)("Open save panel")})}),(0,Ps.jsxs)(Ps.Fragment,{children:[r&&(0,Ps.jsx)(RC,{close:t,renderDialog:!0}),(0,Ps.jsx)(i2e,{bubblesVirtually:!0}),!r&&f]})}var tte=s(A(),1),r2=s(O(),1),yN=s(E(),1),rte=s(Oi(),1),o2=s(D(),1);var Dc=s(C(),1);function ote({autoFocus:e=!1}){let{switchEditorMode:t}=(0,r2.useDispatch)(w),{shortcut:r,isRichEditingEnabled:o}=(0,r2.useSelect)(i=>{let{getEditorSettings:a}=i(w),{getShortcutRepresentation:l}=i(rte.store);return{shortcut:l("core/editor/toggle-mode"),isRichEditingEnabled:a().richEditingEnabled}},[]),n=(0,o2.useRef)();return(0,o2.useEffect)(()=>{e||n?.current?.focus()},[e]),(0,Dc.jsxs)("div",{className:"editor-text-editor",children:[o&&(0,Dc.jsxs)("div",{className:"editor-text-editor__toolbar",children:[(0,Dc.jsx)("h2",{children:(0,yN.__)("Editing code")}),(0,Dc.jsx)(tte.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t("visual"),shortcut:r,children:(0,yN.__)("Exit code editor")})]}),(0,Dc.jsxs)("div",{className:"editor-text-editor__body",children:[(0,Dc.jsx)(LP,{ref:n}),(0,Dc.jsx)(w0,{})]})]})}var n2=s(D(),1),nte=s(C(),1),ite=(0,n2.createContext)(void 0);function Y0({value:e,onChange:t,settings:r={},children:o}){let n={media:e,onChange:t,fields:r.fields||[]};return(0,nte.jsx)(ite.Provider,{value:n,children:o})}function i2(){let e=(0,n2.useContext)(ite);if(!e)throw new Error("useMediaEditorContext must be used within MediaEditorProvider");return e}var ste=s(A(),1),ate=s(D(),1),s2=s(E(),1);function bN(e){return e?e.startsWith("image/")?{type:"image"}:e.startsWith("video/")?{type:"video"}:e.startsWith("audio/")?{type:"audio"}:{type:"application"}:{type:"application"}}var Oo=s(C(),1);function s2e({mediaType:e,mediaUrl:t,altText:r,displayTitle:o,mimeType:n,onLoad:i,onError:a,loadingState:l}){switch(e.type){case"image":return(0,Oo.jsx)("img",{className:l==="loaded"?"loaded":"",src:t,alt:r||"",onLoad:i,onError:a});case"video":return(0,Oo.jsx)("video",{src:t,controls:!0,onError:a,children:o});case"audio":return(0,Oo.jsx)("audio",{src:t,controls:!0,onError:a,children:o});default:return(0,Oo.jsxs)("div",{className:"media-editor-preview__file-info",children:[(0,Oo.jsx)("p",{className:"media-editor-preview__file-name",children:o}),(0,Oo.jsx)("p",{className:"media-editor-preview__mime-type",children:n}),(0,Oo.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"media-editor-preview__download-link",children:(0,s2.__)("View file")})]})}}function SN(e){let[t,r]=(0,ate.useState)("loading"),{media:o}=i2(),{source_url:n,mime_type:i,alt_text:a,title:l}=o||{},c=bN(i);if(!n)return(0,Oo.jsx)("div",{className:"media-editor-preview media-editor-preview--empty",children:(0,Oo.jsx)("p",{children:(0,s2.__)("No media file available.")})});if(t==="error")return(0,Oo.jsxs)("div",{className:"media-editor-preview media-editor-preview--error",children:[(0,Oo.jsx)("p",{children:(0,s2.__)("Failed to load media file.")}),(0,Oo.jsx)("p",{className:"media-editor-preview__url",children:n})]});let u=typeof l=="string"?l:l?.rendered||l?.raw;return(0,Oo.jsxs)("div",{...e,className:`media-editor-preview media-editor-preview--${c.type}`,children:[c.type==="image"&&t==="loading"&&(0,Oo.jsx)("div",{className:"media-editor-preview__spinner",children:(0,Oo.jsx)(ste.Spinner,{})}),(0,Oo.jsx)(s2e,{mediaType:c,mediaUrl:n,altText:a,displayTitle:u,mimeType:i,onLoad:()=>r("loaded"),onError:()=>r("error"),loadingState:t})]})}var _N=s(E(),1);var nr="isAny",ir="isNone",mn="isAll",pn="isNotAll",Vn="between",jn="inThePast",hi="over",yr="is",br="isNot",hd="lessThan",gd="greaterThan",vd="lessThanOrEqual",yd="greaterThanOrEqual",bd="before",Sd="after",_d="beforeInc",wd="afterInc",rl="contains",ol="notContains",nl="startsWith",xd="on",Cd="notOn";var ylt={asc:(0,_N.__)("Sort ascending"),desc:(0,_N.__)("Sort descending")};var lte=s(qv(),1),{lock:Slt,unlock:Wt}=(0,lte.__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");var q0=s(D(),1),a2e=[];function gi({elements:e,getElements:t}){let r=Array.isArray(e)&&e.length>0?e:a2e,[o,n]=(0,q0.useState)(r),[i,a]=(0,q0.useState)(!1);return(0,q0.useEffect)(()=>{if(!t){n(r);return}let l=!1;return a(!0),t().then(c=>{if(!l){let u=Array.isArray(c)&&c.length>0?c:r;n(u)}}).catch(()=>{l||n(r)}).finally(()=>{l||a(!1)}),()=>{l=!0}},[t,r]),{elements:o,isLoading:i}}var l2e=Math.pow(10,8)*24*60*60*1e3,xlt=-l2e,a2=6048e5,cte=864e5;var c2e=3600;var ute=c2e*24,Clt=ute*7,u2e=ute*365.2425,d2e=u2e/12,Tlt=d2e*3,wN=Symbol.for("constructDateFrom");function lo(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&wN in e?e[wN](t):e instanceof Date?new e.constructor(t):new Date(t)}function At(e,t){return lo(t||e,e)}function l2(e,t,r){let o=At(e,r?.in);return isNaN(t)?lo(r?.in||e,NaN):(t&&o.setDate(o.getDate()+t),o)}function c2(e,t,r){let o=At(e,r?.in);if(isNaN(t))return lo(r?.in||e,NaN);if(!t)return o;let n=o.getDate(),i=lo(r?.in||e,o.getTime());i.setMonth(o.getMonth()+t+1,0);let a=i.getDate();return n>=a?i:(o.setFullYear(i.getFullYear(),i.getMonth(),n),o)}var f2e={};function Td(){return f2e}function Bc(e,t){let r=Td(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=At(e,t?.in),i=n.getDay(),a=(i<o?7:0)+i-o;return n.setDate(n.getDate()-a),n.setHours(0,0,0,0),n}function km(e,t){return Bc(e,{...t,weekStartsOn:1})}function u2(e,t){let r=At(e,t?.in),o=r.getFullYear(),n=lo(r,0);n.setFullYear(o+1,0,4),n.setHours(0,0,0,0);let i=km(n),a=lo(r,0);a.setFullYear(o,0,4),a.setHours(0,0,0,0);let l=km(a);return r.getTime()>=i.getTime()?o+1:r.getTime()>=l.getTime()?o:o-1}function xN(e){let t=At(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function dte(e,...t){let r=lo.bind(null,e||t.find(o=>typeof o=="object"));return t.map(r)}function CN(e,t){let r=At(e,t?.in);return r.setHours(0,0,0,0),r}function fte(e,t,r){let[o,n]=dte(r?.in,e,t),i=CN(o),a=CN(n),l=+i-xN(i),c=+a-xN(a);return Math.round((l-c)/cte)}function mte(e,t){let r=u2(e,t),o=lo(t?.in||e,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),km(o)}function pte(e,t,r){return l2(e,t*7,r)}function hte(e,t,r){return c2(e,t*12,r)}function gte(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Lg(e){return!(!gte(e)&&typeof e!="number"||isNaN(+At(e)))}function vte(e,t){let r=At(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function d2(e,t){let r=At(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}var m2e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},yte=(e,t,r)=>{let o,n=m2e[e];return typeof n=="string"?o=n:t===1?o=n.one:o=n.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+o:o+" ago":o};function f2(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var p2e={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},h2e={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},g2e={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},bte={date:f2({formats:p2e,defaultWidth:"full"}),time:f2({formats:h2e,defaultWidth:"full"}),dateTime:f2({formats:g2e,defaultWidth:"full"})};var v2e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ste=(e,t,r,o)=>v2e[e];function Vg(e){return(t,r)=>{let o=r?.context?String(r.context):"standalone",n;if(o==="formatting"&&e.formattingValues){let a=e.defaultFormattingWidth||e.defaultWidth,l=r?.width?String(r.width):a;n=e.formattingValues[l]||e.formattingValues[a]}else{let a=e.defaultWidth,l=r?.width?String(r.width):e.defaultWidth;n=e.values[l]||e.values[a]}let i=e.argumentCallback?e.argumentCallback(t):t;return n[i]}}var y2e={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},b2e={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},S2e={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},_2e={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},w2e={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},x2e={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},C2e=(e,t)=>{let r=Number(e),o=r%100;if(o>20||o<10)switch(o%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},_te={ordinalNumber:C2e,era:Vg({values:y2e,defaultWidth:"wide"}),quarter:Vg({values:b2e,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Vg({values:S2e,defaultWidth:"wide"}),day:Vg({values:_2e,defaultWidth:"wide"}),dayPeriod:Vg({values:w2e,defaultWidth:"wide",formattingValues:x2e,defaultFormattingWidth:"wide"})};function jg(e){return(t,r={})=>{let o=r.width,n=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],i=t.match(n);if(!i)return null;let a=i[0],l=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?P2e(l,f=>f.test(a)):T2e(l,f=>f.test(a)),u;u=e.valueCallback?e.valueCallback(c):c,u=r.valueCallback?r.valueCallback(u):u;let d=t.slice(a.length);return{value:u,rest:d}}}function T2e(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function P2e(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function wte(e){return(t,r={})=>{let o=t.match(e.matchPattern);if(!o)return null;let n=o[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=r.valueCallback?r.valueCallback(a):a;let l=t.slice(n.length);return{value:a,rest:l}}}var k2e=/^(\d+)(th|st|nd|rd)?/i,E2e=/\d+/i,R2e={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},A2e={any:[/^b/i,/^(a|c)/i]},O2e={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},I2e={any:[/1/i,/2/i,/3/i,/4/i]},N2e={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},F2e={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},D2e={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},B2e={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},M2e={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},L2e={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},xte={ordinalNumber:wte({matchPattern:k2e,parsePattern:E2e,valueCallback:e=>parseInt(e,10)}),era:jg({matchPatterns:R2e,defaultMatchWidth:"wide",parsePatterns:A2e,defaultParseWidth:"any"}),quarter:jg({matchPatterns:O2e,defaultMatchWidth:"wide",parsePatterns:I2e,defaultParseWidth:"any",valueCallback:e=>e+1}),month:jg({matchPatterns:N2e,defaultMatchWidth:"wide",parsePatterns:F2e,defaultParseWidth:"any"}),day:jg({matchPatterns:D2e,defaultMatchWidth:"wide",parsePatterns:B2e,defaultParseWidth:"any"}),dayPeriod:jg({matchPatterns:M2e,defaultMatchWidth:"any",parsePatterns:L2e,defaultParseWidth:"any"})};var TN={code:"en-US",formatDistance:yte,formatLong:bte,formatRelative:Ste,localize:_te,match:xte,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Cte(e,t){let r=At(e,t?.in);return fte(r,d2(r))+1}function Tte(e,t){let r=At(e,t?.in),o=+km(r)-+mte(r);return Math.round(o/a2)+1}function m2(e,t){let r=At(e,t?.in),o=r.getFullYear(),n=Td(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=lo(t?.in||e,0);a.setFullYear(o+1,0,i),a.setHours(0,0,0,0);let l=Bc(a,t),c=lo(t?.in||e,0);c.setFullYear(o,0,i),c.setHours(0,0,0,0);let u=Bc(c,t);return+r>=+l?o+1:+r>=+u?o:o-1}function Pte(e,t){let r=Td(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=m2(e,t),i=lo(t?.in||e,0);return i.setFullYear(n,0,o),i.setHours(0,0,0,0),Bc(i,t)}function kte(e,t){let r=At(e,t?.in),o=+Bc(r,t)-+Pte(r,t);return Math.round(o/a2)+1}function wt(e,t){let r=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return r+o}var Mc={y(e,t){let r=e.getFullYear(),o=r>0?r:1-r;return wt(t==="yy"?o%100:o,t.length)},M(e,t){let r=e.getMonth();return t==="M"?String(r+1):wt(r+1,2)},d(e,t){return wt(e.getDate(),t.length)},a(e,t){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return r==="am"?"a.m.":"p.m."}},h(e,t){return wt(e.getHours()%12||12,t.length)},H(e,t){return wt(e.getHours(),t.length)},m(e,t){return wt(e.getMinutes(),t.length)},s(e,t){return wt(e.getSeconds(),t.length)},S(e,t){let r=t.length,o=e.getMilliseconds(),n=Math.trunc(o*Math.pow(10,r-3));return wt(n,t.length)}};var zg={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},PN={G:function(e,t,r){let o=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(o,{width:"abbreviated"});case"GGGGG":return r.era(o,{width:"narrow"});default:return r.era(o,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){let o=e.getFullYear(),n=o>0?o:1-o;return r.ordinalNumber(n,{unit:"year"})}return Mc.y(e,t)},Y:function(e,t,r,o){let n=m2(e,o),i=n>0?n:1-n;if(t==="YY"){let a=i%100;return wt(a,2)}return t==="Yo"?r.ordinalNumber(i,{unit:"year"}):wt(i,t.length)},R:function(e,t){let r=u2(e);return wt(r,t.length)},u:function(e,t){let r=e.getFullYear();return wt(r,t.length)},Q:function(e,t,r){let o=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return wt(o,2);case"Qo":return r.ordinalNumber(o,{unit:"quarter"});case"QQQ":return r.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(o,{width:"narrow",context:"formatting"});default:return r.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,r){let o=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return wt(o,2);case"qo":return r.ordinalNumber(o,{unit:"quarter"});case"qqq":return r.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(o,{width:"narrow",context:"standalone"});default:return r.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,r){let o=e.getMonth();switch(t){case"M":case"MM":return Mc.M(e,t);case"Mo":return r.ordinalNumber(o+1,{unit:"month"});case"MMM":return r.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(o,{width:"narrow",context:"formatting"});default:return r.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,r){let o=e.getMonth();switch(t){case"L":return String(o+1);case"LL":return wt(o+1,2);case"Lo":return r.ordinalNumber(o+1,{unit:"month"});case"LLL":return r.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(o,{width:"narrow",context:"standalone"});default:return r.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,r,o){let n=kte(e,o);return t==="wo"?r.ordinalNumber(n,{unit:"week"}):wt(n,t.length)},I:function(e,t,r){let o=Tte(e);return t==="Io"?r.ordinalNumber(o,{unit:"week"}):wt(o,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Mc.d(e,t)},D:function(e,t,r){let o=Cte(e);return t==="Do"?r.ordinalNumber(o,{unit:"dayOfYear"}):wt(o,t.length)},E:function(e,t,r){let o=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,r,o){let n=e.getDay(),i=(n-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return wt(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,r,o){let n=e.getDay(),i=(n-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return wt(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(n,{width:"narrow",context:"standalone"});case"cccccc":return r.day(n,{width:"short",context:"standalone"});default:return r.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,r){let o=e.getDay(),n=o===0?7:o;switch(t){case"i":return String(n);case"ii":return wt(n,t.length);case"io":return r.ordinalNumber(n,{unit:"day"});case"iii":return r.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,r){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){let o=e.getHours(),n;switch(o===12?n=zg.noon:o===0?n=zg.midnight:n=o/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){let o=e.getHours(),n;switch(o>=17?n=zg.evening:o>=12?n=zg.afternoon:o>=4?n=zg.morning:n=zg.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let o=e.getHours()%12;return o===0&&(o=12),r.ordinalNumber(o,{unit:"hour"})}return Mc.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Mc.H(e,t)},K:function(e,t,r){let o=e.getHours()%12;return t==="Ko"?r.ordinalNumber(o,{unit:"hour"}):wt(o,t.length)},k:function(e,t,r){let o=e.getHours();return o===0&&(o=24),t==="ko"?r.ordinalNumber(o,{unit:"hour"}):wt(o,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Mc.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Mc.s(e,t)},S:function(e,t){return Mc.S(e,t)},X:function(e,t,r){let o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return Rte(o);case"XXXX":case"XX":return Em(o);default:return Em(o,":")}},x:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"x":return Rte(o);case"xxxx":case"xx":return Em(o);default:return Em(o,":")}},O:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ete(o,":");default:return"GMT"+Em(o,":")}},z:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ete(o,":");default:return"GMT"+Em(o,":")}},t:function(e,t,r){let o=Math.trunc(+e/1e3);return wt(o,t.length)},T:function(e,t,r){return wt(+e,t.length)}};function Ete(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=Math.trunc(o/60),i=o%60;return i===0?r+String(n):r+String(n)+t+wt(i,2)}function Rte(e,t){return e%60===0?(e>0?"-":"+")+wt(Math.abs(e)/60,2):Em(e,t)}function Em(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=wt(Math.trunc(o/60),2),i=wt(o%60,2);return r+n+t+i}var Ate=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Ote=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},V2e=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],o=r[1],n=r[2];if(!n)return Ate(e,t);let i;switch(o){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Ate(o,t)).replace("{{time}}",Ote(n,t))},Ite={p:Ote,P:V2e};var j2e=/^D+$/,z2e=/^Y+$/,U2e=["D","DD","YY","YYYY"];function Nte(e){return j2e.test(e)}function Fte(e){return z2e.test(e)}function Dte(e,t,r){let o=H2e(e,t,r);if(console.warn(o),U2e.includes(e))throw new RangeError(o)}function H2e(e,t,r){let o=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${o} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var G2e=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,W2e=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Y2e=/^'([^]*?)'?$/,q2e=/''/g,Z2e=/[a-zA-Z]/;function kN(e,t,r){let o=Td(),n=r?.locale??o.locale??TN,i=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,l=At(e,r?.in);if(!Lg(l))throw new RangeError("Invalid time value");let c=t.match(W2e).map(d=>{let f=d[0];if(f==="p"||f==="P"){let m=Ite[f];return m(d,n.formatLong)}return d}).join("").match(G2e).map(d=>{if(d==="''")return{isToken:!1,value:"'"};let f=d[0];if(f==="'")return{isToken:!1,value:K2e(d)};if(PN[f])return{isToken:!0,value:d};if(f.match(Z2e))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:d}});n.localize.preprocessor&&(c=n.localize.preprocessor(l,c));let u={firstWeekContainsDate:i,weekStartsOn:a,locale:n};return c.map(d=>{if(!d.isToken)return d.value;let f=d.value;(!r?.useAdditionalWeekYearTokens&&Fte(f)||!r?.useAdditionalDayOfYearTokens&&Nte(f))&&Dte(f,t,String(e));let m=PN[f[0]];return m(l,f,n.localize,u)}).join("")}function K2e(e){let t=e.match(Y2e);return t?t[1].replace(q2e,"'"):e}function Rm(e,t,r){return l2(e,-t,r)}function p2(e,t,r){return c2(e,-t,r)}function Bte(e,t,r){return pte(e,-t,r)}function h2(e,t,r){return hte(e,-t,r)}var _e=s(E(),1),Rr=s(D(),1),zn=s(po(),1);var EN=s(C(),1),Lr={Name:(0,EN.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,EN.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};function Mte(e,t){switch(t){case"days":return Rm(new Date,e);case"weeks":return Bte(new Date,e);case"months":return p2(new Date,e);case"years":return h2(new Date,e);default:return new Date}}var Lte={label:(0,_e.__)("Is none of"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),Lr),filter:((e,t,r)=>{if(!r?.length)return!0;let o=t.getValue({item:e});return Array.isArray(o)?!r.some(n=>o.includes(n)):typeof o=="string"?!r.includes(o):!1}),selection:"multi"},Vte=[{name:nr,label:(0,_e.__)("Includes"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),Lr),filter(e,t,r){if(!r?.length)return!0;let o=t.getValue({item:e});return Array.isArray(o)?r.some(n=>o.includes(n)):typeof o=="string"?r.includes(o):!1},selection:"multi"},{name:ir,...Lte},{name:mn,label:(0,_e.__)("Includes all"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),Lr),filter(e,t,r){return r?.length?r.every(o=>t.getValue({item:e})?.includes(o)):!0},selection:"multi"},{name:pn,...Lte},{name:Vn,label:(0,_e.__)("Between (inc)"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"),e.name,t[0].label[0],t[0].label[1]),Lr),filter(e,t,r){if(!Array.isArray(r)||r.length!==2||r[0]===void 0||r[1]===void 0)return!0;let o=t.getValue({item:e});return typeof o=="number"||o instanceof Date||typeof o=="string"?o>=r[0]&&o<=r[1]:!1},selection:"custom"},{name:jn,label:(0,_e.__)("In the past"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),Lr),filter(e,t,r){if(r?.value===void 0||r?.unit===void 0)return!0;let o=Mte(r.value,r.unit),n=(0,zn.getDate)(t.getValue({item:e}));return n>=o&&n<=new Date},selection:"custom"},{name:hi,label:(0,_e.__)("Over"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),Lr),filter(e,t,r){if(r?.value===void 0||r?.unit===void 0)return!0;let o=Mte(r.value,r.unit);return(0,zn.getDate)(t.getValue({item:e}))<o},selection:"custom"},{name:yr,label:(0,_e.__)("Is"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){return r===t.getValue({item:e})||r===void 0},selection:"single"},{name:br,label:(0,_e.__)("Is not"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){return r!==t.getValue({item:e})},selection:"single"},{name:hd,label:(0,_e.__)("Less than"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})<r},selection:"single"},{name:gd,label:(0,_e.__)("Greater than"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})>r},selection:"single"},{name:vd,label:(0,_e.__)("Less than or equal"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})<=r},selection:"single"},{name:yd,label:(0,_e.__)("Greater than or equal"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})>=r},selection:"single"},{name:bd,label:(0,_e.__)("Before"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=(0,zn.getDate)(r);return(0,zn.getDate)(t.getValue({item:e}))<o},selection:"single"},{name:Sd,label:(0,_e.__)("After"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=(0,zn.getDate)(r);return(0,zn.getDate)(t.getValue({item:e}))>o},selection:"single"},{name:_d,label:(0,_e.__)("Before (inc)"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=(0,zn.getDate)(r);return(0,zn.getDate)(t.getValue({item:e}))<=o},selection:"single"},{name:wd,label:(0,_e.__)("After (inc)"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=(0,zn.getDate)(r);return(0,zn.getDate)(t.getValue({item:e}))>=o},selection:"single"},{name:rl,label:(0,_e.__)("Contains"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=t.getValue({item:e});return typeof o=="string"&&r&&o.toLowerCase().includes(String(r).toLowerCase())},selection:"single"},{name:ol,label:(0,_e.__)("Doesn't contain"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=t.getValue({item:e});return typeof o=="string"&&r&&!o.toLowerCase().includes(String(r).toLowerCase())},selection:"single"},{name:nl,label:(0,_e.__)("Starts with"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=t.getValue({item:e});return typeof o=="string"&&r&&o.toLowerCase().startsWith(String(r).toLowerCase())},selection:"single"},{name:xd,label:(0,_e.__)("On"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=(0,zn.getDate)(r),n=(0,zn.getDate)(t.getValue({item:e}));return o.getTime()===n.getTime()},selection:"single"},{name:Cd,label:(0,_e.__)("Not on"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=(0,zn.getDate)(r),n=(0,zn.getDate)(t.getValue({item:e}));return o.getTime()!==n.getTime()},selection:"single"}],jte=e=>Vte.find(t=>t.name===e),zte=()=>Vte.map(e=>e.name);var Ute=s(A(),1),Hte=s(D(),1);function Lt(e,t){let r;return e?.required&&t?.required?r=t?.required?.message?t.required:void 0:e?.pattern&&t?.pattern?r=t.pattern:e?.min&&t?.min?r=t.min:e?.max&&t?.max?r=t.max:e?.minLength&&t?.minLength?r=t.minLength:e?.maxLength&&t?.maxLength?r=t.maxLength:e?.elements&&t?.elements?r=t.elements:t?.custom&&(r=t.custom),r}var Gte=s(C(),1),{ValidatedCheckboxControl:X2e}=Wt(Ute.privateApis);function Wte({field:e,onChange:t,data:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{getValue:a,setValue:l,label:c,description:u,isValid:d}=e,f=(0,Hte.useCallback)(()=>{t(l({item:r,value:!a({item:r})}))},[r,a,t,l]);return(0,Gte.jsx)(X2e,{required:!!e.isValid?.required,markWhenOptional:n,customValidity:Lt(d,i),hidden:o,label:c,help:u,checked:a({item:r}),onChange:f})}var g2=s(A(),1),Yte=s(D(),1);var RN=s(C(),1),{ValidatedComboboxControl:Q2e}=Wt(g2.privateApis);function v2({data:e,field:t,onChange:r,hideLabelFromVision:o,validity:n}){let{label:i,description:a,placeholder:l,getValue:c,setValue:u,isValid:d}=t,f=c({item:e})??"",m=(0,Yte.useCallback)(v=>r(u({item:e,value:v??""})),[e,r,u]),{elements:h,isLoading:g}=gi({elements:t.elements,getElements:t.getElements});return g?(0,RN.jsx)(g2.Spinner,{}):(0,RN.jsx)(Q2e,{required:!!t.isValid?.required,customValidity:Lt(d,n),label:i,value:f,help:a,placeholder:l,options:h,onChange:m,hideLabelFromVision:o,allowReset:!0,expandOnFocus:!0})}var _2=s(A(),1),ks=s(D(),1),S2=s(E(),1),Hi=s(po(),1);var Hg=s(A(),1),AN=s(D(),1),il=s(E(),1);var Ug=s(C(),1),J2e={[jn]:[{value:"days",label:(0,il.__)("Days")},{value:"weeks",label:(0,il.__)("Weeks")},{value:"months",label:(0,il.__)("Months")},{value:"years",label:(0,il.__)("Years")}],[hi]:[{value:"days",label:(0,il.__)("Days ago")},{value:"weeks",label:(0,il.__)("Weeks ago")},{value:"months",label:(0,il.__)("Months ago")},{value:"years",label:(0,il.__)("Years ago")}]};function y2({className:e,data:t,field:r,onChange:o,hideLabelFromVision:n,operator:i}){let a=J2e[i===jn?"inThePast":"over"],{id:l,label:c,getValue:u,setValue:d}=r,f=u({item:t}),{value:m="",unit:h=a[0].value}=f&&typeof f=="object"?f:{},g=(0,AN.useCallback)(y=>o(d({item:t,value:{value:Number(y),unit:h}})),[o,d,t,h]),v=(0,AN.useCallback)(y=>o(d({item:t,value:{value:m,unit:y}})),[o,d,t,m]);return(0,Ug.jsx)(Hg.BaseControl,{id:l,className:re(e,"dataviews-controls__relative-date"),label:c,hideLabelFromVision:n,children:(0,Ug.jsxs)(it,{direction:"row",gap:"sm",children:[(0,Ug.jsx)(Hg.__experimentalNumberControl,{__next40pxDefaultSize:!0,className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:m,onChange:g}),(0,Ug.jsx)(Hg.SelectControl,{className:"dataviews-controls__relative-date-unit",__next40pxDefaultSize:!0,label:(0,il.__)("Unit"),value:h,options:a,onChange:v,hideLabelFromVision:!0})]})})}var qte=s(po(),1);function b2(e){if(!e)return null;let t=(0,qte.getDate)(e);return t&&Lg(t)?t:null}var Pd=s(C(),1),{DateCalendar:$2e,ValidatedInputControl:eEe}=Wt(_2.privateApis),tEe=e=>e?(0,Hi.dateI18n)("Y-m-d\\TH:i",(0,Hi.getDate)(e)):"";function rEe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{id:a,label:l,description:c,setValue:u,getValue:d,isValid:f}=t,m=d({item:e}),h=typeof m=="string"?m:void 0,[g,v]=(0,ks.useState)(()=>b2(h)||new Date),y=(0,ks.useRef)(null),b=(0,ks.useRef)(void 0),_=(0,ks.useRef)(null),S=(0,ks.useCallback)(L=>r(u({item:e,value:L})),[e,r,u]);(0,ks.useEffect)(()=>()=>{b.current&&clearTimeout(b.current)},[]);let x=(0,ks.useCallback)(L=>{let M;if(L){let k=(0,Hi.dateI18n)("Y-m-d",L),I;h?I=(0,Hi.dateI18n)("H:i",(0,Hi.getDate)(h)):I=(0,Hi.dateI18n)("H:i",L),M=(0,Hi.getDate)(`${k}T${I}`).toISOString(),S(M),b.current&&clearTimeout(b.current)}else S(void 0);_.current=y.current&&y.current.ownerDocument.activeElement,b.current=setTimeout(()=>{y.current&&(y.current.focus(),y.current.blur(),S(M),_.current&&_.current instanceof HTMLElement&&_.current.focus())},0)},[S,h]),T=(0,ks.useCallback)(L=>{if(L){let M=(0,Hi.getDate)(L);S(M.toISOString());let k=b2(M.toISOString());k&&v(k)}else S(void 0)},[S]),{format:R}=t,F=R.weekStartsOn??(0,Hi.getSettings)().l10n.startOfWeek,{timezone:{string:B}}=(0,Hi.getSettings)(),z=l;return f?.required&&!n&&!o?z=`${l} (${(0,S2.__)("Required")})`:!f?.required&&n&&!o&&(z=`${l} (${(0,S2.__)("Optional")})`),(0,Pd.jsx)(_2.BaseControl,{id:a,label:z,help:c,hideLabelFromVision:o,children:(0,Pd.jsxs)(it,{direction:"column",gap:"lg",children:[(0,Pd.jsx)($2e,{style:{width:"100%"},selected:h&&b2(h)||void 0,onSelect:x,month:g,onMonthChange:v,timeZone:B||void 0,weekStartsOn:F}),(0,Pd.jsx)(eEe,{ref:y,__next40pxDefaultSize:!0,required:!!f?.required,customValidity:Lt(f,i),type:"datetime-local",label:(0,S2.__)("Date time"),hideLabelFromVision:!0,value:tEe(h),onChange:T})]})})}function Zte({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:a}){return i===jn||i===hi?(0,Pd.jsx)(y2,{className:"dataviews-controls__datetime",data:e,field:t,onChange:r,hideLabelFromVision:o,operator:i}):(0,Pd.jsx)(rEe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:a})}var gn=s(A(),1),Rt=s(D(),1),co=s(E(),1),hn=s(po(),1);var Vt=s(C(),1),{DateCalendar:oEe,DateRangeCalendar:nEe}=Wt(gn.privateApis),iEe=[{id:"today",label:(0,co.__)("Today"),getValue:()=>(0,hn.getDate)(null)},{id:"yesterday",label:(0,co.__)("Yesterday"),getValue:()=>{let e=(0,hn.getDate)(null);return Rm(e,1)}},{id:"past-week",label:(0,co.__)("Past week"),getValue:()=>{let e=(0,hn.getDate)(null);return Rm(e,7)}},{id:"past-month",label:(0,co.__)("Past month"),getValue:()=>{let e=(0,hn.getDate)(null);return p2(e,1)}}],sEe=[{id:"last-7-days",label:(0,co.__)("Last 7 days"),getValue:()=>{let e=(0,hn.getDate)(null);return[Rm(e,7),e]}},{id:"last-30-days",label:(0,co.__)("Last 30 days"),getValue:()=>{let e=(0,hn.getDate)(null);return[Rm(e,30),e]}},{id:"month-to-date",label:(0,co.__)("Month to date"),getValue:()=>{let e=(0,hn.getDate)(null);return[vte(e),e]}},{id:"last-year",label:(0,co.__)("Last year"),getValue:()=>{let e=(0,hn.getDate)(null);return[h2(e,1),e]}},{id:"year-to-date",label:(0,co.__)("Year to date"),getValue:()=>{let e=(0,hn.getDate)(null);return[d2(e),e]}}],Gg=e=>{if(!e)return null;let t=(0,hn.getDate)(e);return t&&Lg(t)?t:null},ON=e=>e?typeof e=="string"?e:kN(e,"yyyy-MM-dd"):"";function Kte({field:e,validity:t,inputRefs:r,isTouched:o,setIsTouched:n,children:i}){let{isValid:a}=e,[l,c]=(0,Rt.useState)(void 0),u=(0,Rt.useCallback)(()=>{let f=Array.isArray(r)?r:[r];for(let m of f){let h=m.current;if(h&&!h.validity.valid){c({type:"invalid",message:h.validationMessage});return}}c(void 0)},[r]);return(0,Rt.useEffect)(()=>{let f=Array.isArray(r)?r:[r],m=t?Lt(a,t):void 0;for(let h of f){let g=h.current;g&&g.setCustomValidity(m?.type==="invalid"&&m.message?m.message:"")}},[r,a,t]),(0,Rt.useEffect)(()=>{let f=Array.isArray(r)?r:[r],m=h=>{h.preventDefault(),n(!0)};for(let h of f)h.current?.addEventListener("invalid",m);return()=>{for(let h of f)h.current?.removeEventListener("invalid",m)}},[r,n]),(0,Rt.useEffect)(()=>{if(!o)return;let f=t?Lt(a,t):void 0;f?c(f):u()},[o,a,t,u]),(0,Vt.jsxs)("div",{onBlur:f=>{o||(!f.relatedTarget||!f.currentTarget.contains(f.relatedTarget))&&n(!0)},children:[i,(0,Vt.jsx)("div",{"aria-live":"polite",children:l&&(0,Vt.jsxs)("p",{className:re("components-validated-control__indicator",l.type==="invalid"?"is-invalid":void 0),children:[(0,Vt.jsx)(gn.Icon,{className:"components-validated-control__indicator-icon",icon:Cl,size:16,fill:"currentColor"}),l.message]})})]})}function aEe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{id:a,label:l,setValue:c,getValue:u,isValid:d,format:f}=t,[m,h]=(0,Rt.useState)(null),g=f.weekStartsOn??(0,hn.getSettings)().l10n.startOfWeek,v=u({item:e}),y=typeof v=="string"?v:void 0,[b,_]=(0,Rt.useState)(()=>Gg(y)||new Date),[S,x]=(0,Rt.useState)(!1),T=(0,Rt.useRef)(null),R=(0,Rt.useCallback)(k=>r(c({item:e,value:k})),[e,r,c]),F=(0,Rt.useCallback)(k=>{let I=k?kN(k,"yyyy-MM-dd"):void 0;R(I),h(null),x(!0)},[R]),B=(0,Rt.useCallback)(k=>{let I=k.getValue(),U=ON(I);_(I),R(U),h(k.id),x(!0)},[R]),z=(0,Rt.useCallback)(k=>{if(R(k),k){let I=Gg(k);I&&_(I)}h(null),x(!0)},[R]),{timezone:{string:L}}=(0,hn.getSettings)(),M=l;return d?.required&&!n?M=`${l} (${(0,co.__)("Required")})`:!d?.required&&n&&(M=`${l} (${(0,co.__)("Optional")})`),(0,Vt.jsx)(Kte,{field:t,validity:i,inputRefs:T,isTouched:S,setIsTouched:x,children:(0,Vt.jsx)(gn.BaseControl,{id:a,className:"dataviews-controls__date",label:M,hideLabelFromVision:o,children:(0,Vt.jsxs)(it,{direction:"column",gap:"lg",children:[(0,Vt.jsxs)(it,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[iEe.map(k=>{let I=m===k.id;return(0,Vt.jsx)(gn.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:I,size:"small",onClick:()=>B(k),children:k.label},k.id)}),(0,Vt.jsx)(gn.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!m,size:"small",disabled:!!m,accessibleWhenDisabled:!1,children:(0,co.__)("Custom")})]}),(0,Vt.jsx)(gn.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:T,type:"date",label:(0,co.__)("Date"),hideLabelFromVision:!0,value:y,onChange:z,required:!!t.isValid?.required}),(0,Vt.jsx)(oEe,{style:{width:"100%"},selected:y&&Gg(y)||void 0,onSelect:F,month:b,onMonthChange:_,timeZone:L||void 0,weekStartsOn:g})]})})})}function lEe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{id:a,label:l,getValue:c,setValue:u,format:d}=t,f,m=c({item:e});Array.isArray(m)&&m.length===2&&m.every(U=>typeof U=="string")&&(f=m);let h=d.weekStartsOn??(0,hn.getSettings)().l10n.startOfWeek,g=(0,Rt.useCallback)(U=>{r(u({item:e,value:U}))},[e,r,u]),[v,y]=(0,Rt.useState)(null),b=(0,Rt.useMemo)(()=>{if(!f)return{from:void 0,to:void 0};let[U,G]=f;return{from:Gg(U)||void 0,to:Gg(G)||void 0}},[f]),[_,S]=(0,Rt.useState)(()=>b.from||new Date),[x,T]=(0,Rt.useState)(!1),R=(0,Rt.useRef)(null),F=(0,Rt.useRef)(null),B=(0,Rt.useCallback)((U,G)=>{U&&G?g([ON(U),ON(G)]):!U&&!G&&g(void 0)},[g]),z=(0,Rt.useCallback)(U=>{B(U?.from,U?.to),y(null),T(!0)},[B]),L=(0,Rt.useCallback)(U=>{let[G,Y]=U.getValue();S(G),B(G,Y),y(U.id),T(!0)},[B]),M=(0,Rt.useCallback)((U,G)=>{let[Y,Z]=f||[void 0,void 0];if(B(U==="from"?G:Y,U==="to"?G:Z),G){let H=Gg(G);H&&S(H)}y(null),T(!0)},[f,B]),{timezone:k}=(0,hn.getSettings)(),I=l;return t.isValid?.required&&!n?I=`${l} (${(0,co.__)("Required")})`:!t.isValid?.required&&n&&(I=`${l} (${(0,co.__)("Optional")})`),(0,Vt.jsx)(Kte,{field:t,validity:i,inputRefs:[R,F],isTouched:x,setIsTouched:T,children:(0,Vt.jsx)(gn.BaseControl,{id:a,className:"dataviews-controls__date",label:I,hideLabelFromVision:o,children:(0,Vt.jsxs)(it,{direction:"column",gap:"lg",children:[(0,Vt.jsxs)(it,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[sEe.map(U=>{let G=v===U.id;return(0,Vt.jsx)(gn.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:G,size:"small",onClick:()=>L(U),children:U.label},U.id)}),(0,Vt.jsx)(gn.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!v,size:"small",accessibleWhenDisabled:!1,disabled:!!v,children:(0,co.__)("Custom")})]}),(0,Vt.jsxs)(it,{direction:"row",gap:"sm",justify:"space-between",className:"dataviews-controls__date-range-inputs",children:[(0,Vt.jsx)(gn.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:R,type:"date",label:(0,co.__)("From"),hideLabelFromVision:!0,value:f?.[0],onChange:U=>M("from",U),required:!!t.isValid?.required}),(0,Vt.jsx)(gn.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:F,type:"date",label:(0,co.__)("To"),hideLabelFromVision:!0,value:f?.[1],onChange:U=>M("to",U),required:!!t.isValid?.required})]}),(0,Vt.jsx)(nEe,{style:{width:"100%"},selected:b,onSelect:z,month:_,onMonthChange:S,timeZone:k.string||void 0,weekStartsOn:h})]})})})}function Xte({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:a}){return i===jn||i===hi?(0,Vt.jsx)(y2,{className:"dataviews-controls__date",data:e,field:t,onChange:r,hideLabelFromVision:o,operator:i}):i===Vn?(0,Vt.jsx)(lEe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:a}):(0,Vt.jsx)(aEe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:a})}var w2=s(A(),1),Qte=s(D(),1);var IN=s(C(),1),{ValidatedSelectControl:cEe}=Wt(w2.privateApis);function x2({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{type:a,label:l,description:c,getValue:u,setValue:d,isValid:f}=t,m=a==="array",h=u({item:e})??(m?[]:""),g=(0,Qte.useCallback)(b=>r(d({item:e,value:b})),[e,r,d]),{elements:v,isLoading:y}=gi({elements:t.elements,getElements:t.getElements});return y?(0,IN.jsx)(w2.Spinner,{}):(0,IN.jsx)(cEe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:Lt(f,i),label:l,value:h,help:c,options:v,onChange:g,__next40pxDefaultSize:!0,hideLabelFromVision:o,multiple:m})}var NN=s(C(),1),uEe=10;function Jte(e){let{field:t}=e,{elements:r}=gi({elements:t.elements,getElements:t.getElements});return r.length>=uEe?(0,NN.jsx)(v2,{...e}):(0,NN.jsx)(x2,{...e})}var T2=s(A(),1);var $te=s(A(),1),ere=s(D(),1);var tre=s(C(),1),{ValidatedInputControl:dEe}=Wt($te.privateApis);function sl({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,type:i,prefix:a,suffix:l,validity:c}){let{label:u,placeholder:d,description:f,getValue:m,setValue:h,isValid:g}=t,v=m({item:e}),y=(0,ere.useCallback)(b=>r(h({item:e,value:b})),[e,h,r]);return(0,tre.jsx)(dEe,{required:!!g.required,markWhenOptional:n,customValidity:Lt(g,c),label:u,placeholder:d,value:v??"",help:f,onChange:y,hideLabelFromVision:o,type:i,prefix:a,suffix:l,pattern:g.pattern?g.pattern.constraint:void 0,minLength:g.minLength?g.minLength.constraint:void 0,maxLength:g.maxLength?g.maxLength.constraint:void 0,__next40pxDefaultSize:!0})}var C2=s(C(),1);function rre({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,C2.jsx)(sl,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"email",prefix:(0,C2.jsx)(T2.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,C2.jsx)(T2.Icon,{icon:KR})})})}var k2=s(A(),1);var P2=s(C(),1);function ore({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,P2.jsx)(sl,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"tel",prefix:(0,P2.jsx)(k2.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,P2.jsx)(k2.Icon,{icon:Ym})})})}var R2=s(A(),1);var E2=s(C(),1);function nre({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,E2.jsx)(sl,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"url",prefix:(0,E2.jsx)(R2.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,E2.jsx)(R2.Icon,{icon:cA})})})}var Lc=s(A(),1),Z0=s(D(),1),A2=s(E(),1);var kd=s(C(),1),{ValidatedNumberControl:fEe}=Wt(Lc.privateApis);function ire(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function mEe({value:e,onChange:t,hideLabelFromVision:r,step:o}){let[n="",i=""]=e,a=(0,Z0.useCallback)(c=>t([ire(c),i]),[t,i]),l=(0,Z0.useCallback)(c=>t([n,ire(c)]),[t,n]);return(0,kd.jsx)(Lc.BaseControl,{help:(0,A2.__)("The max. value must be greater than the min. value."),children:(0,kd.jsxs)(Lc.Flex,{direction:"row",gap:4,children:[(0,kd.jsx)(Lc.__experimentalNumberControl,{label:(0,A2.__)("Min."),value:n,max:i?Number(i)-o:void 0,onChange:a,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:o}),(0,kd.jsx)(Lc.__experimentalNumberControl,{label:(0,A2.__)("Max."),value:i,min:n?Number(n)+o:void 0,onChange:l,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:o})]})})}function O2({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:a}){let l=t.format?.decimals??0,c=Math.pow(10,Math.abs(l)*-1),{label:u,description:d,getValue:f,setValue:m,isValid:h}=t,g=f({item:e})??"",v=(0,Z0.useCallback)(b=>{r(m({item:e,value:["",void 0].includes(b)?void 0:Number(b)}))},[e,r,m]),y=(0,Z0.useCallback)(b=>{r(m({item:e,value:b}))},[e,r,m]);if(i===Vn){let b=["",""];return Array.isArray(g)&&g.length===2&&g.every(_=>typeof _=="number"||_==="")&&(b=g),(0,kd.jsx)(mEe,{value:b,onChange:y,hideLabelFromVision:o,step:c})}return(0,kd.jsx)(fEe,{required:!!h.required,markWhenOptional:n,customValidity:Lt(h,a),label:u,help:d,value:g,onChange:v,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:c,min:h.min?h.min.constraint:void 0,max:h.max?h.max.constraint:void 0})}var sre=s(C(),1);function are(e){return(0,sre.jsx)(O2,{...e})}var lre=s(C(),1);function cre(e){return(0,lre.jsx)(O2,{...e})}var I2=s(A(),1),ure=s(D(),1);var FN=s(C(),1),{ValidatedRadioControl:pEe}=Wt(I2.privateApis);function dre({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:a,description:l,getValue:c,setValue:u,isValid:d}=t,{elements:f,isLoading:m}=gi({elements:t.elements,getElements:t.getElements}),h=c({item:e}),g=(0,ure.useCallback)(v=>r(u({item:e,value:v})),[e,r,u]);return m?(0,FN.jsx)(I2.Spinner,{}):(0,FN.jsx)(pEe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:Lt(d,i),label:a,help:l,onChange:g,options:f,selected:h,hideLabelFromVision:o})}var DN=s(D(),1);var fre=s(C(),1);function mre({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,config:i,validity:a}){let{prefix:l,suffix:c}=i||{};return(0,fre.jsx)(sl,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:a,prefix:l?(0,DN.createElement)(l):void 0,suffix:c?(0,DN.createElement)(c):void 0})}var pre=s(A(),1),hre=s(D(),1);var gre=s(C(),1),{ValidatedToggleControl:hEe}=Wt(pre.privateApis);function vre({field:e,onChange:t,data:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:a,description:l,getValue:c,setValue:u,isValid:d}=e,f=(0,hre.useCallback)(()=>{t(u({item:r,value:!c({item:r})}))},[t,u,r,c]);return(0,gre.jsx)(hEe,{required:!!d.required,markWhenOptional:n,customValidity:Lt(d,i),hidden:o,label:a,help:l,checked:c({item:r}),onChange:f})}var yre=s(A(),1),bre=s(D(),1);var Sre=s(C(),1),{ValidatedTextareaControl:gEe}=Wt(yre.privateApis);function _re({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,config:i,validity:a}){let{rows:l=4}=i||{},{label:c,placeholder:u,description:d,setValue:f,isValid:m}=t,h=t.getValue({item:e}),g=(0,bre.useCallback)(v=>r(f({item:e,value:v})),[e,r,f]);return(0,Sre.jsx)(gEe,{required:!!m.required,markWhenOptional:n,customValidity:Lt(m,a),label:c,placeholder:u,value:h??"",help:d,onChange:g,rows:l,minLength:m.minLength?m.minLength.constraint:void 0,maxLength:m.maxLength?m.maxLength.constraint:void 0,__next40pxDefaultSize:!0,hideLabelFromVision:o})}var Wg=s(A(),1),wre=s(D(),1);var N2=s(C(),1),{ValidatedToggleGroupControl:vEe}=Wt(Wg.privateApis);function xre({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{getValue:a,setValue:l,isValid:c}=t,u=a({item:e}),d=(0,wre.useCallback)(g=>r(l({item:e,value:g})),[e,r,l]),{elements:f,isLoading:m}=gi({elements:t.elements,getElements:t.getElements});if(m)return(0,N2.jsx)(Wg.Spinner,{});if(f.length===0)return null;let h=f.find(g=>g.value===u);return(0,N2.jsx)(vEe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:Lt(c,i),__next40pxDefaultSize:!0,isBlock:!0,label:t.label,help:h?.description||t.description,onChange:d,value:u,hideLabelFromVision:o,children:f.map(g=>(0,N2.jsx)(Wg.__experimentalToggleGroupControlOption,{label:g.label,value:g.value},g.value))})}var F2=s(A(),1),D2=s(D(),1);var K0=s(C(),1),{ValidatedFormTokenField:yEe}=Wt(F2.privateApis);function Cre({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:a,placeholder:l,getValue:c,setValue:u,isValid:d}=t,f=c({item:e}),{elements:m,isLoading:h}=gi({elements:t.elements,getElements:t.getElements}),g=(0,D2.useMemo)(()=>Array.isArray(f)?f.map(y=>m?.find(_=>_.value===y)||{value:y,label:y}):[],[f,m]),v=(0,D2.useCallback)(y=>{let b=y.map(_=>typeof _=="object"&&"value"in _?_.value:_);r(u({item:e,value:b}))},[r,u,e]);return h?(0,K0.jsx)(F2.Spinner,{}):(0,K0.jsx)(yEe,{required:!!d?.required,markWhenOptional:n,customValidity:Lt(d,i),label:o?void 0:a,value:g,onChange:v,placeholder:l,suggestions:m?.map(y=>y.value),__experimentalValidateInput:y=>t.isValid?.elements&&m?m.some(b=>b.value===y||b.label===y):!0,__experimentalExpandOnFocus:m&&m.length>0,__experimentalShowHowTo:!t.isValid?.elements,displayTransform:y=>typeof y=="object"&&"label"in y?y.label:typeof y=="string"&&m&&m.find(_=>_.value===y)?.label||y,__experimentalRenderItem:({item:y})=>{if(typeof y=="string"&&m){let b=m.find(_=>_.value===y);return(0,K0.jsx)("span",{children:b?.label||y})}return(0,K0.jsx)("span",{children:y})}})}var vi=s(A(),1),BN=s(D(),1),Tre=s(E(),1);var Vc=s(C(),1),{ValidatedInputControl:bEe}=Wt(vi.privateApis),SEe=({color:e,onColorChange:t})=>{let r=e&&xr(e).isValid()?e:"#ffffff";return(0,Vc.jsx)(vi.Dropdown,{className:"dataviews-controls__color-picker-dropdown",popoverProps:{resize:!1},renderToggle:({onToggle:o})=>(0,Vc.jsx)(vi.Button,{onClick:o,"aria-label":(0,Tre.__)("Open color picker"),size:"small",icon:()=>(0,Vc.jsx)(vi.ColorIndicator,{colorValue:r})}),renderContent:()=>(0,Vc.jsx)(vi.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,Vc.jsx)(vi.ColorPicker,{color:r,onChange:t,enableAlpha:!0})})})};function Pre({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:a,placeholder:l,description:c,setValue:u,isValid:d}=t,f=t.getValue({item:e})||"",m=(0,BN.useCallback)(g=>{r(u({item:e,value:g}))},[e,r,u]),h=(0,BN.useCallback)(g=>{r(u({item:e,value:g||""}))},[e,r,u]);return(0,Vc.jsx)(bEe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:Lt(d,i),label:a,placeholder:l,value:f,help:c,onChange:h,hideLabelFromVision:o,type:"text",prefix:(0,Vc.jsx)(vi.__experimentalInputControlPrefixWrapper,{variant:"control",children:(0,Vc.jsx)(SEe,{color:f,onColorChange:m})})})}var M2=s(A(),1),L2=s(D(),1),MN=s(E(),1);var B2=s(C(),1);function kre({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let[a,l]=(0,L2.useState)(!1),c=(0,L2.useCallback)(()=>{l(u=>!u)},[]);return(0,B2.jsx)(sl,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:a?"text":"password",suffix:(0,B2.jsx)(M2.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,B2.jsx)(M2.Button,{icon:a?tO:Gd,onClick:c,size:"small",label:a?(0,MN.__)("Hide password"):(0,MN.__)("Show password")})})})}function V2(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var Rre=s(C(),1),Ere={adaptiveSelect:Jte,array:Cre,checkbox:Wte,color:Pre,combobox:v2,datetime:Zte,date:Xte,email:rre,telephone:ore,url:nre,integer:are,number:cre,password:kre,radio:dre,select:x2,text:mre,toggle:vre,textarea:_re,toggleGroup:xre};function _Ee(e){return e&&typeof e=="object"&&typeof e.control=="string"}function wEe(e){let{control:t,...r}=e,o=j2(t);return o===null?null:function(i){return(0,Rre.jsx)(o,{...i,config:r})}}function Are(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?j2(e.Edit):_Ee(e.Edit)?wEe(e.Edit):V2(e)&&e.type!=="array"?j2("adaptiveSelect"):t===null?null:j2(t)}function j2(e){return Object.keys(Ere).includes(e)?Ere[e]:null}function xEe(e,t,r){if(e.filterBy===!1)return!1;let o=e.filterBy?.operators?.filter(n=>r.includes(n))??t;return o.length===0?!1:{isPrimary:!!e.filterBy?.isPrimary,operators:o}}var Ore=xEe;var CEe=e=>({item:t})=>{let r=e.split("."),o=t;for(let n of r)o.hasOwnProperty(n)?o=o[n]:o=void 0;return o},Ire=CEe;var TEe=e=>({value:t})=>{let r=e.split("."),o={},n=o;for(let i of r.slice(0,-1))n[i]={},n=n[i];return n[r.at(-1)]=t,o},Nre=TEe;var Dre=s(E(),1);function z2({item:e,field:t}){let{elements:r,isLoading:o}=gi({elements:t.elements,getElements:t.getElements}),n=t.getValue({item:e});return o||r.length===0?n:r?.find(i=>i.value===n)?.label||t.getValue({item:e})}var Fre=s(C(),1);function Ar({item:e,field:t}){return t.hasElements?(0,Fre.jsx)(z2,{item:e,field:t}):t.getValueFormatted({item:e,field:t})}var al=(e,t,r)=>r==="asc"?e.localeCompare(t):t.localeCompare(e);function Or(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)}function ll(e,t){if(typeof t.isValid.minLength?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:String(r).length>=t.isValid.minLength.constraint}function cl(e,t){if(typeof t.isValid.maxLength?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:String(r).length<=t.isValid.maxLength.constraint}function ul(e,t){if(t.isValid.pattern?.constraint===void 0)return!0;try{let r=new RegExp(t.isValid.pattern.constraint),o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:r.test(String(o))}catch{return!1}}function Yt(e,t){let o=(t.elements??[]).map(i=>i.value);if(o.length===0)return!0;let n=t.getValue({item:e});return[].concat(n).every(i=>o.includes(i))}function PEe({item:e,field:t}){return t.getValue({item:e})}var Un=PEe;var kEe=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function EEe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!kEe.test(r)?(0,Dre.__)("Value must be a valid email address."):null}var Bre={type:"email",render:Ar,Edit:"email",sort:al,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[nr,ir],validOperators:[yr,br,rl,ol,nl,nr,ir,mn,pn],format:{},getValueFormatted:Un,validate:{required:Or,pattern:ul,minLength:ll,maxLength:cl,elements:Yt,custom:EEe}};var Mre=s(E(),1);var Yg=(e,t,r)=>r==="asc"?e-t:t-e;function U2(e,t){if(typeof t.isValid.min?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:Number(r)>=t.isValid.min.constraint}function H2(e,t){if(typeof t.isValid.max?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:Number(r)<=t.isValid.max.constraint}var Lre={separatorThousand:","};function REe({item:e,field:t}){let r=t.getValue({item:e});if(r==null)return"";if(r=Number(r),!Number.isFinite(r))return String(r);let o;t.type!=="integer"?o=Lre:o=t.format;let{separatorThousand:n}=o,i=Math.trunc(r);return n?String(i).replace(/\B(?=(\d{3})+(?!\d))/g,n):String(i)}function AEe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Number.isInteger(r)?(0,Mre.__)("Value must be an integer."):null}var Vre={type:"integer",render:Ar,Edit:"integer",sort:Yg,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[yr,br,hd,gd,vd,yd,Vn],validOperators:[yr,br,hd,gd,vd,yd,Vn,nr,ir,mn,pn],format:Lre,getValueFormatted:REe,validate:{required:Or,min:U2,max:H2,elements:Yt,custom:AEe}};var jre=s(E(),1);var zre={separatorThousand:",",separatorDecimal:".",decimals:2};function OEe({item:e,field:t}){let r=t.getValue({item:e});if(r==null)return"";if(r=Number(r),!Number.isFinite(r))return String(r);let o;t.type!=="number"?o=zre:o=t.format;let{separatorThousand:n,separatorDecimal:i,decimals:a}=o,l=r.toFixed(a),[c,u]=l.split("."),d=n?c.replace(/\B(?=(\d{3})+(?!\d))/g,n):c;return a===0?d:d+i+u}function IEe(e){return e===""||e===void 0||e===null}function NEe(e,t){let r=t.getValue({item:e});return!IEe(r)&&!Number.isFinite(r)?(0,jre.__)("Value must be a number."):null}var Ure={type:"number",render:Ar,Edit:"number",sort:Yg,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[yr,br,hd,gd,vd,yd,Vn],validOperators:[yr,br,hd,gd,vd,yd,Vn,nr,ir,mn,pn],format:zre,getValueFormatted:OEe,validate:{required:Or,min:U2,max:H2,elements:Yt,custom:NEe}};var Hre={type:"text",render:Ar,Edit:"text",sort:al,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[nr,ir],validOperators:[yr,br,rl,ol,nl,nr,ir,mn,pn],format:{},getValueFormatted:Un,validate:{required:Or,pattern:ul,minLength:ll,maxLength:cl,elements:Yt}};var Am=s(po(),1);var Gre={datetime:(0,Am.getSettings)().formats.datetime,weekStartsOn:(0,Am.getSettings)().l10n.startOfWeek};function FEe({item:e,field:t}){let r=t.getValue({item:e});if(["",void 0,null].includes(r))return"";let o;return t.type!=="datetime"?o=Gre:o=t.format,(0,Am.dateI18n)(o.datetime,(0,Am.getDate)(r))}var DEe=(e,t,r)=>{let o=new Date(e).getTime(),n=new Date(t).getTime();return r==="asc"?o-n:n-o},Wre={type:"datetime",render:Ar,Edit:"datetime",sort:DEe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[xd,Cd,bd,Sd,_d,wd,jn,hi],validOperators:[xd,Cd,bd,Sd,_d,wd,jn,hi],format:Gre,getValueFormatted:FEe,validate:{required:Or,elements:Yt}};var Om=s(po(),1);var Yre={date:(0,Om.getSettings)().formats.date,weekStartsOn:(0,Om.getSettings)().l10n.startOfWeek};function BEe({item:e,field:t}){let r=t.getValue({item:e});if(["",void 0,null].includes(r))return"";let o;return t.type!=="date"?o=Yre:o=t.format,(0,Om.dateI18n)(o.date,(0,Om.getDate)(r))}var MEe=(e,t,r)=>{let o=new Date(e).getTime(),n=new Date(t).getTime();return r==="asc"?o-n:n-o},qre={type:"date",render:Ar,Edit:"date",sort:MEe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[xd,Cd,bd,Sd,_d,wd,jn,hi,Vn],validOperators:[xd,Cd,bd,Sd,_d,wd,jn,hi,Vn],format:Yre,getValueFormatted:BEe,validate:{required:Or,elements:Yt}};var G2=s(E(),1);function Zre(e,t){return t.getValue({item:e})===!0}function LEe({item:e,field:t}){let r=t.getValue({item:e});return r===!0?(0,G2.__)("True"):r===!1?(0,G2.__)("False"):""}function VEe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&![!0,!1].includes(r)?(0,G2.__)("Value must be true, false, or undefined"):null}var jEe=(e,t,r)=>{let o=!!e;return o===!!t?0:r==="asc"?o?1:-1:o?-1:1},Kre={type:"boolean",render:Ar,Edit:"checkbox",sort:jEe,validate:{required:Zre,elements:Yt,custom:VEe},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[yr,br],validOperators:[yr,br],format:{},getValueFormatted:LEe};var Xre={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:Un,validate:{}};var LN=s(E(),1);function Qre(e,t){let r=t.getValue({item:e});return Array.isArray(r)&&r.length>0&&r.every(o=>![void 0,"",null].includes(o))}function Jre({item:e,field:t}){let r=t.getValue({item:e});return(Array.isArray(r)?r:[]).join(", ")}function zEe({item:e,field:t}){return Jre({item:e,field:t})}function UEe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Array.isArray(r)?(0,LN.__)("Value must be an array."):r.every(o=>typeof o=="string")?null:(0,LN.__)("Every value must be a string.")}var HEe=(e,t,r)=>{let o=Array.isArray(e)?e:[],n=Array.isArray(t)?t:[];if(o.length!==n.length)return r==="asc"?o.length-n.length:n.length-o.length;let i=o.join(","),a=n.join(",");return r==="asc"?i.localeCompare(a):a.localeCompare(i)},$re={type:"array",render:zEe,Edit:"array",sort:HEe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[nr,ir],validOperators:[nr,ir,mn,pn],format:{},getValueFormatted:Jre,validate:{required:Qre,elements:Yt,custom:UEe}};function GEe({item:e,field:t}){return t.getValue({item:e})?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":""}var eoe={type:"password",render:Ar,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:GEe,validate:{required:Or,pattern:ul,minLength:ll,maxLength:cl,elements:Yt}};var toe={type:"telephone",render:Ar,Edit:"telephone",sort:al,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[nr,ir],validOperators:[yr,br,rl,ol,nl,nr,ir,mn,pn],format:{},getValueFormatted:Un,validate:{required:Or,pattern:ul,minLength:ll,maxLength:cl,elements:Yt}};var roe=s(E(),1);var qg=s(C(),1);function WEe({item:e,field:t}){if(t.hasElements)return(0,qg.jsx)(z2,{item:e,field:t});let r=Un({item:e,field:t});return!r||!xr(r).isValid()?r:(0,qg.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,qg.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:r,border:"1px solid #ddd",flexShrink:0}}),(0,qg.jsx)("span",{children:r})]})}function YEe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!xr(r).isValid()?(0,roe.__)("Value must be a valid color."):null}var qEe=(e,t,r)=>{let o=xr(e),n=xr(t);if(!o.isValid()&&!n.isValid())return 0;if(!o.isValid())return r==="asc"?1:-1;if(!n.isValid())return r==="asc"?-1:1;let i=o.toHsl(),a=n.toHsl();return i.h!==a.h?r==="asc"?i.h-a.h:a.h-i.h:i.s!==a.s?r==="asc"?i.s-a.s:a.s-i.s:r==="asc"?i.l-a.l:a.l-i.l},ooe={type:"color",render:WEe,Edit:"color",sort:qEe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[nr,ir],validOperators:[yr,br,nr,ir],format:{},getValueFormatted:Un,validate:{required:Or,elements:Yt,custom:YEe}};var noe={type:"url",render:Ar,Edit:"url",sort:al,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[nr,ir],validOperators:[yr,br,rl,ol,nl,nr,ir,mn,pn],format:{},getValueFormatted:Un,validate:{required:Or,pattern:ul,minLength:ll,maxLength:cl,elements:Yt}};var ZEe=(e,t,r)=>typeof e=="number"&&typeof t=="number"?Yg(e,t,r):al(e,t,r),ioe={render:Ar,Edit:null,sort:ZEe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[yr,br],validOperators:zte(),format:{},getValueFormatted:Un,validate:{required:Or,elements:Yt}};function soe(e,t){let r;e.isValid?.required===!0&&t.validate.required!==void 0&&(r={constraint:!0,validate:t.validate.required});let o;(e.isValid?.elements===!0||e.isValid?.elements===void 0&&(e.elements||e.getElements))&&t.validate.elements!==void 0&&(o={constraint:!0,validate:t.validate.elements});let n;typeof e.isValid?.min=="number"&&t.validate.min!==void 0&&(n={constraint:e.isValid.min,validate:t.validate.min});let i;typeof e.isValid?.max=="number"&&t.validate.max!==void 0&&(i={constraint:e.isValid.max,validate:t.validate.max});let a;typeof e.isValid?.minLength=="number"&&t.validate.minLength!==void 0&&(a={constraint:e.isValid.minLength,validate:t.validate.minLength});let l;typeof e.isValid?.maxLength=="number"&&t.validate.maxLength!==void 0&&(l={constraint:e.isValid.maxLength,validate:t.validate.maxLength});let c;e.isValid?.pattern!==void 0&&t.validate.pattern!==void 0&&(c={constraint:e.isValid?.pattern,validate:t.validate.pattern});let u=e.isValid?.custom??t.validate.custom;return{required:r,elements:o,min:n,max:i,minLength:a,maxLength:l,pattern:c,custom:u}}function aoe(e){return e.validOperators.reduce((t,r)=>{let o=jte(r);return o?.filter&&(t[r]=o.filter),t},{})}function KEe(e,t){return{...t.format,...e.format}}var loe=KEe;function XEe(e){let t=[Bre,Vre,Ure,Hre,Wre,qre,Kre,Xre,$re,eoe,toe,ooe,noe].find(r=>r?.type===e);return t||ioe}function X0(e){return e.map(t=>{let r=XEe(t.type),o=t.getValue||Ire(t.id),n=function(i,a,l){let c=o({item:i}),u=o({item:a});return t.sort?t.sort(c,u,l):r.sort(c,u,l)};return{id:t.id,label:t.label||t.id,header:t.header||t.label||t.id,description:t.description,placeholder:t.placeholder,getValue:o,setValue:t.setValue||Nre(t.id),elements:t.elements,getElements:t.getElements,hasElements:V2(t),isVisible:t.isVisible,enableHiding:t.enableHiding??!0,readOnly:t.readOnly??!1,type:r.type,render:t.render??r.render,Edit:Are(t,r.Edit),sort:n,enableSorting:t.enableSorting??r.enableSorting,enableGlobalSearch:t.enableGlobalSearch??r.enableGlobalSearch,isValid:soe(t,r),filterBy:Ore(t,r.defaultOperators,r.validOperators),filter:aoe(r),format:loe(t,r),getValueFormatted:t.getValueFormatted??r.getValueFormatted}})}var YN=s(D(),1);var coe=s(D(),1),uoe=s(C(),1),VN=(0,coe.createContext)({fields:[]});VN.displayName="DataFormContext";function doe({fields:e,children:t}){return(0,uoe.jsx)(VN.Provider,{value:{fields:e},children:t})}var Es=VN;var eE=s(D(),1);var Y2=s(D(),1),Q0=s(A(),1);var vn={type:"regular",labelPosition:"top"},QEe=e=>typeof e=="string"?[{id:e,visibility:"when-collapsed"}]:e.map(t=>typeof t=="string"?{id:t,visibility:"when-collapsed"}:{id:t.id,visibility:t.visibility});function foe(e){let t=vn;if(e?.type==="regular")t={type:"regular",labelPosition:e?.labelPosition??"top"};else if(e?.type==="panel"){let r=e.summary??[],o=Array.isArray(r)?r:[r];t={type:"panel",labelPosition:e?.labelPosition??"side",openAs:e?.openAs??"dropdown",summary:o,editVisibility:e?.editVisibility??"on-hover"}}else if(e?.type==="card")if(e.withHeader===!1)t={type:"card",withHeader:!1,isOpened:!0,summary:[],isCollapsible:!1};else{let r=e.summary??[];t={type:"card",withHeader:!0,isOpened:typeof e.isOpened=="boolean"?e.isOpened:!0,summary:QEe(r),isCollapsible:e.isCollapsible===void 0?!0:e.isCollapsible}}else e?.type==="row"?t={type:"row",alignment:e?.alignment??"center",styles:e?.styles??{}}:e?.type==="details"&&(t={type:"details",summary:e?.summary??""});return t}function moe(e){let t=foe(e?.layout),r=(e.fields??[]).map(o=>{if(typeof o=="string")return{id:o,layout:t};let n=o.layout?foe(o.layout):t;return{id:o.id,layout:n,...!!o.label&&{label:o.label},...!!o.description&&{description:o.description},..."children"in o&&Array.isArray(o.children)&&{children:moe({fields:o.children,layout:vn}).fields}}});return{layout:t,fields:r}}var W2=moe;var sr=s(C(),1);function JEe({title:e}){return(0,sr.jsx)(it,{direction:"column",className:"dataforms-layouts-regular__header",gap:"lg",children:(0,sr.jsx)(it,{direction:"row",align:"center",children:(0,sr.jsx)(Q0.__experimentalHeading,{level:2,size:13,children:e})})})}function poe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{fields:a}=(0,Y2.useContext)(Es),l=t.layout,c=(0,Y2.useMemo)(()=>({layout:vn,fields:t.children?t.children:[]}),[t]);if(t.children)return(0,sr.jsxs)(sr.Fragment,{children:[!o&&t.label&&(0,sr.jsx)(JEe,{title:t.label}),(0,sr.jsx)(yi,{data:e,form:c,onChange:r,validity:i?.children})]});let u=l.labelPosition,d=a.find(f=>f.id===t.id);return!d||!d.Edit?null:u==="side"?(0,sr.jsxs)(it,{direction:"row",className:"dataforms-layouts-regular__field",gap:"sm",children:[(0,sr.jsx)("div",{className:re("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${u}`),children:(0,sr.jsx)(Q0.BaseControl.VisualLabel,{children:d.label})}),(0,sr.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:d.readOnly===!0?(0,sr.jsx)(d.render,{item:e,field:d}):(0,sr.jsx)(d.Edit,{data:e,field:d,onChange:r,hideLabelFromVision:!0,markWhenOptional:n,validity:i},d.id)})]}):(0,sr.jsx)("div",{className:"dataforms-layouts-regular__field",children:d.readOnly===!0?(0,sr.jsx)(sr.Fragment,{children:(0,sr.jsxs)(sr.Fragment,{children:[!o&&u!=="none"&&(0,sr.jsx)(Q0.BaseControl.VisualLabel,{children:d.label}),(0,sr.jsx)(d.render,{item:e,field:d})]})}):(0,sr.jsx)(d.Edit,{data:e,field:d,onChange:r,hideLabelFromVision:u==="none"?!0:o,markWhenOptional:n,validity:i})})}var zN=s(sw(),1),Im=s(A(),1),UN=s(E(),1),ba=s(D(),1),X2=s(he(),1);var Kg=s(A(),1),Zg=s(E(),1);var boe=s(he(),1),Soe=s(D(),1);function $Ee(e,t){return re("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${e}`,{"has-error":t})}var hoe=$Ee;var q2=s(A(),1);var J0=s(C(),1);function eRe(e,t,r){return e?(0,J0.jsx)(q2.Tooltip,{text:t,placement:"top",children:(0,J0.jsxs)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:[(0,J0.jsx)(q2.Icon,{icon:Cl,size:16}),r]})}):r}var goe=eRe;function voe(e){if(!e)return;let t=Object.keys(e).filter(r=>r!=="children");for(let r of t){let o=e[r];if(o!==void 0&&o.type==="invalid")return o.message?o.message:r==="required"?"A required field is empty":"Unidentified validation error"}if(e.children)for(let r of Object.values(e.children)){let o=voe(r);if(o)return o}}var yoe=voe;var Gi=s(C(),1);function $0({data:e,field:t,fieldLabel:r,summaryFields:o,validity:n,touched:i,disabled:a,onClick:l,"aria-expanded":c}){let{labelPosition:u,editVisibility:d}=t.layout,f=yoe(n),m=i&&!!f,h=hoe(u,m),g=goe(m,f,r),v=re("dataforms-layouts-panel__field-trigger",`dataforms-layouts-panel__field-trigger--label-${u}`,{"is-disabled":a,"dataforms-layouts-panel__field-trigger--edit-always":d==="always"}),y=(0,boe.useInstanceId)($0,"dataforms-layouts-panel__field-control"),b=m?(0,Zg.sprintf)((0,Zg._x)("Edit %s (has errors)","field"),r||""):(0,Zg.sprintf)((0,Zg._x)("Edit %s","field"),r||""),_=(0,Soe.useRef)(null);return(0,Gi.jsxs)("div",{ref:_,className:v,onClick:a?void 0:()=>{let T=_.current?.ownerDocument.defaultView?.getSelection();T&&T.toString().length>0||l()},onKeyDown:a?void 0:T=>{T.target===T.currentTarget&&(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),l())},children:[u!=="none"&&(0,Gi.jsx)("span",{className:h,children:g}),u==="none"&&m&&(0,Gi.jsx)(Kg.Tooltip,{text:f,placement:"top",children:(0,Gi.jsx)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:(0,Gi.jsx)(Kg.Icon,{icon:Cl,size:16})})}),(0,Gi.jsx)("span",{id:`${y}`,className:"dataforms-layouts-panel__field-control",children:o.length>1?(0,Gi.jsx)("span",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:o.map(T=>(0,Gi.jsx)("span",{style:{width:"100%"},children:(0,Gi.jsx)(T.render,{item:e,field:T})},T.id))}):o.map(T=>(0,Gi.jsx)(T.render,{item:e,field:T},T.id))}),!a&&(0,Gi.jsx)(Kg.Button,{className:"dataforms-layouts-panel__field-trigger-icon",label:b,showTooltip:!1,icon:Mv,size:"small","aria-expanded":c,"aria-haspopup":"dialog","aria-describedby":`${y}`})]})}var _oe=s(sw(),1),jN=s(yI(),1),dl=s(D(),1),Hn=s(E(),1);function woe(e){return e?Object.values(e).every(t=>Object.entries(t).every(([r,o])=>r==="children"&&o&&typeof o=="object"?woe(o):o.type!=="invalid"&&o.type!=="validating")):!0}function tRe(e,t){let r=W2(e);if(r.fields.length===0)return[];let o=new Map;t.forEach(a=>{o.set(a.id,a)});function n(a){if("children"in a&&Array.isArray(a.children)){let u=a.children.map(n).filter(f=>f!==null);if(u.length===0)return null;let d=o.get(a.id);if(d){let[f]=X0([d]);return{id:a.id,children:u,field:f}}return{id:a.id,children:u}}let l=o.get(a.id);if(!l)return null;let[c]=X0([l]);return{id:a.id,children:[],field:c}}return r.fields.map(n).filter(a=>a!==null)}function Xg(e,t,r){if(e||(e={}),r.length===0)return e;let o={...e},n=o;for(let a=0;a<r.length-1;a++){let l=r[a];n[l]||(n[l]={}),n[l]={...n[l]},n=n[l]}let i=r[r.length-1];return n[i]={...n[i]||{},...t},o}function xoe(e,t,r){if(!e||t.length===0)return e;let o={...e},n=o;for(let l=0;l<t.length-1;l++){let c=t[l];if(!n[c])return e;n[c]={...n[c]},n=n[c]}let i=t[t.length-1];if(!n[i])return e;let a={...n[i]};if(delete a[r],Object.keys(a).length===0?delete n[i]:n[i]=a,Object.keys(o).length!==0)return o}function rRe(e,t,r){let{elementsCounterRef:o,setFormValidity:n,path:i,item:a}=r,l=(o.current[t.id]||0)+1;o.current[t.id]=l,e.then(c=>{if(l===o.current[t.id]){if(!Array.isArray(c)){n(u=>Xg(u,{elements:{type:"invalid",message:(0,Hn.__)("Could not validate elements.")}},[...i,t.id]));return}t.field?.isValid.elements&&!t.field.isValid.elements.validate(a,{...t.field,elements:c})?n(u=>Xg(u,{elements:{type:"invalid",message:(0,Hn.__)("Value must be one of the elements.")}},[...i,t.id])):n(u=>xoe(u,[...i,t.id],"elements"))}}).catch(c=>{if(l!==o.current[t.id])return;let u;c instanceof Error?u=c.message:u=String(c)||(0,Hn.__)("Unknown error when running elements validation asynchronously."),n(d=>Xg(d,{elements:{type:"invalid",message:u}},[...i,t.id]))})}function oRe(e,t,r){let{customCounterRef:o,setFormValidity:n,path:i}=r,a=(o.current[t.id]||0)+1;o.current[t.id]=a,e.then(l=>{if(a===o.current[t.id]){if(l===null){n(c=>xoe(c,[...i,t.id],"custom"));return}if(typeof l=="string"){n(c=>Xg(c,{custom:{type:"invalid",message:l}},[...i,t.id]));return}n(c=>Xg(c,{custom:{type:"invalid",message:(0,Hn.__)("Validation could not be processed.")}},[...i,t.id]))}}).catch(l=>{if(a!==o.current[t.id])return;let c;l instanceof Error?c=l.message:c=String(l)||(0,Hn.__)("Unknown error when running custom validation asynchronously."),n(u=>Xg(u,{custom:{type:"invalid",message:c}},[...i,t.id]))})}function Coe(e,t,r){if(t.field?.isValid.required&&!t.field.isValid.required.validate(e,t.field))return{required:{type:"invalid"}};if(t.field?.isValid.pattern&&!t.field.isValid.pattern.validate(e,t.field))return{pattern:{type:"invalid",message:(0,Hn.__)("Value does not match the required pattern.")}};if(t.field?.isValid.min&&!t.field.isValid.min.validate(e,t.field))return{min:{type:"invalid",message:(0,Hn.__)("Value is below the minimum.")}};if(t.field?.isValid.max&&!t.field.isValid.max.validate(e,t.field))return{max:{type:"invalid",message:(0,Hn.__)("Value is above the maximum.")}};if(t.field?.isValid.minLength&&!t.field.isValid.minLength.validate(e,t.field))return{minLength:{type:"invalid",message:(0,Hn.__)("Value is too short.")}};if(t.field?.isValid.maxLength&&!t.field.isValid.maxLength.validate(e,t.field))return{maxLength:{type:"invalid",message:(0,Hn.__)("Value is too long.")}};if(t.field?.isValid.elements&&t.field.hasElements&&!t.field.getElements&&Array.isArray(t.field.elements)&&!t.field.isValid.elements.validate(e,t.field))return{elements:{type:"invalid",message:(0,Hn.__)("Value must be one of the elements.")}};let o;if(t.field&&t.field.isValid.custom)try{let i=t.field.getValue({item:e});o=t.field.isValid.custom((0,_oe.default)(e,t.field.setValue({item:e,value:i})),t.field)}catch(i){let a;return i instanceof Error?a=i.message:a=String(i)||(0,Hn.__)("Unknown error when running custom validation."),{custom:{type:"invalid",message:a}}}if(typeof o=="string")return{custom:{type:"invalid",message:o}};let n={};if(t.field&&t.field.isValid.elements&&t.field.hasElements&&typeof t.field.getElements=="function"&&(rRe(t.field.getElements(),t,r),n.elements={type:"validating",message:(0,Hn.__)("Validating\u2026")}),o instanceof Promise&&(oRe(o,t,r),n.custom={type:"validating",message:(0,Hn.__)("Validating\u2026")}),Object.keys(n).length>0)return n;if(t.children.length>0){let i={};t.children.forEach(l=>{i[l.id]=Coe(e,l,{...r,path:[...r.path,t.id,"children"]})});let a={};return Object.entries(i).forEach(([l,c])=>{c!==void 0&&(a[l]=c)}),Object.keys(a).length===0?void 0:{children:a}}}function Toe(e,t){let r=e?.field?.getValue({item:t});if(e.children.length===0)return r;let o=e.children.map(n=>Toe(n,t));return o?{value:r,children:o}:r}function nRe(e,t,r){let[o,n]=(0,dl.useState)(),i=(0,dl.useRef)({}),a=(0,dl.useRef)({}),l=(0,dl.useRef)({}),c=(0,dl.useCallback)(()=>{let u={customCounterRef:i,elementsCounterRef:a,setFormValidity:n,path:[],item:e},d=tRe(r,t);if(d.length===0){n(void 0);return}let f={},m=[];d.forEach(h=>{let g=Toe(h,e);if(l.current.hasOwnProperty(h.id)&&(0,jN.default)(l.current[h.id],g)){m.push(h.id);return}l.current[h.id]=g;let v=Coe(e,h,u);v!==void 0&&(f[h.id]=v)}),n(h=>{let g={...h,...f},v=[...m,...Object.keys(f)];return Object.keys(g).forEach(b=>{g&&!v.includes(b)&&delete g[b]}),Object.keys(g).length===0&&(g=void 0),(0,jN.default)(h,g)?h:g})},[e,t,r]);return(0,dl.useEffect)(()=>{c()},[c]),{validity:o,isValid:woe(o)}}var Poe=nRe;var koe=s(D(),1);function Ed(e,t){(0,koe.useEffect)(()=>{t&&e.current&&e.current.querySelectorAll("input, textarea, select").forEach(o=>{o.reportValidity()})},[t,e])}var Eoe=s(D(),1);function iRe(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.id):[]}var Z2=(e,t)=>Array.isArray(e)&&e.length>0?iRe(e).map(o=>t.find(n=>n.id===o)).filter(o=>o!==void 0):[];var sRe=(e,t)=>{let r=t.find(o=>o.id===e.id);return r||t.find(o=>{if(e.children){let n=e.children.filter(i=>!i.children);return n.length===0?!1:o.id===n[0].id}return o.id===e.id})};function aRe(e){let{fields:t}=(0,Eoe.useContext)(Es),r=e.layout,o=Z2(r.summary,t),n=sRe(e,t),i=e.children?e.label:n?.label;return o.length===0?{summaryFields:n?[n]:[],fieldDefinition:n,fieldLabel:i}:{summaryFields:o,fieldDefinition:n,fieldLabel:i}}var K2=aRe;var Gn=s(C(),1);function lRe({data:e,field:t,onChange:r,fieldLabel:o,onClose:n,touched:i}){let{fields:a}=(0,ba.useContext)(Es),[l,c]=(0,ba.useState)({}),u=(0,ba.useMemo)(()=>(0,zN.default)(e,l,{arrayMerge:(_,S)=>S}),[e,l]),d=(0,ba.useMemo)(()=>({layout:vn,fields:t.children?t.children:[{id:t.id,layout:vn}]}),[t]),f=a.map(_=>({..._,Edit:_.Edit===null?void 0:_.Edit,isValid:{required:_.isValid.required?.constraint,elements:_.isValid.elements?.constraint,min:_.isValid.min?.constraint,max:_.isValid.max?.constraint,pattern:_.isValid.pattern?.constraint,minLength:_.isValid.minLength?.constraint,maxLength:_.isValid.maxLength?.constraint}})),{validity:m}=Poe(u,f,d),h=()=>{r(l),n()},g=_=>{c(S=>(0,zN.default)(S,_,{arrayMerge:(x,T)=>T}))},v=(0,X2.useFocusOnMount)("firstInputElement"),y=(0,ba.useRef)(null),b=(0,X2.useMergeRefs)([v,y]);return Ed(y,i),(0,Gn.jsxs)(Im.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:n,isFullScreen:!1,title:o,size:"medium",children:[(0,Gn.jsx)("div",{ref:b,children:(0,Gn.jsx)(yi,{data:u,form:d,onChange:g,validity:m,children:(_,S,x,T)=>(0,Gn.jsx)(_,{data:u,field:S,onChange:g,hideLabelFromVision:d.fields.length<2,markWhenOptional:T,validity:x},S.id)})}),(0,Gn.jsxs)(it,{direction:"row",className:"dataforms-layouts-panel__modal-footer",gap:"md",children:[(0,Gn.jsx)(Im.__experimentalSpacer,{style:{flex:1}}),(0,Gn.jsx)(Im.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:(0,UN.__)("Cancel")}),(0,Gn.jsx)(Im.Button,{variant:"primary",onClick:h,__next40pxDefaultSize:!0,children:(0,UN.__)("Apply")})]})]})}function cRe({data:e,field:t,onChange:r,validity:o}){let[n,i]=(0,ba.useState)(!1),[a,l]=(0,ba.useState)(!1),{fieldDefinition:c,fieldLabel:u,summaryFields:d}=K2(t);if(!c)return null;let f=()=>{l(!1),i(!0)};return(0,Gn.jsxs)(Gn.Fragment,{children:[(0,Gn.jsx)($0,{data:e,field:t,fieldLabel:u,summaryFields:d,validity:o,touched:n,disabled:c.readOnly===!0,onClick:()=>l(!0),"aria-expanded":a}),a&&(0,Gn.jsx)(lRe,{data:e,field:t,onChange:r,fieldLabel:u??"",onClose:f,touched:n})]})}var Roe=cRe;var Rd=s(A(),1),Aoe=s(E(),1),jc=s(D(),1);var Ooe=s(he(),1);var yn=s(C(),1);function uRe({title:e,onClose:t}){return(0,yn.jsx)(it,{direction:"column",className:"dataforms-layouts-panel__dropdown-header",gap:"lg",children:(0,yn.jsxs)(it,{direction:"row",gap:"sm",align:"center",children:[e&&(0,yn.jsx)(Rd.__experimentalHeading,{level:2,size:13,children:e}),(0,yn.jsx)(Rd.__experimentalSpacer,{style:{flex:1}}),t&&(0,yn.jsx)(Rd.Button,{label:(0,Aoe.__)("Close"),icon:Kn,onClick:t,size:"small"})]})})}function dRe({touched:e,children:t}){let r=(0,jc.useRef)(null);return Ed(r,e),(0,yn.jsx)("div",{ref:r,children:t})}function fRe({data:e,field:t,onChange:r,validity:o}){let[n,i]=(0,jc.useState)(!1),[a,l]=(0,jc.useState)(null),c=(0,jc.useMemo)(()=>({anchor:a,placement:"left-start",offset:36,shift:!0}),[a]),[u,d]=(0,Ooe.__experimentalUseDialog)({focusOnMount:"firstInputElement"}),f=(0,jc.useMemo)(()=>({layout:vn,fields:t.children?t.children:[{id:t.id,layout:vn}]}),[t]),m=(0,jc.useMemo)(()=>{if(o!==void 0)return t.children?o?.children:{[t.id]:o}},[o,t]),{fieldDefinition:h,fieldLabel:g,summaryFields:v}=K2(t);return h?(0,yn.jsx)("div",{ref:l,className:"dataforms-layouts-panel__field-dropdown-anchor",children:(0,yn.jsx)(Rd.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:c,focusOnMount:!1,onToggle:y=>{y||i(!0)},renderToggle:({isOpen:y,onToggle:b})=>(0,yn.jsx)($0,{data:e,field:t,fieldLabel:g,summaryFields:v,validity:o,touched:n,disabled:h.readOnly===!0,onClick:b,"aria-expanded":y}),renderContent:({onClose:y})=>(0,yn.jsx)(dRe,{touched:n,children:(0,yn.jsxs)("div",{ref:u,...d,children:[(0,yn.jsx)(uRe,{title:g,onClose:y}),(0,yn.jsx)(yi,{data:e,form:f,onChange:r,validity:m,children:(b,_,S,x)=>(0,yn.jsx)(b,{data:e,field:_,onChange:r,hideLabelFromVision:(f?.fields??[]).length<2,markWhenOptional:x,validity:S},_.id)})]})})})}):null}var Ioe=fRe;var HN=s(C(),1);function Noe({data:e,field:t,onChange:r,validity:o}){return t.layout.openAs==="modal"?(0,HN.jsx)(Roe,{data:e,field:t,onChange:r,validity:o}):(0,HN.jsx)(Ioe,{data:e,field:t,onChange:r,validity:o})}var Ad=s(A(),1),Boe=s(he(),1),bi=s(D(),1),GN=s(E(),1);var Q2=s(E(),1),Foe=s(C(),1);function Doe(e){if(!e)return 0;let t=0,r=Object.keys(e).filter(o=>o!=="children");for(let o of r)e[o]?.type==="invalid"&&t++;if(e.children)for(let o of Object.values(e.children))t+=Doe(o);return t}function J2({validity:e}){let t=Doe(e);return t===0?null:(0,Foe.jsx)(n6,{intent:"high",children:(0,Q2.sprintf)((0,Q2._n)("%d field needs attention","%d fields need attention",t),t)})}var Go=s(C(),1);function mRe(e,t,r){if(!t||Array.isArray(t)&&t.length===0)return!1;let n=(Array.isArray(t)?t:[t]).find(i=>typeof i=="string"?i===e.id:typeof i=="object"&&"id"in i?i.id===e.id:!1);return n?typeof n=="string"?!0:typeof n=="object"&&"visibility"in n?n.visibility==="always"||n.visibility==="when-collapsed"&&!r:!0:!1}function WN({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{fields:a}=(0,bi.useContext)(Es),l=t.layout,c=(0,bi.useRef)(null),u=(0,Boe.useInstanceId)(WN,"dataforms-layouts-card-card-body"),d=(0,bi.useMemo)(()=>({layout:vn,fields:t.children??[]}),[t]),{isOpened:f,isCollapsible:m}=l,[h,g]=(0,bi.useState)(f),[v,y]=(0,bi.useState)(!1);(0,bi.useEffect)(()=>{g(f)},[f]);let b=(0,bi.useCallback)(()=>{g(k=>(k&&y(!0),!k))},[]),_=m?h:!0,S=(0,bi.useCallback)(()=>{y(!0)},[y]);Ed(c,_&&v);let T=Z2(l.summary,a).filter(k=>mRe(k,l.summary,_)),R=v&&l.isCollapsible?(0,Go.jsx)(J2,{validity:i}):null,F={blockStart:"medium",blockEnd:"medium",inlineStart:"medium",inlineEnd:"medium"},B=t.label,z,L;if(t.children)z=!!B&&l.withHeader,L=(0,Go.jsxs)(Go.Fragment,{children:[t.description&&(0,Go.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,Go.jsx)(yi,{data:e,form:d,onChange:r,validity:i?.children})]});else{let k=a.find(U=>U.id===t.id);if(!k||!k.Edit)return null;let I=Nm("regular")?.component;if(!I)return null;B=k.label,z=!!B&&l.withHeader,L=(0,Go.jsx)(I,{data:e,field:t,onChange:r,hideLabelFromVision:o||z,markWhenOptional:n,validity:i})}let M={blockStart:z?"none":"medium",blockEnd:"medium",inlineStart:"medium",inlineEnd:"medium"};return(0,Go.jsxs)(Ad.Card,{className:"dataforms-layouts-card__field",size:F,children:[z&&(0,Go.jsxs)(Ad.CardHeader,{className:"dataforms-layouts-card__field-header",onClick:m?b:void 0,style:{cursor:m?"pointer":void 0},isBorderless:!0,children:[(0,Go.jsxs)("div",{style:{height:m?void 0:"40px",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,Go.jsx)("span",{className:"dataforms-layouts-card__field-header-label",children:B}),R,T.length>0&&l.withHeader&&(0,Go.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:T.map(k=>(0,Go.jsx)(k.render,{item:e,field:k},k.id))})]}),m&&(0,Go.jsx)(Ad.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:_?Tv:Cv,"aria-expanded":_,"aria-controls":u,"aria-label":_?(0,GN.__)("Collapse"):(0,GN.__)("Expand")})]}),(_||!z)&&(0,Go.jsx)(Ad.CardBody,{id:u,size:M,className:"dataforms-layouts-card__field-control",ref:c,onBlur:S,children:L})]})}var Moe=s(A(),1);var Io=s(C(),1);function pRe({title:e}){return(0,Io.jsx)(it,{direction:"column",className:"dataforms-layouts-row__header",gap:"lg",children:(0,Io.jsx)(it,{direction:"row",align:"center",children:(0,Io.jsx)(Moe.__experimentalHeading,{level:2,size:13,children:e})})})}var hRe=({children:e})=>(0,Io.jsx)(Io.Fragment,{children:e});function Loe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let a=t.layout;if(t.children){let c={layout:vn,fields:t.children};return(0,Io.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!o&&t.label&&(0,Io.jsx)(pRe,{title:t.label}),(0,Io.jsx)(it,{direction:"row",align:a.alignment,gap:"lg",children:(0,Io.jsx)(yi,{data:e,form:c,onChange:r,validity:i?.children,as:hRe,children:(u,d,f)=>(0,Io.jsx)("div",{className:"dataforms-layouts-row__field-control",style:a.styles[d.id],children:(0,Io.jsx)(u,{data:e,field:d,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:f})},d.id)})})]})}let l=Nm("regular")?.component;return l?(0,Io.jsx)(Io.Fragment,{children:(0,Io.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,Io.jsx)(l,{data:e,field:t,onChange:r,markWhenOptional:n,validity:i})})}):null}var Si=s(D(),1),Voe=s(E(),1);var zc=s(C(),1);function joe({data:e,field:t,onChange:r,validity:o}){let{fields:n}=(0,Si.useContext)(Es),i=(0,Si.useRef)(null),a=(0,Si.useRef)(null),[l,c]=(0,Si.useState)(!1),[u,d]=(0,Si.useState)(!1),f=(0,Si.useMemo)(()=>({layout:vn,fields:t.children??[]}),[t]);(0,Si.useEffect)(()=>{let y=i.current;if(!y)return;let b=()=>{let _=y.open;_||c(!0),d(_)};return y.addEventListener("toggle",b),()=>{y.removeEventListener("toggle",b)}},[]),Ed(a,u&&l);let m=(0,Si.useCallback)(()=>{c(!0)},[]);if(!t.children)return null;let h=t.layout.summary??"",g=h?n.find(y=>y.id===h):void 0,v;return g&&g.render?v=(0,zc.jsx)(g.render,{item:e,field:g}):v=t.label||(0,Voe.__)("More details"),(0,zc.jsxs)("details",{ref:i,className:"dataforms-layouts-details__details",children:[(0,zc.jsx)("summary",{className:"dataforms-layouts-details__summary",children:(0,zc.jsxs)(it,{direction:"row",align:"center",gap:"md",className:"dataforms-layouts-details__summary-content",children:[v,l&&(0,zc.jsx)(J2,{validity:o})]})}),(0,zc.jsx)("div",{ref:a,className:"dataforms-layouts-details__content",onBlur:m,children:(0,zc.jsx)(yi,{data:e,form:f,onChange:r,validity:o?.children})})]})}var Fm=s(C(),1),gRe=[{type:"regular",component:poe,wrapper:({children:e})=>(0,Fm.jsx)(it,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e})},{type:"panel",component:Noe,wrapper:({children:e})=>(0,Fm.jsx)(it,{direction:"column",className:"dataforms-layouts__wrapper",gap:"md",children:e})},{type:"card",component:WN,wrapper:({children:e})=>(0,Fm.jsx)(it,{direction:"column",className:"dataforms-layouts__wrapper",gap:"xl",children:e})},{type:"row",component:Loe,wrapper:({children:e,layout:t})=>(0,Fm.jsx)(it,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:(0,Fm.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,Fm.jsx)(it,{direction:"row",gap:"lg",align:t.alignment,children:e})})})},{type:"details",component:joe}];function Nm(e){return gRe.find(t=>t.type===e)}var $2=s(C(),1),vRe=({children:e})=>(0,$2.jsx)(it,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e});function yi({data:e,form:t,onChange:r,validity:o,children:n,as:i}){let{fields:a}=(0,eE.useContext)(Es),l=(0,eE.useMemo)(()=>{let d=a.filter(m=>!!m.isValid?.required).length,f=a.length-d;return d>f},[a]);function c(d){return a.find(f=>f.id===d.id)}let u=i??Nm(t.layout.type)?.wrapper??vRe;return(0,$2.jsx)(u,{layout:t.layout,children:t.fields.map(d=>{let f=Nm(d.layout.type)?.component;if(!f)return null;let m=d.children?void 0:c(d);return m&&m.isVisible&&!m.isVisible(e)?null:n?n(f,d,o?.[d.id],l):(0,$2.jsx)(f,{data:e,field:d,onChange:r,markWhenOptional:l,validity:o?.[d.id]},d.id)})})}var qN=s(C(),1);function ZN({data:e,form:t,fields:r,onChange:o,validity:n}){let i=(0,YN.useMemo)(()=>W2(t),[t]),a=(0,YN.useMemo)(()=>X0(r),[r]);return t.fields?(0,qN.jsx)(doe,{fields:a,children:(0,qN.jsx)(yi,{data:e,form:i,onChange:o,validity:n})}):null}var tE=s(A(),1);var Dm=s(C(),1);function KN({form:e,header:t}){let{media:r,fields:o,onChange:n}=i2();if(!r||!n)return(0,Dm.jsx)("div",{className:"media-editor-form media-editor-form--loading",children:(0,Dm.jsx)(tE.Spinner,{})});let i={layout:{type:"panel"},fields:o.map(l=>["title","alt_text","caption","description"].includes(l.id)?{id:l.id,layout:{type:"regular",labelPosition:"top"}}:l.id)};return(0,Dm.jsx)("div",{className:"media-editor-form",children:(0,Dm.jsxs)(tE.__experimentalVStack,{spacing:4,children:[t,(0,Dm.jsx)(ZN,{data:r,fields:o,form:e||i,onChange:n})]})})}var zoe=s(O(),1);var XN=s(C(),1);function QN(e){let{media:t}=(0,zoe.useSelect)(r=>({media:r(w).getCurrentPost()}),[]);return(0,XN.jsx)(Y0,{value:t,children:(0,XN.jsx)(SN,{...e})})}var dE=s(O(),1),sne=s(D(),1),ane=s(W(),1);var Uoe=s(D(),1),rE=s(O(),1);function yRe({postType:e}){let{registerPostTypeSchema:t}=N((0,rE.useDispatch)(w));(0,Uoe.useEffect)(()=>{t(e)},[t,e]);let{fields:r}=(0,rE.useSelect)(o=>{let{getEntityFields:n}=N(o(w));return{fields:n("postType",e)}},[e]);return r}var oE=yRe;var _i=s(A(),1);var ene=s(W(),1),tne=s(O(),1),rne=s(D(),1),Gc=s(E(),1),one=s(xh(),1);var cE=s(O(),1),t1=s(D(),1),Qoe=s(E(),1),tv=s(A(),1);var Joe=s(W(),1);var e1=s(O(),1),aE=s(D(),1),Koe=s(W(),1);var Rs=s(E(),1),Hoe=s(D(),1),Uc=s(A(),1),Jg=s(O(),1),iE=s(W(),1),Goe=s(ct(),1);var nE=s(ft(),1);function Qg(e){return typeof e.title=="string"?(0,nE.decodeEntities)(e.title):e.title&&"rendered"in e.title?(0,nE.decodeEntities)(e.title.rendered):e.title&&"raw"in e.title?(0,nE.decodeEntities)(e.title.raw):""}var Od=s(C(),1),bRe=({items:e,closeModal:t})=>{let[r]=e,o=Qg(r),{showOnFront:n,currentHomePage:i,isSaving:a}=(0,Jg.useSelect)(g=>{let{getEntityRecord:v,isSavingEntityRecord:y}=g(iE.store),b=v("root","site"),_=v("postType","page",b?.page_on_front);return{showOnFront:b?.show_on_front,currentHomePage:_,isSaving:y("root","site")}}),{saveEntityRecord:l}=(0,Jg.useDispatch)(iE.store),{createSuccessNotice:c,createErrorNotice:u}=(0,Jg.useDispatch)(Goe.store);async function d(g){g.preventDefault();try{await l("root","site",{page_on_front:r.id,show_on_front:"page"}),c((0,Rs.__)("Homepage updated."),{type:"snackbar"})}catch(v){let y=v.message&&v.code!=="unknown_error"?v.message:(0,Rs.__)("An error occurred while setting the homepage.");u(y,{type:"snackbar"})}finally{t?.()}}let f="";n==="posts"?f=(0,Rs.__)("This will replace the current homepage which is set to display latest posts."):i&&(f=(0,Rs.sprintf)((0,Rs.__)('This will replace the current homepage: "%s"'),Qg(i)));let m=(0,Rs.sprintf)((0,Rs.__)('Set "%1$s" as the site homepage? %2$s'),o,f).trim(),h=(0,Rs.__)("Set homepage");return(0,Od.jsx)("form",{onSubmit:d,children:(0,Od.jsxs)(Uc.__experimentalVStack,{spacing:"5",children:[(0,Od.jsx)(Uc.__experimentalText,{children:m}),(0,Od.jsxs)(Uc.__experimentalHStack,{justify:"right",children:[(0,Od.jsx)(Uc.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},disabled:a,accessibleWhenDisabled:!0,children:(0,Rs.__)("Cancel")}),(0,Od.jsx)(Uc.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:a,accessibleWhenDisabled:!0,children:h})]})]})})},Woe=()=>{let{pageOnFront:e,pageForPosts:t}=(0,Jg.useSelect)(r=>{let{getEntityRecord:o,canUser:n}=r(iE.store),i=n("read",{kind:"root",name:"site"})?o("root","site"):void 0;return{pageOnFront:i?.page_on_front,pageForPosts:i?.page_for_posts}});return(0,Hoe.useMemo)(()=>({id:"set-as-homepage",label:(0,Rs.__)("Set as homepage"),isEligible(r){return!(r.status!=="publish"||r.type!=="page"||e===r.id||t===r.id)},modalFocusOnMount:"firstContentElement",RenderModal:bRe}),[t,e])};var As=s(E(),1),Yoe=s(D(),1),Hc=s(A(),1),$g=s(O(),1),sE=s(W(),1),qoe=s(ct(),1);var Id=s(C(),1),SRe=({items:e,closeModal:t})=>{let[r]=e,o=Qg(r),{currentPostsPage:n,isPageForPostsSet:i,isSaving:a}=(0,$g.useSelect)(g=>{let{getEntityRecord:v,isSavingEntityRecord:y}=g(sE.store),b=v("root","site");return{currentPostsPage:v("postType","page",b?.page_for_posts),isPageForPostsSet:b?.page_for_posts!==0,isSaving:y("root","site")}}),{saveEntityRecord:l}=(0,$g.useDispatch)(sE.store),{createSuccessNotice:c,createErrorNotice:u}=(0,$g.useDispatch)(qoe.store);async function d(g){g.preventDefault();try{await l("root","site",{page_for_posts:r.id,show_on_front:"page"}),c((0,As.__)("Posts page updated."),{type:"snackbar"})}catch(v){let y=v.message&&v.code!=="unknown_error"?v.message:(0,As.__)("An error occurred while setting the posts page.");u(y,{type:"snackbar"})}finally{t?.()}}let f=i&&n?(0,As.sprintf)((0,As.__)('This will replace the current posts page: "%s"'),Qg(n)):(0,As.__)("This page will show the latest posts."),m=(0,As.sprintf)((0,As.__)('Set "%1$s" as the posts page? %2$s'),o,f),h=(0,As.__)("Set posts page");return(0,Id.jsx)("form",{onSubmit:d,children:(0,Id.jsxs)(Hc.__experimentalVStack,{spacing:"5",children:[(0,Id.jsx)(Hc.__experimentalText,{children:m}),(0,Id.jsxs)(Hc.__experimentalHStack,{justify:"right",children:[(0,Id.jsx)(Hc.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},disabled:a,accessibleWhenDisabled:!0,children:(0,As.__)("Cancel")}),(0,Id.jsx)(Hc.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:a,accessibleWhenDisabled:!0,children:h})]})]})})},Zoe=()=>{let{pageOnFront:e,pageForPosts:t}=(0,$g.useSelect)(r=>{let{getEntityRecord:o,canUser:n}=r(sE.store),i=n("read",{kind:"root",name:"site"})?o("root","site"):void 0;return{pageOnFront:i?.page_on_front,pageForPosts:i?.page_for_posts}});return(0,Yoe.useMemo)(()=>({id:"set-as-posts-page",label:(0,As.__)("Set as posts page"),isEligible(r){return!(r.status!=="publish"||r.type!=="page"||e===r.id||t===r.id)},modalFocusOnMount:"firstContentElement",RenderModal:SRe}),[t,e])};var Xoe=s(C(),1);function lE({postType:e,onActionPerformed:t,context:r}){let{defaultActions:o}=(0,e1.useSelect)(c=>{let{getEntityActions:u}=N(c(w));return{defaultActions:u("postType",e)}},[e]),n=(0,e1.useSelect)(c=>{if(e!=="page")return!1;let{getDefaultTemplateId:u,getEntityRecord:d,canUser:f}=c(Koe.store);if(!f("update",{kind:"root",name:"site"}))return!1;let h=u({slug:"front-page"});if(!h)return!0;let g=d("postType","wp_template",h);return g?g.slug!=="front-page":!0},[e]),i=Woe(),a=Zoe(),{registerPostTypeSchema:l}=N((0,e1.useDispatch)(w));return(0,aE.useEffect)(()=>{l(e)},[l,e]),(0,aE.useMemo)(()=>{let c=[...o];if(n&&c.push(i,a),c=c.sort((u,d)=>d.id==="move-to-trash"?-1:0),c=c.filter(u=>u.context?u.context===r:!0),t)for(let u=0;u<c.length;++u){if(c[u].callback){let d=c[u].callback;c[u]={...c[u],callback:(f,m)=>{d(f,{...m,onActionPerformed:h=>{m?.onActionPerformed&&m.onActionPerformed(h),t(c[u].id,h)}})}}}if(c[u].RenderModal){let d=c[u].RenderModal;c[u]={...c[u],RenderModal:f=>(0,Xoe.jsx)(d,{...f,onActionPerformed:m=>{f.onActionPerformed&&f.onActionPerformed(m),t(c[u].id,m)}})}}}return c},[r,o,t,i,a,n])}var Wo=s(C(),1),{Menu:ev,kebabCase:_Re}=N(tv.privateApis);function $oe({postType:e,postId:t,onActionPerformed:r}){let[o,n]=(0,t1.useState)(null),{item:i,permissions:a}=(0,cE.useSelect)(d=>{let{getEditedEntityRecord:f,getEntityRecordPermissions:m}=N(d(Joe.store));return{item:f("postType",e,t),permissions:m("postType",e,t)}},[t,e]),l=(0,t1.useMemo)(()=>({...i,permissions:a}),[i,a]),c=lE({postType:e,onActionPerformed:r}),u=(0,t1.useMemo)(()=>c.filter(d=>!d.isEligible||d.isEligible(l)),[c,l]);return(0,Wo.jsxs)(Wo.Fragment,{children:[(0,Wo.jsxs)(ev,{placement:"bottom-end",children:[(0,Wo.jsx)(ev.TriggerButton,{render:(0,Wo.jsx)(tv.Button,{size:"small",icon:Nr,label:(0,Qoe.__)("Actions"),disabled:!u.length,accessibleWhenDisabled:!0,className:"editor-all-actions-button"})}),(0,Wo.jsx)(ev.Popover,{children:(0,Wo.jsx)(CRe,{actions:u,items:[l],setActiveModalAction:n})})]}),!!o&&(0,Wo.jsx)(xRe,{action:o,items:[l],closeModal:()=>n(null)})]})}function wRe({action:e,onClick:t,items:r}){let o=typeof e.label=="string"?e.label:e.label(r);return(0,Wo.jsx)(ev.Item,{onClick:t,children:(0,Wo.jsx)(ev.ItemLabel,{children:o})})}function xRe({action:e,items:t,closeModal:r}){let o=typeof e.label=="string"?e.label:e.label(t);return(0,Wo.jsx)(tv.Modal,{title:e.modalHeader||o,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:r??(()=>{}),focusOnMount:"firstContentElement",size:"medium",overlayClassName:`editor-action-modal editor-action-modal__${_Re(e.id)}`,children:(0,Wo.jsx)(e.RenderModal,{items:t,closeModal:r})})}function CRe({actions:e,items:t,setActiveModalAction:r}){let o=(0,cE.useRegistry)();return(0,Wo.jsx)(ev.Group,{children:e.map(n=>(0,Wo.jsx)(wRe,{action:n,onClick:()=>{if("RenderModal"in n){r(n);return}n.callback(t,{registry:o})},items:t},n.id))})}var Wn=s(C(),1),{Badge:TRe}=N(_i.privateApis);function rv({postType:e,postId:t,hideActions:r=!1,onActionPerformed:o,onClose:n}){let i=(0,rne.useMemo)(()=>Array.isArray(t)?t:[t],[t]),{postTitle:a,icon:l,labels:c,isRevision:u}=(0,tne.useSelect)(m=>{let{getEditedEntityRecord:h,getCurrentTheme:g,getPostType:v}=m(ene.store),{getPostIcon:y,getCurrentPostType:b,isRevisionsMode:_,getCurrentRevision:S}=N(m(w)),x="";if(_()){let R=b(),F=S();return x=F?.title?.rendered||F?.title?.raw||"",{postTitle:x,icon:y(R,{area:F?.area}),labels:v(R)?.labels,isRevision:!0}}let T=h("postType",e,i[0]);if(i.length===1){let{default_template_types:R=[]}=g()??{};x=([xt,Ur].includes(e)?Zi({template:T,templateTypes:R}):{})?.title||T?.title}return{postTitle:x,icon:y(e,{area:T?.area}),labels:v(e)?.labels}},[i,e]),d=Qx(t),f=(0,Gc.__)("No title");return c?.name&&i.length>1?f=(0,Gc.sprintf)((0,Gc.__)("%1$d %2$s"),i.length,c?.name):a&&(f=(0,one.__unstableStripHTML)(a)),(0,Wn.jsxs)(_i.__experimentalVStack,{spacing:1,className:"editor-post-card-panel",children:[(0,Wn.jsxs)(_i.__experimentalHStack,{spacing:2,className:"editor-post-card-panel__header",alignment:"flex-start",children:[(0,Wn.jsx)(_i.Icon,{className:"editor-post-card-panel__icon",icon:l}),(0,Wn.jsxs)(_i.__experimentalText,{numberOfLines:2,truncate:!0,className:"editor-post-card-panel__title",as:"h2",children:[(0,Wn.jsx)("span",{className:"editor-post-card-panel__title-name",children:f}),d&&i.length===1&&(0,Wn.jsx)(TRe,{children:d})]}),!r&&i.length===1&&(0,Wn.jsx)(Wn.Fragment,{children:u?(0,Wn.jsx)(_i.Button,{size:"small",icon:Nr,label:(0,Gc.__)("Actions"),disabled:!0,accessibleWhenDisabled:!0,className:"editor-all-actions-button"}):(0,Wn.jsx)($oe,{postType:e,postId:i[0],onActionPerformed:o})}),n&&(0,Wn.jsx)(_i.Button,{size:"small",icon:RR,label:(0,Gc.__)("Close"),onClick:n})]}),i.length>1&&(0,Wn.jsx)(_i.__experimentalText,{className:"editor-post-card-panel__description",children:(0,Gc.sprintf)((0,Gc.__)("Changes will be applied to all selected %s."),c?.name.toLowerCase())})]})}var nne=s(A(),1),ine=s(C(),1);function PRe({className:e,children:t}){return(0,ine.jsx)(nne.__experimentalVStack,{className:re("editor-post-panel__section",e),children:t})}var uE=PRe;var r1=s(C(),1);function JN({onActionPerformed:e}){let{media:t,postType:r,postId:o}=(0,dE.useSelect)(c=>{let u=c(w).getCurrentPostType(),d=c(w).getCurrentPostId();return{media:c(ane.store).getEditedEntityRecord("postType",u,d,{_embed:"author,wp:attached-to"}),postType:u,postId:d}},[]),{editPost:n}=(0,dE.useDispatch)(w),i=oE({postType:"attachment"}),a=(0,sne.useMemo)(()=>({fields:i}),[i]);return(0,r1.jsx)(uE,{className:"editor-media-metadata-panel",children:(0,r1.jsx)(Y0,{value:t,settings:a,onChange:c=>{n(c)},children:(0,r1.jsx)(KN,{header:(0,r1.jsx)(rv,{postType:r,postId:o,onActionPerformed:e})})})})}var Ot=s(C(),1),lne={header:(0,Nd.__)("Editor top bar"),body:(0,Nd.__)("Editor content"),sidebar:(0,Nd.__)("Editor settings"),actions:(0,Nd.__)("Editor publish"),footer:(0,Nd.__)("Editor footer")},cne=()=>(0,Ot.jsx)(mne.InlineNotices,{pinnedNoticesClassName:"editor-notices__pinned",dismissibleNoticesClassName:"editor-notices__dismissible",children:(0,Ot.jsx)(CC,{})});function pne({className:e,children:t,forceIsDirty:r,contentRef:o,disableIframe:n,autoFocus:i,customSaveButton:a,customSavePanel:l,forceDisableBlockTools:c,iframeProps:u}){let{mode:d,postId:f,postType:m,isAttachment:h,isInserterOpened:g,isListViewOpened:v,isDistractionFree:y,isPreviewMode:b,showBlockBreadcrumbs:_,postTypeLabel:S,stylesPath:x,showStylebook:T,isRevisionsMode:R,showDiff:F}=(0,fE.useSelect)(Z=>{let{get:V}=Z(une.store),{getEditorSettings:j,getPostTypeLabel:H,getCurrentPostType:X,getCurrentPostId:ae}=Z(w),{getStylesPath:ne,getShowStylebook:ue,isRevisionsMode:Ye,isShowingRevisionDiff:ye}=N(Z(w)),oe=j(),ge=Z(w).getEditorMode();return!oe.richEditingEnabled&&ge==="visual"&&(ge="text"),!oe.codeEditingEnabled&&ge==="text"&&(ge="visual"),{mode:ge,postId:ae(),postType:X(),isInserterOpened:Z(w).isInserterOpened(),isListViewOpened:Z(w).isListViewOpened(),isDistractionFree:V("core","distractionFree"),isPreviewMode:oe.isPreviewMode,showBlockBreadcrumbs:V("core","showBlockBreadcrumbs"),postTypeLabel:H(),stylesPath:ne(),showStylebook:ue(),isAttachment:X()==="attachment"&&window?.__experimentalMediaEditor,isRevisionsMode:Ye(),showDiff:ye()}},[]),{setShowRevisionDiff:B}=N((0,fE.useDispatch)(w));Jee(f,m);let z=(0,dne.useViewportMatch)("medium"),L=v?(0,Nd.__)("Document Overview"):(0,Nd.__)("Block Library"),M=!!h,k=!h&&(T||x?.startsWith("/revisions")),I=!M&&!k,[U,G]=(0,pE.useState)(!1),Y=(0,pE.useCallback)(Z=>{typeof U=="function"&&U(Z),G(!1)},[U]);return R?(0,Ot.jsx)(ib,{className:re("editor-editor-interface",e),labels:lne,header:(0,Ot.jsx)(iN,{showDiff:F,onToggleDiff:()=>B(!F)}),content:(0,Ot.jsx)(pN,{}),sidebar:(0,Ot.jsx)(ql.Slot,{scope:"core"})}):(0,Ot.jsx)(ib,{isDistractionFree:y,className:re("editor-editor-interface",e,{"is-entity-save-view-open":!!U,"is-distraction-free":y&&!b}),labels:{...lne,secondarySidebar:L},header:!b&&(0,Ot.jsx)(tee,{forceIsDirty:r,setEntitiesSavedStatesCallback:G,customSaveButton:a,forceDisableBlockTools:c}),editorNotices:(0,Ot.jsx)(cne,{}),secondarySidebar:!h&&!b&&d==="visual"&&(g&&(0,Ot.jsx)(iee,{})||v&&(0,Ot.jsx)(cee,{})),sidebar:!b&&!y&&(0,Ot.jsx)(ql.Slot,{scope:"core"}),content:(0,Ot.jsxs)(Ot.Fragment,{children:[!y&&!b&&(0,Ot.jsx)(cne,{}),M&&(0,Ot.jsx)(QN,{...u}),k&&(0,Ot.jsx)(CW,{}),I&&(0,Ot.jsxs)(Ot.Fragment,{children:[!b&&d==="text"&&(0,Ot.jsx)(ote,{autoFocus:i}),!b&&!z&&d==="visual"&&(0,Ot.jsx)(mE.BlockToolbar,{hideDragHandle:!0}),(b||d==="visual")&&(0,Ot.jsx)(Kk,{contentRef:o,disableIframe:n,autoFocus:i,iframeProps:u}),t,(0,Ot.jsx)(Ek,{postId:f,postType:m})]})]}),footer:!b&&!y&&z&&_&&d==="visual"&&(0,Ot.jsx)(mE.BlockBreadcrumb,{rootLabelText:S?(0,fne.decodeEntities)(S):void 0}),actions:b?void 0:l||(0,Ot.jsx)(ete,{closeEntitiesSavedStates:Y,isEntitiesSavedStatesOpen:U,setEntitiesSavedStatesCallback:G,forceIsDirtyPublishPanel:r})})}var AE=s($(),1),l1=s(O(),1),hl=s(D(),1),cv=s(E(),1);var jie=s(Oi(),1),zie=s(A(),1);var hne=s(O(),1),gne=s(Ls(),1);var vne=s(C(),1),{OverridesPanel:kRe}=N(gne.privateApis);function yne(){return(0,hne.useSelect)(t=>t(w).getCurrentPostType()==="wp_block",[])?(0,vne.jsx)(kRe,{}):null}var Bm=s(A(),1),Kne=s(O(),1),Xne=s(E(),1),Qne=s(Ir(),1);var bne=s(A(),1),Sne=s(O(),1),Os=s(E(),1),_ne=s(k0(),1),wne=s(D(),1),$N=s(W(),1);var eF=s(C(),1),ERe=189;function xne(){let{postContent:e}=(0,Sne.useSelect)(a=>{let{getEditedPostAttribute:l,getCurrentPostType:c,getCurrentPostId:u}=a(w),{getCurrentRevision:d,isRevisionsMode:f}=N(a(w));if(f())return{postContent:d()?.content?.raw};let{canUser:m}=a($N.store),{getEntityRecord:h}=a($N.store),g=m("read",{kind:"root",name:"site"})?h("root","site"):void 0,v=c();return{postContent:!(+u()===g?.page_for_posts)&&![xt,Ur].includes(v)&&l("content")}},[]),t=(0,Os._x)("words","Word count type. Do not translate!"),r=(0,wne.useMemo)(()=>e?(0,_ne.count)(e,t):0,[e,t]);if(!r)return null;let o=Math.round(r/ERe),n=(0,Os.sprintf)((0,Os._n)("%s word","%s words",r),r.toLocaleString()),i=o<=1?(0,Os.__)("1 minute"):(0,Os.sprintf)((0,Os._n)("%s minute","%s minutes",o),o.toLocaleString());return(0,eF.jsx)("div",{className:"editor-post-content-information",children:(0,eF.jsx)(bne.__experimentalText,{children:(0,Os.sprintf)((0,Os.__)("%1$s, %2$s read time."),n,i)})})}var hE=s(A(),1),ov=s(E(),1),Cne=s(O(),1),gE=s(D(),1),Tne=s($(),1);var Wc=s(C(),1);function RRe(){let{postFormat:e}=(0,Cne.useSelect)(i=>{let{getEditedPostAttribute:a}=i(w);return{postFormat:a("format")??"standard"}},[]),t=i0.find(i=>i.id===e),[r,o]=(0,gE.useState)(null),n=(0,gE.useMemo)(()=>({anchor:r,placement:"left-start",offset:36,shift:!0}),[r]);return(0,Wc.jsx)(Kh,{children:(0,Wc.jsx)(ht,{label:(0,ov.__)("Format"),ref:o,children:(0,Wc.jsx)(hE.Dropdown,{popoverProps:n,contentClassName:"editor-post-format__dialog",focusOnMount:!0,renderToggle:({isOpen:i,onToggle:a})=>(0,Wc.jsx)(hE.Button,{size:"compact",variant:"tertiary","aria-expanded":i,"aria-label":(0,ov.sprintf)((0,ov.__)("Change format: %s"),t?.caption),onClick:a,children:t?.caption}),renderContent:({onClose:i})=>(0,Wc.jsxs)("div",{className:"editor-post-format__dialog-content",children:[(0,Wc.jsx)(Tne.__experimentalInspectorPopoverHeader,{title:(0,ov.__)("Format"),onClose:i}),(0,Wc.jsx)(s0,{})]})})})})}var Pne=RRe;var kne=s(A(),1),Ene=s(O(),1),vE=s(E(),1),Rne=s(po(),1);var tF=s(C(),1);function Ane(){let e=(0,Ene.useSelect)(t=>t(w).getEditedPostAttribute("modified"),[]);return e?(0,tF.jsx)("div",{className:"editor-post-last-edited-panel",children:(0,tF.jsx)(kne.__experimentalText,{children:(0,vE.sprintf)((0,vE.__)("Last edited %s."),(0,Rne.humanTimeDiff)(e))})}):null}var One=s(A(),1),Ine=s(O(),1),yE=s(E(),1),Nne=s(po(),1);var rF=s(C(),1);function Fne(){let e=(0,Ine.useSelect)(t=>{let{getCurrentRevision:r}=N(t(w));return r()?.date},[]);return e?(0,rF.jsx)("div",{className:"editor-post-last-edited-panel",children:(0,rF.jsx)(One.__experimentalText,{children:(0,yE.sprintf)((0,yE.__)("Created %s."),(0,Nne.humanTimeDiff)(e))})}):null}var Yc=s(E(),1),Dne=s(he(),1),bE=s(O(),1),oF=s(W(),1),Bne=s(ft(),1),nv=s(A(),1),SE=s(D(),1),Mne=s($(),1);var fl=s(C(),1),ARe={};function Lne(){let{editEntityRecord:e}=(0,bE.useDispatch)(oF.store),{postsPageTitle:t,postsPageId:r,isTemplate:o,postSlug:n}=(0,bE.useSelect)(d=>{let{getEntityRecord:f,getEditedEntityRecord:m,canUser:h}=d(oF.store),g=h("read",{kind:"root",name:"site"})?f("root","site"):void 0,v=g?.page_for_posts?m("postType","page",g?.page_for_posts):ARe,{getEditedPostAttribute:y,getCurrentPostType:b}=d(w);return{postsPageId:v?.id,postsPageTitle:v?.title,isTemplate:b()===xt,postSlug:y("slug")}},[]),[i,a]=(0,SE.useState)(null),l=(0,SE.useMemo)(()=>({anchor:i,placement:"left-start",offset:36,shift:!0}),[i]);if(!o||!["home","index"].includes(n)||!r)return null;let c=d=>{e("postType","page",r,{title:d})},u=(0,Bne.decodeEntities)(t);return(0,fl.jsx)(ht,{label:(0,Yc.__)("Blog title"),ref:a,children:(0,fl.jsx)(nv.Dropdown,{popoverProps:l,contentClassName:"editor-blog-title-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:d,onToggle:f})=>(0,fl.jsx)(nv.Button,{size:"compact",variant:"tertiary","aria-expanded":d,"aria-label":(0,Yc.sprintf)((0,Yc.__)("Change blog title: %s"),u),onClick:f,children:u}),renderContent:({onClose:d})=>(0,fl.jsxs)(fl.Fragment,{children:[(0,fl.jsx)(Mne.__experimentalInspectorPopoverHeader,{title:(0,Yc.__)("Blog title"),onClose:d}),(0,fl.jsx)(nv.__experimentalInputControl,{placeholder:(0,Yc.__)("No title"),size:"__unstable-large",value:t,onChange:(0,Dne.debounce)(c,300),label:(0,Yc.__)("Blog title"),help:(0,Yc.__)("Set the Posts Page title. Appears in search results, and when the page is shared on social media."),hideLabelFromVision:!0})]})})})}var iv=s(E(),1),_E=s(O(),1),nF=s(W(),1),sv=s(A(),1),wE=s(D(),1),Vne=s($(),1);var ml=s(C(),1);function jne(){let{editEntityRecord:e}=(0,_E.useDispatch)(nF.store),{postsPerPage:t,isTemplate:r,postSlug:o}=(0,_E.useSelect)(c=>{let{getEditedPostAttribute:u,getCurrentPostType:d}=c(w),{getEditedEntityRecord:f,canUser:m}=c(nF.store),h=m("read",{kind:"root",name:"site"})?f("root","site"):void 0;return{isTemplate:d()===xt,postSlug:u("slug"),postsPerPage:h?.posts_per_page||1}},[]),[n,i]=(0,wE.useState)(null),a=(0,wE.useMemo)(()=>({anchor:n,placement:"left-start",offset:36,shift:!0}),[n]);if(!r||!["home","index"].includes(o))return null;let l=c=>{e("root","site",void 0,{posts_per_page:c})};return(0,ml.jsx)(ht,{label:(0,iv.__)("Posts per page"),ref:i,children:(0,ml.jsx)(sv.Dropdown,{popoverProps:a,contentClassName:"editor-posts-per-page-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:c,onToggle:u})=>(0,ml.jsx)(sv.Button,{size:"compact",variant:"tertiary","aria-expanded":c,"aria-label":(0,iv.__)("Change posts per page"),onClick:u,children:t}),renderContent:({onClose:c})=>(0,ml.jsxs)(ml.Fragment,{children:[(0,ml.jsx)(Vne.__experimentalInspectorPopoverHeader,{title:(0,iv.__)("Posts per page"),onClose:c}),(0,ml.jsx)(sv.__experimentalNumberControl,{placeholder:0,value:t,size:"__unstable-large",spinControls:"custom",step:"1",min:"1",onChange:l,label:(0,iv.__)("Posts per page"),help:(0,iv.__)("Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting."),hideLabelFromVision:!0})]})})})}var wi=s(E(),1),xE=s(O(),1),iF=s(W(),1),pl=s(A(),1),CE=s(D(),1),zne=s($(),1);var Is=s(C(),1),ORe=[{label:(0,wi._x)("Open",'Adjective: e.g. "Comments are open"'),value:"open",description:(0,wi.__)("Visitors can add new comments and replies.")},{label:(0,wi.__)("Closed"),value:"",description:[(0,wi.__)("Visitors cannot add new comments or replies."),(0,wi.__)("Existing comments remain visible.")].join(" ")}];function Une(){let{editEntityRecord:e}=(0,xE.useDispatch)(iF.store),{allowCommentsOnNewPosts:t,isTemplate:r,postSlug:o}=(0,xE.useSelect)(c=>{let{getEditedPostAttribute:u,getCurrentPostType:d}=c(w),{getEditedEntityRecord:f,canUser:m}=c(iF.store),h=m("read",{kind:"root",name:"site"})?f("root","site"):void 0;return{isTemplate:d()===xt,postSlug:u("slug"),allowCommentsOnNewPosts:h?.default_comment_status||""}},[]),[n,i]=(0,CE.useState)(null),a=(0,CE.useMemo)(()=>({anchor:n,placement:"left-start",offset:36,shift:!0}),[n]);if(!r||!["home","index"].includes(o))return null;let l=c=>{e("root","site",void 0,{default_comment_status:c?"open":null})};return(0,Is.jsx)(ht,{label:(0,wi.__)("Discussion"),ref:i,children:(0,Is.jsx)(pl.Dropdown,{popoverProps:a,contentClassName:"editor-site-discussion-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:c,onToggle:u})=>(0,Is.jsx)(pl.Button,{size:"compact",variant:"tertiary","aria-expanded":c,"aria-label":(0,wi.__)("Change discussion settings"),onClick:u,children:t?(0,wi.__)("Comments open"):(0,wi.__)("Comments closed")}),renderContent:({onClose:c})=>(0,Is.jsxs)(Is.Fragment,{children:[(0,Is.jsx)(zne.__experimentalInspectorPopoverHeader,{title:(0,wi.__)("Discussion"),onClose:c}),(0,Is.jsxs)(pl.__experimentalVStack,{spacing:3,children:[(0,Is.jsx)(pl.__experimentalText,{children:(0,wi.__)("Changes will apply to new posts only. Individual posts may override these settings.")}),(0,Is.jsx)(pl.RadioControl,{className:"editor-site-discussion__options",hideLabelFromVision:!0,label:(0,wi.__)("Comment status"),options:ORe,onChange:l,selected:t})]})]})})})}var Hne=s(O(),1),Gne=s(W(),1),Wne=s(ft(),1),Yne=s(E(),1);var qne=s(C(),1);function Zne(){let e=(0,Hne.useSelect)(t=>{let{getCurrentRevision:r}=N(t(w)),o=r();return o?.author?t(Gne.store).getUser(o.author)?.name:null},[]);return e?(0,qne.jsx)(ht,{label:(0,Yne.__)("Author"),children:(0,Wne.decodeEntities)(e)}):null}var nt=s(C(),1),IRe="post-status";function Jne({onActionPerformed:e}){let{isRemovedPostStatusPanel:t,postType:r,postId:o,revisionId:n}=(0,Kne.useSelect)(l=>{let{isEditorPanelRemoved:c,getCurrentPostType:u,getCurrentPostId:d,getCurrentRevisionId:f}=N(l(w));return{isRemovedPostStatusPanel:c(IRe),postType:u(),postId:d(),revisionId:f()}},[]),i=!!n,a=!t&&!i;return(0,nt.jsx)(uE,{className:"editor-post-summary",children:(0,nt.jsx)(ZC.Slot,{children:l=>(0,nt.jsx)(nt.Fragment,{children:(0,nt.jsxs)(Bm.__experimentalVStack,{spacing:4,children:[(0,nt.jsx)(rv,{postType:r,postId:o,onActionPerformed:e}),!i&&(0,nt.jsx)(kT,{withPanelBody:!1}),!i&&(0,nt.jsx)(TZ,{}),(0,nt.jsxs)(Bm.__experimentalVStack,{spacing:1,children:[(0,nt.jsx)(xne,{}),i?(0,nt.jsx)(Fne,{}):(0,nt.jsx)(Ane,{})]}),i&&n&&(0,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsx)(Bm.ExternalLink,{href:(0,Qne.addQueryArgs)("revision.php",{revision:n}),children:(0,Xne.__)("Open classic revisions screen")}),(0,nt.jsx)(Zne,{})]}),a&&(0,nt.jsxs)(Bm.__experimentalVStack,{spacing:4,children:[(0,nt.jsxs)(Bm.__experimentalVStack,{spacing:1,children:[(0,nt.jsx)(y4,{}),(0,nt.jsx)(yP,{}),(0,nt.jsx)(ZP,{}),(0,nt.jsx)(aT,{}),(0,nt.jsx)(eT,{}),(0,nt.jsx)(vT,{}),(0,nt.jsx)(UZ,{}),(0,nt.jsx)(DC,{}),(0,nt.jsx)(_P,{}),(0,nt.jsx)(Lne,{}),(0,nt.jsx)(jne,{}),(0,nt.jsx)(Une,{}),(0,nt.jsx)(Pne,{}),l]}),(0,nt.jsx)(zP,{onActionPerformed:e})]})]})})})})}var tie=s(BI(),1),rie=s(O(),1),oie=s(D(),1),nie=s(E(),1);var $ne=s(A(),1);var Mm=s(C(),1);function TE({title:e,entries:t,initialOpen:r}){if(!t)return null;let o=Object.entries(t).map(([n,i])=>(0,Mm.jsx)(ht,{label:n,children:(0,Mm.jsx)("span",{className:"editor-revision-fields-diff__value",children:i.map((a,l)=>a.added?(0,Mm.jsx)("ins",{className:"editor-revision-fields-diff__added",children:a.value},l):a.removed?(0,Mm.jsx)("del",{className:"editor-revision-fields-diff__removed",children:a.value},l):(0,Mm.jsx)("span",{children:a.value},l))})},n));return(0,Mm.jsx)($ne.PanelBody,{title:e,initialOpen:r,children:o})}var iie=s(C(),1);function eie(e){return e==null?"":typeof e=="object"?JSON.stringify(e,null,2):String(e)}function sie(){let{revision:e,previousRevision:t}=(0,rie.useSelect)(o=>{let{getCurrentRevision:n,getPreviousRevision:i}=N(o(w));return{revision:n(),previousRevision:i()}},[]),r=(0,oie.useMemo)(()=>{if(!e)return null;let o=e.meta??{},n=t?.meta??{},i=new Set([...Object.keys(o),...Object.keys(n)]),a={};for(let l of i){let c=eie(o[l]),u=eie(n[l]);!c&&!u||(a[l]=(0,tie.diffWords)(u,c))}return Object.keys(a).length===0?null:a},[e,t]);return(0,iie.jsx)(TE,{title:(0,nie.__)("Meta"),entries:r,initialOpen:!1})}var n1=s(O(),1),aF=s(W(),1),mie=s(A(),1),lF=s(E(),1),pie=s($(),1),hie=s(Xe(),1);var aie=s(O(),1),lie=s(D(),1),sF=s(W(),1),cie=s(Xe(),1),uie=s(Ls(),1);var{EXCLUDED_PATTERN_SOURCES:NRe,PATTERN_TYPES:FRe}=N(uie.privateApis);function die(e,t){return e.innerBlocks=e.innerBlocks.map(r=>die(r,t)),e.name==="core/template-part"&&e.attributes.theme===void 0&&(e.attributes.theme=t),e}function DRe(e,t){let r=(i,a,l)=>a===l.findIndex(c=>i.name===c.name),o=i=>t.area==="navigation-overlay"&&i.blockTypes?.includes("core/template-part/navigation-overlay")?!0:!NRe.includes(i.source),n=i=>i.templateTypes?.includes(t.slug)||i.blockTypes?.includes("core/template-part/"+t.area);return e.filter((i,a,l)=>r(i,a,l)&&o(i)&&n(i))}function BRe(e,t){return e.map(r=>({...r,keywords:r.keywords||[],type:FRe.theme,blocks:(0,cie.parse)(r.content,{__unstableSkipMigrationLogs:!0}).map(o=>die(o,t))}))}function fie({area:e,name:t,slug:r}){let{blockPatterns:o,restBlockPatterns:n,currentThemeStylesheet:i}=(0,aie.useSelect)(a=>{let{getEditorSettings:l}=a(w),c=l();return{blockPatterns:c.__experimentalAdditionalBlockPatterns??c.__experimentalBlockPatterns,restBlockPatterns:a(sF.store).getBlockPatterns(),currentThemeStylesheet:a(sF.store).getCurrentTheme().stylesheet}},[]);return(0,lie.useMemo)(()=>{let a=[...o||[],...n||[]],l=DRe(a,{area:e,name:t,slug:r});return BRe(l,i)},[e,t,r,o,n,i])}var o1=s(C(),1);function MRe({availableTemplates:e,onSelect:t}){return!e||e?.length===0?null:(0,o1.jsx)(pie.__experimentalBlockPatternsList,{label:(0,lF.__)("Templates"),blockPatterns:e,onClickPattern:t,showTitlesAsTooltip:!0})}function LRe(){let{area:e,name:t,slug:r,postType:o,postId:n}=(0,n1.useSelect)(c=>{let{getCurrentPostType:u,getCurrentPostId:d}=c(w),{getEditedEntityRecord:f}=c(aF.store),m=u(),h=d(),g=f("postType",m,h);return{area:g?.area,name:g?.name,slug:g?.slug,postType:m,postId:h}},[]),{editEntityRecord:i}=(0,n1.useDispatch)(aF.store),a=fie({area:e,name:t,slug:r}),l=async c=>{await i("postType",o,n,{blocks:c.blocks,content:(0,hie.serialize)(c.blocks)})};return a?.length?(0,o1.jsx)(mie.PanelBody,{title:(0,lF.__)("Design"),initialOpen:o===Ur,children:(0,o1.jsx)(MRe,{availableTemplates:a,onSelect:l})}):null}function gie(){let{postType:e}=(0,n1.useSelect)(t=>{let{getCurrentPostType:r}=t(w);return{postType:r()}},[]);return[Ur,xt].includes(e)?(0,o1.jsx)(LRe,{}):null}var vie=s(A(),1),i1=s(E(),1),yie=s(O(),1),bie=s(D(),1),Sie=s(ft(),1);var s1=s(C(),1),{Tabs:cF}=N(vie.privateApis),VRe=(e,t)=>{let{postTypeLabel:r,isAttachment:o,isRevisionsMode:n}=(0,yie.useSelect)(a=>{let{getPostTypeLabel:l,getCurrentPostType:c}=a(w),{isRevisionsMode:u}=N(a(w));return{postTypeLabel:l(),isAttachment:c()===ur&&window?.__experimentalMediaEditor,isRevisionsMode:u()}},[]),i;return n?i=(0,i1.__)("Revision"):r?i=(0,Sie.decodeEntities)(r):i=(0,i1._x)("Document","noun, panel"),(0,s1.jsxs)(cF.TabList,{ref:t,children:[(0,s1.jsx)(cF.Tab,{tabId:mi.document,"data-tab-id":mi.document,children:i}),!o&&(0,s1.jsx)(cF.Tab,{tabId:mi.block,"data-tab-id":mi.block,children:(0,i1.__)("Block")})]})},_ie=(0,bie.forwardRef)(VRe);var a1=s(O(),1),wie=s($(),1),xie=s(A(),1),Cie=s(E(),1);var PE=s(C(),1),{BlockQuickNavigation:jRe}=N(wie.privateApis),zRe="core/template-part";function URe({postType:e}){let t=pw(),r=(0,a1.useSelect)(n=>{let{getPostBlocksByName:i}=N(n(w));return i(xt===e?zRe:t)},[e,t]),{enableComplementaryArea:o}=(0,a1.useDispatch)(Ce);return r.length===0?null:(0,PE.jsx)(xie.PanelBody,{title:(0,Cie.__)("Content"),children:(0,PE.jsx)(jRe,{clientIds:r,onSelect:()=>{o("core","edit-post/document")}})})}function Tie(){let{postType:e,renderingMode:t}=(0,a1.useSelect)(r=>{let{getCurrentPostType:o,getRenderingMode:n}=N(r(w));return{postType:o(),renderingMode:n()}},[]);return t==="post-only"&&e!==xt?null:(0,PE.jsx)(URe,{postType:e})}var kE=s(O(),1),Pie=s(D(),1),kie=s(Xe(),1),RE=s($(),1),Eie=s(A(),1),Rie=s(E(),1);var EE=s(C(),1),{BlockQuickNavigation:HRe}=N(RE.privateApis);function GRe(){let e=(0,kE.useSelect)(o=>{let{getBlockTypes:n}=o(kie.store);return n()},[]),t=(0,Pie.useMemo)(()=>e.filter(o=>o.category==="theme").map(({name:o})=>o),[e]),r=(0,kE.useSelect)(o=>{let{getBlocksByName:n}=o(RE.store);return n(t)},[t]);return r.length===0?null:(0,EE.jsx)(Eie.PanelBody,{title:(0,Rie.__)("Content"),children:(0,EE.jsx)(HRe,{clientIds:r})})}function Aie(){return(0,kE.useSelect)(t=>{let{getCurrentPostType:r}=t(w);return r()},[])!==Ur?null:(0,EE.jsx)(GRe,{})}var Oie=s($(),1),Iie=s(O(),1),Nie=s(E(),1);var Fie=s(C(),1);function Die(){let{block:e}=(0,Iie.useSelect)(r=>{let{getSelectedBlock:o}=r(Oie.store);return{block:o()}},[]);if(!e)return null;let t=e.attributes?.__revisionDiffStatus?.changedAttributes;return(0,Fie.jsx)(TE,{title:(0,Nie.__)("Changed attributes"),entries:t,initialOpen:!0})}var av=s(O(),1),Bie=s(D(),1),Mie=s($(),1),Lie=s(lt(),1);function WRe(){let{hasBlockSelection:e}=(0,av.useSelect)(n=>({hasBlockSelection:!!n(Mie.store).getBlockSelectionStart()}),[]),{getActiveComplementaryArea:t}=(0,av.useSelect)(Ce),{enableComplementaryArea:r}=(0,av.useDispatch)(Ce),{get:o}=(0,av.useSelect)(Lie.store);(0,Bie.useEffect)(()=>{let n=t("core"),i=["edit-post/document","edit-post/block"].includes(n),a=o("core","distractionFree");!i||a||(e?r("core","edit-post/block"):r("core","edit-post/document"))},[e,t,r,o])}var Vie=WRe;var qt=s(C(),1),{Tabs:lv}=N(zie.privateApis),YRe=hl.Platform.select({web:!0,native:!1}),qRe=({tabName:e,keyboardShortcut:t,onActionPerformed:r,extraPanels:o,postType:n})=>{let i=(0,hl.useRef)(null),a=(0,hl.useContext)(lv.Context),l=n===ur,c=(0,l1.useSelect)(u=>N(u(w)).isRevisionsMode());return(0,hl.useEffect)(()=>{let u=Array.from(i.current?.querySelectorAll('[role="tab"]')||[]),d=u.find(h=>h.getAttribute("data-tab-id")===e),f=d?.ownerDocument.activeElement;u.some(h=>f&&f.id===h.id)&&d&&d.id!==f?.id&&d?.focus()},[e]),(0,qt.jsx)(nm,{identifier:e,header:(0,qt.jsx)(lv.Context.Provider,{value:a,children:(0,qt.jsx)(_ie,{ref:i})}),closeLabel:(0,cv.__)("Close Settings"),className:"editor-sidebar__panel",headerClassName:"editor-sidebar__panel-tabs",title:(0,cv._x)("Settings","panel button label"),toggleShortcut:t,icon:(0,cv.isRTL)()?zd:Ud,isActiveByDefault:YRe,children:(0,qt.jsxs)(lv.Context.Provider,{value:a,children:[(0,qt.jsx)(lv.TabPanel,{tabId:mi.document,focusable:!1,children:l?(0,qt.jsx)(JN,{onActionPerformed:r}):(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Jne,{onActionPerformed:r}),c&&(0,qt.jsx)(sie,{}),!c&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(GC.Slot,{}),(0,qt.jsx)(Tie,{}),(0,qt.jsx)(Aie,{}),(0,qt.jsx)(gie,{}),(0,qt.jsx)(CP,{}),(0,qt.jsx)(yne,{}),o]})]})}),!l&&(0,qt.jsxs)(lv.TabPanel,{tabId:mi.block,focusable:!1,children:[(0,qt.jsx)(AE.BlockInspector,{}),c&&(0,qt.jsx)(Die,{})]})]})})},ZRe=({extraPanels:e,onActionPerformed:t})=>{Vie();let{tabName:r,keyboardShortcut:o,showSummary:n,postType:i}=(0,l1.useSelect)(c=>{let u=c(jie.store).getShortcutRepresentation("core/editor/toggle-sidebar"),d=c(Ce).getActiveComplementaryArea("core"),f=[mi.block,mi.document].includes(d),m=d;f||(m=c(AE.store).getBlockSelectionStart()?mi.block:mi.document);let h=c(w).getCurrentPostType();return{tabName:m,keyboardShortcut:u,showSummary:![xt,Ur,jd].includes(h),postType:h}},[]),{enableComplementaryArea:a}=(0,l1.useDispatch)(Ce),l=(0,hl.useCallback)(c=>{c&&a("core",c)},[a]);return(0,qt.jsx)(lv,{selectedTabId:r,onSelect:l,selectOnMove:!1,children:(0,qt.jsx)(qRe,{tabName:r,keyboardShortcut:o,showSummary:n,onActionPerformed:t,extraPanels:e,postType:i})})},Uie=ZRe;var gv=s(E(),1),bl=s(O(),1),yse=s(A(),1),bse=s(D(),1),Sse=s(he(),1),_se=s(Oi(),1);var hF=s($(),1);var wse=s(lt(),1);var uv="edit-post/collab-history-sidebar",Fd="edit-post/collab-sidebar",uF=[uv,Fd];var uo=s(D(),1),ar=s(A(),1),ase=s(he(),1);var gt=s(E(),1),Zc=s(O(),1),lse=s(xh(),1),mv=s($(),1);var OE=s(A(),1),IE=s(E(),1),vl=s(po(),1),Hie=s(W(),1),Gie=s(O(),1),Wie=s($(),1);var gl=s(C(),1);function KRe({avatar:e,name:t,date:r,userId:o}){let n=!!e,i=(0,vl.getSettings)(),{currentUserAvatar:a,currentUserName:l,currentUserId:c,dateFormat:u=i.formats.date}=(0,Gie.useSelect)(v=>{let{canUser:y,getCurrentUser:b,getEntityRecord:_}=v(Hie.store),S=y("read",{kind:"root",name:"site"})?_("root","site"):void 0;if(n)return{dateFormat:S?.date_format};let{getSettings:x}=v(Wie.store),{__experimentalDiscussionSettings:T}=x(),R=T?.avatarURL,F=b();return{currentUserAvatar:F?.avatar_urls?.[48]??R,currentUserName:F?.name,currentUserId:F?.id,dateFormat:S?.date_format}},[n]),d=(0,vl.getDate)(r),f=(0,vl.dateI18n)("c",d),h=Math.floor((new Date-d)/(1e3*60*60*24))<30?(0,vl.humanTimeDiff)(d):(0,vl.dateI18n)(u,d),g=(0,vl.dateI18n)((0,IE._x)("F j, Y g:i\xA0a","Note date full date format"),r);return(0,gl.jsxs)(gl.Fragment,{children:[(0,gl.jsx)("img",{src:e||a,className:"editor-collab-sidebar-panel__user-avatar",alt:(0,IE.__)("User avatar"),width:32,height:32,style:{borderColor:ws(o??c)}}),(0,gl.jsxs)(OE.__experimentalVStack,{spacing:"0",children:[(0,gl.jsx)("span",{className:"editor-collab-sidebar-panel__user-name",children:t??l}),r&&(0,gl.jsx)(OE.Tooltip,{text:g,children:(0,gl.jsx)("time",{dateTime:f,className:"editor-collab-sidebar-panel__user-time",children:h})})]})]})}var c1=KRe;var Yie=s(x4(),1),qie=s(D(),1),Ns=s(A(),1),dF=s(E(),1),NE=s(he(),1),Zie=s(yo(),1);var yl=s(C(),1);function Kie({onSubmit:e,onCancel:t,thread:r,submitButtonText:o,labelText:n,reflowComments:i=Og}){let[a,l]=(0,qie.useState)(r?.content?.raw??""),c=(0,NE.useDebounce)(i,100),u=m=>{l(m)},d=(0,NE.useInstanceId)(Kie,"comment-input"),f=a===r?.content?.raw||!x$(a).length;return(0,yl.jsxs)(Ns.__experimentalVStack,{className:"editor-collab-sidebar-panel__comment-form",spacing:"4",as:"form",onSubmit:m=>{m.preventDefault(),e(a),l("")},children:[(0,yl.jsx)(Ns.VisuallyHidden,{as:"label",htmlFor:d,children:n??(0,dF.__)("Note")}),(0,yl.jsx)(Yie.default,{id:d,value:a??"",onChange:m=>{u(m.target.value),c()},rows:1,maxRows:20,onKeyDown:m=>{Zie.isKeyboardEvent.primary(m,"Enter")&&!f&&m.target.parentNode.requestSubmit(),m.key==="Escape"&&(m.preventDefault(),t(m))}}),(0,yl.jsxs)(Ns.__experimentalHStack,{spacing:"2",justify:"flex-end",wrap:!0,children:[(0,yl.jsx)(Ns.Button,{size:"compact",variant:"tertiary",onClick:t,children:(0,yl.jsx)(Ns.__experimentalTruncate,{children:(0,dF.__)("Cancel")})}),(0,yl.jsx)(Ns.Button,{size:"compact",accessibleWhenDisabled:!0,variant:"primary",type:"submit",disabled:f,children:(0,yl.jsx)(Ns.__experimentalTruncate,{children:o})})]})]})}var u1=Kie;var Qr=s(Jn(),1),BE=s(Jn(),1),Jie=s(s5(),1);var FE=typeof document<"u"?BE.useLayoutEffect:BE.useEffect;function DE(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,o,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(o=r;o--!==0;)if(!DE(e[o],t[o]))return!1;return!0}if(n=Object.keys(e),r=n.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(t,n[o]))return!1;for(o=r;o--!==0;){let i=n[o];if(!(i==="_owner"&&e.$$typeof)&&!DE(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function $ie(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Xie(e,t){let r=$ie(e);return Math.round(t*r)/r}function Qie(e){let t=Qr.useRef(e);return FE(()=>{t.current=e}),t}function ese(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:n,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=Qr.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=Qr.useState(o);DE(m,o)||h(o);let[g,v]=Qr.useState(null),[y,b]=Qr.useState(null),_=Qr.useCallback(Z=>{Z!==R.current&&(R.current=Z,v(Z))},[]),S=Qr.useCallback(Z=>{Z!==F.current&&(F.current=Z,b(Z))},[]),x=i||g,T=a||y,R=Qr.useRef(null),F=Qr.useRef(null),B=Qr.useRef(d),z=c!=null,L=Qie(c),M=Qie(n),k=Qr.useCallback(()=>{if(!R.current||!F.current)return;let Z={placement:t,strategy:r,middleware:m};M.current&&(Z.platform=M.current),o6(R.current,F.current,Z).then(V=>{let j={...V,isPositioned:!0};I.current&&!DE(B.current,j)&&(B.current=j,Jie.flushSync(()=>{f(j)}))})},[m,t,r,M]);FE(()=>{u===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,f(Z=>({...Z,isPositioned:!1})))},[u]);let I=Qr.useRef(!1);FE(()=>(I.current=!0,()=>{I.current=!1}),[]),FE(()=>{if(x&&(R.current=x),T&&(F.current=T),x&&T){if(L.current)return L.current(x,T,k);k()}},[x,T,k,L,z]);let U=Qr.useMemo(()=>({reference:R,floating:F,setReference:_,setFloating:S}),[_,S]),G=Qr.useMemo(()=>({reference:x,floating:T}),[x,T]),Y=Qr.useMemo(()=>{let Z={position:r,left:0,top:0};if(!G.floating)return Z;let V=Xie(G.floating,d.x),j=Xie(G.floating,d.y);return l?{...Z,transform:"translate("+V+"px, "+j+"px)",...$ie(G.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:V,top:j}},[r,l,G.floating,d.x,d.y]);return Qr.useMemo(()=>({...d,update:k,refs:U,elements:G,floatingStyles:Y}),[d,k,U,G,Y])}var qc=s(E(),1),Sa=s(D(),1),ME=s(W(),1),_a=s(O(),1),Lm=s($(),1),tse=s(ct(),1),rse=s(ft(),1);var{useBlockElement:XRe,cleanEmptyObject:QRe}=N(Lm.privateApis);function ose(e){let[t,r]=(0,Sa.useReducer)(()=>Date.now(),0),o={post:e,type:"note",status:"all",per_page:-1},{records:n}=(0,ME.useEntityRecords)("root","comment",o,{enabled:!!e&&typeof e=="number"}),{getBlockAttributes:i}=(0,_a.useSelect)(Lm.store),{clientIds:a}=(0,_a.useSelect)(u=>{let{getClientIdsWithDescendants:d}=u(Lm.store);return{clientIds:d()}},[]),{resultComments:l,unresolvedSortedThreads:c}=(0,Sa.useMemo)(()=>{if(!n||n.length===0)return{resultComments:[],unresolvedSortedThreads:[]};let u=a.reduce((x,T)=>{let R=i(T)?.metadata?.noteId;return R&&(x[T]=R),x},{}),d={},f=[],m=Object.keys(u).reduce((x,T)=>(x[u[T]]=T,x),{});if(n.forEach(x=>{let T=m[x.id];d[x.id]={...x,reply:[],blockClientId:x.parent===0?T:null}}),n.forEach(x=>{x.parent===0?f.push(d[x.id]):d[x.parent]&&d[x.parent].reply.push(d[x.id])}),f?.length===0)return{resultComments:[],unresolvedSortedThreads:[]};let h=f.map(x=>({...x,reply:[...x.reply].reverse()})),g=new Map(h.map(x=>[String(x.id),x])),v=new Set(Object.values(u).map(x=>String(x))),y=Object.values(u).map(x=>g.get(String(x))).filter(x=>x!==void 0&&x.status==="hold"),b=Object.values(u).map(x=>g.get(String(x))).filter(x=>x!==void 0&&x.status==="approved"),_=h.filter(x=>!v.has(String(x.id)));return{resultComments:[...y,...b,..._],unresolvedSortedThreads:y}},[a,n,i]);return{resultComments:l,unresolvedSortedThreads:c,reflowComments:r,commentLastUpdated:t}}function nse(e=Og){let{createNotice:t}=(0,_a.useDispatch)(tse.store),{saveEntityRecord:r,deleteEntityRecord:o}=(0,_a.useDispatch)(ME.store),{getCurrentPostId:n}=(0,_a.useSelect)(w),{getBlockAttributes:i,getSelectedBlockClientId:a}=(0,_a.useSelect)(Lm.store),{updateBlockAttributes:l}=(0,_a.useDispatch)(Lm.store),c=m=>{let h=m.message&&m.code!=="unknown_error"?(0,rse.decodeEntities)(m.message):(0,qc.__)("An error occurred while performing an update.");t("error",h,{type:"snackbar",isDismissible:!0})};return{onCreate:async({content:m,parent:h})=>{try{let g=await r("root","comment",{post:n(),content:m,status:"hold",type:"note",parent:h||0},{throwOnError:!0});if(!h&&g?.id){let v=a(),y=i(v)?.metadata;l(v,{metadata:{...y,noteId:g.id}})}return t("snackbar",h?(0,qc.__)("Reply added."):(0,qc.__)("Note added."),{type:"snackbar",isDismissible:!0}),setTimeout(e,300),g}catch(g){e(),c(g)}},onEdit:async({id:m,content:h,status:g})=>{let v=g||"updated",y={approved:(0,qc.__)("Note marked as resolved."),hold:(0,qc.__)("Note reopened."),updated:(0,qc.__)("Note updated.")};try{if(g==="approved"||g==="hold"){await r("root","comment",{id:m,status:g},{throwOnError:!0});let b={post:n(),content:h||"",type:"note",status:g,parent:m,meta:{_wp_note_status:g==="approved"?"resolved":"reopen"}};await r("root","comment",b,{throwOnError:!0})}else await r("root","comment",{id:m,content:h,status:g},{throwOnError:!0});t("snackbar",y[v]??(0,qc.__)("Note updated."),{type:"snackbar",isDismissible:!0}),e()}catch(b){e(),c(b)}},onDelete:async m=>{try{if(await o("root","comment",m.id,void 0,{throwOnError:!0}),!m.parent){let h=a(),g=i(h)?.metadata;l(h,{metadata:QRe({...g,noteId:void 0})})}t("snackbar",(0,qc.__)("Note deleted."),{type:"snackbar",isDismissible:!0}),e()}catch(h){e(),c(h)}}}}function ise(e=!1){let t=(0,_a.useRegistry)();(0,Sa.useEffect)(()=>{if(!e)return;let{getActiveComplementaryArea:r}=t.select(Ce),{disableComplementaryArea:o,enableComplementaryArea:n}=t.dispatch(Ce),i=t.subscribe(()=>{r("core")===null&&n("core",Fd)});return()=>{i(),r("core")===Fd&&o("core",Fd)}},[e,t])}function sse({thread:e,calculatedOffset:t,setHeights:r,selectedThread:o,setBlockRef:n,commentLastUpdated:i}){let a=XRe(e.blockClientId),l=(0,Sa.useCallback)((d,f)=>{r(m=>m[d]!==f?{...m,[d]:f}:m)},[r]),{y:c,refs:u}=ese({placement:"right-start",middleware:[r6({crossAxis:t||-16})],whileElementsMounted:t6});return(0,Sa.useEffect)(()=>{a&&u.setReference(a)},[a,u,i]),(0,Sa.useEffect)(()=>{u.floating?.current&&n(e.id,a)},[a,e.id,u.floating,n]),(0,Sa.useEffect)(()=>{if(u.floating?.current){let d=u.floating.current.scrollHeight;l(e.id,d)}},[e.id,l,u.floating,o,i]),{y:c,refs:u}}var LE=s(E(),1),fv=s(O(),1),VE=s(A(),1),d1=s($(),1);var dv=s(C(),1),{useBlockElement:JRe}=N(d1.privateApis);function jE({onSubmit:e,commentSidebarRef:t,reflowComments:r=Og,isFloating:o=!1,y:n,refs:i}){let{clientId:a}=(0,fv.useSelect)(m=>{let{getSelectedBlockClientId:h}=m(d1.store);return{clientId:h()}},[]),l=(0,fv.useSelect)(m=>N(m(w)).getSelectedNote(),[]),c=JRe(a),{toggleBlockSpotlight:u}=N((0,fv.useDispatch)(d1.store)),{selectNote:d}=N((0,fv.useDispatch)(w)),f=()=>{d(void 0),c?.focus(),u(a,!1)};return l!=="new"||!a?null:(0,dv.jsxs)(VE.__experimentalVStack,{className:re("editor-collab-sidebar-panel__thread is-selected",{"is-floating":o}),spacing:"3",tabIndex:0,"aria-label":(0,LE.__)("New note"),role:"treeitem",ref:o?i.setFloating:void 0,style:o?{top:n,opacity:n?void 0:0}:void 0,onBlur:m=>{m.currentTarget.contains(m.relatedTarget)||(u(a,!1),d(void 0))},children:[(0,dv.jsx)(VE.__experimentalHStack,{alignment:"left",spacing:"3",children:(0,dv.jsx)(c1,{})}),(0,dv.jsx)(u1,{onSubmit:async m=>{let{id:h}=await e({content:m});d(h),dn(h,t.current)},onCancel:f,reflowComments:r,submitButtonText:(0,LE.__)("Add note"),labelText:(0,LE.__)("New note")})]})}var et=s(C(),1),{useBlockElement:cse}=N(mv.privateApis),{Menu:f1}=N(ar.privateApis);function use({threads:e,onEditComment:t,onAddReply:r,onCommentDelete:o,commentSidebarRef:n,reflowComments:i,isFloating:a=!1,commentLastUpdated:l}){let[c,u]=(0,uo.useState)({}),[d,f]=(0,uo.useState)({}),[m,h]=(0,uo.useState)({}),{setCanvasMinHeight:g,selectNote:v}=N((0,Zc.useDispatch)(w)),{selectBlock:y,toggleBlockSpotlight:b}=N((0,Zc.useDispatch)(mv.store)),{blockCommentId:_,selectedBlockClientId:S,orderedBlockIds:x}=(0,Zc.useSelect)(I=>{let{getBlockAttributes:U,getSelectedBlockClientId:G,getClientIdsWithDescendants:Y}=I(mv.store),Z=G();return{blockCommentId:Z?U(Z)?.metadata?.noteId:null,selectedBlockClientId:Z,orderedBlockIds:Y()}},[]),{selectedNote:T,noteFocused:R}=(0,Zc.useSelect)(I=>{let{getSelectedNote:U,isNoteFocused:G}=N(I(w));return{selectedNote:U(),noteFocused:G()}},[]),F=cse(S),B=(0,uo.useMemo)(()=>{let I=[...e],U=[];if(a&&T==="new"){let G={id:"new",blockClientId:S,content:{rendered:""}};return x.forEach(Y=>{if(Y===S)U.push(G);else{let Z=I.find(V=>V.blockClientId===Y);Z&&U.push(Z)}}),U}return I},[e,a,T,S,x]),z=async I=>{let U=B.findIndex(Z=>Z.id===I.id),G=B[U+1],Y=B[U-1];if(await o(I),I.parent!==0){v(I.parent),dn(I.parent,n.current);return}G?(v(G.id),dn(G.id,n.current)):Y?(v(Y.id),dn(Y.id,n.current)):(v(void 0),b(I.blockClientId,!1),F?.focus())};(0,uo.useEffect)(()=>{v(_??void 0)},[_,v]),(0,uo.useEffect)(()=>{R&&T&&(dn(T,n.current,T==="new"?"textarea":void 0),v(T))},[R,T,v,n]),(0,uo.useEffect)(()=>{let I=()=>{let Y={};if(!a)return{offsets:Y,minHeight:0};let Z=B.findIndex(ge=>ge.id===T),V=Z===-1?0:Z,j=B[V];if(!j||!m[j.id])return{offsets:Y,minHeight:0};let H=m[j.id],X=H?.getBoundingClientRect(),ae=X?.top||0,ne=c[j.id]||0;Y[j.id]=-16;let ue={threadTop:ae-16,threadHeight:ne};for(let ge=V+1;ge<B.length;ge++){let Re=B[ge];if(!m[Re.id])continue;H=m[Re.id],X=H?.getBoundingClientRect();let ze=X?.top||0,Ve=c[Re.id]||0,tt=-16,vt=ue.threadTop+ue.threadHeight;ze<vt+16&&(tt=vt-ze+20),Y[Re.id]=tt,ue={threadTop:ze+tt,threadHeight:Ve}}let Ye={threadTop:ae-16};for(let ge=Z-1;ge>=0;ge--){let Re=B[ge];if(!m[Re.id])continue;H=m[Re.id],X=H?.getBoundingClientRect();let ze=X?.top||0,Ve=c[Re.id]||0,tt=-16;ze+Ve>Ye.threadTop&&(tt=Ye.threadTop-ze-Ve-20),Y[Re.id]=tt,Ye={threadTop:ze+tt}}let ye=0,oe=B[B.length-1];if(m[oe.id]){let ze=m[oe.id]?.getBoundingClientRect()?.top||0,Ve=c[oe.id]||0,tt=Y[oe.id]||0;ye=ze+Ve+tt+32}return{offsets:Y,minHeight:ye}},{offsets:U,minHeight:G}=I();Object.keys(U).length>0&&f(U),g(G)},[c,m,a,B,T,g]);let L=(I,U,G)=>{if(I.defaultPrevented)return;let Y=B.findIndex(Z=>Z.id===U.id);if((I.key==="Enter"||I.key==="ArrowRight")&&I.currentTarget===I.target&&!G)v(U.id),U.blockClientId&&(y(U.blockClientId,null),b(U.blockClientId,!0));else if((I.key==="Enter"||I.key==="ArrowLeft")&&I.currentTarget===I.target&&G||I.key==="Escape")v(void 0),U.blockClientId&&b(U.blockClientId,!1),dn(U.id,n.current);else if(I.key==="ArrowDown"&&Y<B.length-1&&I.currentTarget===I.target){let Z=B[Y+1];dn(Z.id,n.current)}else if(I.key==="ArrowUp"&&Y>0&&I.currentTarget===I.target){let Z=B[Y-1];dn(Z.id,n.current)}else I.key==="Home"&&I.currentTarget===I.target?dn(B[0].id,n.current):I.key==="End"&&I.currentTarget===I.target&&dn(B[B.length-1].id,n.current)},M=(0,uo.useCallback)((I,U)=>{h(G=>({...G,[I]:U}))},[]);return!(Array.isArray(B)&&B.length>0)&&!a?(0,et.jsx)(jE,{onSubmit:r,commentSidebarRef:n}):(0,et.jsxs)(et.Fragment,{children:[!a&&T==="new"&&(0,et.jsx)(jE,{onSubmit:r,commentSidebarRef:n}),B.map(I=>(0,et.jsx)($Re,{thread:I,onAddReply:r,onCommentDelete:z,onEditComment:t,isSelected:T===I.id,commentSidebarRef:n,reflowComments:i,isFloating:a,calculatedOffset:d[I.id]??0,setHeights:u,setBlockRef:M,commentLastUpdated:l,onKeyDown:U=>L(U,I,T===I.id)},I.id))]})}function $Re({thread:e,onEditComment:t,onAddReply:r,onCommentDelete:o,isSelected:n,commentSidebarRef:i,reflowComments:a,isFloating:l,calculatedOffset:c,setHeights:u,setBlockRef:d,commentLastUpdated:f,onKeyDown:m}){let{toggleBlockHighlight:h,selectBlock:g,toggleBlockSpotlight:v}=N((0,Zc.useDispatch)(mv.store)),{selectNote:y}=N((0,Zc.useDispatch)(w)),b=(0,Zc.useSelect)(V=>N(V(w)).getSelectedNote(),[]),_=cse(e.blockClientId),S=(0,ase.useDebounce)(h,50),{y:x,refs:T}=sse({thread:e,calculatedOffset:c,setHeights:u,setBlockRef:d,selectedThread:b,commentLastUpdated:f}),R=(0,uo.useRef)(!1),F=()=>{S(e.blockClientId,!0)},B=()=>{S(e.blockClientId,!1)},z=()=>{h(e.blockClientId,!0)},L=V=>{let j=V.relatedTarget?.closest(".editor-collab-sidebar-panel__thread"),H=V.relatedTarget?.closest('[role="dialog"]'),X=R.current;j&&!X||H||X&&V.currentTarget.contains(V.relatedTarget)||(h(e.blockClientId,!1),k())},M=()=>{y(e.id),v(e.blockClientId,!0),e.blockClientId&&g(e.blockClientId,null)},k=()=>{y(void 0),v(e.blockClientId,!1)},I=e?.reply||[],U=I.length>0?I[I.length-1]:void 0,G=I.length>0?I.slice(0,-1):[],Y=C$((0,lse.__unstableStripHTML)(e.content?.rendered),10),Z=e.blockClientId?(0,gt.sprintf)((0,gt.__)("Note: %s"),Y):(0,gt.sprintf)((0,gt.__)("Original block deleted. Note: %s"),Y);return l&&e.id==="new"?(0,et.jsx)(jE,{onSubmit:r,commentSidebarRef:i,reflowComments:a,isFloating:l,y:x,refs:T}):(0,et.jsxs)(ar.__experimentalVStack,{className:re("editor-collab-sidebar-panel__thread",{"is-selected":n,"is-floating":l}),id:`comment-thread-${e.id}`,spacing:"3",onClick:M,onMouseEnter:F,onMouseLeave:B,onFocus:z,onBlur:L,onKeyUp:V=>{V.key==="Tab"&&(R.current=!1)},onKeyDown:V=>{V.key==="Tab"?R.current=!0:m(V)},tabIndex:0,role:"treeitem","aria-label":Z,"aria-expanded":n,ref:l?T.setFloating:void 0,style:l?{top:x}:void 0,children:[(0,et.jsx)(ar.Button,{className:"editor-collab-sidebar-panel__skip-to-comment",variant:"secondary",size:"compact",onClick:()=>{dn(e.id,i.current,"textarea")},children:(0,gt.__)("Add new reply")}),!e.blockClientId&&(0,et.jsx)(ar.__experimentalText,{as:"p",weight:500,variant:"muted",children:(0,gt.__)("Original block deleted.")}),(0,et.jsx)(fF,{thread:e,isExpanded:n,onEdit:(V={})=>{t(V),V.status==="approved"&&(k(),l?_?.focus():dn(e.id,i.current))},onDelete:o,reflowComments:a}),n&&I.map(V=>(0,et.jsx)(fF,{thread:V,parent:e,isExpanded:n,onEdit:t,onDelete:o,reflowComments:a},V.id)),!n&&G.length>0&&(0,et.jsx)(ar.__experimentalHStack,{className:"editor-collab-sidebar-panel__more-reply-separator",children:(0,et.jsx)(ar.Button,{size:"compact",variant:"tertiary",className:"editor-collab-sidebar-panel__more-reply-button",onClick:()=>{y(e.id),dn(e.id,i.current)},children:(0,gt.sprintf)((0,gt._n)("%s more reply","%s more replies",G.length),G.length)})}),!n&&U&&(0,et.jsx)(fF,{thread:U,parent:e,isExpanded:n,onEdit:t,onDelete:o,reflowComments:a}),n&&(0,et.jsxs)(ar.__experimentalVStack,{spacing:"2",role:"treeitem",children:[(0,et.jsx)(ar.__experimentalHStack,{alignment:"left",spacing:"3",justify:"flex-start",children:(0,et.jsx)(c1,{})}),(0,et.jsx)(ar.__experimentalVStack,{spacing:"2",children:(0,et.jsx)(u1,{onSubmit:V=>{e.status==="approved"?t({id:e.id,status:"hold",content:V}):r({content:V,parent:e.id})},onCancel:V=>{V.stopPropagation(),k(),dn(e.id,i.current)},submitButtonText:e.status==="approved"?(0,gt.__)("Reopen & Reply"):(0,gt.__)("Reply"),rows:e.status==="approved"?2:4,labelText:(0,gt.sprintf)((0,gt.__)("Reply to note %1$s by %2$s"),e.id,e.author_name),reflowComments:a})})]}),!!e.blockClientId&&(0,et.jsx)(ar.Button,{className:"editor-collab-sidebar-panel__skip-to-block",variant:"secondary",size:"compact",onClick:V=>{V.stopPropagation(),_?.focus()},children:(0,gt.__)("Back to block")})]})}var fF=({thread:e,parent:t,isExpanded:r,onEdit:o,onDelete:n,reflowComments:i})=>{let[a,l]=(0,uo.useState)(!1),[c,u]=(0,uo.useState)(!1),d=(0,uo.useRef)(null),f=()=>{n(e),l(!1),u(!1)},m=()=>{l(!1),u(!1),d.current?.focus()},h=e.type==="note"&&e.meta&&(e.meta._wp_note_status==="resolved"||e.meta._wp_note_status==="reopen"),g=[{id:"edit",title:(0,gt.__)("Edit"),isEligible:({status:_})=>_!=="approved",onClick:()=>{l("edit")}},{id:"reopen",title:(0,gt._x)("Reopen","Reopen note"),isEligible:({status:_})=>_==="approved",onClick:()=>{o({id:e.id,status:"hold"})}},{id:"delete",title:(0,gt.__)("Delete"),isEligible:()=>!0,onClick:()=>{l("delete"),u(!0)}}],v=e.parent===0,y=t?.status!=="approved"?g.filter(_=>_.isEligible(e)):[],b=e.parent===0?(0,gt.__)("Are you sure you want to delete this note? This will also delete all of this note's replies."):(0,gt.__)("Are you sure you want to delete this reply?");return(0,et.jsxs)(ar.__experimentalVStack,{spacing:"2",role:e.parent!==0?"treeitem":void 0,children:[(0,et.jsxs)(ar.__experimentalHStack,{alignment:"left",spacing:"3",justify:"flex-start",children:[(0,et.jsx)(c1,{avatar:e?.author_avatar_urls?.[48],name:e?.author_name,date:e?.date,userId:e?.author}),r&&(0,et.jsx)(ar.FlexItem,{className:"editor-collab-sidebar-panel__comment-status",onClick:_=>{_.stopPropagation()},children:(0,et.jsxs)(ar.__experimentalHStack,{spacing:"0",children:[v&&(0,et.jsx)(ar.Button,{label:(0,gt._x)("Resolve","Mark note as resolved"),size:"small",icon:Hd,disabled:e.status==="approved",accessibleWhenDisabled:e.status==="approved",onClick:()=>{o({id:e.id,status:"approved"})}}),(0,et.jsxs)(f1,{placement:"bottom-end",children:[(0,et.jsx)(f1.TriggerButton,{render:(0,et.jsx)(ar.Button,{ref:d,size:"small",icon:Nr,label:(0,gt.__)("Actions"),disabled:!y.length,accessibleWhenDisabled:!0})}),(0,et.jsx)(f1.Popover,{modal:!1,children:y.map(_=>(0,et.jsx)(f1.Item,{onClick:()=>_.onClick(),children:(0,et.jsx)(f1.ItemLabel,{children:_.title})},_.id))})]})]})})]}),a==="edit"?(0,et.jsx)(u1,{onSubmit:_=>{o({id:e.id,content:_}),l(!1),d.current?.focus()},onCancel:()=>m(),thread:e,submitButtonText:(0,gt._x)("Update","verb"),labelText:(0,gt.sprintf)((0,gt.__)("Edit note %1$s by %2$s"),e.id,e.author_name),reflowComments:i}):(0,et.jsx)(uo.RawHTML,{className:re("editor-collab-sidebar-panel__user-comment",{"editor-collab-sidebar-panel__resolution-text":h}),children:h?(()=>{let _=e.meta._wp_note_status==="resolved"?(0,gt.__)("Marked as resolved"):(0,gt.__)("Reopened"),S=e?.content?.raw;return S&&typeof S=="string"&&S.trim()!==""?(0,gt.sprintf)((0,gt.__)("%1$s: %2$s"),_,S):_})():e?.content?.rendered}),a==="delete"&&(0,et.jsx)(ar.__experimentalConfirmDialog,{isOpen:c,onConfirm:f,onCancel:m,confirmButtonText:(0,gt.__)("Delete"),children:b})]})};var dse=s(A(),1),zE=s(E(),1),HE=s($(),1),mF=s(O(),1),fse=s(Xe(),1),mse=s(Oi(),1);var UE=s(C(),1),{CommentIconSlotFill:eAe}=N(HE.privateApis),tAe=({clientId:e,onClick:t,isDistractionFree:r})=>{let o=(0,mF.useSelect)(l=>l(HE.store).getBlock(e),[e]),n=(0,mF.useSelect)(l=>l(mse.store).getShortcutRepresentation("core/editor/new-note"),[]);if(!o?.isValid||o?.name===(0,fse.getUnregisteredTypeHandlerName)())return null;let i=r||o?.name==="core/freeform",a;return r?a=(0,zE.__)("Notes are disabled in distraction free mode."):o?.name==="core/freeform"&&(a=(0,zE.__)("Convert to blocks to add notes.")),(0,UE.jsx)(dse.MenuItem,{onClick:t,"aria-haspopup":"dialog",disabled:i,info:a,shortcut:n,children:(0,zE.__)("Add note")})},rAe=({onClick:e,isDistractionFree:t})=>(0,UE.jsx)(eAe.Fill,{children:({clientId:r,onClose:o})=>(0,UE.jsx)(tAe,{clientId:r,isDistractionFree:t,onClick:()=>{e(r),o()}})}),pF=rAe;var hv=s(A(),1),pv=s(E(),1),pse=s(D(),1),hse=s($(),1);var Vm=s(C(),1),{CommentIconToolbarSlotFill:oAe}=N(hse.privateApis),nAe=({onClick:e,thread:t})=>{let r=(0,pse.useMemo)(()=>{if(!t)return[];let u=new Map,d=[t,...t.reply];return d.sort((f,m)=>new Date(f.date)-new Date(m.date)),d.forEach(f=>{f.author_name&&f.author_avatar_urls&&(u.has(f.author)||u.set(f.author,{name:f.author_name,avatar:f.author_avatar_urls?.["48"]||f.author_avatar_urls?.["96"],id:f.author,date:f.date}))}),Array.from(u.values())},[t]);if(!r.length)return null;let o=3,i=r.length>o?r.slice(0,o-1):r,a=Math.max(0,r.length-i.length),c=r.length>100&&a>0?(0,pv.__)("100+"):(0,pv.sprintf)((0,pv.__)("+%s"),a);return(0,Vm.jsx)(oAe.Fill,{children:(0,Vm.jsx)(hv.ToolbarButton,{className:"comment-avatar-indicator",label:(0,pv.__)("View notes"),onClick:()=>e(),showTooltip:!0,children:(0,Vm.jsxs)(hv.__experimentalHStack,{spacing:"1",children:[i.map(u=>(0,Vm.jsx)("img",{src:u.avatar,alt:u.name,className:"comment-avatar",style:{borderColor:ws(u.id)}},u.id)),a>0&&(0,Vm.jsx)(hv.__experimentalText,{weight:500,children:c})]})})})},gse=nAe;var Yo=s(C(),1);function vse({styles:e,comments:t,commentSidebarRef:r,reflowComments:o,commentLastUpdated:n,isFloating:i=!1}){let{onCreate:a,onEdit:l,onDelete:c}=nse(o);return(0,Yo.jsx)(yse.__experimentalVStack,{className:"editor-collab-sidebar-panel",style:e,role:"tree",spacing:"3",justify:"flex-start",ref:u=>{u&&(r.current=u)},"aria-label":i?(0,gv.__)("Unresolved notes"):(0,gv.__)("All notes"),children:(0,Yo.jsx)(use,{threads:t,onEditComment:l,onAddReply:a,onCommentDelete:c,commentSidebarRef:r,reflowComments:o,commentLastUpdated:n,isFloating:i})})}function iAe({postId:e}){let{getActiveComplementaryArea:t}=(0,bl.useSelect)(Ce),{enableComplementaryArea:r}=(0,bl.useDispatch)(Ce),{toggleBlockSpotlight:o,selectBlock:n}=N((0,bl.useDispatch)(hF.store)),{selectNote:i}=N((0,bl.useDispatch)(w)),a=(0,Sse.useViewportMatch)("medium"),l=(0,bse.useRef)(null),{clientId:c,blockCommentId:u,isClassicBlock:d}=(0,bl.useSelect)(F=>{let{getBlockAttributes:B,getSelectedBlockClientId:z,getBlockName:L}=F(hF.store),M=z();return{clientId:M,blockCommentId:M?B(M)?.metadata?.noteId:null,isClassicBlock:M?L(M)==="core/freeform":!1}},[]),{isDistractionFree:f}=(0,bl.useSelect)(F=>{let{get:B}=F(wse.store);return{isDistractionFree:B("core","distractionFree")}},[]),m=(0,bl.useSelect)(F=>N(F(w)).getSelectedNote(),[]),{resultComments:h,unresolvedSortedThreads:g,reflowComments:v,commentLastUpdated:y}=ose(e),b=a,_=h.length>0||!b;ise(b&&(g.length>0||m!==void 0)),(0,_se.useShortcut)("core/editor/new-note",F=>{F.preventDefault(),R()},{isDisabled:f||d||!c||!!u});let{merged:S}=fw(),x=S?.styles?.color?.background,T=u?h.find(F=>F.id===u):null;async function R(F){let B=await t("core"),z=uF.find(I=>I===B),L=F&&F!==c?F:c,M=h.find(I=>I.blockClientId===L);M?.status==="approved"?r("core",uv):(!z||!_)&&r("core",b?Fd:uv);let k=await t("core");uF.includes(k)&&(n(L,null),o(L,!0),i(M?M.id:"new",{focus:!0}))}return f?(0,Yo.jsx)(pF,{isDistractionFree:!0}):(0,Yo.jsxs)(Yo.Fragment,{children:[!!T&&(0,Yo.jsx)(gse,{thread:T,onClick:R}),(0,Yo.jsx)(pF,{onClick:R}),_&&(0,Yo.jsx)(nm,{identifier:uv,name:uv,title:(0,gv.__)("All notes"),header:(0,Yo.jsx)("h2",{className:"interface-complementary-area-header__title",children:(0,gv.__)("All notes")}),icon:jR,closeLabel:(0,gv.__)("Close Notes"),children:(0,Yo.jsx)(vse,{comments:h,commentSidebarRef:l})}),a&&(0,Yo.jsx)(nm,{isPinnable:!1,header:!1,identifier:Fd,className:"editor-collab-sidebar",headerClassName:"editor-collab-sidebar__header",backgroundColor:x,children:(0,Yo.jsx)(vse,{comments:g,commentSidebarRef:l,reflowComments:v,commentLastUpdated:y,styles:{backgroundColor:x},isFloating:!0})})]})}function xse(){let{postId:e,editorMode:t,revisionsMode:r}=(0,bl.useSelect)(o=>{let{getCurrentPostId:n,getEditorMode:i,isRevisionsMode:a}=N(o(w));return{postId:n(),editorMode:i(),revisionsMode:a()}},[]);return!e||typeof e!="number"||t==="text"||r?null:(0,Yo.jsx)(tr,{supportKeys:"editor.notes",children:(0,Yo.jsx)(iAe,{postId:e})})}var Sl=s(A(),1),vv=s(E(),1);var g1=s(O(),1),vF=s(D(),1),Ese=s(lt(),1),ZE=s(he(),1),Rse=s(W(),1);var Kc=s(A(),1),GE=s(O(),1),m1=s(E(),1),Cse=s(lt(),1);var Tse=s(W(),1);var wa=s(C(),1);function WE({hideWelcomeGuide:e=!1,onChangePath:t}){let{user:r,setUser:o}=xo(),n=!!r&&(Object.keys(r?.styles??{}).length>0||Object.keys(r?.settings??{}).length>0),i=()=>{o({styles:{},settings:{}})},{toggle:a}=(0,GE.useDispatch)(Cse.store),{canEditCSS:l}=(0,GE.useSelect)(u=>{let{getEntityRecord:d,__experimentalGetCurrentGlobalStylesId:f}=u(Tse.store),m=f();return{canEditCSS:!!(m?d("root","globalStyles",m):void 0)?._links?.["wp:action-edit-css"]}},[]),c=()=>{t("/css")};return(0,wa.jsx)(Kc.DropdownMenu,{icon:Nr,label:(0,m1.__)("More"),toggleProps:{size:"compact"},children:({onClose:u})=>(0,wa.jsxs)(wa.Fragment,{children:[(0,wa.jsxs)(Kc.MenuGroup,{children:[l&&(0,wa.jsx)(Kc.MenuItem,{onClick:c,children:(0,m1.__)("Additional CSS")}),!e&&(0,wa.jsx)(Kc.MenuItem,{onClick:()=>{a("core/edit-site","welcomeGuideStyles"),u()},children:(0,m1.__)("Welcome Guide")})]}),(0,wa.jsx)(Kc.MenuGroup,{children:(0,wa.jsx)(Kc.MenuItem,{onClick:()=>{i(),u()},disabled:!n,children:(0,m1.__)("Reset styles")})})]})})}var jm=s(C(),1);function Pse({className:e,identifier:t,title:r,icon:o,children:n,closeLabel:i,header:a,headerClassName:l,panelClassName:c,isActiveByDefault:u}){return(0,jm.jsxs)(jm.Fragment,{children:[(0,jm.jsx)(ql,{className:e,scope:"core",identifier:t,title:r,icon:o,closeLabel:i,header:a,headerClassName:l,panelClassName:c,isActiveByDefault:u,children:n}),(0,jm.jsx)(xu,{scope:"core",identifier:t,icon:o,children:r})]})}var YE=s(O(),1),qE=s(A(),1),Fs=s(E(),1),gF=s(lt(),1);var p1=s(C(),1);function h1({nonAnimatedSrc:e,animatedSrc:t}){return(0,p1.jsxs)("picture",{className:"editor-welcome-guide__image",children:[(0,p1.jsx)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,p1.jsx)("img",{src:t,width:"312",height:"240",alt:""})]})}var Qt=s(C(),1);function kse(){let{toggle:e}=(0,YE.useDispatch)(gF.store),{isActive:t,isStylesOpen:r}=(0,YE.useSelect)(n=>{let i=n(Ce).getActiveComplementaryArea("core");return{isActive:!!n(gF.store).get("core/edit-site","welcomeGuideStyles"),isStylesOpen:i==="edit-site/global-styles"}},[]);if(!t||!r)return null;let o=(0,Fs.__)("Welcome to Styles");return(0,Qt.jsx)(qE.Guide,{className:"editor-welcome-guide guide-styles",contentLabel:o,finishButtonText:(0,Fs.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuideStyles"),pages:[{image:(0,Qt.jsx)(h1,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.svg?1",animatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.gif?1"}),content:(0,Qt.jsxs)(Qt.Fragment,{children:[(0,Qt.jsx)("h1",{className:"editor-welcome-guide__heading",children:o}),(0,Qt.jsx)("p",{className:"editor-welcome-guide__text",children:(0,Fs.__)("Tweak your site, or give it a whole new look! Get creative \u2014 how about a new color palette for your buttons, or choosing a new font? Take a look at what you can do here.")})]})},{image:(0,Qt.jsx)(h1,{nonAnimatedSrc:"https://s.w.org/images/block-editor/set-the-design.svg?1",animatedSrc:"https://s.w.org/images/block-editor/set-the-design.gif?1"}),content:(0,Qt.jsxs)(Qt.Fragment,{children:[(0,Qt.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,Fs.__)("Set the design")}),(0,Qt.jsx)("p",{className:"editor-welcome-guide__text",children:(0,Fs.__)("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!")})]})},{image:(0,Qt.jsx)(h1,{nonAnimatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.svg?1",animatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.gif?1"}),content:(0,Qt.jsxs)(Qt.Fragment,{children:[(0,Qt.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,Fs.__)("Personalize blocks")}),(0,Qt.jsx)("p",{className:"editor-welcome-guide__text",children:(0,Fs.__)("You can adjust your blocks to ensure a cohesive experience across your site \u2014 add your unique colors to a branded Button block, or adjust the Heading block to your preferred size.")})]})},{image:(0,Qt.jsx)(h1,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,Qt.jsxs)(Qt.Fragment,{children:[(0,Qt.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,Fs.__)("Learn more")}),(0,Qt.jsxs)("p",{className:"editor-welcome-guide__text",children:[(0,Fs.__)("New to block themes and styling your site?")," ",(0,Qt.jsx)(qE.ExternalLink,{href:(0,Fs.__)("https://wordpress.org/documentation/article/styles-overview/"),children:(0,Fs.__)("Here\u2019s a detailed guide to learn how to make the most of it.")})]})]})}]})}var qo=s(C(),1);function Ase(){let{shouldResetNavigation:e,stylesPath:t,showStylebook:r,showListViewByDefault:o,hasRevisions:n,activeComplementaryArea:i}=(0,g1.useSelect)(y=>{let{getActiveComplementaryArea:b}=y(Ce),{getStylesPath:_,getShowStylebook:S}=N(y(w)),x=y(w).getEditorMode()==="visual",T=y(Ese.store).get("core","showListViewByDefault"),{getEntityRecord:R,__experimentalGetCurrentGlobalStylesId:F}=y(Rse.store),B=F(),z=B?R("root","globalStyles",B):void 0;return{stylesPath:_(),showStylebook:S(),shouldResetNavigation:b("core")!=="edit-site/global-styles"||!x,showListViewByDefault:T,hasRevisions:!!z?._links?.["version-history"]?.[0]?.count,activeComplementaryArea:y(Ce).getActiveComplementaryArea("core")}},[]),{setStylesPath:a,setShowStylebook:l,resetStylesNavigation:c}=N((0,g1.useDispatch)(w)),u=(0,ZE.useViewportMatch)("medium","<"),d=t.startsWith("/revisions")&&!r,f=t.startsWith("/revisions")&&r,m=(0,ZE.usePrevious)(i);(0,vF.useEffect)(()=>{i==="edit-site/global-styles"&&m!=="edit-site/global-styles"&&c()},[i,m,c]),(0,vF.useEffect)(()=>{e&&c()},[e,c]);let{setIsListViewOpened:h}=(0,g1.useDispatch)(w),g=()=>{h(!1),a(d||f?"/":"/revisions")},v=()=>{h(r&&o),l(!r)};return(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(Pse,{className:"editor-global-styles-sidebar",identifier:"edit-site/global-styles",title:(0,vv.__)("Styles"),icon:YA,closeLabel:(0,vv.__)("Close Styles"),panelClassName:"editor-global-styles-sidebar__panel",header:(0,qo.jsxs)(Sl.Flex,{className:"editor-global-styles-sidebar__header",gap:1,children:[(0,qo.jsx)(Sl.FlexItem,{children:(0,qo.jsx)("h2",{className:"editor-global-styles-sidebar__header-title",children:(0,vv.__)("Styles")})}),(0,qo.jsxs)(Sl.Flex,{justify:"flex-end",gap:1,className:"editor-global-styles-sidebar__header-actions",children:[!u&&(0,qo.jsx)(Sl.FlexItem,{children:(0,qo.jsx)(Sl.Button,{icon:Gd,label:(0,vv.__)("Style Book"),isPressed:r,accessibleWhenDisabled:!0,disabled:e,onClick:v,size:"compact"})}),(0,qo.jsx)(Sl.FlexItem,{children:(0,qo.jsx)(Sl.Button,{label:(0,vv.__)("Revisions"),icon:xl,onClick:g,accessibleWhenDisabled:!0,disabled:!n,isPressed:d||f,size:"compact"})}),(0,qo.jsx)(WE,{onChangePath:a})]})]}),children:(0,qo.jsx)(Hx,{path:t,onPathChange:a})}),(0,qo.jsx)(kse,{})]})}var Ds=s(C(),1);function sAe({postType:e,postId:t,templateId:r,settings:o,children:n,initialEdits:i,onActionPerformed:a,extraContent:l,extraSidebarPanels:c,...u}){let{post:d,template:f,hasLoadedPost:m,error:h,isBlockTheme:g,showGlobalStyles:v}=(0,Ose.useSelect)(y=>{let{getEntityRecord:b,getResolutionError:_,hasFinishedResolution:S,getCurrentTheme:x,__experimentalGetCurrentGlobalStylesId:T,canUser:R}=y(Ise.store),{getRenderingMode:F,getCurrentPostType:B}=y(w),z=["postType",e,t],L=F(),M=B(),k=x()?.is_block_theme,I=T(),U=I?R("update",{kind:"root",name:"globalStyles",id:I}):!1;return{post:b(...z),template:r?b("postType",xt,r):void 0,hasLoadedPost:S("getEntityRecord",z),error:_("getEntityRecord",z)?.message,isBlockTheme:k,showGlobalStyles:k&&U&&(M==="wp_template"||L==="template-locked")}},[e,t,r]);return(0,Ds.jsxs)(Ds.Fragment,{children:[m&&!d&&(0,Ds.jsx)(Nse.Notice,{status:h?"error":"warning",isDismissible:!1,children:h||(0,Fse.__)("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")}),!!d&&(0,Ds.jsxs)(v6,{post:d,__unstableTemplate:f,settings:o,initialEdits:i,useSubRegistry:!1,children:[(0,Ds.jsx)(pne,{...u,children:l}),n,(0,Ds.jsx)(Uie,{onActionPerformed:a,extraPanels:c}),(0,Ds.jsx)(xse,{}),g&&(0,Ds.jsx)(oC,{}),v&&(0,Ds.jsx)(Ase,{})]})]})}var Dse=sAe;var Ne=s(E(),1),Gse=s(he(),1),zm=s(O(),1),Wse=s(D(),1),v1=s(lt(),1);var KE=s(O(),1),Bse=s(lt(),1);var Mse=s(C(),1),{PreferenceBaseOption:aAe}=N(Bse.privateApis);function Lse(e){let t=(0,KE.useSelect)(n=>n(w).isPublishSidebarEnabled(),[]),{enablePublishSidebar:r,disablePublishSidebar:o}=(0,KE.useDispatch)(w);return(0,Mse.jsx)(aAe,{isChecked:t,onChange:n=>n?r():o(),...e})}var XE=s(O(),1),Vse=s(lt(),1),QE=s(Xe(),1),jse=s(D(),1),zse=s(A(),1),bv=s(E(),1),Use=s($(),1);var yv=s(C(),1),{BlockManager:lAe}=N(Use.privateApis),cAe=[];function Hse(){let{showBlockTypes:e,hideBlockTypes:t}=N((0,XE.useDispatch)(w)),{blockTypes:r,allowedBlockTypes:o,hiddenBlockTypes:n}=(0,XE.useSelect)(m=>({blockTypes:m(QE.store).getBlockTypes(),allowedBlockTypes:m(w).getEditorSettings().allowedBlockTypes,hiddenBlockTypes:m(Vse.store).get("core","hiddenBlockTypes")??cAe}),[]),a=(0,jse.useMemo)(()=>o===!0?r:r.filter(({name:m})=>o?.includes(m)),[o,r]).filter(m=>(0,QE.hasBlockSupport)(m,"inserter",!0)&&(!m.parent||m.parent.includes("core/post-content"))),l=n.filter(m=>a.some(h=>h.name===m)),c=a.filter(m=>!l.includes(m.name)),u=a.length-c.length;function d(){f(a)}let f=m=>{if(c.length>m.length){let h=c.filter(g=>!m.find(({name:v})=>v===g.name));t(h.map(({name:g})=>g))}else if(c.length<m.length){let h=m.filter(g=>!c.find(({name:v})=>v===g.name));e(h.map(({name:g})=>g))}};return(0,yv.jsxs)("div",{className:"editor-block-visibility",children:[!!u&&(0,yv.jsxs)("div",{className:"editor-block-visibility__disabled-blocks-count",children:[(0,bv.sprintf)((0,bv._n)("%d block is hidden.","%d blocks are hidden.",u),u),(0,yv.jsx)(zse.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:d,children:(0,bv.__)("Reset")})]}),(0,yv.jsx)(lAe,{blockTypes:a,selectedBlockTypes:c,onChange:f,showSelectAll:!1})]})}var Me=s(C(),1),{PreferencesModal:uAe,PreferencesModalTabs:dAe,PreferencesModalSection:Xc,PreferenceToggleControl:xi}=N(v1.privateApis);function Yse({extraSections:e={}}){let t=(0,zm.useSelect)(o=>o(Ce).isModalActive("editor/preferences"),[]),{closeModal:r}=(0,zm.useDispatch)(Ce);return t?(0,Me.jsx)(uAe,{closeModal:r,children:(0,Me.jsx)(fAe,{extraSections:e})}):null}function fAe({extraSections:e={}}){let t=(0,Gse.useViewportMatch)("medium"),{showBlockBreadcrumbsOption:r,showCollaborationOptions:o}=(0,zm.useSelect)(c=>{let{getEditorSettings:u,isCollaborationEnabledForCurrentPost:d}=N(c(w)),{get:f}=c(v1.store),m=u().richEditingEnabled;return{showBlockBreadcrumbsOption:!f("core","distractionFree")&&t&&m,showCollaborationOptions:d()}},[t]),{setIsListViewOpened:n,setIsInserterOpened:i}=(0,zm.useDispatch)(w),{set:a}=(0,zm.useDispatch)(v1.store),l=(0,Wse.useMemo)(()=>[{name:"general",tabLabel:(0,Ne.__)("General"),content:(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsxs)(Xc,{title:(0,Ne.__)("Interface"),children:[(0,Me.jsx)(xi,{scope:"core",featureName:"showListViewByDefault",help:(0,Ne.__)("Opens the List View panel by default."),label:(0,Ne.__)("Always open List View")}),r&&(0,Me.jsx)(xi,{scope:"core",featureName:"showBlockBreadcrumbs",help:(0,Ne.__)("Display the block hierarchy trail at the bottom of the editor."),label:(0,Ne.__)("Show block breadcrumbs")}),(0,Me.jsx)(xi,{scope:"core",featureName:"allowRightClickOverrides",help:(0,Ne.__)("Allows contextual List View menus via right-click, overriding browser defaults."),label:(0,Ne.__)("Allow right-click contextual menus")}),(0,Me.jsx)(xi,{scope:"core",featureName:"enableChoosePatternModal",help:(0,Ne.__)("Pick from starter content when creating a new page."),label:(0,Ne.__)("Show starter patterns")}),o&&(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsx)(xi,{scope:"core",featureName:"showCollaborationCursor",help:(0,Ne.__)("Show your own avatar inside blocks during collaborative editing sessions."),label:(0,Ne.__)("Show avatar in blocks")}),(0,Me.jsx)(xi,{scope:"core",featureName:"showCollaborationNotifications",help:(0,Ne.__)("Show notifications when collaborators join, leave, or save the post."),label:(0,Ne.__)("Show collaboration notifications")})]})]}),(0,Me.jsxs)(Xc,{title:(0,Ne.__)("Document settings"),description:(0,Ne.__)("Select what settings are shown in the document panel."),children:[(0,Me.jsx)(zC.Slot,{}),(0,Me.jsx)(fg,{taxonomyWrapper:(c,u)=>(0,Me.jsx)($u,{label:u.labels.menu_name,panelName:`taxonomy-panel-${u.slug}`})}),(0,Me.jsx)(_c,{children:(0,Me.jsx)($u,{label:(0,Ne.__)("Featured image"),panelName:"featured-image"})}),(0,Me.jsx)(lm,{children:(0,Me.jsx)($u,{label:(0,Ne.__)("Excerpt"),panelName:"post-excerpt"})}),(0,Me.jsx)(tr,{supportKeys:["comments","trackbacks"],children:(0,Me.jsx)($u,{label:(0,Ne.__)("Discussion"),panelName:"discussion-panel"})}),(0,Me.jsx)(Nh,{children:(0,Me.jsx)($u,{label:(0,Ne.__)("Page attributes"),panelName:"page-attributes"})})]}),t&&(0,Me.jsx)(Xc,{title:(0,Ne.__)("Publishing"),children:(0,Me.jsx)(Lse,{help:(0,Ne.__)("Review settings, such as visibility and tags."),label:(0,Ne.__)("Enable pre-publish checks")})}),e?.general]})},{name:"appearance",tabLabel:(0,Ne.__)("Appearance"),content:(0,Me.jsxs)(Xc,{title:(0,Ne.__)("Appearance"),description:(0,Ne.__)("Customize the editor interface to suit your needs."),children:[(0,Me.jsx)(xi,{scope:"core",featureName:"fixedToolbar",onToggle:()=>a("core","distractionFree",!1),help:(0,Ne.__)("Access all block and document tools in a single place."),label:(0,Ne.__)("Top toolbar")}),(0,Me.jsx)(xi,{scope:"core",featureName:"distractionFree",onToggle:()=>{a("core","fixedToolbar",!0),i(!1),n(!1)},help:(0,Ne.__)("Reduce visual distractions by hiding the toolbar and other elements to focus on writing."),label:(0,Ne.__)("Distraction free")}),(0,Me.jsx)(xi,{scope:"core",featureName:"focusMode",help:(0,Ne.__)("Highlights the current block and fades other content."),label:(0,Ne.__)("Spotlight mode")}),e?.appearance]})},{name:"accessibility",tabLabel:(0,Ne.__)("Accessibility"),content:(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsx)(Xc,{title:(0,Ne.__)("Navigation"),description:(0,Ne.__)("Optimize the editing experience for enhanced control."),children:(0,Me.jsx)(xi,{scope:"core",featureName:"keepCaretInsideBlock",help:(0,Ne.__)("Keeps the text cursor within blocks while navigating with arrow keys, preventing it from moving to other blocks and enhancing accessibility for keyboard users."),label:(0,Ne.__)("Contain text cursor inside block")})}),(0,Me.jsx)(Xc,{title:(0,Ne.__)("Interface"),children:(0,Me.jsx)(xi,{scope:"core",featureName:"showIconLabels",label:(0,Ne.__)("Show button text labels"),help:(0,Ne.__)("Show text instead of icons on buttons across the interface.")})})]})},{name:"blocks",tabLabel:(0,Ne.__)("Blocks"),content:(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsx)(Xc,{title:(0,Ne.__)("Inserter"),children:(0,Me.jsx)(xi,{scope:"core",featureName:"mostUsedBlocks",help:(0,Ne.__)("Adds a category with the most frequently used blocks in the inserter."),label:(0,Ne.__)("Show most used blocks")})}),(0,Me.jsx)(Xc,{title:(0,Ne.__)("Manage block visibility"),description:(0,Ne.__)("Disable blocks that you don't want to appear in the inserter. They can always be toggled back on later."),children:(0,Me.jsx)(Hse,{})})]})},window.__clientSideMediaProcessing&&{name:"media",tabLabel:(0,Ne.__)("Media"),content:(0,Me.jsx)(Me.Fragment,{children:(0,Me.jsxs)(Xc,{title:(0,Ne.__)("General"),description:(0,Ne.__)("Customize options related to the media upload flow."),children:[(0,Me.jsx)(xi,{scope:"core/media",featureName:"optimizeOnUpload",help:(0,Ne.__)("Compress media items before uploading to the server."),label:(0,Ne.__)("Pre-upload compression")}),(0,Me.jsx)(xi,{scope:"core/media",featureName:"requireApproval",help:(0,Ne.__)("Require approval step when optimizing existing media."),label:(0,Ne.__)("Approval step")})]})})}].filter(Boolean),[r,o,e,i,n,a,t]);return(0,Me.jsx)(dAe,{sections:l})}var _1=s(Xe(),1);var y1=s($(),1),qse="content",Zse={name:"core/pattern-overrides",getValues({select:e,clientId:t,context:r,bindings:o}){let n=r["pattern/overrides"],{getBlockAttributes:i}=e(y1.store),a=i(t),l={};for(let c of Object.keys(o)){let u=n?.[a?.metadata?.name]?.[c];if(u===void 0){l[c]=a[c];continue}else l[c]=u===""?void 0:u}return l},setValues({select:e,dispatch:t,clientId:r,bindings:o}){let{getBlockAttributes:n,getBlockParentsByBlockName:i,getBlocks:a}=e(y1.store),c=n(r)?.metadata?.name;if(!c)return;let[u]=i(r,"core/block",!0),d=Object.entries(o).reduce((m,[h,{newValue:g}])=>(m[h]=g,m),{});if(!u){let m=h=>{for(let g of h)g.attributes?.metadata?.name===c&&t(y1.store).updateBlockAttributes(g.clientId,d),m(g.innerBlocks)};m(a());return}let f=n(u)?.[qse];t(y1.store).updateBlockAttributes(u,{[qse]:{...f,[c]:{...f?.[c],...Object.entries(d).reduce((m,[h,g])=>(m[h]=g===void 0?"":g,m),{})}}})},canUserEditValue:()=>!0};var JE=s(E(),1),$E=s(W(),1),b1=s($(),1),yF=["core/navigation-link","core/navigation-submenu"],Kse=[{label:(0,JE.__)("Post Date"),args:{field:"date"},type:"string"},{label:(0,JE.__)("Post Modified Date"),args:{field:"modified"},type:"string"},{label:(0,JE.__)("Post Link"),args:{field:"link"},type:"string"}],Xse={name:"core/post-data",getValues({select:e,context:t,bindings:r,clientId:o}){let{getBlockAttributes:n,getBlockName:i}=e(b1.store),a=i(o),l=yF.includes(a),c,u;if(l){let h=n(o);c=h?.id,u=h?.type}else c=t?.postId,u=t?.postType;let{getEditedEntityRecord:d}=e($E.store),f=d("postType",u,c),m={};for(let[h,g]of Object.entries(r)){let v=Kse.find(y=>y.args.field===g.args.field);v?f?m[h]=f[g.args.field]:m[h]=v.label:m[h]=g.args.field}return m},setValues({dispatch:e,context:t,bindings:r,clientId:o,select:n}){let{getBlockName:i}=n(b1.store),a=i(o);if(yF.includes(a))return!1;let l={};Object.values(r).forEach(({args:c,newValue:u})=>{l[c.field]=u}),e($E.store).editEntityRecord("postType",t?.postType,t?.postId,l)},canUserEditValue({select:e,context:t}){let{getBlockName:r,getSelectedBlockClientId:o}=e(b1.store),n=o(),i=r(n);return!(yF.includes(i)||t?.query||t?.queryId||!t?.postType||!e($E.store).canUser("update",{kind:"postType",name:t?.postType,id:t?.postId}))},getFieldsList({context:e,select:t}){return t(b1.store).getSelectedBlock()?.name!=="core/post-date"?[]:!e||!e.postId||!e.postType?[]:Kse}};var S1=s(W(),1);function bF(e,t){let{getRegisteredPostMeta:r}=N(e(S1.store)),o=r(t?.postType),n=[];return Object.entries(o).forEach(([i,a])=>{i==="footnotes"||i.charAt(0)==="_"||n.push({label:a.title||i,args:{key:i},default:a.default,type:a.type})}),n}function mAe({select:e,context:t,args:r}){let n=bF(e,t).find(l=>l.args.key===r.key);if(!n)return r.key;if(!t?.postId)return n.default||n.label||r.key;let{getEditedEntityRecord:i}=e(S1.store);return i("postType",t?.postType,t?.postId).meta?.[r.key]??n?.label??r.key}var Qse={name:"core/post-meta",getValues({select:e,context:t,bindings:r}){let o={};for(let[n,i]of Object.entries(r))o[n]=mAe({select:e,context:t,args:i.args});return o},setValues({dispatch:e,context:t,bindings:r}){let o={};Object.values(r).forEach(({args:n,newValue:i})=>{o[n.key]=i}),e(S1.store).editEntityRecord("postType",t?.postType,t?.postId,{meta:o})},canUserEditValue({select:e,context:t,args:r}){return!(t?.query||t?.queryId||!t?.postType||!bF(e,t).some(l=>l.args.key===r.key)||e(w).getEditorSettings().enableCustomFields||!e(S1.store).canUser("update",{kind:"postType",name:t?.postType,id:t?.postId}))},getFieldsList({select:e,context:t}){return bF(e,t).map(({default:o,...n})=>({...n}))}};var Dd=s(E(),1),Jse=s(W(),1),eR=s($(),1),SF=["core/navigation-link","core/navigation-submenu"],_F=[{label:(0,Dd.__)("Term ID"),args:{field:"id"},type:"string"},{label:(0,Dd.__)("Name"),args:{field:"name"},type:"string"},{label:(0,Dd.__)("Slug"),args:{field:"slug"},type:"string"},{label:(0,Dd.__)("Link"),args:{field:"link"},type:"string"},{label:(0,Dd.__)("Description"),args:{field:"description"},type:"string"},{label:(0,Dd.__)("Parent ID"),args:{field:"parent"},type:"string"},{label:(0,Dd.__)("Count"),args:{field:"count"},type:"string"}],$se={name:"core/term-data",usesContext:["taxonomy","termId","termData"],getValues({select:e,context:t,bindings:r,clientId:o}){let{getEntityRecord:n}=e(Jse.store),{getBlockAttributes:i,getBlockName:a}=e(eR.store),l=a(o),c=SF.includes(l),u;if(c){let f=i(o),m=f?.type;u=n("taxonomy",m==="tag"?"post_tag":m,f?.id)}else t.termId&&t.taxonomy&&(u=n("taxonomy",t.taxonomy,t.termId));!u&&t?.termData&&!c&&(u=t.termData);let d={};for(let[f,m]of Object.entries(r)){let h=_F.find(g=>g.args.field===m.args.field);h?!u||u[m.args.field]===void 0?d[f]=h.label:m.args.field==="count"?d[f]="("+u[m.args.field]+")":d[f]=u[m.args.field]:d[f]=m.args.field}return d},setValues({dispatch:e,context:t,bindings:r}){return!1},canUserEditValue({select:e,context:t}){let{getBlockName:r,getSelectedBlockClientId:o}=e(eR.store),n=o(),i=r(n);return SF.includes(i)||t?.termQuery||!t?.taxonomy||!t?.termId,!1},getFieldsList({context:e,select:t}){let{getBlockAttributes:r,getBlockName:o,getSelectedBlockClientId:n}=t(eR.store),i=n(),a=o(i);if(SF.includes(a)){let l=r(i);return!l||!l.id||!l.type?[]:_F}return e?e.taxonomy&&e.termId||e.termData?_F:[]:[]}};function eae(){(0,_1.registerBlockBindingsSource)(Zse),(0,_1.registerBlockBindingsSource)(Xse),(0,_1.registerBlockBindingsSource)(Qse),(0,_1.registerBlockBindingsSource)($se)}var{store:pAe,...hAe}=i6,tae={};JF(tae,{CreateTemplatePartModal:Cp,patternTitleField:iy,templateTitleField:ny,BackButton:nk,EntitiesSavedStatesExtensible:Kb,Editor:Dse,PluginPostExcerpt:r0,PostCardPanel:rv,PreferencesModal:Yse,usePostActions:lE,usePostFields:oE,ToolsMoreMenuGroup:uk,ViewMoreMenuGroup:dk,ResizableEditor:Eh,registerCoreBlockBindingsSources:eae,getTemplateInfo:Zi,GlobalStylesUIWrapper:Hx,GlobalStylesActionMenu:WE,StyleBookPreview:uW,useGlobalStyles:xo,useStyle:Hu,interfaceStore:pAe,...hAe});var w1=s(O(),1);function gAe(e,t,r){let{registerEntityAction:o}=N((0,w1.dispatch)(w))}function vAe(e,t,r){let{unregisterEntityAction:o}=N((0,w1.dispatch)(w))}function yAe(e,t,r){let{registerEntityField:o}=N((0,w1.dispatch)(w))}function bAe(e,t,r){let{unregisterEntityField:o}=N((0,w1.dispatch)(w))}var rae=s($(),1);return uae(SAe);})();
/*! Bundled license information:

autosize/dist/autosize.js:
  (*!
  	autosize 4.0.2
  	license: MIT
  	http://www.jacklmoore.com/autosize
  *)

is-plain-object/dist/is-plain-object.mjs:
  (*!
   * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
   *
   * Copyright (c) 2014-2017, Jon Schlinkert.
   * Released under the MIT License.
   *)
*/
                                                                                                                                                                                                                                                                                            dist/element.js                                                                                     0000644                 00000067672 15212564020 0007515 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).element = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // vendor-external:react
  var require_react = __commonJS({
    "vendor-external:react"(exports, module) {
      module.exports = window.React;
    }
  });

  // vendor-external:react-dom
  var require_react_dom = __commonJS({
    "vendor-external:react-dom"(exports, module) {
      module.exports = window.ReactDOM;
    }
  });

  // node_modules/react-dom/client.js
  var require_client = __commonJS({
    "node_modules/react-dom/client.js"(exports) {
      "use strict";
      var m = require_react_dom();
      if (false) {
        exports.createRoot = m.createRoot;
        exports.hydrateRoot = m.hydrateRoot;
      } else {
        i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
        exports.createRoot = function(c, o) {
          i.usingClientEntryPoint = true;
          try {
            return m.createRoot(c, o);
          } finally {
            i.usingClientEntryPoint = false;
          }
        };
        exports.hydrateRoot = function(c, h, o) {
          i.usingClientEntryPoint = true;
          try {
            return m.hydrateRoot(c, h, o);
          } finally {
            i.usingClientEntryPoint = false;
          }
        };
      }
      var i;
    }
  });

  // package-external:@wordpress/escape-html
  var require_escape_html = __commonJS({
    "package-external:@wordpress/escape-html"(exports, module) {
      module.exports = window.wp.escapeHtml;
    }
  });

  // packages/element/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    Children: () => import_react.Children,
    Component: () => import_react.Component,
    Fragment: () => import_react.Fragment,
    Platform: () => platform_default,
    PureComponent: () => import_react.PureComponent,
    RawHTML: () => RawHTML,
    StrictMode: () => import_react.StrictMode,
    Suspense: () => import_react.Suspense,
    cloneElement: () => import_react.cloneElement,
    concatChildren: () => concatChildren,
    createContext: () => import_react.createContext,
    createElement: () => import_react.createElement,
    createInterpolateElement: () => create_interpolate_element_default,
    createPortal: () => import_react_dom.createPortal,
    createRef: () => import_react.createRef,
    createRoot: () => import_client.createRoot,
    findDOMNode: () => import_react_dom.findDOMNode,
    flushSync: () => import_react_dom.flushSync,
    forwardRef: () => import_react.forwardRef,
    hydrate: () => import_react_dom.hydrate,
    hydrateRoot: () => import_client.hydrateRoot,
    isEmptyElement: () => isEmptyElement,
    isValidElement: () => import_react.isValidElement,
    lazy: () => import_react.lazy,
    memo: () => import_react.memo,
    render: () => import_react_dom.render,
    renderToString: () => serialize_default,
    startTransition: () => import_react.startTransition,
    switchChildrenNodeName: () => switchChildrenNodeName,
    unmountComponentAtNode: () => import_react_dom.unmountComponentAtNode,
    useCallback: () => import_react.useCallback,
    useContext: () => import_react.useContext,
    useDebugValue: () => import_react.useDebugValue,
    useDeferredValue: () => import_react.useDeferredValue,
    useEffect: () => import_react.useEffect,
    useId: () => import_react.useId,
    useImperativeHandle: () => import_react.useImperativeHandle,
    useInsertionEffect: () => import_react.useInsertionEffect,
    useLayoutEffect: () => import_react.useLayoutEffect,
    useMemo: () => import_react.useMemo,
    useReducer: () => import_react.useReducer,
    useRef: () => import_react.useRef,
    useState: () => import_react.useState,
    useSyncExternalStore: () => import_react.useSyncExternalStore,
    useTransition: () => import_react.useTransition
  });

  // packages/element/build-module/react.mjs
  var import_react = __toESM(require_react(), 1);
  function concatChildren(...childrenArguments) {
    return childrenArguments.reduce(
      (accumulator, children, i) => {
        import_react.Children.forEach(children, (child, j) => {
          if ((0, import_react.isValidElement)(child) && typeof child !== "string") {
            child = (0, import_react.cloneElement)(child, {
              key: [i, j].join()
            });
          }
          accumulator.push(child);
        });
        return accumulator;
      },
      []
    );
  }
  function switchChildrenNodeName(children, nodeName) {
    return children && import_react.Children.map(children, (elt, index) => {
      if (typeof elt?.valueOf() === "string") {
        return (0, import_react.createElement)(nodeName, { key: index }, elt);
      }
      if (!(0, import_react.isValidElement)(elt)) {
        return elt;
      }
      const { children: childrenProp, ...props } = elt.props;
      return (0, import_react.createElement)(
        nodeName,
        { key: index, ...props },
        childrenProp
      );
    });
  }

  // packages/element/build-module/create-interpolate-element.mjs
  var indoc;
  var offset;
  var output;
  var stack;
  var tokenizer = /<(\/)?(\w+)\s*(\/)?>/g;
  function createFrame(element, tokenStart, tokenLength, prevOffset, leadingTextStart) {
    return {
      element,
      tokenStart,
      tokenLength,
      prevOffset,
      leadingTextStart,
      children: []
    };
  }
  var createInterpolateElement = (interpolatedString, conversionMap) => {
    indoc = interpolatedString;
    offset = 0;
    output = [];
    stack = [];
    tokenizer.lastIndex = 0;
    if (!isValidConversionMap(conversionMap)) {
      throw new TypeError(
        "The conversionMap provided is not valid. It must be an object with values that are React Elements"
      );
    }
    do {
    } while (proceed(conversionMap));
    return (0, import_react.createElement)(import_react.Fragment, null, ...output);
  };
  var isValidConversionMap = (conversionMap) => {
    const isObject2 = typeof conversionMap === "object" && conversionMap !== null;
    const values = isObject2 && Object.values(conversionMap);
    return isObject2 && values.length > 0 && values.every((element) => (0, import_react.isValidElement)(element));
  };
  function proceed(conversionMap) {
    const next = nextToken();
    const [tokenType, name, startOffset, tokenLength] = next;
    const stackDepth = stack.length;
    const leadingTextStart = startOffset > offset ? offset : null;
    if (name && !conversionMap[name]) {
      addText();
      return false;
    }
    switch (tokenType) {
      case "no-more-tokens":
        if (stackDepth !== 0) {
          const { leadingTextStart: stackLeadingText, tokenStart } = stack.pop();
          output.push(indoc.substr(stackLeadingText, tokenStart));
        }
        addText();
        return false;
      case "self-closed":
        if (0 === stackDepth) {
          if (null !== leadingTextStart) {
            output.push(
              indoc.substr(
                leadingTextStart,
                startOffset - leadingTextStart
              )
            );
          }
          output.push(conversionMap[name]);
          offset = startOffset + tokenLength;
          return true;
        }
        addChild(
          createFrame(conversionMap[name], startOffset, tokenLength)
        );
        offset = startOffset + tokenLength;
        return true;
      case "opener":
        stack.push(
          createFrame(
            conversionMap[name],
            startOffset,
            tokenLength,
            startOffset + tokenLength,
            leadingTextStart
          )
        );
        offset = startOffset + tokenLength;
        return true;
      case "closer":
        if (1 === stackDepth) {
          closeOuterElement(startOffset);
          offset = startOffset + tokenLength;
          return true;
        }
        const stackTop = stack.pop();
        const text = indoc.substr(
          stackTop.prevOffset,
          startOffset - stackTop.prevOffset
        );
        stackTop.children.push(text);
        stackTop.prevOffset = startOffset + tokenLength;
        const frame = createFrame(
          stackTop.element,
          stackTop.tokenStart,
          stackTop.tokenLength,
          startOffset + tokenLength
        );
        frame.children = stackTop.children;
        addChild(frame);
        offset = startOffset + tokenLength;
        return true;
      default:
        addText();
        return false;
    }
  }
  function nextToken() {
    const matches = tokenizer.exec(indoc);
    if (null === matches) {
      return ["no-more-tokens"];
    }
    const startedAt = matches.index;
    const [match, isClosing, name, isSelfClosed] = matches;
    const length = match.length;
    if (isSelfClosed) {
      return ["self-closed", name, startedAt, length];
    }
    if (isClosing) {
      return ["closer", name, startedAt, length];
    }
    return ["opener", name, startedAt, length];
  }
  function addText() {
    const length = indoc.length - offset;
    if (0 === length) {
      return;
    }
    output.push(indoc.substr(offset, length));
  }
  function addChild(frame) {
    const { element, tokenStart, tokenLength, prevOffset, children } = frame;
    const parent = stack[stack.length - 1];
    const text = indoc.substr(
      parent.prevOffset,
      tokenStart - parent.prevOffset
    );
    if (text) {
      parent.children.push(text);
    }
    parent.children.push((0, import_react.cloneElement)(element, null, ...children));
    parent.prevOffset = prevOffset ? prevOffset : tokenStart + tokenLength;
  }
  function closeOuterElement(endOffset) {
    const { element, leadingTextStart, prevOffset, tokenStart, children } = stack.pop();
    const text = endOffset ? indoc.substr(prevOffset, endOffset - prevOffset) : indoc.substr(prevOffset);
    if (text) {
      children.push(text);
    }
    if (null !== leadingTextStart) {
      output.push(
        indoc.substr(leadingTextStart, tokenStart - leadingTextStart)
      );
    }
    output.push((0, import_react.cloneElement)(element, null, ...children));
  }
  var create_interpolate_element_default = createInterpolateElement;

  // packages/element/build-module/react-platform.mjs
  var import_react_dom = __toESM(require_react_dom(), 1);
  var import_client = __toESM(require_client(), 1);

  // packages/element/build-module/utils.mjs
  var isEmptyElement = (element) => {
    if (typeof element === "number") {
      return false;
    }
    if (typeof element?.valueOf() === "string" || Array.isArray(element)) {
      return !element.length;
    }
    return !element;
  };

  // packages/element/build-module/platform.mjs
  var Platform = {
    /** Platform identifier. Will always be `'web'` in this module. */
    OS: "web",
    /**
     * Select a value based on the platform.
     *
     * @template T
     * @param    spec - Object with optional platform-specific values.
     * @return The selected value.
     */
    select(spec) {
      return "web" in spec ? spec.web : spec.default;
    },
    /** Whether the platform is web */
    isWeb: true
  };
  var platform_default = Platform;

  // node_modules/is-plain-object/dist/is-plain-object.mjs
  function isObject(o) {
    return Object.prototype.toString.call(o) === "[object Object]";
  }
  function isPlainObject(o) {
    var ctor, prot;
    if (isObject(o) === false) return false;
    ctor = o.constructor;
    if (ctor === void 0) return true;
    prot = ctor.prototype;
    if (isObject(prot) === false) return false;
    if (prot.hasOwnProperty("isPrototypeOf") === false) {
      return false;
    }
    return true;
  }

  // node_modules/tslib/tslib.es6.mjs
  var __assign = function() {
    __assign = Object.assign || function __assign2(t) {
      for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
      }
      return t;
    };
    return __assign.apply(this, arguments);
  };

  // node_modules/lower-case/dist.es2015/index.js
  function lowerCase(str) {
    return str.toLowerCase();
  }

  // node_modules/no-case/dist.es2015/index.js
  var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
  var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
  function noCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    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;
    var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
    var start = 0;
    var end = result.length;
    while (result.charAt(start) === "\0")
      start++;
    while (result.charAt(end - 1) === "\0")
      end--;
    return result.slice(start, end).split("\0").map(transform).join(delimiter);
  }
  function replace(input, re, value) {
    if (re instanceof RegExp)
      return input.replace(re, value);
    return re.reduce(function(input2, re2) {
      return input2.replace(re2, value);
    }, input);
  }

  // node_modules/dot-case/dist.es2015/index.js
  function dotCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    return noCase(input, __assign({ delimiter: "." }, options));
  }

  // node_modules/param-case/dist.es2015/index.js
  function paramCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    return dotCase(input, __assign({ delimiter: "-" }, options));
  }

  // packages/element/build-module/serialize.mjs
  var import_escape_html = __toESM(require_escape_html(), 1);

  // packages/element/build-module/raw-html.mjs
  function RawHTML({ children, ...props }) {
    let rawHtml = "";
    import_react.Children.toArray(children).forEach((child) => {
      if (typeof child === "string" && child.trim() !== "") {
        rawHtml += child;
      }
    });
    return (0, import_react.createElement)("div", {
      dangerouslySetInnerHTML: { __html: rawHtml },
      ...props
    });
  }

  // packages/element/build-module/serialize.mjs
  var Context = (0, import_react.createContext)(void 0);
  Context.displayName = "ElementContext";
  var { Provider, Consumer } = Context;
  var ForwardRef = (0, import_react.forwardRef)(() => {
    return null;
  });
  var ATTRIBUTES_TYPES = /* @__PURE__ */ new Set(["string", "boolean", "number"]);
  var SELF_CLOSING_TAGS = /* @__PURE__ */ new Set([
    "area",
    "base",
    "br",
    "col",
    "command",
    "embed",
    "hr",
    "img",
    "input",
    "keygen",
    "link",
    "meta",
    "param",
    "source",
    "track",
    "wbr"
  ]);
  var BOOLEAN_ATTRIBUTES = /* @__PURE__ */ new Set([
    "allowfullscreen",
    "allowpaymentrequest",
    "allowusermedia",
    "async",
    "autofocus",
    "autoplay",
    "checked",
    "controls",
    "default",
    "defer",
    "disabled",
    "download",
    "formnovalidate",
    "hidden",
    "ismap",
    "itemscope",
    "loop",
    "multiple",
    "muted",
    "nomodule",
    "novalidate",
    "open",
    "playsinline",
    "readonly",
    "required",
    "reversed",
    "selected",
    "typemustmatch"
  ]);
  var ENUMERATED_ATTRIBUTES = /* @__PURE__ */ new Set([
    "autocapitalize",
    "autocomplete",
    "charset",
    "contenteditable",
    "crossorigin",
    "decoding",
    "dir",
    "draggable",
    "enctype",
    "formenctype",
    "formmethod",
    "http-equiv",
    "inputmode",
    "kind",
    "method",
    "preload",
    "scope",
    "shape",
    "spellcheck",
    "translate",
    "type",
    "wrap"
  ]);
  var CSS_PROPERTIES_SUPPORTS_UNITLESS = /* @__PURE__ */ new Set([
    "animation",
    "animationIterationCount",
    "baselineShift",
    "borderImageOutset",
    "borderImageSlice",
    "borderImageWidth",
    "columnCount",
    "cx",
    "cy",
    "fillOpacity",
    "flexGrow",
    "flexShrink",
    "floodOpacity",
    "fontWeight",
    "gridColumnEnd",
    "gridColumnStart",
    "gridRowEnd",
    "gridRowStart",
    "lineHeight",
    "opacity",
    "order",
    "orphans",
    "r",
    "rx",
    "ry",
    "shapeImageThreshold",
    "stopOpacity",
    "strokeDasharray",
    "strokeDashoffset",
    "strokeMiterlimit",
    "strokeOpacity",
    "strokeWidth",
    "tabSize",
    "widows",
    "x",
    "y",
    "zIndex",
    "zoom"
  ]);
  function hasPrefix(string, prefixes) {
    return prefixes.some((prefix) => string.indexOf(prefix) === 0);
  }
  function isInternalAttribute(attribute) {
    return "key" === attribute || "children" === attribute;
  }
  function getNormalAttributeValue(attribute, value) {
    switch (attribute) {
      case "style":
        return renderStyle(value);
    }
    return value;
  }
  var SVG_ATTRIBUTE_WITH_DASHES_LIST = [
    "accentHeight",
    "alignmentBaseline",
    "arabicForm",
    "baselineShift",
    "capHeight",
    "clipPath",
    "clipRule",
    "colorInterpolation",
    "colorInterpolationFilters",
    "colorProfile",
    "colorRendering",
    "dominantBaseline",
    "enableBackground",
    "fillOpacity",
    "fillRule",
    "floodColor",
    "floodOpacity",
    "fontFamily",
    "fontSize",
    "fontSizeAdjust",
    "fontStretch",
    "fontStyle",
    "fontVariant",
    "fontWeight",
    "glyphName",
    "glyphOrientationHorizontal",
    "glyphOrientationVertical",
    "horizAdvX",
    "horizOriginX",
    "imageRendering",
    "letterSpacing",
    "lightingColor",
    "markerEnd",
    "markerMid",
    "markerStart",
    "overlinePosition",
    "overlineThickness",
    "paintOrder",
    "panose1",
    "pointerEvents",
    "renderingIntent",
    "shapeRendering",
    "stopColor",
    "stopOpacity",
    "strikethroughPosition",
    "strikethroughThickness",
    "strokeDasharray",
    "strokeDashoffset",
    "strokeLinecap",
    "strokeLinejoin",
    "strokeMiterlimit",
    "strokeOpacity",
    "strokeWidth",
    "textAnchor",
    "textDecoration",
    "textRendering",
    "underlinePosition",
    "underlineThickness",
    "unicodeBidi",
    "unicodeRange",
    "unitsPerEm",
    "vAlphabetic",
    "vHanging",
    "vIdeographic",
    "vMathematical",
    "vectorEffect",
    "vertAdvY",
    "vertOriginX",
    "vertOriginY",
    "wordSpacing",
    "writingMode",
    "xmlnsXlink",
    "xHeight"
  ].reduce(
    (map, attribute) => {
      map[attribute.toLowerCase()] = attribute;
      return map;
    },
    {}
  );
  var CASE_SENSITIVE_SVG_ATTRIBUTES = [
    "allowReorder",
    "attributeName",
    "attributeType",
    "autoReverse",
    "baseFrequency",
    "baseProfile",
    "calcMode",
    "clipPathUnits",
    "contentScriptType",
    "contentStyleType",
    "diffuseConstant",
    "edgeMode",
    "externalResourcesRequired",
    "filterRes",
    "filterUnits",
    "glyphRef",
    "gradientTransform",
    "gradientUnits",
    "kernelMatrix",
    "kernelUnitLength",
    "keyPoints",
    "keySplines",
    "keyTimes",
    "lengthAdjust",
    "limitingConeAngle",
    "markerHeight",
    "markerUnits",
    "markerWidth",
    "maskContentUnits",
    "maskUnits",
    "numOctaves",
    "pathLength",
    "patternContentUnits",
    "patternTransform",
    "patternUnits",
    "pointsAtX",
    "pointsAtY",
    "pointsAtZ",
    "preserveAlpha",
    "preserveAspectRatio",
    "primitiveUnits",
    "refX",
    "refY",
    "repeatCount",
    "repeatDur",
    "requiredExtensions",
    "requiredFeatures",
    "specularConstant",
    "specularExponent",
    "spreadMethod",
    "startOffset",
    "stdDeviation",
    "stitchTiles",
    "suppressContentEditableWarning",
    "suppressHydrationWarning",
    "surfaceScale",
    "systemLanguage",
    "tableValues",
    "targetX",
    "targetY",
    "textLength",
    "viewBox",
    "viewTarget",
    "xChannelSelector",
    "yChannelSelector"
  ].reduce(
    (map, attribute) => {
      map[attribute.toLowerCase()] = attribute;
      return map;
    },
    {}
  );
  var SVG_ATTRIBUTES_WITH_COLONS = [
    "xlink:actuate",
    "xlink:arcrole",
    "xlink:href",
    "xlink:role",
    "xlink:show",
    "xlink:title",
    "xlink:type",
    "xml:base",
    "xml:lang",
    "xml:space",
    "xmlns:xlink"
  ].reduce(
    (map, attribute) => {
      map[attribute.replace(":", "").toLowerCase()] = attribute;
      return map;
    },
    {}
  );
  function getNormalAttributeName(attribute) {
    switch (attribute) {
      case "htmlFor":
        return "for";
      case "className":
        return "class";
    }
    const attributeLowerCase = attribute.toLowerCase();
    if (CASE_SENSITIVE_SVG_ATTRIBUTES[attributeLowerCase]) {
      return CASE_SENSITIVE_SVG_ATTRIBUTES[attributeLowerCase];
    } else if (SVG_ATTRIBUTE_WITH_DASHES_LIST[attributeLowerCase]) {
      return paramCase(
        SVG_ATTRIBUTE_WITH_DASHES_LIST[attributeLowerCase]
      );
    } else if (SVG_ATTRIBUTES_WITH_COLONS[attributeLowerCase]) {
      return SVG_ATTRIBUTES_WITH_COLONS[attributeLowerCase];
    }
    return attributeLowerCase;
  }
  function getNormalStylePropertyName(property) {
    if (property.startsWith("--")) {
      return property;
    }
    if (hasPrefix(property, ["ms", "O", "Moz", "Webkit"])) {
      return "-" + paramCase(property);
    }
    return paramCase(property);
  }
  function getNormalStylePropertyValue(property, value) {
    if (typeof value === "number" && 0 !== value && !hasPrefix(property, ["--"]) && !CSS_PROPERTIES_SUPPORTS_UNITLESS.has(property)) {
      return value + "px";
    }
    return value;
  }
  function renderElement(element, context, legacyContext = {}) {
    if (null === element || void 0 === element || false === element) {
      return "";
    }
    if (Array.isArray(element)) {
      return renderChildren(element, context, legacyContext);
    }
    switch (typeof element) {
      case "string":
        return (0, import_escape_html.escapeHTML)(element);
      case "number":
        return element.toString();
    }
    const { type, props } = element;
    switch (type) {
      case import_react.StrictMode:
      case import_react.Fragment:
        return renderChildren(props.children, context, legacyContext);
      case RawHTML:
        const { children, ...wrapperProps } = props;
        return renderNativeComponent(
          !Object.keys(wrapperProps).length ? null : "div",
          {
            ...wrapperProps,
            dangerouslySetInnerHTML: { __html: children }
          },
          context,
          legacyContext
        );
    }
    switch (typeof type) {
      case "string":
        return renderNativeComponent(type, props, context, legacyContext);
      case "function":
        if (type.prototype && typeof type.prototype.render === "function") {
          return renderComponent(type, props, context, legacyContext);
        }
        return renderElement(
          type(props, legacyContext),
          context,
          legacyContext
        );
    }
    switch (type && type.$$typeof) {
      case Provider.$$typeof:
        return renderChildren(props.children, props.value, legacyContext);
      case Consumer.$$typeof:
        return renderElement(
          props.children(context || type._currentValue),
          context,
          legacyContext
        );
      case ForwardRef.$$typeof:
        return renderElement(
          type.render(props),
          context,
          legacyContext
        );
    }
    return "";
  }
  function renderNativeComponent(type, props, context, legacyContext = {}) {
    let content = "";
    if (type === "textarea" && props.hasOwnProperty("value")) {
      content = renderChildren(props.value, context, legacyContext);
      const { value, ...restProps } = props;
      props = restProps;
    } else if (props.dangerouslySetInnerHTML && typeof props.dangerouslySetInnerHTML.__html === "string") {
      content = props.dangerouslySetInnerHTML.__html;
    } else if (typeof props.children !== "undefined") {
      content = renderChildren(props.children, context, legacyContext);
    }
    if (!type) {
      return content;
    }
    const attributes = renderAttributes(props);
    if (SELF_CLOSING_TAGS.has(type)) {
      return "<" + type + attributes + "/>";
    }
    return "<" + type + attributes + ">" + content + "</" + type + ">";
  }
  function renderComponent(Component2, props, context, legacyContext = {}) {
    const instance = new Component2(props, legacyContext);
    if (typeof instance.getChildContext === "function") {
      Object.assign(legacyContext, instance.getChildContext());
    }
    const html = renderElement(instance.render(), context, legacyContext);
    return html;
  }
  function renderChildren(children, context, legacyContext = {}) {
    let result = "";
    const childrenArray = Array.isArray(children) ? children : [children];
    for (let i = 0; i < childrenArray.length; i++) {
      const child = childrenArray[i];
      result += renderElement(child, context, legacyContext);
    }
    return result;
  }
  function renderAttributes(props) {
    let result = "";
    for (const key in props) {
      const attribute = getNormalAttributeName(key);
      if (!(0, import_escape_html.isValidAttributeName)(attribute)) {
        continue;
      }
      let value = getNormalAttributeValue(key, props[key]);
      if (!ATTRIBUTES_TYPES.has(typeof value)) {
        continue;
      }
      if (isInternalAttribute(key)) {
        continue;
      }
      const isBooleanAttribute = BOOLEAN_ATTRIBUTES.has(attribute);
      if (isBooleanAttribute && value === false) {
        continue;
      }
      const isMeaningfulAttribute = isBooleanAttribute || hasPrefix(key, ["data-", "aria-"]) || ENUMERATED_ATTRIBUTES.has(attribute);
      if (typeof value === "boolean" && !isMeaningfulAttribute) {
        continue;
      }
      result += " " + attribute;
      if (isBooleanAttribute) {
        continue;
      }
      if (typeof value === "string") {
        value = (0, import_escape_html.escapeAttribute)(value);
      }
      result += '="' + value + '"';
    }
    return result;
  }
  function renderStyle(style) {
    if (!isPlainObject(style)) {
      return style;
    }
    let result;
    const styleObj = style;
    for (const property in styleObj) {
      const value = styleObj[property];
      if (null === value || void 0 === value) {
        continue;
      }
      if (result) {
        result += ";";
      } else {
        result = "";
      }
      const normalName = getNormalStylePropertyName(property);
      const normalValue = getNormalStylePropertyValue(property, value);
      result += normalName + ":" + normalValue;
    }
    return result;
  }
  var serialize_default = renderElement;
  return __toCommonJS(index_exports);
})();
/*! Bundled license information:

is-plain-object/dist/is-plain-object.mjs:
  (*!
   * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
   *
   * Copyright (c) 2014-2017, Jon Schlinkert.
   * Released under the MIT License.
   *)
*/
                                                                      dist/element.min.js                                                                                 0000644                 00000030207 15212564020 0010257 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).element=(()=>{var oe=Object.create;var S=Object.defineProperty;var ie=Object.getOwnPropertyDescriptor;var ae=Object.getOwnPropertyNames;var se=Object.getPrototypeOf,ue=Object.prototype.hasOwnProperty;var x=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),le=(e,t)=>{for(var o in t)S(e,o,{get:t[o],enumerable:!0})},L=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ae(t))!ue.call(e,n)&&n!==o&&S(e,n,{get:()=>t[n],enumerable:!(i=ie(t,n))||i.enumerable});return e};var O=(e,t,o)=>(o=e!=null?oe(se(e)):{},L(t||!e||!e.__esModule?S(o,"default",{value:e,enumerable:!0}):o,e)),ce=e=>L(S({},"__esModule",{value:!0}),e);var N=x((Fe,D)=>{D.exports=window.React});var j=x((We,F)=>{F.exports=window.ReactDOM});var z=x(A=>{"use strict";var V=j();A.createRoot=V.createRoot,A.hydrateRoot=V.hydrateRoot;var $e});var J=x((st,Z)=>{Z.exports=window.wp.escapeHtml});var Ue={};le(Ue,{Children:()=>r.Children,Component:()=>r.Component,Fragment:()=>r.Fragment,Platform:()=>B,PureComponent:()=>r.PureComponent,RawHTML:()=>P,StrictMode:()=>r.StrictMode,Suspense:()=>r.Suspense,cloneElement:()=>r.cloneElement,concatChildren:()=>fe,createContext:()=>r.createContext,createElement:()=>r.createElement,createInterpolateElement:()=>H,createPortal:()=>u.createPortal,createRef:()=>r.createRef,createRoot:()=>E.createRoot,findDOMNode:()=>u.findDOMNode,flushSync:()=>u.flushSync,forwardRef:()=>r.forwardRef,hydrate:()=>u.hydrate,hydrateRoot:()=>E.hydrateRoot,isEmptyElement:()=>be,isValidElement:()=>r.isValidElement,lazy:()=>r.lazy,memo:()=>r.memo,render:()=>u.render,renderToString:()=>ne,startTransition:()=>r.startTransition,switchChildrenNodeName:()=>pe,unmountComponentAtNode:()=>u.unmountComponentAtNode,useCallback:()=>r.useCallback,useContext:()=>r.useContext,useDebugValue:()=>r.useDebugValue,useDeferredValue:()=>r.useDeferredValue,useEffect:()=>r.useEffect,useId:()=>r.useId,useImperativeHandle:()=>r.useImperativeHandle,useInsertionEffect:()=>r.useInsertionEffect,useLayoutEffect:()=>r.useLayoutEffect,useMemo:()=>r.useMemo,useReducer:()=>r.useReducer,useRef:()=>r.useRef,useState:()=>r.useState,useSyncExternalStore:()=>r.useSyncExternalStore,useTransition:()=>r.useTransition});var r=O(N(),1);function fe(...e){return e.reduce((t,o,i)=>(r.Children.forEach(o,(n,a)=>{(0,r.isValidElement)(n)&&typeof n!="string"&&(n=(0,r.cloneElement)(n,{key:[i,a].join()})),t.push(n)}),t),[])}function pe(e,t){return e&&r.Children.map(e,(o,i)=>{if(typeof o?.valueOf()=="string")return(0,r.createElement)(t,{key:i},o);if(!(0,r.isValidElement)(o))return o;let{children:n,...a}=o.props;return(0,r.createElement)(t,{key:i,...a},n)})}var f,p,h,d,U=/<(\/)?(\w+)\s*(\/)?>/g;function C(e,t,o,i,n){return{element:e,tokenStart:t,tokenLength:o,prevOffset:i,leadingTextStart:n,children:[]}}var de=(e,t)=>{if(f=e,p=0,h=[],d=[],U.lastIndex=0,!he(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are React Elements");do;while(ye(t));return(0,r.createElement)(r.Fragment,null,...h)},he=e=>{let t=typeof e=="object"&&e!==null,o=t&&Object.values(e);return t&&o.length>0&&o.every(i=>(0,r.isValidElement)(i))};function ye(e){let t=me(),[o,i,n,a]=t,s=d.length,l=n>p?p:null;if(i&&!e[i])return k(),!1;switch(o){case"no-more-tokens":if(s!==0){let{leadingTextStart:w,tokenStart:_}=d.pop();h.push(f.substr(w,_))}return k(),!1;case"self-closed":return s===0?(l!==null&&h.push(f.substr(l,n-l)),h.push(e[i]),p=n+a,!0):(M(C(e[i],n,a)),p=n+a,!0);case"opener":return d.push(C(e[i],n,a,n+a,l)),p=n+a,!0;case"closer":if(s===1)return ge(n),p=n+a,!0;let c=d.pop(),R=f.substr(c.prevOffset,n-c.prevOffset);c.children.push(R),c.prevOffset=n+a;let y=C(c.element,c.tokenStart,c.tokenLength,n+a);return y.children=c.children,M(y),p=n+a,!0;default:return k(),!1}}function me(){let e=U.exec(f);if(e===null)return["no-more-tokens"];let t=e.index,[o,i,n,a]=e,s=o.length;return a?["self-closed",n,t,s]:i?["closer",n,t,s]:["opener",n,t,s]}function k(){let e=f.length-p;e!==0&&h.push(f.substr(p,e))}function M(e){let{element:t,tokenStart:o,tokenLength:i,prevOffset:n,children:a}=e,s=d[d.length-1],l=f.substr(s.prevOffset,o-s.prevOffset);l&&s.children.push(l),s.children.push((0,r.cloneElement)(t,null,...a)),s.prevOffset=n||o+i}function ge(e){let{element:t,leadingTextStart:o,prevOffset:i,tokenStart:n,children:a}=d.pop(),s=e?f.substr(i,e-i):f.substr(i);s&&a.push(s),o!==null&&h.push(f.substr(o,n-o)),h.push((0,r.cloneElement)(t,null,...a))}var H=de;var u=O(j(),1),E=O(z(),1);var be=e=>typeof e=="number"?!1:typeof e?.valueOf()=="string"||Array.isArray(e)?!e.length:!e;var we={OS:"web",select(e){return"web"in e?e.web:e.default},isWeb:!0},B=we;function W(e){return Object.prototype.toString.call(e)==="[object Object]"}function $(e){var t,o;return W(e)===!1?!1:(t=e.constructor,t===void 0?!0:(o=t.prototype,!(W(o)===!1||o.hasOwnProperty("isPrototypeOf")===!1)))}var m=function(){return m=Object.assign||function(t){for(var o,i=1,n=arguments.length;i<n;i++){o=arguments[i];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])}return t},m.apply(this,arguments)};function G(e){return e.toLowerCase()}var _e=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],ve=/[^A-Z0-9]+/gi;function X(e,t){t===void 0&&(t={});for(var o=t.splitRegexp,i=o===void 0?_e:o,n=t.stripRegexp,a=n===void 0?ve:n,s=t.transform,l=s===void 0?G:s,c=t.delimiter,R=c===void 0?" ":c,y=q(q(e,i,"$1\0$2"),a,"\0"),w=0,_=y.length;y.charAt(w)==="\0";)w++;for(;y.charAt(_-1)==="\0";)_--;return y.slice(w,_).split("\0").map(l).join(R)}function q(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce(function(i,n){return i.replace(n,o)},e)}function Y(e,t){return t===void 0&&(t={}),X(e,m({delimiter:"."},t))}function T(e,t){return t===void 0&&(t={}),Y(e,m({delimiter:"-"},t))}var b=O(J(),1);function P({children:e,...t}){let o="";return r.Children.toArray(e).forEach(i=>{typeof i=="string"&&i.trim()!==""&&(o+=i)}),(0,r.createElement)("div",{dangerouslySetInnerHTML:{__html:o},...t})}var re=(0,r.createContext)(void 0);re.displayName="ElementContext";var{Provider:Se,Consumer:xe}=re,Oe=(0,r.forwardRef)(()=>null),Ee=new Set(["string","boolean","number"]),Te=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),Pe=new Set(["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"]),Re=new Set(["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),Ce=new Set(["animation","animationIterationCount","baselineShift","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","cx","cy","fillOpacity","flexGrow","flexShrink","floodOpacity","fontWeight","gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","r","rx","ry","shapeImageThreshold","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","x","y","zIndex","zoom"]);function I(e,t){return t.some(o=>e.indexOf(o)===0)}function ke(e){return e==="key"||e==="children"}function je(e,t){return e==="style"?Me(t):t}var K=["accentHeight","alignmentBaseline","arabicForm","baselineShift","capHeight","clipPath","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","dominantBaseline","enableBackground","fillOpacity","fillRule","floodColor","floodOpacity","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","horizAdvX","horizOriginX","imageRendering","letterSpacing","lightingColor","markerEnd","markerMid","markerStart","overlinePosition","overlineThickness","paintOrder","panose1","pointerEvents","renderingIntent","shapeRendering","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","textAnchor","textDecoration","textRendering","underlinePosition","underlineThickness","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","vHanging","vIdeographic","vMathematical","vectorEffect","vertAdvY","vertOriginX","vertOriginY","wordSpacing","writingMode","xmlnsXlink","xHeight"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{}),Q=["allowReorder","attributeName","attributeType","autoReverse","baseFrequency","baseProfile","calcMode","clipPathUnits","contentScriptType","contentStyleType","diffuseConstant","edgeMode","externalResourcesRequired","filterRes","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","suppressContentEditableWarning","suppressHydrationWarning","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{}),ee=["xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xml:space","xmlns:xlink"].reduce((e,t)=>(e[t.replace(":","").toLowerCase()]=t,e),{});function Ae(e){switch(e){case"htmlFor":return"for";case"className":return"class"}let t=e.toLowerCase();return Q[t]?Q[t]:K[t]?T(K[t]):ee[t]?ee[t]:t}function Ie(e){return e.startsWith("--")?e:I(e,["ms","O","Moz","Webkit"])?"-"+T(e):T(e)}function Le(e,t){return typeof t=="number"&&t!==0&&!I(e,["--"])&&!Ce.has(e)?t+"px":t}function g(e,t,o={}){if(e==null||e===!1)return"";if(Array.isArray(e))return v(e,t,o);switch(typeof e){case"string":return(0,b.escapeHTML)(e);case"number":return e.toString()}let{type:i,props:n}=e;switch(i){case r.StrictMode:case r.Fragment:return v(n.children,t,o);case P:let{children:a,...s}=n;return te(Object.keys(s).length?"div":null,{...s,dangerouslySetInnerHTML:{__html:a}},t,o)}switch(typeof i){case"string":return te(i,n,t,o);case"function":return i.prototype&&typeof i.prototype.render=="function"?De(i,n,t,o):g(i(n,o),t,o)}switch(i&&i.$$typeof){case Se.$$typeof:return v(n.children,n.value,o);case xe.$$typeof:return g(n.children(t||i._currentValue),t,o);case Oe.$$typeof:return g(i.render(n),t,o)}return""}function te(e,t,o,i={}){let n="";if(e==="textarea"&&t.hasOwnProperty("value")){n=v(t.value,o,i);let{value:s,...l}=t;t=l}else t.dangerouslySetInnerHTML&&typeof t.dangerouslySetInnerHTML.__html=="string"?n=t.dangerouslySetInnerHTML.__html:typeof t.children<"u"&&(n=v(t.children,o,i));if(!e)return n;let a=Ne(t);return Te.has(e)?"<"+e+a+"/>":"<"+e+a+">"+n+"</"+e+">"}function De(e,t,o,i={}){let n=new e(t,i);return typeof n.getChildContext=="function"&&Object.assign(i,n.getChildContext()),g(n.render(),o,i)}function v(e,t,o={}){let i="",n=Array.isArray(e)?e:[e];for(let a=0;a<n.length;a++){let s=n[a];i+=g(s,t,o)}return i}function Ne(e){let t="";for(let o in e){let i=Ae(o);if(!(0,b.isValidAttributeName)(i))continue;let n=je(o,e[o]);if(!Ee.has(typeof n)||ke(o))continue;let a=Pe.has(i);if(a&&n===!1)continue;let s=a||I(o,["data-","aria-"])||Re.has(i);typeof n=="boolean"&&!s||(t+=" "+i,!a&&(typeof n=="string"&&(n=(0,b.escapeAttribute)(n)),t+='="'+n+'"'))}return t}function Me(e){if(!$(e))return e;let t,o=e;for(let i in o){let n=o[i];if(n==null)continue;t?t+=";":t="";let a=Ie(i),s=Le(i,n);t+=a+":"+s}return t}var ne=g;return ce(Ue);})();
/*! Bundled license information:

is-plain-object/dist/is-plain-object.mjs:
  (*!
   * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
   *
   * Copyright (c) 2014-2017, Jon Schlinkert.
   * Released under the MIT License.
   *)
*/
                                                                                                                                                                                                                                                                                                                                                                                         dist/escape-html.js                                                                                 0000644                 00000004452 15212564020 0010251 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).escapeHtml = (() => {
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // packages/escape-html/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    escapeAmpersand: () => escapeAmpersand,
    escapeAttribute: () => escapeAttribute,
    escapeEditableHTML: () => escapeEditableHTML,
    escapeHTML: () => escapeHTML,
    escapeLessThan: () => escapeLessThan,
    escapeQuotationMark: () => escapeQuotationMark,
    isValidAttributeName: () => isValidAttributeName
  });

  // packages/escape-html/build-module/escape-greater.mjs
  function __unstableEscapeGreaterThan(value) {
    return value.replace(/>/g, "&gt;");
  }

  // packages/escape-html/build-module/index.mjs
  var REGEXP_INVALID_ATTRIBUTE_NAME = /[\u007F-\u009F "'>/="\uFDD0-\uFDEF]/;
  function escapeAmpersand(value) {
    return value.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi, "&amp;");
  }
  function escapeQuotationMark(value) {
    return value.replace(/"/g, "&quot;");
  }
  function escapeLessThan(value) {
    return value.replace(/</g, "&lt;");
  }
  function escapeAttribute(value) {
    return __unstableEscapeGreaterThan(
      escapeLessThan(escapeQuotationMark(escapeAmpersand(value)))
    );
  }
  function escapeHTML(value) {
    return escapeLessThan(escapeAmpersand(value));
  }
  function escapeEditableHTML(value) {
    return escapeLessThan(value.replace(/&/g, "&amp;"));
  }
  function isValidAttributeName(name) {
    return !REGEXP_INVALID_ATTRIBUTE_NAME.test(name);
  }
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                      dist/escape-html.min.js                                                                             0000644                 00000002040 15212564020 0011022 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).escapeHtml=(()=>{var u=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var E=(e,t)=>{for(var a in t)u(e,a,{get:t[a],enumerable:!0})},T=(e,t,a,p)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of f(t))!l.call(e,r)&&r!==a&&u(e,r,{get:()=>t[r],enumerable:!(p=o(t,r))||p.enumerable});return e};var _=e=>T(u({},"__esModule",{value:!0}),e);var d={};E(d,{escapeAmpersand:()=>c,escapeAttribute:()=>m,escapeEditableHTML:()=>b,escapeHTML:()=>A,escapeLessThan:()=>n,escapeQuotationMark:()=>s,isValidAttributeName:()=>F});function i(e){return e.replace(/>/g,"&gt;")}var g=/[\u007F-\u009F "'>/="\uFDD0-\uFDEF]/;function c(e){return e.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi,"&amp;")}function s(e){return e.replace(/"/g,"&quot;")}function n(e){return e.replace(/</g,"&lt;")}function m(e){return i(n(s(c(e))))}function A(e){return n(c(e))}function b(e){return n(e.replace(/&/g,"&amp;"))}function F(e){return!g.test(e)}return _(d);})();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                dist/format-library.js                                                                              0000644                 00000222533 15212564020 0011003 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;
(wp ||= {}).formatLibrary = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
    get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
  }) : x)(function(x) {
    if (typeof require !== "undefined") return require.apply(this, arguments);
    throw Error('Dynamic require of "' + x + '" is not supported');
  });
  var __commonJS = (cb, mod) => function __require2() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));

  // package-external:@wordpress/rich-text
  var require_rich_text = __commonJS({
    "package-external:@wordpress/rich-text"(exports, module) {
      module.exports = window.wp.richText;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // package-external:@wordpress/block-editor
  var require_block_editor = __commonJS({
    "package-external:@wordpress/block-editor"(exports, module) {
      module.exports = window.wp.blockEditor;
    }
  });

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/primitives
  var require_primitives = __commonJS({
    "package-external:@wordpress/primitives"(exports, module) {
      module.exports = window.wp.primitives;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // package-external:@wordpress/components
  var require_components = __commonJS({
    "package-external:@wordpress/components"(exports, module) {
      module.exports = window.wp.components;
    }
  });

  // package-external:@wordpress/url
  var require_url = __commonJS({
    "package-external:@wordpress/url"(exports, module) {
      module.exports = window.wp.url;
    }
  });

  // package-external:@wordpress/html-entities
  var require_html_entities = __commonJS({
    "package-external:@wordpress/html-entities"(exports, module) {
      module.exports = window.wp.htmlEntities;
    }
  });

  // package-external:@wordpress/a11y
  var require_a11y = __commonJS({
    "package-external:@wordpress/a11y"(exports, module) {
      module.exports = window.wp.a11y;
    }
  });

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // package-external:@wordpress/private-apis
  var require_private_apis = __commonJS({
    "package-external:@wordpress/private-apis"(exports, module) {
      module.exports = window.wp.privateApis;
    }
  });

  // packages/format-library/build-module/index.mjs
  var import_rich_text18 = __toESM(require_rich_text(), 1);

  // packages/format-library/build-module/bold/index.mjs
  var import_i18n = __toESM(require_i18n(), 1);
  var import_rich_text = __toESM(require_rich_text(), 1);
  var import_block_editor = __toESM(require_block_editor(), 1);

  // packages/icons/build-module/icon/index.mjs
  var import_element = __toESM(require_element(), 1);
  var icon_default = (0, import_element.forwardRef)(
    ({ icon, size = 24, ...props }, ref) => {
      return (0, import_element.cloneElement)(icon, {
        width: size,
        height: size,
        ...props,
        ref
      });
    }
  );

  // packages/icons/build-module/library/button.mjs
  var import_primitives = __toESM(require_primitives(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  var button_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z" }) });

  // packages/icons/build-module/library/code.mjs
  var import_primitives2 = __toESM(require_primitives(), 1);
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  var code_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.Path, { d: "M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z" }) });

  // packages/icons/build-module/library/color.mjs
  var import_primitives3 = __toESM(require_primitives(), 1);
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
  var color_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.Path, { 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" }) });

  // packages/icons/build-module/library/format-bold.mjs
  var import_primitives4 = __toESM(require_primitives(), 1);
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
  var format_bold_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.Path, { d: "M14.7 11.3c1-.6 1.5-1.6 1.5-3 0-2.3-1.3-3.4-4-3.4H7v14h5.8c1.4 0 2.5-.3 3.3-1 .8-.7 1.2-1.7 1.2-2.9.1-1.9-.8-3.1-2.6-3.7zm-5.1-4h2.3c.6 0 1.1.1 1.4.4.3.3.5.7.5 1.2s-.2 1-.5 1.2c-.3.3-.8.4-1.4.4H9.6V7.3zm4.6 9c-.4.3-1 .4-1.7.4H9.6v-3.9h2.9c.7 0 1.3.2 1.7.5.4.3.6.8.6 1.5s-.2 1.2-.6 1.5z" }) });

  // packages/icons/build-module/library/format-italic.mjs
  var import_primitives5 = __toESM(require_primitives(), 1);
  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
  var format_italic_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.Path, { d: "M12.5 5L10 19h1.9l2.5-14z" }) });

  // packages/icons/build-module/library/format-strikethrough.mjs
  var import_primitives6 = __toESM(require_primitives(), 1);
  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
  var format_strikethrough_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.Path, { d: "M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z" }) });

  // packages/icons/build-module/library/help.mjs
  var import_primitives7 = __toESM(require_primitives(), 1);
  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
  var help_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.Path, { d: "M12 4a8 8 0 1 1 .001 16.001A8 8 0 0 1 12 4Zm0 1.5a6.5 6.5 0 1 0-.001 13.001A6.5 6.5 0 0 0 12 5.5Zm.75 11h-1.5V15h1.5v1.5Zm-.445-9.234a3 3 0 0 1 .445 5.89V14h-1.5v-1.25c0-.57.452-.958.917-1.01A1.5 1.5 0 0 0 12 8.75a1.5 1.5 0 0 0-1.5 1.5H9a3 3 0 0 1 3.305-2.984Z" }) });

  // packages/icons/build-module/library/language.mjs
  var import_primitives8 = __toESM(require_primitives(), 1);
  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
  var language_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.Path, { d: "M17.5 10h-1.7l-3.7 10.5h1.7l.9-2.6h3.9l.9 2.6h1.7L17.5 10zm-2.2 6.3 1.4-4 1.4 4h-2.8zm-4.8-3.8c1.6-1.8 2.9-3.6 3.7-5.7H16V5.2h-5.8V3H8.8v2.2H3v1.5h9.6c-.7 1.6-1.8 3.1-3.1 4.6C8.6 10.2 7.8 9 7.2 8H5.6c.6 1.4 1.7 2.9 2.9 4.4l-2.4 2.4c-.3.4-.7.8-1.1 1.2l1 1 1.2-1.2c.8-.8 1.6-1.5 2.3-2.3.8.9 1.7 1.7 2.5 2.5l.6-1.5c-.7-.6-1.4-1.3-2.1-2z" }) });

  // packages/icons/build-module/library/link.mjs
  var import_primitives9 = __toESM(require_primitives(), 1);
  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
  var link_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.Path, { d: "M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z" }) });

  // packages/icons/build-module/library/math.mjs
  var import_primitives10 = __toESM(require_primitives(), 1);
  var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
  var math_default = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.Path, { d: "M11.2 6.8c-.7 0-1.4.5-1.6 1.1l-2.8 7.5-1.2-1.8c-.1-.2-.4-.3-.6-.3H3v1.5h1.6l1.2 1.8c.6.9 1.9.7 2.2-.3l2.9-7.9s.1-.2.2-.2h7.8V6.7h-7.8Zm5.3 3.4-1.9 1.9-1.9-1.9-1.1 1.1 1.9 1.9-1.9 1.9 1.1 1.1 1.9-1.9 1.9 1.9 1.1-1.1-1.9-1.9 1.9-1.9-1.1-1.1Z" }) });

  // packages/icons/build-module/library/subscript.mjs
  var import_primitives11 = __toESM(require_primitives(), 1);
  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
  var subscript_default = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives11.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives11.Path, { d: "M16.9 18.3l.8-1.2c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.1-.3-.4-.5-.6-.7-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.2 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3L15 19.4h4.3v-1.2h-2.4zM14.1 7.2h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z" }) });

  // packages/icons/build-module/library/superscript.mjs
  var import_primitives12 = __toESM(require_primitives(), 1);
  var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
  var superscript_default = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.Path, { d: "M16.9 10.3l.8-1.3c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.2-.2-.4-.4-.7-.6-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.1 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3l-1.8 2.8h4.3v-1.2h-2.2zm-2.8-3.1h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z" }) });

  // packages/icons/build-module/library/text-color.mjs
  var import_primitives13 = __toESM(require_primitives(), 1);
  var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
  var text_color_default = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives13.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives13.Path, { d: "M12.9 6h-2l-4 11h1.9l1.1-3h4.2l1.1 3h1.9L12.9 6zm-2.5 6.5l1.5-4.9 1.7 4.9h-3.2z" }) });

  // packages/format-library/build-module/bold/index.mjs
  var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
  var name = "core/bold";
  var title = (0, import_i18n.__)("Bold");
  var bold = {
    name,
    title,
    tagName: "strong",
    className: null,
    edit({ isActive, value, onChange, onFocus, isVisible = true }) {
      function onToggle() {
        onChange((0, import_rich_text.toggleFormat)(value, { type: name, title }));
      }
      function onClick() {
        onChange((0, import_rich_text.toggleFormat)(value, { type: name }));
        onFocus();
      }
      return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
          import_block_editor.RichTextShortcut,
          {
            type: "primary",
            character: "b",
            onUse: onToggle
          }
        ),
        isVisible && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
          import_block_editor.RichTextToolbarButton,
          {
            name: "bold",
            icon: format_bold_default,
            title,
            onClick,
            isActive,
            shortcutType: "primary",
            shortcutCharacter: "b"
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
          import_block_editor.__unstableRichTextInputEvent,
          {
            inputType: "formatBold",
            onInput: onToggle
          }
        )
      ] });
    }
  };

  // packages/format-library/build-module/code/index.mjs
  var import_i18n2 = __toESM(require_i18n(), 1);
  var import_rich_text2 = __toESM(require_rich_text(), 1);
  var import_block_editor2 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
  var name2 = "core/code";
  var title2 = (0, import_i18n2.__)("Inline code");
  var code = {
    name: name2,
    title: title2,
    tagName: "code",
    className: null,
    __unstableInputRule(value) {
      const BACKTICK = "`";
      const { start, text } = value;
      const characterBefore = text[start - 1];
      if (characterBefore !== BACKTICK) {
        return value;
      }
      if (start - 2 < 0) {
        return value;
      }
      const indexBefore = text.lastIndexOf(BACKTICK, start - 2);
      if (indexBefore === -1) {
        return value;
      }
      const startIndex = indexBefore;
      const endIndex = start - 2;
      if (startIndex === endIndex) {
        return value;
      }
      value = (0, import_rich_text2.remove)(value, startIndex, startIndex + 1);
      value = (0, import_rich_text2.remove)(value, endIndex, endIndex + 1);
      value = (0, import_rich_text2.applyFormat)(value, { type: name2 }, startIndex, endIndex);
      return value;
    },
    edit({ value, onChange, onFocus, isActive }) {
      function onClick() {
        onChange((0, import_rich_text2.toggleFormat)(value, { type: name2, title: title2 }));
        onFocus();
      }
      return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
          import_block_editor2.RichTextShortcut,
          {
            type: "access",
            character: "x",
            onUse: onClick
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
          import_block_editor2.RichTextToolbarButton,
          {
            icon: code_default,
            title: title2,
            onClick,
            isActive,
            role: "menuitemcheckbox"
          }
        )
      ] });
    }
  };

  // packages/format-library/build-module/image/index.mjs
  var import_components = __toESM(require_components(), 1);
  var import_i18n3 = __toESM(require_i18n(), 1);
  var import_element2 = __toESM(require_element(), 1);
  var import_rich_text3 = __toESM(require_rich_text(), 1);
  var import_block_editor3 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
  var ALLOWED_MEDIA_TYPES = ["image"];
  var name3 = "core/image";
  var title3 = (0, import_i18n3.__)("Inline image");
  function getCurrentImageId(activeObjectAttributes) {
    if (!activeObjectAttributes?.className) {
      return void 0;
    }
    const [, id] = activeObjectAttributes.className.match(/wp-image-(\d+)/) ?? [];
    return id ? parseInt(id, 10) : void 0;
  }
  var image = {
    name: name3,
    title: title3,
    keywords: [(0, import_i18n3.__)("photo"), (0, import_i18n3.__)("media")],
    object: true,
    tagName: "img",
    className: null,
    attributes: {
      className: "class",
      style: "style",
      url: "src",
      alt: "alt"
    },
    edit: Edit
  };
  function InlineUI({ value, onChange, activeObjectAttributes, contentRef }) {
    const { style, alt } = activeObjectAttributes;
    const width = style?.replace(/\D/g, "");
    const [editedWidth, setEditedWidth] = (0, import_element2.useState)(width);
    const [editedAlt, setEditedAlt] = (0, import_element2.useState)(alt);
    const hasChanged = editedWidth !== width || editedAlt !== alt;
    const popoverAnchor = (0, import_rich_text3.useAnchor)({
      editableContentElement: contentRef.current,
      settings: image
    });
    return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
      import_components.Popover,
      {
        focusOnMount: false,
        anchor: popoverAnchor,
        className: "block-editor-format-toolbar__image-popover",
        children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
          "form",
          {
            className: "block-editor-format-toolbar__image-container-content",
            onSubmit: (event) => {
              const newReplacements = value.replacements.slice();
              newReplacements[value.start] = {
                type: name3,
                attributes: {
                  ...activeObjectAttributes,
                  style: editedWidth ? `width: ${editedWidth}px;` : "",
                  alt: editedAlt
                }
              };
              onChange({
                ...value,
                replacements: newReplacements
              });
              event.preventDefault();
            },
            children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_components.__experimentalVStack, { spacing: 4, children: [
              /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
                import_components.__experimentalNumberControl,
                {
                  __next40pxDefaultSize: true,
                  label: (0, import_i18n3.__)("Width"),
                  value: editedWidth,
                  min: 1,
                  onChange: (newWidth) => {
                    setEditedWidth(newWidth);
                  }
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
                import_components.TextareaControl,
                {
                  label: (0, import_i18n3.__)("Alternative text"),
                  value: editedAlt,
                  onChange: (newAlt) => {
                    setEditedAlt(newAlt);
                  },
                  help: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
                    /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
                      import_components.ExternalLink,
                      {
                        href: (
                          // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
                          (0, import_i18n3.__)(
                            "https://www.w3.org/WAI/tutorials/images/decision-tree/"
                          )
                        ),
                        children: (0, import_i18n3.__)(
                          "Describe the purpose of the image."
                        )
                      }
                    ),
                    /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("br", {}),
                    (0, import_i18n3.__)("Leave empty if decorative.")
                  ] })
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_components.__experimentalHStack, { justify: "right", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
                import_components.Button,
                {
                  disabled: !hasChanged,
                  accessibleWhenDisabled: true,
                  variant: "primary",
                  type: "submit",
                  size: "compact",
                  children: (0, import_i18n3.__)("Apply")
                }
              ) })
            ] })
          }
        )
      }
    );
  }
  function Edit({
    value,
    onChange,
    onFocus,
    isObjectActive,
    activeObjectAttributes,
    contentRef
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_block_editor3.MediaUploadCheck, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
        import_block_editor3.MediaUpload,
        {
          allowedTypes: ALLOWED_MEDIA_TYPES,
          value: getCurrentImageId(activeObjectAttributes),
          onSelect: ({ id, url, alt, width: imgWidth }) => {
            onChange(
              (0, import_rich_text3.insertObject)(value, {
                type: name3,
                attributes: {
                  className: `wp-image-${id}`,
                  style: `width: ${Math.min(
                    imgWidth,
                    150
                  )}px;`,
                  url,
                  alt
                }
              })
            );
            onFocus();
          },
          render: ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
            import_block_editor3.RichTextToolbarButton,
            {
              icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
                import_components.SVG,
                {
                  xmlns: "http://www.w3.org/2000/svg",
                  viewBox: "0 0 24 24",
                  children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_components.Path, { d: "M4 18.5h16V17H4v1.5zM16 13v1.5h4V13h-4zM5.1 15h7.8c.6 0 1.1-.5 1.1-1.1V6.1c0-.6-.5-1.1-1.1-1.1H5.1C4.5 5 4 5.5 4 6.1v7.8c0 .6.5 1.1 1.1 1.1zm.4-8.5h7V10l-1-1c-.3-.3-.8-.3-1 0l-1.6 1.5-1.2-.7c-.3-.2-.6-.2-.9 0l-1.3 1V6.5zm0 6.1l1.8-1.3 1.3.8c.3.2.7.2.9-.1l1.5-1.4 1.5 1.4v1.5h-7v-.9z" })
                }
              ),
              title: isObjectActive ? (0, import_i18n3.__)("Replace image") : title3,
              onClick: open,
              isActive: isObjectActive
            }
          )
        }
      ),
      isObjectActive && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
        InlineUI,
        {
          value,
          onChange,
          activeObjectAttributes,
          contentRef
        }
      )
    ] });
  }

  // packages/format-library/build-module/italic/index.mjs
  var import_i18n4 = __toESM(require_i18n(), 1);
  var import_rich_text4 = __toESM(require_rich_text(), 1);
  var import_block_editor4 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
  var name4 = "core/italic";
  var title4 = (0, import_i18n4.__)("Italic");
  var italic = {
    name: name4,
    title: title4,
    tagName: "em",
    className: null,
    edit({ isActive, value, onChange, onFocus, isVisible = true }) {
      function onToggle() {
        onChange((0, import_rich_text4.toggleFormat)(value, { type: name4, title: title4 }));
      }
      function onClick() {
        onChange((0, import_rich_text4.toggleFormat)(value, { type: name4 }));
        onFocus();
      }
      return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
          import_block_editor4.RichTextShortcut,
          {
            type: "primary",
            character: "i",
            onUse: onToggle
          }
        ),
        isVisible && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
          import_block_editor4.RichTextToolbarButton,
          {
            name: "italic",
            icon: format_italic_default,
            title: title4,
            onClick,
            isActive,
            shortcutType: "primary",
            shortcutCharacter: "i"
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
          import_block_editor4.__unstableRichTextInputEvent,
          {
            inputType: "formatItalic",
            onInput: onToggle
          }
        )
      ] });
    }
  };

  // packages/format-library/build-module/link/index.mjs
  var import_i18n7 = __toESM(require_i18n(), 1);
  var import_element5 = __toESM(require_element(), 1);
  var import_rich_text6 = __toESM(require_rich_text(), 1);
  var import_url3 = __toESM(require_url(), 1);
  var import_block_editor6 = __toESM(require_block_editor(), 1);
  var import_html_entities = __toESM(require_html_entities(), 1);
  var import_a11y2 = __toESM(require_a11y(), 1);

  // packages/format-library/build-module/link/inline.mjs
  var import_element4 = __toESM(require_element(), 1);
  var import_i18n6 = __toESM(require_i18n(), 1);
  var import_a11y = __toESM(require_a11y(), 1);
  var import_components3 = __toESM(require_components(), 1);
  var import_url2 = __toESM(require_url(), 1);
  var import_rich_text5 = __toESM(require_rich_text(), 1);
  var import_block_editor5 = __toESM(require_block_editor(), 1);
  var import_data = __toESM(require_data(), 1);

  // packages/format-library/build-module/link/utils.mjs
  var import_url = __toESM(require_url(), 1);
  function isValidHref(href) {
    if (!href) {
      return false;
    }
    const trimmedHref = href.trim();
    if (!trimmedHref) {
      return false;
    }
    if (/^\S+:/.test(trimmedHref)) {
      const protocol = (0, import_url.getProtocol)(trimmedHref);
      if (!(0, import_url.isValidProtocol)(protocol)) {
        return false;
      }
      if (protocol.startsWith("http") && !/^https?:\/\/[^\/\s]/i.test(trimmedHref)) {
        return false;
      }
      const authority = (0, import_url.getAuthority)(trimmedHref);
      if (!(0, import_url.isValidAuthority)(authority)) {
        return false;
      }
      const path = (0, import_url.getPath)(trimmedHref);
      if (path && !(0, import_url.isValidPath)(path)) {
        return false;
      }
      const queryString = (0, import_url.getQueryString)(trimmedHref);
      if (queryString && !(0, import_url.isValidQueryString)(queryString)) {
        return false;
      }
      const fragment = (0, import_url.getFragment)(trimmedHref);
      if (fragment && !(0, import_url.isValidFragment)(fragment)) {
        return false;
      }
    }
    if (trimmedHref.startsWith("#") && !(0, import_url.isValidFragment)(trimmedHref)) {
      return false;
    }
    return true;
  }
  function createLinkFormat({
    url,
    type,
    id,
    opensInNewWindow,
    nofollow,
    cssClasses
  }) {
    const format = {
      type: "core/link",
      attributes: {
        url
      }
    };
    if (type) {
      format.attributes.type = type;
    }
    if (id) {
      format.attributes.id = id;
    }
    if (opensInNewWindow) {
      format.attributes.target = "_blank";
      format.attributes.rel = format.attributes.rel ? format.attributes.rel + " noreferrer noopener" : "noreferrer noopener";
    }
    if (nofollow) {
      format.attributes.rel = format.attributes.rel ? format.attributes.rel + " nofollow" : "nofollow";
    }
    const trimmedCssClasses = cssClasses?.trim();
    if (trimmedCssClasses?.length) {
      format.attributes.class = trimmedCssClasses;
    }
    return format;
  }
  function getFormatBoundary(value, format, startIndex = value.start, endIndex = value.end) {
    const EMPTY_BOUNDARIES = {
      start: void 0,
      end: void 0
    };
    const { formats } = value;
    let targetFormat;
    let initialIndex;
    if (!formats?.length) {
      return EMPTY_BOUNDARIES;
    }
    const newFormats = formats.slice();
    const formatAtStart = newFormats[startIndex]?.find(
      ({ type }) => type === format.type
    );
    const formatAtEnd = newFormats[endIndex]?.find(
      ({ type }) => type === format.type
    );
    const formatAtEndMinusOne = newFormats[endIndex - 1]?.find(
      ({ type }) => type === format.type
    );
    if (!!formatAtStart) {
      targetFormat = formatAtStart;
      initialIndex = startIndex;
    } else if (!!formatAtEnd) {
      targetFormat = formatAtEnd;
      initialIndex = endIndex;
    } else if (!!formatAtEndMinusOne) {
      targetFormat = formatAtEndMinusOne;
      initialIndex = endIndex - 1;
    } else {
      return EMPTY_BOUNDARIES;
    }
    const index = newFormats[initialIndex].indexOf(targetFormat);
    const walkingArgs = [newFormats, initialIndex, targetFormat, index];
    startIndex = walkToStart(...walkingArgs);
    endIndex = walkToEnd(...walkingArgs);
    startIndex = startIndex < 0 ? 0 : startIndex;
    return {
      start: startIndex,
      end: endIndex + 1
    };
  }
  function walkToBoundary(formats, initialIndex, targetFormatRef, formatIndex, direction) {
    let index = initialIndex;
    const directions = {
      forwards: 1,
      backwards: -1
    };
    const directionIncrement = directions[direction] || 1;
    const inverseDirectionIncrement = directionIncrement * -1;
    while (formats[index] && formats[index][formatIndex] === targetFormatRef) {
      index = index + directionIncrement;
    }
    index = index + inverseDirectionIncrement;
    return index;
  }
  var partialRight = (fn, ...partialArgs) => (...args) => fn(...args, ...partialArgs);
  var walkToStart = partialRight(walkToBoundary, "backwards");
  var walkToEnd = partialRight(walkToBoundary, "forwards");

  // packages/format-library/build-module/link/css-classes-setting.mjs
  var import_element3 = __toESM(require_element(), 1);
  var import_compose = __toESM(require_compose(), 1);
  var import_i18n5 = __toESM(require_i18n(), 1);
  var import_components2 = __toESM(require_components(), 1);
  var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
  var CSSClassesSettingComponent = ({ setting, value, onChange }) => {
    const hasValue = value ? value?.cssClasses?.length > 0 : false;
    const [isSettingActive, setIsSettingActive] = (0, import_element3.useState)(hasValue);
    const instanceId = (0, import_compose.useInstanceId)(CSSClassesSettingComponent);
    const controlledRegionId = `css-classes-setting-${instanceId}`;
    const handleSettingChange = (newValue) => {
      const sanitizedValue = typeof newValue === "string" ? newValue.replace(/,/g, " ").replace(/\s+/g, " ").trim() : newValue;
      onChange({
        ...value,
        [setting.id]: sanitizedValue
      });
    };
    const handleCheckboxChange = () => {
      if (isSettingActive) {
        if (hasValue) {
          handleSettingChange("");
        }
        setIsSettingActive(false);
      } else {
        setIsSettingActive(true);
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("fieldset", { children: [
      /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_components2.VisuallyHidden, { as: "legend", children: setting.title }),
      /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_components2.__experimentalVStack, { spacing: 3, children: [
        /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
          import_components2.CheckboxControl,
          {
            label: setting.title,
            onChange: handleCheckboxChange,
            checked: isSettingActive || hasValue,
            "aria-expanded": isSettingActive,
            "aria-controls": isSettingActive ? controlledRegionId : void 0
          }
        ),
        isSettingActive && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { id: controlledRegionId, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
          import_components2.__experimentalInputControl,
          {
            label: (0, import_i18n5.__)("CSS classes"),
            value: value?.cssClasses,
            onChange: handleSettingChange,
            help: (0, import_i18n5.__)(
              "Separate multiple classes with spaces."
            ),
            __unstableInputWidth: "100%",
            __next40pxDefaultSize: true
          }
        ) })
      ] })
    ] });
  };
  var css_classes_setting_default = CSSClassesSettingComponent;

  // packages/format-library/build-module/link/inline.mjs
  var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
  var LINK_SETTINGS = [
    ...import_block_editor5.LinkControl.DEFAULT_LINK_SETTINGS,
    {
      id: "nofollow",
      title: (0, import_i18n6.__)("Mark as nofollow")
    },
    {
      id: "cssClasses",
      title: (0, import_i18n6.__)("Additional CSS class(es)"),
      render: (setting, value, onChange) => {
        return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
          css_classes_setting_default,
          {
            setting,
            value,
            onChange
          }
        );
      }
    }
  ];
  function InlineLinkUI({
    isActive,
    activeAttributes,
    value,
    onChange,
    onFocusOutside,
    stopAddingLink,
    contentRef,
    focusOnMount
  }) {
    const richLinkTextValue = getRichTextValueFromSelection(value, isActive);
    const richTextText = richLinkTextValue.text;
    const { selectionChange } = (0, import_data.useDispatch)(import_block_editor5.store);
    const { createPageEntity, userCanCreatePages, selectionStart } = (0, import_data.useSelect)(
      (select) => {
        const { getSettings, getSelectionStart } = select(import_block_editor5.store);
        const _settings = getSettings();
        return {
          createPageEntity: _settings.__experimentalCreatePageEntity,
          userCanCreatePages: _settings.__experimentalUserCanCreatePages,
          selectionStart: getSelectionStart()
        };
      },
      []
    );
    const linkValue = (0, import_element4.useMemo)(
      () => ({
        url: activeAttributes.url,
        type: activeAttributes.type,
        id: activeAttributes.id,
        opensInNewTab: activeAttributes.target === "_blank",
        nofollow: activeAttributes.rel?.includes("nofollow"),
        title: richTextText,
        cssClasses: activeAttributes.class
      }),
      [
        activeAttributes.class,
        activeAttributes.id,
        activeAttributes.rel,
        activeAttributes.target,
        activeAttributes.type,
        activeAttributes.url,
        richTextText
      ]
    );
    function removeLink() {
      const newValue = (0, import_rich_text5.removeFormat)(value, "core/link");
      onChange(newValue);
      stopAddingLink();
      (0, import_a11y.speak)((0, import_i18n6.__)("Link removed."), "assertive");
    }
    function onChangeLink(nextValue) {
      const hasLink = linkValue?.url;
      const isNewLink = !hasLink;
      nextValue = {
        ...linkValue,
        ...nextValue
      };
      const newUrl = (0, import_url2.prependHTTPS)(nextValue.url);
      const linkFormat = createLinkFormat({
        url: newUrl,
        type: nextValue.type,
        id: nextValue.id !== void 0 && nextValue.id !== null ? String(nextValue.id) : void 0,
        opensInNewWindow: nextValue.opensInNewTab,
        nofollow: nextValue.nofollow,
        cssClasses: nextValue.cssClasses
      });
      const newText = nextValue.title || newUrl;
      let newValue;
      if ((0, import_rich_text5.isCollapsed)(value) && !isActive) {
        const inserted = (0, import_rich_text5.insert)(value, newText);
        newValue = (0, import_rich_text5.applyFormat)(
          inserted,
          linkFormat,
          value.start,
          value.start + newText.length
        );
        onChange(newValue);
        stopAddingLink();
        selectionChange({
          clientId: selectionStart.clientId,
          identifier: selectionStart.attributeKey,
          start: value.start + newText.length + 1
        });
        return;
      } else if (newText === richTextText) {
        const boundary = getFormatBoundary(value, {
          type: "core/link"
        });
        newValue = (0, import_rich_text5.applyFormat)(
          value,
          linkFormat,
          boundary.start,
          boundary.end
        );
      } else {
        newValue = (0, import_rich_text5.create)({ text: newText });
        newValue = (0, import_rich_text5.applyFormat)(newValue, linkFormat, 0, newText.length);
        const boundary = getFormatBoundary(value, {
          type: "core/link"
        });
        const [valBefore, valAfter] = (0, import_rich_text5.split)(
          value,
          boundary.start,
          boundary.start
        );
        const newValAfter = (0, import_rich_text5.replace)(valAfter, richTextText, newValue);
        newValue = (0, import_rich_text5.concat)(valBefore, newValAfter);
      }
      onChange(newValue);
      if (!isNewLink) {
        stopAddingLink();
      }
      if (!isValidHref(newUrl)) {
        (0, import_a11y.speak)(
          (0, import_i18n6.__)(
            "Warning: the link has been inserted but may have errors. Please test it."
          ),
          "assertive"
        );
      } else if (isActive) {
        (0, import_a11y.speak)((0, import_i18n6.__)("Link edited."), "assertive");
      } else {
        (0, import_a11y.speak)((0, import_i18n6.__)("Link inserted."), "assertive");
      }
    }
    const popoverAnchor = (0, import_rich_text5.useAnchor)({
      editableContentElement: contentRef.current,
      settings: {
        ...link,
        isActive
      }
    });
    async function handleCreate(pageTitle) {
      const page = await createPageEntity({
        title: pageTitle,
        status: "draft"
      });
      return {
        id: page.id,
        type: page.type,
        title: page.title.rendered,
        url: page.link,
        kind: "post-type"
      };
    }
    function createButtonText(searchTerm) {
      return (0, import_element4.createInterpolateElement)(
        (0, import_i18n6.sprintf)(
          /* translators: %s: search term. */
          (0, import_i18n6.__)("Create page: <mark>%s</mark>"),
          searchTerm
        ),
        { mark: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("mark", {}) }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
      import_components3.Popover,
      {
        anchor: popoverAnchor,
        animate: false,
        onClose: stopAddingLink,
        onFocusOutside,
        placement: "bottom",
        offset: 8,
        shift: true,
        focusOnMount,
        constrainTabbing: true,
        children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
          import_block_editor5.LinkControl,
          {
            value: linkValue,
            onChange: onChangeLink,
            onRemove: removeLink,
            hasRichPreviews: true,
            createSuggestion: createPageEntity && handleCreate,
            withCreateSuggestion: userCanCreatePages,
            createSuggestionButtonText: createButtonText,
            hasTextControl: true,
            settings: LINK_SETTINGS,
            showInitialSuggestions: true,
            suggestionsQuery: {
              // always show Pages as initial suggestions
              initialSuggestionsSearchOptions: {
                type: "post",
                subtype: "page",
                perPage: 20
              }
            }
          }
        )
      }
    );
  }
  function getRichTextValueFromSelection(value, isActive) {
    let textStart = value.start;
    let textEnd = value.end;
    if (isActive) {
      const boundary = getFormatBoundary(value, {
        type: "core/link"
      });
      textStart = boundary.start;
      textEnd = boundary.end;
    }
    return (0, import_rich_text5.slice)(value, textStart, textEnd);
  }
  var inline_default = InlineLinkUI;

  // packages/format-library/build-module/link/index.mjs
  var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
  var name5 = "core/link";
  var title5 = (0, import_i18n7.__)("Link");
  function Edit2({
    isActive,
    activeAttributes,
    value,
    onChange,
    onFocus,
    contentRef,
    isVisible = true
  }) {
    const [addingLink, setAddingLink] = (0, import_element5.useState)(false);
    const [openedBy, setOpenedBy] = (0, import_element5.useState)(null);
    (0, import_element5.useEffect)(() => {
      if (!isActive) {
        setAddingLink(false);
      }
    }, [isActive]);
    (0, import_element5.useLayoutEffect)(() => {
      const editableContentElement = contentRef.current;
      if (!editableContentElement) {
        return;
      }
      function handleClick(event) {
        const link2 = event.target.closest("[contenteditable] a");
        if (!link2 || // other formats (e.g. bold) may be nested within the link.
        !isActive) {
          return;
        }
        setAddingLink(true);
        setOpenedBy({
          el: link2,
          action: "click"
        });
      }
      editableContentElement.addEventListener("click", handleClick);
      return () => {
        editableContentElement.removeEventListener("click", handleClick);
      };
    }, [contentRef, isActive]);
    function addLink(target) {
      const text = (0, import_rich_text6.getTextContent)((0, import_rich_text6.slice)(value));
      if (!isActive && text && (0, import_url3.isURL)(text) && isValidHref(text)) {
        onChange(
          (0, import_rich_text6.applyFormat)(value, {
            type: name5,
            attributes: { url: text }
          })
        );
      } else if (!isActive && text && (0, import_url3.isEmail)(text)) {
        onChange(
          (0, import_rich_text6.applyFormat)(value, {
            type: name5,
            attributes: { url: `mailto:${text}` }
          })
        );
      } else if (!isActive && text && (0, import_url3.isPhoneNumber)(text)) {
        onChange(
          (0, import_rich_text6.applyFormat)(value, {
            type: name5,
            attributes: { url: `tel:${text.replace(/\D/g, "")}` }
          })
        );
      } else {
        if (target) {
          setOpenedBy({
            el: target,
            action: null
            // We don't need to distinguish between click or keyboard here
          });
        }
        setAddingLink(true);
      }
    }
    function stopAddingLink() {
      setAddingLink(false);
      if (openedBy?.el?.tagName === "BUTTON") {
        openedBy.el.focus();
      } else {
        onFocus();
      }
      setOpenedBy(null);
    }
    function onFocusOutside() {
      setAddingLink(false);
      setOpenedBy(null);
    }
    function onRemoveFormat() {
      onChange((0, import_rich_text6.removeFormat)(value, name5));
      (0, import_a11y2.speak)((0, import_i18n7.__)("Link removed."), "assertive");
    }
    const shouldAutoFocus = !(openedBy?.el?.tagName === "A" && openedBy?.action === "click");
    const hasSelection = !(0, import_rich_text6.isCollapsed)(value);
    return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
      hasSelection && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
        import_block_editor6.RichTextShortcut,
        {
          type: "primary",
          character: "k",
          onUse: addLink
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
        import_block_editor6.RichTextShortcut,
        {
          type: "primaryShift",
          character: "k",
          onUse: onRemoveFormat
        }
      ),
      isVisible && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
        import_block_editor6.RichTextToolbarButton,
        {
          name: "link",
          icon: link_default,
          title: isActive ? (0, import_i18n7.__)("Link") : title5,
          onClick: (event) => {
            addLink(event.currentTarget);
          },
          isActive: isActive || addingLink,
          shortcutType: "primary",
          shortcutCharacter: "k",
          "aria-haspopup": "true",
          "aria-expanded": addingLink
        }
      ),
      isVisible && addingLink && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
        inline_default,
        {
          stopAddingLink,
          onFocusOutside,
          isActive,
          activeAttributes,
          value,
          onChange,
          contentRef,
          focusOnMount: shouldAutoFocus ? "firstElement" : false
        }
      )
    ] });
  }
  var link = {
    name: name5,
    title: title5,
    tagName: "a",
    className: null,
    attributes: {
      url: "href",
      type: "data-type",
      id: "data-id",
      _id: "id",
      target: "target",
      rel: "rel",
      class: "class"
    },
    __unstablePasteRule(value, { html, plainText }) {
      const pastedText = (html || plainText).replace(/<[^>]+>/g, "").trim();
      if (!(0, import_url3.isURL)(pastedText) || !/^https?:/.test(pastedText)) {
        return value;
      }
      window.console.log("Created link:\n\n", pastedText);
      const format = {
        type: name5,
        attributes: {
          url: (0, import_html_entities.decodeEntities)(pastedText)
        }
      };
      if ((0, import_rich_text6.isCollapsed)(value)) {
        return (0, import_rich_text6.insert)(
          value,
          (0, import_rich_text6.applyFormat)(
            (0, import_rich_text6.create)({ text: plainText }),
            format,
            0,
            plainText.length
          )
        );
      }
      return (0, import_rich_text6.applyFormat)(value, format);
    },
    edit: Edit2
  };

  // packages/format-library/build-module/strikethrough/index.mjs
  var import_i18n8 = __toESM(require_i18n(), 1);
  var import_rich_text7 = __toESM(require_rich_text(), 1);
  var import_block_editor7 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
  var name6 = "core/strikethrough";
  var title6 = (0, import_i18n8.__)("Strikethrough");
  var strikethrough = {
    name: name6,
    title: title6,
    tagName: "s",
    className: null,
    edit({ isActive, value, onChange, onFocus }) {
      function onClick() {
        onChange((0, import_rich_text7.toggleFormat)(value, { type: name6, title: title6 }));
        onFocus();
      }
      return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
          import_block_editor7.RichTextShortcut,
          {
            type: "access",
            character: "d",
            onUse: onClick
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
          import_block_editor7.RichTextToolbarButton,
          {
            icon: format_strikethrough_default,
            title: title6,
            onClick,
            isActive,
            role: "menuitemcheckbox"
          }
        )
      ] });
    }
  };

  // packages/format-library/build-module/underline/index.mjs
  var import_i18n9 = __toESM(require_i18n(), 1);
  var import_rich_text8 = __toESM(require_rich_text(), 1);
  var import_block_editor8 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
  var name7 = "core/underline";
  var title7 = (0, import_i18n9.__)("Underline");
  var underline = {
    name: name7,
    title: title7,
    tagName: "span",
    className: null,
    attributes: {
      style: "style"
    },
    edit({ value, onChange }) {
      const onToggle = () => {
        onChange(
          (0, import_rich_text8.toggleFormat)(value, {
            type: name7,
            attributes: {
              style: "text-decoration: underline;"
            },
            title: title7
          })
        );
      };
      return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
          import_block_editor8.RichTextShortcut,
          {
            type: "primary",
            character: "u",
            onUse: onToggle
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
          import_block_editor8.__unstableRichTextInputEvent,
          {
            inputType: "formatUnderline",
            onInput: onToggle
          }
        )
      ] });
    }
  };

  // packages/format-library/build-module/text-color/index.mjs
  var import_i18n11 = __toESM(require_i18n(), 1);
  var import_element7 = __toESM(require_element(), 1);
  var import_block_editor10 = __toESM(require_block_editor(), 1);
  var import_rich_text10 = __toESM(require_rich_text(), 1);

  // packages/format-library/build-module/text-color/inline.mjs
  var import_element6 = __toESM(require_element(), 1);
  var import_data2 = __toESM(require_data(), 1);
  var import_rich_text9 = __toESM(require_rich_text(), 1);
  var import_block_editor9 = __toESM(require_block_editor(), 1);
  var import_components4 = __toESM(require_components(), 1);
  var import_i18n10 = __toESM(require_i18n(), 1);

  // packages/format-library/build-module/lock-unlock.mjs
  var import_private_apis = __toESM(require_private_apis(), 1);
  var { lock, unlock } = (0, import_private_apis.__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/format-library"
  );

  // packages/format-library/build-module/text-color/inline.mjs
  var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
  var { Tabs } = unlock(import_components4.privateApis);
  var TABS = [
    { name: "color", title: (0, import_i18n10.__)("Text") },
    { name: "backgroundColor", title: (0, import_i18n10.__)("Background") }
  ];
  function parseCSS(css = "") {
    return css.split(";").reduce((accumulator, rule) => {
      if (rule) {
        const [property, value] = rule.split(":");
        if (property === "color") {
          accumulator.color = value;
        }
        if (property === "background-color" && value !== transparentValue) {
          accumulator.backgroundColor = value;
        }
      }
      return accumulator;
    }, {});
  }
  function parseClassName(className = "", colorSettings) {
    return className.split(" ").reduce((accumulator, name16) => {
      if (name16.startsWith("has-") && name16.endsWith("-color")) {
        const colorSlug = name16.replace(/^has-/, "").replace(/-color$/, "");
        const colorObject = (0, import_block_editor9.getColorObjectByAttributeValues)(
          colorSettings,
          colorSlug
        );
        accumulator.color = colorObject.color;
      }
      return accumulator;
    }, {});
  }
  function getActiveColors(value, name16, colorSettings) {
    const activeColorFormat = (0, import_rich_text9.getActiveFormat)(value, name16);
    if (!activeColorFormat) {
      return {};
    }
    return {
      ...parseCSS(activeColorFormat.attributes.style),
      ...parseClassName(activeColorFormat.attributes.class, colorSettings)
    };
  }
  function setColors(value, name16, colorSettings, colors) {
    const { color, backgroundColor } = {
      ...getActiveColors(value, name16, colorSettings),
      ...colors
    };
    if (!color && !backgroundColor) {
      return (0, import_rich_text9.removeFormat)(value, name16);
    }
    const styles = [];
    const classNames = [];
    const attributes = {};
    if (backgroundColor) {
      styles.push(["background-color", backgroundColor].join(":"));
    } else {
      styles.push(["background-color", transparentValue].join(":"));
    }
    if (color) {
      const colorObject = (0, import_block_editor9.getColorObjectByColorValue)(colorSettings, color);
      if (colorObject) {
        classNames.push((0, import_block_editor9.getColorClassName)("color", colorObject.slug));
      } else {
        styles.push(["color", color].join(":"));
      }
    }
    if (styles.length) {
      attributes.style = styles.join(";");
    }
    if (classNames.length) {
      attributes.class = classNames.join(" ");
    }
    return (0, import_rich_text9.applyFormat)(value, { type: name16, attributes });
  }
  function ColorPicker({ name: name16, property, value, onChange }) {
    const colors = (0, import_data2.useSelect)((select) => {
      const { getSettings } = select(import_block_editor9.store);
      return getSettings().colors ?? [];
    }, []);
    const activeColors = (0, import_element6.useMemo)(
      () => getActiveColors(value, name16, colors),
      [name16, value, colors]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
      import_block_editor9.ColorPalette,
      {
        value: activeColors[property],
        onChange: (color) => {
          onChange(
            setColors(value, name16, colors, { [property]: color })
          );
        },
        enableAlpha: true,
        __experimentalIsRenderedInSidebar: true
      }
    );
  }
  function InlineColorUI({
    name: name16,
    value,
    onChange,
    onClose,
    contentRef,
    isActive
  }) {
    const popoverAnchor = (0, import_rich_text9.useAnchor)({
      editableContentElement: contentRef.current,
      settings: { ...textColor, isActive }
    });
    return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
      import_components4.Popover,
      {
        onClose,
        className: "format-library__inline-color-popover",
        anchor: popoverAnchor,
        children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Tabs, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Tabs.TabList, { children: TABS.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Tabs.Tab, { tabId: tab.name, children: tab.title }, tab.name)) }),
          TABS.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
            Tabs.TabPanel,
            {
              tabId: tab.name,
              focusable: false,
              children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
                ColorPicker,
                {
                  name: name16,
                  property: tab.name,
                  value,
                  onChange
                }
              )
            },
            tab.name
          ))
        ] })
      }
    );
  }

  // packages/format-library/build-module/text-color/index.mjs
  var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
  var transparentValue = "rgba(0, 0, 0, 0)";
  var name8 = "core/text-color";
  var title8 = (0, import_i18n11.__)("Highlight");
  var EMPTY_ARRAY = [];
  function getComputedStyleProperty(element, property) {
    const { ownerDocument } = element;
    const { defaultView } = ownerDocument;
    const style = defaultView.getComputedStyle(element);
    const value = style.getPropertyValue(property);
    if (property === "background-color" && value === transparentValue && element.parentElement) {
      return getComputedStyleProperty(element.parentElement, property);
    }
    return value;
  }
  function fillComputedColors(element, { color, backgroundColor }) {
    if (!color && !backgroundColor) {
      return;
    }
    return {
      color: color || getComputedStyleProperty(element, "color"),
      backgroundColor: backgroundColor === transparentValue ? getComputedStyleProperty(element, "background-color") : backgroundColor
    };
  }
  function TextColorEdit({
    value,
    onChange,
    isActive,
    activeAttributes,
    contentRef
  }) {
    const [allowCustomControl, colors = EMPTY_ARRAY] = (0, import_block_editor10.useSettings)(
      "color.custom",
      "color.palette"
    );
    const [isAddingColor, setIsAddingColor] = (0, import_element7.useState)(false);
    const colorIndicatorStyle = (0, import_element7.useMemo)(
      () => fillComputedColors(
        contentRef.current,
        getActiveColors(value, name8, colors)
      ),
      [contentRef, value, colors]
    );
    const hasColorsToChoose = !!colors.length || allowCustomControl;
    if (!hasColorsToChoose && !isActive) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
        import_block_editor10.RichTextToolbarButton,
        {
          className: "format-library-text-color-button",
          isActive,
          icon: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
            icon_default,
            {
              icon: Object.keys(activeAttributes).length ? text_color_default : color_default,
              style: colorIndicatorStyle
            }
          ),
          title: title8,
          onClick: hasColorsToChoose ? () => setIsAddingColor(true) : () => onChange((0, import_rich_text10.removeFormat)(value, name8)),
          role: "menuitemcheckbox"
        }
      ),
      isAddingColor && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
        InlineColorUI,
        {
          name: name8,
          onClose: () => setIsAddingColor(false),
          activeAttributes,
          value,
          onChange,
          contentRef,
          isActive
        }
      )
    ] });
  }
  var textColor = {
    name: name8,
    title: title8,
    tagName: "mark",
    className: "has-inline-color",
    attributes: {
      style: "style",
      class: "class"
    },
    edit: TextColorEdit
  };

  // packages/format-library/build-module/subscript/index.mjs
  var import_i18n12 = __toESM(require_i18n(), 1);
  var import_rich_text11 = __toESM(require_rich_text(), 1);
  var import_block_editor11 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
  var name9 = "core/subscript";
  var title9 = (0, import_i18n12.__)("Subscript");
  var subscript = {
    name: name9,
    title: title9,
    tagName: "sub",
    className: null,
    edit({ isActive, value, onChange, onFocus }) {
      function onToggle() {
        onChange((0, import_rich_text11.toggleFormat)(value, { type: name9, title: title9 }));
      }
      function onClick() {
        onToggle();
        onFocus();
      }
      return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
        import_block_editor11.RichTextToolbarButton,
        {
          icon: subscript_default,
          title: title9,
          onClick,
          isActive,
          role: "menuitemcheckbox"
        }
      );
    }
  };

  // packages/format-library/build-module/superscript/index.mjs
  var import_i18n13 = __toESM(require_i18n(), 1);
  var import_rich_text12 = __toESM(require_rich_text(), 1);
  var import_block_editor12 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
  var name10 = "core/superscript";
  var title10 = (0, import_i18n13.__)("Superscript");
  var superscript = {
    name: name10,
    title: title10,
    tagName: "sup",
    className: null,
    edit({ isActive, value, onChange, onFocus }) {
      function onToggle() {
        onChange((0, import_rich_text12.toggleFormat)(value, { type: name10, title: title10 }));
      }
      function onClick() {
        onToggle();
        onFocus();
      }
      return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
        import_block_editor12.RichTextToolbarButton,
        {
          icon: superscript_default,
          title: title10,
          onClick,
          isActive,
          role: "menuitemcheckbox"
        }
      );
    }
  };

  // packages/format-library/build-module/keyboard/index.mjs
  var import_i18n14 = __toESM(require_i18n(), 1);
  var import_rich_text13 = __toESM(require_rich_text(), 1);
  var import_block_editor13 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
  var name11 = "core/keyboard";
  var title11 = (0, import_i18n14.__)("Keyboard input");
  var keyboard = {
    name: name11,
    title: title11,
    tagName: "kbd",
    className: null,
    edit({ isActive, value, onChange, onFocus }) {
      function onToggle() {
        onChange((0, import_rich_text13.toggleFormat)(value, { type: name11, title: title11 }));
      }
      function onClick() {
        onToggle();
        onFocus();
      }
      return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
        import_block_editor13.RichTextToolbarButton,
        {
          icon: button_default,
          title: title11,
          onClick,
          isActive,
          role: "menuitemcheckbox"
        }
      );
    }
  };

  // packages/format-library/build-module/unknown/index.mjs
  var import_i18n15 = __toESM(require_i18n(), 1);
  var import_rich_text14 = __toESM(require_rich_text(), 1);
  var import_block_editor14 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
  var name12 = "core/unknown";
  var title12 = (0, import_i18n15.__)("Clear Unknown Formatting");
  function selectionContainsUnknownFormats(value) {
    if ((0, import_rich_text14.isCollapsed)(value)) {
      return false;
    }
    const selectedValue = (0, import_rich_text14.slice)(value);
    return selectedValue.formats.some((formats) => {
      return formats.some((format) => format.type === name12);
    });
  }
  var unknown = {
    name: name12,
    title: title12,
    tagName: "*",
    className: null,
    edit({ isActive, value, onChange, onFocus }) {
      if (!isActive && !selectionContainsUnknownFormats(value)) {
        return null;
      }
      function onClick() {
        onChange((0, import_rich_text14.removeFormat)(value, name12));
        onFocus();
      }
      return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
        import_block_editor14.RichTextToolbarButton,
        {
          name: "unknown",
          icon: help_default,
          title: title12,
          onClick,
          isActive: true
        }
      );
    }
  };

  // packages/format-library/build-module/language/index.mjs
  var import_i18n16 = __toESM(require_i18n(), 1);
  var import_block_editor15 = __toESM(require_block_editor(), 1);
  var import_components5 = __toESM(require_components(), 1);
  var import_element8 = __toESM(require_element(), 1);
  var import_rich_text15 = __toESM(require_rich_text(), 1);
  var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
  var name13 = "core/language";
  var title13 = (0, import_i18n16.__)("Language");
  var language = {
    name: name13,
    title: title13,
    tagName: "bdo",
    className: null,
    attributes: {
      lang: "lang",
      dir: "dir"
    },
    edit: Edit3
  };
  function Edit3({ isActive, value, onChange, contentRef }) {
    const [isPopoverVisible, setIsPopoverVisible] = (0, import_element8.useState)(false);
    const togglePopover = () => {
      setIsPopoverVisible((state) => !state);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
        import_block_editor15.RichTextToolbarButton,
        {
          icon: language_default,
          label: title13,
          title: title13,
          onClick: () => {
            if (isActive) {
              onChange((0, import_rich_text15.removeFormat)(value, name13));
            } else {
              togglePopover();
            }
          },
          isActive,
          role: "menuitemcheckbox"
        }
      ),
      isPopoverVisible && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
        InlineLanguageUI,
        {
          value,
          onChange,
          onClose: togglePopover,
          contentRef
        }
      )
    ] });
  }
  function InlineLanguageUI({ value, contentRef, onChange, onClose }) {
    const popoverAnchor = (0, import_rich_text15.useAnchor)({
      editableContentElement: contentRef.current,
      settings: language
    });
    const [lang, setLang] = (0, import_element8.useState)("");
    const [dir, setDir] = (0, import_element8.useState)("ltr");
    return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
      import_components5.Popover,
      {
        className: "block-editor-format-toolbar__language-popover",
        anchor: popoverAnchor,
        onClose,
        children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
          import_components5.__experimentalVStack,
          {
            as: "form",
            spacing: 4,
            className: "block-editor-format-toolbar__language-container-content",
            onSubmit: (event) => {
              event.preventDefault();
              onChange(
                (0, import_rich_text15.applyFormat)(value, {
                  type: name13,
                  attributes: {
                    lang,
                    dir
                  }
                })
              );
              onClose();
            },
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
                import_components5.TextControl,
                {
                  __next40pxDefaultSize: true,
                  label: title13,
                  value: lang,
                  onChange: (val) => setLang(val),
                  help: (0, import_i18n16.__)(
                    'A valid language attribute, like "en" or "fr".'
                  )
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
                import_components5.SelectControl,
                {
                  __next40pxDefaultSize: true,
                  label: (0, import_i18n16.__)("Text direction"),
                  value: dir,
                  options: [
                    {
                      label: (0, import_i18n16.__)("Left to right"),
                      value: "ltr"
                    },
                    {
                      label: (0, import_i18n16.__)("Right to left"),
                      value: "rtl"
                    }
                  ],
                  onChange: (val) => setDir(val)
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components5.__experimentalHStack, { alignment: "right", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
                import_components5.Button,
                {
                  __next40pxDefaultSize: true,
                  variant: "primary",
                  type: "submit",
                  text: (0, import_i18n16.__)("Apply")
                }
              ) })
            ]
          }
        )
      }
    );
  }

  // packages/format-library/build-module/math/index.mjs
  var import_i18n17 = __toESM(require_i18n(), 1);
  var import_element9 = __toESM(require_element(), 1);
  var import_rich_text16 = __toESM(require_rich_text(), 1);
  var import_block_editor16 = __toESM(require_block_editor(), 1);
  var import_components6 = __toESM(require_components(), 1);
  var import_a11y3 = __toESM(require_a11y(), 1);
  var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
  var { Badge } = unlock(import_components6.privateApis);
  var name14 = "core/math";
  var title14 = (0, import_i18n17.__)("Math");
  function InlineUI2({
    value,
    onChange,
    activeAttributes,
    contentRef,
    latexToMathML
  }) {
    const [latex, setLatex] = (0, import_element9.useState)(
      activeAttributes?.["data-latex"] || ""
    );
    const [error, setError] = (0, import_element9.useState)(null);
    const popoverAnchor = (0, import_rich_text16.useAnchor)({
      editableContentElement: contentRef.current,
      settings: math
    });
    const handleLatexChange = (newLatex) => {
      let mathML = "";
      setLatex(newLatex);
      if (newLatex) {
        try {
          mathML = latexToMathML(newLatex, { displayMode: false });
          setError(null);
        } catch (err) {
          setError(err.message);
          (0, import_a11y3.speak)(
            (0, import_i18n17.sprintf)(
              /* translators: %s: error message returned when parsing LaTeX. */
              (0, import_i18n17.__)("Error parsing mathematical expression: %s"),
              err.message
            )
          );
          return;
        }
      }
      const newReplacements = value.replacements.slice();
      newReplacements[value.start] = {
        type: name14,
        attributes: {
          "data-latex": newLatex
        },
        innerHTML: mathML
      };
      onChange({
        ...value,
        replacements: newReplacements
      });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
      import_components6.Popover,
      {
        placement: "bottom-start",
        offset: 8,
        focusOnMount: false,
        anchor: popoverAnchor,
        className: "block-editor-format-toolbar__math-popover",
        children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { style: { minWidth: "300px", padding: "4px" }, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_components6.__experimentalVStack, { spacing: 1, children: [
          /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
            import_components6.TextControl,
            {
              __next40pxDefaultSize: true,
              hideLabelFromVision: true,
              label: (0, import_i18n17.__)("LaTeX math syntax"),
              value: latex,
              onChange: handleLatexChange,
              placeholder: (0, import_i18n17.__)("e.g., x^2, \\frac{a}{b}"),
              autoComplete: "off",
              className: "block-editor-format-toolbar__math-input"
            }
          ),
          error && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
              Badge,
              {
                intent: "error",
                className: "wp-block-math__error",
                children: (0, import_i18n17.sprintf)(
                  /* translators: %s: error message returned when parsing LaTeX. */
                  (0, import_i18n17.__)("Error: %s"),
                  error
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("style", { children: ".wp-block-math__error .components-badge__content{white-space:normal}" })
          ] })
        ] }) })
      }
    );
  }
  function Edit4({
    value,
    onChange,
    onFocus,
    isObjectActive,
    activeObjectAttributes,
    contentRef
  }) {
    const [latexToMathML, setLatexToMathML] = (0, import_element9.useState)();
    (0, import_element9.useEffect)(() => {
      import("@wordpress/latex-to-mathml").then((module) => {
        setLatexToMathML(() => module.default);
      });
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
        import_block_editor16.RichTextToolbarButton,
        {
          icon: math_default,
          title: title14,
          onClick: () => {
            const newValue = (0, import_rich_text16.insertObject)(value, {
              type: name14,
              attributes: {
                "data-latex": ""
              },
              innerHTML: ""
            });
            newValue.start = newValue.end - 1;
            onChange(newValue);
            onFocus();
          },
          isActive: isObjectActive
        }
      ),
      isObjectActive && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
        InlineUI2,
        {
          value,
          onChange,
          activeAttributes: activeObjectAttributes,
          contentRef,
          latexToMathML
        }
      )
    ] });
  }
  var math = {
    name: name14,
    title: title14,
    tagName: "math",
    className: null,
    attributes: {
      "data-latex": "data-latex"
    },
    contentEditable: false,
    edit: Edit4
  };

  // packages/format-library/build-module/non-breaking-space/index.mjs
  var import_i18n18 = __toESM(require_i18n(), 1);
  var import_rich_text17 = __toESM(require_rich_text(), 1);
  var import_block_editor17 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
  var name15 = "core/non-breaking-space";
  var title15 = (0, import_i18n18.__)("Non breaking space");
  var nonBreakingSpace = {
    name: name15,
    title: title15,
    tagName: "nbsp",
    className: null,
    edit({ value, onChange }) {
      function addNonBreakingSpace() {
        onChange((0, import_rich_text17.insert)(value, "\xA0"));
      }
      return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
        import_block_editor17.RichTextShortcut,
        {
          type: "primaryShift",
          character: " ",
          onUse: addNonBreakingSpace
        }
      );
    }
  };

  // packages/format-library/build-module/default-formats.mjs
  var default_formats_default = [
    bold,
    code,
    image,
    italic,
    link,
    strikethrough,
    underline,
    textColor,
    subscript,
    superscript,
    keyboard,
    unknown,
    language,
    math,
    nonBreakingSpace
  ];

  // packages/format-library/build-module/index.mjs
  default_formats_default.forEach(
    ({ name: name16, ...settings }) => (0, import_rich_text18.registerFormatType)(name16, settings)
  );
})();
                                                                                                                                                                     dist/format-library.min.js                                                                          0000644                 00000071544 15212564020 0011571 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;(wp||={}).formatLibrary=(()=>{var Ur=Object.create;var ra=Object.defineProperty;var zr=Object.getOwnPropertyDescriptor;var Dr=Object.getOwnPropertyNames;var Or=Object.getPrototypeOf,Wr=Object.prototype.hasOwnProperty;var Gr=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,a)=>(typeof require<"u"?require:e)[a]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var I=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Zr=(t,e,a,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Dr(e))!Wr.call(t,s)&&s!==a&&ra(t,s,{get:()=>e[s],enumerable:!(o=zr(e,s))||o.enumerable});return t};var r=(t,e,a)=>(a=t!=null?Ur(Or(t)):{},Zr(e||!t||!t.__esModule?ra(a,"default",{value:t,enumerable:!0}):a,t));var x=I((yo,oa)=>{oa.exports=window.wp.richText});var b=I((ko,sa)=>{sa.exports=window.wp.i18n});var y=I((vo,la)=>{la.exports=window.wp.blockEditor});var F=I((Co,fa)=>{fa.exports=window.wp.element});var L=I((So,ia)=>{ia.exports=window.wp.primitives});var n=I((To,ma)=>{ma.exports=window.ReactJSXRuntime});var J=I((fs,ca)=>{ca.exports=window.wp.components});var Ft=I((ns,ba)=>{ba.exports=window.wp.url});var ya=I((ds,wa)=>{wa.exports=window.wp.htmlEntities});var Et=I((ps,ka)=>{ka.exports=window.wp.a11y});var We=I((cs,va)=>{va.exports=window.wp.data});var La=I((gs,Ta)=>{Ta.exports=window.wp.compose});var qa=I((Bs,Ka)=>{Ka.exports=window.wp.privateApis});var Pr=r(x(),1);var ua=r(b(),1),Ee=r(x(),1),lt=r(y(),1);var bt=r(F(),1),le=(0,bt.forwardRef)(({icon:t,size:e=24,...a},o)=>(0,bt.cloneElement)(t,{width:e,height:e,...a,ref:o}));var wt=r(L(),1),fe=r(n(),1),ie=(0,fe.jsx)(wt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fe.jsx)(wt.Path,{d:"M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z"})});var yt=r(L(),1),me=r(n(),1),ue=(0,me.jsx)(yt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,me.jsx)(yt.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"})});var kt=r(L(),1),ne=r(n(),1),de=(0,ne.jsx)(kt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ne.jsx)(kt.Path,{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"})});var vt=r(L(),1),pe=r(n(),1),ce=(0,pe.jsx)(vt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pe.jsx)(vt.Path,{d:"M14.7 11.3c1-.6 1.5-1.6 1.5-3 0-2.3-1.3-3.4-4-3.4H7v14h5.8c1.4 0 2.5-.3 3.3-1 .8-.7 1.2-1.7 1.2-2.9.1-1.9-.8-3.1-2.6-3.7zm-5.1-4h2.3c.6 0 1.1.1 1.4.4.3.3.5.7.5 1.2s-.2 1-.5 1.2c-.3.3-.8.4-1.4.4H9.6V7.3zm4.6 9c-.4.3-1 .4-1.7.4H9.6v-3.9h2.9c.7 0 1.3.2 1.7.5.4.3.6.8.6 1.5s-.2 1.2-.6 1.5z"})});var Ct=r(L(),1),he=r(n(),1),ge=(0,he.jsx)(Ct.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,he.jsx)(Ct.Path,{d:"M12.5 5L10 19h1.9l2.5-14z"})});var _t=r(L(),1),xe=r(n(),1),be=(0,xe.jsx)(_t.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xe.jsx)(_t.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"})});var St=r(L(),1),we=r(n(),1),ye=(0,we.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,we.jsx)(St.Path,{d:"M12 4a8 8 0 1 1 .001 16.001A8 8 0 0 1 12 4Zm0 1.5a6.5 6.5 0 1 0-.001 13.001A6.5 6.5 0 0 0 12 5.5Zm.75 11h-1.5V15h1.5v1.5Zm-.445-9.234a3 3 0 0 1 .445 5.89V14h-1.5v-1.25c0-.57.452-.958.917-1.01A1.5 1.5 0 0 0 12 8.75a1.5 1.5 0 0 0-1.5 1.5H9a3 3 0 0 1 3.305-2.984Z"})});var Tt=r(L(),1),ke=r(n(),1),ve=(0,ke.jsx)(Tt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ke.jsx)(Tt.Path,{d:"M17.5 10h-1.7l-3.7 10.5h1.7l.9-2.6h3.9l.9 2.6h1.7L17.5 10zm-2.2 6.3 1.4-4 1.4 4h-2.8zm-4.8-3.8c1.6-1.8 2.9-3.6 3.7-5.7H16V5.2h-5.8V3H8.8v2.2H3v1.5h9.6c-.7 1.6-1.8 3.1-3.1 4.6C8.6 10.2 7.8 9 7.2 8H5.6c.6 1.4 1.7 2.9 2.9 4.4l-2.4 2.4c-.3.4-.7.8-1.1 1.2l1 1 1.2-1.2c.8-.8 1.6-1.5 2.3-2.3.8.9 1.7 1.7 2.5 2.5l.6-1.5c-.7-.6-1.4-1.3-2.1-2z"})});var Lt=r(L(),1),Ce=r(n(),1),_e=(0,Ce.jsx)(Lt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ce.jsx)(Lt.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});var It=r(L(),1),Se=r(n(),1),Te=(0,Se.jsx)(It.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Se.jsx)(It.Path,{d:"M11.2 6.8c-.7 0-1.4.5-1.6 1.1l-2.8 7.5-1.2-1.8c-.1-.2-.4-.3-.6-.3H3v1.5h1.6l1.2 1.8c.6.9 1.9.7 2.2-.3l2.9-7.9s.1-.2.2-.2h7.8V6.7h-7.8Zm5.3 3.4-1.9 1.9-1.9-1.9-1.1 1.1 1.9 1.9-1.9 1.9 1.1 1.1 1.9-1.9 1.9 1.9 1.1-1.1-1.9-1.9 1.9-1.9-1.1-1.1Z"})});var Bt=r(L(),1),Le=r(n(),1),Ie=(0,Le.jsx)(Bt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Le.jsx)(Bt.Path,{d:"M16.9 18.3l.8-1.2c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.1-.3-.4-.5-.6-.7-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.2 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3L15 19.4h4.3v-1.2h-2.4zM14.1 7.2h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"})});var Nt=r(L(),1),Be=r(n(),1),Ne=(0,Be.jsx)(Nt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Be.jsx)(Nt.Path,{d:"M16.9 10.3l.8-1.3c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.2-.2-.4-.4-.7-.6-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.1 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3l-1.8 2.8h4.3v-1.2h-2.2zm-2.8-3.1h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"})});var Vt=r(L(),1),Ve=r(n(),1),Re=(0,Ve.jsx)(Vt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ve.jsx)(Vt.Path,{d:"M12.9 6h-2l-4 11h1.9l1.1-3h4.2l1.1 3h1.9L12.9 6zm-2.5 6.5l1.5-4.9 1.7 4.9h-3.2z"})});var z=r(n(),1),je="core/bold",Fe=(0,ua.__)("Bold"),na={name:je,title:Fe,tagName:"strong",className:null,edit({isActive:t,value:e,onChange:a,onFocus:o,isVisible:s=!0}){function l(){a((0,Ee.toggleFormat)(e,{type:je,title:Fe}))}function f(){a((0,Ee.toggleFormat)(e,{type:je})),o()}return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(lt.RichTextShortcut,{type:"primary",character:"b",onUse:l}),s&&(0,z.jsx)(lt.RichTextToolbarButton,{name:"bold",icon:ce,title:Fe,onClick:f,isActive:t,shortcutType:"primary",shortcutCharacter:"b"}),(0,z.jsx)(lt.__unstableRichTextInputEvent,{inputType:"formatBold",onInput:l})]})}};var da=r(b(),1),Y=r(x(),1),Rt=r(y(),1);var Q=r(n(),1),Pe="core/code",Me=(0,da.__)("Inline code"),pa={name:Pe,title:Me,tagName:"code",className:null,__unstableInputRule(t){let{start:a,text:o}=t;if(o[a-1]!=="`"||a-2<0)return t;let l=o.lastIndexOf("`",a-2);if(l===-1)return t;let f=l,i=a-2;return f===i||(t=(0,Y.remove)(t,f,f+1),t=(0,Y.remove)(t,i,i+1),t=(0,Y.applyFormat)(t,{type:Pe},f,i)),t},edit({value:t,onChange:e,onFocus:a,isActive:o}){function s(){e((0,Y.toggleFormat)(t,{type:Pe,title:Me})),a()}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Rt.RichTextShortcut,{type:"access",character:"x",onUse:s}),(0,Q.jsx)(Rt.RichTextToolbarButton,{icon:ue,title:Me,onClick:s,isActive:o,role:"menuitemcheckbox"})]})}};var k=r(J(),1),V=r(b(),1),He=r(F(),1),jt=r(x(),1),ft=r(y(),1),g=r(n(),1),Kr=["image"],Ae="core/image",ha=(0,V.__)("Inline image");function qr(t){if(!t?.className)return;let[,e]=t.className.match(/wp-image-(\d+)/)??[];return e?parseInt(e,10):void 0}var Ue={name:Ae,title:ha,keywords:[(0,V.__)("photo"),(0,V.__)("media")],object:!0,tagName:"img",className:null,attributes:{className:"class",style:"style",url:"src",alt:"alt"},edit:Yr};function $r({value:t,onChange:e,activeObjectAttributes:a,contentRef:o}){let{style:s,alt:l}=a,f=s?.replace(/\D/g,""),[i,m]=(0,He.useState)(f),[u,h]=(0,He.useState)(l),v=i!==f||u!==l,R=(0,jt.useAnchor)({editableContentElement:o.current,settings:Ue});return(0,g.jsx)(k.Popover,{focusOnMount:!1,anchor:R,className:"block-editor-format-toolbar__image-popover",children:(0,g.jsx)("form",{className:"block-editor-format-toolbar__image-container-content",onSubmit:_=>{let C=t.replacements.slice();C[t.start]={type:Ae,attributes:{...a,style:i?`width: ${i}px;`:"",alt:u}},e({...t,replacements:C}),_.preventDefault()},children:(0,g.jsxs)(k.__experimentalVStack,{spacing:4,children:[(0,g.jsx)(k.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,V.__)("Width"),value:i,min:1,onChange:_=>{m(_)}}),(0,g.jsx)(k.TextareaControl,{label:(0,V.__)("Alternative text"),value:u,onChange:_=>{h(_)},help:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(k.ExternalLink,{href:(0,V.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),children:(0,V.__)("Describe the purpose of the image.")}),(0,g.jsx)("br",{}),(0,V.__)("Leave empty if decorative.")]})}),(0,g.jsx)(k.__experimentalHStack,{justify:"right",children:(0,g.jsx)(k.Button,{disabled:!v,accessibleWhenDisabled:!0,variant:"primary",type:"submit",size:"compact",children:(0,V.__)("Apply")})})]})})})}function Yr({value:t,onChange:e,onFocus:a,isObjectActive:o,activeObjectAttributes:s,contentRef:l}){return(0,g.jsxs)(ft.MediaUploadCheck,{children:[(0,g.jsx)(ft.MediaUpload,{allowedTypes:Kr,value:qr(s),onSelect:({id:f,url:i,alt:m,width:u})=>{e((0,jt.insertObject)(t,{type:Ae,attributes:{className:`wp-image-${f}`,style:`width: ${Math.min(u,150)}px;`,url:i,alt:m}})),a()},render:({open:f})=>(0,g.jsx)(ft.RichTextToolbarButton,{icon:(0,g.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,g.jsx)(k.Path,{d:"M4 18.5h16V17H4v1.5zM16 13v1.5h4V13h-4zM5.1 15h7.8c.6 0 1.1-.5 1.1-1.1V6.1c0-.6-.5-1.1-1.1-1.1H5.1C4.5 5 4 5.5 4 6.1v7.8c0 .6.5 1.1 1.1 1.1zm.4-8.5h7V10l-1-1c-.3-.3-.8-.3-1 0l-1.6 1.5-1.2-.7c-.3-.2-.6-.2-.9 0l-1.3 1V6.5zm0 6.1l1.8-1.3 1.3.8c.3.2.7.2.9-.1l1.5-1.4 1.5 1.4v1.5h-7v-.9z"})}),title:o?(0,V.__)("Replace image"):ha,onClick:f,isActive:o})}),o&&(0,g.jsx)($r,{value:t,onChange:e,activeObjectAttributes:s,contentRef:l})]})}var ga=r(b(),1),Oe=r(x(),1),it=r(y(),1);var D=r(n(),1),ze="core/italic",De=(0,ga.__)("Italic"),xa={name:ze,title:De,tagName:"em",className:null,edit({isActive:t,value:e,onChange:a,onFocus:o,isVisible:s=!0}){function l(){a((0,Oe.toggleFormat)(e,{type:ze,title:De}))}function f(){a((0,Oe.toggleFormat)(e,{type:ze})),o()}return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(it.RichTextShortcut,{type:"primary",character:"i",onUse:l}),s&&(0,D.jsx)(it.RichTextToolbarButton,{name:"italic",icon:ge,title:De,onClick:f,isActive:t,shortcutType:"primary",shortcutCharacter:"i"}),(0,D.jsx)(it.__unstableRichTextInputEvent,{inputType:"formatItalic",onInput:l})]})}};var zt=r(b(),1),X=r(F(),1),w=r(x(),1),tt=r(Ft(),1),gt=r(y(),1),Ea=r(ya(),1);var Pa=r(Et(),1);var Ht=r(F(),1),E=r(b(),1),ct=r(Et(),1),Ra=r(J(),1),ja=r(Ft(),1),p=r(x(),1),mt=r(y(),1),At=r(We(),1);var c=r(Ft(),1);function Pt(t){if(!t)return!1;let e=t.trim();if(!e)return!1;if(/^\S+:/.test(e)){let a=(0,c.getProtocol)(e);if(!(0,c.isValidProtocol)(a)||a.startsWith("http")&&!/^https?:\/\/[^\/\s]/i.test(e))return!1;let o=(0,c.getAuthority)(e);if(!(0,c.isValidAuthority)(o))return!1;let s=(0,c.getPath)(e);if(s&&!(0,c.isValidPath)(s))return!1;let l=(0,c.getQueryString)(e);if(l&&!(0,c.isValidQueryString)(l))return!1;let f=(0,c.getFragment)(e);if(f&&!(0,c.isValidFragment)(f))return!1}return!(e.startsWith("#")&&!(0,c.isValidFragment)(e))}function Ca({url:t,type:e,id:a,opensInNewWindow:o,nofollow:s,cssClasses:l}){let f={type:"core/link",attributes:{url:t}};e&&(f.attributes.type=e),a&&(f.attributes.id=a),o&&(f.attributes.target="_blank",f.attributes.rel=f.attributes.rel?f.attributes.rel+" noreferrer noopener":"noreferrer noopener"),s&&(f.attributes.rel=f.attributes.rel?f.attributes.rel+" nofollow":"nofollow");let i=l?.trim();return i?.length&&(f.attributes.class=i),f}function Mt(t,e,a=t.start,o=t.end){let s={start:void 0,end:void 0},{formats:l}=t,f,i;if(!l?.length)return s;let m=l.slice(),u=m[a]?.find(({type:C})=>C===e.type),h=m[o]?.find(({type:C})=>C===e.type),v=m[o-1]?.find(({type:C})=>C===e.type);if(u)f=u,i=a;else if(h)f=h,i=o;else if(v)f=v,i=o-1;else return s;let R=m[i].indexOf(f),_=[m,i,f,R];return a=Qr(..._),o=Jr(..._),a=a<0?0:a,{start:a,end:o+1}}function _a(t,e,a,o,s){let l=e,i={forwards:1,backwards:-1}[s]||1,m=i*-1;for(;t[l]&&t[l][o]===a;)l=l+i;return l=l+m,l}var Sa=(t,...e)=>(...a)=>t(...a,...e),Qr=Sa(_a,"backwards"),Jr=Sa(_a,"forwards");var Ia=r(F(),1),Ba=r(La(),1),Ge=r(b(),1),W=r(J(),1),O=r(n(),1),Na=({setting:t,value:e,onChange:a})=>{let o=e?e?.cssClasses?.length>0:!1,[s,l]=(0,Ia.useState)(o),i=`css-classes-setting-${(0,Ba.useInstanceId)(Na)}`,m=h=>{let v=typeof h=="string"?h.replace(/,/g," ").replace(/\s+/g," ").trim():h;a({...e,[t.id]:v})},u=()=>{s?(o&&m(""),l(!1)):l(!0)};return(0,O.jsxs)("fieldset",{children:[(0,O.jsx)(W.VisuallyHidden,{as:"legend",children:t.title}),(0,O.jsxs)(W.__experimentalVStack,{spacing:3,children:[(0,O.jsx)(W.CheckboxControl,{label:t.title,onChange:u,checked:s||o,"aria-expanded":s,"aria-controls":s?i:void 0}),s&&(0,O.jsx)("div",{id:i,children:(0,O.jsx)(W.__experimentalInputControl,{label:(0,Ge.__)("CSS classes"),value:e?.cssClasses,onChange:m,help:(0,Ge.__)("Separate multiple classes with spaces."),__unstableInputWidth:"100%",__next40pxDefaultSize:!0})})]})]})},Va=Na;var ht=r(n(),1),Xr=[...mt.LinkControl.DEFAULT_LINK_SETTINGS,{id:"nofollow",title:(0,E.__)("Mark as nofollow")},{id:"cssClasses",title:(0,E.__)("Additional CSS class(es)"),render:(t,e,a)=>(0,ht.jsx)(Va,{setting:t,value:e,onChange:a})}];function to({isActive:t,activeAttributes:e,value:a,onChange:o,onFocusOutside:s,stopAddingLink:l,contentRef:f,focusOnMount:i}){let u=eo(a,t).text,{selectionChange:h}=(0,At.useDispatch)(mt.store),{createPageEntity:v,userCanCreatePages:R,selectionStart:_}=(0,At.useSelect)(d=>{let{getSettings:q,getSelectionStart:oe}=d(mt.store),ot=q();return{createPageEntity:ot.__experimentalCreatePageEntity,userCanCreatePages:ot.__experimentalUserCanCreatePages,selectionStart:oe()}},[]),C=(0,Ht.useMemo)(()=>({url:e.url,type:e.type,id:e.id,opensInNewTab:e.target==="_blank",nofollow:e.rel?.includes("nofollow"),title:u,cssClasses:e.class}),[e.class,e.id,e.rel,e.target,e.type,e.url,u]);function ee(){let d=(0,p.removeFormat)(a,"core/link");o(d),l(),(0,ct.speak)((0,E.__)("Link removed."),"assertive")}function ae(d){let oe=!C?.url;d={...C,...d};let ot=(0,ja.prependHTTPS)(d.url),se=Ca({url:ot,type:d.type,id:d.id!==void 0&&d.id!==null?String(d.id):void 0,opensInNewWindow:d.opensInNewTab,nofollow:d.nofollow,cssClasses:d.cssClasses}),st=d.title||ot,M;if((0,p.isCollapsed)(a)&&!t){let $=(0,p.insert)(a,st);M=(0,p.applyFormat)($,se,a.start,a.start+st.length),o(M),l(),h({clientId:_.clientId,identifier:_.attributeKey,start:a.start+st.length+1});return}else if(st===u){let $=Mt(a,{type:"core/link"});M=(0,p.applyFormat)(a,se,$.start,$.end)}else{M=(0,p.create)({text:st}),M=(0,p.applyFormat)(M,se,0,st.length);let $=Mt(a,{type:"core/link"}),[Mr,Hr]=(0,p.split)(a,$.start,$.start),Ar=(0,p.replace)(Hr,u,M);M=(0,p.concat)(Mr,Ar)}o(M),oe||l(),Pt(ot)?t?(0,ct.speak)((0,E.__)("Link edited."),"assertive"):(0,ct.speak)((0,E.__)("Link inserted."),"assertive"):(0,ct.speak)((0,E.__)("Warning: the link has been inserted but may have errors. Please test it."),"assertive")}let j=(0,p.useAnchor)({editableContentElement:f.current,settings:{...Ut,isActive:t}});async function S(d){let q=await v({title:d,status:"draft"});return{id:q.id,type:q.type,title:q.title.rendered,url:q.link,kind:"post-type"}}function re(d){return(0,Ht.createInterpolateElement)((0,E.sprintf)((0,E.__)("Create page: <mark>%s</mark>"),d),{mark:(0,ht.jsx)("mark",{})})}return(0,ht.jsx)(Ra.Popover,{anchor:j,animate:!1,onClose:l,onFocusOutside:s,placement:"bottom",offset:8,shift:!0,focusOnMount:i,constrainTabbing:!0,children:(0,ht.jsx)(mt.LinkControl,{value:C,onChange:ae,onRemove:ee,hasRichPreviews:!0,createSuggestion:v&&S,withCreateSuggestion:R,createSuggestionButtonText:re,hasTextControl:!0,settings:Xr,showInitialSuggestions:!0,suggestionsQuery:{initialSuggestionsSearchOptions:{type:"post",subtype:"page",perPage:20}}})})}function eo(t,e){let a=t.start,o=t.end;if(e){let s=Mt(t,{type:"core/link"});a=s.start,o=s.end}return(0,p.slice)(t,a,o)}var Fa=to;var H=r(n(),1),ut="core/link",Ma=(0,zt.__)("Link");function ao({isActive:t,activeAttributes:e,value:a,onChange:o,onFocus:s,contentRef:l,isVisible:f=!0}){let[i,m]=(0,X.useState)(!1),[u,h]=(0,X.useState)(null);(0,X.useEffect)(()=>{t||m(!1)},[t]),(0,X.useLayoutEffect)(()=>{let j=l.current;if(!j)return;function S(re){let d=re.target.closest("[contenteditable] a");!d||!t||(m(!0),h({el:d,action:"click"}))}return j.addEventListener("click",S),()=>{j.removeEventListener("click",S)}},[l,t]);function v(j){let S=(0,w.getTextContent)((0,w.slice)(a));!t&&S&&(0,tt.isURL)(S)&&Pt(S)?o((0,w.applyFormat)(a,{type:ut,attributes:{url:S}})):!t&&S&&(0,tt.isEmail)(S)?o((0,w.applyFormat)(a,{type:ut,attributes:{url:`mailto:${S}`}})):!t&&S&&(0,tt.isPhoneNumber)(S)?o((0,w.applyFormat)(a,{type:ut,attributes:{url:`tel:${S.replace(/\D/g,"")}`}})):(j&&h({el:j,action:null}),m(!0))}function R(){m(!1),u?.el?.tagName==="BUTTON"?u.el.focus():s(),h(null)}function _(){m(!1),h(null)}function C(){o((0,w.removeFormat)(a,ut)),(0,Pa.speak)((0,zt.__)("Link removed."),"assertive")}let ee=!(u?.el?.tagName==="A"&&u?.action==="click"),ae=!(0,w.isCollapsed)(a);return(0,H.jsxs)(H.Fragment,{children:[ae&&(0,H.jsx)(gt.RichTextShortcut,{type:"primary",character:"k",onUse:v}),(0,H.jsx)(gt.RichTextShortcut,{type:"primaryShift",character:"k",onUse:C}),f&&(0,H.jsx)(gt.RichTextToolbarButton,{name:"link",icon:_e,title:t?(0,zt.__)("Link"):Ma,onClick:j=>{v(j.currentTarget)},isActive:t||i,shortcutType:"primary",shortcutCharacter:"k","aria-haspopup":"true","aria-expanded":i}),f&&i&&(0,H.jsx)(Fa,{stopAddingLink:R,onFocusOutside:_,isActive:t,activeAttributes:e,value:a,onChange:o,contentRef:l,focusOnMount:ee?"firstElement":!1})]})}var Ut={name:ut,title:Ma,tagName:"a",className:null,attributes:{url:"href",type:"data-type",id:"data-id",_id:"id",target:"target",rel:"rel",class:"class"},__unstablePasteRule(t,{html:e,plainText:a}){let o=(e||a).replace(/<[^>]+>/g,"").trim();if(!(0,tt.isURL)(o)||!/^https?:/.test(o))return t;window.console.log(`Created link:

`,o);let s={type:ut,attributes:{url:(0,Ea.decodeEntities)(o)}};return(0,w.isCollapsed)(t)?(0,w.insert)(t,(0,w.applyFormat)((0,w.create)({text:a}),s,0,a.length)):(0,w.applyFormat)(t,s)},edit:ao};var Aa=r(b(),1),Ua=r(x(),1),Dt=r(y(),1);var et=r(n(),1),Ha="core/strikethrough",Ze=(0,Aa.__)("Strikethrough"),za={name:Ha,title:Ze,tagName:"s",className:null,edit({isActive:t,value:e,onChange:a,onFocus:o}){function s(){a((0,Ua.toggleFormat)(e,{type:Ha,title:Ze})),o()}return(0,et.jsxs)(et.Fragment,{children:[(0,et.jsx)(Dt.RichTextShortcut,{type:"access",character:"d",onUse:s}),(0,et.jsx)(Dt.RichTextToolbarButton,{icon:be,title:Ze,onClick:s,isActive:t,role:"menuitemcheckbox"})]})}};var Wa=r(b(),1),Ga=r(x(),1),Ot=r(y(),1),at=r(n(),1),Da="core/underline",Oa=(0,Wa.__)("Underline"),Za={name:Da,title:Oa,tagName:"span",className:null,attributes:{style:"style"},edit({value:t,onChange:e}){let a=()=>{e((0,Ga.toggleFormat)(t,{type:Da,attributes:{style:"text-decoration: underline;"},title:Oa}))};return(0,at.jsxs)(at.Fragment,{children:[(0,at.jsx)(Ot.RichTextShortcut,{type:"primary",character:"u",onUse:a}),(0,at.jsx)(Ot.__unstableRichTextInputEvent,{inputType:"formatUnderline",onInput:a})]})}};var tr=r(b(),1),Yt=r(F(),1),Qt=r(y(),1);var er=r(x(),1);var Qa=r(F(),1),Ja=r(We(),1),G=r(x(),1),P=r(y(),1),Zt=r(J(),1),Ke=r(b(),1);var $a=r(qa(),1),{lock:Ns,unlock:Wt}=(0,$a.__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/format-library");var A=r(n(),1),{Tabs:Gt}=Wt(Zt.privateApis),Ya=[{name:"color",title:(0,Ke.__)("Text")},{name:"backgroundColor",title:(0,Ke.__)("Background")}];function ro(t=""){return t.split(";").reduce((e,a)=>{if(a){let[o,s]=a.split(":");o==="color"&&(e.color=s),o==="background-color"&&s!==xt&&(e.backgroundColor=s)}return e},{})}function oo(t="",e){return t.split(" ").reduce((a,o)=>{if(o.startsWith("has-")&&o.endsWith("-color")){let s=o.replace(/^has-/,"").replace(/-color$/,""),l=(0,P.getColorObjectByAttributeValues)(e,s);a.color=l.color}return a},{})}function Kt(t,e,a){let o=(0,G.getActiveFormat)(t,e);return o?{...ro(o.attributes.style),...oo(o.attributes.class,a)}:{}}function so(t,e,a,o){let{color:s,backgroundColor:l}={...Kt(t,e,a),...o};if(!s&&!l)return(0,G.removeFormat)(t,e);let f=[],i=[],m={};if(l?f.push(["background-color",l].join(":")):f.push(["background-color",xt].join(":")),s){let u=(0,P.getColorObjectByColorValue)(a,s);u?i.push((0,P.getColorClassName)("color",u.slug)):f.push(["color",s].join(":"))}return f.length&&(m.style=f.join(";")),i.length&&(m.class=i.join(" ")),(0,G.applyFormat)(t,{type:e,attributes:m})}function lo({name:t,property:e,value:a,onChange:o}){let s=(0,Ja.useSelect)(f=>{let{getSettings:i}=f(P.store);return i().colors??[]},[]),l=(0,Qa.useMemo)(()=>Kt(a,t,s),[t,a,s]);return(0,A.jsx)(P.ColorPalette,{value:l[e],onChange:f=>{o(so(a,t,s,{[e]:f}))},enableAlpha:!0,__experimentalIsRenderedInSidebar:!0})}function Xa({name:t,value:e,onChange:a,onClose:o,contentRef:s,isActive:l}){let f=(0,G.useAnchor)({editableContentElement:s.current,settings:{...qt,isActive:l}});return(0,A.jsx)(Zt.Popover,{onClose:o,className:"format-library__inline-color-popover",anchor:f,children:(0,A.jsxs)(Gt,{children:[(0,A.jsx)(Gt.TabList,{children:Ya.map(i=>(0,A.jsx)(Gt.Tab,{tabId:i.name,children:i.title},i.name))}),Ya.map(i=>(0,A.jsx)(Gt.TabPanel,{tabId:i.name,focusable:!1,children:(0,A.jsx)(lo,{name:t,property:i.name,value:e,onChange:a})},i.name))]})})}var Z=r(n(),1),xt="rgba(0, 0, 0, 0)",$t="core/text-color",ar=(0,tr.__)("Highlight"),fo=[];function qe(t,e){let{ownerDocument:a}=t,{defaultView:o}=a,l=o.getComputedStyle(t).getPropertyValue(e);return e==="background-color"&&l===xt&&t.parentElement?qe(t.parentElement,e):l}function io(t,{color:e,backgroundColor:a}){if(!(!e&&!a))return{color:e||qe(t,"color"),backgroundColor:a===xt?qe(t,"background-color"):a}}function mo({value:t,onChange:e,isActive:a,activeAttributes:o,contentRef:s}){let[l,f=fo]=(0,Qt.useSettings)("color.custom","color.palette"),[i,m]=(0,Yt.useState)(!1),u=(0,Yt.useMemo)(()=>io(s.current,Kt(t,$t,f)),[s,t,f]),h=!!f.length||l;return!h&&!a?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Qt.RichTextToolbarButton,{className:"format-library-text-color-button",isActive:a,icon:(0,Z.jsx)(le,{icon:Object.keys(o).length?Re:de,style:u}),title:ar,onClick:h?()=>m(!0):()=>e((0,er.removeFormat)(t,$t)),role:"menuitemcheckbox"}),i&&(0,Z.jsx)(Xa,{name:$t,onClose:()=>m(!1),activeAttributes:o,value:t,onChange:e,contentRef:s,isActive:a})]})}var qt={name:$t,title:ar,tagName:"mark",className:"has-inline-color",attributes:{style:"style",class:"class"},edit:mo};var or=r(b(),1),sr=r(x(),1),lr=r(y(),1);var fr=r(n(),1),rr="core/subscript",$e=(0,or.__)("Subscript"),ir={name:rr,title:$e,tagName:"sub",className:null,edit({isActive:t,value:e,onChange:a,onFocus:o}){function s(){a((0,sr.toggleFormat)(e,{type:rr,title:$e}))}function l(){s(),o()}return(0,fr.jsx)(lr.RichTextToolbarButton,{icon:Ie,title:$e,onClick:l,isActive:t,role:"menuitemcheckbox"})}};var ur=r(b(),1),nr=r(x(),1),dr=r(y(),1);var pr=r(n(),1),mr="core/superscript",Ye=(0,ur.__)("Superscript"),cr={name:mr,title:Ye,tagName:"sup",className:null,edit({isActive:t,value:e,onChange:a,onFocus:o}){function s(){a((0,nr.toggleFormat)(e,{type:mr,title:Ye}))}function l(){s(),o()}return(0,pr.jsx)(dr.RichTextToolbarButton,{icon:Ne,title:Ye,onClick:l,isActive:t,role:"menuitemcheckbox"})}};var gr=r(b(),1),xr=r(x(),1),br=r(y(),1);var wr=r(n(),1),hr="core/keyboard",Qe=(0,gr.__)("Keyboard input"),yr={name:hr,title:Qe,tagName:"kbd",className:null,edit({isActive:t,value:e,onChange:a,onFocus:o}){function s(){a((0,xr.toggleFormat)(e,{type:hr,title:Qe}))}function l(){s(),o()}return(0,wr.jsx)(br.RichTextToolbarButton,{icon:ie,title:Qe,onClick:l,isActive:t,role:"menuitemcheckbox"})}};var vr=r(b(),1),nt=r(x(),1),Cr=r(y(),1);var _r=r(n(),1),Je="core/unknown",kr=(0,vr.__)("Clear Unknown Formatting");function uo(t){return(0,nt.isCollapsed)(t)?!1:(0,nt.slice)(t).formats.some(a=>a.some(o=>o.type===Je))}var Sr={name:Je,title:kr,tagName:"*",className:null,edit({isActive:t,value:e,onChange:a,onFocus:o}){if(!t&&!uo(e))return null;function s(){a((0,nt.removeFormat)(e,Je)),o()}return(0,_r.jsx)(Cr.RichTextToolbarButton,{name:"unknown",icon:ye,title:kr,onClick:s,isActive:!0})}};var rt=r(b(),1),Tr=r(y(),1),N=r(J(),1),Jt=r(F(),1),dt=r(x(),1);var B=r(n(),1),Xe="core/language",Xt=(0,rt.__)("Language"),ta={name:Xe,title:Xt,tagName:"bdo",className:null,attributes:{lang:"lang",dir:"dir"},edit:no};function no({isActive:t,value:e,onChange:a,contentRef:o}){let[s,l]=(0,Jt.useState)(!1),f=()=>{l(i=>!i)};return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Tr.RichTextToolbarButton,{icon:ve,label:Xt,title:Xt,onClick:()=>{t?a((0,dt.removeFormat)(e,Xe)):f()},isActive:t,role:"menuitemcheckbox"}),s&&(0,B.jsx)(po,{value:e,onChange:a,onClose:f,contentRef:o})]})}function po({value:t,contentRef:e,onChange:a,onClose:o}){let s=(0,dt.useAnchor)({editableContentElement:e.current,settings:ta}),[l,f]=(0,Jt.useState)(""),[i,m]=(0,Jt.useState)("ltr");return(0,B.jsx)(N.Popover,{className:"block-editor-format-toolbar__language-popover",anchor:s,onClose:o,children:(0,B.jsxs)(N.__experimentalVStack,{as:"form",spacing:4,className:"block-editor-format-toolbar__language-container-content",onSubmit:u=>{u.preventDefault(),a((0,dt.applyFormat)(t,{type:Xe,attributes:{lang:l,dir:i}})),o()},children:[(0,B.jsx)(N.TextControl,{__next40pxDefaultSize:!0,label:Xt,value:l,onChange:u=>f(u),help:(0,rt.__)('A valid language attribute, like "en" or "fr".')}),(0,B.jsx)(N.SelectControl,{__next40pxDefaultSize:!0,label:(0,rt.__)("Text direction"),value:i,options:[{label:(0,rt.__)("Left to right"),value:"ltr"},{label:(0,rt.__)("Right to left"),value:"rtl"}],onChange:u=>m(u)}),(0,B.jsx)(N.__experimentalHStack,{alignment:"right",children:(0,B.jsx)(N.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",text:(0,rt.__)("Apply")})})]})})}var U=r(b(),1),pt=r(F(),1),te=r(x(),1),Lr=r(y(),1),K=r(J(),1);var Ir=r(Et(),1);var T=r(n(),1),{Badge:co}=Wt(K.privateApis),ea="core/math",Br=(0,U.__)("Math");function ho({value:t,onChange:e,activeAttributes:a,contentRef:o,latexToMathML:s}){let[l,f]=(0,pt.useState)(a?.["data-latex"]||""),[i,m]=(0,pt.useState)(null),u=(0,te.useAnchor)({editableContentElement:o.current,settings:aa}),h=v=>{let R="";if(f(v),v)try{R=s(v,{displayMode:!1}),m(null)}catch(C){m(C.message),(0,Ir.speak)((0,U.sprintf)((0,U.__)("Error parsing mathematical expression: %s"),C.message));return}let _=t.replacements.slice();_[t.start]={type:ea,attributes:{"data-latex":v},innerHTML:R},e({...t,replacements:_})};return(0,T.jsx)(K.Popover,{placement:"bottom-start",offset:8,focusOnMount:!1,anchor:u,className:"block-editor-format-toolbar__math-popover",children:(0,T.jsx)("div",{style:{minWidth:"300px",padding:"4px"},children:(0,T.jsxs)(K.__experimentalVStack,{spacing:1,children:[(0,T.jsx)(K.TextControl,{__next40pxDefaultSize:!0,hideLabelFromVision:!0,label:(0,U.__)("LaTeX math syntax"),value:l,onChange:h,placeholder:(0,U.__)("e.g., x^2, \\frac{a}{b}"),autoComplete:"off",className:"block-editor-format-toolbar__math-input"}),i&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(co,{intent:"error",className:"wp-block-math__error",children:(0,U.sprintf)((0,U.__)("Error: %s"),i)}),(0,T.jsx)("style",{children:".wp-block-math__error .components-badge__content{white-space:normal}"})]})]})})})}function go({value:t,onChange:e,onFocus:a,isObjectActive:o,activeObjectAttributes:s,contentRef:l}){let[f,i]=(0,pt.useState)();return(0,pt.useEffect)(()=>{import("@wordpress/latex-to-mathml").then(m=>{i(()=>m.default)})},[]),(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(Lr.RichTextToolbarButton,{icon:Te,title:Br,onClick:()=>{let m=(0,te.insertObject)(t,{type:ea,attributes:{"data-latex":""},innerHTML:""});m.start=m.end-1,e(m),a()},isActive:o}),o&&(0,T.jsx)(ho,{value:t,onChange:e,activeAttributes:s,contentRef:l,latexToMathML:f})]})}var aa={name:ea,title:Br,tagName:"math",className:null,attributes:{"data-latex":"data-latex"},contentEditable:!1,edit:go};var Nr=r(b(),1),Vr=r(x(),1),Rr=r(y(),1),jr=r(n(),1),xo="core/non-breaking-space",bo=(0,Nr.__)("Non breaking space"),Fr={name:xo,title:bo,tagName:"nbsp",className:null,edit({value:t,onChange:e}){function a(){e((0,Vr.insert)(t,"\xA0"))}return(0,jr.jsx)(Rr.RichTextShortcut,{type:"primaryShift",character:" ",onUse:a})}};var Er=[na,pa,Ue,xa,Ut,za,Za,qt,ir,cr,yr,Sr,ta,aa,Fr];Er.forEach(({name:t,...e})=>(0,Pr.registerFormatType)(t,e));})();
                                                                                                                                                            dist/hooks.js                                                                                       0000644                 00000027722 15212564022 0007201 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).hooks = (() => {
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // packages/hooks/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    actions: () => actions,
    addAction: () => addAction,
    addFilter: () => addFilter,
    applyFilters: () => applyFilters,
    applyFiltersAsync: () => applyFiltersAsync,
    createHooks: () => createHooks_default,
    currentAction: () => currentAction,
    currentFilter: () => currentFilter,
    defaultHooks: () => defaultHooks,
    didAction: () => didAction,
    didFilter: () => didFilter,
    doAction: () => doAction,
    doActionAsync: () => doActionAsync,
    doingAction: () => doingAction,
    doingFilter: () => doingFilter,
    filters: () => filters,
    hasAction: () => hasAction,
    hasFilter: () => hasFilter,
    removeAction: () => removeAction,
    removeAllActions: () => removeAllActions,
    removeAllFilters: () => removeAllFilters,
    removeFilter: () => removeFilter
  });

  // packages/hooks/build-module/validateNamespace.mjs
  function validateNamespace(namespace) {
    if ("string" !== typeof namespace || "" === namespace) {
      console.error("The namespace must be a non-empty string.");
      return false;
    }
    if (!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(namespace)) {
      console.error(
        "The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."
      );
      return false;
    }
    return true;
  }
  var validateNamespace_default = validateNamespace;

  // packages/hooks/build-module/validateHookName.mjs
  function validateHookName(hookName) {
    if ("string" !== typeof hookName || "" === hookName) {
      console.error("The hook name must be a non-empty string.");
      return false;
    }
    if (/^__/.test(hookName)) {
      console.error("The hook name cannot begin with `__`.");
      return false;
    }
    if (!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(hookName)) {
      console.error(
        "The hook name can only contain numbers, letters, dashes, periods and underscores."
      );
      return false;
    }
    return true;
  }
  var validateHookName_default = validateHookName;

  // packages/hooks/build-module/createAddHook.mjs
  function createAddHook(hooks, storeKey) {
    return function addHook(hookName, namespace, callback, priority = 10) {
      const hooksStore = hooks[storeKey];
      if (!validateHookName_default(hookName)) {
        return;
      }
      if (!validateNamespace_default(namespace)) {
        return;
      }
      if ("function" !== typeof callback) {
        console.error("The hook callback must be a function.");
        return;
      }
      if ("number" !== typeof priority) {
        console.error(
          "If specified, the hook priority must be a number."
        );
        return;
      }
      const handler = { callback, priority, namespace };
      if (hooksStore[hookName]) {
        const handlers = hooksStore[hookName].handlers;
        let i;
        for (i = handlers.length; i > 0; i--) {
          if (priority >= handlers[i - 1].priority) {
            break;
          }
        }
        if (i === handlers.length) {
          handlers[i] = handler;
        } else {
          handlers.splice(i, 0, handler);
        }
        hooksStore.__current.forEach((hookInfo) => {
          if (hookInfo.name === hookName && hookInfo.currentIndex >= i) {
            hookInfo.currentIndex++;
          }
        });
      } else {
        hooksStore[hookName] = {
          handlers: [handler],
          runs: 0
        };
      }
      if (hookName !== "hookAdded") {
        hooks.doAction(
          "hookAdded",
          hookName,
          namespace,
          callback,
          priority
        );
      }
    };
  }
  var createAddHook_default = createAddHook;

  // packages/hooks/build-module/createRemoveHook.mjs
  function createRemoveHook(hooks, storeKey, removeAll = false) {
    return function removeHook(hookName, namespace) {
      const hooksStore = hooks[storeKey];
      if (!validateHookName_default(hookName)) {
        return;
      }
      if (!removeAll && !validateNamespace_default(namespace)) {
        return;
      }
      if (!hooksStore[hookName]) {
        return 0;
      }
      let handlersRemoved = 0;
      if (removeAll) {
        handlersRemoved = hooksStore[hookName].handlers.length;
        hooksStore[hookName] = {
          runs: hooksStore[hookName].runs,
          handlers: []
        };
      } else {
        const handlers = hooksStore[hookName].handlers;
        for (let i = handlers.length - 1; i >= 0; i--) {
          if (handlers[i].namespace === namespace) {
            handlers.splice(i, 1);
            handlersRemoved++;
            hooksStore.__current.forEach((hookInfo) => {
              if (hookInfo.name === hookName && hookInfo.currentIndex >= i) {
                hookInfo.currentIndex--;
              }
            });
          }
        }
      }
      if (hookName !== "hookRemoved") {
        hooks.doAction("hookRemoved", hookName, namespace);
      }
      return handlersRemoved;
    };
  }
  var createRemoveHook_default = createRemoveHook;

  // packages/hooks/build-module/createHasHook.mjs
  function createHasHook(hooks, storeKey) {
    return function hasHook(hookName, namespace) {
      const hooksStore = hooks[storeKey];
      if ("undefined" !== typeof namespace) {
        return hookName in hooksStore && hooksStore[hookName].handlers.some(
          (hook) => hook.namespace === namespace
        );
      }
      return hookName in hooksStore;
    };
  }
  var createHasHook_default = createHasHook;

  // packages/hooks/build-module/createRunHook.mjs
  function createRunHook(hooks, storeKey, returnFirstArg, async) {
    return function runHook(hookName, ...args) {
      const hooksStore = hooks[storeKey];
      if (!hooksStore[hookName]) {
        hooksStore[hookName] = {
          handlers: [],
          runs: 0
        };
      }
      hooksStore[hookName].runs++;
      const handlers = hooksStore[hookName].handlers;
      if (true) {
        if ("hookAdded" !== hookName && hooksStore.all) {
          handlers.push(...hooksStore.all.handlers);
        }
      }
      if (!handlers || !handlers.length) {
        return returnFirstArg ? args[0] : void 0;
      }
      const hookInfo = {
        name: hookName,
        currentIndex: 0
      };
      async function asyncRunner() {
        try {
          hooksStore.__current.add(hookInfo);
          let result = returnFirstArg ? args[0] : void 0;
          while (hookInfo.currentIndex < handlers.length) {
            const handler = handlers[hookInfo.currentIndex];
            result = await handler.callback.apply(null, args);
            if (returnFirstArg) {
              args[0] = result;
            }
            hookInfo.currentIndex++;
          }
          return returnFirstArg ? result : void 0;
        } finally {
          hooksStore.__current.delete(hookInfo);
        }
      }
      function syncRunner() {
        try {
          hooksStore.__current.add(hookInfo);
          let result = returnFirstArg ? args[0] : void 0;
          while (hookInfo.currentIndex < handlers.length) {
            const handler = handlers[hookInfo.currentIndex];
            result = handler.callback.apply(null, args);
            if (returnFirstArg) {
              args[0] = result;
            }
            hookInfo.currentIndex++;
          }
          return returnFirstArg ? result : void 0;
        } finally {
          hooksStore.__current.delete(hookInfo);
        }
      }
      return (async ? asyncRunner : syncRunner)();
    };
  }
  var createRunHook_default = createRunHook;

  // packages/hooks/build-module/createCurrentHook.mjs
  function createCurrentHook(hooks, storeKey) {
    return function currentHook() {
      const hooksStore = hooks[storeKey];
      const currentArray = Array.from(hooksStore.__current);
      return currentArray.at(-1)?.name ?? null;
    };
  }
  var createCurrentHook_default = createCurrentHook;

  // packages/hooks/build-module/createDoingHook.mjs
  function createDoingHook(hooks, storeKey) {
    return function doingHook(hookName) {
      const hooksStore = hooks[storeKey];
      if ("undefined" === typeof hookName) {
        return hooksStore.__current.size > 0;
      }
      return Array.from(hooksStore.__current).some(
        (hook) => hook.name === hookName
      );
    };
  }
  var createDoingHook_default = createDoingHook;

  // packages/hooks/build-module/createDidHook.mjs
  function createDidHook(hooks, storeKey) {
    return function didHook(hookName) {
      const hooksStore = hooks[storeKey];
      if (!validateHookName_default(hookName)) {
        return;
      }
      return hooksStore[hookName] && hooksStore[hookName].runs ? hooksStore[hookName].runs : 0;
    };
  }
  var createDidHook_default = createDidHook;

  // packages/hooks/build-module/createHooks.mjs
  var _Hooks = class {
    actions;
    filters;
    addAction;
    addFilter;
    removeAction;
    removeFilter;
    hasAction;
    hasFilter;
    removeAllActions;
    removeAllFilters;
    doAction;
    doActionAsync;
    applyFilters;
    applyFiltersAsync;
    currentAction;
    currentFilter;
    doingAction;
    doingFilter;
    didAction;
    didFilter;
    constructor() {
      this.actions = /* @__PURE__ */ Object.create(null);
      this.actions.__current = /* @__PURE__ */ new Set();
      this.filters = /* @__PURE__ */ Object.create(null);
      this.filters.__current = /* @__PURE__ */ new Set();
      this.addAction = createAddHook_default(this, "actions");
      this.addFilter = createAddHook_default(this, "filters");
      this.removeAction = createRemoveHook_default(this, "actions");
      this.removeFilter = createRemoveHook_default(this, "filters");
      this.hasAction = createHasHook_default(this, "actions");
      this.hasFilter = createHasHook_default(this, "filters");
      this.removeAllActions = createRemoveHook_default(this, "actions", true);
      this.removeAllFilters = createRemoveHook_default(this, "filters", true);
      this.doAction = createRunHook_default(this, "actions", false, false);
      this.doActionAsync = createRunHook_default(this, "actions", false, true);
      this.applyFilters = createRunHook_default(this, "filters", true, false);
      this.applyFiltersAsync = createRunHook_default(this, "filters", true, true);
      this.currentAction = createCurrentHook_default(this, "actions");
      this.currentFilter = createCurrentHook_default(this, "filters");
      this.doingAction = createDoingHook_default(this, "actions");
      this.doingFilter = createDoingHook_default(this, "filters");
      this.didAction = createDidHook_default(this, "actions");
      this.didFilter = createDidHook_default(this, "filters");
    }
  };
  function createHooks() {
    return new _Hooks();
  }
  var createHooks_default = createHooks;

  // packages/hooks/build-module/index.mjs
  var defaultHooks = createHooks_default();
  var {
    addAction,
    addFilter,
    removeAction,
    removeFilter,
    hasAction,
    hasFilter,
    removeAllActions,
    removeAllFilters,
    doAction,
    doActionAsync,
    applyFilters,
    applyFiltersAsync,
    currentAction,
    currentFilter,
    doingAction,
    doingFilter,
    didAction,
    didFilter,
    actions,
    filters
  } = defaultHooks;
  return __toCommonJS(index_exports);
})();
                                              dist/hooks.min.js                                                                                   0000644                 00000011627 15212564022 0007760 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).hooks=(()=>{var v=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var I=Object.prototype.hasOwnProperty;var w=(e,n)=>{for(var s in n)v(e,s,{get:n[s],enumerable:!0})},D=(e,n,s,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of g(n))!I.call(e,t)&&t!==s&&v(e,t,{get:()=>n[t],enumerable:!(r=S(n,t))||r.enumerable});return e};var T=e=>D(v({},"__esModule",{value:!0}),e);var le={};w(le,{actions:()=>ae,addAction:()=>J,addFilter:()=>K,applyFilters:()=>N,applyFiltersAsync:()=>ee,createHooks:()=>F,currentAction:()=>te,currentFilter:()=>re,defaultHooks:()=>b,didAction:()=>ie,didFilter:()=>se,doAction:()=>X,doActionAsync:()=>Y,doingAction:()=>ne,doingFilter:()=>oe,filters:()=>ce,hasAction:()=>P,hasFilter:()=>Q,removeAction:()=>L,removeAllActions:()=>U,removeAllFilters:()=>W,removeFilter:()=>M});function z(e){return typeof e!="string"||e===""?(console.error("The namespace must be a non-empty string."),!1):/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)?!0:(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)}var m=z;function E(e){return typeof e!="string"||e===""?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)?!0:(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)}var f=E;function Z(e,n){return function(r,t,a,i=10){let c=e[n];if(!f(r)||!m(t))return;if(typeof a!="function"){console.error("The hook callback must be a function.");return}if(typeof i!="number"){console.error("If specified, the hook priority must be a number.");return}let l={callback:a,priority:i,namespace:t};if(c[r]){let o=c[r].handlers,d;for(d=o.length;d>0&&!(i>=o[d-1].priority);d--);d===o.length?o[d]=l:o.splice(d,0,l),c.__current.forEach(h=>{h.name===r&&h.currentIndex>=d&&h.currentIndex++})}else c[r]={handlers:[l],runs:0};r!=="hookAdded"&&e.doAction("hookAdded",r,t,a,i)}}var H=Z;function C(e,n,s=!1){return function(t,a){let i=e[n];if(!f(t)||!s&&!m(a))return;if(!i[t])return 0;let c=0;if(s)c=i[t].handlers.length,i[t]={runs:i[t].runs,handlers:[]};else{let l=i[t].handlers;for(let o=l.length-1;o>=0;o--)l[o].namespace===a&&(l.splice(o,1),c++,i.__current.forEach(d=>{d.name===t&&d.currentIndex>=o&&d.currentIndex--}))}return t!=="hookRemoved"&&e.doAction("hookRemoved",t,a),c}}var p=C;function O(e,n){return function(r,t){let a=e[n];return typeof t<"u"?r in a&&a[r].handlers.some(i=>i.namespace===t):r in a}}var _=O;function j(e,n,s,r){return function(a,...i){let c=e[n];c[a]||(c[a]={handlers:[],runs:0}),c[a].runs++;let l=c[a].handlers;if(!l||!l.length)return s?i[0]:void 0;let o={name:a,currentIndex:0};async function d(){try{c.__current.add(o);let u=s?i[0]:void 0;for(;o.currentIndex<l.length;)u=await l[o.currentIndex].callback.apply(null,i),s&&(i[0]=u),o.currentIndex++;return s?u:void 0}finally{c.__current.delete(o)}}function h(){try{c.__current.add(o);let u=s?i[0]:void 0;for(;o.currentIndex<l.length;)u=l[o.currentIndex].callback.apply(null,i),s&&(i[0]=u),o.currentIndex++;return s?u:void 0}finally{c.__current.delete(o)}}return(r?d:h)()}}var A=j;function $(e,n){return function(){let r=e[n];return Array.from(r.__current).at(-1)?.name??null}}var y=$;function V(e,n){return function(r){let t=e[n];return typeof r>"u"?t.__current.size>0:Array.from(t.__current).some(a=>a.name===r)}}var k=V;function q(e,n){return function(r){let t=e[n];if(f(r))return t[r]&&t[r].runs?t[r].runs:0}}var x=q;var B=class{actions;filters;addAction;addFilter;removeAction;removeFilter;hasAction;hasFilter;removeAllActions;removeAllFilters;doAction;doActionAsync;applyFilters;applyFiltersAsync;currentAction;currentFilter;doingAction;doingFilter;didAction;didFilter;constructor(){this.actions=Object.create(null),this.actions.__current=new Set,this.filters=Object.create(null),this.filters.__current=new Set,this.addAction=H(this,"actions"),this.addFilter=H(this,"filters"),this.removeAction=p(this,"actions"),this.removeFilter=p(this,"filters"),this.hasAction=_(this,"actions"),this.hasFilter=_(this,"filters"),this.removeAllActions=p(this,"actions",!0),this.removeAllFilters=p(this,"filters",!0),this.doAction=A(this,"actions",!1,!1),this.doActionAsync=A(this,"actions",!1,!0),this.applyFilters=A(this,"filters",!0,!1),this.applyFiltersAsync=A(this,"filters",!0,!0),this.currentAction=y(this,"actions"),this.currentFilter=y(this,"filters"),this.doingAction=k(this,"actions"),this.doingFilter=k(this,"filters"),this.didAction=x(this,"actions"),this.didFilter=x(this,"filters")}};function G(){return new B}var F=G;var b=F(),{addAction:J,addFilter:K,removeAction:L,removeFilter:M,hasAction:P,hasFilter:Q,removeAllActions:U,removeAllFilters:W,doAction:X,doActionAsync:Y,applyFilters:N,applyFiltersAsync:ee,currentAction:te,currentFilter:re,doingAction:ne,doingFilter:oe,didAction:ie,didFilter:se,actions:ae,filters:ce}=b;return T(le);})();
                                                                                                         dist/html-entities.js                                                                               0000644                 00000003225 15212564022 0010634 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).htmlEntities = (() => {
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // packages/html-entities/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    decodeEntities: () => decodeEntities
  });
  var _decodeTextArea;
  function decodeEntities(html) {
    if ("string" !== typeof html || -1 === html.indexOf("&")) {
      return html;
    }
    if (void 0 === _decodeTextArea) {
      if (document.implementation && document.implementation.createHTMLDocument) {
        _decodeTextArea = document.implementation.createHTMLDocument("").createElement("textarea");
      } else {
        _decodeTextArea = document.createElement("textarea");
      }
    }
    _decodeTextArea.innerHTML = html;
    const decoded = _decodeTextArea.textContent ?? "";
    _decodeTextArea.innerHTML = "";
    return decoded;
  }
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                                                                           dist/html-entities.min.js                                                                           0000644                 00000001514 15212564022 0011415 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).htmlEntities=(()=>{var r=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var u=(e,t)=>{for(var i in t)r(e,i,{get:t[i],enumerable:!0})},f=(e,t,i,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of d(t))!m.call(e,o)&&o!==i&&r(e,o,{get:()=>t[o],enumerable:!(c=a(t,o))||c.enumerable});return e};var x=e=>f(r({},"__esModule",{value:!0}),e);var T={};u(T,{decodeEntities:()=>p});var n;function p(e){if(typeof e!="string"||e.indexOf("&")===-1)return e;n===void 0&&(document.implementation&&document.implementation.createHTMLDocument?n=document.implementation.createHTMLDocument("").createElement("textarea"):n=document.createElement("textarea")),n.innerHTML=e;let t=n.textContent??"";return n.innerHTML="",t}return x(T);})();
                                                                                                                                                                                    dist/i18n.js                                                                                        0000644                 00000036466 15212564022 0006642 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).i18n = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/hooks
  var require_hooks = __commonJS({
    "package-external:@wordpress/hooks"(exports, module) {
      module.exports = window.wp.hooks;
    }
  });

  // packages/i18n/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    __: () => __,
    _n: () => _n,
    _nx: () => _nx,
    _x: () => _x,
    createI18n: () => createI18n,
    defaultI18n: () => default_i18n_default,
    getLocaleData: () => getLocaleData,
    hasTranslation: () => hasTranslation,
    isRTL: () => isRTL,
    resetLocaleData: () => resetLocaleData,
    setLocaleData: () => setLocaleData,
    sprintf: () => sprintf2,
    subscribe: () => subscribe
  });

  // node_modules/@tannin/sprintf/src/index.js
  var PATTERN = /%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;
  function sprintf(string, ...args) {
    var i = 0;
    if (Array.isArray(args[0])) {
      args = /** @type {import('../types').SprintfArgs<T>[]} */
      /** @type {unknown} */
      args[0];
    }
    return string.replace(PATTERN, function() {
      var index, name, precision, type, value;
      index = arguments[3];
      name = arguments[5];
      precision = arguments[7];
      type = arguments[9];
      if (type === "%") {
        return "%";
      }
      if (precision === "*") {
        precision = args[i];
        i++;
      }
      if (name === void 0) {
        if (index === void 0) {
          index = i + 1;
        }
        i++;
        value = args[index - 1];
      } else if (args[0] && typeof args[0] === "object" && args[0].hasOwnProperty(name)) {
        value = args[0][name];
      }
      if (type === "f") {
        value = parseFloat(value) || 0;
      } else if (type === "d") {
        value = parseInt(value) || 0;
      }
      if (precision !== void 0) {
        if (type === "f") {
          value = value.toFixed(precision);
        } else if (type === "s") {
          value = value.substr(0, precision);
        }
      }
      return value !== void 0 && value !== null ? value : "";
    });
  }

  // packages/i18n/build-module/sprintf.mjs
  function sprintf2(format, ...args) {
    return sprintf(format, ...args);
  }

  // node_modules/@tannin/postfix/index.js
  var PRECEDENCE;
  var OPENERS;
  var TERMINATORS;
  var PATTERN2;
  PRECEDENCE = {
    "(": 9,
    "!": 8,
    "*": 7,
    "/": 7,
    "%": 7,
    "+": 6,
    "-": 6,
    "<": 5,
    "<=": 5,
    ">": 5,
    ">=": 5,
    "==": 4,
    "!=": 4,
    "&&": 3,
    "||": 2,
    "?": 1,
    "?:": 1
  };
  OPENERS = ["(", "?"];
  TERMINATORS = {
    ")": ["("],
    ":": ["?", "?:"]
  };
  PATTERN2 = /<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;
  function postfix(expression) {
    var terms = [], stack = [], match, operator, term, element;
    while (match = expression.match(PATTERN2)) {
      operator = match[0];
      term = expression.substr(0, match.index).trim();
      if (term) {
        terms.push(term);
      }
      while (element = stack.pop()) {
        if (TERMINATORS[operator]) {
          if (TERMINATORS[operator][0] === element) {
            operator = TERMINATORS[operator][1] || operator;
            break;
          }
        } else if (OPENERS.indexOf(element) >= 0 || PRECEDENCE[element] < PRECEDENCE[operator]) {
          stack.push(element);
          break;
        }
        terms.push(element);
      }
      if (!TERMINATORS[operator]) {
        stack.push(operator);
      }
      expression = expression.substr(match.index + operator.length);
    }
    expression = expression.trim();
    if (expression) {
      terms.push(expression);
    }
    return terms.concat(stack.reverse());
  }

  // node_modules/@tannin/evaluate/index.js
  var OPERATORS = {
    "!": function(a) {
      return !a;
    },
    "*": function(a, b) {
      return a * b;
    },
    "/": function(a, b) {
      return a / b;
    },
    "%": function(a, b) {
      return a % b;
    },
    "+": function(a, b) {
      return a + b;
    },
    "-": function(a, b) {
      return a - b;
    },
    "<": function(a, b) {
      return a < b;
    },
    "<=": function(a, b) {
      return a <= b;
    },
    ">": function(a, b) {
      return a > b;
    },
    ">=": function(a, b) {
      return a >= b;
    },
    "==": function(a, b) {
      return a === b;
    },
    "!=": function(a, b) {
      return a !== b;
    },
    "&&": function(a, b) {
      return a && b;
    },
    "||": function(a, b) {
      return a || b;
    },
    "?:": function(a, b, c) {
      if (a) {
        throw b;
      }
      return c;
    }
  };
  function evaluate(postfix2, variables) {
    var stack = [], i, j, args, getOperatorResult, term, value;
    for (i = 0; i < postfix2.length; i++) {
      term = postfix2[i];
      getOperatorResult = OPERATORS[term];
      if (getOperatorResult) {
        j = getOperatorResult.length;
        args = Array(j);
        while (j--) {
          args[j] = stack.pop();
        }
        try {
          value = getOperatorResult.apply(null, args);
        } catch (earlyReturn) {
          return earlyReturn;
        }
      } else if (variables.hasOwnProperty(term)) {
        value = variables[term];
      } else {
        value = +term;
      }
      stack.push(value);
    }
    return stack[0];
  }

  // node_modules/@tannin/compile/index.js
  function compile(expression) {
    var terms = postfix(expression);
    return function(variables) {
      return evaluate(terms, variables);
    };
  }

  // node_modules/@tannin/plural-forms/index.js
  function pluralForms(expression) {
    var evaluate2 = compile(expression);
    return function(n) {
      return +evaluate2({ n });
    };
  }

  // node_modules/tannin/index.js
  var DEFAULT_OPTIONS = {
    contextDelimiter: "",
    onMissingKey: null
  };
  function getPluralExpression(pf) {
    var parts, i, part;
    parts = pf.split(";");
    for (i = 0; i < parts.length; i++) {
      part = parts[i].trim();
      if (part.indexOf("plural=") === 0) {
        return part.substr(7);
      }
    }
  }
  function Tannin(data, options) {
    var key;
    this.data = data;
    this.pluralForms = {};
    this.options = {};
    for (key in DEFAULT_OPTIONS) {
      this.options[key] = options !== void 0 && key in options ? options[key] : DEFAULT_OPTIONS[key];
    }
  }
  Tannin.prototype.getPluralForm = function(domain, n) {
    var getPluralForm = this.pluralForms[domain], config, plural, pf;
    if (!getPluralForm) {
      config = this.data[domain][""];
      pf = config["Plural-Forms"] || config["plural-forms"] || // Ignore reason: As known, there's no way to document the empty
      // string property on a key to guarantee this as metadata.
      // @ts-ignore
      config.plural_forms;
      if (typeof pf !== "function") {
        plural = getPluralExpression(
          config["Plural-Forms"] || config["plural-forms"] || // Ignore reason: As known, there's no way to document the empty
          // string property on a key to guarantee this as metadata.
          // @ts-ignore
          config.plural_forms
        );
        pf = pluralForms(plural);
      }
      getPluralForm = this.pluralForms[domain] = pf;
    }
    return getPluralForm(n);
  };
  Tannin.prototype.dcnpgettext = function(domain, context, singular, plural, n) {
    var index, key, entry;
    if (n === void 0) {
      index = 0;
    } else {
      index = this.getPluralForm(domain, n);
    }
    key = singular;
    if (context) {
      key = context + this.options.contextDelimiter + singular;
    }
    entry = this.data[domain][key];
    if (entry && entry[index]) {
      return entry[index];
    }
    if (this.options.onMissingKey) {
      this.options.onMissingKey(singular, domain);
    }
    return index === 0 ? singular : plural;
  };

  // packages/i18n/build-module/create-i18n.mjs
  var DEFAULT_LOCALE_DATA = {
    "": {
      plural_forms(n) {
        return n === 1 ? 0 : 1;
      }
    }
  };
  var I18N_HOOK_REGEXP = /^i18n\.(n?gettext|has_translation)(_|$)/;
  var createI18n = (initialData, initialDomain, hooks) => {
    const tannin = new Tannin({});
    const listeners = /* @__PURE__ */ new Set();
    const notifyListeners = () => {
      listeners.forEach((listener) => listener());
    };
    const subscribe2 = (callback) => {
      listeners.add(callback);
      return () => listeners.delete(callback);
    };
    const getLocaleData2 = (domain = "default") => tannin.data[domain];
    const doSetLocaleData = (data, domain = "default") => {
      tannin.data[domain] = {
        ...tannin.data[domain],
        ...data
      };
      tannin.data[domain][""] = {
        ...DEFAULT_LOCALE_DATA[""],
        ...tannin.data[domain]?.[""]
      };
      delete tannin.pluralForms[domain];
    };
    const setLocaleData2 = (data, domain) => {
      doSetLocaleData(data, domain);
      notifyListeners();
    };
    const addLocaleData = (data, domain = "default") => {
      tannin.data[domain] = {
        ...tannin.data[domain],
        ...data,
        // Populate default domain configuration (supported locale date which omits
        // a plural forms expression).
        "": {
          ...DEFAULT_LOCALE_DATA[""],
          ...tannin.data[domain]?.[""],
          ...data?.[""]
        }
      };
      delete tannin.pluralForms[domain];
      notifyListeners();
    };
    const resetLocaleData2 = (data, domain) => {
      tannin.data = {};
      tannin.pluralForms = {};
      setLocaleData2(data, domain);
    };
    const dcnpgettext = (domain = "default", context, single, plural, number) => {
      if (!tannin.data[domain]) {
        doSetLocaleData(void 0, domain);
      }
      return tannin.dcnpgettext(domain, context, single, plural, number);
    };
    const getFilterDomain = (domain) => domain || "default";
    const __2 = (text, domain) => {
      let translation = dcnpgettext(domain, void 0, text);
      if (!hooks) {
        return translation;
      }
      translation = hooks.applyFilters(
        "i18n.gettext",
        translation,
        text,
        domain
      );
      return hooks.applyFilters(
        "i18n.gettext_" + getFilterDomain(domain),
        translation,
        text,
        domain
      );
    };
    const _x2 = (text, context, domain) => {
      let translation = dcnpgettext(domain, context, text);
      if (!hooks) {
        return translation;
      }
      translation = hooks.applyFilters(
        "i18n.gettext_with_context",
        translation,
        text,
        context,
        domain
      );
      return hooks.applyFilters(
        "i18n.gettext_with_context_" + getFilterDomain(domain),
        translation,
        text,
        context,
        domain
      );
    };
    const _n2 = (single, plural, number, domain) => {
      let translation = dcnpgettext(
        domain,
        void 0,
        single,
        plural,
        number
      );
      if (!hooks) {
        return translation;
      }
      translation = hooks.applyFilters(
        "i18n.ngettext",
        translation,
        single,
        plural,
        number,
        domain
      );
      return hooks.applyFilters(
        "i18n.ngettext_" + getFilterDomain(domain),
        translation,
        single,
        plural,
        number,
        domain
      );
    };
    const _nx2 = (single, plural, number, context, domain) => {
      let translation = dcnpgettext(
        domain,
        context,
        single,
        plural,
        number
      );
      if (!hooks) {
        return translation;
      }
      translation = hooks.applyFilters(
        "i18n.ngettext_with_context",
        translation,
        single,
        plural,
        number,
        context,
        domain
      );
      return hooks.applyFilters(
        "i18n.ngettext_with_context_" + getFilterDomain(domain),
        translation,
        single,
        plural,
        number,
        context,
        domain
      );
    };
    const isRTL2 = () => {
      return "rtl" === _x2("ltr", "text direction");
    };
    const hasTranslation2 = (single, context, domain) => {
      const key = context ? context + "" + single : single;
      let result = !!tannin.data?.[domain ?? "default"]?.[key];
      if (hooks) {
        result = hooks.applyFilters(
          "i18n.has_translation",
          result,
          single,
          context,
          domain
        );
        result = hooks.applyFilters(
          "i18n.has_translation_" + getFilterDomain(domain),
          result,
          single,
          context,
          domain
        );
      }
      return result;
    };
    if (initialData) {
      setLocaleData2(initialData, initialDomain);
    }
    if (hooks) {
      const onHookAddedOrRemoved = (hookName) => {
        if (I18N_HOOK_REGEXP.test(hookName)) {
          notifyListeners();
        }
      };
      hooks.addAction("hookAdded", "core/i18n", onHookAddedOrRemoved);
      hooks.addAction("hookRemoved", "core/i18n", onHookAddedOrRemoved);
    }
    return {
      getLocaleData: getLocaleData2,
      setLocaleData: setLocaleData2,
      addLocaleData,
      resetLocaleData: resetLocaleData2,
      subscribe: subscribe2,
      __: __2,
      _x: _x2,
      _n: _n2,
      _nx: _nx2,
      isRTL: isRTL2,
      hasTranslation: hasTranslation2
    };
  };

  // packages/i18n/build-module/default-i18n.mjs
  var import_hooks = __toESM(require_hooks(), 1);
  var i18n = createI18n(void 0, void 0, import_hooks.defaultHooks);
  var default_i18n_default = i18n;
  var getLocaleData = i18n.getLocaleData.bind(i18n);
  var setLocaleData = i18n.setLocaleData.bind(i18n);
  var resetLocaleData = i18n.resetLocaleData.bind(i18n);
  var subscribe = i18n.subscribe.bind(i18n);
  var __ = i18n.__.bind(i18n);
  var _x = i18n._x.bind(i18n);
  var _n = i18n._n.bind(i18n);
  var _nx = i18n._nx.bind(i18n);
  var isRTL = i18n.isRTL.bind(i18n);
  var hasTranslation = i18n.hasTranslation.bind(i18n);
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                          dist/i18n.min.js                                                                                    0000644                 00000013101 15212564022 0007401 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).i18n=(()=>{var nt=Object.create;var L=Object.defineProperty;var at=Object.getOwnPropertyDescriptor;var it=Object.getOwnPropertyNames;var ut=Object.getPrototypeOf,lt=Object.prototype.hasOwnProperty;var ft=(t,r)=>()=>(r||t((r={exports:{}}).exports,r),r.exports),ot=(t,r)=>{for(var e in r)L(t,e,{get:r[e],enumerable:!0})},O=(t,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let u of it(r))!lt.call(t,u)&&u!==e&&L(t,u,{get:()=>r[u],enumerable:!(n=at(r,u))||n.enumerable});return t};var st=(t,r,e)=>(e=t!=null?nt(ut(t)):{},O(r||!t||!t.__esModule?L(e,"default",{value:t,enumerable:!0}):e,t)),pt=t=>O(L({},"__esModule",{value:!0}),t);var $=ft((It,M)=>{M.exports=window.wp.hooks});var yt={};ot(yt,{__:()=>Z,_n:()=>G,_nx:()=>B,_x:()=>q,createI18n:()=>R,defaultI18n:()=>H,getLocaleData:()=>j,hasTranslation:()=>Q,isRTL:()=>J,resetLocaleData:()=>U,setLocaleData:()=>z,sprintf:()=>P,subscribe:()=>X});var ct=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function T(t,...r){var e=0;return Array.isArray(r[0])&&(r=r[0]),t.replace(ct,function(){var n,u,l,o,f;return n=arguments[3],u=arguments[5],l=arguments[7],o=arguments[9],o==="%"?"%":(l==="*"&&(l=r[e],e++),u===void 0?(n===void 0&&(n=e+1),e++,f=r[n-1]):r[0]&&typeof r[0]=="object"&&r[0].hasOwnProperty(u)&&(f=r[0][u]),o==="f"?f=parseFloat(f)||0:o==="d"&&(f=parseInt(f)||0),l!==void 0&&(o==="f"?f=f.toFixed(l):o==="s"&&(f=f.substr(0,l))),f??"")})}function P(t,...r){return T(t,...r)}var D,I,h,N;D={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1};I=["(","?"];h={")":["("],":":["?","?:"]};N=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;function b(t){for(var r=[],e=[],n,u,l,o;n=t.match(N);){for(u=n[0],l=t.substr(0,n.index).trim(),l&&r.push(l);o=e.pop();){if(h[u]){if(h[u][0]===o){u=h[u][1]||u;break}}else if(I.indexOf(o)>=0||D[o]<D[u]){e.push(o);break}r.push(o)}h[u]||e.push(u),t=t.substr(n.index+u.length)}return t=t.trim(),t&&r.push(t),r.concat(e.reverse())}var dt={"!":function(t){return!t},"*":function(t,r){return t*r},"/":function(t,r){return t/r},"%":function(t,r){return t%r},"+":function(t,r){return t+r},"-":function(t,r){return t-r},"<":function(t,r){return t<r},"<=":function(t,r){return t<=r},">":function(t,r){return t>r},">=":function(t,r){return t>=r},"==":function(t,r){return t===r},"!=":function(t,r){return t!==r},"&&":function(t,r){return t&&r},"||":function(t,r){return t||r},"?:":function(t,r,e){if(t)throw r;return e}};function g(t,r){var e=[],n,u,l,o,f,_;for(n=0;n<t.length;n++){if(f=t[n],o=dt[f],o){for(u=o.length,l=Array(u);u--;)l[u]=e.pop();try{_=o.apply(null,l)}catch(v){return v}}else r.hasOwnProperty(f)?_=r[f]:_=+f;e.push(_)}return e[0]}function A(t){var r=b(t);return function(e){return g(r,e)}}function E(t){var r=A(t);return function(e){return+r({n:e})}}var S={contextDelimiter:"",onMissingKey:null};function _t(t){var r,e,n;for(r=t.split(";"),e=0;e<r.length;e++)if(n=r[e].trim(),n.indexOf("plural=")===0)return n.substr(7)}function x(t,r){var e;this.data=t,this.pluralForms={},this.options={};for(e in S)this.options[e]=r!==void 0&&e in r?r[e]:S[e]}x.prototype.getPluralForm=function(t,r){var e=this.pluralForms[t],n,u,l;return e||(n=this.data[t][""],l=n["Plural-Forms"]||n["plural-forms"]||n.plural_forms,typeof l!="function"&&(u=_t(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),l=E(u)),e=this.pluralForms[t]=l),e(r)};x.prototype.dcnpgettext=function(t,r,e,n,u){var l,o,f;return u===void 0?l=0:l=this.getPluralForm(t,u),o=e,r&&(o=r+this.options.contextDelimiter+e),f=this.data[t][o],f&&f[l]?f[l]:(this.options.onMissingKey&&this.options.onMissingKey(e,t),l===0?e:n)};var K={"":{plural_forms(t){return t===1?0:1}}},vt=/^i18n\.(n?gettext|has_translation)(_|$)/,R=(t,r,e)=>{let n=new x({}),u=new Set,l=()=>{u.forEach(a=>a())},o=a=>(u.add(a),()=>u.delete(a)),f=(a="default")=>n.data[a],_=(a,i="default")=>{n.data[i]={...n.data[i],...a},n.data[i][""]={...K[""],...n.data[i]?.[""]},delete n.pluralForms[i]},v=(a,i)=>{_(a,i),l()},V=(a,i="default")=>{n.data[i]={...n.data[i],...a,"":{...K[""],...n.data[i]?.[""],...a?.[""]}},delete n.pluralForms[i],l()},W=(a,i)=>{n.data={},n.pluralForms={},v(a,i)},m=(a="default",i,s,c,d)=>(n.data[a]||_(void 0,a),n.dcnpgettext(a,i,s,c,d)),y=a=>a||"default",Y=(a,i)=>{let s=m(i,void 0,a);return e?(s=e.applyFilters("i18n.gettext",s,a,i),e.applyFilters("i18n.gettext_"+y(i),s,a,i)):s},w=(a,i,s)=>{let c=m(s,i,a);return e?(c=e.applyFilters("i18n.gettext_with_context",c,a,i,s),e.applyFilters("i18n.gettext_with_context_"+y(s),c,a,i,s)):c},k=(a,i,s,c)=>{let d=m(c,void 0,a,i,s);return e?(d=e.applyFilters("i18n.ngettext",d,a,i,s,c),e.applyFilters("i18n.ngettext_"+y(c),d,a,i,s,c)):d},tt=(a,i,s,c,d)=>{let F=m(d,c,a,i,s);return e?(F=e.applyFilters("i18n.ngettext_with_context",F,a,i,s,c,d),e.applyFilters("i18n.ngettext_with_context_"+y(d),F,a,i,s,c,d)):F},rt=()=>w("ltr","text direction")==="rtl",et=(a,i,s)=>{let c=i?i+""+a:a,d=!!n.data?.[s??"default"]?.[c];return e&&(d=e.applyFilters("i18n.has_translation",d,a,i,s),d=e.applyFilters("i18n.has_translation_"+y(s),d,a,i,s)),d};if(t&&v(t,r),e){let a=i=>{vt.test(i)&&l()};e.addAction("hookAdded","core/i18n",a),e.addAction("hookRemoved","core/i18n",a)}return{getLocaleData:f,setLocaleData:v,addLocaleData:V,resetLocaleData:W,subscribe:o,__:Y,_x:w,_n:k,_nx:tt,isRTL:rt,hasTranslation:et}};var C=st($(),1),p=R(void 0,void 0,C.defaultHooks),H=p,j=p.getLocaleData.bind(p),z=p.setLocaleData.bind(p),U=p.resetLocaleData.bind(p),X=p.subscribe.bind(p),Z=p.__.bind(p),q=p._x.bind(p),G=p._n.bind(p),B=p._nx.bind(p),J=p.isRTL.bind(p),Q=p.hasTranslation.bind(p);return pt(yt);})();
                                                                                                                                                                                                                                                                                                                                                                                                                                                               dist/is-shallow-equal.js                                                                            0000644                 00000005306 15212564022 0011237 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).isShallowEqual = (() => {
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // packages/is-shallow-equal/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    default: () => isShallowEqual,
    isShallowEqual: () => isShallowEqual,
    isShallowEqualArrays: () => isShallowEqualArrays,
    isShallowEqualObjects: () => isShallowEqualObjects
  });

  // packages/is-shallow-equal/build-module/objects.mjs
  function isShallowEqualObjects(a, b) {
    if (a === b) {
      return true;
    }
    const aKeys = Object.keys(a);
    const bKeys = Object.keys(b);
    if (aKeys.length !== bKeys.length) {
      return false;
    }
    let i = 0;
    while (i < aKeys.length) {
      const key = aKeys[i];
      const aValue = a[key];
      if (
        // In iterating only the keys of the first object after verifying
        // equal lengths, account for the case that an explicit `undefined`
        // value in the first is implicitly undefined in the second.
        //
        // Example: isShallowEqualObjects( { a: undefined }, { b: 5 } )
        aValue === void 0 && !b.hasOwnProperty(key) || aValue !== b[key]
      ) {
        return false;
      }
      i++;
    }
    return true;
  }

  // packages/is-shallow-equal/build-module/arrays.mjs
  function isShallowEqualArrays(a, b) {
    if (a === b) {
      return true;
    }
    if (a.length !== b.length) {
      return false;
    }
    for (let i = 0, len = a.length; i < len; i++) {
      if (a[i] !== b[i]) {
        return false;
      }
    }
    return true;
  }

  // packages/is-shallow-equal/build-module/index.mjs
  function isShallowEqual(a, b) {
    if (a && b) {
      if (a.constructor === Object && b.constructor === Object) {
        return isShallowEqualObjects(a, b);
      } else if (Array.isArray(a) && Array.isArray(b)) {
        return isShallowEqualArrays(a, b);
      }
    }
    return a === b;
  }
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                          dist/is-shallow-equal.min.js                                                                        0000644                 00000002077 15212564022 0012023 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).isShallowEqual=(()=>{var u=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var y=(e,r)=>{for(var t in r)u(e,t,{get:r[t],enumerable:!0})},w=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let l of c(r))!h.call(e,l)&&l!==t&&u(e,l,{get:()=>r[l],enumerable:!(n=a(r,l))||n.enumerable});return e};var O=e=>w(u({},"__esModule",{value:!0}),e);var j={};y(j,{default:()=>g,isShallowEqual:()=>g,isShallowEqualArrays:()=>i,isShallowEqualObjects:()=>o});function o(e,r){if(e===r)return!0;let t=Object.keys(e),n=Object.keys(r);if(t.length!==n.length)return!1;let l=0;for(;l<t.length;){let s=t[l],f=e[s];if(f===void 0&&!r.hasOwnProperty(s)||f!==r[s])return!1;l++}return!0}function i(e,r){if(e===r)return!0;if(e.length!==r.length)return!1;for(let t=0,n=e.length;t<n;t++)if(e[t]!==r[t])return!1;return!0}function g(e,r){if(e&&r){if(e.constructor===Object&&r.constructor===Object)return o(e,r);if(Array.isArray(e)&&Array.isArray(r))return i(e,r)}return e===r}return O(j);})();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                 dist/keyboard-shortcuts.js                                                                          0000644                 00000023271 15212564022 0011705 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;
(wp ||= {}).keyboardShortcuts = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/keycodes
  var require_keycodes = __commonJS({
    "package-external:@wordpress/keycodes"(exports, module) {
      module.exports = window.wp.keycodes;
    }
  });

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // packages/keyboard-shortcuts/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    ShortcutProvider: () => ShortcutProvider,
    __unstableUseShortcutEventMatch: () => useShortcutEventMatch,
    store: () => store,
    useShortcut: () => useShortcut
  });

  // packages/keyboard-shortcuts/build-module/store/index.mjs
  var import_data2 = __toESM(require_data(), 1);

  // packages/keyboard-shortcuts/build-module/store/reducer.mjs
  function reducer(state = {}, action) {
    switch (action.type) {
      case "REGISTER_SHORTCUT":
        return {
          ...state,
          [action.name]: {
            category: action.category,
            keyCombination: action.keyCombination,
            aliases: action.aliases,
            description: action.description
          }
        };
      case "UNREGISTER_SHORTCUT":
        const { [action.name]: actionName, ...remainingState } = state;
        return remainingState;
    }
    return state;
  }
  var reducer_default = reducer;

  // packages/keyboard-shortcuts/build-module/store/actions.mjs
  var actions_exports = {};
  __export(actions_exports, {
    registerShortcut: () => registerShortcut,
    unregisterShortcut: () => unregisterShortcut
  });
  function registerShortcut({
    name,
    category,
    description,
    keyCombination,
    aliases
  }) {
    return {
      type: "REGISTER_SHORTCUT",
      name,
      category,
      keyCombination,
      aliases,
      description
    };
  }
  function unregisterShortcut(name) {
    return {
      type: "UNREGISTER_SHORTCUT",
      name
    };
  }

  // packages/keyboard-shortcuts/build-module/store/selectors.mjs
  var selectors_exports = {};
  __export(selectors_exports, {
    getAllShortcutKeyCombinations: () => getAllShortcutKeyCombinations,
    getAllShortcutRawKeyCombinations: () => getAllShortcutRawKeyCombinations,
    getCategoryShortcuts: () => getCategoryShortcuts,
    getShortcutAliases: () => getShortcutAliases,
    getShortcutDescription: () => getShortcutDescription,
    getShortcutKeyCombination: () => getShortcutKeyCombination,
    getShortcutRepresentation: () => getShortcutRepresentation
  });
  var import_data = __toESM(require_data(), 1);
  var import_keycodes = __toESM(require_keycodes(), 1);
  var EMPTY_ARRAY = [];
  var FORMATTING_METHODS = {
    display: import_keycodes.displayShortcut,
    raw: import_keycodes.rawShortcut,
    ariaLabel: import_keycodes.shortcutAriaLabel
  };
  function getKeyCombinationRepresentation(shortcut, representation) {
    if (!shortcut) {
      return null;
    }
    return shortcut.modifier ? FORMATTING_METHODS[representation][shortcut.modifier](
      shortcut.character
    ) : shortcut.character;
  }
  function getShortcutKeyCombination(state, name) {
    return state[name] ? state[name].keyCombination : null;
  }
  function getShortcutRepresentation(state, name, representation = "display") {
    const shortcut = getShortcutKeyCombination(state, name);
    return getKeyCombinationRepresentation(shortcut, representation);
  }
  function getShortcutDescription(state, name) {
    return state[name] ? state[name].description : null;
  }
  function getShortcutAliases(state, name) {
    return state[name] && state[name].aliases ? state[name].aliases : EMPTY_ARRAY;
  }
  var getAllShortcutKeyCombinations = (0, import_data.createSelector)(
    (state, name) => {
      return [
        getShortcutKeyCombination(state, name),
        ...getShortcutAliases(state, name)
      ].filter(Boolean);
    },
    (state, name) => [state[name]]
  );
  var getAllShortcutRawKeyCombinations = (0, import_data.createSelector)(
    (state, name) => {
      return getAllShortcutKeyCombinations(state, name).map(
        (combination) => getKeyCombinationRepresentation(combination, "raw")
      );
    },
    (state, name) => [state[name]]
  );
  var getCategoryShortcuts = (0, import_data.createSelector)(
    (state, categoryName) => {
      return Object.entries(state).filter(([, shortcut]) => shortcut.category === categoryName).map(([name]) => name);
    },
    (state) => [state]
  );

  // packages/keyboard-shortcuts/build-module/store/index.mjs
  var STORE_NAME = "core/keyboard-shortcuts";
  var store = (0, import_data2.createReduxStore)(STORE_NAME, {
    reducer: reducer_default,
    actions: actions_exports,
    selectors: selectors_exports
  });
  (0, import_data2.register)(store);

  // packages/keyboard-shortcuts/build-module/hooks/use-shortcut.mjs
  var import_element2 = __toESM(require_element(), 1);

  // packages/keyboard-shortcuts/build-module/hooks/use-shortcut-event-match.mjs
  var import_data3 = __toESM(require_data(), 1);
  var import_keycodes2 = __toESM(require_keycodes(), 1);
  function useShortcutEventMatch() {
    const { getAllShortcutKeyCombinations: getAllShortcutKeyCombinations2 } = (0, import_data3.useSelect)(
      store
    );
    function isMatch(name, event) {
      return getAllShortcutKeyCombinations2(name).some(
        ({ modifier, character }) => {
          return import_keycodes2.isKeyboardEvent[modifier](event, character);
        }
      );
    }
    return isMatch;
  }

  // packages/keyboard-shortcuts/build-module/context.mjs
  var import_element = __toESM(require_element(), 1);
  var globalShortcuts = /* @__PURE__ */ new Set();
  var globalListener = (event) => {
    for (const keyboardShortcut of globalShortcuts) {
      keyboardShortcut(event);
    }
  };
  var context = (0, import_element.createContext)({
    add: (shortcut) => {
      if (globalShortcuts.size === 0) {
        document.addEventListener("keydown", globalListener);
      }
      globalShortcuts.add(shortcut);
    },
    delete: (shortcut) => {
      globalShortcuts.delete(shortcut);
      if (globalShortcuts.size === 0) {
        document.removeEventListener("keydown", globalListener);
      }
    }
  });
  context.displayName = "KeyboardShortcutsContext";

  // packages/keyboard-shortcuts/build-module/hooks/use-shortcut.mjs
  function useShortcut(name, callback, { isDisabled = false } = {}) {
    const shortcuts = (0, import_element2.useContext)(context);
    const isMatch = useShortcutEventMatch();
    const callbackRef = (0, import_element2.useRef)();
    (0, import_element2.useEffect)(() => {
      callbackRef.current = callback;
    }, [callback]);
    (0, import_element2.useEffect)(() => {
      if (isDisabled) {
        return;
      }
      function _callback(event) {
        if (isMatch(name, event)) {
          callbackRef.current(event);
        }
      }
      shortcuts.add(_callback);
      return () => {
        shortcuts.delete(_callback);
      };
    }, [name, isDisabled, shortcuts]);
  }

  // packages/keyboard-shortcuts/build-module/components/shortcut-provider.mjs
  var import_element3 = __toESM(require_element(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  var { Provider } = context;
  function ShortcutProvider(props) {
    const [keyboardShortcuts] = (0, import_element3.useState)(() => /* @__PURE__ */ new Set());
    function onKeyDown(event) {
      if (props.onKeyDown) {
        props.onKeyDown(event);
      }
      for (const keyboardShortcut of keyboardShortcuts) {
        keyboardShortcut(event);
      }
    }
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Provider, { value: keyboardShortcuts, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ...props, onKeyDown }) });
  }
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                                       dist/keyboard-shortcuts.min.js                                                                      0000644                 00000006644 15212564022 0012474 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;(wp||={}).keyboardShortcuts=(()=>{var B=Object.create;var d=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var J=Object.getOwnPropertyNames;var X=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var l=(t,r)=>()=>(r||t((r={exports:{}}).exports,r),r.exports),w=(t,r)=>{for(var e in r)d(t,e,{get:r[e],enumerable:!0})},k=(t,r,e,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of J(r))!q.call(t,n)&&n!==e&&d(t,n,{get:()=>r[n],enumerable:!(o=F(r,n))||o.enumerable});return t};var i=(t,r,e)=>(e=t!=null?B(X(t)):{},k(r||!t||!t.__esModule?d(e,"default",{value:t,enumerable:!0}):e,t)),Q=t=>k(d({},"__esModule",{value:!0}),t);var p=l((st,_)=>{_.exports=window.wp.data});var b=l((mt,A)=>{A.exports=window.wp.keycodes});var y=l((pt,N)=>{N.exports=window.wp.element});var j=l((bt,P)=>{P.exports=window.ReactJSXRuntime});var ut={};w(ut,{ShortcutProvider:()=>Y,__unstableUseShortcutEventMatch:()=>R,store:()=>c,useShortcut:()=>D});var h=i(p(),1);function V(t={},r){switch(r.type){case"REGISTER_SHORTCUT":return{...t,[r.name]:{category:r.category,keyCombination:r.keyCombination,aliases:r.aliases,description:r.description}};case"UNREGISTER_SHORTCUT":let{[r.name]:e,...o}=t;return o}return t}var K=V;var v={};w(v,{registerShortcut:()=>W,unregisterShortcut:()=>Z});function W({name:t,category:r,description:e,keyCombination:o,aliases:n}){return{type:"REGISTER_SHORTCUT",name:t,category:r,keyCombination:o,aliases:n,description:e}}function Z(t){return{type:"UNREGISTER_SHORTCUT",name:t}}var g={};w(g,{getAllShortcutKeyCombinations:()=>U,getAllShortcutRawKeyCombinations:()=>ot,getCategoryShortcuts:()=>nt,getShortcutAliases:()=>O,getShortcutDescription:()=>et,getShortcutKeyCombination:()=>x,getShortcutRepresentation:()=>rt});var S=i(p(),1),u=i(b(),1),$=[],tt={display:u.displayShortcut,raw:u.rawShortcut,ariaLabel:u.shortcutAriaLabel};function M(t,r){return t?t.modifier?tt[r][t.modifier](t.character):t.character:null}function x(t,r){return t[r]?t[r].keyCombination:null}function rt(t,r,e="display"){let o=x(t,r);return M(o,e)}function et(t,r){return t[r]?t[r].description:null}function O(t,r){return t[r]&&t[r].aliases?t[r].aliases:$}var U=(0,S.createSelector)((t,r)=>[x(t,r),...O(t,r)].filter(Boolean),(t,r)=>[t[r]]),ot=(0,S.createSelector)((t,r)=>U(t,r).map(e=>M(e,"raw")),(t,r)=>[t[r]]),nt=(0,S.createSelector)((t,r)=>Object.entries(t).filter(([,e])=>e.category===r).map(([e])=>e),t=>[t]);var it="core/keyboard-shortcuts",c=(0,h.createReduxStore)(it,{reducer:K,actions:v,selectors:g});(0,h.register)(c);var a=i(y(),1);var G=i(p(),1),H=i(b(),1);function R(){let{getAllShortcutKeyCombinations:t}=(0,G.useSelect)(c);function r(e,o){return t(e).some(({modifier:n,character:m})=>H.isKeyboardEvent[n](o,m))}return r}var L=i(y(),1),s=new Set,I=t=>{for(let r of s)r(t)},f=(0,L.createContext)({add:t=>{s.size===0&&document.addEventListener("keydown",I),s.add(t)},delete:t=>{s.delete(t),s.size===0&&document.removeEventListener("keydown",I)}});f.displayName="KeyboardShortcutsContext";function D(t,r,{isDisabled:e=!1}={}){let o=(0,a.useContext)(f),n=R(),m=(0,a.useRef)();(0,a.useEffect)(()=>{m.current=r},[r]),(0,a.useEffect)(()=>{if(e)return;function T(C){n(t,C)&&m.current(C)}return o.add(T),()=>{o.delete(T)}},[t,e,o])}var z=i(y(),1);var E=i(j(),1),{Provider:at}=f;function Y(t){let[r]=(0,z.useState)(()=>new Set);function e(o){t.onKeyDown&&t.onKeyDown(o);for(let n of r)n(o)}return(0,E.jsx)(at,{value:r,children:(0,E.jsx)("div",{...t,onKeyDown:e})})}return Q(ut);})();
                                                                                            dist/keycodes.js                                                                                    0000644                 00000020465 15212564022 0007661 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).keycodes = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // packages/keycodes/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    ALT: () => ALT,
    BACKSPACE: () => BACKSPACE,
    COMMAND: () => COMMAND,
    CTRL: () => CTRL,
    DELETE: () => DELETE,
    DOWN: () => DOWN,
    END: () => END,
    ENTER: () => ENTER,
    ESCAPE: () => ESCAPE,
    F10: () => F10,
    HOME: () => HOME,
    LEFT: () => LEFT,
    PAGEDOWN: () => PAGEDOWN,
    PAGEUP: () => PAGEUP,
    RIGHT: () => RIGHT,
    SHIFT: () => SHIFT,
    SPACE: () => SPACE,
    TAB: () => TAB,
    UP: () => UP,
    ZERO: () => ZERO,
    ariaKeyShortcut: () => ariaKeyShortcut,
    displayShortcut: () => displayShortcut,
    displayShortcutList: () => displayShortcutList,
    isAppleOS: () => isAppleOS,
    isKeyboardEvent: () => isKeyboardEvent,
    modifiers: () => modifiers,
    rawShortcut: () => rawShortcut,
    shortcutAriaLabel: () => shortcutAriaLabel
  });
  var import_i18n = __toESM(require_i18n(), 1);

  // packages/keycodes/build-module/platform.mjs
  function isAppleOS(_window) {
    if (!_window) {
      if (typeof window === "undefined") {
        return false;
      }
      _window = window;
    }
    const { platform } = _window.navigator;
    return platform.indexOf("Mac") !== -1 || ["iPad", "iPhone"].includes(platform);
  }

  // packages/keycodes/build-module/index.mjs
  var BACKSPACE = 8;
  var TAB = 9;
  var ENTER = 13;
  var ESCAPE = 27;
  var SPACE = 32;
  var PAGEUP = 33;
  var PAGEDOWN = 34;
  var END = 35;
  var HOME = 36;
  var LEFT = 37;
  var UP = 38;
  var RIGHT = 39;
  var DOWN = 40;
  var DELETE = 46;
  var F10 = 121;
  var ALT = "alt";
  var CTRL = "ctrl";
  var COMMAND = "meta";
  var SHIFT = "shift";
  var ZERO = 48;
  function capitaliseFirstCharacter(string) {
    return string.length < 2 ? string.toUpperCase() : string.charAt(0).toUpperCase() + string.slice(1);
  }
  function mapValues(object, mapFn) {
    return Object.fromEntries(
      Object.entries(object).map(([key, value]) => [
        key,
        mapFn(value)
      ])
    );
  }
  var modifiers = {
    primary: (_isApple) => _isApple() ? [COMMAND] : [CTRL],
    primaryShift: (_isApple) => _isApple() ? [SHIFT, COMMAND] : [CTRL, SHIFT],
    primaryAlt: (_isApple) => _isApple() ? [ALT, COMMAND] : [CTRL, ALT],
    secondary: (_isApple) => _isApple() ? [SHIFT, ALT, COMMAND] : [CTRL, SHIFT, ALT],
    access: (_isApple) => _isApple() ? [CTRL, ALT] : [SHIFT, ALT],
    ctrl: () => [CTRL],
    alt: () => [ALT],
    ctrlShift: () => [CTRL, SHIFT],
    shift: () => [SHIFT],
    shiftAlt: () => [SHIFT, ALT],
    undefined: () => []
  };
  var rawShortcut = /* @__PURE__ */ mapValues(modifiers, (modifier) => {
    return (character, _isApple = isAppleOS) => {
      return [...modifier(_isApple), character.toLowerCase()].join(
        "+"
      );
    };
  });
  var ariaKeyShortcut = /* @__PURE__ */ mapValues(modifiers, (modifier) => {
    return (character, _isApple = isAppleOS) => {
      return [
        ...modifier(_isApple).map((key) => key === CTRL ? "Control" : key).map((key) => capitaliseFirstCharacter(key)),
        capitaliseFirstCharacter(character)
      ].join("+");
    };
  });
  var displayShortcutList = /* @__PURE__ */ mapValues(
    modifiers,
    (modifier) => {
      return (character, _isApple = isAppleOS) => {
        const isApple = _isApple();
        const replacementKeyMap = {
          [ALT]: isApple ? "\u2325" : "Alt",
          [CTRL]: isApple ? "\u2303" : "Ctrl",
          // Make sure âŒƒ is the U+2303 UP ARROWHEAD unicode character and not the caret character.
          [COMMAND]: "\u2318",
          [SHIFT]: isApple ? "\u21E7" : "Shift"
        };
        const modifierKeys = modifier(_isApple).reduce(
          (accumulator, key) => {
            const replacementKey = replacementKeyMap[key] ?? key;
            if (isApple) {
              return [...accumulator, replacementKey];
            }
            return [...accumulator, replacementKey, "+"];
          },
          []
        );
        return [
          ...modifierKeys,
          capitaliseFirstCharacter(character)
        ];
      };
    }
  );
  var displayShortcut = /* @__PURE__ */ mapValues(
    displayShortcutList,
    (shortcutList) => {
      return (character, _isApple = isAppleOS) => shortcutList(character, _isApple).join("");
    }
  );
  var shortcutAriaLabel = /* @__PURE__ */ mapValues(modifiers, (modifier) => {
    return (character, _isApple = isAppleOS) => {
      const isApple = _isApple();
      const replacementKeyMap = {
        [SHIFT]: "Shift",
        [COMMAND]: isApple ? "Command" : "Control",
        [CTRL]: "Control",
        [ALT]: isApple ? "Option" : "Alt",
        /* translators: comma as in the character ',' */
        ",": (0, import_i18n.__)("Comma"),
        /* translators: period as in the character '.' */
        ".": (0, import_i18n.__)("Period"),
        /* translators: backtick as in the character '`' */
        "`": (0, import_i18n.__)("Backtick"),
        /* translators: tilde as in the character '~' */
        "~": (0, import_i18n.__)("Tilde")
      };
      return [...modifier(_isApple), character].map(
        (key) => capitaliseFirstCharacter(replacementKeyMap[key] ?? key)
      ).join(isApple ? " " : " + ");
    };
  });
  function getEventModifiers(event) {
    return [ALT, CTRL, COMMAND, SHIFT].filter(
      (key) => event[`${key}Key`]
    );
  }
  var isKeyboardEvent = /* @__PURE__ */ mapValues(modifiers, (getModifiers) => {
    return (event, character, _isApple = isAppleOS) => {
      const mods = getModifiers(_isApple);
      const eventMods = getEventModifiers(event);
      const replacementWithShiftKeyMap = {
        Comma: ",",
        Backslash: "\\",
        // Windows returns `\` for both IntlRo and IntlYen.
        IntlRo: "\\",
        IntlYen: "\\"
      };
      const modsDiff = mods.filter(
        (mod) => !eventMods.includes(mod)
      );
      const eventModsDiff = eventMods.filter(
        (mod) => !mods.includes(mod)
      );
      if (modsDiff.length > 0 || eventModsDiff.length > 0) {
        return false;
      }
      let key = event.key.toLowerCase();
      if (!character) {
        return mods.includes(key);
      }
      if (event.altKey && character.length === 1) {
        key = String.fromCharCode(event.keyCode).toLowerCase();
      }
      if (event.shiftKey && character.length === 1 && replacementWithShiftKeyMap[event.code]) {
        key = replacementWithShiftKeyMap[event.code];
      }
      if (character === "del") {
        character = "delete";
      }
      return key === character.toLowerCase();
    };
  });
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                           dist/keycodes.min.js                                                                                0000644                 00000005574 15212564022 0010447 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).keycodes=(()=>{var M=Object.create;var E=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty;var j=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),g=(r,t)=>{for(var e in t)E(r,e,{get:t[e],enumerable:!0})},S=(r,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of T(t))!D.call(r,n)&&n!==e&&E(r,n,{get:()=>t[n],enumerable:!(o=P(t,n))||o.enumerable});return r};var N=(r,t,e)=>(e=r!=null?M(w(r)):{},S(t||!r||!r.__esModule?E(e,"default",{value:r,enumerable:!0}):e,r)),R=r=>S(E({},"__esModule",{value:!0}),r);var O=j((nr,K)=>{K.exports=window.wp.i18n});var er={};g(er,{ALT:()=>i,BACKSPACE:()=>b,COMMAND:()=>f,CTRL:()=>s,DELETE:()=>$,DOWN:()=>Z,END:()=>G,ENTER:()=>B,ESCAPE:()=>F,F10:()=>q,HOME:()=>H,LEFT:()=>W,PAGEDOWN:()=>k,PAGEUP:()=>U,RIGHT:()=>Y,SHIFT:()=>a,SPACE:()=>I,TAB:()=>x,UP:()=>V,ZERO:()=>z,ariaKeyShortcut:()=>Q,displayShortcut:()=>X,displayShortcutList:()=>L,isAppleOS:()=>l,isKeyboardEvent:()=>tr,modifiers:()=>p,rawShortcut:()=>J,shortcutAriaLabel:()=>_});var m=N(O(),1);function l(r){if(!r){if(typeof window>"u")return!1;r=window}let{platform:t}=r.navigator;return t.indexOf("Mac")!==-1||["iPad","iPhone"].includes(t)}var b=8,x=9,B=13,F=27,I=32,U=33,k=34,G=35,H=36,W=37,V=38,Y=39,Z=40,$=46,q=121,i="alt",s="ctrl",f="meta",a="shift",z=48;function y(r){return r.length<2?r.toUpperCase():r.charAt(0).toUpperCase()+r.slice(1)}function c(r,t){return Object.fromEntries(Object.entries(r).map(([e,o])=>[e,t(o)]))}var p={primary:r=>r()?[f]:[s],primaryShift:r=>r()?[a,f]:[s,a],primaryAlt:r=>r()?[i,f]:[s,i],secondary:r=>r()?[a,i,f]:[s,a,i],access:r=>r()?[s,i]:[a,i],ctrl:()=>[s],alt:()=>[i],ctrlShift:()=>[s,a],shift:()=>[a],shiftAlt:()=>[a,i],undefined:()=>[]},J=c(p,r=>(t,e=l)=>[...r(e),t.toLowerCase()].join("+")),Q=c(p,r=>(t,e=l)=>[...r(e).map(o=>o===s?"Control":o).map(o=>y(o)),y(t)].join("+")),L=c(p,r=>(t,e=l)=>{let o=e(),n={[i]:o?"\u2325":"Alt",[s]:o?"\u2303":"Ctrl",[f]:"\u2318",[a]:o?"\u21E7":"Shift"};return[...r(e).reduce((d,v)=>{let C=n[v]??v;return o?[...d,C]:[...d,C,"+"]},[]),y(t)]}),X=c(L,r=>(t,e=l)=>r(t,e).join("")),_=c(p,r=>(t,e=l)=>{let o=e(),n={[a]:"Shift",[f]:o?"Command":"Control",[s]:"Control",[i]:o?"Option":"Alt",",":(0,m.__)("Comma"),".":(0,m.__)("Period"),"`":(0,m.__)("Backtick"),"~":(0,m.__)("Tilde")};return[...r(e),t].map(u=>y(n[u]??u)).join(o?" ":" + ")});function rr(r){return[i,s,f,a].filter(t=>r[`${t}Key`])}var tr=c(p,r=>(t,e,o=l)=>{let n=r(o),u=rr(t),d={Comma:",",Backslash:"\\",IntlRo:"\\",IntlYen:"\\"},v=n.filter(A=>!u.includes(A)),C=u.filter(A=>!n.includes(A));if(v.length>0||C.length>0)return!1;let h=t.key.toLowerCase();return e?(t.altKey&&e.length===1&&(h=String.fromCharCode(t.keyCode).toLowerCase()),t.shiftKey&&e.length===1&&d[t.code]&&(h=d[t.code]),e==="del"&&(e="delete"),h===e.toLowerCase()):n.includes(h)});return R(er);})();
                                                                                                                                    dist/list-reusable-blocks.js                                                                        0000644                 00000032076 15212564022 0012102 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;
(wp ||= {}).listReusableBlocks = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // package-external:@wordpress/api-fetch
  var require_api_fetch = __commonJS({
    "package-external:@wordpress/api-fetch"(exports, module) {
      module.exports = window.wp.apiFetch;
    }
  });

  // package-external:@wordpress/blob
  var require_blob = __commonJS({
    "package-external:@wordpress/blob"(exports, module) {
      module.exports = window.wp.blob;
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // package-external:@wordpress/components
  var require_components = __commonJS({
    "package-external:@wordpress/components"(exports, module) {
      module.exports = window.wp.components;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // packages/list-reusable-blocks/build-module/index.mjs
  var import_element2 = __toESM(require_element(), 1);
  var import_i18n3 = __toESM(require_i18n(), 1);

  // node_modules/tslib/tslib.es6.mjs
  var __assign = function() {
    __assign = Object.assign || function __assign2(t) {
      for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
      }
      return t;
    };
    return __assign.apply(this, arguments);
  };

  // node_modules/lower-case/dist.es2015/index.js
  function lowerCase(str) {
    return str.toLowerCase();
  }

  // node_modules/no-case/dist.es2015/index.js
  var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
  var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
  function noCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    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;
    var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
    var start = 0;
    var end = result.length;
    while (result.charAt(start) === "\0")
      start++;
    while (result.charAt(end - 1) === "\0")
      end--;
    return result.slice(start, end).split("\0").map(transform).join(delimiter);
  }
  function replace(input, re, value) {
    if (re instanceof RegExp)
      return input.replace(re, value);
    return re.reduce(function(input2, re2) {
      return input2.replace(re2, value);
    }, input);
  }

  // node_modules/dot-case/dist.es2015/index.js
  function dotCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    return noCase(input, __assign({ delimiter: "." }, options));
  }

  // node_modules/param-case/dist.es2015/index.js
  function paramCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    return dotCase(input, __assign({ delimiter: "-" }, options));
  }

  // packages/list-reusable-blocks/build-module/utils/export.mjs
  var import_api_fetch = __toESM(require_api_fetch(), 1);
  var import_blob = __toESM(require_blob(), 1);
  async function exportReusableBlock(id) {
    const postType = await (0, import_api_fetch.default)({ path: `/wp/v2/types/wp_block` });
    const post = await (0, import_api_fetch.default)({
      path: `/wp/v2/${postType.rest_base}/${id}?context=edit`
    });
    const title = post.title.raw;
    const content = post.content.raw;
    const syncStatus = post.wp_pattern_sync_status;
    const fileContent = JSON.stringify(
      {
        __file: "wp_block",
        title,
        content,
        syncStatus
      },
      null,
      2
    );
    const fileName = paramCase(title) + ".json";
    (0, import_blob.downloadBlob)(fileName, fileContent, "application/json");
  }
  var export_default = exportReusableBlock;

  // packages/list-reusable-blocks/build-module/components/import-dropdown/index.mjs
  var import_compose2 = __toESM(require_compose(), 1);
  var import_i18n2 = __toESM(require_i18n(), 1);
  var import_components2 = __toESM(require_components(), 1);

  // packages/list-reusable-blocks/build-module/components/import-form/index.mjs
  var import_element = __toESM(require_element(), 1);
  var import_compose = __toESM(require_compose(), 1);
  var import_i18n = __toESM(require_i18n(), 1);
  var import_components = __toESM(require_components(), 1);

  // packages/list-reusable-blocks/build-module/utils/import.mjs
  var import_api_fetch2 = __toESM(require_api_fetch(), 1);

  // packages/list-reusable-blocks/build-module/utils/file.mjs
  function readTextFile(file) {
    const reader = new window.FileReader();
    return new Promise((resolve) => {
      reader.onload = () => {
        resolve(reader.result);
      };
      reader.readAsText(file);
    });
  }

  // packages/list-reusable-blocks/build-module/utils/import.mjs
  async function importReusableBlock(file) {
    const fileContent = await readTextFile(file);
    let parsedContent;
    try {
      parsedContent = JSON.parse(fileContent);
    } catch (e) {
      throw new Error("Invalid JSON file");
    }
    if (parsedContent.__file !== "wp_block" || !parsedContent.title || !parsedContent.content || typeof parsedContent.title !== "string" || typeof parsedContent.content !== "string" || parsedContent.syncStatus && typeof parsedContent.syncStatus !== "string") {
      throw new Error("Invalid pattern JSON file");
    }
    const postType = await (0, import_api_fetch2.default)({ path: `/wp/v2/types/wp_block` });
    const reusableBlock = await (0, import_api_fetch2.default)({
      path: `/wp/v2/${postType.rest_base}`,
      data: {
        title: parsedContent.title,
        content: parsedContent.content,
        status: "publish",
        meta: parsedContent.syncStatus === "unsynced" ? { wp_pattern_sync_status: parsedContent.syncStatus } : void 0
      },
      method: "POST"
    });
    return reusableBlock;
  }
  var import_default = importReusableBlock;

  // packages/list-reusable-blocks/build-module/components/import-form/index.mjs
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  function ImportForm({ instanceId, onUpload }) {
    const inputId = "list-reusable-blocks-import-form-" + instanceId;
    const formRef = (0, import_element.useRef)();
    const [isLoading, setIsLoading] = (0, import_element.useState)(false);
    const [error, setError] = (0, import_element.useState)(null);
    const [file, setFile] = (0, import_element.useState)(null);
    const onChangeFile = (event) => {
      setFile(event.target.files[0]);
      setError(null);
    };
    const onSubmit = (event) => {
      event.preventDefault();
      if (!file) {
        return;
      }
      setIsLoading({ isLoading: true });
      import_default(file).then((reusableBlock) => {
        if (!formRef) {
          return;
        }
        setIsLoading(false);
        onUpload(reusableBlock);
      }).catch((errors) => {
        if (!formRef) {
          return;
        }
        let uiMessage;
        switch (errors.message) {
          case "Invalid JSON file":
            uiMessage = (0, import_i18n.__)("Invalid JSON file");
            break;
          case "Invalid pattern JSON file":
            uiMessage = (0, import_i18n.__)("Invalid pattern JSON file");
            break;
          default:
            uiMessage = (0, import_i18n.__)("Unknown error");
        }
        setIsLoading(false);
        setError(uiMessage);
      });
    };
    const onDismissError = () => {
      setError(null);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
      "form",
      {
        className: "list-reusable-blocks-import-form",
        onSubmit,
        ref: formRef,
        children: [
          error && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.Notice, { status: "error", onRemove: () => onDismissError(), children: error }),
          /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
            "label",
            {
              htmlFor: inputId,
              className: "list-reusable-blocks-import-form__label",
              children: (0, import_i18n.__)("File")
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { id: inputId, type: "file", onChange: onChangeFile }),
          /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
            import_components.Button,
            {
              __next40pxDefaultSize: true,
              type: "submit",
              isBusy: isLoading,
              accessibleWhenDisabled: true,
              disabled: !file || isLoading,
              variant: "secondary",
              className: "list-reusable-blocks-import-form__button",
              children: (0, import_i18n._x)("Import", "button label")
            }
          )
        ]
      }
    );
  }
  var import_form_default = (0, import_compose.withInstanceId)(ImportForm);

  // packages/list-reusable-blocks/build-module/components/import-dropdown/index.mjs
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  function ImportDropdown({ onUpload }) {
    return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
      import_components2.Dropdown,
      {
        popoverProps: { placement: "bottom-start" },
        contentClassName: "list-reusable-blocks-import-dropdown__content",
        renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
          import_components2.Button,
          {
            size: "compact",
            className: "list-reusable-blocks-import-dropdown__button",
            "aria-expanded": isOpen,
            onClick: onToggle,
            variant: "primary",
            children: (0, import_i18n2.__)("Import from JSON")
          }
        ),
        renderContent: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_form_default, { onUpload: (0, import_compose2.pipe)(onClose, onUpload) })
      }
    );
  }
  var import_dropdown_default = ImportDropdown;

  // packages/list-reusable-blocks/build-module/index.mjs
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
  document.body.addEventListener("click", (event) => {
    if (!event.target.classList.contains("wp-list-reusable-blocks__export")) {
      return;
    }
    event.preventDefault();
    export_default(event.target.dataset.id);
  });
  document.addEventListener("DOMContentLoaded", () => {
    const button = document.querySelector(".page-title-action");
    if (!button) {
      return;
    }
    const showNotice = () => {
      const notice = document.createElement("div");
      notice.className = "notice notice-success is-dismissible";
      notice.innerHTML = `<p>${(0, import_i18n3.__)("Pattern imported successfully!")}</p>`;
      const headerEnd = document.querySelector(".wp-header-end");
      if (!headerEnd) {
        return;
      }
      headerEnd.parentNode.insertBefore(notice, headerEnd);
    };
    const container = document.createElement("div");
    container.className = "list-reusable-blocks__container";
    button.parentNode.insertBefore(container, button);
    (0, import_element2.createRoot)(container).render(
      /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_element2.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dropdown_default, { onUpload: showNotice }) })
    );
  });
})();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  dist/list-reusable-blocks.min.js                                                                    0000644                 00000012324 15212564022 0012656 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;(wp||={}).listReusableBlocks=(()=>{var ie=Object.create;var F=Object.defineProperty;var ae=Object.getOwnPropertyDescriptor;var se=Object.getOwnPropertyNames;var ce=Object.getPrototypeOf,ue=Object.prototype.hasOwnProperty;var u=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var le=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of se(e))!ue.call(r,o)&&o!==t&&F(r,o,{get:()=>e[o],enumerable:!(n=ae(e,o))||n.enumerable});return r};var i=(r,e,t)=>(t=r!=null?ie(ce(r)):{},le(e||!r||!r.__esModule?F(t,"default",{value:r,enumerable:!0}):t,r));var T=u((be,L)=>{L.exports=window.wp.element});var h=u((he,k)=>{k.exports=window.wp.i18n});var C=u((Ie,z)=>{z.exports=window.wp.apiFetch});var Z=u((Re,G)=>{G.exports=window.wp.blob});var R=u((Ae,V)=>{V.exports=window.wp.compose});var D=u((Fe,H)=>{H.exports=window.wp.components});var v=u((Je,Q)=>{Q.exports=window.ReactJSXRuntime});var S=i(T(),1),oe=i(h(),1);var m=function(){return m=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},m.apply(this,arguments)};function B(r){return r.toLowerCase()}var fe=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],pe=/[^A-Z0-9]+/gi;function M(r,e){e===void 0&&(e={});for(var t=e.splitRegexp,n=t===void 0?fe:t,o=e.stripRegexp,a=o===void 0?pe:o,s=e.transform,c=s===void 0?B:s,p=e.delimiter,j=p===void 0?" ":p,d=J(J(r,n,"$1\0$2"),a,"\0"),w=0,_=d.length;d.charAt(w)==="\0";)w++;for(;d.charAt(_-1)==="\0";)_--;return d.slice(w,_).split("\0").map(c).join(j)}function J(r,e,t){return e instanceof RegExp?r.replace(e,t):e.reduce(function(n,o){return n.replace(o,t)},r)}function $(r,e){return e===void 0&&(e={}),M(r,m({delimiter:"."},e))}function U(r,e){return e===void 0&&(e={}),$(r,m({delimiter:"-"},e))}var I=i(C(),1),q=i(Z(),1);async function de(r){let e=await(0,I.default)({path:"/wp/v2/types/wp_block"}),t=await(0,I.default)({path:`/wp/v2/${e.rest_base}/${r}?context=edit`}),n=t.title.raw,o=t.content.raw,a=t.wp_pattern_sync_status,s=JSON.stringify({__file:"wp_block",title:n,content:o,syncStatus:a},null,2),c=U(n)+".json";(0,q.downloadBlob)(c,s,"application/json")}var X=de;var te=i(R(),1),re=i(h(),1),O=i(D(),1);var y=i(T(),1),Y=i(R(),1),l=i(h(),1),g=i(D(),1);var N=i(C(),1);function K(r){let e=new window.FileReader;return new Promise(t=>{e.onload=()=>{t(e.result)},e.readAsText(r)})}async function me(r){let e=await K(r),t;try{t=JSON.parse(e)}catch{throw new Error("Invalid JSON file")}if(t.__file!=="wp_block"||!t.title||!t.content||typeof t.title!="string"||typeof t.content!="string"||t.syncStatus&&typeof t.syncStatus!="string")throw new Error("Invalid pattern JSON file");let n=await(0,N.default)({path:"/wp/v2/types/wp_block"});return await(0,N.default)({path:`/wp/v2/${n.rest_base}`,data:{title:t.title,content:t.content,status:"publish",meta:t.syncStatus==="unsynced"?{wp_pattern_sync_status:t.syncStatus}:void 0},method:"POST"})}var W=me;var f=i(v(),1);function ye({instanceId:r,onUpload:e}){let t="list-reusable-blocks-import-form-"+r,n=(0,y.useRef)(),[o,a]=(0,y.useState)(!1),[s,c]=(0,y.useState)(null),[p,j]=(0,y.useState)(null),d=E=>{j(E.target.files[0]),c(null)},w=E=>{E.preventDefault(),p&&(a({isLoading:!0}),W(p).then(P=>{n&&(a(!1),e(P))}).catch(P=>{if(!n)return;let b;switch(P.message){case"Invalid JSON file":b=(0,l.__)("Invalid JSON file");break;case"Invalid pattern JSON file":b=(0,l.__)("Invalid pattern JSON file");break;default:b=(0,l.__)("Unknown error")}a(!1),c(b)}))},_=()=>{c(null)};return(0,f.jsxs)("form",{className:"list-reusable-blocks-import-form",onSubmit:w,ref:n,children:[s&&(0,f.jsx)(g.Notice,{status:"error",onRemove:()=>_(),children:s}),(0,f.jsx)("label",{htmlFor:t,className:"list-reusable-blocks-import-form__label",children:(0,l.__)("File")}),(0,f.jsx)("input",{id:t,type:"file",onChange:d}),(0,f.jsx)(g.Button,{__next40pxDefaultSize:!0,type:"submit",isBusy:o,accessibleWhenDisabled:!0,disabled:!p||o,variant:"secondary",className:"list-reusable-blocks-import-form__button",children:(0,l._x)("Import","button label")})]})}var ee=(0,Y.withInstanceId)(ye);var x=i(v(),1);function we({onUpload:r}){return(0,x.jsx)(O.Dropdown,{popoverProps:{placement:"bottom-start"},contentClassName:"list-reusable-blocks-import-dropdown__content",renderToggle:({isOpen:e,onToggle:t})=>(0,x.jsx)(O.Button,{size:"compact",className:"list-reusable-blocks-import-dropdown__button","aria-expanded":e,onClick:t,variant:"primary",children:(0,re.__)("Import from JSON")}),renderContent:({onClose:e})=>(0,x.jsx)(ee,{onUpload:(0,te.pipe)(e,r)})})}var ne=we;var A=i(v(),1);document.body.addEventListener("click",r=>{r.target.classList.contains("wp-list-reusable-blocks__export")&&(r.preventDefault(),X(r.target.dataset.id))});document.addEventListener("DOMContentLoaded",()=>{let r=document.querySelector(".page-title-action");if(!r)return;let e=()=>{let n=document.createElement("div");n.className="notice notice-success is-dismissible",n.innerHTML=`<p>${(0,oe.__)("Pattern imported successfully!")}</p>`;let o=document.querySelector(".wp-header-end");o&&o.parentNode.insertBefore(n,o)},t=document.createElement("div");t.className="list-reusable-blocks__container",r.parentNode.insertBefore(t,r),(0,S.createRoot)(t).render((0,A.jsx)(S.StrictMode,{children:(0,A.jsx)(ne,{onUpload:e})}))});})();
                                                                                                                                                                                                                                                                                                            dist/media-utils.js                                                                                 0000644                 00002372226 15212564022 0010277 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).mediaUtils = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // package-external:@wordpress/blob
  var require_blob = __commonJS({
    "package-external:@wordpress/blob"(exports, module) {
      module.exports = window.wp.blob;
    }
  });

  // package-external:@wordpress/api-fetch
  var require_api_fetch = __commonJS({
    "package-external:@wordpress/api-fetch"(exports, module) {
      module.exports = window.wp.apiFetch;
    }
  });

  // package-external:@wordpress/core-data
  var require_core_data = __commonJS({
    "package-external:@wordpress/core-data"(exports, module) {
      module.exports = window.wp.coreData;
    }
  });

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/components
  var require_components = __commonJS({
    "package-external:@wordpress/components"(exports, module) {
      module.exports = window.wp.components;
    }
  });

  // package-external:@wordpress/primitives
  var require_primitives = __commonJS({
    "package-external:@wordpress/primitives"(exports, module) {
      module.exports = window.wp.primitives;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // vendor-external:react
  var require_react = __commonJS({
    "vendor-external:react"(exports, module) {
      module.exports = window.React;
    }
  });

  // vendor-external:react-dom
  var require_react_dom = __commonJS({
    "vendor-external:react-dom"(exports, module) {
      module.exports = window.ReactDOM;
    }
  });

  // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
  var require_use_sync_external_store_shim_development = __commonJS({
    "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports) {
      "use strict";
      (function() {
        function is(x2, y2) {
          return x2 === y2 && (0 !== x2 || 1 / x2 === 1 / y2) || x2 !== x2 && y2 !== y2;
        }
        function useSyncExternalStore$2(subscribe2, getSnapshot) {
          didWarnOld18Alpha || void 0 === React8.startTransition || (didWarnOld18Alpha = true, console.error(
            "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
          ));
          var value = getSnapshot();
          if (!didWarnUncachedGetSnapshot) {
            var cachedValue = getSnapshot();
            objectIs(value, cachedValue) || (console.error(
              "The result of getSnapshot should be cached to avoid an infinite loop"
            ), didWarnUncachedGetSnapshot = true);
          }
          cachedValue = useState28({
            inst: { value, getSnapshot }
          });
          var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
          useLayoutEffect2(
            function() {
              inst.value = value;
              inst.getSnapshot = getSnapshot;
              checkIfSnapshotChanged(inst) && forceUpdate({ inst });
            },
            [subscribe2, value, getSnapshot]
          );
          useEffect20(
            function() {
              checkIfSnapshotChanged(inst) && forceUpdate({ inst });
              return subscribe2(function() {
                checkIfSnapshotChanged(inst) && forceUpdate({ inst });
              });
            },
            [subscribe2]
          );
          useDebugValue(value);
          return value;
        }
        function checkIfSnapshotChanged(inst) {
          var latestGetSnapshot = inst.getSnapshot;
          inst = inst.value;
          try {
            var nextValue = latestGetSnapshot();
            return !objectIs(inst, nextValue);
          } catch (error) {
            return true;
          }
        }
        function useSyncExternalStore$1(subscribe2, getSnapshot) {
          return getSnapshot();
        }
        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
        var React8 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState28 = React8.useState, useEffect20 = React8.useEffect, useLayoutEffect2 = React8.useLayoutEffect, useDebugValue = React8.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
        exports.useSyncExternalStore = void 0 !== React8.useSyncExternalStore ? React8.useSyncExternalStore : shim;
        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
      })();
    }
  });

  // node_modules/use-sync-external-store/shim/index.js
  var require_shim = __commonJS({
    "node_modules/use-sync-external-store/shim/index.js"(exports, module) {
      "use strict";
      if (false) {
        module.exports = null;
      } else {
        module.exports = require_use_sync_external_store_shim_development();
      }
    }
  });

  // package-external:@wordpress/private-apis
  var require_private_apis = __commonJS({
    "package-external:@wordpress/private-apis"(exports, module) {
      module.exports = window.wp.privateApis;
    }
  });

  // package-external:@wordpress/keycodes
  var require_keycodes = __commonJS({
    "package-external:@wordpress/keycodes"(exports, module) {
      module.exports = window.wp.keycodes;
    }
  });

  // node_modules/remove-accents/index.js
  var require_remove_accents = __commonJS({
    "node_modules/remove-accents/index.js"(exports, module) {
      var characterMap = {
        "\xC0": "A",
        "\xC1": "A",
        "\xC2": "A",
        "\xC3": "A",
        "\xC4": "A",
        "\xC5": "A",
        "\u1EA4": "A",
        "\u1EAE": "A",
        "\u1EB2": "A",
        "\u1EB4": "A",
        "\u1EB6": "A",
        "\xC6": "AE",
        "\u1EA6": "A",
        "\u1EB0": "A",
        "\u0202": "A",
        "\u1EA2": "A",
        "\u1EA0": "A",
        "\u1EA8": "A",
        "\u1EAA": "A",
        "\u1EAC": "A",
        "\xC7": "C",
        "\u1E08": "C",
        "\xC8": "E",
        "\xC9": "E",
        "\xCA": "E",
        "\xCB": "E",
        "\u1EBE": "E",
        "\u1E16": "E",
        "\u1EC0": "E",
        "\u1E14": "E",
        "\u1E1C": "E",
        "\u0206": "E",
        "\u1EBA": "E",
        "\u1EBC": "E",
        "\u1EB8": "E",
        "\u1EC2": "E",
        "\u1EC4": "E",
        "\u1EC6": "E",
        "\xCC": "I",
        "\xCD": "I",
        "\xCE": "I",
        "\xCF": "I",
        "\u1E2E": "I",
        "\u020A": "I",
        "\u1EC8": "I",
        "\u1ECA": "I",
        "\xD0": "D",
        "\xD1": "N",
        "\xD2": "O",
        "\xD3": "O",
        "\xD4": "O",
        "\xD5": "O",
        "\xD6": "O",
        "\xD8": "O",
        "\u1ED0": "O",
        "\u1E4C": "O",
        "\u1E52": "O",
        "\u020E": "O",
        "\u1ECE": "O",
        "\u1ECC": "O",
        "\u1ED4": "O",
        "\u1ED6": "O",
        "\u1ED8": "O",
        "\u1EDC": "O",
        "\u1EDE": "O",
        "\u1EE0": "O",
        "\u1EDA": "O",
        "\u1EE2": "O",
        "\xD9": "U",
        "\xDA": "U",
        "\xDB": "U",
        "\xDC": "U",
        "\u1EE6": "U",
        "\u1EE4": "U",
        "\u1EEC": "U",
        "\u1EEE": "U",
        "\u1EF0": "U",
        "\xDD": "Y",
        "\xE0": "a",
        "\xE1": "a",
        "\xE2": "a",
        "\xE3": "a",
        "\xE4": "a",
        "\xE5": "a",
        "\u1EA5": "a",
        "\u1EAF": "a",
        "\u1EB3": "a",
        "\u1EB5": "a",
        "\u1EB7": "a",
        "\xE6": "ae",
        "\u1EA7": "a",
        "\u1EB1": "a",
        "\u0203": "a",
        "\u1EA3": "a",
        "\u1EA1": "a",
        "\u1EA9": "a",
        "\u1EAB": "a",
        "\u1EAD": "a",
        "\xE7": "c",
        "\u1E09": "c",
        "\xE8": "e",
        "\xE9": "e",
        "\xEA": "e",
        "\xEB": "e",
        "\u1EBF": "e",
        "\u1E17": "e",
        "\u1EC1": "e",
        "\u1E15": "e",
        "\u1E1D": "e",
        "\u0207": "e",
        "\u1EBB": "e",
        "\u1EBD": "e",
        "\u1EB9": "e",
        "\u1EC3": "e",
        "\u1EC5": "e",
        "\u1EC7": "e",
        "\xEC": "i",
        "\xED": "i",
        "\xEE": "i",
        "\xEF": "i",
        "\u1E2F": "i",
        "\u020B": "i",
        "\u1EC9": "i",
        "\u1ECB": "i",
        "\xF0": "d",
        "\xF1": "n",
        "\xF2": "o",
        "\xF3": "o",
        "\xF4": "o",
        "\xF5": "o",
        "\xF6": "o",
        "\xF8": "o",
        "\u1ED1": "o",
        "\u1E4D": "o",
        "\u1E53": "o",
        "\u020F": "o",
        "\u1ECF": "o",
        "\u1ECD": "o",
        "\u1ED5": "o",
        "\u1ED7": "o",
        "\u1ED9": "o",
        "\u1EDD": "o",
        "\u1EDF": "o",
        "\u1EE1": "o",
        "\u1EDB": "o",
        "\u1EE3": "o",
        "\xF9": "u",
        "\xFA": "u",
        "\xFB": "u",
        "\xFC": "u",
        "\u1EE7": "u",
        "\u1EE5": "u",
        "\u1EED": "u",
        "\u1EEF": "u",
        "\u1EF1": "u",
        "\xFD": "y",
        "\xFF": "y",
        "\u0100": "A",
        "\u0101": "a",
        "\u0102": "A",
        "\u0103": "a",
        "\u0104": "A",
        "\u0105": "a",
        "\u0106": "C",
        "\u0107": "c",
        "\u0108": "C",
        "\u0109": "c",
        "\u010A": "C",
        "\u010B": "c",
        "\u010C": "C",
        "\u010D": "c",
        "C\u0306": "C",
        "c\u0306": "c",
        "\u010E": "D",
        "\u010F": "d",
        "\u0110": "D",
        "\u0111": "d",
        "\u0112": "E",
        "\u0113": "e",
        "\u0114": "E",
        "\u0115": "e",
        "\u0116": "E",
        "\u0117": "e",
        "\u0118": "E",
        "\u0119": "e",
        "\u011A": "E",
        "\u011B": "e",
        "\u011C": "G",
        "\u01F4": "G",
        "\u011D": "g",
        "\u01F5": "g",
        "\u011E": "G",
        "\u011F": "g",
        "\u0120": "G",
        "\u0121": "g",
        "\u0122": "G",
        "\u0123": "g",
        "\u0124": "H",
        "\u0125": "h",
        "\u0126": "H",
        "\u0127": "h",
        "\u1E2A": "H",
        "\u1E2B": "h",
        "\u0128": "I",
        "\u0129": "i",
        "\u012A": "I",
        "\u012B": "i",
        "\u012C": "I",
        "\u012D": "i",
        "\u012E": "I",
        "\u012F": "i",
        "\u0130": "I",
        "\u0131": "i",
        "\u0132": "IJ",
        "\u0133": "ij",
        "\u0134": "J",
        "\u0135": "j",
        "\u0136": "K",
        "\u0137": "k",
        "\u1E30": "K",
        "\u1E31": "k",
        "K\u0306": "K",
        "k\u0306": "k",
        "\u0139": "L",
        "\u013A": "l",
        "\u013B": "L",
        "\u013C": "l",
        "\u013D": "L",
        "\u013E": "l",
        "\u013F": "L",
        "\u0140": "l",
        "\u0141": "l",
        "\u0142": "l",
        "\u1E3E": "M",
        "\u1E3F": "m",
        "M\u0306": "M",
        "m\u0306": "m",
        "\u0143": "N",
        "\u0144": "n",
        "\u0145": "N",
        "\u0146": "n",
        "\u0147": "N",
        "\u0148": "n",
        "\u0149": "n",
        "N\u0306": "N",
        "n\u0306": "n",
        "\u014C": "O",
        "\u014D": "o",
        "\u014E": "O",
        "\u014F": "o",
        "\u0150": "O",
        "\u0151": "o",
        "\u0152": "OE",
        "\u0153": "oe",
        "P\u0306": "P",
        "p\u0306": "p",
        "\u0154": "R",
        "\u0155": "r",
        "\u0156": "R",
        "\u0157": "r",
        "\u0158": "R",
        "\u0159": "r",
        "R\u0306": "R",
        "r\u0306": "r",
        "\u0212": "R",
        "\u0213": "r",
        "\u015A": "S",
        "\u015B": "s",
        "\u015C": "S",
        "\u015D": "s",
        "\u015E": "S",
        "\u0218": "S",
        "\u0219": "s",
        "\u015F": "s",
        "\u0160": "S",
        "\u0161": "s",
        "\u0162": "T",
        "\u0163": "t",
        "\u021B": "t",
        "\u021A": "T",
        "\u0164": "T",
        "\u0165": "t",
        "\u0166": "T",
        "\u0167": "t",
        "T\u0306": "T",
        "t\u0306": "t",
        "\u0168": "U",
        "\u0169": "u",
        "\u016A": "U",
        "\u016B": "u",
        "\u016C": "U",
        "\u016D": "u",
        "\u016E": "U",
        "\u016F": "u",
        "\u0170": "U",
        "\u0171": "u",
        "\u0172": "U",
        "\u0173": "u",
        "\u0216": "U",
        "\u0217": "u",
        "V\u0306": "V",
        "v\u0306": "v",
        "\u0174": "W",
        "\u0175": "w",
        "\u1E82": "W",
        "\u1E83": "w",
        "X\u0306": "X",
        "x\u0306": "x",
        "\u0176": "Y",
        "\u0177": "y",
        "\u0178": "Y",
        "Y\u0306": "Y",
        "y\u0306": "y",
        "\u0179": "Z",
        "\u017A": "z",
        "\u017B": "Z",
        "\u017C": "z",
        "\u017D": "Z",
        "\u017E": "z",
        "\u017F": "s",
        "\u0192": "f",
        "\u01A0": "O",
        "\u01A1": "o",
        "\u01AF": "U",
        "\u01B0": "u",
        "\u01CD": "A",
        "\u01CE": "a",
        "\u01CF": "I",
        "\u01D0": "i",
        "\u01D1": "O",
        "\u01D2": "o",
        "\u01D3": "U",
        "\u01D4": "u",
        "\u01D5": "U",
        "\u01D6": "u",
        "\u01D7": "U",
        "\u01D8": "u",
        "\u01D9": "U",
        "\u01DA": "u",
        "\u01DB": "U",
        "\u01DC": "u",
        "\u1EE8": "U",
        "\u1EE9": "u",
        "\u1E78": "U",
        "\u1E79": "u",
        "\u01FA": "A",
        "\u01FB": "a",
        "\u01FC": "AE",
        "\u01FD": "ae",
        "\u01FE": "O",
        "\u01FF": "o",
        "\xDE": "TH",
        "\xFE": "th",
        "\u1E54": "P",
        "\u1E55": "p",
        "\u1E64": "S",
        "\u1E65": "s",
        "X\u0301": "X",
        "x\u0301": "x",
        "\u0403": "\u0413",
        "\u0453": "\u0433",
        "\u040C": "\u041A",
        "\u045C": "\u043A",
        "A\u030B": "A",
        "a\u030B": "a",
        "E\u030B": "E",
        "e\u030B": "e",
        "I\u030B": "I",
        "i\u030B": "i",
        "\u01F8": "N",
        "\u01F9": "n",
        "\u1ED2": "O",
        "\u1ED3": "o",
        "\u1E50": "O",
        "\u1E51": "o",
        "\u1EEA": "U",
        "\u1EEB": "u",
        "\u1E80": "W",
        "\u1E81": "w",
        "\u1EF2": "Y",
        "\u1EF3": "y",
        "\u0200": "A",
        "\u0201": "a",
        "\u0204": "E",
        "\u0205": "e",
        "\u0208": "I",
        "\u0209": "i",
        "\u020C": "O",
        "\u020D": "o",
        "\u0210": "R",
        "\u0211": "r",
        "\u0214": "U",
        "\u0215": "u",
        "B\u030C": "B",
        "b\u030C": "b",
        "\u010C\u0323": "C",
        "\u010D\u0323": "c",
        "\xCA\u030C": "E",
        "\xEA\u030C": "e",
        "F\u030C": "F",
        "f\u030C": "f",
        "\u01E6": "G",
        "\u01E7": "g",
        "\u021E": "H",
        "\u021F": "h",
        "J\u030C": "J",
        "\u01F0": "j",
        "\u01E8": "K",
        "\u01E9": "k",
        "M\u030C": "M",
        "m\u030C": "m",
        "P\u030C": "P",
        "p\u030C": "p",
        "Q\u030C": "Q",
        "q\u030C": "q",
        "\u0158\u0329": "R",
        "\u0159\u0329": "r",
        "\u1E66": "S",
        "\u1E67": "s",
        "V\u030C": "V",
        "v\u030C": "v",
        "W\u030C": "W",
        "w\u030C": "w",
        "X\u030C": "X",
        "x\u030C": "x",
        "Y\u030C": "Y",
        "y\u030C": "y",
        "A\u0327": "A",
        "a\u0327": "a",
        "B\u0327": "B",
        "b\u0327": "b",
        "\u1E10": "D",
        "\u1E11": "d",
        "\u0228": "E",
        "\u0229": "e",
        "\u0190\u0327": "E",
        "\u025B\u0327": "e",
        "\u1E28": "H",
        "\u1E29": "h",
        "I\u0327": "I",
        "i\u0327": "i",
        "\u0197\u0327": "I",
        "\u0268\u0327": "i",
        "M\u0327": "M",
        "m\u0327": "m",
        "O\u0327": "O",
        "o\u0327": "o",
        "Q\u0327": "Q",
        "q\u0327": "q",
        "U\u0327": "U",
        "u\u0327": "u",
        "X\u0327": "X",
        "x\u0327": "x",
        "Z\u0327": "Z",
        "z\u0327": "z",
        "\u0439": "\u0438",
        "\u0419": "\u0418",
        "\u0451": "\u0435",
        "\u0401": "\u0415"
      };
      var chars = Object.keys(characterMap).join("|");
      var allAccents = new RegExp(chars, "g");
      var firstAccent = new RegExp(chars, "");
      function matcher(match2) {
        return characterMap[match2];
      }
      var removeAccents2 = function(string) {
        return string.replace(allAccents, matcher);
      };
      var hasAccents = function(string) {
        return !!string.match(firstAccent);
      };
      module.exports = removeAccents2;
      module.exports.has = hasAccents;
      module.exports.remove = removeAccents2;
    }
  });

  // node_modules/fast-deep-equal/es6/index.js
  var require_es6 = __commonJS({
    "node_modules/fast-deep-equal/es6/index.js"(exports, module) {
      "use strict";
      module.exports = function equal(a2, b2) {
        if (a2 === b2) return true;
        if (a2 && b2 && typeof a2 == "object" && typeof b2 == "object") {
          if (a2.constructor !== b2.constructor) return false;
          var length, i2, keys;
          if (Array.isArray(a2)) {
            length = a2.length;
            if (length != b2.length) return false;
            for (i2 = length; i2-- !== 0; )
              if (!equal(a2[i2], b2[i2])) return false;
            return true;
          }
          if (a2 instanceof Map && b2 instanceof Map) {
            if (a2.size !== b2.size) return false;
            for (i2 of a2.entries())
              if (!b2.has(i2[0])) return false;
            for (i2 of a2.entries())
              if (!equal(i2[1], b2.get(i2[0]))) return false;
            return true;
          }
          if (a2 instanceof Set && b2 instanceof Set) {
            if (a2.size !== b2.size) return false;
            for (i2 of a2.entries())
              if (!b2.has(i2[0])) return false;
            return true;
          }
          if (ArrayBuffer.isView(a2) && ArrayBuffer.isView(b2)) {
            length = a2.length;
            if (length != b2.length) return false;
            for (i2 = length; i2-- !== 0; )
              if (a2[i2] !== b2[i2]) return false;
            return true;
          }
          if (a2.constructor === RegExp) return a2.source === b2.source && a2.flags === b2.flags;
          if (a2.valueOf !== Object.prototype.valueOf) return a2.valueOf() === b2.valueOf();
          if (a2.toString !== Object.prototype.toString) return a2.toString() === b2.toString();
          keys = Object.keys(a2);
          length = keys.length;
          if (length !== Object.keys(b2).length) return false;
          for (i2 = length; i2-- !== 0; )
            if (!Object.prototype.hasOwnProperty.call(b2, keys[i2])) return false;
          for (i2 = length; i2-- !== 0; ) {
            var key = keys[i2];
            if (!equal(a2[key], b2[key])) return false;
          }
          return true;
        }
        return a2 !== a2 && b2 !== b2;
      };
    }
  });

  // package-external:@wordpress/date
  var require_date = __commonJS({
    "package-external:@wordpress/date"(exports, module) {
      module.exports = window.wp.date;
    }
  });

  // package-external:@wordpress/warning
  var require_warning = __commonJS({
    "package-external:@wordpress/warning"(exports, module) {
      module.exports = window.wp.warning;
    }
  });

  // package-external:@wordpress/url
  var require_url = __commonJS({
    "package-external:@wordpress/url"(exports, module) {
      module.exports = window.wp.url;
    }
  });

  // package-external:@wordpress/notices
  var require_notices = __commonJS({
    "package-external:@wordpress/notices"(exports, module) {
      module.exports = window.wp.notices;
    }
  });

  // packages/media-utils/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    MediaUpload: () => media_upload_default,
    privateApis: () => privateApis12,
    transformAttachment: () => transformAttachment,
    uploadMedia: () => uploadMedia,
    validateFileSize: () => validateFileSize,
    validateMimeType: () => validateMimeType,
    validateMimeTypeForUser: () => validateMimeTypeForUser
  });

  // packages/media-utils/build-module/components/media-upload/index.mjs
  var import_element = __toESM(require_element(), 1);
  var import_i18n = __toESM(require_i18n(), 1);
  var DEFAULT_EMPTY_GALLERY = [];
  var getFeaturedImageMediaFrame = () => {
    const { wp } = window;
    return wp.media.view.MediaFrame.Select.extend({
      /**
       * Enables the Set Featured Image Button.
       *
       * @param {Object} toolbar toolbar for featured image state
       * @return {void}
       */
      featuredImageToolbar(toolbar) {
        this.createSelectToolbar(toolbar, {
          text: wp.media.view.l10n.setFeaturedImage,
          state: this.options.state
        });
      },
      /**
       * Handle the edit state requirements of selected media item.
       *
       * @return {void}
       */
      editState() {
        const selection = this.state("featured-image").get("selection");
        const view = new wp.media.view.EditImage({
          model: selection.single(),
          controller: this
        }).render();
        this.content.set(view);
        view.loadEditor();
      },
      /**
       * Create the default states.
       *
       * @return {void}
       */
      createStates: function createStates() {
        this.on(
          "toolbar:create:featured-image",
          this.featuredImageToolbar,
          this
        );
        this.on("content:render:edit-image", this.editState, this);
        this.states.add([
          new wp.media.controller.FeaturedImage(),
          new wp.media.controller.EditImage({
            model: this.options.editImage
          })
        ]);
      }
    });
  };
  var getSingleMediaFrame = () => {
    const { wp } = window;
    return wp.media.view.MediaFrame.Select.extend({
      /**
       * Create the default states on the frame.
       */
      createStates() {
        const options = this.options;
        if (this.options.states) {
          return;
        }
        this.states.add([
          // Main states.
          new wp.media.controller.Library({
            library: wp.media.query(options.library),
            multiple: options.multiple,
            title: options.title,
            priority: 20,
            filterable: "uploaded"
            // Allow filtering by uploaded images.
          }),
          new wp.media.controller.EditImage({
            model: options.editImage
          })
        ]);
      }
    });
  };
  var getGalleryDetailsMediaFrame = () => {
    const { wp } = window;
    return wp.media.view.MediaFrame.Post.extend({
      /**
       * Set up gallery toolbar.
       *
       * @return {void}
       */
      galleryToolbar() {
        const editing = this.state().get("editing");
        this.toolbar.set(
          new wp.media.view.Toolbar({
            controller: this,
            items: {
              insert: {
                style: "primary",
                text: editing ? wp.media.view.l10n.updateGallery : wp.media.view.l10n.insertGallery,
                priority: 80,
                requires: { library: true },
                /**
                 * @fires wp.media.controller.State#update
                 */
                click() {
                  const controller = this.controller, state = controller.state();
                  controller.close();
                  state.trigger(
                    "update",
                    state.get("library")
                  );
                  controller.setState(controller.options.state);
                  controller.reset();
                }
              }
            }
          })
        );
      },
      /**
       * Handle the edit state requirements of selected media item.
       *
       * @return {void}
       */
      editState() {
        const selection = this.state("gallery").get("selection");
        const view = new wp.media.view.EditImage({
          model: selection.single(),
          controller: this
        }).render();
        this.content.set(view);
        view.loadEditor();
      },
      /**
       * Create the default states.
       *
       * @return {void}
       */
      createStates: function createStates() {
        this.on("toolbar:create:main-gallery", this.galleryToolbar, this);
        this.on("content:render:edit-image", this.editState, this);
        this.states.add([
          new wp.media.controller.Library({
            id: "gallery",
            title: wp.media.view.l10n.createGalleryTitle,
            priority: 40,
            toolbar: "main-gallery",
            filterable: "uploaded",
            multiple: "add",
            editable: false,
            library: wp.media.query({
              type: "image",
              ...this.options.library
            })
          }),
          new wp.media.controller.EditImage({
            model: this.options.editImage
          }),
          new wp.media.controller.GalleryEdit({
            library: this.options.selection,
            editing: this.options.editing,
            menu: "gallery",
            displaySettings: false,
            multiple: true
          }),
          new wp.media.controller.GalleryAdd()
        ]);
      }
    });
  };
  var slimImageObject = (img) => {
    const attrSet = [
      "sizes",
      "mime",
      "type",
      "subtype",
      "id",
      "url",
      "alt",
      "link",
      "caption"
    ];
    return attrSet.reduce((result, key) => {
      if (img?.hasOwnProperty(key)) {
        result[key] = img[key];
      }
      return result;
    }, {});
  };
  var getAttachmentsCollection = (ids) => {
    const { wp } = window;
    return wp.media.query({
      order: "ASC",
      orderby: "post__in",
      post__in: ids,
      posts_per_page: -1,
      query: true,
      type: "image"
    });
  };
  var MediaUpload = class extends import_element.Component {
    constructor() {
      super(...arguments);
      this.openModal = this.openModal.bind(this);
      this.onOpen = this.onOpen.bind(this);
      this.onSelect = this.onSelect.bind(this);
      this.onUpdate = this.onUpdate.bind(this);
      this.onClose = this.onClose.bind(this);
    }
    initializeListeners() {
      this.frame.on("select", this.onSelect);
      this.frame.on("update", this.onUpdate);
      this.frame.on("open", this.onOpen);
      this.frame.on("close", this.onClose);
    }
    /**
     * Sets the Gallery frame and initializes listeners.
     *
     * @return {void}
     */
    buildAndSetGalleryFrame() {
      const {
        addToGallery = false,
        allowedTypes,
        multiple = false,
        value = DEFAULT_EMPTY_GALLERY
      } = this.props;
      if (value === this.lastGalleryValue) {
        return;
      }
      const { wp } = window;
      this.lastGalleryValue = value;
      if (this.frame) {
        this.frame.remove();
      }
      let currentState;
      if (addToGallery) {
        currentState = "gallery-library";
      } else {
        currentState = value && value.length ? "gallery-edit" : "gallery";
      }
      if (!this.GalleryDetailsMediaFrame) {
        this.GalleryDetailsMediaFrame = getGalleryDetailsMediaFrame();
      }
      const attachments = getAttachmentsCollection(value);
      const selection = new wp.media.model.Selection(attachments.models, {
        props: attachments.props.toJSON(),
        multiple
      });
      this.frame = new this.GalleryDetailsMediaFrame({
        mimeType: allowedTypes,
        state: currentState,
        multiple,
        selection,
        editing: !!value?.length
      });
      wp.media.frame = this.frame;
      this.initializeListeners();
    }
    /**
     * Initializes the Media Library requirements for the featured image flow.
     *
     * @return {void}
     */
    buildAndSetFeatureImageFrame() {
      const { wp } = window;
      const { value: featuredImageId, multiple, allowedTypes } = this.props;
      const featuredImageFrame = getFeaturedImageMediaFrame();
      const attachments = getAttachmentsCollection(featuredImageId);
      const selection = new wp.media.model.Selection(attachments.models, {
        props: attachments.props.toJSON()
      });
      this.frame = new featuredImageFrame({
        mimeType: allowedTypes,
        state: "featured-image",
        multiple,
        selection,
        editing: featuredImageId
      });
      wp.media.frame = this.frame;
      wp.media.view.settings.post = {
        ...wp.media.view.settings.post,
        featuredImageId: featuredImageId || -1
      };
    }
    /**
     * Initializes the Media Library requirements for the single image flow.
     *
     * @return {void}
     */
    buildAndSetSingleMediaFrame() {
      const { wp } = window;
      const {
        allowedTypes,
        multiple = false,
        title = (0, import_i18n.__)("Select or Upload Media"),
        value
      } = this.props;
      const frameConfig = {
        title,
        multiple
      };
      if (!!allowedTypes) {
        frameConfig.library = { type: allowedTypes };
      }
      if (this.frame) {
        this.frame.remove();
      }
      const singleImageFrame = getSingleMediaFrame();
      const attachments = getAttachmentsCollection(value);
      const selection = new wp.media.model.Selection(attachments.models, {
        props: attachments.props.toJSON()
      });
      this.frame = new singleImageFrame({
        mimeType: allowedTypes,
        multiple,
        selection,
        ...frameConfig
      });
      wp.media.frame = this.frame;
    }
    componentWillUnmount() {
      this.frame?.remove();
    }
    onUpdate(selections) {
      const { onSelect, multiple = false } = this.props;
      const state = this.frame.state();
      const selectedImages = selections || state.get("selection");
      if (!selectedImages || !selectedImages.models.length) {
        return;
      }
      if (multiple) {
        onSelect(
          selectedImages.models.map(
            (model) => slimImageObject(model.toJSON())
          )
        );
      } else {
        onSelect(slimImageObject(selectedImages.models[0].toJSON()));
      }
    }
    onSelect() {
      const { onSelect, multiple = false } = this.props;
      const attachment = this.frame.state().get("selection").toJSON();
      onSelect(multiple ? attachment : attachment[0]);
    }
    onOpen() {
      const { wp } = window;
      const { value } = this.props;
      this.updateCollection();
      if (this.props.mode) {
        this.frame.content.mode(this.props.mode);
      }
      const hasMedia = Array.isArray(value) ? !!value?.length : !!value;
      if (!hasMedia) {
        return;
      }
      const isGallery = this.props.gallery;
      const selection = this.frame.state().get("selection");
      const valueArray = Array.isArray(value) ? value : [value];
      if (!isGallery) {
        valueArray.forEach((id) => {
          selection.add(wp.media.attachment(id));
        });
      }
      const attachments = getAttachmentsCollection(valueArray);
      attachments.more().done(function() {
        if (isGallery && attachments?.models?.length) {
          selection.add(attachments.models);
        }
      });
    }
    onClose() {
      const { onClose } = this.props;
      if (onClose) {
        onClose();
      }
      this.frame.detach();
    }
    updateCollection() {
      const frameContent = this.frame.content.get();
      if (frameContent && frameContent.collection) {
        const collection = frameContent.collection;
        collection.toArray().forEach((model) => model.trigger("destroy", model));
        collection.mirroring._hasMore = true;
        collection.more();
      }
    }
    openModal() {
      const {
        gallery = false,
        unstableFeaturedImageFlow = false,
        modalClass
      } = this.props;
      if (gallery) {
        this.buildAndSetGalleryFrame();
      } else {
        this.buildAndSetSingleMediaFrame();
      }
      if (modalClass) {
        this.frame.$el.addClass(modalClass);
      }
      if (unstableFeaturedImageFlow) {
        this.buildAndSetFeatureImageFrame();
      }
      this.initializeListeners();
      this.frame.open();
    }
    render() {
      return this.props.render({ open: this.openModal });
    }
  };
  var media_upload_default = MediaUpload;

  // packages/media-utils/build-module/utils/upload-media.mjs
  var import_i18n5 = __toESM(require_i18n(), 1);
  var import_blob = __toESM(require_blob(), 1);

  // packages/media-utils/build-module/utils/upload-to-server.mjs
  var import_api_fetch = __toESM(require_api_fetch(), 1);

  // packages/media-utils/build-module/utils/flatten-form-data.mjs
  function isPlainObject(data) {
    return data !== null && typeof data === "object" && Object.getPrototypeOf(data) === Object.prototype;
  }
  function flattenFormData(formData, key, data) {
    if (isPlainObject(data)) {
      for (const [name, value] of Object.entries(data)) {
        flattenFormData(formData, `${key}[${name}]`, value);
      }
    } else if (data !== void 0) {
      formData.append(key, String(data));
    }
  }

  // packages/media-utils/build-module/utils/transform-attachment.mjs
  function transformAttachment(attachment) {
    const { alt_text, source_url, ...savedMediaProps } = attachment;
    return {
      ...savedMediaProps,
      alt: attachment.alt_text,
      caption: attachment.caption?.raw ?? "",
      title: attachment.title.raw,
      url: attachment.source_url,
      poster: attachment._embedded?.["wp:featuredmedia"]?.[0]?.source_url || void 0
    };
  }

  // packages/media-utils/build-module/utils/upload-to-server.mjs
  async function uploadToServer(file, additionalData = {}, signal) {
    const data = new FormData();
    data.append("file", file, file.name || file.type.replace("/", "."));
    for (const [key, value] of Object.entries(additionalData)) {
      flattenFormData(
        data,
        key,
        value
      );
    }
    return transformAttachment(
      await (0, import_api_fetch.default)({
        // This allows the video block to directly get a video's poster image.
        path: "/wp/v2/media?_embed=wp:featuredmedia",
        body: data,
        method: "POST",
        signal
      })
    );
  }

  // packages/media-utils/build-module/utils/validate-mime-type.mjs
  var import_i18n2 = __toESM(require_i18n(), 1);

  // packages/media-utils/build-module/utils/upload-error.mjs
  var UploadError = class extends Error {
    code;
    file;
    constructor({ code, message: message2, file, cause }) {
      super(message2, { cause });
      Object.setPrototypeOf(this, new.target.prototype);
      this.code = code;
      this.file = file;
    }
  };

  // packages/media-utils/build-module/utils/validate-mime-type.mjs
  function validateMimeType(file, allowedTypes) {
    if (!allowedTypes) {
      return;
    }
    const isAllowedType = allowedTypes.some((allowedType) => {
      if (allowedType.includes("/")) {
        return allowedType === file.type;
      }
      return file.type.startsWith(`${allowedType}/`);
    });
    if (file.type && !isAllowedType) {
      throw new UploadError({
        code: "MIME_TYPE_NOT_SUPPORTED",
        message: (0, import_i18n2.sprintf)(
          // translators: %s: file name.
          (0, import_i18n2.__)("%s: Sorry, this file type is not supported here."),
          file.name
        ),
        file
      });
    }
  }

  // packages/media-utils/build-module/utils/validate-mime-type-for-user.mjs
  var import_i18n3 = __toESM(require_i18n(), 1);

  // packages/media-utils/build-module/utils/get-mime-types-array.mjs
  function getMimeTypesArray(wpMimeTypesObject) {
    if (!wpMimeTypesObject) {
      return null;
    }
    return Object.entries(wpMimeTypesObject).flatMap(
      ([extensionsString, mime]) => {
        const [type] = mime.split("/");
        const extensions = extensionsString.split("|");
        return [
          mime,
          ...extensions.map(
            (extension) => `${type}/${extension}`
          )
        ];
      }
    );
  }

  // packages/media-utils/build-module/utils/validate-mime-type-for-user.mjs
  function validateMimeTypeForUser(file, wpAllowedMimeTypes) {
    const allowedMimeTypesForUser = getMimeTypesArray(wpAllowedMimeTypes);
    if (!allowedMimeTypesForUser) {
      return;
    }
    const isAllowedMimeTypeForUser = allowedMimeTypesForUser.includes(
      file.type
    );
    if (file.type && !isAllowedMimeTypeForUser) {
      throw new UploadError({
        code: "MIME_TYPE_NOT_ALLOWED_FOR_USER",
        message: (0, import_i18n3.sprintf)(
          // translators: %s: file name.
          (0, import_i18n3.__)(
            "%s: Sorry, you are not allowed to upload this file type."
          ),
          file.name
        ),
        file
      });
    }
  }

  // packages/media-utils/build-module/utils/validate-file-size.mjs
  var import_i18n4 = __toESM(require_i18n(), 1);
  function validateFileSize(file, maxUploadFileSize) {
    if (file.size <= 0) {
      throw new UploadError({
        code: "EMPTY_FILE",
        message: (0, import_i18n4.sprintf)(
          // translators: %s: file name.
          (0, import_i18n4.__)("%s: This file is empty."),
          file.name
        ),
        file
      });
    }
    if (maxUploadFileSize && file.size > maxUploadFileSize) {
      throw new UploadError({
        code: "SIZE_ABOVE_LIMIT",
        message: (0, import_i18n4.sprintf)(
          // translators: %s: file name.
          (0, import_i18n4.__)(
            "%s: This file exceeds the maximum upload size for this site."
          ),
          file.name
        ),
        file
      });
    }
  }

  // packages/media-utils/build-module/utils/upload-media.mjs
  function uploadMedia({
    wpAllowedMimeTypes,
    allowedTypes,
    additionalData = {},
    filesList,
    maxUploadFileSize,
    onError,
    onFileChange,
    signal,
    multiple = true
  }) {
    if (!multiple && filesList.length > 1) {
      onError?.(new Error((0, import_i18n5.__)("Only one file can be used here.")));
      return;
    }
    const validFiles = [];
    const filesSet = [];
    const setAndUpdateFiles = (index, value) => {
      if (!window.__clientSideMediaProcessing) {
        if (filesSet[index]?.url) {
          (0, import_blob.revokeBlobURL)(filesSet[index].url);
        }
      }
      filesSet[index] = value;
      onFileChange?.(
        filesSet.filter((attachment) => attachment !== null)
      );
    };
    for (const mediaFile of filesList) {
      try {
        validateMimeTypeForUser(mediaFile, wpAllowedMimeTypes);
      } catch (error) {
        onError?.(error);
        continue;
      }
      try {
        validateMimeType(mediaFile, allowedTypes);
      } catch (error) {
        onError?.(error);
        continue;
      }
      try {
        validateFileSize(mediaFile, maxUploadFileSize);
      } catch (error) {
        onError?.(error);
        continue;
      }
      validFiles.push(mediaFile);
      if (!window.__clientSideMediaProcessing) {
        filesSet.push({ url: (0, import_blob.createBlobURL)(mediaFile) });
        onFileChange?.(filesSet);
      }
    }
    validFiles.map(async (file, index) => {
      try {
        const attachment = await uploadToServer(
          file,
          additionalData,
          signal
        );
        setAndUpdateFiles(index, attachment);
      } catch (error) {
        setAndUpdateFiles(index, null);
        let message2;
        if (typeof error === "object" && error !== null && "message" in error) {
          message2 = typeof error.message === "string" ? error.message : String(error.message);
        } else {
          message2 = (0, import_i18n5.sprintf)(
            // translators: %s: file name
            (0, import_i18n5.__)("Error while uploading file %s to the media library."),
            file.name
          );
        }
        onError?.(
          new UploadError({
            code: "GENERAL",
            message: message2,
            file,
            cause: error instanceof Error ? error : void 0
          })
        );
      }
    });
  }

  // packages/media-utils/build-module/utils/sideload-media.mjs
  var import_i18n6 = __toESM(require_i18n(), 1);

  // packages/media-utils/build-module/utils/sideload-to-server.mjs
  var import_api_fetch2 = __toESM(require_api_fetch(), 1);
  async function sideloadToServer(file, attachmentId, additionalData = {}, signal) {
    const data = new FormData();
    data.append("file", file, file.name || file.type.replace("/", "."));
    for (const [key, value] of Object.entries(additionalData)) {
      flattenFormData(
        data,
        key,
        value
      );
    }
    return transformAttachment(
      await (0, import_api_fetch2.default)({
        path: `/wp/v2/media/${attachmentId}/sideload`,
        body: data,
        method: "POST",
        signal
      })
    );
  }

  // packages/media-utils/build-module/utils/sideload-media.mjs
  var noop = () => {
  };
  async function sideloadMedia({
    file,
    attachmentId,
    additionalData = {},
    signal,
    onFileChange,
    onError = noop
  }) {
    try {
      const attachment = await sideloadToServer(
        file,
        attachmentId,
        additionalData,
        signal
      );
      onFileChange?.([attachment]);
    } catch (error) {
      let message2;
      if (error instanceof Error) {
        message2 = error.message;
      } else {
        message2 = (0, import_i18n6.sprintf)(
          // translators: %s: file name
          (0, import_i18n6.__)("Error while sideloading file %s to the server."),
          file.name
        );
      }
      onError(
        new UploadError({
          code: "GENERAL",
          message: message2,
          file,
          cause: error instanceof Error ? error : void 0
        })
      );
    }
  }

  // packages/media-utils/build-module/components/media-upload-modal/index.mjs
  var import_element60 = __toESM(require_element(), 1);
  var import_i18n66 = __toESM(require_i18n(), 1);
  var import_core_data4 = __toESM(require_core_data(), 1);
  var import_data9 = __toESM(require_data(), 1);
  var import_components54 = __toESM(require_components(), 1);

  // packages/icons/build-module/library/arrow-down.mjs
  var import_primitives = __toESM(require_primitives(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  var arrow_down_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z" }) });

  // packages/icons/build-module/library/arrow-left.mjs
  var import_primitives2 = __toESM(require_primitives(), 1);
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  var arrow_left_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.Path, { d: "M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z" }) });

  // packages/icons/build-module/library/arrow-right.mjs
  var import_primitives3 = __toESM(require_primitives(), 1);
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
  var arrow_right_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.Path, { d: "m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z" }) });

  // packages/icons/build-module/library/arrow-up.mjs
  var import_primitives4 = __toESM(require_primitives(), 1);
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
  var arrow_up_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.Path, { d: "M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z" }) });

  // packages/icons/build-module/library/audio.mjs
  var import_primitives5 = __toESM(require_primitives(), 1);
  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
  var audio_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.Path, { d: "M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z" }) });

  // packages/icons/build-module/library/block-table.mjs
  var import_primitives6 = __toESM(require_primitives(), 1);
  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
  var block_table_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.Path, { 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" }) });

  // packages/icons/build-module/library/category.mjs
  var import_primitives7 = __toESM(require_primitives(), 1);
  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
  var category_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/check.mjs
  var import_primitives8 = __toESM(require_primitives(), 1);
  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
  var check_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.Path, { d: "M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z" }) });

  // packages/icons/build-module/library/close-small.mjs
  var import_primitives9 = __toESM(require_primitives(), 1);
  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
  var close_small_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.Path, { 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" }) });

  // packages/icons/build-module/library/cog.mjs
  var import_primitives10 = __toESM(require_primitives(), 1);
  var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
  var cog_default = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/comment-author-avatar.mjs
  var import_primitives11 = __toESM(require_primitives(), 1);
  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
  var comment_author_avatar_default = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives11.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives11.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/envelope.mjs
  var import_primitives12 = __toESM(require_primitives(), 1);
  var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
  var envelope_default = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M3 7c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Zm2-.5h14c.3 0 .5.2.5.5v1L12 13.5 4.5 7.9V7c0-.3.2-.5.5-.5Zm-.5 3.3V17c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V9.8L12 15.4 4.5 9.8Z" }) });

  // packages/icons/build-module/library/error.mjs
  var import_primitives13 = __toESM(require_primitives(), 1);
  var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
  var error_default = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives13.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives13.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z" }) });

  // packages/icons/build-module/library/file.mjs
  var import_primitives14 = __toESM(require_primitives(), 1);
  var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
  var file_default = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives14.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives14.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/format-list-bullets-rtl.mjs
  var import_primitives15 = __toESM(require_primitives(), 1);
  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
  var format_list_bullets_rtl_default = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives15.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives15.Path, { 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" }) });

  // packages/icons/build-module/library/format-list-bullets.mjs
  var import_primitives16 = __toESM(require_primitives(), 1);
  var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
  var format_list_bullets_default = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives16.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives16.Path, { 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" }) });

  // packages/icons/build-module/library/funnel.mjs
  var import_primitives17 = __toESM(require_primitives(), 1);
  var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
  var funnel_default = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives17.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives17.Path, { d: "M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z" }) });

  // packages/icons/build-module/library/image.mjs
  var import_primitives18 = __toESM(require_primitives(), 1);
  var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
  var image_default = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_primitives18.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_primitives18.Path, { 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.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z" }) });

  // packages/icons/build-module/library/link.mjs
  var import_primitives19 = __toESM(require_primitives(), 1);
  var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
  var link_default = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_primitives19.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_primitives19.Path, { d: "M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z" }) });

  // packages/icons/build-module/library/mobile.mjs
  var import_primitives20 = __toESM(require_primitives(), 1);
  var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
  var mobile_default = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_primitives20.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_primitives20.Path, { d: "M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z" }) });

  // packages/icons/build-module/library/more-vertical.mjs
  var import_primitives21 = __toESM(require_primitives(), 1);
  var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
  var more_vertical_default = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_primitives21.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_primitives21.Path, { d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" }) });

  // packages/icons/build-module/library/next.mjs
  var import_primitives22 = __toESM(require_primitives(), 1);
  var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
  var next_default = /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives22.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives22.Path, { 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" }) });

  // packages/icons/build-module/library/previous.mjs
  var import_primitives23 = __toESM(require_primitives(), 1);
  var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
  var previous_default = /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_primitives23.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_primitives23.Path, { 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" }) });

  // packages/icons/build-module/library/scheduled.mjs
  var import_primitives24 = __toESM(require_primitives(), 1);
  var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
  var scheduled_default = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_primitives24.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_primitives24.Path, { fillRule: "evenodd", clipRule: "evenodd", 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" }) });

  // packages/icons/build-module/library/search.mjs
  var import_primitives25 = __toESM(require_primitives(), 1);
  var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
  var search_default = /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_primitives25.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_primitives25.Path, { 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" }) });

  // packages/icons/build-module/library/seen.mjs
  var import_primitives26 = __toESM(require_primitives(), 1);
  var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
  var seen_default = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_primitives26.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_primitives26.Path, { 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" }) });

  // packages/icons/build-module/library/unseen.mjs
  var import_primitives27 = __toESM(require_primitives(), 1);
  var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
  var unseen_default = /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_primitives27.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_primitives27.Path, { d: "M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z" }) });

  // packages/icons/build-module/library/upload.mjs
  var import_primitives28 = __toESM(require_primitives(), 1);
  var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
  var upload_default = /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_primitives28.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_primitives28.Path, { 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" }) });

  // packages/icons/build-module/library/video.mjs
  var import_primitives29 = __toESM(require_primitives(), 1);
  var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
  var video_default = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_primitives29.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_primitives29.Path, { 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" }) });

  // node_modules/@base-ui/utils/esm/useRefWithInit.js
  var React = __toESM(require_react(), 1);
  var UNINITIALIZED = {};
  function useRefWithInit(init2, initArg) {
    const ref = React.useRef(UNINITIALIZED);
    if (ref.current === UNINITIALIZED) {
      ref.current = init2(initArg);
    }
    return ref;
  }

  // node_modules/@base-ui/react/esm/utils/useRenderElement.js
  var React4 = __toESM(require_react(), 1);

  // node_modules/@base-ui/utils/esm/useMergedRefs.js
  function useMergedRefs(a2, b2, c2, d2) {
    const forkRef = useRefWithInit(createForkRef).current;
    if (didChange(forkRef, a2, b2, c2, d2)) {
      update(forkRef, [a2, b2, c2, d2]);
    }
    return forkRef.callback;
  }
  function useMergedRefsN(refs) {
    const forkRef = useRefWithInit(createForkRef).current;
    if (didChangeN(forkRef, refs)) {
      update(forkRef, refs);
    }
    return forkRef.callback;
  }
  function createForkRef() {
    return {
      callback: null,
      cleanup: null,
      refs: []
    };
  }
  function didChange(forkRef, a2, b2, c2, d2) {
    return forkRef.refs[0] !== a2 || forkRef.refs[1] !== b2 || forkRef.refs[2] !== c2 || forkRef.refs[3] !== d2;
  }
  function didChangeN(forkRef, newRefs) {
    return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);
  }
  function update(forkRef, refs) {
    forkRef.refs = refs;
    if (refs.every((ref) => ref == null)) {
      forkRef.callback = null;
      return;
    }
    forkRef.callback = (instance) => {
      if (forkRef.cleanup) {
        forkRef.cleanup();
        forkRef.cleanup = null;
      }
      if (instance != null) {
        const cleanupCallbacks = Array(refs.length).fill(null);
        for (let i2 = 0; i2 < refs.length; i2 += 1) {
          const ref = refs[i2];
          if (ref == null) {
            continue;
          }
          switch (typeof ref) {
            case "function": {
              const refCleanup = ref(instance);
              if (typeof refCleanup === "function") {
                cleanupCallbacks[i2] = refCleanup;
              }
              break;
            }
            case "object": {
              ref.current = instance;
              break;
            }
            default:
          }
        }
        forkRef.cleanup = () => {
          for (let i2 = 0; i2 < refs.length; i2 += 1) {
            const ref = refs[i2];
            if (ref == null) {
              continue;
            }
            switch (typeof ref) {
              case "function": {
                const cleanupCallback = cleanupCallbacks[i2];
                if (typeof cleanupCallback === "function") {
                  cleanupCallback();
                } else {
                  ref(null);
                }
                break;
              }
              case "object": {
                ref.current = null;
                break;
              }
              default:
            }
          }
        };
      }
    };
  }

  // node_modules/@base-ui/utils/esm/getReactElementRef.js
  var React3 = __toESM(require_react(), 1);

  // node_modules/@base-ui/utils/esm/reactVersion.js
  var React2 = __toESM(require_react(), 1);
  var majorVersion = parseInt(React2.version, 10);
  function isReactVersionAtLeast(reactVersionToCheck) {
    return majorVersion >= reactVersionToCheck;
  }

  // node_modules/@base-ui/utils/esm/getReactElementRef.js
  function getReactElementRef(element) {
    if (!/* @__PURE__ */ React3.isValidElement(element)) {
      return null;
    }
    const reactElement = element;
    const propsWithRef = reactElement.props;
    return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
  }

  // node_modules/@base-ui/utils/esm/mergeObjects.js
  function mergeObjects(a2, b2) {
    if (a2 && !b2) {
      return a2;
    }
    if (!a2 && b2) {
      return b2;
    }
    if (a2 || b2) {
      return {
        ...a2,
        ...b2
      };
    }
    return void 0;
  }

  // node_modules/@base-ui/react/esm/utils/getStateAttributesProps.js
  function getStateAttributesProps(state, customMapping) {
    const props = {};
    for (const key in state) {
      const value = state[key];
      if (customMapping?.hasOwnProperty(key)) {
        const customProps = customMapping[key](value);
        if (customProps != null) {
          Object.assign(props, customProps);
        }
        continue;
      }
      if (value === true) {
        props[`data-${key.toLowerCase()}`] = "";
      } else if (value) {
        props[`data-${key.toLowerCase()}`] = value.toString();
      }
    }
    return props;
  }

  // node_modules/@base-ui/react/esm/utils/resolveClassName.js
  function resolveClassName(className, state) {
    return typeof className === "function" ? className(state) : className;
  }

  // node_modules/@base-ui/react/esm/utils/resolveStyle.js
  function resolveStyle(style, state) {
    return typeof style === "function" ? style(state) : style;
  }

  // node_modules/@base-ui/react/esm/merge-props/mergeProps.js
  var EMPTY_PROPS = {};
  function mergeProps(a2, b2, c2, d2, e2) {
    let merged = {
      ...resolvePropsGetter(a2, EMPTY_PROPS)
    };
    if (b2) {
      merged = mergeOne(merged, b2);
    }
    if (c2) {
      merged = mergeOne(merged, c2);
    }
    if (d2) {
      merged = mergeOne(merged, d2);
    }
    if (e2) {
      merged = mergeOne(merged, e2);
    }
    return merged;
  }
  function mergePropsN(props) {
    if (props.length === 0) {
      return EMPTY_PROPS;
    }
    if (props.length === 1) {
      return resolvePropsGetter(props[0], EMPTY_PROPS);
    }
    let merged = {
      ...resolvePropsGetter(props[0], EMPTY_PROPS)
    };
    for (let i2 = 1; i2 < props.length; i2 += 1) {
      merged = mergeOne(merged, props[i2]);
    }
    return merged;
  }
  function mergeOne(merged, inputProps) {
    if (isPropsGetter(inputProps)) {
      return inputProps(merged);
    }
    return mutablyMergeInto(merged, inputProps);
  }
  function mutablyMergeInto(mergedProps, externalProps) {
    if (!externalProps) {
      return mergedProps;
    }
    for (const propName in externalProps) {
      const externalPropValue = externalProps[propName];
      switch (propName) {
        case "style": {
          mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
          break;
        }
        case "className": {
          mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
          break;
        }
        default: {
          if (isEventHandler(propName, externalPropValue)) {
            mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
          } else {
            mergedProps[propName] = externalPropValue;
          }
        }
      }
    }
    return mergedProps;
  }
  function isEventHandler(key, value) {
    const code0 = key.charCodeAt(0);
    const code1 = key.charCodeAt(1);
    const code2 = key.charCodeAt(2);
    return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
  }
  function isPropsGetter(inputProps) {
    return typeof inputProps === "function";
  }
  function resolvePropsGetter(inputProps, previousProps) {
    if (isPropsGetter(inputProps)) {
      return inputProps(previousProps);
    }
    return inputProps ?? EMPTY_PROPS;
  }
  function mergeEventHandlers(ourHandler, theirHandler) {
    if (!theirHandler) {
      return ourHandler;
    }
    if (!ourHandler) {
      return theirHandler;
    }
    return (event) => {
      if (isSyntheticEvent(event)) {
        const baseUIEvent = event;
        makeEventPreventable(baseUIEvent);
        const result2 = theirHandler(baseUIEvent);
        if (!baseUIEvent.baseUIHandlerPrevented) {
          ourHandler?.(baseUIEvent);
        }
        return result2;
      }
      const result = theirHandler(event);
      ourHandler?.(event);
      return result;
    };
  }
  function makeEventPreventable(event) {
    event.preventBaseUIHandler = () => {
      event.baseUIHandlerPrevented = true;
    };
    return event;
  }
  function mergeClassNames(ourClassName, theirClassName) {
    if (theirClassName) {
      if (ourClassName) {
        return theirClassName + " " + ourClassName;
      }
      return theirClassName;
    }
    return ourClassName;
  }
  function isSyntheticEvent(event) {
    return event != null && typeof event === "object" && "nativeEvent" in event;
  }

  // node_modules/@base-ui/utils/esm/empty.js
  var EMPTY_ARRAY = Object.freeze([]);
  var EMPTY_OBJECT = Object.freeze({});

  // node_modules/@base-ui/react/esm/utils/useRenderElement.js
  var import_react = __toESM(require_react(), 1);
  function useRenderElement(element, componentProps, params = {}) {
    const renderProp = componentProps.render;
    const outProps = useRenderElementProps(componentProps, params);
    if (params.enabled === false) {
      return null;
    }
    const state = params.state ?? EMPTY_OBJECT;
    return evaluateRenderProp(element, renderProp, outProps, state);
  }
  function useRenderElementProps(componentProps, params = {}) {
    const {
      className: classNameProp,
      style: styleProp,
      render: renderProp
    } = componentProps;
    const {
      state = EMPTY_OBJECT,
      ref,
      props,
      stateAttributesMapping,
      enabled = true
    } = params;
    const className = enabled ? resolveClassName(classNameProp, state) : void 0;
    const style = enabled ? resolveStyle(styleProp, state) : void 0;
    const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT;
    const outProps = enabled ? mergeObjects(stateProps, Array.isArray(props) ? mergePropsN(props) : props) ?? EMPTY_OBJECT : EMPTY_OBJECT;
    if (typeof document !== "undefined") {
      if (!enabled) {
        useMergedRefs(null, null);
      } else if (Array.isArray(ref)) {
        outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
      } else {
        outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
      }
    }
    if (!enabled) {
      return EMPTY_OBJECT;
    }
    if (className !== void 0) {
      outProps.className = mergeClassNames(outProps.className, className);
    }
    if (style !== void 0) {
      outProps.style = mergeObjects(outProps.style, style);
    }
    return outProps;
  }
  function evaluateRenderProp(element, render4, props, state) {
    if (render4) {
      if (typeof render4 === "function") {
        return render4(props, state);
      }
      const mergedProps = mergeProps(props, render4.props);
      mergedProps.ref = props.ref;
      return /* @__PURE__ */ React4.cloneElement(render4, mergedProps);
    }
    if (element) {
      if (typeof element === "string") {
        return renderTag(element, props);
      }
    }
    throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage(8));
  }
  function renderTag(Tag, props) {
    if (Tag === "button") {
      return /* @__PURE__ */ (0, import_react.createElement)("button", {
        type: "button",
        ...props,
        key: props.key
      });
    }
    if (Tag === "img") {
      return /* @__PURE__ */ (0, import_react.createElement)("img", {
        alt: "",
        ...props,
        key: props.key
      });
    }
    return /* @__PURE__ */ React4.createElement(Tag, props);
  }

  // node_modules/@base-ui/react/esm/use-render/useRender.js
  function useRender(params) {
    return useRenderElement(params.defaultTagName ?? "div", params, params);
  }

  // node_modules/clsx/dist/clsx.mjs
  function r(e2) {
    var t2, f2, n2 = "";
    if ("string" == typeof e2 || "number" == typeof e2) n2 += e2;
    else if ("object" == typeof e2) if (Array.isArray(e2)) {
      var o2 = e2.length;
      for (t2 = 0; t2 < o2; t2++) e2[t2] && (f2 = r(e2[t2])) && (n2 && (n2 += " "), n2 += f2);
    } else for (f2 in e2) e2[f2] && (n2 && (n2 += " "), n2 += f2);
    return n2;
  }
  function clsx() {
    for (var e2, t2, f2 = 0, n2 = "", o2 = arguments.length; f2 < o2; f2++) (e2 = arguments[f2]) && (t2 = r(e2)) && (n2 && (n2 += " "), n2 += t2);
    return n2;
  }
  var clsx_default = clsx;

  // packages/ui/build-module/stack/stack.mjs
  var import_element2 = __toESM(require_element(), 1);
  if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='71d20935c2']")) {
    const style = document.createElement("style");
    style.setAttribute("data-wp-hash", "71d20935c2");
    style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}"));
    document.head.appendChild(style);
  }
  var style_default = { "stack": "_19ce0419607e1896__stack" };
  var gapTokens = {
    xs: "var(--wpds-dimension-gap-xs, 4px)",
    sm: "var(--wpds-dimension-gap-sm, 8px)",
    md: "var(--wpds-dimension-gap-md, 12px)",
    lg: "var(--wpds-dimension-gap-lg, 16px)",
    xl: "var(--wpds-dimension-gap-xl, 24px)",
    "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
    "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
  };
  var Stack = (0, import_element2.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render: render4, ...props }, ref) {
    const style = {
      gap: gap && gapTokens[gap],
      alignItems: align,
      justifyContent: justify,
      flexDirection: direction,
      flexWrap: wrap
    };
    const element = useRender({
      render: render4,
      ref,
      props: mergeProps(props, { style, className: style_default.stack })
    });
    return element;
  });

  // packages/dataviews/build-module/components/dataviews-context/index.mjs
  var import_element3 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/constants.mjs
  var import_i18n7 = __toESM(require_i18n(), 1);
  var OPERATOR_IS_ANY = "isAny";
  var OPERATOR_IS_NONE = "isNone";
  var OPERATOR_IS_ALL = "isAll";
  var OPERATOR_IS_NOT_ALL = "isNotAll";
  var OPERATOR_BETWEEN = "between";
  var OPERATOR_IN_THE_PAST = "inThePast";
  var OPERATOR_OVER = "over";
  var OPERATOR_IS = "is";
  var OPERATOR_IS_NOT = "isNot";
  var OPERATOR_LESS_THAN = "lessThan";
  var OPERATOR_GREATER_THAN = "greaterThan";
  var OPERATOR_LESS_THAN_OR_EQUAL = "lessThanOrEqual";
  var OPERATOR_GREATER_THAN_OR_EQUAL = "greaterThanOrEqual";
  var OPERATOR_BEFORE = "before";
  var OPERATOR_AFTER = "after";
  var OPERATOR_BEFORE_INC = "beforeInc";
  var OPERATOR_AFTER_INC = "afterInc";
  var OPERATOR_CONTAINS = "contains";
  var OPERATOR_NOT_CONTAINS = "notContains";
  var OPERATOR_STARTS_WITH = "startsWith";
  var OPERATOR_ON = "on";
  var OPERATOR_NOT_ON = "notOn";
  var SORTING_DIRECTIONS = ["asc", "desc"];
  var sortArrows = { asc: "\u2191", desc: "\u2193" };
  var sortValues = { asc: "ascending", desc: "descending" };
  var sortLabels = {
    asc: (0, import_i18n7.__)("Sort ascending"),
    desc: (0, import_i18n7.__)("Sort descending")
  };
  var sortIcons = {
    asc: arrow_up_default,
    desc: arrow_down_default
  };
  var LAYOUT_TABLE = "table";
  var LAYOUT_GRID = "grid";
  var LAYOUT_LIST = "list";
  var LAYOUT_ACTIVITY = "activity";
  var LAYOUT_PICKER_GRID = "pickerGrid";
  var LAYOUT_PICKER_TABLE = "pickerTable";

  // packages/dataviews/build-module/components/dataviews-context/index.mjs
  var DataViewsContext = (0, import_element3.createContext)({
    view: { type: LAYOUT_TABLE },
    onChangeView: () => {
    },
    fields: [],
    data: [],
    paginationInfo: {
      totalItems: 0,
      totalPages: 0
    },
    selection: [],
    onChangeSelection: () => {
    },
    setOpenedFilter: () => {
    },
    openedFilter: null,
    getItemId: (item) => item.id,
    isItemClickable: () => true,
    renderItemLink: void 0,
    containerWidth: 0,
    containerRef: (0, import_element3.createRef)(),
    resizeObserverRef: () => {
    },
    defaultLayouts: { list: {}, grid: {}, table: {} },
    filters: [],
    isShowingFilter: false,
    setIsShowingFilter: () => {
    },
    hasInitiallyLoaded: false,
    hasInfiniteScrollHandler: false,
    config: {
      perPageSizes: []
    }
  });
  DataViewsContext.displayName = "DataViewsContext";
  var dataviews_context_default = DataViewsContext;

  // packages/dataviews/build-module/components/dataviews-layouts/index.mjs
  var import_i18n27 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/components/dataviews-layouts/table/index.mjs
  var import_i18n15 = __toESM(require_i18n(), 1);
  var import_components6 = __toESM(require_components(), 1);
  var import_element11 = __toESM(require_element(), 1);
  var import_keycodes = __toESM(require_keycodes(), 1);

  // packages/dataviews/build-module/components/dataviews-selection-checkbox/index.mjs
  var import_components = __toESM(require_components(), 1);
  var import_i18n8 = __toESM(require_i18n(), 1);
  var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
  function DataViewsSelectionCheckbox({
    selection,
    onChangeSelection,
    item,
    getItemId,
    titleField,
    disabled,
    ...extraProps
  }) {
    const id = getItemId(item);
    const checked = !disabled && selection.includes(id);
    const selectionLabel = titleField?.getValue?.({ item }) || (0, import_i18n8.__)("(no title)");
    return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
      import_components.CheckboxControl,
      {
        className: "dataviews-selection-checkbox",
        "aria-label": selectionLabel,
        "aria-disabled": disabled,
        checked,
        onChange: () => {
          if (disabled) {
            return;
          }
          onChangeSelection(
            selection.includes(id) ? selection.filter((itemId) => id !== itemId) : [...selection, id]
          );
        },
        ...extraProps
      }
    );
  }

  // packages/dataviews/build-module/components/dataviews-item-actions/index.mjs
  var import_components2 = __toESM(require_components(), 1);
  var import_i18n9 = __toESM(require_i18n(), 1);
  var import_element4 = __toESM(require_element(), 1);
  var import_data = __toESM(require_data(), 1);
  var import_compose = __toESM(require_compose(), 1);

  // packages/dataviews/build-module/lock-unlock.mjs
  var import_private_apis = __toESM(require_private_apis(), 1);
  var { lock, unlock } = (0, import_private_apis.__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"
  );

  // packages/dataviews/build-module/components/dataviews-item-actions/index.mjs
  var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
  var { Menu, kebabCase } = unlock(import_components2.privateApis);
  function ButtonTrigger({
    action,
    onClick,
    items,
    variant
  }) {
    const label = typeof action.label === "string" ? action.label : action.label(items);
    return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
      import_components2.Button,
      {
        disabled: !!action.disabled,
        accessibleWhenDisabled: true,
        size: "compact",
        variant,
        onClick,
        children: label
      }
    );
  }
  function MenuItemTrigger({
    action,
    onClick,
    items
  }) {
    const label = typeof action.label === "string" ? action.label : action.label(items);
    return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Menu.Item, { disabled: action.disabled, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Menu.ItemLabel, { children: label }) });
  }
  function ActionModal({
    action,
    items,
    closeModal
  }) {
    const label = typeof action.label === "string" ? action.label : action.label(items);
    const modalHeader = typeof action.modalHeader === "function" ? action.modalHeader(items) : action.modalHeader;
    return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
      import_components2.Modal,
      {
        title: modalHeader || label,
        __experimentalHideHeader: !!action.hideModalHeader,
        onRequestClose: closeModal,
        focusOnMount: action.modalFocusOnMount ?? true,
        size: action.modalSize || "medium",
        overlayClassName: `dataviews-action-modal dataviews-action-modal__${kebabCase(
          action.id
        )}`,
        children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(action.RenderModal, { items, closeModal })
      }
    );
  }
  function ActionsMenuGroup({
    actions,
    item,
    registry,
    setActiveModalAction
  }) {
    const { primaryActions, regularActions } = (0, import_element4.useMemo)(() => {
      return actions.reduce(
        (acc, action) => {
          (action.isPrimary ? acc.primaryActions : acc.regularActions).push(action);
          return acc;
        },
        {
          primaryActions: [],
          regularActions: []
        }
      );
    }, [actions]);
    const renderActionGroup = (actionList) => actionList.map((action) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
      MenuItemTrigger,
      {
        action,
        onClick: () => {
          if ("RenderModal" in action) {
            setActiveModalAction(action);
            return;
          }
          action.callback([item], { registry });
        },
        items: [item]
      },
      action.id
    ));
    return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Menu.Group, { children: [
      renderActionGroup(primaryActions),
      renderActionGroup(regularActions)
    ] });
  }
  function ItemActions({
    item,
    actions,
    isCompact
  }) {
    const registry = (0, import_data.useRegistry)();
    const { primaryActions, eligibleActions } = (0, import_element4.useMemo)(() => {
      const _eligibleActions = actions.filter(
        (action) => !action.isEligible || action.isEligible(item)
      );
      const _primaryActions = _eligibleActions.filter(
        (action) => action.isPrimary
      );
      return {
        primaryActions: _primaryActions,
        eligibleActions: _eligibleActions
      };
    }, [actions, item]);
    const isMobileViewport = (0, import_compose.useViewportMatch)("medium", "<");
    if (isCompact) {
      return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
        CompactItemActions,
        {
          item,
          actions: eligibleActions,
          isSmall: true,
          registry
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
      Stack,
      {
        direction: "row",
        justify: "flex-end",
        className: "dataviews-item-actions",
        style: {
          flexShrink: 0,
          width: "auto"
        },
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
            PrimaryActions,
            {
              item,
              actions: primaryActions,
              registry
            }
          ),
          (primaryActions.length < eligibleActions.length || // Since we hide primary actions on mobile, we need to show the menu
          // there if there are any actions at all.
          isMobileViewport) && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
            CompactItemActions,
            {
              item,
              actions: eligibleActions,
              registry
            }
          )
        ]
      }
    );
  }
  function CompactItemActions({
    item,
    actions,
    isSmall,
    registry
  }) {
    const [activeModalAction, setActiveModalAction] = (0, import_element4.useState)(
      null
    );
    return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Menu, { placement: "bottom-end", children: [
        /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
          Menu.TriggerButton,
          {
            render: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
              import_components2.Button,
              {
                size: isSmall ? "small" : "compact",
                icon: more_vertical_default,
                label: (0, import_i18n9.__)("Actions"),
                accessibleWhenDisabled: true,
                disabled: !actions.length,
                className: "dataviews-all-actions-button"
              }
            )
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Menu.Popover, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
          ActionsMenuGroup,
          {
            actions,
            item,
            registry,
            setActiveModalAction
          }
        ) })
      ] }),
      !!activeModalAction && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
        ActionModal,
        {
          action: activeModalAction,
          items: [item],
          closeModal: () => setActiveModalAction(null)
        }
      )
    ] });
  }
  function PrimaryActions({
    item,
    actions,
    registry,
    buttonVariant
  }) {
    const [activeModalAction, setActiveModalAction] = (0, import_element4.useState)(null);
    const isMobileViewport = (0, import_compose.useViewportMatch)("medium", "<");
    if (isMobileViewport) {
      return null;
    }
    if (!Array.isArray(actions) || actions.length === 0) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
      actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
        ButtonTrigger,
        {
          action,
          onClick: () => {
            if ("RenderModal" in action) {
              setActiveModalAction(action);
              return;
            }
            action.callback([item], { registry });
          },
          items: [item],
          variant: buttonVariant
        },
        action.id
      )),
      !!activeModalAction && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
        ActionModal,
        {
          action: activeModalAction,
          items: [item],
          closeModal: () => setActiveModalAction(null)
        }
      )
    ] });
  }

  // packages/dataviews/build-module/components/dataviews-bulk-actions/index.mjs
  var import_components3 = __toESM(require_components(), 1);
  var import_i18n11 = __toESM(require_i18n(), 1);
  var import_element5 = __toESM(require_element(), 1);
  var import_data2 = __toESM(require_data(), 1);
  var import_compose2 = __toESM(require_compose(), 1);

  // packages/dataviews/build-module/utils/get-footer-message.mjs
  var import_i18n10 = __toESM(require_i18n(), 1);
  function getFooterMessage(selectionCount, itemsCount, totalItems) {
    if (selectionCount > 0) {
      return (0, import_i18n10.sprintf)(
        /* translators: %d: number of items. */
        (0, import_i18n10._n)("%d Item selected", "%d Items selected", selectionCount),
        selectionCount
      );
    }
    if (totalItems > itemsCount) {
      return (0, import_i18n10.sprintf)(
        /* translators: %1$d: number of items. %2$d: total number of items. */
        (0, import_i18n10._n)("%1$d of %2$d Item", "%1$d of %2$d Items", totalItems),
        itemsCount,
        totalItems
      );
    }
    return (0, import_i18n10.sprintf)(
      /* translators: %d: number of items. */
      (0, import_i18n10._n)("%d Item", "%d Items", itemsCount),
      itemsCount
    );
  }

  // packages/dataviews/build-module/components/dataviews-bulk-actions/index.mjs
  var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
  function useHasAPossibleBulkAction(actions, item) {
    return (0, import_element5.useMemo)(() => {
      return actions.some((action) => {
        return action.supportsBulk && (!action.isEligible || action.isEligible(item));
      });
    }, [actions, item]);
  }
  function useSomeItemHasAPossibleBulkAction(actions, data) {
    return (0, import_element5.useMemo)(() => {
      return data.some((item) => {
        return actions.some((action) => {
          return action.supportsBulk && (!action.isEligible || action.isEligible(item));
        });
      });
    }, [actions, data]);
  }
  function BulkSelectionCheckbox({
    selection,
    onChangeSelection,
    data,
    actions,
    getItemId
  }) {
    const selectableItems = (0, import_element5.useMemo)(() => {
      return data.filter((item) => {
        return actions.some(
          (action) => action.supportsBulk && (!action.isEligible || action.isEligible(item))
        );
      });
    }, [data, actions]);
    const selectedItems = data.filter(
      (item) => selection.includes(getItemId(item)) && selectableItems.includes(item)
    );
    const areAllSelected = selectedItems.length === selectableItems.length;
    return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
      import_components3.CheckboxControl,
      {
        className: "dataviews-view-table-selection-checkbox",
        checked: areAllSelected,
        indeterminate: !areAllSelected && !!selectedItems.length,
        onChange: () => {
          if (areAllSelected) {
            onChangeSelection([]);
          } else {
            onChangeSelection(
              selectableItems.map((item) => getItemId(item))
            );
          }
        },
        "aria-label": areAllSelected ? (0, import_i18n11.__)("Deselect all") : (0, import_i18n11.__)("Select all")
      }
    );
  }

  // packages/dataviews/build-module/components/dataviews-layouts/table/column-header-menu.mjs
  var import_i18n12 = __toESM(require_i18n(), 1);
  var import_components4 = __toESM(require_components(), 1);
  var import_element6 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/utils/get-hideable-fields.mjs
  function getHideableFields(view, fields) {
    const togglableFields = [
      view?.titleField,
      view?.mediaField,
      view?.descriptionField
    ].filter(Boolean);
    return fields.filter(
      (f2) => !togglableFields.includes(f2.id) && f2.type !== "media" && f2.enableHiding !== false
    );
  }

  // packages/dataviews/build-module/components/dataviews-layouts/table/column-header-menu.mjs
  var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
  var { Menu: Menu2 } = unlock(import_components4.privateApis);
  function WithMenuSeparators({ children }) {
    return import_element6.Children.toArray(children).filter(Boolean).map((child, i2) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_element6.Fragment, { children: [
      i2 > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Menu2.Separator, {}),
      child
    ] }, i2));
  }
  var _HeaderMenu = (0, import_element6.forwardRef)(function HeaderMenu({
    fieldId,
    view,
    fields,
    onChangeView,
    onHide,
    setOpenedFilter,
    canMove = true,
    canInsertLeft = true,
    canInsertRight = true
  }, ref) {
    const visibleFieldIds = view.fields ?? [];
    const index = visibleFieldIds?.indexOf(fieldId);
    const isSorted = view.sort?.field === fieldId;
    let isHidable = false;
    let isSortable = false;
    let canAddFilter = false;
    let operators = [];
    const field = fields.find((f2) => f2.id === fieldId);
    const { setIsShowingFilter } = (0, import_element6.useContext)(dataviews_context_default);
    if (!field) {
      return null;
    }
    isHidable = field.enableHiding !== false;
    isSortable = field.enableSorting !== false;
    const header = field.header;
    operators = !!field.filterBy && field.filterBy?.operators || [];
    canAddFilter = !view.filters?.some((_filter) => fieldId === _filter.field) && !!(field.hasElements || field.Edit) && field.filterBy !== false && !field.filterBy?.isPrimary;
    if (!isSortable && !canMove && !isHidable && !canAddFilter) {
      return header;
    }
    const hiddenFields = getHideableFields(view, fields).filter(
      (f2) => !visibleFieldIds.includes(f2.id)
    );
    const canInsert = (canInsertLeft || canInsertRight) && !!hiddenFields.length;
    const isRtl = (0, import_i18n12.isRTL)();
    return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Menu2, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
        Menu2.TriggerButton,
        {
          render: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
            import_components4.Button,
            {
              size: "compact",
              className: "dataviews-view-table-header-button",
              ref,
              variant: "tertiary"
            }
          ),
          children: [
            header,
            view.sort && isSorted && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { "aria-hidden": "true", children: sortArrows[view.sort.direction] })
          ]
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Menu2.Popover, { style: { minWidth: "240px" }, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(WithMenuSeparators, { children: [
        isSortable && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Menu2.Group, { children: SORTING_DIRECTIONS.map(
          (direction) => {
            const isChecked = view.sort && isSorted && view.sort.direction === direction;
            const value = `${fieldId}-${direction}`;
            return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
              Menu2.RadioItem,
              {
                name: "view-table-sorting",
                value,
                checked: isChecked,
                onChange: () => {
                  onChangeView({
                    ...view,
                    sort: {
                      field: fieldId,
                      direction
                    },
                    showLevels: false
                  });
                },
                children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Menu2.ItemLabel, { children: sortLabels[direction] })
              },
              value
            );
          }
        ) }),
        canAddFilter && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Menu2.Group, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
          Menu2.Item,
          {
            prefix: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components4.Icon, { icon: funnel_default }),
            onClick: () => {
              setOpenedFilter(fieldId);
              setIsShowingFilter(true);
              onChangeView({
                ...view,
                page: 1,
                filters: [
                  ...view.filters || [],
                  {
                    field: fieldId,
                    value: void 0,
                    operator: operators[0]
                  }
                ]
              });
            },
            children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Menu2.ItemLabel, { children: (0, import_i18n12.__)("Add filter") })
          }
        ) }),
        (canMove || isHidable || canInsert) && field && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Menu2.Group, { children: [
          canMove && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
            Menu2.Item,
            {
              prefix: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components4.Icon, { icon: arrow_left_default }),
              disabled: isRtl ? index >= visibleFieldIds.length - 1 : index < 1,
              onClick: () => {
                const targetIndex = isRtl ? index + 1 : index - 1;
                const newFields = [
                  ...visibleFieldIds
                ];
                newFields.splice(index, 1);
                newFields.splice(
                  targetIndex,
                  0,
                  fieldId
                );
                onChangeView({
                  ...view,
                  fields: newFields
                });
              },
              children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Menu2.ItemLabel, { children: (0, import_i18n12.__)("Move left") })
            }
          ),
          canMove && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
            Menu2.Item,
            {
              prefix: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components4.Icon, { icon: arrow_right_default }),
              disabled: isRtl ? index < 1 : index >= visibleFieldIds.length - 1,
              onClick: () => {
                const targetIndex = isRtl ? index - 1 : index + 1;
                const newFields = [
                  ...visibleFieldIds
                ];
                newFields.splice(index, 1);
                newFields.splice(
                  targetIndex,
                  0,
                  fieldId
                );
                onChangeView({
                  ...view,
                  fields: newFields
                });
              },
              children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Menu2.ItemLabel, { children: (0, import_i18n12.__)("Move right") })
            }
          ),
          canInsertLeft && !!hiddenFields.length && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Menu2, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Menu2.SubmenuTriggerItem, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Menu2.ItemLabel, { children: (0, import_i18n12.__)("Insert left") }) }),
            /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Menu2.Popover, { children: hiddenFields.map((hiddenField) => {
              const insertIndex = isRtl ? index + 1 : index;
              return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
                Menu2.Item,
                {
                  onClick: () => {
                    onChangeView({
                      ...view,
                      fields: [
                        ...visibleFieldIds.slice(
                          0,
                          insertIndex
                        ),
                        hiddenField.id,
                        ...visibleFieldIds.slice(
                          insertIndex
                        )
                      ]
                    });
                  },
                  children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Menu2.ItemLabel, { children: hiddenField.label })
                },
                hiddenField.id
              );
            }) })
          ] }),
          canInsertRight && !!hiddenFields.length && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Menu2, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Menu2.SubmenuTriggerItem, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Menu2.ItemLabel, { children: (0, import_i18n12.__)("Insert right") }) }),
            /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Menu2.Popover, { children: hiddenFields.map((hiddenField) => {
              const insertIndex = isRtl ? index : index + 1;
              return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
                Menu2.Item,
                {
                  onClick: () => {
                    onChangeView({
                      ...view,
                      fields: [
                        ...visibleFieldIds.slice(
                          0,
                          insertIndex
                        ),
                        hiddenField.id,
                        ...visibleFieldIds.slice(
                          insertIndex
                        )
                      ]
                    });
                  },
                  children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Menu2.ItemLabel, { children: hiddenField.label })
                },
                hiddenField.id
              );
            }) })
          ] }),
          isHidable && field && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
            Menu2.Item,
            {
              prefix: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components4.Icon, { icon: unseen_default }),
              onClick: () => {
                onHide(field);
                onChangeView({
                  ...view,
                  fields: visibleFieldIds.filter(
                    (id) => id !== fieldId
                  )
                });
              },
              children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Menu2.ItemLabel, { children: (0, import_i18n12.__)("Hide column") })
            }
          )
        ] })
      ] }) })
    ] });
  });
  var ColumnHeaderMenu = _HeaderMenu;
  var column_header_menu_default = ColumnHeaderMenu;

  // packages/dataviews/build-module/components/dataviews-layouts/utils/item-click-wrapper.mjs
  var import_element7 = __toESM(require_element(), 1);
  var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
  function getClickableItemProps({
    item,
    isItemClickable: isItemClickable2,
    onClickItem,
    className
  }) {
    if (!isItemClickable2(item) || !onClickItem) {
      return { className };
    }
    return {
      className: className ? `${className} ${className}--clickable` : void 0,
      role: "button",
      tabIndex: 0,
      onClick: (event) => {
        event.stopPropagation();
        onClickItem(item);
      },
      onKeyDown: (event) => {
        if (event.key === "Enter" || event.key === "" || event.key === " ") {
          event.stopPropagation();
          onClickItem(item);
        }
      }
    };
  }
  function ItemClickWrapper({
    item,
    isItemClickable: isItemClickable2,
    onClickItem,
    renderItemLink,
    className,
    children,
    ...extraProps
  }) {
    if (!isItemClickable2(item)) {
      return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className, ...extraProps, children });
    }
    if (renderItemLink) {
      const renderedElement = renderItemLink({
        item,
        className: `${className} ${className}--clickable`,
        ...extraProps,
        children
      });
      return (0, import_element7.cloneElement)(renderedElement, {
        onClick: (event) => {
          event.stopPropagation();
          if (renderedElement.props.onClick) {
            renderedElement.props.onClick(event);
          }
        },
        onKeyDown: (event) => {
          if (event.key === "Enter" || event.key === "" || event.key === " ") {
            event.stopPropagation();
            if (renderedElement.props.onKeyDown) {
              renderedElement.props.onKeyDown(event);
            }
          }
        }
      });
    }
    const clickProps = getClickableItemProps({
      item,
      isItemClickable: isItemClickable2,
      onClickItem,
      className
    });
    return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ...clickProps, ...extraProps, children });
  }

  // packages/dataviews/build-module/components/dataviews-layouts/table/column-primary.mjs
  var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
  function ColumnPrimary({
    item,
    level,
    titleField,
    mediaField,
    descriptionField: descriptionField2,
    onClickItem,
    renderItemLink,
    isItemClickable: isItemClickable2
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Stack, { direction: "row", gap: "md", align: "flex-start", justify: "flex-start", children: [
      mediaField && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
        ItemClickWrapper,
        {
          item,
          isItemClickable: isItemClickable2,
          onClickItem,
          renderItemLink,
          className: "dataviews-view-table__cell-content-wrapper dataviews-column-primary__media",
          "aria-label": isItemClickable2(item) && (!!onClickItem || !!renderItemLink) && !!titleField ? titleField.getValue?.({ item }) : void 0,
          children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
            mediaField.render,
            {
              item,
              field: mediaField,
              config: { sizes: "32px" }
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
        Stack,
        {
          direction: "column",
          align: "flex-start",
          className: "dataviews-view-table__primary-column-content",
          children: [
            titleField && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
              ItemClickWrapper,
              {
                item,
                isItemClickable: isItemClickable2,
                onClickItem,
                renderItemLink,
                className: "dataviews-view-table__cell-content-wrapper dataviews-title-field",
                children: [
                  level !== void 0 && level > 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "dataviews-view-table__level", children: [
                    Array(level).fill("\u2014").join(" "),
                    "\xA0"
                  ] }),
                  /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(titleField.render, { item, field: titleField })
                ]
              }
            ),
            descriptionField2 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
              descriptionField2.render,
              {
                item,
                field: descriptionField2
              }
            )
          ]
        }
      )
    ] });
  }
  var column_primary_default = ColumnPrimary;

  // packages/dataviews/build-module/components/dataviews-layouts/table/use-is-horizontal-scroll-end.mjs
  var import_compose3 = __toESM(require_compose(), 1);
  var import_element8 = __toESM(require_element(), 1);
  var import_i18n13 = __toESM(require_i18n(), 1);
  var isScrolledToEnd = (element) => {
    if ((0, import_i18n13.isRTL)()) {
      const scrollLeft = Math.abs(element.scrollLeft);
      return scrollLeft <= 1;
    }
    return element.scrollLeft + element.clientWidth >= element.scrollWidth - 1;
  };
  function useIsHorizontalScrollEnd({
    scrollContainerRef,
    enabled = false
  }) {
    const [isHorizontalScrollEnd, setIsHorizontalScrollEnd] = (0, import_element8.useState)(false);
    const handleIsHorizontalScrollEnd = (0, import_compose3.useDebounce)(
      (0, import_element8.useCallback)(() => {
        const scrollContainer = scrollContainerRef.current;
        if (scrollContainer) {
          setIsHorizontalScrollEnd(isScrolledToEnd(scrollContainer));
        }
      }, [scrollContainerRef, setIsHorizontalScrollEnd]),
      200
    );
    (0, import_element8.useEffect)(() => {
      if (typeof window === "undefined" || !enabled || !scrollContainerRef.current) {
        return () => {
        };
      }
      handleIsHorizontalScrollEnd();
      scrollContainerRef.current.addEventListener(
        "scroll",
        handleIsHorizontalScrollEnd
      );
      window.addEventListener("resize", handleIsHorizontalScrollEnd);
      return () => {
        scrollContainerRef.current?.removeEventListener(
          "scroll",
          handleIsHorizontalScrollEnd
        );
        window.removeEventListener("resize", handleIsHorizontalScrollEnd);
      };
    }, [scrollContainerRef, enabled]);
    return isHorizontalScrollEnd;
  }

  // packages/dataviews/build-module/components/dataviews-layouts/utils/get-data-by-group.mjs
  function getDataByGroup(data, groupByField) {
    return data.reduce((groups, item) => {
      const groupName = groupByField.getValue({ item });
      if (!groups.has(groupName)) {
        groups.set(groupName, []);
      }
      groups.get(groupName)?.push(item);
      return groups;
    }, /* @__PURE__ */ new Map());
  }

  // packages/dataviews/build-module/components/dataviews-view-config/properties-section.mjs
  var import_components5 = __toESM(require_components(), 1);
  var import_i18n14 = __toESM(require_i18n(), 1);
  var import_element9 = __toESM(require_element(), 1);
  var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
  function FieldItem({
    field,
    isVisible: isVisible2,
    onToggleVisibility
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components5.__experimentalItem, { onClick: field.enableHiding ? onToggleVisibility : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Stack, { direction: "row", gap: "sm", justify: "flex-start", align: "center", children: [
      /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { style: { height: 24, width: 24 }, children: isVisible2 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components5.Icon, { icon: check_default }) }),
      /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "dataviews-view-config__label", children: field.label })
    ] }) });
  }
  function isDefined(item) {
    return !!item;
  }
  function PropertiesSection({
    showLabel = true
  }) {
    const { view, fields, onChangeView } = (0, import_element9.useContext)(dataviews_context_default);
    const regularFields = getHideableFields(view, fields);
    if (!regularFields?.length) {
      return null;
    }
    const titleField = fields.find((f2) => f2.id === view.titleField);
    const previewField = fields.find((f2) => f2.id === view.mediaField);
    const descriptionField2 = fields.find(
      (f2) => f2.id === view.descriptionField
    );
    const lockedFields = [
      {
        field: titleField,
        isVisibleFlag: "showTitle"
      },
      {
        field: previewField,
        isVisibleFlag: "showMedia"
      },
      {
        field: descriptionField2,
        isVisibleFlag: "showDescription"
      }
    ].filter(({ field }) => isDefined(field));
    const visibleFieldIds = view.fields ?? [];
    const visibleRegularFieldsCount = regularFields.filter(
      (f2) => visibleFieldIds.includes(f2.id)
    ).length;
    const visibleLockedFields = lockedFields.filter(
      ({ isVisibleFlag }) => (
        // @ts-expect-error
        view[isVisibleFlag] ?? true
      )
    );
    const totalVisibleFields = visibleLockedFields.length + visibleRegularFieldsCount;
    const isSingleVisibleLockedField = totalVisibleFields === 1 && visibleLockedFields.length === 1;
    return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Stack, { direction: "column", className: "dataviews-field-control", children: [
      showLabel && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components5.BaseControl.VisualLabel, { children: (0, import_i18n14.__)("Properties") }),
      /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
        Stack,
        {
          direction: "column",
          className: "dataviews-view-config__properties",
          children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_components5.__experimentalItemGroup, { isBordered: true, isSeparated: true, size: "medium", children: [
            lockedFields.map(({ field, isVisibleFlag }) => {
              const isVisible2 = view[isVisibleFlag] ?? true;
              const fieldToRender = isSingleVisibleLockedField && isVisible2 ? { ...field, enableHiding: false } : field;
              return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
                FieldItem,
                {
                  field: fieldToRender,
                  isVisible: isVisible2,
                  onToggleVisibility: () => {
                    onChangeView({
                      ...view,
                      [isVisibleFlag]: !isVisible2
                    });
                  }
                },
                field.id
              );
            }),
            regularFields.map((field) => {
              const isVisible2 = visibleFieldIds.includes(field.id);
              const fieldToRender = totalVisibleFields === 1 && isVisible2 ? { ...field, enableHiding: false } : field;
              return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
                FieldItem,
                {
                  field: fieldToRender,
                  isVisible: isVisible2,
                  onToggleVisibility: () => {
                    onChangeView({
                      ...view,
                      fields: isVisible2 ? visibleFieldIds.filter(
                        (fieldId) => fieldId !== field.id
                      ) : [...visibleFieldIds, field.id]
                    });
                  }
                },
                field.id
              );
            })
          ] })
        }
      )
    ] });
  }

  // packages/dataviews/build-module/hooks/use-delayed-loading.mjs
  var import_element10 = __toESM(require_element(), 1);
  function useDelayedLoading(isLoading, options = { delay: 400 }) {
    const [showLoader, setShowLoader] = (0, import_element10.useState)(false);
    (0, import_element10.useEffect)(() => {
      if (!isLoading) {
        return;
      }
      const timeout = setTimeout(() => {
        setShowLoader(true);
      }, options.delay);
      return () => {
        clearTimeout(timeout);
        setShowLoader(false);
      };
    }, [isLoading, options.delay]);
    return showLoader;
  }

  // packages/dataviews/build-module/components/dataviews-layouts/table/index.mjs
  var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
  function getEffectiveAlign(explicitAlign, fieldType) {
    if (explicitAlign) {
      return explicitAlign;
    }
    if (fieldType === "integer" || fieldType === "number") {
      return "end";
    }
    return void 0;
  }
  function TableColumnField({
    item,
    fields,
    column,
    align
  }) {
    const field = fields.find((f2) => f2.id === column);
    if (!field) {
      return null;
    }
    const className = clsx_default("dataviews-view-table__cell-content-wrapper", {
      "dataviews-view-table__cell-align-end": align === "end",
      "dataviews-view-table__cell-align-center": align === "center"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(field.render, { item, field }) });
  }
  function TableRow({
    hasBulkActions,
    item,
    level,
    actions,
    fields,
    id,
    view,
    titleField,
    mediaField,
    descriptionField: descriptionField2,
    selection,
    getItemId,
    isItemClickable: isItemClickable2,
    onClickItem,
    renderItemLink,
    onChangeSelection,
    isActionsColumnSticky,
    posinset
  }) {
    const { paginationInfo } = (0, import_element11.useContext)(dataviews_context_default);
    const hasPossibleBulkAction = useHasAPossibleBulkAction(actions, item);
    const isSelected2 = hasPossibleBulkAction && selection.includes(id);
    const {
      showTitle = true,
      showMedia = true,
      showDescription = true,
      infiniteScrollEnabled
    } = view;
    const isTouchDeviceRef = (0, import_element11.useRef)(false);
    const columns = view.fields ?? [];
    const hasPrimaryColumn = titleField && showTitle || mediaField && showMedia || descriptionField2 && showDescription;
    return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
      "tr",
      {
        className: clsx_default("dataviews-view-table__row", {
          "is-selected": hasPossibleBulkAction && isSelected2,
          "has-bulk-actions": hasPossibleBulkAction
        }),
        onTouchStart: () => {
          isTouchDeviceRef.current = true;
        },
        "aria-setsize": infiniteScrollEnabled ? paginationInfo.totalItems : void 0,
        "aria-posinset": posinset,
        role: infiniteScrollEnabled ? "article" : void 0,
        onMouseDown: (event) => {
          const isMetaClick = (0, import_keycodes.isAppleOS)() ? event.metaKey : event.ctrlKey;
          if (event.button === 0 && isMetaClick && window.navigator.userAgent.toLowerCase().includes("firefox")) {
            event?.preventDefault();
          }
        },
        onClick: (event) => {
          if (!hasPossibleBulkAction) {
            return;
          }
          const isModifierKeyPressed = (0, import_keycodes.isAppleOS)() ? event.metaKey : event.ctrlKey;
          if (isModifierKeyPressed && !isTouchDeviceRef.current && document.getSelection()?.type !== "Range") {
            onChangeSelection(
              selection.includes(id) ? selection.filter((itemId) => id !== itemId) : [...selection, id]
            );
          }
        },
        children: [
          hasBulkActions && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("td", { className: "dataviews-view-table__checkbox-column", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "dataviews-view-table__cell-content-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
            DataViewsSelectionCheckbox,
            {
              item,
              selection,
              onChangeSelection,
              getItemId,
              titleField,
              disabled: !hasPossibleBulkAction
            }
          ) }) }),
          hasPrimaryColumn && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
            column_primary_default,
            {
              item,
              level,
              titleField: showTitle ? titleField : void 0,
              mediaField: showMedia ? mediaField : void 0,
              descriptionField: showDescription ? descriptionField2 : void 0,
              isItemClickable: isItemClickable2,
              onClickItem,
              renderItemLink
            }
          ) }),
          columns.map((column) => {
            const { width, maxWidth, minWidth, align } = view.layout?.styles?.[column] ?? {};
            const field = fields.find((f2) => f2.id === column);
            const effectiveAlign = getEffectiveAlign(align, field?.type);
            return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
              "td",
              {
                style: {
                  width,
                  maxWidth,
                  minWidth
                },
                children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
                  TableColumnField,
                  {
                    fields,
                    item,
                    column,
                    align: effectiveAlign
                  }
                )
              },
              column
            );
          }),
          !!actions?.length && // Disable reason: we are not making the element interactive,
          // but preventing any click events from bubbling up to the
          // table row. This allows us to add a click handler to the row
          // itself (to toggle row selection) without erroneously
          // intercepting click events from ItemActions.
          /* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */
          /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
            "td",
            {
              className: clsx_default("dataviews-view-table__actions-column", {
                "dataviews-view-table__actions-column--sticky": true,
                "dataviews-view-table__actions-column--stuck": isActionsColumnSticky
              }),
              onClick: (e2) => e2.stopPropagation(),
              children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ItemActions, { item, actions })
            }
          )
        ]
      }
    );
  }
  function ViewTable({
    actions,
    data,
    fields,
    getItemId,
    getItemLevel,
    isLoading = false,
    onChangeView,
    onChangeSelection,
    selection,
    setOpenedFilter,
    onClickItem,
    isItemClickable: isItemClickable2,
    renderItemLink,
    view,
    className,
    empty
  }) {
    const { containerRef } = (0, import_element11.useContext)(dataviews_context_default);
    const isDelayedLoading = useDelayedLoading(isLoading);
    const headerMenuRefs = (0, import_element11.useRef)(/* @__PURE__ */ new Map());
    const headerMenuToFocusRef = (0, import_element11.useRef)(void 0);
    const [nextHeaderMenuToFocus, setNextHeaderMenuToFocus] = (0, import_element11.useState)();
    const [contextMenuAnchor, setContextMenuAnchor] = (0, import_element11.useState)(null);
    (0, import_element11.useEffect)(() => {
      if (headerMenuToFocusRef.current) {
        headerMenuToFocusRef.current.focus();
        headerMenuToFocusRef.current = void 0;
      }
    });
    const tableNoticeId = (0, import_element11.useId)();
    const isHorizontalScrollEnd = useIsHorizontalScrollEnd({
      scrollContainerRef: containerRef,
      enabled: !!actions?.length
    });
    const hasBulkActions = useSomeItemHasAPossibleBulkAction(actions, data);
    if (nextHeaderMenuToFocus) {
      headerMenuToFocusRef.current = nextHeaderMenuToFocus;
      setNextHeaderMenuToFocus(void 0);
      return;
    }
    const onHide = (field) => {
      const hidden = headerMenuRefs.current.get(field.id);
      const fallback = hidden ? headerMenuRefs.current.get(hidden.fallback) : void 0;
      setNextHeaderMenuToFocus(fallback?.node);
    };
    const handleHeaderContextMenu = (event) => {
      event.preventDefault();
      event.stopPropagation();
      const virtualAnchor = {
        getBoundingClientRect: () => ({
          x: event.clientX,
          y: event.clientY,
          top: event.clientY,
          left: event.clientX,
          right: event.clientX,
          bottom: event.clientY,
          width: 0,
          height: 0,
          toJSON: () => ({})
        })
      };
      window.requestAnimationFrame(() => {
        setContextMenuAnchor(virtualAnchor);
      });
    };
    const hasData = !!data?.length;
    const titleField = fields.find((field) => field.id === view.titleField);
    const mediaField = fields.find((field) => field.id === view.mediaField);
    const descriptionField2 = fields.find(
      (field) => field.id === view.descriptionField
    );
    const groupField = view.groupBy?.field ? fields.find((f2) => f2.id === view.groupBy?.field) : null;
    const dataByGroup = groupField ? getDataByGroup(data, groupField) : null;
    const { showTitle = true, showMedia = true, showDescription = true } = view;
    const hasPrimaryColumn = titleField && showTitle || mediaField && showMedia || descriptionField2 && showDescription;
    const columns = view.fields ?? [];
    const headerMenuRef = (column, index) => (node) => {
      if (node) {
        headerMenuRefs.current.set(column, {
          node,
          fallback: columns[index > 0 ? index - 1 : 1]
        });
      } else {
        headerMenuRefs.current.delete(column);
      }
    };
    const isInfiniteScroll = view.infiniteScrollEnabled && !dataByGroup;
    const isRtl = (0, import_i18n15.isRTL)();
    if (!hasData) {
      return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
        "div",
        {
          className: clsx_default("dataviews-no-results", {
            "is-refreshing": isDelayedLoading
          }),
          id: tableNoticeId,
          children: empty
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
        "table",
        {
          className: clsx_default("dataviews-view-table", className, {
            [`has-${view.layout?.density}-density`]: view.layout?.density && ["compact", "comfortable"].includes(
              view.layout.density
            ),
            "has-bulk-actions": hasBulkActions,
            "is-refreshing": !isInfiniteScroll && isDelayedLoading
          }),
          "aria-busy": isLoading,
          "aria-describedby": tableNoticeId,
          role: isInfiniteScroll ? "feed" : void 0,
          inert: !isInfiniteScroll && isLoading ? "true" : void 0,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("colgroup", { children: [
              hasBulkActions && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("col", { className: "dataviews-view-table__col-checkbox" }),
              hasPrimaryColumn && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("col", { className: "dataviews-view-table__col-first-data" }),
              columns.map((column, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
                "col",
                {
                  className: clsx_default(
                    `dataviews-view-table__col-${column}`,
                    {
                      "dataviews-view-table__col-first-data": !hasPrimaryColumn && index === 0
                    }
                  )
                },
                `col-${column}`
              )),
              !!actions?.length && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("col", { className: "dataviews-view-table__col-actions" })
            ] }),
            contextMenuAnchor && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
              import_components6.Popover,
              {
                anchor: contextMenuAnchor,
                onClose: () => setContextMenuAnchor(null),
                placement: "bottom-start",
                children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(PropertiesSection, { showLabel: false })
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("thead", { onContextMenu: handleHeaderContextMenu, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("tr", { className: "dataviews-view-table__row", children: [
              hasBulkActions && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
                "th",
                {
                  className: "dataviews-view-table__checkbox-column",
                  scope: "col",
                  onContextMenu: handleHeaderContextMenu,
                  children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
                    BulkSelectionCheckbox,
                    {
                      selection,
                      onChangeSelection,
                      data,
                      actions,
                      getItemId
                    }
                  )
                }
              ),
              hasPrimaryColumn && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("th", { scope: "col", children: titleField && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
                column_header_menu_default,
                {
                  ref: headerMenuRef(
                    titleField.id,
                    0
                  ),
                  fieldId: titleField.id,
                  view,
                  fields,
                  onChangeView,
                  onHide,
                  setOpenedFilter,
                  canMove: false,
                  canInsertLeft: isRtl ? view.layout?.enableMoving ?? true : false,
                  canInsertRight: isRtl ? false : view.layout?.enableMoving ?? true
                }
              ) }),
              columns.map((column, index) => {
                const { width, maxWidth, minWidth, align } = view.layout?.styles?.[column] ?? {};
                const field = fields.find(
                  (f2) => f2.id === column
                );
                const effectiveAlign = getEffectiveAlign(
                  align,
                  field?.type
                );
                const canInsertOrMove = view.layout?.enableMoving ?? true;
                return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
                  "th",
                  {
                    style: {
                      width,
                      maxWidth,
                      minWidth,
                      textAlign: effectiveAlign
                    },
                    "aria-sort": view.sort?.direction && view.sort?.field === column ? sortValues[view.sort.direction] : void 0,
                    scope: "col",
                    children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
                      column_header_menu_default,
                      {
                        ref: headerMenuRef(column, index),
                        fieldId: column,
                        view,
                        fields,
                        onChangeView,
                        onHide,
                        setOpenedFilter,
                        canMove: canInsertOrMove,
                        canInsertLeft: canInsertOrMove,
                        canInsertRight: canInsertOrMove
                      }
                    )
                  },
                  column
                );
              }),
              !!actions?.length && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
                "th",
                {
                  className: clsx_default(
                    "dataviews-view-table__actions-column",
                    {
                      "dataviews-view-table__actions-column--sticky": true,
                      "dataviews-view-table__actions-column--stuck": !isHorizontalScrollEnd
                    }
                  ),
                  children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "dataviews-view-table-header", children: (0, import_i18n15.__)("Actions") })
                }
              )
            ] }) }),
            hasData && groupField && dataByGroup ? Array.from(dataByGroup.entries()).map(
              ([groupName, groupItems]) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("tbody", { children: [
                /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("tr", { className: "dataviews-view-table__group-header-row", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
                  "td",
                  {
                    colSpan: columns.length + (hasPrimaryColumn ? 1 : 0) + (hasBulkActions ? 1 : 0) + (actions?.length ? 1 : 0),
                    className: "dataviews-view-table__group-header-cell",
                    children: view.groupBy?.showLabel === false ? groupName : (0, import_i18n15.sprintf)(
                      // translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
                      (0, import_i18n15.__)("%1$s: %2$s"),
                      groupField.label,
                      groupName
                    )
                  }
                ) }),
                groupItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
                  TableRow,
                  {
                    item,
                    level: view.showLevels && typeof getItemLevel === "function" ? getItemLevel(item) : void 0,
                    hasBulkActions,
                    actions,
                    fields,
                    id: getItemId(item) || index.toString(),
                    view,
                    titleField,
                    mediaField,
                    descriptionField: descriptionField2,
                    selection,
                    getItemId,
                    onChangeSelection,
                    onClickItem,
                    renderItemLink,
                    isItemClickable: isItemClickable2,
                    isActionsColumnSticky: !isHorizontalScrollEnd
                  },
                  getItemId(item)
                ))
              ] }, `group-${groupName}`)
            ) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("tbody", { children: hasData && data.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
              TableRow,
              {
                item,
                level: view.showLevels && typeof getItemLevel === "function" ? getItemLevel(item) : void 0,
                hasBulkActions,
                actions,
                fields,
                id: getItemId(item) || index.toString(),
                view,
                titleField,
                mediaField,
                descriptionField: descriptionField2,
                selection,
                getItemId,
                onChangeSelection,
                onClickItem,
                renderItemLink,
                isItemClickable: isItemClickable2,
                isActionsColumnSticky: !isHorizontalScrollEnd,
                posinset: isInfiniteScroll ? index + 1 : void 0
              },
              getItemId(item)
            )) })
          ]
        }
      ),
      isInfiniteScroll && isLoading && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "dataviews-loading", id: tableNoticeId, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "dataviews-loading-more", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_components6.Spinner, {}) }) })
    ] });
  }
  var table_default = ViewTable;

  // packages/dataviews/build-module/components/dataviews-layouts/grid/index.mjs
  var import_components9 = __toESM(require_components(), 1);
  var import_i18n18 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/components/dataviews-layouts/grid/composite-grid.mjs
  var import_components8 = __toESM(require_components(), 1);
  var import_i18n17 = __toESM(require_i18n(), 1);
  var import_compose4 = __toESM(require_compose(), 1);
  var import_keycodes2 = __toESM(require_keycodes(), 1);
  var import_element13 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/components/dataviews-layouts/grid/preview-size-picker.mjs
  var import_components7 = __toESM(require_components(), 1);
  var import_i18n16 = __toESM(require_i18n(), 1);
  var import_element12 = __toESM(require_element(), 1);
  var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
  var imageSizes = [
    {
      value: 120,
      breakpoint: 1
    },
    {
      value: 170,
      breakpoint: 1
    },
    {
      value: 230,
      breakpoint: 1
    },
    {
      value: 290,
      breakpoint: 1112
      // at minimum image width, 4 images display at this container size
    },
    {
      value: 350,
      breakpoint: 1636
      // at minimum image width, 6 images display at this container size
    },
    {
      value: 430,
      breakpoint: 588
      // at minimum image width, 2 images display at this container size
    }
  ];
  var DEFAULT_PREVIEW_SIZE = imageSizes[2].value;
  function useGridColumns() {
    const context = (0, import_element12.useContext)(dataviews_context_default);
    const view = context.view;
    return (0, import_element12.useMemo)(() => {
      const containerWidth = context.containerWidth;
      const gap = 32;
      const previewSize = view.layout?.previewSize ?? DEFAULT_PREVIEW_SIZE;
      const columns = Math.floor(
        (containerWidth + gap) / (previewSize + gap)
      );
      return Math.max(1, columns);
    }, [context.containerWidth, view.layout?.previewSize]);
  }

  // packages/dataviews/build-module/components/dataviews-layouts/grid/composite-grid.mjs
  var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
  var { Badge } = unlock(import_components8.privateApis);
  function chunk(array, size) {
    const chunks = [];
    for (let i2 = 0, j2 = array.length; i2 < j2; i2 += size) {
      chunks.push(array.slice(i2, i2 + size));
    }
    return chunks;
  }
  var GridItem = (0, import_element13.forwardRef)(function GridItem2({
    view,
    selection,
    onChangeSelection,
    onClickItem,
    isItemClickable: isItemClickable2,
    renderItemLink,
    getItemId,
    item,
    actions,
    mediaField,
    titleField,
    descriptionField: descriptionField2,
    regularFields,
    badgeFields,
    hasBulkActions,
    config,
    ...props
  }, ref) {
    const { showTitle = true, showMedia = true, showDescription = true } = view;
    const hasBulkAction = useHasAPossibleBulkAction(actions, item);
    const id = getItemId(item);
    const instanceId = (0, import_compose4.useInstanceId)(GridItem2);
    const isSelected2 = selection.includes(id);
    const mediaPlaceholder = /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "dataviews-view-grid__media-placeholder" });
    const rendersMediaField = showMedia && mediaField?.render;
    const renderedMediaField = rendersMediaField ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
      mediaField.render,
      {
        item,
        field: mediaField,
        config
      }
    ) : mediaPlaceholder;
    const renderedTitleField = showTitle && titleField?.render ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(titleField.render, { item, field: titleField }) : null;
    let mediaA11yProps;
    let titleA11yProps;
    if (isItemClickable2(item) && onClickItem) {
      if (renderedTitleField) {
        mediaA11yProps = {
          "aria-labelledby": `dataviews-view-grid__title-field-${instanceId}`
        };
        titleA11yProps = {
          id: `dataviews-view-grid__title-field-${instanceId}`
        };
      } else {
        mediaA11yProps = {
          "aria-label": (0, import_i18n17.__)("Navigate to item")
        };
      }
    }
    return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
      Stack,
      {
        direction: "column",
        ...props,
        ref,
        className: clsx_default(
          props.className,
          "dataviews-view-grid__row__gridcell",
          "dataviews-view-grid__card",
          {
            "is-selected": hasBulkAction && isSelected2
          }
        ),
        onClickCapture: (event) => {
          props.onClickCapture?.(event);
          if ((0, import_keycodes2.isAppleOS)() ? event.metaKey : event.ctrlKey) {
            event.stopPropagation();
            event.preventDefault();
            if (!hasBulkAction) {
              return;
            }
            onChangeSelection(
              selection.includes(id) ? selection.filter((itemId) => id !== itemId) : [...selection, id]
            );
          }
        },
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
            ItemClickWrapper,
            {
              item,
              isItemClickable: isItemClickable2,
              onClickItem,
              renderItemLink,
              className: clsx_default("dataviews-view-grid__media", {
                "dataviews-view-grid__media--placeholder": !rendersMediaField
              }),
              ...mediaA11yProps,
              children: renderedMediaField
            }
          ),
          hasBulkActions && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
            DataViewsSelectionCheckbox,
            {
              item,
              selection,
              onChangeSelection,
              getItemId,
              titleField,
              disabled: !hasBulkAction
            }
          ),
          !!actions?.length && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "dataviews-view-grid__media-actions", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ItemActions, { item, actions, isCompact: true }) }),
          showTitle && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "dataviews-view-grid__title", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
            ItemClickWrapper,
            {
              item,
              isItemClickable: isItemClickable2,
              onClickItem,
              renderItemLink,
              className: "dataviews-view-grid__title-field dataviews-title-field",
              ...titleA11yProps,
              title: titleField?.getValueFormatted({
                item,
                field: titleField
              }) || void 0,
              children: renderedTitleField
            }
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Stack, { direction: "column", gap: "xs", children: [
            showDescription && descriptionField2?.render && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
              descriptionField2.render,
              {
                item,
                field: descriptionField2
              }
            ),
            !!badgeFields?.length && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
              Stack,
              {
                direction: "row",
                className: "dataviews-view-grid__badge-fields",
                gap: "sm",
                wrap: "wrap",
                align: "top",
                justify: "flex-start",
                children: badgeFields.map((field) => {
                  return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
                    Badge,
                    {
                      className: "dataviews-view-grid__field-value",
                      children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
                        field.render,
                        {
                          item,
                          field
                        }
                      )
                    },
                    field.id
                  );
                })
              }
            ),
            !!regularFields?.length && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
              Stack,
              {
                direction: "column",
                className: "dataviews-view-grid__fields",
                gap: "xs",
                children: regularFields.map((field) => {
                  return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
                    import_components8.Flex,
                    {
                      className: "dataviews-view-grid__field",
                      gap: 1,
                      justify: "flex-start",
                      expanded: true,
                      style: { height: "auto" },
                      direction: "row",
                      children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
                        /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_components8.Tooltip, { text: field.label, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_components8.FlexItem, { className: "dataviews-view-grid__field-name", children: field.header }) }),
                        /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
                          import_components8.FlexItem,
                          {
                            className: "dataviews-view-grid__field-value",
                            style: { maxHeight: "none" },
                            children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
                              field.render,
                              {
                                item,
                                field
                              }
                            )
                          }
                        )
                      ] })
                    },
                    field.id
                  );
                })
              }
            )
          ] })
        ]
      }
    );
  });
  function CompositeGrid({
    data,
    isInfiniteScroll,
    className,
    inert,
    isLoading,
    view,
    fields,
    selection,
    onChangeSelection,
    onClickItem,
    isItemClickable: isItemClickable2,
    renderItemLink,
    getItemId,
    actions
  }) {
    const { paginationInfo, resizeObserverRef } = (0, import_element13.useContext)(dataviews_context_default);
    const gridColumns = useGridColumns();
    const hasBulkActions = useSomeItemHasAPossibleBulkAction(actions, data);
    const titleField = fields.find(
      (field) => field.id === view?.titleField
    );
    const mediaField = fields.find(
      (field) => field.id === view?.mediaField
    );
    const descriptionField2 = fields.find(
      (field) => field.id === view?.descriptionField
    );
    const otherFields = view.fields ?? [];
    const { regularFields, badgeFields } = otherFields.reduce(
      (accumulator, fieldId) => {
        const field = fields.find((f2) => f2.id === fieldId);
        if (!field) {
          return accumulator;
        }
        const key = view.layout?.badgeFields?.includes(fieldId) ? "badgeFields" : "regularFields";
        accumulator[key].push(field);
        return accumulator;
      },
      { regularFields: [], badgeFields: [] }
    );
    const size = "900px";
    const totalRows = Math.ceil(data.length / gridColumns);
    return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
      import_components8.Composite,
      {
        role: isInfiniteScroll ? "feed" : "grid",
        className: clsx_default("dataviews-view-grid", className),
        focusWrap: true,
        "aria-busy": isLoading,
        "aria-rowcount": isInfiniteScroll ? void 0 : totalRows,
        ref: resizeObserverRef,
        inert,
        children: chunk(data, gridColumns).map((row, i2) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
          import_components8.Composite.Row,
          {
            render: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
              "div",
              {
                role: "row",
                "aria-rowindex": i2 + 1,
                "aria-label": (0, import_i18n17.sprintf)(
                  /* translators: %d: The row number in the grid */
                  (0, import_i18n17.__)("Row %d"),
                  i2 + 1
                ),
                className: "dataviews-view-grid__row",
                style: {
                  gridTemplateColumns: `repeat( ${gridColumns}, minmax(0, 1fr) )`
                }
              }
            ),
            children: row.map((item, indexInRow) => {
              const index = i2 * gridColumns + indexInRow;
              return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
                import_components8.Composite.Item,
                {
                  render: (props) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
                    GridItem,
                    {
                      ...props,
                      role: isInfiniteScroll ? "article" : "gridcell",
                      "aria-setsize": isInfiniteScroll ? paginationInfo.totalItems : void 0,
                      "aria-posinset": isInfiniteScroll ? index + 1 : void 0,
                      view,
                      selection,
                      onChangeSelection,
                      onClickItem,
                      isItemClickable: isItemClickable2,
                      renderItemLink,
                      getItemId,
                      item,
                      actions,
                      mediaField,
                      titleField,
                      descriptionField: descriptionField2,
                      regularFields,
                      badgeFields,
                      hasBulkActions,
                      config: {
                        sizes: size
                      }
                    }
                  )
                },
                getItemId(item)
              );
            })
          },
          i2
        ))
      }
    );
  }

  // packages/dataviews/build-module/components/dataviews-layouts/grid/index.mjs
  var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
  function ViewGrid({
    actions,
    data,
    fields,
    getItemId,
    isLoading,
    onChangeSelection,
    onClickItem,
    isItemClickable: isItemClickable2,
    renderItemLink,
    selection,
    view,
    className,
    empty
  }) {
    const isDelayedLoading = useDelayedLoading(!!isLoading);
    const hasData = !!data?.length;
    const groupField = view.groupBy?.field ? fields.find((f2) => f2.id === view.groupBy?.field) : null;
    const dataByGroup = groupField ? getDataByGroup(data, groupField) : null;
    const isInfiniteScroll = view.infiniteScrollEnabled && !dataByGroup;
    if (!hasData) {
      return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
        "div",
        {
          className: clsx_default("dataviews-no-results", {
            "is-refreshing": isDelayedLoading
          }),
          children: empty
        }
      );
    }
    const gridProps = {
      className: clsx_default(className, {
        "is-refreshing": !isInfiniteScroll && isDelayedLoading
      }),
      inert: !isInfiniteScroll && !!isLoading ? "true" : void 0,
      isLoading,
      view,
      fields,
      selection,
      onChangeSelection,
      onClickItem,
      isItemClickable: isItemClickable2,
      renderItemLink,
      getItemId,
      actions
    };
    return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, {
      // Render multiple groups.
      children: [
        hasData && groupField && dataByGroup && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Stack, { direction: "column", gap: "lg", children: Array.from(dataByGroup.entries()).map(
          ([groupName, groupItems]) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
            Stack,
            {
              direction: "column",
              gap: "sm",
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("h3", { className: "dataviews-view-grid__group-header", children: view.groupBy?.showLabel === false ? groupName : (0, import_i18n18.sprintf)(
                  // translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
                  (0, import_i18n18.__)("%1$s: %2$s"),
                  groupField.label,
                  groupName
                ) }),
                /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
                  CompositeGrid,
                  {
                    ...gridProps,
                    data: groupItems,
                    isInfiniteScroll: false
                  }
                )
              ]
            },
            groupName
          )
        ) }),
        // Render a single grid with all data.
        !dataByGroup && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
          CompositeGrid,
          {
            ...gridProps,
            data,
            isInfiniteScroll: !!isInfiniteScroll
          }
        ),
        isInfiniteScroll && isLoading && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "dataviews-loading-more", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components9.Spinner, {}) })
      ]
    });
  }
  var grid_default = ViewGrid;

  // packages/dataviews/build-module/components/dataviews-layouts/list/index.mjs
  var import_compose5 = __toESM(require_compose(), 1);
  var import_components10 = __toESM(require_components(), 1);
  var import_element14 = __toESM(require_element(), 1);
  var import_i18n19 = __toESM(require_i18n(), 1);
  var import_data3 = __toESM(require_data(), 1);
  var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
  var { Menu: Menu3 } = unlock(import_components10.privateApis);
  function generateItemWrapperCompositeId(idPrefix) {
    return `${idPrefix}-item-wrapper`;
  }
  function generatePrimaryActionCompositeId(idPrefix, primaryActionId) {
    return `${idPrefix}-primary-action-${primaryActionId}`;
  }
  function generateDropdownTriggerCompositeId(idPrefix) {
    return `${idPrefix}-dropdown`;
  }
  function PrimaryActionGridCell({
    idPrefix,
    primaryAction,
    item
  }) {
    const registry = (0, import_data3.useRegistry)();
    const [isModalOpen, setIsModalOpen] = (0, import_element14.useState)(false);
    const compositeItemId = generatePrimaryActionCompositeId(
      idPrefix,
      primaryAction.id
    );
    const label = typeof primaryAction.label === "string" ? primaryAction.label : primaryAction.label([item]);
    return "RenderModal" in primaryAction ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { role: "gridcell", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
      import_components10.Composite.Item,
      {
        id: compositeItemId,
        render: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
          import_components10.Button,
          {
            disabled: !!primaryAction.disabled,
            accessibleWhenDisabled: true,
            text: label,
            size: "small",
            onClick: () => setIsModalOpen(true)
          }
        ),
        children: isModalOpen && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
          ActionModal,
          {
            action: primaryAction,
            items: [item],
            closeModal: () => setIsModalOpen(false)
          }
        )
      }
    ) }, primaryAction.id) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { role: "gridcell", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
      import_components10.Composite.Item,
      {
        id: compositeItemId,
        render: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
          import_components10.Button,
          {
            disabled: !!primaryAction.disabled,
            accessibleWhenDisabled: true,
            size: "small",
            onClick: () => {
              primaryAction.callback([item], { registry });
            },
            children: label
          }
        )
      }
    ) }, primaryAction.id);
  }
  function ListItem({
    view,
    actions,
    idPrefix,
    isSelected: isSelected2,
    item,
    titleField,
    mediaField,
    descriptionField: descriptionField2,
    onSelect,
    otherFields,
    onDropdownTriggerKeyDown,
    posinset
  }) {
    const {
      showTitle = true,
      showMedia = true,
      showDescription = true,
      infiniteScrollEnabled
    } = view;
    const itemRef = (0, import_element14.useRef)(null);
    const labelId = `${idPrefix}-label`;
    const descriptionId = `${idPrefix}-description`;
    const registry = (0, import_data3.useRegistry)();
    const [isHovered, setIsHovered] = (0, import_element14.useState)(false);
    const [activeModalAction, setActiveModalAction] = (0, import_element14.useState)(
      null
    );
    const handleHover = ({ type }) => {
      const isHover = type === "mouseenter";
      setIsHovered(isHover);
    };
    const { paginationInfo } = (0, import_element14.useContext)(dataviews_context_default);
    (0, import_element14.useEffect)(() => {
      if (isSelected2) {
        itemRef.current?.scrollIntoView({
          behavior: "auto",
          block: "nearest",
          inline: "nearest"
        });
      }
    }, [isSelected2]);
    const { primaryAction, eligibleActions } = (0, import_element14.useMemo)(() => {
      const _eligibleActions = actions.filter(
        (action) => !action.isEligible || action.isEligible(item)
      );
      const _primaryActions = _eligibleActions.filter(
        (action) => action.isPrimary
      );
      return {
        primaryAction: _primaryActions[0],
        eligibleActions: _eligibleActions
      };
    }, [actions, item]);
    const hasOnlyOnePrimaryAction = primaryAction && actions.length === 1;
    const renderedMediaField = showMedia && mediaField?.render ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "dataviews-view-list__media-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
      mediaField.render,
      {
        item,
        field: mediaField,
        config: { sizes: "52px" }
      }
    ) }) : null;
    const renderedTitleField = showTitle && titleField?.render ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(titleField.render, { item, field: titleField }) : null;
    const usedActions = eligibleActions?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
      Stack,
      {
        direction: "row",
        gap: "md",
        className: "dataviews-view-list__item-actions",
        children: [
          primaryAction && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
            PrimaryActionGridCell,
            {
              idPrefix,
              primaryAction,
              item
            }
          ),
          !hasOnlyOnePrimaryAction && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { role: "gridcell", children: [
            /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Menu3, { placement: "bottom-end", children: [
              /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
                Menu3.TriggerButton,
                {
                  render: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
                    import_components10.Composite.Item,
                    {
                      id: generateDropdownTriggerCompositeId(
                        idPrefix
                      ),
                      render: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
                        import_components10.Button,
                        {
                          size: "small",
                          icon: more_vertical_default,
                          label: (0, import_i18n19.__)("Actions"),
                          accessibleWhenDisabled: true,
                          disabled: !actions.length,
                          onKeyDown: onDropdownTriggerKeyDown
                        }
                      )
                    }
                  )
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Menu3.Popover, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
                ActionsMenuGroup,
                {
                  actions: eligibleActions,
                  item,
                  registry,
                  setActiveModalAction
                }
              ) })
            ] }),
            !!activeModalAction && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
              ActionModal,
              {
                action: activeModalAction,
                items: [item],
                closeModal: () => setActiveModalAction(null)
              }
            )
          ] })
        ]
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
      import_components10.Composite.Row,
      {
        ref: itemRef,
        render: (
          /* aria-posinset breaks Composite.Row if passed to it directly. */
          /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
            "div",
            {
              "aria-posinset": posinset,
              "aria-setsize": infiniteScrollEnabled ? paginationInfo.totalItems : void 0
            }
          )
        ),
        role: infiniteScrollEnabled ? "article" : "row",
        className: clsx_default({
          "is-selected": isSelected2,
          "is-hovered": isHovered
        }),
        onMouseEnter: handleHover,
        onMouseLeave: handleHover,
        children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
          Stack,
          {
            direction: "row",
            className: "dataviews-view-list__item-wrapper",
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { role: "gridcell", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
                import_components10.Composite.Item,
                {
                  id: generateItemWrapperCompositeId(idPrefix),
                  "aria-pressed": isSelected2,
                  "aria-labelledby": labelId,
                  "aria-describedby": descriptionId,
                  className: "dataviews-view-list__item",
                  onClick: () => onSelect(item)
                }
              ) }),
              /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
                Stack,
                {
                  direction: "row",
                  gap: "md",
                  justify: "start",
                  align: "flex-start",
                  style: { flex: 1, minWidth: 0 },
                  children: [
                    renderedMediaField,
                    /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
                      Stack,
                      {
                        direction: "column",
                        gap: "xs",
                        className: "dataviews-view-list__field-wrapper",
                        children: [
                          /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Stack, { direction: "row", align: "center", children: [
                            /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
                              "div",
                              {
                                className: "dataviews-title-field dataviews-view-list__title-field",
                                id: labelId,
                                children: renderedTitleField
                              }
                            ),
                            usedActions
                          ] }),
                          showDescription && descriptionField2?.render && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "dataviews-view-list__field", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
                            descriptionField2.render,
                            {
                              item,
                              field: descriptionField2
                            }
                          ) }),
                          /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
                            "div",
                            {
                              className: "dataviews-view-list__fields",
                              id: descriptionId,
                              children: otherFields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
                                "div",
                                {
                                  className: "dataviews-view-list__field",
                                  children: [
                                    /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
                                      import_components10.VisuallyHidden,
                                      {
                                        as: "span",
                                        className: "dataviews-view-list__field-label",
                                        children: field.label
                                      }
                                    ),
                                    /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "dataviews-view-list__field-value", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
                                      field.render,
                                      {
                                        item,
                                        field
                                      }
                                    ) })
                                  ]
                                },
                                field.id
                              ))
                            }
                          )
                        ]
                      }
                    )
                  ]
                }
              )
            ]
          }
        )
      }
    );
  }
  function isDefined2(item) {
    return !!item;
  }
  function ViewList(props) {
    const {
      actions,
      data,
      fields,
      getItemId,
      isLoading,
      onChangeSelection,
      selection,
      view,
      className,
      empty
    } = props;
    const baseId = (0, import_compose5.useInstanceId)(ViewList, "view-list");
    const isDelayedLoading = useDelayedLoading(!!isLoading);
    const selectedItem = data?.findLast(
      (item) => selection.includes(getItemId(item))
    );
    const titleField = fields.find((field) => field.id === view.titleField);
    const mediaField = fields.find((field) => field.id === view.mediaField);
    const descriptionField2 = fields.find(
      (field) => field.id === view.descriptionField
    );
    const otherFields = (view?.fields ?? []).map((fieldId) => fields.find((f2) => fieldId === f2.id)).filter(isDefined2);
    const onSelect = (item) => onChangeSelection([getItemId(item)]);
    const generateCompositeItemIdPrefix = (0, import_element14.useCallback)(
      (item) => `${baseId}-${getItemId(item)}`,
      [baseId, getItemId]
    );
    const isActiveCompositeItem = (0, import_element14.useCallback)(
      (item, idToCheck) => {
        return idToCheck.startsWith(
          generateCompositeItemIdPrefix(item)
        );
      },
      [generateCompositeItemIdPrefix]
    );
    const [activeCompositeId, setActiveCompositeId] = (0, import_element14.useState)(void 0);
    (0, import_element14.useEffect)(() => {
      if (selectedItem) {
        setActiveCompositeId(
          generateItemWrapperCompositeId(
            generateCompositeItemIdPrefix(selectedItem)
          )
        );
      }
    }, [selectedItem, generateCompositeItemIdPrefix]);
    const activeItemIndex = data.findIndex(
      (item) => isActiveCompositeItem(item, activeCompositeId ?? "")
    );
    const previousActiveItemIndex = (0, import_compose5.usePrevious)(activeItemIndex);
    const isActiveIdInList = activeItemIndex !== -1;
    const selectCompositeItem = (0, import_element14.useCallback)(
      (targetIndex, generateCompositeId) => {
        const clampedIndex = Math.min(
          data.length - 1,
          Math.max(0, targetIndex)
        );
        if (!data[clampedIndex]) {
          return;
        }
        const itemIdPrefix = generateCompositeItemIdPrefix(
          data[clampedIndex]
        );
        const targetCompositeItemId = generateCompositeId(itemIdPrefix);
        setActiveCompositeId(targetCompositeItemId);
        document.getElementById(targetCompositeItemId)?.focus();
      },
      [data, generateCompositeItemIdPrefix]
    );
    (0, import_element14.useEffect)(() => {
      const wasActiveIdInList = previousActiveItemIndex !== void 0 && previousActiveItemIndex !== -1;
      if (!isActiveIdInList && wasActiveIdInList) {
        selectCompositeItem(
          previousActiveItemIndex,
          generateItemWrapperCompositeId
        );
      }
    }, [isActiveIdInList, selectCompositeItem, previousActiveItemIndex]);
    const onDropdownTriggerKeyDown = (0, import_element14.useCallback)(
      (event) => {
        if (event.key === "ArrowDown") {
          event.preventDefault();
          selectCompositeItem(
            activeItemIndex + 1,
            generateDropdownTriggerCompositeId
          );
        }
        if (event.key === "ArrowUp") {
          event.preventDefault();
          selectCompositeItem(
            activeItemIndex - 1,
            generateDropdownTriggerCompositeId
          );
        }
      },
      [selectCompositeItem, activeItemIndex]
    );
    const hasData = !!data?.length;
    const groupField = view.groupBy?.field ? fields.find((field) => field.id === view.groupBy?.field) : null;
    const dataByGroup = hasData && groupField ? getDataByGroup(data, groupField) : null;
    const isInfiniteScroll = view.infiniteScrollEnabled && !dataByGroup;
    if (!hasData) {
      return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
        "div",
        {
          className: clsx_default("dataviews-no-results", {
            "is-refreshing": isDelayedLoading
          }),
          children: empty
        }
      );
    }
    if (hasData && groupField && dataByGroup) {
      return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
        import_components10.Composite,
        {
          id: `${baseId}`,
          render: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", {}),
          className: "dataviews-view-list__group",
          role: "grid",
          activeId: activeCompositeId,
          setActiveId: setActiveCompositeId,
          children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
            Stack,
            {
              direction: "column",
              gap: "lg",
              className: clsx_default("dataviews-view-list", className),
              children: Array.from(dataByGroup.entries()).map(
                ([groupName, groupItems]) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
                  Stack,
                  {
                    direction: "column",
                    gap: "sm",
                    children: [
                      /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("h3", { className: "dataviews-view-list__group-header", children: view.groupBy?.showLabel === false ? groupName : (0, import_i18n19.sprintf)(
                        // translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
                        (0, import_i18n19.__)("%1$s: %2$s"),
                        groupField.label,
                        groupName
                      ) }),
                      groupItems.map((item) => {
                        const id = generateCompositeItemIdPrefix(item);
                        return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
                          ListItem,
                          {
                            view,
                            idPrefix: id,
                            actions,
                            item,
                            isSelected: item === selectedItem,
                            onSelect,
                            mediaField,
                            titleField,
                            descriptionField: descriptionField2,
                            otherFields,
                            onDropdownTriggerKeyDown
                          },
                          id
                        );
                      })
                    ]
                  },
                  groupName
                )
              )
            }
          )
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
        import_components10.Composite,
        {
          id: baseId,
          render: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", {}),
          className: clsx_default("dataviews-view-list", className, {
            [`has-${view.layout?.density}-density`]: view.layout?.density && ["compact", "comfortable"].includes(
              view.layout.density
            ),
            "is-refreshing": !isInfiniteScroll && isDelayedLoading
          }),
          role: view.infiniteScrollEnabled ? "feed" : "grid",
          activeId: activeCompositeId,
          setActiveId: setActiveCompositeId,
          inert: !isInfiniteScroll && !!isLoading ? "true" : void 0,
          children: data.map((item, index) => {
            const id = generateCompositeItemIdPrefix(item);
            return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
              ListItem,
              {
                view,
                idPrefix: id,
                actions,
                item,
                isSelected: item === selectedItem,
                onSelect,
                mediaField,
                titleField,
                descriptionField: descriptionField2,
                otherFields,
                onDropdownTriggerKeyDown,
                posinset: view.infiniteScrollEnabled ? index + 1 : void 0
              },
              id
            );
          })
        }
      ),
      isInfiniteScroll && isLoading && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "dataviews-loading-more", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components10.Spinner, {}) })
    ] });
  }

  // packages/dataviews/build-module/components/dataviews-layouts/activity/index.mjs
  var import_components12 = __toESM(require_components(), 1);

  // packages/dataviews/build-module/components/dataviews-layouts/activity/activity-group.mjs
  var import_i18n20 = __toESM(require_i18n(), 1);
  var import_element15 = __toESM(require_element(), 1);
  var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
  function ActivityGroup({
    groupName,
    groupData,
    groupField,
    showLabel = true,
    children
  }) {
    const groupHeader = showLabel ? (0, import_element15.createInterpolateElement)(
      // translators: %s: The label of the field e.g. "Status".
      (0, import_i18n20.sprintf)((0, import_i18n20.__)("%s: <groupName />"), groupField.label).trim(),
      {
        groupName: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
          groupField.render,
          {
            item: groupData[0],
            field: groupField
          }
        )
      }
    ) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(groupField.render, { item: groupData[0], field: groupField });
    return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
      Stack,
      {
        direction: "column",
        className: "dataviews-view-activity__group",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h3", { className: "dataviews-view-activity__group-header", children: groupHeader }),
          children
        ]
      },
      groupName
    );
  }

  // packages/dataviews/build-module/components/dataviews-layouts/activity/activity-item.mjs
  var import_components11 = __toESM(require_components(), 1);
  var import_element16 = __toESM(require_element(), 1);
  var import_data4 = __toESM(require_data(), 1);
  var import_compose6 = __toESM(require_compose(), 1);
  var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
  function ActivityItem(props) {
    const {
      view,
      actions,
      item,
      titleField,
      mediaField,
      descriptionField: descriptionField2,
      otherFields,
      posinset,
      onClickItem,
      renderItemLink,
      isItemClickable: isItemClickable2
    } = props;
    const {
      showTitle = true,
      showMedia = true,
      showDescription = true,
      infiniteScrollEnabled
    } = view;
    const itemRef = (0, import_element16.useRef)(null);
    const registry = (0, import_data4.useRegistry)();
    const { paginationInfo } = (0, import_element16.useContext)(dataviews_context_default);
    const { primaryActions, eligibleActions } = (0, import_element16.useMemo)(() => {
      const _eligibleActions = actions.filter(
        (action) => !action.isEligible || action.isEligible(item)
      );
      const _primaryActions = _eligibleActions.filter(
        (action) => action.isPrimary
      );
      return {
        primaryActions: _primaryActions,
        eligibleActions: _eligibleActions
      };
    }, [actions, item]);
    const isMobileViewport = (0, import_compose6.useViewportMatch)("medium", "<");
    const density = view.layout?.density ?? "balanced";
    const mediaContent = showMedia && density !== "compact" && mediaField?.render ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
      mediaField.render,
      {
        item,
        field: mediaField,
        config: {
          sizes: density === "comfortable" ? "32px" : "24px"
        }
      }
    ) : null;
    const renderedMediaField = /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "dataviews-view-activity__item-type-icon", children: mediaContent || /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
      "span",
      {
        className: "dataviews-view-activity__item-bullet",
        "aria-hidden": "true"
      }
    ) });
    const renderedTitleField = showTitle && titleField?.render ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(titleField.render, { item, field: titleField }) : null;
    const verticalGap = (0, import_element16.useMemo)(() => {
      switch (density) {
        case "comfortable":
          return "md";
        default:
          return "sm";
      }
    }, [density]);
    return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
      "div",
      {
        ref: itemRef,
        role: infiniteScrollEnabled ? "article" : void 0,
        "aria-posinset": posinset,
        "aria-setsize": infiniteScrollEnabled ? paginationInfo.totalItems : void 0,
        className: clsx_default(
          "dataviews-view-activity__item",
          density === "compact" && "is-compact",
          density === "balanced" && "is-balanced",
          density === "comfortable" && "is-comfortable"
        ),
        children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Stack, { direction: "row", gap: "lg", justify: "start", align: "flex-start", children: [
          /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
            Stack,
            {
              direction: "column",
              gap: "xs",
              align: "center",
              className: "dataviews-view-activity__item-type",
              children: renderedMediaField
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
            Stack,
            {
              direction: "column",
              gap: verticalGap,
              align: "flex-start",
              className: "dataviews-view-activity__item-content",
              children: [
                renderedTitleField && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
                  ItemClickWrapper,
                  {
                    item,
                    isItemClickable: isItemClickable2,
                    onClickItem,
                    renderItemLink,
                    className: "dataviews-view-activity__item-title",
                    children: renderedTitleField
                  }
                ),
                showDescription && descriptionField2 && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "dataviews-view-activity__item-description", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
                  descriptionField2.render,
                  {
                    item,
                    field: descriptionField2
                  }
                ) }),
                /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "dataviews-view-activity__item-fields", children: otherFields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
                  "div",
                  {
                    className: "dataviews-view-activity__item-field",
                    children: [
                      /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
                        import_components11.VisuallyHidden,
                        {
                          as: "span",
                          className: "dataviews-view-activity__item-field-label",
                          children: field.label
                        }
                      ),
                      /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "dataviews-view-activity__item-field-value", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
                        field.render,
                        {
                          item,
                          field
                        }
                      ) })
                    ]
                  },
                  field.id
                )) }),
                !!primaryActions?.length && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
                  PrimaryActions,
                  {
                    item,
                    actions: primaryActions,
                    registry,
                    buttonVariant: "secondary"
                  }
                )
              ]
            }
          ),
          (primaryActions.length < eligibleActions.length || // Since we hide primary actions on mobile, we need to show the menu
          // there if there are any actions at all.
          isMobileViewport && // At the same time, only show the menu if there are actions to show.
          eligibleActions.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "dataviews-view-activity__item-actions", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
            ItemActions,
            {
              item,
              actions: eligibleActions,
              isCompact: true
            }
          ) })
        ] })
      }
    );
  }
  var activity_item_default = ActivityItem;

  // packages/dataviews/build-module/components/dataviews-layouts/activity/activity-items.mjs
  var import_react3 = __toESM(require_react(), 1);
  function isDefined3(item) {
    return !!item;
  }
  function ActivityItems(props) {
    const { data, fields, getItemId, view } = props;
    const titleField = fields.find((field) => field.id === view.titleField);
    const mediaField = fields.find((field) => field.id === view.mediaField);
    const descriptionField2 = fields.find(
      (field) => field.id === view.descriptionField
    );
    const otherFields = (view?.fields ?? []).map((fieldId) => fields.find((f2) => fieldId === f2.id)).filter(isDefined3);
    return data.map((item, index) => {
      return /* @__PURE__ */ (0, import_react3.createElement)(
        activity_item_default,
        {
          ...props,
          key: getItemId(item),
          item,
          mediaField,
          titleField,
          descriptionField: descriptionField2,
          otherFields,
          posinset: view.infiniteScrollEnabled ? index + 1 : void 0
        }
      );
    });
  }

  // packages/dataviews/build-module/components/dataviews-layouts/activity/index.mjs
  var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
  function ViewActivity(props) {
    const { empty, data, fields, isLoading, view, className } = props;
    const isDelayedLoading = useDelayedLoading(!!isLoading);
    const hasData = !!data?.length;
    const groupField = view.groupBy?.field ? fields.find((field) => field.id === view.groupBy?.field) : null;
    const dataByGroup = hasData && groupField ? getDataByGroup(data, groupField) : null;
    const isInfiniteScroll = view.infiniteScrollEnabled && !dataByGroup;
    if (!hasData) {
      return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
        "div",
        {
          className: clsx_default("dataviews-no-results", {
            "is-refreshing": isDelayedLoading
          }),
          children: empty
        }
      );
    }
    const isInert = !isInfiniteScroll && !!isLoading;
    const wrapperClassName = clsx_default("dataviews-view-activity", className, {
      "is-refreshing": !isInfiniteScroll && isDelayedLoading
    });
    const groupedEntries = dataByGroup ? Array.from(dataByGroup.entries()) : [];
    if (hasData && groupField && dataByGroup) {
      return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
        Stack,
        {
          direction: "column",
          gap: "sm",
          className: wrapperClassName,
          inert: isInert ? "true" : void 0,
          children: groupedEntries.map(
            ([groupName, groupData]) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
              ActivityGroup,
              {
                groupName,
                groupData,
                groupField,
                showLabel: view.groupBy?.showLabel !== false,
                children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
                  ActivityItems,
                  {
                    ...props,
                    data: groupData
                  }
                )
              },
              groupName
            )
          )
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
        "div",
        {
          className: wrapperClassName,
          role: view.infiniteScrollEnabled ? "feed" : void 0,
          inert: isInert ? "true" : void 0,
          children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ActivityItems, { ...props })
        }
      ),
      isInfiniteScroll && isLoading && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "dataviews-loading-more", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components12.Spinner, {}) })
    ] });
  }

  // packages/dataviews/build-module/components/dataviews-layouts/picker-grid/index.mjs
  var import_components15 = __toESM(require_components(), 1);
  var import_i18n23 = __toESM(require_i18n(), 1);
  var import_compose7 = __toESM(require_compose(), 1);
  var import_element20 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/components/dataviews-picker-footer/index.mjs
  var import_components14 = __toESM(require_components(), 1);
  var import_data5 = __toESM(require_data(), 1);
  var import_element18 = __toESM(require_element(), 1);
  var import_i18n22 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/components/dataviews-pagination/index.mjs
  var import_components13 = __toESM(require_components(), 1);
  var import_element17 = __toESM(require_element(), 1);
  var import_i18n21 = __toESM(require_i18n(), 1);
  var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
  function DataViewsPagination() {
    const {
      view,
      onChangeView,
      paginationInfo: { totalItems = 0, totalPages }
    } = (0, import_element17.useContext)(dataviews_context_default);
    if (!totalItems || !totalPages || view.infiniteScrollEnabled) {
      return null;
    }
    const currentPage = view.page ?? 1;
    const pageSelectOptions = Array.from(Array(totalPages)).map(
      (_, i2) => {
        const page = i2 + 1;
        return {
          value: page.toString(),
          label: page.toString(),
          "aria-label": currentPage === page ? (0, import_i18n21.sprintf)(
            // translators: 1: current page number. 2: total number of pages.
            (0, import_i18n21.__)("Page %1$d of %2$d"),
            currentPage,
            totalPages
          ) : page.toString()
        };
      }
    );
    return !!totalItems && totalPages !== 1 && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
      Stack,
      {
        direction: "row",
        className: "dataviews-pagination",
        justify: "end",
        align: "center",
        gap: "xl",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
            Stack,
            {
              direction: "row",
              justify: "flex-start",
              align: "center",
              gap: "xs",
              className: "dataviews-pagination__page-select",
              children: (0, import_element17.createInterpolateElement)(
                (0, import_i18n21.sprintf)(
                  // translators: 1: Current page number, 2: Total number of pages.
                  (0, import_i18n21._x)(
                    "<div>Page</div>%1$s<div>of %2$d</div>",
                    "paging"
                  ),
                  "<CurrentPage />",
                  totalPages
                ),
                {
                  div: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { "aria-hidden": true }),
                  CurrentPage: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
                    import_components13.SelectControl,
                    {
                      "aria-label": (0, import_i18n21.__)("Current page"),
                      value: currentPage.toString(),
                      options: pageSelectOptions,
                      onChange: (newValue) => {
                        onChangeView({
                          ...view,
                          page: +newValue
                        });
                      },
                      size: "small",
                      variant: "minimal"
                    }
                  )
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Stack, { direction: "row", gap: "xs", align: "center", children: [
            /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
              import_components13.Button,
              {
                onClick: () => onChangeView({
                  ...view,
                  page: currentPage - 1
                }),
                disabled: currentPage === 1,
                accessibleWhenDisabled: true,
                label: (0, import_i18n21.__)("Previous page"),
                icon: (0, import_i18n21.isRTL)() ? next_default : previous_default,
                showTooltip: true,
                size: "compact",
                tooltipPosition: "top"
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
              import_components13.Button,
              {
                onClick: () => onChangeView({ ...view, page: currentPage + 1 }),
                disabled: currentPage >= totalPages,
                accessibleWhenDisabled: true,
                label: (0, import_i18n21.__)("Next page"),
                icon: (0, import_i18n21.isRTL)() ? previous_default : next_default,
                showTooltip: true,
                size: "compact",
                tooltipPosition: "top"
              }
            )
          ] })
        ]
      }
    );
  }
  var dataviews_pagination_default = (0, import_element17.memo)(DataViewsPagination);

  // packages/dataviews/build-module/components/dataviews-picker-footer/index.mjs
  var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_ARRAY2 = [];
  function useIsMultiselectPicker(actions) {
    return (0, import_element18.useMemo)(() => {
      return actions?.every((action) => action.supportsBulk);
    }, [actions]);
  }
  function BulkSelectionCheckbox2({
    selection,
    selectedItems,
    onChangeSelection,
    data,
    getItemId
  }) {
    const areAllSelected = selectedItems.length === data.length;
    return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
      import_components14.CheckboxControl,
      {
        className: "dataviews-view-table-selection-checkbox",
        checked: areAllSelected,
        indeterminate: !areAllSelected && !!selectedItems.length,
        onChange: () => {
          if (areAllSelected) {
            onChangeSelection(
              selection.filter(
                (id) => !data.some(
                  (item) => id === getItemId(item)
                )
              )
            );
          } else {
            const selectionSet = /* @__PURE__ */ new Set([
              ...selection,
              ...data.map((item) => getItemId(item))
            ]);
            onChangeSelection(Array.from(selectionSet));
          }
        },
        "aria-label": areAllSelected ? (0, import_i18n22.__)("Deselect all") : (0, import_i18n22.__)("Select all")
      }
    );
  }
  function ActionButtons({
    actions,
    items,
    selection
  }) {
    const registry = (0, import_data5.useRegistry)();
    const [actionInProgress, setActionInProgress] = (0, import_element18.useState)(
      null
    );
    return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Stack, { direction: "row", gap: "xs", children: actions.map((action) => {
      if (!("callback" in action)) {
        return null;
      }
      const { id, label, icon, isPrimary, callback } = action;
      const _label = typeof label === "string" ? label : label(items);
      const variant = isPrimary ? "primary" : "tertiary";
      const isInProgress = id === actionInProgress;
      return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
        import_components14.Button,
        {
          accessibleWhenDisabled: true,
          icon,
          disabled: isInProgress || !selection?.length,
          isBusy: isInProgress,
          onClick: async () => {
            setActionInProgress(id);
            await callback(items, {
              registry
            });
            setActionInProgress(null);
          },
          size: "compact",
          variant,
          children: _label
        },
        id
      );
    }) });
  }
  function DataViewsPickerFooter() {
    const {
      data,
      selection,
      onChangeSelection,
      getItemId,
      actions = EMPTY_ARRAY2,
      paginationInfo
    } = (0, import_element18.useContext)(dataviews_context_default);
    const isMultiselect = useIsMultiselectPicker(actions);
    const message2 = getFooterMessage(
      selection.length,
      data.length,
      paginationInfo.totalItems
    );
    const selectedItems = (0, import_element18.useMemo)(
      () => data.filter((item) => selection.includes(getItemId(item))),
      [selection, getItemId, data]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
      Stack,
      {
        direction: "row",
        justify: "space-between",
        align: "center",
        className: "dataviews-footer",
        gap: "sm",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
            Stack,
            {
              direction: "row",
              className: "dataviews-picker-footer__bulk-selection",
              gap: "md",
              align: "center",
              children: [
                isMultiselect && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
                  BulkSelectionCheckbox2,
                  {
                    selection,
                    selectedItems,
                    onChangeSelection,
                    data,
                    getItemId
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "dataviews-bulk-actions-footer__item-count", children: message2 })
              ]
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(dataviews_pagination_default, {}),
          Boolean(actions?.length) && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "dataviews-picker-footer__actions", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
            ActionButtons,
            {
              actions,
              items: selectedItems,
              selection
            }
          ) })
        ]
      }
    );
  }

  // packages/dataviews/build-module/components/dataviews-layouts/utils/grid-items.mjs
  var import_element19 = __toESM(require_element(), 1);
  var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
  var GridItems = (0, import_element19.forwardRef)(({ className, previewSize, ...props }, ref) => {
    return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
      "div",
      {
        ref,
        className: clsx_default("dataviews-view-grid-items", className),
        style: {
          gridTemplateColumns: previewSize && `repeat(auto-fill, minmax(${previewSize}px, 1fr))`
        },
        ...props
      }
    );
  });

  // packages/dataviews/build-module/components/dataviews-layouts/picker-grid/index.mjs
  var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
  var { Badge: Badge2 } = unlock(import_components15.privateApis);
  function GridItem3({
    view,
    multiselect,
    selection,
    onChangeSelection,
    getItemId,
    item,
    mediaField,
    titleField,
    descriptionField: descriptionField2,
    regularFields,
    badgeFields,
    config,
    posinset,
    setsize
  }) {
    const { showTitle = true, showMedia = true, showDescription = true } = view;
    const id = getItemId(item);
    const isSelected2 = selection.includes(id);
    const renderedMediaField = mediaField?.render ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
      mediaField.render,
      {
        item,
        field: mediaField,
        config
      }
    ) : null;
    const renderedTitleField = showTitle && titleField?.render ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(titleField.render, { item, field: titleField }) : null;
    return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
      import_components15.Composite.Item,
      {
        "aria-label": titleField ? titleField.getValue({ item }) || (0, import_i18n23.__)("(no title)") : void 0,
        render: ({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Stack, { direction: "column", children, ...props }),
        role: "option",
        "aria-posinset": posinset,
        "aria-setsize": setsize,
        className: clsx_default("dataviews-view-picker-grid__card", {
          "is-selected": isSelected2
        }),
        "aria-selected": isSelected2,
        onClick: () => {
          if (isSelected2) {
            onChangeSelection(
              selection.filter((itemId) => id !== itemId)
            );
          } else {
            const newSelection = multiselect ? [...selection, id] : [id];
            onChangeSelection(newSelection);
          }
        },
        children: [
          showMedia && renderedMediaField && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "dataviews-view-picker-grid__media", children: renderedMediaField }),
          showMedia && renderedMediaField && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
            DataViewsSelectionCheckbox,
            {
              item,
              selection,
              onChangeSelection,
              getItemId,
              titleField,
              disabled: false,
              "aria-hidden": true,
              tabIndex: -1
            }
          ),
          showTitle && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
            Stack,
            {
              direction: "row",
              justify: "space-between",
              className: "dataviews-view-picker-grid__title-actions",
              children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "dataviews-view-picker-grid__title-field dataviews-title-field", children: renderedTitleField })
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Stack, { direction: "column", gap: "xs", children: [
            showDescription && descriptionField2?.render && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
              descriptionField2.render,
              {
                item,
                field: descriptionField2
              }
            ),
            !!badgeFields?.length && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
              Stack,
              {
                direction: "row",
                className: "dataviews-view-picker-grid__badge-fields",
                gap: "sm",
                wrap: "wrap",
                align: "top",
                justify: "flex-start",
                children: badgeFields.map((field) => {
                  return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
                    Badge2,
                    {
                      className: "dataviews-view-picker-grid__field-value",
                      children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
                        field.render,
                        {
                          item,
                          field
                        }
                      )
                    },
                    field.id
                  );
                })
              }
            ),
            !!regularFields?.length && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
              Stack,
              {
                direction: "column",
                className: "dataviews-view-picker-grid__fields",
                gap: "xs",
                children: regularFields.map((field) => {
                  return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
                    import_components15.Flex,
                    {
                      className: "dataviews-view-picker-grid__field",
                      gap: 1,
                      justify: "flex-start",
                      expanded: true,
                      style: { height: "auto" },
                      direction: "row",
                      children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
                        /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_components15.FlexItem, { className: "dataviews-view-picker-grid__field-name", children: field.header }),
                        /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
                          import_components15.FlexItem,
                          {
                            className: "dataviews-view-picker-grid__field-value",
                            style: { maxHeight: "none" },
                            children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
                              field.render,
                              {
                                item,
                                field
                              }
                            )
                          }
                        )
                      ] })
                    },
                    field.id
                  );
                })
              }
            )
          ] })
        ]
      },
      id
    );
  }
  function GridGroup({
    groupName,
    groupField,
    showLabel = true,
    children
  }) {
    const headerId = (0, import_compose7.useInstanceId)(
      GridGroup,
      "dataviews-view-picker-grid-group__header"
    );
    return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
      Stack,
      {
        direction: "column",
        gap: "sm",
        role: "group",
        "aria-labelledby": headerId,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
            "h3",
            {
              className: "dataviews-view-picker-grid-group__header",
              id: headerId,
              children: showLabel ? (0, import_i18n23.sprintf)(
                // translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
                (0, import_i18n23.__)("%1$s: %2$s"),
                groupField.label,
                groupName
              ) : groupName
            }
          ),
          children
        ]
      },
      groupName
    );
  }
  function ViewPickerGrid({
    actions,
    data,
    fields,
    getItemId,
    isLoading,
    onChangeSelection,
    selection,
    view,
    className,
    empty
  }) {
    const { resizeObserverRef, paginationInfo, itemListLabel } = (0, import_element20.useContext)(dataviews_context_default);
    const titleField = fields.find(
      (field) => field.id === view?.titleField
    );
    const mediaField = fields.find(
      (field) => field.id === view?.mediaField
    );
    const descriptionField2 = fields.find(
      (field) => field.id === view?.descriptionField
    );
    const otherFields = view.fields ?? [];
    const { regularFields, badgeFields } = otherFields.reduce(
      (accumulator, fieldId) => {
        const field = fields.find((f2) => f2.id === fieldId);
        if (!field) {
          return accumulator;
        }
        const key = view.layout?.badgeFields?.includes(fieldId) ? "badgeFields" : "regularFields";
        accumulator[key].push(field);
        return accumulator;
      },
      { regularFields: [], badgeFields: [] }
    );
    const hasData = !!data?.length;
    const usedPreviewSize = view.layout?.previewSize;
    const isMultiselect = useIsMultiselectPicker(actions);
    const size = "900px";
    const groupField = view.groupBy?.field ? fields.find((f2) => f2.id === view.groupBy?.field) : null;
    const dataByGroup = groupField ? getDataByGroup(data, groupField) : null;
    const isInfiniteScroll = view.infiniteScrollEnabled && !dataByGroup;
    const currentPage = view?.page ?? 1;
    const perPage = view?.perPage ?? 0;
    const setSize = isInfiniteScroll ? paginationInfo?.totalItems : void 0;
    return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, {
      // Render multiple groups.
      children: [
        hasData && groupField && dataByGroup && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
          import_components15.Composite,
          {
            virtualFocus: true,
            orientation: "horizontal",
            role: "listbox",
            "aria-multiselectable": isMultiselect,
            className: clsx_default(
              "dataviews-view-picker-grid",
              className
            ),
            "aria-label": itemListLabel,
            render: ({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
              Stack,
              {
                direction: "column",
                gap: "lg",
                children,
                ...props
              }
            ),
            children: Array.from(dataByGroup.entries()).map(
              ([groupName, groupItems]) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
                GridGroup,
                {
                  groupName,
                  groupField,
                  showLabel: view.groupBy?.showLabel !== false,
                  children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
                    GridItems,
                    {
                      previewSize: usedPreviewSize,
                      style: {
                        gridTemplateColumns: usedPreviewSize && `repeat(auto-fill, minmax(${usedPreviewSize}px, 1fr))`
                      },
                      "aria-busy": isLoading,
                      ref: resizeObserverRef,
                      children: groupItems.map((item) => {
                        const posInSet = (currentPage - 1) * perPage + data.indexOf(item) + 1;
                        return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
                          GridItem3,
                          {
                            view,
                            multiselect: isMultiselect,
                            selection,
                            onChangeSelection,
                            getItemId,
                            item,
                            mediaField,
                            titleField,
                            descriptionField: descriptionField2,
                            regularFields,
                            badgeFields,
                            config: {
                              sizes: size
                            },
                            posinset: posInSet,
                            setsize: setSize
                          },
                          getItemId(item)
                        );
                      })
                    }
                  )
                },
                groupName
              )
            )
          }
        ),
        // Render a single grid with all data.
        hasData && !dataByGroup && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
          import_components15.Composite,
          {
            render: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
              GridItems,
              {
                className: clsx_default(
                  "dataviews-view-picker-grid",
                  className
                ),
                previewSize: usedPreviewSize,
                "aria-busy": isLoading,
                ref: resizeObserverRef
              }
            ),
            virtualFocus: true,
            orientation: "horizontal",
            role: "listbox",
            "aria-multiselectable": isMultiselect,
            "aria-label": itemListLabel,
            children: data.map((item, index) => {
              let posinset = isInfiniteScroll ? index + 1 : void 0;
              if (!isInfiniteScroll) {
                posinset = (currentPage - 1) * perPage + index + 1;
              }
              return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
                GridItem3,
                {
                  view,
                  multiselect: isMultiselect,
                  selection,
                  onChangeSelection,
                  getItemId,
                  item,
                  mediaField,
                  titleField,
                  descriptionField: descriptionField2,
                  regularFields,
                  badgeFields,
                  config: {
                    sizes: size
                  },
                  posinset,
                  setsize: setSize
                },
                getItemId(item)
              );
            })
          }
        ),
        // Render empty state.
        !hasData && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
          "div",
          {
            className: clsx_default({
              "dataviews-loading": isLoading,
              "dataviews-no-results": !isLoading
            }),
            children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_components15.Spinner, {}) }) : empty
          }
        ),
        hasData && isLoading && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "dataviews-loading-more", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_components15.Spinner, {}) })
      ]
    });
  }
  var picker_grid_default = ViewPickerGrid;

  // packages/dataviews/build-module/components/dataviews-layouts/picker-table/index.mjs
  var import_i18n24 = __toESM(require_i18n(), 1);
  var import_components16 = __toESM(require_components(), 1);
  var import_element21 = __toESM(require_element(), 1);
  var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
  function TableColumnField2({
    item,
    fields,
    column,
    align
  }) {
    const field = fields.find((f2) => f2.id === column);
    if (!field) {
      return null;
    }
    const className = clsx_default("dataviews-view-table__cell-content-wrapper", {
      "dataviews-view-table__cell-align-end": align === "end",
      "dataviews-view-table__cell-align-center": align === "center"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(field.render, { item, field }) });
  }
  function TableRow2({
    item,
    fields,
    id,
    view,
    titleField,
    mediaField,
    descriptionField: descriptionField2,
    selection,
    getItemId,
    onChangeSelection,
    multiselect,
    posinset
  }) {
    const { paginationInfo } = (0, import_element21.useContext)(dataviews_context_default);
    const isSelected2 = selection.includes(id);
    const [isHovered, setIsHovered] = (0, import_element21.useState)(false);
    const {
      showTitle = true,
      showMedia = true,
      showDescription = true,
      infiniteScrollEnabled
    } = view;
    const handleMouseEnter = () => {
      setIsHovered(true);
    };
    const handleMouseLeave = () => {
      setIsHovered(false);
    };
    const columns = view.fields ?? [];
    const hasPrimaryColumn = titleField && showTitle || mediaField && showMedia || descriptionField2 && showDescription;
    return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
      import_components16.Composite.Item,
      {
        render: ({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
          "tr",
          {
            className: clsx_default("dataviews-view-table__row", {
              "is-selected": isSelected2,
              "is-hovered": isHovered
            }),
            onMouseEnter: handleMouseEnter,
            onMouseLeave: handleMouseLeave,
            children,
            ...props
          }
        ),
        "aria-selected": isSelected2,
        "aria-setsize": paginationInfo.totalItems || void 0,
        "aria-posinset": posinset,
        role: infiniteScrollEnabled ? "article" : "option",
        onClick: () => {
          if (isSelected2) {
            onChangeSelection(
              selection.filter((itemId) => id !== itemId)
            );
          } else {
            const newSelection = multiselect ? [...selection, id] : [id];
            onChangeSelection(newSelection);
          }
        },
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
            "td",
            {
              className: "dataviews-view-table__checkbox-column",
              role: "presentation",
              children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "dataviews-view-table__cell-content-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
                DataViewsSelectionCheckbox,
                {
                  item,
                  selection,
                  onChangeSelection,
                  getItemId,
                  titleField,
                  disabled: false,
                  "aria-hidden": true,
                  tabIndex: -1
                }
              ) })
            }
          ),
          hasPrimaryColumn && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("td", { role: "presentation", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
            column_primary_default,
            {
              item,
              titleField: showTitle ? titleField : void 0,
              mediaField: showMedia ? mediaField : void 0,
              descriptionField: showDescription ? descriptionField2 : void 0,
              isItemClickable: () => false
            }
          ) }),
          columns.map((column) => {
            const { width, maxWidth, minWidth, align } = view.layout?.styles?.[column] ?? {};
            return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
              "td",
              {
                style: {
                  width,
                  maxWidth,
                  minWidth
                },
                role: "presentation",
                children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
                  TableColumnField2,
                  {
                    fields,
                    item,
                    column,
                    align
                  }
                )
              },
              column
            );
          })
        ]
      },
      id
    );
  }
  function ViewPickerTable({
    actions,
    data,
    fields,
    getItemId,
    isLoading = false,
    onChangeView,
    onChangeSelection,
    selection,
    setOpenedFilter,
    view,
    className,
    empty
  }) {
    const headerMenuRefs = (0, import_element21.useRef)(/* @__PURE__ */ new Map());
    const headerMenuToFocusRef = (0, import_element21.useRef)(void 0);
    const [nextHeaderMenuToFocus, setNextHeaderMenuToFocus] = (0, import_element21.useState)();
    const isMultiselect = useIsMultiselectPicker(actions) ?? false;
    (0, import_element21.useEffect)(() => {
      if (headerMenuToFocusRef.current) {
        headerMenuToFocusRef.current.focus();
        headerMenuToFocusRef.current = void 0;
      }
    });
    const tableNoticeId = (0, import_element21.useId)();
    if (nextHeaderMenuToFocus) {
      headerMenuToFocusRef.current = nextHeaderMenuToFocus;
      setNextHeaderMenuToFocus(void 0);
      return;
    }
    const onHide = (field) => {
      const hidden = headerMenuRefs.current.get(field.id);
      const fallback = hidden ? headerMenuRefs.current.get(hidden.fallback) : void 0;
      setNextHeaderMenuToFocus(fallback?.node);
    };
    const hasData = !!data?.length;
    const titleField = fields.find((field) => field.id === view.titleField);
    const mediaField = fields.find((field) => field.id === view.mediaField);
    const descriptionField2 = fields.find(
      (field) => field.id === view.descriptionField
    );
    const groupField = view.groupBy?.field ? fields.find((f2) => f2.id === view.groupBy?.field) : null;
    const dataByGroup = groupField ? getDataByGroup(data, groupField) : null;
    const { showTitle = true, showMedia = true, showDescription = true } = view;
    const hasPrimaryColumn = titleField && showTitle || mediaField && showMedia || descriptionField2 && showDescription;
    const columns = view.fields ?? [];
    const headerMenuRef = (column, index) => (node) => {
      if (node) {
        headerMenuRefs.current.set(column, {
          node,
          fallback: columns[index > 0 ? index - 1 : 1]
        });
      } else {
        headerMenuRefs.current.delete(column);
      }
    };
    const isInfiniteScroll = view.infiniteScrollEnabled && !dataByGroup;
    return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
        "table",
        {
          className: clsx_default(
            "dataviews-view-table",
            "dataviews-view-picker-table",
            className,
            {
              [`has-${view.layout?.density}-density`]: view.layout?.density && ["compact", "comfortable"].includes(
                view.layout.density
              )
            }
          ),
          "aria-busy": isLoading,
          "aria-describedby": tableNoticeId,
          role: isInfiniteScroll ? "feed" : "listbox",
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("thead", { role: "presentation", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
              "tr",
              {
                className: "dataviews-view-table__row",
                role: "presentation",
                children: [
                  /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("th", { className: "dataviews-view-table__checkbox-column", children: isMultiselect && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
                    BulkSelectionCheckbox,
                    {
                      selection,
                      onChangeSelection,
                      data,
                      actions,
                      getItemId
                    }
                  ) }),
                  hasPrimaryColumn && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("th", { children: titleField && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
                    column_header_menu_default,
                    {
                      ref: headerMenuRef(
                        titleField.id,
                        0
                      ),
                      fieldId: titleField.id,
                      view,
                      fields,
                      onChangeView,
                      onHide,
                      setOpenedFilter,
                      canMove: false
                    }
                  ) }),
                  columns.map((column, index) => {
                    const { width, maxWidth, minWidth, align } = view.layout?.styles?.[column] ?? {};
                    return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
                      "th",
                      {
                        style: {
                          width,
                          maxWidth,
                          minWidth,
                          textAlign: align
                        },
                        "aria-sort": view.sort?.direction && view.sort?.field === column ? sortValues[view.sort.direction] : void 0,
                        scope: "col",
                        children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
                          column_header_menu_default,
                          {
                            ref: headerMenuRef(column, index),
                            fieldId: column,
                            view,
                            fields,
                            onChangeView,
                            onHide,
                            setOpenedFilter,
                            canMove: view.layout?.enableMoving ?? true
                          }
                        )
                      },
                      column
                    );
                  })
                ]
              }
            ) }),
            hasData && groupField && dataByGroup ? Array.from(dataByGroup.entries()).map(
              ([groupName, groupItems]) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
                import_components16.Composite,
                {
                  virtualFocus: true,
                  orientation: "vertical",
                  render: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("tbody", { role: "group" }),
                  children: [
                    /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
                      "tr",
                      {
                        className: "dataviews-view-table__group-header-row",
                        role: "presentation",
                        children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
                          "td",
                          {
                            colSpan: columns.length + (hasPrimaryColumn ? 1 : 0) + 1,
                            className: "dataviews-view-table__group-header-cell",
                            role: "presentation",
                            children: view.groupBy?.showLabel === false ? groupName : (0, import_i18n24.sprintf)(
                              // translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
                              (0, import_i18n24.__)("%1$s: %2$s"),
                              groupField.label,
                              groupName
                            )
                          }
                        )
                      }
                    ),
                    groupItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
                      TableRow2,
                      {
                        item,
                        fields,
                        id: getItemId(item) || index.toString(),
                        view,
                        titleField,
                        mediaField,
                        descriptionField: descriptionField2,
                        selection,
                        getItemId,
                        onChangeSelection,
                        multiselect: isMultiselect
                      },
                      getItemId(item)
                    ))
                  ]
                },
                `group-${groupName}`
              )
            ) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
              import_components16.Composite,
              {
                render: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("tbody", { role: "presentation" }),
                virtualFocus: true,
                orientation: "vertical",
                children: hasData && data.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
                  TableRow2,
                  {
                    item,
                    fields,
                    id: getItemId(item) || index.toString(),
                    view,
                    titleField,
                    mediaField,
                    descriptionField: descriptionField2,
                    selection,
                    getItemId,
                    onChangeSelection,
                    multiselect: isMultiselect,
                    posinset: index + 1
                  },
                  getItemId(item)
                ))
              }
            )
          ]
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
        "div",
        {
          className: clsx_default({
            "dataviews-loading": isLoading,
            "dataviews-no-results": !hasData && !isLoading
          }),
          id: tableNoticeId,
          children: [
            !hasData && (isLoading ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components16.Spinner, {}) }) : empty),
            hasData && isLoading && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "dataviews-loading-more", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components16.Spinner, {}) })
          ]
        }
      )
    ] });
  }
  var picker_table_default = ViewPickerTable;

  // packages/dataviews/build-module/components/dataviews-layouts/utils/preview-size-picker.mjs
  var import_components17 = __toESM(require_components(), 1);
  var import_i18n25 = __toESM(require_i18n(), 1);
  var import_element22 = __toESM(require_element(), 1);
  var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
  var imageSizes2 = [
    {
      value: 120,
      breakpoint: 1
    },
    {
      value: 170,
      breakpoint: 1
    },
    {
      value: 230,
      breakpoint: 1
    },
    {
      value: 290,
      breakpoint: 1112
      // at minimum image width, 4 images display at this container size
    },
    {
      value: 350,
      breakpoint: 1636
      // at minimum image width, 6 images display at this container size
    },
    {
      value: 430,
      breakpoint: 588
      // at minimum image width, 2 images display at this container size
    }
  ];
  function PreviewSizePicker() {
    const context = (0, import_element22.useContext)(dataviews_context_default);
    const view = context.view;
    const breakValues = imageSizes2.filter((size) => {
      return context.containerWidth >= size.breakpoint;
    });
    const layoutPreviewSize = view.layout?.previewSize ?? 230;
    const previewSizeToUse = breakValues.map((size, index) => ({ ...size, index })).filter((size) => size.value <= layoutPreviewSize).sort((a2, b2) => b2.value - a2.value)[0]?.index ?? 0;
    const marks = breakValues.map((size, index) => {
      return {
        value: index
      };
    });
    return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
      import_components17.RangeControl,
      {
        __next40pxDefaultSize: true,
        showTooltip: false,
        label: (0, import_i18n25.__)("Preview size"),
        value: previewSizeToUse,
        min: 0,
        max: breakValues.length - 1,
        withInputField: false,
        onChange: (value = 0) => {
          context.onChangeView({
            ...view,
            layout: {
              ...view.layout,
              previewSize: breakValues[value].value
            }
          });
        },
        step: 1,
        marks
      }
    );
  }

  // packages/dataviews/build-module/components/dataviews-layouts/utils/density-picker.mjs
  var import_components18 = __toESM(require_components(), 1);
  var import_i18n26 = __toESM(require_i18n(), 1);
  var import_element23 = __toESM(require_element(), 1);
  var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
  function DensityPicker() {
    const context = (0, import_element23.useContext)(dataviews_context_default);
    const view = context.view;
    return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
      import_components18.__experimentalToggleGroupControl,
      {
        size: "__unstable-large",
        label: (0, import_i18n26.__)("Density"),
        value: view.layout?.density || "balanced",
        onChange: (value) => {
          context.onChangeView({
            ...view,
            layout: {
              ...view.layout,
              density: value
            }
          });
        },
        isBlock: true,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
            import_components18.__experimentalToggleGroupControlOption,
            {
              value: "comfortable",
              label: (0, import_i18n26._x)(
                "Comfortable",
                "Density option for DataView layout"
              )
            },
            "comfortable"
          ),
          /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
            import_components18.__experimentalToggleGroupControlOption,
            {
              value: "balanced",
              label: (0, import_i18n26._x)("Balanced", "Density option for DataView layout")
            },
            "balanced"
          ),
          /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
            import_components18.__experimentalToggleGroupControlOption,
            {
              value: "compact",
              label: (0, import_i18n26._x)("Compact", "Density option for DataView layout")
            },
            "compact"
          )
        ]
      }
    );
  }

  // packages/dataviews/build-module/components/dataviews-layouts/index.mjs
  var VIEW_LAYOUTS = [
    {
      type: LAYOUT_TABLE,
      label: (0, import_i18n27.__)("Table"),
      component: table_default,
      icon: block_table_default,
      viewConfigOptions: DensityPicker
    },
    {
      type: LAYOUT_GRID,
      label: (0, import_i18n27.__)("Grid"),
      component: grid_default,
      icon: category_default,
      viewConfigOptions: PreviewSizePicker
    },
    {
      type: LAYOUT_LIST,
      label: (0, import_i18n27.__)("List"),
      component: ViewList,
      icon: (0, import_i18n27.isRTL)() ? format_list_bullets_rtl_default : format_list_bullets_default,
      viewConfigOptions: DensityPicker
    },
    {
      type: LAYOUT_ACTIVITY,
      label: (0, import_i18n27.__)("Activity"),
      component: ViewActivity,
      icon: scheduled_default,
      viewConfigOptions: DensityPicker
    },
    {
      type: LAYOUT_PICKER_GRID,
      label: (0, import_i18n27.__)("Grid"),
      component: picker_grid_default,
      icon: category_default,
      viewConfigOptions: PreviewSizePicker,
      isPicker: true
    },
    {
      type: LAYOUT_PICKER_TABLE,
      label: (0, import_i18n27.__)("Table"),
      component: picker_table_default,
      icon: block_table_default,
      viewConfigOptions: DensityPicker,
      isPicker: true
    }
  ];

  // packages/dataviews/build-module/components/dataviews-filters/filters.mjs
  var import_element31 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/components/dataviews-filters/filter.mjs
  var import_components21 = __toESM(require_components(), 1);
  var import_i18n30 = __toESM(require_i18n(), 1);
  var import_element28 = __toESM(require_element(), 1);

  // node_modules/@ariakit/core/esm/__chunks/XMCVU3LR.js
  function noop2(..._) {
  }
  function applyState(argument, currentValue) {
    if (isUpdater(argument)) {
      const value = isLazyValue(currentValue) ? currentValue() : currentValue;
      return argument(value);
    }
    return argument;
  }
  function isUpdater(argument) {
    return typeof argument === "function";
  }
  function isLazyValue(value) {
    return typeof value === "function";
  }
  function hasOwnProperty(object, prop) {
    if (typeof Object.hasOwn === "function") {
      return Object.hasOwn(object, prop);
    }
    return Object.prototype.hasOwnProperty.call(object, prop);
  }
  function chain(...fns) {
    return (...args) => {
      for (const fn of fns) {
        if (typeof fn === "function") {
          fn(...args);
        }
      }
    };
  }
  function normalizeString(str) {
    return str.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
  }
  function omit(object, keys) {
    const result = { ...object };
    for (const key of keys) {
      if (hasOwnProperty(result, key)) {
        delete result[key];
      }
    }
    return result;
  }
  function pick(object, paths) {
    const result = {};
    for (const key of paths) {
      if (hasOwnProperty(object, key)) {
        result[key] = object[key];
      }
    }
    return result;
  }
  function identity(value) {
    return value;
  }
  function invariant(condition, message2) {
    if (condition) return;
    if (typeof message2 !== "string") throw new Error("Invariant failed");
    throw new Error(message2);
  }
  function getKeys(obj) {
    return Object.keys(obj);
  }
  function isFalsyBooleanCallback(booleanOrCallback, ...args) {
    const result = typeof booleanOrCallback === "function" ? booleanOrCallback(...args) : booleanOrCallback;
    if (result == null) return false;
    return !result;
  }
  function disabledFromProps(props) {
    return props.disabled || props["aria-disabled"] === true || props["aria-disabled"] === "true";
  }
  function removeUndefinedValues(obj) {
    const result = {};
    for (const key in obj) {
      if (obj[key] !== void 0) {
        result[key] = obj[key];
      }
    }
    return result;
  }
  function defaultValue(...values) {
    for (const value of values) {
      if (value !== void 0) return value;
    }
    return void 0;
  }

  // node_modules/@ariakit/react-core/esm/__chunks/YXGXYGQX.js
  var import_react4 = __toESM(require_react(), 1);
  function setRef(ref, value) {
    if (typeof ref === "function") {
      ref(value);
    } else if (ref) {
      ref.current = value;
    }
  }
  function isValidElementWithRef(element) {
    if (!element) return false;
    if (!(0, import_react4.isValidElement)(element)) return false;
    if ("ref" in element.props) return true;
    if ("ref" in element) return true;
    return false;
  }
  function getRefProperty(element) {
    if (!isValidElementWithRef(element)) return null;
    const props = { ...element.props };
    return props.ref || element.ref;
  }
  function mergeProps2(base, overrides) {
    const props = { ...base };
    for (const key in overrides) {
      if (!hasOwnProperty(overrides, key)) continue;
      if (key === "className") {
        const prop = "className";
        props[prop] = base[prop] ? `${base[prop]} ${overrides[prop]}` : overrides[prop];
        continue;
      }
      if (key === "style") {
        const prop = "style";
        props[prop] = base[prop] ? { ...base[prop], ...overrides[prop] } : overrides[prop];
        continue;
      }
      const overrideValue = overrides[key];
      if (typeof overrideValue === "function" && key.startsWith("on")) {
        const baseValue = base[key];
        if (typeof baseValue === "function") {
          props[key] = (...args) => {
            overrideValue(...args);
            baseValue(...args);
          };
          continue;
        }
      }
      props[key] = overrideValue;
    }
    return props;
  }

  // node_modules/@ariakit/core/esm/__chunks/3DNM6L6E.js
  var canUseDOM = checkIsBrowser();
  function checkIsBrowser() {
    var _a;
    return typeof window !== "undefined" && !!((_a = window.document) == null ? void 0 : _a.createElement);
  }
  function getDocument(node) {
    if (!node) return document;
    if ("self" in node) return node.document;
    return node.ownerDocument || document;
  }
  function getActiveElement(node, activeDescendant = false) {
    var _a;
    const { activeElement } = getDocument(node);
    if (!(activeElement == null ? void 0 : activeElement.nodeName)) {
      return null;
    }
    if (isFrame(activeElement) && ((_a = activeElement.contentDocument) == null ? void 0 : _a.body)) {
      return getActiveElement(
        activeElement.contentDocument.body,
        activeDescendant
      );
    }
    if (activeDescendant) {
      const id = activeElement.getAttribute("aria-activedescendant");
      if (id) {
        const element = getDocument(activeElement).getElementById(id);
        if (element) {
          return element;
        }
      }
    }
    return activeElement;
  }
  function contains(parent, child) {
    return parent === child || parent.contains(child);
  }
  function isFrame(element) {
    return element.tagName === "IFRAME";
  }
  function isButton(element) {
    const tagName = element.tagName.toLowerCase();
    if (tagName === "button") return true;
    if (tagName === "input" && element.type) {
      return buttonInputTypes.indexOf(element.type) !== -1;
    }
    return false;
  }
  var buttonInputTypes = [
    "button",
    "color",
    "file",
    "image",
    "reset",
    "submit"
  ];
  function isVisible(element) {
    if (typeof element.checkVisibility === "function") {
      return element.checkVisibility();
    }
    const htmlElement = element;
    return htmlElement.offsetWidth > 0 || htmlElement.offsetHeight > 0 || element.getClientRects().length > 0;
  }
  function isTextField(element) {
    try {
      const isTextInput = element instanceof HTMLInputElement && element.selectionStart !== null;
      const isTextArea = element.tagName === "TEXTAREA";
      return isTextInput || isTextArea || false;
    } catch (_error) {
      return false;
    }
  }
  function isTextbox(element) {
    return element.isContentEditable || isTextField(element);
  }
  function getTextboxValue(element) {
    if (isTextField(element)) {
      return element.value;
    }
    if (element.isContentEditable) {
      const range = getDocument(element).createRange();
      range.selectNodeContents(element);
      return range.toString();
    }
    return "";
  }
  function getTextboxSelection(element) {
    let start = 0;
    let end = 0;
    if (isTextField(element)) {
      start = element.selectionStart || 0;
      end = element.selectionEnd || 0;
    } else if (element.isContentEditable) {
      const selection = getDocument(element).getSelection();
      if ((selection == null ? void 0 : selection.rangeCount) && selection.anchorNode && contains(element, selection.anchorNode) && selection.focusNode && contains(element, selection.focusNode)) {
        const range = selection.getRangeAt(0);
        const nextRange = range.cloneRange();
        nextRange.selectNodeContents(element);
        nextRange.setEnd(range.startContainer, range.startOffset);
        start = nextRange.toString().length;
        nextRange.setEnd(range.endContainer, range.endOffset);
        end = nextRange.toString().length;
      }
    }
    return { start, end };
  }
  function getPopupRole(element, fallback) {
    const allowedPopupRoles = ["dialog", "menu", "listbox", "tree", "grid"];
    const role = element == null ? void 0 : element.getAttribute("role");
    if (role && allowedPopupRoles.indexOf(role) !== -1) {
      return role;
    }
    return fallback;
  }
  function getScrollingElement(element) {
    if (!element) return null;
    const isScrollableOverflow = (overflow) => {
      if (overflow === "auto") return true;
      if (overflow === "scroll") return true;
      return false;
    };
    if (element.clientHeight && element.scrollHeight > element.clientHeight) {
      const { overflowY } = getComputedStyle(element);
      if (isScrollableOverflow(overflowY)) return element;
    } else if (element.clientWidth && element.scrollWidth > element.clientWidth) {
      const { overflowX } = getComputedStyle(element);
      if (isScrollableOverflow(overflowX)) return element;
    }
    return getScrollingElement(element.parentElement) || document.scrollingElement || document.body;
  }
  function setSelectionRange(element, ...args) {
    if (/text|search|password|tel|url/i.test(element.type)) {
      element.setSelectionRange(...args);
    }
  }
  function sortBasedOnDOMPosition(items, getElement) {
    const pairs = items.map((item, index) => [index, item]);
    let isOrderDifferent = false;
    pairs.sort(([indexA, a2], [indexB, b2]) => {
      const elementA = getElement(a2);
      const elementB = getElement(b2);
      if (elementA === elementB) return 0;
      if (!elementA || !elementB) return 0;
      if (isElementPreceding(elementA, elementB)) {
        if (indexA > indexB) {
          isOrderDifferent = true;
        }
        return -1;
      }
      if (indexA < indexB) {
        isOrderDifferent = true;
      }
      return 1;
    });
    if (isOrderDifferent) {
      return pairs.map(([_, item]) => item);
    }
    return items;
  }
  function isElementPreceding(a2, b2) {
    return Boolean(
      b2.compareDocumentPosition(a2) & Node.DOCUMENT_POSITION_PRECEDING
    );
  }

  // node_modules/@ariakit/core/esm/__chunks/SNHYQNEZ.js
  function isTouchDevice() {
    return canUseDOM && !!navigator.maxTouchPoints;
  }
  function isApple() {
    if (!canUseDOM) return false;
    return /mac|iphone|ipad|ipod/i.test(navigator.platform);
  }
  function isSafari() {
    return canUseDOM && isApple() && /apple/i.test(navigator.vendor);
  }
  function isFirefox() {
    return canUseDOM && /firefox\//i.test(navigator.userAgent);
  }

  // node_modules/@ariakit/core/esm/utils/events.js
  function isPortalEvent(event) {
    return Boolean(
      event.currentTarget && !contains(event.currentTarget, event.target)
    );
  }
  function isSelfTarget(event) {
    return event.target === event.currentTarget;
  }
  function isOpeningInNewTab(event) {
    const element = event.currentTarget;
    if (!element) return false;
    const isAppleDevice = isApple();
    if (isAppleDevice && !event.metaKey) return false;
    if (!isAppleDevice && !event.ctrlKey) return false;
    const tagName = element.tagName.toLowerCase();
    if (tagName === "a") return true;
    if (tagName === "button" && element.type === "submit") return true;
    if (tagName === "input" && element.type === "submit") return true;
    return false;
  }
  function isDownloading(event) {
    const element = event.currentTarget;
    if (!element) return false;
    const tagName = element.tagName.toLowerCase();
    if (!event.altKey) return false;
    if (tagName === "a") return true;
    if (tagName === "button" && element.type === "submit") return true;
    if (tagName === "input" && element.type === "submit") return true;
    return false;
  }
  function fireBlurEvent(element, eventInit) {
    const event = new FocusEvent("blur", eventInit);
    const defaultAllowed = element.dispatchEvent(event);
    const bubbleInit = { ...eventInit, bubbles: true };
    element.dispatchEvent(new FocusEvent("focusout", bubbleInit));
    return defaultAllowed;
  }
  function fireKeyboardEvent(element, type, eventInit) {
    const event = new KeyboardEvent(type, eventInit);
    return element.dispatchEvent(event);
  }
  function fireClickEvent(element, eventInit) {
    const event = new MouseEvent("click", eventInit);
    return element.dispatchEvent(event);
  }
  function isFocusEventOutside(event, container) {
    const containerElement = container || event.currentTarget;
    const relatedTarget = event.relatedTarget;
    return !relatedTarget || !contains(containerElement, relatedTarget);
  }
  function queueBeforeEvent(element, type, callback, timeout) {
    const createTimer = (callback2) => {
      if (timeout) {
        const timerId2 = setTimeout(callback2, timeout);
        return () => clearTimeout(timerId2);
      }
      const timerId = requestAnimationFrame(callback2);
      return () => cancelAnimationFrame(timerId);
    };
    const cancelTimer = createTimer(() => {
      element.removeEventListener(type, callSync, true);
      callback();
    });
    const callSync = () => {
      cancelTimer();
      callback();
    };
    element.addEventListener(type, callSync, { once: true, capture: true });
    return cancelTimer;
  }
  function addGlobalEventListener(type, listener, options, scope = window) {
    const children = [];
    try {
      scope.document.addEventListener(type, listener, options);
      for (const frame of Array.from(scope.frames)) {
        children.push(addGlobalEventListener(type, listener, options, frame));
      }
    } catch (e2) {
    }
    const removeEventListener = () => {
      try {
        scope.document.removeEventListener(type, listener, options);
      } catch (e2) {
      }
      for (const remove of children) {
        remove();
      }
    };
    return removeEventListener;
  }

  // node_modules/@ariakit/react-core/esm/__chunks/KPHZR4MB.js
  var React5 = __toESM(require_react(), 1);
  var import_react5 = __toESM(require_react(), 1);
  var _React = { ...React5 };
  var useReactId = _React.useId;
  var useReactDeferredValue = _React.useDeferredValue;
  var useReactInsertionEffect = _React.useInsertionEffect;
  var useSafeLayoutEffect = canUseDOM ? import_react5.useLayoutEffect : import_react5.useEffect;
  function useInitialValue(value) {
    const [initialValue] = (0, import_react5.useState)(value);
    return initialValue;
  }
  function useLiveRef(value) {
    const ref = (0, import_react5.useRef)(value);
    useSafeLayoutEffect(() => {
      ref.current = value;
    });
    return ref;
  }
  function useEvent(callback) {
    const ref = (0, import_react5.useRef)(() => {
      throw new Error("Cannot call an event handler while rendering.");
    });
    if (useReactInsertionEffect) {
      useReactInsertionEffect(() => {
        ref.current = callback;
      });
    } else {
      ref.current = callback;
    }
    return (0, import_react5.useCallback)((...args) => {
      var _a;
      return (_a = ref.current) == null ? void 0 : _a.call(ref, ...args);
    }, []);
  }
  function useTransactionState(callback) {
    const [state, setState] = (0, import_react5.useState)(null);
    useSafeLayoutEffect(() => {
      if (state == null) return;
      if (!callback) return;
      let prevState = null;
      callback((prev) => {
        prevState = prev;
        return state;
      });
      return () => {
        callback(prevState);
      };
    }, [state, callback]);
    return [state, setState];
  }
  function useMergeRefs(...refs) {
    return (0, import_react5.useMemo)(() => {
      if (!refs.some(Boolean)) return;
      return (value) => {
        for (const ref of refs) {
          setRef(ref, value);
        }
      };
    }, refs);
  }
  function useId3(defaultId) {
    if (useReactId) {
      const reactId = useReactId();
      if (defaultId) return defaultId;
      return reactId;
    }
    const [id, setId] = (0, import_react5.useState)(defaultId);
    useSafeLayoutEffect(() => {
      if (defaultId || id) return;
      const random = Math.random().toString(36).slice(2, 8);
      setId(`id-${random}`);
    }, [defaultId, id]);
    return defaultId || id;
  }
  function useTagName(refOrElement, type) {
    const stringOrUndefined = (type2) => {
      if (typeof type2 !== "string") return;
      return type2;
    };
    const [tagName, setTagName] = (0, import_react5.useState)(() => stringOrUndefined(type));
    useSafeLayoutEffect(() => {
      const element = refOrElement && "current" in refOrElement ? refOrElement.current : refOrElement;
      setTagName((element == null ? void 0 : element.tagName.toLowerCase()) || stringOrUndefined(type));
    }, [refOrElement, type]);
    return tagName;
  }
  function useAttribute(refOrElement, attributeName, defaultValue2) {
    const initialValue = useInitialValue(defaultValue2);
    const [attribute, setAttribute] = (0, import_react5.useState)(initialValue);
    (0, import_react5.useEffect)(() => {
      const element = refOrElement && "current" in refOrElement ? refOrElement.current : refOrElement;
      if (!element) return;
      const callback = () => {
        const value = element.getAttribute(attributeName);
        setAttribute(value == null ? initialValue : value);
      };
      const observer = new MutationObserver(callback);
      observer.observe(element, { attributeFilter: [attributeName] });
      callback();
      return () => observer.disconnect();
    }, [refOrElement, attributeName, initialValue]);
    return attribute;
  }
  function useUpdateEffect(effect, deps) {
    const mounted = (0, import_react5.useRef)(false);
    (0, import_react5.useEffect)(() => {
      if (mounted.current) {
        return effect();
      }
      mounted.current = true;
    }, deps);
    (0, import_react5.useEffect)(
      () => () => {
        mounted.current = false;
      },
      []
    );
  }
  function useUpdateLayoutEffect(effect, deps) {
    const mounted = (0, import_react5.useRef)(false);
    useSafeLayoutEffect(() => {
      if (mounted.current) {
        return effect();
      }
      mounted.current = true;
    }, deps);
    useSafeLayoutEffect(
      () => () => {
        mounted.current = false;
      },
      []
    );
  }
  function useForceUpdate() {
    return (0, import_react5.useReducer)(() => [], []);
  }
  function useBooleanEvent(booleanOrCallback) {
    return useEvent(
      typeof booleanOrCallback === "function" ? booleanOrCallback : () => booleanOrCallback
    );
  }
  function useWrapElement(props, callback, deps = []) {
    const wrapElement = (0, import_react5.useCallback)(
      (element) => {
        if (props.wrapElement) {
          element = props.wrapElement(element);
        }
        return callback(element);
      },
      [...deps, props.wrapElement]
    );
    return { ...props, wrapElement };
  }
  function useMetadataProps(props, key, value) {
    const parent = props.onLoadedMetadataCapture;
    const onLoadedMetadataCapture = (0, import_react5.useMemo)(() => {
      return Object.assign(() => {
      }, { ...parent, [key]: value });
    }, [parent, key, value]);
    return [parent == null ? void 0 : parent[key], { onLoadedMetadataCapture }];
  }
  var hasInstalledGlobalEventListeners = false;
  function useIsMouseMoving() {
    (0, import_react5.useEffect)(() => {
      if (hasInstalledGlobalEventListeners) return;
      addGlobalEventListener("mousemove", setMouseMoving, true);
      addGlobalEventListener("mousedown", resetMouseMoving, true);
      addGlobalEventListener("mouseup", resetMouseMoving, true);
      addGlobalEventListener("keydown", resetMouseMoving, true);
      addGlobalEventListener("scroll", resetMouseMoving, true);
      hasInstalledGlobalEventListeners = true;
    }, []);
    const isMouseMoving = useEvent(() => mouseMoving);
    return isMouseMoving;
  }
  var mouseMoving = false;
  var previousScreenX = 0;
  var previousScreenY = 0;
  function hasMouseMovement(event) {
    const movementX = event.movementX || event.screenX - previousScreenX;
    const movementY = event.movementY || event.screenY - previousScreenY;
    previousScreenX = event.screenX;
    previousScreenY = event.screenY;
    return movementX || movementY || false;
  }
  function setMouseMoving(event) {
    if (!hasMouseMovement(event)) return;
    mouseMoving = true;
  }
  function resetMouseMoving() {
    mouseMoving = false;
  }

  // node_modules/@ariakit/react-core/esm/__chunks/GWSL6KNJ.js
  var React6 = __toESM(require_react(), 1);
  var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
  function forwardRef22(render4) {
    const Role = React6.forwardRef(
      // @ts-ignore Incompatible with React 19 types. Ignore for now.
      (props, ref) => render4({ ...props, ref })
    );
    Role.displayName = render4.displayName || render4.name;
    return Role;
  }
  function memo22(Component2, propsAreEqual) {
    return React6.memo(Component2, propsAreEqual);
  }
  function createElement3(Type, props) {
    const { wrapElement, render: render4, ...rest } = props;
    const mergedRef = useMergeRefs(props.ref, getRefProperty(render4));
    let element;
    if (React6.isValidElement(render4)) {
      const renderProps = {
        // @ts-ignore Incompatible with React 19 types. Ignore for now.
        ...render4.props,
        ref: mergedRef
      };
      element = React6.cloneElement(render4, mergeProps2(rest, renderProps));
    } else if (render4) {
      element = render4(rest);
    } else {
      element = /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Type, { ...rest });
    }
    if (wrapElement) {
      return wrapElement(element);
    }
    return element;
  }
  function createHook(useProps) {
    const useRole = (props = {}) => {
      return useProps(props);
    };
    useRole.displayName = useProps.name;
    return useRole;
  }
  function createStoreContext(providers = [], scopedProviders = []) {
    const context = React6.createContext(void 0);
    const scopedContext = React6.createContext(void 0);
    const useContext27 = () => React6.useContext(context);
    const useScopedContext = (onlyScoped = false) => {
      const scoped = React6.useContext(scopedContext);
      const store = useContext27();
      if (onlyScoped) return scoped;
      return scoped || store;
    };
    const useProviderContext = () => {
      const scoped = React6.useContext(scopedContext);
      const store = useContext27();
      if (scoped && scoped === store) return;
      return store;
    };
    const ContextProvider = (props) => {
      return providers.reduceRight(
        (children, Provider) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Provider, { ...props, children }),
        /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(context.Provider, { ...props })
      );
    };
    const ScopedContextProvider = (props) => {
      return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ContextProvider, { ...props, children: scopedProviders.reduceRight(
        (children, Provider) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Provider, { ...props, children }),
        /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(scopedContext.Provider, { ...props })
      ) });
    };
    return {
      context,
      scopedContext,
      useContext: useContext27,
      useScopedContext,
      useProviderContext,
      ContextProvider,
      ScopedContextProvider
    };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/SMPCIMZM.js
  var ctx = createStoreContext();
  var useCollectionContext = ctx.useContext;
  var useCollectionScopedContext = ctx.useScopedContext;
  var useCollectionProviderContext = ctx.useProviderContext;
  var CollectionContextProvider = ctx.ContextProvider;
  var CollectionScopedContextProvider = ctx.ScopedContextProvider;

  // node_modules/@ariakit/react-core/esm/__chunks/AVVXDJMZ.js
  var import_react6 = __toESM(require_react(), 1);
  var ctx2 = createStoreContext(
    [CollectionContextProvider],
    [CollectionScopedContextProvider]
  );
  var useCompositeContext = ctx2.useContext;
  var useCompositeScopedContext = ctx2.useScopedContext;
  var useCompositeProviderContext = ctx2.useProviderContext;
  var CompositeContextProvider = ctx2.ContextProvider;
  var CompositeScopedContextProvider = ctx2.ScopedContextProvider;
  var CompositeItemContext = (0, import_react6.createContext)(
    void 0
  );
  var CompositeRowContext = (0, import_react6.createContext)(
    void 0
  );

  // node_modules/@ariakit/react-core/esm/__chunks/5VQZOHHZ.js
  function findFirstEnabledItem(items, excludeId) {
    return items.find((item) => {
      if (excludeId) {
        return !item.disabled && item.id !== excludeId;
      }
      return !item.disabled;
    });
  }
  function getEnabledItem(store, id) {
    if (!id) return null;
    return store.item(id) || null;
  }
  function groupItemsByRows(items) {
    const rows = [];
    for (const item of items) {
      const row = rows.find((currentRow) => {
        var _a;
        return ((_a = currentRow[0]) == null ? void 0 : _a.rowId) === item.rowId;
      });
      if (row) {
        row.push(item);
      } else {
        rows.push([item]);
      }
    }
    return rows;
  }
  function selectTextField(element, collapseToEnd = false) {
    if (isTextField(element)) {
      element.setSelectionRange(
        collapseToEnd ? element.value.length : 0,
        element.value.length
      );
    } else if (element.isContentEditable) {
      const selection = getDocument(element).getSelection();
      selection == null ? void 0 : selection.selectAllChildren(element);
      if (collapseToEnd) {
        selection == null ? void 0 : selection.collapseToEnd();
      }
    }
  }
  var FOCUS_SILENTLY = /* @__PURE__ */ Symbol("FOCUS_SILENTLY");
  function focusSilently(element) {
    element[FOCUS_SILENTLY] = true;
    element.focus({ preventScroll: true });
  }
  function silentlyFocused(element) {
    const isSilentlyFocused = element[FOCUS_SILENTLY];
    delete element[FOCUS_SILENTLY];
    return isSilentlyFocused;
  }
  function isItem(store, element, exclude) {
    if (!element) return false;
    if (element === exclude) return false;
    const item = store.item(element.id);
    if (!item) return false;
    if (exclude && item.element === exclude) return false;
    return true;
  }

  // node_modules/@ariakit/react-core/esm/__chunks/Z2O3VLAQ.js
  var import_react7 = __toESM(require_react(), 1);
  var TagName = "div";
  var useCollectionItem = createHook(
    function useCollectionItem2({
      store,
      shouldRegisterItem = true,
      getItem = identity,
      // @ts-expect-error This prop may come from a collection renderer.
      element,
      ...props
    }) {
      const context = useCollectionContext();
      store = store || context;
      const id = useId3(props.id);
      const ref = (0, import_react7.useRef)(element);
      (0, import_react7.useEffect)(() => {
        const element2 = ref.current;
        if (!id) return;
        if (!element2) return;
        if (!shouldRegisterItem) return;
        const item = getItem({ id, element: element2 });
        return store == null ? void 0 : store.renderItem(item);
      }, [id, shouldRegisterItem, getItem, store]);
      props = {
        ...props,
        ref: useMergeRefs(ref, props.ref)
      };
      return removeUndefinedValues(props);
    }
  );
  var CollectionItem = forwardRef22(function CollectionItem2(props) {
    const htmlProps = useCollectionItem(props);
    return createElement3(TagName, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/SWN3JYXT.js
  var import_react8 = __toESM(require_react(), 1);
  var FocusableContext = (0, import_react8.createContext)(true);

  // node_modules/@ariakit/core/esm/utils/focus.js
  var selector = "input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";
  function isFocusable(element) {
    if (!element.matches(selector)) return false;
    if (!isVisible(element)) return false;
    if (element.closest("[inert]")) return false;
    return true;
  }
  function getClosestFocusable(element) {
    while (element && !isFocusable(element)) {
      element = element.closest(selector);
    }
    return element || null;
  }
  function hasFocus(element) {
    const activeElement = getActiveElement(element);
    if (!activeElement) return false;
    if (activeElement === element) return true;
    const activeDescendant = activeElement.getAttribute("aria-activedescendant");
    if (!activeDescendant) return false;
    return activeDescendant === element.id;
  }
  function hasFocusWithin(element) {
    const activeElement = getActiveElement(element);
    if (!activeElement) return false;
    if (contains(element, activeElement)) return true;
    const activeDescendant = activeElement.getAttribute("aria-activedescendant");
    if (!activeDescendant) return false;
    if (!("id" in element)) return false;
    if (activeDescendant === element.id) return true;
    return !!element.querySelector(`#${CSS.escape(activeDescendant)}`);
  }
  function focusIfNeeded(element) {
    if (!hasFocusWithin(element) && isFocusable(element)) {
      element.focus();
    }
  }
  function focusIntoView(element, options) {
    if (!("scrollIntoView" in element)) {
      element.focus();
    } else {
      element.focus({ preventScroll: true });
      element.scrollIntoView({ block: "nearest", inline: "nearest", ...options });
    }
  }

  // node_modules/@ariakit/react-core/esm/__chunks/U6HHPQDW.js
  var import_react9 = __toESM(require_react(), 1);
  var TagName2 = "div";
  var isSafariBrowser = isSafari();
  var alwaysFocusVisibleInputTypes = [
    "text",
    "search",
    "url",
    "tel",
    "email",
    "password",
    "number",
    "date",
    "month",
    "week",
    "time",
    "datetime",
    "datetime-local"
  ];
  var safariFocusAncestorSymbol = /* @__PURE__ */ Symbol("safariFocusAncestor");
  function markSafariFocusAncestor(element, value) {
    if (!element) return;
    element[safariFocusAncestorSymbol] = value;
  }
  function isAlwaysFocusVisible(element) {
    const { tagName, readOnly, type } = element;
    if (tagName === "TEXTAREA" && !readOnly) return true;
    if (tagName === "SELECT" && !readOnly) return true;
    if (tagName === "INPUT" && !readOnly) {
      return alwaysFocusVisibleInputTypes.includes(type);
    }
    if (element.isContentEditable) return true;
    const role = element.getAttribute("role");
    if (role === "combobox" && element.dataset.name) {
      return true;
    }
    return false;
  }
  function getLabels(element) {
    if ("labels" in element) {
      return element.labels;
    }
    return null;
  }
  function isNativeCheckboxOrRadio(element) {
    const tagName = element.tagName.toLowerCase();
    if (tagName === "input" && element.type) {
      return element.type === "radio" || element.type === "checkbox";
    }
    return false;
  }
  function isNativeTabbable(tagName) {
    if (!tagName) return true;
    return tagName === "button" || tagName === "summary" || tagName === "input" || tagName === "select" || tagName === "textarea" || tagName === "a";
  }
  function supportsDisabledAttribute(tagName) {
    if (!tagName) return true;
    return tagName === "button" || tagName === "input" || tagName === "select" || tagName === "textarea";
  }
  function getTabIndex(focusable, trulyDisabled, nativeTabbable, supportsDisabled, tabIndexProp) {
    if (!focusable) {
      return tabIndexProp;
    }
    if (trulyDisabled) {
      if (nativeTabbable && !supportsDisabled) {
        return -1;
      }
      return;
    }
    if (nativeTabbable) {
      return tabIndexProp;
    }
    return tabIndexProp || 0;
  }
  function useDisableEvent(onEvent, disabled) {
    return useEvent((event) => {
      onEvent == null ? void 0 : onEvent(event);
      if (event.defaultPrevented) return;
      if (disabled) {
        event.stopPropagation();
        event.preventDefault();
      }
    });
  }
  var hasInstalledGlobalEventListeners2 = false;
  var isKeyboardModality = true;
  function onGlobalMouseDown(event) {
    const target = event.target;
    if (target && "hasAttribute" in target) {
      if (!target.hasAttribute("data-focus-visible")) {
        isKeyboardModality = false;
      }
    }
  }
  function onGlobalKeyDown(event) {
    if (event.metaKey) return;
    if (event.ctrlKey) return;
    if (event.altKey) return;
    isKeyboardModality = true;
  }
  var useFocusable = createHook(
    function useFocusable2({
      focusable = true,
      accessibleWhenDisabled,
      autoFocus,
      onFocusVisible,
      ...props
    }) {
      const ref = (0, import_react9.useRef)(null);
      (0, import_react9.useEffect)(() => {
        if (!focusable) return;
        if (hasInstalledGlobalEventListeners2) return;
        addGlobalEventListener("mousedown", onGlobalMouseDown, true);
        addGlobalEventListener("keydown", onGlobalKeyDown, true);
        hasInstalledGlobalEventListeners2 = true;
      }, [focusable]);
      if (isSafariBrowser) {
        (0, import_react9.useEffect)(() => {
          if (!focusable) return;
          const element = ref.current;
          if (!element) return;
          if (!isNativeCheckboxOrRadio(element)) return;
          const labels = getLabels(element);
          if (!labels) return;
          const onMouseUp = () => queueMicrotask(() => element.focus());
          for (const label of labels) {
            label.addEventListener("mouseup", onMouseUp);
          }
          return () => {
            for (const label of labels) {
              label.removeEventListener("mouseup", onMouseUp);
            }
          };
        }, [focusable]);
      }
      const disabled = focusable && disabledFromProps(props);
      const trulyDisabled = !!disabled && !accessibleWhenDisabled;
      const [focusVisible, setFocusVisible] = (0, import_react9.useState)(false);
      (0, import_react9.useEffect)(() => {
        if (!focusable) return;
        if (trulyDisabled && focusVisible) {
          setFocusVisible(false);
        }
      }, [focusable, trulyDisabled, focusVisible]);
      (0, import_react9.useEffect)(() => {
        if (!focusable) return;
        if (!focusVisible) return;
        const element = ref.current;
        if (!element) return;
        if (typeof IntersectionObserver === "undefined") return;
        const observer = new IntersectionObserver(() => {
          if (!isFocusable(element)) {
            setFocusVisible(false);
          }
        });
        observer.observe(element);
        return () => observer.disconnect();
      }, [focusable, focusVisible]);
      const onKeyPressCapture = useDisableEvent(
        props.onKeyPressCapture,
        disabled
      );
      const onMouseDownCapture = useDisableEvent(
        props.onMouseDownCapture,
        disabled
      );
      const onClickCapture = useDisableEvent(props.onClickCapture, disabled);
      const onMouseDownProp = props.onMouseDown;
      const onMouseDown = useEvent((event) => {
        onMouseDownProp == null ? void 0 : onMouseDownProp(event);
        if (event.defaultPrevented) return;
        if (!focusable) return;
        const element = event.currentTarget;
        if (!isSafariBrowser) return;
        if (isPortalEvent(event)) return;
        if (!isButton(element) && !isNativeCheckboxOrRadio(element)) return;
        let receivedFocus = false;
        const onFocus = () => {
          receivedFocus = true;
        };
        const options = { capture: true, once: true };
        element.addEventListener("focusin", onFocus, options);
        const focusableContainer = getClosestFocusable(element.parentElement);
        markSafariFocusAncestor(focusableContainer, true);
        queueBeforeEvent(element, "mouseup", () => {
          element.removeEventListener("focusin", onFocus, true);
          markSafariFocusAncestor(focusableContainer, false);
          if (receivedFocus) return;
          focusIfNeeded(element);
        });
      });
      const handleFocusVisible = (event, currentTarget) => {
        if (currentTarget) {
          event.currentTarget = currentTarget;
        }
        if (!focusable) return;
        const element = event.currentTarget;
        if (!element) return;
        if (!hasFocus(element)) return;
        onFocusVisible == null ? void 0 : onFocusVisible(event);
        if (event.defaultPrevented) return;
        element.dataset.focusVisible = "true";
        setFocusVisible(true);
      };
      const onKeyDownCaptureProp = props.onKeyDownCapture;
      const onKeyDownCapture = useEvent((event) => {
        onKeyDownCaptureProp == null ? void 0 : onKeyDownCaptureProp(event);
        if (event.defaultPrevented) return;
        if (!focusable) return;
        if (focusVisible) return;
        if (event.metaKey) return;
        if (event.altKey) return;
        if (event.ctrlKey) return;
        if (!isSelfTarget(event)) return;
        const element = event.currentTarget;
        const applyFocusVisible = () => handleFocusVisible(event, element);
        queueBeforeEvent(element, "focusout", applyFocusVisible);
      });
      const onFocusCaptureProp = props.onFocusCapture;
      const onFocusCapture = useEvent((event) => {
        onFocusCaptureProp == null ? void 0 : onFocusCaptureProp(event);
        if (event.defaultPrevented) return;
        if (!focusable) return;
        if (!isSelfTarget(event)) {
          setFocusVisible(false);
          return;
        }
        const element = event.currentTarget;
        const applyFocusVisible = () => handleFocusVisible(event, element);
        if (isKeyboardModality || isAlwaysFocusVisible(event.target)) {
          queueBeforeEvent(event.target, "focusout", applyFocusVisible);
        } else {
          setFocusVisible(false);
        }
      });
      const onBlurProp = props.onBlur;
      const onBlur = useEvent((event) => {
        onBlurProp == null ? void 0 : onBlurProp(event);
        if (!focusable) return;
        if (!isFocusEventOutside(event)) return;
        event.currentTarget.removeAttribute("data-focus-visible");
        setFocusVisible(false);
      });
      const autoFocusOnShow = (0, import_react9.useContext)(FocusableContext);
      const autoFocusRef = useEvent((element) => {
        if (!focusable) return;
        if (!autoFocus) return;
        if (!element) return;
        if (!autoFocusOnShow) return;
        queueMicrotask(() => {
          if (hasFocus(element)) return;
          if (!isFocusable(element)) return;
          element.focus();
        });
      });
      const tagName = useTagName(ref);
      const nativeTabbable = focusable && isNativeTabbable(tagName);
      const supportsDisabled = focusable && supportsDisabledAttribute(tagName);
      const styleProp = props.style;
      const style = (0, import_react9.useMemo)(() => {
        if (trulyDisabled) {
          return { pointerEvents: "none", ...styleProp };
        }
        return styleProp;
      }, [trulyDisabled, styleProp]);
      props = {
        "data-focus-visible": focusable && focusVisible || void 0,
        "data-autofocus": autoFocus || void 0,
        "aria-disabled": disabled || void 0,
        ...props,
        ref: useMergeRefs(ref, autoFocusRef, props.ref),
        style,
        tabIndex: getTabIndex(
          focusable,
          trulyDisabled,
          nativeTabbable,
          supportsDisabled,
          props.tabIndex
        ),
        disabled: supportsDisabled && trulyDisabled ? true : void 0,
        // TODO: Test Focusable contentEditable.
        contentEditable: disabled ? void 0 : props.contentEditable,
        onKeyPressCapture,
        onClickCapture,
        onMouseDownCapture,
        onMouseDown,
        onKeyDownCapture,
        onFocusCapture,
        onBlur
      };
      return removeUndefinedValues(props);
    }
  );
  var Focusable = forwardRef22(function Focusable2(props) {
    const htmlProps = useFocusable(props);
    return createElement3(TagName2, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/PZ3OL7I2.js
  var import_react10 = __toESM(require_react(), 1);
  var TagName3 = "button";
  function isNativeClick(event) {
    if (!event.isTrusted) return false;
    const element = event.currentTarget;
    if (event.key === "Enter") {
      return isButton(element) || element.tagName === "SUMMARY" || element.tagName === "A";
    }
    if (event.key === " ") {
      return isButton(element) || element.tagName === "SUMMARY" || element.tagName === "INPUT" || element.tagName === "SELECT";
    }
    return false;
  }
  var symbol = /* @__PURE__ */ Symbol("command");
  var useCommand = createHook(
    function useCommand2({ clickOnEnter = true, clickOnSpace = true, ...props }) {
      const ref = (0, import_react10.useRef)(null);
      const [isNativeButton, setIsNativeButton] = (0, import_react10.useState)(false);
      (0, import_react10.useEffect)(() => {
        if (!ref.current) return;
        setIsNativeButton(isButton(ref.current));
      }, []);
      const [active, setActive] = (0, import_react10.useState)(false);
      const activeRef = (0, import_react10.useRef)(false);
      const disabled = disabledFromProps(props);
      const [isDuplicate, metadataProps] = useMetadataProps(props, symbol, true);
      const onKeyDownProp = props.onKeyDown;
      const onKeyDown = useEvent((event) => {
        onKeyDownProp == null ? void 0 : onKeyDownProp(event);
        const element = event.currentTarget;
        if (event.defaultPrevented) return;
        if (isDuplicate) return;
        if (disabled) return;
        if (!isSelfTarget(event)) return;
        if (isTextField(element)) return;
        if (element.isContentEditable) return;
        const isEnter = clickOnEnter && event.key === "Enter";
        const isSpace = clickOnSpace && event.key === " ";
        const shouldPreventEnter = event.key === "Enter" && !clickOnEnter;
        const shouldPreventSpace = event.key === " " && !clickOnSpace;
        if (shouldPreventEnter || shouldPreventSpace) {
          event.preventDefault();
          return;
        }
        if (isEnter || isSpace) {
          const nativeClick = isNativeClick(event);
          if (isEnter) {
            if (!nativeClick) {
              event.preventDefault();
              const { view, ...eventInit } = event;
              const click = () => fireClickEvent(element, eventInit);
              if (isFirefox()) {
                queueBeforeEvent(element, "keyup", click);
              } else {
                queueMicrotask(click);
              }
            }
          } else if (isSpace) {
            activeRef.current = true;
            if (!nativeClick) {
              event.preventDefault();
              setActive(true);
            }
          }
        }
      });
      const onKeyUpProp = props.onKeyUp;
      const onKeyUp = useEvent((event) => {
        onKeyUpProp == null ? void 0 : onKeyUpProp(event);
        if (event.defaultPrevented) return;
        if (isDuplicate) return;
        if (disabled) return;
        if (event.metaKey) return;
        const isSpace = clickOnSpace && event.key === " ";
        if (activeRef.current && isSpace) {
          activeRef.current = false;
          if (!isNativeClick(event)) {
            event.preventDefault();
            setActive(false);
            const element = event.currentTarget;
            const { view, ...eventInit } = event;
            queueMicrotask(() => fireClickEvent(element, eventInit));
          }
        }
      });
      props = {
        "data-active": active || void 0,
        type: isNativeButton ? "button" : void 0,
        ...metadataProps,
        ...props,
        ref: useMergeRefs(ref, props.ref),
        onKeyDown,
        onKeyUp
      };
      props = useFocusable(props);
      return props;
    }
  );
  var Command = forwardRef22(function Command2(props) {
    const htmlProps = useCommand(props);
    return createElement3(TagName3, htmlProps);
  });

  // node_modules/@ariakit/core/esm/__chunks/SXKM4CGU.js
  function getInternal(store, key) {
    const internals = store.__unstableInternals;
    invariant(internals, "Invalid store");
    return internals[key];
  }
  function createStore(initialState, ...stores) {
    let state = initialState;
    let prevStateBatch = state;
    let lastUpdate = /* @__PURE__ */ Symbol();
    let destroy = noop2;
    const instances = /* @__PURE__ */ new Set();
    const updatedKeys = /* @__PURE__ */ new Set();
    const setups = /* @__PURE__ */ new Set();
    const listeners = /* @__PURE__ */ new Set();
    const batchListeners = /* @__PURE__ */ new Set();
    const disposables = /* @__PURE__ */ new WeakMap();
    const listenerKeys = /* @__PURE__ */ new WeakMap();
    const storeSetup = (callback) => {
      setups.add(callback);
      return () => setups.delete(callback);
    };
    const storeInit = () => {
      const initialized = instances.size;
      const instance = /* @__PURE__ */ Symbol();
      instances.add(instance);
      const maybeDestroy = () => {
        instances.delete(instance);
        if (instances.size) return;
        destroy();
      };
      if (initialized) return maybeDestroy;
      const desyncs = getKeys(state).map(
        (key) => chain(
          ...stores.map((store) => {
            var _a;
            const storeState = (_a = store == null ? void 0 : store.getState) == null ? void 0 : _a.call(store);
            if (!storeState) return;
            if (!hasOwnProperty(storeState, key)) return;
            return sync(store, [key], (state2) => {
              setState(
                key,
                state2[key],
                // @ts-expect-error - Not public API. This is just to prevent
                // infinite loops.
                true
              );
            });
          })
        )
      );
      const teardowns = [];
      for (const setup2 of setups) {
        teardowns.push(setup2());
      }
      const cleanups = stores.map(init);
      destroy = chain(...desyncs, ...teardowns, ...cleanups);
      return maybeDestroy;
    };
    const sub = (keys, listener, set = listeners) => {
      set.add(listener);
      listenerKeys.set(listener, keys);
      return () => {
        var _a;
        (_a = disposables.get(listener)) == null ? void 0 : _a();
        disposables.delete(listener);
        listenerKeys.delete(listener);
        set.delete(listener);
      };
    };
    const storeSubscribe = (keys, listener) => sub(keys, listener);
    const storeSync = (keys, listener) => {
      disposables.set(listener, listener(state, state));
      return sub(keys, listener);
    };
    const storeBatch = (keys, listener) => {
      disposables.set(listener, listener(state, prevStateBatch));
      return sub(keys, listener, batchListeners);
    };
    const storePick = (keys) => createStore(pick(state, keys), finalStore);
    const storeOmit = (keys) => createStore(omit(state, keys), finalStore);
    const getState = () => state;
    const setState = (key, value, fromStores = false) => {
      var _a;
      if (!hasOwnProperty(state, key)) return;
      const nextValue = applyState(value, state[key]);
      if (nextValue === state[key]) return;
      if (!fromStores) {
        for (const store of stores) {
          (_a = store == null ? void 0 : store.setState) == null ? void 0 : _a.call(store, key, nextValue);
        }
      }
      const prevState = state;
      state = { ...state, [key]: nextValue };
      const thisUpdate = /* @__PURE__ */ Symbol();
      lastUpdate = thisUpdate;
      updatedKeys.add(key);
      const run = (listener, prev, uKeys) => {
        var _a2;
        const keys = listenerKeys.get(listener);
        const updated = (k) => uKeys ? uKeys.has(k) : k === key;
        if (!keys || keys.some(updated)) {
          (_a2 = disposables.get(listener)) == null ? void 0 : _a2();
          disposables.set(listener, listener(state, prev));
        }
      };
      for (const listener of listeners) {
        run(listener, prevState);
      }
      queueMicrotask(() => {
        if (lastUpdate !== thisUpdate) return;
        const snapshot = state;
        for (const listener of batchListeners) {
          run(listener, prevStateBatch, updatedKeys);
        }
        prevStateBatch = snapshot;
        updatedKeys.clear();
      });
    };
    const finalStore = {
      getState,
      setState,
      __unstableInternals: {
        setup: storeSetup,
        init: storeInit,
        subscribe: storeSubscribe,
        sync: storeSync,
        batch: storeBatch,
        pick: storePick,
        omit: storeOmit
      }
    };
    return finalStore;
  }
  function setup(store, ...args) {
    if (!store) return;
    return getInternal(store, "setup")(...args);
  }
  function init(store, ...args) {
    if (!store) return;
    return getInternal(store, "init")(...args);
  }
  function subscribe(store, ...args) {
    if (!store) return;
    return getInternal(store, "subscribe")(...args);
  }
  function sync(store, ...args) {
    if (!store) return;
    return getInternal(store, "sync")(...args);
  }
  function batch(store, ...args) {
    if (!store) return;
    return getInternal(store, "batch")(...args);
  }
  function omit2(store, ...args) {
    if (!store) return;
    return getInternal(store, "omit")(...args);
  }
  function pick2(store, ...args) {
    if (!store) return;
    return getInternal(store, "pick")(...args);
  }
  function mergeStore(...stores) {
    var _a;
    const initialState = {};
    for (const store2 of stores) {
      const nextState = (_a = store2 == null ? void 0 : store2.getState) == null ? void 0 : _a.call(store2);
      if (nextState) {
        Object.assign(initialState, nextState);
      }
    }
    const store = createStore(initialState, ...stores);
    return Object.assign({}, ...stores, store);
  }
  function throwOnConflictingProps(props, store) {
    if (false) return;
    if (!store) return;
    const defaultKeys = Object.entries(props).filter(([key, value]) => key.startsWith("default") && value !== void 0).map(([key]) => {
      var _a;
      const stateKey = key.replace("default", "");
      return `${((_a = stateKey[0]) == null ? void 0 : _a.toLowerCase()) || ""}${stateKey.slice(1)}`;
    });
    if (!defaultKeys.length) return;
    const storeState = store.getState();
    const conflictingProps = defaultKeys.filter(
      (key) => hasOwnProperty(storeState, key)
    );
    if (!conflictingProps.length) return;
    throw new Error(
      `Passing a store prop in conjunction with a default state is not supported.

const store = useSelectStore();
<SelectProvider store={store} defaultValue="Apple" />
                ^             ^

Instead, pass the default state to the topmost store:

const store = useSelectStore({ defaultValue: "Apple" });
<SelectProvider store={store} />

See https://github.com/ariakit/ariakit/pull/2745 for more details.

If there's a particular need for this, please submit a feature request at https://github.com/ariakit/ariakit
`
    );
  }

  // node_modules/@ariakit/react-core/esm/__chunks/Q5W46E73.js
  var React7 = __toESM(require_react(), 1);
  var import_shim = __toESM(require_shim(), 1);
  var { useSyncExternalStore } = import_shim.default;
  var noopSubscribe = () => () => {
  };
  function useStoreState(store, keyOrSelector = identity) {
    const storeSubscribe = React7.useCallback(
      (callback) => {
        if (!store) return noopSubscribe();
        return subscribe(store, null, callback);
      },
      [store]
    );
    const getSnapshot = () => {
      const key = typeof keyOrSelector === "string" ? keyOrSelector : null;
      const selector2 = typeof keyOrSelector === "function" ? keyOrSelector : null;
      const state = store == null ? void 0 : store.getState();
      if (selector2) return selector2(state);
      if (!state) return;
      if (!key) return;
      if (!hasOwnProperty(state, key)) return;
      return state[key];
    };
    return useSyncExternalStore(storeSubscribe, getSnapshot, getSnapshot);
  }
  function useStoreStateObject(store, object) {
    const objRef = React7.useRef(
      {}
    );
    const storeSubscribe = React7.useCallback(
      (callback) => {
        if (!store) return noopSubscribe();
        return subscribe(store, null, callback);
      },
      [store]
    );
    const getSnapshot = () => {
      const state = store == null ? void 0 : store.getState();
      let updated = false;
      const obj = objRef.current;
      for (const prop in object) {
        const keyOrSelector = object[prop];
        if (typeof keyOrSelector === "function") {
          const value = keyOrSelector(state);
          if (value !== obj[prop]) {
            obj[prop] = value;
            updated = true;
          }
        }
        if (typeof keyOrSelector === "string") {
          if (!state) continue;
          if (!hasOwnProperty(state, keyOrSelector)) continue;
          const value = state[keyOrSelector];
          if (value !== obj[prop]) {
            obj[prop] = value;
            updated = true;
          }
        }
      }
      if (updated) {
        objRef.current = { ...obj };
      }
      return objRef.current;
    };
    return useSyncExternalStore(storeSubscribe, getSnapshot, getSnapshot);
  }
  function useStoreProps(store, props, key, setKey) {
    const value = hasOwnProperty(props, key) ? props[key] : void 0;
    const setValue = setKey ? props[setKey] : void 0;
    const propsRef = useLiveRef({ value, setValue });
    useSafeLayoutEffect(() => {
      return sync(store, [key], (state, prev) => {
        const { value: value2, setValue: setValue2 } = propsRef.current;
        if (!setValue2) return;
        if (state[key] === prev[key]) return;
        if (state[key] === value2) return;
        setValue2(state[key]);
      });
    }, [store, key]);
    useSafeLayoutEffect(() => {
      if (value === void 0) return;
      store.setState(key, value);
      return batch(store, [key], () => {
        if (value === void 0) return;
        store.setState(key, value);
      });
    });
  }
  function useStore(createStore2, props) {
    const [store, setStore] = React7.useState(() => createStore2(props));
    useSafeLayoutEffect(() => init(store), [store]);
    const useState28 = React7.useCallback(
      (keyOrSelector) => useStoreState(store, keyOrSelector),
      [store]
    );
    const memoizedStore = React7.useMemo(
      () => ({ ...store, useState: useState28 }),
      [store, useState28]
    );
    const updateStore = useEvent(() => {
      setStore((store2) => createStore2({ ...props, ...store2.getState() }));
    });
    return [memoizedStore, updateStore];
  }

  // node_modules/@ariakit/react-core/esm/__chunks/WZWDIE3S.js
  var import_react11 = __toESM(require_react(), 1);
  var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
  var TagName4 = "button";
  function isEditableElement(element) {
    if (isTextbox(element)) return true;
    return element.tagName === "INPUT" && !isButton(element);
  }
  function getNextPageOffset(scrollingElement, pageUp = false) {
    const height = scrollingElement.clientHeight;
    const { top } = scrollingElement.getBoundingClientRect();
    const pageSize = Math.max(height * 0.875, height - 40) * 1.5;
    const pageOffset = pageUp ? height - pageSize + top : pageSize + top;
    if (scrollingElement.tagName === "HTML") {
      return pageOffset + scrollingElement.scrollTop;
    }
    return pageOffset;
  }
  function getItemOffset(itemElement, pageUp = false) {
    const { top } = itemElement.getBoundingClientRect();
    if (pageUp) {
      return top + itemElement.clientHeight;
    }
    return top;
  }
  function findNextPageItemId(element, store, next, pageUp = false) {
    var _a;
    if (!store) return;
    if (!next) return;
    const { renderedItems } = store.getState();
    const scrollingElement = getScrollingElement(element);
    if (!scrollingElement) return;
    const nextPageOffset = getNextPageOffset(scrollingElement, pageUp);
    let id;
    let prevDifference;
    for (let i2 = 0; i2 < renderedItems.length; i2 += 1) {
      const previousId = id;
      id = next(i2);
      if (!id) break;
      if (id === previousId) continue;
      const itemElement = (_a = getEnabledItem(store, id)) == null ? void 0 : _a.element;
      if (!itemElement) continue;
      const itemOffset = getItemOffset(itemElement, pageUp);
      const difference = itemOffset - nextPageOffset;
      const absDifference = Math.abs(difference);
      if (pageUp && difference <= 0 || !pageUp && difference >= 0) {
        if (prevDifference !== void 0 && prevDifference < absDifference) {
          id = previousId;
        }
        break;
      }
      prevDifference = absDifference;
    }
    return id;
  }
  function targetIsAnotherItem(event, store) {
    if (isSelfTarget(event)) return false;
    return isItem(store, event.target);
  }
  var useCompositeItem = createHook(
    function useCompositeItem2({
      store,
      rowId: rowIdProp,
      preventScrollOnKeyDown = false,
      moveOnKeyPress = true,
      tabbable = false,
      getItem: getItemProp,
      "aria-setsize": ariaSetSizeProp,
      "aria-posinset": ariaPosInSetProp,
      ...props
    }) {
      const context = useCompositeContext();
      store = store || context;
      const id = useId3(props.id);
      const ref = (0, import_react11.useRef)(null);
      const row = (0, import_react11.useContext)(CompositeRowContext);
      const disabled = disabledFromProps(props);
      const trulyDisabled = disabled && !props.accessibleWhenDisabled;
      const {
        rowId,
        baseElement,
        isActiveItem,
        ariaSetSize,
        ariaPosInSet,
        isTabbable
      } = useStoreStateObject(store, {
        rowId(state) {
          if (rowIdProp) return rowIdProp;
          if (!state) return;
          if (!(row == null ? void 0 : row.baseElement)) return;
          if (row.baseElement !== state.baseElement) return;
          return row.id;
        },
        baseElement(state) {
          return (state == null ? void 0 : state.baseElement) || void 0;
        },
        isActiveItem(state) {
          return !!state && state.activeId === id;
        },
        ariaSetSize(state) {
          if (ariaSetSizeProp != null) return ariaSetSizeProp;
          if (!state) return;
          if (!(row == null ? void 0 : row.ariaSetSize)) return;
          if (row.baseElement !== state.baseElement) return;
          return row.ariaSetSize;
        },
        ariaPosInSet(state) {
          if (ariaPosInSetProp != null) return ariaPosInSetProp;
          if (!state) return;
          if (!(row == null ? void 0 : row.ariaPosInSet)) return;
          if (row.baseElement !== state.baseElement) return;
          const itemsInRow = state.renderedItems.filter(
            (item) => item.rowId === rowId
          );
          return row.ariaPosInSet + itemsInRow.findIndex((item) => item.id === id);
        },
        isTabbable(state) {
          if (!(state == null ? void 0 : state.renderedItems.length)) return true;
          if (state.virtualFocus) return false;
          if (tabbable) return true;
          if (state.activeId === null) return false;
          const item = store == null ? void 0 : store.item(state.activeId);
          if (item == null ? void 0 : item.disabled) return true;
          if (!(item == null ? void 0 : item.element)) return true;
          return state.activeId === id;
        }
      });
      const getItem = (0, import_react11.useCallback)(
        (item) => {
          var _a;
          const nextItem = {
            ...item,
            id: id || item.id,
            rowId,
            disabled: !!trulyDisabled,
            children: (_a = item.element) == null ? void 0 : _a.textContent
          };
          if (getItemProp) {
            return getItemProp(nextItem);
          }
          return nextItem;
        },
        [id, rowId, trulyDisabled, getItemProp]
      );
      const onFocusProp = props.onFocus;
      const hasFocusedComposite = (0, import_react11.useRef)(false);
      const onFocus = useEvent((event) => {
        onFocusProp == null ? void 0 : onFocusProp(event);
        if (event.defaultPrevented) return;
        if (isPortalEvent(event)) return;
        if (!id) return;
        if (!store) return;
        if (targetIsAnotherItem(event, store)) return;
        const { virtualFocus, baseElement: baseElement2 } = store.getState();
        store.setActiveId(id);
        if (isTextbox(event.currentTarget)) {
          selectTextField(event.currentTarget);
        }
        if (!virtualFocus) return;
        if (!isSelfTarget(event)) return;
        if (isEditableElement(event.currentTarget)) return;
        if (!(baseElement2 == null ? void 0 : baseElement2.isConnected)) return;
        if (isSafari() && event.currentTarget.hasAttribute("data-autofocus")) {
          event.currentTarget.scrollIntoView({
            block: "nearest",
            inline: "nearest"
          });
        }
        hasFocusedComposite.current = true;
        const fromComposite = event.relatedTarget === baseElement2 || isItem(store, event.relatedTarget);
        if (fromComposite) {
          focusSilently(baseElement2);
        } else {
          baseElement2.focus();
        }
      });
      const onBlurCaptureProp = props.onBlurCapture;
      const onBlurCapture = useEvent((event) => {
        onBlurCaptureProp == null ? void 0 : onBlurCaptureProp(event);
        if (event.defaultPrevented) return;
        const state = store == null ? void 0 : store.getState();
        if ((state == null ? void 0 : state.virtualFocus) && hasFocusedComposite.current) {
          hasFocusedComposite.current = false;
          event.preventDefault();
          event.stopPropagation();
        }
      });
      const onKeyDownProp = props.onKeyDown;
      const preventScrollOnKeyDownProp = useBooleanEvent(preventScrollOnKeyDown);
      const moveOnKeyPressProp = useBooleanEvent(moveOnKeyPress);
      const onKeyDown = useEvent((event) => {
        onKeyDownProp == null ? void 0 : onKeyDownProp(event);
        if (event.defaultPrevented) return;
        if (!isSelfTarget(event)) return;
        if (!store) return;
        const { currentTarget } = event;
        const state = store.getState();
        const item = store.item(id);
        const isGrid2 = !!(item == null ? void 0 : item.rowId);
        const isVertical = state.orientation !== "horizontal";
        const isHorizontal = state.orientation !== "vertical";
        const canHomeEnd = () => {
          if (isGrid2) return true;
          if (isHorizontal) return true;
          if (!state.baseElement) return true;
          if (!isTextField(state.baseElement)) return true;
          return false;
        };
        const keyMap = {
          ArrowUp: (isGrid2 || isVertical) && store.up,
          ArrowRight: (isGrid2 || isHorizontal) && store.next,
          ArrowDown: (isGrid2 || isVertical) && store.down,
          ArrowLeft: (isGrid2 || isHorizontal) && store.previous,
          Home: () => {
            if (!canHomeEnd()) return;
            if (!isGrid2 || event.ctrlKey) {
              return store == null ? void 0 : store.first();
            }
            return store == null ? void 0 : store.previous(-1);
          },
          End: () => {
            if (!canHomeEnd()) return;
            if (!isGrid2 || event.ctrlKey) {
              return store == null ? void 0 : store.last();
            }
            return store == null ? void 0 : store.next(-1);
          },
          PageUp: () => {
            return findNextPageItemId(currentTarget, store, store == null ? void 0 : store.up, true);
          },
          PageDown: () => {
            return findNextPageItemId(currentTarget, store, store == null ? void 0 : store.down);
          }
        };
        const action = keyMap[event.key];
        if (action) {
          if (isTextbox(currentTarget)) {
            const selection = getTextboxSelection(currentTarget);
            const isLeft = isHorizontal && event.key === "ArrowLeft";
            const isRight = isHorizontal && event.key === "ArrowRight";
            const isUp = isVertical && event.key === "ArrowUp";
            const isDown = isVertical && event.key === "ArrowDown";
            if (isRight || isDown) {
              const { length: valueLength } = getTextboxValue(currentTarget);
              if (selection.end !== valueLength) return;
            } else if ((isLeft || isUp) && selection.start !== 0) return;
          }
          const nextId = action();
          if (preventScrollOnKeyDownProp(event) || nextId !== void 0) {
            if (!moveOnKeyPressProp(event)) return;
            event.preventDefault();
            store.move(nextId);
          }
        }
      });
      const providerValue = (0, import_react11.useMemo)(
        () => ({ id, baseElement }),
        [id, baseElement]
      );
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(CompositeItemContext.Provider, { value: providerValue, children: element }),
        [providerValue]
      );
      props = {
        id,
        "data-active-item": isActiveItem || void 0,
        ...props,
        ref: useMergeRefs(ref, props.ref),
        tabIndex: isTabbable ? props.tabIndex : -1,
        onFocus,
        onBlurCapture,
        onKeyDown
      };
      props = useCommand(props);
      props = useCollectionItem({
        store,
        ...props,
        getItem,
        shouldRegisterItem: id ? props.shouldRegisterItem : false
      });
      return removeUndefinedValues({
        ...props,
        "aria-setsize": ariaSetSize,
        "aria-posinset": ariaPosInSet
      });
    }
  );
  var CompositeItem = memo22(
    forwardRef22(function CompositeItem2(props) {
      const htmlProps = useCompositeItem(props);
      return createElement3(TagName4, htmlProps);
    })
  );

  // node_modules/@ariakit/core/esm/__chunks/7PRQYBBV.js
  function toArray(arg) {
    if (Array.isArray(arg)) {
      return arg;
    }
    return typeof arg !== "undefined" ? [arg] : [];
  }
  function flatten2DArray(array) {
    const flattened = [];
    for (const row of array) {
      flattened.push(...row);
    }
    return flattened;
  }
  function reverseArray(array) {
    return array.slice().reverse();
  }

  // node_modules/@ariakit/react-core/esm/__chunks/ZMWF7ASR.js
  var import_react12 = __toESM(require_react(), 1);
  var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
  var TagName5 = "div";
  function isGrid(items) {
    return items.some((item) => !!item.rowId);
  }
  function isPrintableKey(event) {
    const target = event.target;
    if (target && !isTextField(target)) return false;
    return event.key.length === 1 && !event.ctrlKey && !event.metaKey;
  }
  function isModifierKey(event) {
    return event.key === "Shift" || event.key === "Control" || event.key === "Alt" || event.key === "Meta";
  }
  function useKeyboardEventProxy(store, onKeyboardEvent, previousElementRef) {
    return useEvent((event) => {
      var _a;
      onKeyboardEvent == null ? void 0 : onKeyboardEvent(event);
      if (event.defaultPrevented) return;
      if (event.isPropagationStopped()) return;
      if (!isSelfTarget(event)) return;
      if (isModifierKey(event)) return;
      if (isPrintableKey(event)) return;
      const state = store.getState();
      const activeElement = (_a = getEnabledItem(store, state.activeId)) == null ? void 0 : _a.element;
      if (!activeElement) return;
      const { view, ...eventInit } = event;
      const previousElement = previousElementRef == null ? void 0 : previousElementRef.current;
      if (activeElement !== previousElement) {
        activeElement.focus();
      }
      if (!fireKeyboardEvent(activeElement, event.type, eventInit)) {
        event.preventDefault();
      }
      if (event.currentTarget.contains(activeElement)) {
        event.stopPropagation();
      }
    });
  }
  function findFirstEnabledItemInTheLastRow(items) {
    return findFirstEnabledItem(
      flatten2DArray(reverseArray(groupItemsByRows(items)))
    );
  }
  function useScheduleFocus(store) {
    const [scheduled, setScheduled] = (0, import_react12.useState)(false);
    const schedule = (0, import_react12.useCallback)(() => setScheduled(true), []);
    const activeItem = store.useState(
      (state) => getEnabledItem(store, state.activeId)
    );
    (0, import_react12.useEffect)(() => {
      const activeElement = activeItem == null ? void 0 : activeItem.element;
      if (!scheduled) return;
      if (!activeElement) return;
      setScheduled(false);
      activeElement.focus({ preventScroll: true });
    }, [activeItem, scheduled]);
    return schedule;
  }
  var useComposite = createHook(
    function useComposite2({
      store,
      composite = true,
      focusOnMove = composite,
      moveOnKeyPress = true,
      ...props
    }) {
      const context = useCompositeProviderContext();
      store = store || context;
      invariant(
        store,
        "Composite must receive a `store` prop or be wrapped in a CompositeProvider component."
      );
      const ref = (0, import_react12.useRef)(null);
      const previousElementRef = (0, import_react12.useRef)(null);
      const scheduleFocus = useScheduleFocus(store);
      const moves = store.useState("moves");
      const [, setBaseElement] = useTransactionState(
        composite ? store.setBaseElement : null
      );
      (0, import_react12.useEffect)(() => {
        var _a;
        if (!store) return;
        if (!moves) return;
        if (!composite) return;
        if (!focusOnMove) return;
        const { activeId: activeId2 } = store.getState();
        const itemElement = (_a = getEnabledItem(store, activeId2)) == null ? void 0 : _a.element;
        if (!itemElement) return;
        focusIntoView(itemElement);
      }, [store, moves, composite, focusOnMove]);
      useSafeLayoutEffect(() => {
        if (!store) return;
        if (!moves) return;
        if (!composite) return;
        const { baseElement, activeId: activeId2 } = store.getState();
        const isSelfAcive = activeId2 === null;
        if (!isSelfAcive) return;
        if (!baseElement) return;
        const previousElement = previousElementRef.current;
        previousElementRef.current = null;
        if (previousElement) {
          fireBlurEvent(previousElement, { relatedTarget: baseElement });
        }
        if (!hasFocus(baseElement)) {
          baseElement.focus();
        }
      }, [store, moves, composite]);
      const activeId = store.useState("activeId");
      const virtualFocus = store.useState("virtualFocus");
      useSafeLayoutEffect(() => {
        var _a;
        if (!store) return;
        if (!composite) return;
        if (!virtualFocus) return;
        const previousElement = previousElementRef.current;
        previousElementRef.current = null;
        if (!previousElement) return;
        const activeElement = (_a = getEnabledItem(store, activeId)) == null ? void 0 : _a.element;
        const relatedTarget = activeElement || getActiveElement(previousElement);
        if (relatedTarget === previousElement) return;
        fireBlurEvent(previousElement, { relatedTarget });
      }, [store, activeId, virtualFocus, composite]);
      const onKeyDownCapture = useKeyboardEventProxy(
        store,
        props.onKeyDownCapture,
        previousElementRef
      );
      const onKeyUpCapture = useKeyboardEventProxy(
        store,
        props.onKeyUpCapture,
        previousElementRef
      );
      const onFocusCaptureProp = props.onFocusCapture;
      const onFocusCapture = useEvent((event) => {
        onFocusCaptureProp == null ? void 0 : onFocusCaptureProp(event);
        if (event.defaultPrevented) return;
        if (!store) return;
        const { virtualFocus: virtualFocus2 } = store.getState();
        if (!virtualFocus2) return;
        const previousActiveElement = event.relatedTarget;
        const isSilentlyFocused = silentlyFocused(event.currentTarget);
        if (isSelfTarget(event) && isSilentlyFocused) {
          event.stopPropagation();
          previousElementRef.current = previousActiveElement;
        }
      });
      const onFocusProp = props.onFocus;
      const onFocus = useEvent((event) => {
        onFocusProp == null ? void 0 : onFocusProp(event);
        if (event.defaultPrevented) return;
        if (!composite) return;
        if (!store) return;
        const { relatedTarget } = event;
        const { virtualFocus: virtualFocus2 } = store.getState();
        if (virtualFocus2) {
          if (isSelfTarget(event) && !isItem(store, relatedTarget)) {
            queueMicrotask(scheduleFocus);
          }
        } else if (isSelfTarget(event)) {
          store.setActiveId(null);
        }
      });
      const onBlurCaptureProp = props.onBlurCapture;
      const onBlurCapture = useEvent((event) => {
        var _a;
        onBlurCaptureProp == null ? void 0 : onBlurCaptureProp(event);
        if (event.defaultPrevented) return;
        if (!store) return;
        const { virtualFocus: virtualFocus2, activeId: activeId2 } = store.getState();
        if (!virtualFocus2) return;
        const activeElement = (_a = getEnabledItem(store, activeId2)) == null ? void 0 : _a.element;
        const nextActiveElement = event.relatedTarget;
        const nextActiveElementIsItem = isItem(store, nextActiveElement);
        const previousElement = previousElementRef.current;
        previousElementRef.current = null;
        if (isSelfTarget(event) && nextActiveElementIsItem) {
          if (nextActiveElement === activeElement) {
            if (previousElement && previousElement !== nextActiveElement) {
              fireBlurEvent(previousElement, event);
            }
          } else if (activeElement) {
            fireBlurEvent(activeElement, event);
          } else if (previousElement) {
            fireBlurEvent(previousElement, event);
          }
          event.stopPropagation();
        } else {
          const targetIsItem = isItem(store, event.target);
          if (!targetIsItem && activeElement) {
            fireBlurEvent(activeElement, event);
          }
        }
      });
      const onKeyDownProp = props.onKeyDown;
      const moveOnKeyPressProp = useBooleanEvent(moveOnKeyPress);
      const onKeyDown = useEvent((event) => {
        var _a;
        onKeyDownProp == null ? void 0 : onKeyDownProp(event);
        if (event.nativeEvent.isComposing) return;
        if (event.defaultPrevented) return;
        if (!store) return;
        if (!isSelfTarget(event)) return;
        const { orientation, renderedItems, activeId: activeId2 } = store.getState();
        const activeItem = getEnabledItem(store, activeId2);
        if ((_a = activeItem == null ? void 0 : activeItem.element) == null ? void 0 : _a.isConnected) return;
        const isVertical = orientation !== "horizontal";
        const isHorizontal = orientation !== "vertical";
        const grid = isGrid(renderedItems);
        const isHorizontalKey = event.key === "ArrowLeft" || event.key === "ArrowRight" || event.key === "Home" || event.key === "End";
        if (isHorizontalKey && isTextField(event.currentTarget)) return;
        const up = () => {
          if (grid) {
            const item = findFirstEnabledItemInTheLastRow(renderedItems);
            return item == null ? void 0 : item.id;
          }
          return store == null ? void 0 : store.last();
        };
        const keyMap = {
          ArrowUp: (grid || isVertical) && up,
          ArrowRight: (grid || isHorizontal) && store.first,
          ArrowDown: (grid || isVertical) && store.first,
          ArrowLeft: (grid || isHorizontal) && store.last,
          Home: store.first,
          End: store.last,
          PageUp: store.first,
          PageDown: store.last
        };
        const action = keyMap[event.key];
        if (action) {
          const id = action();
          if (id !== void 0) {
            if (!moveOnKeyPressProp(event)) return;
            event.preventDefault();
            store.move(id);
          }
        }
      });
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(CompositeContextProvider, { value: store, children: element }),
        [store]
      );
      const activeDescendant = store.useState((state) => {
        var _a;
        if (!store) return;
        if (!composite) return;
        if (!state.virtualFocus) return;
        return (_a = getEnabledItem(store, state.activeId)) == null ? void 0 : _a.id;
      });
      props = {
        "aria-activedescendant": activeDescendant,
        ...props,
        ref: useMergeRefs(ref, setBaseElement, props.ref),
        onKeyDownCapture,
        onKeyUpCapture,
        onFocusCapture,
        onFocus,
        onBlurCapture,
        onKeyDown
      };
      const focusable = store.useState(
        (state) => composite && (state.virtualFocus || state.activeId === null)
      );
      props = useFocusable({ focusable, ...props });
      return props;
    }
  );
  var Composite5 = forwardRef22(function Composite22(props) {
    const htmlProps = useComposite(props);
    return createElement3(TagName5, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/LVDQFHCH.js
  var ctx3 = createStoreContext();
  var useDisclosureContext = ctx3.useContext;
  var useDisclosureScopedContext = ctx3.useScopedContext;
  var useDisclosureProviderContext = ctx3.useProviderContext;
  var DisclosureContextProvider = ctx3.ContextProvider;
  var DisclosureScopedContextProvider = ctx3.ScopedContextProvider;

  // node_modules/@ariakit/react-core/esm/__chunks/A62MDFCW.js
  var import_react13 = __toESM(require_react(), 1);
  var ctx4 = createStoreContext(
    [DisclosureContextProvider],
    [DisclosureScopedContextProvider]
  );
  var useDialogContext = ctx4.useContext;
  var useDialogScopedContext = ctx4.useScopedContext;
  var useDialogProviderContext = ctx4.useProviderContext;
  var DialogContextProvider = ctx4.ContextProvider;
  var DialogScopedContextProvider = ctx4.ScopedContextProvider;
  var DialogHeadingContext = (0, import_react13.createContext)(void 0);
  var DialogDescriptionContext = (0, import_react13.createContext)(void 0);

  // node_modules/@ariakit/react-core/esm/__chunks/6B3RXHKP.js
  var import_react14 = __toESM(require_react(), 1);
  var import_react_dom = __toESM(require_react_dom(), 1);
  var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
  var TagName6 = "div";
  function afterTimeout(timeoutMs, cb) {
    const timeoutId = setTimeout(cb, timeoutMs);
    return () => clearTimeout(timeoutId);
  }
  function afterPaint2(cb) {
    let raf = requestAnimationFrame(() => {
      raf = requestAnimationFrame(cb);
    });
    return () => cancelAnimationFrame(raf);
  }
  function parseCSSTime(...times) {
    return times.join(", ").split(", ").reduce((longestTime, currentTimeString) => {
      const multiplier = currentTimeString.endsWith("ms") ? 1 : 1e3;
      const currentTime = Number.parseFloat(currentTimeString || "0s") * multiplier;
      if (currentTime > longestTime) return currentTime;
      return longestTime;
    }, 0);
  }
  function isHidden(mounted, hidden, alwaysVisible) {
    return !alwaysVisible && hidden !== false && (!mounted || !!hidden);
  }
  var useDisclosureContent = createHook(function useDisclosureContent2({ store, alwaysVisible, ...props }) {
    const context = useDisclosureProviderContext();
    store = store || context;
    invariant(
      store,
      "DisclosureContent must receive a `store` prop or be wrapped in a DisclosureProvider component."
    );
    const ref = (0, import_react14.useRef)(null);
    const id = useId3(props.id);
    const [transition, setTransition] = (0, import_react14.useState)(null);
    const open = store.useState("open");
    const mounted = store.useState("mounted");
    const animated = store.useState("animated");
    const contentElement = store.useState("contentElement");
    const otherElement = useStoreState(store.disclosure, "contentElement");
    useSafeLayoutEffect(() => {
      if (!ref.current) return;
      store == null ? void 0 : store.setContentElement(ref.current);
    }, [store]);
    useSafeLayoutEffect(() => {
      let previousAnimated;
      store == null ? void 0 : store.setState("animated", (animated2) => {
        previousAnimated = animated2;
        return true;
      });
      return () => {
        if (previousAnimated === void 0) return;
        store == null ? void 0 : store.setState("animated", previousAnimated);
      };
    }, [store]);
    useSafeLayoutEffect(() => {
      if (!animated) return;
      if (!(contentElement == null ? void 0 : contentElement.isConnected)) {
        setTransition(null);
        return;
      }
      return afterPaint2(() => {
        setTransition(open ? "enter" : mounted ? "leave" : null);
      });
    }, [animated, contentElement, open, mounted]);
    useSafeLayoutEffect(() => {
      if (!store) return;
      if (!animated) return;
      if (!transition) return;
      if (!contentElement) return;
      const stopAnimation = () => store == null ? void 0 : store.setState("animating", false);
      const stopAnimationSync = () => (0, import_react_dom.flushSync)(stopAnimation);
      if (transition === "leave" && open) return;
      if (transition === "enter" && !open) return;
      if (typeof animated === "number") {
        const timeout2 = animated;
        return afterTimeout(timeout2, stopAnimationSync);
      }
      const {
        transitionDuration,
        animationDuration,
        transitionDelay,
        animationDelay
      } = getComputedStyle(contentElement);
      const {
        transitionDuration: transitionDuration2 = "0",
        animationDuration: animationDuration2 = "0",
        transitionDelay: transitionDelay2 = "0",
        animationDelay: animationDelay2 = "0"
      } = otherElement ? getComputedStyle(otherElement) : {};
      const delay = parseCSSTime(
        transitionDelay,
        animationDelay,
        transitionDelay2,
        animationDelay2
      );
      const duration = parseCSSTime(
        transitionDuration,
        animationDuration,
        transitionDuration2,
        animationDuration2
      );
      const timeout = delay + duration;
      if (!timeout) {
        if (transition === "enter") {
          store.setState("animated", false);
        }
        stopAnimation();
        return;
      }
      const frameRate = 1e3 / 60;
      const maxTimeout = Math.max(timeout - frameRate, 0);
      return afterTimeout(maxTimeout, stopAnimationSync);
    }, [store, animated, contentElement, otherElement, open, transition]);
    props = useWrapElement(
      props,
      (element) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(DialogScopedContextProvider, { value: store, children: element }),
      [store]
    );
    const hidden = isHidden(mounted, props.hidden, alwaysVisible);
    const styleProp = props.style;
    const style = (0, import_react14.useMemo)(() => {
      if (hidden) {
        return { ...styleProp, display: "none" };
      }
      return styleProp;
    }, [hidden, styleProp]);
    props = {
      id,
      "data-open": open || void 0,
      "data-enter": transition === "enter" || void 0,
      "data-leave": transition === "leave" || void 0,
      hidden,
      ...props,
      ref: useMergeRefs(id ? store.setContentElement : null, ref, props.ref),
      style
    };
    return removeUndefinedValues(props);
  });
  var DisclosureContentImpl = forwardRef22(function DisclosureContentImpl2(props) {
    const htmlProps = useDisclosureContent(props);
    return createElement3(TagName6, htmlProps);
  });
  var DisclosureContent = forwardRef22(function DisclosureContent2({
    unmountOnHide,
    ...props
  }) {
    const context = useDisclosureProviderContext();
    const store = props.store || context;
    const mounted = useStoreState(
      store,
      (state) => !unmountOnHide || (state == null ? void 0 : state.mounted)
    );
    if (mounted === false) return null;
    return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(DisclosureContentImpl, { ...props });
  });

  // node_modules/@ariakit/core/esm/__chunks/75BJEVSH.js
  function createDisclosureStore(props = {}) {
    const store = mergeStore(
      props.store,
      omit2(props.disclosure, ["contentElement", "disclosureElement"])
    );
    throwOnConflictingProps(props, store);
    const syncState = store == null ? void 0 : store.getState();
    const open = defaultValue(
      props.open,
      syncState == null ? void 0 : syncState.open,
      props.defaultOpen,
      false
    );
    const animated = defaultValue(props.animated, syncState == null ? void 0 : syncState.animated, false);
    const initialState = {
      open,
      animated,
      animating: !!animated && open,
      mounted: open,
      contentElement: defaultValue(syncState == null ? void 0 : syncState.contentElement, null),
      disclosureElement: defaultValue(syncState == null ? void 0 : syncState.disclosureElement, null)
    };
    const disclosure = createStore(initialState, store);
    setup(
      disclosure,
      () => sync(disclosure, ["animated", "animating"], (state) => {
        if (state.animated) return;
        disclosure.setState("animating", false);
      })
    );
    setup(
      disclosure,
      () => subscribe(disclosure, ["open"], () => {
        if (!disclosure.getState().animated) return;
        disclosure.setState("animating", true);
      })
    );
    setup(
      disclosure,
      () => sync(disclosure, ["open", "animating"], (state) => {
        disclosure.setState("mounted", state.open || state.animating);
      })
    );
    return {
      ...disclosure,
      disclosure: props.disclosure,
      setOpen: (value) => disclosure.setState("open", value),
      show: () => disclosure.setState("open", true),
      hide: () => disclosure.setState("open", false),
      toggle: () => disclosure.setState("open", (open2) => !open2),
      stopAnimation: () => disclosure.setState("animating", false),
      setContentElement: (value) => disclosure.setState("contentElement", value),
      setDisclosureElement: (value) => disclosure.setState("disclosureElement", value)
    };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/WLZ6H5FH.js
  function useDisclosureStoreProps(store, update2, props) {
    useUpdateEffect(update2, [props.store, props.disclosure]);
    useStoreProps(store, props, "open", "setOpen");
    useStoreProps(store, props, "mounted", "setMounted");
    useStoreProps(store, props, "animated");
    return Object.assign(store, { disclosure: props.disclosure });
  }

  // node_modules/@ariakit/react-core/esm/__chunks/JMU4N4M5.js
  var ctx5 = createStoreContext(
    [DialogContextProvider],
    [DialogScopedContextProvider]
  );
  var usePopoverContext = ctx5.useContext;
  var usePopoverScopedContext = ctx5.useScopedContext;
  var usePopoverProviderContext = ctx5.useProviderContext;
  var PopoverContextProvider = ctx5.ContextProvider;
  var PopoverScopedContextProvider = ctx5.ScopedContextProvider;

  // node_modules/@ariakit/core/esm/__chunks/N5XGANPW.js
  function getCommonParent(items) {
    var _a;
    const firstItem = items.find((item) => !!item.element);
    const lastItem = [...items].reverse().find((item) => !!item.element);
    let parentElement = (_a = firstItem == null ? void 0 : firstItem.element) == null ? void 0 : _a.parentElement;
    while (parentElement && (lastItem == null ? void 0 : lastItem.element)) {
      const parent = parentElement;
      if (lastItem && parent.contains(lastItem.element)) {
        return parentElement;
      }
      parentElement = parentElement.parentElement;
    }
    return getDocument(parentElement).body;
  }
  function getPrivateStore(store) {
    return store == null ? void 0 : store.__unstablePrivateStore;
  }
  function createCollectionStore(props = {}) {
    var _a;
    throwOnConflictingProps(props, props.store);
    const syncState = (_a = props.store) == null ? void 0 : _a.getState();
    const items = defaultValue(
      props.items,
      syncState == null ? void 0 : syncState.items,
      props.defaultItems,
      []
    );
    const itemsMap = new Map(items.map((item) => [item.id, item]));
    const initialState = {
      items,
      renderedItems: defaultValue(syncState == null ? void 0 : syncState.renderedItems, [])
    };
    const syncPrivateStore = getPrivateStore(props.store);
    const privateStore = createStore(
      { items, renderedItems: initialState.renderedItems },
      syncPrivateStore
    );
    const collection = createStore(initialState, props.store);
    const sortItems = (renderedItems) => {
      const sortedItems = sortBasedOnDOMPosition(renderedItems, (i2) => i2.element);
      privateStore.setState("renderedItems", sortedItems);
      collection.setState("renderedItems", sortedItems);
    };
    setup(collection, () => init(privateStore));
    setup(privateStore, () => {
      return batch(privateStore, ["items"], (state) => {
        collection.setState("items", state.items);
      });
    });
    setup(privateStore, () => {
      return batch(privateStore, ["renderedItems"], (state) => {
        let firstRun = true;
        let raf = requestAnimationFrame(() => {
          const { renderedItems } = collection.getState();
          if (state.renderedItems === renderedItems) return;
          sortItems(state.renderedItems);
        });
        if (typeof IntersectionObserver !== "function") {
          return () => cancelAnimationFrame(raf);
        }
        const ioCallback = () => {
          if (firstRun) {
            firstRun = false;
            return;
          }
          cancelAnimationFrame(raf);
          raf = requestAnimationFrame(() => sortItems(state.renderedItems));
        };
        const root = getCommonParent(state.renderedItems);
        const observer = new IntersectionObserver(ioCallback, { root });
        for (const item of state.renderedItems) {
          if (!item.element) continue;
          observer.observe(item.element);
        }
        return () => {
          cancelAnimationFrame(raf);
          observer.disconnect();
        };
      });
    });
    const mergeItem = (item, setItems, canDeleteFromMap = false) => {
      let prevItem;
      setItems((items2) => {
        const index = items2.findIndex(({ id }) => id === item.id);
        const nextItems = items2.slice();
        if (index !== -1) {
          prevItem = items2[index];
          const nextItem = { ...prevItem, ...item };
          nextItems[index] = nextItem;
          itemsMap.set(item.id, nextItem);
        } else {
          nextItems.push(item);
          itemsMap.set(item.id, item);
        }
        return nextItems;
      });
      const unmergeItem = () => {
        setItems((items2) => {
          if (!prevItem) {
            if (canDeleteFromMap) {
              itemsMap.delete(item.id);
            }
            return items2.filter(({ id }) => id !== item.id);
          }
          const index = items2.findIndex(({ id }) => id === item.id);
          if (index === -1) return items2;
          const nextItems = items2.slice();
          nextItems[index] = prevItem;
          itemsMap.set(item.id, prevItem);
          return nextItems;
        });
      };
      return unmergeItem;
    };
    const registerItem = (item) => mergeItem(
      item,
      (getItems) => privateStore.setState("items", getItems),
      true
    );
    return {
      ...collection,
      registerItem,
      renderItem: (item) => chain(
        registerItem(item),
        mergeItem(
          item,
          (getItems) => privateStore.setState("renderedItems", getItems)
        )
      ),
      item: (id) => {
        if (!id) return null;
        let item = itemsMap.get(id);
        if (!item) {
          const { items: items2 } = privateStore.getState();
          item = items2.find((item2) => item2.id === id);
          if (item) {
            itemsMap.set(id, item);
          }
        }
        return item || null;
      },
      // @ts-expect-error Internal
      __unstablePrivateStore: privateStore
    };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/GVAFFF2B.js
  function useCollectionStoreProps(store, update2, props) {
    useUpdateEffect(update2, [props.store]);
    useStoreProps(store, props, "items", "setItems");
    return store;
  }

  // node_modules/@ariakit/core/esm/__chunks/RVTIKFRL.js
  var NULL_ITEM = { id: null };
  function findFirstEnabledItem2(items, excludeId) {
    return items.find((item) => {
      if (excludeId) {
        return !item.disabled && item.id !== excludeId;
      }
      return !item.disabled;
    });
  }
  function getEnabledItems(items, excludeId) {
    return items.filter((item) => {
      if (excludeId) {
        return !item.disabled && item.id !== excludeId;
      }
      return !item.disabled;
    });
  }
  function getItemsInRow(items, rowId) {
    return items.filter((item) => item.rowId === rowId);
  }
  function flipItems(items, activeId, shouldInsertNullItem = false) {
    const index = items.findIndex((item) => item.id === activeId);
    return [
      ...items.slice(index + 1),
      ...shouldInsertNullItem ? [NULL_ITEM] : [],
      ...items.slice(0, index)
    ];
  }
  function groupItemsByRows2(items) {
    const rows = [];
    for (const item of items) {
      const row = rows.find((currentRow) => {
        var _a;
        return ((_a = currentRow[0]) == null ? void 0 : _a.rowId) === item.rowId;
      });
      if (row) {
        row.push(item);
      } else {
        rows.push([item]);
      }
    }
    return rows;
  }
  function getMaxRowLength(array) {
    let maxLength = 0;
    for (const { length } of array) {
      if (length > maxLength) {
        maxLength = length;
      }
    }
    return maxLength;
  }
  function createEmptyItem(rowId) {
    return {
      id: "__EMPTY_ITEM__",
      disabled: true,
      rowId
    };
  }
  function normalizeRows(rows, activeId, focusShift) {
    const maxLength = getMaxRowLength(rows);
    for (const row of rows) {
      for (let i2 = 0; i2 < maxLength; i2 += 1) {
        const item = row[i2];
        if (!item || focusShift && item.disabled) {
          const isFirst = i2 === 0;
          const previousItem = isFirst && focusShift ? findFirstEnabledItem2(row) : row[i2 - 1];
          row[i2] = previousItem && activeId !== previousItem.id && focusShift ? previousItem : createEmptyItem(previousItem == null ? void 0 : previousItem.rowId);
        }
      }
    }
    return rows;
  }
  function verticalizeItems(items) {
    const rows = groupItemsByRows2(items);
    const maxLength = getMaxRowLength(rows);
    const verticalized = [];
    for (let i2 = 0; i2 < maxLength; i2 += 1) {
      for (const row of rows) {
        const item = row[i2];
        if (item) {
          verticalized.push({
            ...item,
            // If there's no rowId, it means that it's not a grid composite, but
            // a single row instead. So, instead of verticalizing it, that is,
            // assigning a different rowId based on the column index, we keep it
            // undefined so they will be part of the same row. This is useful
            // when using up/down on one-dimensional composites.
            rowId: item.rowId ? `${i2}` : void 0
          });
        }
      }
    }
    return verticalized;
  }
  function createCompositeStore(props = {}) {
    var _a;
    const syncState = (_a = props.store) == null ? void 0 : _a.getState();
    const collection = createCollectionStore(props);
    const activeId = defaultValue(
      props.activeId,
      syncState == null ? void 0 : syncState.activeId,
      props.defaultActiveId
    );
    const initialState = {
      ...collection.getState(),
      id: defaultValue(
        props.id,
        syncState == null ? void 0 : syncState.id,
        `id-${Math.random().toString(36).slice(2, 8)}`
      ),
      activeId,
      baseElement: defaultValue(syncState == null ? void 0 : syncState.baseElement, null),
      includesBaseElement: defaultValue(
        props.includesBaseElement,
        syncState == null ? void 0 : syncState.includesBaseElement,
        activeId === null
      ),
      moves: defaultValue(syncState == null ? void 0 : syncState.moves, 0),
      orientation: defaultValue(
        props.orientation,
        syncState == null ? void 0 : syncState.orientation,
        "both"
      ),
      rtl: defaultValue(props.rtl, syncState == null ? void 0 : syncState.rtl, false),
      virtualFocus: defaultValue(
        props.virtualFocus,
        syncState == null ? void 0 : syncState.virtualFocus,
        false
      ),
      focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, false),
      focusWrap: defaultValue(props.focusWrap, syncState == null ? void 0 : syncState.focusWrap, false),
      focusShift: defaultValue(props.focusShift, syncState == null ? void 0 : syncState.focusShift, false)
    };
    const composite = createStore(initialState, collection, props.store);
    setup(
      composite,
      () => sync(composite, ["renderedItems", "activeId"], (state) => {
        composite.setState("activeId", (activeId2) => {
          var _a2;
          if (activeId2 !== void 0) return activeId2;
          return (_a2 = findFirstEnabledItem2(state.renderedItems)) == null ? void 0 : _a2.id;
        });
      })
    );
    const getNextId = (direction = "next", options = {}) => {
      var _a2, _b;
      const defaultState = composite.getState();
      const {
        skip = 0,
        activeId: activeId2 = defaultState.activeId,
        focusShift = defaultState.focusShift,
        focusLoop = defaultState.focusLoop,
        focusWrap = defaultState.focusWrap,
        includesBaseElement = defaultState.includesBaseElement,
        renderedItems = defaultState.renderedItems,
        rtl = defaultState.rtl
      } = options;
      const isVerticalDirection = direction === "up" || direction === "down";
      const isNextDirection = direction === "next" || direction === "down";
      const canReverse = isNextDirection ? rtl && !isVerticalDirection : !rtl || isVerticalDirection;
      const canShift = focusShift && !skip;
      let items = !isVerticalDirection ? renderedItems : flatten2DArray(
        normalizeRows(groupItemsByRows2(renderedItems), activeId2, canShift)
      );
      items = canReverse ? reverseArray(items) : items;
      items = isVerticalDirection ? verticalizeItems(items) : items;
      if (activeId2 == null) {
        return (_a2 = findFirstEnabledItem2(items)) == null ? void 0 : _a2.id;
      }
      const activeItem = items.find((item) => item.id === activeId2);
      if (!activeItem) {
        return (_b = findFirstEnabledItem2(items)) == null ? void 0 : _b.id;
      }
      const isGrid2 = items.some((item) => item.rowId);
      const activeIndex = items.indexOf(activeItem);
      const nextItems = items.slice(activeIndex + 1);
      const nextItemsInRow = getItemsInRow(nextItems, activeItem.rowId);
      if (skip) {
        const nextEnabledItemsInRow = getEnabledItems(nextItemsInRow, activeId2);
        const nextItem2 = nextEnabledItemsInRow.slice(skip)[0] || // If we can't find an item, just return the last one.
        nextEnabledItemsInRow[nextEnabledItemsInRow.length - 1];
        return nextItem2 == null ? void 0 : nextItem2.id;
      }
      const canLoop = focusLoop && (isVerticalDirection ? focusLoop !== "horizontal" : focusLoop !== "vertical");
      const canWrap = isGrid2 && focusWrap && (isVerticalDirection ? focusWrap !== "horizontal" : focusWrap !== "vertical");
      const hasNullItem = isNextDirection ? (!isGrid2 || isVerticalDirection) && canLoop && includesBaseElement : isVerticalDirection ? includesBaseElement : false;
      if (canLoop) {
        const loopItems = canWrap && !hasNullItem ? items : getItemsInRow(items, activeItem.rowId);
        const sortedItems = flipItems(loopItems, activeId2, hasNullItem);
        const nextItem2 = findFirstEnabledItem2(sortedItems, activeId2);
        return nextItem2 == null ? void 0 : nextItem2.id;
      }
      if (canWrap) {
        const nextItem2 = findFirstEnabledItem2(
          // We can use nextItems, which contains all the next items, including
          // items from other rows, to wrap between rows. However, if there is a
          // null item (the composite container), we'll only use the next items in
          // the row. So moving next from the last item will focus on the
          // composite container. On grid composites, horizontal navigation never
          // focuses on the composite container, only vertical.
          hasNullItem ? nextItemsInRow : nextItems,
          activeId2
        );
        const nextId = hasNullItem ? (nextItem2 == null ? void 0 : nextItem2.id) || null : nextItem2 == null ? void 0 : nextItem2.id;
        return nextId;
      }
      const nextItem = findFirstEnabledItem2(nextItemsInRow, activeId2);
      if (!nextItem && hasNullItem) {
        return null;
      }
      return nextItem == null ? void 0 : nextItem.id;
    };
    return {
      ...collection,
      ...composite,
      setBaseElement: (element) => composite.setState("baseElement", element),
      setActiveId: (id) => composite.setState("activeId", id),
      move: (id) => {
        if (id === void 0) return;
        composite.setState("activeId", id);
        composite.setState("moves", (moves) => moves + 1);
      },
      first: () => {
        var _a2;
        return (_a2 = findFirstEnabledItem2(composite.getState().renderedItems)) == null ? void 0 : _a2.id;
      },
      last: () => {
        var _a2;
        return (_a2 = findFirstEnabledItem2(reverseArray(composite.getState().renderedItems))) == null ? void 0 : _a2.id;
      },
      next: (options) => {
        if (options !== void 0 && typeof options === "number") {
          options = { skip: options };
        }
        return getNextId("next", options);
      },
      previous: (options) => {
        if (options !== void 0 && typeof options === "number") {
          options = { skip: options };
        }
        return getNextId("previous", options);
      },
      down: (options) => {
        if (options !== void 0 && typeof options === "number") {
          options = { skip: options };
        }
        return getNextId("down", options);
      },
      up: (options) => {
        if (options !== void 0 && typeof options === "number") {
          options = { skip: options };
        }
        return getNextId("up", options);
      }
    };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/IQYAUKXT.js
  function useCompositeStoreOptions(props) {
    const id = useId3(props.id);
    return { id, ...props };
  }
  function useCompositeStoreProps(store, update2, props) {
    store = useCollectionStoreProps(store, update2, props);
    useStoreProps(store, props, "activeId", "setActiveId");
    useStoreProps(store, props, "includesBaseElement");
    useStoreProps(store, props, "virtualFocus");
    useStoreProps(store, props, "orientation");
    useStoreProps(store, props, "rtl");
    useStoreProps(store, props, "focusLoop");
    useStoreProps(store, props, "focusWrap");
    useStoreProps(store, props, "focusShift");
    return store;
  }

  // node_modules/@ariakit/react-core/esm/__chunks/CVCFNOHX.js
  var import_react15 = __toESM(require_react(), 1);
  var ComboboxListRoleContext = (0, import_react15.createContext)(
    void 0
  );
  var ctx6 = createStoreContext(
    [PopoverContextProvider, CompositeContextProvider],
    [PopoverScopedContextProvider, CompositeScopedContextProvider]
  );
  var useComboboxContext = ctx6.useContext;
  var useComboboxScopedContext = ctx6.useScopedContext;
  var useComboboxProviderContext = ctx6.useProviderContext;
  var ComboboxContextProvider = ctx6.ContextProvider;
  var ComboboxScopedContextProvider = ctx6.ScopedContextProvider;
  var ComboboxItemValueContext = (0, import_react15.createContext)(
    void 0
  );
  var ComboboxItemCheckedContext = (0, import_react15.createContext)(false);

  // node_modules/@ariakit/core/esm/__chunks/KMAUV3TY.js
  function createDialogStore(props = {}) {
    return createDisclosureStore(props);
  }

  // node_modules/@ariakit/react-core/esm/__chunks/4NYSH4UO.js
  function useDialogStoreProps(store, update2, props) {
    return useDisclosureStoreProps(store, update2, props);
  }

  // node_modules/@ariakit/core/esm/__chunks/BFGNM53A.js
  function createPopoverStore({
    popover: otherPopover,
    ...props
  } = {}) {
    const store = mergeStore(
      props.store,
      omit2(otherPopover, [
        "arrowElement",
        "anchorElement",
        "contentElement",
        "popoverElement",
        "disclosureElement"
      ])
    );
    throwOnConflictingProps(props, store);
    const syncState = store == null ? void 0 : store.getState();
    const dialog = createDialogStore({ ...props, store });
    const placement = defaultValue(
      props.placement,
      syncState == null ? void 0 : syncState.placement,
      "bottom"
    );
    const initialState = {
      ...dialog.getState(),
      placement,
      currentPlacement: placement,
      anchorElement: defaultValue(syncState == null ? void 0 : syncState.anchorElement, null),
      popoverElement: defaultValue(syncState == null ? void 0 : syncState.popoverElement, null),
      arrowElement: defaultValue(syncState == null ? void 0 : syncState.arrowElement, null),
      rendered: /* @__PURE__ */ Symbol("rendered")
    };
    const popover = createStore(initialState, dialog, store);
    return {
      ...dialog,
      ...popover,
      setAnchorElement: (element) => popover.setState("anchorElement", element),
      setPopoverElement: (element) => popover.setState("popoverElement", element),
      setArrowElement: (element) => popover.setState("arrowElement", element),
      render: () => popover.setState("rendered", /* @__PURE__ */ Symbol("rendered"))
    };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/B6FLPFJM.js
  function usePopoverStoreProps(store, update2, props) {
    useUpdateEffect(update2, [props.popover]);
    useStoreProps(store, props, "placement");
    return useDialogStoreProps(store, update2, props);
  }

  // node_modules/@ariakit/react-core/esm/__chunks/4POTBZ2J.js
  var TagName7 = "div";
  var usePopoverAnchor = createHook(
    function usePopoverAnchor2({ store, ...props }) {
      const context = usePopoverProviderContext();
      store = store || context;
      props = {
        ...props,
        ref: useMergeRefs(store == null ? void 0 : store.setAnchorElement, props.ref)
      };
      return props;
    }
  );
  var PopoverAnchor = forwardRef22(function PopoverAnchor2(props) {
    const htmlProps = usePopoverAnchor(props);
    return createElement3(TagName7, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/X6LNAU2F.js
  var import_react16 = __toESM(require_react(), 1);
  var TagName8 = "div";
  function getMouseDestination(event) {
    const relatedTarget = event.relatedTarget;
    if ((relatedTarget == null ? void 0 : relatedTarget.nodeType) === Node.ELEMENT_NODE) {
      return relatedTarget;
    }
    return null;
  }
  function hoveringInside(event) {
    const nextElement = getMouseDestination(event);
    if (!nextElement) return false;
    return contains(event.currentTarget, nextElement);
  }
  var symbol2 = /* @__PURE__ */ Symbol("composite-hover");
  function movingToAnotherItem(event) {
    let dest = getMouseDestination(event);
    if (!dest) return false;
    do {
      if (hasOwnProperty(dest, symbol2) && dest[symbol2]) return true;
      dest = dest.parentElement;
    } while (dest);
    return false;
  }
  var useCompositeHover = createHook(
    function useCompositeHover2({
      store,
      focusOnHover = true,
      blurOnHoverEnd = !!focusOnHover,
      ...props
    }) {
      const context = useCompositeContext();
      store = store || context;
      invariant(
        store,
        "CompositeHover must be wrapped in a Composite component."
      );
      const isMouseMoving = useIsMouseMoving();
      const onMouseMoveProp = props.onMouseMove;
      const focusOnHoverProp = useBooleanEvent(focusOnHover);
      const onMouseMove = useEvent((event) => {
        onMouseMoveProp == null ? void 0 : onMouseMoveProp(event);
        if (event.defaultPrevented) return;
        if (!isMouseMoving()) return;
        if (!focusOnHoverProp(event)) return;
        if (!hasFocusWithin(event.currentTarget)) {
          const baseElement = store == null ? void 0 : store.getState().baseElement;
          if (baseElement && !hasFocus(baseElement)) {
            baseElement.focus();
          }
        }
        store == null ? void 0 : store.setActiveId(event.currentTarget.id);
      });
      const onMouseLeaveProp = props.onMouseLeave;
      const blurOnHoverEndProp = useBooleanEvent(blurOnHoverEnd);
      const onMouseLeave = useEvent((event) => {
        var _a;
        onMouseLeaveProp == null ? void 0 : onMouseLeaveProp(event);
        if (event.defaultPrevented) return;
        if (!isMouseMoving()) return;
        if (hoveringInside(event)) return;
        if (movingToAnotherItem(event)) return;
        if (!focusOnHoverProp(event)) return;
        if (!blurOnHoverEndProp(event)) return;
        store == null ? void 0 : store.setActiveId(null);
        (_a = store == null ? void 0 : store.getState().baseElement) == null ? void 0 : _a.focus();
      });
      const ref = (0, import_react16.useCallback)((element) => {
        if (!element) return;
        element[symbol2] = true;
      }, []);
      props = {
        ...props,
        ref: useMergeRefs(ref, props.ref),
        onMouseMove,
        onMouseLeave
      };
      return removeUndefinedValues(props);
    }
  );
  var CompositeHover = memo22(
    forwardRef22(function CompositeHover2(props) {
      const htmlProps = useCompositeHover(props);
      return createElement3(TagName8, htmlProps);
    })
  );

  // node_modules/@ariakit/react-core/esm/combobox/combobox.js
  var import_react17 = __toESM(require_react(), 1);
  var TagName9 = "input";
  function isFirstItemAutoSelected(items, activeValue, autoSelect) {
    if (!autoSelect) return false;
    const firstItem = items.find((item) => !item.disabled && item.value);
    return (firstItem == null ? void 0 : firstItem.value) === activeValue;
  }
  function hasCompletionString(value, activeValue) {
    if (!activeValue) return false;
    if (value == null) return false;
    value = normalizeString(value);
    return activeValue.length > value.length && activeValue.toLowerCase().indexOf(value.toLowerCase()) === 0;
  }
  function isInputEvent(event) {
    return event.type === "input";
  }
  function isAriaAutoCompleteValue(value) {
    return value === "inline" || value === "list" || value === "both" || value === "none";
  }
  function getDefaultAutoSelectId(items) {
    const item = items.find((item2) => {
      var _a;
      if (item2.disabled) return false;
      return ((_a = item2.element) == null ? void 0 : _a.getAttribute("role")) !== "tab";
    });
    return item == null ? void 0 : item.id;
  }
  var useCombobox = createHook(
    function useCombobox2({
      store,
      focusable = true,
      autoSelect: autoSelectProp = false,
      getAutoSelectId,
      setValueOnChange,
      showMinLength = 0,
      showOnChange,
      showOnMouseDown,
      showOnClick = showOnMouseDown,
      showOnKeyDown,
      showOnKeyPress = showOnKeyDown,
      blurActiveItemOnClick,
      setValueOnClick = true,
      moveOnKeyPress = true,
      autoComplete = "list",
      ...props
    }) {
      const context = useComboboxProviderContext();
      store = store || context;
      invariant(
        store,
        "Combobox must receive a `store` prop or be wrapped in a ComboboxProvider component."
      );
      const ref = (0, import_react17.useRef)(null);
      const [valueUpdated, forceValueUpdate] = useForceUpdate();
      const canAutoSelectRef = (0, import_react17.useRef)(false);
      const composingRef = (0, import_react17.useRef)(false);
      const autoSelect = store.useState(
        (state) => state.virtualFocus && autoSelectProp
      );
      const inline = autoComplete === "inline" || autoComplete === "both";
      const [canInline, setCanInline] = (0, import_react17.useState)(inline);
      useUpdateLayoutEffect(() => {
        if (!inline) return;
        setCanInline(true);
      }, [inline]);
      const storeValue = store.useState("value");
      const prevSelectedValueRef = (0, import_react17.useRef)(void 0);
      (0, import_react17.useEffect)(() => {
        return sync(store, ["selectedValue", "activeId"], (_, prev) => {
          prevSelectedValueRef.current = prev.selectedValue;
        });
      }, []);
      const inlineActiveValue = store.useState((state) => {
        var _a;
        if (!inline) return;
        if (!canInline) return;
        if (state.activeValue && Array.isArray(state.selectedValue)) {
          if (state.selectedValue.includes(state.activeValue)) return;
          if ((_a = prevSelectedValueRef.current) == null ? void 0 : _a.includes(state.activeValue)) return;
        }
        return state.activeValue;
      });
      const items = store.useState("renderedItems");
      const open = store.useState("open");
      const contentElement = store.useState("contentElement");
      const value = (0, import_react17.useMemo)(() => {
        if (!inline) return storeValue;
        if (!canInline) return storeValue;
        const firstItemAutoSelected = isFirstItemAutoSelected(
          items,
          inlineActiveValue,
          autoSelect
        );
        if (firstItemAutoSelected) {
          if (hasCompletionString(storeValue, inlineActiveValue)) {
            const slice = (inlineActiveValue == null ? void 0 : inlineActiveValue.slice(storeValue.length)) || "";
            return storeValue + slice;
          }
          return storeValue;
        }
        return inlineActiveValue || storeValue;
      }, [inline, canInline, items, inlineActiveValue, autoSelect, storeValue]);
      (0, import_react17.useEffect)(() => {
        const element = ref.current;
        if (!element) return;
        const onCompositeItemMove = () => setCanInline(true);
        element.addEventListener("combobox-item-move", onCompositeItemMove);
        return () => {
          element.removeEventListener("combobox-item-move", onCompositeItemMove);
        };
      }, []);
      (0, import_react17.useEffect)(() => {
        if (!inline) return;
        if (!canInline) return;
        if (!inlineActiveValue) return;
        const firstItemAutoSelected = isFirstItemAutoSelected(
          items,
          inlineActiveValue,
          autoSelect
        );
        if (!firstItemAutoSelected) return;
        if (!hasCompletionString(storeValue, inlineActiveValue)) return;
        let cleanup = noop2;
        queueMicrotask(() => {
          const element = ref.current;
          if (!element) return;
          const { start: prevStart, end: prevEnd } = getTextboxSelection(element);
          const nextStart = storeValue.length;
          const nextEnd = inlineActiveValue.length;
          setSelectionRange(element, nextStart, nextEnd);
          cleanup = () => {
            if (!hasFocus(element)) return;
            const { start, end } = getTextboxSelection(element);
            if (start !== nextStart) return;
            if (end !== nextEnd) return;
            setSelectionRange(element, prevStart, prevEnd);
          };
        });
        return () => cleanup();
      }, [
        valueUpdated,
        inline,
        canInline,
        inlineActiveValue,
        items,
        autoSelect,
        storeValue
      ]);
      const scrollingElementRef = (0, import_react17.useRef)(null);
      const getAutoSelectIdProp = useEvent(getAutoSelectId);
      const autoSelectIdRef = (0, import_react17.useRef)(null);
      (0, import_react17.useEffect)(() => {
        if (!open) return;
        if (!contentElement) return;
        const scrollingElement = getScrollingElement(contentElement);
        if (!scrollingElement) return;
        scrollingElementRef.current = scrollingElement;
        const onUserScroll = () => {
          canAutoSelectRef.current = false;
        };
        const onScroll = () => {
          if (!store) return;
          if (!canAutoSelectRef.current) return;
          const { activeId } = store.getState();
          if (activeId === null) return;
          if (activeId === autoSelectIdRef.current) return;
          canAutoSelectRef.current = false;
        };
        const options = { passive: true, capture: true };
        scrollingElement.addEventListener("wheel", onUserScroll, options);
        scrollingElement.addEventListener("touchmove", onUserScroll, options);
        scrollingElement.addEventListener("scroll", onScroll, options);
        return () => {
          scrollingElement.removeEventListener("wheel", onUserScroll, true);
          scrollingElement.removeEventListener("touchmove", onUserScroll, true);
          scrollingElement.removeEventListener("scroll", onScroll, true);
        };
      }, [open, contentElement, store]);
      useSafeLayoutEffect(() => {
        if (!storeValue) return;
        if (composingRef.current) return;
        canAutoSelectRef.current = true;
      }, [storeValue]);
      useSafeLayoutEffect(() => {
        if (autoSelect !== "always" && open) return;
        canAutoSelectRef.current = open;
      }, [autoSelect, open]);
      const resetValueOnSelect = store.useState("resetValueOnSelect");
      useUpdateEffect(() => {
        var _a, _b;
        const canAutoSelect = canAutoSelectRef.current;
        if (!store) return;
        if (!open) return;
        if (!canAutoSelect && !resetValueOnSelect) return;
        const { baseElement, contentElement: contentElement2, activeId } = store.getState();
        if (baseElement && !hasFocus(baseElement)) return;
        if (contentElement2 == null ? void 0 : contentElement2.hasAttribute("data-placing")) {
          const observer = new MutationObserver(forceValueUpdate);
          observer.observe(contentElement2, { attributeFilter: ["data-placing"] });
          return () => observer.disconnect();
        }
        if (autoSelect && canAutoSelect) {
          const userAutoSelectId = getAutoSelectIdProp(items);
          const autoSelectId = userAutoSelectId !== void 0 ? userAutoSelectId : (_a = getDefaultAutoSelectId(items)) != null ? _a : store.first();
          autoSelectIdRef.current = autoSelectId;
          store.move(autoSelectId != null ? autoSelectId : null);
        } else {
          const element = (_b = store.item(activeId || store.first())) == null ? void 0 : _b.element;
          if (element && "scrollIntoView" in element) {
            element.scrollIntoView({ block: "nearest", inline: "nearest" });
          }
        }
        return;
      }, [
        store,
        open,
        valueUpdated,
        storeValue,
        autoSelect,
        resetValueOnSelect,
        getAutoSelectIdProp,
        items
      ]);
      (0, import_react17.useEffect)(() => {
        if (!inline) return;
        const combobox = ref.current;
        if (!combobox) return;
        const elements = [combobox, contentElement].filter(
          (value2) => !!value2
        );
        const onBlur2 = (event) => {
          if (elements.every((el) => isFocusEventOutside(event, el))) {
            store == null ? void 0 : store.setValue(value);
          }
        };
        for (const element of elements) {
          element.addEventListener("focusout", onBlur2);
        }
        return () => {
          for (const element of elements) {
            element.removeEventListener("focusout", onBlur2);
          }
        };
      }, [inline, contentElement, store, value]);
      const canShow = (event) => {
        const currentTarget = event.currentTarget;
        return currentTarget.value.length >= showMinLength;
      };
      const onChangeProp = props.onChange;
      const showOnChangeProp = useBooleanEvent(showOnChange != null ? showOnChange : canShow);
      const setValueOnChangeProp = useBooleanEvent(
        // If the combobox is combined with tags, the value will be set by the tag
        // input component.
        setValueOnChange != null ? setValueOnChange : !store.tag
      );
      const onChange = useEvent((event) => {
        onChangeProp == null ? void 0 : onChangeProp(event);
        if (event.defaultPrevented) return;
        if (!store) return;
        const currentTarget = event.currentTarget;
        const { value: value2, selectionStart, selectionEnd } = currentTarget;
        const nativeEvent = event.nativeEvent;
        canAutoSelectRef.current = true;
        if (isInputEvent(nativeEvent)) {
          if (nativeEvent.isComposing) {
            canAutoSelectRef.current = false;
            composingRef.current = true;
          }
          if (inline) {
            const textInserted = nativeEvent.inputType === "insertText" || nativeEvent.inputType === "insertCompositionText";
            const caretAtEnd = selectionStart === value2.length;
            setCanInline(textInserted && caretAtEnd);
          }
        }
        if (setValueOnChangeProp(event)) {
          const isSameValue = value2 === store.getState().value;
          store.setValue(value2);
          queueMicrotask(() => {
            setSelectionRange(currentTarget, selectionStart, selectionEnd);
          });
          if (inline && autoSelect && isSameValue) {
            forceValueUpdate();
          }
        }
        if (showOnChangeProp(event)) {
          store.show();
        }
        if (!autoSelect || !canAutoSelectRef.current) {
          store.setActiveId(null);
        }
      });
      const onCompositionEndProp = props.onCompositionEnd;
      const onCompositionEnd = useEvent((event) => {
        canAutoSelectRef.current = true;
        composingRef.current = false;
        onCompositionEndProp == null ? void 0 : onCompositionEndProp(event);
        if (event.defaultPrevented) return;
        if (!autoSelect) return;
        forceValueUpdate();
      });
      const onMouseDownProp = props.onMouseDown;
      const blurActiveItemOnClickProp = useBooleanEvent(
        blurActiveItemOnClick != null ? blurActiveItemOnClick : (() => !!(store == null ? void 0 : store.getState().includesBaseElement))
      );
      const setValueOnClickProp = useBooleanEvent(setValueOnClick);
      const showOnClickProp = useBooleanEvent(showOnClick != null ? showOnClick : canShow);
      const onMouseDown = useEvent((event) => {
        onMouseDownProp == null ? void 0 : onMouseDownProp(event);
        if (event.defaultPrevented) return;
        if (event.button) return;
        if (event.ctrlKey) return;
        if (!store) return;
        if (blurActiveItemOnClickProp(event)) {
          store.setActiveId(null);
        }
        if (setValueOnClickProp(event)) {
          store.setValue(value);
        }
        if (showOnClickProp(event)) {
          queueBeforeEvent(event.currentTarget, "mouseup", store.show);
        }
      });
      const onKeyDownProp = props.onKeyDown;
      const showOnKeyPressProp = useBooleanEvent(showOnKeyPress != null ? showOnKeyPress : canShow);
      const onKeyDown = useEvent((event) => {
        onKeyDownProp == null ? void 0 : onKeyDownProp(event);
        if (!event.repeat) {
          canAutoSelectRef.current = false;
        }
        if (event.defaultPrevented) return;
        if (event.ctrlKey) return;
        if (event.altKey) return;
        if (event.shiftKey) return;
        if (event.metaKey) return;
        if (!store) return;
        const { open: open2 } = store.getState();
        if (open2) return;
        if (event.key === "ArrowUp" || event.key === "ArrowDown") {
          if (showOnKeyPressProp(event)) {
            event.preventDefault();
            store.show();
          }
        }
      });
      const onBlurProp = props.onBlur;
      const onBlur = useEvent((event) => {
        canAutoSelectRef.current = false;
        onBlurProp == null ? void 0 : onBlurProp(event);
        if (event.defaultPrevented) return;
      });
      const id = useId3(props.id);
      const ariaAutoComplete = isAriaAutoCompleteValue(autoComplete) ? autoComplete : void 0;
      const isActiveItem = store.useState((state) => state.activeId === null);
      props = {
        id,
        role: "combobox",
        "aria-autocomplete": ariaAutoComplete,
        "aria-haspopup": getPopupRole(contentElement, "listbox"),
        "aria-expanded": open,
        "aria-controls": contentElement == null ? void 0 : contentElement.id,
        "data-active-item": isActiveItem || void 0,
        value,
        ...props,
        ref: useMergeRefs(ref, props.ref),
        onChange,
        onCompositionEnd,
        onMouseDown,
        onKeyDown,
        onBlur
      };
      props = useComposite({
        store,
        focusable,
        ...props,
        // Enable inline autocomplete when the user moves from the combobox input
        // to an item.
        moveOnKeyPress: (event) => {
          if (isFalsyBooleanCallback(moveOnKeyPress, event)) return false;
          if (inline) setCanInline(true);
          return true;
        }
      });
      props = usePopoverAnchor({ store, ...props });
      return { autoComplete: "off", ...props };
    }
  );
  var Combobox = forwardRef22(function Combobox2(props) {
    const htmlProps = useCombobox(props);
    return createElement3(TagName9, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/IBXZ2LQC.js
  var import_react18 = __toESM(require_react(), 1);
  var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
  var TagName10 = "div";
  function isSelected(storeValue, itemValue) {
    if (itemValue == null) return;
    if (storeValue == null) return false;
    if (Array.isArray(storeValue)) {
      return storeValue.includes(itemValue);
    }
    return storeValue === itemValue;
  }
  function getItemRole(popupRole) {
    var _a;
    const itemRoleByPopupRole = {
      menu: "menuitem",
      listbox: "option",
      tree: "treeitem"
    };
    const key = popupRole;
    return (_a = itemRoleByPopupRole[key]) != null ? _a : "option";
  }
  var useComboboxItem = createHook(
    function useComboboxItem2({
      store,
      value,
      hideOnClick,
      setValueOnClick,
      selectValueOnClick = true,
      resetValueOnSelect,
      focusOnHover = false,
      moveOnKeyPress = true,
      getItem: getItemProp,
      ...props
    }) {
      var _a;
      const context = useComboboxScopedContext();
      store = store || context;
      invariant(
        store,
        "ComboboxItem must be wrapped in a ComboboxList or ComboboxPopover component."
      );
      const { resetValueOnSelectState, multiSelectable, selected } = useStoreStateObject(store, {
        resetValueOnSelectState: "resetValueOnSelect",
        multiSelectable(state) {
          return Array.isArray(state.selectedValue);
        },
        selected(state) {
          return isSelected(state.selectedValue, value);
        }
      });
      const getItem = (0, import_react18.useCallback)(
        (item) => {
          const nextItem = { ...item, value };
          if (getItemProp) {
            return getItemProp(nextItem);
          }
          return nextItem;
        },
        [value, getItemProp]
      );
      setValueOnClick = setValueOnClick != null ? setValueOnClick : !multiSelectable;
      hideOnClick = hideOnClick != null ? hideOnClick : value != null && !multiSelectable;
      const onClickProp = props.onClick;
      const setValueOnClickProp = useBooleanEvent(setValueOnClick);
      const selectValueOnClickProp = useBooleanEvent(selectValueOnClick);
      const resetValueOnSelectProp = useBooleanEvent(
        (_a = resetValueOnSelect != null ? resetValueOnSelect : resetValueOnSelectState) != null ? _a : multiSelectable
      );
      const hideOnClickProp = useBooleanEvent(hideOnClick);
      const onClick = useEvent((event) => {
        onClickProp == null ? void 0 : onClickProp(event);
        if (event.defaultPrevented) return;
        if (isDownloading(event)) return;
        if (isOpeningInNewTab(event)) return;
        if (value != null) {
          if (selectValueOnClickProp(event)) {
            if (resetValueOnSelectProp(event)) {
              store == null ? void 0 : store.resetValue();
            }
            store == null ? void 0 : store.setSelectedValue((prevValue) => {
              if (!Array.isArray(prevValue)) return value;
              if (prevValue.includes(value)) {
                return prevValue.filter((v2) => v2 !== value);
              }
              return [...prevValue, value];
            });
          }
          if (setValueOnClickProp(event)) {
            store == null ? void 0 : store.setValue(value);
          }
        }
        if (hideOnClickProp(event)) {
          store == null ? void 0 : store.hide();
        }
      });
      const onKeyDownProp = props.onKeyDown;
      const onKeyDown = useEvent((event) => {
        onKeyDownProp == null ? void 0 : onKeyDownProp(event);
        if (event.defaultPrevented) return;
        const baseElement = store == null ? void 0 : store.getState().baseElement;
        if (!baseElement) return;
        if (hasFocus(baseElement)) return;
        const printable = event.key.length === 1;
        if (printable || event.key === "Backspace" || event.key === "Delete") {
          queueMicrotask(() => baseElement.focus());
          if (isTextField(baseElement)) {
            store == null ? void 0 : store.setValue(baseElement.value);
          }
        }
      });
      if (multiSelectable && selected != null) {
        props = {
          "aria-selected": selected,
          ...props
        };
      }
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ComboboxItemValueContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ComboboxItemCheckedContext.Provider, { value: selected != null ? selected : false, children: element }) }),
        [value, selected]
      );
      const popupRole = (0, import_react18.useContext)(ComboboxListRoleContext);
      props = {
        role: getItemRole(popupRole),
        children: value,
        ...props,
        onClick,
        onKeyDown
      };
      const moveOnKeyPressProp = useBooleanEvent(moveOnKeyPress);
      props = useCompositeItem({
        store,
        ...props,
        getItem,
        // Dispatch a custom event on the combobox input when moving to an item
        // with the keyboard so the Combobox component can enable inline
        // autocompletion.
        moveOnKeyPress: (event) => {
          if (!moveOnKeyPressProp(event)) return false;
          const moveEvent = new Event("combobox-item-move");
          const baseElement = store == null ? void 0 : store.getState().baseElement;
          baseElement == null ? void 0 : baseElement.dispatchEvent(moveEvent);
          return true;
        }
      });
      props = useCompositeHover({ store, focusOnHover, ...props });
      return props;
    }
  );
  var ComboboxItem = memo22(
    forwardRef22(function ComboboxItem2(props) {
      const htmlProps = useComboboxItem(props);
      return createElement3(TagName10, htmlProps);
    })
  );

  // node_modules/@ariakit/react-core/esm/combobox/combobox-item-value.js
  var import_react19 = __toESM(require_react(), 1);
  var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1);
  var TagName11 = "span";
  function normalizeValue(value) {
    return normalizeString(value).toLowerCase();
  }
  function getOffsets(string, values) {
    const offsets = [];
    for (const value of values) {
      let pos = 0;
      const length = value.length;
      while (string.indexOf(value, pos) !== -1) {
        const index = string.indexOf(value, pos);
        if (index !== -1) {
          offsets.push([index, length]);
        }
        pos = index + 1;
      }
    }
    return offsets;
  }
  function filterOverlappingOffsets(offsets) {
    return offsets.filter(([offset, length], i2, arr) => {
      return !arr.some(
        ([o2, l2], j2) => j2 !== i2 && o2 <= offset && o2 + l2 >= offset + length
      );
    });
  }
  function sortOffsets(offsets) {
    return offsets.sort(([a2], [b2]) => a2 - b2);
  }
  function splitValue(itemValue, userValue) {
    if (!itemValue) return itemValue;
    if (!userValue) return itemValue;
    const userValues = toArray(userValue).filter(Boolean).map(normalizeValue);
    const parts = [];
    const span = (value, autocomplete = false) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
      "span",
      {
        "data-autocomplete-value": autocomplete ? "" : void 0,
        "data-user-value": autocomplete ? void 0 : "",
        children: value
      },
      parts.length
    );
    const offsets = sortOffsets(
      filterOverlappingOffsets(
        // Convert userValues into a set to avoid duplicates
        getOffsets(normalizeValue(itemValue), new Set(userValues))
      )
    );
    if (!offsets.length) {
      parts.push(span(itemValue, true));
      return parts;
    }
    const [firstOffset] = offsets[0];
    const values = [
      itemValue.slice(0, firstOffset),
      ...offsets.flatMap(([offset, length], i2) => {
        var _a;
        const value = itemValue.slice(offset, offset + length);
        const nextOffset = (_a = offsets[i2 + 1]) == null ? void 0 : _a[0];
        const nextValue = itemValue.slice(offset + length, nextOffset);
        return [value, nextValue];
      })
    ];
    values.forEach((value, i2) => {
      if (!value) return;
      parts.push(span(value, i2 % 2 === 0));
    });
    return parts;
  }
  var useComboboxItemValue = createHook(function useComboboxItemValue2({ store, value, userValue, ...props }) {
    const context = useComboboxScopedContext();
    store = store || context;
    const itemContext = (0, import_react19.useContext)(ComboboxItemValueContext);
    const itemValue = value != null ? value : itemContext;
    const inputValue = useStoreState(store, (state) => userValue != null ? userValue : state == null ? void 0 : state.value);
    const children = (0, import_react19.useMemo)(() => {
      if (!itemValue) return;
      if (!inputValue) return itemValue;
      return splitValue(itemValue, inputValue);
    }, [itemValue, inputValue]);
    props = {
      children,
      ...props
    };
    return removeUndefinedValues(props);
  });
  var ComboboxItemValue = forwardRef22(function ComboboxItemValue2(props) {
    const htmlProps = useComboboxItemValue(props);
    return createElement3(TagName11, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/combobox/combobox-label.js
  var TagName12 = "label";
  var useComboboxLabel = createHook(
    function useComboboxLabel2({ store, ...props }) {
      const context = useComboboxProviderContext();
      store = store || context;
      invariant(
        store,
        "ComboboxLabel must receive a `store` prop or be wrapped in a ComboboxProvider component."
      );
      const comboboxId = store.useState((state) => {
        var _a;
        return (_a = state.baseElement) == null ? void 0 : _a.id;
      });
      props = {
        htmlFor: comboboxId,
        ...props
      };
      return removeUndefinedValues(props);
    }
  );
  var ComboboxLabel = memo22(
    forwardRef22(function ComboboxLabel2(props) {
      const htmlProps = useComboboxLabel(props);
      return createElement3(TagName12, htmlProps);
    })
  );

  // node_modules/@ariakit/react-core/esm/__chunks/2G6YEJT4.js
  var import_react20 = __toESM(require_react(), 1);
  var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1);
  var TagName13 = "div";
  var useComboboxList = createHook(
    function useComboboxList2({ store, alwaysVisible, ...props }) {
      const scopedContext = useComboboxScopedContext(true);
      const context = useComboboxContext();
      store = store || context;
      const scopedContextSameStore = !!store && store === scopedContext;
      invariant(
        store,
        "ComboboxList must receive a `store` prop or be wrapped in a ComboboxProvider component."
      );
      const ref = (0, import_react20.useRef)(null);
      const id = useId3(props.id);
      const mounted = store.useState("mounted");
      const hidden = isHidden(mounted, props.hidden, alwaysVisible);
      const style = hidden ? { ...props.style, display: "none" } : props.style;
      const multiSelectable = store.useState(
        (state) => Array.isArray(state.selectedValue)
      );
      const role = useAttribute(ref, "role", props.role);
      const isCompositeRole = role === "listbox" || role === "tree" || role === "grid";
      const ariaMultiSelectable = isCompositeRole ? multiSelectable || void 0 : void 0;
      const [hasListboxInside, setHasListboxInside] = (0, import_react20.useState)(false);
      const contentElement = store.useState("contentElement");
      useSafeLayoutEffect(() => {
        if (!mounted) return;
        const element = ref.current;
        if (!element) return;
        if (contentElement !== element) return;
        const callback = () => {
          setHasListboxInside(!!element.querySelector("[role='listbox']"));
        };
        const observer = new MutationObserver(callback);
        observer.observe(element, {
          subtree: true,
          childList: true,
          attributeFilter: ["role"]
        });
        callback();
        return () => observer.disconnect();
      }, [mounted, contentElement]);
      if (!hasListboxInside) {
        props = {
          role: "listbox",
          "aria-multiselectable": ariaMultiSelectable,
          ...props
        };
      }
      props = useWrapElement(
        props,
        (element) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ComboboxScopedContextProvider, { value: store, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ComboboxListRoleContext.Provider, { value: role, children: element }) }),
        [store, role]
      );
      const setContentElement = id && (!scopedContext || !scopedContextSameStore) ? store.setContentElement : null;
      props = {
        id,
        hidden,
        ...props,
        ref: useMergeRefs(setContentElement, ref, props.ref),
        style
      };
      return removeUndefinedValues(props);
    }
  );
  var ComboboxList = forwardRef22(function ComboboxList2(props) {
    const htmlProps = useComboboxList(props);
    return createElement3(TagName13, htmlProps);
  });

  // node_modules/@ariakit/react-core/esm/__chunks/XSIEPKGA.js
  var import_react21 = __toESM(require_react(), 1);
  var TagValueContext = (0, import_react21.createContext)(null);
  var TagRemoveIdContext = (0, import_react21.createContext)(
    null
  );
  var ctx7 = createStoreContext(
    [CompositeContextProvider],
    [CompositeScopedContextProvider]
  );
  var useTagContext = ctx7.useContext;
  var useTagScopedContext = ctx7.useScopedContext;
  var useTagProviderContext = ctx7.useProviderContext;
  var TagContextProvider = ctx7.ContextProvider;
  var TagScopedContextProvider = ctx7.ScopedContextProvider;

  // node_modules/@ariakit/core/esm/combobox/combobox-store.js
  var isTouchSafari = isSafari() && isTouchDevice();
  function createComboboxStore({
    tag,
    ...props
  } = {}) {
    const store = mergeStore(props.store, pick2(tag, ["value", "rtl"]));
    throwOnConflictingProps(props, store);
    const tagState = tag == null ? void 0 : tag.getState();
    const syncState = store == null ? void 0 : store.getState();
    const activeId = defaultValue(
      props.activeId,
      syncState == null ? void 0 : syncState.activeId,
      props.defaultActiveId,
      null
    );
    const composite = createCompositeStore({
      ...props,
      activeId,
      includesBaseElement: defaultValue(
        props.includesBaseElement,
        syncState == null ? void 0 : syncState.includesBaseElement,
        true
      ),
      orientation: defaultValue(
        props.orientation,
        syncState == null ? void 0 : syncState.orientation,
        "vertical"
      ),
      focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true),
      focusWrap: defaultValue(props.focusWrap, syncState == null ? void 0 : syncState.focusWrap, true),
      virtualFocus: defaultValue(
        props.virtualFocus,
        syncState == null ? void 0 : syncState.virtualFocus,
        true
      )
    });
    const popover = createPopoverStore({
      ...props,
      placement: defaultValue(
        props.placement,
        syncState == null ? void 0 : syncState.placement,
        "bottom-start"
      )
    });
    const value = defaultValue(
      props.value,
      syncState == null ? void 0 : syncState.value,
      props.defaultValue,
      ""
    );
    const selectedValue = defaultValue(
      props.selectedValue,
      syncState == null ? void 0 : syncState.selectedValue,
      tagState == null ? void 0 : tagState.values,
      props.defaultSelectedValue,
      ""
    );
    const multiSelectable = Array.isArray(selectedValue);
    const initialState = {
      ...composite.getState(),
      ...popover.getState(),
      value,
      selectedValue,
      resetValueOnSelect: defaultValue(
        props.resetValueOnSelect,
        syncState == null ? void 0 : syncState.resetValueOnSelect,
        multiSelectable
      ),
      resetValueOnHide: defaultValue(
        props.resetValueOnHide,
        syncState == null ? void 0 : syncState.resetValueOnHide,
        multiSelectable && !tag
      ),
      activeValue: syncState == null ? void 0 : syncState.activeValue
    };
    const combobox = createStore(initialState, composite, popover, store);
    if (isTouchSafari) {
      setup(
        combobox,
        () => sync(combobox, ["virtualFocus"], () => {
          combobox.setState("virtualFocus", false);
        })
      );
    }
    setup(combobox, () => {
      if (!tag) return;
      return chain(
        sync(combobox, ["selectedValue"], (state) => {
          if (!Array.isArray(state.selectedValue)) return;
          tag.setValues(state.selectedValue);
        }),
        sync(tag, ["values"], (state) => {
          combobox.setState("selectedValue", state.values);
        })
      );
    });
    setup(
      combobox,
      () => sync(combobox, ["resetValueOnHide", "mounted"], (state) => {
        if (!state.resetValueOnHide) return;
        if (state.mounted) return;
        combobox.setState("value", value);
      })
    );
    setup(
      combobox,
      () => sync(combobox, ["open"], (state) => {
        if (state.open) return;
        combobox.setState("activeId", activeId);
        combobox.setState("moves", 0);
      })
    );
    setup(
      combobox,
      () => sync(combobox, ["moves", "activeId"], (state, prevState) => {
        if (state.moves === prevState.moves) {
          combobox.setState("activeValue", void 0);
        }
      })
    );
    setup(
      combobox,
      () => batch(combobox, ["moves", "renderedItems"], (state, prev) => {
        if (state.moves === prev.moves) return;
        const { activeId: activeId2 } = combobox.getState();
        const activeItem = composite.item(activeId2);
        combobox.setState("activeValue", activeItem == null ? void 0 : activeItem.value);
      })
    );
    return {
      ...popover,
      ...composite,
      ...combobox,
      tag,
      setValue: (value2) => combobox.setState("value", value2),
      resetValue: () => combobox.setState("value", initialState.value),
      setSelectedValue: (selectedValue2) => combobox.setState("selectedValue", selectedValue2)
    };
  }

  // node_modules/@ariakit/react-core/esm/__chunks/SVN33SY6.js
  function useComboboxStoreOptions(props) {
    const tag = useTagContext();
    props = {
      ...props,
      tag: props.tag !== void 0 ? props.tag : tag
    };
    return useCompositeStoreOptions(props);
  }
  function useComboboxStoreProps(store, update2, props) {
    useUpdateEffect(update2, [props.tag]);
    useStoreProps(store, props, "value", "setValue");
    useStoreProps(store, props, "selectedValue", "setSelectedValue");
    useStoreProps(store, props, "resetValueOnHide");
    useStoreProps(store, props, "resetValueOnSelect");
    return Object.assign(
      useCompositeStoreProps(
        usePopoverStoreProps(store, update2, props),
        update2,
        props
      ),
      { tag: props.tag }
    );
  }
  function useComboboxStore(props = {}) {
    props = useComboboxStoreOptions(props);
    const [store, update2] = useStore(createComboboxStore, props);
    return useComboboxStoreProps(store, update2, props);
  }

  // node_modules/@ariakit/react-core/esm/combobox/combobox-provider.js
  var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1);
  function ComboboxProvider(props = {}) {
    const store = useComboboxStore(props);
    return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ComboboxContextProvider, { value: store, children: props.children });
  }

  // packages/dataviews/build-module/components/dataviews-filters/search-widget.mjs
  var import_remove_accents = __toESM(require_remove_accents(), 1);
  var import_compose8 = __toESM(require_compose(), 1);
  var import_i18n28 = __toESM(require_i18n(), 1);
  var import_element25 = __toESM(require_element(), 1);
  var import_components19 = __toESM(require_components(), 1);

  // packages/dataviews/build-module/components/dataviews-filters/utils.mjs
  var EMPTY_ARRAY3 = [];
  var getCurrentValue = (filterDefinition, currentFilter) => {
    if (filterDefinition.singleSelection) {
      return currentFilter?.value;
    }
    if (Array.isArray(currentFilter?.value)) {
      return currentFilter.value;
    }
    if (!Array.isArray(currentFilter?.value) && !!currentFilter?.value) {
      return [currentFilter.value];
    }
    return EMPTY_ARRAY3;
  };

  // packages/dataviews/build-module/hooks/use-elements.mjs
  var import_element24 = __toESM(require_element(), 1);
  var EMPTY_ARRAY4 = [];
  function useElements({
    elements,
    getElements
  }) {
    const staticElements = Array.isArray(elements) && elements.length > 0 ? elements : EMPTY_ARRAY4;
    const [records, setRecords] = (0, import_element24.useState)(staticElements);
    const [isLoading, setIsLoading] = (0, import_element24.useState)(false);
    (0, import_element24.useEffect)(() => {
      if (!getElements) {
        setRecords(staticElements);
        return;
      }
      let cancelled = false;
      setIsLoading(true);
      getElements().then((fetchedElements) => {
        if (!cancelled) {
          const dynamicElements = Array.isArray(fetchedElements) && fetchedElements.length > 0 ? fetchedElements : staticElements;
          setRecords(dynamicElements);
        }
      }).catch(() => {
        if (!cancelled) {
          setRecords(staticElements);
        }
      }).finally(() => {
        if (!cancelled) {
          setIsLoading(false);
        }
      });
      return () => {
        cancelled = true;
      };
    }, [getElements, staticElements]);
    return {
      elements: records,
      isLoading
    };
  }

  // packages/dataviews/build-module/components/dataviews-filters/search-widget.mjs
  var import_jsx_runtime60 = __toESM(require_jsx_runtime(), 1);
  function normalizeSearchInput(input = "") {
    return (0, import_remove_accents.default)(input.trim().toLowerCase());
  }
  var getNewValue = (filterDefinition, currentFilter, value) => {
    if (filterDefinition.singleSelection) {
      return value;
    }
    if (Array.isArray(currentFilter?.value)) {
      return currentFilter.value.includes(value) ? currentFilter.value.filter((v2) => v2 !== value) : [...currentFilter.value, value];
    }
    return [value];
  };
  function generateFilterElementCompositeItemId(prefix, filterElementValue) {
    return `${prefix}-${filterElementValue}`;
  }
  var MultiSelectionOption = ({ selected }) => {
    return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
      "span",
      {
        className: clsx_default(
          "dataviews-filters__search-widget-listitem-multi-selection",
          { "is-selected": selected }
        ),
        children: selected && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components19.Icon, { icon: check_default })
      }
    );
  };
  var SingleSelectionOption = ({ selected }) => {
    return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
      "span",
      {
        className: clsx_default(
          "dataviews-filters__search-widget-listitem-single-selection",
          { "is-selected": selected }
        )
      }
    );
  };
  function ListBox({ view, filter, onChangeView }) {
    const baseId = (0, import_compose8.useInstanceId)(ListBox, "dataviews-filter-list-box");
    const [activeCompositeId, setActiveCompositeId] = (0, import_element25.useState)(
      // When there are one or less operators, the first item is set as active
      // (by setting the initial `activeId` to `undefined`).
      // With 2 or more operators, the focus is moved on the operators control
      // (by setting the initial `activeId` to `null`), meaning that there won't
      // be an active item initially. Focus is then managed via the
      // `onFocusVisible` callback.
      filter.operators?.length === 1 ? void 0 : null
    );
    const currentFilter = view.filters?.find(
      (f2) => f2.field === filter.field
    );
    const currentValue = getCurrentValue(filter, currentFilter);
    return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
      import_components19.Composite,
      {
        virtualFocus: true,
        focusLoop: true,
        activeId: activeCompositeId,
        setActiveId: setActiveCompositeId,
        role: "listbox",
        className: "dataviews-filters__search-widget-listbox",
        "aria-label": (0, import_i18n28.sprintf)(
          /* translators: List of items for a filter. 1: Filter name. e.g.: "List of: Author". */
          (0, import_i18n28.__)("List of: %1$s"),
          filter.name
        ),
        onFocusVisible: () => {
          if (!activeCompositeId && filter.elements.length) {
            setActiveCompositeId(
              generateFilterElementCompositeItemId(
                baseId,
                filter.elements[0].value
              )
            );
          }
        },
        render: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components19.Composite.Typeahead, {}),
        children: filter.elements.map((element) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
          import_components19.Composite.Hover,
          {
            render: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
              import_components19.Composite.Item,
              {
                id: generateFilterElementCompositeItemId(
                  baseId,
                  element.value
                ),
                render: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
                  "div",
                  {
                    "aria-label": element.label,
                    role: "option",
                    className: "dataviews-filters__search-widget-listitem"
                  }
                ),
                onClick: () => {
                  const newFilters = currentFilter ? [
                    ...(view.filters ?? []).map(
                      (_filter) => {
                        if (_filter.field === filter.field) {
                          return {
                            ..._filter,
                            operator: currentFilter.operator || filter.operators[0],
                            value: getNewValue(
                              filter,
                              currentFilter,
                              element.value
                            )
                          };
                        }
                        return _filter;
                      }
                    )
                  ] : [
                    ...view.filters ?? [],
                    {
                      field: filter.field,
                      operator: filter.operators[0],
                      value: getNewValue(
                        filter,
                        currentFilter,
                        element.value
                      )
                    }
                  ];
                  onChangeView({
                    ...view,
                    page: 1,
                    filters: newFilters
                  });
                }
              }
            ),
            children: [
              filter.singleSelection && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
                SingleSelectionOption,
                {
                  selected: currentValue === element.value
                }
              ),
              !filter.singleSelection && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
                MultiSelectionOption,
                {
                  selected: currentValue.includes(element.value)
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
                "span",
                {
                  className: "dataviews-filters__search-widget-listitem-value",
                  title: element.label,
                  children: element.label
                }
              )
            ]
          },
          element.value
        ))
      }
    );
  }
  function ComboboxList22({ view, filter, onChangeView }) {
    const [searchValue, setSearchValue] = (0, import_element25.useState)("");
    const deferredSearchValue = (0, import_element25.useDeferredValue)(searchValue);
    const currentFilter = view.filters?.find(
      (_filter) => _filter.field === filter.field
    );
    const currentValue = getCurrentValue(filter, currentFilter);
    const matches = (0, import_element25.useMemo)(() => {
      const normalizedSearch = normalizeSearchInput(deferredSearchValue);
      return filter.elements.filter(
        (item) => normalizeSearchInput(item.label).includes(normalizedSearch)
      );
    }, [filter.elements, deferredSearchValue]);
    return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
      ComboboxProvider,
      {
        selectedValue: currentValue,
        setSelectedValue: (value) => {
          const newFilters = currentFilter ? [
            ...(view.filters ?? []).map((_filter) => {
              if (_filter.field === filter.field) {
                return {
                  ..._filter,
                  operator: currentFilter.operator || filter.operators[0],
                  value
                };
              }
              return _filter;
            })
          ] : [
            ...view.filters ?? [],
            {
              field: filter.field,
              operator: filter.operators[0],
              value
            }
          ];
          onChangeView({
            ...view,
            page: 1,
            filters: newFilters
          });
        },
        setValue: setSearchValue,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "dataviews-filters__search-widget-filter-combobox__wrapper", children: [
            /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
              ComboboxLabel,
              {
                render: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components19.VisuallyHidden, { children: (0, import_i18n28.__)("Search items") }),
                children: (0, import_i18n28.__)("Search items")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
              Combobox,
              {
                autoSelect: "always",
                placeholder: (0, import_i18n28.__)("Search"),
                className: "dataviews-filters__search-widget-filter-combobox__input"
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "dataviews-filters__search-widget-filter-combobox__icon", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components19.Icon, { icon: search_default }) })
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
            ComboboxList,
            {
              className: "dataviews-filters__search-widget-filter-combobox-list",
              alwaysVisible: true,
              children: [
                matches.map((element) => {
                  return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
                    ComboboxItem,
                    {
                      resetValueOnSelect: false,
                      value: element.value,
                      className: "dataviews-filters__search-widget-listitem",
                      hideOnClick: false,
                      setValueOnClick: false,
                      focusOnHover: true,
                      children: [
                        filter.singleSelection && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
                          SingleSelectionOption,
                          {
                            selected: currentValue === element.value
                          }
                        ),
                        !filter.singleSelection && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
                          MultiSelectionOption,
                          {
                            selected: currentValue.includes(
                              element.value
                            )
                          }
                        ),
                        /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
                          "span",
                          {
                            className: "dataviews-filters__search-widget-listitem-value",
                            title: element.label,
                            children: [
                              /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
                                ComboboxItemValue,
                                {
                                  className: "dataviews-filters__search-widget-filter-combobox-item-value",
                                  value: element.label
                                }
                              ),
                              !!element.description && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "dataviews-filters__search-widget-listitem-description", children: element.description })
                            ]
                          }
                        )
                      ]
                    },
                    element.value
                  );
                }),
                !matches.length && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { children: (0, import_i18n28.__)("No results found") })
              ]
            }
          )
        ]
      }
    );
  }
  function SearchWidget(props) {
    const { elements, isLoading } = useElements({
      elements: props.filter.elements,
      getElements: props.filter.getElements
    });
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "dataviews-filters__search-widget-no-elements", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components19.Spinner, {}) });
    }
    if (elements.length === 0) {
      return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "dataviews-filters__search-widget-no-elements", children: (0, import_i18n28.__)("No elements found") });
    }
    const Widget = elements.length > 10 ? ComboboxList22 : ListBox;
    return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Widget, { ...props, filter: { ...props.filter, elements } });
  }

  // packages/dataviews/build-module/components/dataviews-filters/input-widget.mjs
  var import_es6 = __toESM(require_es6(), 1);
  var import_compose9 = __toESM(require_compose(), 1);
  var import_element26 = __toESM(require_element(), 1);
  var import_components20 = __toESM(require_components(), 1);
  var import_jsx_runtime61 = __toESM(require_jsx_runtime(), 1);
  function InputWidget({
    filter,
    view,
    onChangeView,
    fields
  }) {
    const currentFilter = view.filters?.find(
      (f2) => f2.field === filter.field
    );
    const currentValue = getCurrentValue(filter, currentFilter);
    const field = (0, import_element26.useMemo)(() => {
      const currentField = fields.find((f2) => f2.id === filter.field);
      if (currentField) {
        return {
          ...currentField,
          // Deactivate validation for filters.
          isValid: {},
          // Configure getValue/setValue as if Item was a plain object.
          getValue: ({ item }) => item[currentField.id],
          setValue: ({ value }) => ({
            [currentField.id]: value
          })
        };
      }
      return currentField;
    }, [fields, filter.field]);
    const data = (0, import_element26.useMemo)(() => {
      return (view.filters ?? []).reduce(
        (acc, activeFilter) => {
          acc[activeFilter.field] = activeFilter.value;
          return acc;
        },
        {}
      );
    }, [view.filters]);
    const handleChange = (0, import_compose9.useEvent)((updatedData) => {
      if (!field || !currentFilter) {
        return;
      }
      const nextValue = field.getValue({ item: updatedData });
      if ((0, import_es6.default)(nextValue, currentValue)) {
        return;
      }
      onChangeView({
        ...view,
        filters: (view.filters ?? []).map(
          (_filter) => _filter.field === filter.field ? {
            ..._filter,
            operator: currentFilter.operator || filter.operators[0],
            // Consider empty strings as undefined:
            //
            // - undefined as value means the filter is unset: the filter widget displays no value and the search returns all records
            // - empty string as value means "search empty string": returns only the records that have an empty string as value
            //
            // In practice, this means the filter will not be able to find an empty string as the value.
            value: nextValue === "" ? void 0 : nextValue
          } : _filter
        )
      });
    });
    if (!field || !field.Edit || !currentFilter) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
      import_components20.Flex,
      {
        className: "dataviews-filters__user-input-widget",
        gap: 2.5,
        direction: "column",
        children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
          field.Edit,
          {
            hideLabelFromVision: true,
            data,
            field,
            operator: currentFilter.operator,
            onChange: handleChange
          }
        )
      }
    );
  }

  // packages/dataviews/node_modules/date-fns/constants.js
  var daysInYear = 365.2425;
  var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1e3;
  var minTime = -maxTime;
  var millisecondsInWeek = 6048e5;
  var millisecondsInDay = 864e5;
  var secondsInHour = 3600;
  var secondsInDay = secondsInHour * 24;
  var secondsInWeek = secondsInDay * 7;
  var secondsInYear = secondsInDay * daysInYear;
  var secondsInMonth = secondsInYear / 12;
  var secondsInQuarter = secondsInMonth * 3;
  var constructFromSymbol = /* @__PURE__ */ Symbol.for("constructDateFrom");

  // packages/dataviews/node_modules/date-fns/constructFrom.js
  function constructFrom(date, value) {
    if (typeof date === "function") return date(value);
    if (date && typeof date === "object" && constructFromSymbol in date)
      return date[constructFromSymbol](value);
    if (date instanceof Date) return new date.constructor(value);
    return new Date(value);
  }

  // packages/dataviews/node_modules/date-fns/toDate.js
  function toDate(argument, context) {
    return constructFrom(context || argument, argument);
  }

  // packages/dataviews/node_modules/date-fns/addDays.js
  function addDays(date, amount, options) {
    const _date = toDate(date, options?.in);
    if (isNaN(amount)) return constructFrom(options?.in || date, NaN);
    if (!amount) return _date;
    _date.setDate(_date.getDate() + amount);
    return _date;
  }

  // packages/dataviews/node_modules/date-fns/addMonths.js
  function addMonths(date, amount, options) {
    const _date = toDate(date, options?.in);
    if (isNaN(amount)) return constructFrom(options?.in || date, NaN);
    if (!amount) {
      return _date;
    }
    const dayOfMonth = _date.getDate();
    const endOfDesiredMonth = constructFrom(options?.in || date, _date.getTime());
    endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);
    const daysInMonth = endOfDesiredMonth.getDate();
    if (dayOfMonth >= daysInMonth) {
      return endOfDesiredMonth;
    } else {
      _date.setFullYear(
        endOfDesiredMonth.getFullYear(),
        endOfDesiredMonth.getMonth(),
        dayOfMonth
      );
      return _date;
    }
  }

  // packages/dataviews/node_modules/date-fns/_lib/defaultOptions.js
  var defaultOptions = {};
  function getDefaultOptions() {
    return defaultOptions;
  }

  // packages/dataviews/node_modules/date-fns/startOfWeek.js
  function startOfWeek(date, options) {
    const defaultOptions2 = getDefaultOptions();
    const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
    const _date = toDate(date, options?.in);
    const day = _date.getDay();
    const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
    _date.setDate(_date.getDate() - diff);
    _date.setHours(0, 0, 0, 0);
    return _date;
  }

  // packages/dataviews/node_modules/date-fns/startOfISOWeek.js
  function startOfISOWeek(date, options) {
    return startOfWeek(date, { ...options, weekStartsOn: 1 });
  }

  // packages/dataviews/node_modules/date-fns/getISOWeekYear.js
  function getISOWeekYear(date, options) {
    const _date = toDate(date, options?.in);
    const year = _date.getFullYear();
    const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);
    fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
    fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
    const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
    const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);
    fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
    fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
    const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
    if (_date.getTime() >= startOfNextYear.getTime()) {
      return year + 1;
    } else if (_date.getTime() >= startOfThisYear.getTime()) {
      return year;
    } else {
      return year - 1;
    }
  }

  // packages/dataviews/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
  function getTimezoneOffsetInMilliseconds(date) {
    const _date = toDate(date);
    const utcDate = new Date(
      Date.UTC(
        _date.getFullYear(),
        _date.getMonth(),
        _date.getDate(),
        _date.getHours(),
        _date.getMinutes(),
        _date.getSeconds(),
        _date.getMilliseconds()
      )
    );
    utcDate.setUTCFullYear(_date.getFullYear());
    return +date - +utcDate;
  }

  // packages/dataviews/node_modules/date-fns/_lib/normalizeDates.js
  function normalizeDates(context, ...dates) {
    const normalize = constructFrom.bind(
      null,
      context || dates.find((date) => typeof date === "object")
    );
    return dates.map(normalize);
  }

  // packages/dataviews/node_modules/date-fns/startOfDay.js
  function startOfDay(date, options) {
    const _date = toDate(date, options?.in);
    _date.setHours(0, 0, 0, 0);
    return _date;
  }

  // packages/dataviews/node_modules/date-fns/differenceInCalendarDays.js
  function differenceInCalendarDays(laterDate, earlierDate, options) {
    const [laterDate_, earlierDate_] = normalizeDates(
      options?.in,
      laterDate,
      earlierDate
    );
    const laterStartOfDay = startOfDay(laterDate_);
    const earlierStartOfDay = startOfDay(earlierDate_);
    const laterTimestamp = +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);
    const earlierTimestamp = +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);
    return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);
  }

  // packages/dataviews/node_modules/date-fns/startOfISOWeekYear.js
  function startOfISOWeekYear(date, options) {
    const year = getISOWeekYear(date, options);
    const fourthOfJanuary = constructFrom(options?.in || date, 0);
    fourthOfJanuary.setFullYear(year, 0, 4);
    fourthOfJanuary.setHours(0, 0, 0, 0);
    return startOfISOWeek(fourthOfJanuary);
  }

  // packages/dataviews/node_modules/date-fns/addWeeks.js
  function addWeeks(date, amount, options) {
    return addDays(date, amount * 7, options);
  }

  // packages/dataviews/node_modules/date-fns/addYears.js
  function addYears(date, amount, options) {
    return addMonths(date, amount * 12, options);
  }

  // packages/dataviews/node_modules/date-fns/isDate.js
  function isDate(value) {
    return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]";
  }

  // packages/dataviews/node_modules/date-fns/isValid.js
  function isValid(date) {
    return !(!isDate(date) && typeof date !== "number" || isNaN(+toDate(date)));
  }

  // packages/dataviews/node_modules/date-fns/startOfMonth.js
  function startOfMonth(date, options) {
    const _date = toDate(date, options?.in);
    _date.setDate(1);
    _date.setHours(0, 0, 0, 0);
    return _date;
  }

  // packages/dataviews/node_modules/date-fns/startOfYear.js
  function startOfYear(date, options) {
    const date_ = toDate(date, options?.in);
    date_.setFullYear(date_.getFullYear(), 0, 1);
    date_.setHours(0, 0, 0, 0);
    return date_;
  }

  // packages/dataviews/node_modules/date-fns/locale/en-US/_lib/formatDistance.js
  var formatDistanceLocale = {
    lessThanXSeconds: {
      one: "less than a second",
      other: "less than {{count}} seconds"
    },
    xSeconds: {
      one: "1 second",
      other: "{{count}} seconds"
    },
    halfAMinute: "half a minute",
    lessThanXMinutes: {
      one: "less than a minute",
      other: "less than {{count}} minutes"
    },
    xMinutes: {
      one: "1 minute",
      other: "{{count}} minutes"
    },
    aboutXHours: {
      one: "about 1 hour",
      other: "about {{count}} hours"
    },
    xHours: {
      one: "1 hour",
      other: "{{count}} hours"
    },
    xDays: {
      one: "1 day",
      other: "{{count}} days"
    },
    aboutXWeeks: {
      one: "about 1 week",
      other: "about {{count}} weeks"
    },
    xWeeks: {
      one: "1 week",
      other: "{{count}} weeks"
    },
    aboutXMonths: {
      one: "about 1 month",
      other: "about {{count}} months"
    },
    xMonths: {
      one: "1 month",
      other: "{{count}} months"
    },
    aboutXYears: {
      one: "about 1 year",
      other: "about {{count}} years"
    },
    xYears: {
      one: "1 year",
      other: "{{count}} years"
    },
    overXYears: {
      one: "over 1 year",
      other: "over {{count}} years"
    },
    almostXYears: {
      one: "almost 1 year",
      other: "almost {{count}} years"
    }
  };
  var formatDistance = (token, count, options) => {
    let result;
    const tokenValue = formatDistanceLocale[token];
    if (typeof tokenValue === "string") {
      result = tokenValue;
    } else if (count === 1) {
      result = tokenValue.one;
    } else {
      result = tokenValue.other.replace("{{count}}", count.toString());
    }
    if (options?.addSuffix) {
      if (options.comparison && options.comparison > 0) {
        return "in " + result;
      } else {
        return result + " ago";
      }
    }
    return result;
  };

  // packages/dataviews/node_modules/date-fns/locale/_lib/buildFormatLongFn.js
  function buildFormatLongFn(args) {
    return (options = {}) => {
      const width = options.width ? String(options.width) : args.defaultWidth;
      const format6 = args.formats[width] || args.formats[args.defaultWidth];
      return format6;
    };
  }

  // packages/dataviews/node_modules/date-fns/locale/en-US/_lib/formatLong.js
  var dateFormats = {
    full: "EEEE, MMMM do, y",
    long: "MMMM do, y",
    medium: "MMM d, y",
    short: "MM/dd/yyyy"
  };
  var timeFormats = {
    full: "h:mm:ss a zzzz",
    long: "h:mm:ss a z",
    medium: "h:mm:ss a",
    short: "h:mm a"
  };
  var dateTimeFormats = {
    full: "{{date}} 'at' {{time}}",
    long: "{{date}} 'at' {{time}}",
    medium: "{{date}}, {{time}}",
    short: "{{date}}, {{time}}"
  };
  var formatLong = {
    date: buildFormatLongFn({
      formats: dateFormats,
      defaultWidth: "full"
    }),
    time: buildFormatLongFn({
      formats: timeFormats,
      defaultWidth: "full"
    }),
    dateTime: buildFormatLongFn({
      formats: dateTimeFormats,
      defaultWidth: "full"
    })
  };

  // packages/dataviews/node_modules/date-fns/locale/en-US/_lib/formatRelative.js
  var formatRelativeLocale = {
    lastWeek: "'last' eeee 'at' p",
    yesterday: "'yesterday at' p",
    today: "'today at' p",
    tomorrow: "'tomorrow at' p",
    nextWeek: "eeee 'at' p",
    other: "P"
  };
  var formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];

  // packages/dataviews/node_modules/date-fns/locale/_lib/buildLocalizeFn.js
  function buildLocalizeFn(args) {
    return (value, options) => {
      const context = options?.context ? String(options.context) : "standalone";
      let valuesArray;
      if (context === "formatting" && args.formattingValues) {
        const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
        const width = options?.width ? String(options.width) : defaultWidth;
        valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
      } else {
        const defaultWidth = args.defaultWidth;
        const width = options?.width ? String(options.width) : args.defaultWidth;
        valuesArray = args.values[width] || args.values[defaultWidth];
      }
      const index = args.argumentCallback ? args.argumentCallback(value) : value;
      return valuesArray[index];
    };
  }

  // packages/dataviews/node_modules/date-fns/locale/en-US/_lib/localize.js
  var eraValues = {
    narrow: ["B", "A"],
    abbreviated: ["BC", "AD"],
    wide: ["Before Christ", "Anno Domini"]
  };
  var quarterValues = {
    narrow: ["1", "2", "3", "4"],
    abbreviated: ["Q1", "Q2", "Q3", "Q4"],
    wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
  };
  var monthValues = {
    narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
    abbreviated: [
      "Jan",
      "Feb",
      "Mar",
      "Apr",
      "May",
      "Jun",
      "Jul",
      "Aug",
      "Sep",
      "Oct",
      "Nov",
      "Dec"
    ],
    wide: [
      "January",
      "February",
      "March",
      "April",
      "May",
      "June",
      "July",
      "August",
      "September",
      "October",
      "November",
      "December"
    ]
  };
  var dayValues = {
    narrow: ["S", "M", "T", "W", "T", "F", "S"],
    short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
    abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
    wide: [
      "Sunday",
      "Monday",
      "Tuesday",
      "Wednesday",
      "Thursday",
      "Friday",
      "Saturday"
    ]
  };
  var dayPeriodValues = {
    narrow: {
      am: "a",
      pm: "p",
      midnight: "mi",
      noon: "n",
      morning: "morning",
      afternoon: "afternoon",
      evening: "evening",
      night: "night"
    },
    abbreviated: {
      am: "AM",
      pm: "PM",
      midnight: "midnight",
      noon: "noon",
      morning: "morning",
      afternoon: "afternoon",
      evening: "evening",
      night: "night"
    },
    wide: {
      am: "a.m.",
      pm: "p.m.",
      midnight: "midnight",
      noon: "noon",
      morning: "morning",
      afternoon: "afternoon",
      evening: "evening",
      night: "night"
    }
  };
  var formattingDayPeriodValues = {
    narrow: {
      am: "a",
      pm: "p",
      midnight: "mi",
      noon: "n",
      morning: "in the morning",
      afternoon: "in the afternoon",
      evening: "in the evening",
      night: "at night"
    },
    abbreviated: {
      am: "AM",
      pm: "PM",
      midnight: "midnight",
      noon: "noon",
      morning: "in the morning",
      afternoon: "in the afternoon",
      evening: "in the evening",
      night: "at night"
    },
    wide: {
      am: "a.m.",
      pm: "p.m.",
      midnight: "midnight",
      noon: "noon",
      morning: "in the morning",
      afternoon: "in the afternoon",
      evening: "in the evening",
      night: "at night"
    }
  };
  var ordinalNumber = (dirtyNumber, _options) => {
    const number = Number(dirtyNumber);
    const rem100 = number % 100;
    if (rem100 > 20 || rem100 < 10) {
      switch (rem100 % 10) {
        case 1:
          return number + "st";
        case 2:
          return number + "nd";
        case 3:
          return number + "rd";
      }
    }
    return number + "th";
  };
  var localize = {
    ordinalNumber,
    era: buildLocalizeFn({
      values: eraValues,
      defaultWidth: "wide"
    }),
    quarter: buildLocalizeFn({
      values: quarterValues,
      defaultWidth: "wide",
      argumentCallback: (quarter) => quarter - 1
    }),
    month: buildLocalizeFn({
      values: monthValues,
      defaultWidth: "wide"
    }),
    day: buildLocalizeFn({
      values: dayValues,
      defaultWidth: "wide"
    }),
    dayPeriod: buildLocalizeFn({
      values: dayPeriodValues,
      defaultWidth: "wide",
      formattingValues: formattingDayPeriodValues,
      defaultFormattingWidth: "wide"
    })
  };

  // packages/dataviews/node_modules/date-fns/locale/_lib/buildMatchFn.js
  function buildMatchFn(args) {
    return (string, options = {}) => {
      const width = options.width;
      const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
      const matchResult = string.match(matchPattern);
      if (!matchResult) {
        return null;
      }
      const matchedString = matchResult[0];
      const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
      const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : (
        // [TODO] -- I challenge you to fix the type
        findKey(parsePatterns, (pattern) => pattern.test(matchedString))
      );
      let value;
      value = args.valueCallback ? args.valueCallback(key) : key;
      value = options.valueCallback ? (
        // [TODO] -- I challenge you to fix the type
        options.valueCallback(value)
      ) : value;
      const rest = string.slice(matchedString.length);
      return { value, rest };
    };
  }
  function findKey(object, predicate) {
    for (const key in object) {
      if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
        return key;
      }
    }
    return void 0;
  }
  function findIndex(array, predicate) {
    for (let key = 0; key < array.length; key++) {
      if (predicate(array[key])) {
        return key;
      }
    }
    return void 0;
  }

  // packages/dataviews/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
  function buildMatchPatternFn(args) {
    return (string, options = {}) => {
      const matchResult = string.match(args.matchPattern);
      if (!matchResult) return null;
      const matchedString = matchResult[0];
      const parseResult = string.match(args.parsePattern);
      if (!parseResult) return null;
      let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
      value = options.valueCallback ? options.valueCallback(value) : value;
      const rest = string.slice(matchedString.length);
      return { value, rest };
    };
  }

  // packages/dataviews/node_modules/date-fns/locale/en-US/_lib/match.js
  var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
  var parseOrdinalNumberPattern = /\d+/i;
  var matchEraPatterns = {
    narrow: /^(b|a)/i,
    abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
    wide: /^(before christ|before common era|anno domini|common era)/i
  };
  var parseEraPatterns = {
    any: [/^b/i, /^(a|c)/i]
  };
  var matchQuarterPatterns = {
    narrow: /^[1234]/i,
    abbreviated: /^q[1234]/i,
    wide: /^[1234](th|st|nd|rd)? quarter/i
  };
  var parseQuarterPatterns = {
    any: [/1/i, /2/i, /3/i, /4/i]
  };
  var matchMonthPatterns = {
    narrow: /^[jfmasond]/i,
    abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
    wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
  };
  var parseMonthPatterns = {
    narrow: [
      /^j/i,
      /^f/i,
      /^m/i,
      /^a/i,
      /^m/i,
      /^j/i,
      /^j/i,
      /^a/i,
      /^s/i,
      /^o/i,
      /^n/i,
      /^d/i
    ],
    any: [
      /^ja/i,
      /^f/i,
      /^mar/i,
      /^ap/i,
      /^may/i,
      /^jun/i,
      /^jul/i,
      /^au/i,
      /^s/i,
      /^o/i,
      /^n/i,
      /^d/i
    ]
  };
  var matchDayPatterns = {
    narrow: /^[smtwf]/i,
    short: /^(su|mo|tu|we|th|fr|sa)/i,
    abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
    wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
  };
  var parseDayPatterns = {
    narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
    any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
  };
  var matchDayPeriodPatterns = {
    narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
    any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
  };
  var parseDayPeriodPatterns = {
    any: {
      am: /^a/i,
      pm: /^p/i,
      midnight: /^mi/i,
      noon: /^no/i,
      morning: /morning/i,
      afternoon: /afternoon/i,
      evening: /evening/i,
      night: /night/i
    }
  };
  var match = {
    ordinalNumber: buildMatchPatternFn({
      matchPattern: matchOrdinalNumberPattern,
      parsePattern: parseOrdinalNumberPattern,
      valueCallback: (value) => parseInt(value, 10)
    }),
    era: buildMatchFn({
      matchPatterns: matchEraPatterns,
      defaultMatchWidth: "wide",
      parsePatterns: parseEraPatterns,
      defaultParseWidth: "any"
    }),
    quarter: buildMatchFn({
      matchPatterns: matchQuarterPatterns,
      defaultMatchWidth: "wide",
      parsePatterns: parseQuarterPatterns,
      defaultParseWidth: "any",
      valueCallback: (index) => index + 1
    }),
    month: buildMatchFn({
      matchPatterns: matchMonthPatterns,
      defaultMatchWidth: "wide",
      parsePatterns: parseMonthPatterns,
      defaultParseWidth: "any"
    }),
    day: buildMatchFn({
      matchPatterns: matchDayPatterns,
      defaultMatchWidth: "wide",
      parsePatterns: parseDayPatterns,
      defaultParseWidth: "any"
    }),
    dayPeriod: buildMatchFn({
      matchPatterns: matchDayPeriodPatterns,
      defaultMatchWidth: "any",
      parsePatterns: parseDayPeriodPatterns,
      defaultParseWidth: "any"
    })
  };

  // packages/dataviews/node_modules/date-fns/locale/en-US.js
  var enUS = {
    code: "en-US",
    formatDistance,
    formatLong,
    formatRelative,
    localize,
    match,
    options: {
      weekStartsOn: 0,
      firstWeekContainsDate: 1
    }
  };

  // packages/dataviews/node_modules/date-fns/getDayOfYear.js
  function getDayOfYear(date, options) {
    const _date = toDate(date, options?.in);
    const diff = differenceInCalendarDays(_date, startOfYear(_date));
    const dayOfYear = diff + 1;
    return dayOfYear;
  }

  // packages/dataviews/node_modules/date-fns/getISOWeek.js
  function getISOWeek(date, options) {
    const _date = toDate(date, options?.in);
    const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);
    return Math.round(diff / millisecondsInWeek) + 1;
  }

  // packages/dataviews/node_modules/date-fns/getWeekYear.js
  function getWeekYear(date, options) {
    const _date = toDate(date, options?.in);
    const year = _date.getFullYear();
    const defaultOptions2 = getDefaultOptions();
    const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
    const firstWeekOfNextYear = constructFrom(options?.in || date, 0);
    firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
    firstWeekOfNextYear.setHours(0, 0, 0, 0);
    const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);
    const firstWeekOfThisYear = constructFrom(options?.in || date, 0);
    firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);
    firstWeekOfThisYear.setHours(0, 0, 0, 0);
    const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);
    if (+_date >= +startOfNextYear) {
      return year + 1;
    } else if (+_date >= +startOfThisYear) {
      return year;
    } else {
      return year - 1;
    }
  }

  // packages/dataviews/node_modules/date-fns/startOfWeekYear.js
  function startOfWeekYear(date, options) {
    const defaultOptions2 = getDefaultOptions();
    const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
    const year = getWeekYear(date, options);
    const firstWeek = constructFrom(options?.in || date, 0);
    firstWeek.setFullYear(year, 0, firstWeekContainsDate);
    firstWeek.setHours(0, 0, 0, 0);
    const _date = startOfWeek(firstWeek, options);
    return _date;
  }

  // packages/dataviews/node_modules/date-fns/getWeek.js
  function getWeek(date, options) {
    const _date = toDate(date, options?.in);
    const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);
    return Math.round(diff / millisecondsInWeek) + 1;
  }

  // packages/dataviews/node_modules/date-fns/_lib/addLeadingZeros.js
  function addLeadingZeros(number, targetLength) {
    const sign = number < 0 ? "-" : "";
    const output = Math.abs(number).toString().padStart(targetLength, "0");
    return sign + output;
  }

  // packages/dataviews/node_modules/date-fns/_lib/format/lightFormatters.js
  var lightFormatters = {
    // Year
    y(date, token) {
      const signedYear = date.getFullYear();
      const year = signedYear > 0 ? signedYear : 1 - signedYear;
      return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
    },
    // Month
    M(date, token) {
      const month = date.getMonth();
      return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
    },
    // Day of the month
    d(date, token) {
      return addLeadingZeros(date.getDate(), token.length);
    },
    // AM or PM
    a(date, token) {
      const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am";
      switch (token) {
        case "a":
        case "aa":
          return dayPeriodEnumValue.toUpperCase();
        case "aaa":
          return dayPeriodEnumValue;
        case "aaaaa":
          return dayPeriodEnumValue[0];
        case "aaaa":
        default:
          return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
      }
    },
    // Hour [1-12]
    h(date, token) {
      return addLeadingZeros(date.getHours() % 12 || 12, token.length);
    },
    // Hour [0-23]
    H(date, token) {
      return addLeadingZeros(date.getHours(), token.length);
    },
    // Minute
    m(date, token) {
      return addLeadingZeros(date.getMinutes(), token.length);
    },
    // Second
    s(date, token) {
      return addLeadingZeros(date.getSeconds(), token.length);
    },
    // Fraction of second
    S(date, token) {
      const numberOfDigits = token.length;
      const milliseconds = date.getMilliseconds();
      const fractionalSeconds = Math.trunc(
        milliseconds * Math.pow(10, numberOfDigits - 3)
      );
      return addLeadingZeros(fractionalSeconds, token.length);
    }
  };

  // packages/dataviews/node_modules/date-fns/_lib/format/formatters.js
  var dayPeriodEnum = {
    am: "am",
    pm: "pm",
    midnight: "midnight",
    noon: "noon",
    morning: "morning",
    afternoon: "afternoon",
    evening: "evening",
    night: "night"
  };
  var formatters = {
    // Era
    G: function(date, token, localize2) {
      const era = date.getFullYear() > 0 ? 1 : 0;
      switch (token) {
        // AD, BC
        case "G":
        case "GG":
        case "GGG":
          return localize2.era(era, { width: "abbreviated" });
        // A, B
        case "GGGGG":
          return localize2.era(era, { width: "narrow" });
        // Anno Domini, Before Christ
        case "GGGG":
        default:
          return localize2.era(era, { width: "wide" });
      }
    },
    // Year
    y: function(date, token, localize2) {
      if (token === "yo") {
        const signedYear = date.getFullYear();
        const year = signedYear > 0 ? signedYear : 1 - signedYear;
        return localize2.ordinalNumber(year, { unit: "year" });
      }
      return lightFormatters.y(date, token);
    },
    // Local week-numbering year
    Y: function(date, token, localize2, options) {
      const signedWeekYear = getWeekYear(date, options);
      const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
      if (token === "YY") {
        const twoDigitYear = weekYear % 100;
        return addLeadingZeros(twoDigitYear, 2);
      }
      if (token === "Yo") {
        return localize2.ordinalNumber(weekYear, { unit: "year" });
      }
      return addLeadingZeros(weekYear, token.length);
    },
    // ISO week-numbering year
    R: function(date, token) {
      const isoWeekYear = getISOWeekYear(date);
      return addLeadingZeros(isoWeekYear, token.length);
    },
    // Extended year. This is a single number designating the year of this calendar system.
    // The main difference between `y` and `u` localizers are B.C. years:
    // | Year | `y` | `u` |
    // |------|-----|-----|
    // | AC 1 |   1 |   1 |
    // | BC 1 |   1 |   0 |
    // | BC 2 |   2 |  -1 |
    // Also `yy` always returns the last two digits of a year,
    // while `uu` pads single digit years to 2 characters and returns other years unchanged.
    u: function(date, token) {
      const year = date.getFullYear();
      return addLeadingZeros(year, token.length);
    },
    // Quarter
    Q: function(date, token, localize2) {
      const quarter = Math.ceil((date.getMonth() + 1) / 3);
      switch (token) {
        // 1, 2, 3, 4
        case "Q":
          return String(quarter);
        // 01, 02, 03, 04
        case "QQ":
          return addLeadingZeros(quarter, 2);
        // 1st, 2nd, 3rd, 4th
        case "Qo":
          return localize2.ordinalNumber(quarter, { unit: "quarter" });
        // Q1, Q2, Q3, Q4
        case "QQQ":
          return localize2.quarter(quarter, {
            width: "abbreviated",
            context: "formatting"
          });
        // 1, 2, 3, 4 (narrow quarter; could be not numerical)
        case "QQQQQ":
          return localize2.quarter(quarter, {
            width: "narrow",
            context: "formatting"
          });
        // 1st quarter, 2nd quarter, ...
        case "QQQQ":
        default:
          return localize2.quarter(quarter, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // Stand-alone quarter
    q: function(date, token, localize2) {
      const quarter = Math.ceil((date.getMonth() + 1) / 3);
      switch (token) {
        // 1, 2, 3, 4
        case "q":
          return String(quarter);
        // 01, 02, 03, 04
        case "qq":
          return addLeadingZeros(quarter, 2);
        // 1st, 2nd, 3rd, 4th
        case "qo":
          return localize2.ordinalNumber(quarter, { unit: "quarter" });
        // Q1, Q2, Q3, Q4
        case "qqq":
          return localize2.quarter(quarter, {
            width: "abbreviated",
            context: "standalone"
          });
        // 1, 2, 3, 4 (narrow quarter; could be not numerical)
        case "qqqqq":
          return localize2.quarter(quarter, {
            width: "narrow",
            context: "standalone"
          });
        // 1st quarter, 2nd quarter, ...
        case "qqqq":
        default:
          return localize2.quarter(quarter, {
            width: "wide",
            context: "standalone"
          });
      }
    },
    // Month
    M: function(date, token, localize2) {
      const month = date.getMonth();
      switch (token) {
        case "M":
        case "MM":
          return lightFormatters.M(date, token);
        // 1st, 2nd, ..., 12th
        case "Mo":
          return localize2.ordinalNumber(month + 1, { unit: "month" });
        // Jan, Feb, ..., Dec
        case "MMM":
          return localize2.month(month, {
            width: "abbreviated",
            context: "formatting"
          });
        // J, F, ..., D
        case "MMMMM":
          return localize2.month(month, {
            width: "narrow",
            context: "formatting"
          });
        // January, February, ..., December
        case "MMMM":
        default:
          return localize2.month(month, { width: "wide", context: "formatting" });
      }
    },
    // Stand-alone month
    L: function(date, token, localize2) {
      const month = date.getMonth();
      switch (token) {
        // 1, 2, ..., 12
        case "L":
          return String(month + 1);
        // 01, 02, ..., 12
        case "LL":
          return addLeadingZeros(month + 1, 2);
        // 1st, 2nd, ..., 12th
        case "Lo":
          return localize2.ordinalNumber(month + 1, { unit: "month" });
        // Jan, Feb, ..., Dec
        case "LLL":
          return localize2.month(month, {
            width: "abbreviated",
            context: "standalone"
          });
        // J, F, ..., D
        case "LLLLL":
          return localize2.month(month, {
            width: "narrow",
            context: "standalone"
          });
        // January, February, ..., December
        case "LLLL":
        default:
          return localize2.month(month, { width: "wide", context: "standalone" });
      }
    },
    // Local week of year
    w: function(date, token, localize2, options) {
      const week = getWeek(date, options);
      if (token === "wo") {
        return localize2.ordinalNumber(week, { unit: "week" });
      }
      return addLeadingZeros(week, token.length);
    },
    // ISO week of year
    I: function(date, token, localize2) {
      const isoWeek = getISOWeek(date);
      if (token === "Io") {
        return localize2.ordinalNumber(isoWeek, { unit: "week" });
      }
      return addLeadingZeros(isoWeek, token.length);
    },
    // Day of the month
    d: function(date, token, localize2) {
      if (token === "do") {
        return localize2.ordinalNumber(date.getDate(), { unit: "date" });
      }
      return lightFormatters.d(date, token);
    },
    // Day of year
    D: function(date, token, localize2) {
      const dayOfYear = getDayOfYear(date);
      if (token === "Do") {
        return localize2.ordinalNumber(dayOfYear, { unit: "dayOfYear" });
      }
      return addLeadingZeros(dayOfYear, token.length);
    },
    // Day of week
    E: function(date, token, localize2) {
      const dayOfWeek = date.getDay();
      switch (token) {
        // Tue
        case "E":
        case "EE":
        case "EEE":
          return localize2.day(dayOfWeek, {
            width: "abbreviated",
            context: "formatting"
          });
        // T
        case "EEEEE":
          return localize2.day(dayOfWeek, {
            width: "narrow",
            context: "formatting"
          });
        // Tu
        case "EEEEEE":
          return localize2.day(dayOfWeek, {
            width: "short",
            context: "formatting"
          });
        // Tuesday
        case "EEEE":
        default:
          return localize2.day(dayOfWeek, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // Local day of week
    e: function(date, token, localize2, options) {
      const dayOfWeek = date.getDay();
      const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
      switch (token) {
        // Numerical value (Nth day of week with current locale or weekStartsOn)
        case "e":
          return String(localDayOfWeek);
        // Padded numerical value
        case "ee":
          return addLeadingZeros(localDayOfWeek, 2);
        // 1st, 2nd, ..., 7th
        case "eo":
          return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
        case "eee":
          return localize2.day(dayOfWeek, {
            width: "abbreviated",
            context: "formatting"
          });
        // T
        case "eeeee":
          return localize2.day(dayOfWeek, {
            width: "narrow",
            context: "formatting"
          });
        // Tu
        case "eeeeee":
          return localize2.day(dayOfWeek, {
            width: "short",
            context: "formatting"
          });
        // Tuesday
        case "eeee":
        default:
          return localize2.day(dayOfWeek, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // Stand-alone local day of week
    c: function(date, token, localize2, options) {
      const dayOfWeek = date.getDay();
      const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
      switch (token) {
        // Numerical value (same as in `e`)
        case "c":
          return String(localDayOfWeek);
        // Padded numerical value
        case "cc":
          return addLeadingZeros(localDayOfWeek, token.length);
        // 1st, 2nd, ..., 7th
        case "co":
          return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
        case "ccc":
          return localize2.day(dayOfWeek, {
            width: "abbreviated",
            context: "standalone"
          });
        // T
        case "ccccc":
          return localize2.day(dayOfWeek, {
            width: "narrow",
            context: "standalone"
          });
        // Tu
        case "cccccc":
          return localize2.day(dayOfWeek, {
            width: "short",
            context: "standalone"
          });
        // Tuesday
        case "cccc":
        default:
          return localize2.day(dayOfWeek, {
            width: "wide",
            context: "standalone"
          });
      }
    },
    // ISO day of week
    i: function(date, token, localize2) {
      const dayOfWeek = date.getDay();
      const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
      switch (token) {
        // 2
        case "i":
          return String(isoDayOfWeek);
        // 02
        case "ii":
          return addLeadingZeros(isoDayOfWeek, token.length);
        // 2nd
        case "io":
          return localize2.ordinalNumber(isoDayOfWeek, { unit: "day" });
        // Tue
        case "iii":
          return localize2.day(dayOfWeek, {
            width: "abbreviated",
            context: "formatting"
          });
        // T
        case "iiiii":
          return localize2.day(dayOfWeek, {
            width: "narrow",
            context: "formatting"
          });
        // Tu
        case "iiiiii":
          return localize2.day(dayOfWeek, {
            width: "short",
            context: "formatting"
          });
        // Tuesday
        case "iiii":
        default:
          return localize2.day(dayOfWeek, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // AM or PM
    a: function(date, token, localize2) {
      const hours = date.getHours();
      const dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
      switch (token) {
        case "a":
        case "aa":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          });
        case "aaa":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          }).toLowerCase();
        case "aaaaa":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "narrow",
            context: "formatting"
          });
        case "aaaa":
        default:
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // AM, PM, midnight, noon
    b: function(date, token, localize2) {
      const hours = date.getHours();
      let dayPeriodEnumValue;
      if (hours === 12) {
        dayPeriodEnumValue = dayPeriodEnum.noon;
      } else if (hours === 0) {
        dayPeriodEnumValue = dayPeriodEnum.midnight;
      } else {
        dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
      }
      switch (token) {
        case "b":
        case "bb":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          });
        case "bbb":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          }).toLowerCase();
        case "bbbbb":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "narrow",
            context: "formatting"
          });
        case "bbbb":
        default:
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // in the morning, in the afternoon, in the evening, at night
    B: function(date, token, localize2) {
      const hours = date.getHours();
      let dayPeriodEnumValue;
      if (hours >= 17) {
        dayPeriodEnumValue = dayPeriodEnum.evening;
      } else if (hours >= 12) {
        dayPeriodEnumValue = dayPeriodEnum.afternoon;
      } else if (hours >= 4) {
        dayPeriodEnumValue = dayPeriodEnum.morning;
      } else {
        dayPeriodEnumValue = dayPeriodEnum.night;
      }
      switch (token) {
        case "B":
        case "BB":
        case "BBB":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "abbreviated",
            context: "formatting"
          });
        case "BBBBB":
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "narrow",
            context: "formatting"
          });
        case "BBBB":
        default:
          return localize2.dayPeriod(dayPeriodEnumValue, {
            width: "wide",
            context: "formatting"
          });
      }
    },
    // Hour [1-12]
    h: function(date, token, localize2) {
      if (token === "ho") {
        let hours = date.getHours() % 12;
        if (hours === 0) hours = 12;
        return localize2.ordinalNumber(hours, { unit: "hour" });
      }
      return lightFormatters.h(date, token);
    },
    // Hour [0-23]
    H: function(date, token, localize2) {
      if (token === "Ho") {
        return localize2.ordinalNumber(date.getHours(), { unit: "hour" });
      }
      return lightFormatters.H(date, token);
    },
    // Hour [0-11]
    K: function(date, token, localize2) {
      const hours = date.getHours() % 12;
      if (token === "Ko") {
        return localize2.ordinalNumber(hours, { unit: "hour" });
      }
      return addLeadingZeros(hours, token.length);
    },
    // Hour [1-24]
    k: function(date, token, localize2) {
      let hours = date.getHours();
      if (hours === 0) hours = 24;
      if (token === "ko") {
        return localize2.ordinalNumber(hours, { unit: "hour" });
      }
      return addLeadingZeros(hours, token.length);
    },
    // Minute
    m: function(date, token, localize2) {
      if (token === "mo") {
        return localize2.ordinalNumber(date.getMinutes(), { unit: "minute" });
      }
      return lightFormatters.m(date, token);
    },
    // Second
    s: function(date, token, localize2) {
      if (token === "so") {
        return localize2.ordinalNumber(date.getSeconds(), { unit: "second" });
      }
      return lightFormatters.s(date, token);
    },
    // Fraction of second
    S: function(date, token) {
      return lightFormatters.S(date, token);
    },
    // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
    X: function(date, token, _localize) {
      const timezoneOffset = date.getTimezoneOffset();
      if (timezoneOffset === 0) {
        return "Z";
      }
      switch (token) {
        // Hours and optional minutes
        case "X":
          return formatTimezoneWithOptionalMinutes(timezoneOffset);
        // Hours, minutes and optional seconds without `:` delimiter
        // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
        // so this token always has the same output as `XX`
        case "XXXX":
        case "XX":
          return formatTimezone(timezoneOffset);
        // Hours, minutes and optional seconds with `:` delimiter
        // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
        // so this token always has the same output as `XXX`
        case "XXXXX":
        case "XXX":
        // Hours and minutes with `:` delimiter
        default:
          return formatTimezone(timezoneOffset, ":");
      }
    },
    // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
    x: function(date, token, _localize) {
      const timezoneOffset = date.getTimezoneOffset();
      switch (token) {
        // Hours and optional minutes
        case "x":
          return formatTimezoneWithOptionalMinutes(timezoneOffset);
        // Hours, minutes and optional seconds without `:` delimiter
        // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
        // so this token always has the same output as `xx`
        case "xxxx":
        case "xx":
          return formatTimezone(timezoneOffset);
        // Hours, minutes and optional seconds with `:` delimiter
        // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
        // so this token always has the same output as `xxx`
        case "xxxxx":
        case "xxx":
        // Hours and minutes with `:` delimiter
        default:
          return formatTimezone(timezoneOffset, ":");
      }
    },
    // Timezone (GMT)
    O: function(date, token, _localize) {
      const timezoneOffset = date.getTimezoneOffset();
      switch (token) {
        // Short
        case "O":
        case "OO":
        case "OOO":
          return "GMT" + formatTimezoneShort(timezoneOffset, ":");
        // Long
        case "OOOO":
        default:
          return "GMT" + formatTimezone(timezoneOffset, ":");
      }
    },
    // Timezone (specific non-location)
    z: function(date, token, _localize) {
      const timezoneOffset = date.getTimezoneOffset();
      switch (token) {
        // Short
        case "z":
        case "zz":
        case "zzz":
          return "GMT" + formatTimezoneShort(timezoneOffset, ":");
        // Long
        case "zzzz":
        default:
          return "GMT" + formatTimezone(timezoneOffset, ":");
      }
    },
    // Seconds timestamp
    t: function(date, token, _localize) {
      const timestamp = Math.trunc(+date / 1e3);
      return addLeadingZeros(timestamp, token.length);
    },
    // Milliseconds timestamp
    T: function(date, token, _localize) {
      return addLeadingZeros(+date, token.length);
    }
  };
  function formatTimezoneShort(offset, delimiter = "") {
    const sign = offset > 0 ? "-" : "+";
    const absOffset = Math.abs(offset);
    const hours = Math.trunc(absOffset / 60);
    const minutes = absOffset % 60;
    if (minutes === 0) {
      return sign + String(hours);
    }
    return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
  }
  function formatTimezoneWithOptionalMinutes(offset, delimiter) {
    if (offset % 60 === 0) {
      const sign = offset > 0 ? "-" : "+";
      return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
    }
    return formatTimezone(offset, delimiter);
  }
  function formatTimezone(offset, delimiter = "") {
    const sign = offset > 0 ? "-" : "+";
    const absOffset = Math.abs(offset);
    const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);
    const minutes = addLeadingZeros(absOffset % 60, 2);
    return sign + hours + delimiter + minutes;
  }

  // packages/dataviews/node_modules/date-fns/_lib/format/longFormatters.js
  var dateLongFormatter = (pattern, formatLong2) => {
    switch (pattern) {
      case "P":
        return formatLong2.date({ width: "short" });
      case "PP":
        return formatLong2.date({ width: "medium" });
      case "PPP":
        return formatLong2.date({ width: "long" });
      case "PPPP":
      default:
        return formatLong2.date({ width: "full" });
    }
  };
  var timeLongFormatter = (pattern, formatLong2) => {
    switch (pattern) {
      case "p":
        return formatLong2.time({ width: "short" });
      case "pp":
        return formatLong2.time({ width: "medium" });
      case "ppp":
        return formatLong2.time({ width: "long" });
      case "pppp":
      default:
        return formatLong2.time({ width: "full" });
    }
  };
  var dateTimeLongFormatter = (pattern, formatLong2) => {
    const matchResult = pattern.match(/(P+)(p+)?/) || [];
    const datePattern = matchResult[1];
    const timePattern = matchResult[2];
    if (!timePattern) {
      return dateLongFormatter(pattern, formatLong2);
    }
    let dateTimeFormat;
    switch (datePattern) {
      case "P":
        dateTimeFormat = formatLong2.dateTime({ width: "short" });
        break;
      case "PP":
        dateTimeFormat = formatLong2.dateTime({ width: "medium" });
        break;
      case "PPP":
        dateTimeFormat = formatLong2.dateTime({ width: "long" });
        break;
      case "PPPP":
      default:
        dateTimeFormat = formatLong2.dateTime({ width: "full" });
        break;
    }
    return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
  };
  var longFormatters = {
    p: timeLongFormatter,
    P: dateTimeLongFormatter
  };

  // packages/dataviews/node_modules/date-fns/_lib/protectedTokens.js
  var dayOfYearTokenRE = /^D+$/;
  var weekYearTokenRE = /^Y+$/;
  var throwTokens = ["D", "DD", "YY", "YYYY"];
  function isProtectedDayOfYearToken(token) {
    return dayOfYearTokenRE.test(token);
  }
  function isProtectedWeekYearToken(token) {
    return weekYearTokenRE.test(token);
  }
  function warnOrThrowProtectedError(token, format6, input) {
    const _message = message(token, format6, input);
    console.warn(_message);
    if (throwTokens.includes(token)) throw new RangeError(_message);
  }
  function message(token, format6, input) {
    const subject = token[0] === "Y" ? "years" : "days of the month";
    return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format6}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
  }

  // packages/dataviews/node_modules/date-fns/format.js
  var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
  var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
  var escapedStringRegExp = /^'([^]*?)'?$/;
  var doubleQuoteRegExp = /''/g;
  var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
  function format(date, formatStr, options) {
    const defaultOptions2 = getDefaultOptions();
    const locale = options?.locale ?? defaultOptions2.locale ?? enUS;
    const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
    const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
    const originalDate = toDate(date, options?.in);
    if (!isValid(originalDate)) {
      throw new RangeError("Invalid time value");
    }
    let parts = formatStr.match(longFormattingTokensRegExp).map((substring) => {
      const firstCharacter = substring[0];
      if (firstCharacter === "p" || firstCharacter === "P") {
        const longFormatter = longFormatters[firstCharacter];
        return longFormatter(substring, locale.formatLong);
      }
      return substring;
    }).join("").match(formattingTokensRegExp).map((substring) => {
      if (substring === "''") {
        return { isToken: false, value: "'" };
      }
      const firstCharacter = substring[0];
      if (firstCharacter === "'") {
        return { isToken: false, value: cleanEscapedString(substring) };
      }
      if (formatters[firstCharacter]) {
        return { isToken: true, value: substring };
      }
      if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
        throw new RangeError(
          "Format string contains an unescaped latin alphabet character `" + firstCharacter + "`"
        );
      }
      return { isToken: false, value: substring };
    });
    if (locale.localize.preprocessor) {
      parts = locale.localize.preprocessor(originalDate, parts);
    }
    const formatterOptions = {
      firstWeekContainsDate,
      weekStartsOn,
      locale
    };
    return parts.map((part) => {
      if (!part.isToken) return part.value;
      const token = part.value;
      if (!options?.useAdditionalWeekYearTokens && isProtectedWeekYearToken(token) || !options?.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(token)) {
        warnOrThrowProtectedError(token, formatStr, String(date));
      }
      const formatter = formatters[token[0]];
      return formatter(originalDate, token, locale.localize, formatterOptions);
    }).join("");
  }
  function cleanEscapedString(input) {
    const matched = input.match(escapedStringRegExp);
    if (!matched) {
      return input;
    }
    return matched[1].replace(doubleQuoteRegExp, "'");
  }

  // packages/dataviews/node_modules/date-fns/subDays.js
  function subDays(date, amount, options) {
    return addDays(date, -amount, options);
  }

  // packages/dataviews/node_modules/date-fns/subMonths.js
  function subMonths(date, amount, options) {
    return addMonths(date, -amount, options);
  }

  // packages/dataviews/node_modules/date-fns/subWeeks.js
  function subWeeks(date, amount, options) {
    return addWeeks(date, -amount, options);
  }

  // packages/dataviews/node_modules/date-fns/subYears.js
  function subYears(date, amount, options) {
    return addYears(date, -amount, options);
  }

  // packages/dataviews/build-module/utils/operators.mjs
  var import_i18n29 = __toESM(require_i18n(), 1);
  var import_element27 = __toESM(require_element(), 1);
  var import_date = __toESM(require_date(), 1);
  var import_jsx_runtime62 = __toESM(require_jsx_runtime(), 1);
  var filterTextWrappers = {
    Name: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "dataviews-filters__summary-filter-text-name" }),
    Value: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "dataviews-filters__summary-filter-text-value" })
  };
  function getRelativeDate(value, unit) {
    switch (unit) {
      case "days":
        return subDays(/* @__PURE__ */ new Date(), value);
      case "weeks":
        return subWeeks(/* @__PURE__ */ new Date(), value);
      case "months":
        return subMonths(/* @__PURE__ */ new Date(), value);
      case "years":
        return subYears(/* @__PURE__ */ new Date(), value);
      default:
        return /* @__PURE__ */ new Date();
    }
  }
  var isNoneOperatorDefinition = {
    /* translators: DataViews operator name */
    label: (0, import_i18n29.__)("Is none of"),
    filterText: (filter, activeElements) => (0, import_element27.createInterpolateElement)(
      (0, import_i18n29.sprintf)(
        /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is none of: Admin, Editor". */
        (0, import_i18n29.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),
        filter.name,
        activeElements.map((element) => element.label).join(", ")
      ),
      filterTextWrappers
    ),
    filter: ((item, field, filterValue) => {
      if (!filterValue?.length) {
        return true;
      }
      const fieldValue = field.getValue({ item });
      if (Array.isArray(fieldValue)) {
        return !filterValue.some(
          (fv) => fieldValue.includes(fv)
        );
      } else if (typeof fieldValue === "string") {
        return !filterValue.includes(fieldValue);
      }
      return false;
    }),
    selection: "multi"
  };
  var OPERATORS = [
    {
      name: OPERATOR_IS_ANY,
      /* translators: DataViews operator name */
      label: (0, import_i18n29.__)("Includes"),
      filterText: (filter, activeElements) => (0, import_element27.createInterpolateElement)(
        (0, import_i18n29.sprintf)(
          /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is any: Admin, Editor". */
          (0, import_i18n29.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements.map((element) => element.label).join(", ")
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (!filterValue?.length) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        if (Array.isArray(fieldValue)) {
          return filterValue.some(
            (fv) => fieldValue.includes(fv)
          );
        } else if (typeof fieldValue === "string") {
          return filterValue.includes(fieldValue);
        }
        return false;
      },
      selection: "multi"
    },
    {
      name: OPERATOR_IS_NONE,
      ...isNoneOperatorDefinition
    },
    {
      name: OPERATOR_IS_ALL,
      /* translators: DataViews operator name */
      label: (0, import_i18n29.__)("Includes all"),
      filterText: (filter, activeElements) => (0, import_element27.createInterpolateElement)(
        (0, import_i18n29.sprintf)(
          /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author includes all: Admin, Editor". */
          (0, import_i18n29.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements.map((element) => element.label).join(", ")
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (!filterValue?.length) {
          return true;
        }
        return filterValue.every((value) => {
          return field.getValue({ item })?.includes(value);
        });
      },
      selection: "multi"
    },
    {
      name: OPERATOR_IS_NOT_ALL,
      ...isNoneOperatorDefinition
    },
    {
      name: OPERATOR_BETWEEN,
      /* translators: DataViews operator name */
      label: (0, import_i18n29.__)("Between (inc)"),
      filterText: (filter, activeElements) => (0, import_element27.createInterpolateElement)(
        (0, import_i18n29.sprintf)(
          /* translators: 1: Filter name (e.g. "Item count"). 2: Filter value min. 3: Filter value max. e.g.: "Item count between (inc): 10 and 180". */
          (0, import_i18n29.__)(
            "<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"
          ),
          filter.name,
          activeElements[0].label[0],
          activeElements[0].label[1]
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (!Array.isArray(filterValue) || filterValue.length !== 2 || filterValue[0] === void 0 || filterValue[1] === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        if (typeof fieldValue === "number" || fieldValue instanceof Date || typeof fieldValue === "string") {
          return fieldValue >= filterValue[0] && fieldValue <= filterValue[1];
        }
        return false;
      },
      selection: "custom"
    },
    {
      name: OPERATOR_IN_THE_PAST,
      /* translators: DataViews operator name */
      label: (0, import_i18n29.__)("In the past"),
      filterText: (filter, activeElements) => (0, import_element27.createInterpolateElement)(
        (0, import_i18n29.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "7 days"): "Date is in the past: 7 days". */
          (0, import_i18n29.__)(
            "<Name>%1$s is in the past: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          `${activeElements[0].value.value} ${activeElements[0].value.unit}`
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue?.value === void 0 || filterValue?.unit === void 0) {
          return true;
        }
        const targetDate = getRelativeDate(
          filterValue.value,
          filterValue.unit
        );
        const fieldValue = (0, import_date.getDate)(field.getValue({ item }));
        return fieldValue >= targetDate && fieldValue <= /* @__PURE__ */ new Date();
      },
      selection: "custom"
    },
    {
      name: OPERATOR_OVER,
      /* translators: DataViews operator name */
      label: (0, import_i18n29.__)("Over"),
      filterText: (filter, activeElements) => (0, import_element27.createInterpolateElement)(
        (0, import_i18n29.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "7 days"): "Date is over: 7 days". */
          (0, import_i18n29.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),
          filter.name,
          `${activeElements[0].value.value} ${activeElements[0].value.unit}`
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue?.value === void 0 || filterValue?.unit === void 0) {
          return true;
        }
        const targetDate = getRelativeDate(
          filterValue.value,
          filterValue.unit
        );
        const fieldValue = (0, import_date.getDate)(field.getValue({ item }));
        return fieldValue < targetDate;
      },
      selection: "custom"
    },
    {
      name: OPERATOR_IS,
      /* translators: DataViews operator name */
      label: (0, import_i18n29.__)("Is"),
      filterText: (filter, activeElements) => (0, import_element27.createInterpolateElement)(
        (0, import_i18n29.sprintf)(
          /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is: Admin". */
          (0, import_i18n29.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        return filterValue === field.getValue({ item }) || filterValue === void 0;
      },
      selection: "single"
    },
    {
      name: OPERATOR_IS_NOT,
      /* translators: DataViews operator name */
      label: (0, import_i18n29.__)("Is not"),
      filterText: (filter, activeElements) => (0, import_element27.createInterpolateElement)(
        (0, import_i18n29.sprintf)(
          /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is not: Admin". */
          (0, import_i18n29.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        return filterValue !== field.getValue({ item });
      },
      selection: "single"
    },
    {
      name: OPERATOR_LESS_THAN,
      /* translators: DataViews operator name */
      label: (0, import_i18n29.__)("Less than"),
      filterText: (filter, activeElements) => (0, import_element27.createInterpolateElement)(
        (0, import_i18n29.sprintf)(
          /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is less than: 10". */
          (0, import_i18n29.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return fieldValue < filterValue;
      },
      selection: "single"
    },
    {
      name: OPERATOR_GREATER_THAN,
      /* translators: DataViews operator name */
      label: (0, import_i18n29.__)("Greater than"),
      filterText: (filter, activeElements) => (0, import_element27.createInterpolateElement)(
        (0, import_i18n29.sprintf)(
          /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is greater than: 10". */
          (0, import_i18n29.__)(
            "<Name>%1$s is greater than: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return fieldValue > filterValue;
      },
      selection: "single"
    },
    {
      name: OPERATOR_LESS_THAN_OR_EQUAL,
      /* translators: DataViews operator name */
      label: (0, import_i18n29.__)("Less than or equal"),
      filterText: (filter, activeElements) => (0, import_element27.createInterpolateElement)(
        (0, import_i18n29.sprintf)(
          /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is less than or equal to: 10". */
          (0, import_i18n29.__)(
            "<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return fieldValue <= filterValue;
      },
      selection: "single"
    },
    {
      name: OPERATOR_GREATER_THAN_OR_EQUAL,
      /* translators: DataViews operator name */
      label: (0, import_i18n29.__)("Greater than or equal"),
      filterText: (filter, activeElements) => (0, import_element27.createInterpolateElement)(
        (0, import_i18n29.sprintf)(
          /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is greater than or equal to: 10". */
          (0, import_i18n29.__)(
            "<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return fieldValue >= filterValue;
      },
      selection: "single"
    },
    {
      name: OPERATOR_BEFORE,
      /* translators: DataViews operator name */
      label: (0, import_i18n29.__)("Before"),
      filterText: (filter, activeElements) => (0, import_element27.createInterpolateElement)(
        (0, import_i18n29.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is before: 2024-01-01". */
          (0, import_i18n29.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const filterDate = (0, import_date.getDate)(filterValue);
        const fieldDate = (0, import_date.getDate)(field.getValue({ item }));
        return fieldDate < filterDate;
      },
      selection: "single"
    },
    {
      name: OPERATOR_AFTER,
      /* translators: DataViews operator name */
      label: (0, import_i18n29.__)("After"),
      filterText: (filter, activeElements) => (0, import_element27.createInterpolateElement)(
        (0, import_i18n29.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is after: 2024-01-01". */
          (0, import_i18n29.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const filterDate = (0, import_date.getDate)(filterValue);
        const fieldDate = (0, import_date.getDate)(field.getValue({ item }));
        return fieldDate > filterDate;
      },
      selection: "single"
    },
    {
      name: OPERATOR_BEFORE_INC,
      /* translators: DataViews operator name */
      label: (0, import_i18n29.__)("Before (inc)"),
      filterText: (filter, activeElements) => (0, import_element27.createInterpolateElement)(
        (0, import_i18n29.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is on or before: 2024-01-01". */
          (0, import_i18n29.__)(
            "<Name>%1$s is on or before: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const filterDate = (0, import_date.getDate)(filterValue);
        const fieldDate = (0, import_date.getDate)(field.getValue({ item }));
        return fieldDate <= filterDate;
      },
      selection: "single"
    },
    {
      name: OPERATOR_AFTER_INC,
      /* translators: DataViews operator name */
      label: (0, import_i18n29.__)("After (inc)"),
      filterText: (filter, activeElements) => (0, import_element27.createInterpolateElement)(
        (0, import_i18n29.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is on or after: 2024-01-01". */
          (0, import_i18n29.__)(
            "<Name>%1$s is on or after: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const filterDate = (0, import_date.getDate)(filterValue);
        const fieldDate = (0, import_date.getDate)(field.getValue({ item }));
        return fieldDate >= filterDate;
      },
      selection: "single"
    },
    {
      name: OPERATOR_CONTAINS,
      /* translators: DataViews operator name */
      label: (0, import_i18n29.__)("Contains"),
      filterText: (filter, activeElements) => (0, import_element27.createInterpolateElement)(
        (0, import_i18n29.sprintf)(
          /* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title contains: Hello". */
          (0, import_i18n29.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return typeof fieldValue === "string" && filterValue && fieldValue.toLowerCase().includes(String(filterValue).toLowerCase());
      },
      selection: "single"
    },
    {
      name: OPERATOR_NOT_CONTAINS,
      /* translators: DataViews operator name */
      label: (0, import_i18n29.__)("Doesn't contain"),
      filterText: (filter, activeElements) => (0, import_element27.createInterpolateElement)(
        (0, import_i18n29.sprintf)(
          /* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title doesn't contain: Hello". */
          (0, import_i18n29.__)(
            "<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"
          ),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return typeof fieldValue === "string" && filterValue && !fieldValue.toLowerCase().includes(String(filterValue).toLowerCase());
      },
      selection: "single"
    },
    {
      name: OPERATOR_STARTS_WITH,
      /* translators: DataViews operator name */
      label: (0, import_i18n29.__)("Starts with"),
      filterText: (filter, activeElements) => (0, import_element27.createInterpolateElement)(
        (0, import_i18n29.sprintf)(
          /* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title starts with: Hello". */
          (0, import_i18n29.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const fieldValue = field.getValue({ item });
        return typeof fieldValue === "string" && filterValue && fieldValue.toLowerCase().startsWith(String(filterValue).toLowerCase());
      },
      selection: "single"
    },
    {
      name: OPERATOR_ON,
      /* translators: DataViews operator name */
      label: (0, import_i18n29.__)("On"),
      filterText: (filter, activeElements) => (0, import_element27.createInterpolateElement)(
        (0, import_i18n29.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is: 2024-01-01". */
          (0, import_i18n29.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const filterDate = (0, import_date.getDate)(filterValue);
        const fieldDate = (0, import_date.getDate)(field.getValue({ item }));
        return filterDate.getTime() === fieldDate.getTime();
      },
      selection: "single"
    },
    {
      name: OPERATOR_NOT_ON,
      /* translators: DataViews operator name */
      label: (0, import_i18n29.__)("Not on"),
      filterText: (filter, activeElements) => (0, import_element27.createInterpolateElement)(
        (0, import_i18n29.sprintf)(
          /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is not: 2024-01-01". */
          (0, import_i18n29.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),
          filter.name,
          activeElements[0].label
        ),
        filterTextWrappers
      ),
      filter(item, field, filterValue) {
        if (filterValue === void 0) {
          return true;
        }
        const filterDate = (0, import_date.getDate)(filterValue);
        const fieldDate = (0, import_date.getDate)(field.getValue({ item }));
        return filterDate.getTime() !== fieldDate.getTime();
      },
      selection: "single"
    }
  ];
  var getOperatorByName = (name) => OPERATORS.find((op) => op.name === name);
  var getAllOperatorNames = () => OPERATORS.map((op) => op.name);
  var isSingleSelectionOperator = (name) => OPERATORS.filter((op) => op.selection === "single").some(
    (op) => op.name === name
  );
  var isRegisteredOperator = (name) => OPERATORS.some((op) => op.name === name);

  // packages/dataviews/build-module/components/dataviews-filters/filter.mjs
  var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1);
  var ENTER = "Enter";
  var SPACE = " ";
  var FilterText = ({
    activeElements,
    filterInView,
    filter
  }) => {
    if (activeElements === void 0 || activeElements.length === 0) {
      return filter.name;
    }
    const operator = getOperatorByName(filterInView?.operator);
    if (operator !== void 0) {
      return operator.filterText(filter, activeElements);
    }
    return (0, import_i18n30.sprintf)(
      /* translators: 1: Filter name e.g.: "Unknown status for Author". */
      (0, import_i18n30.__)("Unknown status for %1$s"),
      filter.name
    );
  };
  function OperatorSelector({
    filter,
    view,
    onChangeView
  }) {
    const operatorOptions = filter.operators?.map((operator) => ({
      value: operator,
      label: getOperatorByName(operator)?.label || operator
    }));
    const currentFilter = view.filters?.find(
      (_filter) => _filter.field === filter.field
    );
    const value = currentFilter?.operator || filter.operators[0];
    return operatorOptions.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
      Stack,
      {
        direction: "row",
        gap: "sm",
        justify: "flex-start",
        className: "dataviews-filters__summary-operators-container",
        align: "center",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_components21.FlexItem, { className: "dataviews-filters__summary-operators-filter-name", children: filter.name }),
          /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
            import_components21.SelectControl,
            {
              className: "dataviews-filters__summary-operators-filter-select",
              label: (0, import_i18n30.__)("Conditions"),
              value,
              options: operatorOptions,
              onChange: (newValue) => {
                const newOperator = newValue;
                const currentOperator = currentFilter?.operator;
                const newFilters = currentFilter ? [
                  ...(view.filters ?? []).map(
                    (_filter) => {
                      if (_filter.field === filter.field) {
                        const currentOpSelectionModel = getOperatorByName(
                          currentOperator
                        )?.selection;
                        const newOpSelectionModel = getOperatorByName(
                          newOperator
                        )?.selection;
                        const shouldResetValue = currentOpSelectionModel !== newOpSelectionModel || [
                          currentOpSelectionModel,
                          newOpSelectionModel
                        ].includes("custom");
                        return {
                          ..._filter,
                          value: shouldResetValue ? void 0 : _filter.value,
                          operator: newOperator
                        };
                      }
                      return _filter;
                    }
                  )
                ] : [
                  ...view.filters ?? [],
                  {
                    field: filter.field,
                    operator: newOperator,
                    value: void 0
                  }
                ];
                onChangeView({
                  ...view,
                  page: 1,
                  filters: newFilters
                });
              },
              size: "small",
              variant: "minimal",
              hideLabelFromVision: true
            }
          )
        ]
      }
    );
  }
  function Filter({
    addFilterRef,
    openedFilter,
    fields,
    ...commonProps
  }) {
    const toggleRef = (0, import_element28.useRef)(null);
    const { filter, view, onChangeView } = commonProps;
    const filterInView = view.filters?.find(
      (f2) => f2.field === filter.field
    );
    let activeElements = [];
    const field = (0, import_element28.useMemo)(() => {
      const currentField = fields.find((f2) => f2.id === filter.field);
      if (currentField) {
        return {
          ...currentField,
          // Configure getValue as if Item was a plain object.
          // See related input-widget.tsx
          getValue: ({ item }) => item[currentField.id]
        };
      }
      return currentField;
    }, [fields, filter.field]);
    const { elements } = useElements({
      elements: filter.elements,
      getElements: filter.getElements
    });
    if (elements.length > 0) {
      activeElements = elements.filter((element) => {
        if (filter.singleSelection) {
          return element.value === filterInView?.value;
        }
        return filterInView?.value?.includes(element.value);
      });
    } else if (Array.isArray(filterInView?.value)) {
      const label = filterInView.value.map((v2) => {
        const formattedValue = field?.getValueFormatted({
          item: { [field.id]: v2 },
          field
        });
        return formattedValue || String(v2);
      });
      activeElements = [
        {
          value: filterInView.value,
          // @ts-ignore
          label
        }
      ];
    } else if (typeof filterInView?.value === "object") {
      activeElements = [
        { value: filterInView.value, label: filterInView.value }
      ];
    } else if (filterInView?.value !== void 0) {
      const label = field !== void 0 ? field.getValueFormatted({
        item: { [field.id]: filterInView.value },
        field
      }) : String(filterInView.value);
      activeElements = [
        {
          value: filterInView.value,
          label
        }
      ];
    }
    const isPrimary = filter.isPrimary;
    const isLocked = filterInView?.isLocked;
    const hasValues = !isLocked && filterInView?.value !== void 0;
    const canResetOrRemove = !isLocked && (!isPrimary || hasValues);
    return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
      import_components21.Dropdown,
      {
        defaultOpen: openedFilter === filter.field,
        contentClassName: "dataviews-filters__summary-popover",
        popoverProps: { placement: "bottom-start", role: "dialog" },
        onClose: () => {
          toggleRef.current?.focus();
        },
        renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "dataviews-filters__summary-chip-container", children: [
          /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
            import_components21.Tooltip,
            {
              text: (0, import_i18n30.sprintf)(
                /* translators: 1: Filter name. */
                (0, import_i18n30.__)("Filter by: %1$s"),
                filter.name.toLowerCase()
              ),
              placement: "top",
              children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
                "div",
                {
                  className: clsx_default(
                    "dataviews-filters__summary-chip",
                    {
                      "has-reset": canResetOrRemove,
                      "has-values": hasValues,
                      "is-not-clickable": isLocked
                    }
                  ),
                  role: "button",
                  tabIndex: isLocked ? -1 : 0,
                  onClick: () => {
                    if (!isLocked) {
                      onToggle();
                    }
                  },
                  onKeyDown: (event) => {
                    if (!isLocked && [ENTER, SPACE].includes(event.key)) {
                      onToggle();
                      event.preventDefault();
                    }
                  },
                  "aria-disabled": isLocked,
                  "aria-pressed": isOpen,
                  "aria-expanded": isOpen,
                  ref: toggleRef,
                  children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
                    FilterText,
                    {
                      activeElements,
                      filterInView,
                      filter
                    }
                  )
                }
              )
            }
          ),
          canResetOrRemove && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
            import_components21.Tooltip,
            {
              text: isPrimary ? (0, import_i18n30.__)("Reset") : (0, import_i18n30.__)("Remove"),
              placement: "top",
              children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
                "button",
                {
                  className: clsx_default(
                    "dataviews-filters__summary-chip-remove",
                    { "has-values": hasValues }
                  ),
                  onClick: () => {
                    onChangeView({
                      ...view,
                      page: 1,
                      filters: view.filters?.filter(
                        (_filter) => _filter.field !== filter.field
                      )
                    });
                    if (!isPrimary) {
                      addFilterRef.current?.focus();
                    } else {
                      toggleRef.current?.focus();
                    }
                  },
                  children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_components21.Icon, { icon: close_small_default })
                }
              )
            }
          )
        ] }),
        renderContent: () => {
          return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(Stack, { direction: "column", justify: "flex-start", children: [
            /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(OperatorSelector, { ...commonProps }),
            commonProps.filter.hasElements ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
              SearchWidget,
              {
                ...commonProps,
                filter: {
                  ...commonProps.filter,
                  elements
                }
              }
            ) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(InputWidget, { ...commonProps, fields })
          ] });
        }
      }
    );
  }

  // packages/dataviews/build-module/components/dataviews-filters/add-filter.mjs
  var import_components22 = __toESM(require_components(), 1);
  var import_i18n31 = __toESM(require_i18n(), 1);
  var import_element29 = __toESM(require_element(), 1);
  var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
  var { Menu: Menu4 } = unlock(import_components22.privateApis);
  function AddFilterMenu({
    filters,
    view,
    onChangeView,
    setOpenedFilter,
    triggerProps
  }) {
    const inactiveFilters = filters.filter((filter) => !filter.isVisible);
    return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Menu4, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Menu4.TriggerButton, { ...triggerProps }),
      /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Menu4.Popover, { children: inactiveFilters.map((filter) => {
        return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
          Menu4.Item,
          {
            onClick: () => {
              setOpenedFilter(filter.field);
              onChangeView({
                ...view,
                page: 1,
                filters: [
                  ...view.filters || [],
                  {
                    field: filter.field,
                    value: void 0,
                    operator: filter.operators[0]
                  }
                ]
              });
            },
            children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Menu4.ItemLabel, { children: filter.name })
          },
          filter.field
        );
      }) })
    ] });
  }
  function AddFilter({ filters, view, onChangeView, setOpenedFilter }, ref) {
    if (!filters.length || filters.every(({ isPrimary }) => isPrimary)) {
      return null;
    }
    const inactiveFilters = filters.filter((filter) => !filter.isVisible);
    return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
      AddFilterMenu,
      {
        triggerProps: {
          render: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
            import_components22.Button,
            {
              accessibleWhenDisabled: true,
              size: "compact",
              className: "dataviews-filters-button",
              variant: "tertiary",
              disabled: !inactiveFilters.length,
              ref
            }
          ),
          children: (0, import_i18n31.__)("Add filter")
        },
        ...{ filters, view, onChangeView, setOpenedFilter }
      }
    );
  }
  var add_filter_default = (0, import_element29.forwardRef)(AddFilter);

  // packages/dataviews/build-module/components/dataviews-filters/reset-filters.mjs
  var import_components23 = __toESM(require_components(), 1);
  var import_i18n32 = __toESM(require_i18n(), 1);
  var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1);
  function ResetFilter({
    filters,
    view,
    onChangeView
  }) {
    const isPrimary = (field) => filters.some(
      (_filter) => _filter.field === field && _filter.isPrimary
    );
    const isDisabled = !view.search && !view.filters?.some(
      (_filter) => !_filter.isLocked && (_filter.value !== void 0 || !isPrimary(_filter.field))
    );
    return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
      import_components23.Button,
      {
        disabled: isDisabled,
        accessibleWhenDisabled: true,
        size: "compact",
        variant: "tertiary",
        className: "dataviews-filters__reset-button",
        onClick: () => {
          onChangeView({
            ...view,
            page: 1,
            search: "",
            filters: view.filters?.filter((f2) => !!f2.isLocked) || []
          });
        },
        children: (0, import_i18n32.__)("Reset")
      }
    );
  }

  // packages/dataviews/build-module/components/dataviews-filters/use-filters.mjs
  var import_element30 = __toESM(require_element(), 1);
  function useFilters(fields, view) {
    return (0, import_element30.useMemo)(() => {
      const filters = [];
      fields.forEach((field) => {
        if (field.filterBy === false || !field.hasElements && !field.Edit) {
          return;
        }
        const operators = field.filterBy.operators;
        const isPrimary = !!field.filterBy?.isPrimary;
        const isLocked = view.filters?.some(
          (f2) => f2.field === field.id && !!f2.isLocked
        ) ?? false;
        filters.push({
          field: field.id,
          name: field.label,
          elements: field.elements,
          getElements: field.getElements,
          hasElements: field.hasElements,
          singleSelection: operators.some(
            (op) => isSingleSelectionOperator(op)
          ),
          operators,
          isVisible: isLocked || isPrimary || !!view.filters?.some(
            (f2) => f2.field === field.id && isRegisteredOperator(f2.operator)
          ),
          isPrimary,
          isLocked
        });
      });
      filters.sort((a2, b2) => {
        if (a2.isLocked && !b2.isLocked) {
          return -1;
        }
        if (!a2.isLocked && b2.isLocked) {
          return 1;
        }
        if (a2.isPrimary && !b2.isPrimary) {
          return -1;
        }
        if (!a2.isPrimary && b2.isPrimary) {
          return 1;
        }
        return a2.name.localeCompare(b2.name);
      });
      return filters;
    }, [fields, view]);
  }
  var use_filters_default = useFilters;

  // packages/dataviews/build-module/components/dataviews-filters/filters.mjs
  var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1);
  function Filters({ className }) {
    const { fields, view, onChangeView, openedFilter, setOpenedFilter } = (0, import_element31.useContext)(dataviews_context_default);
    const addFilterRef = (0, import_element31.useRef)(null);
    const filters = use_filters_default(fields, view);
    const addFilter = /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
      add_filter_default,
      {
        filters,
        view,
        onChangeView,
        ref: addFilterRef,
        setOpenedFilter
      },
      "add-filter"
    );
    const visibleFilters = filters.filter((filter) => filter.isVisible);
    if (visibleFilters.length === 0) {
      return null;
    }
    const filterComponents = [
      ...visibleFilters.map((filter) => {
        return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
          Filter,
          {
            filter,
            view,
            fields,
            onChangeView,
            addFilterRef,
            openedFilter
          },
          filter.field
        );
      }),
      addFilter
    ];
    filterComponents.push(
      /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
        ResetFilter,
        {
          filters,
          view,
          onChangeView
        },
        "reset-filters"
      )
    );
    return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
      Stack,
      {
        direction: "row",
        justify: "flex-start",
        gap: "sm",
        style: { width: "fit-content" },
        wrap: "wrap",
        className,
        children: filterComponents
      }
    );
  }
  var filters_default = (0, import_element31.memo)(Filters);

  // packages/dataviews/build-module/components/dataviews-filters/toggle.mjs
  var import_element32 = __toESM(require_element(), 1);
  var import_components24 = __toESM(require_components(), 1);
  var import_i18n33 = __toESM(require_i18n(), 1);
  var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
  function FiltersToggle() {
    const {
      filters,
      view,
      onChangeView,
      setOpenedFilter,
      isShowingFilter,
      setIsShowingFilter
    } = (0, import_element32.useContext)(dataviews_context_default);
    const buttonRef = (0, import_element32.useRef)(null);
    const onChangeViewWithFilterVisibility = (0, import_element32.useCallback)(
      (_view) => {
        onChangeView(_view);
        setIsShowingFilter(true);
      },
      [onChangeView, setIsShowingFilter]
    );
    if (filters.length === 0) {
      return null;
    }
    const hasVisibleFilters = filters.some((filter) => filter.isVisible);
    const addFilterButtonProps = {
      label: (0, import_i18n33.__)("Add filter"),
      "aria-expanded": false,
      isPressed: false
    };
    const toggleFiltersButtonProps = {
      label: (0, import_i18n33._x)("Filter", "verb"),
      "aria-expanded": isShowingFilter,
      isPressed: isShowingFilter,
      onClick: () => {
        if (!isShowingFilter) {
          setOpenedFilter(null);
        }
        setIsShowingFilter(!isShowingFilter);
      }
    };
    const hasPrimaryOrLockedFilters = filters.some(
      (filter) => filter.isPrimary || filter.isLocked
    );
    const buttonComponent = /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
      import_components24.Button,
      {
        ref: buttonRef,
        className: "dataviews-filters__visibility-toggle",
        size: "compact",
        icon: funnel_default,
        disabled: hasPrimaryOrLockedFilters,
        accessibleWhenDisabled: true,
        ...hasVisibleFilters ? toggleFiltersButtonProps : addFilterButtonProps
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "dataviews-filters__container-visibility-toggle", children: !hasVisibleFilters ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
      AddFilterMenu,
      {
        filters,
        view,
        onChangeView: onChangeViewWithFilterVisibility,
        setOpenedFilter,
        triggerProps: { render: buttonComponent }
      }
    ) : /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
      FilterVisibilityToggle,
      {
        buttonRef,
        filtersCount: view.filters?.length,
        children: buttonComponent
      }
    ) });
  }
  function FilterVisibilityToggle({
    buttonRef,
    filtersCount,
    children
  }) {
    (0, import_element32.useEffect)(
      () => () => {
        buttonRef.current?.focus();
      },
      [buttonRef]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
      children,
      !!filtersCount && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "dataviews-filters-toggle__count", children: filtersCount })
    ] });
  }
  var toggle_default = FiltersToggle;

  // packages/dataviews/build-module/components/dataviews-filters/filters-toggled.mjs
  var import_element33 = __toESM(require_element(), 1);
  var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
  function FiltersToggled(props) {
    const { isShowingFilter } = (0, import_element33.useContext)(dataviews_context_default);
    if (!isShowingFilter) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(filters_default, { ...props });
  }
  var filters_toggled_default = FiltersToggled;

  // packages/dataviews/build-module/components/dataviews-layout/index.mjs
  var import_element34 = __toESM(require_element(), 1);
  var import_components25 = __toESM(require_components(), 1);
  var import_i18n34 = __toESM(require_i18n(), 1);
  var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
  function DataViewsLayout({ className }) {
    const {
      actions = [],
      data,
      fields,
      getItemId,
      getItemLevel,
      hasInitiallyLoaded,
      isLoading,
      view,
      onChangeView,
      selection,
      onChangeSelection,
      setOpenedFilter,
      onClickItem,
      isItemClickable: isItemClickable2,
      renderItemLink,
      defaultLayouts,
      empty = /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("p", { children: (0, import_i18n34.__)("No results") })
    } = (0, import_element34.useContext)(dataviews_context_default);
    const isDelayedInitialLoading = useDelayedLoading(!hasInitiallyLoaded, {
      delay: 200
    });
    if (!hasInitiallyLoaded) {
      if (!isDelayedInitialLoading) {
        return null;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "dataviews-loading", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_components25.Spinner, {}) }) });
    }
    const ViewComponent = VIEW_LAYOUTS.find(
      (v2) => v2.type === view.type && defaultLayouts[v2.type]
    )?.component;
    return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
      ViewComponent,
      {
        className,
        actions,
        data,
        fields,
        getItemId,
        getItemLevel,
        isLoading,
        onChangeView,
        onChangeSelection,
        selection,
        setOpenedFilter,
        onClickItem,
        renderItemLink,
        isItemClickable: isItemClickable2,
        view,
        empty
      }
    );
  }

  // packages/dataviews/build-module/components/dataviews-search/index.mjs
  var import_i18n35 = __toESM(require_i18n(), 1);
  var import_element35 = __toESM(require_element(), 1);
  var import_components26 = __toESM(require_components(), 1);
  var import_compose10 = __toESM(require_compose(), 1);
  var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
  var DataViewsSearch = (0, import_element35.memo)(function Search({ label }) {
    const { view, onChangeView } = (0, import_element35.useContext)(dataviews_context_default);
    const [search, setSearch, debouncedSearch] = (0, import_compose10.useDebouncedInput)(
      view.search
    );
    (0, import_element35.useEffect)(() => {
      setSearch(view.search ?? "");
    }, [view.search, setSearch]);
    const onChangeViewRef = (0, import_element35.useRef)(onChangeView);
    const viewRef = (0, import_element35.useRef)(view);
    (0, import_element35.useEffect)(() => {
      onChangeViewRef.current = onChangeView;
      viewRef.current = view;
    }, [onChangeView, view]);
    (0, import_element35.useEffect)(() => {
      if (debouncedSearch !== viewRef.current?.search) {
        onChangeViewRef.current({
          ...viewRef.current,
          page: 1,
          search: debouncedSearch
        });
      }
    }, [debouncedSearch]);
    const searchLabel = label || (0, import_i18n35.__)("Search");
    return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
      import_components26.SearchControl,
      {
        className: "dataviews-search",
        onChange: setSearch,
        value: search,
        label: searchLabel,
        placeholder: searchLabel,
        size: "compact"
      }
    );
  });
  var dataviews_search_default = DataViewsSearch;

  // packages/dataviews/build-module/components/dataviews-view-config/index.mjs
  var import_components28 = __toESM(require_components(), 1);
  var import_i18n37 = __toESM(require_i18n(), 1);
  var import_element37 = __toESM(require_element(), 1);
  var import_warning = __toESM(require_warning(), 1);
  var import_compose11 = __toESM(require_compose(), 1);

  // packages/dataviews/build-module/components/dataviews-view-config/infinite-scroll-toggle.mjs
  var import_components27 = __toESM(require_components(), 1);
  var import_i18n36 = __toESM(require_i18n(), 1);
  var import_element36 = __toESM(require_element(), 1);
  var import_jsx_runtime71 = __toESM(require_jsx_runtime(), 1);
  function InfiniteScrollToggle() {
    const context = (0, import_element36.useContext)(dataviews_context_default);
    const { view, onChangeView } = context;
    const infiniteScrollEnabled = view.infiniteScrollEnabled ?? false;
    if (!context.hasInfiniteScrollHandler) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
      import_components27.ToggleControl,
      {
        label: (0, import_i18n36.__)("Enable infinite scroll"),
        help: (0, import_i18n36.__)(
          "Automatically load more content as you scroll, instead of showing pagination links."
        ),
        checked: infiniteScrollEnabled,
        onChange: (newValue) => {
          onChangeView({
            ...view,
            infiniteScrollEnabled: newValue
          });
        }
      }
    );
  }

  // packages/dataviews/build-module/components/dataviews-view-config/index.mjs
  var import_jsx_runtime72 = __toESM(require_jsx_runtime(), 1);
  var { Menu: Menu5 } = unlock(import_components28.privateApis);
  var DATAVIEWS_CONFIG_POPOVER_PROPS = {
    className: "dataviews-config__popover",
    placement: "bottom-end",
    offset: 9
  };
  function ViewTypeMenu() {
    const { view, onChangeView, defaultLayouts } = (0, import_element37.useContext)(dataviews_context_default);
    const availableLayouts = Object.keys(defaultLayouts);
    if (availableLayouts.length <= 1) {
      return null;
    }
    const activeView = VIEW_LAYOUTS.find((v2) => view.type === v2.type);
    return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(Menu5, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
        Menu5.TriggerButton,
        {
          render: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
            import_components28.Button,
            {
              size: "compact",
              icon: activeView?.icon,
              label: (0, import_i18n37.__)("Layout")
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Menu5.Popover, { children: availableLayouts.map((layout) => {
        const config = VIEW_LAYOUTS.find(
          (v2) => v2.type === layout
        );
        if (!config) {
          return null;
        }
        return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
          Menu5.RadioItem,
          {
            value: layout,
            name: "view-actions-available-view",
            checked: layout === view.type,
            hideOnClick: true,
            onChange: (e2) => {
              switch (e2.target.value) {
                case "list":
                case "grid":
                case "table":
                case "pickerGrid":
                case "pickerTable":
                case "activity":
                  const viewWithoutLayout = { ...view };
                  if ("layout" in viewWithoutLayout) {
                    delete viewWithoutLayout.layout;
                  }
                  return onChangeView({
                    ...viewWithoutLayout,
                    type: e2.target.value,
                    ...defaultLayouts[e2.target.value]
                  });
              }
              (0, import_warning.default)("Invalid dataview");
            },
            children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Menu5.ItemLabel, { children: config.label })
          },
          layout
        );
      }) })
    ] });
  }
  function SortFieldControl() {
    const { view, fields, onChangeView } = (0, import_element37.useContext)(dataviews_context_default);
    const orderOptions = (0, import_element37.useMemo)(() => {
      const sortableFields = fields.filter(
        (field) => field.enableSorting !== false
      );
      return sortableFields.map((field) => {
        return {
          label: field.label,
          value: field.id
        };
      });
    }, [fields]);
    return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
      import_components28.SelectControl,
      {
        __next40pxDefaultSize: true,
        label: (0, import_i18n37.__)("Sort by"),
        value: view.sort?.field,
        options: orderOptions,
        onChange: (value) => {
          onChangeView({
            ...view,
            sort: {
              direction: view?.sort?.direction || "desc",
              field: value
            },
            showLevels: false
          });
        }
      }
    );
  }
  function SortDirectionControl() {
    const { view, fields, onChangeView } = (0, import_element37.useContext)(dataviews_context_default);
    const sortableFields = fields.filter(
      (field) => field.enableSorting !== false
    );
    if (sortableFields.length === 0) {
      return null;
    }
    let value = view.sort?.direction;
    if (!value && view.sort?.field) {
      value = "desc";
    }
    return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
      import_components28.__experimentalToggleGroupControl,
      {
        className: "dataviews-view-config__sort-direction",
        __next40pxDefaultSize: true,
        isBlock: true,
        label: (0, import_i18n37.__)("Order"),
        value,
        onChange: (newDirection) => {
          if (newDirection === "asc" || newDirection === "desc") {
            onChangeView({
              ...view,
              sort: {
                direction: newDirection,
                field: view.sort?.field || // If there is no field assigned as the sorting field assign the first sortable field.
                fields.find(
                  (field) => field.enableSorting !== false
                )?.id || ""
              },
              showLevels: false
            });
            return;
          }
          (0, import_warning.default)("Invalid direction");
        },
        children: SORTING_DIRECTIONS.map((direction) => {
          return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
            import_components28.__experimentalToggleGroupControlOptionIcon,
            {
              value: direction,
              icon: sortIcons[direction],
              label: sortLabels[direction]
            },
            direction
          );
        })
      }
    );
  }
  function ItemsPerPageControl() {
    const { view, config, onChangeView } = (0, import_element37.useContext)(dataviews_context_default);
    const { infiniteScrollEnabled } = view;
    if (!config || !config.perPageSizes || config.perPageSizes.length < 2 || config.perPageSizes.length > 6 || infiniteScrollEnabled) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
      import_components28.__experimentalToggleGroupControl,
      {
        __next40pxDefaultSize: true,
        isBlock: true,
        label: (0, import_i18n37.__)("Items per page"),
        value: view.perPage || 10,
        disabled: !view?.sort?.field,
        onChange: (newItemsPerPage) => {
          const newItemsPerPageNumber = typeof newItemsPerPage === "number" || newItemsPerPage === void 0 ? newItemsPerPage : parseInt(newItemsPerPage, 10);
          onChangeView({
            ...view,
            perPage: newItemsPerPageNumber,
            page: 1
          });
        },
        children: config.perPageSizes.map((value) => {
          return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
            import_components28.__experimentalToggleGroupControlOption,
            {
              value,
              label: value.toString()
            },
            value
          );
        })
      }
    );
  }
  function ResetViewButton() {
    const { onReset } = (0, import_element37.useContext)(dataviews_context_default);
    if (onReset === void 0) {
      return null;
    }
    const isDisabled = onReset === false;
    return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
      import_components28.Button,
      {
        variant: "tertiary",
        size: "compact",
        disabled: isDisabled,
        accessibleWhenDisabled: true,
        className: "dataviews-view-config__reset-button",
        onClick: () => {
          if (typeof onReset === "function") {
            onReset();
          }
        },
        children: (0, import_i18n37.__)("Reset view")
      }
    );
  }
  function DataviewsViewConfigDropdown() {
    const { view, onReset } = (0, import_element37.useContext)(dataviews_context_default);
    const popoverId = (0, import_compose11.useInstanceId)(
      _DataViewsViewConfig,
      "dataviews-view-config-dropdown"
    );
    const activeLayout = VIEW_LAYOUTS.find(
      (layout) => layout.type === view.type
    );
    const isModified = typeof onReset === "function";
    return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
      import_components28.Dropdown,
      {
        expandOnMobile: true,
        popoverProps: {
          ...DATAVIEWS_CONFIG_POPOVER_PROPS,
          id: popoverId
        },
        renderToggle: ({ onToggle, isOpen }) => {
          return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "dataviews-view-config__toggle-wrapper", children: [
            /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
              import_components28.Button,
              {
                size: "compact",
                icon: cog_default,
                label: (0, import_i18n37._x)(
                  "View options",
                  "View is used as a noun"
                ),
                onClick: onToggle,
                "aria-expanded": isOpen ? "true" : "false",
                "aria-controls": popoverId
              }
            ),
            isModified && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "dataviews-view-config__modified-indicator" })
          ] });
        },
        renderContent: () => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
          import_components28.__experimentalDropdownContentWrapper,
          {
            paddingSize: "medium",
            className: "dataviews-config__popover-content-wrapper",
            children: /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
              Stack,
              {
                direction: "column",
                className: "dataviews-view-config",
                gap: "xl",
                children: [
                  /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
                    Stack,
                    {
                      direction: "row",
                      justify: "space-between",
                      align: "center",
                      className: "dataviews-view-config__header",
                      children: [
                        /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
                          import_components28.__experimentalHeading,
                          {
                            level: 2,
                            className: "dataviews-settings-section__title",
                            children: (0, import_i18n37.__)("Appearance")
                          }
                        ),
                        /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(ResetViewButton, {})
                      ]
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(Stack, { direction: "column", gap: "lg", children: [
                    /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
                      Stack,
                      {
                        direction: "row",
                        gap: "sm",
                        className: "dataviews-view-config__sort-controls",
                        children: [
                          /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(SortFieldControl, {}),
                          /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(SortDirectionControl, {})
                        ]
                      }
                    ),
                    !!activeLayout?.viewConfigOptions && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(activeLayout.viewConfigOptions, {}),
                    /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(InfiniteScrollToggle, {}),
                    /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(ItemsPerPageControl, {}),
                    /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(PropertiesSection, {})
                  ] })
                ]
              }
            )
          }
        )
      }
    );
  }
  function _DataViewsViewConfig() {
    return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_jsx_runtime72.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(ViewTypeMenu, {}),
      /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(DataviewsViewConfigDropdown, {})
    ] });
  }
  var DataViewsViewConfig = (0, import_element37.memo)(_DataViewsViewConfig);
  var dataviews_view_config_default = DataViewsViewConfig;

  // packages/dataviews/build-module/components/dataform-controls/checkbox.mjs
  var import_components29 = __toESM(require_components(), 1);
  var import_element38 = __toESM(require_element(), 1);

  // packages/dataviews/build-module/components/dataform-controls/utils/get-custom-validity.mjs
  function getCustomValidity(isValid2, validity) {
    let customValidity;
    if (isValid2?.required && validity?.required) {
      customValidity = validity?.required?.message ? validity.required : void 0;
    } else if (isValid2?.pattern && validity?.pattern) {
      customValidity = validity.pattern;
    } else if (isValid2?.min && validity?.min) {
      customValidity = validity.min;
    } else if (isValid2?.max && validity?.max) {
      customValidity = validity.max;
    } else if (isValid2?.minLength && validity?.minLength) {
      customValidity = validity.minLength;
    } else if (isValid2?.maxLength && validity?.maxLength) {
      customValidity = validity.maxLength;
    } else if (isValid2?.elements && validity?.elements) {
      customValidity = validity.elements;
    } else if (validity?.custom) {
      customValidity = validity.custom;
    }
    return customValidity;
  }

  // packages/dataviews/build-module/components/dataform-controls/checkbox.mjs
  var import_jsx_runtime73 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedCheckboxControl } = unlock(import_components29.privateApis);
  function Checkbox({
    field,
    onChange,
    data,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { getValue, setValue, label, description, isValid: isValid2 } = field;
    const onChangeControl = (0, import_element38.useCallback)(() => {
      onChange(
        setValue({ item: data, value: !getValue({ item: data }) })
      );
    }, [data, getValue, onChange, setValue]);
    return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
      ValidatedCheckboxControl,
      {
        required: !!field.isValid?.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        hidden: hideLabelFromVision,
        label,
        help: description,
        checked: getValue({ item: data }),
        onChange: onChangeControl
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/combobox.mjs
  var import_components30 = __toESM(require_components(), 1);
  var import_element39 = __toESM(require_element(), 1);
  var import_jsx_runtime74 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedComboboxControl } = unlock(import_components30.privateApis);
  function Combobox3({
    data,
    field,
    onChange,
    hideLabelFromVision,
    validity
  }) {
    const { label, description, placeholder, getValue, setValue, isValid: isValid2 } = field;
    const value = getValue({ item: data }) ?? "";
    const onChangeControl = (0, import_element39.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue ?? "" })),
      [data, onChange, setValue]
    );
    const { elements, isLoading } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components30.Spinner, {});
    }
    return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
      ValidatedComboboxControl,
      {
        required: !!field.isValid?.required,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        value,
        help: description,
        placeholder,
        options: elements,
        onChange: onChangeControl,
        hideLabelFromVision,
        allowReset: true,
        expandOnFocus: true
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/datetime.mjs
  var import_components32 = __toESM(require_components(), 1);
  var import_element41 = __toESM(require_element(), 1);
  var import_i18n39 = __toESM(require_i18n(), 1);
  var import_date3 = __toESM(require_date(), 1);

  // packages/dataviews/build-module/components/dataform-controls/utils/relative-date-control.mjs
  var import_components31 = __toESM(require_components(), 1);
  var import_element40 = __toESM(require_element(), 1);
  var import_i18n38 = __toESM(require_i18n(), 1);
  var import_jsx_runtime75 = __toESM(require_jsx_runtime(), 1);
  var TIME_UNITS_OPTIONS = {
    [OPERATOR_IN_THE_PAST]: [
      { value: "days", label: (0, import_i18n38.__)("Days") },
      { value: "weeks", label: (0, import_i18n38.__)("Weeks") },
      { value: "months", label: (0, import_i18n38.__)("Months") },
      { value: "years", label: (0, import_i18n38.__)("Years") }
    ],
    [OPERATOR_OVER]: [
      { value: "days", label: (0, import_i18n38.__)("Days ago") },
      { value: "weeks", label: (0, import_i18n38.__)("Weeks ago") },
      { value: "months", label: (0, import_i18n38.__)("Months ago") },
      { value: "years", label: (0, import_i18n38.__)("Years ago") }
    ]
  };
  function RelativeDateControl({
    className,
    data,
    field,
    onChange,
    hideLabelFromVision,
    operator
  }) {
    const options = TIME_UNITS_OPTIONS[operator === OPERATOR_IN_THE_PAST ? "inThePast" : "over"];
    const { id, label, getValue, setValue } = field;
    const fieldValue = getValue({ item: data });
    const { value: relValue = "", unit = options[0].value } = fieldValue && typeof fieldValue === "object" ? fieldValue : {};
    const onChangeValue = (0, import_element40.useCallback)(
      (newValue) => onChange(
        setValue({
          item: data,
          value: { value: Number(newValue), unit }
        })
      ),
      [onChange, setValue, data, unit]
    );
    const onChangeUnit = (0, import_element40.useCallback)(
      (newUnit) => onChange(
        setValue({
          item: data,
          value: { value: relValue, unit: newUnit }
        })
      ),
      [onChange, setValue, data, relValue]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
      import_components31.BaseControl,
      {
        id,
        className: clsx_default(className, "dataviews-controls__relative-date"),
        label,
        hideLabelFromVision,
        children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(Stack, { direction: "row", gap: "sm", children: [
          /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
            import_components31.__experimentalNumberControl,
            {
              __next40pxDefaultSize: true,
              className: "dataviews-controls__relative-date-number",
              spinControls: "none",
              min: 1,
              step: 1,
              value: relValue,
              onChange: onChangeValue
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
            import_components31.SelectControl,
            {
              className: "dataviews-controls__relative-date-unit",
              __next40pxDefaultSize: true,
              label: (0, import_i18n38.__)("Unit"),
              value: unit,
              options,
              onChange: onChangeUnit,
              hideLabelFromVision: true
            }
          )
        ] })
      }
    );
  }

  // packages/dataviews/build-module/field-types/utils/parse-date-time.mjs
  var import_date2 = __toESM(require_date(), 1);
  function parseDateTime(dateTimeString) {
    if (!dateTimeString) {
      return null;
    }
    const parsed = (0, import_date2.getDate)(dateTimeString);
    return parsed && isValid(parsed) ? parsed : null;
  }

  // packages/dataviews/build-module/components/dataform-controls/datetime.mjs
  var import_jsx_runtime76 = __toESM(require_jsx_runtime(), 1);
  var { DateCalendar, ValidatedInputControl } = unlock(import_components32.privateApis);
  var formatDateTime = (value) => {
    if (!value) {
      return "";
    }
    return (0, import_date3.dateI18n)("Y-m-d\\TH:i", (0, import_date3.getDate)(value));
  };
  function CalendarDateTimeControl({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { id, label, description, setValue, getValue, isValid: isValid2 } = field;
    const fieldValue = getValue({ item: data });
    const value = typeof fieldValue === "string" ? fieldValue : void 0;
    const [calendarMonth, setCalendarMonth] = (0, import_element41.useState)(() => {
      const parsedDate = parseDateTime(value);
      return parsedDate || /* @__PURE__ */ new Date();
    });
    const inputControlRef = (0, import_element41.useRef)(null);
    const validationTimeoutRef = (0, import_element41.useRef)(void 0);
    const previousFocusRef = (0, import_element41.useRef)(null);
    const onChangeCallback = (0, import_element41.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue })),
      [data, onChange, setValue]
    );
    (0, import_element41.useEffect)(() => {
      return () => {
        if (validationTimeoutRef.current) {
          clearTimeout(validationTimeoutRef.current);
        }
      };
    }, []);
    const onSelectDate = (0, import_element41.useCallback)(
      (newDate) => {
        let dateTimeValue;
        if (newDate) {
          const wpDate = (0, import_date3.dateI18n)("Y-m-d", newDate);
          let wpTime;
          if (value) {
            wpTime = (0, import_date3.dateI18n)("H:i", (0, import_date3.getDate)(value));
          } else {
            wpTime = (0, import_date3.dateI18n)("H:i", newDate);
          }
          const finalDateTime = (0, import_date3.getDate)(`${wpDate}T${wpTime}`);
          dateTimeValue = finalDateTime.toISOString();
          onChangeCallback(dateTimeValue);
          if (validationTimeoutRef.current) {
            clearTimeout(validationTimeoutRef.current);
          }
        } else {
          onChangeCallback(void 0);
        }
        previousFocusRef.current = inputControlRef.current && inputControlRef.current.ownerDocument.activeElement;
        validationTimeoutRef.current = setTimeout(() => {
          if (inputControlRef.current) {
            inputControlRef.current.focus();
            inputControlRef.current.blur();
            onChangeCallback(dateTimeValue);
            if (previousFocusRef.current && previousFocusRef.current instanceof HTMLElement) {
              previousFocusRef.current.focus();
            }
          }
        }, 0);
      },
      [onChangeCallback, value]
    );
    const handleManualDateTimeChange = (0, import_element41.useCallback)(
      (newValue) => {
        if (newValue) {
          const dateTime = (0, import_date3.getDate)(newValue);
          onChangeCallback(dateTime.toISOString());
          const parsedDate = parseDateTime(dateTime.toISOString());
          if (parsedDate) {
            setCalendarMonth(parsedDate);
          }
        } else {
          onChangeCallback(void 0);
        }
      },
      [onChangeCallback]
    );
    const { format: fieldFormat } = field;
    const weekStartsOn = fieldFormat.weekStartsOn ?? (0, import_date3.getSettings)().l10n.startOfWeek;
    const {
      timezone: { string: timezoneString }
    } = (0, import_date3.getSettings)();
    let displayLabel = label;
    if (isValid2?.required && !markWhenOptional && !hideLabelFromVision) {
      displayLabel = `${label} (${(0, import_i18n39.__)("Required")})`;
    } else if (!isValid2?.required && markWhenOptional && !hideLabelFromVision) {
      displayLabel = `${label} (${(0, import_i18n39.__)("Optional")})`;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
      import_components32.BaseControl,
      {
        id,
        label: displayLabel,
        help: description,
        hideLabelFromVision,
        children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(Stack, { direction: "column", gap: "lg", children: [
          /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
            DateCalendar,
            {
              style: { width: "100%" },
              selected: value ? parseDateTime(value) || void 0 : void 0,
              onSelect: onSelectDate,
              month: calendarMonth,
              onMonthChange: setCalendarMonth,
              timeZone: timezoneString || void 0,
              weekStartsOn
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
            ValidatedInputControl,
            {
              ref: inputControlRef,
              __next40pxDefaultSize: true,
              required: !!isValid2?.required,
              customValidity: getCustomValidity(isValid2, validity),
              type: "datetime-local",
              label: (0, import_i18n39.__)("Date time"),
              hideLabelFromVision: true,
              value: formatDateTime(value),
              onChange: handleManualDateTimeChange
            }
          )
        ] })
      }
    );
  }
  function DateTime({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    operator,
    validity
  }) {
    if (operator === OPERATOR_IN_THE_PAST || operator === OPERATOR_OVER) {
      return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
        RelativeDateControl,
        {
          className: "dataviews-controls__datetime",
          data,
          field,
          onChange,
          hideLabelFromVision,
          operator
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
      CalendarDateTimeControl,
      {
        data,
        field,
        onChange,
        hideLabelFromVision,
        markWhenOptional,
        validity
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/date.mjs
  var import_components33 = __toESM(require_components(), 1);
  var import_element42 = __toESM(require_element(), 1);
  var import_i18n40 = __toESM(require_i18n(), 1);
  var import_date4 = __toESM(require_date(), 1);
  var import_jsx_runtime77 = __toESM(require_jsx_runtime(), 1);
  var { DateCalendar: DateCalendar2, DateRangeCalendar } = unlock(import_components33.privateApis);
  var DATE_PRESETS = [
    {
      id: "today",
      label: (0, import_i18n40.__)("Today"),
      getValue: () => (0, import_date4.getDate)(null)
    },
    {
      id: "yesterday",
      label: (0, import_i18n40.__)("Yesterday"),
      getValue: () => {
        const today = (0, import_date4.getDate)(null);
        return subDays(today, 1);
      }
    },
    {
      id: "past-week",
      label: (0, import_i18n40.__)("Past week"),
      getValue: () => {
        const today = (0, import_date4.getDate)(null);
        return subDays(today, 7);
      }
    },
    {
      id: "past-month",
      label: (0, import_i18n40.__)("Past month"),
      getValue: () => {
        const today = (0, import_date4.getDate)(null);
        return subMonths(today, 1);
      }
    }
  ];
  var DATE_RANGE_PRESETS = [
    {
      id: "last-7-days",
      label: (0, import_i18n40.__)("Last 7 days"),
      getValue: () => {
        const today = (0, import_date4.getDate)(null);
        return [subDays(today, 7), today];
      }
    },
    {
      id: "last-30-days",
      label: (0, import_i18n40.__)("Last 30 days"),
      getValue: () => {
        const today = (0, import_date4.getDate)(null);
        return [subDays(today, 30), today];
      }
    },
    {
      id: "month-to-date",
      label: (0, import_i18n40.__)("Month to date"),
      getValue: () => {
        const today = (0, import_date4.getDate)(null);
        return [startOfMonth(today), today];
      }
    },
    {
      id: "last-year",
      label: (0, import_i18n40.__)("Last year"),
      getValue: () => {
        const today = (0, import_date4.getDate)(null);
        return [subYears(today, 1), today];
      }
    },
    {
      id: "year-to-date",
      label: (0, import_i18n40.__)("Year to date"),
      getValue: () => {
        const today = (0, import_date4.getDate)(null);
        return [startOfYear(today), today];
      }
    }
  ];
  var parseDate = (dateString) => {
    if (!dateString) {
      return null;
    }
    const parsed = (0, import_date4.getDate)(dateString);
    return parsed && isValid(parsed) ? parsed : null;
  };
  var formatDate = (date) => {
    if (!date) {
      return "";
    }
    return typeof date === "string" ? date : format(date, "yyyy-MM-dd");
  };
  function ValidatedDateControl({
    field,
    validity,
    inputRefs,
    isTouched,
    setIsTouched,
    children
  }) {
    const { isValid: isValid2 } = field;
    const [customValidity, setCustomValidity] = (0, import_element42.useState)(void 0);
    const validateRefs = (0, import_element42.useCallback)(() => {
      const refs = Array.isArray(inputRefs) ? inputRefs : [inputRefs];
      for (const ref of refs) {
        const input = ref.current;
        if (input && !input.validity.valid) {
          setCustomValidity({
            type: "invalid",
            message: input.validationMessage
          });
          return;
        }
      }
      setCustomValidity(void 0);
    }, [inputRefs]);
    (0, import_element42.useEffect)(() => {
      const refs = Array.isArray(inputRefs) ? inputRefs : [inputRefs];
      const result = validity ? getCustomValidity(isValid2, validity) : void 0;
      for (const ref of refs) {
        const input = ref.current;
        if (input) {
          input.setCustomValidity(
            result?.type === "invalid" && result.message ? result.message : ""
          );
        }
      }
    }, [inputRefs, isValid2, validity]);
    (0, import_element42.useEffect)(() => {
      const refs = Array.isArray(inputRefs) ? inputRefs : [inputRefs];
      const handleInvalid = (event) => {
        event.preventDefault();
        setIsTouched(true);
      };
      for (const ref of refs) {
        ref.current?.addEventListener("invalid", handleInvalid);
      }
      return () => {
        for (const ref of refs) {
          ref.current?.removeEventListener("invalid", handleInvalid);
        }
      };
    }, [inputRefs, setIsTouched]);
    (0, import_element42.useEffect)(() => {
      if (!isTouched) {
        return;
      }
      const result = validity ? getCustomValidity(isValid2, validity) : void 0;
      if (result) {
        setCustomValidity(result);
      } else {
        validateRefs();
      }
    }, [isTouched, isValid2, validity, validateRefs]);
    const onBlur = (event) => {
      if (isTouched) {
        return;
      }
      if (!event.relatedTarget || !event.currentTarget.contains(event.relatedTarget)) {
        setIsTouched(true);
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { onBlur, children: [
      children,
      /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { "aria-live": "polite", children: customValidity && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
        "p",
        {
          className: clsx_default(
            "components-validated-control__indicator",
            customValidity.type === "invalid" ? "is-invalid" : void 0
          ),
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
              import_components33.Icon,
              {
                className: "components-validated-control__indicator-icon",
                icon: error_default,
                size: 16,
                fill: "currentColor"
              }
            ),
            customValidity.message
          ]
        }
      ) })
    ] });
  }
  function CalendarDateControl({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const {
      id,
      label,
      setValue,
      getValue,
      isValid: isValid2,
      format: fieldFormat
    } = field;
    const [selectedPresetId, setSelectedPresetId] = (0, import_element42.useState)(
      null
    );
    const weekStartsOn = fieldFormat.weekStartsOn ?? (0, import_date4.getSettings)().l10n.startOfWeek;
    const fieldValue = getValue({ item: data });
    const value = typeof fieldValue === "string" ? fieldValue : void 0;
    const [calendarMonth, setCalendarMonth] = (0, import_element42.useState)(() => {
      const parsedDate = parseDate(value);
      return parsedDate || /* @__PURE__ */ new Date();
    });
    const [isTouched, setIsTouched] = (0, import_element42.useState)(false);
    const validityTargetRef = (0, import_element42.useRef)(null);
    const onChangeCallback = (0, import_element42.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue })),
      [data, onChange, setValue]
    );
    const onSelectDate = (0, import_element42.useCallback)(
      (newDate) => {
        const dateValue = newDate ? format(newDate, "yyyy-MM-dd") : void 0;
        onChangeCallback(dateValue);
        setSelectedPresetId(null);
        setIsTouched(true);
      },
      [onChangeCallback]
    );
    const handlePresetClick = (0, import_element42.useCallback)(
      (preset) => {
        const presetDate = preset.getValue();
        const dateValue = formatDate(presetDate);
        setCalendarMonth(presetDate);
        onChangeCallback(dateValue);
        setSelectedPresetId(preset.id);
        setIsTouched(true);
      },
      [onChangeCallback]
    );
    const handleManualDateChange = (0, import_element42.useCallback)(
      (newValue) => {
        onChangeCallback(newValue);
        if (newValue) {
          const parsedDate = parseDate(newValue);
          if (parsedDate) {
            setCalendarMonth(parsedDate);
          }
        }
        setSelectedPresetId(null);
        setIsTouched(true);
      },
      [onChangeCallback]
    );
    const {
      timezone: { string: timezoneString }
    } = (0, import_date4.getSettings)();
    let displayLabel = label;
    if (isValid2?.required && !markWhenOptional) {
      displayLabel = `${label} (${(0, import_i18n40.__)("Required")})`;
    } else if (!isValid2?.required && markWhenOptional) {
      displayLabel = `${label} (${(0, import_i18n40.__)("Optional")})`;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
      ValidatedDateControl,
      {
        field,
        validity,
        inputRefs: validityTargetRef,
        isTouched,
        setIsTouched,
        children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
          import_components33.BaseControl,
          {
            id,
            className: "dataviews-controls__date",
            label: displayLabel,
            hideLabelFromVision,
            children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(Stack, { direction: "column", gap: "lg", children: [
              /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
                Stack,
                {
                  direction: "row",
                  gap: "sm",
                  wrap: "wrap",
                  justify: "flex-start",
                  children: [
                    DATE_PRESETS.map((preset) => {
                      const isSelected2 = selectedPresetId === preset.id;
                      return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
                        import_components33.Button,
                        {
                          className: "dataviews-controls__date-preset",
                          variant: "tertiary",
                          isPressed: isSelected2,
                          size: "small",
                          onClick: () => handlePresetClick(preset),
                          children: preset.label
                        },
                        preset.id
                      );
                    }),
                    /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
                      import_components33.Button,
                      {
                        className: "dataviews-controls__date-preset",
                        variant: "tertiary",
                        isPressed: !selectedPresetId,
                        size: "small",
                        disabled: !!selectedPresetId,
                        accessibleWhenDisabled: false,
                        children: (0, import_i18n40.__)("Custom")
                      }
                    )
                  ]
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
                import_components33.__experimentalInputControl,
                {
                  __next40pxDefaultSize: true,
                  ref: validityTargetRef,
                  type: "date",
                  label: (0, import_i18n40.__)("Date"),
                  hideLabelFromVision: true,
                  value,
                  onChange: handleManualDateChange,
                  required: !!field.isValid?.required
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
                DateCalendar2,
                {
                  style: { width: "100%" },
                  selected: value ? parseDate(value) || void 0 : void 0,
                  onSelect: onSelectDate,
                  month: calendarMonth,
                  onMonthChange: setCalendarMonth,
                  timeZone: timezoneString || void 0,
                  weekStartsOn
                }
              )
            ] })
          }
        )
      }
    );
  }
  function CalendarDateRangeControl({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { id, label, getValue, setValue, format: fieldFormat } = field;
    let value;
    const fieldValue = getValue({ item: data });
    if (Array.isArray(fieldValue) && fieldValue.length === 2 && fieldValue.every((date) => typeof date === "string")) {
      value = fieldValue;
    }
    const weekStartsOn = fieldFormat.weekStartsOn ?? (0, import_date4.getSettings)().l10n.startOfWeek;
    const onChangeCallback = (0, import_element42.useCallback)(
      (newValue) => {
        onChange(
          setValue({
            item: data,
            value: newValue
          })
        );
      },
      [data, onChange, setValue]
    );
    const [selectedPresetId, setSelectedPresetId] = (0, import_element42.useState)(
      null
    );
    const selectedRange = (0, import_element42.useMemo)(() => {
      if (!value) {
        return { from: void 0, to: void 0 };
      }
      const [from, to] = value;
      return {
        from: parseDate(from) || void 0,
        to: parseDate(to) || void 0
      };
    }, [value]);
    const [calendarMonth, setCalendarMonth] = (0, import_element42.useState)(() => {
      return selectedRange.from || /* @__PURE__ */ new Date();
    });
    const [isTouched, setIsTouched] = (0, import_element42.useState)(false);
    const fromInputRef = (0, import_element42.useRef)(null);
    const toInputRef = (0, import_element42.useRef)(null);
    const updateDateRange = (0, import_element42.useCallback)(
      (fromDate, toDate2) => {
        if (fromDate && toDate2) {
          onChangeCallback([
            formatDate(fromDate),
            formatDate(toDate2)
          ]);
        } else if (!fromDate && !toDate2) {
          onChangeCallback(void 0);
        }
      },
      [onChangeCallback]
    );
    const onSelectCalendarRange = (0, import_element42.useCallback)(
      (newRange) => {
        updateDateRange(newRange?.from, newRange?.to);
        setSelectedPresetId(null);
        setIsTouched(true);
      },
      [updateDateRange]
    );
    const handlePresetClick = (0, import_element42.useCallback)(
      (preset) => {
        const [startDate, endDate] = preset.getValue();
        setCalendarMonth(startDate);
        updateDateRange(startDate, endDate);
        setSelectedPresetId(preset.id);
        setIsTouched(true);
      },
      [updateDateRange]
    );
    const handleManualDateChange = (0, import_element42.useCallback)(
      (fromOrTo, newValue) => {
        const [currentFrom, currentTo] = value || [
          void 0,
          void 0
        ];
        const updatedFrom = fromOrTo === "from" ? newValue : currentFrom;
        const updatedTo = fromOrTo === "to" ? newValue : currentTo;
        updateDateRange(updatedFrom, updatedTo);
        if (newValue) {
          const parsedDate = parseDate(newValue);
          if (parsedDate) {
            setCalendarMonth(parsedDate);
          }
        }
        setSelectedPresetId(null);
        setIsTouched(true);
      },
      [value, updateDateRange]
    );
    const { timezone } = (0, import_date4.getSettings)();
    let displayLabel = label;
    if (field.isValid?.required && !markWhenOptional) {
      displayLabel = `${label} (${(0, import_i18n40.__)("Required")})`;
    } else if (!field.isValid?.required && markWhenOptional) {
      displayLabel = `${label} (${(0, import_i18n40.__)("Optional")})`;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
      ValidatedDateControl,
      {
        field,
        validity,
        inputRefs: [fromInputRef, toInputRef],
        isTouched,
        setIsTouched,
        children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
          import_components33.BaseControl,
          {
            id,
            className: "dataviews-controls__date",
            label: displayLabel,
            hideLabelFromVision,
            children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(Stack, { direction: "column", gap: "lg", children: [
              /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
                Stack,
                {
                  direction: "row",
                  gap: "sm",
                  wrap: "wrap",
                  justify: "flex-start",
                  children: [
                    DATE_RANGE_PRESETS.map((preset) => {
                      const isSelected2 = selectedPresetId === preset.id;
                      return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
                        import_components33.Button,
                        {
                          className: "dataviews-controls__date-preset",
                          variant: "tertiary",
                          isPressed: isSelected2,
                          size: "small",
                          onClick: () => handlePresetClick(preset),
                          children: preset.label
                        },
                        preset.id
                      );
                    }),
                    /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
                      import_components33.Button,
                      {
                        className: "dataviews-controls__date-preset",
                        variant: "tertiary",
                        isPressed: !selectedPresetId,
                        size: "small",
                        accessibleWhenDisabled: false,
                        disabled: !!selectedPresetId,
                        children: (0, import_i18n40.__)("Custom")
                      }
                    )
                  ]
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
                Stack,
                {
                  direction: "row",
                  gap: "sm",
                  justify: "space-between",
                  className: "dataviews-controls__date-range-inputs",
                  children: [
                    /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
                      import_components33.__experimentalInputControl,
                      {
                        __next40pxDefaultSize: true,
                        ref: fromInputRef,
                        type: "date",
                        label: (0, import_i18n40.__)("From"),
                        hideLabelFromVision: true,
                        value: value?.[0],
                        onChange: (newValue) => handleManualDateChange("from", newValue),
                        required: !!field.isValid?.required
                      }
                    ),
                    /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
                      import_components33.__experimentalInputControl,
                      {
                        __next40pxDefaultSize: true,
                        ref: toInputRef,
                        type: "date",
                        label: (0, import_i18n40.__)("To"),
                        hideLabelFromVision: true,
                        value: value?.[1],
                        onChange: (newValue) => handleManualDateChange("to", newValue),
                        required: !!field.isValid?.required
                      }
                    )
                  ]
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
                DateRangeCalendar,
                {
                  style: { width: "100%" },
                  selected: selectedRange,
                  onSelect: onSelectCalendarRange,
                  month: calendarMonth,
                  onMonthChange: setCalendarMonth,
                  timeZone: timezone.string || void 0,
                  weekStartsOn
                }
              )
            ] })
          }
        )
      }
    );
  }
  function DateControl({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    operator,
    validity
  }) {
    if (operator === OPERATOR_IN_THE_PAST || operator === OPERATOR_OVER) {
      return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
        RelativeDateControl,
        {
          className: "dataviews-controls__date",
          data,
          field,
          onChange,
          hideLabelFromVision,
          operator
        }
      );
    }
    if (operator === OPERATOR_BETWEEN) {
      return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
        CalendarDateRangeControl,
        {
          data,
          field,
          onChange,
          hideLabelFromVision,
          markWhenOptional,
          validity
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
      CalendarDateControl,
      {
        data,
        field,
        onChange,
        hideLabelFromVision,
        markWhenOptional,
        validity
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/select.mjs
  var import_components34 = __toESM(require_components(), 1);
  var import_element43 = __toESM(require_element(), 1);
  var import_jsx_runtime78 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedSelectControl } = unlock(import_components34.privateApis);
  function Select({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { type, label, description, getValue, setValue, isValid: isValid2 } = field;
    const isMultiple = type === "array";
    const value = getValue({ item: data }) ?? (isMultiple ? [] : "");
    const onChangeControl = (0, import_element43.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue })),
      [data, onChange, setValue]
    );
    const { elements, isLoading } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_components34.Spinner, {});
    }
    return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
      ValidatedSelectControl,
      {
        required: !!field.isValid?.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        value,
        help: description,
        options: elements,
        onChange: onChangeControl,
        __next40pxDefaultSize: true,
        hideLabelFromVision,
        multiple: isMultiple
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/adaptive-select.mjs
  var import_jsx_runtime79 = __toESM(require_jsx_runtime(), 1);
  var ELEMENTS_THRESHOLD = 10;
  function AdaptiveSelect(props) {
    const { field } = props;
    const { elements } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    if (elements.length >= ELEMENTS_THRESHOLD) {
      return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Combobox3, { ...props });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Select, { ...props });
  }

  // packages/dataviews/build-module/components/dataform-controls/email.mjs
  var import_components36 = __toESM(require_components(), 1);

  // packages/dataviews/build-module/components/dataform-controls/utils/validated-input.mjs
  var import_components35 = __toESM(require_components(), 1);
  var import_element44 = __toESM(require_element(), 1);
  var import_jsx_runtime80 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedInputControl: ValidatedInputControl2 } = unlock(import_components35.privateApis);
  function ValidatedText({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    type,
    prefix,
    suffix,
    validity
  }) {
    const { label, placeholder, description, getValue, setValue, isValid: isValid2 } = field;
    const value = getValue({ item: data });
    const onChangeControl = (0, import_element44.useCallback)(
      (newValue) => onChange(
        setValue({
          item: data,
          value: newValue
        })
      ),
      [data, setValue, onChange]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
      ValidatedInputControl2,
      {
        required: !!isValid2.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        placeholder,
        value: value ?? "",
        help: description,
        onChange: onChangeControl,
        hideLabelFromVision,
        type,
        prefix,
        suffix,
        pattern: isValid2.pattern ? isValid2.pattern.constraint : void 0,
        minLength: isValid2.minLength ? isValid2.minLength.constraint : void 0,
        maxLength: isValid2.maxLength ? isValid2.maxLength.constraint : void 0,
        __next40pxDefaultSize: true
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/email.mjs
  var import_jsx_runtime81 = __toESM(require_jsx_runtime(), 1);
  function Email({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
      ValidatedText,
      {
        ...{
          data,
          field,
          onChange,
          hideLabelFromVision,
          markWhenOptional,
          validity,
          type: "email",
          prefix: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components36.__experimentalInputControlPrefixWrapper, { variant: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components36.Icon, { icon: envelope_default }) })
        }
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/telephone.mjs
  var import_components37 = __toESM(require_components(), 1);
  var import_jsx_runtime82 = __toESM(require_jsx_runtime(), 1);
  function Telephone({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
      ValidatedText,
      {
        ...{
          data,
          field,
          onChange,
          hideLabelFromVision,
          markWhenOptional,
          validity,
          type: "tel",
          prefix: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components37.__experimentalInputControlPrefixWrapper, { variant: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components37.Icon, { icon: mobile_default }) })
        }
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/url.mjs
  var import_components38 = __toESM(require_components(), 1);
  var import_jsx_runtime83 = __toESM(require_jsx_runtime(), 1);
  function Url({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
      ValidatedText,
      {
        ...{
          data,
          field,
          onChange,
          hideLabelFromVision,
          markWhenOptional,
          validity,
          type: "url",
          prefix: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_components38.__experimentalInputControlPrefixWrapper, { variant: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_components38.Icon, { icon: link_default }) })
        }
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/utils/validated-number.mjs
  var import_components39 = __toESM(require_components(), 1);
  var import_element45 = __toESM(require_element(), 1);
  var import_i18n41 = __toESM(require_i18n(), 1);
  var import_jsx_runtime84 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedNumberControl } = unlock(import_components39.privateApis);
  function toNumberOrEmpty(value) {
    if (value === "" || value === void 0) {
      return "";
    }
    const number = Number(value);
    return Number.isFinite(number) ? number : "";
  }
  function BetweenControls({
    value,
    onChange,
    hideLabelFromVision,
    step
  }) {
    const [min = "", max = ""] = value;
    const onChangeMin = (0, import_element45.useCallback)(
      (newValue) => onChange([toNumberOrEmpty(newValue), max]),
      [onChange, max]
    );
    const onChangeMax = (0, import_element45.useCallback)(
      (newValue) => onChange([min, toNumberOrEmpty(newValue)]),
      [onChange, min]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
      import_components39.BaseControl,
      {
        help: (0, import_i18n41.__)("The max. value must be greater than the min. value."),
        children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_components39.Flex, { direction: "row", gap: 4, children: [
          /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
            import_components39.__experimentalNumberControl,
            {
              label: (0, import_i18n41.__)("Min."),
              value: min,
              max: max ? Number(max) - step : void 0,
              onChange: onChangeMin,
              __next40pxDefaultSize: true,
              hideLabelFromVision,
              step
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
            import_components39.__experimentalNumberControl,
            {
              label: (0, import_i18n41.__)("Max."),
              value: max,
              min: min ? Number(min) + step : void 0,
              onChange: onChangeMax,
              __next40pxDefaultSize: true,
              hideLabelFromVision,
              step
            }
          )
        ] })
      }
    );
  }
  function ValidatedNumber({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    operator,
    validity
  }) {
    const decimals = field.format?.decimals ?? 0;
    const step = Math.pow(10, Math.abs(decimals) * -1);
    const { label, description, getValue, setValue, isValid: isValid2 } = field;
    const value = getValue({ item: data }) ?? "";
    const onChangeControl = (0, import_element45.useCallback)(
      (newValue) => {
        onChange(
          setValue({
            item: data,
            // Do not convert an empty string or undefined to a number,
            // otherwise there's a mismatch between the UI control (empty)
            // and the data relied by onChange (0).
            value: ["", void 0].includes(newValue) ? void 0 : Number(newValue)
          })
        );
      },
      [data, onChange, setValue]
    );
    const onChangeBetweenControls = (0, import_element45.useCallback)(
      (newValue) => {
        onChange(
          setValue({
            item: data,
            value: newValue
          })
        );
      },
      [data, onChange, setValue]
    );
    if (operator === OPERATOR_BETWEEN) {
      let valueBetween = ["", ""];
      if (Array.isArray(value) && value.length === 2 && value.every(
        (element) => typeof element === "number" || element === ""
      )) {
        valueBetween = value;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
        BetweenControls,
        {
          value: valueBetween,
          onChange: onChangeBetweenControls,
          hideLabelFromVision,
          step
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
      ValidatedNumberControl,
      {
        required: !!isValid2.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        help: description,
        value,
        onChange: onChangeControl,
        __next40pxDefaultSize: true,
        hideLabelFromVision,
        step,
        min: isValid2.min ? isValid2.min.constraint : void 0,
        max: isValid2.max ? isValid2.max.constraint : void 0
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/integer.mjs
  var import_jsx_runtime85 = __toESM(require_jsx_runtime(), 1);
  function Integer(props) {
    return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ValidatedNumber, { ...props });
  }

  // packages/dataviews/build-module/components/dataform-controls/number.mjs
  var import_jsx_runtime86 = __toESM(require_jsx_runtime(), 1);
  function Number2(props) {
    return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ValidatedNumber, { ...props });
  }

  // packages/dataviews/build-module/components/dataform-controls/radio.mjs
  var import_components40 = __toESM(require_components(), 1);
  var import_element46 = __toESM(require_element(), 1);
  var import_jsx_runtime87 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedRadioControl } = unlock(import_components40.privateApis);
  function Radio({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { label, description, getValue, setValue, isValid: isValid2 } = field;
    const { elements, isLoading } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    const value = getValue({ item: data });
    const onChangeControl = (0, import_element46.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue })),
      [data, onChange, setValue]
    );
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_components40.Spinner, {});
    }
    return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
      ValidatedRadioControl,
      {
        required: !!field.isValid?.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        help: description,
        onChange: onChangeControl,
        options: elements,
        selected: value,
        hideLabelFromVision
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/text.mjs
  var import_element47 = __toESM(require_element(), 1);
  var import_jsx_runtime88 = __toESM(require_jsx_runtime(), 1);
  function Text({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    config,
    validity
  }) {
    const { prefix, suffix } = config || {};
    return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
      ValidatedText,
      {
        ...{
          data,
          field,
          onChange,
          hideLabelFromVision,
          markWhenOptional,
          validity,
          prefix: prefix ? (0, import_element47.createElement)(prefix) : void 0,
          suffix: suffix ? (0, import_element47.createElement)(suffix) : void 0
        }
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/toggle.mjs
  var import_components41 = __toESM(require_components(), 1);
  var import_element48 = __toESM(require_element(), 1);
  var import_jsx_runtime89 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedToggleControl } = unlock(import_components41.privateApis);
  function Toggle({
    field,
    onChange,
    data,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { label, description, getValue, setValue, isValid: isValid2 } = field;
    const onChangeControl = (0, import_element48.useCallback)(() => {
      onChange(
        setValue({ item: data, value: !getValue({ item: data }) })
      );
    }, [onChange, setValue, data, getValue]);
    return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
      ValidatedToggleControl,
      {
        required: !!isValid2.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        hidden: hideLabelFromVision,
        label,
        help: description,
        checked: getValue({ item: data }),
        onChange: onChangeControl
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/textarea.mjs
  var import_components42 = __toESM(require_components(), 1);
  var import_element49 = __toESM(require_element(), 1);
  var import_jsx_runtime90 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedTextareaControl } = unlock(import_components42.privateApis);
  function Textarea({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    config,
    validity
  }) {
    const { rows = 4 } = config || {};
    const { label, placeholder, description, setValue, isValid: isValid2 } = field;
    const value = field.getValue({ item: data });
    const onChangeControl = (0, import_element49.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue })),
      [data, onChange, setValue]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
      ValidatedTextareaControl,
      {
        required: !!isValid2.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        placeholder,
        value: value ?? "",
        help: description,
        onChange: onChangeControl,
        rows,
        minLength: isValid2.minLength ? isValid2.minLength.constraint : void 0,
        maxLength: isValid2.maxLength ? isValid2.maxLength.constraint : void 0,
        __next40pxDefaultSize: true,
        hideLabelFromVision
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/toggle-group.mjs
  var import_components43 = __toESM(require_components(), 1);
  var import_element50 = __toESM(require_element(), 1);
  var import_jsx_runtime91 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedToggleGroupControl } = unlock(import_components43.privateApis);
  function ToggleGroup({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { getValue, setValue, isValid: isValid2 } = field;
    const value = getValue({ item: data });
    const onChangeControl = (0, import_element50.useCallback)(
      (newValue) => onChange(setValue({ item: data, value: newValue })),
      [data, onChange, setValue]
    );
    const { elements, isLoading } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_components43.Spinner, {});
    }
    if (elements.length === 0) {
      return null;
    }
    const selectedOption = elements.find((el) => el.value === value);
    return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
      ValidatedToggleGroupControl,
      {
        required: !!field.isValid?.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        __next40pxDefaultSize: true,
        isBlock: true,
        label: field.label,
        help: selectedOption?.description || field.description,
        onChange: onChangeControl,
        value,
        hideLabelFromVision,
        children: elements.map((el) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
          import_components43.__experimentalToggleGroupControlOption,
          {
            label: el.label,
            value: el.value
          },
          el.value
        ))
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/array.mjs
  var import_components44 = __toESM(require_components(), 1);
  var import_element51 = __toESM(require_element(), 1);
  var import_jsx_runtime92 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedFormTokenField } = unlock(import_components44.privateApis);
  function ArrayControl({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { label, placeholder, getValue, setValue, isValid: isValid2 } = field;
    const value = getValue({ item: data });
    const { elements, isLoading } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    const arrayValueAsElements = (0, import_element51.useMemo)(
      () => Array.isArray(value) ? value.map((token) => {
        const element = elements?.find(
          (suggestion) => suggestion.value === token
        );
        return element || { value: token, label: token };
      }) : [],
      [value, elements]
    );
    const onChangeControl = (0, import_element51.useCallback)(
      (tokens) => {
        const valueTokens = tokens.map((token) => {
          if (typeof token === "object" && "value" in token) {
            return token.value;
          }
          return token;
        });
        onChange(setValue({ item: data, value: valueTokens }));
      },
      [onChange, setValue, data]
    );
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_components44.Spinner, {});
    }
    return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
      ValidatedFormTokenField,
      {
        required: !!isValid2?.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label: hideLabelFromVision ? void 0 : label,
        value: arrayValueAsElements,
        onChange: onChangeControl,
        placeholder,
        suggestions: elements?.map((element) => element.value),
        __experimentalValidateInput: (token) => {
          if (field.isValid?.elements && elements) {
            return elements.some(
              (element) => element.value === token || element.label === token
            );
          }
          return true;
        },
        __experimentalExpandOnFocus: elements && elements.length > 0,
        __experimentalShowHowTo: !field.isValid?.elements,
        displayTransform: (token) => {
          if (typeof token === "object" && "label" in token) {
            return token.label;
          }
          if (typeof token === "string" && elements) {
            const element = elements.find(
              (el) => el.value === token
            );
            return element?.label || token;
          }
          return token;
        },
        __experimentalRenderItem: ({ item }) => {
          if (typeof item === "string" && elements) {
            const element = elements.find(
              (el) => el.value === item
            );
            return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { children: element?.label || item });
          }
          return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { children: item });
        }
      }
    );
  }

  // node_modules/colord/index.mjs
  var r2 = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) };
  var t = function(r3) {
    return "string" == typeof r3 ? r3.length > 0 : "number" == typeof r3;
  };
  var n = function(r3, t2, n2) {
    return void 0 === t2 && (t2 = 0), void 0 === n2 && (n2 = Math.pow(10, t2)), Math.round(n2 * r3) / n2 + 0;
  };
  var e = function(r3, t2, n2) {
    return void 0 === t2 && (t2 = 0), void 0 === n2 && (n2 = 1), r3 > n2 ? n2 : r3 > t2 ? r3 : t2;
  };
  var u = function(r3) {
    return (r3 = isFinite(r3) ? r3 % 360 : 0) > 0 ? r3 : r3 + 360;
  };
  var a = function(r3) {
    return { r: e(r3.r, 0, 255), g: e(r3.g, 0, 255), b: e(r3.b, 0, 255), a: e(r3.a) };
  };
  var o = function(r3) {
    return { r: n(r3.r), g: n(r3.g), b: n(r3.b), a: n(r3.a, 3) };
  };
  var i = /^#([0-9a-f]{3,8})$/i;
  var s = function(r3) {
    var t2 = r3.toString(16);
    return t2.length < 2 ? "0" + t2 : t2;
  };
  var h = function(r3) {
    var t2 = r3.r, n2 = r3.g, e2 = r3.b, u2 = r3.a, a2 = Math.max(t2, n2, e2), o2 = a2 - Math.min(t2, n2, e2), i2 = o2 ? a2 === t2 ? (n2 - e2) / o2 : a2 === n2 ? 2 + (e2 - t2) / o2 : 4 + (t2 - n2) / o2 : 0;
    return { h: 60 * (i2 < 0 ? i2 + 6 : i2), s: a2 ? o2 / a2 * 100 : 0, v: a2 / 255 * 100, a: u2 };
  };
  var b = function(r3) {
    var t2 = r3.h, n2 = r3.s, e2 = r3.v, u2 = r3.a;
    t2 = t2 / 360 * 6, n2 /= 100, e2 /= 100;
    var a2 = Math.floor(t2), o2 = e2 * (1 - n2), i2 = e2 * (1 - (t2 - a2) * n2), s2 = e2 * (1 - (1 - t2 + a2) * n2), h2 = a2 % 6;
    return { r: 255 * [e2, i2, o2, o2, s2, e2][h2], g: 255 * [s2, e2, e2, i2, o2, o2][h2], b: 255 * [o2, o2, s2, e2, e2, i2][h2], a: u2 };
  };
  var g = function(r3) {
    return { h: u(r3.h), s: e(r3.s, 0, 100), l: e(r3.l, 0, 100), a: e(r3.a) };
  };
  var d = function(r3) {
    return { h: n(r3.h), s: n(r3.s), l: n(r3.l), a: n(r3.a, 3) };
  };
  var f = function(r3) {
    return b((n2 = (t2 = r3).s, { h: t2.h, s: (n2 *= ((e2 = t2.l) < 50 ? e2 : 100 - e2) / 100) > 0 ? 2 * n2 / (e2 + n2) * 100 : 0, v: e2 + n2, a: t2.a }));
    var t2, n2, e2;
  };
  var c = function(r3) {
    return { h: (t2 = h(r3)).h, s: (u2 = (200 - (n2 = t2.s)) * (e2 = t2.v) / 100) > 0 && u2 < 200 ? n2 * e2 / 100 / (u2 <= 100 ? u2 : 200 - u2) * 100 : 0, l: u2 / 2, a: t2.a };
    var t2, n2, e2, u2;
  };
  var l = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var p = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var v = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var m = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var y = { string: [[function(r3) {
    var t2 = i.exec(r3);
    return t2 ? (r3 = t2[1]).length <= 4 ? { r: parseInt(r3[0] + r3[0], 16), g: parseInt(r3[1] + r3[1], 16), b: parseInt(r3[2] + r3[2], 16), a: 4 === r3.length ? n(parseInt(r3[3] + r3[3], 16) / 255, 2) : 1 } : 6 === r3.length || 8 === r3.length ? { r: parseInt(r3.substr(0, 2), 16), g: parseInt(r3.substr(2, 2), 16), b: parseInt(r3.substr(4, 2), 16), a: 8 === r3.length ? n(parseInt(r3.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
  }, "hex"], [function(r3) {
    var t2 = v.exec(r3) || m.exec(r3);
    return t2 ? t2[2] !== t2[4] || t2[4] !== t2[6] ? null : a({ r: Number(t2[1]) / (t2[2] ? 100 / 255 : 1), g: Number(t2[3]) / (t2[4] ? 100 / 255 : 1), b: Number(t2[5]) / (t2[6] ? 100 / 255 : 1), a: void 0 === t2[7] ? 1 : Number(t2[7]) / (t2[8] ? 100 : 1) }) : null;
  }, "rgb"], [function(t2) {
    var n2 = l.exec(t2) || p.exec(t2);
    if (!n2) return null;
    var e2, u2, a2 = g({ h: (e2 = n2[1], u2 = n2[2], void 0 === u2 && (u2 = "deg"), Number(e2) * (r2[u2] || 1)), s: Number(n2[3]), l: Number(n2[4]), a: void 0 === n2[5] ? 1 : Number(n2[5]) / (n2[6] ? 100 : 1) });
    return f(a2);
  }, "hsl"]], object: [[function(r3) {
    var n2 = r3.r, e2 = r3.g, u2 = r3.b, o2 = r3.a, i2 = void 0 === o2 ? 1 : o2;
    return t(n2) && t(e2) && t(u2) ? a({ r: Number(n2), g: Number(e2), b: Number(u2), a: Number(i2) }) : null;
  }, "rgb"], [function(r3) {
    var n2 = r3.h, e2 = r3.s, u2 = r3.l, a2 = r3.a, o2 = void 0 === a2 ? 1 : a2;
    if (!t(n2) || !t(e2) || !t(u2)) return null;
    var i2 = g({ h: Number(n2), s: Number(e2), l: Number(u2), a: Number(o2) });
    return f(i2);
  }, "hsl"], [function(r3) {
    var n2 = r3.h, a2 = r3.s, o2 = r3.v, i2 = r3.a, s2 = void 0 === i2 ? 1 : i2;
    if (!t(n2) || !t(a2) || !t(o2)) return null;
    var h2 = (function(r4) {
      return { h: u(r4.h), s: e(r4.s, 0, 100), v: e(r4.v, 0, 100), a: e(r4.a) };
    })({ h: Number(n2), s: Number(a2), v: Number(o2), a: Number(s2) });
    return b(h2);
  }, "hsv"]] };
  var N = function(r3, t2) {
    for (var n2 = 0; n2 < t2.length; n2++) {
      var e2 = t2[n2][0](r3);
      if (e2) return [e2, t2[n2][1]];
    }
    return [null, void 0];
  };
  var x = function(r3) {
    return "string" == typeof r3 ? N(r3.trim(), y.string) : "object" == typeof r3 && null !== r3 ? N(r3, y.object) : [null, void 0];
  };
  var M = function(r3, t2) {
    var n2 = c(r3);
    return { h: n2.h, s: e(n2.s + 100 * t2, 0, 100), l: n2.l, a: n2.a };
  };
  var H = function(r3) {
    return (299 * r3.r + 587 * r3.g + 114 * r3.b) / 1e3 / 255;
  };
  var $ = function(r3, t2) {
    var n2 = c(r3);
    return { h: n2.h, s: n2.s, l: e(n2.l + 100 * t2, 0, 100), a: n2.a };
  };
  var j = (function() {
    function r3(r4) {
      this.parsed = x(r4)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
    }
    return r3.prototype.isValid = function() {
      return null !== this.parsed;
    }, r3.prototype.brightness = function() {
      return n(H(this.rgba), 2);
    }, r3.prototype.isDark = function() {
      return H(this.rgba) < 0.5;
    }, r3.prototype.isLight = function() {
      return H(this.rgba) >= 0.5;
    }, r3.prototype.toHex = function() {
      return r4 = o(this.rgba), t2 = r4.r, e2 = r4.g, u2 = r4.b, i2 = (a2 = r4.a) < 1 ? s(n(255 * a2)) : "", "#" + s(t2) + s(e2) + s(u2) + i2;
      var r4, t2, e2, u2, a2, i2;
    }, r3.prototype.toRgb = function() {
      return o(this.rgba);
    }, r3.prototype.toRgbString = function() {
      return r4 = o(this.rgba), t2 = r4.r, n2 = r4.g, e2 = r4.b, (u2 = r4.a) < 1 ? "rgba(" + t2 + ", " + n2 + ", " + e2 + ", " + u2 + ")" : "rgb(" + t2 + ", " + n2 + ", " + e2 + ")";
      var r4, t2, n2, e2, u2;
    }, r3.prototype.toHsl = function() {
      return d(c(this.rgba));
    }, r3.prototype.toHslString = function() {
      return r4 = d(c(this.rgba)), t2 = r4.h, n2 = r4.s, e2 = r4.l, (u2 = r4.a) < 1 ? "hsla(" + t2 + ", " + n2 + "%, " + e2 + "%, " + u2 + ")" : "hsl(" + t2 + ", " + n2 + "%, " + e2 + "%)";
      var r4, t2, n2, e2, u2;
    }, r3.prototype.toHsv = function() {
      return r4 = h(this.rgba), { h: n(r4.h), s: n(r4.s), v: n(r4.v), a: n(r4.a, 3) };
      var r4;
    }, r3.prototype.invert = function() {
      return w({ r: 255 - (r4 = this.rgba).r, g: 255 - r4.g, b: 255 - r4.b, a: r4.a });
      var r4;
    }, r3.prototype.saturate = function(r4) {
      return void 0 === r4 && (r4 = 0.1), w(M(this.rgba, r4));
    }, r3.prototype.desaturate = function(r4) {
      return void 0 === r4 && (r4 = 0.1), w(M(this.rgba, -r4));
    }, r3.prototype.grayscale = function() {
      return w(M(this.rgba, -1));
    }, r3.prototype.lighten = function(r4) {
      return void 0 === r4 && (r4 = 0.1), w($(this.rgba, r4));
    }, r3.prototype.darken = function(r4) {
      return void 0 === r4 && (r4 = 0.1), w($(this.rgba, -r4));
    }, r3.prototype.rotate = function(r4) {
      return void 0 === r4 && (r4 = 15), this.hue(this.hue() + r4);
    }, r3.prototype.alpha = function(r4) {
      return "number" == typeof r4 ? w({ r: (t2 = this.rgba).r, g: t2.g, b: t2.b, a: r4 }) : n(this.rgba.a, 3);
      var t2;
    }, r3.prototype.hue = function(r4) {
      var t2 = c(this.rgba);
      return "number" == typeof r4 ? w({ h: r4, s: t2.s, l: t2.l, a: t2.a }) : n(t2.h);
    }, r3.prototype.isEqual = function(r4) {
      return this.toHex() === w(r4).toHex();
    }, r3;
  })();
  var w = function(r3) {
    return r3 instanceof j ? r3 : new j(r3);
  };

  // packages/dataviews/build-module/components/dataform-controls/color.mjs
  var import_components45 = __toESM(require_components(), 1);
  var import_element52 = __toESM(require_element(), 1);
  var import_i18n42 = __toESM(require_i18n(), 1);
  var import_jsx_runtime93 = __toESM(require_jsx_runtime(), 1);
  var { ValidatedInputControl: ValidatedInputControl3 } = unlock(import_components45.privateApis);
  var ColorPickerDropdown = ({
    color,
    onColorChange
  }) => {
    const validColor = color && w(color).isValid() ? color : "#ffffff";
    return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
      import_components45.Dropdown,
      {
        className: "dataviews-controls__color-picker-dropdown",
        popoverProps: { resize: false },
        renderToggle: ({ onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
          import_components45.Button,
          {
            onClick: onToggle,
            "aria-label": (0, import_i18n42.__)("Open color picker"),
            size: "small",
            icon: () => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_components45.ColorIndicator, { colorValue: validColor })
          }
        ),
        renderContent: () => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_components45.__experimentalDropdownContentWrapper, { paddingSize: "none", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
          import_components45.ColorPicker,
          {
            color: validColor,
            onChange: onColorChange,
            enableAlpha: true
          }
        ) })
      }
    );
  };
  function Color({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const { label, placeholder, description, setValue, isValid: isValid2 } = field;
    const value = field.getValue({ item: data }) || "";
    const handleColorChange = (0, import_element52.useCallback)(
      (newColor) => {
        onChange(setValue({ item: data, value: newColor }));
      },
      [data, onChange, setValue]
    );
    const handleInputChange = (0, import_element52.useCallback)(
      (newValue) => {
        onChange(setValue({ item: data, value: newValue || "" }));
      },
      [data, onChange, setValue]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
      ValidatedInputControl3,
      {
        required: !!field.isValid?.required,
        markWhenOptional,
        customValidity: getCustomValidity(isValid2, validity),
        label,
        placeholder,
        value,
        help: description,
        onChange: handleInputChange,
        hideLabelFromVision,
        type: "text",
        prefix: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_components45.__experimentalInputControlPrefixWrapper, { variant: "control", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
          ColorPickerDropdown,
          {
            color: value,
            onColorChange: handleColorChange
          }
        ) })
      }
    );
  }

  // packages/dataviews/build-module/components/dataform-controls/password.mjs
  var import_components46 = __toESM(require_components(), 1);
  var import_element53 = __toESM(require_element(), 1);
  var import_i18n43 = __toESM(require_i18n(), 1);
  var import_jsx_runtime94 = __toESM(require_jsx_runtime(), 1);
  function Password({
    data,
    field,
    onChange,
    hideLabelFromVision,
    markWhenOptional,
    validity
  }) {
    const [isVisible2, setIsVisible] = (0, import_element53.useState)(false);
    const toggleVisibility = (0, import_element53.useCallback)(() => {
      setIsVisible((prev) => !prev);
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
      ValidatedText,
      {
        ...{
          data,
          field,
          onChange,
          hideLabelFromVision,
          markWhenOptional,
          validity,
          type: isVisible2 ? "text" : "password",
          suffix: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_components46.__experimentalInputControlSuffixWrapper, { variant: "control", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
            import_components46.Button,
            {
              icon: isVisible2 ? unseen_default : seen_default,
              onClick: toggleVisibility,
              size: "small",
              label: isVisible2 ? (0, import_i18n43.__)("Hide password") : (0, import_i18n43.__)("Show password")
            }
          ) })
        }
      }
    );
  }

  // packages/dataviews/build-module/field-types/utils/has-elements.mjs
  function hasElements(field) {
    return Array.isArray(field.elements) && field.elements.length > 0 || typeof field.getElements === "function";
  }

  // packages/dataviews/build-module/components/dataform-controls/index.mjs
  var import_jsx_runtime95 = __toESM(require_jsx_runtime(), 1);
  var FORM_CONTROLS = {
    adaptiveSelect: AdaptiveSelect,
    array: ArrayControl,
    checkbox: Checkbox,
    color: Color,
    combobox: Combobox3,
    datetime: DateTime,
    date: DateControl,
    email: Email,
    telephone: Telephone,
    url: Url,
    integer: Integer,
    number: Number2,
    password: Password,
    radio: Radio,
    select: Select,
    text: Text,
    toggle: Toggle,
    textarea: Textarea,
    toggleGroup: ToggleGroup
  };
  function isEditConfig(value) {
    return value && typeof value === "object" && typeof value.control === "string";
  }
  function createConfiguredControl(config) {
    const { control, ...controlConfig } = config;
    const BaseControlType = getControlByType(control);
    if (BaseControlType === null) {
      return null;
    }
    return function ConfiguredControl(props) {
      return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(BaseControlType, { ...props, config: controlConfig });
    };
  }
  function getControl(field, fallback) {
    if (typeof field.Edit === "function") {
      return field.Edit;
    }
    if (typeof field.Edit === "string") {
      return getControlByType(field.Edit);
    }
    if (isEditConfig(field.Edit)) {
      return createConfiguredControl(field.Edit);
    }
    if (hasElements(field) && field.type !== "array") {
      return getControlByType("adaptiveSelect");
    }
    if (fallback === null) {
      return null;
    }
    return getControlByType(fallback);
  }
  function getControlByType(type) {
    if (Object.keys(FORM_CONTROLS).includes(type)) {
      return FORM_CONTROLS[type];
    }
    return null;
  }

  // packages/dataviews/build-module/field-types/utils/get-filter-by.mjs
  function getFilterBy(field, defaultOperators, validOperators) {
    if (field.filterBy === false) {
      return false;
    }
    const operators = field.filterBy?.operators?.filter(
      (op) => validOperators.includes(op)
    ) ?? defaultOperators;
    if (operators.length === 0) {
      return false;
    }
    return {
      isPrimary: !!field.filterBy?.isPrimary,
      operators
    };
  }
  var get_filter_by_default = getFilterBy;

  // packages/dataviews/build-module/field-types/utils/get-value-from-id.mjs
  var getValueFromId = (id) => ({ item }) => {
    const path = id.split(".");
    let value = item;
    for (const segment of path) {
      if (value.hasOwnProperty(segment)) {
        value = value[segment];
      } else {
        value = void 0;
      }
    }
    return value;
  };
  var get_value_from_id_default = getValueFromId;

  // packages/dataviews/build-module/field-types/utils/set-value-from-id.mjs
  var setValueFromId = (id) => ({ value }) => {
    const path = id.split(".");
    const result = {};
    let current = result;
    for (const segment of path.slice(0, -1)) {
      current[segment] = {};
      current = current[segment];
    }
    current[path.at(-1)] = value;
    return result;
  };
  var set_value_from_id_default = setValueFromId;

  // packages/dataviews/build-module/field-types/email.mjs
  var import_i18n44 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/field-types/utils/render-from-elements.mjs
  function RenderFromElements({
    item,
    field
  }) {
    const { elements, isLoading } = useElements({
      elements: field.elements,
      getElements: field.getElements
    });
    const value = field.getValue({ item });
    if (isLoading) {
      return value;
    }
    if (elements.length === 0) {
      return value;
    }
    return elements?.find((element) => element.value === value)?.label || field.getValue({ item });
  }

  // packages/dataviews/build-module/field-types/utils/render-default.mjs
  var import_jsx_runtime96 = __toESM(require_jsx_runtime(), 1);
  function render({
    item,
    field
  }) {
    if (field.hasElements) {
      return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(RenderFromElements, { item, field });
    }
    return field.getValueFormatted({ item, field });
  }

  // packages/dataviews/build-module/field-types/utils/sort-text.mjs
  var sort_text_default = (a2, b2, direction) => {
    return direction === "asc" ? a2.localeCompare(b2) : b2.localeCompare(a2);
  };

  // packages/dataviews/build-module/field-types/utils/is-valid-required.mjs
  function isValidRequired(item, field) {
    const value = field.getValue({ item });
    return ![void 0, "", null].includes(value);
  }

  // packages/dataviews/build-module/field-types/utils/is-valid-min-length.mjs
  function isValidMinLength(item, field) {
    if (typeof field.isValid.minLength?.constraint !== "number") {
      return false;
    }
    const value = field.getValue({ item });
    if ([void 0, "", null].includes(value)) {
      return true;
    }
    return String(value).length >= field.isValid.minLength.constraint;
  }

  // packages/dataviews/build-module/field-types/utils/is-valid-max-length.mjs
  function isValidMaxLength(item, field) {
    if (typeof field.isValid.maxLength?.constraint !== "number") {
      return false;
    }
    const value = field.getValue({ item });
    if ([void 0, "", null].includes(value)) {
      return true;
    }
    return String(value).length <= field.isValid.maxLength.constraint;
  }

  // packages/dataviews/build-module/field-types/utils/is-valid-pattern.mjs
  function isValidPattern(item, field) {
    if (field.isValid.pattern?.constraint === void 0) {
      return true;
    }
    try {
      const regexp = new RegExp(field.isValid.pattern.constraint);
      const value = field.getValue({ item });
      if ([void 0, "", null].includes(value)) {
        return true;
      }
      return regexp.test(String(value));
    } catch {
      return false;
    }
  }

  // packages/dataviews/build-module/field-types/utils/is-valid-elements.mjs
  function isValidElements(item, field) {
    const elements = field.elements ?? [];
    const validValues = elements.map((el) => el.value);
    if (validValues.length === 0) {
      return true;
    }
    const value = field.getValue({ item });
    return [].concat(value).every((v2) => validValues.includes(v2));
  }

  // packages/dataviews/build-module/field-types/utils/get-value-formatted-default.mjs
  function getValueFormatted({
    item,
    field
  }) {
    return field.getValue({ item });
  }
  var get_value_formatted_default_default = getValueFormatted;

  // packages/dataviews/build-module/field-types/email.mjs
  var emailRegex = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
  function isValidCustom(item, field) {
    const value = field.getValue({ item });
    if (![void 0, "", null].includes(value) && !emailRegex.test(value)) {
      return (0, import_i18n44.__)("Value must be a valid email address.");
    }
    return null;
  }
  var email_default = {
    type: "email",
    render,
    Edit: "email",
    sort: sort_text_default,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS_ANY, OPERATOR_IS_NONE],
    validOperators: [
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_CONTAINS,
      OPERATOR_NOT_CONTAINS,
      OPERATOR_STARTS_WITH,
      // Multiple selection
      OPERATOR_IS_ANY,
      OPERATOR_IS_NONE,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    validate: {
      required: isValidRequired,
      pattern: isValidPattern,
      minLength: isValidMinLength,
      maxLength: isValidMaxLength,
      elements: isValidElements,
      custom: isValidCustom
    }
  };

  // packages/dataviews/build-module/field-types/integer.mjs
  var import_i18n45 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/field-types/utils/sort-number.mjs
  var sort_number_default = (a2, b2, direction) => {
    return direction === "asc" ? a2 - b2 : b2 - a2;
  };

  // packages/dataviews/build-module/field-types/utils/is-valid-min.mjs
  function isValidMin(item, field) {
    if (typeof field.isValid.min?.constraint !== "number") {
      return false;
    }
    const value = field.getValue({ item });
    if ([void 0, "", null].includes(value)) {
      return true;
    }
    return Number(value) >= field.isValid.min.constraint;
  }

  // packages/dataviews/build-module/field-types/utils/is-valid-max.mjs
  function isValidMax(item, field) {
    if (typeof field.isValid.max?.constraint !== "number") {
      return false;
    }
    const value = field.getValue({ item });
    if ([void 0, "", null].includes(value)) {
      return true;
    }
    return Number(value) <= field.isValid.max.constraint;
  }

  // packages/dataviews/build-module/field-types/integer.mjs
  var format2 = {
    separatorThousand: ","
  };
  function getValueFormatted2({
    item,
    field
  }) {
    let value = field.getValue({ item });
    if (value === null || value === void 0) {
      return "";
    }
    value = Number(value);
    if (!Number.isFinite(value)) {
      return String(value);
    }
    let formatInteger;
    if (field.type !== "integer") {
      formatInteger = format2;
    } else {
      formatInteger = field.format;
    }
    const { separatorThousand } = formatInteger;
    const integerValue = Math.trunc(value);
    if (!separatorThousand) {
      return String(integerValue);
    }
    return String(integerValue).replace(
      /\B(?=(\d{3})+(?!\d))/g,
      separatorThousand
    );
  }
  function isValidCustom2(item, field) {
    const value = field.getValue({ item });
    if (![void 0, "", null].includes(value) && !Number.isInteger(value)) {
      return (0, import_i18n45.__)("Value must be an integer.");
    }
    return null;
  }
  var integer_default = {
    type: "integer",
    render,
    Edit: "integer",
    sort: sort_number_default,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_LESS_THAN,
      OPERATOR_GREATER_THAN,
      OPERATOR_LESS_THAN_OR_EQUAL,
      OPERATOR_GREATER_THAN_OR_EQUAL,
      OPERATOR_BETWEEN
    ],
    validOperators: [
      // Single-selection
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_LESS_THAN,
      OPERATOR_GREATER_THAN,
      OPERATOR_LESS_THAN_OR_EQUAL,
      OPERATOR_GREATER_THAN_OR_EQUAL,
      OPERATOR_BETWEEN,
      // Multiple-selection
      OPERATOR_IS_ANY,
      OPERATOR_IS_NONE,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: format2,
    getValueFormatted: getValueFormatted2,
    validate: {
      required: isValidRequired,
      min: isValidMin,
      max: isValidMax,
      elements: isValidElements,
      custom: isValidCustom2
    }
  };

  // packages/dataviews/build-module/field-types/number.mjs
  var import_i18n46 = __toESM(require_i18n(), 1);
  var format3 = {
    separatorThousand: ",",
    separatorDecimal: ".",
    decimals: 2
  };
  function getValueFormatted3({
    item,
    field
  }) {
    let value = field.getValue({ item });
    if (value === null || value === void 0) {
      return "";
    }
    value = Number(value);
    if (!Number.isFinite(value)) {
      return String(value);
    }
    let formatNumber;
    if (field.type !== "number") {
      formatNumber = format3;
    } else {
      formatNumber = field.format;
    }
    const { separatorThousand, separatorDecimal, decimals } = formatNumber;
    const fixedValue = value.toFixed(decimals);
    const [integerPart, decimalPart] = fixedValue.split(".");
    const formattedInteger = separatorThousand ? integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, separatorThousand) : integerPart;
    return decimals === 0 ? formattedInteger : formattedInteger + separatorDecimal + decimalPart;
  }
  function isEmpty2(value) {
    return value === "" || value === void 0 || value === null;
  }
  function isValidCustom3(item, field) {
    const value = field.getValue({ item });
    if (!isEmpty2(value) && !Number.isFinite(value)) {
      return (0, import_i18n46.__)("Value must be a number.");
    }
    return null;
  }
  var number_default = {
    type: "number",
    render,
    Edit: "number",
    sort: sort_number_default,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_LESS_THAN,
      OPERATOR_GREATER_THAN,
      OPERATOR_LESS_THAN_OR_EQUAL,
      OPERATOR_GREATER_THAN_OR_EQUAL,
      OPERATOR_BETWEEN
    ],
    validOperators: [
      // Single-selection
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_LESS_THAN,
      OPERATOR_GREATER_THAN,
      OPERATOR_LESS_THAN_OR_EQUAL,
      OPERATOR_GREATER_THAN_OR_EQUAL,
      OPERATOR_BETWEEN,
      // Multiple-selection
      OPERATOR_IS_ANY,
      OPERATOR_IS_NONE,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: format3,
    getValueFormatted: getValueFormatted3,
    validate: {
      required: isValidRequired,
      min: isValidMin,
      max: isValidMax,
      elements: isValidElements,
      custom: isValidCustom3
    }
  };

  // packages/dataviews/build-module/field-types/text.mjs
  var text_default = {
    type: "text",
    render,
    Edit: "text",
    sort: sort_text_default,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS_ANY, OPERATOR_IS_NONE],
    validOperators: [
      // Single selection
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_CONTAINS,
      OPERATOR_NOT_CONTAINS,
      OPERATOR_STARTS_WITH,
      // Multiple selection
      OPERATOR_IS_ANY,
      OPERATOR_IS_NONE,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    validate: {
      required: isValidRequired,
      pattern: isValidPattern,
      minLength: isValidMinLength,
      maxLength: isValidMaxLength,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/datetime.mjs
  var import_date6 = __toESM(require_date(), 1);
  var format4 = {
    datetime: (0, import_date6.getSettings)().formats.datetime,
    weekStartsOn: (0, import_date6.getSettings)().l10n.startOfWeek
  };
  function getValueFormatted4({
    item,
    field
  }) {
    const value = field.getValue({ item });
    if (["", void 0, null].includes(value)) {
      return "";
    }
    let formatDatetime;
    if (field.type !== "datetime") {
      formatDatetime = format4;
    } else {
      formatDatetime = field.format;
    }
    return (0, import_date6.dateI18n)(formatDatetime.datetime, (0, import_date6.getDate)(value));
  }
  var sort = (a2, b2, direction) => {
    const timeA = new Date(a2).getTime();
    const timeB = new Date(b2).getTime();
    return direction === "asc" ? timeA - timeB : timeB - timeA;
  };
  var datetime_default = {
    type: "datetime",
    render,
    Edit: "datetime",
    sort,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [
      OPERATOR_ON,
      OPERATOR_NOT_ON,
      OPERATOR_BEFORE,
      OPERATOR_AFTER,
      OPERATOR_BEFORE_INC,
      OPERATOR_AFTER_INC,
      OPERATOR_IN_THE_PAST,
      OPERATOR_OVER
    ],
    validOperators: [
      OPERATOR_ON,
      OPERATOR_NOT_ON,
      OPERATOR_BEFORE,
      OPERATOR_AFTER,
      OPERATOR_BEFORE_INC,
      OPERATOR_AFTER_INC,
      OPERATOR_IN_THE_PAST,
      OPERATOR_OVER
    ],
    format: format4,
    getValueFormatted: getValueFormatted4,
    validate: {
      required: isValidRequired,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/date.mjs
  var import_date7 = __toESM(require_date(), 1);
  var format5 = {
    date: (0, import_date7.getSettings)().formats.date,
    weekStartsOn: (0, import_date7.getSettings)().l10n.startOfWeek
  };
  function getValueFormatted5({
    item,
    field
  }) {
    const value = field.getValue({ item });
    if (["", void 0, null].includes(value)) {
      return "";
    }
    let formatDate2;
    if (field.type !== "date") {
      formatDate2 = format5;
    } else {
      formatDate2 = field.format;
    }
    return (0, import_date7.dateI18n)(formatDate2.date, (0, import_date7.getDate)(value));
  }
  var sort2 = (a2, b2, direction) => {
    const timeA = new Date(a2).getTime();
    const timeB = new Date(b2).getTime();
    return direction === "asc" ? timeA - timeB : timeB - timeA;
  };
  var date_default = {
    type: "date",
    render,
    Edit: "date",
    sort: sort2,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [
      OPERATOR_ON,
      OPERATOR_NOT_ON,
      OPERATOR_BEFORE,
      OPERATOR_AFTER,
      OPERATOR_BEFORE_INC,
      OPERATOR_AFTER_INC,
      OPERATOR_IN_THE_PAST,
      OPERATOR_OVER,
      OPERATOR_BETWEEN
    ],
    validOperators: [
      OPERATOR_ON,
      OPERATOR_NOT_ON,
      OPERATOR_BEFORE,
      OPERATOR_AFTER,
      OPERATOR_BEFORE_INC,
      OPERATOR_AFTER_INC,
      OPERATOR_IN_THE_PAST,
      OPERATOR_OVER,
      OPERATOR_BETWEEN
    ],
    format: format5,
    getValueFormatted: getValueFormatted5,
    validate: {
      required: isValidRequired,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/boolean.mjs
  var import_i18n47 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/field-types/utils/is-valid-required-for-bool.mjs
  function isValidRequiredForBool(item, field) {
    const value = field.getValue({ item });
    return value === true;
  }

  // packages/dataviews/build-module/field-types/boolean.mjs
  function getValueFormatted6({
    item,
    field
  }) {
    const value = field.getValue({ item });
    if (value === true) {
      return (0, import_i18n47.__)("True");
    }
    if (value === false) {
      return (0, import_i18n47.__)("False");
    }
    return "";
  }
  function isValidCustom4(item, field) {
    const value = field.getValue({ item });
    if (![void 0, "", null].includes(value) && ![true, false].includes(value)) {
      return (0, import_i18n47.__)("Value must be true, false, or undefined");
    }
    return null;
  }
  var sort3 = (a2, b2, direction) => {
    const boolA = Boolean(a2);
    const boolB = Boolean(b2);
    if (boolA === boolB) {
      return 0;
    }
    if (direction === "asc") {
      return boolA ? 1 : -1;
    }
    return boolA ? -1 : 1;
  };
  var boolean_default = {
    type: "boolean",
    render,
    Edit: "checkbox",
    sort: sort3,
    validate: {
      required: isValidRequiredForBool,
      elements: isValidElements,
      custom: isValidCustom4
    },
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS, OPERATOR_IS_NOT],
    validOperators: [OPERATOR_IS, OPERATOR_IS_NOT],
    format: {},
    getValueFormatted: getValueFormatted6
  };

  // packages/dataviews/build-module/field-types/media.mjs
  var media_default = {
    type: "media",
    render: () => null,
    Edit: null,
    sort: () => 0,
    enableSorting: false,
    enableGlobalSearch: false,
    defaultOperators: [],
    validOperators: [],
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    // cannot validate any constraint, so
    // the only available validation for the field author
    // would be providing a custom validator.
    validate: {}
  };

  // packages/dataviews/build-module/field-types/array.mjs
  var import_i18n48 = __toESM(require_i18n(), 1);

  // packages/dataviews/build-module/field-types/utils/is-valid-required-for-array.mjs
  function isValidRequiredForArray(item, field) {
    const value = field.getValue({ item });
    return Array.isArray(value) && value.length > 0 && value.every(
      (element) => ![void 0, "", null].includes(element)
    );
  }

  // packages/dataviews/build-module/field-types/array.mjs
  function getValueFormatted7({
    item,
    field
  }) {
    const value = field.getValue({ item });
    const arr = Array.isArray(value) ? value : [];
    return arr.join(", ");
  }
  function render2({ item, field }) {
    return getValueFormatted7({ item, field });
  }
  function isValidCustom5(item, field) {
    const value = field.getValue({ item });
    if (![void 0, "", null].includes(value) && !Array.isArray(value)) {
      return (0, import_i18n48.__)("Value must be an array.");
    }
    if (!value.every((v2) => typeof v2 === "string")) {
      return (0, import_i18n48.__)("Every value must be a string.");
    }
    return null;
  }
  var sort4 = (a2, b2, direction) => {
    const arrA = Array.isArray(a2) ? a2 : [];
    const arrB = Array.isArray(b2) ? b2 : [];
    if (arrA.length !== arrB.length) {
      return direction === "asc" ? arrA.length - arrB.length : arrB.length - arrA.length;
    }
    const joinedA = arrA.join(",");
    const joinedB = arrB.join(",");
    return direction === "asc" ? joinedA.localeCompare(joinedB) : joinedB.localeCompare(joinedA);
  };
  var array_default = {
    type: "array",
    render: render2,
    Edit: "array",
    sort: sort4,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS_ANY, OPERATOR_IS_NONE],
    validOperators: [
      OPERATOR_IS_ANY,
      OPERATOR_IS_NONE,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: {},
    getValueFormatted: getValueFormatted7,
    validate: {
      required: isValidRequiredForArray,
      elements: isValidElements,
      custom: isValidCustom5
    }
  };

  // packages/dataviews/build-module/field-types/password.mjs
  function getValueFormatted8({
    item,
    field
  }) {
    return field.getValue({ item }) ? "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" : "";
  }
  var password_default = {
    type: "password",
    render,
    Edit: "password",
    sort: () => 0,
    // Passwords should not be sortable for security reasons
    enableSorting: false,
    enableGlobalSearch: false,
    defaultOperators: [],
    validOperators: [],
    format: {},
    getValueFormatted: getValueFormatted8,
    validate: {
      required: isValidRequired,
      pattern: isValidPattern,
      minLength: isValidMinLength,
      maxLength: isValidMaxLength,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/telephone.mjs
  var telephone_default = {
    type: "telephone",
    render,
    Edit: "telephone",
    sort: sort_text_default,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS_ANY, OPERATOR_IS_NONE],
    validOperators: [
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_CONTAINS,
      OPERATOR_NOT_CONTAINS,
      OPERATOR_STARTS_WITH,
      // Multiple selection
      OPERATOR_IS_ANY,
      OPERATOR_IS_NONE,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    validate: {
      required: isValidRequired,
      pattern: isValidPattern,
      minLength: isValidMinLength,
      maxLength: isValidMaxLength,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/color.mjs
  var import_i18n49 = __toESM(require_i18n(), 1);
  var import_jsx_runtime97 = __toESM(require_jsx_runtime(), 1);
  function render3({ item, field }) {
    if (field.hasElements) {
      return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(RenderFromElements, { item, field });
    }
    const value = get_value_formatted_default_default({ item, field });
    if (!value || !w(value).isValid()) {
      return value;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
      /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
        "div",
        {
          style: {
            width: "16px",
            height: "16px",
            borderRadius: "50%",
            backgroundColor: value,
            border: "1px solid #ddd",
            flexShrink: 0
          }
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: value })
    ] });
  }
  function isValidCustom6(item, field) {
    const value = field.getValue({ item });
    if (![void 0, "", null].includes(value) && !w(value).isValid()) {
      return (0, import_i18n49.__)("Value must be a valid color.");
    }
    return null;
  }
  var sort5 = (a2, b2, direction) => {
    const colorA = w(a2);
    const colorB = w(b2);
    if (!colorA.isValid() && !colorB.isValid()) {
      return 0;
    }
    if (!colorA.isValid()) {
      return direction === "asc" ? 1 : -1;
    }
    if (!colorB.isValid()) {
      return direction === "asc" ? -1 : 1;
    }
    const hslA = colorA.toHsl();
    const hslB = colorB.toHsl();
    if (hslA.h !== hslB.h) {
      return direction === "asc" ? hslA.h - hslB.h : hslB.h - hslA.h;
    }
    if (hslA.s !== hslB.s) {
      return direction === "asc" ? hslA.s - hslB.s : hslB.s - hslA.s;
    }
    return direction === "asc" ? hslA.l - hslB.l : hslB.l - hslA.l;
  };
  var color_default = {
    type: "color",
    render: render3,
    Edit: "color",
    sort: sort5,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS_ANY, OPERATOR_IS_NONE],
    validOperators: [
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_IS_ANY,
      OPERATOR_IS_NONE
    ],
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    validate: {
      required: isValidRequired,
      elements: isValidElements,
      custom: isValidCustom6
    }
  };

  // packages/dataviews/build-module/field-types/url.mjs
  var url_default = {
    type: "url",
    render,
    Edit: "url",
    sort: sort_text_default,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS_ANY, OPERATOR_IS_NONE],
    validOperators: [
      OPERATOR_IS,
      OPERATOR_IS_NOT,
      OPERATOR_CONTAINS,
      OPERATOR_NOT_CONTAINS,
      OPERATOR_STARTS_WITH,
      // Multiple selection
      OPERATOR_IS_ANY,
      OPERATOR_IS_NONE,
      OPERATOR_IS_ALL,
      OPERATOR_IS_NOT_ALL
    ],
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    validate: {
      required: isValidRequired,
      pattern: isValidPattern,
      minLength: isValidMinLength,
      maxLength: isValidMaxLength,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/no-type.mjs
  var sort6 = (a2, b2, direction) => {
    if (typeof a2 === "number" && typeof b2 === "number") {
      return sort_number_default(a2, b2, direction);
    }
    return sort_text_default(a2, b2, direction);
  };
  var no_type_default = {
    // type: no type for this one
    render,
    Edit: null,
    sort: sort6,
    enableSorting: true,
    enableGlobalSearch: false,
    defaultOperators: [OPERATOR_IS, OPERATOR_IS_NOT],
    validOperators: getAllOperatorNames(),
    format: {},
    getValueFormatted: get_value_formatted_default_default,
    validate: {
      required: isValidRequired,
      elements: isValidElements
    }
  };

  // packages/dataviews/build-module/field-types/utils/get-is-valid.mjs
  function getIsValid(field, fieldType) {
    let required;
    if (field.isValid?.required === true && fieldType.validate.required !== void 0) {
      required = {
        constraint: true,
        validate: fieldType.validate.required
      };
    }
    let elements;
    if ((field.isValid?.elements === true || // elements is enabled unless the field opts-out
    field.isValid?.elements === void 0 && (!!field.elements || !!field.getElements)) && fieldType.validate.elements !== void 0) {
      elements = {
        constraint: true,
        validate: fieldType.validate.elements
      };
    }
    let min;
    if (typeof field.isValid?.min === "number" && fieldType.validate.min !== void 0) {
      min = {
        constraint: field.isValid.min,
        validate: fieldType.validate.min
      };
    }
    let max;
    if (typeof field.isValid?.max === "number" && fieldType.validate.max !== void 0) {
      max = {
        constraint: field.isValid.max,
        validate: fieldType.validate.max
      };
    }
    let minLength;
    if (typeof field.isValid?.minLength === "number" && fieldType.validate.minLength !== void 0) {
      minLength = {
        constraint: field.isValid.minLength,
        validate: fieldType.validate.minLength
      };
    }
    let maxLength;
    if (typeof field.isValid?.maxLength === "number" && fieldType.validate.maxLength !== void 0) {
      maxLength = {
        constraint: field.isValid.maxLength,
        validate: fieldType.validate.maxLength
      };
    }
    let pattern;
    if (field.isValid?.pattern !== void 0 && fieldType.validate.pattern !== void 0) {
      pattern = {
        constraint: field.isValid?.pattern,
        validate: fieldType.validate.pattern
      };
    }
    const custom = field.isValid?.custom ?? fieldType.validate.custom;
    return {
      required,
      elements,
      min,
      max,
      minLength,
      maxLength,
      pattern,
      custom
    };
  }

  // packages/dataviews/build-module/field-types/utils/get-filter.mjs
  function getFilter(fieldType) {
    return fieldType.validOperators.reduce((accumulator, operator) => {
      const operatorObj = getOperatorByName(operator);
      if (operatorObj?.filter) {
        accumulator[operator] = operatorObj.filter;
      }
      return accumulator;
    }, {});
  }

  // packages/dataviews/build-module/field-types/utils/get-format.mjs
  function getFormat(field, fieldType) {
    return {
      ...fieldType.format,
      ...field.format
    };
  }
  var get_format_default = getFormat;

  // packages/dataviews/build-module/field-types/index.mjs
  function getFieldTypeByName(type) {
    const found = [
      email_default,
      integer_default,
      number_default,
      text_default,
      datetime_default,
      date_default,
      boolean_default,
      media_default,
      array_default,
      password_default,
      telephone_default,
      color_default,
      url_default
    ].find((fieldType) => fieldType?.type === type);
    if (!!found) {
      return found;
    }
    return no_type_default;
  }
  function normalizeFields(fields) {
    return fields.map((field) => {
      const fieldType = getFieldTypeByName(field.type);
      const getValue = field.getValue || get_value_from_id_default(field.id);
      const sort7 = function(a2, b2, direction) {
        const aValue = getValue({ item: a2 });
        const bValue = getValue({ item: b2 });
        return field.sort ? field.sort(aValue, bValue, direction) : fieldType.sort(aValue, bValue, direction);
      };
      return {
        id: field.id,
        label: field.label || field.id,
        header: field.header || field.label || field.id,
        description: field.description,
        placeholder: field.placeholder,
        getValue,
        setValue: field.setValue || set_value_from_id_default(field.id),
        elements: field.elements,
        getElements: field.getElements,
        hasElements: hasElements(field),
        isVisible: field.isVisible,
        enableHiding: field.enableHiding ?? true,
        readOnly: field.readOnly ?? false,
        // The type provides defaults for the following props
        type: fieldType.type,
        render: field.render ?? fieldType.render,
        Edit: getControl(field, fieldType.Edit),
        sort: sort7,
        enableSorting: field.enableSorting ?? fieldType.enableSorting,
        enableGlobalSearch: field.enableGlobalSearch ?? fieldType.enableGlobalSearch,
        isValid: getIsValid(field, fieldType),
        filterBy: get_filter_by_default(
          field,
          fieldType.defaultOperators,
          fieldType.validOperators
        ),
        filter: getFilter(fieldType),
        format: get_format_default(field, fieldType),
        getValueFormatted: field.getValueFormatted ?? fieldType.getValueFormatted
      };
    });
  }

  // packages/dataviews/build-module/dataviews-picker/index.mjs
  var import_element54 = __toESM(require_element(), 1);
  var import_compose12 = __toESM(require_compose(), 1);
  var import_jsx_runtime98 = __toESM(require_jsx_runtime(), 1);
  var isItemClickable = () => false;
  var dataViewsPickerLayouts = VIEW_LAYOUTS.filter(
    (viewLayout) => viewLayout.isPicker
  );
  var defaultGetItemId = (item) => item.id;
  var EMPTY_ARRAY5 = [];
  function DefaultUI({
    search = true,
    searchLabel = void 0
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_jsx_runtime98.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
        Stack,
        {
          direction: "row",
          align: "top",
          justify: "space-between",
          className: "dataviews__view-actions",
          gap: "xs",
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
              Stack,
              {
                direction: "row",
                gap: "sm",
                justify: "start",
                className: "dataviews__search",
                children: [
                  search && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(dataviews_search_default, { label: searchLabel }),
                  /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(toggle_default, {})
                ]
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Stack, { direction: "row", gap: "xs", style: { flexShrink: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(dataviews_view_config_default, {}) })
          ]
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(filters_toggled_default, { className: "dataviews-filters__container" }),
      /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(DataViewsLayout, {}),
      /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(DataViewsPickerFooter, {})
    ] });
  }
  function DataViewsPicker({
    view,
    onChangeView,
    fields,
    search = true,
    searchLabel = void 0,
    actions = EMPTY_ARRAY5,
    data,
    getItemId = defaultGetItemId,
    isLoading = false,
    paginationInfo,
    defaultLayouts: defaultLayoutsProperty,
    selection,
    onChangeSelection,
    children,
    config = { perPageSizes: [10, 20, 50, 100] },
    itemListLabel,
    empty
  }) {
    const { infiniteScrollHandler } = paginationInfo;
    const containerRef = (0, import_element54.useRef)(null);
    const [containerWidth, setContainerWidth] = (0, import_element54.useState)(0);
    const resizeObserverRef = (0, import_compose12.useResizeObserver)(
      (resizeObserverEntries) => {
        setContainerWidth(
          resizeObserverEntries[0].borderBoxSize[0].inlineSize
        );
      },
      { box: "border-box" }
    );
    const [openedFilter, setOpenedFilter] = (0, import_element54.useState)(null);
    function setSelectionWithChange(value) {
      const newValue = typeof value === "function" ? value(selection) : value;
      if (onChangeSelection) {
        onChangeSelection(newValue);
      }
    }
    const _fields = (0, import_element54.useMemo)(() => normalizeFields(fields), [fields]);
    const filters = use_filters_default(_fields, view);
    const hasPrimaryOrLockedFilters = (0, import_element54.useMemo)(
      () => (filters || []).some(
        (filter) => filter.isPrimary || filter.isLocked
      ),
      [filters]
    );
    const [isShowingFilter, setIsShowingFilter] = (0, import_element54.useState)(
      hasPrimaryOrLockedFilters
    );
    (0, import_element54.useEffect)(() => {
      if (hasPrimaryOrLockedFilters && !isShowingFilter) {
        setIsShowingFilter(true);
      }
    }, [hasPrimaryOrLockedFilters, isShowingFilter]);
    (0, import_element54.useEffect)(() => {
      if (!view.infiniteScrollEnabled || !containerRef.current) {
        return;
      }
      const handleScroll = (0, import_compose12.throttle)((event) => {
        const target = event.target;
        const scrollTop = target.scrollTop;
        const scrollHeight = target.scrollHeight;
        const clientHeight = target.clientHeight;
        if (scrollTop + clientHeight >= scrollHeight - 100) {
          infiniteScrollHandler?.();
        }
      }, 100);
      const container = containerRef.current;
      container.addEventListener("scroll", handleScroll);
      return () => {
        container.removeEventListener("scroll", handleScroll);
        handleScroll.cancel();
      };
    }, [infiniteScrollHandler, view.infiniteScrollEnabled]);
    const defaultLayouts = (0, import_element54.useMemo)(
      () => Object.fromEntries(
        Object.entries(defaultLayoutsProperty).filter(
          ([layoutType]) => {
            return dataViewsPickerLayouts.some(
              (viewLayout) => viewLayout.type === layoutType
            );
          }
        )
      ),
      [defaultLayoutsProperty]
    );
    if (!defaultLayouts[view.type]) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
      dataviews_context_default.Provider,
      {
        value: {
          view,
          onChangeView,
          fields: _fields,
          actions,
          data,
          isLoading,
          paginationInfo,
          isItemClickable,
          selection,
          onChangeSelection: setSelectionWithChange,
          openedFilter,
          setOpenedFilter,
          getItemId,
          containerWidth,
          containerRef,
          resizeObserverRef,
          defaultLayouts,
          filters,
          isShowingFilter,
          setIsShowingFilter,
          config,
          itemListLabel,
          empty,
          hasInitiallyLoaded: true,
          hasInfiniteScrollHandler: !!infiniteScrollHandler
        },
        children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "dataviews-picker-wrapper", ref: containerRef, children: children ?? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(DefaultUI, { search, searchLabel }) })
      }
    );
  }
  var DataViewsPickerSubComponents = DataViewsPicker;
  DataViewsPickerSubComponents.BulkActionToolbar = DataViewsPickerFooter;
  DataViewsPickerSubComponents.Filters = filters_default;
  DataViewsPickerSubComponents.FiltersToggled = filters_toggled_default;
  DataViewsPickerSubComponents.FiltersToggle = toggle_default;
  DataViewsPickerSubComponents.Layout = DataViewsLayout;
  DataViewsPickerSubComponents.LayoutSwitcher = ViewTypeMenu;
  DataViewsPickerSubComponents.Pagination = DataViewsPagination;
  DataViewsPickerSubComponents.Search = dataviews_search_default;
  DataViewsPickerSubComponents.ViewConfig = DataviewsViewConfigDropdown;
  var dataviews_picker_default = DataViewsPickerSubComponents;

  // packages/media-fields/build-module/alt_text/index.mjs
  var import_i18n50 = __toESM(require_i18n(), 1);
  var import_components47 = __toESM(require_components(), 1);
  var import_jsx_runtime99 = __toESM(require_jsx_runtime(), 1);
  var altTextField = {
    id: "alt_text",
    type: "text",
    label: (0, import_i18n50.__)("Alt text"),
    isVisible: (item) => item?.media_type === "image",
    render: ({ item }) => item?.alt_text || "-",
    Edit: ({ field, onChange, data }) => {
      return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
        import_components47.TextareaControl,
        {
          label: field.label,
          value: data.alt_text || "",
          onChange: (value) => onChange({ alt_text: value }),
          rows: 2
        }
      );
    },
    enableSorting: false,
    filterBy: false
  };
  var alt_text_default = altTextField;

  // packages/media-fields/build-module/attached_to/index.mjs
  var import_i18n53 = __toESM(require_i18n(), 1);

  // packages/media-fields/build-module/attached_to/view.mjs
  var import_element55 = __toESM(require_element(), 1);
  var import_i18n51 = __toESM(require_i18n(), 1);

  // packages/media-fields/build-module/utils/get-rendered-content.mjs
  function getRenderedContent(content) {
    if (!content) {
      return "";
    }
    if (typeof content === "string") {
      return content;
    }
    if (typeof content === "object") {
      return content.rendered || content.raw || "";
    }
    return "";
  }

  // packages/media-fields/build-module/attached_to/view.mjs
  var import_jsx_runtime100 = __toESM(require_jsx_runtime(), 1);
  function MediaAttachedToView({
    item
  }) {
    const [attachedPostTitle, setAttachedPostTitle] = (0, import_element55.useState)(null);
    const parentId = item.post;
    const embeddedPostId = item._embedded?.["wp:attached-to"]?.[0]?.id;
    const embeddedPostTitle = item._embedded?.["wp:attached-to"]?.[0]?.title;
    (0, import_element55.useEffect)(() => {
      if (!!parentId && parentId === embeddedPostId) {
        setAttachedPostTitle(
          getRenderedContent(embeddedPostTitle) || embeddedPostId?.toString() || ""
        );
      }
      if (!parentId) {
        setAttachedPostTitle((0, import_i18n51.__)("(Unattached)"));
      }
    }, [parentId, embeddedPostId, embeddedPostTitle]);
    return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_jsx_runtime100.Fragment, { children: attachedPostTitle });
  }

  // packages/media-fields/build-module/attached_to/edit.mjs
  var import_core_data = __toESM(require_core_data(), 1);
  var import_components48 = __toESM(require_components(), 1);
  var import_i18n52 = __toESM(require_i18n(), 1);
  var import_element56 = __toESM(require_element(), 1);
  var import_compose13 = __toESM(require_compose(), 1);
  var import_data6 = __toESM(require_data(), 1);
  var import_jsx_runtime101 = __toESM(require_jsx_runtime(), 1);
  function MediaAttachedToEdit({
    data,
    onChange
  }) {
    const defaultPost = !!data.post && !!data?._embedded?.["wp:attached-to"]?.[0] ? [
      {
        label: getRenderedContent(
          data._embedded?.["wp:attached-to"]?.[0]?.title
        ),
        value: data.post.toString()
      }
    ] : [];
    const [options, setOptions] = (0, import_element56.useState)(defaultPost);
    const [searchResults, setSearchResults] = (0, import_element56.useState)(
      []
    );
    const [isLoading, setIsLoading] = (0, import_element56.useState)(false);
    const [value, setValue] = (0, import_element56.useState)(
      data?.post?.toString() ?? null
    );
    const postTypes = (0, import_data6.useSelect)(
      (select) => select(import_core_data.store).getPostTypes(),
      []
    );
    const handleDetach = () => {
      onChange({
        post: 0,
        _embedded: { ...data?._embedded, "wp:attached-to": void 0 }
      });
      setOptions([]);
    };
    const onValueChange = async (filterValue) => {
      setIsLoading(true);
      const results = await (0, import_core_data.__experimentalFetchLinkSuggestions)(
        filterValue,
        /*
         * @TODO `fetchLinkSuggestions()` should accept `perPage` as an option argument.
         * `isInitialSuggestions` limits the result to 3, otherwise it's hardcoded to 20.
         */
        { type: "post", isInitialSuggestions: true },
        {}
      );
      setSearchResults(results);
      const mappedSuggestions = results.map((result) => {
        return {
          label: result.title,
          value: result.id.toString()
        };
      });
      setOptions(mappedSuggestions);
      setIsLoading(false);
    };
    const handleSelectOption = (selectedPostId) => {
      if (!selectedPostId) {
        handleDetach();
        return;
      }
      setValue(selectedPostId);
      if (selectedPostId) {
        const selectedPost = searchResults.find(
          (result) => result.id === Number(selectedPostId)
        );
        if (selectedPost && postTypes) {
          const postType = postTypes.find(
            (_postType) => _postType.slug === selectedPost?.type
          );
          const attachedTo = {
            ...postType && { type: postType.slug },
            id: Number(selectedPostId),
            title: {
              raw: selectedPost.title,
              rendered: selectedPost.title
            }
          };
          onChange({
            post: Number(selectedPostId),
            _embedded: {
              ...data?._embedded,
              "wp:attached-to": [attachedTo]
            }
          });
        }
      }
    };
    const help = !!data.post ? (0, import_element56.createInterpolateElement)(
      (0, import_i18n52.__)(
        "Search for a post or page to attach this media to or <button>detach current</button>."
      ),
      {
        button: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
          import_components48.Button,
          {
            __next40pxDefaultSize: true,
            onClick: handleDetach,
            variant: "link",
            accessibleWhenDisabled: true
          }
        )
      }
    ) : (0, import_i18n52.__)("Search for a post or page to attach this media to.");
    return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
      import_components48.ComboboxControl,
      {
        className: "dataviews-media-field__attached-to",
        __next40pxDefaultSize: true,
        isLoading,
        label: (0, import_i18n52.__)("Attached to"),
        help,
        value,
        options,
        onFilterValueChange: (0, import_compose13.debounce)(
          (filterValue) => onValueChange(filterValue),
          300
        ),
        onChange: handleSelectOption,
        hideLabelFromVision: true
      }
    );
  }

  // packages/media-fields/build-module/attached_to/index.mjs
  var attachedToField = {
    id: "attached_to",
    type: "text",
    label: (0, import_i18n53.__)("Attached to"),
    Edit: MediaAttachedToEdit,
    render: MediaAttachedToView,
    enableSorting: false,
    filterBy: false
  };
  var attached_to_default = attachedToField;

  // packages/media-fields/build-module/author/index.mjs
  var import_i18n55 = __toESM(require_i18n(), 1);
  var import_data7 = __toESM(require_data(), 1);
  var import_core_data2 = __toESM(require_core_data(), 1);

  // packages/media-fields/build-module/author/view.mjs
  var import_i18n54 = __toESM(require_i18n(), 1);
  var import_element57 = __toESM(require_element(), 1);
  var import_components49 = __toESM(require_components(), 1);
  var import_jsx_runtime102 = __toESM(require_jsx_runtime(), 1);
  function AuthorView({
    item
  }) {
    const author = item?._embedded?.author?.[0];
    const text = author?.name;
    const imageUrl = author?.avatar_urls?.[48];
    const [loadingState, setLoadingState] = (0, import_element57.useState)("loading");
    (0, import_element57.useEffect)(() => {
      setLoadingState("loading");
    }, [imageUrl]);
    const imgRef = (0, import_element57.useCallback)((img) => {
      if (img?.complete) {
        setLoadingState("instant");
      }
    }, []);
    const handleLoad = () => {
      if (loadingState === "loading") {
        setLoadingState("loaded");
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(import_components49.__experimentalHStack, { alignment: "left", spacing: 0, children: [
      !!imageUrl && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
        "div",
        {
          className: clsx_default("media-author-field__avatar", {
            "is-loading": loadingState === "loading",
            "is-loaded": loadingState === "loaded"
          }),
          children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
            "img",
            {
              ref: imgRef,
              onLoad: handleLoad,
              alt: (0, import_i18n54.__)("Author avatar"),
              src: imageUrl
            }
          )
        }
      ),
      !imageUrl && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "media-author-field__icon", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_components49.Icon, { icon: comment_author_avatar_default }) }),
      /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("span", { className: "media-author-field__name", children: text })
    ] });
  }

  // packages/media-fields/build-module/author/index.mjs
  var authorField = {
    label: (0, import_i18n55.__)("Author"),
    id: "author",
    type: "integer",
    getElements: async () => {
      const authors = await (0, import_data7.resolveSelect)(import_core_data2.store).getEntityRecords(
        "root",
        "user",
        {
          per_page: -1,
          who: "authors",
          _fields: "id,name",
          context: "view"
        }
      ) ?? [];
      return authors.map(({ id, name }) => ({
        value: id,
        label: name
      }));
    },
    render: AuthorView,
    sort: (a2, b2, direction) => {
      const nameA = a2._embedded?.author?.[0]?.name || "";
      const nameB = b2._embedded?.author?.[0]?.name || "";
      return direction === "asc" ? nameA.localeCompare(nameB) : nameB.localeCompare(nameA);
    },
    filterBy: {
      operators: ["isAny", "isNone"]
    },
    readOnly: true
  };
  var author_default = authorField;

  // packages/media-fields/build-module/caption/index.mjs
  var import_i18n56 = __toESM(require_i18n(), 1);
  var import_components50 = __toESM(require_components(), 1);

  // packages/media-fields/build-module/utils/get-raw-content.mjs
  function getRawContent(content) {
    if (!content) {
      return "";
    }
    if (typeof content === "string") {
      return content;
    }
    if (typeof content === "object" && "raw" in content) {
      return content.raw || "";
    }
    return "";
  }

  // packages/media-fields/build-module/caption/index.mjs
  var import_jsx_runtime103 = __toESM(require_jsx_runtime(), 1);
  var captionField = {
    id: "caption",
    type: "text",
    label: (0, import_i18n56.__)("Caption"),
    getValue: ({ item }) => getRawContent(item?.caption),
    render: ({ item }) => getRawContent(item?.caption) || "-",
    Edit: ({ field, onChange, data }) => {
      return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
        import_components50.TextareaControl,
        {
          label: field.label,
          value: getRawContent(data.caption) || "",
          onChange: (value) => onChange({ caption: value }),
          rows: 2
        }
      );
    },
    enableSorting: false,
    filterBy: false
  };
  var caption_default = captionField;

  // packages/media-fields/build-module/date_added/index.mjs
  var import_i18n57 = __toESM(require_i18n(), 1);
  var import_date9 = __toESM(require_date(), 1);
  var dateAddedField = {
    id: "date",
    type: "datetime",
    label: (0, import_i18n57.__)("Date added"),
    filterBy: {
      operators: ["before", "after"]
    },
    format: {
      datetime: (0, import_date9.getSettings)().formats.datetimeAbbreviated
    },
    readOnly: true
  };
  var date_added_default = dateAddedField;

  // packages/media-fields/build-module/date_modified/index.mjs
  var import_i18n58 = __toESM(require_i18n(), 1);
  var import_date10 = __toESM(require_date(), 1);
  var dateModifiedField = {
    id: "modified",
    type: "datetime",
    label: (0, import_i18n58.__)("Date modified"),
    filterBy: {
      operators: ["before", "after"]
    },
    format: {
      datetime: (0, import_date10.getSettings)().formats.datetimeAbbreviated
    },
    readOnly: true
  };
  var date_modified_default = dateModifiedField;

  // packages/media-fields/build-module/description/index.mjs
  var import_i18n59 = __toESM(require_i18n(), 1);
  var import_components51 = __toESM(require_components(), 1);
  var import_jsx_runtime104 = __toESM(require_jsx_runtime(), 1);
  var descriptionField = {
    id: "description",
    type: "text",
    label: (0, import_i18n59.__)("Description"),
    getValue: ({ item }) => getRawContent(item?.description),
    render: ({ item }) => /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { children: getRawContent(item?.description) || "-" }),
    Edit: ({ field, onChange, data }) => {
      return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
        import_components51.TextareaControl,
        {
          label: field.label,
          value: getRawContent(data.description) || "",
          onChange: (value) => onChange({ description: value }),
          rows: 5
        }
      );
    },
    enableSorting: false,
    filterBy: false
  };
  var description_default = descriptionField;

  // packages/media-fields/build-module/filename/index.mjs
  var import_i18n60 = __toESM(require_i18n(), 1);
  var import_url4 = __toESM(require_url(), 1);

  // packages/media-fields/build-module/filename/view.mjs
  var import_components52 = __toESM(require_components(), 1);
  var import_element58 = __toESM(require_element(), 1);
  var import_url3 = __toESM(require_url(), 1);
  var import_jsx_runtime105 = __toESM(require_jsx_runtime(), 1);
  var TRUNCATE_LENGTH = 15;
  function FileNameView({
    item
  }) {
    const fileName = (0, import_element58.useMemo)(
      () => item?.source_url ? (0, import_url3.getFilename)(item.source_url) : null,
      [item?.source_url]
    );
    if (!fileName) {
      return "";
    }
    return fileName.length > TRUNCATE_LENGTH ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_components52.Tooltip, { text: fileName, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_components52.__experimentalTruncate, { limit: TRUNCATE_LENGTH, ellipsizeMode: "tail", children: fileName }) }) : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_jsx_runtime105.Fragment, { children: fileName });
  }

  // packages/media-fields/build-module/filename/index.mjs
  var filenameField = {
    id: "filename",
    type: "text",
    label: (0, import_i18n60.__)("File name"),
    getValue: ({ item }) => (0, import_url4.getFilename)(item?.source_url || ""),
    render: FileNameView,
    enableSorting: false,
    filterBy: false,
    readOnly: true
  };
  var filename_default = filenameField;

  // packages/media-fields/build-module/filesize/index.mjs
  var import_i18n61 = __toESM(require_i18n(), 1);
  var KB_IN_BYTES = 1024;
  var MB_IN_BYTES = 1024 * KB_IN_BYTES;
  var GB_IN_BYTES = 1024 * MB_IN_BYTES;
  var TB_IN_BYTES = 1024 * GB_IN_BYTES;
  var PB_IN_BYTES = 1024 * TB_IN_BYTES;
  var EB_IN_BYTES = 1024 * PB_IN_BYTES;
  var ZB_IN_BYTES = 1024 * EB_IN_BYTES;
  var YB_IN_BYTES = 1024 * ZB_IN_BYTES;
  function getBytesString(bytes, unitSymbol, decimals = 2) {
    return (0, import_i18n61.sprintf)(
      // translators: 1: Actual bytes of a file. 2: The unit symbol (e.g. MB).
      (0, import_i18n61._x)("%1$s %2$s", "file size"),
      bytes.toLocaleString(void 0, {
        minimumFractionDigits: 0,
        maximumFractionDigits: decimals
      }),
      unitSymbol
    );
  }
  function formatFileSize(bytes, decimals = 2) {
    if (bytes === 0) {
      return getBytesString(0, (0, import_i18n61._x)("B", "unit symbol"), decimals);
    }
    const quant = {
      /* translators: Unit symbol for yottabyte. */
      [(0, import_i18n61._x)("YB", "unit symbol")]: YB_IN_BYTES,
      /* translators: Unit symbol for zettabyte. */
      [(0, import_i18n61._x)("ZB", "unit symbol")]: ZB_IN_BYTES,
      /* translators: Unit symbol for exabyte. */
      [(0, import_i18n61._x)("EB", "unit symbol")]: EB_IN_BYTES,
      /* translators: Unit symbol for petabyte. */
      [(0, import_i18n61._x)("PB", "unit symbol")]: PB_IN_BYTES,
      /* translators: Unit symbol for terabyte. */
      [(0, import_i18n61._x)("TB", "unit symbol")]: TB_IN_BYTES,
      /* translators: Unit symbol for gigabyte. */
      [(0, import_i18n61._x)("GB", "unit symbol")]: GB_IN_BYTES,
      /* translators: Unit symbol for megabyte. */
      [(0, import_i18n61._x)("MB", "unit symbol")]: MB_IN_BYTES,
      /* translators: Unit symbol for kilobyte. */
      [(0, import_i18n61._x)("KB", "unit symbol")]: KB_IN_BYTES,
      /* translators: Unit symbol for byte. */
      [(0, import_i18n61._x)("B", "unit symbol")]: 1
    };
    for (const [unit, mag] of Object.entries(quant)) {
      if (bytes >= mag) {
        return getBytesString(bytes / mag, unit, decimals);
      }
    }
    return "";
  }
  var filesizeField = {
    id: "filesize",
    type: "text",
    label: (0, import_i18n61.__)("File size"),
    getValue: ({ item }) => item?.media_details?.filesize ? formatFileSize(item?.media_details?.filesize) : "",
    isVisible: (item) => {
      return !!item?.media_details?.filesize;
    },
    enableSorting: false,
    filterBy: false,
    readOnly: true
  };
  var filesize_default = filesizeField;

  // packages/media-fields/build-module/media_dimensions/index.mjs
  var import_i18n62 = __toESM(require_i18n(), 1);
  var mediaDimensionsField = {
    id: "media_dimensions",
    type: "text",
    label: (0, import_i18n62.__)("Dimensions"),
    getValue: ({ item }) => item?.media_details?.width && item?.media_details?.height ? (0, import_i18n62.sprintf)(
      // translators: 1: Width. 2: Height.
      (0, import_i18n62._x)("%1$s \xD7 %2$s", "image dimensions"),
      item?.media_details?.width?.toString(),
      item?.media_details?.height?.toString()
    ) : "",
    isVisible: (item) => {
      return !!(item?.media_details?.width && item?.media_details?.height);
    },
    enableSorting: false,
    filterBy: false,
    readOnly: true
  };
  var media_dimensions_default = mediaDimensionsField;

  // packages/media-fields/build-module/media_thumbnail/index.mjs
  var import_i18n64 = __toESM(require_i18n(), 1);

  // packages/media-fields/build-module/media_thumbnail/view.mjs
  var import_data8 = __toESM(require_data(), 1);
  var import_core_data3 = __toESM(require_core_data(), 1);
  var import_components53 = __toESM(require_components(), 1);
  var import_element59 = __toESM(require_element(), 1);
  var import_url5 = __toESM(require_url(), 1);

  // packages/media-fields/build-module/utils/get-media-type-from-mime-type.mjs
  var import_i18n63 = __toESM(require_i18n(), 1);
  function getMediaTypeFromMimeType(mimeType) {
    if (mimeType.startsWith("image/")) {
      return {
        type: "image",
        label: (0, import_i18n63.__)("Image"),
        icon: image_default
      };
    }
    if (mimeType.startsWith("video/")) {
      return {
        type: "video",
        label: (0, import_i18n63.__)("Video"),
        icon: video_default
      };
    }
    if (mimeType.startsWith("audio/")) {
      return {
        type: "audio",
        label: (0, import_i18n63.__)("Audio"),
        icon: audio_default
      };
    }
    return {
      type: "application",
      label: (0, import_i18n63.__)("Application"),
      icon: file_default
    };
  }

  // packages/media-fields/build-module/media_thumbnail/view.mjs
  var import_jsx_runtime106 = __toESM(require_jsx_runtime(), 1);
  function FallbackView({
    item,
    filename
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "dataviews-media-field__media-thumbnail", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
      import_components53.__experimentalVStack,
      {
        justify: "center",
        alignment: "center",
        className: "dataviews-media-field__media-thumbnail__stack",
        spacing: 0,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
            import_components53.Icon,
            {
              className: "dataviews-media-field__media-thumbnail--icon",
              icon: getMediaTypeFromMimeType(item.mime_type).icon,
              size: 24
            }
          ),
          !!filename && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "dataviews-media-field__media-thumbnail__filename", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_components53.__experimentalTruncate, { className: "dataviews-media-field__media-thumbnail__filename__truncate", children: filename }) })
        ]
      }
    ) });
  }
  function MediaThumbnailView({
    item,
    config
  }) {
    const [imageError, setImageError] = (0, import_element59.useState)(false);
    const _featuredMedia = (0, import_data8.useSelect)(
      (select) => {
        if (!item.featured_media) {
          return;
        }
        return select(import_core_data3.store).getEntityRecord(
          "postType",
          "attachment",
          item.featured_media
        );
      },
      [item.featured_media]
    );
    const featuredMedia = item.featured_media ? _featuredMedia : item;
    if (!featuredMedia) {
      return null;
    }
    const filename = (0, import_url5.getFilename)(featuredMedia.source_url || "");
    if (imageError || getMediaTypeFromMimeType(featuredMedia.mime_type).type !== "image") {
      return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(FallbackView, { item: featuredMedia, filename: filename || "" });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "dataviews-media-field__media-thumbnail", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
      "img",
      {
        className: "dataviews-media-field__media-thumbnail--image",
        src: featuredMedia.source_url,
        srcSet: featuredMedia?.media_details?.sizes ? Object.values(
          featuredMedia.media_details.sizes
        ).map(
          (size) => `${size.source_url} ${size.width}w`
        ).join(", ") : void 0,
        sizes: config?.sizes || "100vw",
        alt: featuredMedia.alt_text || featuredMedia.title.raw,
        onError: () => setImageError(true)
      }
    ) });
  }

  // packages/media-fields/build-module/media_thumbnail/index.mjs
  var mediaThumbnailField = {
    id: "media_thumbnail",
    type: "media",
    label: (0, import_i18n64.__)("Thumbnail"),
    render: MediaThumbnailView,
    enableSorting: false,
    filterBy: false
  };
  var media_thumbnail_default = mediaThumbnailField;

  // packages/media-fields/build-module/mime_type/index.mjs
  var import_i18n65 = __toESM(require_i18n(), 1);
  var mimeTypeField = {
    id: "mime_type",
    type: "text",
    label: (0, import_i18n65.__)("File type"),
    getValue: ({ item }) => item?.mime_type || "",
    render: ({ item }) => item?.mime_type || "-",
    // Disable sorting until REST API support for ordering my `mime_type` is added.
    // See: https://core.trac.wordpress.org/ticket/64073
    enableSorting: false,
    filterBy: false,
    readOnly: true
  };
  var mime_type_default = mimeTypeField;

  // packages/media-utils/build-module/components/media-upload-modal/index.mjs
  var import_notices = __toESM(require_notices(), 1);
  var import_blob2 = __toESM(require_blob(), 1);

  // packages/media-utils/build-module/lock-unlock.mjs
  var import_private_apis2 = __toESM(require_private_apis(), 1);
  var { lock: lock2, unlock: unlock2 } = (0, import_private_apis2.__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/media-utils"
  );

  // packages/media-utils/build-module/components/media-upload-modal/index.mjs
  var import_jsx_runtime107 = __toESM(require_jsx_runtime(), 1);
  var { useEntityRecordsWithPermissions } = unlock2(import_core_data4.privateApis);
  var LAYOUT_PICKER_GRID2 = "pickerGrid";
  var LAYOUT_PICKER_TABLE2 = "pickerTable";
  var NOTICES_CONTEXT = "media-modal";
  var NOTICE_ID_UPLOAD_PROGRESS = "media-modal-upload-progress";
  function MediaUploadModal({
    allowedTypes,
    multiple = false,
    value,
    onSelect,
    onClose,
    onUpload,
    title = (0, import_i18n66.__)("Select Media"),
    isOpen,
    isDismissible = true,
    modalClass,
    search = true,
    searchLabel = (0, import_i18n66.__)("Search media")
  }) {
    const [selection, setSelection] = (0, import_element60.useState)(() => {
      if (!value) {
        return [];
      }
      return Array.isArray(value) ? value.map(String) : [String(value)];
    });
    const { createSuccessNotice, createErrorNotice, createInfoNotice } = (0, import_data9.useDispatch)(import_notices.store);
    const { invalidateResolution } = (0, import_data9.useDispatch)(import_core_data4.store);
    const [view, setView] = (0, import_element60.useState)(() => ({
      type: LAYOUT_PICKER_GRID2,
      fields: [],
      showTitle: false,
      titleField: "title",
      mediaField: "media_thumbnail",
      search: "",
      page: 1,
      perPage: 20,
      filters: [],
      layout: {
        previewSize: 170
      }
    }));
    const queryArgs = (0, import_element60.useMemo)(() => {
      const filters = {};
      view.filters?.forEach((filter) => {
        if (filter.field === "media_type") {
          filters.media_type = filter.value;
        }
        if (filter.field === "author") {
          if (filter.operator === "isAny") {
            filters.author = filter.value;
          } else if (filter.operator === "isNone") {
            filters.author_exclude = filter.value;
          }
        }
        if (filter.field === "date" || filter.field === "modified") {
          if (filter.operator === "before") {
            filters.before = filter.value;
          } else if (filter.operator === "after") {
            filters.after = filter.value;
          }
        }
        if (filter.field === "mime_type") {
          filters.mime_type = filter.value;
        }
      });
      if (!filters.media_type) {
        filters.media_type = allowedTypes?.includes("*") ? void 0 : allowedTypes;
      }
      return {
        per_page: view.perPage || 20,
        page: view.page || 1,
        status: "inherit",
        order: view.sort?.direction,
        orderby: view.sort?.field,
        search: view.search,
        _embed: "author,wp:attached-to",
        ...filters
      };
    }, [view, allowedTypes]);
    const {
      records: mediaRecords,
      isResolving: isLoading,
      totalItems,
      totalPages
    } = useEntityRecordsWithPermissions("postType", "attachment", queryArgs);
    const fields = (0, import_element60.useMemo)(
      () => [
        // Media field definitions from @wordpress/media-fields
        // Cast is safe because RestAttachment has the same properties as Attachment
        {
          ...media_thumbnail_default,
          enableHiding: false
          // Within the modal, the thumbnail should always be shown.
        },
        {
          id: "title",
          type: "text",
          label: (0, import_i18n66.__)("Title"),
          getValue: ({ item }) => {
            const titleValue = item.title.raw || item.title.rendered;
            return titleValue || (0, import_i18n66.__)("(no title)");
          }
        },
        alt_text_default,
        caption_default,
        description_default,
        date_added_default,
        date_modified_default,
        author_default,
        filename_default,
        filesize_default,
        media_dimensions_default,
        mime_type_default,
        attached_to_default
      ],
      []
    );
    const actions = (0, import_element60.useMemo)(
      () => [
        {
          id: "select",
          label: multiple ? (0, import_i18n66.__)("Select") : (0, import_i18n66.__)("Select"),
          isPrimary: true,
          supportsBulk: multiple,
          async callback() {
            if (selection.length === 0) {
              return;
            }
            const selectedPostsQuery = {
              include: selection,
              per_page: -1
            };
            const selectedPosts = await (0, import_data9.resolveSelect)(
              import_core_data4.store
            ).getEntityRecords(
              "postType",
              "attachment",
              selectedPostsQuery
            );
            const transformedPosts = (selectedPosts ?? []).map(transformAttachment).filter(Boolean);
            const selectedItems = multiple ? transformedPosts : transformedPosts?.[0];
            onSelect(selectedItems);
          }
        }
      ],
      [multiple, onSelect, selection]
    );
    const handleModalClose = (0, import_element60.useCallback)(() => {
      onClose?.();
    }, [onClose]);
    const handleUpload = onUpload || uploadMedia;
    const handleUploadComplete = (0, import_element60.useCallback)(
      (attachments) => {
        const allComplete = attachments.every(
          (attachment) => attachment.id && attachment.url && !(0, import_blob2.isBlobURL)(attachment.url)
        );
        if (allComplete && attachments.length > 0) {
          createSuccessNotice(
            (0, import_i18n66.sprintf)(
              // translators: %s: number of files
              (0, import_i18n66._n)(
                "Uploaded %s file",
                "Uploaded %s files",
                attachments.length
              ),
              attachments.length.toLocaleString()
            ),
            {
              type: "snackbar",
              context: NOTICES_CONTEXT,
              id: NOTICE_ID_UPLOAD_PROGRESS
            }
          );
          const uploadedIds = attachments.map((attachment) => String(attachment.id)).filter(Boolean);
          if (multiple) {
            setSelection((prev) => [...prev, ...uploadedIds]);
          } else {
            setSelection(uploadedIds.slice(0, 1));
          }
          invalidateResolution("getEntityRecords", [
            "postType",
            "attachment",
            queryArgs
          ]);
        }
      },
      [createSuccessNotice, invalidateResolution, queryArgs, multiple]
    );
    const handleUploadError = (0, import_element60.useCallback)(
      (error) => {
        createErrorNotice(error.message, {
          type: "snackbar",
          context: NOTICES_CONTEXT,
          id: NOTICE_ID_UPLOAD_PROGRESS
        });
      },
      [createErrorNotice]
    );
    const handleFileSelect = (0, import_element60.useCallback)(
      (event) => {
        const files = event.target.files;
        if (files && files.length > 0) {
          const filesArray = Array.from(files);
          createInfoNotice(
            (0, import_i18n66.sprintf)(
              // translators: %s: number of files
              (0, import_i18n66._n)(
                "Uploading %s file",
                "Uploading %s files",
                filesArray.length
              ),
              filesArray.length.toLocaleString()
            ),
            {
              type: "snackbar",
              context: NOTICES_CONTEXT,
              id: NOTICE_ID_UPLOAD_PROGRESS,
              explicitDismiss: true
            }
          );
          handleUpload({
            allowedTypes,
            filesList: filesArray,
            onFileChange: handleUploadComplete,
            onError: handleUploadError
          });
        }
      },
      [
        allowedTypes,
        handleUpload,
        createInfoNotice,
        handleUploadComplete,
        handleUploadError
      ]
    );
    const paginationInfo = (0, import_element60.useMemo)(
      () => ({
        totalItems,
        totalPages
      }),
      [totalItems, totalPages]
    );
    const defaultLayouts = (0, import_element60.useMemo)(
      () => ({
        [LAYOUT_PICKER_GRID2]: {
          fields: [],
          showTitle: false
        },
        [LAYOUT_PICKER_TABLE2]: {
          fields: [
            "filename",
            "filesize",
            "media_dimensions",
            "author",
            "date"
          ],
          showTitle: true
        }
      }),
      []
    );
    const acceptTypes = (0, import_element60.useMemo)(() => {
      if (allowedTypes?.includes("*")) {
        return void 0;
      }
      return allowedTypes?.join(",");
    }, [allowedTypes]);
    if (!isOpen) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
      import_components54.Modal,
      {
        title,
        onRequestClose: handleModalClose,
        isDismissible,
        className: modalClass,
        overlayClassName: "media-upload-modal",
        size: "fill",
        headerActions: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
          import_components54.FormFileUpload,
          {
            accept: acceptTypes,
            multiple: true,
            onChange: handleFileSelect,
            __next40pxDefaultSize: true,
            render: ({ openFileDialog }) => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
              import_components54.Button,
              {
                onClick: openFileDialog,
                icon: upload_default,
                __next40pxDefaultSize: true,
                children: (0, import_i18n66.__)("Upload media")
              }
            )
          }
        ),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
            import_components54.DropZone,
            {
              onFilesDrop: (files) => {
                let filteredFiles = files;
                if (allowedTypes && !allowedTypes.includes("*")) {
                  filteredFiles = files.filter(
                    (file) => allowedTypes.some((allowedType) => {
                      return file.type === allowedType || file.type.startsWith(
                        allowedType.replace("*", "")
                      );
                    })
                  );
                }
                if (filteredFiles.length > 0) {
                  createInfoNotice(
                    (0, import_i18n66.sprintf)(
                      // translators: %s: number of files
                      (0, import_i18n66._n)(
                        "Uploading %s file",
                        "Uploading %s files",
                        filteredFiles.length
                      ),
                      filteredFiles.length.toLocaleString()
                    ),
                    {
                      type: "snackbar",
                      context: NOTICES_CONTEXT,
                      id: NOTICE_ID_UPLOAD_PROGRESS,
                      explicitDismiss: true
                    }
                  );
                  handleUpload({
                    allowedTypes,
                    filesList: filteredFiles,
                    onFileChange: handleUploadComplete,
                    onError: handleUploadError
                  });
                }
              },
              label: (0, import_i18n66.__)("Drop files to upload")
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
            dataviews_picker_default,
            {
              data: mediaRecords || [],
              fields,
              view,
              onChangeView: setView,
              actions,
              selection,
              onChangeSelection: setSelection,
              isLoading,
              paginationInfo,
              defaultLayouts,
              getItemId: (item) => String(item.id),
              search,
              searchLabel,
              itemListLabel: (0, import_i18n66.__)("Media items")
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
            import_notices.SnackbarNotices,
            {
              className: "media-upload-modal__snackbar",
              context: NOTICES_CONTEXT
            }
          )
        ]
      }
    );
  }

  // packages/media-utils/build-module/private-apis.mjs
  var privateApis12 = {};
  lock2(privateApis12, {
    sideloadMedia,
    MediaUploadModal
  });
  return __toCommonJS(index_exports);
})();
/*! Bundled license information:

use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
  (**
   * @license React
   * use-sync-external-store-shim.development.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)
*/
                                                                                                                                                                                                                                                                                                                                                                          dist/media-utils.min.js                                                                             0000644                 00000733154 15212564022 0011060 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).mediaUtils=(()=>{var Qb=Object.create;var Ci=Object.defineProperty;var Jb=Object.getOwnPropertyDescriptor;var ex=Object.getOwnPropertyNames;var tx=Object.getPrototypeOf,rx=Object.prototype.hasOwnProperty;var Oe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ox=(e,t)=>{for(var r in t)Ci(e,r,{get:t[r],enumerable:!0})},md=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ex(t))!rx.call(e,n)&&n!==r&&Ci(e,n,{get:()=>t[n],enumerable:!(o=Jb(t,n))||o.enumerable});return e};var u=(e,t,r)=>(r=e!=null?Qb(tx(e)):{},md(t||!e||!e.__esModule?Ci(r,"default",{value:e,enumerable:!0}):r,e)),nx=e=>md(Ci({},"__esModule",{value:!0}),e);var z=Oe((O_,pd)=>{pd.exports=window.wp.element});var j=Oe((A_,vd)=>{vd.exports=window.wp.i18n});var ll=Oe((N_,wd)=>{wd.exports=window.wp.blob});var ul=Oe((D_,yd)=>{yd.exports=window.wp.apiFetch});var Pn=Oe((lS,Ad)=>{Ad.exports=window.wp.coreData});var qt=Oe((uS,Id)=>{Id.exports=window.wp.data});var G=Oe((cS,Pd)=>{Pd.exports=window.wp.components});var le=Oe((dS,Rd)=>{Rd.exports=window.wp.primitives});var P=Oe((fS,Vd)=>{Vd.exports=window.ReactJSXRuntime});var bt=Oe((bC,Nd)=>{Nd.exports=window.wp.compose});var ue=Oe((xC,Dd)=>{Dd.exports=window.React});var Zd=Oe((YC,Kd)=>{Kd.exports=window.ReactDOM});var Qd=Oe(Xd=>{"use strict";var jo=ue();function Cx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ex=typeof Object.is=="function"?Object.is:Cx,Tx=jo.useState,Ox=jo.useEffect,Ax=jo.useLayoutEffect,Ix=jo.useDebugValue;function Px(e,t){var r=t(),o=Tx({inst:{value:r,getSnapshot:t}}),n=o[0].inst,i=o[1];return Ax(function(){n.value=r,n.getSnapshot=t,mu(n)&&i({inst:n})},[e,r,t]),Ox(function(){return mu(n)&&i({inst:n}),e(function(){mu(n)&&i({inst:n})})},[e]),Ix(r),r}function mu(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Ex(e,r)}catch{return!0}}function Rx(e,t){return t()}var Vx=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Rx:Px;Xd.useSyncExternalStore=jo.useSyncExternalStore!==void 0?jo.useSyncExternalStore:Vx});var ef=Oe(($C,Jd)=>{"use strict";Jd.exports=Qd()});var pu=Oe((QC,of)=>{of.exports=window.wp.privateApis});var hu=Oe((s2,pf)=>{pf.exports=window.wp.keycodes});var Up=Oe((AR,os)=>{var zp={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u1EA4:"A",\u1EAE:"A",\u1EB2:"A",\u1EB4:"A",\u1EB6:"A",\u00C6:"AE",\u1EA6:"A",\u1EB0:"A",\u0202:"A",\u1EA2:"A",\u1EA0:"A",\u1EA8:"A",\u1EAA:"A",\u1EAC:"A",\u00C7:"C",\u1E08:"C",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u1EBE:"E",\u1E16:"E",\u1EC0:"E",\u1E14:"E",\u1E1C:"E",\u0206:"E",\u1EBA:"E",\u1EBC:"E",\u1EB8:"E",\u1EC2:"E",\u1EC4:"E",\u1EC6:"E",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u1E2E:"I",\u020A:"I",\u1EC8:"I",\u1ECA:"I",\u00D0:"D",\u00D1:"N",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u1ED0:"O",\u1E4C:"O",\u1E52:"O",\u020E:"O",\u1ECE:"O",\u1ECC:"O",\u1ED4:"O",\u1ED6:"O",\u1ED8:"O",\u1EDC:"O",\u1EDE:"O",\u1EE0:"O",\u1EDA:"O",\u1EE2:"O",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u1EE6:"U",\u1EE4:"U",\u1EEC:"U",\u1EEE:"U",\u1EF0:"U",\u00DD:"Y",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u1EA5:"a",\u1EAF:"a",\u1EB3:"a",\u1EB5:"a",\u1EB7:"a",\u00E6:"ae",\u1EA7:"a",\u1EB1:"a",\u0203:"a",\u1EA3:"a",\u1EA1:"a",\u1EA9:"a",\u1EAB:"a",\u1EAD:"a",\u00E7:"c",\u1E09:"c",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u1EBF:"e",\u1E17:"e",\u1EC1:"e",\u1E15:"e",\u1E1D:"e",\u0207:"e",\u1EBB:"e",\u1EBD:"e",\u1EB9:"e",\u1EC3:"e",\u1EC5:"e",\u1EC7:"e",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u1E2F:"i",\u020B:"i",\u1EC9:"i",\u1ECB:"i",\u00F0:"d",\u00F1:"n",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u1ED1:"o",\u1E4D:"o",\u1E53:"o",\u020F:"o",\u1ECF:"o",\u1ECD:"o",\u1ED5:"o",\u1ED7:"o",\u1ED9:"o",\u1EDD:"o",\u1EDF:"o",\u1EE1:"o",\u1EDB:"o",\u1EE3:"o",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u1EE7:"u",\u1EE5:"u",\u1EED:"u",\u1EEF:"u",\u1EF1:"u",\u00FD:"y",\u00FF:"y",\u0100:"A",\u0101:"a",\u0102:"A",\u0103:"a",\u0104:"A",\u0105:"a",\u0106:"C",\u0107:"c",\u0108:"C",\u0109:"c",\u010A:"C",\u010B:"c",\u010C:"C",\u010D:"c",C\u0306:"C",c\u0306:"c",\u010E:"D",\u010F:"d",\u0110:"D",\u0111:"d",\u0112:"E",\u0113:"e",\u0114:"E",\u0115:"e",\u0116:"E",\u0117:"e",\u0118:"E",\u0119:"e",\u011A:"E",\u011B:"e",\u011C:"G",\u01F4:"G",\u011D:"g",\u01F5:"g",\u011E:"G",\u011F:"g",\u0120:"G",\u0121:"g",\u0122:"G",\u0123:"g",\u0124:"H",\u0125:"h",\u0126:"H",\u0127:"h",\u1E2A:"H",\u1E2B:"h",\u0128:"I",\u0129:"i",\u012A:"I",\u012B:"i",\u012C:"I",\u012D:"i",\u012E:"I",\u012F:"i",\u0130:"I",\u0131:"i",\u0132:"IJ",\u0133:"ij",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u1E30:"K",\u1E31:"k",K\u0306:"K",k\u0306:"k",\u0139:"L",\u013A:"l",\u013B:"L",\u013C:"l",\u013D:"L",\u013E:"l",\u013F:"L",\u0140:"l",\u0141:"l",\u0142:"l",\u1E3E:"M",\u1E3F:"m",M\u0306:"M",m\u0306:"m",\u0143:"N",\u0144:"n",\u0145:"N",\u0146:"n",\u0147:"N",\u0148:"n",\u0149:"n",N\u0306:"N",n\u0306:"n",\u014C:"O",\u014D:"o",\u014E:"O",\u014F:"o",\u0150:"O",\u0151:"o",\u0152:"OE",\u0153:"oe",P\u0306:"P",p\u0306:"p",\u0154:"R",\u0155:"r",\u0156:"R",\u0157:"r",\u0158:"R",\u0159:"r",R\u0306:"R",r\u0306:"r",\u0212:"R",\u0213:"r",\u015A:"S",\u015B:"s",\u015C:"S",\u015D:"s",\u015E:"S",\u0218:"S",\u0219:"s",\u015F:"s",\u0160:"S",\u0161:"s",\u0162:"T",\u0163:"t",\u021B:"t",\u021A:"T",\u0164:"T",\u0165:"t",\u0166:"T",\u0167:"t",T\u0306:"T",t\u0306:"t",\u0168:"U",\u0169:"u",\u016A:"U",\u016B:"u",\u016C:"U",\u016D:"u",\u016E:"U",\u016F:"u",\u0170:"U",\u0171:"u",\u0172:"U",\u0173:"u",\u0216:"U",\u0217:"u",V\u0306:"V",v\u0306:"v",\u0174:"W",\u0175:"w",\u1E82:"W",\u1E83:"w",X\u0306:"X",x\u0306:"x",\u0176:"Y",\u0177:"y",\u0178:"Y",Y\u0306:"Y",y\u0306:"y",\u0179:"Z",\u017A:"z",\u017B:"Z",\u017C:"z",\u017D:"Z",\u017E:"z",\u017F:"s",\u0192:"f",\u01A0:"O",\u01A1:"o",\u01AF:"U",\u01B0:"u",\u01CD:"A",\u01CE:"a",\u01CF:"I",\u01D0:"i",\u01D1:"O",\u01D2:"o",\u01D3:"U",\u01D4:"u",\u01D5:"U",\u01D6:"u",\u01D7:"U",\u01D8:"u",\u01D9:"U",\u01DA:"u",\u01DB:"U",\u01DC:"u",\u1EE8:"U",\u1EE9:"u",\u1E78:"U",\u1E79:"u",\u01FA:"A",\u01FB:"a",\u01FC:"AE",\u01FD:"ae",\u01FE:"O",\u01FF:"o",\u00DE:"TH",\u00FE:"th",\u1E54:"P",\u1E55:"p",\u1E64:"S",\u1E65:"s",X\u0301:"X",x\u0301:"x",\u0403:"\u0413",\u0453:"\u0433",\u040C:"\u041A",\u045C:"\u043A",A\u030B:"A",a\u030B:"a",E\u030B:"E",e\u030B:"e",I\u030B:"I",i\u030B:"i",\u01F8:"N",\u01F9:"n",\u1ED2:"O",\u1ED3:"o",\u1E50:"O",\u1E51:"o",\u1EEA:"U",\u1EEB:"u",\u1E80:"W",\u1E81:"w",\u1EF2:"Y",\u1EF3:"y",\u0200:"A",\u0201:"a",\u0204:"E",\u0205:"e",\u0208:"I",\u0209:"i",\u020C:"O",\u020D:"o",\u0210:"R",\u0211:"r",\u0214:"U",\u0215:"u",B\u030C:"B",b\u030C:"b",\u010C\u0323:"C",\u010D\u0323:"c",\u00CA\u030C:"E",\u00EA\u030C:"e",F\u030C:"F",f\u030C:"f",\u01E6:"G",\u01E7:"g",\u021E:"H",\u021F:"h",J\u030C:"J",\u01F0:"j",\u01E8:"K",\u01E9:"k",M\u030C:"M",m\u030C:"m",P\u030C:"P",p\u030C:"p",Q\u030C:"Q",q\u030C:"q",\u0158\u0329:"R",\u0159\u0329:"r",\u1E66:"S",\u1E67:"s",V\u030C:"V",v\u030C:"v",W\u030C:"W",w\u030C:"w",X\u030C:"X",x\u030C:"x",Y\u030C:"Y",y\u030C:"y",A\u0327:"A",a\u0327:"a",B\u0327:"B",b\u0327:"b",\u1E10:"D",\u1E11:"d",\u0228:"E",\u0229:"e",\u0190\u0327:"E",\u025B\u0327:"e",\u1E28:"H",\u1E29:"h",I\u0327:"I",i\u0327:"i",\u0197\u0327:"I",\u0268\u0327:"i",M\u0327:"M",m\u0327:"m",O\u0327:"O",o\u0327:"o",Q\u0327:"Q",q\u0327:"q",U\u0327:"U",u\u0327:"u",X\u0327:"X",x\u0327:"x",Z\u0327:"Z",z\u0327:"z",\u0439:"\u0438",\u0419:"\u0418",\u0451:"\u0435",\u0401:"\u0415"},Wp=Object.keys(zp).join("|"),Mw=new RegExp(Wp,"g"),Fw=new RegExp(Wp,"");function Lw(e){return zp[e]}var Gp=function(e){return e.replace(Mw,Lw)},Bw=function(e){return!!e.match(Fw)};os.exports=Gp;os.exports.has=Bw;os.exports.remove=Gp});var rv=Oe((MR,tv)=>{"use strict";tv.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;for(n of t.entries())if(!e(n[1],r.get(n[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(t[n]!==r[n])return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),o=i.length,o!==Object.keys(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}});var Or=Oe((rD,kv)=>{kv.exports=window.wp.date});var sh=Oe((GD,ah)=>{ah.exports=window.wp.warning});var ol=Oe((wL,gb)=>{gb.exports=window.wp.url});var jb=Oe((YL,Bb)=>{Bb.exports=window.wp.notices});var E_={};ox(E_,{MediaUpload:()=>xd,privateApis:()=>dd,transformAttachment:()=>kr,uploadMedia:()=>Vi,validateFileSize:()=>Pi,validateMimeType:()=>Oi,validateMimeTypeForUser:()=>Ii});var gd=u(z(),1),bd=u(j(),1),ix=[],ax=()=>{let{wp:e}=window;return e.media.view.MediaFrame.Select.extend({featuredImageToolbar(t){this.createSelectToolbar(t,{text:e.media.view.l10n.setFeaturedImage,state:this.options.state})},editState(){let t=this.state("featured-image").get("selection"),r=new e.media.view.EditImage({model:t.single(),controller:this}).render();this.content.set(r),r.loadEditor()},createStates:function(){this.on("toolbar:create:featured-image",this.featuredImageToolbar,this),this.on("content:render:edit-image",this.editState,this),this.states.add([new e.media.controller.FeaturedImage,new e.media.controller.EditImage({model:this.options.editImage})])}})},sx=()=>{let{wp:e}=window;return e.media.view.MediaFrame.Select.extend({createStates(){let t=this.options;this.options.states||this.states.add([new e.media.controller.Library({library:e.media.query(t.library),multiple:t.multiple,title:t.title,priority:20,filterable:"uploaded"}),new e.media.controller.EditImage({model:t.editImage})])}})},lx=()=>{let{wp:e}=window;return e.media.view.MediaFrame.Post.extend({galleryToolbar(){let t=this.state().get("editing");this.toolbar.set(new e.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:t?e.media.view.l10n.updateGallery:e.media.view.l10n.insertGallery,priority:80,requires:{library:!0},click(){let r=this.controller,o=r.state();r.close(),o.trigger("update",o.get("library")),r.setState(r.options.state),r.reset()}}}}))},editState(){let t=this.state("gallery").get("selection"),r=new e.media.view.EditImage({model:t.single(),controller:this}).render();this.content.set(r),r.loadEditor()},createStates:function(){this.on("toolbar:create:main-gallery",this.galleryToolbar,this),this.on("content:render:edit-image",this.editState,this),this.states.add([new e.media.controller.Library({id:"gallery",title:e.media.view.l10n.createGalleryTitle,priority:40,toolbar:"main-gallery",filterable:"uploaded",multiple:"add",editable:!1,library:e.media.query({type:"image",...this.options.library})}),new e.media.controller.EditImage({model:this.options.editImage}),new e.media.controller.GalleryEdit({library:this.options.selection,editing:this.options.editing,menu:"gallery",displaySettings:!1,multiple:!0}),new e.media.controller.GalleryAdd])}})},hd=e=>["sizes","mime","type","subtype","id","url","alt","link","caption"].reduce((r,o)=>(e?.hasOwnProperty(o)&&(r[o]=e[o]),r),{}),Ei=e=>{let{wp:t}=window;return t.media.query({order:"ASC",orderby:"post__in",post__in:e,posts_per_page:-1,query:!0,type:"image"})},ux=class extends gd.Component{constructor(){super(...arguments),this.openModal=this.openModal.bind(this),this.onOpen=this.onOpen.bind(this),this.onSelect=this.onSelect.bind(this),this.onUpdate=this.onUpdate.bind(this),this.onClose=this.onClose.bind(this)}initializeListeners(){this.frame.on("select",this.onSelect),this.frame.on("update",this.onUpdate),this.frame.on("open",this.onOpen),this.frame.on("close",this.onClose)}buildAndSetGalleryFrame(){let{addToGallery:e=!1,allowedTypes:t,multiple:r=!1,value:o=ix}=this.props;if(o===this.lastGalleryValue)return;let{wp:n}=window;this.lastGalleryValue=o,this.frame&&this.frame.remove();let i;e?i="gallery-library":i=o&&o.length?"gallery-edit":"gallery",this.GalleryDetailsMediaFrame||(this.GalleryDetailsMediaFrame=lx());let a=Ei(o),s=new n.media.model.Selection(a.models,{props:a.props.toJSON(),multiple:r});this.frame=new this.GalleryDetailsMediaFrame({mimeType:t,state:i,multiple:r,selection:s,editing:!!o?.length}),n.media.frame=this.frame,this.initializeListeners()}buildAndSetFeatureImageFrame(){let{wp:e}=window,{value:t,multiple:r,allowedTypes:o}=this.props,n=ax(),i=Ei(t),a=new e.media.model.Selection(i.models,{props:i.props.toJSON()});this.frame=new n({mimeType:o,state:"featured-image",multiple:r,selection:a,editing:t}),e.media.frame=this.frame,e.media.view.settings.post={...e.media.view.settings.post,featuredImageId:t||-1}}buildAndSetSingleMediaFrame(){let{wp:e}=window,{allowedTypes:t,multiple:r=!1,title:o=(0,bd.__)("Select or Upload Media"),value:n}=this.props,i={title:o,multiple:r};t&&(i.library={type:t}),this.frame&&this.frame.remove();let a=sx(),s=Ei(n),l=new e.media.model.Selection(s.models,{props:s.props.toJSON()});this.frame=new a({mimeType:t,multiple:r,selection:l,...i}),e.media.frame=this.frame}componentWillUnmount(){this.frame?.remove()}onUpdate(e){let{onSelect:t,multiple:r=!1}=this.props,o=this.frame.state(),n=e||o.get("selection");!n||!n.models.length||t(r?n.models.map(i=>hd(i.toJSON())):hd(n.models[0].toJSON()))}onSelect(){let{onSelect:e,multiple:t=!1}=this.props,r=this.frame.state().get("selection").toJSON();e(t?r:r[0])}onOpen(){let{wp:e}=window,{value:t}=this.props;if(this.updateCollection(),this.props.mode&&this.frame.content.mode(this.props.mode),!(Array.isArray(t)?!!t?.length:!!t))return;let o=this.props.gallery,n=this.frame.state().get("selection"),i=Array.isArray(t)?t:[t];o||i.forEach(s=>{n.add(e.media.attachment(s))});let a=Ei(i);a.more().done(function(){o&&a?.models?.length&&n.add(a.models)})}onClose(){let{onClose:e}=this.props;e&&e(),this.frame.detach()}updateCollection(){let e=this.frame.content.get();if(e&&e.collection){let t=e.collection;t.toArray().forEach(r=>r.trigger("destroy",r)),t.mirroring._hasMore=!0,t.more()}}openModal(){let{gallery:e=!1,unstableFeaturedImageFlow:t=!1,modalClass:r}=this.props;e?this.buildAndSetGalleryFrame():this.buildAndSetSingleMediaFrame(),r&&this.frame.$el.addClass(r),t&&this.buildAndSetFeatureImageFrame(),this.initializeListeners(),this.frame.open()}render(){return this.props.render({open:this.openModal})}},xd=ux;var In=u(j(),1),Ri=u(ll(),1);var _d=u(ul(),1);function cx(e){return e!==null&&typeof e=="object"&&Object.getPrototypeOf(e)===Object.prototype}function An(e,t,r){if(cx(r))for(let[o,n]of Object.entries(r))An(e,`${t}[${o}]`,n);else r!==void 0&&e.append(t,String(r))}function kr(e){let{alt_text:t,source_url:r,...o}=e;return{...o,alt:e.alt_text,caption:e.caption?.raw??"",title:e.title.raw,url:e.source_url,poster:e._embedded?.["wp:featuredmedia"]?.[0]?.source_url||void 0}}async function Sd(e,t={},r){let o=new FormData;o.append("file",e,e.name||e.type.replace("/","."));for(let[n,i]of Object.entries(t))An(o,n,i);return kr(await(0,_d.default)({path:"/wp/v2/media?_embed=wp:featuredmedia",body:o,method:"POST",signal:r}))}var Ti=u(j(),1);var Wt=class extends Error{code;file;constructor({code:e,message:t,file:r,cause:o}){super(t,{cause:o}),Object.setPrototypeOf(this,new.target.prototype),this.code=e,this.file=r}};function Oi(e,t){if(!t)return;let r=t.some(o=>o.includes("/")?o===e.type:e.type.startsWith(`${o}/`));if(e.type&&!r)throw new Wt({code:"MIME_TYPE_NOT_SUPPORTED",message:(0,Ti.sprintf)((0,Ti.__)("%s: Sorry, this file type is not supported here."),e.name),file:e})}var Ai=u(j(),1);function Cd(e){return e?Object.entries(e).flatMap(([t,r])=>{let[o]=r.split("/"),n=t.split("|");return[r,...n.map(i=>`${o}/${i}`)]}):null}function Ii(e,t){let r=Cd(t);if(!r)return;let o=r.includes(e.type);if(e.type&&!o)throw new Wt({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:(0,Ai.sprintf)((0,Ai.__)("%s: Sorry, you are not allowed to upload this file type."),e.name),file:e})}var Bo=u(j(),1);function Pi(e,t){if(e.size<=0)throw new Wt({code:"EMPTY_FILE",message:(0,Bo.sprintf)((0,Bo.__)("%s: This file is empty."),e.name),file:e});if(t&&e.size>t)throw new Wt({code:"SIZE_ABOVE_LIMIT",message:(0,Bo.sprintf)((0,Bo.__)("%s: This file exceeds the maximum upload size for this site."),e.name),file:e})}function Vi({wpAllowedMimeTypes:e,allowedTypes:t,additionalData:r={},filesList:o,maxUploadFileSize:n,onError:i,onFileChange:a,signal:s,multiple:l=!0}){if(!l&&o.length>1){i?.(new Error((0,In.__)("Only one file can be used here.")));return}let c=[],f=[],p=(d,m)=>{window.__clientSideMediaProcessing||f[d]?.url&&(0,Ri.revokeBlobURL)(f[d].url),f[d]=m,a?.(f.filter(v=>v!==null))};for(let d of o){try{Ii(d,e)}catch(m){i?.(m);continue}try{Oi(d,t)}catch(m){i?.(m);continue}try{Pi(d,n)}catch(m){i?.(m);continue}c.push(d),window.__clientSideMediaProcessing||(f.push({url:(0,Ri.createBlobURL)(d)}),a?.(f))}c.map(async(d,m)=>{try{let v=await Sd(d,r,s);p(m,v)}catch(v){p(m,null);let _;typeof v=="object"&&v!==null&&"message"in v?_=typeof v.message=="string"?v.message:String(v.message):_=(0,In.sprintf)((0,In.__)("Error while uploading file %s to the media library."),d.name),i?.(new Wt({code:"GENERAL",message:_,file:d,cause:v instanceof Error?v:void 0}))}})}var Ni=u(j(),1);var Ed=u(ul(),1);async function Td(e,t,r={},o){let n=new FormData;n.append("file",e,e.name||e.type.replace("/","."));for(let[i,a]of Object.entries(r))An(n,i,a);return kr(await(0,Ed.default)({path:`/wp/v2/media/${t}/sideload`,body:n,method:"POST",signal:o}))}var dx=()=>{};async function Od({file:e,attachmentId:t,additionalData:r={},signal:o,onFileChange:n,onError:i=dx}){try{let a=await Td(e,t,r,o);n?.([a])}catch(a){let s;a instanceof Error?s=a.message:s=(0,Ni.sprintf)((0,Ni.__)("Error while sideloading file %s to the server."),e.name),i(new Wt({code:"GENERAL",message:s,file:e,cause:a instanceof Error?a:void 0}))}}var gt=u(z(),1),$e=u(j(),1),yi=u(Pn(),1),_i=u(qt(),1),mo=u(G(),1);var Di=u(le(),1),cl=u(P(),1),dl=(0,cl.jsx)(Di.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cl.jsx)(Di.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})});var ki=u(le(),1),fl=u(P(),1),ml=(0,fl.jsx)(ki.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fl.jsx)(ki.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var Mi=u(le(),1),pl=u(P(),1),vl=(0,pl.jsx)(Mi.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pl.jsx)(Mi.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})});var Fi=u(le(),1),hl=u(P(),1),gl=(0,hl.jsx)(Fi.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hl.jsx)(Fi.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})});var Li=u(le(),1),bl=u(P(),1),xl=(0,bl.jsx)(Li.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bl.jsx)(Li.Path,{d:"M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z"})});var Bi=u(le(),1),wl=u(P(),1),ji=(0,wl.jsx)(Bi.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wl.jsx)(Bi.Path,{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"})});var Hi=u(le(),1),yl=u(P(),1),zi=(0,yl.jsx)(Hi.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yl.jsx)(Hi.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var Wi=u(le(),1),_l=u(P(),1),Rn=(0,_l.jsx)(Wi.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_l.jsx)(Wi.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var Gi=u(le(),1),Sl=u(P(),1),Cl=(0,Sl.jsx)(Gi.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Sl.jsx)(Gi.Path,{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"})});var Ui=u(le(),1),El=u(P(),1),Tl=(0,El.jsx)(Ui.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,El.jsx)(Ui.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var Yi=u(le(),1),Ol=u(P(),1),Al=(0,Ol.jsx)(Yi.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ol.jsx)(Yi.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var qi=u(le(),1),Il=u(P(),1),Pl=(0,Il.jsx)(qi.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Il.jsx)(qi.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M3 7c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Zm2-.5h14c.3 0 .5.2.5.5v1L12 13.5 4.5 7.9V7c0-.3.2-.5.5-.5Zm-.5 3.3V17c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V9.8L12 15.4 4.5 9.8Z"})});var $i=u(le(),1),Rl=u(P(),1),Vl=(0,Rl.jsx)($i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Rl.jsx)($i.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z"})});var Ki=u(le(),1),Nl=u(P(),1),Dl=(0,Nl.jsx)(Ki.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Nl.jsx)(Ki.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var Zi=u(le(),1),kl=u(P(),1),Ml=(0,kl.jsx)(Zi.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kl.jsx)(Zi.Path,{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"})});var Xi=u(le(),1),Fl=u(P(),1),Ll=(0,Fl.jsx)(Xi.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Fl.jsx)(Xi.Path,{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"})});var Qi=u(le(),1),Bl=u(P(),1),Vn=(0,Bl.jsx)(Qi.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Bl.jsx)(Qi.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z"})});var Ji=u(le(),1),jl=u(P(),1),Hl=(0,jl.jsx)(Ji.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jl.jsx)(Ji.Path,{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.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})});var ea=u(le(),1),zl=u(P(),1),Wl=(0,zl.jsx)(ea.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zl.jsx)(ea.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});var ta=u(le(),1),Gl=u(P(),1),Ul=(0,Gl.jsx)(ta.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Gl.jsx)(ta.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"})});var ra=u(le(),1),Yl=u(P(),1),Nn=(0,Yl.jsx)(ra.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Yl.jsx)(ra.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var oa=u(le(),1),ql=u(P(),1),na=(0,ql.jsx)(oa.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ql.jsx)(oa.Path,{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"})});var ia=u(le(),1),$l=u(P(),1),aa=(0,$l.jsx)(ia.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$l.jsx)(ia.Path,{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"})});var sa=u(le(),1),Kl=u(P(),1),Zl=(0,Kl.jsx)(sa.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Kl.jsx)(sa.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var la=u(le(),1),Xl=u(P(),1),Ql=(0,Xl.jsx)(la.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Xl.jsx)(la.Path,{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"})});var ua=u(le(),1),Jl=u(P(),1),eu=(0,Jl.jsx)(ua.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Jl.jsx)(ua.Path,{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"})});var ca=u(le(),1),tu=u(P(),1),Dn=(0,tu.jsx)(ca.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,tu.jsx)(ca.Path,{d:"M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"})});var da=u(le(),1),ru=u(P(),1),ou=(0,ru.jsx)(da.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ru.jsx)(da.Path,{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"})});var fa=u(le(),1),nu=u(P(),1),iu=(0,nu.jsx)(fa.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nu.jsx)(fa.Path,{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"})});var Md=u(ue(),1),kd={};function au(e,t){let r=Md.useRef(kd);return r.current===kd&&(r.current=e(t)),r}function su(e,...t){let r=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(o=>r.searchParams.append("args[]",o)),`Base UI error #${e}; visit ${r} for the full message.`}var pa=u(ue(),1);function lu(e,t,r,o){let n=au(Ld).current;return fx(n,e,t,r,o)&&Bd(n,[e,t,r,o]),n.callback}function Fd(e){let t=au(Ld).current;return mx(t,e)&&Bd(t,e),t.callback}function Ld(){return{callback:null,cleanup:null,refs:[]}}function fx(e,t,r,o,n){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==o||e.refs[3]!==n}function mx(e,t){return e.refs.length!==t.length||e.refs.some((r,o)=>r!==t[o])}function Bd(e,t){if(e.refs=t,t.every(r=>r==null)){e.callback=null;return}e.callback=r=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),r!=null){let o=Array(t.length).fill(null);for(let n=0;n<t.length;n+=1){let i=t[n];if(i!=null)switch(typeof i){case"function":{let a=i(r);typeof a=="function"&&(o[n]=a);break}case"object":{i.current=r;break}default:}}e.cleanup=()=>{for(let n=0;n<t.length;n+=1){let i=t[n];if(i!=null)switch(typeof i){case"function":{let a=o[n];typeof a=="function"?a():i(null);break}case"object":{i.current=null;break}default:}}}}}}var zd=u(ue(),1);var jd=u(ue(),1),px=parseInt(jd.version,10);function Hd(e){return px>=e}function uu(e){if(!zd.isValidElement(e))return null;let t=e,r=t.props;return(Hd(19)?r?.ref:t.ref)??null}function kn(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Wd(e,t){let r={};for(let o in e){let n=e[o];if(t?.hasOwnProperty(o)){let i=t[o](n);i!=null&&Object.assign(r,i);continue}n===!0?r[`data-${o.toLowerCase()}`]="":n&&(r[`data-${o.toLowerCase()}`]=n.toString())}return r}function Gd(e,t){return typeof e=="function"?e(t):e}function Ud(e,t){return typeof e=="function"?e(t):e}var Fn={};function ma(e,t,r,o,n){let i={...cu(e,Fn)};return t&&(i=Mn(i,t)),r&&(i=Mn(i,r)),o&&(i=Mn(i,o)),n&&(i=Mn(i,n)),i}function Yd(e){if(e.length===0)return Fn;if(e.length===1)return cu(e[0],Fn);let t={...cu(e[0],Fn)};for(let r=1;r<e.length;r+=1)t=Mn(t,e[r]);return t}function Mn(e,t){return qd(t)?t(e):vx(e,t)}function vx(e,t){if(!t)return e;for(let r in t){let o=t[r];switch(r){case"style":{e[r]=kn(e.style,o);break}case"className":{e[r]=du(e.className,o);break}default:hx(r,o)?e[r]=gx(e[r],o):e[r]=o}}return e}function hx(e,t){let r=e.charCodeAt(0),o=e.charCodeAt(1),n=e.charCodeAt(2);return r===111&&o===110&&n>=65&&n<=90&&(typeof t=="function"||typeof t>"u")}function qd(e){return typeof e=="function"}function cu(e,t){return qd(e)?e(t):e??Fn}function gx(e,t){return t?e?r=>{if(xx(r)){let n=r;bx(n);let i=t(n);return n.baseUIHandlerPrevented||e?.(n),i}let o=t(r);return e?.(r),o}:t:e}function bx(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function du(e,t){return t?e?t+" "+e:t:e}function xx(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var wx=Object.freeze([]),Mr=Object.freeze({});var fu=u(ue(),1);function $d(e,t,r={}){let o=t.render,n=yx(t,r);if(r.enabled===!1)return null;let i=r.state??Mr;return _x(e,o,n,i)}function yx(e,t={}){let{className:r,style:o,render:n}=e,{state:i=Mr,ref:a,props:s,stateAttributesMapping:l,enabled:c=!0}=t,f=c?Gd(r,i):void 0,p=c?Ud(o,i):void 0,d=c?Wd(i,l):Mr,m=c?kn(d,Array.isArray(s)?Yd(s):s)??Mr:Mr;return typeof document<"u"&&(c?Array.isArray(a)?m.ref=Fd([m.ref,uu(n),...a]):m.ref=lu(m.ref,uu(n),a):lu(null,null)),c?(f!==void 0&&(m.className=du(m.className,f)),p!==void 0&&(m.style=kn(m.style,p)),m):Mr}function _x(e,t,r,o){if(t){if(typeof t=="function")return t(r,o);let n=ma(r,t.props);return n.ref=r.ref,pa.cloneElement(t,n)}if(e&&typeof e=="string")return Sx(e,r);throw new Error(su(8))}function Sx(e,t){return e==="button"?(0,fu.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,fu.createElement)("img",{alt:"",...t,key:t.key}):pa.createElement(e,t)}function tf(e){return $d(e.defaultTagName??"div",e,e)}function rf(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=rf(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function Nx(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=rf(e))&&(o&&(o+=" "),o+=t);return o}var Y=Nx;var nf=u(z(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='71d20935c2']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","71d20935c2"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}")),document.head.appendChild(e)}var Dx={stack:"_19ce0419607e1896__stack"},kx={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},L=(0,nf.forwardRef)(function({direction:t,gap:r,align:o,justify:n,wrap:i,render:a,...s},l){let c={gap:r&&kx[r],alignItems:o,justifyContent:n,flexDirection:t,flexWrap:i};return tf({render:a,ref:l,props:ma(s,{style:c,className:Dx.stack})})});var xa=u(z(),1);var vu=u(j(),1);var _e="isAny",Se="isNone",ot="isAll",nt="isNotAll",ct="between",dt="inThePast",xt="over",Ce="is",Ee="isNot",Fr="lessThan",Lr="greaterThan",Br="lessThanOrEqual",jr="greaterThanOrEqual",Hr="before",zr="after",Wr="beforeInc",Gr="afterInc",$t="contains",Kt="notContains",Zt="startsWith",Ur="on",Yr="notOn",va=["asc","desc"],af={asc:"\u2191",desc:"\u2193"},ha={asc:"ascending",desc:"descending"},ga={asc:(0,vu.__)("Sort ascending"),desc:(0,vu.__)("Sort descending")},sf={asc:gl,desc:dl},ba="table",lf="grid",uf="list",cf="activity",df="pickerGrid",ff="pickerTable";var mf=(0,xa.createContext)({view:{type:ba},onChangeView:()=>{},fields:[],data:[],paginationInfo:{totalItems:0,totalPages:0},selection:[],onChangeSelection:()=>{},setOpenedFilter:()=>{},openedFilter:null,getItemId:e=>e.id,isItemClickable:()=>!0,renderItemLink:void 0,containerWidth:0,containerRef:(0,xa.createRef)(),resizeObserverRef:()=>{},defaultLayouts:{list:{},grid:{},table:{}},filters:[],isShowingFilter:!1,setIsShowingFilter:()=>{},hasInitiallyLoaded:!1,hasInfiniteScrollHandler:!1,config:{perPageSizes:[]}});mf.displayName="DataViewsContext";var q=mf;var xr=u(j(),1);var xo=u(j(),1),Aa=u(G(),1),wt=u(z(),1),Su=u(hu(),1);var vf=u(G(),1),hf=u(j(),1),gf=u(P(),1);function qr({selection:e,onChangeSelection:t,item:r,getItemId:o,titleField:n,disabled:i,...a}){let s=o(r),l=!i&&e.includes(s),c=n?.getValue?.({item:r})||(0,hf.__)("(no title)");return(0,gf.jsx)(vf.CheckboxControl,{className:"dataviews-selection-checkbox","aria-label":c,"aria-disabled":i,checked:l,onChange:()=>{i||t(e.includes(s)?e.filter(f=>s!==f):[...e,s])},...a})}var go=u(G(),1),wf=u(j(),1),zo=u(z(),1);var yf=u(qt(),1),gu=u(bt(),1);var bf=u(pu(),1),{lock:u2,unlock:Z}=(0,bf.__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");var be=u(P(),1),{Menu:Ho,kebabCase:Mx}=Z(go.privateApis);function Fx({action:e,onClick:t,items:r,variant:o}){let n=typeof e.label=="string"?e.label:e.label(r);return(0,be.jsx)(go.Button,{disabled:!!e.disabled,accessibleWhenDisabled:!0,size:"compact",variant:o,onClick:t,children:n})}function Lx({action:e,onClick:t,items:r}){let o=typeof e.label=="string"?e.label:e.label(r);return(0,be.jsx)(Ho.Item,{disabled:e.disabled,onClick:t,children:(0,be.jsx)(Ho.ItemLabel,{children:o})})}function Ln({action:e,items:t,closeModal:r}){let o=typeof e.label=="string"?e.label:e.label(t),n=typeof e.modalHeader=="function"?e.modalHeader(t):e.modalHeader;return(0,be.jsx)(go.Modal,{title:n||o,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:r,focusOnMount:e.modalFocusOnMount??!0,size:e.modalSize||"medium",overlayClassName:`dataviews-action-modal dataviews-action-modal__${Mx(e.id)}`,children:(0,be.jsx)(e.RenderModal,{items:t,closeModal:r})})}function bu({actions:e,item:t,registry:r,setActiveModalAction:o}){let{primaryActions:n,regularActions:i}=(0,zo.useMemo)(()=>e.reduce((s,l)=>((l.isPrimary?s.primaryActions:s.regularActions).push(l),s),{primaryActions:[],regularActions:[]}),[e]),a=s=>s.map(l=>(0,be.jsx)(Lx,{action:l,onClick:()=>{if("RenderModal"in l){o(l);return}l.callback([t],{registry:r})},items:[t]},l.id));return(0,be.jsxs)(Ho.Group,{children:[a(n),a(i)]})}function Wo({item:e,actions:t,isCompact:r}){let o=(0,yf.useRegistry)(),{primaryActions:n,eligibleActions:i}=(0,zo.useMemo)(()=>{let s=t.filter(c=>!c.isEligible||c.isEligible(e));return{primaryActions:s.filter(c=>c.isPrimary),eligibleActions:s}},[t,e]),a=(0,gu.useViewportMatch)("medium","<");return r?(0,be.jsx)(xf,{item:e,actions:i,isSmall:!0,registry:o}):(0,be.jsxs)(L,{direction:"row",justify:"flex-end",className:"dataviews-item-actions",style:{flexShrink:0,width:"auto"},children:[(0,be.jsx)(xu,{item:e,actions:n,registry:o}),(n.length<i.length||a)&&(0,be.jsx)(xf,{item:e,actions:i,registry:o})]})}function xf({item:e,actions:t,isSmall:r,registry:o}){let[n,i]=(0,zo.useState)(null);return(0,be.jsxs)(be.Fragment,{children:[(0,be.jsxs)(Ho,{placement:"bottom-end",children:[(0,be.jsx)(Ho.TriggerButton,{render:(0,be.jsx)(go.Button,{size:r?"small":"compact",icon:Nn,label:(0,wf.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,className:"dataviews-all-actions-button"})}),(0,be.jsx)(Ho.Popover,{children:(0,be.jsx)(bu,{actions:t,item:e,registry:o,setActiveModalAction:i})})]}),!!n&&(0,be.jsx)(Ln,{action:n,items:[e],closeModal:()=>i(null)})]})}function xu({item:e,actions:t,registry:r,buttonVariant:o}){let[n,i]=(0,zo.useState)(null);return(0,gu.useViewportMatch)("medium","<")||!Array.isArray(t)||t.length===0?null:(0,be.jsxs)(be.Fragment,{children:[t.map(s=>(0,be.jsx)(Fx,{action:s,onClick:()=>{if("RenderModal"in s){i(s);return}s.callback([e],{registry:r})},items:[e],variant:o},s.id)),!!n&&(0,be.jsx)(Ln,{action:n,items:[e],closeModal:()=>i(null)})]})}var yu=u(G(),1),wu=u(j(),1),bo=u(z(),1),Bx=u(qt(),1);var jx=u(bt(),1);var $r=u(j(),1);function _f(e,t,r){return e>0?(0,$r.sprintf)((0,$r._n)("%d Item selected","%d Items selected",e),e):r>t?(0,$r.sprintf)((0,$r._n)("%1$d of %2$d Item","%1$d of %2$d Items",r),t,r):(0,$r.sprintf)((0,$r._n)("%d Item","%d Items",t),t)}var wa=u(P(),1);function ya(e,t){return(0,bo.useMemo)(()=>e.some(r=>r.supportsBulk&&(!r.isEligible||r.isEligible(t))),[e,t])}function _a(e,t){return(0,bo.useMemo)(()=>t.some(r=>e.some(o=>o.supportsBulk&&(!o.isEligible||o.isEligible(r)))),[e,t])}function Sa({selection:e,onChangeSelection:t,data:r,actions:o,getItemId:n}){let i=(0,bo.useMemo)(()=>r.filter(l=>o.some(c=>c.supportsBulk&&(!c.isEligible||c.isEligible(l)))),[r,o]),a=r.filter(l=>e.includes(n(l))&&i.includes(l)),s=a.length===i.length;return(0,wa.jsx)(yu.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",checked:s,indeterminate:!s&&!!a.length,onChange:()=>{t(s?[]:i.map(l=>n(l)))},"aria-label":s?(0,wu.__)("Deselect all"):(0,wu.__)("Select all")})}var hr=u(j(),1);var gr=u(G(),1),Kr=u(z(),1);function Ca(e,t){let r=[e?.titleField,e?.mediaField,e?.descriptionField].filter(Boolean);return t.filter(o=>!r.includes(o.id)&&o.type!=="media"&&o.enableHiding!==!1)}var J=u(P(),1),{Menu:ce}=Z(gr.privateApis);function Hx({children:e}){return Kr.Children.toArray(e).filter(Boolean).map((t,r)=>(0,J.jsxs)(Kr.Fragment,{children:[r>0&&(0,J.jsx)(ce.Separator,{}),t]},r))}var zx=(0,Kr.forwardRef)(function({fieldId:t,view:r,fields:o,onChangeView:n,onHide:i,setOpenedFilter:a,canMove:s=!0,canInsertLeft:l=!0,canInsertRight:c=!0},f){let p=r.fields??[],d=p?.indexOf(t),m=r.sort?.field===t,v=!1,_=!1,h=!1,b=[],y=o.find(S=>S.id===t),{setIsShowingFilter:A}=(0,Kr.useContext)(q);if(!y)return null;v=y.enableHiding!==!1,_=y.enableSorting!==!1;let V=y.header;if(b=!!y.filterBy&&y.filterBy?.operators||[],h=!r.filters?.some(S=>t===S.field)&&!!(y.hasElements||y.Edit)&&y.filterBy!==!1&&!y.filterBy?.isPrimary,!_&&!s&&!v&&!h)return V;let R=Ca(r,o).filter(S=>!p.includes(S.id)),M=(l||c)&&!!R.length,k=(0,hr.isRTL)();return(0,J.jsxs)(ce,{children:[(0,J.jsxs)(ce.TriggerButton,{render:(0,J.jsx)(gr.Button,{size:"compact",className:"dataviews-view-table-header-button",ref:f,variant:"tertiary"}),children:[V,r.sort&&m&&(0,J.jsx)("span",{"aria-hidden":"true",children:af[r.sort.direction]})]}),(0,J.jsx)(ce.Popover,{style:{minWidth:"240px"},children:(0,J.jsxs)(Hx,{children:[_&&(0,J.jsx)(ce.Group,{children:va.map(S=>{let I=r.sort&&m&&r.sort.direction===S,N=`${t}-${S}`;return(0,J.jsx)(ce.RadioItem,{name:"view-table-sorting",value:N,checked:I,onChange:()=>{n({...r,sort:{field:t,direction:S},showLevels:!1})},children:(0,J.jsx)(ce.ItemLabel,{children:ga[S]})},N)})}),h&&(0,J.jsx)(ce.Group,{children:(0,J.jsx)(ce.Item,{prefix:(0,J.jsx)(gr.Icon,{icon:Vn}),onClick:()=>{a(t),A(!0),n({...r,page:1,filters:[...r.filters||[],{field:t,value:void 0,operator:b[0]}]})},children:(0,J.jsx)(ce.ItemLabel,{children:(0,hr.__)("Add filter")})})}),(s||v||M)&&y&&(0,J.jsxs)(ce.Group,{children:[s&&(0,J.jsx)(ce.Item,{prefix:(0,J.jsx)(gr.Icon,{icon:ml}),disabled:k?d>=p.length-1:d<1,onClick:()=>{let S=k?d+1:d-1,I=[...p];I.splice(d,1),I.splice(S,0,t),n({...r,fields:I})},children:(0,J.jsx)(ce.ItemLabel,{children:(0,hr.__)("Move left")})}),s&&(0,J.jsx)(ce.Item,{prefix:(0,J.jsx)(gr.Icon,{icon:vl}),disabled:k?d<1:d>=p.length-1,onClick:()=>{let S=k?d-1:d+1,I=[...p];I.splice(d,1),I.splice(S,0,t),n({...r,fields:I})},children:(0,J.jsx)(ce.ItemLabel,{children:(0,hr.__)("Move right")})}),l&&!!R.length&&(0,J.jsxs)(ce,{children:[(0,J.jsx)(ce.SubmenuTriggerItem,{children:(0,J.jsx)(ce.ItemLabel,{children:(0,hr.__)("Insert left")})}),(0,J.jsx)(ce.Popover,{children:R.map(S=>{let I=k?d+1:d;return(0,J.jsx)(ce.Item,{onClick:()=>{n({...r,fields:[...p.slice(0,I),S.id,...p.slice(I)]})},children:(0,J.jsx)(ce.ItemLabel,{children:S.label})},S.id)})})]}),c&&!!R.length&&(0,J.jsxs)(ce,{children:[(0,J.jsx)(ce.SubmenuTriggerItem,{children:(0,J.jsx)(ce.ItemLabel,{children:(0,hr.__)("Insert right")})}),(0,J.jsx)(ce.Popover,{children:R.map(S=>{let I=k?d:d+1;return(0,J.jsx)(ce.Item,{onClick:()=>{n({...r,fields:[...p.slice(0,I),S.id,...p.slice(I)]})},children:(0,J.jsx)(ce.ItemLabel,{children:S.label})},S.id)})})]}),v&&y&&(0,J.jsx)(ce.Item,{prefix:(0,J.jsx)(gr.Icon,{icon:Dn}),onClick:()=>{i(y),n({...r,fields:p.filter(S=>S!==t)})},children:(0,J.jsx)(ce.ItemLabel,{children:(0,hr.__)("Hide column")})})]})]})})]})}),Wx=zx,Go=Wx;var Sf=u(z(),1),_u=u(P(),1);function Gx({item:e,isItemClickable:t,onClickItem:r,className:o}){return!t(e)||!r?{className:o}:{className:o?`${o} ${o}--clickable`:void 0,role:"button",tabIndex:0,onClick:n=>{n.stopPropagation(),r(e)},onKeyDown:n=>{(n.key==="Enter"||n.key===""||n.key===" ")&&(n.stopPropagation(),r(e))}}}function Zr({item:e,isItemClickable:t,onClickItem:r,renderItemLink:o,className:n,children:i,...a}){if(!t(e))return(0,_u.jsx)("div",{className:n,...a,children:i});if(o){let l=o({item:e,className:`${n} ${n}--clickable`,...a,children:i});return(0,Sf.cloneElement)(l,{onClick:c=>{c.stopPropagation(),l.props.onClick&&l.props.onClick(c)},onKeyDown:c=>{(c.key==="Enter"||c.key===""||c.key===" ")&&(c.stopPropagation(),l.props.onKeyDown&&l.props.onKeyDown(c))}})}let s=Gx({item:e,isItemClickable:t,onClickItem:r,className:n});return(0,_u.jsx)("div",{...s,...a,children:i})}var Xt=u(P(),1);function Ux({item:e,level:t,titleField:r,mediaField:o,descriptionField:n,onClickItem:i,renderItemLink:a,isItemClickable:s}){return(0,Xt.jsxs)(L,{direction:"row",gap:"md",align:"flex-start",justify:"flex-start",children:[o&&(0,Xt.jsx)(Zr,{item:e,isItemClickable:s,onClickItem:i,renderItemLink:a,className:"dataviews-view-table__cell-content-wrapper dataviews-column-primary__media","aria-label":s(e)&&(i||a)&&r?r.getValue?.({item:e}):void 0,children:(0,Xt.jsx)(o.render,{item:e,field:o,config:{sizes:"32px"}})}),(0,Xt.jsxs)(L,{direction:"column",align:"flex-start",className:"dataviews-view-table__primary-column-content",children:[r&&(0,Xt.jsxs)(Zr,{item:e,isItemClickable:s,onClickItem:i,renderItemLink:a,className:"dataviews-view-table__cell-content-wrapper dataviews-title-field",children:[t!==void 0&&t>0&&(0,Xt.jsxs)("span",{className:"dataviews-view-table__level",children:[Array(t).fill("\u2014").join(" "),"\xA0"]}),(0,Xt.jsx)(r.render,{item:e,field:r})]}),n&&(0,Xt.jsx)(n.render,{item:e,field:n})]})]})}var Ea=Ux;var Cf=u(bt(),1),Uo=u(z(),1),Ef=u(j(),1),Yx=e=>(0,Ef.isRTL)()?Math.abs(e.scrollLeft)<=1:e.scrollLeft+e.clientWidth>=e.scrollWidth-1;function Tf({scrollContainerRef:e,enabled:t=!1}){let[r,o]=(0,Uo.useState)(!1),n=(0,Cf.useDebounce)((0,Uo.useCallback)(()=>{let i=e.current;i&&o(Yx(i))},[e,o]),200);return(0,Uo.useEffect)(()=>typeof window>"u"||!t||!e.current?()=>{}:(n(),e.current.addEventListener("scroll",n),window.addEventListener("resize",n),()=>{e.current?.removeEventListener("scroll",n),window.removeEventListener("resize",n)}),[e,t]),r}function kt(e,t){return e.reduce((r,o)=>{let n=t.getValue({item:o});return r.has(n)||r.set(n,[]),r.get(n)?.push(o),r},new Map)}var Xr=u(G(),1),Af=u(j(),1),If=u(z(),1);var Tt=u(P(),1);function Of({field:e,isVisible:t,onToggleVisibility:r}){return(0,Tt.jsx)(Xr.__experimentalItem,{onClick:e.enableHiding?r:void 0,children:(0,Tt.jsxs)(L,{direction:"row",gap:"sm",justify:"flex-start",align:"center",children:[(0,Tt.jsx)("div",{style:{height:24,width:24},children:t&&(0,Tt.jsx)(Xr.Icon,{icon:Rn})}),(0,Tt.jsx)("span",{className:"dataviews-view-config__label",children:e.label})]})})}function qx(e){return!!e}function Ta({showLabel:e=!0}){let{view:t,fields:r,onChangeView:o}=(0,If.useContext)(q),n=Ca(t,r);if(!n?.length)return null;let i=r.find(v=>v.id===t.titleField),a=r.find(v=>v.id===t.mediaField),s=r.find(v=>v.id===t.descriptionField),l=[{field:i,isVisibleFlag:"showTitle"},{field:a,isVisibleFlag:"showMedia"},{field:s,isVisibleFlag:"showDescription"}].filter(({field:v})=>qx(v)),c=t.fields??[],f=n.filter(v=>c.includes(v.id)).length,p=l.filter(({isVisibleFlag:v})=>t[v]??!0),d=p.length+f,m=d===1&&p.length===1;return(0,Tt.jsxs)(L,{direction:"column",className:"dataviews-field-control",children:[e&&(0,Tt.jsx)(Xr.BaseControl.VisualLabel,{children:(0,Af.__)("Properties")}),(0,Tt.jsx)(L,{direction:"column",className:"dataviews-view-config__properties",children:(0,Tt.jsxs)(Xr.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,size:"medium",children:[l.map(({field:v,isVisibleFlag:_})=>{let h=t[_]??!0,b=m&&h?{...v,enableHiding:!1}:v;return(0,Tt.jsx)(Of,{field:b,isVisible:h,onToggleVisibility:()=>{o({...t,[_]:!h})}},v.id)}),n.map(v=>{let _=c.includes(v.id),h=d===1&&_?{...v,enableHiding:!1}:v;return(0,Tt.jsx)(Of,{field:h,isVisible:_,onToggleVisibility:()=>{o({...t,fields:_?c.filter(b=>b!==v.id):[...c,v.id]})}},v.id)})]})})]})}var Oa=u(z(),1);function Qt(e,t={delay:400}){let[r,o]=(0,Oa.useState)(!1);return(0,Oa.useEffect)(()=>{if(!e)return;let n=setTimeout(()=>{o(!0)},t.delay);return()=>{clearTimeout(n),o(!1)}},[e,t.delay]),r}var K=u(P(),1);function Rf(e,t){if(e)return e;if(t==="integer"||t==="number")return"end"}function $x({item:e,fields:t,column:r,align:o}){let n=t.find(a=>a.id===r);if(!n)return null;let i=Y("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__cell-align-end":o==="end","dataviews-view-table__cell-align-center":o==="center"});return(0,K.jsx)("div",{className:i,children:(0,K.jsx)(n.render,{item:e,field:n})})}function Pf({hasBulkActions:e,item:t,level:r,actions:o,fields:n,id:i,view:a,titleField:s,mediaField:l,descriptionField:c,selection:f,getItemId:p,isItemClickable:d,onClickItem:m,renderItemLink:v,onChangeSelection:_,isActionsColumnSticky:h,posinset:b}){let{paginationInfo:y}=(0,wt.useContext)(q),A=ya(o,t),V=A&&f.includes(i),{showTitle:R=!0,showMedia:M=!0,showDescription:k=!0,infiniteScrollEnabled:S}=a,I=(0,wt.useRef)(!1),N=a.fields??[],g=s&&R||l&&M||c&&k;return(0,K.jsxs)("tr",{className:Y("dataviews-view-table__row",{"is-selected":A&&V,"has-bulk-actions":A}),onTouchStart:()=>{I.current=!0},"aria-setsize":S?y.totalItems:void 0,"aria-posinset":b,role:S?"article":void 0,onMouseDown:E=>{let T=(0,Su.isAppleOS)()?E.metaKey:E.ctrlKey;E.button===0&&T&&window.navigator.userAgent.toLowerCase().includes("firefox")&&E?.preventDefault()},onClick:E=>{if(!A)return;((0,Su.isAppleOS)()?E.metaKey:E.ctrlKey)&&!I.current&&document.getSelection()?.type!=="Range"&&_(f.includes(i)?f.filter(w=>i!==w):[...f,i])},children:[e&&(0,K.jsx)("td",{className:"dataviews-view-table__checkbox-column",children:(0,K.jsx)("div",{className:"dataviews-view-table__cell-content-wrapper",children:(0,K.jsx)(qr,{item:t,selection:f,onChangeSelection:_,getItemId:p,titleField:s,disabled:!A})})}),g&&(0,K.jsx)("td",{children:(0,K.jsx)(Ea,{item:t,level:r,titleField:R?s:void 0,mediaField:M?l:void 0,descriptionField:k?c:void 0,isItemClickable:d,onClickItem:m,renderItemLink:v})}),N.map(E=>{let{width:T,maxWidth:w,minWidth:O,align:x}=a.layout?.styles?.[E]??{},C=n.find(D=>D.id===E),F=Rf(x,C?.type);return(0,K.jsx)("td",{style:{width:T,maxWidth:w,minWidth:O},children:(0,K.jsx)($x,{fields:n,item:t,column:E,align:F})},E)}),!!o?.length&&(0,K.jsx)("td",{className:Y("dataviews-view-table__actions-column",{"dataviews-view-table__actions-column--sticky":!0,"dataviews-view-table__actions-column--stuck":h}),onClick:E=>E.stopPropagation(),children:(0,K.jsx)(Wo,{item:t,actions:o})})]})}function Kx({actions:e,data:t,fields:r,getItemId:o,getItemLevel:n,isLoading:i=!1,onChangeView:a,onChangeSelection:s,selection:l,setOpenedFilter:c,onClickItem:f,isItemClickable:p,renderItemLink:d,view:m,className:v,empty:_}){let{containerRef:h}=(0,wt.useContext)(q),b=Qt(i),y=(0,wt.useRef)(new Map),A=(0,wt.useRef)(void 0),[V,R]=(0,wt.useState)(),[M,k]=(0,wt.useState)(null);(0,wt.useEffect)(()=>{A.current&&(A.current.focus(),A.current=void 0)});let S=(0,wt.useId)(),I=Tf({scrollContainerRef:h,enabled:!!e?.length}),N=_a(e,t);if(V){A.current=V,R(void 0);return}let g=$=>{let Ne=y.current.get($.id),tt=Ne?y.current.get(Ne.fallback):void 0;R(tt?.node)},E=$=>{$.preventDefault(),$.stopPropagation();let Ne={getBoundingClientRect:()=>({x:$.clientX,y:$.clientY,top:$.clientY,left:$.clientX,right:$.clientX,bottom:$.clientY,width:0,height:0,toJSON:()=>({})})};window.requestAnimationFrame(()=>{k(Ne)})},T=!!t?.length,w=r.find($=>$.id===m.titleField),O=r.find($=>$.id===m.mediaField),x=r.find($=>$.id===m.descriptionField),C=m.groupBy?.field?r.find($=>$.id===m.groupBy?.field):null,F=C?kt(t,C):null,{showTitle:D=!0,showMedia:W=!0,showDescription:Q=!0}=m,ge=w&&D||O&&W||x&&Q,et=m.fields??[],Et=($,Ne)=>tt=>{tt?y.current.set($,{node:tt,fallback:et[Ne>0?Ne-1:1]}):y.current.delete($)},Dr=m.infiniteScrollEnabled&&!F,po=(0,xo.isRTL)();return T?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)("table",{className:Y("dataviews-view-table",v,{[`has-${m.layout?.density}-density`]:m.layout?.density&&["compact","comfortable"].includes(m.layout.density),"has-bulk-actions":N,"is-refreshing":!Dr&&b}),"aria-busy":i,"aria-describedby":S,role:Dr?"feed":void 0,inert:!Dr&&i?"true":void 0,children:[(0,K.jsxs)("colgroup",{children:[N&&(0,K.jsx)("col",{className:"dataviews-view-table__col-checkbox"}),ge&&(0,K.jsx)("col",{className:"dataviews-view-table__col-first-data"}),et.map(($,Ne)=>(0,K.jsx)("col",{className:Y(`dataviews-view-table__col-${$}`,{"dataviews-view-table__col-first-data":!ge&&Ne===0})},`col-${$}`)),!!e?.length&&(0,K.jsx)("col",{className:"dataviews-view-table__col-actions"})]}),M&&(0,K.jsx)(Aa.Popover,{anchor:M,onClose:()=>k(null),placement:"bottom-start",children:(0,K.jsx)(Ta,{showLabel:!1})}),(0,K.jsx)("thead",{onContextMenu:E,children:(0,K.jsxs)("tr",{className:"dataviews-view-table__row",children:[N&&(0,K.jsx)("th",{className:"dataviews-view-table__checkbox-column",scope:"col",onContextMenu:E,children:(0,K.jsx)(Sa,{selection:l,onChangeSelection:s,data:t,actions:e,getItemId:o})}),ge&&(0,K.jsx)("th",{scope:"col",children:w&&(0,K.jsx)(Go,{ref:Et(w.id,0),fieldId:w.id,view:m,fields:r,onChangeView:a,onHide:g,setOpenedFilter:c,canMove:!1,canInsertLeft:po?m.layout?.enableMoving??!0:!1,canInsertRight:po?!1:m.layout?.enableMoving??!0})}),et.map(($,Ne)=>{let{width:tt,maxWidth:vo,minWidth:Cn,align:En}=m.layout?.styles?.[$]??{},Tn=r.find(sl=>sl.id===$),Si=Rf(En,Tn?.type),On=m.layout?.enableMoving??!0;return(0,K.jsx)("th",{style:{width:tt,maxWidth:vo,minWidth:Cn,textAlign:Si},"aria-sort":m.sort?.direction&&m.sort?.field===$?ha[m.sort.direction]:void 0,scope:"col",children:(0,K.jsx)(Go,{ref:Et($,Ne),fieldId:$,view:m,fields:r,onChangeView:a,onHide:g,setOpenedFilter:c,canMove:On,canInsertLeft:On,canInsertRight:On})},$)}),!!e?.length&&(0,K.jsx)("th",{className:Y("dataviews-view-table__actions-column",{"dataviews-view-table__actions-column--sticky":!0,"dataviews-view-table__actions-column--stuck":!I}),children:(0,K.jsx)("span",{className:"dataviews-view-table-header",children:(0,xo.__)("Actions")})})]})}),T&&C&&F?Array.from(F.entries()).map(([$,Ne])=>(0,K.jsxs)("tbody",{children:[(0,K.jsx)("tr",{className:"dataviews-view-table__group-header-row",children:(0,K.jsx)("td",{colSpan:et.length+(ge?1:0)+(N?1:0)+(e?.length?1:0),className:"dataviews-view-table__group-header-cell",children:m.groupBy?.showLabel===!1?$:(0,xo.sprintf)((0,xo.__)("%1$s: %2$s"),C.label,$)})}),Ne.map((tt,vo)=>(0,K.jsx)(Pf,{item:tt,level:m.showLevels&&typeof n=="function"?n(tt):void 0,hasBulkActions:N,actions:e,fields:r,id:o(tt)||vo.toString(),view:m,titleField:w,mediaField:O,descriptionField:x,selection:l,getItemId:o,onChangeSelection:s,onClickItem:f,renderItemLink:d,isItemClickable:p,isActionsColumnSticky:!I},o(tt)))]},`group-${$}`)):(0,K.jsx)("tbody",{children:T&&t.map(($,Ne)=>(0,K.jsx)(Pf,{item:$,level:m.showLevels&&typeof n=="function"?n($):void 0,hasBulkActions:N,actions:e,fields:r,id:o($)||Ne.toString(),view:m,titleField:w,mediaField:O,descriptionField:x,selection:l,getItemId:o,onChangeSelection:s,onClickItem:f,renderItemLink:d,isItemClickable:p,isActionsColumnSticky:!I,posinset:Dr?Ne+1:void 0},o($)))})]}),Dr&&i&&(0,K.jsx)("div",{className:"dataviews-loading",id:S,children:(0,K.jsx)("p",{className:"dataviews-loading-more",children:(0,K.jsx)(Aa.Spinner,{})})})]}):(0,K.jsx)("div",{className:Y("dataviews-no-results",{"is-refreshing":b}),id:S,children:_})}var Vf=Kx;var Mf=u(G(),1),Ra=u(j(),1);var Ot=u(G(),1);var Bn=u(j(),1),Df=u(bt(),1),kf=u(hu(),1),Pa=u(z(),1);var Zx=u(G(),1),Xx=u(j(),1),Ia=u(z(),1);var Qx=u(P(),1),Jx=[{value:120,breakpoint:1},{value:170,breakpoint:1},{value:230,breakpoint:1},{value:290,breakpoint:1112},{value:350,breakpoint:1636},{value:430,breakpoint:588}],e0=Jx[2].value;function Nf(){let e=(0,Ia.useContext)(q),t=e.view;return(0,Ia.useMemo)(()=>{let r=e.containerWidth,o=32,n=t.layout?.previewSize??e0,i=Math.floor((r+o)/(n+o));return Math.max(1,i)},[e.containerWidth,t.layout?.previewSize])}var ie=u(P(),1),{Badge:t0}=Z(Ot.privateApis);function r0(e,t){let r=[];for(let o=0,n=e.length;o<n;o+=t)r.push(e.slice(o,o+t));return r}var o0=(0,Pa.forwardRef)(function e({view:t,selection:r,onChangeSelection:o,onClickItem:n,isItemClickable:i,renderItemLink:a,getItemId:s,item:l,actions:c,mediaField:f,titleField:p,descriptionField:d,regularFields:m,badgeFields:v,hasBulkActions:_,config:h,...b},y){let{showTitle:A=!0,showMedia:V=!0,showDescription:R=!0}=t,M=ya(c,l),k=s(l),S=(0,Df.useInstanceId)(e),I=r.includes(k),N=(0,ie.jsx)("span",{className:"dataviews-view-grid__media-placeholder"}),g=V&&f?.render,E=g?(0,ie.jsx)(f.render,{item:l,field:f,config:h}):N,T=A&&p?.render?(0,ie.jsx)(p.render,{item:l,field:p}):null,w,O;return i(l)&&n&&(T?(w={"aria-labelledby":`dataviews-view-grid__title-field-${S}`},O={id:`dataviews-view-grid__title-field-${S}`}):w={"aria-label":(0,Bn.__)("Navigate to item")}),(0,ie.jsxs)(L,{direction:"column",...b,ref:y,className:Y(b.className,"dataviews-view-grid__row__gridcell","dataviews-view-grid__card",{"is-selected":M&&I}),onClickCapture:x=>{if(b.onClickCapture?.(x),(0,kf.isAppleOS)()?x.metaKey:x.ctrlKey){if(x.stopPropagation(),x.preventDefault(),!M)return;o(r.includes(k)?r.filter(C=>k!==C):[...r,k])}},children:[(0,ie.jsx)(Zr,{item:l,isItemClickable:i,onClickItem:n,renderItemLink:a,className:Y("dataviews-view-grid__media",{"dataviews-view-grid__media--placeholder":!g}),...w,children:E}),_&&(0,ie.jsx)(qr,{item:l,selection:r,onChangeSelection:o,getItemId:s,titleField:p,disabled:!M}),!!c?.length&&(0,ie.jsx)("div",{className:"dataviews-view-grid__media-actions",children:(0,ie.jsx)(Wo,{item:l,actions:c,isCompact:!0})}),A&&(0,ie.jsx)("div",{className:"dataviews-view-grid__title",children:(0,ie.jsx)(Zr,{item:l,isItemClickable:i,onClickItem:n,renderItemLink:a,className:"dataviews-view-grid__title-field dataviews-title-field",...O,title:p?.getValueFormatted({item:l,field:p})||void 0,children:T})}),(0,ie.jsxs)(L,{direction:"column",gap:"xs",children:[R&&d?.render&&(0,ie.jsx)(d.render,{item:l,field:d}),!!v?.length&&(0,ie.jsx)(L,{direction:"row",className:"dataviews-view-grid__badge-fields",gap:"sm",wrap:"wrap",align:"top",justify:"flex-start",children:v.map(x=>(0,ie.jsx)(t0,{className:"dataviews-view-grid__field-value",children:(0,ie.jsx)(x.render,{item:l,field:x})},x.id))}),!!m?.length&&(0,ie.jsx)(L,{direction:"column",className:"dataviews-view-grid__fields",gap:"xs",children:m.map(x=>(0,ie.jsx)(Ot.Flex,{className:"dataviews-view-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)(Ot.Tooltip,{text:x.label,children:(0,ie.jsx)(Ot.FlexItem,{className:"dataviews-view-grid__field-name",children:x.header})}),(0,ie.jsx)(Ot.FlexItem,{className:"dataviews-view-grid__field-value",style:{maxHeight:"none"},children:(0,ie.jsx)(x.render,{item:l,field:x})})]})},x.id))})]})]})});function Cu({data:e,isInfiniteScroll:t,className:r,inert:o,isLoading:n,view:i,fields:a,selection:s,onChangeSelection:l,onClickItem:c,isItemClickable:f,renderItemLink:p,getItemId:d,actions:m}){let{paginationInfo:v,resizeObserverRef:_}=(0,Pa.useContext)(q),h=Nf(),b=_a(m,e),y=a.find(N=>N.id===i?.titleField),A=a.find(N=>N.id===i?.mediaField),V=a.find(N=>N.id===i?.descriptionField),R=i.fields??[],{regularFields:M,badgeFields:k}=R.reduce((N,g)=>{let E=a.find(w=>w.id===g);if(!E)return N;let T=i.layout?.badgeFields?.includes(g)?"badgeFields":"regularFields";return N[T].push(E),N},{regularFields:[],badgeFields:[]}),S="900px",I=Math.ceil(e.length/h);return(0,ie.jsx)(Ot.Composite,{role:t?"feed":"grid",className:Y("dataviews-view-grid",r),focusWrap:!0,"aria-busy":n,"aria-rowcount":t?void 0:I,ref:_,inert:o,children:r0(e,h).map((N,g)=>(0,ie.jsx)(Ot.Composite.Row,{render:(0,ie.jsx)("div",{role:"row","aria-rowindex":g+1,"aria-label":(0,Bn.sprintf)((0,Bn.__)("Row %d"),g+1),className:"dataviews-view-grid__row",style:{gridTemplateColumns:`repeat( ${h}, minmax(0, 1fr) )`}}),children:N.map((E,T)=>{let w=g*h+T;return(0,ie.jsx)(Ot.Composite.Item,{render:O=>(0,ie.jsx)(o0,{...O,role:t?"article":"gridcell","aria-setsize":t?v.totalItems:void 0,"aria-posinset":t?w+1:void 0,view:i,selection:s,onChangeSelection:l,onClickItem:c,isItemClickable:f,renderItemLink:p,getItemId:d,item:E,actions:m,mediaField:A,titleField:y,descriptionField:V,regularFields:M,badgeFields:k,hasBulkActions:b,config:{sizes:S}})},d(E))})},g))})}var At=u(P(),1);function n0({actions:e,data:t,fields:r,getItemId:o,isLoading:n,onChangeSelection:i,onClickItem:a,isItemClickable:s,renderItemLink:l,selection:c,view:f,className:p,empty:d}){let m=Qt(!!n),v=!!t?.length,_=f.groupBy?.field?r.find(A=>A.id===f.groupBy?.field):null,h=_?kt(t,_):null,b=f.infiniteScrollEnabled&&!h;if(!v)return(0,At.jsx)("div",{className:Y("dataviews-no-results",{"is-refreshing":m}),children:d});let y={className:Y(p,{"is-refreshing":!b&&m}),inert:!b&&n?"true":void 0,isLoading:n,view:f,fields:r,selection:c,onChangeSelection:i,onClickItem:a,isItemClickable:s,renderItemLink:l,getItemId:o,actions:e};return(0,At.jsxs)(At.Fragment,{children:[v&&_&&h&&(0,At.jsx)(L,{direction:"column",gap:"lg",children:Array.from(h.entries()).map(([A,V])=>(0,At.jsxs)(L,{direction:"column",gap:"sm",children:[(0,At.jsx)("h3",{className:"dataviews-view-grid__group-header",children:f.groupBy?.showLabel===!1?A:(0,Ra.sprintf)((0,Ra.__)("%1$s: %2$s"),_.label,A)}),(0,At.jsx)(Cu,{...y,data:V,isInfiniteScroll:!1})]},A))}),!h&&(0,At.jsx)(Cu,{...y,data:t,isInfiniteScroll:!!b}),b&&n&&(0,At.jsx)("p",{className:"dataviews-loading-more",children:(0,At.jsx)(Mf.Spinner,{})})]})}var Ff=n0;var Va=u(bt(),1),We=u(G(),1),Le=u(z(),1),jn=u(j(),1);var Au=u(qt(),1);var U=u(P(),1),{Menu:Eu}=Z(We.privateApis);function Tu(e){return`${e}-item-wrapper`}function i0(e,t){return`${e}-primary-action-${t}`}function Ou(e){return`${e}-dropdown`}function a0({idPrefix:e,primaryAction:t,item:r}){let o=(0,Au.useRegistry)(),[n,i]=(0,Le.useState)(!1),a=i0(e,t.id),s=typeof t.label=="string"?t.label:t.label([r]);return"RenderModal"in t?(0,U.jsx)("div",{role:"gridcell",children:(0,U.jsx)(We.Composite.Item,{id:a,render:(0,U.jsx)(We.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,text:s,size:"small",onClick:()=>i(!0)}),children:n&&(0,U.jsx)(Ln,{action:t,items:[r],closeModal:()=>i(!1)})})},t.id):(0,U.jsx)("div",{role:"gridcell",children:(0,U.jsx)(We.Composite.Item,{id:a,render:(0,U.jsx)(We.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,size:"small",onClick:()=>{t.callback([r],{registry:o})},children:s})})},t.id)}function Lf({view:e,actions:t,idPrefix:r,isSelected:o,item:n,titleField:i,mediaField:a,descriptionField:s,onSelect:l,otherFields:c,onDropdownTriggerKeyDown:f,posinset:p}){let{showTitle:d=!0,showMedia:m=!0,showDescription:v=!0,infiniteScrollEnabled:_}=e,h=(0,Le.useRef)(null),b=`${r}-label`,y=`${r}-description`,A=(0,Au.useRegistry)(),[V,R]=(0,Le.useState)(!1),[M,k]=(0,Le.useState)(null),S=({type:x})=>{R(x==="mouseenter")},{paginationInfo:I}=(0,Le.useContext)(q);(0,Le.useEffect)(()=>{o&&h.current?.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})},[o]);let{primaryAction:N,eligibleActions:g}=(0,Le.useMemo)(()=>{let x=t.filter(F=>!F.isEligible||F.isEligible(n));return{primaryAction:x.filter(F=>F.isPrimary)[0],eligibleActions:x}},[t,n]),E=N&&t.length===1,T=m&&a?.render?(0,U.jsx)("div",{className:"dataviews-view-list__media-wrapper",children:(0,U.jsx)(a.render,{item:n,field:a,config:{sizes:"52px"}})}):null,w=d&&i?.render?(0,U.jsx)(i.render,{item:n,field:i}):null,O=g?.length>0&&(0,U.jsxs)(L,{direction:"row",gap:"md",className:"dataviews-view-list__item-actions",children:[N&&(0,U.jsx)(a0,{idPrefix:r,primaryAction:N,item:n}),!E&&(0,U.jsxs)("div",{role:"gridcell",children:[(0,U.jsxs)(Eu,{placement:"bottom-end",children:[(0,U.jsx)(Eu.TriggerButton,{render:(0,U.jsx)(We.Composite.Item,{id:Ou(r),render:(0,U.jsx)(We.Button,{size:"small",icon:Nn,label:(0,jn.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,onKeyDown:f})})}),(0,U.jsx)(Eu.Popover,{children:(0,U.jsx)(bu,{actions:g,item:n,registry:A,setActiveModalAction:k})})]}),!!M&&(0,U.jsx)(Ln,{action:M,items:[n],closeModal:()=>k(null)})]})]});return(0,U.jsx)(We.Composite.Row,{ref:h,render:(0,U.jsx)("div",{"aria-posinset":p,"aria-setsize":_?I.totalItems:void 0}),role:_?"article":"row",className:Y({"is-selected":o,"is-hovered":V}),onMouseEnter:S,onMouseLeave:S,children:(0,U.jsxs)(L,{direction:"row",className:"dataviews-view-list__item-wrapper",children:[(0,U.jsx)("div",{role:"gridcell",children:(0,U.jsx)(We.Composite.Item,{id:Tu(r),"aria-pressed":o,"aria-labelledby":b,"aria-describedby":y,className:"dataviews-view-list__item",onClick:()=>l(n)})}),(0,U.jsxs)(L,{direction:"row",gap:"md",justify:"start",align:"flex-start",style:{flex:1,minWidth:0},children:[T,(0,U.jsxs)(L,{direction:"column",gap:"xs",className:"dataviews-view-list__field-wrapper",children:[(0,U.jsxs)(L,{direction:"row",align:"center",children:[(0,U.jsx)("div",{className:"dataviews-title-field dataviews-view-list__title-field",id:b,children:w}),O]}),v&&s?.render&&(0,U.jsx)("div",{className:"dataviews-view-list__field",children:(0,U.jsx)(s.render,{item:n,field:s})}),(0,U.jsx)("div",{className:"dataviews-view-list__fields",id:y,children:c.map(x=>(0,U.jsxs)("div",{className:"dataviews-view-list__field",children:[(0,U.jsx)(We.VisuallyHidden,{as:"span",className:"dataviews-view-list__field-label",children:x.label}),(0,U.jsx)("span",{className:"dataviews-view-list__field-value",children:(0,U.jsx)(x.render,{item:n,field:x})})]},x.id))})]})]})]})})}function s0(e){return!!e}function Iu(e){let{actions:t,data:r,fields:o,getItemId:n,isLoading:i,onChangeSelection:a,selection:s,view:l,className:c,empty:f}=e,p=(0,Va.useInstanceId)(Iu,"view-list"),d=Qt(!!i),m=r?.findLast(x=>s.includes(n(x))),v=o.find(x=>x.id===l.titleField),_=o.find(x=>x.id===l.mediaField),h=o.find(x=>x.id===l.descriptionField),b=(l?.fields??[]).map(x=>o.find(C=>x===C.id)).filter(s0),y=x=>a([n(x)]),A=(0,Le.useCallback)(x=>`${p}-${n(x)}`,[p,n]),V=(0,Le.useCallback)((x,C)=>C.startsWith(A(x)),[A]),[R,M]=(0,Le.useState)(void 0);(0,Le.useEffect)(()=>{m&&M(Tu(A(m)))},[m,A]);let k=r.findIndex(x=>V(x,R??"")),S=(0,Va.usePrevious)(k),I=k!==-1,N=(0,Le.useCallback)((x,C)=>{let F=Math.min(r.length-1,Math.max(0,x));if(!r[F])return;let D=A(r[F]),W=C(D);M(W),document.getElementById(W)?.focus()},[r,A]);(0,Le.useEffect)(()=>{!I&&(S!==void 0&&S!==-1)&&N(S,Tu)},[I,N,S]);let g=(0,Le.useCallback)(x=>{x.key==="ArrowDown"&&(x.preventDefault(),N(k+1,Ou)),x.key==="ArrowUp"&&(x.preventDefault(),N(k-1,Ou))},[N,k]),E=!!r?.length,T=l.groupBy?.field?o.find(x=>x.id===l.groupBy?.field):null,w=E&&T?kt(r,T):null,O=l.infiniteScrollEnabled&&!w;return E?E&&T&&w?(0,U.jsx)(We.Composite,{id:`${p}`,render:(0,U.jsx)("div",{}),className:"dataviews-view-list__group",role:"grid",activeId:R,setActiveId:M,children:(0,U.jsx)(L,{direction:"column",gap:"lg",className:Y("dataviews-view-list",c),children:Array.from(w.entries()).map(([x,C])=>(0,U.jsxs)(L,{direction:"column",gap:"sm",children:[(0,U.jsx)("h3",{className:"dataviews-view-list__group-header",children:l.groupBy?.showLabel===!1?x:(0,jn.sprintf)((0,jn.__)("%1$s: %2$s"),T.label,x)}),C.map(F=>{let D=A(F);return(0,U.jsx)(Lf,{view:l,idPrefix:D,actions:t,item:F,isSelected:F===m,onSelect:y,mediaField:_,titleField:v,descriptionField:h,otherFields:b,onDropdownTriggerKeyDown:g},D)})]},x))})}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(We.Composite,{id:p,render:(0,U.jsx)("div",{}),className:Y("dataviews-view-list",c,{[`has-${l.layout?.density}-density`]:l.layout?.density&&["compact","comfortable"].includes(l.layout.density),"is-refreshing":!O&&d}),role:l.infiniteScrollEnabled?"feed":"grid",activeId:R,setActiveId:M,inert:!O&&i?"true":void 0,children:r.map((x,C)=>{let F=A(x);return(0,U.jsx)(Lf,{view:l,idPrefix:F,actions:t,item:x,isSelected:x===m,onSelect:y,mediaField:_,titleField:v,descriptionField:h,otherFields:b,onDropdownTriggerKeyDown:g,posinset:l.infiniteScrollEnabled?C+1:void 0},F)})}),O&&i&&(0,U.jsx)("p",{className:"dataviews-loading-more",children:(0,U.jsx)(We.Spinner,{})})]}):(0,U.jsx)("div",{className:Y("dataviews-no-results",{"is-refreshing":d}),children:f})}var Yf=u(G(),1);var Na=u(j(),1),Bf=u(z(),1);var Yo=u(P(),1);function jf({groupName:e,groupData:t,groupField:r,showLabel:o=!0,children:n}){let i=o?(0,Bf.createInterpolateElement)((0,Na.sprintf)((0,Na.__)("%s: <groupName />"),r.label).trim(),{groupName:(0,Yo.jsx)(r.render,{item:t[0],field:r})}):(0,Yo.jsx)(r.render,{item:t[0],field:r});return(0,Yo.jsxs)(L,{direction:"column",className:"dataviews-view-activity__group",children:[(0,Yo.jsx)("h3",{className:"dataviews-view-activity__group-header",children:i}),n]},e)}var Hf=u(G(),1),wo=u(z(),1),zf=u(qt(),1),Wf=u(bt(),1);var De=u(P(),1);function l0(e){let{view:t,actions:r,item:o,titleField:n,mediaField:i,descriptionField:a,otherFields:s,posinset:l,onClickItem:c,renderItemLink:f,isItemClickable:p}=e,{showTitle:d=!0,showMedia:m=!0,showDescription:v=!0,infiniteScrollEnabled:_}=t,h=(0,wo.useRef)(null),b=(0,zf.useRegistry)(),{paginationInfo:y}=(0,wo.useContext)(q),{primaryActions:A,eligibleActions:V}=(0,wo.useMemo)(()=>{let g=r.filter(T=>!T.isEligible||T.isEligible(o));return{primaryActions:g.filter(T=>T.isPrimary),eligibleActions:g}},[r,o]),R=(0,Wf.useViewportMatch)("medium","<"),M=t.layout?.density??"balanced",k=m&&M!=="compact"&&i?.render?(0,De.jsx)(i.render,{item:o,field:i,config:{sizes:M==="comfortable"?"32px":"24px"}}):null,S=(0,De.jsx)("div",{className:"dataviews-view-activity__item-type-icon",children:k||(0,De.jsx)("span",{className:"dataviews-view-activity__item-bullet","aria-hidden":"true"})}),I=d&&n?.render?(0,De.jsx)(n.render,{item:o,field:n}):null,N=(0,wo.useMemo)(()=>M==="comfortable"?"md":"sm",[M]);return(0,De.jsx)("div",{ref:h,role:_?"article":void 0,"aria-posinset":l,"aria-setsize":_?y.totalItems:void 0,className:Y("dataviews-view-activity__item",M==="compact"&&"is-compact",M==="balanced"&&"is-balanced",M==="comfortable"&&"is-comfortable"),children:(0,De.jsxs)(L,{direction:"row",gap:"lg",justify:"start",align:"flex-start",children:[(0,De.jsx)(L,{direction:"column",gap:"xs",align:"center",className:"dataviews-view-activity__item-type",children:S}),(0,De.jsxs)(L,{direction:"column",gap:N,align:"flex-start",className:"dataviews-view-activity__item-content",children:[I&&(0,De.jsx)(Zr,{item:o,isItemClickable:p,onClickItem:c,renderItemLink:f,className:"dataviews-view-activity__item-title",children:I}),v&&a&&(0,De.jsx)("div",{className:"dataviews-view-activity__item-description",children:(0,De.jsx)(a.render,{item:o,field:a})}),(0,De.jsx)("div",{className:"dataviews-view-activity__item-fields",children:s.map(g=>(0,De.jsxs)("div",{className:"dataviews-view-activity__item-field",children:[(0,De.jsx)(Hf.VisuallyHidden,{as:"span",className:"dataviews-view-activity__item-field-label",children:g.label}),(0,De.jsx)("span",{className:"dataviews-view-activity__item-field-value",children:(0,De.jsx)(g.render,{item:o,field:g})})]},g.id))}),!!A?.length&&(0,De.jsx)(xu,{item:o,actions:A,registry:b,buttonVariant:"secondary"})]}),(A.length<V.length||R&&V.length>0)&&(0,De.jsx)("div",{className:"dataviews-view-activity__item-actions",children:(0,De.jsx)(Wo,{item:o,actions:V,isCompact:!0})})]})})}var Gf=l0;var Uf=u(ue(),1);function u0(e){return!!e}function Pu(e){let{data:t,fields:r,getItemId:o,view:n}=e,i=r.find(c=>c.id===n.titleField),a=r.find(c=>c.id===n.mediaField),s=r.find(c=>c.id===n.descriptionField),l=(n?.fields??[]).map(c=>r.find(f=>c===f.id)).filter(u0);return t.map((c,f)=>(0,Uf.createElement)(Gf,{...e,key:o(c),item:c,mediaField:a,titleField:i,descriptionField:s,otherFields:l,posinset:n.infiniteScrollEnabled?f+1:void 0}))}var It=u(P(),1);function qf(e){let{empty:t,data:r,fields:o,isLoading:n,view:i,className:a}=e,s=Qt(!!n),l=!!r?.length,c=i.groupBy?.field?o.find(_=>_.id===i.groupBy?.field):null,f=l&&c?kt(r,c):null,p=i.infiniteScrollEnabled&&!f;if(!l)return(0,It.jsx)("div",{className:Y("dataviews-no-results",{"is-refreshing":s}),children:t});let d=!p&&!!n,m=Y("dataviews-view-activity",a,{"is-refreshing":!p&&s}),v=f?Array.from(f.entries()):[];return l&&c&&f?(0,It.jsx)(L,{direction:"column",gap:"sm",className:m,inert:d?"true":void 0,children:v.map(([_,h])=>(0,It.jsx)(jf,{groupName:_,groupData:h,groupField:c,showLabel:i.groupBy?.showLabel!==!1,children:(0,It.jsx)(Pu,{...e,data:h})},_))}):(0,It.jsxs)(It.Fragment,{children:[(0,It.jsx)("div",{className:m,role:i.infiniteScrollEnabled?"feed":void 0,inert:d?"true":void 0,children:(0,It.jsx)(Pu,{...e})}),p&&n&&(0,It.jsx)("p",{className:"dataviews-loading-more",children:(0,It.jsx)(Yf.Spinner,{})})]})}var yt=u(G(),1),Wn=u(j(),1),Jf=u(bt(),1),em=u(z(),1);var Da=u(G(),1),Kf=u(qt(),1),yo=u(z(),1);var Vu=u(j(),1);var Hn=u(G(),1),qo=u(z(),1),Pt=u(j(),1);var br=u(P(),1);function Ru(){let{view:e,onChangeView:t,paginationInfo:{totalItems:r=0,totalPages:o}}=(0,qo.useContext)(q);if(!r||!o||e.infiniteScrollEnabled)return null;let n=e.page??1,i=Array.from(Array(o)).map((a,s)=>{let l=s+1;return{value:l.toString(),label:l.toString(),"aria-label":n===l?(0,Pt.sprintf)((0,Pt.__)("Page %1$d of %2$d"),n,o):l.toString()}});return!!r&&o!==1&&(0,br.jsxs)(L,{direction:"row",className:"dataviews-pagination",justify:"end",align:"center",gap:"xl",children:[(0,br.jsx)(L,{direction:"row",justify:"flex-start",align:"center",gap:"xs",className:"dataviews-pagination__page-select",children:(0,qo.createInterpolateElement)((0,Pt.sprintf)((0,Pt._x)("<div>Page</div>%1$s<div>of %2$d</div>","paging"),"<CurrentPage />",o),{div:(0,br.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,br.jsx)(Hn.SelectControl,{"aria-label":(0,Pt.__)("Current page"),value:n.toString(),options:i,onChange:a=>{t({...e,page:+a})},size:"small",variant:"minimal"})})}),(0,br.jsxs)(L,{direction:"row",gap:"xs",align:"center",children:[(0,br.jsx)(Hn.Button,{onClick:()=>t({...e,page:n-1}),disabled:n===1,accessibleWhenDisabled:!0,label:(0,Pt.__)("Previous page"),icon:(0,Pt.isRTL)()?na:aa,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,br.jsx)(Hn.Button,{onClick:()=>t({...e,page:n+1}),disabled:n>=o,accessibleWhenDisabled:!0,label:(0,Pt.__)("Next page"),icon:(0,Pt.isRTL)()?aa:na,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})}var $f=(0,qo.memo)(Ru);var Mt=u(P(),1),c0=[];function zn(e){return(0,yo.useMemo)(()=>e?.every(t=>t.supportsBulk),[e])}function d0({selection:e,selectedItems:t,onChangeSelection:r,data:o,getItemId:n}){let i=t.length===o.length;return(0,Mt.jsx)(Da.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",checked:i,indeterminate:!i&&!!t.length,onChange:()=>{if(i)r(e.filter(a=>!o.some(s=>a===n(s))));else{let a=new Set([...e,...o.map(s=>n(s))]);r(Array.from(a))}},"aria-label":i?(0,Vu.__)("Deselect all"):(0,Vu.__)("Select all")})}function f0({actions:e,items:t,selection:r}){let o=(0,Kf.useRegistry)(),[n,i]=(0,yo.useState)(null);return(0,Mt.jsx)(L,{direction:"row",gap:"xs",children:e.map(a=>{if(!("callback"in a))return null;let{id:s,label:l,icon:c,isPrimary:f,callback:p}=a,d=typeof l=="string"?l:l(t),m=f?"primary":"tertiary",v=s===n;return(0,Mt.jsx)(Da.Button,{accessibleWhenDisabled:!0,icon:c,disabled:v||!r?.length,isBusy:v,onClick:async()=>{i(s),await p(t,{registry:o}),i(null)},size:"compact",variant:m,children:d},s)})})}function Nu(){let{data:e,selection:t,onChangeSelection:r,getItemId:o,actions:n=c0,paginationInfo:i}=(0,yo.useContext)(q),a=zn(n),s=_f(t.length,e.length,i.totalItems),l=(0,yo.useMemo)(()=>e.filter(c=>t.includes(o(c))),[t,o,e]);return(0,Mt.jsxs)(L,{direction:"row",justify:"space-between",align:"center",className:"dataviews-footer",gap:"sm",children:[(0,Mt.jsxs)(L,{direction:"row",className:"dataviews-picker-footer__bulk-selection",gap:"md",align:"center",children:[a&&(0,Mt.jsx)(d0,{selection:t,selectedItems:l,onChangeSelection:r,data:e,getItemId:o}),(0,Mt.jsx)("span",{className:"dataviews-bulk-actions-footer__item-count",children:s})]}),(0,Mt.jsx)($f,{}),!!n?.length&&(0,Mt.jsx)("div",{className:"dataviews-picker-footer__actions",children:(0,Mt.jsx)(f0,{actions:n,items:l,selection:t})})]})}var Zf=u(z(),1);var Xf=u(P(),1),Du=(0,Zf.forwardRef)(({className:e,previewSize:t,...r},o)=>(0,Xf.jsx)("div",{ref:o,className:Y("dataviews-view-grid-items",e),style:{gridTemplateColumns:t&&`repeat(auto-fill, minmax(${t}px, 1fr))`},...r}));var X=u(P(),1),{Badge:m0}=Z(yt.privateApis);function Qf({view:e,multiselect:t,selection:r,onChangeSelection:o,getItemId:n,item:i,mediaField:a,titleField:s,descriptionField:l,regularFields:c,badgeFields:f,config:p,posinset:d,setsize:m}){let{showTitle:v=!0,showMedia:_=!0,showDescription:h=!0}=e,b=n(i),y=r.includes(b),A=a?.render?(0,X.jsx)(a.render,{item:i,field:a,config:p}):null,V=v&&s?.render?(0,X.jsx)(s.render,{item:i,field:s}):null;return(0,X.jsxs)(yt.Composite.Item,{"aria-label":s?s.getValue({item:i})||(0,Wn.__)("(no title)"):void 0,render:({children:R,...M})=>(0,X.jsx)(L,{direction:"column",children:R,...M}),role:"option","aria-posinset":d,"aria-setsize":m,className:Y("dataviews-view-picker-grid__card",{"is-selected":y}),"aria-selected":y,onClick:()=>{if(y)o(r.filter(R=>b!==R));else{let R=t?[...r,b]:[b];o(R)}},children:[_&&A&&(0,X.jsx)("div",{className:"dataviews-view-picker-grid__media",children:A}),_&&A&&(0,X.jsx)(qr,{item:i,selection:r,onChangeSelection:o,getItemId:n,titleField:s,disabled:!1,"aria-hidden":!0,tabIndex:-1}),v&&(0,X.jsx)(L,{direction:"row",justify:"space-between",className:"dataviews-view-picker-grid__title-actions",children:(0,X.jsx)("div",{className:"dataviews-view-picker-grid__title-field dataviews-title-field",children:V})}),(0,X.jsxs)(L,{direction:"column",gap:"xs",children:[h&&l?.render&&(0,X.jsx)(l.render,{item:i,field:l}),!!f?.length&&(0,X.jsx)(L,{direction:"row",className:"dataviews-view-picker-grid__badge-fields",gap:"sm",wrap:"wrap",align:"top",justify:"flex-start",children:f.map(R=>(0,X.jsx)(m0,{className:"dataviews-view-picker-grid__field-value",children:(0,X.jsx)(R.render,{item:i,field:R})},R.id))}),!!c?.length&&(0,X.jsx)(L,{direction:"column",className:"dataviews-view-picker-grid__fields",gap:"xs",children:c.map(R=>(0,X.jsx)(yt.Flex,{className:"dataviews-view-picker-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(yt.FlexItem,{className:"dataviews-view-picker-grid__field-name",children:R.header}),(0,X.jsx)(yt.FlexItem,{className:"dataviews-view-picker-grid__field-value",style:{maxHeight:"none"},children:(0,X.jsx)(R.render,{item:i,field:R})})]})},R.id))})]})]},b)}function tm({groupName:e,groupField:t,showLabel:r=!0,children:o}){let n=(0,Jf.useInstanceId)(tm,"dataviews-view-picker-grid-group__header");return(0,X.jsxs)(L,{direction:"column",gap:"sm",role:"group","aria-labelledby":n,children:[(0,X.jsx)("h3",{className:"dataviews-view-picker-grid-group__header",id:n,children:r?(0,Wn.sprintf)((0,Wn.__)("%1$s: %2$s"),t.label,e):e}),o]},e)}function p0({actions:e,data:t,fields:r,getItemId:o,isLoading:n,onChangeSelection:i,selection:a,view:s,className:l,empty:c}){let{resizeObserverRef:f,paginationInfo:p,itemListLabel:d}=(0,em.useContext)(q),m=r.find(T=>T.id===s?.titleField),v=r.find(T=>T.id===s?.mediaField),_=r.find(T=>T.id===s?.descriptionField),h=s.fields??[],{regularFields:b,badgeFields:y}=h.reduce((T,w)=>{let O=r.find(C=>C.id===w);if(!O)return T;let x=s.layout?.badgeFields?.includes(w)?"badgeFields":"regularFields";return T[x].push(O),T},{regularFields:[],badgeFields:[]}),A=!!t?.length,V=s.layout?.previewSize,R=zn(e),M="900px",k=s.groupBy?.field?r.find(T=>T.id===s.groupBy?.field):null,S=k?kt(t,k):null,I=s.infiniteScrollEnabled&&!S,N=s?.page??1,g=s?.perPage??0,E=I?p?.totalItems:void 0;return(0,X.jsxs)(X.Fragment,{children:[A&&k&&S&&(0,X.jsx)(yt.Composite,{virtualFocus:!0,orientation:"horizontal",role:"listbox","aria-multiselectable":R,className:Y("dataviews-view-picker-grid",l),"aria-label":d,render:({children:T,...w})=>(0,X.jsx)(L,{direction:"column",gap:"lg",children:T,...w}),children:Array.from(S.entries()).map(([T,w])=>(0,X.jsx)(tm,{groupName:T,groupField:k,showLabel:s.groupBy?.showLabel!==!1,children:(0,X.jsx)(Du,{previewSize:V,style:{gridTemplateColumns:V&&`repeat(auto-fill, minmax(${V}px, 1fr))`},"aria-busy":n,ref:f,children:w.map(O=>{let x=(N-1)*g+t.indexOf(O)+1;return(0,X.jsx)(Qf,{view:s,multiselect:R,selection:a,onChangeSelection:i,getItemId:o,item:O,mediaField:v,titleField:m,descriptionField:_,regularFields:b,badgeFields:y,config:{sizes:M},posinset:x,setsize:E},o(O))})})},T))}),A&&!S&&(0,X.jsx)(yt.Composite,{render:(0,X.jsx)(Du,{className:Y("dataviews-view-picker-grid",l),previewSize:V,"aria-busy":n,ref:f}),virtualFocus:!0,orientation:"horizontal",role:"listbox","aria-multiselectable":R,"aria-label":d,children:t.map((T,w)=>{let O=I?w+1:void 0;return I||(O=(N-1)*g+w+1),(0,X.jsx)(Qf,{view:s,multiselect:R,selection:a,onChangeSelection:i,getItemId:o,item:T,mediaField:v,titleField:m,descriptionField:_,regularFields:b,badgeFields:y,config:{sizes:M},posinset:O,setsize:E},o(T))})}),!A&&(0,X.jsx)("div",{className:Y({"dataviews-loading":n,"dataviews-no-results":!n}),children:n?(0,X.jsx)("p",{children:(0,X.jsx)(yt.Spinner,{})}):c}),A&&n&&(0,X.jsx)("p",{className:"dataviews-loading-more",children:(0,X.jsx)(yt.Spinner,{})})]})}var rm=p0;var ka=u(j(),1),_o=u(G(),1),Ft=u(z(),1);var ee=u(P(),1);function v0({item:e,fields:t,column:r,align:o}){let n=t.find(a=>a.id===r);if(!n)return null;let i=Y("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__cell-align-end":o==="end","dataviews-view-table__cell-align-center":o==="center"});return(0,ee.jsx)("div",{className:i,children:(0,ee.jsx)(n.render,{item:e,field:n})})}function om({item:e,fields:t,id:r,view:o,titleField:n,mediaField:i,descriptionField:a,selection:s,getItemId:l,onChangeSelection:c,multiselect:f,posinset:p}){let{paginationInfo:d}=(0,Ft.useContext)(q),m=s.includes(r),[v,_]=(0,Ft.useState)(!1),{showTitle:h=!0,showMedia:b=!0,showDescription:y=!0,infiniteScrollEnabled:A}=o,V=()=>{_(!0)},R=()=>{_(!1)},M=o.fields??[],k=n&&h||i&&b||a&&y;return(0,ee.jsxs)(_o.Composite.Item,{render:({children:S,...I})=>(0,ee.jsx)("tr",{className:Y("dataviews-view-table__row",{"is-selected":m,"is-hovered":v}),onMouseEnter:V,onMouseLeave:R,children:S,...I}),"aria-selected":m,"aria-setsize":d.totalItems||void 0,"aria-posinset":p,role:A?"article":"option",onClick:()=>{if(m)c(s.filter(S=>r!==S));else{let S=f?[...s,r]:[r];c(S)}},children:[(0,ee.jsx)("td",{className:"dataviews-view-table__checkbox-column",role:"presentation",children:(0,ee.jsx)("div",{className:"dataviews-view-table__cell-content-wrapper",children:(0,ee.jsx)(qr,{item:e,selection:s,onChangeSelection:c,getItemId:l,titleField:n,disabled:!1,"aria-hidden":!0,tabIndex:-1})})}),k&&(0,ee.jsx)("td",{role:"presentation",children:(0,ee.jsx)(Ea,{item:e,titleField:h?n:void 0,mediaField:b?i:void 0,descriptionField:y?a:void 0,isItemClickable:()=>!1})}),M.map(S=>{let{width:I,maxWidth:N,minWidth:g,align:E}=o.layout?.styles?.[S]??{};return(0,ee.jsx)("td",{style:{width:I,maxWidth:N,minWidth:g},role:"presentation",children:(0,ee.jsx)(v0,{fields:t,item:e,column:S,align:E})},S)})]},r)}function h0({actions:e,data:t,fields:r,getItemId:o,isLoading:n=!1,onChangeView:i,onChangeSelection:a,selection:s,setOpenedFilter:l,view:c,className:f,empty:p}){let d=(0,Ft.useRef)(new Map),m=(0,Ft.useRef)(void 0),[v,_]=(0,Ft.useState)(),h=zn(e)??!1;(0,Ft.useEffect)(()=>{m.current&&(m.current.focus(),m.current=void 0)});let b=(0,Ft.useId)();if(v){m.current=v,_(void 0);return}let y=x=>{let C=d.current.get(x.id),F=C?d.current.get(C.fallback):void 0;_(F?.node)},A=!!t?.length,V=r.find(x=>x.id===c.titleField),R=r.find(x=>x.id===c.mediaField),M=r.find(x=>x.id===c.descriptionField),k=c.groupBy?.field?r.find(x=>x.id===c.groupBy?.field):null,S=k?kt(t,k):null,{showTitle:I=!0,showMedia:N=!0,showDescription:g=!0}=c,E=V&&I||R&&N||M&&g,T=c.fields??[],w=(x,C)=>F=>{F?d.current.set(x,{node:F,fallback:T[C>0?C-1:1]}):d.current.delete(x)},O=c.infiniteScrollEnabled&&!S;return(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsxs)("table",{className:Y("dataviews-view-table","dataviews-view-picker-table",f,{[`has-${c.layout?.density}-density`]:c.layout?.density&&["compact","comfortable"].includes(c.layout.density)}),"aria-busy":n,"aria-describedby":b,role:O?"feed":"listbox",children:[(0,ee.jsx)("thead",{role:"presentation",children:(0,ee.jsxs)("tr",{className:"dataviews-view-table__row",role:"presentation",children:[(0,ee.jsx)("th",{className:"dataviews-view-table__checkbox-column",children:h&&(0,ee.jsx)(Sa,{selection:s,onChangeSelection:a,data:t,actions:e,getItemId:o})}),E&&(0,ee.jsx)("th",{children:V&&(0,ee.jsx)(Go,{ref:w(V.id,0),fieldId:V.id,view:c,fields:r,onChangeView:i,onHide:y,setOpenedFilter:l,canMove:!1})}),T.map((x,C)=>{let{width:F,maxWidth:D,minWidth:W,align:Q}=c.layout?.styles?.[x]??{};return(0,ee.jsx)("th",{style:{width:F,maxWidth:D,minWidth:W,textAlign:Q},"aria-sort":c.sort?.direction&&c.sort?.field===x?ha[c.sort.direction]:void 0,scope:"col",children:(0,ee.jsx)(Go,{ref:w(x,C),fieldId:x,view:c,fields:r,onChangeView:i,onHide:y,setOpenedFilter:l,canMove:c.layout?.enableMoving??!0})},x)})]})}),A&&k&&S?Array.from(S.entries()).map(([x,C])=>(0,ee.jsxs)(_o.Composite,{virtualFocus:!0,orientation:"vertical",render:(0,ee.jsx)("tbody",{role:"group"}),children:[(0,ee.jsx)("tr",{className:"dataviews-view-table__group-header-row",role:"presentation",children:(0,ee.jsx)("td",{colSpan:T.length+(E?1:0)+1,className:"dataviews-view-table__group-header-cell",role:"presentation",children:c.groupBy?.showLabel===!1?x:(0,ka.sprintf)((0,ka.__)("%1$s: %2$s"),k.label,x)})}),C.map((F,D)=>(0,ee.jsx)(om,{item:F,fields:r,id:o(F)||D.toString(),view:c,titleField:V,mediaField:R,descriptionField:M,selection:s,getItemId:o,onChangeSelection:a,multiselect:h},o(F)))]},`group-${x}`)):(0,ee.jsx)(_o.Composite,{render:(0,ee.jsx)("tbody",{role:"presentation"}),virtualFocus:!0,orientation:"vertical",children:A&&t.map((x,C)=>(0,ee.jsx)(om,{item:x,fields:r,id:o(x)||C.toString(),view:c,titleField:V,mediaField:R,descriptionField:M,selection:s,getItemId:o,onChangeSelection:a,multiselect:h,posinset:C+1},o(x)))})]}),(0,ee.jsxs)("div",{className:Y({"dataviews-loading":n,"dataviews-no-results":!A&&!n}),id:b,children:[!A&&(n?(0,ee.jsx)("p",{children:(0,ee.jsx)(_o.Spinner,{})}):p),A&&n&&(0,ee.jsx)("p",{className:"dataviews-loading-more",children:(0,ee.jsx)(_o.Spinner,{})})]})]})}var nm=h0;var im=u(G(),1),am=u(j(),1),sm=u(z(),1);var lm=u(P(),1),g0=[{value:120,breakpoint:1},{value:170,breakpoint:1},{value:230,breakpoint:1},{value:290,breakpoint:1112},{value:350,breakpoint:1636},{value:430,breakpoint:588}];function ku(){let e=(0,sm.useContext)(q),t=e.view,r=g0.filter(a=>e.containerWidth>=a.breakpoint),o=t.layout?.previewSize??230,n=r.map((a,s)=>({...a,index:s})).filter(a=>a.value<=o).sort((a,s)=>s.value-a.value)[0]?.index??0,i=r.map((a,s)=>({value:s}));return(0,lm.jsx)(im.RangeControl,{__next40pxDefaultSize:!0,showTooltip:!1,label:(0,am.__)("Preview size"),value:n,min:0,max:r.length-1,withInputField:!1,onChange:(a=0)=>{e.onChangeView({...t,layout:{...t.layout,previewSize:r[a].value}})},step:1,marks:i})}var $o=u(G(),1),Ko=u(j(),1),um=u(z(),1);var Zo=u(P(),1);function Gn(){let e=(0,um.useContext)(q),t=e.view;return(0,Zo.jsxs)($o.__experimentalToggleGroupControl,{size:"__unstable-large",label:(0,Ko.__)("Density"),value:t.layout?.density||"balanced",onChange:r=>{e.onChangeView({...t,layout:{...t.layout,density:r}})},isBlock:!0,children:[(0,Zo.jsx)($o.__experimentalToggleGroupControlOption,{value:"comfortable",label:(0,Ko._x)("Comfortable","Density option for DataView layout")},"comfortable"),(0,Zo.jsx)($o.__experimentalToggleGroupControlOption,{value:"balanced",label:(0,Ko._x)("Balanced","Density option for DataView layout")},"balanced"),(0,Zo.jsx)($o.__experimentalToggleGroupControlOption,{value:"compact",label:(0,Ko._x)("Compact","Density option for DataView layout")},"compact")]})}var Qr=[{type:ba,label:(0,xr.__)("Table"),component:Vf,icon:ji,viewConfigOptions:Gn},{type:lf,label:(0,xr.__)("Grid"),component:Ff,icon:zi,viewConfigOptions:ku},{type:uf,label:(0,xr.__)("List"),component:Iu,icon:(0,xr.isRTL)()?Ml:Ll,viewConfigOptions:Gn},{type:cf,label:(0,xr.__)("Activity"),component:qf,icon:Zl,viewConfigOptions:Gn},{type:df,label:(0,xr.__)("Grid"),component:rm,icon:zi,viewConfigOptions:ku,isPicker:!0},{type:ff,label:(0,xr.__)("Table"),component:nm,icon:ji,viewConfigOptions:Gn,isPicker:!0}];var fn=u(z(),1);var Gt=u(G(),1),Ar=u(j(),1),ps=u(z(),1);function Un(...e){}function Mu(e,t){if(b0(e)){let r=x0(t)?t():t;return e(r)}return e}function b0(e){return typeof e=="function"}function x0(e){return typeof e=="function"}function _t(e,t){return typeof Object.hasOwn=="function"?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t)}function Jr(...e){return(...t)=>{for(let r of e)typeof r=="function"&&r(...t)}}function Yn(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function Fu(e,t){let r={...e};for(let o of t)_t(r,o)&&delete r[o];return r}function Lu(e,t){let r={};for(let o of t)_t(e,o)&&(r[o]=e[o]);return r}function qn(e){return e}function Ke(e,t){if(!e)throw typeof t!="string"?new Error("Invariant failed"):new Error(t)}function Bu(e){return Object.keys(e)}function ju(e,...t){let r=typeof e=="function"?e(...t):e;return r==null?!1:!r}function So(e){return e.disabled||e["aria-disabled"]===!0||e["aria-disabled"]==="true"}function Ze(e){let t={};for(let r in e)e[r]!==void 0&&(t[r]=e[r]);return t}function te(...e){for(let t of e)if(t!==void 0)return t}var cm=u(ue(),1);function dm(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function w0(e){return!e||!(0,cm.isValidElement)(e)?!1:"ref"in e.props||"ref"in e}function fm(e){return w0(e)?{...e.props}.ref||e.ref:null}function mm(e,t){let r={...e};for(let o in t){if(!_t(t,o))continue;if(o==="className"){let i="className";r[i]=e[i]?`${e[i]} ${t[i]}`:t[i];continue}if(o==="style"){let i="style";r[i]=e[i]?{...e[i],...t[i]}:t[i];continue}let n=t[o];if(typeof n=="function"&&o.startsWith("on")){let i=e[o];if(typeof i=="function"){r[o]=(...a)=>{n(...a),i(...a)};continue}}r[o]=n}return r}var eo=y0();function y0(){var e;return typeof window<"u"&&!!((e=window.document)!=null&&e.createElement)}function wr(e){return e?"self"in e?e.document:e.ownerDocument||document:document}function Co(e,t=!1){var r;let{activeElement:o}=wr(e);if(!o?.nodeName)return null;if(Hu(o)&&((r=o.contentDocument)!=null&&r.body))return Co(o.contentDocument.body,t);if(t){let n=o.getAttribute("aria-activedescendant");if(n){let i=wr(o).getElementById(n);if(i)return i}}return o}function Jt(e,t){return e===t||e.contains(t)}function Hu(e){return e.tagName==="IFRAME"}function yr(e){let t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?_0.indexOf(e.type)!==-1:!1}var _0=["button","color","file","image","reset","submit"];function zu(e){if(typeof e.checkVisibility=="function")return e.checkVisibility();let t=e;return t.offsetWidth>0||t.offsetHeight>0||e.getClientRects().length>0}function ft(e){try{let t=e instanceof HTMLInputElement&&e.selectionStart!==null,r=e.tagName==="TEXTAREA";return t||r||!1}catch{return!1}}function $n(e){return e.isContentEditable||ft(e)}function Wu(e){if(ft(e))return e.value;if(e.isContentEditable){let t=wr(e).createRange();return t.selectNodeContents(e),t.toString()}return""}function Xo(e){let t=0,r=0;if(ft(e))t=e.selectionStart||0,r=e.selectionEnd||0;else if(e.isContentEditable){let o=wr(e).getSelection();if(o?.rangeCount&&o.anchorNode&&Jt(e,o.anchorNode)&&o.focusNode&&Jt(e,o.focusNode)){let n=o.getRangeAt(0),i=n.cloneRange();i.selectNodeContents(e),i.setEnd(n.startContainer,n.startOffset),t=i.toString().length,i.setEnd(n.endContainer,n.endOffset),r=i.toString().length}}return{start:t,end:r}}function Gu(e,t){let r=["dialog","menu","listbox","tree","grid"],o=e?.getAttribute("role");return o&&r.indexOf(o)!==-1?o:t}function Qo(e){if(!e)return null;let t=r=>r==="auto"||r==="scroll";if(e.clientHeight&&e.scrollHeight>e.clientHeight){let{overflowY:r}=getComputedStyle(e);if(t(r))return e}else if(e.clientWidth&&e.scrollWidth>e.clientWidth){let{overflowX:r}=getComputedStyle(e);if(t(r))return e}return Qo(e.parentElement)||document.scrollingElement||document.body}function Kn(e,...t){/text|search|password|tel|url/i.test(e.type)&&e.setSelectionRange(...t)}function Uu(e,t){let r=e.map((n,i)=>[i,n]),o=!1;return r.sort(([n,i],[a,s])=>{let l=t(i),c=t(s);return l===c||!l||!c?0:S0(l,c)?(n>a&&(o=!0),-1):(n<a&&(o=!0),1)}),o?r.map(([n,i])=>i):e}function S0(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function Yu(){return eo&&!!navigator.maxTouchPoints}function Ma(){return eo?/mac|iphone|ipad|ipod/i.test(navigator.platform):!1}function Eo(){return eo&&Ma()&&/apple/i.test(navigator.vendor)}function qu(){return eo&&/firefox\//i.test(navigator.userAgent)}function Fa(e){return!!(e.currentTarget&&!Jt(e.currentTarget,e.target))}function it(e){return e.target===e.currentTarget}function pm(e){let t=e.currentTarget;if(!t)return!1;let r=Ma();if(r&&!e.metaKey||!r&&!e.ctrlKey)return!1;let o=t.tagName.toLowerCase();return o==="a"||o==="button"&&t.type==="submit"||o==="input"&&t.type==="submit"}function vm(e){let t=e.currentTarget;if(!t)return!1;let r=t.tagName.toLowerCase();return e.altKey?r==="a"||r==="button"&&t.type==="submit"||r==="input"&&t.type==="submit":!1}function To(e,t){let r=new FocusEvent("blur",t),o=e.dispatchEvent(r),n={...t,bubbles:!0};return e.dispatchEvent(new FocusEvent("focusout",n)),o}function hm(e,t,r){let o=new KeyboardEvent(t,r);return e.dispatchEvent(o)}function $u(e,t){let r=new MouseEvent("click",t);return e.dispatchEvent(r)}function La(e,t){let r=t||e.currentTarget,o=e.relatedTarget;return!o||!Jt(r,o)}function to(e,t,r,o){let i=(s=>{if(o){let c=setTimeout(s,o);return()=>clearTimeout(c)}let l=requestAnimationFrame(s);return()=>cancelAnimationFrame(l)})(()=>{e.removeEventListener(t,a,!0),r()}),a=()=>{i(),r()};return e.addEventListener(t,a,{once:!0,capture:!0}),i}function er(e,t,r,o=window){let n=[];try{o.document.addEventListener(e,t,r);for(let a of Array.from(o.frames))n.push(er(e,t,r,a))}catch{}return()=>{try{o.document.removeEventListener(e,t,r)}catch{}for(let a of n)a()}}var C0=u(ue(),1),me=u(ue(),1),Ku={...C0},gm=Ku.useId,oO=Ku.useDeferredValue,bm=Ku.useInsertionEffect,Te=eo?me.useLayoutEffect:me.useEffect;function E0(e){let[t]=(0,me.useState)(e);return t}function _m(e){let t=(0,me.useRef)(e);return Te(()=>{t.current=e}),t}function re(e){let t=(0,me.useRef)(()=>{throw new Error("Cannot call an event handler while rendering.")});return bm?bm(()=>{t.current=e}):t.current=e,(0,me.useCallback)((...r)=>{var o;return(o=t.current)==null?void 0:o.call(t,...r)},[])}function Sm(e){let[t,r]=(0,me.useState)(null);return Te(()=>{if(t==null||!e)return;let o=null;return e(n=>(o=n,t)),()=>{e(o)}},[t,e]),[t,r]}function Ae(...e){return(0,me.useMemo)(()=>{if(e.some(Boolean))return t=>{for(let r of e)dm(r,t)}},e)}function Lt(e){if(gm){let o=gm();return e||o}let[t,r]=(0,me.useState)(e);return Te(()=>{if(e||t)return;let o=Math.random().toString(36).slice(2,8);r(`id-${o}`)},[e,t]),e||t}function Cm(e,t){let r=i=>{if(typeof i=="string")return i},[o,n]=(0,me.useState)(()=>r(t));return Te(()=>{let i=e&&"current"in e?e.current:e;n(i?.tagName.toLowerCase()||r(t))},[e,t]),o}function Em(e,t,r){let o=E0(r),[n,i]=(0,me.useState)(o);return(0,me.useEffect)(()=>{let a=e&&"current"in e?e.current:e;if(!a)return;let s=()=>{let c=a.getAttribute(t);i(c??o)},l=new MutationObserver(s);return l.observe(a,{attributeFilter:[t]}),s(),()=>l.disconnect()},[e,t,o]),n}function tr(e,t){let r=(0,me.useRef)(!1);(0,me.useEffect)(()=>{if(r.current)return e();r.current=!0},t),(0,me.useEffect)(()=>()=>{r.current=!1},[])}function Tm(e,t){let r=(0,me.useRef)(!1);Te(()=>{if(r.current)return e();r.current=!0},t),Te(()=>()=>{r.current=!1},[])}function Om(){return(0,me.useReducer)(()=>[],[])}function ke(e){return re(typeof e=="function"?e:()=>e)}function rr(e,t,r=[]){let o=(0,me.useCallback)(n=>(e.wrapElement&&(n=e.wrapElement(n)),t(n)),[...r,e.wrapElement]);return{...e,wrapElement:o}}function Am(e,t,r){let o=e.onLoadedMetadataCapture,n=(0,me.useMemo)(()=>Object.assign(()=>{},{...o,[t]:r}),[o,t,r]);return[o?.[t],{onLoadedMetadataCapture:n}]}var xm=!1;function Im(){return(0,me.useEffect)(()=>{xm||(er("mousemove",O0,!0),er("mousedown",Ba,!0),er("mouseup",Ba,!0),er("keydown",Ba,!0),er("scroll",Ba,!0),xm=!0)},[]),re(()=>Zu)}var Zu=!1,wm=0,ym=0;function T0(e){let t=e.movementX||e.screenX-wm,r=e.movementY||e.screenY-ym;return wm=e.screenX,ym=e.screenY,t||r||!1}function O0(e){T0(e)&&(Zu=!0)}function Ba(){Zu=!1}var mt=u(ue(),1),Oo=u(P(),1);function pe(e){let t=mt.forwardRef((r,o)=>e({...r,ref:o}));return t.displayName=e.displayName||e.name,t}function ro(e,t){return mt.memo(e,t)}function xe(e,t){let{wrapElement:r,render:o,...n}=t,i=Ae(t.ref,fm(o)),a;if(mt.isValidElement(o)){let s={...o.props,ref:i};a=mt.cloneElement(o,mm(n,s))}else o?a=o(n):a=(0,Oo.jsx)(e,{...n});return r?r(a):a}function we(e){let t=(r={})=>e(r);return t.displayName=e.name,t}function St(e=[],t=[]){let r=mt.createContext(void 0),o=mt.createContext(void 0),n=()=>mt.useContext(r),i=(c=!1)=>{let f=mt.useContext(o),p=n();return c?f:f||p},a=()=>{let c=mt.useContext(o),f=n();if(!(c&&c===f))return f},s=c=>e.reduceRight((f,p)=>(0,Oo.jsx)(p,{...c,children:f}),(0,Oo.jsx)(r.Provider,{...c}));return{context:r,scopedContext:o,useContext:n,useScopedContext:i,useProviderContext:a,ContextProvider:s,ScopedContextProvider:c=>(0,Oo.jsx)(s,{...c,children:t.reduceRight((f,p)=>(0,Oo.jsx)(p,{...c,children:f}),(0,Oo.jsx)(o.Provider,{...c}))})}}var Zn=St(),Pm=Zn.useContext,uO=Zn.useScopedContext,cO=Zn.useProviderContext,Rm=Zn.ContextProvider,Vm=Zn.ScopedContextProvider;var Xu=u(ue(),1),Xn=St([Rm],[Vm]),ja=Xn.useContext,pO=Xn.useScopedContext,Nm=Xn.useProviderContext,Jo=Xn.ContextProvider,Ha=Xn.ScopedContextProvider,Dm=(0,Xu.createContext)(void 0),km=(0,Xu.createContext)(void 0);function Mm(e,t){return e.find(r=>t?!r.disabled&&r.id!==t:!r.disabled)}function or(e,t){return t&&e.item(t)||null}function Fm(e){let t=[];for(let r of e){let o=t.find(n=>{var i;return((i=n[0])==null?void 0:i.rowId)===r.rowId});o?o.push(r):t.push([r])}return t}function Lm(e,t=!1){if(ft(e))e.setSelectionRange(t?e.value.length:0,e.value.length);else if(e.isContentEditable){let r=wr(e).getSelection();r?.selectAllChildren(e),t&&r?.collapseToEnd()}}var Qu=Symbol("FOCUS_SILENTLY");function Bm(e){e[Qu]=!0,e.focus({preventScroll:!0})}function jm(e){let t=e[Qu];return delete e[Qu],t}function Ao(e,t,r){if(!t||t===r)return!1;let o=e.item(t.id);return!(!o||r&&o.element===r)}var za=u(ue(),1),A0="div",Ju=we(function({store:t,shouldRegisterItem:r=!0,getItem:o=qn,element:n,...i}){let a=Pm();t=t||a;let s=Lt(i.id),l=(0,za.useRef)(n);return(0,za.useEffect)(()=>{let c=l.current;if(!s||!c||!r)return;let f=o({id:s,element:c});return t?.renderItem(f)},[s,r,o,t]),i={...i,ref:Ae(l,i.ref)},Ze(i)}),_O=pe(function(t){let r=Ju(t);return xe(A0,r)});var Hm=u(ue(),1),zm=(0,Hm.createContext)(!0);var Wm="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function Qn(e){return!(!e.matches(Wm)||!zu(e)||e.closest("[inert]"))}function Gm(e){for(;e&&!Qn(e);)e=e.closest(Wm);return e||null}function Bt(e){let t=Co(e);if(!t)return!1;if(t===e)return!0;let r=t.getAttribute("aria-activedescendant");return r?r===e.id:!1}function ec(e){let t=Co(e);if(!t)return!1;if(Jt(e,t))return!0;let r=t.getAttribute("aria-activedescendant");return!r||!("id"in e)?!1:r===e.id?!0:!!e.querySelector(`#${CSS.escape(r)}`)}function Um(e){!ec(e)&&Qn(e)&&e.focus()}function Ym(e,t){"scrollIntoView"in e?(e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest",...t})):e.focus()}var Rt=u(ue(),1),I0="div",qm=Eo(),P0=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"],R0=Symbol("safariFocusAncestor");function $m(e,t){e&&(e[R0]=t)}function V0(e){let{tagName:t,readOnly:r,type:o}=e;return t==="TEXTAREA"&&!r||t==="SELECT"&&!r?!0:t==="INPUT"&&!r?P0.includes(o):!!(e.isContentEditable||e.getAttribute("role")==="combobox"&&e.dataset.name)}function N0(e){return"labels"in e?e.labels:null}function Km(e){return e.tagName.toLowerCase()==="input"&&e.type?e.type==="radio"||e.type==="checkbox":!1}function D0(e){return e?e==="button"||e==="summary"||e==="input"||e==="select"||e==="textarea"||e==="a":!0}function k0(e){return e?e==="button"||e==="input"||e==="select"||e==="textarea":!0}function M0(e,t,r,o,n){return e?t?r&&!o?-1:void 0:r?n:n||0:n}function tc(e,t){return re(r=>{e?.(r),!r.defaultPrevented&&t&&(r.stopPropagation(),r.preventDefault())})}var Zm=!1,rc=!0;function F0(e){let t=e.target;t&&"hasAttribute"in t&&(t.hasAttribute("data-focus-visible")||(rc=!1))}function L0(e){e.metaKey||e.ctrlKey||e.altKey||(rc=!0)}var Jn=we(function({focusable:t=!0,accessibleWhenDisabled:r,autoFocus:o,onFocusVisible:n,...i}){let a=(0,Rt.useRef)(null);(0,Rt.useEffect)(()=>{t&&(Zm||(er("mousedown",F0,!0),er("keydown",L0,!0),Zm=!0))},[t]),qm&&(0,Rt.useEffect)(()=>{if(!t)return;let w=a.current;if(!w||!Km(w))return;let O=N0(w);if(!O)return;let x=()=>queueMicrotask(()=>w.focus());for(let C of O)C.addEventListener("mouseup",x);return()=>{for(let C of O)C.removeEventListener("mouseup",x)}},[t]);let s=t&&So(i),l=!!s&&!r,[c,f]=(0,Rt.useState)(!1);(0,Rt.useEffect)(()=>{t&&l&&c&&f(!1)},[t,l,c]),(0,Rt.useEffect)(()=>{if(!t||!c)return;let w=a.current;if(!w||typeof IntersectionObserver>"u")return;let O=new IntersectionObserver(()=>{Qn(w)||f(!1)});return O.observe(w),()=>O.disconnect()},[t,c]);let p=tc(i.onKeyPressCapture,s),d=tc(i.onMouseDownCapture,s),m=tc(i.onClickCapture,s),v=i.onMouseDown,_=re(w=>{if(v?.(w),w.defaultPrevented||!t)return;let O=w.currentTarget;if(!qm||Fa(w)||!yr(O)&&!Km(O))return;let x=!1,C=()=>{x=!0},F={capture:!0,once:!0};O.addEventListener("focusin",C,F);let D=Gm(O.parentElement);$m(D,!0),to(O,"mouseup",()=>{O.removeEventListener("focusin",C,!0),$m(D,!1),!x&&Um(O)})}),h=(w,O)=>{if(O&&(w.currentTarget=O),!t)return;let x=w.currentTarget;x&&Bt(x)&&(n?.(w),!w.defaultPrevented&&(x.dataset.focusVisible="true",f(!0)))},b=i.onKeyDownCapture,y=re(w=>{if(b?.(w),w.defaultPrevented||!t||c||w.metaKey||w.altKey||w.ctrlKey||!it(w))return;let O=w.currentTarget;to(O,"focusout",()=>h(w,O))}),A=i.onFocusCapture,V=re(w=>{if(A?.(w),w.defaultPrevented||!t)return;if(!it(w)){f(!1);return}let O=w.currentTarget,x=()=>h(w,O);rc||V0(w.target)?to(w.target,"focusout",x):f(!1)}),R=i.onBlur,M=re(w=>{R?.(w),t&&La(w)&&(w.currentTarget.removeAttribute("data-focus-visible"),f(!1))}),k=(0,Rt.useContext)(zm),S=re(w=>{t&&o&&w&&k&&queueMicrotask(()=>{Bt(w)||Qn(w)&&w.focus()})}),I=Cm(a),N=t&&D0(I),g=t&&k0(I),E=i.style,T=(0,Rt.useMemo)(()=>l?{pointerEvents:"none",...E}:E,[l,E]);return i={"data-focus-visible":t&&c||void 0,"data-autofocus":o||void 0,"aria-disabled":s||void 0,...i,ref:Ae(a,S,i.ref),style:T,tabIndex:M0(t,l,N,g,i.tabIndex),disabled:g&&l?!0:void 0,contentEditable:s?void 0:i.contentEditable,onKeyPressCapture:p,onClickCapture:m,onMouseDownCapture:d,onMouseDown:_,onKeyDownCapture:y,onFocusCapture:V,onBlur:M},Ze(i)}),LO=pe(function(t){let r=Jn(t);return xe(I0,r)});var oo=u(ue(),1),B0="button";function Xm(e){if(!e.isTrusted)return!1;let t=e.currentTarget;return e.key==="Enter"?yr(t)||t.tagName==="SUMMARY"||t.tagName==="A":e.key===" "?yr(t)||t.tagName==="SUMMARY"||t.tagName==="INPUT"||t.tagName==="SELECT":!1}var j0=Symbol("command"),oc=we(function({clickOnEnter:t=!0,clickOnSpace:r=!0,...o}){let n=(0,oo.useRef)(null),[i,a]=(0,oo.useState)(!1);(0,oo.useEffect)(()=>{n.current&&a(yr(n.current))},[]);let[s,l]=(0,oo.useState)(!1),c=(0,oo.useRef)(!1),f=So(o),[p,d]=Am(o,j0,!0),m=o.onKeyDown,v=re(b=>{m?.(b);let y=b.currentTarget;if(b.defaultPrevented||p||f||!it(b)||ft(y)||y.isContentEditable)return;let A=t&&b.key==="Enter",V=r&&b.key===" ",R=b.key==="Enter"&&!t,M=b.key===" "&&!r;if(R||M){b.preventDefault();return}if(A||V){let k=Xm(b);if(A){if(!k){b.preventDefault();let{view:S,...I}=b,N=()=>$u(y,I);qu()?to(y,"keyup",N):queueMicrotask(N)}}else V&&(c.current=!0,k||(b.preventDefault(),l(!0)))}}),_=o.onKeyUp,h=re(b=>{if(_?.(b),b.defaultPrevented||p||f||b.metaKey)return;let y=r&&b.key===" ";if(c.current&&y&&(c.current=!1,!Xm(b))){b.preventDefault(),l(!1);let A=b.currentTarget,{view:V,...R}=b;queueMicrotask(()=>$u(A,R))}});return o={"data-active":s||void 0,type:i?"button":void 0,...d,...o,ref:Ae(n,o.ref),onKeyDown:v,onKeyUp:h},o=Jn(o),o}),qO=pe(function(t){let r=oc(t);return xe(B0,r)});function Io(e,t){let r=e.__unstableInternals;return Ke(r,"Invalid store"),r[t]}function pt(e,...t){let r=e,o=r,n=Symbol(),i=Un,a=new Set,s=new Set,l=new Set,c=new Set,f=new Set,p=new WeakMap,d=new WeakMap,m=S=>(l.add(S),()=>l.delete(S)),v=()=>{let S=a.size,I=Symbol();a.add(I);let N=()=>{a.delete(I),!a.size&&i()};if(S)return N;let g=Bu(r).map(w=>Jr(...t.map(O=>{var x;let C=(x=O?.getState)==null?void 0:x.call(O);if(C&&_t(C,w))return Ue(O,[w],F=>{M(w,F[w],!0)})}))),E=[];for(let w of l)E.push(w());let T=t.map(en);return i=Jr(...g,...E,...T),N},_=(S,I,N=c)=>(N.add(I),d.set(I,S),()=>{var g;(g=p.get(I))==null||g(),p.delete(I),d.delete(I),N.delete(I)}),h=(S,I)=>_(S,I),b=(S,I)=>(p.set(I,I(r,r)),_(S,I)),y=(S,I)=>(p.set(I,I(r,o)),_(S,I,f)),A=S=>pt(Lu(r,S),k),V=S=>pt(Fu(r,S),k),R=()=>r,M=(S,I,N=!1)=>{var g;if(!_t(r,S))return;let E=Mu(I,r[S]);if(E===r[S])return;if(!N)for(let x of t)(g=x?.setState)==null||g.call(x,S,E);let T=r;r={...r,[S]:E};let w=Symbol();n=w,s.add(S);let O=(x,C,F)=>{var D;let W=d.get(x),Q=ge=>F?F.has(ge):ge===S;(!W||W.some(Q))&&((D=p.get(x))==null||D(),p.set(x,x(r,C)))};for(let x of c)O(x,T);queueMicrotask(()=>{if(n!==w)return;let x=r;for(let C of f)O(C,o,s);o=x,s.clear()})},k={getState:R,setState:M,__unstableInternals:{setup:m,init:v,subscribe:h,sync:b,batch:y,pick:A,omit:V}};return k}function Ge(e,...t){if(e)return Io(e,"setup")(...t)}function en(e,...t){if(e)return Io(e,"init")(...t)}function tn(e,...t){if(e)return Io(e,"subscribe")(...t)}function Ue(e,...t){if(e)return Io(e,"sync")(...t)}function no(e,...t){if(e)return Io(e,"batch")(...t)}function ei(e,...t){if(e)return Io(e,"omit")(...t)}function nc(e,...t){if(e)return Io(e,"pick")(...t)}function Po(...e){var t;let r={};for(let n of e){let i=(t=n?.getState)==null?void 0:t.call(n);i&&Object.assign(r,i)}let o=pt(r,...e);return Object.assign({},...e,o)}var nr=u(ue(),1),Qm=u(ef(),1),{useSyncExternalStore:Jm}=Qm.default,ep=()=>()=>{};function rn(e,t=qn){let r=nr.useCallback(n=>e?tn(e,null,n):ep(),[e]),o=()=>{let n=typeof t=="string"?t:null,i=typeof t=="function"?t:null,a=e?.getState();if(i)return i(a);if(a&&n&&_t(a,n))return a[n]};return Jm(r,o,o)}function Ga(e,t){let r=nr.useRef({}),o=nr.useCallback(i=>e?tn(e,null,i):ep(),[e]),n=()=>{let i=e?.getState(),a=!1,s=r.current;for(let l in t){let c=t[l];if(typeof c=="function"){let f=c(i);f!==s[l]&&(s[l]=f,a=!0)}if(typeof c=="string"){if(!i||!_t(i,c))continue;let f=i[c];f!==s[l]&&(s[l]=f,a=!0)}}return a&&(r.current={...s}),r.current};return Jm(o,n,n)}function Ie(e,t,r,o){let n=_t(t,r)?t[r]:void 0,i=o?t[o]:void 0,a=_m({value:n,setValue:i});Te(()=>Ue(e,[r],(s,l)=>{let{value:c,setValue:f}=a.current;f&&s[r]!==l[r]&&s[r]!==c&&f(s[r])}),[e,r]),Te(()=>{if(n!==void 0)return e.setState(r,n),no(e,[r],()=>{n!==void 0&&e.setState(r,n)})})}function on(e,t){let[r,o]=nr.useState(()=>e(t));Te(()=>en(r),[r]);let n=nr.useCallback(s=>rn(r,s),[r]),i=nr.useMemo(()=>({...r,useState:n}),[r,n]),a=re(()=>{o(s=>e({...t,...s.getState()}))});return[i,a]}var _r=u(ue(),1),rp=u(P(),1),H0="button";function z0(e){return $n(e)?!0:e.tagName==="INPUT"&&!yr(e)}function W0(e,t=!1){let r=e.clientHeight,{top:o}=e.getBoundingClientRect(),n=Math.max(r*.875,r-40)*1.5,i=t?r-n+o:n+o;return e.tagName==="HTML"?i+e.scrollTop:i}function G0(e,t=!1){let{top:r}=e.getBoundingClientRect();return t?r+e.clientHeight:r}function tp(e,t,r,o=!1){var n;if(!t||!r)return;let{renderedItems:i}=t.getState(),a=Qo(e);if(!a)return;let s=W0(a,o),l,c;for(let f=0;f<i.length;f+=1){let p=l;if(l=r(f),!l)break;if(l===p)continue;let d=(n=or(t,l))==null?void 0:n.element;if(!d)continue;let v=G0(d,o)-s,_=Math.abs(v);if(o&&v<=0||!o&&v>=0){c!==void 0&&c<_&&(l=p);break}c=_}return l}function U0(e,t){return it(e)?!1:Ao(t,e.target)}var ic=we(function({store:t,rowId:r,preventScrollOnKeyDown:o=!1,moveOnKeyPress:n=!0,tabbable:i=!1,getItem:a,"aria-setsize":s,"aria-posinset":l,...c}){let f=ja();t=t||f;let p=Lt(c.id),d=(0,_r.useRef)(null),m=(0,_r.useContext)(km),_=So(c)&&!c.accessibleWhenDisabled,{rowId:h,baseElement:b,isActiveItem:y,ariaSetSize:A,ariaPosInSet:V,isTabbable:R}=Ga(t,{rowId(C){if(r)return r;if(C&&m?.baseElement&&m.baseElement===C.baseElement)return m.id},baseElement(C){return C?.baseElement||void 0},isActiveItem(C){return!!C&&C.activeId===p},ariaSetSize(C){if(s!=null)return s;if(C&&m?.ariaSetSize&&m.baseElement===C.baseElement)return m.ariaSetSize},ariaPosInSet(C){if(l!=null)return l;if(!C||!m?.ariaPosInSet||m.baseElement!==C.baseElement)return;let F=C.renderedItems.filter(D=>D.rowId===h);return m.ariaPosInSet+F.findIndex(D=>D.id===p)},isTabbable(C){if(!C?.renderedItems.length)return!0;if(C.virtualFocus)return!1;if(i)return!0;if(C.activeId===null)return!1;let F=t?.item(C.activeId);return F?.disabled||!F?.element?!0:C.activeId===p}}),M=(0,_r.useCallback)(C=>{var F;let D={...C,id:p||C.id,rowId:h,disabled:!!_,children:(F=C.element)==null?void 0:F.textContent};return a?a(D):D},[p,h,_,a]),k=c.onFocus,S=(0,_r.useRef)(!1),I=re(C=>{if(k?.(C),C.defaultPrevented||Fa(C)||!p||!t||U0(C,t))return;let{virtualFocus:F,baseElement:D}=t.getState();if(t.setActiveId(p),$n(C.currentTarget)&&Lm(C.currentTarget),!F||!it(C)||z0(C.currentTarget)||!D?.isConnected)return;Eo()&&C.currentTarget.hasAttribute("data-autofocus")&&C.currentTarget.scrollIntoView({block:"nearest",inline:"nearest"}),S.current=!0,C.relatedTarget===D||Ao(t,C.relatedTarget)?Bm(D):D.focus()}),N=c.onBlurCapture,g=re(C=>{if(N?.(C),C.defaultPrevented)return;let F=t?.getState();F?.virtualFocus&&S.current&&(S.current=!1,C.preventDefault(),C.stopPropagation())}),E=c.onKeyDown,T=ke(o),w=ke(n),O=re(C=>{if(E?.(C),C.defaultPrevented||!it(C)||!t)return;let{currentTarget:F}=C,D=t.getState(),W=t.item(p),Q=!!W?.rowId,ge=D.orientation!=="horizontal",et=D.orientation!=="vertical",Et=()=>!!(Q||et||!D.baseElement||!ft(D.baseElement)),po={ArrowUp:(Q||ge)&&t.up,ArrowRight:(Q||et)&&t.next,ArrowDown:(Q||ge)&&t.down,ArrowLeft:(Q||et)&&t.previous,Home:()=>{if(Et())return!Q||C.ctrlKey?t?.first():t?.previous(-1)},End:()=>{if(Et())return!Q||C.ctrlKey?t?.last():t?.next(-1)},PageUp:()=>tp(F,t,t?.up,!0),PageDown:()=>tp(F,t,t?.down)}[C.key];if(po){if($n(F)){let Ne=Xo(F),tt=et&&C.key==="ArrowLeft",vo=et&&C.key==="ArrowRight",Cn=ge&&C.key==="ArrowUp",En=ge&&C.key==="ArrowDown";if(vo||En){let{length:Tn}=Wu(F);if(Ne.end!==Tn)return}else if((tt||Cn)&&Ne.start!==0)return}let $=po();if(T(C)||$!==void 0){if(!w(C))return;C.preventDefault(),t.move($)}}}),x=(0,_r.useMemo)(()=>({id:p,baseElement:b}),[p,b]);return c=rr(c,C=>(0,rp.jsx)(Dm.Provider,{value:x,children:C}),[x]),c={id:p,"data-active-item":y||void 0,...c,ref:Ae(d,c.ref),tabIndex:R?c.tabIndex:-1,onFocus:I,onBlurCapture:g,onKeyDown:O},c=oc(c),c=Ju({store:t,...c,getItem:M,shouldRegisterItem:p?c.shouldRegisterItem:!1}),Ze({...c,"aria-setsize":A,"aria-posinset":V})}),pA=ro(pe(function(t){let r=ic(t);return xe(H0,r)}));function ac(e){return Array.isArray(e)?e:typeof e<"u"?[e]:[]}function ti(e){let t=[];for(let r of e)t.push(...r);return t}function nn(e){return e.slice().reverse()}var ir=u(ue(),1),np=u(P(),1),Y0="div";function q0(e){return e.some(t=>!!t.rowId)}function $0(e){let t=e.target;return t&&!ft(t)?!1:e.key.length===1&&!e.ctrlKey&&!e.metaKey}function K0(e){return e.key==="Shift"||e.key==="Control"||e.key==="Alt"||e.key==="Meta"}function op(e,t,r){return re(o=>{var n;if(t?.(o),o.defaultPrevented||o.isPropagationStopped()||!it(o)||K0(o)||$0(o))return;let i=e.getState(),a=(n=or(e,i.activeId))==null?void 0:n.element;if(!a)return;let{view:s,...l}=o,c=r?.current;a!==c&&a.focus(),hm(a,o.type,l)||o.preventDefault(),o.currentTarget.contains(a)&&o.stopPropagation()})}function Z0(e){return Mm(ti(nn(Fm(e))))}function X0(e){let[t,r]=(0,ir.useState)(!1),o=(0,ir.useCallback)(()=>r(!0),[]),n=e.useState(i=>or(e,i.activeId));return(0,ir.useEffect)(()=>{let i=n?.element;t&&i&&(r(!1),i.focus({preventScroll:!0}))},[n,t]),o}var sc=we(function({store:t,composite:r=!0,focusOnMove:o=r,moveOnKeyPress:n=!0,...i}){let a=Nm();t=t||a,Ke(t,!1);let s=(0,ir.useRef)(null),l=(0,ir.useRef)(null),c=X0(t),f=t.useState("moves"),[,p]=Sm(r?t.setBaseElement:null);(0,ir.useEffect)(()=>{var g;if(!t||!f||!r||!o)return;let{activeId:E}=t.getState(),T=(g=or(t,E))==null?void 0:g.element;T&&Ym(T)},[t,f,r,o]),Te(()=>{if(!t||!f||!r)return;let{baseElement:g,activeId:E}=t.getState();if(!(E===null)||!g)return;let w=l.current;l.current=null,w&&To(w,{relatedTarget:g}),Bt(g)||g.focus()},[t,f,r]);let d=t.useState("activeId"),m=t.useState("virtualFocus");Te(()=>{var g;if(!t||!r||!m)return;let E=l.current;if(l.current=null,!E)return;let w=((g=or(t,d))==null?void 0:g.element)||Co(E);w!==E&&To(E,{relatedTarget:w})},[t,d,m,r]);let v=op(t,i.onKeyDownCapture,l),_=op(t,i.onKeyUpCapture,l),h=i.onFocusCapture,b=re(g=>{if(h?.(g),g.defaultPrevented||!t)return;let{virtualFocus:E}=t.getState();if(!E)return;let T=g.relatedTarget,w=jm(g.currentTarget);it(g)&&w&&(g.stopPropagation(),l.current=T)}),y=i.onFocus,A=re(g=>{if(y?.(g),g.defaultPrevented||!r||!t)return;let{relatedTarget:E}=g,{virtualFocus:T}=t.getState();T?it(g)&&!Ao(t,E)&&queueMicrotask(c):it(g)&&t.setActiveId(null)}),V=i.onBlurCapture,R=re(g=>{var E;if(V?.(g),g.defaultPrevented||!t)return;let{virtualFocus:T,activeId:w}=t.getState();if(!T)return;let O=(E=or(t,w))==null?void 0:E.element,x=g.relatedTarget,C=Ao(t,x),F=l.current;l.current=null,it(g)&&C?(x===O?F&&F!==x&&To(F,g):O?To(O,g):F&&To(F,g),g.stopPropagation()):!Ao(t,g.target)&&O&&To(O,g)}),M=i.onKeyDown,k=ke(n),S=re(g=>{var E;if(M?.(g),g.nativeEvent.isComposing||g.defaultPrevented||!t||!it(g))return;let{orientation:T,renderedItems:w,activeId:O}=t.getState(),x=or(t,O);if((E=x?.element)!=null&&E.isConnected)return;let C=T!=="horizontal",F=T!=="vertical",D=q0(w);if((g.key==="ArrowLeft"||g.key==="ArrowRight"||g.key==="Home"||g.key==="End")&&ft(g.currentTarget))return;let et={ArrowUp:(D||C)&&(()=>{if(D){let Et=Z0(w);return Et?.id}return t?.last()}),ArrowRight:(D||F)&&t.first,ArrowDown:(D||C)&&t.first,ArrowLeft:(D||F)&&t.last,Home:t.first,End:t.last,PageUp:t.first,PageDown:t.last}[g.key];if(et){let Et=et();if(Et!==void 0){if(!k(g))return;g.preventDefault(),t.move(Et)}}});i=rr(i,g=>(0,np.jsx)(Jo,{value:t,children:g}),[t]),i={"aria-activedescendant":t.useState(g=>{var E;if(t&&r&&g.virtualFocus)return(E=or(t,g.activeId))==null?void 0:E.id}),...i,ref:Ae(s,p,i.ref),onKeyDownCapture:v,onKeyUpCapture:_,onFocusCapture:b,onFocus:A,onBlurCapture:R,onKeyDown:S};let N=t.useState(g=>r&&(g.virtualFocus||g.activeId===null));return i=Jn({focusable:N,...i}),i}),PA=pe(function(t){let r=sc(t);return xe(Y0,r)});var ri=St(),NA=ri.useContext,DA=ri.useScopedContext,lc=ri.useProviderContext,ip=ri.ContextProvider,ap=ri.ScopedContextProvider;var uc=u(ue(),1),oi=St([ip],[ap]),LA=oi.useContext,BA=oi.useScopedContext,jA=oi.useProviderContext,sp=oi.ContextProvider,Ua=oi.ScopedContextProvider,HA=(0,uc.createContext)(void 0),zA=(0,uc.createContext)(void 0);var an=u(ue(),1),cp=u(Zd(),1),cc=u(P(),1),Q0="div";function lp(e,t){let r=setTimeout(t,e);return()=>clearTimeout(r)}function J0(e){let t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>cancelAnimationFrame(t)}function up(...e){return e.join(", ").split(", ").reduce((t,r)=>{let o=r.endsWith("ms")?1:1e3,n=Number.parseFloat(r||"0s")*o;return n>t?n:t},0)}function dc(e,t,r){return!r&&t!==!1&&(!e||!!t)}var ew=we(function({store:t,alwaysVisible:r,...o}){let n=lc();t=t||n,Ke(t,!1);let i=(0,an.useRef)(null),a=Lt(o.id),[s,l]=(0,an.useState)(null),c=t.useState("open"),f=t.useState("mounted"),p=t.useState("animated"),d=t.useState("contentElement"),m=rn(t.disclosure,"contentElement");Te(()=>{i.current&&t?.setContentElement(i.current)},[t]),Te(()=>{let b;return t?.setState("animated",y=>(b=y,!0)),()=>{b!==void 0&&t?.setState("animated",b)}},[t]),Te(()=>{if(p){if(!d?.isConnected){l(null);return}return J0(()=>{l(c?"enter":f?"leave":null)})}},[p,d,c,f]),Te(()=>{if(!t||!p||!s||!d)return;let b=()=>t?.setState("animating",!1),y=()=>(0,cp.flushSync)(b);if(s==="leave"&&c||s==="enter"&&!c)return;if(typeof p=="number")return lp(p,y);let{transitionDuration:A,animationDuration:V,transitionDelay:R,animationDelay:M}=getComputedStyle(d),{transitionDuration:k="0",animationDuration:S="0",transitionDelay:I="0",animationDelay:N="0"}=m?getComputedStyle(m):{},g=up(R,M,I,N),E=up(A,V,k,S),T=g+E;if(!T){s==="enter"&&t.setState("animated",!1),b();return}let w=1e3/60,O=Math.max(T-w,0);return lp(O,y)},[t,p,d,m,c,s]),o=rr(o,b=>(0,cc.jsx)(Ua,{value:t,children:b}),[t]);let v=dc(f,o.hidden,r),_=o.style,h=(0,an.useMemo)(()=>v?{..._,display:"none"}:_,[v,_]);return o={id:a,"data-open":c||void 0,"data-enter":s==="enter"||void 0,"data-leave":s==="leave"||void 0,hidden:v,...o,ref:Ae(a?t.setContentElement:null,i,o.ref),style:h},Ze(o)}),tw=pe(function(t){let r=ew(t);return xe(Q0,r)}),ZA=pe(function({unmountOnHide:t,...r}){let o=lc(),n=r.store||o;return rn(n,a=>!t||a?.mounted)===!1?null:(0,cc.jsx)(tw,{...r})});function dp(e={}){let t=Po(e.store,ei(e.disclosure,["contentElement","disclosureElement"]));let r=t?.getState(),o=te(e.open,r?.open,e.defaultOpen,!1),n=te(e.animated,r?.animated,!1),i={open:o,animated:n,animating:!!n&&o,mounted:o,contentElement:te(r?.contentElement,null),disclosureElement:te(r?.disclosureElement,null)},a=pt(i,t);return Ge(a,()=>Ue(a,["animated","animating"],s=>{s.animated||a.setState("animating",!1)})),Ge(a,()=>tn(a,["open"],()=>{a.getState().animated&&a.setState("animating",!0)})),Ge(a,()=>Ue(a,["open","animating"],s=>{a.setState("mounted",s.open||s.animating)})),{...a,disclosure:e.disclosure,setOpen:s=>a.setState("open",s),show:()=>a.setState("open",!0),hide:()=>a.setState("open",!1),toggle:()=>a.setState("open",s=>!s),stopAnimation:()=>a.setState("animating",!1),setContentElement:s=>a.setState("contentElement",s),setDisclosureElement:s=>a.setState("disclosureElement",s)}}function fp(e,t,r){return tr(t,[r.store,r.disclosure]),Ie(e,r,"open","setOpen"),Ie(e,r,"mounted","setMounted"),Ie(e,r,"animated"),Object.assign(e,{disclosure:r.disclosure})}var ni=St([sp],[Ua]),aI=ni.useContext,sI=ni.useScopedContext,mp=ni.useProviderContext,pp=ni.ContextProvider,vp=ni.ScopedContextProvider;function rw(e){var t;let r=e.find(i=>!!i.element),o=[...e].reverse().find(i=>!!i.element),n=(t=r?.element)==null?void 0:t.parentElement;for(;n&&o?.element;){if(o&&n.contains(o.element))return n;n=n.parentElement}return wr(n).body}function ow(e){return e?.__unstablePrivateStore}function hp(e={}){var t;e.store;let r=(t=e.store)==null?void 0:t.getState(),o=te(e.items,r?.items,e.defaultItems,[]),n=new Map(o.map(d=>[d.id,d])),i={items:o,renderedItems:te(r?.renderedItems,[])},a=ow(e.store),s=pt({items:o,renderedItems:i.renderedItems},a),l=pt(i,e.store),c=d=>{let m=Uu(d,v=>v.element);s.setState("renderedItems",m),l.setState("renderedItems",m)};Ge(l,()=>en(s)),Ge(s,()=>no(s,["items"],d=>{l.setState("items",d.items)})),Ge(s,()=>no(s,["renderedItems"],d=>{let m=!0,v=requestAnimationFrame(()=>{let{renderedItems:y}=l.getState();d.renderedItems!==y&&c(d.renderedItems)});if(typeof IntersectionObserver!="function")return()=>cancelAnimationFrame(v);let _=()=>{if(m){m=!1;return}cancelAnimationFrame(v),v=requestAnimationFrame(()=>c(d.renderedItems))},h=rw(d.renderedItems),b=new IntersectionObserver(_,{root:h});for(let y of d.renderedItems)y.element&&b.observe(y.element);return()=>{cancelAnimationFrame(v),b.disconnect()}}));let f=(d,m,v=!1)=>{let _;return m(b=>{let y=b.findIndex(({id:V})=>V===d.id),A=b.slice();if(y!==-1){_=b[y];let V={..._,...d};A[y]=V,n.set(d.id,V)}else A.push(d),n.set(d.id,d);return A}),()=>{m(b=>{if(!_)return v&&n.delete(d.id),b.filter(({id:V})=>V!==d.id);let y=b.findIndex(({id:V})=>V===d.id);if(y===-1)return b;let A=b.slice();return A[y]=_,n.set(d.id,_),A})}},p=d=>f(d,m=>s.setState("items",m),!0);return{...l,registerItem:p,renderItem:d=>Jr(p(d),f(d,m=>s.setState("renderedItems",m))),item:d=>{if(!d)return null;let m=n.get(d);if(!m){let{items:v}=s.getState();m=v.find(_=>_.id===d),m&&n.set(d,m)}return m||null},__unstablePrivateStore:s}}function gp(e,t,r){return tr(t,[r.store]),Ie(e,r,"items","setItems"),e}var nw={id:null};function Sr(e,t){return e.find(r=>t?!r.disabled&&r.id!==t:!r.disabled)}function iw(e,t){return e.filter(r=>t?!r.disabled&&r.id!==t:!r.disabled)}function bp(e,t){return e.filter(r=>r.rowId===t)}function aw(e,t,r=!1){let o=e.findIndex(n=>n.id===t);return[...e.slice(o+1),...r?[nw]:[],...e.slice(0,o)]}function xp(e){let t=[];for(let r of e){let o=t.find(n=>{var i;return((i=n[0])==null?void 0:i.rowId)===r.rowId});o?o.push(r):t.push([r])}return t}function wp(e){let t=0;for(let{length:r}of e)r>t&&(t=r);return t}function sw(e){return{id:"__EMPTY_ITEM__",disabled:!0,rowId:e}}function lw(e,t,r){let o=wp(e);for(let n of e)for(let i=0;i<o;i+=1){let a=n[i];if(!a||r&&a.disabled){let l=i===0&&r?Sr(n):n[i-1];n[i]=l&&t!==l.id&&r?l:sw(l?.rowId)}}return e}function uw(e){let t=xp(e),r=wp(t),o=[];for(let n=0;n<r;n+=1)for(let i of t){let a=i[n];a&&o.push({...a,rowId:a.rowId?`${n}`:void 0})}return o}function yp(e={}){var t;let r=(t=e.store)==null?void 0:t.getState(),o=hp(e),n=te(e.activeId,r?.activeId,e.defaultActiveId),i={...o.getState(),id:te(e.id,r?.id,`id-${Math.random().toString(36).slice(2,8)}`),activeId:n,baseElement:te(r?.baseElement,null),includesBaseElement:te(e.includesBaseElement,r?.includesBaseElement,n===null),moves:te(r?.moves,0),orientation:te(e.orientation,r?.orientation,"both"),rtl:te(e.rtl,r?.rtl,!1),virtualFocus:te(e.virtualFocus,r?.virtualFocus,!1),focusLoop:te(e.focusLoop,r?.focusLoop,!1),focusWrap:te(e.focusWrap,r?.focusWrap,!1),focusShift:te(e.focusShift,r?.focusShift,!1)},a=pt(i,o,e.store);Ge(a,()=>Ue(a,["renderedItems","activeId"],l=>{a.setState("activeId",c=>{var f;return c!==void 0?c:(f=Sr(l.renderedItems))==null?void 0:f.id})}));let s=(l="next",c={})=>{var f,p;let d=a.getState(),{skip:m=0,activeId:v=d.activeId,focusShift:_=d.focusShift,focusLoop:h=d.focusLoop,focusWrap:b=d.focusWrap,includesBaseElement:y=d.includesBaseElement,renderedItems:A=d.renderedItems,rtl:V=d.rtl}=c,R=l==="up"||l==="down",M=l==="next"||l==="down",k=M?V&&!R:!V||R,S=_&&!m,I=R?ti(lw(xp(A),v,S)):A;if(I=k?nn(I):I,I=R?uw(I):I,v==null)return(f=Sr(I))==null?void 0:f.id;let N=I.find(D=>D.id===v);if(!N)return(p=Sr(I))==null?void 0:p.id;let g=I.some(D=>D.rowId),E=I.indexOf(N),T=I.slice(E+1),w=bp(T,N.rowId);if(m){let D=iw(w,v),W=D.slice(m)[0]||D[D.length-1];return W?.id}let O=h&&(R?h!=="horizontal":h!=="vertical"),x=g&&b&&(R?b!=="horizontal":b!=="vertical"),C=M?(!g||R)&&O&&y:R?y:!1;if(O){let D=x&&!C?I:bp(I,N.rowId),W=aw(D,v,C),Q=Sr(W,v);return Q?.id}if(x){let D=Sr(C?w:T,v);return C?D?.id||null:D?.id}let F=Sr(w,v);return!F&&C?null:F?.id};return{...o,...a,setBaseElement:l=>a.setState("baseElement",l),setActiveId:l=>a.setState("activeId",l),move:l=>{l!==void 0&&(a.setState("activeId",l),a.setState("moves",c=>c+1))},first:()=>{var l;return(l=Sr(a.getState().renderedItems))==null?void 0:l.id},last:()=>{var l;return(l=Sr(nn(a.getState().renderedItems)))==null?void 0:l.id},next:l=>(l!==void 0&&typeof l=="number"&&(l={skip:l}),s("next",l)),previous:l=>(l!==void 0&&typeof l=="number"&&(l={skip:l}),s("previous",l)),down:l=>(l!==void 0&&typeof l=="number"&&(l={skip:l}),s("down",l)),up:l=>(l!==void 0&&typeof l=="number"&&(l={skip:l}),s("up",l))}}function _p(e){return{id:Lt(e.id),...e}}function Sp(e,t,r){return e=gp(e,t,r),Ie(e,r,"activeId","setActiveId"),Ie(e,r,"includesBaseElement"),Ie(e,r,"virtualFocus"),Ie(e,r,"orientation"),Ie(e,r,"rtl"),Ie(e,r,"focusLoop"),Ie(e,r,"focusWrap"),Ie(e,r,"focusShift"),e}var Ya=u(ue(),1),qa=(0,Ya.createContext)(void 0),ii=St([pp,Jo],[vp,Ha]),fc=ii.useContext,sn=ii.useScopedContext,$a=ii.useProviderContext,Cp=ii.ContextProvider,Ep=ii.ScopedContextProvider,Ka=(0,Ya.createContext)(void 0),Tp=(0,Ya.createContext)(!1);function Op(e={}){return dp(e)}function Ap(e,t,r){return fp(e,t,r)}function Ip({popover:e,...t}={}){let r=Po(t.store,ei(e,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"]));let o=r?.getState(),n=Op({...t,store:r}),i=te(t.placement,o?.placement,"bottom"),a={...n.getState(),placement:i,currentPlacement:i,anchorElement:te(o?.anchorElement,null),popoverElement:te(o?.popoverElement,null),arrowElement:te(o?.arrowElement,null),rendered:Symbol("rendered")},s=pt(a,n,r);return{...n,...s,setAnchorElement:l=>s.setState("anchorElement",l),setPopoverElement:l=>s.setState("popoverElement",l),setArrowElement:l=>s.setState("arrowElement",l),render:()=>s.setState("rendered",Symbol("rendered"))}}function Pp(e,t,r){return tr(t,[r.popover]),Ie(e,r,"placement"),Ap(e,t,r)}var cw="div",mc=we(function({store:t,...r}){let o=mp();return t=t||o,r={...r,ref:Ae(t?.setAnchorElement,r.ref)},r}),GI=pe(function(t){let r=mc(t);return xe(cw,r)});var Rp=u(ue(),1),dw="div";function Vp(e){let t=e.relatedTarget;return t?.nodeType===Node.ELEMENT_NODE?t:null}function fw(e){let t=Vp(e);return t?Jt(e.currentTarget,t):!1}var pc=Symbol("composite-hover");function mw(e){let t=Vp(e);if(!t)return!1;do{if(_t(t,pc)&&t[pc])return!0;t=t.parentElement}while(t);return!1}var vc=we(function({store:t,focusOnHover:r=!0,blurOnHoverEnd:o=!!r,...n}){let i=ja();t=t||i,Ke(t,!1);let a=Im(),s=n.onMouseMove,l=ke(r),c=re(v=>{if(s?.(v),!v.defaultPrevented&&a()&&l(v)){if(!ec(v.currentTarget)){let _=t?.getState().baseElement;_&&!Bt(_)&&_.focus()}t?.setActiveId(v.currentTarget.id)}}),f=n.onMouseLeave,p=ke(o),d=re(v=>{var _;f?.(v),!v.defaultPrevented&&a()&&(fw(v)||mw(v)||l(v)&&p(v)&&(t?.setActiveId(null),(_=t?.getState().baseElement)==null||_.focus()))}),m=(0,Rp.useCallback)(v=>{v&&(v[pc]=!0)},[]);return n={...n,ref:Ae(m,n.ref),onMouseMove:c,onMouseLeave:d},Ze(n)}),QI=ro(pe(function(t){let r=vc(t);return xe(dw,r)}));var Xe=u(ue(),1),pw="input";function Np(e,t,r){if(!r)return!1;let o=e.find(n=>!n.disabled&&n.value);return o?.value===t}function Dp(e,t){return!t||e==null?!1:(e=Yn(e),t.length>e.length&&t.toLowerCase().indexOf(e.toLowerCase())===0)}function vw(e){return e.type==="input"}function hw(e){return e==="inline"||e==="list"||e==="both"||e==="none"}function gw(e){let t=e.find(r=>{var o;return r.disabled?!1:((o=r.element)==null?void 0:o.getAttribute("role"))!=="tab"});return t?.id}var bw=we(function({store:t,focusable:r=!0,autoSelect:o=!1,getAutoSelectId:n,setValueOnChange:i,showMinLength:a=0,showOnChange:s,showOnMouseDown:l,showOnClick:c=l,showOnKeyDown:f,showOnKeyPress:p=f,blurActiveItemOnClick:d,setValueOnClick:m=!0,moveOnKeyPress:v=!0,autoComplete:_="list",...h}){let b=$a();t=t||b,Ke(t,!1);let y=(0,Xe.useRef)(null),[A,V]=Om(),R=(0,Xe.useRef)(!1),M=(0,Xe.useRef)(!1),k=t.useState(B=>B.virtualFocus&&o),S=_==="inline"||_==="both",[I,N]=(0,Xe.useState)(S);Tm(()=>{S&&N(!0)},[S]);let g=t.useState("value"),E=(0,Xe.useRef)(void 0);(0,Xe.useEffect)(()=>Ue(t,["selectedValue","activeId"],(B,se)=>{E.current=se.selectedValue}),[]);let T=t.useState(B=>{var se;if(S&&I&&!(B.activeValue&&Array.isArray(B.selectedValue)&&(B.selectedValue.includes(B.activeValue)||(se=E.current)!=null&&se.includes(B.activeValue))))return B.activeValue}),w=t.useState("renderedItems"),O=t.useState("open"),x=t.useState("contentElement"),C=(0,Xe.useMemo)(()=>{if(!S||!I)return g;if(Np(w,T,k)){if(Dp(g,T)){let se=T?.slice(g.length)||"";return g+se}return g}return T||g},[S,I,w,T,k,g]);(0,Xe.useEffect)(()=>{let B=y.current;if(!B)return;let se=()=>N(!0);return B.addEventListener("combobox-item-move",se),()=>{B.removeEventListener("combobox-item-move",se)}},[]),(0,Xe.useEffect)(()=>{if(!S||!I||!T||!Np(w,T,k)||!Dp(g,T))return;let se=Un;return queueMicrotask(()=>{let Be=y.current;if(!Be)return;let{start:je,end:Dt}=Xo(Be),vr=g.length,rt=T.length;Kn(Be,vr,rt),se=()=>{if(!Bt(Be))return;let{start:ho,end:Xb}=Xo(Be);ho===vr&&Xb===rt&&Kn(Be,je,Dt)}}),()=>se()},[A,S,I,T,w,k,g]);let F=(0,Xe.useRef)(null),D=re(n),W=(0,Xe.useRef)(null);(0,Xe.useEffect)(()=>{if(!O||!x)return;let B=Qo(x);if(!B)return;F.current=B;let se=()=>{R.current=!1},Be=()=>{if(!t||!R.current)return;let{activeId:Dt}=t.getState();Dt!==null&&Dt!==W.current&&(R.current=!1)},je={passive:!0,capture:!0};return B.addEventListener("wheel",se,je),B.addEventListener("touchmove",se,je),B.addEventListener("scroll",Be,je),()=>{B.removeEventListener("wheel",se,!0),B.removeEventListener("touchmove",se,!0),B.removeEventListener("scroll",Be,!0)}},[O,x,t]),Te(()=>{g&&(M.current||(R.current=!0))},[g]),Te(()=>{k!=="always"&&O||(R.current=O)},[k,O]);let Q=t.useState("resetValueOnSelect");tr(()=>{var B,se;let Be=R.current;if(!t||!O||!Be&&!Q)return;let{baseElement:je,contentElement:Dt,activeId:vr}=t.getState();if(!(je&&!Bt(je))){if(Dt?.hasAttribute("data-placing")){let rt=new MutationObserver(V);return rt.observe(Dt,{attributeFilter:["data-placing"]}),()=>rt.disconnect()}if(k&&Be){let rt=D(w),ho=rt!==void 0?rt:(B=gw(w))!=null?B:t.first();W.current=ho,t.move(ho??null)}else{let rt=(se=t.item(vr||t.first()))==null?void 0:se.element;rt&&"scrollIntoView"in rt&&rt.scrollIntoView({block:"nearest",inline:"nearest"})}}},[t,O,A,g,k,Q,D,w]),(0,Xe.useEffect)(()=>{if(!S)return;let B=y.current;if(!B)return;let se=[B,x].filter(je=>!!je),Be=je=>{se.every(Dt=>La(je,Dt))&&t?.setValue(C)};for(let je of se)je.addEventListener("focusout",Be);return()=>{for(let je of se)je.removeEventListener("focusout",Be)}},[S,x,t,C]);let ge=B=>B.currentTarget.value.length>=a,et=h.onChange,Et=ke(s??ge),Dr=ke(i??!t.tag),po=re(B=>{if(et?.(B),B.defaultPrevented||!t)return;let se=B.currentTarget,{value:Be,selectionStart:je,selectionEnd:Dt}=se,vr=B.nativeEvent;if(R.current=!0,vw(vr)&&(vr.isComposing&&(R.current=!1,M.current=!0),S)){let rt=vr.inputType==="insertText"||vr.inputType==="insertCompositionText",ho=je===Be.length;N(rt&&ho)}if(Dr(B)){let rt=Be===t.getState().value;t.setValue(Be),queueMicrotask(()=>{Kn(se,je,Dt)}),S&&k&&rt&&V()}Et(B)&&t.show(),(!k||!R.current)&&t.setActiveId(null)}),$=h.onCompositionEnd,Ne=re(B=>{R.current=!0,M.current=!1,$?.(B),!B.defaultPrevented&&k&&V()}),tt=h.onMouseDown,vo=ke(d??(()=>!!t?.getState().includesBaseElement)),Cn=ke(m),En=ke(c??ge),Tn=re(B=>{tt?.(B),!B.defaultPrevented&&(B.button||B.ctrlKey||t&&(vo(B)&&t.setActiveId(null),Cn(B)&&t.setValue(C),En(B)&&to(B.currentTarget,"mouseup",t.show)))}),Si=h.onKeyDown,On=ke(p??ge),sl=re(B=>{if(Si?.(B),B.repeat||(R.current=!1),B.defaultPrevented||B.ctrlKey||B.altKey||B.shiftKey||B.metaKey||!t)return;let{open:se}=t.getState();se||(B.key==="ArrowUp"||B.key==="ArrowDown")&&On(B)&&(B.preventDefault(),t.show())}),fd=h.onBlur,qb=re(B=>{R.current=!1,fd?.(B),B.defaultPrevented}),$b=Lt(h.id),Kb=hw(_)?_:void 0,Zb=t.useState(B=>B.activeId===null);return h={id:$b,role:"combobox","aria-autocomplete":Kb,"aria-haspopup":Gu(x,"listbox"),"aria-expanded":O,"aria-controls":x?.id,"data-active-item":Zb||void 0,value:C,...h,ref:Ae(y,h.ref),onChange:po,onCompositionEnd:Ne,onMouseDown:Tn,onKeyDown:sl,onBlur:qb},h=sc({store:t,focusable:r,...h,moveOnKeyPress:B=>ju(v,B)?!1:(S&&N(!0),!0)}),h=mc({store:t,...h}),{autoComplete:"off",...h}}),Za=pe(function(t){let r=bw(t);return xe(pw,r)});var Xa=u(ue(),1),hc=u(P(),1),xw="div";function ww(e,t){if(t!=null)return e==null?!1:Array.isArray(e)?e.includes(t):e===t}function yw(e){var t;return(t={menu:"menuitem",listbox:"option",tree:"treeitem"}[e])!=null?t:"option"}var kp=we(function({store:t,value:r,hideOnClick:o,setValueOnClick:n,selectValueOnClick:i=!0,resetValueOnSelect:a,focusOnHover:s=!1,moveOnKeyPress:l=!0,getItem:c,...f}){var p;let d=sn();t=t||d,Ke(t,!1);let{resetValueOnSelectState:m,multiSelectable:v,selected:_}=Ga(t,{resetValueOnSelectState:"resetValueOnSelect",multiSelectable(g){return Array.isArray(g.selectedValue)},selected(g){return ww(g.selectedValue,r)}}),h=(0,Xa.useCallback)(g=>{let E={...g,value:r};return c?c(E):E},[r,c]);n=n??!v,o=o??(r!=null&&!v);let b=f.onClick,y=ke(n),A=ke(i),V=ke((p=a??m)!=null?p:v),R=ke(o),M=re(g=>{b?.(g),!g.defaultPrevented&&(vm(g)||pm(g)||(r!=null&&(A(g)&&(V(g)&&t?.resetValue(),t?.setSelectedValue(E=>Array.isArray(E)?E.includes(r)?E.filter(T=>T!==r):[...E,r]:r)),y(g)&&t?.setValue(r)),R(g)&&t?.hide()))}),k=f.onKeyDown,S=re(g=>{if(k?.(g),g.defaultPrevented)return;let E=t?.getState().baseElement;if(!E||Bt(E))return;(g.key.length===1||g.key==="Backspace"||g.key==="Delete")&&(queueMicrotask(()=>E.focus()),ft(E)&&t?.setValue(E.value))});v&&_!=null&&(f={"aria-selected":_,...f}),f=rr(f,g=>(0,hc.jsx)(Ka.Provider,{value:r,children:(0,hc.jsx)(Tp.Provider,{value:_??!1,children:g})}),[r,_]);let I=(0,Xa.useContext)(qa);f={role:yw(I),children:r,...f,onClick:M,onKeyDown:S};let N=ke(l);return f=ic({store:t,...f,getItem:h,moveOnKeyPress:g=>{if(!N(g))return!1;let E=new Event("combobox-item-move"),T=t?.getState().baseElement;return T?.dispatchEvent(E),!0}}),f=vc({store:t,focusOnHover:s,...f}),f}),ai=ro(pe(function(t){let r=kp(t);return xe(xw,r)}));var Qa=u(ue(),1),Fp=u(P(),1),_w="span";function Mp(e){return Yn(e).toLowerCase()}function Sw(e,t){let r=[];for(let o of t){let n=0,i=o.length;for(;e.indexOf(o,n)!==-1;){let a=e.indexOf(o,n);a!==-1&&r.push([a,i]),n=a+1}}return r}function Cw(e){return e.filter(([t,r],o,n)=>!n.some(([i,a],s)=>s!==o&&i<=t&&i+a>=t+r))}function Ew(e){return e.sort(([t],[r])=>t-r)}function Tw(e,t){if(!e||!t)return e;let r=ac(t).filter(Boolean).map(Mp),o=[],n=(l,c=!1)=>(0,Fp.jsx)("span",{"data-autocomplete-value":c?"":void 0,"data-user-value":c?void 0:"",children:l},o.length),i=Ew(Cw(Sw(Mp(e),new Set(r))));if(!i.length)return o.push(n(e,!0)),o;let[a]=i[0];return[e.slice(0,a),...i.flatMap(([l,c],f)=>{var p;let d=e.slice(l,l+c),m=(p=i[f+1])==null?void 0:p[0],v=e.slice(l+c,m);return[d,v]})].forEach((l,c)=>{l&&o.push(n(l,c%2===0))}),o}var Ow=we(function({store:t,value:r,userValue:o,...n}){let i=sn();t=t||i;let a=(0,Qa.useContext)(Ka),s=r??a,l=rn(t,f=>o??f?.value);return n={children:(0,Qa.useMemo)(()=>{if(s)return l?Tw(s,l):s},[s,l]),...n},Ze(n)}),Ja=pe(function(t){let r=Ow(t);return xe(_w,r)});var Aw="label",Iw=we(function({store:t,...r}){let o=$a();return t=t||o,Ke(t,!1),r={htmlFor:t.useState(i=>{var a;return(a=i.baseElement)==null?void 0:a.id}),...r},Ze(r)}),es=ro(pe(function(t){let r=Iw(t);return xe(Aw,r)}));var ts=u(ue(),1),gc=u(P(),1),Pw="div",Lp=we(function({store:t,alwaysVisible:r,...o}){let n=sn(!0),i=fc();t=t||i;let a=!!t&&t===n;Ke(t,!1);let s=(0,ts.useRef)(null),l=Lt(o.id),c=t.useState("mounted"),f=dc(c,o.hidden,r),p=f?{...o.style,display:"none"}:o.style,d=t.useState(V=>Array.isArray(V.selectedValue)),m=Em(s,"role",o.role),_=(m==="listbox"||m==="tree"||m==="grid")&&d||void 0,[h,b]=(0,ts.useState)(!1),y=t.useState("contentElement");Te(()=>{if(!c)return;let V=s.current;if(!V||y!==V)return;let R=()=>{b(!!V.querySelector("[role='listbox']"))},M=new MutationObserver(R);return M.observe(V,{subtree:!0,childList:!0,attributeFilter:["role"]}),R(),()=>M.disconnect()},[c,y]),h||(o={role:"listbox","aria-multiselectable":_,...o}),o=rr(o,V=>(0,gc.jsx)(Ep,{value:t,children:(0,gc.jsx)(qa.Provider,{value:m,children:V})}),[t,m]);let A=l&&(!n||!a)?t.setContentElement:null;return o={id:l,hidden:f,...o,ref:Ae(A,s,o.ref),style:p},Ze(o)}),si=pe(function(t){let r=Lp(t);return xe(Pw,r)});var bc=u(ue(),1),GP=(0,bc.createContext)(null),UP=(0,bc.createContext)(null),li=St([Jo],[Ha]),Bp=li.useContext,YP=li.useScopedContext,qP=li.useProviderContext,$P=li.ContextProvider,KP=li.ScopedContextProvider;var Rw=Eo()&&Yu();function jp({tag:e,...t}={}){let r=Po(t.store,nc(e,["value","rtl"]));let o=e?.getState(),n=r?.getState(),i=te(t.activeId,n?.activeId,t.defaultActiveId,null),a=yp({...t,activeId:i,includesBaseElement:te(t.includesBaseElement,n?.includesBaseElement,!0),orientation:te(t.orientation,n?.orientation,"vertical"),focusLoop:te(t.focusLoop,n?.focusLoop,!0),focusWrap:te(t.focusWrap,n?.focusWrap,!0),virtualFocus:te(t.virtualFocus,n?.virtualFocus,!0)}),s=Ip({...t,placement:te(t.placement,n?.placement,"bottom-start")}),l=te(t.value,n?.value,t.defaultValue,""),c=te(t.selectedValue,n?.selectedValue,o?.values,t.defaultSelectedValue,""),f=Array.isArray(c),p={...a.getState(),...s.getState(),value:l,selectedValue:c,resetValueOnSelect:te(t.resetValueOnSelect,n?.resetValueOnSelect,f),resetValueOnHide:te(t.resetValueOnHide,n?.resetValueOnHide,f&&!e),activeValue:n?.activeValue},d=pt(p,a,s,r);return Rw&&Ge(d,()=>Ue(d,["virtualFocus"],()=>{d.setState("virtualFocus",!1)})),Ge(d,()=>{if(e)return Jr(Ue(d,["selectedValue"],m=>{Array.isArray(m.selectedValue)&&e.setValues(m.selectedValue)}),Ue(e,["values"],m=>{d.setState("selectedValue",m.values)}))}),Ge(d,()=>Ue(d,["resetValueOnHide","mounted"],m=>{m.resetValueOnHide&&(m.mounted||d.setState("value",l))})),Ge(d,()=>Ue(d,["open"],m=>{m.open||(d.setState("activeId",i),d.setState("moves",0))})),Ge(d,()=>Ue(d,["moves","activeId"],(m,v)=>{m.moves===v.moves&&d.setState("activeValue",void 0)})),Ge(d,()=>no(d,["moves","renderedItems"],(m,v)=>{if(m.moves===v.moves)return;let{activeId:_}=d.getState(),h=a.item(_);d.setState("activeValue",h?.value)})),{...s,...a,...d,tag:e,setValue:m=>d.setState("value",m),resetValue:()=>d.setState("value",p.value),setSelectedValue:m=>d.setState("selectedValue",m)}}function Nw(e){let t=Bp();return e={...e,tag:e.tag!==void 0?e.tag:t},_p(e)}function Dw(e,t,r){return tr(t,[r.tag]),Ie(e,r,"value","setValue"),Ie(e,r,"selectedValue","setSelectedValue"),Ie(e,r,"resetValueOnHide"),Ie(e,r,"resetValueOnSelect"),Object.assign(Sp(Pp(e,t,r),t,r),{tag:r.tag})}function xc(e={}){e=Nw(e);let[t,r]=on(jp,e);return Dw(t,r,e)}var Hp=u(P(),1);function rs(e={}){let t=xc(e);return(0,Hp.jsx)(Cp,{value:t,children:e.children})}var Kp=u(Up(),1);var Zp=u(bt(),1),Cr=u(j(),1),Ro=u(z(),1),jt=u(G(),1);var jw=[],ui=(e,t)=>e.singleSelection?t?.value:Array.isArray(t?.value)?t.value:!Array.isArray(t?.value)&&t?.value?[t.value]:jw;var ci=u(z(),1),Hw=[];function Ye({elements:e,getElements:t}){let r=Array.isArray(e)&&e.length>0?e:Hw,[o,n]=(0,ci.useState)(r),[i,a]=(0,ci.useState)(!1);return(0,ci.useEffect)(()=>{if(!t){n(r);return}let s=!1;return a(!0),t().then(l=>{if(!s){let c=Array.isArray(l)&&l.length>0?l:r;n(c)}}).catch(()=>{s||n(r)}).finally(()=>{s||a(!1)}),()=>{s=!0}},[t,r]),{elements:o,isLoading:i}}var ne=u(P(),1);function Yp(e=""){return(0,Kp.default)(e.trim().toLowerCase())}var qp=(e,t,r)=>e.singleSelection?r:Array.isArray(t?.value)?t.value.includes(r)?t.value.filter(o=>o!==r):[...t.value,r]:[r];function $p(e,t){return`${e}-${t}`}var Xp=({selected:e})=>(0,ne.jsx)("span",{className:Y("dataviews-filters__search-widget-listitem-multi-selection",{"is-selected":e}),children:e&&(0,ne.jsx)(jt.Icon,{icon:Rn})}),Qp=({selected:e})=>(0,ne.jsx)("span",{className:Y("dataviews-filters__search-widget-listitem-single-selection",{"is-selected":e})});function Jp({view:e,filter:t,onChangeView:r}){let o=(0,Zp.useInstanceId)(Jp,"dataviews-filter-list-box"),[n,i]=(0,Ro.useState)(t.operators?.length===1?void 0:null),a=e.filters?.find(l=>l.field===t.field),s=ui(t,a);return(0,ne.jsx)(jt.Composite,{virtualFocus:!0,focusLoop:!0,activeId:n,setActiveId:i,role:"listbox",className:"dataviews-filters__search-widget-listbox","aria-label":(0,Cr.sprintf)((0,Cr.__)("List of: %1$s"),t.name),onFocusVisible:()=>{!n&&t.elements.length&&i($p(o,t.elements[0].value))},render:(0,ne.jsx)(jt.Composite.Typeahead,{}),children:t.elements.map(l=>(0,ne.jsxs)(jt.Composite.Hover,{render:(0,ne.jsx)(jt.Composite.Item,{id:$p(o,l.value),render:(0,ne.jsx)("div",{"aria-label":l.label,role:"option",className:"dataviews-filters__search-widget-listitem"}),onClick:()=>{let c=a?[...(e.filters??[]).map(f=>f.field===t.field?{...f,operator:a.operator||t.operators[0],value:qp(t,a,l.value)}:f)]:[...e.filters??[],{field:t.field,operator:t.operators[0],value:qp(t,a,l.value)}];r({...e,page:1,filters:c})}}),children:[t.singleSelection&&(0,ne.jsx)(Qp,{selected:s===l.value}),!t.singleSelection&&(0,ne.jsx)(Xp,{selected:s.includes(l.value)}),(0,ne.jsx)("span",{className:"dataviews-filters__search-widget-listitem-value",title:l.label,children:l.label})]},l.value))})}function zw({view:e,filter:t,onChangeView:r}){let[o,n]=(0,Ro.useState)(""),i=(0,Ro.useDeferredValue)(o),a=e.filters?.find(c=>c.field===t.field),s=ui(t,a),l=(0,Ro.useMemo)(()=>{let c=Yp(i);return t.elements.filter(f=>Yp(f.label).includes(c))},[t.elements,i]);return(0,ne.jsxs)(rs,{selectedValue:s,setSelectedValue:c=>{let f=a?[...(e.filters??[]).map(p=>p.field===t.field?{...p,operator:a.operator||t.operators[0],value:c}:p)]:[...e.filters??[],{field:t.field,operator:t.operators[0],value:c}];r({...e,page:1,filters:f})},setValue:n,children:[(0,ne.jsxs)("div",{className:"dataviews-filters__search-widget-filter-combobox__wrapper",children:[(0,ne.jsx)(es,{render:(0,ne.jsx)(jt.VisuallyHidden,{children:(0,Cr.__)("Search items")}),children:(0,Cr.__)("Search items")}),(0,ne.jsx)(Za,{autoSelect:"always",placeholder:(0,Cr.__)("Search"),className:"dataviews-filters__search-widget-filter-combobox__input"}),(0,ne.jsx)("div",{className:"dataviews-filters__search-widget-filter-combobox__icon",children:(0,ne.jsx)(jt.Icon,{icon:Ql})})]}),(0,ne.jsxs)(si,{className:"dataviews-filters__search-widget-filter-combobox-list",alwaysVisible:!0,children:[l.map(c=>(0,ne.jsxs)(ai,{resetValueOnSelect:!1,value:c.value,className:"dataviews-filters__search-widget-listitem",hideOnClick:!1,setValueOnClick:!1,focusOnHover:!0,children:[t.singleSelection&&(0,ne.jsx)(Qp,{selected:s===c.value}),!t.singleSelection&&(0,ne.jsx)(Xp,{selected:s.includes(c.value)}),(0,ne.jsxs)("span",{className:"dataviews-filters__search-widget-listitem-value",title:c.label,children:[(0,ne.jsx)(Ja,{className:"dataviews-filters__search-widget-filter-combobox-item-value",value:c.label}),!!c.description&&(0,ne.jsx)("span",{className:"dataviews-filters__search-widget-listitem-description",children:c.description})]})]},c.value)),!l.length&&(0,ne.jsx)("p",{children:(0,Cr.__)("No results found")})]})]})}function ev(e){let{elements:t,isLoading:r}=Ye({elements:e.filter.elements,getElements:e.filter.getElements});if(r)return(0,ne.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,ne.jsx)(jt.Spinner,{})});if(t.length===0)return(0,ne.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,Cr.__)("No elements found")});let o=t.length>10?zw:Jp;return(0,ne.jsx)(o,{...e,filter:{...e.filter,elements:t}})}var ov=u(rv(),1),nv=u(bt(),1),wc=u(z(),1),iv=u(G(),1);var yc=u(P(),1);function av({filter:e,view:t,onChangeView:r,fields:o}){let n=t.filters?.find(c=>c.field===e.field),i=ui(e,n),a=(0,wc.useMemo)(()=>{let c=o.find(f=>f.id===e.field);return c&&{...c,isValid:{},getValue:({item:f})=>f[c.id],setValue:({value:f})=>({[c.id]:f})}},[o,e.field]),s=(0,wc.useMemo)(()=>(t.filters??[]).reduce((c,f)=>(c[f.field]=f.value,c),{}),[t.filters]),l=(0,nv.useEvent)(c=>{if(!a||!n)return;let f=a.getValue({item:c});(0,ov.default)(f,i)||r({...t,filters:(t.filters??[]).map(p=>p.field===e.field?{...p,operator:n.operator||e.operators[0],value:f===""?void 0:f}:p)})});return!a||!a.Edit||!n?null:(0,yc.jsx)(iv.Flex,{className:"dataviews-filters__user-input-widget",gap:2.5,direction:"column",children:(0,yc.jsx)(a.Edit,{hideLabelFromVision:!0,data:s,field:a,operator:n.operator,onChange:l})})}var Ww=Math.pow(10,8)*24*60*60*1e3,BR=-Ww,ns=6048e5,sv=864e5;var Gw=3600;var lv=Gw*24,jR=lv*7,Uw=lv*365.2425,Yw=Uw/12,HR=Yw*3,_c=Symbol.for("constructDateFrom");function He(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&_c in e?e[_c](t):e instanceof Date?new e.constructor(t):new Date(t)}function fe(e,t){return He(t||e,e)}function is(e,t,r){let o=fe(e,r?.in);return isNaN(t)?He(r?.in||e,NaN):(t&&o.setDate(o.getDate()+t),o)}function as(e,t,r){let o=fe(e,r?.in);if(isNaN(t))return He(r?.in||e,NaN);if(!t)return o;let n=o.getDate(),i=He(r?.in||e,o.getTime());i.setMonth(o.getMonth()+t+1,0);let a=i.getDate();return n>=a?i:(o.setFullYear(i.getFullYear(),i.getMonth(),n),o)}var qw={};function io(){return qw}function Er(e,t){let r=io(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=fe(e,t?.in),i=n.getDay(),a=(i<o?7:0)+i-o;return n.setDate(n.getDate()-a),n.setHours(0,0,0,0),n}function Vo(e,t){return Er(e,{...t,weekStartsOn:1})}function ss(e,t){let r=fe(e,t?.in),o=r.getFullYear(),n=He(r,0);n.setFullYear(o+1,0,4),n.setHours(0,0,0,0);let i=Vo(n),a=He(r,0);a.setFullYear(o,0,4),a.setHours(0,0,0,0);let s=Vo(a);return r.getTime()>=i.getTime()?o+1:r.getTime()>=s.getTime()?o:o-1}function Sc(e){let t=fe(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function uv(e,...t){let r=He.bind(null,e||t.find(o=>typeof o=="object"));return t.map(r)}function Cc(e,t){let r=fe(e,t?.in);return r.setHours(0,0,0,0),r}function cv(e,t,r){let[o,n]=uv(r?.in,e,t),i=Cc(o),a=Cc(n),s=+i-Sc(i),l=+a-Sc(a);return Math.round((s-l)/sv)}function dv(e,t){let r=ss(e,t),o=He(t?.in||e,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),Vo(o)}function fv(e,t,r){return is(e,t*7,r)}function mv(e,t,r){return as(e,t*12,r)}function pv(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ln(e){return!(!pv(e)&&typeof e!="number"||isNaN(+fe(e)))}function vv(e,t){let r=fe(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function ls(e,t){let r=fe(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}var $w={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},hv=(e,t,r)=>{let o,n=$w[e];return typeof n=="string"?o=n:t===1?o=n.one:o=n.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+o:o+" ago":o};function us(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var Kw={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Zw={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Xw={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},gv={date:us({formats:Kw,defaultWidth:"full"}),time:us({formats:Zw,defaultWidth:"full"}),dateTime:us({formats:Xw,defaultWidth:"full"})};var Qw={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bv=(e,t,r,o)=>Qw[e];function un(e){return(t,r)=>{let o=r?.context?String(r.context):"standalone",n;if(o==="formatting"&&e.formattingValues){let a=e.defaultFormattingWidth||e.defaultWidth,s=r?.width?String(r.width):a;n=e.formattingValues[s]||e.formattingValues[a]}else{let a=e.defaultWidth,s=r?.width?String(r.width):e.defaultWidth;n=e.values[s]||e.values[a]}let i=e.argumentCallback?e.argumentCallback(t):t;return n[i]}}var Jw={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ey={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ty={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ry={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},oy={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ny={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},iy=(e,t)=>{let r=Number(e),o=r%100;if(o>20||o<10)switch(o%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},xv={ordinalNumber:iy,era:un({values:Jw,defaultWidth:"wide"}),quarter:un({values:ey,defaultWidth:"wide",argumentCallback:e=>e-1}),month:un({values:ty,defaultWidth:"wide"}),day:un({values:ry,defaultWidth:"wide"}),dayPeriod:un({values:oy,defaultWidth:"wide",formattingValues:ny,defaultFormattingWidth:"wide"})};function cn(e){return(t,r={})=>{let o=r.width,n=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],i=t.match(n);if(!i)return null;let a=i[0],s=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?sy(s,p=>p.test(a)):ay(s,p=>p.test(a)),c;c=e.valueCallback?e.valueCallback(l):l,c=r.valueCallback?r.valueCallback(c):c;let f=t.slice(a.length);return{value:c,rest:f}}}function ay(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function sy(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function wv(e){return(t,r={})=>{let o=t.match(e.matchPattern);if(!o)return null;let n=o[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=r.valueCallback?r.valueCallback(a):a;let s=t.slice(n.length);return{value:a,rest:s}}}var ly=/^(\d+)(th|st|nd|rd)?/i,uy=/\d+/i,cy={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},dy={any:[/^b/i,/^(a|c)/i]},fy={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},my={any:[/1/i,/2/i,/3/i,/4/i]},py={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},vy={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},hy={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},gy={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},by={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},xy={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},yv={ordinalNumber:wv({matchPattern:ly,parsePattern:uy,valueCallback:e=>parseInt(e,10)}),era:cn({matchPatterns:cy,defaultMatchWidth:"wide",parsePatterns:dy,defaultParseWidth:"any"}),quarter:cn({matchPatterns:fy,defaultMatchWidth:"wide",parsePatterns:my,defaultParseWidth:"any",valueCallback:e=>e+1}),month:cn({matchPatterns:py,defaultMatchWidth:"wide",parsePatterns:vy,defaultParseWidth:"any"}),day:cn({matchPatterns:hy,defaultMatchWidth:"wide",parsePatterns:gy,defaultParseWidth:"any"}),dayPeriod:cn({matchPatterns:by,defaultMatchWidth:"any",parsePatterns:xy,defaultParseWidth:"any"})};var Ec={code:"en-US",formatDistance:hv,formatLong:gv,formatRelative:bv,localize:xv,match:yv,options:{weekStartsOn:0,firstWeekContainsDate:1}};function _v(e,t){let r=fe(e,t?.in);return cv(r,ls(r))+1}function Sv(e,t){let r=fe(e,t?.in),o=+Vo(r)-+dv(r);return Math.round(o/ns)+1}function cs(e,t){let r=fe(e,t?.in),o=r.getFullYear(),n=io(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=He(t?.in||e,0);a.setFullYear(o+1,0,i),a.setHours(0,0,0,0);let s=Er(a,t),l=He(t?.in||e,0);l.setFullYear(o,0,i),l.setHours(0,0,0,0);let c=Er(l,t);return+r>=+s?o+1:+r>=+c?o:o-1}function Cv(e,t){let r=io(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=cs(e,t),i=He(t?.in||e,0);return i.setFullYear(n,0,o),i.setHours(0,0,0,0),Er(i,t)}function Ev(e,t){let r=fe(e,t?.in),o=+Er(r,t)-+Cv(r,t);return Math.round(o/ns)+1}function ae(e,t){let r=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return r+o}var Tr={y(e,t){let r=e.getFullYear(),o=r>0?r:1-r;return ae(t==="yy"?o%100:o,t.length)},M(e,t){let r=e.getMonth();return t==="M"?String(r+1):ae(r+1,2)},d(e,t){return ae(e.getDate(),t.length)},a(e,t){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return r==="am"?"a.m.":"p.m."}},h(e,t){return ae(e.getHours()%12||12,t.length)},H(e,t){return ae(e.getHours(),t.length)},m(e,t){return ae(e.getMinutes(),t.length)},s(e,t){return ae(e.getSeconds(),t.length)},S(e,t){let r=t.length,o=e.getMilliseconds(),n=Math.trunc(o*Math.pow(10,r-3));return ae(n,t.length)}};var dn={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Tc={G:function(e,t,r){let o=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(o,{width:"abbreviated"});case"GGGGG":return r.era(o,{width:"narrow"});default:return r.era(o,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){let o=e.getFullYear(),n=o>0?o:1-o;return r.ordinalNumber(n,{unit:"year"})}return Tr.y(e,t)},Y:function(e,t,r,o){let n=cs(e,o),i=n>0?n:1-n;if(t==="YY"){let a=i%100;return ae(a,2)}return t==="Yo"?r.ordinalNumber(i,{unit:"year"}):ae(i,t.length)},R:function(e,t){let r=ss(e);return ae(r,t.length)},u:function(e,t){let r=e.getFullYear();return ae(r,t.length)},Q:function(e,t,r){let o=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return ae(o,2);case"Qo":return r.ordinalNumber(o,{unit:"quarter"});case"QQQ":return r.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(o,{width:"narrow",context:"formatting"});default:return r.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,r){let o=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return ae(o,2);case"qo":return r.ordinalNumber(o,{unit:"quarter"});case"qqq":return r.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(o,{width:"narrow",context:"standalone"});default:return r.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,r){let o=e.getMonth();switch(t){case"M":case"MM":return Tr.M(e,t);case"Mo":return r.ordinalNumber(o+1,{unit:"month"});case"MMM":return r.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(o,{width:"narrow",context:"formatting"});default:return r.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,r){let o=e.getMonth();switch(t){case"L":return String(o+1);case"LL":return ae(o+1,2);case"Lo":return r.ordinalNumber(o+1,{unit:"month"});case"LLL":return r.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(o,{width:"narrow",context:"standalone"});default:return r.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,r,o){let n=Ev(e,o);return t==="wo"?r.ordinalNumber(n,{unit:"week"}):ae(n,t.length)},I:function(e,t,r){let o=Sv(e);return t==="Io"?r.ordinalNumber(o,{unit:"week"}):ae(o,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Tr.d(e,t)},D:function(e,t,r){let o=_v(e);return t==="Do"?r.ordinalNumber(o,{unit:"dayOfYear"}):ae(o,t.length)},E:function(e,t,r){let o=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,r,o){let n=e.getDay(),i=(n-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return ae(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,r,o){let n=e.getDay(),i=(n-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return ae(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(n,{width:"narrow",context:"standalone"});case"cccccc":return r.day(n,{width:"short",context:"standalone"});default:return r.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,r){let o=e.getDay(),n=o===0?7:o;switch(t){case"i":return String(n);case"ii":return ae(n,t.length);case"io":return r.ordinalNumber(n,{unit:"day"});case"iii":return r.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,r){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){let o=e.getHours(),n;switch(o===12?n=dn.noon:o===0?n=dn.midnight:n=o/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){let o=e.getHours(),n;switch(o>=17?n=dn.evening:o>=12?n=dn.afternoon:o>=4?n=dn.morning:n=dn.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let o=e.getHours()%12;return o===0&&(o=12),r.ordinalNumber(o,{unit:"hour"})}return Tr.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Tr.H(e,t)},K:function(e,t,r){let o=e.getHours()%12;return t==="Ko"?r.ordinalNumber(o,{unit:"hour"}):ae(o,t.length)},k:function(e,t,r){let o=e.getHours();return o===0&&(o=24),t==="ko"?r.ordinalNumber(o,{unit:"hour"}):ae(o,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Tr.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Tr.s(e,t)},S:function(e,t){return Tr.S(e,t)},X:function(e,t,r){let o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return Ov(o);case"XXXX":case"XX":return No(o);default:return No(o,":")}},x:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"x":return Ov(o);case"xxxx":case"xx":return No(o);default:return No(o,":")}},O:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Tv(o,":");default:return"GMT"+No(o,":")}},z:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Tv(o,":");default:return"GMT"+No(o,":")}},t:function(e,t,r){let o=Math.trunc(+e/1e3);return ae(o,t.length)},T:function(e,t,r){return ae(+e,t.length)}};function Tv(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=Math.trunc(o/60),i=o%60;return i===0?r+String(n):r+String(n)+t+ae(i,2)}function Ov(e,t){return e%60===0?(e>0?"-":"+")+ae(Math.abs(e)/60,2):No(e,t)}function No(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=ae(Math.trunc(o/60),2),i=ae(o%60,2);return r+n+t+i}var Av=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Iv=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},wy=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],o=r[1],n=r[2];if(!n)return Av(e,t);let i;switch(o){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Av(o,t)).replace("{{time}}",Iv(n,t))},Pv={p:Iv,P:wy};var yy=/^D+$/,_y=/^Y+$/,Sy=["D","DD","YY","YYYY"];function Rv(e){return yy.test(e)}function Vv(e){return _y.test(e)}function Nv(e,t,r){let o=Cy(e,t,r);if(console.warn(o),Sy.includes(e))throw new RangeError(o)}function Cy(e,t,r){let o=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${o} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var Ey=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ty=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Oy=/^'([^]*?)'?$/,Ay=/''/g,Iy=/[a-zA-Z]/;function Oc(e,t,r){let o=io(),n=r?.locale??o.locale??Ec,i=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,s=fe(e,r?.in);if(!ln(s))throw new RangeError("Invalid time value");let l=t.match(Ty).map(f=>{let p=f[0];if(p==="p"||p==="P"){let d=Pv[p];return d(f,n.formatLong)}return f}).join("").match(Ey).map(f=>{if(f==="''")return{isToken:!1,value:"'"};let p=f[0];if(p==="'")return{isToken:!1,value:Py(f)};if(Tc[p])return{isToken:!0,value:f};if(p.match(Iy))throw new RangeError("Format string contains an unescaped latin alphabet character `"+p+"`");return{isToken:!1,value:f}});n.localize.preprocessor&&(l=n.localize.preprocessor(s,l));let c={firstWeekContainsDate:i,weekStartsOn:a,locale:n};return l.map(f=>{if(!f.isToken)return f.value;let p=f.value;(!r?.useAdditionalWeekYearTokens&&Vv(p)||!r?.useAdditionalDayOfYearTokens&&Rv(p))&&Nv(p,t,String(e));let d=Tc[p[0]];return d(s,p,n.localize,c)}).join("")}function Py(e){let t=e.match(Oy);return t?t[1].replace(Ay,"'"):e}function Do(e,t,r){return is(e,-t,r)}function ds(e,t,r){return as(e,-t,r)}function Dv(e,t,r){return fv(e,-t,r)}function fs(e,t,r){return mv(e,-t,r)}var H=u(j(),1),Pe=u(z(),1),vt=u(Or(),1);var Ac=u(P(),1),Me={Name:(0,Ac.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,Ac.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};function Mv(e,t){switch(t){case"days":return Do(new Date,e);case"weeks":return Dv(new Date,e);case"months":return ds(new Date,e);case"years":return fs(new Date,e);default:return new Date}}var Fv={label:(0,H.__)("Is none of"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),Me),filter:((e,t,r)=>{if(!r?.length)return!0;let o=t.getValue({item:e});return Array.isArray(o)?!r.some(n=>o.includes(n)):typeof o=="string"?!r.includes(o):!1}),selection:"multi"},ms=[{name:_e,label:(0,H.__)("Includes"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),Me),filter(e,t,r){if(!r?.length)return!0;let o=t.getValue({item:e});return Array.isArray(o)?r.some(n=>o.includes(n)):typeof o=="string"?r.includes(o):!1},selection:"multi"},{name:Se,...Fv},{name:ot,label:(0,H.__)("Includes all"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),Me),filter(e,t,r){return r?.length?r.every(o=>t.getValue({item:e})?.includes(o)):!0},selection:"multi"},{name:nt,...Fv},{name:ct,label:(0,H.__)("Between (inc)"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"),e.name,t[0].label[0],t[0].label[1]),Me),filter(e,t,r){if(!Array.isArray(r)||r.length!==2||r[0]===void 0||r[1]===void 0)return!0;let o=t.getValue({item:e});return typeof o=="number"||o instanceof Date||typeof o=="string"?o>=r[0]&&o<=r[1]:!1},selection:"custom"},{name:dt,label:(0,H.__)("In the past"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),Me),filter(e,t,r){if(r?.value===void 0||r?.unit===void 0)return!0;let o=Mv(r.value,r.unit),n=(0,vt.getDate)(t.getValue({item:e}));return n>=o&&n<=new Date},selection:"custom"},{name:xt,label:(0,H.__)("Over"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),Me),filter(e,t,r){if(r?.value===void 0||r?.unit===void 0)return!0;let o=Mv(r.value,r.unit);return(0,vt.getDate)(t.getValue({item:e}))<o},selection:"custom"},{name:Ce,label:(0,H.__)("Is"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){return r===t.getValue({item:e})||r===void 0},selection:"single"},{name:Ee,label:(0,H.__)("Is not"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){return r!==t.getValue({item:e})},selection:"single"},{name:Fr,label:(0,H.__)("Less than"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})<r},selection:"single"},{name:Lr,label:(0,H.__)("Greater than"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})>r},selection:"single"},{name:Br,label:(0,H.__)("Less than or equal"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})<=r},selection:"single"},{name:jr,label:(0,H.__)("Greater than or equal"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})>=r},selection:"single"},{name:Hr,label:(0,H.__)("Before"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){if(r===void 0)return!0;let o=(0,vt.getDate)(r);return(0,vt.getDate)(t.getValue({item:e}))<o},selection:"single"},{name:zr,label:(0,H.__)("After"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){if(r===void 0)return!0;let o=(0,vt.getDate)(r);return(0,vt.getDate)(t.getValue({item:e}))>o},selection:"single"},{name:Wr,label:(0,H.__)("Before (inc)"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){if(r===void 0)return!0;let o=(0,vt.getDate)(r);return(0,vt.getDate)(t.getValue({item:e}))<=o},selection:"single"},{name:Gr,label:(0,H.__)("After (inc)"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){if(r===void 0)return!0;let o=(0,vt.getDate)(r);return(0,vt.getDate)(t.getValue({item:e}))>=o},selection:"single"},{name:$t,label:(0,H.__)("Contains"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){if(r===void 0)return!0;let o=t.getValue({item:e});return typeof o=="string"&&r&&o.toLowerCase().includes(String(r).toLowerCase())},selection:"single"},{name:Kt,label:(0,H.__)("Doesn't contain"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){if(r===void 0)return!0;let o=t.getValue({item:e});return typeof o=="string"&&r&&!o.toLowerCase().includes(String(r).toLowerCase())},selection:"single"},{name:Zt,label:(0,H.__)("Starts with"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){if(r===void 0)return!0;let o=t.getValue({item:e});return typeof o=="string"&&r&&o.toLowerCase().startsWith(String(r).toLowerCase())},selection:"single"},{name:Ur,label:(0,H.__)("On"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){if(r===void 0)return!0;let o=(0,vt.getDate)(r),n=(0,vt.getDate)(t.getValue({item:e}));return o.getTime()===n.getTime()},selection:"single"},{name:Yr,label:(0,H.__)("Not on"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){if(r===void 0)return!0;let o=(0,vt.getDate)(r),n=(0,vt.getDate)(t.getValue({item:e}));return o.getTime()!==n.getTime()},selection:"single"}],ko=e=>ms.find(t=>t.name===e),Lv=()=>ms.map(e=>e.name),Bv=e=>ms.filter(t=>t.selection==="single").some(t=>t.name===e),jv=e=>ms.some(t=>t.name===e);var Qe=u(P(),1),Ry="Enter",Vy=" ",Ny=({activeElements:e,filterInView:t,filter:r})=>{if(e===void 0||e.length===0)return r.name;let o=ko(t?.operator);return o!==void 0?o.filterText(r,e):(0,Ar.sprintf)((0,Ar.__)("Unknown status for %1$s"),r.name)};function Dy({filter:e,view:t,onChangeView:r}){let o=e.operators?.map(a=>({value:a,label:ko(a)?.label||a})),n=t.filters?.find(a=>a.field===e.field),i=n?.operator||e.operators[0];return o.length>1&&(0,Qe.jsxs)(L,{direction:"row",gap:"sm",justify:"flex-start",className:"dataviews-filters__summary-operators-container",align:"center",children:[(0,Qe.jsx)(Gt.FlexItem,{className:"dataviews-filters__summary-operators-filter-name",children:e.name}),(0,Qe.jsx)(Gt.SelectControl,{className:"dataviews-filters__summary-operators-filter-select",label:(0,Ar.__)("Conditions"),value:i,options:o,onChange:a=>{let s=a,l=n?.operator,c=n?[...(t.filters??[]).map(f=>{if(f.field===e.field){let p=ko(l)?.selection,d=ko(s)?.selection,m=p!==d||[p,d].includes("custom");return{...f,value:m?void 0:f.value,operator:s}}return f})]:[...t.filters??[],{field:e.field,operator:s,value:void 0}];r({...t,page:1,filters:c})},size:"small",variant:"minimal",hideLabelFromVision:!0})]})}function Hv({addFilterRef:e,openedFilter:t,fields:r,...o}){let n=(0,ps.useRef)(null),{filter:i,view:a,onChangeView:s}=o,l=a.filters?.find(h=>h.field===i.field),c=[],f=(0,ps.useMemo)(()=>{let h=r.find(b=>b.id===i.field);return h&&{...h,getValue:({item:b})=>b[h.id]}},[r,i.field]),{elements:p}=Ye({elements:i.elements,getElements:i.getElements});if(p.length>0)c=p.filter(h=>i.singleSelection?h.value===l?.value:l?.value?.includes(h.value));else if(Array.isArray(l?.value)){let h=l.value.map(b=>f?.getValueFormatted({item:{[f.id]:b},field:f})||String(b));c=[{value:l.value,label:h}]}else if(typeof l?.value=="object")c=[{value:l.value,label:l.value}];else if(l?.value!==void 0){let h=f!==void 0?f.getValueFormatted({item:{[f.id]:l.value},field:f}):String(l.value);c=[{value:l.value,label:h}]}let d=i.isPrimary,m=l?.isLocked,v=!m&&l?.value!==void 0,_=!m&&(!d||v);return(0,Qe.jsx)(Gt.Dropdown,{defaultOpen:t===i.field,contentClassName:"dataviews-filters__summary-popover",popoverProps:{placement:"bottom-start",role:"dialog"},onClose:()=>{n.current?.focus()},renderToggle:({isOpen:h,onToggle:b})=>(0,Qe.jsxs)("div",{className:"dataviews-filters__summary-chip-container",children:[(0,Qe.jsx)(Gt.Tooltip,{text:(0,Ar.sprintf)((0,Ar.__)("Filter by: %1$s"),i.name.toLowerCase()),placement:"top",children:(0,Qe.jsx)("div",{className:Y("dataviews-filters__summary-chip",{"has-reset":_,"has-values":v,"is-not-clickable":m}),role:"button",tabIndex:m?-1:0,onClick:()=>{m||b()},onKeyDown:y=>{!m&&[Ry,Vy].includes(y.key)&&(b(),y.preventDefault())},"aria-disabled":m,"aria-pressed":h,"aria-expanded":h,ref:n,children:(0,Qe.jsx)(Ny,{activeElements:c,filterInView:l,filter:i})})}),_&&(0,Qe.jsx)(Gt.Tooltip,{text:d?(0,Ar.__)("Reset"):(0,Ar.__)("Remove"),placement:"top",children:(0,Qe.jsx)("button",{className:Y("dataviews-filters__summary-chip-remove",{"has-values":v}),onClick:()=>{s({...a,page:1,filters:a.filters?.filter(y=>y.field!==i.field)}),d?n.current?.focus():e.current?.focus()},children:(0,Qe.jsx)(Gt.Icon,{icon:Cl})})})]}),renderContent:()=>(0,Qe.jsxs)(L,{direction:"column",justify:"flex-start",children:[(0,Qe.jsx)(Dy,{...o}),o.filter.hasElements?(0,Qe.jsx)(ev,{...o,filter:{...o.filter,elements:p}}):(0,Qe.jsx)(av,{...o,fields:r})]})})}var vs=u(G(),1),zv=u(j(),1),Wv=u(z(),1);var Ir=u(P(),1),{Menu:di}=Z(vs.privateApis);function Ic({filters:e,view:t,onChangeView:r,setOpenedFilter:o,triggerProps:n}){let i=e.filter(a=>!a.isVisible);return(0,Ir.jsxs)(di,{children:[(0,Ir.jsx)(di.TriggerButton,{...n}),(0,Ir.jsx)(di.Popover,{children:i.map(a=>(0,Ir.jsx)(di.Item,{onClick:()=>{o(a.field),r({...t,page:1,filters:[...t.filters||[],{field:a.field,value:void 0,operator:a.operators[0]}]})},children:(0,Ir.jsx)(di.ItemLabel,{children:a.name})},a.field))})]})}function ky({filters:e,view:t,onChangeView:r,setOpenedFilter:o},n){if(!e.length||e.every(({isPrimary:a})=>a))return null;let i=e.filter(a=>!a.isVisible);return(0,Ir.jsx)(Ic,{triggerProps:{render:(0,Ir.jsx)(vs.Button,{accessibleWhenDisabled:!0,size:"compact",className:"dataviews-filters-button",variant:"tertiary",disabled:!i.length,ref:n}),children:(0,zv.__)("Add filter")},filters:e,view:t,onChangeView:r,setOpenedFilter:o})}var Gv=(0,Wv.forwardRef)(ky);var Uv=u(G(),1),Yv=u(j(),1),qv=u(P(),1);function $v({filters:e,view:t,onChangeView:r}){let o=i=>e.some(a=>a.field===i&&a.isPrimary),n=!t.search&&!t.filters?.some(i=>!i.isLocked&&(i.value!==void 0||!o(i.field)));return(0,qv.jsx)(Uv.Button,{disabled:n,accessibleWhenDisabled:!0,size:"compact",variant:"tertiary",className:"dataviews-filters__reset-button",onClick:()=>{r({...t,page:1,search:"",filters:t.filters?.filter(i=>!!i.isLocked)||[]})},children:(0,Yv.__)("Reset")})}var Kv=u(z(),1);function My(e,t){return(0,Kv.useMemo)(()=>{let r=[];return e.forEach(o=>{if(o.filterBy===!1||!o.hasElements&&!o.Edit)return;let n=o.filterBy.operators,i=!!o.filterBy?.isPrimary,a=t.filters?.some(s=>s.field===o.id&&!!s.isLocked)??!1;r.push({field:o.id,name:o.label,elements:o.elements,getElements:o.getElements,hasElements:o.hasElements,singleSelection:n.some(s=>Bv(s)),operators:n,isVisible:a||i||!!t.filters?.some(s=>s.field===o.id&&jv(s.operator)),isPrimary:i,isLocked:a})}),r.sort((o,n)=>o.isLocked&&!n.isLocked?-1:!o.isLocked&&n.isLocked?1:o.isPrimary&&!n.isPrimary?-1:!o.isPrimary&&n.isPrimary?1:o.name.localeCompare(n.name)),r},[e,t])}var fi=My;var mi=u(P(),1);function Fy({className:e}){let{fields:t,view:r,onChangeView:o,openedFilter:n,setOpenedFilter:i}=(0,fn.useContext)(q),a=(0,fn.useRef)(null),s=fi(t,r),l=(0,mi.jsx)(Gv,{filters:s,view:r,onChangeView:o,ref:a,setOpenedFilter:i},"add-filter"),c=s.filter(p=>p.isVisible);if(c.length===0)return null;let f=[...c.map(p=>(0,mi.jsx)(Hv,{filter:p,view:r,fields:t,onChangeView:o,addFilterRef:a,openedFilter:n},p.field)),l];return f.push((0,mi.jsx)($v,{filters:s,view:r,onChangeView:o},"reset-filters")),(0,mi.jsx)(L,{direction:"row",justify:"flex-start",gap:"sm",style:{width:"fit-content"},wrap:"wrap",className:e,children:f})}var pi=(0,fn.memo)(Fy);var ao=u(z(),1),Zv=u(G(),1);var hs=u(j(),1);var ar=u(P(),1);function Ly(){let{filters:e,view:t,onChangeView:r,setOpenedFilter:o,isShowingFilter:n,setIsShowingFilter:i}=(0,ao.useContext)(q),a=(0,ao.useRef)(null),s=(0,ao.useCallback)(m=>{r(m),i(!0)},[r,i]);if(e.length===0)return null;let l=e.some(m=>m.isVisible),c={label:(0,hs.__)("Add filter"),"aria-expanded":!1,isPressed:!1},f={label:(0,hs._x)("Filter","verb"),"aria-expanded":n,isPressed:n,onClick:()=>{n||o(null),i(!n)}},p=e.some(m=>m.isPrimary||m.isLocked),d=(0,ar.jsx)(Zv.Button,{ref:a,className:"dataviews-filters__visibility-toggle",size:"compact",icon:Vn,disabled:p,accessibleWhenDisabled:!0,...l?f:c});return(0,ar.jsx)("div",{className:"dataviews-filters__container-visibility-toggle",children:l?(0,ar.jsx)(By,{buttonRef:a,filtersCount:t.filters?.length,children:d}):(0,ar.jsx)(Ic,{filters:e,view:t,onChangeView:s,setOpenedFilter:o,triggerProps:{render:d}})})}function By({buttonRef:e,filtersCount:t,children:r}){return(0,ao.useEffect)(()=>()=>{e.current?.focus()},[e]),(0,ar.jsxs)(ar.Fragment,{children:[r,!!t&&(0,ar.jsx)("span",{className:"dataviews-filters-toggle__count",children:t})]})}var gs=Ly;var Xv=u(z(),1);var Qv=u(P(),1);function jy(e){let{isShowingFilter:t}=(0,Xv.useContext)(q);return t?(0,Qv.jsx)(pi,{...e}):null}var bs=jy;var Jv=u(z(),1),eh=u(G(),1),th=u(j(),1);var mn=u(P(),1);function Pc({className:e}){let{actions:t=[],data:r,fields:o,getItemId:n,getItemLevel:i,hasInitiallyLoaded:a,isLoading:s,view:l,onChangeView:c,selection:f,onChangeSelection:p,setOpenedFilter:d,onClickItem:m,isItemClickable:v,renderItemLink:_,defaultLayouts:h,empty:b=(0,mn.jsx)("p",{children:(0,th.__)("No results")})}=(0,Jv.useContext)(q),y=Qt(!a,{delay:200});if(!a)return y?(0,mn.jsx)("div",{className:"dataviews-loading",children:(0,mn.jsx)("p",{children:(0,mn.jsx)(eh.Spinner,{})})}):null;let A=Qr.find(V=>V.type===l.type&&h[V.type])?.component;return(0,mn.jsx)(A,{className:e,actions:t,data:r,fields:o,getItemId:n,getItemLevel:i,isLoading:s,onChangeView:c,onChangeSelection:p,selection:f,setOpenedFilter:d,onClickItem:m,renderItemLink:_,isItemClickable:v,view:l,empty:b})}var rh=u(j(),1),Ut=u(z(),1),oh=u(G(),1),nh=u(bt(),1);var ih=u(P(),1),Hy=(0,Ut.memo)(function({label:t}){let{view:r,onChangeView:o}=(0,Ut.useContext)(q),[n,i,a]=(0,nh.useDebouncedInput)(r.search);(0,Ut.useEffect)(()=>{i(r.search??"")},[r.search,i]);let s=(0,Ut.useRef)(o),l=(0,Ut.useRef)(r);(0,Ut.useEffect)(()=>{s.current=o,l.current=r},[o,r]),(0,Ut.useEffect)(()=>{a!==l.current?.search&&s.current({...l.current,page:1,search:a})},[a]);let c=t||(0,rh.__)("Search");return(0,ih.jsx)(oh.SearchControl,{className:"dataviews-search",onChange:i,value:n,label:c,placeholder:c,size:"compact"})}),Rc=Hy;var Fe=u(G(),1),Pr=u(j(),1),Yt=u(z(),1);var Nc=u(sh(),1),fh=u(bt(),1);var lh=u(G(),1),Vc=u(j(),1),uh=u(z(),1);var ch=u(P(),1);function dh(){let e=(0,uh.useContext)(q),{view:t,onChangeView:r}=e,o=t.infiniteScrollEnabled??!1;return e.hasInfiniteScrollHandler?(0,ch.jsx)(lh.ToggleControl,{label:(0,Vc.__)("Enable infinite scroll"),help:(0,Vc.__)("Automatically load more content as you scroll, instead of showing pagination links."),checked:o,onChange:n=>{r({...t,infiniteScrollEnabled:n})}}):null}var oe=u(P(),1),{Menu:vi}=Z(Fe.privateApis),zy={className:"dataviews-config__popover",placement:"bottom-end",offset:9};function Dc(){let{view:e,onChangeView:t,defaultLayouts:r}=(0,Yt.useContext)(q),o=Object.keys(r);if(o.length<=1)return null;let n=Qr.find(i=>e.type===i.type);return(0,oe.jsxs)(vi,{children:[(0,oe.jsx)(vi.TriggerButton,{render:(0,oe.jsx)(Fe.Button,{size:"compact",icon:n?.icon,label:(0,Pr.__)("Layout")})}),(0,oe.jsx)(vi.Popover,{children:o.map(i=>{let a=Qr.find(s=>s.type===i);return a?(0,oe.jsx)(vi.RadioItem,{value:i,name:"view-actions-available-view",checked:i===e.type,hideOnClick:!0,onChange:s=>{switch(s.target.value){case"list":case"grid":case"table":case"pickerGrid":case"pickerTable":case"activity":let l={...e};return"layout"in l&&delete l.layout,t({...l,type:s.target.value,...r[s.target.value]})}(0,Nc.default)("Invalid dataview")},children:(0,oe.jsx)(vi.ItemLabel,{children:a.label})},i):null})})]})}function Wy(){let{view:e,fields:t,onChangeView:r}=(0,Yt.useContext)(q),o=(0,Yt.useMemo)(()=>t.filter(i=>i.enableSorting!==!1).map(i=>({label:i.label,value:i.id})),[t]);return(0,oe.jsx)(Fe.SelectControl,{__next40pxDefaultSize:!0,label:(0,Pr.__)("Sort by"),value:e.sort?.field,options:o,onChange:n=>{r({...e,sort:{direction:e?.sort?.direction||"desc",field:n},showLevels:!1})}})}function Gy(){let{view:e,fields:t,onChangeView:r}=(0,Yt.useContext)(q);if(t.filter(i=>i.enableSorting!==!1).length===0)return null;let n=e.sort?.direction;return!n&&e.sort?.field&&(n="desc"),(0,oe.jsx)(Fe.__experimentalToggleGroupControl,{className:"dataviews-view-config__sort-direction",__next40pxDefaultSize:!0,isBlock:!0,label:(0,Pr.__)("Order"),value:n,onChange:i=>{if(i==="asc"||i==="desc"){r({...e,sort:{direction:i,field:e.sort?.field||t.find(a=>a.enableSorting!==!1)?.id||""},showLevels:!1});return}(0,Nc.default)("Invalid direction")},children:va.map(i=>(0,oe.jsx)(Fe.__experimentalToggleGroupControlOptionIcon,{value:i,icon:sf[i],label:ga[i]},i))})}function Uy(){let{view:e,config:t,onChangeView:r}=(0,Yt.useContext)(q),{infiniteScrollEnabled:o}=e;return!t||!t.perPageSizes||t.perPageSizes.length<2||t.perPageSizes.length>6||o?null:(0,oe.jsx)(Fe.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,Pr.__)("Items per page"),value:e.perPage||10,disabled:!e?.sort?.field,onChange:n=>{let i=typeof n=="number"||n===void 0?n:parseInt(n,10);r({...e,perPage:i,page:1})},children:t.perPageSizes.map(n=>(0,oe.jsx)(Fe.__experimentalToggleGroupControlOption,{value:n,label:n.toString()},n))})}function Yy(){let{onReset:e}=(0,Yt.useContext)(q);return e===void 0?null:(0,oe.jsx)(Fe.Button,{variant:"tertiary",size:"compact",disabled:e===!1,accessibleWhenDisabled:!0,className:"dataviews-view-config__reset-button",onClick:()=>{typeof e=="function"&&e()},children:(0,Pr.__)("Reset view")})}function kc(){let{view:e,onReset:t}=(0,Yt.useContext)(q),r=(0,fh.useInstanceId)(mh,"dataviews-view-config-dropdown"),o=Qr.find(i=>i.type===e.type),n=typeof t=="function";return(0,oe.jsx)(Fe.Dropdown,{expandOnMobile:!0,popoverProps:{...zy,id:r},renderToggle:({onToggle:i,isOpen:a})=>(0,oe.jsxs)("div",{className:"dataviews-view-config__toggle-wrapper",children:[(0,oe.jsx)(Fe.Button,{size:"compact",icon:Tl,label:(0,Pr._x)("View options","View is used as a noun"),onClick:i,"aria-expanded":a?"true":"false","aria-controls":r}),n&&(0,oe.jsx)("span",{className:"dataviews-view-config__modified-indicator"})]}),renderContent:()=>(0,oe.jsx)(Fe.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"dataviews-config__popover-content-wrapper",children:(0,oe.jsxs)(L,{direction:"column",className:"dataviews-view-config",gap:"xl",children:[(0,oe.jsxs)(L,{direction:"row",justify:"space-between",align:"center",className:"dataviews-view-config__header",children:[(0,oe.jsx)(Fe.__experimentalHeading,{level:2,className:"dataviews-settings-section__title",children:(0,Pr.__)("Appearance")}),(0,oe.jsx)(Yy,{})]}),(0,oe.jsxs)(L,{direction:"column",gap:"lg",children:[(0,oe.jsxs)(L,{direction:"row",gap:"sm",className:"dataviews-view-config__sort-controls",children:[(0,oe.jsx)(Wy,{}),(0,oe.jsx)(Gy,{})]}),!!o?.viewConfigOptions&&(0,oe.jsx)(o.viewConfigOptions,{}),(0,oe.jsx)(dh,{}),(0,oe.jsx)(Uy,{}),(0,oe.jsx)(Ta,{})]})]})})})}function mh(){return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(Dc,{}),(0,oe.jsx)(kc,{})]})}var qy=(0,Yt.memo)(mh),ph=qy;var vh=u(G(),1),hh=u(z(),1);function ve(e,t){let r;return e?.required&&t?.required?r=t?.required?.message?t.required:void 0:e?.pattern&&t?.pattern?r=t.pattern:e?.min&&t?.min?r=t.min:e?.max&&t?.max?r=t.max:e?.minLength&&t?.minLength?r=t.minLength:e?.maxLength&&t?.maxLength?r=t.maxLength:e?.elements&&t?.elements?r=t.elements:t?.custom&&(r=t.custom),r}var gh=u(P(),1),{ValidatedCheckboxControl:$y}=Z(vh.privateApis);function bh({field:e,onChange:t,data:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{getValue:a,setValue:s,label:l,description:c,isValid:f}=e,p=(0,hh.useCallback)(()=>{t(s({item:r,value:!a({item:r})}))},[r,a,t,s]);return(0,gh.jsx)($y,{required:!!e.isValid?.required,markWhenOptional:n,customValidity:ve(f,i),hidden:o,label:l,help:c,checked:a({item:r}),onChange:p})}var xs=u(G(),1),xh=u(z(),1);var Mc=u(P(),1),{ValidatedComboboxControl:Ky}=Z(xs.privateApis);function ws({data:e,field:t,onChange:r,hideLabelFromVision:o,validity:n}){let{label:i,description:a,placeholder:s,getValue:l,setValue:c,isValid:f}=t,p=l({item:e})??"",d=(0,xh.useCallback)(_=>r(c({item:e,value:_??""})),[e,r,c]),{elements:m,isLoading:v}=Ye({elements:t.elements,getElements:t.getElements});return v?(0,Mc.jsx)(xs.Spinner,{}):(0,Mc.jsx)(Ky,{required:!!t.isValid?.required,customValidity:ve(f,n),label:i,value:p,help:a,placeholder:s,options:m,onChange:d,hideLabelFromVision:o,allowReset:!0,expandOnFocus:!0})}var Cs=u(G(),1),Ht=u(z(),1),Ss=u(j(),1),Vt=u(Or(),1);var vn=u(G(),1),Fc=u(z(),1),sr=u(j(),1);var pn=u(P(),1),Zy={[dt]:[{value:"days",label:(0,sr.__)("Days")},{value:"weeks",label:(0,sr.__)("Weeks")},{value:"months",label:(0,sr.__)("Months")},{value:"years",label:(0,sr.__)("Years")}],[xt]:[{value:"days",label:(0,sr.__)("Days ago")},{value:"weeks",label:(0,sr.__)("Weeks ago")},{value:"months",label:(0,sr.__)("Months ago")},{value:"years",label:(0,sr.__)("Years ago")}]};function ys({className:e,data:t,field:r,onChange:o,hideLabelFromVision:n,operator:i}){let a=Zy[i===dt?"inThePast":"over"],{id:s,label:l,getValue:c,setValue:f}=r,p=c({item:t}),{value:d="",unit:m=a[0].value}=p&&typeof p=="object"?p:{},v=(0,Fc.useCallback)(h=>o(f({item:t,value:{value:Number(h),unit:m}})),[o,f,t,m]),_=(0,Fc.useCallback)(h=>o(f({item:t,value:{value:d,unit:h}})),[o,f,t,d]);return(0,pn.jsx)(vn.BaseControl,{id:s,className:Y(e,"dataviews-controls__relative-date"),label:l,hideLabelFromVision:n,children:(0,pn.jsxs)(L,{direction:"row",gap:"sm",children:[(0,pn.jsx)(vn.__experimentalNumberControl,{__next40pxDefaultSize:!0,className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:d,onChange:v}),(0,pn.jsx)(vn.SelectControl,{className:"dataviews-controls__relative-date-unit",__next40pxDefaultSize:!0,label:(0,sr.__)("Unit"),value:m,options:a,onChange:_,hideLabelFromVision:!0})]})})}var wh=u(Or(),1);function _s(e){if(!e)return null;let t=(0,wh.getDate)(e);return t&&ln(t)?t:null}var so=u(P(),1),{DateCalendar:Xy,ValidatedInputControl:Qy}=Z(Cs.privateApis),Jy=e=>e?(0,Vt.dateI18n)("Y-m-d\\TH:i",(0,Vt.getDate)(e)):"";function e1({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{id:a,label:s,description:l,setValue:c,getValue:f,isValid:p}=t,d=f({item:e}),m=typeof d=="string"?d:void 0,[v,_]=(0,Ht.useState)(()=>_s(m)||new Date),h=(0,Ht.useRef)(null),b=(0,Ht.useRef)(void 0),y=(0,Ht.useRef)(null),A=(0,Ht.useCallback)(N=>r(c({item:e,value:N})),[e,r,c]);(0,Ht.useEffect)(()=>()=>{b.current&&clearTimeout(b.current)},[]);let V=(0,Ht.useCallback)(N=>{let g;if(N){let E=(0,Vt.dateI18n)("Y-m-d",N),T;m?T=(0,Vt.dateI18n)("H:i",(0,Vt.getDate)(m)):T=(0,Vt.dateI18n)("H:i",N),g=(0,Vt.getDate)(`${E}T${T}`).toISOString(),A(g),b.current&&clearTimeout(b.current)}else A(void 0);y.current=h.current&&h.current.ownerDocument.activeElement,b.current=setTimeout(()=>{h.current&&(h.current.focus(),h.current.blur(),A(g),y.current&&y.current instanceof HTMLElement&&y.current.focus())},0)},[A,m]),R=(0,Ht.useCallback)(N=>{if(N){let g=(0,Vt.getDate)(N);A(g.toISOString());let E=_s(g.toISOString());E&&_(E)}else A(void 0)},[A]),{format:M}=t,k=M.weekStartsOn??(0,Vt.getSettings)().l10n.startOfWeek,{timezone:{string:S}}=(0,Vt.getSettings)(),I=s;return p?.required&&!n&&!o?I=`${s} (${(0,Ss.__)("Required")})`:!p?.required&&n&&!o&&(I=`${s} (${(0,Ss.__)("Optional")})`),(0,so.jsx)(Cs.BaseControl,{id:a,label:I,help:l,hideLabelFromVision:o,children:(0,so.jsxs)(L,{direction:"column",gap:"lg",children:[(0,so.jsx)(Xy,{style:{width:"100%"},selected:m&&_s(m)||void 0,onSelect:V,month:v,onMonthChange:_,timeZone:S||void 0,weekStartsOn:k}),(0,so.jsx)(Qy,{ref:h,__next40pxDefaultSize:!0,required:!!p?.required,customValidity:ve(p,i),type:"datetime-local",label:(0,Ss.__)("Date time"),hideLabelFromVision:!0,value:Jy(m),onChange:R})]})})}function yh({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:a}){return i===dt||i===xt?(0,so.jsx)(ys,{className:"dataviews-controls__datetime",data:e,field:t,onChange:r,hideLabelFromVision:o,operator:i}):(0,so.jsx)(e1,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:a})}var st=u(G(),1),de=u(z(),1),ze=u(j(),1),at=u(Or(),1);var he=u(P(),1),{DateCalendar:t1,DateRangeCalendar:r1}=Z(st.privateApis),o1=[{id:"today",label:(0,ze.__)("Today"),getValue:()=>(0,at.getDate)(null)},{id:"yesterday",label:(0,ze.__)("Yesterday"),getValue:()=>{let e=(0,at.getDate)(null);return Do(e,1)}},{id:"past-week",label:(0,ze.__)("Past week"),getValue:()=>{let e=(0,at.getDate)(null);return Do(e,7)}},{id:"past-month",label:(0,ze.__)("Past month"),getValue:()=>{let e=(0,at.getDate)(null);return ds(e,1)}}],n1=[{id:"last-7-days",label:(0,ze.__)("Last 7 days"),getValue:()=>{let e=(0,at.getDate)(null);return[Do(e,7),e]}},{id:"last-30-days",label:(0,ze.__)("Last 30 days"),getValue:()=>{let e=(0,at.getDate)(null);return[Do(e,30),e]}},{id:"month-to-date",label:(0,ze.__)("Month to date"),getValue:()=>{let e=(0,at.getDate)(null);return[vv(e),e]}},{id:"last-year",label:(0,ze.__)("Last year"),getValue:()=>{let e=(0,at.getDate)(null);return[fs(e,1),e]}},{id:"year-to-date",label:(0,ze.__)("Year to date"),getValue:()=>{let e=(0,at.getDate)(null);return[ls(e),e]}}],hn=e=>{if(!e)return null;let t=(0,at.getDate)(e);return t&&ln(t)?t:null},Lc=e=>e?typeof e=="string"?e:Oc(e,"yyyy-MM-dd"):"";function _h({field:e,validity:t,inputRefs:r,isTouched:o,setIsTouched:n,children:i}){let{isValid:a}=e,[s,l]=(0,de.useState)(void 0),c=(0,de.useCallback)(()=>{let p=Array.isArray(r)?r:[r];for(let d of p){let m=d.current;if(m&&!m.validity.valid){l({type:"invalid",message:m.validationMessage});return}}l(void 0)},[r]);return(0,de.useEffect)(()=>{let p=Array.isArray(r)?r:[r],d=t?ve(a,t):void 0;for(let m of p){let v=m.current;v&&v.setCustomValidity(d?.type==="invalid"&&d.message?d.message:"")}},[r,a,t]),(0,de.useEffect)(()=>{let p=Array.isArray(r)?r:[r],d=m=>{m.preventDefault(),n(!0)};for(let m of p)m.current?.addEventListener("invalid",d);return()=>{for(let m of p)m.current?.removeEventListener("invalid",d)}},[r,n]),(0,de.useEffect)(()=>{if(!o)return;let p=t?ve(a,t):void 0;p?l(p):c()},[o,a,t,c]),(0,he.jsxs)("div",{onBlur:p=>{o||(!p.relatedTarget||!p.currentTarget.contains(p.relatedTarget))&&n(!0)},children:[i,(0,he.jsx)("div",{"aria-live":"polite",children:s&&(0,he.jsxs)("p",{className:Y("components-validated-control__indicator",s.type==="invalid"?"is-invalid":void 0),children:[(0,he.jsx)(st.Icon,{className:"components-validated-control__indicator-icon",icon:Vl,size:16,fill:"currentColor"}),s.message]})})]})}function i1({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{id:a,label:s,setValue:l,getValue:c,isValid:f,format:p}=t,[d,m]=(0,de.useState)(null),v=p.weekStartsOn??(0,at.getSettings)().l10n.startOfWeek,_=c({item:e}),h=typeof _=="string"?_:void 0,[b,y]=(0,de.useState)(()=>hn(h)||new Date),[A,V]=(0,de.useState)(!1),R=(0,de.useRef)(null),M=(0,de.useCallback)(E=>r(l({item:e,value:E})),[e,r,l]),k=(0,de.useCallback)(E=>{let T=E?Oc(E,"yyyy-MM-dd"):void 0;M(T),m(null),V(!0)},[M]),S=(0,de.useCallback)(E=>{let T=E.getValue(),w=Lc(T);y(T),M(w),m(E.id),V(!0)},[M]),I=(0,de.useCallback)(E=>{if(M(E),E){let T=hn(E);T&&y(T)}m(null),V(!0)},[M]),{timezone:{string:N}}=(0,at.getSettings)(),g=s;return f?.required&&!n?g=`${s} (${(0,ze.__)("Required")})`:!f?.required&&n&&(g=`${s} (${(0,ze.__)("Optional")})`),(0,he.jsx)(_h,{field:t,validity:i,inputRefs:R,isTouched:A,setIsTouched:V,children:(0,he.jsx)(st.BaseControl,{id:a,className:"dataviews-controls__date",label:g,hideLabelFromVision:o,children:(0,he.jsxs)(L,{direction:"column",gap:"lg",children:[(0,he.jsxs)(L,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[o1.map(E=>{let T=d===E.id;return(0,he.jsx)(st.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:T,size:"small",onClick:()=>S(E),children:E.label},E.id)}),(0,he.jsx)(st.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!d,size:"small",disabled:!!d,accessibleWhenDisabled:!1,children:(0,ze.__)("Custom")})]}),(0,he.jsx)(st.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:R,type:"date",label:(0,ze.__)("Date"),hideLabelFromVision:!0,value:h,onChange:I,required:!!t.isValid?.required}),(0,he.jsx)(t1,{style:{width:"100%"},selected:h&&hn(h)||void 0,onSelect:k,month:b,onMonthChange:y,timeZone:N||void 0,weekStartsOn:v})]})})})}function a1({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{id:a,label:s,getValue:l,setValue:c,format:f}=t,p,d=l({item:e});Array.isArray(d)&&d.length===2&&d.every(w=>typeof w=="string")&&(p=d);let m=f.weekStartsOn??(0,at.getSettings)().l10n.startOfWeek,v=(0,de.useCallback)(w=>{r(c({item:e,value:w}))},[e,r,c]),[_,h]=(0,de.useState)(null),b=(0,de.useMemo)(()=>{if(!p)return{from:void 0,to:void 0};let[w,O]=p;return{from:hn(w)||void 0,to:hn(O)||void 0}},[p]),[y,A]=(0,de.useState)(()=>b.from||new Date),[V,R]=(0,de.useState)(!1),M=(0,de.useRef)(null),k=(0,de.useRef)(null),S=(0,de.useCallback)((w,O)=>{w&&O?v([Lc(w),Lc(O)]):!w&&!O&&v(void 0)},[v]),I=(0,de.useCallback)(w=>{S(w?.from,w?.to),h(null),R(!0)},[S]),N=(0,de.useCallback)(w=>{let[O,x]=w.getValue();A(O),S(O,x),h(w.id),R(!0)},[S]),g=(0,de.useCallback)((w,O)=>{let[x,C]=p||[void 0,void 0];if(S(w==="from"?O:x,w==="to"?O:C),O){let W=hn(O);W&&A(W)}h(null),R(!0)},[p,S]),{timezone:E}=(0,at.getSettings)(),T=s;return t.isValid?.required&&!n?T=`${s} (${(0,ze.__)("Required")})`:!t.isValid?.required&&n&&(T=`${s} (${(0,ze.__)("Optional")})`),(0,he.jsx)(_h,{field:t,validity:i,inputRefs:[M,k],isTouched:V,setIsTouched:R,children:(0,he.jsx)(st.BaseControl,{id:a,className:"dataviews-controls__date",label:T,hideLabelFromVision:o,children:(0,he.jsxs)(L,{direction:"column",gap:"lg",children:[(0,he.jsxs)(L,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[n1.map(w=>{let O=_===w.id;return(0,he.jsx)(st.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:O,size:"small",onClick:()=>N(w),children:w.label},w.id)}),(0,he.jsx)(st.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!_,size:"small",accessibleWhenDisabled:!1,disabled:!!_,children:(0,ze.__)("Custom")})]}),(0,he.jsxs)(L,{direction:"row",gap:"sm",justify:"space-between",className:"dataviews-controls__date-range-inputs",children:[(0,he.jsx)(st.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:M,type:"date",label:(0,ze.__)("From"),hideLabelFromVision:!0,value:p?.[0],onChange:w=>g("from",w),required:!!t.isValid?.required}),(0,he.jsx)(st.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:k,type:"date",label:(0,ze.__)("To"),hideLabelFromVision:!0,value:p?.[1],onChange:w=>g("to",w),required:!!t.isValid?.required})]}),(0,he.jsx)(r1,{style:{width:"100%"},selected:b,onSelect:I,month:y,onMonthChange:A,timeZone:E.string||void 0,weekStartsOn:m})]})})})}function Sh({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:a}){return i===dt||i===xt?(0,he.jsx)(ys,{className:"dataviews-controls__date",data:e,field:t,onChange:r,hideLabelFromVision:o,operator:i}):i===ct?(0,he.jsx)(a1,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:a}):(0,he.jsx)(i1,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:a})}var Es=u(G(),1),Ch=u(z(),1);var Bc=u(P(),1),{ValidatedSelectControl:s1}=Z(Es.privateApis);function Ts({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{type:a,label:s,description:l,getValue:c,setValue:f,isValid:p}=t,d=a==="array",m=c({item:e})??(d?[]:""),v=(0,Ch.useCallback)(b=>r(f({item:e,value:b})),[e,r,f]),{elements:_,isLoading:h}=Ye({elements:t.elements,getElements:t.getElements});return h?(0,Bc.jsx)(Es.Spinner,{}):(0,Bc.jsx)(s1,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:ve(p,i),label:s,value:m,help:l,options:_,onChange:v,__next40pxDefaultSize:!0,hideLabelFromVision:o,multiple:d})}var jc=u(P(),1),l1=10;function Eh(e){let{field:t}=e,{elements:r}=Ye({elements:t.elements,getElements:t.getElements});return r.length>=l1?(0,jc.jsx)(ws,{...e}):(0,jc.jsx)(Ts,{...e})}var As=u(G(),1);var Th=u(G(),1),Oh=u(z(),1);var Ah=u(P(),1),{ValidatedInputControl:u1}=Z(Th.privateApis);function lr({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,type:i,prefix:a,suffix:s,validity:l}){let{label:c,placeholder:f,description:p,getValue:d,setValue:m,isValid:v}=t,_=d({item:e}),h=(0,Oh.useCallback)(b=>r(m({item:e,value:b})),[e,m,r]);return(0,Ah.jsx)(u1,{required:!!v.required,markWhenOptional:n,customValidity:ve(v,l),label:c,placeholder:f,value:_??"",help:p,onChange:h,hideLabelFromVision:o,type:i,prefix:a,suffix:s,pattern:v.pattern?v.pattern.constraint:void 0,minLength:v.minLength?v.minLength.constraint:void 0,maxLength:v.maxLength?v.maxLength.constraint:void 0,__next40pxDefaultSize:!0})}var Os=u(P(),1);function Ih({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,Os.jsx)(lr,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"email",prefix:(0,Os.jsx)(As.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Os.jsx)(As.Icon,{icon:Pl})})})}var Ps=u(G(),1);var Is=u(P(),1);function Ph({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,Is.jsx)(lr,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"tel",prefix:(0,Is.jsx)(Ps.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Is.jsx)(Ps.Icon,{icon:Ul})})})}var Vs=u(G(),1);var Rs=u(P(),1);function Rh({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,Rs.jsx)(lr,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"url",prefix:(0,Rs.jsx)(Vs.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Rs.jsx)(Vs.Icon,{icon:Wl})})})}var Rr=u(G(),1),hi=u(z(),1),Ns=u(j(),1);var lo=u(P(),1),{ValidatedNumberControl:c1}=Z(Rr.privateApis);function Vh(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function d1({value:e,onChange:t,hideLabelFromVision:r,step:o}){let[n="",i=""]=e,a=(0,hi.useCallback)(l=>t([Vh(l),i]),[t,i]),s=(0,hi.useCallback)(l=>t([n,Vh(l)]),[t,n]);return(0,lo.jsx)(Rr.BaseControl,{help:(0,Ns.__)("The max. value must be greater than the min. value."),children:(0,lo.jsxs)(Rr.Flex,{direction:"row",gap:4,children:[(0,lo.jsx)(Rr.__experimentalNumberControl,{label:(0,Ns.__)("Min."),value:n,max:i?Number(i)-o:void 0,onChange:a,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:o}),(0,lo.jsx)(Rr.__experimentalNumberControl,{label:(0,Ns.__)("Max."),value:i,min:n?Number(n)+o:void 0,onChange:s,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:o})]})})}function Ds({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:a}){let s=t.format?.decimals??0,l=Math.pow(10,Math.abs(s)*-1),{label:c,description:f,getValue:p,setValue:d,isValid:m}=t,v=p({item:e})??"",_=(0,hi.useCallback)(b=>{r(d({item:e,value:["",void 0].includes(b)?void 0:Number(b)}))},[e,r,d]),h=(0,hi.useCallback)(b=>{r(d({item:e,value:b}))},[e,r,d]);if(i===ct){let b=["",""];return Array.isArray(v)&&v.length===2&&v.every(y=>typeof y=="number"||y==="")&&(b=v),(0,lo.jsx)(d1,{value:b,onChange:h,hideLabelFromVision:o,step:l})}return(0,lo.jsx)(c1,{required:!!m.required,markWhenOptional:n,customValidity:ve(m,a),label:c,help:f,value:v,onChange:_,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:l,min:m.min?m.min.constraint:void 0,max:m.max?m.max.constraint:void 0})}var Nh=u(P(),1);function Dh(e){return(0,Nh.jsx)(Ds,{...e})}var kh=u(P(),1);function Mh(e){return(0,kh.jsx)(Ds,{...e})}var ks=u(G(),1),Fh=u(z(),1);var Hc=u(P(),1),{ValidatedRadioControl:f1}=Z(ks.privateApis);function Lh({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:a,description:s,getValue:l,setValue:c,isValid:f}=t,{elements:p,isLoading:d}=Ye({elements:t.elements,getElements:t.getElements}),m=l({item:e}),v=(0,Fh.useCallback)(_=>r(c({item:e,value:_})),[e,r,c]);return d?(0,Hc.jsx)(ks.Spinner,{}):(0,Hc.jsx)(f1,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:ve(f,i),label:a,help:s,onChange:v,options:p,selected:m,hideLabelFromVision:o})}var zc=u(z(),1);var Bh=u(P(),1);function jh({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,config:i,validity:a}){let{prefix:s,suffix:l}=i||{};return(0,Bh.jsx)(lr,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:a,prefix:s?(0,zc.createElement)(s):void 0,suffix:l?(0,zc.createElement)(l):void 0})}var Hh=u(G(),1),zh=u(z(),1);var Wh=u(P(),1),{ValidatedToggleControl:m1}=Z(Hh.privateApis);function Gh({field:e,onChange:t,data:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:a,description:s,getValue:l,setValue:c,isValid:f}=e,p=(0,zh.useCallback)(()=>{t(c({item:r,value:!l({item:r})}))},[t,c,r,l]);return(0,Wh.jsx)(m1,{required:!!f.required,markWhenOptional:n,customValidity:ve(f,i),hidden:o,label:a,help:s,checked:l({item:r}),onChange:p})}var Uh=u(G(),1),Yh=u(z(),1);var qh=u(P(),1),{ValidatedTextareaControl:p1}=Z(Uh.privateApis);function $h({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,config:i,validity:a}){let{rows:s=4}=i||{},{label:l,placeholder:c,description:f,setValue:p,isValid:d}=t,m=t.getValue({item:e}),v=(0,Yh.useCallback)(_=>r(p({item:e,value:_})),[e,r,p]);return(0,qh.jsx)(p1,{required:!!d.required,markWhenOptional:n,customValidity:ve(d,a),label:l,placeholder:c,value:m??"",help:f,onChange:v,rows:s,minLength:d.minLength?d.minLength.constraint:void 0,maxLength:d.maxLength?d.maxLength.constraint:void 0,__next40pxDefaultSize:!0,hideLabelFromVision:o})}var gn=u(G(),1),Kh=u(z(),1);var Ms=u(P(),1),{ValidatedToggleGroupControl:v1}=Z(gn.privateApis);function Zh({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{getValue:a,setValue:s,isValid:l}=t,c=a({item:e}),f=(0,Kh.useCallback)(v=>r(s({item:e,value:v})),[e,r,s]),{elements:p,isLoading:d}=Ye({elements:t.elements,getElements:t.getElements});if(d)return(0,Ms.jsx)(gn.Spinner,{});if(p.length===0)return null;let m=p.find(v=>v.value===c);return(0,Ms.jsx)(v1,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:ve(l,i),__next40pxDefaultSize:!0,isBlock:!0,label:t.label,help:m?.description||t.description,onChange:f,value:c,hideLabelFromVision:o,children:p.map(v=>(0,Ms.jsx)(gn.__experimentalToggleGroupControlOption,{label:v.label,value:v.value},v.value))})}var Fs=u(G(),1),Ls=u(z(),1);var gi=u(P(),1),{ValidatedFormTokenField:h1}=Z(Fs.privateApis);function Xh({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:a,placeholder:s,getValue:l,setValue:c,isValid:f}=t,p=l({item:e}),{elements:d,isLoading:m}=Ye({elements:t.elements,getElements:t.getElements}),v=(0,Ls.useMemo)(()=>Array.isArray(p)?p.map(h=>d?.find(y=>y.value===h)||{value:h,label:h}):[],[p,d]),_=(0,Ls.useCallback)(h=>{let b=h.map(y=>typeof y=="object"&&"value"in y?y.value:y);r(c({item:e,value:b}))},[r,c,e]);return m?(0,gi.jsx)(Fs.Spinner,{}):(0,gi.jsx)(h1,{required:!!f?.required,markWhenOptional:n,customValidity:ve(f,i),label:o?void 0:a,value:v,onChange:_,placeholder:s,suggestions:d?.map(h=>h.value),__experimentalValidateInput:h=>t.isValid?.elements&&d?d.some(b=>b.value===h||b.label===h):!0,__experimentalExpandOnFocus:d&&d.length>0,__experimentalShowHowTo:!t.isValid?.elements,displayTransform:h=>typeof h=="object"&&"label"in h?h.label:typeof h=="string"&&d&&d.find(y=>y.value===h)?.label||h,__experimentalRenderItem:({item:h})=>{if(typeof h=="string"&&d){let b=d.find(y=>y.value===h);return(0,gi.jsx)("span",{children:b?.label||h})}return(0,gi.jsx)("span",{children:h})}})}var g1={grad:.9,turn:360,rad:360/(2*Math.PI)},Vr=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},qe=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},zt=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},ag=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Qh=function(e){return{r:zt(e.r,0,255),g:zt(e.g,0,255),b:zt(e.b,0,255),a:zt(e.a)}},Wc=function(e){return{r:qe(e.r),g:qe(e.g),b:qe(e.b),a:qe(e.a,3)}},b1=/^#([0-9a-f]{3,8})$/i,Bs=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},sg=function(e){var t=e.r,r=e.g,o=e.b,n=e.a,i=Math.max(t,r,o),a=i-Math.min(t,r,o),s=a?i===t?(r-o)/a:i===r?2+(o-t)/a:4+(t-r)/a:0;return{h:60*(s<0?s+6:s),s:i?a/i*100:0,v:i/255*100,a:n}},lg=function(e){var t=e.h,r=e.s,o=e.v,n=e.a;t=t/360*6,r/=100,o/=100;var i=Math.floor(t),a=o*(1-r),s=o*(1-(t-i)*r),l=o*(1-(1-t+i)*r),c=i%6;return{r:255*[o,s,a,a,l,o][c],g:255*[l,o,o,s,a,a][c],b:255*[a,a,l,o,o,s][c],a:n}},Jh=function(e){return{h:ag(e.h),s:zt(e.s,0,100),l:zt(e.l,0,100),a:zt(e.a)}},eg=function(e){return{h:qe(e.h),s:qe(e.s),l:qe(e.l),a:qe(e.a,3)}},tg=function(e){return lg((r=(t=e).s,{h:t.h,s:(r*=((o=t.l)<50?o:100-o)/100)>0?2*r/(o+r)*100:0,v:o+r,a:t.a}));var t,r,o},bi=function(e){return{h:(t=sg(e)).h,s:(n=(200-(r=t.s))*(o=t.v)/100)>0&&n<200?r*o/100/(n<=100?n:200-n)*100:0,l:n/2,a:t.a};var t,r,o,n},x1=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,w1=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y1=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,_1=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,rg={string:[[function(e){var t=b1.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?qe(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?qe(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=y1.exec(e)||_1.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Qh({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:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=x1.exec(e)||w1.exec(e);if(!t)return null;var r,o,n=Jh({h:(r=t[1],o=t[2],o===void 0&&(o="deg"),Number(r)*(g1[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return tg(n)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,o=e.b,n=e.a,i=n===void 0?1:n;return Vr(t)&&Vr(r)&&Vr(o)?Qh({r:Number(t),g:Number(r),b:Number(o),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,r=e.s,o=e.l,n=e.a,i=n===void 0?1:n;if(!Vr(t)||!Vr(r)||!Vr(o))return null;var a=Jh({h:Number(t),s:Number(r),l:Number(o),a:Number(i)});return tg(a)},"hsl"],[function(e){var t=e.h,r=e.s,o=e.v,n=e.a,i=n===void 0?1:n;if(!Vr(t)||!Vr(r)||!Vr(o))return null;var a=(function(s){return{h:ag(s.h),s:zt(s.s,0,100),v:zt(s.v,0,100),a:zt(s.a)}})({h:Number(t),s:Number(r),v:Number(o),a:Number(i)});return lg(a)},"hsv"]]},og=function(e,t){for(var r=0;r<t.length;r++){var o=t[r][0](e);if(o)return[o,t[r][1]]}return[null,void 0]},S1=function(e){return typeof e=="string"?og(e.trim(),rg.string):typeof e=="object"&&e!==null?og(e,rg.object):[null,void 0]};var Gc=function(e,t){var r=bi(e);return{h:r.h,s:zt(r.s+100*t,0,100),l:r.l,a:r.a}},Uc=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},ng=function(e,t){var r=bi(e);return{h:r.h,s:r.s,l:zt(r.l+100*t,0,100),a:r.a}},ig=(function(){function e(t){this.parsed=S1(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return qe(Uc(this.rgba),2)},e.prototype.isDark=function(){return Uc(this.rgba)<.5},e.prototype.isLight=function(){return Uc(this.rgba)>=.5},e.prototype.toHex=function(){return t=Wc(this.rgba),r=t.r,o=t.g,n=t.b,a=(i=t.a)<1?Bs(qe(255*i)):"","#"+Bs(r)+Bs(o)+Bs(n)+a;var t,r,o,n,i,a},e.prototype.toRgb=function(){return Wc(this.rgba)},e.prototype.toRgbString=function(){return t=Wc(this.rgba),r=t.r,o=t.g,n=t.b,(i=t.a)<1?"rgba("+r+", "+o+", "+n+", "+i+")":"rgb("+r+", "+o+", "+n+")";var t,r,o,n,i},e.prototype.toHsl=function(){return eg(bi(this.rgba))},e.prototype.toHslString=function(){return t=eg(bi(this.rgba)),r=t.h,o=t.s,n=t.l,(i=t.a)<1?"hsla("+r+", "+o+"%, "+n+"%, "+i+")":"hsl("+r+", "+o+"%, "+n+"%)";var t,r,o,n,i},e.prototype.toHsv=function(){return t=sg(this.rgba),{h:qe(t.h),s:qe(t.s),v:qe(t.v),a:qe(t.a,3)};var t},e.prototype.invert=function(){return lt({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),lt(Gc(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),lt(Gc(this.rgba,-t))},e.prototype.grayscale=function(){return lt(Gc(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),lt(ng(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),lt(ng(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?lt({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):qe(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=bi(this.rgba);return typeof t=="number"?lt({h:t,s:r.s,l:r.l,a:r.a}):qe(r.h)},e.prototype.isEqual=function(t){return this.toHex()===lt(t).toHex()},e})(),lt=function(e){return e instanceof ig?e:new ig(e)};var Ct=u(G(),1),Yc=u(z(),1),ug=u(j(),1);var Nr=u(P(),1),{ValidatedInputControl:C1}=Z(Ct.privateApis),E1=({color:e,onColorChange:t})=>{let r=e&&lt(e).isValid()?e:"#ffffff";return(0,Nr.jsx)(Ct.Dropdown,{className:"dataviews-controls__color-picker-dropdown",popoverProps:{resize:!1},renderToggle:({onToggle:o})=>(0,Nr.jsx)(Ct.Button,{onClick:o,"aria-label":(0,ug.__)("Open color picker"),size:"small",icon:()=>(0,Nr.jsx)(Ct.ColorIndicator,{colorValue:r})}),renderContent:()=>(0,Nr.jsx)(Ct.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,Nr.jsx)(Ct.ColorPicker,{color:r,onChange:t,enableAlpha:!0})})})};function cg({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:a,placeholder:s,description:l,setValue:c,isValid:f}=t,p=t.getValue({item:e})||"",d=(0,Yc.useCallback)(v=>{r(c({item:e,value:v}))},[e,r,c]),m=(0,Yc.useCallback)(v=>{r(c({item:e,value:v||""}))},[e,r,c]);return(0,Nr.jsx)(C1,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:ve(f,i),label:a,placeholder:s,value:p,help:l,onChange:m,hideLabelFromVision:o,type:"text",prefix:(0,Nr.jsx)(Ct.__experimentalInputControlPrefixWrapper,{variant:"control",children:(0,Nr.jsx)(E1,{color:p,onColorChange:d})})})}var Hs=u(G(),1),zs=u(z(),1),qc=u(j(),1);var js=u(P(),1);function dg({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let[a,s]=(0,zs.useState)(!1),l=(0,zs.useCallback)(()=>{s(c=>!c)},[]);return(0,js.jsx)(lr,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:a?"text":"password",suffix:(0,js.jsx)(Hs.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,js.jsx)(Hs.Button,{icon:a?Dn:eu,onClick:l,size:"small",label:a?(0,qc.__)("Hide password"):(0,qc.__)("Show password")})})})}function Ws(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var mg=u(P(),1),fg={adaptiveSelect:Eh,array:Xh,checkbox:bh,color:cg,combobox:ws,datetime:yh,date:Sh,email:Ih,telephone:Ph,url:Rh,integer:Dh,number:Mh,password:dg,radio:Lh,select:Ts,text:jh,toggle:Gh,textarea:$h,toggleGroup:Zh};function T1(e){return e&&typeof e=="object"&&typeof e.control=="string"}function O1(e){let{control:t,...r}=e,o=Gs(t);return o===null?null:function(i){return(0,mg.jsx)(o,{...i,config:r})}}function pg(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?Gs(e.Edit):T1(e.Edit)?O1(e.Edit):Ws(e)&&e.type!=="array"?Gs("adaptiveSelect"):t===null?null:Gs(t)}function Gs(e){return Object.keys(fg).includes(e)?fg[e]:null}function A1(e,t,r){if(e.filterBy===!1)return!1;let o=e.filterBy?.operators?.filter(n=>r.includes(n))??t;return o.length===0?!1:{isPrimary:!!e.filterBy?.isPrimary,operators:o}}var vg=A1;var I1=e=>({item:t})=>{let r=e.split("."),o=t;for(let n of r)o.hasOwnProperty(n)?o=o[n]:o=void 0;return o},hg=I1;var P1=e=>({value:t})=>{let r=e.split("."),o={},n=o;for(let i of r.slice(0,-1))n[i]={},n=n[i];return n[r.at(-1)]=t,o},gg=P1;var xg=u(j(),1);function Us({item:e,field:t}){let{elements:r,isLoading:o}=Ye({elements:t.elements,getElements:t.getElements}),n=t.getValue({item:e});return o||r.length===0?n:r?.find(i=>i.value===n)?.label||t.getValue({item:e})}var bg=u(P(),1);function Re({item:e,field:t}){return t.hasElements?(0,bg.jsx)(Us,{item:e,field:t}):t.getValueFormatted({item:e,field:t})}var ur=(e,t,r)=>r==="asc"?e.localeCompare(t):t.localeCompare(e);function Ve(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)}function cr(e,t){if(typeof t.isValid.minLength?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:String(r).length>=t.isValid.minLength.constraint}function dr(e,t){if(typeof t.isValid.maxLength?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:String(r).length<=t.isValid.maxLength.constraint}function fr(e,t){if(t.isValid.pattern?.constraint===void 0)return!0;try{let r=new RegExp(t.isValid.pattern.constraint),o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:r.test(String(o))}catch{return!1}}function ye(e,t){let o=(t.elements??[]).map(i=>i.value);if(o.length===0)return!0;let n=t.getValue({item:e});return[].concat(n).every(i=>o.includes(i))}function R1({item:e,field:t}){return t.getValue({item:e})}var ht=R1;var V1=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function N1(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!V1.test(r)?(0,xg.__)("Value must be a valid email address."):null}var wg={type:"email",render:Re,Edit:"email",sort:ur,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[_e,Se],validOperators:[Ce,Ee,$t,Kt,Zt,_e,Se,ot,nt],format:{},getValueFormatted:ht,validate:{required:Ve,pattern:fr,minLength:cr,maxLength:dr,elements:ye,custom:N1}};var yg=u(j(),1);var bn=(e,t,r)=>r==="asc"?e-t:t-e;function Ys(e,t){if(typeof t.isValid.min?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:Number(r)>=t.isValid.min.constraint}function qs(e,t){if(typeof t.isValid.max?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:Number(r)<=t.isValid.max.constraint}var _g={separatorThousand:","};function D1({item:e,field:t}){let r=t.getValue({item:e});if(r==null)return"";if(r=Number(r),!Number.isFinite(r))return String(r);let o;t.type!=="integer"?o=_g:o=t.format;let{separatorThousand:n}=o,i=Math.trunc(r);return n?String(i).replace(/\B(?=(\d{3})+(?!\d))/g,n):String(i)}function k1(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Number.isInteger(r)?(0,yg.__)("Value must be an integer."):null}var Sg={type:"integer",render:Re,Edit:"integer",sort:bn,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ce,Ee,Fr,Lr,Br,jr,ct],validOperators:[Ce,Ee,Fr,Lr,Br,jr,ct,_e,Se,ot,nt],format:_g,getValueFormatted:D1,validate:{required:Ve,min:Ys,max:qs,elements:ye,custom:k1}};var Cg=u(j(),1);var Eg={separatorThousand:",",separatorDecimal:".",decimals:2};function M1({item:e,field:t}){let r=t.getValue({item:e});if(r==null)return"";if(r=Number(r),!Number.isFinite(r))return String(r);let o;t.type!=="number"?o=Eg:o=t.format;let{separatorThousand:n,separatorDecimal:i,decimals:a}=o,s=r.toFixed(a),[l,c]=s.split("."),f=n?l.replace(/\B(?=(\d{3})+(?!\d))/g,n):l;return a===0?f:f+i+c}function F1(e){return e===""||e===void 0||e===null}function L1(e,t){let r=t.getValue({item:e});return!F1(r)&&!Number.isFinite(r)?(0,Cg.__)("Value must be a number."):null}var Tg={type:"number",render:Re,Edit:"number",sort:bn,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ce,Ee,Fr,Lr,Br,jr,ct],validOperators:[Ce,Ee,Fr,Lr,Br,jr,ct,_e,Se,ot,nt],format:Eg,getValueFormatted:M1,validate:{required:Ve,min:Ys,max:qs,elements:ye,custom:L1}};var Og={type:"text",render:Re,Edit:"text",sort:ur,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[_e,Se],validOperators:[Ce,Ee,$t,Kt,Zt,_e,Se,ot,nt],format:{},getValueFormatted:ht,validate:{required:Ve,pattern:fr,minLength:cr,maxLength:dr,elements:ye}};var Mo=u(Or(),1);var Ag={datetime:(0,Mo.getSettings)().formats.datetime,weekStartsOn:(0,Mo.getSettings)().l10n.startOfWeek};function B1({item:e,field:t}){let r=t.getValue({item:e});if(["",void 0,null].includes(r))return"";let o;return t.type!=="datetime"?o=Ag:o=t.format,(0,Mo.dateI18n)(o.datetime,(0,Mo.getDate)(r))}var j1=(e,t,r)=>{let o=new Date(e).getTime(),n=new Date(t).getTime();return r==="asc"?o-n:n-o},Ig={type:"datetime",render:Re,Edit:"datetime",sort:j1,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ur,Yr,Hr,zr,Wr,Gr,dt,xt],validOperators:[Ur,Yr,Hr,zr,Wr,Gr,dt,xt],format:Ag,getValueFormatted:B1,validate:{required:Ve,elements:ye}};var Fo=u(Or(),1);var Pg={date:(0,Fo.getSettings)().formats.date,weekStartsOn:(0,Fo.getSettings)().l10n.startOfWeek};function H1({item:e,field:t}){let r=t.getValue({item:e});if(["",void 0,null].includes(r))return"";let o;return t.type!=="date"?o=Pg:o=t.format,(0,Fo.dateI18n)(o.date,(0,Fo.getDate)(r))}var z1=(e,t,r)=>{let o=new Date(e).getTime(),n=new Date(t).getTime();return r==="asc"?o-n:n-o},Rg={type:"date",render:Re,Edit:"date",sort:z1,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ur,Yr,Hr,zr,Wr,Gr,dt,xt,ct],validOperators:[Ur,Yr,Hr,zr,Wr,Gr,dt,xt,ct],format:Pg,getValueFormatted:H1,validate:{required:Ve,elements:ye}};var $s=u(j(),1);function Vg(e,t){return t.getValue({item:e})===!0}function W1({item:e,field:t}){let r=t.getValue({item:e});return r===!0?(0,$s.__)("True"):r===!1?(0,$s.__)("False"):""}function G1(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&![!0,!1].includes(r)?(0,$s.__)("Value must be true, false, or undefined"):null}var U1=(e,t,r)=>{let o=!!e;return o===!!t?0:r==="asc"?o?1:-1:o?-1:1},Ng={type:"boolean",render:Re,Edit:"checkbox",sort:U1,validate:{required:Vg,elements:ye,custom:G1},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ce,Ee],validOperators:[Ce,Ee],format:{},getValueFormatted:W1};var Dg={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:ht,validate:{}};var $c=u(j(),1);function kg(e,t){let r=t.getValue({item:e});return Array.isArray(r)&&r.length>0&&r.every(o=>![void 0,"",null].includes(o))}function Mg({item:e,field:t}){let r=t.getValue({item:e});return(Array.isArray(r)?r:[]).join(", ")}function Y1({item:e,field:t}){return Mg({item:e,field:t})}function q1(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Array.isArray(r)?(0,$c.__)("Value must be an array."):r.every(o=>typeof o=="string")?null:(0,$c.__)("Every value must be a string.")}var $1=(e,t,r)=>{let o=Array.isArray(e)?e:[],n=Array.isArray(t)?t:[];if(o.length!==n.length)return r==="asc"?o.length-n.length:n.length-o.length;let i=o.join(","),a=n.join(",");return r==="asc"?i.localeCompare(a):a.localeCompare(i)},Fg={type:"array",render:Y1,Edit:"array",sort:$1,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[_e,Se],validOperators:[_e,Se,ot,nt],format:{},getValueFormatted:Mg,validate:{required:kg,elements:ye,custom:q1}};function K1({item:e,field:t}){return t.getValue({item:e})?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":""}var Lg={type:"password",render:Re,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:K1,validate:{required:Ve,pattern:fr,minLength:cr,maxLength:dr,elements:ye}};var Bg={type:"telephone",render:Re,Edit:"telephone",sort:ur,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[_e,Se],validOperators:[Ce,Ee,$t,Kt,Zt,_e,Se,ot,nt],format:{},getValueFormatted:ht,validate:{required:Ve,pattern:fr,minLength:cr,maxLength:dr,elements:ye}};var jg=u(j(),1);var xn=u(P(),1);function Z1({item:e,field:t}){if(t.hasElements)return(0,xn.jsx)(Us,{item:e,field:t});let r=ht({item:e,field:t});return!r||!lt(r).isValid()?r:(0,xn.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,xn.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:r,border:"1px solid #ddd",flexShrink:0}}),(0,xn.jsx)("span",{children:r})]})}function X1(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!lt(r).isValid()?(0,jg.__)("Value must be a valid color."):null}var Q1=(e,t,r)=>{let o=lt(e),n=lt(t);if(!o.isValid()&&!n.isValid())return 0;if(!o.isValid())return r==="asc"?1:-1;if(!n.isValid())return r==="asc"?-1:1;let i=o.toHsl(),a=n.toHsl();return i.h!==a.h?r==="asc"?i.h-a.h:a.h-i.h:i.s!==a.s?r==="asc"?i.s-a.s:a.s-i.s:r==="asc"?i.l-a.l:a.l-i.l},Hg={type:"color",render:Z1,Edit:"color",sort:Q1,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[_e,Se],validOperators:[Ce,Ee,_e,Se],format:{},getValueFormatted:ht,validate:{required:Ve,elements:ye,custom:X1}};var zg={type:"url",render:Re,Edit:"url",sort:ur,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[_e,Se],validOperators:[Ce,Ee,$t,Kt,Zt,_e,Se,ot,nt],format:{},getValueFormatted:ht,validate:{required:Ve,pattern:fr,minLength:cr,maxLength:dr,elements:ye}};var J1=(e,t,r)=>typeof e=="number"&&typeof t=="number"?bn(e,t,r):ur(e,t,r),Wg={render:Re,Edit:null,sort:J1,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ce,Ee],validOperators:Lv(),format:{},getValueFormatted:ht,validate:{required:Ve,elements:ye}};function Gg(e,t){let r;e.isValid?.required===!0&&t.validate.required!==void 0&&(r={constraint:!0,validate:t.validate.required});let o;(e.isValid?.elements===!0||e.isValid?.elements===void 0&&(e.elements||e.getElements))&&t.validate.elements!==void 0&&(o={constraint:!0,validate:t.validate.elements});let n;typeof e.isValid?.min=="number"&&t.validate.min!==void 0&&(n={constraint:e.isValid.min,validate:t.validate.min});let i;typeof e.isValid?.max=="number"&&t.validate.max!==void 0&&(i={constraint:e.isValid.max,validate:t.validate.max});let a;typeof e.isValid?.minLength=="number"&&t.validate.minLength!==void 0&&(a={constraint:e.isValid.minLength,validate:t.validate.minLength});let s;typeof e.isValid?.maxLength=="number"&&t.validate.maxLength!==void 0&&(s={constraint:e.isValid.maxLength,validate:t.validate.maxLength});let l;e.isValid?.pattern!==void 0&&t.validate.pattern!==void 0&&(l={constraint:e.isValid?.pattern,validate:t.validate.pattern});let c=e.isValid?.custom??t.validate.custom;return{required:r,elements:o,min:n,max:i,minLength:a,maxLength:s,pattern:l,custom:c}}function Ug(e){return e.validOperators.reduce((t,r)=>{let o=ko(r);return o?.filter&&(t[r]=o.filter),t},{})}function e_(e,t){return{...t.format,...e.format}}var Yg=e_;function t_(e){let t=[wg,Sg,Tg,Og,Ig,Rg,Ng,Dg,Fg,Lg,Bg,Hg,zg].find(r=>r?.type===e);return t||Wg}function qg(e){return e.map(t=>{let r=t_(t.type),o=t.getValue||hg(t.id),n=function(i,a,s){let l=o({item:i}),c=o({item:a});return t.sort?t.sort(l,c,s):r.sort(l,c,s)};return{id:t.id,label:t.label||t.id,header:t.header||t.label||t.id,description:t.description,placeholder:t.placeholder,getValue:o,setValue:t.setValue||gg(t.id),elements:t.elements,getElements:t.getElements,hasElements:Ws(t),isVisible:t.isVisible,enableHiding:t.enableHiding??!0,readOnly:t.readOnly??!1,type:r.type,render:t.render??r.render,Edit:pg(t,r.Edit),sort:n,enableSorting:t.enableSorting??r.enableSorting,enableGlobalSearch:t.enableGlobalSearch??r.enableGlobalSearch,isValid:Gg(t,r),filterBy:vg(t,r.defaultOperators,r.validOperators),filter:Ug(r),format:Yg(t,r),getValueFormatted:t.getValueFormatted??r.getValueFormatted}})}var Nt=u(z(),1),Ks=u(bt(),1);var Je=u(P(),1),r_=()=>!1,o_=Qr.filter(e=>e.isPicker),n_=e=>e.id,i_=[];function a_({search:e=!0,searchLabel:t=void 0}){return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsxs)(L,{direction:"row",align:"top",justify:"space-between",className:"dataviews__view-actions",gap:"xs",children:[(0,Je.jsxs)(L,{direction:"row",gap:"sm",justify:"start",className:"dataviews__search",children:[e&&(0,Je.jsx)(Rc,{label:t}),(0,Je.jsx)(gs,{})]}),(0,Je.jsx)(L,{direction:"row",gap:"xs",style:{flexShrink:0},children:(0,Je.jsx)(ph,{})})]}),(0,Je.jsx)(bs,{className:"dataviews-filters__container"}),(0,Je.jsx)(Pc,{}),(0,Je.jsx)(Nu,{})]})}function s_({view:e,onChangeView:t,fields:r,search:o=!0,searchLabel:n=void 0,actions:i=i_,data:a,getItemId:s=n_,isLoading:l=!1,paginationInfo:c,defaultLayouts:f,selection:p,onChangeSelection:d,children:m,config:v={perPageSizes:[10,20,50,100]},itemListLabel:_,empty:h}){let{infiniteScrollHandler:b}=c,y=(0,Nt.useRef)(null),[A,V]=(0,Nt.useState)(0),R=(0,Ks.useResizeObserver)(O=>{V(O[0].borderBoxSize[0].inlineSize)},{box:"border-box"}),[M,k]=(0,Nt.useState)(null);function S(O){let x=typeof O=="function"?O(p):O;d&&d(x)}let I=(0,Nt.useMemo)(()=>qg(r),[r]),N=fi(I,e),g=(0,Nt.useMemo)(()=>(N||[]).some(O=>O.isPrimary||O.isLocked),[N]),[E,T]=(0,Nt.useState)(g);(0,Nt.useEffect)(()=>{g&&!E&&T(!0)},[g,E]),(0,Nt.useEffect)(()=>{if(!e.infiniteScrollEnabled||!y.current)return;let O=(0,Ks.throttle)(C=>{let F=C.target,D=F.scrollTop,W=F.scrollHeight,Q=F.clientHeight;D+Q>=W-100&&b?.()},100),x=y.current;return x.addEventListener("scroll",O),()=>{x.removeEventListener("scroll",O),O.cancel()}},[b,e.infiniteScrollEnabled]);let w=(0,Nt.useMemo)(()=>Object.fromEntries(Object.entries(f).filter(([O])=>o_.some(x=>x.type===O))),[f]);return w[e.type]?(0,Je.jsx)(q.Provider,{value:{view:e,onChangeView:t,fields:I,actions:i,data:a,isLoading:l,paginationInfo:c,isItemClickable:r_,selection:p,onChangeSelection:S,openedFilter:M,setOpenedFilter:k,getItemId:s,containerWidth:A,containerRef:y,resizeObserverRef:R,defaultLayouts:w,filters:N,isShowingFilter:E,setIsShowingFilter:T,config:v,itemListLabel:_,empty:h,hasInitiallyLoaded:!0,hasInfiniteScrollHandler:!!b},children:(0,Je.jsx)("div",{className:"dataviews-picker-wrapper",ref:y,children:m??(0,Je.jsx)(a_,{search:o,searchLabel:n})})}):null}var mr=s_;mr.BulkActionToolbar=Nu;mr.Filters=pi;mr.FiltersToggled=bs;mr.FiltersToggle=gs;mr.Layout=Pc;mr.LayoutSwitcher=Dc;mr.Pagination=Ru;mr.Search=Rc;mr.ViewConfig=kc;var Kc=mr;var $g=u(j(),1),Kg=u(G(),1),Zg=u(P(),1),l_={id:"alt_text",type:"text",label:(0,$g.__)("Alt text"),isVisible:e=>e?.media_type==="image",render:({item:e})=>e?.alt_text||"-",Edit:({field:e,onChange:t,data:r})=>(0,Zg.jsx)(Kg.TextareaControl,{label:e.label,value:r.alt_text||"",onChange:o=>t({alt_text:o}),rows:2}),enableSorting:!1,filterBy:!1},Zc=l_;var rb=u(j(),1);var Xs=u(z(),1),Xg=u(j(),1);function Zs(e){return e?typeof e=="string"?e:typeof e=="object"&&(e.rendered||e.raw)||"":""}var Qs=u(P(),1);function Qg({item:e}){let[t,r]=(0,Xs.useState)(null),o=e.post,n=e._embedded?.["wp:attached-to"]?.[0]?.id,i=e._embedded?.["wp:attached-to"]?.[0]?.title;return(0,Xs.useEffect)(()=>{o&&o===n&&r(Zs(i)||n?.toString()||""),o||r((0,Xg.__)("(Unattached)"))},[o,n,i]),(0,Qs.jsx)(Qs.Fragment,{children:t})}var el=u(Pn(),1),tl=u(G(),1),Js=u(j(),1),Lo=u(z(),1),Jg=u(bt(),1),eb=u(qt(),1);var Xc=u(P(),1);function tb({data:e,onChange:t}){let r=e.post&&e?._embedded?.["wp:attached-to"]?.[0]?[{label:Zs(e._embedded?.["wp:attached-to"]?.[0]?.title),value:e.post.toString()}]:[],[o,n]=(0,Lo.useState)(r),[i,a]=(0,Lo.useState)([]),[s,l]=(0,Lo.useState)(!1),[c,f]=(0,Lo.useState)(e?.post?.toString()??null),p=(0,eb.useSelect)(h=>h(el.store).getPostTypes(),[]),d=()=>{t({post:0,_embedded:{...e?._embedded,"wp:attached-to":void 0}}),n([])},m=async h=>{l(!0);let b=await(0,el.__experimentalFetchLinkSuggestions)(h,{type:"post",isInitialSuggestions:!0},{});a(b);let y=b.map(A=>({label:A.title,value:A.id.toString()}));n(y),l(!1)},v=h=>{if(!h){d();return}if(f(h),h){let b=i.find(y=>y.id===Number(h));if(b&&p){let y=p.find(V=>V.slug===b?.type),A={...y&&{type:y.slug},id:Number(h),title:{raw:b.title,rendered:b.title}};t({post:Number(h),_embedded:{...e?._embedded,"wp:attached-to":[A]}})}}},_=e.post?(0,Lo.createInterpolateElement)((0,Js.__)("Search for a post or page to attach this media to or <button>detach current</button>."),{button:(0,Xc.jsx)(tl.Button,{__next40pxDefaultSize:!0,onClick:d,variant:"link",accessibleWhenDisabled:!0})}):(0,Js.__)("Search for a post or page to attach this media to.");return(0,Xc.jsx)(tl.ComboboxControl,{className:"dataviews-media-field__attached-to",__next40pxDefaultSize:!0,isLoading:s,label:(0,Js.__)("Attached to"),help:_,value:c,options:o,onFilterValueChange:(0,Jg.debounce)(h=>m(h),300),onChange:v,hideLabelFromVision:!0})}var u_={id:"attached_to",type:"text",label:(0,rb.__)("Attached to"),Edit:tb,render:Qg,enableSorting:!1,filterBy:!1},Qc=u_;var ib=u(j(),1),ab=u(qt(),1),sb=u(Pn(),1);var ob=u(j(),1),wn=u(z(),1);var rl=u(G(),1),uo=u(P(),1);function nb({item:e}){let t=e?._embedded?.author?.[0],r=t?.name,o=t?.avatar_urls?.[48],[n,i]=(0,wn.useState)("loading");(0,wn.useEffect)(()=>{i("loading")},[o]);let a=(0,wn.useCallback)(l=>{l?.complete&&i("instant")},[]),s=()=>{n==="loading"&&i("loaded")};return(0,uo.jsxs)(rl.__experimentalHStack,{alignment:"left",spacing:0,children:[!!o&&(0,uo.jsx)("div",{className:Y("media-author-field__avatar",{"is-loading":n==="loading","is-loaded":n==="loaded"}),children:(0,uo.jsx)("img",{ref:a,onLoad:s,alt:(0,ob.__)("Author avatar"),src:o})}),!o&&(0,uo.jsx)("div",{className:"media-author-field__icon",children:(0,uo.jsx)(rl.Icon,{icon:Al})}),(0,uo.jsx)("span",{className:"media-author-field__name",children:r})]})}var c_={label:(0,ib.__)("Author"),id:"author",type:"integer",getElements:async()=>(await(0,ab.resolveSelect)(sb.store).getEntityRecords("root","user",{per_page:-1,who:"authors",_fields:"id,name",context:"view"})??[]).map(({id:t,name:r})=>({value:t,label:r})),render:nb,sort:(e,t,r)=>{let o=e._embedded?.author?.[0]?.name||"",n=t._embedded?.author?.[0]?.name||"";return r==="asc"?o.localeCompare(n):n.localeCompare(o)},filterBy:{operators:["isAny","isNone"]},readOnly:!0},Jc=c_;var lb=u(j(),1),ub=u(G(),1);function co(e){return e?typeof e=="string"?e:typeof e=="object"&&"raw"in e&&e.raw||"":""}var cb=u(P(),1),d_={id:"caption",type:"text",label:(0,lb.__)("Caption"),getValue:({item:e})=>co(e?.caption),render:({item:e})=>co(e?.caption)||"-",Edit:({field:e,onChange:t,data:r})=>(0,cb.jsx)(ub.TextareaControl,{label:e.label,value:co(r.caption)||"",onChange:o=>t({caption:o}),rows:2}),enableSorting:!1,filterBy:!1},ed=d_;var db=u(j(),1),fb=u(Or(),1),f_={id:"date",type:"datetime",label:(0,db.__)("Date added"),filterBy:{operators:["before","after"]},format:{datetime:(0,fb.getSettings)().formats.datetimeAbbreviated},readOnly:!0},td=f_;var mb=u(j(),1),pb=u(Or(),1),m_={id:"modified",type:"datetime",label:(0,mb.__)("Date modified"),filterBy:{operators:["before","after"]},format:{datetime:(0,pb.getSettings)().formats.datetimeAbbreviated},readOnly:!0},rd=m_;var vb=u(j(),1),hb=u(G(),1);var od=u(P(),1),p_={id:"description",type:"text",label:(0,vb.__)("Description"),getValue:({item:e})=>co(e?.description),render:({item:e})=>(0,od.jsx)("div",{children:co(e?.description)||"-"}),Edit:({field:e,onChange:t,data:r})=>(0,od.jsx)(hb.TextareaControl,{label:e.label,value:co(r.description)||"",onChange:o=>t({description:o}),rows:5}),enableSorting:!1,filterBy:!1},nd=p_;var _b=u(j(),1),Sb=u(ol(),1);var nl=u(G(),1),xb=u(z(),1),wb=u(ol(),1),yn=u(P(),1),bb=15;function yb({item:e}){let t=(0,xb.useMemo)(()=>e?.source_url?(0,wb.getFilename)(e.source_url):null,[e?.source_url]);return t?t.length>bb?(0,yn.jsx)(nl.Tooltip,{text:t,children:(0,yn.jsx)(nl.__experimentalTruncate,{limit:bb,ellipsizeMode:"tail",children:t})}):(0,yn.jsx)(yn.Fragment,{children:t}):""}var v_={id:"filename",type:"text",label:(0,_b.__)("File name"),getValue:({item:e})=>(0,Sb.getFilename)(e?.source_url||""),render:yb,enableSorting:!1,filterBy:!1,readOnly:!0},id=v_;var ut=u(j(),1),Eb=1024,Tb=1024*Eb,Ob=1024*Tb,Ab=1024*Ob,Ib=1024*Ab,Pb=1024*Ib,Rb=1024*Pb,h_=1024*Rb;function Cb(e,t,r=2){return(0,ut.sprintf)((0,ut._x)("%1$s %2$s","file size"),e.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:r}),t)}function g_(e,t=2){if(e===0)return Cb(0,(0,ut._x)("B","unit symbol"),t);let r={[(0,ut._x)("YB","unit symbol")]:h_,[(0,ut._x)("ZB","unit symbol")]:Rb,[(0,ut._x)("EB","unit symbol")]:Pb,[(0,ut._x)("PB","unit symbol")]:Ib,[(0,ut._x)("TB","unit symbol")]:Ab,[(0,ut._x)("GB","unit symbol")]:Ob,[(0,ut._x)("MB","unit symbol")]:Tb,[(0,ut._x)("KB","unit symbol")]:Eb,[(0,ut._x)("B","unit symbol")]:1};for(let[o,n]of Object.entries(r))if(e>=n)return Cb(e/n,o,t);return""}var b_={id:"filesize",type:"text",label:(0,ut.__)("File size"),getValue:({item:e})=>e?.media_details?.filesize?g_(e?.media_details?.filesize):"",isVisible:e=>!!e?.media_details?.filesize,enableSorting:!1,filterBy:!1,readOnly:!0},ad=b_;var _n=u(j(),1),x_={id:"media_dimensions",type:"text",label:(0,_n.__)("Dimensions"),getValue:({item:e})=>e?.media_details?.width&&e?.media_details?.height?(0,_n.sprintf)((0,_n._x)("%1$s \xD7 %2$s","image dimensions"),e?.media_details?.width?.toString(),e?.media_details?.height?.toString()):"",isVisible:e=>!!(e?.media_details?.width&&e?.media_details?.height),enableSorting:!1,filterBy:!1,readOnly:!0},sd=x_;var Fb=u(j(),1);var Vb=u(qt(),1),Nb=u(Pn(),1),Sn=u(G(),1),Db=u(z(),1),kb=u(ol(),1);var xi=u(j(),1);function ld(e){return e.startsWith("image/")?{type:"image",label:(0,xi.__)("Image"),icon:Hl}:e.startsWith("video/")?{type:"video",label:(0,xi.__)("Video"),icon:iu}:e.startsWith("audio/")?{type:"audio",label:(0,xi.__)("Audio"),icon:xl}:{type:"application",label:(0,xi.__)("Application"),icon:Dl}}var pr=u(P(),1);function w_({item:e,filename:t}){return(0,pr.jsx)("div",{className:"dataviews-media-field__media-thumbnail",children:(0,pr.jsxs)(Sn.__experimentalVStack,{justify:"center",alignment:"center",className:"dataviews-media-field__media-thumbnail__stack",spacing:0,children:[(0,pr.jsx)(Sn.Icon,{className:"dataviews-media-field__media-thumbnail--icon",icon:ld(e.mime_type).icon,size:24}),!!t&&(0,pr.jsx)("div",{className:"dataviews-media-field__media-thumbnail__filename",children:(0,pr.jsx)(Sn.__experimentalTruncate,{className:"dataviews-media-field__media-thumbnail__filename__truncate",children:t})})]})})}function Mb({item:e,config:t}){let[r,o]=(0,Db.useState)(!1),n=(0,Vb.useSelect)(s=>{if(e.featured_media)return s(Nb.store).getEntityRecord("postType","attachment",e.featured_media)},[e.featured_media]),i=e.featured_media?n:e;if(!i)return null;let a=(0,kb.getFilename)(i.source_url||"");return r||ld(i.mime_type).type!=="image"?(0,pr.jsx)(w_,{item:i,filename:a||""}):(0,pr.jsx)("div",{className:"dataviews-media-field__media-thumbnail",children:(0,pr.jsx)("img",{className:"dataviews-media-field__media-thumbnail--image",src:i.source_url,srcSet:i?.media_details?.sizes?Object.values(i.media_details.sizes).map(s=>`${s.source_url} ${s.width}w`).join(", "):void 0,sizes:t?.sizes||"100vw",alt:i.alt_text||i.title.raw,onError:()=>o(!0)})})}var y_={id:"media_thumbnail",type:"media",label:(0,Fb.__)("Thumbnail"),render:Mb,enableSorting:!1,filterBy:!1},ud=y_;var Lb=u(j(),1),__={id:"mime_type",type:"text",label:(0,Lb.__)("File type"),getValue:({item:e})=>e?.mime_type||"",render:({item:e})=>e?.mime_type||"-",enableSorting:!1,filterBy:!1,readOnly:!0},cd=__;var al=u(jb(),1),Ub=u(ll(),1);var Hb=u(pu(),1),{lock:zb,unlock:Wb}=(0,Hb.__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/media-utils");var fo=u(P(),1),{useEntityRecordsWithPermissions:S_}=Wb(yi.privateApis),Gb="pickerGrid",C_="pickerTable",wi="media-modal",il="media-modal-upload-progress";function Yb({allowedTypes:e,multiple:t=!1,value:r,onSelect:o,onClose:n,onUpload:i,title:a=(0,$e.__)("Select Media"),isOpen:s,isDismissible:l=!0,modalClass:c,search:f=!0,searchLabel:p=(0,$e.__)("Search media")}){let[d,m]=(0,gt.useState)(()=>r?Array.isArray(r)?r.map(String):[String(r)]:[]),{createSuccessNotice:v,createErrorNotice:_,createInfoNotice:h}=(0,_i.useDispatch)(al.store),{invalidateResolution:b}=(0,_i.useDispatch)(yi.store),[y,A]=(0,gt.useState)(()=>({type:Gb,fields:[],showTitle:!1,titleField:"title",mediaField:"media_thumbnail",search:"",page:1,perPage:20,filters:[],layout:{previewSize:170}})),V=(0,gt.useMemo)(()=>{let D={};return y.filters?.forEach(W=>{W.field==="media_type"&&(D.media_type=W.value),W.field==="author"&&(W.operator==="isAny"?D.author=W.value:W.operator==="isNone"&&(D.author_exclude=W.value)),(W.field==="date"||W.field==="modified")&&(W.operator==="before"?D.before=W.value:W.operator==="after"&&(D.after=W.value)),W.field==="mime_type"&&(D.mime_type=W.value)}),D.media_type||(D.media_type=e?.includes("*")?void 0:e),{per_page:y.perPage||20,page:y.page||1,status:"inherit",order:y.sort?.direction,orderby:y.sort?.field,search:y.search,_embed:"author,wp:attached-to",...D}},[y,e]),{records:R,isResolving:M,totalItems:k,totalPages:S}=S_("postType","attachment",V),I=(0,gt.useMemo)(()=>[{...ud,enableHiding:!1},{id:"title",type:"text",label:(0,$e.__)("Title"),getValue:({item:D})=>D.title.raw||D.title.rendered||(0,$e.__)("(no title)")},Zc,ed,nd,td,rd,Jc,id,ad,sd,cd,Qc],[]),N=(0,gt.useMemo)(()=>[{id:"select",label:t?(0,$e.__)("Select"):(0,$e.__)("Select"),isPrimary:!0,supportsBulk:t,async callback(){if(d.length===0)return;let D={include:d,per_page:-1},Q=(await(0,_i.resolveSelect)(yi.store).getEntityRecords("postType","attachment",D)??[]).map(kr).filter(Boolean),ge=t?Q:Q?.[0];o(ge)}}],[t,o,d]),g=(0,gt.useCallback)(()=>{n?.()},[n]),E=i||Vi,T=(0,gt.useCallback)(D=>{if(D.every(Q=>Q.id&&Q.url&&!(0,Ub.isBlobURL)(Q.url))&&D.length>0){v((0,$e.sprintf)((0,$e._n)("Uploaded %s file","Uploaded %s files",D.length),D.length.toLocaleString()),{type:"snackbar",context:wi,id:il});let Q=D.map(ge=>String(ge.id)).filter(Boolean);m(t?ge=>[...ge,...Q]:Q.slice(0,1)),b("getEntityRecords",["postType","attachment",V])}},[v,b,V,t]),w=(0,gt.useCallback)(D=>{_(D.message,{type:"snackbar",context:wi,id:il})},[_]),O=(0,gt.useCallback)(D=>{let W=D.target.files;if(W&&W.length>0){let Q=Array.from(W);h((0,$e.sprintf)((0,$e._n)("Uploading %s file","Uploading %s files",Q.length),Q.length.toLocaleString()),{type:"snackbar",context:wi,id:il,explicitDismiss:!0}),E({allowedTypes:e,filesList:Q,onFileChange:T,onError:w})}},[e,E,h,T,w]),x=(0,gt.useMemo)(()=>({totalItems:k,totalPages:S}),[k,S]),C=(0,gt.useMemo)(()=>({[Gb]:{fields:[],showTitle:!1},[C_]:{fields:["filename","filesize","media_dimensions","author","date"],showTitle:!0}}),[]),F=(0,gt.useMemo)(()=>{if(!e?.includes("*"))return e?.join(",")},[e]);return s?(0,fo.jsxs)(mo.Modal,{title:a,onRequestClose:g,isDismissible:l,className:c,overlayClassName:"media-upload-modal",size:"fill",headerActions:(0,fo.jsx)(mo.FormFileUpload,{accept:F,multiple:!0,onChange:O,__next40pxDefaultSize:!0,render:({openFileDialog:D})=>(0,fo.jsx)(mo.Button,{onClick:D,icon:ou,__next40pxDefaultSize:!0,children:(0,$e.__)("Upload media")})}),children:[(0,fo.jsx)(mo.DropZone,{onFilesDrop:D=>{let W=D;e&&!e.includes("*")&&(W=D.filter(Q=>e.some(ge=>Q.type===ge||Q.type.startsWith(ge.replace("*",""))))),W.length>0&&(h((0,$e.sprintf)((0,$e._n)("Uploading %s file","Uploading %s files",W.length),W.length.toLocaleString()),{type:"snackbar",context:wi,id:il,explicitDismiss:!0}),E({allowedTypes:e,filesList:W,onFileChange:T,onError:w}))},label:(0,$e.__)("Drop files to upload")}),(0,fo.jsx)(Kc,{data:R||[],fields:I,view:y,onChangeView:A,actions:N,selection:d,onChangeSelection:m,isLoading:M,paginationInfo:x,defaultLayouts:C,getItemId:D=>String(D.id),search:f,searchLabel:p,itemListLabel:(0,$e.__)("Media items")}),(0,fo.jsx)(al.SnackbarNotices,{className:"media-upload-modal__snackbar",context:wi})]}):null}var dd={};zb(dd,{sideloadMedia:Od,MediaUploadModal:Yb});return nx(E_);})();
/*! Bundled license information:

use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
  (**
   * @license React
   * use-sync-external-store-shim.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)
*/
                                                                                                                                                                                                                                                                                                                                                                                                                    dist/notices.js                                                                                     0000644                 00000024164 15212564022 0007517 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).notices = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/components
  var require_components = __commonJS({
    "package-external:@wordpress/components"(exports, module) {
      module.exports = window.wp.components;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // packages/notices/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    InlineNotices: () => InlineNotices,
    SnackbarNotices: () => SnackbarNotices,
    store: () => store
  });

  // packages/notices/build-module/store/index.mjs
  var import_data = __toESM(require_data(), 1);

  // packages/notices/build-module/store/utils/on-sub-key.mjs
  var onSubKey = (actionProperty) => (reducer) => (state = {}, action) => {
    const key = action[actionProperty];
    if (key === void 0) {
      return state;
    }
    const nextKeyState = reducer(state[key], action);
    if (nextKeyState === state[key]) {
      return state;
    }
    return {
      ...state,
      [key]: nextKeyState
    };
  };
  var on_sub_key_default = onSubKey;

  // packages/notices/build-module/store/reducer.mjs
  var notices = on_sub_key_default("context")((state = [], action) => {
    switch (action.type) {
      case "CREATE_NOTICE":
        return [
          ...state.filter(({ id }) => id !== action.notice.id),
          action.notice
        ];
      case "REMOVE_NOTICE":
        return state.filter(({ id }) => id !== action.id);
      case "REMOVE_NOTICES":
        return state.filter(({ id }) => !action.ids.includes(id));
      case "REMOVE_ALL_NOTICES":
        return state.filter(({ type }) => type !== action.noticeType);
      default:
        return state;
    }
  });
  var reducer_default = notices;

  // packages/notices/build-module/store/actions.mjs
  var actions_exports = {};
  __export(actions_exports, {
    createErrorNotice: () => createErrorNotice,
    createInfoNotice: () => createInfoNotice,
    createNotice: () => createNotice,
    createSuccessNotice: () => createSuccessNotice,
    createWarningNotice: () => createWarningNotice,
    removeAllNotices: () => removeAllNotices,
    removeNotice: () => removeNotice,
    removeNotices: () => removeNotices
  });

  // packages/notices/build-module/store/constants.mjs
  var DEFAULT_CONTEXT = "global";
  var DEFAULT_STATUS = "info";

  // packages/notices/build-module/store/actions.mjs
  var uniqueId = 0;
  function createNotice(status = DEFAULT_STATUS, content, options = {}) {
    const {
      speak = true,
      isDismissible = true,
      context = DEFAULT_CONTEXT,
      id = `${context}${++uniqueId}`,
      actions = [],
      type = "default",
      __unstableHTML,
      icon = null,
      explicitDismiss = false,
      onDismiss
    } = options;
    content = String(content);
    return {
      type: "CREATE_NOTICE",
      context,
      notice: {
        id,
        status,
        content,
        spokenMessage: speak ? content : null,
        __unstableHTML,
        isDismissible,
        actions,
        type,
        icon,
        explicitDismiss,
        onDismiss
      }
    };
  }
  function createSuccessNotice(content, options) {
    return createNotice("success", content, options);
  }
  function createInfoNotice(content, options) {
    return createNotice("info", content, options);
  }
  function createErrorNotice(content, options) {
    return createNotice("error", content, options);
  }
  function createWarningNotice(content, options) {
    return createNotice("warning", content, options);
  }
  function removeNotice(id, context = DEFAULT_CONTEXT) {
    return {
      type: "REMOVE_NOTICE",
      id,
      context
    };
  }
  function removeAllNotices(noticeType = "default", context = DEFAULT_CONTEXT) {
    return {
      type: "REMOVE_ALL_NOTICES",
      noticeType,
      context
    };
  }
  function removeNotices(ids, context = DEFAULT_CONTEXT) {
    return {
      type: "REMOVE_NOTICES",
      ids,
      context
    };
  }

  // packages/notices/build-module/store/selectors.mjs
  var selectors_exports = {};
  __export(selectors_exports, {
    getNotices: () => getNotices
  });
  var DEFAULT_NOTICES = [];
  function getNotices(state, context = DEFAULT_CONTEXT) {
    return state[context] || DEFAULT_NOTICES;
  }

  // packages/notices/build-module/store/index.mjs
  var store = (0, import_data.createReduxStore)("core/notices", {
    reducer: reducer_default,
    actions: actions_exports,
    selectors: selectors_exports
  });
  (0, import_data.register)(store);

  // node_modules/clsx/dist/clsx.mjs
  function 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 = 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 = r(e)) && (n && (n += " "), n += t);
    return n;
  }
  var clsx_default = clsx;

  // packages/notices/build-module/components/inline-notices/index.mjs
  var import_components = __toESM(require_components(), 1);
  var import_data2 = __toESM(require_data(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='51ef33823e']")) {
    const style = document.createElement("style");
    style.setAttribute("data-wp-hash", "51ef33823e");
    style.appendChild(document.createTextNode(".components-notices__dismissible,.components-notices__pinned{color:#1e1e1e}.components-notices__dismissible .components-notice,.components-notices__pinned .components-notice{border-bottom:1px solid #0003;box-sizing:border-box;min-height:64px;padding:0 12px}.components-notices__dismissible .components-notice .components-notice__dismiss,.components-notices__pinned .components-notice .components-notice__dismiss{margin-top:12px}"));
    document.head.appendChild(style);
  }
  function InlineNotices({
    children,
    pinnedNoticesClassName,
    dismissibleNoticesClassName,
    context
  }) {
    const notices2 = (0, import_data2.useSelect)(
      (select) => select(store).getNotices(context),
      [context]
    );
    const { removeNotice: removeNotice2 } = (0, import_data2.useDispatch)(store);
    const dismissibleNotices = notices2.filter(
      ({ isDismissible, type }) => isDismissible && type === "default"
    );
    const nonDismissibleNotices = notices2.filter(
      ({ isDismissible, type }) => !isDismissible && type === "default"
    );
    return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
        import_components.NoticeList,
        {
          notices: nonDismissibleNotices,
          className: clsx_default(
            "components-notices__pinned",
            pinnedNoticesClassName
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
        import_components.NoticeList,
        {
          notices: dismissibleNotices,
          className: clsx_default(
            "components-notices__dismissible",
            dismissibleNoticesClassName
          ),
          onRemove: (id) => removeNotice2(id, context),
          children
        }
      )
    ] });
  }

  // packages/notices/build-module/components/snackbar-notices/index.mjs
  var import_components2 = __toESM(require_components(), 1);
  var import_data3 = __toESM(require_data(), 1);
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  var MAX_VISIBLE_NOTICES = -3;
  function SnackbarNotices({
    className,
    context
  }) {
    const notices2 = (0, import_data3.useSelect)(
      (select) => select(store).getNotices(context),
      [context]
    );
    const { removeNotice: removeNotice2 } = (0, import_data3.useDispatch)(store);
    const snackbarNotices = notices2.filter(({ type }) => type === "snackbar").slice(MAX_VISIBLE_NOTICES);
    return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
      import_components2.SnackbarList,
      {
        notices: snackbarNotices,
        className: clsx_default("components-notices__snackbar", className),
        onRemove: (id) => removeNotice2(id, context)
      }
    );
  }
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                                                                                                            dist/notices.min.js                                                                                 0000644                 00000010546 15212564024 0010302 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).notices=(()=>{var $=Object.create;var d=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var H=Object.getPrototypeOf,J=Object.prototype.hasOwnProperty;var S=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),y=(e,t)=>{for(var o in t)d(e,o,{get:t[o],enumerable:!0})},h=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of B(t))!J.call(e,n)&&n!==o&&d(e,n,{get:()=>t[n],enumerable:!(r=z(t,n))||r.enumerable});return e};var m=(e,t,o)=>(o=e!=null?$(H(e)):{},h(t||!e||!e.__esModule?d(o,"default",{value:e,enumerable:!0}):o,e)),W=e=>h(d({},"__esModule",{value:!0}),e);var _=S((ue,I)=>{I.exports=window.wp.data});var O=S((Se,k)=>{k.exports=window.wp.components});var A=S((ye,M)=>{M.exports=window.ReactJSXRuntime});var ae={};y(ae,{InlineNotices:()=>U,SnackbarNotices:()=>X,store:()=>c});var E=m(_(),1);var G=e=>t=>(o={},r)=>{let n=r[e];if(n===void 0)return o;let i=t(o[n],r);return i===o[n]?o:{...o,[n]:i}},L=G;var P=L("context")((e=[],t)=>{switch(t.type){case"CREATE_NOTICE":return[...e.filter(({id:o})=>o!==t.notice.id),t.notice];case"REMOVE_NOTICE":return e.filter(({id:o})=>o!==t.id);case"REMOVE_NOTICES":return e.filter(({id:o})=>!t.ids.includes(o));case"REMOVE_ALL_NOTICES":return e.filter(({type:o})=>o!==t.noticeType);default:return e}}),R=P;var v={};y(v,{createErrorNotice:()=>ee,createInfoNotice:()=>Z,createNotice:()=>f,createSuccessNotice:()=>Y,createWarningNotice:()=>te,removeAllNotices:()=>re,removeNotice:()=>oe,removeNotices:()=>ne});var a="global",w="info";var Q=0;function f(e=w,t,o={}){let{speak:r=!0,isDismissible:n=!0,context:i=a,id:x=`${i}${++Q}`,actions:b=[],type:s="default",__unstableHTML:u,icon:j=null,explicitDismiss:K=!1,onDismiss:q}=o;return t=String(t),{type:"CREATE_NOTICE",context:i,notice:{id:x,status:e,content:t,spokenMessage:r?t:null,__unstableHTML:u,isDismissible:n,actions:b,type:s,icon:j,explicitDismiss:K,onDismiss:q}}}function Y(e,t){return f("success",e,t)}function Z(e,t){return f("info",e,t)}function ee(e,t){return f("error",e,t)}function te(e,t){return f("warning",e,t)}function oe(e,t=a){return{type:"REMOVE_NOTICE",id:e,context:t}}function re(e="default",t=a){return{type:"REMOVE_ALL_NOTICES",noticeType:e,context:t}}function ne(e,t=a){return{type:"REMOVE_NOTICES",ids:e,context:t}}var g={};y(g,{getNotices:()=>se});var ie=[];function se(e,t=a){return e[t]||ie}var c=(0,E.createReduxStore)("core/notices",{reducer:R,actions:v,selectors:g});(0,E.register)(c);function D(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(o=D(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function ce(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=D(e))&&(r&&(r+=" "),r+=t);return r}var l=ce;var C=m(O(),1),N=m(_(),1);var p=m(A(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='51ef33823e']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","51ef33823e"),e.appendChild(document.createTextNode(".components-notices__dismissible,.components-notices__pinned{color:#1e1e1e}.components-notices__dismissible .components-notice,.components-notices__pinned .components-notice{border-bottom:1px solid #0003;box-sizing:border-box;min-height:64px;padding:0 12px}.components-notices__dismissible .components-notice .components-notice__dismiss,.components-notices__pinned .components-notice .components-notice__dismiss{margin-top:12px}")),document.head.appendChild(e)}function U({children:e,pinnedNoticesClassName:t,dismissibleNoticesClassName:o,context:r}){let n=(0,N.useSelect)(s=>s(c).getNotices(r),[r]),{removeNotice:i}=(0,N.useDispatch)(c),x=n.filter(({isDismissible:s,type:u})=>s&&u==="default"),b=n.filter(({isDismissible:s,type:u})=>!s&&u==="default");return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(C.NoticeList,{notices:b,className:l("components-notices__pinned",t)}),(0,p.jsx)(C.NoticeList,{notices:x,className:l("components-notices__dismissible",o),onRemove:s=>i(s,r),children:e})]})}var F=m(O(),1),T=m(_(),1);var V=m(A(),1),me=-3;function X({className:e,context:t}){let o=(0,T.useSelect)(i=>i(c).getNotices(t),[t]),{removeNotice:r}=(0,T.useDispatch)(c),n=o.filter(({type:i})=>i==="snackbar").slice(me);return(0,V.jsx)(F.SnackbarList,{notices:n,className:l("components-notices__snackbar",e),onRemove:i=>r(i,t)})}return W(ae);})();
                                                                                                                                                          dist/nux.js                                                                                         0000644                 00000024514 15212564024 0006666 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;
(wp ||= {}).nux = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/deprecated
  var require_deprecated = __commonJS({
    "package-external:@wordpress/deprecated"(exports, module) {
      module.exports = window.wp.deprecated;
    }
  });

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // package-external:@wordpress/components
  var require_components = __commonJS({
    "package-external:@wordpress/components"(exports, module) {
      module.exports = window.wp.components;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/primitives
  var require_primitives = __commonJS({
    "package-external:@wordpress/primitives"(exports, module) {
      module.exports = window.wp.primitives;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // packages/nux/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    DotTip: () => dot_tip_default,
    store: () => store
  });
  var import_deprecated = __toESM(require_deprecated(), 1);

  // packages/nux/build-module/store/index.mjs
  var import_data3 = __toESM(require_data(), 1);

  // packages/nux/build-module/store/reducer.mjs
  var import_data = __toESM(require_data(), 1);
  function guides(state = [], action) {
    switch (action.type) {
      case "TRIGGER_GUIDE":
        return [...state, action.tipIds];
    }
    return state;
  }
  function areTipsEnabled(state = true, action) {
    switch (action.type) {
      case "DISABLE_TIPS":
        return false;
      case "ENABLE_TIPS":
        return true;
    }
    return state;
  }
  function dismissedTips(state = {}, action) {
    switch (action.type) {
      case "DISMISS_TIP":
        return {
          ...state,
          [action.id]: true
        };
      case "ENABLE_TIPS":
        return {};
    }
    return state;
  }
  var preferences = (0, import_data.combineReducers)({ areTipsEnabled, dismissedTips });
  var reducer_default = (0, import_data.combineReducers)({ guides, preferences });

  // packages/nux/build-module/store/actions.mjs
  var actions_exports = {};
  __export(actions_exports, {
    disableTips: () => disableTips,
    dismissTip: () => dismissTip,
    enableTips: () => enableTips,
    triggerGuide: () => triggerGuide
  });
  function triggerGuide(tipIds) {
    return {
      type: "TRIGGER_GUIDE",
      tipIds
    };
  }
  function dismissTip(id) {
    return {
      type: "DISMISS_TIP",
      id
    };
  }
  function disableTips() {
    return {
      type: "DISABLE_TIPS"
    };
  }
  function enableTips() {
    return {
      type: "ENABLE_TIPS"
    };
  }

  // packages/nux/build-module/store/selectors.mjs
  var selectors_exports = {};
  __export(selectors_exports, {
    areTipsEnabled: () => areTipsEnabled2,
    getAssociatedGuide: () => getAssociatedGuide,
    isTipVisible: () => isTipVisible
  });
  var import_data2 = __toESM(require_data(), 1);
  var getAssociatedGuide = (0, import_data2.createSelector)(
    (state, tipId) => {
      for (const tipIds of state.guides) {
        if (tipIds.includes(tipId)) {
          const nonDismissedTips = tipIds.filter(
            (tId) => !Object.keys(
              state.preferences.dismissedTips
            ).includes(tId)
          );
          const [currentTipId = null, nextTipId = null] = nonDismissedTips;
          return { tipIds, currentTipId, nextTipId };
        }
      }
      return null;
    },
    (state) => [state.guides, state.preferences.dismissedTips]
  );
  function isTipVisible(state, tipId) {
    if (!state.preferences.areTipsEnabled) {
      return false;
    }
    if (state.preferences.dismissedTips?.hasOwnProperty(tipId)) {
      return false;
    }
    const associatedGuide = getAssociatedGuide(state, tipId);
    if (associatedGuide && associatedGuide.currentTipId !== tipId) {
      return false;
    }
    return true;
  }
  function areTipsEnabled2(state) {
    return state.preferences.areTipsEnabled;
  }

  // packages/nux/build-module/store/index.mjs
  var STORE_NAME = "core/nux";
  var store = (0, import_data3.createReduxStore)(STORE_NAME, {
    reducer: reducer_default,
    actions: actions_exports,
    selectors: selectors_exports,
    persist: ["preferences"]
  });
  (0, import_data3.registerStore)(STORE_NAME, {
    reducer: reducer_default,
    actions: actions_exports,
    selectors: selectors_exports,
    persist: ["preferences"]
  });

  // packages/nux/build-module/components/dot-tip/index.mjs
  var import_compose = __toESM(require_compose(), 1);
  var import_components = __toESM(require_components(), 1);
  var import_i18n = __toESM(require_i18n(), 1);
  var import_data4 = __toESM(require_data(), 1);
  var import_element = __toESM(require_element(), 1);

  // packages/icons/build-module/library/close.mjs
  var import_primitives = __toESM(require_primitives(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  var close_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z" }) });

  // packages/nux/build-module/components/dot-tip/index.mjs
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  function onClick(event) {
    event.stopPropagation();
  }
  function DotTip({
    position = "middle right",
    children,
    isVisible,
    hasNextTip,
    onDismiss,
    onDisable
  }) {
    const anchorParent = (0, import_element.useRef)(null);
    const onFocusOutsideCallback = (0, import_element.useCallback)(
      (event) => {
        if (!anchorParent.current) {
          return;
        }
        if (anchorParent.current.contains(event.relatedTarget)) {
          return;
        }
        onDisable();
      },
      [onDisable, anchorParent]
    );
    if (!isVisible) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
      import_components.Popover,
      {
        className: "nux-dot-tip",
        position,
        focusOnMount: true,
        role: "dialog",
        "aria-label": (0, import_i18n.__)("Editor tips"),
        onClick,
        onFocusOutside: onFocusOutsideCallback,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { children }),
          /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
            import_components.Button,
            {
              __next40pxDefaultSize: true,
              variant: "link",
              onClick: onDismiss,
              children: hasNextTip ? (0, import_i18n.__)("See next tip") : (0, import_i18n.__)("Got it")
            }
          ) }),
          /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
            import_components.Button,
            {
              size: "small",
              className: "nux-dot-tip__disable",
              icon: close_default,
              label: (0, import_i18n.__)("Disable tips"),
              onClick: onDisable
            }
          )
        ]
      }
    );
  }
  var dot_tip_default = (0, import_compose.compose)(
    (0, import_data4.withSelect)((select, { tipId }) => {
      const { isTipVisible: isTipVisible2, getAssociatedGuide: getAssociatedGuide2 } = select(store);
      const associatedGuide = getAssociatedGuide2(tipId);
      return {
        isVisible: isTipVisible2(tipId),
        hasNextTip: !!(associatedGuide && associatedGuide.nextTipId)
      };
    }),
    (0, import_data4.withDispatch)((dispatch, { tipId }) => {
      const { dismissTip: dismissTip2, disableTips: disableTips2 } = dispatch(store);
      return {
        onDismiss() {
          dismissTip2(tipId);
        },
        onDisable() {
          disableTips2();
        }
      };
    })
  )(DotTip);

  // packages/nux/build-module/index.mjs
  (0, import_deprecated.default)("wp.nux", {
    since: "5.4",
    hint: "wp.components.Guide can be used to show a user guide.",
    version: "6.2"
  });
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                    dist/nux.min.js                                                                                     0000644                 00000007655 15212564024 0007457 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;(wp||={}).nux=(()=>{var K=Object.create;var c=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames;var $=Object.getPrototypeOf,aa=Object.prototype.hasOwnProperty;var s=(a,t)=>()=>(t||a((t={exports:{}}).exports,t),t.exports),v=(a,t)=>{for(var e in t)c(a,e,{get:t[e],enumerable:!0})},C=(a,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let f of Y(t))!aa.call(a,f)&&f!==e&&c(a,f,{get:()=>t[f],enumerable:!(o=Q(t,f))||o.enumerable});return a};var r=(a,t,e)=>(e=a!=null?K($(a)):{},C(t||!a||!a.__esModule?c(e,"default",{value:a,enumerable:!0}):e,a)),ta=a=>C(c({},"__esModule",{value:!0}),a);var I=s((ga,D)=>{D.exports=window.wp.deprecated});var m=s((wa,B)=>{B.exports=window.wp.data});var N=s((va,_)=>{_.exports=window.wp.compose});var j=s((xa,U)=>{U.exports=window.wp.components});var V=s((La,G)=>{G.exports=window.wp.i18n});var O=s((Sa,F)=>{F.exports=window.wp.element});var H=s((Ra,z)=>{z.exports=window.wp.primitives});var S=s((ka,M)=>{M.exports=window.ReactJSXRuntime});var ca={};v(ca,{DotTip:()=>J,store:()=>i});var W=r(I(),1);var w=r(m(),1);var x=r(m(),1);function ea(a=[],t){return t.type==="TRIGGER_GUIDE"?[...a,t.tipIds]:a}function fa(a=!0,t){switch(t.type){case"DISABLE_TIPS":return!1;case"ENABLE_TIPS":return!0}return a}function ra(a={},t){switch(t.type){case"DISMISS_TIP":return{...a,[t.id]:!0};case"ENABLE_TIPS":return{}}return a}var oa=(0,x.combineReducers)({areTipsEnabled:fa,dismissedTips:ra}),L=(0,x.combineReducers)({guides:ea,preferences:oa});var h={};v(h,{disableTips:()=>ua,dismissTip:()=>la,enableTips:()=>da,triggerGuide:()=>sa});function sa(a){return{type:"TRIGGER_GUIDE",tipIds:a}}function la(a){return{type:"DISMISS_TIP",id:a}}function ua(){return{type:"DISABLE_TIPS"}}function da(){return{type:"ENABLE_TIPS"}}var g={};v(g,{areTipsEnabled:()=>ia,getAssociatedGuide:()=>A,isTipVisible:()=>ma});var E=r(m(),1),A=(0,E.createSelector)((a,t)=>{for(let e of a.guides)if(e.includes(t)){let o=e.filter(d=>!Object.keys(a.preferences.dismissedTips).includes(d)),[f=null,u=null]=o;return{tipIds:e,currentTipId:f,nextTipId:u}}return null},a=>[a.guides,a.preferences.dismissedTips]);function ma(a,t){if(!a.preferences.areTipsEnabled||a.preferences.dismissedTips?.hasOwnProperty(t))return!1;let e=A(a,t);return!(e&&e.currentTipId!==t)}function ia(a){return a.preferences.areTipsEnabled}var P="core/nux",i=(0,w.createReduxStore)(P,{reducer:L,actions:h,selectors:g,persist:["preferences"]});(0,w.registerStore)(P,{reducer:L,actions:h,selectors:g,persist:["preferences"]});var q=r(N(),1),n=r(j(),1),p=r(V(),1),T=r(m(),1),y=r(O(),1);var b=r(H(),1),R=r(S(),1),k=(0,R.jsx)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,R.jsx)(b.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})});var l=r(S(),1);function pa(a){a.stopPropagation()}function na({position:a="middle right",children:t,isVisible:e,hasNextTip:o,onDismiss:f,onDisable:u}){let d=(0,y.useRef)(null),X=(0,y.useCallback)(Z=>{d.current&&(d.current.contains(Z.relatedTarget)||u())},[u,d]);return e?(0,l.jsxs)(n.Popover,{className:"nux-dot-tip",position:a,focusOnMount:!0,role:"dialog","aria-label":(0,p.__)("Editor tips"),onClick:pa,onFocusOutside:X,children:[(0,l.jsx)("p",{children:t}),(0,l.jsx)("p",{children:(0,l.jsx)(n.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:f,children:o?(0,p.__)("See next tip"):(0,p.__)("Got it")})}),(0,l.jsx)(n.Button,{size:"small",className:"nux-dot-tip__disable",icon:k,label:(0,p.__)("Disable tips"),onClick:u})]}):null}var J=(0,q.compose)((0,T.withSelect)((a,{tipId:t})=>{let{isTipVisible:e,getAssociatedGuide:o}=a(i),f=o(t);return{isVisible:e(t),hasNextTip:!!(f&&f.nextTipId)}}),(0,T.withDispatch)((a,{tipId:t})=>{let{dismissTip:e,disableTips:o}=a(i);return{onDismiss(){e(t)},onDisable(){o()}}}))(na);(0,W.default)("wp.nux",{since:"5.4",hint:"wp.components.Guide can be used to show a user guide.",version:"6.2"});return ta(ca);})();
                                                                                   dist/patterns.js                                                                                    0000644                 00000164374 15212564024 0007725 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;
(wp ||= {}).patterns = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/blocks
  var require_blocks = __commonJS({
    "package-external:@wordpress/blocks"(exports, module) {
      module.exports = window.wp.blocks;
    }
  });

  // package-external:@wordpress/core-data
  var require_core_data = __commonJS({
    "package-external:@wordpress/core-data"(exports, module) {
      module.exports = window.wp.coreData;
    }
  });

  // package-external:@wordpress/block-editor
  var require_block_editor = __commonJS({
    "package-external:@wordpress/block-editor"(exports, module) {
      module.exports = window.wp.blockEditor;
    }
  });

  // package-external:@wordpress/private-apis
  var require_private_apis = __commonJS({
    "package-external:@wordpress/private-apis"(exports, module) {
      module.exports = window.wp.privateApis;
    }
  });

  // package-external:@wordpress/components
  var require_components = __commonJS({
    "package-external:@wordpress/components"(exports, module) {
      module.exports = window.wp.components;
    }
  });

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // package-external:@wordpress/notices
  var require_notices = __commonJS({
    "package-external:@wordpress/notices"(exports, module) {
      module.exports = window.wp.notices;
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // package-external:@wordpress/html-entities
  var require_html_entities = __commonJS({
    "package-external:@wordpress/html-entities"(exports, module) {
      module.exports = window.wp.htmlEntities;
    }
  });

  // package-external:@wordpress/primitives
  var require_primitives = __commonJS({
    "package-external:@wordpress/primitives"(exports, module) {
      module.exports = window.wp.primitives;
    }
  });

  // package-external:@wordpress/url
  var require_url = __commonJS({
    "package-external:@wordpress/url"(exports, module) {
      module.exports = window.wp.url;
    }
  });

  // package-external:@wordpress/a11y
  var require_a11y = __commonJS({
    "package-external:@wordpress/a11y"(exports, module) {
      module.exports = window.wp.a11y;
    }
  });

  // packages/patterns/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    privateApis: () => privateApis,
    store: () => store
  });

  // packages/patterns/build-module/store/index.mjs
  var import_data2 = __toESM(require_data(), 1);

  // packages/patterns/build-module/store/reducer.mjs
  var import_data = __toESM(require_data(), 1);
  function isEditingPattern(state = {}, action) {
    if (action?.type === "SET_EDITING_PATTERN") {
      return {
        ...state,
        [action.clientId]: action.isEditing
      };
    }
    return state;
  }
  var reducer_default = (0, import_data.combineReducers)({
    isEditingPattern
  });

  // packages/patterns/build-module/store/actions.mjs
  var actions_exports = {};
  __export(actions_exports, {
    convertSyncedPatternToStatic: () => convertSyncedPatternToStatic,
    createPattern: () => createPattern,
    createPatternFromFile: () => createPatternFromFile,
    setEditingPattern: () => setEditingPattern
  });
  var import_blocks = __toESM(require_blocks(), 1);
  var import_core_data = __toESM(require_core_data(), 1);
  var import_block_editor = __toESM(require_block_editor(), 1);

  // packages/patterns/build-module/constants.mjs
  var PATTERN_TYPES = {
    theme: "pattern",
    user: "wp_block"
  };
  var PATTERN_DEFAULT_CATEGORY = "all-patterns";
  var PATTERN_USER_CATEGORY = "my-patterns";
  var EXCLUDED_PATTERN_SOURCES = [
    "core",
    "pattern-directory/core",
    "pattern-directory/featured"
  ];
  var PATTERN_SYNC_TYPES = {
    full: "fully",
    unsynced: "unsynced"
  };
  var PATTERN_OVERRIDES_BINDING_SOURCE = "core/pattern-overrides";

  // packages/patterns/build-module/store/actions.mjs
  var createPattern = (title, syncType, content, categories) => async ({ registry }) => {
    const meta = syncType === PATTERN_SYNC_TYPES.unsynced ? {
      wp_pattern_sync_status: syncType
    } : void 0;
    const reusableBlock = {
      title,
      content,
      status: "publish",
      meta,
      wp_pattern_category: categories
    };
    const updatedRecord = await registry.dispatch(import_core_data.store).saveEntityRecord("postType", "wp_block", reusableBlock);
    return updatedRecord;
  };
  var createPatternFromFile = (file, categories) => async ({ dispatch }) => {
    const fileContent = await file.text();
    let parsedContent;
    try {
      parsedContent = JSON.parse(fileContent);
    } catch (e) {
      throw new Error("Invalid JSON file");
    }
    if (parsedContent.__file !== "wp_block" || !parsedContent.title || !parsedContent.content || typeof parsedContent.title !== "string" || typeof parsedContent.content !== "string" || parsedContent.syncStatus && typeof parsedContent.syncStatus !== "string") {
      throw new Error("Invalid pattern JSON file");
    }
    const pattern = await dispatch.createPattern(
      parsedContent.title,
      parsedContent.syncStatus,
      parsedContent.content,
      categories
    );
    return pattern;
  };
  var convertSyncedPatternToStatic = (clientId) => ({ registry }) => {
    const patternBlock = registry.select(import_block_editor.store).getBlock(clientId);
    const existingOverrides = patternBlock.attributes?.content;
    function cloneBlocksAndRemoveBindings(blocks) {
      return blocks.map((block) => {
        let metadata = block.attributes.metadata;
        if (metadata) {
          metadata = { ...metadata };
          delete metadata.id;
          delete metadata.bindings;
          if (existingOverrides?.[metadata.name]) {
            for (const [attributeName, value] of Object.entries(
              existingOverrides[metadata.name]
            )) {
              if (!(0, import_blocks.getBlockType)(block.name)?.attributes[attributeName]) {
                continue;
              }
              block.attributes[attributeName] = value;
            }
          }
        }
        return (0, import_blocks.cloneBlock)(
          block,
          {
            metadata: metadata && Object.keys(metadata).length > 0 ? metadata : void 0
          },
          cloneBlocksAndRemoveBindings(block.innerBlocks)
        );
      });
    }
    const patternInnerBlocks = registry.select(import_block_editor.store).getBlocks(patternBlock.clientId);
    registry.dispatch(import_block_editor.store).replaceBlocks(
      patternBlock.clientId,
      cloneBlocksAndRemoveBindings(patternInnerBlocks)
    );
  };
  function setEditingPattern(clientId, isEditing) {
    return {
      type: "SET_EDITING_PATTERN",
      clientId,
      isEditing
    };
  }

  // packages/patterns/build-module/store/constants.mjs
  var STORE_NAME = "core/patterns";

  // packages/patterns/build-module/store/selectors.mjs
  var selectors_exports = {};
  __export(selectors_exports, {
    isEditingPattern: () => isEditingPattern2
  });
  function isEditingPattern2(state, clientId) {
    return state.isEditingPattern[clientId];
  }

  // packages/patterns/build-module/lock-unlock.mjs
  var import_private_apis = __toESM(require_private_apis(), 1);
  var { lock, unlock } = (0, import_private_apis.__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/patterns"
  );

  // packages/patterns/build-module/store/index.mjs
  var storeConfig = {
    reducer: reducer_default
  };
  var store = (0, import_data2.createReduxStore)(STORE_NAME, {
    ...storeConfig
  });
  (0, import_data2.register)(store);
  unlock(store).registerPrivateActions(actions_exports);
  unlock(store).registerPrivateSelectors(selectors_exports);

  // packages/patterns/build-module/components/overrides-panel.mjs
  var import_block_editor2 = __toESM(require_block_editor(), 1);
  var import_components = __toESM(require_components(), 1);
  var import_data3 = __toESM(require_data(), 1);
  var import_element = __toESM(require_element(), 1);
  var import_i18n = __toESM(require_i18n(), 1);

  // packages/patterns/build-module/api/index.mjs
  function isOverridableBlock(block) {
    return !!block.attributes.metadata?.name && !!block.attributes.metadata?.bindings && Object.values(block.attributes.metadata.bindings).some(
      (binding) => binding.source === "core/pattern-overrides"
    );
  }

  // packages/patterns/build-module/components/overrides-panel.mjs
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  var { BlockQuickNavigation } = unlock(import_block_editor2.privateApis);
  function OverridesPanel() {
    const { allClientIds, supportedBlockTypesRaw } = (0, import_data3.useSelect)(
      (select) => ({
        allClientIds: select(import_block_editor2.store).getClientIdsWithDescendants(),
        supportedBlockTypesRaw: select(import_block_editor2.store).getSettings()?.__experimentalBlockBindingsSupportedAttributes
      }),
      []
    );
    const { getBlock } = (0, import_data3.useSelect)(import_block_editor2.store);
    const clientIdsWithOverrides = (0, import_element.useMemo)(() => {
      const supportedBlockTypes = Object.keys(supportedBlockTypesRaw ?? {});
      return allClientIds.filter((clientId) => {
        const block = getBlock(clientId);
        return supportedBlockTypes.includes(block.name) && isOverridableBlock(block);
      });
    }, [allClientIds, getBlock, supportedBlockTypesRaw]);
    if (!clientIdsWithOverrides?.length) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.PanelBody, { title: (0, import_i18n.__)("Overrides"), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BlockQuickNavigation, { clientIds: clientIdsWithOverrides }) });
  }

  // packages/patterns/build-module/components/create-pattern-modal.mjs
  var import_components3 = __toESM(require_components(), 1);
  var import_i18n3 = __toESM(require_i18n(), 1);
  var import_element4 = __toESM(require_element(), 1);
  var import_data5 = __toESM(require_data(), 1);
  var import_notices = __toESM(require_notices(), 1);
  var import_core_data3 = __toESM(require_core_data(), 1);

  // packages/patterns/build-module/components/category-selector.mjs
  var import_i18n2 = __toESM(require_i18n(), 1);
  var import_element2 = __toESM(require_element(), 1);
  var import_components2 = __toESM(require_components(), 1);
  var import_compose = __toESM(require_compose(), 1);
  var import_html_entities = __toESM(require_html_entities(), 1);
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  var unescapeString = (arg) => {
    return (0, import_html_entities.decodeEntities)(arg);
  };
  var CATEGORY_SLUG = "wp_pattern_category";
  function CategorySelector({
    categoryTerms,
    onChange,
    categoryMap
  }) {
    const [search, setSearch] = (0, import_element2.useState)("");
    const debouncedSearch = (0, import_compose.useDebounce)(setSearch, 500);
    const suggestions = (0, import_element2.useMemo)(() => {
      return Array.from(categoryMap.values()).map((category) => unescapeString(category.label)).filter((category) => {
        if (search !== "") {
          return category.toLowerCase().includes(search.toLowerCase());
        }
        return true;
      }).sort((a, b) => a.localeCompare(b));
    }, [search, categoryMap]);
    function handleChange(termNames) {
      const uniqueTerms = termNames.reduce((terms, newTerm) => {
        if (!terms.some(
          (term) => term.toLowerCase() === newTerm.toLowerCase()
        )) {
          terms.push(newTerm);
        }
        return terms;
      }, []);
      onChange(uniqueTerms);
    }
    return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
      import_components2.FormTokenField,
      {
        className: "patterns-menu-items__convert-modal-categories",
        value: categoryTerms,
        suggestions,
        onChange: handleChange,
        onInputChange: debouncedSearch,
        label: (0, import_i18n2.__)("Categories"),
        tokenizeOnBlur: true,
        __experimentalExpandOnFocus: true,
        __next40pxDefaultSize: true
      }
    );
  }

  // packages/patterns/build-module/private-hooks.mjs
  var import_data4 = __toESM(require_data(), 1);
  var import_core_data2 = __toESM(require_core_data(), 1);
  var import_element3 = __toESM(require_element(), 1);
  function useAddPatternCategory() {
    const { saveEntityRecord, invalidateResolution } = (0, import_data4.useDispatch)(import_core_data2.store);
    const { corePatternCategories, userPatternCategories } = (0, import_data4.useSelect)(
      (select) => {
        const { getUserPatternCategories, getBlockPatternCategories } = select(import_core_data2.store);
        return {
          corePatternCategories: getBlockPatternCategories(),
          userPatternCategories: getUserPatternCategories()
        };
      },
      []
    );
    const categoryMap = (0, import_element3.useMemo)(() => {
      const uniqueCategories = /* @__PURE__ */ new Map();
      userPatternCategories.forEach((category) => {
        uniqueCategories.set(category.label.toLowerCase(), {
          label: category.label,
          name: category.name,
          id: category.id
        });
      });
      corePatternCategories.forEach((category) => {
        if (!uniqueCategories.has(category.label.toLowerCase()) && // There are two core categories with `Post` label so explicitly remove the one with
        // the `query` slug to avoid any confusion.
        category.name !== "query") {
          uniqueCategories.set(category.label.toLowerCase(), {
            label: category.label,
            name: category.name
          });
        }
      });
      return uniqueCategories;
    }, [userPatternCategories, corePatternCategories]);
    async function findOrCreateTerm(term) {
      try {
        const existingTerm = categoryMap.get(term.toLowerCase());
        if (existingTerm?.id) {
          return existingTerm.id;
        }
        const termData = existingTerm ? { name: existingTerm.label, slug: existingTerm.name } : { name: term };
        const newTerm = await saveEntityRecord(
          "taxonomy",
          CATEGORY_SLUG,
          termData,
          { throwOnError: true }
        );
        invalidateResolution("getUserPatternCategories");
        return newTerm.id;
      } catch (error) {
        if (error.code !== "term_exists") {
          throw error;
        }
        return error.data.term_id;
      }
    }
    return { categoryMap, findOrCreateTerm };
  }

  // packages/patterns/build-module/components/create-pattern-modal.mjs
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
  function CreatePatternModal({
    className = "patterns-menu-items__convert-modal",
    modalTitle,
    ...restProps
  }) {
    const defaultModalTitle = (0, import_data5.useSelect)(
      (select) => select(import_core_data3.store).getPostType(PATTERN_TYPES.user)?.labels?.add_new_item,
      []
    );
    return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
      import_components3.Modal,
      {
        title: modalTitle || defaultModalTitle,
        onRequestClose: restProps.onClose,
        overlayClassName: className,
        focusOnMount: "firstContentElement",
        size: "small",
        children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CreatePatternModalContents, { ...restProps })
      }
    );
  }
  function CreatePatternModalContents({
    confirmLabel = (0, import_i18n3.__)("Add"),
    defaultCategories = [],
    content,
    onClose,
    onError,
    onSuccess,
    defaultSyncType = PATTERN_SYNC_TYPES.full,
    defaultTitle = ""
  }) {
    const [syncType, setSyncType] = (0, import_element4.useState)(defaultSyncType);
    const [categoryTerms, setCategoryTerms] = (0, import_element4.useState)(defaultCategories);
    const [title, setTitle] = (0, import_element4.useState)(defaultTitle);
    const [isSaving, setIsSaving] = (0, import_element4.useState)(false);
    const { createPattern: createPattern2 } = unlock((0, import_data5.useDispatch)(store));
    const { createErrorNotice } = (0, import_data5.useDispatch)(import_notices.store);
    const { categoryMap, findOrCreateTerm } = useAddPatternCategory();
    async function onCreate(patternTitle, sync) {
      if (!title || isSaving) {
        return;
      }
      try {
        setIsSaving(true);
        const categories = await Promise.all(
          categoryTerms.map(
            (termName) => findOrCreateTerm(termName)
          )
        );
        const newPattern = await createPattern2(
          patternTitle,
          sync,
          typeof content === "function" ? content() : content,
          categories
        );
        onSuccess({
          pattern: newPattern,
          categoryId: PATTERN_DEFAULT_CATEGORY
        });
      } catch (error) {
        createErrorNotice(error.message, {
          type: "snackbar",
          id: "pattern-create"
        });
        onError?.();
      } finally {
        setIsSaving(false);
        setCategoryTerms([]);
        setTitle("");
      }
    }
    return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
      "form",
      {
        onSubmit: (event) => {
          event.preventDefault();
          onCreate(title, syncType);
        },
        children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_components3.__experimentalVStack, { spacing: "5", children: [
          /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
            import_components3.TextControl,
            {
              label: (0, import_i18n3.__)("Name"),
              value: title,
              onChange: setTitle,
              placeholder: (0, import_i18n3.__)("My pattern"),
              className: "patterns-create-modal__name-input",
              __next40pxDefaultSize: true
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
            CategorySelector,
            {
              categoryTerms,
              onChange: setCategoryTerms,
              categoryMap
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
            import_components3.ToggleControl,
            {
              label: (0, import_i18n3._x)("Synced", "pattern (singular)"),
              help: (0, import_i18n3.__)(
                "Sync this pattern across multiple locations."
              ),
              checked: syncType === PATTERN_SYNC_TYPES.full,
              onChange: () => {
                setSyncType(
                  syncType === PATTERN_SYNC_TYPES.full ? PATTERN_SYNC_TYPES.unsynced : PATTERN_SYNC_TYPES.full
                );
              }
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_components3.__experimentalHStack, { justify: "right", children: [
            /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
              import_components3.Button,
              {
                __next40pxDefaultSize: true,
                variant: "tertiary",
                onClick: () => {
                  onClose();
                  setTitle("");
                },
                children: (0, import_i18n3.__)("Cancel")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
              import_components3.Button,
              {
                __next40pxDefaultSize: true,
                variant: "primary",
                type: "submit",
                "aria-disabled": !title || isSaving,
                isBusy: isSaving,
                children: confirmLabel
              }
            )
          ] })
        ] })
      }
    );
  }

  // packages/patterns/build-module/components/duplicate-pattern-modal.mjs
  var import_core_data4 = __toESM(require_core_data(), 1);
  var import_data6 = __toESM(require_data(), 1);
  var import_i18n4 = __toESM(require_i18n(), 1);
  var import_notices2 = __toESM(require_notices(), 1);
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
  function getTermLabels(pattern, categories) {
    if (pattern.type !== PATTERN_TYPES.user) {
      return categories.core?.filter(
        (category) => pattern.categories?.includes(category.name)
      ).map((category) => category.label);
    }
    return categories.user?.filter(
      (category) => pattern.wp_pattern_category?.includes(category.id)
    ).map((category) => category.label);
  }
  function useDuplicatePatternProps({ pattern, onSuccess }) {
    const { createSuccessNotice } = (0, import_data6.useDispatch)(import_notices2.store);
    const categories = (0, import_data6.useSelect)((select) => {
      const { getUserPatternCategories, getBlockPatternCategories } = select(import_core_data4.store);
      return {
        core: getBlockPatternCategories(),
        user: getUserPatternCategories()
      };
    });
    if (!pattern) {
      return null;
    }
    return {
      content: pattern.content,
      defaultCategories: getTermLabels(pattern, categories),
      defaultSyncType: pattern.type !== PATTERN_TYPES.user ? PATTERN_SYNC_TYPES.unsynced : pattern.wp_pattern_sync_status || PATTERN_SYNC_TYPES.full,
      defaultTitle: (0, import_i18n4.sprintf)(
        /* translators: %s: Existing pattern title */
        (0, import_i18n4._x)("%s (Copy)", "pattern"),
        typeof pattern.title === "string" ? pattern.title : pattern.title.raw
      ),
      onSuccess: ({ pattern: newPattern }) => {
        createSuccessNotice(
          (0, import_i18n4.sprintf)(
            // translators: %s: The new pattern's title e.g. 'Call to action (copy)'.
            (0, import_i18n4._x)('"%s" duplicated.', "pattern"),
            newPattern.title.raw
          ),
          {
            type: "snackbar",
            id: "patterns-create"
          }
        );
        onSuccess?.({ pattern: newPattern });
      }
    };
  }
  function DuplicatePatternModal({
    pattern,
    onClose,
    onSuccess
  }) {
    const duplicatedProps = useDuplicatePatternProps({ pattern, onSuccess });
    if (!pattern) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
      CreatePatternModal,
      {
        modalTitle: (0, import_i18n4.__)("Duplicate pattern"),
        confirmLabel: (0, import_i18n4.__)("Duplicate"),
        onClose,
        onError: onClose,
        ...duplicatedProps
      }
    );
  }

  // packages/patterns/build-module/components/rename-pattern-modal.mjs
  var import_components4 = __toESM(require_components(), 1);
  var import_core_data5 = __toESM(require_core_data(), 1);
  var import_data7 = __toESM(require_data(), 1);
  var import_element5 = __toESM(require_element(), 1);
  var import_html_entities2 = __toESM(require_html_entities(), 1);
  var import_i18n5 = __toESM(require_i18n(), 1);
  var import_notices3 = __toESM(require_notices(), 1);
  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
  function RenamePatternModal({
    onClose,
    onError,
    onSuccess,
    pattern,
    ...props
  }) {
    const originalName = (0, import_html_entities2.decodeEntities)(pattern.title);
    const [name, setName] = (0, import_element5.useState)(originalName);
    const [isSaving, setIsSaving] = (0, import_element5.useState)(false);
    const {
      editEntityRecord,
      __experimentalSaveSpecifiedEntityEdits: saveSpecifiedEntityEdits
    } = (0, import_data7.useDispatch)(import_core_data5.store);
    const { createSuccessNotice, createErrorNotice } = (0, import_data7.useDispatch)(import_notices3.store);
    const onRename = async (event) => {
      event.preventDefault();
      if (!name || name === pattern.title || isSaving) {
        return;
      }
      try {
        await editEntityRecord("postType", pattern.type, pattern.id, {
          title: name
        });
        setIsSaving(true);
        setName("");
        onClose?.();
        const savedRecord = await saveSpecifiedEntityEdits(
          "postType",
          pattern.type,
          pattern.id,
          ["title"],
          { throwOnError: true }
        );
        onSuccess?.(savedRecord);
        createSuccessNotice((0, import_i18n5.__)("Pattern renamed"), {
          type: "snackbar",
          id: "pattern-update"
        });
      } catch (error) {
        onError?.();
        const errorMessage = error.message && error.code !== "unknown_error" ? error.message : (0, import_i18n5.__)("An error occurred while renaming the pattern.");
        createErrorNotice(errorMessage, {
          type: "snackbar",
          id: "pattern-update"
        });
      } finally {
        setIsSaving(false);
        setName("");
      }
    };
    const onRequestClose = () => {
      onClose?.();
      setName("");
    };
    return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
      import_components4.Modal,
      {
        title: (0, import_i18n5.__)("Rename"),
        ...props,
        onRequestClose: onClose,
        focusOnMount: "firstContentElement",
        size: "small",
        children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("form", { onSubmit: onRename, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_components4.__experimentalVStack, { spacing: "5", children: [
          /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
            import_components4.TextControl,
            {
              __next40pxDefaultSize: true,
              label: (0, import_i18n5.__)("Name"),
              value: name,
              onChange: setName,
              required: true
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_components4.__experimentalHStack, { justify: "right", children: [
            /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
              import_components4.Button,
              {
                __next40pxDefaultSize: true,
                variant: "tertiary",
                onClick: onRequestClose,
                children: (0, import_i18n5.__)("Cancel")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
              import_components4.Button,
              {
                __next40pxDefaultSize: true,
                variant: "primary",
                type: "submit",
                children: (0, import_i18n5.__)("Save")
              }
            )
          ] })
        ] }) })
      }
    );
  }

  // packages/patterns/build-module/components/index.mjs
  var import_block_editor5 = __toESM(require_block_editor(), 1);

  // packages/patterns/build-module/components/pattern-convert-button.mjs
  var import_blocks2 = __toESM(require_blocks(), 1);
  var import_block_editor3 = __toESM(require_block_editor(), 1);
  var import_element6 = __toESM(require_element(), 1);
  var import_components5 = __toESM(require_components(), 1);

  // packages/icons/build-module/library/symbol.mjs
  var import_primitives = __toESM(require_primitives(), 1);
  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
  var symbol_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives.Path, { 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" }) });

  // packages/patterns/build-module/components/pattern-convert-button.mjs
  var import_data8 = __toESM(require_data(), 1);
  var import_core_data6 = __toESM(require_core_data(), 1);
  var import_i18n6 = __toESM(require_i18n(), 1);
  var import_notices4 = __toESM(require_notices(), 1);
  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
  function PatternConvertButton({
    clientIds,
    rootClientId,
    closeBlockSettingsMenu
  }) {
    const { createSuccessNotice } = (0, import_data8.useDispatch)(import_notices4.store);
    const { replaceBlocks, updateBlockAttributes } = (0, import_data8.useDispatch)(import_block_editor3.store);
    const { setEditingPattern: setEditingPattern2 } = unlock((0, import_data8.useDispatch)(store));
    const [isModalOpen, setIsModalOpen] = (0, import_element6.useState)(false);
    const { getBlockAttributes } = (0, import_data8.useSelect)(import_block_editor3.store);
    const canConvert = (0, import_data8.useSelect)(
      (select) => {
        const { canUser } = select(import_core_data6.store);
        const {
          getBlocksByClientId: getBlocksByClientId2,
          canInsertBlockType,
          getBlockRootClientId
        } = select(import_block_editor3.store);
        const rootId = rootClientId || (clientIds.length > 0 ? getBlockRootClientId(clientIds[0]) : void 0);
        const blocks = getBlocksByClientId2(clientIds) ?? [];
        const hasReusableBlockSupport = (blockName) => {
          const blockType = (0, import_blocks2.getBlockType)(blockName);
          const hasParent = blockType && "parent" in blockType;
          return (0, import_blocks2.hasBlockSupport)(blockName, "reusable", !hasParent);
        };
        const isSyncedPattern = blocks.length === 1 && blocks[0] && (0, import_blocks2.isReusableBlock)(blocks[0]) && !!select(import_core_data6.store).getEntityRecord(
          "postType",
          "wp_block",
          blocks[0].attributes.ref
        );
        const isUnsyncedPattern = blocks.length === 1 && blocks?.[0]?.attributes?.metadata?.patternName;
        const _canConvert = (
          // Hide when this is already a pattern.
          !isUnsyncedPattern && !isSyncedPattern && // Hide when patterns are disabled.
          canInsertBlockType("core/block", rootId) && blocks.every(
            (block) => (
              // Guard against the case where a regular block has *just* been converted.
              !!block && // Hide on invalid blocks.
              block.isValid && // Hide when block doesn't support being made into a pattern.
              hasReusableBlockSupport(block.name)
            )
          ) && // Hide when current doesn't have permission to do that.
          // Blocks refers to the wp_block post type, this checks the ability to create a post of that type.
          !!canUser("create", {
            kind: "postType",
            name: "wp_block"
          })
        );
        return _canConvert;
      },
      [clientIds, rootClientId]
    );
    const { getBlocksByClientId } = (0, import_data8.useSelect)(import_block_editor3.store);
    const getContent = (0, import_element6.useCallback)(
      () => (0, import_blocks2.serialize)(getBlocksByClientId(clientIds)),
      [getBlocksByClientId, clientIds]
    );
    if (!canConvert) {
      return null;
    }
    const handleSuccess = ({ pattern }) => {
      if (pattern.wp_pattern_sync_status === PATTERN_SYNC_TYPES.unsynced) {
        if (clientIds?.length === 1) {
          const existingAttributes = getBlockAttributes(clientIds[0]);
          updateBlockAttributes(clientIds[0], {
            metadata: {
              ...existingAttributes?.metadata ? existingAttributes.metadata : {},
              patternName: `core/block/${pattern.id}`,
              name: pattern.title.raw
            }
          });
        }
      } else {
        const newBlock = (0, import_blocks2.createBlock)("core/block", {
          ref: pattern.id
        });
        replaceBlocks(clientIds, newBlock);
        setEditingPattern2(newBlock.clientId, true);
      }
      createSuccessNotice(
        pattern.wp_pattern_sync_status === PATTERN_SYNC_TYPES.unsynced ? (0, import_i18n6.sprintf)(
          // translators: %s: the name the user has given to the pattern.
          (0, import_i18n6.__)("Unsynced pattern created: %s"),
          pattern.title.raw
        ) : (0, import_i18n6.sprintf)(
          // translators: %s: the name the user has given to the pattern.
          (0, import_i18n6.__)("Synced pattern created: %s"),
          pattern.title.raw
        ),
        {
          type: "snackbar",
          id: "convert-to-pattern-success"
        }
      );
      setIsModalOpen(false);
      closeBlockSettingsMenu();
    };
    return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
        import_components5.MenuItem,
        {
          icon: symbol_default,
          onClick: () => setIsModalOpen(true),
          "aria-expanded": isModalOpen,
          "aria-haspopup": "dialog",
          children: (0, import_i18n6.__)("Create pattern")
        }
      ),
      isModalOpen && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
        CreatePatternModal,
        {
          content: getContent,
          onSuccess: (pattern) => {
            handleSuccess(pattern);
          },
          onError: () => {
            setIsModalOpen(false);
          },
          onClose: () => {
            setIsModalOpen(false);
            closeBlockSettingsMenu();
          }
        }
      )
    ] });
  }

  // packages/patterns/build-module/components/patterns-manage-button.mjs
  var import_components6 = __toESM(require_components(), 1);
  var import_i18n7 = __toESM(require_i18n(), 1);
  var import_blocks3 = __toESM(require_blocks(), 1);
  var import_data9 = __toESM(require_data(), 1);
  var import_element7 = __toESM(require_element(), 1);
  var import_block_editor4 = __toESM(require_block_editor(), 1);
  var import_url = __toESM(require_url(), 1);
  var import_core_data7 = __toESM(require_core_data(), 1);
  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
  function PatternsManageButton({ clientId, onClose }) {
    const [showConfirmDialog, setShowConfirmDialog] = (0, import_element7.useState)(false);
    const {
      attributes,
      canDetach,
      isVisible,
      managePatternsUrl,
      isSyncedPattern,
      isUnsyncedPattern,
      canEdit
    } = (0, import_data9.useSelect)(
      (select) => {
        const { canRemoveBlock, getBlock, canEditBlock } = select(import_block_editor4.store);
        const { canUser } = select(import_core_data7.store);
        const block = getBlock(clientId);
        const _isUnsyncedPattern = !!block?.attributes?.metadata?.patternName;
        const _isSyncedPattern = !!block && (0, import_blocks3.isReusableBlock)(block) && !!canUser("update", {
          kind: "postType",
          name: "wp_block",
          id: block.attributes.ref
        });
        return {
          attributes: block.attributes,
          canEdit: canEditBlock(clientId),
          // For unsynced patterns, detaching is simply removing the `patternName` attribute.
          // For synced patterns, the `core:block` block is replaced with its inner blocks,
          // so checking whether `canRemoveBlock` is possible is required.
          canDetach: _isUnsyncedPattern || _isSyncedPattern && canRemoveBlock(clientId),
          isUnsyncedPattern: _isUnsyncedPattern,
          isSyncedPattern: _isSyncedPattern,
          isVisible: _isUnsyncedPattern || _isSyncedPattern,
          // The site editor and templates both check whether the user
          // has edit_theme_options capabilities. We can leverage that here
          // and omit the manage patterns link if the user can't access it.
          managePatternsUrl: canUser("create", {
            kind: "postType",
            name: "wp_template"
          }) ? (0, import_url.addQueryArgs)("site-editor.php", {
            p: "/pattern"
          }) : (0, import_url.addQueryArgs)("edit.php", {
            post_type: "wp_block"
          })
        };
      },
      [clientId]
    );
    const { updateBlockAttributes } = (0, import_data9.useDispatch)(import_block_editor4.store);
    const { convertSyncedPatternToStatic: convertSyncedPatternToStatic2 } = unlock(
      (0, import_data9.useDispatch)(store)
    );
    if (!isVisible || !canEdit) {
      return null;
    }
    const handleDetach = () => {
      if (isSyncedPattern) {
        convertSyncedPatternToStatic2(clientId);
      }
      if (isUnsyncedPattern) {
        const { patternName, ...attributesWithoutPatternName } = attributes?.metadata ?? {};
        updateBlockAttributes(clientId, {
          metadata: attributesWithoutPatternName
        });
      }
      onClose?.();
      setShowConfirmDialog(false);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
      canDetach && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_components6.MenuItem, { onClick: () => setShowConfirmDialog(true), children: (0, import_i18n7.__)("Detach") }),
        /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
          import_components6.__experimentalConfirmDialog,
          {
            isOpen: showConfirmDialog,
            onConfirm: handleDetach,
            onCancel: () => setShowConfirmDialog(false),
            confirmButtonText: (0, import_i18n7.__)("Detach"),
            size: "medium",
            title: (0, import_i18n7.__)("Detach pattern?"),
            __experimentalHideHeader: false,
            children: isSyncedPattern ? (0, import_i18n7.__)(
              "The blocks will be separated from the original pattern and will be fully editable. Future changes to the pattern will not apply here."
            ) : (0, import_i18n7.__)(
              "Blocks will no longer be associated with this pattern and will be fully editable."
            )
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_components6.MenuItem, { href: managePatternsUrl, children: (0, import_i18n7.__)("Manage patterns") })
    ] });
  }
  var patterns_manage_button_default = PatternsManageButton;

  // packages/patterns/build-module/components/index.mjs
  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
  function PatternsMenuItems({ rootClientId }) {
    return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_block_editor5.BlockSettingsMenuControls, { children: ({ selectedClientIds, onClose }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
        PatternConvertButton,
        {
          clientIds: selectedClientIds,
          rootClientId,
          closeBlockSettingsMenu: onClose
        }
      ),
      selectedClientIds.length === 1 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
        patterns_manage_button_default,
        {
          clientId: selectedClientIds[0],
          onClose
        }
      )
    ] }) });
  }

  // packages/patterns/build-module/components/rename-pattern-category-modal.mjs
  var import_components7 = __toESM(require_components(), 1);
  var import_core_data8 = __toESM(require_core_data(), 1);
  var import_data10 = __toESM(require_data(), 1);
  var import_element8 = __toESM(require_element(), 1);
  var import_html_entities3 = __toESM(require_html_entities(), 1);
  var import_i18n8 = __toESM(require_i18n(), 1);
  var import_notices5 = __toESM(require_notices(), 1);
  var import_a11y = __toESM(require_a11y(), 1);
  var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
  function RenamePatternCategoryModal({
    category,
    existingCategories,
    onClose,
    onError,
    onSuccess,
    ...props
  }) {
    const id = (0, import_element8.useId)();
    const textControlRef = (0, import_element8.useRef)();
    const [name, setName] = (0, import_element8.useState)((0, import_html_entities3.decodeEntities)(category.name));
    const [isSaving, setIsSaving] = (0, import_element8.useState)(false);
    const [validationMessage, setValidationMessage] = (0, import_element8.useState)(false);
    const validationMessageId = validationMessage ? `patterns-rename-pattern-category-modal__validation-message-${id}` : void 0;
    const { saveEntityRecord, invalidateResolution } = (0, import_data10.useDispatch)(import_core_data8.store);
    const { createErrorNotice, createSuccessNotice } = (0, import_data10.useDispatch)(import_notices5.store);
    const onChange = (newName) => {
      if (validationMessage) {
        setValidationMessage(void 0);
      }
      setName(newName);
    };
    const onSave = async (event) => {
      event.preventDefault();
      if (isSaving) {
        return;
      }
      if (!name || name === category.name) {
        const message = (0, import_i18n8.__)("Please enter a new name for this category.");
        (0, import_a11y.speak)(message, "assertive");
        setValidationMessage(message);
        textControlRef.current?.focus();
        return;
      }
      if (existingCategories.patternCategories.find((existingCategory) => {
        return existingCategory.id !== category.id && existingCategory.label.toLowerCase() === name.toLowerCase();
      })) {
        const message = (0, import_i18n8.__)(
          "This category already exists. Please use a different name."
        );
        (0, import_a11y.speak)(message, "assertive");
        setValidationMessage(message);
        textControlRef.current?.focus();
        return;
      }
      try {
        setIsSaving(true);
        const savedRecord = await saveEntityRecord(
          "taxonomy",
          CATEGORY_SLUG,
          {
            id: category.id,
            slug: category.slug,
            name
          }
        );
        invalidateResolution("getUserPatternCategories");
        onSuccess?.(savedRecord);
        onClose();
        createSuccessNotice((0, import_i18n8.__)("Pattern category renamed."), {
          type: "snackbar",
          id: "pattern-category-update"
        });
      } catch (error) {
        onError?.();
        createErrorNotice(error.message, {
          type: "snackbar",
          id: "pattern-category-update"
        });
      } finally {
        setIsSaving(false);
        setName("");
      }
    };
    const onRequestClose = () => {
      onClose();
      setName("");
    };
    return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
      import_components7.Modal,
      {
        title: (0, import_i18n8.__)("Rename"),
        onRequestClose,
        ...props,
        children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("form", { onSubmit: onSave, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_components7.__experimentalVStack, { spacing: "5", children: [
          /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_components7.__experimentalVStack, { spacing: "2", children: [
            /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
              import_components7.TextControl,
              {
                ref: textControlRef,
                __next40pxDefaultSize: true,
                label: (0, import_i18n8.__)("Name"),
                value: name,
                onChange,
                "aria-describedby": validationMessageId,
                required: true
              }
            ),
            validationMessage && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
              "span",
              {
                className: "patterns-rename-pattern-category-modal__validation-message",
                id: validationMessageId,
                children: validationMessage
              }
            )
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_components7.__experimentalHStack, { justify: "right", children: [
            /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
              import_components7.Button,
              {
                __next40pxDefaultSize: true,
                variant: "tertiary",
                onClick: onRequestClose,
                children: (0, import_i18n8.__)("Cancel")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
              import_components7.Button,
              {
                __next40pxDefaultSize: true,
                variant: "primary",
                type: "submit",
                "aria-disabled": !name || name === category.name || isSaving,
                isBusy: isSaving,
                children: (0, import_i18n8.__)("Save")
              }
            )
          ] })
        ] }) })
      }
    );
  }

  // packages/patterns/build-module/components/pattern-overrides-controls.mjs
  var import_element10 = __toESM(require_element(), 1);
  var import_block_editor6 = __toESM(require_block_editor(), 1);
  var import_components9 = __toESM(require_components(), 1);
  var import_i18n10 = __toESM(require_i18n(), 1);

  // packages/patterns/build-module/components/allow-overrides-modal.mjs
  var import_components8 = __toESM(require_components(), 1);
  var import_i18n9 = __toESM(require_i18n(), 1);
  var import_element9 = __toESM(require_element(), 1);
  var import_a11y2 = __toESM(require_a11y(), 1);
  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
  function AllowOverridesModal({
    placeholder,
    initialName = "",
    onClose,
    onSave
  }) {
    const [editedBlockName, setEditedBlockName] = (0, import_element9.useState)(initialName);
    const descriptionId = (0, import_element9.useId)();
    const isNameValid = !!editedBlockName.trim();
    const handleSubmit = () => {
      if (editedBlockName !== initialName) {
        const message = (0, import_i18n9.sprintf)(
          /* translators: %s: new name/label for the block */
          (0, import_i18n9.__)('Block name changed to: "%s".'),
          editedBlockName
        );
        (0, import_a11y2.speak)(message, "assertive");
      }
      onSave(editedBlockName);
      onClose();
    };
    return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
      import_components8.Modal,
      {
        title: (0, import_i18n9.__)("Enable overrides"),
        onRequestClose: onClose,
        focusOnMount: "firstContentElement",
        aria: { describedby: descriptionId },
        size: "small",
        children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
          "form",
          {
            onSubmit: (event) => {
              event.preventDefault();
              if (!isNameValid) {
                return;
              }
              handleSubmit();
            },
            children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_components8.__experimentalVStack, { spacing: "6", children: [
              /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_components8.__experimentalText, { id: descriptionId, children: (0, import_i18n9.__)(
                "Overrides are changes you make to a block within a synced pattern instance. Use overrides to customize a synced pattern instance to suit its new context. Name this block to specify an override."
              ) }),
              /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
                import_components8.TextControl,
                {
                  __next40pxDefaultSize: true,
                  value: editedBlockName,
                  label: (0, import_i18n9.__)("Name"),
                  help: (0, import_i18n9.__)(
                    'For example, if you are creating a recipe pattern, you use "Recipe Title", "Recipe Description", etc.'
                  ),
                  placeholder,
                  onChange: setEditedBlockName
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_components8.__experimentalHStack, { justify: "right", children: [
                /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
                  import_components8.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "tertiary",
                    onClick: onClose,
                    children: (0, import_i18n9.__)("Cancel")
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
                  import_components8.Button,
                  {
                    __next40pxDefaultSize: true,
                    "aria-disabled": !isNameValid,
                    variant: "primary",
                    type: "submit",
                    children: (0, import_i18n9.__)("Enable")
                  }
                )
              ] })
            ] })
          }
        )
      }
    );
  }
  function DisallowOverridesModal({ onClose, onSave }) {
    const descriptionId = (0, import_element9.useId)();
    return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
      import_components8.Modal,
      {
        title: (0, import_i18n9.__)("Disable overrides"),
        onRequestClose: onClose,
        aria: { describedby: descriptionId },
        size: "small",
        children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
          "form",
          {
            onSubmit: (event) => {
              event.preventDefault();
              onSave();
              onClose();
            },
            children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_components8.__experimentalVStack, { spacing: "6", children: [
              /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_components8.__experimentalText, { id: descriptionId, children: (0, import_i18n9.__)(
                "Are you sure you want to disable overrides? Disabling overrides will revert all applied overrides for this block throughout instances of this pattern."
              ) }),
              /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_components8.__experimentalHStack, { justify: "right", children: [
                /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
                  import_components8.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "tertiary",
                    onClick: onClose,
                    children: (0, import_i18n9.__)("Cancel")
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
                  import_components8.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "primary",
                    type: "submit",
                    children: (0, import_i18n9.__)("Disable")
                  }
                )
              ] })
            ] })
          }
        )
      }
    );
  }

  // packages/patterns/build-module/components/pattern-overrides-controls.mjs
  var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
  function PatternOverridesControls({
    attributes,
    setAttributes,
    name: blockName
  }) {
    const controlId = (0, import_element10.useId)();
    const [showAllowOverridesModal, setShowAllowOverridesModal] = (0, import_element10.useState)(false);
    const [showDisallowOverridesModal, setShowDisallowOverridesModal] = (0, import_element10.useState)(false);
    const hasName = !!attributes.metadata?.name;
    const defaultBindings = attributes.metadata?.bindings?.__default;
    const hasOverrides = hasName && defaultBindings?.source === PATTERN_OVERRIDES_BINDING_SOURCE;
    const isConnectedToOtherSources = defaultBindings?.source && defaultBindings.source !== PATTERN_OVERRIDES_BINDING_SOURCE;
    const { updateBlockBindings } = (0, import_block_editor6.useBlockBindingsUtils)();
    function updateBindings(isChecked, customName) {
      if (customName) {
        setAttributes({
          metadata: {
            ...attributes.metadata,
            name: customName
          }
        });
      }
      updateBlockBindings({
        __default: isChecked ? { source: PATTERN_OVERRIDES_BINDING_SOURCE } : void 0
      });
    }
    if (isConnectedToOtherSources) {
      return null;
    }
    const hasUnsupportedImageAttributes = blockName === "core/image" && !!attributes.href?.length;
    const helpText = !hasOverrides && hasUnsupportedImageAttributes ? (0, import_i18n10.__)(
      `Overrides currently don't support image links. Remove the link first before enabling overrides.`
    ) : (0, import_i18n10.__)(
      "Allow changes to this block throughout instances of this pattern."
    );
    return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_block_editor6.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
        import_components9.BaseControl,
        {
          id: controlId,
          label: (0, import_i18n10.__)("Overrides"),
          help: helpText,
          children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
            import_components9.Button,
            {
              __next40pxDefaultSize: true,
              className: "pattern-overrides-control__allow-overrides-button",
              variant: "secondary",
              "aria-haspopup": "dialog",
              onClick: () => {
                if (hasOverrides) {
                  setShowDisallowOverridesModal(true);
                } else {
                  setShowAllowOverridesModal(true);
                }
              },
              disabled: !hasOverrides && hasUnsupportedImageAttributes,
              accessibleWhenDisabled: true,
              children: hasOverrides ? (0, import_i18n10.__)("Disable overrides") : (0, import_i18n10.__)("Enable overrides")
            }
          )
        }
      ) }),
      showAllowOverridesModal && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
        AllowOverridesModal,
        {
          initialName: attributes.metadata?.name,
          onClose: () => setShowAllowOverridesModal(false),
          onSave: (newName) => {
            updateBindings(true, newName);
          }
        }
      ),
      showDisallowOverridesModal && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
        DisallowOverridesModal,
        {
          onClose: () => setShowDisallowOverridesModal(false),
          onSave: () => updateBindings(false)
        }
      )
    ] });
  }
  var pattern_overrides_controls_default = PatternOverridesControls;

  // packages/patterns/build-module/components/reset-overrides-control.mjs
  var import_block_editor7 = __toESM(require_block_editor(), 1);
  var import_components10 = __toESM(require_components(), 1);
  var import_data11 = __toESM(require_data(), 1);
  var import_i18n11 = __toESM(require_i18n(), 1);
  var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
  var CONTENT = "content";
  function ResetOverridesControl(props) {
    const name = props.attributes.metadata?.name;
    const registry = (0, import_data11.useRegistry)();
    const isOverridden = (0, import_data11.useSelect)(
      (select) => {
        if (!name) {
          return;
        }
        const { getBlockAttributes, getBlockParentsByBlockName } = select(import_block_editor7.store);
        const [patternClientId] = getBlockParentsByBlockName(
          props.clientId,
          "core/block",
          true
        );
        if (!patternClientId) {
          return;
        }
        const overrides = getBlockAttributes(patternClientId)[CONTENT];
        if (!overrides) {
          return;
        }
        return overrides.hasOwnProperty(name);
      },
      [props.clientId, name]
    );
    function onClick() {
      const { getBlockAttributes, getBlockParentsByBlockName } = registry.select(import_block_editor7.store);
      const [patternClientId] = getBlockParentsByBlockName(
        props.clientId,
        "core/block",
        true
      );
      if (!patternClientId) {
        return;
      }
      const overrides = getBlockAttributes(patternClientId)[CONTENT];
      if (!overrides.hasOwnProperty(name)) {
        return;
      }
      const { updateBlockAttributes, __unstableMarkLastChangeAsPersistent } = registry.dispatch(import_block_editor7.store);
      __unstableMarkLastChangeAsPersistent();
      let newOverrides = { ...overrides };
      delete newOverrides[name];
      if (!Object.keys(newOverrides).length) {
        newOverrides = void 0;
      }
      updateBlockAttributes(patternClientId, {
        [CONTENT]: newOverrides
      });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_block_editor7.__unstableBlockToolbarLastItem, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_components10.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_components10.ToolbarButton, { onClick, disabled: !isOverridden, children: (0, import_i18n11.__)("Reset") }) }) });
  }

  // packages/patterns/build-module/private-apis.mjs
  var privateApis = {};
  lock(privateApis, {
    OverridesPanel,
    CreatePatternModal,
    CreatePatternModalContents,
    DuplicatePatternModal,
    isOverridableBlock,
    useDuplicatePatternProps,
    RenamePatternModal,
    PatternsMenuItems,
    RenamePatternCategoryModal,
    PatternOverridesControls: pattern_overrides_controls_default,
    ResetOverridesControl,
    useAddPatternCategory,
    PATTERN_TYPES,
    PATTERN_DEFAULT_CATEGORY,
    PATTERN_USER_CATEGORY,
    EXCLUDED_PATTERN_SOURCES,
    PATTERN_SYNC_TYPES
  });
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                    dist/patterns.min.js                                                                                0000644                 00000053145 15212564024 0010500 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;(wp||={}).patterns=(()=>{var wa=Object.create;var bt=Object.defineProperty;var ka=Object.getOwnPropertyDescriptor;var Ca=Object.getOwnPropertyNames;var xa=Object.getPrototypeOf,Ta=Object.prototype.hasOwnProperty;var k=(t,a)=>()=>(a||t((a={exports:{}}).exports,a),a.exports),jt=(t,a)=>{for(var r in a)bt(t,r,{get:a[r],enumerable:!0})},le=(t,a,r,f)=>{if(a&&typeof a=="object"||typeof a=="function")for(let o of Ca(a))!Ta.call(t,o)&&o!==r&&bt(t,o,{get:()=>a[o],enumerable:!(f=ka(a,o))||f.enumerable});return t};var e=(t,a,r)=>(r=t!=null?wa(xa(t)):{},le(a||!t||!t.__esModule?bt(r,"default",{value:t,enumerable:!0}):r,t)),Pa=t=>le(bt({},"__esModule",{value:!0}),t);var R=k((Va,fe)=>{fe.exports=window.wp.data});var _t=k((qa,de)=>{de.exports=window.wp.blocks});var q=k((Ha,ue)=>{ue.exports=window.wp.coreData});var J=k((Ga,ne)=>{ne.exports=window.wp.blockEditor});var be=k((Qa,ye)=>{ye.exports=window.wp.privateApis});var M=k((ar,Se)=>{Se.exports=window.wp.components});var I=k((rr,we)=>{we.exports=window.wp.element});var B=k((or,ke)=>{ke.exports=window.wp.i18n});var C=k((lr,Ce)=>{Ce.exports=window.ReactJSXRuntime});var ft=k((dr,Re)=>{Re.exports=window.wp.notices});var De=k((ur,Be)=>{Be.exports=window.wp.compose});var Tt=k((nr,Ne)=>{Ne.exports=window.wp.htmlEntities});var $e=k((Tr,Qe)=>{Qe.exports=window.wp.primitives});var aa=k((Mr,ea)=>{ea.exports=window.wp.url});var te=k((Yr,ma)=>{ma.exports=window.wp.a11y});var za={};jt(za,{privateApis:()=>va,store:()=>L});var Ct=e(R(),1);var ie=e(R(),1);function Ea(t={},a){return a?.type==="SET_EDITING_PATTERN"?{...t,[a.clientId]:a.isEditing}:t}var me=(0,ie.combineReducers)({isEditingPattern:Ea});var zt={};jt(zt,{convertSyncedPatternToStatic:()=>Da,createPattern:()=>Ra,createPatternFromFile:()=>Ba,setEditingPattern:()=>Na});var kt=e(_t(),1),he=e(q(),1),wt=e(J(),1);var et={theme:"pattern",user:"wp_block"},vt="all-patterns",pe="my-patterns",ce=["core","pattern-directory/core","pattern-directory/featured"],S={full:"fully",unsynced:"unsynced"},St="core/pattern-overrides";var Ra=(t,a,r,f)=>async({registry:o})=>{let d=a===S.unsynced?{wp_pattern_sync_status:a}:void 0,i={title:t,content:r,status:"publish",meta:d,wp_pattern_category:f};return await o.dispatch(he.store).saveEntityRecord("postType","wp_block",i)},Ba=(t,a)=>async({dispatch:r})=>{let f=await t.text(),o;try{o=JSON.parse(f)}catch{throw new Error("Invalid JSON file")}if(o.__file!=="wp_block"||!o.title||!o.content||typeof o.title!="string"||typeof o.content!="string"||o.syncStatus&&typeof o.syncStatus!="string")throw new Error("Invalid pattern JSON file");return await r.createPattern(o.title,o.syncStatus,o.content,a)},Da=t=>({registry:a})=>{let r=a.select(wt.store).getBlock(t),f=r.attributes?.content;function o(i){return i.map(s=>{let l=s.attributes.metadata;if(l&&(l={...l},delete l.id,delete l.bindings,f?.[l.name]))for(let[m,n]of Object.entries(f[l.name]))(0,kt.getBlockType)(s.name)?.attributes[m]&&(s.attributes[m]=n);return(0,kt.cloneBlock)(s,{metadata:l&&Object.keys(l).length>0?l:void 0},o(s.innerBlocks))})}let d=a.select(wt.store).getBlocks(r.clientId);a.dispatch(wt.store).replaceBlocks(r.clientId,o(d))};function Na(t,a){return{type:"SET_EDITING_PATTERN",clientId:t,isEditing:a}}var ge="core/patterns";var Ft={};jt(Ft,{isEditingPattern:()=>Aa});function Aa(t,a){return t.isEditingPattern[a]}var _e=e(be(),1),{lock:ve,unlock:O}=(0,_e.__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/patterns");var Oa={reducer:me},L=(0,Ct.createReduxStore)(ge,{...Oa});(0,Ct.register)(L);O(L).registerPrivateActions(zt);O(L).registerPrivateSelectors(Ft);var lt=e(J(),1),xe=e(M(),1),Vt=e(R(),1),Te=e(I(),1),Pe=e(B(),1);function xt(t){return!!t.attributes.metadata?.name&&!!t.attributes.metadata?.bindings&&Object.values(t.attributes.metadata.bindings).some(a=>a.source==="core/pattern-overrides")}var Yt=e(C(),1),{BlockQuickNavigation:La}=O(lt.privateApis);function Ee(){let{allClientIds:t,supportedBlockTypesRaw:a}=(0,Vt.useSelect)(o=>({allClientIds:o(lt.store).getClientIdsWithDescendants(),supportedBlockTypesRaw:o(lt.store).getSettings()?.__experimentalBlockBindingsSupportedAttributes}),[]),{getBlock:r}=(0,Vt.useSelect)(lt.store),f=(0,Te.useMemo)(()=>{let o=Object.keys(a??{});return t.filter(d=>{let i=r(d);return o.includes(i.name)&&xt(i)})},[t,r,a]);return f?.length?(0,Yt.jsx)(xe.PanelBody,{title:(0,Pe.__)("Overrides"),children:(0,Yt.jsx)(La,{clientIds:f})}):null}var P=e(M(),1),X=e(B(),1),ut=e(I(),1),nt=e(R(),1),ze=e(ft(),1),Fe=e(q(),1);var Ae=e(B(),1),Pt=e(I(),1),Oe=e(M(),1),Le=e(De(),1),Me=e(Tt(),1),Ie=e(C(),1),Ma=t=>(0,Me.decodeEntities)(t),Et="wp_pattern_category";function Ue({categoryTerms:t,onChange:a,categoryMap:r}){let[f,o]=(0,Pt.useState)(""),d=(0,Le.useDebounce)(o,500),i=(0,Pt.useMemo)(()=>Array.from(r.values()).map(l=>Ma(l.label)).filter(l=>f!==""?l.toLowerCase().includes(f.toLowerCase()):!0).sort((l,m)=>l.localeCompare(m)),[f,r]);function s(l){let m=l.reduce((n,p)=>(n.some(h=>h.toLowerCase()===p.toLowerCase())||n.push(p),n),[]);a(m)}return(0,Ie.jsx)(Oe.FormTokenField,{className:"patterns-menu-items__convert-modal-categories",value:t,suggestions:i,onChange:s,onInputChange:d,label:(0,Ae.__)("Categories"),tokenizeOnBlur:!0,__experimentalExpandOnFocus:!0,__next40pxDefaultSize:!0})}var Rt=e(R(),1),qt=e(q(),1),je=e(I(),1);function Bt(){let{saveEntityRecord:t,invalidateResolution:a}=(0,Rt.useDispatch)(qt.store),{corePatternCategories:r,userPatternCategories:f}=(0,Rt.useSelect)(i=>{let{getUserPatternCategories:s,getBlockPatternCategories:l}=i(qt.store);return{corePatternCategories:l(),userPatternCategories:s()}},[]),o=(0,je.useMemo)(()=>{let i=new Map;return f.forEach(s=>{i.set(s.label.toLowerCase(),{label:s.label,name:s.name,id:s.id})}),r.forEach(s=>{!i.has(s.label.toLowerCase())&&s.name!=="query"&&i.set(s.label.toLowerCase(),{label:s.label,name:s.name})}),i},[f,r]);async function d(i){try{let s=o.get(i.toLowerCase());if(s?.id)return s.id;let l=s?{name:s.label,slug:s.name}:{name:i},m=await t("taxonomy",Et,l,{throwOnError:!0});return a("getUserPatternCategories"),m.id}catch(s){if(s.code!=="term_exists")throw s;return s.data.term_id}}return{categoryMap:o,findOrCreateTerm:d}}var D=e(C(),1);function it({className:t="patterns-menu-items__convert-modal",modalTitle:a,...r}){let f=(0,nt.useSelect)(o=>o(Fe.store).getPostType(et.user)?.labels?.add_new_item,[]);return(0,D.jsx)(P.Modal,{title:a||f,onRequestClose:r.onClose,overlayClassName:t,focusOnMount:"firstContentElement",size:"small",children:(0,D.jsx)(Ht,{...r})})}function Ht({confirmLabel:t=(0,X.__)("Add"),defaultCategories:a=[],content:r,onClose:f,onError:o,onSuccess:d,defaultSyncType:i=S.full,defaultTitle:s=""}){let[l,m]=(0,ut.useState)(i),[n,p]=(0,ut.useState)(a),[h,_]=(0,ut.useState)(s),[u,c]=(0,ut.useState)(!1),{createPattern:T}=O((0,nt.useDispatch)(L)),{createErrorNotice:v}=(0,nt.useDispatch)(ze.store),{categoryMap:z,findOrCreateTerm:A}=Bt();async function w(E,tt){if(!(!h||u))try{c(!0);let y=await Promise.all(n.map(W=>A(W))),oe=await T(E,tt,typeof r=="function"?r():r,y);d({pattern:oe,categoryId:vt})}catch(y){v(y.message,{type:"snackbar",id:"pattern-create"}),o?.()}finally{c(!1),p([]),_("")}}return(0,D.jsx)("form",{onSubmit:E=>{E.preventDefault(),w(h,l)},children:(0,D.jsxs)(P.__experimentalVStack,{spacing:"5",children:[(0,D.jsx)(P.TextControl,{label:(0,X.__)("Name"),value:h,onChange:_,placeholder:(0,X.__)("My pattern"),className:"patterns-create-modal__name-input",__next40pxDefaultSize:!0}),(0,D.jsx)(Ue,{categoryTerms:n,onChange:p,categoryMap:z}),(0,D.jsx)(P.ToggleControl,{label:(0,X._x)("Synced","pattern (singular)"),help:(0,X.__)("Sync this pattern across multiple locations."),checked:l===S.full,onChange:()=>{m(l===S.full?S.unsynced:S.full)}}),(0,D.jsxs)(P.__experimentalHStack,{justify:"right",children:[(0,D.jsx)(P.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{f(),_("")},children:(0,X.__)("Cancel")}),(0,D.jsx)(P.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!h||u,isBusy:u,children:t})]})]})})}var Ve=e(q(),1),Dt=e(R(),1),H=e(B(),1),Ye=e(ft(),1);var qe=e(C(),1);function Ia(t,a){return t.type!==et.user?a.core?.filter(r=>t.categories?.includes(r.name)).map(r=>r.label):a.user?.filter(r=>t.wp_pattern_category?.includes(r.id)).map(r=>r.label)}function Gt({pattern:t,onSuccess:a}){let{createSuccessNotice:r}=(0,Dt.useDispatch)(Ye.store),f=(0,Dt.useSelect)(o=>{let{getUserPatternCategories:d,getBlockPatternCategories:i}=o(Ve.store);return{core:i(),user:d()}});return t?{content:t.content,defaultCategories:Ia(t,f),defaultSyncType:t.type!==et.user?S.unsynced:t.wp_pattern_sync_status||S.full,defaultTitle:(0,H.sprintf)((0,H._x)("%s (Copy)","pattern"),typeof t.title=="string"?t.title:t.title.raw),onSuccess:({pattern:o})=>{r((0,H.sprintf)((0,H._x)('"%s" duplicated.',"pattern"),o.title.raw),{type:"snackbar",id:"patterns-create"}),a?.({pattern:o})}}:null}function He({pattern:t,onClose:a,onSuccess:r}){let f=Gt({pattern:t,onSuccess:r});return t?(0,qe.jsx)(it,{modalTitle:(0,H.__)("Duplicate pattern"),confirmLabel:(0,H.__)("Duplicate"),onClose:a,onError:a,...f}):null}var U=e(M(),1),Ge=e(q(),1),Wt=e(R(),1),Jt=e(I(),1),We=e(Tt(),1),at=e(B(),1),Je=e(ft(),1),G=e(C(),1);function Xe({onClose:t,onError:a,onSuccess:r,pattern:f,...o}){let d=(0,We.decodeEntities)(f.title),[i,s]=(0,Jt.useState)(d),[l,m]=(0,Jt.useState)(!1),{editEntityRecord:n,__experimentalSaveSpecifiedEntityEdits:p}=(0,Wt.useDispatch)(Ge.store),{createSuccessNotice:h,createErrorNotice:_}=(0,Wt.useDispatch)(Je.store),u=async T=>{if(T.preventDefault(),!(!i||i===f.title||l))try{await n("postType",f.type,f.id,{title:i}),m(!0),s(""),t?.();let v=await p("postType",f.type,f.id,["title"],{throwOnError:!0});r?.(v),h((0,at.__)("Pattern renamed"),{type:"snackbar",id:"pattern-update"})}catch(v){a?.();let z=v.message&&v.code!=="unknown_error"?v.message:(0,at.__)("An error occurred while renaming the pattern.");_(z,{type:"snackbar",id:"pattern-update"})}finally{m(!1),s("")}},c=()=>{t?.(),s("")};return(0,G.jsx)(U.Modal,{title:(0,at.__)("Rename"),...o,onRequestClose:t,focusOnMount:"firstContentElement",size:"small",children:(0,G.jsx)("form",{onSubmit:u,children:(0,G.jsxs)(U.__experimentalVStack,{spacing:"5",children:[(0,G.jsx)(U.TextControl,{__next40pxDefaultSize:!0,label:(0,at.__)("Name"),value:i,onChange:s,required:!0}),(0,G.jsxs)(U.__experimentalHStack,{justify:"right",children:[(0,G.jsx)(U.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:c,children:(0,at.__)("Cancel")}),(0,G.jsx)(U.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,at.__)("Save")})]})]})})})}var fa=e(J(),1);var F=e(_t(),1),pt=e(J(),1),At=e(I(),1),Ke=e(M(),1);var Nt=e($e(),1),Xt=e(C(),1),Qt=(0,Xt.jsx)(Nt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Xt.jsx)(Nt.Path,{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"})});var Q=e(R(),1),$t=e(q(),1),rt=e(B(),1),Ze=e(ft(),1);var ot=e(C(),1);function ta({clientIds:t,rootClientId:a,closeBlockSettingsMenu:r}){let{createSuccessNotice:f}=(0,Q.useDispatch)(Ze.store),{replaceBlocks:o,updateBlockAttributes:d}=(0,Q.useDispatch)(pt.store),{setEditingPattern:i}=O((0,Q.useDispatch)(L)),[s,l]=(0,At.useState)(!1),{getBlockAttributes:m}=(0,Q.useSelect)(pt.store),n=(0,Q.useSelect)(u=>{let{canUser:c}=u($t.store),{getBlocksByClientId:T,canInsertBlockType:v,getBlockRootClientId:z}=u(pt.store),A=a||(t.length>0?z(t[0]):void 0),w=T(t)??[],E=W=>{let se=(0,F.getBlockType)(W),Sa=se&&"parent"in se;return(0,F.hasBlockSupport)(W,"reusable",!Sa)},tt=w.length===1&&w[0]&&(0,F.isReusableBlock)(w[0])&&!!u($t.store).getEntityRecord("postType","wp_block",w[0].attributes.ref);return!(w.length===1&&w?.[0]?.attributes?.metadata?.patternName)&&!tt&&v("core/block",A)&&w.every(W=>!!W&&W.isValid&&E(W.name))&&!!c("create",{kind:"postType",name:"wp_block"})},[t,a]),{getBlocksByClientId:p}=(0,Q.useSelect)(pt.store),h=(0,At.useCallback)(()=>(0,F.serialize)(p(t)),[p,t]);if(!n)return null;let _=({pattern:u})=>{if(u.wp_pattern_sync_status===S.unsynced){if(t?.length===1){let c=m(t[0]);d(t[0],{metadata:{...c?.metadata?c.metadata:{},patternName:`core/block/${u.id}`,name:u.title.raw}})}}else{let c=(0,F.createBlock)("core/block",{ref:u.id});o(t,c),i(c.clientId,!0)}f(u.wp_pattern_sync_status===S.unsynced?(0,rt.sprintf)((0,rt.__)("Unsynced pattern created: %s"),u.title.raw):(0,rt.sprintf)((0,rt.__)("Synced pattern created: %s"),u.title.raw),{type:"snackbar",id:"convert-to-pattern-success"}),l(!1),r()};return(0,ot.jsxs)(ot.Fragment,{children:[(0,ot.jsx)(Ke.MenuItem,{icon:Qt,onClick:()=>l(!0),"aria-expanded":s,"aria-haspopup":"dialog",children:(0,rt.__)("Create pattern")}),s&&(0,ot.jsx)(it,{content:h,onSuccess:u=>{_(u)},onError:()=>{l(!1)},onClose:()=>{l(!1),r()}})]})}var ct=e(M(),1),st=e(B(),1),ra=e(_t(),1),ht=e(R(),1),oa=e(I(),1),Kt=e(J(),1),Zt=e(aa(),1),sa=e(q(),1);var V=e(C(),1);function Ua({clientId:t,onClose:a}){let[r,f]=(0,oa.useState)(!1),{attributes:o,canDetach:d,isVisible:i,managePatternsUrl:s,isSyncedPattern:l,isUnsyncedPattern:m,canEdit:n}=(0,ht.useSelect)(u=>{let{canRemoveBlock:c,getBlock:T,canEditBlock:v}=u(Kt.store),{canUser:z}=u(sa.store),A=T(t),w=!!A?.attributes?.metadata?.patternName,E=!!A&&(0,ra.isReusableBlock)(A)&&!!z("update",{kind:"postType",name:"wp_block",id:A.attributes.ref});return{attributes:A.attributes,canEdit:v(t),canDetach:w||E&&c(t),isUnsyncedPattern:w,isSyncedPattern:E,isVisible:w||E,managePatternsUrl:z("create",{kind:"postType",name:"wp_template"})?(0,Zt.addQueryArgs)("site-editor.php",{p:"/pattern"}):(0,Zt.addQueryArgs)("edit.php",{post_type:"wp_block"})}},[t]),{updateBlockAttributes:p}=(0,ht.useDispatch)(Kt.store),{convertSyncedPatternToStatic:h}=O((0,ht.useDispatch)(L));if(!i||!n)return null;let _=()=>{if(l&&h(t),m){let{patternName:u,...c}=o?.metadata??{};p(t,{metadata:c})}a?.(),f(!1)};return(0,V.jsxs)(V.Fragment,{children:[d&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(ct.MenuItem,{onClick:()=>f(!0),children:(0,st.__)("Detach")}),(0,V.jsx)(ct.__experimentalConfirmDialog,{isOpen:r,onConfirm:_,onCancel:()=>f(!1),confirmButtonText:(0,st.__)("Detach"),size:"medium",title:(0,st.__)("Detach pattern?"),__experimentalHideHeader:!1,children:l?(0,st.__)("The blocks will be separated from the original pattern and will be fully editable. Future changes to the pattern will not apply here."):(0,st.__)("Blocks will no longer be associated with this pattern and will be fully editable.")})]}),(0,V.jsx)(ct.MenuItem,{href:s,children:(0,st.__)("Manage patterns")})]})}var la=Ua;var $=e(C(),1);function ia({rootClientId:t}){return(0,$.jsx)(fa.BlockSettingsMenuControls,{children:({selectedClientIds:a,onClose:r})=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ta,{clientIds:a,rootClientId:t,closeBlockSettingsMenu:r}),a.length===1&&(0,$.jsx)(la,{clientId:a[0],onClose:r})]})})}var N=e(M(),1),da=e(q(),1),ee=e(R(),1),Z=e(I(),1),ua=e(Tt(),1),K=e(B(),1),na=e(ft(),1),ae=e(te(),1);var j=e(C(),1);function pa({category:t,existingCategories:a,onClose:r,onError:f,onSuccess:o,...d}){let i=(0,Z.useId)(),s=(0,Z.useRef)(),[l,m]=(0,Z.useState)((0,ua.decodeEntities)(t.name)),[n,p]=(0,Z.useState)(!1),[h,_]=(0,Z.useState)(!1),u=h?`patterns-rename-pattern-category-modal__validation-message-${i}`:void 0,{saveEntityRecord:c,invalidateResolution:T}=(0,ee.useDispatch)(da.store),{createErrorNotice:v,createSuccessNotice:z}=(0,ee.useDispatch)(na.store),A=tt=>{h&&_(void 0),m(tt)},w=async tt=>{if(tt.preventDefault(),!n){if(!l||l===t.name){let y=(0,K.__)("Please enter a new name for this category.");(0,ae.speak)(y,"assertive"),_(y),s.current?.focus();return}if(a.patternCategories.find(y=>y.id!==t.id&&y.label.toLowerCase()===l.toLowerCase())){let y=(0,K.__)("This category already exists. Please use a different name.");(0,ae.speak)(y,"assertive"),_(y),s.current?.focus();return}try{p(!0);let y=await c("taxonomy",Et,{id:t.id,slug:t.slug,name:l});T("getUserPatternCategories"),o?.(y),r(),z((0,K.__)("Pattern category renamed."),{type:"snackbar",id:"pattern-category-update"})}catch(y){f?.(),v(y.message,{type:"snackbar",id:"pattern-category-update"})}finally{p(!1),m("")}}},E=()=>{r(),m("")};return(0,j.jsx)(N.Modal,{title:(0,K.__)("Rename"),onRequestClose:E,...d,children:(0,j.jsx)("form",{onSubmit:w,children:(0,j.jsxs)(N.__experimentalVStack,{spacing:"5",children:[(0,j.jsxs)(N.__experimentalVStack,{spacing:"2",children:[(0,j.jsx)(N.TextControl,{ref:s,__next40pxDefaultSize:!0,label:(0,K.__)("Name"),value:l,onChange:A,"aria-describedby":u,required:!0}),h&&(0,j.jsx)("span",{className:"patterns-rename-pattern-category-modal__validation-message",id:u,children:h})]}),(0,j.jsxs)(N.__experimentalHStack,{justify:"right",children:[(0,j.jsx)(N.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:E,children:(0,K.__)("Cancel")}),(0,j.jsx)(N.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!l||l===t.name||n,isBusy:n,children:(0,K.__)("Save")})]})]})})})}var yt=e(I(),1),Ot=e(J(),1),Lt=e(M(),1),mt=e(B(),1);var g=e(M(),1),x=e(B(),1),gt=e(I(),1),ca=e(te(),1),b=e(C(),1);function ha({placeholder:t,initialName:a="",onClose:r,onSave:f}){let[o,d]=(0,gt.useState)(a),i=(0,gt.useId)(),s=!!o.trim(),l=()=>{if(o!==a){let m=(0,x.sprintf)((0,x.__)('Block name changed to: "%s".'),o);(0,ca.speak)(m,"assertive")}f(o),r()};return(0,b.jsx)(g.Modal,{title:(0,x.__)("Enable overrides"),onRequestClose:r,focusOnMount:"firstContentElement",aria:{describedby:i},size:"small",children:(0,b.jsx)("form",{onSubmit:m=>{m.preventDefault(),s&&l()},children:(0,b.jsxs)(g.__experimentalVStack,{spacing:"6",children:[(0,b.jsx)(g.__experimentalText,{id:i,children:(0,x.__)("Overrides are changes you make to a block within a synced pattern instance. Use overrides to customize a synced pattern instance to suit its new context. Name this block to specify an override.")}),(0,b.jsx)(g.TextControl,{__next40pxDefaultSize:!0,value:o,label:(0,x.__)("Name"),help:(0,x.__)('For example, if you are creating a recipe pattern, you use "Recipe Title", "Recipe Description", etc.'),placeholder:t,onChange:d}),(0,b.jsxs)(g.__experimentalHStack,{justify:"right",children:[(0,b.jsx)(g.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:r,children:(0,x.__)("Cancel")}),(0,b.jsx)(g.Button,{__next40pxDefaultSize:!0,"aria-disabled":!s,variant:"primary",type:"submit",children:(0,x.__)("Enable")})]})]})})})}function ga({onClose:t,onSave:a}){let r=(0,gt.useId)();return(0,b.jsx)(g.Modal,{title:(0,x.__)("Disable overrides"),onRequestClose:t,aria:{describedby:r},size:"small",children:(0,b.jsx)("form",{onSubmit:f=>{f.preventDefault(),a(),t()},children:(0,b.jsxs)(g.__experimentalVStack,{spacing:"6",children:[(0,b.jsx)(g.__experimentalText,{id:r,children:(0,x.__)("Are you sure you want to disable overrides? Disabling overrides will revert all applied overrides for this block throughout instances of this pattern.")}),(0,b.jsxs)(g.__experimentalHStack,{justify:"right",children:[(0,b.jsx)(g.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,x.__)("Cancel")}),(0,b.jsx)(g.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,x.__)("Disable")})]})]})})})}var Y=e(C(),1);function ja({attributes:t,setAttributes:a,name:r}){let f=(0,yt.useId)(),[o,d]=(0,yt.useState)(!1),[i,s]=(0,yt.useState)(!1),l=!!t.metadata?.name,m=t.metadata?.bindings?.__default,n=l&&m?.source===St,p=m?.source&&m.source!==St,{updateBlockBindings:h}=(0,Ot.useBlockBindingsUtils)();function _(T,v){v&&a({metadata:{...t.metadata,name:v}}),h({__default:T?{source:St}:void 0})}if(p)return null;let u=r==="core/image"&&!!t.href?.length,c=!n&&u?(0,mt.__)("Overrides currently don't support image links. Remove the link first before enabling overrides."):(0,mt.__)("Allow changes to this block throughout instances of this pattern.");return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Ot.InspectorControls,{group:"advanced",children:(0,Y.jsx)(Lt.BaseControl,{id:f,label:(0,mt.__)("Overrides"),help:c,children:(0,Y.jsx)(Lt.Button,{__next40pxDefaultSize:!0,className:"pattern-overrides-control__allow-overrides-button",variant:"secondary","aria-haspopup":"dialog",onClick:()=>{n?s(!0):d(!0)},disabled:!n&&u,accessibleWhenDisabled:!0,children:n?(0,mt.__)("Disable overrides"):(0,mt.__)("Enable overrides")})})}),o&&(0,Y.jsx)(ha,{initialName:t.metadata?.name,onClose:()=>d(!1),onSave:T=>{_(!0,T)}}),i&&(0,Y.jsx)(ga,{onClose:()=>s(!1),onSave:()=>_(!1)})]})}var ya=ja;var dt=e(J(),1),It=e(M(),1),Ut=e(R(),1),ba=e(B(),1),Mt=e(C(),1),re="content";function _a(t){let a=t.attributes.metadata?.name,r=(0,Ut.useRegistry)(),f=(0,Ut.useSelect)(d=>{if(!a)return;let{getBlockAttributes:i,getBlockParentsByBlockName:s}=d(dt.store),[l]=s(t.clientId,"core/block",!0);if(!l)return;let m=i(l)[re];if(m)return m.hasOwnProperty(a)},[t.clientId,a]);function o(){let{getBlockAttributes:d,getBlockParentsByBlockName:i}=r.select(dt.store),[s]=i(t.clientId,"core/block",!0);if(!s)return;let l=d(s)[re];if(!l.hasOwnProperty(a))return;let{updateBlockAttributes:m,__unstableMarkLastChangeAsPersistent:n}=r.dispatch(dt.store);n();let p={...l};delete p[a],Object.keys(p).length||(p=void 0),m(s,{[re]:p})}return(0,Mt.jsx)(dt.__unstableBlockToolbarLastItem,{children:(0,Mt.jsx)(It.ToolbarGroup,{children:(0,Mt.jsx)(It.ToolbarButton,{onClick:o,disabled:!f,children:(0,ba.__)("Reset")})})})}var va={};ve(va,{OverridesPanel:Ee,CreatePatternModal:it,CreatePatternModalContents:Ht,DuplicatePatternModal:He,isOverridableBlock:xt,useDuplicatePatternProps:Gt,RenamePatternModal:Xe,PatternsMenuItems:ia,RenamePatternCategoryModal:pa,PatternOverridesControls:ya,ResetOverridesControl:_a,useAddPatternCategory:Bt,PATTERN_TYPES:et,PATTERN_DEFAULT_CATEGORY:vt,PATTERN_USER_CATEGORY:pe,EXCLUDED_PATTERN_SOURCES:ce,PATTERN_SYNC_TYPES:S});return Pa(za);})();
                                                                                                                                                                                                                                                                                                                                                                                                                           dist/plugins.js                                                                                     0000644                 00000027257 15212564024 0007544 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).plugins = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/hooks
  var require_hooks = __commonJS({
    "package-external:@wordpress/hooks"(exports, module) {
      module.exports = window.wp.hooks;
    }
  });

  // package-external:@wordpress/is-shallow-equal
  var require_is_shallow_equal = __commonJS({
    "package-external:@wordpress/is-shallow-equal"(exports, module) {
      module.exports = window.wp.isShallowEqual;
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // package-external:@wordpress/deprecated
  var require_deprecated = __commonJS({
    "package-external:@wordpress/deprecated"(exports, module) {
      module.exports = window.wp.deprecated;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // package-external:@wordpress/primitives
  var require_primitives = __commonJS({
    "package-external:@wordpress/primitives"(exports, module) {
      module.exports = window.wp.primitives;
    }
  });

  // packages/plugins/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    PluginArea: () => plugin_area_default,
    getPlugin: () => getPlugin,
    getPlugins: () => getPlugins,
    registerPlugin: () => registerPlugin,
    unregisterPlugin: () => unregisterPlugin,
    usePluginContext: () => usePluginContext,
    withPluginContext: () => withPluginContext
  });

  // node_modules/memize/dist/index.js
  function memize(fn, options) {
    var size = 0;
    var head;
    var tail;
    options = options || {};
    function memoized() {
      var node = head, len = arguments.length, args, i;
      searchCache: while (node) {
        if (node.args.length !== arguments.length) {
          node = node.next;
          continue;
        }
        for (i = 0; i < len; i++) {
          if (node.args[i] !== arguments[i]) {
            node = node.next;
            continue searchCache;
          }
        }
        if (node !== head) {
          if (node === tail) {
            tail = node.prev;
          }
          node.prev.next = node.next;
          if (node.next) {
            node.next.prev = node.prev;
          }
          node.next = head;
          node.prev = null;
          head.prev = node;
          head = node;
        }
        return node.val;
      }
      args = new Array(len);
      for (i = 0; i < len; i++) {
        args[i] = arguments[i];
      }
      node = {
        args,
        // Generate the result from original function
        val: fn.apply(null, args)
      };
      if (head) {
        head.prev = node;
        node.next = head;
      } else {
        tail = node;
      }
      if (size === /** @type {MemizeOptions} */
      options.maxSize) {
        tail = /** @type {MemizeCacheNode} */
        tail.prev;
        tail.next = null;
      } else {
        size++;
      }
      head = node;
      return node.val;
    }
    memoized.clear = function() {
      head = null;
      tail = null;
      size = 0;
    };
    return memoized;
  }

  // packages/plugins/build-module/components/plugin-area/index.mjs
  var import_element3 = __toESM(require_element(), 1);
  var import_hooks2 = __toESM(require_hooks(), 1);
  var import_is_shallow_equal = __toESM(require_is_shallow_equal(), 1);

  // packages/plugins/build-module/components/plugin-context/index.mjs
  var import_element = __toESM(require_element(), 1);
  var import_compose = __toESM(require_compose(), 1);
  var import_deprecated = __toESM(require_deprecated(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  var Context = (0, import_element.createContext)({
    name: null,
    icon: null
  });
  Context.displayName = "PluginContext";
  var PluginContextProvider = Context.Provider;
  function usePluginContext() {
    return (0, import_element.useContext)(Context);
  }
  var withPluginContext = (mapContextToProps) => (0, import_compose.createHigherOrderComponent)((OriginalComponent) => {
    (0, import_deprecated.default)("wp.plugins.withPluginContext", {
      since: "6.8.0",
      alternative: "wp.plugins.usePluginContext"
    });
    return (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Consumer, { children: (context) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
      OriginalComponent,
      {
        ...props,
        ...mapContextToProps(context, props)
      }
    ) });
  }, "withPluginContext");

  // packages/plugins/build-module/components/plugin-error-boundary/index.mjs
  var import_element2 = __toESM(require_element(), 1);
  var PluginErrorBoundary = class extends import_element2.Component {
    constructor(props) {
      super(props);
      this.state = {
        hasError: false
      };
    }
    static getDerivedStateFromError() {
      return { hasError: true };
    }
    componentDidCatch(error) {
      const { name, onError } = this.props;
      if (onError) {
        onError(name, error);
      }
    }
    render() {
      if (!this.state.hasError) {
        return this.props.children;
      }
      return null;
    }
  };

  // packages/plugins/build-module/api/index.mjs
  var import_hooks = __toESM(require_hooks(), 1);

  // packages/icons/build-module/library/plugins.mjs
  var import_primitives = __toESM(require_primitives(), 1);
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  var plugins_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives.Path, { 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" }) });

  // packages/plugins/build-module/api/index.mjs
  var plugins = {};
  function registerPlugin(name, settings) {
    if (typeof settings !== "object") {
      console.error("No settings object provided!");
      return null;
    }
    if (typeof name !== "string") {
      console.error("Plugin name must be string.");
      return null;
    }
    if (!/^[a-z][a-z0-9-]*$/.test(name)) {
      console.error(
        'Plugin name must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-plugin".'
      );
      return null;
    }
    if (plugins[name]) {
      console.error(`Plugin "${name}" is already registered.`);
    }
    settings = (0, import_hooks.applyFilters)(
      "plugins.registerPlugin",
      settings,
      name
    );
    const { render, scope } = settings;
    if (typeof render !== "function") {
      console.error(
        'The "render" property must be specified and must be a valid function.'
      );
      return null;
    }
    if (scope) {
      if (typeof scope !== "string") {
        console.error("Plugin scope must be string.");
        return null;
      }
      if (!/^[a-z][a-z0-9-]*$/.test(scope)) {
        console.error(
          'Plugin scope must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-page".'
        );
        return null;
      }
    }
    plugins[name] = {
      name,
      icon: plugins_default,
      ...settings
    };
    (0, import_hooks.doAction)("plugins.pluginRegistered", settings, name);
    return settings;
  }
  function unregisterPlugin(name) {
    if (!plugins[name]) {
      console.error('Plugin "' + name + '" is not registered.');
      return;
    }
    const oldPlugin = plugins[name];
    delete plugins[name];
    (0, import_hooks.doAction)("plugins.pluginUnregistered", oldPlugin, name);
    return oldPlugin;
  }
  function getPlugin(name) {
    return plugins[name];
  }
  function getPlugins(scope) {
    return Object.values(plugins).filter(
      (plugin) => plugin.scope === scope
    );
  }

  // packages/plugins/build-module/components/plugin-area/index.mjs
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
  var getPluginContext = memize(
    (icon, name) => ({
      icon,
      name
    })
  );
  function PluginArea({
    scope,
    onError
  }) {
    const store = (0, import_element3.useMemo)(() => {
      let lastValue = [];
      return {
        subscribe(listener) {
          (0, import_hooks2.addAction)(
            "plugins.pluginRegistered",
            "core/plugins/plugin-area/plugins-registered",
            listener
          );
          (0, import_hooks2.addAction)(
            "plugins.pluginUnregistered",
            "core/plugins/plugin-area/plugins-unregistered",
            listener
          );
          return () => {
            (0, import_hooks2.removeAction)(
              "plugins.pluginRegistered",
              "core/plugins/plugin-area/plugins-registered"
            );
            (0, import_hooks2.removeAction)(
              "plugins.pluginUnregistered",
              "core/plugins/plugin-area/plugins-unregistered"
            );
          };
        },
        getValue() {
          const nextValue = getPlugins(scope);
          if (!(0, import_is_shallow_equal.isShallowEqual)(lastValue, nextValue)) {
            lastValue = nextValue;
          }
          return lastValue;
        }
      };
    }, [scope]);
    const plugins2 = (0, import_element3.useSyncExternalStore)(
      store.subscribe,
      store.getValue,
      store.getValue
    );
    return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: { display: "none" }, children: plugins2.map(({ icon, name, render: Plugin }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
      PluginContextProvider,
      {
        value: getPluginContext(icon, name),
        children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PluginErrorBoundary, { name, onError, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Plugin, {}) })
      },
      name
    )) });
  }
  var plugin_area_default = PluginArea;
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                                                 dist/plugins.min.js                                                                                 0000644                 00000011343 15212564024 0010313 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).plugins=(()=>{var K=Object.create;var g=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames;var Z=Object.getPrototypeOf,aa=Object.prototype.hasOwnProperty;var d=(a,t)=>()=>(t||a((t={exports:{}}).exports,t),t.exports),ta=(a,t)=>{for(var r in t)g(a,r,{get:t[r],enumerable:!0})},B=(a,t,r,f)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Y(t))!aa.call(a,o)&&o!==r&&g(a,o,{get:()=>t[o],enumerable:!(f=Q(t,o))||f.enumerable});return a};var s=(a,t,r)=>(r=a!=null?K(Z(a)):{},B(t||!a||!a.__esModule?g(r,"default",{value:a,enumerable:!0}):r,a)),ea=a=>B(g({},"__esModule",{value:!0}),a);var h=d((ia,T)=>{T.exports=window.wp.element});var P=d((pa,A)=>{A.exports=window.wp.hooks});var z=d((na,V)=>{V.exports=window.wp.isShallowEqual});var j=d((ca,E)=>{E.exports=window.wp.compose});var F=d((ga,U)=>{U.exports=window.wp.deprecated});var v=d((ha,H)=>{H.exports=window.ReactJSXRuntime});var W=d((ba,J)=>{J.exports=window.wp.primitives});var ua={};ta(ua,{PluginArea:()=>X,getPlugin:()=>oa,getPlugins:()=>S,registerPlugin:()=>ra,unregisterPlugin:()=>fa,usePluginContext:()=>O,withPluginContext:()=>M});function D(a,t){var r=0,f,o;t=t||{};function l(){var e=f,C=arguments.length,c,u;a:for(;e;){if(e.args.length!==arguments.length){e=e.next;continue}for(u=0;u<C;u++)if(e.args[u]!==arguments[u]){e=e.next;continue a}return e!==f&&(e===o&&(o=e.prev),e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.next=f,e.prev=null,f.prev=e,f=e),e.val}for(c=new Array(C),u=0;u<C;u++)c[u]=arguments[u];return e={args:c,val:a.apply(null,c)},f?(f.prev=e,e.next=f):o=e,r===t.maxSize?(o=o.prev,o.next=null):r++,f=e,e.val}return l.clear=function(){f=null,o=null,r=0},l}var y=s(h(),1),i=s(P(),1),G=s(z(),1);var w=s(h(),1),N=s(j(),1),q=s(F(),1),L=s(v(),1),x=(0,w.createContext)({name:null,icon:null});x.displayName="PluginContext";var I=x.Provider;function O(){return(0,w.useContext)(x)}var M=a=>(0,N.createHigherOrderComponent)(t=>((0,q.default)("wp.plugins.withPluginContext",{since:"6.8.0",alternative:"wp.plugins.usePluginContext"}),r=>(0,L.jsx)(x.Consumer,{children:f=>(0,L.jsx)(t,{...r,...a(f,r)})})),"withPluginContext");var _=s(h(),1),$=class extends _.Component{constructor(a){super(a),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(a){let{name:t,onError:r}=this.props;r&&r(t,a)}render(){return this.state.hasError?null:this.props.children}};var p=s(P(),1);var b=s(W(),1),R=s(v(),1),k=(0,R.jsx)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,R.jsx)(b.Path,{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"})});var m={};function ra(a,t){if(typeof t!="object")return console.error("No settings object provided!"),null;if(typeof a!="string")return console.error("Plugin name must be string."),null;if(!/^[a-z][a-z0-9-]*$/.test(a))return console.error('Plugin name must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-plugin".'),null;m[a]&&console.error(`Plugin "${a}" is already registered.`),t=(0,p.applyFilters)("plugins.registerPlugin",t,a);let{render:r,scope:f}=t;if(typeof r!="function")return console.error('The "render" property must be specified and must be a valid function.'),null;if(f){if(typeof f!="string")return console.error("Plugin scope must be string."),null;if(!/^[a-z][a-z0-9-]*$/.test(f))return console.error('Plugin scope must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-page".'),null}return m[a]={name:a,icon:k,...t},(0,p.doAction)("plugins.pluginRegistered",t,a),t}function fa(a){if(!m[a]){console.error('Plugin "'+a+'" is not registered.');return}let t=m[a];return delete m[a],(0,p.doAction)("plugins.pluginUnregistered",t,a),t}function oa(a){return m[a]}function S(a){return Object.values(m).filter(t=>t.scope===a)}var n=s(v(),1),la=D((a,t)=>({icon:a,name:t}));function sa({scope:a,onError:t}){let r=(0,y.useMemo)(()=>{let o=[];return{subscribe(l){return(0,i.addAction)("plugins.pluginRegistered","core/plugins/plugin-area/plugins-registered",l),(0,i.addAction)("plugins.pluginUnregistered","core/plugins/plugin-area/plugins-unregistered",l),()=>{(0,i.removeAction)("plugins.pluginRegistered","core/plugins/plugin-area/plugins-registered"),(0,i.removeAction)("plugins.pluginUnregistered","core/plugins/plugin-area/plugins-unregistered")}},getValue(){let l=S(a);return(0,G.isShallowEqual)(o,l)||(o=l),o}}},[a]),f=(0,y.useSyncExternalStore)(r.subscribe,r.getValue,r.getValue);return(0,n.jsx)("div",{style:{display:"none"},children:f.map(({icon:o,name:l,render:e})=>(0,n.jsx)(I,{value:la(o,l),children:(0,n.jsx)($,{name:l,onError:t,children:(0,n.jsx)(e,{})})},l))})}var X=sa;return ea(ua);})();
                                                                                                                                                                                                                                                                                             dist/preferences-persistence.js                                                                     0000644                 00000042335 15212564024 0012700 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;
(wp ||= {}).preferencesPersistence = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/api-fetch
  var require_api_fetch = __commonJS({
    "package-external:@wordpress/api-fetch"(exports, module) {
      module.exports = window.wp.apiFetch;
    }
  });

  // packages/preferences-persistence/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    __unstableCreatePersistenceLayer: () => __unstableCreatePersistenceLayer,
    create: () => create
  });

  // packages/preferences-persistence/build-module/create/index.mjs
  var import_api_fetch = __toESM(require_api_fetch(), 1);

  // packages/preferences-persistence/build-module/create/debounce-async.mjs
  function debounceAsync(func, delayMS) {
    let timeoutId;
    let activePromise;
    return async function debounced(...args) {
      if (!activePromise && !timeoutId) {
        return new Promise((resolve, reject) => {
          activePromise = func(...args).then((...thenArgs) => {
            resolve(...thenArgs);
          }).catch((error) => {
            reject(error);
          }).finally(() => {
            activePromise = null;
          });
        });
      }
      if (activePromise) {
        await activePromise;
      }
      if (timeoutId) {
        clearTimeout(timeoutId);
        timeoutId = null;
      }
      return new Promise((resolve, reject) => {
        timeoutId = setTimeout(() => {
          activePromise = func(...args).then((...thenArgs) => {
            resolve(...thenArgs);
          }).catch((error) => {
            reject(error);
          }).finally(() => {
            activePromise = null;
            timeoutId = null;
          });
        }, delayMS);
      });
    };
  }

  // packages/preferences-persistence/build-module/create/index.mjs
  var EMPTY_OBJECT = {};
  var localStorage = window.localStorage;
  function create({
    preloadedData,
    localStorageRestoreKey = "WP_PREFERENCES_RESTORE_DATA",
    requestDebounceMS = 2500
  } = {}) {
    let cache = preloadedData;
    const debouncedApiFetch = debounceAsync(import_api_fetch.default, requestDebounceMS);
    async function get() {
      if (cache) {
        return cache;
      }
      const user = await (0, import_api_fetch.default)({
        path: "/wp/v2/users/me?context=edit"
      });
      const serverData = user?.meta?.persisted_preferences;
      const localData = JSON.parse(
        localStorage.getItem(localStorageRestoreKey)
      );
      const serverTimestamp = Date.parse(serverData?._modified) || 0;
      const localTimestamp = Date.parse(localData?._modified) || 0;
      if (serverData && serverTimestamp >= localTimestamp) {
        cache = serverData;
      } else if (localData) {
        cache = localData;
      } else {
        cache = EMPTY_OBJECT;
      }
      return cache;
    }
    function set(newData) {
      const dataWithTimestamp = {
        ...newData,
        _modified: (/* @__PURE__ */ new Date()).toISOString()
      };
      cache = dataWithTimestamp;
      localStorage.setItem(
        localStorageRestoreKey,
        JSON.stringify(dataWithTimestamp)
      );
      debouncedApiFetch({
        path: "/wp/v2/users/me",
        method: "PUT",
        // `keepalive` will still send the request in the background,
        // even when a browser unload event might interrupt it.
        // This should hopefully make things more resilient.
        // This does have a size limit of 64kb, but the data is usually
        // much less.
        keepalive: true,
        data: {
          meta: {
            persisted_preferences: dataWithTimestamp
          }
        }
      }).catch(() => {
      });
    }
    return {
      get,
      set
    };
  }

  // packages/preferences-persistence/build-module/migrations/legacy-local-storage-data/move-feature-preferences.mjs
  function moveFeaturePreferences(state, sourceStoreName) {
    const preferencesStoreName = "core/preferences";
    const interfaceStoreName = "core/interface";
    const interfaceFeatures = state?.[interfaceStoreName]?.preferences?.features?.[sourceStoreName];
    const sourceFeatures = state?.[sourceStoreName]?.preferences?.features;
    const featuresToMigrate = interfaceFeatures ? interfaceFeatures : sourceFeatures;
    if (!featuresToMigrate) {
      return state;
    }
    const existingPreferences = state?.[preferencesStoreName]?.preferences;
    if (existingPreferences?.[sourceStoreName]) {
      return state;
    }
    let updatedInterfaceState;
    if (interfaceFeatures) {
      const otherInterfaceState = state?.[interfaceStoreName];
      const otherInterfaceScopes = state?.[interfaceStoreName]?.preferences?.features;
      updatedInterfaceState = {
        [interfaceStoreName]: {
          ...otherInterfaceState,
          preferences: {
            features: {
              ...otherInterfaceScopes,
              [sourceStoreName]: void 0
            }
          }
        }
      };
    }
    let updatedSourceState;
    if (sourceFeatures) {
      const otherSourceState = state?.[sourceStoreName];
      const sourcePreferences = state?.[sourceStoreName]?.preferences;
      updatedSourceState = {
        [sourceStoreName]: {
          ...otherSourceState,
          preferences: {
            ...sourcePreferences,
            features: void 0
          }
        }
      };
    }
    return {
      ...state,
      [preferencesStoreName]: {
        preferences: {
          ...existingPreferences,
          [sourceStoreName]: featuresToMigrate
        }
      },
      ...updatedInterfaceState,
      ...updatedSourceState
    };
  }

  // packages/preferences-persistence/build-module/migrations/legacy-local-storage-data/move-third-party-feature-preferences.mjs
  function moveThirdPartyFeaturePreferencesToPreferences(state) {
    const interfaceStoreName = "core/interface";
    const preferencesStoreName = "core/preferences";
    const interfaceScopes = state?.[interfaceStoreName]?.preferences?.features;
    const interfaceScopeKeys = interfaceScopes ? Object.keys(interfaceScopes) : [];
    if (!interfaceScopeKeys?.length) {
      return state;
    }
    return interfaceScopeKeys.reduce(function(convertedState, scope) {
      if (scope.startsWith("core")) {
        return convertedState;
      }
      const featuresToMigrate = interfaceScopes?.[scope];
      if (!featuresToMigrate) {
        return convertedState;
      }
      const existingMigratedData = convertedState?.[preferencesStoreName]?.preferences?.[scope];
      if (existingMigratedData) {
        return convertedState;
      }
      const otherPreferencesScopes = convertedState?.[preferencesStoreName]?.preferences;
      const otherInterfaceState = convertedState?.[interfaceStoreName];
      const otherInterfaceScopes = convertedState?.[interfaceStoreName]?.preferences?.features;
      return {
        ...convertedState,
        [preferencesStoreName]: {
          preferences: {
            ...otherPreferencesScopes,
            [scope]: featuresToMigrate
          }
        },
        [interfaceStoreName]: {
          ...otherInterfaceState,
          preferences: {
            features: {
              ...otherInterfaceScopes,
              [scope]: void 0
            }
          }
        }
      };
    }, state);
  }

  // packages/preferences-persistence/build-module/migrations/legacy-local-storage-data/move-individual-preference.mjs
  var identity = (arg) => arg;
  function moveIndividualPreferenceToPreferences(state, { from: sourceStoreName, to: scope }, key, convert = identity) {
    const preferencesStoreName = "core/preferences";
    const sourcePreference = state?.[sourceStoreName]?.preferences?.[key];
    if (sourcePreference === void 0) {
      return state;
    }
    const targetPreference = state?.[preferencesStoreName]?.preferences?.[scope]?.[key];
    if (targetPreference) {
      return state;
    }
    const otherScopes = state?.[preferencesStoreName]?.preferences;
    const otherPreferences = state?.[preferencesStoreName]?.preferences?.[scope];
    const otherSourceState = state?.[sourceStoreName];
    const allSourcePreferences = state?.[sourceStoreName]?.preferences;
    const convertedPreferences = convert({ [key]: sourcePreference });
    return {
      ...state,
      [preferencesStoreName]: {
        preferences: {
          ...otherScopes,
          [scope]: {
            ...otherPreferences,
            ...convertedPreferences
          }
        }
      },
      [sourceStoreName]: {
        ...otherSourceState,
        preferences: {
          ...allSourcePreferences,
          [key]: void 0
        }
      }
    };
  }

  // packages/preferences-persistence/build-module/migrations/legacy-local-storage-data/move-interface-enable-items.mjs
  function moveInterfaceEnableItems(state) {
    const interfaceStoreName = "core/interface";
    const preferencesStoreName = "core/preferences";
    const sourceEnableItems = state?.[interfaceStoreName]?.enableItems;
    if (!sourceEnableItems) {
      return state;
    }
    const allPreferences = state?.[preferencesStoreName]?.preferences ?? {};
    const sourceComplementaryAreas = sourceEnableItems?.singleEnableItems?.complementaryArea ?? {};
    const preferencesWithConvertedComplementaryAreas = Object.keys(
      sourceComplementaryAreas
    ).reduce((accumulator, scope) => {
      const data = sourceComplementaryAreas[scope];
      if (accumulator?.[scope]?.complementaryArea) {
        return accumulator;
      }
      return {
        ...accumulator,
        [scope]: {
          ...accumulator[scope],
          complementaryArea: data
        }
      };
    }, allPreferences);
    const sourcePinnedItems = sourceEnableItems?.multipleEnableItems?.pinnedItems ?? {};
    const allConvertedData = Object.keys(sourcePinnedItems).reduce(
      (accumulator, scope) => {
        const data = sourcePinnedItems[scope];
        if (accumulator?.[scope]?.pinnedItems) {
          return accumulator;
        }
        return {
          ...accumulator,
          [scope]: {
            ...accumulator[scope],
            pinnedItems: data
          }
        };
      },
      preferencesWithConvertedComplementaryAreas
    );
    const otherInterfaceItems = state[interfaceStoreName];
    return {
      ...state,
      [preferencesStoreName]: {
        preferences: allConvertedData
      },
      [interfaceStoreName]: {
        ...otherInterfaceItems,
        enableItems: void 0
      }
    };
  }

  // packages/preferences-persistence/build-module/migrations/legacy-local-storage-data/convert-edit-post-panels.mjs
  function convertEditPostPanels(preferences) {
    const panels = preferences?.panels ?? {};
    return Object.keys(panels).reduce(
      (convertedData, panelName) => {
        const panel = panels[panelName];
        if (panel?.enabled === false) {
          convertedData.inactivePanels.push(panelName);
        }
        if (panel?.opened === true) {
          convertedData.openPanels.push(panelName);
        }
        return convertedData;
      },
      { inactivePanels: [], openPanels: [] }
    );
  }

  // packages/preferences-persistence/build-module/migrations/legacy-local-storage-data/index.mjs
  function getLegacyData(userId) {
    const key = `WP_DATA_USER_${userId}`;
    const unparsedData = window.localStorage.getItem(key);
    return JSON.parse(unparsedData);
  }
  function convertLegacyData(data) {
    if (!data) {
      return;
    }
    data = moveFeaturePreferences(data, "core/edit-widgets");
    data = moveFeaturePreferences(data, "core/customize-widgets");
    data = moveFeaturePreferences(data, "core/edit-post");
    data = moveFeaturePreferences(data, "core/edit-site");
    data = moveThirdPartyFeaturePreferencesToPreferences(data);
    data = moveInterfaceEnableItems(data);
    data = moveIndividualPreferenceToPreferences(
      data,
      { from: "core/edit-post", to: "core/edit-post" },
      "hiddenBlockTypes"
    );
    data = moveIndividualPreferenceToPreferences(
      data,
      { from: "core/edit-post", to: "core/edit-post" },
      "editorMode"
    );
    data = moveIndividualPreferenceToPreferences(
      data,
      { from: "core/edit-post", to: "core/edit-post" },
      "panels",
      convertEditPostPanels
    );
    data = moveIndividualPreferenceToPreferences(
      data,
      { from: "core/editor", to: "core" },
      "isPublishSidebarEnabled"
    );
    data = moveIndividualPreferenceToPreferences(
      data,
      { from: "core/edit-post", to: "core" },
      "isPublishSidebarEnabled"
    );
    data = moveIndividualPreferenceToPreferences(
      data,
      { from: "core/edit-site", to: "core/edit-site" },
      "editorMode"
    );
    return data?.["core/preferences"]?.preferences;
  }
  function convertLegacyLocalStorageData(userId) {
    const data = getLegacyData(userId);
    return convertLegacyData(data);
  }

  // packages/preferences-persistence/build-module/migrations/preferences-package-data/convert-complementary-areas.mjs
  function convertComplementaryAreas(state) {
    return Object.keys(state).reduce((stateAccumulator, scope) => {
      const scopeData = state[scope];
      if (scopeData?.complementaryArea) {
        const updatedScopeData = { ...scopeData };
        delete updatedScopeData.complementaryArea;
        updatedScopeData.isComplementaryAreaVisible = true;
        stateAccumulator[scope] = updatedScopeData;
        return stateAccumulator;
      }
      return stateAccumulator;
    }, state);
  }

  // packages/preferences-persistence/build-module/migrations/preferences-package-data/convert-editor-settings.mjs
  function convertEditorSettings(data) {
    let newData = data;
    const settingsToMoveToCore = [
      "allowRightClickOverrides",
      "distractionFree",
      "editorMode",
      "fixedToolbar",
      "focusMode",
      "hiddenBlockTypes",
      "inactivePanels",
      "keepCaretInsideBlock",
      "mostUsedBlocks",
      "openPanels",
      "showBlockBreadcrumbs",
      "showIconLabels",
      "showListViewByDefault",
      "isPublishSidebarEnabled",
      "isComplementaryAreaVisible",
      "pinnedItems"
    ];
    settingsToMoveToCore.forEach((setting) => {
      if (data?.["core/edit-post"]?.[setting] !== void 0) {
        newData = {
          ...newData,
          core: {
            ...newData?.core,
            [setting]: data["core/edit-post"][setting]
          }
        };
        delete newData["core/edit-post"][setting];
      }
      if (data?.["core/edit-site"]?.[setting] !== void 0) {
        delete newData["core/edit-site"][setting];
      }
    });
    if (Object.keys(newData?.["core/edit-post"] ?? {})?.length === 0) {
      delete newData["core/edit-post"];
    }
    if (Object.keys(newData?.["core/edit-site"] ?? {})?.length === 0) {
      delete newData["core/edit-site"];
    }
    return newData;
  }

  // packages/preferences-persistence/build-module/migrations/preferences-package-data/index.mjs
  function convertPreferencesPackageData(data) {
    let newData = convertComplementaryAreas(data);
    newData = convertEditorSettings(newData);
    return newData;
  }

  // packages/preferences-persistence/build-module/index.mjs
  function __unstableCreatePersistenceLayer(serverData, userId) {
    const localStorageRestoreKey = `WP_PREFERENCES_USER_${userId}`;
    const localData = JSON.parse(
      window.localStorage.getItem(localStorageRestoreKey)
    );
    const serverModified = Date.parse(serverData && serverData._modified) || 0;
    const localModified = Date.parse(localData && localData._modified) || 0;
    let preloadedData;
    if (serverData && serverModified >= localModified) {
      preloadedData = convertPreferencesPackageData(serverData);
    } else if (localData) {
      preloadedData = convertPreferencesPackageData(localData);
    } else {
      preloadedData = convertLegacyLocalStorageData(userId);
    }
    return create({
      preloadedData,
      localStorageRestoreKey
    });
  }
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                   dist/preferences-persistence.min.js                                                                 0000644                 00000012723 15212564024 0013460 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;(wp||={}).preferencesPersistence=(()=>{var C=Object.create;var P=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames;var M=Object.getPrototypeOf,F=Object.prototype.hasOwnProperty;var L=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),R=(e,r)=>{for(var n in r)P(e,n,{get:r[n],enumerable:!0})},b=(e,r,n,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of O(r))!F.call(e,o)&&o!==n&&P(e,o,{get:()=>r[o],enumerable:!(t=k(r,o))||t.enumerable});return e};var B=(e,r,n)=>(n=e!=null?C(M(e)):{},b(r||!e||!e.__esModule?P(n,"default",{value:e,enumerable:!0}):n,e)),j=e=>b(P({},"__esModule",{value:!0}),e);var I=L((N,g)=>{g.exports=window.wp.apiFetch});var z={};R(z,{__unstableCreatePersistenceLayer:()=>$,create:()=>v});var h=B(I(),1);function S(e,r){let n,t;return async function(...c){return!t&&!n?new Promise((s,p)=>{t=e(...c).then((...i)=>{s(...i)}).catch(i=>{p(i)}).finally(()=>{t=null})}):(t&&await t,n&&(clearTimeout(n),n=null),new Promise((s,p)=>{n=setTimeout(()=>{t=e(...c).then((...i)=>{s(...i)}).catch(i=>{p(i)}).finally(()=>{t=null,n=null})},r)}))}}var W={},E=window.localStorage;function v({preloadedData:e,localStorageRestoreKey:r="WP_PREFERENCES_RESTORE_DATA",requestDebounceMS:n=2500}={}){let t=e,o=S(h.default,n);async function c(){if(t)return t;let i=(await(0,h.default)({path:"/wp/v2/users/me?context=edit"}))?.meta?.persisted_preferences,l=JSON.parse(E.getItem(r)),f=Date.parse(i?._modified)||0,a=Date.parse(l?._modified)||0;return i&&f>=a?t=i:l?t=l:t=W,t}function s(p){let i={...p,_modified:new Date().toISOString()};t=i,E.setItem(r,JSON.stringify(i)),o({path:"/wp/v2/users/me",method:"PUT",keepalive:!0,data:{meta:{persisted_preferences:i}}}).catch(()=>{})}return{get:c,set:s}}function m(e,r){let n="core/preferences",t="core/interface",o=e?.[t]?.preferences?.features?.[r],c=e?.[r]?.preferences?.features,s=o||c;if(!s)return e;let p=e?.[n]?.preferences;if(p?.[r])return e;let i;if(o){let f=e?.[t],a=e?.[t]?.preferences?.features;i={[t]:{...f,preferences:{features:{...a,[r]:void 0}}}}}let l;if(c){let f=e?.[r],a=e?.[r]?.preferences;l={[r]:{...f,preferences:{...a,features:void 0}}}}return{...e,[n]:{preferences:{...p,[r]:s}},...i,...l}}function w(e){let r="core/interface",n="core/preferences",t=e?.[r]?.preferences?.features,o=t?Object.keys(t):[];return o?.length?o.reduce(function(c,s){if(s.startsWith("core"))return c;let p=t?.[s];if(!p||c?.[n]?.preferences?.[s])return c;let l=c?.[n]?.preferences,f=c?.[r],a=c?.[r]?.preferences?.features;return{...c,[n]:{preferences:{...l,[s]:p}},[r]:{...f,preferences:{features:{...a,[s]:void 0}}}}},e):e}var J=e=>e;function d(e,{from:r,to:n},t,o=J){let c="core/preferences",s=e?.[r]?.preferences?.[t];if(s===void 0||e?.[c]?.preferences?.[n]?.[t])return e;let i=e?.[c]?.preferences,l=e?.[c]?.preferences?.[n],f=e?.[r],a=e?.[r]?.preferences,u=o({[t]:s});return{...e,[c]:{preferences:{...i,[n]:{...l,...u}}},[r]:{...f,preferences:{...a,[t]:void 0}}}}function T(e){let r="core/interface",n="core/preferences",t=e?.[r]?.enableItems;if(!t)return e;let o=e?.[n]?.preferences??{},c=t?.singleEnableItems?.complementaryArea??{},s=Object.keys(c).reduce((f,a)=>{let u=c[a];return f?.[a]?.complementaryArea?f:{...f,[a]:{...f[a],complementaryArea:u}}},o),p=t?.multipleEnableItems?.pinnedItems??{},i=Object.keys(p).reduce((f,a)=>{let u=p[a];return f?.[a]?.pinnedItems?f:{...f,[a]:{...f[a],pinnedItems:u}}},s),l=e[r];return{...e,[n]:{preferences:i},[r]:{...l,enableItems:void 0}}}function D(e){let r=e?.panels??{};return Object.keys(r).reduce((n,t)=>{let o=r[t];return o?.enabled===!1&&n.inactivePanels.push(t),o?.opened===!0&&n.openPanels.push(t),n},{inactivePanels:[],openPanels:[]})}function U(e){let r=`WP_DATA_USER_${e}`,n=window.localStorage.getItem(r);return JSON.parse(n)}function V(e){if(e)return e=m(e,"core/edit-widgets"),e=m(e,"core/customize-widgets"),e=m(e,"core/edit-post"),e=m(e,"core/edit-site"),e=w(e),e=T(e),e=d(e,{from:"core/edit-post",to:"core/edit-post"},"hiddenBlockTypes"),e=d(e,{from:"core/edit-post",to:"core/edit-post"},"editorMode"),e=d(e,{from:"core/edit-post",to:"core/edit-post"},"panels",D),e=d(e,{from:"core/editor",to:"core"},"isPublishSidebarEnabled"),e=d(e,{from:"core/edit-post",to:"core"},"isPublishSidebarEnabled"),e=d(e,{from:"core/edit-site",to:"core/edit-site"},"editorMode"),e?.["core/preferences"]?.preferences}function _(e){let r=U(e);return V(r)}function x(e){return Object.keys(e).reduce((r,n)=>{let t=e[n];if(t?.complementaryArea){let o={...t};return delete o.complementaryArea,o.isComplementaryAreaVisible=!0,r[n]=o,r}return r},e)}function A(e){let r=e;return["allowRightClickOverrides","distractionFree","editorMode","fixedToolbar","focusMode","hiddenBlockTypes","inactivePanels","keepCaretInsideBlock","mostUsedBlocks","openPanels","showBlockBreadcrumbs","showIconLabels","showListViewByDefault","isPublishSidebarEnabled","isComplementaryAreaVisible","pinnedItems"].forEach(t=>{e?.["core/edit-post"]?.[t]!==void 0&&(r={...r,core:{...r?.core,[t]:e["core/edit-post"][t]}},delete r["core/edit-post"][t]),e?.["core/edit-site"]?.[t]!==void 0&&delete r["core/edit-site"][t]}),Object.keys(r?.["core/edit-post"]??{})?.length===0&&delete r["core/edit-post"],Object.keys(r?.["core/edit-site"]??{})?.length===0&&delete r["core/edit-site"],r}function y(e){let r=x(e);return r=A(r),r}function $(e,r){let n=`WP_PREFERENCES_USER_${r}`,t=JSON.parse(window.localStorage.getItem(n)),o=Date.parse(e&&e._modified)||0,c=Date.parse(t&&t._modified)||0,s;return e&&o>=c?s=y(e):t?s=y(t):s=_(r),v({preloadedData:s,localStorageRestoreKey:n})}return j(z);})();
                                             dist/preferences.js                                                                                 0000644                 00000052106 15212564024 0010353 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).preferences = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/components
  var require_components = __commonJS({
    "package-external:@wordpress/components"(exports, module) {
      module.exports = window.wp.components;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/primitives
  var require_primitives = __commonJS({
    "package-external:@wordpress/primitives"(exports, module) {
      module.exports = window.wp.primitives;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // package-external:@wordpress/a11y
  var require_a11y = __commonJS({
    "package-external:@wordpress/a11y"(exports, module) {
      module.exports = window.wp.a11y;
    }
  });

  // package-external:@wordpress/deprecated
  var require_deprecated = __commonJS({
    "package-external:@wordpress/deprecated"(exports, module) {
      module.exports = window.wp.deprecated;
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // package-external:@wordpress/private-apis
  var require_private_apis = __commonJS({
    "package-external:@wordpress/private-apis"(exports, module) {
      module.exports = window.wp.privateApis;
    }
  });

  // packages/preferences/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    PreferenceToggleMenuItem: () => PreferenceToggleMenuItem,
    privateApis: () => privateApis,
    store: () => store
  });

  // packages/preferences/build-module/components/preference-toggle-menu-item/index.mjs
  var import_data3 = __toESM(require_data(), 1);
  var import_components = __toESM(require_components(), 1);
  var import_i18n = __toESM(require_i18n(), 1);

  // packages/icons/build-module/icon/index.mjs
  var import_element = __toESM(require_element(), 1);
  var icon_default = (0, import_element.forwardRef)(
    ({ icon, size = 24, ...props }, ref) => {
      return (0, import_element.cloneElement)(icon, {
        width: size,
        height: size,
        ...props,
        ref
      });
    }
  );

  // packages/icons/build-module/library/check.mjs
  var import_primitives = __toESM(require_primitives(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  var check_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z" }) });

  // packages/icons/build-module/library/chevron-left.mjs
  var import_primitives2 = __toESM(require_primitives(), 1);
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  var chevron_left_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.Path, { d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z" }) });

  // packages/icons/build-module/library/chevron-right.mjs
  var import_primitives3 = __toESM(require_primitives(), 1);
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
  var chevron_right_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.Path, { d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z" }) });

  // packages/preferences/build-module/components/preference-toggle-menu-item/index.mjs
  var import_a11y = __toESM(require_a11y(), 1);

  // packages/preferences/build-module/store/index.mjs
  var import_data2 = __toESM(require_data(), 1);

  // packages/preferences/build-module/store/reducer.mjs
  var import_data = __toESM(require_data(), 1);
  function defaults(state = {}, action) {
    if (action.type === "SET_PREFERENCE_DEFAULTS") {
      const { scope, defaults: values } = action;
      return {
        ...state,
        [scope]: {
          ...state[scope],
          ...values
        }
      };
    }
    return state;
  }
  function withPersistenceLayer(reducer) {
    let persistenceLayer;
    return (state, action) => {
      if (action.type === "SET_PERSISTENCE_LAYER") {
        const { persistenceLayer: persistence, persistedData } = action;
        persistenceLayer = persistence;
        return persistedData;
      }
      const nextState = reducer(state, action);
      if (action.type === "SET_PREFERENCE_VALUE") {
        persistenceLayer?.set(nextState);
      }
      return nextState;
    };
  }
  var preferences = withPersistenceLayer((state = {}, action) => {
    if (action.type === "SET_PREFERENCE_VALUE") {
      const { scope, name, value } = action;
      return {
        ...state,
        [scope]: {
          ...state[scope],
          [name]: value
        }
      };
    }
    return state;
  });
  var reducer_default = (0, import_data.combineReducers)({
    defaults,
    preferences
  });

  // packages/preferences/build-module/store/actions.mjs
  var actions_exports = {};
  __export(actions_exports, {
    set: () => set,
    setDefaults: () => setDefaults,
    setPersistenceLayer: () => setPersistenceLayer,
    toggle: () => toggle
  });
  function toggle(scope, name) {
    return function({ select, dispatch }) {
      const currentValue = select.get(scope, name);
      dispatch.set(scope, name, !currentValue);
    };
  }
  function set(scope, name, value) {
    return {
      type: "SET_PREFERENCE_VALUE",
      scope,
      name,
      value
    };
  }
  function setDefaults(scope, defaults2) {
    return {
      type: "SET_PREFERENCE_DEFAULTS",
      scope,
      defaults: defaults2
    };
  }
  async function setPersistenceLayer(persistenceLayer) {
    const persistedData = await persistenceLayer.get();
    return {
      type: "SET_PERSISTENCE_LAYER",
      persistenceLayer,
      persistedData
    };
  }

  // packages/preferences/build-module/store/selectors.mjs
  var selectors_exports = {};
  __export(selectors_exports, {
    get: () => get
  });
  var import_deprecated = __toESM(require_deprecated(), 1);
  var withDeprecatedKeys = (originalGet) => (state, scope, name) => {
    const settingsToMoveToCore = [
      "allowRightClickOverrides",
      "distractionFree",
      "editorMode",
      "fixedToolbar",
      "focusMode",
      "hiddenBlockTypes",
      "inactivePanels",
      "keepCaretInsideBlock",
      "mostUsedBlocks",
      "openPanels",
      "showBlockBreadcrumbs",
      "showIconLabels",
      "showListViewByDefault",
      "isPublishSidebarEnabled",
      "isComplementaryAreaVisible",
      "pinnedItems"
    ];
    if (settingsToMoveToCore.includes(name) && ["core/edit-post", "core/edit-site"].includes(scope)) {
      (0, import_deprecated.default)(
        `wp.data.select( 'core/preferences' ).get( '${scope}', '${name}' )`,
        {
          since: "6.5",
          alternative: `wp.data.select( 'core/preferences' ).get( 'core', '${name}' )`
        }
      );
      return originalGet(state, "core", name);
    }
    return originalGet(state, scope, name);
  };
  var get = withDeprecatedKeys(
    (state, scope, name) => {
      const value = state.preferences[scope]?.[name];
      return value !== void 0 ? value : state.defaults[scope]?.[name];
    }
  );

  // packages/preferences/build-module/store/constants.mjs
  var STORE_NAME = "core/preferences";

  // packages/preferences/build-module/store/index.mjs
  var store = (0, import_data2.createReduxStore)(STORE_NAME, {
    reducer: reducer_default,
    actions: actions_exports,
    selectors: selectors_exports
  });
  (0, import_data2.register)(store);

  // packages/preferences/build-module/components/preference-toggle-menu-item/index.mjs
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
  function PreferenceToggleMenuItem({
    scope,
    name,
    label,
    info,
    messageActivated,
    messageDeactivated,
    shortcut,
    handleToggling = true,
    onToggle = () => null,
    disabled = false
  }) {
    const isActive = (0, import_data3.useSelect)(
      (select) => !!select(store).get(scope, name),
      [scope, name]
    );
    const { toggle: toggle2 } = (0, import_data3.useDispatch)(store);
    const speakMessage = () => {
      if (isActive) {
        const message = messageDeactivated || (0, import_i18n.sprintf)(
          /* translators: %s: preference name, e.g. 'Fullscreen mode' */
          (0, import_i18n.__)("Preference deactivated - %s"),
          label
        );
        (0, import_a11y.speak)(message);
      } else {
        const message = messageActivated || (0, import_i18n.sprintf)(
          /* translators: %s: preference name, e.g. 'Fullscreen mode' */
          (0, import_i18n.__)("Preference activated - %s"),
          label
        );
        (0, import_a11y.speak)(message);
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
      import_components.MenuItem,
      {
        icon: isActive ? check_default : null,
        isSelected: isActive,
        onClick: () => {
          onToggle();
          if (handleToggling) {
            toggle2(scope, name);
          }
          speakMessage();
        },
        role: "menuitemcheckbox",
        info,
        shortcut,
        disabled,
        children: label
      }
    );
  }

  // packages/preferences/build-module/components/preference-base-option/index.mjs
  var import_components2 = __toESM(require_components(), 1);
  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
  function BaseOption({
    help,
    label,
    isChecked,
    onChange,
    children
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "preference-base-option", children: [
      /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
        import_components2.ToggleControl,
        {
          help,
          label,
          checked: isChecked,
          onChange
        }
      ),
      children
    ] });
  }
  var preference_base_option_default = BaseOption;

  // packages/preferences/build-module/components/preference-toggle-control/index.mjs
  var import_data4 = __toESM(require_data(), 1);
  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
  function PreferenceToggleControl(props) {
    const {
      scope,
      featureName,
      onToggle = () => {
      },
      ...remainingProps
    } = props;
    const isChecked = (0, import_data4.useSelect)(
      (select) => !!select(store).get(scope, featureName),
      [scope, featureName]
    );
    const { toggle: toggle2 } = (0, import_data4.useDispatch)(store);
    const onChange = () => {
      onToggle();
      toggle2(scope, featureName);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
      preference_base_option_default,
      {
        ...remainingProps,
        onChange,
        isChecked
      }
    );
  }
  var preference_toggle_control_default = PreferenceToggleControl;

  // packages/preferences/build-module/components/preferences-modal/index.mjs
  var import_components3 = __toESM(require_components(), 1);
  var import_i18n2 = __toESM(require_i18n(), 1);
  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
  function PreferencesModal({
    closeModal,
    children
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
      import_components3.Modal,
      {
        className: "preferences-modal",
        title: (0, import_i18n2.__)("Preferences"),
        onRequestClose: closeModal,
        children
      }
    );
  }

  // packages/preferences/build-module/components/preferences-modal-section/index.mjs
  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
  var Section = ({ description, title, children }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("fieldset", { className: "preferences-modal__section", children: [
    /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("legend", { className: "preferences-modal__section-legend", children: [
      /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h2", { className: "preferences-modal__section-title", children: title }),
      description && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "preferences-modal__section-description", children: description })
    ] }),
    /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "preferences-modal__section-content", children })
  ] });
  var preferences_modal_section_default = Section;

  // packages/preferences/build-module/components/preferences-modal-tabs/index.mjs
  var import_compose = __toESM(require_compose(), 1);
  var import_components4 = __toESM(require_components(), 1);
  var import_element2 = __toESM(require_element(), 1);
  var import_i18n3 = __toESM(require_i18n(), 1);

  // packages/preferences/build-module/lock-unlock.mjs
  var import_private_apis = __toESM(require_private_apis(), 1);
  var { lock, unlock } = (0, import_private_apis.__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/preferences"
  );

  // packages/preferences/build-module/components/preferences-modal-tabs/index.mjs
  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
  var { Tabs } = unlock(import_components4.privateApis);
  var PREFERENCES_MENU = "preferences-menu";
  function PreferencesModalTabs({
    sections
  }) {
    const isLargeViewport = (0, import_compose.useViewportMatch)("medium");
    const [activeMenu, setActiveMenu] = (0, import_element2.useState)(PREFERENCES_MENU);
    const { tabs, sectionsContentMap } = (0, import_element2.useMemo)(() => {
      let mappedTabs = {
        tabs: [],
        sectionsContentMap: {}
      };
      if (sections.length) {
        mappedTabs = sections.reduce(
          (accumulator, { name, tabLabel: title, content }) => {
            accumulator.tabs.push({ name, title });
            accumulator.sectionsContentMap[name] = content;
            return accumulator;
          },
          { tabs: [], sectionsContentMap: {} }
        );
      }
      return mappedTabs;
    }, [sections]);
    let modalContent;
    if (isLargeViewport) {
      modalContent = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "preferences__tabs", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
        Tabs,
        {
          defaultTabId: activeMenu !== PREFERENCES_MENU ? activeMenu : void 0,
          onSelect: setActiveMenu,
          orientation: "vertical",
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Tabs.TabList, { className: "preferences__tabs-tablist", children: tabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
              Tabs.Tab,
              {
                tabId: tab.name,
                className: "preferences__tabs-tab",
                children: tab.title
              },
              tab.name
            )) }),
            tabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
              Tabs.TabPanel,
              {
                tabId: tab.name,
                className: "preferences__tabs-tabpanel",
                focusable: false,
                children: sectionsContentMap[tab.name] || null
              },
              tab.name
            ))
          ]
        }
      ) });
    } else {
      modalContent = /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_components4.Navigator, { initialPath: "/", className: "preferences__provider", children: [
        /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_components4.Navigator.Screen, { path: "/", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_components4.Card, { isBorderless: true, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_components4.CardBody, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_components4.__experimentalItemGroup, { children: tabs.map((tab) => {
          return (
            // @ts-expect-error: Navigator.Button is currently typed in a way that prevents Item from being passed in
            /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
              import_components4.Navigator.Button,
              {
                path: `/${tab.name}`,
                as: import_components4.__experimentalItem,
                isAction: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_components4.__experimentalHStack, { justify: "space-between", children: [
                  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_components4.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_components4.__experimentalTruncate, { children: tab.title }) }),
                  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_components4.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
                    icon_default,
                    {
                      icon: (0, import_i18n3.isRTL)() ? chevron_left_default : chevron_right_default
                    }
                  ) })
                ] })
              },
              tab.name
            )
          );
        }) }) }) }) }),
        sections.length && sections.map((section) => {
          return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
            import_components4.Navigator.Screen,
            {
              path: `/${section.name}`,
              children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_components4.Card, { isBorderless: true, size: "large", children: [
                /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
                  import_components4.CardHeader,
                  {
                    isBorderless: false,
                    justify: "left",
                    size: "small",
                    gap: "6",
                    as: "div",
                    children: [
                      /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
                        import_components4.Navigator.BackButton,
                        {
                          icon: (0, import_i18n3.isRTL)() ? chevron_right_default : chevron_left_default,
                          label: (0, import_i18n3.__)("Back")
                        }
                      ),
                      /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_components4.__experimentalText, { size: "16", children: section.tabLabel })
                    ]
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_components4.CardBody, { children: section.content })
              ] })
            },
            `${section.name}-menu`
          );
        })
      ] });
    }
    return modalContent;
  }

  // packages/preferences/build-module/private-apis.mjs
  var privateApis = {};
  lock(privateApis, {
    PreferenceBaseOption: preference_base_option_default,
    PreferenceToggleControl: preference_toggle_control_default,
    PreferencesModal,
    PreferencesModalSection: preferences_modal_section_default,
    PreferencesModalTabs
  });
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                                                                                                                                                          dist/preferences.min.js                                                                             0000644                 00000017270 15212564024 0011140 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).preferences=(()=>{var Aa=Object.create;var T=Object.defineProperty;var Ia=Object.getOwnPropertyDescriptor;var Da=Object.getOwnPropertyNames;var ja=Object.getPrototypeOf,Fa=Object.prototype.hasOwnProperty;var d=(a,t)=>()=>(t||a((t={exports:{}}).exports,t),t.exports),V=(a,t)=>{for(var e in t)T(a,e,{get:t[e],enumerable:!0})},K=(a,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of Da(t))!Fa.call(a,l)&&l!==e&&T(a,l,{get:()=>t[l],enumerable:!(r=Ia(t,l))||r.enumerable});return a};var o=(a,t,e)=>(e=a!=null?Aa(ja(a)):{},K(t||!a||!a.__esModule?T(e,"default",{value:a,enumerable:!0}):e,a)),Ua=a=>K(T({},"__esModule",{value:!0}),a);var b=d((at,X)=>{X.exports=window.wp.data});var x=d((tt,Q)=>{Q.exports=window.wp.components});var E=d((et,Z)=>{Z.exports=window.wp.i18n});var O=d((rt,aa)=>{aa.exports=window.wp.element});var C=d((ft,ta)=>{ta.exports=window.wp.primitives});var u=d((st,ea)=>{ea.exports=window.ReactJSXRuntime});var oa=d((wt,ra)=>{ra.exports=window.wp.a11y});var ma=d((bt,la)=>{la.exports=window.wp.deprecated});var Ta=d((It,ya)=>{ya.exports=window.wp.compose});var La=d((Dt,Ea)=>{Ea.exports=window.wp.privateApis});var Qa={};V(Qa,{PreferenceToggleMenuItem:()=>na,privateApis:()=>Ma,store:()=>p});var N=o(b(),1),ia=o(x(),1),g=o(E(),1);var L=o(O(),1),z=(0,L.forwardRef)(({icon:a,size:t=24,...e},r)=>(0,L.cloneElement)(a,{width:t,height:t,...e,ref:r}));var R=o(C(),1),H=o(u(),1),q=(0,H.jsx)(R.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,H.jsx)(R.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var S=o(C(),1),$=o(u(),1),k=(0,$.jsx)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(S.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var P=o(C(),1),G=o(u(),1),B=(0,G.jsx)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,G.jsx)(P.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var Y=o(oa(),1);var M=o(b(),1);var fa=o(b(),1);function Va(a={},t){if(t.type==="SET_PREFERENCE_DEFAULTS"){let{scope:e,defaults:r}=t;return{...a,[e]:{...a[e],...r}}}return a}function Oa(a){let t;return(e,r)=>{if(r.type==="SET_PERSISTENCE_LAYER"){let{persistenceLayer:n,persistedData:i}=r;return t=n,i}let l=a(e,r);return r.type==="SET_PREFERENCE_VALUE"&&t?.set(l),l}}var za=Oa((a={},t)=>{if(t.type==="SET_PREFERENCE_VALUE"){let{scope:e,name:r,value:l}=t;return{...a,[e]:{...a[e],[r]:l}}}return a}),sa=(0,fa.combineReducers)({defaults:Va,preferences:za});var W={};V(W,{set:()=>qa,setDefaults:()=>$a,setPersistenceLayer:()=>Ga,toggle:()=>Ha});function Ha(a,t){return function({select:e,dispatch:r}){let l=e.get(a,t);r.set(a,t,!l)}}function qa(a,t,e){return{type:"SET_PREFERENCE_VALUE",scope:a,name:t,value:e}}function $a(a,t){return{type:"SET_PREFERENCE_DEFAULTS",scope:a,defaults:t}}async function Ga(a){let t=await a.get();return{type:"SET_PERSISTENCE_LAYER",persistenceLayer:a,persistedData:t}}var J={};V(J,{get:()=>Ja});var da=o(ma(),1),Wa=a=>(t,e,r)=>["allowRightClickOverrides","distractionFree","editorMode","fixedToolbar","focusMode","hiddenBlockTypes","inactivePanels","keepCaretInsideBlock","mostUsedBlocks","openPanels","showBlockBreadcrumbs","showIconLabels","showListViewByDefault","isPublishSidebarEnabled","isComplementaryAreaVisible","pinnedItems"].includes(r)&&["core/edit-post","core/edit-site"].includes(e)?((0,da.default)(`wp.data.select( 'core/preferences' ).get( '${e}', '${r}' )`,{since:"6.5",alternative:`wp.data.select( 'core/preferences' ).get( 'core', '${r}' )`}),a(t,"core",r)):a(t,e,r),Ja=Wa((a,t,e)=>{let r=a.preferences[t]?.[e];return r!==void 0?r:a.defaults[t]?.[e]});var ua="core/preferences";var p=(0,M.createReduxStore)(ua,{reducer:sa,actions:W,selectors:J});(0,M.register)(p);var pa=o(u(),1);function na({scope:a,name:t,label:e,info:r,messageActivated:l,messageDeactivated:n,shortcut:i,handleToggling:m=!0,onToggle:c=()=>null,disabled:y=!1}){let w=(0,N.useSelect)(v=>!!v(p).get(a,t),[a,t]),{toggle:U}=(0,N.useDispatch)(p),Na=()=>{if(w){let v=n||(0,g.sprintf)((0,g.__)("Preference deactivated - %s"),e);(0,Y.speak)(v)}else{let v=l||(0,g.sprintf)((0,g.__)("Preference activated - %s"),e);(0,Y.speak)(v)}};return(0,pa.jsx)(ia.MenuItem,{icon:w?q:null,isSelected:w,onClick:()=>{c(),m&&U(a,t),Na()},role:"menuitemcheckbox",info:r,shortcut:i,disabled:y,children:e})}var ca=o(x(),1),A=o(u(),1);function Ya({help:a,label:t,isChecked:e,onChange:r,children:l}){return(0,A.jsxs)("div",{className:"preference-base-option",children:[(0,A.jsx)(ca.ToggleControl,{help:a,label:t,checked:e,onChange:r}),l]})}var I=Ya;var D=o(b(),1);var ha=o(u(),1);function Ka(a){let{scope:t,featureName:e,onToggle:r=()=>{},...l}=a,n=(0,D.useSelect)(c=>!!c(p).get(t,e),[t,e]),{toggle:i}=(0,D.useDispatch)(p);return(0,ha.jsx)(I,{...l,onChange:()=>{r(),i(t,e)},isChecked:n})}var ga=Ka;var wa=o(x(),1),va=o(E(),1),ba=o(u(),1);function xa({closeModal:a,children:t}){return(0,ba.jsx)(wa.Modal,{className:"preferences-modal",title:(0,va.__)("Preferences"),onRequestClose:a,children:t})}var h=o(u(),1),Xa=({description:a,title:t,children:e})=>(0,h.jsxs)("fieldset",{className:"preferences-modal__section",children:[(0,h.jsxs)("legend",{className:"preferences-modal__section-legend",children:[(0,h.jsx)("h2",{className:"preferences-modal__section-title",children:t}),a&&(0,h.jsx)("p",{className:"preferences-modal__section-description",children:a})]}),(0,h.jsx)("div",{className:"preferences-modal__section-content",children:e})]}),_a=Xa;var Pa=o(Ta(),1),f=o(x(),1),F=o(O(),1);var _=o(E(),1);var Ca=o(La(),1),{lock:Ra,unlock:Sa}=(0,Ca.__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/preferences");var s=o(u(),1),{Tabs:j}=Sa(f.privateApis),ka="preferences-menu";function Ba({sections:a}){let t=(0,Pa.useViewportMatch)("medium"),[e,r]=(0,F.useState)(ka),{tabs:l,sectionsContentMap:n}=(0,F.useMemo)(()=>{let m={tabs:[],sectionsContentMap:{}};return a.length&&(m=a.reduce((c,{name:y,tabLabel:w,content:U})=>(c.tabs.push({name:y,title:w}),c.sectionsContentMap[y]=U,c),{tabs:[],sectionsContentMap:{}})),m},[a]),i;return t?i=(0,s.jsx)("div",{className:"preferences__tabs",children:(0,s.jsxs)(j,{defaultTabId:e!==ka?e:void 0,onSelect:r,orientation:"vertical",children:[(0,s.jsx)(j.TabList,{className:"preferences__tabs-tablist",children:l.map(m=>(0,s.jsx)(j.Tab,{tabId:m.name,className:"preferences__tabs-tab",children:m.title},m.name))}),l.map(m=>(0,s.jsx)(j.TabPanel,{tabId:m.name,className:"preferences__tabs-tabpanel",focusable:!1,children:n[m.name]||null},m.name))]})}):i=(0,s.jsxs)(f.Navigator,{initialPath:"/",className:"preferences__provider",children:[(0,s.jsx)(f.Navigator.Screen,{path:"/",children:(0,s.jsx)(f.Card,{isBorderless:!0,size:"small",children:(0,s.jsx)(f.CardBody,{children:(0,s.jsx)(f.__experimentalItemGroup,{children:l.map(m=>(0,s.jsx)(f.Navigator.Button,{path:`/${m.name}`,as:f.__experimentalItem,isAction:!0,children:(0,s.jsxs)(f.__experimentalHStack,{justify:"space-between",children:[(0,s.jsx)(f.FlexItem,{children:(0,s.jsx)(f.__experimentalTruncate,{children:m.title})}),(0,s.jsx)(f.FlexItem,{children:(0,s.jsx)(z,{icon:(0,_.isRTL)()?k:B})})]})},m.name))})})})}),a.length&&a.map(m=>(0,s.jsx)(f.Navigator.Screen,{path:`/${m.name}`,children:(0,s.jsxs)(f.Card,{isBorderless:!0,size:"large",children:[(0,s.jsxs)(f.CardHeader,{isBorderless:!1,justify:"left",size:"small",gap:"6",as:"div",children:[(0,s.jsx)(f.Navigator.BackButton,{icon:(0,_.isRTL)()?B:k,label:(0,_.__)("Back")}),(0,s.jsx)(f.__experimentalText,{size:"16",children:m.tabLabel})]}),(0,s.jsx)(f.CardBody,{children:m.content})]})},`${m.name}-menu`))]}),i}var Ma={};Ra(Ma,{PreferenceBaseOption:I,PreferenceToggleControl:ga,PreferencesModal:xa,PreferencesModalSection:_a,PreferencesModalTabs:Ba});return Ua(Qa);})();
                                                                                                                                                                                                                                                                                                                                        dist/primitives.js                                                                                  0000644                 00000012123 15212564024 0010240 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).primitives = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // packages/primitives/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    BlockQuotation: () => BlockQuotation,
    Circle: () => Circle,
    Defs: () => Defs,
    G: () => G,
    HorizontalRule: () => HorizontalRule,
    Line: () => Line,
    LinearGradient: () => LinearGradient,
    Path: () => Path,
    Polygon: () => Polygon,
    RadialGradient: () => RadialGradient,
    Rect: () => Rect,
    SVG: () => SVG,
    Stop: () => Stop,
    View: () => View
  });

  // node_modules/clsx/dist/clsx.mjs
  function 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 = 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 = r(e)) && (n && (n += " "), n += t);
    return n;
  }
  var clsx_default = clsx;

  // packages/primitives/build-module/svg/index.mjs
  var import_element = __toESM(require_element(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  var Circle = (props) => (0, import_element.createElement)("circle", props);
  var G = (props) => (0, import_element.createElement)("g", props);
  var Line = (props) => (0, import_element.createElement)("line", props);
  var Path = (props) => (0, import_element.createElement)("path", props);
  var Polygon = (props) => (0, import_element.createElement)("polygon", props);
  var Rect = (props) => (0, import_element.createElement)("rect", props);
  var Defs = (props) => (0, import_element.createElement)("defs", props);
  var RadialGradient = (props) => (0, import_element.createElement)("radialGradient", props);
  var LinearGradient = (props) => (0, import_element.createElement)("linearGradient", props);
  var Stop = (props) => (0, import_element.createElement)("stop", props);
  var SVG = (0, import_element.forwardRef)(
    /**
     * @param {SVGProps}                          props isPressed indicates whether the SVG should appear as pressed.
     *                                                  Other props will be passed through to svg component.
     * @param {React.ForwardedRef<SVGSVGElement>} ref   The forwarded ref to the SVG element.
     *
     * @return {React.JSX.Element} Stop component
     */
    ({ className, isPressed, ...props }, ref) => {
      const appliedProps = {
        ...props,
        className: clsx_default(className, { "is-pressed": isPressed }) || void 0,
        "aria-hidden": true,
        focusable: false
      };
      return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { ...appliedProps, ref });
    }
  );
  SVG.displayName = "SVG";

  // packages/primitives/build-module/horizontal-rule/index.mjs
  var HorizontalRule = "hr";

  // packages/primitives/build-module/block-quotation/index.mjs
  var BlockQuotation = "blockquote";

  // packages/primitives/build-module/view/index.mjs
  var View = "div";
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                                                                                                                                             dist/primitives.min.js                                                                              0000644                 00000003707 15212564025 0011033 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).primitives=(()=>{var y=Object.create;var n=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var G=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var p=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),b=(r,e)=>{for(var o in e)n(r,o,{get:e[o],enumerable:!0})},l=(r,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of G(e))!R.call(r,i)&&i!==o&&n(r,i,{get:()=>e[i],enumerable:!(t=w(e,i))||t.enumerable});return r};var s=(r,e,o)=>(o=r!=null?y(h(r)):{},l(e||!r||!r.__esModule?n(o,"default",{value:r,enumerable:!0}):o,r)),S=r=>l(n({},"__esModule",{value:!0}),r);var m=p((F,d)=>{d.exports=window.wp.element});var u=p((I,c)=>{c.exports=window.ReactJSXRuntime});var J={};b(J,{BlockQuotation:()=>E,Circle:()=>V,Defs:()=>q,G:()=>j,HorizontalRule:()=>D,Line:()=>k,LinearGradient:()=>B,Path:()=>A,Polygon:()=>L,RadialGradient:()=>z,Rect:()=>N,SVG:()=>g,Stop:()=>C,View:()=>H});function f(r){var e,o,t="";if(typeof r=="string"||typeof r=="number")t+=r;else if(typeof r=="object")if(Array.isArray(r)){var i=r.length;for(e=0;e<i;e++)r[e]&&(o=f(r[e]))&&(t&&(t+=" "),t+=o)}else for(o in r)r[o]&&(t&&(t+=" "),t+=o);return t}function P(){for(var r,e,o=0,t="",i=arguments.length;o<i;o++)(r=arguments[o])&&(e=f(r))&&(t&&(t+=" "),t+=e);return t}var v=P;var a=s(m(),1),x=s(u(),1),V=r=>(0,a.createElement)("circle",r),j=r=>(0,a.createElement)("g",r),k=r=>(0,a.createElement)("line",r),A=r=>(0,a.createElement)("path",r),L=r=>(0,a.createElement)("polygon",r),N=r=>(0,a.createElement)("rect",r),q=r=>(0,a.createElement)("defs",r),z=r=>(0,a.createElement)("radialGradient",r),B=r=>(0,a.createElement)("linearGradient",r),C=r=>(0,a.createElement)("stop",r),g=(0,a.forwardRef)(({className:r,isPressed:e,...o},t)=>{let i={...o,className:v(r,{"is-pressed":e})||void 0,"aria-hidden":!0,focusable:!1};return(0,x.jsx)("svg",{...i,ref:t})});g.displayName="SVG";var D="hr";var E="blockquote";var H="div";return S(J);})();
                                                         dist/priority-queue.js                                                                              0000644                 00000024031 15212564025 0011052 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).priorityQueue = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // node_modules/requestidlecallback/index.js
  var require_requestidlecallback = __commonJS({
    "node_modules/requestidlecallback/index.js"(exports, module) {
      (function(factory) {
        if (typeof define === "function" && define.amd) {
          define([], factory);
        } else if (typeof module === "object" && module.exports) {
          module.exports = factory();
        } else {
          window.idleCallbackShim = factory();
        }
      })(function() {
        "use strict";
        var scheduleStart, throttleDelay, lazytimer, lazyraf;
        var root = typeof window != "undefined" ? window : typeof global != void 0 ? global : this || {};
        var requestAnimationFrame = root.cancelRequestAnimationFrame && root.requestAnimationFrame || setTimeout;
        var cancelRequestAnimationFrame = root.cancelRequestAnimationFrame || clearTimeout;
        var tasks = [];
        var runAttempts = 0;
        var isRunning = false;
        var remainingTime = 7;
        var minThrottle = 35;
        var throttle = 125;
        var index = 0;
        var taskStart = 0;
        var tasklength = 0;
        var IdleDeadline = {
          get didTimeout() {
            return false;
          },
          timeRemaining: function() {
            var timeRemaining = remainingTime - (Date.now() - taskStart);
            return timeRemaining < 0 ? 0 : timeRemaining;
          }
        };
        var setInactive = debounce(function() {
          remainingTime = 22;
          throttle = 66;
          minThrottle = 0;
        });
        function debounce(fn) {
          var id, timestamp;
          var wait = 99;
          var check = function() {
            var last = Date.now() - timestamp;
            if (last < wait) {
              id = setTimeout(check, wait - last);
            } else {
              id = null;
              fn();
            }
          };
          return function() {
            timestamp = Date.now();
            if (!id) {
              id = setTimeout(check, wait);
            }
          };
        }
        function abortRunning() {
          if (isRunning) {
            if (lazyraf) {
              cancelRequestAnimationFrame(lazyraf);
            }
            if (lazytimer) {
              clearTimeout(lazytimer);
            }
            isRunning = false;
          }
        }
        function onInputorMutation() {
          if (throttle != 125) {
            remainingTime = 7;
            throttle = 125;
            minThrottle = 35;
            if (isRunning) {
              abortRunning();
              scheduleLazy();
            }
          }
          setInactive();
        }
        function scheduleAfterRaf() {
          lazyraf = null;
          lazytimer = setTimeout(runTasks, 0);
        }
        function scheduleRaf() {
          lazytimer = null;
          requestAnimationFrame(scheduleAfterRaf);
        }
        function scheduleLazy() {
          if (isRunning) {
            return;
          }
          throttleDelay = throttle - (Date.now() - taskStart);
          scheduleStart = Date.now();
          isRunning = true;
          if (minThrottle && throttleDelay < minThrottle) {
            throttleDelay = minThrottle;
          }
          if (throttleDelay > 9) {
            lazytimer = setTimeout(scheduleRaf, throttleDelay);
          } else {
            throttleDelay = 0;
            scheduleRaf();
          }
        }
        function runTasks() {
          var task, i, len;
          var timeThreshold = remainingTime > 9 ? 9 : 1;
          taskStart = Date.now();
          isRunning = false;
          lazytimer = null;
          if (runAttempts > 2 || taskStart - throttleDelay - 50 < scheduleStart) {
            for (i = 0, len = tasks.length; i < len && IdleDeadline.timeRemaining() > timeThreshold; i++) {
              task = tasks.shift();
              tasklength++;
              if (task) {
                task(IdleDeadline);
              }
            }
          }
          if (tasks.length) {
            scheduleLazy();
          } else {
            runAttempts = 0;
          }
        }
        function requestIdleCallbackShim(task) {
          index++;
          tasks.push(task);
          scheduleLazy();
          return index;
        }
        function cancelIdleCallbackShim(id) {
          var index2 = id - 1 - tasklength;
          if (tasks[index2]) {
            tasks[index2] = null;
          }
        }
        if (!root.requestIdleCallback || !root.cancelIdleCallback) {
          root.requestIdleCallback = requestIdleCallbackShim;
          root.cancelIdleCallback = cancelIdleCallbackShim;
          if (root.document && document.addEventListener) {
            root.addEventListener("scroll", onInputorMutation, true);
            root.addEventListener("resize", onInputorMutation);
            document.addEventListener("focus", onInputorMutation, true);
            document.addEventListener("mouseover", onInputorMutation, true);
            ["click", "keypress", "touchstart", "mousedown"].forEach(function(name) {
              document.addEventListener(name, onInputorMutation, { capture: true, passive: true });
            });
            if (root.MutationObserver) {
              new MutationObserver(onInputorMutation).observe(document.documentElement, { childList: true, subtree: true, attributes: true });
            }
          }
        } else {
          try {
            root.requestIdleCallback(function() {
            }, { timeout: 0 });
          } catch (e) {
            (function(rIC) {
              var timeRemainingProto, timeRemaining;
              root.requestIdleCallback = function(fn, timeout) {
                if (timeout && typeof timeout.timeout == "number") {
                  return rIC(fn, timeout.timeout);
                }
                return rIC(fn);
              };
              if (root.IdleCallbackDeadline && (timeRemainingProto = IdleCallbackDeadline.prototype)) {
                timeRemaining = Object.getOwnPropertyDescriptor(timeRemainingProto, "timeRemaining");
                if (!timeRemaining || !timeRemaining.configurable || !timeRemaining.get) {
                  return;
                }
                Object.defineProperty(timeRemainingProto, "timeRemaining", {
                  value: function() {
                    return timeRemaining.get.call(this);
                  },
                  enumerable: true,
                  configurable: true
                });
              }
            })(root.requestIdleCallback);
          }
        }
        return {
          request: requestIdleCallbackShim,
          cancel: cancelIdleCallbackShim
        };
      });
    }
  });

  // packages/priority-queue/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    createQueue: () => createQueue
  });

  // packages/priority-queue/build-module/request-idle-callback.mjs
  var import_requestidlecallback = __toESM(require_requestidlecallback(), 1);
  function createRequestIdleCallback() {
    if (typeof window === "undefined") {
      return (callback) => {
        setTimeout(() => callback(Date.now()), 0);
      };
    }
    return window.requestIdleCallback;
  }
  var request_idle_callback_default = createRequestIdleCallback();

  // packages/priority-queue/build-module/index.mjs
  var createQueue = () => {
    const waitingList = /* @__PURE__ */ new Map();
    let isRunning = false;
    const runWaitingList = (deadline) => {
      for (const [nextElement, callback] of waitingList) {
        waitingList.delete(nextElement);
        callback();
        if ("number" === typeof deadline || deadline.timeRemaining() <= 0) {
          break;
        }
      }
      if (waitingList.size === 0) {
        isRunning = false;
        return;
      }
      request_idle_callback_default(runWaitingList);
    };
    const add = (element, item) => {
      waitingList.set(element, item);
      if (!isRunning) {
        isRunning = true;
        request_idle_callback_default(runWaitingList);
      }
    };
    const flush = (element) => {
      const callback = waitingList.get(element);
      if (void 0 === callback) {
        return false;
      }
      waitingList.delete(element);
      callback();
      return true;
    };
    const cancel = (element) => {
      return waitingList.delete(element);
    };
    const reset = () => {
      waitingList.clear();
      isRunning = false;
    };
    return {
      add,
      flush,
      cancel,
      reset
    };
  };
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       dist/priority-queue.min.js                                                                          0000644                 00000006505 15212564025 0011642 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).priorityQueue=(()=>{var P=Object.create;var p=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var Q=Object.getOwnPropertyNames;var W=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty;var G=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),H=(e,t)=>{for(var i in t)p(e,i,{get:t[i],enumerable:!0})},A=(e,t,i,f)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Q(t))!B.call(e,n)&&n!==i&&p(e,n,{get:()=>t[n],enumerable:!(f=_(t,n))||f.enumerable});return e};var J=(e,t,i)=>(i=e!=null?P(W(e)):{},A(t||!e||!e.__esModule?p(i,"default",{value:e,enumerable:!0}):i,e)),K=e=>A(p({},"__esModule",{value:!0}),e);var z=G((Y,w)=>{(function(e){typeof define=="function"&&define.amd?define([],e):typeof w=="object"&&w.exports?w.exports=e():window.idleCallbackShim=e()})(function(){"use strict";var e,t,i,f,n=typeof window<"u"?window:typeof global!=null?global:this||{},I=n.cancelRequestAnimationFrame&&n.requestAnimationFrame||setTimeout,y=n.cancelRequestAnimationFrame||clearTimeout,a=[],o=0,s=!1,k=7,v=35,g=125,C=0,h=0,T=0,D={get didTimeout(){return!1},timeRemaining:function(){var r=k-(Date.now()-h);return r<0?0:r}},F=O(function(){k=22,g=66,v=0});function O(r){var l,c,u=99,b=function(){var m=Date.now()-c;m<u?l=setTimeout(b,u-m):(l=null,r())};return function(){c=Date.now(),l||(l=setTimeout(b,u))}}function S(){s&&(f&&y(f),i&&clearTimeout(i),s=!1)}function d(){g!=125&&(k=7,g=125,v=35,s&&(S(),R())),F()}function M(){f=null,i=setTimeout(j,0)}function L(){i=null,I(M)}function R(){s||(t=g-(Date.now()-h),e=Date.now(),s=!0,v&&t<v&&(t=v),t>9?i=setTimeout(L,t):(t=0,L()))}function j(){var r,l,c,u=k>9?9:1;if(h=Date.now(),s=!1,i=null,o>2||h-t-50<e)for(l=0,c=a.length;l<c&&D.timeRemaining()>u;l++)r=a.shift(),T++,r&&r(D);a.length?R():o=0}function E(r){return C++,a.push(r),R(),C}function x(r){var l=r-1-T;a[l]&&(a[l]=null)}if(!n.requestIdleCallback||!n.cancelIdleCallback)n.requestIdleCallback=E,n.cancelIdleCallback=x,n.document&&document.addEventListener&&(n.addEventListener("scroll",d,!0),n.addEventListener("resize",d),document.addEventListener("focus",d,!0),document.addEventListener("mouseover",d,!0),["click","keypress","touchstart","mousedown"].forEach(function(r){document.addEventListener(r,d,{capture:!0,passive:!0})}),n.MutationObserver&&new MutationObserver(d).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}));else try{n.requestIdleCallback(function(){},{timeout:0})}catch{(function(l){var c,u;if(n.requestIdleCallback=function(b,m){return m&&typeof m.timeout=="number"?l(b,m.timeout):l(b)},n.IdleCallbackDeadline&&(c=IdleCallbackDeadline.prototype)){if(u=Object.getOwnPropertyDescriptor(c,"timeRemaining"),!u||!u.configurable||!u.get)return;Object.defineProperty(c,"timeRemaining",{value:function(){return u.get.call(this)},enumerable:!0,configurable:!0})}})(n.requestIdleCallback)}return{request:E,cancel:x}})});var V={};H(V,{createQueue:()=>U});var Z=J(z(),1);function N(){return typeof window>"u"?e=>{setTimeout(()=>e(Date.now()),0)}:window.requestIdleCallback}var q=N();var U=()=>{let e=new Map,t=!1,i=a=>{for(let[o,s]of e)if(e.delete(o),s(),typeof a=="number"||a.timeRemaining()<=0)break;if(e.size===0){t=!1;return}q(i)};return{add:(a,o)=>{e.set(a,o),t||(t=!0,q(i))},flush:a=>{let o=e.get(a);return o===void 0?!1:(e.delete(a),o(),!0)},cancel:a=>e.delete(a),reset:()=>{e.clear(),t=!1}}};return K(V);})();
                                                                                                                                                                                           dist/private-apis.js                                                                                0000644                 00000010140 15212564025 0010447 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).privateApis = (() => {
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // packages/private-apis/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    __dangerousOptInToUnstableAPIsOnlyForCoreModules: () => __dangerousOptInToUnstableAPIsOnlyForCoreModules
  });

  // packages/private-apis/build-module/implementation.mjs
  var CORE_MODULES_USING_PRIVATE_APIS = [
    "@wordpress/block-directory",
    "@wordpress/block-editor",
    "@wordpress/block-library",
    "@wordpress/blocks",
    "@wordpress/boot",
    "@wordpress/commands",
    "@wordpress/connectors",
    "@wordpress/workflows",
    "@wordpress/components",
    "@wordpress/core-commands",
    "@wordpress/core-data",
    "@wordpress/customize-widgets",
    "@wordpress/data",
    "@wordpress/edit-post",
    "@wordpress/edit-site",
    "@wordpress/edit-widgets",
    "@wordpress/editor",
    "@wordpress/font-list-route",
    "@wordpress/format-library",
    "@wordpress/patterns",
    "@wordpress/preferences",
    "@wordpress/reusable-blocks",
    "@wordpress/rich-text",
    "@wordpress/route",
    "@wordpress/router",
    "@wordpress/routes",
    "@wordpress/sync",
    "@wordpress/theme",
    "@wordpress/dataviews",
    "@wordpress/fields",
    "@wordpress/lazy-editor",
    "@wordpress/media-utils",
    "@wordpress/upload-media",
    "@wordpress/global-styles-ui",
    "@wordpress/ui"
  ];
  var requiredConsent = "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.";
  var __dangerousOptInToUnstableAPIsOnlyForCoreModules = (consent, moduleName) => {
    if (!CORE_MODULES_USING_PRIVATE_APIS.includes(moduleName)) {
      throw new Error(
        `You tried to opt-in to unstable APIs as module "${moduleName}". This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.`
      );
    }
    if (consent !== requiredConsent) {
      throw new Error(
        `You tried to opt-in to unstable APIs without confirming you know the consequences. This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on the next WordPress release.`
      );
    }
    return {
      lock,
      unlock
    };
  };
  function lock(object, privateData) {
    if (!object) {
      throw new Error("Cannot lock an undefined object.");
    }
    const _object = object;
    if (!(__private in _object)) {
      _object[__private] = {};
    }
    lockedData.set(_object[__private], privateData);
  }
  function unlock(object) {
    if (!object) {
      throw new Error("Cannot unlock an undefined object.");
    }
    const _object = object;
    if (!(__private in _object)) {
      throw new Error(
        "Cannot unlock an object that was not locked before. "
      );
    }
    return lockedData.get(_object[__private]);
  }
  var lockedData = /* @__PURE__ */ new WeakMap();
  var __private = /* @__PURE__ */ Symbol("Private API ID");
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                                                                                                                                dist/private-apis.min.js                                                                            0000644                 00000005200 15212564025 0011232 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).privateApis=(()=>{var n=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var u=(r,e)=>{for(var o in e)n(r,o,{get:e[o],enumerable:!0})},c=(r,e,o,d)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of w(e))!p.call(r,s)&&s!==o&&n(r,s,{get:()=>e[s],enumerable:!(d=l(e,s))||d.enumerable});return r};var f=r=>c(n({},"__esModule",{value:!0}),r);var y={};u(y,{__dangerousOptInToUnstableAPIsOnlyForCoreModules:()=>i});var h=["@wordpress/block-directory","@wordpress/block-editor","@wordpress/block-library","@wordpress/blocks","@wordpress/boot","@wordpress/commands","@wordpress/connectors","@wordpress/workflows","@wordpress/components","@wordpress/core-commands","@wordpress/core-data","@wordpress/customize-widgets","@wordpress/data","@wordpress/edit-post","@wordpress/edit-site","@wordpress/edit-widgets","@wordpress/editor","@wordpress/font-list-route","@wordpress/format-library","@wordpress/patterns","@wordpress/preferences","@wordpress/reusable-blocks","@wordpress/rich-text","@wordpress/route","@wordpress/router","@wordpress/routes","@wordpress/sync","@wordpress/theme","@wordpress/dataviews","@wordpress/fields","@wordpress/lazy-editor","@wordpress/media-utils","@wordpress/upload-media","@wordpress/global-styles-ui","@wordpress/ui"],b="I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",i=(r,e)=>{if(!h.includes(e))throw new Error(`You tried to opt-in to unstable APIs as module "${e}". This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.`);if(r!==b)throw new Error("You tried to opt-in to unstable APIs without confirming you know the consequences. This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on the next WordPress release.");return{lock:m,unlock:k}};function m(r,e){if(!r)throw new Error("Cannot lock an undefined object.");let o=r;t in o||(o[t]={}),a.set(o[t],e)}function k(r){if(!r)throw new Error("Cannot unlock an undefined object.");let e=r;if(!(t in e))throw new Error("Cannot unlock an object that was not locked before. ");return a.get(e[t])}var a=new WeakMap,t=Symbol("Private API ID");return f(y);})();
                                                                                                                                                                                                                                                                                                                                                                                                dist/redux-routine.js                                                                               0000644                 00000061273 15212564025 0010672 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).reduxRoutine = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // node_modules/rungen/dist/utils/keys.js
  var require_keys = __commonJS({
    "node_modules/rungen/dist/utils/keys.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", {
        value: true
      });
      var keys = {
        all: /* @__PURE__ */ Symbol("all"),
        error: /* @__PURE__ */ Symbol("error"),
        fork: /* @__PURE__ */ Symbol("fork"),
        join: /* @__PURE__ */ Symbol("join"),
        race: /* @__PURE__ */ Symbol("race"),
        call: /* @__PURE__ */ Symbol("call"),
        cps: /* @__PURE__ */ Symbol("cps"),
        subscribe: /* @__PURE__ */ Symbol("subscribe")
      };
      exports.default = keys;
    }
  });

  // node_modules/rungen/dist/utils/helpers.js
  var require_helpers = __commonJS({
    "node_modules/rungen/dist/utils/helpers.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", {
        value: true
      });
      exports.createChannel = exports.subscribe = exports.cps = exports.apply = exports.call = exports.invoke = exports.delay = exports.race = exports.join = exports.fork = exports.error = exports.all = void 0;
      var _keys = require_keys();
      var _keys2 = _interopRequireDefault(_keys);
      function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : { default: obj };
      }
      var all = exports.all = function all2(value) {
        return {
          type: _keys2.default.all,
          value
        };
      };
      var error = exports.error = function error2(err) {
        return {
          type: _keys2.default.error,
          error: err
        };
      };
      var fork = exports.fork = function fork2(iterator) {
        for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
          args[_key - 1] = arguments[_key];
        }
        return {
          type: _keys2.default.fork,
          iterator,
          args
        };
      };
      var join = exports.join = function join2(task) {
        return {
          type: _keys2.default.join,
          task
        };
      };
      var race = exports.race = function race2(competitors) {
        return {
          type: _keys2.default.race,
          competitors
        };
      };
      var delay = exports.delay = function delay2(timeout) {
        return new Promise(function(resolve) {
          setTimeout(function() {
            return resolve(true);
          }, timeout);
        });
      };
      var invoke = exports.invoke = function invoke2(func) {
        for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
          args[_key2 - 1] = arguments[_key2];
        }
        return {
          type: _keys2.default.call,
          func,
          context: null,
          args
        };
      };
      var call = exports.call = function call2(func, context) {
        for (var _len3 = arguments.length, args = Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
          args[_key3 - 2] = arguments[_key3];
        }
        return {
          type: _keys2.default.call,
          func,
          context,
          args
        };
      };
      var apply = exports.apply = function apply2(func, context, args) {
        return {
          type: _keys2.default.call,
          func,
          context,
          args
        };
      };
      var cps = exports.cps = function cps2(func) {
        for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
          args[_key4 - 1] = arguments[_key4];
        }
        return {
          type: _keys2.default.cps,
          func,
          args
        };
      };
      var subscribe = exports.subscribe = function subscribe2(channel) {
        return {
          type: _keys2.default.subscribe,
          channel
        };
      };
      var createChannel = exports.createChannel = function createChannel2(callback) {
        var listeners = [];
        var subscribe2 = function subscribe3(l) {
          listeners.push(l);
          return function() {
            return listeners.splice(listeners.indexOf(l), 1);
          };
        };
        var next = function next2(val) {
          return listeners.forEach(function(l) {
            return l(val);
          });
        };
        callback(next);
        return {
          subscribe: subscribe2
        };
      };
    }
  });

  // node_modules/rungen/dist/utils/is.js
  var require_is = __commonJS({
    "node_modules/rungen/dist/utils/is.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", {
        value: true
      });
      var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
        return typeof obj;
      } : function(obj) {
        return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;
      };
      var _keys = require_keys();
      var _keys2 = _interopRequireDefault(_keys);
      function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : { default: obj };
      }
      var is = {
        obj: function obj(value) {
          return (typeof value === "undefined" ? "undefined" : _typeof(value)) === "object" && !!value;
        },
        all: function all(value) {
          return is.obj(value) && value.type === _keys2.default.all;
        },
        error: function error(value) {
          return is.obj(value) && value.type === _keys2.default.error;
        },
        array: Array.isArray,
        func: function func(value) {
          return typeof value === "function";
        },
        promise: function promise(value) {
          return value && is.func(value.then);
        },
        iterator: function iterator(value) {
          return value && is.func(value.next) && is.func(value.throw);
        },
        fork: function fork(value) {
          return is.obj(value) && value.type === _keys2.default.fork;
        },
        join: function join(value) {
          return is.obj(value) && value.type === _keys2.default.join;
        },
        race: function race(value) {
          return is.obj(value) && value.type === _keys2.default.race;
        },
        call: function call(value) {
          return is.obj(value) && value.type === _keys2.default.call;
        },
        cps: function cps(value) {
          return is.obj(value) && value.type === _keys2.default.cps;
        },
        subscribe: function subscribe(value) {
          return is.obj(value) && value.type === _keys2.default.subscribe;
        },
        channel: function channel(value) {
          return is.obj(value) && is.func(value.subscribe);
        }
      };
      exports.default = is;
    }
  });

  // node_modules/rungen/dist/controls/builtin.js
  var require_builtin = __commonJS({
    "node_modules/rungen/dist/controls/builtin.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", {
        value: true
      });
      exports.iterator = exports.array = exports.object = exports.error = exports.any = void 0;
      var _is = require_is();
      var _is2 = _interopRequireDefault(_is);
      function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : { default: obj };
      }
      var any = exports.any = function any2(value, next, rungen, yieldNext) {
        yieldNext(value);
        return true;
      };
      var error = exports.error = function error2(value, next, rungen, yieldNext, raiseNext) {
        if (!_is2.default.error(value)) return false;
        raiseNext(value.error);
        return true;
      };
      var object = exports.object = function object2(value, next, rungen, yieldNext, raiseNext) {
        if (!_is2.default.all(value) || !_is2.default.obj(value.value)) return false;
        var result = {};
        var keys = Object.keys(value.value);
        var count = 0;
        var hasError = false;
        var gotResultSuccess = function gotResultSuccess2(key, ret) {
          if (hasError) return;
          result[key] = ret;
          count++;
          if (count === keys.length) {
            yieldNext(result);
          }
        };
        var gotResultError = function gotResultError2(key, error2) {
          if (hasError) return;
          hasError = true;
          raiseNext(error2);
        };
        keys.map(function(key) {
          rungen(value.value[key], function(ret) {
            return gotResultSuccess(key, ret);
          }, function(err) {
            return gotResultError(key, err);
          });
        });
        return true;
      };
      var array = exports.array = function array2(value, next, rungen, yieldNext, raiseNext) {
        if (!_is2.default.all(value) || !_is2.default.array(value.value)) return false;
        var result = [];
        var count = 0;
        var hasError = false;
        var gotResultSuccess = function gotResultSuccess2(key, ret) {
          if (hasError) return;
          result[key] = ret;
          count++;
          if (count === value.value.length) {
            yieldNext(result);
          }
        };
        var gotResultError = function gotResultError2(key, error2) {
          if (hasError) return;
          hasError = true;
          raiseNext(error2);
        };
        value.value.map(function(v, key) {
          rungen(v, function(ret) {
            return gotResultSuccess(key, ret);
          }, function(err) {
            return gotResultError(key, err);
          });
        });
        return true;
      };
      var iterator = exports.iterator = function iterator2(value, next, rungen, yieldNext, raiseNext) {
        if (!_is2.default.iterator(value)) return false;
        rungen(value, next, raiseNext);
        return true;
      };
      exports.default = [error, iterator, array, object, any];
    }
  });

  // node_modules/rungen/dist/create.js
  var require_create = __commonJS({
    "node_modules/rungen/dist/create.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", {
        value: true
      });
      var _builtin = require_builtin();
      var _builtin2 = _interopRequireDefault(_builtin);
      var _is = require_is();
      var _is2 = _interopRequireDefault(_is);
      function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : { default: obj };
      }
      function _toConsumableArray(arr) {
        if (Array.isArray(arr)) {
          for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
            arr2[i] = arr[i];
          }
          return arr2;
        } else {
          return Array.from(arr);
        }
      }
      var create2 = function create3() {
        var userControls = arguments.length <= 0 || arguments[0] === void 0 ? [] : arguments[0];
        var controls = [].concat(_toConsumableArray(userControls), _toConsumableArray(_builtin2.default));
        var runtime = function runtime2(input) {
          var success = arguments.length <= 1 || arguments[1] === void 0 ? function() {
          } : arguments[1];
          var error = arguments.length <= 2 || arguments[2] === void 0 ? function() {
          } : arguments[2];
          var iterate = function iterate2(gen) {
            var yieldValue = function yieldValue2(isError) {
              return function(ret) {
                try {
                  var _ref = isError ? gen.throw(ret) : gen.next(ret);
                  var value = _ref.value;
                  var done = _ref.done;
                  if (done) return success(value);
                  next(value);
                } catch (e) {
                  return error(e);
                }
              };
            };
            var next = function next2(ret) {
              controls.some(function(control) {
                return control(ret, next2, runtime2, yieldValue(false), yieldValue(true));
              });
            };
            yieldValue(false)();
          };
          var iterator = _is2.default.iterator(input) ? input : regeneratorRuntime.mark(function _callee() {
            return regeneratorRuntime.wrap(function _callee$(_context) {
              while (1) {
                switch (_context.prev = _context.next) {
                  case 0:
                    _context.next = 2;
                    return input;
                  case 2:
                    return _context.abrupt("return", _context.sent);
                  case 3:
                  case "end":
                    return _context.stop();
                }
              }
            }, _callee, this);
          })();
          iterate(iterator, success, error);
        };
        return runtime;
      };
      exports.default = create2;
    }
  });

  // node_modules/rungen/dist/utils/dispatcher.js
  var require_dispatcher = __commonJS({
    "node_modules/rungen/dist/utils/dispatcher.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", {
        value: true
      });
      var createDispatcher = function createDispatcher2() {
        var listeners = [];
        return {
          subscribe: function subscribe(listener) {
            listeners.push(listener);
            return function() {
              listeners = listeners.filter(function(l) {
                return l !== listener;
              });
            };
          },
          dispatch: function dispatch(action) {
            listeners.slice().forEach(function(listener) {
              return listener(action);
            });
          }
        };
      };
      exports.default = createDispatcher;
    }
  });

  // node_modules/rungen/dist/controls/async.js
  var require_async = __commonJS({
    "node_modules/rungen/dist/controls/async.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", {
        value: true
      });
      exports.race = exports.join = exports.fork = exports.promise = void 0;
      var _is = require_is();
      var _is2 = _interopRequireDefault(_is);
      var _helpers = require_helpers();
      var _dispatcher = require_dispatcher();
      var _dispatcher2 = _interopRequireDefault(_dispatcher);
      function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : { default: obj };
      }
      var promise = exports.promise = function promise2(value, next, rungen, yieldNext, raiseNext) {
        if (!_is2.default.promise(value)) return false;
        value.then(next, raiseNext);
        return true;
      };
      var forkedTasks = /* @__PURE__ */ new Map();
      var fork = exports.fork = function fork2(value, next, rungen) {
        if (!_is2.default.fork(value)) return false;
        var task = /* @__PURE__ */ Symbol("fork");
        var dispatcher = (0, _dispatcher2.default)();
        forkedTasks.set(task, dispatcher);
        rungen(value.iterator.apply(null, value.args), function(result) {
          return dispatcher.dispatch(result);
        }, function(err) {
          return dispatcher.dispatch((0, _helpers.error)(err));
        });
        var unsubscribe = dispatcher.subscribe(function() {
          unsubscribe();
          forkedTasks.delete(task);
        });
        next(task);
        return true;
      };
      var join = exports.join = function join2(value, next, rungen, yieldNext, raiseNext) {
        if (!_is2.default.join(value)) return false;
        var dispatcher = forkedTasks.get(value.task);
        if (!dispatcher) {
          raiseNext("join error : task not found");
        } else {
          (function() {
            var unsubscribe = dispatcher.subscribe(function(result) {
              unsubscribe();
              next(result);
            });
          })();
        }
        return true;
      };
      var race = exports.race = function race2(value, next, rungen, yieldNext, raiseNext) {
        if (!_is2.default.race(value)) return false;
        var finished = false;
        var success = function success2(result, k, v) {
          if (finished) return;
          finished = true;
          result[k] = v;
          next(result);
        };
        var fail = function fail2(err) {
          if (finished) return;
          raiseNext(err);
        };
        if (_is2.default.array(value.competitors)) {
          (function() {
            var result = value.competitors.map(function() {
              return false;
            });
            value.competitors.forEach(function(competitor, index) {
              rungen(competitor, function(output) {
                return success(result, index, output);
              }, fail);
            });
          })();
        } else {
          (function() {
            var result = Object.keys(value.competitors).reduce(function(p, c) {
              p[c] = false;
              return p;
            }, {});
            Object.keys(value.competitors).forEach(function(index) {
              rungen(value.competitors[index], function(output) {
                return success(result, index, output);
              }, fail);
            });
          })();
        }
        return true;
      };
      var subscribe = function subscribe2(value, next) {
        if (!_is2.default.subscribe(value)) return false;
        if (!_is2.default.channel(value.channel)) {
          throw new Error('the first argument of "subscribe" must be a valid channel');
        }
        var unsubscribe = value.channel.subscribe(function(ret) {
          unsubscribe && unsubscribe();
          next(ret);
        });
        return true;
      };
      exports.default = [promise, fork, join, race, subscribe];
    }
  });

  // node_modules/rungen/dist/controls/wrap.js
  var require_wrap = __commonJS({
    "node_modules/rungen/dist/controls/wrap.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", {
        value: true
      });
      exports.cps = exports.call = void 0;
      var _is = require_is();
      var _is2 = _interopRequireDefault(_is);
      function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : { default: obj };
      }
      function _toConsumableArray(arr) {
        if (Array.isArray(arr)) {
          for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
            arr2[i] = arr[i];
          }
          return arr2;
        } else {
          return Array.from(arr);
        }
      }
      var call = exports.call = function call2(value, next, rungen, yieldNext, raiseNext) {
        if (!_is2.default.call(value)) return false;
        try {
          next(value.func.apply(value.context, value.args));
        } catch (err) {
          raiseNext(err);
        }
        return true;
      };
      var cps = exports.cps = function cps2(value, next, rungen, yieldNext, raiseNext) {
        var _value$func;
        if (!_is2.default.cps(value)) return false;
        (_value$func = value.func).call.apply(_value$func, [null].concat(_toConsumableArray(value.args), [function(err, result) {
          if (err) raiseNext(err);
          else next(result);
        }]));
        return true;
      };
      exports.default = [call, cps];
    }
  });

  // node_modules/rungen/dist/index.js
  var require_dist = __commonJS({
    "node_modules/rungen/dist/index.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", {
        value: true
      });
      exports.wrapControls = exports.asyncControls = exports.create = void 0;
      var _helpers = require_helpers();
      Object.keys(_helpers).forEach(function(key) {
        if (key === "default") return;
        Object.defineProperty(exports, key, {
          enumerable: true,
          get: function get() {
            return _helpers[key];
          }
        });
      });
      var _create = require_create();
      var _create2 = _interopRequireDefault(_create);
      var _async = require_async();
      var _async2 = _interopRequireDefault(_async);
      var _wrap = require_wrap();
      var _wrap2 = _interopRequireDefault(_wrap);
      function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : { default: obj };
      }
      exports.create = _create2.default;
      exports.asyncControls = _async2.default;
      exports.wrapControls = _wrap2.default;
    }
  });

  // packages/redux-routine/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    default: () => createMiddleware
  });

  // packages/redux-routine/build-module/is-generator.mjs
  function isGenerator(object) {
    return !!object && typeof object[Symbol.iterator] === "function" && typeof object.next === "function";
  }

  // packages/redux-routine/build-module/runtime.mjs
  var import_rungen = __toESM(require_dist(), 1);

  // node_modules/is-promise/index.mjs
  function isPromise(obj) {
    return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function";
  }

  // node_modules/is-plain-object/dist/is-plain-object.mjs
  function isObject(o) {
    return Object.prototype.toString.call(o) === "[object Object]";
  }
  function isPlainObject(o) {
    var ctor, prot;
    if (isObject(o) === false) return false;
    ctor = o.constructor;
    if (ctor === void 0) return true;
    prot = ctor.prototype;
    if (isObject(prot) === false) return false;
    if (prot.hasOwnProperty("isPrototypeOf") === false) {
      return false;
    }
    return true;
  }

  // packages/redux-routine/build-module/is-action.mjs
  function isAction(object) {
    return isPlainObject(object) && typeof object.type === "string";
  }
  function isActionOfType(object, expectedType) {
    return isAction(object) && object.type === expectedType;
  }

  // packages/redux-routine/build-module/runtime.mjs
  function createRuntime(controls = {}, dispatch) {
    const rungenControls = Object.entries(controls).map(
      ([actionType, control]) => (value, next, iterate, yieldNext, yieldError) => {
        if (!isActionOfType(value, actionType)) {
          return false;
        }
        const routine = control(value);
        if (isPromise(routine)) {
          routine.then(yieldNext, yieldError);
        } else {
          yieldNext(routine);
        }
        return true;
      }
    );
    const unhandledActionControl = (value, next) => {
      if (!isAction(value)) {
        return false;
      }
      dispatch(value);
      next();
      return true;
    };
    rungenControls.push(unhandledActionControl);
    const rungenRuntime = (0, import_rungen.create)(rungenControls);
    return (action) => new Promise(
      (resolve, reject) => rungenRuntime(
        action,
        (result) => {
          if (isAction(result)) {
            dispatch(result);
          }
          resolve(result);
        },
        reject
      )
    );
  }

  // packages/redux-routine/build-module/index.mjs
  function createMiddleware(controls = {}) {
    return (store) => {
      const runtime = createRuntime(controls, store.dispatch);
      return (next) => (action) => {
        if (!isGenerator(action)) {
          return next(action);
        }
        return runtime(action);
      };
    };
  }
  return __toCommonJS(index_exports);
})();
/*! Bundled license information:

is-plain-object/dist/is-plain-object.mjs:
  (*!
   * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
   *
   * Copyright (c) 2014-2017, Jon Schlinkert.
   * Released under the MIT License.
   *)
*/
if (typeof wp.reduxRoutine === 'object' && wp.reduxRoutine.default) { wp.reduxRoutine = wp.reduxRoutine.default; }
                                                                                                                                                                                                                                                                                                                                     dist/redux-routine.min.js                                                                           0000644                 00000023166 15212564025 0011453 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).reduxRoutine=(()=>{var fr=Object.create;var S=Object.defineProperty;var cr=Object.getOwnPropertyDescriptor;var sr=Object.getOwnPropertyNames;var lr=Object.getPrototypeOf,pr=Object.prototype.hasOwnProperty;var g=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),dr=(e,r)=>{for(var t in r)S(e,t,{get:r[t],enumerable:!0})},F=(e,r,t,u)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of sr(r))!pr.call(e,n)&&n!==t&&S(e,n,{get:()=>r[n],enumerable:!(u=cr(r,n))||u.enumerable});return e};var yr=(e,r,t)=>(t=e!=null?fr(lr(e)):{},F(r||!e||!e.__esModule?S(t,"default",{value:e,enumerable:!0}):t,e)),mr=e=>F(S({},"__esModule",{value:!0}),e);var C=g(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});var br={all:Symbol("all"),error:Symbol("error"),fork:Symbol("fork"),join:Symbol("join"),race:Symbol("race"),call:Symbol("call"),cps:Symbol("cps"),subscribe:Symbol("subscribe")};w.default=br});var E=g(c=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});c.createChannel=c.subscribe=c.cps=c.apply=c.call=c.invoke=c.delay=c.race=c.join=c.fork=c.error=c.all=void 0;var vr=C(),h=hr(vr);function hr(e){return e&&e.__esModule?e:{default:e}}var oe=c.all=function(r){return{type:h.default.all,value:r}},ie=c.error=function(r){return{type:h.default.error,error:r}},fe=c.fork=function(r){for(var t=arguments.length,u=Array(t>1?t-1:0),n=1;n<t;n++)u[n-1]=arguments[n];return{type:h.default.fork,iterator:r,args:u}},ce=c.join=function(r){return{type:h.default.join,task:r}},se=c.race=function(r){return{type:h.default.race,competitors:r}},le=c.delay=function(r){return new Promise(function(t){setTimeout(function(){return t(!0)},r)})},pe=c.invoke=function(r){for(var t=arguments.length,u=Array(t>1?t-1:0),n=1;n<t;n++)u[n-1]=arguments[n];return{type:h.default.call,func:r,context:null,args:u}},de=c.call=function(r,t){for(var u=arguments.length,n=Array(u>2?u-2:0),a=2;a<u;a++)n[a-2]=arguments[a];return{type:h.default.call,func:r,context:t,args:n}},ye=c.apply=function(r,t,u){return{type:h.default.call,func:r,context:t,args:u}},me=c.cps=function(r){for(var t=arguments.length,u=Array(t>1?t-1:0),n=1;n<t;n++)u[n-1]=arguments[n];return{type:h.default.cps,func:r,args:u}},be=c.subscribe=function(r){return{type:h.default.subscribe,channel:r}},ve=c.createChannel=function(r){var t=[],u=function(o){return t.push(o),function(){return t.splice(t.indexOf(o),1)}},n=function(o){return t.forEach(function(f){return f(o)})};return r(n),{subscribe:u}}});var q=g(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});var gr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol?"symbol":typeof e},_r=C(),j=jr(_r);function jr(e){return e&&e.__esModule?e:{default:e}}var m={obj:function(r){return(typeof r>"u"?"undefined":gr(r))==="object"&&!!r},all:function(r){return m.obj(r)&&r.type===j.default.all},error:function(r){return m.obj(r)&&r.type===j.default.error},array:Array.isArray,func:function(r){return typeof r=="function"},promise:function(r){return r&&m.func(r.then)},iterator:function(r){return r&&m.func(r.next)&&m.func(r.throw)},fork:function(r){return m.obj(r)&&r.type===j.default.fork},join:function(r){return m.obj(r)&&r.type===j.default.join},race:function(r){return m.obj(r)&&r.type===j.default.race},call:function(r){return m.obj(r)&&r.type===j.default.call},cps:function(r){return m.obj(r)&&r.type===j.default.cps},subscribe:function(r){return m.obj(r)&&r.type===j.default.subscribe},channel:function(r){return m.obj(r)&&m.func(r.subscribe)}};D.default=m});var I=g(b=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.iterator=b.array=b.object=b.error=b.any=void 0;var xr=q(),A=Or(xr);function Or(e){return e&&e.__esModule?e:{default:e}}var kr=b.any=function(r,t,u,n){return n(r),!0},Ar=b.error=function(r,t,u,n,a){return A.default.error(r)?(a(r.error),!0):!1},qr=b.object=function(r,t,u,n,a){if(!A.default.all(r)||!A.default.obj(r.value))return!1;var o={},f=Object.keys(r.value),l=0,y=!1,s=function(d,k){y||(o[d]=k,l++,l===f.length&&n(o))},p=function(d,k){y||(y=!0,a(k))};return f.map(function(i){u(r.value[i],function(d){return s(i,d)},function(d){return p(i,d)})}),!0},Rr=b.array=function(r,t,u,n,a){if(!A.default.all(r)||!A.default.array(r.value))return!1;var o=[],f=0,l=!1,y=function(i,d){l||(o[i]=d,f++,f===r.value.length&&n(o))},s=function(i,d){l||(l=!0,a(d))};return r.value.map(function(p,i){u(p,function(d){return y(i,d)},function(d){return s(i,d)})}),!0},Sr=b.iterator=function(r,t,u,n,a){return A.default.iterator(r)?(u(r,t,a),!0):!1};b.default=[Ar,Sr,Rr,qr,kr]});var L=g(N=>{"use strict";Object.defineProperty(N,"__esModule",{value:!0});var Mr=I(),Pr=K(Mr),wr=q(),Cr=K(wr);function K(e){return e&&e.__esModule?e:{default:e}}function J(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}else return Array.from(e)}var Er=function(){var r=arguments.length<=0||arguments[0]===void 0?[]:arguments[0],t=[].concat(J(r),J(Pr.default)),u=function n(a){var o=arguments.length<=1||arguments[1]===void 0?function(){}:arguments[1],f=arguments.length<=2||arguments[2]===void 0?function(){}:arguments[2],l=function(p){var i=function(P){return function(R){try{var z=P?p.throw(R):p.next(R),B=z.value,or=z.done;if(or)return o(B);d(B)}catch(ir){return f(ir)}}},d=function k(P){t.some(function(R){return R(P,k,n,i(!1),i(!0))})};i(!1)()},y=Cr.default.iterator(a)?a:regeneratorRuntime.mark(function s(){return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,a;case 2:return i.abrupt("return",i.sent);case 3:case"end":return i.stop()}},s,this)})();l(y,o,f)};return u};N.default=Er});var Q=g(T=>{"use strict";Object.defineProperty(T,"__esModule",{value:!0});var Dr=function(){var r=[];return{subscribe:function(u){return r.push(u),function(){r=r.filter(function(n){return n!==u})}},dispatch:function(u){r.slice().forEach(function(n){return n(u)})}}};T.default=Dr});var W=g(v=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0});v.race=v.join=v.fork=v.promise=void 0;var Nr=q(),x=U(Nr),Tr=E(),Gr=Q(),Vr=U(Gr);function U(e){return e&&e.__esModule?e:{default:e}}var $r=v.promise=function(r,t,u,n,a){return x.default.promise(r)?(r.then(t,a),!0):!1},G=new Map,zr=v.fork=function(r,t,u){if(!x.default.fork(r))return!1;var n=Symbol("fork"),a=(0,Vr.default)();G.set(n,a),u(r.iterator.apply(null,r.args),function(f){return a.dispatch(f)},function(f){return a.dispatch((0,Tr.error)(f))});var o=a.subscribe(function(){o(),G.delete(n)});return t(n),!0},Br=v.join=function(r,t,u,n,a){if(!x.default.join(r))return!1;var o=G.get(r.task);return o?(function(){var f=o.subscribe(function(l){f(),t(l)})})():a("join error : task not found"),!0},Fr=v.race=function(r,t,u,n,a){if(!x.default.race(r))return!1;var o=!1,f=function(s,p,i){o||(o=!0,s[p]=i,t(s))},l=function(s){o||a(s)};return x.default.array(r.competitors)?(function(){var y=r.competitors.map(function(){return!1});r.competitors.forEach(function(s,p){u(s,function(i){return f(y,p,i)},l)})})():(function(){var y=Object.keys(r.competitors).reduce(function(s,p){return s[p]=!1,s},{});Object.keys(r.competitors).forEach(function(s){u(r.competitors[s],function(p){return f(y,s,p)},l)})})(),!0},Hr=function(r,t){if(!x.default.subscribe(r))return!1;if(!x.default.channel(r.channel))throw new Error('the first argument of "subscribe" must be a valid channel');var u=r.channel.subscribe(function(n){u&&u(),t(n)});return!0};v.default=[$r,zr,Br,Fr,Hr]});var Y=g(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.cps=O.call=void 0;var Ir=q(),X=Jr(Ir);function Jr(e){return e&&e.__esModule?e:{default:e}}function Kr(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}else return Array.from(e)}var Lr=O.call=function(r,t,u,n,a){if(!X.default.call(r))return!1;try{t(r.func.apply(r.context,r.args))}catch(o){a(o)}return!0},Qr=O.cps=function(r,t,u,n,a){var o;return X.default.cps(r)?((o=r.func).call.apply(o,[null].concat(Kr(r.args),[function(f,l){f?a(f):t(l)}])),!0):!1};O.default=[Lr,Qr]});var rr=g(_=>{"use strict";Object.defineProperty(_,"__esModule",{value:!0});_.wrapControls=_.asyncControls=_.create=void 0;var Z=E();Object.keys(Z).forEach(function(e){e!=="default"&&Object.defineProperty(_,e,{enumerable:!0,get:function(){return Z[e]}})});var Ur=L(),Wr=V(Ur),Xr=W(),Yr=V(Xr),Zr=Y(),re=V(Zr);function V(e){return e&&e.__esModule?e:{default:e}}_.create=Wr.default;_.asyncControls=Yr.default;_.wrapControls=re.default});var te={};dr(te,{default:()=>ee});function H(e){return!!e&&typeof e[Symbol.iterator]=="function"&&typeof e.next=="function"}var ur=yr(rr(),1);function $(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}function er(e){return Object.prototype.toString.call(e)==="[object Object]"}function tr(e){var r,t;return er(e)===!1?!1:(r=e.constructor,r===void 0?!0:(t=r.prototype,!(er(t)===!1||t.hasOwnProperty("isPrototypeOf")===!1)))}function M(e){return tr(e)&&typeof e.type=="string"}function nr(e,r){return M(e)&&e.type===r}function ar(e={},r){let t=Object.entries(e).map(([a,o])=>(f,l,y,s,p)=>{if(!nr(f,a))return!1;let i=o(f);return $(i)?i.then(s,p):s(i),!0}),u=(a,o)=>M(a)?(r(a),o(),!0):!1;t.push(u);let n=(0,ur.create)(t);return a=>new Promise((o,f)=>n(a,l=>{M(l)&&r(l),o(l)},f))}function ee(e={}){return r=>{let t=ar(e,r.dispatch);return u=>n=>H(n)?t(n):u(n)}}return mr(te);})();
/*! Bundled license information:

is-plain-object/dist/is-plain-object.mjs:
  (*!
   * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
   *
   * Copyright (c) 2014-2017, Jon Schlinkert.
   * Released under the MIT License.
   *)
*/
if (typeof wp.reduxRoutine === 'object' && wp.reduxRoutine.default) { wp.reduxRoutine = wp.reduxRoutine.default; }
                                                                                                                                                                                                                                                                                                                                                                                                          dist/reusable-blocks.js                                                                             0000644                 00000051014 15212564025 0011125 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;
(wp ||= {}).reusableBlocks = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/block-editor
  var require_block_editor = __commonJS({
    "package-external:@wordpress/block-editor"(exports, module) {
      module.exports = window.wp.blockEditor;
    }
  });

  // package-external:@wordpress/blocks
  var require_blocks = __commonJS({
    "package-external:@wordpress/blocks"(exports, module) {
      module.exports = window.wp.blocks;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/components
  var require_components = __commonJS({
    "package-external:@wordpress/components"(exports, module) {
      module.exports = window.wp.components;
    }
  });

  // package-external:@wordpress/primitives
  var require_primitives = __commonJS({
    "package-external:@wordpress/primitives"(exports, module) {
      module.exports = window.wp.primitives;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // package-external:@wordpress/notices
  var require_notices = __commonJS({
    "package-external:@wordpress/notices"(exports, module) {
      module.exports = window.wp.notices;
    }
  });

  // package-external:@wordpress/core-data
  var require_core_data = __commonJS({
    "package-external:@wordpress/core-data"(exports, module) {
      module.exports = window.wp.coreData;
    }
  });

  // package-external:@wordpress/url
  var require_url = __commonJS({
    "package-external:@wordpress/url"(exports, module) {
      module.exports = window.wp.url;
    }
  });

  // packages/reusable-blocks/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    ReusableBlocksMenuItems: () => ReusableBlocksMenuItems,
    store: () => store
  });

  // packages/reusable-blocks/build-module/store/index.mjs
  var import_data2 = __toESM(require_data(), 1);

  // packages/reusable-blocks/build-module/store/actions.mjs
  var actions_exports = {};
  __export(actions_exports, {
    __experimentalConvertBlockToStatic: () => __experimentalConvertBlockToStatic,
    __experimentalConvertBlocksToReusable: () => __experimentalConvertBlocksToReusable,
    __experimentalDeleteReusableBlock: () => __experimentalDeleteReusableBlock,
    __experimentalSetEditingReusableBlock: () => __experimentalSetEditingReusableBlock
  });
  var import_block_editor = __toESM(require_block_editor(), 1);
  var import_blocks = __toESM(require_blocks(), 1);
  var import_i18n = __toESM(require_i18n(), 1);
  var __experimentalConvertBlockToStatic = (clientId) => ({ registry }) => {
    const oldBlock = registry.select(import_block_editor.store).getBlock(clientId);
    const reusableBlock = registry.select("core").getEditedEntityRecord(
      "postType",
      "wp_block",
      oldBlock.attributes.ref
    );
    const newBlocks = (0, import_blocks.parse)(
      typeof reusableBlock.content === "function" ? reusableBlock.content(reusableBlock) : reusableBlock.content
    );
    registry.dispatch(import_block_editor.store).replaceBlocks(oldBlock.clientId, newBlocks);
  };
  var __experimentalConvertBlocksToReusable = (clientIds, title, syncType) => async ({ registry, dispatch }) => {
    const meta = syncType === "unsynced" ? {
      wp_pattern_sync_status: syncType
    } : void 0;
    const reusableBlock = {
      title: title || (0, import_i18n.__)("Untitled pattern block"),
      content: (0, import_blocks.serialize)(
        registry.select(import_block_editor.store).getBlocksByClientId(clientIds)
      ),
      status: "publish",
      meta
    };
    const updatedRecord = await registry.dispatch("core").saveEntityRecord("postType", "wp_block", reusableBlock);
    if (syncType === "unsynced") {
      return;
    }
    const newBlock = (0, import_blocks.createBlock)("core/block", {
      ref: updatedRecord.id
    });
    registry.dispatch(import_block_editor.store).replaceBlocks(clientIds, newBlock);
    dispatch.__experimentalSetEditingReusableBlock(
      newBlock.clientId,
      true
    );
  };
  var __experimentalDeleteReusableBlock = (id) => async ({ registry }) => {
    const reusableBlock = registry.select("core").getEditedEntityRecord("postType", "wp_block", id);
    if (!reusableBlock) {
      return;
    }
    const allBlocks = registry.select(import_block_editor.store).getBlocks();
    const associatedBlocks = allBlocks.filter(
      (block) => (0, import_blocks.isReusableBlock)(block) && block.attributes.ref === id
    );
    const associatedBlockClientIds = associatedBlocks.map(
      (block) => block.clientId
    );
    if (associatedBlockClientIds.length) {
      registry.dispatch(import_block_editor.store).removeBlocks(associatedBlockClientIds);
    }
    await registry.dispatch("core").deleteEntityRecord("postType", "wp_block", id);
  };
  function __experimentalSetEditingReusableBlock(clientId, isEditing) {
    return {
      type: "SET_EDITING_REUSABLE_BLOCK",
      clientId,
      isEditing
    };
  }

  // packages/reusable-blocks/build-module/store/reducer.mjs
  var import_data = __toESM(require_data(), 1);
  function isEditingReusableBlock(state = {}, action) {
    if (action?.type === "SET_EDITING_REUSABLE_BLOCK") {
      return {
        ...state,
        [action.clientId]: action.isEditing
      };
    }
    return state;
  }
  var reducer_default = (0, import_data.combineReducers)({
    isEditingReusableBlock
  });

  // packages/reusable-blocks/build-module/store/selectors.mjs
  var selectors_exports = {};
  __export(selectors_exports, {
    __experimentalIsEditingReusableBlock: () => __experimentalIsEditingReusableBlock
  });
  function __experimentalIsEditingReusableBlock(state, clientId) {
    return state.isEditingReusableBlock[clientId];
  }

  // packages/reusable-blocks/build-module/store/index.mjs
  var STORE_NAME = "core/reusable-blocks";
  var store = (0, import_data2.createReduxStore)(STORE_NAME, {
    actions: actions_exports,
    reducer: reducer_default,
    selectors: selectors_exports
  });
  (0, import_data2.register)(store);

  // packages/reusable-blocks/build-module/components/reusable-blocks-menu-items/index.mjs
  var import_block_editor4 = __toESM(require_block_editor(), 1);

  // packages/reusable-blocks/build-module/components/reusable-blocks-menu-items/reusable-block-convert-button.mjs
  var import_blocks2 = __toESM(require_blocks(), 1);
  var import_block_editor2 = __toESM(require_block_editor(), 1);
  var import_element = __toESM(require_element(), 1);
  var import_components = __toESM(require_components(), 1);

  // packages/icons/build-module/library/symbol.mjs
  var import_primitives = __toESM(require_primitives(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  var symbol_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { 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" }) });

  // packages/reusable-blocks/build-module/components/reusable-blocks-menu-items/reusable-block-convert-button.mjs
  var import_data3 = __toESM(require_data(), 1);
  var import_i18n2 = __toESM(require_i18n(), 1);
  var import_notices = __toESM(require_notices(), 1);
  var import_core_data = __toESM(require_core_data(), 1);
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  function ReusableBlockConvertButton({
    clientIds,
    rootClientId,
    onClose
  }) {
    const [syncType, setSyncType] = (0, import_element.useState)(void 0);
    const [isModalOpen, setIsModalOpen] = (0, import_element.useState)(false);
    const [title, setTitle] = (0, import_element.useState)("");
    const canConvert = (0, import_data3.useSelect)(
      (select) => {
        const { canUser } = select(import_core_data.store);
        const {
          getBlocksByClientId,
          canInsertBlockType,
          getBlockRootClientId
        } = select(import_block_editor2.store);
        const rootId = rootClientId || (clientIds.length > 0 ? getBlockRootClientId(clientIds[0]) : void 0);
        const blocks = getBlocksByClientId(clientIds) ?? [];
        const isReusable = blocks.length === 1 && blocks[0] && (0, import_blocks2.isReusableBlock)(blocks[0]) && !!select(import_core_data.store).getEntityRecord(
          "postType",
          "wp_block",
          blocks[0].attributes.ref
        );
        const _canConvert = (
          // Hide when this is already a reusable block.
          !isReusable && // Hide when reusable blocks are disabled.
          canInsertBlockType("core/block", rootId) && blocks.every(
            (block) => (
              // Guard against the case where a regular block has *just* been converted.
              !!block && // Hide on invalid blocks.
              block.isValid && // Hide when block doesn't support being made reusable.
              (0, import_blocks2.hasBlockSupport)(block.name, "reusable", true)
            )
          ) && // Hide when current doesn't have permission to do that.
          // Blocks refers to the wp_block post type, this checks the ability to create a post of that type.
          !!canUser("create", {
            kind: "postType",
            name: "wp_block"
          })
        );
        return _canConvert;
      },
      [clientIds, rootClientId]
    );
    const { __experimentalConvertBlocksToReusable: convertBlocksToReusable } = (0, import_data3.useDispatch)(store);
    const { createSuccessNotice, createErrorNotice } = (0, import_data3.useDispatch)(import_notices.store);
    const onConvert = (0, import_element.useCallback)(
      async function(reusableBlockTitle) {
        try {
          await convertBlocksToReusable(
            clientIds,
            reusableBlockTitle,
            syncType
          );
          createSuccessNotice(
            !syncType ? (0, import_i18n2.sprintf)(
              // translators: %s: the name the user has given to the pattern.
              (0, import_i18n2.__)("Synced pattern created: %s"),
              reusableBlockTitle
            ) : (0, import_i18n2.sprintf)(
              // translators: %s: the name the user has given to the pattern.
              (0, import_i18n2.__)("Unsynced pattern created: %s"),
              reusableBlockTitle
            ),
            {
              type: "snackbar",
              id: "convert-to-reusable-block-success"
            }
          );
        } catch (error) {
          createErrorNotice(error.message, {
            type: "snackbar",
            id: "convert-to-reusable-block-error"
          });
        }
      },
      [
        convertBlocksToReusable,
        clientIds,
        syncType,
        createSuccessNotice,
        createErrorNotice
      ]
    );
    if (!canConvert) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_components.MenuItem, { icon: symbol_default, onClick: () => setIsModalOpen(true), children: (0, import_i18n2.__)("Create pattern") }),
      isModalOpen && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
        import_components.Modal,
        {
          title: (0, import_i18n2.__)("Create pattern"),
          onRequestClose: () => {
            setIsModalOpen(false);
            setTitle("");
          },
          overlayClassName: "reusable-blocks-menu-items__convert-modal",
          children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
            "form",
            {
              onSubmit: (event) => {
                event.preventDefault();
                onConvert(title);
                setIsModalOpen(false);
                setTitle("");
                onClose();
              },
              children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_components.__experimentalVStack, { spacing: "5", children: [
                /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
                  import_components.TextControl,
                  {
                    __next40pxDefaultSize: true,
                    label: (0, import_i18n2.__)("Name"),
                    value: title,
                    onChange: setTitle,
                    placeholder: (0, import_i18n2.__)("My pattern")
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
                  import_components.ToggleControl,
                  {
                    label: (0, import_i18n2._x)("Synced", "pattern (singular)"),
                    help: (0, import_i18n2.__)(
                      "Sync this pattern across multiple locations."
                    ),
                    checked: !syncType,
                    onChange: () => {
                      setSyncType(
                        !syncType ? "unsynced" : void 0
                      );
                    }
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_components.__experimentalHStack, { justify: "right", children: [
                  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
                    import_components.Button,
                    {
                      __next40pxDefaultSize: true,
                      variant: "tertiary",
                      onClick: () => {
                        setIsModalOpen(false);
                        setTitle("");
                      },
                      children: (0, import_i18n2.__)("Cancel")
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
                    import_components.Button,
                    {
                      __next40pxDefaultSize: true,
                      variant: "primary",
                      type: "submit",
                      children: (0, import_i18n2.__)("Create")
                    }
                  )
                ] })
              ] })
            }
          )
        }
      )
    ] });
  }

  // packages/reusable-blocks/build-module/components/reusable-blocks-menu-items/reusable-blocks-manage-button.mjs
  var import_components2 = __toESM(require_components(), 1);
  var import_i18n3 = __toESM(require_i18n(), 1);
  var import_blocks3 = __toESM(require_blocks(), 1);
  var import_data4 = __toESM(require_data(), 1);
  var import_element2 = __toESM(require_element(), 1);
  var import_block_editor3 = __toESM(require_block_editor(), 1);
  var import_url = __toESM(require_url(), 1);
  var import_core_data2 = __toESM(require_core_data(), 1);
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
  function ReusableBlocksManageButton({ clientId }) {
    const [showConfirmDialog, setShowConfirmDialog] = (0, import_element2.useState)(false);
    const { canRemove, isVisible, managePatternsUrl } = (0, import_data4.useSelect)(
      (select) => {
        const { getBlock, canRemoveBlock } = select(import_block_editor3.store);
        const { canUser } = select(import_core_data2.store);
        const reusableBlock = getBlock(clientId);
        return {
          canRemove: canRemoveBlock(clientId),
          isVisible: !!reusableBlock && (0, import_blocks3.isReusableBlock)(reusableBlock) && !!canUser("update", {
            kind: "postType",
            name: "wp_block",
            id: reusableBlock.attributes.ref
          }),
          // The site editor and templates both check whether the user
          // has edit_theme_options capabilities. We can leverage that here
          // and omit the manage patterns link if the user can't access it.
          managePatternsUrl: canUser("create", {
            kind: "postType",
            name: "wp_template"
          }) ? (0, import_url.addQueryArgs)("site-editor.php", {
            p: "/pattern"
          }) : (0, import_url.addQueryArgs)("edit.php", {
            post_type: "wp_block"
          })
        };
      },
      [clientId]
    );
    const { __experimentalConvertBlockToStatic: convertBlockToStatic } = (0, import_data4.useDispatch)(store);
    if (!isVisible) {
      return null;
    }
    const handleDetach = () => {
      convertBlockToStatic(clientId);
      setShowConfirmDialog(false);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_components2.MenuItem, { href: managePatternsUrl, children: (0, import_i18n3.__)("Manage patterns") }),
      canRemove && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_components2.MenuItem, { onClick: () => setShowConfirmDialog(true), children: (0, import_i18n3.__)("Disconnect pattern") }),
        /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
          import_components2.__experimentalConfirmDialog,
          {
            isOpen: showConfirmDialog,
            onConfirm: handleDetach,
            onCancel: () => setShowConfirmDialog(false),
            confirmButtonText: (0, import_i18n3.__)("Disconnect"),
            size: "medium",
            title: (0, import_i18n3.__)("Disconnect pattern?"),
            __experimentalHideHeader: false,
            children: (0, import_i18n3.__)(
              "Blocks will be separated from the original pattern and will be fully editable. Future changes to the pattern will not apply here."
            )
          }
        )
      ] })
    ] });
  }
  var reusable_blocks_manage_button_default = ReusableBlocksManageButton;

  // packages/reusable-blocks/build-module/components/reusable-blocks-menu-items/index.mjs
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
  function ReusableBlocksMenuItems({ rootClientId }) {
    return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_block_editor4.BlockSettingsMenuControls, { children: ({ onClose, selectedClientIds }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
        ReusableBlockConvertButton,
        {
          clientIds: selectedClientIds,
          rootClientId,
          onClose
        }
      ),
      selectedClientIds.length === 1 && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
        reusable_blocks_manage_button_default,
        {
          clientId: selectedClientIds[0]
        }
      )
    ] }) });
  }
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    dist/reusable-blocks.min.js                                                                         0000644                 00000016301 15212564025 0011707 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;(wp||={}).reusableBlocks=(()=>{var Da=Object.create;var E=Object.defineProperty;var Ea=Object.getOwnPropertyDescriptor;var Ua=Object.getOwnPropertyNames;var ja=Object.getPrototypeOf,Ma=Object.prototype.hasOwnProperty;var d=(a,t)=>()=>(t||a((t={exports:{}}).exports,t),t.exports),H=(a,t)=>{for(var o in t)E(a,o,{get:t[o],enumerable:!0})},Y=(a,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ua(t))!Ma.call(a,s)&&s!==o&&E(a,s,{get:()=>t[s],enumerable:!(r=Ea(t,s))||r.enumerable});return a};var e=(a,t,o)=>(o=a!=null?Da(ja(a)):{},Y(t||!a||!a.__esModule?E(o,"default",{value:a,enumerable:!0}):o,a)),Ia=a=>Y(E({},"__esModule",{value:!0}),a);var R=d((Wa,Z)=>{Z.exports=window.wp.data});var C=d((Qa,$)=>{$.exports=window.wp.blockEditor});var U=d((Xa,aa)=>{aa.exports=window.wp.blocks});var j=d((Ya,ta)=>{ta.exports=window.wp.i18n});var q=d((tt,fa)=>{fa.exports=window.wp.element});var G=d((et,la)=>{la.exports=window.wp.components});var ma=d((ot,sa)=>{sa.exports=window.wp.primitives});var S=d((rt,ua)=>{ua.exports=window.ReactJSXRuntime});var ia=d((mt,da)=>{da.exports=window.wp.notices});var W=d((ut,pa)=>{pa.exports=window.wp.coreData});var ga=d((nt,ba)=>{ba.exports=window.wp.url});var qa={};H(qa,{ReusableBlocksMenuItems:()=>xa,store:()=>k});var M=e(R(),1);var O={};H(O,{__experimentalConvertBlockToStatic:()=>Aa,__experimentalConvertBlocksToReusable:()=>Na,__experimentalDeleteReusableBlock:()=>Va,__experimentalSetEditingReusableBlock:()=>za});var g=e(C(),1),h=e(U(),1),ea=e(j(),1),Aa=a=>({registry:t})=>{let o=t.select(g.store).getBlock(a),r=t.select("core").getEditedEntityRecord("postType","wp_block",o.attributes.ref),s=(0,h.parse)(typeof r.content=="function"?r.content(r):r.content);t.dispatch(g.store).replaceBlocks(o.clientId,s)},Na=(a,t,o)=>async({registry:r,dispatch:s})=>{let c=o==="unsynced"?{wp_pattern_sync_status:o}:void 0,u={title:t||(0,ea.__)("Untitled pattern block"),content:(0,h.serialize)(r.select(g.store).getBlocksByClientId(a)),status:"publish",meta:c},w=await r.dispatch("core").saveEntityRecord("postType","wp_block",u);if(o==="unsynced")return;let i=(0,h.createBlock)("core/block",{ref:w.id});r.dispatch(g.store).replaceBlocks(a,i),s.__experimentalSetEditingReusableBlock(i.clientId,!0)},Va=a=>async({registry:t})=>{if(!t.select("core").getEditedEntityRecord("postType","wp_block",a))return;let c=t.select(g.store).getBlocks().filter(u=>(0,h.isReusableBlock)(u)&&u.attributes.ref===a).map(u=>u.clientId);c.length&&t.dispatch(g.store).removeBlocks(c),await t.dispatch("core").deleteEntityRecord("postType","wp_block",a)};function za(a,t){return{type:"SET_EDITING_REUSABLE_BLOCK",clientId:a,isEditing:t}}var oa=e(R(),1);function Fa(a={},t){return t?.type==="SET_EDITING_REUSABLE_BLOCK"?{...a,[t.clientId]:t.isEditing}:a}var ra=(0,oa.combineReducers)({isEditingReusableBlock:Fa});var P={};H(P,{__experimentalIsEditingReusableBlock:()=>Ha});function Ha(a,t){return a.isEditingReusableBlock[t]}var Oa="core/reusable-blocks",k=(0,M.createReduxStore)(Oa,{actions:O,reducer:ra,selectors:P});(0,M.register)(k);var _a=e(C(),1);var A=e(U(),1),na=e(C(),1),B=e(q(),1),l=e(G(),1);var I=e(ma(),1),J=e(S(),1),K=(0,J.jsx)(I.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,J.jsx)(I.Path,{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"})});var L=e(R(),1),f=e(j(),1),ca=e(ia(),1),Q=e(W(),1);var m=e(S(),1);function ha({clientIds:a,rootClientId:t,onClose:o}){let[r,s]=(0,B.useState)(void 0),[c,u]=(0,B.useState)(!1),[w,i]=(0,B.useState)(""),V=(0,L.useSelect)(n=>{let{canUser:z}=n(Q.store),{getBlocksByClientId:Ca,canInsertBlockType:Sa,getBlockRootClientId:La}=n(na.store),Ta=t||(a.length>0?La(a[0]):void 0),x=Ca(a)??[];return!(x.length===1&&x[0]&&(0,A.isReusableBlock)(x[0])&&!!n(Q.store).getEntityRecord("postType","wp_block",x[0].attributes.ref))&&Sa("core/block",Ta)&&x.every(F=>!!F&&F.isValid&&(0,A.hasBlockSupport)(F.name,"reusable",!0))&&!!z("create",{kind:"postType",name:"wp_block"})},[a,t]),{__experimentalConvertBlocksToReusable:D}=(0,L.useDispatch)(k),{createSuccessNotice:_,createErrorNotice:y}=(0,L.useDispatch)(ca.store),Ra=(0,B.useCallback)(async function(n){try{await D(a,n,r),_(r?(0,f.sprintf)((0,f.__)("Unsynced pattern created: %s"),n):(0,f.sprintf)((0,f.__)("Synced pattern created: %s"),n),{type:"snackbar",id:"convert-to-reusable-block-success"})}catch(z){y(z.message,{type:"snackbar",id:"convert-to-reusable-block-error"})}},[D,a,r,_,y]);return V?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(l.MenuItem,{icon:K,onClick:()=>u(!0),children:(0,f.__)("Create pattern")}),c&&(0,m.jsx)(l.Modal,{title:(0,f.__)("Create pattern"),onRequestClose:()=>{u(!1),i("")},overlayClassName:"reusable-blocks-menu-items__convert-modal",children:(0,m.jsx)("form",{onSubmit:n=>{n.preventDefault(),Ra(w),u(!1),i(""),o()},children:(0,m.jsxs)(l.__experimentalVStack,{spacing:"5",children:[(0,m.jsx)(l.TextControl,{__next40pxDefaultSize:!0,label:(0,f.__)("Name"),value:w,onChange:i,placeholder:(0,f.__)("My pattern")}),(0,m.jsx)(l.ToggleControl,{label:(0,f._x)("Synced","pattern (singular)"),help:(0,f.__)("Sync this pattern across multiple locations."),checked:!r,onChange:()=>{s(r?void 0:"unsynced")}}),(0,m.jsxs)(l.__experimentalHStack,{justify:"right",children:[(0,m.jsx)(l.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{u(!1),i("")},children:(0,f.__)("Cancel")}),(0,m.jsx)(l.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,f.__)("Create")})]})]})})})]}):null}var T=e(G(),1),v=e(j(),1),ka=e(U(),1),N=e(R(),1),wa=e(q(),1),ya=e(C(),1),X=e(ga(),1),Ba=e(W(),1);var p=e(S(),1);function Pa({clientId:a}){let[t,o]=(0,wa.useState)(!1),{canRemove:r,isVisible:s,managePatternsUrl:c}=(0,N.useSelect)(i=>{let{getBlock:V,canRemoveBlock:D}=i(ya.store),{canUser:_}=i(Ba.store),y=V(a);return{canRemove:D(a),isVisible:!!y&&(0,ka.isReusableBlock)(y)&&!!_("update",{kind:"postType",name:"wp_block",id:y.attributes.ref}),managePatternsUrl:_("create",{kind:"postType",name:"wp_template"})?(0,X.addQueryArgs)("site-editor.php",{p:"/pattern"}):(0,X.addQueryArgs)("edit.php",{post_type:"wp_block"})}},[a]),{__experimentalConvertBlockToStatic:u}=(0,N.useDispatch)(k);if(!s)return null;let w=()=>{u(a),o(!1)};return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(T.MenuItem,{href:c,children:(0,v.__)("Manage patterns")}),r&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(T.MenuItem,{onClick:()=>o(!0),children:(0,v.__)("Disconnect pattern")}),(0,p.jsx)(T.__experimentalConfirmDialog,{isOpen:t,onConfirm:w,onCancel:()=>o(!1),confirmButtonText:(0,v.__)("Disconnect"),size:"medium",title:(0,v.__)("Disconnect pattern?"),__experimentalHideHeader:!1,children:(0,v.__)("Blocks will be separated from the original pattern and will be fully editable. Future changes to the pattern will not apply here.")})]})]})}var va=Pa;var b=e(S(),1);function xa({rootClientId:a}){return(0,b.jsx)(_a.BlockSettingsMenuControls,{children:({onClose:t,selectedClientIds:o})=>(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(ha,{clientIds:o,rootClientId:a,onClose:t}),o.length===1&&(0,b.jsx)(va,{clientId:o[0]})]})})}return Ia(qa);})();
                                                                                                                                                                                                                                                                                                                               dist/rich-text.js                                                                                   0000644                 00000302046 15212564025 0007763 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).richText = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/escape-html
  var require_escape_html = __commonJS({
    "package-external:@wordpress/escape-html"(exports, module) {
      module.exports = window.wp.escapeHtml;
    }
  });

  // package-external:@wordpress/a11y
  var require_a11y = __commonJS({
    "package-external:@wordpress/a11y"(exports, module) {
      module.exports = window.wp.a11y;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // package-external:@wordpress/private-apis
  var require_private_apis = __commonJS({
    "package-external:@wordpress/private-apis"(exports, module) {
      module.exports = window.wp.privateApis;
    }
  });

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // package-external:@wordpress/deprecated
  var require_deprecated = __commonJS({
    "package-external:@wordpress/deprecated"(exports, module) {
      module.exports = window.wp.deprecated;
    }
  });

  // package-external:@wordpress/keycodes
  var require_keycodes = __commonJS({
    "package-external:@wordpress/keycodes"(exports, module) {
      module.exports = window.wp.keycodes;
    }
  });

  // package-external:@wordpress/dom
  var require_dom = __commonJS({
    "package-external:@wordpress/dom"(exports, module) {
      module.exports = window.wp.dom;
    }
  });

  // packages/rich-text/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    RichTextData: () => RichTextData,
    __experimentalRichText: () => __experimentalRichText,
    __unstableCreateElement: () => createElement,
    __unstableToDom: () => toDom,
    __unstableUseRichText: () => __unstableUseRichText,
    applyFormat: () => applyFormat,
    concat: () => concat,
    create: () => create,
    getActiveFormat: () => getActiveFormat,
    getActiveFormats: () => getActiveFormats,
    getActiveObject: () => getActiveObject,
    getTextContent: () => getTextContent,
    insert: () => insert,
    insertObject: () => insertObject,
    isCollapsed: () => isCollapsed,
    isEmpty: () => isEmpty,
    join: () => join,
    privateApis: () => privateApis,
    registerFormatType: () => registerFormatType,
    remove: () => remove2,
    removeFormat: () => removeFormat,
    replace: () => replace2,
    slice: () => slice,
    split: () => split,
    store: () => store,
    toHTMLString: () => toHTMLString,
    toggleFormat: () => toggleFormat,
    unregisterFormatType: () => unregisterFormatType,
    useAnchor: () => useAnchor,
    useAnchorRef: () => useAnchorRef
  });

  // packages/rich-text/build-module/store/index.mjs
  var import_data3 = __toESM(require_data(), 1);

  // packages/rich-text/build-module/store/reducer.mjs
  var import_data = __toESM(require_data(), 1);
  function formatTypes(state = {}, action) {
    switch (action.type) {
      case "ADD_FORMAT_TYPES":
        return {
          ...state,
          // Key format types by their name.
          ...action.formatTypes.reduce(
            (newFormatTypes, type) => ({
              ...newFormatTypes,
              [type.name]: type
            }),
            {}
          )
        };
      case "REMOVE_FORMAT_TYPES":
        return Object.fromEntries(
          Object.entries(state).filter(
            ([key]) => !action.names.includes(key)
          )
        );
    }
    return state;
  }
  var reducer_default = (0, import_data.combineReducers)({ formatTypes });

  // packages/rich-text/build-module/store/selectors.mjs
  var selectors_exports = {};
  __export(selectors_exports, {
    getFormatType: () => getFormatType,
    getFormatTypeForBareElement: () => getFormatTypeForBareElement,
    getFormatTypeForClassName: () => getFormatTypeForClassName,
    getFormatTypes: () => getFormatTypes
  });
  var import_data2 = __toESM(require_data(), 1);
  var getFormatTypes = (0, import_data2.createSelector)(
    (state) => Object.values(state.formatTypes),
    (state) => [state.formatTypes]
  );
  function getFormatType(state, name) {
    return state.formatTypes[name];
  }
  function getFormatTypeForBareElement(state, bareElementTagName) {
    const formatTypes2 = getFormatTypes(state);
    return formatTypes2.find(({ className, tagName }) => {
      return className === null && bareElementTagName === tagName;
    }) || formatTypes2.find(({ className, tagName }) => {
      return className === null && "*" === tagName;
    });
  }
  function getFormatTypeForClassName(state, elementClassName) {
    return getFormatTypes(state).find(({ className }) => {
      if (className === null) {
        return false;
      }
      return ` ${elementClassName} `.indexOf(` ${className} `) >= 0;
    });
  }

  // packages/rich-text/build-module/store/actions.mjs
  var actions_exports = {};
  __export(actions_exports, {
    addFormatTypes: () => addFormatTypes,
    removeFormatTypes: () => removeFormatTypes
  });
  function addFormatTypes(formatTypes2) {
    return {
      type: "ADD_FORMAT_TYPES",
      formatTypes: Array.isArray(formatTypes2) ? formatTypes2 : [formatTypes2]
    };
  }
  function removeFormatTypes(names) {
    return {
      type: "REMOVE_FORMAT_TYPES",
      names: Array.isArray(names) ? names : [names]
    };
  }

  // packages/rich-text/build-module/store/index.mjs
  var STORE_NAME = "core/rich-text";
  var store = (0, import_data3.createReduxStore)(STORE_NAME, {
    reducer: reducer_default,
    selectors: selectors_exports,
    actions: actions_exports
  });
  (0, import_data3.register)(store);

  // packages/rich-text/build-module/is-format-equal.mjs
  function isFormatEqual(format1, format2) {
    if (format1 === format2) {
      return true;
    }
    if (!format1 || !format2) {
      return false;
    }
    if (format1.type !== format2.type) {
      return false;
    }
    const attributes1 = format1.attributes;
    const attributes2 = format2.attributes;
    if (attributes1 === attributes2) {
      return true;
    }
    if (!attributes1 || !attributes2) {
      return false;
    }
    const keys1 = Object.keys(attributes1);
    const keys2 = Object.keys(attributes2);
    if (keys1.length !== keys2.length) {
      return false;
    }
    const length = keys1.length;
    for (let i2 = 0; i2 < length; i2++) {
      const name = keys1[i2];
      if (attributes1[name] !== attributes2[name]) {
        return false;
      }
    }
    return true;
  }

  // packages/rich-text/build-module/normalise-formats.mjs
  function normaliseFormats(value) {
    const newFormats = value.formats.slice();
    newFormats.forEach((formatsAtIndex, index) => {
      const formatsAtPreviousIndex = newFormats[index - 1];
      if (formatsAtPreviousIndex) {
        const newFormatsAtIndex = formatsAtIndex.slice();
        newFormatsAtIndex.forEach((format, formatIndex) => {
          const previousFormat = formatsAtPreviousIndex[formatIndex];
          if (isFormatEqual(format, previousFormat)) {
            newFormatsAtIndex[formatIndex] = previousFormat;
          }
        });
        newFormats[index] = newFormatsAtIndex;
      }
    });
    return {
      ...value,
      formats: newFormats
    };
  }

  // packages/rich-text/build-module/apply-format.mjs
  function replace(array, index, value) {
    array = array.slice();
    array[index] = value;
    return array;
  }
  function applyFormat(value, format, startIndex = value.start, endIndex = value.end) {
    const { formats, activeFormats } = value;
    const newFormats = formats.slice();
    if (startIndex === endIndex) {
      const startFormat = newFormats[startIndex]?.find(
        ({ type }) => type === format.type
      );
      if (startFormat) {
        const index = newFormats[startIndex].indexOf(startFormat);
        while (newFormats[startIndex] && newFormats[startIndex][index] === startFormat) {
          newFormats[startIndex] = replace(
            newFormats[startIndex],
            index,
            format
          );
          startIndex--;
        }
        endIndex++;
        while (newFormats[endIndex] && newFormats[endIndex][index] === startFormat) {
          newFormats[endIndex] = replace(
            newFormats[endIndex],
            index,
            format
          );
          endIndex++;
        }
      }
    } else {
      let position = Infinity;
      for (let index = startIndex; index < endIndex; index++) {
        if (newFormats[index]) {
          newFormats[index] = newFormats[index].filter(
            ({ type }) => type !== format.type
          );
          const length = newFormats[index].length;
          if (length < position) {
            position = length;
          }
        } else {
          newFormats[index] = [];
          position = 0;
        }
      }
      for (let index = startIndex; index < endIndex; index++) {
        newFormats[index].splice(position, 0, format);
      }
    }
    return normaliseFormats({
      ...value,
      formats: newFormats,
      // Always revise active formats. This serves as a placeholder for new
      // inputs with the format so new input appears with the format applied,
      // and ensures a format of the same type uses the latest values.
      activeFormats: [
        ...activeFormats?.filter(
          ({ type }) => type !== format.type
        ) || [],
        format
      ]
    });
  }

  // packages/rich-text/build-module/create.mjs
  var import_data5 = __toESM(require_data(), 1);

  // packages/rich-text/build-module/create-element.mjs
  function createElement({ implementation }, html) {
    if (!createElement.body) {
      createElement.body = implementation.createHTMLDocument("").body;
    }
    createElement.body.innerHTML = html;
    return createElement.body;
  }

  // packages/rich-text/build-module/special-characters.mjs
  var OBJECT_REPLACEMENT_CHARACTER = "\uFFFC";
  var ZWNBSP = "\uFEFF";

  // packages/rich-text/build-module/to-html-string.mjs
  var import_escape_html = __toESM(require_escape_html(), 1);

  // packages/rich-text/build-module/get-active-formats.mjs
  function getActiveFormats(value, EMPTY_ACTIVE_FORMATS3 = []) {
    const { formats, start, end, activeFormats } = value;
    if (start === void 0) {
      return EMPTY_ACTIVE_FORMATS3;
    }
    if (start === end) {
      if (activeFormats) {
        return activeFormats;
      }
      const formatsBefore = formats[start - 1] || EMPTY_ACTIVE_FORMATS3;
      const formatsAfter = formats[start] || EMPTY_ACTIVE_FORMATS3;
      if (formatsBefore.length < formatsAfter.length) {
        return formatsBefore;
      }
      return formatsAfter;
    }
    if (!formats[start]) {
      return EMPTY_ACTIVE_FORMATS3;
    }
    const selectedFormats = formats.slice(start, end);
    const _activeFormats = [...selectedFormats[0]];
    let i2 = selectedFormats.length;
    while (i2--) {
      const formatsAtIndex = selectedFormats[i2];
      if (!formatsAtIndex) {
        return EMPTY_ACTIVE_FORMATS3;
      }
      let ii = _activeFormats.length;
      while (ii--) {
        const format = _activeFormats[ii];
        if (!formatsAtIndex.find(
          (_format) => isFormatEqual(format, _format)
        )) {
          _activeFormats.splice(ii, 1);
        }
      }
      if (_activeFormats.length === 0) {
        return EMPTY_ACTIVE_FORMATS3;
      }
    }
    return _activeFormats || EMPTY_ACTIVE_FORMATS3;
  }

  // packages/rich-text/build-module/get-format-type.mjs
  var import_data4 = __toESM(require_data(), 1);
  function getFormatType2(name) {
    return (0, import_data4.select)(store).getFormatType(name);
  }

  // packages/rich-text/build-module/to-tree.mjs
  function restoreOnAttributes(attributes, isEditableTree) {
    if (isEditableTree) {
      return attributes;
    }
    const newAttributes = {};
    for (const key in attributes) {
      let newKey = key;
      if (key.startsWith("data-disable-rich-text-")) {
        newKey = key.slice("data-disable-rich-text-".length);
      }
      newAttributes[newKey] = attributes[key];
    }
    return newAttributes;
  }
  function fromFormat({
    type,
    tagName,
    attributes,
    unregisteredAttributes,
    object,
    boundaryClass,
    isEditableTree
  }) {
    const formatType = getFormatType2(type);
    let elementAttributes = {};
    if (boundaryClass && isEditableTree) {
      elementAttributes["data-rich-text-format-boundary"] = "true";
    }
    if (!formatType) {
      if (attributes) {
        elementAttributes = { ...attributes, ...elementAttributes };
      }
      return {
        type,
        attributes: restoreOnAttributes(
          elementAttributes,
          isEditableTree
        ),
        object
      };
    }
    elementAttributes = { ...unregisteredAttributes, ...elementAttributes };
    for (const name in attributes) {
      const key = formatType.attributes ? formatType.attributes[name] : false;
      if (key) {
        elementAttributes[key] = attributes[name];
      } else {
        elementAttributes[name] = attributes[name];
      }
    }
    if (formatType.className) {
      if (elementAttributes.class) {
        elementAttributes.class = `${formatType.className} ${elementAttributes.class}`;
      } else {
        elementAttributes.class = formatType.className;
      }
    }
    return {
      type: tagName || formatType.tagName,
      object: formatType.object,
      attributes: restoreOnAttributes(elementAttributes, isEditableTree)
    };
  }
  function isEqualUntil(a2, b2, index) {
    do {
      if (a2[index] !== b2[index]) {
        return false;
      }
    } while (index--);
    return true;
  }
  function toTree({
    value,
    preserveWhiteSpace,
    createEmpty: createEmpty2,
    append: append3,
    getLastChild: getLastChild3,
    getParent: getParent3,
    isText: isText3,
    getText: getText3,
    remove: remove4,
    appendText: appendText3,
    onStartIndex,
    onEndIndex,
    isEditableTree,
    placeholder
  }) {
    const { formats, replacements, text, start, end } = value;
    const formatsLength = formats.length + 1;
    const tree = createEmpty2();
    const activeFormats = getActiveFormats(value);
    const deepestActiveFormat = activeFormats[activeFormats.length - 1];
    let lastCharacterFormats;
    let lastCharacter;
    append3(tree, "");
    for (let i2 = 0; i2 < formatsLength; i2++) {
      const character = text.charAt(i2);
      const shouldInsertPadding = isEditableTree && // Pad the line if the line is empty.
      (!lastCharacter || // Pad the line if the previous character is a line break, otherwise
      // the line break won't be visible.
      lastCharacter === "\n");
      const characterFormats = formats[i2];
      let pointer = getLastChild3(tree);
      if (characterFormats) {
        characterFormats.forEach((format, formatIndex) => {
          if (pointer && lastCharacterFormats && // Reuse the last element if all formats remain the same.
          isEqualUntil(
            characterFormats,
            lastCharacterFormats,
            formatIndex
          )) {
            pointer = getLastChild3(pointer);
            return;
          }
          const { type, tagName, attributes, unregisteredAttributes } = format;
          const boundaryClass = isEditableTree && format === deepestActiveFormat;
          const parent = getParent3(pointer);
          const newNode = append3(
            parent,
            fromFormat({
              type,
              tagName,
              attributes,
              unregisteredAttributes,
              boundaryClass,
              isEditableTree
            })
          );
          if (isText3(pointer) && getText3(pointer).length === 0) {
            remove4(pointer);
          }
          pointer = append3(newNode, "");
        });
      }
      if (i2 === 0) {
        if (onStartIndex && start === 0) {
          onStartIndex(tree, pointer);
        }
        if (onEndIndex && end === 0) {
          onEndIndex(tree, pointer);
        }
      }
      if (character === OBJECT_REPLACEMENT_CHARACTER) {
        const replacement = replacements[i2];
        if (!replacement) {
          continue;
        }
        const { type, attributes, innerHTML } = replacement;
        const formatType = getFormatType2(type);
        if (isEditableTree && type === "#comment") {
          pointer = append3(getParent3(pointer), {
            type: "span",
            attributes: {
              contenteditable: "false",
              "data-rich-text-comment": attributes["data-rich-text-comment"]
            }
          });
          append3(
            append3(pointer, { type: "span" }),
            attributes["data-rich-text-comment"].trim()
          );
        } else if (!isEditableTree && type === "script") {
          pointer = append3(
            getParent3(pointer),
            fromFormat({
              type: "script",
              isEditableTree
            })
          );
          append3(pointer, {
            html: decodeURIComponent(
              attributes["data-rich-text-script"]
            )
          });
        } else if (formatType?.contentEditable === false) {
          if (innerHTML || isEditableTree) {
            pointer = getParent3(pointer);
            if (isEditableTree) {
              const attrs = {
                contenteditable: "false",
                "data-rich-text-bogus": true
              };
              if (start === i2 && end === i2 + 1) {
                attrs["data-rich-text-format-boundary"] = true;
              }
              pointer = append3(pointer, {
                type: "span",
                attributes: attrs
              });
              if (isEditableTree && i2 + 1 === text.length) {
                append3(getParent3(pointer), ZWNBSP);
              }
            }
            pointer = append3(
              pointer,
              fromFormat({
                ...replacement,
                isEditableTree
              })
            );
            if (innerHTML) {
              append3(pointer, {
                html: innerHTML
              });
            }
          }
        } else {
          pointer = append3(
            getParent3(pointer),
            fromFormat({
              ...replacement,
              object: true,
              isEditableTree
            })
          );
        }
        pointer = append3(getParent3(pointer), "");
      } else if (!preserveWhiteSpace && character === "\n") {
        pointer = append3(getParent3(pointer), {
          type: "br",
          attributes: isEditableTree ? {
            "data-rich-text-line-break": "true"
          } : void 0,
          object: true
        });
        pointer = append3(getParent3(pointer), "");
      } else if (!isText3(pointer)) {
        pointer = append3(getParent3(pointer), character);
      } else {
        appendText3(pointer, character);
      }
      if (onStartIndex && start === i2 + 1) {
        onStartIndex(tree, pointer);
      }
      if (onEndIndex && end === i2 + 1) {
        onEndIndex(tree, pointer);
      }
      if (shouldInsertPadding && i2 === text.length) {
        append3(getParent3(pointer), ZWNBSP);
        if (placeholder && text.length === 0) {
          append3(getParent3(pointer), {
            type: "span",
            attributes: {
              "data-rich-text-placeholder": placeholder,
              // Necessary to prevent the placeholder from catching
              // selection and being editable.
              style: "pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;"
            }
          });
        }
      }
      lastCharacterFormats = characterFormats;
      lastCharacter = character;
    }
    return tree;
  }

  // packages/rich-text/build-module/to-html-string.mjs
  function toHTMLString({ value, preserveWhiteSpace }) {
    const tree = toTree({
      value,
      preserveWhiteSpace,
      createEmpty,
      append,
      getLastChild,
      getParent,
      isText,
      getText,
      remove,
      appendText
    });
    return createChildrenHTML(tree.children);
  }
  function createEmpty() {
    return {};
  }
  function getLastChild({ children }) {
    return children && children[children.length - 1];
  }
  function append(parent, object) {
    if (typeof object === "string") {
      object = { text: object };
    }
    object.parent = parent;
    parent.children = parent.children || [];
    parent.children.push(object);
    return object;
  }
  function appendText(object, text) {
    object.text += text;
  }
  function getParent({ parent }) {
    return parent;
  }
  function isText({ text }) {
    return typeof text === "string";
  }
  function getText({ text }) {
    return text;
  }
  function remove(object) {
    const index = object.parent.children.indexOf(object);
    if (index !== -1) {
      object.parent.children.splice(index, 1);
    }
    return object;
  }
  function createElementHTML({ type, attributes, object, children }) {
    if (type === "#comment") {
      return `<!--${attributes["data-rich-text-comment"]}-->`;
    }
    let attributeString = "";
    for (const key in attributes) {
      if (!(0, import_escape_html.isValidAttributeName)(key)) {
        continue;
      }
      attributeString += ` ${key}="${(0, import_escape_html.escapeAttribute)(
        attributes[key]
      )}"`;
    }
    if (object) {
      return `<${type}${attributeString}>`;
    }
    return `<${type}${attributeString}>${createChildrenHTML(
      children
    )}</${type}>`;
  }
  function createChildrenHTML(children = []) {
    return children.map((child) => {
      if (child.html !== void 0) {
        return child.html;
      }
      return child.text === void 0 ? createElementHTML(child) : (0, import_escape_html.escapeEditableHTML)(child.text);
    }).join("");
  }

  // packages/rich-text/build-module/get-text-content.mjs
  function getTextContent({ text }) {
    return text.replace(OBJECT_REPLACEMENT_CHARACTER, "");
  }

  // packages/rich-text/build-module/create.mjs
  function createEmptyValue() {
    return {
      formats: [],
      replacements: [],
      text: ""
    };
  }
  function toFormat({ tagName, attributes }) {
    let formatType;
    if (attributes && attributes.class) {
      formatType = (0, import_data5.select)(store).getFormatTypeForClassName(
        attributes.class
      );
      if (formatType) {
        attributes.class = ` ${attributes.class} `.replace(` ${formatType.className} `, " ").trim();
        if (!attributes.class) {
          delete attributes.class;
        }
      }
    }
    if (!formatType) {
      formatType = (0, import_data5.select)(store).getFormatTypeForBareElement(tagName);
    }
    if (!formatType) {
      return attributes ? { type: tagName, attributes } : { type: tagName };
    }
    if (formatType.__experimentalCreatePrepareEditableTree && !formatType.__experimentalCreateOnChangeEditableValue) {
      return null;
    }
    if (!attributes) {
      return { formatType, type: formatType.name, tagName };
    }
    const registeredAttributes = {};
    const unregisteredAttributes = {};
    const _attributes = { ...attributes };
    for (const key in formatType.attributes) {
      const name = formatType.attributes[key];
      registeredAttributes[key] = _attributes[name];
      delete _attributes[name];
      if (typeof registeredAttributes[key] === "undefined") {
        delete registeredAttributes[key];
      }
    }
    for (const name in _attributes) {
      unregisteredAttributes[name] = attributes[name];
    }
    if (formatType.contentEditable === false) {
      delete unregisteredAttributes.contenteditable;
    }
    return {
      formatType,
      type: formatType.name,
      tagName,
      attributes: registeredAttributes,
      unregisteredAttributes
    };
  }
  var RichTextData = class _RichTextData {
    #value;
    static empty() {
      return new _RichTextData();
    }
    static fromPlainText(text) {
      return new _RichTextData(create({ text }));
    }
    static fromHTMLString(html) {
      return new _RichTextData(create({ html }));
    }
    /**
     * Create a RichTextData instance from an HTML element.
     *
     * @param {HTMLElement}                    htmlElement The HTML element to create the instance from.
     * @param {{preserveWhiteSpace?: boolean}} options     Options.
     * @return {RichTextData} The RichTextData instance.
     */
    static fromHTMLElement(htmlElement, options = {}) {
      const { preserveWhiteSpace = false } = options;
      const element = preserveWhiteSpace ? htmlElement : collapseWhiteSpace(htmlElement);
      const richTextData = new _RichTextData(create({ element }));
      Object.defineProperty(richTextData, "originalHTML", {
        value: htmlElement.innerHTML
      });
      return richTextData;
    }
    constructor(init = createEmptyValue()) {
      this.#value = init;
    }
    toPlainText() {
      return getTextContent(this.#value);
    }
    // We could expose `toHTMLElement` at some point as well, but we'd only use
    // it internally.
    /**
     * Convert the rich text value to an HTML string.
     *
     * @param {{preserveWhiteSpace?: boolean}} options Options.
     * @return {string} The HTML string.
     */
    toHTMLString({ preserveWhiteSpace } = {}) {
      return this.originalHTML || toHTMLString({ value: this.#value, preserveWhiteSpace });
    }
    valueOf() {
      return this.toHTMLString();
    }
    toString() {
      return this.toHTMLString();
    }
    toJSON() {
      return this.toHTMLString();
    }
    get length() {
      return this.text.length;
    }
    get formats() {
      return this.#value.formats;
    }
    get replacements() {
      return this.#value.replacements;
    }
    get text() {
      return this.#value.text;
    }
  };
  for (const name of Object.getOwnPropertyNames(String.prototype)) {
    if (RichTextData.prototype.hasOwnProperty(name)) {
      continue;
    }
    Object.defineProperty(RichTextData.prototype, name, {
      value(...args) {
        return this.toHTMLString()[name](...args);
      }
    });
  }
  function create({
    element,
    text,
    html,
    range,
    __unstableIsEditableTree: isEditableTree
  } = {}) {
    if (html instanceof RichTextData) {
      return {
        text: html.text,
        formats: html.formats,
        replacements: html.replacements
      };
    }
    if (typeof text === "string" && text.length > 0) {
      return {
        formats: Array(text.length),
        replacements: Array(text.length),
        text
      };
    }
    if (typeof html === "string" && html.length > 0) {
      element = createElement(document, html);
    }
    if (typeof element !== "object") {
      return createEmptyValue();
    }
    return createFromElement({
      element,
      range,
      isEditableTree
    });
  }
  function accumulateSelection(accumulator, node, range, value) {
    if (!range) {
      return;
    }
    const { parentNode } = node;
    const { startContainer, startOffset, endContainer, endOffset } = range;
    const currentLength = accumulator.text.length;
    if (value.start !== void 0) {
      accumulator.start = currentLength + value.start;
    } else if (node === startContainer && node.nodeType === node.TEXT_NODE) {
      accumulator.start = currentLength + startOffset;
    } else if (parentNode === startContainer && node === startContainer.childNodes[startOffset]) {
      accumulator.start = currentLength;
    } else if (parentNode === startContainer && node === startContainer.childNodes[startOffset - 1]) {
      accumulator.start = currentLength + value.text.length;
    } else if (node === startContainer) {
      accumulator.start = currentLength;
    }
    if (value.end !== void 0) {
      accumulator.end = currentLength + value.end;
    } else if (node === endContainer && node.nodeType === node.TEXT_NODE) {
      accumulator.end = currentLength + endOffset;
    } else if (parentNode === endContainer && node === endContainer.childNodes[endOffset - 1]) {
      accumulator.end = currentLength + value.text.length;
    } else if (parentNode === endContainer && node === endContainer.childNodes[endOffset]) {
      accumulator.end = currentLength;
    } else if (node === endContainer) {
      accumulator.end = currentLength + endOffset;
    }
  }
  function filterRange(node, range, filter) {
    if (!range) {
      return;
    }
    const { startContainer, endContainer } = range;
    let { startOffset, endOffset } = range;
    if (node === startContainer) {
      startOffset = filter(node.nodeValue.slice(0, startOffset)).length;
    }
    if (node === endContainer) {
      endOffset = filter(node.nodeValue.slice(0, endOffset)).length;
    }
    return { startContainer, startOffset, endContainer, endOffset };
  }
  function collapseWhiteSpace(element, isRoot = true, hasPrecedingSpace = false, hasTrailingSpace = false) {
    const clone = element.cloneNode(true);
    clone.normalize();
    Array.from(clone.childNodes).forEach((node, i2, nodes) => {
      if (node.nodeType === node.TEXT_NODE) {
        let newNodeValue = node.nodeValue;
        if (/[\n\t\r\f]/.test(newNodeValue)) {
          newNodeValue = newNodeValue.replace(/[\n\t\r\f]+/g, " ");
        }
        if (newNodeValue.indexOf("  ") !== -1) {
          newNodeValue = newNodeValue.replace(/ {2,}/g, " ");
        }
        if (i2 === 0 && newNodeValue.startsWith(" ") && (isRoot || hasPrecedingSpace)) {
          newNodeValue = newNodeValue.slice(1);
        }
        if (i2 === nodes.length - 1 && newNodeValue.endsWith(" ") && (isRoot || hasTrailingSpace)) {
          newNodeValue = newNodeValue.slice(0, -1);
        }
        node.nodeValue = newNodeValue;
      } else if (node.nodeType === node.ELEMENT_NODE) {
        const { previousSibling, nextSibling } = node;
        const prevHasSpace = previousSibling?.textContent.endsWith(" ");
        const nextHasSpace = nextSibling?.textContent.startsWith(" ");
        node.replaceWith(
          collapseWhiteSpace(
            node,
            false,
            previousSibling ? prevHasSpace : isRoot || hasPrecedingSpace,
            nextSibling ? nextHasSpace : isRoot || hasTrailingSpace
          )
        );
      }
    });
    return clone;
  }
  var CARRIAGE_RETURN = "\r";
  function removeReservedCharacters(string) {
    return string.replace(
      new RegExp(
        `[${ZWNBSP}${OBJECT_REPLACEMENT_CHARACTER}${CARRIAGE_RETURN}]`,
        "gu"
      ),
      ""
    );
  }
  function createFromElement({ element, range, isEditableTree }) {
    const accumulator = createEmptyValue();
    if (!element) {
      return accumulator;
    }
    if (!element.hasChildNodes()) {
      accumulateSelection(accumulator, element, range, createEmptyValue());
      return accumulator;
    }
    const length = element.childNodes.length;
    for (let index = 0; index < length; index++) {
      const node = element.childNodes[index];
      const tagName = node.nodeName.toLowerCase();
      if (node.nodeType === node.TEXT_NODE) {
        const text = removeReservedCharacters(node.nodeValue);
        range = filterRange(node, range, removeReservedCharacters);
        accumulateSelection(accumulator, node, range, { text });
        accumulator.formats.length += text.length;
        accumulator.replacements.length += text.length;
        accumulator.text += text;
        continue;
      }
      if (node.nodeType === node.COMMENT_NODE || node.nodeType === node.ELEMENT_NODE && node.tagName === "SPAN" && node.hasAttribute("data-rich-text-comment")) {
        const value2 = {
          formats: [,],
          replacements: [
            {
              type: "#comment",
              attributes: {
                "data-rich-text-comment": node.nodeType === node.COMMENT_NODE ? node.nodeValue : node.getAttribute(
                  "data-rich-text-comment"
                )
              }
            }
          ],
          text: OBJECT_REPLACEMENT_CHARACTER
        };
        accumulateSelection(accumulator, node, range, value2);
        mergePair(accumulator, value2);
        continue;
      }
      if (node.nodeType !== node.ELEMENT_NODE) {
        continue;
      }
      if (isEditableTree && // Ignore any line breaks that are not inserted by us.
      tagName === "br" && !node.getAttribute("data-rich-text-line-break")) {
        accumulateSelection(accumulator, node, range, createEmptyValue());
        continue;
      }
      if (tagName === "script") {
        const value2 = {
          formats: [,],
          replacements: [
            {
              type: tagName,
              attributes: {
                "data-rich-text-script": node.getAttribute("data-rich-text-script") || encodeURIComponent(node.innerHTML)
              }
            }
          ],
          text: OBJECT_REPLACEMENT_CHARACTER
        };
        accumulateSelection(accumulator, node, range, value2);
        mergePair(accumulator, value2);
        continue;
      }
      if (tagName === "br") {
        accumulateSelection(accumulator, node, range, createEmptyValue());
        mergePair(accumulator, create({ text: "\n" }));
        continue;
      }
      const format = toFormat({
        tagName,
        attributes: getAttributes({ element: node })
      });
      if (format?.formatType?.contentEditable === false) {
        delete format.formatType;
        accumulateSelection(accumulator, node, range, createEmptyValue());
        mergePair(accumulator, {
          formats: [,],
          replacements: [
            {
              ...format,
              innerHTML: node.innerHTML
            }
          ],
          text: OBJECT_REPLACEMENT_CHARACTER
        });
        continue;
      }
      if (format) {
        delete format.formatType;
      }
      const value = createFromElement({
        element: node,
        range,
        isEditableTree
      });
      accumulateSelection(accumulator, node, range, value);
      if (!format || node.getAttribute("data-rich-text-placeholder") || node.getAttribute("data-rich-text-bogus")) {
        mergePair(accumulator, value);
      } else if (value.text.length === 0) {
        if (format.attributes) {
          mergePair(accumulator, {
            formats: [,],
            replacements: [format],
            text: OBJECT_REPLACEMENT_CHARACTER
          });
        }
      } else {
        let mergeFormats2 = function(formats) {
          if (mergeFormats2.formats === formats) {
            return mergeFormats2.newFormats;
          }
          const newFormats = formats ? [format, ...formats] : [format];
          mergeFormats2.formats = formats;
          mergeFormats2.newFormats = newFormats;
          return newFormats;
        };
        var mergeFormats = mergeFormats2;
        mergeFormats2.newFormats = [format];
        mergePair(accumulator, {
          ...value,
          formats: Array.from(value.formats, mergeFormats2)
        });
      }
    }
    return accumulator;
  }
  function getAttributes({ element }) {
    if (!element.hasAttributes()) {
      return;
    }
    const length = element.attributes.length;
    let accumulator;
    for (let i2 = 0; i2 < length; i2++) {
      const { name, value } = element.attributes[i2];
      if (name.indexOf("data-rich-text-") === 0) {
        continue;
      }
      const safeName = /^on/i.test(name) ? "data-disable-rich-text-" + name : name;
      accumulator = accumulator || {};
      accumulator[safeName] = value;
    }
    return accumulator;
  }

  // packages/rich-text/build-module/concat.mjs
  function mergePair(a2, b2) {
    a2.formats = a2.formats.concat(b2.formats);
    a2.replacements = a2.replacements.concat(b2.replacements);
    a2.text += b2.text;
    return a2;
  }
  function concat(...values) {
    return normaliseFormats(values.reduce(mergePair, create()));
  }

  // packages/rich-text/build-module/get-active-format.mjs
  function getActiveFormat(value, formatType) {
    return getActiveFormats(value).find(
      ({ type }) => type === formatType
    );
  }

  // packages/rich-text/build-module/get-active-object.mjs
  function getActiveObject({ start, end, replacements, text }) {
    if (start + 1 !== end || text[start] !== OBJECT_REPLACEMENT_CHARACTER) {
      return;
    }
    return replacements[start];
  }

  // packages/rich-text/build-module/is-collapsed.mjs
  function isCollapsed({
    start,
    end
  }) {
    if (start === void 0 || end === void 0) {
      return;
    }
    return start === end;
  }

  // packages/rich-text/build-module/is-empty.mjs
  function isEmpty({ text }) {
    return text.length === 0;
  }

  // packages/rich-text/build-module/join.mjs
  function join(values, separator = "") {
    if (typeof separator === "string") {
      separator = create({ text: separator });
    }
    return normaliseFormats(
      values.reduce((accumulator, { formats, replacements, text }) => ({
        formats: accumulator.formats.concat(separator.formats, formats),
        replacements: accumulator.replacements.concat(
          separator.replacements,
          replacements
        ),
        text: accumulator.text + separator.text + text
      }))
    );
  }

  // packages/rich-text/build-module/register-format-type.mjs
  var import_data6 = __toESM(require_data(), 1);
  function registerFormatType(name, settings) {
    settings = {
      name,
      ...settings
    };
    if (typeof settings.name !== "string") {
      window.console.error("Format names must be strings.");
      return;
    }
    if (!/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(settings.name)) {
      window.console.error(
        "Format names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-format"
      );
      return;
    }
    if ((0, import_data6.select)(store).getFormatType(settings.name)) {
      window.console.error(
        'Format "' + settings.name + '" is already registered.'
      );
      return;
    }
    if (typeof settings.tagName !== "string" || settings.tagName === "") {
      window.console.error("Format tag names must be a string.");
      return;
    }
    if ((typeof settings.className !== "string" || settings.className === "") && settings.className !== null) {
      window.console.error(
        "Format class names must be a string, or null to handle bare elements."
      );
      return;
    }
    if (!/^[_a-zA-Z]+[a-zA-Z0-9_-]*$/.test(settings.className)) {
      window.console.error(
        "A class name must begin with a letter, followed by any number of hyphens, underscores, letters, or numbers."
      );
      return;
    }
    if (settings.className === null) {
      const formatTypeForBareElement = (0, import_data6.select)(
        store
      ).getFormatTypeForBareElement(settings.tagName);
      if (formatTypeForBareElement && formatTypeForBareElement.name !== "core/unknown") {
        window.console.error(
          `Format "${formatTypeForBareElement.name}" is already registered to handle bare tag name "${settings.tagName}".`
        );
        return;
      }
    } else {
      const formatTypeForClassName = (0, import_data6.select)(
        store
      ).getFormatTypeForClassName(settings.className);
      if (formatTypeForClassName) {
        window.console.error(
          `Format "${formatTypeForClassName.name}" is already registered to handle class name "${settings.className}".`
        );
        return;
      }
    }
    if (!("title" in settings) || settings.title === "") {
      window.console.error(
        'The format "' + settings.name + '" must have a title.'
      );
      return;
    }
    if ("keywords" in settings && settings.keywords.length > 3) {
      window.console.error(
        'The format "' + settings.name + '" can have a maximum of 3 keywords.'
      );
      return;
    }
    if (typeof settings.title !== "string") {
      window.console.error("Format titles must be strings.");
      return;
    }
    (0, import_data6.dispatch)(store).addFormatTypes(settings);
    return settings;
  }

  // packages/rich-text/build-module/remove-format.mjs
  function removeFormat(value, formatType, startIndex = value.start, endIndex = value.end) {
    const { formats, activeFormats } = value;
    const newFormats = formats.slice();
    if (startIndex === endIndex) {
      const format = newFormats[startIndex]?.find(
        ({ type }) => type === formatType
      );
      if (format) {
        while (newFormats[startIndex]?.find(
          (newFormat) => newFormat === format
        )) {
          filterFormats(newFormats, startIndex, formatType);
          startIndex--;
        }
        endIndex++;
        while (newFormats[endIndex]?.find(
          (newFormat) => newFormat === format
        )) {
          filterFormats(newFormats, endIndex, formatType);
          endIndex++;
        }
      }
    } else {
      for (let i2 = startIndex; i2 < endIndex; i2++) {
        if (newFormats[i2]) {
          filterFormats(newFormats, i2, formatType);
        }
      }
    }
    return normaliseFormats({
      ...value,
      formats: newFormats,
      activeFormats: activeFormats?.filter(({ type }) => type !== formatType) || []
    });
  }
  function filterFormats(formats, index, formatType) {
    const newFormats = formats[index].filter(
      ({ type }) => type !== formatType
    );
    if (newFormats.length) {
      formats[index] = newFormats;
    } else {
      delete formats[index];
    }
  }

  // packages/rich-text/build-module/insert.mjs
  function insert(value, valueToInsert, startIndex = value.start, endIndex = value.end) {
    const { formats, replacements, text } = value;
    if (typeof valueToInsert === "string") {
      valueToInsert = create({ text: valueToInsert });
    }
    const index = startIndex + valueToInsert.text.length;
    return normaliseFormats({
      formats: formats.slice(0, startIndex).concat(valueToInsert.formats, formats.slice(endIndex)),
      replacements: replacements.slice(0, startIndex).concat(
        valueToInsert.replacements,
        replacements.slice(endIndex)
      ),
      text: text.slice(0, startIndex) + valueToInsert.text + text.slice(endIndex),
      start: index,
      end: index
    });
  }

  // packages/rich-text/build-module/remove.mjs
  function remove2(value, startIndex, endIndex) {
    return insert(value, create(), startIndex, endIndex);
  }

  // packages/rich-text/build-module/replace.mjs
  function replace2({ formats, replacements, text, start, end }, pattern, replacement) {
    text = text.replace(pattern, (match, ...rest) => {
      const offset = rest[rest.length - 2];
      let newText = replacement;
      let newFormats;
      let newReplacements;
      if (typeof newText === "function") {
        newText = replacement(match, ...rest);
      }
      if (typeof newText === "object") {
        newFormats = newText.formats;
        newReplacements = newText.replacements;
        newText = newText.text;
      } else {
        newFormats = Array(newText.length);
        newReplacements = Array(newText.length);
        if (formats[offset]) {
          newFormats = newFormats.fill(formats[offset]);
        }
      }
      formats = formats.slice(0, offset).concat(newFormats, formats.slice(offset + match.length));
      replacements = replacements.slice(0, offset).concat(
        newReplacements,
        replacements.slice(offset + match.length)
      );
      if (start) {
        start = end = offset + newText.length;
      }
      return newText;
    });
    return normaliseFormats({ formats, replacements, text, start, end });
  }

  // packages/rich-text/build-module/insert-object.mjs
  function insertObject(value, formatToInsert, startIndex, endIndex) {
    const valueToInsert = {
      formats: [,],
      replacements: [formatToInsert],
      text: OBJECT_REPLACEMENT_CHARACTER
    };
    return insert(value, valueToInsert, startIndex, endIndex);
  }

  // packages/rich-text/build-module/slice.mjs
  function slice(value, startIndex = value.start, endIndex = value.end) {
    const { formats, replacements, text } = value;
    if (startIndex === void 0 || endIndex === void 0) {
      return { ...value };
    }
    return {
      formats: formats.slice(startIndex, endIndex),
      replacements: replacements.slice(startIndex, endIndex),
      text: text.slice(startIndex, endIndex)
    };
  }

  // packages/rich-text/build-module/split.mjs
  function split({ formats, replacements, text, start, end }, string) {
    if (typeof string !== "string") {
      return splitAtSelection(...arguments);
    }
    let nextStart = 0;
    return text.split(string).map((substring) => {
      const startIndex = nextStart;
      const value = {
        formats: formats.slice(startIndex, startIndex + substring.length),
        replacements: replacements.slice(
          startIndex,
          startIndex + substring.length
        ),
        text: substring
      };
      nextStart += string.length + substring.length;
      if (start !== void 0 && end !== void 0) {
        if (start >= startIndex && start < nextStart) {
          value.start = start - startIndex;
        } else if (start < startIndex && end > startIndex) {
          value.start = 0;
        }
        if (end >= startIndex && end < nextStart) {
          value.end = end - startIndex;
        } else if (start < nextStart && end > nextStart) {
          value.end = substring.length;
        }
      }
      return value;
    });
  }
  function splitAtSelection({ formats, replacements, text, start, end }, startIndex = start, endIndex = end) {
    if (start === void 0 || end === void 0) {
      return;
    }
    const before = {
      formats: formats.slice(0, startIndex),
      replacements: replacements.slice(0, startIndex),
      text: text.slice(0, startIndex)
    };
    const after = {
      formats: formats.slice(endIndex),
      replacements: replacements.slice(endIndex),
      text: text.slice(endIndex),
      start: 0,
      end: 0
    };
    return [before, after];
  }

  // packages/rich-text/build-module/is-range-equal.mjs
  function isRangeEqual(a2, b2) {
    return a2 === b2 || a2 && b2 && a2.startContainer === b2.startContainer && a2.startOffset === b2.startOffset && a2.endContainer === b2.endContainer && a2.endOffset === b2.endOffset;
  }

  // packages/rich-text/build-module/to-dom.mjs
  var MATHML_NAMESPACE = "http://www.w3.org/1998/Math/MathML";
  function createPathToNode(node, rootNode, path) {
    const parentNode = node.parentNode;
    let i2 = 0;
    while (node = node.previousSibling) {
      i2++;
    }
    path = [i2, ...path];
    if (parentNode !== rootNode) {
      path = createPathToNode(parentNode, rootNode, path);
    }
    return path;
  }
  function getNodeByPath(node, path) {
    path = [...path];
    while (node && path.length > 1) {
      node = node.childNodes[path.shift()];
    }
    return {
      node,
      offset: path[0]
    };
  }
  function append2(element, child) {
    if (child.html !== void 0) {
      return element.innerHTML += child.html;
    }
    if (typeof child === "string") {
      child = element.ownerDocument.createTextNode(child);
    }
    const { type, attributes } = child;
    if (type) {
      if (type === "#comment") {
        child = element.ownerDocument.createComment(
          attributes["data-rich-text-comment"]
        );
      } else {
        const parentNamespace = element.namespaceURI;
        if (type === "math") {
          child = element.ownerDocument.createElementNS(
            MATHML_NAMESPACE,
            type
          );
        } else if (parentNamespace === MATHML_NAMESPACE) {
          if (element.tagName === "MTEXT") {
            child = element.ownerDocument.createElement(type);
          } else {
            child = element.ownerDocument.createElementNS(
              MATHML_NAMESPACE,
              type
            );
          }
        } else {
          child = element.ownerDocument.createElement(type);
        }
        for (const key in attributes) {
          child.setAttribute(key, attributes[key]);
        }
      }
    }
    return element.appendChild(child);
  }
  function appendText2(node, text) {
    node.appendData(text);
  }
  function getLastChild2({ lastChild }) {
    return lastChild;
  }
  function getParent2({ parentNode }) {
    return parentNode;
  }
  function isText2(node) {
    return node.nodeType === node.TEXT_NODE;
  }
  function getText2({ nodeValue }) {
    return nodeValue;
  }
  function remove3(node) {
    return node.parentNode.removeChild(node);
  }
  function toDom({
    value,
    prepareEditableTree,
    isEditableTree = true,
    placeholder,
    doc = document
  }) {
    let startPath = [];
    let endPath = [];
    if (prepareEditableTree) {
      value = {
        ...value,
        formats: prepareEditableTree(value)
      };
    }
    const createEmpty2 = () => createElement(doc, "");
    const tree = toTree({
      value,
      createEmpty: createEmpty2,
      append: append2,
      getLastChild: getLastChild2,
      getParent: getParent2,
      isText: isText2,
      getText: getText2,
      remove: remove3,
      appendText: appendText2,
      onStartIndex(body, pointer) {
        startPath = createPathToNode(pointer, body, [
          pointer.nodeValue.length
        ]);
      },
      onEndIndex(body, pointer) {
        endPath = createPathToNode(pointer, body, [
          pointer.nodeValue.length
        ]);
      },
      isEditableTree,
      placeholder
    });
    return {
      body: tree,
      selection: { startPath, endPath }
    };
  }
  function apply({
    value,
    current,
    prepareEditableTree,
    __unstableDomOnly,
    placeholder
  }) {
    const { body, selection } = toDom({
      value,
      prepareEditableTree,
      placeholder,
      doc: current.ownerDocument
    });
    applyValue(body, current);
    if (value.start !== void 0 && !__unstableDomOnly) {
      applySelection(selection, current);
    }
  }
  function applyValue(future, current) {
    let i2 = 0;
    let futureChild;
    while (futureChild = future.firstChild) {
      const currentChild = current.childNodes[i2];
      if (!currentChild) {
        current.appendChild(futureChild);
      } else if (!currentChild.isEqualNode(futureChild)) {
        if (currentChild.nodeName !== futureChild.nodeName || currentChild.nodeType === currentChild.TEXT_NODE && currentChild.data !== futureChild.data) {
          current.replaceChild(futureChild, currentChild);
        } else {
          const currentAttributes = currentChild.attributes;
          const futureAttributes = futureChild.attributes;
          if (currentAttributes) {
            let ii = currentAttributes.length;
            while (ii--) {
              const { name } = currentAttributes[ii];
              if (!futureChild.getAttribute(name)) {
                currentChild.removeAttribute(name);
              }
            }
          }
          if (futureAttributes) {
            for (let ii = 0; ii < futureAttributes.length; ii++) {
              const { name, value } = futureAttributes[ii];
              if (currentChild.getAttribute(name) !== value) {
                currentChild.setAttribute(name, value);
              }
            }
          }
          applyValue(futureChild, currentChild);
          future.removeChild(futureChild);
        }
      } else {
        future.removeChild(futureChild);
      }
      i2++;
    }
    while (current.childNodes[i2]) {
      current.removeChild(current.childNodes[i2]);
    }
  }
  function applySelection({ startPath, endPath }, current) {
    const { node: startContainer, offset: startOffset } = getNodeByPath(
      current,
      startPath
    );
    const { node: endContainer, offset: endOffset } = getNodeByPath(
      current,
      endPath
    );
    const { ownerDocument } = current;
    const { defaultView } = ownerDocument;
    const selection = defaultView.getSelection();
    const range = ownerDocument.createRange();
    range.setStart(startContainer, startOffset);
    range.setEnd(endContainer, endOffset);
    const { activeElement } = ownerDocument;
    if (selection.rangeCount > 0) {
      if (isRangeEqual(range, selection.getRangeAt(0))) {
        return;
      }
      selection.removeAllRanges();
    }
    selection.addRange(range);
    if (activeElement !== ownerDocument.activeElement) {
      if (activeElement instanceof defaultView.HTMLElement) {
        activeElement.focus();
      }
    }
  }

  // packages/rich-text/build-module/toggle-format.mjs
  var import_a11y = __toESM(require_a11y(), 1);
  var import_i18n = __toESM(require_i18n(), 1);
  function toggleFormat(value, format) {
    if (getActiveFormat(value, format.type)) {
      if (format.title) {
        (0, import_a11y.speak)((0, import_i18n.sprintf)((0, import_i18n.__)("%s removed."), format.title), "assertive");
      }
      return removeFormat(value, format.type);
    }
    if (format.title) {
      (0, import_a11y.speak)((0, import_i18n.sprintf)((0, import_i18n.__)("%s applied."), format.title), "assertive");
    }
    return applyFormat(value, format);
  }

  // packages/rich-text/build-module/unregister-format-type.mjs
  var import_data7 = __toESM(require_data(), 1);
  function unregisterFormatType(name) {
    const oldFormat = (0, import_data7.select)(store).getFormatType(name);
    if (!oldFormat) {
      window.console.error(`Format ${name} is not registered.`);
      return;
    }
    (0, import_data7.dispatch)(store).removeFormatTypes(name);
    return oldFormat;
  }

  // packages/rich-text/build-module/lock-unlock.mjs
  var import_private_apis = __toESM(require_private_apis(), 1);
  var { lock, unlock } = (0, import_private_apis.__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/rich-text"
  );

  // packages/rich-text/build-module/hook/index.mjs
  var import_element5 = __toESM(require_element(), 1);
  var import_compose2 = __toESM(require_compose(), 1);
  var import_data9 = __toESM(require_data(), 1);
  var import_deprecated = __toESM(require_deprecated(), 1);

  // packages/rich-text/build-module/hook/use-default-style.mjs
  var import_element = __toESM(require_element(), 1);
  var whiteSpace = "pre-wrap";
  function useDefaultStyle() {
    return (0, import_element.useCallback)((element) => {
      if (!element) {
        return;
      }
      element.style.whiteSpace = whiteSpace;
    }, []);
  }

  // node_modules/colord/index.mjs
  var r = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) };
  var t = function(r2) {
    return "string" == typeof r2 ? r2.length > 0 : "number" == typeof r2;
  };
  var n = function(r2, t2, n2) {
    return void 0 === t2 && (t2 = 0), void 0 === n2 && (n2 = Math.pow(10, t2)), Math.round(n2 * r2) / n2 + 0;
  };
  var e = function(r2, t2, n2) {
    return void 0 === t2 && (t2 = 0), void 0 === n2 && (n2 = 1), r2 > n2 ? n2 : r2 > t2 ? r2 : t2;
  };
  var u = function(r2) {
    return (r2 = isFinite(r2) ? r2 % 360 : 0) > 0 ? r2 : r2 + 360;
  };
  var a = function(r2) {
    return { r: e(r2.r, 0, 255), g: e(r2.g, 0, 255), b: e(r2.b, 0, 255), a: e(r2.a) };
  };
  var o = function(r2) {
    return { r: n(r2.r), g: n(r2.g), b: n(r2.b), a: n(r2.a, 3) };
  };
  var i = /^#([0-9a-f]{3,8})$/i;
  var s = function(r2) {
    var t2 = r2.toString(16);
    return t2.length < 2 ? "0" + t2 : t2;
  };
  var h = function(r2) {
    var t2 = r2.r, n2 = r2.g, e2 = r2.b, u2 = r2.a, a2 = Math.max(t2, n2, e2), o2 = a2 - Math.min(t2, n2, e2), i2 = o2 ? a2 === t2 ? (n2 - e2) / o2 : a2 === n2 ? 2 + (e2 - t2) / o2 : 4 + (t2 - n2) / o2 : 0;
    return { h: 60 * (i2 < 0 ? i2 + 6 : i2), s: a2 ? o2 / a2 * 100 : 0, v: a2 / 255 * 100, a: u2 };
  };
  var b = function(r2) {
    var t2 = r2.h, n2 = r2.s, e2 = r2.v, u2 = r2.a;
    t2 = t2 / 360 * 6, n2 /= 100, e2 /= 100;
    var a2 = Math.floor(t2), o2 = e2 * (1 - n2), i2 = e2 * (1 - (t2 - a2) * n2), s2 = e2 * (1 - (1 - t2 + a2) * n2), h2 = a2 % 6;
    return { r: 255 * [e2, i2, o2, o2, s2, e2][h2], g: 255 * [s2, e2, e2, i2, o2, o2][h2], b: 255 * [o2, o2, s2, e2, e2, i2][h2], a: u2 };
  };
  var g = function(r2) {
    return { h: u(r2.h), s: e(r2.s, 0, 100), l: e(r2.l, 0, 100), a: e(r2.a) };
  };
  var d = function(r2) {
    return { h: n(r2.h), s: n(r2.s), l: n(r2.l), a: n(r2.a, 3) };
  };
  var f = function(r2) {
    return b((n2 = (t2 = r2).s, { h: t2.h, s: (n2 *= ((e2 = t2.l) < 50 ? e2 : 100 - e2) / 100) > 0 ? 2 * n2 / (e2 + n2) * 100 : 0, v: e2 + n2, a: t2.a }));
    var t2, n2, e2;
  };
  var c = function(r2) {
    return { h: (t2 = h(r2)).h, s: (u2 = (200 - (n2 = t2.s)) * (e2 = t2.v) / 100) > 0 && u2 < 200 ? n2 * e2 / 100 / (u2 <= 100 ? u2 : 200 - u2) * 100 : 0, l: u2 / 2, a: t2.a };
    var t2, n2, e2, u2;
  };
  var l = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var p = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var v = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var m = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
  var y = { string: [[function(r2) {
    var t2 = i.exec(r2);
    return t2 ? (r2 = t2[1]).length <= 4 ? { r: parseInt(r2[0] + r2[0], 16), g: parseInt(r2[1] + r2[1], 16), b: parseInt(r2[2] + r2[2], 16), a: 4 === r2.length ? n(parseInt(r2[3] + r2[3], 16) / 255, 2) : 1 } : 6 === r2.length || 8 === r2.length ? { r: parseInt(r2.substr(0, 2), 16), g: parseInt(r2.substr(2, 2), 16), b: parseInt(r2.substr(4, 2), 16), a: 8 === r2.length ? n(parseInt(r2.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
  }, "hex"], [function(r2) {
    var t2 = v.exec(r2) || m.exec(r2);
    return t2 ? t2[2] !== t2[4] || t2[4] !== t2[6] ? null : a({ r: Number(t2[1]) / (t2[2] ? 100 / 255 : 1), g: Number(t2[3]) / (t2[4] ? 100 / 255 : 1), b: Number(t2[5]) / (t2[6] ? 100 / 255 : 1), a: void 0 === t2[7] ? 1 : Number(t2[7]) / (t2[8] ? 100 : 1) }) : null;
  }, "rgb"], [function(t2) {
    var n2 = l.exec(t2) || p.exec(t2);
    if (!n2) return null;
    var e2, u2, a2 = g({ h: (e2 = n2[1], u2 = n2[2], void 0 === u2 && (u2 = "deg"), Number(e2) * (r[u2] || 1)), s: Number(n2[3]), l: Number(n2[4]), a: void 0 === n2[5] ? 1 : Number(n2[5]) / (n2[6] ? 100 : 1) });
    return f(a2);
  }, "hsl"]], object: [[function(r2) {
    var n2 = r2.r, e2 = r2.g, u2 = r2.b, o2 = r2.a, i2 = void 0 === o2 ? 1 : o2;
    return t(n2) && t(e2) && t(u2) ? a({ r: Number(n2), g: Number(e2), b: Number(u2), a: Number(i2) }) : null;
  }, "rgb"], [function(r2) {
    var n2 = r2.h, e2 = r2.s, u2 = r2.l, a2 = r2.a, o2 = void 0 === a2 ? 1 : a2;
    if (!t(n2) || !t(e2) || !t(u2)) return null;
    var i2 = g({ h: Number(n2), s: Number(e2), l: Number(u2), a: Number(o2) });
    return f(i2);
  }, "hsl"], [function(r2) {
    var n2 = r2.h, a2 = r2.s, o2 = r2.v, i2 = r2.a, s2 = void 0 === i2 ? 1 : i2;
    if (!t(n2) || !t(a2) || !t(o2)) return null;
    var h2 = (function(r3) {
      return { h: u(r3.h), s: e(r3.s, 0, 100), v: e(r3.v, 0, 100), a: e(r3.a) };
    })({ h: Number(n2), s: Number(a2), v: Number(o2), a: Number(s2) });
    return b(h2);
  }, "hsv"]] };
  var N = function(r2, t2) {
    for (var n2 = 0; n2 < t2.length; n2++) {
      var e2 = t2[n2][0](r2);
      if (e2) return [e2, t2[n2][1]];
    }
    return [null, void 0];
  };
  var x = function(r2) {
    return "string" == typeof r2 ? N(r2.trim(), y.string) : "object" == typeof r2 && null !== r2 ? N(r2, y.object) : [null, void 0];
  };
  var M = function(r2, t2) {
    var n2 = c(r2);
    return { h: n2.h, s: e(n2.s + 100 * t2, 0, 100), l: n2.l, a: n2.a };
  };
  var H = function(r2) {
    return (299 * r2.r + 587 * r2.g + 114 * r2.b) / 1e3 / 255;
  };
  var $ = function(r2, t2) {
    var n2 = c(r2);
    return { h: n2.h, s: n2.s, l: e(n2.l + 100 * t2, 0, 100), a: n2.a };
  };
  var j = (function() {
    function r2(r3) {
      this.parsed = x(r3)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
    }
    return r2.prototype.isValid = function() {
      return null !== this.parsed;
    }, r2.prototype.brightness = function() {
      return n(H(this.rgba), 2);
    }, r2.prototype.isDark = function() {
      return H(this.rgba) < 0.5;
    }, r2.prototype.isLight = function() {
      return H(this.rgba) >= 0.5;
    }, r2.prototype.toHex = function() {
      return r3 = o(this.rgba), t2 = r3.r, e2 = r3.g, u2 = r3.b, i2 = (a2 = r3.a) < 1 ? s(n(255 * a2)) : "", "#" + s(t2) + s(e2) + s(u2) + i2;
      var r3, t2, e2, u2, a2, i2;
    }, r2.prototype.toRgb = function() {
      return o(this.rgba);
    }, r2.prototype.toRgbString = function() {
      return r3 = o(this.rgba), t2 = r3.r, n2 = r3.g, e2 = r3.b, (u2 = r3.a) < 1 ? "rgba(" + t2 + ", " + n2 + ", " + e2 + ", " + u2 + ")" : "rgb(" + t2 + ", " + n2 + ", " + e2 + ")";
      var r3, t2, n2, e2, u2;
    }, r2.prototype.toHsl = function() {
      return d(c(this.rgba));
    }, r2.prototype.toHslString = function() {
      return r3 = d(c(this.rgba)), t2 = r3.h, n2 = r3.s, e2 = r3.l, (u2 = r3.a) < 1 ? "hsla(" + t2 + ", " + n2 + "%, " + e2 + "%, " + u2 + ")" : "hsl(" + t2 + ", " + n2 + "%, " + e2 + "%)";
      var r3, t2, n2, e2, u2;
    }, r2.prototype.toHsv = function() {
      return r3 = h(this.rgba), { h: n(r3.h), s: n(r3.s), v: n(r3.v), a: n(r3.a, 3) };
      var r3;
    }, r2.prototype.invert = function() {
      return w({ r: 255 - (r3 = this.rgba).r, g: 255 - r3.g, b: 255 - r3.b, a: r3.a });
      var r3;
    }, r2.prototype.saturate = function(r3) {
      return void 0 === r3 && (r3 = 0.1), w(M(this.rgba, r3));
    }, r2.prototype.desaturate = function(r3) {
      return void 0 === r3 && (r3 = 0.1), w(M(this.rgba, -r3));
    }, r2.prototype.grayscale = function() {
      return w(M(this.rgba, -1));
    }, r2.prototype.lighten = function(r3) {
      return void 0 === r3 && (r3 = 0.1), w($(this.rgba, r3));
    }, r2.prototype.darken = function(r3) {
      return void 0 === r3 && (r3 = 0.1), w($(this.rgba, -r3));
    }, r2.prototype.rotate = function(r3) {
      return void 0 === r3 && (r3 = 15), this.hue(this.hue() + r3);
    }, r2.prototype.alpha = function(r3) {
      return "number" == typeof r3 ? w({ r: (t2 = this.rgba).r, g: t2.g, b: t2.b, a: r3 }) : n(this.rgba.a, 3);
      var t2;
    }, r2.prototype.hue = function(r3) {
      var t2 = c(this.rgba);
      return "number" == typeof r3 ? w({ h: r3, s: t2.s, l: t2.l, a: t2.a }) : n(t2.h);
    }, r2.prototype.isEqual = function(r3) {
      return this.toHex() === w(r3).toHex();
    }, r2;
  })();
  var w = function(r2) {
    return r2 instanceof j ? r2 : new j(r2);
  };

  // packages/rich-text/build-module/hook/use-boundary-style.mjs
  var import_element2 = __toESM(require_element(), 1);
  function useBoundaryStyle({ record }) {
    const ref = (0, import_element2.useRef)();
    const { activeFormats = [], replacements, start } = record.current;
    const activeReplacement = replacements[start];
    (0, import_element2.useEffect)(() => {
      if ((!activeFormats || !activeFormats.length) && !activeReplacement) {
        return;
      }
      const boundarySelector = "*[data-rich-text-format-boundary]";
      const element = ref.current.querySelector(boundarySelector);
      if (!element) {
        return;
      }
      const { ownerDocument } = element;
      const { defaultView } = ownerDocument;
      const computedStyle = defaultView.getComputedStyle(element);
      const newColor = w(computedStyle.color).alpha(0.2).toRgbString();
      const selector = `.rich-text:focus ${boundarySelector}`;
      const rule = `background-color: ${newColor}`;
      const style = `${selector} {${rule}}`;
      const globalStyleId = "rich-text-boundary-style";
      let globalStyle = ownerDocument.getElementById(globalStyleId);
      if (!globalStyle) {
        globalStyle = ownerDocument.createElement("style");
        globalStyle.id = globalStyleId;
        ownerDocument.head.appendChild(globalStyle);
      }
      if (globalStyle.innerHTML !== style) {
        globalStyle.innerHTML = style;
      }
    }, [activeFormats, activeReplacement]);
    return ref;
  }

  // packages/rich-text/build-module/hook/event-listeners/index.mjs
  var import_element3 = __toESM(require_element(), 1);
  var import_compose = __toESM(require_compose(), 1);

  // packages/rich-text/build-module/hook/event-listeners/copy-handler.mjs
  var copy_handler_default = (props) => (element) => {
    function onCopy(event) {
      const { record } = props.current;
      const { ownerDocument } = element;
      if (isCollapsed(record.current) || !element.contains(ownerDocument.activeElement)) {
        return;
      }
      const selectedRecord = slice(record.current);
      const plainText = getTextContent(selectedRecord);
      const html = toHTMLString({ value: selectedRecord });
      event.clipboardData.setData("text/plain", plainText);
      event.clipboardData.setData("text/html", html);
      event.clipboardData.setData("rich-text", "true");
      event.preventDefault();
      if (event.type === "cut") {
        ownerDocument.execCommand("delete");
      }
    }
    const { defaultView } = element.ownerDocument;
    defaultView.addEventListener("copy", onCopy);
    defaultView.addEventListener("cut", onCopy);
    return () => {
      defaultView.removeEventListener("copy", onCopy);
      defaultView.removeEventListener("cut", onCopy);
    };
  };

  // packages/rich-text/build-module/hook/event-listeners/select-object.mjs
  var select_object_default = () => (element) => {
    function onClick(event) {
      const { target } = event;
      if (target === element || target.textContent && target.isContentEditable) {
        return;
      }
      const { ownerDocument } = target;
      const { defaultView } = ownerDocument;
      const selection = defaultView.getSelection();
      if (selection.containsNode(target)) {
        return;
      }
      const range = ownerDocument.createRange();
      const nodeToSelect = target.isContentEditable ? target : target.closest("[contenteditable]");
      range.selectNode(nodeToSelect);
      selection.removeAllRanges();
      selection.addRange(range);
      event.preventDefault();
    }
    function onFocusIn(event) {
      if (event.relatedTarget && !element.contains(event.relatedTarget) && event.relatedTarget.tagName === "A") {
        onClick(event);
      }
    }
    element.addEventListener("click", onClick);
    element.addEventListener("focusin", onFocusIn);
    return () => {
      element.removeEventListener("click", onClick);
      element.removeEventListener("focusin", onFocusIn);
    };
  };

  // packages/rich-text/build-module/hook/event-listeners/format-boundaries.mjs
  var import_keycodes = __toESM(require_keycodes(), 1);
  var EMPTY_ACTIVE_FORMATS = [];
  var format_boundaries_default = (props) => (element) => {
    function onKeyDown(event) {
      const { keyCode, shiftKey, altKey, metaKey, ctrlKey } = event;
      if (
        // Only override left and right keys without modifiers pressed.
        shiftKey || altKey || metaKey || ctrlKey || keyCode !== import_keycodes.LEFT && keyCode !== import_keycodes.RIGHT
      ) {
        return;
      }
      const { record, applyRecord, forceRender } = props.current;
      const {
        text,
        formats,
        start,
        end,
        activeFormats: currentActiveFormats = []
      } = record.current;
      const collapsed = isCollapsed(record.current);
      const { ownerDocument } = element;
      const { defaultView } = ownerDocument;
      const { direction } = defaultView.getComputedStyle(element);
      const reverseKey = direction === "rtl" ? import_keycodes.RIGHT : import_keycodes.LEFT;
      const isReverse = event.keyCode === reverseKey;
      if (collapsed && currentActiveFormats.length === 0) {
        if (start === 0 && isReverse) {
          return;
        }
        if (end === text.length && !isReverse) {
          return;
        }
      }
      if (!collapsed) {
        return;
      }
      const formatsBefore = formats[start - 1] || EMPTY_ACTIVE_FORMATS;
      const formatsAfter = formats[start] || EMPTY_ACTIVE_FORMATS;
      const destination = isReverse ? formatsBefore : formatsAfter;
      const isIncreasing = currentActiveFormats.every(
        (format, index) => format === destination[index]
      );
      let newActiveFormatsLength = currentActiveFormats.length;
      if (!isIncreasing) {
        newActiveFormatsLength--;
      } else if (newActiveFormatsLength < destination.length) {
        newActiveFormatsLength++;
      }
      if (newActiveFormatsLength === currentActiveFormats.length) {
        record.current._newActiveFormats = destination;
        return;
      }
      event.preventDefault();
      const origin = isReverse ? formatsAfter : formatsBefore;
      const source = isIncreasing ? destination : origin;
      const newActiveFormats = source.slice(0, newActiveFormatsLength);
      const newValue = {
        ...record.current,
        activeFormats: newActiveFormats
      };
      record.current = newValue;
      applyRecord(newValue);
      forceRender();
    }
    element.addEventListener("keydown", onKeyDown);
    return () => {
      element.removeEventListener("keydown", onKeyDown);
    };
  };

  // packages/rich-text/build-module/hook/event-listeners/delete.mjs
  var import_keycodes2 = __toESM(require_keycodes(), 1);
  var delete_default = (props) => (element) => {
    function onKeyDown(event) {
      const { keyCode } = event;
      const { createRecord, handleChange } = props.current;
      if (event.defaultPrevented) {
        return;
      }
      if (keyCode !== import_keycodes2.DELETE && keyCode !== import_keycodes2.BACKSPACE) {
        return;
      }
      const currentValue = createRecord();
      const { start, end, text } = currentValue;
      if (start === 0 && end !== 0 && end === text.length) {
        handleChange(remove2(currentValue));
        event.preventDefault();
      }
    }
    element.addEventListener("keydown", onKeyDown);
    return () => {
      element.removeEventListener("keydown", onKeyDown);
    };
  };

  // packages/rich-text/build-module/update-formats.mjs
  function updateFormats({ value, start, end, formats }) {
    const min = Math.min(start, end);
    const max = Math.max(start, end);
    const formatsBefore = value.formats[min - 1] || [];
    const formatsAfter = value.formats[max] || [];
    value.activeFormats = formats.map((format, index) => {
      if (formatsBefore[index]) {
        if (isFormatEqual(format, formatsBefore[index])) {
          return formatsBefore[index];
        }
      } else if (formatsAfter[index]) {
        if (isFormatEqual(format, formatsAfter[index])) {
          return formatsAfter[index];
        }
      }
      return format;
    });
    while (--end >= start) {
      if (value.activeFormats.length > 0) {
        value.formats[end] = value.activeFormats;
      } else {
        delete value.formats[end];
      }
    }
    return value;
  }

  // packages/rich-text/build-module/hook/event-listeners/input-and-selection.mjs
  var INSERTION_INPUT_TYPES_TO_IGNORE = /* @__PURE__ */ new Set([
    "insertParagraph",
    "insertOrderedList",
    "insertUnorderedList",
    "insertHorizontalRule",
    "insertLink"
  ]);
  var EMPTY_ACTIVE_FORMATS2 = [];
  var PLACEHOLDER_ATTR_NAME = "data-rich-text-placeholder";
  function fixPlaceholderSelection(defaultView) {
    const selection = defaultView.getSelection();
    const { anchorNode, anchorOffset } = selection;
    if (anchorNode.nodeType !== anchorNode.ELEMENT_NODE) {
      return;
    }
    const targetNode = anchorNode.childNodes[anchorOffset];
    if (!targetNode || targetNode.nodeType !== targetNode.ELEMENT_NODE || !targetNode.hasAttribute(PLACEHOLDER_ATTR_NAME)) {
      return;
    }
    selection.collapseToStart();
  }
  var input_and_selection_default = (props) => (element) => {
    const { ownerDocument } = element;
    const { defaultView } = ownerDocument;
    let isComposing = false;
    function onInput(event) {
      if (isComposing) {
        return;
      }
      let inputType;
      if (event) {
        inputType = event.inputType;
      }
      const { record, applyRecord, createRecord, handleChange } = props.current;
      if (inputType && (inputType.indexOf("format") === 0 || INSERTION_INPUT_TYPES_TO_IGNORE.has(inputType))) {
        applyRecord(record.current);
        return;
      }
      const currentValue = createRecord();
      const { start, activeFormats: oldActiveFormats = [] } = record.current;
      const clearFormats = !isCollapsed(record.current) && currentValue.start <= start;
      const change = updateFormats({
        value: currentValue,
        start,
        end: currentValue.start,
        formats: clearFormats ? [] : oldActiveFormats
      });
      handleChange(change);
    }
    function handleSelectionChange() {
      const { record, applyRecord, createRecord, onSelectionChange } = props.current;
      if (element.contentEditable !== "true") {
        return;
      }
      if (ownerDocument.activeElement !== element) {
        ownerDocument.removeEventListener(
          "selectionchange",
          handleSelectionChange
        );
        return;
      }
      if (isComposing) {
        return;
      }
      const { start, end, text } = createRecord();
      const oldRecord = record.current;
      if (text !== oldRecord.text) {
        onInput();
        return;
      }
      if (start === oldRecord.start && end === oldRecord.end) {
        if (oldRecord.text.length === 0 && start === 0) {
          fixPlaceholderSelection(defaultView);
        }
        return;
      }
      const newValue = {
        ...oldRecord,
        start,
        end,
        // _newActiveFormats may be set on arrow key navigation to control
        // the right boundary position. If undefined, getActiveFormats will
        // give the active formats according to the browser.
        activeFormats: oldRecord._newActiveFormats,
        _newActiveFormats: void 0
      };
      const newActiveFormats = getActiveFormats(
        newValue,
        EMPTY_ACTIVE_FORMATS2
      );
      newValue.activeFormats = newActiveFormats;
      record.current = newValue;
      applyRecord(newValue, { domOnly: true });
      onSelectionChange(start, end);
    }
    function onCompositionStart() {
      isComposing = true;
      ownerDocument.removeEventListener(
        "selectionchange",
        handleSelectionChange
      );
      element.querySelector(`[${PLACEHOLDER_ATTR_NAME}]`)?.remove();
    }
    function onCompositionEnd() {
      isComposing = false;
      onInput({ inputType: "insertText" });
      ownerDocument.addEventListener(
        "selectionchange",
        handleSelectionChange
      );
    }
    function onFocus() {
      const { record, isSelected, onSelectionChange, applyRecord } = props.current;
      if (element.parentElement.closest('[contenteditable="true"]')) {
        return;
      }
      if (!isSelected) {
        const index = void 0;
        record.current = {
          ...record.current,
          start: index,
          end: index,
          activeFormats: EMPTY_ACTIVE_FORMATS2
        };
      } else {
        applyRecord(record.current, { domOnly: true });
      }
      onSelectionChange(record.current.start, record.current.end);
      window.queueMicrotask(handleSelectionChange);
      ownerDocument.addEventListener(
        "selectionchange",
        handleSelectionChange
      );
    }
    element.addEventListener("input", onInput);
    element.addEventListener("compositionstart", onCompositionStart);
    element.addEventListener("compositionend", onCompositionEnd);
    element.addEventListener("focus", onFocus);
    return () => {
      element.removeEventListener("input", onInput);
      element.removeEventListener("compositionstart", onCompositionStart);
      element.removeEventListener("compositionend", onCompositionEnd);
      element.removeEventListener("focus", onFocus);
    };
  };

  // packages/rich-text/build-module/hook/event-listeners/selection-change-compat.mjs
  var selection_change_compat_default = () => (element) => {
    const { ownerDocument } = element;
    const { defaultView } = ownerDocument;
    const selection = defaultView?.getSelection();
    let range;
    function getRange() {
      return selection.rangeCount ? selection.getRangeAt(0) : null;
    }
    function onDown(event) {
      const type = event.type === "keydown" ? "keyup" : "pointerup";
      function onCancel() {
        ownerDocument.removeEventListener(type, onUp);
        ownerDocument.removeEventListener("selectionchange", onCancel);
        ownerDocument.removeEventListener("input", onCancel);
      }
      function onUp() {
        onCancel();
        if (isRangeEqual(range, getRange())) {
          return;
        }
        ownerDocument.dispatchEvent(new Event("selectionchange"));
      }
      ownerDocument.addEventListener(type, onUp);
      ownerDocument.addEventListener("selectionchange", onCancel);
      ownerDocument.addEventListener("input", onCancel);
      range = getRange();
    }
    element.addEventListener("pointerdown", onDown);
    element.addEventListener("keydown", onDown);
    return () => {
      element.removeEventListener("pointerdown", onDown);
      element.removeEventListener("keydown", onDown);
    };
  };

  // packages/rich-text/build-module/hook/event-listeners/prevent-focus-capture.mjs
  function preventFocusCapture() {
    return (element) => {
      const { ownerDocument } = element;
      const { defaultView } = ownerDocument;
      let value = null;
      function onPointerDown(event) {
        if (event.defaultPrevented) {
          return;
        }
        if (event.target === element) {
          return;
        }
        if (!event.target.contains(element)) {
          return;
        }
        value = element.getAttribute("contenteditable");
        element.setAttribute("contenteditable", "false");
        defaultView.getSelection().removeAllRanges();
      }
      function onPointerUp() {
        if (value !== null) {
          element.setAttribute("contenteditable", value);
          value = null;
        }
      }
      defaultView.addEventListener("pointerdown", onPointerDown);
      defaultView.addEventListener("pointerup", onPointerUp);
      return () => {
        defaultView.removeEventListener("pointerdown", onPointerDown);
        defaultView.removeEventListener("pointerup", onPointerUp);
      };
    };
  }

  // packages/rich-text/build-module/hook/event-listeners/index.mjs
  var allEventListeners = [
    copy_handler_default,
    select_object_default,
    format_boundaries_default,
    delete_default,
    input_and_selection_default,
    selection_change_compat_default,
    preventFocusCapture
  ];
  function useEventListeners(props) {
    const propsRef = (0, import_element3.useRef)(props);
    (0, import_element3.useInsertionEffect)(() => {
      propsRef.current = props;
    });
    const refEffects = (0, import_element3.useMemo)(
      () => allEventListeners.map((refEffect) => refEffect(propsRef)),
      [propsRef]
    );
    return (0, import_compose.useRefEffect)(
      (element) => {
        const cleanups = refEffects.map((effect) => effect(element));
        return () => {
          cleanups.forEach((cleanup) => cleanup());
        };
      },
      [refEffects]
    );
  }

  // packages/rich-text/build-module/hook/use-format-types.mjs
  var import_element4 = __toESM(require_element(), 1);
  var import_data8 = __toESM(require_data(), 1);
  function formatTypesSelector(select5) {
    return select5(store).getFormatTypes();
  }
  var interactiveContentTags = /* @__PURE__ */ new Set([
    "a",
    "audio",
    "button",
    "details",
    "embed",
    "iframe",
    "input",
    "label",
    "select",
    "textarea",
    "video"
  ]);
  function prefixSelectKeys(selected, prefix) {
    if (typeof selected !== "object") {
      return { [prefix]: selected };
    }
    return Object.fromEntries(
      Object.entries(selected).map(([key, value]) => [
        `${prefix}.${key}`,
        value
      ])
    );
  }
  function getPrefixedSelectKeys(selected, prefix) {
    if (selected[prefix]) {
      return selected[prefix];
    }
    return Object.keys(selected).filter((key) => key.startsWith(prefix + ".")).reduce((accumulator, key) => {
      accumulator[key.slice(prefix.length + 1)] = selected[key];
      return accumulator;
    }, {});
  }
  function useFormatTypes({
    allowedFormats,
    withoutInteractiveFormatting,
    __unstableFormatTypeHandlerContext
  }) {
    const allFormatTypes = (0, import_data8.useSelect)(formatTypesSelector, []);
    const formatTypes2 = (0, import_element4.useMemo)(() => {
      return allFormatTypes.filter(({ name, interactive, tagName }) => {
        if (allowedFormats && !allowedFormats.includes(name)) {
          return false;
        }
        if (withoutInteractiveFormatting && (interactive || interactiveContentTags.has(tagName))) {
          return false;
        }
        return true;
      });
    }, [allFormatTypes, allowedFormats, withoutInteractiveFormatting]);
    const keyedSelected = (0, import_data8.useSelect)(
      (select5) => formatTypes2.reduce((accumulator, type) => {
        if (!type.__experimentalGetPropsForEditableTreePreparation || !__unstableFormatTypeHandlerContext) {
          return accumulator;
        }
        return {
          ...accumulator,
          ...prefixSelectKeys(
            type.__experimentalGetPropsForEditableTreePreparation(
              select5,
              __unstableFormatTypeHandlerContext
            ),
            type.name
          )
        };
      }, {}),
      [formatTypes2, __unstableFormatTypeHandlerContext]
    );
    const dispatch3 = (0, import_data8.useDispatch)();
    const prepareHandlers = [];
    const valueHandlers = [];
    const changeHandlers = [];
    const dependencies = [];
    for (const key in keyedSelected) {
      dependencies.push(keyedSelected[key]);
    }
    formatTypes2.forEach((type) => {
      if (type.__experimentalCreatePrepareEditableTree && __unstableFormatTypeHandlerContext) {
        const handler = type.__experimentalCreatePrepareEditableTree(
          getPrefixedSelectKeys(keyedSelected, type.name),
          __unstableFormatTypeHandlerContext
        );
        if (type.__experimentalCreateOnChangeEditableValue) {
          valueHandlers.push(handler);
        } else {
          prepareHandlers.push(handler);
        }
      }
      if (type.__experimentalCreateOnChangeEditableValue && __unstableFormatTypeHandlerContext) {
        let dispatchers = {};
        if (type.__experimentalGetPropsForEditableTreeChangeHandler) {
          dispatchers = type.__experimentalGetPropsForEditableTreeChangeHandler(
            dispatch3,
            __unstableFormatTypeHandlerContext
          );
        }
        const selected = getPrefixedSelectKeys(keyedSelected, type.name);
        changeHandlers.push(
          type.__experimentalCreateOnChangeEditableValue(
            {
              ...typeof selected === "object" ? selected : {},
              ...dispatchers
            },
            __unstableFormatTypeHandlerContext
          )
        );
      }
    });
    return {
      formatTypes: formatTypes2,
      prepareHandlers,
      valueHandlers,
      changeHandlers,
      dependencies
    };
  }

  // packages/rich-text/build-module/hook/index.mjs
  function useRichTextBase({
    value = "",
    selectionStart,
    selectionEnd,
    placeholder,
    onSelectionChange,
    preserveWhiteSpace,
    onChange,
    __unstableDisableFormats: disableFormats,
    __unstableIsSelected: isSelected,
    __unstableDependencies = [],
    __unstableAfterParse,
    __unstableBeforeSerialize,
    __unstableAddInvisibleFormats
  }) {
    const registry = (0, import_data9.useRegistry)();
    const [, forceRender] = (0, import_element5.useReducer)(() => ({}));
    const ref = (0, import_element5.useRef)();
    function createRecord() {
      const {
        ownerDocument: { defaultView }
      } = ref.current;
      const selection = defaultView.getSelection();
      const range = selection.rangeCount > 0 ? selection.getRangeAt(0) : null;
      return create({
        element: ref.current,
        range,
        __unstableIsEditableTree: true
      });
    }
    function applyRecord(newRecord, { domOnly } = {}) {
      apply({
        value: newRecord,
        current: ref.current,
        prepareEditableTree: __unstableAddInvisibleFormats,
        __unstableDomOnly: domOnly,
        placeholder
      });
    }
    const _valueRef = (0, import_element5.useRef)(value);
    const recordRef = (0, import_element5.useRef)();
    function setRecordFromProps() {
      const activeFormats = recordRef.current?.activeFormats;
      _valueRef.current = value;
      recordRef.current = value;
      if (!(value instanceof RichTextData)) {
        recordRef.current = value ? RichTextData.fromHTMLString(value, { preserveWhiteSpace }) : RichTextData.empty();
      }
      recordRef.current = {
        text: recordRef.current.text,
        formats: recordRef.current.formats,
        replacements: recordRef.current.replacements,
        activeFormats
      };
      if (disableFormats) {
        recordRef.current.formats = Array(value.length);
        recordRef.current.replacements = Array(value.length);
      }
      if (__unstableAfterParse) {
        recordRef.current.formats = __unstableAfterParse(
          recordRef.current
        );
      }
      recordRef.current.start = selectionStart;
      recordRef.current.end = selectionEnd;
    }
    const hadSelectionUpdateRef = (0, import_element5.useRef)(false);
    if (!recordRef.current) {
      hadSelectionUpdateRef.current = isSelected;
      setRecordFromProps();
    } else if (selectionStart !== recordRef.current.start || selectionEnd !== recordRef.current.end) {
      hadSelectionUpdateRef.current = isSelected;
      recordRef.current = {
        ...recordRef.current,
        start: selectionStart,
        end: selectionEnd,
        activeFormats: void 0
      };
    }
    function handleChange(newRecord) {
      recordRef.current = newRecord;
      applyRecord(newRecord);
      if (disableFormats) {
        _valueRef.current = newRecord.text;
      } else {
        const newFormats = __unstableBeforeSerialize ? __unstableBeforeSerialize(newRecord) : newRecord.formats;
        newRecord = { ...newRecord, formats: newFormats };
        if (typeof value === "string") {
          _valueRef.current = toHTMLString({
            value: newRecord,
            preserveWhiteSpace
          });
        } else {
          _valueRef.current = new RichTextData(newRecord);
        }
      }
      const { start, end, formats, text } = recordRef.current;
      registry.batch(() => {
        onSelectionChange(start, end);
        onChange(_valueRef.current, {
          __unstableFormats: formats,
          __unstableText: text
        });
      });
      forceRender();
    }
    function applyFromProps() {
      const previousValue = _valueRef.current;
      setRecordFromProps();
      const contentLengthChanged = previousValue && typeof previousValue === "string" && typeof value === "string" && previousValue.length !== value.length;
      const hasFocus = ref.current?.contains(
        ref.current.ownerDocument.activeElement
      );
      const skipSelection = contentLengthChanged && !hasFocus;
      applyRecord(recordRef.current, { domOnly: skipSelection });
    }
    const didMountRef = (0, import_element5.useRef)(false);
    (0, import_element5.useLayoutEffect)(() => {
      if (didMountRef.current && value !== _valueRef.current) {
        applyFromProps();
        forceRender();
      }
    }, [value]);
    (0, import_element5.useLayoutEffect)(() => {
      if (!hadSelectionUpdateRef.current) {
        return;
      }
      if (ref.current.ownerDocument.activeElement !== ref.current) {
        ref.current.focus();
      }
      applyRecord(recordRef.current);
      hadSelectionUpdateRef.current = false;
    }, [hadSelectionUpdateRef.current]);
    const mergedRefs = (0, import_compose2.useMergeRefs)([
      ref,
      useDefaultStyle(),
      useBoundaryStyle({ record: recordRef }),
      useEventListeners({
        record: recordRef,
        handleChange,
        applyRecord,
        createRecord,
        isSelected,
        onSelectionChange,
        forceRender
      }),
      (0, import_compose2.useRefEffect)(() => {
        applyFromProps();
        didMountRef.current = true;
      }, [placeholder, ...__unstableDependencies])
    ]);
    return {
      value: recordRef.current,
      // A function to get the most recent value so event handlers in
      // useRichText implementations have access to it. For example when
      // listening to input events, we internally update the state, but this
      // state is not yet available to the input event handler because React
      // may re-render asynchronously.
      getValue: () => recordRef.current,
      onChange: handleChange,
      ref: mergedRefs
    };
  }
  function useRichText({
    allowedFormats,
    withoutInteractiveFormatting,
    onChange,
    __unstableDependencies = [],
    __unstableFormatTypeHandlerContext,
    ...props
  }) {
    const {
      formatTypes: formatTypes2,
      prepareHandlers,
      valueHandlers,
      changeHandlers,
      dependencies
    } = useFormatTypes({
      allowedFormats,
      withoutInteractiveFormatting,
      __unstableFormatTypeHandlerContext
    });
    function addEditorOnlyFormats(record) {
      return valueHandlers.reduce(
        (accumulator, fn) => fn(accumulator, record.text),
        record.formats
      );
    }
    function removeEditorOnlyFormats(record) {
      formatTypes2.forEach((formatType) => {
        if (formatType.__experimentalCreatePrepareEditableTree) {
          record = removeFormat(
            record,
            formatType.name,
            0,
            record.text.length
          );
        }
      });
      return record.formats;
    }
    function addInvisibleFormats(record) {
      return prepareHandlers.reduce(
        (accumulator, fn) => fn(accumulator, record.text),
        record.formats
      );
    }
    const result = useRichTextBase({
      ...props,
      onChange(value, { __unstableFormats, __unstableText }) {
        onChange(value, { __unstableFormats, __unstableText });
        Object.values(changeHandlers).forEach((changeHandler) => {
          changeHandler(__unstableFormats, __unstableText);
        });
      },
      __unstableDependencies: [...dependencies, ...__unstableDependencies],
      __unstableAfterParse: addEditorOnlyFormats,
      __unstableBeforeSerialize: removeEditorOnlyFormats,
      __unstableAddInvisibleFormats: addInvisibleFormats
    });
    return { ...result, formatTypes: formatTypes2 };
  }
  function __unstableUseRichText(props) {
    (0, import_deprecated.default)("`__unstableUseRichText` hook", {
      since: "7.0"
    });
    return useRichTextBase(props);
  }

  // packages/rich-text/build-module/private-apis.mjs
  var privateApis = {};
  lock(privateApis, {
    useRichText
  });

  // packages/rich-text/build-module/hook/use-anchor-ref.mjs
  var import_element6 = __toESM(require_element(), 1);
  var import_deprecated2 = __toESM(require_deprecated(), 1);
  function useAnchorRef({ ref, value, settings = {} }) {
    (0, import_deprecated2.default)("`useAnchorRef` hook", {
      since: "6.1",
      alternative: "`useAnchor` hook"
    });
    const { tagName, className, name } = settings;
    const activeFormat = name ? getActiveFormat(value, name) : void 0;
    return (0, import_element6.useMemo)(() => {
      if (!ref.current) {
        return;
      }
      const {
        ownerDocument: { defaultView }
      } = ref.current;
      const selection = defaultView.getSelection();
      if (!selection.rangeCount) {
        return;
      }
      const range = selection.getRangeAt(0);
      if (!activeFormat) {
        return range;
      }
      let element = range.startContainer;
      element = element.nextElementSibling || element;
      while (element.nodeType !== element.ELEMENT_NODE) {
        element = element.parentNode;
      }
      return element.closest(
        tagName + (className ? "." + className : "")
      );
    }, [activeFormat, value.start, value.end, tagName, className]);
  }

  // packages/rich-text/build-module/hook/use-anchor.mjs
  var import_compose3 = __toESM(require_compose(), 1);
  var import_element7 = __toESM(require_element(), 1);
  var import_dom = __toESM(require_dom(), 1);
  function getFormatElement(range, editableContentElement, tagName, className) {
    let element = range.startContainer;
    if (element.nodeType === element.TEXT_NODE && range.startOffset === element.length && element.nextSibling) {
      element = element.nextSibling;
      while (element.firstChild) {
        element = element.firstChild;
      }
    }
    if (element.nodeType !== element.ELEMENT_NODE) {
      element = element.parentElement;
    }
    if (!element) {
      return;
    }
    if (element === editableContentElement) {
      return;
    }
    if (!editableContentElement.contains(element)) {
      return;
    }
    const selector = tagName + (className ? "." + className : "");
    while (element !== editableContentElement) {
      if (element.matches(selector)) {
        return element;
      }
      element = element.parentElement;
    }
  }
  function createVirtualAnchorElement(range, editableContentElement) {
    return {
      contextElement: editableContentElement,
      getBoundingClientRect() {
        if (editableContentElement.contains(range.startContainer)) {
          return (0, import_dom.getRectangleFromRange)(range) ?? range.getBoundingClientRect();
        }
        return editableContentElement.getBoundingClientRect();
      }
    };
  }
  function getAnchor(editableContentElement, tagName, className) {
    if (!editableContentElement) {
      return;
    }
    const { ownerDocument } = editableContentElement;
    const { defaultView } = ownerDocument;
    const selection = defaultView.getSelection();
    if (!selection) {
      return;
    }
    if (!selection.rangeCount) {
      return;
    }
    const range = selection.getRangeAt(0);
    if (!range || !range.startContainer) {
      return;
    }
    const formatElement = getFormatElement(
      range,
      editableContentElement,
      tagName,
      className
    );
    if (formatElement) {
      return formatElement;
    }
    return createVirtualAnchorElement(range, editableContentElement);
  }
  function useAnchor({ editableContentElement, settings = {} }) {
    const { tagName, className, isActive } = settings;
    const [anchor, setAnchor] = (0, import_element7.useState)(
      () => getAnchor(editableContentElement, tagName, className)
    );
    const wasActive = (0, import_compose3.usePrevious)(isActive);
    (0, import_element7.useLayoutEffect)(() => {
      if (!editableContentElement) {
        return;
      }
      function callback() {
        setAnchor(
          getAnchor(editableContentElement, tagName, className)
        );
      }
      function attach() {
        ownerDocument.addEventListener("selectionchange", callback);
      }
      function detach() {
        ownerDocument.removeEventListener("selectionchange", callback);
      }
      const { ownerDocument } = editableContentElement;
      if (editableContentElement === ownerDocument.activeElement || // When a link is created, we need to attach the popover to the newly created anchor.
      !wasActive && isActive || // Sometimes we're _removing_ an active anchor, such as the inline color popover.
      // When we add the color, it switches from a virtual anchor to a `<mark>` element.
      // When we _remove_ the color, it switches from a `<mark>` element to a virtual anchor.
      wasActive && !isActive) {
        setAnchor(
          getAnchor(editableContentElement, tagName, className)
        );
        attach();
      }
      editableContentElement.addEventListener("focusin", attach);
      editableContentElement.addEventListener("focusout", detach);
      return () => {
        detach();
        editableContentElement.removeEventListener("focusin", attach);
        editableContentElement.removeEventListener("focusout", detach);
      };
    }, [editableContentElement, tagName, className, isActive, wasActive]);
    return anchor;
  }

  // packages/rich-text/build-module/index.mjs
  function __experimentalRichText() {
  }
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          dist/rich-text.min.js                                                                               0000644                 00000117554 15212564025 0010555 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).richText=(()=>{var Cr=Object.create;var gt=Object.defineProperty;var Lr=Object.getOwnPropertyDescriptor;var Rr=Object.getOwnPropertyNames;var _r=Object.getPrototypeOf,Sr=Object.prototype.hasOwnProperty;var $=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ot=(e,t)=>{for(var r in t)gt(e,r,{get:t[r],enumerable:!0})},Zt=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Rr(t))!Sr.call(e,o)&&o!==r&&gt(e,o,{get:()=>t[o],enumerable:!(n=Lr(t,o))||n.enumerable});return e};var b=(e,t,r)=>(r=e!=null?Cr(_r(e)):{},Zt(t||!e||!e.__esModule?gt(r,"default",{value:e,enumerable:!0}):r,e)),Or=e=>Zt(gt({},"__esModule",{value:!0}),e);var V=$((Rn,Yt)=>{Yt.exports=window.wp.data});var ne=$((Bn,re)=>{re.exports=window.wp.escapeHtml});var xe=$((jo,we)=>{we.exports=window.wp.a11y});var Fe=$((Uo,Te)=>{Te.exports=window.wp.i18n});var Le=$((Jo,Ce)=>{Ce.exports=window.wp.privateApis});var Y=$((Qo,Se)=>{Se.exports=window.wp.element});var Nt=$((Io,Oe)=>{Oe.exports=window.wp.compose});var qt=$((ti,De)=>{De.exports=window.wp.deprecated});var Xt=$((mi,Ze)=>{Ze.exports=window.wp.keycodes});var br=$((Ji,Er)=>{Er.exports=window.wp.dom});var Cn={};Ot(Cn,{RichTextData:()=>j,__experimentalRichText:()=>An,__unstableCreateElement:()=>B,__unstableToDom:()=>jt,__unstableUseRichText:()=>hr,applyFormat:()=>vt,concat:()=>fe,create:()=>C,getActiveFormat:()=>ot,getActiveFormats:()=>X,getActiveObject:()=>me,getTextContent:()=>nt,insert:()=>at,insertObject:()=>ge,isCollapsed:()=>Z,isEmpty:()=>le,join:()=>pe,privateApis:()=>Gt,registerFormatType:()=>de,remove:()=>wt,removeFormat:()=>st,replace:()=>he,slice:()=>xt,split:()=>ye,store:()=>F,toHTMLString:()=>G,toggleFormat:()=>Ne,unregisterFormatType:()=>Ae,useAnchor:()=>Tr,useAnchorRef:()=>vr});var yt=b(V(),1);var Qt=b(V(),1);function Dr(e={},t){switch(t.type){case"ADD_FORMAT_TYPES":return{...e,...t.formatTypes.reduce((r,n)=>({...r,[n.name]:n}),{})};case"REMOVE_FORMAT_TYPES":return Object.fromEntries(Object.entries(e).filter(([r])=>!t.names.includes(r)))}return e}var It=(0,Qt.combineReducers)({formatTypes:Dr});var Mt={};Ot(Mt,{getFormatType:()=>Mr,getFormatTypeForBareElement:()=>Hr,getFormatTypeForClassName:()=>kr,getFormatTypes:()=>Dt});var te=b(V(),1),Dt=(0,te.createSelector)(e=>Object.values(e.formatTypes),e=>[e.formatTypes]);function Mr(e,t){return e.formatTypes[t]}function Hr(e,t){let r=Dt(e);return r.find(({className:n,tagName:o})=>n===null&&t===o)||r.find(({className:n,tagName:o})=>n===null&&o==="*")}function kr(e,t){return Dt(e).find(({className:r})=>r===null?!1:` ${t} `.indexOf(` ${r} `)>=0)}var Ht={};Ot(Ht,{addFormatTypes:()=>Pr,removeFormatTypes:()=>$r});function Pr(e){return{type:"ADD_FORMAT_TYPES",formatTypes:Array.isArray(e)?e:[e]}}function $r(e){return{type:"REMOVE_FORMAT_TYPES",names:Array.isArray(e)?e:[e]}}var Vr="core/rich-text",F=(0,yt.createReduxStore)(Vr,{reducer:It,selectors:Mt,actions:Ht});(0,yt.register)(F);function tt(e,t){if(e===t)return!0;if(!e||!t||e.type!==t.type)return!1;let r=e.attributes,n=t.attributes;if(r===n)return!0;if(!r||!n)return!1;let o=Object.keys(r),s=Object.keys(n);if(o.length!==s.length)return!1;let a=o.length;for(let i=0;i<a;i++){let c=o[i];if(r[c]!==n[c])return!1}return!0}function _(e){let t=e.formats.slice();return t.forEach((r,n)=>{let o=t[n-1];if(o){let s=r.slice();s.forEach((a,i)=>{let c=o[i];tt(a,c)&&(s[i]=c)}),t[n]=s}}),{...e,formats:t}}function ee(e,t,r){return e=e.slice(),e[t]=r,e}function vt(e,t,r=e.start,n=e.end){let{formats:o,activeFormats:s}=e,a=o.slice();if(r===n){let i=a[r]?.find(({type:c})=>c===t.type);if(i){let c=a[r].indexOf(i);for(;a[r]&&a[r][c]===i;)a[r]=ee(a[r],c,t),r--;for(n++;a[n]&&a[n][c]===i;)a[n]=ee(a[n],c,t),n++}}else{let i=1/0;for(let c=r;c<n;c++)if(a[c]){a[c]=a[c].filter(({type:f})=>f!==t.type);let u=a[c].length;u<i&&(i=u)}else a[c]=[],i=0;for(let c=r;c<n;c++)a[c].splice(i,0,t)}return _({...e,formats:a,activeFormats:[...s?.filter(({type:i})=>i!==t.type)||[],t]})}var Pt=b(V(),1);function B({implementation:e},t){return B.body||(B.body=e.createHTMLDocument("").body),B.body.innerHTML=t,B.body}var R="\uFFFC",mt="\uFEFF";var rt=b(ne(),1);function X(e,t=[]){let{formats:r,start:n,end:o,activeFormats:s}=e;if(n===void 0)return t;if(n===o){if(s)return s;let u=r[n-1]||t,f=r[n]||t;return u.length<f.length?u:f}if(!r[n])return t;let a=r.slice(n,o),i=[...a[0]],c=a.length;for(;c--;){let u=a[c];if(!u)return t;let f=i.length;for(;f--;){let m=i[f];u.find(l=>tt(m,l))||i.splice(f,1)}if(i.length===0)return t}return i||t}var oe=b(V(),1);function kt(e){return(0,oe.select)(F).getFormatType(e)}function ie(e,t){if(t)return e;let r={};for(let n in e){let o=n;n.startsWith("data-disable-rich-text-")&&(o=n.slice(23)),r[o]=e[n]}return r}function Et({type:e,tagName:t,attributes:r,unregisteredAttributes:n,object:o,boundaryClass:s,isEditableTree:a}){let i=kt(e),c={};if(s&&a&&(c["data-rich-text-format-boundary"]="true"),!i)return r&&(c={...r,...c}),{type:e,attributes:ie(c,a),object:o};c={...n,...c};for(let u in r){let f=i.attributes?i.attributes[u]:!1;f?c[f]=r[u]:c[u]=r[u]}return i.className&&(c.class?c.class=`${i.className} ${c.class}`:c.class=i.className),{type:t||i.tagName,object:i.object,attributes:ie(c,a)}}function Br(e,t,r){do if(e[r]!==t[r])return!1;while(r--);return!0}function bt({value:e,preserveWhiteSpace:t,createEmpty:r,append:n,getLastChild:o,getParent:s,isText:a,getText:i,remove:c,appendText:u,onStartIndex:f,onEndIndex:m,isEditableTree:l,placeholder:y}){let{formats:w,replacements:d,text:h,start:v,end:x}=e,g=w.length+1,L=r(),k=X(e),U=k[k.length-1],q,W;n(L,"");for(let T=0;T<g;T++){let E=h.charAt(T),A=l&&(!W||W===`
`),O=w[T],p=o(L);if(O&&O.forEach((D,P)=>{if(p&&q&&Br(O,q,P)){p=o(p);return}let{type:Q,tagName:I,attributes:St,unregisteredAttributes:ht}=D,Fr=l&&D===U,Nr=s(p),Ar=n(Nr,Et({type:Q,tagName:I,attributes:St,unregisteredAttributes:ht,boundaryClass:Fr,isEditableTree:l}));a(p)&&i(p).length===0&&c(p),p=n(Ar,"")}),T===0&&(f&&v===0&&f(L,p),m&&x===0&&m(L,p)),E===R){let D=d[T];if(!D)continue;let{type:P,attributes:Q,innerHTML:I}=D,St=kt(P);if(l&&P==="#comment")p=n(s(p),{type:"span",attributes:{contenteditable:"false","data-rich-text-comment":Q["data-rich-text-comment"]}}),n(n(p,{type:"span"}),Q["data-rich-text-comment"].trim());else if(!l&&P==="script")p=n(s(p),Et({type:"script",isEditableTree:l})),n(p,{html:decodeURIComponent(Q["data-rich-text-script"])});else if(St?.contentEditable===!1){if(I||l){if(p=s(p),l){let ht={contenteditable:"false","data-rich-text-bogus":!0};v===T&&x===T+1&&(ht["data-rich-text-format-boundary"]=!0),p=n(p,{type:"span",attributes:ht}),l&&T+1===h.length&&n(s(p),mt)}p=n(p,Et({...D,isEditableTree:l})),I&&n(p,{html:I})}}else p=n(s(p),Et({...D,object:!0,isEditableTree:l}));p=n(s(p),"")}else!t&&E===`
`?(p=n(s(p),{type:"br",attributes:l?{"data-rich-text-line-break":"true"}:void 0,object:!0}),p=n(s(p),"")):a(p)?u(p,E):p=n(s(p),E);f&&v===T+1&&f(L,p),m&&x===T+1&&m(L,p),A&&T===h.length&&(n(s(p),mt),y&&h.length===0&&n(s(p),{type:"span",attributes:{"data-rich-text-placeholder":y,style:"pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;"}})),q=O,W=E}return L}function G({value:e,preserveWhiteSpace:t}){let r=bt({value:e,preserveWhiteSpace:t,createEmpty:jr,append:qr,getLastChild:Ur,getParent:Kr,isText:zr,getText:Xr,remove:Gr,appendText:Wr});return se(r.children)}function jr(){return{}}function Ur({children:e}){return e&&e[e.length-1]}function qr(e,t){return typeof t=="string"&&(t={text:t}),t.parent=e,e.children=e.children||[],e.children.push(t),t}function Wr(e,t){e.text+=t}function Kr({parent:e}){return e}function zr({text:e}){return typeof e=="string"}function Xr({text:e}){return e}function Gr(e){let t=e.parent.children.indexOf(e);return t!==-1&&e.parent.children.splice(t,1),e}function Jr({type:e,attributes:t,object:r,children:n}){if(e==="#comment")return`<!--${t["data-rich-text-comment"]}-->`;let o="";for(let s in t)(0,rt.isValidAttributeName)(s)&&(o+=` ${s}="${(0,rt.escapeAttribute)(t[s])}"`);return r?`<${e}${o}>`:`<${e}${o}>${se(n)}</${e}>`}function se(e=[]){return e.map(t=>t.html!==void 0?t.html:t.text===void 0?Jr(t):(0,rt.escapeEditableHTML)(t.text)).join("")}function nt({text:e}){return e.replace(R,"")}function et(){return{formats:[],replacements:[],text:""}}function Zr({tagName:e,attributes:t}){let r;if(t&&t.class&&(r=(0,Pt.select)(F).getFormatTypeForClassName(t.class),r&&(t.class=` ${t.class} `.replace(` ${r.className} `," ").trim(),t.class||delete t.class)),r||(r=(0,Pt.select)(F).getFormatTypeForBareElement(e)),!r)return t?{type:e,attributes:t}:{type:e};if(r.__experimentalCreatePrepareEditableTree&&!r.__experimentalCreateOnChangeEditableValue)return null;if(!t)return{formatType:r,type:r.name,tagName:e};let n={},o={},s={...t};for(let a in r.attributes){let i=r.attributes[a];n[a]=s[i],delete s[i],typeof n[a]>"u"&&delete n[a]}for(let a in s)o[a]=t[a];return r.contentEditable===!1&&delete o.contenteditable,{formatType:r,type:r.name,tagName:e,attributes:n,unregisteredAttributes:o}}var j=class lt{#t;static empty(){return new lt}static fromPlainText(t){return new lt(C({text:t}))}static fromHTMLString(t){return new lt(C({html:t}))}static fromHTMLElement(t,r={}){let{preserveWhiteSpace:n=!1}=r,o=n?t:ce(t),s=new lt(C({element:o}));return Object.defineProperty(s,"originalHTML",{value:t.innerHTML}),s}constructor(t=et()){this.#t=t}toPlainText(){return nt(this.#t)}toHTMLString({preserveWhiteSpace:t}={}){return this.originalHTML||G({value:this.#t,preserveWhiteSpace:t})}valueOf(){return this.toHTMLString()}toString(){return this.toHTMLString()}toJSON(){return this.toHTMLString()}get length(){return this.text.length}get formats(){return this.#t.formats}get replacements(){return this.#t.replacements}get text(){return this.#t.text}};for(let e of Object.getOwnPropertyNames(String.prototype))j.prototype.hasOwnProperty(e)||Object.defineProperty(j.prototype,e,{value(...t){return this.toHTMLString()[e](...t)}});function C({element:e,text:t,html:r,range:n,__unstableIsEditableTree:o}={}){return r instanceof j?{text:r.text,formats:r.formats,replacements:r.replacements}:typeof t=="string"&&t.length>0?{formats:Array(t.length),replacements:Array(t.length),text:t}:(typeof r=="string"&&r.length>0&&(e=B(document,r)),typeof e!="object"?et():ue({element:e,range:n,isEditableTree:o}))}function J(e,t,r,n){if(!r)return;let{parentNode:o}=t,{startContainer:s,startOffset:a,endContainer:i,endOffset:c}=r,u=e.text.length;n.start!==void 0?e.start=u+n.start:t===s&&t.nodeType===t.TEXT_NODE?e.start=u+a:o===s&&t===s.childNodes[a]?e.start=u:o===s&&t===s.childNodes[a-1]?e.start=u+n.text.length:t===s&&(e.start=u),n.end!==void 0?e.end=u+n.end:t===i&&t.nodeType===t.TEXT_NODE?e.end=u+c:o===i&&t===i.childNodes[c-1]?e.end=u+n.text.length:o===i&&t===i.childNodes[c]?e.end=u:t===i&&(e.end=u+c)}function Yr(e,t,r){if(!t)return;let{startContainer:n,endContainer:o}=t,{startOffset:s,endOffset:a}=t;return e===n&&(s=r(e.nodeValue.slice(0,s)).length),e===o&&(a=r(e.nodeValue.slice(0,a)).length),{startContainer:n,startOffset:s,endContainer:o,endOffset:a}}function ce(e,t=!0,r=!1,n=!1){let o=e.cloneNode(!0);return o.normalize(),Array.from(o.childNodes).forEach((s,a,i)=>{if(s.nodeType===s.TEXT_NODE){let c=s.nodeValue;/[\n\t\r\f]/.test(c)&&(c=c.replace(/[\n\t\r\f]+/g," ")),c.indexOf("  ")!==-1&&(c=c.replace(/ {2,}/g," ")),a===0&&c.startsWith(" ")&&(t||r)&&(c=c.slice(1)),a===i.length-1&&c.endsWith(" ")&&(t||n)&&(c=c.slice(0,-1)),s.nodeValue=c}else if(s.nodeType===s.ELEMENT_NODE){let{previousSibling:c,nextSibling:u}=s,f=c?.textContent.endsWith(" "),m=u?.textContent.startsWith(" ");s.replaceWith(ce(s,!1,c?f:t||r,u?m:t||n))}}),o}var Qr="\r";function ae(e){return e.replace(new RegExp(`[${mt}${R}${Qr}]`,"gu"),"")}function ue({element:e,range:t,isEditableTree:r}){let n=et();if(!e)return n;if(!e.hasChildNodes())return J(n,e,t,et()),n;let o=e.childNodes.length;for(let a=0;a<o;a++){let i=e.childNodes[a],c=i.nodeName.toLowerCase();if(i.nodeType===i.TEXT_NODE){let m=ae(i.nodeValue);t=Yr(i,t,ae),J(n,i,t,{text:m}),n.formats.length+=m.length,n.replacements.length+=m.length,n.text+=m;continue}if(i.nodeType===i.COMMENT_NODE||i.nodeType===i.ELEMENT_NODE&&i.tagName==="SPAN"&&i.hasAttribute("data-rich-text-comment")){let m={formats:[,],replacements:[{type:"#comment",attributes:{"data-rich-text-comment":i.nodeType===i.COMMENT_NODE?i.nodeValue:i.getAttribute("data-rich-text-comment")}}],text:R};J(n,i,t,m),K(n,m);continue}if(i.nodeType!==i.ELEMENT_NODE)continue;if(r&&c==="br"&&!i.getAttribute("data-rich-text-line-break")){J(n,i,t,et());continue}if(c==="script"){let m={formats:[,],replacements:[{type:c,attributes:{"data-rich-text-script":i.getAttribute("data-rich-text-script")||encodeURIComponent(i.innerHTML)}}],text:R};J(n,i,t,m),K(n,m);continue}if(c==="br"){J(n,i,t,et()),K(n,C({text:`
`}));continue}let u=Zr({tagName:c,attributes:Ir({element:i})});if(u?.formatType?.contentEditable===!1){delete u.formatType,J(n,i,t,et()),K(n,{formats:[,],replacements:[{...u,innerHTML:i.innerHTML}],text:R});continue}u&&delete u.formatType;let f=ue({element:i,range:t,isEditableTree:r});if(J(n,i,t,f),!u||i.getAttribute("data-rich-text-placeholder")||i.getAttribute("data-rich-text-bogus"))K(n,f);else if(f.text.length===0)u.attributes&&K(n,{formats:[,],replacements:[u],text:R});else{let m=function(l){if(m.formats===l)return m.newFormats;let y=l?[u,...l]:[u];return m.formats=l,m.newFormats=y,y};var s=m;m.newFormats=[u],K(n,{...f,formats:Array.from(f.formats,m)})}}return n}function Ir({element:e}){if(!e.hasAttributes())return;let t=e.attributes.length,r;for(let n=0;n<t;n++){let{name:o,value:s}=e.attributes[n];if(o.indexOf("data-rich-text-")===0)continue;let a=/^on/i.test(o)?"data-disable-rich-text-"+o:o;r=r||{},r[a]=s}return r}function K(e,t){return e.formats=e.formats.concat(t.formats),e.replacements=e.replacements.concat(t.replacements),e.text+=t.text,e}function fe(...e){return _(e.reduce(K,C()))}function ot(e,t){return X(e).find(({type:r})=>r===t)}function me({start:e,end:t,replacements:r,text:n}){if(!(e+1!==t||n[e]!==R))return r[e]}function Z({start:e,end:t}){if(!(e===void 0||t===void 0))return e===t}function le({text:e}){return e.length===0}function pe(e,t=""){return typeof t=="string"&&(t=C({text:t})),_(e.reduce((r,{formats:n,replacements:o,text:s})=>({formats:r.formats.concat(t.formats,n),replacements:r.replacements.concat(t.replacements,o),text:r.text+t.text+s})))}var it=b(V(),1);function de(e,t){if(t={name:e,...t},typeof t.name!="string"){window.console.error("Format names must be strings.");return}if(!/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(t.name)){window.console.error("Format names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-format");return}if((0,it.select)(F).getFormatType(t.name)){window.console.error('Format "'+t.name+'" is already registered.');return}if(typeof t.tagName!="string"||t.tagName===""){window.console.error("Format tag names must be a string.");return}if((typeof t.className!="string"||t.className==="")&&t.className!==null){window.console.error("Format class names must be a string, or null to handle bare elements.");return}if(!/^[_a-zA-Z]+[a-zA-Z0-9_-]*$/.test(t.className)){window.console.error("A class name must begin with a letter, followed by any number of hyphens, underscores, letters, or numbers.");return}if(t.className===null){let r=(0,it.select)(F).getFormatTypeForBareElement(t.tagName);if(r&&r.name!=="core/unknown"){window.console.error(`Format "${r.name}" is already registered to handle bare tag name "${t.tagName}".`);return}}else{let r=(0,it.select)(F).getFormatTypeForClassName(t.className);if(r){window.console.error(`Format "${r.name}" is already registered to handle class name "${t.className}".`);return}}if(!("title"in t)||t.title===""){window.console.error('The format "'+t.name+'" must have a title.');return}if("keywords"in t&&t.keywords.length>3){window.console.error('The format "'+t.name+'" can have a maximum of 3 keywords.');return}if(typeof t.title!="string"){window.console.error("Format titles must be strings.");return}return(0,it.dispatch)(F).addFormatTypes(t),t}function st(e,t,r=e.start,n=e.end){let{formats:o,activeFormats:s}=e,a=o.slice();if(r===n){let i=a[r]?.find(({type:c})=>c===t);if(i){for(;a[r]?.find(c=>c===i);)$t(a,r,t),r--;for(n++;a[n]?.find(c=>c===i);)$t(a,n,t),n++}}else for(let i=r;i<n;i++)a[i]&&$t(a,i,t);return _({...e,formats:a,activeFormats:s?.filter(({type:i})=>i!==t)||[]})}function $t(e,t,r){let n=e[t].filter(({type:o})=>o!==r);n.length?e[t]=n:delete e[t]}function at(e,t,r=e.start,n=e.end){let{formats:o,replacements:s,text:a}=e;typeof t=="string"&&(t=C({text:t}));let i=r+t.text.length;return _({formats:o.slice(0,r).concat(t.formats,o.slice(n)),replacements:s.slice(0,r).concat(t.replacements,s.slice(n)),text:a.slice(0,r)+t.text+a.slice(n),start:i,end:i})}function wt(e,t,r){return at(e,C(),t,r)}function he({formats:e,replacements:t,text:r,start:n,end:o},s,a){return r=r.replace(s,(i,...c)=>{let u=c[c.length-2],f=a,m,l;return typeof f=="function"&&(f=a(i,...c)),typeof f=="object"?(m=f.formats,l=f.replacements,f=f.text):(m=Array(f.length),l=Array(f.length),e[u]&&(m=m.fill(e[u]))),e=e.slice(0,u).concat(m,e.slice(u+i.length)),t=t.slice(0,u).concat(l,t.slice(u+i.length)),n&&(n=o=u+f.length),f}),_({formats:e,replacements:t,text:r,start:n,end:o})}function ge(e,t,r,n){return at(e,{formats:[,],replacements:[t],text:R},r,n)}function xt(e,t=e.start,r=e.end){let{formats:n,replacements:o,text:s}=e;return t===void 0||r===void 0?{...e}:{formats:n.slice(t,r),replacements:o.slice(t,r),text:s.slice(t,r)}}function ye({formats:e,replacements:t,text:r,start:n,end:o},s){if(typeof s!="string")return tn(...arguments);let a=0;return r.split(s).map(i=>{let c=a,u={formats:e.slice(c,c+i.length),replacements:t.slice(c,c+i.length),text:i};return a+=s.length+i.length,n!==void 0&&o!==void 0&&(n>=c&&n<a?u.start=n-c:n<c&&o>c&&(u.start=0),o>=c&&o<a?u.end=o-c:n<a&&o>a&&(u.end=i.length)),u})}function tn({formats:e,replacements:t,text:r,start:n,end:o},s=n,a=o){if(n===void 0||o===void 0)return;let i={formats:e.slice(0,s),replacements:t.slice(0,s),text:r.slice(0,s)},c={formats:e.slice(a),replacements:t.slice(a),text:r.slice(a),start:0,end:0};return[i,c]}function Tt(e,t){return e===t||e&&t&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset}var Vt="http://www.w3.org/1998/Math/MathML";function Bt(e,t,r){let n=e.parentNode,o=0;for(;e=e.previousSibling;)o++;return r=[o,...r],n!==t&&(r=Bt(n,t,r)),r}function ve(e,t){for(t=[...t];e&&t.length>1;)e=e.childNodes[t.shift()];return{node:e,offset:t[0]}}function en(e,t){if(t.html!==void 0)return e.innerHTML+=t.html;typeof t=="string"&&(t=e.ownerDocument.createTextNode(t));let{type:r,attributes:n}=t;if(r)if(r==="#comment")t=e.ownerDocument.createComment(n["data-rich-text-comment"]);else{let o=e.namespaceURI;r==="math"?t=e.ownerDocument.createElementNS(Vt,r):o===Vt?e.tagName==="MTEXT"?t=e.ownerDocument.createElement(r):t=e.ownerDocument.createElementNS(Vt,r):t=e.ownerDocument.createElement(r);for(let s in n)t.setAttribute(s,n[s])}return e.appendChild(t)}function rn(e,t){e.appendData(t)}function nn({lastChild:e}){return e}function on({parentNode:e}){return e}function sn(e){return e.nodeType===e.TEXT_NODE}function an({nodeValue:e}){return e}function cn(e){return e.parentNode.removeChild(e)}function jt({value:e,prepareEditableTree:t,isEditableTree:r=!0,placeholder:n,doc:o=document}){let s=[],a=[];return t&&(e={...e,formats:t(e)}),{body:bt({value:e,createEmpty:()=>B(o,""),append:en,getLastChild:nn,getParent:on,isText:sn,getText:an,remove:cn,appendText:rn,onStartIndex(u,f){s=Bt(f,u,[f.nodeValue.length])},onEndIndex(u,f){a=Bt(f,u,[f.nodeValue.length])},isEditableTree:r,placeholder:n}),selection:{startPath:s,endPath:a}}}function Ee({value:e,current:t,prepareEditableTree:r,__unstableDomOnly:n,placeholder:o}){let{body:s,selection:a}=jt({value:e,prepareEditableTree:r,placeholder:o,doc:t.ownerDocument});be(s,t),e.start!==void 0&&!n&&un(a,t)}function be(e,t){let r=0,n;for(;n=e.firstChild;){let o=t.childNodes[r];if(!o)t.appendChild(n);else if(o.isEqualNode(n))e.removeChild(n);else if(o.nodeName!==n.nodeName||o.nodeType===o.TEXT_NODE&&o.data!==n.data)t.replaceChild(n,o);else{let s=o.attributes,a=n.attributes;if(s){let i=s.length;for(;i--;){let{name:c}=s[i];n.getAttribute(c)||o.removeAttribute(c)}}if(a)for(let i=0;i<a.length;i++){let{name:c,value:u}=a[i];o.getAttribute(c)!==u&&o.setAttribute(c,u)}be(n,o),e.removeChild(n)}r++}for(;t.childNodes[r];)t.removeChild(t.childNodes[r])}function un({startPath:e,endPath:t},r){let{node:n,offset:o}=ve(r,e),{node:s,offset:a}=ve(r,t),{ownerDocument:i}=r,{defaultView:c}=i,u=c.getSelection(),f=i.createRange();f.setStart(n,o),f.setEnd(s,a);let{activeElement:m}=i;if(u.rangeCount>0){if(Tt(f,u.getRangeAt(0)))return;u.removeAllRanges()}u.addRange(f),m!==i.activeElement&&m instanceof c.HTMLElement&&m.focus()}var Ut=b(xe(),1),ct=b(Fe(),1);function Ne(e,t){return ot(e,t.type)?(t.title&&(0,Ut.speak)((0,ct.sprintf)((0,ct.__)("%s removed."),t.title),"assertive"),st(e,t.type)):(t.title&&(0,Ut.speak)((0,ct.sprintf)((0,ct.__)("%s applied."),t.title),"assertive"),vt(e,t))}var Ft=b(V(),1);function Ae(e){let t=(0,Ft.select)(F).getFormatType(e);if(!t){window.console.error(`Format ${e} is not registered.`);return}return(0,Ft.dispatch)(F).removeFormatTypes(e),t}var Re=b(Le(),1),{lock:_e,unlock:Zo}=(0,Re.__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/rich-text");var H=b(Y(),1),Rt=b(Nt(),1),mr=b(V(),1),lr=b(qt(),1);var Me=b(Y(),1),fn="pre-wrap";function He(){return(0,Me.useCallback)(e=>{e&&(e.style.whiteSpace=fn)},[])}var mn={grad:.9,turn:360,rad:360/(2*Math.PI)},z=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},N=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},S=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},We=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},ke=function(e){return{r:S(e.r,0,255),g:S(e.g,0,255),b:S(e.b,0,255),a:S(e.a)}},Wt=function(e){return{r:N(e.r),g:N(e.g),b:N(e.b),a:N(e.a,3)}},ln=/^#([0-9a-f]{3,8})$/i,At=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Ke=function(e){var t=e.r,r=e.g,n=e.b,o=e.a,s=Math.max(t,r,n),a=s-Math.min(t,r,n),i=a?s===t?(r-n)/a:s===r?2+(n-t)/a:4+(t-r)/a:0;return{h:60*(i<0?i+6:i),s:s?a/s*100:0,v:s/255*100,a:o}},ze=function(e){var t=e.h,r=e.s,n=e.v,o=e.a;t=t/360*6,r/=100,n/=100;var s=Math.floor(t),a=n*(1-r),i=n*(1-(t-s)*r),c=n*(1-(1-t+s)*r),u=s%6;return{r:255*[n,i,a,a,c,n][u],g:255*[c,n,n,i,a,a][u],b:255*[a,a,c,n,n,i][u],a:o}},Pe=function(e){return{h:We(e.h),s:S(e.s,0,100),l:S(e.l,0,100),a:S(e.a)}},$e=function(e){return{h:N(e.h),s:N(e.s),l:N(e.l),a:N(e.a,3)}},Ve=function(e){return ze((r=(t=e).s,{h:t.h,s:(r*=((n=t.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:t.a}));var t,r,n},pt=function(e){return{h:(t=Ke(e)).h,s:(o=(200-(r=t.s))*(n=t.v)/100)>0&&o<200?r*n/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,r,n,o},pn=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,dn=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,hn=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,gn=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Be={string:[[function(e){var t=ln.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?N(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?N(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=hn.exec(e)||gn.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:ke({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:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=pn.exec(e)||dn.exec(e);if(!t)return null;var r,n,o=Pe({h:(r=t[1],n=t[2],n===void 0&&(n="deg"),Number(r)*(mn[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Ve(o)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,n=e.b,o=e.a,s=o===void 0?1:o;return z(t)&&z(r)&&z(n)?ke({r:Number(t),g:Number(r),b:Number(n),a:Number(s)}):null},"rgb"],[function(e){var t=e.h,r=e.s,n=e.l,o=e.a,s=o===void 0?1:o;if(!z(t)||!z(r)||!z(n))return null;var a=Pe({h:Number(t),s:Number(r),l:Number(n),a:Number(s)});return Ve(a)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,o=e.a,s=o===void 0?1:o;if(!z(t)||!z(r)||!z(n))return null;var a=(function(i){return{h:We(i.h),s:S(i.s,0,100),v:S(i.v,0,100),a:S(i.a)}})({h:Number(t),s:Number(r),v:Number(n),a:Number(s)});return ze(a)},"hsv"]]},je=function(e,t){for(var r=0;r<t.length;r++){var n=t[r][0](e);if(n)return[n,t[r][1]]}return[null,void 0]},yn=function(e){return typeof e=="string"?je(e.trim(),Be.string):typeof e=="object"&&e!==null?je(e,Be.object):[null,void 0]};var Kt=function(e,t){var r=pt(e);return{h:r.h,s:S(r.s+100*t,0,100),l:r.l,a:r.a}},zt=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Ue=function(e,t){var r=pt(e);return{h:r.h,s:r.s,l:S(r.l+100*t,0,100),a:r.a}},qe=(function(){function e(t){this.parsed=yn(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return N(zt(this.rgba),2)},e.prototype.isDark=function(){return zt(this.rgba)<.5},e.prototype.isLight=function(){return zt(this.rgba)>=.5},e.prototype.toHex=function(){return t=Wt(this.rgba),r=t.r,n=t.g,o=t.b,a=(s=t.a)<1?At(N(255*s)):"","#"+At(r)+At(n)+At(o)+a;var t,r,n,o,s,a},e.prototype.toRgb=function(){return Wt(this.rgba)},e.prototype.toRgbString=function(){return t=Wt(this.rgba),r=t.r,n=t.g,o=t.b,(s=t.a)<1?"rgba("+r+", "+n+", "+o+", "+s+")":"rgb("+r+", "+n+", "+o+")";var t,r,n,o,s},e.prototype.toHsl=function(){return $e(pt(this.rgba))},e.prototype.toHslString=function(){return t=$e(pt(this.rgba)),r=t.h,n=t.s,o=t.l,(s=t.a)<1?"hsla("+r+", "+n+"%, "+o+"%, "+s+")":"hsl("+r+", "+n+"%, "+o+"%)";var t,r,n,o,s},e.prototype.toHsv=function(){return t=Ke(this.rgba),{h:N(t.h),s:N(t.s),v:N(t.v),a:N(t.a,3)};var t},e.prototype.invert=function(){return M({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),M(Kt(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),M(Kt(this.rgba,-t))},e.prototype.grayscale=function(){return M(Kt(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),M(Ue(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),M(Ue(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?M({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):N(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=pt(this.rgba);return typeof t=="number"?M({h:t,s:r.s,l:r.l,a:r.a}):N(r.h)},e.prototype.isEqual=function(t){return this.toHex()===M(t).toHex()},e})(),M=function(e){return e instanceof qe?e:new qe(e)};var Ct=b(Y(),1);function Xe({record:e}){let t=(0,Ct.useRef)(),{activeFormats:r=[],replacements:n,start:o}=e.current,s=n[o];return(0,Ct.useEffect)(()=>{if((!r||!r.length)&&!s)return;let a="*[data-rich-text-format-boundary]",i=t.current.querySelector(a);if(!i)return;let{ownerDocument:c}=i,{defaultView:u}=c,f=u.getComputedStyle(i),m=M(f.color).alpha(.2).toRgbString(),l=`.rich-text:focus ${a}`,y=`background-color: ${m}`,w=`${l} {${y}}`,d="rich-text-boundary-style",h=c.getElementById(d);h||(h=c.createElement("style"),h.id=d,c.head.appendChild(h)),h.innerHTML!==w&&(h.innerHTML=w)},[r,s]),t}var ft=b(Y(),1),sr=b(Nt(),1);var Ge=e=>t=>{function r(o){let{record:s}=e.current,{ownerDocument:a}=t;if(Z(s.current)||!t.contains(a.activeElement))return;let i=xt(s.current),c=nt(i),u=G({value:i});o.clipboardData.setData("text/plain",c),o.clipboardData.setData("text/html",u),o.clipboardData.setData("rich-text","true"),o.preventDefault(),o.type==="cut"&&a.execCommand("delete")}let{defaultView:n}=t.ownerDocument;return n.addEventListener("copy",r),n.addEventListener("cut",r),()=>{n.removeEventListener("copy",r),n.removeEventListener("cut",r)}};var Je=()=>e=>{function t(n){let{target:o}=n;if(o===e||o.textContent&&o.isContentEditable)return;let{ownerDocument:s}=o,{defaultView:a}=s,i=a.getSelection();if(i.containsNode(o))return;let c=s.createRange(),u=o.isContentEditable?o:o.closest("[contenteditable]");c.selectNode(u),i.removeAllRanges(),i.addRange(c),n.preventDefault()}function r(n){n.relatedTarget&&!e.contains(n.relatedTarget)&&n.relatedTarget.tagName==="A"&&t(n)}return e.addEventListener("click",t),e.addEventListener("focusin",r),()=>{e.removeEventListener("click",t),e.removeEventListener("focusin",r)}};var ut=b(Xt(),1);var Ye=[],Qe=e=>t=>{function r(n){let{keyCode:o,shiftKey:s,altKey:a,metaKey:i,ctrlKey:c}=n;if(s||a||i||c||o!==ut.LEFT&&o!==ut.RIGHT)return;let{record:u,applyRecord:f,forceRender:m}=e.current,{text:l,formats:y,start:w,end:d,activeFormats:h=[]}=u.current,v=Z(u.current),{ownerDocument:x}=t,{defaultView:g}=x,{direction:L}=g.getComputedStyle(t),k=L==="rtl"?ut.RIGHT:ut.LEFT,U=n.keyCode===k;if(v&&h.length===0&&(w===0&&U||d===l.length&&!U)||!v)return;let q=y[w-1]||Ye,W=y[w]||Ye,T=U?q:W,E=h.every((Q,I)=>Q===T[I]),A=h.length;if(E?A<T.length&&A++:A--,A===h.length){u.current._newActiveFormats=T;return}n.preventDefault();let D=(E?T:U?W:q).slice(0,A),P={...u.current,activeFormats:D};u.current=P,f(P),m()}return t.addEventListener("keydown",r),()=>{t.removeEventListener("keydown",r)}};var Lt=b(Xt(),1);var Ie=e=>t=>{function r(n){let{keyCode:o}=n,{createRecord:s,handleChange:a}=e.current;if(n.defaultPrevented||o!==Lt.DELETE&&o!==Lt.BACKSPACE)return;let i=s(),{start:c,end:u,text:f}=i;c===0&&u!==0&&u===f.length&&(a(wt(i)),n.preventDefault())}return t.addEventListener("keydown",r),()=>{t.removeEventListener("keydown",r)}};function tr({value:e,start:t,end:r,formats:n}){let o=Math.min(t,r),s=Math.max(t,r),a=e.formats[o-1]||[],i=e.formats[s]||[];for(e.activeFormats=n.map((c,u)=>{if(a[u]){if(tt(c,a[u]))return a[u]}else if(i[u]&&tt(c,i[u]))return i[u];return c});--r>=t;)e.activeFormats.length>0?e.formats[r]=e.activeFormats:delete e.formats[r];return e}var vn=new Set(["insertParagraph","insertOrderedList","insertUnorderedList","insertHorizontalRule","insertLink"]),er=[],rr="data-rich-text-placeholder";function En(e){let t=e.getSelection(),{anchorNode:r,anchorOffset:n}=t;if(r.nodeType!==r.ELEMENT_NODE)return;let o=r.childNodes[n];!o||o.nodeType!==o.ELEMENT_NODE||!o.hasAttribute(rr)||t.collapseToStart()}var nr=e=>t=>{let{ownerDocument:r}=t,{defaultView:n}=r,o=!1;function s(f){if(o)return;let m;f&&(m=f.inputType);let{record:l,applyRecord:y,createRecord:w,handleChange:d}=e.current;if(m&&(m.indexOf("format")===0||vn.has(m))){y(l.current);return}let h=w(),{start:v,activeFormats:x=[]}=l.current,g=!Z(l.current)&&h.start<=v,L=tr({value:h,start:v,end:h.start,formats:g?[]:x});d(L)}function a(){let{record:f,applyRecord:m,createRecord:l,onSelectionChange:y}=e.current;if(t.contentEditable!=="true")return;if(r.activeElement!==t){r.removeEventListener("selectionchange",a);return}if(o)return;let{start:w,end:d,text:h}=l(),v=f.current;if(h!==v.text){s();return}if(w===v.start&&d===v.end){v.text.length===0&&w===0&&En(n);return}let x={...v,start:w,end:d,activeFormats:v._newActiveFormats,_newActiveFormats:void 0},g=X(x,er);x.activeFormats=g,f.current=x,m(x,{domOnly:!0}),y(w,d)}function i(){o=!0,r.removeEventListener("selectionchange",a),t.querySelector(`[${rr}]`)?.remove()}function c(){o=!1,s({inputType:"insertText"}),r.addEventListener("selectionchange",a)}function u(){let{record:f,isSelected:m,onSelectionChange:l,applyRecord:y}=e.current;t.parentElement.closest('[contenteditable="true"]')||(m?y(f.current,{domOnly:!0}):f.current={...f.current,start:void 0,end:void 0,activeFormats:er},l(f.current.start,f.current.end),window.queueMicrotask(a),r.addEventListener("selectionchange",a))}return t.addEventListener("input",s),t.addEventListener("compositionstart",i),t.addEventListener("compositionend",c),t.addEventListener("focus",u),()=>{t.removeEventListener("input",s),t.removeEventListener("compositionstart",i),t.removeEventListener("compositionend",c),t.removeEventListener("focus",u)}};var or=()=>e=>{let{ownerDocument:t}=e,{defaultView:r}=t,n=r?.getSelection(),o;function s(){return n.rangeCount?n.getRangeAt(0):null}function a(i){let c=i.type==="keydown"?"keyup":"pointerup";function u(){t.removeEventListener(c,f),t.removeEventListener("selectionchange",u),t.removeEventListener("input",u)}function f(){u(),!Tt(o,s())&&t.dispatchEvent(new Event("selectionchange"))}t.addEventListener(c,f),t.addEventListener("selectionchange",u),t.addEventListener("input",u),o=s()}return e.addEventListener("pointerdown",a),e.addEventListener("keydown",a),()=>{e.removeEventListener("pointerdown",a),e.removeEventListener("keydown",a)}};function ir(){return e=>{let{ownerDocument:t}=e,{defaultView:r}=t,n=null;function o(a){a.defaultPrevented||a.target!==e&&a.target.contains(e)&&(n=e.getAttribute("contenteditable"),e.setAttribute("contenteditable","false"),r.getSelection().removeAllRanges())}function s(){n!==null&&(e.setAttribute("contenteditable",n),n=null)}return r.addEventListener("pointerdown",o),r.addEventListener("pointerup",s),()=>{r.removeEventListener("pointerdown",o),r.removeEventListener("pointerup",s)}}}var bn=[Ge,Je,Qe,Ie,nr,or,ir];function ar(e){let t=(0,ft.useRef)(e);(0,ft.useInsertionEffect)(()=>{t.current=e});let r=(0,ft.useMemo)(()=>bn.map(n=>n(t)),[t]);return(0,sr.useRefEffect)(n=>{let o=r.map(s=>s(n));return()=>{o.forEach(s=>s())}},[r])}var ur=b(Y(),1),dt=b(V(),1);function wn(e){return e(F).getFormatTypes()}var xn=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function Tn(e,t){return typeof e!="object"?{[t]:e}:Object.fromEntries(Object.entries(e).map(([r,n])=>[`${t}.${r}`,n]))}function cr(e,t){return e[t]?e[t]:Object.keys(e).filter(r=>r.startsWith(t+".")).reduce((r,n)=>(r[n.slice(t.length+1)]=e[n],r),{})}function fr({allowedFormats:e,withoutInteractiveFormatting:t,__unstableFormatTypeHandlerContext:r}){let n=(0,dt.useSelect)(wn,[]),o=(0,ur.useMemo)(()=>n.filter(({name:m,interactive:l,tagName:y})=>!(e&&!e.includes(m)||t&&(l||xn.has(y)))),[n,e,t]),s=(0,dt.useSelect)(m=>o.reduce((l,y)=>!y.__experimentalGetPropsForEditableTreePreparation||!r?l:{...l,...Tn(y.__experimentalGetPropsForEditableTreePreparation(m,r),y.name)},{}),[o,r]),a=(0,dt.useDispatch)(),i=[],c=[],u=[],f=[];for(let m in s)f.push(s[m]);return o.forEach(m=>{if(m.__experimentalCreatePrepareEditableTree&&r){let l=m.__experimentalCreatePrepareEditableTree(cr(s,m.name),r);m.__experimentalCreateOnChangeEditableValue?c.push(l):i.push(l)}if(m.__experimentalCreateOnChangeEditableValue&&r){let l={};m.__experimentalGetPropsForEditableTreeChangeHandler&&(l=m.__experimentalGetPropsForEditableTreeChangeHandler(a,r));let y=cr(s,m.name);u.push(m.__experimentalCreateOnChangeEditableValue({...typeof y=="object"?y:{},...l},r))}}),{formatTypes:o,prepareHandlers:i,valueHandlers:c,changeHandlers:u,dependencies:f}}function pr({value:e="",selectionStart:t,selectionEnd:r,placeholder:n,onSelectionChange:o,preserveWhiteSpace:s,onChange:a,__unstableDisableFormats:i,__unstableIsSelected:c,__unstableDependencies:u=[],__unstableAfterParse:f,__unstableBeforeSerialize:m,__unstableAddInvisibleFormats:l}){let y=(0,mr.useRegistry)(),[,w]=(0,H.useReducer)(()=>({})),d=(0,H.useRef)();function h(){let{ownerDocument:{defaultView:E}}=d.current,A=E.getSelection(),O=A.rangeCount>0?A.getRangeAt(0):null;return C({element:d.current,range:O,__unstableIsEditableTree:!0})}function v(E,{domOnly:A}={}){Ee({value:E,current:d.current,prepareEditableTree:l,__unstableDomOnly:A,placeholder:n})}let x=(0,H.useRef)(e),g=(0,H.useRef)();function L(){let E=g.current?.activeFormats;x.current=e,g.current=e,e instanceof j||(g.current=e?j.fromHTMLString(e,{preserveWhiteSpace:s}):j.empty()),g.current={text:g.current.text,formats:g.current.formats,replacements:g.current.replacements,activeFormats:E},i&&(g.current.formats=Array(e.length),g.current.replacements=Array(e.length)),f&&(g.current.formats=f(g.current)),g.current.start=t,g.current.end=r}let k=(0,H.useRef)(!1);g.current?(t!==g.current.start||r!==g.current.end)&&(k.current=c,g.current={...g.current,start:t,end:r,activeFormats:void 0}):(k.current=c,L());function U(E){if(g.current=E,v(E),i)x.current=E.text;else{let P=m?m(E):E.formats;E={...E,formats:P},typeof e=="string"?x.current=G({value:E,preserveWhiteSpace:s}):x.current=new j(E)}let{start:A,end:O,formats:p,text:D}=g.current;y.batch(()=>{o(A,O),a(x.current,{__unstableFormats:p,__unstableText:D})}),w()}function q(){let E=x.current;L();let A=E&&typeof E=="string"&&typeof e=="string"&&E.length!==e.length,O=d.current?.contains(d.current.ownerDocument.activeElement),p=A&&!O;v(g.current,{domOnly:p})}let W=(0,H.useRef)(!1);(0,H.useLayoutEffect)(()=>{W.current&&e!==x.current&&(q(),w())},[e]),(0,H.useLayoutEffect)(()=>{k.current&&(d.current.ownerDocument.activeElement!==d.current&&d.current.focus(),v(g.current),k.current=!1)},[k.current]);let T=(0,Rt.useMergeRefs)([d,He(),Xe({record:g}),ar({record:g,handleChange:U,applyRecord:v,createRecord:h,isSelected:c,onSelectionChange:o,forceRender:w}),(0,Rt.useRefEffect)(()=>{q(),W.current=!0},[n,...u])]);return{value:g.current,getValue:()=>g.current,onChange:U,ref:T}}function dr({allowedFormats:e,withoutInteractiveFormatting:t,onChange:r,__unstableDependencies:n=[],__unstableFormatTypeHandlerContext:o,...s}){let{formatTypes:a,prepareHandlers:i,valueHandlers:c,changeHandlers:u,dependencies:f}=fr({allowedFormats:e,withoutInteractiveFormatting:t,__unstableFormatTypeHandlerContext:o});function m(d){return c.reduce((h,v)=>v(h,d.text),d.formats)}function l(d){return a.forEach(h=>{h.__experimentalCreatePrepareEditableTree&&(d=st(d,h.name,0,d.text.length))}),d.formats}function y(d){return i.reduce((h,v)=>v(h,d.text),d.formats)}return{...pr({...s,onChange(d,{__unstableFormats:h,__unstableText:v}){r(d,{__unstableFormats:h,__unstableText:v}),Object.values(u).forEach(x=>{x(h,v)})},__unstableDependencies:[...f,...n],__unstableAfterParse:m,__unstableBeforeSerialize:l,__unstableAddInvisibleFormats:y}),formatTypes:a}}function hr(e){return(0,lr.default)("`__unstableUseRichText` hook",{since:"7.0"}),pr(e)}var Gt={};_e(Gt,{useRichText:dr});var gr=b(Y(),1),yr=b(qt(),1);function vr({ref:e,value:t,settings:r={}}){(0,yr.default)("`useAnchorRef` hook",{since:"6.1",alternative:"`useAnchor` hook"});let{tagName:n,className:o,name:s}=r,a=s?ot(t,s):void 0;return(0,gr.useMemo)(()=>{if(!e.current)return;let{ownerDocument:{defaultView:i}}=e.current,c=i.getSelection();if(!c.rangeCount)return;let u=c.getRangeAt(0);if(!a)return u;let f=u.startContainer;for(f=f.nextElementSibling||f;f.nodeType!==f.ELEMENT_NODE;)f=f.parentNode;return f.closest(n+(o?"."+o:""))},[a,t.start,t.end,n,o])}var wr=b(Nt(),1),_t=b(Y(),1),xr=b(br(),1);function Fn(e,t,r,n){let o=e.startContainer;if(o.nodeType===o.TEXT_NODE&&e.startOffset===o.length&&o.nextSibling)for(o=o.nextSibling;o.firstChild;)o=o.firstChild;if(o.nodeType!==o.ELEMENT_NODE&&(o=o.parentElement),!o||o===t||!t.contains(o))return;let s=r+(n?"."+n:"");for(;o!==t;){if(o.matches(s))return o;o=o.parentElement}}function Nn(e,t){return{contextElement:t,getBoundingClientRect(){return t.contains(e.startContainer)?(0,xr.getRectangleFromRange)(e)??e.getBoundingClientRect():t.getBoundingClientRect()}}}function Jt(e,t,r){if(!e)return;let{ownerDocument:n}=e,{defaultView:o}=n,s=o.getSelection();if(!s||!s.rangeCount)return;let a=s.getRangeAt(0);if(!a||!a.startContainer)return;let i=Fn(a,e,t,r);return i||Nn(a,e)}function Tr({editableContentElement:e,settings:t={}}){let{tagName:r,className:n,isActive:o}=t,[s,a]=(0,_t.useState)(()=>Jt(e,r,n)),i=(0,wr.usePrevious)(o);return(0,_t.useLayoutEffect)(()=>{if(!e)return;function c(){a(Jt(e,r,n))}function u(){m.addEventListener("selectionchange",c)}function f(){m.removeEventListener("selectionchange",c)}let{ownerDocument:m}=e;return(e===m.activeElement||!i&&o||i&&!o)&&(a(Jt(e,r,n)),u()),e.addEventListener("focusin",u),e.addEventListener("focusout",f),()=>{f(),e.removeEventListener("focusin",u),e.removeEventListener("focusout",f)}},[e,r,n,o,i]),s}function An(){}return Or(Cn);})();
                                                                                                                                                    dist/router.js                                                                                      0000644                 00000110173 15212564025 0007372 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).router = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to2, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to2, key) && key !== except)
          __defProp(to2, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to2;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/url
  var require_url = __commonJS({
    "package-external:@wordpress/url"(exports, module) {
      module.exports = window.wp.url;
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // package-external:@wordpress/private-apis
  var require_private_apis = __commonJS({
    "package-external:@wordpress/private-apis"(exports, module) {
      module.exports = window.wp.privateApis;
    }
  });

  // packages/router/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    privateApis: () => privateApis
  });

  // node_modules/route-recognizer/dist/route-recognizer.es.js
  var createObject = Object.create;
  function createMap() {
    var map2 = createObject(null);
    map2["__"] = void 0;
    delete map2["__"];
    return map2;
  }
  var Target = function Target2(path, matcher, delegate) {
    this.path = path;
    this.matcher = matcher;
    this.delegate = delegate;
  };
  Target.prototype.to = function to(target, callback) {
    var delegate = this.delegate;
    if (delegate && delegate.willAddRoute) {
      target = delegate.willAddRoute(this.matcher.target, target);
    }
    this.matcher.add(this.path, target);
    if (callback) {
      if (callback.length === 0) {
        throw new Error("You must have an argument in the function passed to `to`");
      }
      this.matcher.addChild(this.path, target, callback, this.delegate);
    }
  };
  var Matcher = function Matcher2(target) {
    this.routes = createMap();
    this.children = createMap();
    this.target = target;
  };
  Matcher.prototype.add = function add(path, target) {
    this.routes[path] = target;
  };
  Matcher.prototype.addChild = function addChild(path, target, callback, delegate) {
    var matcher = new Matcher(target);
    this.children[path] = matcher;
    var match2 = generateMatch(path, matcher, delegate);
    if (delegate && delegate.contextEntered) {
      delegate.contextEntered(target, match2);
    }
    callback(match2);
  };
  function generateMatch(startingPath, matcher, delegate) {
    function match2(path, callback) {
      var fullPath = startingPath + path;
      if (callback) {
        callback(generateMatch(fullPath, matcher, delegate));
      } else {
        return new Target(fullPath, matcher, delegate);
      }
    }
    return match2;
  }
  function addRoute(routeArray, path, handler) {
    var len = 0;
    for (var i = 0; i < routeArray.length; i++) {
      len += routeArray[i].path.length;
    }
    path = path.substr(len);
    var route = { path, handler };
    routeArray.push(route);
  }
  function eachRoute(baseRoute, matcher, callback, binding) {
    var routes = matcher.routes;
    var paths = Object.keys(routes);
    for (var i = 0; i < paths.length; i++) {
      var path = paths[i];
      var routeArray = baseRoute.slice();
      addRoute(routeArray, path, routes[path]);
      var nested = matcher.children[path];
      if (nested) {
        eachRoute(routeArray, nested, callback, binding);
      } else {
        callback.call(binding, routeArray);
      }
    }
  }
  var map = function(callback, addRouteCallback) {
    var matcher = new Matcher();
    callback(generateMatch("", matcher, this.delegate));
    eachRoute([], matcher, function(routes) {
      if (addRouteCallback) {
        addRouteCallback(this, routes);
      } else {
        this.add(routes);
      }
    }, this);
  };
  function normalizePath(path) {
    return path.split("/").map(normalizeSegment).join("/");
  }
  var SEGMENT_RESERVED_CHARS = /%|\//g;
  function normalizeSegment(segment) {
    if (segment.length < 3 || segment.indexOf("%") === -1) {
      return segment;
    }
    return decodeURIComponent(segment).replace(SEGMENT_RESERVED_CHARS, encodeURIComponent);
  }
  var PATH_SEGMENT_ENCODINGS = /%(?:2(?:4|6|B|C)|3(?:B|D|A)|40)/g;
  function encodePathSegment(str) {
    return encodeURIComponent(str).replace(PATH_SEGMENT_ENCODINGS, decodeURIComponent);
  }
  var escapeRegex = /(\/|\.|\*|\+|\?|\||\(|\)|\[|\]|\{|\}|\\)/g;
  var isArray = Array.isArray;
  var hasOwnProperty = Object.prototype.hasOwnProperty;
  function getParam(params, key) {
    if (typeof params !== "object" || params === null) {
      throw new Error("You must pass an object as the second argument to `generate`.");
    }
    if (!hasOwnProperty.call(params, key)) {
      throw new Error("You must provide param `" + key + "` to `generate`.");
    }
    var value = params[key];
    var str = typeof value === "string" ? value : "" + value;
    if (str.length === 0) {
      throw new Error("You must provide a param `" + key + "`.");
    }
    return str;
  }
  var eachChar = [];
  eachChar[
    0
    /* Static */
  ] = function(segment, currentState) {
    var state = currentState;
    var value = segment.value;
    for (var i = 0; i < value.length; i++) {
      var ch = value.charCodeAt(i);
      state = state.put(ch, false, false);
    }
    return state;
  };
  eachChar[
    1
    /* Dynamic */
  ] = function(_, currentState) {
    return currentState.put(47, true, true);
  };
  eachChar[
    2
    /* Star */
  ] = function(_, currentState) {
    return currentState.put(-1, false, true);
  };
  eachChar[
    4
    /* Epsilon */
  ] = function(_, currentState) {
    return currentState;
  };
  var regex = [];
  regex[
    0
    /* Static */
  ] = function(segment) {
    return segment.value.replace(escapeRegex, "\\$1");
  };
  regex[
    1
    /* Dynamic */
  ] = function() {
    return "([^/]+)";
  };
  regex[
    2
    /* Star */
  ] = function() {
    return "(.+)";
  };
  regex[
    4
    /* Epsilon */
  ] = function() {
    return "";
  };
  var generate = [];
  generate[
    0
    /* Static */
  ] = function(segment) {
    return segment.value;
  };
  generate[
    1
    /* Dynamic */
  ] = function(segment, params) {
    var value = getParam(params, segment.value);
    if (RouteRecognizer.ENCODE_AND_DECODE_PATH_SEGMENTS) {
      return encodePathSegment(value);
    } else {
      return value;
    }
  };
  generate[
    2
    /* Star */
  ] = function(segment, params) {
    return getParam(params, segment.value);
  };
  generate[
    4
    /* Epsilon */
  ] = function() {
    return "";
  };
  var EmptyObject = Object.freeze({});
  var EmptyArray = Object.freeze([]);
  function parse(segments, route, types) {
    if (route.length > 0 && route.charCodeAt(0) === 47) {
      route = route.substr(1);
    }
    var parts = route.split("/");
    var names = void 0;
    var shouldDecodes = void 0;
    for (var i = 0; i < parts.length; i++) {
      var part = parts[i];
      var flags = 0;
      var type = 0;
      if (part === "") {
        type = 4;
      } else if (part.charCodeAt(0) === 58) {
        type = 1;
      } else if (part.charCodeAt(0) === 42) {
        type = 2;
      } else {
        type = 0;
      }
      flags = 2 << type;
      if (flags & 12) {
        part = part.slice(1);
        names = names || [];
        names.push(part);
        shouldDecodes = shouldDecodes || [];
        shouldDecodes.push((flags & 4) !== 0);
      }
      if (flags & 14) {
        types[type]++;
      }
      segments.push({
        type,
        value: normalizeSegment(part)
      });
    }
    return {
      names: names || EmptyArray,
      shouldDecodes: shouldDecodes || EmptyArray
    };
  }
  function isEqualCharSpec(spec, char, negate) {
    return spec.char === char && spec.negate === negate;
  }
  var State = function State2(states, id, char, negate, repeat) {
    this.states = states;
    this.id = id;
    this.char = char;
    this.negate = negate;
    this.nextStates = repeat ? id : null;
    this.pattern = "";
    this._regex = void 0;
    this.handlers = void 0;
    this.types = void 0;
  };
  State.prototype.regex = function regex$1() {
    if (!this._regex) {
      this._regex = new RegExp(this.pattern);
    }
    return this._regex;
  };
  State.prototype.get = function get(char, negate) {
    var this$1 = this;
    var nextStates = this.nextStates;
    if (nextStates === null) {
      return;
    }
    if (isArray(nextStates)) {
      for (var i = 0; i < nextStates.length; i++) {
        var child = this$1.states[nextStates[i]];
        if (isEqualCharSpec(child, char, negate)) {
          return child;
        }
      }
    } else {
      var child$1 = this.states[nextStates];
      if (isEqualCharSpec(child$1, char, negate)) {
        return child$1;
      }
    }
  };
  State.prototype.put = function put(char, negate, repeat) {
    var state;
    if (state = this.get(char, negate)) {
      return state;
    }
    var states = this.states;
    state = new State(states, states.length, char, negate, repeat);
    states[states.length] = state;
    if (this.nextStates == null) {
      this.nextStates = state.id;
    } else if (isArray(this.nextStates)) {
      this.nextStates.push(state.id);
    } else {
      this.nextStates = [this.nextStates, state.id];
    }
    return state;
  };
  State.prototype.match = function match(ch) {
    var this$1 = this;
    var nextStates = this.nextStates;
    if (!nextStates) {
      return [];
    }
    var returned = [];
    if (isArray(nextStates)) {
      for (var i = 0; i < nextStates.length; i++) {
        var child = this$1.states[nextStates[i]];
        if (isMatch(child, ch)) {
          returned.push(child);
        }
      }
    } else {
      var child$1 = this.states[nextStates];
      if (isMatch(child$1, ch)) {
        returned.push(child$1);
      }
    }
    return returned;
  };
  function isMatch(spec, char) {
    return spec.negate ? spec.char !== char && spec.char !== -1 : spec.char === char || spec.char === -1;
  }
  function sortSolutions(states) {
    return states.sort(function(a, b) {
      var ref = a.types || [0, 0, 0];
      var astatics = ref[0];
      var adynamics = ref[1];
      var astars = ref[2];
      var ref$1 = b.types || [0, 0, 0];
      var bstatics = ref$1[0];
      var bdynamics = ref$1[1];
      var bstars = ref$1[2];
      if (astars !== bstars) {
        return astars - bstars;
      }
      if (astars) {
        if (astatics !== bstatics) {
          return bstatics - astatics;
        }
        if (adynamics !== bdynamics) {
          return bdynamics - adynamics;
        }
      }
      if (adynamics !== bdynamics) {
        return adynamics - bdynamics;
      }
      if (astatics !== bstatics) {
        return bstatics - astatics;
      }
      return 0;
    });
  }
  function recognizeChar(states, ch) {
    var nextStates = [];
    for (var i = 0, l = states.length; i < l; i++) {
      var state = states[i];
      nextStates = nextStates.concat(state.match(ch));
    }
    return nextStates;
  }
  var RecognizeResults = function RecognizeResults2(queryParams) {
    this.length = 0;
    this.queryParams = queryParams || {};
  };
  RecognizeResults.prototype.splice = Array.prototype.splice;
  RecognizeResults.prototype.slice = Array.prototype.slice;
  RecognizeResults.prototype.push = Array.prototype.push;
  function findHandler(state, originalPath, queryParams) {
    var handlers = state.handlers;
    var regex2 = state.regex();
    if (!regex2 || !handlers) {
      throw new Error("state not initialized");
    }
    var captures = originalPath.match(regex2);
    var currentCapture = 1;
    var result = new RecognizeResults(queryParams);
    result.length = handlers.length;
    for (var i = 0; i < handlers.length; i++) {
      var handler = handlers[i];
      var names = handler.names;
      var shouldDecodes = handler.shouldDecodes;
      var params = EmptyObject;
      var isDynamic = false;
      if (names !== EmptyArray && shouldDecodes !== EmptyArray) {
        for (var j = 0; j < names.length; j++) {
          isDynamic = true;
          var name = names[j];
          var capture = captures && captures[currentCapture++];
          if (params === EmptyObject) {
            params = {};
          }
          if (RouteRecognizer.ENCODE_AND_DECODE_PATH_SEGMENTS && shouldDecodes[j]) {
            params[name] = capture && decodeURIComponent(capture);
          } else {
            params[name] = capture;
          }
        }
      }
      result[i] = {
        handler: handler.handler,
        params,
        isDynamic
      };
    }
    return result;
  }
  function decodeQueryParamPart(part) {
    part = part.replace(/\+/gm, "%20");
    var result;
    try {
      result = decodeURIComponent(part);
    } catch (error) {
      result = "";
    }
    return result;
  }
  var RouteRecognizer = function RouteRecognizer2() {
    this.names = createMap();
    var states = [];
    var state = new State(states, 0, -1, true, false);
    states[0] = state;
    this.states = states;
    this.rootState = state;
  };
  RouteRecognizer.prototype.add = function add2(routes, options) {
    var currentState = this.rootState;
    var pattern = "^";
    var types = [0, 0, 0];
    var handlers = new Array(routes.length);
    var allSegments = [];
    var isEmpty = true;
    var j = 0;
    for (var i = 0; i < routes.length; i++) {
      var route = routes[i];
      var ref = parse(allSegments, route.path, types);
      var names = ref.names;
      var shouldDecodes = ref.shouldDecodes;
      for (; j < allSegments.length; j++) {
        var segment = allSegments[j];
        if (segment.type === 4) {
          continue;
        }
        isEmpty = false;
        currentState = currentState.put(47, false, false);
        pattern += "/";
        currentState = eachChar[segment.type](segment, currentState);
        pattern += regex[segment.type](segment);
      }
      handlers[i] = {
        handler: route.handler,
        names,
        shouldDecodes
      };
    }
    if (isEmpty) {
      currentState = currentState.put(47, false, false);
      pattern += "/";
    }
    currentState.handlers = handlers;
    currentState.pattern = pattern + "$";
    currentState.types = types;
    var name;
    if (typeof options === "object" && options !== null && options.as) {
      name = options.as;
    }
    if (name) {
      this.names[name] = {
        segments: allSegments,
        handlers
      };
    }
  };
  RouteRecognizer.prototype.handlersFor = function handlersFor(name) {
    var route = this.names[name];
    if (!route) {
      throw new Error("There is no route named " + name);
    }
    var result = new Array(route.handlers.length);
    for (var i = 0; i < route.handlers.length; i++) {
      var handler = route.handlers[i];
      result[i] = handler;
    }
    return result;
  };
  RouteRecognizer.prototype.hasRoute = function hasRoute(name) {
    return !!this.names[name];
  };
  RouteRecognizer.prototype.generate = function generate$1(name, params) {
    var route = this.names[name];
    var output = "";
    if (!route) {
      throw new Error("There is no route named " + name);
    }
    var segments = route.segments;
    for (var i = 0; i < segments.length; i++) {
      var segment = segments[i];
      if (segment.type === 4) {
        continue;
      }
      output += "/";
      output += generate[segment.type](segment, params);
    }
    if (output.charAt(0) !== "/") {
      output = "/" + output;
    }
    if (params && params.queryParams) {
      output += this.generateQueryString(params.queryParams);
    }
    return output;
  };
  RouteRecognizer.prototype.generateQueryString = function generateQueryString(params) {
    var pairs = [];
    var keys = Object.keys(params);
    keys.sort();
    for (var i = 0; i < keys.length; i++) {
      var key = keys[i];
      var value = params[key];
      if (value == null) {
        continue;
      }
      var pair = encodeURIComponent(key);
      if (isArray(value)) {
        for (var j = 0; j < value.length; j++) {
          var arrayPair = key + "[]=" + encodeURIComponent(value[j]);
          pairs.push(arrayPair);
        }
      } else {
        pair += "=" + encodeURIComponent(value);
        pairs.push(pair);
      }
    }
    if (pairs.length === 0) {
      return "";
    }
    return "?" + pairs.join("&");
  };
  RouteRecognizer.prototype.parseQueryString = function parseQueryString(queryString) {
    var pairs = queryString.split("&");
    var queryParams = {};
    for (var i = 0; i < pairs.length; i++) {
      var pair = pairs[i].split("="), key = decodeQueryParamPart(pair[0]), keyLength = key.length, isArray2 = false, value = void 0;
      if (pair.length === 1) {
        value = "true";
      } else {
        if (keyLength > 2 && key.slice(keyLength - 2) === "[]") {
          isArray2 = true;
          key = key.slice(0, keyLength - 2);
          if (!queryParams[key]) {
            queryParams[key] = [];
          }
        }
        value = pair[1] ? decodeQueryParamPart(pair[1]) : "";
      }
      if (isArray2) {
        queryParams[key].push(value);
      } else {
        queryParams[key] = value;
      }
    }
    return queryParams;
  };
  RouteRecognizer.prototype.recognize = function recognize(path) {
    var results;
    var states = [this.rootState];
    var queryParams = {};
    var isSlashDropped = false;
    var hashStart = path.indexOf("#");
    if (hashStart !== -1) {
      path = path.substr(0, hashStart);
    }
    var queryStart = path.indexOf("?");
    if (queryStart !== -1) {
      var queryString = path.substr(queryStart + 1, path.length);
      path = path.substr(0, queryStart);
      queryParams = this.parseQueryString(queryString);
    }
    if (path.charAt(0) !== "/") {
      path = "/" + path;
    }
    var originalPath = path;
    if (RouteRecognizer.ENCODE_AND_DECODE_PATH_SEGMENTS) {
      path = normalizePath(path);
    } else {
      path = decodeURI(path);
      originalPath = decodeURI(originalPath);
    }
    var pathLen = path.length;
    if (pathLen > 1 && path.charAt(pathLen - 1) === "/") {
      path = path.substr(0, pathLen - 1);
      originalPath = originalPath.substr(0, originalPath.length - 1);
      isSlashDropped = true;
    }
    for (var i = 0; i < path.length; i++) {
      states = recognizeChar(states, path.charCodeAt(i));
      if (!states.length) {
        break;
      }
    }
    var solutions = [];
    for (var i$1 = 0; i$1 < states.length; i$1++) {
      if (states[i$1].handlers) {
        solutions.push(states[i$1]);
      }
    }
    states = sortSolutions(solutions);
    var state = solutions[0];
    if (state && state.handlers) {
      if (isSlashDropped && state.pattern && state.pattern.slice(-5) === "(.+)$") {
        originalPath = originalPath + "/";
      }
      results = findHandler(state, originalPath, queryParams);
    }
    return results;
  };
  RouteRecognizer.VERSION = "0.3.4";
  RouteRecognizer.ENCODE_AND_DECODE_PATH_SEGMENTS = true;
  RouteRecognizer.Normalizer = {
    normalizeSegment,
    normalizePath,
    encodePathSegment
  };
  RouteRecognizer.prototype.map = map;
  var route_recognizer_es_default = RouteRecognizer;

  // node_modules/@babel/runtime/helpers/esm/extends.js
  function _extends() {
    return _extends = Object.assign ? Object.assign.bind() : function(n) {
      for (var e = 1; e < arguments.length; e++) {
        var t = arguments[e];
        for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
      }
      return n;
    }, _extends.apply(null, arguments);
  }

  // node_modules/history/index.js
  var Action;
  (function(Action2) {
    Action2["Pop"] = "POP";
    Action2["Push"] = "PUSH";
    Action2["Replace"] = "REPLACE";
  })(Action || (Action = {}));
  var readOnly = true ? function(obj) {
    return Object.freeze(obj);
  } : function(obj) {
    return obj;
  };
  function warning(cond, message) {
    if (!cond) {
      if (typeof console !== "undefined") console.warn(message);
      try {
        throw new Error(message);
      } catch (e) {
      }
    }
  }
  var BeforeUnloadEventType = "beforeunload";
  var PopStateEventType = "popstate";
  function createBrowserHistory(options) {
    if (options === void 0) {
      options = {};
    }
    var _options = options, _options$window = _options.window, window2 = _options$window === void 0 ? document.defaultView : _options$window;
    var globalHistory = window2.history;
    function getIndexAndLocation() {
      var _window$location = window2.location, pathname = _window$location.pathname, search = _window$location.search, hash = _window$location.hash;
      var state = globalHistory.state || {};
      return [state.idx, readOnly({
        pathname,
        search,
        hash,
        state: state.usr || null,
        key: state.key || "default"
      })];
    }
    var blockedPopTx = null;
    function handlePop() {
      if (blockedPopTx) {
        blockers.call(blockedPopTx);
        blockedPopTx = null;
      } else {
        var nextAction = Action.Pop;
        var _getIndexAndLocation = getIndexAndLocation(), nextIndex = _getIndexAndLocation[0], nextLocation = _getIndexAndLocation[1];
        if (blockers.length) {
          if (nextIndex != null) {
            var delta = index - nextIndex;
            if (delta) {
              blockedPopTx = {
                action: nextAction,
                location: nextLocation,
                retry: function retry() {
                  go(delta * -1);
                }
              };
              go(delta);
            }
          } else {
            true ? warning(
              false,
              // TODO: Write up a doc that explains our blocking strategy in
              // detail and link to it here so people can understand better what
              // is going on and how to avoid it.
              "You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation."
            ) : void 0;
          }
        } else {
          applyTx(nextAction);
        }
      }
    }
    window2.addEventListener(PopStateEventType, handlePop);
    var action = Action.Pop;
    var _getIndexAndLocation2 = getIndexAndLocation(), index = _getIndexAndLocation2[0], location = _getIndexAndLocation2[1];
    var listeners = createEvents();
    var blockers = createEvents();
    if (index == null) {
      index = 0;
      globalHistory.replaceState(_extends({}, globalHistory.state, {
        idx: index
      }), "");
    }
    function createHref(to2) {
      return typeof to2 === "string" ? to2 : createPath(to2);
    }
    function getNextLocation(to2, state) {
      if (state === void 0) {
        state = null;
      }
      return readOnly(_extends({
        pathname: location.pathname,
        hash: "",
        search: ""
      }, typeof to2 === "string" ? parsePath(to2) : to2, {
        state,
        key: createKey()
      }));
    }
    function getHistoryStateAndUrl(nextLocation, index2) {
      return [{
        usr: nextLocation.state,
        key: nextLocation.key,
        idx: index2
      }, createHref(nextLocation)];
    }
    function allowTx(action2, location2, retry) {
      return !blockers.length || (blockers.call({
        action: action2,
        location: location2,
        retry
      }), false);
    }
    function applyTx(nextAction) {
      action = nextAction;
      var _getIndexAndLocation3 = getIndexAndLocation();
      index = _getIndexAndLocation3[0];
      location = _getIndexAndLocation3[1];
      listeners.call({
        action,
        location
      });
    }
    function push(to2, state) {
      var nextAction = Action.Push;
      var nextLocation = getNextLocation(to2, state);
      function retry() {
        push(to2, state);
      }
      if (allowTx(nextAction, nextLocation, retry)) {
        var _getHistoryStateAndUr = getHistoryStateAndUrl(nextLocation, index + 1), historyState = _getHistoryStateAndUr[0], url = _getHistoryStateAndUr[1];
        try {
          globalHistory.pushState(historyState, "", url);
        } catch (error) {
          window2.location.assign(url);
        }
        applyTx(nextAction);
      }
    }
    function replace(to2, state) {
      var nextAction = Action.Replace;
      var nextLocation = getNextLocation(to2, state);
      function retry() {
        replace(to2, state);
      }
      if (allowTx(nextAction, nextLocation, retry)) {
        var _getHistoryStateAndUr2 = getHistoryStateAndUrl(nextLocation, index), historyState = _getHistoryStateAndUr2[0], url = _getHistoryStateAndUr2[1];
        globalHistory.replaceState(historyState, "", url);
        applyTx(nextAction);
      }
    }
    function go(delta) {
      globalHistory.go(delta);
    }
    var history2 = {
      get action() {
        return action;
      },
      get location() {
        return location;
      },
      createHref,
      push,
      replace,
      go,
      back: function back() {
        go(-1);
      },
      forward: function forward() {
        go(1);
      },
      listen: function listen(listener) {
        return listeners.push(listener);
      },
      block: function block(blocker) {
        var unblock = blockers.push(blocker);
        if (blockers.length === 1) {
          window2.addEventListener(BeforeUnloadEventType, promptBeforeUnload);
        }
        return function() {
          unblock();
          if (!blockers.length) {
            window2.removeEventListener(BeforeUnloadEventType, promptBeforeUnload);
          }
        };
      }
    };
    return history2;
  }
  function promptBeforeUnload(event) {
    event.preventDefault();
    event.returnValue = "";
  }
  function createEvents() {
    var handlers = [];
    return {
      get length() {
        return handlers.length;
      },
      push: function push(fn) {
        handlers.push(fn);
        return function() {
          handlers = handlers.filter(function(handler) {
            return handler !== fn;
          });
        };
      },
      call: function call(arg) {
        handlers.forEach(function(fn) {
          return fn && fn(arg);
        });
      }
    };
  }
  function createKey() {
    return Math.random().toString(36).substr(2, 8);
  }
  function createPath(_ref) {
    var _ref$pathname = _ref.pathname, pathname = _ref$pathname === void 0 ? "/" : _ref$pathname, _ref$search = _ref.search, search = _ref$search === void 0 ? "" : _ref$search, _ref$hash = _ref.hash, hash = _ref$hash === void 0 ? "" : _ref$hash;
    if (search && search !== "?") pathname += search.charAt(0) === "?" ? search : "?" + search;
    if (hash && hash !== "#") pathname += hash.charAt(0) === "#" ? hash : "#" + hash;
    return pathname;
  }
  function parsePath(path) {
    var parsedPath = {};
    if (path) {
      var hashIndex = path.indexOf("#");
      if (hashIndex >= 0) {
        parsedPath.hash = path.substr(hashIndex);
        path = path.substr(0, hashIndex);
      }
      var searchIndex = path.indexOf("?");
      if (searchIndex >= 0) {
        parsedPath.search = path.substr(searchIndex);
        path = path.substr(0, searchIndex);
      }
      if (path) {
        parsedPath.pathname = path;
      }
    }
    return parsedPath;
  }

  // packages/router/build-module/router.mjs
  var import_element = __toESM(require_element(), 1);
  var import_url = __toESM(require_url(), 1);
  var import_compose = __toESM(require_compose(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  var history = createBrowserHistory();
  var RoutesContext = (0, import_element.createContext)(null);
  RoutesContext.displayName = "RoutesContext";
  var ConfigContext = (0, import_element.createContext)({ pathArg: "p" });
  ConfigContext.displayName = "ConfigContext";
  var locationMemo = /* @__PURE__ */ new WeakMap();
  function getLocationWithQuery() {
    const location = history.location;
    let locationWithQuery = locationMemo.get(location);
    if (!locationWithQuery) {
      locationWithQuery = {
        ...location,
        query: Object.fromEntries(new URLSearchParams(location.search))
      };
      locationMemo.set(location, locationWithQuery);
    }
    return locationWithQuery;
  }
  function useLocation() {
    const context = (0, import_element.useContext)(RoutesContext);
    if (!context) {
      throw new Error("useLocation must be used within a RouterProvider");
    }
    return context;
  }
  function useHistory() {
    const { pathArg, beforeNavigate } = (0, import_element.useContext)(ConfigContext);
    const navigate = (0, import_compose.useEvent)(
      async (rawPath, options = {}) => {
        const query = (0, import_url.getQueryArgs)(rawPath);
        const path = (0, import_url.getPath)("http://domain.com/" + rawPath) ?? "";
        const performPush = () => {
          const result = beforeNavigate ? beforeNavigate({ path, query }) : { path, query };
          return history.push(
            {
              search: (0, import_url.buildQueryString)({
                [pathArg]: result.path,
                ...result.query
              })
            },
            options.state
          );
        };
        const isMediumOrBigger = window.matchMedia("(min-width: 782px)").matches;
        if (!isMediumOrBigger || !document.startViewTransition || !options.transition) {
          performPush();
          return;
        }
        await new Promise((resolve) => {
          const classname = options.transition ?? "";
          document.documentElement.classList.add(classname);
          const transition = document.startViewTransition(
            () => performPush()
          );
          transition.finished.finally(() => {
            document.documentElement.classList.remove(classname);
            resolve();
          });
        });
      }
    );
    return (0, import_element.useMemo)(
      () => ({
        navigate,
        back: history.back,
        invalidate: () => {
          history.replace({
            search: history.location.search
          });
        }
      }),
      [navigate]
    );
  }
  function useMatch(location, matcher, pathArg, matchResolverArgs) {
    const { query: rawQuery = {} } = location;
    const [resolvedMatch, setMatch] = (0, import_element.useState)();
    (0, import_element.useEffect)(() => {
      const { [pathArg]: path = "/", ...query } = rawQuery;
      const ret = matcher.recognize(path)?.[0];
      async function resolveMatch(result) {
        const matchedRoute = result.handler;
        const resolveFunctions = async (record = {}) => {
          const entries = await Promise.all(
            Object.entries(record).map(async ([key, value]) => {
              if (typeof value === "function") {
                return [
                  key,
                  await value({
                    query,
                    params: result.params,
                    ...matchResolverArgs
                  })
                ];
              }
              return [key, value];
            })
          );
          return Object.fromEntries(entries);
        };
        const [resolvedAreas, resolvedWidths] = await Promise.all([
          resolveFunctions(matchedRoute.areas),
          resolveFunctions(matchedRoute.widths)
        ]);
        setMatch({
          name: matchedRoute.name,
          areas: resolvedAreas,
          widths: resolvedWidths,
          params: result.params,
          query,
          path: (0, import_url.addQueryArgs)(path, query)
        });
      }
      if (!ret) {
        setMatch({
          name: "404",
          path: (0, import_url.addQueryArgs)(path, query),
          areas: {},
          widths: {},
          query,
          params: {}
        });
      } else {
        resolveMatch(ret);
      }
      return () => setMatch(void 0);
    }, [matcher, rawQuery, pathArg, matchResolverArgs]);
    return resolvedMatch;
  }
  function RouterProvider({
    routes,
    pathArg,
    beforeNavigate,
    children,
    matchResolverArgs
  }) {
    const location = (0, import_element.useSyncExternalStore)(
      history.listen,
      getLocationWithQuery,
      getLocationWithQuery
    );
    const matcher = (0, import_element.useMemo)(() => {
      const ret = new route_recognizer_es_default();
      (routes ?? []).forEach((route) => {
        ret.add([{ path: route.path, handler: route }], {
          as: route.name
        });
      });
      return ret;
    }, [routes]);
    const match2 = useMatch(location, matcher, pathArg, matchResolverArgs);
    const previousMatch = (0, import_compose.usePrevious)(match2);
    const config = (0, import_element.useMemo)(
      () => ({ beforeNavigate, pathArg }),
      [beforeNavigate, pathArg]
    );
    const renderedMatch = match2 || previousMatch;
    if (!renderedMatch) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ConfigContext.Provider, { value: config, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RoutesContext.Provider, { value: renderedMatch, children }) });
  }

  // packages/router/build-module/link.mjs
  var import_element2 = __toESM(require_element(), 1);
  var import_url2 = __toESM(require_url(), 1);
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  function useLink(to2, options = {}) {
    const history2 = useHistory();
    const { pathArg, beforeNavigate } = (0, import_element2.useContext)(ConfigContext);
    function onClick(event) {
      event?.preventDefault();
      history2.navigate(to2, options);
    }
    const query = (0, import_url2.getQueryArgs)(to2);
    const path = (0, import_url2.getPath)("http://domain.com/" + to2) ?? "";
    const link = (0, import_element2.useMemo)(() => {
      return beforeNavigate ? beforeNavigate({ path, query }) : { path, query };
    }, [path, query, beforeNavigate]);
    const [before] = window.location.href.split("?");
    return {
      href: `${before}?${(0, import_url2.buildQueryString)({
        [pathArg]: link.path,
        ...link.query
      })}`,
      onClick
    };
  }
  function Link({
    to: to2,
    options,
    children,
    ...props
  }) {
    const { href, onClick } = useLink(to2, options);
    return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("a", { href, onClick, ...props, children });
  }

  // packages/router/build-module/lock-unlock.mjs
  var import_private_apis = __toESM(require_private_apis(), 1);
  var { lock, unlock } = (0, import_private_apis.__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/router"
  );

  // packages/router/build-module/private-apis.mjs
  var privateApis = {};
  lock(privateApis, {
    useHistory,
    useLocation,
    RouterProvider,
    useLink,
    Link
  });
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                                                                                                     dist/router.min.js                                                                                  0000644                 00000034143 15212564025 0010156 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).router=(()=>{var qt=Object.create;var V=Object.defineProperty;var Qt=Object.getOwnPropertyDescriptor;var Vt=Object.getOwnPropertyNames;var $t=Object.getPrototypeOf,Ut=Object.prototype.hasOwnProperty;var T=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Bt=(e,t)=>{for(var r in t)V(e,r,{get:t[r],enumerable:!0})},ut=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Vt(t))!Ut.call(e,a)&&a!==r&&V(e,a,{get:()=>t[a],enumerable:!(n=Qt(t,a))||n.enumerable});return e};var O=(e,t,r)=>(r=e!=null?qt($t(e)):{},ut(t||!e||!e.__esModule?V(r,"default",{value:e,enumerable:!0}):r,e)),Gt=e=>ut(V({},"__esModule",{value:!0}),e);var tt=T((ge,Pt)=>{Pt.exports=window.wp.element});var et=T((me,Ot)=>{Ot.exports=window.wp.url});var Rt=T((ye,_t)=>{_t.exports=window.wp.compose});var rt=T((we,At)=>{At.exports=window.ReactJSXRuntime});var Ht=T((Oe,Mt)=>{Mt.exports=window.wp.privateApis});var ce={};Bt(ce,{privateApis:()=>it});var Jt=Object.create;function K(){var e=Jt(null);return e.__=void 0,delete e.__,e}var vt=function(t,r,n){this.path=t,this.matcher=r,this.delegate=n};vt.prototype.to=function(t,r){var n=this.delegate;if(n&&n.willAddRoute&&(t=n.willAddRoute(this.matcher.target,t)),this.matcher.add(this.path,t),r){if(r.length===0)throw new Error("You must have an argument in the function passed to `to`");this.matcher.addChild(this.path,t,r,this.delegate)}};var $=function(t){this.routes=K(),this.children=K(),this.target=t};$.prototype.add=function(t,r){this.routes[t]=r};$.prototype.addChild=function(t,r,n,a){var o=new $(r);this.children[t]=o;var i=X(t,o,a);a&&a.contextEntered&&a.contextEntered(r,i),n(i)};function X(e,t,r){function n(a,o){var i=e+a;if(o)o(X(i,t,r));else return new vt(i,t,r)}return n}function Yt(e,t,r){for(var n=0,a=0;a<e.length;a++)n+=e[a].path.length;t=t.substr(n);var o={path:t,handler:r};e.push(o)}function dt(e,t,r,n){for(var a=t.routes,o=Object.keys(a),i=0;i<o.length;i++){var s=o[i],c=e.slice();Yt(c,s,a[s]);var u=t.children[s];u?dt(c,u,r,n):r.call(n,c)}}var Wt=function(e,t){var r=new $;e(X("",r,this.delegate)),dt([],r,function(n){t?t(this,n):this.add(n)},this)};function pt(e){return e.split("/").map(Z).join("/")}var Ft=/%|\//g;function Z(e){return e.length<3||e.indexOf("%")===-1?e:decodeURIComponent(e).replace(Ft,encodeURIComponent)}var Kt=/%(?:2(?:4|6|B|C)|3(?:B|D|A)|40)/g;function gt(e){return encodeURIComponent(e).replace(Kt,decodeURIComponent)}var Xt=/(\/|\.|\*|\+|\?|\||\(|\)|\[|\]|\{|\}|\\)/g,B=Array.isArray,Zt=Object.prototype.hasOwnProperty;function mt(e,t){if(typeof e!="object"||e===null)throw new Error("You must pass an object as the second argument to `generate`.");if(!Zt.call(e,t))throw new Error("You must provide param `"+t+"` to `generate`.");var r=e[t],n=typeof r=="string"?r:""+r;if(n.length===0)throw new Error("You must provide a param `"+t+"`.");return n}var M=[];M[0]=function(e,t){for(var r=t,n=e.value,a=0;a<n.length;a++){var o=n.charCodeAt(a);r=r.put(o,!1,!1)}return r};M[1]=function(e,t){return t.put(47,!0,!0)};M[2]=function(e,t){return t.put(-1,!1,!0)};M[4]=function(e,t){return t};var H=[];H[0]=function(e){return e.value.replace(Xt,"\\$1")};H[1]=function(){return"([^/]+)"};H[2]=function(){return"(.+)"};H[4]=function(){return""};var j=[];j[0]=function(e){return e.value};j[1]=function(e,t){var r=mt(t,e.value);return y.ENCODE_AND_DECODE_PATH_SEGMENTS?gt(r):r};j[2]=function(e,t){return mt(t,e.value)};j[4]=function(){return""};var ct=Object.freeze({}),U=Object.freeze([]);function te(e,t,r){t.length>0&&t.charCodeAt(0)===47&&(t=t.substr(1));for(var n=t.split("/"),a=void 0,o=void 0,i=0;i<n.length;i++){var s=n[i],c=0,u=0;s===""?u=4:s.charCodeAt(0)===58?u=1:s.charCodeAt(0)===42?u=2:u=0,c=2<<u,c&12&&(s=s.slice(1),a=a||[],a.push(s),o=o||[],o.push((c&4)!==0)),c&14&&r[u]++,e.push({type:u,value:Z(s)})}return{names:a||U,shouldDecodes:o||U}}function lt(e,t,r){return e.char===t&&e.negate===r}var C=function(t,r,n,a,o){this.states=t,this.id=r,this.char=n,this.negate=a,this.nextStates=o?r:null,this.pattern="",this._regex=void 0,this.handlers=void 0,this.types=void 0};C.prototype.regex=function(){return this._regex||(this._regex=new RegExp(this.pattern)),this._regex};C.prototype.get=function(t,r){var n=this,a=this.nextStates;if(a!==null)if(B(a))for(var o=0;o<a.length;o++){var i=n.states[a[o]];if(lt(i,t,r))return i}else{var s=this.states[a];if(lt(s,t,r))return s}};C.prototype.put=function(t,r,n){var a;if(a=this.get(t,r))return a;var o=this.states;return a=new C(o,o.length,t,r,n),o[o.length]=a,this.nextStates==null?this.nextStates=a.id:B(this.nextStates)?this.nextStates.push(a.id):this.nextStates=[this.nextStates,a.id],a};C.prototype.match=function(t){var r=this,n=this.nextStates;if(!n)return[];var a=[];if(B(n))for(var o=0;o<n.length;o++){var i=r.states[n[o]];ht(i,t)&&a.push(i)}else{var s=this.states[n];ht(s,t)&&a.push(s)}return a};function ht(e,t){return e.negate?e.char!==t&&e.char!==-1:e.char===t||e.char===-1}function ee(e){return e.sort(function(t,r){var n=t.types||[0,0,0],a=n[0],o=n[1],i=n[2],s=r.types||[0,0,0],c=s[0],u=s[1],h=s[2];if(i!==h)return i-h;if(i){if(a!==c)return c-a;if(o!==u)return u-o}return o!==u?o-u:a!==c?c-a:0})}function re(e,t){for(var r=[],n=0,a=e.length;n<a;n++){var o=e[n];r=r.concat(o.match(t))}return r}var G=function(t){this.length=0,this.queryParams=t||{}};G.prototype.splice=Array.prototype.splice;G.prototype.slice=Array.prototype.slice;G.prototype.push=Array.prototype.push;function ne(e,t,r){var n=e.handlers,a=e.regex();if(!a||!n)throw new Error("state not initialized");var o=t.match(a),i=1,s=new G(r);s.length=n.length;for(var c=0;c<n.length;c++){var u=n[c],h=u.names,d=u.shouldDecodes,v=ct,p=!1;if(h!==U&&d!==U)for(var g=0;g<h.length;g++){p=!0;var x=h[g],E=o&&o[i++];v===ct&&(v={}),y.ENCODE_AND_DECODE_PATH_SEGMENTS&&d[g]?v[x]=E&&decodeURIComponent(E):v[x]=E}s[c]={handler:u.handler,params:v,isDynamic:p}}return s}function ft(e){e=e.replace(/\+/gm,"%20");var t;try{t=decodeURIComponent(e)}catch{t=""}return t}var y=function(){this.names=K();var t=[],r=new C(t,0,-1,!0,!1);t[0]=r,this.states=t,this.rootState=r};y.prototype.add=function(t,r){for(var n=this.rootState,a="^",o=[0,0,0],i=new Array(t.length),s=[],c=!0,u=0,h=0;h<t.length;h++){for(var d=t[h],v=te(s,d.path,o),p=v.names,g=v.shouldDecodes;u<s.length;u++){var x=s[u];x.type!==4&&(c=!1,n=n.put(47,!1,!1),a+="/",n=M[x.type](x,n),a+=H[x.type](x))}i[h]={handler:d.handler,names:p,shouldDecodes:g}}c&&(n=n.put(47,!1,!1),a+="/"),n.handlers=i,n.pattern=a+"$",n.types=o;var E;typeof r=="object"&&r!==null&&r.as&&(E=r.as),E&&(this.names[E]={segments:s,handlers:i})};y.prototype.handlersFor=function(t){var r=this.names[t];if(!r)throw new Error("There is no route named "+t);for(var n=new Array(r.handlers.length),a=0;a<r.handlers.length;a++){var o=r.handlers[a];n[a]=o}return n};y.prototype.hasRoute=function(t){return!!this.names[t]};y.prototype.generate=function(t,r){var n=this.names[t],a="";if(!n)throw new Error("There is no route named "+t);for(var o=n.segments,i=0;i<o.length;i++){var s=o[i];s.type!==4&&(a+="/",a+=j[s.type](s,r))}return a.charAt(0)!=="/"&&(a="/"+a),r&&r.queryParams&&(a+=this.generateQueryString(r.queryParams)),a};y.prototype.generateQueryString=function(t){var r=[],n=Object.keys(t);n.sort();for(var a=0;a<n.length;a++){var o=n[a],i=t[o];if(i!=null){var s=encodeURIComponent(o);if(B(i))for(var c=0;c<i.length;c++){var u=o+"[]="+encodeURIComponent(i[c]);r.push(u)}else s+="="+encodeURIComponent(i),r.push(s)}}return r.length===0?"":"?"+r.join("&")};y.prototype.parseQueryString=function(t){for(var r=t.split("&"),n={},a=0;a<r.length;a++){var o=r[a].split("="),i=ft(o[0]),s=i.length,c=!1,u=void 0;o.length===1?u="true":(s>2&&i.slice(s-2)==="[]"&&(c=!0,i=i.slice(0,s-2),n[i]||(n[i]=[])),u=o[1]?ft(o[1]):""),c?n[i].push(u):n[i]=u}return n};y.prototype.recognize=function(t){var r,n=[this.rootState],a={},o=!1,i=t.indexOf("#");i!==-1&&(t=t.substr(0,i));var s=t.indexOf("?");if(s!==-1){var c=t.substr(s+1,t.length);t=t.substr(0,s),a=this.parseQueryString(c)}t.charAt(0)!=="/"&&(t="/"+t);var u=t;y.ENCODE_AND_DECODE_PATH_SEGMENTS?t=pt(t):(t=decodeURI(t),u=decodeURI(u));var h=t.length;h>1&&t.charAt(h-1)==="/"&&(t=t.substr(0,h-1),u=u.substr(0,u.length-1),o=!0);for(var d=0;d<t.length&&(n=re(n,t.charCodeAt(d)),!!n.length);d++);for(var v=[],p=0;p<n.length;p++)n[p].handlers&&v.push(n[p]);n=ee(v);var g=v[0];return g&&g.handlers&&(o&&g.pattern&&g.pattern.slice(-5)==="(.+)$"&&(u=u+"/"),r=ne(g,u,a)),r};y.VERSION="0.3.4";y.ENCODE_AND_DECODE_PATH_SEGMENTS=!0;y.Normalizer={normalizeSegment:Z,normalizePath:pt,encodePathSegment:gt};y.prototype.map=Wt;var yt=y;function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},z.apply(null,arguments)}var N;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(N||(N={}));var wt=function(e){return e};var xt="beforeunload";var ae="popstate";function St(e){e===void 0&&(e={});var t=e,r=t.window,n=r===void 0?document.defaultView:r,a=n.history;function o(){var l=n.location,f=l.pathname,w=l.search,S=l.hash,b=a.state||{};return[b.idx,wt({pathname:f,search:w,hash:S,state:b.usr||null,key:b.key||"default"})]}var i=null;function s(){if(i)p.call(i),i=null;else{var l=N.Pop,f=o(),w=f[0],S=f[1];if(p.length){if(w!=null){var b=h-w;b&&(i={action:l,location:S,retry:function(){L(b*-1)}},L(b))}}else _(l)}}n.addEventListener(ae,s);var c=N.Pop,u=o(),h=u[0],d=u[1],v=bt(),p=bt();h==null&&(h=0,a.replaceState(z({},a.state,{idx:h}),""));function g(l){return typeof l=="string"?l:ie(l)}function x(l,f){return f===void 0&&(f=null),wt(z({pathname:d.pathname,hash:"",search:""},typeof l=="string"?se(l):l,{state:f,key:oe()}))}function E(l,f){return[{usr:l.state,key:l.key,idx:f},g(l)]}function q(l,f,w){return!p.length||(p.call({action:l,location:f,retry:w}),!1)}function _(l){c=l;var f=o();h=f[0],d=f[1],v.call({action:c,location:d})}function R(l,f){var w=N.Push,S=x(l,f);function b(){R(l,f)}if(q(w,S,b)){var A=E(S,h+1),F=A[0],Q=A[1];try{a.pushState(F,"",Q)}catch{n.location.assign(Q)}_(w)}}function st(l,f){var w=N.Replace,S=x(l,f);function b(){st(l,f)}if(q(w,S,b)){var A=E(S,h),F=A[0],Q=A[1];a.replaceState(F,"",Q),_(w)}}function L(l){a.go(l)}var It={get action(){return c},get location(){return d},createHref:g,push:R,replace:st,go:L,back:function(){L(-1)},forward:function(){L(1)},listen:function(f){return v.push(f)},block:function(f){var w=p.push(f);return p.length===1&&n.addEventListener(xt,Et),function(){w(),p.length||n.removeEventListener(xt,Et)}}};return It}function Et(e){e.preventDefault(),e.returnValue=""}function bt(){var e=[];return{get length(){return e.length},push:function(r){return e.push(r),function(){e=e.filter(function(n){return n!==r})}},call:function(r){e.forEach(function(n){return n&&n(r)})}}}function oe(){return Math.random().toString(36).substr(2,8)}function ie(e){var t=e.pathname,r=t===void 0?"/":t,n=e.search,a=n===void 0?"":n,o=e.hash,i=o===void 0?"":o;return a&&a!=="?"&&(r+=a.charAt(0)==="?"?a:"?"+a),i&&i!=="#"&&(r+=i.charAt(0)==="#"?i:"#"+i),r}function se(e){var t={};if(e){var r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));var n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}var m=O(tt(),1),P=O(et(),1),J=O(Rt(),1),nt=O(rt(),1),k=St(),at=(0,m.createContext)(null);at.displayName="RoutesContext";var I=(0,m.createContext)({pathArg:"p"});I.displayName="ConfigContext";var Ct=new WeakMap;function Nt(){let e=k.location,t=Ct.get(e);return t||(t={...e,query:Object.fromEntries(new URLSearchParams(e.search))},Ct.set(e,t)),t}function kt(){let e=(0,m.useContext)(at);if(!e)throw new Error("useLocation must be used within a RouterProvider");return e}function Y(){let{pathArg:e,beforeNavigate:t}=(0,m.useContext)(I),r=(0,J.useEvent)(async(n,a={})=>{let o=(0,P.getQueryArgs)(n),i=(0,P.getPath)("http://domain.com/"+n)??"",s=()=>{let u=t?t({path:i,query:o}):{path:i,query:o};return k.push({search:(0,P.buildQueryString)({[e]:u.path,...u.query})},a.state)};if(!window.matchMedia("(min-width: 782px)").matches||!document.startViewTransition||!a.transition){s();return}await new Promise(u=>{let h=a.transition??"";document.documentElement.classList.add(h),document.startViewTransition(()=>s()).finished.finally(()=>{document.documentElement.classList.remove(h),u()})})});return(0,m.useMemo)(()=>({navigate:r,back:k.back,invalidate:()=>{k.replace({search:k.location.search})}}),[r])}function ue(e,t,r,n){let{query:a={}}=e,[o,i]=(0,m.useState)();return(0,m.useEffect)(()=>{let{[r]:s="/",...c}=a,u=t.recognize(s)?.[0];async function h(d){let v=d.handler,p=async(E={})=>{let q=await Promise.all(Object.entries(E).map(async([_,R])=>typeof R=="function"?[_,await R({query:c,params:d.params,...n})]:[_,R]));return Object.fromEntries(q)},[g,x]=await Promise.all([p(v.areas),p(v.widths)]);i({name:v.name,areas:g,widths:x,params:d.params,query:c,path:(0,P.addQueryArgs)(s,c)})}return u?h(u):i({name:"404",path:(0,P.addQueryArgs)(s,c),areas:{},widths:{},query:c,params:{}}),()=>i(void 0)},[t,a,r,n]),o}function Dt({routes:e,pathArg:t,beforeNavigate:r,children:n,matchResolverArgs:a}){let o=(0,m.useSyncExternalStore)(k.listen,Nt,Nt),i=(0,m.useMemo)(()=>{let d=new yt;return(e??[]).forEach(v=>{d.add([{path:v.path,handler:v}],{as:v.name})}),d},[e]),s=ue(o,i,t,a),c=(0,J.usePrevious)(s),u=(0,m.useMemo)(()=>({beforeNavigate:r,pathArg:t}),[r,t]),h=s||c;return h?(0,nt.jsx)(I.Provider,{value:u,children:(0,nt.jsx)(at.Provider,{value:h,children:n})}):null}var W=O(tt(),1),D=O(et(),1);var Lt=O(rt(),1);function ot(e,t={}){let r=Y(),{pathArg:n,beforeNavigate:a}=(0,W.useContext)(I);function o(h){h?.preventDefault(),r.navigate(e,t)}let i=(0,D.getQueryArgs)(e),s=(0,D.getPath)("http://domain.com/"+e)??"",c=(0,W.useMemo)(()=>a?a({path:s,query:i}):{path:s,query:i},[s,i,a]),[u]=window.location.href.split("?");return{href:`${u}?${(0,D.buildQueryString)({[n]:c.path,...c.query})}`,onClick:o}}function Tt({to:e,options:t,children:r,...n}){let{href:a,onClick:o}=ot(e,t);return(0,Lt.jsx)("a",{href:a,onClick:o,...n,children:r})}var jt=O(Ht(),1),{lock:zt,unlock:_e}=(0,jt.__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/router");var it={};zt(it,{useHistory:Y,useLocation:kt,RouterProvider:Dt,useLink:ot,Link:Tt});return Gt(ce);})();
                                                                                                                                                                                                                                                                                                                                                                                                                             dist/script-modules/a11y/index.js                                                                   0000644                 00000002502 15212564025 0012702 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       // packages/a11y/build-module/shared/clear.mjs
function clear() {
  const regions = document.getElementsByClassName("a11y-speak-region");
  const introText = document.getElementById("a11y-speak-intro-text");
  for (let i = 0; i < regions.length; i++) {
    regions[i].textContent = "";
  }
  if (introText) {
    introText.setAttribute("hidden", "hidden");
  }
}

// packages/a11y/build-module/shared/filter-message.mjs
var previousMessage = "";
function filterMessage(message) {
  message = message.replace(/<[^<>]+>/g, " ");
  if (previousMessage === message) {
    message += "\xA0";
  }
  previousMessage = message;
  return message;
}

// packages/a11y/build-module/shared/index.mjs
function speak(message, ariaLive) {
  clear();
  message = filterMessage(message);
  const introText = document.getElementById("a11y-speak-intro-text");
  const containerAssertive = document.getElementById(
    "a11y-speak-assertive"
  );
  const containerPolite = document.getElementById("a11y-speak-polite");
  if (containerAssertive && ariaLive === "assertive") {
    containerAssertive.textContent = message;
  } else if (containerPolite) {
    containerPolite.textContent = message;
  }
  if (introText) {
    introText.removeAttribute("hidden");
  }
}

// packages/a11y/build-module/module/index.mjs
var setup = () => {
};
export {
  setup,
  speak
};
                                                                                                                                                                                              dist/script-modules/a11y/index.min.js                                                               0000644                 00000001131 15212564025 0013461 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       function i(){let t=document.getElementsByClassName("a11y-speak-region"),n=document.getElementById("a11y-speak-intro-text");for(let e=0;e<t.length;e++)t[e].textContent="";n&&n.setAttribute("hidden","hidden")}var a="";function c(t){return t=t.replace(/<[^<>]+>/g," "),a===t&&(t+="\xA0"),a=t,t}function l(t,n){i(),t=c(t);let e=document.getElementById("a11y-speak-intro-text"),o=document.getElementById("a11y-speak-assertive"),r=document.getElementById("a11y-speak-polite");o&&n==="assertive"?o.textContent=t:r&&(r.textContent=t),e&&e.removeAttribute("hidden")}var m=()=>{};export{m as setup,l as speak};
                                                                                                                                                                                                                                                                                                                                                                                                                                       dist/script-modules/a11y/index.min.asset.php                                                        0000644                 00000000123 15212564025 0014752 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php return array('dependencies' => array(), 'version' => '1c371cb517a97cdbcb9f');                                                                                                                                                                                                                                                                                                                                                                                                                                             dist/script-modules/block-editor/utils/fit-text-frontend.js                                         0000644                 00000006071 15212564025 0020124 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       // packages/block-editor/build-module/utils/fit-text-frontend.mjs
import { store, getElement, getContext } from "@wordpress/interactivity";

// packages/block-editor/build-module/utils/fit-text-utils.mjs
function findOptimalFontSize(textElement, applyFontSize) {
  const alreadyHasScrollableHeight = textElement.scrollHeight > textElement.clientHeight;
  let minSize = 0;
  let maxSize = 2400;
  let bestSize = minSize;
  const computedStyle = window.getComputedStyle(textElement);
  let paddingLeft = parseFloat(computedStyle.paddingLeft) || 0;
  let paddingRight = parseFloat(computedStyle.paddingRight) || 0;
  const range = document.createRange();
  range.selectNodeContents(textElement);
  let referenceElement = textElement;
  const parentElement = textElement.parentElement;
  if (parentElement) {
    const parentElementComputedStyle = window.getComputedStyle(parentElement);
    if (parentElementComputedStyle?.display === "flex") {
      referenceElement = parentElement;
      paddingLeft += parseFloat(parentElementComputedStyle.paddingLeft) || 0;
      paddingRight += parseFloat(parentElementComputedStyle.paddingRight) || 0;
    }
  }
  let maxclientHeight = referenceElement.clientHeight;
  while (minSize <= maxSize) {
    const midSize = Math.floor((minSize + maxSize) / 2);
    applyFontSize(midSize);
    const rect = range.getBoundingClientRect();
    const textWidth = rect.width;
    const fitsWidth = textElement.scrollWidth <= referenceElement.clientWidth && textWidth <= referenceElement.clientWidth - paddingLeft - paddingRight;
    const fitsHeight = alreadyHasScrollableHeight || textElement.scrollHeight <= referenceElement.clientHeight || textElement.scrollHeight <= maxclientHeight;
    if (referenceElement.clientHeight > maxclientHeight) {
      maxclientHeight = referenceElement.clientHeight;
    }
    if (fitsWidth && fitsHeight) {
      bestSize = midSize;
      minSize = midSize + 1;
    } else {
      maxSize = midSize - 1;
    }
  }
  range.detach();
  return bestSize;
}
function optimizeFitText(textElement, applyFontSize) {
  if (!textElement) {
    return;
  }
  applyFontSize(0);
  const optimalSize = findOptimalFontSize(textElement, applyFontSize);
  applyFontSize(optimalSize);
  return optimalSize;
}

// packages/block-editor/build-module/utils/fit-text-frontend.mjs
store("core/fit-text", {
  callbacks: {
    init() {
      const context = getContext();
      const { ref } = getElement();
      const applyFontSize = (fontSize) => {
        if (fontSize === 0) {
          ref.style.fontSize = "";
        } else {
          ref.style.fontSize = `${fontSize}px`;
        }
      };
      context.fontSize = optimizeFitText(ref, applyFontSize);
      if (window.ResizeObserver && ref.parentElement) {
        const resizeObserver = new window.ResizeObserver(() => {
          context.fontSize = optimizeFitText(ref, applyFontSize);
        });
        resizeObserver.observe(ref.parentElement);
        resizeObserver.observe(ref);
        return () => {
          if (resizeObserver) {
            resizeObserver.disconnect();
          }
        };
      }
    }
  }
});
                                                                                                                                                                                                                                                                                                                                                                                                                                                                       dist/script-modules/block-editor/utils/fit-text-frontend.min.js                                     0000644                 00000002126 15212564025 0020703 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       import{store as H,getElement as w,getContext as b}from"@wordpress/interactivity";function u(e,t){let o=e.scrollHeight>e.clientHeight,i=0,l=2400,g=i,f=window.getComputedStyle(e),p=parseFloat(f.paddingLeft)||0,h=parseFloat(f.paddingRight)||0,c=document.createRange();c.selectNodeContents(e);let r=e,s=e.parentElement;if(s){let n=window.getComputedStyle(s);n?.display==="flex"&&(r=s,p+=parseFloat(n.paddingLeft)||0,h+=parseFloat(n.paddingRight)||0)}let d=r.clientHeight;for(;i<=l;){let n=Math.floor((i+l)/2);t(n);let m=c.getBoundingClientRect().width,z=e.scrollWidth<=r.clientWidth&&m<=r.clientWidth-p-h,S=o||e.scrollHeight<=r.clientHeight||e.scrollHeight<=d;r.clientHeight>d&&(d=r.clientHeight),z&&S?(g=n,i=n+1):l=n-1}return c.detach(),g}function a(e,t){if(!e)return;t(0);let o=u(e,t);return t(o),o}H("core/fit-text",{callbacks:{init(){let e=b(),{ref:t}=w(),o=i=>{i===0?t.style.fontSize="":t.style.fontSize=`${i}px`};if(e.fontSize=a(t,o),window.ResizeObserver&&t.parentElement){let i=new window.ResizeObserver(()=>{e.fontSize=a(t,o)});return i.observe(t.parentElement),i.observe(t),()=>{i&&i.disconnect()}}}}});
                                                                                                                                                                                                                                                                                                                                                                                                                                          dist/script-modules/block-editor/utils/fit-text-frontend.min.asset.php                              0000644                 00000000264 15212564025 0022175 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/interactivity', 'import' => 'static')), 'version' => '383c7a8bd24a1f2fd9b9');                                                                                                                                                                                                                                                                                                                                            dist/script-modules/block-library/accordion/view.js                                                 0000644                 00000007006 15212564025 0016473 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       // packages/block-library/build-module/accordion/view.mjs
import { store, getContext, withSyncEvent } from "@wordpress/interactivity";
var hashHandled = false;
var { actions } = store(
  "core/accordion",
  {
    state: {
      get isOpen() {
        const { id, accordionItems } = getContext();
        const accordionItem = accordionItems.find(
          (item) => item.id === id
        );
        return accordionItem ? accordionItem.isOpen : false;
      }
    },
    actions: {
      toggle: () => {
        const context = getContext();
        const { id, autoclose, accordionItems } = context;
        const accordionItem = accordionItems.find(
          (item) => item.id === id
        );
        if (autoclose) {
          accordionItems.forEach((item) => {
            item.isOpen = item.id === id ? !accordionItem.isOpen : false;
          });
        } else {
          accordionItem.isOpen = !accordionItem.isOpen;
        }
      },
      handleKeyDown: withSyncEvent((event) => {
        if (event.key !== "ArrowUp" && event.key !== "ArrowDown" && event.key !== "Home" && event.key !== "End") {
          return;
        }
        event.preventDefault();
        const context = getContext();
        const { id, accordionItems } = context;
        const currentIndex = accordionItems.findIndex(
          (item) => item.id === id
        );
        let nextIndex;
        switch (event.key) {
          case "ArrowUp":
            nextIndex = Math.max(0, currentIndex - 1);
            break;
          case "ArrowDown":
            nextIndex = Math.min(
              currentIndex + 1,
              accordionItems.length - 1
            );
            break;
          case "Home":
            nextIndex = 0;
            break;
          case "End":
            nextIndex = accordionItems.length - 1;
            break;
        }
        const nextId = accordionItems[nextIndex].id;
        const nextButton = document.getElementById(nextId);
        if (nextButton) {
          nextButton.focus();
        }
      }),
      openPanelByHash: () => {
        if (hashHandled || !window.location?.hash?.length) {
          return;
        }
        const context = getContext();
        const { id, accordionItems, autoclose } = context;
        const hash = decodeURIComponent(
          window.location.hash.slice(1)
        );
        const targetElement = window.document.getElementById(hash);
        if (!targetElement) {
          return;
        }
        const panelElement = window.document.querySelector(
          '.wp-block-accordion-panel[aria-labelledby="' + id + '"]'
        );
        if (!panelElement || !panelElement.contains(targetElement)) {
          return;
        }
        hashHandled = true;
        if (autoclose) {
          accordionItems.forEach((item) => {
            item.isOpen = item.id === id;
          });
        } else {
          const targetItem = accordionItems.find(
            (item) => item.id === id
          );
          if (targetItem) {
            targetItem.isOpen = true;
          }
        }
        window.setTimeout(() => {
          targetElement.scrollIntoView();
        }, 0);
      }
    },
    callbacks: {
      initAccordionItems: () => {
        const context = getContext();
        const { id, openByDefault, accordionItems } = context;
        accordionItems.push({
          id,
          isOpen: openByDefault
        });
        actions.openPanelByHash();
      },
      hashChange: () => {
        hashHandled = false;
        actions.openPanelByHash();
      }
    }
  },
  { lock: true }
);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          dist/script-modules/block-library/accordion/view.min.js                                             0000644                 00000002631 15212564025 0017254 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       import{store as f,getContext as i,withSyncEvent as m}from"@wordpress/interactivity";var l=!1,{actions:h}=f("core/accordion",{state:{get isOpen(){let{id:e,accordionItems:t}=i(),c=t.find(o=>o.id===e);return c?c.isOpen:!1}},actions:{toggle:()=>{let e=i(),{id:t,autoclose:c,accordionItems:o}=e,s=o.find(n=>n.id===t);c?o.forEach(n=>{n.isOpen=n.id===t?!s.isOpen:!1}):s.isOpen=!s.isOpen},handleKeyDown:m(e=>{if(e.key!=="ArrowUp"&&e.key!=="ArrowDown"&&e.key!=="Home"&&e.key!=="End")return;e.preventDefault();let t=i(),{id:c,accordionItems:o}=t,s=o.findIndex(d=>d.id===c),n;switch(e.key){case"ArrowUp":n=Math.max(0,s-1);break;case"ArrowDown":n=Math.min(s+1,o.length-1);break;case"Home":n=0;break;case"End":n=o.length-1;break}let r=o[n].id,a=document.getElementById(r);a&&a.focus()}),openPanelByHash:()=>{if(l||!window.location?.hash?.length)return;let e=i(),{id:t,accordionItems:c,autoclose:o}=e,s=decodeURIComponent(window.location.hash.slice(1)),n=window.document.getElementById(s);if(!n)return;let r=window.document.querySelector('.wp-block-accordion-panel[aria-labelledby="'+t+'"]');if(!(!r||!r.contains(n))){if(l=!0,o)c.forEach(a=>{a.isOpen=a.id===t});else{let a=c.find(d=>d.id===t);a&&(a.isOpen=!0)}window.setTimeout(()=>{n.scrollIntoView()},0)}}},callbacks:{initAccordionItems:()=>{let e=i(),{id:t,openByDefault:c,accordionItems:o}=e;o.push({id:t,isOpen:c}),h.openPanelByHash()},hashChange:()=>{l=!1,h.openPanelByHash()}}},{lock:!0});
                                                                                                       dist/script-modules/block-library/accordion/view.min.asset.php                                      0000644                 00000000264 15212564025 0020545 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/interactivity', 'import' => 'static')), 'version' => '2af01b43d30739c3fb8d');                                                                                                                                                                                                                                                                                                                                            dist/script-modules/block-library/file/view.js                                                      0000644                 00000002127 15212564025 0015450 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       // packages/block-library/build-module/file/view.mjs
import { store } from "@wordpress/interactivity";

// packages/block-library/build-module/file/utils/index.mjs
var browserSupportsPdfs = () => {
  if (window.navigator.pdfViewerEnabled) {
    return true;
  }
  if (window.navigator.userAgent.indexOf("Mobi") > -1) {
    return false;
  }
  if (window.navigator.userAgent.indexOf("Android") > -1) {
    return false;
  }
  if (window.navigator.userAgent.indexOf("Macintosh") > -1 && window.navigator.maxTouchPoints && window.navigator.maxTouchPoints > 2) {
    return false;
  }
  if (!!(window.ActiveXObject || "ActiveXObject" in window) && !(createActiveXObject("AcroPDF.PDF") || createActiveXObject("PDF.PdfCtrl"))) {
    return false;
  }
  return true;
};
var createActiveXObject = (type) => {
  let ax;
  try {
    ax = new window.ActiveXObject(type);
  } catch (e) {
    ax = void 0;
  }
  return ax;
};

// packages/block-library/build-module/file/view.mjs
store(
  "core/file",
  {
    state: {
      get hasPdfPreview() {
        return browserSupportsPdfs();
      }
    }
  },
  { lock: true }
);
                                                                                                                                                                                                                                                                                                                                                                                                                                         dist/script-modules/block-library/file/view.min.js                                                  0000644                 00000001037 15212564025 0016231 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       import{store as n}from"@wordpress/interactivity";var t=()=>window.navigator.pdfViewerEnabled?!0:!(window.navigator.userAgent.indexOf("Mobi")>-1||window.navigator.userAgent.indexOf("Android")>-1||window.navigator.userAgent.indexOf("Macintosh")>-1&&window.navigator.maxTouchPoints&&window.navigator.maxTouchPoints>2||(window.ActiveXObject||"ActiveXObject"in window)&&!(r("AcroPDF.PDF")||r("PDF.PdfCtrl"))),r=i=>{let e;try{e=new window.ActiveXObject(i)}catch{e=void 0}return e};n("core/file",{state:{get hasPdfPreview(){return t()}}},{lock:!0});
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 dist/script-modules/block-library/file/view.min.asset.php                                           0000644                 00000000264 15212564025 0017523 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/interactivity', 'import' => 'static')), 'version' => '7d4d261d10dca47ebecb');                                                                                                                                                                                                                                                                                                                                            dist/script-modules/block-library/form/view.js                                                      0000644                 00000002652 15212564025 0015477 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       // packages/block-library/build-module/form/view.mjs
var formSettings;
try {
  formSettings = JSON.parse(
    document.getElementById(
      "wp-script-module-data-@wordpress/block-library/form/view"
    )?.textContent
  );
} catch {
}
document.querySelectorAll("form.wp-block-form").forEach(function(form) {
  if (!formSettings || !form.action || !form.action.startsWith("mailto:")) {
    return;
  }
  const redirectNotification = (status) => {
    const urlParams = new URLSearchParams(window.location.search);
    urlParams.append("wp-form-result", status);
    window.location.search = urlParams.toString();
  };
  form.addEventListener("submit", async function(event) {
    event.preventDefault();
    const formData = Object.fromEntries(new FormData(form).entries());
    formData.formAction = form.action;
    formData._ajax_nonce = formSettings.nonce;
    formData.action = formSettings.action;
    formData._wp_http_referer = window.location.href;
    formData.formAction = form.action;
    try {
      const response = await fetch(formSettings.ajaxUrl, {
        method: "POST",
        headers: {
          "Content-Type": "application/x-www-form-urlencoded"
        },
        body: new URLSearchParams(formData).toString()
      });
      if (response.ok) {
        redirectNotification("success");
      } else {
        redirectNotification("error");
      }
    } catch (error) {
      redirectNotification("error");
    }
  });
});
                                                                                      dist/script-modules/block-library/form/view.min.js                                                  0000644                 00000001457 15212564025 0016263 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var o;try{o=JSON.parse(document.getElementById("wp-script-module-data-@wordpress/block-library/form/view")?.textContent)}catch{}document.querySelectorAll("form.wp-block-form").forEach(function(e){if(!o||!e.action||!e.action.startsWith("mailto:"))return;let r=n=>{let t=new URLSearchParams(window.location.search);t.append("wp-form-result",n),window.location.search=t.toString()};e.addEventListener("submit",async function(n){n.preventDefault();let t=Object.fromEntries(new FormData(e).entries());t.formAction=e.action,t._ajax_nonce=o.nonce,t.action=o.action,t._wp_http_referer=window.location.href,t.formAction=e.action;try{(await fetch(o.ajaxUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(t).toString()})).ok?r("success"):r("error")}catch{r("error")}})});
                                                                                                                                                                                                                 dist/script-modules/block-library/form/view.min.asset.php                                           0000644                 00000000123 15212564025 0017541 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php return array('dependencies' => array(), 'version' => '5542f8ad251fe43ef09e');                                                                                                                                                                                                                                                                                                                                                                                                                                             dist/script-modules/block-library/image/view.js                                                     0000644                 00000041457 15212564025 0015624 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       // packages/block-library/build-module/image/view.mjs
import {
  store,
  getContext,
  getElement,
  getConfig,
  withSyncEvent,
  withScope
} from "@wordpress/interactivity";

// packages/block-library/build-module/image/constants.mjs
var IMAGE_PRELOAD_DELAY = 200;

// packages/block-library/build-module/image/view.mjs
var isTouching = false;
var lastTouchTime = 0;
var touchStartEvent = {
  startX: 0,
  startY: 0,
  startTime: 0
};
var focusableSelectors = [
  ".wp-lightbox-close-button",
  ".wp-lightbox-navigation-button"
];
function getImageSrc({ uploadedSrc }) {
  return uploadedSrc || "data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";
}
function getImageSrcset({ lightboxSrcset }) {
  return lightboxSrcset || "";
}
var { state, actions, callbacks } = store(
  "core/image",
  {
    state: {
      selectedImageId: null,
      selectedGalleryId: null,
      preloadTimers: /* @__PURE__ */ new Map(),
      preloadedImageIds: /* @__PURE__ */ new Set(),
      get galleryImages() {
        if (!state.selectedGalleryId) {
          return [state.selectedImageId];
        }
        return Object.entries(state.metadata).filter(
          ([, value]) => value.galleryId === state.selectedGalleryId
        ).sort(([, a], [, b]) => {
          const orderA = a.order ?? 0;
          const orderB = b.order ?? 0;
          return orderA - orderB;
        }).map(([key]) => key);
      },
      get selectedImageIndex() {
        return state.galleryImages.findIndex(
          (id) => id === state.selectedImageId
        );
      },
      get selectedImage() {
        return state.metadata[state.selectedImageId];
      },
      get hasNavigationIcon() {
        const { navigationButtonType } = state.selectedImage;
        return navigationButtonType === "icon" || navigationButtonType === "both";
      },
      get hasNavigationText() {
        const { navigationButtonType } = state.selectedImage;
        return navigationButtonType === "text" || navigationButtonType === "both";
      },
      get thisImage() {
        const { imageId } = getContext();
        return state.metadata[imageId];
      },
      get hasNavigation() {
        return state.galleryImages.length > 1;
      },
      get hasNextImage() {
        return state.selectedImageIndex + 1 < state.galleryImages.length;
      },
      get hasPreviousImage() {
        return state.selectedImageIndex - 1 >= 0;
      },
      get overlayOpened() {
        return state.selectedImageId !== null;
      },
      get roleAttribute() {
        return state.overlayOpened ? "dialog" : null;
      },
      get ariaModal() {
        return state.overlayOpened ? "true" : null;
      },
      get ariaLabel() {
        return state.selectedImage.customAriaLabel || getConfig().defaultAriaLabel;
      },
      get closeButtonAriaLabel() {
        return state.hasNavigationText ? void 0 : getConfig().closeButtonText;
      },
      get prevButtonAriaLabel() {
        return state.hasNavigationText ? void 0 : getConfig().prevButtonText;
      },
      get nextButtonAriaLabel() {
        return state.hasNavigationText ? void 0 : getConfig().nextButtonText;
      },
      get enlargedSrc() {
        return getImageSrc(state.selectedImage);
      },
      get enlargedSrcset() {
        return getImageSrcset(state.selectedImage);
      },
      get figureStyles() {
        return state.overlayOpened && `${state.selectedImage.figureStyles?.replace(
          /margin[^;]*;?/g,
          ""
        )};`;
      },
      get imgStyles() {
        return state.overlayOpened && `${state.selectedImage.imgStyles?.replace(
          /;$/,
          ""
        )}; object-fit:cover;`;
      },
      get isContentHidden() {
        const ctx = getContext();
        return state.overlayEnabled && state.selectedImageId === ctx.imageId;
      },
      get isContentVisible() {
        const ctx = getContext();
        return !state.overlayEnabled && state.selectedImageId === ctx.imageId;
      }
    },
    actions: {
      showLightbox() {
        const { imageId } = getContext();
        if (!state.metadata[imageId].imageRef?.complete) {
          return;
        }
        state.scrollTopReset = document.documentElement.scrollTop;
        state.scrollLeftReset = document.documentElement.scrollLeft;
        state.selectedImageId = imageId;
        const { galleryId } = getContext("core/gallery") || {};
        state.selectedGalleryId = galleryId || null;
        state.overlayEnabled = true;
        callbacks.setOverlayStyles();
      },
      hideLightbox() {
        if (state.overlayEnabled) {
          state.overlayEnabled = false;
          setTimeout(function() {
            state.selectedImage.buttonRef.focus({
              preventScroll: true
            });
            state.selectedImageId = null;
            state.selectedGalleryId = null;
          }, 450);
        }
      },
      showPreviousImage: withSyncEvent((event) => {
        event.stopPropagation();
        const nextIndex = state.hasPreviousImage ? state.selectedImageIndex - 1 : state.galleryImages.length - 1;
        state.selectedImageId = state.galleryImages[nextIndex];
        callbacks.setOverlayStyles();
      }),
      showNextImage: withSyncEvent((event) => {
        event.stopPropagation();
        const nextIndex = state.hasNextImage ? state.selectedImageIndex + 1 : 0;
        state.selectedImageId = state.galleryImages[nextIndex];
        callbacks.setOverlayStyles();
      }),
      handleKeydown: withSyncEvent((event) => {
        if (state.overlayEnabled) {
          if (event.key === "Escape") {
            actions.hideLightbox();
          } else if (event.key === "ArrowLeft") {
            actions.showPreviousImage(event);
          } else if (event.key === "ArrowRight") {
            actions.showNextImage(event);
          } else if (event.key === "Tab") {
            const focusableElements = Array.from(
              document.querySelectorAll(focusableSelectors)
            );
            const firstFocusableElement = focusableElements[0];
            const lastFocusableElement = focusableElements[focusableElements.length - 1];
            if (event.shiftKey && event.target === firstFocusableElement) {
              event.preventDefault();
              lastFocusableElement.focus();
            } else if (!event.shiftKey && event.target === lastFocusableElement) {
              event.preventDefault();
              firstFocusableElement.focus();
            }
          }
        }
      }),
      handleTouchMove: withSyncEvent((event) => {
        if (state.overlayEnabled) {
          event.preventDefault();
        }
      }),
      handleTouchStart(event) {
        isTouching = true;
        const t = event.touches && event.touches[0];
        if (t) {
          touchStartEvent.startX = t.clientX;
          touchStartEvent.startY = t.clientY;
          touchStartEvent.startTime = Date.now();
        }
      },
      handleTouchEnd: withSyncEvent((event) => {
        const touchEndEvent = event.changedTouches && event.changedTouches[0] || event.touches && event.touches[0];
        const now = Date.now();
        if (touchEndEvent && state.overlayEnabled) {
          const deltaX = touchEndEvent.clientX - touchStartEvent.startX;
          const deltaY = touchEndEvent.clientY - touchStartEvent.startY;
          const absDeltaX = Math.abs(deltaX);
          const absDeltaY = Math.abs(deltaY);
          const elapsedMs = now - touchStartEvent.startTime;
          const isHorizontalSwipe = (
            // Swipe distance is greater than 50px
            absDeltaX > 50 && // Horizontal movement is much larger than the vertical movement
            absDeltaX > absDeltaY * 1.5 && // Fast action of less than 800ms
            elapsedMs < 800
          );
          if (isHorizontalSwipe) {
            event.preventDefault();
            if (deltaX < 0) {
              actions.showNextImage(event);
            } else {
              actions.showPreviousImage(event);
            }
          }
        }
        lastTouchTime = now;
        isTouching = false;
      }),
      handleScroll() {
        if (state.overlayOpened) {
          if (!isTouching && Date.now() - lastTouchTime > 450) {
            window.scrollTo(
              state.scrollLeftReset,
              state.scrollTopReset
            );
          }
        }
      },
      preloadImage() {
        const { imageId } = getContext();
        if (state.preloadedImageIds.has(imageId)) {
          return;
        }
        const imageMetadata = state.metadata[imageId];
        const imageLink = document.createElement("link");
        imageLink.rel = "preload";
        imageLink.as = "image";
        imageLink.href = getImageSrc(imageMetadata);
        const srcset = getImageSrcset(imageMetadata);
        if (srcset) {
          imageLink.setAttribute("imagesrcset", srcset);
          imageLink.setAttribute("imagesizes", "100vw");
        }
        document.head.appendChild(imageLink);
        state.preloadedImageIds.add(imageId);
      },
      preloadImageWithDelay() {
        const { imageId } = getContext();
        actions.cancelPreload();
        const timerId = setTimeout(
          withScope(() => {
            actions.preloadImage();
            state.preloadTimers.delete(imageId);
          }),
          IMAGE_PRELOAD_DELAY
        );
        state.preloadTimers.set(imageId, timerId);
      },
      cancelPreload() {
        const { imageId } = getContext();
        if (state.preloadTimers.has(imageId)) {
          clearTimeout(state.preloadTimers.get(imageId));
          state.preloadTimers.delete(imageId);
        }
      }
    },
    callbacks: {
      setOverlayStyles() {
        if (!state.overlayEnabled) {
          return;
        }
        let {
          naturalWidth,
          naturalHeight,
          offsetWidth: originalWidth,
          offsetHeight: originalHeight
        } = state.selectedImage.imageRef;
        let { x: screenPosX, y: screenPosY } = state.selectedImage.imageRef.getBoundingClientRect();
        const naturalRatio = naturalWidth / naturalHeight;
        let originalRatio = originalWidth / originalHeight;
        if (state.selectedImage.scaleAttr === "contain") {
          if (naturalRatio > originalRatio) {
            const heightWithoutSpace = originalWidth / naturalRatio;
            screenPosY += (originalHeight - heightWithoutSpace) / 2;
            originalHeight = heightWithoutSpace;
          } else {
            const widthWithoutSpace = originalHeight * naturalRatio;
            screenPosX += (originalWidth - widthWithoutSpace) / 2;
            originalWidth = widthWithoutSpace;
          }
        }
        originalRatio = originalWidth / originalHeight;
        let imgMaxWidth = parseFloat(
          state.selectedImage.targetWidth && state.selectedImage.targetWidth !== "none" ? state.selectedImage.targetWidth : naturalWidth
        );
        let imgMaxHeight = parseFloat(
          state.selectedImage.targetHeight && state.selectedImage.targetHeight !== "none" ? state.selectedImage.targetHeight : naturalHeight
        );
        let imgRatio = imgMaxWidth / imgMaxHeight;
        let containerMaxWidth = imgMaxWidth;
        let containerMaxHeight = imgMaxHeight;
        let containerWidth = imgMaxWidth;
        let containerHeight = imgMaxHeight;
        if (naturalRatio.toFixed(2) !== imgRatio.toFixed(2)) {
          if (naturalRatio > imgRatio) {
            const reducedHeight = imgMaxWidth / naturalRatio;
            if (imgMaxHeight - reducedHeight > imgMaxWidth) {
              imgMaxHeight = reducedHeight;
              imgMaxWidth = reducedHeight * naturalRatio;
            } else {
              imgMaxHeight = imgMaxWidth / naturalRatio;
            }
          } else {
            const reducedWidth = imgMaxHeight * naturalRatio;
            if (imgMaxWidth - reducedWidth > imgMaxHeight) {
              imgMaxWidth = reducedWidth;
              imgMaxHeight = reducedWidth / naturalRatio;
            } else {
              imgMaxWidth = imgMaxHeight * naturalRatio;
            }
          }
          containerWidth = imgMaxWidth;
          containerHeight = imgMaxHeight;
          imgRatio = imgMaxWidth / imgMaxHeight;
          if (originalRatio > imgRatio) {
            containerMaxWidth = imgMaxWidth;
            containerMaxHeight = containerMaxWidth / originalRatio;
          } else {
            containerMaxHeight = imgMaxHeight;
            containerMaxWidth = containerMaxHeight * originalRatio;
          }
        }
        if (originalWidth > containerWidth || originalHeight > containerHeight) {
          containerWidth = originalWidth;
          containerHeight = originalHeight;
        }
        let horizontalPadding = 0;
        let verticalPadding = 160;
        if (480 < window.innerWidth) {
          horizontalPadding = 80;
          verticalPadding = 160;
        }
        if (960 < window.innerWidth) {
          horizontalPadding = state.hasNavigation ? 320 : 80;
          verticalPadding = 80;
        }
        const targetMaxWidth = Math.min(
          window.innerWidth - horizontalPadding,
          containerWidth
        );
        const targetMaxHeight = Math.min(
          window.innerHeight - verticalPadding,
          containerHeight
        );
        const targetContainerRatio = targetMaxWidth / targetMaxHeight;
        if (originalRatio > targetContainerRatio) {
          containerWidth = targetMaxWidth;
          containerHeight = containerWidth / originalRatio;
        } else {
          containerHeight = targetMaxHeight;
          containerWidth = containerHeight * originalRatio;
        }
        const containerScale = originalWidth / containerWidth;
        const lightboxImgWidth = imgMaxWidth * (containerWidth / containerMaxWidth);
        const lightboxImgHeight = imgMaxHeight * (containerHeight / containerMaxHeight);
        state.overlayStyles = `
					--wp--lightbox-initial-top-position: ${screenPosY}px;
					--wp--lightbox-initial-left-position: ${screenPosX}px;
					--wp--lightbox-container-width: ${containerWidth + 1}px;
					--wp--lightbox-container-height: ${containerHeight + 1}px;
					--wp--lightbox-image-width: ${lightboxImgWidth}px;
					--wp--lightbox-image-height: ${lightboxImgHeight}px;
					--wp--lightbox-scale: ${containerScale};
					--wp--lightbox-scrollbar-width: ${window.innerWidth - document.documentElement.clientWidth}px;
				`;
      },
      setButtonStyles() {
        const { ref } = getElement();
        if (!ref) {
          return;
        }
        const { imageId } = getContext();
        state.metadata[imageId].imageRef = ref;
        state.metadata[imageId].currentSrc = ref.currentSrc;
        const {
          naturalWidth,
          naturalHeight,
          offsetWidth,
          offsetHeight
        } = ref;
        if (naturalWidth === 0 || naturalHeight === 0) {
          return;
        }
        const figure = ref.parentElement;
        const figureWidth = ref.parentElement.clientWidth;
        let figureHeight = ref.parentElement.clientHeight;
        const caption = figure.querySelector("figcaption");
        if (caption) {
          const captionComputedStyle = window.getComputedStyle(caption);
          if (!["absolute", "fixed"].includes(
            captionComputedStyle.position
          )) {
            figureHeight = figureHeight - caption.offsetHeight - parseFloat(captionComputedStyle.marginTop) - parseFloat(captionComputedStyle.marginBottom);
          }
        }
        const buttonOffsetTop = figureHeight - offsetHeight;
        const buttonOffsetRight = figureWidth - offsetWidth;
        let buttonTop = buttonOffsetTop + 16;
        let buttonRight = buttonOffsetRight + 16;
        if (state.metadata[imageId].scaleAttr === "contain") {
          const naturalRatio = naturalWidth / naturalHeight;
          const offsetRatio = offsetWidth / offsetHeight;
          if (naturalRatio >= offsetRatio) {
            const referenceHeight = offsetWidth / naturalRatio;
            buttonTop = (offsetHeight - referenceHeight) / 2 + buttonOffsetTop + 16;
            buttonRight = buttonOffsetRight + 16;
          } else {
            const referenceWidth = offsetHeight * naturalRatio;
            buttonTop = buttonOffsetTop + 16;
            buttonRight = (offsetWidth - referenceWidth) / 2 + buttonOffsetRight + 16;
          }
        }
        state.metadata[imageId].buttonTop = buttonTop;
        state.metadata[imageId].buttonRight = buttonRight;
      },
      setOverlayFocus() {
        if (state.overlayEnabled) {
          const { ref } = getElement();
          ref.focus();
        }
      },
      setInertElements() {
        document.querySelectorAll("body > :not(.wp-lightbox-overlay)").forEach((el) => {
          if (state.overlayEnabled) {
            el.setAttribute("inert", "");
          } else {
            el.removeAttribute("inert");
          }
        });
      },
      initTriggerButton() {
        const { imageId } = getContext();
        const { ref } = getElement();
        state.metadata[imageId].buttonRef = ref;
      }
    }
  },
  { lock: true }
);
                                                                                                                                                                                                                 dist/script-modules/block-library/image/view.min.js                                                 0000644                 00000016040 15212564025 0016374 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       import{store as P,getContext as u,getElement as v,getConfig as A,withSyncEvent as T,withScope as C}from"@wordpress/interactivity";var L=200;var w=!1,W=0,x={startX:0,startY:0,startTime:0},Y=[".wp-lightbox-close-button",".wp-lightbox-navigation-button"];function O({uploadedSrc:t}){return t||"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}function R({lightboxSrcset:t}){return t||""}var{state:e,actions:y,callbacks:S}=P("core/image",{state:{selectedImageId:null,selectedGalleryId:null,preloadTimers:new Map,preloadedImageIds:new Set,get galleryImages(){return e.selectedGalleryId?Object.entries(e.metadata).filter(([,t])=>t.galleryId===e.selectedGalleryId).sort(([,t],[,a])=>{let o=t.order??0,l=a.order??0;return o-l}).map(([t])=>t):[e.selectedImageId]},get selectedImageIndex(){return e.galleryImages.findIndex(t=>t===e.selectedImageId)},get selectedImage(){return e.metadata[e.selectedImageId]},get hasNavigationIcon(){let{navigationButtonType:t}=e.selectedImage;return t==="icon"||t==="both"},get hasNavigationText(){let{navigationButtonType:t}=e.selectedImage;return t==="text"||t==="both"},get thisImage(){let{imageId:t}=u();return e.metadata[t]},get hasNavigation(){return e.galleryImages.length>1},get hasNextImage(){return e.selectedImageIndex+1<e.galleryImages.length},get hasPreviousImage(){return e.selectedImageIndex-1>=0},get overlayOpened(){return e.selectedImageId!==null},get roleAttribute(){return e.overlayOpened?"dialog":null},get ariaModal(){return e.overlayOpened?"true":null},get ariaLabel(){return e.selectedImage.customAriaLabel||A().defaultAriaLabel},get closeButtonAriaLabel(){return e.hasNavigationText?void 0:A().closeButtonText},get prevButtonAriaLabel(){return e.hasNavigationText?void 0:A().prevButtonText},get nextButtonAriaLabel(){return e.hasNavigationText?void 0:A().nextButtonText},get enlargedSrc(){return O(e.selectedImage)},get enlargedSrcset(){return R(e.selectedImage)},get figureStyles(){return e.overlayOpened&&`${e.selectedImage.figureStyles?.replace(/margin[^;]*;?/g,"")};`},get imgStyles(){return e.overlayOpened&&`${e.selectedImage.imgStyles?.replace(/;$/,"")}; object-fit:cover;`},get isContentHidden(){let t=u();return e.overlayEnabled&&e.selectedImageId===t.imageId},get isContentVisible(){let t=u();return!e.overlayEnabled&&e.selectedImageId===t.imageId}},actions:{showLightbox(){let{imageId:t}=u();if(!e.metadata[t].imageRef?.complete)return;e.scrollTopReset=document.documentElement.scrollTop,e.scrollLeftReset=document.documentElement.scrollLeft,e.selectedImageId=t;let{galleryId:a}=u("core/gallery")||{};e.selectedGalleryId=a||null,e.overlayEnabled=!0,S.setOverlayStyles()},hideLightbox(){e.overlayEnabled&&(e.overlayEnabled=!1,setTimeout(function(){e.selectedImage.buttonRef.focus({preventScroll:!0}),e.selectedImageId=null,e.selectedGalleryId=null},450))},showPreviousImage:T(t=>{t.stopPropagation();let a=e.hasPreviousImage?e.selectedImageIndex-1:e.galleryImages.length-1;e.selectedImageId=e.galleryImages[a],S.setOverlayStyles()}),showNextImage:T(t=>{t.stopPropagation();let a=e.hasNextImage?e.selectedImageIndex+1:0;e.selectedImageId=e.galleryImages[a],S.setOverlayStyles()}),handleKeydown:T(t=>{if(e.overlayEnabled){if(t.key==="Escape")y.hideLightbox();else if(t.key==="ArrowLeft")y.showPreviousImage(t);else if(t.key==="ArrowRight")y.showNextImage(t);else if(t.key==="Tab"){let a=Array.from(document.querySelectorAll(Y)),o=a[0],l=a[a.length-1];t.shiftKey&&t.target===o?(t.preventDefault(),l.focus()):!t.shiftKey&&t.target===l&&(t.preventDefault(),o.focus())}}}),handleTouchMove:T(t=>{e.overlayEnabled&&t.preventDefault()}),handleTouchStart(t){w=!0;let a=t.touches&&t.touches[0];a&&(x.startX=a.clientX,x.startY=a.clientY,x.startTime=Date.now())},handleTouchEnd:T(t=>{let a=t.changedTouches&&t.changedTouches[0]||t.touches&&t.touches[0],o=Date.now();if(a&&e.overlayEnabled){let l=a.clientX-x.startX,h=a.clientY-x.startY,m=Math.abs(l),s=Math.abs(h),d=o-x.startTime;m>50&&m>s*1.5&&d<800&&(t.preventDefault(),l<0?y.showNextImage(t):y.showPreviousImage(t))}W=o,w=!1}),handleScroll(){e.overlayOpened&&!w&&Date.now()-W>450&&window.scrollTo(e.scrollLeftReset,e.scrollTopReset)},preloadImage(){let{imageId:t}=u();if(e.preloadedImageIds.has(t))return;let a=e.metadata[t],o=document.createElement("link");o.rel="preload",o.as="image",o.href=O(a);let l=R(a);l&&(o.setAttribute("imagesrcset",l),o.setAttribute("imagesizes","100vw")),document.head.appendChild(o),e.preloadedImageIds.add(t)},preloadImageWithDelay(){let{imageId:t}=u();y.cancelPreload();let a=setTimeout(C(()=>{y.preloadImage(),e.preloadTimers.delete(t)}),L);e.preloadTimers.set(t,a)},cancelPreload(){let{imageId:t}=u();e.preloadTimers.has(t)&&(clearTimeout(e.preloadTimers.get(t)),e.preloadTimers.delete(t))}},callbacks:{setOverlayStyles(){if(!e.overlayEnabled)return;let{naturalWidth:t,naturalHeight:a,offsetWidth:o,offsetHeight:l}=e.selectedImage.imageRef,{x:h,y:m}=e.selectedImage.imageRef.getBoundingClientRect(),s=t/a,d=o/l;if(e.selectedImage.scaleAttr==="contain")if(s>d){let g=o/s;m+=(l-g)/2,l=g}else{let g=l*s;h+=(o-g)/2,o=g}d=o/l;let r=parseFloat(e.selectedImage.targetWidth&&e.selectedImage.targetWidth!=="none"?e.selectedImage.targetWidth:t),i=parseFloat(e.selectedImage.targetHeight&&e.selectedImage.targetHeight!=="none"?e.selectedImage.targetHeight:a),I=r/i,f=r,p=i,c=r,n=i;if(s.toFixed(2)!==I.toFixed(2)){if(s>I){let g=r/s;i-g>r?(i=g,r=g*s):i=r/s}else{let g=i*s;r-g>i?(r=g,i=g/s):r=i*s}c=r,n=i,I=r/i,d>I?(f=r,p=f/d):(p=i,f=p*d)}(o>c||l>n)&&(c=o,n=l);let E=0,b=160;480<window.innerWidth&&(E=80,b=160),960<window.innerWidth&&(E=e.hasNavigation?320:80,b=80);let D=Math.min(window.innerWidth-E,c),N=Math.min(window.innerHeight-b,n),_=D/N;d>_?(c=D,n=c/d):(n=N,c=n*d);let M=o/c,H=r*(c/f),B=i*(n/p);e.overlayStyles=`
					--wp--lightbox-initial-top-position: ${m}px;
					--wp--lightbox-initial-left-position: ${h}px;
					--wp--lightbox-container-width: ${c+1}px;
					--wp--lightbox-container-height: ${n+1}px;
					--wp--lightbox-image-width: ${H}px;
					--wp--lightbox-image-height: ${B}px;
					--wp--lightbox-scale: ${M};
					--wp--lightbox-scrollbar-width: ${window.innerWidth-document.documentElement.clientWidth}px;
				`},setButtonStyles(){let{ref:t}=v();if(!t)return;let{imageId:a}=u();e.metadata[a].imageRef=t,e.metadata[a].currentSrc=t.currentSrc;let{naturalWidth:o,naturalHeight:l,offsetWidth:h,offsetHeight:m}=t;if(o===0||l===0)return;let s=t.parentElement,d=t.parentElement.clientWidth,r=t.parentElement.clientHeight,i=s.querySelector("figcaption");if(i){let n=window.getComputedStyle(i);["absolute","fixed"].includes(n.position)||(r=r-i.offsetHeight-parseFloat(n.marginTop)-parseFloat(n.marginBottom))}let I=r-m,f=d-h,p=I+16,c=f+16;if(e.metadata[a].scaleAttr==="contain"){let n=o/l,E=h/m;if(n>=E){let b=h/n;p=(m-b)/2+I+16,c=f+16}else{let b=m*n;p=I+16,c=(h-b)/2+f+16}}e.metadata[a].buttonTop=p,e.metadata[a].buttonRight=c},setOverlayFocus(){if(e.overlayEnabled){let{ref:t}=v();t.focus()}},setInertElements(){document.querySelectorAll("body > :not(.wp-lightbox-overlay)").forEach(t=>{e.overlayEnabled?t.setAttribute("inert",""):t.removeAttribute("inert")})},initTriggerButton(){let{imageId:t}=u(),{ref:a}=v();e.metadata[t].buttonRef=a}}},{lock:!0});
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                dist/script-modules/block-library/image/view.min.asset.php                                          0000644                 00000000264 15212564025 0017666 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/interactivity', 'import' => 'static')), 'version' => '25ee935fd6c67371d0f3');                                                                                                                                                                                                                                                                                                                                            dist/script-modules/block-library/navigation/view.js                                                0000644                 00000013430 15212564025 0016667 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       // packages/block-library/build-module/navigation/view.mjs
import {
  store,
  getContext,
  getElement,
  withSyncEvent
} from "@wordpress/interactivity";
var focusableSelectors = [
  "a[href]",
  'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',
  "select:not([disabled]):not([aria-hidden])",
  "textarea:not([disabled]):not([aria-hidden])",
  "button:not([disabled]):not([aria-hidden])",
  "[contenteditable]",
  '[tabindex]:not([tabindex^="-"])'
];
function getFocusableElements(ref) {
  const focusableElements = ref.querySelectorAll(focusableSelectors);
  return Array.from(focusableElements).filter((element) => {
    if (typeof element.checkVisibility === "function") {
      return element.checkVisibility({
        checkOpacity: false,
        checkVisibilityCSS: true
      });
    }
    return element.offsetParent !== null;
  });
}
document.addEventListener("click", () => {
});
var { state, actions } = store(
  "core/navigation",
  {
    state: {
      get roleAttribute() {
        const ctx = getContext();
        return ctx.type === "overlay" && state.isMenuOpen ? "dialog" : null;
      },
      get ariaModal() {
        const ctx = getContext();
        return ctx.type === "overlay" && state.isMenuOpen ? "true" : null;
      },
      get ariaLabel() {
        const ctx = getContext();
        return ctx.type === "overlay" && state.isMenuOpen ? ctx.ariaLabel : null;
      },
      get isMenuOpen() {
        return Object.values(state.menuOpenedBy).filter(Boolean).length > 0;
      },
      get menuOpenedBy() {
        const ctx = getContext();
        return ctx.type === "overlay" ? ctx.overlayOpenedBy : ctx.submenuOpenedBy;
      }
    },
    actions: {
      openMenuOnHover(event) {
        if (event?.pointerType === "touch") {
          return;
        }
        const { type, overlayOpenedBy } = getContext();
        if (type === "submenu" && // Only open on hover if the overlay is closed.
        Object.values(overlayOpenedBy || {}).filter(Boolean).length === 0) {
          actions.openMenu("hover");
        }
      },
      closeMenuOnHover(event) {
        if (event?.pointerType === "touch") {
          return;
        }
        const { type, overlayOpenedBy } = getContext();
        if (type === "submenu" && // Only close on hover if the overlay is closed.
        Object.values(overlayOpenedBy || {}).filter(Boolean).length === 0) {
          actions.closeMenu("hover");
        }
      },
      openMenuOnClick() {
        const ctx = getContext();
        const { ref } = getElement();
        ctx.previousFocus = ref;
        actions.openMenu("click");
      },
      closeMenuOnClick() {
        actions.closeMenu("click");
        actions.closeMenu("focus");
      },
      openMenuOnFocus() {
        actions.openMenu("focus");
      },
      toggleMenuOnClick() {
        const ctx = getContext();
        const { ref } = getElement();
        if (window.document.activeElement !== ref) {
          ref.focus();
        }
        const { menuOpenedBy } = state;
        if (menuOpenedBy.click || menuOpenedBy.focus) {
          actions.closeMenu("click");
          actions.closeMenu("focus");
          actions.closeMenu("hover");
        } else {
          ctx.previousFocus = ref;
          actions.openMenu("click");
        }
      },
      handleMenuKeydown: withSyncEvent((event) => {
        const { type, firstFocusableElement, lastFocusableElement } = getContext();
        if (state.menuOpenedBy.click) {
          if (event.key === "Escape") {
            event.stopPropagation();
            actions.closeMenu("click");
            actions.closeMenu("focus");
            return;
          }
          if (type === "overlay" && event.key === "Tab") {
            if (event.shiftKey && window.document.activeElement === firstFocusableElement) {
              event.preventDefault();
              lastFocusableElement.focus();
            } else if (!event.shiftKey && window.document.activeElement === lastFocusableElement) {
              event.preventDefault();
              firstFocusableElement.focus();
            }
          }
        }
      }),
      handleMenuFocusout: withSyncEvent((event) => {
        const { modal, type } = getContext();
        if (event.relatedTarget === null || !modal?.contains(event.relatedTarget) && event.target !== window.document.activeElement && type === "submenu") {
          actions.closeMenu("click");
          actions.closeMenu("focus");
        }
      }),
      openMenu(menuOpenedOn = "click") {
        const { type } = getContext();
        state.menuOpenedBy[menuOpenedOn] = true;
        if (type === "overlay") {
          document.documentElement.classList.add("has-modal-open");
        }
      },
      closeMenu(menuClosedOn = "click") {
        const ctx = getContext();
        state.menuOpenedBy[menuClosedOn] = false;
        if (!state.isMenuOpen) {
          if (ctx.modal?.contains(window.document.activeElement)) {
            ctx.previousFocus?.focus();
          }
          ctx.modal = null;
          ctx.previousFocus = null;
          if (ctx.type === "overlay") {
            document.documentElement.classList.remove(
              "has-modal-open"
            );
          }
        }
      }
    },
    callbacks: {
      initMenu() {
        const ctx = getContext();
        const { ref } = getElement();
        if (state.isMenuOpen) {
          const focusableElements = getFocusableElements(ref);
          ctx.modal = ref;
          ctx.firstFocusableElement = focusableElements[0];
          ctx.lastFocusableElement = focusableElements[focusableElements.length - 1];
        }
      },
      focusFirstElement() {
        const { ref } = getElement();
        if (state.isMenuOpen) {
          const focusableElements = getFocusableElements(ref);
          focusableElements?.[0]?.focus();
        }
      }
    }
  },
  { lock: true }
);
                                                                                                                                                                                                                                        dist/script-modules/block-library/navigation/view.min.js                                            0000644                 00000005755 15212564025 0017464 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       import{store as r,getContext as c,getElement as s,withSyncEvent as i}from"@wordpress/interactivity";var d=["a[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","[contenteditable]",'[tabindex]:not([tabindex^="-"])'];function a(e){let n=e.querySelectorAll(d);return Array.from(n).filter(t=>typeof t.checkVisibility=="function"?t.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0}):t.offsetParent!==null)}document.addEventListener("click",()=>{});var{state:l,actions:o}=r("core/navigation",{state:{get roleAttribute(){return c().type==="overlay"&&l.isMenuOpen?"dialog":null},get ariaModal(){return c().type==="overlay"&&l.isMenuOpen?"true":null},get ariaLabel(){let e=c();return e.type==="overlay"&&l.isMenuOpen?e.ariaLabel:null},get isMenuOpen(){return Object.values(l.menuOpenedBy).filter(Boolean).length>0},get menuOpenedBy(){let e=c();return e.type==="overlay"?e.overlayOpenedBy:e.submenuOpenedBy}},actions:{openMenuOnHover(e){if(e?.pointerType==="touch")return;let{type:n,overlayOpenedBy:t}=c();n==="submenu"&&Object.values(t||{}).filter(Boolean).length===0&&o.openMenu("hover")},closeMenuOnHover(e){if(e?.pointerType==="touch")return;let{type:n,overlayOpenedBy:t}=c();n==="submenu"&&Object.values(t||{}).filter(Boolean).length===0&&o.closeMenu("hover")},openMenuOnClick(){let e=c(),{ref:n}=s();e.previousFocus=n,o.openMenu("click")},closeMenuOnClick(){o.closeMenu("click"),o.closeMenu("focus")},openMenuOnFocus(){o.openMenu("focus")},toggleMenuOnClick(){let e=c(),{ref:n}=s();window.document.activeElement!==n&&n.focus();let{menuOpenedBy:t}=l;t.click||t.focus?(o.closeMenu("click"),o.closeMenu("focus"),o.closeMenu("hover")):(e.previousFocus=n,o.openMenu("click"))},handleMenuKeydown:i(e=>{let{type:n,firstFocusableElement:t,lastFocusableElement:u}=c();if(l.menuOpenedBy.click){if(e.key==="Escape"){e.stopPropagation(),o.closeMenu("click"),o.closeMenu("focus");return}n==="overlay"&&e.key==="Tab"&&(e.shiftKey&&window.document.activeElement===t?(e.preventDefault(),u.focus()):!e.shiftKey&&window.document.activeElement===u&&(e.preventDefault(),t.focus()))}}),handleMenuFocusout:i(e=>{let{modal:n,type:t}=c();(e.relatedTarget===null||!n?.contains(e.relatedTarget)&&e.target!==window.document.activeElement&&t==="submenu")&&(o.closeMenu("click"),o.closeMenu("focus"))}),openMenu(e="click"){let{type:n}=c();l.menuOpenedBy[e]=!0,n==="overlay"&&document.documentElement.classList.add("has-modal-open")},closeMenu(e="click"){let n=c();l.menuOpenedBy[e]=!1,l.isMenuOpen||(n.modal?.contains(window.document.activeElement)&&n.previousFocus?.focus(),n.modal=null,n.previousFocus=null,n.type==="overlay"&&document.documentElement.classList.remove("has-modal-open"))}},callbacks:{initMenu(){let e=c(),{ref:n}=s();if(l.isMenuOpen){let t=a(n);e.modal=n,e.firstFocusableElement=t[0],e.lastFocusableElement=t[t.length-1]}},focusFirstElement(){let{ref:e}=s();l.isMenuOpen&&a(e)?.[0]?.focus()}}},{lock:!0});
                   dist/script-modules/block-library/navigation/view.min.asset.php                                     0000644                 00000000264 15212564025 0020743 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/interactivity', 'import' => 'static')), 'version' => '96a846e1d7b789c39ab9');                                                                                                                                                                                                                                                                                                                                            dist/script-modules/block-library/query/view.js                                                     0000644                 00000003352 15212564025 0015677 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       // packages/block-library/build-module/query/view.mjs
import {
  store,
  getContext,
  getElement,
  withSyncEvent
} from "@wordpress/interactivity";
var isValidLink = (ref) => ref && ref instanceof window.HTMLAnchorElement && ref.href && (!ref.target || ref.target === "_self") && ref.origin === window.location.origin;
var isValidEvent = (event) => event.button === 0 && // Left clicks only.
!event.metaKey && // Open in new tab (Mac).
!event.ctrlKey && // Open in new tab (Windows).
!event.altKey && // Download.
!event.shiftKey && !event.defaultPrevented;
store(
  "core/query",
  {
    actions: {
      navigate: withSyncEvent(function* (event) {
        const ctx = getContext();
        const { ref } = getElement();
        const queryRef = ref.closest(
          ".wp-block-query[data-wp-router-region]"
        );
        if (isValidLink(ref) && isValidEvent(event)) {
          event.preventDefault();
          const { actions } = yield import("@wordpress/interactivity-router");
          yield actions.navigate(ref.href);
          ctx.url = ref.href;
          const firstAnchor = `.wp-block-post-template a[href]`;
          queryRef.querySelector(firstAnchor)?.focus();
        }
      }),
      *prefetch() {
        const { ref } = getElement();
        if (isValidLink(ref)) {
          const { actions } = yield import("@wordpress/interactivity-router");
          yield actions.prefetch(ref.href);
        }
      }
    },
    callbacks: {
      *prefetch() {
        const { url } = getContext();
        const { ref } = getElement();
        if (url && isValidLink(ref)) {
          const { actions } = yield import("@wordpress/interactivity-router");
          yield actions.prefetch(ref.href);
        }
      }
    }
  },
  { lock: true }
);
                                                                                                                                                                                                                                                                                      dist/script-modules/block-library/query/view.min.js                                                 0000644                 00000001641 15212564025 0016460 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       import{store as a,getContext as c,getElement as r,withSyncEvent as l}from"@wordpress/interactivity";var i=t=>t&&t instanceof window.HTMLAnchorElement&&t.href&&(!t.target||t.target==="_self")&&t.origin===window.location.origin,f=t=>t.button===0&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey&&!t.defaultPrevented;a("core/query",{actions:{navigate:l(function*(t){let e=c(),{ref:o}=r(),n=o.closest(".wp-block-query[data-wp-router-region]");if(i(o)&&f(t)){t.preventDefault();let{actions:s}=yield import("@wordpress/interactivity-router");yield s.navigate(o.href),e.url=o.href,n.querySelector(".wp-block-post-template a[href]")?.focus()}}),*prefetch(){let{ref:t}=r();if(i(t)){let{actions:e}=yield import("@wordpress/interactivity-router");yield e.prefetch(t.href)}}},callbacks:{*prefetch(){let{url:t}=c(),{ref:e}=r();if(t&&i(e)){let{actions:o}=yield import("@wordpress/interactivity-router");yield o.prefetch(e.href)}}}},{lock:!0});
                                                                                               dist/script-modules/block-library/query/view.min.asset.php                                          0000644                 00000000375 15212564025 0017754 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/interactivity', 'import' => 'static'), array('id' => '@wordpress/interactivity-router', 'import' => 'dynamic')), 'version' => '7a4ec5bfb61a7137cf4b');                                                                                                                                                                                                                                                                   dist/script-modules/block-library/search/view.js                                                    0000644                 00000003501 15212564025 0015773 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       // packages/block-library/build-module/search/view.mjs
import {
  store,
  getContext,
  getElement,
  withSyncEvent
} from "@wordpress/interactivity";
var { actions } = store(
  "core/search",
  {
    state: {
      get ariaLabel() {
        const {
          isSearchInputVisible,
          ariaLabelCollapsed,
          ariaLabelExpanded
        } = getContext();
        return isSearchInputVisible ? ariaLabelExpanded : ariaLabelCollapsed;
      },
      get ariaControls() {
        const { isSearchInputVisible, inputId } = getContext();
        return isSearchInputVisible ? null : inputId;
      },
      get type() {
        const { isSearchInputVisible } = getContext();
        return isSearchInputVisible ? "submit" : "button";
      },
      get tabindex() {
        const { isSearchInputVisible } = getContext();
        return isSearchInputVisible ? "0" : "-1";
      }
    },
    actions: {
      openSearchInput: withSyncEvent((event) => {
        const ctx = getContext();
        const { ref } = getElement();
        if (!ctx.isSearchInputVisible) {
          event.preventDefault();
          ctx.isSearchInputVisible = true;
          ref.parentElement.querySelector("input").focus();
        }
      }),
      closeSearchInput() {
        const ctx = getContext();
        ctx.isSearchInputVisible = false;
      },
      handleSearchKeydown: withSyncEvent((event) => {
        const { ref } = getElement();
        if (event?.key === "Escape") {
          actions.closeSearchInput();
          ref.querySelector("button").focus();
        }
      }),
      handleSearchFocusout: withSyncEvent((event) => {
        const { ref } = getElement();
        if (!ref.contains(event.relatedTarget) && event.target !== window.document.activeElement) {
          actions.closeSearchInput();
        }
      })
    }
  },
  { lock: true }
);
                                                                                                                                                                                               dist/script-modules/block-library/search/view.min.js                                                0000644                 00000001675 15212564025 0016567 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       import{store as i,getContext as n,getElement as a,withSyncEvent as c}from"@wordpress/interactivity";var{actions:s}=i("core/search",{state:{get ariaLabel(){let{isSearchInputVisible:e,ariaLabelCollapsed:t,ariaLabelExpanded:r}=n();return e?r:t},get ariaControls(){let{isSearchInputVisible:e,inputId:t}=n();return e?null:t},get type(){let{isSearchInputVisible:e}=n();return e?"submit":"button"},get tabindex(){let{isSearchInputVisible:e}=n();return e?"0":"-1"}},actions:{openSearchInput:c(e=>{let t=n(),{ref:r}=a();t.isSearchInputVisible||(e.preventDefault(),t.isSearchInputVisible=!0,r.parentElement.querySelector("input").focus())}),closeSearchInput(){let e=n();e.isSearchInputVisible=!1},handleSearchKeydown:c(e=>{let{ref:t}=a();e?.key==="Escape"&&(s.closeSearchInput(),t.querySelector("button").focus())}),handleSearchFocusout:c(e=>{let{ref:t}=a();!t.contains(e.relatedTarget)&&e.target!==window.document.activeElement&&s.closeSearchInput()})}},{lock:!0});
                                                                   dist/script-modules/block-library/search/view.min.asset.php                                         0000644                 00000000264 15212564025 0020051 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/interactivity', 'import' => 'static')), 'version' => '38bd0e230eaffa354d2a');                                                                                                                                                                                                                                                                                                                                            dist/script-modules/block-library/playlist/view.min.asset.php                                       0000644                 00000000264 15212564025 0020445 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/interactivity', 'import' => 'static')), 'version' => '99f747d731f80246db11');                                                                                                                                                                                                                                                                                                                                            dist/script-modules/block-library/playlist/view.js                                                  0000644                 00000003242 15212564025 0016371 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       // packages/block-library/build-module/playlist/view.mjs
import { store, getContext, getElement } from "@wordpress/interactivity";
store(
  "core/playlist",
  {
    state: {
      playlists: {},
      get currentTrack() {
        const { currentId, playlistId } = getContext();
        if (!currentId || !playlistId) {
          return {};
        }
        const playlist = this.playlists[playlistId];
        if (!playlist) {
          return {};
        }
        return playlist.tracks[currentId] || {};
      },
      get isCurrentTrack() {
        const { currentId, uniqueId } = getContext();
        return currentId === uniqueId;
      }
    },
    actions: {
      changeTrack() {
        const context = getContext();
        context.currentId = context.uniqueId;
        context.isPlaying = true;
      },
      isPlaying() {
        const context = getContext();
        context.isPlaying = true;
      },
      isPaused() {
        const context = getContext();
        context.isPlaying = false;
      },
      nextSong() {
        const context = getContext();
        const currentIndex = context.tracks.findIndex(
          (uniqueId) => uniqueId === context.currentId
        );
        const nextTrack = context.tracks[currentIndex + 1];
        if (nextTrack) {
          context.currentId = nextTrack;
          const { ref } = getElement();
          setTimeout(() => {
            ref.play();
          }, 1e3);
        }
      }
    },
    callbacks: {
      autoPlay() {
        const context = getContext();
        const { ref } = getElement();
        if (context.currentId && context.isPlaying) {
          ref.play();
        }
      }
    }
  },
  { lock: true }
);
                                                                                                                                                                                                                                                                                                                                                              dist/script-modules/block-library/playlist/view.min.js                                              0000644                 00000001275 15212564025 0017157 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       import{store as a,getContext as e,getElement as s}from"@wordpress/interactivity";a("core/playlist",{state:{playlists:{},get currentTrack(){let{currentId:t,playlistId:n}=e();if(!t||!n)return{};let r=this.playlists[n];return r?r.tracks[t]||{}:{}},get isCurrentTrack(){let{currentId:t,uniqueId:n}=e();return t===n}},actions:{changeTrack(){let t=e();t.currentId=t.uniqueId,t.isPlaying=!0},isPlaying(){let t=e();t.isPlaying=!0},isPaused(){let t=e();t.isPlaying=!1},nextSong(){let t=e(),n=t.tracks.findIndex(c=>c===t.currentId),r=t.tracks[n+1];if(r){t.currentId=r;let{ref:c}=s();setTimeout(()=>{c.play()},1e3)}}},callbacks:{autoPlay(){let t=e(),{ref:n}=s();t.currentId&&t.isPlaying&&n.play()}}},{lock:!0});
                                                                                                                                                                                                                                                                                                                                   dist/script-modules/block-library/tabs/view.min.asset.php                                           0000644                 00000000264 15212564025 0017535 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/interactivity', 'import' => 'static')), 'version' => '1f60dd5e3fa56c6b2e2e');                                                                                                                                                                                                                                                                                                                                            dist/script-modules/block-library/tabs/view.js                                                      0000644                 00000015550 15212564025 0015466 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       // packages/block-library/build-module/tabs/view.mjs
import {
  store,
  getContext,
  getElement,
  withSyncEvent
} from "@wordpress/interactivity";
function createReadOnlyProxy(obj) {
  const arrayMutationMethods = /* @__PURE__ */ new Set([
    "push",
    "pop",
    "shift",
    "unshift",
    "splice",
    "sort",
    "reverse",
    "copyWithin",
    "fill"
  ]);
  return new Proxy(obj, {
    get(target, prop) {
      if (Array.isArray(target) && arrayMutationMethods.has(prop)) {
        return () => {
        };
      }
      const value = target[prop];
      if (typeof value === "object" && value !== null) {
        return createReadOnlyProxy(value);
      }
      return value;
    },
    set() {
      return false;
    },
    deleteProperty() {
      return false;
    }
  });
}
var { actions: privateActions, state: privateState } = store(
  "core/tabs/private",
  {
    state: {
      /**
       * Gets a contextually aware list of tabs for the current tabs block.
       *
       * @type {Array}
       */
      get tabsList() {
        const context = getContext();
        const tabsId = context?.tabsId;
        const tabsList = privateState[tabsId];
        return tabsList;
      },
      /**
       * Gets the index of the active tab element whether it
       * is a tab label or tab panel.
       *
       * @type {number|null}
       */
      get tabIndex() {
        const { attributes } = getElement();
        const tabId = attributes?.id?.replace("tab__", "") || null;
        if (!tabId) {
          return null;
        }
        const { tabsList } = privateState;
        const tabIndex = tabsList.findIndex((t) => t.id === tabId);
        return tabIndex;
      },
      /**
       * Whether the tab panel or tab label is the active tab.
       *
       * @type {boolean}
       */
      get isActiveTab() {
        const { activeTabIndex } = getContext();
        const { tabIndex } = privateState;
        return activeTabIndex === tabIndex;
      },
      /**
       * The value of the tabindex attribute for tab buttons.
       * Only the active tab should be in the tab sequence.
       *
       * @type {number}
       */
      get tabIndexAttribute() {
        return privateState.isActiveTab ? 0 : -1;
      }
    },
    actions: {
      /**
       * Handles the keydown events for the tab label and tabs controller.
       *
       * @param {KeyboardEvent} event The keydown event.
       */
      handleTabKeyDown: withSyncEvent((event) => {
        const context = getContext();
        const { isVertical } = context;
        const { tabIndex } = privateState;
        if (tabIndex === null) {
          return;
        }
        if (event.key === "ArrowRight" && !isVertical) {
          event.preventDefault();
          privateActions.moveFocus(tabIndex + 1);
        } else if (event.key === "ArrowLeft" && !isVertical) {
          event.preventDefault();
          privateActions.moveFocus(tabIndex - 1);
        } else if (event.key === "ArrowDown" && isVertical) {
          event.preventDefault();
          privateActions.moveFocus(tabIndex + 1);
        } else if (event.key === "ArrowUp" && isVertical) {
          event.preventDefault();
          privateActions.moveFocus(tabIndex - 1);
        }
      }),
      /**
       * Handles the click event for the tab label.
       *
       * @param {MouseEvent} event The click event.
       */
      handleTabClick: withSyncEvent((event) => {
        event.preventDefault();
        const { tabIndex } = privateState;
        if (tabIndex !== null) {
          privateActions.setActiveTab(tabIndex);
        }
      }),
      /**
       * Moves focus to a specific tab without activating it.
       *
       * @param {number} tabIndex The index to move focus to.
       */
      moveFocus: (tabIndex) => {
        const { tabsList } = privateState;
        if (!tabsList || tabsList.length === 0) {
          return;
        }
        let newIndex = tabIndex;
        if (newIndex < 0) {
          newIndex = tabsList.length - 1;
        } else if (newIndex >= tabsList.length) {
          newIndex = 0;
        }
        const tabId = tabsList[newIndex].id;
        const tabElement = document.getElementById("tab__" + tabId);
        if (tabElement) {
          tabElement.focus();
        }
      },
      /**
       * Sets the active tab index (internal implementation).
       *
       * @param {number}  tabIndex    The index of the active tab.
       * @param {boolean} scrollToTab Whether to scroll to the tab element.
       */
      setActiveTab: (tabIndex, scrollToTab = false) => {
        const { tabsList } = privateState;
        if (!tabsList || tabsList.length === 0) {
          return;
        }
        let newIndex = tabIndex;
        if (newIndex < 0) {
          newIndex = 0;
        } else if (newIndex >= tabsList.length) {
          newIndex = tabsList.length - 1;
        }
        const context = getContext();
        context.activeTabIndex = newIndex;
        if (scrollToTab) {
          const tabId = tabsList[newIndex].id;
          const tabElement = document.getElementById(tabId);
          if (tabElement) {
            setTimeout(() => {
              tabElement.scrollIntoView({ behavior: "smooth" });
            }, 100);
          }
        }
      }
    },
    callbacks: {
      /**
       * When the tabs are initialized, we need to check if there is a hash in the url and if so if it exists in the current tabsList, set the active tab to that index.
       *
       */
      onTabsInit: () => {
        const { tabsList } = privateState;
        if (tabsList.length === 0) {
          return;
        }
        const { hash } = window.location;
        const tabId = hash.replace("#", "");
        const tabIndex = tabsList.findIndex((t) => t.id === tabId);
        if (tabIndex >= 0) {
          privateActions.setActiveTab(tabIndex, true);
        }
      }
    }
  },
  {
    lock: true
  }
);
store("core/tabs", {
  state: {
    /**
     * Gets a contextually aware list of tabs for the current tabs block.
     * Public API for third-party access.
     *
     * @type {Array}
     */
    get tabsList() {
      return createReadOnlyProxy(privateState.tabsList);
    },
    /**
     * Gets the index of the active tab element whether it
     * is a tab label or tab panel.
     *
     * @type {number|null}
     */
    get tabIndex() {
      return privateState.tabIndex;
    },
    /**
     * Whether the tab panel or tab label is the active tab.
     *
     * @type {boolean}
     */
    get isActiveTab() {
      return privateState.isActiveTab;
    }
  },
  actions: {
    /**
     * Sets the active tab index.
     * Public API for third-party programmatic tab activation.
     *
     * @param {number}  tabIndex    The index of the active tab.
     * @param {boolean} scrollToTab Whether to scroll to the tab element.
     */
    setActiveTab: (tabIndex, scrollToTab = false) => {
      privateActions.setActiveTab(tabIndex, scrollToTab);
    }
  }
});
                                                                                                                                                        dist/script-modules/block-library/tabs/view.min.js                                                  0000644                 00000003660 15212564025 0016247 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       import{store as b,getContext as r,getElement as f,withSyncEvent as l}from"@wordpress/interactivity";function u(t){let e=new Set(["push","pop","shift","unshift","splice","sort","reverse","copyWithin","fill"]);return new Proxy(t,{get(n,s){if(Array.isArray(n)&&e.has(s))return()=>{};let a=n[s];return typeof a=="object"&&a!==null?u(a):a},set(){return!1},deleteProperty(){return!1}})}var{actions:o,state:i}=b("core/tabs/private",{state:{get tabsList(){let e=r()?.tabsId;return i[e]},get tabIndex(){let{attributes:t}=f(),e=t?.id?.replace("tab__","")||null;if(!e)return null;let{tabsList:n}=i;return n.findIndex(a=>a.id===e)},get isActiveTab(){let{activeTabIndex:t}=r(),{tabIndex:e}=i;return t===e},get tabIndexAttribute(){return i.isActiveTab?0:-1}},actions:{handleTabKeyDown:l(t=>{let e=r(),{isVertical:n}=e,{tabIndex:s}=i;s!==null&&(t.key==="ArrowRight"&&!n?(t.preventDefault(),o.moveFocus(s+1)):t.key==="ArrowLeft"&&!n?(t.preventDefault(),o.moveFocus(s-1)):t.key==="ArrowDown"&&n?(t.preventDefault(),o.moveFocus(s+1)):t.key==="ArrowUp"&&n&&(t.preventDefault(),o.moveFocus(s-1)))}),handleTabClick:l(t=>{t.preventDefault();let{tabIndex:e}=i;e!==null&&o.setActiveTab(e)}),moveFocus:t=>{let{tabsList:e}=i;if(!e||e.length===0)return;let n=t;n<0?n=e.length-1:n>=e.length&&(n=0);let s=e[n].id,a=document.getElementById("tab__"+s);a&&a.focus()},setActiveTab:(t,e=!1)=>{let{tabsList:n}=i;if(!n||n.length===0)return;let s=t;s<0?s=0:s>=n.length&&(s=n.length-1);let a=r();if(a.activeTabIndex=s,e){let d=n[s].id,c=document.getElementById(d);c&&setTimeout(()=>{c.scrollIntoView({behavior:"smooth"})},100)}}},callbacks:{onTabsInit:()=>{let{tabsList:t}=i;if(t.length===0)return;let{hash:e}=window.location,n=e.replace("#",""),s=t.findIndex(a=>a.id===n);s>=0&&o.setActiveTab(s,!0)}}},{lock:!0});b("core/tabs",{state:{get tabsList(){return u(i.tabsList)},get tabIndex(){return i.tabIndex},get isActiveTab(){return i.isActiveTab}},actions:{setActiveTab:(t,e=!1)=>{o.setActiveTab(t,e)}}});
                                                                                dist/script-modules/interactivity/index.js                                                          0000644                 00000313751 15212564025 0015040 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var __defProp = Object.defineProperty;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __esm = (fn, res) => function __init() {
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
};
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};

// node_modules/preact/dist/preact.module.js
function m(n3, l6) {
  for (var u5 in l6) n3[u5] = l6[u5];
  return n3;
}
function b(n3) {
  n3 && n3.parentNode && n3.parentNode.removeChild(n3);
}
function k(l6, u5, t5) {
  var i6, r5, o4, e4 = {};
  for (o4 in u5) "key" == o4 ? i6 = u5[o4] : "ref" == o4 ? r5 = u5[o4] : e4[o4] = u5[o4];
  if (arguments.length > 2 && (e4.children = arguments.length > 3 ? n.call(arguments, 2) : t5), "function" == typeof l6 && null != l6.defaultProps) for (o4 in l6.defaultProps) void 0 === e4[o4] && (e4[o4] = l6.defaultProps[o4]);
  return x(l6, e4, i6, r5, null);
}
function x(n3, t5, i6, r5, o4) {
  var e4 = { type: n3, props: t5, key: i6, ref: r5, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: null == o4 ? ++u : o4, __i: -1, __u: 0 };
  return null == o4 && null != l.vnode && l.vnode(e4), e4;
}
function S(n3) {
  return n3.children;
}
function C(n3, l6) {
  this.props = n3, this.context = l6;
}
function $(n3, l6) {
  if (null == l6) return n3.__ ? $(n3.__, n3.__i + 1) : null;
  for (var u5; l6 < n3.__k.length; l6++) if (null != (u5 = n3.__k[l6]) && null != u5.__e) return u5.__e;
  return "function" == typeof n3.type ? $(n3) : null;
}
function I(n3) {
  if (n3.__P && n3.__d) {
    var u5 = n3.__v, t5 = u5.__e, i6 = [], r5 = [], o4 = m({}, u5);
    o4.__v = u5.__v + 1, l.vnode && l.vnode(o4), q(n3.__P, o4, u5, n3.__n, n3.__P.namespaceURI, 32 & u5.__u ? [t5] : null, i6, null == t5 ? $(u5) : t5, !!(32 & u5.__u), r5), o4.__v = u5.__v, o4.__.__k[o4.__i] = o4, D(i6, o4, r5), u5.__e = u5.__ = null, o4.__e != t5 && P(o4);
  }
}
function P(n3) {
  if (null != (n3 = n3.__) && null != n3.__c) return n3.__e = n3.__c.base = null, n3.__k.some(function(l6) {
    if (null != l6 && null != l6.__e) return n3.__e = n3.__c.base = l6.__e;
  }), P(n3);
}
function A(n3) {
  (!n3.__d && (n3.__d = true) && i.push(n3) && !H.__r++ || r != l.debounceRendering) && ((r = l.debounceRendering) || o)(H);
}
function H() {
  try {
    for (var n3, l6 = 1; i.length; ) i.length > l6 && i.sort(e), n3 = i.shift(), l6 = i.length, I(n3);
  } finally {
    i.length = H.__r = 0;
  }
}
function L(n3, l6, u5, t5, i6, r5, o4, e4, f5, c5, s6) {
  var a5, h5, p6, v6, y5, _5, g3, m4 = t5 && t5.__k || w, b4 = l6.length;
  for (f5 = T(u5, l6, m4, f5, b4), a5 = 0; a5 < b4; a5++) null != (p6 = u5.__k[a5]) && (h5 = -1 != p6.__i && m4[p6.__i] || d, p6.__i = a5, _5 = q(n3, p6, h5, i6, r5, o4, e4, f5, c5, s6), v6 = p6.__e, p6.ref && h5.ref != p6.ref && (h5.ref && J(h5.ref, null, p6), s6.push(p6.ref, p6.__c || v6, p6)), null == y5 && null != v6 && (y5 = v6), (g3 = !!(4 & p6.__u)) || h5.__k === p6.__k ? (f5 = j(p6, f5, n3, g3), g3 && h5.__e && (h5.__e = null)) : "function" == typeof p6.type && void 0 !== _5 ? f5 = _5 : v6 && (f5 = v6.nextSibling), p6.__u &= -7);
  return u5.__e = y5, f5;
}
function T(n3, l6, u5, t5, i6) {
  var r5, o4, e4, f5, c5, s6 = u5.length, a5 = s6, h5 = 0;
  for (n3.__k = new Array(i6), r5 = 0; r5 < i6; r5++) null != (o4 = l6[r5]) && "boolean" != typeof o4 && "function" != typeof o4 ? ("string" == typeof o4 || "number" == typeof o4 || "bigint" == typeof o4 || o4.constructor == String ? o4 = n3.__k[r5] = x(null, o4, null, null, null) : g(o4) ? o4 = n3.__k[r5] = x(S, { children: o4 }, null, null, null) : void 0 === o4.constructor && o4.__b > 0 ? o4 = n3.__k[r5] = x(o4.type, o4.props, o4.key, o4.ref ? o4.ref : null, o4.__v) : n3.__k[r5] = o4, f5 = r5 + h5, o4.__ = n3, o4.__b = n3.__b + 1, e4 = null, -1 != (c5 = o4.__i = O(o4, u5, f5, a5)) && (a5--, (e4 = u5[c5]) && (e4.__u |= 2)), null == e4 || null == e4.__v ? (-1 == c5 && (i6 > s6 ? h5-- : i6 < s6 && h5++), "function" != typeof o4.type && (o4.__u |= 4)) : c5 != f5 && (c5 == f5 - 1 ? h5-- : c5 == f5 + 1 ? h5++ : (c5 > f5 ? h5-- : h5++, o4.__u |= 4))) : n3.__k[r5] = null;
  if (a5) for (r5 = 0; r5 < s6; r5++) null != (e4 = u5[r5]) && 0 == (2 & e4.__u) && (e4.__e == t5 && (t5 = $(e4)), K(e4, e4));
  return t5;
}
function j(n3, l6, u5, t5) {
  var i6, r5;
  if ("function" == typeof n3.type) {
    for (i6 = n3.__k, r5 = 0; i6 && r5 < i6.length; r5++) i6[r5] && (i6[r5].__ = n3, l6 = j(i6[r5], l6, u5, t5));
    return l6;
  }
  n3.__e != l6 && (t5 && (l6 && n3.type && !l6.parentNode && (l6 = $(n3)), u5.insertBefore(n3.__e, l6 || null)), l6 = n3.__e);
  do {
    l6 = l6 && l6.nextSibling;
  } while (null != l6 && 8 == l6.nodeType);
  return l6;
}
function O(n3, l6, u5, t5) {
  var i6, r5, o4, e4 = n3.key, f5 = n3.type, c5 = l6[u5], s6 = null != c5 && 0 == (2 & c5.__u);
  if (null === c5 && null == e4 || s6 && e4 == c5.key && f5 == c5.type) return u5;
  if (t5 > (s6 ? 1 : 0)) {
    for (i6 = u5 - 1, r5 = u5 + 1; i6 >= 0 || r5 < l6.length; ) if (null != (c5 = l6[o4 = i6 >= 0 ? i6-- : r5++]) && 0 == (2 & c5.__u) && e4 == c5.key && f5 == c5.type) return o4;
  }
  return -1;
}
function z(n3, l6, u5) {
  "-" == l6[0] ? n3.setProperty(l6, null == u5 ? "" : u5) : n3[l6] = null == u5 ? "" : "number" != typeof u5 || _.test(l6) ? u5 : u5 + "px";
}
function N(n3, l6, u5, t5, i6) {
  var r5, o4;
  n: if ("style" == l6) if ("string" == typeof u5) n3.style.cssText = u5;
  else {
    if ("string" == typeof t5 && (n3.style.cssText = t5 = ""), t5) for (l6 in t5) u5 && l6 in u5 || z(n3.style, l6, "");
    if (u5) for (l6 in u5) t5 && u5[l6] == t5[l6] || z(n3.style, l6, u5[l6]);
  }
  else if ("o" == l6[0] && "n" == l6[1]) r5 = l6 != (l6 = l6.replace(a, "$1")), o4 = l6.toLowerCase(), l6 = o4 in n3 || "onFocusOut" == l6 || "onFocusIn" == l6 ? o4.slice(2) : l6.slice(2), n3.l || (n3.l = {}), n3.l[l6 + r5] = u5, u5 ? t5 ? u5[s] = t5[s] : (u5[s] = h, n3.addEventListener(l6, r5 ? v : p, r5)) : n3.removeEventListener(l6, r5 ? v : p, r5);
  else {
    if ("http://www.w3.org/2000/svg" == i6) l6 = l6.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
    else if ("width" != l6 && "height" != l6 && "href" != l6 && "list" != l6 && "form" != l6 && "tabIndex" != l6 && "download" != l6 && "rowSpan" != l6 && "colSpan" != l6 && "role" != l6 && "popover" != l6 && l6 in n3) try {
      n3[l6] = null == u5 ? "" : u5;
      break n;
    } catch (n4) {
    }
    "function" == typeof u5 || (null == u5 || false === u5 && "-" != l6[4] ? n3.removeAttribute(l6) : n3.setAttribute(l6, "popover" == l6 && 1 == u5 ? "" : u5));
  }
}
function V(n3) {
  return function(u5) {
    if (this.l) {
      var t5 = this.l[u5.type + n3];
      if (null == u5[c]) u5[c] = h++;
      else if (u5[c] < t5[s]) return;
      return t5(l.event ? l.event(u5) : u5);
    }
  };
}
function q(n3, u5, t5, i6, r5, o4, e4, f5, c5, s6) {
  var a5, h5, p6, v6, y5, d6, _5, k3, x3, M, $2, I2, P2, A3, H2, T3 = u5.type;
  if (void 0 !== u5.constructor) return null;
  128 & t5.__u && (c5 = !!(32 & t5.__u), o4 = [f5 = u5.__e = t5.__e]), (a5 = l.__b) && a5(u5);
  n: if ("function" == typeof T3) try {
    if (k3 = u5.props, x3 = T3.prototype && T3.prototype.render, M = (a5 = T3.contextType) && i6[a5.__c], $2 = a5 ? M ? M.props.value : a5.__ : i6, t5.__c ? _5 = (h5 = u5.__c = t5.__c).__ = h5.__E : (x3 ? u5.__c = h5 = new T3(k3, $2) : (u5.__c = h5 = new C(k3, $2), h5.constructor = T3, h5.render = Q), M && M.sub(h5), h5.state || (h5.state = {}), h5.__n = i6, p6 = h5.__d = true, h5.__h = [], h5._sb = []), x3 && null == h5.__s && (h5.__s = h5.state), x3 && null != T3.getDerivedStateFromProps && (h5.__s == h5.state && (h5.__s = m({}, h5.__s)), m(h5.__s, T3.getDerivedStateFromProps(k3, h5.__s))), v6 = h5.props, y5 = h5.state, h5.__v = u5, p6) x3 && null == T3.getDerivedStateFromProps && null != h5.componentWillMount && h5.componentWillMount(), x3 && null != h5.componentDidMount && h5.__h.push(h5.componentDidMount);
    else {
      if (x3 && null == T3.getDerivedStateFromProps && k3 !== v6 && null != h5.componentWillReceiveProps && h5.componentWillReceiveProps(k3, $2), u5.__v == t5.__v || !h5.__e && null != h5.shouldComponentUpdate && false === h5.shouldComponentUpdate(k3, h5.__s, $2)) {
        u5.__v != t5.__v && (h5.props = k3, h5.state = h5.__s, h5.__d = false), u5.__e = t5.__e, u5.__k = t5.__k, u5.__k.some(function(n4) {
          n4 && (n4.__ = u5);
        }), w.push.apply(h5.__h, h5._sb), h5._sb = [], h5.__h.length && e4.push(h5);
        break n;
      }
      null != h5.componentWillUpdate && h5.componentWillUpdate(k3, h5.__s, $2), x3 && null != h5.componentDidUpdate && h5.__h.push(function() {
        h5.componentDidUpdate(v6, y5, d6);
      });
    }
    if (h5.context = $2, h5.props = k3, h5.__P = n3, h5.__e = false, I2 = l.__r, P2 = 0, x3) h5.state = h5.__s, h5.__d = false, I2 && I2(u5), a5 = h5.render(h5.props, h5.state, h5.context), w.push.apply(h5.__h, h5._sb), h5._sb = [];
    else do {
      h5.__d = false, I2 && I2(u5), a5 = h5.render(h5.props, h5.state, h5.context), h5.state = h5.__s;
    } while (h5.__d && ++P2 < 25);
    h5.state = h5.__s, null != h5.getChildContext && (i6 = m(m({}, i6), h5.getChildContext())), x3 && !p6 && null != h5.getSnapshotBeforeUpdate && (d6 = h5.getSnapshotBeforeUpdate(v6, y5)), A3 = null != a5 && a5.type === S && null == a5.key ? E(a5.props.children) : a5, f5 = L(n3, g(A3) ? A3 : [A3], u5, t5, i6, r5, o4, e4, f5, c5, s6), h5.base = u5.__e, u5.__u &= -161, h5.__h.length && e4.push(h5), _5 && (h5.__E = h5.__ = null);
  } catch (n4) {
    if (u5.__v = null, c5 || null != o4) if (n4.then) {
      for (u5.__u |= c5 ? 160 : 128; f5 && 8 == f5.nodeType && f5.nextSibling; ) f5 = f5.nextSibling;
      o4[o4.indexOf(f5)] = null, u5.__e = f5;
    } else {
      for (H2 = o4.length; H2--; ) b(o4[H2]);
      B(u5);
    }
    else u5.__e = t5.__e, u5.__k = t5.__k, n4.then || B(u5);
    l.__e(n4, u5, t5);
  }
  else null == o4 && u5.__v == t5.__v ? (u5.__k = t5.__k, u5.__e = t5.__e) : f5 = u5.__e = G(t5.__e, u5, t5, i6, r5, o4, e4, c5, s6);
  return (a5 = l.diffed) && a5(u5), 128 & u5.__u ? void 0 : f5;
}
function B(n3) {
  n3 && (n3.__c && (n3.__c.__e = true), n3.__k && n3.__k.some(B));
}
function D(n3, u5, t5) {
  for (var i6 = 0; i6 < t5.length; i6++) J(t5[i6], t5[++i6], t5[++i6]);
  l.__c && l.__c(u5, n3), n3.some(function(u6) {
    try {
      n3 = u6.__h, u6.__h = [], n3.some(function(n4) {
        n4.call(u6);
      });
    } catch (n4) {
      l.__e(n4, u6.__v);
    }
  });
}
function E(n3) {
  return "object" != typeof n3 || null == n3 || n3.__b > 0 ? n3 : g(n3) ? n3.map(E) : m({}, n3);
}
function G(u5, t5, i6, r5, o4, e4, f5, c5, s6) {
  var a5, h5, p6, v6, y5, w5, _5, m4 = i6.props || d, k3 = t5.props, x3 = t5.type;
  if ("svg" == x3 ? o4 = "http://www.w3.org/2000/svg" : "math" == x3 ? o4 = "http://www.w3.org/1998/Math/MathML" : o4 || (o4 = "http://www.w3.org/1999/xhtml"), null != e4) {
    for (a5 = 0; a5 < e4.length; a5++) if ((y5 = e4[a5]) && "setAttribute" in y5 == !!x3 && (x3 ? y5.localName == x3 : 3 == y5.nodeType)) {
      u5 = y5, e4[a5] = null;
      break;
    }
  }
  if (null == u5) {
    if (null == x3) return document.createTextNode(k3);
    u5 = document.createElementNS(o4, x3, k3.is && k3), c5 && (l.__m && l.__m(t5, e4), c5 = false), e4 = null;
  }
  if (null == x3) m4 === k3 || c5 && u5.data == k3 || (u5.data = k3);
  else {
    if (e4 = e4 && n.call(u5.childNodes), !c5 && null != e4) for (m4 = {}, a5 = 0; a5 < u5.attributes.length; a5++) m4[(y5 = u5.attributes[a5]).name] = y5.value;
    for (a5 in m4) y5 = m4[a5], "dangerouslySetInnerHTML" == a5 ? p6 = y5 : "children" == a5 || a5 in k3 || "value" == a5 && "defaultValue" in k3 || "checked" == a5 && "defaultChecked" in k3 || N(u5, a5, null, y5, o4);
    for (a5 in k3) y5 = k3[a5], "children" == a5 ? v6 = y5 : "dangerouslySetInnerHTML" == a5 ? h5 = y5 : "value" == a5 ? w5 = y5 : "checked" == a5 ? _5 = y5 : c5 && "function" != typeof y5 || m4[a5] === y5 || N(u5, a5, y5, m4[a5], o4);
    if (h5) c5 || p6 && (h5.__html == p6.__html || h5.__html == u5.innerHTML) || (u5.innerHTML = h5.__html), t5.__k = [];
    else if (p6 && (u5.innerHTML = ""), L("template" == t5.type ? u5.content : u5, g(v6) ? v6 : [v6], t5, i6, r5, "foreignObject" == x3 ? "http://www.w3.org/1999/xhtml" : o4, e4, f5, e4 ? e4[0] : i6.__k && $(i6, 0), c5, s6), null != e4) for (a5 = e4.length; a5--; ) b(e4[a5]);
    c5 || (a5 = "value", "progress" == x3 && null == w5 ? u5.removeAttribute("value") : null != w5 && (w5 !== u5[a5] || "progress" == x3 && !w5 || "option" == x3 && w5 != m4[a5]) && N(u5, a5, w5, m4[a5], o4), a5 = "checked", null != _5 && _5 != u5[a5] && N(u5, a5, _5, m4[a5], o4));
  }
  return u5;
}
function J(n3, u5, t5) {
  try {
    if ("function" == typeof n3) {
      var i6 = "function" == typeof n3.__u;
      i6 && n3.__u(), i6 && null == u5 || (n3.__u = n3(u5));
    } else n3.current = u5;
  } catch (n4) {
    l.__e(n4, t5);
  }
}
function K(n3, u5, t5) {
  var i6, r5;
  if (l.unmount && l.unmount(n3), (i6 = n3.ref) && (i6.current && i6.current != n3.__e || J(i6, null, u5)), null != (i6 = n3.__c)) {
    if (i6.componentWillUnmount) try {
      i6.componentWillUnmount();
    } catch (n4) {
      l.__e(n4, u5);
    }
    i6.base = i6.__P = null;
  }
  if (i6 = n3.__k) for (r5 = 0; r5 < i6.length; r5++) i6[r5] && K(i6[r5], u5, t5 || "function" != typeof n3.type);
  t5 || b(n3.__e), n3.__c = n3.__ = n3.__e = void 0;
}
function Q(n3, l6, u5) {
  return this.constructor(n3, u5);
}
function R(u5, t5, i6) {
  var r5, o4, e4, f5;
  t5 == document && (t5 = document.documentElement), l.__ && l.__(u5, t5), o4 = (r5 = "function" == typeof i6) ? null : i6 && i6.__k || t5.__k, e4 = [], f5 = [], q(t5, u5 = (!r5 && i6 || t5).__k = k(S, null, [u5]), o4 || d, d, t5.namespaceURI, !r5 && i6 ? [i6] : o4 ? null : t5.firstChild ? n.call(t5.childNodes) : null, e4, !r5 && i6 ? i6 : o4 ? o4.__e : t5.firstChild, r5, f5), D(e4, u5, f5);
}
function U(n3, l6) {
  R(n3, l6, U);
}
function W(l6, u5, t5) {
  var i6, r5, o4, e4, f5 = m({}, l6.props);
  for (o4 in l6.type && l6.type.defaultProps && (e4 = l6.type.defaultProps), u5) "key" == o4 ? i6 = u5[o4] : "ref" == o4 ? r5 = u5[o4] : f5[o4] = void 0 === u5[o4] && null != e4 ? e4[o4] : u5[o4];
  return arguments.length > 2 && (f5.children = arguments.length > 3 ? n.call(arguments, 2) : t5), x(l6.type, f5, i6 || l6.key, r5 || l6.ref, null);
}
function X(n3) {
  function l6(n4) {
    var u5, t5;
    return this.getChildContext || (u5 = /* @__PURE__ */ new Set(), (t5 = {})[l6.__c] = this, this.getChildContext = function() {
      return t5;
    }, this.componentWillUnmount = function() {
      u5 = null;
    }, this.shouldComponentUpdate = function(n5) {
      this.props.value != n5.value && u5.forEach(function(n6) {
        n6.__e = true, A(n6);
      });
    }, this.sub = function(n5) {
      u5.add(n5);
      var l7 = n5.componentWillUnmount;
      n5.componentWillUnmount = function() {
        u5 && u5.delete(n5), l7 && l7.call(n5);
      };
    }), n4.children;
  }
  return l6.__c = "__cC" + y++, l6.__ = n3, l6.Provider = l6.__l = (l6.Consumer = function(n4, l7) {
    return n4.children(l7);
  }).contextType = l6, l6;
}
var n, l, u, t, i, r, o, e, f, c, s, a, h, p, v, y, d, w, _, g;
var init_preact_module = __esm({
  "node_modules/preact/dist/preact.module.js"() {
    d = {};
    w = [];
    _ = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
    g = Array.isArray;
    n = w.slice, l = { __e: function(n3, l6, u5, t5) {
      for (var i6, r5, o4; l6 = l6.__; ) if ((i6 = l6.__c) && !i6.__) try {
        if ((r5 = i6.constructor) && null != r5.getDerivedStateFromError && (i6.setState(r5.getDerivedStateFromError(n3)), o4 = i6.__d), null != i6.componentDidCatch && (i6.componentDidCatch(n3, t5 || {}), o4 = i6.__d), o4) return i6.__E = i6;
      } catch (l7) {
        n3 = l7;
      }
      throw n3;
    } }, u = 0, t = function(n3) {
      return null != n3 && void 0 === n3.constructor;
    }, C.prototype.setState = function(n3, l6) {
      var u5;
      u5 = null != this.__s && this.__s != this.state ? this.__s : this.__s = m({}, this.state), "function" == typeof n3 && (n3 = n3(m({}, u5), this.props)), n3 && m(u5, n3), null != n3 && this.__v && (l6 && this._sb.push(l6), A(this));
    }, C.prototype.forceUpdate = function(n3) {
      this.__v && (this.__e = true, n3 && this.__h.push(n3), A(this));
    }, C.prototype.render = S, i = [], o = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, e = function(n3, l6) {
      return n3.__v.__b - l6.__v.__b;
    }, H.__r = 0, f = Math.random().toString(8), c = "__d" + f, s = "__a" + f, a = /(PointerCapture)$|Capture$/i, h = 0, p = V(false), v = V(true), y = 0;
  }
});

// node_modules/preact/devtools/dist/devtools.module.js
var i4;
var init_devtools_module = __esm({
  "node_modules/preact/devtools/dist/devtools.module.js"() {
    init_preact_module();
    null != (i4 = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : void 0) && i4.__PREACT_DEVTOOLS__ && i4.__PREACT_DEVTOOLS__.attachPreact("10.29.1", l, { Fragment: S, Component: C });
  }
});

// node_modules/preact/debug/dist/debug.module.js
var debug_module_exports = {};
__export(debug_module_exports, {
  getCurrentVNode: () => c4,
  getDisplayName: () => a4,
  getOwnerStack: () => f4,
  resetPropWarnings: () => r4
});
function r4() {
  t4 = {};
}
function a4(e4) {
  return e4.type === S ? "Fragment" : "function" == typeof e4.type ? e4.type.displayName || e4.type.name : "string" == typeof e4.type ? e4.type : "#text";
}
function c4() {
  return i5.length > 0 ? i5[i5.length - 1] : null;
}
function u4(e4) {
  return "function" == typeof e4.type && e4.type != S;
}
function f4(n3) {
  for (var e4 = [n3], o4 = n3; null != o4.__o; ) e4.push(o4.__o), o4 = o4.__o;
  return e4.reduce(function(n4, e5) {
    n4 += "  in " + a4(e5);
    var o5 = e5.__source;
    return o5 ? n4 += " (at " + o5.fileName + ":" + o5.lineNumber + ")" : l5 && console.warn("Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons."), l5 = false, n4 + "\n";
  }, "");
}
function p5(n3) {
  var e4 = [];
  return n3.__k ? (n3.__k.forEach(function(n4) {
    n4 && "function" == typeof n4.type ? e4.push.apply(e4, p5(n4)) : n4 && "string" == typeof n4.type && e4.push(n4.type);
  }), e4) : e4;
}
function h4(n3) {
  return n3 ? "function" == typeof n3.type ? null == n3.__ ? null != n3.__e && null != n3.__e.parentNode ? n3.__e.parentNode.localName : "" : h4(n3.__) : n3.type : "";
}
function y4(n3) {
  return "table" === n3 || "tfoot" === n3 || "tbody" === n3 || "thead" === n3 || "td" === n3 || "tr" === n3 || "th" === n3;
}
function w4(n3) {
  var e4 = n3.props, o4 = a4(n3), t5 = "";
  for (var r5 in e4) if (e4.hasOwnProperty(r5) && "children" !== r5) {
    var i6 = e4[r5];
    "function" == typeof i6 && (i6 = "function " + (i6.displayName || i6.name) + "() {}"), i6 = Object(i6) !== i6 || i6.toString ? i6 + "" : Object.prototype.toString.call(i6), t5 += " " + r5 + "=" + JSON.stringify(i6);
  }
  var s6 = e4.children;
  return "<" + o4 + t5 + (s6 && s6.length ? ">..</" + o4 + ">" : " />");
}
var t4, i5, s5, l5, d5, v5, m3, b3;
var init_debug_module = __esm({
  "node_modules/preact/debug/dist/debug.module.js"() {
    init_preact_module();
    init_devtools_module();
    t4 = {};
    i5 = [];
    s5 = [];
    l5 = true;
    d5 = "function" == typeof WeakMap;
    v5 = C.prototype.setState;
    C.prototype.setState = function(n3, e4) {
      return null == this.__v && null == this.state && console.warn('Calling "this.setState" inside the constructor of a component is a no-op and might be a bug in your application. Instead, set "this.state = {}" directly.\n\n' + f4(c4())), v5.call(this, n3, e4);
    };
    m3 = /^(address|article|aside|blockquote|details|div|dl|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|main|menu|nav|ol|p|pre|search|section|table|ul)$/;
    b3 = C.prototype.forceUpdate;
    C.prototype.forceUpdate = function(n3) {
      return null == this.__v ? console.warn('Calling "this.forceUpdate" inside the constructor of a component is a no-op and might be a bug in your application.\n\n' + f4(c4())) : null == this.__P && console.warn(`Can't call "this.forceUpdate" on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.

` + f4(this.__v)), b3.call(this, n3);
    }, l.__m = function(n3, e4) {
      var o4 = n3.type, t5 = e4.map(function(n4) {
        return n4 && n4.localName;
      }).filter(Boolean);
      console.error('Expected a DOM node of type "' + o4 + '" but found "' + t5.join(", ") + `" as available DOM-node(s), this is caused by the SSR'd HTML containing different DOM-nodes compared to the hydrated one.

` + f4(n3));
    }, (function() {
      !(function() {
        var n4 = l.__b, o5 = l.diffed, t5 = l.__, r6 = l.vnode, a5 = l.__r;
        l.diffed = function(n5) {
          u4(n5) && s5.pop(), i5.pop(), o5 && o5(n5);
        }, l.__b = function(e4) {
          u4(e4) && i5.push(e4), n4 && n4(e4);
        }, l.__ = function(n5, e4) {
          s5 = [], t5 && t5(n5, e4);
        }, l.vnode = function(n5) {
          n5.__o = s5.length > 0 ? s5[s5.length - 1] : null, r6 && r6(n5);
        }, l.__r = function(n5) {
          u4(n5) && s5.push(n5), a5 && a5(n5);
        };
      })();
      var n3 = false, o4 = l.__b, r5 = l.diffed, c5 = l.vnode, l6 = l.__r, v6 = l.__e, b4 = l.__, g3 = l.__h, E3 = d5 ? { useEffect: /* @__PURE__ */ new WeakMap(), useLayoutEffect: /* @__PURE__ */ new WeakMap(), lazyPropTypes: /* @__PURE__ */ new WeakMap() } : null, k3 = [];
      l.__e = function(n4, e4, o5, t5) {
        if (e4 && e4.__c && "function" == typeof n4.then) {
          var r6 = n4;
          n4 = new Error("Missing Suspense. The throwing component was: " + a4(e4));
          for (var i6 = e4; i6; i6 = i6.__) if (i6.__c && i6.__c.__c) {
            n4 = r6;
            break;
          }
          if (n4 instanceof Error) throw n4;
        }
        try {
          (t5 = t5 || {}).componentStack = f4(e4), v6(n4, e4, o5, t5), "function" != typeof n4.then && setTimeout(function() {
            throw n4;
          });
        } catch (n5) {
          throw n5;
        }
      }, l.__ = function(n4, e4) {
        if (!e4) throw new Error("Undefined parent passed to render(), this is the second argument.\nCheck if the element is available in the DOM/has the correct id.");
        var o5;
        switch (e4.nodeType) {
          case 1:
          case 11:
          case 9:
            o5 = true;
            break;
          default:
            o5 = false;
        }
        if (!o5) {
          var t5 = a4(n4);
          throw new Error("Expected a valid HTML node as a second argument to render.	Received " + e4 + " instead: render(<" + t5 + " />, " + e4 + ");");
        }
        b4 && b4(n4, e4);
      }, l.__b = function(e4) {
        var r6 = e4.type;
        if (n3 = true, void 0 === r6) throw new Error("Undefined component passed to createElement()\n\nYou likely forgot to export your component or might have mixed up default and named imports" + w4(e4) + "\n\n" + f4(e4));
        if (null != r6 && "object" == typeof r6) {
          if (void 0 !== r6.__k && void 0 !== r6.__e) throw new Error("Invalid type passed to createElement(): " + r6 + "\n\nDid you accidentally pass a JSX literal as JSX twice?\n\n  let My" + a4(e4) + " = " + w4(r6) + ";\n  let vnode = <My" + a4(e4) + " />;\n\nThis usually happens when you export a JSX literal and not the component.\n\n" + f4(e4));
          throw new Error("Invalid type passed to createElement(): " + (Array.isArray(r6) ? "array" : r6));
        }
        if (void 0 !== e4.ref && "function" != typeof e4.ref && "object" != typeof e4.ref && !("$$typeof" in e4)) throw new Error(`Component's "ref" property should be a function, or an object created by createRef(), but got [` + typeof e4.ref + "] instead\n" + w4(e4) + "\n\n" + f4(e4));
        if ("string" == typeof e4.type) {
          for (var i6 in e4.props) if ("o" === i6[0] && "n" === i6[1] && "function" != typeof e4.props[i6] && null != e4.props[i6]) throw new Error(`Component's "` + i6 + '" property should be a function, but got [' + typeof e4.props[i6] + "] instead\n" + w4(e4) + "\n\n" + f4(e4));
        }
        if ("function" == typeof e4.type && e4.type.propTypes) {
          if ("Lazy" === e4.type.displayName && E3 && !E3.lazyPropTypes.has(e4.type)) {
            var s6 = "PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";
            try {
              var c6 = e4.type();
              E3.lazyPropTypes.set(e4.type, true), console.warn(s6 + "Component wrapped in lazy() is " + a4(c6));
            } catch (n4) {
              console.warn(s6 + "We will log the wrapped component's name once it is loaded.");
            }
          }
          var l7 = e4.props;
          e4.type.__f && delete (l7 = (function(n4, e5) {
            for (var o5 in e5) n4[o5] = e5[o5];
            return n4;
          })({}, l7)).ref, (function(n4, e5, o5, r7, a5) {
            Object.keys(n4).forEach(function(o6) {
              var i7;
              try {
                i7 = n4[o6](e5, o6, r7, "prop", null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
              } catch (n5) {
                i7 = n5;
              }
              i7 && !(i7.message in t4) && (t4[i7.message] = true, console.error("Failed prop type: " + i7.message + (a5 && "\n" + a5() || "")));
            });
          })(e4.type.propTypes, l7, 0, a4(e4), function() {
            return f4(e4);
          });
        }
        o4 && o4(e4);
      };
      var T3, _5 = 0;
      l.__r = function(e4) {
        l6 && l6(e4), n3 = true;
        var o5 = e4.__c;
        if (o5 === T3 ? _5++ : _5 = 1, _5 >= 25) throw new Error("Too many re-renders. This is limited to prevent an infinite loop which may lock up your browser. The component causing this is: " + a4(e4));
        T3 = o5;
      }, l.__h = function(e4, o5, t5) {
        if (!e4 || !n3) throw new Error("Hook can only be invoked from render methods.");
        g3 && g3(e4, o5, t5);
      };
      var O2 = function(n4, e4) {
        return { get: function() {
          var o5 = "get" + n4 + e4;
          k3 && k3.indexOf(o5) < 0 && (k3.push(o5), console.warn("getting vnode." + n4 + " is deprecated, " + e4));
        }, set: function() {
          var o5 = "set" + n4 + e4;
          k3 && k3.indexOf(o5) < 0 && (k3.push(o5), console.warn("setting vnode." + n4 + " is not allowed, " + e4));
        } };
      }, I2 = { nodeName: O2("nodeName", "use vnode.type"), attributes: O2("attributes", "use vnode.props"), children: O2("children", "use vnode.props.children") }, M = Object.create({}, I2);
      l.vnode = function(n4) {
        var e4 = n4.props;
        if (null !== n4.type && null != e4 && ("__source" in e4 || "__self" in e4)) {
          var o5 = n4.props = {};
          for (var t5 in e4) {
            var r6 = e4[t5];
            "__source" === t5 ? n4.__source = r6 : "__self" === t5 ? n4.__self = r6 : o5[t5] = r6;
          }
        }
        n4.__proto__ = M, c5 && c5(n4);
      }, l.diffed = function(e4) {
        var o5, t5 = e4.type, i6 = e4.__;
        if (e4.__k && e4.__k.forEach(function(n4) {
          if ("object" == typeof n4 && n4 && void 0 === n4.type) {
            var o6 = Object.keys(n4).join(",");
            throw new Error("Objects are not valid as a child. Encountered an object with the keys {" + o6 + "}.\n\n" + f4(e4));
          }
        }), e4.__c === T3 && (_5 = 0), "string" == typeof t5 && (y4(t5) || "p" === t5 || "a" === t5 || "button" === t5)) {
          var s6 = h4(i6);
          if ("" !== s6 && y4(t5)) "table" === t5 && "td" !== s6 && y4(s6) ? console.error("Improper nesting of table. Your <table> should not have a table-node parent." + w4(e4) + "\n\n" + f4(e4)) : "thead" !== t5 && "tfoot" !== t5 && "tbody" !== t5 || "table" === s6 ? "tr" === t5 && "thead" !== s6 && "tfoot" !== s6 && "tbody" !== s6 ? console.error("Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot> parent." + w4(e4) + "\n\n" + f4(e4)) : "td" === t5 && "tr" !== s6 ? console.error("Improper nesting of table. Your <td> should have a <tr> parent." + w4(e4) + "\n\n" + f4(e4)) : "th" === t5 && "tr" !== s6 && console.error("Improper nesting of table. Your <th> should have a <tr>." + w4(e4) + "\n\n" + f4(e4)) : console.error("Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent." + w4(e4) + "\n\n" + f4(e4));
          else if ("p" === t5) {
            var c6 = p5(e4).filter(function(n4) {
              return m3.test(n4);
            });
            c6.length && console.error("Improper nesting of paragraph. Your <p> should not have " + c6.join(", ") + " as child-elements." + w4(e4) + "\n\n" + f4(e4));
          } else "a" !== t5 && "button" !== t5 || -1 !== p5(e4).indexOf(t5) && console.error("Improper nesting of interactive content. Your <" + t5 + "> should not have other " + ("a" === t5 ? "anchor" : "button") + " tags as child-elements." + w4(e4) + "\n\n" + f4(e4));
        }
        if (n3 = false, r5 && r5(e4), null != e4.__k) for (var l7 = [], u5 = 0; u5 < e4.__k.length; u5++) {
          var d6 = e4.__k[u5];
          if (d6 && null != d6.key) {
            var v7 = d6.key;
            if (-1 !== l7.indexOf(v7)) {
              console.error('Following component has two or more children with the same key attribute: "' + v7 + '". This may cause glitches and misbehavior in rendering process. Component: \n\n' + w4(e4) + "\n\n" + f4(e4));
              break;
            }
            l7.push(v7);
          }
        }
        if (null != e4.__c && null != e4.__c.__H) {
          var b5 = e4.__c.__H.__;
          if (b5) for (var g4 = 0; g4 < b5.length; g4 += 1) {
            var E4 = b5[g4];
            if (E4.__H) {
              for (var k4 = 0; k4 < E4.__H.length; k4++) if ((o5 = E4.__H[k4]) != o5) {
                var O3 = a4(e4);
                console.warn("Invalid argument passed to hook. Hooks should not be called with NaN in the dependency array. Hook index " + g4 + " in component " + O3 + " was called with NaN.");
              }
            }
          }
        }
      };
    })();
  }
});

// packages/interactivity/build-module/index.mjs
init_preact_module();

// node_modules/@preact/signals/dist/signals.module.js
init_preact_module();

// node_modules/preact/hooks/dist/hooks.module.js
init_preact_module();
var t2;
var r2;
var u2;
var i2;
var o2 = 0;
var f2 = [];
var c2 = l;
var e2 = c2.__b;
var a2 = c2.__r;
var v2 = c2.diffed;
var l2 = c2.__c;
var m2 = c2.unmount;
var s2 = c2.__;
function p2(n3, t5) {
  c2.__h && c2.__h(r2, n3, o2 || t5), o2 = 0;
  var u5 = r2.__H || (r2.__H = { __: [], __h: [] });
  return n3 >= u5.__.length && u5.__.push({}), u5.__[n3];
}
function d2(n3) {
  return o2 = 1, h2(D2, n3);
}
function h2(n3, u5, i6) {
  var o4 = p2(t2++, 2);
  if (o4.t = n3, !o4.__c && (o4.__ = [i6 ? i6(u5) : D2(void 0, u5), function(n4) {
    var t5 = o4.__N ? o4.__N[0] : o4.__[0], r5 = o4.t(t5, n4);
    t5 !== r5 && (o4.__N = [r5, o4.__[1]], o4.__c.setState({}));
  }], o4.__c = r2, !r2.__f)) {
    var f5 = function(n4, t5, r5) {
      if (!o4.__c.__H) return true;
      var u6 = o4.__c.__H.__.filter(function(n5) {
        return n5.__c;
      });
      if (u6.every(function(n5) {
        return !n5.__N;
      })) return !c5 || c5.call(this, n4, t5, r5);
      var i7 = o4.__c.props !== n4;
      return u6.some(function(n5) {
        if (n5.__N) {
          var t6 = n5.__[0];
          n5.__ = n5.__N, n5.__N = void 0, t6 !== n5.__[0] && (i7 = true);
        }
      }), c5 && c5.call(this, n4, t5, r5) || i7;
    };
    r2.__f = true;
    var c5 = r2.shouldComponentUpdate, e4 = r2.componentWillUpdate;
    r2.componentWillUpdate = function(n4, t5, r5) {
      if (this.__e) {
        var u6 = c5;
        c5 = void 0, f5(n4, t5, r5), c5 = u6;
      }
      e4 && e4.call(this, n4, t5, r5);
    }, r2.shouldComponentUpdate = f5;
  }
  return o4.__N || o4.__;
}
function y2(n3, u5) {
  var i6 = p2(t2++, 3);
  !c2.__s && C2(i6.__H, u5) && (i6.__ = n3, i6.u = u5, r2.__H.__h.push(i6));
}
function _2(n3, u5) {
  var i6 = p2(t2++, 4);
  !c2.__s && C2(i6.__H, u5) && (i6.__ = n3, i6.u = u5, r2.__h.push(i6));
}
function A2(n3) {
  return o2 = 5, T2(function() {
    return { current: n3 };
  }, []);
}
function T2(n3, r5) {
  var u5 = p2(t2++, 7);
  return C2(u5.__H, r5) && (u5.__ = n3(), u5.__H = r5, u5.__h = n3), u5.__;
}
function q2(n3, t5) {
  return o2 = 8, T2(function() {
    return n3;
  }, t5);
}
function x2(n3) {
  var u5 = r2.context[n3.__c], i6 = p2(t2++, 9);
  return i6.c = n3, u5 ? (null == i6.__ && (i6.__ = true, u5.sub(r2)), u5.props.value) : n3.__;
}
function j2() {
  for (var n3; n3 = f2.shift(); ) {
    var t5 = n3.__H;
    if (n3.__P && t5) try {
      t5.__h.some(z2), t5.__h.some(B2), t5.__h = [];
    } catch (r5) {
      t5.__h = [], c2.__e(r5, n3.__v);
    }
  }
}
c2.__b = function(n3) {
  r2 = null, e2 && e2(n3);
}, c2.__ = function(n3, t5) {
  n3 && t5.__k && t5.__k.__m && (n3.__m = t5.__k.__m), s2 && s2(n3, t5);
}, c2.__r = function(n3) {
  a2 && a2(n3), t2 = 0;
  var i6 = (r2 = n3.__c).__H;
  i6 && (u2 === r2 ? (i6.__h = [], r2.__h = [], i6.__.some(function(n4) {
    n4.__N && (n4.__ = n4.__N), n4.u = n4.__N = void 0;
  })) : (i6.__h.some(z2), i6.__h.some(B2), i6.__h = [], t2 = 0)), u2 = r2;
}, c2.diffed = function(n3) {
  v2 && v2(n3);
  var t5 = n3.__c;
  t5 && t5.__H && (t5.__H.__h.length && (1 !== f2.push(t5) && i2 === c2.requestAnimationFrame || ((i2 = c2.requestAnimationFrame) || w2)(j2)), t5.__H.__.some(function(n4) {
    n4.u && (n4.__H = n4.u), n4.u = void 0;
  })), u2 = r2 = null;
}, c2.__c = function(n3, t5) {
  t5.some(function(n4) {
    try {
      n4.__h.some(z2), n4.__h = n4.__h.filter(function(n5) {
        return !n5.__ || B2(n5);
      });
    } catch (r5) {
      t5.some(function(n5) {
        n5.__h && (n5.__h = []);
      }), t5 = [], c2.__e(r5, n4.__v);
    }
  }), l2 && l2(n3, t5);
}, c2.unmount = function(n3) {
  m2 && m2(n3);
  var t5, r5 = n3.__c;
  r5 && r5.__H && (r5.__H.__.some(function(n4) {
    try {
      z2(n4);
    } catch (n5) {
      t5 = n5;
    }
  }), r5.__H = void 0, t5 && c2.__e(t5, r5.__v));
};
var k2 = "function" == typeof requestAnimationFrame;
function w2(n3) {
  var t5, r5 = function() {
    clearTimeout(u5), k2 && cancelAnimationFrame(t5), setTimeout(n3);
  }, u5 = setTimeout(r5, 35);
  k2 && (t5 = requestAnimationFrame(r5));
}
function z2(n3) {
  var t5 = r2, u5 = n3.__c;
  "function" == typeof u5 && (n3.__c = void 0, u5()), r2 = t5;
}
function B2(n3) {
  var t5 = r2;
  n3.__c = n3.__(), r2 = t5;
}
function C2(n3, t5) {
  return !n3 || n3.length !== t5.length || t5.some(function(t6, r5) {
    return t6 !== n3[r5];
  });
}
function D2(n3, t5) {
  return "function" == typeof t5 ? t5(n3) : t5;
}

// node_modules/@preact/signals-core/dist/signals-core.module.js
var i3 = /* @__PURE__ */ Symbol.for("preact-signals");
function t3() {
  if (!(s3 > 1)) {
    var i6, t5 = false;
    while (void 0 !== h3) {
      var r5 = h3;
      h3 = void 0;
      f3++;
      while (void 0 !== r5) {
        var o4 = r5.o;
        r5.o = void 0;
        r5.f &= -3;
        if (!(8 & r5.f) && c3(r5)) try {
          r5.c();
        } catch (r6) {
          if (!t5) {
            i6 = r6;
            t5 = true;
          }
        }
        r5 = o4;
      }
    }
    f3 = 0;
    s3--;
    if (t5) throw i6;
  } else s3--;
}
function r3(i6) {
  if (s3 > 0) return i6();
  s3++;
  try {
    return i6();
  } finally {
    t3();
  }
}
var o3 = void 0;
var h3 = void 0;
var s3 = 0;
var f3 = 0;
var v3 = 0;
function e3(i6) {
  if (void 0 !== o3) {
    var t5 = i6.n;
    if (void 0 === t5 || t5.t !== o3) {
      t5 = { i: 0, S: i6, p: o3.s, n: void 0, t: o3, e: void 0, x: void 0, r: t5 };
      if (void 0 !== o3.s) o3.s.n = t5;
      o3.s = t5;
      i6.n = t5;
      if (32 & o3.f) i6.S(t5);
      return t5;
    } else if (-1 === t5.i) {
      t5.i = 0;
      if (void 0 !== t5.n) {
        t5.n.p = t5.p;
        if (void 0 !== t5.p) t5.p.n = t5.n;
        t5.p = o3.s;
        t5.n = void 0;
        o3.s.n = t5;
        o3.s = t5;
      }
      return t5;
    }
  }
}
function u3(i6) {
  this.v = i6;
  this.i = 0;
  this.n = void 0;
  this.t = void 0;
}
u3.prototype.brand = i3;
u3.prototype.h = function() {
  return true;
};
u3.prototype.S = function(i6) {
  if (this.t !== i6 && void 0 === i6.e) {
    i6.x = this.t;
    if (void 0 !== this.t) this.t.e = i6;
    this.t = i6;
  }
};
u3.prototype.U = function(i6) {
  if (void 0 !== this.t) {
    var t5 = i6.e, r5 = i6.x;
    if (void 0 !== t5) {
      t5.x = r5;
      i6.e = void 0;
    }
    if (void 0 !== r5) {
      r5.e = t5;
      i6.x = void 0;
    }
    if (i6 === this.t) this.t = r5;
  }
};
u3.prototype.subscribe = function(i6) {
  var t5 = this;
  return E2(function() {
    var r5 = t5.value, n3 = o3;
    o3 = void 0;
    try {
      i6(r5);
    } finally {
      o3 = n3;
    }
  });
};
u3.prototype.valueOf = function() {
  return this.value;
};
u3.prototype.toString = function() {
  return this.value + "";
};
u3.prototype.toJSON = function() {
  return this.value;
};
u3.prototype.peek = function() {
  var i6 = o3;
  o3 = void 0;
  try {
    return this.value;
  } finally {
    o3 = i6;
  }
};
Object.defineProperty(u3.prototype, "value", { get: function() {
  var i6 = e3(this);
  if (void 0 !== i6) i6.i = this.i;
  return this.v;
}, set: function(i6) {
  if (i6 !== this.v) {
    if (f3 > 100) throw new Error("Cycle detected");
    this.v = i6;
    this.i++;
    v3++;
    s3++;
    try {
      for (var r5 = this.t; void 0 !== r5; r5 = r5.x) r5.t.N();
    } finally {
      t3();
    }
  }
} });
function d3(i6) {
  return new u3(i6);
}
function c3(i6) {
  for (var t5 = i6.s; void 0 !== t5; t5 = t5.n) if (t5.S.i !== t5.i || !t5.S.h() || t5.S.i !== t5.i) return true;
  return false;
}
function a3(i6) {
  for (var t5 = i6.s; void 0 !== t5; t5 = t5.n) {
    var r5 = t5.S.n;
    if (void 0 !== r5) t5.r = r5;
    t5.S.n = t5;
    t5.i = -1;
    if (void 0 === t5.n) {
      i6.s = t5;
      break;
    }
  }
}
function l3(i6) {
  var t5 = i6.s, r5 = void 0;
  while (void 0 !== t5) {
    var o4 = t5.p;
    if (-1 === t5.i) {
      t5.S.U(t5);
      if (void 0 !== o4) o4.n = t5.n;
      if (void 0 !== t5.n) t5.n.p = o4;
    } else r5 = t5;
    t5.S.n = t5.r;
    if (void 0 !== t5.r) t5.r = void 0;
    t5 = o4;
  }
  i6.s = r5;
}
function y3(i6) {
  u3.call(this, void 0);
  this.x = i6;
  this.s = void 0;
  this.g = v3 - 1;
  this.f = 4;
}
(y3.prototype = new u3()).h = function() {
  this.f &= -3;
  if (1 & this.f) return false;
  if (32 == (36 & this.f)) return true;
  this.f &= -5;
  if (this.g === v3) return true;
  this.g = v3;
  this.f |= 1;
  if (this.i > 0 && !c3(this)) {
    this.f &= -2;
    return true;
  }
  var i6 = o3;
  try {
    a3(this);
    o3 = this;
    var t5 = this.x();
    if (16 & this.f || this.v !== t5 || 0 === this.i) {
      this.v = t5;
      this.f &= -17;
      this.i++;
    }
  } catch (i7) {
    this.v = i7;
    this.f |= 16;
    this.i++;
  }
  o3 = i6;
  l3(this);
  this.f &= -2;
  return true;
};
y3.prototype.S = function(i6) {
  if (void 0 === this.t) {
    this.f |= 36;
    for (var t5 = this.s; void 0 !== t5; t5 = t5.n) t5.S.S(t5);
  }
  u3.prototype.S.call(this, i6);
};
y3.prototype.U = function(i6) {
  if (void 0 !== this.t) {
    u3.prototype.U.call(this, i6);
    if (void 0 === this.t) {
      this.f &= -33;
      for (var t5 = this.s; void 0 !== t5; t5 = t5.n) t5.S.U(t5);
    }
  }
};
y3.prototype.N = function() {
  if (!(2 & this.f)) {
    this.f |= 6;
    for (var i6 = this.t; void 0 !== i6; i6 = i6.x) i6.t.N();
  }
};
Object.defineProperty(y3.prototype, "value", { get: function() {
  if (1 & this.f) throw new Error("Cycle detected");
  var i6 = e3(this);
  this.h();
  if (void 0 !== i6) i6.i = this.i;
  if (16 & this.f) throw this.v;
  return this.v;
} });
function w3(i6) {
  return new y3(i6);
}
function _3(i6) {
  var r5 = i6.u;
  i6.u = void 0;
  if ("function" == typeof r5) {
    s3++;
    var n3 = o3;
    o3 = void 0;
    try {
      r5();
    } catch (t5) {
      i6.f &= -2;
      i6.f |= 8;
      g2(i6);
      throw t5;
    } finally {
      o3 = n3;
      t3();
    }
  }
}
function g2(i6) {
  for (var t5 = i6.s; void 0 !== t5; t5 = t5.n) t5.S.U(t5);
  i6.x = void 0;
  i6.s = void 0;
  _3(i6);
}
function p3(i6) {
  if (o3 !== this) throw new Error("Out-of-order effect");
  l3(this);
  o3 = i6;
  this.f &= -2;
  if (8 & this.f) g2(this);
  t3();
}
function b2(i6) {
  this.x = i6;
  this.u = void 0;
  this.s = void 0;
  this.o = void 0;
  this.f = 32;
}
b2.prototype.c = function() {
  var i6 = this.S();
  try {
    if (8 & this.f) return;
    if (void 0 === this.x) return;
    var t5 = this.x();
    if ("function" == typeof t5) this.u = t5;
  } finally {
    i6();
  }
};
b2.prototype.S = function() {
  if (1 & this.f) throw new Error("Cycle detected");
  this.f |= 1;
  this.f &= -9;
  _3(this);
  a3(this);
  s3++;
  var i6 = o3;
  o3 = this;
  return p3.bind(this, i6);
};
b2.prototype.N = function() {
  if (!(2 & this.f)) {
    this.f |= 2;
    this.o = h3;
    h3 = this;
  }
};
b2.prototype.d = function() {
  this.f |= 8;
  if (!(1 & this.f)) g2(this);
};
function E2(i6) {
  var t5 = new b2(i6);
  try {
    t5.c();
  } catch (i7) {
    t5.d();
    throw i7;
  }
  return t5.d.bind(t5);
}

// node_modules/@preact/signals/dist/signals.module.js
var v4;
var s4;
function l4(n3, i6) {
  l[n3] = i6.bind(null, l[n3] || function() {
  });
}
function d4(n3) {
  if (s4) s4();
  s4 = n3 && n3.S();
}
function p4(n3) {
  var r5 = this, f5 = n3.data, o4 = useSignal(f5);
  o4.value = f5;
  var e4 = T2(function() {
    var n4 = r5.__v;
    while (n4 = n4.__) if (n4.__c) {
      n4.__c.__$f |= 4;
      break;
    }
    r5.__$u.c = function() {
      var n5;
      if (!t(e4.peek()) && 3 === (null == (n5 = r5.base) ? void 0 : n5.nodeType)) r5.base.data = e4.peek();
      else {
        r5.__$f |= 1;
        r5.setState({});
      }
    };
    return w3(function() {
      var n5 = o4.value.value;
      return 0 === n5 ? 0 : true === n5 ? "" : n5 || "";
    });
  }, []);
  return e4.value;
}
p4.displayName = "_st";
Object.defineProperties(u3.prototype, { constructor: { configurable: true, value: void 0 }, type: { configurable: true, value: p4 }, props: { configurable: true, get: function() {
  return { data: this };
} }, __b: { configurable: true, value: 1 } });
l4("__b", function(n3, r5) {
  if ("string" == typeof r5.type) {
    var i6, t5 = r5.props;
    for (var f5 in t5) if ("children" !== f5) {
      var o4 = t5[f5];
      if (o4 instanceof u3) {
        if (!i6) r5.__np = i6 = {};
        i6[f5] = o4;
        t5[f5] = o4.peek();
      }
    }
  }
  n3(r5);
});
l4("__r", function(n3, r5) {
  d4();
  var i6, t5 = r5.__c;
  if (t5) {
    t5.__$f &= -2;
    if (void 0 === (i6 = t5.__$u)) t5.__$u = i6 = (function(n4) {
      var r6;
      E2(function() {
        r6 = this;
      });
      r6.c = function() {
        t5.__$f |= 1;
        t5.setState({});
      };
      return r6;
    })();
  }
  v4 = t5;
  d4(i6);
  n3(r5);
});
l4("__e", function(n3, r5, i6, t5) {
  d4();
  v4 = void 0;
  n3(r5, i6, t5);
});
l4("diffed", function(n3, r5) {
  d4();
  v4 = void 0;
  var i6;
  if ("string" == typeof r5.type && (i6 = r5.__e)) {
    var t5 = r5.__np, f5 = r5.props;
    if (t5) {
      var o4 = i6.U;
      if (o4) for (var e4 in o4) {
        var u5 = o4[e4];
        if (void 0 !== u5 && !(e4 in t5)) {
          u5.d();
          o4[e4] = void 0;
        }
      }
      else i6.U = o4 = {};
      for (var a5 in t5) {
        var c5 = o4[a5], s6 = t5[a5];
        if (void 0 === c5) {
          c5 = _4(i6, a5, s6, f5);
          o4[a5] = c5;
        } else c5.o(s6, f5);
      }
    }
  }
  n3(r5);
});
function _4(n3, r5, i6, t5) {
  var f5 = r5 in n3 && void 0 === n3.ownerSVGElement, o4 = d3(i6);
  return { o: function(n4, r6) {
    o4.value = n4;
    t5 = r6;
  }, d: E2(function() {
    var i7 = o4.value.value;
    if (t5[r5] !== i7) {
      t5[r5] = i7;
      if (f5) n3[r5] = i7;
      else if (i7) n3.setAttribute(r5, i7);
      else n3.removeAttribute(r5);
    }
  }) };
}
l4("unmount", function(n3, r5) {
  if ("string" == typeof r5.type) {
    var i6 = r5.__e;
    if (i6) {
      var t5 = i6.U;
      if (t5) {
        i6.U = void 0;
        for (var f5 in t5) {
          var o4 = t5[f5];
          if (o4) o4.d();
        }
      }
    }
  } else {
    var e4 = r5.__c;
    if (e4) {
      var u5 = e4.__$u;
      if (u5) {
        e4.__$u = void 0;
        u5.d();
      }
    }
  }
  n3(r5);
});
l4("__h", function(n3, r5, i6, t5) {
  if (t5 < 3 || 9 === t5) r5.__$f |= 2;
  n3(r5, i6, t5);
});
C.prototype.shouldComponentUpdate = function(n3, r5) {
  var i6 = this.__$u;
  if (!(i6 && void 0 !== i6.s || 4 & this.__$f)) return true;
  if (3 & this.__$f) return true;
  for (var t5 in r5) return true;
  for (var f5 in n3) if ("__source" !== f5 && n3[f5] !== this.props[f5]) return true;
  for (var o4 in this.props) if (!(o4 in n3)) return true;
  return false;
};
function useSignal(n3) {
  return T2(function() {
    return d3(n3);
  }, []);
}

// packages/interactivity/build-module/directives.mjs
init_preact_module();

// packages/interactivity/build-module/namespaces.mjs
var namespaceStack = [];
var getNamespace = () => namespaceStack.slice(-1)[0];
var setNamespace = (namespace) => {
  namespaceStack.push(namespace);
};
var resetNamespace = () => {
  namespaceStack.pop();
};

// packages/interactivity/build-module/scopes.mjs
var scopeStack = [];
var getScope = () => scopeStack.slice(-1)[0];
var setScope = (scope) => {
  scopeStack.push(scope);
};
var resetScope = () => {
  scopeStack.pop();
};
var throwNotInScope = (method) => {
  throw Error(
    `Cannot call \`${method}()\` when there is no scope. If you are using an async function, please consider using a generator instead. If you are using some sort of async callbacks, like \`setTimeout\`, please wrap the callback with \`withScope(callback)\`.`
  );
};
var getContext = (namespace) => {
  const scope = getScope();
  if (true) {
    if (!scope) {
      throwNotInScope("getContext");
    }
  }
  return scope.context[namespace || getNamespace()];
};
var getElement = () => {
  const scope = getScope();
  let deepReadOnlyOptions = {};
  if (true) {
    if (!scope) {
      throwNotInScope("getElement");
    }
    deepReadOnlyOptions = {
      errorMessage: "Don't mutate the attributes from `getElement`, use `data-wp-bind` to modify the attributes of an element instead."
    };
  }
  const { ref, attributes } = scope;
  return Object.freeze({
    ref: ref.current,
    attributes: deepReadOnly(attributes, deepReadOnlyOptions)
  });
};
var navigationContextSignal = d3(0);
function getServerContext(namespace) {
  const scope = getScope();
  if (true) {
    if (!scope) {
      throwNotInScope("getServerContext");
    }
  }
  getServerContext.subscribe = navigationContextSignal.value;
  return deepClone(scope.serverContext[namespace || getNamespace()]);
}
getServerContext.subscribe = 0;

// packages/interactivity/build-module/utils.mjs
var afterNextFrame = (callback) => {
  return new Promise((resolve2) => {
    const done = () => {
      clearTimeout(timeout);
      window.cancelAnimationFrame(raf);
      setTimeout(() => {
        callback();
        resolve2();
      });
    };
    const timeout = setTimeout(done, 100);
    const raf = window.requestAnimationFrame(done);
  });
};
var splitTask = typeof window.scheduler?.yield === "function" ? window.scheduler.yield.bind(window.scheduler) : () => {
  return new Promise((resolve2) => {
    setTimeout(resolve2, 0);
  });
};
var onDOMReady = (callback) => {
  const [navigation] = performance.getEntriesByType("navigation");
  if (navigation.domContentLoadedEventStart > 0) {
    callback();
  } else {
    document.addEventListener("DOMContentLoaded", callback);
  }
};
function createFlusher(compute, notify) {
  let flush = () => void 0;
  const dispose = E2(function() {
    flush = this.c.bind(this);
    this.x = compute;
    this.c = notify;
    return compute();
  });
  return { flush, dispose };
}
function useSignalEffect(callback) {
  y2(() => {
    let eff = null;
    let isExecuting = false;
    const notify = async () => {
      if (eff && !isExecuting) {
        isExecuting = true;
        await afterNextFrame(eff.flush);
        isExecuting = false;
      }
    };
    eff = createFlusher(callback, notify);
    return eff.dispose;
  }, []);
}
function withScope(func) {
  const scope = getScope();
  const ns = getNamespace();
  let wrapped;
  if (func?.constructor?.name === "GeneratorFunction") {
    wrapped = async (...args) => {
      const gen = func(...args);
      let value;
      let it;
      let error;
      while (true) {
        setNamespace(ns);
        setScope(scope);
        try {
          it = error ? gen.throw(error) : gen.next(value);
          error = void 0;
        } catch (e4) {
          throw e4;
        } finally {
          resetScope();
          resetNamespace();
        }
        try {
          value = await it.value;
        } catch (e4) {
          error = e4;
        }
        if (it.done) {
          if (error) {
            throw error;
          } else {
            break;
          }
        }
      }
      return value;
    };
  } else {
    wrapped = (...args) => {
      setNamespace(ns);
      setScope(scope);
      try {
        return func(...args);
      } finally {
        resetNamespace();
        resetScope();
      }
    };
  }
  const syncAware = func;
  if (syncAware.sync) {
    const syncAwareWrapped = wrapped;
    syncAwareWrapped.sync = true;
    return syncAwareWrapped;
  }
  return wrapped;
}
function useWatch(callback) {
  useSignalEffect(withScope(callback));
}
function useInit(callback) {
  y2(withScope(callback), []);
}
function useEffect(callback, inputs) {
  y2(withScope(callback), inputs);
}
function useLayoutEffect(callback, inputs) {
  _2(withScope(callback), inputs);
}
function useCallback(callback, inputs) {
  return q2(withScope(callback), inputs);
}
function useMemo(factory, inputs) {
  return T2(withScope(factory), inputs);
}
var createRootFragment = (parent, replaceNode) => {
  replaceNode = [].concat(replaceNode);
  const sibling = replaceNode[replaceNode.length - 1].nextSibling;
  function insert(child, root) {
    parent.insertBefore(child, root || sibling);
  }
  return parent.__k = {
    nodeType: 1,
    parentNode: parent,
    firstChild: replaceNode[0],
    childNodes: replaceNode,
    insertBefore: insert,
    appendChild: insert,
    removeChild(c5) {
      parent.removeChild(c5);
    },
    contains(c5) {
      parent.contains(c5);
    }
  };
};
function kebabToCamelCase(str) {
  return str.replace(/^-+|-+$/g, "").toLowerCase().replace(/-([a-z])/g, function(_match, group1) {
    return group1.toUpperCase();
  });
}
var logged = /* @__PURE__ */ new Set();
var warn = (message) => {
  if (true) {
    if (logged.has(message)) {
      return;
    }
    console.warn(message);
    try {
      throw Error(message);
    } catch (e4) {
    }
    logged.add(message);
  }
};
var isPlainObject = (candidate) => Boolean(
  candidate && typeof candidate === "object" && candidate.constructor === Object
);
function withSyncEvent(callback) {
  const syncAware = callback;
  syncAware.sync = true;
  return syncAware;
}
var readOnlyMap = /* @__PURE__ */ new WeakMap();
var createDeepReadOnlyHandlers = (errorMessage) => {
  const handleError = () => {
    if (true) {
      warn(errorMessage);
    }
    return false;
  };
  return {
    get(target, prop) {
      const value = target[prop];
      if (value && typeof value === "object") {
        return deepReadOnly(value, { errorMessage });
      }
      return value;
    },
    set: handleError,
    deleteProperty: handleError,
    defineProperty: handleError
  };
};
function deepReadOnly(obj, options) {
  const errorMessage = options?.errorMessage ?? "Cannot modify read-only object";
  if (!readOnlyMap.has(obj)) {
    const handlers = createDeepReadOnlyHandlers(errorMessage);
    readOnlyMap.set(obj, new Proxy(obj, handlers));
  }
  return readOnlyMap.get(obj);
}
var navigationSignal = d3(0);
var sessionId = Math.random().toString(36).slice(2);
function deepClone(source) {
  if (isPlainObject(source)) {
    return Object.fromEntries(
      Object.entries(source).map(([key, value]) => [
        key,
        deepClone(value)
      ])
    );
  }
  if (Array.isArray(source)) {
    return source.map((i6) => deepClone(i6));
  }
  return source;
}

// packages/interactivity/build-module/hooks.mjs
init_preact_module();

// packages/interactivity/build-module/proxies/registry.mjs
var objToProxy = /* @__PURE__ */ new WeakMap();
var proxyToObj = /* @__PURE__ */ new WeakMap();
var proxyToNs = /* @__PURE__ */ new WeakMap();
var supported = /* @__PURE__ */ new Set([Object, Array]);
var createProxy = (namespace, obj, handlers) => {
  if (!shouldProxy(obj)) {
    throw Error("This object cannot be proxified.");
  }
  if (!objToProxy.has(obj)) {
    const proxy = new Proxy(obj, handlers);
    objToProxy.set(obj, proxy);
    proxyToObj.set(proxy, obj);
    proxyToNs.set(proxy, namespace);
  }
  return objToProxy.get(obj);
};
var getProxyFromObject = (obj) => objToProxy.get(obj);
var getNamespaceFromProxy = (proxy) => proxyToNs.get(proxy);
var shouldProxy = (candidate) => {
  if (typeof candidate !== "object" || candidate === null) {
    return false;
  }
  return !proxyToNs.has(candidate) && supported.has(candidate.constructor);
};
var getObjectFromProxy = (proxy) => proxyToObj.get(proxy);

// packages/interactivity/build-module/proxies/signals.mjs
var NO_SCOPE = {};
var PropSignal = class {
  /**
   * Proxy that holds the property this PropSignal is associated with.
   */
  owner;
  /**
   * Relation of computeds by scope. These computeds are read-only signals
   * that depend on whether the property is a value or a getter and,
   * therefore, can return different values depending on the scope in which
   * the getter is accessed.
   */
  computedsByScope;
  /**
   * Signal with the value assigned to the related property.
   */
  valueSignal;
  /**
   * Signal with the getter assigned to the related property.
   */
  getterSignal;
  /**
   * Pending getter to be consolidated.
   */
  pendingGetter;
  /**
   * Structure that manages reactivity for a property in a state object, using
   * signals to keep track of property value or getter modifications.
   *
   * @param owner Proxy that holds the property this instance is associated
   *              with.
   */
  constructor(owner) {
    this.owner = owner;
    this.computedsByScope = /* @__PURE__ */ new WeakMap();
  }
  /**
   * Changes the internal value. If a getter was set before, it is set to
   * `undefined`.
   *
   * @param value New value.
   */
  setValue(value) {
    this.update({ value });
  }
  /**
   * Changes the internal getter. If a value was set before, it is set to
   * `undefined`.
   *
   * @param getter New getter.
   */
  setGetter(getter) {
    this.update({ get: getter });
  }
  /**
   * Changes the internal getter asynchronously.
   *
   * The update is made in a microtask, which prevents issues with getters
   * accessing the state, and ensures the update occurs before any render.
   *
   * @param getter New getter.
   */
  setPendingGetter(getter) {
    this.pendingGetter = getter;
    queueMicrotask(() => this.consolidateGetter());
  }
  /**
   * Consolidate the pending value of the getter.
   */
  consolidateGetter() {
    const getter = this.pendingGetter;
    if (getter) {
      this.pendingGetter = void 0;
      this.update({ get: getter });
    }
  }
  /**
   * Returns the computed that holds the result of evaluating the prop in the
   * current scope.
   *
   * These computeds are read-only signals that depend on whether the property
   * is a value or a getter and, therefore, can return different values
   * depending on the scope in which the getter is accessed.
   *
   * @return Computed that depends on the scope.
   */
  getComputed() {
    const scope = getScope() || NO_SCOPE;
    if (!this.valueSignal && !this.getterSignal) {
      this.update({});
    }
    if (this.pendingGetter) {
      this.consolidateGetter();
    }
    if (!this.computedsByScope.has(scope)) {
      const callback = () => {
        const getter = this.getterSignal?.value;
        return getter ? getter.call(this.owner) : this.valueSignal?.value;
      };
      setNamespace(getNamespaceFromProxy(this.owner));
      this.computedsByScope.set(
        scope,
        w3(withScope(callback))
      );
      resetNamespace();
    }
    return this.computedsByScope.get(scope);
  }
  /**
   *  Updates the internal signals for the value and the getter of the
   *  corresponding prop.
   *
   * @param param0
   * @param param0.get   New getter.
   * @param param0.value New value.
   */
  update({ get, value }) {
    if (!this.valueSignal) {
      this.valueSignal = d3(value);
      this.getterSignal = d3(get);
    } else if (value !== this.valueSignal.peek() || get !== this.getterSignal.peek()) {
      r3(() => {
        this.valueSignal.value = value;
        this.getterSignal.value = get;
      });
    }
  }
};

// packages/interactivity/build-module/proxies/state.mjs
var wellKnownSymbols = new Set(
  Object.getOwnPropertyNames(Symbol).map((key) => Symbol[key]).filter((value) => typeof value === "symbol")
);
var proxyToProps = /* @__PURE__ */ new WeakMap();
var hasPropSignal = (proxy, key) => proxyToProps.has(proxy) && proxyToProps.get(proxy).has(key);
var getPropSignal = (proxy, key, initial) => {
  if (!proxyToProps.has(proxy)) {
    proxyToProps.set(proxy, /* @__PURE__ */ new Map());
  }
  key = typeof key === "number" ? `${key}` : key;
  const props = proxyToProps.get(proxy);
  if (!props.has(key)) {
    const ns = getNamespaceFromProxy(proxy);
    const prop = new PropSignal(proxy);
    props.set(key, prop);
    if (initial) {
      const { get, value } = initial;
      if (get) {
        prop.setGetter(get);
      } else {
        prop.setValue(
          shouldProxy(value) ? proxifyState(ns, value) : value
        );
      }
    }
  }
  return props.get(key);
};
var objToIterable = /* @__PURE__ */ new WeakMap();
var peeking = false;
var PENDING_GETTER = /* @__PURE__ */ Symbol("PENDING_GETTER");
var stateHandlers = {
  get(target, key, receiver) {
    if (peeking || !target.hasOwnProperty(key) && key in target || typeof key === "symbol" && wellKnownSymbols.has(key)) {
      return Reflect.get(target, key, receiver);
    }
    const desc = Object.getOwnPropertyDescriptor(target, key);
    const prop = getPropSignal(receiver, key, desc);
    const result = prop.getComputed().value;
    if (result === PENDING_GETTER) {
      throw PENDING_GETTER;
    }
    if (typeof result === "function") {
      const ns = getNamespaceFromProxy(receiver);
      return (...args) => {
        setNamespace(ns);
        try {
          return result.call(receiver, ...args);
        } finally {
          resetNamespace();
        }
      };
    }
    return result;
  },
  set(target, key, value, receiver) {
    setNamespace(getNamespaceFromProxy(receiver));
    try {
      return Reflect.set(target, key, value, receiver);
    } finally {
      resetNamespace();
    }
  },
  defineProperty(target, key, desc) {
    const isNew = !(key in target);
    const result = Reflect.defineProperty(target, key, desc);
    if (result) {
      const receiver = getProxyFromObject(target);
      const prop = getPropSignal(receiver, key);
      const { get, value } = desc;
      if (get) {
        prop.setGetter(get);
      } else {
        const ns = getNamespaceFromProxy(receiver);
        prop.setValue(
          shouldProxy(value) ? proxifyState(ns, value) : value
        );
      }
      if (isNew && objToIterable.has(target)) {
        objToIterable.get(target).value++;
      }
      if (Array.isArray(target) && proxyToProps.get(receiver)?.has("length")) {
        const length = getPropSignal(receiver, "length");
        length.setValue(target.length);
      }
    }
    return result;
  },
  deleteProperty(target, key) {
    const result = Reflect.deleteProperty(target, key);
    if (result) {
      const prop = getPropSignal(getProxyFromObject(target), key);
      prop.setValue(void 0);
      if (objToIterable.has(target)) {
        objToIterable.get(target).value++;
      }
    }
    return result;
  },
  ownKeys(target) {
    if (!objToIterable.has(target)) {
      objToIterable.set(target, d3(0));
    }
    objToIterable._ = objToIterable.get(target).value;
    return Reflect.ownKeys(target);
  }
};
var proxifyState = (namespace, obj) => {
  return createProxy(namespace, obj, stateHandlers);
};
var peek = (obj, key) => {
  peeking = true;
  try {
    return obj[key];
  } finally {
    peeking = false;
  }
};
var deepMergeRecursive = (target, source, override = true) => {
  if (!(isPlainObject(target) && isPlainObject(source))) {
    return;
  }
  let hasNewKeys = false;
  for (const key in source) {
    const isNew = !(key in target);
    hasNewKeys = hasNewKeys || isNew;
    const desc = Object.getOwnPropertyDescriptor(source, key);
    const proxy = getProxyFromObject(target);
    const propSignal = !!proxy && hasPropSignal(proxy, key) && getPropSignal(proxy, key);
    if (typeof desc.get === "function" || typeof desc.set === "function") {
      if (override || isNew) {
        Object.defineProperty(target, key, {
          ...desc,
          configurable: true,
          enumerable: true
        });
        if (desc.get && propSignal) {
          propSignal.setPendingGetter(desc.get);
        }
      }
    } else if (isPlainObject(source[key])) {
      const targetValue = Object.getOwnPropertyDescriptor(target, key)?.value;
      if (isNew || override && !isPlainObject(targetValue)) {
        target[key] = {};
        if (propSignal) {
          const ns = getNamespaceFromProxy(proxy);
          propSignal.setValue(
            proxifyState(ns, target[key])
          );
        }
        deepMergeRecursive(target[key], source[key], override);
      } else if (isPlainObject(targetValue)) {
        deepMergeRecursive(target[key], source[key], override);
      }
    } else if (override || isNew) {
      Object.defineProperty(target, key, desc);
      if (propSignal) {
        const { value } = desc;
        const ns = getNamespaceFromProxy(proxy);
        propSignal.setValue(
          shouldProxy(value) ? proxifyState(ns, value) : value
        );
      }
    }
  }
  if (hasNewKeys && objToIterable.has(target)) {
    objToIterable.get(target).value++;
  }
};
var deepMerge = (target, source, override = true) => r3(
  () => deepMergeRecursive(
    getObjectFromProxy(target) || target,
    source,
    override
  )
);

// packages/interactivity/build-module/proxies/store.mjs
var storeRoots = /* @__PURE__ */ new WeakSet();
var storeHandlers = {
  get: (target, key, receiver) => {
    const result = Reflect.get(target, key);
    const ns = getNamespaceFromProxy(receiver);
    if (typeof result === "undefined" && storeRoots.has(receiver)) {
      const obj = {};
      Reflect.set(target, key, obj);
      return proxifyStore(ns, obj, false);
    }
    if (typeof result === "function") {
      setNamespace(ns);
      const scoped = withScope(result);
      resetNamespace();
      return scoped;
    }
    if (isPlainObject(result) && shouldProxy(result)) {
      return proxifyStore(ns, result, false);
    }
    return result;
  }
};
var proxifyStore = (namespace, obj, isRoot = true) => {
  const proxy = createProxy(namespace, obj, storeHandlers);
  if (proxy && isRoot) {
    storeRoots.add(proxy);
  }
  return proxy;
};

// packages/interactivity/build-module/proxies/context.mjs
var contextObjectToProxy = /* @__PURE__ */ new WeakMap();
var contextObjectToFallback = /* @__PURE__ */ new WeakMap();
var contextProxies = /* @__PURE__ */ new WeakSet();
var descriptor = Reflect.getOwnPropertyDescriptor;
var contextHandlers = {
  get: (target, key) => {
    const fallback = contextObjectToFallback.get(target);
    const currentProp = target[key];
    return key in target ? currentProp : fallback[key];
  },
  set: (target, key, value) => {
    const fallback = contextObjectToFallback.get(target);
    const obj = key in target || !(key in fallback) ? target : fallback;
    obj[key] = value;
    return true;
  },
  ownKeys: (target) => [
    .../* @__PURE__ */ new Set([
      ...Object.keys(contextObjectToFallback.get(target)),
      ...Object.keys(target)
    ])
  ],
  getOwnPropertyDescriptor: (target, key) => descriptor(target, key) || descriptor(contextObjectToFallback.get(target), key),
  has: (target, key) => Reflect.has(target, key) || Reflect.has(contextObjectToFallback.get(target), key)
};
var proxifyContext = (current, inherited = {}) => {
  if (contextProxies.has(current)) {
    throw Error("This object cannot be proxified.");
  }
  contextObjectToFallback.set(current, inherited);
  if (!contextObjectToProxy.has(current)) {
    const proxy = new Proxy(current, contextHandlers);
    contextObjectToProxy.set(current, proxy);
    contextProxies.add(proxy);
  }
  return contextObjectToProxy.get(current);
};

// packages/interactivity/build-module/store.mjs
var stores = /* @__PURE__ */ new Map();
var rawStores = /* @__PURE__ */ new Map();
var storeLocks = /* @__PURE__ */ new Map();
var storeConfigs = /* @__PURE__ */ new Map();
var serverStates = /* @__PURE__ */ new Map();
var getConfig = (namespace) => storeConfigs.get(namespace || getNamespace()) || {};
function getServerState(namespace) {
  const ns = namespace || getNamespace();
  if (!serverStates.has(ns)) {
    serverStates.set(ns, {});
  }
  getServerState.subscribe = navigationSignal.value;
  return deepClone(serverStates.get(ns));
}
getServerState.subscribe = 0;
var universalUnlock = "I acknowledge that using a private store means my plugin will inevitably break on the next store release.";
function store(namespace, { state = {}, ...block } = {}, { lock = false } = {}) {
  if (!stores.has(namespace)) {
    if (lock !== universalUnlock) {
      storeLocks.set(namespace, lock);
    }
    const rawStore = {
      state: proxifyState(
        namespace,
        isPlainObject(state) ? state : {}
      ),
      ...block
    };
    const proxifiedStore = proxifyStore(namespace, rawStore);
    rawStores.set(namespace, rawStore);
    stores.set(namespace, proxifiedStore);
  } else {
    if (lock !== universalUnlock && !storeLocks.has(namespace)) {
      storeLocks.set(namespace, lock);
    } else {
      const storeLock = storeLocks.get(namespace);
      const isLockValid = lock === universalUnlock || lock !== true && lock === storeLock;
      if (!isLockValid) {
        if (!storeLock) {
          throw Error("Cannot lock a public store");
        } else {
          throw Error(
            "Cannot unlock a private store with an invalid lock code"
          );
        }
      }
    }
    const target = rawStores.get(namespace);
    deepMerge(target, block);
    deepMerge(target.state, state);
  }
  return stores.get(namespace);
}
var parseServerData = (dom = document) => {
  const jsonDataScriptTag = (
    // Preferred Script Module data passing form
    dom.getElementById(
      "wp-script-module-data-@wordpress/interactivity"
    ) ?? // Legacy form
    dom.getElementById("wp-interactivity-data")
  );
  if (jsonDataScriptTag?.textContent) {
    try {
      return JSON.parse(jsonDataScriptTag.textContent);
    } catch {
    }
  }
  return {};
};
var populateServerData = (data) => {
  serverStates.clear();
  storeConfigs.clear();
  if (isPlainObject(data?.state)) {
    Object.entries(data.state).forEach(([namespace, state]) => {
      const st = store(namespace, {}, { lock: universalUnlock });
      deepMerge(st.state, state, false);
      serverStates.set(namespace, state);
    });
  }
  if (isPlainObject(data?.config)) {
    Object.entries(data.config).forEach(([namespace, config]) => {
      storeConfigs.set(namespace, config);
    });
  }
  if (isPlainObject(data?.derivedStateClosures)) {
    Object.entries(data.derivedStateClosures).forEach(
      ([namespace, paths]) => {
        const st = store(
          namespace,
          {},
          { lock: universalUnlock }
        );
        paths.forEach((path) => {
          const pathParts = path.split(".");
          const prop = pathParts.splice(-1, 1)[0];
          const parent = pathParts.reduce(
            (prev, key) => peek(prev, key),
            st
          );
          const desc = Object.getOwnPropertyDescriptor(
            parent,
            prop
          );
          if (isPlainObject(desc?.value)) {
            parent[prop] = PENDING_GETTER;
          }
        });
      }
    );
  }
};

// packages/interactivity/build-module/hooks.mjs
function isNonDefaultDirectiveSuffix(entry) {
  return entry.suffix !== null;
}
function isDefaultDirectiveSuffix(entry) {
  return entry.suffix === null;
}
var context = X({ client: {}, server: {} });
var directiveCallbacks = {};
var directivePriorities = {};
var directive = (name, callback, { priority = 10 } = {}) => {
  directiveCallbacks[name] = callback;
  directivePriorities[name] = priority;
};
var resolve = (path, namespace) => {
  if (!namespace) {
    warn(
      `Namespace missing for "${path}". The value for that path won't be resolved.`
    );
    return;
  }
  let resolvedStore = stores.get(namespace);
  if (typeof resolvedStore === "undefined") {
    resolvedStore = store(
      namespace,
      {},
      {
        lock: universalUnlock
      }
    );
  }
  const current = {
    ...resolvedStore,
    context: getScope().context[namespace]
  };
  try {
    const pathParts = path.split(".");
    return pathParts.reduce((acc, key) => acc[key], current);
  } catch (e4) {
    if (e4 === PENDING_GETTER) {
      return PENDING_GETTER;
    }
  }
};
var getEvaluate = ({ scope }) => (
  // TODO: When removing the temporarily remaining `value( ...args )` call below, remove the `...args` parameter too.
  ((entry, ...args) => {
    let { value: path, namespace } = entry;
    if (typeof path !== "string") {
      throw new Error("The `value` prop should be a string path");
    }
    const hasNegationOperator = path[0] === "!" && !!(path = path.slice(1));
    setScope(scope);
    const value = resolve(path, namespace);
    if (typeof value === "function") {
      if (hasNegationOperator) {
        warn(
          "Using a function with a negation operator is deprecated and will stop working in WordPress 6.9. Please use derived state instead."
        );
        const functionResult = !value(...args);
        resetScope();
        return functionResult;
      }
      resetScope();
      const wrappedFunction = (...functionArgs) => {
        setScope(scope);
        const functionResult = value(...functionArgs);
        resetScope();
        return functionResult;
      };
      if (value.sync) {
        const syncAwareFunction = wrappedFunction;
        syncAwareFunction.sync = true;
      }
      return wrappedFunction;
    }
    const result = value;
    resetScope();
    return hasNegationOperator && value !== PENDING_GETTER ? !result : result;
  })
);
var getPriorityLevels = (directives) => {
  const byPriority = Object.keys(directives).reduce((obj, name) => {
    if (directiveCallbacks[name]) {
      const priority = directivePriorities[name];
      (obj[priority] = obj[priority] || []).push(name);
    }
    return obj;
  }, {});
  return Object.entries(byPriority).sort(([p1], [p22]) => parseInt(p1) - parseInt(p22)).map(([, arr]) => arr);
};
var Directives = ({
  directives,
  priorityLevels: [currentPriorityLevel, ...nextPriorityLevels],
  element,
  originalProps,
  previousScope
}) => {
  const scope = A2({}).current;
  scope.evaluate = q2(getEvaluate({ scope }), []);
  const { client, server } = x2(context);
  scope.context = client;
  scope.serverContext = server;
  scope.ref = previousScope?.ref || A2(null);
  element = W(element, { ref: scope.ref });
  scope.attributes = element.props;
  const children = nextPriorityLevels.length > 0 ? k(Directives, {
    directives,
    priorityLevels: nextPriorityLevels,
    element,
    originalProps,
    previousScope: scope
  }) : element;
  const props = { ...originalProps, children };
  const directiveArgs = {
    directives,
    props,
    element,
    context,
    evaluate: scope.evaluate
  };
  setScope(scope);
  for (const directiveName of currentPriorityLevel) {
    const wrapper = directiveCallbacks[directiveName]?.(directiveArgs);
    if (wrapper !== void 0) {
      props.children = wrapper;
    }
  }
  resetScope();
  return props.children;
};
var old = l.vnode;
l.vnode = (vnode) => {
  if (vnode.props.__directives) {
    const props = vnode.props;
    const directives = props.__directives;
    if (directives.key) {
      vnode.key = directives.key.find(isDefaultDirectiveSuffix).value;
    }
    delete props.__directives;
    const priorityLevels = getPriorityLevels(directives);
    if (priorityLevels.length > 0) {
      vnode.props = {
        directives,
        priorityLevels,
        originalProps: props,
        type: vnode.type,
        element: k(vnode.type, props),
        top: true
      };
      vnode.type = Directives;
    }
  }
  if (old) {
    old(vnode);
  }
};

// packages/interactivity/build-module/directives.mjs
var warnUniqueIdWithTwoHyphens = (prefix, suffix, uniqueId) => {
  if (true) {
    warn(
      `The usage of data-wp-${prefix}--${suffix}${uniqueId ? `--${uniqueId}` : ""} (two hyphens for unique ID) is deprecated and will stop working in WordPress 7.1. Please use data-wp-${prefix}${uniqueId ? `--${suffix}---${uniqueId}` : `---${suffix}`} (three hyphens for unique ID) from now on.`
    );
  }
};
var warnUniqueIdNotSupported = (prefix, uniqueId) => {
  if (true) {
    warn(
      `Unique IDs are not supported for the data-wp-${prefix} directive. Ignoring the directive with unique ID "${uniqueId}".`
    );
  }
};
var warnWithSyncEvent = (wrongPrefix, rightPrefix) => {
  if (true) {
    warn(
      `The usage of data-wp-${wrongPrefix} is deprecated and will stop working in WordPress 7.0. Please, use data-wp-${rightPrefix} with the withSyncEvent() helper from now on.`
    );
  }
};
function wrapEventAsync(event) {
  const handler = {
    get(target, prop, receiver) {
      const value = target[prop];
      switch (prop) {
        case "currentTarget":
          if (true) {
            warn(
              `Accessing the synchronous event.${prop} property in a store action without wrapping it in withSyncEvent() is deprecated and will stop working in WordPress 7.0. Please wrap the store action in withSyncEvent().`
            );
          }
          break;
        case "preventDefault":
        case "stopImmediatePropagation":
        case "stopPropagation":
          if (true) {
            warn(
              `Using the synchronous event.${prop}() function in a store action without wrapping it in withSyncEvent() is deprecated and will stop working in WordPress 7.0. Please wrap the store action in withSyncEvent().`
            );
          }
          break;
      }
      if (value instanceof Function) {
        return function(...args) {
          return value.apply(
            this === receiver ? target : this,
            args
          );
        };
      }
      return value;
    }
  };
  return new Proxy(event, handler);
}
var newRule = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g;
var ruleClean = /\/\*[^]*?\*\/|  +/g;
var ruleNewline = /\n+/g;
var empty = " ";
var cssStringToObject = (val) => {
  const tree = [{}];
  let block, left;
  while (block = newRule.exec(val.replace(ruleClean, ""))) {
    if (block[4]) {
      tree.shift();
    } else if (block[3]) {
      left = block[3].replace(ruleNewline, empty).trim();
      tree.unshift(tree[0][left] = tree[0][left] || {});
    } else {
      tree[0][block[1]] = block[2].replace(ruleNewline, empty).trim();
    }
  }
  return tree[0];
};
var getGlobalEventDirective = (type) => {
  return ({ directives, evaluate }) => {
    directives[`on-${type}`].filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
      const suffixParts = entry.suffix.split("--", 2);
      const eventName = suffixParts[0];
      if (true) {
        if (suffixParts[1]) {
          warnUniqueIdWithTwoHyphens(
            `on-${type}`,
            suffixParts[0],
            suffixParts[1]
          );
        }
      }
      useInit(() => {
        const cb = (event) => {
          const result = evaluate(entry);
          if (typeof result === "function") {
            if (!result?.sync) {
              event = wrapEventAsync(event);
            }
            result(event);
          }
        };
        const globalVar = type === "window" ? window : document;
        globalVar.addEventListener(eventName, cb);
        return () => globalVar.removeEventListener(eventName, cb);
      });
    });
  };
};
var evaluateItemKey = (inheritedValue, namespace, item, itemProp, eachKey) => {
  const clientContextWithItem = {
    ...inheritedValue.client,
    [namespace]: {
      ...inheritedValue.client[namespace],
      [itemProp]: item
    }
  };
  const scope = {
    ...getScope(),
    context: clientContextWithItem,
    serverContext: inheritedValue.server
  };
  return eachKey ? getEvaluate({ scope })(eachKey) : item;
};
var useItemContexts = function* (inheritedValue, namespace, items, itemProp, eachKey) {
  const { current: itemContexts } = A2(/* @__PURE__ */ new Map());
  for (const item of items) {
    const key = evaluateItemKey(
      inheritedValue,
      namespace,
      item,
      itemProp,
      eachKey
    );
    if (!itemContexts.has(key)) {
      itemContexts.set(
        key,
        proxifyContext(
          proxifyState(namespace, {
            // Inits the item prop in the context to shadow it in case
            // it was inherited from the parent context. The actual
            // value is set in the `wp-each` directive later on.
            [itemProp]: void 0
          }),
          inheritedValue.client[namespace]
        )
      );
    }
    yield [item, itemContexts.get(key), key];
  }
};
var getGlobalAsyncEventDirective = (type) => {
  return ({ directives, evaluate }) => {
    directives[`on-async-${type}`].filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
      if (true) {
        warnWithSyncEvent(`on-async-${type}`, `on-${type}`);
      }
      const eventName = entry.suffix.split("--", 1)[0];
      useInit(() => {
        const cb = async (event) => {
          await splitTask();
          const result = evaluate(entry);
          if (typeof result === "function") {
            result(event);
          }
        };
        const globalVar = type === "window" ? window : document;
        globalVar.addEventListener(eventName, cb, {
          passive: true
        });
        return () => globalVar.removeEventListener(eventName, cb);
      });
    });
  };
};
var routerRegions = /* @__PURE__ */ new Map();
var directives_default = () => {
  directive(
    "context",
    ({
      directives: { context: context2 },
      props: { children },
      context: inheritedContext
    }) => {
      const entries = context2.filter(isDefaultDirectiveSuffix).reverse();
      if (!entries.length) {
        if (true) {
          warn(
            "The usage of data-wp-context--unique-id (two hyphens) is not supported. To add a unique ID to the directive, please use data-wp-context---unique-id (three hyphens) instead."
          );
        }
        return;
      }
      const { Provider } = inheritedContext;
      const { client: inheritedClient, server: inheritedServer } = x2(inheritedContext);
      const client = A2({});
      const server = {};
      const result = {
        client: { ...inheritedClient },
        server: { ...inheritedServer }
      };
      const namespaces2 = /* @__PURE__ */ new Set();
      entries.forEach(({ value, namespace, uniqueId }) => {
        if (!isPlainObject(value)) {
          if (true) {
            warn(
              `The value of data-wp-context${uniqueId ? `---${uniqueId}` : ""} on the ${namespace} namespace must be a valid stringified JSON object.`
            );
          }
          return;
        }
        if (!client.current[namespace]) {
          client.current[namespace] = proxifyState(namespace, {});
        }
        deepMerge(
          client.current[namespace],
          deepClone(value),
          false
        );
        server[namespace] = value;
        namespaces2.add(namespace);
      });
      namespaces2.forEach((namespace) => {
        result.client[namespace] = proxifyContext(
          client.current[namespace],
          inheritedClient[namespace]
        );
        result.server[namespace] = proxifyContext(
          server[namespace],
          inheritedServer[namespace]
        );
      });
      return k(Provider, { value: result }, children);
    },
    { priority: 5 }
  );
  directive("watch", ({ directives: { watch: watch2 }, evaluate }) => {
    watch2.forEach((entry) => {
      if (true) {
        if (entry.suffix) {
          warnUniqueIdWithTwoHyphens("watch", entry.suffix);
        }
      }
      useWatch(() => {
        let start;
        if (false) {
          if (true) {
            start = performance.now();
          }
        }
        let result = evaluate(entry);
        if (typeof result === "function") {
          result = result();
        }
        if (false) {
          if (true) {
            performance.measure(
              `interactivity api watch ${entry.namespace}`,
              {
                start,
                end: performance.now(),
                detail: {
                  devtools: {
                    track: `IA: watch ${entry.namespace}`
                  }
                }
              }
            );
          }
        }
        return result;
      });
    });
  });
  directive("init", ({ directives: { init }, evaluate }) => {
    init.forEach((entry) => {
      if (true) {
        if (entry.suffix) {
          warnUniqueIdWithTwoHyphens("init", entry.suffix);
        }
      }
      useInit(() => {
        let start;
        if (false) {
          if (true) {
            start = performance.now();
          }
        }
        let result = evaluate(entry);
        if (typeof result === "function") {
          result = result();
        }
        if (false) {
          if (true) {
            performance.measure(
              `interactivity api init ${entry.namespace}`,
              {
                start,
                end: performance.now(),
                detail: {
                  devtools: {
                    track: `IA: init ${entry.namespace}`
                  }
                }
              }
            );
          }
        }
        return result;
      });
    });
  });
  directive("on", ({ directives: { on }, element, evaluate }) => {
    const events = /* @__PURE__ */ new Map();
    on.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
      const suffixParts = entry.suffix.split("--", 2);
      if (true) {
        if (suffixParts[1]) {
          warnUniqueIdWithTwoHyphens(
            "on",
            suffixParts[0],
            suffixParts[1]
          );
        }
      }
      if (!events.has(suffixParts[0])) {
        events.set(suffixParts[0], /* @__PURE__ */ new Set());
      }
      events.get(suffixParts[0]).add(entry);
    });
    events.forEach((entries, eventType) => {
      const existingHandler = element.props[`on${eventType}`];
      element.props[`on${eventType}`] = (event) => {
        if (existingHandler) {
          existingHandler(event);
        }
        entries.forEach((entry) => {
          let start;
          if (false) {
            if (true) {
              start = performance.now();
            }
          }
          const result = evaluate(entry);
          if (typeof result === "function") {
            if (!result?.sync) {
              event = wrapEventAsync(event);
            }
            result(event);
          }
          if (false) {
            if (true) {
              performance.measure(
                `interactivity api on ${entry.namespace}`,
                {
                  start,
                  end: performance.now(),
                  detail: {
                    devtools: {
                      track: `IA: on ${entry.namespace}`
                    }
                  }
                }
              );
            }
          }
        });
      };
    });
  });
  directive(
    "on-async",
    ({ directives: { "on-async": onAsync }, element, evaluate }) => {
      if (true) {
        warnWithSyncEvent("on-async", "on");
      }
      const events = /* @__PURE__ */ new Map();
      onAsync.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
        const event = entry.suffix.split("--", 1)[0];
        if (!events.has(event)) {
          events.set(event, /* @__PURE__ */ new Set());
        }
        events.get(event).add(entry);
      });
      events.forEach((entries, eventType) => {
        const existingHandler = element.props[`on${eventType}`];
        element.props[`on${eventType}`] = (event) => {
          if (existingHandler) {
            existingHandler(event);
          }
          entries.forEach(async (entry) => {
            await splitTask();
            const result = evaluate(entry);
            if (typeof result === "function") {
              result(event);
            }
          });
        };
      });
    }
  );
  directive("on-window", getGlobalEventDirective("window"));
  directive("on-document", getGlobalEventDirective("document"));
  directive("on-async-window", getGlobalAsyncEventDirective("window"));
  directive(
    "on-async-document",
    getGlobalAsyncEventDirective("document")
  );
  directive(
    "class",
    ({ directives: { class: classNames }, element, evaluate }) => {
      classNames.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
        const className = entry.uniqueId ? `${entry.suffix}---${entry.uniqueId}` : entry.suffix;
        let result = evaluate(entry);
        if (result === PENDING_GETTER) {
          return;
        }
        if (typeof result === "function") {
          result = result();
        }
        const currentClass = element.props.class || "";
        const classFinder = new RegExp(
          `(^|\\s)${className}(\\s|$)`,
          "g"
        );
        if (!result) {
          element.props.class = currentClass.replace(classFinder, " ").trim();
        } else if (!classFinder.test(currentClass)) {
          element.props.class = currentClass ? `${currentClass} ${className}` : className;
        }
        useInit(() => {
          if (!result) {
            element.ref.current.classList.remove(className);
          } else {
            element.ref.current.classList.add(className);
          }
        });
      });
    }
  );
  directive("style", ({ directives: { style }, element, evaluate }) => {
    style.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
      if (entry.uniqueId) {
        if (true) {
          warnUniqueIdNotSupported("style", entry.uniqueId);
        }
        return;
      }
      const styleProp = entry.suffix;
      let result = evaluate(entry);
      if (result === PENDING_GETTER) {
        return;
      }
      if (typeof result === "function") {
        result = result();
      }
      element.props.style = element.props.style || {};
      if (typeof element.props.style === "string") {
        element.props.style = cssStringToObject(element.props.style);
      }
      if (!result) {
        delete element.props.style[styleProp];
      } else {
        element.props.style[styleProp] = result;
      }
      useInit(() => {
        if (!result) {
          element.ref.current.style.removeProperty(styleProp);
        } else {
          element.ref.current.style.setProperty(styleProp, result);
        }
      });
    });
  });
  directive("bind", ({ directives: { bind }, element, evaluate }) => {
    bind.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
      if (entry.uniqueId) {
        if (true) {
          warnUniqueIdNotSupported("bind", entry.uniqueId);
        }
        return;
      }
      const attribute = entry.suffix;
      let result = evaluate(entry);
      if (result === PENDING_GETTER) {
        return;
      }
      if (typeof result === "function") {
        result = result();
      }
      element.props[attribute] = result;
      useInit(() => {
        const el = element.ref.current;
        if (attribute === "style") {
          if (typeof result === "string") {
            el.style.cssText = result;
          }
          return;
        } else if (attribute !== "width" && attribute !== "height" && attribute !== "href" && attribute !== "list" && attribute !== "form" && /*
        * The value for `tabindex` follows the parsing rules for an
        * integer. If that fails, or if the attribute isn't present, then
        * the browsers should "follow platform conventions to determine if
        * the element should be considered as a focusable area",
        * practically meaning that most elements get a default of `-1` (not
        * focusable), but several also get a default of `0` (focusable in
        * order after all elements with a positive `tabindex` value).
        *
        * @see https://html.spec.whatwg.org/#tabindex-value
        */
        attribute !== "tabIndex" && attribute !== "download" && attribute !== "rowSpan" && attribute !== "colSpan" && attribute !== "role" && attribute !== "popover" && attribute in el) {
          try {
            el[attribute] = result === null || result === void 0 ? "" : result;
            return;
          } catch (err) {
          }
        }
        if (result !== null && result !== void 0 && (result !== false || attribute[4] === "-")) {
          el.setAttribute(
            attribute,
            attribute === "popover" && result === true ? "" : result
          );
        } else {
          el.removeAttribute(attribute);
        }
      });
    });
  });
  directive(
    "ignore",
    ({
      element: {
        type: Type,
        props: { innerHTML, ...rest }
      }
    }) => {
      if (true) {
        warn(
          "The data-wp-ignore directive is deprecated and will be removed in version 7.0."
        );
      }
      const cached = T2(() => innerHTML, []);
      return k(Type, {
        dangerouslySetInnerHTML: { __html: cached },
        ...rest
      });
    }
  );
  directive("text", ({ directives: { text }, element, evaluate }) => {
    const entries = text.filter(isDefaultDirectiveSuffix);
    if (!entries.length) {
      if (true) {
        warn(
          "The usage of data-wp-text--suffix is not supported. Please use data-wp-text instead."
        );
      }
      return;
    }
    entries.forEach((entry) => {
      if (entry.uniqueId) {
        if (true) {
          warnUniqueIdNotSupported("text", entry.uniqueId);
        }
        return;
      }
      try {
        let result = evaluate(entry);
        if (result === PENDING_GETTER) {
          return;
        }
        if (typeof result === "function") {
          result = result();
        }
        element.props.children = typeof result === "object" ? null : result.toString();
      } catch (e4) {
        element.props.children = null;
      }
    });
  });
  directive("run", ({ directives: { run }, evaluate }) => {
    run.forEach((entry) => {
      if (true) {
        if (entry.suffix) {
          warnUniqueIdWithTwoHyphens("run", entry.suffix);
        }
      }
      let result = evaluate(entry);
      if (typeof result === "function") {
        result = result();
      }
      return result;
    });
  });
  directive(
    "each",
    ({
      directives: { each, "each-key": eachKey },
      context: inheritedContext,
      element,
      evaluate
    }) => {
      if (element.type !== "template") {
        if (true) {
          warn(
            "The data-wp-each directive can only be used on <template> elements."
          );
        }
        return;
      }
      const { Provider } = inheritedContext;
      const inheritedValue = x2(inheritedContext);
      const [entry] = each;
      const { namespace, suffix, uniqueId } = entry;
      if (each.length > 1) {
        if (true) {
          warn(
            "The usage of multiple data-wp-each directives on the same element is not supported. Please pick only one."
          );
        }
        return;
      }
      if (uniqueId) {
        if (true) {
          warnUniqueIdNotSupported("each", uniqueId);
        }
        return;
      }
      let iterable = evaluate(entry);
      if (iterable === PENDING_GETTER) {
        return;
      }
      if (typeof iterable === "function") {
        iterable = iterable();
      }
      if (typeof iterable?.[Symbol.iterator] !== "function") {
        return;
      }
      const itemProp = suffix ? kebabToCamelCase(suffix) : "item";
      const result = [];
      const itemContexts = useItemContexts(
        inheritedValue,
        namespace,
        iterable,
        itemProp,
        eachKey?.[0]
      );
      for (const [item, itemContext, key] of itemContexts) {
        const mergedContext = {
          client: {
            ...inheritedValue.client,
            [namespace]: itemContext
          },
          server: { ...inheritedValue.server }
        };
        mergedContext.client[namespace][itemProp] = item;
        result.push(
          k(
            Provider,
            { value: mergedContext, key },
            element.props.content
          )
        );
      }
      return result;
    },
    { priority: 20 }
  );
  directive(
    "each-child",
    ({ directives: { "each-child": eachChild }, element, evaluate }) => {
      const entry = eachChild.find(isDefaultDirectiveSuffix);
      if (!entry) {
        return;
      }
      const iterable = evaluate(entry);
      return iterable === PENDING_GETTER ? element : null;
    },
    { priority: 1 }
  );
  directive(
    "router-region",
    ({ directives: { "router-region": routerRegion } }) => {
      const entry = routerRegion.find(isDefaultDirectiveSuffix);
      if (!entry) {
        return;
      }
      if (entry.suffix) {
        if (true) {
          warn(
            `Suffixes for the data-wp-router-region directive are not supported. Ignoring the directive with suffix "${entry.suffix}".`
          );
        }
        return;
      }
      if (entry.uniqueId) {
        if (true) {
          warnUniqueIdNotSupported("router-region", entry.uniqueId);
        }
        return;
      }
      const regionId = typeof entry.value === "string" ? entry.value : entry.value.id;
      if (!routerRegions.has(regionId)) {
        routerRegions.set(regionId, d3());
      }
      const vdom = routerRegions.get(regionId).value;
      _2(() => {
        if (vdom && typeof vdom.type !== "string") {
          navigationContextSignal.value = navigationContextSignal.peek() + 1;
        }
      }, [vdom]);
      if (vdom && typeof vdom.type !== "string") {
        const previousScope = getScope();
        return W(vdom, { previousScope });
      }
      return vdom;
    },
    { priority: 1 }
  );
};

// packages/interactivity/build-module/hydration.mjs
init_preact_module();

// packages/interactivity/build-module/vdom.mjs
init_preact_module();
var directivePrefix = `data-wp-`;
var namespaces = [];
var currentNamespace = () => namespaces[namespaces.length - 1] ?? null;
var isObject = (item) => Boolean(item && typeof item === "object" && item.constructor === Object);
var invalidCharsRegex = /[^a-z0-9-_]/i;
function parseDirectiveName(directiveName) {
  const name = directiveName.substring(8);
  if (invalidCharsRegex.test(name)) {
    return null;
  }
  const suffixIndex = name.indexOf("--");
  if (suffixIndex === -1) {
    return { prefix: name, suffix: null, uniqueId: null };
  }
  const prefix = name.substring(0, suffixIndex);
  const remaining = name.substring(suffixIndex);
  if (remaining.startsWith("---") && remaining[3] !== "-") {
    return {
      prefix,
      suffix: null,
      uniqueId: remaining.substring(3) || null
    };
  }
  let suffix = remaining.substring(2);
  const uniqueIdIndex = suffix.indexOf("---");
  if (uniqueIdIndex !== -1 && suffix.substring(uniqueIdIndex)[3] !== "-") {
    const uniqueId = suffix.substring(uniqueIdIndex + 3) || null;
    suffix = suffix.substring(0, uniqueIdIndex) || null;
    return { prefix, suffix, uniqueId };
  }
  return { prefix, suffix: suffix || null, uniqueId: null };
}
var nsPathRegExp = /^([\w_\/-]+)::(.+)$/;
var hydratedIslands = /* @__PURE__ */ new WeakSet();
function toVdom(root) {
  const nodesToRemove = /* @__PURE__ */ new Set();
  const nodesToReplace = /* @__PURE__ */ new Set();
  const treeWalker = document.createTreeWalker(
    root,
    205
    // TEXT + CDATA_SECTION + COMMENT + PROCESSING_INSTRUCTION + ELEMENT
  );
  function walk(node) {
    const { nodeType } = node;
    if (nodeType === 3) {
      return node.data;
    }
    if (nodeType === 4) {
      nodesToReplace.add(node);
      return node.nodeValue;
    }
    if (nodeType === 8 || nodeType === 7) {
      nodesToRemove.add(node);
      return null;
    }
    const elementNode = node;
    const { attributes } = elementNode;
    const localName = elementNode.localName;
    const props = {};
    const children = [];
    const directives = [];
    let ignore = false;
    let island = false;
    for (let i6 = 0; i6 < attributes.length; i6++) {
      const attributeName = attributes[i6].name;
      const attributeValue = attributes[i6].value;
      if (attributeName[directivePrefix.length] && attributeName.slice(0, directivePrefix.length) === directivePrefix) {
        if (attributeName === "data-wp-ignore") {
          ignore = true;
        } else {
          const regexResult = nsPathRegExp.exec(attributeValue);
          const namespace = regexResult?.[1] ?? null;
          let value = regexResult?.[2] ?? attributeValue;
          try {
            const parsedValue = JSON.parse(value);
            value = isObject(parsedValue) ? parsedValue : value;
          } catch {
          }
          if (attributeName === "data-wp-interactive") {
            island = true;
            const islandNamespace = (
              // eslint-disable-next-line no-nested-ternary
              typeof value === "string" ? value : typeof value?.namespace === "string" ? value.namespace : null
            );
            namespaces.push(islandNamespace);
          } else {
            directives.push([attributeName, namespace, value]);
          }
        }
      } else if (attributeName === "ref") {
        continue;
      }
      if (attributeValue === "" && elementNode[attributeName] === true) {
        props[attributeName] = true;
      } else {
        props[attributeName] = attributeValue;
      }
    }
    if (ignore && !island) {
      return [
        k(localName, {
          ...props,
          innerHTML: elementNode.innerHTML,
          __directives: { ignore: true }
        })
      ];
    }
    if (island) {
      hydratedIslands.add(elementNode);
    }
    if (directives.length) {
      props.__directives = directives.reduce((obj, [name, ns, value]) => {
        const directiveParsed = parseDirectiveName(name);
        if (directiveParsed === null) {
          if (true) {
            warn(`Found malformed directive name: ${name}.`);
          }
          return obj;
        }
        const { prefix, suffix, uniqueId } = directiveParsed;
        obj[prefix] = obj[prefix] || [];
        obj[prefix].push({
          namespace: ns ?? currentNamespace(),
          value,
          suffix,
          uniqueId
        });
        return obj;
      }, {});
      for (const prefix in props.__directives) {
        props.__directives[prefix].sort(
          (a5, b4) => {
            const aSuffix = a5.suffix ?? "";
            const bSuffix = b4.suffix ?? "";
            if (aSuffix !== bSuffix) {
              return aSuffix < bSuffix ? -1 : 1;
            }
            const aId = a5.uniqueId ?? "";
            const bId = b4.uniqueId ?? "";
            return +(aId > bId) - +(aId < bId);
          }
        );
      }
    }
    if (props.__directives?.["each-child"]) {
      props.dangerouslySetInnerHTML = {
        __html: elementNode.innerHTML
      };
    } else if (localName === "template") {
      props.content = [
        ...elementNode.content.childNodes
      ].map((childNode) => toVdom(childNode));
    } else {
      let child = treeWalker.firstChild();
      if (child) {
        while (child) {
          const vnode = walk(child);
          if (vnode) {
            children.push(vnode);
          }
          child = treeWalker.nextSibling();
        }
        treeWalker.parentNode();
      }
    }
    if (island) {
      namespaces.pop();
    }
    return k(localName, props, children);
  }
  const vdom = walk(treeWalker.currentNode);
  nodesToRemove.forEach(
    (node) => node.remove()
  );
  nodesToReplace.forEach(
    (node) => node.replaceWith(
      new window.Text(node.nodeValue ?? "")
    )
  );
  return vdom;
}

// packages/interactivity/build-module/hydration.mjs
var regionRootFragments = /* @__PURE__ */ new WeakMap();
var getRegionRootFragment = (regions) => {
  const region = Array.isArray(regions) ? regions[0] : regions;
  if (!region.parentElement) {
    throw Error("The passed region should be an element with a parent.");
  }
  if (!regionRootFragments.has(region)) {
    regionRootFragments.set(
      region,
      createRootFragment(region.parentElement, regions)
    );
  }
  return regionRootFragments.get(region);
};
var initialVdom = /* @__PURE__ */ new WeakMap();
var resolveInitialVdom;
var initialVdomPromise = new Promise((resolve2) => {
  resolveInitialVdom = resolve2;
});
var hydrateRegions = async () => {
  const nodes = document.querySelectorAll(`[data-wp-interactive]`);
  for (const node of nodes) {
    if (!hydratedIslands.has(node)) {
      await splitTask();
      const fragment = getRegionRootFragment(node);
      const vdom = toVdom(node);
      initialVdom.set(node, vdom);
      await splitTask();
      U(vdom, fragment);
    }
  }
  resolveInitialVdom(initialVdom);
};

// packages/interactivity/build-module/index.mjs
if (true) {
  await Promise.resolve().then(() => (init_debug_module(), debug_module_exports));
}
var watch = E2;
var requiredConsent = "I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress.";
var privateApis = (lock) => {
  if (lock === requiredConsent) {
    return {
      getRegionRootFragment,
      initialVdomPromise,
      toVdom,
      directive,
      getNamespace,
      h: k,
      cloneElement: W,
      render: R,
      proxifyState,
      parseServerData,
      populateServerData,
      batch: r3,
      routerRegions,
      deepReadOnly,
      navigationSignal,
      sessionId,
      warn
    };
  }
  throw new Error("Forbidden access.");
};
populateServerData(parseServerData());
directives_default();
onDOMReady(hydrateRegions);
window.history.replaceState(
  { ...window.history.state, wpInteractivityId: sessionId },
  ""
);
window.addEventListener("popstate", (event) => {
  if (event.state !== null && event.state?.wpInteractivityId !== sessionId) {
    window.location.reload();
  }
});
export {
  getConfig,
  getContext,
  getElement,
  getServerContext,
  getServerState,
  privateApis,
  splitTask,
  store,
  useCallback,
  useEffect,
  useInit,
  useLayoutEffect,
  useMemo,
  A2 as useRef,
  d2 as useState,
  useWatch,
  watch,
  withScope,
  withSyncEvent
};
                       dist/script-modules/interactivity/index.min.js                                                      0000644                 00000116252 15212564025 0015617 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var me,m,jt,ft,V,Lt,Vt,zt,nt,$e,he,Kt,ct,it,ot,Jt,Me={},Be=[],Ar=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,We=Array.isArray;function B(e,t){for(var r in t)e[r]=t[r];return e}function ut(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function R(e,t,r){var n,o,i,s={};for(i in t)i=="key"?n=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?me.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return ve(e,s,n,o,null)}function ve(e,t,r,n,o){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++jt,__i:-1,__u:0};return o==null&&m.vnode!=null&&m.vnode(i),i}function Fe(e){return e.children}function ae(e,t){this.props=e,this.context=t}function fe(e,t){if(t==null)return e.__?fe(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?fe(e):null}function Hr(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,n=[],o=[],i=B({},t);i.__v=t.__v+1,m.vnode&&m.vnode(i),lt(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,n,r??fe(t),!!(32&t.__u),o),i.__v=t.__v,i.__.__k[i.__i]=i,Zt(n,i,o),t.__e=t.__=null,i.__e!=r&&Qt(i)}}function Qt(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),Qt(e)}function st(e){(!e.__d&&(e.__d=!0)&&V.push(e)&&!qe.__r++||Lt!=m.debounceRendering)&&((Lt=m.debounceRendering)||Vt)(qe)}function qe(){try{for(var e,t=1;V.length;)V.length>t&&V.sort(zt),e=V.shift(),t=V.length,Hr(e)}finally{V.length=qe.__r=0}}function Xt(e,t,r,n,o,i,s,f,u,c,l){var a,_,p,w,E,h,d,v=n&&n.__k||Be,I=t.length;for(u=jr(r,t,v,u,I),a=0;a<I;a++)(p=r.__k[a])!=null&&(_=p.__i!=-1&&v[p.__i]||Me,p.__i=a,h=lt(e,p,_,o,i,s,f,u,c,l),w=p.__e,p.ref&&_.ref!=p.ref&&(_.ref&&pt(_.ref,null,p),l.push(p.ref,p.__c||w,p)),E==null&&w!=null&&(E=w),(d=!!(4&p.__u))||_.__k===p.__k?(u=Yt(p,u,e,d),d&&_.__e&&(_.__e=null)):typeof p.type=="function"&&h!==void 0?u=h:w&&(u=w.nextSibling),p.__u&=-7);return r.__e=E,u}function jr(e,t,r,n,o){var i,s,f,u,c,l=r.length,a=l,_=0;for(e.__k=new Array(o),i=0;i<o;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[i]=ve(null,s,null,null,null):We(s)?s=e.__k[i]=ve(Fe,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=ve(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,u=i+_,s.__=e,s.__b=e.__b+1,f=null,(c=s.__i=Vr(s,r,u,a))!=-1&&(a--,(f=r[c])&&(f.__u|=2)),f==null||f.__v==null?(c==-1&&(o>l?_--:o<l&&_++),typeof s.type!="function"&&(s.__u|=4)):c!=u&&(c==u-1?_--:c==u+1?_++:(c>u?_--:_++,s.__u|=4))):e.__k[i]=null;if(a)for(i=0;i<l;i++)(f=r[i])!=null&&(2&f.__u)==0&&(f.__e==n&&(n=fe(f)),tr(f,f));return n}function Yt(e,t,r,n){var o,i;if(typeof e.type=="function"){for(o=e.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=e,t=Yt(o[i],t,r,n));return t}e.__e!=t&&(n&&(t&&e.type&&!t.parentNode&&(t=fe(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Vr(e,t,r,n){var o,i,s,f=e.key,u=e.type,c=t[r],l=c!=null&&(2&c.__u)==0;if(c===null&&f==null||l&&f==c.key&&u==c.type)return r;if(n>(l?1:0)){for(o=r-1,i=r+1;o>=0||i<t.length;)if((c=t[s=o>=0?o--:i++])!=null&&(2&c.__u)==0&&f==c.key&&u==c.type)return s}return-1}function At(e,t,r){t[0]=="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Ar.test(t)?r:r+"px"}function Oe(e,t,r,n,o){var i,s;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||At(e.style,t,"");if(r)for(t in r)n&&r[t]==n[t]||At(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Kt,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n?r[he]=n[he]:(r[he]=ct,e.addEventListener(t,i?ot:it,i)):e.removeEventListener(t,i?ot:it,i);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function Ht(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[$e]==null)t[$e]=ct++;else if(t[$e]<r[he])return;return r(m.event?m.event(t):t)}}}function lt(e,t,r,n,o,i,s,f,u,c){var l,a,_,p,w,E,h,d,v,I,C,b,U,oe,rt,M=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(u=!!(32&r.__u),i=[f=t.__e=r.__e]),(l=m.__b)&&l(t);e:if(typeof M=="function")try{if(d=t.props,v=M.prototype&&M.prototype.render,I=(l=M.contextType)&&n[l.__c],C=l?I?I.props.value:l.__:n,r.__c?h=(a=t.__c=r.__c).__=a.__E:(v?t.__c=a=new M(d,C):(t.__c=a=new ae(d,C),a.constructor=M,a.render=Kr),I&&I.sub(a),a.state||(a.state={}),a.__n=n,_=a.__d=!0,a.__h=[],a._sb=[]),v&&a.__s==null&&(a.__s=a.state),v&&M.getDerivedStateFromProps!=null&&(a.__s==a.state&&(a.__s=B({},a.__s)),B(a.__s,M.getDerivedStateFromProps(d,a.__s))),p=a.props,w=a.state,a.__v=t,_)v&&M.getDerivedStateFromProps==null&&a.componentWillMount!=null&&a.componentWillMount(),v&&a.componentDidMount!=null&&a.__h.push(a.componentDidMount);else{if(v&&M.getDerivedStateFromProps==null&&d!==p&&a.componentWillReceiveProps!=null&&a.componentWillReceiveProps(d,C),t.__v==r.__v||!a.__e&&a.shouldComponentUpdate!=null&&a.shouldComponentUpdate(d,a.__s,C)===!1){t.__v!=r.__v&&(a.props=d,a.state=a.__s,a.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(se){se&&(se.__=t)}),Be.push.apply(a.__h,a._sb),a._sb=[],a.__h.length&&s.push(a);break e}a.componentWillUpdate!=null&&a.componentWillUpdate(d,a.__s,C),v&&a.componentDidUpdate!=null&&a.__h.push(function(){a.componentDidUpdate(p,w,E)})}if(a.context=C,a.props=d,a.__P=e,a.__e=!1,b=m.__r,U=0,v)a.state=a.__s,a.__d=!1,b&&b(t),l=a.render(a.props,a.state,a.context),Be.push.apply(a.__h,a._sb),a._sb=[];else do a.__d=!1,b&&b(t),l=a.render(a.props,a.state,a.context),a.state=a.__s;while(a.__d&&++U<25);a.state=a.__s,a.getChildContext!=null&&(n=B(B({},n),a.getChildContext())),v&&!_&&a.getSnapshotBeforeUpdate!=null&&(E=a.getSnapshotBeforeUpdate(p,w)),oe=l!=null&&l.type===Fe&&l.key==null?er(l.props.children):l,f=Xt(e,We(oe)?oe:[oe],t,r,n,o,i,s,f,u,c),a.base=t.__e,t.__u&=-161,a.__h.length&&s.push(a),h&&(a.__E=a.__=null)}catch(se){if(t.__v=null,u||i!=null)if(se.then){for(t.__u|=u?160:128;f&&f.nodeType==8&&f.nextSibling;)f=f.nextSibling;i[i.indexOf(f)]=null,t.__e=f}else{for(rt=i.length;rt--;)ut(i[rt]);at(t)}else t.__e=r.__e,t.__k=r.__k,se.then||at(t);m.__e(se,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):f=t.__e=zr(r.__e,t,r,n,o,i,s,u,c);return(l=m.diffed)&&l(t),128&t.__u?void 0:f}function at(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(at))}function Zt(e,t,r){for(var n=0;n<r.length;n++)pt(r[n],r[++n],r[++n]);m.__c&&m.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){m.__e(i,o.__v)}})}function er(e){return typeof e!="object"||e==null||e.__b>0?e:We(e)?e.map(er):B({},e)}function zr(e,t,r,n,o,i,s,f,u){var c,l,a,_,p,w,E,h=r.props||Me,d=t.props,v=t.type;if(v=="svg"?o="http://www.w3.org/2000/svg":v=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(c=0;c<i.length;c++)if((p=i[c])&&"setAttribute"in p==!!v&&(v?p.localName==v:p.nodeType==3)){e=p,i[c]=null;break}}if(e==null){if(v==null)return document.createTextNode(d);e=document.createElementNS(o,v,d.is&&d),f&&(m.__m&&m.__m(t,i),f=!1),i=null}if(v==null)h===d||f&&e.data==d||(e.data=d);else{if(i=i&&me.call(e.childNodes),!f&&i!=null)for(h={},c=0;c<e.attributes.length;c++)h[(p=e.attributes[c]).name]=p.value;for(c in h)p=h[c],c=="dangerouslySetInnerHTML"?a=p:c=="children"||c in d||c=="value"&&"defaultValue"in d||c=="checked"&&"defaultChecked"in d||Oe(e,c,null,p,o);for(c in d)p=d[c],c=="children"?_=p:c=="dangerouslySetInnerHTML"?l=p:c=="value"?w=p:c=="checked"?E=p:f&&typeof p!="function"||h[c]===p||Oe(e,c,p,h[c],o);if(l)f||a&&(l.__html==a.__html||l.__html==e.innerHTML)||(e.innerHTML=l.__html),t.__k=[];else if(a&&(e.innerHTML=""),Xt(t.type=="template"?e.content:e,We(_)?_:[_],t,r,n,v=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,s,i?i[0]:r.__k&&fe(r,0),f,u),i!=null)for(c=i.length;c--;)ut(i[c]);f||(c="value",v=="progress"&&w==null?e.removeAttribute("value"):w!=null&&(w!==e[c]||v=="progress"&&!w||v=="option"&&w!=h[c])&&Oe(e,c,w,h[c],o),c="checked",E!=null&&E!=e[c]&&Oe(e,c,E,h[c],o))}return e}function pt(e,t,r){try{if(typeof e=="function"){var n=typeof e.__u=="function";n&&e.__u(),n&&t==null||(e.__u=e(t))}else e.current=t}catch(o){m.__e(o,r)}}function tr(e,t,r){var n,o;if(m.unmount&&m.unmount(e),(n=e.ref)&&(n.current&&n.current!=e.__e||pt(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){m.__e(i,t)}n.base=n.__P=null}if(n=e.__k)for(o=0;o<n.length;o++)n[o]&&tr(n[o],t,r||typeof e.type!="function");r||ut(e.__e),e.__c=e.__=e.__e=void 0}function Kr(e,t,r){return this.constructor(e,r)}function _t(e,t,r){var n,o,i,s;t==document&&(t=document.documentElement),m.__&&m.__(e,t),o=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],s=[],lt(t,e=(!n&&r||t).__k=R(Fe,null,[e]),o||Me,Me,t.namespaceURI,!n&&r?[r]:o?null:t.firstChild?me.call(t.childNodes):null,i,!n&&r?r:o?o.__e:t.firstChild,n,s),Zt(i,e,s)}function dt(e,t){_t(e,t,dt)}function ce(e,t,r){var n,o,i,s,f=B({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?n=t[i]:i=="ref"?o=t[i]:f[i]=t[i]===void 0&&s!=null?s[i]:t[i];return arguments.length>2&&(f.children=arguments.length>3?me.call(arguments,2):r),ve(e.type,f,n||e.key,o||e.ref,null)}function rr(e){function t(r){var n,o;return this.getChildContext||(n=new Set,(o={})[t.__c]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(i){this.props.value!=i.value&&n.forEach(function(s){s.__e=!0,st(s)})},this.sub=function(i){n.add(i);var s=i.componentWillUnmount;i.componentWillUnmount=function(){n&&n.delete(i),s&&s.call(i)}}),r.children}return t.__c="__cC"+Jt++,t.__=e,t.Provider=t.__l=(t.Consumer=function(r,n){return r.children(n)}).contextType=t,t}me=Be.slice,m={__e:function(e,t,r,n){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,n||{}),s=o.__d),s)return o.__E=o}catch(f){e=f}throw e}},jt=0,ft=function(e){return e!=null&&e.constructor===void 0},ae.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=B({},this.state),typeof e=="function"&&(e=e(B({},r),this.props)),e&&B(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),st(this))},ae.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),st(this))},ae.prototype.render=Fe,V=[],Vt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,zt=function(e,t){return e.__v.__b-t.__v.__b},qe.__r=0,nt=Math.random().toString(8),$e="__d"+nt,he="__a"+nt,Kt=/(PointerCapture)$|Capture$/i,ct=0,it=Ht(!1),ot=Ht(!0),Jt=0;var Y,g,ht,nr,ye=0,lr=[],S=m,ir=S.__b,or=S.__r,sr=S.diffed,ar=S.__c,fr=S.unmount,cr=S.__;function ge(e,t){S.__h&&S.__h(g,e,ye||t),ye=0;var r=g.__H||(g.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function Jr(e){return ye=1,Qr(pr,e)}function Qr(e,t,r){var n=ge(Y++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):pr(void 0,t),function(f){var u=n.__N?n.__N[0]:n.__[0],c=n.t(u,f);u!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=g,!g.__f)){var o=function(f,u,c){if(!n.__c.__H)return!0;var l=n.__c.__H.__.filter(function(_){return _.__c});if(l.every(function(_){return!_.__N}))return!i||i.call(this,f,u,c);var a=n.__c.props!==f;return l.some(function(_){if(_.__N){var p=_.__[0];_.__=_.__N,_.__N=void 0,p!==_.__[0]&&(a=!0)}}),i&&i.call(this,f,u,c)||a};g.__f=!0;var i=g.shouldComponentUpdate,s=g.componentWillUpdate;g.componentWillUpdate=function(f,u,c){if(this.__e){var l=i;i=void 0,o(f,u,c),i=l}s&&s.call(this,f,u,c)},g.shouldComponentUpdate=o}return n.__N||n.__}function we(e,t){var r=ge(Y++,3);!S.__s&&mt(r.__H,t)&&(r.__=e,r.u=t,g.__H.__h.push(r))}function Ae(e,t){var r=ge(Y++,4);!S.__s&&mt(r.__H,t)&&(r.__=e,r.u=t,g.__h.push(r))}function z(e){return ye=5,A(function(){return{current:e}},[])}function A(e,t){var r=ge(Y++,7);return mt(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function He(e,t){return ye=8,A(function(){return e},t)}function be(e){var t=g.context[e.__c],r=ge(Y++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(g)),t.props.value):e.__}function Xr(){for(var e;e=lr.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Le),t.__h.some(vt),t.__h=[]}catch(r){t.__h=[],S.__e(r,e.__v)}}}S.__b=function(e){g=null,ir&&ir(e)},S.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),cr&&cr(e,t)},S.__r=function(e){or&&or(e),Y=0;var t=(g=e.__c).__H;t&&(ht===g?(t.__h=[],g.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(Le),t.__h.some(vt),t.__h=[],Y=0)),ht=g},S.diffed=function(e){sr&&sr(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(lr.push(t)!==1&&nr===S.requestAnimationFrame||((nr=S.requestAnimationFrame)||Yr)(Xr)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),ht=g=null},S.__c=function(e,t){t.some(function(r){try{r.__h.some(Le),r.__h=r.__h.filter(function(n){return!n.__||vt(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],S.__e(n,r.__v)}}),ar&&ar(e,t)},S.unmount=function(e){fr&&fr(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(n){try{Le(n)}catch(o){t=o}}),r.__H=void 0,t&&S.__e(t,r.__v))};var ur=typeof requestAnimationFrame=="function";function Yr(e){var t,r=function(){clearTimeout(n),ur&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,35);ur&&(t=requestAnimationFrame(r))}function Le(e){var t=g,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),g=t}function vt(e){var t=g;e.__c=e.__(),g=t}function mt(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function pr(e,t){return typeof t=="function"?t(e):t}var Zr=Symbol.for("preact-signals");function Ve(){if(K>1)K--;else{for(var e,t=!1;Se!==void 0;){var r=Se;for(Se=void 0,yt++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&dr(r))try{r.c()}catch(o){t||(e=o,t=!0)}r=n}}if(yt=0,K--,t)throw e}}function Z(e){if(K>0)return e();K++;try{return e()}finally{Ve()}}var y=void 0;var Se=void 0,K=0,yt=0,je=0;function _r(e){if(y!==void 0){var t=e.n;if(t===void 0||t.t!==y)return t={i:0,S:e,p:y.s,n:void 0,t:y,e:void 0,x:void 0,r:t},y.s!==void 0&&(y.s.n=t),y.s=t,e.n=t,32&y.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=y.s,t.n=void 0,y.s.n=t,y.s=t),t}}function P(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}P.prototype.brand=Zr;P.prototype.h=function(){return!0};P.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};P.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}};P.prototype.subscribe=function(e){var t=this;return H(function(){var r=t.value,n=y;y=void 0;try{e(r)}finally{y=n}})};P.prototype.valueOf=function(){return this.value};P.prototype.toString=function(){return this.value+""};P.prototype.toJSON=function(){return this.value};P.prototype.peek=function(){var e=y;y=void 0;try{return this.value}finally{y=e}};Object.defineProperty(P.prototype,"value",{get:function(){var e=_r(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(yt>100)throw new Error("Cycle detected");this.v=e,this.i++,je++,K++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Ve()}}}});function k(e){return new P(e)}function dr(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function hr(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function vr(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function ue(e){P.call(this,void 0),this.x=e,this.s=void 0,this.g=je-1,this.f=4}(ue.prototype=new P).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===je))return!0;if(this.g=je,this.f|=1,this.i>0&&!dr(this))return this.f&=-2,!0;var e=y;try{hr(this),y=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return y=e,vr(this),this.f&=-2,!0};ue.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}P.prototype.S.call(this,e)};ue.prototype.U=function(e){if(this.t!==void 0&&(P.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};ue.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(ue.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=_r(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function xe(e){return new ue(e)}function mr(e){var t=e.u;if(e.u=void 0,typeof t=="function"){K++;var r=y;y=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,gt(e),n}finally{y=r,Ve()}}}function gt(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,mr(e)}function en(e){if(y!==this)throw new Error("Out-of-order effect");vr(this),y=e,this.f&=-2,8&this.f&&gt(this),Ve()}function Pe(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Pe.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};Pe.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,mr(this),hr(this),K++;var e=y;return y=this,en.bind(this,e)};Pe.prototype.N=function(){2&this.f||(this.f|=2,this.o=Se,Se=this)};Pe.prototype.d=function(){this.f|=8,1&this.f||gt(this)};function H(e){var t=new Pe(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var bt,wt;function le(e,t){m[e]=t.bind(null,m[e]||function(){})}function ze(e){wt&&wt(),wt=e&&e.S()}function yr(e){var t=this,r=e.data,n=rn(r);n.value=r;var o=A(function(){for(var i=t.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return t.__$u.c=function(){var s;!ft(o.peek())&&((s=t.base)==null?void 0:s.nodeType)===3?t.base.data=o.peek():(t.__$f|=1,t.setState({}))},xe(function(){var s=n.value.value;return s===0?0:s===!0?"":s||""})},[]);return o.value}yr.displayName="_st";Object.defineProperties(P.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:yr},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});le("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var o in n)if(o!=="children"){var i=n[o];i instanceof P&&(r||(t.__np=r={}),r[o]=i,n[o]=i.peek())}}e(t)});le("__r",function(e,t){ze();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=(function(o){var i;return H(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i})())),bt=n,ze(r),e(t)});le("__e",function(e,t,r,n){ze(),bt=void 0,e(t,r,n)});le("diffed",function(e,t){ze(),bt=void 0;var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,o=t.props;if(n){var i=r.U;if(i)for(var s in i){var f=i[s];f!==void 0&&!(s in n)&&(f.d(),i[s]=void 0)}else r.U=i={};for(var u in n){var c=i[u],l=n[u];c===void 0?(c=tn(r,u,l,o),i[u]=c):c.o(l,o)}}}e(t)});function tn(e,t,r,n){var o=t in e&&e.ownerSVGElement===void 0,i=k(r);return{o:function(s,f){i.value=s,n=f},d:H(function(){var s=i.value.value;n[t]!==s&&(n[t]=s,o?e[t]=s:s?e.setAttribute(t,s):e.removeAttribute(t))})}}le("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var o in n){var i=n[o];i&&i.d()}}}}else{var s=t.__c;if(s){var f=s.__$u;f&&(s.__$u=void 0,f.d())}}e(t)});le("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)});ae.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var o in e)if(o!=="__source"&&e[o]!==this.props[o])return!0;for(var i in this.props)if(!(i in e))return!0;return!1};function rn(e){return A(function(){return k(e)},[])}var St=[],q=()=>St.slice(-1)[0],W=e=>{St.push(e)},F=()=>{St.pop()};var xt=[],D=()=>xt.slice(-1)[0],ee=e=>{xt.push(e)},j=()=>{xt.pop()};var nn=e=>D().context[e||q()],on=()=>{let e=D(),t={},{ref:r,attributes:n}=e;return Object.freeze({ref:r.current,attributes:Ee(n,t)})},Ke=k(0);function Pt(e){let t=D();return Pt.subscribe=Ke.value,J(t.serverContext[e||q()])}Pt.subscribe=0;var sn=e=>new Promise(t=>{let r=()=>{clearTimeout(n),window.cancelAnimationFrame(o),setTimeout(()=>{e(),t()})},n=setTimeout(r,100),o=window.requestAnimationFrame(r)}),te=typeof window.scheduler?.yield=="function"?window.scheduler.yield.bind(window.scheduler):()=>new Promise(e=>{setTimeout(e,0)}),gr=e=>{let[t]=performance.getEntriesByType("navigation");t.domContentLoadedEventStart>0?e():document.addEventListener("DOMContentLoaded",e)};function an(e,t){let r=()=>{},n=H(function(){return r=this.c.bind(this),this.x=e,this.c=t,e()});return{flush:r,dispose:n}}function fn(e){we(()=>{let t=null,r=!1;return t=an(e,async()=>{t&&!r&&(r=!0,await sn(t.flush),r=!1)}),t.dispose},[])}function O(e){let t=D(),r=q(),n;if(e?.constructor?.name==="GeneratorFunction"?n=async(...i)=>{let s=e(...i),f,u,c;for(;;){W(r),ee(t);try{u=c?s.throw(c):s.next(f),c=void 0}catch(l){throw l}finally{j(),F()}try{f=await u.value}catch(l){c=l}if(u.done){if(c)throw c;break}}return f}:n=(...i)=>{W(r),ee(t);try{return e(...i)}finally{F(),j()}},e.sync){let i=n;return i.sync=!0,i}return n}function Tt(e){fn(O(e))}function Q(e){we(O(e),[])}function cn(e,t){we(O(e),t)}function un(e,t){Ae(O(e),t)}function ln(e,t){return He(O(e),t)}function pn(e,t){return A(O(e),t)}var wr=(e,t)=>{t=[].concat(t);let r=t[t.length-1].nextSibling;function n(o,i){e.insertBefore(o,i||r)}return e.__k={nodeType:1,parentNode:e,firstChild:t[0],childNodes:t,insertBefore:n,appendChild:n,removeChild(o){e.removeChild(o)},contains(o){e.contains(o)}}};function br(e){return e.replace(/^-+|-+$/g,"").toLowerCase().replace(/-([a-z])/g,function(t,r){return r.toUpperCase()})}var Te=e=>{},T=e=>!!(e&&typeof e=="object"&&e.constructor===Object);function _n(e){let t=e;return t.sync=!0,t}var Et=new WeakMap,dn=e=>{let t=()=>!1;return{get(r,n){let o=r[n];return o&&typeof o=="object"?Ee(o,{errorMessage:e}):o},set:t,deleteProperty:t,defineProperty:t}};function Ee(e,t){let r=t?.errorMessage??"Cannot modify read-only object";if(!Et.has(e)){let n=dn(r);Et.set(e,new Proxy(e,n))}return Et.get(e)}var Je=k(0),Qe=Math.random().toString(36).slice(2);function J(e){return T(e)?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,J(r)])):Array.isArray(e)?e.map(t=>J(t)):e}var Xe=new WeakMap,Sr=new WeakMap,It=new WeakMap,hn=new Set([Object,Array]),Ye=(e,t,r)=>{if(!re(t))throw Error("This object cannot be proxified.");if(!Xe.has(t)){let n=new Proxy(t,r);Xe.set(t,n),Sr.set(n,t),It.set(n,e)}return Xe.get(t)},Ze=e=>Xe.get(e),$=e=>It.get(e),re=e=>typeof e!="object"||e===null?!1:!It.has(e)&&hn.has(e.constructor),xr=e=>Sr.get(e);var vn={},Pr=class{owner;computedsByScope;valueSignal;getterSignal;pendingGetter;constructor(e){this.owner=e,this.computedsByScope=new WeakMap}setValue(e){this.update({value:e})}setGetter(e){this.update({get:e})}setPendingGetter(e){this.pendingGetter=e,queueMicrotask(()=>this.consolidateGetter())}consolidateGetter(){let e=this.pendingGetter;e&&(this.pendingGetter=void 0,this.update({get:e}))}getComputed(){let e=D()||vn;if(!this.valueSignal&&!this.getterSignal&&this.update({}),this.pendingGetter&&this.consolidateGetter(),!this.computedsByScope.has(e)){let t=()=>{let r=this.getterSignal?.value;return r?r.call(this.owner):this.valueSignal?.value};W($(this.owner)),this.computedsByScope.set(e,xe(O(t))),F()}return this.computedsByScope.get(e)}update({get:e,value:t}){this.valueSignal?(t!==this.valueSignal.peek()||e!==this.getterSignal.peek())&&Z(()=>{this.valueSignal.value=t,this.getterSignal.value=e}):(this.valueSignal=k(t),this.getterSignal=k(e))}};var mn=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(e=>typeof e=="symbol")),pe=new WeakMap,yn=(e,t)=>pe.has(e)&&pe.get(e).has(t),Ie=(e,t,r)=>{pe.has(e)||pe.set(e,new Map),t=typeof t=="number"?`${t}`:t;let n=pe.get(e);if(!n.has(t)){let o=$(e),i=new Pr(e);if(n.set(t,i),r){let{get:s,value:f}=r;s?i.setGetter(s):i.setValue(re(f)?G(o,f):f)}}return n.get(t)},L=new WeakMap,Ct=!1,N=Symbol("PENDING_GETTER"),gn={get(e,t,r){if(Ct||!e.hasOwnProperty(t)&&t in e||typeof t=="symbol"&&mn.has(t))return Reflect.get(e,t,r);let n=Object.getOwnPropertyDescriptor(e,t),i=Ie(r,t,n).getComputed().value;if(i===N)throw N;if(typeof i=="function"){let s=$(r);return(...f)=>{W(s);try{return i.call(r,...f)}finally{F()}}}return i},set(e,t,r,n){W($(n));try{return Reflect.set(e,t,r,n)}finally{F()}},defineProperty(e,t,r){let n=!(t in e),o=Reflect.defineProperty(e,t,r);if(o){let i=Ze(e),s=Ie(i,t),{get:f,value:u}=r;if(f)s.setGetter(f);else{let c=$(i);s.setValue(re(u)?G(c,u):u)}n&&L.has(e)&&L.get(e).value++,Array.isArray(e)&&pe.get(i)?.has("length")&&Ie(i,"length").setValue(e.length)}return o},deleteProperty(e,t){let r=Reflect.deleteProperty(e,t);return r&&(Ie(Ze(e),t).setValue(void 0),L.has(e)&&L.get(e).value++),r},ownKeys(e){return L.has(e)||L.set(e,k(0)),L._=L.get(e).value,Reflect.ownKeys(e)}},G=(e,t)=>Ye(e,t,gn),Nt=(e,t)=>{Ct=!0;try{return e[t]}finally{Ct=!1}},kt=(e,t,r=!0)=>{if(!(T(e)&&T(t)))return;let n=!1;for(let o in t){let i=!(o in e);n=n||i;let s=Object.getOwnPropertyDescriptor(t,o),f=Ze(e),u=!!f&&yn(f,o)&&Ie(f,o);if(typeof s.get=="function"||typeof s.set=="function")(r||i)&&(Object.defineProperty(e,o,{...s,configurable:!0,enumerable:!0}),s.get&&u&&u.setPendingGetter(s.get));else if(T(t[o])){let c=Object.getOwnPropertyDescriptor(e,o)?.value;if(i||r&&!T(c)){if(e[o]={},u){let l=$(f);u.setValue(G(l,e[o]))}kt(e[o],t[o],r)}else T(c)&&kt(e[o],t[o],r)}else if((r||i)&&(Object.defineProperty(e,o,s),u)){let{value:c}=s,l=$(f);u.setValue(re(c)?G(l,c):c)}}n&&L.has(e)&&L.get(e).value++},ne=(e,t,r=!0)=>Z(()=>kt(xr(e)||e,t,r));var Er=new WeakSet,wn={get:(e,t,r)=>{let n=Reflect.get(e,t),o=$(r);if(typeof n>"u"&&Er.has(r)){let i={};return Reflect.set(e,t,i),Ce(o,i,!1)}if(typeof n=="function"){W(o);let i=O(n);return F(),i}return T(n)&&re(n)?Ce(o,n,!1):n}},Ce=(e,t,r=!0)=>{let n=Ye(e,t,wn);return n&&r&&Er.add(n),n};var Rt=new WeakMap,_e=new WeakMap,Tr=new WeakSet,Ir=Reflect.getOwnPropertyDescriptor,bn={get:(e,t)=>{let r=_e.get(e),n=e[t];return t in e?n:r[t]},set:(e,t,r)=>{let n=_e.get(e),o=t in e||!(t in n)?e:n;return o[t]=r,!0},ownKeys:e=>[...new Set([...Object.keys(_e.get(e)),...Object.keys(e)])],getOwnPropertyDescriptor:(e,t)=>Ir(e,t)||Ir(_e.get(e),t),has:(e,t)=>Reflect.has(e,t)||Reflect.has(_e.get(e),t)},ke=(e,t={})=>{if(Tr.has(e))throw Error("This object cannot be proxified.");if(_e.set(e,t),!Rt.has(e)){let r=new Proxy(e,bn);Rt.set(e,r),Tr.add(r)}return Rt.get(e)};var Ne=new Map,Cr=new Map,et=new Map,Ut=new Map,Re=new Map,Sn=e=>Ut.get(e||q())||{};function Dt(e){let t=e||q();return Re.has(t)||Re.set(t,{}),Dt.subscribe=Je.value,J(Re.get(t))}Dt.subscribe=0;var ie="I acknowledge that using a private store means my plugin will inevitably break on the next store release.";function Ue(e,{state:t={},...r}={},{lock:n=!1}={}){if(Ne.has(e)){if(n!==ie&&!et.has(e))et.set(e,n);else{let i=et.get(e);if(!(n===ie||n!==!0&&n===i))throw Error(i?"Cannot unlock a private store with an invalid lock code":"Cannot lock a public store")}let o=Cr.get(e);ne(o,r),ne(o.state,t)}else{n!==ie&&et.set(e,n);let o={state:G(e,T(t)?t:{}),...r},i=Ce(e,o);Cr.set(e,o),Ne.set(e,i)}return Ne.get(e)}var Gt=(e=document)=>{let t=e.getElementById("wp-script-module-data-@wordpress/interactivity")??e.getElementById("wp-interactivity-data");if(t?.textContent)try{return JSON.parse(t.textContent)}catch{}return{}},Ot=e=>{Re.clear(),Ut.clear(),T(e?.state)&&Object.entries(e.state).forEach(([t,r])=>{let n=Ue(t,{},{lock:ie});ne(n.state,r,!1),Re.set(t,r)}),T(e?.config)&&Object.entries(e.config).forEach(([t,r])=>{Ut.set(t,r)}),T(e?.derivedStateClosures)&&Object.entries(e.derivedStateClosures).forEach(([t,r])=>{let n=Ue(t,{},{lock:ie});r.forEach(o=>{let i=o.split("."),s=i.splice(-1,1)[0],f=i.reduce((c,l)=>Nt(c,l),n),u=Object.getOwnPropertyDescriptor(f,s);T(u?.value)&&(f[s]=N)})})};function X(e){return e.suffix!==null}function de(e){return e.suffix===null}var kr=rr({client:{},server:{}}),$t={},Rr={},x=(e,t,{priority:r=10}={})=>{$t[e]=t,Rr[e]=r},xn=(e,t)=>{if(!t){Te(`Namespace missing for "${e}". The value for that path won't be resolved.`);return}let r=Ne.get(t);typeof r>"u"&&(r=Ue(t,{},{lock:ie}));let n={...r,context:D().context[t]};try{return e.split(".").reduce((i,s)=>i[s],n)}catch(o){if(o===N)return N}},Mt=({scope:e})=>((t,...r)=>{let{value:n,namespace:o}=t;if(typeof n!="string")throw new Error("The `value` prop should be a string path");let i=n[0]==="!"&&!!(n=n.slice(1));ee(e);let s=xn(n,o);if(typeof s=="function"){if(i){Te("Using a function with a negation operator is deprecated and will stop working in WordPress 6.9. Please use derived state instead.");let c=!s(...r);return j(),c}j();let u=(...c)=>{ee(e);let l=s(...c);return j(),l};if(s.sync){let c=u;c.sync=!0}return u}let f=s;return j(),i&&s!==N?!f:f}),Pn=e=>{let t=Object.keys(e).reduce((r,n)=>{if($t[n]){let o=Rr[n];(r[o]=r[o]||[]).push(n)}return r},{});return Object.entries(t).sort(([r],[n])=>parseInt(r)-parseInt(n)).map(([,r])=>r)},Ur=({directives:e,priorityLevels:[t,...r],element:n,originalProps:o,previousScope:i})=>{let s=z({}).current;s.evaluate=He(Mt({scope:s}),[]);let{client:f,server:u}=be(kr);s.context=f,s.serverContext=u,s.ref=i?.ref||z(null),n=ce(n,{ref:s.ref}),s.attributes=n.props;let c=r.length>0?R(Ur,{directives:e,priorityLevels:r,element:n,originalProps:o,previousScope:s}):n,l={...o,children:c},a={directives:e,props:l,element:n,context:kr,evaluate:s.evaluate};ee(s);for(let _ of t){let p=$t[_]?.(a);p!==void 0&&(l.children=p)}return j(),l.children},Nr=m.vnode;m.vnode=e=>{if(e.props.__directives){let t=e.props,r=t.__directives;r.key&&(e.key=r.key.find(de).value),delete t.__directives;let n=Pn(r);n.length>0&&(e.props={directives:r,priorityLevels:n,originalProps:t,type:e.type,element:R(e.type,t),top:!0},e.type=Ur)}Nr&&Nr(e)};function Mr(e){let t={get(r,n,o){let i=r[n];switch(n){case"currentTarget":break;case"preventDefault":case"stopImmediatePropagation":case"stopPropagation":break}return i instanceof Function?function(...s){return i.apply(this===o?r:this,s)}:i}};return new Proxy(e,t)}var En=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Tn=/\/\*[^]*?\*\/|  +/g,Dr=/\n+/g,Gr=" ",In=e=>{let t=[{}],r,n;for(;r=En.exec(e.replace(Tn,""));)r[4]?t.shift():r[3]?(n=r[3].replace(Dr,Gr).trim(),t.unshift(t[0][n]=t[0][n]||{})):t[0][r[1]]=r[2].replace(Dr,Gr).trim();return t[0]},Or=e=>({directives:t,evaluate:r})=>{t[`on-${e}`].filter(X).forEach(n=>{let i=n.suffix.split("--",2)[0];Q(()=>{let s=u=>{let c=r(n);typeof c=="function"&&(c?.sync||(u=Mr(u)),c(u))},f=e==="window"?window:document;return f.addEventListener(i,s),()=>f.removeEventListener(i,s)})})},Cn=(e,t,r,n,o)=>{let i={...e.client,[t]:{...e.client[t],[n]:r}},s={...D(),context:i,serverContext:e.server};return o?Mt({scope:s})(o):r},kn=function*(e,t,r,n,o){let{current:i}=z(new Map);for(let s of r){let f=Cn(e,t,s,n,o);i.has(f)||i.set(f,ke(G(t,{[n]:void 0}),e.client[t])),yield[s,i.get(f),f]}},$r=e=>({directives:t,evaluate:r})=>{t[`on-async-${e}`].filter(X).forEach(n=>{let o=n.suffix.split("--",1)[0];Q(()=>{let i=async f=>{await te();let u=r(n);typeof u=="function"&&u(f)},s=e==="window"?window:document;return s.addEventListener(o,i,{passive:!0}),()=>s.removeEventListener(o,i)})})},De=new Map,Br=()=>{x("context",({directives:{context:e},props:{children:t},context:r})=>{let n=e.filter(de).reverse();if(!n.length)return;let{Provider:o}=r,{client:i,server:s}=be(r),f=z({}),u={},c={client:{...i},server:{...s}},l=new Set;return n.forEach(({value:a,namespace:_,uniqueId:p})=>{T(a)&&(f.current[_]||(f.current[_]=G(_,{})),ne(f.current[_],J(a),!1),u[_]=a,l.add(_))}),l.forEach(a=>{c.client[a]=ke(f.current[a],i[a]),c.server[a]=ke(u[a],s[a])}),R(o,{value:c},t)},{priority:5}),x("watch",({directives:{watch:e},evaluate:t})=>{e.forEach(r=>{Tt(()=>{let n,o=t(r);return typeof o=="function"&&(o=o()),o})})}),x("init",({directives:{init:e},evaluate:t})=>{e.forEach(r=>{Q(()=>{let n,o=t(r);return typeof o=="function"&&(o=o()),o})})}),x("on",({directives:{on:e},element:t,evaluate:r})=>{let n=new Map;e.filter(X).forEach(o=>{let i=o.suffix.split("--",2);n.has(i[0])||n.set(i[0],new Set),n.get(i[0]).add(o)}),n.forEach((o,i)=>{let s=t.props[`on${i}`];t.props[`on${i}`]=f=>{s&&s(f),o.forEach(u=>{let c,l=r(u);typeof l=="function"&&(l?.sync||(f=Mr(f)),l(f))})}})}),x("on-async",({directives:{"on-async":e},element:t,evaluate:r})=>{let n=new Map;e.filter(X).forEach(o=>{let i=o.suffix.split("--",1)[0];n.has(i)||n.set(i,new Set),n.get(i).add(o)}),n.forEach((o,i)=>{let s=t.props[`on${i}`];t.props[`on${i}`]=f=>{s&&s(f),o.forEach(async u=>{await te();let c=r(u);typeof c=="function"&&c(f)})}})}),x("on-window",Or("window")),x("on-document",Or("document")),x("on-async-window",$r("window")),x("on-async-document",$r("document")),x("class",({directives:{class:e},element:t,evaluate:r})=>{e.filter(X).forEach(n=>{let o=n.uniqueId?`${n.suffix}---${n.uniqueId}`:n.suffix,i=r(n);if(i===N)return;typeof i=="function"&&(i=i());let s=t.props.class||"",f=new RegExp(`(^|\\s)${o}(\\s|$)`,"g");i?f.test(s)||(t.props.class=s?`${s} ${o}`:o):t.props.class=s.replace(f," ").trim(),Q(()=>{i?t.ref.current.classList.add(o):t.ref.current.classList.remove(o)})})}),x("style",({directives:{style:e},element:t,evaluate:r})=>{e.filter(X).forEach(n=>{if(n.uniqueId)return;let o=n.suffix,i=r(n);i!==N&&(typeof i=="function"&&(i=i()),t.props.style=t.props.style||{},typeof t.props.style=="string"&&(t.props.style=In(t.props.style)),i?t.props.style[o]=i:delete t.props.style[o],Q(()=>{i?t.ref.current.style.setProperty(o,i):t.ref.current.style.removeProperty(o)}))})}),x("bind",({directives:{bind:e},element:t,evaluate:r})=>{e.filter(X).forEach(n=>{if(n.uniqueId)return;let o=n.suffix,i=r(n);i!==N&&(typeof i=="function"&&(i=i()),t.props[o]=i,Q(()=>{let s=t.ref.current;if(o==="style"){typeof i=="string"&&(s.style.cssText=i);return}else if(o!=="width"&&o!=="height"&&o!=="href"&&o!=="list"&&o!=="form"&&o!=="tabIndex"&&o!=="download"&&o!=="rowSpan"&&o!=="colSpan"&&o!=="role"&&o!=="popover"&&o in s)try{s[o]=i??"";return}catch{}i!=null&&(i!==!1||o[4]==="-")?s.setAttribute(o,o==="popover"&&i===!0?"":i):s.removeAttribute(o)}))})}),x("ignore",({element:{type:e,props:{innerHTML:t,...r}}})=>{let n=A(()=>t,[]);return R(e,{dangerouslySetInnerHTML:{__html:n},...r})}),x("text",({directives:{text:e},element:t,evaluate:r})=>{let n=e.filter(de);n.length&&n.forEach(o=>{if(!o.uniqueId)try{let i=r(o);if(i===N)return;typeof i=="function"&&(i=i()),t.props.children=typeof i=="object"?null:i.toString()}catch{t.props.children=null}})}),x("run",({directives:{run:e},evaluate:t})=>{e.forEach(r=>{let n=t(r);return typeof n=="function"&&(n=n()),n})}),x("each",({directives:{each:e,"each-key":t},context:r,element:n,evaluate:o})=>{if(n.type!=="template")return;let{Provider:i}=r,s=be(r),[f]=e,{namespace:u,suffix:c,uniqueId:l}=f;if(e.length>1||l)return;let a=o(f);if(a===N||(typeof a=="function"&&(a=a()),typeof a?.[Symbol.iterator]!="function"))return;let _=c?br(c):"item",p=[],w=kn(s,u,a,_,t?.[0]);for(let[E,h,d]of w){let v={client:{...s.client,[u]:h},server:{...s.server}};v.client[u][_]=E,p.push(R(i,{value:v,key:d},n.props.content))}return p},{priority:20}),x("each-child",({directives:{"each-child":e},element:t,evaluate:r})=>{let n=e.find(de);return n?r(n)===N?t:null:void 0},{priority:1}),x("router-region",({directives:{"router-region":e}})=>{let t=e.find(de);if(!t||t.suffix||t.uniqueId)return;let r=typeof t.value=="string"?t.value:t.value.id;De.has(r)||De.set(r,k());let n=De.get(r).value;if(Ae(()=>{n&&typeof n.type!="string"&&(Ke.value=Ke.peek()+1)},[n]),n&&typeof n.type!="string"){let o=D();return ce(n,{previousScope:o})}return n},{priority:1})};var Bt="data-wp-",tt=[],Nn=()=>tt[tt.length-1]??null,Rn=e=>!!(e&&typeof e=="object"&&e.constructor===Object),Un=/[^a-z0-9-_]/i;function Dn(e){let t=e.substring(8);if(Un.test(t))return null;let r=t.indexOf("--");if(r===-1)return{prefix:t,suffix:null,uniqueId:null};let n=t.substring(0,r),o=t.substring(r);if(o.startsWith("---")&&o[3]!=="-")return{prefix:n,suffix:null,uniqueId:o.substring(3)||null};let i=o.substring(2),s=i.indexOf("---");if(s!==-1&&i.substring(s)[3]!=="-"){let f=i.substring(s+3)||null;return i=i.substring(0,s)||null,{prefix:n,suffix:i,uniqueId:f}}return{prefix:n,suffix:i||null,uniqueId:null}}var Gn=/^([\w_\/-]+)::(.+)$/,qt=new WeakSet;function Ge(e){let t=new Set,r=new Set,n=document.createTreeWalker(e,205);function o(s){let{nodeType:f}=s;if(f===3)return s.data;if(f===4)return r.add(s),s.nodeValue;if(f===8||f===7)return t.add(s),null;let u=s,{attributes:c}=u,l=u.localName,a={},_=[],p=[],w=!1,E=!1;for(let h=0;h<c.length;h++){let d=c[h].name,v=c[h].value;if(d[Bt.length]&&d.slice(0,Bt.length)===Bt)if(d==="data-wp-ignore")w=!0;else{let I=Gn.exec(v),C=I?.[1]??null,b=I?.[2]??v;try{let U=JSON.parse(b);b=Rn(U)?U:b}catch{}if(d==="data-wp-interactive"){E=!0;let U=typeof b=="string"?b:typeof b?.namespace=="string"?b.namespace:null;tt.push(U)}else p.push([d,C,b])}else if(d==="ref")continue;v===""&&u[d]===!0?a[d]=!0:a[d]=v}if(w&&!E)return[R(l,{...a,innerHTML:u.innerHTML,__directives:{ignore:!0}})];if(E&&qt.add(u),p.length){a.__directives=p.reduce((h,[d,v,I])=>{let C=Dn(d);if(C===null)return h;let{prefix:b,suffix:U,uniqueId:oe}=C;return h[b]=h[b]||[],h[b].push({namespace:v??Nn(),value:I,suffix:U,uniqueId:oe}),h},{});for(let h in a.__directives)a.__directives[h].sort((d,v)=>{let I=d.suffix??"",C=v.suffix??"";if(I!==C)return I<C?-1:1;let b=d.uniqueId??"",U=v.uniqueId??"";return+(b>U)-+(b<U)})}if(a.__directives?.["each-child"])a.dangerouslySetInnerHTML={__html:u.innerHTML};else if(l==="template")a.content=[...u.content.childNodes].map(h=>Ge(h));else{let h=n.firstChild();if(h){for(;h;){let d=o(h);d&&_.push(d),h=n.nextSibling()}n.parentNode()}}return E&&tt.pop(),R(l,a,_)}let i=o(n.currentNode);return t.forEach(s=>s.remove()),r.forEach(s=>s.replaceWith(new window.Text(s.nodeValue??""))),i}var Wt=new WeakMap,Ft=e=>{let t=Array.isArray(e)?e[0]:e;if(!t.parentElement)throw Error("The passed region should be an element with a parent.");return Wt.has(t)||Wt.set(t,wr(t.parentElement,e)),Wt.get(t)},qr=new WeakMap,Wr,Fr=new Promise(e=>{Wr=e}),Lr=async()=>{let e=document.querySelectorAll("[data-wp-interactive]");for(let t of e)if(!qt.has(t)){await te();let r=Ft(t),n=Ge(t);qr.set(t,n),await te(),dt(n,r)}Wr(qr)};var vo=H,On="I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress.",mo=e=>{if(e===On)return{getRegionRootFragment:Ft,initialVdomPromise:Fr,toVdom:Ge,directive:x,getNamespace:q,h:R,cloneElement:ce,render:_t,proxifyState:G,parseServerData:Gt,populateServerData:Ot,batch:Z,routerRegions:De,deepReadOnly:Ee,navigationSignal:Je,sessionId:Qe,warn:Te};throw new Error("Forbidden access.")};Ot(Gt());Br();gr(Lr);window.history.replaceState({...window.history.state,wpInteractivityId:Qe},"");window.addEventListener("popstate",e=>{e.state!==null&&e.state?.wpInteractivityId!==Qe&&window.location.reload()});export{Sn as getConfig,nn as getContext,on as getElement,Pt as getServerContext,Dt as getServerState,mo as privateApis,te as splitTask,Ue as store,ln as useCallback,cn as useEffect,Q as useInit,un as useLayoutEffect,pn as useMemo,z as useRef,Jr as useState,Tt as useWatch,vo as watch,O as withScope,_n as withSyncEvent};
                                                                                                                                                                                                                                                                                                                                                      dist/script-modules/interactivity/index.min.asset.php                                               0000644                 00000000123 15212564025 0017075 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php return array('dependencies' => array(), 'version' => 'efaa5193bbad9c60ffd1');                                                                                                                                                                                                                                                                                                                                                                                                                                             dist/script-modules/interactivity-router/index.js                                                   0000644                 00000126610 15212564025 0016352 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       // packages/interactivity-router/build-module/index.mjs
import { store, privateApis, getConfig } from "@wordpress/interactivity";

// packages/interactivity-router/build-module/assets/scs.mjs
function shortestCommonSupersequence(X, Y, isEqual = (a, b) => a === b) {
  const m = X.length;
  const n = Y.length;
  const dp = Array.from(
    { length: m + 1 },
    () => Array(n + 1).fill(null)
  );
  for (let i = 0; i <= m; i++) {
    dp[i][0] = X.slice(0, i);
  }
  for (let j = 0; j <= n; j++) {
    dp[0][j] = Y.slice(0, j);
  }
  for (let i = 1; i <= m; i++) {
    for (let j = 1; j <= n; j++) {
      if (isEqual(X[i - 1], Y[j - 1])) {
        dp[i][j] = dp[i - 1][j - 1].concat(X[i - 1]);
      } else {
        const option1 = dp[i - 1][j].concat(X[i - 1]);
        const option2 = dp[i][j - 1].concat(Y[j - 1]);
        dp[i][j] = option1.length <= option2.length ? option1 : option2;
      }
    }
  }
  return dp[m][n];
}

// packages/interactivity-router/build-module/assets/styles.mjs
var areNodesEqual = (a, b) => a.isEqualNode(b);
var normalizeMedia = (element) => {
  element = element.cloneNode(true);
  const media = element.media;
  const { originalMedia } = element.dataset;
  if (media === "preload") {
    element.media = originalMedia || "all";
    element.removeAttribute("data-original-media");
  } else if (!element.media) {
    element.media = "all";
  }
  return element;
};
function updateStylesWithSCS(X, Y, parent = window.document.head) {
  if (X.length === 0) {
    return Y.map((element) => {
      const promise = prepareStylePromise(element);
      parent.appendChild(element);
      return promise;
    });
  }
  const xNormalized = X.map(normalizeMedia);
  const yNormalized = Y.map(normalizeMedia);
  const scs = shortestCommonSupersequence(
    xNormalized,
    yNormalized,
    areNodesEqual
  );
  const xLength = X.length;
  const yLength = Y.length;
  const promises = [];
  let last = X[xLength - 1];
  let xIndex = 0;
  let yIndex = 0;
  for (const scsElement of scs) {
    const xElement = X[xIndex];
    const yElement = Y[yIndex];
    const xNormEl = xNormalized[xIndex];
    const yNormEl = yNormalized[yIndex];
    if (xIndex < xLength && areNodesEqual(xNormEl, scsElement)) {
      if (yIndex < yLength && areNodesEqual(yNormEl, scsElement)) {
        promises.push(prepareStylePromise(xElement));
        yIndex++;
      }
      xIndex++;
    } else {
      promises.push(prepareStylePromise(yElement));
      if (xIndex < xLength) {
        xElement.before(yElement);
      } else {
        last.after(yElement);
        last = yElement;
      }
      yIndex++;
    }
  }
  return promises;
}
var stylePromiseCache = /* @__PURE__ */ new WeakMap();
var prepareStylePromise = (element) => {
  if (stylePromiseCache.has(element)) {
    return stylePromiseCache.get(element);
  }
  if (window.document.contains(element) && element.media !== "preload") {
    const promise2 = Promise.resolve(element);
    stylePromiseCache.set(element, promise2);
    return promise2;
  }
  if (element.hasAttribute("media") && element.media !== "all") {
    element.dataset.originalMedia = element.media;
  }
  element.media = "preload";
  if (element instanceof HTMLStyleElement) {
    const promise2 = Promise.resolve(element);
    stylePromiseCache.set(element, promise2);
    return promise2;
  }
  const promise = new Promise((resolve2, reject) => {
    element.addEventListener("load", () => resolve2(element));
    element.addEventListener("error", (event) => {
      const { href } = event.target;
      reject(
        Error(
          `The style sheet with the following URL failed to load: ${href}`
        )
      );
    });
  });
  stylePromiseCache.set(element, promise);
  return promise;
};
var preloadStyles = (doc) => {
  const currentStyleElements = Array.from(
    window.document.querySelectorAll(
      "style,link[rel=stylesheet]"
    )
  );
  const newStyleElements = Array.from(
    doc.querySelectorAll("style,link[rel=stylesheet]")
  );
  return updateStylesWithSCS(currentStyleElements, newStyleElements);
};
var applyStyles = (styles) => {
  window.document.querySelectorAll("style,link[rel=stylesheet]").forEach((el) => {
    if (el.sheet) {
      if (styles.includes(el)) {
        if (el.sheet.media.mediaText === "preload") {
          const { originalMedia = "all" } = el.dataset;
          el.sheet.media.mediaText = originalMedia;
        }
        el.sheet.disabled = false;
      } else {
        el.sheet.disabled = true;
      }
    }
  });
};

// packages/interactivity-router/build-module/assets/dynamic-importmap/resolver.mjs
var backslashRegEx = /\\/g;
function isURL(url) {
  if (url.indexOf(":") === -1) {
    return false;
  }
  try {
    new URL(url);
    return true;
  } catch (_) {
    return false;
  }
}
function resolveIfNotPlainOrUrl(relUrl, parentUrl) {
  const hIdx = parentUrl.indexOf("#"), qIdx = parentUrl.indexOf("?");
  if (hIdx + qIdx > -2) {
    parentUrl = parentUrl.slice(
      0,
      // eslint-disable-next-line no-nested-ternary
      hIdx === -1 ? qIdx : qIdx === -1 || qIdx > hIdx ? hIdx : qIdx
    );
  }
  if (relUrl.indexOf("\\") !== -1) {
    relUrl = relUrl.replace(backslashRegEx, "/");
  }
  if (relUrl[0] === "/" && relUrl[1] === "/") {
    return parentUrl.slice(0, parentUrl.indexOf(":") + 1) + relUrl;
  } else if (relUrl[0] === "." && (relUrl[1] === "/" || relUrl[1] === "." && (relUrl[2] === "/" || relUrl.length === 2 && (relUrl += "/")) || relUrl.length === 1 && (relUrl += "/")) || relUrl[0] === "/") {
    const parentProtocol = parentUrl.slice(
      0,
      parentUrl.indexOf(":") + 1
    );
    let pathname;
    if (parentUrl[parentProtocol.length + 1] === "/") {
      if (parentProtocol !== "file:") {
        pathname = parentUrl.slice(parentProtocol.length + 2);
        pathname = pathname.slice(pathname.indexOf("/") + 1);
      } else {
        pathname = parentUrl.slice(8);
      }
    } else {
      pathname = parentUrl.slice(
        parentProtocol.length + (parentUrl[parentProtocol.length] === "/")
      );
    }
    if (relUrl[0] === "/") {
      return parentUrl.slice(0, parentUrl.length - pathname.length - 1) + relUrl;
    }
    const segmented = pathname.slice(0, pathname.lastIndexOf("/") + 1) + relUrl;
    const output = [];
    let segmentIndex = -1;
    for (let i = 0; i < segmented.length; i++) {
      if (segmentIndex !== -1) {
        if (segmented[i] === "/") {
          output.push(segmented.slice(segmentIndex, i + 1));
          segmentIndex = -1;
        }
        continue;
      } else if (segmented[i] === ".") {
        if (segmented[i + 1] === "." && (segmented[i + 2] === "/" || i + 2 === segmented.length)) {
          output.pop();
          i += 2;
          continue;
        } else if (segmented[i + 1] === "/" || i + 1 === segmented.length) {
          i += 1;
          continue;
        }
      }
      while (segmented[i] === "/") {
        i++;
      }
      segmentIndex = i;
    }
    if (segmentIndex !== -1) {
      output.push(segmented.slice(segmentIndex));
    }
    return parentUrl.slice(0, parentUrl.length - pathname.length) + output.join("");
  }
}
function resolveUrl(relUrl, parentUrl) {
  return resolveIfNotPlainOrUrl(relUrl, parentUrl) || (isURL(relUrl) ? relUrl : resolveIfNotPlainOrUrl("./" + relUrl, parentUrl));
}
function getMatch(path, matchObj) {
  if (matchObj[path]) {
    return path;
  }
  let sepIndex = path.length;
  do {
    const segment = path.slice(0, sepIndex + 1);
    if (segment in matchObj) {
      return segment;
    }
  } while ((sepIndex = path.lastIndexOf("/", sepIndex - 1)) !== -1);
}
function applyPackages(id, packages) {
  const pkgName = getMatch(id, packages);
  if (pkgName) {
    const pkg = packages[pkgName];
    if (pkg === null) {
      return;
    }
    return pkg + id.slice(pkgName.length);
  }
}
function resolveImportMap(importMap2, resolvedOrPlain, parentUrl) {
  let scopeUrl = parentUrl && getMatch(parentUrl, importMap2.scopes);
  while (scopeUrl) {
    const packageResolution = applyPackages(
      resolvedOrPlain,
      importMap2.scopes[scopeUrl]
    );
    if (packageResolution) {
      return packageResolution;
    }
    scopeUrl = getMatch(
      scopeUrl.slice(0, scopeUrl.lastIndexOf("/")),
      importMap2.scopes
    );
  }
  return applyPackages(resolvedOrPlain, importMap2.imports) || resolvedOrPlain.indexOf(":") !== -1 && resolvedOrPlain;
}
function resolveAndComposePackages(packages, outPackages, baseUrl22, parentMap) {
  for (const p in packages) {
    const resolvedLhs = resolveIfNotPlainOrUrl(p, baseUrl22) || p;
    const target = packages[p];
    if (typeof target !== "string") {
      continue;
    }
    const mapped = resolveImportMap(
      parentMap,
      resolveIfNotPlainOrUrl(target, baseUrl22) || target,
      baseUrl22
    );
    if (mapped) {
      outPackages[resolvedLhs] = mapped;
      continue;
    }
  }
}
function resolveAndComposeImportMap(json, baseUrl22, parentMap) {
  const outMap = {
    imports: Object.assign({}, parentMap.imports),
    scopes: Object.assign({}, parentMap.scopes)
  };
  if (json.imports) {
    resolveAndComposePackages(
      json.imports,
      outMap.imports,
      baseUrl22,
      parentMap
    );
  }
  if (json.scopes) {
    for (const s in json.scopes) {
      const resolvedScope = resolveUrl(s, baseUrl22);
      resolveAndComposePackages(
        json.scopes[s],
        outMap.scopes[resolvedScope] || (outMap.scopes[resolvedScope] = {}),
        baseUrl22,
        parentMap
      );
    }
  }
  return outMap;
}
var importMap = { imports: {}, scopes: {} };
var baseUrl = document.baseURI;
var pageBaseUrl = baseUrl;
function addImportMap(importMapIn) {
  importMap = resolveAndComposeImportMap(
    importMapIn,
    pageBaseUrl,
    importMap
  );
}
function resolve(id, parentUrl) {
  const urlResolved = resolveIfNotPlainOrUrl(id, parentUrl);
  return resolveImportMap(importMap, urlResolved || id, parentUrl) || id;
}

// node_modules/es-module-lexer/dist/lexer.js
var ImportType;
!(function(A2) {
  A2[A2.Static = 1] = "Static", A2[A2.Dynamic = 2] = "Dynamic", A2[A2.ImportMeta = 3] = "ImportMeta", A2[A2.StaticSourcePhase = 4] = "StaticSourcePhase", A2[A2.DynamicSourcePhase = 5] = "DynamicSourcePhase";
})(ImportType || (ImportType = {}));
var A = 1 === new Uint8Array(new Uint16Array([1]).buffer)[0];
function parse(E2, g = "@") {
  if (!C) return init.then((() => parse(E2)));
  const I = E2.length + 1, w = (C.__heap_base.value || C.__heap_base) + 4 * I - C.memory.buffer.byteLength;
  w > 0 && C.memory.grow(Math.ceil(w / 65536));
  const K = C.sa(I - 1);
  if ((A ? B : Q)(E2, new Uint16Array(C.memory.buffer, K, I)), !C.parse()) throw Object.assign(new Error(`Parse error ${g}:${E2.slice(0, C.e()).split("\n").length}:${C.e() - E2.lastIndexOf("\n", C.e() - 1)}`), { idx: C.e() });
  const D = [], o = [];
  for (; C.ri(); ) {
    const A2 = C.is(), Q2 = C.ie(), B2 = C.it(), g2 = C.ai(), I2 = C.id(), w2 = C.ss(), K2 = C.se();
    let o2;
    C.ip() && (o2 = k(E2.slice(-1 === I2 ? A2 - 1 : A2, -1 === I2 ? Q2 + 1 : Q2))), D.push({ n: o2, t: B2, s: A2, e: Q2, ss: w2, se: K2, d: I2, a: g2 });
  }
  for (; C.re(); ) {
    const A2 = C.es(), Q2 = C.ee(), B2 = C.els(), g2 = C.ele(), I2 = E2.slice(A2, Q2), w2 = I2[0], K2 = B2 < 0 ? void 0 : E2.slice(B2, g2), D2 = K2 ? K2[0] : "";
    o.push({ s: A2, e: Q2, ls: B2, le: g2, n: '"' === w2 || "'" === w2 ? k(I2) : I2, ln: '"' === D2 || "'" === D2 ? k(K2) : K2 });
  }
  function k(A2) {
    try {
      return (0, eval)(A2);
    } catch (A3) {
    }
  }
  return [D, o, !!C.f(), !!C.ms()];
}
function Q(A2, Q2) {
  const B2 = A2.length;
  let C2 = 0;
  for (; C2 < B2; ) {
    const B3 = A2.charCodeAt(C2);
    Q2[C2++] = (255 & B3) << 8 | B3 >>> 8;
  }
}
function B(A2, Q2) {
  const B2 = A2.length;
  let C2 = 0;
  for (; C2 < B2; ) Q2[C2] = A2.charCodeAt(C2++);
}
var C;
var init = WebAssembly.compile((E = "AGFzbQEAAAABKwhgAX8Bf2AEf39/fwBgAAF/YAAAYAF/AGADf39/AX9gAn9/AX9gA39/fwADMTAAAQECAgICAgICAgICAgICAgICAgIAAwMDBAQAAAUAAAAAAAMDAwAGAAAABwAGAgUEBQFwAQEBBQMBAAEGDwJ/AUHA8gALfwBBwPIACwd6FQZtZW1vcnkCAAJzYQAAAWUAAwJpcwAEAmllAAUCc3MABgJzZQAHAml0AAgCYWkACQJpZAAKAmlwAAsCZXMADAJlZQANA2VscwAOA2VsZQAPAnJpABACcmUAEQFmABICbXMAEwVwYXJzZQAUC19faGVhcF9iYXNlAwEKm0EwaAEBf0EAIAA2AoAKQQAoAtwJIgEgAEEBdGoiAEEAOwEAQQAgAEECaiIANgKECkEAIAA2AogKQQBBADYC4AlBAEEANgLwCUEAQQA2AugJQQBBADYC5AlBAEEANgL4CUEAQQA2AuwJIAEL0wEBA39BACgC8AkhBEEAQQAoAogKIgU2AvAJQQAgBDYC9AlBACAFQSRqNgKICiAEQSBqQeAJIAQbIAU2AgBBACgC1AkhBEEAKALQCSEGIAUgATYCACAFIAA2AgggBSACIAJBAmpBACAGIANGIgAbIAQgA0YiBBs2AgwgBSADNgIUIAVBADYCECAFIAI2AgQgBUEANgIgIAVBA0EBQQIgABsgBBs2AhwgBUEAKALQCSADRiICOgAYAkACQCACDQBBACgC1AkgA0cNAQtBAEEBOgCMCgsLXgEBf0EAKAL4CSIEQRBqQeQJIAQbQQAoAogKIgQ2AgBBACAENgL4CUEAIARBFGo2AogKQQBBAToAjAogBEEANgIQIAQgAzYCDCAEIAI2AgggBCABNgIEIAQgADYCAAsIAEEAKAKQCgsVAEEAKALoCSgCAEEAKALcCWtBAXULHgEBf0EAKALoCSgCBCIAQQAoAtwJa0EBdUF/IAAbCxUAQQAoAugJKAIIQQAoAtwJa0EBdQseAQF/QQAoAugJKAIMIgBBACgC3AlrQQF1QX8gABsLCwBBACgC6AkoAhwLHgEBf0EAKALoCSgCECIAQQAoAtwJa0EBdUF/IAAbCzsBAX8CQEEAKALoCSgCFCIAQQAoAtAJRw0AQX8PCwJAIABBACgC1AlHDQBBfg8LIABBACgC3AlrQQF1CwsAQQAoAugJLQAYCxUAQQAoAuwJKAIAQQAoAtwJa0EBdQsVAEEAKALsCSgCBEEAKALcCWtBAXULHgEBf0EAKALsCSgCCCIAQQAoAtwJa0EBdUF/IAAbCx4BAX9BACgC7AkoAgwiAEEAKALcCWtBAXVBfyAAGwslAQF/QQBBACgC6AkiAEEgakHgCSAAGygCACIANgLoCSAAQQBHCyUBAX9BAEEAKALsCSIAQRBqQeQJIAAbKAIAIgA2AuwJIABBAEcLCABBAC0AlAoLCABBAC0AjAoL3Q0BBX8jAEGA0ABrIgAkAEEAQQE6AJQKQQBBACgC2Ak2ApwKQQBBACgC3AlBfmoiATYCsApBACABQQAoAoAKQQF0aiICNgK0CkEAQQA6AIwKQQBBADsBlgpBAEEAOwGYCkEAQQA6AKAKQQBBADYCkApBAEEAOgD8CUEAIABBgBBqNgKkCkEAIAA2AqgKQQBBADoArAoCQAJAAkACQANAQQAgAUECaiIDNgKwCiABIAJPDQECQCADLwEAIgJBd2pBBUkNAAJAAkACQAJAAkAgAkGbf2oOBQEICAgCAAsgAkEgRg0EIAJBL0YNAyACQTtGDQIMBwtBAC8BmAoNASADEBVFDQEgAUEEakGCCEEKEC8NARAWQQAtAJQKDQFBAEEAKAKwCiIBNgKcCgwHCyADEBVFDQAgAUEEakGMCEEKEC8NABAXC0EAQQAoArAKNgKcCgwBCwJAIAEvAQQiA0EqRg0AIANBL0cNBBAYDAELQQEQGQtBACgCtAohAkEAKAKwCiEBDAALC0EAIQIgAyEBQQAtAPwJDQIMAQtBACABNgKwCkEAQQA6AJQKCwNAQQAgAUECaiIDNgKwCgJAAkACQAJAAkACQAJAIAFBACgCtApPDQAgAy8BACICQXdqQQVJDQYCQAJAAkACQAJAAkACQAJAAkACQCACQWBqDgoQDwYPDw8PBQECAAsCQAJAAkACQCACQaB/ag4KCxISAxIBEhISAgALIAJBhX9qDgMFEQYJC0EALwGYCg0QIAMQFUUNECABQQRqQYIIQQoQLw0QEBYMEAsgAxAVRQ0PIAFBBGpBjAhBChAvDQ8QFwwPCyADEBVFDQ4gASkABELsgISDsI7AOVINDiABLwEMIgNBd2oiAUEXSw0MQQEgAXRBn4CABHFFDQwMDQtBAEEALwGYCiIBQQFqOwGYCkEAKAKkCiABQQN0aiIBQQE2AgAgAUEAKAKcCjYCBAwNC0EALwGYCiIDRQ0JQQAgA0F/aiIDOwGYCkEALwGWCiICRQ0MQQAoAqQKIANB//8DcUEDdGooAgBBBUcNDAJAIAJBAnRBACgCqApqQXxqKAIAIgMoAgQNACADQQAoApwKQQJqNgIEC0EAIAJBf2o7AZYKIAMgAUEEajYCDAwMCwJAQQAoApwKIgEvAQBBKUcNAEEAKALwCSIDRQ0AIAMoAgQgAUcNAEEAQQAoAvQJIgM2AvAJAkAgA0UNACADQQA2AiAMAQtBAEEANgLgCQtBAEEALwGYCiIDQQFqOwGYCkEAKAKkCiADQQN0aiIDQQZBAkEALQCsChs2AgAgAyABNgIEQQBBADoArAoMCwtBAC8BmAoiAUUNB0EAIAFBf2oiATsBmApBACgCpAogAUH//wNxQQN0aigCAEEERg0EDAoLQScQGgwJC0EiEBoMCAsgAkEvRw0HAkACQCABLwEEIgFBKkYNACABQS9HDQEQGAwKC0EBEBkMCQsCQAJAAkACQEEAKAKcCiIBLwEAIgMQG0UNAAJAAkAgA0FVag4EAAkBAwkLIAFBfmovAQBBK0YNAwwICyABQX5qLwEAQS1GDQIMBwsgA0EpRw0BQQAoAqQKQQAvAZgKIgJBA3RqKAIEEBxFDQIMBgsgAUF+ai8BAEFQakH//wNxQQpPDQULQQAvAZgKIQILAkACQCACQf//A3EiAkUNACADQeYARw0AQQAoAqQKIAJBf2pBA3RqIgQoAgBBAUcNACABQX5qLwEAQe8ARw0BIAQoAgRBlghBAxAdRQ0BDAULIANB/QBHDQBBACgCpAogAkEDdGoiAigCBBAeDQQgAigCAEEGRg0ECyABEB8NAyADRQ0DIANBL0ZBAC0AoApBAEdxDQMCQEEAKAL4CSICRQ0AIAEgAigCAEkNACABIAIoAgRNDQQLIAFBfmohAUEAKALcCSECAkADQCABQQJqIgQgAk0NAUEAIAE2ApwKIAEvAQAhAyABQX5qIgQhASADECBFDQALIARBAmohBAsCQCADQf//A3EQIUUNACAEQX5qIQECQANAIAFBAmoiAyACTQ0BQQAgATYCnAogAS8BACEDIAFBfmoiBCEBIAMQIQ0ACyAEQQJqIQMLIAMQIg0EC0EAQQE6AKAKDAcLQQAoAqQKQQAvAZgKIgFBA3QiA2pBACgCnAo2AgRBACABQQFqOwGYCkEAKAKkCiADakEDNgIACxAjDAULQQAtAPwJQQAvAZYKQQAvAZgKcnJFIQIMBwsQJEEAQQA6AKAKDAMLECVBACECDAULIANBoAFHDQELQQBBAToArAoLQQBBACgCsAo2ApwKC0EAKAKwCiEBDAALCyAAQYDQAGokACACCxoAAkBBACgC3AkgAEcNAEEBDwsgAEF+ahAmC/4KAQZ/QQBBACgCsAoiAEEMaiIBNgKwCkEAKAL4CSECQQEQKSEDAkACQAJAAkACQAJAAkACQAJAQQAoArAKIgQgAUcNACADEChFDQELAkACQAJAAkACQAJAAkAgA0EqRg0AIANB+wBHDQFBACAEQQJqNgKwCkEBECkhA0EAKAKwCiEEA0ACQAJAIANB//8DcSIDQSJGDQAgA0EnRg0AIAMQLBpBACgCsAohAwwBCyADEBpBAEEAKAKwCkECaiIDNgKwCgtBARApGgJAIAQgAxAtIgNBLEcNAEEAQQAoArAKQQJqNgKwCkEBECkhAwsgA0H9AEYNA0EAKAKwCiIFIARGDQ8gBSEEIAVBACgCtApNDQAMDwsLQQAgBEECajYCsApBARApGkEAKAKwCiIDIAMQLRoMAgtBAEEAOgCUCgJAAkACQAJAAkACQCADQZ9/ag4MAgsEAQsDCwsLCwsFAAsgA0H2AEYNBAwKC0EAIARBDmoiAzYCsAoCQAJAAkBBARApQZ9/ag4GABICEhIBEgtBACgCsAoiBSkAAkLzgOSD4I3AMVINESAFLwEKECFFDRFBACAFQQpqNgKwCkEAECkaC0EAKAKwCiIFQQJqQbIIQQ4QLw0QIAUvARAiAkF3aiIBQRdLDQ1BASABdEGfgIAEcUUNDQwOC0EAKAKwCiIFKQACQuyAhIOwjsA5Ug0PIAUvAQoiAkF3aiIBQRdNDQYMCgtBACAEQQpqNgKwCkEAECkaQQAoArAKIQQLQQAgBEEQajYCsAoCQEEBECkiBEEqRw0AQQBBACgCsApBAmo2ArAKQQEQKSEEC0EAKAKwCiEDIAQQLBogA0EAKAKwCiIEIAMgBBACQQBBACgCsApBfmo2ArAKDwsCQCAEKQACQuyAhIOwjsA5Ug0AIAQvAQoQIEUNAEEAIARBCmo2ArAKQQEQKSEEQQAoArAKIQMgBBAsGiADQQAoArAKIgQgAyAEEAJBAEEAKAKwCkF+ajYCsAoPC0EAIARBBGoiBDYCsAoLQQAgBEEGajYCsApBAEEAOgCUCkEBECkhBEEAKAKwCiEDIAQQLCEEQQAoArAKIQIgBEHf/wNxIgFB2wBHDQNBACACQQJqNgKwCkEBECkhBUEAKAKwCiEDQQAhBAwEC0EAQQE6AIwKQQBBACgCsApBAmo2ArAKC0EBECkhBEEAKAKwCiEDAkAgBEHmAEcNACADQQJqQawIQQYQLw0AQQAgA0EIajYCsAogAEEBEClBABArIAJBEGpB5AkgAhshAwNAIAMoAgAiA0UNBSADQgA3AgggA0EQaiEDDAALC0EAIANBfmo2ArAKDAMLQQEgAXRBn4CABHFFDQMMBAtBASEECwNAAkACQCAEDgIAAQELIAVB//8DcRAsGkEBIQQMAQsCQAJAQQAoArAKIgQgA0YNACADIAQgAyAEEAJBARApIQQCQCABQdsARw0AIARBIHJB/QBGDQQLQQAoArAKIQMCQCAEQSxHDQBBACADQQJqNgKwCkEBECkhBUEAKAKwCiEDIAVBIHJB+wBHDQILQQAgA0F+ajYCsAoLIAFB2wBHDQJBACACQX5qNgKwCg8LQQAhBAwACwsPCyACQaABRg0AIAJB+wBHDQQLQQAgBUEKajYCsApBARApIgVB+wBGDQMMAgsCQCACQVhqDgMBAwEACyACQaABRw0CC0EAIAVBEGo2ArAKAkBBARApIgVBKkcNAEEAQQAoArAKQQJqNgKwCkEBECkhBQsgBUEoRg0BC0EAKAKwCiEBIAUQLBpBACgCsAoiBSABTQ0AIAQgAyABIAUQAkEAQQAoArAKQX5qNgKwCg8LIAQgA0EAQQAQAkEAIARBDGo2ArAKDwsQJQvcCAEGf0EAIQBBAEEAKAKwCiIBQQxqIgI2ArAKQQEQKSEDQQAoArAKIQQCQAJAAkACQAJAAkACQAJAIANBLkcNAEEAIARBAmo2ArAKAkBBARApIgNB8wBGDQAgA0HtAEcNB0EAKAKwCiIDQQJqQZwIQQYQLw0HAkBBACgCnAoiBBAqDQAgBC8BAEEuRg0ICyABIAEgA0EIakEAKALUCRABDwtBACgCsAoiA0ECakGiCEEKEC8NBgJAQQAoApwKIgQQKg0AIAQvAQBBLkYNBwsgA0EMaiEDDAELIANB8wBHDQEgBCACTQ0BQQYhAEEAIQIgBEECakGiCEEKEC8NAiAEQQxqIQMCQCAELwEMIgVBd2oiBEEXSw0AQQEgBHRBn4CABHENAQsgBUGgAUcNAgtBACADNgKwCkEBIQBBARApIQMLAkACQAJAAkAgA0H7AEYNACADQShHDQFBACgCpApBAC8BmAoiA0EDdGoiBEEAKAKwCjYCBEEAIANBAWo7AZgKIARBBTYCAEEAKAKcCi8BAEEuRg0HQQBBACgCsAoiBEECajYCsApBARApIQMgAUEAKAKwCkEAIAQQAQJAAkAgAA0AQQAoAvAJIQQMAQtBACgC8AkiBEEFNgIcC0EAQQAvAZYKIgBBAWo7AZYKQQAoAqgKIABBAnRqIAQ2AgACQCADQSJGDQAgA0EnRg0AQQBBACgCsApBfmo2ArAKDwsgAxAaQQBBACgCsApBAmoiAzYCsAoCQAJAAkBBARApQVdqDgQBAgIAAgtBAEEAKAKwCkECajYCsApBARApGkEAKALwCSIEIAM2AgQgBEEBOgAYIARBACgCsAoiAzYCEEEAIANBfmo2ArAKDwtBACgC8AkiBCADNgIEIARBAToAGEEAQQAvAZgKQX9qOwGYCiAEQQAoArAKQQJqNgIMQQBBAC8BlgpBf2o7AZYKDwtBAEEAKAKwCkF+ajYCsAoPCyAADQJBACgCsAohA0EALwGYCg0BA0ACQAJAAkAgA0EAKAK0Ck8NAEEBECkiA0EiRg0BIANBJ0YNASADQf0ARw0CQQBBACgCsApBAmo2ArAKC0EBECkhBEEAKAKwCiEDAkAgBEHmAEcNACADQQJqQawIQQYQLw0JC0EAIANBCGo2ArAKAkBBARApIgNBIkYNACADQSdHDQkLIAEgA0EAECsPCyADEBoLQQBBACgCsApBAmoiAzYCsAoMAAsLIAANAUEGIQBBACECAkAgA0FZag4EBAMDBAALIANBIkYNAwwCC0EAIANBfmo2ArAKDwtBDCEAQQEhAgtBACgCsAoiAyABIABBAXRqRw0AQQAgA0F+ajYCsAoPC0EALwGYCg0CQQAoArAKIQNBACgCtAohAANAIAMgAE8NAQJAAkAgAy8BACIEQSdGDQAgBEEiRw0BCyABIAQgAhArDwtBACADQQJqIgM2ArAKDAALCxAlCw8LQQBBACgCsApBfmo2ArAKC0cBA39BACgCsApBAmohAEEAKAK0CiEBAkADQCAAIgJBfmogAU8NASACQQJqIQAgAi8BAEF2ag4EAQAAAQALC0EAIAI2ArAKC5gBAQN/QQBBACgCsAoiAUECajYCsAogAUEGaiEBQQAoArQKIQIDQAJAAkACQCABQXxqIAJPDQAgAUF+ai8BACEDAkACQCAADQAgA0EqRg0BIANBdmoOBAIEBAIECyADQSpHDQMLIAEvAQBBL0cNAkEAIAFBfmo2ArAKDAELIAFBfmohAQtBACABNgKwCg8LIAFBAmohAQwACwuIAQEEf0EAKAKwCiEBQQAoArQKIQICQAJAA0AgASIDQQJqIQEgAyACTw0BIAEvAQAiBCAARg0CAkAgBEHcAEYNACAEQXZqDgQCAQECAQsgA0EEaiEBIAMvAQRBDUcNACADQQZqIAEgAy8BBkEKRhshAQwACwtBACABNgKwChAlDwtBACABNgKwCgtsAQF/AkACQCAAQV9qIgFBBUsNAEEBIAF0QTFxDQELIABBRmpB//8DcUEGSQ0AIABBKUcgAEFYakH//wNxQQdJcQ0AAkAgAEGlf2oOBAEAAAEACyAAQf0ARyAAQYV/akH//wNxQQRJcQ8LQQELLgEBf0EBIQECQCAAQaYJQQUQHQ0AIABBlghBAxAdDQAgAEGwCUECEB0hAQsgAQtGAQN/QQAhAwJAIAAgAkEBdCICayIEQQJqIgBBACgC3AkiBUkNACAAIAEgAhAvDQACQCAAIAVHDQBBAQ8LIAQQJiEDCyADC4MBAQJ/QQEhAQJAAkACQAJAAkACQCAALwEAIgJBRWoOBAUEBAEACwJAIAJBm39qDgQDBAQCAAsgAkEpRg0EIAJB+QBHDQMgAEF+akG8CUEGEB0PCyAAQX5qLwEAQT1GDwsgAEF+akG0CUEEEB0PCyAAQX5qQcgJQQMQHQ8LQQAhAQsgAQu0AwECf0EAIQECQAJAAkACQAJAAkACQAJAAkACQCAALwEAQZx/ag4UAAECCQkJCQMJCQQFCQkGCQcJCQgJCwJAAkAgAEF+ai8BAEGXf2oOBAAKCgEKCyAAQXxqQcoIQQIQHQ8LIABBfGpBzghBAxAdDwsCQAJAAkAgAEF+ai8BAEGNf2oOAwABAgoLAkAgAEF8ai8BACICQeEARg0AIAJB7ABHDQogAEF6akHlABAnDwsgAEF6akHjABAnDwsgAEF8akHUCEEEEB0PCyAAQXxqQdwIQQYQHQ8LIABBfmovAQBB7wBHDQYgAEF8ai8BAEHlAEcNBgJAIABBemovAQAiAkHwAEYNACACQeMARw0HIABBeGpB6AhBBhAdDwsgAEF4akH0CEECEB0PCyAAQX5qQfgIQQQQHQ8LQQEhASAAQX5qIgBB6QAQJw0EIABBgAlBBRAdDwsgAEF+akHkABAnDwsgAEF+akGKCUEHEB0PCyAAQX5qQZgJQQQQHQ8LAkAgAEF+ai8BACICQe8ARg0AIAJB5QBHDQEgAEF8akHuABAnDwsgAEF8akGgCUEDEB0hAQsgAQs0AQF/QQEhAQJAIABBd2pB//8DcUEFSQ0AIABBgAFyQaABRg0AIABBLkcgABAocSEBCyABCzABAX8CQAJAIABBd2oiAUEXSw0AQQEgAXRBjYCABHENAQsgAEGgAUYNAEEADwtBAQtOAQJ/QQAhAQJAAkAgAC8BACICQeUARg0AIAJB6wBHDQEgAEF+akH4CEEEEB0PCyAAQX5qLwEAQfUARw0AIABBfGpB3AhBBhAdIQELIAEL3gEBBH9BACgCsAohAEEAKAK0CiEBAkACQAJAA0AgACICQQJqIQAgAiABTw0BAkACQAJAIAAvAQAiA0Gkf2oOBQIDAwMBAAsgA0EkRw0CIAIvAQRB+wBHDQJBACACQQRqIgA2ArAKQQBBAC8BmAoiAkEBajsBmApBACgCpAogAkEDdGoiAkEENgIAIAIgADYCBA8LQQAgADYCsApBAEEALwGYCkF/aiIAOwGYCkEAKAKkCiAAQf//A3FBA3RqKAIAQQNHDQMMBAsgAkEEaiEADAALC0EAIAA2ArAKCxAlCwtwAQJ/AkACQANAQQBBACgCsAoiAEECaiIBNgKwCiAAQQAoArQKTw0BAkACQAJAIAEvAQAiAUGlf2oOAgECAAsCQCABQXZqDgQEAwMEAAsgAUEvRw0CDAQLEC4aDAELQQAgAEEEajYCsAoMAAsLECULCzUBAX9BAEEBOgD8CUEAKAKwCiEAQQBBACgCtApBAmo2ArAKQQAgAEEAKALcCWtBAXU2ApAKC0MBAn9BASEBAkAgAC8BACICQXdqQf//A3FBBUkNACACQYABckGgAUYNAEEAIQEgAhAoRQ0AIAJBLkcgABAqcg8LIAELPQECf0EAIQICQEEAKALcCSIDIABLDQAgAC8BACABRw0AAkAgAyAARw0AQQEPCyAAQX5qLwEAECAhAgsgAgtoAQJ/QQEhAQJAAkAgAEFfaiICQQVLDQBBASACdEExcQ0BCyAAQfj/A3FBKEYNACAAQUZqQf//A3FBBkkNAAJAIABBpX9qIgJBA0sNACACQQFHDQELIABBhX9qQf//A3FBBEkhAQsgAQucAQEDf0EAKAKwCiEBAkADQAJAAkAgAS8BACICQS9HDQACQCABLwECIgFBKkYNACABQS9HDQQQGAwCCyAAEBkMAQsCQAJAIABFDQAgAkF3aiIBQRdLDQFBASABdEGfgIAEcUUNAQwCCyACECFFDQMMAQsgAkGgAUcNAgtBAEEAKAKwCiIDQQJqIgE2ArAKIANBACgCtApJDQALCyACCzEBAX9BACEBAkAgAC8BAEEuRw0AIABBfmovAQBBLkcNACAAQXxqLwEAQS5GIQELIAELnAQBAX8CQCABQSJGDQAgAUEnRg0AECUPC0EAKAKwCiEDIAEQGiAAIANBAmpBACgCsApBACgC0AkQAQJAIAJFDQBBACgC8AlBBDYCHAtBAEEAKAKwCkECajYCsAoCQAJAAkACQEEAECkiAUHhAEYNACABQfcARg0BQQAoArAKIQEMAgtBACgCsAoiAUECakHACEEKEC8NAUEGIQAMAgtBACgCsAoiAS8BAkHpAEcNACABLwEEQfQARw0AQQQhACABLwEGQegARg0BC0EAIAFBfmo2ArAKDwtBACABIABBAXRqNgKwCgJAQQEQKUH7AEYNAEEAIAE2ArAKDwtBACgCsAoiAiEAA0BBACAAQQJqNgKwCgJAAkACQEEBECkiAEEiRg0AIABBJ0cNAUEnEBpBAEEAKAKwCkECajYCsApBARApIQAMAgtBIhAaQQBBACgCsApBAmo2ArAKQQEQKSEADAELIAAQLCEACwJAIABBOkYNAEEAIAE2ArAKDwtBAEEAKAKwCkECajYCsAoCQEEBECkiAEEiRg0AIABBJ0YNAEEAIAE2ArAKDwsgABAaQQBBACgCsApBAmo2ArAKAkACQEEBECkiAEEsRg0AIABB/QBGDQFBACABNgKwCg8LQQBBACgCsApBAmo2ArAKQQEQKUH9AEYNAEEAKAKwCiEADAELC0EAKALwCSIBIAI2AhAgAUEAKAKwCkECajYCDAttAQJ/AkACQANAAkAgAEH//wNxIgFBd2oiAkEXSw0AQQEgAnRBn4CABHENAgsgAUGgAUYNASAAIQIgARAoDQJBACECQQBBACgCsAoiAEECajYCsAogAC8BAiIADQAMAgsLIAAhAgsgAkH//wNxC6sBAQR/AkACQEEAKAKwCiICLwEAIgNB4QBGDQAgASEEIAAhBQwBC0EAIAJBBGo2ArAKQQEQKSECQQAoArAKIQUCQAJAIAJBIkYNACACQSdGDQAgAhAsGkEAKAKwCiEEDAELIAIQGkEAQQAoArAKQQJqIgQ2ArAKC0EBECkhA0EAKAKwCiECCwJAIAIgBUYNACAFIARBACAAIAAgAUYiAhtBACABIAIbEAILIAMLcgEEf0EAKAKwCiEAQQAoArQKIQECQAJAA0AgAEECaiECIAAgAU8NAQJAAkAgAi8BACIDQaR/ag4CAQQACyACIQAgA0F2ag4EAgEBAgELIABBBGohAAwACwtBACACNgKwChAlQQAPC0EAIAI2ArAKQd0AC0kBA39BACEDAkAgAkUNAAJAA0AgAC0AACIEIAEtAAAiBUcNASABQQFqIQEgAEEBaiEAIAJBf2oiAg0ADAILCyAEIAVrIQMLIAMLC+wBAgBBgAgLzgEAAHgAcABvAHIAdABtAHAAbwByAHQAZgBvAHIAZQB0AGEAbwB1AHIAYwBlAHIAbwBtAHUAbgBjAHQAaQBvAG4AcwBzAGUAcgB0AHYAbwB5AGkAZQBkAGUAbABlAGMAbwBuAHQAaQBuAGkAbgBzAHQAYQBuAHQAeQBiAHIAZQBhAHIAZQB0AHUAcgBkAGUAYgB1AGcAZwBlAGEAdwBhAGkAdABoAHIAdwBoAGkAbABlAGkAZgBjAGEAdABjAGYAaQBuAGEAbABsAGUAbABzAABB0AkLEAEAAAACAAAAAAQAAEA5AAA=", "undefined" != typeof Buffer ? Buffer.from(E, "base64") : Uint8Array.from(atob(E), ((A2) => A2.charCodeAt(0))))).then(WebAssembly.instantiate).then((({ exports: A2 }) => {
  C = A2;
}));
var E;

// packages/interactivity-router/build-module/assets/dynamic-importmap/fetch.mjs
var fetching = (url, parent) => {
  return ` fetching ${url}${parent ? ` from ${parent}` : ""}`;
};
var jsContentType = /^(text|application)\/(x-)?javascript(;|$)/;
async function fetchModule(url, fetchOpts, parent) {
  let res;
  try {
    res = await fetch(url, fetchOpts);
  } catch (e) {
    throw Error(`Network error${fetching(url, parent)}.`);
  }
  if (!res.ok) {
    throw Error(`Error ${res.status}${fetching(url, parent)}.`);
  }
  const contentType = res.headers.get("content-type");
  if (!jsContentType.test(contentType)) {
    throw Error(
      `Bad Content-Type "${contentType}"${fetching(url, parent)}.`
    );
  }
  return { responseUrl: res.url, source: await res.text() };
}

// packages/interactivity-router/build-module/assets/dynamic-importmap/loader.mjs
var initPromise = init;
var initialImportMapElement = window.document.querySelector(
  "script#wp-importmap[type=importmap]"
);
var initialImportMap = initialImportMapElement ? JSON.parse(initialImportMapElement.text) : { imports: {}, scopes: {} };
var skip = (id) => Object.keys(initialImportMap.imports).includes(id);
var fetchCache = {};
var registry = {};
Object.keys(initialImportMap.imports).forEach((id) => {
  registry[id] = {
    blobUrl: id
  };
});
async function loadAll(load, seen) {
  if (load.blobUrl || seen[load.url]) {
    return;
  }
  seen[load.url] = 1;
  await load.linkPromise;
  await Promise.all(load.deps.map((dep) => loadAll(dep, seen)));
}
function urlJsString(url) {
  return `'${url.replace(/'/g, "\\'")}'`;
}
var createBlob = (source, type = "text/javascript") => URL.createObjectURL(new Blob([source], { type }));
function resolveDeps(load, seen) {
  if (load.blobUrl || !seen[load.url]) {
    return;
  }
  seen[load.url] = 0;
  for (const dep of load.deps) {
    resolveDeps(dep, seen);
  }
  const [imports, exports] = load.analysis;
  const source = load.source;
  let resolvedSource = "";
  if (!imports.length) {
    resolvedSource += source;
  } else {
    let pushStringTo = function(originalIndex) {
      while (dynamicImportEndStack.length && dynamicImportEndStack[dynamicImportEndStack.length - 1] < originalIndex) {
        const dynamicImportEnd = dynamicImportEndStack.pop();
        resolvedSource += `${source.slice(
          lastIndex,
          dynamicImportEnd
        )}, ${urlJsString(load.responseUrl)}`;
        lastIndex = dynamicImportEnd;
      }
      resolvedSource += source.slice(lastIndex, originalIndex);
      lastIndex = originalIndex;
    };
    let lastIndex = 0;
    let depIndex = 0;
    const dynamicImportEndStack = [];
    for (const {
      s: start,
      ss: statementStart,
      se: statementEnd,
      d: dynamicImportIndex
    } of imports) {
      if (dynamicImportIndex === -1) {
        const depLoad = load.deps[depIndex++];
        let blobUrl = depLoad.blobUrl;
        const cycleShell = !blobUrl;
        if (cycleShell) {
          if (!(blobUrl = depLoad.shellUrl)) {
            blobUrl = depLoad.shellUrl = createBlob(
              `export function u$_(m){${depLoad.analysis[1].map(({ s, e }, i) => {
                const q = depLoad.source[s] === '"' || depLoad.source[s] === "'";
                return `e$_${i}=m${q ? `[` : "."}${depLoad.source.slice(s, e)}${q ? `]` : ""}`;
              }).join(",")}}${depLoad.analysis[1].length ? `let ${depLoad.analysis[1].map((_, i) => `e$_${i}`).join(",")};` : ""}export {${depLoad.analysis[1].map(
                ({ s, e }, i) => `e$_${i} as ${depLoad.source.slice(
                  s,
                  e
                )}`
              ).join(",")}}
//# sourceURL=${depLoad.responseUrl}?cycle`
            );
          }
        }
        pushStringTo(start - 1);
        resolvedSource += `/*${source.slice(
          start - 1,
          statementEnd
        )}*/${urlJsString(blobUrl)}`;
        if (!cycleShell && depLoad.shellUrl) {
          resolvedSource += `;import*as m$_${depIndex} from'${depLoad.blobUrl}';import{u$_ as u$_${depIndex}}from'${depLoad.shellUrl}';u$_${depIndex}(m$_${depIndex})`;
          depLoad.shellUrl = void 0;
        }
        lastIndex = statementEnd;
      } else if (dynamicImportIndex === -2) {
        throw Error("The import.meta property is not supported.");
      } else {
        pushStringTo(statementStart);
        resolvedSource += `wpInteractivityRouterImport(`;
        dynamicImportEndStack.push(statementEnd - 1);
        lastIndex = start;
      }
    }
    if (load.shellUrl) {
      resolvedSource += `
;import{u$_}from'${load.shellUrl}';try{u$_({${exports.filter((e) => e.ln).map(({ s, e, ln }) => `${source.slice(s, e)}:${ln}`).join(",")}})}catch(_){};
`;
    }
    pushStringTo(source.length);
  }
  let hasSourceURL = false;
  resolvedSource = resolvedSource.replace(
    sourceMapURLRegEx,
    (match, isMapping, url) => {
      hasSourceURL = !isMapping;
      return match.replace(
        url,
        () => new URL(url, load.responseUrl).toString()
      );
    }
  );
  if (!hasSourceURL) {
    resolvedSource += "\n//# sourceURL=" + load.responseUrl;
  }
  load.blobUrl = createBlob(resolvedSource);
  load.source = void 0;
}
var sourceMapURLRegEx = /\n\/\/# source(Mapping)?URL=([^\n]+)\s*((;|\/\/[^#][^\n]*)\s*)*$/;
function getOrCreateLoad(url, fetchOpts, parent) {
  let load = registry[url];
  if (load) {
    return load;
  }
  load = { url };
  if (registry[url]) {
    let i = 0;
    while (registry[load.url + ++i]) {
    }
    load.url += i;
  }
  registry[load.url] = load;
  load.fetchPromise = (async () => {
    let source;
    ({ responseUrl: load.responseUrl, source } = await (fetchCache[url] || fetchModule(url, fetchOpts, parent)));
    try {
      load.analysis = parse(source, load.url);
    } catch (e) {
      console.error(e);
      load.analysis = [[], [], false, false];
    }
    load.source = source;
    return load;
  })();
  load.linkPromise = load.fetchPromise.then(async () => {
    let childFetchOpts = fetchOpts;
    load.deps = (await Promise.all(
      load.analysis[0].map(async ({ n, d }) => {
        if (d !== -1 || !n) {
          return void 0;
        }
        const responseUrl = resolve(
          n,
          load.responseUrl || load.url
        );
        if (skip && skip(responseUrl)) {
          return { blobUrl: responseUrl };
        }
        if (childFetchOpts.integrity) {
          childFetchOpts = {
            ...childFetchOpts,
            integrity: void 0
          };
        }
        return getOrCreateLoad(
          responseUrl,
          childFetchOpts,
          load.responseUrl
        ).fetchPromise;
      })
    )).filter((l) => l);
  });
  return load;
}
var dynamicImport = (u) => import(
  /* webpackIgnore: true */
  u
);
async function preloadModule(url, fetchOpts) {
  await initPromise;
  const load = getOrCreateLoad(url, fetchOpts, null);
  const seen = {};
  await loadAll(load, seen);
  resolveDeps(load, seen);
  await Promise.resolve();
  return load;
}
async function importPreloadedModule(load) {
  const module = await dynamicImport(load.blobUrl);
  if (load.shellUrl) {
    (await dynamicImport(load.shellUrl)).u$_(module);
  }
  return module;
}
async function topLevelLoad(url, fetchOpts) {
  const load = await preloadModule(url, fetchOpts);
  return importPreloadedModule(load);
}

// packages/interactivity-router/build-module/assets/dynamic-importmap/index.mjs
var baseUrl2 = document.baseURI;
var pageBaseUrl2 = baseUrl2;
Object.defineProperty(self, "wpInteractivityRouterImport", {
  value: importShim,
  writable: false,
  enumerable: false,
  configurable: false
});
async function importShim(id) {
  await initPromise;
  return topLevelLoad(resolve(id, pageBaseUrl2), {
    credentials: "same-origin"
  });
}
async function preloadWithMap(id, importMapIn) {
  addImportMap(importMapIn);
  await initPromise;
  return preloadModule(resolve(id, pageBaseUrl2), {
    credentials: "same-origin"
  });
}

// packages/interactivity-router/build-module/assets/script-modules.mjs
var resolvedScriptModules = /* @__PURE__ */ new Set();
var markScriptModuleAsResolved = (url) => {
  resolvedScriptModules.add(url);
};
var preloadScriptModules = (doc) => {
  const importMapElement = doc.querySelector(
    "script#wp-importmap[type=importmap]"
  );
  const importMap2 = importMapElement ? JSON.parse(importMapElement.text) : { imports: {}, scopes: {} };
  for (const key in initialImportMap.imports) {
    delete importMap2.imports[key];
  }
  const moduleUrls = [
    ...doc.querySelectorAll(
      "script[type=module][src][data-wp-router-options]"
    )
  ].filter((script) => {
    try {
      const parsed = JSON.parse(
        script.getAttribute("data-wp-router-options")
      );
      return parsed?.loadOnClientNavigation === true;
    } catch {
      return false;
    }
  }).map((script) => script.src);
  return moduleUrls.filter((url) => !resolvedScriptModules.has(url)).map((url) => preloadWithMap(url, importMap2));
};
var importScriptModules = (modules) => Promise.all(modules.map((m) => importPreloadedModule(m)));

// packages/interactivity-router/build-module/index.mjs
var {
  getRegionRootFragment,
  initialVdomPromise,
  toVdom,
  render,
  parseServerData,
  populateServerData,
  batch,
  routerRegions,
  h: createElement,
  navigationSignal,
  sessionId,
  warn
} = privateApis(
  "I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress."
);
var regionAttr = `data-wp-router-region`;
var interactiveAttr = `data-wp-interactive`;
var regionsSelector = `[${interactiveAttr}][${regionAttr}], [${interactiveAttr}] [${interactiveAttr}][${regionAttr}]`;
var pages = /* @__PURE__ */ new Map();
var getPagePath = (url) => {
  const u = new URL(url, window.location.href);
  return u.pathname + u.search;
};
var parseRegionAttribute = (region) => {
  const value = region.getAttribute(regionAttr);
  try {
    const { id, attachTo } = JSON.parse(value);
    return { id, attachTo };
  } catch (e) {
    return { id: value };
  }
};
var cloneRouterRegionContent = (vdom) => {
  if (!vdom) {
    return vdom;
  }
  const allPriorityLevels = vdom.props.priorityLevels;
  const routerRegionLevel = allPriorityLevels.findIndex(
    (level) => level.includes("router-region")
  );
  const priorityLevels = routerRegionLevel !== -1 ? allPriorityLevels.slice(routerRegionLevel + 1) : allPriorityLevels;
  return priorityLevels.length > 0 ? createElement(vdom.type, {
    ...vdom.props,
    priorityLevels
  }) : vdom.props.element;
};
var regionsToAttachByParent = /* @__PURE__ */ new WeakMap();
var rootFragmentsByParent = /* @__PURE__ */ new WeakMap();
var initialRegionsToAttach = /* @__PURE__ */ new Set();
var fetchPage = async (url, { html }) => {
  try {
    if (!html) {
      const res = await window.fetch(url);
      if (res.status !== 200) {
        return false;
      }
      html = await res.text();
    }
    const dom = new window.DOMParser().parseFromString(html, "text/html");
    return await preparePage(url, dom);
  } catch (e) {
    return false;
  }
};
var preparePage = async (url, dom, { vdom } = {}) => {
  dom.querySelectorAll("noscript").forEach((el) => el.remove());
  const regions = {};
  const regionsToAttach = {};
  dom.querySelectorAll(regionsSelector).forEach((region) => {
    const { id, attachTo } = parseRegionAttribute(region);
    if (region.parentElement.closest(`[${regionAttr}]`)) {
      regions[id] = void 0;
    } else {
      regions[id] = vdom?.has(region) ? vdom.get(region) : toVdom(region);
    }
    if (attachTo && !initialRegionsToAttach.has(id)) {
      regionsToAttach[id] = attachTo;
    }
  });
  const title = dom.querySelector("title")?.innerText;
  const initialData = parseServerData(dom);
  const [styles, scriptModules] = await Promise.all([
    Promise.all(preloadStyles(dom)),
    Promise.all(preloadScriptModules(dom))
  ]);
  return {
    regions,
    regionsToAttach,
    styles,
    scriptModules,
    title,
    initialData,
    url
  };
};
var renderPage = (page) => {
  applyStyles(page.styles);
  const regionsToAttach = { ...page.regionsToAttach };
  batch(() => {
    populateServerData(page.initialData);
    navigationSignal.value += 1;
    routerRegions.forEach((signal) => {
      signal.value = null;
    });
    const parentsToUpdate = /* @__PURE__ */ new Set();
    for (const id in regionsToAttach) {
      const parent = document.querySelector(regionsToAttach[id]);
      if (!regionsToAttachByParent.has(parent)) {
        regionsToAttachByParent.set(parent, []);
      }
      const regions = regionsToAttachByParent.get(parent);
      if (!regions.includes(id)) {
        regions.push(id);
        parentsToUpdate.add(parent);
      }
    }
    for (const id in page.regions) {
      if (routerRegions.has(id)) {
        routerRegions.get(id).value = cloneRouterRegionContent(
          page.regions[id]
        );
      }
    }
    parentsToUpdate.forEach((parent) => {
      const ids = regionsToAttachByParent.get(parent);
      const vdoms = ids.map((id) => page.regions[id]);
      if (!rootFragmentsByParent.has(parent)) {
        const regions = vdoms.map(({ props, type }) => {
          const elementType = typeof type === "function" ? props.type : type;
          const region = document.createElement(elementType);
          parent.appendChild(region);
          return region;
        });
        rootFragmentsByParent.set(
          parent,
          getRegionRootFragment(regions)
        );
      }
      const fragment = rootFragmentsByParent.get(parent);
      render(vdoms, fragment);
    });
  });
  if (page.title) {
    document.title = page.title;
  }
};
var forcePageReload = (href) => {
  window.location.assign(href);
  return new Promise(() => {
  });
};
window.addEventListener("popstate", async () => {
  const pagePath = getPagePath(window.location.href);
  const page = pages.has(pagePath) && await pages.get(pagePath);
  if (page) {
    batch(() => {
      state.url = window.location.href;
      renderPage(page);
    });
  } else {
    window.location.reload();
  }
});
document.querySelectorAll(regionsSelector).forEach((region) => {
  const { id, attachTo } = parseRegionAttribute(region);
  if (attachTo) {
    initialRegionsToAttach.add(id);
  }
});
window.document.querySelectorAll("script[type=module][src]").forEach(({ src }) => markScriptModuleAsResolved(src));
(async () => {
  const initialVdomMap = await initialVdomPromise;
  pages.set(
    getPagePath(window.location.href),
    Promise.resolve(
      preparePage(getPagePath(window.location.href), document, {
        vdom: initialVdomMap
      })
    )
  );
})();
var navigatingTo = "";
var hasLoadedNavigationTextsData = false;
var navigationTexts = {
  loading: "Loading page, please wait.",
  loaded: "Page Loaded."
};
var { state: privateState } = store(
  "core/router/private",
  {
    state: {
      navigation: {
        hasStarted: false,
        hasFinished: false
      }
    }
  },
  { lock: true }
);
var { state, actions } = store("core/router", {
  state: {
    get navigation() {
      if (true) {
        warn(
          `The usage of state.navigation.{hasStarted|hasFinished} from core/router is deprecated and will stop working in WordPress 7.1.`
        );
      }
      return privateState.navigation;
    }
  },
  actions: {
    /**
     * Navigates to the specified page.
     *
     * This function normalizes the passed href, fetches the page HTML if
     * needed, and updates any interactive regions whose contents have
     * changed. It also creates a new entry in the browser session history.
     *
     * @param href                               The page href.
     * @param [options]                          Options object.
     * @param [options.force]                    If true, it forces re-fetching the URL.
     * @param [options.html]                     HTML string to be used instead of fetching the requested URL.
     * @param [options.replace]                  If true, it replaces the current entry in the browser session history.
     * @param [options.timeout]                  Time until the navigation is aborted, in milliseconds. Default is 10000.
     * @param [options.loadingAnimation]         Whether an animation should be shown while navigating. Default to `true`.
     * @param [options.screenReaderAnnouncement] Whether a message for screen readers should be announced while navigating. Default to `true`.
     *
     * @return  Promise that resolves once the navigation is completed or aborted.
     */
    *navigate(href, options = {}) {
      const { clientNavigationDisabled } = getConfig();
      if (clientNavigationDisabled) {
        yield forcePageReload(href);
      }
      const pagePath = getPagePath(href);
      const { navigation } = privateState;
      const {
        loadingAnimation = true,
        screenReaderAnnouncement = true,
        timeout = 1e4
      } = options;
      navigatingTo = href;
      actions.prefetch(pagePath, options);
      const timeoutPromise = new Promise(
        (resolve2) => setTimeout(resolve2, timeout)
      );
      const loadingTimeout = setTimeout(() => {
        if (navigatingTo !== href) {
          return;
        }
        if (loadingAnimation) {
          navigation.hasStarted = true;
          navigation.hasFinished = false;
        }
        if (screenReaderAnnouncement) {
          a11ySpeak("loading");
        }
      }, 400);
      const page = yield Promise.race([
        pages.get(pagePath),
        timeoutPromise
      ]);
      clearTimeout(loadingTimeout);
      if (navigatingTo !== href) {
        return;
      }
      if (page && !page.initialData?.config?.["core/router"]?.clientNavigationDisabled) {
        yield importScriptModules(page.scriptModules);
        batch(() => {
          state.url = href;
          if (loadingAnimation) {
            navigation.hasStarted = false;
            navigation.hasFinished = true;
          }
          renderPage(page);
        });
        window.history[options.replace ? "replaceState" : "pushState"]({ wpInteractivityId: sessionId }, "", href);
        if (screenReaderAnnouncement) {
          a11ySpeak("loaded");
        }
        const { hash } = new URL(href, window.location.href);
        if (hash) {
          document.querySelector(hash)?.scrollIntoView();
        }
      } else {
        yield forcePageReload(href);
      }
    },
    /**
     * Prefetches the page with the passed URL.
     *
     * The function normalizes the URL and stores internally the fetch
     * promise, to avoid triggering a second fetch for an ongoing request.
     *
     * @param url             The page URL.
     * @param [options]       Options object.
     * @param [options.force] Force fetching the URL again.
     * @param [options.html]  HTML string to be used instead of fetching the requested URL.
     *
     * @return  Promise that resolves once the page has been fetched.
     */
    *prefetch(url, options = {}) {
      const { clientNavigationDisabled } = getConfig();
      if (clientNavigationDisabled) {
        return;
      }
      const pagePath = getPagePath(url);
      if (options.force || !pages.has(pagePath)) {
        pages.set(
          pagePath,
          fetchPage(pagePath, { html: options.html })
        );
      }
      yield pages.get(pagePath);
    }
  }
});
state.url = state.url || window.location.href;
function a11ySpeak(messageKey) {
  if (!hasLoadedNavigationTextsData) {
    hasLoadedNavigationTextsData = true;
    const content = document.getElementById(
      "wp-script-module-data-@wordpress/interactivity-router"
    )?.textContent;
    if (content) {
      try {
        const parsed = JSON.parse(content);
        if (typeof parsed?.i18n?.loading === "string") {
          navigationTexts.loading = parsed.i18n.loading;
        }
        if (typeof parsed?.i18n?.loaded === "string") {
          navigationTexts.loaded = parsed.i18n.loaded;
        }
      } catch {
      }
    } else {
      if (state.navigation.texts?.loading) {
        navigationTexts.loading = state.navigation.texts.loading;
      }
      if (state.navigation.texts?.loaded) {
        navigationTexts.loaded = state.navigation.texts.loaded;
      }
    }
  }
  const message = navigationTexts[messageKey];
  import("@wordpress/a11y").then(
    ({ speak }) => speak(message),
    // Ignore failures to load the a11y module.
    () => {
    }
  );
}
export {
  actions,
  state
};
                                                                                                                        dist/script-modules/interactivity-router/index.min.js                                               0000644                 00000062100 15212564025 0017125 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       import{store as mA,privateApis as jA,getConfig as uA}from"@wordpress/interactivity";function V(A,e,t=(Q,o)=>Q===o){let Q=A.length,o=e.length,B=Array.from({length:Q+1},()=>Array(o+1).fill(null));for(let E=0;E<=Q;E++)B[E][0]=A.slice(0,E);for(let E=0;E<=o;E++)B[0][E]=e.slice(0,E);for(let E=1;E<=Q;E++)for(let i=1;i<=o;i++)if(t(A[E-1],e[i-1]))B[E][i]=B[E-1][i-1].concat(A[E-1]);else{let s=B[E-1][i].concat(A[E-1]),C=B[E][i-1].concat(e[i-1]);B[E][i]=s.length<=C.length?s:C}return B[Q][o]}var U=(A,e)=>A.isEqualNode(e),W=A=>{A=A.cloneNode(!0);let e=A.media,{originalMedia:t}=A.dataset;return e==="preload"?(A.media=t||"all",A.removeAttribute("data-original-media")):A.media||(A.media="all"),A};function RA(A,e,t=window.document.head){if(A.length===0)return e.map(c=>{let I=M(c);return t.appendChild(c),I});let Q=A.map(W),o=e.map(W),B=V(Q,o,U),E=A.length,i=e.length,s=[],C=A[E-1],g=0,r=0;for(let c of B){let I=A[g],l=e[r],n=Q[g],f=o[r];g<E&&U(n,c)?(r<i&&U(f,c)&&(s.push(M(I)),r++),g++):(s.push(M(l)),g<E?I.before(l):(C.after(l),C=l),r++)}return s}var K=new WeakMap,M=A=>{if(K.has(A))return K.get(A);if(window.document.contains(A)&&A.media!=="preload"){let t=Promise.resolve(A);return K.set(A,t),t}if(A.hasAttribute("media")&&A.media!=="all"&&(A.dataset.originalMedia=A.media),A.media="preload",A instanceof HTMLStyleElement){let t=Promise.resolve(A);return K.set(A,t),t}let e=new Promise((t,Q)=>{A.addEventListener("load",()=>t(A)),A.addEventListener("error",o=>{let{href:B}=o.target;Q(Error(`The style sheet with the following URL failed to load: ${B}`))})});return K.set(A,e),e},z=A=>{let e=Array.from(window.document.querySelectorAll("style,link[rel=stylesheet]")),t=Array.from(A.querySelectorAll("style,link[rel=stylesheet]"));return RA(e,t)},_=A=>{window.document.querySelectorAll("style,link[rel=stylesheet]").forEach(e=>{if(e.sheet)if(A.includes(e)){if(e.sheet.media.mediaText==="preload"){let{originalMedia:t="all"}=e.dataset;e.sheet.media.mediaText=t}e.sheet.disabled=!1}else e.sheet.disabled=!0})};var SA=/\\/g;function UA(A){if(A.indexOf(":")===-1)return!1;try{return new URL(A),!0}catch{return!1}}function k(A,e){let t=e.indexOf("#"),Q=e.indexOf("?");if(t+Q>-2&&(e=e.slice(0,t===-1?Q:Q===-1||Q>t?t:Q)),A.indexOf("\\")!==-1&&(A=A.replace(SA,"/")),A[0]==="/"&&A[1]==="/")return e.slice(0,e.indexOf(":")+1)+A;if(A[0]==="."&&(A[1]==="/"||A[1]==="."&&(A[2]==="/"||A.length===2&&(A+="/"))||A.length===1&&(A+="/"))||A[0]==="/"){let o=e.slice(0,e.indexOf(":")+1),B;if(e[o.length+1]==="/"?o!=="file:"?(B=e.slice(o.length+2),B=B.slice(B.indexOf("/")+1)):B=e.slice(8):B=e.slice(o.length+(e[o.length]==="/")),A[0]==="/")return e.slice(0,e.length-B.length-1)+A;let E=B.slice(0,B.lastIndexOf("/")+1)+A,i=[],s=-1;for(let C=0;C<E.length;C++){if(s!==-1){E[C]==="/"&&(i.push(E.slice(s,C+1)),s=-1);continue}else if(E[C]==="."){if(E[C+1]==="."&&(E[C+2]==="/"||C+2===E.length)){i.pop(),C+=2;continue}else if(E[C+1]==="/"||C+1===E.length){C+=1;continue}}for(;E[C]==="/";)C++;s=C}return s!==-1&&i.push(E.slice(s)),e.slice(0,e.length-B.length)+i.join("")}}function MA(A,e){return k(A,e)||(UA(A)?A:k("./"+A,e))}function F(A,e){if(e[A])return A;let t=A.length;do{let Q=A.slice(0,t+1);if(Q in e)return Q}while((t=A.lastIndexOf("/",t-1))!==-1)}function AA(A,e){let t=F(A,e);if(t){let Q=e[t];return Q===null?void 0:Q+A.slice(t.length)}}function QA(A,e,t){let Q=t&&F(t,A.scopes);for(;Q;){let o=AA(e,A.scopes[Q]);if(o)return o;Q=F(Q.slice(0,Q.lastIndexOf("/")),A.scopes)}return AA(e,A.imports)||e.indexOf(":")!==-1&&e}function eA(A,e,t,Q){for(let o in A){let B=k(o,t)||o,E=A[o];if(typeof E!="string")continue;let i=QA(Q,k(E,t)||E,t);if(i){e[B]=i;continue}}}function FA(A,e,t){let Q={imports:Object.assign({},t.imports),scopes:Object.assign({},t.scopes)};if(A.imports&&eA(A.imports,Q.imports,e,t),A.scopes)for(let o in A.scopes){let B=MA(o,e);eA(A.scopes[o],Q.scopes[B]||(Q.scopes[B]={}),e,t)}return Q}var G={imports:{},scopes:{}},GA=document.baseURI,YA=GA;function tA(A){G=FA(A,YA,G)}function D(A,e){let t=k(A,e);return QA(G,t||A,e)||A}var oA;(function(A){A[A.Static=1]="Static",A[A.Dynamic=2]="Dynamic",A[A.ImportMeta=3]="ImportMeta",A[A.StaticSourcePhase=4]="StaticSourcePhase",A[A.DynamicSourcePhase=5]="DynamicSourcePhase"})(oA||(oA={}));var qA=new Uint8Array(new Uint16Array([1]).buffer)[0]===1;function q(A,e="@"){if(!a)return x.then((()=>q(A)));let t=A.length+1,Q=(a.__heap_base.value||a.__heap_base)+4*t-a.memory.buffer.byteLength;Q>0&&a.memory.grow(Math.ceil(Q/65536));let o=a.sa(t-1);if((qA?HA:xA)(A,new Uint16Array(a.memory.buffer,o,t)),!a.parse())throw Object.assign(new Error(`Parse error ${e}:${A.slice(0,a.e()).split(`
`).length}:${a.e()-A.lastIndexOf(`
`,a.e()-1)}`),{idx:a.e()});let B=[],E=[];for(;a.ri();){let s=a.is(),C=a.ie(),g=a.it(),r=a.ai(),c=a.id(),I=a.ss(),l=a.se(),n;a.ip()&&(n=i(A.slice(c===-1?s-1:s,c===-1?C+1:C))),B.push({n,t:g,s,e:C,ss:I,se:l,d:c,a:r})}for(;a.re();){let s=a.es(),C=a.ee(),g=a.els(),r=a.ele(),c=A.slice(s,C),I=c[0],l=g<0?void 0:A.slice(g,r),n=l?l[0]:"";E.push({s,e:C,ls:g,le:r,n:I==='"'||I==="'"?i(c):c,ln:n==='"'||n==="'"?i(l):l})}function i(s){try{return(0,eval)(s)}catch{}}return[B,E,!!a.f(),!!a.ms()]}function xA(A,e){let t=A.length,Q=0;for(;Q<t;){let o=A.charCodeAt(Q);e[Q++]=(255&o)<<8|o>>>8}}function HA(A,e){let t=A.length,Q=0;for(;Q<t;)e[Q]=A.charCodeAt(Q++)}var a,x=WebAssembly.compile((Y="AGFzbQEAAAABKwhgAX8Bf2AEf39/fwBgAAF/YAAAYAF/AGADf39/AX9gAn9/AX9gA39/fwADMTAAAQECAgICAgICAgICAgICAgICAgIAAwMDBAQAAAUAAAAAAAMDAwAGAAAABwAGAgUEBQFwAQEBBQMBAAEGDwJ/AUHA8gALfwBBwPIACwd6FQZtZW1vcnkCAAJzYQAAAWUAAwJpcwAEAmllAAUCc3MABgJzZQAHAml0AAgCYWkACQJpZAAKAmlwAAsCZXMADAJlZQANA2VscwAOA2VsZQAPAnJpABACcmUAEQFmABICbXMAEwVwYXJzZQAUC19faGVhcF9iYXNlAwEKm0EwaAEBf0EAIAA2AoAKQQAoAtwJIgEgAEEBdGoiAEEAOwEAQQAgAEECaiIANgKECkEAIAA2AogKQQBBADYC4AlBAEEANgLwCUEAQQA2AugJQQBBADYC5AlBAEEANgL4CUEAQQA2AuwJIAEL0wEBA39BACgC8AkhBEEAQQAoAogKIgU2AvAJQQAgBDYC9AlBACAFQSRqNgKICiAEQSBqQeAJIAQbIAU2AgBBACgC1AkhBEEAKALQCSEGIAUgATYCACAFIAA2AgggBSACIAJBAmpBACAGIANGIgAbIAQgA0YiBBs2AgwgBSADNgIUIAVBADYCECAFIAI2AgQgBUEANgIgIAVBA0EBQQIgABsgBBs2AhwgBUEAKALQCSADRiICOgAYAkACQCACDQBBACgC1AkgA0cNAQtBAEEBOgCMCgsLXgEBf0EAKAL4CSIEQRBqQeQJIAQbQQAoAogKIgQ2AgBBACAENgL4CUEAIARBFGo2AogKQQBBAToAjAogBEEANgIQIAQgAzYCDCAEIAI2AgggBCABNgIEIAQgADYCAAsIAEEAKAKQCgsVAEEAKALoCSgCAEEAKALcCWtBAXULHgEBf0EAKALoCSgCBCIAQQAoAtwJa0EBdUF/IAAbCxUAQQAoAugJKAIIQQAoAtwJa0EBdQseAQF/QQAoAugJKAIMIgBBACgC3AlrQQF1QX8gABsLCwBBACgC6AkoAhwLHgEBf0EAKALoCSgCECIAQQAoAtwJa0EBdUF/IAAbCzsBAX8CQEEAKALoCSgCFCIAQQAoAtAJRw0AQX8PCwJAIABBACgC1AlHDQBBfg8LIABBACgC3AlrQQF1CwsAQQAoAugJLQAYCxUAQQAoAuwJKAIAQQAoAtwJa0EBdQsVAEEAKALsCSgCBEEAKALcCWtBAXULHgEBf0EAKALsCSgCCCIAQQAoAtwJa0EBdUF/IAAbCx4BAX9BACgC7AkoAgwiAEEAKALcCWtBAXVBfyAAGwslAQF/QQBBACgC6AkiAEEgakHgCSAAGygCACIANgLoCSAAQQBHCyUBAX9BAEEAKALsCSIAQRBqQeQJIAAbKAIAIgA2AuwJIABBAEcLCABBAC0AlAoLCABBAC0AjAoL3Q0BBX8jAEGA0ABrIgAkAEEAQQE6AJQKQQBBACgC2Ak2ApwKQQBBACgC3AlBfmoiATYCsApBACABQQAoAoAKQQF0aiICNgK0CkEAQQA6AIwKQQBBADsBlgpBAEEAOwGYCkEAQQA6AKAKQQBBADYCkApBAEEAOgD8CUEAIABBgBBqNgKkCkEAIAA2AqgKQQBBADoArAoCQAJAAkACQANAQQAgAUECaiIDNgKwCiABIAJPDQECQCADLwEAIgJBd2pBBUkNAAJAAkACQAJAAkAgAkGbf2oOBQEICAgCAAsgAkEgRg0EIAJBL0YNAyACQTtGDQIMBwtBAC8BmAoNASADEBVFDQEgAUEEakGCCEEKEC8NARAWQQAtAJQKDQFBAEEAKAKwCiIBNgKcCgwHCyADEBVFDQAgAUEEakGMCEEKEC8NABAXC0EAQQAoArAKNgKcCgwBCwJAIAEvAQQiA0EqRg0AIANBL0cNBBAYDAELQQEQGQtBACgCtAohAkEAKAKwCiEBDAALC0EAIQIgAyEBQQAtAPwJDQIMAQtBACABNgKwCkEAQQA6AJQKCwNAQQAgAUECaiIDNgKwCgJAAkACQAJAAkACQAJAIAFBACgCtApPDQAgAy8BACICQXdqQQVJDQYCQAJAAkACQAJAAkACQAJAAkACQCACQWBqDgoQDwYPDw8PBQECAAsCQAJAAkACQCACQaB/ag4KCxISAxIBEhISAgALIAJBhX9qDgMFEQYJC0EALwGYCg0QIAMQFUUNECABQQRqQYIIQQoQLw0QEBYMEAsgAxAVRQ0PIAFBBGpBjAhBChAvDQ8QFwwPCyADEBVFDQ4gASkABELsgISDsI7AOVINDiABLwEMIgNBd2oiAUEXSw0MQQEgAXRBn4CABHFFDQwMDQtBAEEALwGYCiIBQQFqOwGYCkEAKAKkCiABQQN0aiIBQQE2AgAgAUEAKAKcCjYCBAwNC0EALwGYCiIDRQ0JQQAgA0F/aiIDOwGYCkEALwGWCiICRQ0MQQAoAqQKIANB//8DcUEDdGooAgBBBUcNDAJAIAJBAnRBACgCqApqQXxqKAIAIgMoAgQNACADQQAoApwKQQJqNgIEC0EAIAJBf2o7AZYKIAMgAUEEajYCDAwMCwJAQQAoApwKIgEvAQBBKUcNAEEAKALwCSIDRQ0AIAMoAgQgAUcNAEEAQQAoAvQJIgM2AvAJAkAgA0UNACADQQA2AiAMAQtBAEEANgLgCQtBAEEALwGYCiIDQQFqOwGYCkEAKAKkCiADQQN0aiIDQQZBAkEALQCsChs2AgAgAyABNgIEQQBBADoArAoMCwtBAC8BmAoiAUUNB0EAIAFBf2oiATsBmApBACgCpAogAUH//wNxQQN0aigCAEEERg0EDAoLQScQGgwJC0EiEBoMCAsgAkEvRw0HAkACQCABLwEEIgFBKkYNACABQS9HDQEQGAwKC0EBEBkMCQsCQAJAAkACQEEAKAKcCiIBLwEAIgMQG0UNAAJAAkAgA0FVag4EAAkBAwkLIAFBfmovAQBBK0YNAwwICyABQX5qLwEAQS1GDQIMBwsgA0EpRw0BQQAoAqQKQQAvAZgKIgJBA3RqKAIEEBxFDQIMBgsgAUF+ai8BAEFQakH//wNxQQpPDQULQQAvAZgKIQILAkACQCACQf//A3EiAkUNACADQeYARw0AQQAoAqQKIAJBf2pBA3RqIgQoAgBBAUcNACABQX5qLwEAQe8ARw0BIAQoAgRBlghBAxAdRQ0BDAULIANB/QBHDQBBACgCpAogAkEDdGoiAigCBBAeDQQgAigCAEEGRg0ECyABEB8NAyADRQ0DIANBL0ZBAC0AoApBAEdxDQMCQEEAKAL4CSICRQ0AIAEgAigCAEkNACABIAIoAgRNDQQLIAFBfmohAUEAKALcCSECAkADQCABQQJqIgQgAk0NAUEAIAE2ApwKIAEvAQAhAyABQX5qIgQhASADECBFDQALIARBAmohBAsCQCADQf//A3EQIUUNACAEQX5qIQECQANAIAFBAmoiAyACTQ0BQQAgATYCnAogAS8BACEDIAFBfmoiBCEBIAMQIQ0ACyAEQQJqIQMLIAMQIg0EC0EAQQE6AKAKDAcLQQAoAqQKQQAvAZgKIgFBA3QiA2pBACgCnAo2AgRBACABQQFqOwGYCkEAKAKkCiADakEDNgIACxAjDAULQQAtAPwJQQAvAZYKQQAvAZgKcnJFIQIMBwsQJEEAQQA6AKAKDAMLECVBACECDAULIANBoAFHDQELQQBBAToArAoLQQBBACgCsAo2ApwKC0EAKAKwCiEBDAALCyAAQYDQAGokACACCxoAAkBBACgC3AkgAEcNAEEBDwsgAEF+ahAmC/4KAQZ/QQBBACgCsAoiAEEMaiIBNgKwCkEAKAL4CSECQQEQKSEDAkACQAJAAkACQAJAAkACQAJAQQAoArAKIgQgAUcNACADEChFDQELAkACQAJAAkACQAJAAkAgA0EqRg0AIANB+wBHDQFBACAEQQJqNgKwCkEBECkhA0EAKAKwCiEEA0ACQAJAIANB//8DcSIDQSJGDQAgA0EnRg0AIAMQLBpBACgCsAohAwwBCyADEBpBAEEAKAKwCkECaiIDNgKwCgtBARApGgJAIAQgAxAtIgNBLEcNAEEAQQAoArAKQQJqNgKwCkEBECkhAwsgA0H9AEYNA0EAKAKwCiIFIARGDQ8gBSEEIAVBACgCtApNDQAMDwsLQQAgBEECajYCsApBARApGkEAKAKwCiIDIAMQLRoMAgtBAEEAOgCUCgJAAkACQAJAAkACQCADQZ9/ag4MAgsEAQsDCwsLCwsFAAsgA0H2AEYNBAwKC0EAIARBDmoiAzYCsAoCQAJAAkBBARApQZ9/ag4GABICEhIBEgtBACgCsAoiBSkAAkLzgOSD4I3AMVINESAFLwEKECFFDRFBACAFQQpqNgKwCkEAECkaC0EAKAKwCiIFQQJqQbIIQQ4QLw0QIAUvARAiAkF3aiIBQRdLDQ1BASABdEGfgIAEcUUNDQwOC0EAKAKwCiIFKQACQuyAhIOwjsA5Ug0PIAUvAQoiAkF3aiIBQRdNDQYMCgtBACAEQQpqNgKwCkEAECkaQQAoArAKIQQLQQAgBEEQajYCsAoCQEEBECkiBEEqRw0AQQBBACgCsApBAmo2ArAKQQEQKSEEC0EAKAKwCiEDIAQQLBogA0EAKAKwCiIEIAMgBBACQQBBACgCsApBfmo2ArAKDwsCQCAEKQACQuyAhIOwjsA5Ug0AIAQvAQoQIEUNAEEAIARBCmo2ArAKQQEQKSEEQQAoArAKIQMgBBAsGiADQQAoArAKIgQgAyAEEAJBAEEAKAKwCkF+ajYCsAoPC0EAIARBBGoiBDYCsAoLQQAgBEEGajYCsApBAEEAOgCUCkEBECkhBEEAKAKwCiEDIAQQLCEEQQAoArAKIQIgBEHf/wNxIgFB2wBHDQNBACACQQJqNgKwCkEBECkhBUEAKAKwCiEDQQAhBAwEC0EAQQE6AIwKQQBBACgCsApBAmo2ArAKC0EBECkhBEEAKAKwCiEDAkAgBEHmAEcNACADQQJqQawIQQYQLw0AQQAgA0EIajYCsAogAEEBEClBABArIAJBEGpB5AkgAhshAwNAIAMoAgAiA0UNBSADQgA3AgggA0EQaiEDDAALC0EAIANBfmo2ArAKDAMLQQEgAXRBn4CABHFFDQMMBAtBASEECwNAAkACQCAEDgIAAQELIAVB//8DcRAsGkEBIQQMAQsCQAJAQQAoArAKIgQgA0YNACADIAQgAyAEEAJBARApIQQCQCABQdsARw0AIARBIHJB/QBGDQQLQQAoArAKIQMCQCAEQSxHDQBBACADQQJqNgKwCkEBECkhBUEAKAKwCiEDIAVBIHJB+wBHDQILQQAgA0F+ajYCsAoLIAFB2wBHDQJBACACQX5qNgKwCg8LQQAhBAwACwsPCyACQaABRg0AIAJB+wBHDQQLQQAgBUEKajYCsApBARApIgVB+wBGDQMMAgsCQCACQVhqDgMBAwEACyACQaABRw0CC0EAIAVBEGo2ArAKAkBBARApIgVBKkcNAEEAQQAoArAKQQJqNgKwCkEBECkhBQsgBUEoRg0BC0EAKAKwCiEBIAUQLBpBACgCsAoiBSABTQ0AIAQgAyABIAUQAkEAQQAoArAKQX5qNgKwCg8LIAQgA0EAQQAQAkEAIARBDGo2ArAKDwsQJQvcCAEGf0EAIQBBAEEAKAKwCiIBQQxqIgI2ArAKQQEQKSEDQQAoArAKIQQCQAJAAkACQAJAAkACQAJAIANBLkcNAEEAIARBAmo2ArAKAkBBARApIgNB8wBGDQAgA0HtAEcNB0EAKAKwCiIDQQJqQZwIQQYQLw0HAkBBACgCnAoiBBAqDQAgBC8BAEEuRg0ICyABIAEgA0EIakEAKALUCRABDwtBACgCsAoiA0ECakGiCEEKEC8NBgJAQQAoApwKIgQQKg0AIAQvAQBBLkYNBwsgA0EMaiEDDAELIANB8wBHDQEgBCACTQ0BQQYhAEEAIQIgBEECakGiCEEKEC8NAiAEQQxqIQMCQCAELwEMIgVBd2oiBEEXSw0AQQEgBHRBn4CABHENAQsgBUGgAUcNAgtBACADNgKwCkEBIQBBARApIQMLAkACQAJAAkAgA0H7AEYNACADQShHDQFBACgCpApBAC8BmAoiA0EDdGoiBEEAKAKwCjYCBEEAIANBAWo7AZgKIARBBTYCAEEAKAKcCi8BAEEuRg0HQQBBACgCsAoiBEECajYCsApBARApIQMgAUEAKAKwCkEAIAQQAQJAAkAgAA0AQQAoAvAJIQQMAQtBACgC8AkiBEEFNgIcC0EAQQAvAZYKIgBBAWo7AZYKQQAoAqgKIABBAnRqIAQ2AgACQCADQSJGDQAgA0EnRg0AQQBBACgCsApBfmo2ArAKDwsgAxAaQQBBACgCsApBAmoiAzYCsAoCQAJAAkBBARApQVdqDgQBAgIAAgtBAEEAKAKwCkECajYCsApBARApGkEAKALwCSIEIAM2AgQgBEEBOgAYIARBACgCsAoiAzYCEEEAIANBfmo2ArAKDwtBACgC8AkiBCADNgIEIARBAToAGEEAQQAvAZgKQX9qOwGYCiAEQQAoArAKQQJqNgIMQQBBAC8BlgpBf2o7AZYKDwtBAEEAKAKwCkF+ajYCsAoPCyAADQJBACgCsAohA0EALwGYCg0BA0ACQAJAAkAgA0EAKAK0Ck8NAEEBECkiA0EiRg0BIANBJ0YNASADQf0ARw0CQQBBACgCsApBAmo2ArAKC0EBECkhBEEAKAKwCiEDAkAgBEHmAEcNACADQQJqQawIQQYQLw0JC0EAIANBCGo2ArAKAkBBARApIgNBIkYNACADQSdHDQkLIAEgA0EAECsPCyADEBoLQQBBACgCsApBAmoiAzYCsAoMAAsLIAANAUEGIQBBACECAkAgA0FZag4EBAMDBAALIANBIkYNAwwCC0EAIANBfmo2ArAKDwtBDCEAQQEhAgtBACgCsAoiAyABIABBAXRqRw0AQQAgA0F+ajYCsAoPC0EALwGYCg0CQQAoArAKIQNBACgCtAohAANAIAMgAE8NAQJAAkAgAy8BACIEQSdGDQAgBEEiRw0BCyABIAQgAhArDwtBACADQQJqIgM2ArAKDAALCxAlCw8LQQBBACgCsApBfmo2ArAKC0cBA39BACgCsApBAmohAEEAKAK0CiEBAkADQCAAIgJBfmogAU8NASACQQJqIQAgAi8BAEF2ag4EAQAAAQALC0EAIAI2ArAKC5gBAQN/QQBBACgCsAoiAUECajYCsAogAUEGaiEBQQAoArQKIQIDQAJAAkACQCABQXxqIAJPDQAgAUF+ai8BACEDAkACQCAADQAgA0EqRg0BIANBdmoOBAIEBAIECyADQSpHDQMLIAEvAQBBL0cNAkEAIAFBfmo2ArAKDAELIAFBfmohAQtBACABNgKwCg8LIAFBAmohAQwACwuIAQEEf0EAKAKwCiEBQQAoArQKIQICQAJAA0AgASIDQQJqIQEgAyACTw0BIAEvAQAiBCAARg0CAkAgBEHcAEYNACAEQXZqDgQCAQECAQsgA0EEaiEBIAMvAQRBDUcNACADQQZqIAEgAy8BBkEKRhshAQwACwtBACABNgKwChAlDwtBACABNgKwCgtsAQF/AkACQCAAQV9qIgFBBUsNAEEBIAF0QTFxDQELIABBRmpB//8DcUEGSQ0AIABBKUcgAEFYakH//wNxQQdJcQ0AAkAgAEGlf2oOBAEAAAEACyAAQf0ARyAAQYV/akH//wNxQQRJcQ8LQQELLgEBf0EBIQECQCAAQaYJQQUQHQ0AIABBlghBAxAdDQAgAEGwCUECEB0hAQsgAQtGAQN/QQAhAwJAIAAgAkEBdCICayIEQQJqIgBBACgC3AkiBUkNACAAIAEgAhAvDQACQCAAIAVHDQBBAQ8LIAQQJiEDCyADC4MBAQJ/QQEhAQJAAkACQAJAAkACQCAALwEAIgJBRWoOBAUEBAEACwJAIAJBm39qDgQDBAQCAAsgAkEpRg0EIAJB+QBHDQMgAEF+akG8CUEGEB0PCyAAQX5qLwEAQT1GDwsgAEF+akG0CUEEEB0PCyAAQX5qQcgJQQMQHQ8LQQAhAQsgAQu0AwECf0EAIQECQAJAAkACQAJAAkACQAJAAkACQCAALwEAQZx/ag4UAAECCQkJCQMJCQQFCQkGCQcJCQgJCwJAAkAgAEF+ai8BAEGXf2oOBAAKCgEKCyAAQXxqQcoIQQIQHQ8LIABBfGpBzghBAxAdDwsCQAJAAkAgAEF+ai8BAEGNf2oOAwABAgoLAkAgAEF8ai8BACICQeEARg0AIAJB7ABHDQogAEF6akHlABAnDwsgAEF6akHjABAnDwsgAEF8akHUCEEEEB0PCyAAQXxqQdwIQQYQHQ8LIABBfmovAQBB7wBHDQYgAEF8ai8BAEHlAEcNBgJAIABBemovAQAiAkHwAEYNACACQeMARw0HIABBeGpB6AhBBhAdDwsgAEF4akH0CEECEB0PCyAAQX5qQfgIQQQQHQ8LQQEhASAAQX5qIgBB6QAQJw0EIABBgAlBBRAdDwsgAEF+akHkABAnDwsgAEF+akGKCUEHEB0PCyAAQX5qQZgJQQQQHQ8LAkAgAEF+ai8BACICQe8ARg0AIAJB5QBHDQEgAEF8akHuABAnDwsgAEF8akGgCUEDEB0hAQsgAQs0AQF/QQEhAQJAIABBd2pB//8DcUEFSQ0AIABBgAFyQaABRg0AIABBLkcgABAocSEBCyABCzABAX8CQAJAIABBd2oiAUEXSw0AQQEgAXRBjYCABHENAQsgAEGgAUYNAEEADwtBAQtOAQJ/QQAhAQJAAkAgAC8BACICQeUARg0AIAJB6wBHDQEgAEF+akH4CEEEEB0PCyAAQX5qLwEAQfUARw0AIABBfGpB3AhBBhAdIQELIAEL3gEBBH9BACgCsAohAEEAKAK0CiEBAkACQAJAA0AgACICQQJqIQAgAiABTw0BAkACQAJAIAAvAQAiA0Gkf2oOBQIDAwMBAAsgA0EkRw0CIAIvAQRB+wBHDQJBACACQQRqIgA2ArAKQQBBAC8BmAoiAkEBajsBmApBACgCpAogAkEDdGoiAkEENgIAIAIgADYCBA8LQQAgADYCsApBAEEALwGYCkF/aiIAOwGYCkEAKAKkCiAAQf//A3FBA3RqKAIAQQNHDQMMBAsgAkEEaiEADAALC0EAIAA2ArAKCxAlCwtwAQJ/AkACQANAQQBBACgCsAoiAEECaiIBNgKwCiAAQQAoArQKTw0BAkACQAJAIAEvAQAiAUGlf2oOAgECAAsCQCABQXZqDgQEAwMEAAsgAUEvRw0CDAQLEC4aDAELQQAgAEEEajYCsAoMAAsLECULCzUBAX9BAEEBOgD8CUEAKAKwCiEAQQBBACgCtApBAmo2ArAKQQAgAEEAKALcCWtBAXU2ApAKC0MBAn9BASEBAkAgAC8BACICQXdqQf//A3FBBUkNACACQYABckGgAUYNAEEAIQEgAhAoRQ0AIAJBLkcgABAqcg8LIAELPQECf0EAIQICQEEAKALcCSIDIABLDQAgAC8BACABRw0AAkAgAyAARw0AQQEPCyAAQX5qLwEAECAhAgsgAgtoAQJ/QQEhAQJAAkAgAEFfaiICQQVLDQBBASACdEExcQ0BCyAAQfj/A3FBKEYNACAAQUZqQf//A3FBBkkNAAJAIABBpX9qIgJBA0sNACACQQFHDQELIABBhX9qQf//A3FBBEkhAQsgAQucAQEDf0EAKAKwCiEBAkADQAJAAkAgAS8BACICQS9HDQACQCABLwECIgFBKkYNACABQS9HDQQQGAwCCyAAEBkMAQsCQAJAIABFDQAgAkF3aiIBQRdLDQFBASABdEGfgIAEcUUNAQwCCyACECFFDQMMAQsgAkGgAUcNAgtBAEEAKAKwCiIDQQJqIgE2ArAKIANBACgCtApJDQALCyACCzEBAX9BACEBAkAgAC8BAEEuRw0AIABBfmovAQBBLkcNACAAQXxqLwEAQS5GIQELIAELnAQBAX8CQCABQSJGDQAgAUEnRg0AECUPC0EAKAKwCiEDIAEQGiAAIANBAmpBACgCsApBACgC0AkQAQJAIAJFDQBBACgC8AlBBDYCHAtBAEEAKAKwCkECajYCsAoCQAJAAkACQEEAECkiAUHhAEYNACABQfcARg0BQQAoArAKIQEMAgtBACgCsAoiAUECakHACEEKEC8NAUEGIQAMAgtBACgCsAoiAS8BAkHpAEcNACABLwEEQfQARw0AQQQhACABLwEGQegARg0BC0EAIAFBfmo2ArAKDwtBACABIABBAXRqNgKwCgJAQQEQKUH7AEYNAEEAIAE2ArAKDwtBACgCsAoiAiEAA0BBACAAQQJqNgKwCgJAAkACQEEBECkiAEEiRg0AIABBJ0cNAUEnEBpBAEEAKAKwCkECajYCsApBARApIQAMAgtBIhAaQQBBACgCsApBAmo2ArAKQQEQKSEADAELIAAQLCEACwJAIABBOkYNAEEAIAE2ArAKDwtBAEEAKAKwCkECajYCsAoCQEEBECkiAEEiRg0AIABBJ0YNAEEAIAE2ArAKDwsgABAaQQBBACgCsApBAmo2ArAKAkACQEEBECkiAEEsRg0AIABB/QBGDQFBACABNgKwCg8LQQBBACgCsApBAmo2ArAKQQEQKUH9AEYNAEEAKAKwCiEADAELC0EAKALwCSIBIAI2AhAgAUEAKAKwCkECajYCDAttAQJ/AkACQANAAkAgAEH//wNxIgFBd2oiAkEXSw0AQQEgAnRBn4CABHENAgsgAUGgAUYNASAAIQIgARAoDQJBACECQQBBACgCsAoiAEECajYCsAogAC8BAiIADQAMAgsLIAAhAgsgAkH//wNxC6sBAQR/AkACQEEAKAKwCiICLwEAIgNB4QBGDQAgASEEIAAhBQwBC0EAIAJBBGo2ArAKQQEQKSECQQAoArAKIQUCQAJAIAJBIkYNACACQSdGDQAgAhAsGkEAKAKwCiEEDAELIAIQGkEAQQAoArAKQQJqIgQ2ArAKC0EBECkhA0EAKAKwCiECCwJAIAIgBUYNACAFIARBACAAIAAgAUYiAhtBACABIAIbEAILIAMLcgEEf0EAKAKwCiEAQQAoArQKIQECQAJAA0AgAEECaiECIAAgAU8NAQJAAkAgAi8BACIDQaR/ag4CAQQACyACIQAgA0F2ag4EAgEBAgELIABBBGohAAwACwtBACACNgKwChAlQQAPC0EAIAI2ArAKQd0AC0kBA39BACEDAkAgAkUNAAJAA0AgAC0AACIEIAEtAAAiBUcNASABQQFqIQEgAEEBaiEAIAJBf2oiAg0ADAILCyAEIAVrIQMLIAMLC+wBAgBBgAgLzgEAAHgAcABvAHIAdABtAHAAbwByAHQAZgBvAHIAZQB0AGEAbwB1AHIAYwBlAHIAbwBtAHUAbgBjAHQAaQBvAG4AcwBzAGUAcgB0AHYAbwB5AGkAZQBkAGUAbABlAGMAbwBuAHQAaQBuAGkAbgBzAHQAYQBuAHQAeQBiAHIAZQBhAHIAZQB0AHUAcgBkAGUAYgB1AGcAZwBlAGEAdwBhAGkAdABoAHIAdwBoAGkAbABlAGkAZgBjAGEAdABjAGYAaQBuAGEAbABsAGUAbABzAABB0AkLEAEAAAACAAAAAAQAAEA5AAA=",typeof Buffer<"u"?Buffer.from(Y,"base64"):Uint8Array.from(atob(Y),(A=>A.charCodeAt(0))))).then(WebAssembly.instantiate).then((({exports:A})=>{a=A})),Y;var H=(A,e)=>` fetching ${A}${e?` from ${e}`:""}`,bA=/^(text|application)\/(x-)?javascript(;|$)/;async function BA(A,e,t){let Q;try{Q=await fetch(A,e)}catch{throw Error(`Network error${H(A,t)}.`)}if(!Q.ok)throw Error(`Error ${Q.status}${H(A,t)}.`);let o=Q.headers.get("content-type");if(!bA.test(o))throw Error(`Bad Content-Type "${o}"${H(A,t)}.`);return{responseUrl:Q.url,source:await Q.text()}}var y=x,EA=window.document.querySelector("script#wp-importmap[type=importmap]"),m=EA?JSON.parse(EA.text):{imports:{},scopes:{}},CA=A=>Object.keys(m.imports).includes(A),$A={},h={};Object.keys(m.imports).forEach(A=>{h[A]={blobUrl:A}});async function gA(A,e){A.blobUrl||e[A.url]||(e[A.url]=1,await A.linkPromise,await Promise.all(A.deps.map(t=>gA(t,e))))}function iA(A){return`'${A.replace(/'/g,"\\'")}'`}var sA=(A,e="text/javascript")=>URL.createObjectURL(new Blob([A],{type:e}));function aA(A,e){if(A.blobUrl||!e[A.url])return;e[A.url]=0;for(let i of A.deps)aA(i,e);let[t,Q]=A.analysis,o=A.source,B="";if(!t.length)B+=o;else{let i=function(r){for(;g.length&&g[g.length-1]<r;){let c=g.pop();B+=`${o.slice(s,c)}, ${iA(A.responseUrl)}`,s=c}B+=o.slice(s,r),s=r},s=0,C=0,g=[];for(let{s:r,ss:c,se:I,d:l}of t)if(l===-1){let n=A.deps[C++],f=n.blobUrl,j=!f;j&&((f=n.shellUrl)||(f=n.shellUrl=sA(`export function u$_(m){${n.analysis[1].map(({s:d,e:u},S)=>{let Z=n.source[d]==='"'||n.source[d]==="'";return`e$_${S}=m${Z?"[":"."}${n.source.slice(d,u)}${Z?"]":""}`}).join(",")}}${n.analysis[1].length?`let ${n.analysis[1].map((d,u)=>`e$_${u}`).join(",")};`:""}export {${n.analysis[1].map(({s:d,e:u},S)=>`e$_${S} as ${n.source.slice(d,u)}`).join(",")}}
//# sourceURL=${n.responseUrl}?cycle`))),i(r-1),B+=`/*${o.slice(r-1,I)}*/${iA(f)}`,!j&&n.shellUrl&&(B+=`;import*as m$_${C} from'${n.blobUrl}';import{u$_ as u$_${C}}from'${n.shellUrl}';u$_${C}(m$_${C})`,n.shellUrl=void 0),s=I}else{if(l===-2)throw Error("The import.meta property is not supported.");i(c),B+="wpInteractivityRouterImport(",g.push(I-1),s=r}A.shellUrl&&(B+=`
;import{u$_}from'${A.shellUrl}';try{u$_({${Q.filter(r=>r.ln).map(({s:r,e:c,ln:I})=>`${o.slice(r,c)}:${I}`).join(",")}})}catch(_){};
`),i(o.length)}let E=!1;B=B.replace(OA,(i,s,C)=>(E=!s,i.replace(C,()=>new URL(C,A.responseUrl).toString()))),E||(B+=`
//# sourceURL=`+A.responseUrl),A.blobUrl=sA(B),A.source=void 0}var OA=/\n\/\/# source(Mapping)?URL=([^\n]+)\s*((;|\/\/[^#][^\n]*)\s*)*$/;function nA(A,e,t){let Q=h[A];if(Q)return Q;if(Q={url:A},h[A]){let o=0;for(;h[Q.url+ ++o];);Q.url+=o}return h[Q.url]=Q,Q.fetchPromise=(async()=>{let o;({responseUrl:Q.responseUrl,source:o}=await($A[A]||BA(A,e,t)));try{Q.analysis=q(o,Q.url)}catch(B){console.error(B),Q.analysis=[[],[],!1,!1]}return Q.source=o,Q})(),Q.linkPromise=Q.fetchPromise.then(async()=>{let o=e;Q.deps=(await Promise.all(Q.analysis[0].map(async({n:B,d:E})=>{if(E!==-1||!B)return;let i=D(B,Q.responseUrl||Q.url);return CA&&CA(i)?{blobUrl:i}:(o.integrity&&(o={...o,integrity:void 0}),nA(i,o,Q.responseUrl).fetchPromise)}))).filter(B=>B)}),Q}var rA=A=>import(A);async function P(A,e){await y;let t=nA(A,e,null),Q={};return await gA(t,Q),aA(t,Q),await Promise.resolve(),t}async function J(A){let e=await rA(A.blobUrl);return A.shellUrl&&(await rA(A.shellUrl)).u$_(e),e}async function cA(A,e){let t=await P(A,e);return J(t)}var XA=document.baseURI,IA=XA;Object.defineProperty(self,"wpInteractivityRouterImport",{value:TA,writable:!1,enumerable:!1,configurable:!1});async function TA(A){return await y,cA(D(A,IA),{credentials:"same-origin"})}async function lA(A,e){return tA(e),await y,P(D(A,IA),{credentials:"same-origin"})}var wA=new Set,pA=A=>{wA.add(A)},fA=A=>{let e=A.querySelector("script#wp-importmap[type=importmap]"),t=e?JSON.parse(e.text):{imports:{},scopes:{}};for(let o in m.imports)delete t.imports[o];return[...A.querySelectorAll("script[type=module][src][data-wp-router-options]")].filter(o=>{try{return JSON.parse(o.getAttribute("data-wp-router-options"))?.loadOnClientNavigation===!0}catch{return!1}}).map(o=>o.src).filter(o=>!wA.has(o)).map(o=>lA(o,t))},dA=A=>Promise.all(A.map(e=>J(e)));var{getRegionRootFragment:ZA,initialVdomPromise:VA,toVdom:WA,render:zA,parseServerData:_A,populateServerData:Ae,batch:T,routerRegions:b,h:ee,navigationSignal:Qe,sessionId:te,warn:De}=jA("I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress."),R="data-wp-router-region",$="data-wp-interactive",LA=`[${$}][${R}], [${$}] [${$}][${R}]`,p=new Map,N=A=>{let e=new URL(A,window.location.href);return e.pathname+e.search},NA=A=>{let e=A.getAttribute(R);try{let{id:t,attachTo:Q}=JSON.parse(e);return{id:t,attachTo:Q}}catch{return{id:e}}},oe=A=>{if(!A)return A;let e=A.props.priorityLevels,t=e.findIndex(o=>o.includes("router-region")),Q=t!==-1?e.slice(t+1):e;return Q.length>0?ee(A.type,{...A.props,priorityLevels:Q}):A.props.element},v=new WeakMap,O=new WeakMap,yA=new Set,Be=async(A,{html:e})=>{try{if(!e){let Q=await window.fetch(A);if(Q.status!==200)return!1;e=await Q.text()}let t=new window.DOMParser().parseFromString(e,"text/html");return await JA(A,t)}catch{return!1}},JA=async(A,e,{vdom:t}={})=>{e.querySelectorAll("noscript").forEach(C=>C.remove());let Q={},o={};e.querySelectorAll(LA).forEach(C=>{let{id:g,attachTo:r}=NA(C);C.parentElement.closest(`[${R}]`)?Q[g]=void 0:Q[g]=t?.has(C)?t.get(C):WA(C),r&&!yA.has(g)&&(o[g]=r)});let B=e.querySelector("title")?.innerText,E=_A(e),[i,s]=await Promise.all([Promise.all(z(e)),Promise.all(fA(e))]);return{regions:Q,regionsToAttach:o,styles:i,scriptModules:s,title:B,initialData:E,url:A}},vA=A=>{_(A.styles);let e={...A.regionsToAttach};T(()=>{Ae(A.initialData),Qe.value+=1,b.forEach(Q=>{Q.value=null});let t=new Set;for(let Q in e){let o=document.querySelector(e[Q]);v.has(o)||v.set(o,[]);let B=v.get(o);B.includes(Q)||(B.push(Q),t.add(o))}for(let Q in A.regions)b.has(Q)&&(b.get(Q).value=oe(A.regions[Q]));t.forEach(Q=>{let B=v.get(Q).map(i=>A.regions[i]);if(!O.has(Q)){let i=B.map(({props:s,type:C})=>{let g=typeof C=="function"?s.type:C,r=document.createElement(g);return Q.appendChild(r),r});O.set(Q,ZA(i))}let E=O.get(Q);zA(B,E)})}),A.title&&(document.title=A.title)},KA=A=>(window.location.assign(A),new Promise(()=>{}));window.addEventListener("popstate",async()=>{let A=N(window.location.href),e=p.has(A)&&await p.get(A);e?T(()=>{w.url=window.location.href,vA(e)}):window.location.reload()});document.querySelectorAll(LA).forEach(A=>{let{id:e,attachTo:t}=NA(A);t&&yA.add(e)});window.document.querySelectorAll("script[type=module][src]").forEach(({src:A})=>pA(A));(async()=>{let A=await VA;p.set(N(window.location.href),Promise.resolve(JA(N(window.location.href),document,{vdom:A})))})();var X="",kA=!1,L={loading:"Loading page, please wait.",loaded:"Page Loaded."},{state:DA}=mA("core/router/private",{state:{navigation:{hasStarted:!1,hasFinished:!1}}},{lock:!0}),{state:w,actions:Ee}=mA("core/router",{state:{get navigation(){return DA.navigation}},actions:{*navigate(A,e={}){let{clientNavigationDisabled:t}=uA();t&&(yield KA(A));let Q=N(A),{navigation:o}=DA,{loadingAnimation:B=!0,screenReaderAnnouncement:E=!0,timeout:i=1e4}=e;X=A,Ee.prefetch(Q,e);let s=new Promise(r=>setTimeout(r,i)),C=setTimeout(()=>{X===A&&(B&&(o.hasStarted=!0,o.hasFinished=!1),E&&hA("loading"))},400),g=yield Promise.race([p.get(Q),s]);if(clearTimeout(C),X===A)if(g&&!g.initialData?.config?.["core/router"]?.clientNavigationDisabled){yield dA(g.scriptModules),T(()=>{w.url=A,B&&(o.hasStarted=!1,o.hasFinished=!0),vA(g)}),window.history[e.replace?"replaceState":"pushState"]({wpInteractivityId:te},"",A),E&&hA("loaded");let{hash:r}=new URL(A,window.location.href);r&&document.querySelector(r)?.scrollIntoView()}else yield KA(A)},*prefetch(A,e={}){let{clientNavigationDisabled:t}=uA();if(t)return;let Q=N(A);(e.force||!p.has(Q))&&p.set(Q,Be(Q,{html:e.html})),yield p.get(Q)}}});w.url=w.url||window.location.href;function hA(A){if(!kA){kA=!0;let t=document.getElementById("wp-script-module-data-@wordpress/interactivity-router")?.textContent;if(t)try{let Q=JSON.parse(t);typeof Q?.i18n?.loading=="string"&&(L.loading=Q.i18n.loading),typeof Q?.i18n?.loaded=="string"&&(L.loaded=Q.i18n.loaded)}catch{}else w.navigation.texts?.loading&&(L.loading=w.navigation.texts.loading),w.navigation.texts?.loaded&&(L.loaded=w.navigation.texts.loaded)}let e=L[A];import("@wordpress/a11y").then(({speak:t})=>t(e),()=>{})}export{Ee as actions,w as state};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                dist/script-modules/interactivity-router/full-page.min.asset.php                                    0000644                 00000000274 15212564030 0021163 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/interactivity-router', 'import' => 'dynamic')), 'version' => '5c07cd7a12ae073c5241');                                                                                                                                                                                                                                                                                                                                    dist/script-modules/interactivity-router/full-page.js                                               0000644                 00000002414 15212564030 0017106 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       // packages/interactivity-router/build-module/full-page.mjs
var isValidLink = (ref) => ref && ref instanceof window.HTMLAnchorElement && ref.href && (!ref.target || ref.target === "_self") && ref.origin === window.location.origin && !ref.pathname.startsWith("/wp-admin") && !ref.pathname.startsWith("/wp-login.php") && !ref.getAttribute("href").startsWith("#") && !new URL(ref.href).searchParams.has("_wpnonce");
var isValidEvent = (event) => event && event.button === 0 && // Left clicks only.
!event.metaKey && // Open in new tab (Mac).
!event.ctrlKey && // Open in new tab (Windows).
!event.altKey && // Download.
!event.shiftKey && !event.defaultPrevented;
document.addEventListener("click", async (event) => {
  const ref = event.target.closest("a");
  if (isValidLink(ref) && isValidEvent(event)) {
    event.preventDefault();
    const { actions } = await import("@wordpress/interactivity-router");
    actions.navigate(ref.href);
  }
});
document.addEventListener(
  "mouseenter",
  async (event) => {
    if (event.target?.nodeName === "A") {
      const ref = event.target.closest("a");
      if (isValidLink(ref) && isValidEvent(event)) {
        const { actions } = await import("@wordpress/interactivity-router");
        actions.prefetch(ref.href);
      }
    }
  },
  true
);
                                                                                                                                                                                                                                                    dist/script-modules/interactivity-router/full-page.min.js                                           0000644                 00000001420 15212564030 0017664 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var s=t=>t&&t instanceof window.HTMLAnchorElement&&t.href&&(!t.target||t.target==="_self")&&t.origin===window.location.origin&&!t.pathname.startsWith("/wp-admin")&&!t.pathname.startsWith("/wp-login.php")&&!t.getAttribute("href").startsWith("#")&&!new URL(t.href).searchParams.has("_wpnonce"),n=t=>t&&t.button===0&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey&&!t.defaultPrevented;document.addEventListener("click",async t=>{let a=t.target.closest("a");if(s(a)&&n(t)){t.preventDefault();let{actions:i}=await import("@wordpress/interactivity-router");i.navigate(a.href)}});document.addEventListener("mouseenter",async t=>{if(t.target?.nodeName==="A"){let a=t.target.closest("a");if(s(a)&&n(t)){let{actions:i}=await import("@wordpress/interactivity-router");i.prefetch(a.href)}}},!0);
                                                                                                                                                                                                                                                dist/script-modules/interactivity-router/index.min.asset.php                                        0000644                 00000000355 15212564030 0020416 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'dynamic'), array('id' => '@wordpress/interactivity', 'import' => 'static')), 'version' => '71aa17bac91628a0f874');                                                                                                                                                                                                                                                                                   dist/script-modules/abilities/index.min.js                                                          0000644                 00000422713 15212564030 0014664 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var Xo=Object.create;var Or=Object.defineProperty;var Qo=Object.getOwnPropertyDescriptor;var eu=Object.getOwnPropertyNames;var tu=Object.getPrototypeOf,ru=Object.prototype.hasOwnProperty;var y=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Jn=(e,t)=>{for(var r in t)Or(e,r,{get:t[r],enumerable:!0})},su=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of eu(t))!ru.call(e,n)&&n!==r&&Or(e,n,{get:()=>t[n],enumerable:!(s=Qo(t,n))||s.enumerable});return e};var we=(e,t,r)=>(r=e!=null?Xo(tu(e)):{},su(t||!e||!e.__esModule?Or(r,"default",{value:e,enumerable:!0}):r,e));var ot=y((Yp,Wn)=>{Wn.exports=window.wp.data});var kr=y((Bp,Zn)=>{Zn.exports=window.wp.i18n});var dt=y(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.regexpCode=k.getEsmExportName=k.getProperty=k.safeStringify=k.stringify=k.strConcat=k.addCodeArg=k.str=k._=k.nil=k._Code=k.Name=k.IDENTIFIER=k._CodeOrName=void 0;var ut=class{};k._CodeOrName=ut;k.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var qe=class extends ut{constructor(t){if(super(),!k.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};k.Name=qe;var W=class extends ut{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,s)=>`${r}${s}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,s)=>(s instanceof qe&&(r[s.str]=(r[s.str]||0)+1),r),{})}};k._Code=W;k.nil=new W("");function sa(e,...t){let r=[e[0]],s=0;for(;s<t.length;)Mr(r,t[s]),r.push(e[++s]);return new W(r)}k._=sa;var Cr=new W("+");function na(e,...t){let r=[ct(e[0])],s=0;for(;s<t.length;)r.push(Cr),Mr(r,t[s]),r.push(Cr,ct(e[++s]));return vu(r),new W(r)}k.str=na;function Mr(e,t){t instanceof W?e.push(...t._items):t instanceof qe?e.push(t):e.push(Eu(t))}k.addCodeArg=Mr;function vu(e){let t=1;for(;t<e.length-1;){if(e[t]===Cr){let r=wu(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function wu(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof qe||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof qe))return`"${e}${t.slice(1)}`}function bu(e,t){return t.emptyStr()?e:e.emptyStr()?t:na`${e}${t}`}k.strConcat=bu;function Eu(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ct(Array.isArray(e)?e.join(","):e)}function Su(e){return new W(ct(e))}k.stringify=Su;function ct(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}k.safeStringify=ct;function Pu(e){return typeof e=="string"&&k.IDENTIFIER.test(e)?new W(`.${e}`):sa`[${e}]`}k.getProperty=Pu;function Tu(e){if(typeof e=="string"&&k.IDENTIFIER.test(e))return new W(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}k.getEsmExportName=Tu;function Iu(e){return new W(e.toString())}k.regexpCode=Iu});var Vr=y(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.ValueScope=Y.ValueScopeName=Y.Scope=Y.varKinds=Y.UsedValueState=void 0;var H=dt(),Dr=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},Ut;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Ut||(Y.UsedValueState=Ut={}));Y.varKinds={const:new H.Name("const"),let:new H.Name("let"),var:new H.Name("var")};var Ft=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof H.Name?t:this.name(t)}name(t){return new H.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,s;if(!((s=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||s===void 0)&&s.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Y.Scope=Ft;var Kt=class extends H.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:s}){this.value=t,this.scopePath=(0,H._)`.${new H.Name(r)}[${s}]`}};Y.ValueScopeName=Kt;var Nu=(0,H._)`\n`,zr=class extends Ft{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?Nu:H.nil}}get(){return this._scope}name(t){return new Kt(t,this._newName(t))}value(t,r){var s;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(t),{prefix:a}=n,i=(s=r.key)!==null&&s!==void 0?s:r.ref,o=this._values[a];if(o){let c=o.get(i);if(c)return c}else o=this._values[a]=new Map;o.set(i,n);let u=this._scope[a]||(this._scope[a]=[]),d=u.length;return u[d]=r.ref,n.setValue(r,{property:a,itemIndex:d}),n}getValue(t,r){let s=this._values[t];if(s)return s.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,H._)`${t}${s.scopePath}`})}scopeCode(t=this._values,r,s){return this._reduceValues(t,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},r,s)}_reduceValues(t,r,s={},n){let a=H.nil;for(let i in t){let o=t[i];if(!o)continue;let u=s[i]=s[i]||new Map;o.forEach(d=>{if(u.has(d))return;u.set(d,Ut.Started);let c=r(d);if(c){let l=this.opts.es5?Y.varKinds.var:Y.varKinds.const;a=(0,H._)`${a}${l} ${d} = ${c};${this.opts._n}`}else if(c=n?.(d))a=(0,H._)`${a}${c}${this.opts._n}`;else throw new Dr(d);u.set(d,Ut.Completed)})}return a}};Y.ValueScope=zr});var b=y(S=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});S.or=S.and=S.not=S.CodeGen=S.operators=S.varKinds=S.ValueScopeName=S.ValueScope=S.Scope=S.Name=S.regexpCode=S.stringify=S.getProperty=S.nil=S.strConcat=S.str=S._=void 0;var I=dt(),te=Vr(),be=dt();Object.defineProperty(S,"_",{enumerable:!0,get:function(){return be._}});Object.defineProperty(S,"str",{enumerable:!0,get:function(){return be.str}});Object.defineProperty(S,"strConcat",{enumerable:!0,get:function(){return be.strConcat}});Object.defineProperty(S,"nil",{enumerable:!0,get:function(){return be.nil}});Object.defineProperty(S,"getProperty",{enumerable:!0,get:function(){return be.getProperty}});Object.defineProperty(S,"stringify",{enumerable:!0,get:function(){return be.stringify}});Object.defineProperty(S,"regexpCode",{enumerable:!0,get:function(){return be.regexpCode}});Object.defineProperty(S,"Name",{enumerable:!0,get:function(){return be.Name}});var Bt=Vr();Object.defineProperty(S,"Scope",{enumerable:!0,get:function(){return Bt.Scope}});Object.defineProperty(S,"ValueScope",{enumerable:!0,get:function(){return Bt.ValueScope}});Object.defineProperty(S,"ValueScopeName",{enumerable:!0,get:function(){return Bt.ValueScopeName}});Object.defineProperty(S,"varKinds",{enumerable:!0,get:function(){return Bt.varKinds}});S.operators={GT:new I._Code(">"),GTE:new I._Code(">="),LT:new I._Code("<"),LTE:new I._Code("<="),EQ:new I._Code("==="),NEQ:new I._Code("!=="),NOT:new I._Code("!"),OR:new I._Code("||"),AND:new I._Code("&&"),ADD:new I._Code("+")};var ye=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},xr=class extends ye{constructor(t,r,s){super(),this.varKind=t,this.name=r,this.rhs=s}render({es5:t,_n:r}){let s=t?te.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${n};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=Ue(this.rhs,t,r)),this}get names(){return this.rhs instanceof I._CodeOrName?this.rhs.names:{}}},Gt=class extends ye{constructor(t,r,s){super(),this.lhs=t,this.rhs=r,this.sideEffects=s}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof I.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=Ue(this.rhs,t,r),this}get names(){let t=this.lhs instanceof I.Name?{}:{...this.lhs.names};return Yt(t,this.rhs)}},Lr=class extends Gt{constructor(t,r,s,n){super(t,s,n),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},Ur=class extends ye{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},Fr=class extends ye{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},Kr=class extends ye{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},Gr=class extends ye{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=Ue(this.code,t,r),this}get names(){return this.code instanceof I._CodeOrName?this.code.names:{}}},lt=class extends ye{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,s)=>r+s.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let s=t[r].optimizeNodes();Array.isArray(s)?t.splice(r,1,...s):s?t[r]=s:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:s}=this,n=s.length;for(;n--;){let a=s[n];a.optimizeNames(t,r)||(Ou(t,a.names),s.splice(n,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>Ae(t,r.names),{})}},_e=class extends lt{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},Hr=class extends lt{},Le=class extends _e{};Le.kind="else";var Re=class e extends _e{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let s=r.optimizeNodes();r=this.else=Array.isArray(s)?new Le(s):s}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(aa(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var s;if(this.else=(s=this.else)===null||s===void 0?void 0:s.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=Ue(this.condition,t,r),this}get names(){let t=super.names;return Yt(t,this.condition),this.else&&Ae(t,this.else.names),t}};Re.kind="if";var je=class extends _e{};je.kind="for";var Yr=class extends je{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=Ue(this.iteration,t,r),this}get names(){return Ae(super.names,this.iteration.names)}},Br=class extends je{constructor(t,r,s,n){super(),this.varKind=t,this.name=r,this.from=s,this.to=n}render(t){let r=t.es5?te.varKinds.var:this.varKind,{name:s,from:n,to:a}=this;return`for(${r} ${s}=${n}; ${s}<${a}; ${s}++)`+super.render(t)}get names(){let t=Yt(super.names,this.from);return Yt(t,this.to)}},Ht=class extends je{constructor(t,r,s,n){super(),this.loop=t,this.varKind=r,this.name=s,this.iterable=n}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=Ue(this.iterable,t,r),this}get names(){return Ae(super.names,this.iterable.names)}},ft=class extends _e{constructor(t,r,s){super(),this.name=t,this.args=r,this.async=s}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};ft.kind="func";var mt=class extends lt{render(t){return"return "+super.render(t)}};mt.kind="return";var Jr=class extends _e{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var s,n;return super.optimizeNames(t,r),(s=this.catch)===null||s===void 0||s.optimizeNames(t,r),(n=this.finally)===null||n===void 0||n.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&Ae(t,this.catch.names),this.finally&&Ae(t,this.finally.names),t}},pt=class extends _e{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};pt.kind="catch";var ht=class extends _e{render(t){return"finally"+super.render(t)}};ht.kind="finally";var Wr=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
`:""},this._extScope=t,this._scope=new te.Scope({parent:t}),this._nodes=[new Hr]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let s=this._extScope.value(t,r);return(this._values[s.prefix]||(this._values[s.prefix]=new Set)).add(s),s}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,s,n){let a=this._scope.toName(r);return s!==void 0&&n&&(this._constants[a.str]=s),this._leafNode(new xr(t,a,s)),a}const(t,r,s){return this._def(te.varKinds.const,t,r,s)}let(t,r,s){return this._def(te.varKinds.let,t,r,s)}var(t,r,s){return this._def(te.varKinds.var,t,r,s)}assign(t,r,s){return this._leafNode(new Gt(t,r,s))}add(t,r){return this._leafNode(new Lr(t,S.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==I.nil&&this._leafNode(new Gr(t)),this}object(...t){let r=["{"];for(let[s,n]of t)r.length>1&&r.push(","),r.push(s),(s!==n||this.opts.es5)&&(r.push(":"),(0,I.addCodeArg)(r,n));return r.push("}"),new I._Code(r)}if(t,r,s){if(this._blockNode(new Re(t)),r&&s)this.code(r).else().code(s).endIf();else if(r)this.code(r).endIf();else if(s)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new Re(t))}else(){return this._elseNode(new Le)}endIf(){return this._endBlockNode(Re,Le)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new Yr(t),r)}forRange(t,r,s,n,a=this.opts.es5?te.varKinds.var:te.varKinds.let){let i=this._scope.toName(t);return this._for(new Br(a,i,r,s),()=>n(i))}forOf(t,r,s,n=te.varKinds.const){let a=this._scope.toName(t);if(this.opts.es5){let i=r instanceof I.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,I._)`${i}.length`,o=>{this.var(a,(0,I._)`${i}[${o}]`),s(a)})}return this._for(new Ht("of",n,a,r),()=>s(a))}forIn(t,r,s,n=this.opts.es5?te.varKinds.var:te.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,I._)`Object.keys(${r})`,s);let a=this._scope.toName(t);return this._for(new Ht("in",n,a,r),()=>s(a))}endFor(){return this._endBlockNode(je)}label(t){return this._leafNode(new Ur(t))}break(t){return this._leafNode(new Fr(t))}return(t){let r=new mt;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(mt)}try(t,r,s){if(!r&&!s)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new Jr;if(this._blockNode(n),this.code(t),r){let a=this.name("e");this._currNode=n.catch=new pt(a),r(a)}return s&&(this._currNode=n.finally=new ht,this.code(s)),this._endBlockNode(pt,ht)}throw(t){return this._leafNode(new Kr(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let s=this._nodes.length-r;if(s<0||t!==void 0&&s!==t)throw new Error(`CodeGen: wrong number of nodes: ${s} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=I.nil,s,n){return this._blockNode(new ft(t,r,s)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(ft)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let s=this._currNode;if(s instanceof t||r&&s instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof Re))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};S.CodeGen=Wr;function Ae(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function Yt(e,t){return t instanceof I._CodeOrName?Ae(e,t.names):e}function Ue(e,t,r){if(e instanceof I.Name)return s(e);if(!n(e))return e;return new I._Code(e._items.reduce((a,i)=>(i instanceof I.Name&&(i=s(i)),i instanceof I._Code?a.push(...i._items):a.push(i),a),[]));function s(a){let i=r[a.str];return i===void 0||t[a.str]!==1?a:(delete t[a.str],i)}function n(a){return a instanceof I._Code&&a._items.some(i=>i instanceof I.Name&&t[i.str]===1&&r[i.str]!==void 0)}}function Ou(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function aa(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,I._)`!${Zr(e)}`}S.not=aa;var ku=ia(S.operators.AND);function qu(...e){return e.reduce(ku)}S.and=qu;var Ru=ia(S.operators.OR);function ju(...e){return e.reduce(Ru)}S.or=ju;function ia(e){return(t,r)=>t===I.nil?r:r===I.nil?t:(0,I._)`${Zr(t)} ${e} ${Zr(r)}`}function Zr(e){return e instanceof I.Name?e:(0,I._)`(${e})`}});var q=y(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.checkStrictMode=P.getErrorPath=P.Type=P.useFunc=P.setEvaluated=P.evaluatedPropsToName=P.mergeEvaluated=P.eachItem=P.unescapeJsonPointer=P.escapeJsonPointer=P.escapeFragment=P.unescapeFragment=P.schemaRefOrVal=P.schemaHasRulesButRef=P.schemaHasRules=P.checkUnknownRules=P.alwaysValidSchema=P.toHash=void 0;var j=b(),Au=dt();function Cu(e){let t={};for(let r of e)t[r]=!0;return t}P.toHash=Cu;function Mu(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(ca(e,t),!da(t,e.self.RULES.all))}P.alwaysValidSchema=Mu;function ca(e,t=e.schema){let{opts:r,self:s}=e;if(!r.strictSchema||typeof t=="boolean")return;let n=s.RULES.keywords;for(let a in t)n[a]||ma(e,`unknown keyword: "${a}"`)}P.checkUnknownRules=ca;function da(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}P.schemaHasRules=da;function Du(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}P.schemaHasRulesButRef=Du;function zu({topSchemaRef:e,schemaPath:t},r,s,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,j._)`${r}`}return(0,j._)`${e}${t}${(0,j.getProperty)(s)}`}P.schemaRefOrVal=zu;function Vu(e){return la(decodeURIComponent(e))}P.unescapeFragment=Vu;function xu(e){return encodeURIComponent(Qr(e))}P.escapeFragment=xu;function Qr(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}P.escapeJsonPointer=Qr;function la(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}P.unescapeJsonPointer=la;function Lu(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}P.eachItem=Lu;function oa({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:s}){return(n,a,i,o)=>{let u=i===void 0?a:i instanceof j.Name?(a instanceof j.Name?e(n,a,i):t(n,a,i),i):a instanceof j.Name?(t(n,i,a),a):r(a,i);return o===j.Name&&!(u instanceof j.Name)?s(n,u):u}}P.mergeEvaluated={props:oa({mergeNames:(e,t,r)=>e.if((0,j._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,j._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,j._)`${r} || {}`).code((0,j._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,j._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,j._)`${r} || {}`),es(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:fa}),items:oa({mergeNames:(e,t,r)=>e.if((0,j._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,j._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,j._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,j._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function fa(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,j._)`{}`);return t!==void 0&&es(e,r,t),r}P.evaluatedPropsToName=fa;function es(e,t,r){Object.keys(r).forEach(s=>e.assign((0,j._)`${t}${(0,j.getProperty)(s)}`,!0))}P.setEvaluated=es;var ua={};function Uu(e,t){return e.scopeValue("func",{ref:t,code:ua[t.code]||(ua[t.code]=new Au._Code(t.code))})}P.useFunc=Uu;var Xr;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Xr||(P.Type=Xr={}));function Fu(e,t,r){if(e instanceof j.Name){let s=t===Xr.Num;return r?s?(0,j._)`"[" + ${e} + "]"`:(0,j._)`"['" + ${e} + "']"`:s?(0,j._)`"/" + ${e}`:(0,j._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,j.getProperty)(e).toString():"/"+Qr(e)}P.getErrorPath=Fu;function ma(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}P.checkStrictMode=ma});var ge=y(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});var L=b(),Ku={data:new L.Name("data"),valCxt:new L.Name("valCxt"),instancePath:new L.Name("instancePath"),parentData:new L.Name("parentData"),parentDataProperty:new L.Name("parentDataProperty"),rootData:new L.Name("rootData"),dynamicAnchors:new L.Name("dynamicAnchors"),vErrors:new L.Name("vErrors"),errors:new L.Name("errors"),this:new L.Name("this"),self:new L.Name("self"),scope:new L.Name("scope"),json:new L.Name("json"),jsonPos:new L.Name("jsonPos"),jsonLen:new L.Name("jsonLen"),jsonPart:new L.Name("jsonPart")};ts.default=Ku});var yt=y(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.extendErrors=U.resetErrorsCount=U.reportExtraError=U.reportError=U.keyword$DataError=U.keywordError=void 0;var O=b(),Jt=q(),K=ge();U.keywordError={message:({keyword:e})=>(0,O.str)`must pass "${e}" keyword validation`};U.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,O.str)`"${e}" keyword must be ${t} ($data)`:(0,O.str)`"${e}" keyword is invalid ($data)`};function Gu(e,t=U.keywordError,r,s){let{it:n}=e,{gen:a,compositeRule:i,allErrors:o}=n,u=ya(e,t,r);s??(i||o)?pa(a,u):ha(n,(0,O._)`[${u}]`)}U.reportError=Gu;function Hu(e,t=U.keywordError,r){let{it:s}=e,{gen:n,compositeRule:a,allErrors:i}=s,o=ya(e,t,r);pa(n,o),a||i||ha(s,K.default.vErrors)}U.reportExtraError=Hu;function Yu(e,t){e.assign(K.default.errors,t),e.if((0,O._)`${K.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,O._)`${K.default.vErrors}.length`,t),()=>e.assign(K.default.vErrors,null)))}U.resetErrorsCount=Yu;function Bu({gen:e,keyword:t,schemaValue:r,data:s,errsCount:n,it:a}){if(n===void 0)throw new Error("ajv implementation error");let i=e.name("err");e.forRange("i",n,K.default.errors,o=>{e.const(i,(0,O._)`${K.default.vErrors}[${o}]`),e.if((0,O._)`${i}.instancePath === undefined`,()=>e.assign((0,O._)`${i}.instancePath`,(0,O.strConcat)(K.default.instancePath,a.errorPath))),e.assign((0,O._)`${i}.schemaPath`,(0,O.str)`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign((0,O._)`${i}.schema`,r),e.assign((0,O._)`${i}.data`,s))})}U.extendErrors=Bu;function pa(e,t){let r=e.const("err",t);e.if((0,O._)`${K.default.vErrors} === null`,()=>e.assign(K.default.vErrors,(0,O._)`[${r}]`),(0,O._)`${K.default.vErrors}.push(${r})`),e.code((0,O._)`${K.default.errors}++`)}function ha(e,t){let{gen:r,validateName:s,schemaEnv:n}=e;n.$async?r.throw((0,O._)`new ${e.ValidationError}(${t})`):(r.assign((0,O._)`${s}.errors`,t),r.return(!1))}var Ce={keyword:new O.Name("keyword"),schemaPath:new O.Name("schemaPath"),params:new O.Name("params"),propertyName:new O.Name("propertyName"),message:new O.Name("message"),schema:new O.Name("schema"),parentSchema:new O.Name("parentSchema")};function ya(e,t,r){let{createErrors:s}=e.it;return s===!1?(0,O._)`{}`:Ju(e,t,r)}function Ju(e,t,r={}){let{gen:s,it:n}=e,a=[Wu(n,r),Zu(e,r)];return Xu(e,t,a),s.object(...a)}function Wu({errorPath:e},{instancePath:t}){let r=t?(0,O.str)`${e}${(0,Jt.getErrorPath)(t,Jt.Type.Str)}`:e;return[K.default.instancePath,(0,O.strConcat)(K.default.instancePath,r)]}function Zu({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:s}){let n=s?t:(0,O.str)`${t}/${e}`;return r&&(n=(0,O.str)`${n}${(0,Jt.getErrorPath)(r,Jt.Type.Str)}`),[Ce.schemaPath,n]}function Xu(e,{params:t,message:r},s){let{keyword:n,data:a,schemaValue:i,it:o}=e,{opts:u,propertyName:d,topSchemaRef:c,schemaPath:l}=o;s.push([Ce.keyword,n],[Ce.params,typeof t=="function"?t(e):t||(0,O._)`{}`]),u.messages&&s.push([Ce.message,typeof r=="function"?r(e):r]),u.verbose&&s.push([Ce.schema,i],[Ce.parentSchema,(0,O._)`${c}${l}`],[K.default.data,a]),d&&s.push([Ce.propertyName,d])}});var ga=y(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.boolOrEmptySchema=Fe.topBoolOrEmptySchema=void 0;var Qu=yt(),ec=b(),tc=ge(),rc={message:"boolean schema is false"};function sc(e){let{gen:t,schema:r,validateName:s}=e;r===!1?_a(e,!1):typeof r=="object"&&r.$async===!0?t.return(tc.default.data):(t.assign((0,ec._)`${s}.errors`,null),t.return(!0))}Fe.topBoolOrEmptySchema=sc;function nc(e,t){let{gen:r,schema:s}=e;s===!1?(r.var(t,!1),_a(e)):r.var(t,!0)}Fe.boolOrEmptySchema=nc;function _a(e,t){let{gen:r,data:s}=e,n={gen:r,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,Qu.reportError)(n,rc,void 0,t)}});var rs=y(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.getRules=Ke.isJSONType=void 0;var ac=["string","number","integer","boolean","null","object","array"],ic=new Set(ac);function oc(e){return typeof e=="string"&&ic.has(e)}Ke.isJSONType=oc;function uc(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Ke.getRules=uc});var ss=y(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.shouldUseRule=Ee.shouldUseGroup=Ee.schemaHasRulesForType=void 0;function cc({schema:e,self:t},r){let s=t.RULES.types[r];return s&&s!==!0&&$a(e,s)}Ee.schemaHasRulesForType=cc;function $a(e,t){return t.rules.some(r=>va(e,r))}Ee.shouldUseGroup=$a;function va(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(s=>e[s]!==void 0))}Ee.shouldUseRule=va});var _t=y(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.reportTypeError=F.checkDataTypes=F.checkDataType=F.coerceAndCheckDataType=F.getJSONTypes=F.getSchemaTypes=F.DataType=void 0;var dc=rs(),lc=ss(),fc=yt(),E=b(),wa=q(),Ge;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Ge||(F.DataType=Ge={}));function mc(e){let t=ba(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}F.getSchemaTypes=mc;function ba(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(dc.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}F.getJSONTypes=ba;function pc(e,t){let{gen:r,data:s,opts:n}=e,a=hc(t,n.coerceTypes),i=t.length>0&&!(a.length===0&&t.length===1&&(0,lc.schemaHasRulesForType)(e,t[0]));if(i){let o=as(t,s,n.strictNumbers,Ge.Wrong);r.if(o,()=>{a.length?yc(e,t,a):is(e)})}return i}F.coerceAndCheckDataType=pc;var Ea=new Set(["string","number","integer","boolean","null"]);function hc(e,t){return t?e.filter(r=>Ea.has(r)||t==="array"&&r==="array"):[]}function yc(e,t,r){let{gen:s,data:n,opts:a}=e,i=s.let("dataType",(0,E._)`typeof ${n}`),o=s.let("coerced",(0,E._)`undefined`);a.coerceTypes==="array"&&s.if((0,E._)`${i} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>s.assign(n,(0,E._)`${n}[0]`).assign(i,(0,E._)`typeof ${n}`).if(as(t,n,a.strictNumbers),()=>s.assign(o,n))),s.if((0,E._)`${o} !== undefined`);for(let d of r)(Ea.has(d)||d==="array"&&a.coerceTypes==="array")&&u(d);s.else(),is(e),s.endIf(),s.if((0,E._)`${o} !== undefined`,()=>{s.assign(n,o),_c(e,o)});function u(d){switch(d){case"string":s.elseIf((0,E._)`${i} == "number" || ${i} == "boolean"`).assign(o,(0,E._)`"" + ${n}`).elseIf((0,E._)`${n} === null`).assign(o,(0,E._)`""`);return;case"number":s.elseIf((0,E._)`${i} == "boolean" || ${n} === null
              || (${i} == "string" && ${n} && ${n} == +${n})`).assign(o,(0,E._)`+${n}`);return;case"integer":s.elseIf((0,E._)`${i} === "boolean" || ${n} === null
              || (${i} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(o,(0,E._)`+${n}`);return;case"boolean":s.elseIf((0,E._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(o,!1).elseIf((0,E._)`${n} === "true" || ${n} === 1`).assign(o,!0);return;case"null":s.elseIf((0,E._)`${n} === "" || ${n} === 0 || ${n} === false`),s.assign(o,null);return;case"array":s.elseIf((0,E._)`${i} === "string" || ${i} === "number"
              || ${i} === "boolean" || ${n} === null`).assign(o,(0,E._)`[${n}]`)}}}function _c({gen:e,parentData:t,parentDataProperty:r},s){e.if((0,E._)`${t} !== undefined`,()=>e.assign((0,E._)`${t}[${r}]`,s))}function ns(e,t,r,s=Ge.Correct){let n=s===Ge.Correct?E.operators.EQ:E.operators.NEQ,a;switch(e){case"null":return(0,E._)`${t} ${n} null`;case"array":a=(0,E._)`Array.isArray(${t})`;break;case"object":a=(0,E._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":a=i((0,E._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":a=i();break;default:return(0,E._)`typeof ${t} ${n} ${e}`}return s===Ge.Correct?a:(0,E.not)(a);function i(o=E.nil){return(0,E.and)((0,E._)`typeof ${t} == "number"`,o,r?(0,E._)`isFinite(${t})`:E.nil)}}F.checkDataType=ns;function as(e,t,r,s){if(e.length===1)return ns(e[0],t,r,s);let n,a=(0,wa.toHash)(e);if(a.array&&a.object){let i=(0,E._)`typeof ${t} != "object"`;n=a.null?i:(0,E._)`!${t} || ${i}`,delete a.null,delete a.array,delete a.object}else n=E.nil;a.number&&delete a.integer;for(let i in a)n=(0,E.and)(n,ns(i,t,r,s));return n}F.checkDataTypes=as;var gc={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,E._)`{type: ${e}}`:(0,E._)`{type: ${t}}`};function is(e){let t=$c(e);(0,fc.reportError)(t,gc)}F.reportTypeError=is;function $c(e){let{gen:t,data:r,schema:s}=e,n=(0,wa.schemaRefOrVal)(e,s,"type");return{gen:t,keyword:"type",data:r,schema:s.type,schemaCode:n,schemaValue:n,parentSchema:s,params:{},it:e}}});var Pa=y(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.assignDefaults=void 0;var He=b(),vc=q();function wc(e,t){let{properties:r,items:s}=e.schema;if(t==="object"&&r)for(let n in r)Sa(e,n,r[n].default);else t==="array"&&Array.isArray(s)&&s.forEach((n,a)=>Sa(e,a,n.default))}Wt.assignDefaults=wc;function Sa(e,t,r){let{gen:s,compositeRule:n,data:a,opts:i}=e;if(r===void 0)return;let o=(0,He._)`${a}${(0,He.getProperty)(t)}`;if(n){(0,vc.checkStrictMode)(e,`default is ignored for: ${o}`);return}let u=(0,He._)`${o} === undefined`;i.useDefaults==="empty"&&(u=(0,He._)`${u} || ${o} === null || ${o} === ""`),s.if(u,(0,He._)`${o} = ${(0,He.stringify)(r)}`)}});var Z=y(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.validateUnion=R.validateArray=R.usePattern=R.callValidateCode=R.schemaProperties=R.allSchemaProperties=R.noPropertyInData=R.propertyInData=R.isOwnProperty=R.hasPropFunc=R.reportMissingProp=R.checkMissingProp=R.checkReportMissingProp=void 0;var C=b(),os=q(),Se=ge(),bc=q();function Ec(e,t){let{gen:r,data:s,it:n}=e;r.if(cs(r,s,t,n.opts.ownProperties),()=>{e.setParams({missingProperty:(0,C._)`${t}`},!0),e.error()})}R.checkReportMissingProp=Ec;function Sc({gen:e,data:t,it:{opts:r}},s,n){return(0,C.or)(...s.map(a=>(0,C.and)(cs(e,t,a,r.ownProperties),(0,C._)`${n} = ${a}`)))}R.checkMissingProp=Sc;function Pc(e,t){e.setParams({missingProperty:t},!0),e.error()}R.reportMissingProp=Pc;function Ta(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,C._)`Object.prototype.hasOwnProperty`})}R.hasPropFunc=Ta;function us(e,t,r){return(0,C._)`${Ta(e)}.call(${t}, ${r})`}R.isOwnProperty=us;function Tc(e,t,r,s){let n=(0,C._)`${t}${(0,C.getProperty)(r)} !== undefined`;return s?(0,C._)`${n} && ${us(e,t,r)}`:n}R.propertyInData=Tc;function cs(e,t,r,s){let n=(0,C._)`${t}${(0,C.getProperty)(r)} === undefined`;return s?(0,C.or)(n,(0,C.not)(us(e,t,r))):n}R.noPropertyInData=cs;function Ia(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}R.allSchemaProperties=Ia;function Ic(e,t){return Ia(t).filter(r=>!(0,os.alwaysValidSchema)(e,t[r]))}R.schemaProperties=Ic;function Nc({schemaCode:e,data:t,it:{gen:r,topSchemaRef:s,schemaPath:n,errorPath:a},it:i},o,u,d){let c=d?(0,C._)`${e}, ${t}, ${s}${n}`:t,l=[[Se.default.instancePath,(0,C.strConcat)(Se.default.instancePath,a)],[Se.default.parentData,i.parentData],[Se.default.parentDataProperty,i.parentDataProperty],[Se.default.rootData,Se.default.rootData]];i.opts.dynamicRef&&l.push([Se.default.dynamicAnchors,Se.default.dynamicAnchors]);let h=(0,C._)`${c}, ${r.object(...l)}`;return u!==C.nil?(0,C._)`${o}.call(${u}, ${h})`:(0,C._)`${o}(${h})`}R.callValidateCode=Nc;var Oc=(0,C._)`new RegExp`;function kc({gen:e,it:{opts:t}},r){let s=t.unicodeRegExp?"u":"",{regExp:n}=t.code,a=n(r,s);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:(0,C._)`${n.code==="new RegExp"?Oc:(0,bc.useFunc)(e,n)}(${r}, ${s})`})}R.usePattern=kc;function qc(e){let{gen:t,data:r,keyword:s,it:n}=e,a=t.name("valid");if(n.allErrors){let o=t.let("valid",!0);return i(()=>t.assign(o,!1)),o}return t.var(a,!0),i(()=>t.break()),a;function i(o){let u=t.const("len",(0,C._)`${r}.length`);t.forRange("i",0,u,d=>{e.subschema({keyword:s,dataProp:d,dataPropType:os.Type.Num},a),t.if((0,C.not)(a),o)})}}R.validateArray=qc;function Rc(e){let{gen:t,schema:r,keyword:s,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(u=>(0,os.alwaysValidSchema)(n,u))&&!n.opts.unevaluated)return;let i=t.let("valid",!1),o=t.name("_valid");t.block(()=>r.forEach((u,d)=>{let c=e.subschema({keyword:s,schemaProp:d,compositeRule:!0},o);t.assign(i,(0,C._)`${i} || ${o}`),e.mergeValidEvaluated(c,o)||t.if((0,C.not)(i))})),e.result(i,()=>e.reset(),()=>e.error(!0))}R.validateUnion=Rc});var ka=y(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.validateKeywordUsage=oe.validSchemaType=oe.funcKeywordCode=oe.macroKeywordCode=void 0;var G=b(),Me=ge(),jc=Z(),Ac=yt();function Cc(e,t){let{gen:r,keyword:s,schema:n,parentSchema:a,it:i}=e,o=t.macro.call(i.self,n,a,i),u=Oa(r,s,o);i.opts.validateSchema!==!1&&i.self.validateSchema(o,!0);let d=r.name("valid");e.subschema({schema:o,schemaPath:G.nil,errSchemaPath:`${i.errSchemaPath}/${s}`,topSchemaRef:u,compositeRule:!0},d),e.pass(d,()=>e.error(!0))}oe.macroKeywordCode=Cc;function Mc(e,t){var r;let{gen:s,keyword:n,schema:a,parentSchema:i,$data:o,it:u}=e;zc(u,t);let d=!o&&t.compile?t.compile.call(u.self,a,i,u):t.validate,c=Oa(s,n,d),l=s.let("valid");e.block$data(l,h),e.ok((r=t.valid)!==null&&r!==void 0?r:l);function h(){if(t.errors===!1)m(),t.modifying&&Na(e),_(()=>e.error());else{let g=t.async?p():f();t.modifying&&Na(e),_(()=>Dc(e,g))}}function p(){let g=s.let("ruleErrs",null);return s.try(()=>m((0,G._)`await `),N=>s.assign(l,!1).if((0,G._)`${N} instanceof ${u.ValidationError}`,()=>s.assign(g,(0,G._)`${N}.errors`),()=>s.throw(N))),g}function f(){let g=(0,G._)`${c}.errors`;return s.assign(g,null),m(G.nil),g}function m(g=t.async?(0,G._)`await `:G.nil){let N=u.opts.passContext?Me.default.this:Me.default.self,T=!("compile"in t&&!o||t.schema===!1);s.assign(l,(0,G._)`${g}${(0,jc.callValidateCode)(e,c,N,T)}`,t.modifying)}function _(g){var N;s.if((0,G.not)((N=t.valid)!==null&&N!==void 0?N:l),g)}}oe.funcKeywordCode=Mc;function Na(e){let{gen:t,data:r,it:s}=e;t.if(s.parentData,()=>t.assign(r,(0,G._)`${s.parentData}[${s.parentDataProperty}]`))}function Dc(e,t){let{gen:r}=e;r.if((0,G._)`Array.isArray(${t})`,()=>{r.assign(Me.default.vErrors,(0,G._)`${Me.default.vErrors} === null ? ${t} : ${Me.default.vErrors}.concat(${t})`).assign(Me.default.errors,(0,G._)`${Me.default.vErrors}.length`),(0,Ac.extendErrors)(e)},()=>e.error())}function zc({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function Oa(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,G.stringify)(r)})}function Vc(e,t,r=!1){return!t.length||t.some(s=>s==="array"?Array.isArray(e):s==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==s||r&&typeof e>"u")}oe.validSchemaType=Vc;function xc({schema:e,opts:t,self:r,errSchemaPath:s},n,a){if(Array.isArray(n.keyword)?!n.keyword.includes(a):n.keyword!==a)throw new Error("ajv implementation error");let i=n.dependencies;if(i?.some(o=>!Object.prototype.hasOwnProperty.call(e,o)))throw new Error(`parent schema must have dependencies of ${a}: ${i.join(",")}`);if(n.validateSchema&&!n.validateSchema(e[a])){let u=`keyword "${a}" value is invalid at path "${s}": `+r.errorsText(n.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(u);else throw new Error(u)}}oe.validateKeywordUsage=xc});var Ra=y(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.extendSubschemaMode=Pe.extendSubschemaData=Pe.getSubschema=void 0;var ue=b(),qa=q();function Lc(e,{keyword:t,schemaProp:r,schema:s,schemaPath:n,errSchemaPath:a,topSchemaRef:i}){if(t!==void 0&&s!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let o=e.schema[t];return r===void 0?{schema:o,schemaPath:(0,ue._)`${e.schemaPath}${(0,ue.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:o[r],schemaPath:(0,ue._)`${e.schemaPath}${(0,ue.getProperty)(t)}${(0,ue.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,qa.escapeFragment)(r)}`}}if(s!==void 0){if(n===void 0||a===void 0||i===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:n,topSchemaRef:i,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')}Pe.getSubschema=Lc;function Uc(e,t,{dataProp:r,dataPropType:s,data:n,dataTypes:a,propertyName:i}){if(n!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:o}=t;if(r!==void 0){let{errorPath:d,dataPathArr:c,opts:l}=t,h=o.let("data",(0,ue._)`${t.data}${(0,ue.getProperty)(r)}`,!0);u(h),e.errorPath=(0,ue.str)`${d}${(0,qa.getErrorPath)(r,s,l.jsPropertySyntax)}`,e.parentDataProperty=(0,ue._)`${r}`,e.dataPathArr=[...c,e.parentDataProperty]}if(n!==void 0){let d=n instanceof ue.Name?n:o.let("data",n,!0);u(d),i!==void 0&&(e.propertyName=i)}a&&(e.dataTypes=a);function u(d){e.data=d,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,d]}}Pe.extendSubschemaData=Uc;function Fc(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:s,createErrors:n,allErrors:a}){s!==void 0&&(e.compositeRule=s),n!==void 0&&(e.createErrors=n),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=r}Pe.extendSubschemaMode=Fc});var ds=y((yh,ja)=>{"use strict";ja.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var s,n,a;if(Array.isArray(t)){if(s=t.length,s!=r.length)return!1;for(n=s;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(a=Object.keys(t),s=a.length,s!==Object.keys(r).length)return!1;for(n=s;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[n]))return!1;for(n=s;n--!==0;){var i=a[n];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r}});var Ca=y((_h,Aa)=>{"use strict";var Te=Aa.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var s=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};Zt(t,s,n,e,"",e)};Te.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Te.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Te.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Te.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Zt(e,t,r,s,n,a,i,o,u,d){if(s&&typeof s=="object"&&!Array.isArray(s)){t(s,n,a,i,o,u,d);for(var c in s){var l=s[c];if(Array.isArray(l)){if(c in Te.arrayKeywords)for(var h=0;h<l.length;h++)Zt(e,t,r,l[h],n+"/"+c+"/"+h,a,n,c,s,h)}else if(c in Te.propsKeywords){if(l&&typeof l=="object")for(var p in l)Zt(e,t,r,l[p],n+"/"+c+"/"+Kc(p),a,n,c,s,p)}else(c in Te.keywords||e.allKeys&&!(c in Te.skipKeywords))&&Zt(e,t,r,l,n+"/"+c,a,n,c,s)}r(s,n,a,i,o,u,d)}}function Kc(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var gt=y(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.getSchemaRefs=B.resolveUrl=B.normalizeId=B._getFullPath=B.getFullPath=B.inlineRef=void 0;var Gc=q(),Hc=ds(),Yc=Ca(),Bc=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Jc(e,t=!0){return typeof e=="boolean"?!0:t===!0?!ls(e):t?Ma(e)<=t:!1}B.inlineRef=Jc;var Wc=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function ls(e){for(let t in e){if(Wc.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(ls)||typeof r=="object"&&ls(r))return!0}return!1}function Ma(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!Bc.has(r)&&(typeof e[r]=="object"&&(0,Gc.eachItem)(e[r],s=>t+=Ma(s)),t===1/0))return 1/0}return t}function Da(e,t="",r){r!==!1&&(t=Ye(t));let s=e.parse(t);return za(e,s)}B.getFullPath=Da;function za(e,t){return e.serialize(t).split("#")[0]+"#"}B._getFullPath=za;var Zc=/#\/?$/;function Ye(e){return e?e.replace(Zc,""):""}B.normalizeId=Ye;function Xc(e,t,r){return r=Ye(r),e.resolve(t,r)}B.resolveUrl=Xc;var Qc=/^[a-z_][-a-z0-9._]*$/i;function ed(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:s}=this.opts,n=Ye(e[r]||t),a={"":n},i=Da(s,n,!1),o={},u=new Set;return Yc(e,{allKeys:!0},(l,h,p,f)=>{if(f===void 0)return;let m=i+h,_=a[f];typeof l[r]=="string"&&(_=g.call(this,l[r])),N.call(this,l.$anchor),N.call(this,l.$dynamicAnchor),a[h]=_;function g(T){let A=this.opts.uriResolver.resolve;if(T=Ye(_?A(_,T):T),u.has(T))throw c(T);u.add(T);let w=this.refs[T];return typeof w=="string"&&(w=this.refs[w]),typeof w=="object"?d(l,w.schema,T):T!==Ye(m)&&(T[0]==="#"?(d(l,o[T],T),o[T]=l):this.refs[T]=m),T}function N(T){if(typeof T=="string"){if(!Qc.test(T))throw new Error(`invalid anchor "${T}"`);g.call(this,`#${T}`)}}}),o;function d(l,h,p){if(h!==void 0&&!Hc(l,h))throw c(p)}function c(l){return new Error(`reference "${l}" resolves to more than one schema`)}}B.getSchemaRefs=ed});var wt=y(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.getData=Ie.KeywordCxt=Ie.validateFunctionCode=void 0;var Fa=ga(),Va=_t(),ms=ss(),Xt=_t(),td=Pa(),vt=ka(),fs=Ra(),$=b(),v=ge(),rd=gt(),$e=q(),$t=yt();function sd(e){if(Ha(e)&&(Ya(e),Ga(e))){id(e);return}Ka(e,()=>(0,Fa.topBoolOrEmptySchema)(e))}Ie.validateFunctionCode=sd;function Ka({gen:e,validateName:t,schema:r,schemaEnv:s,opts:n},a){n.code.es5?e.func(t,(0,$._)`${v.default.data}, ${v.default.valCxt}`,s.$async,()=>{e.code((0,$._)`"use strict"; ${xa(r,n)}`),ad(e,n),e.code(a)}):e.func(t,(0,$._)`${v.default.data}, ${nd(n)}`,s.$async,()=>e.code(xa(r,n)).code(a))}function nd(e){return(0,$._)`{${v.default.instancePath}="", ${v.default.parentData}, ${v.default.parentDataProperty}, ${v.default.rootData}=${v.default.data}${e.dynamicRef?(0,$._)`, ${v.default.dynamicAnchors}={}`:$.nil}}={}`}function ad(e,t){e.if(v.default.valCxt,()=>{e.var(v.default.instancePath,(0,$._)`${v.default.valCxt}.${v.default.instancePath}`),e.var(v.default.parentData,(0,$._)`${v.default.valCxt}.${v.default.parentData}`),e.var(v.default.parentDataProperty,(0,$._)`${v.default.valCxt}.${v.default.parentDataProperty}`),e.var(v.default.rootData,(0,$._)`${v.default.valCxt}.${v.default.rootData}`),t.dynamicRef&&e.var(v.default.dynamicAnchors,(0,$._)`${v.default.valCxt}.${v.default.dynamicAnchors}`)},()=>{e.var(v.default.instancePath,(0,$._)`""`),e.var(v.default.parentData,(0,$._)`undefined`),e.var(v.default.parentDataProperty,(0,$._)`undefined`),e.var(v.default.rootData,v.default.data),t.dynamicRef&&e.var(v.default.dynamicAnchors,(0,$._)`{}`)})}function id(e){let{schema:t,opts:r,gen:s}=e;Ka(e,()=>{r.$comment&&t.$comment&&Ja(e),ld(e),s.let(v.default.vErrors,null),s.let(v.default.errors,0),r.unevaluated&&od(e),Ba(e),pd(e)})}function od(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,$._)`${r}.evaluated`),t.if((0,$._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,$._)`${e.evaluated}.props`,(0,$._)`undefined`)),t.if((0,$._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,$._)`${e.evaluated}.items`,(0,$._)`undefined`))}function xa(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,$._)`/*# sourceURL=${r} */`:$.nil}function ud(e,t){if(Ha(e)&&(Ya(e),Ga(e))){cd(e,t);return}(0,Fa.boolOrEmptySchema)(e,t)}function Ga({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function Ha(e){return typeof e.schema!="boolean"}function cd(e,t){let{schema:r,gen:s,opts:n}=e;n.$comment&&r.$comment&&Ja(e),fd(e),md(e);let a=s.const("_errs",v.default.errors);Ba(e,a),s.var(t,(0,$._)`${a} === ${v.default.errors}`)}function Ya(e){(0,$e.checkUnknownRules)(e),dd(e)}function Ba(e,t){if(e.opts.jtd)return La(e,[],!1,t);let r=(0,Va.getSchemaTypes)(e.schema),s=(0,Va.coerceAndCheckDataType)(e,r);La(e,r,!s,t)}function dd(e){let{schema:t,errSchemaPath:r,opts:s,self:n}=e;t.$ref&&s.ignoreKeywordsWithRef&&(0,$e.schemaHasRulesButRef)(t,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function ld(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,$e.checkStrictMode)(e,"default is ignored in the schema root")}function fd(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,rd.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function md(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function Ja({gen:e,schemaEnv:t,schema:r,errSchemaPath:s,opts:n}){let a=r.$comment;if(n.$comment===!0)e.code((0,$._)`${v.default.self}.logger.log(${a})`);else if(typeof n.$comment=="function"){let i=(0,$.str)`${s}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code((0,$._)`${v.default.self}.opts.$comment(${a}, ${i}, ${o}.schema)`)}}function pd(e){let{gen:t,schemaEnv:r,validateName:s,ValidationError:n,opts:a}=e;r.$async?t.if((0,$._)`${v.default.errors} === 0`,()=>t.return(v.default.data),()=>t.throw((0,$._)`new ${n}(${v.default.vErrors})`)):(t.assign((0,$._)`${s}.errors`,v.default.vErrors),a.unevaluated&&hd(e),t.return((0,$._)`${v.default.errors} === 0`))}function hd({gen:e,evaluated:t,props:r,items:s}){r instanceof $.Name&&e.assign((0,$._)`${t}.props`,r),s instanceof $.Name&&e.assign((0,$._)`${t}.items`,s)}function La(e,t,r,s){let{gen:n,schema:a,data:i,allErrors:o,opts:u,self:d}=e,{RULES:c}=d;if(a.$ref&&(u.ignoreKeywordsWithRef||!(0,$e.schemaHasRulesButRef)(a,c))){n.block(()=>Za(e,"$ref",c.all.$ref.definition));return}u.jtd||yd(e,t),n.block(()=>{for(let h of c.rules)l(h);l(c.post)});function l(h){(0,ms.shouldUseGroup)(a,h)&&(h.type?(n.if((0,Xt.checkDataType)(h.type,i,u.strictNumbers)),Ua(e,h),t.length===1&&t[0]===h.type&&r&&(n.else(),(0,Xt.reportTypeError)(e)),n.endIf()):Ua(e,h),o||n.if((0,$._)`${v.default.errors} === ${s||0}`))}}function Ua(e,t){let{gen:r,schema:s,opts:{useDefaults:n}}=e;n&&(0,td.assignDefaults)(e,t.type),r.block(()=>{for(let a of t.rules)(0,ms.shouldUseRule)(s,a)&&Za(e,a.keyword,a.definition,t.type)})}function yd(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(_d(e,t),e.opts.allowUnionTypes||gd(e,t),$d(e,e.dataTypes))}function _d(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{Wa(e.dataTypes,r)||ps(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),wd(e,t)}}function gd(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&ps(e,"use allowUnionTypes to allow union type keyword")}function $d(e,t){let r=e.self.RULES.all;for(let s in r){let n=r[s];if(typeof n=="object"&&(0,ms.shouldUseRule)(e.schema,n)){let{type:a}=n.definition;a.length&&!a.some(i=>vd(t,i))&&ps(e,`missing type "${a.join(",")}" for keyword "${s}"`)}}}function vd(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function Wa(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function wd(e,t){let r=[];for(let s of e.dataTypes)Wa(t,s)?r.push(s):t.includes("integer")&&s==="number"&&r.push("integer");e.dataTypes=r}function ps(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,$e.checkStrictMode)(e,t,e.opts.strictTypes)}var Qt=class{constructor(t,r,s){if((0,vt.validateKeywordUsage)(t,r,s),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=s,this.data=t.data,this.schema=t.schema[s],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,$e.schemaRefOrVal)(t,this.schema,s,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",Xa(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,vt.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${s} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",v.default.errors))}result(t,r,s){this.failResult((0,$.not)(t),r,s)}failResult(t,r,s){this.gen.if(t),s?s():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,$.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,$._)`${r} !== undefined && (${(0,$.or)(this.invalid$data(),t)})`)}error(t,r,s){if(r){this.setParams(r),this._error(t,s),this.setParams({});return}this._error(t,s)}_error(t,r){(t?$t.reportExtraError:$t.reportError)(this,this.def.error,r)}$dataError(){(0,$t.reportError)(this,this.def.$dataError||$t.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,$t.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,s=$.nil){this.gen.block(()=>{this.check$data(t,s),r()})}check$data(t=$.nil,r=$.nil){if(!this.$data)return;let{gen:s,schemaCode:n,schemaType:a,def:i}=this;s.if((0,$.or)((0,$._)`${n} === undefined`,r)),t!==$.nil&&s.assign(t,!0),(a.length||i.validateSchema)&&(s.elseIf(this.invalid$data()),this.$dataError(),t!==$.nil&&s.assign(t,!1)),s.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:s,def:n,it:a}=this;return(0,$.or)(i(),o());function i(){if(s.length){if(!(r instanceof $.Name))throw new Error("ajv implementation error");let u=Array.isArray(s)?s:[s];return(0,$._)`${(0,Xt.checkDataTypes)(u,r,a.opts.strictNumbers,Xt.DataType.Wrong)}`}return $.nil}function o(){if(n.validateSchema){let u=t.scopeValue("validate$data",{ref:n.validateSchema});return(0,$._)`!${u}(${r})`}return $.nil}}subschema(t,r){let s=(0,fs.getSubschema)(this.it,t);(0,fs.extendSubschemaData)(s,this.it,t),(0,fs.extendSubschemaMode)(s,t);let n={...this.it,...s,items:void 0,props:void 0};return ud(n,r),n}mergeEvaluated(t,r){let{it:s,gen:n}=this;s.opts.unevaluated&&(s.props!==!0&&t.props!==void 0&&(s.props=$e.mergeEvaluated.props(n,t.props,s.props,r)),s.items!==!0&&t.items!==void 0&&(s.items=$e.mergeEvaluated.items(n,t.items,s.items,r)))}mergeValidEvaluated(t,r){let{it:s,gen:n}=this;if(s.opts.unevaluated&&(s.props!==!0||s.items!==!0))return n.if(r,()=>this.mergeEvaluated(t,$.Name)),!0}};Ie.KeywordCxt=Qt;function Za(e,t,r,s){let n=new Qt(e,r,t);"code"in r?r.code(n,s):n.$data&&r.validate?(0,vt.funcKeywordCode)(n,r):"macro"in r?(0,vt.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,vt.funcKeywordCode)(n,r)}var bd=/^\/(?:[^~]|~0|~1)*$/,Ed=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Xa(e,{dataLevel:t,dataNames:r,dataPathArr:s}){let n,a;if(e==="")return v.default.rootData;if(e[0]==="/"){if(!bd.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);n=e,a=v.default.rootData}else{let d=Ed.exec(e);if(!d)throw new Error(`Invalid JSON-pointer: ${e}`);let c=+d[1];if(n=d[2],n==="#"){if(c>=t)throw new Error(u("property/index",c));return s[t-c]}if(c>t)throw new Error(u("data",c));if(a=r[t-c],!n)return a}let i=a,o=n.split("/");for(let d of o)d&&(a=(0,$._)`${a}${(0,$.getProperty)((0,$e.unescapeJsonPointer)(d))}`,i=(0,$._)`${i} && ${a}`);return i;function u(d,c){return`Cannot access ${d} ${c} levels up, current level is ${t}`}}Ie.getData=Xa});var er=y(ys=>{"use strict";Object.defineProperty(ys,"__esModule",{value:!0});var hs=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};ys.default=hs});var bt=y($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});var _s=gt(),gs=class extends Error{constructor(t,r,s,n){super(n||`can't resolve reference ${s} from id ${r}`),this.missingRef=(0,_s.resolveUrl)(t,r,s),this.missingSchema=(0,_s.normalizeId)((0,_s.getFullPath)(t,this.missingRef))}};$s.default=gs});var rr=y(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.resolveSchema=X.getCompilingSchema=X.resolveRef=X.compileSchema=X.SchemaEnv=void 0;var re=b(),Sd=er(),De=ge(),se=gt(),Qa=q(),Pd=wt(),Be=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let s;typeof t.schema=="object"&&(s=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,se.normalizeId)(s?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=s?.$async,this.refs={}}};X.SchemaEnv=Be;function ws(e){let t=ei.call(this,e);if(t)return t;let r=(0,se.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:s,lines:n}=this.opts.code,{ownProperties:a}=this.opts,i=new re.CodeGen(this.scope,{es5:s,lines:n,ownProperties:a}),o;e.$async&&(o=i.scopeValue("Error",{ref:Sd.default,code:(0,re._)`require("ajv/dist/runtime/validation_error").default`}));let u=i.scopeName("validate");e.validateName=u;let d={gen:i,allErrors:this.opts.allErrors,data:De.default.data,parentData:De.default.parentData,parentDataProperty:De.default.parentDataProperty,dataNames:[De.default.data],dataPathArr:[re.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,re.stringify)(e.schema)}:{ref:e.schema}),validateName:u,ValidationError:o,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:re.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,re._)`""`,opts:this.opts,self:this},c;try{this._compilations.add(e),(0,Pd.validateFunctionCode)(d),i.optimize(this.opts.code.optimize);let l=i.toString();c=`${i.scopeRefs(De.default.scope)}return ${l}`,this.opts.code.process&&(c=this.opts.code.process(c,e));let p=new Function(`${De.default.self}`,`${De.default.scope}`,c)(this,this.scope.get());if(this.scope.value(u,{ref:p}),p.errors=null,p.schema=e.schema,p.schemaEnv=e,e.$async&&(p.$async=!0),this.opts.code.source===!0&&(p.source={validateName:u,validateCode:l,scopeValues:i._values}),this.opts.unevaluated){let{props:f,items:m}=d;p.evaluated={props:f instanceof re.Name?void 0:f,items:m instanceof re.Name?void 0:m,dynamicProps:f instanceof re.Name,dynamicItems:m instanceof re.Name},p.source&&(p.source.evaluated=(0,re.stringify)(p.evaluated))}return e.validate=p,e}catch(l){throw delete e.validate,delete e.validateName,c&&this.logger.error("Error compiling schema, function code:",c),l}finally{this._compilations.delete(e)}}X.compileSchema=ws;function Td(e,t,r){var s;r=(0,se.resolveUrl)(this.opts.uriResolver,t,r);let n=e.refs[r];if(n)return n;let a=Od.call(this,e,r);if(a===void 0){let i=(s=e.localRefs)===null||s===void 0?void 0:s[r],{schemaId:o}=this.opts;i&&(a=new Be({schema:i,schemaId:o,root:e,baseId:t}))}if(a!==void 0)return e.refs[r]=Id.call(this,a)}X.resolveRef=Td;function Id(e){return(0,se.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:ws.call(this,e)}function ei(e){for(let t of this._compilations)if(Nd(t,e))return t}X.getCompilingSchema=ei;function Nd(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Od(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||tr.call(this,e,t)}function tr(e,t){let r=this.opts.uriResolver.parse(t),s=(0,se._getFullPath)(this.opts.uriResolver,r),n=(0,se.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&s===n)return vs.call(this,r,e);let a=(0,se.normalizeId)(s),i=this.refs[a]||this.schemas[a];if(typeof i=="string"){let o=tr.call(this,e,i);return typeof o?.schema!="object"?void 0:vs.call(this,r,o)}if(typeof i?.schema=="object"){if(i.validate||ws.call(this,i),a===(0,se.normalizeId)(t)){let{schema:o}=i,{schemaId:u}=this.opts,d=o[u];return d&&(n=(0,se.resolveUrl)(this.opts.uriResolver,n,d)),new Be({schema:o,schemaId:u,root:e,baseId:n})}return vs.call(this,r,i)}}X.resolveSchema=tr;var kd=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function vs(e,{baseId:t,schema:r,root:s}){var n;if(((n=e.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(let o of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let u=r[(0,Qa.unescapeFragment)(o)];if(u===void 0)return;r=u;let d=typeof r=="object"&&r[this.opts.schemaId];!kd.has(o)&&d&&(t=(0,se.resolveUrl)(this.opts.uriResolver,t,d))}let a;if(typeof r!="boolean"&&r.$ref&&!(0,Qa.schemaHasRulesButRef)(r,this.RULES)){let o=(0,se.resolveUrl)(this.opts.uriResolver,t,r.$ref);a=tr.call(this,s,o)}let{schemaId:i}=this.opts;if(a=a||new Be({schema:r,schemaId:i,root:s,baseId:t}),a.schema!==a.root.schema)return a}});var ti=y((Eh,qd)=>{qd.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var si=y((Sh,ri)=>{"use strict";var Rd={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};ri.exports={HEX:Rd}});var li=y((Ph,di)=>{"use strict";var{HEX:jd}=si();function oi(e){if(ci(e,".")<3)return{host:e,isIPV4:!1};let t=e.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[],[r]=t;return r?{host:Cd(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function bs(e,t=!1){let r="",s=!0;for(let n of e){if(jd[n]===void 0)return;n!=="0"&&s===!0&&(s=!1),s||(r+=n)}return t&&r.length===0&&(r="0"),r}function Ad(e){let t=0,r={error:!1,address:"",zone:""},s=[],n=[],a=!1,i=!1,o=!1;function u(){if(n.length){if(a===!1){let d=bs(n);if(d!==void 0)s.push(d);else return r.error=!0,!1}n.length=0}return!0}for(let d=0;d<e.length;d++){let c=e[d];if(!(c==="["||c==="]"))if(c===":"){if(i===!0&&(o=!0),!u())break;if(t++,s.push(":"),t>7){r.error=!0;break}d-1>=0&&e[d-1]===":"&&(i=!0);continue}else if(c==="%"){if(!u())break;a=!0}else{n.push(c);continue}}return n.length&&(a?r.zone=n.join(""):o?s.push(n.join("")):s.push(bs(n))),r.address=s.join(""),r}function ui(e,t={}){if(ci(e,":")<2)return{host:e,isIPV6:!1};let r=Ad(e);if(r.error)return{host:e,isIPV6:!1};{let s=r.address,n=r.address;return r.zone&&(s+="%"+r.zone,n+="%25"+r.zone),{host:s,escapedHost:n,isIPV6:!0}}}function Cd(e,t){let r="",s=!0,n=e.length;for(let a=0;a<n;a++){let i=e[a];i==="0"&&s?(a+1<=n&&e[a+1]===t||a+1===n)&&(r+=i,s=!1):(i===t?s=!0:s=!1,r+=i)}return r}function ci(e,t){let r=0;for(let s=0;s<e.length;s++)e[s]===t&&r++;return r}var ni=/^\.\.?\//u,ai=/^\/\.(?:\/|$)/u,ii=/^\/\.\.(?:\/|$)/u,Md=/^\/?(?:.|\n)*?(?=\/|$)/u;function Dd(e){let t=[];for(;e.length;)if(e.match(ni))e=e.replace(ni,"");else if(e.match(ai))e=e.replace(ai,"/");else if(e.match(ii))e=e.replace(ii,"/"),t.pop();else if(e==="."||e==="..")e="";else{let r=e.match(Md);if(r){let s=r[0];e=e.slice(s.length),t.push(s)}else throw new Error("Unexpected dot segment condition")}return t.join("")}function zd(e,t){let r=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=r(e.scheme)),e.userinfo!==void 0&&(e.userinfo=r(e.userinfo)),e.host!==void 0&&(e.host=r(e.host)),e.path!==void 0&&(e.path=r(e.path)),e.query!==void 0&&(e.query=r(e.query)),e.fragment!==void 0&&(e.fragment=r(e.fragment)),e}function Vd(e,t){let r=[];if(e.userinfo!==void 0&&(r.push(e.userinfo),r.push("@")),e.host!==void 0){let s=unescape(e.host),n=oi(s);if(n.isIPV4)s=n.host;else{let a=ui(n.host,{isIPV4:!1});a.isIPV6===!0?s=`[${a.escapedHost}]`:s=e.host}r.push(s)}return(typeof e.port=="number"||typeof e.port=="string")&&(r.push(":"),r.push(String(e.port))),r.length?r.join(""):void 0}di.exports={recomposeAuthority:Vd,normalizeComponentEncoding:zd,removeDotSegments:Dd,normalizeIPv4:oi,normalizeIPv6:ui,stringArrayToHexStripped:bs}});var _i=y((Th,yi)=>{"use strict";var xd=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,Ld=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function fi(e){return typeof e.secure=="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}function mi(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function pi(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function Ud(e){return e.secure=fi(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function Fd(e){if((e.port===(fi(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function Kd(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(Ld);if(r){let s=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let n=`${s}:${t.nid||e.nid}`,a=Es[n];e.path=void 0,a&&(e=a.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function Gd(e,t){let r=t.scheme||e.scheme||"urn",s=e.nid.toLowerCase(),n=`${r}:${t.nid||s}`,a=Es[n];a&&(e=a.serialize(e,t));let i=e,o=e.nss;return i.path=`${s||t.nid}:${o}`,t.skipEscape=!0,i}function Hd(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!xd.test(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function Yd(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var hi={scheme:"http",domainHost:!0,parse:mi,serialize:pi},Bd={scheme:"https",domainHost:hi.domainHost,parse:mi,serialize:pi},sr={scheme:"ws",domainHost:!0,parse:Ud,serialize:Fd},Jd={scheme:"wss",domainHost:sr.domainHost,parse:sr.parse,serialize:sr.serialize},Wd={scheme:"urn",parse:Kd,serialize:Gd,skipNormalize:!0},Zd={scheme:"urn:uuid",parse:Hd,serialize:Yd,skipNormalize:!0},Es={http:hi,https:Bd,ws:sr,wss:Jd,urn:Wd,"urn:uuid":Zd};yi.exports=Es});var $i=y((Ih,ar)=>{"use strict";var{normalizeIPv6:Xd,normalizeIPv4:Qd,removeDotSegments:Et,recomposeAuthority:el,normalizeComponentEncoding:nr}=li(),Ss=_i();function tl(e,t){return typeof e=="string"?e=ce(ve(e,t),t):typeof e=="object"&&(e=ve(ce(e,t),t)),e}function rl(e,t,r){let s=Object.assign({scheme:"null"},r),n=gi(ve(e,s),ve(t,s),s,!0);return ce(n,{...s,skipEscape:!0})}function gi(e,t,r,s){let n={};return s||(e=ve(ce(e,r),r),t=ve(ce(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=Et(t.path||""),n.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=Et(t.path||""),n.query=t.query):(t.path?(t.path.charAt(0)==="/"?n.path=Et(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?n.path="/"+t.path:e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path,n.path=Et(n.path)),n.query=t.query):(n.path=e.path,t.query!==void 0?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function sl(e,t,r){return typeof e=="string"?(e=unescape(e),e=ce(nr(ve(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=ce(nr(e,!0),{...r,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=ce(nr(ve(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=ce(nr(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function ce(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},s=Object.assign({},t),n=[],a=Ss[(s.scheme||r.scheme||"").toLowerCase()];a&&a.serialize&&a.serialize(r,s),r.path!==void 0&&(s.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),s.reference!=="suffix"&&r.scheme&&(n.push(r.scheme),n.push(":"));let i=el(r,s);if(i!==void 0&&(s.reference!=="suffix"&&n.push("//"),n.push(i),r.path&&r.path.charAt(0)!=="/"&&n.push("/")),r.path!==void 0){let o=r.path;!s.absolutePath&&(!a||!a.absolutePath)&&(o=Et(o)),i===void 0&&(o=o.replace(/^\/\//u,"/%2F")),n.push(o)}return r.query!==void 0&&(n.push("?"),n.push(r.query)),r.fragment!==void 0&&(n.push("#"),n.push(r.fragment)),n.join("")}var nl=Array.from({length:127},(e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)));function al(e){let t=0;for(let r=0,s=e.length;r<s;++r)if(t=e.charCodeAt(r),t>126||nl[t])return!0;return!1}var il=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function ve(e,t){let r=Object.assign({},t),s={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},n=e.indexOf("%")!==-1,a=!1;r.reference==="suffix"&&(e=(r.scheme?r.scheme+":":"")+"//"+e);let i=e.match(il);if(i){if(s.scheme=i[1],s.userinfo=i[3],s.host=i[4],s.port=parseInt(i[5],10),s.path=i[6]||"",s.query=i[7],s.fragment=i[8],isNaN(s.port)&&(s.port=i[5]),s.host){let u=Qd(s.host);if(u.isIPV4===!1){let d=Xd(u.host,{isIPV4:!1});s.host=d.host.toLowerCase(),a=d.isIPV6}else s.host=u.host,a=!0}s.scheme===void 0&&s.userinfo===void 0&&s.host===void 0&&s.port===void 0&&!s.path&&s.query===void 0?s.reference="same-document":s.scheme===void 0?s.reference="relative":s.fragment===void 0?s.reference="absolute":s.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==s.reference&&(s.error=s.error||"URI is not a "+r.reference+" reference.");let o=Ss[(r.scheme||s.scheme||"").toLowerCase()];if(!r.unicodeSupport&&(!o||!o.unicodeSupport)&&s.host&&(r.domainHost||o&&o.domainHost)&&a===!1&&al(s.host))try{s.host=URL.domainToASCII(s.host.toLowerCase())}catch(u){s.error=s.error||"Host's domain name can not be converted to ASCII: "+u}(!o||o&&!o.skipNormalize)&&(n&&s.scheme!==void 0&&(s.scheme=unescape(s.scheme)),n&&s.userinfo!==void 0&&(s.userinfo=unescape(s.userinfo)),n&&s.host!==void 0&&(s.host=unescape(s.host)),s.path!==void 0&&s.path.length&&(s.path=escape(unescape(s.path))),s.fragment!==void 0&&s.fragment.length&&(s.fragment=encodeURI(decodeURIComponent(s.fragment)))),o&&o.parse&&o.parse(s,r)}else s.error=s.error||"URI can not be parsed.";return s}var Ps={SCHEMES:Ss,normalize:tl,resolve:rl,resolveComponents:gi,equal:sl,serialize:ce,parse:ve};ar.exports=Ps;ar.exports.default=Ps;ar.exports.fastUri=Ps});var wi=y(Ts=>{"use strict";Object.defineProperty(Ts,"__esModule",{value:!0});var vi=$i();vi.code='require("ajv/dist/runtime/uri").default';Ts.default=vi});var We=y(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.CodeGen=V.Name=V.nil=V.stringify=V.str=V._=V.KeywordCxt=void 0;var ol=wt();Object.defineProperty(V,"KeywordCxt",{enumerable:!0,get:function(){return ol.KeywordCxt}});var Je=b();Object.defineProperty(V,"_",{enumerable:!0,get:function(){return Je._}});Object.defineProperty(V,"str",{enumerable:!0,get:function(){return Je.str}});Object.defineProperty(V,"stringify",{enumerable:!0,get:function(){return Je.stringify}});Object.defineProperty(V,"nil",{enumerable:!0,get:function(){return Je.nil}});Object.defineProperty(V,"Name",{enumerable:!0,get:function(){return Je.Name}});Object.defineProperty(V,"CodeGen",{enumerable:!0,get:function(){return Je.CodeGen}});var ul=er(),Ti=bt(),cl=rs(),St=rr(),dl=b(),Pt=gt(),ir=_t(),Ns=q(),bi=ti(),ll=wi(),Ii=(e,t)=>new RegExp(e,t);Ii.code="new RegExp";var fl=["removeAdditional","useDefaults","coerceTypes"],ml=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),pl={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},hl={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Ei=200;function yl(e){var t,r,s,n,a,i,o,u,d,c,l,h,p,f,m,_,g,N,T,A,w,ie,pe,Tr,Ir;let it=e.strict,Nr=(t=e.code)===null||t===void 0?void 0:t.optimize,Yn=Nr===!0||Nr===void 0?1:Nr||0,Bn=(s=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&s!==void 0?s:Ii,Zo=(n=e.uriResolver)!==null&&n!==void 0?n:ll.default;return{strictSchema:(i=(a=e.strictSchema)!==null&&a!==void 0?a:it)!==null&&i!==void 0?i:!0,strictNumbers:(u=(o=e.strictNumbers)!==null&&o!==void 0?o:it)!==null&&u!==void 0?u:!0,strictTypes:(c=(d=e.strictTypes)!==null&&d!==void 0?d:it)!==null&&c!==void 0?c:"log",strictTuples:(h=(l=e.strictTuples)!==null&&l!==void 0?l:it)!==null&&h!==void 0?h:"log",strictRequired:(f=(p=e.strictRequired)!==null&&p!==void 0?p:it)!==null&&f!==void 0?f:!1,code:e.code?{...e.code,optimize:Yn,regExp:Bn}:{optimize:Yn,regExp:Bn},loopRequired:(m=e.loopRequired)!==null&&m!==void 0?m:Ei,loopEnum:(_=e.loopEnum)!==null&&_!==void 0?_:Ei,meta:(g=e.meta)!==null&&g!==void 0?g:!0,messages:(N=e.messages)!==null&&N!==void 0?N:!0,inlineRefs:(T=e.inlineRefs)!==null&&T!==void 0?T:!0,schemaId:(A=e.schemaId)!==null&&A!==void 0?A:"$id",addUsedSchema:(w=e.addUsedSchema)!==null&&w!==void 0?w:!0,validateSchema:(ie=e.validateSchema)!==null&&ie!==void 0?ie:!0,validateFormats:(pe=e.validateFormats)!==null&&pe!==void 0?pe:!0,unicodeRegExp:(Tr=e.unicodeRegExp)!==null&&Tr!==void 0?Tr:!0,int32range:(Ir=e.int32range)!==null&&Ir!==void 0?Ir:!0,uriResolver:Zo}}var Tt=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...yl(t)};let{es5:r,lines:s}=this.opts.code;this.scope=new dl.ValueScope({scope:{},prefixes:ml,es5:r,lines:s}),this.logger=bl(t.logger);let n=t.validateFormats;t.validateFormats=!1,this.RULES=(0,cl.getRules)(),Si.call(this,pl,t,"NOT SUPPORTED"),Si.call(this,hl,t,"DEPRECATED","warn"),this._metaOpts=vl.call(this),t.formats&&gl.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&$l.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),_l.call(this),t.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:s}=this.opts,n=bi;s==="id"&&(n={...bi},n.id=n.$id,delete n.$id),r&&t&&this.addMetaSchema(n,n[s],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let s;if(typeof t=="string"){if(s=this.getSchema(t),!s)throw new Error(`no schema with key or ref "${t}"`)}else s=this.compile(t);let n=s(r);return"$async"in s||(this.errors=s.errors),n}compile(t,r){let s=this._addSchema(t,r);return s.validate||this._compileSchemaEnv(s)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:s}=this.opts;return n.call(this,t,r);async function n(c,l){await a.call(this,c.$schema);let h=this._addSchema(c,l);return h.validate||i.call(this,h)}async function a(c){c&&!this.getSchema(c)&&await n.call(this,{$ref:c},!0)}async function i(c){try{return this._compileSchemaEnv(c)}catch(l){if(!(l instanceof Ti.default))throw l;return o.call(this,l),await u.call(this,l.missingSchema),i.call(this,c)}}function o({missingSchema:c,missingRef:l}){if(this.refs[c])throw new Error(`AnySchema ${c} is loaded but ${l} cannot be resolved`)}async function u(c){let l=await d.call(this,c);this.refs[c]||await a.call(this,l.$schema),this.refs[c]||this.addSchema(l,c,r)}async function d(c){let l=this._loading[c];if(l)return l;try{return await(this._loading[c]=s(c))}finally{delete this._loading[c]}}}addSchema(t,r,s,n=this.opts.validateSchema){if(Array.isArray(t)){for(let i of t)this.addSchema(i,void 0,s,n);return this}let a;if(typeof t=="object"){let{schemaId:i}=this.opts;if(a=t[i],a!==void 0&&typeof a!="string")throw new Error(`schema ${i} must be string`)}return r=(0,Pt.normalizeId)(r||a),this._checkUnique(r),this.schemas[r]=this._addSchema(t,s,r,n,!0),this}addMetaSchema(t,r,s=this.opts.validateSchema){return this.addSchema(t,r,!0,s),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let s;if(s=t.$schema,s!==void 0&&typeof s!="string")throw new Error("$schema must be a string");if(s=s||this.opts.defaultMeta||this.defaultMeta(),!s)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let n=this.validate(s,t);if(!n&&r){let a="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(a);else throw new Error(a)}return n}getSchema(t){let r;for(;typeof(r=Pi.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:s}=this.opts,n=new St.SchemaEnv({schema:{},schemaId:s});if(r=St.resolveSchema.call(this,n,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=Pi.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let s=t[this.opts.schemaId];return s&&(s=(0,Pt.normalizeId)(s),delete this.schemas[s],delete this.refs[s]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let s;if(typeof t=="string")s=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=s);else if(typeof t=="object"&&r===void 0){if(r=t,s=r.keyword,Array.isArray(s)&&!s.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Sl.call(this,s,r),!r)return(0,Ns.eachItem)(s,a=>Is.call(this,a)),this;Tl.call(this,r);let n={...r,type:(0,ir.getJSONTypes)(r.type),schemaType:(0,ir.getJSONTypes)(r.schemaType)};return(0,Ns.eachItem)(s,n.type.length===0?a=>Is.call(this,a,n):a=>n.type.forEach(i=>Is.call(this,a,n,i))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let s of r.rules){let n=s.rules.findIndex(a=>a.keyword===t);n>=0&&s.rules.splice(n,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:s="data"}={}){return!t||t.length===0?"No errors":t.map(n=>`${s}${n.instancePath} ${n.message}`).reduce((n,a)=>n+r+a)}$dataMetaSchema(t,r){let s=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let n of r){let a=n.split("/").slice(1),i=t;for(let o of a)i=i[o];for(let o in s){let u=s[o];if(typeof u!="object")continue;let{$data:d}=u.definition,c=i[o];d&&c&&(i[o]=Ni(c))}}return t}_removeAllSchemas(t,r){for(let s in t){let n=t[s];(!r||r.test(s))&&(typeof n=="string"?delete t[s]:n&&!n.meta&&(this._cache.delete(n.schema),delete t[s]))}}_addSchema(t,r,s,n=this.opts.validateSchema,a=this.opts.addUsedSchema){let i,{schemaId:o}=this.opts;if(typeof t=="object")i=t[o];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let u=this._cache.get(t);if(u!==void 0)return u;s=(0,Pt.normalizeId)(i||s);let d=Pt.getSchemaRefs.call(this,t,s);return u=new St.SchemaEnv({schema:t,schemaId:o,meta:r,baseId:s,localRefs:d}),this._cache.set(u.schema,u),a&&!s.startsWith("#")&&(s&&this._checkUnique(s),this.refs[s]=u),n&&this.validateSchema(t,!0),u}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):St.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{St.compileSchema.call(this,t)}finally{this.opts=r}}};Tt.ValidationError=ul.default;Tt.MissingRefError=Ti.default;V.default=Tt;function Si(e,t,r,s="error"){for(let n in e){let a=n;a in t&&this.logger[s](`${r}: option ${n}. ${e[a]}`)}}function Pi(e){return e=(0,Pt.normalizeId)(e),this.schemas[e]||this.refs[e]}function _l(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function gl(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function $l(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function vl(){let e={...this.opts};for(let t of fl)delete e[t];return e}var wl={log(){},warn(){},error(){}};function bl(e){if(e===!1)return wl;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var El=/^[a-z_$][a-z0-9_$:-]*$/i;function Sl(e,t){let{RULES:r}=this;if((0,Ns.eachItem)(e,s=>{if(r.keywords[s])throw new Error(`Keyword ${s} is already defined`);if(!El.test(s))throw new Error(`Keyword ${s} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function Is(e,t,r){var s;let n=t?.post;if(r&&n)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:a}=this,i=n?a.post:a.rules.find(({type:u})=>u===r);if(i||(i={type:r,rules:[]},a.rules.push(i)),a.keywords[e]=!0,!t)return;let o={keyword:e,definition:{...t,type:(0,ir.getJSONTypes)(t.type),schemaType:(0,ir.getJSONTypes)(t.schemaType)}};t.before?Pl.call(this,i,o,t.before):i.rules.push(o),a.all[e]=o,(s=t.implements)===null||s===void 0||s.forEach(u=>this.addKeyword(u))}function Pl(e,t,r){let s=e.rules.findIndex(n=>n.keyword===r);s>=0?e.rules.splice(s,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function Tl(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=Ni(t)),e.validateSchema=this.compile(t,!0))}var Il={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ni(e){return{anyOf:[e,Il]}}});var Os=y(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.callRef=ze.getValidate=void 0;var Nl=bt(),Oi=Z(),J=b(),Ze=ge(),ki=rr(),or=q(),Ol={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:s}=e,{baseId:n,schemaEnv:a,validateName:i,opts:o,self:u}=s,{root:d}=a;if((r==="#"||r==="#/")&&n===d.baseId)return l();let c=ki.resolveRef.call(u,d,n,r);if(c===void 0)throw new Nl.default(s.opts.uriResolver,n,r);if(c instanceof ki.SchemaEnv)return h(c);return p(c);function l(){if(a===d)return ur(e,i,a,a.$async);let f=t.scopeValue("root",{ref:d});return ur(e,(0,J._)`${f}.validate`,d,d.$async)}function h(f){let m=qi(e,f);ur(e,m,f,f.$async)}function p(f){let m=t.scopeValue("schema",o.code.source===!0?{ref:f,code:(0,J.stringify)(f)}:{ref:f}),_=t.name("valid"),g=e.subschema({schema:f,dataTypes:[],schemaPath:J.nil,topSchemaRef:m,errSchemaPath:r},_);e.mergeEvaluated(g),e.ok(_)}}};function qi(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,J._)`${r.scopeValue("wrapper",{ref:t})}.validate`}ze.getValidate=qi;function ur(e,t,r,s){let{gen:n,it:a}=e,{allErrors:i,schemaEnv:o,opts:u}=a,d=u.passContext?Ze.default.this:J.nil;s?c():l();function c(){if(!o.$async)throw new Error("async schema referenced by sync schema");let f=n.let("valid");n.try(()=>{n.code((0,J._)`await ${(0,Oi.callValidateCode)(e,t,d)}`),p(t),i||n.assign(f,!0)},m=>{n.if((0,J._)`!(${m} instanceof ${a.ValidationError})`,()=>n.throw(m)),h(m),i||n.assign(f,!1)}),e.ok(f)}function l(){e.result((0,Oi.callValidateCode)(e,t,d),()=>p(t),()=>h(t))}function h(f){let m=(0,J._)`${f}.errors`;n.assign(Ze.default.vErrors,(0,J._)`${Ze.default.vErrors} === null ? ${m} : ${Ze.default.vErrors}.concat(${m})`),n.assign(Ze.default.errors,(0,J._)`${Ze.default.vErrors}.length`)}function p(f){var m;if(!a.opts.unevaluated)return;let _=(m=r?.validate)===null||m===void 0?void 0:m.evaluated;if(a.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(a.props=or.mergeEvaluated.props(n,_.props,a.props));else{let g=n.var("props",(0,J._)`${f}.evaluated.props`);a.props=or.mergeEvaluated.props(n,g,a.props,J.Name)}if(a.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(a.items=or.mergeEvaluated.items(n,_.items,a.items));else{let g=n.var("items",(0,J._)`${f}.evaluated.items`);a.items=or.mergeEvaluated.items(n,g,a.items,J.Name)}}}ze.callRef=ur;ze.default=Ol});var Ri=y(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});var kl=Os(),ql=["$schema","id","$defs",{keyword:"$comment"},"definitions",kl.default];ks.default=ql});var ji=y(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});var qs=We(),Rl=b(),Ne=Rl.operators,Rs={maximum:{exclusive:"exclusiveMaximum",ops:[{okStr:"<=",ok:Ne.LTE,fail:Ne.GT},{okStr:"<",ok:Ne.LT,fail:Ne.GTE}]},minimum:{exclusive:"exclusiveMinimum",ops:[{okStr:">=",ok:Ne.GTE,fail:Ne.LT},{okStr:">",ok:Ne.GT,fail:Ne.LTE}]}},jl={message:e=>qs.str`must be ${js(e).okStr} ${e.schemaCode}`,params:e=>qs._`{comparison: ${js(e).okStr}, limit: ${e.schemaCode}}`},Al={keyword:Object.keys(Rs),type:"number",schemaType:"number",$data:!0,error:jl,code(e){let{data:t,schemaCode:r}=e;e.fail$data(qs._`${t} ${js(e).fail} ${r} || isNaN(${t})`)}};function js(e){var t;let r=e.keyword,s=!((t=e.parentSchema)===null||t===void 0)&&t[Rs[r].exclusive]?1:0;return Rs[r].ops[s]}As.default=Al});var Ci=y(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});var Ai={exclusiveMaximum:"maximum",exclusiveMinimum:"minimum"},Cl={keyword:Object.keys(Ai),type:"number",schemaType:"boolean",code({keyword:e,parentSchema:t}){let r=Ai[e];if(t[r]===void 0)throw new Error(`${e} can only be used with ${r}`)}};Cs.default=Cl});var Ds=y(Ms=>{"use strict";Object.defineProperty(Ms,"__esModule",{value:!0});var It=b(),Ml={message:({schemaCode:e})=>(0,It.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,It._)`{multipleOf: ${e}}`},Dl={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Ml,code(e){let{gen:t,data:r,schemaCode:s,it:n}=e,a=n.opts.multipleOfPrecision,i=t.let("res"),o=a?(0,It._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${a}`:(0,It._)`${i} !== parseInt(${i})`;e.fail$data((0,It._)`(${s} === 0 || (${i} = ${r}/${s}, ${o}))`)}};Ms.default=Dl});var Di=y(zs=>{"use strict";Object.defineProperty(zs,"__esModule",{value:!0});function Mi(e){let t=e.length,r=0,s=0,n;for(;s<t;)r++,n=e.charCodeAt(s++),n>=55296&&n<=56319&&s<t&&(n=e.charCodeAt(s),(n&64512)===56320&&s++);return r}zs.default=Mi;Mi.code='require("ajv/dist/runtime/ucs2length").default'});var xs=y(Vs=>{"use strict";Object.defineProperty(Vs,"__esModule",{value:!0});var Ve=b(),zl=q(),Vl=Di(),xl={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Ve.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Ve._)`{limit: ${e}}`},Ll={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:xl,code(e){let{keyword:t,data:r,schemaCode:s,it:n}=e,a=t==="maxLength"?Ve.operators.GT:Ve.operators.LT,i=n.opts.unicode===!1?(0,Ve._)`${r}.length`:(0,Ve._)`${(0,zl.useFunc)(e.gen,Vl.default)}(${r})`;e.fail$data((0,Ve._)`${i} ${a} ${s}`)}};Vs.default=Ll});var Us=y(Ls=>{"use strict";Object.defineProperty(Ls,"__esModule",{value:!0});var Ul=Z(),cr=b(),Fl={message:({schemaCode:e})=>(0,cr.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,cr._)`{pattern: ${e}}`},Kl={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Fl,code(e){let{data:t,$data:r,schema:s,schemaCode:n,it:a}=e,i=a.opts.unicodeRegExp?"u":"",o=r?(0,cr._)`(new RegExp(${n}, ${i}))`:(0,Ul.usePattern)(e,s);e.fail$data((0,cr._)`!${o}.test(${t})`)}};Ls.default=Kl});var Ks=y(Fs=>{"use strict";Object.defineProperty(Fs,"__esModule",{value:!0});var Nt=b(),Gl={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,Nt.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Nt._)`{limit: ${e}}`},Hl={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Gl,code(e){let{keyword:t,data:r,schemaCode:s}=e,n=t==="maxProperties"?Nt.operators.GT:Nt.operators.LT;e.fail$data((0,Nt._)`Object.keys(${r}).length ${n} ${s}`)}};Fs.default=Hl});var Hs=y(Gs=>{"use strict";Object.defineProperty(Gs,"__esModule",{value:!0});var Ot=Z(),kt=b(),Yl=q(),Bl={message:({params:{missingProperty:e}})=>(0,kt.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,kt._)`{missingProperty: ${e}}`},Jl={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Bl,code(e){let{gen:t,schema:r,schemaCode:s,data:n,$data:a,it:i}=e,{opts:o}=i;if(!a&&r.length===0)return;let u=r.length>=o.loopRequired;if(i.allErrors?d():c(),o.strictRequired){let p=e.parentSchema.properties,{definedProperties:f}=e.it;for(let m of r)if(p?.[m]===void 0&&!f.has(m)){let _=i.schemaEnv.baseId+i.errSchemaPath,g=`required property "${m}" is not defined at "${_}" (strictRequired)`;(0,Yl.checkStrictMode)(i,g,i.opts.strictRequired)}}function d(){if(u||a)e.block$data(kt.nil,l);else for(let p of r)(0,Ot.checkReportMissingProp)(e,p)}function c(){let p=t.let("missing");if(u||a){let f=t.let("valid",!0);e.block$data(f,()=>h(p,f)),e.ok(f)}else t.if((0,Ot.checkMissingProp)(e,r,p)),(0,Ot.reportMissingProp)(e,p),t.else()}function l(){t.forOf("prop",s,p=>{e.setParams({missingProperty:p}),t.if((0,Ot.noPropertyInData)(t,n,p,o.ownProperties),()=>e.error())})}function h(p,f){e.setParams({missingProperty:p}),t.forOf(p,s,()=>{t.assign(f,(0,Ot.propertyInData)(t,n,p,o.ownProperties)),t.if((0,kt.not)(f),()=>{e.error(),t.break()})},kt.nil)}}};Gs.default=Jl});var Bs=y(Ys=>{"use strict";Object.defineProperty(Ys,"__esModule",{value:!0});var qt=b(),Wl={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,qt.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,qt._)`{limit: ${e}}`},Zl={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Wl,code(e){let{keyword:t,data:r,schemaCode:s}=e,n=t==="maxItems"?qt.operators.GT:qt.operators.LT;e.fail$data((0,qt._)`${r}.length ${n} ${s}`)}};Ys.default=Zl});var dr=y(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});var zi=ds();zi.code='require("ajv/dist/runtime/equal").default';Js.default=zi});var Xs=y(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});var Ws=_t(),x=b(),Xl=q(),Ql=dr(),ef={message:({params:{i:e,j:t}})=>(0,x.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,x._)`{i: ${e}, j: ${t}}`},tf={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:ef,code(e){let{gen:t,data:r,$data:s,schema:n,parentSchema:a,schemaCode:i,it:o}=e;if(!s&&!n)return;let u=t.let("valid"),d=a.items?(0,Ws.getSchemaTypes)(a.items):[];e.block$data(u,c,(0,x._)`${i} === false`),e.ok(u);function c(){let f=t.let("i",(0,x._)`${r}.length`),m=t.let("j");e.setParams({i:f,j:m}),t.assign(u,!0),t.if((0,x._)`${f} > 1`,()=>(l()?h:p)(f,m))}function l(){return d.length>0&&!d.some(f=>f==="object"||f==="array")}function h(f,m){let _=t.name("item"),g=(0,Ws.checkDataTypes)(d,_,o.opts.strictNumbers,Ws.DataType.Wrong),N=t.const("indices",(0,x._)`{}`);t.for((0,x._)`;${f}--;`,()=>{t.let(_,(0,x._)`${r}[${f}]`),t.if(g,(0,x._)`continue`),d.length>1&&t.if((0,x._)`typeof ${_} == "string"`,(0,x._)`${_} += "_"`),t.if((0,x._)`typeof ${N}[${_}] == "number"`,()=>{t.assign(m,(0,x._)`${N}[${_}]`),e.error(),t.assign(u,!1).break()}).code((0,x._)`${N}[${_}] = ${f}`)})}function p(f,m){let _=(0,Xl.useFunc)(t,Ql.default),g=t.name("outer");t.label(g).for((0,x._)`;${f}--;`,()=>t.for((0,x._)`${m} = ${f}; ${m}--;`,()=>t.if((0,x._)`${_}(${r}[${f}], ${r}[${m}])`,()=>{e.error(),t.assign(u,!1).break(g)})))}}};Zs.default=tf});var tn=y(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});var Qs=b(),rf=q(),sf=dr(),nf={message:"must be equal to constant",params:({schemaCode:e})=>(0,Qs._)`{allowedValue: ${e}}`},af={keyword:"const",$data:!0,error:nf,code(e){let{gen:t,data:r,$data:s,schemaCode:n,schema:a}=e;s||a&&typeof a=="object"?e.fail$data((0,Qs._)`!${(0,rf.useFunc)(t,sf.default)}(${r}, ${n})`):e.fail((0,Qs._)`${a} !== ${r}`)}};en.default=af});var sn=y(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});var Rt=b(),of=q(),uf=dr(),cf={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Rt._)`{allowedValues: ${e}}`},df={keyword:"enum",schemaType:"array",$data:!0,error:cf,code(e){let{gen:t,data:r,$data:s,schema:n,schemaCode:a,it:i}=e;if(!s&&n.length===0)throw new Error("enum must have non-empty array");let o=n.length>=i.opts.loopEnum,u,d=()=>u??(u=(0,of.useFunc)(t,uf.default)),c;if(o||s)c=t.let("valid"),e.block$data(c,l);else{if(!Array.isArray(n))throw new Error("ajv implementation error");let p=t.const("vSchema",a);c=(0,Rt.or)(...n.map((f,m)=>h(p,m)))}e.pass(c);function l(){t.assign(c,!1),t.forOf("v",a,p=>t.if((0,Rt._)`${d()}(${r}, ${p})`,()=>t.assign(c,!0).break()))}function h(p,f){let m=n[f];return typeof m=="object"&&m!==null?(0,Rt._)`${d()}(${r}, ${p}[${f}])`:(0,Rt._)`${r} === ${m}`}}};rn.default=df});var Vi=y(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});var lf=ji(),ff=Ci(),mf=Ds(),pf=xs(),hf=Us(),yf=Ks(),_f=Hs(),gf=Bs(),$f=Xs(),vf=tn(),wf=sn(),bf=[lf.default,ff.default,mf.default,pf.default,hf.default,yf.default,_f.default,gf.default,$f.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},vf.default,wf.default];nn.default=bf});var on=y(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.validateAdditionalItems=void 0;var xe=b(),an=q(),Ef={message:({params:{len:e}})=>(0,xe.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,xe._)`{limit: ${e}}`},Sf={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Ef,code(e){let{parentSchema:t,it:r}=e,{items:s}=t;if(!Array.isArray(s)){(0,an.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}xi(e,s)}};function xi(e,t){let{gen:r,schema:s,data:n,keyword:a,it:i}=e;i.items=!0;let o=r.const("len",(0,xe._)`${n}.length`);if(s===!1)e.setParams({len:t.length}),e.pass((0,xe._)`${o} <= ${t.length}`);else if(typeof s=="object"&&!(0,an.alwaysValidSchema)(i,s)){let d=r.var("valid",(0,xe._)`${o} <= ${t.length}`);r.if((0,xe.not)(d),()=>u(d)),e.ok(d)}function u(d){r.forRange("i",t.length,o,c=>{e.subschema({keyword:a,dataProp:c,dataPropType:an.Type.Num},d),i.allErrors||r.if((0,xe.not)(d),()=>r.break())})}}jt.validateAdditionalItems=xi;jt.default=Sf});var un=y(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.validateTuple=void 0;var Li=b(),lr=q(),Pf=Z(),Tf={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return Ui(e,"additionalItems",t);r.items=!0,!(0,lr.alwaysValidSchema)(r,t)&&e.ok((0,Pf.validateArray)(e))}};function Ui(e,t,r=e.schema){let{gen:s,parentSchema:n,data:a,keyword:i,it:o}=e;c(n),o.opts.unevaluated&&r.length&&o.items!==!0&&(o.items=lr.mergeEvaluated.items(s,r.length,o.items));let u=s.name("valid"),d=s.const("len",(0,Li._)`${a}.length`);r.forEach((l,h)=>{(0,lr.alwaysValidSchema)(o,l)||(s.if((0,Li._)`${d} > ${h}`,()=>e.subschema({keyword:i,schemaProp:h,dataProp:h},u)),e.ok(u))});function c(l){let{opts:h,errSchemaPath:p}=o,f=r.length,m=f===l.minItems&&(f===l.maxItems||l[t]===!1);if(h.strictTuples&&!m){let _=`"${i}" is ${f}-tuple, but minItems or maxItems/${t} are not specified or different at path "${p}"`;(0,lr.checkStrictMode)(o,_,h.strictTuples)}}}At.validateTuple=Ui;At.default=Tf});var Fi=y(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});var If=un(),Nf={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,If.validateTuple)(e,"items")};cn.default=Nf});var Gi=y(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});var Ki=b(),Of=q(),kf=Z(),qf=on(),Rf={message:({params:{len:e}})=>(0,Ki.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Ki._)`{limit: ${e}}`},jf={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Rf,code(e){let{schema:t,parentSchema:r,it:s}=e,{prefixItems:n}=r;s.items=!0,!(0,Of.alwaysValidSchema)(s,t)&&(n?(0,qf.validateAdditionalItems)(e,n):e.ok((0,kf.validateArray)(e)))}};dn.default=jf});var Hi=y(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});var Q=b(),fr=q(),Af={message:({params:{min:e,max:t}})=>t===void 0?(0,Q.str)`must contain at least ${e} valid item(s)`:(0,Q.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Q._)`{minContains: ${e}}`:(0,Q._)`{minContains: ${e}, maxContains: ${t}}`},Cf={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Af,code(e){let{gen:t,schema:r,parentSchema:s,data:n,it:a}=e,i,o,{minContains:u,maxContains:d}=s;a.opts.next?(i=u===void 0?1:u,o=d):i=1;let c=t.const("len",(0,Q._)`${n}.length`);if(e.setParams({min:i,max:o}),o===void 0&&i===0){(0,fr.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&i>o){(0,fr.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,fr.alwaysValidSchema)(a,r)){let m=(0,Q._)`${c} >= ${i}`;o!==void 0&&(m=(0,Q._)`${m} && ${c} <= ${o}`),e.pass(m);return}a.items=!0;let l=t.name("valid");o===void 0&&i===1?p(l,()=>t.if(l,()=>t.break())):i===0?(t.let(l,!0),o!==void 0&&t.if((0,Q._)`${n}.length > 0`,h)):(t.let(l,!1),h()),e.result(l,()=>e.reset());function h(){let m=t.name("_valid"),_=t.let("count",0);p(m,()=>t.if(m,()=>f(_)))}function p(m,_){t.forRange("i",0,c,g=>{e.subschema({keyword:"contains",dataProp:g,dataPropType:fr.Type.Num,compositeRule:!0},m),_()})}function f(m){t.code((0,Q._)`${m}++`),o===void 0?t.if((0,Q._)`${m} >= ${i}`,()=>t.assign(l,!0).break()):(t.if((0,Q._)`${m} > ${o}`,()=>t.assign(l,!1).break()),i===1?t.assign(l,!0):t.if((0,Q._)`${m} >= ${i}`,()=>t.assign(l,!0)))}}};ln.default=Cf});var Ji=y(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.validateSchemaDeps=de.validatePropertyDeps=de.error=void 0;var fn=b(),Mf=q(),Ct=Z();de.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let s=t===1?"property":"properties";return(0,fn.str)`must have ${s} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:s}})=>(0,fn._)`{property: ${e},
    missingProperty: ${s},
    depsCount: ${t},
    deps: ${r}}`};var Df={keyword:"dependencies",type:"object",schemaType:"object",error:de.error,code(e){let[t,r]=zf(e);Yi(e,t),Bi(e,r)}};function zf({schema:e}){let t={},r={};for(let s in e){if(s==="__proto__")continue;let n=Array.isArray(e[s])?t:r;n[s]=e[s]}return[t,r]}function Yi(e,t=e.schema){let{gen:r,data:s,it:n}=e;if(Object.keys(t).length===0)return;let a=r.let("missing");for(let i in t){let o=t[i];if(o.length===0)continue;let u=(0,Ct.propertyInData)(r,s,i,n.opts.ownProperties);e.setParams({property:i,depsCount:o.length,deps:o.join(", ")}),n.allErrors?r.if(u,()=>{for(let d of o)(0,Ct.checkReportMissingProp)(e,d)}):(r.if((0,fn._)`${u} && (${(0,Ct.checkMissingProp)(e,o,a)})`),(0,Ct.reportMissingProp)(e,a),r.else())}}de.validatePropertyDeps=Yi;function Bi(e,t=e.schema){let{gen:r,data:s,keyword:n,it:a}=e,i=r.name("valid");for(let o in t)(0,Mf.alwaysValidSchema)(a,t[o])||(r.if((0,Ct.propertyInData)(r,s,o,a.opts.ownProperties),()=>{let u=e.subschema({keyword:n,schemaProp:o},i);e.mergeValidEvaluated(u,i)},()=>r.var(i,!0)),e.ok(i))}de.validateSchemaDeps=Bi;de.default=Df});var Zi=y(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});var Wi=b(),Vf=q(),xf={message:"property name must be valid",params:({params:e})=>(0,Wi._)`{propertyName: ${e.propertyName}}`},Lf={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:xf,code(e){let{gen:t,schema:r,data:s,it:n}=e;if((0,Vf.alwaysValidSchema)(n,r))return;let a=t.name("valid");t.forIn("key",s,i=>{e.setParams({propertyName:i}),e.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},a),t.if((0,Wi.not)(a),()=>{e.error(!0),n.allErrors||t.break()})}),e.ok(a)}};mn.default=Lf});var hn=y(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});var mr=Z(),ne=b(),Uf=ge(),pr=q(),Ff={message:"must NOT have additional properties",params:({params:e})=>(0,ne._)`{additionalProperty: ${e.additionalProperty}}`},Kf={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Ff,code(e){let{gen:t,schema:r,parentSchema:s,data:n,errsCount:a,it:i}=e;if(!a)throw new Error("ajv implementation error");let{allErrors:o,opts:u}=i;if(i.props=!0,u.removeAdditional!=="all"&&(0,pr.alwaysValidSchema)(i,r))return;let d=(0,mr.allSchemaProperties)(s.properties),c=(0,mr.allSchemaProperties)(s.patternProperties);l(),e.ok((0,ne._)`${a} === ${Uf.default.errors}`);function l(){t.forIn("key",n,_=>{!d.length&&!c.length?f(_):t.if(h(_),()=>f(_))})}function h(_){let g;if(d.length>8){let N=(0,pr.schemaRefOrVal)(i,s.properties,"properties");g=(0,mr.isOwnProperty)(t,N,_)}else d.length?g=(0,ne.or)(...d.map(N=>(0,ne._)`${_} === ${N}`)):g=ne.nil;return c.length&&(g=(0,ne.or)(g,...c.map(N=>(0,ne._)`${(0,mr.usePattern)(e,N)}.test(${_})`))),(0,ne.not)(g)}function p(_){t.code((0,ne._)`delete ${n}[${_}]`)}function f(_){if(u.removeAdditional==="all"||u.removeAdditional&&r===!1){p(_);return}if(r===!1){e.setParams({additionalProperty:_}),e.error(),o||t.break();return}if(typeof r=="object"&&!(0,pr.alwaysValidSchema)(i,r)){let g=t.name("valid");u.removeAdditional==="failing"?(m(_,g,!1),t.if((0,ne.not)(g),()=>{e.reset(),p(_)})):(m(_,g),o||t.if((0,ne.not)(g),()=>t.break()))}}function m(_,g,N){let T={keyword:"additionalProperties",dataProp:_,dataPropType:pr.Type.Str};N===!1&&Object.assign(T,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(T,g)}}};pn.default=Kf});var eo=y(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});var Gf=wt(),Xi=Z(),yn=q(),Qi=hn(),Hf={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:s,data:n,it:a}=e;a.opts.removeAdditional==="all"&&s.additionalProperties===void 0&&Qi.default.code(new Gf.KeywordCxt(a,Qi.default,"additionalProperties"));let i=(0,Xi.allSchemaProperties)(r);for(let l of i)a.definedProperties.add(l);a.opts.unevaluated&&i.length&&a.props!==!0&&(a.props=yn.mergeEvaluated.props(t,(0,yn.toHash)(i),a.props));let o=i.filter(l=>!(0,yn.alwaysValidSchema)(a,r[l]));if(o.length===0)return;let u=t.name("valid");for(let l of o)d(l)?c(l):(t.if((0,Xi.propertyInData)(t,n,l,a.opts.ownProperties)),c(l),a.allErrors||t.else().var(u,!0),t.endIf()),e.it.definedProperties.add(l),e.ok(u);function d(l){return a.opts.useDefaults&&!a.compositeRule&&r[l].default!==void 0}function c(l){e.subschema({keyword:"properties",schemaProp:l,dataProp:l},u)}}};_n.default=Hf});var no=y(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});var to=Z(),hr=b(),ro=q(),so=q(),Yf={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:s,parentSchema:n,it:a}=e,{opts:i}=a,o=(0,to.allSchemaProperties)(r),u=o.filter(m=>(0,ro.alwaysValidSchema)(a,r[m]));if(o.length===0||u.length===o.length&&(!a.opts.unevaluated||a.props===!0))return;let d=i.strictSchema&&!i.allowMatchingProperties&&n.properties,c=t.name("valid");a.props!==!0&&!(a.props instanceof hr.Name)&&(a.props=(0,so.evaluatedPropsToName)(t,a.props));let{props:l}=a;h();function h(){for(let m of o)d&&p(m),a.allErrors?f(m):(t.var(c,!0),f(m),t.if(c))}function p(m){for(let _ in d)new RegExp(m).test(_)&&(0,ro.checkStrictMode)(a,`property ${_} matches pattern ${m} (use allowMatchingProperties)`)}function f(m){t.forIn("key",s,_=>{t.if((0,hr._)`${(0,to.usePattern)(e,m)}.test(${_})`,()=>{let g=u.includes(m);g||e.subschema({keyword:"patternProperties",schemaProp:m,dataProp:_,dataPropType:so.Type.Str},c),a.opts.unevaluated&&l!==!0?t.assign((0,hr._)`${l}[${_}]`,!0):!g&&!a.allErrors&&t.if((0,hr.not)(c),()=>t.break())})})}}};gn.default=Yf});var ao=y($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});var Bf=q(),Jf={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:s}=e;if((0,Bf.alwaysValidSchema)(s,r)){e.fail();return}let n=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};$n.default=Jf});var io=y(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});var Wf=Z(),Zf={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Wf.validateUnion,error:{message:"must match a schema in anyOf"}};vn.default=Zf});var oo=y(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});var yr=b(),Xf=q(),Qf={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,yr._)`{passingSchemas: ${e.passing}}`},em={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Qf,code(e){let{gen:t,schema:r,parentSchema:s,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&s.discriminator)return;let a=r,i=t.let("valid",!1),o=t.let("passing",null),u=t.name("_valid");e.setParams({passing:o}),t.block(d),e.result(i,()=>e.reset(),()=>e.error(!0));function d(){a.forEach((c,l)=>{let h;(0,Xf.alwaysValidSchema)(n,c)?t.var(u,!0):h=e.subschema({keyword:"oneOf",schemaProp:l,compositeRule:!0},u),l>0&&t.if((0,yr._)`${u} && ${i}`).assign(i,!1).assign(o,(0,yr._)`[${o}, ${l}]`).else(),t.if(u,()=>{t.assign(i,!0),t.assign(o,l),h&&e.mergeEvaluated(h,yr.Name)})})}}};wn.default=em});var uo=y(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});var tm=q(),rm={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let n=t.name("valid");r.forEach((a,i)=>{if((0,tm.alwaysValidSchema)(s,a))return;let o=e.subschema({keyword:"allOf",schemaProp:i},n);e.ok(n),e.mergeEvaluated(o)})}};bn.default=rm});var fo=y(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});var _r=b(),lo=q(),sm={message:({params:e})=>(0,_r.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,_r._)`{failingKeyword: ${e.ifClause}}`},nm={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:sm,code(e){let{gen:t,parentSchema:r,it:s}=e;r.then===void 0&&r.else===void 0&&(0,lo.checkStrictMode)(s,'"if" without "then" and "else" is ignored');let n=co(s,"then"),a=co(s,"else");if(!n&&!a)return;let i=t.let("valid",!0),o=t.name("_valid");if(u(),e.reset(),n&&a){let c=t.let("ifClause");e.setParams({ifClause:c}),t.if(o,d("then",c),d("else",c))}else n?t.if(o,d("then")):t.if((0,_r.not)(o),d("else"));e.pass(i,()=>e.error(!0));function u(){let c=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);e.mergeEvaluated(c)}function d(c,l){return()=>{let h=e.subschema({keyword:c},o);t.assign(i,o),e.mergeValidEvaluated(h,i),l?t.assign(l,(0,_r._)`${c}`):e.setParams({ifClause:c})}}}};function co(e,t){let r=e.schema[t];return r!==void 0&&!(0,lo.alwaysValidSchema)(e,r)}En.default=nm});var mo=y(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});var am=q(),im={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,am.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Sn.default=im});var Tn=y(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});var om=on(),um=Fi(),cm=un(),dm=Gi(),lm=Hi(),fm=Ji(),mm=Zi(),pm=hn(),hm=eo(),ym=no(),_m=ao(),gm=io(),$m=oo(),vm=uo(),wm=fo(),bm=mo();function Em(e=!1){let t=[_m.default,gm.default,$m.default,vm.default,wm.default,bm.default,mm.default,pm.default,fm.default,hm.default,ym.default];return e?t.push(um.default,dm.default):t.push(om.default,cm.default),t.push(lm.default),t}Pn.default=Em});var po=y(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});var D=b(),Sm={message:({schemaCode:e})=>(0,D.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,D._)`{format: ${e}}`},Pm={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Sm,code(e,t){let{gen:r,data:s,$data:n,schema:a,schemaCode:i,it:o}=e,{opts:u,errSchemaPath:d,schemaEnv:c,self:l}=o;if(!u.validateFormats)return;n?h():p();function h(){let f=r.scopeValue("formats",{ref:l.formats,code:u.code.formats}),m=r.const("fDef",(0,D._)`${f}[${i}]`),_=r.let("fType"),g=r.let("format");r.if((0,D._)`typeof ${m} == "object" && !(${m} instanceof RegExp)`,()=>r.assign(_,(0,D._)`${m}.type || "string"`).assign(g,(0,D._)`${m}.validate`),()=>r.assign(_,(0,D._)`"string"`).assign(g,m)),e.fail$data((0,D.or)(N(),T()));function N(){return u.strictSchema===!1?D.nil:(0,D._)`${i} && !${g}`}function T(){let A=c.$async?(0,D._)`(${m}.async ? await ${g}(${s}) : ${g}(${s}))`:(0,D._)`${g}(${s})`,w=(0,D._)`(typeof ${g} == "function" ? ${A} : ${g}.test(${s}))`;return(0,D._)`${g} && ${g} !== true && ${_} === ${t} && !${w}`}}function p(){let f=l.formats[a];if(!f){N();return}if(f===!0)return;let[m,_,g]=T(f);m===t&&e.pass(A());function N(){if(u.strictSchema===!1){l.logger.warn(w());return}throw new Error(w());function w(){return`unknown format "${a}" ignored in schema at path "${d}"`}}function T(w){let ie=w instanceof RegExp?(0,D.regexpCode)(w):u.code.formats?(0,D._)`${u.code.formats}${(0,D.getProperty)(a)}`:void 0,pe=r.scopeValue("formats",{key:a,ref:w,code:ie});return typeof w=="object"&&!(w instanceof RegExp)?[w.type||"string",w.validate,(0,D._)`${pe}.validate`]:["string",w,pe]}function A(){if(typeof f=="object"&&!(f instanceof RegExp)&&f.async){if(!c.$async)throw new Error("async format in sync schema");return(0,D._)`await ${g}(${s})`}return typeof _=="function"?(0,D._)`${g}(${s})`:(0,D._)`${g}.test(${s})`}}}};In.default=Pm});var On=y(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});var Tm=po(),Im=[Tm.default];Nn.default=Im});var ho=y(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});var Nm=Ri(),Om=Vi(),km=Tn(),qm=On(),Rm=["title","description","default"],jm=[Nm.default,Om.default,km.default(),qm.default,Rm];kn.default=jm});var _o=y(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.DiscrError=void 0;var yo;(function(e){e.Tag="tag",e.Mapping="mapping"})(yo||(gr.DiscrError=yo={}))});var jn=y(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});var Xe=b(),qn=_o(),go=rr(),Am=bt(),Cm=q(),Mm={message:({params:{discrError:e,tagName:t}})=>e===qn.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Xe._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},Dm={keyword:"discriminator",type:"object",schemaType:"object",error:Mm,code(e){let{gen:t,data:r,schema:s,parentSchema:n,it:a}=e,{oneOf:i}=n;if(!a.opts.discriminator)throw new Error("discriminator: requires discriminator option");let o=s.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");let u=t.let("valid",!1),d=t.const("tag",(0,Xe._)`${r}${(0,Xe.getProperty)(o)}`);t.if((0,Xe._)`typeof ${d} == "string"`,()=>c(),()=>e.error(!1,{discrError:qn.DiscrError.Tag,tag:d,tagName:o})),e.ok(u);function c(){let p=h();t.if(!1);for(let f in p)t.elseIf((0,Xe._)`${d} === ${f}`),t.assign(u,l(p[f]));t.else(),e.error(!1,{discrError:qn.DiscrError.Mapping,tag:d,tagName:o}),t.endIf()}function l(p){let f=t.name("valid"),m=e.subschema({keyword:"oneOf",schemaProp:p},f);return e.mergeEvaluated(m,Xe.Name),f}function h(){var p;let f={},m=g(n),_=!0;for(let A=0;A<i.length;A++){let w=i[A];if(w?.$ref&&!(0,Cm.schemaHasRulesButRef)(w,a.self.RULES)){let pe=w.$ref;if(w=go.resolveRef.call(a.self,a.schemaEnv.root,a.baseId,pe),w instanceof go.SchemaEnv&&(w=w.schema),w===void 0)throw new Am.default(a.opts.uriResolver,a.baseId,pe)}let ie=(p=w?.properties)===null||p===void 0?void 0:p[o];if(typeof ie!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);_=_&&(m||g(w)),N(ie,A)}if(!_)throw new Error(`discriminator: "${o}" must be required`);return f;function g({required:A}){return Array.isArray(A)&&A.includes(o)}function N(A,w){if(A.const)T(A.const,w);else if(A.enum)for(let ie of A.enum)T(ie,w);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function T(A,w){if(typeof A!="string"||A in f)throw new Error(`discriminator: "${o}" values must be unique strings`);f[A]=w}}}};Rn.default=Dm});var $o=y((py,zm)=>{zm.exports={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}}});var bo=y((z,wo)=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.CodeGen=z.Name=z.nil=z.stringify=z.str=z._=z.KeywordCxt=void 0;var Vm=We(),xm=ho(),Lm=jn(),vo=$o(),Um=["/properties"],$r="http://json-schema.org/draft-04/schema",vr=class extends Vm.default{constructor(t={}){super({...t,schemaId:"id"})}_addVocabularies(){super._addVocabularies(),xm.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(Lm.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(vo,Um):vo;this.addMetaSchema(t,$r,!1),this.refs["http://json-schema.org/schema"]=$r}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema($r)?$r:void 0)}};wo.exports=z=vr;Object.defineProperty(z,"__esModule",{value:!0});z.default=vr;var Fm=We();Object.defineProperty(z,"KeywordCxt",{enumerable:!0,get:function(){return Fm.KeywordCxt}});var Qe=We();Object.defineProperty(z,"_",{enumerable:!0,get:function(){return Qe._}});Object.defineProperty(z,"str",{enumerable:!0,get:function(){return Qe.str}});Object.defineProperty(z,"stringify",{enumerable:!0,get:function(){return Qe.stringify}});Object.defineProperty(z,"nil",{enumerable:!0,get:function(){return Qe.nil}});Object.defineProperty(z,"Name",{enumerable:!0,get:function(){return Qe.Name}});Object.defineProperty(z,"CodeGen",{enumerable:!0,get:function(){return Qe.CodeGen}})});var ko=y(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.formatNames=fe.fastFormats=fe.fullFormats=void 0;function le(e,t){return{validate:e,compare:t}}fe.fullFormats={date:le(To,Dn),time:le(Cn(!0),zn),"date-time":le(Eo(!0),No),"iso-time":le(Cn(),Io),"iso-date-time":le(Eo(),Oo),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:Jm,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:rp,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:Wm,int32:{type:"number",validate:Qm},int64:{type:"number",validate:ep},float:{type:"number",validate:Po},double:{type:"number",validate:Po},password:!0,binary:!0};fe.fastFormats={...fe.fullFormats,date:le(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Dn),time:le(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,zn),"date-time":le(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,No),"iso-time":le(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Io),"iso-date-time":le(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Oo),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};fe.formatNames=Object.keys(fe.fullFormats);function Km(e){return e%4===0&&(e%100!==0||e%400===0)}var Gm=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Hm=[0,31,28,31,30,31,30,31,31,30,31,30,31];function To(e){let t=Gm.exec(e);if(!t)return!1;let r=+t[1],s=+t[2],n=+t[3];return s>=1&&s<=12&&n>=1&&n<=(s===2&&Km(r)?29:Hm[s])}function Dn(e,t){if(e&&t)return e>t?1:e<t?-1:0}var An=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Cn(e){return function(r){let s=An.exec(r);if(!s)return!1;let n=+s[1],a=+s[2],i=+s[3],o=s[4],u=s[5]==="-"?-1:1,d=+(s[6]||0),c=+(s[7]||0);if(d>23||c>59||e&&!o)return!1;if(n<=23&&a<=59&&i<60)return!0;let l=a-c*u,h=n-d*u-(l<0?1:0);return(h===23||h===-1)&&(l===59||l===-1)&&i<61}}function zn(e,t){if(!(e&&t))return;let r=new Date("2020-01-01T"+e).valueOf(),s=new Date("2020-01-01T"+t).valueOf();if(r&&s)return r-s}function Io(e,t){if(!(e&&t))return;let r=An.exec(e),s=An.exec(t);if(r&&s)return e=r[1]+r[2]+r[3],t=s[1]+s[2]+s[3],e>t?1:e<t?-1:0}var Mn=/t|\s/i;function Eo(e){let t=Cn(e);return function(s){let n=s.split(Mn);return n.length===2&&To(n[0])&&t(n[1])}}function No(e,t){if(!(e&&t))return;let r=new Date(e).valueOf(),s=new Date(t).valueOf();if(r&&s)return r-s}function Oo(e,t){if(!(e&&t))return;let[r,s]=e.split(Mn),[n,a]=t.split(Mn),i=Dn(r,n);if(i!==void 0)return i||zn(s,a)}var Ym=/\/|:/,Bm=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function Jm(e){return Ym.test(e)&&Bm.test(e)}var So=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function Wm(e){return So.lastIndex=0,So.test(e)}var Zm=-(2**31),Xm=2**31-1;function Qm(e){return Number.isInteger(e)&&e<=Xm&&e>=Zm}function ep(e){return Number.isInteger(e)}function Po(){return!0}var tp=/[^\\]\\Z/;function rp(e){if(tp.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var qo=y(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});var sp={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Vn.default=sp});var Ro=y(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});var np=qo(),ap=Os(),ip=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",np.default,ap.default];xn.default=ip});var jo=y(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});var wr=b(),Oe=wr.operators,br={maximum:{okStr:"<=",ok:Oe.LTE,fail:Oe.GT},minimum:{okStr:">=",ok:Oe.GTE,fail:Oe.LT},exclusiveMaximum:{okStr:"<",ok:Oe.LT,fail:Oe.GTE},exclusiveMinimum:{okStr:">",ok:Oe.GT,fail:Oe.LTE}},op={message:({keyword:e,schemaCode:t})=>(0,wr.str)`must be ${br[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,wr._)`{comparison: ${br[e].okStr}, limit: ${t}}`},up={keyword:Object.keys(br),type:"number",schemaType:"number",$data:!0,error:op,code(e){let{keyword:t,data:r,schemaCode:s}=e;e.fail$data((0,wr._)`${r} ${br[t].fail} ${s} || isNaN(${r})`)}};Ln.default=up});var Ao=y(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});var cp=jo(),dp=Ds(),lp=xs(),fp=Us(),mp=Ks(),pp=Hs(),hp=Bs(),yp=Xs(),_p=tn(),gp=sn(),$p=[cp.default,dp.default,lp.default,fp.default,mp.default,pp.default,hp.default,yp.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},_p.default,gp.default];Un.default=$p});var Co=y(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.contentVocabulary=et.metadataVocabulary=void 0;et.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];et.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Do=y(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});var vp=Ro(),wp=Ao(),bp=Tn(),Ep=On(),Mo=Co(),Sp=[vp.default,wp.default,(0,bp.default)(),Ep.default,Mo.metadataVocabulary,Mo.contentVocabulary];Fn.default=Sp});var zo=y((by,Pp)=>{Pp.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var xo=y((M,Kn)=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.MissingRefError=M.ValidationError=M.CodeGen=M.Name=M.nil=M.stringify=M.str=M._=M.KeywordCxt=M.Ajv=void 0;var Tp=We(),Ip=Do(),Np=jn(),Vo=zo(),Op=["/properties"],Er="http://json-schema.org/draft-07/schema",tt=class extends Tp.default{_addVocabularies(){super._addVocabularies(),Ip.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(Np.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(Vo,Op):Vo;this.addMetaSchema(t,Er,!1),this.refs["http://json-schema.org/schema"]=Er}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Er)?Er:void 0)}};M.Ajv=tt;Kn.exports=M=tt;Kn.exports.Ajv=tt;Object.defineProperty(M,"__esModule",{value:!0});M.default=tt;var kp=wt();Object.defineProperty(M,"KeywordCxt",{enumerable:!0,get:function(){return kp.KeywordCxt}});var rt=b();Object.defineProperty(M,"_",{enumerable:!0,get:function(){return rt._}});Object.defineProperty(M,"str",{enumerable:!0,get:function(){return rt.str}});Object.defineProperty(M,"stringify",{enumerable:!0,get:function(){return rt.stringify}});Object.defineProperty(M,"nil",{enumerable:!0,get:function(){return rt.nil}});Object.defineProperty(M,"Name",{enumerable:!0,get:function(){return rt.Name}});Object.defineProperty(M,"CodeGen",{enumerable:!0,get:function(){return rt.CodeGen}});var qp=er();Object.defineProperty(M,"ValidationError",{enumerable:!0,get:function(){return qp.default}});var Rp=bt();Object.defineProperty(M,"MissingRefError",{enumerable:!0,get:function(){return Rp.default}})});var Lo=y(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.formatLimitDefinition=void 0;var jp=xo(),ae=b(),ke=ae.operators,Sr={formatMaximum:{okStr:"<=",ok:ke.LTE,fail:ke.GT},formatMinimum:{okStr:">=",ok:ke.GTE,fail:ke.LT},formatExclusiveMaximum:{okStr:"<",ok:ke.LT,fail:ke.GTE},formatExclusiveMinimum:{okStr:">",ok:ke.GT,fail:ke.LTE}},Ap={message:({keyword:e,schemaCode:t})=>(0,ae.str)`should be ${Sr[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,ae._)`{comparison: ${Sr[e].okStr}, limit: ${t}}`};st.formatLimitDefinition={keyword:Object.keys(Sr),type:"string",schemaType:"string",$data:!0,error:Ap,code(e){let{gen:t,data:r,schemaCode:s,keyword:n,it:a}=e,{opts:i,self:o}=a;if(!i.validateFormats)return;let u=new jp.KeywordCxt(a,o.RULES.all.format.definition,"format");u.$data?d():c();function d(){let h=t.scopeValue("formats",{ref:o.formats,code:i.code.formats}),p=t.const("fmt",(0,ae._)`${h}[${u.schemaCode}]`);e.fail$data((0,ae.or)((0,ae._)`typeof ${p} != "object"`,(0,ae._)`${p} instanceof RegExp`,(0,ae._)`typeof ${p}.compare != "function"`,l(p)))}function c(){let h=u.schema,p=o.formats[h];if(!p||p===!0)return;if(typeof p!="object"||p instanceof RegExp||typeof p.compare!="function")throw new Error(`"${n}": format "${h}" does not define "compare" function`);let f=t.scopeValue("formats",{key:h,ref:p,code:i.code.formats?(0,ae._)`${i.code.formats}${(0,ae.getProperty)(h)}`:void 0});e.fail$data(l(f))}function l(h){return(0,ae._)`${h}.compare(${r}, ${s}) ${Sr[n].fail} 0`}},dependencies:["format"]};var Cp=e=>(e.addKeyword(st.formatLimitDefinition),e);st.default=Cp});var Go=y((Mt,Ko)=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});var nt=ko(),Mp=Lo(),Gn=b(),Uo=new Gn.Name("fullFormats"),Dp=new Gn.Name("fastFormats"),Hn=(e,t={keywords:!0})=>{if(Array.isArray(t))return Fo(e,t,nt.fullFormats,Uo),e;let[r,s]=t.mode==="fast"?[nt.fastFormats,Dp]:[nt.fullFormats,Uo],n=t.formats||nt.formatNames;return Fo(e,n,r,s),t.keywords&&(0,Mp.default)(e),e};Hn.get=(e,t="full")=>{let s=(t==="fast"?nt.fastFormats:nt.fullFormats)[e];if(!s)throw new Error(`Unknown format "${e}"`);return s};function Fo(e,t,r,s){var n,a;(n=(a=e.opts.code).formats)!==null&&n!==void 0||(a.formats=(0,Gn._)`require("ajv-formats/dist/formats").${s}`);for(let i of t)e.addFormat(i,r[i])}Ko.exports=Mt=Hn;Object.defineProperty(Mt,"__esModule",{value:!0});Mt.default=Hn});var me=we(ot(),1),at=we(kr(),1);var Lt=we(ot(),1);var ea=we(ot(),1);var Xn="core/abilities",Qn=/^[a-z0-9-]+(?:\/[a-z0-9-]+){1,3}$/,qr=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,Dt="REGISTER_ABILITY",zt="UNREGISTER_ABILITY",Vt="REGISTER_ABILITY_CATEGORY",xt="UNREGISTER_ABILITY_CATEGORY";var nu=["name","label","description","category","input_schema","output_schema","meta","callback","permissionCallback"],au=["slug","label","description","meta"];function iu(e){return Object.keys(e).filter(t=>nu.includes(t)&&e[t]!==void 0).reduce((t,r)=>({...t,[r]:e[r]}),{})}function ou(e){return Object.keys(e).filter(t=>au.includes(t)&&e[t]!==void 0).reduce((t,r)=>({...t,[r]:e[r]}),{})}var uu={};function cu(e=uu,t){switch(t.type){case Dt:return t.ability?{...e,[t.ability.name]:iu(t.ability)}:e;case zt:{if(!e[t.name])return e;let{[t.name]:r,...s}=e;return s}default:return e}}var du={};function lu(e=du,t){switch(t.type){case Vt:return t.category?{...e,[t.category.slug]:ou(t.category)}:e;case xt:{if(!e[t.slug])return e;let{[t.slug]:r,...s}=e;return s}default:return e}}var ta=(0,ea.combineReducers)({abilitiesByName:cu,categoriesBySlug:lu});var Rr={};Jn(Rr,{registerAbility:()=>fu,registerAbilityCategory:()=>pu,unregisterAbility:()=>mu,unregisterAbilityCategory:()=>hu});var he=we(kr(),1);function ra(e,t){let r={};if(e)for(let s of t)e[s]!==void 0&&(r[s]=e[s]);return r}function fu(e){return({select:t,dispatch:r})=>{if(!e.name)throw new Error("Ability name is required");if(!Qn.test(e.name))throw new Error('Ability name must be a string containing a namespace prefix with 2-4 segments, e.g. "my-plugin/my-ability" or "core/posts/find". It can only contain lowercase alphanumeric characters, dashes and the forward slash.');if(!e.label)throw new Error((0,he.sprintf)('Ability "%s" must have a label',e.name));if(!e.description)throw new Error((0,he.sprintf)('Ability "%s" must have a description',e.name));if(!e.category)throw new Error((0,he.sprintf)('Ability "%s" must have a category',e.name));if(!qr.test(e.category))throw new Error((0,he.sprintf)('Ability "%1$s" has an invalid category. Category must be lowercase alphanumeric with dashes only. Got: "%2$s"',e.name,e.category));if(!t.getAbilityCategories().find(u=>u.slug===e.category))throw new Error((0,he.sprintf)('Ability "%1$s" references non-existent category "%2$s". Please register the category first.',e.name,e.category));if(e.callback&&typeof e.callback!="function")throw new Error((0,he.sprintf)('Ability "%s" has an invalid callback. Callback must be a function',e.name));if(t.getAbility(e.name))throw new Error((0,he.sprintf)('Ability "%s" is already registered',e.name));let i=ra(e.meta?.annotations,["readonly","destructive","idempotent","serverRegistered","clientRegistered"]);i.serverRegistered||(i.clientRegistered=!0);let o={...e.meta||{},annotations:i};r({type:Dt,ability:{...e,meta:o}})}}function mu(e){return{type:zt,name:e}}function pu(e,t){return({select:r,dispatch:s})=>{if(!e)throw new Error("Category slug is required");if(!qr.test(e))throw new Error("Category slug must contain only lowercase alphanumeric characters and dashes.");if(r.getAbilityCategory(e))throw new Error((0,he.sprintf)('Category "%s" is already registered.',e));if(!t.label||typeof t.label!="string")throw new Error("The category properties must contain a `label` string.");if(!t.description||typeof t.description!="string")throw new Error("The category properties must contain a `description` string.");if(t.meta!==void 0&&(typeof t.meta!="object"||Array.isArray(t.meta)))throw new Error("The category properties should provide a valid `meta` object.");let a=ra(t.meta?.annotations,["serverRegistered","clientRegistered"]);a.serverRegistered||(a.clientRegistered=!0);let i={...t.meta||{},annotations:a},o={slug:e,label:t.label,description:t.description,meta:i};s({type:Vt,category:o})}}function hu(e){return{type:xt,slug:e}}var Ar={};Jn(Ar,{getAbilities:()=>yu,getAbility:()=>_u,getAbilityCategories:()=>gu,getAbilityCategory:()=>$u});var jr=we(ot(),1),yu=(0,jr.createSelector)((e,{category:t}={})=>{let r=Object.values(e.abilitiesByName);return t?r.filter(s=>s.category===t):r},(e,{category:t}={})=>[e.abilitiesByName,t]);function _u(e,t){return e.abilitiesByName[t]}var gu=(0,jr.createSelector)(e=>Object.values(e.categoriesBySlug),e=>[e.categoriesBySlug]);function $u(e,t){return e.categoriesBySlug[t]}var ee=(0,Lt.createReduxStore)(Xn,{reducer:ta,actions:Rr,selectors:Ar});(0,Lt.register)(ee);var Yo=we(bo(),1),Bo=we(Go(),1),Jo=new Yo.default({coerceTypes:!1,useDefaults:!0,removeAdditional:!1,allErrors:!0,verbose:!0,allowUnionTypes:!0});(0,Bo.default)(Jo,["date-time","email","hostname","ipv4","ipv6","uuid"]);function Ho(e,t){let r=e.instancePath?e.instancePath.replace(/\//g,"][").replace(/^\]\[/,"[")+"]":"",s=t+r;switch(e.keyword){case"type":return`${s} is not of type ${e.params.type}.`;case"required":return`${e.params.missingProperty} is a required property of ${s}.`;case"additionalProperties":return`${e.params.additionalProperty} is not a valid property of Object.`;case"enum":let n=e.params.allowedValues.map(o=>typeof o=="string"?o:JSON.stringify(o)).join(", ");return e.params.allowedValues.length===1?`${s} is not ${n}.`:`${s} is not one of ${n}.`;case"pattern":return`${s} does not match pattern ${e.params.pattern}.`;case"format":let a=e.params.format;return{email:"Invalid email address.","date-time":"Invalid date.",uuid:`${s} is not a valid UUID.`,ipv4:`${s} is not a valid IP address.`,ipv6:`${s} is not a valid IP address.`,hostname:`${s} is not a valid hostname.`}[a]||`Invalid ${a}.`;case"minimum":case"exclusiveMinimum":return e.keyword==="exclusiveMinimum"?`${s} must be greater than ${e.params.limit}`:`${s} must be greater than or equal to ${e.params.limit}`;case"maximum":case"exclusiveMaximum":return e.keyword==="exclusiveMaximum"?`${s} must be less than ${e.params.limit}`:`${s} must be less than or equal to ${e.params.limit}`;case"multipleOf":return`${s} must be a multiple of ${e.params.multipleOf}.`;case"anyOf":case"oneOf":return`${s} is invalid (failed ${e.keyword} validation).`;case"minLength":return`${s} must be at least ${e.params.limit} character${e.params.limit===1?"":"s"} long.`;case"maxLength":return`${s} must be at most ${e.params.limit} character${e.params.limit===1?"":"s"} long.`;case"minItems":return`${s} must contain at least ${e.params.limit} item${e.params.limit===1?"":"s"}.`;case"maxItems":return`${s} must contain at most ${e.params.limit} item${e.params.limit===1?"":"s"}.`;case"uniqueItems":return`${s} has duplicate items.`;case"minProperties":return`${s} must contain at least ${e.params.limit} propert${e.params.limit===1?"y":"ies"}.`;case"maxProperties":return`${s} must contain at most ${e.params.limit} propert${e.params.limit===1?"y":"ies"}.`;default:return e.message||`${s} is invalid (failed ${e.keyword} validation).`}}function Pr(e,t,r=""){if(!t||typeof t!="object")return console.warn(`Schema must be an object. Received ${typeof t}.`),!0;if(!t.type&&!t.anyOf&&!t.oneOf)return console.warn(`The "type" schema keyword for ${r||"value"} is required.`),!0;try{let{default:s,...n}=t,a=Jo.compile(n);if(a(e===void 0?s:e))return!0;if(a.errors&&a.errors.length>0){let o=a.errors.find(u=>u.keyword==="anyOf"||u.keyword==="oneOf");return Ho(o||a.errors[0],r)}return`${r} is invalid.`}catch(s){return console.error("Schema compilation error:",s),"Invalid schema provided for validation."}}function zp(e={}){return(0,me.select)(ee).getAbilities(e)}function Wo(e){return(0,me.select)(ee).getAbility(e)}function Vp(){return(0,me.select)(ee).getAbilityCategories()}function xp(e){return(0,me.select)(ee).getAbilityCategory(e)}function Lp(e){(0,me.dispatch)(ee).registerAbility(e)}function Up(e){(0,me.dispatch)(ee).unregisterAbility(e)}function Fp(e,t){(0,me.dispatch)(ee).registerAbilityCategory(e,t)}function Kp(e){(0,me.dispatch)(ee).unregisterAbilityCategory(e)}async function Gp(e,t){let r=Wo(e);if(!r)throw new Error((0,at.sprintf)("Ability not found: %s",e));if(!r.callback)throw new Error((0,at.sprintf)('Ability "%s" is missing callback. Please ensure the ability is properly registered.',r.name));if(r.permissionCallback&&!await r.permissionCallback(t)){let a=new Error((0,at.sprintf)("Permission denied for ability: %s",r.name));throw a.code="ability_permission_denied",a}if(r.input_schema){let n=Pr(t,r.input_schema,"input");if(n!==!0){let a=new Error((0,at.sprintf)('Ability "%1$s" has invalid input. Reason: %2$s',r.name,n));throw a.code="ability_invalid_input",a}}let s;try{s=await r.callback(t)}catch(n){throw console.error(`Error executing ability ${r.name}:`,n),n}if(r.output_schema){let n=Pr(s,r.output_schema,"output");if(n!==!0){let a=new Error((0,at.sprintf)('Ability "%1$s" has invalid output. Reason: %2$s',r.name,n));throw a.code="ability_invalid_output",a}}return s}export{Gp as executeAbility,zp as getAbilities,Wo as getAbility,Vp as getAbilityCategories,xp as getAbilityCategory,Lp as registerAbility,Fp as registerAbilityCategory,ee as store,Up as unregisterAbility,Kp as unregisterAbilityCategory,Pr as validateValueFromSchema};
                                                     dist/script-modules/abilities/index.js                                                              0000644                 00001063152 15212564030 0014101 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));

// package-external:@wordpress/data
var require_data = __commonJS({
  "package-external:@wordpress/data"(exports, module) {
    module.exports = window.wp.data;
  }
});

// package-external:@wordpress/i18n
var require_i18n = __commonJS({
  "package-external:@wordpress/i18n"(exports, module) {
    module.exports = window.wp.i18n;
  }
});

// node_modules/ajv/dist/compile/codegen/code.js
var require_code = __commonJS({
  "node_modules/ajv/dist/compile/codegen/code.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;
    var _CodeOrName = class {
    };
    exports._CodeOrName = _CodeOrName;
    exports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
    var Name = class extends _CodeOrName {
      constructor(s) {
        super();
        if (!exports.IDENTIFIER.test(s))
          throw new Error("CodeGen: name must be a valid identifier");
        this.str = s;
      }
      toString() {
        return this.str;
      }
      emptyStr() {
        return false;
      }
      get names() {
        return { [this.str]: 1 };
      }
    };
    exports.Name = Name;
    var _Code = class extends _CodeOrName {
      constructor(code) {
        super();
        this._items = typeof code === "string" ? [code] : code;
      }
      toString() {
        return this.str;
      }
      emptyStr() {
        if (this._items.length > 1)
          return false;
        const item = this._items[0];
        return item === "" || item === '""';
      }
      get str() {
        var _a;
        return (_a = this._str) !== null && _a !== void 0 ? _a : this._str = this._items.reduce((s, c) => `${s}${c}`, "");
      }
      get names() {
        var _a;
        return (_a = this._names) !== null && _a !== void 0 ? _a : this._names = this._items.reduce((names, c) => {
          if (c instanceof Name)
            names[c.str] = (names[c.str] || 0) + 1;
          return names;
        }, {});
      }
    };
    exports._Code = _Code;
    exports.nil = new _Code("");
    function _(strs, ...args) {
      const code = [strs[0]];
      let i = 0;
      while (i < args.length) {
        addCodeArg(code, args[i]);
        code.push(strs[++i]);
      }
      return new _Code(code);
    }
    exports._ = _;
    var plus = new _Code("+");
    function str(strs, ...args) {
      const expr = [safeStringify(strs[0])];
      let i = 0;
      while (i < args.length) {
        expr.push(plus);
        addCodeArg(expr, args[i]);
        expr.push(plus, safeStringify(strs[++i]));
      }
      optimize(expr);
      return new _Code(expr);
    }
    exports.str = str;
    function addCodeArg(code, arg) {
      if (arg instanceof _Code)
        code.push(...arg._items);
      else if (arg instanceof Name)
        code.push(arg);
      else
        code.push(interpolate(arg));
    }
    exports.addCodeArg = addCodeArg;
    function optimize(expr) {
      let i = 1;
      while (i < expr.length - 1) {
        if (expr[i] === plus) {
          const res = mergeExprItems(expr[i - 1], expr[i + 1]);
          if (res !== void 0) {
            expr.splice(i - 1, 3, res);
            continue;
          }
          expr[i++] = "+";
        }
        i++;
      }
    }
    function mergeExprItems(a, b) {
      if (b === '""')
        return a;
      if (a === '""')
        return b;
      if (typeof a == "string") {
        if (b instanceof Name || a[a.length - 1] !== '"')
          return;
        if (typeof b != "string")
          return `${a.slice(0, -1)}${b}"`;
        if (b[0] === '"')
          return a.slice(0, -1) + b.slice(1);
        return;
      }
      if (typeof b == "string" && b[0] === '"' && !(a instanceof Name))
        return `"${a}${b.slice(1)}`;
      return;
    }
    function strConcat(c1, c2) {
      return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str`${c1}${c2}`;
    }
    exports.strConcat = strConcat;
    function interpolate(x) {
      return typeof x == "number" || typeof x == "boolean" || x === null ? x : safeStringify(Array.isArray(x) ? x.join(",") : x);
    }
    function stringify(x) {
      return new _Code(safeStringify(x));
    }
    exports.stringify = stringify;
    function safeStringify(x) {
      return JSON.stringify(x).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
    }
    exports.safeStringify = safeStringify;
    function getProperty(key) {
      return typeof key == "string" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _`[${key}]`;
    }
    exports.getProperty = getProperty;
    function getEsmExportName(key) {
      if (typeof key == "string" && exports.IDENTIFIER.test(key)) {
        return new _Code(`${key}`);
      }
      throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);
    }
    exports.getEsmExportName = getEsmExportName;
    function regexpCode(rx) {
      return new _Code(rx.toString());
    }
    exports.regexpCode = regexpCode;
  }
});

// node_modules/ajv/dist/compile/codegen/scope.js
var require_scope = __commonJS({
  "node_modules/ajv/dist/compile/codegen/scope.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0;
    var code_1 = require_code();
    var ValueError = class extends Error {
      constructor(name) {
        super(`CodeGen: "code" for ${name} not defined`);
        this.value = name.value;
      }
    };
    var UsedValueState;
    (function(UsedValueState2) {
      UsedValueState2[UsedValueState2["Started"] = 0] = "Started";
      UsedValueState2[UsedValueState2["Completed"] = 1] = "Completed";
    })(UsedValueState || (exports.UsedValueState = UsedValueState = {}));
    exports.varKinds = {
      const: new code_1.Name("const"),
      let: new code_1.Name("let"),
      var: new code_1.Name("var")
    };
    var Scope = class {
      constructor({ prefixes, parent } = {}) {
        this._names = {};
        this._prefixes = prefixes;
        this._parent = parent;
      }
      toName(nameOrPrefix) {
        return nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix);
      }
      name(prefix) {
        return new code_1.Name(this._newName(prefix));
      }
      _newName(prefix) {
        const ng = this._names[prefix] || this._nameGroup(prefix);
        return `${prefix}${ng.index++}`;
      }
      _nameGroup(prefix) {
        var _a, _b;
        if (((_b = (_a = this._parent) === null || _a === void 0 ? void 0 : _a._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) {
          throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`);
        }
        return this._names[prefix] = { prefix, index: 0 };
      }
    };
    exports.Scope = Scope;
    var ValueScopeName = class extends code_1.Name {
      constructor(prefix, nameStr) {
        super(nameStr);
        this.prefix = prefix;
      }
      setValue(value, { property, itemIndex }) {
        this.value = value;
        this.scopePath = (0, code_1._)`.${new code_1.Name(property)}[${itemIndex}]`;
      }
    };
    exports.ValueScopeName = ValueScopeName;
    var line = (0, code_1._)`\n`;
    var ValueScope = class extends Scope {
      constructor(opts) {
        super(opts);
        this._values = {};
        this._scope = opts.scope;
        this.opts = { ...opts, _n: opts.lines ? line : code_1.nil };
      }
      get() {
        return this._scope;
      }
      name(prefix) {
        return new ValueScopeName(prefix, this._newName(prefix));
      }
      value(nameOrPrefix, value) {
        var _a;
        if (value.ref === void 0)
          throw new Error("CodeGen: ref must be passed in value");
        const name = this.toName(nameOrPrefix);
        const { prefix } = name;
        const valueKey = (_a = value.key) !== null && _a !== void 0 ? _a : value.ref;
        let vs = this._values[prefix];
        if (vs) {
          const _name = vs.get(valueKey);
          if (_name)
            return _name;
        } else {
          vs = this._values[prefix] = /* @__PURE__ */ new Map();
        }
        vs.set(valueKey, name);
        const s = this._scope[prefix] || (this._scope[prefix] = []);
        const itemIndex = s.length;
        s[itemIndex] = value.ref;
        name.setValue(value, { property: prefix, itemIndex });
        return name;
      }
      getValue(prefix, keyOrRef) {
        const vs = this._values[prefix];
        if (!vs)
          return;
        return vs.get(keyOrRef);
      }
      scopeRefs(scopeName, values = this._values) {
        return this._reduceValues(values, (name) => {
          if (name.scopePath === void 0)
            throw new Error(`CodeGen: name "${name}" has no value`);
          return (0, code_1._)`${scopeName}${name.scopePath}`;
        });
      }
      scopeCode(values = this._values, usedValues, getCode) {
        return this._reduceValues(values, (name) => {
          if (name.value === void 0)
            throw new Error(`CodeGen: name "${name}" has no value`);
          return name.value.code;
        }, usedValues, getCode);
      }
      _reduceValues(values, valueCode, usedValues = {}, getCode) {
        let code = code_1.nil;
        for (const prefix in values) {
          const vs = values[prefix];
          if (!vs)
            continue;
          const nameSet = usedValues[prefix] = usedValues[prefix] || /* @__PURE__ */ new Map();
          vs.forEach((name) => {
            if (nameSet.has(name))
              return;
            nameSet.set(name, UsedValueState.Started);
            let c = valueCode(name);
            if (c) {
              const def = this.opts.es5 ? exports.varKinds.var : exports.varKinds.const;
              code = (0, code_1._)`${code}${def} ${name} = ${c};${this.opts._n}`;
            } else if (c = getCode === null || getCode === void 0 ? void 0 : getCode(name)) {
              code = (0, code_1._)`${code}${c}${this.opts._n}`;
            } else {
              throw new ValueError(name);
            }
            nameSet.set(name, UsedValueState.Completed);
          });
        }
        return code;
      }
    };
    exports.ValueScope = ValueScope;
  }
});

// node_modules/ajv/dist/compile/codegen/index.js
var require_codegen = __commonJS({
  "node_modules/ajv/dist/compile/codegen/index.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0;
    var code_1 = require_code();
    var scope_1 = require_scope();
    var code_2 = require_code();
    Object.defineProperty(exports, "_", { enumerable: true, get: function() {
      return code_2._;
    } });
    Object.defineProperty(exports, "str", { enumerable: true, get: function() {
      return code_2.str;
    } });
    Object.defineProperty(exports, "strConcat", { enumerable: true, get: function() {
      return code_2.strConcat;
    } });
    Object.defineProperty(exports, "nil", { enumerable: true, get: function() {
      return code_2.nil;
    } });
    Object.defineProperty(exports, "getProperty", { enumerable: true, get: function() {
      return code_2.getProperty;
    } });
    Object.defineProperty(exports, "stringify", { enumerable: true, get: function() {
      return code_2.stringify;
    } });
    Object.defineProperty(exports, "regexpCode", { enumerable: true, get: function() {
      return code_2.regexpCode;
    } });
    Object.defineProperty(exports, "Name", { enumerable: true, get: function() {
      return code_2.Name;
    } });
    var scope_2 = require_scope();
    Object.defineProperty(exports, "Scope", { enumerable: true, get: function() {
      return scope_2.Scope;
    } });
    Object.defineProperty(exports, "ValueScope", { enumerable: true, get: function() {
      return scope_2.ValueScope;
    } });
    Object.defineProperty(exports, "ValueScopeName", { enumerable: true, get: function() {
      return scope_2.ValueScopeName;
    } });
    Object.defineProperty(exports, "varKinds", { enumerable: true, get: function() {
      return scope_2.varKinds;
    } });
    exports.operators = {
      GT: new code_1._Code(">"),
      GTE: new code_1._Code(">="),
      LT: new code_1._Code("<"),
      LTE: new code_1._Code("<="),
      EQ: new code_1._Code("==="),
      NEQ: new code_1._Code("!=="),
      NOT: new code_1._Code("!"),
      OR: new code_1._Code("||"),
      AND: new code_1._Code("&&"),
      ADD: new code_1._Code("+")
    };
    var Node = class {
      optimizeNodes() {
        return this;
      }
      optimizeNames(_names, _constants) {
        return this;
      }
    };
    var Def = class extends Node {
      constructor(varKind, name, rhs) {
        super();
        this.varKind = varKind;
        this.name = name;
        this.rhs = rhs;
      }
      render({ es5, _n }) {
        const varKind = es5 ? scope_1.varKinds.var : this.varKind;
        const rhs = this.rhs === void 0 ? "" : ` = ${this.rhs}`;
        return `${varKind} ${this.name}${rhs};` + _n;
      }
      optimizeNames(names, constants) {
        if (!names[this.name.str])
          return;
        if (this.rhs)
          this.rhs = optimizeExpr(this.rhs, names, constants);
        return this;
      }
      get names() {
        return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {};
      }
    };
    var Assign = class extends Node {
      constructor(lhs, rhs, sideEffects) {
        super();
        this.lhs = lhs;
        this.rhs = rhs;
        this.sideEffects = sideEffects;
      }
      render({ _n }) {
        return `${this.lhs} = ${this.rhs};` + _n;
      }
      optimizeNames(names, constants) {
        if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects)
          return;
        this.rhs = optimizeExpr(this.rhs, names, constants);
        return this;
      }
      get names() {
        const names = this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names };
        return addExprNames(names, this.rhs);
      }
    };
    var AssignOp = class extends Assign {
      constructor(lhs, op, rhs, sideEffects) {
        super(lhs, rhs, sideEffects);
        this.op = op;
      }
      render({ _n }) {
        return `${this.lhs} ${this.op}= ${this.rhs};` + _n;
      }
    };
    var Label = class extends Node {
      constructor(label) {
        super();
        this.label = label;
        this.names = {};
      }
      render({ _n }) {
        return `${this.label}:` + _n;
      }
    };
    var Break = class extends Node {
      constructor(label) {
        super();
        this.label = label;
        this.names = {};
      }
      render({ _n }) {
        const label = this.label ? ` ${this.label}` : "";
        return `break${label};` + _n;
      }
    };
    var Throw = class extends Node {
      constructor(error) {
        super();
        this.error = error;
      }
      render({ _n }) {
        return `throw ${this.error};` + _n;
      }
      get names() {
        return this.error.names;
      }
    };
    var AnyCode = class extends Node {
      constructor(code) {
        super();
        this.code = code;
      }
      render({ _n }) {
        return `${this.code};` + _n;
      }
      optimizeNodes() {
        return `${this.code}` ? this : void 0;
      }
      optimizeNames(names, constants) {
        this.code = optimizeExpr(this.code, names, constants);
        return this;
      }
      get names() {
        return this.code instanceof code_1._CodeOrName ? this.code.names : {};
      }
    };
    var ParentNode = class extends Node {
      constructor(nodes = []) {
        super();
        this.nodes = nodes;
      }
      render(opts) {
        return this.nodes.reduce((code, n) => code + n.render(opts), "");
      }
      optimizeNodes() {
        const { nodes } = this;
        let i = nodes.length;
        while (i--) {
          const n = nodes[i].optimizeNodes();
          if (Array.isArray(n))
            nodes.splice(i, 1, ...n);
          else if (n)
            nodes[i] = n;
          else
            nodes.splice(i, 1);
        }
        return nodes.length > 0 ? this : void 0;
      }
      optimizeNames(names, constants) {
        const { nodes } = this;
        let i = nodes.length;
        while (i--) {
          const n = nodes[i];
          if (n.optimizeNames(names, constants))
            continue;
          subtractNames(names, n.names);
          nodes.splice(i, 1);
        }
        return nodes.length > 0 ? this : void 0;
      }
      get names() {
        return this.nodes.reduce((names, n) => addNames(names, n.names), {});
      }
    };
    var BlockNode = class extends ParentNode {
      render(opts) {
        return "{" + opts._n + super.render(opts) + "}" + opts._n;
      }
    };
    var Root = class extends ParentNode {
    };
    var Else = class extends BlockNode {
    };
    Else.kind = "else";
    var If = class _If extends BlockNode {
      constructor(condition, nodes) {
        super(nodes);
        this.condition = condition;
      }
      render(opts) {
        let code = `if(${this.condition})` + super.render(opts);
        if (this.else)
          code += "else " + this.else.render(opts);
        return code;
      }
      optimizeNodes() {
        super.optimizeNodes();
        const cond = this.condition;
        if (cond === true)
          return this.nodes;
        let e = this.else;
        if (e) {
          const ns = e.optimizeNodes();
          e = this.else = Array.isArray(ns) ? new Else(ns) : ns;
        }
        if (e) {
          if (cond === false)
            return e instanceof _If ? e : e.nodes;
          if (this.nodes.length)
            return this;
          return new _If(not(cond), e instanceof _If ? [e] : e.nodes);
        }
        if (cond === false || !this.nodes.length)
          return void 0;
        return this;
      }
      optimizeNames(names, constants) {
        var _a;
        this.else = (_a = this.else) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);
        if (!(super.optimizeNames(names, constants) || this.else))
          return;
        this.condition = optimizeExpr(this.condition, names, constants);
        return this;
      }
      get names() {
        const names = super.names;
        addExprNames(names, this.condition);
        if (this.else)
          addNames(names, this.else.names);
        return names;
      }
    };
    If.kind = "if";
    var For = class extends BlockNode {
    };
    For.kind = "for";
    var ForLoop = class extends For {
      constructor(iteration) {
        super();
        this.iteration = iteration;
      }
      render(opts) {
        return `for(${this.iteration})` + super.render(opts);
      }
      optimizeNames(names, constants) {
        if (!super.optimizeNames(names, constants))
          return;
        this.iteration = optimizeExpr(this.iteration, names, constants);
        return this;
      }
      get names() {
        return addNames(super.names, this.iteration.names);
      }
    };
    var ForRange = class extends For {
      constructor(varKind, name, from, to) {
        super();
        this.varKind = varKind;
        this.name = name;
        this.from = from;
        this.to = to;
      }
      render(opts) {
        const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind;
        const { name, from, to } = this;
        return `for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)` + super.render(opts);
      }
      get names() {
        const names = addExprNames(super.names, this.from);
        return addExprNames(names, this.to);
      }
    };
    var ForIter = class extends For {
      constructor(loop, varKind, name, iterable) {
        super();
        this.loop = loop;
        this.varKind = varKind;
        this.name = name;
        this.iterable = iterable;
      }
      render(opts) {
        return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts);
      }
      optimizeNames(names, constants) {
        if (!super.optimizeNames(names, constants))
          return;
        this.iterable = optimizeExpr(this.iterable, names, constants);
        return this;
      }
      get names() {
        return addNames(super.names, this.iterable.names);
      }
    };
    var Func = class extends BlockNode {
      constructor(name, args, async) {
        super();
        this.name = name;
        this.args = args;
        this.async = async;
      }
      render(opts) {
        const _async = this.async ? "async " : "";
        return `${_async}function ${this.name}(${this.args})` + super.render(opts);
      }
    };
    Func.kind = "func";
    var Return = class extends ParentNode {
      render(opts) {
        return "return " + super.render(opts);
      }
    };
    Return.kind = "return";
    var Try = class extends BlockNode {
      render(opts) {
        let code = "try" + super.render(opts);
        if (this.catch)
          code += this.catch.render(opts);
        if (this.finally)
          code += this.finally.render(opts);
        return code;
      }
      optimizeNodes() {
        var _a, _b;
        super.optimizeNodes();
        (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNodes();
        (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes();
        return this;
      }
      optimizeNames(names, constants) {
        var _a, _b;
        super.optimizeNames(names, constants);
        (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);
        (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants);
        return this;
      }
      get names() {
        const names = super.names;
        if (this.catch)
          addNames(names, this.catch.names);
        if (this.finally)
          addNames(names, this.finally.names);
        return names;
      }
    };
    var Catch = class extends BlockNode {
      constructor(error) {
        super();
        this.error = error;
      }
      render(opts) {
        return `catch(${this.error})` + super.render(opts);
      }
    };
    Catch.kind = "catch";
    var Finally = class extends BlockNode {
      render(opts) {
        return "finally" + super.render(opts);
      }
    };
    Finally.kind = "finally";
    var CodeGen = class {
      constructor(extScope, opts = {}) {
        this._values = {};
        this._blockStarts = [];
        this._constants = {};
        this.opts = { ...opts, _n: opts.lines ? "\n" : "" };
        this._extScope = extScope;
        this._scope = new scope_1.Scope({ parent: extScope });
        this._nodes = [new Root()];
      }
      toString() {
        return this._root.render(this.opts);
      }
      // returns unique name in the internal scope
      name(prefix) {
        return this._scope.name(prefix);
      }
      // reserves unique name in the external scope
      scopeName(prefix) {
        return this._extScope.name(prefix);
      }
      // reserves unique name in the external scope and assigns value to it
      scopeValue(prefixOrName, value) {
        const name = this._extScope.value(prefixOrName, value);
        const vs = this._values[name.prefix] || (this._values[name.prefix] = /* @__PURE__ */ new Set());
        vs.add(name);
        return name;
      }
      getScopeValue(prefix, keyOrRef) {
        return this._extScope.getValue(prefix, keyOrRef);
      }
      // return code that assigns values in the external scope to the names that are used internally
      // (same names that were returned by gen.scopeName or gen.scopeValue)
      scopeRefs(scopeName) {
        return this._extScope.scopeRefs(scopeName, this._values);
      }
      scopeCode() {
        return this._extScope.scopeCode(this._values);
      }
      _def(varKind, nameOrPrefix, rhs, constant) {
        const name = this._scope.toName(nameOrPrefix);
        if (rhs !== void 0 && constant)
          this._constants[name.str] = rhs;
        this._leafNode(new Def(varKind, name, rhs));
        return name;
      }
      // `const` declaration (`var` in es5 mode)
      const(nameOrPrefix, rhs, _constant) {
        return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant);
      }
      // `let` declaration with optional assignment (`var` in es5 mode)
      let(nameOrPrefix, rhs, _constant) {
        return this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant);
      }
      // `var` declaration with optional assignment
      var(nameOrPrefix, rhs, _constant) {
        return this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant);
      }
      // assignment code
      assign(lhs, rhs, sideEffects) {
        return this._leafNode(new Assign(lhs, rhs, sideEffects));
      }
      // `+=` code
      add(lhs, rhs) {
        return this._leafNode(new AssignOp(lhs, exports.operators.ADD, rhs));
      }
      // appends passed SafeExpr to code or executes Block
      code(c) {
        if (typeof c == "function")
          c();
        else if (c !== code_1.nil)
          this._leafNode(new AnyCode(c));
        return this;
      }
      // returns code for object literal for the passed argument list of key-value pairs
      object(...keyValues) {
        const code = ["{"];
        for (const [key, value] of keyValues) {
          if (code.length > 1)
            code.push(",");
          code.push(key);
          if (key !== value || this.opts.es5) {
            code.push(":");
            (0, code_1.addCodeArg)(code, value);
          }
        }
        code.push("}");
        return new code_1._Code(code);
      }
      // `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)
      if(condition, thenBody, elseBody) {
        this._blockNode(new If(condition));
        if (thenBody && elseBody) {
          this.code(thenBody).else().code(elseBody).endIf();
        } else if (thenBody) {
          this.code(thenBody).endIf();
        } else if (elseBody) {
          throw new Error('CodeGen: "else" body without "then" body');
        }
        return this;
      }
      // `else if` clause - invalid without `if` or after `else` clauses
      elseIf(condition) {
        return this._elseNode(new If(condition));
      }
      // `else` clause - only valid after `if` or `else if` clauses
      else() {
        return this._elseNode(new Else());
      }
      // end `if` statement (needed if gen.if was used only with condition)
      endIf() {
        return this._endBlockNode(If, Else);
      }
      _for(node, forBody) {
        this._blockNode(node);
        if (forBody)
          this.code(forBody).endFor();
        return this;
      }
      // a generic `for` clause (or statement if `forBody` is passed)
      for(iteration, forBody) {
        return this._for(new ForLoop(iteration), forBody);
      }
      // `for` statement for a range of values
      forRange(nameOrPrefix, from, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) {
        const name = this._scope.toName(nameOrPrefix);
        return this._for(new ForRange(varKind, name, from, to), () => forBody(name));
      }
      // `for-of` statement (in es5 mode replace with a normal for loop)
      forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) {
        const name = this._scope.toName(nameOrPrefix);
        if (this.opts.es5) {
          const arr = iterable instanceof code_1.Name ? iterable : this.var("_arr", iterable);
          return this.forRange("_i", 0, (0, code_1._)`${arr}.length`, (i) => {
            this.var(name, (0, code_1._)`${arr}[${i}]`);
            forBody(name);
          });
        }
        return this._for(new ForIter("of", varKind, name, iterable), () => forBody(name));
      }
      // `for-in` statement.
      // With option `ownProperties` replaced with a `for-of` loop for object keys
      forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) {
        if (this.opts.ownProperties) {
          return this.forOf(nameOrPrefix, (0, code_1._)`Object.keys(${obj})`, forBody);
        }
        const name = this._scope.toName(nameOrPrefix);
        return this._for(new ForIter("in", varKind, name, obj), () => forBody(name));
      }
      // end `for` loop
      endFor() {
        return this._endBlockNode(For);
      }
      // `label` statement
      label(label) {
        return this._leafNode(new Label(label));
      }
      // `break` statement
      break(label) {
        return this._leafNode(new Break(label));
      }
      // `return` statement
      return(value) {
        const node = new Return();
        this._blockNode(node);
        this.code(value);
        if (node.nodes.length !== 1)
          throw new Error('CodeGen: "return" should have one node');
        return this._endBlockNode(Return);
      }
      // `try` statement
      try(tryBody, catchCode, finallyCode) {
        if (!catchCode && !finallyCode)
          throw new Error('CodeGen: "try" without "catch" and "finally"');
        const node = new Try();
        this._blockNode(node);
        this.code(tryBody);
        if (catchCode) {
          const error = this.name("e");
          this._currNode = node.catch = new Catch(error);
          catchCode(error);
        }
        if (finallyCode) {
          this._currNode = node.finally = new Finally();
          this.code(finallyCode);
        }
        return this._endBlockNode(Catch, Finally);
      }
      // `throw` statement
      throw(error) {
        return this._leafNode(new Throw(error));
      }
      // start self-balancing block
      block(body, nodeCount) {
        this._blockStarts.push(this._nodes.length);
        if (body)
          this.code(body).endBlock(nodeCount);
        return this;
      }
      // end the current self-balancing block
      endBlock(nodeCount) {
        const len = this._blockStarts.pop();
        if (len === void 0)
          throw new Error("CodeGen: not in self-balancing block");
        const toClose = this._nodes.length - len;
        if (toClose < 0 || nodeCount !== void 0 && toClose !== nodeCount) {
          throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`);
        }
        this._nodes.length = len;
        return this;
      }
      // `function` heading (or definition if funcBody is passed)
      func(name, args = code_1.nil, async, funcBody) {
        this._blockNode(new Func(name, args, async));
        if (funcBody)
          this.code(funcBody).endFunc();
        return this;
      }
      // end function definition
      endFunc() {
        return this._endBlockNode(Func);
      }
      optimize(n = 1) {
        while (n-- > 0) {
          this._root.optimizeNodes();
          this._root.optimizeNames(this._root.names, this._constants);
        }
      }
      _leafNode(node) {
        this._currNode.nodes.push(node);
        return this;
      }
      _blockNode(node) {
        this._currNode.nodes.push(node);
        this._nodes.push(node);
      }
      _endBlockNode(N1, N2) {
        const n = this._currNode;
        if (n instanceof N1 || N2 && n instanceof N2) {
          this._nodes.pop();
          return this;
        }
        throw new Error(`CodeGen: not in block "${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}"`);
      }
      _elseNode(node) {
        const n = this._currNode;
        if (!(n instanceof If)) {
          throw new Error('CodeGen: "else" without "if"');
        }
        this._currNode = n.else = node;
        return this;
      }
      get _root() {
        return this._nodes[0];
      }
      get _currNode() {
        const ns = this._nodes;
        return ns[ns.length - 1];
      }
      set _currNode(node) {
        const ns = this._nodes;
        ns[ns.length - 1] = node;
      }
    };
    exports.CodeGen = CodeGen;
    function addNames(names, from) {
      for (const n in from)
        names[n] = (names[n] || 0) + (from[n] || 0);
      return names;
    }
    function addExprNames(names, from) {
      return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names;
    }
    function optimizeExpr(expr, names, constants) {
      if (expr instanceof code_1.Name)
        return replaceName(expr);
      if (!canOptimize(expr))
        return expr;
      return new code_1._Code(expr._items.reduce((items, c) => {
        if (c instanceof code_1.Name)
          c = replaceName(c);
        if (c instanceof code_1._Code)
          items.push(...c._items);
        else
          items.push(c);
        return items;
      }, []));
      function replaceName(n) {
        const c = constants[n.str];
        if (c === void 0 || names[n.str] !== 1)
          return n;
        delete names[n.str];
        return c;
      }
      function canOptimize(e) {
        return e instanceof code_1._Code && e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== void 0);
      }
    }
    function subtractNames(names, from) {
      for (const n in from)
        names[n] = (names[n] || 0) - (from[n] || 0);
    }
    function not(x) {
      return typeof x == "boolean" || typeof x == "number" || x === null ? !x : (0, code_1._)`!${par(x)}`;
    }
    exports.not = not;
    var andCode = mappend(exports.operators.AND);
    function and(...args) {
      return args.reduce(andCode);
    }
    exports.and = and;
    var orCode = mappend(exports.operators.OR);
    function or(...args) {
      return args.reduce(orCode);
    }
    exports.or = or;
    function mappend(op) {
      return (x, y) => x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._)`${par(x)} ${op} ${par(y)}`;
    }
    function par(x) {
      return x instanceof code_1.Name ? x : (0, code_1._)`(${x})`;
    }
  }
});

// node_modules/ajv/dist/compile/util.js
var require_util = __commonJS({
  "node_modules/ajv/dist/compile/util.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0;
    var codegen_1 = require_codegen();
    var code_1 = require_code();
    function toHash(arr) {
      const hash = {};
      for (const item of arr)
        hash[item] = true;
      return hash;
    }
    exports.toHash = toHash;
    function alwaysValidSchema(it, schema) {
      if (typeof schema == "boolean")
        return schema;
      if (Object.keys(schema).length === 0)
        return true;
      checkUnknownRules(it, schema);
      return !schemaHasRules(schema, it.self.RULES.all);
    }
    exports.alwaysValidSchema = alwaysValidSchema;
    function checkUnknownRules(it, schema = it.schema) {
      const { opts, self } = it;
      if (!opts.strictSchema)
        return;
      if (typeof schema === "boolean")
        return;
      const rules = self.RULES.keywords;
      for (const key in schema) {
        if (!rules[key])
          checkStrictMode(it, `unknown keyword: "${key}"`);
      }
    }
    exports.checkUnknownRules = checkUnknownRules;
    function schemaHasRules(schema, rules) {
      if (typeof schema == "boolean")
        return !schema;
      for (const key in schema)
        if (rules[key])
          return true;
      return false;
    }
    exports.schemaHasRules = schemaHasRules;
    function schemaHasRulesButRef(schema, RULES) {
      if (typeof schema == "boolean")
        return !schema;
      for (const key in schema)
        if (key !== "$ref" && RULES.all[key])
          return true;
      return false;
    }
    exports.schemaHasRulesButRef = schemaHasRulesButRef;
    function schemaRefOrVal({ topSchemaRef, schemaPath }, schema, keyword, $data) {
      if (!$data) {
        if (typeof schema == "number" || typeof schema == "boolean")
          return schema;
        if (typeof schema == "string")
          return (0, codegen_1._)`${schema}`;
      }
      return (0, codegen_1._)`${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`;
    }
    exports.schemaRefOrVal = schemaRefOrVal;
    function unescapeFragment(str) {
      return unescapeJsonPointer(decodeURIComponent(str));
    }
    exports.unescapeFragment = unescapeFragment;
    function escapeFragment(str) {
      return encodeURIComponent(escapeJsonPointer(str));
    }
    exports.escapeFragment = escapeFragment;
    function escapeJsonPointer(str) {
      if (typeof str == "number")
        return `${str}`;
      return str.replace(/~/g, "~0").replace(/\//g, "~1");
    }
    exports.escapeJsonPointer = escapeJsonPointer;
    function unescapeJsonPointer(str) {
      return str.replace(/~1/g, "/").replace(/~0/g, "~");
    }
    exports.unescapeJsonPointer = unescapeJsonPointer;
    function eachItem(xs, f) {
      if (Array.isArray(xs)) {
        for (const x of xs)
          f(x);
      } else {
        f(xs);
      }
    }
    exports.eachItem = eachItem;
    function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues, resultToName }) {
      return (gen, from, to, toName) => {
        const res = to === void 0 ? from : to instanceof codegen_1.Name ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to) : from instanceof codegen_1.Name ? (mergeToName(gen, to, from), from) : mergeValues(from, to);
        return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res;
      };
    }
    exports.mergeEvaluated = {
      props: makeMergeEvaluated({
        mergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => {
          gen.if((0, codegen_1._)`${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._)`${to} || {}`).code((0, codegen_1._)`Object.assign(${to}, ${from})`));
        }),
        mergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => {
          if (from === true) {
            gen.assign(to, true);
          } else {
            gen.assign(to, (0, codegen_1._)`${to} || {}`);
            setEvaluated(gen, to, from);
          }
        }),
        mergeValues: (from, to) => from === true ? true : { ...from, ...to },
        resultToName: evaluatedPropsToName
      }),
      items: makeMergeEvaluated({
        mergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1._)`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)),
        mergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1._)`${to} > ${from} ? ${to} : ${from}`)),
        mergeValues: (from, to) => from === true ? true : Math.max(from, to),
        resultToName: (gen, items) => gen.var("items", items)
      })
    };
    function evaluatedPropsToName(gen, ps) {
      if (ps === true)
        return gen.var("props", true);
      const props = gen.var("props", (0, codegen_1._)`{}`);
      if (ps !== void 0)
        setEvaluated(gen, props, ps);
      return props;
    }
    exports.evaluatedPropsToName = evaluatedPropsToName;
    function setEvaluated(gen, props, ps) {
      Object.keys(ps).forEach((p) => gen.assign((0, codegen_1._)`${props}${(0, codegen_1.getProperty)(p)}`, true));
    }
    exports.setEvaluated = setEvaluated;
    var snippets = {};
    function useFunc(gen, f) {
      return gen.scopeValue("func", {
        ref: f,
        code: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code))
      });
    }
    exports.useFunc = useFunc;
    var Type;
    (function(Type2) {
      Type2[Type2["Num"] = 0] = "Num";
      Type2[Type2["Str"] = 1] = "Str";
    })(Type || (exports.Type = Type = {}));
    function getErrorPath(dataProp, dataPropType, jsPropertySyntax) {
      if (dataProp instanceof codegen_1.Name) {
        const isNumber = dataPropType === Type.Num;
        return jsPropertySyntax ? isNumber ? (0, codegen_1._)`"[" + ${dataProp} + "]"` : (0, codegen_1._)`"['" + ${dataProp} + "']"` : isNumber ? (0, codegen_1._)`"/" + ${dataProp}` : (0, codegen_1._)`"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`;
      }
      return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp);
    }
    exports.getErrorPath = getErrorPath;
    function checkStrictMode(it, msg, mode = it.opts.strictSchema) {
      if (!mode)
        return;
      msg = `strict mode: ${msg}`;
      if (mode === true)
        throw new Error(msg);
      it.self.logger.warn(msg);
    }
    exports.checkStrictMode = checkStrictMode;
  }
});

// node_modules/ajv/dist/compile/names.js
var require_names = __commonJS({
  "node_modules/ajv/dist/compile/names.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var names = {
      // validation function arguments
      data: new codegen_1.Name("data"),
      // data passed to validation function
      // args passed from referencing schema
      valCxt: new codegen_1.Name("valCxt"),
      // validation/data context - should not be used directly, it is destructured to the names below
      instancePath: new codegen_1.Name("instancePath"),
      parentData: new codegen_1.Name("parentData"),
      parentDataProperty: new codegen_1.Name("parentDataProperty"),
      rootData: new codegen_1.Name("rootData"),
      // root data - same as the data passed to the first/top validation function
      dynamicAnchors: new codegen_1.Name("dynamicAnchors"),
      // used to support recursiveRef and dynamicRef
      // function scoped variables
      vErrors: new codegen_1.Name("vErrors"),
      // null or array of validation errors
      errors: new codegen_1.Name("errors"),
      // counter of validation errors
      this: new codegen_1.Name("this"),
      // "globals"
      self: new codegen_1.Name("self"),
      scope: new codegen_1.Name("scope"),
      // JTD serialize/parse name for JSON string and position
      json: new codegen_1.Name("json"),
      jsonPos: new codegen_1.Name("jsonPos"),
      jsonLen: new codegen_1.Name("jsonLen"),
      jsonPart: new codegen_1.Name("jsonPart")
    };
    exports.default = names;
  }
});

// node_modules/ajv/dist/compile/errors.js
var require_errors = __commonJS({
  "node_modules/ajv/dist/compile/errors.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0;
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var names_1 = require_names();
    exports.keywordError = {
      message: ({ keyword }) => (0, codegen_1.str)`must pass "${keyword}" keyword validation`
    };
    exports.keyword$DataError = {
      message: ({ keyword, schemaType }) => schemaType ? (0, codegen_1.str)`"${keyword}" keyword must be ${schemaType} ($data)` : (0, codegen_1.str)`"${keyword}" keyword is invalid ($data)`
    };
    function reportError(cxt, error = exports.keywordError, errorPaths, overrideAllErrors) {
      const { it } = cxt;
      const { gen, compositeRule, allErrors } = it;
      const errObj = errorObjectCode(cxt, error, errorPaths);
      if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : compositeRule || allErrors) {
        addError(gen, errObj);
      } else {
        returnErrors(it, (0, codegen_1._)`[${errObj}]`);
      }
    }
    exports.reportError = reportError;
    function reportExtraError(cxt, error = exports.keywordError, errorPaths) {
      const { it } = cxt;
      const { gen, compositeRule, allErrors } = it;
      const errObj = errorObjectCode(cxt, error, errorPaths);
      addError(gen, errObj);
      if (!(compositeRule || allErrors)) {
        returnErrors(it, names_1.default.vErrors);
      }
    }
    exports.reportExtraError = reportExtraError;
    function resetErrorsCount(gen, errsCount) {
      gen.assign(names_1.default.errors, errsCount);
      gen.if((0, codegen_1._)`${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._)`${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null)));
    }
    exports.resetErrorsCount = resetErrorsCount;
    function extendErrors({ gen, keyword, schemaValue, data, errsCount, it }) {
      if (errsCount === void 0)
        throw new Error("ajv implementation error");
      const err = gen.name("err");
      gen.forRange("i", errsCount, names_1.default.errors, (i) => {
        gen.const(err, (0, codegen_1._)`${names_1.default.vErrors}[${i}]`);
        gen.if((0, codegen_1._)`${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._)`${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it.errorPath)));
        gen.assign((0, codegen_1._)`${err}.schemaPath`, (0, codegen_1.str)`${it.errSchemaPath}/${keyword}`);
        if (it.opts.verbose) {
          gen.assign((0, codegen_1._)`${err}.schema`, schemaValue);
          gen.assign((0, codegen_1._)`${err}.data`, data);
        }
      });
    }
    exports.extendErrors = extendErrors;
    function addError(gen, errObj) {
      const err = gen.const("err", errObj);
      gen.if((0, codegen_1._)`${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._)`[${err}]`), (0, codegen_1._)`${names_1.default.vErrors}.push(${err})`);
      gen.code((0, codegen_1._)`${names_1.default.errors}++`);
    }
    function returnErrors(it, errs) {
      const { gen, validateName, schemaEnv } = it;
      if (schemaEnv.$async) {
        gen.throw((0, codegen_1._)`new ${it.ValidationError}(${errs})`);
      } else {
        gen.assign((0, codegen_1._)`${validateName}.errors`, errs);
        gen.return(false);
      }
    }
    var E = {
      keyword: new codegen_1.Name("keyword"),
      schemaPath: new codegen_1.Name("schemaPath"),
      // also used in JTD errors
      params: new codegen_1.Name("params"),
      propertyName: new codegen_1.Name("propertyName"),
      message: new codegen_1.Name("message"),
      schema: new codegen_1.Name("schema"),
      parentSchema: new codegen_1.Name("parentSchema")
    };
    function errorObjectCode(cxt, error, errorPaths) {
      const { createErrors } = cxt.it;
      if (createErrors === false)
        return (0, codegen_1._)`{}`;
      return errorObject(cxt, error, errorPaths);
    }
    function errorObject(cxt, error, errorPaths = {}) {
      const { gen, it } = cxt;
      const keyValues = [
        errorInstancePath(it, errorPaths),
        errorSchemaPath(cxt, errorPaths)
      ];
      extraErrorProps(cxt, error, keyValues);
      return gen.object(...keyValues);
    }
    function errorInstancePath({ errorPath }, { instancePath }) {
      const instPath = instancePath ? (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}` : errorPath;
      return [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)];
    }
    function errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) {
      let schPath = parentSchema ? errSchemaPath : (0, codegen_1.str)`${errSchemaPath}/${keyword}`;
      if (schemaPath) {
        schPath = (0, codegen_1.str)`${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`;
      }
      return [E.schemaPath, schPath];
    }
    function extraErrorProps(cxt, { params, message }, keyValues) {
      const { keyword, data, schemaValue, it } = cxt;
      const { opts, propertyName, topSchemaRef, schemaPath } = it;
      keyValues.push([E.keyword, keyword], [E.params, typeof params == "function" ? params(cxt) : params || (0, codegen_1._)`{}`]);
      if (opts.messages) {
        keyValues.push([E.message, typeof message == "function" ? message(cxt) : message]);
      }
      if (opts.verbose) {
        keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._)`${topSchemaRef}${schemaPath}`], [names_1.default.data, data]);
      }
      if (propertyName)
        keyValues.push([E.propertyName, propertyName]);
    }
  }
});

// node_modules/ajv/dist/compile/validate/boolSchema.js
var require_boolSchema = __commonJS({
  "node_modules/ajv/dist/compile/validate/boolSchema.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.boolOrEmptySchema = exports.topBoolOrEmptySchema = void 0;
    var errors_1 = require_errors();
    var codegen_1 = require_codegen();
    var names_1 = require_names();
    var boolError = {
      message: "boolean schema is false"
    };
    function topBoolOrEmptySchema(it) {
      const { gen, schema, validateName } = it;
      if (schema === false) {
        falseSchemaError(it, false);
      } else if (typeof schema == "object" && schema.$async === true) {
        gen.return(names_1.default.data);
      } else {
        gen.assign((0, codegen_1._)`${validateName}.errors`, null);
        gen.return(true);
      }
    }
    exports.topBoolOrEmptySchema = topBoolOrEmptySchema;
    function boolOrEmptySchema(it, valid) {
      const { gen, schema } = it;
      if (schema === false) {
        gen.var(valid, false);
        falseSchemaError(it);
      } else {
        gen.var(valid, true);
      }
    }
    exports.boolOrEmptySchema = boolOrEmptySchema;
    function falseSchemaError(it, overrideAllErrors) {
      const { gen, data } = it;
      const cxt = {
        gen,
        keyword: "false schema",
        data,
        schema: false,
        schemaCode: false,
        schemaValue: false,
        params: {},
        it
      };
      (0, errors_1.reportError)(cxt, boolError, void 0, overrideAllErrors);
    }
  }
});

// node_modules/ajv/dist/compile/rules.js
var require_rules = __commonJS({
  "node_modules/ajv/dist/compile/rules.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.getRules = exports.isJSONType = void 0;
    var _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"];
    var jsonTypes = new Set(_jsonTypes);
    function isJSONType(x) {
      return typeof x == "string" && jsonTypes.has(x);
    }
    exports.isJSONType = isJSONType;
    function getRules() {
      const groups = {
        number: { type: "number", rules: [] },
        string: { type: "string", rules: [] },
        array: { type: "array", rules: [] },
        object: { type: "object", rules: [] }
      };
      return {
        types: { ...groups, integer: true, boolean: true, null: true },
        rules: [{ rules: [] }, groups.number, groups.string, groups.array, groups.object],
        post: { rules: [] },
        all: {},
        keywords: {}
      };
    }
    exports.getRules = getRules;
  }
});

// node_modules/ajv/dist/compile/validate/applicability.js
var require_applicability = __commonJS({
  "node_modules/ajv/dist/compile/validate/applicability.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0;
    function schemaHasRulesForType({ schema, self }, type) {
      const group = self.RULES.types[type];
      return group && group !== true && shouldUseGroup(schema, group);
    }
    exports.schemaHasRulesForType = schemaHasRulesForType;
    function shouldUseGroup(schema, group) {
      return group.rules.some((rule) => shouldUseRule(schema, rule));
    }
    exports.shouldUseGroup = shouldUseGroup;
    function shouldUseRule(schema, rule) {
      var _a;
      return schema[rule.keyword] !== void 0 || ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema[kwd] !== void 0));
    }
    exports.shouldUseRule = shouldUseRule;
  }
});

// node_modules/ajv/dist/compile/validate/dataType.js
var require_dataType = __commonJS({
  "node_modules/ajv/dist/compile/validate/dataType.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0;
    var rules_1 = require_rules();
    var applicability_1 = require_applicability();
    var errors_1 = require_errors();
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var DataType;
    (function(DataType2) {
      DataType2[DataType2["Correct"] = 0] = "Correct";
      DataType2[DataType2["Wrong"] = 1] = "Wrong";
    })(DataType || (exports.DataType = DataType = {}));
    function getSchemaTypes(schema) {
      const types = getJSONTypes(schema.type);
      const hasNull = types.includes("null");
      if (hasNull) {
        if (schema.nullable === false)
          throw new Error("type: null contradicts nullable: false");
      } else {
        if (!types.length && schema.nullable !== void 0) {
          throw new Error('"nullable" cannot be used without "type"');
        }
        if (schema.nullable === true)
          types.push("null");
      }
      return types;
    }
    exports.getSchemaTypes = getSchemaTypes;
    function getJSONTypes(ts) {
      const types = Array.isArray(ts) ? ts : ts ? [ts] : [];
      if (types.every(rules_1.isJSONType))
        return types;
      throw new Error("type must be JSONType or JSONType[]: " + types.join(","));
    }
    exports.getJSONTypes = getJSONTypes;
    function coerceAndCheckDataType(it, types) {
      const { gen, data, opts } = it;
      const coerceTo = coerceToTypes(types, opts.coerceTypes);
      const checkTypes = types.length > 0 && !(coerceTo.length === 0 && types.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types[0]));
      if (checkTypes) {
        const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong);
        gen.if(wrongType, () => {
          if (coerceTo.length)
            coerceData(it, types, coerceTo);
          else
            reportTypeError(it);
        });
      }
      return checkTypes;
    }
    exports.coerceAndCheckDataType = coerceAndCheckDataType;
    var COERCIBLE = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]);
    function coerceToTypes(types, coerceTypes) {
      return coerceTypes ? types.filter((t) => COERCIBLE.has(t) || coerceTypes === "array" && t === "array") : [];
    }
    function coerceData(it, types, coerceTo) {
      const { gen, data, opts } = it;
      const dataType = gen.let("dataType", (0, codegen_1._)`typeof ${data}`);
      const coerced = gen.let("coerced", (0, codegen_1._)`undefined`);
      if (opts.coerceTypes === "array") {
        gen.if((0, codegen_1._)`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen.assign(data, (0, codegen_1._)`${data}[0]`).assign(dataType, (0, codegen_1._)`typeof ${data}`).if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data)));
      }
      gen.if((0, codegen_1._)`${coerced} !== undefined`);
      for (const t of coerceTo) {
        if (COERCIBLE.has(t) || t === "array" && opts.coerceTypes === "array") {
          coerceSpecificType(t);
        }
      }
      gen.else();
      reportTypeError(it);
      gen.endIf();
      gen.if((0, codegen_1._)`${coerced} !== undefined`, () => {
        gen.assign(data, coerced);
        assignParentData(it, coerced);
      });
      function coerceSpecificType(t) {
        switch (t) {
          case "string":
            gen.elseIf((0, codegen_1._)`${dataType} == "number" || ${dataType} == "boolean"`).assign(coerced, (0, codegen_1._)`"" + ${data}`).elseIf((0, codegen_1._)`${data} === null`).assign(coerced, (0, codegen_1._)`""`);
            return;
          case "number":
            gen.elseIf((0, codegen_1._)`${dataType} == "boolean" || ${data} === null
              || (${dataType} == "string" && ${data} && ${data} == +${data})`).assign(coerced, (0, codegen_1._)`+${data}`);
            return;
          case "integer":
            gen.elseIf((0, codegen_1._)`${dataType} === "boolean" || ${data} === null
              || (${dataType} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`).assign(coerced, (0, codegen_1._)`+${data}`);
            return;
          case "boolean":
            gen.elseIf((0, codegen_1._)`${data} === "false" || ${data} === 0 || ${data} === null`).assign(coerced, false).elseIf((0, codegen_1._)`${data} === "true" || ${data} === 1`).assign(coerced, true);
            return;
          case "null":
            gen.elseIf((0, codegen_1._)`${data} === "" || ${data} === 0 || ${data} === false`);
            gen.assign(coerced, null);
            return;
          case "array":
            gen.elseIf((0, codegen_1._)`${dataType} === "string" || ${dataType} === "number"
              || ${dataType} === "boolean" || ${data} === null`).assign(coerced, (0, codegen_1._)`[${data}]`);
        }
      }
    }
    function assignParentData({ gen, parentData, parentDataProperty }, expr) {
      gen.if((0, codegen_1._)`${parentData} !== undefined`, () => gen.assign((0, codegen_1._)`${parentData}[${parentDataProperty}]`, expr));
    }
    function checkDataType(dataType, data, strictNums, correct = DataType.Correct) {
      const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ;
      let cond;
      switch (dataType) {
        case "null":
          return (0, codegen_1._)`${data} ${EQ} null`;
        case "array":
          cond = (0, codegen_1._)`Array.isArray(${data})`;
          break;
        case "object":
          cond = (0, codegen_1._)`${data} && typeof ${data} == "object" && !Array.isArray(${data})`;
          break;
        case "integer":
          cond = numCond((0, codegen_1._)`!(${data} % 1) && !isNaN(${data})`);
          break;
        case "number":
          cond = numCond();
          break;
        default:
          return (0, codegen_1._)`typeof ${data} ${EQ} ${dataType}`;
      }
      return correct === DataType.Correct ? cond : (0, codegen_1.not)(cond);
      function numCond(_cond = codegen_1.nil) {
        return (0, codegen_1.and)((0, codegen_1._)`typeof ${data} == "number"`, _cond, strictNums ? (0, codegen_1._)`isFinite(${data})` : codegen_1.nil);
      }
    }
    exports.checkDataType = checkDataType;
    function checkDataTypes(dataTypes, data, strictNums, correct) {
      if (dataTypes.length === 1) {
        return checkDataType(dataTypes[0], data, strictNums, correct);
      }
      let cond;
      const types = (0, util_1.toHash)(dataTypes);
      if (types.array && types.object) {
        const notObj = (0, codegen_1._)`typeof ${data} != "object"`;
        cond = types.null ? notObj : (0, codegen_1._)`!${data} || ${notObj}`;
        delete types.null;
        delete types.array;
        delete types.object;
      } else {
        cond = codegen_1.nil;
      }
      if (types.number)
        delete types.integer;
      for (const t in types)
        cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct));
      return cond;
    }
    exports.checkDataTypes = checkDataTypes;
    var typeError = {
      message: ({ schema }) => `must be ${schema}`,
      params: ({ schema, schemaValue }) => typeof schema == "string" ? (0, codegen_1._)`{type: ${schema}}` : (0, codegen_1._)`{type: ${schemaValue}}`
    };
    function reportTypeError(it) {
      const cxt = getTypeErrorContext(it);
      (0, errors_1.reportError)(cxt, typeError);
    }
    exports.reportTypeError = reportTypeError;
    function getTypeErrorContext(it) {
      const { gen, data, schema } = it;
      const schemaCode = (0, util_1.schemaRefOrVal)(it, schema, "type");
      return {
        gen,
        keyword: "type",
        data,
        schema: schema.type,
        schemaCode,
        schemaValue: schemaCode,
        parentSchema: schema,
        params: {},
        it
      };
    }
  }
});

// node_modules/ajv/dist/compile/validate/defaults.js
var require_defaults = __commonJS({
  "node_modules/ajv/dist/compile/validate/defaults.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.assignDefaults = void 0;
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    function assignDefaults(it, ty) {
      const { properties, items } = it.schema;
      if (ty === "object" && properties) {
        for (const key in properties) {
          assignDefault(it, key, properties[key].default);
        }
      } else if (ty === "array" && Array.isArray(items)) {
        items.forEach((sch, i) => assignDefault(it, i, sch.default));
      }
    }
    exports.assignDefaults = assignDefaults;
    function assignDefault(it, prop, defaultValue) {
      const { gen, compositeRule, data, opts } = it;
      if (defaultValue === void 0)
        return;
      const childData = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(prop)}`;
      if (compositeRule) {
        (0, util_1.checkStrictMode)(it, `default is ignored for: ${childData}`);
        return;
      }
      let condition = (0, codegen_1._)`${childData} === undefined`;
      if (opts.useDefaults === "empty") {
        condition = (0, codegen_1._)`${condition} || ${childData} === null || ${childData} === ""`;
      }
      gen.if(condition, (0, codegen_1._)`${childData} = ${(0, codegen_1.stringify)(defaultValue)}`);
    }
  }
});

// node_modules/ajv/dist/vocabularies/code.js
var require_code2 = __commonJS({
  "node_modules/ajv/dist/vocabularies/code.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = void 0;
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var names_1 = require_names();
    var util_2 = require_util();
    function checkReportMissingProp(cxt, prop) {
      const { gen, data, it } = cxt;
      gen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => {
        cxt.setParams({ missingProperty: (0, codegen_1._)`${prop}` }, true);
        cxt.error();
      });
    }
    exports.checkReportMissingProp = checkReportMissingProp;
    function checkMissingProp({ gen, data, it: { opts } }, properties, missing) {
      return (0, codegen_1.or)(...properties.map((prop) => (0, codegen_1.and)(noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1._)`${missing} = ${prop}`)));
    }
    exports.checkMissingProp = checkMissingProp;
    function reportMissingProp(cxt, missing) {
      cxt.setParams({ missingProperty: missing }, true);
      cxt.error();
    }
    exports.reportMissingProp = reportMissingProp;
    function hasPropFunc(gen) {
      return gen.scopeValue("func", {
        // eslint-disable-next-line @typescript-eslint/unbound-method
        ref: Object.prototype.hasOwnProperty,
        code: (0, codegen_1._)`Object.prototype.hasOwnProperty`
      });
    }
    exports.hasPropFunc = hasPropFunc;
    function isOwnProperty(gen, data, property) {
      return (0, codegen_1._)`${hasPropFunc(gen)}.call(${data}, ${property})`;
    }
    exports.isOwnProperty = isOwnProperty;
    function propertyInData(gen, data, property, ownProperties) {
      const cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} !== undefined`;
      return ownProperties ? (0, codegen_1._)`${cond} && ${isOwnProperty(gen, data, property)}` : cond;
    }
    exports.propertyInData = propertyInData;
    function noPropertyInData(gen, data, property, ownProperties) {
      const cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} === undefined`;
      return ownProperties ? (0, codegen_1.or)(cond, (0, codegen_1.not)(isOwnProperty(gen, data, property))) : cond;
    }
    exports.noPropertyInData = noPropertyInData;
    function allSchemaProperties(schemaMap) {
      return schemaMap ? Object.keys(schemaMap).filter((p) => p !== "__proto__") : [];
    }
    exports.allSchemaProperties = allSchemaProperties;
    function schemaProperties(it, schemaMap) {
      return allSchemaProperties(schemaMap).filter((p) => !(0, util_1.alwaysValidSchema)(it, schemaMap[p]));
    }
    exports.schemaProperties = schemaProperties;
    function callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }, func, context, passSchema) {
      const dataAndSchema = passSchema ? (0, codegen_1._)`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data;
      const valCxt = [
        [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, errorPath)],
        [names_1.default.parentData, it.parentData],
        [names_1.default.parentDataProperty, it.parentDataProperty],
        [names_1.default.rootData, names_1.default.rootData]
      ];
      if (it.opts.dynamicRef)
        valCxt.push([names_1.default.dynamicAnchors, names_1.default.dynamicAnchors]);
      const args = (0, codegen_1._)`${dataAndSchema}, ${gen.object(...valCxt)}`;
      return context !== codegen_1.nil ? (0, codegen_1._)`${func}.call(${context}, ${args})` : (0, codegen_1._)`${func}(${args})`;
    }
    exports.callValidateCode = callValidateCode;
    var newRegExp = (0, codegen_1._)`new RegExp`;
    function usePattern({ gen, it: { opts } }, pattern) {
      const u = opts.unicodeRegExp ? "u" : "";
      const { regExp } = opts.code;
      const rx = regExp(pattern, u);
      return gen.scopeValue("pattern", {
        key: rx.toString(),
        ref: rx,
        code: (0, codegen_1._)`${regExp.code === "new RegExp" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern}, ${u})`
      });
    }
    exports.usePattern = usePattern;
    function validateArray(cxt) {
      const { gen, data, keyword, it } = cxt;
      const valid = gen.name("valid");
      if (it.allErrors) {
        const validArr = gen.let("valid", true);
        validateItems(() => gen.assign(validArr, false));
        return validArr;
      }
      gen.var(valid, true);
      validateItems(() => gen.break());
      return valid;
      function validateItems(notValid) {
        const len = gen.const("len", (0, codegen_1._)`${data}.length`);
        gen.forRange("i", 0, len, (i) => {
          cxt.subschema({
            keyword,
            dataProp: i,
            dataPropType: util_1.Type.Num
          }, valid);
          gen.if((0, codegen_1.not)(valid), notValid);
        });
      }
    }
    exports.validateArray = validateArray;
    function validateUnion(cxt) {
      const { gen, schema, keyword, it } = cxt;
      if (!Array.isArray(schema))
        throw new Error("ajv implementation error");
      const alwaysValid = schema.some((sch) => (0, util_1.alwaysValidSchema)(it, sch));
      if (alwaysValid && !it.opts.unevaluated)
        return;
      const valid = gen.let("valid", false);
      const schValid = gen.name("_valid");
      gen.block(() => schema.forEach((_sch, i) => {
        const schCxt = cxt.subschema({
          keyword,
          schemaProp: i,
          compositeRule: true
        }, schValid);
        gen.assign(valid, (0, codegen_1._)`${valid} || ${schValid}`);
        const merged = cxt.mergeValidEvaluated(schCxt, schValid);
        if (!merged)
          gen.if((0, codegen_1.not)(valid));
      }));
      cxt.result(valid, () => cxt.reset(), () => cxt.error(true));
    }
    exports.validateUnion = validateUnion;
  }
});

// node_modules/ajv/dist/compile/validate/keyword.js
var require_keyword = __commonJS({
  "node_modules/ajv/dist/compile/validate/keyword.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = void 0;
    var codegen_1 = require_codegen();
    var names_1 = require_names();
    var code_1 = require_code2();
    var errors_1 = require_errors();
    function macroKeywordCode(cxt, def) {
      const { gen, keyword, schema, parentSchema, it } = cxt;
      const macroSchema = def.macro.call(it.self, schema, parentSchema, it);
      const schemaRef = useKeyword(gen, keyword, macroSchema);
      if (it.opts.validateSchema !== false)
        it.self.validateSchema(macroSchema, true);
      const valid = gen.name("valid");
      cxt.subschema({
        schema: macroSchema,
        schemaPath: codegen_1.nil,
        errSchemaPath: `${it.errSchemaPath}/${keyword}`,
        topSchemaRef: schemaRef,
        compositeRule: true
      }, valid);
      cxt.pass(valid, () => cxt.error(true));
    }
    exports.macroKeywordCode = macroKeywordCode;
    function funcKeywordCode(cxt, def) {
      var _a;
      const { gen, keyword, schema, parentSchema, $data, it } = cxt;
      checkAsyncKeyword(it, def);
      const validate = !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate;
      const validateRef = useKeyword(gen, keyword, validate);
      const valid = gen.let("valid");
      cxt.block$data(valid, validateKeyword);
      cxt.ok((_a = def.valid) !== null && _a !== void 0 ? _a : valid);
      function validateKeyword() {
        if (def.errors === false) {
          assignValid();
          if (def.modifying)
            modifyData(cxt);
          reportErrs(() => cxt.error());
        } else {
          const ruleErrs = def.async ? validateAsync() : validateSync();
          if (def.modifying)
            modifyData(cxt);
          reportErrs(() => addErrs(cxt, ruleErrs));
        }
      }
      function validateAsync() {
        const ruleErrs = gen.let("ruleErrs", null);
        gen.try(() => assignValid((0, codegen_1._)`await `), (e) => gen.assign(valid, false).if((0, codegen_1._)`${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._)`${e}.errors`), () => gen.throw(e)));
        return ruleErrs;
      }
      function validateSync() {
        const validateErrs = (0, codegen_1._)`${validateRef}.errors`;
        gen.assign(validateErrs, null);
        assignValid(codegen_1.nil);
        return validateErrs;
      }
      function assignValid(_await = def.async ? (0, codegen_1._)`await ` : codegen_1.nil) {
        const passCxt = it.opts.passContext ? names_1.default.this : names_1.default.self;
        const passSchema = !("compile" in def && !$data || def.schema === false);
        gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);
      }
      function reportErrs(errors) {
        var _a2;
        gen.if((0, codegen_1.not)((_a2 = def.valid) !== null && _a2 !== void 0 ? _a2 : valid), errors);
      }
    }
    exports.funcKeywordCode = funcKeywordCode;
    function modifyData(cxt) {
      const { gen, data, it } = cxt;
      gen.if(it.parentData, () => gen.assign(data, (0, codegen_1._)`${it.parentData}[${it.parentDataProperty}]`));
    }
    function addErrs(cxt, errs) {
      const { gen } = cxt;
      gen.if((0, codegen_1._)`Array.isArray(${errs})`, () => {
        gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`).assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);
        (0, errors_1.extendErrors)(cxt);
      }, () => cxt.error());
    }
    function checkAsyncKeyword({ schemaEnv }, def) {
      if (def.async && !schemaEnv.$async)
        throw new Error("async keyword in sync schema");
    }
    function useKeyword(gen, keyword, result) {
      if (result === void 0)
        throw new Error(`keyword "${keyword}" failed to compile`);
      return gen.scopeValue("keyword", typeof result == "function" ? { ref: result } : { ref: result, code: (0, codegen_1.stringify)(result) });
    }
    function validSchemaType(schema, schemaType, allowUndefined = false) {
      return !schemaType.length || schemaType.some((st) => st === "array" ? Array.isArray(schema) : st === "object" ? schema && typeof schema == "object" && !Array.isArray(schema) : typeof schema == st || allowUndefined && typeof schema == "undefined");
    }
    exports.validSchemaType = validSchemaType;
    function validateKeywordUsage({ schema, opts, self, errSchemaPath }, def, keyword) {
      if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) {
        throw new Error("ajv implementation error");
      }
      const deps = def.dependencies;
      if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) {
        throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(",")}`);
      }
      if (def.validateSchema) {
        const valid = def.validateSchema(schema[keyword]);
        if (!valid) {
          const msg = `keyword "${keyword}" value is invalid at path "${errSchemaPath}": ` + self.errorsText(def.validateSchema.errors);
          if (opts.validateSchema === "log")
            self.logger.error(msg);
          else
            throw new Error(msg);
        }
      }
    }
    exports.validateKeywordUsage = validateKeywordUsage;
  }
});

// node_modules/ajv/dist/compile/validate/subschema.js
var require_subschema = __commonJS({
  "node_modules/ajv/dist/compile/validate/subschema.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0;
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    function getSubschema(it, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) {
      if (keyword !== void 0 && schema !== void 0) {
        throw new Error('both "keyword" and "schema" passed, only one allowed');
      }
      if (keyword !== void 0) {
        const sch = it.schema[keyword];
        return schemaProp === void 0 ? {
          schema: sch,
          schemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}`,
          errSchemaPath: `${it.errSchemaPath}/${keyword}`
        } : {
          schema: sch[schemaProp],
          schemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`,
          errSchemaPath: `${it.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}`
        };
      }
      if (schema !== void 0) {
        if (schemaPath === void 0 || errSchemaPath === void 0 || topSchemaRef === void 0) {
          throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');
        }
        return {
          schema,
          schemaPath,
          topSchemaRef,
          errSchemaPath
        };
      }
      throw new Error('either "keyword" or "schema" must be passed');
    }
    exports.getSubschema = getSubschema;
    function extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) {
      if (data !== void 0 && dataProp !== void 0) {
        throw new Error('both "data" and "dataProp" passed, only one allowed');
      }
      const { gen } = it;
      if (dataProp !== void 0) {
        const { errorPath, dataPathArr, opts } = it;
        const nextData = gen.let("data", (0, codegen_1._)`${it.data}${(0, codegen_1.getProperty)(dataProp)}`, true);
        dataContextProps(nextData);
        subschema.errorPath = (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`;
        subschema.parentDataProperty = (0, codegen_1._)`${dataProp}`;
        subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty];
      }
      if (data !== void 0) {
        const nextData = data instanceof codegen_1.Name ? data : gen.let("data", data, true);
        dataContextProps(nextData);
        if (propertyName !== void 0)
          subschema.propertyName = propertyName;
      }
      if (dataTypes)
        subschema.dataTypes = dataTypes;
      function dataContextProps(_nextData) {
        subschema.data = _nextData;
        subschema.dataLevel = it.dataLevel + 1;
        subschema.dataTypes = [];
        it.definedProperties = /* @__PURE__ */ new Set();
        subschema.parentData = it.data;
        subschema.dataNames = [...it.dataNames, _nextData];
      }
    }
    exports.extendSubschemaData = extendSubschemaData;
    function extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) {
      if (compositeRule !== void 0)
        subschema.compositeRule = compositeRule;
      if (createErrors !== void 0)
        subschema.createErrors = createErrors;
      if (allErrors !== void 0)
        subschema.allErrors = allErrors;
      subschema.jtdDiscriminator = jtdDiscriminator;
      subschema.jtdMetadata = jtdMetadata;
    }
    exports.extendSubschemaMode = extendSubschemaMode;
  }
});

// node_modules/fast-deep-equal/index.js
var require_fast_deep_equal = __commonJS({
  "node_modules/fast-deep-equal/index.js"(exports, module) {
    "use strict";
    module.exports = function equal(a, b) {
      if (a === b) return true;
      if (a && b && typeof a == "object" && typeof b == "object") {
        if (a.constructor !== b.constructor) return false;
        var length, i, keys;
        if (Array.isArray(a)) {
          length = a.length;
          if (length != b.length) return false;
          for (i = length; i-- !== 0; )
            if (!equal(a[i], b[i])) return false;
          return true;
        }
        if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
        if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
        if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
        keys = Object.keys(a);
        length = keys.length;
        if (length !== Object.keys(b).length) return false;
        for (i = length; i-- !== 0; )
          if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
        for (i = length; i-- !== 0; ) {
          var key = keys[i];
          if (!equal(a[key], b[key])) return false;
        }
        return true;
      }
      return a !== a && b !== b;
    };
  }
});

// node_modules/ajv/node_modules/json-schema-traverse/index.js
var require_json_schema_traverse = __commonJS({
  "node_modules/ajv/node_modules/json-schema-traverse/index.js"(exports, module) {
    "use strict";
    var traverse = module.exports = function(schema, opts, cb) {
      if (typeof opts == "function") {
        cb = opts;
        opts = {};
      }
      cb = opts.cb || cb;
      var pre = typeof cb == "function" ? cb : cb.pre || function() {
      };
      var post = cb.post || function() {
      };
      _traverse(opts, pre, post, schema, "", schema);
    };
    traverse.keywords = {
      additionalItems: true,
      items: true,
      contains: true,
      additionalProperties: true,
      propertyNames: true,
      not: true,
      if: true,
      then: true,
      else: true
    };
    traverse.arrayKeywords = {
      items: true,
      allOf: true,
      anyOf: true,
      oneOf: true
    };
    traverse.propsKeywords = {
      $defs: true,
      definitions: true,
      properties: true,
      patternProperties: true,
      dependencies: true
    };
    traverse.skipKeywords = {
      default: true,
      enum: true,
      const: true,
      required: true,
      maximum: true,
      minimum: true,
      exclusiveMaximum: true,
      exclusiveMinimum: true,
      multipleOf: true,
      maxLength: true,
      minLength: true,
      pattern: true,
      format: true,
      maxItems: true,
      minItems: true,
      uniqueItems: true,
      maxProperties: true,
      minProperties: true
    };
    function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
      if (schema && typeof schema == "object" && !Array.isArray(schema)) {
        pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
        for (var key in schema) {
          var sch = schema[key];
          if (Array.isArray(sch)) {
            if (key in traverse.arrayKeywords) {
              for (var i = 0; i < sch.length; i++)
                _traverse(opts, pre, post, sch[i], jsonPtr + "/" + key + "/" + i, rootSchema, jsonPtr, key, schema, i);
            }
          } else if (key in traverse.propsKeywords) {
            if (sch && typeof sch == "object") {
              for (var prop in sch)
                _traverse(opts, pre, post, sch[prop], jsonPtr + "/" + key + "/" + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);
            }
          } else if (key in traverse.keywords || opts.allKeys && !(key in traverse.skipKeywords)) {
            _traverse(opts, pre, post, sch, jsonPtr + "/" + key, rootSchema, jsonPtr, key, schema);
          }
        }
        post(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
      }
    }
    function escapeJsonPtr(str) {
      return str.replace(/~/g, "~0").replace(/\//g, "~1");
    }
  }
});

// node_modules/ajv/dist/compile/resolve.js
var require_resolve = __commonJS({
  "node_modules/ajv/dist/compile/resolve.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = void 0;
    var util_1 = require_util();
    var equal = require_fast_deep_equal();
    var traverse = require_json_schema_traverse();
    var SIMPLE_INLINED = /* @__PURE__ */ new Set([
      "type",
      "format",
      "pattern",
      "maxLength",
      "minLength",
      "maxProperties",
      "minProperties",
      "maxItems",
      "minItems",
      "maximum",
      "minimum",
      "uniqueItems",
      "multipleOf",
      "required",
      "enum",
      "const"
    ]);
    function inlineRef(schema, limit = true) {
      if (typeof schema == "boolean")
        return true;
      if (limit === true)
        return !hasRef(schema);
      if (!limit)
        return false;
      return countKeys(schema) <= limit;
    }
    exports.inlineRef = inlineRef;
    var REF_KEYWORDS = /* @__PURE__ */ new Set([
      "$ref",
      "$recursiveRef",
      "$recursiveAnchor",
      "$dynamicRef",
      "$dynamicAnchor"
    ]);
    function hasRef(schema) {
      for (const key in schema) {
        if (REF_KEYWORDS.has(key))
          return true;
        const sch = schema[key];
        if (Array.isArray(sch) && sch.some(hasRef))
          return true;
        if (typeof sch == "object" && hasRef(sch))
          return true;
      }
      return false;
    }
    function countKeys(schema) {
      let count = 0;
      for (const key in schema) {
        if (key === "$ref")
          return Infinity;
        count++;
        if (SIMPLE_INLINED.has(key))
          continue;
        if (typeof schema[key] == "object") {
          (0, util_1.eachItem)(schema[key], (sch) => count += countKeys(sch));
        }
        if (count === Infinity)
          return Infinity;
      }
      return count;
    }
    function getFullPath(resolver, id = "", normalize) {
      if (normalize !== false)
        id = normalizeId(id);
      const p = resolver.parse(id);
      return _getFullPath(resolver, p);
    }
    exports.getFullPath = getFullPath;
    function _getFullPath(resolver, p) {
      const serialized = resolver.serialize(p);
      return serialized.split("#")[0] + "#";
    }
    exports._getFullPath = _getFullPath;
    var TRAILING_SLASH_HASH = /#\/?$/;
    function normalizeId(id) {
      return id ? id.replace(TRAILING_SLASH_HASH, "") : "";
    }
    exports.normalizeId = normalizeId;
    function resolveUrl(resolver, baseId, id) {
      id = normalizeId(id);
      return resolver.resolve(baseId, id);
    }
    exports.resolveUrl = resolveUrl;
    var ANCHOR = /^[a-z_][-a-z0-9._]*$/i;
    function getSchemaRefs(schema, baseId) {
      if (typeof schema == "boolean")
        return {};
      const { schemaId, uriResolver } = this.opts;
      const schId = normalizeId(schema[schemaId] || baseId);
      const baseIds = { "": schId };
      const pathPrefix = getFullPath(uriResolver, schId, false);
      const localRefs = {};
      const schemaRefs = /* @__PURE__ */ new Set();
      traverse(schema, { allKeys: true }, (sch, jsonPtr, _, parentJsonPtr) => {
        if (parentJsonPtr === void 0)
          return;
        const fullPath = pathPrefix + jsonPtr;
        let innerBaseId = baseIds[parentJsonPtr];
        if (typeof sch[schemaId] == "string")
          innerBaseId = addRef.call(this, sch[schemaId]);
        addAnchor.call(this, sch.$anchor);
        addAnchor.call(this, sch.$dynamicAnchor);
        baseIds[jsonPtr] = innerBaseId;
        function addRef(ref) {
          const _resolve = this.opts.uriResolver.resolve;
          ref = normalizeId(innerBaseId ? _resolve(innerBaseId, ref) : ref);
          if (schemaRefs.has(ref))
            throw ambiguos(ref);
          schemaRefs.add(ref);
          let schOrRef = this.refs[ref];
          if (typeof schOrRef == "string")
            schOrRef = this.refs[schOrRef];
          if (typeof schOrRef == "object") {
            checkAmbiguosRef(sch, schOrRef.schema, ref);
          } else if (ref !== normalizeId(fullPath)) {
            if (ref[0] === "#") {
              checkAmbiguosRef(sch, localRefs[ref], ref);
              localRefs[ref] = sch;
            } else {
              this.refs[ref] = fullPath;
            }
          }
          return ref;
        }
        function addAnchor(anchor) {
          if (typeof anchor == "string") {
            if (!ANCHOR.test(anchor))
              throw new Error(`invalid anchor "${anchor}"`);
            addRef.call(this, `#${anchor}`);
          }
        }
      });
      return localRefs;
      function checkAmbiguosRef(sch1, sch2, ref) {
        if (sch2 !== void 0 && !equal(sch1, sch2))
          throw ambiguos(ref);
      }
      function ambiguos(ref) {
        return new Error(`reference "${ref}" resolves to more than one schema`);
      }
    }
    exports.getSchemaRefs = getSchemaRefs;
  }
});

// node_modules/ajv/dist/compile/validate/index.js
var require_validate = __commonJS({
  "node_modules/ajv/dist/compile/validate/index.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.getData = exports.KeywordCxt = exports.validateFunctionCode = void 0;
    var boolSchema_1 = require_boolSchema();
    var dataType_1 = require_dataType();
    var applicability_1 = require_applicability();
    var dataType_2 = require_dataType();
    var defaults_1 = require_defaults();
    var keyword_1 = require_keyword();
    var subschema_1 = require_subschema();
    var codegen_1 = require_codegen();
    var names_1 = require_names();
    var resolve_1 = require_resolve();
    var util_1 = require_util();
    var errors_1 = require_errors();
    function validateFunctionCode(it) {
      if (isSchemaObj(it)) {
        checkKeywords(it);
        if (schemaCxtHasRules(it)) {
          topSchemaObjCode(it);
          return;
        }
      }
      validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it));
    }
    exports.validateFunctionCode = validateFunctionCode;
    function validateFunction({ gen, validateName, schema, schemaEnv, opts }, body) {
      if (opts.code.es5) {
        gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => {
          gen.code((0, codegen_1._)`"use strict"; ${funcSourceUrl(schema, opts)}`);
          destructureValCxtES5(gen, opts);
          gen.code(body);
        });
      } else {
        gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema, opts)).code(body));
      }
    }
    function destructureValCxt(opts) {
      return (0, codegen_1._)`{${names_1.default.instancePath}="", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._)`, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}}={}`;
    }
    function destructureValCxtES5(gen, opts) {
      gen.if(names_1.default.valCxt, () => {
        gen.var(names_1.default.instancePath, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.instancePath}`);
        gen.var(names_1.default.parentData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentData}`);
        gen.var(names_1.default.parentDataProperty, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentDataProperty}`);
        gen.var(names_1.default.rootData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.rootData}`);
        if (opts.dynamicRef)
          gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`);
      }, () => {
        gen.var(names_1.default.instancePath, (0, codegen_1._)`""`);
        gen.var(names_1.default.parentData, (0, codegen_1._)`undefined`);
        gen.var(names_1.default.parentDataProperty, (0, codegen_1._)`undefined`);
        gen.var(names_1.default.rootData, names_1.default.data);
        if (opts.dynamicRef)
          gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`{}`);
      });
    }
    function topSchemaObjCode(it) {
      const { schema, opts, gen } = it;
      validateFunction(it, () => {
        if (opts.$comment && schema.$comment)
          commentKeyword(it);
        checkNoDefault(it);
        gen.let(names_1.default.vErrors, null);
        gen.let(names_1.default.errors, 0);
        if (opts.unevaluated)
          resetEvaluated(it);
        typeAndKeywords(it);
        returnResults(it);
      });
      return;
    }
    function resetEvaluated(it) {
      const { gen, validateName } = it;
      it.evaluated = gen.const("evaluated", (0, codegen_1._)`${validateName}.evaluated`);
      gen.if((0, codegen_1._)`${it.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._)`${it.evaluated}.props`, (0, codegen_1._)`undefined`));
      gen.if((0, codegen_1._)`${it.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._)`${it.evaluated}.items`, (0, codegen_1._)`undefined`));
    }
    function funcSourceUrl(schema, opts) {
      const schId = typeof schema == "object" && schema[opts.schemaId];
      return schId && (opts.code.source || opts.code.process) ? (0, codegen_1._)`/*# sourceURL=${schId} */` : codegen_1.nil;
    }
    function subschemaCode(it, valid) {
      if (isSchemaObj(it)) {
        checkKeywords(it);
        if (schemaCxtHasRules(it)) {
          subSchemaObjCode(it, valid);
          return;
        }
      }
      (0, boolSchema_1.boolOrEmptySchema)(it, valid);
    }
    function schemaCxtHasRules({ schema, self }) {
      if (typeof schema == "boolean")
        return !schema;
      for (const key in schema)
        if (self.RULES.all[key])
          return true;
      return false;
    }
    function isSchemaObj(it) {
      return typeof it.schema != "boolean";
    }
    function subSchemaObjCode(it, valid) {
      const { schema, gen, opts } = it;
      if (opts.$comment && schema.$comment)
        commentKeyword(it);
      updateContext(it);
      checkAsyncSchema(it);
      const errsCount = gen.const("_errs", names_1.default.errors);
      typeAndKeywords(it, errsCount);
      gen.var(valid, (0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);
    }
    function checkKeywords(it) {
      (0, util_1.checkUnknownRules)(it);
      checkRefsAndKeywords(it);
    }
    function typeAndKeywords(it, errsCount) {
      if (it.opts.jtd)
        return schemaKeywords(it, [], false, errsCount);
      const types = (0, dataType_1.getSchemaTypes)(it.schema);
      const checkedTypes = (0, dataType_1.coerceAndCheckDataType)(it, types);
      schemaKeywords(it, types, !checkedTypes, errsCount);
    }
    function checkRefsAndKeywords(it) {
      const { schema, errSchemaPath, opts, self } = it;
      if (schema.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema, self.RULES)) {
        self.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`);
      }
    }
    function checkNoDefault(it) {
      const { schema, opts } = it;
      if (schema.default !== void 0 && opts.useDefaults && opts.strictSchema) {
        (0, util_1.checkStrictMode)(it, "default is ignored in the schema root");
      }
    }
    function updateContext(it) {
      const schId = it.schema[it.opts.schemaId];
      if (schId)
        it.baseId = (0, resolve_1.resolveUrl)(it.opts.uriResolver, it.baseId, schId);
    }
    function checkAsyncSchema(it) {
      if (it.schema.$async && !it.schemaEnv.$async)
        throw new Error("async schema in sync schema");
    }
    function commentKeyword({ gen, schemaEnv, schema, errSchemaPath, opts }) {
      const msg = schema.$comment;
      if (opts.$comment === true) {
        gen.code((0, codegen_1._)`${names_1.default.self}.logger.log(${msg})`);
      } else if (typeof opts.$comment == "function") {
        const schemaPath = (0, codegen_1.str)`${errSchemaPath}/$comment`;
        const rootName = gen.scopeValue("root", { ref: schemaEnv.root });
        gen.code((0, codegen_1._)`${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`);
      }
    }
    function returnResults(it) {
      const { gen, schemaEnv, validateName, ValidationError, opts } = it;
      if (schemaEnv.$async) {
        gen.if((0, codegen_1._)`${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0, codegen_1._)`new ${ValidationError}(${names_1.default.vErrors})`));
      } else {
        gen.assign((0, codegen_1._)`${validateName}.errors`, names_1.default.vErrors);
        if (opts.unevaluated)
          assignEvaluated(it);
        gen.return((0, codegen_1._)`${names_1.default.errors} === 0`);
      }
    }
    function assignEvaluated({ gen, evaluated, props, items }) {
      if (props instanceof codegen_1.Name)
        gen.assign((0, codegen_1._)`${evaluated}.props`, props);
      if (items instanceof codegen_1.Name)
        gen.assign((0, codegen_1._)`${evaluated}.items`, items);
    }
    function schemaKeywords(it, types, typeErrors, errsCount) {
      const { gen, schema, data, allErrors, opts, self } = it;
      const { RULES } = self;
      if (schema.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema, RULES))) {
        gen.block(() => keywordCode(it, "$ref", RULES.all.$ref.definition));
        return;
      }
      if (!opts.jtd)
        checkStrictTypes(it, types);
      gen.block(() => {
        for (const group of RULES.rules)
          groupKeywords(group);
        groupKeywords(RULES.post);
      });
      function groupKeywords(group) {
        if (!(0, applicability_1.shouldUseGroup)(schema, group))
          return;
        if (group.type) {
          gen.if((0, dataType_2.checkDataType)(group.type, data, opts.strictNumbers));
          iterateKeywords(it, group);
          if (types.length === 1 && types[0] === group.type && typeErrors) {
            gen.else();
            (0, dataType_2.reportTypeError)(it);
          }
          gen.endIf();
        } else {
          iterateKeywords(it, group);
        }
        if (!allErrors)
          gen.if((0, codegen_1._)`${names_1.default.errors} === ${errsCount || 0}`);
      }
    }
    function iterateKeywords(it, group) {
      const { gen, schema, opts: { useDefaults } } = it;
      if (useDefaults)
        (0, defaults_1.assignDefaults)(it, group.type);
      gen.block(() => {
        for (const rule of group.rules) {
          if ((0, applicability_1.shouldUseRule)(schema, rule)) {
            keywordCode(it, rule.keyword, rule.definition, group.type);
          }
        }
      });
    }
    function checkStrictTypes(it, types) {
      if (it.schemaEnv.meta || !it.opts.strictTypes)
        return;
      checkContextTypes(it, types);
      if (!it.opts.allowUnionTypes)
        checkMultipleTypes(it, types);
      checkKeywordTypes(it, it.dataTypes);
    }
    function checkContextTypes(it, types) {
      if (!types.length)
        return;
      if (!it.dataTypes.length) {
        it.dataTypes = types;
        return;
      }
      types.forEach((t) => {
        if (!includesType(it.dataTypes, t)) {
          strictTypesError(it, `type "${t}" not allowed by context "${it.dataTypes.join(",")}"`);
        }
      });
      narrowSchemaTypes(it, types);
    }
    function checkMultipleTypes(it, ts) {
      if (ts.length > 1 && !(ts.length === 2 && ts.includes("null"))) {
        strictTypesError(it, "use allowUnionTypes to allow union type keyword");
      }
    }
    function checkKeywordTypes(it, ts) {
      const rules = it.self.RULES.all;
      for (const keyword in rules) {
        const rule = rules[keyword];
        if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it.schema, rule)) {
          const { type } = rule.definition;
          if (type.length && !type.some((t) => hasApplicableType(ts, t))) {
            strictTypesError(it, `missing type "${type.join(",")}" for keyword "${keyword}"`);
          }
        }
      }
    }
    function hasApplicableType(schTs, kwdT) {
      return schTs.includes(kwdT) || kwdT === "number" && schTs.includes("integer");
    }
    function includesType(ts, t) {
      return ts.includes(t) || t === "integer" && ts.includes("number");
    }
    function narrowSchemaTypes(it, withTypes) {
      const ts = [];
      for (const t of it.dataTypes) {
        if (includesType(withTypes, t))
          ts.push(t);
        else if (withTypes.includes("integer") && t === "number")
          ts.push("integer");
      }
      it.dataTypes = ts;
    }
    function strictTypesError(it, msg) {
      const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;
      msg += ` at "${schemaPath}" (strictTypes)`;
      (0, util_1.checkStrictMode)(it, msg, it.opts.strictTypes);
    }
    var KeywordCxt = class {
      constructor(it, def, keyword) {
        (0, keyword_1.validateKeywordUsage)(it, def, keyword);
        this.gen = it.gen;
        this.allErrors = it.allErrors;
        this.keyword = keyword;
        this.data = it.data;
        this.schema = it.schema[keyword];
        this.$data = def.$data && it.opts.$data && this.schema && this.schema.$data;
        this.schemaValue = (0, util_1.schemaRefOrVal)(it, this.schema, keyword, this.$data);
        this.schemaType = def.schemaType;
        this.parentSchema = it.schema;
        this.params = {};
        this.it = it;
        this.def = def;
        if (this.$data) {
          this.schemaCode = it.gen.const("vSchema", getData(this.$data, it));
        } else {
          this.schemaCode = this.schemaValue;
          if (!(0, keyword_1.validSchemaType)(this.schema, def.schemaType, def.allowUndefined)) {
            throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`);
          }
        }
        if ("code" in def ? def.trackErrors : def.errors !== false) {
          this.errsCount = it.gen.const("_errs", names_1.default.errors);
        }
      }
      result(condition, successAction, failAction) {
        this.failResult((0, codegen_1.not)(condition), successAction, failAction);
      }
      failResult(condition, successAction, failAction) {
        this.gen.if(condition);
        if (failAction)
          failAction();
        else
          this.error();
        if (successAction) {
          this.gen.else();
          successAction();
          if (this.allErrors)
            this.gen.endIf();
        } else {
          if (this.allErrors)
            this.gen.endIf();
          else
            this.gen.else();
        }
      }
      pass(condition, failAction) {
        this.failResult((0, codegen_1.not)(condition), void 0, failAction);
      }
      fail(condition) {
        if (condition === void 0) {
          this.error();
          if (!this.allErrors)
            this.gen.if(false);
          return;
        }
        this.gen.if(condition);
        this.error();
        if (this.allErrors)
          this.gen.endIf();
        else
          this.gen.else();
      }
      fail$data(condition) {
        if (!this.$data)
          return this.fail(condition);
        const { schemaCode } = this;
        this.fail((0, codegen_1._)`${schemaCode} !== undefined && (${(0, codegen_1.or)(this.invalid$data(), condition)})`);
      }
      error(append, errorParams, errorPaths) {
        if (errorParams) {
          this.setParams(errorParams);
          this._error(append, errorPaths);
          this.setParams({});
          return;
        }
        this._error(append, errorPaths);
      }
      _error(append, errorPaths) {
        ;
        (append ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths);
      }
      $dataError() {
        (0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError);
      }
      reset() {
        if (this.errsCount === void 0)
          throw new Error('add "trackErrors" to keyword definition');
        (0, errors_1.resetErrorsCount)(this.gen, this.errsCount);
      }
      ok(cond) {
        if (!this.allErrors)
          this.gen.if(cond);
      }
      setParams(obj, assign) {
        if (assign)
          Object.assign(this.params, obj);
        else
          this.params = obj;
      }
      block$data(valid, codeBlock, $dataValid = codegen_1.nil) {
        this.gen.block(() => {
          this.check$data(valid, $dataValid);
          codeBlock();
        });
      }
      check$data(valid = codegen_1.nil, $dataValid = codegen_1.nil) {
        if (!this.$data)
          return;
        const { gen, schemaCode, schemaType, def } = this;
        gen.if((0, codegen_1.or)((0, codegen_1._)`${schemaCode} === undefined`, $dataValid));
        if (valid !== codegen_1.nil)
          gen.assign(valid, true);
        if (schemaType.length || def.validateSchema) {
          gen.elseIf(this.invalid$data());
          this.$dataError();
          if (valid !== codegen_1.nil)
            gen.assign(valid, false);
        }
        gen.else();
      }
      invalid$data() {
        const { gen, schemaCode, schemaType, def, it } = this;
        return (0, codegen_1.or)(wrong$DataType(), invalid$DataSchema());
        function wrong$DataType() {
          if (schemaType.length) {
            if (!(schemaCode instanceof codegen_1.Name))
              throw new Error("ajv implementation error");
            const st = Array.isArray(schemaType) ? schemaType : [schemaType];
            return (0, codegen_1._)`${(0, dataType_2.checkDataTypes)(st, schemaCode, it.opts.strictNumbers, dataType_2.DataType.Wrong)}`;
          }
          return codegen_1.nil;
        }
        function invalid$DataSchema() {
          if (def.validateSchema) {
            const validateSchemaRef = gen.scopeValue("validate$data", { ref: def.validateSchema });
            return (0, codegen_1._)`!${validateSchemaRef}(${schemaCode})`;
          }
          return codegen_1.nil;
        }
      }
      subschema(appl, valid) {
        const subschema = (0, subschema_1.getSubschema)(this.it, appl);
        (0, subschema_1.extendSubschemaData)(subschema, this.it, appl);
        (0, subschema_1.extendSubschemaMode)(subschema, appl);
        const nextContext = { ...this.it, ...subschema, items: void 0, props: void 0 };
        subschemaCode(nextContext, valid);
        return nextContext;
      }
      mergeEvaluated(schemaCxt, toName) {
        const { it, gen } = this;
        if (!it.opts.unevaluated)
          return;
        if (it.props !== true && schemaCxt.props !== void 0) {
          it.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it.props, toName);
        }
        if (it.items !== true && schemaCxt.items !== void 0) {
          it.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it.items, toName);
        }
      }
      mergeValidEvaluated(schemaCxt, valid) {
        const { it, gen } = this;
        if (it.opts.unevaluated && (it.props !== true || it.items !== true)) {
          gen.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1.Name));
          return true;
        }
      }
    };
    exports.KeywordCxt = KeywordCxt;
    function keywordCode(it, keyword, def, ruleType) {
      const cxt = new KeywordCxt(it, def, keyword);
      if ("code" in def) {
        def.code(cxt, ruleType);
      } else if (cxt.$data && def.validate) {
        (0, keyword_1.funcKeywordCode)(cxt, def);
      } else if ("macro" in def) {
        (0, keyword_1.macroKeywordCode)(cxt, def);
      } else if (def.compile || def.validate) {
        (0, keyword_1.funcKeywordCode)(cxt, def);
      }
    }
    var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
    var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
    function getData($data, { dataLevel, dataNames, dataPathArr }) {
      let jsonPointer;
      let data;
      if ($data === "")
        return names_1.default.rootData;
      if ($data[0] === "/") {
        if (!JSON_POINTER.test($data))
          throw new Error(`Invalid JSON-pointer: ${$data}`);
        jsonPointer = $data;
        data = names_1.default.rootData;
      } else {
        const matches = RELATIVE_JSON_POINTER.exec($data);
        if (!matches)
          throw new Error(`Invalid JSON-pointer: ${$data}`);
        const up = +matches[1];
        jsonPointer = matches[2];
        if (jsonPointer === "#") {
          if (up >= dataLevel)
            throw new Error(errorMsg("property/index", up));
          return dataPathArr[dataLevel - up];
        }
        if (up > dataLevel)
          throw new Error(errorMsg("data", up));
        data = dataNames[dataLevel - up];
        if (!jsonPointer)
          return data;
      }
      let expr = data;
      const segments = jsonPointer.split("/");
      for (const segment of segments) {
        if (segment) {
          data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`;
          expr = (0, codegen_1._)`${expr} && ${data}`;
        }
      }
      return expr;
      function errorMsg(pointerType, up) {
        return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`;
      }
    }
    exports.getData = getData;
  }
});

// node_modules/ajv/dist/runtime/validation_error.js
var require_validation_error = __commonJS({
  "node_modules/ajv/dist/runtime/validation_error.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var ValidationError = class extends Error {
      constructor(errors) {
        super("validation failed");
        this.errors = errors;
        this.ajv = this.validation = true;
      }
    };
    exports.default = ValidationError;
  }
});

// node_modules/ajv/dist/compile/ref_error.js
var require_ref_error = __commonJS({
  "node_modules/ajv/dist/compile/ref_error.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var resolve_1 = require_resolve();
    var MissingRefError = class extends Error {
      constructor(resolver, baseId, ref, msg) {
        super(msg || `can't resolve reference ${ref} from id ${baseId}`);
        this.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref);
        this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef));
      }
    };
    exports.default = MissingRefError;
  }
});

// node_modules/ajv/dist/compile/index.js
var require_compile = __commonJS({
  "node_modules/ajv/dist/compile/index.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0;
    var codegen_1 = require_codegen();
    var validation_error_1 = require_validation_error();
    var names_1 = require_names();
    var resolve_1 = require_resolve();
    var util_1 = require_util();
    var validate_1 = require_validate();
    var SchemaEnv = class {
      constructor(env) {
        var _a;
        this.refs = {};
        this.dynamicAnchors = {};
        let schema;
        if (typeof env.schema == "object")
          schema = env.schema;
        this.schema = env.schema;
        this.schemaId = env.schemaId;
        this.root = env.root || this;
        this.baseId = (_a = env.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || "$id"]);
        this.schemaPath = env.schemaPath;
        this.localRefs = env.localRefs;
        this.meta = env.meta;
        this.$async = schema === null || schema === void 0 ? void 0 : schema.$async;
        this.refs = {};
      }
    };
    exports.SchemaEnv = SchemaEnv;
    function compileSchema(sch) {
      const _sch = getCompilingSchema.call(this, sch);
      if (_sch)
        return _sch;
      const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId);
      const { es5, lines } = this.opts.code;
      const { ownProperties } = this.opts;
      const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties });
      let _ValidationError;
      if (sch.$async) {
        _ValidationError = gen.scopeValue("Error", {
          ref: validation_error_1.default,
          code: (0, codegen_1._)`require("ajv/dist/runtime/validation_error").default`
        });
      }
      const validateName = gen.scopeName("validate");
      sch.validateName = validateName;
      const schemaCxt = {
        gen,
        allErrors: this.opts.allErrors,
        data: names_1.default.data,
        parentData: names_1.default.parentData,
        parentDataProperty: names_1.default.parentDataProperty,
        dataNames: [names_1.default.data],
        dataPathArr: [codegen_1.nil],
        // TODO can its length be used as dataLevel if nil is removed?
        dataLevel: 0,
        dataTypes: [],
        definedProperties: /* @__PURE__ */ new Set(),
        topSchemaRef: gen.scopeValue("schema", this.opts.code.source === true ? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) } : { ref: sch.schema }),
        validateName,
        ValidationError: _ValidationError,
        schema: sch.schema,
        schemaEnv: sch,
        rootId,
        baseId: sch.baseId || rootId,
        schemaPath: codegen_1.nil,
        errSchemaPath: sch.schemaPath || (this.opts.jtd ? "" : "#"),
        errorPath: (0, codegen_1._)`""`,
        opts: this.opts,
        self: this
      };
      let sourceCode;
      try {
        this._compilations.add(sch);
        (0, validate_1.validateFunctionCode)(schemaCxt);
        gen.optimize(this.opts.code.optimize);
        const validateCode = gen.toString();
        sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`;
        if (this.opts.code.process)
          sourceCode = this.opts.code.process(sourceCode, sch);
        const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode);
        const validate = makeValidate(this, this.scope.get());
        this.scope.value(validateName, { ref: validate });
        validate.errors = null;
        validate.schema = sch.schema;
        validate.schemaEnv = sch;
        if (sch.$async)
          validate.$async = true;
        if (this.opts.code.source === true) {
          validate.source = { validateName, validateCode, scopeValues: gen._values };
        }
        if (this.opts.unevaluated) {
          const { props, items } = schemaCxt;
          validate.evaluated = {
            props: props instanceof codegen_1.Name ? void 0 : props,
            items: items instanceof codegen_1.Name ? void 0 : items,
            dynamicProps: props instanceof codegen_1.Name,
            dynamicItems: items instanceof codegen_1.Name
          };
          if (validate.source)
            validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated);
        }
        sch.validate = validate;
        return sch;
      } catch (e) {
        delete sch.validate;
        delete sch.validateName;
        if (sourceCode)
          this.logger.error("Error compiling schema, function code:", sourceCode);
        throw e;
      } finally {
        this._compilations.delete(sch);
      }
    }
    exports.compileSchema = compileSchema;
    function resolveRef(root, baseId, ref) {
      var _a;
      ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);
      const schOrFunc = root.refs[ref];
      if (schOrFunc)
        return schOrFunc;
      let _sch = resolve.call(this, root, ref);
      if (_sch === void 0) {
        const schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref];
        const { schemaId } = this.opts;
        if (schema)
          _sch = new SchemaEnv({ schema, schemaId, root, baseId });
      }
      if (_sch === void 0)
        return;
      return root.refs[ref] = inlineOrCompile.call(this, _sch);
    }
    exports.resolveRef = resolveRef;
    function inlineOrCompile(sch) {
      if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs))
        return sch.schema;
      return sch.validate ? sch : compileSchema.call(this, sch);
    }
    function getCompilingSchema(schEnv) {
      for (const sch of this._compilations) {
        if (sameSchemaEnv(sch, schEnv))
          return sch;
      }
    }
    exports.getCompilingSchema = getCompilingSchema;
    function sameSchemaEnv(s1, s2) {
      return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
    }
    function resolve(root, ref) {
      let sch;
      while (typeof (sch = this.refs[ref]) == "string")
        ref = sch;
      return sch || this.schemas[ref] || resolveSchema.call(this, root, ref);
    }
    function resolveSchema(root, ref) {
      const p = this.opts.uriResolver.parse(ref);
      const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p);
      let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, void 0);
      if (Object.keys(root.schema).length > 0 && refPath === baseId) {
        return getJsonPointer.call(this, p, root);
      }
      const id = (0, resolve_1.normalizeId)(refPath);
      const schOrRef = this.refs[id] || this.schemas[id];
      if (typeof schOrRef == "string") {
        const sch = resolveSchema.call(this, root, schOrRef);
        if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== "object")
          return;
        return getJsonPointer.call(this, p, sch);
      }
      if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== "object")
        return;
      if (!schOrRef.validate)
        compileSchema.call(this, schOrRef);
      if (id === (0, resolve_1.normalizeId)(ref)) {
        const { schema } = schOrRef;
        const { schemaId } = this.opts;
        const schId = schema[schemaId];
        if (schId)
          baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
        return new SchemaEnv({ schema, schemaId, root, baseId });
      }
      return getJsonPointer.call(this, p, schOrRef);
    }
    exports.resolveSchema = resolveSchema;
    var PREVENT_SCOPE_CHANGE = /* @__PURE__ */ new Set([
      "properties",
      "patternProperties",
      "enum",
      "dependencies",
      "definitions"
    ]);
    function getJsonPointer(parsedRef, { baseId, schema, root }) {
      var _a;
      if (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== "/")
        return;
      for (const part of parsedRef.fragment.slice(1).split("/")) {
        if (typeof schema === "boolean")
          return;
        const partSchema = schema[(0, util_1.unescapeFragment)(part)];
        if (partSchema === void 0)
          return;
        schema = partSchema;
        const schId = typeof schema === "object" && schema[this.opts.schemaId];
        if (!PREVENT_SCOPE_CHANGE.has(part) && schId) {
          baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
        }
      }
      let env;
      if (typeof schema != "boolean" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) {
        const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref);
        env = resolveSchema.call(this, root, $ref);
      }
      const { schemaId } = this.opts;
      env = env || new SchemaEnv({ schema, schemaId, root, baseId });
      if (env.schema !== env.root.schema)
        return env;
      return void 0;
    }
  }
});

// node_modules/ajv/dist/refs/data.json
var require_data2 = __commonJS({
  "node_modules/ajv/dist/refs/data.json"(exports, module) {
    module.exports = {
      $id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",
      description: "Meta-schema for $data reference (JSON AnySchema extension proposal)",
      type: "object",
      required: ["$data"],
      properties: {
        $data: {
          type: "string",
          anyOf: [{ format: "relative-json-pointer" }, { format: "json-pointer" }]
        }
      },
      additionalProperties: false
    };
  }
});

// node_modules/fast-uri/lib/scopedChars.js
var require_scopedChars = __commonJS({
  "node_modules/fast-uri/lib/scopedChars.js"(exports, module) {
    "use strict";
    var HEX = {
      0: 0,
      1: 1,
      2: 2,
      3: 3,
      4: 4,
      5: 5,
      6: 6,
      7: 7,
      8: 8,
      9: 9,
      a: 10,
      A: 10,
      b: 11,
      B: 11,
      c: 12,
      C: 12,
      d: 13,
      D: 13,
      e: 14,
      E: 14,
      f: 15,
      F: 15
    };
    module.exports = {
      HEX
    };
  }
});

// node_modules/fast-uri/lib/utils.js
var require_utils = __commonJS({
  "node_modules/fast-uri/lib/utils.js"(exports, module) {
    "use strict";
    var { HEX } = require_scopedChars();
    function normalizeIPv4(host) {
      if (findToken(host, ".") < 3) {
        return { host, isIPV4: false };
      }
      const matches = host.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u) || [];
      const [address] = matches;
      if (address) {
        return { host: stripLeadingZeros(address, "."), isIPV4: true };
      } else {
        return { host, isIPV4: false };
      }
    }
    function stringArrayToHexStripped(input, keepZero = false) {
      let acc = "";
      let strip = true;
      for (const c of input) {
        if (HEX[c] === void 0) return void 0;
        if (c !== "0" && strip === true) strip = false;
        if (!strip) acc += c;
      }
      if (keepZero && acc.length === 0) acc = "0";
      return acc;
    }
    function getIPV6(input) {
      let tokenCount = 0;
      const output = { error: false, address: "", zone: "" };
      const address = [];
      const buffer = [];
      let isZone = false;
      let endipv6Encountered = false;
      let endIpv6 = false;
      function consume() {
        if (buffer.length) {
          if (isZone === false) {
            const hex = stringArrayToHexStripped(buffer);
            if (hex !== void 0) {
              address.push(hex);
            } else {
              output.error = true;
              return false;
            }
          }
          buffer.length = 0;
        }
        return true;
      }
      for (let i = 0; i < input.length; i++) {
        const cursor = input[i];
        if (cursor === "[" || cursor === "]") {
          continue;
        }
        if (cursor === ":") {
          if (endipv6Encountered === true) {
            endIpv6 = true;
          }
          if (!consume()) {
            break;
          }
          tokenCount++;
          address.push(":");
          if (tokenCount > 7) {
            output.error = true;
            break;
          }
          if (i - 1 >= 0 && input[i - 1] === ":") {
            endipv6Encountered = true;
          }
          continue;
        } else if (cursor === "%") {
          if (!consume()) {
            break;
          }
          isZone = true;
        } else {
          buffer.push(cursor);
          continue;
        }
      }
      if (buffer.length) {
        if (isZone) {
          output.zone = buffer.join("");
        } else if (endIpv6) {
          address.push(buffer.join(""));
        } else {
          address.push(stringArrayToHexStripped(buffer));
        }
      }
      output.address = address.join("");
      return output;
    }
    function normalizeIPv6(host, opts = {}) {
      if (findToken(host, ":") < 2) {
        return { host, isIPV6: false };
      }
      const ipv6 = getIPV6(host);
      if (!ipv6.error) {
        let newHost = ipv6.address;
        let escapedHost = ipv6.address;
        if (ipv6.zone) {
          newHost += "%" + ipv6.zone;
          escapedHost += "%25" + ipv6.zone;
        }
        return { host: newHost, escapedHost, isIPV6: true };
      } else {
        return { host, isIPV6: false };
      }
    }
    function stripLeadingZeros(str, token) {
      let out = "";
      let skip = true;
      const l = str.length;
      for (let i = 0; i < l; i++) {
        const c = str[i];
        if (c === "0" && skip) {
          if (i + 1 <= l && str[i + 1] === token || i + 1 === l) {
            out += c;
            skip = false;
          }
        } else {
          if (c === token) {
            skip = true;
          } else {
            skip = false;
          }
          out += c;
        }
      }
      return out;
    }
    function findToken(str, token) {
      let ind = 0;
      for (let i = 0; i < str.length; i++) {
        if (str[i] === token) ind++;
      }
      return ind;
    }
    var RDS1 = /^\.\.?\//u;
    var RDS2 = /^\/\.(?:\/|$)/u;
    var RDS3 = /^\/\.\.(?:\/|$)/u;
    var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/u;
    function removeDotSegments(input) {
      const output = [];
      while (input.length) {
        if (input.match(RDS1)) {
          input = input.replace(RDS1, "");
        } else if (input.match(RDS2)) {
          input = input.replace(RDS2, "/");
        } else if (input.match(RDS3)) {
          input = input.replace(RDS3, "/");
          output.pop();
        } else if (input === "." || input === "..") {
          input = "";
        } else {
          const im = input.match(RDS5);
          if (im) {
            const s = im[0];
            input = input.slice(s.length);
            output.push(s);
          } else {
            throw new Error("Unexpected dot segment condition");
          }
        }
      }
      return output.join("");
    }
    function normalizeComponentEncoding(components, esc) {
      const func = esc !== true ? escape : unescape;
      if (components.scheme !== void 0) {
        components.scheme = func(components.scheme);
      }
      if (components.userinfo !== void 0) {
        components.userinfo = func(components.userinfo);
      }
      if (components.host !== void 0) {
        components.host = func(components.host);
      }
      if (components.path !== void 0) {
        components.path = func(components.path);
      }
      if (components.query !== void 0) {
        components.query = func(components.query);
      }
      if (components.fragment !== void 0) {
        components.fragment = func(components.fragment);
      }
      return components;
    }
    function recomposeAuthority(components, options) {
      const uriTokens = [];
      if (components.userinfo !== void 0) {
        uriTokens.push(components.userinfo);
        uriTokens.push("@");
      }
      if (components.host !== void 0) {
        let host = unescape(components.host);
        const ipV4res = normalizeIPv4(host);
        if (ipV4res.isIPV4) {
          host = ipV4res.host;
        } else {
          const ipV6res = normalizeIPv6(ipV4res.host, { isIPV4: false });
          if (ipV6res.isIPV6 === true) {
            host = `[${ipV6res.escapedHost}]`;
          } else {
            host = components.host;
          }
        }
        uriTokens.push(host);
      }
      if (typeof components.port === "number" || typeof components.port === "string") {
        uriTokens.push(":");
        uriTokens.push(String(components.port));
      }
      return uriTokens.length ? uriTokens.join("") : void 0;
    }
    module.exports = {
      recomposeAuthority,
      normalizeComponentEncoding,
      removeDotSegments,
      normalizeIPv4,
      normalizeIPv6,
      stringArrayToHexStripped
    };
  }
});

// node_modules/fast-uri/lib/schemes.js
var require_schemes = __commonJS({
  "node_modules/fast-uri/lib/schemes.js"(exports, module) {
    "use strict";
    var UUID_REG = /^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu;
    var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
    function isSecure(wsComponents) {
      return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
    }
    function httpParse(components) {
      if (!components.host) {
        components.error = components.error || "HTTP URIs must have a host.";
      }
      return components;
    }
    function httpSerialize(components) {
      const secure = String(components.scheme).toLowerCase() === "https";
      if (components.port === (secure ? 443 : 80) || components.port === "") {
        components.port = void 0;
      }
      if (!components.path) {
        components.path = "/";
      }
      return components;
    }
    function wsParse(wsComponents) {
      wsComponents.secure = isSecure(wsComponents);
      wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : "");
      wsComponents.path = void 0;
      wsComponents.query = void 0;
      return wsComponents;
    }
    function wsSerialize(wsComponents) {
      if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
        wsComponents.port = void 0;
      }
      if (typeof wsComponents.secure === "boolean") {
        wsComponents.scheme = wsComponents.secure ? "wss" : "ws";
        wsComponents.secure = void 0;
      }
      if (wsComponents.resourceName) {
        const [path, query] = wsComponents.resourceName.split("?");
        wsComponents.path = path && path !== "/" ? path : void 0;
        wsComponents.query = query;
        wsComponents.resourceName = void 0;
      }
      wsComponents.fragment = void 0;
      return wsComponents;
    }
    function urnParse(urnComponents, options) {
      if (!urnComponents.path) {
        urnComponents.error = "URN can not be parsed";
        return urnComponents;
      }
      const matches = urnComponents.path.match(URN_REG);
      if (matches) {
        const scheme = options.scheme || urnComponents.scheme || "urn";
        urnComponents.nid = matches[1].toLowerCase();
        urnComponents.nss = matches[2];
        const urnScheme = `${scheme}:${options.nid || urnComponents.nid}`;
        const schemeHandler = SCHEMES[urnScheme];
        urnComponents.path = void 0;
        if (schemeHandler) {
          urnComponents = schemeHandler.parse(urnComponents, options);
        }
      } else {
        urnComponents.error = urnComponents.error || "URN can not be parsed.";
      }
      return urnComponents;
    }
    function urnSerialize(urnComponents, options) {
      const scheme = options.scheme || urnComponents.scheme || "urn";
      const nid = urnComponents.nid.toLowerCase();
      const urnScheme = `${scheme}:${options.nid || nid}`;
      const schemeHandler = SCHEMES[urnScheme];
      if (schemeHandler) {
        urnComponents = schemeHandler.serialize(urnComponents, options);
      }
      const uriComponents = urnComponents;
      const nss = urnComponents.nss;
      uriComponents.path = `${nid || options.nid}:${nss}`;
      options.skipEscape = true;
      return uriComponents;
    }
    function urnuuidParse(urnComponents, options) {
      const uuidComponents = urnComponents;
      uuidComponents.uuid = uuidComponents.nss;
      uuidComponents.nss = void 0;
      if (!options.tolerant && (!uuidComponents.uuid || !UUID_REG.test(uuidComponents.uuid))) {
        uuidComponents.error = uuidComponents.error || "UUID is not valid.";
      }
      return uuidComponents;
    }
    function urnuuidSerialize(uuidComponents) {
      const urnComponents = uuidComponents;
      urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
      return urnComponents;
    }
    var http = {
      scheme: "http",
      domainHost: true,
      parse: httpParse,
      serialize: httpSerialize
    };
    var https = {
      scheme: "https",
      domainHost: http.domainHost,
      parse: httpParse,
      serialize: httpSerialize
    };
    var ws = {
      scheme: "ws",
      domainHost: true,
      parse: wsParse,
      serialize: wsSerialize
    };
    var wss = {
      scheme: "wss",
      domainHost: ws.domainHost,
      parse: ws.parse,
      serialize: ws.serialize
    };
    var urn = {
      scheme: "urn",
      parse: urnParse,
      serialize: urnSerialize,
      skipNormalize: true
    };
    var urnuuid = {
      scheme: "urn:uuid",
      parse: urnuuidParse,
      serialize: urnuuidSerialize,
      skipNormalize: true
    };
    var SCHEMES = {
      http,
      https,
      ws,
      wss,
      urn,
      "urn:uuid": urnuuid
    };
    module.exports = SCHEMES;
  }
});

// node_modules/fast-uri/index.js
var require_fast_uri = __commonJS({
  "node_modules/fast-uri/index.js"(exports, module) {
    "use strict";
    var { normalizeIPv6, normalizeIPv4, removeDotSegments, recomposeAuthority, normalizeComponentEncoding } = require_utils();
    var SCHEMES = require_schemes();
    function normalize(uri, options) {
      if (typeof uri === "string") {
        uri = serialize(parse(uri, options), options);
      } else if (typeof uri === "object") {
        uri = parse(serialize(uri, options), options);
      }
      return uri;
    }
    function resolve(baseURI, relativeURI, options) {
      const schemelessOptions = Object.assign({ scheme: "null" }, options);
      const resolved = resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true);
      return serialize(resolved, { ...schemelessOptions, skipEscape: true });
    }
    function resolveComponents(base, relative, options, skipNormalization) {
      const target = {};
      if (!skipNormalization) {
        base = parse(serialize(base, options), options);
        relative = parse(serialize(relative, options), options);
      }
      options = options || {};
      if (!options.tolerant && relative.scheme) {
        target.scheme = relative.scheme;
        target.userinfo = relative.userinfo;
        target.host = relative.host;
        target.port = relative.port;
        target.path = removeDotSegments(relative.path || "");
        target.query = relative.query;
      } else {
        if (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0) {
          target.userinfo = relative.userinfo;
          target.host = relative.host;
          target.port = relative.port;
          target.path = removeDotSegments(relative.path || "");
          target.query = relative.query;
        } else {
          if (!relative.path) {
            target.path = base.path;
            if (relative.query !== void 0) {
              target.query = relative.query;
            } else {
              target.query = base.query;
            }
          } else {
            if (relative.path.charAt(0) === "/") {
              target.path = removeDotSegments(relative.path);
            } else {
              if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) {
                target.path = "/" + relative.path;
              } else if (!base.path) {
                target.path = relative.path;
              } else {
                target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
              }
              target.path = removeDotSegments(target.path);
            }
            target.query = relative.query;
          }
          target.userinfo = base.userinfo;
          target.host = base.host;
          target.port = base.port;
        }
        target.scheme = base.scheme;
      }
      target.fragment = relative.fragment;
      return target;
    }
    function equal(uriA, uriB, options) {
      if (typeof uriA === "string") {
        uriA = unescape(uriA);
        uriA = serialize(normalizeComponentEncoding(parse(uriA, options), true), { ...options, skipEscape: true });
      } else if (typeof uriA === "object") {
        uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true });
      }
      if (typeof uriB === "string") {
        uriB = unescape(uriB);
        uriB = serialize(normalizeComponentEncoding(parse(uriB, options), true), { ...options, skipEscape: true });
      } else if (typeof uriB === "object") {
        uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true });
      }
      return uriA.toLowerCase() === uriB.toLowerCase();
    }
    function serialize(cmpts, opts) {
      const components = {
        host: cmpts.host,
        scheme: cmpts.scheme,
        userinfo: cmpts.userinfo,
        port: cmpts.port,
        path: cmpts.path,
        query: cmpts.query,
        nid: cmpts.nid,
        nss: cmpts.nss,
        uuid: cmpts.uuid,
        fragment: cmpts.fragment,
        reference: cmpts.reference,
        resourceName: cmpts.resourceName,
        secure: cmpts.secure,
        error: ""
      };
      const options = Object.assign({}, opts);
      const uriTokens = [];
      const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
      if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);
      if (components.path !== void 0) {
        if (!options.skipEscape) {
          components.path = escape(components.path);
          if (components.scheme !== void 0) {
            components.path = components.path.split("%3A").join(":");
          }
        } else {
          components.path = unescape(components.path);
        }
      }
      if (options.reference !== "suffix" && components.scheme) {
        uriTokens.push(components.scheme);
        uriTokens.push(":");
      }
      const authority = recomposeAuthority(components, options);
      if (authority !== void 0) {
        if (options.reference !== "suffix") {
          uriTokens.push("//");
        }
        uriTokens.push(authority);
        if (components.path && components.path.charAt(0) !== "/") {
          uriTokens.push("/");
        }
      }
      if (components.path !== void 0) {
        let s = components.path;
        if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
          s = removeDotSegments(s);
        }
        if (authority === void 0) {
          s = s.replace(/^\/\//u, "/%2F");
        }
        uriTokens.push(s);
      }
      if (components.query !== void 0) {
        uriTokens.push("?");
        uriTokens.push(components.query);
      }
      if (components.fragment !== void 0) {
        uriTokens.push("#");
        uriTokens.push(components.fragment);
      }
      return uriTokens.join("");
    }
    var hexLookUp = Array.from({ length: 127 }, (v, k) => /[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(k)));
    function nonSimpleDomain(value) {
      let code = 0;
      for (let i = 0, len = value.length; i < len; ++i) {
        code = value.charCodeAt(i);
        if (code > 126 || hexLookUp[code]) {
          return true;
        }
      }
      return false;
    }
    var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
    function parse(uri, opts) {
      const options = Object.assign({}, opts);
      const parsed = {
        scheme: void 0,
        userinfo: void 0,
        host: "",
        port: void 0,
        path: "",
        query: void 0,
        fragment: void 0
      };
      const gotEncoding = uri.indexOf("%") !== -1;
      let isIP = false;
      if (options.reference === "suffix") uri = (options.scheme ? options.scheme + ":" : "") + "//" + uri;
      const matches = uri.match(URI_PARSE);
      if (matches) {
        parsed.scheme = matches[1];
        parsed.userinfo = matches[3];
        parsed.host = matches[4];
        parsed.port = parseInt(matches[5], 10);
        parsed.path = matches[6] || "";
        parsed.query = matches[7];
        parsed.fragment = matches[8];
        if (isNaN(parsed.port)) {
          parsed.port = matches[5];
        }
        if (parsed.host) {
          const ipv4result = normalizeIPv4(parsed.host);
          if (ipv4result.isIPV4 === false) {
            const ipv6result = normalizeIPv6(ipv4result.host, { isIPV4: false });
            parsed.host = ipv6result.host.toLowerCase();
            isIP = ipv6result.isIPV6;
          } else {
            parsed.host = ipv4result.host;
            isIP = true;
          }
        }
        if (parsed.scheme === void 0 && parsed.userinfo === void 0 && parsed.host === void 0 && parsed.port === void 0 && !parsed.path && parsed.query === void 0) {
          parsed.reference = "same-document";
        } else if (parsed.scheme === void 0) {
          parsed.reference = "relative";
        } else if (parsed.fragment === void 0) {
          parsed.reference = "absolute";
        } else {
          parsed.reference = "uri";
        }
        if (options.reference && options.reference !== "suffix" && options.reference !== parsed.reference) {
          parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
        }
        const schemeHandler = SCHEMES[(options.scheme || parsed.scheme || "").toLowerCase()];
        if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
          if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
            try {
              parsed.host = URL.domainToASCII(parsed.host.toLowerCase());
            } catch (e) {
              parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
            }
          }
        }
        if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
          if (gotEncoding && parsed.scheme !== void 0) {
            parsed.scheme = unescape(parsed.scheme);
          }
          if (gotEncoding && parsed.userinfo !== void 0) {
            parsed.userinfo = unescape(parsed.userinfo);
          }
          if (gotEncoding && parsed.host !== void 0) {
            parsed.host = unescape(parsed.host);
          }
          if (parsed.path !== void 0 && parsed.path.length) {
            parsed.path = escape(unescape(parsed.path));
          }
          if (parsed.fragment !== void 0 && parsed.fragment.length) {
            parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
          }
        }
        if (schemeHandler && schemeHandler.parse) {
          schemeHandler.parse(parsed, options);
        }
      } else {
        parsed.error = parsed.error || "URI can not be parsed.";
      }
      return parsed;
    }
    var fastUri = {
      SCHEMES,
      normalize,
      resolve,
      resolveComponents,
      equal,
      serialize,
      parse
    };
    module.exports = fastUri;
    module.exports.default = fastUri;
    module.exports.fastUri = fastUri;
  }
});

// node_modules/ajv/dist/runtime/uri.js
var require_uri = __commonJS({
  "node_modules/ajv/dist/runtime/uri.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var uri = require_fast_uri();
    uri.code = 'require("ajv/dist/runtime/uri").default';
    exports.default = uri;
  }
});

// node_modules/ajv/dist/core.js
var require_core = __commonJS({
  "node_modules/ajv/dist/core.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
    var validate_1 = require_validate();
    Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() {
      return validate_1.KeywordCxt;
    } });
    var codegen_1 = require_codegen();
    Object.defineProperty(exports, "_", { enumerable: true, get: function() {
      return codegen_1._;
    } });
    Object.defineProperty(exports, "str", { enumerable: true, get: function() {
      return codegen_1.str;
    } });
    Object.defineProperty(exports, "stringify", { enumerable: true, get: function() {
      return codegen_1.stringify;
    } });
    Object.defineProperty(exports, "nil", { enumerable: true, get: function() {
      return codegen_1.nil;
    } });
    Object.defineProperty(exports, "Name", { enumerable: true, get: function() {
      return codegen_1.Name;
    } });
    Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function() {
      return codegen_1.CodeGen;
    } });
    var validation_error_1 = require_validation_error();
    var ref_error_1 = require_ref_error();
    var rules_1 = require_rules();
    var compile_1 = require_compile();
    var codegen_2 = require_codegen();
    var resolve_1 = require_resolve();
    var dataType_1 = require_dataType();
    var util_1 = require_util();
    var $dataRefSchema = require_data2();
    var uri_1 = require_uri();
    var defaultRegExp = (str, flags) => new RegExp(str, flags);
    defaultRegExp.code = "new RegExp";
    var META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes"];
    var EXT_SCOPE_NAMES = /* @__PURE__ */ new Set([
      "validate",
      "serialize",
      "parse",
      "wrapper",
      "root",
      "schema",
      "keyword",
      "pattern",
      "formats",
      "validate$data",
      "func",
      "obj",
      "Error"
    ]);
    var removedOptions = {
      errorDataPath: "",
      format: "`validateFormats: false` can be used instead.",
      nullable: '"nullable" keyword is supported by default.',
      jsonPointers: "Deprecated jsPropertySyntax can be used instead.",
      extendRefs: "Deprecated ignoreKeywordsWithRef can be used instead.",
      missingRefs: "Pass empty schema with $id that should be ignored to ajv.addSchema.",
      processCode: "Use option `code: {process: (code, schemaEnv: object) => string}`",
      sourceCode: "Use option `code: {source: true}`",
      strictDefaults: "It is default now, see option `strict`.",
      strictKeywords: "It is default now, see option `strict`.",
      uniqueItems: '"uniqueItems" keyword is always validated.',
      unknownFormats: "Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",
      cache: "Map is used as cache, schema object as key.",
      serialize: "Map is used as cache, schema object as key.",
      ajvErrors: "It is default now."
    };
    var deprecatedOptions = {
      ignoreKeywordsWithRef: "",
      jsPropertySyntax: "",
      unicode: '"minLength"/"maxLength" account for unicode characters by default.'
    };
    var MAX_EXPRESSION = 200;
    function requiredOptions(o) {
      var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
      const s = o.strict;
      const _optz = (_a = o.code) === null || _a === void 0 ? void 0 : _a.optimize;
      const optimize = _optz === true || _optz === void 0 ? 1 : _optz || 0;
      const regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp;
      const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default;
      return {
        strictSchema: (_f = (_e = o.strictSchema) !== null && _e !== void 0 ? _e : s) !== null && _f !== void 0 ? _f : true,
        strictNumbers: (_h = (_g = o.strictNumbers) !== null && _g !== void 0 ? _g : s) !== null && _h !== void 0 ? _h : true,
        strictTypes: (_k = (_j = o.strictTypes) !== null && _j !== void 0 ? _j : s) !== null && _k !== void 0 ? _k : "log",
        strictTuples: (_m = (_l = o.strictTuples) !== null && _l !== void 0 ? _l : s) !== null && _m !== void 0 ? _m : "log",
        strictRequired: (_p = (_o = o.strictRequired) !== null && _o !== void 0 ? _o : s) !== null && _p !== void 0 ? _p : false,
        code: o.code ? { ...o.code, optimize, regExp } : { optimize, regExp },
        loopRequired: (_q = o.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION,
        loopEnum: (_r = o.loopEnum) !== null && _r !== void 0 ? _r : MAX_EXPRESSION,
        meta: (_s = o.meta) !== null && _s !== void 0 ? _s : true,
        messages: (_t = o.messages) !== null && _t !== void 0 ? _t : true,
        inlineRefs: (_u = o.inlineRefs) !== null && _u !== void 0 ? _u : true,
        schemaId: (_v = o.schemaId) !== null && _v !== void 0 ? _v : "$id",
        addUsedSchema: (_w = o.addUsedSchema) !== null && _w !== void 0 ? _w : true,
        validateSchema: (_x = o.validateSchema) !== null && _x !== void 0 ? _x : true,
        validateFormats: (_y = o.validateFormats) !== null && _y !== void 0 ? _y : true,
        unicodeRegExp: (_z = o.unicodeRegExp) !== null && _z !== void 0 ? _z : true,
        int32range: (_0 = o.int32range) !== null && _0 !== void 0 ? _0 : true,
        uriResolver
      };
    }
    var Ajv2 = class {
      constructor(opts = {}) {
        this.schemas = {};
        this.refs = {};
        this.formats = {};
        this._compilations = /* @__PURE__ */ new Set();
        this._loading = {};
        this._cache = /* @__PURE__ */ new Map();
        opts = this.opts = { ...opts, ...requiredOptions(opts) };
        const { es5, lines } = this.opts.code;
        this.scope = new codegen_2.ValueScope({ scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines });
        this.logger = getLogger(opts.logger);
        const formatOpt = opts.validateFormats;
        opts.validateFormats = false;
        this.RULES = (0, rules_1.getRules)();
        checkOptions.call(this, removedOptions, opts, "NOT SUPPORTED");
        checkOptions.call(this, deprecatedOptions, opts, "DEPRECATED", "warn");
        this._metaOpts = getMetaSchemaOptions.call(this);
        if (opts.formats)
          addInitialFormats.call(this);
        this._addVocabularies();
        this._addDefaultMetaSchema();
        if (opts.keywords)
          addInitialKeywords.call(this, opts.keywords);
        if (typeof opts.meta == "object")
          this.addMetaSchema(opts.meta);
        addInitialSchemas.call(this);
        opts.validateFormats = formatOpt;
      }
      _addVocabularies() {
        this.addKeyword("$async");
      }
      _addDefaultMetaSchema() {
        const { $data, meta, schemaId } = this.opts;
        let _dataRefSchema = $dataRefSchema;
        if (schemaId === "id") {
          _dataRefSchema = { ...$dataRefSchema };
          _dataRefSchema.id = _dataRefSchema.$id;
          delete _dataRefSchema.$id;
        }
        if (meta && $data)
          this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false);
      }
      defaultMeta() {
        const { meta, schemaId } = this.opts;
        return this.opts.defaultMeta = typeof meta == "object" ? meta[schemaId] || meta : void 0;
      }
      validate(schemaKeyRef, data) {
        let v;
        if (typeof schemaKeyRef == "string") {
          v = this.getSchema(schemaKeyRef);
          if (!v)
            throw new Error(`no schema with key or ref "${schemaKeyRef}"`);
        } else {
          v = this.compile(schemaKeyRef);
        }
        const valid = v(data);
        if (!("$async" in v))
          this.errors = v.errors;
        return valid;
      }
      compile(schema, _meta) {
        const sch = this._addSchema(schema, _meta);
        return sch.validate || this._compileSchemaEnv(sch);
      }
      compileAsync(schema, meta) {
        if (typeof this.opts.loadSchema != "function") {
          throw new Error("options.loadSchema should be a function");
        }
        const { loadSchema } = this.opts;
        return runCompileAsync.call(this, schema, meta);
        async function runCompileAsync(_schema, _meta) {
          await loadMetaSchema.call(this, _schema.$schema);
          const sch = this._addSchema(_schema, _meta);
          return sch.validate || _compileAsync.call(this, sch);
        }
        async function loadMetaSchema($ref) {
          if ($ref && !this.getSchema($ref)) {
            await runCompileAsync.call(this, { $ref }, true);
          }
        }
        async function _compileAsync(sch) {
          try {
            return this._compileSchemaEnv(sch);
          } catch (e) {
            if (!(e instanceof ref_error_1.default))
              throw e;
            checkLoaded.call(this, e);
            await loadMissingSchema.call(this, e.missingSchema);
            return _compileAsync.call(this, sch);
          }
        }
        function checkLoaded({ missingSchema: ref, missingRef }) {
          if (this.refs[ref]) {
            throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`);
          }
        }
        async function loadMissingSchema(ref) {
          const _schema = await _loadSchema.call(this, ref);
          if (!this.refs[ref])
            await loadMetaSchema.call(this, _schema.$schema);
          if (!this.refs[ref])
            this.addSchema(_schema, ref, meta);
        }
        async function _loadSchema(ref) {
          const p = this._loading[ref];
          if (p)
            return p;
          try {
            return await (this._loading[ref] = loadSchema(ref));
          } finally {
            delete this._loading[ref];
          }
        }
      }
      // Adds schema to the instance
      addSchema(schema, key, _meta, _validateSchema = this.opts.validateSchema) {
        if (Array.isArray(schema)) {
          for (const sch of schema)
            this.addSchema(sch, void 0, _meta, _validateSchema);
          return this;
        }
        let id;
        if (typeof schema === "object") {
          const { schemaId } = this.opts;
          id = schema[schemaId];
          if (id !== void 0 && typeof id != "string") {
            throw new Error(`schema ${schemaId} must be string`);
          }
        }
        key = (0, resolve_1.normalizeId)(key || id);
        this._checkUnique(key);
        this.schemas[key] = this._addSchema(schema, _meta, key, _validateSchema, true);
        return this;
      }
      // Add schema that will be used to validate other schemas
      // options in META_IGNORE_OPTIONS are alway set to false
      addMetaSchema(schema, key, _validateSchema = this.opts.validateSchema) {
        this.addSchema(schema, key, true, _validateSchema);
        return this;
      }
      //  Validate schema against its meta-schema
      validateSchema(schema, throwOrLogError) {
        if (typeof schema == "boolean")
          return true;
        let $schema;
        $schema = schema.$schema;
        if ($schema !== void 0 && typeof $schema != "string") {
          throw new Error("$schema must be a string");
        }
        $schema = $schema || this.opts.defaultMeta || this.defaultMeta();
        if (!$schema) {
          this.logger.warn("meta-schema not available");
          this.errors = null;
          return true;
        }
        const valid = this.validate($schema, schema);
        if (!valid && throwOrLogError) {
          const message = "schema is invalid: " + this.errorsText();
          if (this.opts.validateSchema === "log")
            this.logger.error(message);
          else
            throw new Error(message);
        }
        return valid;
      }
      // Get compiled schema by `key` or `ref`.
      // (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id)
      getSchema(keyRef) {
        let sch;
        while (typeof (sch = getSchEnv.call(this, keyRef)) == "string")
          keyRef = sch;
        if (sch === void 0) {
          const { schemaId } = this.opts;
          const root = new compile_1.SchemaEnv({ schema: {}, schemaId });
          sch = compile_1.resolveSchema.call(this, root, keyRef);
          if (!sch)
            return;
          this.refs[keyRef] = sch;
        }
        return sch.validate || this._compileSchemaEnv(sch);
      }
      // Remove cached schema(s).
      // If no parameter is passed all schemas but meta-schemas are removed.
      // If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
      // Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
      removeSchema(schemaKeyRef) {
        if (schemaKeyRef instanceof RegExp) {
          this._removeAllSchemas(this.schemas, schemaKeyRef);
          this._removeAllSchemas(this.refs, schemaKeyRef);
          return this;
        }
        switch (typeof schemaKeyRef) {
          case "undefined":
            this._removeAllSchemas(this.schemas);
            this._removeAllSchemas(this.refs);
            this._cache.clear();
            return this;
          case "string": {
            const sch = getSchEnv.call(this, schemaKeyRef);
            if (typeof sch == "object")
              this._cache.delete(sch.schema);
            delete this.schemas[schemaKeyRef];
            delete this.refs[schemaKeyRef];
            return this;
          }
          case "object": {
            const cacheKey = schemaKeyRef;
            this._cache.delete(cacheKey);
            let id = schemaKeyRef[this.opts.schemaId];
            if (id) {
              id = (0, resolve_1.normalizeId)(id);
              delete this.schemas[id];
              delete this.refs[id];
            }
            return this;
          }
          default:
            throw new Error("ajv.removeSchema: invalid parameter");
        }
      }
      // add "vocabulary" - a collection of keywords
      addVocabulary(definitions) {
        for (const def of definitions)
          this.addKeyword(def);
        return this;
      }
      addKeyword(kwdOrDef, def) {
        let keyword;
        if (typeof kwdOrDef == "string") {
          keyword = kwdOrDef;
          if (typeof def == "object") {
            this.logger.warn("these parameters are deprecated, see docs for addKeyword");
            def.keyword = keyword;
          }
        } else if (typeof kwdOrDef == "object" && def === void 0) {
          def = kwdOrDef;
          keyword = def.keyword;
          if (Array.isArray(keyword) && !keyword.length) {
            throw new Error("addKeywords: keyword must be string or non-empty array");
          }
        } else {
          throw new Error("invalid addKeywords parameters");
        }
        checkKeyword.call(this, keyword, def);
        if (!def) {
          (0, util_1.eachItem)(keyword, (kwd) => addRule.call(this, kwd));
          return this;
        }
        keywordMetaschema.call(this, def);
        const definition = {
          ...def,
          type: (0, dataType_1.getJSONTypes)(def.type),
          schemaType: (0, dataType_1.getJSONTypes)(def.schemaType)
        };
        (0, util_1.eachItem)(keyword, definition.type.length === 0 ? (k) => addRule.call(this, k, definition) : (k) => definition.type.forEach((t) => addRule.call(this, k, definition, t)));
        return this;
      }
      getKeyword(keyword) {
        const rule = this.RULES.all[keyword];
        return typeof rule == "object" ? rule.definition : !!rule;
      }
      // Remove keyword
      removeKeyword(keyword) {
        const { RULES } = this;
        delete RULES.keywords[keyword];
        delete RULES.all[keyword];
        for (const group of RULES.rules) {
          const i = group.rules.findIndex((rule) => rule.keyword === keyword);
          if (i >= 0)
            group.rules.splice(i, 1);
        }
        return this;
      }
      // Add format
      addFormat(name, format) {
        if (typeof format == "string")
          format = new RegExp(format);
        this.formats[name] = format;
        return this;
      }
      errorsText(errors = this.errors, { separator = ", ", dataVar = "data" } = {}) {
        if (!errors || errors.length === 0)
          return "No errors";
        return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text, msg) => text + separator + msg);
      }
      $dataMetaSchema(metaSchema, keywordsJsonPointers) {
        const rules = this.RULES.all;
        metaSchema = JSON.parse(JSON.stringify(metaSchema));
        for (const jsonPointer of keywordsJsonPointers) {
          const segments = jsonPointer.split("/").slice(1);
          let keywords = metaSchema;
          for (const seg of segments)
            keywords = keywords[seg];
          for (const key in rules) {
            const rule = rules[key];
            if (typeof rule != "object")
              continue;
            const { $data } = rule.definition;
            const schema = keywords[key];
            if ($data && schema)
              keywords[key] = schemaOrData(schema);
          }
        }
        return metaSchema;
      }
      _removeAllSchemas(schemas, regex) {
        for (const keyRef in schemas) {
          const sch = schemas[keyRef];
          if (!regex || regex.test(keyRef)) {
            if (typeof sch == "string") {
              delete schemas[keyRef];
            } else if (sch && !sch.meta) {
              this._cache.delete(sch.schema);
              delete schemas[keyRef];
            }
          }
        }
      }
      _addSchema(schema, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) {
        let id;
        const { schemaId } = this.opts;
        if (typeof schema == "object") {
          id = schema[schemaId];
        } else {
          if (this.opts.jtd)
            throw new Error("schema must be object");
          else if (typeof schema != "boolean")
            throw new Error("schema must be object or boolean");
        }
        let sch = this._cache.get(schema);
        if (sch !== void 0)
          return sch;
        baseId = (0, resolve_1.normalizeId)(id || baseId);
        const localRefs = resolve_1.getSchemaRefs.call(this, schema, baseId);
        sch = new compile_1.SchemaEnv({ schema, schemaId, meta, baseId, localRefs });
        this._cache.set(sch.schema, sch);
        if (addSchema && !baseId.startsWith("#")) {
          if (baseId)
            this._checkUnique(baseId);
          this.refs[baseId] = sch;
        }
        if (validateSchema)
          this.validateSchema(schema, true);
        return sch;
      }
      _checkUnique(id) {
        if (this.schemas[id] || this.refs[id]) {
          throw new Error(`schema with key or id "${id}" already exists`);
        }
      }
      _compileSchemaEnv(sch) {
        if (sch.meta)
          this._compileMetaSchema(sch);
        else
          compile_1.compileSchema.call(this, sch);
        if (!sch.validate)
          throw new Error("ajv implementation error");
        return sch.validate;
      }
      _compileMetaSchema(sch) {
        const currentOpts = this.opts;
        this.opts = this._metaOpts;
        try {
          compile_1.compileSchema.call(this, sch);
        } finally {
          this.opts = currentOpts;
        }
      }
    };
    Ajv2.ValidationError = validation_error_1.default;
    Ajv2.MissingRefError = ref_error_1.default;
    exports.default = Ajv2;
    function checkOptions(checkOpts, options, msg, log = "error") {
      for (const key in checkOpts) {
        const opt = key;
        if (opt in options)
          this.logger[log](`${msg}: option ${key}. ${checkOpts[opt]}`);
      }
    }
    function getSchEnv(keyRef) {
      keyRef = (0, resolve_1.normalizeId)(keyRef);
      return this.schemas[keyRef] || this.refs[keyRef];
    }
    function addInitialSchemas() {
      const optsSchemas = this.opts.schemas;
      if (!optsSchemas)
        return;
      if (Array.isArray(optsSchemas))
        this.addSchema(optsSchemas);
      else
        for (const key in optsSchemas)
          this.addSchema(optsSchemas[key], key);
    }
    function addInitialFormats() {
      for (const name in this.opts.formats) {
        const format = this.opts.formats[name];
        if (format)
          this.addFormat(name, format);
      }
    }
    function addInitialKeywords(defs) {
      if (Array.isArray(defs)) {
        this.addVocabulary(defs);
        return;
      }
      this.logger.warn("keywords option as map is deprecated, pass array");
      for (const keyword in defs) {
        const def = defs[keyword];
        if (!def.keyword)
          def.keyword = keyword;
        this.addKeyword(def);
      }
    }
    function getMetaSchemaOptions() {
      const metaOpts = { ...this.opts };
      for (const opt of META_IGNORE_OPTIONS)
        delete metaOpts[opt];
      return metaOpts;
    }
    var noLogs = { log() {
    }, warn() {
    }, error() {
    } };
    function getLogger(logger) {
      if (logger === false)
        return noLogs;
      if (logger === void 0)
        return console;
      if (logger.log && logger.warn && logger.error)
        return logger;
      throw new Error("logger must implement log, warn and error methods");
    }
    var KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i;
    function checkKeyword(keyword, def) {
      const { RULES } = this;
      (0, util_1.eachItem)(keyword, (kwd) => {
        if (RULES.keywords[kwd])
          throw new Error(`Keyword ${kwd} is already defined`);
        if (!KEYWORD_NAME.test(kwd))
          throw new Error(`Keyword ${kwd} has invalid name`);
      });
      if (!def)
        return;
      if (def.$data && !("code" in def || "validate" in def)) {
        throw new Error('$data keyword must have "code" or "validate" function');
      }
    }
    function addRule(keyword, definition, dataType) {
      var _a;
      const post = definition === null || definition === void 0 ? void 0 : definition.post;
      if (dataType && post)
        throw new Error('keyword with "post" flag cannot have "type"');
      const { RULES } = this;
      let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t }) => t === dataType);
      if (!ruleGroup) {
        ruleGroup = { type: dataType, rules: [] };
        RULES.rules.push(ruleGroup);
      }
      RULES.keywords[keyword] = true;
      if (!definition)
        return;
      const rule = {
        keyword,
        definition: {
          ...definition,
          type: (0, dataType_1.getJSONTypes)(definition.type),
          schemaType: (0, dataType_1.getJSONTypes)(definition.schemaType)
        }
      };
      if (definition.before)
        addBeforeRule.call(this, ruleGroup, rule, definition.before);
      else
        ruleGroup.rules.push(rule);
      RULES.all[keyword] = rule;
      (_a = definition.implements) === null || _a === void 0 ? void 0 : _a.forEach((kwd) => this.addKeyword(kwd));
    }
    function addBeforeRule(ruleGroup, rule, before) {
      const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before);
      if (i >= 0) {
        ruleGroup.rules.splice(i, 0, rule);
      } else {
        ruleGroup.rules.push(rule);
        this.logger.warn(`rule ${before} is not defined`);
      }
    }
    function keywordMetaschema(def) {
      let { metaSchema } = def;
      if (metaSchema === void 0)
        return;
      if (def.$data && this.opts.$data)
        metaSchema = schemaOrData(metaSchema);
      def.validateSchema = this.compile(metaSchema, true);
    }
    var $dataRef = {
      $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"
    };
    function schemaOrData(schema) {
      return { anyOf: [schema, $dataRef] };
    }
  }
});

// node_modules/ajv/dist/vocabularies/core/ref.js
var require_ref = __commonJS({
  "node_modules/ajv/dist/vocabularies/core/ref.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.callRef = exports.getValidate = void 0;
    var ref_error_1 = require_ref_error();
    var code_1 = require_code2();
    var codegen_1 = require_codegen();
    var names_1 = require_names();
    var compile_1 = require_compile();
    var util_1 = require_util();
    var def = {
      keyword: "$ref",
      schemaType: "string",
      code(cxt) {
        const { gen, schema: $ref, it } = cxt;
        const { baseId, schemaEnv: env, validateName, opts, self } = it;
        const { root } = env;
        if (($ref === "#" || $ref === "#/") && baseId === root.baseId)
          return callRootRef();
        const schOrEnv = compile_1.resolveRef.call(self, root, baseId, $ref);
        if (schOrEnv === void 0)
          throw new ref_error_1.default(it.opts.uriResolver, baseId, $ref);
        if (schOrEnv instanceof compile_1.SchemaEnv)
          return callValidate(schOrEnv);
        return inlineRefSchema(schOrEnv);
        function callRootRef() {
          if (env === root)
            return callRef(cxt, validateName, env, env.$async);
          const rootName = gen.scopeValue("root", { ref: root });
          return callRef(cxt, (0, codegen_1._)`${rootName}.validate`, root, root.$async);
        }
        function callValidate(sch) {
          const v = getValidate(cxt, sch);
          callRef(cxt, v, sch, sch.$async);
        }
        function inlineRefSchema(sch) {
          const schName = gen.scopeValue("schema", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch });
          const valid = gen.name("valid");
          const schCxt = cxt.subschema({
            schema: sch,
            dataTypes: [],
            schemaPath: codegen_1.nil,
            topSchemaRef: schName,
            errSchemaPath: $ref
          }, valid);
          cxt.mergeEvaluated(schCxt);
          cxt.ok(valid);
        }
      }
    };
    function getValidate(cxt, sch) {
      const { gen } = cxt;
      return sch.validate ? gen.scopeValue("validate", { ref: sch.validate }) : (0, codegen_1._)`${gen.scopeValue("wrapper", { ref: sch })}.validate`;
    }
    exports.getValidate = getValidate;
    function callRef(cxt, v, sch, $async) {
      const { gen, it } = cxt;
      const { allErrors, schemaEnv: env, opts } = it;
      const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil;
      if ($async)
        callAsyncRef();
      else
        callSyncRef();
      function callAsyncRef() {
        if (!env.$async)
          throw new Error("async schema referenced by sync schema");
        const valid = gen.let("valid");
        gen.try(() => {
          gen.code((0, codegen_1._)`await ${(0, code_1.callValidateCode)(cxt, v, passCxt)}`);
          addEvaluatedFrom(v);
          if (!allErrors)
            gen.assign(valid, true);
        }, (e) => {
          gen.if((0, codegen_1._)`!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e));
          addErrorsFrom(e);
          if (!allErrors)
            gen.assign(valid, false);
        });
        cxt.ok(valid);
      }
      function callSyncRef() {
        cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v));
      }
      function addErrorsFrom(source) {
        const errs = (0, codegen_1._)`${source}.errors`;
        gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`);
        gen.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);
      }
      function addEvaluatedFrom(source) {
        var _a;
        if (!it.opts.unevaluated)
          return;
        const schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated;
        if (it.props !== true) {
          if (schEvaluated && !schEvaluated.dynamicProps) {
            if (schEvaluated.props !== void 0) {
              it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props);
            }
          } else {
            const props = gen.var("props", (0, codegen_1._)`${source}.evaluated.props`);
            it.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name);
          }
        }
        if (it.items !== true) {
          if (schEvaluated && !schEvaluated.dynamicItems) {
            if (schEvaluated.items !== void 0) {
              it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items);
            }
          } else {
            const items = gen.var("items", (0, codegen_1._)`${source}.evaluated.items`);
            it.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name);
          }
        }
      }
    }
    exports.callRef = callRef;
    exports.default = def;
  }
});

// node_modules/ajv-draft-04/dist/vocabulary/core.js
var require_core2 = __commonJS({
  "node_modules/ajv-draft-04/dist/vocabulary/core.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var ref_1 = require_ref();
    var core = [
      "$schema",
      "id",
      "$defs",
      { keyword: "$comment" },
      "definitions",
      ref_1.default
    ];
    exports.default = core;
  }
});

// node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumber.js
var require_limitNumber = __commonJS({
  "node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumber.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var core_1 = require_core();
    var codegen_1 = require_codegen();
    var ops = codegen_1.operators;
    var KWDs = {
      maximum: {
        exclusive: "exclusiveMaximum",
        ops: [
          { okStr: "<=", ok: ops.LTE, fail: ops.GT },
          { okStr: "<", ok: ops.LT, fail: ops.GTE }
        ]
      },
      minimum: {
        exclusive: "exclusiveMinimum",
        ops: [
          { okStr: ">=", ok: ops.GTE, fail: ops.LT },
          { okStr: ">", ok: ops.GT, fail: ops.LTE }
        ]
      }
    };
    var error = {
      message: (cxt) => core_1.str`must be ${kwdOp(cxt).okStr} ${cxt.schemaCode}`,
      params: (cxt) => core_1._`{comparison: ${kwdOp(cxt).okStr}, limit: ${cxt.schemaCode}}`
    };
    var def = {
      keyword: Object.keys(KWDs),
      type: "number",
      schemaType: "number",
      $data: true,
      error,
      code(cxt) {
        const { data, schemaCode } = cxt;
        cxt.fail$data(core_1._`${data} ${kwdOp(cxt).fail} ${schemaCode} || isNaN(${data})`);
      }
    };
    function kwdOp(cxt) {
      var _a;
      const keyword = cxt.keyword;
      const opsIdx = ((_a = cxt.parentSchema) === null || _a === void 0 ? void 0 : _a[KWDs[keyword].exclusive]) ? 1 : 0;
      return KWDs[keyword].ops[opsIdx];
    }
    exports.default = def;
  }
});

// node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumberExclusive.js
var require_limitNumberExclusive = __commonJS({
  "node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumberExclusive.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var KWDs = {
      exclusiveMaximum: "maximum",
      exclusiveMinimum: "minimum"
    };
    var def = {
      keyword: Object.keys(KWDs),
      type: "number",
      schemaType: "boolean",
      code({ keyword, parentSchema }) {
        const limitKwd = KWDs[keyword];
        if (parentSchema[limitKwd] === void 0) {
          throw new Error(`${keyword} can only be used with ${limitKwd}`);
        }
      }
    };
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/validation/multipleOf.js
var require_multipleOf = __commonJS({
  "node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var error = {
      message: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`,
      params: ({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}`
    };
    var def = {
      keyword: "multipleOf",
      type: "number",
      schemaType: "number",
      $data: true,
      error,
      code(cxt) {
        const { gen, data, schemaCode, it } = cxt;
        const prec = it.opts.multipleOfPrecision;
        const res = gen.let("res");
        const invalid = prec ? (0, codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` : (0, codegen_1._)`${res} !== parseInt(${res})`;
        cxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`);
      }
    };
    exports.default = def;
  }
});

// node_modules/ajv/dist/runtime/ucs2length.js
var require_ucs2length = __commonJS({
  "node_modules/ajv/dist/runtime/ucs2length.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    function ucs2length(str) {
      const len = str.length;
      let length = 0;
      let pos = 0;
      let value;
      while (pos < len) {
        length++;
        value = str.charCodeAt(pos++);
        if (value >= 55296 && value <= 56319 && pos < len) {
          value = str.charCodeAt(pos);
          if ((value & 64512) === 56320)
            pos++;
        }
      }
      return length;
    }
    exports.default = ucs2length;
    ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default';
  }
});

// node_modules/ajv/dist/vocabularies/validation/limitLength.js
var require_limitLength = __commonJS({
  "node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var ucs2length_1 = require_ucs2length();
    var error = {
      message({ keyword, schemaCode }) {
        const comp = keyword === "maxLength" ? "more" : "fewer";
        return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`;
      },
      params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
    };
    var def = {
      keyword: ["maxLength", "minLength"],
      type: "string",
      schemaType: "number",
      $data: true,
      error,
      code(cxt) {
        const { keyword, data, schemaCode, it } = cxt;
        const op = keyword === "maxLength" ? codegen_1.operators.GT : codegen_1.operators.LT;
        const len = it.opts.unicode === false ? (0, codegen_1._)`${data}.length` : (0, codegen_1._)`${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`;
        cxt.fail$data((0, codegen_1._)`${len} ${op} ${schemaCode}`);
      }
    };
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/validation/pattern.js
var require_pattern = __commonJS({
  "node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var code_1 = require_code2();
    var codegen_1 = require_codegen();
    var error = {
      message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`,
      params: ({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}`
    };
    var def = {
      keyword: "pattern",
      type: "string",
      schemaType: "string",
      $data: true,
      error,
      code(cxt) {
        const { data, $data, schema, schemaCode, it } = cxt;
        const u = it.opts.unicodeRegExp ? "u" : "";
        const regExp = $data ? (0, codegen_1._)`(new RegExp(${schemaCode}, ${u}))` : (0, code_1.usePattern)(cxt, schema);
        cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);
      }
    };
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/validation/limitProperties.js
var require_limitProperties = __commonJS({
  "node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var error = {
      message({ keyword, schemaCode }) {
        const comp = keyword === "maxProperties" ? "more" : "fewer";
        return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`;
      },
      params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
    };
    var def = {
      keyword: ["maxProperties", "minProperties"],
      type: "object",
      schemaType: "number",
      $data: true,
      error,
      code(cxt) {
        const { keyword, data, schemaCode } = cxt;
        const op = keyword === "maxProperties" ? codegen_1.operators.GT : codegen_1.operators.LT;
        cxt.fail$data((0, codegen_1._)`Object.keys(${data}).length ${op} ${schemaCode}`);
      }
    };
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/validation/required.js
var require_required = __commonJS({
  "node_modules/ajv/dist/vocabularies/validation/required.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var code_1 = require_code2();
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var error = {
      message: ({ params: { missingProperty } }) => (0, codegen_1.str)`must have required property '${missingProperty}'`,
      params: ({ params: { missingProperty } }) => (0, codegen_1._)`{missingProperty: ${missingProperty}}`
    };
    var def = {
      keyword: "required",
      type: "object",
      schemaType: "array",
      $data: true,
      error,
      code(cxt) {
        const { gen, schema, schemaCode, data, $data, it } = cxt;
        const { opts } = it;
        if (!$data && schema.length === 0)
          return;
        const useLoop = schema.length >= opts.loopRequired;
        if (it.allErrors)
          allErrorsMode();
        else
          exitOnErrorMode();
        if (opts.strictRequired) {
          const props = cxt.parentSchema.properties;
          const { definedProperties } = cxt.it;
          for (const requiredKey of schema) {
            if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === void 0 && !definedProperties.has(requiredKey)) {
              const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;
              const msg = `required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`;
              (0, util_1.checkStrictMode)(it, msg, it.opts.strictRequired);
            }
          }
        }
        function allErrorsMode() {
          if (useLoop || $data) {
            cxt.block$data(codegen_1.nil, loopAllRequired);
          } else {
            for (const prop of schema) {
              (0, code_1.checkReportMissingProp)(cxt, prop);
            }
          }
        }
        function exitOnErrorMode() {
          const missing = gen.let("missing");
          if (useLoop || $data) {
            const valid = gen.let("valid", true);
            cxt.block$data(valid, () => loopUntilMissing(missing, valid));
            cxt.ok(valid);
          } else {
            gen.if((0, code_1.checkMissingProp)(cxt, schema, missing));
            (0, code_1.reportMissingProp)(cxt, missing);
            gen.else();
          }
        }
        function loopAllRequired() {
          gen.forOf("prop", schemaCode, (prop) => {
            cxt.setParams({ missingProperty: prop });
            gen.if((0, code_1.noPropertyInData)(gen, data, prop, opts.ownProperties), () => cxt.error());
          });
        }
        function loopUntilMissing(missing, valid) {
          cxt.setParams({ missingProperty: missing });
          gen.forOf(missing, schemaCode, () => {
            gen.assign(valid, (0, code_1.propertyInData)(gen, data, missing, opts.ownProperties));
            gen.if((0, codegen_1.not)(valid), () => {
              cxt.error();
              gen.break();
            });
          }, codegen_1.nil);
        }
      }
    };
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/validation/limitItems.js
var require_limitItems = __commonJS({
  "node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var error = {
      message({ keyword, schemaCode }) {
        const comp = keyword === "maxItems" ? "more" : "fewer";
        return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`;
      },
      params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
    };
    var def = {
      keyword: ["maxItems", "minItems"],
      type: "array",
      schemaType: "number",
      $data: true,
      error,
      code(cxt) {
        const { keyword, data, schemaCode } = cxt;
        const op = keyword === "maxItems" ? codegen_1.operators.GT : codegen_1.operators.LT;
        cxt.fail$data((0, codegen_1._)`${data}.length ${op} ${schemaCode}`);
      }
    };
    exports.default = def;
  }
});

// node_modules/ajv/dist/runtime/equal.js
var require_equal = __commonJS({
  "node_modules/ajv/dist/runtime/equal.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var equal = require_fast_deep_equal();
    equal.code = 'require("ajv/dist/runtime/equal").default';
    exports.default = equal;
  }
});

// node_modules/ajv/dist/vocabularies/validation/uniqueItems.js
var require_uniqueItems = __commonJS({
  "node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var dataType_1 = require_dataType();
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var equal_1 = require_equal();
    var error = {
      message: ({ params: { i, j } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j} and ${i} are identical)`,
      params: ({ params: { i, j } }) => (0, codegen_1._)`{i: ${i}, j: ${j}}`
    };
    var def = {
      keyword: "uniqueItems",
      type: "array",
      schemaType: "boolean",
      $data: true,
      error,
      code(cxt) {
        const { gen, data, $data, schema, parentSchema, schemaCode, it } = cxt;
        if (!$data && !schema)
          return;
        const valid = gen.let("valid");
        const itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : [];
        cxt.block$data(valid, validateUniqueItems, (0, codegen_1._)`${schemaCode} === false`);
        cxt.ok(valid);
        function validateUniqueItems() {
          const i = gen.let("i", (0, codegen_1._)`${data}.length`);
          const j = gen.let("j");
          cxt.setParams({ i, j });
          gen.assign(valid, true);
          gen.if((0, codegen_1._)`${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j));
        }
        function canOptimize() {
          return itemTypes.length > 0 && !itemTypes.some((t) => t === "object" || t === "array");
        }
        function loopN(i, j) {
          const item = gen.name("item");
          const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong);
          const indices = gen.const("indices", (0, codegen_1._)`{}`);
          gen.for((0, codegen_1._)`;${i}--;`, () => {
            gen.let(item, (0, codegen_1._)`${data}[${i}]`);
            gen.if(wrongType, (0, codegen_1._)`continue`);
            if (itemTypes.length > 1)
              gen.if((0, codegen_1._)`typeof ${item} == "string"`, (0, codegen_1._)`${item} += "_"`);
            gen.if((0, codegen_1._)`typeof ${indices}[${item}] == "number"`, () => {
              gen.assign(j, (0, codegen_1._)`${indices}[${item}]`);
              cxt.error();
              gen.assign(valid, false).break();
            }).code((0, codegen_1._)`${indices}[${item}] = ${i}`);
          });
        }
        function loopN2(i, j) {
          const eql = (0, util_1.useFunc)(gen, equal_1.default);
          const outer = gen.name("outer");
          gen.label(outer).for((0, codegen_1._)`;${i}--;`, () => gen.for((0, codegen_1._)`${j} = ${i}; ${j}--;`, () => gen.if((0, codegen_1._)`${eql}(${data}[${i}], ${data}[${j}])`, () => {
            cxt.error();
            gen.assign(valid, false).break(outer);
          })));
        }
      }
    };
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/validation/const.js
var require_const = __commonJS({
  "node_modules/ajv/dist/vocabularies/validation/const.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var equal_1 = require_equal();
    var error = {
      message: "must be equal to constant",
      params: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}`
    };
    var def = {
      keyword: "const",
      $data: true,
      error,
      code(cxt) {
        const { gen, data, $data, schemaCode, schema } = cxt;
        if ($data || schema && typeof schema == "object") {
          cxt.fail$data((0, codegen_1._)`!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`);
        } else {
          cxt.fail((0, codegen_1._)`${schema} !== ${data}`);
        }
      }
    };
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/validation/enum.js
var require_enum = __commonJS({
  "node_modules/ajv/dist/vocabularies/validation/enum.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var equal_1 = require_equal();
    var error = {
      message: "must be equal to one of the allowed values",
      params: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}`
    };
    var def = {
      keyword: "enum",
      schemaType: "array",
      $data: true,
      error,
      code(cxt) {
        const { gen, data, $data, schema, schemaCode, it } = cxt;
        if (!$data && schema.length === 0)
          throw new Error("enum must have non-empty array");
        const useLoop = schema.length >= it.opts.loopEnum;
        let eql;
        const getEql = () => eql !== null && eql !== void 0 ? eql : eql = (0, util_1.useFunc)(gen, equal_1.default);
        let valid;
        if (useLoop || $data) {
          valid = gen.let("valid");
          cxt.block$data(valid, loopEnum);
        } else {
          if (!Array.isArray(schema))
            throw new Error("ajv implementation error");
          const vSchema = gen.const("vSchema", schemaCode);
          valid = (0, codegen_1.or)(...schema.map((_x, i) => equalCode(vSchema, i)));
        }
        cxt.pass(valid);
        function loopEnum() {
          gen.assign(valid, false);
          gen.forOf("v", schemaCode, (v) => gen.if((0, codegen_1._)`${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break()));
        }
        function equalCode(vSchema, i) {
          const sch = schema[i];
          return typeof sch === "object" && sch !== null ? (0, codegen_1._)`${getEql()}(${data}, ${vSchema}[${i}])` : (0, codegen_1._)`${data} === ${sch}`;
        }
      }
    };
    exports.default = def;
  }
});

// node_modules/ajv-draft-04/dist/vocabulary/validation/index.js
var require_validation = __commonJS({
  "node_modules/ajv-draft-04/dist/vocabulary/validation/index.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var limitNumber_1 = require_limitNumber();
    var limitNumberExclusive_1 = require_limitNumberExclusive();
    var multipleOf_1 = require_multipleOf();
    var limitLength_1 = require_limitLength();
    var pattern_1 = require_pattern();
    var limitProperties_1 = require_limitProperties();
    var required_1 = require_required();
    var limitItems_1 = require_limitItems();
    var uniqueItems_1 = require_uniqueItems();
    var const_1 = require_const();
    var enum_1 = require_enum();
    var validation = [
      // number
      limitNumber_1.default,
      limitNumberExclusive_1.default,
      multipleOf_1.default,
      // string
      limitLength_1.default,
      pattern_1.default,
      // object
      limitProperties_1.default,
      required_1.default,
      // array
      limitItems_1.default,
      uniqueItems_1.default,
      // any
      { keyword: "type", schemaType: ["string", "array"] },
      { keyword: "nullable", schemaType: "boolean" },
      const_1.default,
      enum_1.default
    ];
    exports.default = validation;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/additionalItems.js
var require_additionalItems = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.validateAdditionalItems = void 0;
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var error = {
      message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
      params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
    };
    var def = {
      keyword: "additionalItems",
      type: "array",
      schemaType: ["boolean", "object"],
      before: "uniqueItems",
      error,
      code(cxt) {
        const { parentSchema, it } = cxt;
        const { items } = parentSchema;
        if (!Array.isArray(items)) {
          (0, util_1.checkStrictMode)(it, '"additionalItems" is ignored when "items" is not an array of schemas');
          return;
        }
        validateAdditionalItems(cxt, items);
      }
    };
    function validateAdditionalItems(cxt, items) {
      const { gen, schema, data, keyword, it } = cxt;
      it.items = true;
      const len = gen.const("len", (0, codegen_1._)`${data}.length`);
      if (schema === false) {
        cxt.setParams({ len: items.length });
        cxt.pass((0, codegen_1._)`${len} <= ${items.length}`);
      } else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
        const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items.length}`);
        gen.if((0, codegen_1.not)(valid), () => validateItems(valid));
        cxt.ok(valid);
      }
      function validateItems(valid) {
        gen.forRange("i", items.length, len, (i) => {
          cxt.subschema({ keyword, dataProp: i, dataPropType: util_1.Type.Num }, valid);
          if (!it.allErrors)
            gen.if((0, codegen_1.not)(valid), () => gen.break());
        });
      }
    }
    exports.validateAdditionalItems = validateAdditionalItems;
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/items.js
var require_items = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/items.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.validateTuple = void 0;
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var code_1 = require_code2();
    var def = {
      keyword: "items",
      type: "array",
      schemaType: ["object", "array", "boolean"],
      before: "uniqueItems",
      code(cxt) {
        const { schema, it } = cxt;
        if (Array.isArray(schema))
          return validateTuple(cxt, "additionalItems", schema);
        it.items = true;
        if ((0, util_1.alwaysValidSchema)(it, schema))
          return;
        cxt.ok((0, code_1.validateArray)(cxt));
      }
    };
    function validateTuple(cxt, extraItems, schArr = cxt.schema) {
      const { gen, parentSchema, data, keyword, it } = cxt;
      checkStrictTuple(parentSchema);
      if (it.opts.unevaluated && schArr.length && it.items !== true) {
        it.items = util_1.mergeEvaluated.items(gen, schArr.length, it.items);
      }
      const valid = gen.name("valid");
      const len = gen.const("len", (0, codegen_1._)`${data}.length`);
      schArr.forEach((sch, i) => {
        if ((0, util_1.alwaysValidSchema)(it, sch))
          return;
        gen.if((0, codegen_1._)`${len} > ${i}`, () => cxt.subschema({
          keyword,
          schemaProp: i,
          dataProp: i
        }, valid));
        cxt.ok(valid);
      });
      function checkStrictTuple(sch) {
        const { opts, errSchemaPath } = it;
        const l = schArr.length;
        const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false);
        if (opts.strictTuples && !fullTuple) {
          const msg = `"${keyword}" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`;
          (0, util_1.checkStrictMode)(it, msg, opts.strictTuples);
        }
      }
    }
    exports.validateTuple = validateTuple;
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/prefixItems.js
var require_prefixItems = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var items_1 = require_items();
    var def = {
      keyword: "prefixItems",
      type: "array",
      schemaType: ["array"],
      before: "uniqueItems",
      code: (cxt) => (0, items_1.validateTuple)(cxt, "items")
    };
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/items2020.js
var require_items2020 = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var code_1 = require_code2();
    var additionalItems_1 = require_additionalItems();
    var error = {
      message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
      params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
    };
    var def = {
      keyword: "items",
      type: "array",
      schemaType: ["object", "boolean"],
      before: "uniqueItems",
      error,
      code(cxt) {
        const { schema, parentSchema, it } = cxt;
        const { prefixItems } = parentSchema;
        it.items = true;
        if ((0, util_1.alwaysValidSchema)(it, schema))
          return;
        if (prefixItems)
          (0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems);
        else
          cxt.ok((0, code_1.validateArray)(cxt));
      }
    };
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/contains.js
var require_contains = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var error = {
      message: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1.str)`must contain at least ${min} valid item(s)` : (0, codegen_1.str)`must contain at least ${min} and no more than ${max} valid item(s)`,
      params: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1._)`{minContains: ${min}}` : (0, codegen_1._)`{minContains: ${min}, maxContains: ${max}}`
    };
    var def = {
      keyword: "contains",
      type: "array",
      schemaType: ["object", "boolean"],
      before: "uniqueItems",
      trackErrors: true,
      error,
      code(cxt) {
        const { gen, schema, parentSchema, data, it } = cxt;
        let min;
        let max;
        const { minContains, maxContains } = parentSchema;
        if (it.opts.next) {
          min = minContains === void 0 ? 1 : minContains;
          max = maxContains;
        } else {
          min = 1;
        }
        const len = gen.const("len", (0, codegen_1._)`${data}.length`);
        cxt.setParams({ min, max });
        if (max === void 0 && min === 0) {
          (0, util_1.checkStrictMode)(it, `"minContains" == 0 without "maxContains": "contains" keyword ignored`);
          return;
        }
        if (max !== void 0 && min > max) {
          (0, util_1.checkStrictMode)(it, `"minContains" > "maxContains" is always invalid`);
          cxt.fail();
          return;
        }
        if ((0, util_1.alwaysValidSchema)(it, schema)) {
          let cond = (0, codegen_1._)`${len} >= ${min}`;
          if (max !== void 0)
            cond = (0, codegen_1._)`${cond} && ${len} <= ${max}`;
          cxt.pass(cond);
          return;
        }
        it.items = true;
        const valid = gen.name("valid");
        if (max === void 0 && min === 1) {
          validateItems(valid, () => gen.if(valid, () => gen.break()));
        } else if (min === 0) {
          gen.let(valid, true);
          if (max !== void 0)
            gen.if((0, codegen_1._)`${data}.length > 0`, validateItemsWithCount);
        } else {
          gen.let(valid, false);
          validateItemsWithCount();
        }
        cxt.result(valid, () => cxt.reset());
        function validateItemsWithCount() {
          const schValid = gen.name("_valid");
          const count = gen.let("count", 0);
          validateItems(schValid, () => gen.if(schValid, () => checkLimits(count)));
        }
        function validateItems(_valid, block) {
          gen.forRange("i", 0, len, (i) => {
            cxt.subschema({
              keyword: "contains",
              dataProp: i,
              dataPropType: util_1.Type.Num,
              compositeRule: true
            }, _valid);
            block();
          });
        }
        function checkLimits(count) {
          gen.code((0, codegen_1._)`${count}++`);
          if (max === void 0) {
            gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true).break());
          } else {
            gen.if((0, codegen_1._)`${count} > ${max}`, () => gen.assign(valid, false).break());
            if (min === 1)
              gen.assign(valid, true);
            else
              gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true));
          }
        }
      }
    };
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/dependencies.js
var require_dependencies = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0;
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var code_1 = require_code2();
    exports.error = {
      message: ({ params: { property, depsCount, deps } }) => {
        const property_ies = depsCount === 1 ? "property" : "properties";
        return (0, codegen_1.str)`must have ${property_ies} ${deps} when property ${property} is present`;
      },
      params: ({ params: { property, depsCount, deps, missingProperty } }) => (0, codegen_1._)`{property: ${property},
    missingProperty: ${missingProperty},
    depsCount: ${depsCount},
    deps: ${deps}}`
      // TODO change to reference
    };
    var def = {
      keyword: "dependencies",
      type: "object",
      schemaType: "object",
      error: exports.error,
      code(cxt) {
        const [propDeps, schDeps] = splitDependencies(cxt);
        validatePropertyDeps(cxt, propDeps);
        validateSchemaDeps(cxt, schDeps);
      }
    };
    function splitDependencies({ schema }) {
      const propertyDeps = {};
      const schemaDeps = {};
      for (const key in schema) {
        if (key === "__proto__")
          continue;
        const deps = Array.isArray(schema[key]) ? propertyDeps : schemaDeps;
        deps[key] = schema[key];
      }
      return [propertyDeps, schemaDeps];
    }
    function validatePropertyDeps(cxt, propertyDeps = cxt.schema) {
      const { gen, data, it } = cxt;
      if (Object.keys(propertyDeps).length === 0)
        return;
      const missing = gen.let("missing");
      for (const prop in propertyDeps) {
        const deps = propertyDeps[prop];
        if (deps.length === 0)
          continue;
        const hasProperty = (0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties);
        cxt.setParams({
          property: prop,
          depsCount: deps.length,
          deps: deps.join(", ")
        });
        if (it.allErrors) {
          gen.if(hasProperty, () => {
            for (const depProp of deps) {
              (0, code_1.checkReportMissingProp)(cxt, depProp);
            }
          });
        } else {
          gen.if((0, codegen_1._)`${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps, missing)})`);
          (0, code_1.reportMissingProp)(cxt, missing);
          gen.else();
        }
      }
    }
    exports.validatePropertyDeps = validatePropertyDeps;
    function validateSchemaDeps(cxt, schemaDeps = cxt.schema) {
      const { gen, data, keyword, it } = cxt;
      const valid = gen.name("valid");
      for (const prop in schemaDeps) {
        if ((0, util_1.alwaysValidSchema)(it, schemaDeps[prop]))
          continue;
        gen.if(
          (0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties),
          () => {
            const schCxt = cxt.subschema({ keyword, schemaProp: prop }, valid);
            cxt.mergeValidEvaluated(schCxt, valid);
          },
          () => gen.var(valid, true)
          // TODO var
        );
        cxt.ok(valid);
      }
    }
    exports.validateSchemaDeps = validateSchemaDeps;
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/propertyNames.js
var require_propertyNames = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var error = {
      message: "property name must be valid",
      params: ({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}`
    };
    var def = {
      keyword: "propertyNames",
      type: "object",
      schemaType: ["object", "boolean"],
      error,
      code(cxt) {
        const { gen, schema, data, it } = cxt;
        if ((0, util_1.alwaysValidSchema)(it, schema))
          return;
        const valid = gen.name("valid");
        gen.forIn("key", data, (key) => {
          cxt.setParams({ propertyName: key });
          cxt.subschema({
            keyword: "propertyNames",
            data: key,
            dataTypes: ["string"],
            propertyName: key,
            compositeRule: true
          }, valid);
          gen.if((0, codegen_1.not)(valid), () => {
            cxt.error(true);
            if (!it.allErrors)
              gen.break();
          });
        });
        cxt.ok(valid);
      }
    };
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js
var require_additionalProperties = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var code_1 = require_code2();
    var codegen_1 = require_codegen();
    var names_1 = require_names();
    var util_1 = require_util();
    var error = {
      message: "must NOT have additional properties",
      params: ({ params }) => (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}`
    };
    var def = {
      keyword: "additionalProperties",
      type: ["object"],
      schemaType: ["boolean", "object"],
      allowUndefined: true,
      trackErrors: true,
      error,
      code(cxt) {
        const { gen, schema, parentSchema, data, errsCount, it } = cxt;
        if (!errsCount)
          throw new Error("ajv implementation error");
        const { allErrors, opts } = it;
        it.props = true;
        if (opts.removeAdditional !== "all" && (0, util_1.alwaysValidSchema)(it, schema))
          return;
        const props = (0, code_1.allSchemaProperties)(parentSchema.properties);
        const patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties);
        checkAdditionalProperties();
        cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);
        function checkAdditionalProperties() {
          gen.forIn("key", data, (key) => {
            if (!props.length && !patProps.length)
              additionalPropertyCode(key);
            else
              gen.if(isAdditional(key), () => additionalPropertyCode(key));
          });
        }
        function isAdditional(key) {
          let definedProp;
          if (props.length > 8) {
            const propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema.properties, "properties");
            definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key);
          } else if (props.length) {
            definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._)`${key} === ${p}`));
          } else {
            definedProp = codegen_1.nil;
          }
          if (patProps.length) {
            definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._)`${(0, code_1.usePattern)(cxt, p)}.test(${key})`));
          }
          return (0, codegen_1.not)(definedProp);
        }
        function deleteAdditional(key) {
          gen.code((0, codegen_1._)`delete ${data}[${key}]`);
        }
        function additionalPropertyCode(key) {
          if (opts.removeAdditional === "all" || opts.removeAdditional && schema === false) {
            deleteAdditional(key);
            return;
          }
          if (schema === false) {
            cxt.setParams({ additionalProperty: key });
            cxt.error();
            if (!allErrors)
              gen.break();
            return;
          }
          if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
            const valid = gen.name("valid");
            if (opts.removeAdditional === "failing") {
              applyAdditionalSchema(key, valid, false);
              gen.if((0, codegen_1.not)(valid), () => {
                cxt.reset();
                deleteAdditional(key);
              });
            } else {
              applyAdditionalSchema(key, valid);
              if (!allErrors)
                gen.if((0, codegen_1.not)(valid), () => gen.break());
            }
          }
        }
        function applyAdditionalSchema(key, valid, errors) {
          const subschema = {
            keyword: "additionalProperties",
            dataProp: key,
            dataPropType: util_1.Type.Str
          };
          if (errors === false) {
            Object.assign(subschema, {
              compositeRule: true,
              createErrors: false,
              allErrors: false
            });
          }
          cxt.subschema(subschema, valid);
        }
      }
    };
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/properties.js
var require_properties = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var validate_1 = require_validate();
    var code_1 = require_code2();
    var util_1 = require_util();
    var additionalProperties_1 = require_additionalProperties();
    var def = {
      keyword: "properties",
      type: "object",
      schemaType: "object",
      code(cxt) {
        const { gen, schema, parentSchema, data, it } = cxt;
        if (it.opts.removeAdditional === "all" && parentSchema.additionalProperties === void 0) {
          additionalProperties_1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1.default, "additionalProperties"));
        }
        const allProps = (0, code_1.allSchemaProperties)(schema);
        for (const prop of allProps) {
          it.definedProperties.add(prop);
        }
        if (it.opts.unevaluated && allProps.length && it.props !== true) {
          it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props);
        }
        const properties = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema[p]));
        if (properties.length === 0)
          return;
        const valid = gen.name("valid");
        for (const prop of properties) {
          if (hasDefault(prop)) {
            applyPropertySchema(prop);
          } else {
            gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties));
            applyPropertySchema(prop);
            if (!it.allErrors)
              gen.else().var(valid, true);
            gen.endIf();
          }
          cxt.it.definedProperties.add(prop);
          cxt.ok(valid);
        }
        function hasDefault(prop) {
          return it.opts.useDefaults && !it.compositeRule && schema[prop].default !== void 0;
        }
        function applyPropertySchema(prop) {
          cxt.subschema({
            keyword: "properties",
            schemaProp: prop,
            dataProp: prop
          }, valid);
        }
      }
    };
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/patternProperties.js
var require_patternProperties = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var code_1 = require_code2();
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var util_2 = require_util();
    var def = {
      keyword: "patternProperties",
      type: "object",
      schemaType: "object",
      code(cxt) {
        const { gen, schema, data, parentSchema, it } = cxt;
        const { opts } = it;
        const patterns = (0, code_1.allSchemaProperties)(schema);
        const alwaysValidPatterns = patterns.filter((p) => (0, util_1.alwaysValidSchema)(it, schema[p]));
        if (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it.opts.unevaluated || it.props === true)) {
          return;
        }
        const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties;
        const valid = gen.name("valid");
        if (it.props !== true && !(it.props instanceof codegen_1.Name)) {
          it.props = (0, util_2.evaluatedPropsToName)(gen, it.props);
        }
        const { props } = it;
        validatePatternProperties();
        function validatePatternProperties() {
          for (const pat of patterns) {
            if (checkProperties)
              checkMatchingProperties(pat);
            if (it.allErrors) {
              validateProperties(pat);
            } else {
              gen.var(valid, true);
              validateProperties(pat);
              gen.if(valid);
            }
          }
        }
        function checkMatchingProperties(pat) {
          for (const prop in checkProperties) {
            if (new RegExp(pat).test(prop)) {
              (0, util_1.checkStrictMode)(it, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`);
            }
          }
        }
        function validateProperties(pat) {
          gen.forIn("key", data, (key) => {
            gen.if((0, codegen_1._)`${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => {
              const alwaysValid = alwaysValidPatterns.includes(pat);
              if (!alwaysValid) {
                cxt.subschema({
                  keyword: "patternProperties",
                  schemaProp: pat,
                  dataProp: key,
                  dataPropType: util_2.Type.Str
                }, valid);
              }
              if (it.opts.unevaluated && props !== true) {
                gen.assign((0, codegen_1._)`${props}[${key}]`, true);
              } else if (!alwaysValid && !it.allErrors) {
                gen.if((0, codegen_1.not)(valid), () => gen.break());
              }
            });
          });
        }
      }
    };
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/not.js
var require_not = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/not.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var util_1 = require_util();
    var def = {
      keyword: "not",
      schemaType: ["object", "boolean"],
      trackErrors: true,
      code(cxt) {
        const { gen, schema, it } = cxt;
        if ((0, util_1.alwaysValidSchema)(it, schema)) {
          cxt.fail();
          return;
        }
        const valid = gen.name("valid");
        cxt.subschema({
          keyword: "not",
          compositeRule: true,
          createErrors: false,
          allErrors: false
        }, valid);
        cxt.failResult(valid, () => cxt.reset(), () => cxt.error());
      },
      error: { message: "must NOT be valid" }
    };
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/anyOf.js
var require_anyOf = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var code_1 = require_code2();
    var def = {
      keyword: "anyOf",
      schemaType: "array",
      trackErrors: true,
      code: code_1.validateUnion,
      error: { message: "must match a schema in anyOf" }
    };
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/oneOf.js
var require_oneOf = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var error = {
      message: "must match exactly one schema in oneOf",
      params: ({ params }) => (0, codegen_1._)`{passingSchemas: ${params.passing}}`
    };
    var def = {
      keyword: "oneOf",
      schemaType: "array",
      trackErrors: true,
      error,
      code(cxt) {
        const { gen, schema, parentSchema, it } = cxt;
        if (!Array.isArray(schema))
          throw new Error("ajv implementation error");
        if (it.opts.discriminator && parentSchema.discriminator)
          return;
        const schArr = schema;
        const valid = gen.let("valid", false);
        const passing = gen.let("passing", null);
        const schValid = gen.name("_valid");
        cxt.setParams({ passing });
        gen.block(validateOneOf);
        cxt.result(valid, () => cxt.reset(), () => cxt.error(true));
        function validateOneOf() {
          schArr.forEach((sch, i) => {
            let schCxt;
            if ((0, util_1.alwaysValidSchema)(it, sch)) {
              gen.var(schValid, true);
            } else {
              schCxt = cxt.subschema({
                keyword: "oneOf",
                schemaProp: i,
                compositeRule: true
              }, schValid);
            }
            if (i > 0) {
              gen.if((0, codegen_1._)`${schValid} && ${valid}`).assign(valid, false).assign(passing, (0, codegen_1._)`[${passing}, ${i}]`).else();
            }
            gen.if(schValid, () => {
              gen.assign(valid, true);
              gen.assign(passing, i);
              if (schCxt)
                cxt.mergeEvaluated(schCxt, codegen_1.Name);
            });
          });
        }
      }
    };
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/allOf.js
var require_allOf = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var util_1 = require_util();
    var def = {
      keyword: "allOf",
      schemaType: "array",
      code(cxt) {
        const { gen, schema, it } = cxt;
        if (!Array.isArray(schema))
          throw new Error("ajv implementation error");
        const valid = gen.name("valid");
        schema.forEach((sch, i) => {
          if ((0, util_1.alwaysValidSchema)(it, sch))
            return;
          const schCxt = cxt.subschema({ keyword: "allOf", schemaProp: i }, valid);
          cxt.ok(valid);
          cxt.mergeEvaluated(schCxt);
        });
      }
    };
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/if.js
var require_if = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/if.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var error = {
      message: ({ params }) => (0, codegen_1.str)`must match "${params.ifClause}" schema`,
      params: ({ params }) => (0, codegen_1._)`{failingKeyword: ${params.ifClause}}`
    };
    var def = {
      keyword: "if",
      schemaType: ["object", "boolean"],
      trackErrors: true,
      error,
      code(cxt) {
        const { gen, parentSchema, it } = cxt;
        if (parentSchema.then === void 0 && parentSchema.else === void 0) {
          (0, util_1.checkStrictMode)(it, '"if" without "then" and "else" is ignored');
        }
        const hasThen = hasSchema(it, "then");
        const hasElse = hasSchema(it, "else");
        if (!hasThen && !hasElse)
          return;
        const valid = gen.let("valid", true);
        const schValid = gen.name("_valid");
        validateIf();
        cxt.reset();
        if (hasThen && hasElse) {
          const ifClause = gen.let("ifClause");
          cxt.setParams({ ifClause });
          gen.if(schValid, validateClause("then", ifClause), validateClause("else", ifClause));
        } else if (hasThen) {
          gen.if(schValid, validateClause("then"));
        } else {
          gen.if((0, codegen_1.not)(schValid), validateClause("else"));
        }
        cxt.pass(valid, () => cxt.error(true));
        function validateIf() {
          const schCxt = cxt.subschema({
            keyword: "if",
            compositeRule: true,
            createErrors: false,
            allErrors: false
          }, schValid);
          cxt.mergeEvaluated(schCxt);
        }
        function validateClause(keyword, ifClause) {
          return () => {
            const schCxt = cxt.subschema({ keyword }, schValid);
            gen.assign(valid, schValid);
            cxt.mergeValidEvaluated(schCxt, valid);
            if (ifClause)
              gen.assign(ifClause, (0, codegen_1._)`${keyword}`);
            else
              cxt.setParams({ ifClause: keyword });
          };
        }
      }
    };
    function hasSchema(it, keyword) {
      const schema = it.schema[keyword];
      return schema !== void 0 && !(0, util_1.alwaysValidSchema)(it, schema);
    }
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/thenElse.js
var require_thenElse = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var util_1 = require_util();
    var def = {
      keyword: ["then", "else"],
      schemaType: ["object", "boolean"],
      code({ keyword, parentSchema, it }) {
        if (parentSchema.if === void 0)
          (0, util_1.checkStrictMode)(it, `"${keyword}" without "if" is ignored`);
      }
    };
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/index.js
var require_applicator = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/index.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var additionalItems_1 = require_additionalItems();
    var prefixItems_1 = require_prefixItems();
    var items_1 = require_items();
    var items2020_1 = require_items2020();
    var contains_1 = require_contains();
    var dependencies_1 = require_dependencies();
    var propertyNames_1 = require_propertyNames();
    var additionalProperties_1 = require_additionalProperties();
    var properties_1 = require_properties();
    var patternProperties_1 = require_patternProperties();
    var not_1 = require_not();
    var anyOf_1 = require_anyOf();
    var oneOf_1 = require_oneOf();
    var allOf_1 = require_allOf();
    var if_1 = require_if();
    var thenElse_1 = require_thenElse();
    function getApplicator(draft2020 = false) {
      const applicator = [
        // any
        not_1.default,
        anyOf_1.default,
        oneOf_1.default,
        allOf_1.default,
        if_1.default,
        thenElse_1.default,
        // object
        propertyNames_1.default,
        additionalProperties_1.default,
        dependencies_1.default,
        properties_1.default,
        patternProperties_1.default
      ];
      if (draft2020)
        applicator.push(prefixItems_1.default, items2020_1.default);
      else
        applicator.push(additionalItems_1.default, items_1.default);
      applicator.push(contains_1.default);
      return applicator;
    }
    exports.default = getApplicator;
  }
});

// node_modules/ajv/dist/vocabularies/format/format.js
var require_format = __commonJS({
  "node_modules/ajv/dist/vocabularies/format/format.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var error = {
      message: ({ schemaCode }) => (0, codegen_1.str)`must match format "${schemaCode}"`,
      params: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}`
    };
    var def = {
      keyword: "format",
      type: ["number", "string"],
      schemaType: "string",
      $data: true,
      error,
      code(cxt, ruleType) {
        const { gen, data, $data, schema, schemaCode, it } = cxt;
        const { opts, errSchemaPath, schemaEnv, self } = it;
        if (!opts.validateFormats)
          return;
        if ($data)
          validate$DataFormat();
        else
          validateFormat();
        function validate$DataFormat() {
          const fmts = gen.scopeValue("formats", {
            ref: self.formats,
            code: opts.code.formats
          });
          const fDef = gen.const("fDef", (0, codegen_1._)`${fmts}[${schemaCode}]`);
          const fType = gen.let("fType");
          const format = gen.let("format");
          gen.if((0, codegen_1._)`typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._)`${fDef}.type || "string"`).assign(format, (0, codegen_1._)`${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._)`"string"`).assign(format, fDef));
          cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt()));
          function unknownFmt() {
            if (opts.strictSchema === false)
              return codegen_1.nil;
            return (0, codegen_1._)`${schemaCode} && !${format}`;
          }
          function invalidFmt() {
            const callFormat = schemaEnv.$async ? (0, codegen_1._)`(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))` : (0, codegen_1._)`${format}(${data})`;
            const validData = (0, codegen_1._)`(typeof ${format} == "function" ? ${callFormat} : ${format}.test(${data}))`;
            return (0, codegen_1._)`${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`;
          }
        }
        function validateFormat() {
          const formatDef = self.formats[schema];
          if (!formatDef) {
            unknownFormat();
            return;
          }
          if (formatDef === true)
            return;
          const [fmtType, format, fmtRef] = getFormat(formatDef);
          if (fmtType === ruleType)
            cxt.pass(validCondition());
          function unknownFormat() {
            if (opts.strictSchema === false) {
              self.logger.warn(unknownMsg());
              return;
            }
            throw new Error(unknownMsg());
            function unknownMsg() {
              return `unknown format "${schema}" ignored in schema at path "${errSchemaPath}"`;
            }
          }
          function getFormat(fmtDef) {
            const code = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema)}` : void 0;
            const fmt = gen.scopeValue("formats", { key: schema, ref: fmtDef, code });
            if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) {
              return [fmtDef.type || "string", fmtDef.validate, (0, codegen_1._)`${fmt}.validate`];
            }
            return ["string", fmtDef, fmt];
          }
          function validCondition() {
            if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) {
              if (!schemaEnv.$async)
                throw new Error("async format in sync schema");
              return (0, codegen_1._)`await ${fmtRef}(${data})`;
            }
            return typeof format == "function" ? (0, codegen_1._)`${fmtRef}(${data})` : (0, codegen_1._)`${fmtRef}.test(${data})`;
          }
        }
      }
    };
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/format/index.js
var require_format2 = __commonJS({
  "node_modules/ajv/dist/vocabularies/format/index.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var format_1 = require_format();
    var format = [format_1.default];
    exports.default = format;
  }
});

// node_modules/ajv-draft-04/dist/vocabulary/draft4.js
var require_draft4 = __commonJS({
  "node_modules/ajv-draft-04/dist/vocabulary/draft4.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var core_1 = require_core2();
    var validation_1 = require_validation();
    var applicator_1 = require_applicator();
    var format_1 = require_format2();
    var metadataVocabulary = ["title", "description", "default"];
    var draft4Vocabularies = [
      core_1.default,
      validation_1.default,
      applicator_1.default(),
      format_1.default,
      metadataVocabulary
    ];
    exports.default = draft4Vocabularies;
  }
});

// node_modules/ajv/dist/vocabularies/discriminator/types.js
var require_types = __commonJS({
  "node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.DiscrError = void 0;
    var DiscrError;
    (function(DiscrError2) {
      DiscrError2["Tag"] = "tag";
      DiscrError2["Mapping"] = "mapping";
    })(DiscrError || (exports.DiscrError = DiscrError = {}));
  }
});

// node_modules/ajv/dist/vocabularies/discriminator/index.js
var require_discriminator = __commonJS({
  "node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var types_1 = require_types();
    var compile_1 = require_compile();
    var ref_error_1 = require_ref_error();
    var util_1 = require_util();
    var error = {
      message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`,
      params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`
    };
    var def = {
      keyword: "discriminator",
      type: "object",
      schemaType: "object",
      error,
      code(cxt) {
        const { gen, data, schema, parentSchema, it } = cxt;
        const { oneOf } = parentSchema;
        if (!it.opts.discriminator) {
          throw new Error("discriminator: requires discriminator option");
        }
        const tagName = schema.propertyName;
        if (typeof tagName != "string")
          throw new Error("discriminator: requires propertyName");
        if (schema.mapping)
          throw new Error("discriminator: mapping is not supported");
        if (!oneOf)
          throw new Error("discriminator: requires oneOf keyword");
        const valid = gen.let("valid", false);
        const tag = gen.const("tag", (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(tagName)}`);
        gen.if((0, codegen_1._)`typeof ${tag} == "string"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName }));
        cxt.ok(valid);
        function validateMapping() {
          const mapping = getMapping();
          gen.if(false);
          for (const tagValue in mapping) {
            gen.elseIf((0, codegen_1._)`${tag} === ${tagValue}`);
            gen.assign(valid, applyTagSchema(mapping[tagValue]));
          }
          gen.else();
          cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName });
          gen.endIf();
        }
        function applyTagSchema(schemaProp) {
          const _valid = gen.name("valid");
          const schCxt = cxt.subschema({ keyword: "oneOf", schemaProp }, _valid);
          cxt.mergeEvaluated(schCxt, codegen_1.Name);
          return _valid;
        }
        function getMapping() {
          var _a;
          const oneOfMapping = {};
          const topRequired = hasRequired(parentSchema);
          let tagRequired = true;
          for (let i = 0; i < oneOf.length; i++) {
            let sch = oneOf[i];
            if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {
              const ref = sch.$ref;
              sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref);
              if (sch instanceof compile_1.SchemaEnv)
                sch = sch.schema;
              if (sch === void 0)
                throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);
            }
            const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];
            if (typeof propSch != "object") {
              throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`);
            }
            tagRequired = tagRequired && (topRequired || hasRequired(sch));
            addMappings(propSch, i);
          }
          if (!tagRequired)
            throw new Error(`discriminator: "${tagName}" must be required`);
          return oneOfMapping;
          function hasRequired({ required }) {
            return Array.isArray(required) && required.includes(tagName);
          }
          function addMappings(sch, i) {
            if (sch.const) {
              addMapping(sch.const, i);
            } else if (sch.enum) {
              for (const tagValue of sch.enum) {
                addMapping(tagValue, i);
              }
            } else {
              throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`);
            }
          }
          function addMapping(tagValue, i) {
            if (typeof tagValue != "string" || tagValue in oneOfMapping) {
              throw new Error(`discriminator: "${tagName}" values must be unique strings`);
            }
            oneOfMapping[tagValue] = i;
          }
        }
      }
    };
    exports.default = def;
  }
});

// node_modules/ajv-draft-04/dist/refs/json-schema-draft-04.json
var require_json_schema_draft_04 = __commonJS({
  "node_modules/ajv-draft-04/dist/refs/json-schema-draft-04.json"(exports, module) {
    module.exports = {
      id: "http://json-schema.org/draft-04/schema#",
      $schema: "http://json-schema.org/draft-04/schema#",
      description: "Core schema meta-schema",
      definitions: {
        schemaArray: {
          type: "array",
          minItems: 1,
          items: { $ref: "#" }
        },
        positiveInteger: {
          type: "integer",
          minimum: 0
        },
        positiveIntegerDefault0: {
          allOf: [{ $ref: "#/definitions/positiveInteger" }, { default: 0 }]
        },
        simpleTypes: {
          enum: ["array", "boolean", "integer", "null", "number", "object", "string"]
        },
        stringArray: {
          type: "array",
          items: { type: "string" },
          minItems: 1,
          uniqueItems: true
        }
      },
      type: "object",
      properties: {
        id: {
          type: "string",
          format: "uri"
        },
        $schema: {
          type: "string",
          format: "uri"
        },
        title: {
          type: "string"
        },
        description: {
          type: "string"
        },
        default: {},
        multipleOf: {
          type: "number",
          minimum: 0,
          exclusiveMinimum: true
        },
        maximum: {
          type: "number"
        },
        exclusiveMaximum: {
          type: "boolean",
          default: false
        },
        minimum: {
          type: "number"
        },
        exclusiveMinimum: {
          type: "boolean",
          default: false
        },
        maxLength: { $ref: "#/definitions/positiveInteger" },
        minLength: { $ref: "#/definitions/positiveIntegerDefault0" },
        pattern: {
          type: "string",
          format: "regex"
        },
        additionalItems: {
          anyOf: [{ type: "boolean" }, { $ref: "#" }],
          default: {}
        },
        items: {
          anyOf: [{ $ref: "#" }, { $ref: "#/definitions/schemaArray" }],
          default: {}
        },
        maxItems: { $ref: "#/definitions/positiveInteger" },
        minItems: { $ref: "#/definitions/positiveIntegerDefault0" },
        uniqueItems: {
          type: "boolean",
          default: false
        },
        maxProperties: { $ref: "#/definitions/positiveInteger" },
        minProperties: { $ref: "#/definitions/positiveIntegerDefault0" },
        required: { $ref: "#/definitions/stringArray" },
        additionalProperties: {
          anyOf: [{ type: "boolean" }, { $ref: "#" }],
          default: {}
        },
        definitions: {
          type: "object",
          additionalProperties: { $ref: "#" },
          default: {}
        },
        properties: {
          type: "object",
          additionalProperties: { $ref: "#" },
          default: {}
        },
        patternProperties: {
          type: "object",
          additionalProperties: { $ref: "#" },
          default: {}
        },
        dependencies: {
          type: "object",
          additionalProperties: {
            anyOf: [{ $ref: "#" }, { $ref: "#/definitions/stringArray" }]
          }
        },
        enum: {
          type: "array",
          minItems: 1,
          uniqueItems: true
        },
        type: {
          anyOf: [
            { $ref: "#/definitions/simpleTypes" },
            {
              type: "array",
              items: { $ref: "#/definitions/simpleTypes" },
              minItems: 1,
              uniqueItems: true
            }
          ]
        },
        allOf: { $ref: "#/definitions/schemaArray" },
        anyOf: { $ref: "#/definitions/schemaArray" },
        oneOf: { $ref: "#/definitions/schemaArray" },
        not: { $ref: "#" }
      },
      dependencies: {
        exclusiveMaximum: ["maximum"],
        exclusiveMinimum: ["minimum"]
      },
      default: {}
    };
  }
});

// node_modules/ajv-draft-04/dist/index.js
var require_dist = __commonJS({
  "node_modules/ajv-draft-04/dist/index.js"(exports, module) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
    var core_1 = require_core();
    var draft4_1 = require_draft4();
    var discriminator_1 = require_discriminator();
    var draft4MetaSchema = require_json_schema_draft_04();
    var META_SUPPORT_DATA = ["/properties"];
    var META_SCHEMA_ID = "http://json-schema.org/draft-04/schema";
    var Ajv2 = class extends core_1.default {
      constructor(opts = {}) {
        super({
          ...opts,
          schemaId: "id"
        });
      }
      _addVocabularies() {
        super._addVocabularies();
        draft4_1.default.forEach((v) => this.addVocabulary(v));
        if (this.opts.discriminator)
          this.addKeyword(discriminator_1.default);
      }
      _addDefaultMetaSchema() {
        super._addDefaultMetaSchema();
        if (!this.opts.meta)
          return;
        const metaSchema = this.opts.$data ? this.$dataMetaSchema(draft4MetaSchema, META_SUPPORT_DATA) : draft4MetaSchema;
        this.addMetaSchema(metaSchema, META_SCHEMA_ID, false);
        this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
      }
      defaultMeta() {
        return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
      }
    };
    module.exports = exports = Ajv2;
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.default = Ajv2;
    var core_2 = require_core();
    Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() {
      return core_2.KeywordCxt;
    } });
    var core_3 = require_core();
    Object.defineProperty(exports, "_", { enumerable: true, get: function() {
      return core_3._;
    } });
    Object.defineProperty(exports, "str", { enumerable: true, get: function() {
      return core_3.str;
    } });
    Object.defineProperty(exports, "stringify", { enumerable: true, get: function() {
      return core_3.stringify;
    } });
    Object.defineProperty(exports, "nil", { enumerable: true, get: function() {
      return core_3.nil;
    } });
    Object.defineProperty(exports, "Name", { enumerable: true, get: function() {
      return core_3.Name;
    } });
    Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function() {
      return core_3.CodeGen;
    } });
  }
});

// packages/abilities/node_modules/ajv-formats/dist/formats.js
var require_formats = __commonJS({
  "packages/abilities/node_modules/ajv-formats/dist/formats.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.formatNames = exports.fastFormats = exports.fullFormats = void 0;
    function fmtDef(validate, compare) {
      return { validate, compare };
    }
    exports.fullFormats = {
      // date: http://tools.ietf.org/html/rfc3339#section-5.6
      date: fmtDef(date, compareDate),
      // date-time: http://tools.ietf.org/html/rfc3339#section-5.6
      time: fmtDef(getTime(true), compareTime),
      "date-time": fmtDef(getDateTime(true), compareDateTime),
      "iso-time": fmtDef(getTime(), compareIsoTime),
      "iso-date-time": fmtDef(getDateTime(), compareIsoDateTime),
      // duration: https://tools.ietf.org/html/rfc3339#appendix-A
      duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,
      uri,
      "uri-reference": /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,
      // uri-template: https://tools.ietf.org/html/rfc6570
      "uri-template": /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,
      // For the source: https://gist.github.com/dperini/729294
      // For test cases: https://mathiasbynens.be/demo/url-regex
      url: /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,
      email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,
      hostname: /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,
      // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
      ipv4: /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,
      ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,
      regex,
      // uuid: http://tools.ietf.org/html/rfc4122
      uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,
      // JSON-pointer: https://tools.ietf.org/html/rfc6901
      // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A
      "json-pointer": /^(?:\/(?:[^~/]|~0|~1)*)*$/,
      "json-pointer-uri-fragment": /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,
      // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00
      "relative-json-pointer": /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,
      // the following formats are used by the openapi specification: https://spec.openapis.org/oas/v3.0.0#data-types
      // byte: https://github.com/miguelmota/is-base64
      byte,
      // signed 32 bit integer
      int32: { type: "number", validate: validateInt32 },
      // signed 64 bit integer
      int64: { type: "number", validate: validateInt64 },
      // C-type float
      float: { type: "number", validate: validateNumber },
      // C-type double
      double: { type: "number", validate: validateNumber },
      // hint to the UI to hide input strings
      password: true,
      // unchecked string payload
      binary: true
    };
    exports.fastFormats = {
      ...exports.fullFormats,
      date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate),
      time: fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareTime),
      "date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareDateTime),
      "iso-time": fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoTime),
      "iso-date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoDateTime),
      // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
      uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,
      "uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
      // email (sources from jsen validator):
      // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363
      // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation')
      email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i
    };
    exports.formatNames = Object.keys(exports.fullFormats);
    function isLeapYear(year) {
      return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
    }
    var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
    var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
    function date(str) {
      const matches = DATE.exec(str);
      if (!matches)
        return false;
      const year = +matches[1];
      const month = +matches[2];
      const day = +matches[3];
      return month >= 1 && month <= 12 && day >= 1 && day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month]);
    }
    function compareDate(d1, d2) {
      if (!(d1 && d2))
        return void 0;
      if (d1 > d2)
        return 1;
      if (d1 < d2)
        return -1;
      return 0;
    }
    var TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
    function getTime(strictTimeZone) {
      return function time(str) {
        const matches = TIME.exec(str);
        if (!matches)
          return false;
        const hr = +matches[1];
        const min = +matches[2];
        const sec = +matches[3];
        const tz = matches[4];
        const tzSign = matches[5] === "-" ? -1 : 1;
        const tzH = +(matches[6] || 0);
        const tzM = +(matches[7] || 0);
        if (tzH > 23 || tzM > 59 || strictTimeZone && !tz)
          return false;
        if (hr <= 23 && min <= 59 && sec < 60)
          return true;
        const utcMin = min - tzM * tzSign;
        const utcHr = hr - tzH * tzSign - (utcMin < 0 ? 1 : 0);
        return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61;
      };
    }
    function compareTime(s1, s2) {
      if (!(s1 && s2))
        return void 0;
      const t1 = (/* @__PURE__ */ new Date("2020-01-01T" + s1)).valueOf();
      const t2 = (/* @__PURE__ */ new Date("2020-01-01T" + s2)).valueOf();
      if (!(t1 && t2))
        return void 0;
      return t1 - t2;
    }
    function compareIsoTime(t1, t2) {
      if (!(t1 && t2))
        return void 0;
      const a1 = TIME.exec(t1);
      const a2 = TIME.exec(t2);
      if (!(a1 && a2))
        return void 0;
      t1 = a1[1] + a1[2] + a1[3];
      t2 = a2[1] + a2[2] + a2[3];
      if (t1 > t2)
        return 1;
      if (t1 < t2)
        return -1;
      return 0;
    }
    var DATE_TIME_SEPARATOR = /t|\s/i;
    function getDateTime(strictTimeZone) {
      const time = getTime(strictTimeZone);
      return function date_time(str) {
        const dateTime = str.split(DATE_TIME_SEPARATOR);
        return dateTime.length === 2 && date(dateTime[0]) && time(dateTime[1]);
      };
    }
    function compareDateTime(dt1, dt2) {
      if (!(dt1 && dt2))
        return void 0;
      const d1 = new Date(dt1).valueOf();
      const d2 = new Date(dt2).valueOf();
      if (!(d1 && d2))
        return void 0;
      return d1 - d2;
    }
    function compareIsoDateTime(dt1, dt2) {
      if (!(dt1 && dt2))
        return void 0;
      const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR);
      const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR);
      const res = compareDate(d1, d2);
      if (res === void 0)
        return void 0;
      return res || compareTime(t1, t2);
    }
    var NOT_URI_FRAGMENT = /\/|:/;
    var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
    function uri(str) {
      return NOT_URI_FRAGMENT.test(str) && URI.test(str);
    }
    var BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;
    function byte(str) {
      BYTE.lastIndex = 0;
      return BYTE.test(str);
    }
    var MIN_INT32 = -(2 ** 31);
    var MAX_INT32 = 2 ** 31 - 1;
    function validateInt32(value) {
      return Number.isInteger(value) && value <= MAX_INT32 && value >= MIN_INT32;
    }
    function validateInt64(value) {
      return Number.isInteger(value);
    }
    function validateNumber() {
      return true;
    }
    var Z_ANCHOR = /[^\\]\\Z/;
    function regex(str) {
      if (Z_ANCHOR.test(str))
        return false;
      try {
        new RegExp(str);
        return true;
      } catch (e) {
        return false;
      }
    }
  }
});

// node_modules/ajv/dist/vocabularies/core/id.js
var require_id = __commonJS({
  "node_modules/ajv/dist/vocabularies/core/id.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var def = {
      keyword: "id",
      code() {
        throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID');
      }
    };
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/core/index.js
var require_core3 = __commonJS({
  "node_modules/ajv/dist/vocabularies/core/index.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var id_1 = require_id();
    var ref_1 = require_ref();
    var core = [
      "$schema",
      "$id",
      "$defs",
      "$vocabulary",
      { keyword: "$comment" },
      "definitions",
      id_1.default,
      ref_1.default
    ];
    exports.default = core;
  }
});

// node_modules/ajv/dist/vocabularies/validation/limitNumber.js
var require_limitNumber2 = __commonJS({
  "node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var ops = codegen_1.operators;
    var KWDs = {
      maximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT },
      minimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT },
      exclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE },
      exclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE }
    };
    var error = {
      message: ({ keyword, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword].okStr} ${schemaCode}`,
      params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`
    };
    var def = {
      keyword: Object.keys(KWDs),
      type: "number",
      schemaType: "number",
      $data: true,
      error,
      code(cxt) {
        const { keyword, data, schemaCode } = cxt;
        cxt.fail$data((0, codegen_1._)`${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`);
      }
    };
    exports.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/validation/index.js
var require_validation2 = __commonJS({
  "node_modules/ajv/dist/vocabularies/validation/index.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var limitNumber_1 = require_limitNumber2();
    var multipleOf_1 = require_multipleOf();
    var limitLength_1 = require_limitLength();
    var pattern_1 = require_pattern();
    var limitProperties_1 = require_limitProperties();
    var required_1 = require_required();
    var limitItems_1 = require_limitItems();
    var uniqueItems_1 = require_uniqueItems();
    var const_1 = require_const();
    var enum_1 = require_enum();
    var validation = [
      // number
      limitNumber_1.default,
      multipleOf_1.default,
      // string
      limitLength_1.default,
      pattern_1.default,
      // object
      limitProperties_1.default,
      required_1.default,
      // array
      limitItems_1.default,
      uniqueItems_1.default,
      // any
      { keyword: "type", schemaType: ["string", "array"] },
      { keyword: "nullable", schemaType: "boolean" },
      const_1.default,
      enum_1.default
    ];
    exports.default = validation;
  }
});

// node_modules/ajv/dist/vocabularies/metadata.js
var require_metadata = __commonJS({
  "node_modules/ajv/dist/vocabularies/metadata.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.contentVocabulary = exports.metadataVocabulary = void 0;
    exports.metadataVocabulary = [
      "title",
      "description",
      "default",
      "deprecated",
      "readOnly",
      "writeOnly",
      "examples"
    ];
    exports.contentVocabulary = [
      "contentMediaType",
      "contentEncoding",
      "contentSchema"
    ];
  }
});

// node_modules/ajv/dist/vocabularies/draft7.js
var require_draft7 = __commonJS({
  "node_modules/ajv/dist/vocabularies/draft7.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var core_1 = require_core3();
    var validation_1 = require_validation2();
    var applicator_1 = require_applicator();
    var format_1 = require_format2();
    var metadata_1 = require_metadata();
    var draft7Vocabularies = [
      core_1.default,
      validation_1.default,
      (0, applicator_1.default)(),
      format_1.default,
      metadata_1.metadataVocabulary,
      metadata_1.contentVocabulary
    ];
    exports.default = draft7Vocabularies;
  }
});

// node_modules/ajv/dist/refs/json-schema-draft-07.json
var require_json_schema_draft_07 = __commonJS({
  "node_modules/ajv/dist/refs/json-schema-draft-07.json"(exports, module) {
    module.exports = {
      $schema: "http://json-schema.org/draft-07/schema#",
      $id: "http://json-schema.org/draft-07/schema#",
      title: "Core schema meta-schema",
      definitions: {
        schemaArray: {
          type: "array",
          minItems: 1,
          items: { $ref: "#" }
        },
        nonNegativeInteger: {
          type: "integer",
          minimum: 0
        },
        nonNegativeIntegerDefault0: {
          allOf: [{ $ref: "#/definitions/nonNegativeInteger" }, { default: 0 }]
        },
        simpleTypes: {
          enum: ["array", "boolean", "integer", "null", "number", "object", "string"]
        },
        stringArray: {
          type: "array",
          items: { type: "string" },
          uniqueItems: true,
          default: []
        }
      },
      type: ["object", "boolean"],
      properties: {
        $id: {
          type: "string",
          format: "uri-reference"
        },
        $schema: {
          type: "string",
          format: "uri"
        },
        $ref: {
          type: "string",
          format: "uri-reference"
        },
        $comment: {
          type: "string"
        },
        title: {
          type: "string"
        },
        description: {
          type: "string"
        },
        default: true,
        readOnly: {
          type: "boolean",
          default: false
        },
        examples: {
          type: "array",
          items: true
        },
        multipleOf: {
          type: "number",
          exclusiveMinimum: 0
        },
        maximum: {
          type: "number"
        },
        exclusiveMaximum: {
          type: "number"
        },
        minimum: {
          type: "number"
        },
        exclusiveMinimum: {
          type: "number"
        },
        maxLength: { $ref: "#/definitions/nonNegativeInteger" },
        minLength: { $ref: "#/definitions/nonNegativeIntegerDefault0" },
        pattern: {
          type: "string",
          format: "regex"
        },
        additionalItems: { $ref: "#" },
        items: {
          anyOf: [{ $ref: "#" }, { $ref: "#/definitions/schemaArray" }],
          default: true
        },
        maxItems: { $ref: "#/definitions/nonNegativeInteger" },
        minItems: { $ref: "#/definitions/nonNegativeIntegerDefault0" },
        uniqueItems: {
          type: "boolean",
          default: false
        },
        contains: { $ref: "#" },
        maxProperties: { $ref: "#/definitions/nonNegativeInteger" },
        minProperties: { $ref: "#/definitions/nonNegativeIntegerDefault0" },
        required: { $ref: "#/definitions/stringArray" },
        additionalProperties: { $ref: "#" },
        definitions: {
          type: "object",
          additionalProperties: { $ref: "#" },
          default: {}
        },
        properties: {
          type: "object",
          additionalProperties: { $ref: "#" },
          default: {}
        },
        patternProperties: {
          type: "object",
          additionalProperties: { $ref: "#" },
          propertyNames: { format: "regex" },
          default: {}
        },
        dependencies: {
          type: "object",
          additionalProperties: {
            anyOf: [{ $ref: "#" }, { $ref: "#/definitions/stringArray" }]
          }
        },
        propertyNames: { $ref: "#" },
        const: true,
        enum: {
          type: "array",
          items: true,
          minItems: 1,
          uniqueItems: true
        },
        type: {
          anyOf: [
            { $ref: "#/definitions/simpleTypes" },
            {
              type: "array",
              items: { $ref: "#/definitions/simpleTypes" },
              minItems: 1,
              uniqueItems: true
            }
          ]
        },
        format: { type: "string" },
        contentMediaType: { type: "string" },
        contentEncoding: { type: "string" },
        if: { $ref: "#" },
        then: { $ref: "#" },
        else: { $ref: "#" },
        allOf: { $ref: "#/definitions/schemaArray" },
        anyOf: { $ref: "#/definitions/schemaArray" },
        oneOf: { $ref: "#/definitions/schemaArray" },
        not: { $ref: "#" }
      },
      default: true
    };
  }
});

// node_modules/ajv/dist/ajv.js
var require_ajv = __commonJS({
  "node_modules/ajv/dist/ajv.js"(exports, module) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0;
    var core_1 = require_core();
    var draft7_1 = require_draft7();
    var discriminator_1 = require_discriminator();
    var draft7MetaSchema = require_json_schema_draft_07();
    var META_SUPPORT_DATA = ["/properties"];
    var META_SCHEMA_ID = "http://json-schema.org/draft-07/schema";
    var Ajv2 = class extends core_1.default {
      _addVocabularies() {
        super._addVocabularies();
        draft7_1.default.forEach((v) => this.addVocabulary(v));
        if (this.opts.discriminator)
          this.addKeyword(discriminator_1.default);
      }
      _addDefaultMetaSchema() {
        super._addDefaultMetaSchema();
        if (!this.opts.meta)
          return;
        const metaSchema = this.opts.$data ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA) : draft7MetaSchema;
        this.addMetaSchema(metaSchema, META_SCHEMA_ID, false);
        this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
      }
      defaultMeta() {
        return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
      }
    };
    exports.Ajv = Ajv2;
    module.exports = exports = Ajv2;
    module.exports.Ajv = Ajv2;
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.default = Ajv2;
    var validate_1 = require_validate();
    Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() {
      return validate_1.KeywordCxt;
    } });
    var codegen_1 = require_codegen();
    Object.defineProperty(exports, "_", { enumerable: true, get: function() {
      return codegen_1._;
    } });
    Object.defineProperty(exports, "str", { enumerable: true, get: function() {
      return codegen_1.str;
    } });
    Object.defineProperty(exports, "stringify", { enumerable: true, get: function() {
      return codegen_1.stringify;
    } });
    Object.defineProperty(exports, "nil", { enumerable: true, get: function() {
      return codegen_1.nil;
    } });
    Object.defineProperty(exports, "Name", { enumerable: true, get: function() {
      return codegen_1.Name;
    } });
    Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function() {
      return codegen_1.CodeGen;
    } });
    var validation_error_1 = require_validation_error();
    Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function() {
      return validation_error_1.default;
    } });
    var ref_error_1 = require_ref_error();
    Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function() {
      return ref_error_1.default;
    } });
  }
});

// packages/abilities/node_modules/ajv-formats/dist/limit.js
var require_limit = __commonJS({
  "packages/abilities/node_modules/ajv-formats/dist/limit.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.formatLimitDefinition = void 0;
    var ajv_1 = require_ajv();
    var codegen_1 = require_codegen();
    var ops = codegen_1.operators;
    var KWDs = {
      formatMaximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT },
      formatMinimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT },
      formatExclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE },
      formatExclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE }
    };
    var error = {
      message: ({ keyword, schemaCode }) => (0, codegen_1.str)`should be ${KWDs[keyword].okStr} ${schemaCode}`,
      params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`
    };
    exports.formatLimitDefinition = {
      keyword: Object.keys(KWDs),
      type: "string",
      schemaType: "string",
      $data: true,
      error,
      code(cxt) {
        const { gen, data, schemaCode, keyword, it } = cxt;
        const { opts, self } = it;
        if (!opts.validateFormats)
          return;
        const fCxt = new ajv_1.KeywordCxt(it, self.RULES.all.format.definition, "format");
        if (fCxt.$data)
          validate$DataFormat();
        else
          validateFormat();
        function validate$DataFormat() {
          const fmts = gen.scopeValue("formats", {
            ref: self.formats,
            code: opts.code.formats
          });
          const fmt = gen.const("fmt", (0, codegen_1._)`${fmts}[${fCxt.schemaCode}]`);
          cxt.fail$data((0, codegen_1.or)((0, codegen_1._)`typeof ${fmt} != "object"`, (0, codegen_1._)`${fmt} instanceof RegExp`, (0, codegen_1._)`typeof ${fmt}.compare != "function"`, compareCode(fmt)));
        }
        function validateFormat() {
          const format = fCxt.schema;
          const fmtDef = self.formats[format];
          if (!fmtDef || fmtDef === true)
            return;
          if (typeof fmtDef != "object" || fmtDef instanceof RegExp || typeof fmtDef.compare != "function") {
            throw new Error(`"${keyword}": format "${format}" does not define "compare" function`);
          }
          const fmt = gen.scopeValue("formats", {
            key: format,
            ref: fmtDef,
            code: opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(format)}` : void 0
          });
          cxt.fail$data(compareCode(fmt));
        }
        function compareCode(fmt) {
          return (0, codegen_1._)`${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword].fail} 0`;
        }
      },
      dependencies: ["format"]
    };
    var formatLimitPlugin = (ajv2) => {
      ajv2.addKeyword(exports.formatLimitDefinition);
      return ajv2;
    };
    exports.default = formatLimitPlugin;
  }
});

// packages/abilities/node_modules/ajv-formats/dist/index.js
var require_dist2 = __commonJS({
  "packages/abilities/node_modules/ajv-formats/dist/index.js"(exports, module) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var formats_1 = require_formats();
    var limit_1 = require_limit();
    var codegen_1 = require_codegen();
    var fullName = new codegen_1.Name("fullFormats");
    var fastName = new codegen_1.Name("fastFormats");
    var formatsPlugin = (ajv2, opts = { keywords: true }) => {
      if (Array.isArray(opts)) {
        addFormats2(ajv2, opts, formats_1.fullFormats, fullName);
        return ajv2;
      }
      const [formats, exportName] = opts.mode === "fast" ? [formats_1.fastFormats, fastName] : [formats_1.fullFormats, fullName];
      const list = opts.formats || formats_1.formatNames;
      addFormats2(ajv2, list, formats, exportName);
      if (opts.keywords)
        (0, limit_1.default)(ajv2);
      return ajv2;
    };
    formatsPlugin.get = (name, mode = "full") => {
      const formats = mode === "fast" ? formats_1.fastFormats : formats_1.fullFormats;
      const f = formats[name];
      if (!f)
        throw new Error(`Unknown format "${name}"`);
      return f;
    };
    function addFormats2(ajv2, list, fs, exportName) {
      var _a;
      var _b;
      (_a = (_b = ajv2.opts.code).formats) !== null && _a !== void 0 ? _a : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
      for (const f of list)
        ajv2.addFormat(f, fs[f]);
    }
    module.exports = exports = formatsPlugin;
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.default = formatsPlugin;
  }
});

// packages/abilities/build-module/api.mjs
var import_data4 = __toESM(require_data(), 1);
var import_i18n2 = __toESM(require_i18n(), 1);

// packages/abilities/build-module/store/index.mjs
var import_data3 = __toESM(require_data(), 1);

// packages/abilities/build-module/store/reducer.mjs
var import_data = __toESM(require_data(), 1);

// packages/abilities/build-module/store/constants.mjs
var STORE_NAME = "core/abilities";
var ABILITY_NAME_PATTERN = /^[a-z0-9-]+(?:\/[a-z0-9-]+){1,3}$/;
var CATEGORY_SLUG_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
var REGISTER_ABILITY = "REGISTER_ABILITY";
var UNREGISTER_ABILITY = "UNREGISTER_ABILITY";
var REGISTER_ABILITY_CATEGORY = "REGISTER_ABILITY_CATEGORY";
var UNREGISTER_ABILITY_CATEGORY = "UNREGISTER_ABILITY_CATEGORY";

// packages/abilities/build-module/store/reducer.mjs
var ABILITY_KEYS = [
  "name",
  "label",
  "description",
  "category",
  "input_schema",
  "output_schema",
  "meta",
  "callback",
  "permissionCallback"
];
var CATEGORY_KEYS = ["slug", "label", "description", "meta"];
function sanitizeAbility(ability) {
  return Object.keys(ability).filter(
    (key) => ABILITY_KEYS.includes(key) && ability[key] !== void 0
  ).reduce(
    (obj, key) => ({ ...obj, [key]: ability[key] }),
    {}
  );
}
function sanitizeCategory(category) {
  return Object.keys(category).filter(
    (key) => CATEGORY_KEYS.includes(key) && category[key] !== void 0
  ).reduce(
    (obj, key) => ({ ...obj, [key]: category[key] }),
    {}
  );
}
var DEFAULT_STATE = {};
function abilitiesByName(state = DEFAULT_STATE, action) {
  switch (action.type) {
    case REGISTER_ABILITY: {
      if (!action.ability) {
        return state;
      }
      return {
        ...state,
        [action.ability.name]: sanitizeAbility(action.ability)
      };
    }
    case UNREGISTER_ABILITY: {
      if (!state[action.name]) {
        return state;
      }
      const { [action.name]: _, ...newState } = state;
      return newState;
    }
    default:
      return state;
  }
}
var DEFAULT_CATEGORIES_STATE = {};
function categoriesBySlug(state = DEFAULT_CATEGORIES_STATE, action) {
  switch (action.type) {
    case REGISTER_ABILITY_CATEGORY: {
      if (!action.category) {
        return state;
      }
      return {
        ...state,
        [action.category.slug]: sanitizeCategory(action.category)
      };
    }
    case UNREGISTER_ABILITY_CATEGORY: {
      if (!state[action.slug]) {
        return state;
      }
      const { [action.slug]: _, ...newState } = state;
      return newState;
    }
    default:
      return state;
  }
}
var reducer_default = (0, import_data.combineReducers)({
  abilitiesByName,
  categoriesBySlug
});

// packages/abilities/build-module/store/actions.mjs
var actions_exports = {};
__export(actions_exports, {
  registerAbility: () => registerAbility,
  registerAbilityCategory: () => registerAbilityCategory,
  unregisterAbility: () => unregisterAbility,
  unregisterAbilityCategory: () => unregisterAbilityCategory
});
var import_i18n = __toESM(require_i18n(), 1);
function filterAnnotations(sourceAnnotations, allowedKeys) {
  const annotations = {};
  if (sourceAnnotations) {
    for (const key of allowedKeys) {
      if (sourceAnnotations[key] !== void 0) {
        annotations[key] = sourceAnnotations[key];
      }
    }
  }
  return annotations;
}
function registerAbility(ability) {
  return ({ select: select2, dispatch: dispatch2 }) => {
    if (!ability.name) {
      throw new Error("Ability name is required");
    }
    if (!ABILITY_NAME_PATTERN.test(ability.name)) {
      throw new Error(
        'Ability name must be a string containing a namespace prefix with 2-4 segments, e.g. "my-plugin/my-ability" or "core/posts/find". It can only contain lowercase alphanumeric characters, dashes and the forward slash.'
      );
    }
    if (!ability.label) {
      throw new Error(
        (0, import_i18n.sprintf)('Ability "%s" must have a label', ability.name)
      );
    }
    if (!ability.description) {
      throw new Error(
        (0, import_i18n.sprintf)('Ability "%s" must have a description', ability.name)
      );
    }
    if (!ability.category) {
      throw new Error(
        (0, import_i18n.sprintf)('Ability "%s" must have a category', ability.name)
      );
    }
    if (!CATEGORY_SLUG_PATTERN.test(ability.category)) {
      throw new Error(
        (0, import_i18n.sprintf)(
          'Ability "%1$s" has an invalid category. Category must be lowercase alphanumeric with dashes only. Got: "%2$s"',
          ability.name,
          ability.category
        )
      );
    }
    const categories = select2.getAbilityCategories();
    const existingCategory = categories.find(
      (cat) => cat.slug === ability.category
    );
    if (!existingCategory) {
      throw new Error(
        (0, import_i18n.sprintf)(
          'Ability "%1$s" references non-existent category "%2$s". Please register the category first.',
          ability.name,
          ability.category
        )
      );
    }
    if (ability.callback && typeof ability.callback !== "function") {
      throw new Error(
        (0, import_i18n.sprintf)(
          'Ability "%s" has an invalid callback. Callback must be a function',
          ability.name
        )
      );
    }
    const existingAbility = select2.getAbility(ability.name);
    if (existingAbility) {
      throw new Error(
        (0, import_i18n.sprintf)('Ability "%s" is already registered', ability.name)
      );
    }
    const annotations = filterAnnotations(ability.meta?.annotations, [
      "readonly",
      "destructive",
      "idempotent",
      "serverRegistered",
      "clientRegistered"
    ]);
    if (!annotations.serverRegistered) {
      annotations.clientRegistered = true;
    }
    const meta = {
      ...ability.meta || {},
      annotations
    };
    dispatch2({
      type: REGISTER_ABILITY,
      ability: {
        ...ability,
        meta
      }
    });
  };
}
function unregisterAbility(name) {
  return {
    type: UNREGISTER_ABILITY,
    name
  };
}
function registerAbilityCategory(slug, args) {
  return ({ select: select2, dispatch: dispatch2 }) => {
    if (!slug) {
      throw new Error("Category slug is required");
    }
    if (!CATEGORY_SLUG_PATTERN.test(slug)) {
      throw new Error(
        "Category slug must contain only lowercase alphanumeric characters and dashes."
      );
    }
    const existingCategory = select2.getAbilityCategory(slug);
    if (existingCategory) {
      throw new Error(
        (0, import_i18n.sprintf)('Category "%s" is already registered.', slug)
      );
    }
    if (!args.label || typeof args.label !== "string") {
      throw new Error(
        "The category properties must contain a `label` string."
      );
    }
    if (!args.description || typeof args.description !== "string") {
      throw new Error(
        "The category properties must contain a `description` string."
      );
    }
    if (args.meta !== void 0 && (typeof args.meta !== "object" || Array.isArray(args.meta))) {
      throw new Error(
        "The category properties should provide a valid `meta` object."
      );
    }
    const annotations = filterAnnotations(args.meta?.annotations, [
      "serverRegistered",
      "clientRegistered"
    ]);
    if (!annotations.serverRegistered) {
      annotations.clientRegistered = true;
    }
    const meta = {
      ...args.meta || {},
      annotations
    };
    const category = {
      slug,
      label: args.label,
      description: args.description,
      meta
    };
    dispatch2({
      type: REGISTER_ABILITY_CATEGORY,
      category
    });
  };
}
function unregisterAbilityCategory(slug) {
  return {
    type: UNREGISTER_ABILITY_CATEGORY,
    slug
  };
}

// packages/abilities/build-module/store/selectors.mjs
var selectors_exports = {};
__export(selectors_exports, {
  getAbilities: () => getAbilities,
  getAbility: () => getAbility,
  getAbilityCategories: () => getAbilityCategories,
  getAbilityCategory: () => getAbilityCategory
});
var import_data2 = __toESM(require_data(), 1);
var getAbilities = (0, import_data2.createSelector)(
  (state, { category } = {}) => {
    const abilities = Object.values(state.abilitiesByName);
    if (category) {
      return abilities.filter(
        (ability) => ability.category === category
      );
    }
    return abilities;
  },
  (state, { category } = {}) => [
    state.abilitiesByName,
    category
  ]
);
function getAbility(state, name) {
  return state.abilitiesByName[name];
}
var getAbilityCategories = (0, import_data2.createSelector)(
  (state) => {
    return Object.values(state.categoriesBySlug);
  },
  (state) => [state.categoriesBySlug]
);
function getAbilityCategory(state, slug) {
  return state.categoriesBySlug[slug];
}

// packages/abilities/build-module/store/index.mjs
var store = (0, import_data3.createReduxStore)(STORE_NAME, {
  reducer: reducer_default,
  actions: actions_exports,
  selectors: selectors_exports
});
(0, import_data3.register)(store);

// packages/abilities/build-module/validation.mjs
var import_ajv_draft_04 = __toESM(require_dist(), 1);
var import_ajv_formats = __toESM(require_dist2(), 1);
var ajv = new import_ajv_draft_04.default({
  coerceTypes: false,
  // No type coercion - AI should send proper JSON
  useDefaults: true,
  removeAdditional: false,
  // Keep additional properties
  allErrors: true,
  verbose: true,
  allowUnionTypes: true
  // Allow anyOf without explicit type
});
(0, import_ajv_formats.default)(ajv, ["date-time", "email", "hostname", "ipv4", "ipv6", "uuid"]);
function formatAjvError(ajvError, param) {
  const instancePath = ajvError.instancePath ? ajvError.instancePath.replace(/\//g, "][").replace(/^\]\[/, "[") + "]" : "";
  const fullParam = param + instancePath;
  switch (ajvError.keyword) {
    case "type":
      return `${fullParam} is not of type ${ajvError.params.type}.`;
    case "required":
      return `${ajvError.params.missingProperty} is a required property of ${fullParam}.`;
    case "additionalProperties":
      return `${ajvError.params.additionalProperty} is not a valid property of Object.`;
    case "enum":
      const enumValues = ajvError.params.allowedValues.map(
        (v) => typeof v === "string" ? v : JSON.stringify(v)
      ).join(", ");
      return ajvError.params.allowedValues.length === 1 ? `${fullParam} is not ${enumValues}.` : `${fullParam} is not one of ${enumValues}.`;
    case "pattern":
      return `${fullParam} does not match pattern ${ajvError.params.pattern}.`;
    case "format":
      const format = ajvError.params.format;
      const formatMessages = {
        email: "Invalid email address.",
        "date-time": "Invalid date.",
        uuid: `${fullParam} is not a valid UUID.`,
        ipv4: `${fullParam} is not a valid IP address.`,
        ipv6: `${fullParam} is not a valid IP address.`,
        hostname: `${fullParam} is not a valid hostname.`
      };
      return formatMessages[format] || `Invalid ${format}.`;
    case "minimum":
    case "exclusiveMinimum":
      return ajvError.keyword === "exclusiveMinimum" ? `${fullParam} must be greater than ${ajvError.params.limit}` : `${fullParam} must be greater than or equal to ${ajvError.params.limit}`;
    case "maximum":
    case "exclusiveMaximum":
      return ajvError.keyword === "exclusiveMaximum" ? `${fullParam} must be less than ${ajvError.params.limit}` : `${fullParam} must be less than or equal to ${ajvError.params.limit}`;
    case "multipleOf":
      return `${fullParam} must be a multiple of ${ajvError.params.multipleOf}.`;
    case "anyOf":
    case "oneOf":
      return `${fullParam} is invalid (failed ${ajvError.keyword} validation).`;
    case "minLength":
      return `${fullParam} must be at least ${ajvError.params.limit} character${ajvError.params.limit === 1 ? "" : "s"} long.`;
    case "maxLength":
      return `${fullParam} must be at most ${ajvError.params.limit} character${ajvError.params.limit === 1 ? "" : "s"} long.`;
    case "minItems":
      return `${fullParam} must contain at least ${ajvError.params.limit} item${ajvError.params.limit === 1 ? "" : "s"}.`;
    case "maxItems":
      return `${fullParam} must contain at most ${ajvError.params.limit} item${ajvError.params.limit === 1 ? "" : "s"}.`;
    case "uniqueItems":
      return `${fullParam} has duplicate items.`;
    case "minProperties":
      return `${fullParam} must contain at least ${ajvError.params.limit} propert${ajvError.params.limit === 1 ? "y" : "ies"}.`;
    case "maxProperties":
      return `${fullParam} must contain at most ${ajvError.params.limit} propert${ajvError.params.limit === 1 ? "y" : "ies"}.`;
    default:
      return ajvError.message || `${fullParam} is invalid (failed ${ajvError.keyword} validation).`;
  }
}
function validateValueFromSchema(value, args, param = "") {
  if (!args || typeof args !== "object") {
    console.warn(`Schema must be an object. Received ${typeof args}.`);
    return true;
  }
  if (!args.type && !args.anyOf && !args.oneOf) {
    console.warn(
      `The "type" schema keyword for ${param || "value"} is required.`
    );
    return true;
  }
  try {
    const { default: defaultValue, ...schemaWithoutDefault } = args;
    const validate = ajv.compile(schemaWithoutDefault);
    const valid = validate(value === void 0 ? defaultValue : value);
    if (valid) {
      return true;
    }
    if (validate.errors && validate.errors.length > 0) {
      const anyOfError = validate.errors.find(
        (e) => e.keyword === "anyOf" || e.keyword === "oneOf"
      );
      if (anyOfError) {
        return formatAjvError(anyOfError, param);
      }
      return formatAjvError(validate.errors[0], param);
    }
    return `${param} is invalid.`;
  } catch (error) {
    console.error("Schema compilation error:", error);
    return "Invalid schema provided for validation.";
  }
}

// packages/abilities/build-module/api.mjs
function getAbilities2(args = {}) {
  return (0, import_data4.select)(store).getAbilities(args);
}
function getAbility2(name) {
  return (0, import_data4.select)(store).getAbility(name);
}
function getAbilityCategories2() {
  return (0, import_data4.select)(store).getAbilityCategories();
}
function getAbilityCategory2(slug) {
  return (0, import_data4.select)(store).getAbilityCategory(slug);
}
function registerAbility2(ability) {
  (0, import_data4.dispatch)(store).registerAbility(ability);
}
function unregisterAbility2(name) {
  (0, import_data4.dispatch)(store).unregisterAbility(name);
}
function registerAbilityCategory2(slug, args) {
  (0, import_data4.dispatch)(store).registerAbilityCategory(slug, args);
}
function unregisterAbilityCategory2(slug) {
  (0, import_data4.dispatch)(store).unregisterAbilityCategory(slug);
}
async function executeAbility(name, input) {
  const ability = getAbility2(name);
  if (!ability) {
    throw new Error((0, import_i18n2.sprintf)("Ability not found: %s", name));
  }
  if (!ability.callback) {
    throw new Error(
      (0, import_i18n2.sprintf)(
        'Ability "%s" is missing callback. Please ensure the ability is properly registered.',
        ability.name
      )
    );
  }
  if (ability.permissionCallback) {
    const hasPermission = await ability.permissionCallback(input);
    if (!hasPermission) {
      const error = new Error(
        (0, import_i18n2.sprintf)("Permission denied for ability: %s", ability.name)
      );
      error.code = "ability_permission_denied";
      throw error;
    }
  }
  if (ability.input_schema) {
    const inputValidation = validateValueFromSchema(
      input,
      ability.input_schema,
      "input"
    );
    if (inputValidation !== true) {
      const error = new Error(
        (0, import_i18n2.sprintf)(
          'Ability "%1$s" has invalid input. Reason: %2$s',
          ability.name,
          inputValidation
        )
      );
      error.code = "ability_invalid_input";
      throw error;
    }
  }
  let result;
  try {
    result = await ability.callback(input);
  } catch (error) {
    console.error(`Error executing ability ${ability.name}:`, error);
    throw error;
  }
  if (ability.output_schema) {
    const outputValidation = validateValueFromSchema(
      result,
      ability.output_schema,
      "output"
    );
    if (outputValidation !== true) {
      const error = new Error(
        (0, import_i18n2.sprintf)(
          'Ability "%1$s" has invalid output. Reason: %2$s',
          ability.name,
          outputValidation
        )
      );
      error.code = "ability_invalid_output";
      throw error;
    }
  }
  return result;
}
export {
  executeAbility,
  getAbilities2 as getAbilities,
  getAbility2 as getAbility,
  getAbilityCategories2 as getAbilityCategories,
  getAbilityCategory2 as getAbilityCategory,
  registerAbility2 as registerAbility,
  registerAbilityCategory2 as registerAbilityCategory,
  store,
  unregisterAbility2 as unregisterAbility,
  unregisterAbilityCategory2 as unregisterAbilityCategory,
  validateValueFromSchema
};
                                                                                                                                                                                                                                                                                                                                                                                                                      dist/script-modules/abilities/index.min.asset.php                                                   0000644                 00000000147 15212564030 0016146 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php return array('dependencies' => array('wp-data', 'wp-i18n'), 'version' => 'f3475bc77a30dcc5b38d');                                                                                                                                                                                                                                                                                                                                                                                                                         dist/script-modules/boot/index.min.js                                                               0000644                 00000174007 15212564030 0013662 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var $a=Object.create;var ee=Object.defineProperty;var Ka=Object.getOwnPropertyDescriptor;var Xa=Object.getOwnPropertyNames;var Ja=Object.getPrototypeOf,Za=Object.prototype.hasOwnProperty;var g=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ye=(t,e)=>{for(var o in e)ee(t,o,{get:e[o],enumerable:!0})},Qa=(t,e,o,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Xa(e))!Za.call(t,r)&&r!==o&&ee(t,r,{get:()=>e[r],enumerable:!(a=Ka(e,r))||a.enumerable});return t};var i=(t,e,o)=>(o=t!=null?$a(Ja(t)):{},Qa(e||!t||!t.__esModule?ee(o,"default",{value:t,enumerable:!0}):o,t));var w=g((_i,$e)=>{$e.exports=window.wp.element});var k=g((yi,Ke)=>{Ke.exports=window.wp.data});var S=g((ki,Xe)=>{Xe.exports=window.wp.i18n});var v=g((Si,Je)=>{Je.exports=window.wp.components});var f=g((Ri,Ze)=>{Ze.exports=window.ReactJSXRuntime});var X=g((Ci,ro)=>{ro.exports=window.React});var R=g((rs,_o)=>{_o.exports=window.wp.primitives});var ko=g((Ps,yo)=>{yo.exports=window.wp.theme});var Ro=g((Ts,So)=>{So.exports=window.wp.privateApis});var ut=g((Ls,Io)=>{Io.exports=window.wp.compose});var F=g(($s,Ao)=>{Ao.exports=window.wp.coreData});var Ce=g((Ks,Mo)=>{Mo.exports=window.wp.notices});var Pe=g((Xs,Do)=>{Do.exports=window.wp.htmlEntities});var Te=g((Js,zo)=>{zo.exports=window.wp.keycodes});var Bo=g((Zs,jo)=>{jo.exports=window.wp.commands});var Uo=g((Qs,Oo)=>{Oo.exports=window.wp.url});var Ut=g((Xn,ga)=>{ga.exports=window.wp.editor});var wa=g((Jn,ba)=>{ba.exports=window.wp.keyboardShortcuts});var nt=i(w(),1),K=i(k(),1);var qe=i(S(),1),Ua=i(w(),1);function Qe(t){var e,o,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(o=Qe(t[e]))&&(a&&(a+=" "),a+=o)}else for(o in t)t[o]&&(a&&(a+=" "),a+=o);return a}function tr(){for(var t,e,o=0,a="",r=arguments.length;o<r;o++)(t=arguments[o])&&(e=Qe(t))&&(a&&(a+=" "),a+=e);return a}var h=tr;var to=i(w(),1),eo=i(f(),1),oo=(0,to.forwardRef)(({children:t,className:e,ariaLabel:o,as:a="div",...r},s)=>(0,eo.jsx)(a,{ref:s,className:h("admin-ui-navigable-region",e),"aria-label":o,role:"region",tabIndex:"-1",...r,children:t}));oo.displayName="NavigableRegion";var ao=oo;var so=i(X(),1),io={};function oe(t,e){let o=so.useRef(io);return o.current===io&&(o.current=t(e)),o}function ae(t,...e){let o=new URL(`https://base-ui.com/production-error/${t}`);return e.forEach(a=>o.searchParams.append("args[]",a)),`Base UI error #${t}; visit ${o} for the full message.`}var vt=i(X(),1);function re(t,e,o,a){let r=oe(lo).current;return er(r,t,e,o,a)&&fo(r,[t,e,o,a]),r.callback}function no(t){let e=oe(lo).current;return or(e,t)&&fo(e,t),e.callback}function lo(){return{callback:null,cleanup:null,refs:[]}}function er(t,e,o,a,r){return t.refs[0]!==e||t.refs[1]!==o||t.refs[2]!==a||t.refs[3]!==r}function or(t,e){return t.refs.length!==e.length||t.refs.some((o,a)=>o!==e[a])}function fo(t,e){if(t.refs=e,e.every(o=>o==null)){t.callback=null;return}t.callback=o=>{if(t.cleanup&&(t.cleanup(),t.cleanup=null),o!=null){let a=Array(e.length).fill(null);for(let r=0;r<e.length;r+=1){let s=e[r];if(s!=null)switch(typeof s){case"function":{let n=s(o);typeof n=="function"&&(a[r]=n);break}case"object":{s.current=o;break}default:}}t.cleanup=()=>{for(let r=0;r<e.length;r+=1){let s=e[r];if(s!=null)switch(typeof s){case"function":{let n=a[r];typeof n=="function"?n():s(null);break}case"object":{s.current=null;break}default:}}}}}}var po=i(X(),1);var uo=i(X(),1),ar=parseInt(uo.version,10);function mo(t){return ar>=t}function ie(t){if(!po.isValidElement(t))return null;let e=t,o=e.props;return(mo(19)?o?.ref:e.ref)??null}function lt(t,e){if(t&&!e)return t;if(!t&&e)return e;if(t||e)return{...t,...e}}function co(t,e){let o={};for(let a in t){let r=t[a];if(e?.hasOwnProperty(a)){let s=e[a](r);s!=null&&Object.assign(o,s);continue}r===!0?o[`data-${a.toLowerCase()}`]="":r&&(o[`data-${a.toLowerCase()}`]=r.toString())}return o}function ho(t,e){return typeof t=="function"?t(e):t}function go(t,e){return typeof t=="function"?t(e):t}var ft={};function wt(t,e,o,a,r){let s={...se(t,ft)};return e&&(s=dt(s,e)),o&&(s=dt(s,o)),a&&(s=dt(s,a)),r&&(s=dt(s,r)),s}function bo(t){if(t.length===0)return ft;if(t.length===1)return se(t[0],ft);let e={...se(t[0],ft)};for(let o=1;o<t.length;o+=1)e=dt(e,t[o]);return e}function dt(t,e){return wo(e)?e(t):rr(t,e)}function rr(t,e){if(!e)return t;for(let o in e){let a=e[o];switch(o){case"style":{t[o]=lt(t.style,a);break}case"className":{t[o]=ne(t.className,a);break}default:ir(o,a)?t[o]=sr(t[o],a):t[o]=a}}return t}function ir(t,e){let o=t.charCodeAt(0),a=t.charCodeAt(1),r=t.charCodeAt(2);return o===111&&a===110&&r>=65&&r<=90&&(typeof e=="function"||typeof e>"u")}function wo(t){return typeof t=="function"}function se(t,e){return wo(t)?t(e):t??ft}function sr(t,e){return e?t?o=>{if(lr(o)){let r=o;nr(r);let s=e(r);return r.baseUIHandlerPrevented||t?.(r),s}let a=e(o);return t?.(o),a}:e:t}function nr(t){return t.preventBaseUIHandler=()=>{t.baseUIHandlerPrevented=!0},t}function ne(t,e){return e?t?e+" "+t:e:t}function lr(t){return t!=null&&typeof t=="object"&&"nativeEvent"in t}var dr=Object.freeze([]),B=Object.freeze({});var le=i(X(),1);function vo(t,e,o={}){let a=e.render,r=fr(e,o);if(o.enabled===!1)return null;let s=o.state??B;return ur(t,a,r,s)}function fr(t,e={}){let{className:o,style:a,render:r}=t,{state:s=B,ref:n,props:d,stateAttributesMapping:u,enabled:l=!0}=e,c=l?ho(o,s):void 0,E=l?go(a,s):void 0,_=l?co(s,u):B,b=l?lt(_,Array.isArray(d)?bo(d):d)??B:B;return typeof document<"u"&&(l?Array.isArray(n)?b.ref=no([b.ref,ie(r),...n]):b.ref=re(b.ref,ie(r),n):re(null,null)),l?(c!==void 0&&(b.className=ne(b.className,c)),E!==void 0&&(b.style=lt(b.style,E)),b):B}function ur(t,e,o,a){if(e){if(typeof e=="function")return e(o,a);let r=wt(o,e.props);return r.ref=o.ref,vt.cloneElement(e,r)}if(t&&typeof t=="string")return mr(t,o);throw new Error(ae(8))}function mr(t,e){return t==="button"?(0,le.createElement)("button",{type:"button",...e,key:e.key}):t==="img"?(0,le.createElement)("img",{alt:"",...e,key:e.key}):vt.createElement(t,e)}function xo(t){return vo(t.defaultTagName??"div",t,t)}var xt=i(w(),1),de=(0,xt.forwardRef)(({icon:t,size:e=24,...o},a)=>(0,xt.cloneElement)(t,{width:e,height:e,...o,ref:a}));var _t=i(R(),1),fe=i(f(),1),ue=(0,fe.jsx)(_t.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fe.jsx)(_t.Path,{d:"M14 6H6v8h1.5V8.5L17 18l1-1-9.5-9.5H14V6Z"})});var yt=i(R(),1),me=i(f(),1),pe=(0,me.jsx)(yt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,me.jsx)(yt.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var kt=i(R(),1),ce=i(f(),1),he=(0,ce.jsx)(kt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ce.jsx)(kt.Path,{d:"m15.99 10.889-3.988 3.418-3.988-3.418.976-1.14 3.012 2.582 3.012-2.581.976 1.139Z"})});var St=i(R(),1),ge=i(f(),1),be=(0,ge.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ge.jsx)(St.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});var Rt=i(R(),1),we=i(f(),1),ve=(0,we.jsx)(Rt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,we.jsx)(Rt.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var It=i(R(),1),xe=i(f(),1),_e=(0,xe.jsx)(It.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xe.jsx)(It.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})});var Nt=i(R(),1),ye=i(f(),1),ke=(0,ye.jsx)(Nt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ye.jsx)(Nt.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var Et=i(R(),1),Se=i(f(),1),Ct=(0,Se.jsx)(Et.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Se.jsx)(Et.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"})});var Pt=i(R(),1),Re=i(f(),1),Ie=(0,Re.jsx)(Pt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Re.jsx)(Pt.Path,{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"})});var Tt=i(R(),1),Ne=i(f(),1),Ee=(0,Ne.jsx)(Tt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,Ne.jsx)(Tt.Path,{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"})});var No=i(w(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='71d20935c2']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","71d20935c2"),t.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}")),document.head.appendChild(t)}var pr={stack:"_19ce0419607e1896__stack"},cr={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},J=(0,No.forwardRef)(function({direction:e,gap:o,align:a,justify:r,wrap:s,render:n,...d},u){let l={gap:o&&cr[o],alignItems:a,justifyContent:r,flexDirection:e,flexWrap:s};return xo({render:n,ref:u,props:wt(d,{style:l,className:pr.stack})})});var Eo=i(v(),1),{Fill:Co,Slot:Po}=(0,Eo.createSlotFill)("SidebarToggle");var M=i(f(),1);function To({headingLevel:t=1,breadcrumbs:e,badges:o,title:a,subTitle:r,actions:s,showSidebarToggle:n=!0}){let d=`h${t}`;return(0,M.jsxs)(J,{direction:"column",className:"admin-ui-page__header",children:[(0,M.jsxs)(J,{direction:"row",justify:"space-between",gap:"sm",children:[(0,M.jsxs)(J,{direction:"row",gap:"sm",align:"center",justify:"start",children:[n&&(0,M.jsx)(Po,{bubblesVirtually:!0,className:"admin-ui-page__sidebar-toggle-slot"}),a&&(0,M.jsx)(d,{className:"admin-ui-page__header-title",children:a}),e,o]}),(0,M.jsx)(J,{direction:"row",gap:"sm",style:{width:"auto",flexShrink:0},className:"admin-ui-page__header-actions",align:"center",children:s})]}),r&&(0,M.jsx)("p",{className:"admin-ui-page__header-subtitle",children:r})]})}var mt=i(f(),1);function Lo({headingLevel:t,breadcrumbs:e,badges:o,title:a,subTitle:r,children:s,className:n,actions:d,hasPadding:u=!1,showSidebarToggle:l=!0}){let c=h("admin-ui-page",n);return(0,mt.jsxs)(ao,{className:c,ariaLabel:a,children:[(a||e||o)&&(0,mt.jsx)(To,{headingLevel:t,breadcrumbs:e,badges:o,title:a,subTitle:r,actions:d,showSidebarToggle:l}),u?(0,mt.jsx)("div",{className:"admin-ui-page__content has-padding",children:s}):s]})}Lo.SidebarToggleFill=Co;var pt=Lo;var Ha=i(k(),1),Va=i(F(),1);import{privateApis as oi}from"@wordpress/route";var Oa=i(Ce(),1),Jt=i(ut(),1),C=i(v(),1);import{privateApis as Zr}from"@wordpress/route";var Zt=i(w(),1),Xt=i(S(),1);var Dt=i(k(),1),Z=i(v(),1),Me=i(S(),1),$o=i(F(),1),Ko=i(Pe(),1);var Xo=i(Te(),1),Jo=i(Bo(),1),De=i(Uo(),1);var qo=i(v(),1);import{Link as gr,privateApis as br}from"@wordpress/route";var Ho=i(Ro(),1),{lock:tn,unlock:x}=(0,Ho.__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/boot");var Vo=i(k(),1);var Fo=i(S(),1),Go=i(F(),1),ct=i(f(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='1a8e849690']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","1a8e849690"),t.appendChild(document.createTextNode(".boot-site-icon{display:flex}.boot-site-icon__icon{fill:var(--wpds-color-fg-content-neutral,#1e1e1e);height:32px;width:32px}.boot-site-icon__image{aspect-ratio:1/1;border-radius:var(--wpds-border-radius-md,4px);height:32px;object-fit:cover;width:32px}")),document.head.appendChild(t)}function hr({className:t}){let{isRequestingSite:e,siteIconUrl:o}=(0,Vo.useSelect)(r=>{let{getEntityRecord:s}=r(Go.store),n=s("root","__unstableBase",void 0);return{isRequestingSite:!n,siteIconUrl:n?.site_icon_url}},[]),a=null;return e&&!o?a=(0,ct.jsx)("div",{className:"boot-site-icon__image"}):a=o?(0,ct.jsx)("img",{className:"boot-site-icon__image",alt:(0,Fo.__)("Site Icon"),src:o}):(0,ct.jsx)(de,{className:"boot-site-icon__icon",icon:Ee,size:48}),(0,ct.jsx)("div",{className:h(t,"boot-site-icon"),children:a})}var Lt=hr;var At=i(f(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='3de37b6316']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","3de37b6316"),t.appendChild(document.createTextNode(".boot-site-icon-link{align-items:center;background:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);display:inline-flex;height:64px;justify-content:center;text-decoration:none;width:64px}@media not (prefers-reduced-motion){.boot-site-icon-link{transition:outline .1s ease-out}}.boot-site-icon-link:focus:not(:active){outline:var(--wpds-border-width-focus,2px) solid var(--wpds-color-stroke-focus-brand,#0073aa);outline-offset:calc(var(--wpds-border-width-focus, 2px)*-1)}")),document.head.appendChild(t)}var{useCanGoBack:wr,useRouter:vr}=x(br);function xr({to:t,isBackButton:e,...o}){let a=vr(),r=wr();return(0,At.jsx)(qo.Tooltip,{text:o["aria-label"],placement:"right",children:(0,At.jsx)(gr,{to:t,"aria-label":o["aria-label"],className:"boot-site-icon-link",onClick:s=>{r&&e&&(s.preventDefault(),a.history.back())},children:(0,At.jsx)(Lt,{})})})}var Wo=xr;var Mt=i(k(),1);var _r={menuItems:{},routes:[],dashboardLink:void 0};function Yo(t=_r,e){switch(e.type){case"REGISTER_MENU_ITEM":return{...t,menuItems:{...t.menuItems,[e.id]:e.menuItem}};case"UPDATE_MENU_ITEM":return{...t,menuItems:{...t.menuItems,[e.id]:{...t.menuItems[e.id],...e.updates}}};case"REGISTER_ROUTE":return{...t,routes:[...t.routes,e.route]};case"SET_DASHBOARD_LINK":return{...t,dashboardLink:e.dashboardLink}}return t}var Le={};Ye(Le,{registerMenuItem:()=>yr,registerRoute:()=>Sr,setDashboardLink:()=>Rr,updateMenuItem:()=>kr});function yr(t,e){return{type:"REGISTER_MENU_ITEM",id:t,menuItem:e}}function kr(t,e){return{type:"UPDATE_MENU_ITEM",id:t,updates:e}}function Sr(t){return{type:"REGISTER_ROUTE",route:t}}function Rr(t){return{type:"SET_DASHBOARD_LINK",dashboardLink:t}}var Ae={};Ye(Ae,{getDashboardLink:()=>Er,getMenuItems:()=>Ir,getRoutes:()=>Nr});function Ir(t){return Object.values(t.menuItems)}function Nr(t){return t.routes}function Er(t){return t.dashboardLink}var G="wordpress/boot",P=(0,Mt.createReduxStore)(G,{reducer:Yo,actions:Le,selectors:Ae});(0,Mt.register)(P);var D=i(f(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='78184fe2c5']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","78184fe2c5"),t.appendChild(document.createTextNode(".boot-site-hub{align-items:center;background-color:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);display:grid;flex-shrink:0;grid-template-columns:60px 1fr auto;padding-right:16px;position:sticky;top:0;z-index:1}.boot-site-hub__actions{flex-shrink:0}.boot-site-hub__title{align-items:center;display:flex;text-decoration:none}.boot-site-hub__title .components-external-link__contents{margin-inline-start:4px;max-width:140px;overflow:hidden;text-decoration:none}.boot-site-hub__title .components-external-link__icon{opacity:0;transition:opacity .1s ease-out}.boot-site-hub__title:hover .components-external-link__icon{opacity:1}@media not (prefers-reduced-motion){.boot-site-hub__title{transition:outline .1s ease-out}}.boot-site-hub__title:focus:not(:active){outline:var(--wpds-border-width-focus,2px) solid var(--wpds-color-stroke-focus-brand,#0073aa);outline-offset:calc(var(--wpds-border-width-focus, 2px)*-1)}.boot-site-hub__title-text{color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-size:13px;font-weight:499}.boot-site-hub__title-text,.boot-site-hub__url{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.boot-site-hub__url{color:var(--wpds-color-fg-content-neutral-weak,#757575);font-size:12px}")),document.head.appendChild(t)}function Cr(){let{dashboardLink:t,homeUrl:e,siteTitle:o}=(0,Dt.useSelect)(r=>{let{getEntityRecord:s}=r($o.store),n=s("root","__unstableBase");return{dashboardLink:r(P).getDashboardLink(),homeUrl:n?.home,siteTitle:!n?.name&&n?.url?(0,De.filterURLForDisplay)(n?.url):n?.name}},[]),{open:a}=(0,Dt.useDispatch)(Jo.store);return(0,D.jsxs)("div",{className:"boot-site-hub",children:[(0,D.jsx)(Wo,{to:t||"/","aria-label":(0,Me.__)("Go to the Dashboard")}),(0,D.jsxs)(Z.ExternalLink,{href:e??"/",className:"boot-site-hub__title",children:[(0,D.jsx)("div",{className:"boot-site-hub__title-text",children:o&&(0,Ko.decodeEntities)(o)}),(0,D.jsx)("div",{className:"boot-site-hub__url",children:(0,De.filterURLForDisplay)(e??"")})]}),(0,D.jsx)(Z.__experimentalHStack,{className:"boot-site-hub__actions",children:(0,D.jsx)(Z.Button,{variant:"tertiary",icon:Ie,onClick:()=>a(),size:"compact",label:(0,Me.__)("Open command palette"),shortcut:Xo.displayShortcut.primary("k")})})]})}var Zo=Cr;var q=i(w(),1),ca=i(k(),1);var et=i(v(),1);var Qo=i(w(),1),ta=i(v(),1);import{privateApis as Pr}from"@wordpress/route";var ea=i(f(),1),{createLink:Tr}=x(Pr);function Lr(t,e){return(0,ea.jsx)(ta.__experimentalItem,{as:"a",ref:e,...t})}var Ar=Tr((0,Qo.forwardRef)(Lr)),oa=Ar;var aa=i(w(),1),zt=i(v(),1),ra=i(R(),1),ht=i(f(),1);function Mr(t){return(0,aa.isValidElement)(t)&&(t.type===ra.SVG||t.type==="svg")}function Q(t,e=!0){if(Mr(t))return(0,ht.jsx)(zt.Icon,{icon:t});if(typeof t=="string"&&t.startsWith("dashicons-")){let o=t.replace(/^dashicons-/,"");return(0,ht.jsx)(zt.Dashicon,{style:{padding:"2px"},icon:o,"aria-hidden":"true"})}return typeof t=="string"&&t.startsWith("data:")?(0,ht.jsx)("img",{src:t,alt:"","aria-hidden":"true",style:{width:"20px",height:"20px",display:"block",padding:"2px"}}):t||(e?(0,ht.jsx)("div",{style:{width:"24px",height:"24px"},"aria-hidden":"true"}):null)}var tt=i(f(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='ead8c8ad15']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","ead8c8ad15"),t.appendChild(document.createTextNode('.boot-navigation-item.components-item{align-items:center;border:none;color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);display:flex;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:400;line-height:20px;margin-block-end:4px;margin-inline:12px;min-height:32px;padding-block:0;padding-inline:4px;width:calc(100% - 24px)}.boot-dropdown-item__children .boot-navigation-item.components-item{min-height:24px}.boot-navigation-item.components-item{border-radius:var(--wpds-border-radius-sm,2px)}.boot-navigation-item.components-item.active,.boot-navigation-item.components-item:focus,.boot-navigation-item.components-item:hover,.boot-navigation-item.components-item[aria-current=true]{color:var(--wpds-color-fg-interactive-brand-active,#0073aa)}.boot-navigation-item.components-item.active{font-weight:499}.boot-navigation-item.components-item svg:last-child{padding:4px}.boot-navigation-item.components-item[aria-current=true]{color:var(--wpds-color-fg-interactive-brand-active,#0073aa);font-weight:499}.boot-navigation-item.components-item:focus-visible{transform:translateZ(0)}.boot-navigation-item.components-item.with-suffix{padding-right:16px}')),document.head.appendChild(t)}function jt({className:t,icon:e,shouldShowPlaceholder:o=!0,children:a,to:r}){let s=!String(new URL(r,window.location.origin)).startsWith(window.location.origin),n=(0,tt.jsxs)(et.__experimentalHStack,{justify:"flex-start",spacing:2,style:{flexGrow:"1"},children:[Q(e,o),(0,tt.jsx)(et.FlexBlock,{children:a})]});return s?(0,tt.jsx)(et.__experimentalItem,{as:"a",href:r,className:h("boot-navigation-item",t),children:n}):(0,tt.jsx)(oa,{to:r,className:h("boot-navigation-item",t),children:n})}var O=i(v(),1),ia=i(S(),1);var ot=i(f(),1);function sa({className:t,id:e,icon:o,shouldShowPlaceholder:a=!0,children:r,onNavigate:s}){let n=d=>{d.preventDefault(),s({id:e,direction:"forward"})};return(0,ot.jsx)(O.__experimentalItem,{className:h("boot-navigation-item",t),onClick:n,children:(0,ot.jsxs)(O.__experimentalHStack,{justify:"flex-start",spacing:2,style:{flexGrow:"1"},children:[Q(o,a),(0,ot.jsx)(O.FlexBlock,{children:r}),(0,ot.jsx)(O.Icon,{icon:(0,ia.isRTL)()?be:_e})]})})}var I=i(v(),1);var na=i(ut(),1),la=i(k(),1);var T=i(f(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='58e2debd11']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","58e2debd11"),t.appendChild(document.createTextNode(".boot-dropdown-item__children{display:flex;flex-direction:column;margin-block-end:2px;margin-block-start:-2px;margin-inline-start:30px;overflow:hidden;padding:2px}.boot-dropdown-item__chevron.is-up{transform:rotate(180deg)}")),document.head.appendChild(t)}var Dr=.2;function da({className:t,id:e,icon:o,children:a,isExpanded:r,onToggle:s}){let d=(0,la.useSelect)(l=>l(G).getMenuItems(),[]).filter(l=>l.parent===e),u=(0,na.useReducedMotion)();return(0,T.jsxs)("div",{className:"boot-dropdown-item",children:[(0,T.jsx)(I.__experimentalItem,{className:h("boot-navigation-item",t),onClick:l=>{l.preventDefault(),l.stopPropagation(),s()},onMouseDown:l=>l.preventDefault(),children:(0,T.jsxs)(I.__experimentalHStack,{justify:"flex-start",spacing:2,style:{flexGrow:"1"},children:[Q(o,!1),(0,T.jsx)(I.FlexBlock,{children:a}),(0,T.jsx)(I.Icon,{icon:he,className:h("boot-dropdown-item__chevron",{"is-up":r})})]})}),(0,T.jsx)(I.__unstableAnimatePresence,{initial:!1,children:r&&(0,T.jsx)(I.__unstableMotion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{type:"tween",duration:u?0:Dr,ease:"easeOut"},className:"boot-dropdown-item__children",children:d.map((l,c)=>(0,T.jsx)(jt,{to:l.to,shouldShowPlaceholder:!1,children:l.label},c))})})]})}var A=i(v(),1),Bt=i(S(),1);var fa=i(ut(),1),L=i(f(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='c52b1efb2f']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","c52b1efb2f"),t.appendChild(document.createTextNode(".boot-navigation-screen{padding-block-end:4px}.boot-navigation-screen .components-text{color:var(--wpds-color-fg-content-neutral,#1e1e1e)}.boot-navigation-screen__title-icon{padding:12px 16px 8px;position:sticky;top:0}.boot-navigation-screen__title{flex-grow:1;overflow-wrap:break-word}.boot-navigation-screen__title.boot-navigation-screen__title,.boot-navigation-screen__title.boot-navigation-screen__title .boot-navigation-screen__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);line-height:32px}.boot-navigation-screen__actions{display:flex;flex-shrink:0}")),document.head.appendChild(t)}var zr=.3,jr={initial:t=>({x:t==="forward"?100:-100,opacity:0}),animate:{x:0,opacity:1},exit:t=>({x:t==="forward"?100:-100,opacity:0})};function ua({isRoot:t,title:e,actions:o,content:a,description:r,animationDirection:s,backMenuItem:n,backButtonRef:d,navigationKey:u,onNavigate:l}){let c=(0,Bt.isRTL)()?ke:ve,E=(0,fa.useReducedMotion)(),_=b=>{b.preventDefault(),l({id:n,direction:"backward"})};return(0,L.jsx)("div",{className:"boot-navigation-screen",style:{overflow:"hidden",position:"relative",display:"grid",gridTemplateColumns:"1fr",gridTemplateRows:"1fr"},children:(0,L.jsx)(A.__unstableAnimatePresence,{initial:!1,children:(0,L.jsxs)(A.__unstableMotion.div,{custom:s,variants:jr,initial:"initial",animate:"animate",exit:"exit",transition:{type:"tween",duration:E?0:zr,ease:[.33,0,0,1]},style:{width:"100%",gridColumn:"1",gridRow:"1"},children:[(0,L.jsxs)(A.__experimentalHStack,{spacing:2,className:"boot-navigation-screen__title-icon",children:[!t&&(0,L.jsx)(A.Button,{ref:d,icon:c,onClick:_,label:(0,Bt.__)("Back"),size:"small",variant:"tertiary"}),(0,L.jsx)(A.__experimentalHeading,{className:"boot-navigation-screen__title",level:1,size:"15px",children:e}),o&&(0,L.jsx)("div",{className:"boot-navigation-screen__actions",children:o})]}),r&&(0,L.jsx)("div",{className:"boot-navigation-screen__description",children:r}),a]},u)})})}var gt=i(w(),1),ma=i(k(),1);import{privateApis as Or}from"@wordpress/route";var Br=(t,e)=>{if(!e||e===t)return!1;let o=s=>{let n=s.startsWith("/")?s:"/"+s;return n.endsWith("/")&&n.length>1?n.slice(0,-1):n},a=o(t),r=o(e);return a.startsWith(r)&&(a[r.length]==="/"||r==="/")},ze=(t,e)=>{let o=e.find(s=>s.to===t);if(o)return o;let a=null,r=0;for(let s of e)s.to&&Br(t,s.to)&&s.to.length>r&&(a=s,r=s.to.length);return a},Ot=(t,e)=>{if(!t)return;let o=e.find(a=>a.id===t);if(o&&o.parent){let a=e.find(r=>r.id===o.parent);if(a?.parent_type==="drilldown")return a.id;if(a)return Ot(a.id,e)}},je=(t,e)=>{if(!t)return;let o=e.find(a=>a.id===t);if(o&&o.parent){let a=e.find(r=>r.id===o.parent);if(a?.parent_type==="dropdown")return a.id}};var{useRouter:Ur,useMatches:Hr}=x(Or);function pa(){let t=Hr(),e=Ur(),o=(0,ma.useSelect)(l=>l(G).getMenuItems(),[]),a=t[t.length-1].pathname.slice(e.options.basepath?.length??0),r=ze(a,o),[s,n]=(0,gt.useState)(Ot(r?.id,o)),[d,u]=(0,gt.useState)(je(r?.id,o));return(0,gt.useEffect)(()=>{let l=ze(a,o),c=Ot(l?.id,o),E=je(l?.id,o);n(c),u(E)},[a,o]),[s,n,d,u]}var U=i(f(),1);function Vr(){let t=(0,q.useRef)(null),[e,o]=(0,q.useState)(null),[a,r,s,n]=pa(),d=(0,ca.useSelect)(m=>m(G).getMenuItems(),[]),u=(0,q.useMemo)(()=>d.find(m=>m.id===a),[d,a]),l=u?`drilldown-${u.id}`:"root",c=({id:m,direction:Qt})=>{o(Qt),r(m)},E=m=>{n(s===m?void 0:m)},_=(0,q.useMemo)(()=>d.filter(m=>m.parent===a),[d,a]),b=_.some(m=>!!m.icon);return(0,U.jsx)(ua,{isRoot:!u,title:u?u.label:"",backMenuItem:u?.parent,backButtonRef:t,animationDirection:e||void 0,navigationKey:l,onNavigate:c,content:(0,U.jsx)(U.Fragment,{children:_.map(m=>m.parent_type==="dropdown"?(0,U.jsx)(da,{id:m.id,className:"boot-navigation-item",icon:m.icon,shouldShowPlaceholder:b,isExpanded:s===m.id,onToggle:()=>E(m.id),children:m.label},m.id):m.parent_type==="drilldown"?(0,U.jsx)(sa,{id:m.id,icon:m.icon,shouldShowPlaceholder:b,onNavigate:c,children:m.label},m.id):(0,U.jsx)(jt,{to:m.to,icon:m.icon,shouldShowPlaceholder:b,children:m.label},m.id))})})}var ha=Vr;var rt=i(w(),1),ya=i(k(),1),W=i(S(),1),ka=i(F(),1),Ft=i(Te(),1);var Sa=i(Ut(),1),it=i(v(),1);var va=i(w(),1),Ht=i(wa(),1),xa=i(S(),1),at=i(k(),1),_a=i(F(),1),Oe=i(Ut(),1),Be="core/boot/save";function Vt({openSavePanel:t}){let{__experimentalGetDirtyEntityRecords:e,isSavingEntityRecord:o}=(0,at.useSelect)(_a.store),{hasNonPostEntityChanges:a,isPostSavingLocked:r}=(0,at.useSelect)(Oe.store),{savePost:s}=(0,at.useDispatch)(Oe.store),{registerShortcut:n,unregisterShortcut:d}=(0,at.useDispatch)(Ht.store);(0,va.useEffect)(()=>(n({name:Be,category:"global",description:(0,xa.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),()=>{d(Be)}),[n,d]),(0,Ht.useShortcut)(Be,u=>{u.preventDefault();let l=e(),c=!!l.length,E=l.some(_=>o(_.kind,_.name,_.key));!c||E||(a()?t():r()||s())})}var z=i(f(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='a012fe845a']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","a012fe845a"),t.appendChild(document.createTextNode(".boot-save-button{width:100%}")),document.head.appendChild(t)}function Ra(){let[t,e]=(0,rt.useState)(!1),{isSaving:o,dirtyEntityRecordsCount:a}=(0,ya.useSelect)(b=>{let{isSavingEntityRecord:m,__experimentalGetDirtyEntityRecords:Qt}=b(ka.store),We=Qt();return{isSaving:We.some(te=>m(te.kind,te.name,te.key)),dirtyEntityRecordsCount:We.length}},[]),[r,s]=(0,rt.useState)(!1);(0,rt.useEffect)(()=>{o&&s(!0)},[o]);let n=a>0;(0,rt.useEffect)(()=>{!o&&n&&s(!1)},[o,n]);function d(){r&&s(!1)}let u=n||r;if(Vt({openSavePanel:()=>e(!0)}),!u)return null;let l=r&&!n,c=o||l,_=l?(0,W.__)("Saved"):(0,W.sprintf)((0,W._n)("Review %d change\u2026","Review %d changes\u2026",a),a);return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(it.Tooltip,{text:n?_:void 0,shortcut:Ft.displayShortcut.primary("s"),children:(0,z.jsx)(it.Button,{variant:"primary",size:"compact",onClick:()=>e(!0),onBlur:d,disabled:c,accessibleWhenDisabled:!0,isBusy:o,"aria-keyshortcuts":Ft.rawShortcut.primary("s"),className:"boot-save-button",icon:l?pe:void 0,children:_})}),t&&(0,z.jsx)(it.Modal,{title:(0,W.__)("Review changes"),onRequestClose:()=>e(!1),size:"small",children:(0,z.jsx)(Sa.EntitiesSavedStates,{close:()=>e(!1),variant:"inline"})})]})}var H=i(f(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='e5d2041211']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","e5d2041211"),t.appendChild(document.createTextNode(".boot-sidebar__scrollable{display:flex;flex-direction:column;height:100%;overflow:auto;position:relative}.boot-sidebar__content{contain:content;flex-grow:1;position:relative}.boot-sidebar__footer{padding:16px 8px 8px 16px}")),document.head.appendChild(t)}function Ue(){return(0,H.jsxs)("div",{className:"boot-sidebar__scrollable",children:[(0,H.jsx)(Zo,{}),(0,H.jsx)("div",{className:"boot-sidebar__content",children:(0,H.jsx)(ha,{})}),(0,H.jsx)("div",{className:"boot-sidebar__footer",children:(0,H.jsx)(Ra,{})})]})}var Ia=i(w(),1),Na=i(v(),1),Ea=i(Ut(),1),Ca=i(S(),1);var He=i(f(),1);function Gt(){let[t,e]=(0,Ia.useState)(!1);return Vt({openSavePanel:()=>e(!0)}),t?(0,He.jsx)(Na.Modal,{className:"edit-site-save-panel__modal",onRequestClose:()=>e(!1),title:(0,Ca.__)("Review changes"),size:"small",children:(0,He.jsx)(Ea.EntitiesSavedStates,{close:()=>e(!1),variant:"inline"})}):!1}var Wt=i(w(),1);var qt=i(w(),1),Aa=i(v(),1);import{useNavigate as Gr}from"@wordpress/route";var $=i(v(),1);var Pa=i(ut(),1),Ta=i(S(),1);var Y=i(f(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='68d99fe376']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","68d99fe376"),t.appendChild(document.createTextNode(".boot-canvas-back-button{height:64px;left:0;position:absolute;top:0;width:64px;z-index:100}.boot-canvas-back-button__container{height:100%;position:relative;width:100%}.boot-canvas-back-button__link.components-button{align-items:center;background:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);border-radius:0;display:inline-flex;height:64px;justify-content:center;padding:0;text-decoration:none;width:64px}@media not (prefers-reduced-motion){.boot-canvas-back-button__link.components-button{transition:outline .1s ease-out}}.boot-canvas-back-button__link.components-button:focus:not(:active){outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline-offset:calc(var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px))*-1)}.boot-canvas-back-button__icon{align-items:center;background-color:#ccc;display:flex;height:64px;justify-content:center;left:0;pointer-events:none;position:absolute;top:0;width:64px}.boot-canvas-back-button__icon svg{fill:currentColor}.boot-canvas-back-button__icon.has-site-icon{-webkit-backdrop-filter:saturate(180%) blur(15px);backdrop-filter:saturate(180%) blur(15px);background-color:#fff9}.interface-interface-skeleton__header{margin-top:0!important}")),document.head.appendChild(t)}var Fr={edit:{opacity:0,scale:.2},hover:{opacity:1,scale:1,clipPath:"inset( 22% round 2px )"}};function La({length:t}){let e=(0,Pa.useReducedMotion)(),o=()=>{window.history.back()};if(t>1)return null;let a={duration:e?0:.3};return(0,Y.jsxs)($.__unstableMotion.div,{className:"boot-canvas-back-button",animate:"edit",initial:"edit",whileHover:"hover",whileTap:"tap",transition:a,children:[(0,Y.jsx)($.Button,{className:"boot-canvas-back-button__link",onClick:o,"aria-label":(0,Ta.__)("Go back"),__next40pxDefaultSize:!0,children:(0,Y.jsx)(Lt,{})}),(0,Y.jsx)($.__unstableMotion.div,{className:"boot-canvas-back-button__icon",variants:Fr,children:(0,Y.jsx)($.Icon,{icon:ue})})]})}var j=i(f(),1);function Ma({canvas:t}){let[e,o]=(0,qt.useState)(null),a=Gr();if((0,qt.useEffect)(()=>{import("@wordpress/lazy-editor").then(s=>{o(()=>s.Editor)}).catch(s=>{console.error("Failed to load lazy editor:",s)})},[]),!e)return(0,j.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",padding:"2rem"},children:(0,j.jsx)(Aa.Spinner,{})});let r=t.isPreview?void 0:({length:s})=>(0,j.jsx)(La,{length:s});return(0,j.jsxs)("div",{style:{height:"100%",position:"relative"},children:[(0,j.jsx)("div",{style:{height:"100%"},inert:t.isPreview?"true":void 0,children:(0,j.jsx)(e,{postType:t.postType,postId:t.postId,settings:{isPreviewMode:t.isPreview},backButton:r})}),t.isPreview&&t.editLink&&(0,j.jsx)("div",{onClick:()=>a({to:t.editLink}),onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),a({to:t.editLink}))},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:1},role:"button",tabIndex:0,"aria-label":"Click to edit"})]})}var Ve=i(f(),1);function Yt({canvas:t,routeContentModule:e}){let[o,a]=(0,Wt.useState)(null);return(0,Wt.useEffect)(()=>{t===null&&e?import(e).then(r=>{a(()=>r.canvas)}).catch(r=>{console.error("Failed to load custom canvas:",r)}):a(null)},[t,e]),t===void 0?null:t===null?o?(0,Ve.jsx)(o,{}):null:(0,Ve.jsx)(Ma,{canvas:t})}var bt=i(w(),1),Da=i(k(),1),za=i(F(),1),$t=i(S(),1),Fe=i(Pe(),1);import{speak as qr}from"@wordpress/a11y";import{privateApis as Wr}from"@wordpress/route";var{useLocation:Yr,useMatches:$r}=x(Wr);function Kt(){let t=Yr(),e=$r(),a=e[e.length-1]?.loaderData?.title,r=(0,Da.useSelect)(n=>n(za.store).getEntityRecord("root","__unstableBase")?.name,[]),s=(0,bt.useRef)(!0);(0,bt.useEffect)(()=>{s.current=!1},[t]),(0,bt.useEffect)(()=>{if(!s.current&&a&&typeof a=="string"&&r&&typeof r=="string"){let n=(0,Fe.decodeEntities)(a),d=(0,Fe.decodeEntities)(r),u=(0,$t.sprintf)((0,$t.__)("%1$s \u2039 %2$s \u2014 WordPress"),n,d);document.title=u,n&&qr(n,"assertive")}},[a,r,t])}var ja=i(ko(),1);var Ba=i(f(),1),Kr=x(ja.privateApis).ThemeProvider,Xr=new Map([["light","#0085ba"],["modern","#3858e9"],["blue","#096484"],["coffee","#46403c"],["ectoplasm","#523f6d"],["midnight","#e14d43"],["ocean","#627c83"],["sunrise","#dd823b"]]);function Jr(){let t=document.body.className.match(/admin-color-([a-z]+)/)?.[1];return t&&Xr.get(t)}function V({color:t,...e}){let o=Jr();return(0,Ba.jsx)(Kr,{...e,color:{primary:o,...t}})}var p=i(f(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='d1ebf43fe1']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","d1ebf43fe1"),t.appendChild(document.createTextNode(".boot-layout{background:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:row;height:100%;isolation:isolate;width:100%}.boot-layout__sidebar-backdrop{background-color:#00000080;bottom:0;cursor:pointer;left:0;position:fixed;right:0;top:0;z-index:100002}.boot-layout__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}.boot-layout__sidebar.is-mobile{background:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);bottom:0;box-shadow:2px 0 8px #0003;inset-inline-start:0;max-width:85vw;position:fixed;top:0;width:300px;z-index:100003}.boot-layout__mobile-sidebar-drawer{left:0;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout__mobile-sidebar-drawer{top:46px}.boot-layout__mobile-sidebar-drawer{align-items:center;background:var(--wpds-color-bg-surface-neutral,#fff);border-bottom:1px solid var(--wpds-color-stroke-surface-neutral-weak,#ddd);display:flex;justify-content:flex-start;padding:16px;z-index:3}.boot-layout__canvas.has-mobile-drawer{padding-top:65px;position:relative}.boot-layout__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){.boot-layout__surfaces{margin:8px}.boot-layout--single-page .boot-layout__surfaces{margin-top:0;margin-inline-start:0}}.boot-layout__inspector,.boot-layout__stage{background:var(--wpds-color-bg-surface-neutral,#fff);border-radius:0;bottom:0;color:var(--wpds-color-fg-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__inspector,.boot-layout__stage{border-radius:8px;height:auto;margin:0;position:static;width:auto}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:auto}}.boot-layout__stage{z-index:2}@media (min-width:782px){.boot-layout__stage{z-index:auto}}.boot-layout__inspector{z-index:3}@media (min-width:782px){.boot-layout__inspector{z-index:auto}}.boot-layout__canvas{background:var(--wpds-color-bg-surface-neutral,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#ddd);border-radius:0;bottom:0;box-shadow:0 1px 3px #0000001a;color:var(--wpds-color-fg-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw;z-index:1}.boot-layout--single-page .boot-layout__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__canvas{border-radius:8px;height:auto;position:static;width:auto;z-index:auto}.boot-layout--single-page .boot-layout__canvas{height:auto}.boot-layout.has-canvas .boot-layout__stage,.boot-layout__inspector{max-width:400px}}.boot-layout__canvas .interface-interface-skeleton{height:100%;left:0!important;position:relative;top:0!important}.boot-layout.has-full-canvas .boot-layout__surfaces{gap:0;margin:0}.boot-layout.has-full-canvas .boot-layout__inspector,.boot-layout.has-full-canvas .boot-layout__stage{display:none}.boot-layout.has-full-canvas .boot-layout__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;left:0;margin:0;max-width:none;overflow:hidden;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:46px}@media (min-width:782px){.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:32px}}")),document.head.appendChild(t)}var{useLocation:Qr,useMatches:ti,Outlet:ei}=x(Zr);function Ge(){let t=ti(),e=Qr(),o=t[t.length-1],a=o?.loaderData?.canvas,r=o?.loaderData?.routeContentModule,s=a&&!a.isPreview;Kt();let n=(0,Jt.useViewportMatch)("medium","<"),[d,u]=(0,Zt.useState)(!1),l=(0,Jt.useReducedMotion)();return(0,Zt.useEffect)(()=>{u(!1)},[e.pathname,n]),(0,p.jsx)(C.SlotFillProvider,{children:(0,p.jsx)(V,{isRoot:!0,color:{bg:"#f8f8f8"},children:(0,p.jsx)(V,{color:{bg:"#1d2327"},children:(0,p.jsxs)("div",{className:h("boot-layout",{"has-canvas":!!a||a===null,"has-full-canvas":s}),children:[(0,p.jsx)(Gt,{}),(0,p.jsx)(Oa.SnackbarNotices,{className:"boot-notices__snackbar"}),n&&(0,p.jsx)(pt.SidebarToggleFill,{children:(0,p.jsx)(C.Button,{icon:Ct,onClick:()=>u(!0),label:(0,Xt.__)("Open navigation panel"),size:"compact"})}),(0,p.jsx)(C.__unstableAnimatePresence,{children:n&&d&&!s&&(0,p.jsx)(C.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{type:"tween",duration:l?0:.2,ease:"easeOut"},className:"boot-layout__sidebar-backdrop",onClick:()=>u(!1),onKeyDown:c=>{c.key==="Escape"&&u(!1)},role:"button",tabIndex:-1,"aria-label":(0,Xt.__)("Close navigation panel")})}),(0,p.jsx)(C.__unstableAnimatePresence,{children:n&&d&&!s&&(0,p.jsx)(C.__unstableMotion.div,{initial:{x:"-100%"},animate:{x:0},exit:{x:"-100%"},transition:{type:"tween",duration:l?0:.2,ease:"easeOut"},className:"boot-layout__sidebar is-mobile",children:(0,p.jsx)(Ue,{})})}),!n&&!s&&(0,p.jsx)("div",{className:"boot-layout__sidebar",children:(0,p.jsx)(Ue,{})}),(0,p.jsx)("div",{className:"boot-layout__surfaces",children:(0,p.jsxs)(V,{color:{bg:"#ffffff"},children:[(0,p.jsx)(ei,{}),(a||a===null)&&(0,p.jsxs)("div",{className:h("boot-layout__canvas",{"has-mobile-drawer":a?.isPreview&&n}),children:[a?.isPreview&&n&&(0,p.jsx)("div",{className:"boot-layout__mobile-sidebar-drawer",children:(0,p.jsx)(C.Button,{icon:Ct,onClick:()=>u(!0),label:(0,Xt.__)("Open navigation panel"),size:"compact"})}),(0,p.jsx)(Yt,{canvas:a,routeContentModule:r})]})]})})]})})})})}var N=i(f(),1),{createLazyRoute:ai,createRouter:ri,createRootRoute:ii,createRoute:si,RouterProvider:ni,createBrowserHistory:li,parseHref:di,useLoaderData:fi}=x(oi);function ui(){return(0,N.jsx)("div",{className:"boot-layout__stage",children:(0,N.jsx)(pt,{title:(0,qe.__)("Route not found"),hasPadding:!0,children:(0,qe.__)("The page you're looking for does not exist")})})}function mi(t,e){let o=si({getParentRoute:()=>e,path:t.path,beforeLoad:async a=>{if(t.route_module){let s=(await import(t.route_module)).route||{};if(s.beforeLoad)return s.beforeLoad({params:a.params||{},search:a.search||{}})}},loader:async a=>{let r={};t.route_module&&(r=(await import(t.route_module)).route||{});let s={params:a.params||{},search:a.deps||{}},[,n,d,u]=await Promise.all([(0,Ha.resolveSelect)(Va.store).getEntityRecord("root","__unstableBase"),r.loader?r.loader(s):Promise.resolve(void 0),r.canvas?r.canvas(s):Promise.resolve(void 0),r.title?r.title(s):Promise.resolve(void 0)]),l=!0;return r.inspector&&(l=await r.inspector(s)),{...n,canvas:d,inspector:l,title:u,routeContentModule:t.content_module}},loaderDeps:a=>a.search});return o=o.lazy(async()=>{let a=t.content_module?await import(t.content_module):{},r=a.stage,s=a.inspector;return ai(t.path)({component:function(){let{inspector:d}=fi({from:t.path})??{};return(0,N.jsxs)(N.Fragment,{children:[r&&(0,N.jsx)("div",{className:"boot-layout__stage",children:(0,N.jsx)(r,{})}),s&&d&&(0,N.jsx)("div",{className:"boot-layout__inspector",children:(0,N.jsx)(s,{})})]})}})}),o}function pi(t,e=Ge){let o=ii({component:e,context:()=>({})}),a=t.map(r=>mi(r,o));return o.addChildren(a)}function ci(){return li({parseLocation:()=>{let t=new URL(window.location.href),o=`${t.searchParams.get("p")||"/"}${t.hash}`;return di(o,window.history.state)},createHref:t=>{let e=new URLSearchParams(window.location.search);return e.set("p",t),`${window.location.pathname}?${e}`}})}function Fa({routes:t,rootComponent:e=Ge}){let o=(0,Ua.useMemo)(()=>{let a=ci(),r=pi(t,e);return ri({history:a,routeTree:r,defaultPreload:"intent",defaultNotFoundComponent:ui,defaultViewTransition:{types:({fromLocation:s})=>s?["navigate"]:!1}})},[t,e]);return(0,N.jsx)(ni,{router:o})}var Ga=i(Ce(),1),qa=i(v(),1);import{privateApis as hi}from"@wordpress/route";var y=i(f(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='d1ebf43fe1']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","d1ebf43fe1"),t.appendChild(document.createTextNode(".boot-layout{background:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:row;height:100%;isolation:isolate;width:100%}.boot-layout__sidebar-backdrop{background-color:#00000080;bottom:0;cursor:pointer;left:0;position:fixed;right:0;top:0;z-index:100002}.boot-layout__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}.boot-layout__sidebar.is-mobile{background:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);bottom:0;box-shadow:2px 0 8px #0003;inset-inline-start:0;max-width:85vw;position:fixed;top:0;width:300px;z-index:100003}.boot-layout__mobile-sidebar-drawer{left:0;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout__mobile-sidebar-drawer{top:46px}.boot-layout__mobile-sidebar-drawer{align-items:center;background:var(--wpds-color-bg-surface-neutral,#fff);border-bottom:1px solid var(--wpds-color-stroke-surface-neutral-weak,#ddd);display:flex;justify-content:flex-start;padding:16px;z-index:3}.boot-layout__canvas.has-mobile-drawer{padding-top:65px;position:relative}.boot-layout__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){.boot-layout__surfaces{margin:8px}.boot-layout--single-page .boot-layout__surfaces{margin-top:0;margin-inline-start:0}}.boot-layout__inspector,.boot-layout__stage{background:var(--wpds-color-bg-surface-neutral,#fff);border-radius:0;bottom:0;color:var(--wpds-color-fg-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__inspector,.boot-layout__stage{border-radius:8px;height:auto;margin:0;position:static;width:auto}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:auto}}.boot-layout__stage{z-index:2}@media (min-width:782px){.boot-layout__stage{z-index:auto}}.boot-layout__inspector{z-index:3}@media (min-width:782px){.boot-layout__inspector{z-index:auto}}.boot-layout__canvas{background:var(--wpds-color-bg-surface-neutral,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#ddd);border-radius:0;bottom:0;box-shadow:0 1px 3px #0000001a;color:var(--wpds-color-fg-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw;z-index:1}.boot-layout--single-page .boot-layout__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__canvas{border-radius:8px;height:auto;position:static;width:auto;z-index:auto}.boot-layout--single-page .boot-layout__canvas{height:auto}.boot-layout.has-canvas .boot-layout__stage,.boot-layout__inspector{max-width:400px}}.boot-layout__canvas .interface-interface-skeleton{height:100%;left:0!important;position:relative;top:0!important}.boot-layout.has-full-canvas .boot-layout__surfaces{gap:0;margin:0}.boot-layout.has-full-canvas .boot-layout__inspector,.boot-layout.has-full-canvas .boot-layout__stage{display:none}.boot-layout.has-full-canvas .boot-layout__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;left:0;margin:0;max-width:none;overflow:hidden;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:46px}@media (min-width:782px){.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:32px}}")),document.head.appendChild(t)}var{useMatches:gi,Outlet:bi}=x(hi);function Wa(){let t=gi(),e=t[t.length-1],o=e?.loaderData?.canvas,a=e?.loaderData?.routeContentModule,r=o&&!o.isPreview;return Kt(),(0,y.jsx)(qa.SlotFillProvider,{children:(0,y.jsx)(V,{isRoot:!0,color:{bg:"#f8f8f8"},children:(0,y.jsx)(V,{color:{bg:"#1d2327"},children:(0,y.jsxs)("div",{className:h("boot-layout boot-layout--single-page",{"has-canvas":!!o||o===null,"has-full-canvas":r}),children:[(0,y.jsx)(Gt,{}),(0,y.jsx)(Ga.SnackbarNotices,{className:"boot-notices__snackbar"}),(0,y.jsx)("div",{className:"boot-layout__surfaces",children:(0,y.jsxs)(V,{color:{bg:"#ffffff"},children:[(0,y.jsx)(bi,{}),(o||o===null)&&(0,y.jsx)("div",{className:"boot-layout__canvas",children:(0,y.jsx)(Yt,{canvas:o,routeContentModule:a})})]})})]})})})})}var st=i(f(),1);function Ya({rootComponent:t}){let e=(0,K.useSelect)(o=>o(P).getRoutes(),[]);return(0,st.jsx)(Fa,{routes:e,rootComponent:t})}async function wi({mountId:t,menuItems:e,routes:o,initModules:a,dashboardLink:r}){(e??[]).forEach(n=>{(0,K.dispatch)(P).registerMenuItem(n.id,n)}),(o??[]).forEach(n=>{(0,K.dispatch)(P).registerRoute(n)}),r&&(0,K.dispatch)(P).setDashboardLink(r);for(let n of a??[])await(await import(n)).init();let s=document.getElementById(t);s&&(0,nt.createRoot)(s).render((0,st.jsx)(nt.StrictMode,{children:(0,st.jsx)(Ya,{})}))}async function vi({mountId:t,routes:e}){(e??[]).forEach(a=>{(0,K.dispatch)(P).registerRoute(a)});let o=document.getElementById(t);o&&(0,nt.createRoot)(o).render((0,st.jsx)(nt.StrictMode,{children:(0,st.jsx)(Ya,{rootComponent:Wa})}))}if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='e39fdc0848']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","e39fdc0848"),t.appendChild(document.createTextNode(':root{--wpds-border-radius-lg:8px;--wpds-border-radius-md:4px;--wpds-border-radius-sm:2px;--wpds-border-radius-xs:1px;--wpds-border-width-focus:2px;--wpds-border-width-lg:8px;--wpds-border-width-md:4px;--wpds-border-width-sm:2px;--wpds-border-width-xs:1px;--wpds-color-bg-interactive-brand-strong:#3858e9;--wpds-color-bg-interactive-brand-strong-active:#2e49d9;--wpds-color-bg-interactive-brand-weak:#0000;--wpds-color-bg-interactive-brand-weak-active:#e6eaf4;--wpds-color-bg-interactive-error:#0000;--wpds-color-bg-interactive-error-active:#fff6f4;--wpds-color-bg-interactive-error-strong:#cc1818;--wpds-color-bg-interactive-error-strong-active:#b90000;--wpds-color-bg-interactive-error-weak:#0000;--wpds-color-bg-interactive-error-weak-active:#f6e6e3;--wpds-color-bg-interactive-neutral-strong:#2d2d2d;--wpds-color-bg-interactive-neutral-strong-active:#1e1e1e;--wpds-color-bg-interactive-neutral-strong-disabled:#e2e2e2;--wpds-color-bg-interactive-neutral-weak:#0000;--wpds-color-bg-interactive-neutral-weak-active:#eaeaea;--wpds-color-bg-interactive-neutral-weak-disabled:#0000;--wpds-color-bg-surface-brand:#ecf0f9;--wpds-color-bg-surface-caution:#fee994;--wpds-color-bg-surface-caution-weak:#fff9c9;--wpds-color-bg-surface-error:#f6e6e3;--wpds-color-bg-surface-error-weak:#fff6f4;--wpds-color-bg-surface-info:#deebfa;--wpds-color-bg-surface-info-weak:#f2f9ff;--wpds-color-bg-surface-neutral:#f8f8f8;--wpds-color-bg-surface-neutral-strong:#fff;--wpds-color-bg-surface-neutral-weak:#f0f0f0;--wpds-color-bg-surface-success:#c5f7cc;--wpds-color-bg-surface-success-weak:#eaffed;--wpds-color-bg-surface-warning:#fde6bd;--wpds-color-bg-surface-warning-weak:#fff7e0;--wpds-color-bg-thumb-brand:#3858e9;--wpds-color-bg-thumb-brand-active:#3858e9;--wpds-color-bg-thumb-neutral-disabled:#d8d8d8;--wpds-color-bg-thumb-neutral-weak:#8a8a8a;--wpds-color-bg-thumb-neutral-weak-active:#6c6c6c;--wpds-color-bg-track-neutral:#d8d8d8;--wpds-color-bg-track-neutral-weak:#e0e0e0;--wpds-color-fg-content-caution:#281d00;--wpds-color-fg-content-caution-weak:#826a00;--wpds-color-fg-content-error:#470000;--wpds-color-fg-content-error-weak:#cc1818;--wpds-color-fg-content-info:#001b4f;--wpds-color-fg-content-info-weak:#006bd7;--wpds-color-fg-content-neutral:#1e1e1e;--wpds-color-fg-content-neutral-weak:#6d6d6d;--wpds-color-fg-content-success:#002900;--wpds-color-fg-content-success-weak:#007f30;--wpds-color-fg-content-warning:#2e1900;--wpds-color-fg-content-warning-weak:#926300;--wpds-color-fg-interactive-brand:#3858e9;--wpds-color-fg-interactive-brand-active:#3858e9;--wpds-color-fg-interactive-brand-strong:#eff0f2;--wpds-color-fg-interactive-brand-strong-active:#eff0f2;--wpds-color-fg-interactive-error:#cc1818;--wpds-color-fg-interactive-error-active:#cc1818;--wpds-color-fg-interactive-error-strong:#f2efef;--wpds-color-fg-interactive-error-strong-active:#f2efef;--wpds-color-fg-interactive-neutral:#1e1e1e;--wpds-color-fg-interactive-neutral-active:#1e1e1e;--wpds-color-fg-interactive-neutral-disabled:#8a8a8a;--wpds-color-fg-interactive-neutral-strong:#f0f0f0;--wpds-color-fg-interactive-neutral-strong-active:#f0f0f0;--wpds-color-fg-interactive-neutral-strong-disabled:#8a8a8a;--wpds-color-fg-interactive-neutral-weak:#6d6d6d;--wpds-color-fg-interactive-neutral-weak-disabled:#8a8a8a;--wpds-color-stroke-focus-brand:#3858e9;--wpds-color-stroke-interactive-brand:#3858e9;--wpds-color-stroke-interactive-brand-active:#2337c8;--wpds-color-stroke-interactive-error:#cc1818;--wpds-color-stroke-interactive-error-active:#9d0000;--wpds-color-stroke-interactive-error-strong:#cc1818;--wpds-color-stroke-interactive-neutral:#8a8a8a;--wpds-color-stroke-interactive-neutral-active:#6c6c6c;--wpds-color-stroke-interactive-neutral-disabled:#d8d8d8;--wpds-color-stroke-interactive-neutral-strong:#6c6c6c;--wpds-color-stroke-surface-brand:#a3b1d4;--wpds-color-stroke-surface-brand-strong:#3858e9;--wpds-color-stroke-surface-error:#daa39b;--wpds-color-stroke-surface-error-strong:#cc1818;--wpds-color-stroke-surface-info:#9fbcdc;--wpds-color-stroke-surface-info-strong:#006bd7;--wpds-color-stroke-surface-neutral:#d8d8d8;--wpds-color-stroke-surface-neutral-strong:#8a8a8a;--wpds-color-stroke-surface-neutral-weak:#e0e0e0;--wpds-color-stroke-surface-success:#8ac894;--wpds-color-stroke-surface-success-strong:#007f30;--wpds-color-stroke-surface-warning:#d0b381;--wpds-color-stroke-surface-warning-strong:#926300;--wpds-dimension-base:4px;--wpds-dimension-gap-2xl:32px;--wpds-dimension-gap-3xl:40px;--wpds-dimension-gap-lg:16px;--wpds-dimension-gap-md:12px;--wpds-dimension-gap-sm:8px;--wpds-dimension-gap-xl:24px;--wpds-dimension-gap-xs:4px;--wpds-dimension-padding-2xl:24px;--wpds-dimension-padding-3xl:32px;--wpds-dimension-padding-lg:16px;--wpds-dimension-padding-md:12px;--wpds-dimension-padding-sm:8px;--wpds-dimension-padding-xl:20px;--wpds-dimension-padding-xs:4px;--wpds-elevation-lg:0 5px 15px 0 #00000014,0 15px 27px 0 #00000012,0 30px 36px 0 #0000000a,0 50px 43px 0 #00000005;--wpds-elevation-md:0 2px 3px 0 #0000000d,0 4px 5px 0 #0000000a,0 12px 12px 0 #00000008,0 16px 16px 0 #00000005;--wpds-elevation-sm:0 1px 2px 0 #0000000d,0 2px 3px 0 #0000000a,0 6px 6px 0 #00000008,0 8px 8px 0 #00000005;--wpds-elevation-xs:0 1px 1px 0 #00000008,0 1px 2px 0 #00000005,0 3px 3px 0 #00000005,0 4px 4px 0 #00000003;--wpds-font-family-body:-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif;--wpds-font-family-heading:-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif;--wpds-font-family-mono:"Menlo","Consolas",monaco,monospace;--wpds-font-line-height-2xl:40px;--wpds-font-line-height-lg:28px;--wpds-font-line-height-md:24px;--wpds-font-line-height-sm:20px;--wpds-font-line-height-xl:32px;--wpds-font-line-height-xs:16px;--wpds-font-size-2xl:32px;--wpds-font-size-lg:15px;--wpds-font-size-md:13px;--wpds-font-size-sm:12px;--wpds-font-size-xl:20px;--wpds-font-size-xs:11px;--wpds-font-weight-medium:499;--wpds-font-weight-regular:400}[data-wpds-theme-provider-id][data-wpds-density=compact]{--wpds-dimension-gap-2xl:24px;--wpds-dimension-gap-3xl:32px;--wpds-dimension-gap-lg:12px;--wpds-dimension-gap-md:8px;--wpds-dimension-gap-sm:4px;--wpds-dimension-gap-xl:20px;--wpds-dimension-gap-xs:4px;--wpds-dimension-padding-2xl:20px;--wpds-dimension-padding-3xl:24px;--wpds-dimension-padding-lg:12px;--wpds-dimension-padding-md:8px;--wpds-dimension-padding-sm:4px;--wpds-dimension-padding-xl:16px;--wpds-dimension-padding-xs:4px}[data-wpds-theme-provider-id][data-wpds-density=comfortable]{--wpds-dimension-gap-2xl:40px;--wpds-dimension-gap-3xl:48px;--wpds-dimension-gap-lg:20px;--wpds-dimension-gap-md:16px;--wpds-dimension-gap-sm:12px;--wpds-dimension-gap-xl:32px;--wpds-dimension-gap-xs:8px;--wpds-dimension-padding-2xl:32px;--wpds-dimension-padding-3xl:40px;--wpds-dimension-padding-lg:20px;--wpds-dimension-padding-md:16px;--wpds-dimension-padding-sm:12px;--wpds-dimension-padding-xl:24px;--wpds-dimension-padding-xs:8px}[data-wpds-theme-provider-id][data-wpds-density=default]{--wpds-dimension-base:4px;--wpds-dimension-gap-2xl:32px;--wpds-dimension-gap-3xl:40px;--wpds-dimension-gap-lg:16px;--wpds-dimension-gap-md:12px;--wpds-dimension-gap-sm:8px;--wpds-dimension-gap-xl:24px;--wpds-dimension-gap-xs:4px;--wpds-dimension-padding-2xl:24px;--wpds-dimension-padding-3xl:32px;--wpds-dimension-padding-lg:16px;--wpds-dimension-padding-md:12px;--wpds-dimension-padding-sm:8px;--wpds-dimension-padding-xl:20px;--wpds-dimension-padding-xs:4px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){:root{--wpds-border-width-focus:1.5px}}.admin-ui-page{text-wrap:pretty;background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}.admin-ui-page__header{background:var(--wpds-color-bg-surface-neutral-strong,#fff);border-bottom:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#e0e0e0);padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;top:0;z-index:1}.admin-ui-page__header-title{font-family:var(--wpds-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-xl,20px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wpds-font-line-height-xl,32px);margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.admin-ui-page__sidebar-toggle-slot:empty{display:none}.admin-ui-page__header-subtitle{color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d);font-size:var(--wpds-font-size-md,13px);line-height:var(--wpds-font-line-height-md,24px);margin:0;padding-block-end:var(--wpds-dimension-padding-xs,4px)}.admin-ui-page__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto}.admin-ui-page__content.has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon{padding:0 var(--wpds-dimension-padding-xs,4px);width:auto}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon svg{display:none}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon:after{content:attr(aria-label);font-size:var(--wpds-font-size-sm,12px)}.admin-ui-breadcrumbs__list{font-size:15px;font-weight:500;gap:0;list-style:none;margin:0;min-height:32px;padding:0}.admin-ui-breadcrumbs__list li:not(:last-child):after{content:"/";margin:0 8px}.admin-ui-breadcrumbs__list h1{font-size:inherit;line-height:inherit}@media (min-width:600px){.boot-layout-container .boot-layout{bottom:0;left:0;min-height:calc(100vh - 46px);position:absolute;right:0;top:0}}@media (min-width:782px){.boot-layout-container .boot-layout{min-height:calc(100vh - 32px)}body:has(.boot-layout.has-full-canvas) .boot-layout-container .boot-layout{min-height:100vh}}.boot-layout-container .boot-layout img{height:auto;max-width:100%}.boot-layout .boot-notices__snackbar{bottom:24px;box-sizing:border-box;display:flex;flex-direction:column;left:0;padding-inline:16px;pointer-events:none;position:fixed;right:0}.boot-layout .boot-notices__snackbar .components-snackbar{margin-inline:auto}')),document.head.appendChild(t)}if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='2a741c061f']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","2a741c061f"),t.appendChild(document.createTextNode("@media (max-width:782px){*{view-transition-name:none!important}}::view-transition-new(root),::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){.boot-layout__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}.boot-layout__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.boot-layout.has-full-canvas .boot-layout__canvas .boot-site-icon-link,.boot-layout:not(.has-full-canvas) .boot-site-hub .boot-site-icon-link{view-transition-name:boot--site-icon-link}.boot-layout__stage{view-transition-name:boot--stage}.boot-layout__inspector{view-transition-name:boot--inspector}.boot-layout__canvas.is-full-canvas .interface-interface-skeleton__content,.boot-layout__canvas:not(.is-full-canvas){view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.boot-layout__stage{view-transition-name:boot-safari--stage}.boot-layout__inspector{view-transition-name:boot-safari--inspector}.boot-layout__canvas.is-full-canvas .interface-interface-skeleton__content,.boot-layout__canvas:not(.is-full-canvas){view-transition-name:boot-safari--canvas}}.components-popover:first-of-type{view-transition-name:boot--components-popover}}::view-transition-group(boot--canvas),::view-transition-group(boot--canvas-header),::view-transition-group(boot--canvas-sidebar),::view-transition-group(boot-safari--canvas){z-index:1}::view-transition-group(boot--site-icon-link){z-index:2}::view-transition-new(boot--site-icon-link),::view-transition-old(boot--site-icon-link){animation:none}::view-transition-new(boot-safari--canvas),::view-transition-new(boot-safari--inspector),::view-transition-new(boot-safari--stage),::view-transition-old(boot-safari--canvas),::view-transition-old(boot-safari--inspector),::view-transition-old(boot-safari--stage){width:auto}::view-transition-new(boot--canvas),::view-transition-new(boot--inspector),::view-transition-new(boot--stage),::view-transition-old(boot--canvas),::view-transition-old(boot--inspector),::view-transition-old(boot--stage){background:#fff;border-radius:8px;height:100%;object-fit:none;object-position:left top;overflow:hidden;width:100%}::view-transition-new(boot--canvas),::view-transition-old(boot--canvas){object-position:center top}::view-transition-old(boot--inspector):only-child,::view-transition-old(boot--stage):only-child,::view-transition-old(boot-safari--inspector):only-child,::view-transition-old(boot-safari--stage):only-child{animation-name:zoomOut;will-change:transform,opacity}::view-transition-new(boot--inspector):only-child,::view-transition-new(boot--stage):only-child,::view-transition-new(boot-safari--inspector):only-child,::view-transition-new(boot-safari--stage):only-child{animation-name:zoomIn;will-change:transform,opacity}@keyframes zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}::view-transition-new(boot--canvas):only-child,::view-transition-new(boot-safari--canvas):only-child{animation-name:slideFromRight;will-change:transform}::view-transition-old(boot--canvas):only-child,::view-transition-old(boot-safari--canvas):only-child{animation-name:slideToRight;will-change:transform}@keyframes slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}::view-transition-new(boot--canvas-header):only-child{animation-name:slideHeaderFromTop;will-change:transform}::view-transition-old(boot--canvas-header):only-child{animation-name:slideHeaderToTop;will-change:transform}@keyframes slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes slideHeaderToTop{to{transform:translateY(-100%)}}::view-transition-new(boot--canvas-sidebar):only-child{animation-name:slideSidebarFromRight;will-change:transform}::view-transition-old(boot--canvas-sidebar):only-child{animation-name:slideSidebarToRight;will-change:transform}@keyframes slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes slideSidebarToRight{to{transform:translateX(100%)}}")),document.head.appendChild(t)}export{wi as init,vi as initSinglePage,P as store};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         dist/script-modules/boot/index.js                                                                   0000644                 00000337040 15212564030 0013076 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));

// package-external:@wordpress/element
var require_element = __commonJS({
  "package-external:@wordpress/element"(exports, module) {
    module.exports = window.wp.element;
  }
});

// package-external:@wordpress/data
var require_data = __commonJS({
  "package-external:@wordpress/data"(exports, module) {
    module.exports = window.wp.data;
  }
});

// package-external:@wordpress/i18n
var require_i18n = __commonJS({
  "package-external:@wordpress/i18n"(exports, module) {
    module.exports = window.wp.i18n;
  }
});

// package-external:@wordpress/components
var require_components = __commonJS({
  "package-external:@wordpress/components"(exports, module) {
    module.exports = window.wp.components;
  }
});

// vendor-external:react/jsx-runtime
var require_jsx_runtime = __commonJS({
  "vendor-external:react/jsx-runtime"(exports, module) {
    module.exports = window.ReactJSXRuntime;
  }
});

// vendor-external:react
var require_react = __commonJS({
  "vendor-external:react"(exports, module) {
    module.exports = window.React;
  }
});

// package-external:@wordpress/primitives
var require_primitives = __commonJS({
  "package-external:@wordpress/primitives"(exports, module) {
    module.exports = window.wp.primitives;
  }
});

// package-external:@wordpress/theme
var require_theme = __commonJS({
  "package-external:@wordpress/theme"(exports, module) {
    module.exports = window.wp.theme;
  }
});

// package-external:@wordpress/private-apis
var require_private_apis = __commonJS({
  "package-external:@wordpress/private-apis"(exports, module) {
    module.exports = window.wp.privateApis;
  }
});

// package-external:@wordpress/compose
var require_compose = __commonJS({
  "package-external:@wordpress/compose"(exports, module) {
    module.exports = window.wp.compose;
  }
});

// package-external:@wordpress/core-data
var require_core_data = __commonJS({
  "package-external:@wordpress/core-data"(exports, module) {
    module.exports = window.wp.coreData;
  }
});

// package-external:@wordpress/notices
var require_notices = __commonJS({
  "package-external:@wordpress/notices"(exports, module) {
    module.exports = window.wp.notices;
  }
});

// package-external:@wordpress/html-entities
var require_html_entities = __commonJS({
  "package-external:@wordpress/html-entities"(exports, module) {
    module.exports = window.wp.htmlEntities;
  }
});

// package-external:@wordpress/keycodes
var require_keycodes = __commonJS({
  "package-external:@wordpress/keycodes"(exports, module) {
    module.exports = window.wp.keycodes;
  }
});

// package-external:@wordpress/commands
var require_commands = __commonJS({
  "package-external:@wordpress/commands"(exports, module) {
    module.exports = window.wp.commands;
  }
});

// package-external:@wordpress/url
var require_url = __commonJS({
  "package-external:@wordpress/url"(exports, module) {
    module.exports = window.wp.url;
  }
});

// package-external:@wordpress/editor
var require_editor = __commonJS({
  "package-external:@wordpress/editor"(exports, module) {
    module.exports = window.wp.editor;
  }
});

// package-external:@wordpress/keyboard-shortcuts
var require_keyboard_shortcuts = __commonJS({
  "package-external:@wordpress/keyboard-shortcuts"(exports, module) {
    module.exports = window.wp.keyboardShortcuts;
  }
});

// packages/boot/build-module/components/app/index.mjs
var import_element16 = __toESM(require_element(), 1);
var import_data11 = __toESM(require_data(), 1);

// packages/boot/build-module/components/app/router.mjs
var import_i18n11 = __toESM(require_i18n(), 1);
var import_element15 = __toESM(require_element(), 1);

// node_modules/clsx/dist/clsx.mjs
function 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 = 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 = r(e)) && (n && (n += " "), n += t);
  return n;
}
var clsx_default = clsx;

// packages/admin-ui/build-module/navigable-region/index.mjs
var import_element = __toESM(require_element(), 1);
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
var NavigableRegion = (0, import_element.forwardRef)(
  ({ children, className, ariaLabel, as: Tag = "div", ...props }, ref) => {
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
      Tag,
      {
        ref,
        className: clsx_default("admin-ui-navigable-region", className),
        "aria-label": ariaLabel,
        role: "region",
        tabIndex: "-1",
        ...props,
        children
      }
    );
  }
);
NavigableRegion.displayName = "NavigableRegion";
var navigable_region_default = NavigableRegion;

// node_modules/@base-ui/utils/esm/useRefWithInit.js
var React = __toESM(require_react(), 1);
var UNINITIALIZED = {};
function useRefWithInit(init2, initArg) {
  const ref = React.useRef(UNINITIALIZED);
  if (ref.current === UNINITIALIZED) {
    ref.current = init2(initArg);
  }
  return ref;
}

// node_modules/@base-ui/react/esm/utils/useRenderElement.js
var React4 = __toESM(require_react(), 1);

// node_modules/@base-ui/utils/esm/useMergedRefs.js
function useMergedRefs(a, b, c, d) {
  const forkRef = useRefWithInit(createForkRef).current;
  if (didChange(forkRef, a, b, c, d)) {
    update(forkRef, [a, b, c, d]);
  }
  return forkRef.callback;
}
function useMergedRefsN(refs) {
  const forkRef = useRefWithInit(createForkRef).current;
  if (didChangeN(forkRef, refs)) {
    update(forkRef, refs);
  }
  return forkRef.callback;
}
function createForkRef() {
  return {
    callback: null,
    cleanup: null,
    refs: []
  };
}
function didChange(forkRef, a, b, c, d) {
  return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
}
function didChangeN(forkRef, newRefs) {
  return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);
}
function update(forkRef, refs) {
  forkRef.refs = refs;
  if (refs.every((ref) => ref == null)) {
    forkRef.callback = null;
    return;
  }
  forkRef.callback = (instance) => {
    if (forkRef.cleanup) {
      forkRef.cleanup();
      forkRef.cleanup = null;
    }
    if (instance != null) {
      const cleanupCallbacks = Array(refs.length).fill(null);
      for (let i = 0; i < refs.length; i += 1) {
        const ref = refs[i];
        if (ref == null) {
          continue;
        }
        switch (typeof ref) {
          case "function": {
            const refCleanup = ref(instance);
            if (typeof refCleanup === "function") {
              cleanupCallbacks[i] = refCleanup;
            }
            break;
          }
          case "object": {
            ref.current = instance;
            break;
          }
          default:
        }
      }
      forkRef.cleanup = () => {
        for (let i = 0; i < refs.length; i += 1) {
          const ref = refs[i];
          if (ref == null) {
            continue;
          }
          switch (typeof ref) {
            case "function": {
              const cleanupCallback = cleanupCallbacks[i];
              if (typeof cleanupCallback === "function") {
                cleanupCallback();
              } else {
                ref(null);
              }
              break;
            }
            case "object": {
              ref.current = null;
              break;
            }
            default:
          }
        }
      };
    }
  };
}

// node_modules/@base-ui/utils/esm/getReactElementRef.js
var React3 = __toESM(require_react(), 1);

// node_modules/@base-ui/utils/esm/reactVersion.js
var React2 = __toESM(require_react(), 1);
var majorVersion = parseInt(React2.version, 10);
function isReactVersionAtLeast(reactVersionToCheck) {
  return majorVersion >= reactVersionToCheck;
}

// node_modules/@base-ui/utils/esm/getReactElementRef.js
function getReactElementRef(element) {
  if (!/* @__PURE__ */ React3.isValidElement(element)) {
    return null;
  }
  const reactElement = element;
  const propsWithRef = reactElement.props;
  return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
}

// node_modules/@base-ui/utils/esm/mergeObjects.js
function mergeObjects(a, b) {
  if (a && !b) {
    return a;
  }
  if (!a && b) {
    return b;
  }
  if (a || b) {
    return {
      ...a,
      ...b
    };
  }
  return void 0;
}

// node_modules/@base-ui/react/esm/utils/getStateAttributesProps.js
function getStateAttributesProps(state, customMapping) {
  const props = {};
  for (const key in state) {
    const value = state[key];
    if (customMapping?.hasOwnProperty(key)) {
      const customProps = customMapping[key](value);
      if (customProps != null) {
        Object.assign(props, customProps);
      }
      continue;
    }
    if (value === true) {
      props[`data-${key.toLowerCase()}`] = "";
    } else if (value) {
      props[`data-${key.toLowerCase()}`] = value.toString();
    }
  }
  return props;
}

// node_modules/@base-ui/react/esm/utils/resolveClassName.js
function resolveClassName(className, state) {
  return typeof className === "function" ? className(state) : className;
}

// node_modules/@base-ui/react/esm/utils/resolveStyle.js
function resolveStyle(style, state) {
  return typeof style === "function" ? style(state) : style;
}

// node_modules/@base-ui/react/esm/merge-props/mergeProps.js
var EMPTY_PROPS = {};
function mergeProps(a, b, c, d, e) {
  let merged = {
    ...resolvePropsGetter(a, EMPTY_PROPS)
  };
  if (b) {
    merged = mergeOne(merged, b);
  }
  if (c) {
    merged = mergeOne(merged, c);
  }
  if (d) {
    merged = mergeOne(merged, d);
  }
  if (e) {
    merged = mergeOne(merged, e);
  }
  return merged;
}
function mergePropsN(props) {
  if (props.length === 0) {
    return EMPTY_PROPS;
  }
  if (props.length === 1) {
    return resolvePropsGetter(props[0], EMPTY_PROPS);
  }
  let merged = {
    ...resolvePropsGetter(props[0], EMPTY_PROPS)
  };
  for (let i = 1; i < props.length; i += 1) {
    merged = mergeOne(merged, props[i]);
  }
  return merged;
}
function mergeOne(merged, inputProps) {
  if (isPropsGetter(inputProps)) {
    return inputProps(merged);
  }
  return mutablyMergeInto(merged, inputProps);
}
function mutablyMergeInto(mergedProps, externalProps) {
  if (!externalProps) {
    return mergedProps;
  }
  for (const propName in externalProps) {
    const externalPropValue = externalProps[propName];
    switch (propName) {
      case "style": {
        mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
        break;
      }
      case "className": {
        mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
        break;
      }
      default: {
        if (isEventHandler(propName, externalPropValue)) {
          mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
        } else {
          mergedProps[propName] = externalPropValue;
        }
      }
    }
  }
  return mergedProps;
}
function isEventHandler(key, value) {
  const code0 = key.charCodeAt(0);
  const code1 = key.charCodeAt(1);
  const code2 = key.charCodeAt(2);
  return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
}
function isPropsGetter(inputProps) {
  return typeof inputProps === "function";
}
function resolvePropsGetter(inputProps, previousProps) {
  if (isPropsGetter(inputProps)) {
    return inputProps(previousProps);
  }
  return inputProps ?? EMPTY_PROPS;
}
function mergeEventHandlers(ourHandler, theirHandler) {
  if (!theirHandler) {
    return ourHandler;
  }
  if (!ourHandler) {
    return theirHandler;
  }
  return (event) => {
    if (isSyntheticEvent(event)) {
      const baseUIEvent = event;
      makeEventPreventable(baseUIEvent);
      const result2 = theirHandler(baseUIEvent);
      if (!baseUIEvent.baseUIHandlerPrevented) {
        ourHandler?.(baseUIEvent);
      }
      return result2;
    }
    const result = theirHandler(event);
    ourHandler?.(event);
    return result;
  };
}
function makeEventPreventable(event) {
  event.preventBaseUIHandler = () => {
    event.baseUIHandlerPrevented = true;
  };
  return event;
}
function mergeClassNames(ourClassName, theirClassName) {
  if (theirClassName) {
    if (ourClassName) {
      return theirClassName + " " + ourClassName;
    }
    return theirClassName;
  }
  return ourClassName;
}
function isSyntheticEvent(event) {
  return event != null && typeof event === "object" && "nativeEvent" in event;
}

// node_modules/@base-ui/utils/esm/empty.js
var EMPTY_ARRAY = Object.freeze([]);
var EMPTY_OBJECT = Object.freeze({});

// node_modules/@base-ui/react/esm/utils/useRenderElement.js
var import_react = __toESM(require_react(), 1);
function useRenderElement(element, componentProps, params = {}) {
  const renderProp = componentProps.render;
  const outProps = useRenderElementProps(componentProps, params);
  if (params.enabled === false) {
    return null;
  }
  const state = params.state ?? EMPTY_OBJECT;
  return evaluateRenderProp(element, renderProp, outProps, state);
}
function useRenderElementProps(componentProps, params = {}) {
  const {
    className: classNameProp,
    style: styleProp,
    render: renderProp
  } = componentProps;
  const {
    state = EMPTY_OBJECT,
    ref,
    props,
    stateAttributesMapping,
    enabled = true
  } = params;
  const className = enabled ? resolveClassName(classNameProp, state) : void 0;
  const style = enabled ? resolveStyle(styleProp, state) : void 0;
  const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT;
  const outProps = enabled ? mergeObjects(stateProps, Array.isArray(props) ? mergePropsN(props) : props) ?? EMPTY_OBJECT : EMPTY_OBJECT;
  if (typeof document !== "undefined") {
    if (!enabled) {
      useMergedRefs(null, null);
    } else if (Array.isArray(ref)) {
      outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
    } else {
      outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
    }
  }
  if (!enabled) {
    return EMPTY_OBJECT;
  }
  if (className !== void 0) {
    outProps.className = mergeClassNames(outProps.className, className);
  }
  if (style !== void 0) {
    outProps.style = mergeObjects(outProps.style, style);
  }
  return outProps;
}
function evaluateRenderProp(element, render, props, state) {
  if (render) {
    if (typeof render === "function") {
      return render(props, state);
    }
    const mergedProps = mergeProps(props, render.props);
    mergedProps.ref = props.ref;
    return /* @__PURE__ */ React4.cloneElement(render, mergedProps);
  }
  if (element) {
    if (typeof element === "string") {
      return renderTag(element, props);
    }
  }
  throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage(8));
}
function renderTag(Tag, props) {
  if (Tag === "button") {
    return /* @__PURE__ */ (0, import_react.createElement)("button", {
      type: "button",
      ...props,
      key: props.key
    });
  }
  if (Tag === "img") {
    return /* @__PURE__ */ (0, import_react.createElement)("img", {
      alt: "",
      ...props,
      key: props.key
    });
  }
  return /* @__PURE__ */ React4.createElement(Tag, props);
}

// node_modules/@base-ui/react/esm/use-render/useRender.js
function useRender(params) {
  return useRenderElement(params.defaultTagName ?? "div", params, params);
}

// packages/icons/build-module/icon/index.mjs
var import_element2 = __toESM(require_element(), 1);
var icon_default = (0, import_element2.forwardRef)(
  ({ icon, size = 24, ...props }, ref) => {
    return (0, import_element2.cloneElement)(icon, {
      width: size,
      height: size,
      ...props,
      ref
    });
  }
);

// packages/icons/build-module/library/arrow-up-left.mjs
var import_primitives = __toESM(require_primitives(), 1);
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
var arrow_up_left_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives.Path, { d: "M14 6H6v8h1.5V8.5L17 18l1-1-9.5-9.5H14V6Z" }) });

// packages/icons/build-module/library/check.mjs
var import_primitives2 = __toESM(require_primitives(), 1);
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
var check_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives2.Path, { d: "M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z" }) });

// packages/icons/build-module/library/chevron-down-small.mjs
var import_primitives3 = __toESM(require_primitives(), 1);
var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
var chevron_down_small_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives3.Path, { d: "m15.99 10.889-3.988 3.418-3.988-3.418.976-1.14 3.012 2.582 3.012-2.581.976 1.139Z" }) });

// packages/icons/build-module/library/chevron-left-small.mjs
var import_primitives4 = __toESM(require_primitives(), 1);
var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
var chevron_left_small_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives4.Path, { d: "m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z" }) });

// packages/icons/build-module/library/chevron-left.mjs
var import_primitives5 = __toESM(require_primitives(), 1);
var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
var chevron_left_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives5.Path, { d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z" }) });

// packages/icons/build-module/library/chevron-right-small.mjs
var import_primitives6 = __toESM(require_primitives(), 1);
var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
var chevron_right_small_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives6.Path, { d: "M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z" }) });

// packages/icons/build-module/library/chevron-right.mjs
var import_primitives7 = __toESM(require_primitives(), 1);
var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
var chevron_right_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives7.Path, { d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z" }) });

// packages/icons/build-module/library/menu.mjs
var import_primitives8 = __toESM(require_primitives(), 1);
var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
var menu_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives8.Path, { d: "M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z" }) });

// packages/icons/build-module/library/search.mjs
var import_primitives9 = __toESM(require_primitives(), 1);
var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
var search_default = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives9.Path, { 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" }) });

// packages/icons/build-module/library/wordpress.mjs
var import_primitives10 = __toESM(require_primitives(), 1);
var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
var wordpress_default = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives10.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives10.Path, { 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" }) });

// packages/ui/build-module/stack/stack.mjs
var import_element3 = __toESM(require_element(), 1);
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='71d20935c2']")) {
  const style = document.createElement("style");
  style.setAttribute("data-wp-hash", "71d20935c2");
  style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}"));
  document.head.appendChild(style);
}
var style_default = { "stack": "_19ce0419607e1896__stack" };
var gapTokens = {
  xs: "var(--wpds-dimension-gap-xs, 4px)",
  sm: "var(--wpds-dimension-gap-sm, 8px)",
  md: "var(--wpds-dimension-gap-md, 12px)",
  lg: "var(--wpds-dimension-gap-lg, 16px)",
  xl: "var(--wpds-dimension-gap-xl, 24px)",
  "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
  "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
};
var Stack = (0, import_element3.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
  const style = {
    gap: gap && gapTokens[gap],
    alignItems: align,
    justifyContent: justify,
    flexDirection: direction,
    flexWrap: wrap
  };
  const element = useRender({
    render,
    ref,
    props: mergeProps(props, { style, className: style_default.stack })
  });
  return element;
});

// packages/admin-ui/build-module/page/sidebar-toggle-slot.mjs
var import_components = __toESM(require_components(), 1);
var { Fill: SidebarToggleFill, Slot: SidebarToggleSlot } = (0, import_components.createSlotFill)("SidebarToggle");

// packages/admin-ui/build-module/page/header.mjs
var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
function Header({
  headingLevel = 1,
  breadcrumbs,
  badges,
  title,
  subTitle,
  actions,
  showSidebarToggle = true
}) {
  const HeadingTag = `h${headingLevel}`;
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Stack, { direction: "column", className: "admin-ui-page__header", children: [
    /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Stack, { direction: "row", justify: "space-between", gap: "sm", children: [
      /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Stack, { direction: "row", gap: "sm", align: "center", justify: "start", children: [
        showSidebarToggle && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
          SidebarToggleSlot,
          {
            bubblesVirtually: true,
            className: "admin-ui-page__sidebar-toggle-slot"
          }
        ),
        title && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(HeadingTag, { className: "admin-ui-page__header-title", children: title }),
        breadcrumbs,
        badges
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
        Stack,
        {
          direction: "row",
          gap: "sm",
          style: { width: "auto", flexShrink: 0 },
          className: "admin-ui-page__header-actions",
          align: "center",
          children: actions
        }
      )
    ] }),
    subTitle && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "admin-ui-page__header-subtitle", children: subTitle })
  ] });
}

// packages/admin-ui/build-module/page/index.mjs
var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
function Page({
  headingLevel,
  breadcrumbs,
  badges,
  title,
  subTitle,
  children,
  className,
  actions,
  hasPadding = false,
  showSidebarToggle = true
}) {
  const classes = clsx_default("admin-ui-page", className);
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(navigable_region_default, { className: classes, ariaLabel: title, children: [
    (title || breadcrumbs || badges) && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
      Header,
      {
        headingLevel,
        breadcrumbs,
        badges,
        title,
        subTitle,
        actions,
        showSidebarToggle
      }
    ),
    hasPadding ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "admin-ui-page__content has-padding", children }) : children
  ] });
}
Page.SidebarToggleFill = SidebarToggleFill;
var page_default = Page;

// packages/boot/build-module/components/app/router.mjs
var import_data10 = __toESM(require_data(), 1);
var import_core_data6 = __toESM(require_core_data(), 1);
import {
  privateApis as routePrivateApis6
} from "@wordpress/route";

// packages/boot/build-module/components/root/index.mjs
var import_notices = __toESM(require_notices(), 1);
var import_compose4 = __toESM(require_compose(), 1);
var import_components14 = __toESM(require_components(), 1);
import { privateApis as routePrivateApis5 } from "@wordpress/route";
var import_element14 = __toESM(require_element(), 1);
var import_i18n10 = __toESM(require_i18n(), 1);

// packages/boot/build-module/components/site-hub/index.mjs
var import_data3 = __toESM(require_data(), 1);
var import_components3 = __toESM(require_components(), 1);
var import_i18n2 = __toESM(require_i18n(), 1);
var import_core_data2 = __toESM(require_core_data(), 1);
var import_html_entities = __toESM(require_html_entities(), 1);
var import_keycodes = __toESM(require_keycodes(), 1);
var import_commands = __toESM(require_commands(), 1);
var import_url = __toESM(require_url(), 1);

// packages/boot/build-module/components/site-icon-link/index.mjs
var import_components2 = __toESM(require_components(), 1);
import { Link, privateApis as routePrivateApis } from "@wordpress/route";

// packages/boot/build-module/lock-unlock.mjs
var import_private_apis = __toESM(require_private_apis(), 1);
var { lock, unlock } = (0, import_private_apis.__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/boot"
);

// packages/boot/build-module/components/site-icon/index.mjs
var import_data = __toESM(require_data(), 1);
var import_i18n = __toESM(require_i18n(), 1);
var import_core_data = __toESM(require_core_data(), 1);
var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='1a8e849690']")) {
  const style = document.createElement("style");
  style.setAttribute("data-wp-hash", "1a8e849690");
  style.appendChild(document.createTextNode(".boot-site-icon{display:flex}.boot-site-icon__icon{fill:var(--wpds-color-fg-content-neutral,#1e1e1e);height:32px;width:32px}.boot-site-icon__image{aspect-ratio:1/1;border-radius:var(--wpds-border-radius-md,4px);height:32px;object-fit:cover;width:32px}"));
  document.head.appendChild(style);
}
function SiteIcon({ className }) {
  const { isRequestingSite, siteIconUrl } = (0, import_data.useSelect)((select) => {
    const { getEntityRecord } = select(import_core_data.store);
    const siteData = getEntityRecord(
      "root",
      "__unstableBase",
      void 0
    );
    return {
      isRequestingSite: !siteData,
      siteIconUrl: siteData?.site_icon_url
    };
  }, []);
  let icon = null;
  if (isRequestingSite && !siteIconUrl) {
    icon = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "boot-site-icon__image" });
  } else {
    icon = siteIconUrl ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
      "img",
      {
        className: "boot-site-icon__image",
        alt: (0, import_i18n.__)("Site Icon"),
        src: siteIconUrl
      }
    ) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
      icon_default,
      {
        className: "boot-site-icon__icon",
        icon: wordpress_default,
        size: 48
      }
    );
  }
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: clsx_default(className, "boot-site-icon"), children: icon });
}
var site_icon_default = SiteIcon;

// packages/boot/build-module/components/site-icon-link/index.mjs
var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='3de37b6316']")) {
  const style = document.createElement("style");
  style.setAttribute("data-wp-hash", "3de37b6316");
  style.appendChild(document.createTextNode(".boot-site-icon-link{align-items:center;background:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);display:inline-flex;height:64px;justify-content:center;text-decoration:none;width:64px}@media not (prefers-reduced-motion){.boot-site-icon-link{transition:outline .1s ease-out}}.boot-site-icon-link:focus:not(:active){outline:var(--wpds-border-width-focus,2px) solid var(--wpds-color-stroke-focus-brand,#0073aa);outline-offset:calc(var(--wpds-border-width-focus, 2px)*-1)}"));
  document.head.appendChild(style);
}
var { useCanGoBack, useRouter } = unlock(routePrivateApis);
function SiteIconLink({
  to,
  isBackButton,
  ...props
}) {
  const router = useRouter();
  const canGoBack = useCanGoBack();
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_components2.Tooltip, { text: props["aria-label"], placement: "right", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
    Link,
    {
      to,
      "aria-label": props["aria-label"],
      className: "boot-site-icon-link",
      onClick: (event) => {
        if (canGoBack && isBackButton) {
          event.preventDefault();
          router.history.back();
        }
      },
      children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(site_icon_default, {})
    }
  ) });
}
var site_icon_link_default = SiteIconLink;

// packages/boot/build-module/store/index.mjs
var import_data2 = __toESM(require_data(), 1);

// packages/boot/build-module/store/reducer.mjs
var initialState = {
  menuItems: {},
  routes: [],
  dashboardLink: void 0
};
function reducer(state = initialState, action) {
  switch (action.type) {
    case "REGISTER_MENU_ITEM":
      return {
        ...state,
        menuItems: {
          ...state.menuItems,
          [action.id]: action.menuItem
        }
      };
    case "UPDATE_MENU_ITEM":
      return {
        ...state,
        menuItems: {
          ...state.menuItems,
          [action.id]: {
            ...state.menuItems[action.id],
            ...action.updates
          }
        }
      };
    case "REGISTER_ROUTE":
      return {
        ...state,
        routes: [...state.routes, action.route]
      };
    case "SET_DASHBOARD_LINK":
      return {
        ...state,
        dashboardLink: action.dashboardLink
      };
  }
  return state;
}

// packages/boot/build-module/store/actions.mjs
var actions_exports = {};
__export(actions_exports, {
  registerMenuItem: () => registerMenuItem,
  registerRoute: () => registerRoute,
  setDashboardLink: () => setDashboardLink,
  updateMenuItem: () => updateMenuItem
});
function registerMenuItem(id, menuItem) {
  return {
    type: "REGISTER_MENU_ITEM",
    id,
    menuItem
  };
}
function updateMenuItem(id, updates) {
  return {
    type: "UPDATE_MENU_ITEM",
    id,
    updates
  };
}
function registerRoute(route) {
  return {
    type: "REGISTER_ROUTE",
    route
  };
}
function setDashboardLink(dashboardLink) {
  return {
    type: "SET_DASHBOARD_LINK",
    dashboardLink
  };
}

// packages/boot/build-module/store/selectors.mjs
var selectors_exports = {};
__export(selectors_exports, {
  getDashboardLink: () => getDashboardLink,
  getMenuItems: () => getMenuItems,
  getRoutes: () => getRoutes
});
function getMenuItems(state) {
  return Object.values(state.menuItems);
}
function getRoutes(state) {
  return state.routes;
}
function getDashboardLink(state) {
  return state.dashboardLink;
}

// packages/boot/build-module/store/index.mjs
var STORE_NAME = "wordpress/boot";
var store = (0, import_data2.createReduxStore)(STORE_NAME, {
  reducer,
  actions: actions_exports,
  selectors: selectors_exports
});
(0, import_data2.register)(store);

// packages/boot/build-module/components/site-hub/index.mjs
var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='78184fe2c5']")) {
  const style = document.createElement("style");
  style.setAttribute("data-wp-hash", "78184fe2c5");
  style.appendChild(document.createTextNode(".boot-site-hub{align-items:center;background-color:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);display:grid;flex-shrink:0;grid-template-columns:60px 1fr auto;padding-right:16px;position:sticky;top:0;z-index:1}.boot-site-hub__actions{flex-shrink:0}.boot-site-hub__title{align-items:center;display:flex;text-decoration:none}.boot-site-hub__title .components-external-link__contents{margin-inline-start:4px;max-width:140px;overflow:hidden;text-decoration:none}.boot-site-hub__title .components-external-link__icon{opacity:0;transition:opacity .1s ease-out}.boot-site-hub__title:hover .components-external-link__icon{opacity:1}@media not (prefers-reduced-motion){.boot-site-hub__title{transition:outline .1s ease-out}}.boot-site-hub__title:focus:not(:active){outline:var(--wpds-border-width-focus,2px) solid var(--wpds-color-stroke-focus-brand,#0073aa);outline-offset:calc(var(--wpds-border-width-focus, 2px)*-1)}.boot-site-hub__title-text{color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-size:13px;font-weight:499}.boot-site-hub__title-text,.boot-site-hub__url{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.boot-site-hub__url{color:var(--wpds-color-fg-content-neutral-weak,#757575);font-size:12px}"));
  document.head.appendChild(style);
}
function SiteHub() {
  const { dashboardLink, homeUrl, siteTitle } = (0, import_data3.useSelect)((select) => {
    const { getEntityRecord } = select(import_core_data2.store);
    const _base = getEntityRecord(
      "root",
      "__unstableBase"
    );
    return {
      dashboardLink: select(store).getDashboardLink(),
      homeUrl: _base?.home,
      siteTitle: !_base?.name && !!_base?.url ? (0, import_url.filterURLForDisplay)(_base?.url) : _base?.name
    };
  }, []);
  const { open: openCommandCenter } = (0, import_data3.useDispatch)(import_commands.store);
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "boot-site-hub", children: [
    /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
      site_icon_link_default,
      {
        to: dashboardLink || "/",
        "aria-label": (0, import_i18n2.__)("Go to the Dashboard")
      }
    ),
    /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
      import_components3.ExternalLink,
      {
        href: homeUrl ?? "/",
        className: "boot-site-hub__title",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "boot-site-hub__title-text", children: siteTitle && (0, import_html_entities.decodeEntities)(siteTitle) }),
          /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "boot-site-hub__url", children: (0, import_url.filterURLForDisplay)(homeUrl ?? "") })
        ]
      }
    ),
    /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_components3.__experimentalHStack, { className: "boot-site-hub__actions", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
      import_components3.Button,
      {
        variant: "tertiary",
        icon: search_default,
        onClick: () => openCommandCenter(),
        size: "compact",
        label: (0, import_i18n2.__)("Open command palette"),
        shortcut: import_keycodes.displayShortcut.primary("k")
      }
    ) })
  ] });
}
var site_hub_default = SiteHub;

// packages/boot/build-module/components/navigation/index.mjs
var import_element7 = __toESM(require_element(), 1);
var import_data6 = __toESM(require_data(), 1);

// packages/boot/build-module/components/navigation/navigation-item/index.mjs
var import_components6 = __toESM(require_components(), 1);

// packages/boot/build-module/components/navigation/router-link-item.mjs
var import_element4 = __toESM(require_element(), 1);
var import_components4 = __toESM(require_components(), 1);
import { privateApis as routePrivateApis2 } from "@wordpress/route";
var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
var { createLink } = unlock(routePrivateApis2);
function AnchorOnlyItem(props, forwardedRef) {
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_components4.__experimentalItem, { as: "a", ref: forwardedRef, ...props });
}
var RouterLinkItem = createLink((0, import_element4.forwardRef)(AnchorOnlyItem));
var router_link_item_default = RouterLinkItem;

// packages/boot/build-module/components/navigation/items.mjs
var import_element5 = __toESM(require_element(), 1);
var import_components5 = __toESM(require_components(), 1);
var import_primitives11 = __toESM(require_primitives(), 1);
var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
function isSvg(element) {
  return (0, import_element5.isValidElement)(element) && (element.type === import_primitives11.SVG || element.type === "svg");
}
function wrapIcon(icon, shouldShowPlaceholder = true) {
  if (isSvg(icon)) {
    return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_components5.Icon, { icon });
  }
  if (typeof icon === "string" && icon.startsWith("dashicons-")) {
    const iconKey = icon.replace(
      /^dashicons-/,
      ""
    );
    return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
      import_components5.Dashicon,
      {
        style: { padding: "2px" },
        icon: iconKey,
        "aria-hidden": "true"
      }
    );
  }
  if (typeof icon === "string" && icon.startsWith("data:")) {
    return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
      "img",
      {
        src: icon,
        alt: "",
        "aria-hidden": "true",
        style: {
          width: "20px",
          height: "20px",
          display: "block",
          padding: "2px"
        }
      }
    );
  }
  if (icon) {
    return icon;
  }
  if (shouldShowPlaceholder) {
    return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
      "div",
      {
        style: { width: "24px", height: "24px" },
        "aria-hidden": "true"
      }
    );
  }
  return null;
}

// packages/boot/build-module/components/navigation/navigation-item/index.mjs
var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='ead8c8ad15']")) {
  const style = document.createElement("style");
  style.setAttribute("data-wp-hash", "ead8c8ad15");
  style.appendChild(document.createTextNode('.boot-navigation-item.components-item{align-items:center;border:none;color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);display:flex;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:400;line-height:20px;margin-block-end:4px;margin-inline:12px;min-height:32px;padding-block:0;padding-inline:4px;width:calc(100% - 24px)}.boot-dropdown-item__children .boot-navigation-item.components-item{min-height:24px}.boot-navigation-item.components-item{border-radius:var(--wpds-border-radius-sm,2px)}.boot-navigation-item.components-item.active,.boot-navigation-item.components-item:focus,.boot-navigation-item.components-item:hover,.boot-navigation-item.components-item[aria-current=true]{color:var(--wpds-color-fg-interactive-brand-active,#0073aa)}.boot-navigation-item.components-item.active{font-weight:499}.boot-navigation-item.components-item svg:last-child{padding:4px}.boot-navigation-item.components-item[aria-current=true]{color:var(--wpds-color-fg-interactive-brand-active,#0073aa);font-weight:499}.boot-navigation-item.components-item:focus-visible{transform:translateZ(0)}.boot-navigation-item.components-item.with-suffix{padding-right:16px}'));
  document.head.appendChild(style);
}
function NavigationItem({
  className,
  icon,
  shouldShowPlaceholder = true,
  children,
  to
}) {
  const isExternal = !String(
    new URL(to, window.location.origin)
  ).startsWith(window.location.origin);
  const content = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_components6.__experimentalHStack, { justify: "flex-start", spacing: 2, style: { flexGrow: "1" }, children: [
    wrapIcon(icon, shouldShowPlaceholder),
    /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_components6.FlexBlock, { children })
  ] });
  if (isExternal) {
    return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
      import_components6.__experimentalItem,
      {
        as: "a",
        href: to,
        className: clsx_default("boot-navigation-item", className),
        children: content
      }
    );
  }
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
    router_link_item_default,
    {
      to,
      className: clsx_default("boot-navigation-item", className),
      children: content
    }
  );
}

// packages/boot/build-module/components/navigation/drilldown-item/index.mjs
var import_components7 = __toESM(require_components(), 1);
var import_i18n3 = __toESM(require_i18n(), 1);
var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
function DrilldownItem({
  className,
  id,
  icon,
  shouldShowPlaceholder = true,
  children,
  onNavigate
}) {
  const handleClick = (e) => {
    e.preventDefault();
    onNavigate({ id, direction: "forward" });
  };
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
    import_components7.__experimentalItem,
    {
      className: clsx_default("boot-navigation-item", className),
      onClick: handleClick,
      children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
        import_components7.__experimentalHStack,
        {
          justify: "flex-start",
          spacing: 2,
          style: { flexGrow: "1" },
          children: [
            wrapIcon(icon, shouldShowPlaceholder),
            /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_components7.FlexBlock, { children }),
            /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_components7.Icon, { icon: (0, import_i18n3.isRTL)() ? chevron_left_small_default : chevron_right_small_default })
          ]
        }
      )
    }
  );
}

// packages/boot/build-module/components/navigation/dropdown-item/index.mjs
var import_components8 = __toESM(require_components(), 1);
var import_compose = __toESM(require_compose(), 1);
var import_data4 = __toESM(require_data(), 1);
var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='58e2debd11']")) {
  const style = document.createElement("style");
  style.setAttribute("data-wp-hash", "58e2debd11");
  style.appendChild(document.createTextNode(".boot-dropdown-item__children{display:flex;flex-direction:column;margin-block-end:2px;margin-block-start:-2px;margin-inline-start:30px;overflow:hidden;padding:2px}.boot-dropdown-item__chevron.is-up{transform:rotate(180deg)}"));
  document.head.appendChild(style);
}
var ANIMATION_DURATION = 0.2;
function DropdownItem({
  className,
  id,
  icon,
  children,
  isExpanded,
  onToggle
}) {
  const menuItems = (0, import_data4.useSelect)(
    (select) => (
      // @ts-ignore
      select(STORE_NAME).getMenuItems()
    ),
    []
  );
  const items = menuItems.filter((item) => item.parent === id);
  const disableMotion = (0, import_compose.useReducedMotion)();
  return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "boot-dropdown-item", children: [
    /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
      import_components8.__experimentalItem,
      {
        className: clsx_default("boot-navigation-item", className),
        onClick: (e) => {
          e.preventDefault();
          e.stopPropagation();
          onToggle();
        },
        onMouseDown: (e) => e.preventDefault(),
        children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
          import_components8.__experimentalHStack,
          {
            justify: "flex-start",
            spacing: 2,
            style: { flexGrow: "1" },
            children: [
              wrapIcon(icon, false),
              /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components8.FlexBlock, { children }),
              /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
                import_components8.Icon,
                {
                  icon: chevron_down_small_default,
                  className: clsx_default("boot-dropdown-item__chevron", {
                    "is-up": isExpanded
                  })
                }
              )
            ]
          }
        )
      }
    ),
    /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components8.__unstableAnimatePresence, { initial: false, children: isExpanded && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
      import_components8.__unstableMotion.div,
      {
        initial: { height: 0 },
        animate: { height: "auto" },
        exit: { height: 0 },
        transition: {
          type: "tween",
          duration: disableMotion ? 0 : ANIMATION_DURATION,
          ease: "easeOut"
        },
        className: "boot-dropdown-item__children",
        children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
          NavigationItem,
          {
            to: item.to,
            shouldShowPlaceholder: false,
            children: item.label
          },
          index
        ))
      }
    ) })
  ] });
}

// packages/boot/build-module/components/navigation/navigation-screen/index.mjs
var import_components9 = __toESM(require_components(), 1);
var import_i18n4 = __toESM(require_i18n(), 1);
var import_compose2 = __toESM(require_compose(), 1);
var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='c52b1efb2f']")) {
  const style = document.createElement("style");
  style.setAttribute("data-wp-hash", "c52b1efb2f");
  style.appendChild(document.createTextNode(".boot-navigation-screen{padding-block-end:4px}.boot-navigation-screen .components-text{color:var(--wpds-color-fg-content-neutral,#1e1e1e)}.boot-navigation-screen__title-icon{padding:12px 16px 8px;position:sticky;top:0}.boot-navigation-screen__title{flex-grow:1;overflow-wrap:break-word}.boot-navigation-screen__title.boot-navigation-screen__title,.boot-navigation-screen__title.boot-navigation-screen__title .boot-navigation-screen__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);line-height:32px}.boot-navigation-screen__actions{display:flex;flex-shrink:0}"));
  document.head.appendChild(style);
}
var ANIMATION_DURATION2 = 0.3;
var slideVariants = {
  initial: (direction) => ({
    x: direction === "forward" ? 100 : -100,
    opacity: 0
  }),
  animate: {
    x: 0,
    opacity: 1
  },
  exit: (direction) => ({
    x: direction === "forward" ? 100 : -100,
    opacity: 0
  })
};
function NavigationScreen({
  isRoot,
  title,
  actions,
  content,
  description,
  animationDirection,
  backMenuItem,
  backButtonRef,
  navigationKey,
  onNavigate
}) {
  const icon = (0, import_i18n4.isRTL)() ? chevron_right_default : chevron_left_default;
  const disableMotion = (0, import_compose2.useReducedMotion)();
  const handleBackClick = (e) => {
    e.preventDefault();
    onNavigate({ id: backMenuItem, direction: "backward" });
  };
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
    "div",
    {
      className: "boot-navigation-screen",
      style: {
        overflow: "hidden",
        position: "relative",
        display: "grid",
        gridTemplateColumns: "1fr",
        gridTemplateRows: "1fr"
      },
      children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_components9.__unstableAnimatePresence, { initial: false, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
        import_components9.__unstableMotion.div,
        {
          custom: animationDirection,
          variants: slideVariants,
          initial: "initial",
          animate: "animate",
          exit: "exit",
          transition: {
            type: "tween",
            duration: disableMotion ? 0 : ANIMATION_DURATION2,
            ease: [0.33, 0, 0, 1]
          },
          style: {
            width: "100%",
            gridColumn: "1",
            gridRow: "1"
          },
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
              import_components9.__experimentalHStack,
              {
                spacing: 2,
                className: "boot-navigation-screen__title-icon",
                children: [
                  !isRoot && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
                    import_components9.Button,
                    {
                      ref: backButtonRef,
                      icon,
                      onClick: handleBackClick,
                      label: (0, import_i18n4.__)("Back"),
                      size: "small",
                      variant: "tertiary"
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
                    import_components9.__experimentalHeading,
                    {
                      className: "boot-navigation-screen__title",
                      level: 1,
                      size: "15px",
                      children: title
                    }
                  ),
                  actions && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "boot-navigation-screen__actions", children: actions })
                ]
              }
            ),
            description && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "boot-navigation-screen__description", children: description }),
            content
          ]
        },
        navigationKey
      ) })
    }
  );
}

// packages/boot/build-module/components/navigation/use-sidebar-parent.mjs
var import_element6 = __toESM(require_element(), 1);
var import_data5 = __toESM(require_data(), 1);
import { privateApis as routePrivateApis3 } from "@wordpress/route";

// packages/boot/build-module/components/navigation/path-matching.mjs
var isValidParentPath = (currentPath, menuPath) => {
  if (!menuPath || menuPath === currentPath) {
    return false;
  }
  const normalizePath = (path) => {
    const normalized = path.startsWith("/") ? path : "/" + path;
    return normalized.endsWith("/") && normalized.length > 1 ? normalized.slice(0, -1) : normalized;
  };
  const normalizedCurrent = normalizePath(currentPath);
  const normalizedMenu = normalizePath(menuPath);
  return normalizedCurrent.startsWith(normalizedMenu) && (normalizedCurrent[normalizedMenu.length] === "/" || normalizedMenu === "/");
};
var findClosestMenuItem = (currentPath, menuItems) => {
  const exactMatch = menuItems.find((item) => item.to === currentPath);
  if (exactMatch) {
    return exactMatch;
  }
  let bestMatch = null;
  let bestPathLength = 0;
  for (const item of menuItems) {
    if (!item.to) {
      continue;
    }
    if (isValidParentPath(currentPath, item.to)) {
      if (item.to.length > bestPathLength) {
        bestMatch = item;
        bestPathLength = item.to.length;
      }
    }
  }
  return bestMatch;
};
var findDrilldownParent = (id, menuItems) => {
  if (!id) {
    return void 0;
  }
  const currentItem = menuItems.find((item) => item.id === id);
  if (!currentItem) {
    return void 0;
  }
  if (currentItem.parent) {
    const parentItem = menuItems.find(
      (item) => item.id === currentItem.parent
    );
    if (parentItem?.parent_type === "drilldown") {
      return parentItem.id;
    }
    if (parentItem) {
      return findDrilldownParent(parentItem.id, menuItems);
    }
  }
  return void 0;
};
var findDropdownParent = (id, menuItems) => {
  if (!id) {
    return void 0;
  }
  const currentItem = menuItems.find((item) => item.id === id);
  if (!currentItem) {
    return void 0;
  }
  if (currentItem.parent) {
    const parentItem = menuItems.find(
      (item) => item.id === currentItem.parent
    );
    if (parentItem?.parent_type === "dropdown") {
      return parentItem.id;
    }
  }
  return void 0;
};

// packages/boot/build-module/components/navigation/use-sidebar-parent.mjs
var { useRouter: useRouter2, useMatches } = unlock(routePrivateApis3);
function useSidebarParent() {
  const matches = useMatches();
  const router = useRouter2();
  const menuItems = (0, import_data5.useSelect)(
    (select) => (
      // @ts-ignore
      select(STORE_NAME).getMenuItems()
    ),
    []
  );
  const currentPath = matches[matches.length - 1].pathname.slice(
    router.options.basepath?.length ?? 0
  );
  const currentMenuItem = findClosestMenuItem(currentPath, menuItems);
  const [parentId, setParentId] = (0, import_element6.useState)(
    findDrilldownParent(currentMenuItem?.id, menuItems)
  );
  const [parentDropdownId, setParentDropdownId] = (0, import_element6.useState)(findDropdownParent(currentMenuItem?.id, menuItems));
  (0, import_element6.useEffect)(() => {
    const matchedMenuItem = findClosestMenuItem(currentPath, menuItems);
    const updatedParentId = findDrilldownParent(
      matchedMenuItem?.id,
      menuItems
    );
    const updatedDropdownParent = findDropdownParent(
      matchedMenuItem?.id,
      menuItems
    );
    setParentId(updatedParentId);
    setParentDropdownId(updatedDropdownParent);
  }, [currentPath, menuItems]);
  return [
    parentId,
    setParentId,
    parentDropdownId,
    setParentDropdownId
  ];
}

// packages/boot/build-module/components/navigation/index.mjs
var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
function Navigation() {
  const backButtonRef = (0, import_element7.useRef)(null);
  const [animationDirection, setAnimationDirection] = (0, import_element7.useState)(null);
  const [parentId, setParentId, parentDropdownId, setParentDropdownId] = useSidebarParent();
  const menuItems = (0, import_data6.useSelect)(
    (select) => (
      // @ts-ignore
      select(STORE_NAME).getMenuItems()
    ),
    []
  );
  const parent = (0, import_element7.useMemo)(
    () => menuItems.find((item) => item.id === parentId),
    [menuItems, parentId]
  );
  const navigationKey = parent ? `drilldown-${parent.id}` : "root";
  const handleNavigate = ({
    id,
    direction
  }) => {
    setAnimationDirection(direction);
    setParentId(id);
  };
  const handleDropdownToggle = (dropdownId) => {
    setParentDropdownId(
      parentDropdownId === dropdownId ? void 0 : dropdownId
    );
  };
  const items = (0, import_element7.useMemo)(
    () => menuItems.filter((item) => item.parent === parentId),
    [menuItems, parentId]
  );
  const hasRealIcons = items.some((item) => !!item.icon);
  return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
    NavigationScreen,
    {
      isRoot: !parent,
      title: parent ? parent.label : "",
      backMenuItem: parent?.parent,
      backButtonRef,
      animationDirection: animationDirection || void 0,
      navigationKey,
      onNavigate: handleNavigate,
      content: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_jsx_runtime23.Fragment, { children: items.map((item) => {
        if (item.parent_type === "dropdown") {
          return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
            DropdownItem,
            {
              id: item.id,
              className: "boot-navigation-item",
              icon: item.icon,
              shouldShowPlaceholder: hasRealIcons,
              isExpanded: parentDropdownId === item.id,
              onToggle: () => handleDropdownToggle(item.id),
              children: item.label
            },
            item.id
          );
        }
        if (item.parent_type === "drilldown") {
          return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
            DrilldownItem,
            {
              id: item.id,
              icon: item.icon,
              shouldShowPlaceholder: hasRealIcons,
              onNavigate: handleNavigate,
              children: item.label
            },
            item.id
          );
        }
        return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
          NavigationItem,
          {
            to: item.to,
            icon: item.icon,
            shouldShowPlaceholder: hasRealIcons,
            children: item.label
          },
          item.id
        );
      }) })
    }
  );
}
var navigation_default = Navigation;

// packages/boot/build-module/components/save-button/index.mjs
var import_element9 = __toESM(require_element(), 1);
var import_data8 = __toESM(require_data(), 1);
var import_i18n6 = __toESM(require_i18n(), 1);
var import_core_data4 = __toESM(require_core_data(), 1);
var import_keycodes2 = __toESM(require_keycodes(), 1);
var import_editor2 = __toESM(require_editor(), 1);
var import_components10 = __toESM(require_components(), 1);

// packages/boot/build-module/components/save-panel/use-save-shortcut.mjs
var import_element8 = __toESM(require_element(), 1);
var import_keyboard_shortcuts = __toESM(require_keyboard_shortcuts(), 1);
var import_i18n5 = __toESM(require_i18n(), 1);
var import_data7 = __toESM(require_data(), 1);
var import_core_data3 = __toESM(require_core_data(), 1);
var import_editor = __toESM(require_editor(), 1);
var shortcutName = "core/boot/save";
function useSaveShortcut({
  openSavePanel
}) {
  const { __experimentalGetDirtyEntityRecords, isSavingEntityRecord } = (0, import_data7.useSelect)(import_core_data3.store);
  const { hasNonPostEntityChanges, isPostSavingLocked } = (0, import_data7.useSelect)(import_editor.store);
  const { savePost } = (0, import_data7.useDispatch)(import_editor.store);
  const { registerShortcut, unregisterShortcut } = (0, import_data7.useDispatch)(
    import_keyboard_shortcuts.store
  );
  (0, import_element8.useEffect)(() => {
    registerShortcut({
      name: shortcutName,
      category: "global",
      description: (0, import_i18n5.__)("Save your changes."),
      keyCombination: {
        modifier: "primary",
        character: "s"
      }
    });
    return () => {
      unregisterShortcut(shortcutName);
    };
  }, [registerShortcut, unregisterShortcut]);
  (0, import_keyboard_shortcuts.useShortcut)(shortcutName, (event) => {
    event.preventDefault();
    const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
    const hasDirtyEntities = !!dirtyEntityRecords.length;
    const isSaving = dirtyEntityRecords.some(
      (record) => isSavingEntityRecord(record.kind, record.name, record.key)
    );
    if (!hasDirtyEntities || isSaving) {
      return;
    }
    if (hasNonPostEntityChanges()) {
      openSavePanel();
    } else if (!isPostSavingLocked()) {
      savePost();
    }
  });
}

// packages/boot/build-module/components/save-button/index.mjs
var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='a012fe845a']")) {
  const style = document.createElement("style");
  style.setAttribute("data-wp-hash", "a012fe845a");
  style.appendChild(document.createTextNode(".boot-save-button{width:100%}"));
  document.head.appendChild(style);
}
function SaveButton() {
  const [isSaveViewOpen, setIsSaveViewOpened] = (0, import_element9.useState)(false);
  const { isSaving, dirtyEntityRecordsCount } = (0, import_data8.useSelect)((select) => {
    const { isSavingEntityRecord, __experimentalGetDirtyEntityRecords } = select(import_core_data4.store);
    const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
    return {
      isSaving: dirtyEntityRecords.some(
        (record) => isSavingEntityRecord(record.kind, record.name, record.key)
      ),
      dirtyEntityRecordsCount: dirtyEntityRecords.length
    };
  }, []);
  const [showSavedState, setShowSavedState] = (0, import_element9.useState)(false);
  (0, import_element9.useEffect)(() => {
    if (isSaving) {
      setShowSavedState(true);
    }
  }, [isSaving]);
  const hasChanges = dirtyEntityRecordsCount > 0;
  (0, import_element9.useEffect)(() => {
    if (!isSaving && hasChanges) {
      setShowSavedState(false);
    }
  }, [isSaving, hasChanges]);
  function hideSavedState() {
    if (showSavedState) {
      setShowSavedState(false);
    }
  }
  const shouldShowButton = hasChanges || showSavedState;
  useSaveShortcut({ openSavePanel: () => setIsSaveViewOpened(true) });
  if (!shouldShowButton) {
    return null;
  }
  const isInSavedState = showSavedState && !hasChanges;
  const disabled = isSaving || isInSavedState;
  const getLabel = () => {
    if (isInSavedState) {
      return (0, import_i18n6.__)("Saved");
    }
    return (0, import_i18n6.sprintf)(
      // translators: %d: number of unsaved changes (number).
      (0, import_i18n6._n)(
        "Review %d change\u2026",
        "Review %d changes\u2026",
        dirtyEntityRecordsCount
      ),
      dirtyEntityRecordsCount
    );
  };
  const label = getLabel();
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
    /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
      import_components10.Tooltip,
      {
        text: hasChanges ? label : void 0,
        shortcut: import_keycodes2.displayShortcut.primary("s"),
        children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
          import_components10.Button,
          {
            variant: "primary",
            size: "compact",
            onClick: () => setIsSaveViewOpened(true),
            onBlur: hideSavedState,
            disabled,
            accessibleWhenDisabled: true,
            isBusy: isSaving,
            "aria-keyshortcuts": import_keycodes2.rawShortcut.primary("s"),
            className: "boot-save-button",
            icon: isInSavedState ? check_default : void 0,
            children: label
          }
        )
      }
    ),
    isSaveViewOpen && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
      import_components10.Modal,
      {
        title: (0, import_i18n6.__)("Review changes"),
        onRequestClose: () => setIsSaveViewOpened(false),
        size: "small",
        children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
          import_editor2.EntitiesSavedStates,
          {
            close: () => setIsSaveViewOpened(false),
            variant: "inline"
          }
        )
      }
    )
  ] });
}

// packages/boot/build-module/components/sidebar/index.mjs
var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='e5d2041211']")) {
  const style = document.createElement("style");
  style.setAttribute("data-wp-hash", "e5d2041211");
  style.appendChild(document.createTextNode(".boot-sidebar__scrollable{display:flex;flex-direction:column;height:100%;overflow:auto;position:relative}.boot-sidebar__content{contain:content;flex-grow:1;position:relative}.boot-sidebar__footer{padding:16px 8px 8px 16px}"));
  document.head.appendChild(style);
}
function Sidebar() {
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "boot-sidebar__scrollable", children: [
    /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(site_hub_default, {}),
    /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "boot-sidebar__content", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(navigation_default, {}) }),
    /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "boot-sidebar__footer", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SaveButton, {}) })
  ] });
}

// packages/boot/build-module/components/save-panel/index.mjs
var import_element10 = __toESM(require_element(), 1);
var import_components11 = __toESM(require_components(), 1);
var import_editor3 = __toESM(require_editor(), 1);
var import_i18n7 = __toESM(require_i18n(), 1);
var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
function SavePanel() {
  const [isOpen, setIsOpen] = (0, import_element10.useState)(false);
  useSaveShortcut({
    openSavePanel: () => setIsOpen(true)
  });
  if (!isOpen) {
    return false;
  }
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
    import_components11.Modal,
    {
      className: "edit-site-save-panel__modal",
      onRequestClose: () => setIsOpen(false),
      title: (0, import_i18n7.__)("Review changes"),
      size: "small",
      children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
        import_editor3.EntitiesSavedStates,
        {
          close: () => setIsOpen(false),
          variant: "inline"
        }
      )
    }
  );
}

// packages/boot/build-module/components/canvas-renderer/index.mjs
var import_element12 = __toESM(require_element(), 1);

// packages/boot/build-module/components/canvas/index.mjs
var import_element11 = __toESM(require_element(), 1);
var import_components13 = __toESM(require_components(), 1);
import { useNavigate } from "@wordpress/route";

// packages/boot/build-module/components/canvas/back-button.mjs
var import_components12 = __toESM(require_components(), 1);
var import_compose3 = __toESM(require_compose(), 1);
var import_i18n8 = __toESM(require_i18n(), 1);
var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='68d99fe376']")) {
  const style = document.createElement("style");
  style.setAttribute("data-wp-hash", "68d99fe376");
  style.appendChild(document.createTextNode(".boot-canvas-back-button{height:64px;left:0;position:absolute;top:0;width:64px;z-index:100}.boot-canvas-back-button__container{height:100%;position:relative;width:100%}.boot-canvas-back-button__link.components-button{align-items:center;background:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);border-radius:0;display:inline-flex;height:64px;justify-content:center;padding:0;text-decoration:none;width:64px}@media not (prefers-reduced-motion){.boot-canvas-back-button__link.components-button{transition:outline .1s ease-out}}.boot-canvas-back-button__link.components-button:focus:not(:active){outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline-offset:calc(var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px))*-1)}.boot-canvas-back-button__icon{align-items:center;background-color:#ccc;display:flex;height:64px;justify-content:center;left:0;pointer-events:none;position:absolute;top:0;width:64px}.boot-canvas-back-button__icon svg{fill:currentColor}.boot-canvas-back-button__icon.has-site-icon{-webkit-backdrop-filter:saturate(180%) blur(15px);backdrop-filter:saturate(180%) blur(15px);background-color:#fff9}.interface-interface-skeleton__header{margin-top:0!important}"));
  document.head.appendChild(style);
}
var toggleHomeIconVariants = {
  edit: {
    opacity: 0,
    scale: 0.2
  },
  hover: {
    opacity: 1,
    scale: 1,
    clipPath: "inset( 22% round 2px )"
  }
};
function BootBackButton({ length }) {
  const disableMotion = (0, import_compose3.useReducedMotion)();
  const handleBack = () => {
    window.history.back();
  };
  if (length > 1) {
    return null;
  }
  const transition = {
    duration: disableMotion ? 0 : 0.3
  };
  return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
    import_components12.__unstableMotion.div,
    {
      className: "boot-canvas-back-button",
      animate: "edit",
      initial: "edit",
      whileHover: "hover",
      whileTap: "tap",
      transition,
      children: [
        /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
          import_components12.Button,
          {
            className: "boot-canvas-back-button__link",
            onClick: handleBack,
            "aria-label": (0, import_i18n8.__)("Go back"),
            __next40pxDefaultSize: true,
            children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(site_icon_default, {})
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
          import_components12.__unstableMotion.div,
          {
            className: "boot-canvas-back-button__icon",
            variants: toggleHomeIconVariants,
            children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_components12.Icon, { icon: arrow_up_left_default })
          }
        )
      ]
    }
  );
}

// packages/boot/build-module/components/canvas/index.mjs
var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
function Canvas({ canvas }) {
  const [Editor, setEditor] = (0, import_element11.useState)(null);
  const navigate = useNavigate();
  (0, import_element11.useEffect)(() => {
    import("@wordpress/lazy-editor").then((module) => {
      setEditor(() => module.Editor);
    }).catch((error) => {
      console.error("Failed to load lazy editor:", error);
    });
  }, []);
  if (!Editor) {
    return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
      "div",
      {
        style: {
          display: "flex",
          justifyContent: "center",
          alignItems: "center",
          height: "100%",
          padding: "2rem"
        },
        children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components13.Spinner, {})
      }
    );
  }
  const backButton = !canvas.isPreview ? ({ length }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(BootBackButton, { length }) : void 0;
  return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { style: { height: "100%", position: "relative" }, children: [
    /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
      "div",
      {
        style: { height: "100%" },
        inert: canvas.isPreview ? "true" : void 0,
        children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
          Editor,
          {
            postType: canvas.postType,
            postId: canvas.postId,
            settings: { isPreviewMode: canvas.isPreview },
            backButton
          }
        )
      }
    ),
    canvas.isPreview && canvas.editLink && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
      "div",
      {
        onClick: () => navigate({ to: canvas.editLink }),
        onKeyDown: (e) => {
          if (e.key === "Enter" || e.key === " ") {
            e.preventDefault();
            navigate({ to: canvas.editLink });
          }
        },
        style: {
          position: "absolute",
          inset: 0,
          cursor: "pointer",
          zIndex: 1
        },
        role: "button",
        tabIndex: 0,
        "aria-label": "Click to edit"
      }
    )
  ] });
}

// packages/boot/build-module/components/canvas-renderer/index.mjs
var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
function CanvasRenderer({
  canvas,
  routeContentModule
}) {
  const [CustomCanvas, setCustomCanvas] = (0, import_element12.useState)(null);
  (0, import_element12.useEffect)(() => {
    if (canvas === null && routeContentModule) {
      import(routeContentModule).then((module) => {
        setCustomCanvas(() => module.canvas);
      }).catch((error) => {
        console.error("Failed to load custom canvas:", error);
      });
    } else {
      setCustomCanvas(null);
    }
  }, [canvas, routeContentModule]);
  if (canvas === void 0) {
    return null;
  }
  if (canvas === null) {
    if (!CustomCanvas) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CustomCanvas, {});
  }
  return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Canvas, { canvas });
}

// packages/boot/build-module/components/app/use-route-title.mjs
var import_element13 = __toESM(require_element(), 1);
var import_data9 = __toESM(require_data(), 1);
var import_core_data5 = __toESM(require_core_data(), 1);
var import_i18n9 = __toESM(require_i18n(), 1);
var import_html_entities2 = __toESM(require_html_entities(), 1);
import { speak } from "@wordpress/a11y";
import { privateApis as routePrivateApis4 } from "@wordpress/route";
var { useLocation, useMatches: useMatches2 } = unlock(routePrivateApis4);
function useRouteTitle() {
  const location = useLocation();
  const matches = useMatches2();
  const currentMatch = matches[matches.length - 1];
  const routeTitle = currentMatch?.loaderData?.title;
  const siteTitle = (0, import_data9.useSelect)(
    (select) => select(import_core_data5.store).getEntityRecord(
      "root",
      "__unstableBase"
    )?.name,
    []
  );
  const isInitialLocationRef = (0, import_element13.useRef)(true);
  (0, import_element13.useEffect)(() => {
    isInitialLocationRef.current = false;
  }, [location]);
  (0, import_element13.useEffect)(() => {
    if (isInitialLocationRef.current) {
      return;
    }
    if (routeTitle && typeof routeTitle === "string" && siteTitle && typeof siteTitle === "string") {
      const decodedRouteTitle = (0, import_html_entities2.decodeEntities)(routeTitle);
      const decodedSiteTitle = (0, import_html_entities2.decodeEntities)(siteTitle);
      const formattedTitle = (0, import_i18n9.sprintf)(
        /* translators: Admin document title. 1: Admin screen name, 2: Site name. */
        (0, import_i18n9.__)("%1$s \u2039 %2$s \u2014 WordPress"),
        decodedRouteTitle,
        decodedSiteTitle
      );
      document.title = formattedTitle;
      if (decodedRouteTitle) {
        speak(decodedRouteTitle, "assertive");
      }
    }
  }, [routeTitle, siteTitle, location]);
}

// packages/boot/build-module/components/user-theme-provider/index.mjs
var import_theme = __toESM(require_theme(), 1);
var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
var ThemeProvider = unlock(import_theme.privateApis).ThemeProvider;
var THEME_PRIMARY_COLORS = /* @__PURE__ */ new Map([
  ["light", "#0085ba"],
  ["modern", "#3858e9"],
  ["blue", "#096484"],
  ["coffee", "#46403c"],
  ["ectoplasm", "#523f6d"],
  ["midnight", "#e14d43"],
  ["ocean", "#627c83"],
  ["sunrise", "#dd823b"]
]);
function getAdminThemePrimaryColor() {
  const theme = document.body.className.match(/admin-color-([a-z]+)/)?.[1];
  return theme && THEME_PRIMARY_COLORS.get(theme);
}
function UserThemeProvider({
  color,
  ...restProps
}) {
  const primary = getAdminThemePrimaryColor();
  return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ThemeProvider, { ...restProps, color: { primary, ...color } });
}

// packages/boot/build-module/components/root/index.mjs
var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='d1ebf43fe1']")) {
  const style = document.createElement("style");
  style.setAttribute("data-wp-hash", "d1ebf43fe1");
  style.appendChild(document.createTextNode(".boot-layout{background:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:row;height:100%;isolation:isolate;width:100%}.boot-layout__sidebar-backdrop{background-color:#00000080;bottom:0;cursor:pointer;left:0;position:fixed;right:0;top:0;z-index:100002}.boot-layout__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}.boot-layout__sidebar.is-mobile{background:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);bottom:0;box-shadow:2px 0 8px #0003;inset-inline-start:0;max-width:85vw;position:fixed;top:0;width:300px;z-index:100003}.boot-layout__mobile-sidebar-drawer{left:0;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout__mobile-sidebar-drawer{top:46px}.boot-layout__mobile-sidebar-drawer{align-items:center;background:var(--wpds-color-bg-surface-neutral,#fff);border-bottom:1px solid var(--wpds-color-stroke-surface-neutral-weak,#ddd);display:flex;justify-content:flex-start;padding:16px;z-index:3}.boot-layout__canvas.has-mobile-drawer{padding-top:65px;position:relative}.boot-layout__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){.boot-layout__surfaces{margin:8px}.boot-layout--single-page .boot-layout__surfaces{margin-top:0;margin-inline-start:0}}.boot-layout__inspector,.boot-layout__stage{background:var(--wpds-color-bg-surface-neutral,#fff);border-radius:0;bottom:0;color:var(--wpds-color-fg-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__inspector,.boot-layout__stage{border-radius:8px;height:auto;margin:0;position:static;width:auto}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:auto}}.boot-layout__stage{z-index:2}@media (min-width:782px){.boot-layout__stage{z-index:auto}}.boot-layout__inspector{z-index:3}@media (min-width:782px){.boot-layout__inspector{z-index:auto}}.boot-layout__canvas{background:var(--wpds-color-bg-surface-neutral,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#ddd);border-radius:0;bottom:0;box-shadow:0 1px 3px #0000001a;color:var(--wpds-color-fg-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw;z-index:1}.boot-layout--single-page .boot-layout__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__canvas{border-radius:8px;height:auto;position:static;width:auto;z-index:auto}.boot-layout--single-page .boot-layout__canvas{height:auto}.boot-layout.has-canvas .boot-layout__stage,.boot-layout__inspector{max-width:400px}}.boot-layout__canvas .interface-interface-skeleton{height:100%;left:0!important;position:relative;top:0!important}.boot-layout.has-full-canvas .boot-layout__surfaces{gap:0;margin:0}.boot-layout.has-full-canvas .boot-layout__inspector,.boot-layout.has-full-canvas .boot-layout__stage{display:none}.boot-layout.has-full-canvas .boot-layout__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;left:0;margin:0;max-width:none;overflow:hidden;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:46px}@media (min-width:782px){.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:32px}}"));
  document.head.appendChild(style);
}
var { useLocation: useLocation2, useMatches: useMatches3, Outlet } = unlock(routePrivateApis5);
function Root() {
  const matches = useMatches3();
  const location = useLocation2();
  const currentMatch = matches[matches.length - 1];
  const canvas = currentMatch?.loaderData?.canvas;
  const routeContentModule = currentMatch?.loaderData?.routeContentModule;
  const isFullScreen = canvas && !canvas.isPreview;
  useRouteTitle();
  const isMobileViewport = (0, import_compose4.useViewportMatch)("medium", "<");
  const [isMobileSidebarOpen, setIsMobileSidebarOpen] = (0, import_element14.useState)(false);
  const disableMotion = (0, import_compose4.useReducedMotion)();
  (0, import_element14.useEffect)(() => {
    setIsMobileSidebarOpen(false);
  }, [location.pathname, isMobileViewport]);
  return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components14.SlotFillProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(UserThemeProvider, { isRoot: true, color: { bg: "#f8f8f8" }, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(UserThemeProvider, { color: { bg: "#1d2327" }, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
    "div",
    {
      className: clsx_default("boot-layout", {
        "has-canvas": !!canvas || canvas === null,
        "has-full-canvas": isFullScreen
      }),
      children: [
        /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SavePanel, {}),
        /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_notices.SnackbarNotices, { className: "boot-notices__snackbar" }),
        isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(page_default.SidebarToggleFill, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
          import_components14.Button,
          {
            icon: menu_default,
            onClick: () => setIsMobileSidebarOpen(true),
            label: (0, import_i18n10.__)("Open navigation panel"),
            size: "compact"
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components14.__unstableAnimatePresence, { children: isMobileViewport && isMobileSidebarOpen && !isFullScreen && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
          import_components14.__unstableMotion.div,
          {
            initial: { opacity: 0 },
            animate: { opacity: 1 },
            exit: { opacity: 0 },
            transition: {
              type: "tween",
              duration: disableMotion ? 0 : 0.2,
              ease: "easeOut"
            },
            className: "boot-layout__sidebar-backdrop",
            onClick: () => setIsMobileSidebarOpen(false),
            onKeyDown: (event) => {
              if (event.key === "Escape") {
                setIsMobileSidebarOpen(false);
              }
            },
            role: "button",
            tabIndex: -1,
            "aria-label": (0, import_i18n10.__)(
              "Close navigation panel"
            )
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components14.__unstableAnimatePresence, { children: isMobileViewport && isMobileSidebarOpen && !isFullScreen && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
          import_components14.__unstableMotion.div,
          {
            initial: { x: "-100%" },
            animate: { x: 0 },
            exit: { x: "-100%" },
            transition: {
              type: "tween",
              duration: disableMotion ? 0 : 0.2,
              ease: "easeOut"
            },
            className: "boot-layout__sidebar is-mobile",
            children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Sidebar, {})
          }
        ) }),
        !isMobileViewport && !isFullScreen && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "boot-layout__sidebar", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Sidebar, {}) }),
        /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "boot-layout__surfaces", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(UserThemeProvider, { color: { bg: "#ffffff" }, children: [
          /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Outlet, {}),
          (canvas || canvas === null) && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
            "div",
            {
              className: clsx_default(
                "boot-layout__canvas",
                {
                  "has-mobile-drawer": canvas?.isPreview && isMobileViewport
                }
              ),
              children: [
                canvas?.isPreview && isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "boot-layout__mobile-sidebar-drawer", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
                  import_components14.Button,
                  {
                    icon: menu_default,
                    onClick: () => setIsMobileSidebarOpen(
                      true
                    ),
                    label: (0, import_i18n10.__)(
                      "Open navigation panel"
                    ),
                    size: "compact"
                  }
                ) }),
                /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
                  CanvasRenderer,
                  {
                    canvas,
                    routeContentModule
                  }
                )
              ]
            }
          )
        ] }) })
      ]
    }
  ) }) }) });
}

// packages/boot/build-module/components/app/router.mjs
var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
var {
  createLazyRoute,
  createRouter,
  createRootRoute,
  createRoute,
  RouterProvider,
  createBrowserHistory,
  parseHref,
  useLoaderData
} = unlock(routePrivateApis6);
function NotFoundComponent() {
  return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "boot-layout__stage", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(page_default, { title: (0, import_i18n11.__)("Route not found"), hasPadding: true, children: (0, import_i18n11.__)("The page you're looking for does not exist") }) });
}
function createRouteFromDefinition(route, parentRoute) {
  let tanstackRoute = createRoute({
    getParentRoute: () => parentRoute,
    path: route.path,
    beforeLoad: async (opts) => {
      if (route.route_module) {
        const module = await import(route.route_module);
        const routeConfig = module.route || {};
        if (routeConfig.beforeLoad) {
          return routeConfig.beforeLoad({
            params: opts.params || {},
            search: opts.search || {}
          });
        }
      }
    },
    loader: async (opts) => {
      let routeConfig = {};
      if (route.route_module) {
        const module = await import(route.route_module);
        routeConfig = module.route || {};
      }
      const context = {
        params: opts.params || {},
        search: opts.deps || {}
      };
      const [, loaderData, canvasData, titleData] = await Promise.all([
        (0, import_data10.resolveSelect)(import_core_data6.store).getEntityRecord(
          "root",
          "__unstableBase"
        ),
        routeConfig.loader ? routeConfig.loader(context) : Promise.resolve(void 0),
        routeConfig.canvas ? routeConfig.canvas(context) : Promise.resolve(void 0),
        routeConfig.title ? routeConfig.title(context) : Promise.resolve(void 0)
      ]);
      let inspector = true;
      if (routeConfig.inspector) {
        inspector = await routeConfig.inspector(context);
      }
      return {
        ...loaderData,
        canvas: canvasData,
        inspector,
        title: titleData,
        routeContentModule: route.content_module
      };
    },
    loaderDeps: (opts) => opts.search
  });
  tanstackRoute = tanstackRoute.lazy(async () => {
    const module = route.content_module ? await import(route.content_module) : {};
    const Stage = module.stage;
    const Inspector = module.inspector;
    return createLazyRoute(route.path)({
      component: function RouteComponent() {
        const { inspector: showInspector } = useLoaderData({ from: route.path }) ?? {};
        return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
          Stage && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "boot-layout__stage", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Stage, {}) }),
          Inspector && showInspector && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "boot-layout__inspector", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Inspector, {}) })
        ] });
      }
    });
  });
  return tanstackRoute;
}
function createRouteTree(routes, rootComponent = Root) {
  const rootRoute = createRootRoute({
    component: rootComponent,
    context: () => ({})
  });
  const dynamicRoutes = routes.map(
    (route) => createRouteFromDefinition(route, rootRoute)
  );
  return rootRoute.addChildren(dynamicRoutes);
}
function createPathHistory() {
  return createBrowserHistory({
    parseLocation: () => {
      const url = new URL(window.location.href);
      const path = url.searchParams.get("p") || "/";
      const pathHref = `${path}${url.hash}`;
      return parseHref(pathHref, window.history.state);
    },
    createHref: (href) => {
      const searchParams = new URLSearchParams(window.location.search);
      searchParams.set("p", href);
      return `${window.location.pathname}?${searchParams}`;
    }
  });
}
function Router({
  routes,
  rootComponent = Root
}) {
  const router = (0, import_element15.useMemo)(() => {
    const history = createPathHistory();
    const routeTree = createRouteTree(routes, rootComponent);
    return createRouter({
      history,
      routeTree,
      defaultPreload: "intent",
      defaultNotFoundComponent: NotFoundComponent,
      defaultViewTransition: {
        types: ({
          fromLocation
        }) => {
          if (!fromLocation) {
            return false;
          }
          return ["navigate"];
        }
      }
    });
  }, [routes, rootComponent]);
  return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RouterProvider, { router });
}

// packages/boot/build-module/components/root/single-page.mjs
var import_notices2 = __toESM(require_notices(), 1);
var import_components15 = __toESM(require_components(), 1);
import { privateApis as routePrivateApis7 } from "@wordpress/route";
var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='d1ebf43fe1']")) {
  const style = document.createElement("style");
  style.setAttribute("data-wp-hash", "d1ebf43fe1");
  style.appendChild(document.createTextNode(".boot-layout{background:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:row;height:100%;isolation:isolate;width:100%}.boot-layout__sidebar-backdrop{background-color:#00000080;bottom:0;cursor:pointer;left:0;position:fixed;right:0;top:0;z-index:100002}.boot-layout__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}.boot-layout__sidebar.is-mobile{background:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);bottom:0;box-shadow:2px 0 8px #0003;inset-inline-start:0;max-width:85vw;position:fixed;top:0;width:300px;z-index:100003}.boot-layout__mobile-sidebar-drawer{left:0;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout__mobile-sidebar-drawer{top:46px}.boot-layout__mobile-sidebar-drawer{align-items:center;background:var(--wpds-color-bg-surface-neutral,#fff);border-bottom:1px solid var(--wpds-color-stroke-surface-neutral-weak,#ddd);display:flex;justify-content:flex-start;padding:16px;z-index:3}.boot-layout__canvas.has-mobile-drawer{padding-top:65px;position:relative}.boot-layout__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){.boot-layout__surfaces{margin:8px}.boot-layout--single-page .boot-layout__surfaces{margin-top:0;margin-inline-start:0}}.boot-layout__inspector,.boot-layout__stage{background:var(--wpds-color-bg-surface-neutral,#fff);border-radius:0;bottom:0;color:var(--wpds-color-fg-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__inspector,.boot-layout__stage{border-radius:8px;height:auto;margin:0;position:static;width:auto}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:auto}}.boot-layout__stage{z-index:2}@media (min-width:782px){.boot-layout__stage{z-index:auto}}.boot-layout__inspector{z-index:3}@media (min-width:782px){.boot-layout__inspector{z-index:auto}}.boot-layout__canvas{background:var(--wpds-color-bg-surface-neutral,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#ddd);border-radius:0;bottom:0;box-shadow:0 1px 3px #0000001a;color:var(--wpds-color-fg-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw;z-index:1}.boot-layout--single-page .boot-layout__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__canvas{border-radius:8px;height:auto;position:static;width:auto;z-index:auto}.boot-layout--single-page .boot-layout__canvas{height:auto}.boot-layout.has-canvas .boot-layout__stage,.boot-layout__inspector{max-width:400px}}.boot-layout__canvas .interface-interface-skeleton{height:100%;left:0!important;position:relative;top:0!important}.boot-layout.has-full-canvas .boot-layout__surfaces{gap:0;margin:0}.boot-layout.has-full-canvas .boot-layout__inspector,.boot-layout.has-full-canvas .boot-layout__stage{display:none}.boot-layout.has-full-canvas .boot-layout__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;left:0;margin:0;max-width:none;overflow:hidden;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:46px}@media (min-width:782px){.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:32px}}"));
  document.head.appendChild(style);
}
var { useMatches: useMatches4, Outlet: Outlet2 } = unlock(routePrivateApis7);
function RootSinglePage() {
  const matches = useMatches4();
  const currentMatch = matches[matches.length - 1];
  const canvas = currentMatch?.loaderData?.canvas;
  const routeContentModule = currentMatch?.loaderData?.routeContentModule;
  const isFullScreen = canvas && !canvas.isPreview;
  useRouteTitle();
  return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components15.SlotFillProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(UserThemeProvider, { isRoot: true, color: { bg: "#f8f8f8" }, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(UserThemeProvider, { color: { bg: "#1d2327" }, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
    "div",
    {
      className: clsx_default(
        "boot-layout boot-layout--single-page",
        {
          "has-canvas": !!canvas || canvas === null,
          "has-full-canvas": isFullScreen
        }
      ),
      children: [
        /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SavePanel, {}),
        /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_notices2.SnackbarNotices, { className: "boot-notices__snackbar" }),
        /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "boot-layout__surfaces", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(UserThemeProvider, { color: { bg: "#ffffff" }, children: [
          /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Outlet2, {}),
          (canvas || canvas === null) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "boot-layout__canvas", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
            CanvasRenderer,
            {
              canvas,
              routeContentModule
            }
          ) })
        ] }) })
      ]
    }
  ) }) }) });
}

// packages/boot/build-module/components/app/index.mjs
var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
function App({ rootComponent }) {
  const routes = (0, import_data11.useSelect)((select) => select(store).getRoutes(), []);
  return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Router, { routes, rootComponent });
}
async function init({
  mountId,
  menuItems,
  routes,
  initModules,
  dashboardLink
}) {
  (menuItems ?? []).forEach((menuItem) => {
    (0, import_data11.dispatch)(store).registerMenuItem(menuItem.id, menuItem);
  });
  (routes ?? []).forEach((route) => {
    (0, import_data11.dispatch)(store).registerRoute(route);
  });
  if (dashboardLink) {
    (0, import_data11.dispatch)(store).setDashboardLink(dashboardLink);
  }
  for (const moduleId of initModules ?? []) {
    const module = await import(moduleId);
    await module.init();
  }
  const rootElement = document.getElementById(mountId);
  if (rootElement) {
    const root = (0, import_element16.createRoot)(rootElement);
    root.render(
      /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_element16.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(App, {}) })
    );
  }
}
async function initSinglePage({
  mountId,
  routes
}) {
  (routes ?? []).forEach((route) => {
    (0, import_data11.dispatch)(store).registerRoute(route);
  });
  const rootElement = document.getElementById(mountId);
  if (rootElement) {
    const root = (0, import_element16.createRoot)(rootElement);
    root.render(
      /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_element16.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(App, { rootComponent: RootSinglePage }) })
    );
  }
}

// packages/boot/build-module/index.mjs
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='e39fdc0848']")) {
  const style = document.createElement("style");
  style.setAttribute("data-wp-hash", "e39fdc0848");
  style.appendChild(document.createTextNode(':root{--wpds-border-radius-lg:8px;--wpds-border-radius-md:4px;--wpds-border-radius-sm:2px;--wpds-border-radius-xs:1px;--wpds-border-width-focus:2px;--wpds-border-width-lg:8px;--wpds-border-width-md:4px;--wpds-border-width-sm:2px;--wpds-border-width-xs:1px;--wpds-color-bg-interactive-brand-strong:#3858e9;--wpds-color-bg-interactive-brand-strong-active:#2e49d9;--wpds-color-bg-interactive-brand-weak:#0000;--wpds-color-bg-interactive-brand-weak-active:#e6eaf4;--wpds-color-bg-interactive-error:#0000;--wpds-color-bg-interactive-error-active:#fff6f4;--wpds-color-bg-interactive-error-strong:#cc1818;--wpds-color-bg-interactive-error-strong-active:#b90000;--wpds-color-bg-interactive-error-weak:#0000;--wpds-color-bg-interactive-error-weak-active:#f6e6e3;--wpds-color-bg-interactive-neutral-strong:#2d2d2d;--wpds-color-bg-interactive-neutral-strong-active:#1e1e1e;--wpds-color-bg-interactive-neutral-strong-disabled:#e2e2e2;--wpds-color-bg-interactive-neutral-weak:#0000;--wpds-color-bg-interactive-neutral-weak-active:#eaeaea;--wpds-color-bg-interactive-neutral-weak-disabled:#0000;--wpds-color-bg-surface-brand:#ecf0f9;--wpds-color-bg-surface-caution:#fee994;--wpds-color-bg-surface-caution-weak:#fff9c9;--wpds-color-bg-surface-error:#f6e6e3;--wpds-color-bg-surface-error-weak:#fff6f4;--wpds-color-bg-surface-info:#deebfa;--wpds-color-bg-surface-info-weak:#f2f9ff;--wpds-color-bg-surface-neutral:#f8f8f8;--wpds-color-bg-surface-neutral-strong:#fff;--wpds-color-bg-surface-neutral-weak:#f0f0f0;--wpds-color-bg-surface-success:#c5f7cc;--wpds-color-bg-surface-success-weak:#eaffed;--wpds-color-bg-surface-warning:#fde6bd;--wpds-color-bg-surface-warning-weak:#fff7e0;--wpds-color-bg-thumb-brand:#3858e9;--wpds-color-bg-thumb-brand-active:#3858e9;--wpds-color-bg-thumb-neutral-disabled:#d8d8d8;--wpds-color-bg-thumb-neutral-weak:#8a8a8a;--wpds-color-bg-thumb-neutral-weak-active:#6c6c6c;--wpds-color-bg-track-neutral:#d8d8d8;--wpds-color-bg-track-neutral-weak:#e0e0e0;--wpds-color-fg-content-caution:#281d00;--wpds-color-fg-content-caution-weak:#826a00;--wpds-color-fg-content-error:#470000;--wpds-color-fg-content-error-weak:#cc1818;--wpds-color-fg-content-info:#001b4f;--wpds-color-fg-content-info-weak:#006bd7;--wpds-color-fg-content-neutral:#1e1e1e;--wpds-color-fg-content-neutral-weak:#6d6d6d;--wpds-color-fg-content-success:#002900;--wpds-color-fg-content-success-weak:#007f30;--wpds-color-fg-content-warning:#2e1900;--wpds-color-fg-content-warning-weak:#926300;--wpds-color-fg-interactive-brand:#3858e9;--wpds-color-fg-interactive-brand-active:#3858e9;--wpds-color-fg-interactive-brand-strong:#eff0f2;--wpds-color-fg-interactive-brand-strong-active:#eff0f2;--wpds-color-fg-interactive-error:#cc1818;--wpds-color-fg-interactive-error-active:#cc1818;--wpds-color-fg-interactive-error-strong:#f2efef;--wpds-color-fg-interactive-error-strong-active:#f2efef;--wpds-color-fg-interactive-neutral:#1e1e1e;--wpds-color-fg-interactive-neutral-active:#1e1e1e;--wpds-color-fg-interactive-neutral-disabled:#8a8a8a;--wpds-color-fg-interactive-neutral-strong:#f0f0f0;--wpds-color-fg-interactive-neutral-strong-active:#f0f0f0;--wpds-color-fg-interactive-neutral-strong-disabled:#8a8a8a;--wpds-color-fg-interactive-neutral-weak:#6d6d6d;--wpds-color-fg-interactive-neutral-weak-disabled:#8a8a8a;--wpds-color-stroke-focus-brand:#3858e9;--wpds-color-stroke-interactive-brand:#3858e9;--wpds-color-stroke-interactive-brand-active:#2337c8;--wpds-color-stroke-interactive-error:#cc1818;--wpds-color-stroke-interactive-error-active:#9d0000;--wpds-color-stroke-interactive-error-strong:#cc1818;--wpds-color-stroke-interactive-neutral:#8a8a8a;--wpds-color-stroke-interactive-neutral-active:#6c6c6c;--wpds-color-stroke-interactive-neutral-disabled:#d8d8d8;--wpds-color-stroke-interactive-neutral-strong:#6c6c6c;--wpds-color-stroke-surface-brand:#a3b1d4;--wpds-color-stroke-surface-brand-strong:#3858e9;--wpds-color-stroke-surface-error:#daa39b;--wpds-color-stroke-surface-error-strong:#cc1818;--wpds-color-stroke-surface-info:#9fbcdc;--wpds-color-stroke-surface-info-strong:#006bd7;--wpds-color-stroke-surface-neutral:#d8d8d8;--wpds-color-stroke-surface-neutral-strong:#8a8a8a;--wpds-color-stroke-surface-neutral-weak:#e0e0e0;--wpds-color-stroke-surface-success:#8ac894;--wpds-color-stroke-surface-success-strong:#007f30;--wpds-color-stroke-surface-warning:#d0b381;--wpds-color-stroke-surface-warning-strong:#926300;--wpds-dimension-base:4px;--wpds-dimension-gap-2xl:32px;--wpds-dimension-gap-3xl:40px;--wpds-dimension-gap-lg:16px;--wpds-dimension-gap-md:12px;--wpds-dimension-gap-sm:8px;--wpds-dimension-gap-xl:24px;--wpds-dimension-gap-xs:4px;--wpds-dimension-padding-2xl:24px;--wpds-dimension-padding-3xl:32px;--wpds-dimension-padding-lg:16px;--wpds-dimension-padding-md:12px;--wpds-dimension-padding-sm:8px;--wpds-dimension-padding-xl:20px;--wpds-dimension-padding-xs:4px;--wpds-elevation-lg:0 5px 15px 0 #00000014,0 15px 27px 0 #00000012,0 30px 36px 0 #0000000a,0 50px 43px 0 #00000005;--wpds-elevation-md:0 2px 3px 0 #0000000d,0 4px 5px 0 #0000000a,0 12px 12px 0 #00000008,0 16px 16px 0 #00000005;--wpds-elevation-sm:0 1px 2px 0 #0000000d,0 2px 3px 0 #0000000a,0 6px 6px 0 #00000008,0 8px 8px 0 #00000005;--wpds-elevation-xs:0 1px 1px 0 #00000008,0 1px 2px 0 #00000005,0 3px 3px 0 #00000005,0 4px 4px 0 #00000003;--wpds-font-family-body:-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif;--wpds-font-family-heading:-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif;--wpds-font-family-mono:"Menlo","Consolas",monaco,monospace;--wpds-font-line-height-2xl:40px;--wpds-font-line-height-lg:28px;--wpds-font-line-height-md:24px;--wpds-font-line-height-sm:20px;--wpds-font-line-height-xl:32px;--wpds-font-line-height-xs:16px;--wpds-font-size-2xl:32px;--wpds-font-size-lg:15px;--wpds-font-size-md:13px;--wpds-font-size-sm:12px;--wpds-font-size-xl:20px;--wpds-font-size-xs:11px;--wpds-font-weight-medium:499;--wpds-font-weight-regular:400}[data-wpds-theme-provider-id][data-wpds-density=compact]{--wpds-dimension-gap-2xl:24px;--wpds-dimension-gap-3xl:32px;--wpds-dimension-gap-lg:12px;--wpds-dimension-gap-md:8px;--wpds-dimension-gap-sm:4px;--wpds-dimension-gap-xl:20px;--wpds-dimension-gap-xs:4px;--wpds-dimension-padding-2xl:20px;--wpds-dimension-padding-3xl:24px;--wpds-dimension-padding-lg:12px;--wpds-dimension-padding-md:8px;--wpds-dimension-padding-sm:4px;--wpds-dimension-padding-xl:16px;--wpds-dimension-padding-xs:4px}[data-wpds-theme-provider-id][data-wpds-density=comfortable]{--wpds-dimension-gap-2xl:40px;--wpds-dimension-gap-3xl:48px;--wpds-dimension-gap-lg:20px;--wpds-dimension-gap-md:16px;--wpds-dimension-gap-sm:12px;--wpds-dimension-gap-xl:32px;--wpds-dimension-gap-xs:8px;--wpds-dimension-padding-2xl:32px;--wpds-dimension-padding-3xl:40px;--wpds-dimension-padding-lg:20px;--wpds-dimension-padding-md:16px;--wpds-dimension-padding-sm:12px;--wpds-dimension-padding-xl:24px;--wpds-dimension-padding-xs:8px}[data-wpds-theme-provider-id][data-wpds-density=default]{--wpds-dimension-base:4px;--wpds-dimension-gap-2xl:32px;--wpds-dimension-gap-3xl:40px;--wpds-dimension-gap-lg:16px;--wpds-dimension-gap-md:12px;--wpds-dimension-gap-sm:8px;--wpds-dimension-gap-xl:24px;--wpds-dimension-gap-xs:4px;--wpds-dimension-padding-2xl:24px;--wpds-dimension-padding-3xl:32px;--wpds-dimension-padding-lg:16px;--wpds-dimension-padding-md:12px;--wpds-dimension-padding-sm:8px;--wpds-dimension-padding-xl:20px;--wpds-dimension-padding-xs:4px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){:root{--wpds-border-width-focus:1.5px}}.admin-ui-page{text-wrap:pretty;background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}.admin-ui-page__header{background:var(--wpds-color-bg-surface-neutral-strong,#fff);border-bottom:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#e0e0e0);padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;top:0;z-index:1}.admin-ui-page__header-title{font-family:var(--wpds-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-xl,20px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wpds-font-line-height-xl,32px);margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.admin-ui-page__sidebar-toggle-slot:empty{display:none}.admin-ui-page__header-subtitle{color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d);font-size:var(--wpds-font-size-md,13px);line-height:var(--wpds-font-line-height-md,24px);margin:0;padding-block-end:var(--wpds-dimension-padding-xs,4px)}.admin-ui-page__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto}.admin-ui-page__content.has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon{padding:0 var(--wpds-dimension-padding-xs,4px);width:auto}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon svg{display:none}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon:after{content:attr(aria-label);font-size:var(--wpds-font-size-sm,12px)}.admin-ui-breadcrumbs__list{font-size:15px;font-weight:500;gap:0;list-style:none;margin:0;min-height:32px;padding:0}.admin-ui-breadcrumbs__list li:not(:last-child):after{content:"/";margin:0 8px}.admin-ui-breadcrumbs__list h1{font-size:inherit;line-height:inherit}@media (min-width:600px){.boot-layout-container .boot-layout{bottom:0;left:0;min-height:calc(100vh - 46px);position:absolute;right:0;top:0}}@media (min-width:782px){.boot-layout-container .boot-layout{min-height:calc(100vh - 32px)}body:has(.boot-layout.has-full-canvas) .boot-layout-container .boot-layout{min-height:100vh}}.boot-layout-container .boot-layout img{height:auto;max-width:100%}.boot-layout .boot-notices__snackbar{bottom:24px;box-sizing:border-box;display:flex;flex-direction:column;left:0;padding-inline:16px;pointer-events:none;position:fixed;right:0}.boot-layout .boot-notices__snackbar .components-snackbar{margin-inline:auto}'));
  document.head.appendChild(style);
}
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='2a741c061f']")) {
  const style = document.createElement("style");
  style.setAttribute("data-wp-hash", "2a741c061f");
  style.appendChild(document.createTextNode("@media (max-width:782px){*{view-transition-name:none!important}}::view-transition-new(root),::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){.boot-layout__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}.boot-layout__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.boot-layout.has-full-canvas .boot-layout__canvas .boot-site-icon-link,.boot-layout:not(.has-full-canvas) .boot-site-hub .boot-site-icon-link{view-transition-name:boot--site-icon-link}.boot-layout__stage{view-transition-name:boot--stage}.boot-layout__inspector{view-transition-name:boot--inspector}.boot-layout__canvas.is-full-canvas .interface-interface-skeleton__content,.boot-layout__canvas:not(.is-full-canvas){view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.boot-layout__stage{view-transition-name:boot-safari--stage}.boot-layout__inspector{view-transition-name:boot-safari--inspector}.boot-layout__canvas.is-full-canvas .interface-interface-skeleton__content,.boot-layout__canvas:not(.is-full-canvas){view-transition-name:boot-safari--canvas}}.components-popover:first-of-type{view-transition-name:boot--components-popover}}::view-transition-group(boot--canvas),::view-transition-group(boot--canvas-header),::view-transition-group(boot--canvas-sidebar),::view-transition-group(boot-safari--canvas){z-index:1}::view-transition-group(boot--site-icon-link){z-index:2}::view-transition-new(boot--site-icon-link),::view-transition-old(boot--site-icon-link){animation:none}::view-transition-new(boot-safari--canvas),::view-transition-new(boot-safari--inspector),::view-transition-new(boot-safari--stage),::view-transition-old(boot-safari--canvas),::view-transition-old(boot-safari--inspector),::view-transition-old(boot-safari--stage){width:auto}::view-transition-new(boot--canvas),::view-transition-new(boot--inspector),::view-transition-new(boot--stage),::view-transition-old(boot--canvas),::view-transition-old(boot--inspector),::view-transition-old(boot--stage){background:#fff;border-radius:8px;height:100%;object-fit:none;object-position:left top;overflow:hidden;width:100%}::view-transition-new(boot--canvas),::view-transition-old(boot--canvas){object-position:center top}::view-transition-old(boot--inspector):only-child,::view-transition-old(boot--stage):only-child,::view-transition-old(boot-safari--inspector):only-child,::view-transition-old(boot-safari--stage):only-child{animation-name:zoomOut;will-change:transform,opacity}::view-transition-new(boot--inspector):only-child,::view-transition-new(boot--stage):only-child,::view-transition-new(boot-safari--inspector):only-child,::view-transition-new(boot-safari--stage):only-child{animation-name:zoomIn;will-change:transform,opacity}@keyframes zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}::view-transition-new(boot--canvas):only-child,::view-transition-new(boot-safari--canvas):only-child{animation-name:slideFromRight;will-change:transform}::view-transition-old(boot--canvas):only-child,::view-transition-old(boot-safari--canvas):only-child{animation-name:slideToRight;will-change:transform}@keyframes slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}::view-transition-new(boot--canvas-header):only-child{animation-name:slideHeaderFromTop;will-change:transform}::view-transition-old(boot--canvas-header):only-child{animation-name:slideHeaderToTop;will-change:transform}@keyframes slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes slideHeaderToTop{to{transform:translateY(-100%)}}::view-transition-new(boot--canvas-sidebar):only-child{animation-name:slideSidebarFromRight;will-change:transform}::view-transition-old(boot--canvas-sidebar):only-child{animation-name:slideSidebarToRight;will-change:transform}@keyframes slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes slideSidebarToRight{to{transform:translateX(100%)}}"));
  document.head.appendChild(style);
}
export {
  init,
  initSinglePage,
  store
};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                dist/script-modules/boot/index.min.asset.php                                                        0000644                 00000001100 15212564030 0015132 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-theme', 'wp-url'), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'static'), array('id' => '@wordpress/lazy-editor', 'import' => 'dynamic'), array('id' => '@wordpress/route', 'import' => 'static')), 'version' => '54bb5a420026a61c7e4f');                                                                                                                                                                                                                                                                                                                                                                                                                                                                dist/script-modules/connectors/index.min.js                                                         0000644                 00000010766 15212564030 0015075 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var W=Object.create;var y=Object.defineProperty;var J=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var X=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var f=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var Q=(e,r,i,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let c of U(r))!q.call(e,c)&&c!==i&&y(e,c,{get:()=>r[c],enumerable:!(s=J(r,c))||s.enumerable});return e};var m=(e,r,i)=>(i=e!=null?W(X(e)):{},Q(r||!e||!e.__esModule?y(i,"default",{value:e,enumerable:!0}):i,e));var C=f((ce,T)=>{T.exports=window.wp.data});var A=f((ae,R)=>{R.exports=window.wp.privateApis});var O=f((ge,P)=>{P.exports=window.wp.components});var j=f((xe,D)=>{D.exports=window.wp.element});var L=f((_e,G)=>{G.exports=window.wp.i18n});var B=f((he,z)=>{z.exports=window.ReactJSXRuntime});var E=m(C(),1);var g=m(C(),1);var b=m(A(),1),{lock:N,unlock:d}=(0,b.__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/connectors");var w="core/connectors",Z={connectors:{}},$={registerConnector(e,r){return{type:"REGISTER_CONNECTOR",slug:e,config:r}},unregisterConnector(e){return{type:"UNREGISTER_CONNECTOR",slug:e}}};function ee(e=Z,r){switch(r.type){case"REGISTER_CONNECTOR":return{...e,connectors:{...e.connectors,[r.slug]:{...e.connectors[r.slug],slug:r.slug,...r.config}}};case"UNREGISTER_CONNECTOR":{if(!e.connectors[r.slug])return e;let{[r.slug]:i,...s}=e.connectors;return{...e,connectors:s}}default:return e}}var re={getConnectors:(0,g.createSelector)(e=>Object.values(e.connectors),e=>[e.connectors]),getConnector(e,r){return e.connectors[r]}},l=(0,g.createReduxStore)(w,{reducer:ee});(0,g.register)(l);d(l).registerPrivateActions($);d(l).registerPrivateSelectors(re);function te(e,r){d((0,E.dispatch)(l)).registerConnector(e,r)}function ne(e){d((0,E.dispatch)(l)).unregisterConnector(e)}var t=m(O(),1),a=m(j(),1),o=m(L(),1),n=m(B(),1);function oe({className:e,logo:r,name:i,description:s,actionArea:c,children:p}){let u=(0,a.useId)();return(0,n.jsx)(t.__experimentalItem,{className:e,children:(0,n.jsxs)(t.__experimentalVStack,{spacing:4,role:"group","aria-labelledby":u,children:[(0,n.jsxs)(t.__experimentalHStack,{alignment:"center",spacing:4,wrap:!0,children:[r,(0,n.jsx)(t.FlexBlock,{children:(0,n.jsxs)(t.__experimentalVStack,{spacing:0,children:[(0,n.jsx)(t.__experimentalText,{weight:600,size:15,id:u,as:"h2",children:i}),(0,n.jsx)(t.__experimentalText,{variant:"muted",size:12,children:s})]})}),c]}),p]})})}function se({onSave:e,onRemove:r,initialValue:i="",helpUrl:s,helpLabel:c,readOnly:p=!1,keySource:u}){let[_,H]=(0,a.useState)(i),[h,I]=(0,a.useState)(!1),[k,v]=(0,a.useState)(null),S=c||s?.replace(/^https?:\/\//,""),K=s?(0,a.createInterpolateElement)((0,o.sprintf)((0,o.__)("Get your API key at %s"),"<a></a>"),{a:(0,n.jsx)(t.ExternalLink,{href:s,children:S})}):void 0,M=u==="env"||u==="constant",Y=()=>{if(M){if(u==="env")return(0,o.__)("This API key is configured using an environment variable.");if(u==="constant")return(0,o.__)("This API key is configured as a constant.")}return p?s?(0,a.createInterpolateElement)((0,o.sprintf)((0,o.__)("Your API key is stored securely. You can manage it at %s"),"<a></a>"),{a:(0,n.jsx)(t.ExternalLink,{href:s,children:S})}):(0,o.__)("Your API key is stored securely."):k?(0,n.jsx)("span",{role:"alert",className:"connector-settings__error",children:k}):K},V=async()=>{v(null),I(!0);try{await e?.(_)}catch(x){v(x instanceof Error?x.message:(0,o.__)("It was not possible to connect to the provider using this key."))}finally{I(!1)}};return(0,n.jsxs)(t.__experimentalVStack,{spacing:4,className:"connector-settings",style:p?{"--wp-components-color-background":"#f0f0f0"}:void 0,children:[(0,n.jsx)(t.TextControl,{__next40pxDefaultSize:!0,label:(0,o.__)("API Key"),value:_,onChange:x=>{p||(v(null),H(x))},placeholder:(0,o.__)("Enter your API key"),disabled:p||h,help:Y()}),p?r&&(0,n.jsx)(t.__experimentalHStack,{justify:"flex-start",children:(0,n.jsx)(t.Button,{variant:"link",isDestructive:!0,onClick:r,children:(0,o.__)("Remove and replace")})}):(0,n.jsx)(t.__experimentalHStack,{justify:"flex-start",children:(0,n.jsx)(t.Button,{__next40pxDefaultSize:!0,variant:"primary",disabled:!_||h,accessibleWhenDisabled:!0,isBusy:h,onClick:V,children:(0,o.__)("Save")})})]})}var F={};N(F,{store:l,STORE_NAME:w});export{oe as __experimentalConnectorItem,se as __experimentalDefaultConnectorSettings,te as __experimentalRegisterConnector,ne as __experimentalUnregisterConnector,F as privateApis};
          dist/script-modules/connectors/index.js                                                             0000644                 00000025033 15212564030 0014304 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));

// package-external:@wordpress/data
var require_data = __commonJS({
  "package-external:@wordpress/data"(exports, module) {
    module.exports = window.wp.data;
  }
});

// package-external:@wordpress/private-apis
var require_private_apis = __commonJS({
  "package-external:@wordpress/private-apis"(exports, module) {
    module.exports = window.wp.privateApis;
  }
});

// package-external:@wordpress/components
var require_components = __commonJS({
  "package-external:@wordpress/components"(exports, module) {
    module.exports = window.wp.components;
  }
});

// package-external:@wordpress/element
var require_element = __commonJS({
  "package-external:@wordpress/element"(exports, module) {
    module.exports = window.wp.element;
  }
});

// package-external:@wordpress/i18n
var require_i18n = __commonJS({
  "package-external:@wordpress/i18n"(exports, module) {
    module.exports = window.wp.i18n;
  }
});

// vendor-external:react/jsx-runtime
var require_jsx_runtime = __commonJS({
  "vendor-external:react/jsx-runtime"(exports, module) {
    module.exports = window.ReactJSXRuntime;
  }
});

// packages/connectors/build-module/api.mjs
var import_data2 = __toESM(require_data(), 1);

// packages/connectors/build-module/store.mjs
var import_data = __toESM(require_data(), 1);

// packages/connectors/build-module/lock-unlock.mjs
var import_private_apis = __toESM(require_private_apis(), 1);
var { lock, unlock } = (0, import_private_apis.__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/connectors"
);

// packages/connectors/build-module/store.mjs
var STORE_NAME = "core/connectors";
var DEFAULT_STATE = {
  connectors: {}
};
var actions = {
  registerConnector(slug, config) {
    return {
      type: "REGISTER_CONNECTOR",
      slug,
      config
    };
  },
  unregisterConnector(slug) {
    return {
      type: "UNREGISTER_CONNECTOR",
      slug
    };
  }
};
function reducer(state = DEFAULT_STATE, action) {
  switch (action.type) {
    case "REGISTER_CONNECTOR":
      return {
        ...state,
        connectors: {
          ...state.connectors,
          [action.slug]: {
            ...state.connectors[action.slug],
            slug: action.slug,
            ...action.config
          }
        }
      };
    case "UNREGISTER_CONNECTOR": {
      if (!state.connectors[action.slug]) {
        return state;
      }
      const { [action.slug]: _, ...rest } = state.connectors;
      return {
        ...state,
        connectors: rest
      };
    }
    default:
      return state;
  }
}
var selectors = {
  getConnectors: (0, import_data.createSelector)(
    (state) => Object.values(state.connectors),
    (state) => [state.connectors]
  ),
  getConnector(state, slug) {
    return state.connectors[slug];
  }
};
var store = (0, import_data.createReduxStore)(STORE_NAME, {
  reducer
});
(0, import_data.register)(store);
unlock(store).registerPrivateActions(actions);
unlock(store).registerPrivateSelectors(selectors);

// packages/connectors/build-module/api.mjs
function registerConnector(slug, config) {
  unlock((0, import_data2.dispatch)(store)).registerConnector(slug, config);
}
function unregisterConnector(slug) {
  unlock((0, import_data2.dispatch)(store)).unregisterConnector(slug);
}

// packages/connectors/build-module/connector-item.mjs
var import_components = __toESM(require_components(), 1);
var import_element = __toESM(require_element(), 1);
var import_i18n = __toESM(require_i18n(), 1);
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
function ConnectorItem({
  className,
  logo,
  name,
  description,
  actionArea,
  children
}) {
  const headingId = (0, import_element.useId)();
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.__experimentalItem, { className, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components.__experimentalVStack, { spacing: 4, role: "group", "aria-labelledby": headingId, children: [
    /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components.__experimentalHStack, { alignment: "center", spacing: 4, wrap: true, children: [
      logo,
      /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.FlexBlock, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components.__experimentalVStack, { spacing: 0, children: [
        /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
          import_components.__experimentalText,
          {
            weight: 600,
            size: 15,
            id: headingId,
            as: "h2",
            children: name
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.__experimentalText, { variant: "muted", size: 12, children: description })
      ] }) }),
      actionArea
    ] }),
    children
  ] }) });
}
function DefaultConnectorSettings({
  onSave,
  onRemove,
  initialValue = "",
  helpUrl,
  helpLabel,
  readOnly = false,
  keySource
}) {
  const [apiKey, setApiKey] = (0, import_element.useState)(initialValue);
  const [isSaving, setIsSaving] = (0, import_element.useState)(false);
  const [saveError, setSaveError] = (0, import_element.useState)(null);
  const helpLinkLabel = helpLabel || helpUrl?.replace(/^https?:\/\//, "");
  const helpLink = helpUrl ? (0, import_element.createInterpolateElement)(
    (0, import_i18n.sprintf)(
      /* translators: %s: Link to provider settings. */
      (0, import_i18n.__)("Get your API key at %s"),
      "<a></a>"
    ),
    {
      a: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.ExternalLink, { href: helpUrl, children: helpLinkLabel })
    }
  ) : void 0;
  const isExternallyConfigured = keySource === "env" || keySource === "constant";
  const getHelp = () => {
    if (isExternallyConfigured) {
      if (keySource === "env") {
        return (0, import_i18n.__)(
          "This API key is configured using an environment variable."
        );
      }
      if (keySource === "constant") {
        return (0, import_i18n.__)("This API key is configured as a constant.");
      }
    }
    if (readOnly) {
      return helpUrl ? (0, import_element.createInterpolateElement)(
        (0, import_i18n.sprintf)(
          /* translators: %s: Link to provider settings. */
          (0, import_i18n.__)(
            "Your API key is stored securely. You can manage it at %s"
          ),
          "<a></a>"
        ),
        {
          a: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.ExternalLink, { href: helpUrl, children: helpLinkLabel })
        }
      ) : (0, import_i18n.__)("Your API key is stored securely.");
    }
    if (saveError) {
      return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { role: "alert", className: "connector-settings__error", children: saveError });
    }
    return helpLink;
  };
  const handleSave = async () => {
    setSaveError(null);
    setIsSaving(true);
    try {
      await onSave?.(apiKey);
    } catch (error) {
      setSaveError(
        error instanceof Error ? error.message : (0, import_i18n.__)(
          "It was not possible to connect to the provider using this key."
        )
      );
    } finally {
      setIsSaving(false);
    }
  };
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
    import_components.__experimentalVStack,
    {
      spacing: 4,
      className: "connector-settings",
      style: readOnly ? {
        "--wp-components-color-background": "#f0f0f0"
      } : void 0,
      children: [
        /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
          import_components.TextControl,
          {
            __next40pxDefaultSize: true,
            label: (0, import_i18n.__)("API Key"),
            value: apiKey,
            onChange: (value) => {
              if (!readOnly) {
                setSaveError(null);
                setApiKey(value);
              }
            },
            placeholder: (0, import_i18n.__)("Enter your API key"),
            disabled: readOnly || isSaving,
            help: getHelp()
          }
        ),
        readOnly ? onRemove && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.__experimentalHStack, { justify: "flex-start", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
          import_components.Button,
          {
            variant: "link",
            isDestructive: true,
            onClick: onRemove,
            children: (0, import_i18n.__)("Remove and replace")
          }
        ) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.__experimentalHStack, { justify: "flex-start", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
          import_components.Button,
          {
            __next40pxDefaultSize: true,
            variant: "primary",
            disabled: !apiKey || isSaving,
            accessibleWhenDisabled: true,
            isBusy: isSaving,
            onClick: handleSave,
            children: (0, import_i18n.__)("Save")
          }
        ) })
      ]
    }
  );
}

// packages/connectors/build-module/private-apis.mjs
var privateApis = {};
lock(privateApis, { store, STORE_NAME });
export {
  ConnectorItem as __experimentalConnectorItem,
  DefaultConnectorSettings as __experimentalDefaultConnectorSettings,
  registerConnector as __experimentalRegisterConnector,
  unregisterConnector as __experimentalUnregisterConnector,
  privateApis
};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     dist/script-modules/connectors/index.min.asset.php                                                  0000644                 00000000256 15212564030 0016357 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php return array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-private-apis'), 'version' => '274797868955a828dfdc');                                                                                                                                                                                                                                                                                                                                                  dist/script-modules/core-abilities/index.min.js                                                     0000644                 00000003435 15212564030 0015606 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var E=Object.create;var s=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var c=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var b=(e,t,i,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of u(t))!w.call(e,a)&&a!==i&&s(e,a,{get:()=>t[a],enumerable:!(r=A(t,a))||r.enumerable});return e};var l=(e,t,i)=>(i=e!=null?E(v(e)):{},b(t||!e||!e.__esModule?s(i,"default",{value:e,enumerable:!0}):i,e));var f=c((C,d)=>{d.exports=window.wp.apiFetch});var y=c((D,p)=>{p.exports=window.wp.url});var o=l(f(),1),n=l(y(),1);import{registerAbility as h,registerAbilityCategory as T}from"@wordpress/abilities";var m="/wp-abilities/v1",g=`${m}/abilities`,I=`${m}/categories`;function S(e){return async t=>{let i="POST";e.meta?.annotations?.readonly?i="GET":e.meta?.annotations?.destructive&&e.meta?.annotations?.idempotent&&(i="DELETE");let r=`${g}/${e.name}/run`,a={method:i};return["GET","DELETE"].includes(i)&&t!==null&&t!==void 0?r=(0,n.addQueryArgs)(r,{input:t}):i==="POST"&&t!==null&&t!==void 0&&(a.data={input:t}),(0,o.default)({path:r,...a})}}async function x(){try{let e=await(0,o.default)({path:(0,n.addQueryArgs)(I,{per_page:-1,context:"edit"})});if(e&&Array.isArray(e))for(let t of e)T(t.slug,{label:t.label,description:t.description,meta:{annotations:{serverRegistered:!0}}})}catch(e){console.error("Failed to fetch ability categories:",e)}}async function O(){try{let e=await(0,o.default)({path:(0,n.addQueryArgs)(g,{per_page:-1,context:"edit"})});if(e&&Array.isArray(e))for(let t of e)h({...t,callback:S(t),meta:{annotations:{...t.meta?.annotations,serverRegistered:!0}}})}catch(e){console.error("Failed to fetch abilities:",e)}}async function P(){await x(),await O()}var N=P();export{N as ready};
                                                                                                                                                                                                                                   dist/script-modules/core-abilities/index.js                                                         0000644                 00000010252 15212564030 0015017 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));

// package-external:@wordpress/api-fetch
var require_api_fetch = __commonJS({
  "package-external:@wordpress/api-fetch"(exports, module) {
    module.exports = window.wp.apiFetch;
  }
});

// package-external:@wordpress/url
var require_url = __commonJS({
  "package-external:@wordpress/url"(exports, module) {
    module.exports = window.wp.url;
  }
});

// packages/core-abilities/build-module/index.mjs
var import_api_fetch = __toESM(require_api_fetch(), 1);
var import_url = __toESM(require_url(), 1);
import { registerAbility, registerAbilityCategory } from "@wordpress/abilities";
var API_BASE = "/wp-abilities/v1";
var ABILITIES_ENDPOINT = `${API_BASE}/abilities`;
var CATEGORIES_ENDPOINT = `${API_BASE}/categories`;
function createServerCallback(ability) {
  return async (input) => {
    let method = "POST";
    if (!!ability.meta?.annotations?.readonly) {
      method = "GET";
    } else if (!!ability.meta?.annotations?.destructive && !!ability.meta?.annotations?.idempotent) {
      method = "DELETE";
    }
    let path = `${ABILITIES_ENDPOINT}/${ability.name}/run`;
    const options = {
      method
    };
    if (["GET", "DELETE"].includes(method) && input !== null && input !== void 0) {
      path = (0, import_url.addQueryArgs)(path, { input });
    } else if (method === "POST" && input !== null && input !== void 0) {
      options.data = { input };
    }
    return (0, import_api_fetch.default)({
      path,
      ...options
    });
  };
}
async function initializeCategories() {
  try {
    const categories = await (0, import_api_fetch.default)({
      path: (0, import_url.addQueryArgs)(CATEGORIES_ENDPOINT, {
        per_page: -1,
        context: "edit"
      })
    });
    if (categories && Array.isArray(categories)) {
      for (const category of categories) {
        registerAbilityCategory(category.slug, {
          label: category.label,
          description: category.description,
          meta: {
            annotations: { serverRegistered: true }
          }
        });
      }
    }
  } catch (error) {
    console.error("Failed to fetch ability categories:", error);
  }
}
async function initializeAbilities() {
  try {
    const abilities = await (0, import_api_fetch.default)({
      path: (0, import_url.addQueryArgs)(ABILITIES_ENDPOINT, {
        per_page: -1,
        context: "edit"
      })
    });
    if (abilities && Array.isArray(abilities)) {
      for (const ability of abilities) {
        registerAbility({
          ...ability,
          callback: createServerCallback(ability),
          meta: {
            annotations: {
              ...ability.meta?.annotations,
              serverRegistered: true
            }
          }
        });
      }
    }
  } catch (error) {
    console.error("Failed to fetch abilities:", error);
  }
}
async function initialize() {
  await initializeCategories();
  await initializeAbilities();
}
var ready = initialize();
export {
  ready
};
                                                                                                                                                                                                                                                                                                                                                      dist/script-modules/core-abilities/index.min.asset.php                                              0000644                 00000000310 15212564030 0017064 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php return array('dependencies' => array('wp-api-fetch', 'wp-url'), 'module_dependencies' => array(array('id' => '@wordpress/abilities', 'import' => 'static')), 'version' => '012760fd849397dd0031');                                                                                                                                                                                                                                                                                                                        dist/script-modules/edit-site-init/index.min.js                                                     0000644                 00000011276 15212564030 0015545 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var Z=Object.create;var H=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var G=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty;var g=(f,t)=>()=>(t||f((t={exports:{}}).exports,t),t.exports);var q=(f,t,r,D)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of _(t))!N.call(f,l)&&l!==r&&H(f,l,{get:()=>t[l],enumerable:!(D=I(t,l))||D.enumerable});return f};var a=(f,t,r)=>(r=f!=null?Z(G(f)):{},q(t||!f||!f.__esModule?H(r,"default",{value:f,enumerable:!0}):r,f));var e=g((J,M)=>{M.exports=window.wp.primitives});var o=g((W,P)=>{P.exports=window.ReactJSXRuntime});var A=g((pa,U)=>{U.exports=window.wp.data});var d=a(e(),1),w=a(o(),1),v=(0,w.jsx)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,w.jsx)(d.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})});var u=a(e(),1),b=a(o(),1),y=(0,b.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,b.jsx)(u.Path,{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"})});var i=a(e(),1),x=a(o(),1),L=(0,x.jsx)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,x.jsx)(i.Path,{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"})});var s=a(e(),1),m=a(o(),1),R=(0,m.jsxs)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,m.jsx)(s.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,m.jsx)(s.Path,{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"})]});var p=a(e(),1),V=a(o(),1),S=(0,V.jsx)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,V.jsx)(p.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z"})});var n=a(e(),1),k=a(o(),1),B=(0,k.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,k.jsx)(n.Path,{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"})});var c=a(e(),1),C=a(o(),1),j=(0,C.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,C.jsx)(c.Path,{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"})});var h=a(e(),1),z=a(o(),1),T=(0,z.jsx)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,z.jsx)(h.Path,{d:"m8.6 7 3.9 10.8h-1.7l-1-2.8H5.7l-1 2.8H3L6.9 7h1.7Zm-2.4 6.6h3L7.7 9.3l-1.5 4.3ZM17.691 8.879c.473 0 .88.055 1.221.165.352.1.643.264.875.495.274.253.456.572.544.957.088.374.132.83.132 1.37v4.554c0 .274.033.472.099.593.077.11.198.166.363.166.11 0 .215-.028.313-.083.11-.055.237-.137.38-.247l.165.28a3.304 3.304 0 0 1-.71.446c-.23.11-.527.165-.89.165-.352 0-.639-.055-.858-.165-.22-.11-.386-.27-.495-.479-.1-.209-.149-.468-.149-.775-.286.462-.627.814-1.023 1.056-.396.242-.858.363-1.386.363-.462 0-.858-.088-1.188-.264a1.752 1.752 0 0 1-.742-.726 2.201 2.201 0 0 1-.248-1.056c0-.484.11-.875.33-1.172.22-.308.5-.556.841-.742.352-.187.721-.341 1.106-.462.396-.132.765-.253 1.106-.363.351-.121.637-.259.857-.413.232-.154.347-.357.347-.61V10.81c0-.396-.066-.71-.198-.941a1.05 1.05 0 0 0-.511-.511 1.763 1.763 0 0 0-.76-.149c-.253 0-.522.039-.808.116a1.165 1.165 0 0 0-.677.412 1.1 1.1 0 0 1 .595.396c.165.187.247.424.247.71 0 .307-.104.55-.313.726-.198.176-.451.263-.76.263-.34 0-.594-.104-.758-.313a1.231 1.231 0 0 1-.248-.759c0-.297.072-.539.214-.726.154-.187.352-.363.595-.528.264-.176.6-.324 1.006-.445.418-.121.88-.182 1.386-.182Zm.99 3.729a1.57 1.57 0 0 1-.528.462c-.231.121-.479.248-.742.38a5.377 5.377 0 0 0-.76.462c-.23.165-.423.38-.577.643-.154.264-.231.6-.231 1.007 0 .429.11.77.33 1.023.22.242.517.363.891.363.308 0 .594-.088.858-.264.275-.176.528-.44.759-.792v-3.284Z"})});var F=a(A(),1);import{store as O}from"@wordpress/boot";async function ha(){Object.entries({home:{icon:v},styles:{icon:S},navigation:{icon:L},pages:{icon:R},templateParts:{icon:B},patterns:{icon:j},templates:{icon:y},fontList:{icon:T}}).forEach(([t,{icon:r}])=>{(0,F.dispatch)(O).updateMenuItem(t,{icon:r})})}export{ha as init};
                                                                                                                                                                                                                                                                                                                                  dist/script-modules/edit-site-init/index.js                                                         0000644                 00000020766 15212564030 0014767 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));

// package-external:@wordpress/primitives
var require_primitives = __commonJS({
  "package-external:@wordpress/primitives"(exports, module) {
    module.exports = window.wp.primitives;
  }
});

// vendor-external:react/jsx-runtime
var require_jsx_runtime = __commonJS({
  "vendor-external:react/jsx-runtime"(exports, module) {
    module.exports = window.ReactJSXRuntime;
  }
});

// package-external:@wordpress/data
var require_data = __commonJS({
  "package-external:@wordpress/data"(exports, module) {
    module.exports = window.wp.data;
  }
});

// packages/icons/build-module/library/home.mjs
var import_primitives = __toESM(require_primitives(), 1);
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
var home_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z" }) });

// packages/icons/build-module/library/layout.mjs
var import_primitives2 = __toESM(require_primitives(), 1);
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
var layout_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.Path, { 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" }) });

// packages/icons/build-module/library/navigation.mjs
var import_primitives3 = __toESM(require_primitives(), 1);
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
var navigation_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.Path, { 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" }) });

// packages/icons/build-module/library/page.mjs
var import_primitives4 = __toESM(require_primitives(), 1);
var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
var page_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.Path, { d: "M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z" }),
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.Path, { 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" })
] });

// packages/icons/build-module/library/styles.mjs
var import_primitives5 = __toESM(require_primitives(), 1);
var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
var styles_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z" }) });

// packages/icons/build-module/library/symbol-filled.mjs
var import_primitives6 = __toESM(require_primitives(), 1);
var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
var symbol_filled_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.Path, { 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" }) });

// packages/icons/build-module/library/symbol.mjs
var import_primitives7 = __toESM(require_primitives(), 1);
var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
var symbol_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.Path, { 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" }) });

// packages/icons/build-module/library/typography.mjs
var import_primitives8 = __toESM(require_primitives(), 1);
var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
var typography_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.Path, { d: "m8.6 7 3.9 10.8h-1.7l-1-2.8H5.7l-1 2.8H3L6.9 7h1.7Zm-2.4 6.6h3L7.7 9.3l-1.5 4.3ZM17.691 8.879c.473 0 .88.055 1.221.165.352.1.643.264.875.495.274.253.456.572.544.957.088.374.132.83.132 1.37v4.554c0 .274.033.472.099.593.077.11.198.166.363.166.11 0 .215-.028.313-.083.11-.055.237-.137.38-.247l.165.28a3.304 3.304 0 0 1-.71.446c-.23.11-.527.165-.89.165-.352 0-.639-.055-.858-.165-.22-.11-.386-.27-.495-.479-.1-.209-.149-.468-.149-.775-.286.462-.627.814-1.023 1.056-.396.242-.858.363-1.386.363-.462 0-.858-.088-1.188-.264a1.752 1.752 0 0 1-.742-.726 2.201 2.201 0 0 1-.248-1.056c0-.484.11-.875.33-1.172.22-.308.5-.556.841-.742.352-.187.721-.341 1.106-.462.396-.132.765-.253 1.106-.363.351-.121.637-.259.857-.413.232-.154.347-.357.347-.61V10.81c0-.396-.066-.71-.198-.941a1.05 1.05 0 0 0-.511-.511 1.763 1.763 0 0 0-.76-.149c-.253 0-.522.039-.808.116a1.165 1.165 0 0 0-.677.412 1.1 1.1 0 0 1 .595.396c.165.187.247.424.247.71 0 .307-.104.55-.313.726-.198.176-.451.263-.76.263-.34 0-.594-.104-.758-.313a1.231 1.231 0 0 1-.248-.759c0-.297.072-.539.214-.726.154-.187.352-.363.595-.528.264-.176.6-.324 1.006-.445.418-.121.88-.182 1.386-.182Zm.99 3.729a1.57 1.57 0 0 1-.528.462c-.231.121-.479.248-.742.38a5.377 5.377 0 0 0-.76.462c-.23.165-.423.38-.577.643-.154.264-.231.6-.231 1.007 0 .429.11.77.33 1.023.22.242.517.363.891.363.308 0 .594-.088.858-.264.275-.176.528-.44.759-.792v-3.284Z" }) });

// packages/edit-site-init/build-module/index.mjs
var import_data = __toESM(require_data(), 1);
import { store as bootStore } from "@wordpress/boot";
async function init() {
  const menuIcons = {
    home: { icon: home_default },
    styles: { icon: styles_default },
    navigation: { icon: navigation_default },
    pages: { icon: page_default },
    templateParts: { icon: symbol_filled_default },
    patterns: { icon: symbol_default },
    templates: { icon: layout_default },
    fontList: { icon: typography_default }
  };
  Object.entries(menuIcons).forEach(([id, { icon }]) => {
    (0, import_data.dispatch)(bootStore).updateMenuItem(id, { icon });
  });
}
export {
  init
};
          dist/script-modules/edit-site-init/index.min.asset.php                                              0000644                 00000000350 15212564030 0017025 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php return array('dependencies' => array('react-jsx-runtime', 'wp-data', 'wp-element', 'wp-primitives'), 'module_dependencies' => array(array('id' => '@wordpress/boot', 'import' => 'static')), 'version' => 'e57f44d1a9f69e75d2d9');                                                                                                                                                                                                                                                                                        dist/script-modules/latex-to-mathml/loader.min.asset.php                                            0000644                 00000000267 15212564030 0017360 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/latex-to-mathml', 'import' => 'dynamic')), 'version' => '4f37456af539bd3d2351');                                                                                                                                                                                                                                                                                                                                         dist/script-modules/latex-to-mathml/index.min.js                                                    0000644                 00000613760 15212564030 0015740 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var w=class e{constructor(t,r){let o=" "+t,s,i=r&&r.loc;if(i&&i.start<=i.end){let u=i.lexer.input;s=i.start;let h=i.end;s===u.length?o+=" at end of input: ":o+=" at position "+(s+1)+": ";let x=u.slice(s,h).replace(/[^]/g,"$&\u0332"),A;s>15?A="\u2026"+u.slice(s-15,s):A=u.slice(0,s);let q;h+15<u.length?q=u.slice(h,h+15)+"\u2026":q=u.slice(h),o+=A+x+q}let l=new Error(o);return l.name="ParseError",l.__proto__=e.prototype,l.position=s,l}};w.prototype.__proto__=Error.prototype;var yr=function(e,t){return e===void 0?t:e},wr=/([A-Z])/g,vr=function(e){return e.replace(wr,"-$1").toLowerCase()},kr={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},Ar=/[&><"']/g;function Sr(e){return String(e).replace(Ar,t=>kr[t])}var me=function(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?me(e.body[0]):e:e.type==="font"?me(e.body):e},qr=function(e){let t=me(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},_r=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},Tr=function(e){let t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},Cr=function(e){return+e.toFixed(4)},N={deflt:yr,escape:Sr,hyphenate:vr,getBaseElem:me,isCharacterBox:qr,protocolFromUrl:Tr,round:Cr},pe=class{constructor(t){t=t||{},this.displayMode=N.deflt(t.displayMode,!1),this.annotate=N.deflt(t.annotate,!1),this.leqno=N.deflt(t.leqno,!1),this.throwOnError=N.deflt(t.throwOnError,!1),this.errorColor=N.deflt(t.errorColor,"#b22222"),this.macros=t.macros||{},this.wrap=N.deflt(t.wrap,"tex"),this.xml=N.deflt(t.xml,!1),this.colorIsTextColor=N.deflt(t.colorIsTextColor,!1),this.strict=N.deflt(t.strict,!1),this.trust=N.deflt(t.trust,!1),this.maxSize=t.maxSize===void 0?[1/0,1/0]:Array.isArray(t.maxSize)?t.maxSize:[1/0,1/0],this.maxExpand=Math.max(0,N.deflt(t.maxExpand,1e3))}isTrusted(t){if(t.url&&!t.protocol){let o=N.protocolFromUrl(t.url);if(o==null)return!1;t.protocol=o}return!!(typeof this.trust=="function"?this.trust(t):this.trust)}},Ut={},Ce={};function S({type:e,names:t,props:r,handler:o,mathmlBuilder:s}){let i={type:e,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:o};for(let l=0;l<t.length;++l)Ut[t[l]]=i;e&&s&&(Ce[e]=s)}function se({type:e,mathmlBuilder:t}){S({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},mathmlBuilder:t})}var fe=function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},z=function(e){return e.type==="ordgroup"?e.body:[e]},ge=class{constructor(t){this.children=t,this.classes=[],this.style={}}hasClass(t){return this.classes.includes(t)}toNode(){let t=document.createDocumentFragment();for(let r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t}toMarkup(){let t="";for(let r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t}toText(){let t=r=>r.toText();return this.children.map(t).join("")}},ue=function(e){return e.filter(t=>t).join(" ")},Dr=function(e,t){this.classes=e||[],this.attributes={},this.style=t||{}},Br=function(e){let t=document.createElement(e);t.className=ue(this.classes);for(let r in this.style)Object.prototype.hasOwnProperty.call(this.style,r)&&(t.style[r]=this.style[r]);for(let r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&t.setAttribute(r,this.attributes[r]);for(let r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t},Nr=function(e){let t=`<${e}`;this.classes.length&&(t+=` class="${N.escape(ue(this.classes))}"`);let r="";for(let o in this.style)Object.prototype.hasOwnProperty.call(this.style,o)&&(r+=`${N.hyphenate(o)}:${this.style[o]};`);r&&(t+=` style="${r}"`);for(let o in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,o)&&(t+=` ${o}="${N.escape(this.attributes[o])}"`);t+=">";for(let o=0;o<this.children.length;o++)t+=this.children[o].toMarkup();return t+=`</${e}>`,t},De=class{constructor(t,r,o){Dr.call(this,t,o),this.children=r||[]}setAttribute(t,r){this.attributes[t]=r}toNode(){return Br.call(this,"span")}toMarkup(){return Nr.call(this,"span")}},Or=class{constructor(t){this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return N.escape(this.text)}},be=class{constructor(t,r,o){this.href=t,this.classes=r,this.children=o||[]}toNode(){let t=document.createElement("a");t.setAttribute("href",this.href),this.classes.length>0&&(t.className=ue(this.classes));for(let r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t}toMarkup(){let t=`<a href='${N.escape(this.href)}'`;this.classes.length>0&&(t+=` class="${N.escape(ue(this.classes))}"`),t+=">";for(let r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t+="</a>",t}},Re=class{constructor(t,r,o){this.alt=r,this.src=t,this.classes=["mord"],this.style=o}hasClass(t){return this.classes.includes(t)}toNode(){let t=document.createElement("img");t.src=this.src,t.alt=this.alt,t.className="mord";for(let r in this.style)Object.prototype.hasOwnProperty.call(this.style,r)&&(t.style[r]=this.style[r]);return t}toMarkup(){let t=`<img src='${this.src}' alt='${this.alt}'`,r="";for(let o in this.style)Object.prototype.hasOwnProperty.call(this.style,o)&&(r+=`${N.hyphenate(o)}:${this.style[o]};`);return r&&(t+=` style="${N.escape(r)}"`),t+=">",t}};function $r(e){return new ge(e)}var R=class{constructor(t,r,o,s){this.type=t,this.attributes={},this.children=r||[],this.classes=o||[],this.style=s||{},this.label=""}setAttribute(t,r){this.attributes[t]=r}getAttribute(t){return this.attributes[t]}setLabel(t){this.label=t}toNode(){let t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(let r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&t.setAttribute(r,this.attributes[r]);this.classes.length>0&&(t.className=ue(this.classes));for(let r in this.style)Object.prototype.hasOwnProperty.call(this.style,r)&&(t.style[r]=this.style[r]);for(let r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t}toMarkup(){let t="<"+this.type;for(let o in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,o)&&(t+=" "+o+'="',t+=N.escape(this.attributes[o]),t+='"');this.classes.length>0&&(t+=` class="${N.escape(ue(this.classes))}"`);let r="";for(let o in this.style)Object.prototype.hasOwnProperty.call(this.style,o)&&(r+=`${N.hyphenate(o)}:${this.style[o]};`);r&&(t+=` style="${r}"`),t+=">";for(let o=0;o<this.children.length;o++)t+=this.children[o].toMarkup();return t+="</"+this.type+">",t}toText(){return this.children.map(t=>t.toText()).join("")}},ae=class{constructor(t){this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return N.escape(this.toText())}toText(){return this.text}},Je=e=>{let t;return e.length===1&&e[0].type==="mrow"?(t=e.pop(),t.type="mstyle"):t=new R("mstyle",e),t},p={MathNode:R,TextNode:ae,newDocumentFragment:$r},de=e=>{let t=0;if(e.body)for(let r of e.body)t+=de(r);else if(e.type==="supsub")t+=de(e.base),e.sub&&(t+=.7*de(e.sub)),e.sup&&(t+=.7*de(e.sup));else if(e.type==="mathord"||e.type==="textord")for(let r of e.text.split("")){let o=r.codePointAt(0);96<o&&o<123||944<o&&o<970?t+=.56:47<o&&o<58?t+=.5:t+=.92}else t+=1;return t},Mr={widehat:"^",widecheck:"\u02C7",widetilde:"~",wideparen:"\u23DC",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",overparen:"\u23DC",undergroup:"\u23E1",underparen:"\u23DD",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xrightleftarrows:"\u21C4",yields:"\u2192",yieldsLeft:"\u2190",mesomerism:"\u2194",longrightharpoonup:"\u21C0",longleftharpoondown:"\u21BD",eqrightharpoonup:"\u21C0",eqleftharpoondown:"\u21BD","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},Vt=function(e){let t=new p.TextNode(Mr[e.slice(1)]),r=new p.MathNode("mo",[t]);return r.setAttribute("stretchy","true"),r},Er=["\\widetilde","\\widehat","\\widecheck","\\utilde"],zr=e=>{let t=Vt(e.label);if(Er.includes(e.label)){let r=de(e.base);1<r&&r<1.6?t.classes.push("tml-crooked-2"):1.6<=r&&r<2.5?t.classes.push("tml-crooked-3"):2.5<=r&&t.classes.push("tml-crooked-4")}return t},Me={mathMLnode:Vt,accentNode:zr},Lr={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Fr={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},I={math:{},text:{}};function n(e,t,r,o,s){I[e][o]={group:t,replace:r},s&&r&&(I[e][r]=I[e][o])}var a="math",g="text",B="accent-token",f="bin",L="close",ie="inner",v="mathord",D="op-token",P="open",we="punct",d="rel",ee="spacing",m="textord";n(a,d,"\u2261","\\equiv",!0);n(a,d,"\u227A","\\prec",!0);n(a,d,"\u227B","\\succ",!0);n(a,d,"\u223C","\\sim",!0);n(a,d,"\u27C2","\\perp",!0);n(a,d,"\u2AAF","\\preceq",!0);n(a,d,"\u2AB0","\\succeq",!0);n(a,d,"\u2243","\\simeq",!0);n(a,d,"\u224C","\\backcong",!0);n(a,d,"|","\\mid",!0);n(a,d,"\u226A","\\ll",!0);n(a,d,"\u226B","\\gg",!0);n(a,d,"\u224D","\\asymp",!0);n(a,d,"\u2225","\\parallel");n(a,d,"\u2323","\\smile",!0);n(a,d,"\u2291","\\sqsubseteq",!0);n(a,d,"\u2292","\\sqsupseteq",!0);n(a,d,"\u2250","\\doteq",!0);n(a,d,"\u2322","\\frown",!0);n(a,d,"\u220B","\\ni",!0);n(a,d,"\u220C","\\notni",!0);n(a,d,"\u221D","\\propto",!0);n(a,d,"\u22A2","\\vdash",!0);n(a,d,"\u22A3","\\dashv",!0);n(a,d,"\u220B","\\owns");n(a,d,"\u2258","\\arceq",!0);n(a,d,"\u2259","\\wedgeq",!0);n(a,d,"\u225A","\\veeeq",!0);n(a,d,"\u225B","\\stareq",!0);n(a,d,"\u225D","\\eqdef",!0);n(a,d,"\u225E","\\measeq",!0);n(a,d,"\u225F","\\questeq",!0);n(a,d,"\u2260","\\ne",!0);n(a,d,"\u2260","\\neq");n(a,d,"\u2A75","\\eqeq",!0);n(a,d,"\u2A76","\\eqeqeq",!0);n(a,d,"\u2237","\\dblcolon",!0);n(a,d,"\u2254","\\coloneqq",!0);n(a,d,"\u2255","\\eqqcolon",!0);n(a,d,"\u2239","\\eqcolon",!0);n(a,d,"\u2A74","\\Coloneqq",!0);n(a,we,".","\\ldotp");n(a,we,"\xB7","\\cdotp");n(a,m,"#","\\#");n(g,m,"#","\\#");n(a,m,"&","\\&");n(g,m,"&","\\&");n(a,m,"\u2135","\\aleph",!0);n(a,m,"\u2200","\\forall",!0);n(a,m,"\u210F","\\hbar",!0);n(a,m,"\u2203","\\exists",!0);n(a,f,"\u2207","\\nabla",!0);n(a,m,"\u266D","\\flat",!0);n(a,m,"\u2113","\\ell",!0);n(a,m,"\u266E","\\natural",!0);n(a,m,"\u212B","\\Angstrom",!0);n(g,m,"\u212B","\\Angstrom",!0);n(a,m,"\u2663","\\clubsuit",!0);n(a,m,"\u2667","\\varclubsuit",!0);n(a,m,"\u2118","\\wp",!0);n(a,m,"\u266F","\\sharp",!0);n(a,m,"\u2662","\\diamondsuit",!0);n(a,m,"\u2666","\\vardiamondsuit",!0);n(a,m,"\u211C","\\Re",!0);n(a,m,"\u2661","\\heartsuit",!0);n(a,m,"\u2665","\\varheartsuit",!0);n(a,m,"\u2111","\\Im",!0);n(a,m,"\u2660","\\spadesuit",!0);n(a,m,"\u2664","\\varspadesuit",!0);n(a,m,"\u2640","\\female",!0);n(a,m,"\u2642","\\male",!0);n(a,m,"\xA7","\\S",!0);n(g,m,"\xA7","\\S");n(a,m,"\xB6","\\P",!0);n(g,m,"\xB6","\\P");n(g,m,"\u263A","\\smiley",!0);n(a,m,"\u263A","\\smiley",!0);n(a,m,"\u2020","\\dag");n(g,m,"\u2020","\\dag");n(g,m,"\u2020","\\textdagger");n(a,m,"\u2021","\\ddag");n(g,m,"\u2021","\\ddag");n(g,m,"\u2021","\\textdaggerdbl");n(a,L,"\u23B1","\\rmoustache",!0);n(a,P,"\u23B0","\\lmoustache",!0);n(a,L,"\u27EF","\\rgroup",!0);n(a,P,"\u27EE","\\lgroup",!0);n(a,f,"\u2213","\\mp",!0);n(a,f,"\u2296","\\ominus",!0);n(a,f,"\u228E","\\uplus",!0);n(a,f,"\u2293","\\sqcap",!0);n(a,f,"\u2217","\\ast");n(a,f,"\u2294","\\sqcup",!0);n(a,f,"\u25EF","\\bigcirc",!0);n(a,f,"\u2219","\\bullet",!0);n(a,f,"\u2021","\\ddagger");n(a,f,"\u2240","\\wr",!0);n(a,f,"\u2A3F","\\amalg");n(a,f,"&","\\And");n(a,f,"\u2AFD","\\sslash",!0);n(a,d,"\u27F5","\\longleftarrow",!0);n(a,d,"\u21D0","\\Leftarrow",!0);n(a,d,"\u27F8","\\Longleftarrow",!0);n(a,d,"\u27F6","\\longrightarrow",!0);n(a,d,"\u21D2","\\Rightarrow",!0);n(a,d,"\u27F9","\\Longrightarrow",!0);n(a,d,"\u2194","\\leftrightarrow",!0);n(a,d,"\u27F7","\\longleftrightarrow",!0);n(a,d,"\u21D4","\\Leftrightarrow",!0);n(a,d,"\u27FA","\\Longleftrightarrow",!0);n(a,d,"\u21A4","\\mapsfrom",!0);n(a,d,"\u21A6","\\mapsto",!0);n(a,d,"\u27FC","\\longmapsto",!0);n(a,d,"\u2197","\\nearrow",!0);n(a,d,"\u21A9","\\hookleftarrow",!0);n(a,d,"\u21AA","\\hookrightarrow",!0);n(a,d,"\u2198","\\searrow",!0);n(a,d,"\u21BC","\\leftharpoonup",!0);n(a,d,"\u21C0","\\rightharpoonup",!0);n(a,d,"\u2199","\\swarrow",!0);n(a,d,"\u21BD","\\leftharpoondown",!0);n(a,d,"\u21C1","\\rightharpoondown",!0);n(a,d,"\u2196","\\nwarrow",!0);n(a,d,"\u21CC","\\rightleftharpoons",!0);n(a,v,"\u21AF","\\lightning",!0);n(a,v,"\u220E","\\QED",!0);n(a,v,"\u2030","\\permil",!0);n(g,m,"\u2030","\\permil");n(a,v,"\u2609","\\astrosun",!0);n(a,v,"\u263C","\\sun",!0);n(a,v,"\u263E","\\leftmoon",!0);n(a,v,"\u263D","\\rightmoon",!0);n(a,v,"\u2295","\\Earth");n(a,d,"\u226E","\\nless",!0);n(a,d,"\u2A87","\\lneq",!0);n(a,d,"\u2268","\\lneqq",!0);n(a,d,"\u2268\uFE00","\\lvertneqq");n(a,d,"\u22E6","\\lnsim",!0);n(a,d,"\u2A89","\\lnapprox",!0);n(a,d,"\u2280","\\nprec",!0);n(a,d,"\u22E0","\\npreceq",!0);n(a,d,"\u22E8","\\precnsim",!0);n(a,d,"\u2AB9","\\precnapprox",!0);n(a,d,"\u2241","\\nsim",!0);n(a,d,"\u2224","\\nmid",!0);n(a,d,"\u2224","\\nshortmid");n(a,d,"\u22AC","\\nvdash",!0);n(a,d,"\u22AD","\\nvDash",!0);n(a,d,"\u22EA","\\ntriangleleft");n(a,d,"\u22EC","\\ntrianglelefteq",!0);n(a,d,"\u2284","\\nsubset",!0);n(a,d,"\u2285","\\nsupset",!0);n(a,d,"\u228A","\\subsetneq",!0);n(a,d,"\u228A\uFE00","\\varsubsetneq");n(a,d,"\u2ACB","\\subsetneqq",!0);n(a,d,"\u2ACB\uFE00","\\varsubsetneqq");n(a,d,"\u226F","\\ngtr",!0);n(a,d,"\u2A88","\\gneq",!0);n(a,d,"\u2269","\\gneqq",!0);n(a,d,"\u2269\uFE00","\\gvertneqq");n(a,d,"\u22E7","\\gnsim",!0);n(a,d,"\u2A8A","\\gnapprox",!0);n(a,d,"\u2281","\\nsucc",!0);n(a,d,"\u22E1","\\nsucceq",!0);n(a,d,"\u22E9","\\succnsim",!0);n(a,d,"\u2ABA","\\succnapprox",!0);n(a,d,"\u2246","\\ncong",!0);n(a,d,"\u2226","\\nparallel",!0);n(a,d,"\u2226","\\nshortparallel");n(a,d,"\u22AF","\\nVDash",!0);n(a,d,"\u22EB","\\ntriangleright");n(a,d,"\u22ED","\\ntrianglerighteq",!0);n(a,d,"\u228B","\\supsetneq",!0);n(a,d,"\u228B","\\varsupsetneq");n(a,d,"\u2ACC","\\supsetneqq",!0);n(a,d,"\u2ACC\uFE00","\\varsupsetneqq");n(a,d,"\u22AE","\\nVdash",!0);n(a,d,"\u2AB5","\\precneqq",!0);n(a,d,"\u2AB6","\\succneqq",!0);n(a,f,"\u22B4","\\unlhd");n(a,f,"\u22B5","\\unrhd");n(a,d,"\u219A","\\nleftarrow",!0);n(a,d,"\u219B","\\nrightarrow",!0);n(a,d,"\u21CD","\\nLeftarrow",!0);n(a,d,"\u21CF","\\nRightarrow",!0);n(a,d,"\u21AE","\\nleftrightarrow",!0);n(a,d,"\u21CE","\\nLeftrightarrow",!0);n(a,d,"\u25B3","\\vartriangle");n(a,m,"\u210F","\\hslash");n(a,m,"\u25BD","\\triangledown");n(a,m,"\u25CA","\\lozenge");n(a,m,"\u24C8","\\circledS");n(a,m,"\xAE","\\circledR",!0);n(g,m,"\xAE","\\circledR");n(g,m,"\xAE","\\textregistered");n(a,m,"\u2221","\\measuredangle",!0);n(a,m,"\u2204","\\nexists");n(a,m,"\u2127","\\mho");n(a,m,"\u2132","\\Finv",!0);n(a,m,"\u2141","\\Game",!0);n(a,m,"\u2035","\\backprime");n(a,m,"\u2036","\\backdprime");n(a,m,"\u2037","\\backtrprime");n(a,m,"\u25B2","\\blacktriangle");n(a,m,"\u25BC","\\blacktriangledown");n(a,m,"\u25A0","\\blacksquare");n(a,m,"\u29EB","\\blacklozenge");n(a,m,"\u2605","\\bigstar");n(a,m,"\u2222","\\sphericalangle",!0);n(a,m,"\u2201","\\complement",!0);n(a,m,"\xF0","\\eth",!0);n(g,m,"\xF0","\xF0");n(a,m,"\u2571","\\diagup");n(a,m,"\u2572","\\diagdown");n(a,m,"\u25A1","\\square");n(a,m,"\u25A1","\\Box");n(a,m,"\u25CA","\\Diamond");n(a,m,"\xA5","\\yen",!0);n(g,m,"\xA5","\\yen",!0);n(a,m,"\u2713","\\checkmark",!0);n(g,m,"\u2713","\\checkmark");n(a,m,"\u2717","\\ballotx",!0);n(g,m,"\u2717","\\ballotx");n(g,m,"\u2022","\\textbullet");n(a,m,"\u2136","\\beth",!0);n(a,m,"\u2138","\\daleth",!0);n(a,m,"\u2137","\\gimel",!0);n(a,m,"\u03DD","\\digamma",!0);n(a,m,"\u03F0","\\varkappa");n(a,P,"\u231C","\\ulcorner",!0);n(a,L,"\u231D","\\urcorner",!0);n(a,P,"\u231E","\\llcorner",!0);n(a,L,"\u231F","\\lrcorner",!0);n(a,d,"\u2266","\\leqq",!0);n(a,d,"\u2A7D","\\leqslant",!0);n(a,d,"\u2A95","\\eqslantless",!0);n(a,d,"\u2272","\\lesssim",!0);n(a,d,"\u2A85","\\lessapprox",!0);n(a,d,"\u224A","\\approxeq",!0);n(a,f,"\u22D6","\\lessdot");n(a,d,"\u22D8","\\lll",!0);n(a,d,"\u2276","\\lessgtr",!0);n(a,d,"\u22DA","\\lesseqgtr",!0);n(a,d,"\u2A8B","\\lesseqqgtr",!0);n(a,d,"\u2251","\\doteqdot");n(a,d,"\u2253","\\risingdotseq",!0);n(a,d,"\u2252","\\fallingdotseq",!0);n(a,d,"\u223D","\\backsim",!0);n(a,d,"\u22CD","\\backsimeq",!0);n(a,d,"\u2AC5","\\subseteqq",!0);n(a,d,"\u22D0","\\Subset",!0);n(a,d,"\u228F","\\sqsubset",!0);n(a,d,"\u227C","\\preccurlyeq",!0);n(a,d,"\u22DE","\\curlyeqprec",!0);n(a,d,"\u227E","\\precsim",!0);n(a,d,"\u2AB7","\\precapprox",!0);n(a,d,"\u22B2","\\vartriangleleft");n(a,d,"\u22B4","\\trianglelefteq");n(a,d,"\u22A8","\\vDash",!0);n(a,d,"\u22AB","\\VDash",!0);n(a,d,"\u22AA","\\Vvdash",!0);n(a,d,"\u2323","\\smallsmile");n(a,d,"\u2322","\\smallfrown");n(a,d,"\u224F","\\bumpeq",!0);n(a,d,"\u224E","\\Bumpeq",!0);n(a,d,"\u2267","\\geqq",!0);n(a,d,"\u2A7E","\\geqslant",!0);n(a,d,"\u2A96","\\eqslantgtr",!0);n(a,d,"\u2273","\\gtrsim",!0);n(a,d,"\u2A86","\\gtrapprox",!0);n(a,f,"\u22D7","\\gtrdot");n(a,d,"\u22D9","\\ggg",!0);n(a,d,"\u2277","\\gtrless",!0);n(a,d,"\u22DB","\\gtreqless",!0);n(a,d,"\u2A8C","\\gtreqqless",!0);n(a,d,"\u2256","\\eqcirc",!0);n(a,d,"\u2257","\\circeq",!0);n(a,d,"\u225C","\\triangleq",!0);n(a,d,"\u223C","\\thicksim");n(a,d,"\u2248","\\thickapprox");n(a,d,"\u2AC6","\\supseteqq",!0);n(a,d,"\u22D1","\\Supset",!0);n(a,d,"\u2290","\\sqsupset",!0);n(a,d,"\u227D","\\succcurlyeq",!0);n(a,d,"\u22DF","\\curlyeqsucc",!0);n(a,d,"\u227F","\\succsim",!0);n(a,d,"\u2AB8","\\succapprox",!0);n(a,d,"\u22B3","\\vartriangleright");n(a,d,"\u22B5","\\trianglerighteq");n(a,d,"\u22A9","\\Vdash",!0);n(a,d,"\u2223","\\shortmid");n(a,d,"\u2225","\\shortparallel");n(a,d,"\u226C","\\between",!0);n(a,d,"\u22D4","\\pitchfork",!0);n(a,d,"\u221D","\\varpropto");n(a,d,"\u25C0","\\blacktriangleleft");n(a,d,"\u2234","\\therefore",!0);n(a,d,"\u220D","\\backepsilon");n(a,d,"\u25B6","\\blacktriangleright");n(a,d,"\u2235","\\because",!0);n(a,d,"\u22D8","\\llless");n(a,d,"\u22D9","\\gggtr");n(a,f,"\u22B2","\\lhd");n(a,f,"\u22B3","\\rhd");n(a,d,"\u2242","\\eqsim",!0);n(a,d,"\u2251","\\Doteq",!0);n(a,d,"\u297D","\\strictif",!0);n(a,d,"\u297C","\\strictfi",!0);n(a,f,"\u2214","\\dotplus",!0);n(a,f,"\u2216","\\smallsetminus");n(a,f,"\u22D2","\\Cap",!0);n(a,f,"\u22D3","\\Cup",!0);n(a,f,"\u2A5E","\\doublebarwedge",!0);n(a,f,"\u229F","\\boxminus",!0);n(a,f,"\u229E","\\boxplus",!0);n(a,f,"\u29C4","\\boxslash",!0);n(a,f,"\u22C7","\\divideontimes",!0);n(a,f,"\u22C9","\\ltimes",!0);n(a,f,"\u22CA","\\rtimes",!0);n(a,f,"\u22CB","\\leftthreetimes",!0);n(a,f,"\u22CC","\\rightthreetimes",!0);n(a,f,"\u22CF","\\curlywedge",!0);n(a,f,"\u22CE","\\curlyvee",!0);n(a,f,"\u229D","\\circleddash",!0);n(a,f,"\u229B","\\circledast",!0);n(a,f,"\u22BA","\\intercal",!0);n(a,f,"\u22D2","\\doublecap");n(a,f,"\u22D3","\\doublecup");n(a,f,"\u22A0","\\boxtimes",!0);n(a,f,"\u22C8","\\bowtie",!0);n(a,f,"\u22C8","\\Join");n(a,f,"\u27D5","\\leftouterjoin",!0);n(a,f,"\u27D6","\\rightouterjoin",!0);n(a,f,"\u27D7","\\fullouterjoin",!0);n(a,f,"\u2238","\\dotminus",!0);n(a,f,"\u27D1","\\wedgedot",!0);n(a,f,"\u27C7","\\veedot",!0);n(a,f,"\u2A62","\\doublebarvee",!0);n(a,f,"\u2A63","\\veedoublebar",!0);n(a,f,"\u2A5F","\\wedgebar",!0);n(a,f,"\u2A60","\\wedgedoublebar",!0);n(a,f,"\u2A54","\\Vee",!0);n(a,f,"\u2A53","\\Wedge",!0);n(a,f,"\u2A43","\\barcap",!0);n(a,f,"\u2A42","\\barcup",!0);n(a,f,"\u2A48","\\capbarcup",!0);n(a,f,"\u2A40","\\capdot",!0);n(a,f,"\u2A47","\\capovercup",!0);n(a,f,"\u2A46","\\cupovercap",!0);n(a,f,"\u2A4D","\\closedvarcap",!0);n(a,f,"\u2A4C","\\closedvarcup",!0);n(a,f,"\u2A2A","\\minusdot",!0);n(a,f,"\u2A2B","\\minusfdots",!0);n(a,f,"\u2A2C","\\minusrdots",!0);n(a,f,"\u22BB","\\Xor",!0);n(a,f,"\u22BC","\\Nand",!0);n(a,f,"\u22BD","\\Nor",!0);n(a,f,"\u22BD","\\barvee");n(a,f,"\u2AF4","\\interleave",!0);n(a,f,"\u29E2","\\shuffle",!0);n(a,f,"\u2AF6","\\threedotcolon",!0);n(a,f,"\u2982","\\typecolon",!0);n(a,f,"\u223E","\\invlazys",!0);n(a,f,"\u2A4B","\\twocaps",!0);n(a,f,"\u2A4A","\\twocups",!0);n(a,f,"\u2A4E","\\Sqcap",!0);n(a,f,"\u2A4F","\\Sqcup",!0);n(a,f,"\u2A56","\\veeonvee",!0);n(a,f,"\u2A55","\\wedgeonwedge",!0);n(a,f,"\u29D7","\\blackhourglass",!0);n(a,f,"\u29C6","\\boxast",!0);n(a,f,"\u29C8","\\boxbox",!0);n(a,f,"\u29C7","\\boxcircle",!0);n(a,f,"\u229C","\\circledequal",!0);n(a,f,"\u29B7","\\circledparallel",!0);n(a,f,"\u29B6","\\circledvert",!0);n(a,f,"\u29B5","\\circlehbar",!0);n(a,f,"\u27E1","\\concavediamond",!0);n(a,f,"\u27E2","\\concavediamondtickleft",!0);n(a,f,"\u27E3","\\concavediamondtickright",!0);n(a,f,"\u22C4","\\diamond",!0);n(a,f,"\u29D6","\\hourglass",!0);n(a,f,"\u27E0","\\lozengeminus",!0);n(a,f,"\u233D","\\obar",!0);n(a,f,"\u29B8","\\obslash",!0);n(a,f,"\u2A38","\\odiv",!0);n(a,f,"\u29C1","\\ogreaterthan",!0);n(a,f,"\u29C0","\\olessthan",!0);n(a,f,"\u29B9","\\operp",!0);n(a,f,"\u2A37","\\Otimes",!0);n(a,f,"\u2A36","\\otimeshat",!0);n(a,f,"\u22C6","\\star",!0);n(a,f,"\u25B3","\\triangle",!0);n(a,f,"\u2A3A","\\triangleminus",!0);n(a,f,"\u2A39","\\triangleplus",!0);n(a,f,"\u2A3B","\\triangletimes",!0);n(a,f,"\u27E4","\\whitesquaretickleft",!0);n(a,f,"\u27E5","\\whitesquaretickright",!0);n(a,f,"\u2A33","\\smashtimes",!0);n(a,d,"\u21E2","\\dashrightarrow",!0);n(a,d,"\u21E0","\\dashleftarrow",!0);n(a,d,"\u21C7","\\leftleftarrows",!0);n(a,d,"\u21C6","\\leftrightarrows",!0);n(a,d,"\u21DA","\\Lleftarrow",!0);n(a,d,"\u219E","\\twoheadleftarrow",!0);n(a,d,"\u21A2","\\leftarrowtail",!0);n(a,d,"\u21AB","\\looparrowleft",!0);n(a,d,"\u21CB","\\leftrightharpoons",!0);n(a,d,"\u21B6","\\curvearrowleft",!0);n(a,d,"\u21BA","\\circlearrowleft",!0);n(a,d,"\u21B0","\\Lsh",!0);n(a,d,"\u21C8","\\upuparrows",!0);n(a,d,"\u21BF","\\upharpoonleft",!0);n(a,d,"\u21C3","\\downharpoonleft",!0);n(a,d,"\u22B6","\\origof",!0);n(a,d,"\u22B7","\\imageof",!0);n(a,d,"\u22B8","\\multimap",!0);n(a,d,"\u21AD","\\leftrightsquigarrow",!0);n(a,d,"\u21C9","\\rightrightarrows",!0);n(a,d,"\u21C4","\\rightleftarrows",!0);n(a,d,"\u21A0","\\twoheadrightarrow",!0);n(a,d,"\u21A3","\\rightarrowtail",!0);n(a,d,"\u21AC","\\looparrowright",!0);n(a,d,"\u21B7","\\curvearrowright",!0);n(a,d,"\u21BB","\\circlearrowright",!0);n(a,d,"\u21B1","\\Rsh",!0);n(a,d,"\u21CA","\\downdownarrows",!0);n(a,d,"\u21BE","\\upharpoonright",!0);n(a,d,"\u21C2","\\downharpoonright",!0);n(a,d,"\u21DD","\\rightsquigarrow",!0);n(a,d,"\u21DD","\\leadsto");n(a,d,"\u21DB","\\Rrightarrow",!0);n(a,d,"\u21BE","\\restriction");n(a,m,"\u2018","`");n(a,m,"$","\\$");n(g,m,"$","\\$");n(g,m,"$","\\textdollar");n(a,m,"\xA2","\\cent");n(g,m,"\xA2","\\cent");n(a,m,"%","\\%");n(g,m,"%","\\%");n(a,m,"_","\\_");n(g,m,"_","\\_");n(g,m,"_","\\textunderscore");n(g,m,"\u2423","\\textvisiblespace",!0);n(a,m,"\u2220","\\angle",!0);n(a,m,"\u221E","\\infty",!0);n(a,m,"\u2032","\\prime");n(a,m,"\u2033","\\dprime");n(a,m,"\u2034","\\trprime");n(a,m,"\u2057","\\qprime");n(a,m,"\u25B3","\\triangle");n(g,m,"\u0391","\\Alpha",!0);n(g,m,"\u0392","\\Beta",!0);n(g,m,"\u0393","\\Gamma",!0);n(g,m,"\u0394","\\Delta",!0);n(g,m,"\u0395","\\Epsilon",!0);n(g,m,"\u0396","\\Zeta",!0);n(g,m,"\u0397","\\Eta",!0);n(g,m,"\u0398","\\Theta",!0);n(g,m,"\u0399","\\Iota",!0);n(g,m,"\u039A","\\Kappa",!0);n(g,m,"\u039B","\\Lambda",!0);n(g,m,"\u039C","\\Mu",!0);n(g,m,"\u039D","\\Nu",!0);n(g,m,"\u039E","\\Xi",!0);n(g,m,"\u039F","\\Omicron",!0);n(g,m,"\u03A0","\\Pi",!0);n(g,m,"\u03A1","\\Rho",!0);n(g,m,"\u03A3","\\Sigma",!0);n(g,m,"\u03A4","\\Tau",!0);n(g,m,"\u03A5","\\Upsilon",!0);n(g,m,"\u03A6","\\Phi",!0);n(g,m,"\u03A7","\\Chi",!0);n(g,m,"\u03A8","\\Psi",!0);n(g,m,"\u03A9","\\Omega",!0);n(a,v,"\u0391","\\Alpha",!0);n(a,v,"\u0392","\\Beta",!0);n(a,v,"\u0393","\\Gamma",!0);n(a,v,"\u0394","\\Delta",!0);n(a,v,"\u0395","\\Epsilon",!0);n(a,v,"\u0396","\\Zeta",!0);n(a,v,"\u0397","\\Eta",!0);n(a,v,"\u0398","\\Theta",!0);n(a,v,"\u0399","\\Iota",!0);n(a,v,"\u039A","\\Kappa",!0);n(a,v,"\u039B","\\Lambda",!0);n(a,v,"\u039C","\\Mu",!0);n(a,v,"\u039D","\\Nu",!0);n(a,v,"\u039E","\\Xi",!0);n(a,v,"\u039F","\\Omicron",!0);n(a,v,"\u03A0","\\Pi",!0);n(a,v,"\u03A1","\\Rho",!0);n(a,v,"\u03A3","\\Sigma",!0);n(a,v,"\u03A4","\\Tau",!0);n(a,v,"\u03A5","\\Upsilon",!0);n(a,v,"\u03A6","\\Phi",!0);n(a,v,"\u03A7","\\Chi",!0);n(a,v,"\u03A8","\\Psi",!0);n(a,v,"\u03A9","\\Omega",!0);n(a,P,"\xAC","\\neg",!0);n(a,P,"\xAC","\\lnot");n(a,m,"\u22A4","\\top");n(a,m,"\u22A5","\\bot");n(a,m,"\u2205","\\emptyset");n(a,m,"\u2300","\\varnothing");n(a,v,"\u03B1","\\alpha",!0);n(a,v,"\u03B2","\\beta",!0);n(a,v,"\u03B3","\\gamma",!0);n(a,v,"\u03B4","\\delta",!0);n(a,v,"\u03F5","\\epsilon",!0);n(a,v,"\u03B6","\\zeta",!0);n(a,v,"\u03B7","\\eta",!0);n(a,v,"\u03B8","\\theta",!0);n(a,v,"\u03B9","\\iota",!0);n(a,v,"\u03BA","\\kappa",!0);n(a,v,"\u03BB","\\lambda",!0);n(a,v,"\u03BC","\\mu",!0);n(a,v,"\u03BD","\\nu",!0);n(a,v,"\u03BE","\\xi",!0);n(a,v,"\u03BF","\\omicron",!0);n(a,v,"\u03C0","\\pi",!0);n(a,v,"\u03C1","\\rho",!0);n(a,v,"\u03C3","\\sigma",!0);n(a,v,"\u03C4","\\tau",!0);n(a,v,"\u03C5","\\upsilon",!0);n(a,v,"\u03D5","\\phi",!0);n(a,v,"\u03C7","\\chi",!0);n(a,v,"\u03C8","\\psi",!0);n(a,v,"\u03C9","\\omega",!0);n(a,v,"\u03B5","\\varepsilon",!0);n(a,v,"\u03D1","\\vartheta",!0);n(a,v,"\u03D6","\\varpi",!0);n(a,v,"\u03F1","\\varrho",!0);n(a,v,"\u03C2","\\varsigma",!0);n(a,v,"\u03C6","\\varphi",!0);n(a,v,"\u03D8","\\Coppa",!0);n(a,v,"\u03D9","\\coppa",!0);n(a,v,"\u03D9","\\varcoppa",!0);n(a,v,"\u03DE","\\Koppa",!0);n(a,v,"\u03DF","\\koppa",!0);n(a,v,"\u03E0","\\Sampi",!0);n(a,v,"\u03E1","\\sampi",!0);n(a,v,"\u03DA","\\Stigma",!0);n(a,v,"\u03DB","\\stigma",!0);n(a,v,"\u2AEB","\\Bot");n(a,f,"\u2217","\u2217",!0);n(a,f,"+","+");n(a,f,"\u2217","*");n(a,f,"\u2044","/",!0);n(a,f,"\u2044","\u2044");n(a,f,"\u2212","-",!0);n(a,f,"\u22C5","\\cdot",!0);n(a,f,"\u2218","\\circ",!0);n(a,f,"\xF7","\\div",!0);n(a,f,"\xB1","\\pm",!0);n(a,f,"\xD7","\\times",!0);n(a,f,"\u2229","\\cap",!0);n(a,f,"\u222A","\\cup",!0);n(a,f,"\u2216","\\setminus",!0);n(a,f,"\u2227","\\land");n(a,f,"\u2228","\\lor");n(a,f,"\u2227","\\wedge",!0);n(a,f,"\u2228","\\vee",!0);n(a,P,"\u27E6","\\llbracket",!0);n(a,L,"\u27E7","\\rrbracket",!0);n(a,P,"\u27E8","\\langle",!0);n(a,P,"\u27EA","\\lAngle",!0);n(a,P,"\u2989","\\llangle",!0);n(a,P,"|","\\lvert");n(a,P,"\u2016","\\lVert",!0);n(a,m,"!","\\oc");n(a,m,"?","\\wn");n(a,m,"\u2193","\\shpos");n(a,m,"\u2195","\\shift");n(a,m,"\u2191","\\shneg");n(a,L,"?","?");n(a,L,"!","!");n(a,L,"\u203C","\u203C");n(a,L,"\u27E9","\\rangle",!0);n(a,L,"\u27EB","\\rAngle",!0);n(a,L,"\u298A","\\rrangle",!0);n(a,L,"|","\\rvert");n(a,L,"\u2016","\\rVert");n(a,P,"\u2983","\\lBrace",!0);n(a,L,"\u2984","\\rBrace",!0);n(a,d,"=","\\equal",!0);n(a,d,":",":");n(a,d,"\u2248","\\approx",!0);n(a,d,"\u2245","\\cong",!0);n(a,d,"\u2265","\\ge");n(a,d,"\u2265","\\geq",!0);n(a,d,"\u2190","\\gets");n(a,d,">","\\gt",!0);n(a,d,"\u2208","\\in",!0);n(a,d,"\u2209","\\notin",!0);n(a,d,"\uE020","\\@not");n(a,d,"\u2282","\\subset",!0);n(a,d,"\u2283","\\supset",!0);n(a,d,"\u2286","\\subseteq",!0);n(a,d,"\u2287","\\supseteq",!0);n(a,d,"\u2288","\\nsubseteq",!0);n(a,d,"\u2288","\\nsubseteqq");n(a,d,"\u2289","\\nsupseteq",!0);n(a,d,"\u2289","\\nsupseteqq");n(a,d,"\u22A8","\\models");n(a,d,"\u2190","\\leftarrow",!0);n(a,d,"\u2264","\\le");n(a,d,"\u2264","\\leq",!0);n(a,d,"<","\\lt",!0);n(a,d,"\u2192","\\rightarrow",!0);n(a,d,"\u2192","\\to");n(a,d,"\u2271","\\ngeq",!0);n(a,d,"\u2271","\\ngeqq");n(a,d,"\u2271","\\ngeqslant");n(a,d,"\u2270","\\nleq",!0);n(a,d,"\u2270","\\nleqq");n(a,d,"\u2270","\\nleqslant");n(a,d,"\u2AEB","\\Perp",!0);n(a,ee,"\xA0","\\ ");n(a,ee,"\xA0","\\space");n(a,ee,"\xA0","\\nobreakspace");n(g,ee,"\xA0","\\ ");n(g,ee,"\xA0"," ");n(g,ee,"\xA0","\\space");n(g,ee,"\xA0","\\nobreakspace");n(a,ee,null,"\\nobreak");n(a,ee,null,"\\allowbreak");n(a,we,",",",");n(g,we,":",":");n(a,we,";",";");n(a,f,"\u22BC","\\barwedge");n(a,f,"\u22BB","\\veebar");n(a,f,"\u2299","\\odot",!0);n(a,f,"\u2295\uFE0E","\\oplus");n(a,f,"\u2297","\\otimes",!0);n(a,m,"\u2202","\\partial",!0);n(a,f,"\u2298","\\oslash",!0);n(a,f,"\u229A","\\circledcirc",!0);n(a,f,"\u22A1","\\boxdot",!0);n(a,f,"\u25B3","\\bigtriangleup");n(a,f,"\u25BD","\\bigtriangledown");n(a,f,"\u2020","\\dagger");n(a,f,"\u22C4","\\diamond");n(a,f,"\u25C3","\\triangleleft");n(a,f,"\u25B9","\\triangleright");n(a,P,"{","\\{");n(g,m,"{","\\{");n(g,m,"{","\\textbraceleft");n(a,L,"}","\\}");n(g,m,"}","\\}");n(g,m,"}","\\textbraceright");n(a,P,"{","\\lbrace");n(a,L,"}","\\rbrace");n(a,P,"[","\\lbrack",!0);n(g,m,"[","\\lbrack",!0);n(a,L,"]","\\rbrack",!0);n(g,m,"]","\\rbrack",!0);n(a,P,"(","\\lparen",!0);n(a,L,")","\\rparen",!0);n(a,P,"\u2987","\\llparenthesis",!0);n(a,L,"\u2988","\\rrparenthesis",!0);n(g,m,"<","\\textless",!0);n(g,m,">","\\textgreater",!0);n(a,P,"\u230A","\\lfloor",!0);n(a,L,"\u230B","\\rfloor",!0);n(a,P,"\u2308","\\lceil",!0);n(a,L,"\u2309","\\rceil",!0);n(a,m,"\\","\\backslash");n(a,m,"|","|");n(a,m,"|","\\vert");n(g,m,"|","\\textbar",!0);n(a,m,"\u2016","\\|");n(a,m,"\u2016","\\Vert");n(g,m,"\u2016","\\textbardbl");n(g,m,"~","\\textasciitilde");n(g,m,"\\","\\textbackslash");n(g,m,"^","\\textasciicircum");n(a,d,"\u2191","\\uparrow",!0);n(a,d,"\u21D1","\\Uparrow",!0);n(a,d,"\u2193","\\downarrow",!0);n(a,d,"\u21D3","\\Downarrow",!0);n(a,d,"\u2195","\\updownarrow",!0);n(a,d,"\u21D5","\\Updownarrow",!0);n(a,D,"\u2210","\\coprod");n(a,D,"\u22C1","\\bigvee");n(a,D,"\u22C0","\\bigwedge");n(a,D,"\u2A04","\\biguplus");n(a,D,"\u2A04","\\bigcupplus");n(a,D,"\u2A03","\\bigcupdot");n(a,D,"\u2A07","\\bigdoublevee");n(a,D,"\u2A08","\\bigdoublewedge");n(a,D,"\u22C2","\\bigcap");n(a,D,"\u22C3","\\bigcup");n(a,D,"\u222B","\\int");n(a,D,"\u222B","\\intop");n(a,D,"\u222C","\\iint");n(a,D,"\u222D","\\iiint");n(a,D,"\u220F","\\prod");n(a,D,"\u2211","\\sum");n(a,D,"\u2A02","\\bigotimes");n(a,D,"\u2A01","\\bigoplus");n(a,D,"\u2A00","\\bigodot");n(a,D,"\u2A09","\\bigtimes");n(a,D,"\u222E","\\oint");n(a,D,"\u222F","\\oiint");n(a,D,"\u2230","\\oiiint");n(a,D,"\u2231","\\intclockwise");n(a,D,"\u2232","\\varointclockwise");n(a,D,"\u2A0C","\\iiiint");n(a,D,"\u2A0D","\\intbar");n(a,D,"\u2A0E","\\intBar");n(a,D,"\u2A0F","\\fint");n(a,D,"\u2A12","\\rppolint");n(a,D,"\u2A13","\\scpolint");n(a,D,"\u2A15","\\pointint");n(a,D,"\u2A16","\\sqint");n(a,D,"\u2A17","\\intlarhk");n(a,D,"\u2A18","\\intx");n(a,D,"\u2A19","\\intcap");n(a,D,"\u2A1A","\\intcup");n(a,D,"\u2A05","\\bigsqcap");n(a,D,"\u2A06","\\bigsqcup");n(a,D,"\u222B","\\smallint");n(g,ie,"\u2026","\\textellipsis");n(a,ie,"\u2026","\\mathellipsis");n(g,ie,"\u2026","\\ldots",!0);n(a,ie,"\u2026","\\ldots",!0);n(a,ie,"\u22F0","\\iddots",!0);n(a,ie,"\u22EF","\\@cdots",!0);n(a,ie,"\u22F1","\\ddots",!0);n(a,m,"\u22EE","\\varvdots");n(g,m,"\u22EE","\\varvdots");n(a,B,"\u02CA","\\acute");n(a,B,"`","\\grave");n(a,B,"\xA8","\\ddot");n(a,B,"\u2026","\\dddot");n(a,B,"\u2026.","\\ddddot");n(a,B,"~","\\tilde");n(a,B,"\u203E","\\bar");n(a,B,"\u02D8","\\breve");n(a,B,"\u02C7","\\check");n(a,B,"^","\\hat");n(a,B,"\u2192","\\vec");n(a,B,"\u02D9","\\dot");n(a,B,"\u02DA","\\mathring");n(a,v,"\u0131","\\imath",!0);n(a,v,"\u0237","\\jmath",!0);n(a,m,"\u0131","\u0131");n(a,m,"\u0237","\u0237");n(g,m,"\u0131","\\i",!0);n(g,m,"\u0237","\\j",!0);n(g,m,"\xDF","\\ss",!0);n(g,m,"\xE6","\\ae",!0);n(g,m,"\u0153","\\oe",!0);n(g,m,"\xF8","\\o",!0);n(a,v,"\xF8","\\o",!0);n(g,m,"\xC6","\\AE",!0);n(g,m,"\u0152","\\OE",!0);n(g,m,"\xD8","\\O",!0);n(a,v,"\xD8","\\O",!0);n(g,B,"\u02CA","\\'");n(g,B,"\u02CB","\\`");n(g,B,"\u02C6","\\^");n(g,B,"\u02DC","\\~");n(g,B,"\u02C9","\\=");n(g,B,"\u02D8","\\u");n(g,B,"\u02D9","\\.");n(g,B,"\xB8","\\c");n(g,B,"\u02DA","\\r");n(g,B,"\u02C7","\\v");n(g,B,"\xA8",'\\"');n(g,B,"\u02DD","\\H");n(a,B,"\u02CA","\\'");n(a,B,"\u02CB","\\`");n(a,B,"\u02C6","\\^");n(a,B,"\u02DC","\\~");n(a,B,"\u02C9","\\=");n(a,B,"\u02D8","\\u");n(a,B,"\u02D9","\\.");n(a,B,"\xB8","\\c");n(a,B,"\u02DA","\\r");n(a,B,"\u02C7","\\v");n(a,B,"\xA8",'\\"');n(a,B,"\u02DD","\\H");var Ir={"--":!0,"---":!0,"``":!0,"''":!0};n(g,m,"\u2013","--",!0);n(g,m,"\u2013","\\textendash");n(g,m,"\u2014","---",!0);n(g,m,"\u2014","\\textemdash");n(g,m,"\u2018","`",!0);n(g,m,"\u2018","\\textquoteleft");n(g,m,"\u2019","'",!0);n(g,m,"\u2019","\\textquoteright");n(g,m,"\u201C","``",!0);n(g,m,"\u201C","\\textquotedblleft");n(g,m,"\u201D","''",!0);n(g,m,"\u201D","\\textquotedblright");n(a,m,"\xB0","\\degree",!0);n(g,m,"\xB0","\\degree");n(g,m,"\xB0","\\textdegree",!0);n(a,m,"\xA3","\\pounds");n(a,m,"\xA3","\\mathsterling",!0);n(g,m,"\xA3","\\pounds");n(g,m,"\xA3","\\textsterling",!0);n(a,m,"\u2720","\\maltese");n(g,m,"\u2720","\\maltese");n(a,m,"\u20AC","\\euro",!0);n(g,m,"\u20AC","\\euro",!0);n(g,m,"\u20AC","\\texteuro");n(a,m,"\xA9","\\copyright",!0);n(g,m,"\xA9","\\textcopyright");n(a,m,"\u2300","\\diameter",!0);n(g,m,"\u2300","\\diameter");n(a,m,"\u{1D6E4}","\\varGamma");n(a,m,"\u{1D6E5}","\\varDelta");n(a,m,"\u{1D6E9}","\\varTheta");n(a,m,"\u{1D6EC}","\\varLambda");n(a,m,"\u{1D6EF}","\\varXi");n(a,m,"\u{1D6F1}","\\varPi");n(a,m,"\u{1D6F4}","\\varSigma");n(a,m,"\u{1D6F6}","\\varUpsilon");n(a,m,"\u{1D6F7}","\\varPhi");n(a,m,"\u{1D6F9}","\\varPsi");n(a,m,"\u{1D6FA}","\\varOmega");n(g,m,"\u{1D6E4}","\\varGamma");n(g,m,"\u{1D6E5}","\\varDelta");n(g,m,"\u{1D6E9}","\\varTheta");n(g,m,"\u{1D6EC}","\\varLambda");n(g,m,"\u{1D6EF}","\\varXi");n(g,m,"\u{1D6F1}","\\varPi");n(g,m,"\u{1D6F4}","\\varSigma");n(g,m,"\u{1D6F6}","\\varUpsilon");n(g,m,"\u{1D6F7}","\\varPhi");n(g,m,"\u{1D6F9}","\\varPsi");n(g,m,"\u{1D6FA}","\\varOmega");var ut='0123456789/@."';for(let e=0;e<ut.length;e++){let t=ut.charAt(e);n(a,m,t,t)}var ct='0123456789!@*()-=+";:?/.,';for(let e=0;e<ct.length;e++){let t=ct.charAt(e);n(g,m,t,t)}var Be="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(let e=0;e<Be.length;e++){let t=Be.charAt(e);n(a,v,t,t),n(g,m,t,t)}var dt="\xC7\xD0\xDE\xE7\xFE\u2102\u210D\u2115\u2119\u211A\u211D\u2124\u210E\u210F\u210A\u210B\u210C\u2110\u2111\u2112\u2113\u2118\u211B\u211C\u212C\u2130\u2131\u2133\u212D\u2128";for(let e=0;e<dt.length;e++){let t=dt.charAt(e);n(a,v,t,t),n(g,m,t,t)}var _="";for(let e=0;e<Be.length;e++){_=String.fromCharCode(55349,56320+e),n(a,v,_,_),n(g,m,_,_),_=String.fromCharCode(55349,56372+e),n(a,v,_,_),n(g,m,_,_),_=String.fromCharCode(55349,56424+e),n(a,v,_,_),n(g,m,_,_),_=String.fromCharCode(55349,56580+e),n(a,v,_,_),n(g,m,_,_),_=String.fromCharCode(55349,56736+e),n(a,v,_,_),n(g,m,_,_),_=String.fromCharCode(55349,56788+e),n(a,v,_,_),n(g,m,_,_),_=String.fromCharCode(55349,56840+e),n(a,v,_,_),n(g,m,_,_),_=String.fromCharCode(55349,56944+e),n(a,v,_,_),n(g,m,_,_),_=String.fromCharCode(55349,56632+e),n(a,v,_,_),n(g,m,_,_);let t=Be.charAt(e);_=String.fromCharCode(55349,56476+e),n(a,v,t,_),n(g,m,t,_)}for(let e=0;e<10;e++)_=String.fromCharCode(55349,57294+e),n(a,v,_,_),n(g,m,_,_),_=String.fromCharCode(55349,57314+e),n(a,v,_,_),n(g,m,_,_),_=String.fromCharCode(55349,57324+e),n(a,v,_,_),n(g,m,_,_),_=String.fromCharCode(55349,57334+e),n(a,v,_,_),n(g,m,_,_);var Pr="([{\u230A\u2308\u27E8\u27EE\u23B0\u27E6\u2983",Gr=")]}\u230B\u2309\u27E9\u27EF\u23B1\u27E6\u2984";function Rr(e,t,r){let o=[],s=[],i=[],l=0,u=0,h=0;for(;u<e.length;){for(;e[u]instanceof ge;)e.splice(u,1,...e[u].children);let x=e[u];if(x.attributes&&x.attributes.linebreak&&x.attributes.linebreak==="newline"){i.length>0&&s.push(new p.MathNode("mrow",i)),s.push(x),i=[];let A=new p.MathNode("mtd",s);A.style.textAlign="left",o.push(new p.MathNode("mtr",[A])),s=[],u+=1;continue}if(i.push(x),x.type&&x.type==="mo"&&x.children.length===1&&!Object.hasOwn(x.attributes,"movablelimits")){let A=x.children[0].text;if(Pr.indexOf(A)>-1)h+=1;else if(Gr.indexOf(A)>-1)h-=1;else if(h===0&&t==="="&&A==="="){if(l+=1,l>1){i.pop();let q=new p.MathNode("mrow",i);s.push(q),i=[x]}}else if(h===0&&t==="tex"&&A!=="\u2207"){let q=u<e.length-1?e[u+1]:null,b=!0;if(!(q&&q.type==="mtext"&&q.attributes.linebreak&&q.attributes.linebreak==="nobreak"))for(let k=u+1;k<e.length;k++){let T=e[k];if(T.type&&T.type==="mspace"&&!(T.attributes.linebreak&&T.attributes.linebreak==="newline"))i.push(T),u+=1,T.attributes&&T.attributes.linebreak&&T.attributes.linebreak==="nobreak"&&(b=!1);else break}if(b){let k=new p.MathNode("mrow",i);s.push(k),i=[]}}}u+=1}if(i.length>0){let x=new p.MathNode("mrow",i);s.push(x)}if(o.length>0){let x=new p.MathNode("mtd",s);x.style.textAlign="left";let A=new p.MathNode("mtr",[x]);o.push(A);let q=new p.MathNode("mtable",o);return r||(q.setAttribute("columnalign","left"),q.setAttribute("rowspacing","0em")),q}return p.newDocumentFragment(s)}var W=function(e,t,r){return I[t][e]&&I[t][e].replace&&e.charCodeAt(0)!==55349&&!(Object.prototype.hasOwnProperty.call(Ir,e)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(e=I[t][e].replace),new p.TextNode(e)},mt=(e,t)=>{if(e.children.length===0||e.children[e.children.length-1].type!=="mtext"){let r=new p.MathNode("mtext",[new p.TextNode(t.children[0].text)]);e.children.push(r)}else e.children[e.children.length-1].children[0].text+=t.children[0].text},Ee=e=>{if(e.type!=="mrow"&&e.type!=="mstyle"||e.children.length===0)return e;let t=new p.MathNode("mrow");for(let r=0;r<e.children.length;r++){let o=e.children[r];if(o.type==="mtext"&&Object.keys(o.attributes).length===0)mt(t,o);else if(o.type==="mrow"){let s=!0;for(let i=0;i<o.children.length;i++)if(o.children[i].type!=="mtext"||Object.keys(o.attributes).length!==0){s=!1;break}if(s)for(let i=0;i<o.children.length;i++){let l=o.children[i];mt(t,l)}else t.children.push(o)}else t.children.push(o)}for(let r=0;r<t.children.length;r++)if(t.children[r].type==="mtext"){let o=t.children[r];o.children[0].text.charAt(0)===" "&&(o.children[0].text="\xA0"+o.children[0].text.slice(1));let s=o.children[0].text.length;s>0&&o.children[0].text.charAt(s-1)===" "&&(o.children[0].text=o.children[0].text.slice(0,-1)+"\xA0");for(let[i,l]of Object.entries(e.attributes))o.attributes[i]=l}return t.children.length===1&&t.children[0].type==="mtext"?t.children[0]:t},Qe=function(e,t=!1){if(e.length===1&&!(e[0]instanceof ge))return e[0];if(!t){e[0]instanceof R&&e[0].type==="mo"&&!e[0].attributes.fence&&(e[0].attributes.lspace="0em",e[0].attributes.rspace="0em");let r=e.length-1;e[r]instanceof R&&e[r].type==="mo"&&!e[r].attributes.fence&&(e[r].attributes.lspace="0em",e[r].attributes.rspace="0em")}return new p.MathNode("mrow",e)};function Fe(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){let t=e.children[0];return t instanceof ae&&t.text==="."}else if(e.type==="mtext"&&e.children.length===1){let t=e.children[0];return t instanceof ae&&t.text==="\u2008"}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){let t=e.children[0];return t instanceof ae&&t.text===","}else return!1}var jr=(e,t)=>{let r=e[t],o=e[t+1];return r.type==="atom"&&r.text===","&&r.loc&&o.loc&&r.loc.end===o.loc.start},Se=e=>e.type==="atom"&&e.family==="rel"||e.type==="mclass"&&e.mclass==="mrel",U=function(e,t,r=!1){if(!r&&e.length===1){let l=O(e[0],t);return l instanceof R&&l.type==="mo"&&(l.setAttribute("lspace","0em"),l.setAttribute("rspace","0em")),[l]}let o=[],s=[],i;for(let l=0;l<e.length;l++)s.push(O(e[l],t));for(let l=0;l<s.length;l++){let u=s[l];if(l<e.length-1&&Se(e[l])&&Se(e[l+1])&&u.setAttribute("rspace","0em"),l>0&&Se(e[l])&&Se(e[l-1])&&u.setAttribute("lspace","0em"),u.type==="mn"&&i&&i.type==="mn"){i.children.push(...u.children);continue}else if(Fe(u)&&i&&i.type==="mn"){i.children.push(...u.children);continue}else if(i&&i.type==="mn"&&l<s.length-1&&s[l+1].type==="mn"&&jr(e,l)){i.children.push(...u.children);continue}else if(u.type==="mn"&&Fe(i))u.children=[...i.children,...u.children],o.pop();else if((u.type==="msup"||u.type==="msub")&&u.children.length>=1&&i&&(i.type==="mn"||Fe(i))){let h=u.children[0];h instanceof R&&h.type==="mn"&&i&&(h.children=[...i.children,...h.children],o.pop())}o.push(u),i=u}return o},te=function(e,t,r=!1){return Qe(U(e,t,r),r)},O=function(e,t){if(!e)return new p.MathNode("mrow");if(Ce[e.type])return Ce[e.type](e,t);throw new w("Got group of unknown type: '"+e.type+"'")},ht=e=>new p.MathNode("mtd",[],[],{padding:"0",width:"50%"}),Ur=["mrow","mtd","mtable","mtr"],je=e=>{for(let t of e.children)if(t.type&&Ur.includes(t.type)){if(t.classes&&t.classes[0]==="tml-label")return t.label;{let r=je(t);if(r)return r}}else if(!t.type){let r=je(t);if(r)return r}},Vr=(e,t,r,o)=>{t=te(t[0].body,r),t=Ee(t),t.classes.push("tml-tag");let s=je(e);e=new p.MathNode("mtd",[e]);let i=[ht(),e,ht()];i[o?0:2].classes.push(o?"tml-left":"tml-right"),i[o?0:2].children.push(t);let l=new p.MathNode("mtr",i,["tml-tageqn"]);s&&l.setAttribute("id",s);let u=new p.MathNode("mtable",[l]);return u.style.width="100%",u.setAttribute("displaystyle","true"),u};function Wr(e,t,r,o){let s=null;e.length===1&&e[0].type==="tag"&&(s=e[0].tag,e=e[0].body);let i=U(e,r);if(i.length===1&&i[0]instanceof be)return i[0];let l=o.displayMode||o.annotate?"none":o.wrap,u=i.length===0?null:i[0],h=i.length===1&&s===null&&u instanceof R?i[0]:Rr(i,l,o.displayMode);if(s&&(h=Vr(h,s,r,o.leqno)),o.annotate){let A=new p.MathNode("annotation",[new p.TextNode(t)]);A.setAttribute("encoding","application/x-tex"),h=new p.MathNode("semantics",[h,A])}let x=new p.MathNode("math",[h]);return o.xml&&x.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),h.style.width&&(x.style.width="100%"),o.displayMode&&(x.setAttribute("display","block"),x.style.display="block math",x.classes=["tml-display"]),x}var Wt="aceg\u0131\u0237mnopqrsuvwxyz\u03B1\u03B3\u03B5\u03B7\u03B9\u03BA\u03BC\u03BD\u03BF\u03C0\u03C1\u03C2\u03C3\u03C4\u03C5\u03C7\u03C9\u03D5\u{1D41A}\u{1D41C}\u{1D41E}\u{1D420}\u{1D426}\u{1D427}\u{1D428}\u{1D429}\u{1D42A}\u{1D42B}\u{1D42C}\u{1D42E}\u{1D42F}\u{1D430}\u{1D431}\u{1D432}\u{1D433}",Hr="ABCDEFGHIJKLMNOPQRSTUVWXYZbdfhklt\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03B2\u03B4\u03BB\u03B6\u03C6\u03B8\u03C8\u{1D400}\u{1D401}\u{1D402}\u{1D403}\u{1D404}\u{1D405}\u{1D406}\u{1D407}\u{1D408}\u{1D409}\u{1D40A}\u{1D40B}\u{1D40C}\u{1D40D}\u{1D40E}\u{1D40F}\u{1D410}\u{1D411}\u{1D412}\u{1D413}\u{1D414}\u{1D415}\u{1D416}\u{1D417}\u{1D418}\u{1D419}\u{1D41B}\u{1D41D}\u{1D41F}\u{1D421}\u{1D424}\u{1D425}\u{1D42D}",Zr=new Set(["\\alpha","\\gamma","\\delta","\\epsilon","\\eta","\\iota","\\kappa","\\mu","\\nu","\\pi","\\rho","\\sigma","\\tau","\\upsilon","\\chi","\\psi","\\omega","\\imath","\\jmath"]),Xr=new Set(["\\Gamma","\\Delta","\\Sigma","\\Omega","\\beta","\\delta","\\lambda","\\theta","\\psi"]),Ht=(e,t)=>{let r=e.isStretchy?Me.accentNode(e):new p.MathNode("mo",[W(e.label,e.mode)]);if(e.label==="\\vec")r.style.transform="scale(0.75) translate(10%, 30%)";else if(r.style.mathStyle="normal",r.style.mathDepth="0",Kr.has(e.label)&&N.isCharacterBox(e.base)){let s="",i=e.base.text;(Wt.indexOf(i)>-1||Zr.has(i))&&(s="tml-xshift"),(Hr.indexOf(i)>-1||Xr.has(i))&&(s="tml-capshift"),s&&r.classes.push(s)}return e.isStretchy||r.setAttribute("stretchy","false"),new p.MathNode(e.label==="\\c"?"munder":"mover",[O(e.base,t),r])},Yr=new Set(["\\acute","\\grave","\\ddot","\\dddot","\\ddddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"]),Kr=new Set(["\\acute","\\bar","\\breve","\\check","\\dot","\\ddot","\\grave","\\hat","\\mathring","\\'","\\^","\\~","\\=","\\u","\\.",'\\"',"\\r","\\H","\\v"]),pt={"\\`":"\u0300","\\'":"\u0301","\\^":"\u0302","\\~":"\u0303","\\=":"\u0304","\\u":"\u0306","\\.":"\u0307",'\\"':"\u0308","\\r":"\u030A","\\H":"\u030B","\\v":"\u030C"};S({type:"accent",names:["\\acute","\\grave","\\ddot","\\dddot","\\ddddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\overparen","\\widecheck","\\widehat","\\wideparen","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{let r=fe(t[0]),o=!Yr.has(e.funcName);return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:o,base:r}},mathmlBuilder:Ht});S({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\c","\\u","\\.",'\\"',"\\r","\\H","\\v"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{let r=fe(t[0]),o=e.parser.mode;return o==="math"&&e.parser.settings.strict&&console.log(`Temml parse error: Command ${e.funcName} is invalid in math mode.`),o==="text"&&r.text&&r.text.length===1&&e.funcName in pt&&Wt.indexOf(r.text)>-1?{type:"textord",mode:"text",text:r.text+pt[e.funcName]}:{type:"accent",mode:o,label:e.funcName,isStretchy:!1,base:r}},mathmlBuilder:Ht});S({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underparen","\\utilde"],props:{numArgs:1},handler:({parser:e,funcName:t},r)=>{let o=r[0];return{type:"accentUnder",mode:e.mode,label:t,base:o}},mathmlBuilder:(e,t)=>{let r=Me.accentNode(e);return r.style["math-depth"]=0,new p.MathNode("munder",[O(e.base,t),r])}});var ft={pt:800/803,pc:12*800/803,dd:1238/1157*800/803,cc:14856/1157*800/803,nd:685/642*800/803,nc:1370/107*800/803,sp:1/65536*800/803,mm:25.4/72,cm:2.54/72,in:1/72,px:96/72},Jr=["em","ex","mu","pt","mm","cm","in","px","bp","pc","dd","cc","nd","nc","sp"],Zt=function(e){return typeof e!="string"&&(e=e.unit),Jr.indexOf(e)>-1},Xt=e=>{let t=Math.max(e-1,0);return[1,.7,.5][t]},K=function(e,t){let r=e.number;if(t.maxSize[0]<0&&r>0)return{number:0,unit:"em"};let o=e.unit;switch(o){case"mm":case"cm":case"in":case"px":return r*ft[o]>t.maxSize[1]?{number:t.maxSize[1],unit:"pt"}:{number:r,unit:o};case"em":case"ex":return o==="ex"&&(r*=.431),r=Math.min(r/Xt(t.level),t.maxSize[0]),{number:N.round(r),unit:"em"};case"bp":return r>t.maxSize[1]&&(r=t.maxSize[1]),{number:r,unit:"pt"};case"pt":case"pc":case"dd":case"cc":case"nd":case"nc":case"sp":return r=Math.min(r*ft[o],t.maxSize[1]),{number:N.round(r),unit:"pt"};case"mu":return r=Math.min(r/18,t.maxSize[0]),{number:N.round(r),unit:"em"};default:throw new w("Invalid unit: '"+o+"'")}},Q=e=>{let t=new p.MathNode("mspace");return t.setAttribute("width",e+"em"),t},qe=(e,t=.3,r=0,o=!1)=>{if(e==null&&r===0)return Q(t);let s=e?[e]:[];if(t!==0&&s.unshift(Q(t)),r>0&&s.push(Q(r)),o){let i=new p.MathNode("mpadded",s);return i.setAttribute("height","0"),i}else return new p.MathNode("mrow",s)},Ie=(e,t)=>Number(e)/Xt(t),Ue=(e,t,r,o)=>{let s=Me.mathMLnode(e),i=e.slice(1,3)==="eq",l=e.charAt(1)==="x"?"1.75":e.slice(2,4)==="cd"?"3.0":i?"1.0":"2.0";s.setAttribute("lspace","0"),s.setAttribute("rspace",i?"0.5em":"0");let u=o.withLevel(o.level<2?2:3),h=Ie(l,u.level),x=Ie(l,3),A=qe(null,h.toFixed(4),0),q=qe(null,x.toFixed(4),0),b=Ie(i?0:.3,u.level).toFixed(4),k,T,$=t&&t.body&&(t.body.body||t.body.length>0);if($){let E=O(t,u);E=qe(E,b,b,e==="\\\\cdrightarrow"||e==="\\\\cdleftarrow"),k=new p.MathNode("mover",[E,q])}let j=r&&r.body&&(r.body.body||r.body.length>0);if(j){let E=O(r,u);E=qe(E,b,b),T=new p.MathNode("munder",[E,q])}let G;return!$&&!j?G=new p.MathNode("mover",[s,A]):$&&j?G=new p.MathNode("munderover",[s,T,k]):$?G=new p.MathNode("mover",[s,k]):G=new p.MathNode("munder",[s,T]),l==="3.0"&&(G.style.height="1em"),G.setAttribute("accent","false"),G};S({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\yields","\\yieldsLeft","\\mesomerism","\\longrightharpoonup","\\longleftharpoondown","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler({parser:e,funcName:t},r,o){return{type:"xArrow",mode:e.mode,name:t,body:r[0],below:o[0]}},mathmlBuilder(e,t){let o=[Ue(e.name,e.body,e.below,t)];return o.unshift(Q(.2778)),o.push(Q(.2778)),new p.MathNode("mrow",o)}});var gt={"\\xtofrom":["\\xrightarrow","\\xleftarrow"],"\\xleftrightharpoons":["\\xleftharpoonup","\\xrightharpoondown"],"\\xrightleftharpoons":["\\xrightharpoonup","\\xleftharpoondown"],"\\yieldsLeftRight":["\\yields","\\yieldsLeft"],"\\equilibrium":["\\longrightharpoonup","\\longleftharpoondown"],"\\equilibriumRight":["\\longrightharpoonup","\\eqleftharpoondown"],"\\equilibriumLeft":["\\eqrightharpoonup","\\longleftharpoondown"]};S({type:"stackedArrow",names:["\\xtofrom","\\xleftrightharpoons","\\xrightleftharpoons","\\yieldsLeftRight","\\equilibrium","\\equilibriumRight","\\equilibriumLeft"],props:{numArgs:1,numOptionalArgs:1},handler({parser:e,funcName:t},r,o){let s=r[0]?{type:"hphantom",mode:e.mode,body:r[0]}:null,i=o[0]?{type:"hphantom",mode:e.mode,body:o[0]}:null;return{type:"stackedArrow",mode:e.mode,name:t,body:r[0],upperArrowBelow:i,lowerArrowBody:s,below:o[0]}},mathmlBuilder(e,t){let r=gt[e.name][0],o=gt[e.name][1],s=Ue(r,e.body,e.upperArrowBelow,t),i=Ue(o,e.lowerArrowBody,e.below,t),l,u=new p.MathNode("mpadded",[s]);if(u.setAttribute("voffset","0.3em"),u.setAttribute("height","+0.3em"),u.setAttribute("depth","-0.3em"),e.name==="\\equilibriumLeft"){let h=new p.MathNode("mpadded",[i]);h.setAttribute("width","0.5em"),l=new p.MathNode("mpadded",[Q(.2778),h,u,Q(.2778)])}else u.setAttribute("width",e.name==="\\equilibriumRight"?"0.5em":"0"),l=new p.MathNode("mpadded",[Q(.2778),u,i,Q(.2778)]);return l.setAttribute("voffset","-0.18em"),l.setAttribute("height","-0.18em"),l.setAttribute("depth","+0.18em"),l}});function C(e,t){if(!e||e.type!==t)throw new Error(`Expected node of type ${t}, but got `+(e?`node of type ${e.type}`:String(e)));return e}function et(e){let t=ze(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?`node of type ${e.type}`:String(e)));return t}function ze(e){return e&&(e.type==="atom"||Object.prototype.hasOwnProperty.call(Fr,e.type))?e:null}var Qr={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},bt=()=>({type:"styling",body:[],mode:"math",scriptLevel:"display"}),xt=e=>e.type==="textord"&&e.text==="@",en=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function tn(e,t,r){let o=Qr[e];switch(o){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(o,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{let s=r.callFunction("\\\\cdleft",[t[0]],[]),i={type:"atom",text:o,mode:"math",family:"rel"},l=r.callFunction("\\Big",[i],[]),u=r.callFunction("\\\\cdright",[t[1]],[]),h={type:"ordgroup",mode:"math",body:[s,l,u],semisimple:!0};return r.callFunction("\\\\cdparent",[h],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{let s={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[s],[])}default:return{type:"textord",text:" ",mode:"math"}}}function rn(e){let t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();let s=e.fetch().text;if(s==="&"||s==="\\\\")e.consume();else if(s==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new w("Expected \\\\ or \\cr or \\end",e.nextToken)}let r=[],o=[r];for(let s=0;s<t.length;s++){let i=t[s],l=bt();for(let u=0;u<i.length;u++)if(!xt(i[u]))l.body.push(i[u]);else{r.push(l),u+=1;let h=et(i[u]).text,x=new Array(2);if(x[0]={type:"ordgroup",mode:"math",body:[]},x[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(h)>-1))if("<>AV".indexOf(h)>-1)for(let q=0;q<2;q++){let b=!0;for(let k=u+1;k<i.length;k++){if(en(i[k],h)){b=!1,u=k;break}if(xt(i[k]))throw new w("Missing a "+h+" character to complete a CD arrow.",i[k]);x[q].body.push(i[k])}if(b)throw new w("Missing a "+h+" character to complete a CD arrow.",i[u])}else throw new w('Expected one of "<>AV=|." after @.');let A=tn(h,x,e);r.push(A),l=bt()}s%2===0?r.push(l):r.shift(),r=[],o.push(r)}return o.pop(),e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:o,tags:null,labels:new Array(o.length+1).fill(""),envClasses:["jot","cd"],cols:[],hLinesBeforeRow:new Array(o.length+1).fill([])}}S({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler({parser:e,funcName:t},r){return{type:"cdlabel",mode:e.mode,side:t.slice(4),label:r[0]}},mathmlBuilder(e,t){if(e.label.body.length===0)return new p.MathNode("mrow",t);let r=new p.MathNode("mtd",[O(e.label,t)]);r.style.padding="0";let o=new p.MathNode("mtr",[r]),s=new p.MathNode("mtable",[o]),i=new p.MathNode("mpadded",[s]);return i.setAttribute("width","0"),i.setAttribute("displaystyle","false"),i.setAttribute("scriptlevel","1"),e.side==="left"&&(i.style.display="flex",i.style.justifyContent="flex-end"),i}});S({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler({parser:e},t){return{type:"cdlabelparent",mode:e.mode,fragment:t[0]}},mathmlBuilder(e,t){return new p.MathNode("mrow",[O(e.fragment,t)])}});S({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler({parser:e,token:t},r){let s=C(r[0],"ordgroup").body,i="";for(let u=0;u<s.length;u++){let h=C(s[u],"textord");i+=h.text}let l=parseInt(i);if(isNaN(l))throw new w(`\\@char has non-numeric argument ${i}`,t);return{type:"textord",mode:e.mode,text:String.fromCodePoint(l)}}});var nn=/^(#[a-f0-9]{3}|#?[a-f0-9]{6})$/i,on=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i,an=/^ *\d{1,3} *(?:, *\d{1,3} *){2}$/,sn=/^ *[10](?:\.\d*)? *(?:, *[10](?:\.\d*)? *){2}$/,ln=/^[a-f0-9]{6}$/i,yt=e=>{let t=e.toString(16);return t.length===1&&(t="0"+t),t},wt=JSON.parse(`{
  "Apricot": "#ffb484",
  "Aquamarine": "#08b4bc",
  "Bittersweet": "#c84c14",
  "blue": "#0000FF",
  "Blue": "#303494",
  "BlueGreen": "#08b4bc",
  "BlueViolet": "#503c94",
  "BrickRed": "#b8341c",
  "brown": "#BF8040",
  "Brown": "#802404",
  "BurntOrange": "#f8941c",
  "CadetBlue": "#78749c",
  "CarnationPink": "#f884b4",
  "Cerulean": "#08a4e4",
  "CornflowerBlue": "#40ace4",
  "cyan": "#00FFFF",
  "Cyan": "#08acec",
  "Dandelion": "#ffbc44",
  "darkgray": "#404040",
  "DarkOrchid": "#a8548c",
  "Emerald": "#08ac9c",
  "ForestGreen": "#089c54",
  "Fuchsia": "#90348c",
  "Goldenrod": "#ffdc44",
  "gray": "#808080",
  "Gray": "#98949c",
  "green": "#00FF00",
  "Green": "#08a44c",
  "GreenYellow": "#e0e474",
  "JungleGreen": "#08ac9c",
  "Lavender": "#f89cc4",
  "lightgray": "#c0c0c0",
  "lime": "#BFFF00",
  "LimeGreen": "#90c43c",
  "magenta": "#FF00FF",
  "Magenta": "#f0048c",
  "Mahogany": "#b0341c",
  "Maroon": "#b03434",
  "Melon": "#f89c7c",
  "MidnightBlue": "#086494",
  "Mulberry": "#b03c94",
  "NavyBlue": "#086cbc",
  "olive": "#7F7F00",
  "OliveGreen": "#407c34",
  "orange": "#FF8000",
  "Orange": "#f8843c",
  "OrangeRed": "#f0145c",
  "Orchid": "#b074ac",
  "Peach": "#f8945c",
  "Periwinkle": "#8074bc",
  "PineGreen": "#088c74",
  "pink": "#ff7f7f",
  "Plum": "#98248c",
  "ProcessBlue": "#08b4ec",
  "purple": "#BF0040",
  "Purple": "#a0449c",
  "RawSienna": "#983c04",
  "red": "#ff0000",
  "Red": "#f01c24",
  "RedOrange": "#f86434",
  "RedViolet": "#a0246c",
  "Rhodamine": "#f0549c",
  "Royallue": "#0874bc",
  "RoyalPurple": "#683c9c",
  "RubineRed": "#f0047c",
  "Salmon": "#f8948c",
  "SeaGreen": "#30bc9c",
  "Sepia": "#701404",
  "SkyBlue": "#48c4dc",
  "SpringGreen": "#c8dc64",
  "Tan": "#e09c74",
  "teal": "#007F7F",
  "TealBlue": "#08acb4",
  "Thistle": "#d884b4",
  "Turquoise": "#08b4cc",
  "violet": "#800080",
  "Violet": "#60449c",
  "VioletRed": "#f054a4",
  "WildStrawberry": "#f0246c",
  "yellow": "#FFFF00",
  "Yellow": "#fff404",
  "YellowGreen": "#98cc6c",
  "YellowOrange": "#ffa41c"
}`),ce=(e,t)=>{let r="";if(e==="HTML"){if(!nn.test(t))throw new w("Invalid HTML input.");r=t}else if(e==="RGB"){if(!an.test(t))throw new w("Invalid RGB input.");t.split(",").map(o=>{r+=yt(Number(o.trim()))})}else{if(!sn.test(t))throw new w("Invalid rbg input.");t.split(",").map(o=>{let s=Number(o.trim());if(s>1)throw new w("Color rgb input must be < 1.");r+=yt(Number((s*255).toFixed(0)))})}return r.charAt(0)!=="#"&&(r="#"+r),r},xe=(e,t,r)=>{let o=`\\\\color@${e}`;if(!on.exec(e))throw new w("Invalid color: '"+e+"'",r);return ln.test(e)?"#"+e:(e.charAt(0)==="#"||(t.has(o)?e=t.get(o).tokens[0].text:wt[e]&&(e=wt[e])),e)},Yt=(e,t)=>{let r=U(e.body,t.withColor(e.color));return r=r.map(o=>(o.style.color=e.color,o)),p.newDocumentFragment(r)};S({type:"color",names:["\\textcolor"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,argTypes:["raw","raw","original"]},handler({parser:e,token:t},r,o){let s=o[0]&&C(o[0],"raw").string,i="";if(s){let u=C(r[0],"raw").string;i=ce(s,u)}else i=xe(C(r[0],"raw").string,e.gullet.macros,t);let l=r[1];return{type:"color",mode:e.mode,color:i,isTextColor:!0,body:z(l)}},mathmlBuilder:Yt});S({type:"color",names:["\\color"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0,argTypes:["raw","raw"]},handler({parser:e,breakOnTokenText:t,token:r},o,s){let i=s[0]&&C(s[0],"raw").string,l="";if(i){let h=C(o[0],"raw").string;l=ce(i,h)}else l=xe(C(o[0],"raw").string,e.gullet.macros,r);let u=e.parseExpression(!0,t,!0);return{type:"color",mode:e.mode,color:l,isTextColor:!1,body:u}},mathmlBuilder:Yt});S({type:"color",names:["\\definecolor"],props:{numArgs:3,allowedInText:!0,argTypes:["raw","raw","raw"]},handler({parser:e,funcName:t,token:r},o){let s=C(o[0],"raw").string;if(!/^[A-Za-z]+$/.test(s))throw new w("Color name must be latin letters.",r);let i=C(o[1],"raw").string;if(!["HTML","RGB","rgb"].includes(i))throw new w("Color model must be HTML, RGB, or rgb.",r);let l=C(o[2],"raw").string,u=ce(i,l);return e.gullet.macros.set(`\\\\color@${s}`,{tokens:[{text:u}],numArgs:0}),{type:"internal",mode:e.mode}}});S({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler({parser:e},t,r){let o=e.gullet.future().text==="["?e.parseSizeGroup(!0):null,s=!e.settings.displayMode;return{type:"cr",mode:e.mode,newLine:s,size:o&&C(o,"size").value}},mathmlBuilder(e,t){let r=new p.MathNode("mo");if(e.newLine&&(r.setAttribute("linebreak","newline"),e.size)){let o=K(e.size,t);r.setAttribute("height",o.number+o.unit)}return r}});var Ve={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Ne=e=>{let t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new w("Expected a control sequence",e);return t},un=e=>{let t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},Kt=(e,t,r,o)=>{let s=e.gullet.macros.get(r.text);s==null&&(r.noexpand=!0,s={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,s,o)};S({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler({parser:e,funcName:t}){e.consumeSpaces();let r=e.fetch();if(Ve[r.text])return(t==="\\global"||t==="\\\\globallong")&&(r.text=Ve[r.text]),C(e.parseFunction(),"internal");throw new w("Invalid token after macro prefix",r)}});S({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler({parser:e,funcName:t}){let r=e.gullet.popToken(),o=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(o))throw new w("Expected a control sequence",r);let s=0,i,l=[[]];for(;e.gullet.future().text!=="{";)if(r=e.gullet.popToken(),r.text==="#"){if(e.gullet.future().text==="{"){i=e.gullet.future(),l[s].push("{");break}if(r=e.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new w(`Invalid argument number "${r.text}"`);if(parseInt(r.text)!==s+1)throw new w(`Argument number "${r.text}" out of order`);s++,l.push([])}else{if(r.text==="EOF")throw new w("Expected a macro definition");l[s].push(r.text)}let{tokens:u}=e.gullet.consumeArg();if(i&&u.unshift(i),t==="\\edef"||t==="\\xdef"){if(u=e.gullet.expandTokens(u),u.length>e.gullet.settings.maxExpand)throw new w("Too many expansions in an "+t);u.reverse()}return e.gullet.macros.set(o,{tokens:u,numArgs:s,delimiters:l},t===Ve[t]),{type:"internal",mode:e.mode}}});S({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler({parser:e,funcName:t}){let r=Ne(e.gullet.popToken());e.gullet.consumeSpaces();let o=un(e);return Kt(e,r,o,t==="\\\\globallet"),{type:"internal",mode:e.mode}}});S({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler({parser:e,funcName:t}){let r=Ne(e.gullet.popToken()),o=e.gullet.popToken(),s=e.gullet.popToken();return Kt(e,r,s,t==="\\\\globalfuture"),e.gullet.pushToken(s),e.gullet.pushToken(o),{type:"internal",mode:e.mode}}});S({type:"internal",names:["\\newcommand","\\renewcommand","\\providecommand"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler({parser:e,funcName:t}){let r="",o=e.gullet.popToken();o.text==="{"?(r=Ne(e.gullet.popToken()),e.gullet.popToken()):r=Ne(o);let s=e.gullet.isDefined(r);if(s&&t==="\\newcommand")throw new w(`\\newcommand{${r}} attempting to redefine ${r}; use \\renewcommand`);if(!s&&t==="\\renewcommand")throw new w(`\\renewcommand{${r}} when command ${r} does not yet exist; use \\newcommand`);let i=0;if(e.gullet.future().text==="["){let u=e.gullet.popToken();if(u=e.gullet.popToken(),!/^[0-9]$/.test(u.text))throw new w(`Invalid number of arguments: "${u.text}"`);if(i=parseInt(u.text),u=e.gullet.popToken(),u.text!=="]")throw new w(`Invalid argument "${u.text}"`)}let{tokens:l}=e.gullet.consumeArg();return t==="\\providecommand"&&e.gullet.macros.has(r)||e.gullet.macros.set(r,{tokens:l,numArgs:i}),{type:"internal",mode:e.mode}}});var We={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Jt=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\u2987","\\llparenthesis","\u2988","\\rrparenthesis","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lAngle","\u27EA","\\rAngle","\u27EB","\\llangle","\u2989","\\rrangle","\u298A","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","\\llbracket","\\rrbracket","\u27E6","\u27E6","\\lBrace","\\rBrace","\u2983","\u2984","/","\\backslash","|","\\vert","\\|","\\Vert","\u2016","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."],cn=["}","\\left","\\middle","\\right"],Le=e=>e.length>0&&(Jt.includes(e)||We[e]||cn.includes(e)),vt=[0,1.2,1.8,2.4,3];function ye(e,t){let r=ze(e);if(r&&Jt.includes(r.text))return["<","\\lt"].includes(r.text)&&(r.text="\u27E8"),[">","\\gt"].includes(r.text)&&(r.text="\u27E9"),r;throw r?new w(`Invalid delimiter '${r.text}' after '${t.funcName}'`,e):new w(`Invalid delimiter type '${e.type}'`,e)}var dn=["/","\\","\\backslash","\\vert","|"];S({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{let r=ye(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:We[e.funcName].size,mclass:We[e.funcName].mclass,delim:r.text}},mathmlBuilder:e=>{let t=[];e.delim==="."&&(e.delim=""),t.push(W(e.delim,e.mode));let r=new p.MathNode("mo",t);return e.mclass==="mopen"||e.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),(dn.includes(e.delim)||e.delim.indexOf("arrow")>-1)&&r.setAttribute("stretchy","true"),r.setAttribute("symmetric","true"),r.setAttribute("minsize",vt[e.size]+"em"),r.setAttribute("maxsize",vt[e.size]+"em"),r}});function mn(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}S({type:"leftright-right",names:["\\right"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>({type:"leftright-right",mode:e.parser.mode,delim:ye(t[0],e).text})});S({type:"leftright",names:["\\left"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{let r=ye(t[0],e),o=e.parser;++o.leftrightDepth;let s=o.parseExpression(!1,null,!0),i=o.fetch();for(;i.text==="\\middle";){o.consume();let u=o.fetch().text;if(!I.math[u])throw new w(`Invalid delimiter '${u}' after '\\middle'`);ye({type:"atom",mode:"math",text:u},{funcName:"\\middle"}),s.push({type:"middle",mode:"math",delim:u}),o.consume(),s=s.concat(o.parseExpression(!1,null,!0)),i=o.fetch()}--o.leftrightDepth,o.expect("\\right",!1);let l=C(o.parseFunction(),"leftright-right");return{type:"leftright",mode:o.mode,body:s,left:r.text,right:l.delim}},mathmlBuilder:(e,t)=>{mn(e);let r=U(e.body,t);e.left==="."&&(e.left="");let o=new p.MathNode("mo",[W(e.left,e.mode)]);o.setAttribute("fence","true"),o.setAttribute("form","prefix"),(e.left==="/"||e.left==="\\"||e.left.indexOf("arrow")>-1)&&o.setAttribute("stretchy","true"),r.unshift(o),e.right==="."&&(e.right="");let s=new p.MathNode("mo",[W(e.right,e.mode)]);if(s.setAttribute("fence","true"),s.setAttribute("form","postfix"),(e.right==="\u2216"||e.right.indexOf("arrow")>-1)&&s.setAttribute("stretchy","true"),e.body.length>0){let i=e.body[e.body.length-1];i.type==="color"&&!i.isTextColor&&s.setAttribute("mathcolor",i.color)}return r.push(s),Qe(r)}});S({type:"middle",names:["\\middle"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{let r=ye(t[0],e);if(!e.parser.leftrightDepth)throw new w("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},mathmlBuilder:(e,t)=>{let r=W(e.delim,e.mode),o=new p.MathNode("mo",[r]);return o.setAttribute("fence","true"),e.delim.indexOf("arrow")>-1&&o.setAttribute("stretchy","true"),o.setAttribute("form","prefix"),o.setAttribute("lspace","0.05em"),o.setAttribute("rspace","0.05em"),o}});var kt=e=>{let t=new p.MathNode("mspace");return t.setAttribute("width","3pt"),t},ve=(e,t)=>{let r;switch(e.label.indexOf("colorbox")>-1||e.label==="\\boxed"?r=new p.MathNode("mrow",[kt(),O(e.body,t),kt()]):r=new p.MathNode("menclose",[O(e.body,t)]),e.label){case"\\overline":r.setAttribute("notation","top"),r.classes.push("tml-overline");break;case"\\underline":r.setAttribute("notation","bottom"),r.classes.push("tml-underline");break;case"\\cancel":r.setAttribute("notation","updiagonalstrike"),r.children.push(new p.MathNode("mrow",[],["tml-cancel","upstrike"]));break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike"),r.children.push(new p.MathNode("mrow",[],["tml-cancel","downstrike"]));break;case"\\sout":r.setAttribute("notation","horizontalstrike"),r.children.push(new p.MathNode("mrow",[],["tml-cancel","sout"]));break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike"),r.classes.push("tml-xcancel");break;case"\\longdiv":r.setAttribute("notation","longdiv"),r.classes.push("longdiv-top"),r.children.push(new p.MathNode("mrow",[],["longdiv-arc"]));break;case"\\phase":r.setAttribute("notation","phasorangle"),r.classes.push("phasor-bottom"),r.children.push(new p.MathNode("mrow",[],["phasor-angle"]));break;case"\\textcircled":r.setAttribute("notation","circle"),r.classes.push("circle-pad"),r.children.push(new p.MathNode("mrow",[],["textcircle"]));break;case"\\angl":r.setAttribute("notation","actuarial"),r.classes.push("actuarial");break;case"\\boxed":r.setAttribute("notation","box"),r.classes.push("tml-box"),r.setAttribute("scriptlevel","0"),r.setAttribute("displaystyle","true");break;case"\\fbox":r.setAttribute("notation","box"),r.classes.push("tml-fbox");break;case"\\fcolorbox":case"\\colorbox":{let o={padding:"3pt 0 3pt 0"};e.label==="\\fcolorbox"&&(o.border="0.0667em solid "+String(e.borderColor)),r.style=o;break}}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};S({type:"enclose",names:["\\colorbox"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,argTypes:["raw","raw","text"]},handler({parser:e,funcName:t},r,o){let s=o[0]&&C(o[0],"raw").string,i="";if(s){let u=C(r[0],"raw").string;i=ce(s,u)}else i=xe(C(r[0],"raw").string,e.gullet.macros);let l=r[1];return{type:"enclose",mode:e.mode,label:t,backgroundColor:i,body:l}},mathmlBuilder:ve});S({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,numOptionalArgs:1,allowedInText:!0,argTypes:["raw","raw","raw","text"]},handler({parser:e,funcName:t},r,o){let s=o[0]&&C(o[0],"raw").string,i="",l;if(s){let h=C(r[0],"raw").string,x=C(r[0],"raw").string;i=ce(s,h),l=ce(s,x)}else i=xe(C(r[0],"raw").string,e.gullet.macros),l=xe(C(r[1],"raw").string,e.gullet.macros);let u=r[2];return{type:"enclose",mode:e.mode,label:t,backgroundColor:l,borderColor:i,body:u}},mathmlBuilder:ve});S({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler({parser:e},t){return{type:"enclose",mode:e.mode,label:"\\fbox",body:t[0]}}});S({type:"enclose",names:["\\angl","\\cancel","\\bcancel","\\xcancel","\\sout","\\overline","\\boxed","\\longdiv","\\phase"],props:{numArgs:1},handler({parser:e,funcName:t},r){let o=r[0];return{type:"enclose",mode:e.mode,label:t,body:o}},mathmlBuilder:ve});S({type:"enclose",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler({parser:e,funcName:t},r){let o=r[0];return{type:"enclose",mode:e.mode,label:t,body:o}},mathmlBuilder:ve});S({type:"enclose",names:["\\textcircled"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler({parser:e,funcName:t},r){let o=r[0];return{type:"enclose",mode:e.mode,label:t,body:o}},mathmlBuilder:ve});var Qt={};function X({type:e,names:t,props:r,handler:o,mathmlBuilder:s}){let i={type:e,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:o};for(let l=0;l<t.length;++l)Qt[t[l]]=i;s&&(Ce[e]=s)}var V=class e{constructor(t,r,o){this.lexer=t,this.start=r,this.end=o}static range(t,r){return r?!t||!t.loc||!r.loc||t.loc.lexer!==r.loc.lexer?null:new e(t.loc.lexer,t.loc.start,r.loc.end):t&&t.loc}},Z=class e{constructor(t,r){this.text=t,this.loc=r}range(t,r){return new e(r,V.range(this,t))}},F={DISPLAY:0,TEXT:1,SCRIPT:2,SCRIPTSCRIPT:3},er={};function c(e,t){er[e]=t}var hn=er;c("\\noexpand",function(e){let t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});c("\\expandafter",function(e){let t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});c("\\@firstoftwo",function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}});c("\\@secondoftwo",function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}});c("\\@ifnextchar",function(e){let t=e.consumeArgs(3);e.consumeSpaces();let r=e.future();return t[0].length===1&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});c("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");c("\\TextOrMath",function(e){let t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var He=e=>{let t="";for(let r=e.length-1;r>-1;r--)t+=e[r].text;return t},tt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15},At=e=>{let t=e.future().text;return t==="EOF"?[null,""]:[tt[t.charAt(0)],t]},St=(e,t,r)=>{for(let o=1;o<t.length;o++){let s=tt[t.charAt(o)];e*=r,e+=s}return e};c("\\char",function(e){let t=e.popToken(),r,o="";if(t.text==="'")r=8,t=e.popToken();else if(t.text==='"')r=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")o=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new w("\\char` missing argument");o=t.text.charCodeAt(0)}else r=10;if(r){let s=t.text;if(o=tt[s.charAt(0)],o==null||o>=r)throw new w(`Invalid base-${r} digit ${t.text}`);o=St(o,s,r);let i;for([i,s]=At(e);i!=null&&i<r;)o*=r,o+=i,o=St(o,s,r),e.popToken(),[i,s]=At(e)}return`\\@char{${o}}`});function rt(e){let t=e.consumeArgs(1)[0],r="",o=t[t.length-1].loc.start;for(let s=t.length-1;s>=0;s--){let i=t[s].loc.start;i>o&&(r+=" ",o=i),r+=t[s].text,o+=t[s].text.length}return r}c("\\surd","\\sqrt{\\vphantom{|}}");c("\u2295","\\oplus");c("\\long","");c("\\bgroup","{");c("\\egroup","}");c("~","\\nobreakspace");c("\\lq","`");c("\\rq","'");c("\\aa","\\r a");c("\\Bbbk","\\Bbb{k}");c("\\mathstrut","\\vphantom{(}");c("\\underbar","\\underline{\\text{#1}}");c("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");c("\u22EE","\\vdots");c("\\arraystretch","1");c("\\arraycolsep","6pt");c("\\substack","\\begin{subarray}{c}#1\\end{subarray}");c("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");c("\\implies","\\DOTSB\\;\\Longrightarrow\\;");c("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var qt={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcap":"\\dotsb","\\bigsqcup":"\\dotsb","\\bigtimes":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};c("\\dots",function(e){let t="\\dotso",r=e.expandAfterFuture().text;return r in qt?t=qt[r]:(r.slice(0,4)==="\\not"||r in I.math&&["bin","rel"].includes(I.math[r].group))&&(t="\\dotsb"),t});var nt={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};c("\\dotso",function(e){return e.future().text in nt?"\\ldots\\,":"\\ldots"});c("\\dotsc",function(e){let t=e.future().text;return t in nt&&t!==","?"\\ldots\\,":"\\ldots"});c("\\cdots",function(e){return e.future().text in nt?"\\@cdots\\,":"\\@cdots"});c("\\dotsb","\\cdots");c("\\dotsm","\\cdots");c("\\dotsi","\\!\\cdots");c("\\idotsint","\\dotsi");c("\\dotsx","\\ldots\\,");c("\\DOTSI","\\relax");c("\\DOTSB","\\relax");c("\\DOTSX","\\relax");c("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");c("\\,","{\\tmspace+{3mu}{.1667em}}");c("\\thinspace","\\,");c("\\>","\\mskip{4mu}");c("\\:","{\\tmspace+{4mu}{.2222em}}");c("\\medspace","\\:");c("\\;","{\\tmspace+{5mu}{.2777em}}");c("\\thickspace","\\;");c("\\!","{\\tmspace-{3mu}{.1667em}}");c("\\negthinspace","\\!");c("\\negmedspace","{\\tmspace-{4mu}{.2222em}}");c("\\negthickspace","{\\tmspace-{5mu}{.277em}}");c("\\enspace","\\kern.5em ");c("\\enskip","\\hskip.5em\\relax");c("\\quad","\\hskip1em\\relax");c("\\qquad","\\hskip2em\\relax");c("\\AA","\\TextOrMath{\\Angstrom}{\\mathring{A}}\\relax");c("\\tag","\\@ifstar\\tag@literal\\tag@paren");c("\\tag@paren","\\tag@literal{({#1})}");c("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new w("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});c("\\notag","\\nonumber");c("\\nonumber","\\gdef\\@eqnsw{0}");c("\\bmod","\\mathbin{\\text{mod}}");c("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");c("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");c("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");c("\\newline","\\\\\\relax");c("\\TeX","\\textrm{T}\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125em\\textrm{X}");c("\\LaTeX","\\textrm{L}\\kern-.35em\\raisebox{0.2em}{\\scriptstyle A}\\kern-.15em\\TeX");c("\\Temml","\\textrm{T}\\kern-0.2em\\lower{0.2em}{\\textrm{E}}\\kern-0.08em{\\textrm{M}\\kern-0.08em\\raise{0.2em}\\textrm{M}\\kern-0.08em\\textrm{L}}");c("\\hspace","\\@ifstar\\@hspacer\\@hspace");c("\\@hspace","\\hskip #1\\relax");c("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");c("\\colon",'\\mathpunct{\\char"3a}');c("\\prescript","\\pres@cript{_{#1}^{#2}}{}{#3}");c("\\ordinarycolon",'\\char"3a');c("\\vcentcolon","\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}}");c("\\coloneq",'\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}\\char"2212}');c("\\Coloneq",'\\mathrel{\\char"2237\\char"2212}');c("\\Eqqcolon",'\\mathrel{\\char"3d\\char"2237}');c("\\Eqcolon",'\\mathrel{\\char"2212\\char"2237}');c("\\colonapprox",'\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}\\char"2248}');c("\\Colonapprox",'\\mathrel{\\char"2237\\char"2248}');c("\\colonsim",'\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}\\char"223c}');c("\\Colonsim",'\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}\\char"223c}');c("\\ratio","\\vcentcolon");c("\\coloncolon","\\dblcolon");c("\\colonequals","\\coloneqq");c("\\coloncolonequals","\\Coloneqq");c("\\equalscolon","\\eqqcolon");c("\\equalscoloncolon","\\Eqqcolon");c("\\colonminus","\\coloneq");c("\\coloncolonminus","\\Coloneq");c("\\minuscolon","\\eqcolon");c("\\minuscoloncolon","\\Eqcolon");c("\\coloncolonapprox","\\Colonapprox");c("\\coloncolonsim","\\Colonsim");c("\\notni","\\mathrel{\\char`\u220C}");c("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");c("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");c("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");c("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");c("\\varlimsup","\\DOTSB\\operatorname*{\\overline{\\text{lim}}}");c("\\varliminf","\\DOTSB\\operatorname*{\\underline{\\text{lim}}}");c("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{\\text{lim}}}");c("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{\\text{lim}}}");c("\\centerdot","{\\medspace\\rule{0.167em}{0.189em}\\medspace}");c("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");c("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");c("\\plim","\\DOTSB\\operatorname*{plim}");c("\\leftmodels","\\mathop{\\reflectbox{$\\models$}}");c("\\bra","\\mathinner{\\langle{#1}|}");c("\\ket","\\mathinner{|{#1}\\rangle}");c("\\braket","\\mathinner{\\langle{#1}\\rangle}");c("\\Bra","\\left\\langle#1\\right|");c("\\Ket","\\left|#1\\right\\rangle");var tr=(e,t)=>{let o=`}\\,\\middle${t[0]==="|"?"\\vert":"\\Vert"}\\,{`;return e.slice(0,t.index)+o+e.slice(t.index+t[0].length)};c("\\Braket",function(e){let t=rt(e),r=/\|\||\||\\\|/g,o;for(;(o=r.exec(t))!==null;)t=tr(t,o);return"\\left\\langle{"+t+"}\\right\\rangle"});c("\\Set",function(e){let t=rt(e),r=/\|\||\||\\\|/.exec(t);return r&&(t=tr(t,r)),"\\left\\{\\:{"+t+"}\\:\\right\\}"});c("\\set",function(e){return"\\{{"+rt(e).replace(/\|/,"}\\mid{")+"}\\}"});c("\\angln","{\\angl n}");c("\\odv","\\@ifstar\\odv@next\\odv@numerator");c("\\odv@numerator","\\frac{\\mathrm{d}#1}{\\mathrm{d}#2}");c("\\odv@next","\\frac{\\mathrm{d}}{\\mathrm{d}#2}#1");c("\\pdv","\\@ifstar\\pdv@next\\pdv@numerator");var rr=e=>{let t=e[0][0].text,r=He(e[1]).split(","),o=String(r.length),s=o==="1"?"\\partial":`\\partial^${o}`,i="";return r.map(l=>{i+="\\partial "+l.trim()+"\\,"}),[t,s,i.replace(/\\,$/,"")]};c("\\pdv@numerator",function(e){let[t,r,o]=rr(e.consumeArgs(2));return`\\frac{${r} ${t}}{${o}}`});c("\\pdv@next",function(e){let[t,r,o]=rr(e.consumeArgs(2));return`\\frac{${r}}{${o}} ${t}`});c("\\upalpha","\\up@greek{\\alpha}");c("\\upbeta","\\up@greek{\\beta}");c("\\upgamma","\\up@greek{\\gamma}");c("\\updelta","\\up@greek{\\delta}");c("\\upepsilon","\\up@greek{\\epsilon}");c("\\upzeta","\\up@greek{\\zeta}");c("\\upeta","\\up@greek{\\eta}");c("\\uptheta","\\up@greek{\\theta}");c("\\upiota","\\up@greek{\\iota}");c("\\upkappa","\\up@greek{\\kappa}");c("\\uplambda","\\up@greek{\\lambda}");c("\\upmu","\\up@greek{\\mu}");c("\\upnu","\\up@greek{\\nu}");c("\\upxi","\\up@greek{\\xi}");c("\\upomicron","\\up@greek{\\omicron}");c("\\uppi","\\up@greek{\\pi}");c("\\upalpha","\\up@greek{\\alpha}");c("\\uprho","\\up@greek{\\rho}");c("\\upsigma","\\up@greek{\\sigma}");c("\\uptau","\\up@greek{\\tau}");c("\\upupsilon","\\up@greek{\\upsilon}");c("\\upphi","\\up@greek{\\phi}");c("\\upchi","\\up@greek{\\chi}");c("\\uppsi","\\up@greek{\\psi}");c("\\upomega","\\up@greek{\\omega}");c("\\invamp",'\\mathbin{\\char"214b}');c("\\parr",'\\mathbin{\\char"214b}');c("\\with",'\\mathbin{\\char"26}');c("\\multimapinv",'\\mathrel{\\char"27dc}');c("\\multimapboth",'\\mathrel{\\char"29df}');c("\\scoh",'{\\mkern5mu\\char"2322\\mkern5mu}');c("\\sincoh",'{\\mkern5mu\\char"2323\\mkern5mu}');c("\\coh",`{\\mkern5mu\\rule{}{0.7em}\\mathrlap{\\smash{\\raise2mu{\\char"2322}}}
{\\smash{\\lower4mu{\\char"2323}}}\\mkern5mu}`);c("\\incoh",`{\\mkern5mu\\rule{}{0.7em}\\mathrlap{\\smash{\\raise2mu{\\char"2323}}}
{\\smash{\\lower4mu{\\char"2322}}}\\mkern5mu}`);c("\\standardstate","\\text{\\tiny\\char`\u29B5}");c("\\ce",function(e){return nr(e.consumeArgs(1)[0],"ce")});c("\\pu",function(e){return nr(e.consumeArgs(1)[0],"pu")});c("\\uniDash","{\\rule{0.672em}{0.06em}}");c("\\triDash","{\\rule{0.15em}{0.06em}\\kern2mu\\rule{0.15em}{0.06em}\\kern2mu\\rule{0.15em}{0.06em}}");c("\\tripleDash","\\kern0.075em\\raise0.25em{\\triDash}\\kern0.075em");c("\\tripleDashOverLine","\\kern0.075em\\mathrlap{\\raise0.125em{\\uniDash}}\\raise0.34em{\\triDash}\\kern0.075em");c("\\tripleDashOverDoubleLine","\\kern0.075em\\mathrlap{\\mathrlap{\\raise0.48em{\\triDash}}\\raise0.27em{\\uniDash}}{\\raise0.05em{\\uniDash}}\\kern0.075em");c("\\tripleDashBetweenDoubleLine","\\kern0.075em\\mathrlap{\\mathrlap{\\raise0.48em{\\uniDash}}\\raise0.27em{\\triDash}}{\\raise0.05em{\\uniDash}}\\kern0.075em");var nr=function(e,t){for(var r="",o=e.length&&e[e.length-1].loc.start,s=e.length-1;s>=0;s--)e[s].loc.start>o&&(r+=" ",o=e[s].loc.start),r+=e[s].text,o+=e[s].text.length;var i=M.go(y.go(r,t));return i},y={go:function(e,t){if(!e)return[];t===void 0&&(t="ce");var r="0",o={};o.parenthesisLevel=0,e=e.replace(/\n/g," "),e=e.replace(/[\u2212\u2013\u2014\u2010]/g,"-"),e=e.replace(/[\u2026]/g,"...");for(var s,i=10,l=[];;){s!==e?(i=10,s=e):i--;var u=y.stateMachines[t],h=u.transitions[r]||u.transitions["*"];e:for(var x=0;x<h.length;x++){var A=y.patterns.match_(h[x].pattern,e);if(A){for(var q=h[x].task,b=0;b<q.action_.length;b++){var k;if(u.actions[q.action_[b].type_])k=u.actions[q.action_[b].type_](o,A.match_,q.action_[b].option);else if(y.actions[q.action_[b].type_])k=y.actions[q.action_[b].type_](o,A.match_,q.action_[b].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+q.action_[b].type_+")"];y.concatArray(l,k)}if(r=q.nextState||r,e.length>0){if(q.revisit||(e=A.remainder),!q.toContinue)break e}else return l}}if(i<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(e,t){if(t)if(Array.isArray(t))for(var r=0;r<t.length;r++)e.push(t[r]);else e.push(t)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(e){var t=e.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:([eE]|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return t&&t[0]?{match_:t.splice(1),remainder:e.substr(t[0].length)}:null},"(-)(9)^(-9)":function(e){var t=e.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return t&&t[0]?{match_:t.splice(1),remainder:e.substr(t[0].length)}:null},"state of aggregation $":function(e){var t=y.patterns.findObserveGroups(e,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(t&&t.remainder.match(/^($|[\s,;\)\]\}])/))return t;var r=e.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return r?{match_:r[0],remainder:e.substr(r[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(e){return y.patterns.findObserveGroups(e,"^{","","","}")},"^($...$)":function(e){return y.patterns.findObserveGroups(e,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(e){return y.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(e){return y.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(e){return y.patterns.findObserveGroups(e,"_{","","","}")},"_($...$)":function(e){return y.patterns.findObserveGroups(e,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(e){return y.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(e){return y.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(e){return y.patterns.findObserveGroups(e,"","{","}","")},"{(...)}":function(e){return y.patterns.findObserveGroups(e,"{","","","}")},"$...$":function(e){return y.patterns.findObserveGroups(e,"","$","$","")},"${(...)}$":function(e){return y.patterns.findObserveGroups(e,"${","","","}$")},"$(...)$":function(e){return y.patterns.findObserveGroups(e,"$","","","$")},"=<>":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(e){return y.patterns.findObserveGroups(e,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(e){return y.patterns.findObserveGroups(e,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(e){return y.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(e){return y.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(e){return y.patterns.findObserveGroups(e,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(e){return y.patterns.findObserveGroups(e,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(e){return y.patterns.findObserveGroups(e,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(e){return y.patterns.findObserveGroups(e,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(e){return y.patterns.findObserveGroups(e,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(e){return y.patterns.findObserveGroups(e,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(e){return y.patterns.findObserveGroups(e,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(e){return y.patterns.findObserveGroups(e,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(e){var t;if(t=e.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/),t)return{match_:t[0],remainder:e.substr(t[0].length)};var r=y.patterns.findObserveGroups(e,"","$","$","");return r&&(t=r.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/),t)?{match_:t[0],remainder:e.substr(t[0].length)}:null},amount2:function(e){return this.amount(e)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(e){if(e.match(/^\([a-z]+\)$/))return null;var t=e.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return t?{match_:t[0],remainder:e.substr(t[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(e,t,r,o,s,i,l,u,h,x){var A=function(G,E){if(typeof E=="string")return G.indexOf(E)!==0?null:E;var H=G.match(E);return H?H[0]:null},q=function(G,E,H){for(var J=0;E<G.length;){var le=G.charAt(E),lt=A(G.substr(E),H);if(lt!==null&&J===0)return{endMatchBegin:E,endMatchEnd:E+lt.length};if(le==="{")J++;else if(le==="}"){if(J===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];J--}E++}return J>0,null},b=A(e,t);if(b===null||(e=e.substr(b.length),b=A(e,r),b===null))return null;var k=q(e,b.length,o||s);if(k===null)return null;var T=e.substring(0,o?k.endMatchEnd:k.endMatchBegin);if(i||l){var $=this.findObserveGroups(e.substr(k.endMatchEnd),i,l,u,h);if($===null)return null;var j=[T,$.match_];return{match_:x?j.join(""):j,remainder:$.remainder}}else return{match_:T,remainder:e.substr(k.endMatchEnd)}},match_:function(e,t){var r=y.patterns.patterns[e];if(r===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+e+")"];if(typeof r=="function")return y.patterns.patterns[e](t);var o=t.match(r);if(o){var s;return o[2]?s=[o[1],o[2]]:o[1]?s=o[1]:s=o[0],{match_:s,remainder:t.substr(o[0].length)}}return null}},actions:{"a=":function(e,t){e.a=(e.a||"")+t},"b=":function(e,t){e.b=(e.b||"")+t},"p=":function(e,t){e.p=(e.p||"")+t},"o=":function(e,t){e.o=(e.o||"")+t},"q=":function(e,t){e.q=(e.q||"")+t},"d=":function(e,t){e.d=(e.d||"")+t},"rm=":function(e,t){e.rm=(e.rm||"")+t},"text=":function(e,t){e.text_=(e.text_||"")+t},insert:function(e,t,r){return{type_:r}},"insert+p1":function(e,t,r){return{type_:r,p1:t}},"insert+p1+p2":function(e,t,r){return{type_:r,p1:t[0],p2:t[1]}},copy:function(e,t){return t},rm:function(e,t){return{type_:"rm",p1:t||""}},text:function(e,t){return y.go(t,"text")},"{text}":function(e,t){var r=["{"];return y.concatArray(r,y.go(t,"text")),r.push("}"),r},"tex-math":function(e,t){return y.go(t,"tex-math")},"tex-math tight":function(e,t){return y.go(t,"tex-math tight")},bond:function(e,t,r){return{type_:"bond",kind_:r||t}},"color0-output":function(e,t){return{type_:"color0",color:t[0]}},ce:function(e,t){return y.go(t)},"1/2":function(e,t){var r=[];t.match(/^[+\-]/)&&(r.push(t.substr(0,1)),t=t.substr(1));var o=t.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return o[1]=o[1].replace(/\$/g,""),r.push({type_:"frac",p1:o[1],p2:o[2]}),o[3]&&(o[3]=o[3].replace(/\$/g,""),r.push({type_:"tex-math",p1:o[3]})),r},"9,9":function(e,t){return y.go(t,"9,9")}},createTransitions:function(e){var t,r,o,s,i={};for(t in e)for(r in e[t])for(o=r.split("|"),e[t][r].stateArray=o,s=0;s<o.length;s++)i[o[s]]=[];for(t in e)for(r in e[t])for(o=e[t][r].stateArray||[],s=0;s<o.length;s++){var l=e[t][r];if(l.action_){l.action_=[].concat(l.action_);for(var u=0;u<l.action_.length;u++)typeof l.action_[u]=="string"&&(l.action_[u]={type_:l.action_[u]})}else l.action_=[];for(var h=t.split("|"),x=0;x<h.length;x++)if(o[s]==="*")for(var A in i)i[A].push({pattern:h[x],task:l});else i[o[s]].push({pattern:h[x],task:l})}return i},stateMachines:{}};y.stateMachines={ce:{transitions:y.createTransitions({empty:{"*":{action_:"output"}},else:{"0|1|2":{action_:"beginsWithBond=false",revisit:!0,toContinue:!0}},oxidation$:{0:{action_:"oxidation-output"}},CMT:{r:{action_:"rdt=",nextState:"rt"},rd:{action_:"rqt=",nextState:"rdt"}},arrowUpDown:{"0|1|2|as":{action_:["sb=false","output","operator"],nextState:"1"}},uprightEntities:{"0|1|2":{action_:["o=","output"],nextState:"1"}},orbital:{"0|1|2|3":{action_:"o=",nextState:"o"}},"->":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(e,t){var r;if((e.d||"").match(/^[0-9]+$/)){var o=e.d;e.d=void 0,r=this.output(e),e.b=o}else r=this.output(e);return y.actions["o="](e,t),r},"d= kv":function(e,t){e.d=t,e.dType="kv"},"charge or bond":function(e,t){if(e.beginsWithBond){var r=[];return y.concatArray(r,this.output(e)),y.concatArray(r,y.actions.bond(e,t,"-")),r}else e.d=t},"- after o/d":function(e,t,r){var o=y.patterns.match_("orbital",e.o||""),s=y.patterns.match_("one lowercase greek letter $",e.o||""),i=y.patterns.match_("one lowercase latin letter $",e.o||""),l=y.patterns.match_("$one lowercase latin letter$ $",e.o||""),u=t==="-"&&(o&&o.remainder===""||s||i||l);u&&!e.a&&!e.b&&!e.p&&!e.d&&!e.q&&!o&&i&&(e.o="$"+e.o+"$");var h=[];return u?(y.concatArray(h,this.output(e)),h.push({type_:"hyphen"})):(o=y.patterns.match_("digits",e.d||""),r&&o&&o.remainder===""?(y.concatArray(h,y.actions["d="](e,t)),y.concatArray(h,this.output(e))):(y.concatArray(h,this.output(e)),y.concatArray(h,y.actions.bond(e,t,"-")))),h},"a to o":function(e){e.o=e.a,e.a=void 0},"sb=true":function(e){e.sb=!0},"sb=false":function(e){e.sb=!1},"beginsWithBond=true":function(e){e.beginsWithBond=!0},"beginsWithBond=false":function(e){e.beginsWithBond=!1},"parenthesisLevel++":function(e){e.parenthesisLevel++},"parenthesisLevel--":function(e){e.parenthesisLevel--},"state of aggregation":function(e,t){return{type_:"state of aggregation",p1:y.go(t,"o")}},comma:function(e,t){var r=t.replace(/\s*$/,""),o=r!==t;return o&&e.parenthesisLevel===0?{type_:"comma enumeration L",p1:r}:{type_:"comma enumeration M",p1:r}},output:function(e,t,r){var o;if(!e.r)o=[],!e.a&&!e.b&&!e.p&&!e.o&&!e.q&&!e.d&&!r||(e.sb&&o.push({type_:"entitySkip"}),!e.o&&!e.q&&!e.d&&!e.b&&!e.p&&r!==2?(e.o=e.a,e.a=void 0):!e.o&&!e.q&&!e.d&&(e.b||e.p)?(e.o=e.a,e.d=e.b,e.q=e.p,e.a=e.b=e.p=void 0):e.o&&e.dType==="kv"&&y.patterns.match_("d-oxidation$",e.d||"")?e.dType="oxidation":e.o&&e.dType==="kv"&&!e.q&&(e.dType=void 0),o.push({type_:"chemfive",a:y.go(e.a,"a"),b:y.go(e.b,"bd"),p:y.go(e.p,"pq"),o:y.go(e.o,"o"),q:y.go(e.q,"pq"),d:y.go(e.d,e.dType==="oxidation"?"oxidation":"bd"),dType:e.dType}));else{var s;e.rdt==="M"?s=y.go(e.rd,"tex-math"):e.rdt==="T"?s=[{type_:"text",p1:e.rd||""}]:s=y.go(e.rd);var i;e.rqt==="M"?i=y.go(e.rq,"tex-math"):e.rqt==="T"?i=[{type_:"text",p1:e.rq||""}]:i=y.go(e.rq),o={type_:"arrow",r:e.r,rd:s,rq:i}}for(var l in e)l!=="parenthesisLevel"&&l!=="beginsWithBond"&&delete e[l];return o},"oxidation-output":function(e,t){var r=["{"];return y.concatArray(r,y.go(t,"oxidation")),r.push("}"),r},"frac-output":function(e,t){return{type_:"frac-ce",p1:y.go(t[0]),p2:y.go(t[1])}},"overset-output":function(e,t){return{type_:"overset",p1:y.go(t[0]),p2:y.go(t[1])}},"underset-output":function(e,t){return{type_:"underset",p1:y.go(t[0]),p2:y.go(t[1])}},"underbrace-output":function(e,t){return{type_:"underbrace",p1:y.go(t[0]),p2:y.go(t[1])}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:y.go(t[1])}},"r=":function(e,t){e.r=t},"rdt=":function(e,t){e.rdt=t},"rd=":function(e,t){e.rd=t},"rqt=":function(e,t){e.rqt=t},"rq=":function(e,t){e.rq=t},operator:function(e,t,r){return{type_:"operator",kind_:r||t}}}},a:{transitions:y.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:y.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:y.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(e){if(e.text_){var t={type_:"text",p1:e.text_};for(var r in e)delete e[r];return t}}}},pq:{transitions:y.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(e,t){return{type_:"state of aggregation subscript",p1:y.go(t,"o")}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:y.go(t[1],"pq")}}}},bd:{transitions:y.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(e,t){return{type_:"color",color1:t[0],color2:y.go(t[1],"bd")}}}},oxidation:{transitions:y.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(e,t){return{type_:"roman numeral",p1:t||""}}}},"tex-math":{transitions:y.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var r in e)delete e[r];return t}}}},"tex-math tight":{transitions:y.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(e,t){e.o=(e.o||"")+"{"+t+"}"},output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var r in e)delete e[r];return t}}}},"9,9":{transitions:y.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:y.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(e,t){var r=[];return t[0]==="+-"||t[0]==="+/-"?r.push("\\pm "):t[0]&&r.push(t[0]),t[1]&&(y.concatArray(r,y.go(t[1],"pu-9,9")),t[2]&&(t[2].match(/[,.]/)?y.concatArray(r,y.go(t[2],"pu-9,9")):r.push(t[2])),t[3]=t[4]||t[3],t[3]&&(t[3]=t[3].trim(),t[3]==="e"||t[3].substr(0,1)==="*"?r.push({type_:"cdot"}):r.push({type_:"times"}))),t[3]&&r.push("10^{"+t[5]+"}"),r},"number^":function(e,t){var r=[];return t[0]==="+-"||t[0]==="+/-"?r.push("\\pm "):t[0]&&r.push(t[0]),y.concatArray(r,y.go(t[1],"pu-9,9")),r.push("^{"+t[2]+"}"),r},operator:function(e,t,r){return{type_:"operator",kind_:r||t}},space:function(){return{type_:"pu-space-1"}},output:function(e){var t,r=y.patterns.match_("{(...)}",e.d||"");r&&r.remainder===""&&(e.d=r.match_);var o=y.patterns.match_("{(...)}",e.q||"");if(o&&o.remainder===""&&(e.q=o.match_),e.d&&(e.d=e.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.d=e.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),e.q){e.q=e.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.q=e.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var s={d:y.go(e.d,"pu"),q:y.go(e.q,"pu")};e.o==="//"?t={type_:"pu-frac",p1:s.d,p2:s.q}:(t=s.d,s.d.length>1||s.q.length>1?t.push({type_:" / "}):t.push({type_:"/"}),y.concatArray(t,s.q))}else t=y.go(e.d,"pu-2");for(var i in e)delete e[i];return t}}},"pu-2":{transitions:y.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(e,t){e.rm+="^{"+t+"}"},space:function(){return{type_:"pu-space-2"}},output:function(e){var t=[];if(e.rm){var r=y.patterns.match_("{(...)}",e.rm||"");r&&r.remainder===""?t=y.go(r.match_,"pu"):t={type_:"rm",p1:e.rm}}for(var o in e)delete e[o];return t}}},"pu-9,9":{transitions:y.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){var r=e.text_.length%3;r===0&&(r=3);for(var o=e.text_.length-3;o>0;o-=3)t.push(e.text_.substr(o,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(0,r)),t.reverse()}else t.push(e.text_);for(var s in e)delete e[s];return t},"output-o":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){for(var r=e.text_.length-3,o=0;o<r;o+=3)t.push(e.text_.substr(o,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(o))}else t.push(e.text_);for(var s in e)delete e[s];return t}}}};var M={go:function(e,t){if(!e)return"";for(var r="",o=!1,s=0;s<e.length;s++){var i=e[s];typeof i=="string"?r+=i:(r+=M._go2(i),i.type_==="1st-level escape"&&(o=!0))}return!t&&!o&&r&&(r="{"+r+"}"),r},_goInner:function(e){return e&&M.go(e,!0)},_go2:function(e){var t;switch(e.type_){case"chemfive":t="";var r={a:M._goInner(e.a),b:M._goInner(e.b),p:M._goInner(e.p),o:M._goInner(e.o),q:M._goInner(e.q),d:M._goInner(e.d)};r.a&&(r.a.match(/^[+\-]/)&&(r.a="{"+r.a+"}"),t+=r.a+"\\,"),(r.b||r.p)&&(t+="{\\vphantom{X}}",t+="^{\\hphantom{"+(r.b||"")+"}}_{\\hphantom{"+(r.p||"")+"}}",t+="{\\vphantom{X}}",t+="^{\\vphantom{2}\\mathllap{"+(r.b||"")+"}}",t+="_{\\vphantom{2}\\mathllap{"+(r.p||"")+"}}"),r.o&&(r.o.match(/^[+\-]/)&&(r.o="{"+r.o+"}"),t+=r.o),e.dType==="kv"?((r.d||r.q)&&(t+="{\\vphantom{X}}"),r.d&&(t+="^{"+r.d+"}"),r.q&&(t+="_{"+r.q+"}")):e.dType==="oxidation"?(r.d&&(t+="{\\vphantom{X}}",t+="^{"+r.d+"}"),r.q&&(t+="{{}}",t+="_{"+r.q+"}")):(r.q&&(t+="{{}}",t+="_{"+r.q+"}"),r.d&&(t+="{{}}",t+="^{"+r.d+"}"));break;case"rm":t="\\mathrm{"+e.p1+"}";break;case"text":e.p1.match(/[\^_]/)?(e.p1=e.p1.replace(" ","~").replace("-","\\text{-}"),t="\\mathrm{"+e.p1+"}"):t="\\text{"+e.p1+"}";break;case"roman numeral":t="\\mathrm{"+e.p1+"}";break;case"state of aggregation":t="\\mskip2mu "+M._goInner(e.p1);break;case"state of aggregation subscript":t="\\mskip1mu "+M._goInner(e.p1);break;case"bond":if(t=M._getBond(e.kind_),!t)throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+e.kind_+")"];break;case"frac":var o="\\frac{"+e.p1+"}{"+e.p2+"}";t="\\mathchoice{\\textstyle"+o+"}{"+o+"}{"+o+"}{"+o+"}";break;case"pu-frac":var s="\\frac{"+M._goInner(e.p1)+"}{"+M._goInner(e.p2)+"}";t="\\mathchoice{\\textstyle"+s+"}{"+s+"}{"+s+"}{"+s+"}";break;case"tex-math":t=e.p1+" ";break;case"frac-ce":t="\\frac{"+M._goInner(e.p1)+"}{"+M._goInner(e.p2)+"}";break;case"overset":t="\\overset{"+M._goInner(e.p1)+"}{"+M._goInner(e.p2)+"}";break;case"underset":t="\\underset{"+M._goInner(e.p1)+"}{"+M._goInner(e.p2)+"}";break;case"underbrace":t="\\underbrace{"+M._goInner(e.p1)+"}_{"+M._goInner(e.p2)+"}";break;case"color":t="{\\color{"+e.color1+"}{"+M._goInner(e.color2)+"}}";break;case"color0":t="\\color{"+e.color+"}";break;case"arrow":var i={rd:M._goInner(e.rd),rq:M._goInner(e.rq)},l=M._getArrow(e.r);i.rq&&(l+="[{\\rm "+i.rq+"}]"),i.rd?l+="{\\rm "+i.rd+"}":l+="{}",t=l;break;case"operator":t=M._getOperator(e.kind_);break;case"1st-level escape":t=e.p1+" ";break;case"space":t=" ";break;case"entitySkip":t="~";break;case"pu-space-1":t="~";break;case"pu-space-2":t="\\mkern3mu ";break;case"1000 separator":t="\\mkern2mu ";break;case"commaDecimal":t="{,}";break;case"comma enumeration L":t="{"+e.p1+"}\\mkern6mu ";break;case"comma enumeration M":t="{"+e.p1+"}\\mkern3mu ";break;case"comma enumeration S":t="{"+e.p1+"}\\mkern1mu ";break;case"hyphen":t="\\text{-}";break;case"addition compound":t="\\,{\\cdot}\\,";break;case"electron dot":t="\\mkern1mu \\text{\\textbullet}\\mkern1mu ";break;case"KV x":t="{\\times}";break;case"prime":t="\\prime ";break;case"cdot":t="\\cdot ";break;case"tight cdot":t="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":t="\\times ";break;case"circa":t="{\\sim}";break;case"^":t="uparrow";break;case"v":t="downarrow";break;case"ellipsis":t="\\ldots ";break;case"/":t="/";break;case" / ":t="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return t},_getArrow:function(e){switch(e){case"->":return"\\yields";case"\u2192":return"\\yields";case"\u27F6":return"\\yields";case"<-":return"\\yieldsLeft";case"<->":return"\\mesomerism";case"<-->":return"\\yieldsLeftRight";case"<=>":return"\\equilibrium";case"\u21CC":return"\\equilibrium";case"<=>>":return"\\equilibriumRight";case"<<=>":return"\\equilibriumLeft";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(e){switch(e){case"-":return"{-}";case"1":return"{-}";case"=":return"{=}";case"2":return"{=}";case"#":return"{\\equiv}";case"3":return"{\\equiv}";case"~":return"{\\tripleDash}";case"~-":return"{\\tripleDashOverLine}";case"~=":return"{\\tripleDashOverDoubleLine}";case"~--":return"{\\tripleDashOverDoubleLine}";case"-~-":return"{\\tripleDashBetweenDoubleLine}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(e){switch(e){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":return" {}\\approx{} ";case"$\\approx$":return" {}\\approx{} ";case"v":return" \\downarrow{} ";case"(v)":return" \\downarrow{} ";case"^":return" \\uparrow{} ";case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}};c("\\darr","\\downarrow");c("\\dArr","\\Downarrow");c("\\Darr","\\Downarrow");c("\\lang","\\langle");c("\\rang","\\rangle");c("\\uarr","\\uparrow");c("\\uArr","\\Uparrow");c("\\Uarr","\\Uparrow");c("\\N","\\mathbb{N}");c("\\R","\\mathbb{R}");c("\\Z","\\mathbb{Z}");c("\\alef","\\aleph");c("\\alefsym","\\aleph");c("\\bull","\\bullet");c("\\clubs","\\clubsuit");c("\\cnums","\\mathbb{C}");c("\\Complex","\\mathbb{C}");c("\\Dagger","\\ddagger");c("\\diamonds","\\diamondsuit");c("\\empty","\\emptyset");c("\\exist","\\exists");c("\\harr","\\leftrightarrow");c("\\hArr","\\Leftrightarrow");c("\\Harr","\\Leftrightarrow");c("\\hearts","\\heartsuit");c("\\image","\\Im");c("\\infin","\\infty");c("\\isin","\\in");c("\\larr","\\leftarrow");c("\\lArr","\\Leftarrow");c("\\Larr","\\Leftarrow");c("\\lrarr","\\leftrightarrow");c("\\lrArr","\\Leftrightarrow");c("\\Lrarr","\\Leftrightarrow");c("\\natnums","\\mathbb{N}");c("\\plusmn","\\pm");c("\\rarr","\\rightarrow");c("\\rArr","\\Rightarrow");c("\\Rarr","\\Rightarrow");c("\\real","\\Re");c("\\reals","\\mathbb{R}");c("\\Reals","\\mathbb{R}");c("\\sdot","\\cdot");c("\\sect","\\S");c("\\spades","\\spadesuit");c("\\sub","\\subset");c("\\sube","\\subseteq");c("\\supe","\\supseteq");c("\\thetasym","\\vartheta");c("\\weierp","\\wp");c("\\quantity","{\\left\\{ #1 \\right\\}}");c("\\qty","{\\left\\{ #1 \\right\\}}");c("\\pqty","{\\left( #1 \\right)}");c("\\bqty","{\\left[ #1 \\right]}");c("\\vqty","{\\left\\vert #1 \\right\\vert}");c("\\Bqty","{\\left\\{ #1 \\right\\}}");c("\\absolutevalue","{\\left\\vert #1 \\right\\vert}");c("\\abs","{\\left\\vert #1 \\right\\vert}");c("\\norm","{\\left\\Vert #1 \\right\\Vert}");c("\\evaluated","{\\left.#1 \\right\\vert}");c("\\eval","{\\left.#1 \\right\\vert}");c("\\order","{\\mathcal{O} \\left( #1 \\right)}");c("\\commutator","{\\left[ #1 , #2 \\right]}");c("\\comm","{\\left[ #1 , #2 \\right]}");c("\\anticommutator","{\\left\\{ #1 , #2 \\right\\}}");c("\\acomm","{\\left\\{ #1 , #2 \\right\\}}");c("\\poissonbracket","{\\left\\{ #1 , #2 \\right\\}}");c("\\pb","{\\left\\{ #1 , #2 \\right\\}}");c("\\vectorbold","{\\boldsymbol{ #1 }}");c("\\vb","{\\boldsymbol{ #1 }}");c("\\vectorarrow","{\\vec{\\boldsymbol{ #1 }}}");c("\\va","{\\vec{\\boldsymbol{ #1 }}}");c("\\vectorunit","{{\\boldsymbol{\\hat{ #1 }}}}");c("\\vu","{{\\boldsymbol{\\hat{ #1 }}}}");c("\\dotproduct","\\mathbin{\\boldsymbol\\cdot}");c("\\vdot","{\\boldsymbol\\cdot}");c("\\crossproduct","\\mathbin{\\boldsymbol\\times}");c("\\cross","\\mathbin{\\boldsymbol\\times}");c("\\cp","\\mathbin{\\boldsymbol\\times}");c("\\gradient","{\\boldsymbol\\nabla}");c("\\grad","{\\boldsymbol\\nabla}");c("\\divergence","{\\grad\\vdot}");c("\\curl","{\\grad\\cross}");c("\\laplacian","\\nabla^2");c("\\tr","{\\operatorname{tr}}");c("\\Tr","{\\operatorname{Tr}}");c("\\rank","{\\operatorname{rank}}");c("\\erf","{\\operatorname{erf}}");c("\\Res","{\\operatorname{Res}}");c("\\principalvalue","{\\mathcal{P}}");c("\\pv","{\\mathcal{P}}");c("\\PV","{\\operatorname{P.V.}}");c("\\qqtext","{\\quad\\text{ #1 }\\quad}");c("\\qq","{\\quad\\text{ #1 }\\quad}");c("\\qcomma","{\\text{,}\\quad}");c("\\qc","{\\text{,}\\quad}");c("\\qcc","{\\quad\\text{c.c.}\\quad}");c("\\qif","{\\quad\\text{if}\\quad}");c("\\qthen","{\\quad\\text{then}\\quad}");c("\\qelse","{\\quad\\text{else}\\quad}");c("\\qotherwise","{\\quad\\text{otherwise}\\quad}");c("\\qunless","{\\quad\\text{unless}\\quad}");c("\\qgiven","{\\quad\\text{given}\\quad}");c("\\qusing","{\\quad\\text{using}\\quad}");c("\\qassume","{\\quad\\text{assume}\\quad}");c("\\qsince","{\\quad\\text{since}\\quad}");c("\\qlet","{\\quad\\text{let}\\quad}");c("\\qfor","{\\quad\\text{for}\\quad}");c("\\qall","{\\quad\\text{all}\\quad}");c("\\qeven","{\\quad\\text{even}\\quad}");c("\\qodd","{\\quad\\text{odd}\\quad}");c("\\qinteger","{\\quad\\text{integer}\\quad}");c("\\qand","{\\quad\\text{and}\\quad}");c("\\qor","{\\quad\\text{or}\\quad}");c("\\qas","{\\quad\\text{as}\\quad}");c("\\qin","{\\quad\\text{in}\\quad}");c("\\differential","{\\text{d}}");c("\\dd","{\\text{d}}");c("\\derivative","{\\frac{\\text{d}{ #1 }}{\\text{d}{ #2 }}}");c("\\dv","{\\frac{\\text{d}{ #1 }}{\\text{d}{ #2 }}}");c("\\partialderivative","{\\frac{\\partial{ #1 }}{\\partial{ #2 }}}");c("\\variation","{\\delta}");c("\\var","{\\delta}");c("\\functionalderivative","{\\frac{\\delta{ #1 }}{\\delta{ #2 }}}");c("\\fdv","{\\frac{\\delta{ #1 }}{\\delta{ #2 }}}");c("\\innerproduct","{\\left\\langle {#1} \\mid { #2} \\right\\rangle}");c("\\outerproduct","{\\left\\vert { #1 } \\right\\rangle\\left\\langle { #2} \\right\\vert}");c("\\dyad","{\\left\\vert { #1 } \\right\\rangle\\left\\langle { #2} \\right\\vert}");c("\\ketbra","{\\left\\vert { #1 } \\right\\rangle\\left\\langle { #2} \\right\\vert}");c("\\op","{\\left\\vert { #1 } \\right\\rangle\\left\\langle { #2} \\right\\vert}");c("\\expectationvalue","{\\left\\langle {#1 } \\right\\rangle}");c("\\expval","{\\left\\langle {#1 } \\right\\rangle}");c("\\ev","{\\left\\langle {#1 } \\right\\rangle}");c("\\matrixelement","{\\left\\langle{ #1 }\\right\\vert{ #2 }\\left\\vert{#3}\\right\\rangle}");c("\\matrixel","{\\left\\langle{ #1 }\\right\\vert{ #2 }\\left\\vert{#3}\\right\\rangle}");c("\\mel","{\\left\\langle{ #1 }\\right\\vert{ #2 }\\left\\vert{#3}\\right\\rangle}");function _t(e){let t=[];e.consumeSpaces();let r=e.fetch().text;for(r==="\\relax"&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);r==="\\hline"||r==="\\hdashline";)e.consume(),t.push(r==="\\hdashline"),e.consumeSpaces(),r=e.fetch().text;return t}var ke=e=>{if(!e.parser.settings.displayMode)throw new w(`{${e.envName}} can be used only in display mode.`)},pn=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/,or=e=>{let t=e.get("\\arraystretch");typeof t!="string"&&(t=He(t.tokens)),t=isNaN(t)?null:Number(t);let r=e.get("\\arraycolsep");typeof r!="string"&&(r=He(r.tokens));let o=pn.exec(r),s=o?{number:+(o[1]+o[2]),unit:o[3]}:null;return[t,s]},Tt=e=>{let t="";for(let r=0;r<e.length;r++)if(e[r].type==="label"){if(t)throw new w("Multiple \\labels in one row");t=e[r].string}return t};function ot(e){if(e.indexOf("ed")===-1)return e.indexOf("*")===-1}function re(e,{cols:t,envClasses:r,autoTag:o,singleRow:s,emptySingleRow:i,maxNumCols:l,leqno:u,arraystretch:h,arraycolsep:x},A){e.gullet.beginGroup(),s||e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();let q=[],b=[q],k=[],T=[],$=[],j=o!=null?[]:void 0;function G(){o&&e.gullet.macros.set("\\@eqnsw","1",!0)}function E(){j&&(e.gullet.macros.get("\\df@tag")?(j.push(e.subparse([new Z("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):j.push(!!o&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(G(),$.push(_t(e));;){let H=e.parseExpression(!1,s?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),H={type:"ordgroup",mode:e.mode,body:H,semisimple:!0},q.push(H);let J=e.fetch().text;if(J==="&"){if(l&&q.length===l)if(r.includes("array")){if(e.settings.strict)throw new w("Too few columns specified in the {array} column argument.",e.nextToken)}else throw l===2?new w("The split environment accepts no more than two columns",e.nextToken):new w("The equation environment accepts only one column",e.nextToken);e.consume()}else if(J==="\\end"){E(),q.length===1&&H.body.length===0&&(b.length>1||!i)&&b.pop(),T.push(Tt(H.body)),$.length<b.length+1&&$.push([]);break}else if(J==="\\\\"){e.consume();let le;e.gullet.future().text!==" "&&(le=e.parseSizeGroup(!0)),k.push(le?le.value:null),E(),T.push(Tt(H.body)),$.push(_t(e)),q=[],b.push(q),G()}else throw new w("Expected & or \\\\ or \\cr or \\end",e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,body:b,cols:t,rowGaps:k,hLinesBeforeRow:$,envClasses:r,autoTag:o,scriptLevel:A,tags:j,labels:T,leqno:u,arraystretch:h,arraycolsep:x}}function ar(e){return e.slice(0,1)==="d"?"display":"text"}var fn={c:"center ",l:"left ",r:"right "},Ct=e=>{let t=new p.MathNode("mtd",[]);return t.style={padding:"0",width:"50%"},e.envClasses.includes("multline")&&(t.style.width="7.5%"),t},Y=function(e,t){let r=[],o=e.body.length,s=e.hLinesBeforeRow;for(let u=0;u<o;u++){let h=e.body[u],x=[],A=e.scriptLevel==="text"?F.TEXT:e.scriptLevel==="script"?F.SCRIPT:F.DISPLAY;for(let T=0;T<h.length;T++){let $=new p.MathNode("mtd",[O(h[T],t.withLevel(A))]);if(e.envClasses.includes("multline")){let j=u===0?"left":u===o-1?"right":"center";$.setAttribute("columnalign",j),j!=="center"&&$.classes.push("tml-"+j)}x.push($)}let q=e.body[0].length;for(let T=0;T<q-h.length;T++)x.push(new p.MathNode("mtd",[],t));if(e.autoTag){let T=e.tags[u],$;T===!0?$=new p.MathNode("mtext",[new De(["tml-eqn"])]):T===!1?$=new p.MathNode("mtext",[],[]):($=te(T[0].body,t.withLevel(A),!0),$=Ee($),$.classes=["tml-tag"]),$&&(x.unshift(Ct(e)),x.push(Ct(e)),e.leqno?(x[0].children.push($),x[0].classes.push("tml-left")):(x[x.length-1].children.push($),x[x.length-1].classes.push("tml-right")))}let b=new p.MathNode("mtr",x,[]),k=e.labels.shift();k&&e.tags&&e.tags[u]&&(b.setAttribute("id",k),Array.isArray(e.tags[u])&&b.classes.push("tml-tageqn")),u===0&&s[0].length>0&&(s[0].length===2?b.children.forEach(T=>{T.style.borderTop="0.15em double"}):b.children.forEach(T=>{T.style.borderTop=s[0][0]?"0.06em dashed":"0.06em solid"})),s[u+1].length>0&&(s[u+1].length===2?b.children.forEach(T=>{T.style.borderBottom="0.15em double"}):b.children.forEach(T=>{T.style.borderBottom=s[u+1][0]?"0.06em dashed":"0.06em solid"})),r.push(b)}if(e.envClasses.length>0){if(e.arraystretch&&e.arraystretch!==1){let b=String(1.4*e.arraystretch-.8)+"ex";for(let k=0;k<r.length;k++)for(let T=0;T<r[k].children.length;T++)r[k].children[T].style.paddingTop=b,r[k].children[T].style.paddingBottom=b}let u=e.envClasses.includes("abut")||e.envClasses.includes("cases")?"0":e.envClasses.includes("small")?"0.1389":e.envClasses.includes("cd")?"0.25":"0.4",h="em";if(e.arraycolsep){let b=K(e.arraycolsep,t);u=b.number.toFixed(4),h=b.unit}let x=r.length===0?0:r[0].children.length,A=(b,k)=>b===0&&k===0||b===x-1&&k===1?"0":e.envClasses[0]!=="align"?u:k===1?"0":e.autoTag?b%2?"1":"0":b%2?"0":"1";for(let b=0;b<r.length;b++)for(let k=0;k<r[b].children.length;k++)r[b].children[k].style.paddingLeft=`${A(k,0)}${h}`,r[b].children[k].style.paddingRight=`${A(k,1)}${h}`;let q=e.envClasses.includes("align")||e.envClasses.includes("alignat");for(let b=0;b<r.length;b++){let k=r[b];if(q){for(let T=0;T<k.children.length;T++)k.children[T].classes=["tml-"+(T%2?"left":"right")];if(e.autoTag){let T=e.leqno?0:k.children.length-1;k.children[T].classes=["tml-"+(e.leqno?"left":"right")]}}if(k.children.length>1&&e.envClasses.includes("cases")&&(k.children[1].style.paddingLeft="1em"),e.envClasses.includes("cases")||e.envClasses.includes("subarray"))for(let T of k.children)T.classes.push("tml-left")}}else for(let u=0;u<r.length;u++)r[u].children[0].style.paddingLeft="0em",r[u].children.length===r[0].children.length&&(r[u].children[r[u].children.length-1].style.paddingRight="0em");let i=new p.MathNode("mtable",r);e.envClasses.length>0&&(e.envClasses.includes("jot")?i.classes.push("tml-jot"):e.envClasses.includes("small")&&i.classes.push("tml-small")),e.scriptLevel==="display"&&i.setAttribute("displaystyle","true"),(e.autoTag||e.envClasses.includes("multline"))&&(i.style.width="100%");let l="";if(e.cols&&e.cols.length>0){let u=e.cols,h=!1,x=0,A=u.length;for(;u[x].type==="separator";)x+=1;for(;u[A-1].type==="separator";)A-=1;if(u[0].type==="separator"){let b=u[1].type==="separator"?"0.15em double":u[0].separator==="|"?"0.06em solid ":"0.06em dashed ";for(let k of i.children)k.children[0].style.borderLeft=b}let q=e.autoTag?0:-1;for(let b=x;b<A;b++)if(u[b].type==="align"){let k=fn[u[b].align];l+=k,q+=1;for(let T of i.children)k.trim()!=="center"&&q<T.children.length&&(T.children[q].classes=["tml-"+k.trim()]);h=!0}else if(u[b].type==="separator"){if(h){let k=u[b+1].type==="separator"?"0.15em double":u[b].separator==="|"?"0.06em solid":"0.06em dashed";for(let T of i.children)q<T.children.length&&(T.children[q].style.borderRight=k)}h=!1}if(u[u.length-1].type==="separator"){let b=u[u.length-2].type==="separator"?"0.15em double":u[u.length-1].separator==="|"?"0.06em solid":"0.06em dashed";for(let k of i.children)k.children[k.children.length-1].style.borderRight=b,k.children[k.children.length-1].style.paddingRight="0.4em"}}return e.autoTag&&(l="left "+(l.length>0?l:"center ")+"right "),l&&i.setAttribute("columnalign",l.trim()),e.envClasses.includes("small")&&(i=new p.MathNode("mstyle",[i]),i.setAttribute("scriptlevel","1")),i},sr=function(e,t){e.envName.indexOf("ed")===-1&&ke(e);let r=e.envName==="split",o=[],s=re(e.parser,{cols:o,emptySingleRow:!0,autoTag:r?void 0:ot(e.envName),envClasses:["abut","jot"],maxNumCols:e.envName==="split"?2:void 0,leqno:e.parser.settings.leqno},"display"),i,l=0,u=e.envName.indexOf("at")>-1;if(t[0]&&u){let h="";for(let x=0;x<t[0].body.length;x++){let A=C(t[0].body[x],"textord");h+=A.text}if(isNaN(h))throw new w("The alignat enviroment requires a numeric first argument.");i=Number(h),l=i*2}s.body.forEach(function(h){if(u){let x=h.length/2;if(i<x)throw new w(`Too many math in a row: expected ${i}, but got ${x}`,h[0])}else l<h.length&&(l=h.length)});for(let h=0;h<l;++h){let x="r";h%2===1&&(x="l"),o[h]={type:"align",align:x}}return e.envName==="split"||(u?s.envClasses.push("alignat"):s.envClasses[0]="align"),s};X({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){let s=(ze(t[0])?[t[0]]:C(t[0],"ordgroup").body).map(function(h){let A=et(h).text;if("lcr".indexOf(A)!==-1)return{type:"align",align:A};if(A==="|")return{type:"separator",separator:"|"};if(A===":")return{type:"separator",separator:":"};throw new w("Unknown column alignment: "+A,h)}),[i,l]=or(e.parser.gullet.macros),u={cols:s,envClasses:["array"],maxNumCols:s.length,arraystretch:i,arraycolsep:l};return re(e.parser,u,ar(e.envName))},mathmlBuilder:Y});X({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){let t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",o={envClasses:[],cols:[]};if(e.envName.charAt(e.envName.length-1)==="*"){let u=e.parser;if(u.consumeSpaces(),u.fetch().text==="["){if(u.consume(),u.consumeSpaces(),r=u.fetch().text,"lcr".indexOf(r)===-1)throw new w("Expected l or c or r",u.nextToken);u.consume(),u.consumeSpaces(),u.expect("]"),u.consume(),o.cols=[]}}let s=re(e.parser,o,"text");s.cols=new Array(s.body[0].length).fill({type:"align",align:r});let[i,l]=or(e.parser.gullet.macros);return t?{type:"leftright",mode:e.mode,body:[s],left:t[0],right:t[1],rightColor:void 0,arraystretch:i,arraycolsep:l}:s},mathmlBuilder:Y});X({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){let t={type:"small"},r=re(e.parser,t,"script");return r.envClasses=["small"],r},mathmlBuilder:Y});X({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){let s=(ze(t[0])?[t[0]]:C(t[0],"ordgroup").body).map(function(l){let h=et(l).text;if("lc".indexOf(h)!==-1)return{type:"align",align:h};throw new w("Unknown column alignment: "+h,l)});if(s.length>1)throw new w("{subarray} can contain only one column");let i={cols:s,envClasses:["small"]};if(i=re(e.parser,i,"script"),i.body.length>0&&i.body[0].length>1)throw new w("{subarray} can contain only one column");return i},mathmlBuilder:Y});X({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){let t={cols:[],envClasses:["cases"]},r=re(e.parser,t,ar(e.envName));return{type:"leftright",mode:e.mode,body:[r],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},mathmlBuilder:Y});X({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:sr,mathmlBuilder:Y});X({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:sr,mathmlBuilder:Y});X({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){e.envName!=="gathered"&&ke(e);let t={cols:[],envClasses:["abut","jot"],autoTag:ot(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return re(e.parser,t,"display")},mathmlBuilder:Y});X({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){ke(e);let t={autoTag:ot(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,envClasses:["align"],leqno:e.parser.settings.leqno};return re(e.parser,t,"display")},mathmlBuilder:Y});X({type:"array",names:["multline","multline*"],props:{numArgs:0},handler(e){ke(e);let t={autoTag:e.envName==="multline",maxNumCols:1,envClasses:["jot","multline"],leqno:e.parser.settings.leqno};return re(e.parser,t,"display")},mathmlBuilder:Y});X({type:"array",names:["CD"],props:{numArgs:0},handler(e){return ke(e),rn(e.parser)},mathmlBuilder:Y});S({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new w(`${e.funcName} valid only within array environment`)}});var Dt=Qt;S({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler({parser:e,funcName:t},r){let o=r[0];if(o.type!=="ordgroup")throw new w("Invalid environment name",o);let s="";for(let i=0;i<o.body.length;++i)s+=C(o.body[i],"textord").text;if(t==="\\begin"){if(!Object.prototype.hasOwnProperty.call(Dt,s))throw new w("No such environment: "+s,o);let i=Dt[s],{args:l,optArgs:u}=e.parseArguments("\\begin{"+s+"}",i),h={mode:e.mode,envName:s,parser:e},x=i.handler(h,l,u);e.expect("\\end",!1);let A=e.nextToken,q=C(e.parseFunction(),"environment");if(q.name!==s)throw new w(`Mismatch: \\begin{${s}} matched by \\end{${q.name}}`,A);return x}return{type:"environment",mode:e.mode,name:s,nameGroup:o}}});S({type:"envTag",names:["\\env@tag"],props:{numArgs:1,argTypes:["math"]},handler({parser:e},t){return{type:"envTag",mode:e.mode,body:t[0]}},mathmlBuilder(e,t){return new p.MathNode("mrow")}});S({type:"noTag",names:["\\env@notag"],props:{numArgs:0},handler({parser:e}){return{type:"noTag",mode:e.mode}},mathmlBuilder(e,t){return new p.MathNode("mrow")}});var gn=(e,t)=>{if(t!=="mathrm"||e.body.type!=="ordgroup"||e.body.body.length===1||e.body.body[0].type!=="mathord")return!1;for(let r=1;r<e.body.body.length;r++){let o=e.body.body[r].type;if(!(o==="mathord"||o==="textord"&&!isNaN(e.body.body[r].text)))return!1}return!0},ir=(e,t)=>{let r=e.font,o=t.withFont(r),s=O(e.body,o);if(s.children.length===0)return s;if(r==="boldsymbol"&&["mo","mpadded","mrow"].includes(s.type))return s.style.fontWeight="bold",s;if(gn(e,r)){let u=s.children[0].children[0];delete u.attributes.mathvariant;for(let x=1;x<s.children.length;x++)u.children[0].text+=s.children[x].type==="mn"?s.children[x].children[0].text:s.children[x].children[0].children[0].text;let h=new p.MathNode("mtext",new p.TextNode("\u200B"));return new p.MathNode("mrow",[h,u])}let i=s.children[0].type==="mo";for(let u=1;u<s.children.length;u++)s.children[u].type==="mo"&&r==="boldsymbol"&&(s.children[u].style.fontWeight="bold"),s.children[u].type!=="mi"&&(i=!1),(s.children[u].attributes&&s.children[u].attributes.mathvariant||"")!=="normal"&&(i=!1);if(!i)return s;let l=s.children[0];for(let u=1;u<s.children.length;u++)l.children.push(s.children[u].children[0]);if(l.attributes.mathvariant&&l.attributes.mathvariant==="normal"){let u=new p.MathNode("mtext",new p.TextNode("\u200B"));return new p.MathNode("mrow",[u,l])}return l},Bt={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};S({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\up@greek","\\boldsymbol","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathsfit","\\mathtt","\\Bbb","\\bm","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:({parser:e,funcName:t},r)=>{let o=fe(r[0]),s=t;return s in Bt&&(s=Bt[s]),{type:"font",mode:e.mode,font:s.slice(1),body:o}},mathmlBuilder:ir});S({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:({parser:e,funcName:t,breakOnTokenText:r},o)=>{let{mode:s}=e,i=e.parseExpression(!0,r,!0),l=`math${t.slice(1)}`;return{type:"font",mode:s,font:l,body:{type:"ordgroup",mode:e.mode,body:i}}},mathmlBuilder:ir});var Nt=["display","text","script","scriptscript"],bn={auto:-1,display:0,text:0,script:1,scriptscript:2},at=(e,t)=>{let r=e.scriptLevel==="auto"?t.incrementLevel():e.scriptLevel==="display"?t.withLevel(F.TEXT):e.scriptLevel==="text"?t.withLevel(F.SCRIPT):t.withLevel(F.SCRIPTSCRIPT),o=O(e.numer,r),s=O(e.denom,r);t.level===3&&(o.style.mathDepth="2",o.setAttribute("scriptlevel","2"),s.style.mathDepth="2",s.setAttribute("scriptlevel","2"));let i=new p.MathNode("mfrac",[o,s]);if(!e.hasBarLine)i.setAttribute("linethickness","0px");else if(e.barSize){let l=K(e.barSize,t);i.setAttribute("linethickness",l.number+l.unit)}if(e.leftDelim!=null||e.rightDelim!=null){let l=[];if(e.leftDelim!=null){let u=new p.MathNode("mo",[new p.TextNode(e.leftDelim.replace("\\",""))]);u.setAttribute("fence","true"),l.push(u)}if(l.push(i),e.rightDelim!=null){let u=new p.MathNode("mo",[new p.TextNode(e.rightDelim.replace("\\",""))]);u.setAttribute("fence","true"),l.push(u)}i=Qe(l)}return e.scriptLevel!=="auto"&&(i=new p.MathNode("mstyle",[i]),i.setAttribute("displaystyle",String(e.scriptLevel==="display")),i.setAttribute("scriptlevel",bn[e.scriptLevel])),i};S({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:({parser:e,funcName:t},r)=>{let o=r[0],s=r[1],i=!1,l=null,u=null,h="auto";switch(t){case"\\dfrac":case"\\frac":case"\\tfrac":i=!0;break;case"\\\\atopfrac":i=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":l="(",u=")";break;case"\\\\bracefrac":l="\\{",u="\\}";break;case"\\\\brackfrac":l="[",u="]";break;default:throw new Error("Unrecognized genfrac command")}switch(t){case"\\dfrac":case"\\dbinom":h="display";break;case"\\tfrac":case"\\tbinom":h="text";break}return{type:"genfrac",mode:e.mode,continued:!1,numer:o,denom:s,hasBarLine:i,leftDelim:l,rightDelim:u,scriptLevel:h,barSize:null}},mathmlBuilder:at});S({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:({parser:e,funcName:t},r)=>{let o=r[0],s=r[1];return{type:"genfrac",mode:e.mode,continued:!0,numer:o,denom:s,hasBarLine:!0,leftDelim:null,rightDelim:null,scriptLevel:"display",barSize:null}}});S({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler({parser:e,funcName:t,token:r}){let o;switch(t){case"\\over":o="\\frac";break;case"\\choose":o="\\binom";break;case"\\atop":o="\\\\atopfrac";break;case"\\brace":o="\\\\bracefrac";break;case"\\brack":o="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:o,token:r}}});var Ot=function(e){let t=null;return e.length>0&&(t=e,t=t==="."?null:t),t};S({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler({parser:e},t){let r=t[4],o=t[5],s=fe(t[0]),i=s.type==="atom"&&s.family==="open"?Ot(s.text):null,l=fe(t[1]),u=l.type==="atom"&&l.family==="close"?Ot(l.text):null,h=C(t[2],"size"),x,A=null;h.isBlank?x=!0:(A=h.value,x=A.number>0);let q="auto",b=t[3];if(b.type==="ordgroup"){if(b.body.length>0){let k=C(b.body[0],"textord");q=Nt[Number(k.text)]}}else b=C(b,"textord"),q=Nt[Number(b.text)];return{type:"genfrac",mode:e.mode,numer:r,denom:o,continued:!1,hasBarLine:x,barSize:A,leftDelim:i,rightDelim:u,scriptLevel:q}},mathmlBuilder:at});S({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler({parser:e,funcName:t,token:r},o){return{type:"infix",mode:e.mode,replaceWith:"\\\\abovefrac",barSize:C(o[0],"size").value,token:r}}});S({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:({parser:e,funcName:t},r)=>{let o=r[0],s=_r(C(r[1],"infix").barSize),i=r[2],l=s.number>0;return{type:"genfrac",mode:e.mode,numer:o,denom:i,continued:!1,hasBarLine:l,barSize:s,leftDelim:null,rightDelim:null,scriptLevel:"auto"}},mathmlBuilder:at});S({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["hbox"],allowedInArgument:!0,allowedInText:!1},handler({parser:e},t){return{type:"hbox",mode:e.mode,body:z(t[0])}},mathmlBuilder(e,t){let r=t.withLevel(F.TEXT),o=te(e.body,r);return Ee(o)}});var xn=(e,t)=>{let r=Me.mathMLnode(e.label);return r.style["math-depth"]=0,new p.MathNode(e.isOver?"mover":"munder",[O(e.base,t),r])};S({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler({parser:e,funcName:t},r){return{type:"horizBrace",mode:e.mode,label:t,isOver:/^\\over/.test(t),base:r[0]}},mathmlBuilder:xn});S({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:({parser:e,token:t},r)=>{let o=r[1],s=C(r[0],"url").url;if(!e.settings.isTrusted({command:"\\href",url:s}))throw new w('Function "\\href" is not trusted',t);return{type:"href",mode:e.mode,href:s,body:z(o)}},mathmlBuilder:(e,t)=>{let r=new R("math",[te(e.body,t)]);return new be(e.href,[],[r])}});S({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:({parser:e,token:t},r)=>{let o=C(r[0],"url").url;if(!e.settings.isTrusted({command:"\\url",url:o}))throw new w('Function "\\url" is not trusted',t);let s=[];for(let l=0;l<o.length;l++){let u=o[l];u==="~"&&(u="\\textasciitilde"),s.push({type:"textord",mode:"text",text:u})}let i={type:"text",mode:e.mode,font:"\\texttt",body:s};return{type:"href",mode:e.mode,href:o,body:z(i)}}});S({type:"html",names:["\\class","\\id","\\style","\\data"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:({parser:e,funcName:t,token:r},o)=>{let s=C(o[0],"raw").string,i=o[1];if(e.settings.strict)throw new w(`Function "${t}" is disabled in strict mode`,r);let l,u={};switch(t){case"\\class":u.class=s,l={command:"\\class",class:s};break;case"\\id":u.id=s,l={command:"\\id",id:s};break;case"\\style":u.style=s,l={command:"\\style",style:s};break;case"\\data":{let h=s.split(",");for(let x=0;x<h.length;x++){let A=h[x].split("=");if(A.length!==2)throw new w("Error parsing key-value for \\data");u["data-"+A[0].trim()]=A[1].trim()}l={command:"\\data",attributes:u};break}default:throw new Error("Unrecognized html command")}if(!e.settings.isTrusted(l))throw new w(`Function "${t}" is not trusted`,r);return{type:"html",mode:e.mode,attributes:u,body:z(i)}},mathmlBuilder:(e,t)=>{let r=te(e.body,t),o=[];e.attributes.class&&o.push(...e.attributes.class.trim().split(/\s+/)),r.classes=o;for(let s in e.attributes)s!=="class"&&Object.prototype.hasOwnProperty.call(e.attributes,s)&&r.setAttribute(s,e.attributes[s]);return r}});var Pe=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};{let t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new w("Invalid size: '"+e+"' in \\includegraphics");let r={number:+(t[1]+t[2]),unit:t[3]};if(!Zt(r))throw new w("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r}};S({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:({parser:e,token:t},r,o)=>{let s={number:0,unit:"em"},i={number:.9,unit:"em"},l={number:0,unit:"em"},u="";if(o[0]){let A=C(o[0],"raw").string.split(",");for(let q=0;q<A.length;q++){let b=A[q].split("=");if(b.length===2){let k=b[1].trim();switch(b[0].trim()){case"alt":u=k;break;case"width":s=Pe(k);break;case"height":i=Pe(k);break;case"totalheight":l=Pe(k);break;default:throw new w("Invalid key: '"+b[0]+"' in \\includegraphics.")}}}}let h=C(r[0],"url").url;if(u===""&&(u=h,u=u.replace(/^.*[\\/]/,""),u=u.substring(0,u.lastIndexOf("."))),!e.settings.isTrusted({command:"\\includegraphics",url:h}))throw new w('Function "\\includegraphics" is not trusted',t);return{type:"includegraphics",mode:e.mode,alt:u,width:s,height:i,totalheight:l,src:h}},mathmlBuilder:(e,t)=>{let r=K(e.height,t),o={number:0,unit:"em"};e.totalheight.number>0&&e.totalheight.unit===r.unit&&e.totalheight.number>r.number&&(o.number=e.totalheight.number-r.number,o.unit=r.unit);let s=0;e.width.number>0&&(s=K(e.width,t));let i={height:r.number+o.number+"em"};s.number>0&&(i.width=s.number+s.unit),o.number>0&&(i.verticalAlign=-o.number+o.unit);let l=new Re(e.src,e.alt,i);return l.height=r,l.depth=o,new p.MathNode("mtext",[l])}});S({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler({parser:e,funcName:t,token:r},o){let s=C(o[0],"size");if(e.settings.strict){let i=t[1]==="m",l=s.value.unit==="mu";if(i){if(!l)throw new w(`LaTeX's ${t} supports only mu units, not ${s.value.unit} units`,r);if(e.mode!=="math")throw new w(`LaTeX's ${t} works only in math mode`,r)}else if(l)throw new w(`LaTeX's ${t} doesn't support mu units`,r)}return{type:"kern",mode:e.mode,dimension:s.value}},mathmlBuilder(e,t){let r=K(e.dimension,t),o=r.unit==="em"?lr(r.number):"";if(e.mode==="text"&&o.length>0){let s=new p.TextNode(o);return new p.MathNode("mtext",[s])}else{let s=new p.MathNode("mspace");return s.setAttribute("width",r.number+r.unit),r.number<0&&(s.style.marginLeft=r.number+r.unit),s}}});var lr=function(e){return e>=.05555&&e<=.05556?"\u200A":e>=.1666&&e<=.1667?"\u2009":e>=.2222&&e<=.2223?"\u2005":e>=.2777&&e<=.2778?"\u2005\u200A":""},ur=/[^A-Za-z_0-9-]/g;S({type:"label",names:["\\label"],props:{numArgs:1,argTypes:["raw"]},handler({parser:e},t){return{type:"label",mode:e.mode,string:t[0].string.replace(ur,"")}},mathmlBuilder(e,t){let r=new p.MathNode("mrow",[],["tml-label"]);return e.string.length>0&&r.setLabel(e.string),r}});var yn=["\\clap","\\llap","\\rlap"];S({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap","\\clap","\\llap","\\rlap"],props:{numArgs:1,allowedInText:!0},handler:({parser:e,funcName:t,token:r},o)=>{if(yn.includes(t)){if(e.settings.strict&&e.mode!=="text")throw new w(`{${t}} can be used only in text mode.
 Try \\math${t.slice(1)}`,r);t=t.slice(1)}else t=t.slice(5);let s=o[0];return{type:"lap",mode:e.mode,alignment:t,body:s}},mathmlBuilder:(e,t)=>{let r;if(e.alignment==="llap"){let i=U(z(e.body),t),l=new p.MathNode("mphantom",i);r=new p.MathNode("mpadded",[l]),r.setAttribute("width","0px")}let o=O(e.body,t),s;if(e.alignment==="llap"?(o.style.position="absolute",o.style.right="0",o.style.bottom="0",s=new p.MathNode("mpadded",[r,o])):s=new p.MathNode("mpadded",[o]),e.alignment==="rlap")e.body.body.length>0&&e.body.body[0].type==="genfrac"&&s.setAttribute("lspace","0.16667em");else{let i=e.alignment==="llap"?"-1":"-0.5";s.setAttribute("lspace",i+"width"),e.alignment==="llap"?s.style.position="relative":(s.style.display="flex",s.style.justifyContent="center")}return s.setAttribute("width","0px"),s}});S({type:"ordgroup",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler({funcName:e,parser:t},r){let o=t.mode;t.switchMode("math");let s=e==="\\("?"\\)":"$",i=t.parseExpression(!1,s);return t.expect(s),t.switchMode(o),{type:"ordgroup",mode:t.mode,body:i}}});S({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new w(`Mismatched ${e.funcName}`,t)}});var wn=(e,t)=>{switch(t.level){case F.DISPLAY:return e.display;case F.TEXT:return e.text;case F.SCRIPT:return e.script;case F.SCRIPTSCRIPT:return e.scriptscript;default:return e.text}};S({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:({parser:e},t)=>({type:"mathchoice",mode:e.mode,display:z(t[0]),text:z(t[1]),script:z(t[2]),scriptscript:z(t[3])}),mathmlBuilder:(e,t)=>{let r=wn(e,t);return te(r,t)}});var vn=["text","textord","mathord","atom"],ne=e=>{let t=new p.MathNode("mspace");return t.setAttribute("width",e+"em"),t};function cr(e,t){let r,o=U(e.body,t);if(e.mclass==="minner")r=new p.MathNode("mpadded",o);else if(e.mclass==="mord")e.isCharacterBox||o[0].type==="mathord"?(r=o[0],r.type="mi",r.children.length===1&&r.children[0].text&&r.children[0].text==="\u2207"&&r.setAttribute("mathvariant","normal")):r=new p.MathNode("mi",o);else{r=new p.MathNode("mrow",o),e.mustPromote?(r=o[0],r.type="mo",e.isCharacterBox&&e.body[0].text&&/[A-Za-z]/.test(e.body[0].text)&&r.setAttribute("mathvariant","italic")):r=new p.MathNode("mrow",o);let s=t.level<2;r.type==="mrow"?s&&(e.mclass==="mbin"?(r.children.unshift(ne(.2222)),r.children.push(ne(.2222))):e.mclass==="mrel"?(r.children.unshift(ne(.2778)),r.children.push(ne(.2778))):e.mclass==="mpunct"?r.children.push(ne(.1667)):e.mclass==="minner"&&(r.children.unshift(ne(.0556)),r.children.push(ne(.0556)))):e.mclass==="mbin"?(r.attributes.lspace=s?"0.2222em":"0",r.attributes.rspace=s?"0.2222em":"0"):e.mclass==="mrel"?(r.attributes.lspace=s?"0.2778em":"0",r.attributes.rspace=s?"0.2778em":"0"):e.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace=s?"0.1667em":"0"):e.mclass==="mopen"||e.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):e.mclass==="minner"&&s&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em"),e.mclass==="mopen"||e.mclass==="mclose"||(delete r.attributes.stretchy,delete r.attributes.form)}return r}S({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler({parser:e,funcName:t},r){let o=r[0],s=N.isCharacterBox(o),i=!0,l={type:"mathord",text:"",mode:e.mode},u=o.body?o.body:[o];for(let h of u)if(vn.includes(h.type))I[e.mode][h.text]?l.text+=I[e.mode][h.text].replace:h.text?l.text+=h.text:h.body&&h.body.map(x=>{l.text+=x.text});else{i=!1;break}return{type:"mclass",mode:e.mode,mclass:"m"+t.slice(5),body:z(i?l:o),isCharacterBox:s,mustPromote:i}},mathmlBuilder:cr});var kn=e=>{let t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};S({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler({parser:e},t){return{type:"mclass",mode:e.mode,mclass:kn(t[0]),body:z(t[1]),isCharacterBox:N.isCharacterBox(t[1])}}});S({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler({parser:e,funcName:t},r){let o=r[1],s=r[0],i={type:"op",mode:o.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,stack:!0,suppressBaseShift:t!=="\\stackrel",body:z(o)};return{type:"supsub",mode:s.mode,base:i,sup:t==="\\underset"?null:s,sub:t==="\\underset"?s:null}},mathmlBuilder:cr});var _e=(e,t,r)=>{if(!e)return r;let o=O(e,t);return o.type==="mrow"&&o.children.length===0?r:o};S({type:"multiscript",names:["\\sideset","\\pres@cript"],props:{numArgs:3},handler({parser:e,funcName:t,token:r},o){if(o[2].body.length===0)throw new w(t+"cannot parse an empty base.");let s=o[2].body[0];if(e.settings.strict&&t==="\\sideset"&&!s.symbol)throw new w("The base of \\sideset must be a big operator. Try \\prescript.");if(o[0].body.length>0&&o[0].body[0].type!=="supsub"||o[1].body.length>0&&o[1].body[0].type!=="supsub")throw new w("\\sideset can parse only subscripts and superscripts in its first two arguments",r);let i=o[0].body.length>0?o[0].body[0]:null,l=o[1].body.length>0?o[1].body[0]:null;return!i&&!l?s:i?{type:"multiscript",mode:e.mode,isSideset:t==="\\sideset",prescripts:i,postscripts:l,base:s}:{type:"styling",mode:e.mode,scriptLevel:"text",body:[{type:"supsub",mode:e.mode,base:s,sup:l.sup,sub:l.sub}]}},mathmlBuilder(e,t){let r=O(e.base,t),o=new p.MathNode("mprescripts"),s=new p.MathNode("none"),i=[],l=_e(e.prescripts.sub,t,s),u=_e(e.prescripts.sup,t,s);if(e.isSideset&&(l.setAttribute("style","text-align: left;"),u.setAttribute("style","text-align: left;")),e.postscripts){let h=_e(e.postscripts.sub,t,s),x=_e(e.postscripts.sup,t,s);i=[r,h,x,o,l,u]}else i=[r,o,l,u];return new p.MathNode("mmultiscripts",i)}});S({type:"not",names:["\\not"],props:{numArgs:1,primitive:!0,allowedInText:!1},handler({parser:e},t){let r=N.isCharacterBox(t[0]),o;return r?(o=z(t[0]),o[0].text.charAt(0)==="\\"&&(o[0].text=I.math[o[0].text].replace),o[0].text=o[0].text.slice(0,1)+"\u0338"+o[0].text.slice(1)):o=[{type:"textord",mode:"math",text:"\u0338"},{type:"kern",mode:"math",dimension:{number:-.6,unit:"em"}},t[0]],{type:"not",mode:e.mode,body:o,isCharacterBox:r}},mathmlBuilder(e,t){return e.isCharacterBox?U(e.body,t,!0)[0]:te(e.body,t)}});var An=["textord","mathord","atom"],Sn=["\\smallint"],st=["textord","mathord","ordgroup","close","leftright","font"],$t=e=>{e.attributes.lspace="0.1667em",e.attributes.rspace="0.1667em"},Ae=(e,t)=>{let r;if(e.symbol)r=new R("mo",[W(e.name,e.mode)]),Sn.includes(e.name)?r.setAttribute("largeop","false"):r.setAttribute("movablelimits","false"),e.fromMathOp&&$t(r);else if(e.body)r=new R("mo",U(e.body,t)),e.fromMathOp&&$t(r);else if(r=new R("mi",[new ae(e.name.slice(1))]),!e.parentIsSupSub){let o=new R("mo",[W("\u2061","text")]),s=[r,o];if(e.needsLeadingSpace){let i=new R("mspace");i.setAttribute("width","0.1667em"),s.unshift(i)}if(!e.isFollowedByDelimiter){let i=new R("mspace");i.setAttribute("width","0.1667em"),s.push(i)}r=new R("mrow",s)}return r},qn={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A05":"\\bigsqcap","\u2A06":"\\bigsqcup","\u2A03":"\\bigcupdot","\u2A07":"\\bigdoublevee","\u2A08":"\\bigdoublewedge","\u2A09":"\\bigtimes"};S({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcupplus","\\bigcupdot","\\bigcap","\\bigcup","\\bigdoublevee","\\bigdoublewedge","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcap","\\bigsqcup","\\bigtimes","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:({parser:e,funcName:t},r)=>{let o=t;return o.length===1&&(o=qn[o]),{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!0,stack:!1,name:o}},mathmlBuilder:Ae});S({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:({parser:e},t)=>{let r=t[0],o=r.body?r.body:[r],s=o.length===1&&An.includes(o[0].type);return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:s,fromMathOp:!0,stack:!1,name:s?o[0].text:null,body:s?null:z(r)}},mathmlBuilder:Ae});var _n={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint","\u2231":"\\intclockwise","\u2232":"\\varointclockwise","\u2A0C":"\\iiiint","\u2A0D":"\\intbar","\u2A0E":"\\intBar","\u2A0F":"\\fint","\u2A12":"\\rppolint","\u2A13":"\\scpolint","\u2A15":"\\pointint","\u2A16":"\\sqint","\u2A17":"\\intlarhk","\u2A18":"\\intx","\u2A19":"\\intcap","\u2A1A":"\\intcup"};S({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\sgn","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler({parser:e,funcName:t}){let r=e.prevAtomType,o=e.gullet.future().text;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,stack:!1,isFollowedByDelimiter:Le(o),needsLeadingSpace:r.length>0&&st.includes(r),name:t}},mathmlBuilder:Ae});S({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler({parser:e,funcName:t}){let r=e.prevAtomType,o=e.gullet.future().text;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,stack:!1,isFollowedByDelimiter:Le(o),needsLeadingSpace:r.length>0&&st.includes(r),name:t}},mathmlBuilder:Ae});S({type:"op",names:["\\int","\\iint","\\iiint","\\iiiint","\\oint","\\oiint","\\oiiint","\\intclockwise","\\varointclockwise","\\intbar","\\intBar","\\fint","\\rppolint","\\scpolint","\\pointint","\\sqint","\\intlarhk","\\intx","\\intcap","\\intcup","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230","\u2231","\u2232","\u2A0C","\u2A0D","\u2A0E","\u2A0F","\u2A12","\u2A13","\u2A15","\u2A16","\u2A17","\u2A18","\u2A19","\u2A1A"],props:{numArgs:0},handler({parser:e,funcName:t}){let r=t;return r.length===1&&(r=_n[r]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,stack:!1,name:r}},mathmlBuilder:Ae});var Tn=(e,t)=>{let r=U(e.body,t.withFont("mathrm")),o=!0;for(let i=0;i<r.length;i++){let l=r[i];if(l instanceof p.MathNode)switch(l.type==="mrow"&&l.children.length===1&&l.children[0]instanceof p.MathNode&&(l=l.children[0]),l.type){case"mi":case"mn":case"ms":case"mtext":break;case"mspace":if(l.attributes.width){let u=l.attributes.width.replace("em",""),h=lr(Number(u));h===""?o=!1:r[i]=new p.MathNode("mtext",[new p.TextNode(h)])}break;case"mo":{let u=l.children[0];l.children.length===1&&u instanceof p.TextNode?u.text=u.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):o=!1;break}default:o=!1}else o=!1}if(o){let i=r.map(l=>l.toText()).join("");r=[new p.TextNode(i)]}else if(r.length===1&&["mover","munder"].includes(r[0].type)&&(r[0].children[0].type==="mi"||r[0].children[0].type==="mtext")){if(r[0].children[0].type="mi",e.parentIsSupSub)return new p.MathNode("mrow",r);{let i=new p.MathNode("mo",[W("\u2061","text")]);return p.newDocumentFragment([r[0],i])}}let s;if(o?(s=new p.MathNode("mi",r),r[0].text.length===1&&s.setAttribute("mathvariant","normal")):s=new p.MathNode("mrow",r),!e.parentIsSupSub){let i=new p.MathNode("mo",[W("\u2061","text")]),l=[s,i];if(e.needsLeadingSpace){let u=new p.MathNode("mspace");u.setAttribute("width","0.1667em"),l.unshift(u)}if(!e.isFollowedByDelimiter){let u=new p.MathNode("mspace");u.setAttribute("width","0.1667em"),l.push(u)}return p.newDocumentFragment(l)}return s};S({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1,allowedInArgument:!0},handler:({parser:e,funcName:t},r)=>{let o=r[0],s=e.prevAtomType,i=e.gullet.future().text;return{type:"operatorname",mode:e.mode,body:z(o),alwaysHandleSupSub:t==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1,isFollowedByDelimiter:Le(i),needsLeadingSpace:s.length>0&&st.includes(s)}},mathmlBuilder:Tn});c("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");se({type:"ordgroup",mathmlBuilder(e,t){return te(e.body,t,e.semisimple)}});S({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:({parser:e},t)=>{let r=t[0];return{type:"phantom",mode:e.mode,body:z(r)}},mathmlBuilder:(e,t)=>{let r=U(e.body,t);return new p.MathNode("mphantom",r)}});S({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:({parser:e},t)=>{let r=t[0];return{type:"hphantom",mode:e.mode,body:r}},mathmlBuilder:(e,t)=>{let r=U(z(e.body),t),o=new p.MathNode("mphantom",r),s=new p.MathNode("mpadded",[o]);return s.setAttribute("height","0px"),s.setAttribute("depth","0px"),s}});S({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:({parser:e},t)=>{let r=t[0];return{type:"vphantom",mode:e.mode,body:r}},mathmlBuilder:(e,t)=>{let r=U(z(e.body),t),o=new p.MathNode("mphantom",r),s=new p.MathNode("mpadded",[o]);return s.setAttribute("width","0px"),s}});S({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler({parser:e},t){return{type:"pmb",mode:e.mode,body:z(t[0])}},mathmlBuilder(e,t){let r=U(e.body,t),o=Je(r);return o.setAttribute("style","font-weight:bold"),o}});var dr=(e,t)=>{let r=t.withLevel(F.TEXT),o=new p.MathNode("mpadded",[O(e.body,r)]),s=K(e.dy,t);return o.setAttribute("voffset",s.number+s.unit),s.number>0?o.style.padding=s.number+s.unit+" 0 0 0":o.style.padding="0 0 "+Math.abs(s.number)+s.unit+" 0",o};S({type:"raise",names:["\\raise","\\lower"],props:{numArgs:2,argTypes:["size","primitive"],primitive:!0},handler({parser:e,funcName:t},r){let o=C(r[0],"size").value;t==="\\lower"&&(o.number*=-1);let s=r[1];return{type:"raise",mode:e.mode,dy:o,body:s}},mathmlBuilder:dr});S({type:"raise",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler({parser:e,funcName:t},r){let o=C(r[0],"size").value,s=r[1];return{type:"raise",mode:e.mode,dy:o,body:s}},mathmlBuilder:dr});S({type:"ref",names:["\\ref","\\eqref"],props:{numArgs:1,argTypes:["raw"]},handler({parser:e,funcName:t},r){return{type:"ref",mode:e.mode,funcName:t,string:r[0].string.replace(ur,"")}},mathmlBuilder(e,t){let r=e.funcName==="\\ref"?["tml-ref"]:["tml-ref","tml-eqref"];return new be("#"+e.string,r,null)}});S({type:"reflect",names:["\\reflectbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler({parser:e},t){return{type:"reflect",mode:e.mode,body:t[0]}},mathmlBuilder(e,t){let r=O(e.body,t);return r.style.transform="scaleX(-1)",r}});S({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler({parser:e}){return{type:"internal",mode:e.mode}}});S({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler({parser:e},t,r){let o=r[0],s=C(t[0],"size"),i=C(t[1],"size");return{type:"rule",mode:e.mode,shift:o&&C(o,"size").value,width:s.value,height:i.value}},mathmlBuilder(e,t){let r=K(e.width,t),o=K(e.height,t),s=e.shift?K(e.shift,t):{number:0,unit:"em"},i=t.color&&t.getColor()||"black",l=new p.MathNode("mspace");if(r.number>0&&o.number>0&&l.setAttribute("mathbackground",i),l.setAttribute("width",r.number+r.unit),l.setAttribute("height",o.number+o.unit),s.number===0)return l;let u=new p.MathNode("mpadded",[l]);return s.number>=0?u.setAttribute("height","+"+s.number+s.unit):(u.setAttribute("height",s.number+s.unit),u.setAttribute("depth","+"+-s.number+s.unit)),u.setAttribute("voffset",s.number+s.unit),u}});var Mt={"\\tiny":.5,"\\sixptsize":.6,"\\Tiny":.6,"\\scriptsize":.7,"\\footnotesize":.8,"\\small":.9,"\\normalsize":1,"\\large":1.2,"\\Large":1.44,"\\LARGE":1.728,"\\huge":2.074,"\\Huge":2.488};S({type:"sizing",names:["\\tiny","\\sixptsize","\\Tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],props:{numArgs:0,allowedInText:!0},handler:({breakOnTokenText:e,funcName:t,parser:r},o)=>{r.settings.strict&&r.mode==="math"&&console.log(`Temml strict-mode warning: Command ${t} is invalid in math mode.`);let s=r.parseExpression(!1,e,!0);return{type:"sizing",mode:r.mode,funcName:t,body:s}},mathmlBuilder:(e,t)=>{let r=t.withFontSize(Mt[e.funcName]),o=U(e.body,r),s=Je(o),i=(Mt[e.funcName]/t.fontSize).toFixed(4);return s.setAttribute("mathsize",i+"em"),s}});S({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:({parser:e},t,r)=>{let o=!1,s=!1,i=r[0]&&C(r[0],"ordgroup");if(i){let u="";for(let h=0;h<i.body.length;++h)if(u=i.body[h].text,u==="t")o=!0;else if(u==="b")s=!0;else{o=!1,s=!1;break}}else o=!0,s=!0;let l=t[0];return{type:"smash",mode:e.mode,body:l,smashHeight:o,smashDepth:s}},mathmlBuilder:(e,t)=>{let r=new p.MathNode("mpadded",[O(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}});S({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler({parser:e},t,r){let o=r[0],s=t[0];return{type:"sqrt",mode:e.mode,body:s,index:o}},mathmlBuilder(e,t){let{body:r,index:o}=e;return o?new p.MathNode("mroot",[O(r,t),O(o,t.incrementLevel())]):new p.MathNode("msqrt",[O(r,t)])}});var Cn={display:0,text:1,script:2,scriptscript:3},Dn={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]};S({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler({breakOnTokenText:e,funcName:t,parser:r},o){let s=r.parseExpression(!0,e,!0),i=t.slice(1,t.length-5);return{type:"styling",mode:r.mode,scriptLevel:i,body:s}},mathmlBuilder(e,t){let r=t.withLevel(Cn[e.scriptLevel]),o=U(e.body,r),s=Je(o),i=Dn[e.scriptLevel];return s.setAttribute("scriptlevel",i[0]),s.setAttribute("displaystyle",i[1]),s}});var Bn=/^m(over|under|underover)$/;se({type:"supsub",mathmlBuilder(e,t){let r=!1,o,s,i=!1,l=!1,u=!1;e.base&&e.base.type==="horizBrace"&&(s=!!e.sup,s===e.base.isOver&&(r=!0,o=e.base.isOver)),e.base&&!e.base.stack&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0,i=!e.base.symbol,l=i&&!e.isFollowedByDelimiter,u=e.base.needsLeadingSpace);let h=e.base&&e.base.stack?[O(e.base.body[0],t)]:[O(e.base,t)],x=t.inSubOrSup();if(e.sub){let b=O(e.sub,x);t.level===3&&b.setAttribute("scriptlevel","2"),h.push(b)}if(e.sup){let b=O(e.sup,x);t.level===3&&b.setAttribute("scriptlevel","2");let k=b.type==="mrow"?b.children[0]:b;k&&k.type==="mo"&&k.classes.includes("tml-prime")&&e.base&&e.base.text&&"fF".indexOf(e.base.text)>-1&&k.classes.push("prime-pad"),h.push(b)}let A;if(r)A=o?"mover":"munder";else if(e.sub)if(e.sup){let b=e.base;b&&(b.type==="op"&&b.limits||b.type==="multiscript")&&(t.level===F.DISPLAY||b.alwaysHandleSupSub)||b&&b.type==="operatorname"&&b.alwaysHandleSupSub&&(t.level===F.DISPLAY||b.limits)?A="munderover":A="msubsup"}else{let b=e.base;b&&b.type==="op"&&b.limits&&(t.level===F.DISPLAY||b.alwaysHandleSupSub)||b&&b.type==="operatorname"&&b.alwaysHandleSupSub&&(b.limits||t.level===F.DISPLAY)?A="munder":A="msub"}else{let b=e.base;b&&b.type==="op"&&b.limits&&(t.level===F.DISPLAY||b.alwaysHandleSupSub)||b&&b.type==="operatorname"&&b.alwaysHandleSupSub&&(b.limits||t.level===F.DISPLAY)?A="mover":A="msup"}let q=new p.MathNode(A,h);if(i){let b=new p.MathNode("mo",[W("\u2061","text")]);if(u){let k=new p.MathNode("mspace");k.setAttribute("width","0.1667em"),q=p.newDocumentFragment([k,q,b])}else q=p.newDocumentFragment([q,b]);if(l){let k=new p.MathNode("mspace");k.setAttribute("width","0.1667em"),q.children.push(k)}}else Bn.test(A)&&(q=new p.MathNode("mrow",[q]));return q}});var Nn=["\\shortmid","\\nshortmid","\\shortparallel","\\nshortparallel","\\smallsetminus"],On=["\\Rsh","\\Lsh","\\restriction"],$n=e=>{if(e.length===1){let t=e.codePointAt(0);return 8591<t&&t<8704}return e.indexOf("arrow")>-1||e.indexOf("harpoon")>-1||On.includes(e)};se({type:"atom",mathmlBuilder(e,t){let r=new p.MathNode("mo",[W(e.text,e.mode)]);return e.family==="punct"?r.setAttribute("separator","true"):e.family==="open"||e.family==="close"?e.family==="open"?(r.setAttribute("form","prefix"),r.setAttribute("stretchy","false")):e.family==="close"&&(r.setAttribute("form","postfix"),r.setAttribute("stretchy","false")):e.text==="\\mid"?(r.setAttribute("lspace","0.22em"),r.setAttribute("rspace","0.22em"),r.setAttribute("stretchy","false")):e.family==="rel"&&$n(e.text)?r.setAttribute("stretchy","false"):Nn.includes(e.text)?r.setAttribute("mathsize","70%"):e.text===":"&&(r.attributes.lspace="0.2222em",r.attributes.rspace="0.2222em"),r}});var Et={mathbf:"bold",mathrm:"normal",textit:"italic",mathit:"italic",mathnormal:"italic",mathbb:"double-struck",mathcal:"script",mathfrak:"fraktur",mathscr:"script",mathsf:"sans-serif",mathtt:"monospace"},mr=function(e,t){if(t.fontFamily==="texttt")return"monospace";if(t.fontFamily==="textsc")return"normal";if(t.fontFamily==="textsf")return t.fontShape==="textit"&&t.fontWeight==="textbf"?"sans-serif-bold-italic":t.fontShape==="textit"?"sans-serif-italic":t.fontWeight==="textbf"?"sans-serif-bold":"sans-serif";if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";if(t.fontShape==="textit")return"italic";if(t.fontWeight==="textbf")return"bold";let r=t.font;if(!r||r==="mathnormal")return null;let o=e.mode;switch(r){case"mathit":return"italic";case"mathrm":{let i=e.text.codePointAt(0);return 939<i&&i<975?"italic":"normal"}case"greekItalic":return"italic";case"up@greek":return"normal";case"boldsymbol":case"mathboldsymbol":return"bold-italic";case"mathbf":return"bold";case"mathbb":return"double-struck";case"mathfrak":return"fraktur";case"mathscr":case"mathcal":return"script";case"mathsf":return"sans-serif";case"mathsfit":return"sans-serif-italic";case"mathtt":return"monospace"}let s=e.text;return I[o][s]&&I[o][s].replace&&(s=I[o][s].replace),Object.prototype.hasOwnProperty.call(Et,r)?Et[r]:null},zt=Object.freeze({B:8426,E:8427,F:8427,H:8387,I:8391,L:8390,M:8422,R:8393,e:8394,g:8355,o:8389}),Mn=Object.freeze({C:8426,H:8388,I:8392,R:8394,Z:8398}),En=Object.freeze({C:8383,H:8389,N:8391,P:8393,Q:8393,R:8395,Z:8394}),hr=Object.freeze({"\u03F5":119527,\u03D1:119564,\u03F0:119534,\u03C6:119577,\u03F1:119535,\u03D6:119563}),zn=Object.freeze({"\u03F5":119643,\u03D1:119680,\u03F0:119650,\u03C6:119693,\u03F1:119651,\u03D6:119679}),Lt=Object.freeze({"\u03F5":119701,\u03D1:119738,\u03F0:119708,\u03C6:119751,\u03F1:119709,\u03D6:119737}),Ln=Object.freeze({"\u03F5":119759,\u03D1:119796,\u03F0:119766,\u03C6:119809,\u03F1:119767,\u03D6:119795}),Fn=Object.freeze({upperCaseLatin:{normal:e=>0,bold:e=>119743,italic:e=>119795,"bold-italic":e=>119847,script:e=>zt[e]||119899,"script-bold":e=>119951,fraktur:e=>Mn[e]||120003,"fraktur-bold":e=>120107,"double-struck":e=>En[e]||120055,"sans-serif":e=>120159,"sans-serif-bold":e=>120211,"sans-serif-italic":e=>120263,"sans-serif-bold-italic":e=>120380,monospace:e=>120367},lowerCaseLatin:{normal:e=>0,bold:e=>119737,italic:e=>e==="h"?8358:119789,"bold-italic":e=>119841,script:e=>zt[e]||119893,"script-bold":e=>119945,fraktur:e=>119997,"fraktur-bold":e=>120101,"double-struck":e=>120049,"sans-serif":e=>120153,"sans-serif-bold":e=>120205,"sans-serif-italic":e=>120257,"sans-serif-bold-italic":e=>120309,monospace:e=>120361},upperCaseGreek:{normal:e=>0,bold:e=>119575,italic:e=>119633,"bold-italic":e=>119575,script:e=>0,"script-bold":e=>0,fraktur:e=>0,"fraktur-bold":e=>0,"double-struck":e=>0,"sans-serif":e=>119749,"sans-serif-bold":e=>119749,"sans-serif-italic":e=>0,"sans-serif-bold-italic":e=>119807,monospace:e=>0},lowerCaseGreek:{normal:e=>0,bold:e=>119569,italic:e=>119627,"bold-italic":e=>e==="\u03D5"?119678:119685,script:e=>0,"script-bold":e=>0,fraktur:e=>0,"fraktur-bold":e=>0,"double-struck":e=>0,"sans-serif":e=>119743,"sans-serif-bold":e=>119743,"sans-serif-italic":e=>0,"sans-serif-bold-italic":e=>119801,monospace:e=>0},varGreek:{normal:e=>0,bold:e=>hr[e]||-51,italic:e=>0,"bold-italic":e=>zn[e]||58,script:e=>0,"script-bold":e=>0,fraktur:e=>0,"fraktur-bold":e=>0,"double-struck":e=>0,"sans-serif":e=>Lt[e]||116,"sans-serif-bold":e=>Lt[e]||116,"sans-serif-italic":e=>0,"sans-serif-bold-italic":e=>Ln[e]||174,monospace:e=>0},numeral:{normal:e=>0,bold:e=>120734,italic:e=>0,"bold-italic":e=>0,script:e=>0,"script-bold":e=>0,fraktur:e=>0,"fraktur-bold":e=>0,"double-struck":e=>120744,"sans-serif":e=>120754,"sans-serif-bold":e=>120764,"sans-serif-italic":e=>0,"sans-serif-bold-italic":e=>0,monospace:e=>120774}}),he=(e,t)=>{let r=e.codePointAt(0),o=64<r&&r<91?"upperCaseLatin":96<r&&r<123?"lowerCaseLatin":912<r&&r<938?"upperCaseGreek":944<r&&r<970||e==="\u03D5"?"lowerCaseGreek":120545<r&&r<120572||hr[e]?"varGreek":47<r&&r<58?"numeral":"other";return o==="other"?e:String.fromCodePoint(r+Fn[o][t](e))},In=Object.freeze({a:"\u1D00",b:"\u0299",c:"\u1D04",d:"\u1D05",e:"\u1D07",f:"\uA730",g:"\u0262",h:"\u029C",i:"\u026A",j:"\u1D0A",k:"\u1D0B",l:"\u029F",m:"\u1D0D",n:"\u0274",o:"\u1D0F",p:"\u1D18",q:"\u01EB",r:"\u0280",s:"s",t:"\u1D1B",u:"\u1D1C",v:"\u1D20",w:"\u1D21",x:"x",y:"\u028F",z:"\u1D22"}),Pn=/^\d(?:[\d,.]*\d)?$/,Gn=/[A-Ba-z]/,Rn=new Set(["\\prime","\\dprime","\\trprime","\\qprime","\\backprime","\\backdprime","\\backtrprime"]),jn=(e,t,r)=>{let o=new p.MathNode(r,[e]),s=new p.MathNode("mstyle",[o]);return s.style["font-style"]="italic",s.style["font-family"]="Cambria, 'Times New Roman', serif",t==="bold-italic"&&(s.style["font-weight"]="bold"),s};se({type:"mathord",mathmlBuilder(e,t){let r=W(e.text,e.mode,t),o=r.text.codePointAt(0),s=912<o&&o<938?"normal":"italic",i=mr(e,t)||s;if(i==="script")return r.text=he(r.text,i),new p.MathNode("mi",[r],[t.font]);i!=="italic"&&(r.text=he(r.text,i));let l=new p.MathNode("mi",[r]);return i==="normal"&&(l.setAttribute("mathvariant","normal"),r.text.length===1&&(l=new p.MathNode("mrow",[l]))),l}});se({type:"textord",mathmlBuilder(e,t){let r=e.text,o=r.codePointAt(0);t.fontFamily==="textsc"&&96<o&&o<123&&(r=In[r]);let s=W(r,e.mode,t),i=mr(e,t)||"normal",l;if(Pn.test(e.text)){let u=e.mode==="text"?"mtext":"mn";if(i==="italic"||i==="bold-italic")return jn(s,i,u);i!=="normal"&&(s.text=s.text.split("").map(h=>he(h,i)).join("")),l=new p.MathNode(u,[s])}else if(e.mode==="text")i!=="normal"&&(s.text=he(s.text,i)),l=new p.MathNode("mtext",[s]);else if(Rn.has(e.text))l=new p.MathNode("mo",[s]),l.classes.push("tml-prime");else{let u=s.text;i!=="italic"&&(s.text=he(s.text,i)),l=new p.MathNode("mi",[s]),s.text===u&&Gn.test(u)&&l.setAttribute("mathvariant","italic")}return l}});var Un={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Vn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};se({type:"spacing",mathmlBuilder(e,t){let r;if(Object.prototype.hasOwnProperty.call(Vn,e.text))r=new p.MathNode("mtext",[new p.TextNode("\xA0")]);else if(Object.prototype.hasOwnProperty.call(Un,e.text))r=new p.MathNode("mo"),e.text==="\\nobreak"&&r.setAttribute("linebreak","nobreak");else throw new w(`Unknown type of space "${e.text}"`);return r}});se({type:"tag"});var Ft={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm","\\textsc":"textsc"},It={"\\textbf":"textbf","\\textmd":"textmd"},Wn={"\\textit":"textit","\\textup":"textup"},Hn=(e,t)=>{let r=e.font;if(r){if(Ft[r])return t.withTextFontFamily(Ft[r]);if(It[r])return t.withTextFontWeight(It[r]);if(r==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(Wn[r])};S({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textsc","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler({parser:e,funcName:t},r){let o=r[0];return{type:"text",mode:e.mode,body:z(o),font:t}},mathmlBuilder(e,t){let r=Hn(e,t),o=te(e.body,r);return Ee(o)}});S({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler({parser:e},t){return{type:"vcenter",mode:e.mode,body:t[0]}},mathmlBuilder(e,t){let r=new p.MathNode("mtd",[O(e.body,t)]);r.style.padding="0";let o=new p.MathNode("mtr",[r]);return new p.MathNode("mtable",[o])}});S({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new w("\\verb ended by end of line instead of matching delimiter")},mathmlBuilder(e,t){let r=new p.TextNode(Zn(e)),o=new p.MathNode("mtext",[r]);return o.setAttribute("mathvariant","monospace"),o}});var Zn=e=>e.body.replace(/ /g,e.star?"\u2423":"\xA0"),oe=Ut,pr=`[ \r
	]`,Xn="\\\\[a-zA-Z@]+",Yn="\\\\[^\uD800-\uDFFF]",Kn=`(${Xn})${pr}*`,Jn=`\\\\(
|[ \r	]+
?)[ \r	]*`,Ze="[\u0300-\u036F]",Pt=new RegExp(`${Ze}+$`),Qn=`(${pr}+)|${Jn}|([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]${Ze}*|[\uD800-\uDBFF][\uDC00-\uDFFF]${Ze}*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|${Kn}|${Yn})`,Oe=class{constructor(t,r){this.input=t,this.settings=r,this.tokenRegex=new RegExp(Qn,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,r){this.catcodes[t]=r}lex(){let t=this.input,r=this.tokenRegex.lastIndex;if(r===t.length)return new Z("EOF",new V(this,r,r));let o=this.tokenRegex.exec(t);if(o===null||o.index!==r)throw new w(`Unexpected character: '${t[r]}'`,new Z(t[r],new V(this,r,r+1)));let s=o[6]||o[3]||(o[2]?"\\ ":" ");if(this.catcodes[s]===14){let i=t.indexOf(`
`,this.tokenRegex.lastIndex);if(i===-1){if(this.tokenRegex.lastIndex=t.length,this.settings.strict)throw new w("% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode")}else this.tokenRegex.lastIndex=i+1;return this.lex()}return new Z(s,new V(this,r,this.tokenRegex.lastIndex))}},Xe=class{constructor(t={},r={}){this.current=r,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new w("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");let t=this.undefStack.pop();for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]===void 0?delete this.current[r]:this.current[r]=t[r])}has(t){return Object.prototype.hasOwnProperty.call(this.current,t)||Object.prototype.hasOwnProperty.call(this.builtins,t)}get(t){return Object.prototype.hasOwnProperty.call(this.current,t)?this.current[t]:this.builtins[t]}set(t,r,o=!1){if(o){for(let s=0;s<this.undefStack.length;s++)delete this.undefStack[s][t];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][t]=r)}else{let s=this.undefStack[this.undefStack.length-1];s&&!Object.prototype.hasOwnProperty.call(s,t)&&(s[t]=this.current[t])}this.current[t]=r}},fr={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Ye=class{constructor(t,r,o){this.settings=r,this.expansionCount=0,this.feed(t),this.macros=new Xe(hn,r.macros),this.mode=o,this.stack=[]}feed(t){this.lexer=new Oe(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){let r,o,s;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:s,end:o}=this.consumeArg(["]"])}else({tokens:s,start:r,end:o}=this.consumeArg());return this.pushToken(new Z("EOF",o.loc)),this.pushTokens(s),r.range(o,"")}consumeSpaces(){for(;this.future().text===" ";)this.stack.pop()}consumeArg(t){let r=[],o=t&&t.length>0;o||this.consumeSpaces();let s=this.future(),i,l=0,u=0;do{if(i=this.popToken(),r.push(i),i.text==="{")++l;else if(i.text==="}"){if(--l,l===-1)throw new w("Extra }",i)}else if(i.text==="EOF")throw new w("Unexpected end of input in a macro argument, expected '"+(t&&o?t[u]:"}")+"'",i);if(t&&o)if((l===0||l===1&&t[u]==="{")&&i.text===t[u]){if(++u,u===t.length){r.splice(-u,u);break}}else u=0}while(l!==0||o);return s.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:s,end:i}}consumeArgs(t,r){if(r){if(r.length!==t+1)throw new w("The length of delimiters doesn't match the number of args!");let s=r[0];for(let i=0;i<s.length;i++){let l=this.popToken();if(s[i]!==l.text)throw new w("Use of the macro doesn't match its definition",l)}}let o=[];for(let s=0;s<t;s++)o.push(this.consumeArg(r&&r[s+1]).tokens);return o}expandOnce(t){let r=this.popToken(),o=r.text,s=r.noexpand?null:this._getExpansion(o);if(s==null||t&&s.unexpandable){if(t&&s==null&&o[0]==="\\"&&!this.isDefined(o))throw new w("Undefined control sequence: "+o);return this.pushToken(r),!1}if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new w("Too many expansions: infinite loop or need to increase maxExpand setting");let i=s.tokens,l=this.consumeArgs(s.numArgs,s.delimiters);if(s.numArgs){i=i.slice();for(let u=i.length-1;u>=0;--u){let h=i[u];if(h.text==="#"){if(u===0)throw new w("Incomplete placeholder at end of macro body",h);if(h=i[--u],h.text==="#")i.splice(u+1,1);else if(/^[1-9]$/.test(h.text))i.splice(u,2,...l[+h.text-1]);else throw new w("Not a valid argument number",h)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){let t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}throw new Error}expandMacro(t){return this.macros.has(t)?this.expandTokens([new Z(t)]):void 0}expandTokens(t){let r=[],o=this.stack.length;for(this.pushTokens(t);this.stack.length>o;)if(this.expandOnce(!0)===!1){let s=this.stack.pop();s.treatAsRelax&&(s.noexpand=!1,s.treatAsRelax=!1),r.push(s)}return r}expandMacroAsText(t){let r=this.expandMacro(t);return r&&r.map(o=>o.text).join("")}_getExpansion(t){let r=this.macros.get(t);if(r==null)return r;if(t.length===1){let s=this.lexer.catcodes[t];if(s!=null&&s!==13)return}let o=typeof r=="function"?r(this):r;if(typeof o=="string"){let s=0;if(o.indexOf("#")!==-1){let x=o.replace(/##/g,"");for(;x.indexOf("#"+(s+1))!==-1;)++s}let i=new Oe(o,this.settings),l=[],u=i.lex();for(;u.text!=="EOF";)l.push(u),u=i.lex();return l.reverse(),{tokens:l,numArgs:s}}return o}isDefined(t){return this.macros.has(t)||Object.prototype.hasOwnProperty.call(oe,t)||Object.prototype.hasOwnProperty.call(I.math,t)||Object.prototype.hasOwnProperty.call(I.text,t)||Object.prototype.hasOwnProperty.call(fr,t)}isExpandable(t){let r=this.macros.get(t);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:Object.prototype.hasOwnProperty.call(oe,t)&&!oe[t].primitive}},Gt=/^[â‚Šâ‚‹â‚Œâ‚â‚Žâ‚€â‚â‚‚â‚ƒâ‚„â‚…â‚†â‚‡â‚ˆâ‚‰â‚â‚‘â‚•áµ¢â±¼â‚–â‚—â‚˜â‚™â‚’â‚šáµ£â‚›â‚œáµ¤áµ¥â‚“áµ¦áµ§áµ¨áµ©áµª]/,Te=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",\u02B0:"h","\u2071":"i",\u02B2:"j","\u1D4F":"k",\u02E1:"l","\u1D50":"m",\u207F:"n","\u1D52":"o","\u1D56":"p",\u02B3:"r",\u02E2:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",\u02B7:"w",\u02E3:"x",\u02B8:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),Rt=Object.freeze({"\u{1D49C}":"A",\u212C:"B","\u{1D49E}":"C","\u{1D49F}":"D",\u2130:"E",\u2131:"F","\u{1D4A2}":"G",\u210B:"H",\u2110:"I","\u{1D4A5}":"J","\u{1D4A6}":"K",\u2112:"L",\u2133:"M","\u{1D4A9}":"N","\u{1D4AA}":"O","\u{1D4AB}":"P","\u{1D4AC}":"Q",\u211B:"R","\u{1D4AE}":"S","\u{1D4AF}":"T","\u{1D4B0}":"U","\u{1D4B1}":"V","\u{1D4B2}":"W","\u{1D4B3}":"X","\u{1D4B4}":"Y","\u{1D4B5}":"Z"}),Ge={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"},"\u0327":{text:"\\c"}},jt={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u010F:"d\u030C",\u1E0B:"d\u0307",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u013A:"l\u0301",\u013E:"l\u030C",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u010E:"D\u030C",\u1E0A:"D\u0307",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0139:"L\u0301",\u013D:"L\u030C",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u0164:"T\u030C",\u1E6A:"T\u0307",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"},eo=["bin","op","open","punct","rel"],to=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/,$e=class e{constructor(t,r,o=!1){this.mode="math",this.gullet=new Ye(t,r,this.mode),this.settings=r,this.isPreamble=o,this.leftrightDepth=0,this.prevAtomType=""}expect(t,r=!0){if(this.fetch().text!==t)throw new w(`Expected '${t}', got '${this.fetch().text}'`,this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");let t=this.parseExpression(!1);if(this.expect("EOF"),this.isPreamble){let o=Object.create(null);return Object.entries(this.gullet.macros.current).forEach(([s,i])=>{o[s]=i}),this.gullet.endGroup(),o}let r=this.gullet.macros.get("\\df@tag");return this.gullet.endGroup(),r&&(this.gullet.macros.current["\\df@tag"]=r),t}static get endOfExpression(){return["}","\\endgroup","\\end","\\right","\\endtoggle","&"]}subparse(t){let r=this.nextToken;this.consume(),this.gullet.pushToken(new Z("}")),this.gullet.pushTokens(t);let o=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,o}parseExpression(t,r,o){let s=[];for(this.prevAtomType="";;){this.mode==="math"&&this.consumeSpaces();let i=this.fetch();if(e.endOfExpression.indexOf(i.text)!==-1||r&&i.text===r||o&&i.text==="\\middle"||t&&oe[i.text]&&oe[i.text].infix)break;let l=this.parseAtom(r);if(l){if(l.type==="internal")continue}else break;s.push(l),this.prevAtomType=l.type==="atom"?l.family:l.type}return this.mode==="text"&&this.formLigatures(s),this.handleInfixNodes(s)}handleInfixNodes(t){let r=-1,o;for(let s=0;s<t.length;s++)if(t[s].type==="infix"){if(r!==-1)throw new w("only one infix operator per group",t[s].token);r=s,o=t[s].replaceWith}if(r!==-1&&o){let s,i,l=t.slice(0,r),u=t.slice(r+1);l.length===1&&l[0].type==="ordgroup"?s=l[0]:s={type:"ordgroup",mode:this.mode,body:l},u.length===1&&u[0].type==="ordgroup"?i=u[0]:i={type:"ordgroup",mode:this.mode,body:u};let h;return o==="\\\\abovefrac"?h=this.callFunction(o,[s,t[r],i],[]):h=this.callFunction(o,[s,i],[]),[h]}else return t}handleSupSubscript(t){let r=this.fetch(),o=r.text;this.consume(),this.consumeSpaces();let s=this.parseGroup(t);if(!s)throw new w("Expected group after '"+o+"'",r);return s}formatUnsupportedCmd(t){let r=[];for(let i=0;i<t.length;i++)r.push({type:"textord",mode:"text",text:t[i]});let o={type:"text",mode:this.mode,body:r};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[o]}}parseAtom(t){let r=this.parseGroup("atom",t);if(this.mode==="text")return r;let o,s;for(;;){this.consumeSpaces();let i=this.fetch();if(i.text==="\\limits"||i.text==="\\nolimits"){if(r&&r.type==="op"){let l=i.text==="\\limits";r.limits=l,r.alwaysHandleSupSub=!0}else if(r&&r.type==="operatorname")r.alwaysHandleSupSub&&(r.limits=i.text==="\\limits");else throw new w("Limit controls must follow a math operator",i);this.consume()}else if(i.text==="^"){if(o)throw new w("Double superscript",i);o=this.handleSupSubscript("superscript")}else if(i.text==="_"){if(s)throw new w("Double subscript",i);s=this.handleSupSubscript("subscript")}else if(i.text==="'"){if(o)throw new w("Double superscript",i);let l={type:"textord",mode:this.mode,text:"\\prime"},u=[l];for(this.consume();this.fetch().text==="'";)u.push(l),this.consume();this.fetch().text==="^"&&u.push(this.handleSupSubscript("superscript")),o={type:"ordgroup",mode:this.mode,body:u}}else if(Te[i.text]){let l=Gt.test(i.text),u=[];for(u.push(new Z(Te[i.text])),this.consume();;){let x=this.fetch().text;if(!Te[x]||Gt.test(x)!==l)break;u.unshift(new Z(Te[x])),this.consume()}let h=this.subparse(u);l?s={type:"ordgroup",mode:"math",body:h}:o={type:"ordgroup",mode:"math",body:h}}else break}if(o||s){if(r&&r.type==="multiscript"&&!r.postscripts)return r.postscripts={sup:o,sub:s},r;{let i=!r||r.type!=="op"&&r.type!=="operatorname"?void 0:Le(this.nextToken.text);return{type:"supsub",mode:this.mode,base:r,sup:o,sub:s,isFollowedByDelimiter:i}}}else return r}parseFunction(t,r){let o=this.fetch(),s=o.text,i=oe[s];if(!i)return null;if(this.consume(),r&&r!=="atom"&&!i.allowedInArgument)throw new w("Got function '"+s+"' with no arguments"+(r?" as "+r:""),o);if(this.mode==="text"&&!i.allowedInText)throw new w("Can't use function '"+s+"' in text mode",o);if(this.mode==="math"&&i.allowedInMath===!1)throw new w("Can't use function '"+s+"' in math mode",o);let l=this.prevAtomType,{args:u,optArgs:h}=this.parseArguments(s,i);return this.prevAtomType=l,this.callFunction(s,u,h,o,t)}callFunction(t,r,o,s,i){let l={funcName:t,parser:this,token:s,breakOnTokenText:i},u=oe[t];if(u&&u.handler)return u.handler(l,r,o);throw new w(`No function handler for ${t}`)}parseArguments(t,r){let o=r.numArgs+r.numOptionalArgs;if(o===0)return{args:[],optArgs:[]};let s=[],i=[];for(let l=0;l<o;l++){let u=r.argTypes&&r.argTypes[l],h=l<r.numOptionalArgs;(r.primitive&&u==null||r.type==="sqrt"&&l===1&&i[0]==null)&&(u="primitive");let x=this.parseGroupOfType(`argument to '${t}'`,u,h);if(h)i.push(x);else if(x!=null)s.push(x);else throw new w("Null argument, please report this as a bug")}return{args:s,optArgs:i}}parseGroupOfType(t,r,o){switch(r){case"size":return this.parseSizeGroup(o);case"url":return this.parseUrlGroup(o);case"math":case"text":return this.parseArgumentGroup(o,r);case"hbox":{let s=this.parseArgumentGroup(o,"text");return s!=null?{type:"styling",mode:s.mode,body:[s],scriptLevel:"text"}:null}case"raw":{let s=this.parseStringGroup("raw",o);return s!=null?{type:"raw",mode:"text",string:s.text}:null}case"primitive":{if(o)throw new w("A primitive argument cannot be optional");let s=this.parseGroup(t);if(s==null)throw new w("Expected group as "+t,this.fetch());return s}case"original":case null:case void 0:return this.parseArgumentGroup(o);default:throw new w("Unknown group type as "+t,this.fetch())}}consumeSpaces(){for(;;){let t=this.fetch().text;if(t===" "||t==="\xA0"||t==="\uFE0E")this.consume();else break}}parseStringGroup(t,r){let o=this.gullet.scanArgument(r);if(o==null)return null;let s="",i;for(;(i=this.fetch()).text!=="EOF";)s+=i.text,this.consume();return this.consume(),o.text=s,o}parseRegexGroup(t,r){let o=this.fetch(),s=o,i="",l;for(;(l=this.fetch()).text!=="EOF"&&t.test(i+l.text);)s=l,i+=s.text,this.consume();if(i==="")throw new w("Invalid "+r+": '"+o.text+"'",o);return o.range(s,i)}parseSizeGroup(t){let r,o=!1;if(this.gullet.consumeSpaces(),!t&&this.gullet.future().text!=="{"?r=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):r=this.parseStringGroup("size",t),!r)return null;!t&&r.text.length===0&&(r.text="0pt",o=!0);let s=to.exec(r.text);if(!s)throw new w("Invalid size: '"+r.text+"'",r);let i={number:+(s[1]+s[2]),unit:s[3]};if(!Zt(i))throw new w("Invalid unit: '"+i.unit+"'",r);return{type:"size",mode:this.mode,value:i,isBlank:o}}parseUrlGroup(t){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);let r=this.parseStringGroup("url",t);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),r==null)return null;let o=r.text.replace(/\\([#$%&~_^{}])/g,"$1");return o=r.text.replace(/{\u2044}/g,"/"),{type:"url",mode:this.mode,url:o}}parseArgumentGroup(t,r){let o=this.gullet.scanArgument(t);if(o==null)return null;let s=this.mode;r&&this.switchMode(r),this.gullet.beginGroup();let i=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();let l={type:"ordgroup",mode:this.mode,loc:o.loc,body:i};return r&&this.switchMode(s),l}parseGroup(t,r){let o=this.fetch(),s=o.text,i;if(s==="{"||s==="\\begingroup"||s==="\\toggle"){this.consume();let l=s==="{"?"}":s==="\\begingroup"?"\\endgroup":"\\endtoggle";this.gullet.beginGroup();let u=this.parseExpression(!1,l),h=this.fetch();this.expect(l),this.gullet.endGroup(),i={type:h.text==="\\endtoggle"?"toggle":"ordgroup",mode:this.mode,loc:V.range(o,h),body:u,semisimple:s==="\\begingroup"||void 0}}else i=this.parseFunction(r,t)||this.parseSymbol(),i==null&&s[0]==="\\"&&!Object.prototype.hasOwnProperty.call(fr,s)&&(i=this.formatUnsupportedCmd(s),this.consume());return i}formLigatures(t){let r=t.length-1;for(let o=0;o<r;++o){let s=t[o],i=s.text;i==="-"&&t[o+1].text==="-"&&(o+1<r&&t[o+2].text==="-"?(t.splice(o,3,{type:"textord",mode:"text",loc:V.range(s,t[o+2]),text:"---"}),r-=2):(t.splice(o,2,{type:"textord",mode:"text",loc:V.range(s,t[o+1]),text:"--"}),r-=1)),(i==="'"||i==="`")&&t[o+1].text===i&&(t.splice(o,2,{type:"textord",mode:"text",loc:V.range(s,t[o+1]),text:i+i}),r-=1)}}parseSymbol(){let t=this.fetch(),r=t.text;if(/^\\verb[^a-zA-Z]/.test(r)){this.consume();let i=r.slice(5),l=i.charAt(0)==="*";if(l&&(i=i.slice(1)),i.length<2||i.charAt(0)!==i.slice(-1))throw new w(`\\verb assertion failed --
                    please report what input caused this bug`);return i=i.slice(1,-1),{type:"verb",mode:"text",body:i,star:l}}if(Object.prototype.hasOwnProperty.call(jt,r[0])&&this.mode==="math"&&!I[this.mode][r[0]]){if(this.settings.strict&&this.mode==="math")throw new w(`Accented Unicode text character "${r[0]}" used in math mode`,t);r=jt[r[0]]+r.slice(1)}let o=this.mode==="math"?Pt.exec(r):null;o&&(r=r.substring(0,o.index),r==="i"?r="\u0131":r==="j"&&(r="\u0237"));let s;if(I[this.mode][r]){let i=I[this.mode][r].group;i==="bin"&&eo.includes(this.prevAtomType)&&(i="open");let l=V.range(t),u;if(Object.prototype.hasOwnProperty.call(Lr,i)){let h=i;u={type:"atom",mode:this.mode,family:h,loc:l,text:r}}else{if(Rt[r]){this.consume();let h=this.fetch().text.charCodeAt(0),x=h===65025?"mathscr":"mathcal";return(h===65024||h===65025)&&this.consume(),{type:"font",mode:"math",font:x,body:{type:"mathord",mode:"math",loc:l,text:Rt[r]}}}u={type:i,mode:this.mode,loc:l,text:r}}s=u}else if(r.charCodeAt(0)>=128||Pt.exec(r)){if(this.settings.strict&&this.mode==="math")throw new w(`Unicode text character "${r[0]}" used in math mode`,t);s={type:"textord",mode:"text",loc:V.range(t),text:r}}else return null;if(this.consume(),o)for(let i=0;i<o[0].length;i++){let l=o[0][i];if(!Ge[l])throw new w(`Unknown accent ' ${l}'`,t);let u=Ge[l][this.mode]||Ge[l].text;if(!u)throw new w(`Accent ${l} unsupported in ${this.mode} mode`,t);s={type:"accent",mode:this.mode,loc:V.range(t),label:u,isStretchy:!1,base:s}}return s}},gr=function(e,t){if(!(typeof e=="string"||e instanceof String))throw new TypeError("Temml can only parse string typed expression");let r=new $e(e,t);delete r.gullet.macros.current["\\df@tag"];let o=r.parse();if(!(o.length>0&&o[0].type&&o[0].type==="array"&&o[0].addEqnNum)&&r.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new w("\\tag works only in display mode");r.gullet.feed("\\df@tag"),o=[{type:"tag",mode:"text",body:o,tag:r.parse()}]}return o},ro=[2,2,3,3],Ke=class e{constructor(t){this.level=t.level,this.color=t.color,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontSize=t.fontSize||1,this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.maxSize=t.maxSize}extend(t){let r={level:this.level,color:this.color,font:this.font,fontFamily:this.fontFamily,fontSize:this.fontSize,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return new e(r)}withLevel(t){return this.extend({level:t})}incrementLevel(){return this.extend({level:Math.min(this.level+1,3)})}inSubOrSup(){return this.extend({level:ro[this.level]})}withColor(t){return this.extend({color:t})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withFontSize(t){return this.extend({fontSize:t})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}getColor(){return this.color}},no="0.10.34";function oo(e){let t={},r=0,o=document.getElementsByClassName("tml-eqn");for(let l of o)for(r+=1,l.setAttribute("id","tml-eqn-"+String(r));l.tagName!=="mtable";)if(l.getElementsByClassName("tml-label").length>0){let h=l.attributes.id.value;t[h]=String(r);break}else l=l.parentElement;let s=document.getElementsByClassName("tml-tageqn");for(let l of s)if(l.getElementsByClassName("tml-label").length>0){let h=l.getElementsByClassName("tml-tag");if(h.length>0){let x=l.attributes.id.value;t[x]=h[0].textContent}}[...e.getElementsByClassName("tml-ref")].forEach(l=>{let u=l.getAttribute("href"),h=t[u.slice(1)];l.className.indexOf("tml-eqref")===-1?(h=h.replace(/^\(/,""),h=h.replace(/\)$/,"")):(h.charAt(0)!=="("&&(h="("+h),h.slice(-1)!==")"&&(h=h+")"));let x=document.createElementNS("http://www.w3.org/1998/Math/MathML","mtext");x.appendChild(document.createTextNode(h));let A=document.createElementNS("http://www.w3.org/1998/Math/MathML","math");A.appendChild(x),l.appendChild(A)})}var br=function(e,t,r={}){t.textContent="";let o=t.tagName.toLowerCase()==="math";o&&(r.wrap="none");let s=it(e,r);o?(t.textContent="",s.children.forEach(i=>{t.appendChild(i.toNode())})):s.children.length>1?(t.textContent="",s.children.forEach(i=>{t.appendChild(i.toNode())})):t.appendChild(s.toNode())};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: Temml doesn't work in quirks mode. Make sure your website has a suitable doctype."),br=function(){throw new w("Temml doesn't work in quirks mode.")});var ao=function(e,t){return it(e,t).toMarkup()},so=function(e,t){let r=new pe(t);return gr(e,r)},io=function(e,t){let r=new pe(t);if(r.macros={},!(typeof e=="string"||e instanceof String))throw new TypeError("Temml can only parse string typed expression");let o=new $e(e,r,!0);return delete o.gullet.macros.current["\\df@tag"],o.parse()},lo=function(e,t,r){if(r.throwOnError||!(e instanceof w))throw e;let o=new De(["temml-error"],[new Or(t+`
`+e.toString())]);return o.style.color=r.errorColor,o.style.whiteSpace="pre-line",o},it=function(e,t){let r=new pe(t);try{let o=gr(e,r),s=new Ke({level:r.displayMode?F.DISPLAY:F.TEXT,maxSize:r.maxSize});return Wr(o,e,s,r)}catch(o){return lo(o,e,r)}},xr={version:no,render:br,renderToString:ao,postProcess:oo,ParseError:w,definePreamble:io,__parse:so,__renderToMathMLTree:it,__defineSymbol:n,__defineMacro:c};function ho(e,{displayMode:t=!0}={}){let r=xr.renderToString(e,{displayMode:t,annotate:!0,throwOnError:!0}),o=document.implementation.createHTMLDocument("");return o.body.innerHTML=r,o.body.querySelector("math")?.innerHTML??""}export{ho as default};
                dist/script-modules/latex-to-mathml/loader.min.js                                                   0000644                 00000000117 15212564030 0016061 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       function r(){return import("@wordpress/latex-to-mathml")}export{r as default};
                                                                                                                                                                                                                                                                                                                                                                                                                                                 dist/script-modules/latex-to-mathml/loader.js                                                       0000644                 00000000231 15212564030 0015274 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       // packages/latex-to-mathml/build-module/loader.mjs
function loader() {
  return import("@wordpress/latex-to-mathml");
}
export {
  loader as default
};
                                                                                                                                                                                                                                                                                                                                                                       dist/script-modules/latex-to-mathml/index.js                                                        0000644                 00001332025 15212564030 0015147 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       // node_modules/temml/dist/temml.mjs
var ParseError = class _ParseError {
  constructor(message, token) {
    let error = " " + message;
    let start;
    const loc = token && token.loc;
    if (loc && loc.start <= loc.end) {
      const input = loc.lexer.input;
      start = loc.start;
      const end = loc.end;
      if (start === input.length) {
        error += " at end of input: ";
      } else {
        error += " at position " + (start + 1) + ": ";
      }
      const underlined = input.slice(start, end).replace(/[^]/g, "$&\u0332");
      let left;
      if (start > 15) {
        left = "\u2026" + input.slice(start - 15, start);
      } else {
        left = input.slice(0, start);
      }
      let right;
      if (end + 15 < input.length) {
        right = input.slice(end, end + 15) + "\u2026";
      } else {
        right = input.slice(end);
      }
      error += left + underlined + right;
    }
    const self = new Error(error);
    self.name = "ParseError";
    self.__proto__ = _ParseError.prototype;
    self.position = start;
    return self;
  }
};
ParseError.prototype.__proto__ = Error.prototype;
var deflt = function(setting, defaultIfUndefined) {
  return setting === void 0 ? defaultIfUndefined : setting;
};
var uppercase = /([A-Z])/g;
var hyphenate = function(str) {
  return str.replace(uppercase, "-$1").toLowerCase();
};
var ESCAPE_LOOKUP = {
  "&": "&amp;",
  ">": "&gt;",
  "<": "&lt;",
  '"': "&quot;",
  "'": "&#x27;"
};
var ESCAPE_REGEX = /[&><"']/g;
function escape(text2) {
  return String(text2).replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match]);
}
var getBaseElem = function(group) {
  if (group.type === "ordgroup") {
    if (group.body.length === 1) {
      return getBaseElem(group.body[0]);
    } else {
      return group;
    }
  } else if (group.type === "color") {
    if (group.body.length === 1) {
      return getBaseElem(group.body[0]);
    } else {
      return group;
    }
  } else if (group.type === "font") {
    return getBaseElem(group.body);
  } else {
    return group;
  }
};
var isCharacterBox = function(group) {
  const baseElem = getBaseElem(group);
  return baseElem.type === "mathord" || baseElem.type === "textord" || baseElem.type === "atom";
};
var assert = function(value) {
  if (!value) {
    throw new Error("Expected non-null, but got " + String(value));
  }
  return value;
};
var protocolFromUrl = function(url) {
  const protocol = /^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(url);
  if (!protocol) {
    return "_relative";
  }
  if (protocol[2] !== ":") {
    return null;
  }
  if (!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(protocol[1])) {
    return null;
  }
  return protocol[1].toLowerCase();
};
var round = function(n) {
  return +n.toFixed(4);
};
var utils = {
  deflt,
  escape,
  hyphenate,
  getBaseElem,
  isCharacterBox,
  protocolFromUrl,
  round
};
var Settings = class {
  constructor(options) {
    options = options || {};
    this.displayMode = utils.deflt(options.displayMode, false);
    this.annotate = utils.deflt(options.annotate, false);
    this.leqno = utils.deflt(options.leqno, false);
    this.throwOnError = utils.deflt(options.throwOnError, false);
    this.errorColor = utils.deflt(options.errorColor, "#b22222");
    this.macros = options.macros || {};
    this.wrap = utils.deflt(options.wrap, "tex");
    this.xml = utils.deflt(options.xml, false);
    this.colorIsTextColor = utils.deflt(options.colorIsTextColor, false);
    this.strict = utils.deflt(options.strict, false);
    this.trust = utils.deflt(options.trust, false);
    this.maxSize = options.maxSize === void 0 ? [Infinity, Infinity] : Array.isArray(options.maxSize) ? options.maxSize : [Infinity, Infinity];
    this.maxExpand = Math.max(0, utils.deflt(options.maxExpand, 1e3));
  }
  /**
   * Check whether to test potentially dangerous input, and return
   * `true` (trusted) or `false` (untrusted).  The sole argument `context`
   * should be an object with `command` field specifying the relevant LaTeX
   * command (as a string starting with `\`), and any other arguments, etc.
   * If `context` has a `url` field, a `protocol` field will automatically
   * get added by this function (changing the specified object).
   */
  isTrusted(context) {
    if (context.url && !context.protocol) {
      const protocol = utils.protocolFromUrl(context.url);
      if (protocol == null) {
        return false;
      }
      context.protocol = protocol;
    }
    const trust = typeof this.trust === "function" ? this.trust(context) : this.trust;
    return Boolean(trust);
  }
};
var _functions = {};
var _mathmlGroupBuilders = {};
function defineFunction({
  type,
  names,
  props,
  handler,
  mathmlBuilder: mathmlBuilder2
}) {
  const data = {
    type,
    numArgs: props.numArgs,
    argTypes: props.argTypes,
    allowedInArgument: !!props.allowedInArgument,
    allowedInText: !!props.allowedInText,
    allowedInMath: props.allowedInMath === void 0 ? true : props.allowedInMath,
    numOptionalArgs: props.numOptionalArgs || 0,
    infix: !!props.infix,
    primitive: !!props.primitive,
    handler
  };
  for (let i = 0; i < names.length; ++i) {
    _functions[names[i]] = data;
  }
  if (type) {
    if (mathmlBuilder2) {
      _mathmlGroupBuilders[type] = mathmlBuilder2;
    }
  }
}
function defineFunctionBuilders({ type, mathmlBuilder: mathmlBuilder2 }) {
  defineFunction({
    type,
    names: [],
    props: { numArgs: 0 },
    handler() {
      throw new Error("Should never be called.");
    },
    mathmlBuilder: mathmlBuilder2
  });
}
var normalizeArgument = function(arg) {
  return arg.type === "ordgroup" && arg.body.length === 1 ? arg.body[0] : arg;
};
var ordargument = function(arg) {
  return arg.type === "ordgroup" ? arg.body : [arg];
};
var DocumentFragment = class {
  constructor(children) {
    this.children = children;
    this.classes = [];
    this.style = {};
  }
  hasClass(className) {
    return this.classes.includes(className);
  }
  /** Convert the fragment into a node. */
  toNode() {
    const frag = document.createDocumentFragment();
    for (let i = 0; i < this.children.length; i++) {
      frag.appendChild(this.children[i].toNode());
    }
    return frag;
  }
  /** Convert the fragment into HTML markup. */
  toMarkup() {
    let markup = "";
    for (let i = 0; i < this.children.length; i++) {
      markup += this.children[i].toMarkup();
    }
    return markup;
  }
  /**
   * Converts the math node into a string, similar to innerText. Applies to
   * MathDomNode's only.
   */
  toText() {
    const toText = (child) => child.toText();
    return this.children.map(toText).join("");
  }
};
var createClass = function(classes) {
  return classes.filter((cls) => cls).join(" ");
};
var initNode = function(classes, style) {
  this.classes = classes || [];
  this.attributes = {};
  this.style = style || {};
};
var toNode = function(tagName) {
  const node = document.createElement(tagName);
  node.className = createClass(this.classes);
  for (const style in this.style) {
    if (Object.prototype.hasOwnProperty.call(this.style, style)) {
      node.style[style] = this.style[style];
    }
  }
  for (const attr in this.attributes) {
    if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
      node.setAttribute(attr, this.attributes[attr]);
    }
  }
  for (let i = 0; i < this.children.length; i++) {
    node.appendChild(this.children[i].toNode());
  }
  return node;
};
var toMarkup = function(tagName) {
  let markup = `<${tagName}`;
  if (this.classes.length) {
    markup += ` class="${utils.escape(createClass(this.classes))}"`;
  }
  let styles = "";
  for (const style in this.style) {
    if (Object.prototype.hasOwnProperty.call(this.style, style)) {
      styles += `${utils.hyphenate(style)}:${this.style[style]};`;
    }
  }
  if (styles) {
    markup += ` style="${styles}"`;
  }
  for (const attr in this.attributes) {
    if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
      markup += ` ${attr}="${utils.escape(this.attributes[attr])}"`;
    }
  }
  markup += ">";
  for (let i = 0; i < this.children.length; i++) {
    markup += this.children[i].toMarkup();
  }
  markup += `</${tagName}>`;
  return markup;
};
var Span = class {
  constructor(classes, children, style) {
    initNode.call(this, classes, style);
    this.children = children || [];
  }
  setAttribute(attribute, value) {
    this.attributes[attribute] = value;
  }
  toNode() {
    return toNode.call(this, "span");
  }
  toMarkup() {
    return toMarkup.call(this, "span");
  }
};
var TextNode$1 = class TextNode {
  constructor(text2) {
    this.text = text2;
  }
  toNode() {
    return document.createTextNode(this.text);
  }
  toMarkup() {
    return utils.escape(this.text);
  }
};
var AnchorNode = class {
  constructor(href, classes, children) {
    this.href = href;
    this.classes = classes;
    this.children = children || [];
  }
  toNode() {
    const node = document.createElement("a");
    node.setAttribute("href", this.href);
    if (this.classes.length > 0) {
      node.className = createClass(this.classes);
    }
    for (let i = 0; i < this.children.length; i++) {
      node.appendChild(this.children[i].toNode());
    }
    return node;
  }
  toMarkup() {
    let markup = `<a href='${utils.escape(this.href)}'`;
    if (this.classes.length > 0) {
      markup += ` class="${utils.escape(createClass(this.classes))}"`;
    }
    markup += ">";
    for (let i = 0; i < this.children.length; i++) {
      markup += this.children[i].toMarkup();
    }
    markup += "</a>";
    return markup;
  }
};
var Img = class {
  constructor(src, alt, style) {
    this.alt = alt;
    this.src = src;
    this.classes = ["mord"];
    this.style = style;
  }
  hasClass(className) {
    return this.classes.includes(className);
  }
  toNode() {
    const node = document.createElement("img");
    node.src = this.src;
    node.alt = this.alt;
    node.className = "mord";
    for (const style in this.style) {
      if (Object.prototype.hasOwnProperty.call(this.style, style)) {
        node.style[style] = this.style[style];
      }
    }
    return node;
  }
  toMarkup() {
    let markup = `<img src='${this.src}' alt='${this.alt}'`;
    let styles = "";
    for (const style in this.style) {
      if (Object.prototype.hasOwnProperty.call(this.style, style)) {
        styles += `${utils.hyphenate(style)}:${this.style[style]};`;
      }
    }
    if (styles) {
      markup += ` style="${utils.escape(styles)}"`;
    }
    markup += ">";
    return markup;
  }
};
function newDocumentFragment(children) {
  return new DocumentFragment(children);
}
var MathNode = class {
  constructor(type, children, classes, style) {
    this.type = type;
    this.attributes = {};
    this.children = children || [];
    this.classes = classes || [];
    this.style = style || {};
    this.label = "";
  }
  /**
   * Sets an attribute on a MathML node. MathML depends on attributes to convey a
   * semantic content, so this is used heavily.
   */
  setAttribute(name, value) {
    this.attributes[name] = value;
  }
  /**
   * Gets an attribute on a MathML node.
   */
  getAttribute(name) {
    return this.attributes[name];
  }
  setLabel(value) {
    this.label = value;
  }
  /**
   * Converts the math node into a MathML-namespaced DOM element.
   */
  toNode() {
    const node = document.createElementNS("http://www.w3.org/1998/Math/MathML", this.type);
    for (const attr in this.attributes) {
      if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
        node.setAttribute(attr, this.attributes[attr]);
      }
    }
    if (this.classes.length > 0) {
      node.className = createClass(this.classes);
    }
    for (const style in this.style) {
      if (Object.prototype.hasOwnProperty.call(this.style, style)) {
        node.style[style] = this.style[style];
      }
    }
    for (let i = 0; i < this.children.length; i++) {
      node.appendChild(this.children[i].toNode());
    }
    return node;
  }
  /**
   * Converts the math node into an HTML markup string.
   */
  toMarkup() {
    let markup = "<" + this.type;
    for (const attr in this.attributes) {
      if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
        markup += " " + attr + '="';
        markup += utils.escape(this.attributes[attr]);
        markup += '"';
      }
    }
    if (this.classes.length > 0) {
      markup += ` class="${utils.escape(createClass(this.classes))}"`;
    }
    let styles = "";
    for (const style in this.style) {
      if (Object.prototype.hasOwnProperty.call(this.style, style)) {
        styles += `${utils.hyphenate(style)}:${this.style[style]};`;
      }
    }
    if (styles) {
      markup += ` style="${styles}"`;
    }
    markup += ">";
    for (let i = 0; i < this.children.length; i++) {
      markup += this.children[i].toMarkup();
    }
    markup += "</" + this.type + ">";
    return markup;
  }
  /**
   * Converts the math node into a string, similar to innerText, but escaped.
   */
  toText() {
    return this.children.map((child) => child.toText()).join("");
  }
};
var TextNode2 = class {
  constructor(text2) {
    this.text = text2;
  }
  /**
   * Converts the text node into a DOM text node.
   */
  toNode() {
    return document.createTextNode(this.text);
  }
  /**
   * Converts the text node into escaped HTML markup
   * (representing the text itself).
   */
  toMarkup() {
    return utils.escape(this.toText());
  }
  /**
   * Converts the text node into a string
   * (representing the text itself).
   */
  toText() {
    return this.text;
  }
};
var wrapWithMstyle = (expression) => {
  let node;
  if (expression.length === 1 && expression[0].type === "mrow") {
    node = expression.pop();
    node.type = "mstyle";
  } else {
    node = new MathNode("mstyle", expression);
  }
  return node;
};
var mathMLTree = {
  MathNode,
  TextNode: TextNode2,
  newDocumentFragment
};
var estimatedWidth = (node) => {
  let width = 0;
  if (node.body) {
    for (const item of node.body) {
      width += estimatedWidth(item);
    }
  } else if (node.type === "supsub") {
    width += estimatedWidth(node.base);
    if (node.sub) {
      width += 0.7 * estimatedWidth(node.sub);
    }
    if (node.sup) {
      width += 0.7 * estimatedWidth(node.sup);
    }
  } else if (node.type === "mathord" || node.type === "textord") {
    for (const ch of node.text.split("")) {
      const codePoint = ch.codePointAt(0);
      if (96 < codePoint && codePoint < 123 || 944 < codePoint && codePoint < 970) {
        width += 0.56;
      } else if (47 < codePoint && codePoint < 58) {
        width += 0.5;
      } else {
        width += 0.92;
      }
    }
  } else {
    width += 1;
  }
  return width;
};
var stretchyCodePoint = {
  widehat: "^",
  widecheck: "\u02C7",
  widetilde: "~",
  wideparen: "\u23DC",
  // \u23dc
  utilde: "~",
  overleftarrow: "\u2190",
  underleftarrow: "\u2190",
  xleftarrow: "\u2190",
  overrightarrow: "\u2192",
  underrightarrow: "\u2192",
  xrightarrow: "\u2192",
  underbrace: "\u23DF",
  overbrace: "\u23DE",
  overgroup: "\u23E0",
  overparen: "\u23DC",
  undergroup: "\u23E1",
  underparen: "\u23DD",
  overleftrightarrow: "\u2194",
  underleftrightarrow: "\u2194",
  xleftrightarrow: "\u2194",
  Overrightarrow: "\u21D2",
  xRightarrow: "\u21D2",
  overleftharpoon: "\u21BC",
  xleftharpoonup: "\u21BC",
  overrightharpoon: "\u21C0",
  xrightharpoonup: "\u21C0",
  xLeftarrow: "\u21D0",
  xLeftrightarrow: "\u21D4",
  xhookleftarrow: "\u21A9",
  xhookrightarrow: "\u21AA",
  xmapsto: "\u21A6",
  xrightharpoondown: "\u21C1",
  xleftharpoondown: "\u21BD",
  xtwoheadleftarrow: "\u219E",
  xtwoheadrightarrow: "\u21A0",
  xlongequal: "=",
  xrightleftarrows: "\u21C4",
  yields: "\u2192",
  yieldsLeft: "\u2190",
  mesomerism: "\u2194",
  longrightharpoonup: "\u21C0",
  longleftharpoondown: "\u21BD",
  eqrightharpoonup: "\u21C0",
  eqleftharpoondown: "\u21BD",
  "\\cdrightarrow": "\u2192",
  "\\cdleftarrow": "\u2190",
  "\\cdlongequal": "="
};
var mathMLnode = function(label) {
  const child = new mathMLTree.TextNode(stretchyCodePoint[label.slice(1)]);
  const node = new mathMLTree.MathNode("mo", [child]);
  node.setAttribute("stretchy", "true");
  return node;
};
var crookedWides = ["\\widetilde", "\\widehat", "\\widecheck", "\\utilde"];
var accentNode = (group) => {
  const mo = mathMLnode(group.label);
  if (crookedWides.includes(group.label)) {
    const width = estimatedWidth(group.base);
    if (1 < width && width < 1.6) {
      mo.classes.push("tml-crooked-2");
    } else if (1.6 <= width && width < 2.5) {
      mo.classes.push("tml-crooked-3");
    } else if (2.5 <= width) {
      mo.classes.push("tml-crooked-4");
    }
  }
  return mo;
};
var stretchy = {
  mathMLnode,
  accentNode
};
var ATOMS = {
  bin: 1,
  close: 1,
  inner: 1,
  open: 1,
  punct: 1,
  rel: 1
};
var NON_ATOMS = {
  "accent-token": 1,
  mathord: 1,
  "op-token": 1,
  spacing: 1,
  textord: 1
};
var symbols = {
  math: {},
  text: {}
};
function defineSymbol(mode, group, replace, name, acceptUnicodeChar) {
  symbols[mode][name] = { group, replace };
  if (acceptUnicodeChar && replace) {
    symbols[mode][replace] = symbols[mode][name];
  }
}
var math = "math";
var text = "text";
var accent = "accent-token";
var bin = "bin";
var close = "close";
var inner = "inner";
var mathord = "mathord";
var op = "op-token";
var open = "open";
var punct = "punct";
var rel = "rel";
var spacing = "spacing";
var textord = "textord";
defineSymbol(math, rel, "\u2261", "\\equiv", true);
defineSymbol(math, rel, "\u227A", "\\prec", true);
defineSymbol(math, rel, "\u227B", "\\succ", true);
defineSymbol(math, rel, "\u223C", "\\sim", true);
defineSymbol(math, rel, "\u27C2", "\\perp", true);
defineSymbol(math, rel, "\u2AAF", "\\preceq", true);
defineSymbol(math, rel, "\u2AB0", "\\succeq", true);
defineSymbol(math, rel, "\u2243", "\\simeq", true);
defineSymbol(math, rel, "\u224C", "\\backcong", true);
defineSymbol(math, rel, "|", "\\mid", true);
defineSymbol(math, rel, "\u226A", "\\ll", true);
defineSymbol(math, rel, "\u226B", "\\gg", true);
defineSymbol(math, rel, "\u224D", "\\asymp", true);
defineSymbol(math, rel, "\u2225", "\\parallel");
defineSymbol(math, rel, "\u2323", "\\smile", true);
defineSymbol(math, rel, "\u2291", "\\sqsubseteq", true);
defineSymbol(math, rel, "\u2292", "\\sqsupseteq", true);
defineSymbol(math, rel, "\u2250", "\\doteq", true);
defineSymbol(math, rel, "\u2322", "\\frown", true);
defineSymbol(math, rel, "\u220B", "\\ni", true);
defineSymbol(math, rel, "\u220C", "\\notni", true);
defineSymbol(math, rel, "\u221D", "\\propto", true);
defineSymbol(math, rel, "\u22A2", "\\vdash", true);
defineSymbol(math, rel, "\u22A3", "\\dashv", true);
defineSymbol(math, rel, "\u220B", "\\owns");
defineSymbol(math, rel, "\u2258", "\\arceq", true);
defineSymbol(math, rel, "\u2259", "\\wedgeq", true);
defineSymbol(math, rel, "\u225A", "\\veeeq", true);
defineSymbol(math, rel, "\u225B", "\\stareq", true);
defineSymbol(math, rel, "\u225D", "\\eqdef", true);
defineSymbol(math, rel, "\u225E", "\\measeq", true);
defineSymbol(math, rel, "\u225F", "\\questeq", true);
defineSymbol(math, rel, "\u2260", "\\ne", true);
defineSymbol(math, rel, "\u2260", "\\neq");
defineSymbol(math, rel, "\u2A75", "\\eqeq", true);
defineSymbol(math, rel, "\u2A76", "\\eqeqeq", true);
defineSymbol(math, rel, "\u2237", "\\dblcolon", true);
defineSymbol(math, rel, "\u2254", "\\coloneqq", true);
defineSymbol(math, rel, "\u2255", "\\eqqcolon", true);
defineSymbol(math, rel, "\u2239", "\\eqcolon", true);
defineSymbol(math, rel, "\u2A74", "\\Coloneqq", true);
defineSymbol(math, punct, ".", "\\ldotp");
defineSymbol(math, punct, "\xB7", "\\cdotp");
defineSymbol(math, textord, "#", "\\#");
defineSymbol(text, textord, "#", "\\#");
defineSymbol(math, textord, "&", "\\&");
defineSymbol(text, textord, "&", "\\&");
defineSymbol(math, textord, "\u2135", "\\aleph", true);
defineSymbol(math, textord, "\u2200", "\\forall", true);
defineSymbol(math, textord, "\u210F", "\\hbar", true);
defineSymbol(math, textord, "\u2203", "\\exists", true);
defineSymbol(math, bin, "\u2207", "\\nabla", true);
defineSymbol(math, textord, "\u266D", "\\flat", true);
defineSymbol(math, textord, "\u2113", "\\ell", true);
defineSymbol(math, textord, "\u266E", "\\natural", true);
defineSymbol(math, textord, "\u212B", "\\Angstrom", true);
defineSymbol(text, textord, "\u212B", "\\Angstrom", true);
defineSymbol(math, textord, "\u2663", "\\clubsuit", true);
defineSymbol(math, textord, "\u2667", "\\varclubsuit", true);
defineSymbol(math, textord, "\u2118", "\\wp", true);
defineSymbol(math, textord, "\u266F", "\\sharp", true);
defineSymbol(math, textord, "\u2662", "\\diamondsuit", true);
defineSymbol(math, textord, "\u2666", "\\vardiamondsuit", true);
defineSymbol(math, textord, "\u211C", "\\Re", true);
defineSymbol(math, textord, "\u2661", "\\heartsuit", true);
defineSymbol(math, textord, "\u2665", "\\varheartsuit", true);
defineSymbol(math, textord, "\u2111", "\\Im", true);
defineSymbol(math, textord, "\u2660", "\\spadesuit", true);
defineSymbol(math, textord, "\u2664", "\\varspadesuit", true);
defineSymbol(math, textord, "\u2640", "\\female", true);
defineSymbol(math, textord, "\u2642", "\\male", true);
defineSymbol(math, textord, "\xA7", "\\S", true);
defineSymbol(text, textord, "\xA7", "\\S");
defineSymbol(math, textord, "\xB6", "\\P", true);
defineSymbol(text, textord, "\xB6", "\\P");
defineSymbol(text, textord, "\u263A", "\\smiley", true);
defineSymbol(math, textord, "\u263A", "\\smiley", true);
defineSymbol(math, textord, "\u2020", "\\dag");
defineSymbol(text, textord, "\u2020", "\\dag");
defineSymbol(text, textord, "\u2020", "\\textdagger");
defineSymbol(math, textord, "\u2021", "\\ddag");
defineSymbol(text, textord, "\u2021", "\\ddag");
defineSymbol(text, textord, "\u2021", "\\textdaggerdbl");
defineSymbol(math, close, "\u23B1", "\\rmoustache", true);
defineSymbol(math, open, "\u23B0", "\\lmoustache", true);
defineSymbol(math, close, "\u27EF", "\\rgroup", true);
defineSymbol(math, open, "\u27EE", "\\lgroup", true);
defineSymbol(math, bin, "\u2213", "\\mp", true);
defineSymbol(math, bin, "\u2296", "\\ominus", true);
defineSymbol(math, bin, "\u228E", "\\uplus", true);
defineSymbol(math, bin, "\u2293", "\\sqcap", true);
defineSymbol(math, bin, "\u2217", "\\ast");
defineSymbol(math, bin, "\u2294", "\\sqcup", true);
defineSymbol(math, bin, "\u25EF", "\\bigcirc", true);
defineSymbol(math, bin, "\u2219", "\\bullet", true);
defineSymbol(math, bin, "\u2021", "\\ddagger");
defineSymbol(math, bin, "\u2240", "\\wr", true);
defineSymbol(math, bin, "\u2A3F", "\\amalg");
defineSymbol(math, bin, "&", "\\And");
defineSymbol(math, bin, "\u2AFD", "\\sslash", true);
defineSymbol(math, rel, "\u27F5", "\\longleftarrow", true);
defineSymbol(math, rel, "\u21D0", "\\Leftarrow", true);
defineSymbol(math, rel, "\u27F8", "\\Longleftarrow", true);
defineSymbol(math, rel, "\u27F6", "\\longrightarrow", true);
defineSymbol(math, rel, "\u21D2", "\\Rightarrow", true);
defineSymbol(math, rel, "\u27F9", "\\Longrightarrow", true);
defineSymbol(math, rel, "\u2194", "\\leftrightarrow", true);
defineSymbol(math, rel, "\u27F7", "\\longleftrightarrow", true);
defineSymbol(math, rel, "\u21D4", "\\Leftrightarrow", true);
defineSymbol(math, rel, "\u27FA", "\\Longleftrightarrow", true);
defineSymbol(math, rel, "\u21A4", "\\mapsfrom", true);
defineSymbol(math, rel, "\u21A6", "\\mapsto", true);
defineSymbol(math, rel, "\u27FC", "\\longmapsto", true);
defineSymbol(math, rel, "\u2197", "\\nearrow", true);
defineSymbol(math, rel, "\u21A9", "\\hookleftarrow", true);
defineSymbol(math, rel, "\u21AA", "\\hookrightarrow", true);
defineSymbol(math, rel, "\u2198", "\\searrow", true);
defineSymbol(math, rel, "\u21BC", "\\leftharpoonup", true);
defineSymbol(math, rel, "\u21C0", "\\rightharpoonup", true);
defineSymbol(math, rel, "\u2199", "\\swarrow", true);
defineSymbol(math, rel, "\u21BD", "\\leftharpoondown", true);
defineSymbol(math, rel, "\u21C1", "\\rightharpoondown", true);
defineSymbol(math, rel, "\u2196", "\\nwarrow", true);
defineSymbol(math, rel, "\u21CC", "\\rightleftharpoons", true);
defineSymbol(math, mathord, "\u21AF", "\\lightning", true);
defineSymbol(math, mathord, "\u220E", "\\QED", true);
defineSymbol(math, mathord, "\u2030", "\\permil", true);
defineSymbol(text, textord, "\u2030", "\\permil");
defineSymbol(math, mathord, "\u2609", "\\astrosun", true);
defineSymbol(math, mathord, "\u263C", "\\sun", true);
defineSymbol(math, mathord, "\u263E", "\\leftmoon", true);
defineSymbol(math, mathord, "\u263D", "\\rightmoon", true);
defineSymbol(math, mathord, "\u2295", "\\Earth");
defineSymbol(math, rel, "\u226E", "\\nless", true);
defineSymbol(math, rel, "\u2A87", "\\lneq", true);
defineSymbol(math, rel, "\u2268", "\\lneqq", true);
defineSymbol(math, rel, "\u2268\uFE00", "\\lvertneqq");
defineSymbol(math, rel, "\u22E6", "\\lnsim", true);
defineSymbol(math, rel, "\u2A89", "\\lnapprox", true);
defineSymbol(math, rel, "\u2280", "\\nprec", true);
defineSymbol(math, rel, "\u22E0", "\\npreceq", true);
defineSymbol(math, rel, "\u22E8", "\\precnsim", true);
defineSymbol(math, rel, "\u2AB9", "\\precnapprox", true);
defineSymbol(math, rel, "\u2241", "\\nsim", true);
defineSymbol(math, rel, "\u2224", "\\nmid", true);
defineSymbol(math, rel, "\u2224", "\\nshortmid");
defineSymbol(math, rel, "\u22AC", "\\nvdash", true);
defineSymbol(math, rel, "\u22AD", "\\nvDash", true);
defineSymbol(math, rel, "\u22EA", "\\ntriangleleft");
defineSymbol(math, rel, "\u22EC", "\\ntrianglelefteq", true);
defineSymbol(math, rel, "\u2284", "\\nsubset", true);
defineSymbol(math, rel, "\u2285", "\\nsupset", true);
defineSymbol(math, rel, "\u228A", "\\subsetneq", true);
defineSymbol(math, rel, "\u228A\uFE00", "\\varsubsetneq");
defineSymbol(math, rel, "\u2ACB", "\\subsetneqq", true);
defineSymbol(math, rel, "\u2ACB\uFE00", "\\varsubsetneqq");
defineSymbol(math, rel, "\u226F", "\\ngtr", true);
defineSymbol(math, rel, "\u2A88", "\\gneq", true);
defineSymbol(math, rel, "\u2269", "\\gneqq", true);
defineSymbol(math, rel, "\u2269\uFE00", "\\gvertneqq");
defineSymbol(math, rel, "\u22E7", "\\gnsim", true);
defineSymbol(math, rel, "\u2A8A", "\\gnapprox", true);
defineSymbol(math, rel, "\u2281", "\\nsucc", true);
defineSymbol(math, rel, "\u22E1", "\\nsucceq", true);
defineSymbol(math, rel, "\u22E9", "\\succnsim", true);
defineSymbol(math, rel, "\u2ABA", "\\succnapprox", true);
defineSymbol(math, rel, "\u2246", "\\ncong", true);
defineSymbol(math, rel, "\u2226", "\\nparallel", true);
defineSymbol(math, rel, "\u2226", "\\nshortparallel");
defineSymbol(math, rel, "\u22AF", "\\nVDash", true);
defineSymbol(math, rel, "\u22EB", "\\ntriangleright");
defineSymbol(math, rel, "\u22ED", "\\ntrianglerighteq", true);
defineSymbol(math, rel, "\u228B", "\\supsetneq", true);
defineSymbol(math, rel, "\u228B", "\\varsupsetneq");
defineSymbol(math, rel, "\u2ACC", "\\supsetneqq", true);
defineSymbol(math, rel, "\u2ACC\uFE00", "\\varsupsetneqq");
defineSymbol(math, rel, "\u22AE", "\\nVdash", true);
defineSymbol(math, rel, "\u2AB5", "\\precneqq", true);
defineSymbol(math, rel, "\u2AB6", "\\succneqq", true);
defineSymbol(math, bin, "\u22B4", "\\unlhd");
defineSymbol(math, bin, "\u22B5", "\\unrhd");
defineSymbol(math, rel, "\u219A", "\\nleftarrow", true);
defineSymbol(math, rel, "\u219B", "\\nrightarrow", true);
defineSymbol(math, rel, "\u21CD", "\\nLeftarrow", true);
defineSymbol(math, rel, "\u21CF", "\\nRightarrow", true);
defineSymbol(math, rel, "\u21AE", "\\nleftrightarrow", true);
defineSymbol(math, rel, "\u21CE", "\\nLeftrightarrow", true);
defineSymbol(math, rel, "\u25B3", "\\vartriangle");
defineSymbol(math, textord, "\u210F", "\\hslash");
defineSymbol(math, textord, "\u25BD", "\\triangledown");
defineSymbol(math, textord, "\u25CA", "\\lozenge");
defineSymbol(math, textord, "\u24C8", "\\circledS");
defineSymbol(math, textord, "\xAE", "\\circledR", true);
defineSymbol(text, textord, "\xAE", "\\circledR");
defineSymbol(text, textord, "\xAE", "\\textregistered");
defineSymbol(math, textord, "\u2221", "\\measuredangle", true);
defineSymbol(math, textord, "\u2204", "\\nexists");
defineSymbol(math, textord, "\u2127", "\\mho");
defineSymbol(math, textord, "\u2132", "\\Finv", true);
defineSymbol(math, textord, "\u2141", "\\Game", true);
defineSymbol(math, textord, "\u2035", "\\backprime");
defineSymbol(math, textord, "\u2036", "\\backdprime");
defineSymbol(math, textord, "\u2037", "\\backtrprime");
defineSymbol(math, textord, "\u25B2", "\\blacktriangle");
defineSymbol(math, textord, "\u25BC", "\\blacktriangledown");
defineSymbol(math, textord, "\u25A0", "\\blacksquare");
defineSymbol(math, textord, "\u29EB", "\\blacklozenge");
defineSymbol(math, textord, "\u2605", "\\bigstar");
defineSymbol(math, textord, "\u2222", "\\sphericalangle", true);
defineSymbol(math, textord, "\u2201", "\\complement", true);
defineSymbol(math, textord, "\xF0", "\\eth", true);
defineSymbol(text, textord, "\xF0", "\xF0");
defineSymbol(math, textord, "\u2571", "\\diagup");
defineSymbol(math, textord, "\u2572", "\\diagdown");
defineSymbol(math, textord, "\u25A1", "\\square");
defineSymbol(math, textord, "\u25A1", "\\Box");
defineSymbol(math, textord, "\u25CA", "\\Diamond");
defineSymbol(math, textord, "\xA5", "\\yen", true);
defineSymbol(text, textord, "\xA5", "\\yen", true);
defineSymbol(math, textord, "\u2713", "\\checkmark", true);
defineSymbol(text, textord, "\u2713", "\\checkmark");
defineSymbol(math, textord, "\u2717", "\\ballotx", true);
defineSymbol(text, textord, "\u2717", "\\ballotx");
defineSymbol(text, textord, "\u2022", "\\textbullet");
defineSymbol(math, textord, "\u2136", "\\beth", true);
defineSymbol(math, textord, "\u2138", "\\daleth", true);
defineSymbol(math, textord, "\u2137", "\\gimel", true);
defineSymbol(math, textord, "\u03DD", "\\digamma", true);
defineSymbol(math, textord, "\u03F0", "\\varkappa");
defineSymbol(math, open, "\u231C", "\\ulcorner", true);
defineSymbol(math, close, "\u231D", "\\urcorner", true);
defineSymbol(math, open, "\u231E", "\\llcorner", true);
defineSymbol(math, close, "\u231F", "\\lrcorner", true);
defineSymbol(math, rel, "\u2266", "\\leqq", true);
defineSymbol(math, rel, "\u2A7D", "\\leqslant", true);
defineSymbol(math, rel, "\u2A95", "\\eqslantless", true);
defineSymbol(math, rel, "\u2272", "\\lesssim", true);
defineSymbol(math, rel, "\u2A85", "\\lessapprox", true);
defineSymbol(math, rel, "\u224A", "\\approxeq", true);
defineSymbol(math, bin, "\u22D6", "\\lessdot");
defineSymbol(math, rel, "\u22D8", "\\lll", true);
defineSymbol(math, rel, "\u2276", "\\lessgtr", true);
defineSymbol(math, rel, "\u22DA", "\\lesseqgtr", true);
defineSymbol(math, rel, "\u2A8B", "\\lesseqqgtr", true);
defineSymbol(math, rel, "\u2251", "\\doteqdot");
defineSymbol(math, rel, "\u2253", "\\risingdotseq", true);
defineSymbol(math, rel, "\u2252", "\\fallingdotseq", true);
defineSymbol(math, rel, "\u223D", "\\backsim", true);
defineSymbol(math, rel, "\u22CD", "\\backsimeq", true);
defineSymbol(math, rel, "\u2AC5", "\\subseteqq", true);
defineSymbol(math, rel, "\u22D0", "\\Subset", true);
defineSymbol(math, rel, "\u228F", "\\sqsubset", true);
defineSymbol(math, rel, "\u227C", "\\preccurlyeq", true);
defineSymbol(math, rel, "\u22DE", "\\curlyeqprec", true);
defineSymbol(math, rel, "\u227E", "\\precsim", true);
defineSymbol(math, rel, "\u2AB7", "\\precapprox", true);
defineSymbol(math, rel, "\u22B2", "\\vartriangleleft");
defineSymbol(math, rel, "\u22B4", "\\trianglelefteq");
defineSymbol(math, rel, "\u22A8", "\\vDash", true);
defineSymbol(math, rel, "\u22AB", "\\VDash", true);
defineSymbol(math, rel, "\u22AA", "\\Vvdash", true);
defineSymbol(math, rel, "\u2323", "\\smallsmile");
defineSymbol(math, rel, "\u2322", "\\smallfrown");
defineSymbol(math, rel, "\u224F", "\\bumpeq", true);
defineSymbol(math, rel, "\u224E", "\\Bumpeq", true);
defineSymbol(math, rel, "\u2267", "\\geqq", true);
defineSymbol(math, rel, "\u2A7E", "\\geqslant", true);
defineSymbol(math, rel, "\u2A96", "\\eqslantgtr", true);
defineSymbol(math, rel, "\u2273", "\\gtrsim", true);
defineSymbol(math, rel, "\u2A86", "\\gtrapprox", true);
defineSymbol(math, bin, "\u22D7", "\\gtrdot");
defineSymbol(math, rel, "\u22D9", "\\ggg", true);
defineSymbol(math, rel, "\u2277", "\\gtrless", true);
defineSymbol(math, rel, "\u22DB", "\\gtreqless", true);
defineSymbol(math, rel, "\u2A8C", "\\gtreqqless", true);
defineSymbol(math, rel, "\u2256", "\\eqcirc", true);
defineSymbol(math, rel, "\u2257", "\\circeq", true);
defineSymbol(math, rel, "\u225C", "\\triangleq", true);
defineSymbol(math, rel, "\u223C", "\\thicksim");
defineSymbol(math, rel, "\u2248", "\\thickapprox");
defineSymbol(math, rel, "\u2AC6", "\\supseteqq", true);
defineSymbol(math, rel, "\u22D1", "\\Supset", true);
defineSymbol(math, rel, "\u2290", "\\sqsupset", true);
defineSymbol(math, rel, "\u227D", "\\succcurlyeq", true);
defineSymbol(math, rel, "\u22DF", "\\curlyeqsucc", true);
defineSymbol(math, rel, "\u227F", "\\succsim", true);
defineSymbol(math, rel, "\u2AB8", "\\succapprox", true);
defineSymbol(math, rel, "\u22B3", "\\vartriangleright");
defineSymbol(math, rel, "\u22B5", "\\trianglerighteq");
defineSymbol(math, rel, "\u22A9", "\\Vdash", true);
defineSymbol(math, rel, "\u2223", "\\shortmid");
defineSymbol(math, rel, "\u2225", "\\shortparallel");
defineSymbol(math, rel, "\u226C", "\\between", true);
defineSymbol(math, rel, "\u22D4", "\\pitchfork", true);
defineSymbol(math, rel, "\u221D", "\\varpropto");
defineSymbol(math, rel, "\u25C0", "\\blacktriangleleft");
defineSymbol(math, rel, "\u2234", "\\therefore", true);
defineSymbol(math, rel, "\u220D", "\\backepsilon");
defineSymbol(math, rel, "\u25B6", "\\blacktriangleright");
defineSymbol(math, rel, "\u2235", "\\because", true);
defineSymbol(math, rel, "\u22D8", "\\llless");
defineSymbol(math, rel, "\u22D9", "\\gggtr");
defineSymbol(math, bin, "\u22B2", "\\lhd");
defineSymbol(math, bin, "\u22B3", "\\rhd");
defineSymbol(math, rel, "\u2242", "\\eqsim", true);
defineSymbol(math, rel, "\u2251", "\\Doteq", true);
defineSymbol(math, rel, "\u297D", "\\strictif", true);
defineSymbol(math, rel, "\u297C", "\\strictfi", true);
defineSymbol(math, bin, "\u2214", "\\dotplus", true);
defineSymbol(math, bin, "\u2216", "\\smallsetminus");
defineSymbol(math, bin, "\u22D2", "\\Cap", true);
defineSymbol(math, bin, "\u22D3", "\\Cup", true);
defineSymbol(math, bin, "\u2A5E", "\\doublebarwedge", true);
defineSymbol(math, bin, "\u229F", "\\boxminus", true);
defineSymbol(math, bin, "\u229E", "\\boxplus", true);
defineSymbol(math, bin, "\u29C4", "\\boxslash", true);
defineSymbol(math, bin, "\u22C7", "\\divideontimes", true);
defineSymbol(math, bin, "\u22C9", "\\ltimes", true);
defineSymbol(math, bin, "\u22CA", "\\rtimes", true);
defineSymbol(math, bin, "\u22CB", "\\leftthreetimes", true);
defineSymbol(math, bin, "\u22CC", "\\rightthreetimes", true);
defineSymbol(math, bin, "\u22CF", "\\curlywedge", true);
defineSymbol(math, bin, "\u22CE", "\\curlyvee", true);
defineSymbol(math, bin, "\u229D", "\\circleddash", true);
defineSymbol(math, bin, "\u229B", "\\circledast", true);
defineSymbol(math, bin, "\u22BA", "\\intercal", true);
defineSymbol(math, bin, "\u22D2", "\\doublecap");
defineSymbol(math, bin, "\u22D3", "\\doublecup");
defineSymbol(math, bin, "\u22A0", "\\boxtimes", true);
defineSymbol(math, bin, "\u22C8", "\\bowtie", true);
defineSymbol(math, bin, "\u22C8", "\\Join");
defineSymbol(math, bin, "\u27D5", "\\leftouterjoin", true);
defineSymbol(math, bin, "\u27D6", "\\rightouterjoin", true);
defineSymbol(math, bin, "\u27D7", "\\fullouterjoin", true);
defineSymbol(math, bin, "\u2238", "\\dotminus", true);
defineSymbol(math, bin, "\u27D1", "\\wedgedot", true);
defineSymbol(math, bin, "\u27C7", "\\veedot", true);
defineSymbol(math, bin, "\u2A62", "\\doublebarvee", true);
defineSymbol(math, bin, "\u2A63", "\\veedoublebar", true);
defineSymbol(math, bin, "\u2A5F", "\\wedgebar", true);
defineSymbol(math, bin, "\u2A60", "\\wedgedoublebar", true);
defineSymbol(math, bin, "\u2A54", "\\Vee", true);
defineSymbol(math, bin, "\u2A53", "\\Wedge", true);
defineSymbol(math, bin, "\u2A43", "\\barcap", true);
defineSymbol(math, bin, "\u2A42", "\\barcup", true);
defineSymbol(math, bin, "\u2A48", "\\capbarcup", true);
defineSymbol(math, bin, "\u2A40", "\\capdot", true);
defineSymbol(math, bin, "\u2A47", "\\capovercup", true);
defineSymbol(math, bin, "\u2A46", "\\cupovercap", true);
defineSymbol(math, bin, "\u2A4D", "\\closedvarcap", true);
defineSymbol(math, bin, "\u2A4C", "\\closedvarcup", true);
defineSymbol(math, bin, "\u2A2A", "\\minusdot", true);
defineSymbol(math, bin, "\u2A2B", "\\minusfdots", true);
defineSymbol(math, bin, "\u2A2C", "\\minusrdots", true);
defineSymbol(math, bin, "\u22BB", "\\Xor", true);
defineSymbol(math, bin, "\u22BC", "\\Nand", true);
defineSymbol(math, bin, "\u22BD", "\\Nor", true);
defineSymbol(math, bin, "\u22BD", "\\barvee");
defineSymbol(math, bin, "\u2AF4", "\\interleave", true);
defineSymbol(math, bin, "\u29E2", "\\shuffle", true);
defineSymbol(math, bin, "\u2AF6", "\\threedotcolon", true);
defineSymbol(math, bin, "\u2982", "\\typecolon", true);
defineSymbol(math, bin, "\u223E", "\\invlazys", true);
defineSymbol(math, bin, "\u2A4B", "\\twocaps", true);
defineSymbol(math, bin, "\u2A4A", "\\twocups", true);
defineSymbol(math, bin, "\u2A4E", "\\Sqcap", true);
defineSymbol(math, bin, "\u2A4F", "\\Sqcup", true);
defineSymbol(math, bin, "\u2A56", "\\veeonvee", true);
defineSymbol(math, bin, "\u2A55", "\\wedgeonwedge", true);
defineSymbol(math, bin, "\u29D7", "\\blackhourglass", true);
defineSymbol(math, bin, "\u29C6", "\\boxast", true);
defineSymbol(math, bin, "\u29C8", "\\boxbox", true);
defineSymbol(math, bin, "\u29C7", "\\boxcircle", true);
defineSymbol(math, bin, "\u229C", "\\circledequal", true);
defineSymbol(math, bin, "\u29B7", "\\circledparallel", true);
defineSymbol(math, bin, "\u29B6", "\\circledvert", true);
defineSymbol(math, bin, "\u29B5", "\\circlehbar", true);
defineSymbol(math, bin, "\u27E1", "\\concavediamond", true);
defineSymbol(math, bin, "\u27E2", "\\concavediamondtickleft", true);
defineSymbol(math, bin, "\u27E3", "\\concavediamondtickright", true);
defineSymbol(math, bin, "\u22C4", "\\diamond", true);
defineSymbol(math, bin, "\u29D6", "\\hourglass", true);
defineSymbol(math, bin, "\u27E0", "\\lozengeminus", true);
defineSymbol(math, bin, "\u233D", "\\obar", true);
defineSymbol(math, bin, "\u29B8", "\\obslash", true);
defineSymbol(math, bin, "\u2A38", "\\odiv", true);
defineSymbol(math, bin, "\u29C1", "\\ogreaterthan", true);
defineSymbol(math, bin, "\u29C0", "\\olessthan", true);
defineSymbol(math, bin, "\u29B9", "\\operp", true);
defineSymbol(math, bin, "\u2A37", "\\Otimes", true);
defineSymbol(math, bin, "\u2A36", "\\otimeshat", true);
defineSymbol(math, bin, "\u22C6", "\\star", true);
defineSymbol(math, bin, "\u25B3", "\\triangle", true);
defineSymbol(math, bin, "\u2A3A", "\\triangleminus", true);
defineSymbol(math, bin, "\u2A39", "\\triangleplus", true);
defineSymbol(math, bin, "\u2A3B", "\\triangletimes", true);
defineSymbol(math, bin, "\u27E4", "\\whitesquaretickleft", true);
defineSymbol(math, bin, "\u27E5", "\\whitesquaretickright", true);
defineSymbol(math, bin, "\u2A33", "\\smashtimes", true);
defineSymbol(math, rel, "\u21E2", "\\dashrightarrow", true);
defineSymbol(math, rel, "\u21E0", "\\dashleftarrow", true);
defineSymbol(math, rel, "\u21C7", "\\leftleftarrows", true);
defineSymbol(math, rel, "\u21C6", "\\leftrightarrows", true);
defineSymbol(math, rel, "\u21DA", "\\Lleftarrow", true);
defineSymbol(math, rel, "\u219E", "\\twoheadleftarrow", true);
defineSymbol(math, rel, "\u21A2", "\\leftarrowtail", true);
defineSymbol(math, rel, "\u21AB", "\\looparrowleft", true);
defineSymbol(math, rel, "\u21CB", "\\leftrightharpoons", true);
defineSymbol(math, rel, "\u21B6", "\\curvearrowleft", true);
defineSymbol(math, rel, "\u21BA", "\\circlearrowleft", true);
defineSymbol(math, rel, "\u21B0", "\\Lsh", true);
defineSymbol(math, rel, "\u21C8", "\\upuparrows", true);
defineSymbol(math, rel, "\u21BF", "\\upharpoonleft", true);
defineSymbol(math, rel, "\u21C3", "\\downharpoonleft", true);
defineSymbol(math, rel, "\u22B6", "\\origof", true);
defineSymbol(math, rel, "\u22B7", "\\imageof", true);
defineSymbol(math, rel, "\u22B8", "\\multimap", true);
defineSymbol(math, rel, "\u21AD", "\\leftrightsquigarrow", true);
defineSymbol(math, rel, "\u21C9", "\\rightrightarrows", true);
defineSymbol(math, rel, "\u21C4", "\\rightleftarrows", true);
defineSymbol(math, rel, "\u21A0", "\\twoheadrightarrow", true);
defineSymbol(math, rel, "\u21A3", "\\rightarrowtail", true);
defineSymbol(math, rel, "\u21AC", "\\looparrowright", true);
defineSymbol(math, rel, "\u21B7", "\\curvearrowright", true);
defineSymbol(math, rel, "\u21BB", "\\circlearrowright", true);
defineSymbol(math, rel, "\u21B1", "\\Rsh", true);
defineSymbol(math, rel, "\u21CA", "\\downdownarrows", true);
defineSymbol(math, rel, "\u21BE", "\\upharpoonright", true);
defineSymbol(math, rel, "\u21C2", "\\downharpoonright", true);
defineSymbol(math, rel, "\u21DD", "\\rightsquigarrow", true);
defineSymbol(math, rel, "\u21DD", "\\leadsto");
defineSymbol(math, rel, "\u21DB", "\\Rrightarrow", true);
defineSymbol(math, rel, "\u21BE", "\\restriction");
defineSymbol(math, textord, "\u2018", "`");
defineSymbol(math, textord, "$", "\\$");
defineSymbol(text, textord, "$", "\\$");
defineSymbol(text, textord, "$", "\\textdollar");
defineSymbol(math, textord, "\xA2", "\\cent");
defineSymbol(text, textord, "\xA2", "\\cent");
defineSymbol(math, textord, "%", "\\%");
defineSymbol(text, textord, "%", "\\%");
defineSymbol(math, textord, "_", "\\_");
defineSymbol(text, textord, "_", "\\_");
defineSymbol(text, textord, "_", "\\textunderscore");
defineSymbol(text, textord, "\u2423", "\\textvisiblespace", true);
defineSymbol(math, textord, "\u2220", "\\angle", true);
defineSymbol(math, textord, "\u221E", "\\infty", true);
defineSymbol(math, textord, "\u2032", "\\prime");
defineSymbol(math, textord, "\u2033", "\\dprime");
defineSymbol(math, textord, "\u2034", "\\trprime");
defineSymbol(math, textord, "\u2057", "\\qprime");
defineSymbol(math, textord, "\u25B3", "\\triangle");
defineSymbol(text, textord, "\u0391", "\\Alpha", true);
defineSymbol(text, textord, "\u0392", "\\Beta", true);
defineSymbol(text, textord, "\u0393", "\\Gamma", true);
defineSymbol(text, textord, "\u0394", "\\Delta", true);
defineSymbol(text, textord, "\u0395", "\\Epsilon", true);
defineSymbol(text, textord, "\u0396", "\\Zeta", true);
defineSymbol(text, textord, "\u0397", "\\Eta", true);
defineSymbol(text, textord, "\u0398", "\\Theta", true);
defineSymbol(text, textord, "\u0399", "\\Iota", true);
defineSymbol(text, textord, "\u039A", "\\Kappa", true);
defineSymbol(text, textord, "\u039B", "\\Lambda", true);
defineSymbol(text, textord, "\u039C", "\\Mu", true);
defineSymbol(text, textord, "\u039D", "\\Nu", true);
defineSymbol(text, textord, "\u039E", "\\Xi", true);
defineSymbol(text, textord, "\u039F", "\\Omicron", true);
defineSymbol(text, textord, "\u03A0", "\\Pi", true);
defineSymbol(text, textord, "\u03A1", "\\Rho", true);
defineSymbol(text, textord, "\u03A3", "\\Sigma", true);
defineSymbol(text, textord, "\u03A4", "\\Tau", true);
defineSymbol(text, textord, "\u03A5", "\\Upsilon", true);
defineSymbol(text, textord, "\u03A6", "\\Phi", true);
defineSymbol(text, textord, "\u03A7", "\\Chi", true);
defineSymbol(text, textord, "\u03A8", "\\Psi", true);
defineSymbol(text, textord, "\u03A9", "\\Omega", true);
defineSymbol(math, mathord, "\u0391", "\\Alpha", true);
defineSymbol(math, mathord, "\u0392", "\\Beta", true);
defineSymbol(math, mathord, "\u0393", "\\Gamma", true);
defineSymbol(math, mathord, "\u0394", "\\Delta", true);
defineSymbol(math, mathord, "\u0395", "\\Epsilon", true);
defineSymbol(math, mathord, "\u0396", "\\Zeta", true);
defineSymbol(math, mathord, "\u0397", "\\Eta", true);
defineSymbol(math, mathord, "\u0398", "\\Theta", true);
defineSymbol(math, mathord, "\u0399", "\\Iota", true);
defineSymbol(math, mathord, "\u039A", "\\Kappa", true);
defineSymbol(math, mathord, "\u039B", "\\Lambda", true);
defineSymbol(math, mathord, "\u039C", "\\Mu", true);
defineSymbol(math, mathord, "\u039D", "\\Nu", true);
defineSymbol(math, mathord, "\u039E", "\\Xi", true);
defineSymbol(math, mathord, "\u039F", "\\Omicron", true);
defineSymbol(math, mathord, "\u03A0", "\\Pi", true);
defineSymbol(math, mathord, "\u03A1", "\\Rho", true);
defineSymbol(math, mathord, "\u03A3", "\\Sigma", true);
defineSymbol(math, mathord, "\u03A4", "\\Tau", true);
defineSymbol(math, mathord, "\u03A5", "\\Upsilon", true);
defineSymbol(math, mathord, "\u03A6", "\\Phi", true);
defineSymbol(math, mathord, "\u03A7", "\\Chi", true);
defineSymbol(math, mathord, "\u03A8", "\\Psi", true);
defineSymbol(math, mathord, "\u03A9", "\\Omega", true);
defineSymbol(math, open, "\xAC", "\\neg", true);
defineSymbol(math, open, "\xAC", "\\lnot");
defineSymbol(math, textord, "\u22A4", "\\top");
defineSymbol(math, textord, "\u22A5", "\\bot");
defineSymbol(math, textord, "\u2205", "\\emptyset");
defineSymbol(math, textord, "\u2300", "\\varnothing");
defineSymbol(math, mathord, "\u03B1", "\\alpha", true);
defineSymbol(math, mathord, "\u03B2", "\\beta", true);
defineSymbol(math, mathord, "\u03B3", "\\gamma", true);
defineSymbol(math, mathord, "\u03B4", "\\delta", true);
defineSymbol(math, mathord, "\u03F5", "\\epsilon", true);
defineSymbol(math, mathord, "\u03B6", "\\zeta", true);
defineSymbol(math, mathord, "\u03B7", "\\eta", true);
defineSymbol(math, mathord, "\u03B8", "\\theta", true);
defineSymbol(math, mathord, "\u03B9", "\\iota", true);
defineSymbol(math, mathord, "\u03BA", "\\kappa", true);
defineSymbol(math, mathord, "\u03BB", "\\lambda", true);
defineSymbol(math, mathord, "\u03BC", "\\mu", true);
defineSymbol(math, mathord, "\u03BD", "\\nu", true);
defineSymbol(math, mathord, "\u03BE", "\\xi", true);
defineSymbol(math, mathord, "\u03BF", "\\omicron", true);
defineSymbol(math, mathord, "\u03C0", "\\pi", true);
defineSymbol(math, mathord, "\u03C1", "\\rho", true);
defineSymbol(math, mathord, "\u03C3", "\\sigma", true);
defineSymbol(math, mathord, "\u03C4", "\\tau", true);
defineSymbol(math, mathord, "\u03C5", "\\upsilon", true);
defineSymbol(math, mathord, "\u03D5", "\\phi", true);
defineSymbol(math, mathord, "\u03C7", "\\chi", true);
defineSymbol(math, mathord, "\u03C8", "\\psi", true);
defineSymbol(math, mathord, "\u03C9", "\\omega", true);
defineSymbol(math, mathord, "\u03B5", "\\varepsilon", true);
defineSymbol(math, mathord, "\u03D1", "\\vartheta", true);
defineSymbol(math, mathord, "\u03D6", "\\varpi", true);
defineSymbol(math, mathord, "\u03F1", "\\varrho", true);
defineSymbol(math, mathord, "\u03C2", "\\varsigma", true);
defineSymbol(math, mathord, "\u03C6", "\\varphi", true);
defineSymbol(math, mathord, "\u03D8", "\\Coppa", true);
defineSymbol(math, mathord, "\u03D9", "\\coppa", true);
defineSymbol(math, mathord, "\u03D9", "\\varcoppa", true);
defineSymbol(math, mathord, "\u03DE", "\\Koppa", true);
defineSymbol(math, mathord, "\u03DF", "\\koppa", true);
defineSymbol(math, mathord, "\u03E0", "\\Sampi", true);
defineSymbol(math, mathord, "\u03E1", "\\sampi", true);
defineSymbol(math, mathord, "\u03DA", "\\Stigma", true);
defineSymbol(math, mathord, "\u03DB", "\\stigma", true);
defineSymbol(math, mathord, "\u2AEB", "\\Bot");
defineSymbol(math, bin, "\u2217", "\u2217", true);
defineSymbol(math, bin, "+", "+");
defineSymbol(math, bin, "\u2217", "*");
defineSymbol(math, bin, "\u2044", "/", true);
defineSymbol(math, bin, "\u2044", "\u2044");
defineSymbol(math, bin, "\u2212", "-", true);
defineSymbol(math, bin, "\u22C5", "\\cdot", true);
defineSymbol(math, bin, "\u2218", "\\circ", true);
defineSymbol(math, bin, "\xF7", "\\div", true);
defineSymbol(math, bin, "\xB1", "\\pm", true);
defineSymbol(math, bin, "\xD7", "\\times", true);
defineSymbol(math, bin, "\u2229", "\\cap", true);
defineSymbol(math, bin, "\u222A", "\\cup", true);
defineSymbol(math, bin, "\u2216", "\\setminus", true);
defineSymbol(math, bin, "\u2227", "\\land");
defineSymbol(math, bin, "\u2228", "\\lor");
defineSymbol(math, bin, "\u2227", "\\wedge", true);
defineSymbol(math, bin, "\u2228", "\\vee", true);
defineSymbol(math, open, "\u27E6", "\\llbracket", true);
defineSymbol(math, close, "\u27E7", "\\rrbracket", true);
defineSymbol(math, open, "\u27E8", "\\langle", true);
defineSymbol(math, open, "\u27EA", "\\lAngle", true);
defineSymbol(math, open, "\u2989", "\\llangle", true);
defineSymbol(math, open, "|", "\\lvert");
defineSymbol(math, open, "\u2016", "\\lVert", true);
defineSymbol(math, textord, "!", "\\oc");
defineSymbol(math, textord, "?", "\\wn");
defineSymbol(math, textord, "\u2193", "\\shpos");
defineSymbol(math, textord, "\u2195", "\\shift");
defineSymbol(math, textord, "\u2191", "\\shneg");
defineSymbol(math, close, "?", "?");
defineSymbol(math, close, "!", "!");
defineSymbol(math, close, "\u203C", "\u203C");
defineSymbol(math, close, "\u27E9", "\\rangle", true);
defineSymbol(math, close, "\u27EB", "\\rAngle", true);
defineSymbol(math, close, "\u298A", "\\rrangle", true);
defineSymbol(math, close, "|", "\\rvert");
defineSymbol(math, close, "\u2016", "\\rVert");
defineSymbol(math, open, "\u2983", "\\lBrace", true);
defineSymbol(math, close, "\u2984", "\\rBrace", true);
defineSymbol(math, rel, "=", "\\equal", true);
defineSymbol(math, rel, ":", ":");
defineSymbol(math, rel, "\u2248", "\\approx", true);
defineSymbol(math, rel, "\u2245", "\\cong", true);
defineSymbol(math, rel, "\u2265", "\\ge");
defineSymbol(math, rel, "\u2265", "\\geq", true);
defineSymbol(math, rel, "\u2190", "\\gets");
defineSymbol(math, rel, ">", "\\gt", true);
defineSymbol(math, rel, "\u2208", "\\in", true);
defineSymbol(math, rel, "\u2209", "\\notin", true);
defineSymbol(math, rel, "\uE020", "\\@not");
defineSymbol(math, rel, "\u2282", "\\subset", true);
defineSymbol(math, rel, "\u2283", "\\supset", true);
defineSymbol(math, rel, "\u2286", "\\subseteq", true);
defineSymbol(math, rel, "\u2287", "\\supseteq", true);
defineSymbol(math, rel, "\u2288", "\\nsubseteq", true);
defineSymbol(math, rel, "\u2288", "\\nsubseteqq");
defineSymbol(math, rel, "\u2289", "\\nsupseteq", true);
defineSymbol(math, rel, "\u2289", "\\nsupseteqq");
defineSymbol(math, rel, "\u22A8", "\\models");
defineSymbol(math, rel, "\u2190", "\\leftarrow", true);
defineSymbol(math, rel, "\u2264", "\\le");
defineSymbol(math, rel, "\u2264", "\\leq", true);
defineSymbol(math, rel, "<", "\\lt", true);
defineSymbol(math, rel, "\u2192", "\\rightarrow", true);
defineSymbol(math, rel, "\u2192", "\\to");
defineSymbol(math, rel, "\u2271", "\\ngeq", true);
defineSymbol(math, rel, "\u2271", "\\ngeqq");
defineSymbol(math, rel, "\u2271", "\\ngeqslant");
defineSymbol(math, rel, "\u2270", "\\nleq", true);
defineSymbol(math, rel, "\u2270", "\\nleqq");
defineSymbol(math, rel, "\u2270", "\\nleqslant");
defineSymbol(math, rel, "\u2AEB", "\\Perp", true);
defineSymbol(math, spacing, "\xA0", "\\ ");
defineSymbol(math, spacing, "\xA0", "\\space");
defineSymbol(math, spacing, "\xA0", "\\nobreakspace");
defineSymbol(text, spacing, "\xA0", "\\ ");
defineSymbol(text, spacing, "\xA0", " ");
defineSymbol(text, spacing, "\xA0", "\\space");
defineSymbol(text, spacing, "\xA0", "\\nobreakspace");
defineSymbol(math, spacing, null, "\\nobreak");
defineSymbol(math, spacing, null, "\\allowbreak");
defineSymbol(math, punct, ",", ",");
defineSymbol(text, punct, ":", ":");
defineSymbol(math, punct, ";", ";");
defineSymbol(math, bin, "\u22BC", "\\barwedge");
defineSymbol(math, bin, "\u22BB", "\\veebar");
defineSymbol(math, bin, "\u2299", "\\odot", true);
defineSymbol(math, bin, "\u2295\uFE0E", "\\oplus");
defineSymbol(math, bin, "\u2297", "\\otimes", true);
defineSymbol(math, textord, "\u2202", "\\partial", true);
defineSymbol(math, bin, "\u2298", "\\oslash", true);
defineSymbol(math, bin, "\u229A", "\\circledcirc", true);
defineSymbol(math, bin, "\u22A1", "\\boxdot", true);
defineSymbol(math, bin, "\u25B3", "\\bigtriangleup");
defineSymbol(math, bin, "\u25BD", "\\bigtriangledown");
defineSymbol(math, bin, "\u2020", "\\dagger");
defineSymbol(math, bin, "\u22C4", "\\diamond");
defineSymbol(math, bin, "\u25C3", "\\triangleleft");
defineSymbol(math, bin, "\u25B9", "\\triangleright");
defineSymbol(math, open, "{", "\\{");
defineSymbol(text, textord, "{", "\\{");
defineSymbol(text, textord, "{", "\\textbraceleft");
defineSymbol(math, close, "}", "\\}");
defineSymbol(text, textord, "}", "\\}");
defineSymbol(text, textord, "}", "\\textbraceright");
defineSymbol(math, open, "{", "\\lbrace");
defineSymbol(math, close, "}", "\\rbrace");
defineSymbol(math, open, "[", "\\lbrack", true);
defineSymbol(text, textord, "[", "\\lbrack", true);
defineSymbol(math, close, "]", "\\rbrack", true);
defineSymbol(text, textord, "]", "\\rbrack", true);
defineSymbol(math, open, "(", "\\lparen", true);
defineSymbol(math, close, ")", "\\rparen", true);
defineSymbol(math, open, "\u2987", "\\llparenthesis", true);
defineSymbol(math, close, "\u2988", "\\rrparenthesis", true);
defineSymbol(text, textord, "<", "\\textless", true);
defineSymbol(text, textord, ">", "\\textgreater", true);
defineSymbol(math, open, "\u230A", "\\lfloor", true);
defineSymbol(math, close, "\u230B", "\\rfloor", true);
defineSymbol(math, open, "\u2308", "\\lceil", true);
defineSymbol(math, close, "\u2309", "\\rceil", true);
defineSymbol(math, textord, "\\", "\\backslash");
defineSymbol(math, textord, "|", "|");
defineSymbol(math, textord, "|", "\\vert");
defineSymbol(text, textord, "|", "\\textbar", true);
defineSymbol(math, textord, "\u2016", "\\|");
defineSymbol(math, textord, "\u2016", "\\Vert");
defineSymbol(text, textord, "\u2016", "\\textbardbl");
defineSymbol(text, textord, "~", "\\textasciitilde");
defineSymbol(text, textord, "\\", "\\textbackslash");
defineSymbol(text, textord, "^", "\\textasciicircum");
defineSymbol(math, rel, "\u2191", "\\uparrow", true);
defineSymbol(math, rel, "\u21D1", "\\Uparrow", true);
defineSymbol(math, rel, "\u2193", "\\downarrow", true);
defineSymbol(math, rel, "\u21D3", "\\Downarrow", true);
defineSymbol(math, rel, "\u2195", "\\updownarrow", true);
defineSymbol(math, rel, "\u21D5", "\\Updownarrow", true);
defineSymbol(math, op, "\u2210", "\\coprod");
defineSymbol(math, op, "\u22C1", "\\bigvee");
defineSymbol(math, op, "\u22C0", "\\bigwedge");
defineSymbol(math, op, "\u2A04", "\\biguplus");
defineSymbol(math, op, "\u2A04", "\\bigcupplus");
defineSymbol(math, op, "\u2A03", "\\bigcupdot");
defineSymbol(math, op, "\u2A07", "\\bigdoublevee");
defineSymbol(math, op, "\u2A08", "\\bigdoublewedge");
defineSymbol(math, op, "\u22C2", "\\bigcap");
defineSymbol(math, op, "\u22C3", "\\bigcup");
defineSymbol(math, op, "\u222B", "\\int");
defineSymbol(math, op, "\u222B", "\\intop");
defineSymbol(math, op, "\u222C", "\\iint");
defineSymbol(math, op, "\u222D", "\\iiint");
defineSymbol(math, op, "\u220F", "\\prod");
defineSymbol(math, op, "\u2211", "\\sum");
defineSymbol(math, op, "\u2A02", "\\bigotimes");
defineSymbol(math, op, "\u2A01", "\\bigoplus");
defineSymbol(math, op, "\u2A00", "\\bigodot");
defineSymbol(math, op, "\u2A09", "\\bigtimes");
defineSymbol(math, op, "\u222E", "\\oint");
defineSymbol(math, op, "\u222F", "\\oiint");
defineSymbol(math, op, "\u2230", "\\oiiint");
defineSymbol(math, op, "\u2231", "\\intclockwise");
defineSymbol(math, op, "\u2232", "\\varointclockwise");
defineSymbol(math, op, "\u2A0C", "\\iiiint");
defineSymbol(math, op, "\u2A0D", "\\intbar");
defineSymbol(math, op, "\u2A0E", "\\intBar");
defineSymbol(math, op, "\u2A0F", "\\fint");
defineSymbol(math, op, "\u2A12", "\\rppolint");
defineSymbol(math, op, "\u2A13", "\\scpolint");
defineSymbol(math, op, "\u2A15", "\\pointint");
defineSymbol(math, op, "\u2A16", "\\sqint");
defineSymbol(math, op, "\u2A17", "\\intlarhk");
defineSymbol(math, op, "\u2A18", "\\intx");
defineSymbol(math, op, "\u2A19", "\\intcap");
defineSymbol(math, op, "\u2A1A", "\\intcup");
defineSymbol(math, op, "\u2A05", "\\bigsqcap");
defineSymbol(math, op, "\u2A06", "\\bigsqcup");
defineSymbol(math, op, "\u222B", "\\smallint");
defineSymbol(text, inner, "\u2026", "\\textellipsis");
defineSymbol(math, inner, "\u2026", "\\mathellipsis");
defineSymbol(text, inner, "\u2026", "\\ldots", true);
defineSymbol(math, inner, "\u2026", "\\ldots", true);
defineSymbol(math, inner, "\u22F0", "\\iddots", true);
defineSymbol(math, inner, "\u22EF", "\\@cdots", true);
defineSymbol(math, inner, "\u22F1", "\\ddots", true);
defineSymbol(math, textord, "\u22EE", "\\varvdots");
defineSymbol(text, textord, "\u22EE", "\\varvdots");
defineSymbol(math, accent, "\u02CA", "\\acute");
defineSymbol(math, accent, "`", "\\grave");
defineSymbol(math, accent, "\xA8", "\\ddot");
defineSymbol(math, accent, "\u2026", "\\dddot");
defineSymbol(math, accent, "\u2026.", "\\ddddot");
defineSymbol(math, accent, "~", "\\tilde");
defineSymbol(math, accent, "\u203E", "\\bar");
defineSymbol(math, accent, "\u02D8", "\\breve");
defineSymbol(math, accent, "\u02C7", "\\check");
defineSymbol(math, accent, "^", "\\hat");
defineSymbol(math, accent, "\u2192", "\\vec");
defineSymbol(math, accent, "\u02D9", "\\dot");
defineSymbol(math, accent, "\u02DA", "\\mathring");
defineSymbol(math, mathord, "\u0131", "\\imath", true);
defineSymbol(math, mathord, "\u0237", "\\jmath", true);
defineSymbol(math, textord, "\u0131", "\u0131");
defineSymbol(math, textord, "\u0237", "\u0237");
defineSymbol(text, textord, "\u0131", "\\i", true);
defineSymbol(text, textord, "\u0237", "\\j", true);
defineSymbol(text, textord, "\xDF", "\\ss", true);
defineSymbol(text, textord, "\xE6", "\\ae", true);
defineSymbol(text, textord, "\u0153", "\\oe", true);
defineSymbol(text, textord, "\xF8", "\\o", true);
defineSymbol(math, mathord, "\xF8", "\\o", true);
defineSymbol(text, textord, "\xC6", "\\AE", true);
defineSymbol(text, textord, "\u0152", "\\OE", true);
defineSymbol(text, textord, "\xD8", "\\O", true);
defineSymbol(math, mathord, "\xD8", "\\O", true);
defineSymbol(text, accent, "\u02CA", "\\'");
defineSymbol(text, accent, "\u02CB", "\\`");
defineSymbol(text, accent, "\u02C6", "\\^");
defineSymbol(text, accent, "\u02DC", "\\~");
defineSymbol(text, accent, "\u02C9", "\\=");
defineSymbol(text, accent, "\u02D8", "\\u");
defineSymbol(text, accent, "\u02D9", "\\.");
defineSymbol(text, accent, "\xB8", "\\c");
defineSymbol(text, accent, "\u02DA", "\\r");
defineSymbol(text, accent, "\u02C7", "\\v");
defineSymbol(text, accent, "\xA8", '\\"');
defineSymbol(text, accent, "\u02DD", "\\H");
defineSymbol(math, accent, "\u02CA", "\\'");
defineSymbol(math, accent, "\u02CB", "\\`");
defineSymbol(math, accent, "\u02C6", "\\^");
defineSymbol(math, accent, "\u02DC", "\\~");
defineSymbol(math, accent, "\u02C9", "\\=");
defineSymbol(math, accent, "\u02D8", "\\u");
defineSymbol(math, accent, "\u02D9", "\\.");
defineSymbol(math, accent, "\xB8", "\\c");
defineSymbol(math, accent, "\u02DA", "\\r");
defineSymbol(math, accent, "\u02C7", "\\v");
defineSymbol(math, accent, "\xA8", '\\"');
defineSymbol(math, accent, "\u02DD", "\\H");
var ligatures = {
  "--": true,
  "---": true,
  "``": true,
  "''": true
};
defineSymbol(text, textord, "\u2013", "--", true);
defineSymbol(text, textord, "\u2013", "\\textendash");
defineSymbol(text, textord, "\u2014", "---", true);
defineSymbol(text, textord, "\u2014", "\\textemdash");
defineSymbol(text, textord, "\u2018", "`", true);
defineSymbol(text, textord, "\u2018", "\\textquoteleft");
defineSymbol(text, textord, "\u2019", "'", true);
defineSymbol(text, textord, "\u2019", "\\textquoteright");
defineSymbol(text, textord, "\u201C", "``", true);
defineSymbol(text, textord, "\u201C", "\\textquotedblleft");
defineSymbol(text, textord, "\u201D", "''", true);
defineSymbol(text, textord, "\u201D", "\\textquotedblright");
defineSymbol(math, textord, "\xB0", "\\degree", true);
defineSymbol(text, textord, "\xB0", "\\degree");
defineSymbol(text, textord, "\xB0", "\\textdegree", true);
defineSymbol(math, textord, "\xA3", "\\pounds");
defineSymbol(math, textord, "\xA3", "\\mathsterling", true);
defineSymbol(text, textord, "\xA3", "\\pounds");
defineSymbol(text, textord, "\xA3", "\\textsterling", true);
defineSymbol(math, textord, "\u2720", "\\maltese");
defineSymbol(text, textord, "\u2720", "\\maltese");
defineSymbol(math, textord, "\u20AC", "\\euro", true);
defineSymbol(text, textord, "\u20AC", "\\euro", true);
defineSymbol(text, textord, "\u20AC", "\\texteuro");
defineSymbol(math, textord, "\xA9", "\\copyright", true);
defineSymbol(text, textord, "\xA9", "\\textcopyright");
defineSymbol(math, textord, "\u2300", "\\diameter", true);
defineSymbol(text, textord, "\u2300", "\\diameter");
defineSymbol(math, textord, "\u{1D6E4}", "\\varGamma");
defineSymbol(math, textord, "\u{1D6E5}", "\\varDelta");
defineSymbol(math, textord, "\u{1D6E9}", "\\varTheta");
defineSymbol(math, textord, "\u{1D6EC}", "\\varLambda");
defineSymbol(math, textord, "\u{1D6EF}", "\\varXi");
defineSymbol(math, textord, "\u{1D6F1}", "\\varPi");
defineSymbol(math, textord, "\u{1D6F4}", "\\varSigma");
defineSymbol(math, textord, "\u{1D6F6}", "\\varUpsilon");
defineSymbol(math, textord, "\u{1D6F7}", "\\varPhi");
defineSymbol(math, textord, "\u{1D6F9}", "\\varPsi");
defineSymbol(math, textord, "\u{1D6FA}", "\\varOmega");
defineSymbol(text, textord, "\u{1D6E4}", "\\varGamma");
defineSymbol(text, textord, "\u{1D6E5}", "\\varDelta");
defineSymbol(text, textord, "\u{1D6E9}", "\\varTheta");
defineSymbol(text, textord, "\u{1D6EC}", "\\varLambda");
defineSymbol(text, textord, "\u{1D6EF}", "\\varXi");
defineSymbol(text, textord, "\u{1D6F1}", "\\varPi");
defineSymbol(text, textord, "\u{1D6F4}", "\\varSigma");
defineSymbol(text, textord, "\u{1D6F6}", "\\varUpsilon");
defineSymbol(text, textord, "\u{1D6F7}", "\\varPhi");
defineSymbol(text, textord, "\u{1D6F9}", "\\varPsi");
defineSymbol(text, textord, "\u{1D6FA}", "\\varOmega");
var mathTextSymbols = '0123456789/@."';
for (let i = 0; i < mathTextSymbols.length; i++) {
  const ch = mathTextSymbols.charAt(i);
  defineSymbol(math, textord, ch, ch);
}
var textSymbols = '0123456789!@*()-=+";:?/.,';
for (let i = 0; i < textSymbols.length; i++) {
  const ch = textSymbols.charAt(i);
  defineSymbol(text, textord, ch, ch);
}
var letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
for (let i = 0; i < letters.length; i++) {
  const ch = letters.charAt(i);
  defineSymbol(math, mathord, ch, ch);
  defineSymbol(text, textord, ch, ch);
}
var narrow = "\xC7\xD0\xDE\xE7\xFE\u2102\u210D\u2115\u2119\u211A\u211D\u2124\u210E\u210F\u210A\u210B\u210C\u2110\u2111\u2112\u2113\u2118\u211B\u211C\u212C\u2130\u2131\u2133\u212D\u2128";
for (let i = 0; i < narrow.length; i++) {
  const ch = narrow.charAt(i);
  defineSymbol(math, mathord, ch, ch);
  defineSymbol(text, textord, ch, ch);
}
var wideChar = "";
for (let i = 0; i < letters.length; i++) {
  wideChar = String.fromCharCode(55349, 56320 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
  wideChar = String.fromCharCode(55349, 56372 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
  wideChar = String.fromCharCode(55349, 56424 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
  wideChar = String.fromCharCode(55349, 56580 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
  wideChar = String.fromCharCode(55349, 56736 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
  wideChar = String.fromCharCode(55349, 56788 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
  wideChar = String.fromCharCode(55349, 56840 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
  wideChar = String.fromCharCode(55349, 56944 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
  wideChar = String.fromCharCode(55349, 56632 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
  const ch = letters.charAt(i);
  wideChar = String.fromCharCode(55349, 56476 + i);
  defineSymbol(math, mathord, ch, wideChar);
  defineSymbol(text, textord, ch, wideChar);
}
for (let i = 0; i < 10; i++) {
  wideChar = String.fromCharCode(55349, 57294 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
  wideChar = String.fromCharCode(55349, 57314 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
  wideChar = String.fromCharCode(55349, 57324 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
  wideChar = String.fromCharCode(55349, 57334 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
}
var openDelims = "([{\u230A\u2308\u27E8\u27EE\u23B0\u27E6\u2983";
var closeDelims = ")]}\u230B\u2309\u27E9\u27EF\u23B1\u27E6\u2984";
function setLineBreaks(expression, wrapMode, isDisplayMode) {
  const mtrs = [];
  let mrows = [];
  let block = [];
  let numTopLevelEquals = 0;
  let i = 0;
  let level = 0;
  while (i < expression.length) {
    while (expression[i] instanceof DocumentFragment) {
      expression.splice(i, 1, ...expression[i].children);
    }
    const node = expression[i];
    if (node.attributes && node.attributes.linebreak && node.attributes.linebreak === "newline") {
      if (block.length > 0) {
        mrows.push(new mathMLTree.MathNode("mrow", block));
      }
      mrows.push(node);
      block = [];
      const mtd = new mathMLTree.MathNode("mtd", mrows);
      mtd.style.textAlign = "left";
      mtrs.push(new mathMLTree.MathNode("mtr", [mtd]));
      mrows = [];
      i += 1;
      continue;
    }
    block.push(node);
    if (node.type && node.type === "mo" && node.children.length === 1 && !Object.hasOwn(node.attributes, "movablelimits")) {
      const ch = node.children[0].text;
      if (openDelims.indexOf(ch) > -1) {
        level += 1;
      } else if (closeDelims.indexOf(ch) > -1) {
        level -= 1;
      } else if (level === 0 && wrapMode === "=" && ch === "=") {
        numTopLevelEquals += 1;
        if (numTopLevelEquals > 1) {
          block.pop();
          const element = new mathMLTree.MathNode("mrow", block);
          mrows.push(element);
          block = [node];
        }
      } else if (level === 0 && wrapMode === "tex" && ch !== "\u2207") {
        const next = i < expression.length - 1 ? expression[i + 1] : null;
        let glueIsFreeOfNobreak = true;
        if (!(next && next.type === "mtext" && next.attributes.linebreak && next.attributes.linebreak === "nobreak")) {
          for (let j = i + 1; j < expression.length; j++) {
            const nd = expression[j];
            if (nd.type && nd.type === "mspace" && !(nd.attributes.linebreak && nd.attributes.linebreak === "newline")) {
              block.push(nd);
              i += 1;
              if (nd.attributes && nd.attributes.linebreak && nd.attributes.linebreak === "nobreak") {
                glueIsFreeOfNobreak = false;
              }
            } else {
              break;
            }
          }
        }
        if (glueIsFreeOfNobreak) {
          const element = new mathMLTree.MathNode("mrow", block);
          mrows.push(element);
          block = [];
        }
      }
    }
    i += 1;
  }
  if (block.length > 0) {
    const element = new mathMLTree.MathNode("mrow", block);
    mrows.push(element);
  }
  if (mtrs.length > 0) {
    const mtd = new mathMLTree.MathNode("mtd", mrows);
    mtd.style.textAlign = "left";
    const mtr = new mathMLTree.MathNode("mtr", [mtd]);
    mtrs.push(mtr);
    const mtable = new mathMLTree.MathNode("mtable", mtrs);
    if (!isDisplayMode) {
      mtable.setAttribute("columnalign", "left");
      mtable.setAttribute("rowspacing", "0em");
    }
    return mtable;
  }
  return mathMLTree.newDocumentFragment(mrows);
}
var makeText = function(text2, mode, style) {
  if (symbols[mode][text2] && symbols[mode][text2].replace && text2.charCodeAt(0) !== 55349 && !(Object.prototype.hasOwnProperty.call(ligatures, text2) && style && (style.fontFamily && style.fontFamily.slice(4, 6) === "tt" || style.font && style.font.slice(4, 6) === "tt"))) {
    text2 = symbols[mode][text2].replace;
  }
  return new mathMLTree.TextNode(text2);
};
var copyChar = (newRow, child) => {
  if (newRow.children.length === 0 || newRow.children[newRow.children.length - 1].type !== "mtext") {
    const mtext = new mathMLTree.MathNode(
      "mtext",
      [new mathMLTree.TextNode(child.children[0].text)]
    );
    newRow.children.push(mtext);
  } else {
    newRow.children[newRow.children.length - 1].children[0].text += child.children[0].text;
  }
};
var consolidateText = (mrow) => {
  if (mrow.type !== "mrow" && mrow.type !== "mstyle") {
    return mrow;
  }
  if (mrow.children.length === 0) {
    return mrow;
  }
  const newRow = new mathMLTree.MathNode("mrow");
  for (let i = 0; i < mrow.children.length; i++) {
    const child = mrow.children[i];
    if (child.type === "mtext" && Object.keys(child.attributes).length === 0) {
      copyChar(newRow, child);
    } else if (child.type === "mrow") {
      let canConsolidate = true;
      for (let j = 0; j < child.children.length; j++) {
        const grandChild = child.children[j];
        if (grandChild.type !== "mtext" || Object.keys(child.attributes).length !== 0) {
          canConsolidate = false;
          break;
        }
      }
      if (canConsolidate) {
        for (let j = 0; j < child.children.length; j++) {
          const grandChild = child.children[j];
          copyChar(newRow, grandChild);
        }
      } else {
        newRow.children.push(child);
      }
    } else {
      newRow.children.push(child);
    }
  }
  for (let i = 0; i < newRow.children.length; i++) {
    if (newRow.children[i].type === "mtext") {
      const mtext = newRow.children[i];
      if (mtext.children[0].text.charAt(0) === " ") {
        mtext.children[0].text = "\xA0" + mtext.children[0].text.slice(1);
      }
      const L = mtext.children[0].text.length;
      if (L > 0 && mtext.children[0].text.charAt(L - 1) === " ") {
        mtext.children[0].text = mtext.children[0].text.slice(0, -1) + "\xA0";
      }
      for (const [key, value] of Object.entries(mrow.attributes)) {
        mtext.attributes[key] = value;
      }
    }
  }
  if (newRow.children.length === 1 && newRow.children[0].type === "mtext") {
    return newRow.children[0];
  } else {
    return newRow;
  }
};
var makeRow = function(body, semisimple = false) {
  if (body.length === 1 && !(body[0] instanceof DocumentFragment)) {
    return body[0];
  } else if (!semisimple) {
    if (body[0] instanceof MathNode && body[0].type === "mo" && !body[0].attributes.fence) {
      body[0].attributes.lspace = "0em";
      body[0].attributes.rspace = "0em";
    }
    const end = body.length - 1;
    if (body[end] instanceof MathNode && body[end].type === "mo" && !body[end].attributes.fence) {
      body[end].attributes.lspace = "0em";
      body[end].attributes.rspace = "0em";
    }
  }
  return new mathMLTree.MathNode("mrow", body);
};
function isNumberPunctuation(group) {
  if (!group) {
    return false;
  }
  if (group.type === "mi" && group.children.length === 1) {
    const child = group.children[0];
    return child instanceof TextNode2 && child.text === ".";
  } else if (group.type === "mtext" && group.children.length === 1) {
    const child = group.children[0];
    return child instanceof TextNode2 && child.text === "\u2008";
  } else if (group.type === "mo" && group.children.length === 1 && group.getAttribute("separator") === "true" && group.getAttribute("lspace") === "0em" && group.getAttribute("rspace") === "0em") {
    const child = group.children[0];
    return child instanceof TextNode2 && child.text === ",";
  } else {
    return false;
  }
}
var isComma = (expression, i) => {
  const node = expression[i];
  const followingNode = expression[i + 1];
  return node.type === "atom" && node.text === "," && // Don't consolidate if there is a space after the comma.
  node.loc && followingNode.loc && node.loc.end === followingNode.loc.start;
};
var isRel = (item) => {
  return item.type === "atom" && item.family === "rel" || item.type === "mclass" && item.mclass === "mrel";
};
var buildExpression = function(expression, style, semisimple = false) {
  if (!semisimple && expression.length === 1) {
    const group = buildGroup$1(expression[0], style);
    if (group instanceof MathNode && group.type === "mo") {
      group.setAttribute("lspace", "0em");
      group.setAttribute("rspace", "0em");
    }
    return [group];
  }
  const groups = [];
  const groupArray = [];
  let lastGroup;
  for (let i = 0; i < expression.length; i++) {
    groupArray.push(buildGroup$1(expression[i], style));
  }
  for (let i = 0; i < groupArray.length; i++) {
    const group = groupArray[i];
    if (i < expression.length - 1 && isRel(expression[i]) && isRel(expression[i + 1])) {
      group.setAttribute("rspace", "0em");
    }
    if (i > 0 && isRel(expression[i]) && isRel(expression[i - 1])) {
      group.setAttribute("lspace", "0em");
    }
    if (group.type === "mn" && lastGroup && lastGroup.type === "mn") {
      lastGroup.children.push(...group.children);
      continue;
    } else if (isNumberPunctuation(group) && lastGroup && lastGroup.type === "mn") {
      lastGroup.children.push(...group.children);
      continue;
    } else if (lastGroup && lastGroup.type === "mn" && i < groupArray.length - 1 && groupArray[i + 1].type === "mn" && isComma(expression, i)) {
      lastGroup.children.push(...group.children);
      continue;
    } else if (group.type === "mn" && isNumberPunctuation(lastGroup)) {
      group.children = [...lastGroup.children, ...group.children];
      groups.pop();
    } else if ((group.type === "msup" || group.type === "msub") && group.children.length >= 1 && lastGroup && (lastGroup.type === "mn" || isNumberPunctuation(lastGroup))) {
      const base = group.children[0];
      if (base instanceof MathNode && base.type === "mn" && lastGroup) {
        base.children = [...lastGroup.children, ...base.children];
        groups.pop();
      }
    }
    groups.push(group);
    lastGroup = group;
  }
  return groups;
};
var buildExpressionRow = function(expression, style, semisimple = false) {
  return makeRow(buildExpression(expression, style, semisimple), semisimple);
};
var buildGroup$1 = function(group, style) {
  if (!group) {
    return new mathMLTree.MathNode("mrow");
  }
  if (_mathmlGroupBuilders[group.type]) {
    const result = _mathmlGroupBuilders[group.type](group, style);
    return result;
  } else {
    throw new ParseError("Got group of unknown type: '" + group.type + "'");
  }
};
var glue$1 = (_) => {
  return new mathMLTree.MathNode("mtd", [], [], { padding: "0", width: "50%" });
};
var labelContainers = ["mrow", "mtd", "mtable", "mtr"];
var getLabel = (parent) => {
  for (const node of parent.children) {
    if (node.type && labelContainers.includes(node.type)) {
      if (node.classes && node.classes[0] === "tml-label") {
        const label = node.label;
        return label;
      } else {
        const label = getLabel(node);
        if (label) {
          return label;
        }
      }
    } else if (!node.type) {
      const label = getLabel(node);
      if (label) {
        return label;
      }
    }
  }
};
var taggedExpression = (expression, tag, style, leqno) => {
  tag = buildExpressionRow(tag[0].body, style);
  tag = consolidateText(tag);
  tag.classes.push("tml-tag");
  const label = getLabel(expression);
  expression = new mathMLTree.MathNode("mtd", [expression]);
  const rowArray = [glue$1(), expression, glue$1()];
  rowArray[leqno ? 0 : 2].classes.push(leqno ? "tml-left" : "tml-right");
  rowArray[leqno ? 0 : 2].children.push(tag);
  const mtr = new mathMLTree.MathNode("mtr", rowArray, ["tml-tageqn"]);
  if (label) {
    mtr.setAttribute("id", label);
  }
  const table = new mathMLTree.MathNode("mtable", [mtr]);
  table.style.width = "100%";
  table.setAttribute("displaystyle", "true");
  return table;
};
function buildMathML(tree, texExpression, style, settings) {
  let tag = null;
  if (tree.length === 1 && tree[0].type === "tag") {
    tag = tree[0].tag;
    tree = tree[0].body;
  }
  const expression = buildExpression(tree, style);
  if (expression.length === 1 && expression[0] instanceof AnchorNode) {
    return expression[0];
  }
  const wrap = settings.displayMode || settings.annotate ? "none" : settings.wrap;
  const n1 = expression.length === 0 ? null : expression[0];
  let wrapper = expression.length === 1 && tag === null && n1 instanceof MathNode ? expression[0] : setLineBreaks(expression, wrap, settings.displayMode);
  if (tag) {
    wrapper = taggedExpression(wrapper, tag, style, settings.leqno);
  }
  if (settings.annotate) {
    const annotation = new mathMLTree.MathNode(
      "annotation",
      [new mathMLTree.TextNode(texExpression)]
    );
    annotation.setAttribute("encoding", "application/x-tex");
    wrapper = new mathMLTree.MathNode("semantics", [wrapper, annotation]);
  }
  const math2 = new mathMLTree.MathNode("math", [wrapper]);
  if (settings.xml) {
    math2.setAttribute("xmlns", "http://www.w3.org/1998/Math/MathML");
  }
  if (wrapper.style.width) {
    math2.style.width = "100%";
  }
  if (settings.displayMode) {
    math2.setAttribute("display", "block");
    math2.style.display = "block math";
    math2.classes = ["tml-display"];
  }
  return math2;
}
var smalls = "aceg\u0131\u0237mnopqrsuvwxyz\u03B1\u03B3\u03B5\u03B7\u03B9\u03BA\u03BC\u03BD\u03BF\u03C0\u03C1\u03C2\u03C3\u03C4\u03C5\u03C7\u03C9\u03D5\u{1D41A}\u{1D41C}\u{1D41E}\u{1D420}\u{1D426}\u{1D427}\u{1D428}\u{1D429}\u{1D42A}\u{1D42B}\u{1D42C}\u{1D42E}\u{1D42F}\u{1D430}\u{1D431}\u{1D432}\u{1D433}";
var talls = "ABCDEFGHIJKLMNOPQRSTUVWXYZbdfhklt\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03B2\u03B4\u03BB\u03B6\u03C6\u03B8\u03C8\u{1D400}\u{1D401}\u{1D402}\u{1D403}\u{1D404}\u{1D405}\u{1D406}\u{1D407}\u{1D408}\u{1D409}\u{1D40A}\u{1D40B}\u{1D40C}\u{1D40D}\u{1D40E}\u{1D40F}\u{1D410}\u{1D411}\u{1D412}\u{1D413}\u{1D414}\u{1D415}\u{1D416}\u{1D417}\u{1D418}\u{1D419}\u{1D41B}\u{1D41D}\u{1D41F}\u{1D421}\u{1D424}\u{1D425}\u{1D42D}";
var longSmalls = /* @__PURE__ */ new Set([
  "\\alpha",
  "\\gamma",
  "\\delta",
  "\\epsilon",
  "\\eta",
  "\\iota",
  "\\kappa",
  "\\mu",
  "\\nu",
  "\\pi",
  "\\rho",
  "\\sigma",
  "\\tau",
  "\\upsilon",
  "\\chi",
  "\\psi",
  "\\omega",
  "\\imath",
  "\\jmath"
]);
var longTalls = /* @__PURE__ */ new Set([
  "\\Gamma",
  "\\Delta",
  "\\Sigma",
  "\\Omega",
  "\\beta",
  "\\delta",
  "\\lambda",
  "\\theta",
  "\\psi"
]);
var mathmlBuilder$a = (group, style) => {
  const accentNode2 = group.isStretchy ? stretchy.accentNode(group) : new mathMLTree.MathNode("mo", [makeText(group.label, group.mode)]);
  if (group.label === "\\vec") {
    accentNode2.style.transform = "scale(0.75) translate(10%, 30%)";
  } else {
    accentNode2.style.mathStyle = "normal";
    accentNode2.style.mathDepth = "0";
    if (needWebkitShift.has(group.label) && utils.isCharacterBox(group.base)) {
      let shift = "";
      const ch = group.base.text;
      if (smalls.indexOf(ch) > -1 || longSmalls.has(ch)) {
        shift = "tml-xshift";
      }
      if (talls.indexOf(ch) > -1 || longTalls.has(ch)) {
        shift = "tml-capshift";
      }
      if (shift) {
        accentNode2.classes.push(shift);
      }
    }
  }
  if (!group.isStretchy) {
    accentNode2.setAttribute("stretchy", "false");
  }
  const node = new mathMLTree.MathNode(
    group.label === "\\c" ? "munder" : "mover",
    [buildGroup$1(group.base, style), accentNode2]
  );
  return node;
};
var nonStretchyAccents = /* @__PURE__ */ new Set([
  "\\acute",
  "\\grave",
  "\\ddot",
  "\\dddot",
  "\\ddddot",
  "\\tilde",
  "\\bar",
  "\\breve",
  "\\check",
  "\\hat",
  "\\vec",
  "\\dot",
  "\\mathring"
]);
var needWebkitShift = /* @__PURE__ */ new Set([
  "\\acute",
  "\\bar",
  "\\breve",
  "\\check",
  "\\dot",
  "\\ddot",
  "\\grave",
  "\\hat",
  "\\mathring",
  "\\'",
  "\\^",
  "\\~",
  "\\=",
  "\\u",
  "\\.",
  '\\"',
  "\\r",
  "\\H",
  "\\v"
]);
var combiningChar = {
  "\\`": "\u0300",
  "\\'": "\u0301",
  "\\^": "\u0302",
  "\\~": "\u0303",
  "\\=": "\u0304",
  "\\u": "\u0306",
  "\\.": "\u0307",
  '\\"': "\u0308",
  "\\r": "\u030A",
  "\\H": "\u030B",
  "\\v": "\u030C"
};
defineFunction({
  type: "accent",
  names: [
    "\\acute",
    "\\grave",
    "\\ddot",
    "\\dddot",
    "\\ddddot",
    "\\tilde",
    "\\bar",
    "\\breve",
    "\\check",
    "\\hat",
    "\\vec",
    "\\dot",
    "\\mathring",
    "\\overparen",
    "\\widecheck",
    "\\widehat",
    "\\wideparen",
    "\\widetilde",
    "\\overrightarrow",
    "\\overleftarrow",
    "\\Overrightarrow",
    "\\overleftrightarrow",
    "\\overgroup",
    "\\overleftharpoon",
    "\\overrightharpoon"
  ],
  props: {
    numArgs: 1
  },
  handler: (context, args) => {
    const base = normalizeArgument(args[0]);
    const isStretchy = !nonStretchyAccents.has(context.funcName);
    return {
      type: "accent",
      mode: context.parser.mode,
      label: context.funcName,
      isStretchy,
      base
    };
  },
  mathmlBuilder: mathmlBuilder$a
});
defineFunction({
  type: "accent",
  names: ["\\'", "\\`", "\\^", "\\~", "\\=", "\\c", "\\u", "\\.", '\\"', "\\r", "\\H", "\\v"],
  props: {
    numArgs: 1,
    allowedInText: true,
    allowedInMath: true,
    argTypes: ["primitive"]
  },
  handler: (context, args) => {
    const base = normalizeArgument(args[0]);
    const mode = context.parser.mode;
    if (mode === "math" && context.parser.settings.strict) {
      console.log(`Temml parse error: Command ${context.funcName} is invalid in math mode.`);
    }
    if (mode === "text" && base.text && base.text.length === 1 && context.funcName in combiningChar && smalls.indexOf(base.text) > -1) {
      return {
        type: "textord",
        mode: "text",
        text: base.text + combiningChar[context.funcName]
      };
    } else {
      return {
        type: "accent",
        mode,
        label: context.funcName,
        isStretchy: false,
        base
      };
    }
  },
  mathmlBuilder: mathmlBuilder$a
});
defineFunction({
  type: "accentUnder",
  names: [
    "\\underleftarrow",
    "\\underrightarrow",
    "\\underleftrightarrow",
    "\\undergroup",
    "\\underparen",
    "\\utilde"
  ],
  props: {
    numArgs: 1
  },
  handler: ({ parser, funcName }, args) => {
    const base = args[0];
    return {
      type: "accentUnder",
      mode: parser.mode,
      label: funcName,
      base
    };
  },
  mathmlBuilder: (group, style) => {
    const accentNode2 = stretchy.accentNode(group);
    accentNode2.style["math-depth"] = 0;
    const node = new mathMLTree.MathNode("munder", [
      buildGroup$1(group.base, style),
      accentNode2
    ]);
    return node;
  }
});
var ptPerUnit = {
  // Convert to CSS (Postscipt) points, not TeX points
  // https://en.wikibooks.org/wiki/LaTeX/Lengths and
  // https://tex.stackexchange.com/a/8263
  pt: 800 / 803,
  // convert TeX point to CSS (Postscript) point
  pc: 12 * 800 / 803,
  // pica
  dd: 1238 / 1157 * 800 / 803,
  // didot
  cc: 14856 / 1157 * 800 / 803,
  // cicero (12 didot)
  nd: 685 / 642 * 800 / 803,
  // new didot
  nc: 1370 / 107 * 800 / 803,
  // new cicero (12 new didot)
  sp: 1 / 65536 * 800 / 803,
  // scaled point (TeX's internal smallest unit)
  mm: 25.4 / 72,
  cm: 2.54 / 72,
  in: 1 / 72,
  px: 96 / 72
};
var validUnits = [
  "em",
  "ex",
  "mu",
  "pt",
  "mm",
  "cm",
  "in",
  "px",
  "bp",
  "pc",
  "dd",
  "cc",
  "nd",
  "nc",
  "sp"
];
var validUnit = function(unit) {
  if (typeof unit !== "string") {
    unit = unit.unit;
  }
  return validUnits.indexOf(unit) > -1;
};
var emScale = (styleLevel) => {
  const scriptLevel2 = Math.max(styleLevel - 1, 0);
  return [1, 0.7, 0.5][scriptLevel2];
};
var calculateSize = function(sizeValue, style) {
  let number = sizeValue.number;
  if (style.maxSize[0] < 0 && number > 0) {
    return { number: 0, unit: "em" };
  }
  const unit = sizeValue.unit;
  switch (unit) {
    case "mm":
    case "cm":
    case "in":
    case "px": {
      const numInCssPts = number * ptPerUnit[unit];
      if (numInCssPts > style.maxSize[1]) {
        return { number: style.maxSize[1], unit: "pt" };
      }
      return { number, unit };
    }
    case "em":
    case "ex": {
      if (unit === "ex") {
        number *= 0.431;
      }
      number = Math.min(number / emScale(style.level), style.maxSize[0]);
      return { number: utils.round(number), unit: "em" };
    }
    case "bp": {
      if (number > style.maxSize[1]) {
        number = style.maxSize[1];
      }
      return { number, unit: "pt" };
    }
    case "pt":
    case "pc":
    case "dd":
    case "cc":
    case "nd":
    case "nc":
    case "sp": {
      number = Math.min(number * ptPerUnit[unit], style.maxSize[1]);
      return { number: utils.round(number), unit: "pt" };
    }
    case "mu": {
      number = Math.min(number / 18, style.maxSize[0]);
      return { number: utils.round(number), unit: "em" };
    }
    default:
      throw new ParseError("Invalid unit: '" + unit + "'");
  }
};
var padding$2 = (width) => {
  const node = new mathMLTree.MathNode("mspace");
  node.setAttribute("width", width + "em");
  return node;
};
var paddedNode = (group, lspace = 0.3, rspace = 0, mustSmash = false) => {
  if (group == null && rspace === 0) {
    return padding$2(lspace);
  }
  const row = group ? [group] : [];
  if (lspace !== 0) {
    row.unshift(padding$2(lspace));
  }
  if (rspace > 0) {
    row.push(padding$2(rspace));
  }
  if (mustSmash) {
    const mpadded = new mathMLTree.MathNode("mpadded", row);
    mpadded.setAttribute("height", "0");
    return mpadded;
  } else {
    return new mathMLTree.MathNode("mrow", row);
  }
};
var labelSize = (size, scriptLevel2) => Number(size) / emScale(scriptLevel2);
var munderoverNode = (fName, body, below, style) => {
  const arrowNode = stretchy.mathMLnode(fName);
  const isEq = fName.slice(1, 3) === "eq";
  const minWidth = fName.charAt(1) === "x" ? "1.75" : fName.slice(2, 4) === "cd" ? "3.0" : isEq ? "1.0" : "2.0";
  arrowNode.setAttribute("lspace", "0");
  arrowNode.setAttribute("rspace", isEq ? "0.5em" : "0");
  const labelStyle = style.withLevel(style.level < 2 ? 2 : 3);
  const minArrowWidth = labelSize(minWidth, labelStyle.level);
  const dummyWidth = labelSize(minWidth, 3);
  const emptyLabel = paddedNode(null, minArrowWidth.toFixed(4), 0);
  const dummyNode = paddedNode(null, dummyWidth.toFixed(4), 0);
  const space = labelSize(isEq ? 0 : 0.3, labelStyle.level).toFixed(4);
  let upperNode;
  let lowerNode;
  const gotUpper = body && body.body && // \hphantom        visible content
  (body.body.body || body.body.length > 0);
  if (gotUpper) {
    let label = buildGroup$1(body, labelStyle);
    const mustSmash = fName === "\\\\cdrightarrow" || fName === "\\\\cdleftarrow";
    label = paddedNode(label, space, space, mustSmash);
    upperNode = new mathMLTree.MathNode("mover", [label, dummyNode]);
  }
  const gotLower = below && below.body && (below.body.body || below.body.length > 0);
  if (gotLower) {
    let label = buildGroup$1(below, labelStyle);
    label = paddedNode(label, space, space);
    lowerNode = new mathMLTree.MathNode("munder", [label, dummyNode]);
  }
  let node;
  if (!gotUpper && !gotLower) {
    node = new mathMLTree.MathNode("mover", [arrowNode, emptyLabel]);
  } else if (gotUpper && gotLower) {
    node = new mathMLTree.MathNode("munderover", [arrowNode, lowerNode, upperNode]);
  } else if (gotUpper) {
    node = new mathMLTree.MathNode("mover", [arrowNode, upperNode]);
  } else {
    node = new mathMLTree.MathNode("munder", [arrowNode, lowerNode]);
  }
  if (minWidth === "3.0") {
    node.style.height = "1em";
  }
  node.setAttribute("accent", "false");
  return node;
};
defineFunction({
  type: "xArrow",
  names: [
    "\\xleftarrow",
    "\\xrightarrow",
    "\\xLeftarrow",
    "\\xRightarrow",
    "\\xleftrightarrow",
    "\\xLeftrightarrow",
    "\\xhookleftarrow",
    "\\xhookrightarrow",
    "\\xmapsto",
    "\\xrightharpoondown",
    "\\xrightharpoonup",
    "\\xleftharpoondown",
    "\\xleftharpoonup",
    "\\xlongequal",
    "\\xtwoheadrightarrow",
    "\\xtwoheadleftarrow",
    // The next 5 functions are here only to support mhchem
    "\\yields",
    "\\yieldsLeft",
    "\\mesomerism",
    "\\longrightharpoonup",
    "\\longleftharpoondown",
    // The next 3 functions are here only to support the {CD} environment.
    "\\\\cdrightarrow",
    "\\\\cdleftarrow",
    "\\\\cdlongequal"
  ],
  props: {
    numArgs: 1,
    numOptionalArgs: 1
  },
  handler({ parser, funcName }, args, optArgs) {
    return {
      type: "xArrow",
      mode: parser.mode,
      name: funcName,
      body: args[0],
      below: optArgs[0]
    };
  },
  mathmlBuilder(group, style) {
    const node = munderoverNode(group.name, group.body, group.below, style);
    const row = [node];
    row.unshift(padding$2(0.2778));
    row.push(padding$2(0.2778));
    return new mathMLTree.MathNode("mrow", row);
  }
});
var arrowComponent = {
  "\\xtofrom": ["\\xrightarrow", "\\xleftarrow"],
  "\\xleftrightharpoons": ["\\xleftharpoonup", "\\xrightharpoondown"],
  "\\xrightleftharpoons": ["\\xrightharpoonup", "\\xleftharpoondown"],
  "\\yieldsLeftRight": ["\\yields", "\\yieldsLeft"],
  // The next three all get the same harpoon glyphs. Only the lengths and paddings differ.
  "\\equilibrium": ["\\longrightharpoonup", "\\longleftharpoondown"],
  "\\equilibriumRight": ["\\longrightharpoonup", "\\eqleftharpoondown"],
  "\\equilibriumLeft": ["\\eqrightharpoonup", "\\longleftharpoondown"]
};
defineFunction({
  type: "stackedArrow",
  names: [
    "\\xtofrom",
    // expfeil
    "\\xleftrightharpoons",
    // mathtools
    "\\xrightleftharpoons",
    // mathtools
    "\\yieldsLeftRight",
    // mhchem
    "\\equilibrium",
    // mhchem
    "\\equilibriumRight",
    "\\equilibriumLeft"
  ],
  props: {
    numArgs: 1,
    numOptionalArgs: 1
  },
  handler({ parser, funcName }, args, optArgs) {
    const lowerArrowBody = args[0] ? {
      type: "hphantom",
      mode: parser.mode,
      body: args[0]
    } : null;
    const upperArrowBelow = optArgs[0] ? {
      type: "hphantom",
      mode: parser.mode,
      body: optArgs[0]
    } : null;
    return {
      type: "stackedArrow",
      mode: parser.mode,
      name: funcName,
      body: args[0],
      upperArrowBelow,
      lowerArrowBody,
      below: optArgs[0]
    };
  },
  mathmlBuilder(group, style) {
    const topLabel = arrowComponent[group.name][0];
    const botLabel = arrowComponent[group.name][1];
    const topArrow = munderoverNode(topLabel, group.body, group.upperArrowBelow, style);
    const botArrow = munderoverNode(botLabel, group.lowerArrowBody, group.below, style);
    let wrapper;
    const raiseNode = new mathMLTree.MathNode("mpadded", [topArrow]);
    raiseNode.setAttribute("voffset", "0.3em");
    raiseNode.setAttribute("height", "+0.3em");
    raiseNode.setAttribute("depth", "-0.3em");
    if (group.name === "\\equilibriumLeft") {
      const botNode = new mathMLTree.MathNode("mpadded", [botArrow]);
      botNode.setAttribute("width", "0.5em");
      wrapper = new mathMLTree.MathNode(
        "mpadded",
        [padding$2(0.2778), botNode, raiseNode, padding$2(0.2778)]
      );
    } else {
      raiseNode.setAttribute("width", group.name === "\\equilibriumRight" ? "0.5em" : "0");
      wrapper = new mathMLTree.MathNode(
        "mpadded",
        [padding$2(0.2778), raiseNode, botArrow, padding$2(0.2778)]
      );
    }
    wrapper.setAttribute("voffset", "-0.18em");
    wrapper.setAttribute("height", "-0.18em");
    wrapper.setAttribute("depth", "+0.18em");
    return wrapper;
  }
});
function assertNodeType(node, type) {
  if (!node || node.type !== type) {
    throw new Error(
      `Expected node of type ${type}, but got ` + (node ? `node of type ${node.type}` : String(node))
    );
  }
  return node;
}
function assertSymbolNodeType(node) {
  const typedNode = checkSymbolNodeType(node);
  if (!typedNode) {
    throw new Error(
      `Expected node of symbol group type, but got ` + (node ? `node of type ${node.type}` : String(node))
    );
  }
  return typedNode;
}
function checkSymbolNodeType(node) {
  if (node && (node.type === "atom" || Object.prototype.hasOwnProperty.call(NON_ATOMS, node.type))) {
    return node;
  }
  return null;
}
var cdArrowFunctionName = {
  ">": "\\\\cdrightarrow",
  "<": "\\\\cdleftarrow",
  "=": "\\\\cdlongequal",
  A: "\\uparrow",
  V: "\\downarrow",
  "|": "\\Vert",
  ".": "no arrow"
};
var newCell = () => {
  return { type: "styling", body: [], mode: "math", scriptLevel: "display" };
};
var isStartOfArrow = (node) => {
  return node.type === "textord" && node.text === "@";
};
var isLabelEnd = (node, endChar) => {
  return (node.type === "mathord" || node.type === "atom") && node.text === endChar;
};
function cdArrow(arrowChar, labels, parser) {
  const funcName = cdArrowFunctionName[arrowChar];
  switch (funcName) {
    case "\\\\cdrightarrow":
    case "\\\\cdleftarrow":
      return parser.callFunction(funcName, [labels[0]], [labels[1]]);
    case "\\uparrow":
    case "\\downarrow": {
      const leftLabel = parser.callFunction("\\\\cdleft", [labels[0]], []);
      const bareArrow = {
        type: "atom",
        text: funcName,
        mode: "math",
        family: "rel"
      };
      const sizedArrow = parser.callFunction("\\Big", [bareArrow], []);
      const rightLabel = parser.callFunction("\\\\cdright", [labels[1]], []);
      const arrowGroup = {
        type: "ordgroup",
        mode: "math",
        body: [leftLabel, sizedArrow, rightLabel],
        semisimple: true
      };
      return parser.callFunction("\\\\cdparent", [arrowGroup], []);
    }
    case "\\\\cdlongequal":
      return parser.callFunction("\\\\cdlongequal", [], []);
    case "\\Vert": {
      const arrow = { type: "textord", text: "\\Vert", mode: "math" };
      return parser.callFunction("\\Big", [arrow], []);
    }
    default:
      return { type: "textord", text: " ", mode: "math" };
  }
}
function parseCD(parser) {
  const parsedRows = [];
  parser.gullet.beginGroup();
  parser.gullet.macros.set("\\cr", "\\\\\\relax");
  parser.gullet.beginGroup();
  while (true) {
    parsedRows.push(parser.parseExpression(false, "\\\\"));
    parser.gullet.endGroup();
    parser.gullet.beginGroup();
    const next = parser.fetch().text;
    if (next === "&" || next === "\\\\") {
      parser.consume();
    } else if (next === "\\end") {
      if (parsedRows[parsedRows.length - 1].length === 0) {
        parsedRows.pop();
      }
      break;
    } else {
      throw new ParseError("Expected \\\\ or \\cr or \\end", parser.nextToken);
    }
  }
  let row = [];
  const body = [row];
  for (let i = 0; i < parsedRows.length; i++) {
    const rowNodes = parsedRows[i];
    let cell = newCell();
    for (let j = 0; j < rowNodes.length; j++) {
      if (!isStartOfArrow(rowNodes[j])) {
        cell.body.push(rowNodes[j]);
      } else {
        row.push(cell);
        j += 1;
        const arrowChar = assertSymbolNodeType(rowNodes[j]).text;
        const labels = new Array(2);
        labels[0] = { type: "ordgroup", mode: "math", body: [] };
        labels[1] = { type: "ordgroup", mode: "math", body: [] };
        if ("=|.".indexOf(arrowChar) > -1) ;
        else if ("<>AV".indexOf(arrowChar) > -1) {
          for (let labelNum = 0; labelNum < 2; labelNum++) {
            let inLabel = true;
            for (let k = j + 1; k < rowNodes.length; k++) {
              if (isLabelEnd(rowNodes[k], arrowChar)) {
                inLabel = false;
                j = k;
                break;
              }
              if (isStartOfArrow(rowNodes[k])) {
                throw new ParseError(
                  "Missing a " + arrowChar + " character to complete a CD arrow.",
                  rowNodes[k]
                );
              }
              labels[labelNum].body.push(rowNodes[k]);
            }
            if (inLabel) {
              throw new ParseError(
                "Missing a " + arrowChar + " character to complete a CD arrow.",
                rowNodes[j]
              );
            }
          }
        } else {
          throw new ParseError(`Expected one of "<>AV=|." after @.`);
        }
        const arrow = cdArrow(arrowChar, labels, parser);
        row.push(arrow);
        cell = newCell();
      }
    }
    if (i % 2 === 0) {
      row.push(cell);
    } else {
      row.shift();
    }
    row = [];
    body.push(row);
  }
  body.pop();
  parser.gullet.endGroup();
  parser.gullet.endGroup();
  return {
    type: "array",
    mode: "math",
    body,
    tags: null,
    labels: new Array(body.length + 1).fill(""),
    envClasses: ["jot", "cd"],
    cols: [],
    hLinesBeforeRow: new Array(body.length + 1).fill([])
  };
}
defineFunction({
  type: "cdlabel",
  names: ["\\\\cdleft", "\\\\cdright"],
  props: {
    numArgs: 1
  },
  handler({ parser, funcName }, args) {
    return {
      type: "cdlabel",
      mode: parser.mode,
      side: funcName.slice(4),
      label: args[0]
    };
  },
  mathmlBuilder(group, style) {
    if (group.label.body.length === 0) {
      return new mathMLTree.MathNode("mrow", style);
    }
    const mtd = new mathMLTree.MathNode("mtd", [buildGroup$1(group.label, style)]);
    mtd.style.padding = "0";
    const mtr = new mathMLTree.MathNode("mtr", [mtd]);
    const mtable = new mathMLTree.MathNode("mtable", [mtr]);
    const label = new mathMLTree.MathNode("mpadded", [mtable]);
    label.setAttribute("width", "0");
    label.setAttribute("displaystyle", "false");
    label.setAttribute("scriptlevel", "1");
    if (group.side === "left") {
      label.style.display = "flex";
      label.style.justifyContent = "flex-end";
    }
    return label;
  }
});
defineFunction({
  type: "cdlabelparent",
  names: ["\\\\cdparent"],
  props: {
    numArgs: 1
  },
  handler({ parser }, args) {
    return {
      type: "cdlabelparent",
      mode: parser.mode,
      fragment: args[0]
    };
  },
  mathmlBuilder(group, style) {
    return new mathMLTree.MathNode("mrow", [buildGroup$1(group.fragment, style)]);
  }
});
defineFunction({
  type: "textord",
  names: ["\\@char"],
  props: {
    numArgs: 1,
    allowedInText: true
  },
  handler({ parser, token }, args) {
    const arg = assertNodeType(args[0], "ordgroup");
    const group = arg.body;
    let number = "";
    for (let i = 0; i < group.length; i++) {
      const node = assertNodeType(group[i], "textord");
      number += node.text;
    }
    const code = parseInt(number);
    if (isNaN(code)) {
      throw new ParseError(`\\@char has non-numeric argument ${number}`, token);
    }
    return {
      type: "textord",
      mode: parser.mode,
      text: String.fromCodePoint(code)
    };
  }
});
var htmlRegEx = /^(#[a-f0-9]{3}|#?[a-f0-9]{6})$/i;
var htmlOrNameRegEx = /^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i;
var RGBregEx = /^ *\d{1,3} *(?:, *\d{1,3} *){2}$/;
var rgbRegEx = /^ *[10](?:\.\d*)? *(?:, *[10](?:\.\d*)? *){2}$/;
var xcolorHtmlRegEx = /^[a-f0-9]{6}$/i;
var toHex = (num) => {
  let str = num.toString(16);
  if (str.length === 1) {
    str = "0" + str;
  }
  return str;
};
var xcolors = JSON.parse(`{
  "Apricot": "#ffb484",
  "Aquamarine": "#08b4bc",
  "Bittersweet": "#c84c14",
  "blue": "#0000FF",
  "Blue": "#303494",
  "BlueGreen": "#08b4bc",
  "BlueViolet": "#503c94",
  "BrickRed": "#b8341c",
  "brown": "#BF8040",
  "Brown": "#802404",
  "BurntOrange": "#f8941c",
  "CadetBlue": "#78749c",
  "CarnationPink": "#f884b4",
  "Cerulean": "#08a4e4",
  "CornflowerBlue": "#40ace4",
  "cyan": "#00FFFF",
  "Cyan": "#08acec",
  "Dandelion": "#ffbc44",
  "darkgray": "#404040",
  "DarkOrchid": "#a8548c",
  "Emerald": "#08ac9c",
  "ForestGreen": "#089c54",
  "Fuchsia": "#90348c",
  "Goldenrod": "#ffdc44",
  "gray": "#808080",
  "Gray": "#98949c",
  "green": "#00FF00",
  "Green": "#08a44c",
  "GreenYellow": "#e0e474",
  "JungleGreen": "#08ac9c",
  "Lavender": "#f89cc4",
  "lightgray": "#c0c0c0",
  "lime": "#BFFF00",
  "LimeGreen": "#90c43c",
  "magenta": "#FF00FF",
  "Magenta": "#f0048c",
  "Mahogany": "#b0341c",
  "Maroon": "#b03434",
  "Melon": "#f89c7c",
  "MidnightBlue": "#086494",
  "Mulberry": "#b03c94",
  "NavyBlue": "#086cbc",
  "olive": "#7F7F00",
  "OliveGreen": "#407c34",
  "orange": "#FF8000",
  "Orange": "#f8843c",
  "OrangeRed": "#f0145c",
  "Orchid": "#b074ac",
  "Peach": "#f8945c",
  "Periwinkle": "#8074bc",
  "PineGreen": "#088c74",
  "pink": "#ff7f7f",
  "Plum": "#98248c",
  "ProcessBlue": "#08b4ec",
  "purple": "#BF0040",
  "Purple": "#a0449c",
  "RawSienna": "#983c04",
  "red": "#ff0000",
  "Red": "#f01c24",
  "RedOrange": "#f86434",
  "RedViolet": "#a0246c",
  "Rhodamine": "#f0549c",
  "Royallue": "#0874bc",
  "RoyalPurple": "#683c9c",
  "RubineRed": "#f0047c",
  "Salmon": "#f8948c",
  "SeaGreen": "#30bc9c",
  "Sepia": "#701404",
  "SkyBlue": "#48c4dc",
  "SpringGreen": "#c8dc64",
  "Tan": "#e09c74",
  "teal": "#007F7F",
  "TealBlue": "#08acb4",
  "Thistle": "#d884b4",
  "Turquoise": "#08b4cc",
  "violet": "#800080",
  "Violet": "#60449c",
  "VioletRed": "#f054a4",
  "WildStrawberry": "#f0246c",
  "yellow": "#FFFF00",
  "Yellow": "#fff404",
  "YellowGreen": "#98cc6c",
  "YellowOrange": "#ffa41c"
}`);
var colorFromSpec = (model, spec) => {
  let color = "";
  if (model === "HTML") {
    if (!htmlRegEx.test(spec)) {
      throw new ParseError("Invalid HTML input.");
    }
    color = spec;
  } else if (model === "RGB") {
    if (!RGBregEx.test(spec)) {
      throw new ParseError("Invalid RGB input.");
    }
    spec.split(",").map((e) => {
      color += toHex(Number(e.trim()));
    });
  } else {
    if (!rgbRegEx.test(spec)) {
      throw new ParseError("Invalid rbg input.");
    }
    spec.split(",").map((e) => {
      const num = Number(e.trim());
      if (num > 1) {
        throw new ParseError("Color rgb input must be < 1.");
      }
      color += toHex(Number((num * 255).toFixed(0)));
    });
  }
  if (color.charAt(0) !== "#") {
    color = "#" + color;
  }
  return color;
};
var validateColor = (color, macros2, token) => {
  const macroName = `\\\\color@${color}`;
  const match = htmlOrNameRegEx.exec(color);
  if (!match) {
    throw new ParseError("Invalid color: '" + color + "'", token);
  }
  if (xcolorHtmlRegEx.test(color)) {
    return "#" + color;
  } else if (color.charAt(0) === "#") {
    return color;
  } else if (macros2.has(macroName)) {
    color = macros2.get(macroName).tokens[0].text;
  } else if (xcolors[color]) {
    color = xcolors[color];
  }
  return color;
};
var mathmlBuilder$9 = (group, style) => {
  let expr = buildExpression(group.body, style.withColor(group.color));
  expr = expr.map((e) => {
    e.style.color = group.color;
    return e;
  });
  return mathMLTree.newDocumentFragment(expr);
};
defineFunction({
  type: "color",
  names: ["\\textcolor"],
  props: {
    numArgs: 2,
    numOptionalArgs: 1,
    allowedInText: true,
    argTypes: ["raw", "raw", "original"]
  },
  handler({ parser, token }, args, optArgs) {
    const model = optArgs[0] && assertNodeType(optArgs[0], "raw").string;
    let color = "";
    if (model) {
      const spec = assertNodeType(args[0], "raw").string;
      color = colorFromSpec(model, spec);
    } else {
      color = validateColor(assertNodeType(args[0], "raw").string, parser.gullet.macros, token);
    }
    const body = args[1];
    return {
      type: "color",
      mode: parser.mode,
      color,
      isTextColor: true,
      body: ordargument(body)
    };
  },
  mathmlBuilder: mathmlBuilder$9
});
defineFunction({
  type: "color",
  names: ["\\color"],
  props: {
    numArgs: 1,
    numOptionalArgs: 1,
    allowedInText: true,
    argTypes: ["raw", "raw"]
  },
  handler({ parser, breakOnTokenText, token }, args, optArgs) {
    const model = optArgs[0] && assertNodeType(optArgs[0], "raw").string;
    let color = "";
    if (model) {
      const spec = assertNodeType(args[0], "raw").string;
      color = colorFromSpec(model, spec);
    } else {
      color = validateColor(assertNodeType(args[0], "raw").string, parser.gullet.macros, token);
    }
    const body = parser.parseExpression(true, breakOnTokenText, true);
    return {
      type: "color",
      mode: parser.mode,
      color,
      isTextColor: false,
      body
    };
  },
  mathmlBuilder: mathmlBuilder$9
});
defineFunction({
  type: "color",
  names: ["\\definecolor"],
  props: {
    numArgs: 3,
    allowedInText: true,
    argTypes: ["raw", "raw", "raw"]
  },
  handler({ parser, funcName, token }, args) {
    const name = assertNodeType(args[0], "raw").string;
    if (!/^[A-Za-z]+$/.test(name)) {
      throw new ParseError("Color name must be latin letters.", token);
    }
    const model = assertNodeType(args[1], "raw").string;
    if (!["HTML", "RGB", "rgb"].includes(model)) {
      throw new ParseError("Color model must be HTML, RGB, or rgb.", token);
    }
    const spec = assertNodeType(args[2], "raw").string;
    const color = colorFromSpec(model, spec);
    parser.gullet.macros.set(`\\\\color@${name}`, { tokens: [{ text: color }], numArgs: 0 });
    return { type: "internal", mode: parser.mode };
  }
  // No mathmlBuilder. The point of \definecolor is to set a macro.
});
defineFunction({
  type: "cr",
  names: ["\\\\"],
  props: {
    numArgs: 0,
    numOptionalArgs: 0,
    allowedInText: true
  },
  handler({ parser }, args, optArgs) {
    const size = parser.gullet.future().text === "[" ? parser.parseSizeGroup(true) : null;
    const newLine = !parser.settings.displayMode;
    return {
      type: "cr",
      mode: parser.mode,
      newLine,
      size: size && assertNodeType(size, "size").value
    };
  },
  // The following builder is called only at the top level,
  // not within tabular/array environments.
  mathmlBuilder(group, style) {
    const node = new mathMLTree.MathNode("mo");
    if (group.newLine) {
      node.setAttribute("linebreak", "newline");
      if (group.size) {
        const size = calculateSize(group.size, style);
        node.setAttribute("height", size.number + size.unit);
      }
    }
    return node;
  }
});
var globalMap = {
  "\\global": "\\global",
  "\\long": "\\\\globallong",
  "\\\\globallong": "\\\\globallong",
  "\\def": "\\gdef",
  "\\gdef": "\\gdef",
  "\\edef": "\\xdef",
  "\\xdef": "\\xdef",
  "\\let": "\\\\globallet",
  "\\futurelet": "\\\\globalfuture"
};
var checkControlSequence = (tok) => {
  const name = tok.text;
  if (/^(?:[\\{}$&#^_]|EOF)$/.test(name)) {
    throw new ParseError("Expected a control sequence", tok);
  }
  return name;
};
var getRHS = (parser) => {
  let tok = parser.gullet.popToken();
  if (tok.text === "=") {
    tok = parser.gullet.popToken();
    if (tok.text === " ") {
      tok = parser.gullet.popToken();
    }
  }
  return tok;
};
var letCommand = (parser, name, tok, global) => {
  let macro = parser.gullet.macros.get(tok.text);
  if (macro == null) {
    tok.noexpand = true;
    macro = {
      tokens: [tok],
      numArgs: 0,
      // reproduce the same behavior in expansion
      unexpandable: !parser.gullet.isExpandable(tok.text)
    };
  }
  parser.gullet.macros.set(name, macro, global);
};
defineFunction({
  type: "internal",
  names: [
    "\\global",
    "\\long",
    "\\\\globallong"
    // canâ€™t be entered directly
  ],
  props: {
    numArgs: 0,
    allowedInText: true
  },
  handler({ parser, funcName }) {
    parser.consumeSpaces();
    const token = parser.fetch();
    if (globalMap[token.text]) {
      if (funcName === "\\global" || funcName === "\\\\globallong") {
        token.text = globalMap[token.text];
      }
      return assertNodeType(parser.parseFunction(), "internal");
    }
    throw new ParseError(`Invalid token after macro prefix`, token);
  }
});
defineFunction({
  type: "internal",
  names: ["\\def", "\\gdef", "\\edef", "\\xdef"],
  props: {
    numArgs: 0,
    allowedInText: true,
    primitive: true
  },
  handler({ parser, funcName }) {
    let tok = parser.gullet.popToken();
    const name = tok.text;
    if (/^(?:[\\{}$&#^_]|EOF)$/.test(name)) {
      throw new ParseError("Expected a control sequence", tok);
    }
    let numArgs = 0;
    let insert;
    const delimiters2 = [[]];
    while (parser.gullet.future().text !== "{") {
      tok = parser.gullet.popToken();
      if (tok.text === "#") {
        if (parser.gullet.future().text === "{") {
          insert = parser.gullet.future();
          delimiters2[numArgs].push("{");
          break;
        }
        tok = parser.gullet.popToken();
        if (!/^[1-9]$/.test(tok.text)) {
          throw new ParseError(`Invalid argument number "${tok.text}"`);
        }
        if (parseInt(tok.text) !== numArgs + 1) {
          throw new ParseError(`Argument number "${tok.text}" out of order`);
        }
        numArgs++;
        delimiters2.push([]);
      } else if (tok.text === "EOF") {
        throw new ParseError("Expected a macro definition");
      } else {
        delimiters2[numArgs].push(tok.text);
      }
    }
    let { tokens } = parser.gullet.consumeArg();
    if (insert) {
      tokens.unshift(insert);
    }
    if (funcName === "\\edef" || funcName === "\\xdef") {
      tokens = parser.gullet.expandTokens(tokens);
      if (tokens.length > parser.gullet.settings.maxExpand) {
        throw new ParseError("Too many expansions in an " + funcName);
      }
      tokens.reverse();
    }
    parser.gullet.macros.set(
      name,
      { tokens, numArgs, delimiters: delimiters2 },
      funcName === globalMap[funcName]
    );
    return { type: "internal", mode: parser.mode };
  }
});
defineFunction({
  type: "internal",
  names: [
    "\\let",
    "\\\\globallet"
    // canâ€™t be entered directly
  ],
  props: {
    numArgs: 0,
    allowedInText: true,
    primitive: true
  },
  handler({ parser, funcName }) {
    const name = checkControlSequence(parser.gullet.popToken());
    parser.gullet.consumeSpaces();
    const tok = getRHS(parser);
    letCommand(parser, name, tok, funcName === "\\\\globallet");
    return { type: "internal", mode: parser.mode };
  }
});
defineFunction({
  type: "internal",
  names: [
    "\\futurelet",
    "\\\\globalfuture"
    // canâ€™t be entered directly
  ],
  props: {
    numArgs: 0,
    allowedInText: true,
    primitive: true
  },
  handler({ parser, funcName }) {
    const name = checkControlSequence(parser.gullet.popToken());
    const middle = parser.gullet.popToken();
    const tok = parser.gullet.popToken();
    letCommand(parser, name, tok, funcName === "\\\\globalfuture");
    parser.gullet.pushToken(tok);
    parser.gullet.pushToken(middle);
    return { type: "internal", mode: parser.mode };
  }
});
defineFunction({
  type: "internal",
  names: ["\\newcommand", "\\renewcommand", "\\providecommand"],
  props: {
    numArgs: 0,
    allowedInText: true,
    primitive: true
  },
  handler({ parser, funcName }) {
    let name = "";
    const tok = parser.gullet.popToken();
    if (tok.text === "{") {
      name = checkControlSequence(parser.gullet.popToken());
      parser.gullet.popToken();
    } else {
      name = checkControlSequence(tok);
    }
    const exists = parser.gullet.isDefined(name);
    if (exists && funcName === "\\newcommand") {
      throw new ParseError(
        `\\newcommand{${name}} attempting to redefine ${name}; use \\renewcommand`
      );
    }
    if (!exists && funcName === "\\renewcommand") {
      throw new ParseError(
        `\\renewcommand{${name}} when command ${name} does not yet exist; use \\newcommand`
      );
    }
    let numArgs = 0;
    if (parser.gullet.future().text === "[") {
      let tok2 = parser.gullet.popToken();
      tok2 = parser.gullet.popToken();
      if (!/^[0-9]$/.test(tok2.text)) {
        throw new ParseError(`Invalid number of arguments: "${tok2.text}"`);
      }
      numArgs = parseInt(tok2.text);
      tok2 = parser.gullet.popToken();
      if (tok2.text !== "]") {
        throw new ParseError(`Invalid argument "${tok2.text}"`);
      }
    }
    const { tokens } = parser.gullet.consumeArg();
    if (!(funcName === "\\providecommand" && parser.gullet.macros.has(name))) {
      parser.gullet.macros.set(
        name,
        { tokens, numArgs }
      );
    }
    return { type: "internal", mode: parser.mode };
  }
});
var delimiterSizes = {
  "\\bigl": { mclass: "mopen", size: 1 },
  "\\Bigl": { mclass: "mopen", size: 2 },
  "\\biggl": { mclass: "mopen", size: 3 },
  "\\Biggl": { mclass: "mopen", size: 4 },
  "\\bigr": { mclass: "mclose", size: 1 },
  "\\Bigr": { mclass: "mclose", size: 2 },
  "\\biggr": { mclass: "mclose", size: 3 },
  "\\Biggr": { mclass: "mclose", size: 4 },
  "\\bigm": { mclass: "mrel", size: 1 },
  "\\Bigm": { mclass: "mrel", size: 2 },
  "\\biggm": { mclass: "mrel", size: 3 },
  "\\Biggm": { mclass: "mrel", size: 4 },
  "\\big": { mclass: "mord", size: 1 },
  "\\Big": { mclass: "mord", size: 2 },
  "\\bigg": { mclass: "mord", size: 3 },
  "\\Bigg": { mclass: "mord", size: 4 }
};
var delimiters = [
  "(",
  "\\lparen",
  ")",
  "\\rparen",
  "[",
  "\\lbrack",
  "]",
  "\\rbrack",
  "\\{",
  "\\lbrace",
  "\\}",
  "\\rbrace",
  "\u2987",
  "\\llparenthesis",
  "\u2988",
  "\\rrparenthesis",
  "\\lfloor",
  "\\rfloor",
  "\u230A",
  "\u230B",
  "\\lceil",
  "\\rceil",
  "\u2308",
  "\u2309",
  "<",
  ">",
  "\\langle",
  "\u27E8",
  "\\rangle",
  "\u27E9",
  "\\lAngle",
  "\u27EA",
  "\\rAngle",
  "\u27EB",
  "\\llangle",
  "\u2989",
  "\\rrangle",
  "\u298A",
  "\\lt",
  "\\gt",
  "\\lvert",
  "\\rvert",
  "\\lVert",
  "\\rVert",
  "\\lgroup",
  "\\rgroup",
  "\u27EE",
  "\u27EF",
  "\\lmoustache",
  "\\rmoustache",
  "\u23B0",
  "\u23B1",
  "\\llbracket",
  "\\rrbracket",
  "\u27E6",
  "\u27E6",
  "\\lBrace",
  "\\rBrace",
  "\u2983",
  "\u2984",
  "/",
  "\\backslash",
  "|",
  "\\vert",
  "\\|",
  "\\Vert",
  "\u2016",
  "\\uparrow",
  "\\Uparrow",
  "\\downarrow",
  "\\Downarrow",
  "\\updownarrow",
  "\\Updownarrow",
  "."
];
var dels = ["}", "\\left", "\\middle", "\\right"];
var isDelimiter = (str) => str.length > 0 && (delimiters.includes(str) || delimiterSizes[str] || dels.includes(str));
var sizeToMaxHeight = [0, 1.2, 1.8, 2.4, 3];
function checkDelimiter(delim, context) {
  const symDelim = checkSymbolNodeType(delim);
  if (symDelim && delimiters.includes(symDelim.text)) {
    if (["<", "\\lt"].includes(symDelim.text)) {
      symDelim.text = "\u27E8";
    }
    if ([">", "\\gt"].includes(symDelim.text)) {
      symDelim.text = "\u27E9";
    }
    return symDelim;
  } else if (symDelim) {
    throw new ParseError(`Invalid delimiter '${symDelim.text}' after '${context.funcName}'`, delim);
  } else {
    throw new ParseError(`Invalid delimiter type '${delim.type}'`, delim);
  }
}
var needExplicitStretch = ["/", "\\", "\\backslash", "\\vert", "|"];
defineFunction({
  type: "delimsizing",
  names: [
    "\\bigl",
    "\\Bigl",
    "\\biggl",
    "\\Biggl",
    "\\bigr",
    "\\Bigr",
    "\\biggr",
    "\\Biggr",
    "\\bigm",
    "\\Bigm",
    "\\biggm",
    "\\Biggm",
    "\\big",
    "\\Big",
    "\\bigg",
    "\\Bigg"
  ],
  props: {
    numArgs: 1,
    argTypes: ["primitive"]
  },
  handler: (context, args) => {
    const delim = checkDelimiter(args[0], context);
    return {
      type: "delimsizing",
      mode: context.parser.mode,
      size: delimiterSizes[context.funcName].size,
      mclass: delimiterSizes[context.funcName].mclass,
      delim: delim.text
    };
  },
  mathmlBuilder: (group) => {
    const children = [];
    if (group.delim === ".") {
      group.delim = "";
    }
    children.push(makeText(group.delim, group.mode));
    const node = new mathMLTree.MathNode("mo", children);
    if (group.mclass === "mopen" || group.mclass === "mclose") {
      node.setAttribute("fence", "true");
    } else {
      node.setAttribute("fence", "false");
    }
    if (needExplicitStretch.includes(group.delim) || group.delim.indexOf("arrow") > -1) {
      node.setAttribute("stretchy", "true");
    }
    node.setAttribute("symmetric", "true");
    node.setAttribute("minsize", sizeToMaxHeight[group.size] + "em");
    node.setAttribute("maxsize", sizeToMaxHeight[group.size] + "em");
    return node;
  }
});
function assertParsed(group) {
  if (!group.body) {
    throw new Error("Bug: The leftright ParseNode wasn't fully parsed.");
  }
}
defineFunction({
  type: "leftright-right",
  names: ["\\right"],
  props: {
    numArgs: 1,
    argTypes: ["primitive"]
  },
  handler: (context, args) => {
    return {
      type: "leftright-right",
      mode: context.parser.mode,
      delim: checkDelimiter(args[0], context).text
    };
  }
});
defineFunction({
  type: "leftright",
  names: ["\\left"],
  props: {
    numArgs: 1,
    argTypes: ["primitive"]
  },
  handler: (context, args) => {
    const delim = checkDelimiter(args[0], context);
    const parser = context.parser;
    ++parser.leftrightDepth;
    let body = parser.parseExpression(false, null, true);
    let nextToken = parser.fetch();
    while (nextToken.text === "\\middle") {
      parser.consume();
      const middle = parser.fetch().text;
      if (!symbols.math[middle]) {
        throw new ParseError(`Invalid delimiter '${middle}' after '\\middle'`);
      }
      checkDelimiter({ type: "atom", mode: "math", text: middle }, { funcName: "\\middle" });
      body.push({ type: "middle", mode: "math", delim: middle });
      parser.consume();
      body = body.concat(parser.parseExpression(false, null, true));
      nextToken = parser.fetch();
    }
    --parser.leftrightDepth;
    parser.expect("\\right", false);
    const right = assertNodeType(parser.parseFunction(), "leftright-right");
    return {
      type: "leftright",
      mode: parser.mode,
      body,
      left: delim.text,
      right: right.delim
    };
  },
  mathmlBuilder: (group, style) => {
    assertParsed(group);
    const inner2 = buildExpression(group.body, style);
    if (group.left === ".") {
      group.left = "";
    }
    const leftNode = new mathMLTree.MathNode("mo", [makeText(group.left, group.mode)]);
    leftNode.setAttribute("fence", "true");
    leftNode.setAttribute("form", "prefix");
    if (group.left === "/" || group.left === "\\" || group.left.indexOf("arrow") > -1) {
      leftNode.setAttribute("stretchy", "true");
    }
    inner2.unshift(leftNode);
    if (group.right === ".") {
      group.right = "";
    }
    const rightNode = new mathMLTree.MathNode("mo", [makeText(group.right, group.mode)]);
    rightNode.setAttribute("fence", "true");
    rightNode.setAttribute("form", "postfix");
    if (group.right === "\u2216" || group.right.indexOf("arrow") > -1) {
      rightNode.setAttribute("stretchy", "true");
    }
    if (group.body.length > 0) {
      const lastElement = group.body[group.body.length - 1];
      if (lastElement.type === "color" && !lastElement.isTextColor) {
        rightNode.setAttribute("mathcolor", lastElement.color);
      }
    }
    inner2.push(rightNode);
    return makeRow(inner2);
  }
});
defineFunction({
  type: "middle",
  names: ["\\middle"],
  props: {
    numArgs: 1,
    argTypes: ["primitive"]
  },
  handler: (context, args) => {
    const delim = checkDelimiter(args[0], context);
    if (!context.parser.leftrightDepth) {
      throw new ParseError("\\middle without preceding \\left", delim);
    }
    return {
      type: "middle",
      mode: context.parser.mode,
      delim: delim.text
    };
  },
  mathmlBuilder: (group, style) => {
    const textNode = makeText(group.delim, group.mode);
    const middleNode = new mathMLTree.MathNode("mo", [textNode]);
    middleNode.setAttribute("fence", "true");
    if (group.delim.indexOf("arrow") > -1) {
      middleNode.setAttribute("stretchy", "true");
    }
    middleNode.setAttribute("form", "prefix");
    middleNode.setAttribute("lspace", "0.05em");
    middleNode.setAttribute("rspace", "0.05em");
    return middleNode;
  }
});
var padding$1 = (_) => {
  const node = new mathMLTree.MathNode("mspace");
  node.setAttribute("width", "3pt");
  return node;
};
var mathmlBuilder$8 = (group, style) => {
  let node;
  if (group.label.indexOf("colorbox") > -1 || group.label === "\\boxed") {
    node = new mathMLTree.MathNode("mrow", [
      padding$1(),
      buildGroup$1(group.body, style),
      padding$1()
    ]);
  } else {
    node = new mathMLTree.MathNode("menclose", [buildGroup$1(group.body, style)]);
  }
  switch (group.label) {
    case "\\overline":
      node.setAttribute("notation", "top");
      node.classes.push("tml-overline");
      break;
    case "\\underline":
      node.setAttribute("notation", "bottom");
      node.classes.push("tml-underline");
      break;
    case "\\cancel":
      node.setAttribute("notation", "updiagonalstrike");
      node.children.push(new mathMLTree.MathNode("mrow", [], ["tml-cancel", "upstrike"]));
      break;
    case "\\bcancel":
      node.setAttribute("notation", "downdiagonalstrike");
      node.children.push(new mathMLTree.MathNode("mrow", [], ["tml-cancel", "downstrike"]));
      break;
    case "\\sout":
      node.setAttribute("notation", "horizontalstrike");
      node.children.push(new mathMLTree.MathNode("mrow", [], ["tml-cancel", "sout"]));
      break;
    case "\\xcancel":
      node.setAttribute("notation", "updiagonalstrike downdiagonalstrike");
      node.classes.push("tml-xcancel");
      break;
    case "\\longdiv":
      node.setAttribute("notation", "longdiv");
      node.classes.push("longdiv-top");
      node.children.push(new mathMLTree.MathNode("mrow", [], ["longdiv-arc"]));
      break;
    case "\\phase":
      node.setAttribute("notation", "phasorangle");
      node.classes.push("phasor-bottom");
      node.children.push(new mathMLTree.MathNode("mrow", [], ["phasor-angle"]));
      break;
    case "\\textcircled":
      node.setAttribute("notation", "circle");
      node.classes.push("circle-pad");
      node.children.push(new mathMLTree.MathNode("mrow", [], ["textcircle"]));
      break;
    case "\\angl":
      node.setAttribute("notation", "actuarial");
      node.classes.push("actuarial");
      break;
    case "\\boxed":
      node.setAttribute("notation", "box");
      node.classes.push("tml-box");
      node.setAttribute("scriptlevel", "0");
      node.setAttribute("displaystyle", "true");
      break;
    case "\\fbox":
      node.setAttribute("notation", "box");
      node.classes.push("tml-fbox");
      break;
    case "\\fcolorbox":
    case "\\colorbox": {
      const style2 = { padding: "3pt 0 3pt 0" };
      if (group.label === "\\fcolorbox") {
        style2.border = "0.0667em solid " + String(group.borderColor);
      }
      node.style = style2;
      break;
    }
  }
  if (group.backgroundColor) {
    node.setAttribute("mathbackground", group.backgroundColor);
  }
  return node;
};
defineFunction({
  type: "enclose",
  names: ["\\colorbox"],
  props: {
    numArgs: 2,
    numOptionalArgs: 1,
    allowedInText: true,
    argTypes: ["raw", "raw", "text"]
  },
  handler({ parser, funcName }, args, optArgs) {
    const model = optArgs[0] && assertNodeType(optArgs[0], "raw").string;
    let color = "";
    if (model) {
      const spec = assertNodeType(args[0], "raw").string;
      color = colorFromSpec(model, spec);
    } else {
      color = validateColor(assertNodeType(args[0], "raw").string, parser.gullet.macros);
    }
    const body = args[1];
    return {
      type: "enclose",
      mode: parser.mode,
      label: funcName,
      backgroundColor: color,
      body
    };
  },
  mathmlBuilder: mathmlBuilder$8
});
defineFunction({
  type: "enclose",
  names: ["\\fcolorbox"],
  props: {
    numArgs: 3,
    numOptionalArgs: 1,
    allowedInText: true,
    argTypes: ["raw", "raw", "raw", "text"]
  },
  handler({ parser, funcName }, args, optArgs) {
    const model = optArgs[0] && assertNodeType(optArgs[0], "raw").string;
    let borderColor = "";
    let backgroundColor;
    if (model) {
      const borderSpec = assertNodeType(args[0], "raw").string;
      const backgroundSpec = assertNodeType(args[0], "raw").string;
      borderColor = colorFromSpec(model, borderSpec);
      backgroundColor = colorFromSpec(model, backgroundSpec);
    } else {
      borderColor = validateColor(assertNodeType(args[0], "raw").string, parser.gullet.macros);
      backgroundColor = validateColor(assertNodeType(args[1], "raw").string, parser.gullet.macros);
    }
    const body = args[2];
    return {
      type: "enclose",
      mode: parser.mode,
      label: funcName,
      backgroundColor,
      borderColor,
      body
    };
  },
  mathmlBuilder: mathmlBuilder$8
});
defineFunction({
  type: "enclose",
  names: ["\\fbox"],
  props: {
    numArgs: 1,
    argTypes: ["hbox"],
    allowedInText: true
  },
  handler({ parser }, args) {
    return {
      type: "enclose",
      mode: parser.mode,
      label: "\\fbox",
      body: args[0]
    };
  }
});
defineFunction({
  type: "enclose",
  names: [
    "\\angl",
    "\\cancel",
    "\\bcancel",
    "\\xcancel",
    "\\sout",
    "\\overline",
    "\\boxed",
    "\\longdiv",
    "\\phase"
  ],
  props: {
    numArgs: 1
  },
  handler({ parser, funcName }, args) {
    const body = args[0];
    return {
      type: "enclose",
      mode: parser.mode,
      label: funcName,
      body
    };
  },
  mathmlBuilder: mathmlBuilder$8
});
defineFunction({
  type: "enclose",
  names: ["\\underline"],
  props: {
    numArgs: 1,
    allowedInText: true
  },
  handler({ parser, funcName }, args) {
    const body = args[0];
    return {
      type: "enclose",
      mode: parser.mode,
      label: funcName,
      body
    };
  },
  mathmlBuilder: mathmlBuilder$8
});
defineFunction({
  type: "enclose",
  names: ["\\textcircled"],
  props: {
    numArgs: 1,
    argTypes: ["text"],
    allowedInArgument: true,
    allowedInText: true
  },
  handler({ parser, funcName }, args) {
    const body = args[0];
    return {
      type: "enclose",
      mode: parser.mode,
      label: funcName,
      body
    };
  },
  mathmlBuilder: mathmlBuilder$8
});
var _environments = {};
function defineEnvironment({ type, names, props, handler, mathmlBuilder: mathmlBuilder2 }) {
  const data = {
    type,
    numArgs: props.numArgs || 0,
    allowedInText: false,
    numOptionalArgs: 0,
    handler
  };
  for (let i = 0; i < names.length; ++i) {
    _environments[names[i]] = data;
  }
  if (mathmlBuilder2) {
    _mathmlGroupBuilders[type] = mathmlBuilder2;
  }
}
var SourceLocation = class _SourceLocation {
  constructor(lexer, start, end) {
    this.lexer = lexer;
    this.start = start;
    this.end = end;
  }
  /**
   * Merges two `SourceLocation`s from location providers, given they are
   * provided in order of appearance.
   * - Returns the first one's location if only the first is provided.
   * - Returns a merged range of the first and the last if both are provided
   *   and their lexers match.
   * - Otherwise, returns null.
   */
  static range(first, second) {
    if (!second) {
      return first && first.loc;
    } else if (!first || !first.loc || !second.loc || first.loc.lexer !== second.loc.lexer) {
      return null;
    } else {
      return new _SourceLocation(first.loc.lexer, first.loc.start, second.loc.end);
    }
  }
};
var Token = class _Token {
  constructor(text2, loc) {
    this.text = text2;
    this.loc = loc;
  }
  /**
   * Given a pair of tokens (this and endToken), compute a `Token` encompassing
   * the whole input range enclosed by these two.
   */
  range(endToken, text2) {
    return new _Token(text2, SourceLocation.range(this, endToken));
  }
};
var StyleLevel = {
  DISPLAY: 0,
  TEXT: 1,
  SCRIPT: 2,
  SCRIPTSCRIPT: 3
};
var _macros = {};
function defineMacro(name, body) {
  _macros[name] = body;
}
var macros = _macros;
defineMacro("\\noexpand", function(context) {
  const t = context.popToken();
  if (context.isExpandable(t.text)) {
    t.noexpand = true;
    t.treatAsRelax = true;
  }
  return { tokens: [t], numArgs: 0 };
});
defineMacro("\\expandafter", function(context) {
  const t = context.popToken();
  context.expandOnce(true);
  return { tokens: [t], numArgs: 0 };
});
defineMacro("\\@firstoftwo", function(context) {
  const args = context.consumeArgs(2);
  return { tokens: args[0], numArgs: 0 };
});
defineMacro("\\@secondoftwo", function(context) {
  const args = context.consumeArgs(2);
  return { tokens: args[1], numArgs: 0 };
});
defineMacro("\\@ifnextchar", function(context) {
  const args = context.consumeArgs(3);
  context.consumeSpaces();
  const nextToken = context.future();
  if (args[0].length === 1 && args[0][0].text === nextToken.text) {
    return { tokens: args[1], numArgs: 0 };
  } else {
    return { tokens: args[2], numArgs: 0 };
  }
});
defineMacro("\\@ifstar", "\\@ifnextchar *{\\@firstoftwo{#1}}");
defineMacro("\\TextOrMath", function(context) {
  const args = context.consumeArgs(2);
  if (context.mode === "text") {
    return { tokens: args[0], numArgs: 0 };
  } else {
    return { tokens: args[1], numArgs: 0 };
  }
});
var stringFromArg = (arg) => {
  let str = "";
  for (let i = arg.length - 1; i > -1; i--) {
    str += arg[i].text;
  }
  return str;
};
var digitToNumber = {
  0: 0,
  1: 1,
  2: 2,
  3: 3,
  4: 4,
  5: 5,
  6: 6,
  7: 7,
  8: 8,
  9: 9,
  a: 10,
  A: 10,
  b: 11,
  B: 11,
  c: 12,
  C: 12,
  d: 13,
  D: 13,
  e: 14,
  E: 14,
  f: 15,
  F: 15
};
var nextCharNumber = (context) => {
  const numStr = context.future().text;
  if (numStr === "EOF") {
    return [null, ""];
  }
  return [digitToNumber[numStr.charAt(0)], numStr];
};
var appendCharNumbers = (number, numStr, base) => {
  for (let i = 1; i < numStr.length; i++) {
    const digit = digitToNumber[numStr.charAt(i)];
    number *= base;
    number += digit;
  }
  return number;
};
defineMacro("\\char", function(context) {
  let token = context.popToken();
  let base;
  let number = "";
  if (token.text === "'") {
    base = 8;
    token = context.popToken();
  } else if (token.text === '"') {
    base = 16;
    token = context.popToken();
  } else if (token.text === "`") {
    token = context.popToken();
    if (token.text[0] === "\\") {
      number = token.text.charCodeAt(1);
    } else if (token.text === "EOF") {
      throw new ParseError("\\char` missing argument");
    } else {
      number = token.text.charCodeAt(0);
    }
  } else {
    base = 10;
  }
  if (base) {
    let numStr = token.text;
    number = digitToNumber[numStr.charAt(0)];
    if (number == null || number >= base) {
      throw new ParseError(`Invalid base-${base} digit ${token.text}`);
    }
    number = appendCharNumbers(number, numStr, base);
    let digit;
    [digit, numStr] = nextCharNumber(context);
    while (digit != null && digit < base) {
      number *= base;
      number += digit;
      number = appendCharNumbers(number, numStr, base);
      context.popToken();
      [digit, numStr] = nextCharNumber(context);
    }
  }
  return `\\@char{${number}}`;
});
function recreateArgStr(context) {
  const tokens = context.consumeArgs(1)[0];
  let str = "";
  let expectedLoc = tokens[tokens.length - 1].loc.start;
  for (let i = tokens.length - 1; i >= 0; i--) {
    const actualLoc = tokens[i].loc.start;
    if (actualLoc > expectedLoc) {
      str += " ";
      expectedLoc = actualLoc;
    }
    str += tokens[i].text;
    expectedLoc += tokens[i].text.length;
  }
  return str;
}
defineMacro("\\surd", "\\sqrt{\\vphantom{|}}");
defineMacro("\u2295", "\\oplus");
defineMacro("\\long", "");
defineMacro("\\bgroup", "{");
defineMacro("\\egroup", "}");
defineMacro("~", "\\nobreakspace");
defineMacro("\\lq", "`");
defineMacro("\\rq", "'");
defineMacro("\\aa", "\\r a");
defineMacro("\\Bbbk", "\\Bbb{k}");
defineMacro("\\mathstrut", "\\vphantom{(}");
defineMacro("\\underbar", "\\underline{\\text{#1}}");
defineMacro("\\vdots", "{\\varvdots\\rule{0pt}{15pt}}");
defineMacro("\u22EE", "\\vdots");
defineMacro("\\arraystretch", "1");
defineMacro("\\arraycolsep", "6pt");
defineMacro("\\substack", "\\begin{subarray}{c}#1\\end{subarray}");
defineMacro("\\iff", "\\DOTSB\\;\\Longleftrightarrow\\;");
defineMacro("\\implies", "\\DOTSB\\;\\Longrightarrow\\;");
defineMacro("\\impliedby", "\\DOTSB\\;\\Longleftarrow\\;");
var dotsByToken = {
  ",": "\\dotsc",
  "\\not": "\\dotsb",
  // \keybin@ checks for the following:
  "+": "\\dotsb",
  "=": "\\dotsb",
  "<": "\\dotsb",
  ">": "\\dotsb",
  "-": "\\dotsb",
  "*": "\\dotsb",
  ":": "\\dotsb",
  // Symbols whose definition starts with \DOTSB:
  "\\DOTSB": "\\dotsb",
  "\\coprod": "\\dotsb",
  "\\bigvee": "\\dotsb",
  "\\bigwedge": "\\dotsb",
  "\\biguplus": "\\dotsb",
  "\\bigcap": "\\dotsb",
  "\\bigcup": "\\dotsb",
  "\\prod": "\\dotsb",
  "\\sum": "\\dotsb",
  "\\bigotimes": "\\dotsb",
  "\\bigoplus": "\\dotsb",
  "\\bigodot": "\\dotsb",
  "\\bigsqcap": "\\dotsb",
  "\\bigsqcup": "\\dotsb",
  "\\bigtimes": "\\dotsb",
  "\\And": "\\dotsb",
  "\\longrightarrow": "\\dotsb",
  "\\Longrightarrow": "\\dotsb",
  "\\longleftarrow": "\\dotsb",
  "\\Longleftarrow": "\\dotsb",
  "\\longleftrightarrow": "\\dotsb",
  "\\Longleftrightarrow": "\\dotsb",
  "\\mapsto": "\\dotsb",
  "\\longmapsto": "\\dotsb",
  "\\hookrightarrow": "\\dotsb",
  "\\doteq": "\\dotsb",
  // Symbols whose definition starts with \mathbin:
  "\\mathbin": "\\dotsb",
  // Symbols whose definition starts with \mathrel:
  "\\mathrel": "\\dotsb",
  "\\relbar": "\\dotsb",
  "\\Relbar": "\\dotsb",
  "\\xrightarrow": "\\dotsb",
  "\\xleftarrow": "\\dotsb",
  // Symbols whose definition starts with \DOTSI:
  "\\DOTSI": "\\dotsi",
  "\\int": "\\dotsi",
  "\\oint": "\\dotsi",
  "\\iint": "\\dotsi",
  "\\iiint": "\\dotsi",
  "\\iiiint": "\\dotsi",
  "\\idotsint": "\\dotsi",
  // Symbols whose definition starts with \DOTSX:
  "\\DOTSX": "\\dotsx"
};
defineMacro("\\dots", function(context) {
  let thedots = "\\dotso";
  const next = context.expandAfterFuture().text;
  if (next in dotsByToken) {
    thedots = dotsByToken[next];
  } else if (next.slice(0, 4) === "\\not") {
    thedots = "\\dotsb";
  } else if (next in symbols.math) {
    if (["bin", "rel"].includes(symbols.math[next].group)) {
      thedots = "\\dotsb";
    }
  }
  return thedots;
});
var spaceAfterDots = {
  // \rightdelim@ checks for the following:
  ")": true,
  "]": true,
  "\\rbrack": true,
  "\\}": true,
  "\\rbrace": true,
  "\\rangle": true,
  "\\rceil": true,
  "\\rfloor": true,
  "\\rgroup": true,
  "\\rmoustache": true,
  "\\right": true,
  "\\bigr": true,
  "\\biggr": true,
  "\\Bigr": true,
  "\\Biggr": true,
  // \extra@ also tests for the following:
  $: true,
  // \extrap@ checks for the following:
  ";": true,
  ".": true,
  ",": true
};
defineMacro("\\dotso", function(context) {
  const next = context.future().text;
  if (next in spaceAfterDots) {
    return "\\ldots\\,";
  } else {
    return "\\ldots";
  }
});
defineMacro("\\dotsc", function(context) {
  const next = context.future().text;
  if (next in spaceAfterDots && next !== ",") {
    return "\\ldots\\,";
  } else {
    return "\\ldots";
  }
});
defineMacro("\\cdots", function(context) {
  const next = context.future().text;
  if (next in spaceAfterDots) {
    return "\\@cdots\\,";
  } else {
    return "\\@cdots";
  }
});
defineMacro("\\dotsb", "\\cdots");
defineMacro("\\dotsm", "\\cdots");
defineMacro("\\dotsi", "\\!\\cdots");
defineMacro("\\idotsint", "\\dotsi");
defineMacro("\\dotsx", "\\ldots\\,");
defineMacro("\\DOTSI", "\\relax");
defineMacro("\\DOTSB", "\\relax");
defineMacro("\\DOTSX", "\\relax");
defineMacro("\\tmspace", "\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");
defineMacro("\\,", "{\\tmspace+{3mu}{.1667em}}");
defineMacro("\\thinspace", "\\,");
defineMacro("\\>", "\\mskip{4mu}");
defineMacro("\\:", "{\\tmspace+{4mu}{.2222em}}");
defineMacro("\\medspace", "\\:");
defineMacro("\\;", "{\\tmspace+{5mu}{.2777em}}");
defineMacro("\\thickspace", "\\;");
defineMacro("\\!", "{\\tmspace-{3mu}{.1667em}}");
defineMacro("\\negthinspace", "\\!");
defineMacro("\\negmedspace", "{\\tmspace-{4mu}{.2222em}}");
defineMacro("\\negthickspace", "{\\tmspace-{5mu}{.277em}}");
defineMacro("\\enspace", "\\kern.5em ");
defineMacro("\\enskip", "\\hskip.5em\\relax");
defineMacro("\\quad", "\\hskip1em\\relax");
defineMacro("\\qquad", "\\hskip2em\\relax");
defineMacro("\\AA", "\\TextOrMath{\\Angstrom}{\\mathring{A}}\\relax");
defineMacro("\\tag", "\\@ifstar\\tag@literal\\tag@paren");
defineMacro("\\tag@paren", "\\tag@literal{({#1})}");
defineMacro("\\tag@literal", (context) => {
  if (context.macros.get("\\df@tag")) {
    throw new ParseError("Multiple \\tag");
  }
  return "\\gdef\\df@tag{\\text{#1}}";
});
defineMacro("\\notag", "\\nonumber");
defineMacro("\\nonumber", "\\gdef\\@eqnsw{0}");
defineMacro("\\bmod", "\\mathbin{\\text{mod}}");
defineMacro(
  "\\pod",
  "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"
);
defineMacro("\\pmod", "\\pod{{\\rm mod}\\mkern6mu#1}");
defineMacro(
  "\\mod",
  "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"
);
defineMacro("\\newline", "\\\\\\relax");
defineMacro("\\TeX", "\\textrm{T}\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125em\\textrm{X}");
defineMacro(
  "\\LaTeX",
  "\\textrm{L}\\kern-.35em\\raisebox{0.2em}{\\scriptstyle A}\\kern-.15em\\TeX"
);
defineMacro(
  "\\Temml",
  // eslint-disable-next-line max-len
  "\\textrm{T}\\kern-0.2em\\lower{0.2em}{\\textrm{E}}\\kern-0.08em{\\textrm{M}\\kern-0.08em\\raise{0.2em}\\textrm{M}\\kern-0.08em\\textrm{L}}"
);
defineMacro("\\hspace", "\\@ifstar\\@hspacer\\@hspace");
defineMacro("\\@hspace", "\\hskip #1\\relax");
defineMacro("\\@hspacer", "\\rule{0pt}{0pt}\\hskip #1\\relax");
defineMacro("\\colon", `\\mathpunct{\\char"3a}`);
defineMacro("\\prescript", "\\pres@cript{_{#1}^{#2}}{}{#3}");
defineMacro("\\ordinarycolon", `\\char"3a`);
defineMacro("\\vcentcolon", "\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}}");
defineMacro("\\coloneq", '\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}\\char"2212}');
defineMacro("\\Coloneq", '\\mathrel{\\char"2237\\char"2212}');
defineMacro("\\Eqqcolon", '\\mathrel{\\char"3d\\char"2237}');
defineMacro("\\Eqcolon", '\\mathrel{\\char"2212\\char"2237}');
defineMacro("\\colonapprox", '\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}\\char"2248}');
defineMacro("\\Colonapprox", '\\mathrel{\\char"2237\\char"2248}');
defineMacro("\\colonsim", '\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}\\char"223c}');
defineMacro("\\Colonsim", '\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}\\char"223c}');
defineMacro("\\ratio", "\\vcentcolon");
defineMacro("\\coloncolon", "\\dblcolon");
defineMacro("\\colonequals", "\\coloneqq");
defineMacro("\\coloncolonequals", "\\Coloneqq");
defineMacro("\\equalscolon", "\\eqqcolon");
defineMacro("\\equalscoloncolon", "\\Eqqcolon");
defineMacro("\\colonminus", "\\coloneq");
defineMacro("\\coloncolonminus", "\\Coloneq");
defineMacro("\\minuscolon", "\\eqcolon");
defineMacro("\\minuscoloncolon", "\\Eqcolon");
defineMacro("\\coloncolonapprox", "\\Colonapprox");
defineMacro("\\coloncolonsim", "\\Colonsim");
defineMacro("\\notni", "\\mathrel{\\char`\u220C}");
defineMacro("\\limsup", "\\DOTSB\\operatorname*{lim\\,sup}");
defineMacro("\\liminf", "\\DOTSB\\operatorname*{lim\\,inf}");
defineMacro("\\injlim", "\\DOTSB\\operatorname*{inj\\,lim}");
defineMacro("\\projlim", "\\DOTSB\\operatorname*{proj\\,lim}");
defineMacro("\\varlimsup", "\\DOTSB\\operatorname*{\\overline{\\text{lim}}}");
defineMacro("\\varliminf", "\\DOTSB\\operatorname*{\\underline{\\text{lim}}}");
defineMacro("\\varinjlim", "\\DOTSB\\operatorname*{\\underrightarrow{\\text{lim}}}");
defineMacro("\\varprojlim", "\\DOTSB\\operatorname*{\\underleftarrow{\\text{lim}}}");
defineMacro("\\centerdot", "{\\medspace\\rule{0.167em}{0.189em}\\medspace}");
defineMacro("\\argmin", "\\DOTSB\\operatorname*{arg\\,min}");
defineMacro("\\argmax", "\\DOTSB\\operatorname*{arg\\,max}");
defineMacro("\\plim", "\\DOTSB\\operatorname*{plim}");
defineMacro("\\leftmodels", "\\mathop{\\reflectbox{$\\models$}}");
defineMacro("\\bra", "\\mathinner{\\langle{#1}|}");
defineMacro("\\ket", "\\mathinner{|{#1}\\rangle}");
defineMacro("\\braket", "\\mathinner{\\langle{#1}\\rangle}");
defineMacro("\\Bra", "\\left\\langle#1\\right|");
defineMacro("\\Ket", "\\left|#1\\right\\rangle");
var replaceVert = (argStr, match) => {
  const ch = match[0] === "|" ? "\\vert" : "\\Vert";
  const replaceStr = `}\\,\\middle${ch}\\,{`;
  return argStr.slice(0, match.index) + replaceStr + argStr.slice(match.index + match[0].length);
};
defineMacro("\\Braket", function(context) {
  let argStr = recreateArgStr(context);
  const regEx = /\|\||\||\\\|/g;
  let match;
  while ((match = regEx.exec(argStr)) !== null) {
    argStr = replaceVert(argStr, match);
  }
  return "\\left\\langle{" + argStr + "}\\right\\rangle";
});
defineMacro("\\Set", function(context) {
  let argStr = recreateArgStr(context);
  const match = /\|\||\||\\\|/.exec(argStr);
  if (match) {
    argStr = replaceVert(argStr, match);
  }
  return "\\left\\{\\:{" + argStr + "}\\:\\right\\}";
});
defineMacro("\\set", function(context) {
  const argStr = recreateArgStr(context);
  return "\\{{" + argStr.replace(/\|/, "}\\mid{") + "}\\}";
});
defineMacro("\\angln", "{\\angl n}");
defineMacro("\\odv", "\\@ifstar\\odv@next\\odv@numerator");
defineMacro("\\odv@numerator", "\\frac{\\mathrm{d}#1}{\\mathrm{d}#2}");
defineMacro("\\odv@next", "\\frac{\\mathrm{d}}{\\mathrm{d}#2}#1");
defineMacro("\\pdv", "\\@ifstar\\pdv@next\\pdv@numerator");
var pdvHelper = (args) => {
  const numerator = args[0][0].text;
  const denoms = stringFromArg(args[1]).split(",");
  const power = String(denoms.length);
  const numOp = power === "1" ? "\\partial" : `\\partial^${power}`;
  let denominator = "";
  denoms.map((e) => {
    denominator += "\\partial " + e.trim() + "\\,";
  });
  return [numerator, numOp, denominator.replace(/\\,$/, "")];
};
defineMacro("\\pdv@numerator", function(context) {
  const [numerator, numOp, denominator] = pdvHelper(context.consumeArgs(2));
  return `\\frac{${numOp} ${numerator}}{${denominator}}`;
});
defineMacro("\\pdv@next", function(context) {
  const [numerator, numOp, denominator] = pdvHelper(context.consumeArgs(2));
  return `\\frac{${numOp}}{${denominator}} ${numerator}`;
});
defineMacro("\\upalpha", "\\up@greek{\\alpha}");
defineMacro("\\upbeta", "\\up@greek{\\beta}");
defineMacro("\\upgamma", "\\up@greek{\\gamma}");
defineMacro("\\updelta", "\\up@greek{\\delta}");
defineMacro("\\upepsilon", "\\up@greek{\\epsilon}");
defineMacro("\\upzeta", "\\up@greek{\\zeta}");
defineMacro("\\upeta", "\\up@greek{\\eta}");
defineMacro("\\uptheta", "\\up@greek{\\theta}");
defineMacro("\\upiota", "\\up@greek{\\iota}");
defineMacro("\\upkappa", "\\up@greek{\\kappa}");
defineMacro("\\uplambda", "\\up@greek{\\lambda}");
defineMacro("\\upmu", "\\up@greek{\\mu}");
defineMacro("\\upnu", "\\up@greek{\\nu}");
defineMacro("\\upxi", "\\up@greek{\\xi}");
defineMacro("\\upomicron", "\\up@greek{\\omicron}");
defineMacro("\\uppi", "\\up@greek{\\pi}");
defineMacro("\\upalpha", "\\up@greek{\\alpha}");
defineMacro("\\uprho", "\\up@greek{\\rho}");
defineMacro("\\upsigma", "\\up@greek{\\sigma}");
defineMacro("\\uptau", "\\up@greek{\\tau}");
defineMacro("\\upupsilon", "\\up@greek{\\upsilon}");
defineMacro("\\upphi", "\\up@greek{\\phi}");
defineMacro("\\upchi", "\\up@greek{\\chi}");
defineMacro("\\uppsi", "\\up@greek{\\psi}");
defineMacro("\\upomega", "\\up@greek{\\omega}");
defineMacro("\\invamp", '\\mathbin{\\char"214b}');
defineMacro("\\parr", '\\mathbin{\\char"214b}');
defineMacro("\\with", '\\mathbin{\\char"26}');
defineMacro("\\multimapinv", '\\mathrel{\\char"27dc}');
defineMacro("\\multimapboth", '\\mathrel{\\char"29df}');
defineMacro("\\scoh", '{\\mkern5mu\\char"2322\\mkern5mu}');
defineMacro("\\sincoh", '{\\mkern5mu\\char"2323\\mkern5mu}');
defineMacro("\\coh", `{\\mkern5mu\\rule{}{0.7em}\\mathrlap{\\smash{\\raise2mu{\\char"2322}}}
{\\smash{\\lower4mu{\\char"2323}}}\\mkern5mu}`);
defineMacro("\\incoh", `{\\mkern5mu\\rule{}{0.7em}\\mathrlap{\\smash{\\raise2mu{\\char"2323}}}
{\\smash{\\lower4mu{\\char"2322}}}\\mkern5mu}`);
defineMacro("\\standardstate", "\\text{\\tiny\\char`\u29B5}");
defineMacro("\\ce", function(context) {
  return chemParse(context.consumeArgs(1)[0], "ce");
});
defineMacro("\\pu", function(context) {
  return chemParse(context.consumeArgs(1)[0], "pu");
});
defineMacro("\\uniDash", `{\\rule{0.672em}{0.06em}}`);
defineMacro("\\triDash", `{\\rule{0.15em}{0.06em}\\kern2mu\\rule{0.15em}{0.06em}\\kern2mu\\rule{0.15em}{0.06em}}`);
defineMacro("\\tripleDash", `\\kern0.075em\\raise0.25em{\\triDash}\\kern0.075em`);
defineMacro("\\tripleDashOverLine", `\\kern0.075em\\mathrlap{\\raise0.125em{\\uniDash}}\\raise0.34em{\\triDash}\\kern0.075em`);
defineMacro("\\tripleDashOverDoubleLine", `\\kern0.075em\\mathrlap{\\mathrlap{\\raise0.48em{\\triDash}}\\raise0.27em{\\uniDash}}{\\raise0.05em{\\uniDash}}\\kern0.075em`);
defineMacro("\\tripleDashBetweenDoubleLine", `\\kern0.075em\\mathrlap{\\mathrlap{\\raise0.48em{\\uniDash}}\\raise0.27em{\\triDash}}{\\raise0.05em{\\uniDash}}\\kern0.075em`);
var chemParse = function(tokens, stateMachine) {
  var str = "";
  var expectedLoc = tokens.length && tokens[tokens.length - 1].loc.start;
  for (var i = tokens.length - 1; i >= 0; i--) {
    if (tokens[i].loc.start > expectedLoc) {
      str += " ";
      expectedLoc = tokens[i].loc.start;
    }
    str += tokens[i].text;
    expectedLoc += tokens[i].text.length;
  }
  var tex = texify.go(mhchemParser.go(str, stateMachine));
  return tex;
};
var mhchemParser = {
  //
  // Parses mchem \ce syntax
  //
  // Call like
  //   go("H2O");
  //
  go: function(input, stateMachine) {
    if (!input) {
      return [];
    }
    if (stateMachine === void 0) {
      stateMachine = "ce";
    }
    var state = "0";
    var buffer = {};
    buffer["parenthesisLevel"] = 0;
    input = input.replace(/\n/g, " ");
    input = input.replace(/[\u2212\u2013\u2014\u2010]/g, "-");
    input = input.replace(/[\u2026]/g, "...");
    var lastInput;
    var watchdog = 10;
    var output = [];
    while (true) {
      if (lastInput !== input) {
        watchdog = 10;
        lastInput = input;
      } else {
        watchdog--;
      }
      var machine = mhchemParser.stateMachines[stateMachine];
      var t = machine.transitions[state] || machine.transitions["*"];
      iterateTransitions:
        for (var i = 0; i < t.length; i++) {
          var matches = mhchemParser.patterns.match_(t[i].pattern, input);
          if (matches) {
            var task = t[i].task;
            for (var iA = 0; iA < task.action_.length; iA++) {
              var o;
              if (machine.actions[task.action_[iA].type_]) {
                o = machine.actions[task.action_[iA].type_](buffer, matches.match_, task.action_[iA].option);
              } else if (mhchemParser.actions[task.action_[iA].type_]) {
                o = mhchemParser.actions[task.action_[iA].type_](buffer, matches.match_, task.action_[iA].option);
              } else {
                throw ["MhchemBugA", "mhchem bug A. Please report. (" + task.action_[iA].type_ + ")"];
              }
              mhchemParser.concatArray(output, o);
            }
            state = task.nextState || state;
            if (input.length > 0) {
              if (!task.revisit) {
                input = matches.remainder;
              }
              if (!task.toContinue) {
                break iterateTransitions;
              }
            } else {
              return output;
            }
          }
        }
      if (watchdog <= 0) {
        throw ["MhchemBugU", "mhchem bug U. Please report."];
      }
    }
  },
  concatArray: function(a, b) {
    if (b) {
      if (Array.isArray(b)) {
        for (var iB = 0; iB < b.length; iB++) {
          a.push(b[iB]);
        }
      } else {
        a.push(b);
      }
    }
  },
  patterns: {
    //
    // Matching patterns
    // either regexps or function that return null or {match_:"a", remainder:"bc"}
    //
    patterns: {
      // property names must not look like integers ("2") for correct property traversal order, later on
      "empty": /^$/,
      "else": /^./,
      "else2": /^./,
      "space": /^\s/,
      "space A": /^\s(?=[A-Z\\$])/,
      "space$": /^\s$/,
      "a-z": /^[a-z]/,
      "x": /^x/,
      "x$": /^x$/,
      "i$": /^i$/,
      "letters": /^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,
      "\\greek": /^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,
      "one lowercase latin letter $": /^(?:([a-z])(?:$|[^a-zA-Z]))$/,
      "$one lowercase latin letter$ $": /^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,
      "one lowercase greek letter $": /^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,
      "digits": /^[0-9]+/,
      "-9.,9": /^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,
      "-9.,9 no missing 0": /^[+\-]?[0-9]+(?:[.,][0-9]+)?/,
      "(-)(9.,9)(e)(99)": function(input) {
        var m = input.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:([eE]|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);
        if (m && m[0]) {
          return { match_: m.splice(1), remainder: input.substr(m[0].length) };
        }
        return null;
      },
      "(-)(9)^(-9)": function(input) {
        var m = input.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);
        if (m && m[0]) {
          return { match_: m.splice(1), remainder: input.substr(m[0].length) };
        }
        return null;
      },
      "state of aggregation $": function(input) {
        var a = mhchemParser.patterns.findObserveGroups(input, "", /^\([a-z]{1,3}(?=[\),])/, ")", "");
        if (a && a.remainder.match(/^($|[\s,;\)\]\}])/)) {
          return a;
        }
        var m = input.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);
        if (m) {
          return { match_: m[0], remainder: input.substr(m[0].length) };
        }
        return null;
      },
      "_{(state of aggregation)}$": /^_\{(\([a-z]{1,3}\))\}/,
      "{[(": /^(?:\\\{|\[|\()/,
      ")]}": /^(?:\)|\]|\\\})/,
      ", ": /^[,;]\s*/,
      ",": /^[,;]/,
      ".": /^[.]/,
      ". ": /^([.\u22C5\u00B7\u2022])\s*/,
      "...": /^\.\.\.(?=$|[^.])/,
      "* ": /^([*])\s*/,
      "^{(...)}": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "^{", "", "", "}");
      },
      "^($...$)": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "^", "$", "$", "");
      },
      "^a": /^\^([0-9]+|[^\\_])/,
      "^\\x{}{}": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "^", /^\\[a-zA-Z]+\{/, "}", "", "", "{", "}", "", true);
      },
      "^\\x{}": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "^", /^\\[a-zA-Z]+\{/, "}", "");
      },
      "^\\x": /^\^(\\[a-zA-Z]+)\s*/,
      "^(-1)": /^\^(-?\d+)/,
      "'": /^'/,
      "_{(...)}": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "_{", "", "", "}");
      },
      "_($...$)": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "_", "$", "$", "");
      },
      "_9": /^_([+\-]?[0-9]+|[^\\])/,
      "_\\x{}{}": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "_", /^\\[a-zA-Z]+\{/, "}", "", "", "{", "}", "", true);
      },
      "_\\x{}": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "_", /^\\[a-zA-Z]+\{/, "}", "");
      },
      "_\\x": /^_(\\[a-zA-Z]+)\s*/,
      "^_": /^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,
      "{}": /^\{\}/,
      "{...}": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "", "{", "}", "");
      },
      "{(...)}": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "{", "", "", "}");
      },
      "$...$": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "", "$", "$", "");
      },
      "${(...)}$": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "${", "", "", "}$");
      },
      "$(...)$": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "$", "", "", "$");
      },
      "=<>": /^[=<>]/,
      "#": /^[#\u2261]/,
      "+": /^\+/,
      "-$": /^-(?=[\s_},;\]/]|$|\([a-z]+\))/,
      // -space -, -; -] -/ -$ -state-of-aggregation
      "-9": /^-(?=[0-9])/,
      "- orbital overlap": /^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,
      "-": /^-/,
      "pm-operator": /^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,
      "operator": /^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,
      "arrowUpDown": /^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,
      "\\bond{(...)}": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "\\bond{", "", "", "}");
      },
      "->": /^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,
      "CMT": /^[CMT](?=\[)/,
      "[(...)]": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "[", "", "", "]");
      },
      "1st-level escape": /^(&|\\\\|\\hline)\s*/,
      "\\,": /^(?:\\[,\ ;:])/,
      // \\x - but output no space before
      "\\x{}{}": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "", /^\\[a-zA-Z]+\{/, "}", "", "", "{", "}", "", true);
      },
      "\\x{}": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "", /^\\[a-zA-Z]+\{/, "}", "");
      },
      "\\ca": /^\\ca(?:\s+|(?![a-zA-Z]))/,
      "\\x": /^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,
      "orbital": /^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,
      // only those with numbers in front, because the others will be formatted correctly anyway
      "others": /^[\/~|]/,
      "\\frac{(...)}": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "\\frac{", "", "", "}", "{", "", "", "}");
      },
      "\\overset{(...)}": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "\\overset{", "", "", "}", "{", "", "", "}");
      },
      "\\underset{(...)}": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "\\underset{", "", "", "}", "{", "", "", "}");
      },
      "\\underbrace{(...)}": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "\\underbrace{", "", "", "}_", "{", "", "", "}");
      },
      "\\color{(...)}0": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "\\color{", "", "", "}");
      },
      "\\color{(...)}{(...)}1": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "\\color{", "", "", "}", "{", "", "", "}");
      },
      "\\color(...){(...)}2": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "\\color", "\\", "", /^(?=\{)/, "{", "", "", "}");
      },
      "\\ce{(...)}": function(input) {
        return mhchemParser.patterns.findObserveGroups(input, "\\ce{", "", "", "}");
      },
      "oxidation$": /^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,
      "d-oxidation$": /^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,
      // 0 could be oxidation or charge
      "roman numeral": /^[IVX]+/,
      "1/2$": /^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,
      "amount": function(input) {
        var match;
        match = input.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/);
        if (match) {
          return { match_: match[0], remainder: input.substr(match[0].length) };
        }
        var a = mhchemParser.patterns.findObserveGroups(input, "", "$", "$", "");
        if (a) {
          match = a.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/);
          if (match) {
            return { match_: match[0], remainder: input.substr(match[0].length) };
          }
        }
        return null;
      },
      "amount2": function(input) {
        return this["amount"](input);
      },
      "(KV letters),": /^(?:[A-Z][a-z]{0,2}|i)(?=,)/,
      "formula$": function(input) {
        if (input.match(/^\([a-z]+\)$/)) {
          return null;
        }
        var match = input.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);
        if (match) {
          return { match_: match[0], remainder: input.substr(match[0].length) };
        }
        return null;
      },
      "uprightEntities": /^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,
      "/": /^\s*(\/)\s*/,
      "//": /^\s*(\/\/)\s*/,
      "*": /^\s*[*.]\s*/
    },
    findObserveGroups: function(input, begExcl, begIncl, endIncl, endExcl, beg2Excl, beg2Incl, end2Incl, end2Excl, combine) {
      var _match = function(input2, pattern) {
        if (typeof pattern === "string") {
          if (input2.indexOf(pattern) !== 0) {
            return null;
          }
          return pattern;
        } else {
          var match2 = input2.match(pattern);
          if (!match2) {
            return null;
          }
          return match2[0];
        }
      };
      var _findObserveGroups = function(input2, i, endChars) {
        var braces = 0;
        while (i < input2.length) {
          var a = input2.charAt(i);
          var match2 = _match(input2.substr(i), endChars);
          if (match2 !== null && braces === 0) {
            return { endMatchBegin: i, endMatchEnd: i + match2.length };
          } else if (a === "{") {
            braces++;
          } else if (a === "}") {
            if (braces === 0) {
              throw ["ExtraCloseMissingOpen", "Extra close brace or missing open brace"];
            } else {
              braces--;
            }
          }
          i++;
        }
        if (braces > 0) {
          return null;
        }
        return null;
      };
      var match = _match(input, begExcl);
      if (match === null) {
        return null;
      }
      input = input.substr(match.length);
      match = _match(input, begIncl);
      if (match === null) {
        return null;
      }
      var e = _findObserveGroups(input, match.length, endIncl || endExcl);
      if (e === null) {
        return null;
      }
      var match1 = input.substring(0, endIncl ? e.endMatchEnd : e.endMatchBegin);
      if (!(beg2Excl || beg2Incl)) {
        return {
          match_: match1,
          remainder: input.substr(e.endMatchEnd)
        };
      } else {
        var group2 = this.findObserveGroups(input.substr(e.endMatchEnd), beg2Excl, beg2Incl, end2Incl, end2Excl);
        if (group2 === null) {
          return null;
        }
        var matchRet = [match1, group2.match_];
        return {
          match_: combine ? matchRet.join("") : matchRet,
          remainder: group2.remainder
        };
      }
    },
    //
    // Matching function
    // e.g. match("a", input) will look for the regexp called "a" and see if it matches
    // returns null or {match_:"a", remainder:"bc"}
    //
    match_: function(m, input) {
      var pattern = mhchemParser.patterns.patterns[m];
      if (pattern === void 0) {
        throw ["MhchemBugP", "mhchem bug P. Please report. (" + m + ")"];
      } else if (typeof pattern === "function") {
        return mhchemParser.patterns.patterns[m](input);
      } else {
        var match = input.match(pattern);
        if (match) {
          var mm;
          if (match[2]) {
            mm = [match[1], match[2]];
          } else if (match[1]) {
            mm = match[1];
          } else {
            mm = match[0];
          }
          return { match_: mm, remainder: input.substr(match[0].length) };
        }
        return null;
      }
    }
  },
  //
  // Generic state machine actions
  //
  actions: {
    "a=": function(buffer, m) {
      buffer.a = (buffer.a || "") + m;
    },
    "b=": function(buffer, m) {
      buffer.b = (buffer.b || "") + m;
    },
    "p=": function(buffer, m) {
      buffer.p = (buffer.p || "") + m;
    },
    "o=": function(buffer, m) {
      buffer.o = (buffer.o || "") + m;
    },
    "q=": function(buffer, m) {
      buffer.q = (buffer.q || "") + m;
    },
    "d=": function(buffer, m) {
      buffer.d = (buffer.d || "") + m;
    },
    "rm=": function(buffer, m) {
      buffer.rm = (buffer.rm || "") + m;
    },
    "text=": function(buffer, m) {
      buffer.text_ = (buffer.text_ || "") + m;
    },
    "insert": function(buffer, m, a) {
      return { type_: a };
    },
    "insert+p1": function(buffer, m, a) {
      return { type_: a, p1: m };
    },
    "insert+p1+p2": function(buffer, m, a) {
      return { type_: a, p1: m[0], p2: m[1] };
    },
    "copy": function(buffer, m) {
      return m;
    },
    "rm": function(buffer, m) {
      return { type_: "rm", p1: m || "" };
    },
    "text": function(buffer, m) {
      return mhchemParser.go(m, "text");
    },
    "{text}": function(buffer, m) {
      var ret = ["{"];
      mhchemParser.concatArray(ret, mhchemParser.go(m, "text"));
      ret.push("}");
      return ret;
    },
    "tex-math": function(buffer, m) {
      return mhchemParser.go(m, "tex-math");
    },
    "tex-math tight": function(buffer, m) {
      return mhchemParser.go(m, "tex-math tight");
    },
    "bond": function(buffer, m, k) {
      return { type_: "bond", kind_: k || m };
    },
    "color0-output": function(buffer, m) {
      return { type_: "color0", color: m[0] };
    },
    "ce": function(buffer, m) {
      return mhchemParser.go(m);
    },
    "1/2": function(buffer, m) {
      var ret = [];
      if (m.match(/^[+\-]/)) {
        ret.push(m.substr(0, 1));
        m = m.substr(1);
      }
      var n = m.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);
      n[1] = n[1].replace(/\$/g, "");
      ret.push({ type_: "frac", p1: n[1], p2: n[2] });
      if (n[3]) {
        n[3] = n[3].replace(/\$/g, "");
        ret.push({ type_: "tex-math", p1: n[3] });
      }
      return ret;
    },
    "9,9": function(buffer, m) {
      return mhchemParser.go(m, "9,9");
    }
  },
  //
  // createTransitions
  // convert  { 'letter': { 'state': { action_: 'output' } } }  to  { 'state' => [ { pattern: 'letter', task: { action_: [{type_: 'output'}] } } ] }
  // with expansion of 'a|b' to 'a' and 'b' (at 2 places)
  //
  createTransitions: function(o) {
    var pattern, state;
    var stateArray;
    var i;
    var transitions = {};
    for (pattern in o) {
      for (state in o[pattern]) {
        stateArray = state.split("|");
        o[pattern][state].stateArray = stateArray;
        for (i = 0; i < stateArray.length; i++) {
          transitions[stateArray[i]] = [];
        }
      }
    }
    for (pattern in o) {
      for (state in o[pattern]) {
        stateArray = o[pattern][state].stateArray || [];
        for (i = 0; i < stateArray.length; i++) {
          var p = o[pattern][state];
          if (p.action_) {
            p.action_ = [].concat(p.action_);
            for (var k = 0; k < p.action_.length; k++) {
              if (typeof p.action_[k] === "string") {
                p.action_[k] = { type_: p.action_[k] };
              }
            }
          } else {
            p.action_ = [];
          }
          var patternArray = pattern.split("|");
          for (var j = 0; j < patternArray.length; j++) {
            if (stateArray[i] === "*") {
              for (var t in transitions) {
                transitions[t].push({ pattern: patternArray[j], task: p });
              }
            } else {
              transitions[stateArray[i]].push({ pattern: patternArray[j], task: p });
            }
          }
        }
      }
    }
    return transitions;
  },
  stateMachines: {}
};
mhchemParser.stateMachines = {
  //
  // \ce state machines
  //
  //#region ce
  "ce": {
    // main parser
    transitions: mhchemParser.createTransitions({
      "empty": {
        "*": { action_: "output" }
      },
      "else": {
        "0|1|2": { action_: "beginsWithBond=false", revisit: true, toContinue: true }
      },
      "oxidation$": {
        "0": { action_: "oxidation-output" }
      },
      "CMT": {
        "r": { action_: "rdt=", nextState: "rt" },
        "rd": { action_: "rqt=", nextState: "rdt" }
      },
      "arrowUpDown": {
        "0|1|2|as": { action_: ["sb=false", "output", "operator"], nextState: "1" }
      },
      "uprightEntities": {
        "0|1|2": { action_: ["o=", "output"], nextState: "1" }
      },
      "orbital": {
        "0|1|2|3": { action_: "o=", nextState: "o" }
      },
      "->": {
        "0|1|2|3": { action_: "r=", nextState: "r" },
        "a|as": { action_: ["output", "r="], nextState: "r" },
        "*": { action_: ["output", "r="], nextState: "r" }
      },
      "+": {
        "o": { action_: "d= kv", nextState: "d" },
        "d|D": { action_: "d=", nextState: "d" },
        "q": { action_: "d=", nextState: "qd" },
        "qd|qD": { action_: "d=", nextState: "qd" },
        "dq": { action_: ["output", "d="], nextState: "d" },
        "3": { action_: ["sb=false", "output", "operator"], nextState: "0" }
      },
      "amount": {
        "0|2": { action_: "a=", nextState: "a" }
      },
      "pm-operator": {
        "0|1|2|a|as": { action_: ["sb=false", "output", { type_: "operator", option: "\\pm" }], nextState: "0" }
      },
      "operator": {
        "0|1|2|a|as": { action_: ["sb=false", "output", "operator"], nextState: "0" }
      },
      "-$": {
        "o|q": { action_: ["charge or bond", "output"], nextState: "qd" },
        "d": { action_: "d=", nextState: "d" },
        "D": { action_: ["output", { type_: "bond", option: "-" }], nextState: "3" },
        "q": { action_: "d=", nextState: "qd" },
        "qd": { action_: "d=", nextState: "qd" },
        "qD|dq": { action_: ["output", { type_: "bond", option: "-" }], nextState: "3" }
      },
      "-9": {
        "3|o": { action_: ["output", { type_: "insert", option: "hyphen" }], nextState: "3" }
      },
      "- orbital overlap": {
        "o": { action_: ["output", { type_: "insert", option: "hyphen" }], nextState: "2" },
        "d": { action_: ["output", { type_: "insert", option: "hyphen" }], nextState: "2" }
      },
      "-": {
        "0|1|2": { action_: [{ type_: "output", option: 1 }, "beginsWithBond=true", { type_: "bond", option: "-" }], nextState: "3" },
        "3": { action_: { type_: "bond", option: "-" } },
        "a": { action_: ["output", { type_: "insert", option: "hyphen" }], nextState: "2" },
        "as": { action_: [{ type_: "output", option: 2 }, { type_: "bond", option: "-" }], nextState: "3" },
        "b": { action_: "b=" },
        "o": { action_: { type_: "- after o/d", option: false }, nextState: "2" },
        "q": { action_: { type_: "- after o/d", option: false }, nextState: "2" },
        "d|qd|dq": { action_: { type_: "- after o/d", option: true }, nextState: "2" },
        "D|qD|p": { action_: ["output", { type_: "bond", option: "-" }], nextState: "3" }
      },
      "amount2": {
        "1|3": { action_: "a=", nextState: "a" }
      },
      "letters": {
        "0|1|2|3|a|as|b|p|bp|o": { action_: "o=", nextState: "o" },
        "q|dq": { action_: ["output", "o="], nextState: "o" },
        "d|D|qd|qD": { action_: "o after d", nextState: "o" }
      },
      "digits": {
        "o": { action_: "q=", nextState: "q" },
        "d|D": { action_: "q=", nextState: "dq" },
        "q": { action_: ["output", "o="], nextState: "o" },
        "a": { action_: "o=", nextState: "o" }
      },
      "space A": {
        "b|p|bp": {}
      },
      "space": {
        "a": { nextState: "as" },
        "0": { action_: "sb=false" },
        "1|2": { action_: "sb=true" },
        "r|rt|rd|rdt|rdq": { action_: "output", nextState: "0" },
        "*": { action_: ["output", "sb=true"], nextState: "1" }
      },
      "1st-level escape": {
        "1|2": { action_: ["output", { type_: "insert+p1", option: "1st-level escape" }] },
        "*": { action_: ["output", { type_: "insert+p1", option: "1st-level escape" }], nextState: "0" }
      },
      "[(...)]": {
        "r|rt": { action_: "rd=", nextState: "rd" },
        "rd|rdt": { action_: "rq=", nextState: "rdq" }
      },
      "...": {
        "o|d|D|dq|qd|qD": { action_: ["output", { type_: "bond", option: "..." }], nextState: "3" },
        "*": { action_: [{ type_: "output", option: 1 }, { type_: "insert", option: "ellipsis" }], nextState: "1" }
      },
      ". |* ": {
        "*": { action_: ["output", { type_: "insert", option: "addition compound" }], nextState: "1" }
      },
      "state of aggregation $": {
        "*": { action_: ["output", "state of aggregation"], nextState: "1" }
      },
      "{[(": {
        "a|as|o": { action_: ["o=", "output", "parenthesisLevel++"], nextState: "2" },
        "0|1|2|3": { action_: ["o=", "output", "parenthesisLevel++"], nextState: "2" },
        "*": { action_: ["output", "o=", "output", "parenthesisLevel++"], nextState: "2" }
      },
      ")]}": {
        "0|1|2|3|b|p|bp|o": { action_: ["o=", "parenthesisLevel--"], nextState: "o" },
        "a|as|d|D|q|qd|qD|dq": { action_: ["output", "o=", "parenthesisLevel--"], nextState: "o" }
      },
      ", ": {
        "*": { action_: ["output", "comma"], nextState: "0" }
      },
      "^_": {
        // ^ and _ without a sensible argument
        "*": {}
      },
      "^{(...)}|^($...$)": {
        "0|1|2|as": { action_: "b=", nextState: "b" },
        "p": { action_: "b=", nextState: "bp" },
        "3|o": { action_: "d= kv", nextState: "D" },
        "q": { action_: "d=", nextState: "qD" },
        "d|D|qd|qD|dq": { action_: ["output", "d="], nextState: "D" }
      },
      "^a|^\\x{}{}|^\\x{}|^\\x|'": {
        "0|1|2|as": { action_: "b=", nextState: "b" },
        "p": { action_: "b=", nextState: "bp" },
        "3|o": { action_: "d= kv", nextState: "d" },
        "q": { action_: "d=", nextState: "qd" },
        "d|qd|D|qD": { action_: "d=" },
        "dq": { action_: ["output", "d="], nextState: "d" }
      },
      "_{(state of aggregation)}$": {
        "d|D|q|qd|qD|dq": { action_: ["output", "q="], nextState: "q" }
      },
      "_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x": {
        "0|1|2|as": { action_: "p=", nextState: "p" },
        "b": { action_: "p=", nextState: "bp" },
        "3|o": { action_: "q=", nextState: "q" },
        "d|D": { action_: "q=", nextState: "dq" },
        "q|qd|qD|dq": { action_: ["output", "q="], nextState: "q" }
      },
      "=<>": {
        "0|1|2|3|a|as|o|q|d|D|qd|qD|dq": { action_: [{ type_: "output", option: 2 }, "bond"], nextState: "3" }
      },
      "#": {
        "0|1|2|3|a|as|o": { action_: [{ type_: "output", option: 2 }, { type_: "bond", option: "#" }], nextState: "3" }
      },
      "{}": {
        "*": { action_: { type_: "output", option: 1 }, nextState: "1" }
      },
      "{...}": {
        "0|1|2|3|a|as|b|p|bp": { action_: "o=", nextState: "o" },
        "o|d|D|q|qd|qD|dq": { action_: ["output", "o="], nextState: "o" }
      },
      "$...$": {
        "a": { action_: "a=" },
        // 2$n$
        "0|1|2|3|as|b|p|bp|o": { action_: "o=", nextState: "o" },
        // not 'amount'
        "as|o": { action_: "o=" },
        "q|d|D|qd|qD|dq": { action_: ["output", "o="], nextState: "o" }
      },
      "\\bond{(...)}": {
        "*": { action_: [{ type_: "output", option: 2 }, "bond"], nextState: "3" }
      },
      "\\frac{(...)}": {
        "*": { action_: [{ type_: "output", option: 1 }, "frac-output"], nextState: "3" }
      },
      "\\overset{(...)}": {
        "*": { action_: [{ type_: "output", option: 2 }, "overset-output"], nextState: "3" }
      },
      "\\underset{(...)}": {
        "*": { action_: [{ type_: "output", option: 2 }, "underset-output"], nextState: "3" }
      },
      "\\underbrace{(...)}": {
        "*": { action_: [{ type_: "output", option: 2 }, "underbrace-output"], nextState: "3" }
      },
      "\\color{(...)}{(...)}1|\\color(...){(...)}2": {
        "*": { action_: [{ type_: "output", option: 2 }, "color-output"], nextState: "3" }
      },
      "\\color{(...)}0": {
        "*": { action_: [{ type_: "output", option: 2 }, "color0-output"] }
      },
      "\\ce{(...)}": {
        "*": { action_: [{ type_: "output", option: 2 }, "ce"], nextState: "3" }
      },
      "\\,": {
        "*": { action_: [{ type_: "output", option: 1 }, "copy"], nextState: "1" }
      },
      "\\x{}{}|\\x{}|\\x": {
        "0|1|2|3|a|as|b|p|bp|o|c0": { action_: ["o=", "output"], nextState: "3" },
        "*": { action_: ["output", "o=", "output"], nextState: "3" }
      },
      "others": {
        "*": { action_: [{ type_: "output", option: 1 }, "copy"], nextState: "3" }
      },
      "else2": {
        "a": { action_: "a to o", nextState: "o", revisit: true },
        "as": { action_: ["output", "sb=true"], nextState: "1", revisit: true },
        "r|rt|rd|rdt|rdq": { action_: ["output"], nextState: "0", revisit: true },
        "*": { action_: ["output", "copy"], nextState: "3" }
      }
    }),
    actions: {
      "o after d": function(buffer, m) {
        var ret;
        if ((buffer.d || "").match(/^[0-9]+$/)) {
          var tmp = buffer.d;
          buffer.d = void 0;
          ret = this["output"](buffer);
          buffer.b = tmp;
        } else {
          ret = this["output"](buffer);
        }
        mhchemParser.actions["o="](buffer, m);
        return ret;
      },
      "d= kv": function(buffer, m) {
        buffer.d = m;
        buffer.dType = "kv";
      },
      "charge or bond": function(buffer, m) {
        if (buffer["beginsWithBond"]) {
          var ret = [];
          mhchemParser.concatArray(ret, this["output"](buffer));
          mhchemParser.concatArray(ret, mhchemParser.actions["bond"](buffer, m, "-"));
          return ret;
        } else {
          buffer.d = m;
        }
      },
      "- after o/d": function(buffer, m, isAfterD) {
        var c1 = mhchemParser.patterns.match_("orbital", buffer.o || "");
        var c2 = mhchemParser.patterns.match_("one lowercase greek letter $", buffer.o || "");
        var c3 = mhchemParser.patterns.match_("one lowercase latin letter $", buffer.o || "");
        var c4 = mhchemParser.patterns.match_("$one lowercase latin letter$ $", buffer.o || "");
        var hyphenFollows = m === "-" && (c1 && c1.remainder === "" || c2 || c3 || c4);
        if (hyphenFollows && !buffer.a && !buffer.b && !buffer.p && !buffer.d && !buffer.q && !c1 && c3) {
          buffer.o = "$" + buffer.o + "$";
        }
        var ret = [];
        if (hyphenFollows) {
          mhchemParser.concatArray(ret, this["output"](buffer));
          ret.push({ type_: "hyphen" });
        } else {
          c1 = mhchemParser.patterns.match_("digits", buffer.d || "");
          if (isAfterD && c1 && c1.remainder === "") {
            mhchemParser.concatArray(ret, mhchemParser.actions["d="](buffer, m));
            mhchemParser.concatArray(ret, this["output"](buffer));
          } else {
            mhchemParser.concatArray(ret, this["output"](buffer));
            mhchemParser.concatArray(ret, mhchemParser.actions["bond"](buffer, m, "-"));
          }
        }
        return ret;
      },
      "a to o": function(buffer) {
        buffer.o = buffer.a;
        buffer.a = void 0;
      },
      "sb=true": function(buffer) {
        buffer.sb = true;
      },
      "sb=false": function(buffer) {
        buffer.sb = false;
      },
      "beginsWithBond=true": function(buffer) {
        buffer["beginsWithBond"] = true;
      },
      "beginsWithBond=false": function(buffer) {
        buffer["beginsWithBond"] = false;
      },
      "parenthesisLevel++": function(buffer) {
        buffer["parenthesisLevel"]++;
      },
      "parenthesisLevel--": function(buffer) {
        buffer["parenthesisLevel"]--;
      },
      "state of aggregation": function(buffer, m) {
        return { type_: "state of aggregation", p1: mhchemParser.go(m, "o") };
      },
      "comma": function(buffer, m) {
        var a = m.replace(/\s*$/, "");
        var withSpace = a !== m;
        if (withSpace && buffer["parenthesisLevel"] === 0) {
          return { type_: "comma enumeration L", p1: a };
        } else {
          return { type_: "comma enumeration M", p1: a };
        }
      },
      "output": function(buffer, m, entityFollows) {
        var ret;
        if (!buffer.r) {
          ret = [];
          if (!buffer.a && !buffer.b && !buffer.p && !buffer.o && !buffer.q && !buffer.d && !entityFollows) {
          } else {
            if (buffer.sb) {
              ret.push({ type_: "entitySkip" });
            }
            if (!buffer.o && !buffer.q && !buffer.d && !buffer.b && !buffer.p && entityFollows !== 2) {
              buffer.o = buffer.a;
              buffer.a = void 0;
            } else if (!buffer.o && !buffer.q && !buffer.d && (buffer.b || buffer.p)) {
              buffer.o = buffer.a;
              buffer.d = buffer.b;
              buffer.q = buffer.p;
              buffer.a = buffer.b = buffer.p = void 0;
            } else {
              if (buffer.o && buffer.dType === "kv" && mhchemParser.patterns.match_("d-oxidation$", buffer.d || "")) {
                buffer.dType = "oxidation";
              } else if (buffer.o && buffer.dType === "kv" && !buffer.q) {
                buffer.dType = void 0;
              }
            }
            ret.push({
              type_: "chemfive",
              a: mhchemParser.go(buffer.a, "a"),
              b: mhchemParser.go(buffer.b, "bd"),
              p: mhchemParser.go(buffer.p, "pq"),
              o: mhchemParser.go(buffer.o, "o"),
              q: mhchemParser.go(buffer.q, "pq"),
              d: mhchemParser.go(buffer.d, buffer.dType === "oxidation" ? "oxidation" : "bd"),
              dType: buffer.dType
            });
          }
        } else {
          var rd;
          if (buffer.rdt === "M") {
            rd = mhchemParser.go(buffer.rd, "tex-math");
          } else if (buffer.rdt === "T") {
            rd = [{ type_: "text", p1: buffer.rd || "" }];
          } else {
            rd = mhchemParser.go(buffer.rd);
          }
          var rq;
          if (buffer.rqt === "M") {
            rq = mhchemParser.go(buffer.rq, "tex-math");
          } else if (buffer.rqt === "T") {
            rq = [{ type_: "text", p1: buffer.rq || "" }];
          } else {
            rq = mhchemParser.go(buffer.rq);
          }
          ret = {
            type_: "arrow",
            r: buffer.r,
            rd,
            rq
          };
        }
        for (var p in buffer) {
          if (p !== "parenthesisLevel" && p !== "beginsWithBond") {
            delete buffer[p];
          }
        }
        return ret;
      },
      "oxidation-output": function(buffer, m) {
        var ret = ["{"];
        mhchemParser.concatArray(ret, mhchemParser.go(m, "oxidation"));
        ret.push("}");
        return ret;
      },
      "frac-output": function(buffer, m) {
        return { type_: "frac-ce", p1: mhchemParser.go(m[0]), p2: mhchemParser.go(m[1]) };
      },
      "overset-output": function(buffer, m) {
        return { type_: "overset", p1: mhchemParser.go(m[0]), p2: mhchemParser.go(m[1]) };
      },
      "underset-output": function(buffer, m) {
        return { type_: "underset", p1: mhchemParser.go(m[0]), p2: mhchemParser.go(m[1]) };
      },
      "underbrace-output": function(buffer, m) {
        return { type_: "underbrace", p1: mhchemParser.go(m[0]), p2: mhchemParser.go(m[1]) };
      },
      "color-output": function(buffer, m) {
        return { type_: "color", color1: m[0], color2: mhchemParser.go(m[1]) };
      },
      "r=": function(buffer, m) {
        buffer.r = m;
      },
      "rdt=": function(buffer, m) {
        buffer.rdt = m;
      },
      "rd=": function(buffer, m) {
        buffer.rd = m;
      },
      "rqt=": function(buffer, m) {
        buffer.rqt = m;
      },
      "rq=": function(buffer, m) {
        buffer.rq = m;
      },
      "operator": function(buffer, m, p1) {
        return { type_: "operator", kind_: p1 || m };
      }
    }
  },
  "a": {
    transitions: mhchemParser.createTransitions({
      "empty": {
        "*": {}
      },
      "1/2$": {
        "0": { action_: "1/2" }
      },
      "else": {
        "0": { nextState: "1", revisit: true }
      },
      "$(...)$": {
        "*": { action_: "tex-math tight", nextState: "1" }
      },
      ",": {
        "*": { action_: { type_: "insert", option: "commaDecimal" } }
      },
      "else2": {
        "*": { action_: "copy" }
      }
    }),
    actions: {}
  },
  "o": {
    transitions: mhchemParser.createTransitions({
      "empty": {
        "*": {}
      },
      "1/2$": {
        "0": { action_: "1/2" }
      },
      "else": {
        "0": { nextState: "1", revisit: true }
      },
      "letters": {
        "*": { action_: "rm" }
      },
      "\\ca": {
        "*": { action_: { type_: "insert", option: "circa" } }
      },
      "\\x{}{}|\\x{}|\\x": {
        "*": { action_: "copy" }
      },
      "${(...)}$|$(...)$": {
        "*": { action_: "tex-math" }
      },
      "{(...)}": {
        "*": { action_: "{text}" }
      },
      "else2": {
        "*": { action_: "copy" }
      }
    }),
    actions: {}
  },
  "text": {
    transitions: mhchemParser.createTransitions({
      "empty": {
        "*": { action_: "output" }
      },
      "{...}": {
        "*": { action_: "text=" }
      },
      "${(...)}$|$(...)$": {
        "*": { action_: "tex-math" }
      },
      "\\greek": {
        "*": { action_: ["output", "rm"] }
      },
      "\\,|\\x{}{}|\\x{}|\\x": {
        "*": { action_: ["output", "copy"] }
      },
      "else": {
        "*": { action_: "text=" }
      }
    }),
    actions: {
      "output": function(buffer) {
        if (buffer.text_) {
          var ret = { type_: "text", p1: buffer.text_ };
          for (var p in buffer) {
            delete buffer[p];
          }
          return ret;
        }
      }
    }
  },
  "pq": {
    transitions: mhchemParser.createTransitions({
      "empty": {
        "*": {}
      },
      "state of aggregation $": {
        "*": { action_: "state of aggregation" }
      },
      "i$": {
        "0": { nextState: "!f", revisit: true }
      },
      "(KV letters),": {
        "0": { action_: "rm", nextState: "0" }
      },
      "formula$": {
        "0": { nextState: "f", revisit: true }
      },
      "1/2$": {
        "0": { action_: "1/2" }
      },
      "else": {
        "0": { nextState: "!f", revisit: true }
      },
      "${(...)}$|$(...)$": {
        "*": { action_: "tex-math" }
      },
      "{(...)}": {
        "*": { action_: "text" }
      },
      "a-z": {
        "f": { action_: "tex-math" }
      },
      "letters": {
        "*": { action_: "rm" }
      },
      "-9.,9": {
        "*": { action_: "9,9" }
      },
      ",": {
        "*": { action_: { type_: "insert+p1", option: "comma enumeration S" } }
      },
      "\\color{(...)}{(...)}1|\\color(...){(...)}2": {
        "*": { action_: "color-output" }
      },
      "\\color{(...)}0": {
        "*": { action_: "color0-output" }
      },
      "\\ce{(...)}": {
        "*": { action_: "ce" }
      },
      "\\,|\\x{}{}|\\x{}|\\x": {
        "*": { action_: "copy" }
      },
      "else2": {
        "*": { action_: "copy" }
      }
    }),
    actions: {
      "state of aggregation": function(buffer, m) {
        return { type_: "state of aggregation subscript", p1: mhchemParser.go(m, "o") };
      },
      "color-output": function(buffer, m) {
        return { type_: "color", color1: m[0], color2: mhchemParser.go(m[1], "pq") };
      }
    }
  },
  "bd": {
    transitions: mhchemParser.createTransitions({
      "empty": {
        "*": {}
      },
      "x$": {
        "0": { nextState: "!f", revisit: true }
      },
      "formula$": {
        "0": { nextState: "f", revisit: true }
      },
      "else": {
        "0": { nextState: "!f", revisit: true }
      },
      "-9.,9 no missing 0": {
        "*": { action_: "9,9" }
      },
      ".": {
        "*": { action_: { type_: "insert", option: "electron dot" } }
      },
      "a-z": {
        "f": { action_: "tex-math" }
      },
      "x": {
        "*": { action_: { type_: "insert", option: "KV x" } }
      },
      "letters": {
        "*": { action_: "rm" }
      },
      "'": {
        "*": { action_: { type_: "insert", option: "prime" } }
      },
      "${(...)}$|$(...)$": {
        "*": { action_: "tex-math" }
      },
      "{(...)}": {
        "*": { action_: "text" }
      },
      "\\color{(...)}{(...)}1|\\color(...){(...)}2": {
        "*": { action_: "color-output" }
      },
      "\\color{(...)}0": {
        "*": { action_: "color0-output" }
      },
      "\\ce{(...)}": {
        "*": { action_: "ce" }
      },
      "\\,|\\x{}{}|\\x{}|\\x": {
        "*": { action_: "copy" }
      },
      "else2": {
        "*": { action_: "copy" }
      }
    }),
    actions: {
      "color-output": function(buffer, m) {
        return { type_: "color", color1: m[0], color2: mhchemParser.go(m[1], "bd") };
      }
    }
  },
  "oxidation": {
    transitions: mhchemParser.createTransitions({
      "empty": {
        "*": {}
      },
      "roman numeral": {
        "*": { action_: "roman-numeral" }
      },
      "${(...)}$|$(...)$": {
        "*": { action_: "tex-math" }
      },
      "else": {
        "*": { action_: "copy" }
      }
    }),
    actions: {
      "roman-numeral": function(buffer, m) {
        return { type_: "roman numeral", p1: m || "" };
      }
    }
  },
  "tex-math": {
    transitions: mhchemParser.createTransitions({
      "empty": {
        "*": { action_: "output" }
      },
      "\\ce{(...)}": {
        "*": { action_: ["output", "ce"] }
      },
      "{...}|\\,|\\x{}{}|\\x{}|\\x": {
        "*": { action_: "o=" }
      },
      "else": {
        "*": { action_: "o=" }
      }
    }),
    actions: {
      "output": function(buffer) {
        if (buffer.o) {
          var ret = { type_: "tex-math", p1: buffer.o };
          for (var p in buffer) {
            delete buffer[p];
          }
          return ret;
        }
      }
    }
  },
  "tex-math tight": {
    transitions: mhchemParser.createTransitions({
      "empty": {
        "*": { action_: "output" }
      },
      "\\ce{(...)}": {
        "*": { action_: ["output", "ce"] }
      },
      "{...}|\\,|\\x{}{}|\\x{}|\\x": {
        "*": { action_: "o=" }
      },
      "-|+": {
        "*": { action_: "tight operator" }
      },
      "else": {
        "*": { action_: "o=" }
      }
    }),
    actions: {
      "tight operator": function(buffer, m) {
        buffer.o = (buffer.o || "") + "{" + m + "}";
      },
      "output": function(buffer) {
        if (buffer.o) {
          var ret = { type_: "tex-math", p1: buffer.o };
          for (var p in buffer) {
            delete buffer[p];
          }
          return ret;
        }
      }
    }
  },
  "9,9": {
    transitions: mhchemParser.createTransitions({
      "empty": {
        "*": {}
      },
      ",": {
        "*": { action_: "comma" }
      },
      "else": {
        "*": { action_: "copy" }
      }
    }),
    actions: {
      "comma": function() {
        return { type_: "commaDecimal" };
      }
    }
  },
  //#endregion
  //
  // \pu state machines
  //
  //#region pu
  "pu": {
    transitions: mhchemParser.createTransitions({
      "empty": {
        "*": { action_: "output" }
      },
      "space$": {
        "*": { action_: ["output", "space"] }
      },
      "{[(|)]}": {
        "0|a": { action_: "copy" }
      },
      "(-)(9)^(-9)": {
        "0": { action_: "number^", nextState: "a" }
      },
      "(-)(9.,9)(e)(99)": {
        "0": { action_: "enumber", nextState: "a" }
      },
      "space": {
        "0|a": {}
      },
      "pm-operator": {
        "0|a": { action_: { type_: "operator", option: "\\pm" }, nextState: "0" }
      },
      "operator": {
        "0|a": { action_: "copy", nextState: "0" }
      },
      "//": {
        "d": { action_: "o=", nextState: "/" }
      },
      "/": {
        "d": { action_: "o=", nextState: "/" }
      },
      "{...}|else": {
        "0|d": { action_: "d=", nextState: "d" },
        "a": { action_: ["space", "d="], nextState: "d" },
        "/|q": { action_: "q=", nextState: "q" }
      }
    }),
    actions: {
      "enumber": function(buffer, m) {
        var ret = [];
        if (m[0] === "+-" || m[0] === "+/-") {
          ret.push("\\pm ");
        } else if (m[0]) {
          ret.push(m[0]);
        }
        if (m[1]) {
          mhchemParser.concatArray(ret, mhchemParser.go(m[1], "pu-9,9"));
          if (m[2]) {
            if (m[2].match(/[,.]/)) {
              mhchemParser.concatArray(ret, mhchemParser.go(m[2], "pu-9,9"));
            } else {
              ret.push(m[2]);
            }
          }
          m[3] = m[4] || m[3];
          if (m[3]) {
            m[3] = m[3].trim();
            if (m[3] === "e" || m[3].substr(0, 1) === "*") {
              ret.push({ type_: "cdot" });
            } else {
              ret.push({ type_: "times" });
            }
          }
        }
        if (m[3]) {
          ret.push("10^{" + m[5] + "}");
        }
        return ret;
      },
      "number^": function(buffer, m) {
        var ret = [];
        if (m[0] === "+-" || m[0] === "+/-") {
          ret.push("\\pm ");
        } else if (m[0]) {
          ret.push(m[0]);
        }
        mhchemParser.concatArray(ret, mhchemParser.go(m[1], "pu-9,9"));
        ret.push("^{" + m[2] + "}");
        return ret;
      },
      "operator": function(buffer, m, p1) {
        return { type_: "operator", kind_: p1 || m };
      },
      "space": function() {
        return { type_: "pu-space-1" };
      },
      "output": function(buffer) {
        var ret;
        var md = mhchemParser.patterns.match_("{(...)}", buffer.d || "");
        if (md && md.remainder === "") {
          buffer.d = md.match_;
        }
        var mq = mhchemParser.patterns.match_("{(...)}", buffer.q || "");
        if (mq && mq.remainder === "") {
          buffer.q = mq.match_;
        }
        if (buffer.d) {
          buffer.d = buffer.d.replace(/\u00B0C|\^oC|\^{o}C/g, "{}^{\\circ}C");
          buffer.d = buffer.d.replace(/\u00B0F|\^oF|\^{o}F/g, "{}^{\\circ}F");
        }
        if (buffer.q) {
          buffer.q = buffer.q.replace(/\u00B0C|\^oC|\^{o}C/g, "{}^{\\circ}C");
          buffer.q = buffer.q.replace(/\u00B0F|\^oF|\^{o}F/g, "{}^{\\circ}F");
          var b5 = {
            d: mhchemParser.go(buffer.d, "pu"),
            q: mhchemParser.go(buffer.q, "pu")
          };
          if (buffer.o === "//") {
            ret = { type_: "pu-frac", p1: b5.d, p2: b5.q };
          } else {
            ret = b5.d;
            if (b5.d.length > 1 || b5.q.length > 1) {
              ret.push({ type_: " / " });
            } else {
              ret.push({ type_: "/" });
            }
            mhchemParser.concatArray(ret, b5.q);
          }
        } else {
          ret = mhchemParser.go(buffer.d, "pu-2");
        }
        for (var p in buffer) {
          delete buffer[p];
        }
        return ret;
      }
    }
  },
  "pu-2": {
    transitions: mhchemParser.createTransitions({
      "empty": {
        "*": { action_: "output" }
      },
      "*": {
        "*": { action_: ["output", "cdot"], nextState: "0" }
      },
      "\\x": {
        "*": { action_: "rm=" }
      },
      "space": {
        "*": { action_: ["output", "space"], nextState: "0" }
      },
      "^{(...)}|^(-1)": {
        "1": { action_: "^(-1)" }
      },
      "-9.,9": {
        "0": { action_: "rm=", nextState: "0" },
        "1": { action_: "^(-1)", nextState: "0" }
      },
      "{...}|else": {
        "*": { action_: "rm=", nextState: "1" }
      }
    }),
    actions: {
      "cdot": function() {
        return { type_: "tight cdot" };
      },
      "^(-1)": function(buffer, m) {
        buffer.rm += "^{" + m + "}";
      },
      "space": function() {
        return { type_: "pu-space-2" };
      },
      "output": function(buffer) {
        var ret = [];
        if (buffer.rm) {
          var mrm = mhchemParser.patterns.match_("{(...)}", buffer.rm || "");
          if (mrm && mrm.remainder === "") {
            ret = mhchemParser.go(mrm.match_, "pu");
          } else {
            ret = { type_: "rm", p1: buffer.rm };
          }
        }
        for (var p in buffer) {
          delete buffer[p];
        }
        return ret;
      }
    }
  },
  "pu-9,9": {
    transitions: mhchemParser.createTransitions({
      "empty": {
        "0": { action_: "output-0" },
        "o": { action_: "output-o" }
      },
      ",": {
        "0": { action_: ["output-0", "comma"], nextState: "o" }
      },
      ".": {
        "0": { action_: ["output-0", "copy"], nextState: "o" }
      },
      "else": {
        "*": { action_: "text=" }
      }
    }),
    actions: {
      "comma": function() {
        return { type_: "commaDecimal" };
      },
      "output-0": function(buffer) {
        var ret = [];
        buffer.text_ = buffer.text_ || "";
        if (buffer.text_.length > 4) {
          var a = buffer.text_.length % 3;
          if (a === 0) {
            a = 3;
          }
          for (var i = buffer.text_.length - 3; i > 0; i -= 3) {
            ret.push(buffer.text_.substr(i, 3));
            ret.push({ type_: "1000 separator" });
          }
          ret.push(buffer.text_.substr(0, a));
          ret.reverse();
        } else {
          ret.push(buffer.text_);
        }
        for (var p in buffer) {
          delete buffer[p];
        }
        return ret;
      },
      "output-o": function(buffer) {
        var ret = [];
        buffer.text_ = buffer.text_ || "";
        if (buffer.text_.length > 4) {
          var a = buffer.text_.length - 3;
          for (var i = 0; i < a; i += 3) {
            ret.push(buffer.text_.substr(i, 3));
            ret.push({ type_: "1000 separator" });
          }
          ret.push(buffer.text_.substr(i));
        } else {
          ret.push(buffer.text_);
        }
        for (var p in buffer) {
          delete buffer[p];
        }
        return ret;
      }
    }
  }
  //#endregion
};
var texify = {
  go: function(input, isInner) {
    if (!input) {
      return "";
    }
    var res = "";
    var cee = false;
    for (var i = 0; i < input.length; i++) {
      var inputi = input[i];
      if (typeof inputi === "string") {
        res += inputi;
      } else {
        res += texify._go2(inputi);
        if (inputi.type_ === "1st-level escape") {
          cee = true;
        }
      }
    }
    if (!isInner && !cee && res) {
      res = "{" + res + "}";
    }
    return res;
  },
  _goInner: function(input) {
    if (!input) {
      return input;
    }
    return texify.go(input, true);
  },
  _go2: function(buf) {
    var res;
    switch (buf.type_) {
      case "chemfive":
        res = "";
        var b5 = {
          a: texify._goInner(buf.a),
          b: texify._goInner(buf.b),
          p: texify._goInner(buf.p),
          o: texify._goInner(buf.o),
          q: texify._goInner(buf.q),
          d: texify._goInner(buf.d)
        };
        if (b5.a) {
          if (b5.a.match(/^[+\-]/)) {
            b5.a = "{" + b5.a + "}";
          }
          res += b5.a + "\\,";
        }
        if (b5.b || b5.p) {
          res += "{\\vphantom{X}}";
          res += "^{\\hphantom{" + (b5.b || "") + "}}_{\\hphantom{" + (b5.p || "") + "}}";
          res += "{\\vphantom{X}}";
          res += "^{\\vphantom{2}\\mathllap{" + (b5.b || "") + "}}";
          res += "_{\\vphantom{2}\\mathllap{" + (b5.p || "") + "}}";
        }
        if (b5.o) {
          if (b5.o.match(/^[+\-]/)) {
            b5.o = "{" + b5.o + "}";
          }
          res += b5.o;
        }
        if (buf.dType === "kv") {
          if (b5.d || b5.q) {
            res += "{\\vphantom{X}}";
          }
          if (b5.d) {
            res += "^{" + b5.d + "}";
          }
          if (b5.q) {
            res += "_{" + b5.q + "}";
          }
        } else if (buf.dType === "oxidation") {
          if (b5.d) {
            res += "{\\vphantom{X}}";
            res += "^{" + b5.d + "}";
          }
          if (b5.q) {
            res += "{{}}";
            res += "_{" + b5.q + "}";
          }
        } else {
          if (b5.q) {
            res += "{{}}";
            res += "_{" + b5.q + "}";
          }
          if (b5.d) {
            res += "{{}}";
            res += "^{" + b5.d + "}";
          }
        }
        break;
      case "rm":
        res = "\\mathrm{" + buf.p1 + "}";
        break;
      case "text":
        if (buf.p1.match(/[\^_]/)) {
          buf.p1 = buf.p1.replace(" ", "~").replace("-", "\\text{-}");
          res = "\\mathrm{" + buf.p1 + "}";
        } else {
          res = "\\text{" + buf.p1 + "}";
        }
        break;
      case "roman numeral":
        res = "\\mathrm{" + buf.p1 + "}";
        break;
      case "state of aggregation":
        res = "\\mskip2mu " + texify._goInner(buf.p1);
        break;
      case "state of aggregation subscript":
        res = "\\mskip1mu " + texify._goInner(buf.p1);
        break;
      case "bond":
        res = texify._getBond(buf.kind_);
        if (!res) {
          throw ["MhchemErrorBond", "mhchem Error. Unknown bond type (" + buf.kind_ + ")"];
        }
        break;
      case "frac":
        var c = "\\frac{" + buf.p1 + "}{" + buf.p2 + "}";
        res = "\\mathchoice{\\textstyle" + c + "}{" + c + "}{" + c + "}{" + c + "}";
        break;
      case "pu-frac":
        var d = "\\frac{" + texify._goInner(buf.p1) + "}{" + texify._goInner(buf.p2) + "}";
        res = "\\mathchoice{\\textstyle" + d + "}{" + d + "}{" + d + "}{" + d + "}";
        break;
      case "tex-math":
        res = buf.p1 + " ";
        break;
      case "frac-ce":
        res = "\\frac{" + texify._goInner(buf.p1) + "}{" + texify._goInner(buf.p2) + "}";
        break;
      case "overset":
        res = "\\overset{" + texify._goInner(buf.p1) + "}{" + texify._goInner(buf.p2) + "}";
        break;
      case "underset":
        res = "\\underset{" + texify._goInner(buf.p1) + "}{" + texify._goInner(buf.p2) + "}";
        break;
      case "underbrace":
        res = "\\underbrace{" + texify._goInner(buf.p1) + "}_{" + texify._goInner(buf.p2) + "}";
        break;
      case "color":
        res = "{\\color{" + buf.color1 + "}{" + texify._goInner(buf.color2) + "}}";
        break;
      case "color0":
        res = "\\color{" + buf.color + "}";
        break;
      case "arrow":
        var b6 = {
          rd: texify._goInner(buf.rd),
          rq: texify._goInner(buf.rq)
        };
        var arrow = texify._getArrow(buf.r);
        if (b6.rq) {
          arrow += "[{\\rm " + b6.rq + "}]";
        }
        if (b6.rd) {
          arrow += "{\\rm " + b6.rd + "}";
        } else {
          arrow += "{}";
        }
        res = arrow;
        break;
      case "operator":
        res = texify._getOperator(buf.kind_);
        break;
      case "1st-level escape":
        res = buf.p1 + " ";
        break;
      case "space":
        res = " ";
        break;
      case "entitySkip":
        res = "~";
        break;
      case "pu-space-1":
        res = "~";
        break;
      case "pu-space-2":
        res = "\\mkern3mu ";
        break;
      case "1000 separator":
        res = "\\mkern2mu ";
        break;
      case "commaDecimal":
        res = "{,}";
        break;
      case "comma enumeration L":
        res = "{" + buf.p1 + "}\\mkern6mu ";
        break;
      case "comma enumeration M":
        res = "{" + buf.p1 + "}\\mkern3mu ";
        break;
      case "comma enumeration S":
        res = "{" + buf.p1 + "}\\mkern1mu ";
        break;
      case "hyphen":
        res = "\\text{-}";
        break;
      case "addition compound":
        res = "\\,{\\cdot}\\,";
        break;
      case "electron dot":
        res = "\\mkern1mu \\text{\\textbullet}\\mkern1mu ";
        break;
      case "KV x":
        res = "{\\times}";
        break;
      case "prime":
        res = "\\prime ";
        break;
      case "cdot":
        res = "\\cdot ";
        break;
      case "tight cdot":
        res = "\\mkern1mu{\\cdot}\\mkern1mu ";
        break;
      case "times":
        res = "\\times ";
        break;
      case "circa":
        res = "{\\sim}";
        break;
      case "^":
        res = "uparrow";
        break;
      case "v":
        res = "downarrow";
        break;
      case "ellipsis":
        res = "\\ldots ";
        break;
      case "/":
        res = "/";
        break;
      case " / ":
        res = "\\,/\\,";
        break;
      default:
        assertNever(buf);
        throw ["MhchemBugT", "mhchem bug T. Please report."];
    }
    assertString(res);
    return res;
  },
  _getArrow: function(a) {
    switch (a) {
      case "->":
        return "\\yields";
      case "\u2192":
        return "\\yields";
      case "\u27F6":
        return "\\yields";
      case "<-":
        return "\\yieldsLeft";
      case "<->":
        return "\\mesomerism";
      case "<-->":
        return "\\yieldsLeftRight";
      case "<=>":
        return "\\equilibrium";
      case "\u21CC":
        return "\\equilibrium";
      case "<=>>":
        return "\\equilibriumRight";
      case "<<=>":
        return "\\equilibriumLeft";
      default:
        assertNever(a);
        throw ["MhchemBugT", "mhchem bug T. Please report."];
    }
  },
  _getBond: function(a) {
    switch (a) {
      case "-":
        return "{-}";
      case "1":
        return "{-}";
      case "=":
        return "{=}";
      case "2":
        return "{=}";
      case "#":
        return "{\\equiv}";
      case "3":
        return "{\\equiv}";
      case "~":
        return "{\\tripleDash}";
      case "~-":
        return "{\\tripleDashOverLine}";
      case "~=":
        return "{\\tripleDashOverDoubleLine}";
      case "~--":
        return "{\\tripleDashOverDoubleLine}";
      case "-~-":
        return "{\\tripleDashBetweenDoubleLine}";
      case "...":
        return "{{\\cdot}{\\cdot}{\\cdot}}";
      case "....":
        return "{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";
      case "->":
        return "{\\rightarrow}";
      case "<-":
        return "{\\leftarrow}";
      case "<":
        return "{<}";
      case ">":
        return "{>}";
      default:
        assertNever(a);
        throw ["MhchemBugT", "mhchem bug T. Please report."];
    }
  },
  _getOperator: function(a) {
    switch (a) {
      case "+":
        return " {}+{} ";
      case "-":
        return " {}-{} ";
      case "=":
        return " {}={} ";
      case "<":
        return " {}<{} ";
      case ">":
        return " {}>{} ";
      case "<<":
        return " {}\\ll{} ";
      case ">>":
        return " {}\\gg{} ";
      case "\\pm":
        return " {}\\pm{} ";
      case "\\approx":
        return " {}\\approx{} ";
      case "$\\approx$":
        return " {}\\approx{} ";
      case "v":
        return " \\downarrow{} ";
      case "(v)":
        return " \\downarrow{} ";
      case "^":
        return " \\uparrow{} ";
      case "(^)":
        return " \\uparrow{} ";
      default:
        assertNever(a);
        throw ["MhchemBugT", "mhchem bug T. Please report."];
    }
  }
};
function assertNever(a) {
}
function assertString(a) {
}
defineMacro("\\darr", "\\downarrow");
defineMacro("\\dArr", "\\Downarrow");
defineMacro("\\Darr", "\\Downarrow");
defineMacro("\\lang", "\\langle");
defineMacro("\\rang", "\\rangle");
defineMacro("\\uarr", "\\uparrow");
defineMacro("\\uArr", "\\Uparrow");
defineMacro("\\Uarr", "\\Uparrow");
defineMacro("\\N", "\\mathbb{N}");
defineMacro("\\R", "\\mathbb{R}");
defineMacro("\\Z", "\\mathbb{Z}");
defineMacro("\\alef", "\\aleph");
defineMacro("\\alefsym", "\\aleph");
defineMacro("\\bull", "\\bullet");
defineMacro("\\clubs", "\\clubsuit");
defineMacro("\\cnums", "\\mathbb{C}");
defineMacro("\\Complex", "\\mathbb{C}");
defineMacro("\\Dagger", "\\ddagger");
defineMacro("\\diamonds", "\\diamondsuit");
defineMacro("\\empty", "\\emptyset");
defineMacro("\\exist", "\\exists");
defineMacro("\\harr", "\\leftrightarrow");
defineMacro("\\hArr", "\\Leftrightarrow");
defineMacro("\\Harr", "\\Leftrightarrow");
defineMacro("\\hearts", "\\heartsuit");
defineMacro("\\image", "\\Im");
defineMacro("\\infin", "\\infty");
defineMacro("\\isin", "\\in");
defineMacro("\\larr", "\\leftarrow");
defineMacro("\\lArr", "\\Leftarrow");
defineMacro("\\Larr", "\\Leftarrow");
defineMacro("\\lrarr", "\\leftrightarrow");
defineMacro("\\lrArr", "\\Leftrightarrow");
defineMacro("\\Lrarr", "\\Leftrightarrow");
defineMacro("\\natnums", "\\mathbb{N}");
defineMacro("\\plusmn", "\\pm");
defineMacro("\\rarr", "\\rightarrow");
defineMacro("\\rArr", "\\Rightarrow");
defineMacro("\\Rarr", "\\Rightarrow");
defineMacro("\\real", "\\Re");
defineMacro("\\reals", "\\mathbb{R}");
defineMacro("\\Reals", "\\mathbb{R}");
defineMacro("\\sdot", "\\cdot");
defineMacro("\\sect", "\\S");
defineMacro("\\spades", "\\spadesuit");
defineMacro("\\sub", "\\subset");
defineMacro("\\sube", "\\subseteq");
defineMacro("\\supe", "\\supseteq");
defineMacro("\\thetasym", "\\vartheta");
defineMacro("\\weierp", "\\wp");
defineMacro("\\quantity", "{\\left\\{ #1 \\right\\}}");
defineMacro("\\qty", "{\\left\\{ #1 \\right\\}}");
defineMacro("\\pqty", "{\\left( #1 \\right)}");
defineMacro("\\bqty", "{\\left[ #1 \\right]}");
defineMacro("\\vqty", "{\\left\\vert #1 \\right\\vert}");
defineMacro("\\Bqty", "{\\left\\{ #1 \\right\\}}");
defineMacro("\\absolutevalue", "{\\left\\vert #1 \\right\\vert}");
defineMacro("\\abs", "{\\left\\vert #1 \\right\\vert}");
defineMacro("\\norm", "{\\left\\Vert #1 \\right\\Vert}");
defineMacro("\\evaluated", "{\\left.#1 \\right\\vert}");
defineMacro("\\eval", "{\\left.#1 \\right\\vert}");
defineMacro("\\order", "{\\mathcal{O} \\left( #1 \\right)}");
defineMacro("\\commutator", "{\\left[ #1 , #2 \\right]}");
defineMacro("\\comm", "{\\left[ #1 , #2 \\right]}");
defineMacro("\\anticommutator", "{\\left\\{ #1 , #2 \\right\\}}");
defineMacro("\\acomm", "{\\left\\{ #1 , #2 \\right\\}}");
defineMacro("\\poissonbracket", "{\\left\\{ #1 , #2 \\right\\}}");
defineMacro("\\pb", "{\\left\\{ #1 , #2 \\right\\}}");
defineMacro("\\vectorbold", "{\\boldsymbol{ #1 }}");
defineMacro("\\vb", "{\\boldsymbol{ #1 }}");
defineMacro("\\vectorarrow", "{\\vec{\\boldsymbol{ #1 }}}");
defineMacro("\\va", "{\\vec{\\boldsymbol{ #1 }}}");
defineMacro("\\vectorunit", "{{\\boldsymbol{\\hat{ #1 }}}}");
defineMacro("\\vu", "{{\\boldsymbol{\\hat{ #1 }}}}");
defineMacro("\\dotproduct", "\\mathbin{\\boldsymbol\\cdot}");
defineMacro("\\vdot", "{\\boldsymbol\\cdot}");
defineMacro("\\crossproduct", "\\mathbin{\\boldsymbol\\times}");
defineMacro("\\cross", "\\mathbin{\\boldsymbol\\times}");
defineMacro("\\cp", "\\mathbin{\\boldsymbol\\times}");
defineMacro("\\gradient", "{\\boldsymbol\\nabla}");
defineMacro("\\grad", "{\\boldsymbol\\nabla}");
defineMacro("\\divergence", "{\\grad\\vdot}");
defineMacro("\\curl", "{\\grad\\cross}");
defineMacro("\\laplacian", "\\nabla^2");
defineMacro("\\tr", "{\\operatorname{tr}}");
defineMacro("\\Tr", "{\\operatorname{Tr}}");
defineMacro("\\rank", "{\\operatorname{rank}}");
defineMacro("\\erf", "{\\operatorname{erf}}");
defineMacro("\\Res", "{\\operatorname{Res}}");
defineMacro("\\principalvalue", "{\\mathcal{P}}");
defineMacro("\\pv", "{\\mathcal{P}}");
defineMacro("\\PV", "{\\operatorname{P.V.}}");
defineMacro("\\qqtext", "{\\quad\\text{ #1 }\\quad}");
defineMacro("\\qq", "{\\quad\\text{ #1 }\\quad}");
defineMacro("\\qcomma", "{\\text{,}\\quad}");
defineMacro("\\qc", "{\\text{,}\\quad}");
defineMacro("\\qcc", "{\\quad\\text{c.c.}\\quad}");
defineMacro("\\qif", "{\\quad\\text{if}\\quad}");
defineMacro("\\qthen", "{\\quad\\text{then}\\quad}");
defineMacro("\\qelse", "{\\quad\\text{else}\\quad}");
defineMacro("\\qotherwise", "{\\quad\\text{otherwise}\\quad}");
defineMacro("\\qunless", "{\\quad\\text{unless}\\quad}");
defineMacro("\\qgiven", "{\\quad\\text{given}\\quad}");
defineMacro("\\qusing", "{\\quad\\text{using}\\quad}");
defineMacro("\\qassume", "{\\quad\\text{assume}\\quad}");
defineMacro("\\qsince", "{\\quad\\text{since}\\quad}");
defineMacro("\\qlet", "{\\quad\\text{let}\\quad}");
defineMacro("\\qfor", "{\\quad\\text{for}\\quad}");
defineMacro("\\qall", "{\\quad\\text{all}\\quad}");
defineMacro("\\qeven", "{\\quad\\text{even}\\quad}");
defineMacro("\\qodd", "{\\quad\\text{odd}\\quad}");
defineMacro("\\qinteger", "{\\quad\\text{integer}\\quad}");
defineMacro("\\qand", "{\\quad\\text{and}\\quad}");
defineMacro("\\qor", "{\\quad\\text{or}\\quad}");
defineMacro("\\qas", "{\\quad\\text{as}\\quad}");
defineMacro("\\qin", "{\\quad\\text{in}\\quad}");
defineMacro("\\differential", "{\\text{d}}");
defineMacro("\\dd", "{\\text{d}}");
defineMacro("\\derivative", "{\\frac{\\text{d}{ #1 }}{\\text{d}{ #2 }}}");
defineMacro("\\dv", "{\\frac{\\text{d}{ #1 }}{\\text{d}{ #2 }}}");
defineMacro("\\partialderivative", "{\\frac{\\partial{ #1 }}{\\partial{ #2 }}}");
defineMacro("\\variation", "{\\delta}");
defineMacro("\\var", "{\\delta}");
defineMacro("\\functionalderivative", "{\\frac{\\delta{ #1 }}{\\delta{ #2 }}}");
defineMacro("\\fdv", "{\\frac{\\delta{ #1 }}{\\delta{ #2 }}}");
defineMacro("\\innerproduct", "{\\left\\langle {#1} \\mid { #2} \\right\\rangle}");
defineMacro(
  "\\outerproduct",
  "{\\left\\vert { #1 } \\right\\rangle\\left\\langle { #2} \\right\\vert}"
);
defineMacro(
  "\\dyad",
  "{\\left\\vert { #1 } \\right\\rangle\\left\\langle { #2} \\right\\vert}"
);
defineMacro(
  "\\ketbra",
  "{\\left\\vert { #1 } \\right\\rangle\\left\\langle { #2} \\right\\vert}"
);
defineMacro(
  "\\op",
  "{\\left\\vert { #1 } \\right\\rangle\\left\\langle { #2} \\right\\vert}"
);
defineMacro("\\expectationvalue", "{\\left\\langle {#1 } \\right\\rangle}");
defineMacro("\\expval", "{\\left\\langle {#1 } \\right\\rangle}");
defineMacro("\\ev", "{\\left\\langle {#1 } \\right\\rangle}");
defineMacro(
  "\\matrixelement",
  "{\\left\\langle{ #1 }\\right\\vert{ #2 }\\left\\vert{#3}\\right\\rangle}"
);
defineMacro(
  "\\matrixel",
  "{\\left\\langle{ #1 }\\right\\vert{ #2 }\\left\\vert{#3}\\right\\rangle}"
);
defineMacro(
  "\\mel",
  "{\\left\\langle{ #1 }\\right\\vert{ #2 }\\left\\vert{#3}\\right\\rangle}"
);
function getHLines(parser) {
  const hlineInfo = [];
  parser.consumeSpaces();
  let nxt = parser.fetch().text;
  if (nxt === "\\relax") {
    parser.consume();
    parser.consumeSpaces();
    nxt = parser.fetch().text;
  }
  while (nxt === "\\hline" || nxt === "\\hdashline") {
    parser.consume();
    hlineInfo.push(nxt === "\\hdashline");
    parser.consumeSpaces();
    nxt = parser.fetch().text;
  }
  return hlineInfo;
}
var validateAmsEnvironmentContext = (context) => {
  const settings = context.parser.settings;
  if (!settings.displayMode) {
    throw new ParseError(`{${context.envName}} can be used only in display mode.`);
  }
};
var sizeRegEx$1 = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/;
var arrayGaps = (macros2) => {
  let arraystretch = macros2.get("\\arraystretch");
  if (typeof arraystretch !== "string") {
    arraystretch = stringFromArg(arraystretch.tokens);
  }
  arraystretch = isNaN(arraystretch) ? null : Number(arraystretch);
  let arraycolsepStr = macros2.get("\\arraycolsep");
  if (typeof arraycolsepStr !== "string") {
    arraycolsepStr = stringFromArg(arraycolsepStr.tokens);
  }
  const match = sizeRegEx$1.exec(arraycolsepStr);
  const arraycolsep = match ? { number: +(match[1] + match[2]), unit: match[3] } : null;
  return [arraystretch, arraycolsep];
};
var checkCellForLabels = (cell) => {
  let rowLabel = "";
  for (let i = 0; i < cell.length; i++) {
    if (cell[i].type === "label") {
      if (rowLabel) {
        throw new ParseError("Multiple \\labels in one row");
      }
      rowLabel = cell[i].string;
    }
  }
  return rowLabel;
};
function getAutoTag(name) {
  if (name.indexOf("ed") === -1) {
    return name.indexOf("*") === -1;
  }
}
function parseArray(parser, {
  cols,
  // [{ type: string , align: l|c|r|null }]
  envClasses,
  // align(ed|at|edat) | array | cases | cd | small | multline
  autoTag,
  // boolean
  singleRow,
  // boolean
  emptySingleRow,
  // boolean
  maxNumCols,
  // number
  leqno,
  // boolean
  arraystretch,
  // number  | null
  arraycolsep
  // size value | null
}, scriptLevel2) {
  parser.gullet.beginGroup();
  if (!singleRow) {
    parser.gullet.macros.set("\\cr", "\\\\\\relax");
  }
  parser.gullet.beginGroup();
  let row = [];
  const body = [row];
  const rowGaps = [];
  const labels = [];
  const hLinesBeforeRow = [];
  const tags = autoTag != null ? [] : void 0;
  function beginRow() {
    if (autoTag) {
      parser.gullet.macros.set("\\@eqnsw", "1", true);
    }
  }
  function endRow() {
    if (tags) {
      if (parser.gullet.macros.get("\\df@tag")) {
        tags.push(parser.subparse([new Token("\\df@tag")]));
        parser.gullet.macros.set("\\df@tag", void 0, true);
      } else {
        tags.push(Boolean(autoTag) && parser.gullet.macros.get("\\@eqnsw") === "1");
      }
    }
  }
  beginRow();
  hLinesBeforeRow.push(getHLines(parser));
  while (true) {
    let cell = parser.parseExpression(false, singleRow ? "\\end" : "\\\\");
    parser.gullet.endGroup();
    parser.gullet.beginGroup();
    cell = {
      type: "ordgroup",
      mode: parser.mode,
      body: cell,
      semisimple: true
    };
    row.push(cell);
    const next = parser.fetch().text;
    if (next === "&") {
      if (maxNumCols && row.length === maxNumCols) {
        if (envClasses.includes("array")) {
          if (parser.settings.strict) {
            throw new ParseError(
              "Too few columns specified in the {array} column argument.",
              parser.nextToken
            );
          }
        } else if (maxNumCols === 2) {
          throw new ParseError(
            "The split environment accepts no more than two columns",
            parser.nextToken
          );
        } else {
          throw new ParseError(
            "The equation environment accepts only one column",
            parser.nextToken
          );
        }
      }
      parser.consume();
    } else if (next === "\\end") {
      endRow();
      if (row.length === 1 && cell.body.length === 0 && (body.length > 1 || !emptySingleRow)) {
        body.pop();
      }
      labels.push(checkCellForLabels(cell.body));
      if (hLinesBeforeRow.length < body.length + 1) {
        hLinesBeforeRow.push([]);
      }
      break;
    } else if (next === "\\\\") {
      parser.consume();
      let size;
      if (parser.gullet.future().text !== " ") {
        size = parser.parseSizeGroup(true);
      }
      rowGaps.push(size ? size.value : null);
      endRow();
      labels.push(checkCellForLabels(cell.body));
      hLinesBeforeRow.push(getHLines(parser));
      row = [];
      body.push(row);
      beginRow();
    } else {
      throw new ParseError("Expected & or \\\\ or \\cr or \\end", parser.nextToken);
    }
  }
  parser.gullet.endGroup();
  parser.gullet.endGroup();
  return {
    type: "array",
    mode: parser.mode,
    body,
    cols,
    rowGaps,
    hLinesBeforeRow,
    envClasses,
    autoTag,
    scriptLevel: scriptLevel2,
    tags,
    labels,
    leqno,
    arraystretch,
    arraycolsep
  };
}
function dCellStyle(envName) {
  return envName.slice(0, 1) === "d" ? "display" : "text";
}
var alignMap = {
  c: "center ",
  l: "left ",
  r: "right "
};
var glue = (group) => {
  const glueNode = new mathMLTree.MathNode("mtd", []);
  glueNode.style = { padding: "0", width: "50%" };
  if (group.envClasses.includes("multline")) {
    glueNode.style.width = "7.5%";
  }
  return glueNode;
};
var mathmlBuilder$7 = function(group, style) {
  const tbl = [];
  const numRows = group.body.length;
  const hlines = group.hLinesBeforeRow;
  for (let i = 0; i < numRows; i++) {
    const rw = group.body[i];
    const row = [];
    const cellLevel = group.scriptLevel === "text" ? StyleLevel.TEXT : group.scriptLevel === "script" ? StyleLevel.SCRIPT : StyleLevel.DISPLAY;
    for (let j = 0; j < rw.length; j++) {
      const mtd = new mathMLTree.MathNode(
        "mtd",
        [buildGroup$1(rw[j], style.withLevel(cellLevel))]
      );
      if (group.envClasses.includes("multline")) {
        const align2 = i === 0 ? "left" : i === numRows - 1 ? "right" : "center";
        mtd.setAttribute("columnalign", align2);
        if (align2 !== "center") {
          mtd.classes.push("tml-" + align2);
        }
      }
      row.push(mtd);
    }
    const numColumns = group.body[0].length;
    for (let k = 0; k < numColumns - rw.length; k++) {
      row.push(new mathMLTree.MathNode("mtd", [], style));
    }
    if (group.autoTag) {
      const tag = group.tags[i];
      let tagElement;
      if (tag === true) {
        tagElement = new mathMLTree.MathNode("mtext", [new Span(["tml-eqn"])]);
      } else if (tag === false) {
        tagElement = new mathMLTree.MathNode("mtext", [], []);
      } else {
        tagElement = buildExpressionRow(tag[0].body, style.withLevel(cellLevel), true);
        tagElement = consolidateText(tagElement);
        tagElement.classes = ["tml-tag"];
      }
      if (tagElement) {
        row.unshift(glue(group));
        row.push(glue(group));
        if (group.leqno) {
          row[0].children.push(tagElement);
          row[0].classes.push("tml-left");
        } else {
          row[row.length - 1].children.push(tagElement);
          row[row.length - 1].classes.push("tml-right");
        }
      }
    }
    const mtr = new mathMLTree.MathNode("mtr", row, []);
    const label = group.labels.shift();
    if (label && group.tags && group.tags[i]) {
      mtr.setAttribute("id", label);
      if (Array.isArray(group.tags[i])) {
        mtr.classes.push("tml-tageqn");
      }
    }
    if (i === 0 && hlines[0].length > 0) {
      if (hlines[0].length === 2) {
        mtr.children.forEach((cell) => {
          cell.style.borderTop = "0.15em double";
        });
      } else {
        mtr.children.forEach((cell) => {
          cell.style.borderTop = hlines[0][0] ? "0.06em dashed" : "0.06em solid";
        });
      }
    }
    if (hlines[i + 1].length > 0) {
      if (hlines[i + 1].length === 2) {
        mtr.children.forEach((cell) => {
          cell.style.borderBottom = "0.15em double";
        });
      } else {
        mtr.children.forEach((cell) => {
          cell.style.borderBottom = hlines[i + 1][0] ? "0.06em dashed" : "0.06em solid";
        });
      }
    }
    tbl.push(mtr);
  }
  if (group.envClasses.length > 0) {
    if (group.arraystretch && group.arraystretch !== 1) {
      const pad = String(1.4 * group.arraystretch - 0.8) + "ex";
      for (let i = 0; i < tbl.length; i++) {
        for (let j = 0; j < tbl[i].children.length; j++) {
          tbl[i].children[j].style.paddingTop = pad;
          tbl[i].children[j].style.paddingBottom = pad;
        }
      }
    }
    let sidePadding = group.envClasses.includes("abut") ? "0" : group.envClasses.includes("cases") ? "0" : group.envClasses.includes("small") ? "0.1389" : group.envClasses.includes("cd") ? "0.25" : "0.4";
    let sidePadUnit = "em";
    if (group.arraycolsep) {
      const arraySidePad = calculateSize(group.arraycolsep, style);
      sidePadding = arraySidePad.number.toFixed(4);
      sidePadUnit = arraySidePad.unit;
    }
    const numCols = tbl.length === 0 ? 0 : tbl[0].children.length;
    const sidePad = (j, hand) => {
      if (j === 0 && hand === 0) {
        return "0";
      }
      if (j === numCols - 1 && hand === 1) {
        return "0";
      }
      if (group.envClasses[0] !== "align") {
        return sidePadding;
      }
      if (hand === 1) {
        return "0";
      }
      if (group.autoTag) {
        return j % 2 ? "1" : "0";
      } else {
        return j % 2 ? "0" : "1";
      }
    };
    for (let i = 0; i < tbl.length; i++) {
      for (let j = 0; j < tbl[i].children.length; j++) {
        tbl[i].children[j].style.paddingLeft = `${sidePad(j, 0)}${sidePadUnit}`;
        tbl[i].children[j].style.paddingRight = `${sidePad(j, 1)}${sidePadUnit}`;
      }
    }
    const align2 = group.envClasses.includes("align") || group.envClasses.includes("alignat");
    for (let i = 0; i < tbl.length; i++) {
      const row = tbl[i];
      if (align2) {
        for (let j = 0; j < row.children.length; j++) {
          row.children[j].classes = ["tml-" + (j % 2 ? "left" : "right")];
        }
        if (group.autoTag) {
          const k = group.leqno ? 0 : row.children.length - 1;
          row.children[k].classes = ["tml-" + (group.leqno ? "left" : "right")];
        }
      }
      if (row.children.length > 1 && group.envClasses.includes("cases")) {
        row.children[1].style.paddingLeft = "1em";
      }
      if (group.envClasses.includes("cases") || group.envClasses.includes("subarray")) {
        for (const cell of row.children) {
          cell.classes.push("tml-left");
        }
      }
    }
  } else {
    for (let i = 0; i < tbl.length; i++) {
      tbl[i].children[0].style.paddingLeft = "0em";
      if (tbl[i].children.length === tbl[0].children.length) {
        tbl[i].children[tbl[i].children.length - 1].style.paddingRight = "0em";
      }
    }
  }
  let table = new mathMLTree.MathNode("mtable", tbl);
  if (group.envClasses.length > 0) {
    if (group.envClasses.includes("jot")) {
      table.classes.push("tml-jot");
    } else if (group.envClasses.includes("small")) {
      table.classes.push("tml-small");
    }
  }
  if (group.scriptLevel === "display") {
    table.setAttribute("displaystyle", "true");
  }
  if (group.autoTag || group.envClasses.includes("multline")) {
    table.style.width = "100%";
  }
  let align = "";
  if (group.cols && group.cols.length > 0) {
    const cols = group.cols;
    let prevTypeWasAlign = false;
    let iStart = 0;
    let iEnd = cols.length;
    while (cols[iStart].type === "separator") {
      iStart += 1;
    }
    while (cols[iEnd - 1].type === "separator") {
      iEnd -= 1;
    }
    if (cols[0].type === "separator") {
      const sep = cols[1].type === "separator" ? "0.15em double" : cols[0].separator === "|" ? "0.06em solid " : "0.06em dashed ";
      for (const row of table.children) {
        row.children[0].style.borderLeft = sep;
      }
    }
    let iCol = group.autoTag ? 0 : -1;
    for (let i = iStart; i < iEnd; i++) {
      if (cols[i].type === "align") {
        const colAlign = alignMap[cols[i].align];
        align += colAlign;
        iCol += 1;
        for (const row of table.children) {
          if (colAlign.trim() !== "center" && iCol < row.children.length) {
            row.children[iCol].classes = ["tml-" + colAlign.trim()];
          }
        }
        prevTypeWasAlign = true;
      } else if (cols[i].type === "separator") {
        if (prevTypeWasAlign) {
          const sep = cols[i + 1].type === "separator" ? "0.15em double" : cols[i].separator === "|" ? "0.06em solid" : "0.06em dashed";
          for (const row of table.children) {
            if (iCol < row.children.length) {
              row.children[iCol].style.borderRight = sep;
            }
          }
        }
        prevTypeWasAlign = false;
      }
    }
    if (cols[cols.length - 1].type === "separator") {
      const sep = cols[cols.length - 2].type === "separator" ? "0.15em double" : cols[cols.length - 1].separator === "|" ? "0.06em solid" : "0.06em dashed";
      for (const row of table.children) {
        row.children[row.children.length - 1].style.borderRight = sep;
        row.children[row.children.length - 1].style.paddingRight = "0.4em";
      }
    }
  }
  if (group.autoTag) {
    align = "left " + (align.length > 0 ? align : "center ") + "right ";
  }
  if (align) {
    table.setAttribute("columnalign", align.trim());
  }
  if (group.envClasses.includes("small")) {
    table = new mathMLTree.MathNode("mstyle", [table]);
    table.setAttribute("scriptlevel", "1");
  }
  return table;
};
var alignedHandler = function(context, args) {
  if (context.envName.indexOf("ed") === -1) {
    validateAmsEnvironmentContext(context);
  }
  const isSplit = context.envName === "split";
  const cols = [];
  const res = parseArray(
    context.parser,
    {
      cols,
      emptySingleRow: true,
      autoTag: isSplit ? void 0 : getAutoTag(context.envName),
      envClasses: ["abut", "jot"],
      // set row spacing & provisional column spacing
      maxNumCols: context.envName === "split" ? 2 : void 0,
      leqno: context.parser.settings.leqno
    },
    "display"
  );
  let numMaths;
  let numCols = 0;
  const isAlignedAt = context.envName.indexOf("at") > -1;
  if (args[0] && isAlignedAt) {
    let arg0 = "";
    for (let i = 0; i < args[0].body.length; i++) {
      const textord2 = assertNodeType(args[0].body[i], "textord");
      arg0 += textord2.text;
    }
    if (isNaN(arg0)) {
      throw new ParseError("The alignat enviroment requires a numeric first argument.");
    }
    numMaths = Number(arg0);
    numCols = numMaths * 2;
  }
  res.body.forEach(function(row) {
    if (isAlignedAt) {
      const curMaths = row.length / 2;
      if (numMaths < curMaths) {
        throw new ParseError(
          `Too many math in a row: expected ${numMaths}, but got ${curMaths}`,
          row[0]
        );
      }
    } else if (numCols < row.length) {
      numCols = row.length;
    }
  });
  for (let i = 0; i < numCols; ++i) {
    let align = "r";
    if (i % 2 === 1) {
      align = "l";
    }
    cols[i] = {
      type: "align",
      align
    };
  }
  if (context.envName === "split") ;
  else if (isAlignedAt) {
    res.envClasses.push("alignat");
  } else {
    res.envClasses[0] = "align";
  }
  return res;
};
defineEnvironment({
  type: "array",
  names: ["array", "darray"],
  props: {
    numArgs: 1
  },
  handler(context, args) {
    const symNode = checkSymbolNodeType(args[0]);
    const colalign = symNode ? [args[0]] : assertNodeType(args[0], "ordgroup").body;
    const cols = colalign.map(function(nde) {
      const node = assertSymbolNodeType(nde);
      const ca = node.text;
      if ("lcr".indexOf(ca) !== -1) {
        return {
          type: "align",
          align: ca
        };
      } else if (ca === "|") {
        return {
          type: "separator",
          separator: "|"
        };
      } else if (ca === ":") {
        return {
          type: "separator",
          separator: ":"
        };
      }
      throw new ParseError("Unknown column alignment: " + ca, nde);
    });
    const [arraystretch, arraycolsep] = arrayGaps(context.parser.gullet.macros);
    const res = {
      cols,
      envClasses: ["array"],
      maxNumCols: cols.length,
      arraystretch,
      arraycolsep
    };
    return parseArray(context.parser, res, dCellStyle(context.envName));
  },
  mathmlBuilder: mathmlBuilder$7
});
defineEnvironment({
  type: "array",
  names: [
    "matrix",
    "pmatrix",
    "bmatrix",
    "Bmatrix",
    "vmatrix",
    "Vmatrix",
    "matrix*",
    "pmatrix*",
    "bmatrix*",
    "Bmatrix*",
    "vmatrix*",
    "Vmatrix*"
  ],
  props: {
    numArgs: 0
  },
  handler(context) {
    const delimiters2 = {
      matrix: null,
      pmatrix: ["(", ")"],
      bmatrix: ["[", "]"],
      Bmatrix: ["\\{", "\\}"],
      vmatrix: ["|", "|"],
      Vmatrix: ["\\Vert", "\\Vert"]
    }[context.envName.replace("*", "")];
    let colAlign = "c";
    const payload = {
      envClasses: [],
      cols: []
    };
    if (context.envName.charAt(context.envName.length - 1) === "*") {
      const parser = context.parser;
      parser.consumeSpaces();
      if (parser.fetch().text === "[") {
        parser.consume();
        parser.consumeSpaces();
        colAlign = parser.fetch().text;
        if ("lcr".indexOf(colAlign) === -1) {
          throw new ParseError("Expected l or c or r", parser.nextToken);
        }
        parser.consume();
        parser.consumeSpaces();
        parser.expect("]");
        parser.consume();
        payload.cols = [];
      }
    }
    const res = parseArray(context.parser, payload, "text");
    res.cols = new Array(res.body[0].length).fill({ type: "align", align: colAlign });
    const [arraystretch, arraycolsep] = arrayGaps(context.parser.gullet.macros);
    return delimiters2 ? {
      type: "leftright",
      mode: context.mode,
      body: [res],
      left: delimiters2[0],
      right: delimiters2[1],
      rightColor: void 0,
      // \right uninfluenced by \color in array
      arraystretch,
      arraycolsep
    } : res;
  },
  mathmlBuilder: mathmlBuilder$7
});
defineEnvironment({
  type: "array",
  names: ["smallmatrix"],
  props: {
    numArgs: 0
  },
  handler(context) {
    const payload = { type: "small" };
    const res = parseArray(context.parser, payload, "script");
    res.envClasses = ["small"];
    return res;
  },
  mathmlBuilder: mathmlBuilder$7
});
defineEnvironment({
  type: "array",
  names: ["subarray"],
  props: {
    numArgs: 1
  },
  handler(context, args) {
    const symNode = checkSymbolNodeType(args[0]);
    const colalign = symNode ? [args[0]] : assertNodeType(args[0], "ordgroup").body;
    const cols = colalign.map(function(nde) {
      const node = assertSymbolNodeType(nde);
      const ca = node.text;
      if ("lc".indexOf(ca) !== -1) {
        return {
          type: "align",
          align: ca
        };
      }
      throw new ParseError("Unknown column alignment: " + ca, nde);
    });
    if (cols.length > 1) {
      throw new ParseError("{subarray} can contain only one column");
    }
    let res = {
      cols,
      envClasses: ["small"]
    };
    res = parseArray(context.parser, res, "script");
    if (res.body.length > 0 && res.body[0].length > 1) {
      throw new ParseError("{subarray} can contain only one column");
    }
    return res;
  },
  mathmlBuilder: mathmlBuilder$7
});
defineEnvironment({
  type: "array",
  names: ["cases", "dcases", "rcases", "drcases"],
  props: {
    numArgs: 0
  },
  handler(context) {
    const payload = {
      cols: [],
      envClasses: ["cases"]
    };
    const res = parseArray(context.parser, payload, dCellStyle(context.envName));
    return {
      type: "leftright",
      mode: context.mode,
      body: [res],
      left: context.envName.indexOf("r") > -1 ? "." : "\\{",
      right: context.envName.indexOf("r") > -1 ? "\\}" : ".",
      rightColor: void 0
    };
  },
  mathmlBuilder: mathmlBuilder$7
});
defineEnvironment({
  type: "array",
  names: ["align", "align*", "aligned", "split"],
  props: {
    numArgs: 0
  },
  handler: alignedHandler,
  mathmlBuilder: mathmlBuilder$7
});
defineEnvironment({
  type: "array",
  names: ["alignat", "alignat*", "alignedat"],
  props: {
    numArgs: 1
  },
  handler: alignedHandler,
  mathmlBuilder: mathmlBuilder$7
});
defineEnvironment({
  type: "array",
  names: ["gathered", "gather", "gather*"],
  props: {
    numArgs: 0
  },
  handler(context) {
    if (context.envName !== "gathered") {
      validateAmsEnvironmentContext(context);
    }
    const res = {
      cols: [],
      envClasses: ["abut", "jot"],
      autoTag: getAutoTag(context.envName),
      emptySingleRow: true,
      leqno: context.parser.settings.leqno
    };
    return parseArray(context.parser, res, "display");
  },
  mathmlBuilder: mathmlBuilder$7
});
defineEnvironment({
  type: "array",
  names: ["equation", "equation*"],
  props: {
    numArgs: 0
  },
  handler(context) {
    validateAmsEnvironmentContext(context);
    const res = {
      autoTag: getAutoTag(context.envName),
      emptySingleRow: true,
      singleRow: true,
      maxNumCols: 1,
      envClasses: ["align"],
      leqno: context.parser.settings.leqno
    };
    return parseArray(context.parser, res, "display");
  },
  mathmlBuilder: mathmlBuilder$7
});
defineEnvironment({
  type: "array",
  names: ["multline", "multline*"],
  props: {
    numArgs: 0
  },
  handler(context) {
    validateAmsEnvironmentContext(context);
    const res = {
      autoTag: context.envName === "multline",
      maxNumCols: 1,
      envClasses: ["jot", "multline"],
      leqno: context.parser.settings.leqno
    };
    return parseArray(context.parser, res, "display");
  },
  mathmlBuilder: mathmlBuilder$7
});
defineEnvironment({
  type: "array",
  names: ["CD"],
  props: {
    numArgs: 0
  },
  handler(context) {
    validateAmsEnvironmentContext(context);
    return parseCD(context.parser);
  },
  mathmlBuilder: mathmlBuilder$7
});
defineFunction({
  type: "text",
  // Doesn't matter what this is.
  names: ["\\hline", "\\hdashline"],
  props: {
    numArgs: 0,
    allowedInText: true,
    allowedInMath: true
  },
  handler(context, args) {
    throw new ParseError(`${context.funcName} valid only within array environment`);
  }
});
var environments = _environments;
defineFunction({
  type: "environment",
  names: ["\\begin", "\\end"],
  props: {
    numArgs: 1,
    argTypes: ["text"]
  },
  handler({ parser, funcName }, args) {
    const nameGroup = args[0];
    if (nameGroup.type !== "ordgroup") {
      throw new ParseError("Invalid environment name", nameGroup);
    }
    let envName = "";
    for (let i = 0; i < nameGroup.body.length; ++i) {
      envName += assertNodeType(nameGroup.body[i], "textord").text;
    }
    if (funcName === "\\begin") {
      if (!Object.prototype.hasOwnProperty.call(environments, envName)) {
        throw new ParseError("No such environment: " + envName, nameGroup);
      }
      const env = environments[envName];
      const { args: args2, optArgs } = parser.parseArguments("\\begin{" + envName + "}", env);
      const context = {
        mode: parser.mode,
        envName,
        parser
      };
      const result = env.handler(context, args2, optArgs);
      parser.expect("\\end", false);
      const endNameToken = parser.nextToken;
      const end = assertNodeType(parser.parseFunction(), "environment");
      if (end.name !== envName) {
        throw new ParseError(
          `Mismatch: \\begin{${envName}} matched by \\end{${end.name}}`,
          endNameToken
        );
      }
      return result;
    }
    return {
      type: "environment",
      mode: parser.mode,
      name: envName,
      nameGroup
    };
  }
});
defineFunction({
  type: "envTag",
  names: ["\\env@tag"],
  props: {
    numArgs: 1,
    argTypes: ["math"]
  },
  handler({ parser }, args) {
    return {
      type: "envTag",
      mode: parser.mode,
      body: args[0]
    };
  },
  mathmlBuilder(group, style) {
    return new mathMLTree.MathNode("mrow");
  }
});
defineFunction({
  type: "noTag",
  names: ["\\env@notag"],
  props: {
    numArgs: 0
  },
  handler({ parser }) {
    return {
      type: "noTag",
      mode: parser.mode
    };
  },
  mathmlBuilder(group, style) {
    return new mathMLTree.MathNode("mrow");
  }
});
var isLongVariableName = (group, font) => {
  if (font !== "mathrm" || group.body.type !== "ordgroup" || group.body.body.length === 1) {
    return false;
  }
  if (group.body.body[0].type !== "mathord") {
    return false;
  }
  for (let i = 1; i < group.body.body.length; i++) {
    const parseNodeType = group.body.body[i].type;
    if (!(parseNodeType === "mathord" || parseNodeType === "textord" && !isNaN(group.body.body[i].text))) {
      return false;
    }
  }
  return true;
};
var mathmlBuilder$6 = (group, style) => {
  const font = group.font;
  const newStyle = style.withFont(font);
  const mathGroup = buildGroup$1(group.body, newStyle);
  if (mathGroup.children.length === 0) {
    return mathGroup;
  }
  if (font === "boldsymbol" && ["mo", "mpadded", "mrow"].includes(mathGroup.type)) {
    mathGroup.style.fontWeight = "bold";
    return mathGroup;
  }
  if (isLongVariableName(group, font)) {
    const mi2 = mathGroup.children[0].children[0];
    delete mi2.attributes.mathvariant;
    for (let i = 1; i < mathGroup.children.length; i++) {
      mi2.children[0].text += mathGroup.children[i].type === "mn" ? mathGroup.children[i].children[0].text : mathGroup.children[i].children[0].children[0].text;
    }
    const bogus = new mathMLTree.MathNode("mtext", new mathMLTree.TextNode("\u200B"));
    return new mathMLTree.MathNode("mrow", [bogus, mi2]);
  }
  let canConsolidate = mathGroup.children[0].type === "mo";
  for (let i = 1; i < mathGroup.children.length; i++) {
    if (mathGroup.children[i].type === "mo" && font === "boldsymbol") {
      mathGroup.children[i].style.fontWeight = "bold";
    }
    if (mathGroup.children[i].type !== "mi") {
      canConsolidate = false;
    }
    const localVariant = mathGroup.children[i].attributes && mathGroup.children[i].attributes.mathvariant || "";
    if (localVariant !== "normal") {
      canConsolidate = false;
    }
  }
  if (!canConsolidate) {
    return mathGroup;
  }
  const mi = mathGroup.children[0];
  for (let i = 1; i < mathGroup.children.length; i++) {
    mi.children.push(mathGroup.children[i].children[0]);
  }
  if (mi.attributes.mathvariant && mi.attributes.mathvariant === "normal") {
    const bogus = new mathMLTree.MathNode("mtext", new mathMLTree.TextNode("\u200B"));
    return new mathMLTree.MathNode("mrow", [bogus, mi]);
  }
  return mi;
};
var fontAliases = {
  "\\Bbb": "\\mathbb",
  "\\bold": "\\mathbf",
  "\\frak": "\\mathfrak",
  "\\bm": "\\boldsymbol"
};
defineFunction({
  type: "font",
  names: [
    // styles
    "\\mathrm",
    "\\mathit",
    "\\mathbf",
    "\\mathnormal",
    "\\up@greek",
    "\\boldsymbol",
    // families
    "\\mathbb",
    "\\mathcal",
    "\\mathfrak",
    "\\mathscr",
    "\\mathsf",
    "\\mathsfit",
    "\\mathtt",
    // aliases
    "\\Bbb",
    "\\bm",
    "\\bold",
    "\\frak"
  ],
  props: {
    numArgs: 1,
    allowedInArgument: true
  },
  handler: ({ parser, funcName }, args) => {
    const body = normalizeArgument(args[0]);
    let func = funcName;
    if (func in fontAliases) {
      func = fontAliases[func];
    }
    return {
      type: "font",
      mode: parser.mode,
      font: func.slice(1),
      body
    };
  },
  mathmlBuilder: mathmlBuilder$6
});
defineFunction({
  type: "font",
  names: ["\\rm", "\\sf", "\\tt", "\\bf", "\\it", "\\cal"],
  props: {
    numArgs: 0,
    allowedInText: true
  },
  handler: ({ parser, funcName, breakOnTokenText }, args) => {
    const { mode } = parser;
    const body = parser.parseExpression(true, breakOnTokenText, true);
    const fontStyle = `math${funcName.slice(1)}`;
    return {
      type: "font",
      mode,
      font: fontStyle,
      body: {
        type: "ordgroup",
        mode: parser.mode,
        body
      }
    };
  },
  mathmlBuilder: mathmlBuilder$6
});
var stylArray = ["display", "text", "script", "scriptscript"];
var scriptLevel = { auto: -1, display: 0, text: 0, script: 1, scriptscript: 2 };
var mathmlBuilder$5 = (group, style) => {
  const childOptions = group.scriptLevel === "auto" ? style.incrementLevel() : group.scriptLevel === "display" ? style.withLevel(StyleLevel.TEXT) : group.scriptLevel === "text" ? style.withLevel(StyleLevel.SCRIPT) : style.withLevel(StyleLevel.SCRIPTSCRIPT);
  const numer = buildGroup$1(group.numer, childOptions);
  const denom = buildGroup$1(group.denom, childOptions);
  if (style.level === 3) {
    numer.style.mathDepth = "2";
    numer.setAttribute("scriptlevel", "2");
    denom.style.mathDepth = "2";
    denom.setAttribute("scriptlevel", "2");
  }
  let node = new mathMLTree.MathNode("mfrac", [numer, denom]);
  if (!group.hasBarLine) {
    node.setAttribute("linethickness", "0px");
  } else if (group.barSize) {
    const ruleWidth = calculateSize(group.barSize, style);
    node.setAttribute("linethickness", ruleWidth.number + ruleWidth.unit);
  }
  if (group.leftDelim != null || group.rightDelim != null) {
    const withDelims = [];
    if (group.leftDelim != null) {
      const leftOp = new mathMLTree.MathNode("mo", [
        new mathMLTree.TextNode(group.leftDelim.replace("\\", ""))
      ]);
      leftOp.setAttribute("fence", "true");
      withDelims.push(leftOp);
    }
    withDelims.push(node);
    if (group.rightDelim != null) {
      const rightOp = new mathMLTree.MathNode("mo", [
        new mathMLTree.TextNode(group.rightDelim.replace("\\", ""))
      ]);
      rightOp.setAttribute("fence", "true");
      withDelims.push(rightOp);
    }
    node = makeRow(withDelims);
  }
  if (group.scriptLevel !== "auto") {
    node = new mathMLTree.MathNode("mstyle", [node]);
    node.setAttribute("displaystyle", String(group.scriptLevel === "display"));
    node.setAttribute("scriptlevel", scriptLevel[group.scriptLevel]);
  }
  return node;
};
defineFunction({
  type: "genfrac",
  names: [
    "\\dfrac",
    "\\frac",
    "\\tfrac",
    "\\dbinom",
    "\\binom",
    "\\tbinom",
    "\\\\atopfrac",
    // canâ€™t be entered directly
    "\\\\bracefrac",
    "\\\\brackfrac"
    // ditto
  ],
  props: {
    numArgs: 2,
    allowedInArgument: true
  },
  handler: ({ parser, funcName }, args) => {
    const numer = args[0];
    const denom = args[1];
    let hasBarLine = false;
    let leftDelim = null;
    let rightDelim = null;
    let scriptLevel2 = "auto";
    switch (funcName) {
      case "\\dfrac":
      case "\\frac":
      case "\\tfrac":
        hasBarLine = true;
        break;
      case "\\\\atopfrac":
        hasBarLine = false;
        break;
      case "\\dbinom":
      case "\\binom":
      case "\\tbinom":
        leftDelim = "(";
        rightDelim = ")";
        break;
      case "\\\\bracefrac":
        leftDelim = "\\{";
        rightDelim = "\\}";
        break;
      case "\\\\brackfrac":
        leftDelim = "[";
        rightDelim = "]";
        break;
      default:
        throw new Error("Unrecognized genfrac command");
    }
    switch (funcName) {
      case "\\dfrac":
      case "\\dbinom":
        scriptLevel2 = "display";
        break;
      case "\\tfrac":
      case "\\tbinom":
        scriptLevel2 = "text";
        break;
    }
    return {
      type: "genfrac",
      mode: parser.mode,
      continued: false,
      numer,
      denom,
      hasBarLine,
      leftDelim,
      rightDelim,
      scriptLevel: scriptLevel2,
      barSize: null
    };
  },
  mathmlBuilder: mathmlBuilder$5
});
defineFunction({
  type: "genfrac",
  names: ["\\cfrac"],
  props: {
    numArgs: 2
  },
  handler: ({ parser, funcName }, args) => {
    const numer = args[0];
    const denom = args[1];
    return {
      type: "genfrac",
      mode: parser.mode,
      continued: true,
      numer,
      denom,
      hasBarLine: true,
      leftDelim: null,
      rightDelim: null,
      scriptLevel: "display",
      barSize: null
    };
  }
});
defineFunction({
  type: "infix",
  names: ["\\over", "\\choose", "\\atop", "\\brace", "\\brack"],
  props: {
    numArgs: 0,
    infix: true
  },
  handler({ parser, funcName, token }) {
    let replaceWith;
    switch (funcName) {
      case "\\over":
        replaceWith = "\\frac";
        break;
      case "\\choose":
        replaceWith = "\\binom";
        break;
      case "\\atop":
        replaceWith = "\\\\atopfrac";
        break;
      case "\\brace":
        replaceWith = "\\\\bracefrac";
        break;
      case "\\brack":
        replaceWith = "\\\\brackfrac";
        break;
      default:
        throw new Error("Unrecognized infix genfrac command");
    }
    return {
      type: "infix",
      mode: parser.mode,
      replaceWith,
      token
    };
  }
});
var delimFromValue = function(delimString) {
  let delim = null;
  if (delimString.length > 0) {
    delim = delimString;
    delim = delim === "." ? null : delim;
  }
  return delim;
};
defineFunction({
  type: "genfrac",
  names: ["\\genfrac"],
  props: {
    numArgs: 6,
    allowedInArgument: true,
    argTypes: ["math", "math", "size", "text", "math", "math"]
  },
  handler({ parser }, args) {
    const numer = args[4];
    const denom = args[5];
    const leftNode = normalizeArgument(args[0]);
    const leftDelim = leftNode.type === "atom" && leftNode.family === "open" ? delimFromValue(leftNode.text) : null;
    const rightNode = normalizeArgument(args[1]);
    const rightDelim = rightNode.type === "atom" && rightNode.family === "close" ? delimFromValue(rightNode.text) : null;
    const barNode = assertNodeType(args[2], "size");
    let hasBarLine;
    let barSize = null;
    if (barNode.isBlank) {
      hasBarLine = true;
    } else {
      barSize = barNode.value;
      hasBarLine = barSize.number > 0;
    }
    let scriptLevel2 = "auto";
    let styl = args[3];
    if (styl.type === "ordgroup") {
      if (styl.body.length > 0) {
        const textOrd = assertNodeType(styl.body[0], "textord");
        scriptLevel2 = stylArray[Number(textOrd.text)];
      }
    } else {
      styl = assertNodeType(styl, "textord");
      scriptLevel2 = stylArray[Number(styl.text)];
    }
    return {
      type: "genfrac",
      mode: parser.mode,
      numer,
      denom,
      continued: false,
      hasBarLine,
      barSize,
      leftDelim,
      rightDelim,
      scriptLevel: scriptLevel2
    };
  },
  mathmlBuilder: mathmlBuilder$5
});
defineFunction({
  type: "infix",
  names: ["\\above"],
  props: {
    numArgs: 1,
    argTypes: ["size"],
    infix: true
  },
  handler({ parser, funcName, token }, args) {
    return {
      type: "infix",
      mode: parser.mode,
      replaceWith: "\\\\abovefrac",
      barSize: assertNodeType(args[0], "size").value,
      token
    };
  }
});
defineFunction({
  type: "genfrac",
  names: ["\\\\abovefrac"],
  props: {
    numArgs: 3,
    argTypes: ["math", "size", "math"]
  },
  handler: ({ parser, funcName }, args) => {
    const numer = args[0];
    const barSize = assert(assertNodeType(args[1], "infix").barSize);
    const denom = args[2];
    const hasBarLine = barSize.number > 0;
    return {
      type: "genfrac",
      mode: parser.mode,
      numer,
      denom,
      continued: false,
      hasBarLine,
      barSize,
      leftDelim: null,
      rightDelim: null,
      scriptLevel: "auto"
    };
  },
  mathmlBuilder: mathmlBuilder$5
});
defineFunction({
  type: "hbox",
  names: ["\\hbox"],
  props: {
    numArgs: 1,
    argTypes: ["hbox"],
    allowedInArgument: true,
    allowedInText: false
  },
  handler({ parser }, args) {
    return {
      type: "hbox",
      mode: parser.mode,
      body: ordargument(args[0])
    };
  },
  mathmlBuilder(group, style) {
    const newStyle = style.withLevel(StyleLevel.TEXT);
    const mrow = buildExpressionRow(group.body, newStyle);
    return consolidateText(mrow);
  }
});
var mathmlBuilder$4 = (group, style) => {
  const accentNode2 = stretchy.mathMLnode(group.label);
  accentNode2.style["math-depth"] = 0;
  return new mathMLTree.MathNode(group.isOver ? "mover" : "munder", [
    buildGroup$1(group.base, style),
    accentNode2
  ]);
};
defineFunction({
  type: "horizBrace",
  names: ["\\overbrace", "\\underbrace"],
  props: {
    numArgs: 1
  },
  handler({ parser, funcName }, args) {
    return {
      type: "horizBrace",
      mode: parser.mode,
      label: funcName,
      isOver: /^\\over/.test(funcName),
      base: args[0]
    };
  },
  mathmlBuilder: mathmlBuilder$4
});
defineFunction({
  type: "href",
  names: ["\\href"],
  props: {
    numArgs: 2,
    argTypes: ["url", "original"],
    allowedInText: true
  },
  handler: ({ parser, token }, args) => {
    const body = args[1];
    const href = assertNodeType(args[0], "url").url;
    if (!parser.settings.isTrusted({
      command: "\\href",
      url: href
    })) {
      throw new ParseError(`Function "\\href" is not trusted`, token);
    }
    return {
      type: "href",
      mode: parser.mode,
      href,
      body: ordargument(body)
    };
  },
  mathmlBuilder: (group, style) => {
    const math2 = new MathNode("math", [buildExpressionRow(group.body, style)]);
    const anchorNode = new AnchorNode(group.href, [], [math2]);
    return anchorNode;
  }
});
defineFunction({
  type: "href",
  names: ["\\url"],
  props: {
    numArgs: 1,
    argTypes: ["url"],
    allowedInText: true
  },
  handler: ({ parser, token }, args) => {
    const href = assertNodeType(args[0], "url").url;
    if (!parser.settings.isTrusted({
      command: "\\url",
      url: href
    })) {
      throw new ParseError(`Function "\\url" is not trusted`, token);
    }
    const chars = [];
    for (let i = 0; i < href.length; i++) {
      let c = href[i];
      if (c === "~") {
        c = "\\textasciitilde";
      }
      chars.push({
        type: "textord",
        mode: "text",
        text: c
      });
    }
    const body = {
      type: "text",
      mode: parser.mode,
      font: "\\texttt",
      body: chars
    };
    return {
      type: "href",
      mode: parser.mode,
      href,
      body: ordargument(body)
    };
  }
});
defineFunction({
  type: "html",
  names: ["\\class", "\\id", "\\style", "\\data"],
  props: {
    numArgs: 2,
    argTypes: ["raw", "original"],
    allowedInText: true
  },
  handler: ({ parser, funcName, token }, args) => {
    const value = assertNodeType(args[0], "raw").string;
    const body = args[1];
    if (parser.settings.strict) {
      throw new ParseError(`Function "${funcName}" is disabled in strict mode`, token);
    }
    let trustContext;
    const attributes = {};
    switch (funcName) {
      case "\\class":
        attributes.class = value;
        trustContext = {
          command: "\\class",
          class: value
        };
        break;
      case "\\id":
        attributes.id = value;
        trustContext = {
          command: "\\id",
          id: value
        };
        break;
      case "\\style":
        attributes.style = value;
        trustContext = {
          command: "\\style",
          style: value
        };
        break;
      case "\\data": {
        const data = value.split(",");
        for (let i = 0; i < data.length; i++) {
          const keyVal = data[i].split("=");
          if (keyVal.length !== 2) {
            throw new ParseError("Error parsing key-value for \\data");
          }
          attributes["data-" + keyVal[0].trim()] = keyVal[1].trim();
        }
        trustContext = {
          command: "\\data",
          attributes
        };
        break;
      }
      default:
        throw new Error("Unrecognized html command");
    }
    if (!parser.settings.isTrusted(trustContext)) {
      throw new ParseError(`Function "${funcName}" is not trusted`, token);
    }
    return {
      type: "html",
      mode: parser.mode,
      attributes,
      body: ordargument(body)
    };
  },
  mathmlBuilder: (group, style) => {
    const element = buildExpressionRow(group.body, style);
    const classes = [];
    if (group.attributes.class) {
      classes.push(...group.attributes.class.trim().split(/\s+/));
    }
    element.classes = classes;
    for (const attr in group.attributes) {
      if (attr !== "class" && Object.prototype.hasOwnProperty.call(group.attributes, attr)) {
        element.setAttribute(attr, group.attributes[attr]);
      }
    }
    return element;
  }
});
var sizeData = function(str) {
  if (/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(str)) {
    return { number: +str, unit: "bp" };
  } else {
    const match = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(str);
    if (!match) {
      throw new ParseError("Invalid size: '" + str + "' in \\includegraphics");
    }
    const data = {
      number: +(match[1] + match[2]),
      // sign + magnitude, cast to number
      unit: match[3]
    };
    if (!validUnit(data)) {
      throw new ParseError("Invalid unit: '" + data.unit + "' in \\includegraphics.");
    }
    return data;
  }
};
defineFunction({
  type: "includegraphics",
  names: ["\\includegraphics"],
  props: {
    numArgs: 1,
    numOptionalArgs: 1,
    argTypes: ["raw", "url"],
    allowedInText: false
  },
  handler: ({ parser, token }, args, optArgs) => {
    let width = { number: 0, unit: "em" };
    let height = { number: 0.9, unit: "em" };
    let totalheight = { number: 0, unit: "em" };
    let alt = "";
    if (optArgs[0]) {
      const attributeStr = assertNodeType(optArgs[0], "raw").string;
      const attributes = attributeStr.split(",");
      for (let i = 0; i < attributes.length; i++) {
        const keyVal = attributes[i].split("=");
        if (keyVal.length === 2) {
          const str = keyVal[1].trim();
          switch (keyVal[0].trim()) {
            case "alt":
              alt = str;
              break;
            case "width":
              width = sizeData(str);
              break;
            case "height":
              height = sizeData(str);
              break;
            case "totalheight":
              totalheight = sizeData(str);
              break;
            default:
              throw new ParseError("Invalid key: '" + keyVal[0] + "' in \\includegraphics.");
          }
        }
      }
    }
    const src = assertNodeType(args[0], "url").url;
    if (alt === "") {
      alt = src;
      alt = alt.replace(/^.*[\\/]/, "");
      alt = alt.substring(0, alt.lastIndexOf("."));
    }
    if (!parser.settings.isTrusted({
      command: "\\includegraphics",
      url: src
    })) {
      throw new ParseError(`Function "\\includegraphics" is not trusted`, token);
    }
    return {
      type: "includegraphics",
      mode: parser.mode,
      alt,
      width,
      height,
      totalheight,
      src
    };
  },
  mathmlBuilder: (group, style) => {
    const height = calculateSize(group.height, style);
    const depth = { number: 0, unit: "em" };
    if (group.totalheight.number > 0) {
      if (group.totalheight.unit === height.unit && group.totalheight.number > height.number) {
        depth.number = group.totalheight.number - height.number;
        depth.unit = height.unit;
      }
    }
    let width = 0;
    if (group.width.number > 0) {
      width = calculateSize(group.width, style);
    }
    const graphicStyle = { height: height.number + depth.number + "em" };
    if (width.number > 0) {
      graphicStyle.width = width.number + width.unit;
    }
    if (depth.number > 0) {
      graphicStyle.verticalAlign = -depth.number + depth.unit;
    }
    const node = new Img(group.src, group.alt, graphicStyle);
    node.height = height;
    node.depth = depth;
    return new mathMLTree.MathNode("mtext", [node]);
  }
});
defineFunction({
  type: "kern",
  names: ["\\kern", "\\mkern", "\\hskip", "\\mskip"],
  props: {
    numArgs: 1,
    argTypes: ["size"],
    primitive: true,
    allowedInText: true
  },
  handler({ parser, funcName, token }, args) {
    const size = assertNodeType(args[0], "size");
    if (parser.settings.strict) {
      const mathFunction = funcName[1] === "m";
      const muUnit = size.value.unit === "mu";
      if (mathFunction) {
        if (!muUnit) {
          throw new ParseError(`LaTeX's ${funcName} supports only mu units, not ${size.value.unit} units`, token);
        }
        if (parser.mode !== "math") {
          throw new ParseError(`LaTeX's ${funcName} works only in math mode`, token);
        }
      } else {
        if (muUnit) {
          throw new ParseError(`LaTeX's ${funcName} doesn't support mu units`, token);
        }
      }
    }
    return {
      type: "kern",
      mode: parser.mode,
      dimension: size.value
    };
  },
  mathmlBuilder(group, style) {
    const dimension = calculateSize(group.dimension, style);
    const ch = dimension.unit === "em" ? spaceCharacter(dimension.number) : "";
    if (group.mode === "text" && ch.length > 0) {
      const character = new mathMLTree.TextNode(ch);
      return new mathMLTree.MathNode("mtext", [character]);
    } else {
      const node = new mathMLTree.MathNode("mspace");
      node.setAttribute("width", dimension.number + dimension.unit);
      if (dimension.number < 0) {
        node.style.marginLeft = dimension.number + dimension.unit;
      }
      return node;
    }
  }
});
var spaceCharacter = function(width) {
  if (width >= 0.05555 && width <= 0.05556) {
    return "\u200A";
  } else if (width >= 0.1666 && width <= 0.1667) {
    return "\u2009";
  } else if (width >= 0.2222 && width <= 0.2223) {
    return "\u2005";
  } else if (width >= 0.2777 && width <= 0.2778) {
    return "\u2005\u200A";
  } else {
    return "";
  }
};
var invalidIdRegEx = /[^A-Za-z_0-9-]/g;
defineFunction({
  type: "label",
  names: ["\\label"],
  props: {
    numArgs: 1,
    argTypes: ["raw"]
  },
  handler({ parser }, args) {
    return {
      type: "label",
      mode: parser.mode,
      string: args[0].string.replace(invalidIdRegEx, "")
    };
  },
  mathmlBuilder(group, style) {
    const node = new mathMLTree.MathNode("mrow", [], ["tml-label"]);
    if (group.string.length > 0) {
      node.setLabel(group.string);
    }
    return node;
  }
});
var textModeLap = ["\\clap", "\\llap", "\\rlap"];
defineFunction({
  type: "lap",
  names: ["\\mathllap", "\\mathrlap", "\\mathclap", "\\clap", "\\llap", "\\rlap"],
  props: {
    numArgs: 1,
    allowedInText: true
  },
  handler: ({ parser, funcName, token }, args) => {
    if (textModeLap.includes(funcName)) {
      if (parser.settings.strict && parser.mode !== "text") {
        throw new ParseError(`{${funcName}} can be used only in text mode.
 Try \\math${funcName.slice(1)}`, token);
      }
      funcName = funcName.slice(1);
    } else {
      funcName = funcName.slice(5);
    }
    const body = args[0];
    return {
      type: "lap",
      mode: parser.mode,
      alignment: funcName,
      body
    };
  },
  mathmlBuilder: (group, style) => {
    let strut;
    if (group.alignment === "llap") {
      const phantomInner = buildExpression(ordargument(group.body), style);
      const phantom = new mathMLTree.MathNode("mphantom", phantomInner);
      strut = new mathMLTree.MathNode("mpadded", [phantom]);
      strut.setAttribute("width", "0px");
    }
    const inner2 = buildGroup$1(group.body, style);
    let node;
    if (group.alignment === "llap") {
      inner2.style.position = "absolute";
      inner2.style.right = "0";
      inner2.style.bottom = `0`;
      node = new mathMLTree.MathNode("mpadded", [strut, inner2]);
    } else {
      node = new mathMLTree.MathNode("mpadded", [inner2]);
    }
    if (group.alignment === "rlap") {
      if (group.body.body.length > 0 && group.body.body[0].type === "genfrac") {
        node.setAttribute("lspace", "0.16667em");
      }
    } else {
      const offset2 = group.alignment === "llap" ? "-1" : "-0.5";
      node.setAttribute("lspace", offset2 + "width");
      if (group.alignment === "llap") {
        node.style.position = "relative";
      } else {
        node.style.display = "flex";
        node.style.justifyContent = "center";
      }
    }
    node.setAttribute("width", "0px");
    return node;
  }
});
defineFunction({
  type: "ordgroup",
  names: ["\\(", "$"],
  props: {
    numArgs: 0,
    allowedInText: true,
    allowedInMath: false
  },
  handler({ funcName, parser }, args) {
    const outerMode = parser.mode;
    parser.switchMode("math");
    const close2 = funcName === "\\(" ? "\\)" : "$";
    const body = parser.parseExpression(false, close2);
    parser.expect(close2);
    parser.switchMode(outerMode);
    return {
      type: "ordgroup",
      mode: parser.mode,
      body
    };
  }
});
defineFunction({
  type: "text",
  // Doesn't matter what this is.
  names: ["\\)", "\\]"],
  props: {
    numArgs: 0,
    allowedInText: true,
    allowedInMath: false
  },
  handler(context, token) {
    throw new ParseError(`Mismatched ${context.funcName}`, token);
  }
});
var chooseStyle = (group, style) => {
  switch (style.level) {
    case StyleLevel.DISPLAY:
      return group.display;
    case StyleLevel.TEXT:
      return group.text;
    case StyleLevel.SCRIPT:
      return group.script;
    case StyleLevel.SCRIPTSCRIPT:
      return group.scriptscript;
    default:
      return group.text;
  }
};
defineFunction({
  type: "mathchoice",
  names: ["\\mathchoice"],
  props: {
    numArgs: 4,
    primitive: true
  },
  handler: ({ parser }, args) => {
    return {
      type: "mathchoice",
      mode: parser.mode,
      display: ordargument(args[0]),
      text: ordargument(args[1]),
      script: ordargument(args[2]),
      scriptscript: ordargument(args[3])
    };
  },
  mathmlBuilder: (group, style) => {
    const body = chooseStyle(group, style);
    return buildExpressionRow(body, style);
  }
});
var textAtomTypes = ["text", "textord", "mathord", "atom"];
var padding = (width) => {
  const node = new mathMLTree.MathNode("mspace");
  node.setAttribute("width", width + "em");
  return node;
};
function mathmlBuilder$3(group, style) {
  let node;
  const inner2 = buildExpression(group.body, style);
  if (group.mclass === "minner") {
    node = new mathMLTree.MathNode("mpadded", inner2);
  } else if (group.mclass === "mord") {
    if (group.isCharacterBox || inner2[0].type === "mathord") {
      node = inner2[0];
      node.type = "mi";
      if (node.children.length === 1 && node.children[0].text && node.children[0].text === "\u2207") {
        node.setAttribute("mathvariant", "normal");
      }
    } else {
      node = new mathMLTree.MathNode("mi", inner2);
    }
  } else {
    node = new mathMLTree.MathNode("mrow", inner2);
    if (group.mustPromote) {
      node = inner2[0];
      node.type = "mo";
      if (group.isCharacterBox && group.body[0].text && /[A-Za-z]/.test(group.body[0].text)) {
        node.setAttribute("mathvariant", "italic");
      }
    } else {
      node = new mathMLTree.MathNode("mrow", inner2);
    }
    const doSpacing = style.level < 2;
    if (node.type === "mrow") {
      if (doSpacing) {
        if (group.mclass === "mbin") {
          node.children.unshift(padding(0.2222));
          node.children.push(padding(0.2222));
        } else if (group.mclass === "mrel") {
          node.children.unshift(padding(0.2778));
          node.children.push(padding(0.2778));
        } else if (group.mclass === "mpunct") {
          node.children.push(padding(0.1667));
        } else if (group.mclass === "minner") {
          node.children.unshift(padding(0.0556));
          node.children.push(padding(0.0556));
        }
      }
    } else {
      if (group.mclass === "mbin") {
        node.attributes.lspace = doSpacing ? "0.2222em" : "0";
        node.attributes.rspace = doSpacing ? "0.2222em" : "0";
      } else if (group.mclass === "mrel") {
        node.attributes.lspace = doSpacing ? "0.2778em" : "0";
        node.attributes.rspace = doSpacing ? "0.2778em" : "0";
      } else if (group.mclass === "mpunct") {
        node.attributes.lspace = "0em";
        node.attributes.rspace = doSpacing ? "0.1667em" : "0";
      } else if (group.mclass === "mopen" || group.mclass === "mclose") {
        node.attributes.lspace = "0em";
        node.attributes.rspace = "0em";
      } else if (group.mclass === "minner" && doSpacing) {
        node.attributes.lspace = "0.0556em";
        node.attributes.width = "+0.1111em";
      }
    }
    if (!(group.mclass === "mopen" || group.mclass === "mclose")) {
      delete node.attributes.stretchy;
      delete node.attributes.form;
    }
  }
  return node;
}
defineFunction({
  type: "mclass",
  names: [
    "\\mathord",
    "\\mathbin",
    "\\mathrel",
    "\\mathopen",
    "\\mathclose",
    "\\mathpunct",
    "\\mathinner"
  ],
  props: {
    numArgs: 1,
    primitive: true
  },
  handler({ parser, funcName }, args) {
    const body = args[0];
    const isCharacterBox2 = utils.isCharacterBox(body);
    let mustPromote = true;
    const mord = { type: "mathord", text: "", mode: parser.mode };
    const arr = body.body ? body.body : [body];
    for (const arg of arr) {
      if (textAtomTypes.includes(arg.type)) {
        if (symbols[parser.mode][arg.text]) {
          mord.text += symbols[parser.mode][arg.text].replace;
        } else if (arg.text) {
          mord.text += arg.text;
        } else if (arg.body) {
          arg.body.map((e) => {
            mord.text += e.text;
          });
        }
      } else {
        mustPromote = false;
        break;
      }
    }
    return {
      type: "mclass",
      mode: parser.mode,
      mclass: "m" + funcName.slice(5),
      body: ordargument(mustPromote ? mord : body),
      isCharacterBox: isCharacterBox2,
      mustPromote
    };
  },
  mathmlBuilder: mathmlBuilder$3
});
var binrelClass = (arg) => {
  const atom = arg.type === "ordgroup" && arg.body.length ? arg.body[0] : arg;
  if (atom.type === "atom" && (atom.family === "bin" || atom.family === "rel")) {
    return "m" + atom.family;
  } else {
    return "mord";
  }
};
defineFunction({
  type: "mclass",
  names: ["\\@binrel"],
  props: {
    numArgs: 2
  },
  handler({ parser }, args) {
    return {
      type: "mclass",
      mode: parser.mode,
      mclass: binrelClass(args[0]),
      body: ordargument(args[1]),
      isCharacterBox: utils.isCharacterBox(args[1])
    };
  }
});
defineFunction({
  type: "mclass",
  names: ["\\stackrel", "\\overset", "\\underset"],
  props: {
    numArgs: 2
  },
  handler({ parser, funcName }, args) {
    const baseArg = args[1];
    const shiftedArg = args[0];
    const baseOp = {
      type: "op",
      mode: baseArg.mode,
      limits: true,
      alwaysHandleSupSub: true,
      parentIsSupSub: false,
      symbol: false,
      stack: true,
      suppressBaseShift: funcName !== "\\stackrel",
      body: ordargument(baseArg)
    };
    return {
      type: "supsub",
      mode: shiftedArg.mode,
      base: baseOp,
      sup: funcName === "\\underset" ? null : shiftedArg,
      sub: funcName === "\\underset" ? shiftedArg : null
    };
  },
  mathmlBuilder: mathmlBuilder$3
});
var buildGroup = (el, style, noneNode) => {
  if (!el) {
    return noneNode;
  }
  const node = buildGroup$1(el, style);
  if (node.type === "mrow" && node.children.length === 0) {
    return noneNode;
  }
  return node;
};
defineFunction({
  type: "multiscript",
  names: ["\\sideset", "\\pres@cript"],
  // See macros.js for \prescript
  props: {
    numArgs: 3
  },
  handler({ parser, funcName, token }, args) {
    if (args[2].body.length === 0) {
      throw new ParseError(funcName + `cannot parse an empty base.`);
    }
    const base = args[2].body[0];
    if (parser.settings.strict && funcName === "\\sideset" && !base.symbol) {
      throw new ParseError(`The base of \\sideset must be a big operator. Try \\prescript.`);
    }
    if (args[0].body.length > 0 && args[0].body[0].type !== "supsub" || args[1].body.length > 0 && args[1].body[0].type !== "supsub") {
      throw new ParseError("\\sideset can parse only subscripts and superscripts in its first two arguments", token);
    }
    const prescripts = args[0].body.length > 0 ? args[0].body[0] : null;
    const postscripts = args[1].body.length > 0 ? args[1].body[0] : null;
    if (!prescripts && !postscripts) {
      return base;
    } else if (!prescripts) {
      return {
        type: "styling",
        mode: parser.mode,
        scriptLevel: "text",
        body: [{
          type: "supsub",
          mode: parser.mode,
          base,
          sup: postscripts.sup,
          sub: postscripts.sub
        }]
      };
    } else {
      return {
        type: "multiscript",
        mode: parser.mode,
        isSideset: funcName === "\\sideset",
        prescripts,
        postscripts,
        base
      };
    }
  },
  mathmlBuilder(group, style) {
    const base = buildGroup$1(group.base, style);
    const prescriptsNode = new mathMLTree.MathNode("mprescripts");
    const noneNode = new mathMLTree.MathNode("none");
    let children = [];
    const preSub = buildGroup(group.prescripts.sub, style, noneNode);
    const preSup = buildGroup(group.prescripts.sup, style, noneNode);
    if (group.isSideset) {
      preSub.setAttribute("style", "text-align: left;");
      preSup.setAttribute("style", "text-align: left;");
    }
    if (group.postscripts) {
      const postSub = buildGroup(group.postscripts.sub, style, noneNode);
      const postSup = buildGroup(group.postscripts.sup, style, noneNode);
      children = [base, postSub, postSup, prescriptsNode, preSub, preSup];
    } else {
      children = [base, prescriptsNode, preSub, preSup];
    }
    return new mathMLTree.MathNode("mmultiscripts", children);
  }
});
defineFunction({
  type: "not",
  names: ["\\not"],
  props: {
    numArgs: 1,
    primitive: true,
    allowedInText: false
  },
  handler({ parser }, args) {
    const isCharacterBox2 = utils.isCharacterBox(args[0]);
    let body;
    if (isCharacterBox2) {
      body = ordargument(args[0]);
      if (body[0].text.charAt(0) === "\\") {
        body[0].text = symbols.math[body[0].text].replace;
      }
      body[0].text = body[0].text.slice(0, 1) + "\u0338" + body[0].text.slice(1);
    } else {
      const notNode = { type: "textord", mode: "math", text: "\u0338" };
      const kernNode = { type: "kern", mode: "math", dimension: { number: -0.6, unit: "em" } };
      body = [notNode, kernNode, args[0]];
    }
    return {
      type: "not",
      mode: parser.mode,
      body,
      isCharacterBox: isCharacterBox2
    };
  },
  mathmlBuilder(group, style) {
    if (group.isCharacterBox) {
      const inner2 = buildExpression(group.body, style, true);
      return inner2[0];
    } else {
      return buildExpressionRow(group.body, style);
    }
  }
});
var ordAtomTypes = ["textord", "mathord", "atom"];
var noSuccessor = ["\\smallint"];
var ordTypes = ["textord", "mathord", "ordgroup", "close", "leftright", "font"];
var setSpacing = (node) => {
  node.attributes.lspace = "0.1667em";
  node.attributes.rspace = "0.1667em";
};
var mathmlBuilder$2 = (group, style) => {
  let node;
  if (group.symbol) {
    node = new MathNode("mo", [makeText(group.name, group.mode)]);
    if (noSuccessor.includes(group.name)) {
      node.setAttribute("largeop", "false");
    } else {
      node.setAttribute("movablelimits", "false");
    }
    if (group.fromMathOp) {
      setSpacing(node);
    }
  } else if (group.body) {
    node = new MathNode("mo", buildExpression(group.body, style));
    if (group.fromMathOp) {
      setSpacing(node);
    }
  } else {
    node = new MathNode("mi", [new TextNode2(group.name.slice(1))]);
    if (!group.parentIsSupSub) {
      const operator = new MathNode("mo", [makeText("\u2061", "text")]);
      const row = [node, operator];
      if (group.needsLeadingSpace) {
        const lead = new MathNode("mspace");
        lead.setAttribute("width", "0.1667em");
        row.unshift(lead);
      }
      if (!group.isFollowedByDelimiter) {
        const trail = new MathNode("mspace");
        trail.setAttribute("width", "0.1667em");
        row.push(trail);
      }
      node = new MathNode("mrow", row);
    }
  }
  return node;
};
var singleCharBigOps = {
  "\u220F": "\\prod",
  "\u2210": "\\coprod",
  "\u2211": "\\sum",
  "\u22C0": "\\bigwedge",
  "\u22C1": "\\bigvee",
  "\u22C2": "\\bigcap",
  "\u22C3": "\\bigcup",
  "\u2A00": "\\bigodot",
  "\u2A01": "\\bigoplus",
  "\u2A02": "\\bigotimes",
  "\u2A04": "\\biguplus",
  "\u2A05": "\\bigsqcap",
  "\u2A06": "\\bigsqcup",
  "\u2A03": "\\bigcupdot",
  "\u2A07": "\\bigdoublevee",
  "\u2A08": "\\bigdoublewedge",
  "\u2A09": "\\bigtimes"
};
defineFunction({
  type: "op",
  names: [
    "\\coprod",
    "\\bigvee",
    "\\bigwedge",
    "\\biguplus",
    "\\bigcupplus",
    "\\bigcupdot",
    "\\bigcap",
    "\\bigcup",
    "\\bigdoublevee",
    "\\bigdoublewedge",
    "\\intop",
    "\\prod",
    "\\sum",
    "\\bigotimes",
    "\\bigoplus",
    "\\bigodot",
    "\\bigsqcap",
    "\\bigsqcup",
    "\\bigtimes",
    "\\smallint",
    "\u220F",
    "\u2210",
    "\u2211",
    "\u22C0",
    "\u22C1",
    "\u22C2",
    "\u22C3",
    "\u2A00",
    "\u2A01",
    "\u2A02",
    "\u2A04",
    "\u2A06"
  ],
  props: {
    numArgs: 0
  },
  handler: ({ parser, funcName }, args) => {
    let fName = funcName;
    if (fName.length === 1) {
      fName = singleCharBigOps[fName];
    }
    return {
      type: "op",
      mode: parser.mode,
      limits: true,
      parentIsSupSub: false,
      symbol: true,
      stack: false,
      // This is true for \stackrel{}, not here.
      name: fName
    };
  },
  mathmlBuilder: mathmlBuilder$2
});
defineFunction({
  type: "op",
  names: ["\\mathop"],
  props: {
    numArgs: 1,
    primitive: true
  },
  handler: ({ parser }, args) => {
    const body = args[0];
    const arr = body.body ? body.body : [body];
    const isSymbol = arr.length === 1 && ordAtomTypes.includes(arr[0].type);
    return {
      type: "op",
      mode: parser.mode,
      limits: true,
      parentIsSupSub: false,
      symbol: isSymbol,
      fromMathOp: true,
      stack: false,
      name: isSymbol ? arr[0].text : null,
      body: isSymbol ? null : ordargument(body)
    };
  },
  mathmlBuilder: mathmlBuilder$2
});
var singleCharIntegrals = {
  "\u222B": "\\int",
  "\u222C": "\\iint",
  "\u222D": "\\iiint",
  "\u222E": "\\oint",
  "\u222F": "\\oiint",
  "\u2230": "\\oiiint",
  "\u2231": "\\intclockwise",
  "\u2232": "\\varointclockwise",
  "\u2A0C": "\\iiiint",
  "\u2A0D": "\\intbar",
  "\u2A0E": "\\intBar",
  "\u2A0F": "\\fint",
  "\u2A12": "\\rppolint",
  "\u2A13": "\\scpolint",
  "\u2A15": "\\pointint",
  "\u2A16": "\\sqint",
  "\u2A17": "\\intlarhk",
  "\u2A18": "\\intx",
  "\u2A19": "\\intcap",
  "\u2A1A": "\\intcup"
};
defineFunction({
  type: "op",
  names: [
    "\\arcsin",
    "\\arccos",
    "\\arctan",
    "\\arctg",
    "\\arcctg",
    "\\arg",
    "\\ch",
    "\\cos",
    "\\cosec",
    "\\cosh",
    "\\cot",
    "\\cotg",
    "\\coth",
    "\\csc",
    "\\ctg",
    "\\cth",
    "\\deg",
    "\\dim",
    "\\exp",
    "\\hom",
    "\\ker",
    "\\lg",
    "\\ln",
    "\\log",
    "\\sec",
    "\\sin",
    "\\sinh",
    "\\sh",
    "\\sgn",
    "\\tan",
    "\\tanh",
    "\\tg",
    "\\th"
  ],
  props: {
    numArgs: 0
  },
  handler({ parser, funcName }) {
    const prevAtomType = parser.prevAtomType;
    const next = parser.gullet.future().text;
    return {
      type: "op",
      mode: parser.mode,
      limits: false,
      parentIsSupSub: false,
      symbol: false,
      stack: false,
      isFollowedByDelimiter: isDelimiter(next),
      needsLeadingSpace: prevAtomType.length > 0 && ordTypes.includes(prevAtomType),
      name: funcName
    };
  },
  mathmlBuilder: mathmlBuilder$2
});
defineFunction({
  type: "op",
  names: ["\\det", "\\gcd", "\\inf", "\\lim", "\\max", "\\min", "\\Pr", "\\sup"],
  props: {
    numArgs: 0
  },
  handler({ parser, funcName }) {
    const prevAtomType = parser.prevAtomType;
    const next = parser.gullet.future().text;
    return {
      type: "op",
      mode: parser.mode,
      limits: true,
      parentIsSupSub: false,
      symbol: false,
      stack: false,
      isFollowedByDelimiter: isDelimiter(next),
      needsLeadingSpace: prevAtomType.length > 0 && ordTypes.includes(prevAtomType),
      name: funcName
    };
  },
  mathmlBuilder: mathmlBuilder$2
});
defineFunction({
  type: "op",
  names: [
    "\\int",
    "\\iint",
    "\\iiint",
    "\\iiiint",
    "\\oint",
    "\\oiint",
    "\\oiiint",
    "\\intclockwise",
    "\\varointclockwise",
    "\\intbar",
    "\\intBar",
    "\\fint",
    "\\rppolint",
    "\\scpolint",
    "\\pointint",
    "\\sqint",
    "\\intlarhk",
    "\\intx",
    "\\intcap",
    "\\intcup",
    "\u222B",
    "\u222C",
    "\u222D",
    "\u222E",
    "\u222F",
    "\u2230",
    "\u2231",
    "\u2232",
    "\u2A0C",
    "\u2A0D",
    "\u2A0E",
    "\u2A0F",
    "\u2A12",
    "\u2A13",
    "\u2A15",
    "\u2A16",
    "\u2A17",
    "\u2A18",
    "\u2A19",
    "\u2A1A"
  ],
  props: {
    numArgs: 0
  },
  handler({ parser, funcName }) {
    let fName = funcName;
    if (fName.length === 1) {
      fName = singleCharIntegrals[fName];
    }
    return {
      type: "op",
      mode: parser.mode,
      limits: false,
      parentIsSupSub: false,
      symbol: true,
      stack: false,
      name: fName
    };
  },
  mathmlBuilder: mathmlBuilder$2
});
var mathmlBuilder$1 = (group, style) => {
  let expression = buildExpression(group.body, style.withFont("mathrm"));
  let isAllString = true;
  for (let i = 0; i < expression.length; i++) {
    let node = expression[i];
    if (node instanceof mathMLTree.MathNode) {
      if (node.type === "mrow" && node.children.length === 1 && node.children[0] instanceof mathMLTree.MathNode) {
        node = node.children[0];
      }
      switch (node.type) {
        case "mi":
        case "mn":
        case "ms":
        case "mtext":
          break;
        // Do nothing yet.
        case "mspace":
          {
            if (node.attributes.width) {
              const width = node.attributes.width.replace("em", "");
              const ch = spaceCharacter(Number(width));
              if (ch === "") {
                isAllString = false;
              } else {
                expression[i] = new mathMLTree.MathNode("mtext", [new mathMLTree.TextNode(ch)]);
              }
            }
          }
          break;
        case "mo": {
          const child = node.children[0];
          if (node.children.length === 1 && child instanceof mathMLTree.TextNode) {
            child.text = child.text.replace(/\u2212/, "-").replace(/\u2217/, "*");
          } else {
            isAllString = false;
          }
          break;
        }
        default:
          isAllString = false;
      }
    } else {
      isAllString = false;
    }
  }
  if (isAllString) {
    const word = expression.map((node) => node.toText()).join("");
    expression = [new mathMLTree.TextNode(word)];
  } else if (expression.length === 1 && ["mover", "munder"].includes(expression[0].type) && (expression[0].children[0].type === "mi" || expression[0].children[0].type === "mtext")) {
    expression[0].children[0].type = "mi";
    if (group.parentIsSupSub) {
      return new mathMLTree.MathNode("mrow", expression);
    } else {
      const operator = new mathMLTree.MathNode("mo", [makeText("\u2061", "text")]);
      return mathMLTree.newDocumentFragment([expression[0], operator]);
    }
  }
  let wrapper;
  if (isAllString) {
    wrapper = new mathMLTree.MathNode("mi", expression);
    if (expression[0].text.length === 1) {
      wrapper.setAttribute("mathvariant", "normal");
    }
  } else {
    wrapper = new mathMLTree.MathNode("mrow", expression);
  }
  if (!group.parentIsSupSub) {
    const operator = new mathMLTree.MathNode("mo", [makeText("\u2061", "text")]);
    const fragment = [wrapper, operator];
    if (group.needsLeadingSpace) {
      const space = new mathMLTree.MathNode("mspace");
      space.setAttribute("width", "0.1667em");
      fragment.unshift(space);
    }
    if (!group.isFollowedByDelimiter) {
      const trail = new mathMLTree.MathNode("mspace");
      trail.setAttribute("width", "0.1667em");
      fragment.push(trail);
    }
    return mathMLTree.newDocumentFragment(fragment);
  }
  return wrapper;
};
defineFunction({
  type: "operatorname",
  names: ["\\operatorname@", "\\operatornamewithlimits"],
  props: {
    numArgs: 1,
    allowedInArgument: true
  },
  handler: ({ parser, funcName }, args) => {
    const body = args[0];
    const prevAtomType = parser.prevAtomType;
    const next = parser.gullet.future().text;
    return {
      type: "operatorname",
      mode: parser.mode,
      body: ordargument(body),
      alwaysHandleSupSub: funcName === "\\operatornamewithlimits",
      limits: false,
      parentIsSupSub: false,
      isFollowedByDelimiter: isDelimiter(next),
      needsLeadingSpace: prevAtomType.length > 0 && ordTypes.includes(prevAtomType)
    };
  },
  mathmlBuilder: mathmlBuilder$1
});
defineMacro(
  "\\operatorname",
  "\\@ifstar\\operatornamewithlimits\\operatorname@"
);
defineFunctionBuilders({
  type: "ordgroup",
  mathmlBuilder(group, style) {
    return buildExpressionRow(group.body, style, group.semisimple);
  }
});
defineFunction({
  type: "phantom",
  names: ["\\phantom"],
  props: {
    numArgs: 1,
    allowedInText: true
  },
  handler: ({ parser }, args) => {
    const body = args[0];
    return {
      type: "phantom",
      mode: parser.mode,
      body: ordargument(body)
    };
  },
  mathmlBuilder: (group, style) => {
    const inner2 = buildExpression(group.body, style);
    return new mathMLTree.MathNode("mphantom", inner2);
  }
});
defineFunction({
  type: "hphantom",
  names: ["\\hphantom"],
  props: {
    numArgs: 1,
    allowedInText: true
  },
  handler: ({ parser }, args) => {
    const body = args[0];
    return {
      type: "hphantom",
      mode: parser.mode,
      body
    };
  },
  mathmlBuilder: (group, style) => {
    const inner2 = buildExpression(ordargument(group.body), style);
    const phantom = new mathMLTree.MathNode("mphantom", inner2);
    const node = new mathMLTree.MathNode("mpadded", [phantom]);
    node.setAttribute("height", "0px");
    node.setAttribute("depth", "0px");
    return node;
  }
});
defineFunction({
  type: "vphantom",
  names: ["\\vphantom"],
  props: {
    numArgs: 1,
    allowedInText: true
  },
  handler: ({ parser }, args) => {
    const body = args[0];
    return {
      type: "vphantom",
      mode: parser.mode,
      body
    };
  },
  mathmlBuilder: (group, style) => {
    const inner2 = buildExpression(ordargument(group.body), style);
    const phantom = new mathMLTree.MathNode("mphantom", inner2);
    const node = new mathMLTree.MathNode("mpadded", [phantom]);
    node.setAttribute("width", "0px");
    return node;
  }
});
defineFunction({
  type: "pmb",
  names: ["\\pmb"],
  props: {
    numArgs: 1,
    allowedInText: true
  },
  handler({ parser }, args) {
    return {
      type: "pmb",
      mode: parser.mode,
      body: ordargument(args[0])
    };
  },
  mathmlBuilder(group, style) {
    const inner2 = buildExpression(group.body, style);
    const node = wrapWithMstyle(inner2);
    node.setAttribute("style", "font-weight:bold");
    return node;
  }
});
var mathmlBuilder = (group, style) => {
  const newStyle = style.withLevel(StyleLevel.TEXT);
  const node = new mathMLTree.MathNode("mpadded", [buildGroup$1(group.body, newStyle)]);
  const dy = calculateSize(group.dy, style);
  node.setAttribute("voffset", dy.number + dy.unit);
  if (dy.number > 0) {
    node.style.padding = dy.number + dy.unit + " 0 0 0";
  } else {
    node.style.padding = "0 0 " + Math.abs(dy.number) + dy.unit + " 0";
  }
  return node;
};
defineFunction({
  type: "raise",
  names: ["\\raise", "\\lower"],
  props: {
    numArgs: 2,
    argTypes: ["size", "primitive"],
    primitive: true
  },
  handler({ parser, funcName }, args) {
    const amount = assertNodeType(args[0], "size").value;
    if (funcName === "\\lower") {
      amount.number *= -1;
    }
    const body = args[1];
    return {
      type: "raise",
      mode: parser.mode,
      dy: amount,
      body
    };
  },
  mathmlBuilder
});
defineFunction({
  type: "raise",
  names: ["\\raisebox"],
  props: {
    numArgs: 2,
    argTypes: ["size", "hbox"],
    allowedInText: true
  },
  handler({ parser, funcName }, args) {
    const amount = assertNodeType(args[0], "size").value;
    const body = args[1];
    return {
      type: "raise",
      mode: parser.mode,
      dy: amount,
      body
    };
  },
  mathmlBuilder
});
defineFunction({
  type: "ref",
  names: ["\\ref", "\\eqref"],
  props: {
    numArgs: 1,
    argTypes: ["raw"]
  },
  handler({ parser, funcName }, args) {
    return {
      type: "ref",
      mode: parser.mode,
      funcName,
      string: args[0].string.replace(invalidIdRegEx, "")
    };
  },
  mathmlBuilder(group, style) {
    const classes = group.funcName === "\\ref" ? ["tml-ref"] : ["tml-ref", "tml-eqref"];
    return new AnchorNode("#" + group.string, classes, null);
  }
});
defineFunction({
  type: "reflect",
  names: ["\\reflectbox"],
  props: {
    numArgs: 1,
    argTypes: ["hbox"],
    allowedInText: true
  },
  handler({ parser }, args) {
    return {
      type: "reflect",
      mode: parser.mode,
      body: args[0]
    };
  },
  mathmlBuilder(group, style) {
    const node = buildGroup$1(group.body, style);
    node.style.transform = "scaleX(-1)";
    return node;
  }
});
defineFunction({
  type: "internal",
  names: ["\\relax"],
  props: {
    numArgs: 0,
    allowedInText: true
  },
  handler({ parser }) {
    return {
      type: "internal",
      mode: parser.mode
    };
  }
});
defineFunction({
  type: "rule",
  names: ["\\rule"],
  props: {
    numArgs: 2,
    numOptionalArgs: 1,
    allowedInText: true,
    allowedInMath: true,
    argTypes: ["size", "size", "size"]
  },
  handler({ parser }, args, optArgs) {
    const shift = optArgs[0];
    const width = assertNodeType(args[0], "size");
    const height = assertNodeType(args[1], "size");
    return {
      type: "rule",
      mode: parser.mode,
      shift: shift && assertNodeType(shift, "size").value,
      width: width.value,
      height: height.value
    };
  },
  mathmlBuilder(group, style) {
    const width = calculateSize(group.width, style);
    const height = calculateSize(group.height, style);
    const shift = group.shift ? calculateSize(group.shift, style) : { number: 0, unit: "em" };
    const color = style.color && style.getColor() || "black";
    const rule = new mathMLTree.MathNode("mspace");
    if (width.number > 0 && height.number > 0) {
      rule.setAttribute("mathbackground", color);
    }
    rule.setAttribute("width", width.number + width.unit);
    rule.setAttribute("height", height.number + height.unit);
    if (shift.number === 0) {
      return rule;
    }
    const wrapper = new mathMLTree.MathNode("mpadded", [rule]);
    if (shift.number >= 0) {
      wrapper.setAttribute("height", "+" + shift.number + shift.unit);
    } else {
      wrapper.setAttribute("height", shift.number + shift.unit);
      wrapper.setAttribute("depth", "+" + -shift.number + shift.unit);
    }
    wrapper.setAttribute("voffset", shift.number + shift.unit);
    return wrapper;
  }
});
var sizeMap = {
  "\\tiny": 0.5,
  "\\sixptsize": 0.6,
  "\\Tiny": 0.6,
  "\\scriptsize": 0.7,
  "\\footnotesize": 0.8,
  "\\small": 0.9,
  "\\normalsize": 1,
  "\\large": 1.2,
  "\\Large": 1.44,
  "\\LARGE": 1.728,
  "\\huge": 2.074,
  "\\Huge": 2.488
};
defineFunction({
  type: "sizing",
  names: [
    "\\tiny",
    "\\sixptsize",
    "\\Tiny",
    "\\scriptsize",
    "\\footnotesize",
    "\\small",
    "\\normalsize",
    "\\large",
    "\\Large",
    "\\LARGE",
    "\\huge",
    "\\Huge"
  ],
  props: {
    numArgs: 0,
    allowedInText: true
  },
  handler: ({ breakOnTokenText, funcName, parser }, args) => {
    if (parser.settings.strict && parser.mode === "math") {
      console.log(`Temml strict-mode warning: Command ${funcName} is invalid in math mode.`);
    }
    const body = parser.parseExpression(false, breakOnTokenText, true);
    return {
      type: "sizing",
      mode: parser.mode,
      funcName,
      body
    };
  },
  mathmlBuilder: (group, style) => {
    const newStyle = style.withFontSize(sizeMap[group.funcName]);
    const inner2 = buildExpression(group.body, newStyle);
    const node = wrapWithMstyle(inner2);
    const factor = (sizeMap[group.funcName] / style.fontSize).toFixed(4);
    node.setAttribute("mathsize", factor + "em");
    return node;
  }
});
defineFunction({
  type: "smash",
  names: ["\\smash"],
  props: {
    numArgs: 1,
    numOptionalArgs: 1,
    allowedInText: true
  },
  handler: ({ parser }, args, optArgs) => {
    let smashHeight = false;
    let smashDepth = false;
    const tbArg = optArgs[0] && assertNodeType(optArgs[0], "ordgroup");
    if (tbArg) {
      let letter = "";
      for (let i = 0; i < tbArg.body.length; ++i) {
        const node = tbArg.body[i];
        letter = node.text;
        if (letter === "t") {
          smashHeight = true;
        } else if (letter === "b") {
          smashDepth = true;
        } else {
          smashHeight = false;
          smashDepth = false;
          break;
        }
      }
    } else {
      smashHeight = true;
      smashDepth = true;
    }
    const body = args[0];
    return {
      type: "smash",
      mode: parser.mode,
      body,
      smashHeight,
      smashDepth
    };
  },
  mathmlBuilder: (group, style) => {
    const node = new mathMLTree.MathNode("mpadded", [buildGroup$1(group.body, style)]);
    if (group.smashHeight) {
      node.setAttribute("height", "0px");
    }
    if (group.smashDepth) {
      node.setAttribute("depth", "0px");
    }
    return node;
  }
});
defineFunction({
  type: "sqrt",
  names: ["\\sqrt"],
  props: {
    numArgs: 1,
    numOptionalArgs: 1
  },
  handler({ parser }, args, optArgs) {
    const index = optArgs[0];
    const body = args[0];
    return {
      type: "sqrt",
      mode: parser.mode,
      body,
      index
    };
  },
  mathmlBuilder(group, style) {
    const { body, index } = group;
    return index ? new mathMLTree.MathNode("mroot", [
      buildGroup$1(body, style),
      buildGroup$1(index, style.incrementLevel())
    ]) : new mathMLTree.MathNode("msqrt", [buildGroup$1(body, style)]);
  }
});
var styleMap = {
  display: 0,
  text: 1,
  script: 2,
  scriptscript: 3
};
var styleAttributes = {
  display: ["0", "true"],
  text: ["0", "false"],
  script: ["1", "false"],
  scriptscript: ["2", "false"]
};
defineFunction({
  type: "styling",
  names: ["\\displaystyle", "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle"],
  props: {
    numArgs: 0,
    allowedInText: true,
    primitive: true
  },
  handler({ breakOnTokenText, funcName, parser }, args) {
    const body = parser.parseExpression(true, breakOnTokenText, true);
    const scriptLevel2 = funcName.slice(1, funcName.length - 5);
    return {
      type: "styling",
      mode: parser.mode,
      // Figure out what scriptLevel to use by pulling out the scriptLevel from
      // the function name
      scriptLevel: scriptLevel2,
      body
    };
  },
  mathmlBuilder(group, style) {
    const newStyle = style.withLevel(styleMap[group.scriptLevel]);
    const inner2 = buildExpression(group.body, newStyle);
    const node = wrapWithMstyle(inner2);
    const attr = styleAttributes[group.scriptLevel];
    node.setAttribute("scriptlevel", attr[0]);
    node.setAttribute("displaystyle", attr[1]);
    return node;
  }
});
var symbolRegEx = /^m(over|under|underover)$/;
defineFunctionBuilders({
  type: "supsub",
  mathmlBuilder(group, style) {
    let isBrace = false;
    let isOver;
    let isSup;
    let appendApplyFunction = false;
    let appendSpace = false;
    let needsLeadingSpace = false;
    if (group.base && group.base.type === "horizBrace") {
      isSup = !!group.sup;
      if (isSup === group.base.isOver) {
        isBrace = true;
        isOver = group.base.isOver;
      }
    }
    if (group.base && !group.base.stack && (group.base.type === "op" || group.base.type === "operatorname")) {
      group.base.parentIsSupSub = true;
      appendApplyFunction = !group.base.symbol;
      appendSpace = appendApplyFunction && !group.isFollowedByDelimiter;
      needsLeadingSpace = group.base.needsLeadingSpace;
    }
    const children = group.base && group.base.stack ? [buildGroup$1(group.base.body[0], style)] : [buildGroup$1(group.base, style)];
    const childStyle = style.inSubOrSup();
    if (group.sub) {
      const sub = buildGroup$1(group.sub, childStyle);
      if (style.level === 3) {
        sub.setAttribute("scriptlevel", "2");
      }
      children.push(sub);
    }
    if (group.sup) {
      const sup = buildGroup$1(group.sup, childStyle);
      if (style.level === 3) {
        sup.setAttribute("scriptlevel", "2");
      }
      const testNode = sup.type === "mrow" ? sup.children[0] : sup;
      if (testNode && testNode.type === "mo" && testNode.classes.includes("tml-prime") && group.base && group.base.text && "fF".indexOf(group.base.text) > -1) {
        testNode.classes.push("prime-pad");
      }
      children.push(sup);
    }
    let nodeType;
    if (isBrace) {
      nodeType = isOver ? "mover" : "munder";
    } else if (!group.sub) {
      const base = group.base;
      if (base && base.type === "op" && base.limits && (style.level === StyleLevel.DISPLAY || base.alwaysHandleSupSub)) {
        nodeType = "mover";
      } else if (base && base.type === "operatorname" && base.alwaysHandleSupSub && (base.limits || style.level === StyleLevel.DISPLAY)) {
        nodeType = "mover";
      } else {
        nodeType = "msup";
      }
    } else if (!group.sup) {
      const base = group.base;
      if (base && base.type === "op" && base.limits && (style.level === StyleLevel.DISPLAY || base.alwaysHandleSupSub)) {
        nodeType = "munder";
      } else if (base && base.type === "operatorname" && base.alwaysHandleSupSub && (base.limits || style.level === StyleLevel.DISPLAY)) {
        nodeType = "munder";
      } else {
        nodeType = "msub";
      }
    } else {
      const base = group.base;
      if (base && (base.type === "op" && base.limits || base.type === "multiscript") && (style.level === StyleLevel.DISPLAY || base.alwaysHandleSupSub)) {
        nodeType = "munderover";
      } else if (base && base.type === "operatorname" && base.alwaysHandleSupSub && (style.level === StyleLevel.DISPLAY || base.limits)) {
        nodeType = "munderover";
      } else {
        nodeType = "msubsup";
      }
    }
    let node = new mathMLTree.MathNode(nodeType, children);
    if (appendApplyFunction) {
      const operator = new mathMLTree.MathNode("mo", [makeText("\u2061", "text")]);
      if (needsLeadingSpace) {
        const space = new mathMLTree.MathNode("mspace");
        space.setAttribute("width", "0.1667em");
        node = mathMLTree.newDocumentFragment([space, node, operator]);
      } else {
        node = mathMLTree.newDocumentFragment([node, operator]);
      }
      if (appendSpace) {
        const space = new mathMLTree.MathNode("mspace");
        space.setAttribute("width", "0.1667em");
        node.children.push(space);
      }
    } else if (symbolRegEx.test(nodeType)) {
      node = new mathMLTree.MathNode("mrow", [node]);
    }
    return node;
  }
});
var short = [
  "\\shortmid",
  "\\nshortmid",
  "\\shortparallel",
  "\\nshortparallel",
  "\\smallsetminus"
];
var arrows = ["\\Rsh", "\\Lsh", "\\restriction"];
var isArrow = (str) => {
  if (str.length === 1) {
    const codePoint = str.codePointAt(0);
    return 8591 < codePoint && codePoint < 8704;
  }
  return str.indexOf("arrow") > -1 || str.indexOf("harpoon") > -1 || arrows.includes(str);
};
defineFunctionBuilders({
  type: "atom",
  mathmlBuilder(group, style) {
    const node = new mathMLTree.MathNode("mo", [makeText(group.text, group.mode)]);
    if (group.family === "punct") {
      node.setAttribute("separator", "true");
    } else if (group.family === "open" || group.family === "close") {
      if (group.family === "open") {
        node.setAttribute("form", "prefix");
        node.setAttribute("stretchy", "false");
      } else if (group.family === "close") {
        node.setAttribute("form", "postfix");
        node.setAttribute("stretchy", "false");
      }
    } else if (group.text === "\\mid") {
      node.setAttribute("lspace", "0.22em");
      node.setAttribute("rspace", "0.22em");
      node.setAttribute("stretchy", "false");
    } else if (group.family === "rel" && isArrow(group.text)) {
      node.setAttribute("stretchy", "false");
    } else if (short.includes(group.text)) {
      node.setAttribute("mathsize", "70%");
    } else if (group.text === ":") {
      node.attributes.lspace = "0.2222em";
      node.attributes.rspace = "0.2222em";
    }
    return node;
  }
});
var fontMap = {
  // styles
  mathbf: "bold",
  mathrm: "normal",
  textit: "italic",
  mathit: "italic",
  mathnormal: "italic",
  // families
  mathbb: "double-struck",
  mathcal: "script",
  mathfrak: "fraktur",
  mathscr: "script",
  mathsf: "sans-serif",
  mathtt: "monospace"
};
var getVariant = function(group, style) {
  if (style.fontFamily === "texttt") {
    return "monospace";
  } else if (style.fontFamily === "textsc") {
    return "normal";
  } else if (style.fontFamily === "textsf") {
    if (style.fontShape === "textit" && style.fontWeight === "textbf") {
      return "sans-serif-bold-italic";
    } else if (style.fontShape === "textit") {
      return "sans-serif-italic";
    } else if (style.fontWeight === "textbf") {
      return "sans-serif-bold";
    } else {
      return "sans-serif";
    }
  } else if (style.fontShape === "textit" && style.fontWeight === "textbf") {
    return "bold-italic";
  } else if (style.fontShape === "textit") {
    return "italic";
  } else if (style.fontWeight === "textbf") {
    return "bold";
  }
  const font = style.font;
  if (!font || font === "mathnormal") {
    return null;
  }
  const mode = group.mode;
  switch (font) {
    case "mathit":
      return "italic";
    case "mathrm": {
      const codePoint = group.text.codePointAt(0);
      return 939 < codePoint && codePoint < 975 ? "italic" : "normal";
    }
    case "greekItalic":
      return "italic";
    case "up@greek":
      return "normal";
    case "boldsymbol":
    case "mathboldsymbol":
      return "bold-italic";
    case "mathbf":
      return "bold";
    case "mathbb":
      return "double-struck";
    case "mathfrak":
      return "fraktur";
    case "mathscr":
    case "mathcal":
      return "script";
    case "mathsf":
      return "sans-serif";
    case "mathsfit":
      return "sans-serif-italic";
    case "mathtt":
      return "monospace";
  }
  let text2 = group.text;
  if (symbols[mode][text2] && symbols[mode][text2].replace) {
    text2 = symbols[mode][text2].replace;
  }
  return Object.prototype.hasOwnProperty.call(fontMap, font) ? fontMap[font] : null;
};
var script = Object.freeze({
  B: 8426,
  // Offset from ASCII B to Unicode script B
  E: 8427,
  F: 8427,
  H: 8387,
  I: 8391,
  L: 8390,
  M: 8422,
  R: 8393,
  e: 8394,
  g: 8355,
  o: 8389
});
var frak = Object.freeze({
  C: 8426,
  H: 8388,
  I: 8392,
  R: 8394,
  Z: 8398
});
var bbb = Object.freeze({
  C: 8383,
  // blackboard bold
  H: 8389,
  N: 8391,
  P: 8393,
  Q: 8393,
  R: 8395,
  Z: 8394
});
var bold = Object.freeze({
  "\u03F5": 119527,
  // lunate epsilon
  "\u03D1": 119564,
  // vartheta
  "\u03F0": 119534,
  // varkappa
  "\u03C6": 119577,
  // varphi
  "\u03F1": 119535,
  // varrho
  "\u03D6": 119563
  // varpi
});
var boldItalic = Object.freeze({
  "\u03F5": 119643,
  // lunate epsilon
  "\u03D1": 119680,
  // vartheta
  "\u03F0": 119650,
  // varkappa
  "\u03C6": 119693,
  // varphi
  "\u03F1": 119651,
  // varrho
  "\u03D6": 119679
  // varpi
});
var boldsf = Object.freeze({
  "\u03F5": 119701,
  // lunate epsilon
  "\u03D1": 119738,
  // vartheta
  "\u03F0": 119708,
  // varkappa
  "\u03C6": 119751,
  // varphi
  "\u03F1": 119709,
  // varrho
  "\u03D6": 119737
  // varpi
});
var bisf = Object.freeze({
  "\u03F5": 119759,
  // lunate epsilon
  "\u03D1": 119796,
  // vartheta
  "\u03F0": 119766,
  // varkappa
  "\u03C6": 119809,
  // varphi
  "\u03F1": 119767,
  // varrho
  "\u03D6": 119795
  // varpi
});
var offset = Object.freeze({
  upperCaseLatin: {
    // A-Z
    "normal": (ch) => {
      return 0;
    },
    "bold": (ch) => {
      return 119743;
    },
    "italic": (ch) => {
      return 119795;
    },
    "bold-italic": (ch) => {
      return 119847;
    },
    "script": (ch) => {
      return script[ch] || 119899;
    },
    "script-bold": (ch) => {
      return 119951;
    },
    "fraktur": (ch) => {
      return frak[ch] || 120003;
    },
    "fraktur-bold": (ch) => {
      return 120107;
    },
    "double-struck": (ch) => {
      return bbb[ch] || 120055;
    },
    "sans-serif": (ch) => {
      return 120159;
    },
    "sans-serif-bold": (ch) => {
      return 120211;
    },
    "sans-serif-italic": (ch) => {
      return 120263;
    },
    "sans-serif-bold-italic": (ch) => {
      return 120380;
    },
    "monospace": (ch) => {
      return 120367;
    }
  },
  lowerCaseLatin: {
    // a-z
    "normal": (ch) => {
      return 0;
    },
    "bold": (ch) => {
      return 119737;
    },
    "italic": (ch) => {
      return ch === "h" ? 8358 : 119789;
    },
    "bold-italic": (ch) => {
      return 119841;
    },
    "script": (ch) => {
      return script[ch] || 119893;
    },
    "script-bold": (ch) => {
      return 119945;
    },
    "fraktur": (ch) => {
      return 119997;
    },
    "fraktur-bold": (ch) => {
      return 120101;
    },
    "double-struck": (ch) => {
      return 120049;
    },
    "sans-serif": (ch) => {
      return 120153;
    },
    "sans-serif-bold": (ch) => {
      return 120205;
    },
    "sans-serif-italic": (ch) => {
      return 120257;
    },
    "sans-serif-bold-italic": (ch) => {
      return 120309;
    },
    "monospace": (ch) => {
      return 120361;
    }
  },
  upperCaseGreek: {
    // A-Î©
    "normal": (ch) => {
      return 0;
    },
    "bold": (ch) => {
      return 119575;
    },
    "italic": (ch) => {
      return 119633;
    },
    // \boldsymbol actually returns upright bold for upperCaseGreek
    "bold-italic": (ch) => {
      return 119575;
    },
    "script": (ch) => {
      return 0;
    },
    "script-bold": (ch) => {
      return 0;
    },
    "fraktur": (ch) => {
      return 0;
    },
    "fraktur-bold": (ch) => {
      return 0;
    },
    "double-struck": (ch) => {
      return 0;
    },
    // Unicode has no code points for regular-weight san-serif Greek. Use bold.
    "sans-serif": (ch) => {
      return 119749;
    },
    "sans-serif-bold": (ch) => {
      return 119749;
    },
    "sans-serif-italic": (ch) => {
      return 0;
    },
    "sans-serif-bold-italic": (ch) => {
      return 119807;
    },
    "monospace": (ch) => {
      return 0;
    }
  },
  lowerCaseGreek: {
    // Î±-Ï‰
    "normal": (ch) => {
      return 0;
    },
    "bold": (ch) => {
      return 119569;
    },
    "italic": (ch) => {
      return 119627;
    },
    "bold-italic": (ch) => {
      return ch === "\u03D5" ? 119678 : 119685;
    },
    "script": (ch) => {
      return 0;
    },
    "script-bold": (ch) => {
      return 0;
    },
    "fraktur": (ch) => {
      return 0;
    },
    "fraktur-bold": (ch) => {
      return 0;
    },
    "double-struck": (ch) => {
      return 0;
    },
    // Unicode has no code points for regular-weight san-serif Greek. Use bold.
    "sans-serif": (ch) => {
      return 119743;
    },
    "sans-serif-bold": (ch) => {
      return 119743;
    },
    "sans-serif-italic": (ch) => {
      return 0;
    },
    "sans-serif-bold-italic": (ch) => {
      return 119801;
    },
    "monospace": (ch) => {
      return 0;
    }
  },
  varGreek: {
    // \varGamma, etc
    "normal": (ch) => {
      return 0;
    },
    "bold": (ch) => {
      return bold[ch] || -51;
    },
    "italic": (ch) => {
      return 0;
    },
    "bold-italic": (ch) => {
      return boldItalic[ch] || 58;
    },
    "script": (ch) => {
      return 0;
    },
    "script-bold": (ch) => {
      return 0;
    },
    "fraktur": (ch) => {
      return 0;
    },
    "fraktur-bold": (ch) => {
      return 0;
    },
    "double-struck": (ch) => {
      return 0;
    },
    "sans-serif": (ch) => {
      return boldsf[ch] || 116;
    },
    "sans-serif-bold": (ch) => {
      return boldsf[ch] || 116;
    },
    "sans-serif-italic": (ch) => {
      return 0;
    },
    "sans-serif-bold-italic": (ch) => {
      return bisf[ch] || 174;
    },
    "monospace": (ch) => {
      return 0;
    }
  },
  numeral: {
    // 0-9
    "normal": (ch) => {
      return 0;
    },
    "bold": (ch) => {
      return 120734;
    },
    "italic": (ch) => {
      return 0;
    },
    "bold-italic": (ch) => {
      return 0;
    },
    "script": (ch) => {
      return 0;
    },
    "script-bold": (ch) => {
      return 0;
    },
    "fraktur": (ch) => {
      return 0;
    },
    "fraktur-bold": (ch) => {
      return 0;
    },
    "double-struck": (ch) => {
      return 120744;
    },
    "sans-serif": (ch) => {
      return 120754;
    },
    "sans-serif-bold": (ch) => {
      return 120764;
    },
    "sans-serif-italic": (ch) => {
      return 0;
    },
    "sans-serif-bold-italic": (ch) => {
      return 0;
    },
    "monospace": (ch) => {
      return 120774;
    }
  }
});
var variantChar = (ch, variant) => {
  const codePoint = ch.codePointAt(0);
  const block = 64 < codePoint && codePoint < 91 ? "upperCaseLatin" : 96 < codePoint && codePoint < 123 ? "lowerCaseLatin" : 912 < codePoint && codePoint < 938 ? "upperCaseGreek" : 944 < codePoint && codePoint < 970 || ch === "\u03D5" ? "lowerCaseGreek" : 120545 < codePoint && codePoint < 120572 || bold[ch] ? "varGreek" : 47 < codePoint && codePoint < 58 ? "numeral" : "other";
  return block === "other" ? ch : String.fromCodePoint(codePoint + offset[block][variant](ch));
};
var smallCaps = Object.freeze({
  a: "\u1D00",
  b: "\u0299",
  c: "\u1D04",
  d: "\u1D05",
  e: "\u1D07",
  f: "\uA730",
  g: "\u0262",
  h: "\u029C",
  i: "\u026A",
  j: "\u1D0A",
  k: "\u1D0B",
  l: "\u029F",
  m: "\u1D0D",
  n: "\u0274",
  o: "\u1D0F",
  p: "\u1D18",
  q: "\u01EB",
  r: "\u0280",
  s: "s",
  t: "\u1D1B",
  u: "\u1D1C",
  v: "\u1D20",
  w: "\u1D21",
  x: "x",
  y: "\u028F",
  z: "\u1D22"
});
var numberRegEx = /^\d(?:[\d,.]*\d)?$/;
var latinRegEx = /[A-Ba-z]/;
var primes = /* @__PURE__ */ new Set([
  "\\prime",
  "\\dprime",
  "\\trprime",
  "\\qprime",
  "\\backprime",
  "\\backdprime",
  "\\backtrprime"
]);
var italicNumber = (text2, variant, tag) => {
  const mn = new mathMLTree.MathNode(tag, [text2]);
  const wrapper = new mathMLTree.MathNode("mstyle", [mn]);
  wrapper.style["font-style"] = "italic";
  wrapper.style["font-family"] = "Cambria, 'Times New Roman', serif";
  if (variant === "bold-italic") {
    wrapper.style["font-weight"] = "bold";
  }
  return wrapper;
};
defineFunctionBuilders({
  type: "mathord",
  mathmlBuilder(group, style) {
    const text2 = makeText(group.text, group.mode, style);
    const codePoint = text2.text.codePointAt(0);
    const defaultVariant = 912 < codePoint && codePoint < 938 ? "normal" : "italic";
    const variant = getVariant(group, style) || defaultVariant;
    if (variant === "script") {
      text2.text = variantChar(text2.text, variant);
      return new mathMLTree.MathNode("mi", [text2], [style.font]);
    } else if (variant !== "italic") {
      text2.text = variantChar(text2.text, variant);
    }
    let node = new mathMLTree.MathNode("mi", [text2]);
    if (variant === "normal") {
      node.setAttribute("mathvariant", "normal");
      if (text2.text.length === 1) {
        node = new mathMLTree.MathNode("mrow", [node]);
      }
    }
    return node;
  }
});
defineFunctionBuilders({
  type: "textord",
  mathmlBuilder(group, style) {
    let ch = group.text;
    const codePoint = ch.codePointAt(0);
    if (style.fontFamily === "textsc") {
      if (96 < codePoint && codePoint < 123) {
        ch = smallCaps[ch];
      }
    }
    const text2 = makeText(ch, group.mode, style);
    const variant = getVariant(group, style) || "normal";
    let node;
    if (numberRegEx.test(group.text)) {
      const tag = group.mode === "text" ? "mtext" : "mn";
      if (variant === "italic" || variant === "bold-italic") {
        return italicNumber(text2, variant, tag);
      } else {
        if (variant !== "normal") {
          text2.text = text2.text.split("").map((c) => variantChar(c, variant)).join("");
        }
        node = new mathMLTree.MathNode(tag, [text2]);
      }
    } else if (group.mode === "text") {
      if (variant !== "normal") {
        text2.text = variantChar(text2.text, variant);
      }
      node = new mathMLTree.MathNode("mtext", [text2]);
    } else if (primes.has(group.text)) {
      node = new mathMLTree.MathNode("mo", [text2]);
      node.classes.push("tml-prime");
    } else {
      const origText = text2.text;
      if (variant !== "italic") {
        text2.text = variantChar(text2.text, variant);
      }
      node = new mathMLTree.MathNode("mi", [text2]);
      if (text2.text === origText && latinRegEx.test(origText)) {
        node.setAttribute("mathvariant", "italic");
      }
    }
    return node;
  }
});
var cssSpace = {
  "\\nobreak": "nobreak",
  "\\allowbreak": "allowbreak"
};
var regularSpace = {
  " ": {},
  "\\ ": {},
  "~": {
    className: "nobreak"
  },
  "\\space": {},
  "\\nobreakspace": {
    className: "nobreak"
  }
};
defineFunctionBuilders({
  type: "spacing",
  mathmlBuilder(group, style) {
    let node;
    if (Object.prototype.hasOwnProperty.call(regularSpace, group.text)) {
      node = new mathMLTree.MathNode("mtext", [new mathMLTree.TextNode("\xA0")]);
    } else if (Object.prototype.hasOwnProperty.call(cssSpace, group.text)) {
      node = new mathMLTree.MathNode("mo");
      if (group.text === "\\nobreak") {
        node.setAttribute("linebreak", "nobreak");
      }
    } else {
      throw new ParseError(`Unknown type of space "${group.text}"`);
    }
    return node;
  }
});
defineFunctionBuilders({
  type: "tag"
});
var textFontFamilies = {
  "\\text": void 0,
  "\\textrm": "textrm",
  "\\textsf": "textsf",
  "\\texttt": "texttt",
  "\\textnormal": "textrm",
  "\\textsc": "textsc"
  // small caps
};
var textFontWeights = {
  "\\textbf": "textbf",
  "\\textmd": "textmd"
};
var textFontShapes = {
  "\\textit": "textit",
  "\\textup": "textup"
};
var styleWithFont = (group, style) => {
  const font = group.font;
  if (!font) {
    return style;
  } else if (textFontFamilies[font]) {
    return style.withTextFontFamily(textFontFamilies[font]);
  } else if (textFontWeights[font]) {
    return style.withTextFontWeight(textFontWeights[font]);
  } else if (font === "\\emph") {
    return style.fontShape === "textit" ? style.withTextFontShape("textup") : style.withTextFontShape("textit");
  }
  return style.withTextFontShape(textFontShapes[font]);
};
defineFunction({
  type: "text",
  names: [
    // Font families
    "\\text",
    "\\textrm",
    "\\textsf",
    "\\texttt",
    "\\textnormal",
    "\\textsc",
    // Font weights
    "\\textbf",
    "\\textmd",
    // Font Shapes
    "\\textit",
    "\\textup",
    "\\emph"
  ],
  props: {
    numArgs: 1,
    argTypes: ["text"],
    allowedInArgument: true,
    allowedInText: true
  },
  handler({ parser, funcName }, args) {
    const body = args[0];
    return {
      type: "text",
      mode: parser.mode,
      body: ordargument(body),
      font: funcName
    };
  },
  mathmlBuilder(group, style) {
    const newStyle = styleWithFont(group, style);
    const mrow = buildExpressionRow(group.body, newStyle);
    return consolidateText(mrow);
  }
});
defineFunction({
  type: "vcenter",
  names: ["\\vcenter"],
  props: {
    numArgs: 1,
    argTypes: ["original"],
    allowedInText: false
  },
  handler({ parser }, args) {
    return {
      type: "vcenter",
      mode: parser.mode,
      body: args[0]
    };
  },
  mathmlBuilder(group, style) {
    const mtd = new mathMLTree.MathNode("mtd", [buildGroup$1(group.body, style)]);
    mtd.style.padding = "0";
    const mtr = new mathMLTree.MathNode("mtr", [mtd]);
    return new mathMLTree.MathNode("mtable", [mtr]);
  }
});
defineFunction({
  type: "verb",
  names: ["\\verb"],
  props: {
    numArgs: 0,
    allowedInText: true
  },
  handler(context, args, optArgs) {
    throw new ParseError("\\verb ended by end of line instead of matching delimiter");
  },
  mathmlBuilder(group, style) {
    const text2 = new mathMLTree.TextNode(makeVerb(group));
    const node = new mathMLTree.MathNode("mtext", [text2]);
    node.setAttribute("mathvariant", "monospace");
    return node;
  }
});
var makeVerb = (group) => group.body.replace(/ /g, group.star ? "\u2423" : "\xA0");
var functions = _functions;
var spaceRegexString = "[ \r\n	]";
var controlWordRegexString = "\\\\[a-zA-Z@]+";
var controlSymbolRegexString = "\\\\[^\uD800-\uDFFF]";
var controlWordWhitespaceRegexString = `(${controlWordRegexString})${spaceRegexString}*`;
var controlSpaceRegexString = "\\\\(\n|[ \r	]+\n?)[ \r	]*";
var combiningDiacriticalMarkString = "[\u0300-\u036F]";
var combiningDiacriticalMarksEndRegex = new RegExp(`${combiningDiacriticalMarkString}+$`);
var tokenRegexString = `(${spaceRegexString}+)|${controlSpaceRegexString}|([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]${combiningDiacriticalMarkString}*|[\uD800-\uDBFF][\uDC00-\uDFFF]${combiningDiacriticalMarkString}*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|${controlWordWhitespaceRegexString}|${controlSymbolRegexString})`;
var Lexer = class {
  constructor(input, settings) {
    this.input = input;
    this.settings = settings;
    this.tokenRegex = new RegExp(tokenRegexString, "g");
    this.catcodes = {
      "%": 14,
      // comment character
      "~": 13
      // active character
    };
  }
  setCatcode(char, code) {
    this.catcodes[char] = code;
  }
  /**
   * This function lexes a single token.
   */
  lex() {
    const input = this.input;
    const pos = this.tokenRegex.lastIndex;
    if (pos === input.length) {
      return new Token("EOF", new SourceLocation(this, pos, pos));
    }
    const match = this.tokenRegex.exec(input);
    if (match === null || match.index !== pos) {
      throw new ParseError(
        `Unexpected character: '${input[pos]}'`,
        new Token(input[pos], new SourceLocation(this, pos, pos + 1))
      );
    }
    const text2 = match[6] || match[3] || (match[2] ? "\\ " : " ");
    if (this.catcodes[text2] === 14) {
      const nlIndex = input.indexOf("\n", this.tokenRegex.lastIndex);
      if (nlIndex === -1) {
        this.tokenRegex.lastIndex = input.length;
        if (this.settings.strict) {
          throw new ParseError("% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode");
        }
      } else {
        this.tokenRegex.lastIndex = nlIndex + 1;
      }
      return this.lex();
    }
    return new Token(text2, new SourceLocation(this, pos, this.tokenRegex.lastIndex));
  }
};
var Namespace = class {
  /**
   * Both arguments are optional.  The first argument is an object of
   * built-in mappings which never change.  The second argument is an object
   * of initial (global-level) mappings, which will constantly change
   * according to any global/top-level `set`s done.
   */
  constructor(builtins = {}, globalMacros = {}) {
    this.current = globalMacros;
    this.builtins = builtins;
    this.undefStack = [];
  }
  /**
   * Start a new nested group, affecting future local `set`s.
   */
  beginGroup() {
    this.undefStack.push({});
  }
  /**
   * End current nested group, restoring values before the group began.
   */
  endGroup() {
    if (this.undefStack.length === 0) {
      throw new ParseError(
        "Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug"
      );
    }
    const undefs = this.undefStack.pop();
    for (const undef in undefs) {
      if (Object.prototype.hasOwnProperty.call(undefs, undef)) {
        if (undefs[undef] === void 0) {
          delete this.current[undef];
        } else {
          this.current[undef] = undefs[undef];
        }
      }
    }
  }
  /**
   * Detect whether `name` has a definition.  Equivalent to
   * `get(name) != null`.
   */
  has(name) {
    return Object.prototype.hasOwnProperty.call(this.current, name) || Object.prototype.hasOwnProperty.call(this.builtins, name);
  }
  /**
   * Get the current value of a name, or `undefined` if there is no value.
   *
   * Note: Do not use `if (namespace.get(...))` to detect whether a macro
   * is defined, as the definition may be the empty string which evaluates
   * to `false` in JavaScript.  Use `if (namespace.get(...) != null)` or
   * `if (namespace.has(...))`.
   */
  get(name) {
    if (Object.prototype.hasOwnProperty.call(this.current, name)) {
      return this.current[name];
    } else {
      return this.builtins[name];
    }
  }
  /**
   * Set the current value of a name, and optionally set it globally too.
   * Local set() sets the current value and (when appropriate) adds an undo
   * operation to the undo stack.  Global set() may change the undo
   * operation at every level, so takes time linear in their number.
   */
  set(name, value, global = false) {
    if (global) {
      for (let i = 0; i < this.undefStack.length; i++) {
        delete this.undefStack[i][name];
      }
      if (this.undefStack.length > 0) {
        this.undefStack[this.undefStack.length - 1][name] = value;
      }
    } else {
      const top = this.undefStack[this.undefStack.length - 1];
      if (top && !Object.prototype.hasOwnProperty.call(top, name)) {
        top[name] = this.current[name];
      }
    }
    this.current[name] = value;
  }
};
var implicitCommands = {
  "^": true,
  // Parser.js
  _: true,
  // Parser.js
  "\\limits": true,
  // Parser.js
  "\\nolimits": true
  // Parser.js
};
var MacroExpander = class {
  constructor(input, settings, mode) {
    this.settings = settings;
    this.expansionCount = 0;
    this.feed(input);
    this.macros = new Namespace(macros, settings.macros);
    this.mode = mode;
    this.stack = [];
  }
  /**
   * Feed a new input string to the same MacroExpander
   * (with existing macros etc.).
   */
  feed(input) {
    this.lexer = new Lexer(input, this.settings);
  }
  /**
   * Switches between "text" and "math" modes.
   */
  switchMode(newMode) {
    this.mode = newMode;
  }
  /**
   * Start a new group nesting within all namespaces.
   */
  beginGroup() {
    this.macros.beginGroup();
  }
  /**
   * End current group nesting within all namespaces.
   */
  endGroup() {
    this.macros.endGroup();
  }
  /**
   * Returns the topmost token on the stack, without expanding it.
   * Similar in behavior to TeX's `\futurelet`.
   */
  future() {
    if (this.stack.length === 0) {
      this.pushToken(this.lexer.lex());
    }
    return this.stack[this.stack.length - 1];
  }
  /**
   * Remove and return the next unexpanded token.
   */
  popToken() {
    this.future();
    return this.stack.pop();
  }
  /**
   * Add a given token to the token stack.  In particular, this get be used
   * to put back a token returned from one of the other methods.
   */
  pushToken(token) {
    this.stack.push(token);
  }
  /**
   * Append an array of tokens to the token stack.
   */
  pushTokens(tokens) {
    this.stack.push(...tokens);
  }
  /**
   * Find an macro argument without expanding tokens and append the array of
   * tokens to the token stack. Uses Token as a container for the result.
   */
  scanArgument(isOptional) {
    let start;
    let end;
    let tokens;
    if (isOptional) {
      this.consumeSpaces();
      if (this.future().text !== "[") {
        return null;
      }
      start = this.popToken();
      ({ tokens, end } = this.consumeArg(["]"]));
    } else {
      ({ tokens, start, end } = this.consumeArg());
    }
    this.pushToken(new Token("EOF", end.loc));
    this.pushTokens(tokens);
    return start.range(end, "");
  }
  /**
   * Consume all following space tokens, without expansion.
   */
  consumeSpaces() {
    for (; ; ) {
      const token = this.future();
      if (token.text === " ") {
        this.stack.pop();
      } else {
        break;
      }
    }
  }
  /**
   * Consume an argument from the token stream, and return the resulting array
   * of tokens and start/end token.
   */
  consumeArg(delims) {
    const tokens = [];
    const isDelimited = delims && delims.length > 0;
    if (!isDelimited) {
      this.consumeSpaces();
    }
    const start = this.future();
    let tok;
    let depth = 0;
    let match = 0;
    do {
      tok = this.popToken();
      tokens.push(tok);
      if (tok.text === "{") {
        ++depth;
      } else if (tok.text === "}") {
        --depth;
        if (depth === -1) {
          throw new ParseError("Extra }", tok);
        }
      } else if (tok.text === "EOF") {
        throw new ParseError(
          "Unexpected end of input in a macro argument, expected '" + (delims && isDelimited ? delims[match] : "}") + "'",
          tok
        );
      }
      if (delims && isDelimited) {
        if ((depth === 0 || depth === 1 && delims[match] === "{") && tok.text === delims[match]) {
          ++match;
          if (match === delims.length) {
            tokens.splice(-match, match);
            break;
          }
        } else {
          match = 0;
        }
      }
    } while (depth !== 0 || isDelimited);
    if (start.text === "{" && tokens[tokens.length - 1].text === "}") {
      tokens.pop();
      tokens.shift();
    }
    tokens.reverse();
    return { tokens, start, end: tok };
  }
  /**
   * Consume the specified number of (delimited) arguments from the token
   * stream and return the resulting array of arguments.
   */
  consumeArgs(numArgs, delimiters2) {
    if (delimiters2) {
      if (delimiters2.length !== numArgs + 1) {
        throw new ParseError("The length of delimiters doesn't match the number of args!");
      }
      const delims = delimiters2[0];
      for (let i = 0; i < delims.length; i++) {
        const tok = this.popToken();
        if (delims[i] !== tok.text) {
          throw new ParseError("Use of the macro doesn't match its definition", tok);
        }
      }
    }
    const args = [];
    for (let i = 0; i < numArgs; i++) {
      args.push(this.consumeArg(delimiters2 && delimiters2[i + 1]).tokens);
    }
    return args;
  }
  /**
   * Expand the next token only once if possible.
   *
   * If the token is expanded, the resulting tokens will be pushed onto
   * the stack in reverse order, and the number of such tokens will be
   * returned.  This number might be zero or positive.
   *
   * If not, the return value is `false`, and the next token remains at the
   * top of the stack.
   *
   * In either case, the next token will be on the top of the stack,
   * or the stack will be empty (in case of empty expansion
   * and no other tokens).
   *
   * Used to implement `expandAfterFuture` and `expandNextToken`.
   *
   * If expandableOnly, only expandable tokens are expanded and
   * an undefined control sequence results in an error.
   */
  expandOnce(expandableOnly) {
    const topToken = this.popToken();
    const name = topToken.text;
    const expansion = !topToken.noexpand ? this._getExpansion(name) : null;
    if (expansion == null || expandableOnly && expansion.unexpandable) {
      if (expandableOnly && expansion == null && name[0] === "\\" && !this.isDefined(name)) {
        throw new ParseError("Undefined control sequence: " + name);
      }
      this.pushToken(topToken);
      return false;
    }
    this.expansionCount++;
    if (this.expansionCount > this.settings.maxExpand) {
      throw new ParseError(
        "Too many expansions: infinite loop or need to increase maxExpand setting"
      );
    }
    let tokens = expansion.tokens;
    const args = this.consumeArgs(expansion.numArgs, expansion.delimiters);
    if (expansion.numArgs) {
      tokens = tokens.slice();
      for (let i = tokens.length - 1; i >= 0; --i) {
        let tok = tokens[i];
        if (tok.text === "#") {
          if (i === 0) {
            throw new ParseError("Incomplete placeholder at end of macro body", tok);
          }
          tok = tokens[--i];
          if (tok.text === "#") {
            tokens.splice(i + 1, 1);
          } else if (/^[1-9]$/.test(tok.text)) {
            tokens.splice(i, 2, ...args[+tok.text - 1]);
          } else {
            throw new ParseError("Not a valid argument number", tok);
          }
        }
      }
    }
    this.pushTokens(tokens);
    return tokens.length;
  }
  /**
   * Expand the next token only once (if possible), and return the resulting
   * top token on the stack (without removing anything from the stack).
   * Similar in behavior to TeX's `\expandafter\futurelet`.
   * Equivalent to expandOnce() followed by future().
   */
  expandAfterFuture() {
    this.expandOnce();
    return this.future();
  }
  /**
   * Recursively expand first token, then return first non-expandable token.
   */
  expandNextToken() {
    for (; ; ) {
      if (this.expandOnce() === false) {
        const token = this.stack.pop();
        if (token.treatAsRelax) {
          token.text = "\\relax";
        }
        return token;
      }
    }
    throw new Error();
  }
  /**
   * Fully expand the given macro name and return the resulting list of
   * tokens, or return `undefined` if no such macro is defined.
   */
  expandMacro(name) {
    return this.macros.has(name) ? this.expandTokens([new Token(name)]) : void 0;
  }
  /**
   * Fully expand the given token stream and return the resulting list of
   * tokens.  Note that the input tokens are in reverse order, but the
   * output tokens are in forward order.
   */
  expandTokens(tokens) {
    const output = [];
    const oldStackLength = this.stack.length;
    this.pushTokens(tokens);
    while (this.stack.length > oldStackLength) {
      if (this.expandOnce(true) === false) {
        const token = this.stack.pop();
        if (token.treatAsRelax) {
          token.noexpand = false;
          token.treatAsRelax = false;
        }
        output.push(token);
      }
    }
    return output;
  }
  /**
   * Fully expand the given macro name and return the result as a string,
   * or return `undefined` if no such macro is defined.
   */
  expandMacroAsText(name) {
    const tokens = this.expandMacro(name);
    if (tokens) {
      return tokens.map((token) => token.text).join("");
    } else {
      return tokens;
    }
  }
  /**
   * Returns the expanded macro as a reversed array of tokens and a macro
   * argument count.  Or returns `null` if no such macro.
   */
  _getExpansion(name) {
    const definition = this.macros.get(name);
    if (definition == null) {
      return definition;
    }
    if (name.length === 1) {
      const catcode = this.lexer.catcodes[name];
      if (catcode != null && catcode !== 13) {
        return;
      }
    }
    const expansion = typeof definition === "function" ? definition(this) : definition;
    if (typeof expansion === "string") {
      let numArgs = 0;
      if (expansion.indexOf("#") !== -1) {
        const stripped = expansion.replace(/##/g, "");
        while (stripped.indexOf("#" + (numArgs + 1)) !== -1) {
          ++numArgs;
        }
      }
      const bodyLexer = new Lexer(expansion, this.settings);
      const tokens = [];
      let tok = bodyLexer.lex();
      while (tok.text !== "EOF") {
        tokens.push(tok);
        tok = bodyLexer.lex();
      }
      tokens.reverse();
      const expanded = { tokens, numArgs };
      return expanded;
    }
    return expansion;
  }
  /**
   * Determine whether a command is currently "defined" (has some
   * functionality), meaning that it's a macro (in the current group),
   * a function, a symbol, or one of the special commands listed in
   * `implicitCommands`.
   */
  isDefined(name) {
    return this.macros.has(name) || Object.prototype.hasOwnProperty.call(functions, name) || Object.prototype.hasOwnProperty.call(symbols.math, name) || Object.prototype.hasOwnProperty.call(symbols.text, name) || Object.prototype.hasOwnProperty.call(implicitCommands, name);
  }
  /**
   * Determine whether a command is expandable.
   */
  isExpandable(name) {
    const macro = this.macros.get(name);
    return macro != null ? typeof macro === "string" || typeof macro === "function" || !macro.unexpandable : Object.prototype.hasOwnProperty.call(functions, name) && !functions[name].primitive;
  }
};
var unicodeSubRegEx = /^[â‚Šâ‚‹â‚Œâ‚â‚Žâ‚€â‚â‚‚â‚ƒâ‚„â‚…â‚†â‚‡â‚ˆâ‚‰â‚â‚‘â‚•áµ¢â±¼â‚–â‚—â‚˜â‚™â‚’â‚šáµ£â‚›â‚œáµ¤áµ¥â‚“áµ¦áµ§áµ¨áµ©áµª]/;
var uSubsAndSups = Object.freeze({
  "\u208A": "+",
  "\u208B": "-",
  "\u208C": "=",
  "\u208D": "(",
  "\u208E": ")",
  "\u2080": "0",
  "\u2081": "1",
  "\u2082": "2",
  "\u2083": "3",
  "\u2084": "4",
  "\u2085": "5",
  "\u2086": "6",
  "\u2087": "7",
  "\u2088": "8",
  "\u2089": "9",
  "\u2090": "a",
  "\u2091": "e",
  "\u2095": "h",
  "\u1D62": "i",
  "\u2C7C": "j",
  "\u2096": "k",
  "\u2097": "l",
  "\u2098": "m",
  "\u2099": "n",
  "\u2092": "o",
  "\u209A": "p",
  "\u1D63": "r",
  "\u209B": "s",
  "\u209C": "t",
  "\u1D64": "u",
  "\u1D65": "v",
  "\u2093": "x",
  "\u1D66": "\u03B2",
  "\u1D67": "\u03B3",
  "\u1D68": "\u03C1",
  "\u1D69": "\u03D5",
  "\u1D6A": "\u03C7",
  "\u207A": "+",
  "\u207B": "-",
  "\u207C": "=",
  "\u207D": "(",
  "\u207E": ")",
  "\u2070": "0",
  "\xB9": "1",
  "\xB2": "2",
  "\xB3": "3",
  "\u2074": "4",
  "\u2075": "5",
  "\u2076": "6",
  "\u2077": "7",
  "\u2078": "8",
  "\u2079": "9",
  "\u1D2C": "A",
  "\u1D2E": "B",
  "\u1D30": "D",
  "\u1D31": "E",
  "\u1D33": "G",
  "\u1D34": "H",
  "\u1D35": "I",
  "\u1D36": "J",
  "\u1D37": "K",
  "\u1D38": "L",
  "\u1D39": "M",
  "\u1D3A": "N",
  "\u1D3C": "O",
  "\u1D3E": "P",
  "\u1D3F": "R",
  "\u1D40": "T",
  "\u1D41": "U",
  "\u2C7D": "V",
  "\u1D42": "W",
  "\u1D43": "a",
  "\u1D47": "b",
  "\u1D9C": "c",
  "\u1D48": "d",
  "\u1D49": "e",
  "\u1DA0": "f",
  "\u1D4D": "g",
  "\u02B0": "h",
  "\u2071": "i",
  "\u02B2": "j",
  "\u1D4F": "k",
  "\u02E1": "l",
  "\u1D50": "m",
  "\u207F": "n",
  "\u1D52": "o",
  "\u1D56": "p",
  "\u02B3": "r",
  "\u02E2": "s",
  "\u1D57": "t",
  "\u1D58": "u",
  "\u1D5B": "v",
  "\u02B7": "w",
  "\u02E3": "x",
  "\u02B8": "y",
  "\u1DBB": "z",
  "\u1D5D": "\u03B2",
  "\u1D5E": "\u03B3",
  "\u1D5F": "\u03B4",
  "\u1D60": "\u03D5",
  "\u1D61": "\u03C7",
  "\u1DBF": "\u03B8"
});
var asciiFromScript = Object.freeze({
  "\u{1D49C}": "A",
  "\u212C": "B",
  "\u{1D49E}": "C",
  "\u{1D49F}": "D",
  "\u2130": "E",
  "\u2131": "F",
  "\u{1D4A2}": "G",
  "\u210B": "H",
  "\u2110": "I",
  "\u{1D4A5}": "J",
  "\u{1D4A6}": "K",
  "\u2112": "L",
  "\u2133": "M",
  "\u{1D4A9}": "N",
  "\u{1D4AA}": "O",
  "\u{1D4AB}": "P",
  "\u{1D4AC}": "Q",
  "\u211B": "R",
  "\u{1D4AE}": "S",
  "\u{1D4AF}": "T",
  "\u{1D4B0}": "U",
  "\u{1D4B1}": "V",
  "\u{1D4B2}": "W",
  "\u{1D4B3}": "X",
  "\u{1D4B4}": "Y",
  "\u{1D4B5}": "Z"
});
var unicodeAccents = {
  "\u0301": { text: "\\'", math: "\\acute" },
  "\u0300": { text: "\\`", math: "\\grave" },
  "\u0308": { text: '\\"', math: "\\ddot" },
  "\u0303": { text: "\\~", math: "\\tilde" },
  "\u0304": { text: "\\=", math: "\\bar" },
  "\u0306": { text: "\\u", math: "\\breve" },
  "\u030C": { text: "\\v", math: "\\check" },
  "\u0302": { text: "\\^", math: "\\hat" },
  "\u0307": { text: "\\.", math: "\\dot" },
  "\u030A": { text: "\\r", math: "\\mathring" },
  "\u030B": { text: "\\H" },
  "\u0327": { text: "\\c" }
};
var unicodeSymbols = {
  "\xE1": "a\u0301",
  "\xE0": "a\u0300",
  "\xE4": "a\u0308",
  "\u01DF": "a\u0308\u0304",
  "\xE3": "a\u0303",
  "\u0101": "a\u0304",
  "\u0103": "a\u0306",
  "\u1EAF": "a\u0306\u0301",
  "\u1EB1": "a\u0306\u0300",
  "\u1EB5": "a\u0306\u0303",
  "\u01CE": "a\u030C",
  "\xE2": "a\u0302",
  "\u1EA5": "a\u0302\u0301",
  "\u1EA7": "a\u0302\u0300",
  "\u1EAB": "a\u0302\u0303",
  "\u0227": "a\u0307",
  "\u01E1": "a\u0307\u0304",
  "\xE5": "a\u030A",
  "\u01FB": "a\u030A\u0301",
  "\u1E03": "b\u0307",
  "\u0107": "c\u0301",
  "\u010D": "c\u030C",
  "\u0109": "c\u0302",
  "\u010B": "c\u0307",
  "\u010F": "d\u030C",
  "\u1E0B": "d\u0307",
  "\xE9": "e\u0301",
  "\xE8": "e\u0300",
  "\xEB": "e\u0308",
  "\u1EBD": "e\u0303",
  "\u0113": "e\u0304",
  "\u1E17": "e\u0304\u0301",
  "\u1E15": "e\u0304\u0300",
  "\u0115": "e\u0306",
  "\u011B": "e\u030C",
  "\xEA": "e\u0302",
  "\u1EBF": "e\u0302\u0301",
  "\u1EC1": "e\u0302\u0300",
  "\u1EC5": "e\u0302\u0303",
  "\u0117": "e\u0307",
  "\u1E1F": "f\u0307",
  "\u01F5": "g\u0301",
  "\u1E21": "g\u0304",
  "\u011F": "g\u0306",
  "\u01E7": "g\u030C",
  "\u011D": "g\u0302",
  "\u0121": "g\u0307",
  "\u1E27": "h\u0308",
  "\u021F": "h\u030C",
  "\u0125": "h\u0302",
  "\u1E23": "h\u0307",
  "\xED": "i\u0301",
  "\xEC": "i\u0300",
  "\xEF": "i\u0308",
  "\u1E2F": "i\u0308\u0301",
  "\u0129": "i\u0303",
  "\u012B": "i\u0304",
  "\u012D": "i\u0306",
  "\u01D0": "i\u030C",
  "\xEE": "i\u0302",
  "\u01F0": "j\u030C",
  "\u0135": "j\u0302",
  "\u1E31": "k\u0301",
  "\u01E9": "k\u030C",
  "\u013A": "l\u0301",
  "\u013E": "l\u030C",
  "\u1E3F": "m\u0301",
  "\u1E41": "m\u0307",
  "\u0144": "n\u0301",
  "\u01F9": "n\u0300",
  "\xF1": "n\u0303",
  "\u0148": "n\u030C",
  "\u1E45": "n\u0307",
  "\xF3": "o\u0301",
  "\xF2": "o\u0300",
  "\xF6": "o\u0308",
  "\u022B": "o\u0308\u0304",
  "\xF5": "o\u0303",
  "\u1E4D": "o\u0303\u0301",
  "\u1E4F": "o\u0303\u0308",
  "\u022D": "o\u0303\u0304",
  "\u014D": "o\u0304",
  "\u1E53": "o\u0304\u0301",
  "\u1E51": "o\u0304\u0300",
  "\u014F": "o\u0306",
  "\u01D2": "o\u030C",
  "\xF4": "o\u0302",
  "\u1ED1": "o\u0302\u0301",
  "\u1ED3": "o\u0302\u0300",
  "\u1ED7": "o\u0302\u0303",
  "\u022F": "o\u0307",
  "\u0231": "o\u0307\u0304",
  "\u0151": "o\u030B",
  "\u1E55": "p\u0301",
  "\u1E57": "p\u0307",
  "\u0155": "r\u0301",
  "\u0159": "r\u030C",
  "\u1E59": "r\u0307",
  "\u015B": "s\u0301",
  "\u1E65": "s\u0301\u0307",
  "\u0161": "s\u030C",
  "\u1E67": "s\u030C\u0307",
  "\u015D": "s\u0302",
  "\u1E61": "s\u0307",
  "\u1E97": "t\u0308",
  "\u0165": "t\u030C",
  "\u1E6B": "t\u0307",
  "\xFA": "u\u0301",
  "\xF9": "u\u0300",
  "\xFC": "u\u0308",
  "\u01D8": "u\u0308\u0301",
  "\u01DC": "u\u0308\u0300",
  "\u01D6": "u\u0308\u0304",
  "\u01DA": "u\u0308\u030C",
  "\u0169": "u\u0303",
  "\u1E79": "u\u0303\u0301",
  "\u016B": "u\u0304",
  "\u1E7B": "u\u0304\u0308",
  "\u016D": "u\u0306",
  "\u01D4": "u\u030C",
  "\xFB": "u\u0302",
  "\u016F": "u\u030A",
  "\u0171": "u\u030B",
  "\u1E7D": "v\u0303",
  "\u1E83": "w\u0301",
  "\u1E81": "w\u0300",
  "\u1E85": "w\u0308",
  "\u0175": "w\u0302",
  "\u1E87": "w\u0307",
  "\u1E98": "w\u030A",
  "\u1E8D": "x\u0308",
  "\u1E8B": "x\u0307",
  "\xFD": "y\u0301",
  "\u1EF3": "y\u0300",
  "\xFF": "y\u0308",
  "\u1EF9": "y\u0303",
  "\u0233": "y\u0304",
  "\u0177": "y\u0302",
  "\u1E8F": "y\u0307",
  "\u1E99": "y\u030A",
  "\u017A": "z\u0301",
  "\u017E": "z\u030C",
  "\u1E91": "z\u0302",
  "\u017C": "z\u0307",
  "\xC1": "A\u0301",
  "\xC0": "A\u0300",
  "\xC4": "A\u0308",
  "\u01DE": "A\u0308\u0304",
  "\xC3": "A\u0303",
  "\u0100": "A\u0304",
  "\u0102": "A\u0306",
  "\u1EAE": "A\u0306\u0301",
  "\u1EB0": "A\u0306\u0300",
  "\u1EB4": "A\u0306\u0303",
  "\u01CD": "A\u030C",
  "\xC2": "A\u0302",
  "\u1EA4": "A\u0302\u0301",
  "\u1EA6": "A\u0302\u0300",
  "\u1EAA": "A\u0302\u0303",
  "\u0226": "A\u0307",
  "\u01E0": "A\u0307\u0304",
  "\xC5": "A\u030A",
  "\u01FA": "A\u030A\u0301",
  "\u1E02": "B\u0307",
  "\u0106": "C\u0301",
  "\u010C": "C\u030C",
  "\u0108": "C\u0302",
  "\u010A": "C\u0307",
  "\u010E": "D\u030C",
  "\u1E0A": "D\u0307",
  "\xC9": "E\u0301",
  "\xC8": "E\u0300",
  "\xCB": "E\u0308",
  "\u1EBC": "E\u0303",
  "\u0112": "E\u0304",
  "\u1E16": "E\u0304\u0301",
  "\u1E14": "E\u0304\u0300",
  "\u0114": "E\u0306",
  "\u011A": "E\u030C",
  "\xCA": "E\u0302",
  "\u1EBE": "E\u0302\u0301",
  "\u1EC0": "E\u0302\u0300",
  "\u1EC4": "E\u0302\u0303",
  "\u0116": "E\u0307",
  "\u1E1E": "F\u0307",
  "\u01F4": "G\u0301",
  "\u1E20": "G\u0304",
  "\u011E": "G\u0306",
  "\u01E6": "G\u030C",
  "\u011C": "G\u0302",
  "\u0120": "G\u0307",
  "\u1E26": "H\u0308",
  "\u021E": "H\u030C",
  "\u0124": "H\u0302",
  "\u1E22": "H\u0307",
  "\xCD": "I\u0301",
  "\xCC": "I\u0300",
  "\xCF": "I\u0308",
  "\u1E2E": "I\u0308\u0301",
  "\u0128": "I\u0303",
  "\u012A": "I\u0304",
  "\u012C": "I\u0306",
  "\u01CF": "I\u030C",
  "\xCE": "I\u0302",
  "\u0130": "I\u0307",
  "\u0134": "J\u0302",
  "\u1E30": "K\u0301",
  "\u01E8": "K\u030C",
  "\u0139": "L\u0301",
  "\u013D": "L\u030C",
  "\u1E3E": "M\u0301",
  "\u1E40": "M\u0307",
  "\u0143": "N\u0301",
  "\u01F8": "N\u0300",
  "\xD1": "N\u0303",
  "\u0147": "N\u030C",
  "\u1E44": "N\u0307",
  "\xD3": "O\u0301",
  "\xD2": "O\u0300",
  "\xD6": "O\u0308",
  "\u022A": "O\u0308\u0304",
  "\xD5": "O\u0303",
  "\u1E4C": "O\u0303\u0301",
  "\u1E4E": "O\u0303\u0308",
  "\u022C": "O\u0303\u0304",
  "\u014C": "O\u0304",
  "\u1E52": "O\u0304\u0301",
  "\u1E50": "O\u0304\u0300",
  "\u014E": "O\u0306",
  "\u01D1": "O\u030C",
  "\xD4": "O\u0302",
  "\u1ED0": "O\u0302\u0301",
  "\u1ED2": "O\u0302\u0300",
  "\u1ED6": "O\u0302\u0303",
  "\u022E": "O\u0307",
  "\u0230": "O\u0307\u0304",
  "\u0150": "O\u030B",
  "\u1E54": "P\u0301",
  "\u1E56": "P\u0307",
  "\u0154": "R\u0301",
  "\u0158": "R\u030C",
  "\u1E58": "R\u0307",
  "\u015A": "S\u0301",
  "\u1E64": "S\u0301\u0307",
  "\u0160": "S\u030C",
  "\u1E66": "S\u030C\u0307",
  "\u015C": "S\u0302",
  "\u1E60": "S\u0307",
  "\u0164": "T\u030C",
  "\u1E6A": "T\u0307",
  "\xDA": "U\u0301",
  "\xD9": "U\u0300",
  "\xDC": "U\u0308",
  "\u01D7": "U\u0308\u0301",
  "\u01DB": "U\u0308\u0300",
  "\u01D5": "U\u0308\u0304",
  "\u01D9": "U\u0308\u030C",
  "\u0168": "U\u0303",
  "\u1E78": "U\u0303\u0301",
  "\u016A": "U\u0304",
  "\u1E7A": "U\u0304\u0308",
  "\u016C": "U\u0306",
  "\u01D3": "U\u030C",
  "\xDB": "U\u0302",
  "\u016E": "U\u030A",
  "\u0170": "U\u030B",
  "\u1E7C": "V\u0303",
  "\u1E82": "W\u0301",
  "\u1E80": "W\u0300",
  "\u1E84": "W\u0308",
  "\u0174": "W\u0302",
  "\u1E86": "W\u0307",
  "\u1E8C": "X\u0308",
  "\u1E8A": "X\u0307",
  "\xDD": "Y\u0301",
  "\u1EF2": "Y\u0300",
  "\u0178": "Y\u0308",
  "\u1EF8": "Y\u0303",
  "\u0232": "Y\u0304",
  "\u0176": "Y\u0302",
  "\u1E8E": "Y\u0307",
  "\u0179": "Z\u0301",
  "\u017D": "Z\u030C",
  "\u1E90": "Z\u0302",
  "\u017B": "Z\u0307",
  "\u03AC": "\u03B1\u0301",
  "\u1F70": "\u03B1\u0300",
  "\u1FB1": "\u03B1\u0304",
  "\u1FB0": "\u03B1\u0306",
  "\u03AD": "\u03B5\u0301",
  "\u1F72": "\u03B5\u0300",
  "\u03AE": "\u03B7\u0301",
  "\u1F74": "\u03B7\u0300",
  "\u03AF": "\u03B9\u0301",
  "\u1F76": "\u03B9\u0300",
  "\u03CA": "\u03B9\u0308",
  "\u0390": "\u03B9\u0308\u0301",
  "\u1FD2": "\u03B9\u0308\u0300",
  "\u1FD1": "\u03B9\u0304",
  "\u1FD0": "\u03B9\u0306",
  "\u03CC": "\u03BF\u0301",
  "\u1F78": "\u03BF\u0300",
  "\u03CD": "\u03C5\u0301",
  "\u1F7A": "\u03C5\u0300",
  "\u03CB": "\u03C5\u0308",
  "\u03B0": "\u03C5\u0308\u0301",
  "\u1FE2": "\u03C5\u0308\u0300",
  "\u1FE1": "\u03C5\u0304",
  "\u1FE0": "\u03C5\u0306",
  "\u03CE": "\u03C9\u0301",
  "\u1F7C": "\u03C9\u0300",
  "\u038E": "\u03A5\u0301",
  "\u1FEA": "\u03A5\u0300",
  "\u03AB": "\u03A5\u0308",
  "\u1FE9": "\u03A5\u0304",
  "\u1FE8": "\u03A5\u0306",
  "\u038F": "\u03A9\u0301",
  "\u1FFA": "\u03A9\u0300"
};
var binLeftCancellers = ["bin", "op", "open", "punct", "rel"];
var sizeRegEx = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/;
var Parser = class _Parser {
  constructor(input, settings, isPreamble = false) {
    this.mode = "math";
    this.gullet = new MacroExpander(input, settings, this.mode);
    this.settings = settings;
    this.isPreamble = isPreamble;
    this.leftrightDepth = 0;
    this.prevAtomType = "";
  }
  /**
   * Checks a result to make sure it has the right type, and throws an
   * appropriate error otherwise.
   */
  expect(text2, consume = true) {
    if (this.fetch().text !== text2) {
      throw new ParseError(`Expected '${text2}', got '${this.fetch().text}'`, this.fetch());
    }
    if (consume) {
      this.consume();
    }
  }
  /**
   * Discards the current lookahead token, considering it consumed.
   */
  consume() {
    this.nextToken = null;
  }
  /**
   * Return the current lookahead token, or if there isn't one (at the
   * beginning, or if the previous lookahead token was consume()d),
   * fetch the next token as the new lookahead token and return it.
   */
  fetch() {
    if (this.nextToken == null) {
      this.nextToken = this.gullet.expandNextToken();
    }
    return this.nextToken;
  }
  /**
   * Switches between "text" and "math" modes.
   */
  switchMode(newMode) {
    this.mode = newMode;
    this.gullet.switchMode(newMode);
  }
  /**
   * Main parsing function, which parses an entire input.
   */
  parse() {
    this.gullet.beginGroup();
    if (this.settings.colorIsTextColor) {
      this.gullet.macros.set("\\color", "\\textcolor");
    }
    const parse = this.parseExpression(false);
    this.expect("EOF");
    if (this.isPreamble) {
      const macros2 = /* @__PURE__ */ Object.create(null);
      Object.entries(this.gullet.macros.current).forEach(([key, value]) => {
        macros2[key] = value;
      });
      this.gullet.endGroup();
      return macros2;
    }
    const tag = this.gullet.macros.get("\\df@tag");
    this.gullet.endGroup();
    if (tag) {
      this.gullet.macros.current["\\df@tag"] = tag;
    }
    return parse;
  }
  static get endOfExpression() {
    return ["}", "\\endgroup", "\\end", "\\right", "\\endtoggle", "&"];
  }
  /**
   * Fully parse a separate sequence of tokens as a separate job.
   * Tokens should be specified in reverse order, as in a MacroDefinition.
   */
  subparse(tokens) {
    const oldToken = this.nextToken;
    this.consume();
    this.gullet.pushToken(new Token("}"));
    this.gullet.pushTokens(tokens);
    const parse = this.parseExpression(false);
    this.expect("}");
    this.nextToken = oldToken;
    return parse;
  }
  /**
     * Parses an "expression", which is a list of atoms.
     *
     * `breakOnInfix`: Should the parsing stop when we hit infix nodes? This
     *                 happens when functions have higher precedence han infix
     *                 nodes in implicit parses.
     *
     * `breakOnTokenText`: The text of the token that the expression should end
     *                     with, or `null` if something else should end the
     *                     expression.
     *
     * `breakOnMiddle`: \color, \over, and old styling functions work on an implicit group.
     *                  These groups end just before the usual tokens, but they also
     *                  end just before `\middle`.
     */
  parseExpression(breakOnInfix, breakOnTokenText, breakOnMiddle) {
    const body = [];
    this.prevAtomType = "";
    while (true) {
      if (this.mode === "math") {
        this.consumeSpaces();
      }
      const lex = this.fetch();
      if (_Parser.endOfExpression.indexOf(lex.text) !== -1) {
        break;
      }
      if (breakOnTokenText && lex.text === breakOnTokenText) {
        break;
      }
      if (breakOnMiddle && lex.text === "\\middle") {
        break;
      }
      if (breakOnInfix && functions[lex.text] && functions[lex.text].infix) {
        break;
      }
      const atom = this.parseAtom(breakOnTokenText);
      if (!atom) {
        break;
      } else if (atom.type === "internal") {
        continue;
      }
      body.push(atom);
      this.prevAtomType = atom.type === "atom" ? atom.family : atom.type;
    }
    if (this.mode === "text") {
      this.formLigatures(body);
    }
    return this.handleInfixNodes(body);
  }
  /**
   * Rewrites infix operators such as \over with corresponding commands such
   * as \frac.
   *
   * There can only be one infix operator per group.  If there's more than one
   * then the expression is ambiguous.  This can be resolved by adding {}.
   */
  handleInfixNodes(body) {
    let overIndex = -1;
    let funcName;
    for (let i = 0; i < body.length; i++) {
      if (body[i].type === "infix") {
        if (overIndex !== -1) {
          throw new ParseError("only one infix operator per group", body[i].token);
        }
        overIndex = i;
        funcName = body[i].replaceWith;
      }
    }
    if (overIndex !== -1 && funcName) {
      let numerNode;
      let denomNode;
      const numerBody = body.slice(0, overIndex);
      const denomBody = body.slice(overIndex + 1);
      if (numerBody.length === 1 && numerBody[0].type === "ordgroup") {
        numerNode = numerBody[0];
      } else {
        numerNode = { type: "ordgroup", mode: this.mode, body: numerBody };
      }
      if (denomBody.length === 1 && denomBody[0].type === "ordgroup") {
        denomNode = denomBody[0];
      } else {
        denomNode = { type: "ordgroup", mode: this.mode, body: denomBody };
      }
      let node;
      if (funcName === "\\\\abovefrac") {
        node = this.callFunction(funcName, [numerNode, body[overIndex], denomNode], []);
      } else {
        node = this.callFunction(funcName, [numerNode, denomNode], []);
      }
      return [node];
    } else {
      return body;
    }
  }
  /**
   * Handle a subscript or superscript with nice errors.
   */
  handleSupSubscript(name) {
    const symbolToken = this.fetch();
    const symbol = symbolToken.text;
    this.consume();
    this.consumeSpaces();
    const group = this.parseGroup(name);
    if (!group) {
      throw new ParseError("Expected group after '" + symbol + "'", symbolToken);
    }
    return group;
  }
  /**
   * Converts the textual input of an unsupported command into a text node
   * contained within a color node whose color is determined by errorColor
   */
  formatUnsupportedCmd(text2) {
    const textordArray = [];
    for (let i = 0; i < text2.length; i++) {
      textordArray.push({ type: "textord", mode: "text", text: text2[i] });
    }
    const textNode = {
      type: "text",
      mode: this.mode,
      body: textordArray
    };
    const colorNode = {
      type: "color",
      mode: this.mode,
      color: this.settings.errorColor,
      body: [textNode]
    };
    return colorNode;
  }
  /**
   * Parses a group with optional super/subscripts.
   */
  parseAtom(breakOnTokenText) {
    const base = this.parseGroup("atom", breakOnTokenText);
    if (this.mode === "text") {
      return base;
    }
    let superscript;
    let subscript;
    while (true) {
      this.consumeSpaces();
      const lex = this.fetch();
      if (lex.text === "\\limits" || lex.text === "\\nolimits") {
        if (base && base.type === "op") {
          const limits = lex.text === "\\limits";
          base.limits = limits;
          base.alwaysHandleSupSub = true;
        } else if (base && base.type === "operatorname") {
          if (base.alwaysHandleSupSub) {
            base.limits = lex.text === "\\limits";
          }
        } else {
          throw new ParseError("Limit controls must follow a math operator", lex);
        }
        this.consume();
      } else if (lex.text === "^") {
        if (superscript) {
          throw new ParseError("Double superscript", lex);
        }
        superscript = this.handleSupSubscript("superscript");
      } else if (lex.text === "_") {
        if (subscript) {
          throw new ParseError("Double subscript", lex);
        }
        subscript = this.handleSupSubscript("subscript");
      } else if (lex.text === "'") {
        if (superscript) {
          throw new ParseError("Double superscript", lex);
        }
        const prime = { type: "textord", mode: this.mode, text: "\\prime" };
        const primes2 = [prime];
        this.consume();
        while (this.fetch().text === "'") {
          primes2.push(prime);
          this.consume();
        }
        if (this.fetch().text === "^") {
          primes2.push(this.handleSupSubscript("superscript"));
        }
        superscript = { type: "ordgroup", mode: this.mode, body: primes2 };
      } else if (uSubsAndSups[lex.text]) {
        const isSub = unicodeSubRegEx.test(lex.text);
        const subsupTokens = [];
        subsupTokens.push(new Token(uSubsAndSups[lex.text]));
        this.consume();
        while (true) {
          const token = this.fetch().text;
          if (!uSubsAndSups[token]) {
            break;
          }
          if (unicodeSubRegEx.test(token) !== isSub) {
            break;
          }
          subsupTokens.unshift(new Token(uSubsAndSups[token]));
          this.consume();
        }
        const body = this.subparse(subsupTokens);
        if (isSub) {
          subscript = { type: "ordgroup", mode: "math", body };
        } else {
          superscript = { type: "ordgroup", mode: "math", body };
        }
      } else {
        break;
      }
    }
    if (superscript || subscript) {
      if (base && base.type === "multiscript" && !base.postscripts) {
        base.postscripts = { sup: superscript, sub: subscript };
        return base;
      } else {
        const isFollowedByDelimiter = !base || base.type !== "op" && base.type !== "operatorname" ? void 0 : isDelimiter(this.nextToken.text);
        return {
          type: "supsub",
          mode: this.mode,
          base,
          sup: superscript,
          sub: subscript,
          isFollowedByDelimiter
        };
      }
    } else {
      return base;
    }
  }
  /**
   * Parses an entire function, including its base and all of its arguments.
   */
  parseFunction(breakOnTokenText, name) {
    const token = this.fetch();
    const func = token.text;
    const funcData = functions[func];
    if (!funcData) {
      return null;
    }
    this.consume();
    if (name && name !== "atom" && !funcData.allowedInArgument) {
      throw new ParseError(
        "Got function '" + func + "' with no arguments" + (name ? " as " + name : ""),
        token
      );
    } else if (this.mode === "text" && !funcData.allowedInText) {
      throw new ParseError("Can't use function '" + func + "' in text mode", token);
    } else if (this.mode === "math" && funcData.allowedInMath === false) {
      throw new ParseError("Can't use function '" + func + "' in math mode", token);
    }
    const prevAtomType = this.prevAtomType;
    const { args, optArgs } = this.parseArguments(func, funcData);
    this.prevAtomType = prevAtomType;
    return this.callFunction(func, args, optArgs, token, breakOnTokenText);
  }
  /**
   * Call a function handler with a suitable context and arguments.
   */
  callFunction(name, args, optArgs, token, breakOnTokenText) {
    const context = {
      funcName: name,
      parser: this,
      token,
      breakOnTokenText
    };
    const func = functions[name];
    if (func && func.handler) {
      return func.handler(context, args, optArgs);
    } else {
      throw new ParseError(`No function handler for ${name}`);
    }
  }
  /**
   * Parses the arguments of a function or environment
   */
  parseArguments(func, funcData) {
    const totalArgs = funcData.numArgs + funcData.numOptionalArgs;
    if (totalArgs === 0) {
      return { args: [], optArgs: [] };
    }
    const args = [];
    const optArgs = [];
    for (let i = 0; i < totalArgs; i++) {
      let argType = funcData.argTypes && funcData.argTypes[i];
      const isOptional = i < funcData.numOptionalArgs;
      if (funcData.primitive && argType == null || // \sqrt expands into primitive if optional argument doesn't exist
      funcData.type === "sqrt" && i === 1 && optArgs[0] == null) {
        argType = "primitive";
      }
      const arg = this.parseGroupOfType(`argument to '${func}'`, argType, isOptional);
      if (isOptional) {
        optArgs.push(arg);
      } else if (arg != null) {
        args.push(arg);
      } else {
        throw new ParseError("Null argument, please report this as a bug");
      }
    }
    return { args, optArgs };
  }
  /**
   * Parses a group when the mode is changing.
   */
  parseGroupOfType(name, type, optional) {
    switch (type) {
      case "size":
        return this.parseSizeGroup(optional);
      case "url":
        return this.parseUrlGroup(optional);
      case "math":
      case "text":
        return this.parseArgumentGroup(optional, type);
      case "hbox": {
        const group = this.parseArgumentGroup(optional, "text");
        return group != null ? {
          type: "styling",
          mode: group.mode,
          body: [group],
          scriptLevel: "text"
          // simulate \textstyle
        } : null;
      }
      case "raw": {
        const token = this.parseStringGroup("raw", optional);
        return token != null ? {
          type: "raw",
          mode: "text",
          string: token.text
        } : null;
      }
      case "primitive": {
        if (optional) {
          throw new ParseError("A primitive argument cannot be optional");
        }
        const group = this.parseGroup(name);
        if (group == null) {
          throw new ParseError("Expected group as " + name, this.fetch());
        }
        return group;
      }
      case "original":
      case null:
      case void 0:
        return this.parseArgumentGroup(optional);
      default:
        throw new ParseError("Unknown group type as " + name, this.fetch());
    }
  }
  /**
   * Discard any space tokens, fetching the next non-space token.
   */
  consumeSpaces() {
    while (true) {
      const ch = this.fetch().text;
      if (ch === " " || ch === "\xA0" || ch === "\uFE0E") {
        this.consume();
      } else {
        break;
      }
    }
  }
  /**
   * Parses a group, essentially returning the string formed by the
   * brace-enclosed tokens plus some position information.
   */
  parseStringGroup(modeName, optional) {
    const argToken = this.gullet.scanArgument(optional);
    if (argToken == null) {
      return null;
    }
    let str = "";
    let nextToken;
    while ((nextToken = this.fetch()).text !== "EOF") {
      str += nextToken.text;
      this.consume();
    }
    this.consume();
    argToken.text = str;
    return argToken;
  }
  /**
   * Parses a regex-delimited group: the largest sequence of tokens
   * whose concatenated strings match `regex`. Returns the string
   * formed by the tokens plus some position information.
   */
  parseRegexGroup(regex, modeName) {
    const firstToken = this.fetch();
    let lastToken = firstToken;
    let str = "";
    let nextToken;
    while ((nextToken = this.fetch()).text !== "EOF" && regex.test(str + nextToken.text)) {
      lastToken = nextToken;
      str += lastToken.text;
      this.consume();
    }
    if (str === "") {
      throw new ParseError("Invalid " + modeName + ": '" + firstToken.text + "'", firstToken);
    }
    return firstToken.range(lastToken, str);
  }
  /**
   * Parses a size specification, consisting of magnitude and unit.
   */
  parseSizeGroup(optional) {
    let res;
    let isBlank = false;
    this.gullet.consumeSpaces();
    if (!optional && this.gullet.future().text !== "{") {
      res = this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/, "size");
    } else {
      res = this.parseStringGroup("size", optional);
    }
    if (!res) {
      return null;
    }
    if (!optional && res.text.length === 0) {
      res.text = "0pt";
      isBlank = true;
    }
    const match = sizeRegEx.exec(res.text);
    if (!match) {
      throw new ParseError("Invalid size: '" + res.text + "'", res);
    }
    const data = {
      number: +(match[1] + match[2]),
      // sign + magnitude, cast to number
      unit: match[3]
    };
    if (!validUnit(data)) {
      throw new ParseError("Invalid unit: '" + data.unit + "'", res);
    }
    return {
      type: "size",
      mode: this.mode,
      value: data,
      isBlank
    };
  }
  /**
   * Parses an URL, checking escaped letters and allowed protocols,
   * and setting the catcode of % as an active character (as in \hyperref).
   */
  parseUrlGroup(optional) {
    this.gullet.lexer.setCatcode("%", 13);
    this.gullet.lexer.setCatcode("~", 12);
    const res = this.parseStringGroup("url", optional);
    this.gullet.lexer.setCatcode("%", 14);
    this.gullet.lexer.setCatcode("~", 13);
    if (res == null) {
      return null;
    }
    let url = res.text.replace(/\\([#$%&~_^{}])/g, "$1");
    url = res.text.replace(/{\u2044}/g, "/");
    return {
      type: "url",
      mode: this.mode,
      url
    };
  }
  /**
   * Parses an argument with the mode specified.
   */
  parseArgumentGroup(optional, mode) {
    const argToken = this.gullet.scanArgument(optional);
    if (argToken == null) {
      return null;
    }
    const outerMode = this.mode;
    if (mode) {
      this.switchMode(mode);
    }
    this.gullet.beginGroup();
    const expression = this.parseExpression(false, "EOF");
    this.expect("EOF");
    this.gullet.endGroup();
    const result = {
      type: "ordgroup",
      mode: this.mode,
      loc: argToken.loc,
      body: expression
    };
    if (mode) {
      this.switchMode(outerMode);
    }
    return result;
  }
  /**
   * Parses an ordinary group, which is either a single nucleus (like "x")
   * or an expression in braces (like "{x+y}") or an implicit group, a group
   * that starts at the current position, and ends right before a higher explicit
   * group ends, or at EOF.
   */
  parseGroup(name, breakOnTokenText) {
    const firstToken = this.fetch();
    const text2 = firstToken.text;
    let result;
    if (text2 === "{" || text2 === "\\begingroup" || text2 === "\\toggle") {
      this.consume();
      const groupEnd = text2 === "{" ? "}" : text2 === "\\begingroup" ? "\\endgroup" : "\\endtoggle";
      this.gullet.beginGroup();
      const expression = this.parseExpression(false, groupEnd);
      const lastToken = this.fetch();
      this.expect(groupEnd);
      this.gullet.endGroup();
      result = {
        type: lastToken.text === "\\endtoggle" ? "toggle" : "ordgroup",
        mode: this.mode,
        loc: SourceLocation.range(firstToken, lastToken),
        body: expression,
        // A group formed by \begingroup...\endgroup is a semi-simple group
        // which doesn't affect spacing in math mode, i.e., is transparent.
        // https://tex.stackexchange.com/questions/1930/
        semisimple: text2 === "\\begingroup" || void 0
      };
    } else {
      result = this.parseFunction(breakOnTokenText, name) || this.parseSymbol();
      if (result == null && text2[0] === "\\" && !Object.prototype.hasOwnProperty.call(implicitCommands, text2)) {
        result = this.formatUnsupportedCmd(text2);
        this.consume();
      }
    }
    return result;
  }
  /**
   * Form ligature-like combinations of characters for text mode.
   * This includes inputs like "--", "---", "``" and "''".
   * The result will simply replace multiple textord nodes with a single
   * character in each value by a single textord node having multiple
   * characters in its value.  The representation is still ASCII source.
   * The group will be modified in place.
   */
  formLigatures(group) {
    let n = group.length - 1;
    for (let i = 0; i < n; ++i) {
      const a = group[i];
      const v = a.text;
      if (v === "-" && group[i + 1].text === "-") {
        if (i + 1 < n && group[i + 2].text === "-") {
          group.splice(i, 3, {
            type: "textord",
            mode: "text",
            loc: SourceLocation.range(a, group[i + 2]),
            text: "---"
          });
          n -= 2;
        } else {
          group.splice(i, 2, {
            type: "textord",
            mode: "text",
            loc: SourceLocation.range(a, group[i + 1]),
            text: "--"
          });
          n -= 1;
        }
      }
      if ((v === "'" || v === "`") && group[i + 1].text === v) {
        group.splice(i, 2, {
          type: "textord",
          mode: "text",
          loc: SourceLocation.range(a, group[i + 1]),
          text: v + v
        });
        n -= 1;
      }
    }
  }
  /**
   * Parse a single symbol out of the string. Here, we handle single character
   * symbols and special functions like \verb.
   */
  parseSymbol() {
    const nucleus = this.fetch();
    let text2 = nucleus.text;
    if (/^\\verb[^a-zA-Z]/.test(text2)) {
      this.consume();
      let arg = text2.slice(5);
      const star = arg.charAt(0) === "*";
      if (star) {
        arg = arg.slice(1);
      }
      if (arg.length < 2 || arg.charAt(0) !== arg.slice(-1)) {
        throw new ParseError(`\\verb assertion failed --
                    please report what input caused this bug`);
      }
      arg = arg.slice(1, -1);
      return {
        type: "verb",
        mode: "text",
        body: arg,
        star
      };
    }
    if (Object.prototype.hasOwnProperty.call(unicodeSymbols, text2[0]) && this.mode === "math" && !symbols[this.mode][text2[0]]) {
      if (this.settings.strict && this.mode === "math") {
        throw new ParseError(
          `Accented Unicode text character "${text2[0]}" used in math mode`,
          nucleus
        );
      }
      text2 = unicodeSymbols[text2[0]] + text2.slice(1);
    }
    const match = this.mode === "math" ? combiningDiacriticalMarksEndRegex.exec(text2) : null;
    if (match) {
      text2 = text2.substring(0, match.index);
      if (text2 === "i") {
        text2 = "\u0131";
      } else if (text2 === "j") {
        text2 = "\u0237";
      }
    }
    let symbol;
    if (symbols[this.mode][text2]) {
      let group = symbols[this.mode][text2].group;
      if (group === "bin" && binLeftCancellers.includes(this.prevAtomType)) {
        group = "open";
      }
      const loc = SourceLocation.range(nucleus);
      let s;
      if (Object.prototype.hasOwnProperty.call(ATOMS, group)) {
        const family = group;
        s = {
          type: "atom",
          mode: this.mode,
          family,
          loc,
          text: text2
        };
      } else {
        if (asciiFromScript[text2]) {
          this.consume();
          const nextCode = this.fetch().text.charCodeAt(0);
          const font = nextCode === 65025 ? "mathscr" : "mathcal";
          if (nextCode === 65024 || nextCode === 65025) {
            this.consume();
          }
          return {
            type: "font",
            mode: "math",
            font,
            body: { type: "mathord", mode: "math", loc, text: asciiFromScript[text2] }
          };
        }
        s = {
          type: group,
          mode: this.mode,
          loc,
          text: text2
        };
      }
      symbol = s;
    } else if (text2.charCodeAt(0) >= 128 || combiningDiacriticalMarksEndRegex.exec(text2)) {
      if (this.settings.strict && this.mode === "math") {
        throw new ParseError(`Unicode text character "${text2[0]}" used in math mode`, nucleus);
      }
      symbol = {
        type: "textord",
        mode: "text",
        loc: SourceLocation.range(nucleus),
        text: text2
      };
    } else {
      return null;
    }
    this.consume();
    if (match) {
      for (let i = 0; i < match[0].length; i++) {
        const accent2 = match[0][i];
        if (!unicodeAccents[accent2]) {
          throw new ParseError(`Unknown accent ' ${accent2}'`, nucleus);
        }
        const command = unicodeAccents[accent2][this.mode] || unicodeAccents[accent2].text;
        if (!command) {
          throw new ParseError(`Accent ${accent2} unsupported in ${this.mode} mode`, nucleus);
        }
        symbol = {
          type: "accent",
          mode: this.mode,
          loc: SourceLocation.range(nucleus),
          label: command,
          isStretchy: false,
          base: symbol
        };
      }
    }
    return symbol;
  }
};
var parseTree = function(toParse, settings) {
  if (!(typeof toParse === "string" || toParse instanceof String)) {
    throw new TypeError("Temml can only parse string typed expression");
  }
  const parser = new Parser(toParse, settings);
  delete parser.gullet.macros.current["\\df@tag"];
  let tree = parser.parse();
  if (!(tree.length > 0 && tree[0].type && tree[0].type === "array" && tree[0].addEqnNum)) {
    if (parser.gullet.macros.get("\\df@tag")) {
      if (!settings.displayMode) {
        throw new ParseError("\\tag works only in display mode");
      }
      parser.gullet.feed("\\df@tag");
      tree = [
        {
          type: "tag",
          mode: "text",
          body: tree,
          tag: parser.parse()
        }
      ];
    }
  }
  return tree;
};
var subOrSupLevel = [2, 2, 3, 3];
var Style = class _Style {
  constructor(data) {
    this.level = data.level;
    this.color = data.color;
    this.font = data.font || "";
    this.fontFamily = data.fontFamily || "";
    this.fontSize = data.fontSize || 1;
    this.fontWeight = data.fontWeight || "";
    this.fontShape = data.fontShape || "";
    this.maxSize = data.maxSize;
  }
  /**
   * Returns a new style object with the same properties as "this".  Properties
   * from "extension" will be copied to the new style object.
   */
  extend(extension) {
    const data = {
      level: this.level,
      color: this.color,
      font: this.font,
      fontFamily: this.fontFamily,
      fontSize: this.fontSize,
      fontWeight: this.fontWeight,
      fontShape: this.fontShape,
      maxSize: this.maxSize
    };
    for (const key in extension) {
      if (Object.prototype.hasOwnProperty.call(extension, key)) {
        data[key] = extension[key];
      }
    }
    return new _Style(data);
  }
  withLevel(n) {
    return this.extend({
      level: n
    });
  }
  incrementLevel() {
    return this.extend({
      level: Math.min(this.level + 1, 3)
    });
  }
  inSubOrSup() {
    return this.extend({
      level: subOrSupLevel[this.level]
    });
  }
  /**
   * Create a new style object with the given color.
   */
  withColor(color) {
    return this.extend({
      color
    });
  }
  /**
   * Creates a new style object with the given math font or old text font.
   * @type {[type]}
   */
  withFont(font) {
    return this.extend({
      font
    });
  }
  /**
   * Create a new style objects with the given fontFamily.
   */
  withTextFontFamily(fontFamily) {
    return this.extend({
      fontFamily,
      font: ""
    });
  }
  /**
   * Creates a new style object with the given font size
   */
  withFontSize(num) {
    return this.extend({
      fontSize: num
    });
  }
  /**
   * Creates a new style object with the given font weight
   */
  withTextFontWeight(fontWeight) {
    return this.extend({
      fontWeight,
      font: ""
    });
  }
  /**
   * Creates a new style object with the given font weight
   */
  withTextFontShape(fontShape) {
    return this.extend({
      fontShape,
      font: ""
    });
  }
  /**
   * Gets the CSS color of the current style object
   */
  getColor() {
    return this.color;
  }
};
var version = "0.10.34";
function postProcess(block) {
  const labelMap = {};
  let i = 0;
  const amsEqns = document.getElementsByClassName("tml-eqn");
  for (let parent of amsEqns) {
    i += 1;
    parent.setAttribute("id", "tml-eqn-" + String(i));
    while (true) {
      if (parent.tagName === "mtable") {
        break;
      }
      const labels = parent.getElementsByClassName("tml-label");
      if (labels.length > 0) {
        const id = parent.attributes.id.value;
        labelMap[id] = String(i);
        break;
      } else {
        parent = parent.parentElement;
      }
    }
  }
  const taggedEqns = document.getElementsByClassName("tml-tageqn");
  for (const parent of taggedEqns) {
    const labels = parent.getElementsByClassName("tml-label");
    if (labels.length > 0) {
      const tags = parent.getElementsByClassName("tml-tag");
      if (tags.length > 0) {
        const id = parent.attributes.id.value;
        labelMap[id] = tags[0].textContent;
      }
    }
  }
  const refs = block.getElementsByClassName("tml-ref");
  [...refs].forEach((ref) => {
    const attr = ref.getAttribute("href");
    let str = labelMap[attr.slice(1)];
    if (ref.className.indexOf("tml-eqref") === -1) {
      str = str.replace(/^\(/, "");
      str = str.replace(/\)$/, "");
    } else {
      if (str.charAt(0) !== "(") {
        str = "(" + str;
      }
      if (str.slice(-1) !== ")") {
        str = str + ")";
      }
    }
    const mtext = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mtext");
    mtext.appendChild(document.createTextNode(str));
    const math2 = document.createElementNS("http://www.w3.org/1998/Math/MathML", "math");
    math2.appendChild(mtext);
    ref.appendChild(math2);
  });
}
var render = function(expression, baseNode, options = {}) {
  baseNode.textContent = "";
  const alreadyInMathElement = baseNode.tagName.toLowerCase() === "math";
  if (alreadyInMathElement) {
    options.wrap = "none";
  }
  const math2 = renderToMathMLTree(expression, options);
  if (alreadyInMathElement) {
    baseNode.textContent = "";
    math2.children.forEach((e) => {
      baseNode.appendChild(e.toNode());
    });
  } else if (math2.children.length > 1) {
    baseNode.textContent = "";
    math2.children.forEach((e) => {
      baseNode.appendChild(e.toNode());
    });
  } else {
    baseNode.appendChild(math2.toNode());
  }
};
if (typeof document !== "undefined") {
  if (document.compatMode !== "CSS1Compat") {
    typeof console !== "undefined" && console.warn(
      "Warning: Temml doesn't work in quirks mode. Make sure your website has a suitable doctype."
    );
    render = function() {
      throw new ParseError("Temml doesn't work in quirks mode.");
    };
  }
}
var renderToString = function(expression, options) {
  const markup = renderToMathMLTree(expression, options).toMarkup();
  return markup;
};
var generateParseTree = function(expression, options) {
  const settings = new Settings(options);
  return parseTree(expression, settings);
};
var definePreamble = function(expression, options) {
  const settings = new Settings(options);
  settings.macros = {};
  if (!(typeof expression === "string" || expression instanceof String)) {
    throw new TypeError("Temml can only parse string typed expression");
  }
  const parser = new Parser(expression, settings, true);
  delete parser.gullet.macros.current["\\df@tag"];
  const macros2 = parser.parse();
  return macros2;
};
var renderError = function(error, expression, options) {
  if (options.throwOnError || !(error instanceof ParseError)) {
    throw error;
  }
  const node = new Span(["temml-error"], [new TextNode$1(expression + "\n" + error.toString())]);
  node.style.color = options.errorColor;
  node.style.whiteSpace = "pre-line";
  return node;
};
var renderToMathMLTree = function(expression, options) {
  const settings = new Settings(options);
  try {
    const tree = parseTree(expression, settings);
    const style = new Style({
      level: settings.displayMode ? StyleLevel.DISPLAY : StyleLevel.TEXT,
      maxSize: settings.maxSize
    });
    return buildMathML(tree, expression, style, settings);
  } catch (error) {
    return renderError(error, expression, settings);
  }
};
var temml = {
  /**
   * Current Temml version
   */
  version,
  /**
   * Renders the given LaTeX into MathML, and adds
   * it as a child to the specified DOM node.
   */
  render,
  /**
   * Renders the given LaTeX into MathML string,
   * for sending to the client.
   */
  renderToString,
  /**
   * Post-process an entire HTML block.
   * Writes AMS auto-numbers and implements \ref{}.
   * Typcally called once, after a loop has rendered many individual spans.
   */
  postProcess,
  /**
   * Temml error, usually during parsing.
   */
  ParseError,
  /**
   * Creates a set of macros with document-wide scope.
   */
  definePreamble,
  /**
   * Parses the given LaTeX into Temml's internal parse tree structure,
   * without rendering to HTML or MathML.
   *
   * NOTE: This method is not currently recommended for public use.
   * The internal tree representation is unstable and is very likely
   * to change. Use at your own risk.
   */
  __parse: generateParseTree,
  /**
   * Renders the given LaTeX into a MathML internal DOM tree
   * representation, without flattening that representation to a string.
   *
   * NOTE: This method is not currently recommended for public use.
   * The internal tree representation is unstable and is very likely
   * to change. Use at your own risk.
   */
  __renderToMathMLTree: renderToMathMLTree,
  /**
   * adds a new symbol to builtin symbols table
   */
  __defineSymbol: defineSymbol,
  /**
   * adds a new macro to builtin macro list
   */
  __defineMacro: defineMacro
};

// packages/latex-to-mathml/build-module/index.mjs
function latexToMathML(latex, { displayMode = true } = {}) {
  const mathML = temml.renderToString(latex, {
    displayMode,
    annotate: true,
    throwOnError: true
  });
  const doc = document.implementation.createHTMLDocument("");
  doc.body.innerHTML = mathML;
  return doc.body.querySelector("math")?.innerHTML ?? "";
}
export {
  latexToMathML as default
};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           dist/script-modules/latex-to-mathml/index.min.asset.php                                             0000644                 00000000123 15212564030 0017210 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php return array('dependencies' => array(), 'version' => 'e5fd3ae6d2c3b6e669da');                                                                                                                                                                                                                                                                                                                                                                                                                                             dist/script-modules/lazy-editor/index.min.js                                                        0000644                 00000111456 15212564030 0015161 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var We=Object.create;var Tt=Object.defineProperty;var De=Object.getOwnPropertyDescriptor;var Ke=Object.getOwnPropertyNames;var He=Object.getPrototypeOf,Xe=Object.prototype.hasOwnProperty;var P=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ye=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Ke(e))!Xe.call(t,n)&&n!==o&&Tt(t,n,{get:()=>e[n],enumerable:!(r=De(e,n))||r.enumerable});return t};var h=(t,e,o)=>(o=t!=null?We(He(t)):{},Ye(e||!t||!t.__esModule?Tt(o,"default",{value:t,enumerable:!0}):o,t));var pt=P((Bo,Ct)=>{Ct.exports=window.wp.editor});var U=P((No,Vt)=>{Vt.exports=window.wp.coreData});var G=P((Wo,zt)=>{zt.exports=window.wp.data});var Lt=P((Do,Mt)=>{Mt.exports=window.wp.components});var B=P((Ko,Gt)=>{Gt.exports=window.wp.element});var dt=P((Jo,Wt)=>{Wt.exports=window.wp.styleEngine});var Jt=P((nr,Zt)=>{Zt.exports=window.wp.i18n});var ht=P((sr,qt)=>{qt.exports=window.wp.blocks});var $e=P((Fr,xe)=>{xe.exports=window.wp.privateApis});var It=P((Br,Re)=>{Re.exports=window.ReactJSXRuntime});var Me=P((Xr,ze)=>{ze.exports=window.wp.blockEditor});var Te=h(pt(),1),Pt=h(U(),1),jt=h(G(),1),Ce=h(Lt(),1),Ve=h(B(),1);var Ut=h(U(),1),Bt=h(G(),1);function ot({templateId:t}={}){let{globalStylesId:e,stylesId:o}=(0,Bt.useSelect)(r=>{let n=r(Ut.store),s=t?n.getEntityRecord("postType","wp_template",t):null;return{globalStylesId:n.__experimentalGetCurrentGlobalStylesId(),stylesId:s?.styles_id}},[t]);return o||e}function rt(t,e,o){e=Array.isArray(e)?[...e]:[e],t=Array.isArray(t)?[...t]:{...t};let r=e.pop(),n=t;for(let s of e){let i=n[s];n=n[s]=Array.isArray(i)?[...i]:{...i}}return n[r]=o,t}var S=(t,e,o)=>{let r=Array.isArray(e)?e:e.split("."),n=t;return r.forEach(s=>{n=n?.[s]}),n??o};var Ze=["appearanceTools","useRootPaddingAwareAlignments","background.backgroundImage","background.backgroundRepeat","background.backgroundSize","background.backgroundPosition","border.color","border.radius","border.radiusSizes","border.style","border.width","shadow.presets","shadow.defaultPresets","color.background","color.button","color.caption","color.custom","color.customDuotone","color.customGradient","color.defaultDuotone","color.defaultGradients","color.defaultPalette","color.duotone","color.gradients","color.heading","color.link","color.palette","color.text","custom","dimensions.aspectRatio","dimensions.height","dimensions.minHeight","dimensions.width","dimensions.dimensionSizes","layout.contentSize","layout.definitions","layout.wideSize","lightbox.enabled","lightbox.allowEditing","position.fixed","position.sticky","spacing.customSpacingSize","spacing.defaultSpacingSizes","spacing.spacingSizes","spacing.spacingScale","spacing.blockGap","spacing.margin","spacing.padding","spacing.units","typography.fluid","typography.customFontSize","typography.defaultFontSizes","typography.dropCap","typography.fontFamilies","typography.fontSizes","typography.fontStyle","typography.fontWeight","typography.letterSpacing","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textIndent","typography.textTransform","typography.writingMode"];function Nt(t,e,o){let r=o?".blocks."+o:"",n=e?"."+e:"",s=`settings${r}${n}`,i=`settings${n}`;if(e)return S(t,s)??S(t,i);let a={};return Ze.forEach(l=>{let c=S(t,`settings${r}.${l}`)??S(t,`settings.${l}`);c!==void 0&&(a=rt(a,l.split("."),c))}),a}var Kt=h(dt(),1);var Je="1600px",qe="320px",Qe=1,to=.25,eo=.75,oo="14px";function Dt({minimumFontSize:t,maximumFontSize:e,fontSize:o,minimumViewportWidth:r=qe,maximumViewportWidth:n=Je,scaleFactor:s=Qe,minimumFontSizeLimit:i}){if(i=R(i)?i:oo,o){let b=R(o);if(!b?.unit||!b?.value)return null;let E=R(i,{coerceTo:b.unit});if(E?.value&&!t&&!e&&b?.value<=E?.value)return null;if(e||(e=`${b.value}${b.unit}`),!t){let M=b.unit==="px"?b.value:b.value*16,ut=Math.min(Math.max(1-.075*Math.log2(M),to),eo),D=H(b.value*ut,3);E?.value&&D<E?.value?t=`${E.value}${E.unit}`:t=`${D}${b.unit}`}}let a=R(t),l=a?.unit||"rem",c=R(e,{coerceTo:l});if(!a||!c)return null;let d=R(t,{coerceTo:"rem"}),f=R(n,{coerceTo:l}),p=R(r,{coerceTo:l});if(!f||!p||!d)return null;let g=f.value-p.value;if(!g)return null;let u=H(p.value/100,3),m=H(u,3)+l,v=100*((c.value-a.value)/g),y=H((v||1)*s,3),O=`${d.value}${d.unit} + ((1vw - ${m}) * ${y})`;return`clamp(${t}, ${O}, ${e})`}function R(t,e={}){if(typeof t!="string"&&typeof t!="number")return null;isFinite(t)&&(t=`${t}px`);let{coerceTo:o,rootSizeValue:r,acceptableUnits:n}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...e},s=n?.join("|"),i=new RegExp(`^(\\d*\\.?\\d+)(${s}){1,1}$`),a=t.toString().match(i);if(!a||a.length<3)return null;let[,l,c]=a,d=parseFloat(l);return o==="px"&&(c==="em"||c==="rem")&&(d=d*r,c=o),c==="px"&&(o==="em"||o==="rem")&&(d=d/r,c=o),(o==="em"||o==="rem")&&(c==="em"||c==="rem")&&(c=o),c?{value:H(d,3),unit:c}:null}function H(t,e=3){let o=Math.pow(10,e);return Math.round(t*o)/o}function gt(t){let e=t?.fluid;return e===!0||e&&typeof e=="object"&&Object.keys(e).length>0}function ro(t){let e=t?.typography??{},o=t?.layout,r=R(o?.wideSize)?o?.wideSize:null;return gt(e)&&r?{fluid:{maxViewportWidth:r,...typeof e.fluid=="object"?e.fluid:{}}}:{fluid:e?.fluid}}function nt(t,e){let{size:o}=t;if(!o||o==="0"||t?.fluid===!1||!gt(e?.typography)&&!gt(t))return o;let r=ro(e)?.fluid??{},n=Dt({minimumFontSize:typeof t?.fluid=="boolean"?void 0:t?.fluid?.min,maximumFontSize:typeof t?.fluid=="boolean"?void 0:t?.fluid?.max,fontSize:o,minimumFontSizeLimit:typeof r=="object"?r?.minFontSize:void 0,maximumViewportWidth:typeof r=="object"?r?.maxViewportWidth:void 0,minimumViewportWidth:typeof r=="object"?r?.minViewportWidth:void 0});return n||o}var T="body",X=":root",Y=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],valueKey:"colors",cssVarInfix:"duotone",valueFunc:({slug:t})=>`url( '#wp-duotone-${t}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(t,e)=>nt(t,e),valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:({size:t})=>t,classes:[]},{path:["border","radiusSizes"],valueKey:"size",cssVarInfix:"border-radius",classes:[]},{path:["dimensions","dimensionSizes"],valueKey:"size",cssVarInfix:"dimension",classes:[]}];function j(t,e){if(!t||!e)return e;let o=t.split(","),r=e.split(","),n=[];return o.forEach(s=>{r.forEach(i=>{n.push(`${s.trim()} ${i.trim()}`)})}),n.join(", ")}function Ht(t,e){if(!t||!e)return;let o={};return Object.entries(e).forEach(([r,n])=>{typeof n=="string"&&(o[r]=j(t,n)),typeof n=="object"&&(o[r]={},Object.entries(n).forEach(([s,i])=>{o[r][s]=j(t,i)}))}),o}function Xt(t,e){return t.includes(",")?t.split(",").map(n=>n+e).join(","):t+e}function Yt(t,e){let o=`.is-style-${t}`;if(!e)return o;let r=/((?::\([^)]+\))?\s*)([^\s:]+)/,n=(i,a,l)=>a+l+o;return e.split(",").map(i=>i.replace(r,n)).join(",")}function no(t,e){if(!t||!e)return t;if(typeof t=="object"&&"ref"in t&&t?.ref){let o=(0,Kt.getCSSValueFromRawStyle)(S(e,t.ref));return typeof o=="object"&&o!==null&&"ref"in o&&o?.ref?void 0:o===void 0?t:o}return t}function so(t,e){if(!t||!e||!Array.isArray(e))return t;let o=e.find(r=>r?.name===t);return o?.href?o?.href:t}function mt(t,e){if(!t||!e)return t;let o=no(t,e);return typeof o=="object"&&o!==null&&"url"in o&&o?.url&&(o.url=so(o.url,e?._links?.["wp:theme-file"])),o}var x=h(ht(),1),J=h(dt(),1),ye=h(G(),1);function N(t,e="root",o={}){if(!e)return null;let{fallback:r=!1}=o,{name:n,selectors:s,supports:i}=t,a=s&&Object.keys(s).length>0,l=Array.isArray(e)?e.join("."):e,c=null;if(a&&s.root?c=s?.root:i?.__experimentalSelector?c=i.__experimentalSelector:c=".wp-block-"+n.replace("core/","").replace("/","-"),l==="root")return c;let d=Array.isArray(e)?e:e.split(".");if(d.length===1){let p=r?c:null;if(a)return S(s,`${l}.root`,null)||S(s,l,null)||p;let g=i?S(i,`${l}.__experimentalSelector`,null):void 0;return g?j(c,g):p}let f;return a&&(f=S(s,l,null)),f||(r?N(t,d[0],o):null)}var io={grad:.9,turn:360,rad:360/(2*Math.PI)},C=function(t){return typeof t=="string"?t.length>0:typeof t=="number"},w=function(t,e,o){return e===void 0&&(e=0),o===void 0&&(o=Math.pow(10,e)),Math.round(o*t)/o+0},I=function(t,e,o){return e===void 0&&(e=0),o===void 0&&(o=1),t>o?o:t>e?t:e},ae=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},Qt=function(t){return{r:I(t.r,0,255),g:I(t.g,0,255),b:I(t.b,0,255),a:I(t.a)}},yt=function(t){return{r:w(t.r),g:w(t.g),b:w(t.b),a:w(t.a,3)}},ao=/^#([0-9a-f]{3,8})$/i,st=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},le=function(t){var e=t.r,o=t.g,r=t.b,n=t.a,s=Math.max(e,o,r),i=s-Math.min(e,o,r),a=i?s===e?(o-r)/i:s===o?2+(r-e)/i:4+(e-o)/i:0;return{h:60*(a<0?a+6:a),s:s?i/s*100:0,v:s/255*100,a:n}},ce=function(t){var e=t.h,o=t.s,r=t.v,n=t.a;e=e/360*6,o/=100,r/=100;var s=Math.floor(e),i=r*(1-o),a=r*(1-(e-s)*o),l=r*(1-(1-e+s)*o),c=s%6;return{r:255*[r,a,i,i,l,r][c],g:255*[l,r,r,a,i,i][c],b:255*[i,i,l,r,r,a][c],a:n}},te=function(t){return{h:ae(t.h),s:I(t.s,0,100),l:I(t.l,0,100),a:I(t.a)}},ee=function(t){return{h:w(t.h),s:w(t.s),l:w(t.l),a:w(t.a,3)}},oe=function(t){return ce((o=(e=t).s,{h:e.h,s:(o*=((r=e.l)<50?r:100-r)/100)>0?2*o/(r+o)*100:0,v:r+o,a:e.a}));var e,o,r},Z=function(t){return{h:(e=le(t)).h,s:(n=(200-(o=e.s))*(r=e.v)/100)>0&&n<200?o*r/100/(n<=100?n:200-n)*100:0,l:n/2,a:e.a};var e,o,r,n},lo=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,co=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,uo=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,fo=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,re={string:[[function(t){var e=ao.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?w(parseInt(t[3]+t[3],16)/255,2):1}:t.length===6||t.length===8?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:t.length===8?w(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=uo.exec(t)||fo.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:Qt({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(t){var e=lo.exec(t)||co.exec(t);if(!e)return null;var o,r,n=te({h:(o=e[1],r=e[2],r===void 0&&(r="deg"),Number(o)*(io[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return oe(n)},"hsl"]],object:[[function(t){var e=t.r,o=t.g,r=t.b,n=t.a,s=n===void 0?1:n;return C(e)&&C(o)&&C(r)?Qt({r:Number(e),g:Number(o),b:Number(r),a:Number(s)}):null},"rgb"],[function(t){var e=t.h,o=t.s,r=t.l,n=t.a,s=n===void 0?1:n;if(!C(e)||!C(o)||!C(r))return null;var i=te({h:Number(e),s:Number(o),l:Number(r),a:Number(s)});return oe(i)},"hsl"],[function(t){var e=t.h,o=t.s,r=t.v,n=t.a,s=n===void 0?1:n;if(!C(e)||!C(o)||!C(r))return null;var i=(function(a){return{h:ae(a.h),s:I(a.s,0,100),v:I(a.v,0,100),a:I(a.a)}})({h:Number(e),s:Number(o),v:Number(r),a:Number(s)});return ce(i)},"hsv"]]},ne=function(t,e){for(var o=0;o<e.length;o++){var r=e[o][0](t);if(r)return[r,e[o][1]]}return[null,void 0]},po=function(t){return typeof t=="string"?ne(t.trim(),re.string):typeof t=="object"&&t!==null?ne(t,re.object):[null,void 0]};var bt=function(t,e){var o=Z(t);return{h:o.h,s:I(o.s+100*e,0,100),l:o.l,a:o.a}},St=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},se=function(t,e){var o=Z(t);return{h:o.h,s:o.s,l:I(o.l+100*e,0,100),a:o.a}},ie=(function(){function t(e){this.parsed=po(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return t.prototype.isValid=function(){return this.parsed!==null},t.prototype.brightness=function(){return w(St(this.rgba),2)},t.prototype.isDark=function(){return St(this.rgba)<.5},t.prototype.isLight=function(){return St(this.rgba)>=.5},t.prototype.toHex=function(){return e=yt(this.rgba),o=e.r,r=e.g,n=e.b,i=(s=e.a)<1?st(w(255*s)):"","#"+st(o)+st(r)+st(n)+i;var e,o,r,n,s,i},t.prototype.toRgb=function(){return yt(this.rgba)},t.prototype.toRgbString=function(){return e=yt(this.rgba),o=e.r,r=e.g,n=e.b,(s=e.a)<1?"rgba("+o+", "+r+", "+n+", "+s+")":"rgb("+o+", "+r+", "+n+")";var e,o,r,n,s},t.prototype.toHsl=function(){return ee(Z(this.rgba))},t.prototype.toHslString=function(){return e=ee(Z(this.rgba)),o=e.h,r=e.s,n=e.l,(s=e.a)<1?"hsla("+o+", "+r+"%, "+n+"%, "+s+")":"hsl("+o+", "+r+"%, "+n+"%)";var e,o,r,n,s},t.prototype.toHsv=function(){return e=le(this.rgba),{h:w(e.h),s:w(e.s),v:w(e.v),a:w(e.a,3)};var e},t.prototype.invert=function(){return A({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},t.prototype.saturate=function(e){return e===void 0&&(e=.1),A(bt(this.rgba,e))},t.prototype.desaturate=function(e){return e===void 0&&(e=.1),A(bt(this.rgba,-e))},t.prototype.grayscale=function(){return A(bt(this.rgba,-1))},t.prototype.lighten=function(e){return e===void 0&&(e=.1),A(se(this.rgba,e))},t.prototype.darken=function(e){return e===void 0&&(e=.1),A(se(this.rgba,-e))},t.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},t.prototype.alpha=function(e){return typeof e=="number"?A({r:(o=this.rgba).r,g:o.g,b:o.b,a:e}):w(this.rgba.a,3);var o},t.prototype.hue=function(e){var o=Z(this.rgba);return typeof e=="number"?A({h:e,s:o.s,l:o.l,a:o.a}):w(o.h)},t.prototype.isEqual=function(e){return this.toHex()===A(e).toHex()},t})(),A=function(t){return t instanceof ie?t:new ie(t)};function go(t=[]){let e={r:[],g:[],b:[],a:[]};return t.forEach(o=>{let r=A(o).toRgb();e.r.push(r.r/255),e.g.push(r.g/255),e.b.push(r.b/255),e.a.push(r.a)}),e}function ue(t,e){let o=go(e);return`
<svg
	xmlns:xlink="http://www.w3.org/1999/xlink"
	viewBox="0 0 0 0"
	width="0"
	height="0"
	focusable="false"
	role="none"
	aria-hidden="true"
	style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
>
	<defs>
		<filter id="${t}">
			<!--
				Use sRGB instead of linearRGB so transparency looks correct.
				Use perceptual brightness to convert to grayscale.
			-->
			<feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix>
			<!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. -->
			<feComponentTransfer color-interpolation-filters="sRGB">
				<feFuncR type="table" tableValues="${o.r.join(" ")}"></feFuncR>
				<feFuncG type="table" tableValues="${o.g.join(" ")}"></feFuncG>
				<feFuncB type="table" tableValues="${o.b.join(" ")}"></feFuncB>
				<feFuncA type="table" tableValues="${o.a.join(" ")}"></feFuncA>
			</feComponentTransfer>
			<!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. -->
			<feComposite in2="SourceGraphic" operator="in"></feComposite>
		</filter>
	</defs>
</svg>`}function V(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([0-9])([a-zA-Z])/g,"$1-$2").replace(/([a-zA-Z])([0-9])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function vt(t){if(!t)return;let e=t.match(/var:preset\|spacing\|(.+)/);return e?`var(--wp--preset--spacing--${e[1]})`:t}function mo(t){if(!t)return null;let e=typeof t=="string";return{top:e?t:t?.top,left:e?t:t?.left}}function wt(t,e="0"){let o=mo(t);if(!o)return null;let r=vt(o?.top)||e,n=vt(o?.left)||e;return r===n?r:`${r} ${n}`}var fe={backgroundSize:"cover",backgroundPosition:"50% 50%"};function pe(t){if(!t||!t?.backgroundImage?.url)return;let e;return t?.backgroundSize||(e={backgroundSize:fe.backgroundSize}),t?.backgroundSize==="contain"&&!t?.backgroundPosition&&(e={backgroundPosition:fe.backgroundPosition}),e}var de={default:{name:"default",slug:"flow",className:"is-layout-flow",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},constrained:{name:"constrained",slug:"constrained",className:"is-layout-constrained",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > :where(:not(.alignleft):not(.alignright):not(.alignfull))",rules:{"max-width":"var(--wp--style--global--content-size)","margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > .alignwide",rules:{"max-width":"var(--wp--style--global--wide-size)"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},flex:{name:"flex",slug:"flex",className:"is-layout-flex",displayMode:"flex",baseStyles:[{selector:"",rules:{"flex-wrap":"wrap","align-items":"center"}},{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}};var ho={button:"wp-element-button",caption:"wp-element-caption"},yo={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"};function bo(t={},e){return Y.reduce((o,{path:r,valueKey:n,valueFunc:s,cssVarInfix:i})=>{let a=S(t,r,[]);return["default","theme","custom"].forEach(l=>{a[l]&&a[l].forEach(c=>{n&&!s?o.push(`--wp--preset--${i}--${V(c.slug)}: ${c[n]}`):s&&typeof s=="function"&&o.push(`--wp--preset--${i}--${V(c.slug)}: ${s(c,e)}`)})}),o},[])}function So(t="*",e={}){return Y.reduce((o,{path:r,cssVarInfix:n,classes:s})=>{if(!s)return o;let i=S(e,r,[]);return["default","theme","custom"].forEach(a=>{i[a]&&i[a].forEach(({slug:l})=>{s.forEach(({classSuffix:c,propertyName:d})=>{let f=`.has-${V(l)}-${c}`,p=t.split(",").map(u=>`${u}${f}`).join(","),g=`var(--wp--preset--${n}--${V(l)})`;o+=`${p}{${d}: ${g} !important;}`})})}),o},"")}function vo(t={}){return Y.filter(e=>e.path.at(-1)==="duotone").flatMap(e=>{let o=S(t,e.path,{});return["default","theme"].filter(r=>o[r]).flatMap(r=>o[r].map(n=>ue(`wp-duotone-${n.slug}`,n.colors))).join("")})}function be(t={},e,o){let r=[];return Object.keys(t).forEach(n=>{let s=e+V(n.replace("/","-")),i=t[n];if(i instanceof Object){let a=s+o;r=[...r,...be(i,a,o)]}else r.push(`${s}: ${i}`)}),r}function wo(t,e){let o=t.split(","),r=[];return o.forEach(n=>{r.push(`${e.trim()}${n.trim()}`)}),r.join(", ")}var ge=(t,e,o)=>{if(o!=="core/paragraph"||(e?.blocks?.["core/paragraph"]?.typography?.textIndent??e?.typography?.textIndent??"subsequent")!=="all")return t;let s=".wp-block-paragraph + .wp-block-paragraph",i=".wp-block-paragraph";if(s in t){let a=t[s],l={...t};return delete l[s],l[i]=a,l}return t},me=(t,e)=>{let o={};return Object.entries(t).forEach(([r,n])=>{if(r==="root"||!e?.[r])return;let s=typeof n=="string";if(!s&&typeof n=="object"&&n!==null&&Object.entries(n).forEach(([i,a])=>{if(i==="root"||!e?.[r][i])return;let l={[r]:{[i]:e[r][i]}},c=W(l);o[a]=[...o[a]||[],...c],delete e[r][i]}),s||typeof n=="object"&&n!==null&&"root"in n){let i=s?n:n.root,a={[r]:e[r]},l=W(a);o[i]=[...o[i]||[],...l],delete e[r]}}),o};function W(t={},e="",o,r={},n=!1){let s=T===e,i=Object.entries(x.__EXPERIMENTAL_STYLE_PROPERTY).reduce((l,[c,{value:d,properties:f,useEngine:p,rootOnly:g}])=>{if(g&&!s)return l;let u=d;if(u[0]==="elements"||p)return l;let m=S(t,u);if(c==="--wp--style--root--padding"&&(typeof m=="string"||!o))return l;if(f&&typeof m!="string")Object.entries(f).forEach(v=>{let[y,O]=v;if(!S(m,[O],!1))return;let b=y.startsWith("--")?y:V(y);l.push(`${b}: ${(0,J.getCSSValueFromRawStyle)(S(m,[O]))}`)});else if(S(t,u,!1)){let v=c.startsWith("--")?c:V(c);l.push(`${v}: ${(0,J.getCSSValueFromRawStyle)(S(t,u))}`)}return l},[]);return t.background&&(t.background?.backgroundImage&&(t.background.backgroundImage=mt(t.background.backgroundImage,r)),!s&&t.background?.backgroundImage?.id&&(t={...t,background:{...t.background,...pe(t.background)}})),(0,J.getCSSRules)(t).forEach(l=>{if(s&&(o||n)&&l.key.startsWith("padding"))return;let c=l.key.startsWith("--")?l.key:V(l.key),d=mt(l.value,r);c==="font-size"&&(d=nt({name:"",slug:"",size:d},r?.settings)),c==="aspect-ratio"&&i.push("min-height: unset"),i.push(`${c}: ${d}`)}),i}function he({layoutDefinitions:t=de,style:e,selector:o,hasBlockGapSupport:r,hasFallbackGapSupport:n,fallbackGapValue:s}){let i="",a=r?wt(e?.spacing?.blockGap):"";if(n&&(o===T?a=a||"0.5em":!r&&s&&(a=s)),a&&t&&(Object.values(t).forEach(({className:l,name:c,spacingStyles:d})=>{!r&&c!=="flex"&&c!=="grid"||d?.length&&d.forEach(f=>{let p=[];if(f.rules&&Object.entries(f.rules).forEach(([g,u])=>{p.push(`${g}: ${u||a}`)}),p.length){let g="";r?g=o===T?`:root :where(.${l})${f?.selector||""}`:`:root :where(${o}-${l})${f?.selector||""}`:g=o===T?`:where(.${l}${f?.selector||""})`:`:where(${o}.${l}${f?.selector||""})`,i+=`${g} { ${p.join("; ")}; }`}})}),o===T&&r&&(i+=`${X} { --wp--style--block-gap: ${a}; }`)),o===T&&t){let l=["block","flex","grid"];Object.values(t).forEach(({className:c,displayMode:d,baseStyles:f})=>{d&&l.includes(d)&&(i+=`${o} .${c} { display:${d}; }`),f?.length&&f.forEach(p=>{let g=[];if(p.rules&&Object.entries(p.rules).forEach(([u,m])=>{g.push(`${u}: ${m}`)}),g.length){let u=`.${c}${p?.selector||""}`;i+=`${u} { ${g.join("; ")}; }`}})})}return i}var Eo=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function it(t){if(!t)return{};let r=Object.entries(t).filter(([n])=>Eo.includes(n)).map(([n,s])=>[n,JSON.parse(JSON.stringify(s))]);return Object.fromEntries(r)}var xo=(t,e)=>{let o=[];if(!t?.styles)return o;let r=it(t.styles);return r&&o.push({styles:r,selector:T,skipSelectorWrapper:!0}),Object.entries(x.__EXPERIMENTAL_ELEMENTS).forEach(([n,s])=>{t.styles?.elements?.[n]&&o.push({styles:t.styles?.elements?.[n]??{},selector:s,skipSelectorWrapper:!ho[n]})}),Object.entries(t.styles?.blocks??{}).forEach(([n,s])=>{let i=it(s),a=s,l=[];if(a?.variations){let c={};Object.entries(a.variations).forEach(([d,f])=>{let p=f;c[d]=it(p),p?.css&&(c[d].css=p.css);let g=typeof e!="string"?e[n]?.styleVariationSelectors?.[d]:void 0;Object.entries(p?.elements??{}).forEach(([u,m])=>{m&&x.__EXPERIMENTAL_ELEMENTS[u]&&l.push({styles:m,selector:j(g,x.__EXPERIMENTAL_ELEMENTS[u])})}),Object.entries(p?.blocks??{}).forEach(([u,m])=>{let v=typeof e!="string"?j(g,e[u]?.selector):void 0,y=typeof e!="string"?j(g,e[u]?.duotoneSelector):void 0,O=typeof e!="string"?Ht(g,e[u]?.featureSelectors??{}):void 0,b=it(m);m?.css&&(b.css=m.css),!(!v||typeof e=="string")&&(l.push({selector:v,duotoneSelector:y,featureSelectors:O,fallbackGapValue:e[u]?.fallbackGapValue,hasLayoutSupport:e[u]?.hasLayoutSupport,styles:b}),Object.entries(m.elements??{}).forEach(([E,M])=>{M&&x.__EXPERIMENTAL_ELEMENTS[E]&&l.push({styles:M,selector:j(v,x.__EXPERIMENTAL_ELEMENTS[E])})}))})}),i.variations=c}typeof e!="string"&&e?.[n]?.selector&&o.push({duotoneSelector:e[n].duotoneSelector,fallbackGapValue:e[n].fallbackGapValue,hasLayoutSupport:e[n].hasLayoutSupport,selector:e[n].selector,styles:i,featureSelectors:e[n].featureSelectors,styleVariationSelectors:e[n].styleVariationSelectors,name:n}),Object.entries(a?.elements??{}).forEach(([c,d])=>{typeof e!="string"&&d&&e?.[n]&&x.__EXPERIMENTAL_ELEMENTS[c]&&o.push({styles:d,selector:e[n]?.selector.split(",").map(f=>x.__EXPERIMENTAL_ELEMENTS[c].split(",").map(g=>f+" "+g)).join(",")})}),o.push(...l)}),o},xt=(t,e)=>{let o=[];if(!t?.settings)return o;let r=i=>{let a={};return Y.forEach(({path:l})=>{let c=S(i,l,!1);c!==!1&&(a=rt(a,l,c))}),a},n=r(t.settings),s=t.settings?.custom;return(Object.keys(n).length>0||s)&&o.push({presets:n,custom:s,selector:X}),Object.entries(t.settings?.blocks??{}).forEach(([i,a])=>{let l=a.custom;if(typeof e=="string"||!e[i])return;let c=r(a);(Object.keys(c).length>0||l)&&o.push({presets:c,custom:l,selector:e[i]?.selector})}),o},$o=(t,e)=>{let o=xt(t,e),r="";return o.forEach(({presets:n,custom:s,selector:i})=>{let a=t?.settings?bo(n,t?.settings):[],l=be(s,"--wp--custom--","--");l.length>0&&a.push(...l),a.length>0&&(r+=`${i}{${a.join(";")};}`)}),r},_o=(t,e,o,r,n=!1,s=!1,i={})=>{let a={blockGap:!0,blockStyles:!0,layoutStyles:!0,marginReset:!0,presets:!0,rootPadding:!0,variationStyles:!1,...i},l=xo(t,e),c=xt(t,e),d=t?.settings?.useRootPaddingAwareAlignments,{contentSize:f,wideSize:p}=t?.settings?.layout||{},g=a.marginReset||a.rootPadding||a.layoutStyles,u="";if(a.presets&&(f||p)&&(u+=`${X} {`,u=f?u+` --wp--style--global--content-size: ${f};`:u,u=p?u+` --wp--style--global--wide-size: ${p};`:u,u+="}"),g&&(u+=":where(body) {margin: 0;",a.rootPadding&&d&&(u+=`padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }
				.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
				.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;
				`),u+="}"),a.blockStyles&&l.forEach(({selector:m,duotoneSelector:v,styles:y,fallbackGapValue:O,hasLayoutSupport:b,featureSelectors:E,styleVariationSelectors:M,skipSelectorWrapper:ut,name:D})=>{if(E){let $=me(E,y);$=ge($,t.settings,D),Object.entries($).forEach(([k,_])=>{if(_.length){let K=_.join(";");u+=`:root :where(${k}){${K};}`}})}if(v){let $={};y?.filter&&($.filter=y.filter,delete y.filter);let k=W($);k.length&&(u+=`${v}{${k.join(";")};}`)}!n&&(T===m||b)&&(u+=he({style:y,selector:m,hasBlockGapSupport:o,hasFallbackGapSupport:r,fallbackGapValue:O}));let At=W(y,m,d,t,s);if(At?.length){let $=ut?m:`:root :where(${m})`;u+=`${$}{${At.join(";")};}`}y?.css&&(u+=Et(y.css,`:root :where(${m})`)),a.variationStyles&&M&&Object.entries(M).forEach(([$,k])=>{let _=y?.variations?.[$];if(_){if(E){let L=me(E,_);L=ge(L,t.settings,D),Object.entries(L).forEach(([ft,Rt])=>{if(Rt.length){let Be=wo(ft,k),Ne=Rt.join(";");u+=`:root :where(${Be}){${Ne};}`}})}let K=W(_,k,d,t);if(K.length&&(u+=`:root :where(${k}){${K.join(";")};}`),_?.css&&(u+=Et(_.css,`:root :where(${k})`)),b&&_?.spacing?.blockGap){let L=k+m;u+=he({style:_,selector:L,hasBlockGapSupport:!0,hasFallbackGapSupport:r,fallbackGapValue:O})}}});let Ft=Object.entries(y).filter(([$])=>$.startsWith(":"));Ft?.length&&Ft.forEach(([$,k])=>{let _=W(k);if(!_?.length)return;let L=`:root :where(${m.split(",").map(ft=>ft+$).join(",")}){${_.join(";")};}`;u+=L})}),a.layoutStyles&&(u=u+".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",u=u+".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",u=u+".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),a.blockGap&&o){let m=wt(t?.styles?.spacing?.blockGap)||"0.5em";u=u+`:root :where(.wp-site-blocks) > * { margin-block-start: ${m}; margin-block-end: 0; }`,u=u+":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",u=u+":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return a.presets&&c.forEach(({selector:m,presets:v})=>{(T===m||X===m)&&(m="");let y=So(m,v);y.length>0&&(u+=y)}),u};function Oo(t,e){return xt(t,e).flatMap(({presets:r})=>vo(r))}var ko=(t,e)=>{if(t?.selectors&&Object.keys(t.selectors).length>0)return t.selectors;let o={root:e};return Object.entries(yo).forEach(([r,n])=>{let s=N(t,r);s&&(o[n]=s)}),o},Io=(t,e)=>{let{getBlockStyles:o}=(0,ye.select)(x.store),r={};return t.forEach(n=>{let s=n.name,i=N(n);if(!i)return;let a=N(n,"filter.duotone");if(!a){let g=N(n),u=(0,x.getBlockSupport)(n,"color.__experimentalDuotone",!1);a=u&&g&&j(g,u)}let l=!!n?.supports?.layout||!!n?.supports?.__experimentalLayout,c=n?.supports?.spacing?.blockGap?.__experimentalDefault,d=o(s),f={};d?.forEach(g=>{let u=e?`-${e}`:"",m=`${g.name}${u}`,v=Yt(m,i);f[m]=v});let p=ko(n,i);r[s]={duotoneSelector:a??void 0,fallbackGapValue:c,featureSelectors:Object.keys(p).length?p:void 0,hasLayoutSupport:l,name:s,selector:i,styleVariationSelectors:d?.length?f:void 0}}),r};function Po(t){let e=t.styles?.blocks,o=e?.["core/separator"];return o&&o.color?.background&&!o.color?.text&&!o.border?.color?{...t,styles:{...t.styles,blocks:{...e,"core/separator":{...o,color:{...o.color,text:o.color?.background}}}}}:t}function Et(t,e){let o="";return!t||t.trim()===""||t.split("&").forEach(n=>{if(!n||n.trim()==="")return;if(!n.includes("{"))o+=`:root :where(${e}){${n.trim()}}`;else{let i=n.replace("}","").split("{");if(i.length!==2)return;let[a,l]=i,c=a.match(/([>+~\s]*::[a-zA-Z-]+)/),d=c?c[1]:"",f=c?a.replace(d,"").trim():a.trim(),p;f===""?p=e:p=a.startsWith(" ")?j(e,f):Xt(e,f),o+=`:root :where(${p})${d}{${l.trim()}}`}}),o}function $t(t={},e=[],o={}){let{hasBlockGapSupport:r,hasFallbackGapSupport:n,disableLayoutStyles:s=!1,disableRootPadding:i=!1,styleOptions:a={}}=o,l=e.length>0?e:(0,x.getBlockTypes)(),c=Nt(t,"spacing.blockGap"),d=r??c!==null,f=n??!d;if(!t?.styles||!t?.settings)return[[],{}];let p=Po(t),g=Io(l),u=$o(p,g),m=_o(p,g,d,f,s,i,a),v=Oo(p,g),y=[{css:u,isGlobalStyles:!0},{css:m,isGlobalStyles:!0},{css:p?.styles?.css??"",isGlobalStyles:!0},{assets:v,__unstableType:"svg",isGlobalStyles:!0}];return l.forEach(O=>{let b=p?.styles?.blocks?.[O.name];if(b?.css){let E=g[O.name].selector;y.push({css:Et(b.css,E),isGlobalStyles:!0})}}),[y,p.settings]}var Oe=h(U(),1),_t=h(B(),1),ke=h(G(),1);var Se=h(U(),1),ve=h(G(),1),we=h(B(),1);function Ee(t){let{userGlobalStyles:e}=(0,ve.useSelect)(o=>{let{getEntityRecord:r,getEditedEntityRecord:n,canUser:s}=o(Se.store),i=s("update",{kind:"root",name:"globalStyles",id:t}),a;return typeof i=="boolean"&&(i?a=n("root","globalStyles",t):a=r("root","globalStyles",t,{context:"view"})),{userGlobalStyles:a}},[t]);return(0,we.useMemo)(()=>e?{user:e}:{user:void 0},[e])}var _e=h($e(),1),{unlock:F}=(0,_e.__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/lazy-editor");function at({stylesId:t}){let{editorSettings:e}=(0,ke.useSelect)(i=>({editorSettings:F(i(Oe.store)).getEditorSettings()}),[]),{user:o}=Ee(t),[r]=$t(o),n=!!e,s=(0,_t.useMemo)(()=>n?[...e?.styles??[],...r]:[],[n,e?.styles,r]);return{isReady:n,editorSettings:(0,_t.useMemo)(()=>({...e??{},styles:s}),[e,s])}}function jo(t){if(!t||Object.keys(t).length===0)return;let e=document.querySelector("script#wp-importmap[type=importmap]");if(e)try{let o=JSON.parse(e.text);o.imports||(o.imports={}),o.imports={...o.imports,...t},e.text=JSON.stringify(o,null,2)}catch(o){console.error("Failed to parse or update import map:",o)}else{let o=document.createElement("script");o.type="importmap",o.id="wp-importmap",o.text=JSON.stringify({imports:t},null,2),document.head.appendChild(o)}}function Ao(t,e){return new Promise(o=>{if(!e.src){o();return}if(document.getElementById(t+"-css")){o();return}let n=document.createElement("link");n.rel="stylesheet",n.href=e.src+(e.version?"?ver="+e.version:""),n.id=t+"-css",n.media=e.media||"all",n.onload=()=>o(),n.onerror=()=>{console.error(`Failed to load stylesheet: ${t}`),o()},document.head.appendChild(n)})}function Fo(t,e){if(!e.src){let r=document.createElement("script");return r.id=t+"-js",r.textContent="// Processed: "+t,r}let o=document.createElement("script");return o.src=e.src+(e.version?"?ver="+e.version:""),o.id=t+"-js",o.async=!1,o}function Ie(t,e,o){let r="";if(Array.isArray(e)?r=e.join(`
`):typeof e=="string"&&(r=e),r&&r.trim()){let n=t+"-"+o+"-inline-css";if(!document.getElementById(n)){let s=document.createElement("style");s.id=n,s.textContent=r.trim(),document.head.appendChild(s)}}}function Pe(t,e,o){let r=e;Array.isArray(r)&&(r=r.join(`
`));let n=document.createElement("script");return n.id=t+"-"+o+"-js",n.textContent=r.trim(),n}function je(t){let e=new Set,o=new Set,r=[];function n(s){if(!e.has(s)){if(o.has(s)){console.warn(`Circular dependency detected for handle: ${s}`);return}o.add(s),t[s]&&(t[s].deps||[]).forEach(a=>{t[a]&&n(a)}),o.delete(s),e.add(s),t[s]&&r.push(s)}}return Object.keys(t).forEach(s=>{n(s)}),r}async function Ro(t,e){let o=[];for(let r of t){if(r.src){let n=Promise.withResolvers();r.onload=()=>n.resolve(),r.onerror=()=>{console.error(`Failed to load script: ${r.id}`),n.resolve()},o.push(n.promise)}else await Promise.all(o),o=[];e.appendChild(r)}await Promise.all(o),o=[]}async function To(t,e,o,r,n,s){s&&jo(s);let i=je(o),a=je(t),l=[];for(let f of i){let p=r.before?.[f];p&&Ie(f,p,"before"),l.push(Ao(f,o[f]));let g=r.after?.[f];g&&Ie(f,g,"after")}let c=[];for(let f of a){let p=e.before?.[f];p&&c.push(Pe(f,p,"before")),c.push(Fo(f,t[f]));let g=e.after?.[f];g&&c.push(Pe(f,g,"after"))}let d=Ro(c,document.body);await Promise.all([Promise.all(l),d]),n&&n.length>0&&n.forEach(f=>{let p=f.match(/<script([^>]*)>(.*?)<\/script>/is);if(p){let g=p[1],u=p[2],m=document.createElement("script"),v=g.match(/id=["']([^"']+)["']/);v&&(m.id=v[1]);let y=g.match(/type=["']([^"']+)["']/);y&&(m.type=y[1]),m.textContent=u,document.body.appendChild(m)}})}var Ae=To;var kt=h(U(),1),lt=h(B(),1),ct=h(G(),1);var Ot;async function Fe(){return Ot||(Ot=(async()=>{let e=await F((0,ct.resolveSelect)(kt.store)).getEditorAssets();await Ae(e.scripts||{},e.inline_scripts||{before:{},after:{}},e.styles||{},e.inline_styles||{before:{},after:{}},e.html_templates||[],e.script_modules||{})})()),Ot}function q(){let t=(0,ct.useSelect)(r=>F(r(kt.store)).getEditorAssets(),[]),[e,o]=(0,lt.useState)(!1);return(0,lt.useEffect)(()=>{t&&!e&&Fe().then(()=>{o(!0)}).catch(r=>{console.error("Failed to load editor assets:",r)})},[t,e]),{isReady:!!t&&e,assetsLoaded:e}}var Q=h(It(),1),{Editor:Co,BackButton:Vo}=F(Te.privateApis);function zo({postType:t,postId:e,settings:o,backButton:r}){let n=(0,jt.useSelect)(g=>{if(t||e)return null;let{getHomePage:u}=F(g(Pt.store));return u()},[t,e]),s=t||n?.postType,i=e||n?.postId,a=(0,jt.useSelect)(g=>{if(!(!s||!i))return s==="wp_template"?i:F(g(Pt.store)).getTemplateId(s,i)},[s,i]),l=ot({templateId:a}),{isReady:c,editorSettings:d}=at({stylesId:l}),{isReady:f}=q(),p=(0,Ve.useMemo)(()=>({...d,...o}),[d,o]);return!c||!f?(0,Q.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,Q.jsx)(Ce.Spinner,{})}):(0,Q.jsx)(Co,{postType:s,postId:i,templateId:a,settings:p,styles:p.styles,children:r&&(0,Q.jsx)(Vo,{children:r})})}var Le=h(Jt(),1),et=h(B(),1),tt=h(Me(),1),Ge=h(pt(),1),Ue=h(ht(),1);var z=h(It(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='5619aa31a1']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","5619aa31a1"),t.appendChild(document.createTextNode(".lazy-editor-block-preview__container{align-items:center;border-radius:4px;display:flex;flex-direction:column;height:100%;justify-content:center}.dataviews-view-grid .lazy-editor-block-preview__container .block-editor-block-preview__container{height:100%}.dataviews-view-table .lazy-editor-block-preview__container{text-wrap:balance;text-wrap:pretty;flex-grow:0;width:96px}")),document.head.appendChild(t)}var{useStyle:Mo}=F(Ge.privateApis);function Lo({blocks:t,content:e,description:o}){let r=(0,et.useId)(),n=Mo("color.background"),s=(0,et.useMemo)(()=>t??(0,Ue.parse)(e,{__unstableSkipMigrationLogs:!0}),[e,t]),i=!s?.length;return(0,z.jsxs)("div",{className:"lazy-editor-block-preview__container",style:{backgroundColor:n},"aria-describedby":o?r:void 0,children:[i&&(0,Le.__)("Empty."),!i&&(0,z.jsx)(tt.BlockPreview.Async,{children:(0,z.jsx)(tt.BlockPreview,{blocks:s})}),!!o&&(0,z.jsx)("div",{hidden:!0,id:r,children:o})]})}function Go({blocks:t,content:e,description:o}){let r=ot(),{isReady:n,editorSettings:s}=at({stylesId:r}),{isReady:i}=q(),a=(0,et.useMemo)(()=>({...s,isPreviewMode:!0}),[s]);return!n||!i?null:(0,z.jsx)(tt.BlockEditorProvider,{settings:a,children:(0,z.jsx)(Lo,{blocks:t,content:e,description:o})})}export{zo as Editor,Go as Preview,Fe as loadEditorAssets,q as useEditorAssets};
                                                                                                                                                                                                                  dist/script-modules/lazy-editor/index.js                                                            0000644                 00000257411 15212564032 0014403 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));

// package-external:@wordpress/editor
var require_editor = __commonJS({
  "package-external:@wordpress/editor"(exports, module) {
    module.exports = window.wp.editor;
  }
});

// package-external:@wordpress/core-data
var require_core_data = __commonJS({
  "package-external:@wordpress/core-data"(exports, module) {
    module.exports = window.wp.coreData;
  }
});

// package-external:@wordpress/data
var require_data = __commonJS({
  "package-external:@wordpress/data"(exports, module) {
    module.exports = window.wp.data;
  }
});

// package-external:@wordpress/components
var require_components = __commonJS({
  "package-external:@wordpress/components"(exports, module) {
    module.exports = window.wp.components;
  }
});

// package-external:@wordpress/element
var require_element = __commonJS({
  "package-external:@wordpress/element"(exports, module) {
    module.exports = window.wp.element;
  }
});

// package-external:@wordpress/style-engine
var require_style_engine = __commonJS({
  "package-external:@wordpress/style-engine"(exports, module) {
    module.exports = window.wp.styleEngine;
  }
});

// package-external:@wordpress/i18n
var require_i18n = __commonJS({
  "package-external:@wordpress/i18n"(exports, module) {
    module.exports = window.wp.i18n;
  }
});

// package-external:@wordpress/blocks
var require_blocks = __commonJS({
  "package-external:@wordpress/blocks"(exports, module) {
    module.exports = window.wp.blocks;
  }
});

// package-external:@wordpress/private-apis
var require_private_apis = __commonJS({
  "package-external:@wordpress/private-apis"(exports, module) {
    module.exports = window.wp.privateApis;
  }
});

// vendor-external:react/jsx-runtime
var require_jsx_runtime = __commonJS({
  "vendor-external:react/jsx-runtime"(exports, module) {
    module.exports = window.ReactJSXRuntime;
  }
});

// package-external:@wordpress/block-editor
var require_block_editor = __commonJS({
  "package-external:@wordpress/block-editor"(exports, module) {
    module.exports = window.wp.blockEditor;
  }
});

// packages/lazy-editor/build-module/components/editor/index.mjs
var import_editor = __toESM(require_editor(), 1);
var import_core_data5 = __toESM(require_core_data(), 1);
var import_data6 = __toESM(require_data(), 1);
var import_components = __toESM(require_components(), 1);
var import_element4 = __toESM(require_element(), 1);

// packages/lazy-editor/build-module/hooks/use-styles-id.mjs
var import_core_data = __toESM(require_core_data(), 1);
var import_data = __toESM(require_data(), 1);
function useStylesId({ templateId } = {}) {
  const { globalStylesId, stylesId } = (0, import_data.useSelect)(
    (select2) => {
      const coreDataSelect = select2(import_core_data.store);
      const template = templateId ? coreDataSelect.getEntityRecord(
        "postType",
        "wp_template",
        templateId
      ) : null;
      return {
        globalStylesId: coreDataSelect.__experimentalGetCurrentGlobalStylesId(),
        stylesId: template?.styles_id
      };
    },
    [templateId]
  );
  return stylesId || globalStylesId;
}

// packages/global-styles-engine/build-module/utils/object.mjs
function setImmutably(object, path, value) {
  path = Array.isArray(path) ? [...path] : [path];
  object = Array.isArray(object) ? [...object] : { ...object };
  const leaf = path.pop();
  let prev = object;
  for (const key of path) {
    const lvl = prev[key];
    prev = prev[key] = Array.isArray(lvl) ? [...lvl] : { ...lvl };
  }
  prev[leaf] = value;
  return object;
}
var getValueFromObjectPath = (object, path, defaultValue) => {
  const arrayPath = Array.isArray(path) ? path : path.split(".");
  let value = object;
  arrayPath.forEach((fieldName) => {
    value = value?.[fieldName];
  });
  return value ?? defaultValue;
};

// packages/global-styles-engine/build-module/settings/get-setting.mjs
var VALID_SETTINGS = [
  "appearanceTools",
  "useRootPaddingAwareAlignments",
  "background.backgroundImage",
  "background.backgroundRepeat",
  "background.backgroundSize",
  "background.backgroundPosition",
  "border.color",
  "border.radius",
  "border.radiusSizes",
  "border.style",
  "border.width",
  "shadow.presets",
  "shadow.defaultPresets",
  "color.background",
  "color.button",
  "color.caption",
  "color.custom",
  "color.customDuotone",
  "color.customGradient",
  "color.defaultDuotone",
  "color.defaultGradients",
  "color.defaultPalette",
  "color.duotone",
  "color.gradients",
  "color.heading",
  "color.link",
  "color.palette",
  "color.text",
  "custom",
  "dimensions.aspectRatio",
  "dimensions.height",
  "dimensions.minHeight",
  "dimensions.width",
  "dimensions.dimensionSizes",
  "layout.contentSize",
  "layout.definitions",
  "layout.wideSize",
  "lightbox.enabled",
  "lightbox.allowEditing",
  "position.fixed",
  "position.sticky",
  "spacing.customSpacingSize",
  "spacing.defaultSpacingSizes",
  "spacing.spacingSizes",
  "spacing.spacingScale",
  "spacing.blockGap",
  "spacing.margin",
  "spacing.padding",
  "spacing.units",
  "typography.fluid",
  "typography.customFontSize",
  "typography.defaultFontSizes",
  "typography.dropCap",
  "typography.fontFamilies",
  "typography.fontSizes",
  "typography.fontStyle",
  "typography.fontWeight",
  "typography.letterSpacing",
  "typography.lineHeight",
  "typography.textAlign",
  "typography.textColumns",
  "typography.textDecoration",
  "typography.textIndent",
  "typography.textTransform",
  "typography.writingMode"
];
function getSetting(globalStyles, path, blockName) {
  const appendedBlockPath = blockName ? ".blocks." + blockName : "";
  const appendedPropertyPath = path ? "." + path : "";
  const contextualPath = `settings${appendedBlockPath}${appendedPropertyPath}`;
  const globalPath = `settings${appendedPropertyPath}`;
  if (path) {
    return getValueFromObjectPath(globalStyles, contextualPath) ?? getValueFromObjectPath(globalStyles, globalPath);
  }
  let result = {};
  VALID_SETTINGS.forEach((setting) => {
    const value = getValueFromObjectPath(
      globalStyles,
      `settings${appendedBlockPath}.${setting}`
    ) ?? getValueFromObjectPath(globalStyles, `settings.${setting}`);
    if (value !== void 0) {
      result = setImmutably(result, setting.split("."), value);
    }
  });
  return result;
}

// packages/global-styles-engine/build-module/utils/common.mjs
var import_style_engine = __toESM(require_style_engine(), 1);

// packages/global-styles-engine/build-module/utils/fluid.mjs
var DEFAULT_MAXIMUM_VIEWPORT_WIDTH = "1600px";
var DEFAULT_MINIMUM_VIEWPORT_WIDTH = "320px";
var DEFAULT_SCALE_FACTOR = 1;
var DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN = 0.25;
var DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX = 0.75;
var DEFAULT_MINIMUM_FONT_SIZE_LIMIT = "14px";
function getComputedFluidTypographyValue({
  minimumFontSize,
  maximumFontSize,
  fontSize,
  minimumViewportWidth = DEFAULT_MINIMUM_VIEWPORT_WIDTH,
  maximumViewportWidth = DEFAULT_MAXIMUM_VIEWPORT_WIDTH,
  scaleFactor = DEFAULT_SCALE_FACTOR,
  minimumFontSizeLimit
}) {
  minimumFontSizeLimit = !!getTypographyValueAndUnit(minimumFontSizeLimit) ? minimumFontSizeLimit : DEFAULT_MINIMUM_FONT_SIZE_LIMIT;
  if (fontSize) {
    const fontSizeParsed = getTypographyValueAndUnit(fontSize);
    if (!fontSizeParsed?.unit || !fontSizeParsed?.value) {
      return null;
    }
    const minimumFontSizeLimitParsed = getTypographyValueAndUnit(
      minimumFontSizeLimit,
      {
        coerceTo: fontSizeParsed.unit
      }
    );
    if (!!minimumFontSizeLimitParsed?.value && !minimumFontSize && !maximumFontSize) {
      if (fontSizeParsed?.value <= minimumFontSizeLimitParsed?.value) {
        return null;
      }
    }
    if (!maximumFontSize) {
      maximumFontSize = `${fontSizeParsed.value}${fontSizeParsed.unit}`;
    }
    if (!minimumFontSize) {
      const fontSizeValueInPx = fontSizeParsed.unit === "px" ? fontSizeParsed.value : fontSizeParsed.value * 16;
      const minimumFontSizeFactor = Math.min(
        Math.max(
          1 - 0.075 * Math.log2(fontSizeValueInPx),
          DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN
        ),
        DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX
      );
      const calculatedMinimumFontSize = roundToPrecision(
        fontSizeParsed.value * minimumFontSizeFactor,
        3
      );
      if (!!minimumFontSizeLimitParsed?.value && calculatedMinimumFontSize < minimumFontSizeLimitParsed?.value) {
        minimumFontSize = `${minimumFontSizeLimitParsed.value}${minimumFontSizeLimitParsed.unit}`;
      } else {
        minimumFontSize = `${calculatedMinimumFontSize}${fontSizeParsed.unit}`;
      }
    }
  }
  const minimumFontSizeParsed = getTypographyValueAndUnit(minimumFontSize);
  const fontSizeUnit = minimumFontSizeParsed?.unit || "rem";
  const maximumFontSizeParsed = getTypographyValueAndUnit(maximumFontSize, {
    coerceTo: fontSizeUnit
  });
  if (!minimumFontSizeParsed || !maximumFontSizeParsed) {
    return null;
  }
  const minimumFontSizeRem = getTypographyValueAndUnit(minimumFontSize, {
    coerceTo: "rem"
  });
  const maximumViewportWidthParsed = getTypographyValueAndUnit(
    maximumViewportWidth,
    { coerceTo: fontSizeUnit }
  );
  const minimumViewportWidthParsed = getTypographyValueAndUnit(
    minimumViewportWidth,
    { coerceTo: fontSizeUnit }
  );
  if (!maximumViewportWidthParsed || !minimumViewportWidthParsed || !minimumFontSizeRem) {
    return null;
  }
  const linearDenominator = maximumViewportWidthParsed.value - minimumViewportWidthParsed.value;
  if (!linearDenominator) {
    return null;
  }
  const minViewportWidthOffsetValue = roundToPrecision(
    minimumViewportWidthParsed.value / 100,
    3
  );
  const viewportWidthOffset = roundToPrecision(minViewportWidthOffsetValue, 3) + fontSizeUnit;
  const linearFactor = 100 * ((maximumFontSizeParsed.value - minimumFontSizeParsed.value) / linearDenominator);
  const linearFactorScaled = roundToPrecision(
    (linearFactor || 1) * scaleFactor,
    3
  );
  const fluidTargetFontSize = `${minimumFontSizeRem.value}${minimumFontSizeRem.unit} + ((1vw - ${viewportWidthOffset}) * ${linearFactorScaled})`;
  return `clamp(${minimumFontSize}, ${fluidTargetFontSize}, ${maximumFontSize})`;
}
function getTypographyValueAndUnit(rawValue, options = {}) {
  if (typeof rawValue !== "string" && typeof rawValue !== "number") {
    return null;
  }
  if (isFinite(rawValue)) {
    rawValue = `${rawValue}px`;
  }
  const { coerceTo, rootSizeValue, acceptableUnits } = {
    coerceTo: "",
    // Default browser font size. Later we could inject some JS to compute this `getComputedStyle( document.querySelector( "html" ) ).fontSize`.
    rootSizeValue: 16,
    acceptableUnits: ["rem", "px", "em"],
    ...options
  };
  const acceptableUnitsGroup = acceptableUnits?.join("|");
  const regexUnits = new RegExp(
    `^(\\d*\\.?\\d+)(${acceptableUnitsGroup}){1,1}$`
  );
  const matches = rawValue.toString().match(regexUnits);
  if (!matches || matches.length < 3) {
    return null;
  }
  let [, value, unit] = matches;
  let returnValue = parseFloat(value);
  if ("px" === coerceTo && ("em" === unit || "rem" === unit)) {
    returnValue = returnValue * rootSizeValue;
    unit = coerceTo;
  }
  if ("px" === unit && ("em" === coerceTo || "rem" === coerceTo)) {
    returnValue = returnValue / rootSizeValue;
    unit = coerceTo;
  }
  if (("em" === coerceTo || "rem" === coerceTo) && ("em" === unit || "rem" === unit)) {
    unit = coerceTo;
  }
  if (!unit) {
    return null;
  }
  return {
    value: roundToPrecision(returnValue, 3),
    unit
  };
}
function roundToPrecision(value, digits = 3) {
  const base = Math.pow(10, digits);
  return Math.round(value * base) / base;
}

// packages/global-styles-engine/build-module/utils/typography.mjs
function isFluidTypographyEnabled(typographySettings) {
  const fluidSettings = typographySettings?.fluid;
  return true === fluidSettings || fluidSettings && typeof fluidSettings === "object" && Object.keys(fluidSettings).length > 0;
}
function getFluidTypographyOptionsFromSettings(settings) {
  const typographySettings = settings?.typography ?? {};
  const layoutSettings = settings?.layout;
  const defaultMaxViewportWidth = getTypographyValueAndUnit(
    layoutSettings?.wideSize
  ) ? layoutSettings?.wideSize : null;
  return isFluidTypographyEnabled(typographySettings) && defaultMaxViewportWidth ? {
    fluid: {
      maxViewportWidth: defaultMaxViewportWidth,
      ...typeof typographySettings.fluid === "object" ? typographySettings.fluid : {}
    }
  } : {
    fluid: typographySettings?.fluid
  };
}
function getTypographyFontSizeValue(preset, settings) {
  const { size: defaultSize } = preset;
  if (!defaultSize || "0" === defaultSize || false === preset?.fluid) {
    return defaultSize;
  }
  if (!isFluidTypographyEnabled(settings?.typography) && !isFluidTypographyEnabled(preset)) {
    return defaultSize;
  }
  const fluidTypographySettings = getFluidTypographyOptionsFromSettings(settings)?.fluid ?? {};
  const fluidFontSizeValue = getComputedFluidTypographyValue({
    minimumFontSize: typeof preset?.fluid === "boolean" ? void 0 : preset?.fluid?.min,
    maximumFontSize: typeof preset?.fluid === "boolean" ? void 0 : preset?.fluid?.max,
    fontSize: defaultSize,
    minimumFontSizeLimit: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.minFontSize : void 0,
    maximumViewportWidth: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.maxViewportWidth : void 0,
    minimumViewportWidth: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.minViewportWidth : void 0
  });
  if (!!fluidFontSizeValue) {
    return fluidFontSizeValue;
  }
  return defaultSize;
}

// packages/global-styles-engine/build-module/utils/common.mjs
var ROOT_BLOCK_SELECTOR = "body";
var ROOT_CSS_PROPERTIES_SELECTOR = ":root";
var PRESET_METADATA = [
  {
    path: ["color", "palette"],
    valueKey: "color",
    cssVarInfix: "color",
    classes: [
      { classSuffix: "color", propertyName: "color" },
      {
        classSuffix: "background-color",
        propertyName: "background-color"
      },
      {
        classSuffix: "border-color",
        propertyName: "border-color"
      }
    ]
  },
  {
    path: ["color", "gradients"],
    valueKey: "gradient",
    cssVarInfix: "gradient",
    classes: [
      {
        classSuffix: "gradient-background",
        propertyName: "background"
      }
    ]
  },
  {
    path: ["color", "duotone"],
    valueKey: "colors",
    cssVarInfix: "duotone",
    valueFunc: ({ slug }) => `url( '#wp-duotone-${slug}' )`,
    classes: []
  },
  {
    path: ["shadow", "presets"],
    valueKey: "shadow",
    cssVarInfix: "shadow",
    classes: []
  },
  {
    path: ["typography", "fontSizes"],
    valueFunc: (preset, settings) => getTypographyFontSizeValue(preset, settings),
    valueKey: "size",
    cssVarInfix: "font-size",
    classes: [{ classSuffix: "font-size", propertyName: "font-size" }]
  },
  {
    path: ["typography", "fontFamilies"],
    valueKey: "fontFamily",
    cssVarInfix: "font-family",
    classes: [
      { classSuffix: "font-family", propertyName: "font-family" }
    ]
  },
  {
    path: ["spacing", "spacingSizes"],
    valueKey: "size",
    cssVarInfix: "spacing",
    valueFunc: ({ size }) => size,
    classes: []
  },
  {
    path: ["border", "radiusSizes"],
    valueKey: "size",
    cssVarInfix: "border-radius",
    classes: []
  },
  {
    path: ["dimensions", "dimensionSizes"],
    valueKey: "size",
    cssVarInfix: "dimension",
    classes: []
  }
];
function scopeSelector(scope, selector) {
  if (!scope || !selector) {
    return selector;
  }
  const scopes = scope.split(",");
  const selectors = selector.split(",");
  const selectorsScoped = [];
  scopes.forEach((outer) => {
    selectors.forEach((inner) => {
      selectorsScoped.push(`${outer.trim()} ${inner.trim()}`);
    });
  });
  return selectorsScoped.join(", ");
}
function scopeFeatureSelectors(scope, selectors) {
  if (!scope || !selectors) {
    return;
  }
  const featureSelectors = {};
  Object.entries(selectors).forEach(([feature, selector]) => {
    if (typeof selector === "string") {
      featureSelectors[feature] = scopeSelector(scope, selector);
    }
    if (typeof selector === "object") {
      featureSelectors[feature] = {};
      Object.entries(selector).forEach(
        ([subfeature, subfeatureSelector]) => {
          featureSelectors[feature][subfeature] = scopeSelector(
            scope,
            subfeatureSelector
          );
        }
      );
    }
  });
  return featureSelectors;
}
function appendToSelector(selector, toAppend) {
  if (!selector.includes(",")) {
    return selector + toAppend;
  }
  const selectors = selector.split(",");
  const newSelectors = selectors.map((sel) => sel + toAppend);
  return newSelectors.join(",");
}
function getBlockStyleVariationSelector(variation, blockSelector) {
  const variationClass = `.is-style-${variation}`;
  if (!blockSelector) {
    return variationClass;
  }
  const ancestorRegex = /((?::\([^)]+\))?\s*)([^\s:]+)/;
  const addVariationClass = (_match, group1, group2) => {
    return group1 + group2 + variationClass;
  };
  const result = blockSelector.split(",").map((part) => part.replace(ancestorRegex, addVariationClass));
  return result.join(",");
}
function getResolvedRefValue(ruleValue, tree) {
  if (!ruleValue || !tree) {
    return ruleValue;
  }
  if (typeof ruleValue === "object" && "ref" in ruleValue && ruleValue?.ref) {
    const resolvedRuleValue = (0, import_style_engine.getCSSValueFromRawStyle)(
      getValueFromObjectPath(tree, ruleValue.ref)
    );
    if (typeof resolvedRuleValue === "object" && resolvedRuleValue !== null && "ref" in resolvedRuleValue && resolvedRuleValue?.ref) {
      return void 0;
    }
    if (resolvedRuleValue === void 0) {
      return ruleValue;
    }
    return resolvedRuleValue;
  }
  return ruleValue;
}
function getResolvedThemeFilePath(file, themeFileURIs) {
  if (!file || !themeFileURIs || !Array.isArray(themeFileURIs)) {
    return file;
  }
  const uri = themeFileURIs.find(
    (themeFileUri) => themeFileUri?.name === file
  );
  if (!uri?.href) {
    return file;
  }
  return uri?.href;
}
function getResolvedValue(ruleValue, tree) {
  if (!ruleValue || !tree) {
    return ruleValue;
  }
  const resolvedValue = getResolvedRefValue(ruleValue, tree);
  if (typeof resolvedValue === "object" && resolvedValue !== null && "url" in resolvedValue && resolvedValue?.url) {
    resolvedValue.url = getResolvedThemeFilePath(
      resolvedValue.url,
      tree?._links?.["wp:theme-file"]
    );
  }
  return resolvedValue;
}

// packages/global-styles-engine/build-module/core/render.mjs
var import_blocks = __toESM(require_blocks(), 1);
var import_style_engine2 = __toESM(require_style_engine(), 1);
var import_data2 = __toESM(require_data(), 1);

// packages/global-styles-engine/build-module/core/selectors.mjs
function getBlockSelector(blockType, target = "root", options = {}) {
  if (!target) {
    return null;
  }
  const { fallback = false } = options;
  const { name, selectors, supports } = blockType;
  const hasSelectors = selectors && Object.keys(selectors).length > 0;
  const path = Array.isArray(target) ? target.join(".") : target;
  let rootSelector = null;
  if (hasSelectors && selectors.root) {
    rootSelector = selectors?.root;
  } else if (supports?.__experimentalSelector) {
    rootSelector = supports.__experimentalSelector;
  } else {
    rootSelector = ".wp-block-" + name.replace("core/", "").replace("/", "-");
  }
  if (path === "root") {
    return rootSelector;
  }
  const pathArray = Array.isArray(target) ? target : target.split(".");
  if (pathArray.length === 1) {
    const fallbackSelector = fallback ? rootSelector : null;
    if (hasSelectors) {
      const featureSelector2 = getValueFromObjectPath(
        selectors,
        `${path}.root`,
        null
      ) || getValueFromObjectPath(selectors, path, null);
      return featureSelector2 || fallbackSelector;
    }
    const featureSelector = supports ? getValueFromObjectPath(
      supports,
      `${path}.__experimentalSelector`,
      null
    ) : void 0;
    if (!featureSelector) {
      return fallbackSelector;
    }
    return scopeSelector(rootSelector, featureSelector);
  }
  let subfeatureSelector;
  if (hasSelectors) {
    subfeatureSelector = getValueFromObjectPath(selectors, path, null);
  }
  if (subfeatureSelector) {
    return subfeatureSelector;
  }
  if (fallback) {
    return getBlockSelector(blockType, pathArray[0], options);
  }
  return null;
}

// node_modules/colord/index.mjs
var r = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) };
var t = function(r2) {
  return "string" == typeof r2 ? r2.length > 0 : "number" == typeof r2;
};
var n = function(r2, t2, n2) {
  return void 0 === t2 && (t2 = 0), void 0 === n2 && (n2 = Math.pow(10, t2)), Math.round(n2 * r2) / n2 + 0;
};
var e = function(r2, t2, n2) {
  return void 0 === t2 && (t2 = 0), void 0 === n2 && (n2 = 1), r2 > n2 ? n2 : r2 > t2 ? r2 : t2;
};
var u = function(r2) {
  return (r2 = isFinite(r2) ? r2 % 360 : 0) > 0 ? r2 : r2 + 360;
};
var a = function(r2) {
  return { r: e(r2.r, 0, 255), g: e(r2.g, 0, 255), b: e(r2.b, 0, 255), a: e(r2.a) };
};
var o = function(r2) {
  return { r: n(r2.r), g: n(r2.g), b: n(r2.b), a: n(r2.a, 3) };
};
var i = /^#([0-9a-f]{3,8})$/i;
var s = function(r2) {
  var t2 = r2.toString(16);
  return t2.length < 2 ? "0" + t2 : t2;
};
var h = function(r2) {
  var t2 = r2.r, n2 = r2.g, e2 = r2.b, u2 = r2.a, a2 = Math.max(t2, n2, e2), o2 = a2 - Math.min(t2, n2, e2), i2 = o2 ? a2 === t2 ? (n2 - e2) / o2 : a2 === n2 ? 2 + (e2 - t2) / o2 : 4 + (t2 - n2) / o2 : 0;
  return { h: 60 * (i2 < 0 ? i2 + 6 : i2), s: a2 ? o2 / a2 * 100 : 0, v: a2 / 255 * 100, a: u2 };
};
var b = function(r2) {
  var t2 = r2.h, n2 = r2.s, e2 = r2.v, u2 = r2.a;
  t2 = t2 / 360 * 6, n2 /= 100, e2 /= 100;
  var a2 = Math.floor(t2), o2 = e2 * (1 - n2), i2 = e2 * (1 - (t2 - a2) * n2), s2 = e2 * (1 - (1 - t2 + a2) * n2), h2 = a2 % 6;
  return { r: 255 * [e2, i2, o2, o2, s2, e2][h2], g: 255 * [s2, e2, e2, i2, o2, o2][h2], b: 255 * [o2, o2, s2, e2, e2, i2][h2], a: u2 };
};
var g = function(r2) {
  return { h: u(r2.h), s: e(r2.s, 0, 100), l: e(r2.l, 0, 100), a: e(r2.a) };
};
var d = function(r2) {
  return { h: n(r2.h), s: n(r2.s), l: n(r2.l), a: n(r2.a, 3) };
};
var f = function(r2) {
  return b((n2 = (t2 = r2).s, { h: t2.h, s: (n2 *= ((e2 = t2.l) < 50 ? e2 : 100 - e2) / 100) > 0 ? 2 * n2 / (e2 + n2) * 100 : 0, v: e2 + n2, a: t2.a }));
  var t2, n2, e2;
};
var c = function(r2) {
  return { h: (t2 = h(r2)).h, s: (u2 = (200 - (n2 = t2.s)) * (e2 = t2.v) / 100) > 0 && u2 < 200 ? n2 * e2 / 100 / (u2 <= 100 ? u2 : 200 - u2) * 100 : 0, l: u2 / 2, a: t2.a };
  var t2, n2, e2, u2;
};
var l = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
var p = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
var v = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
var m = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
var y = { string: [[function(r2) {
  var t2 = i.exec(r2);
  return t2 ? (r2 = t2[1]).length <= 4 ? { r: parseInt(r2[0] + r2[0], 16), g: parseInt(r2[1] + r2[1], 16), b: parseInt(r2[2] + r2[2], 16), a: 4 === r2.length ? n(parseInt(r2[3] + r2[3], 16) / 255, 2) : 1 } : 6 === r2.length || 8 === r2.length ? { r: parseInt(r2.substr(0, 2), 16), g: parseInt(r2.substr(2, 2), 16), b: parseInt(r2.substr(4, 2), 16), a: 8 === r2.length ? n(parseInt(r2.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
}, "hex"], [function(r2) {
  var t2 = v.exec(r2) || m.exec(r2);
  return t2 ? t2[2] !== t2[4] || t2[4] !== t2[6] ? null : a({ r: Number(t2[1]) / (t2[2] ? 100 / 255 : 1), g: Number(t2[3]) / (t2[4] ? 100 / 255 : 1), b: Number(t2[5]) / (t2[6] ? 100 / 255 : 1), a: void 0 === t2[7] ? 1 : Number(t2[7]) / (t2[8] ? 100 : 1) }) : null;
}, "rgb"], [function(t2) {
  var n2 = l.exec(t2) || p.exec(t2);
  if (!n2) return null;
  var e2, u2, a2 = g({ h: (e2 = n2[1], u2 = n2[2], void 0 === u2 && (u2 = "deg"), Number(e2) * (r[u2] || 1)), s: Number(n2[3]), l: Number(n2[4]), a: void 0 === n2[5] ? 1 : Number(n2[5]) / (n2[6] ? 100 : 1) });
  return f(a2);
}, "hsl"]], object: [[function(r2) {
  var n2 = r2.r, e2 = r2.g, u2 = r2.b, o2 = r2.a, i2 = void 0 === o2 ? 1 : o2;
  return t(n2) && t(e2) && t(u2) ? a({ r: Number(n2), g: Number(e2), b: Number(u2), a: Number(i2) }) : null;
}, "rgb"], [function(r2) {
  var n2 = r2.h, e2 = r2.s, u2 = r2.l, a2 = r2.a, o2 = void 0 === a2 ? 1 : a2;
  if (!t(n2) || !t(e2) || !t(u2)) return null;
  var i2 = g({ h: Number(n2), s: Number(e2), l: Number(u2), a: Number(o2) });
  return f(i2);
}, "hsl"], [function(r2) {
  var n2 = r2.h, a2 = r2.s, o2 = r2.v, i2 = r2.a, s2 = void 0 === i2 ? 1 : i2;
  if (!t(n2) || !t(a2) || !t(o2)) return null;
  var h2 = (function(r3) {
    return { h: u(r3.h), s: e(r3.s, 0, 100), v: e(r3.v, 0, 100), a: e(r3.a) };
  })({ h: Number(n2), s: Number(a2), v: Number(o2), a: Number(s2) });
  return b(h2);
}, "hsv"]] };
var N = function(r2, t2) {
  for (var n2 = 0; n2 < t2.length; n2++) {
    var e2 = t2[n2][0](r2);
    if (e2) return [e2, t2[n2][1]];
  }
  return [null, void 0];
};
var x = function(r2) {
  return "string" == typeof r2 ? N(r2.trim(), y.string) : "object" == typeof r2 && null !== r2 ? N(r2, y.object) : [null, void 0];
};
var M = function(r2, t2) {
  var n2 = c(r2);
  return { h: n2.h, s: e(n2.s + 100 * t2, 0, 100), l: n2.l, a: n2.a };
};
var H = function(r2) {
  return (299 * r2.r + 587 * r2.g + 114 * r2.b) / 1e3 / 255;
};
var $ = function(r2, t2) {
  var n2 = c(r2);
  return { h: n2.h, s: n2.s, l: e(n2.l + 100 * t2, 0, 100), a: n2.a };
};
var j = (function() {
  function r2(r3) {
    this.parsed = x(r3)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
  }
  return r2.prototype.isValid = function() {
    return null !== this.parsed;
  }, r2.prototype.brightness = function() {
    return n(H(this.rgba), 2);
  }, r2.prototype.isDark = function() {
    return H(this.rgba) < 0.5;
  }, r2.prototype.isLight = function() {
    return H(this.rgba) >= 0.5;
  }, r2.prototype.toHex = function() {
    return r3 = o(this.rgba), t2 = r3.r, e2 = r3.g, u2 = r3.b, i2 = (a2 = r3.a) < 1 ? s(n(255 * a2)) : "", "#" + s(t2) + s(e2) + s(u2) + i2;
    var r3, t2, e2, u2, a2, i2;
  }, r2.prototype.toRgb = function() {
    return o(this.rgba);
  }, r2.prototype.toRgbString = function() {
    return r3 = o(this.rgba), t2 = r3.r, n2 = r3.g, e2 = r3.b, (u2 = r3.a) < 1 ? "rgba(" + t2 + ", " + n2 + ", " + e2 + ", " + u2 + ")" : "rgb(" + t2 + ", " + n2 + ", " + e2 + ")";
    var r3, t2, n2, e2, u2;
  }, r2.prototype.toHsl = function() {
    return d(c(this.rgba));
  }, r2.prototype.toHslString = function() {
    return r3 = d(c(this.rgba)), t2 = r3.h, n2 = r3.s, e2 = r3.l, (u2 = r3.a) < 1 ? "hsla(" + t2 + ", " + n2 + "%, " + e2 + "%, " + u2 + ")" : "hsl(" + t2 + ", " + n2 + "%, " + e2 + "%)";
    var r3, t2, n2, e2, u2;
  }, r2.prototype.toHsv = function() {
    return r3 = h(this.rgba), { h: n(r3.h), s: n(r3.s), v: n(r3.v), a: n(r3.a, 3) };
    var r3;
  }, r2.prototype.invert = function() {
    return w({ r: 255 - (r3 = this.rgba).r, g: 255 - r3.g, b: 255 - r3.b, a: r3.a });
    var r3;
  }, r2.prototype.saturate = function(r3) {
    return void 0 === r3 && (r3 = 0.1), w(M(this.rgba, r3));
  }, r2.prototype.desaturate = function(r3) {
    return void 0 === r3 && (r3 = 0.1), w(M(this.rgba, -r3));
  }, r2.prototype.grayscale = function() {
    return w(M(this.rgba, -1));
  }, r2.prototype.lighten = function(r3) {
    return void 0 === r3 && (r3 = 0.1), w($(this.rgba, r3));
  }, r2.prototype.darken = function(r3) {
    return void 0 === r3 && (r3 = 0.1), w($(this.rgba, -r3));
  }, r2.prototype.rotate = function(r3) {
    return void 0 === r3 && (r3 = 15), this.hue(this.hue() + r3);
  }, r2.prototype.alpha = function(r3) {
    return "number" == typeof r3 ? w({ r: (t2 = this.rgba).r, g: t2.g, b: t2.b, a: r3 }) : n(this.rgba.a, 3);
    var t2;
  }, r2.prototype.hue = function(r3) {
    var t2 = c(this.rgba);
    return "number" == typeof r3 ? w({ h: r3, s: t2.s, l: t2.l, a: t2.a }) : n(t2.h);
  }, r2.prototype.isEqual = function(r3) {
    return this.toHex() === w(r3).toHex();
  }, r2;
})();
var w = function(r2) {
  return r2 instanceof j ? r2 : new j(r2);
};

// packages/global-styles-engine/build-module/utils/duotone.mjs
function getValuesFromColors(colors = []) {
  const values = {
    r: [],
    g: [],
    b: [],
    a: []
  };
  colors.forEach((color) => {
    const rgbColor = w(color).toRgb();
    values.r.push(rgbColor.r / 255);
    values.g.push(rgbColor.g / 255);
    values.b.push(rgbColor.b / 255);
    values.a.push(rgbColor.a);
  });
  return values;
}
function getDuotoneFilter(id, colors) {
  const values = getValuesFromColors(colors);
  return `
<svg
	xmlns:xlink="http://www.w3.org/1999/xlink"
	viewBox="0 0 0 0"
	width="0"
	height="0"
	focusable="false"
	role="none"
	aria-hidden="true"
	style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
>
	<defs>
		<filter id="${id}">
			<!--
				Use sRGB instead of linearRGB so transparency looks correct.
				Use perceptual brightness to convert to grayscale.
			-->
			<feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix>
			<!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. -->
			<feComponentTransfer color-interpolation-filters="sRGB">
				<feFuncR type="table" tableValues="${values.r.join(" ")}"></feFuncR>
				<feFuncG type="table" tableValues="${values.g.join(" ")}"></feFuncG>
				<feFuncB type="table" tableValues="${values.b.join(" ")}"></feFuncB>
				<feFuncA type="table" tableValues="${values.a.join(" ")}"></feFuncA>
			</feComponentTransfer>
			<!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. -->
			<feComposite in2="SourceGraphic" operator="in"></feComposite>
		</filter>
	</defs>
</svg>`;
}

// packages/global-styles-engine/build-module/utils/string.mjs
function kebabCase(str) {
  return str.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([0-9])([a-zA-Z])/g, "$1-$2").replace(/([a-zA-Z])([0-9])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
}

// packages/global-styles-engine/build-module/utils/spacing.mjs
function getSpacingPresetCssVar(value) {
  if (!value) {
    return;
  }
  const slug = value.match(/var:preset\|spacing\|(.+)/);
  if (!slug) {
    return value;
  }
  return `var(--wp--preset--spacing--${slug[1]})`;
}

// packages/global-styles-engine/build-module/utils/gap.mjs
function getGapBoxControlValueFromStyle(blockGapValue) {
  if (!blockGapValue) {
    return null;
  }
  const isValueString = typeof blockGapValue === "string";
  return {
    top: isValueString ? blockGapValue : blockGapValue?.top,
    left: isValueString ? blockGapValue : blockGapValue?.left
  };
}
function getGapCSSValue(blockGapValue, defaultValue = "0") {
  const blockGapBoxControlValue = getGapBoxControlValueFromStyle(blockGapValue);
  if (!blockGapBoxControlValue) {
    return null;
  }
  const row = getSpacingPresetCssVar(blockGapBoxControlValue?.top) || defaultValue;
  const column = getSpacingPresetCssVar(blockGapBoxControlValue?.left) || defaultValue;
  return row === column ? row : `${row} ${column}`;
}

// packages/global-styles-engine/build-module/utils/background.mjs
var BACKGROUND_BLOCK_DEFAULT_VALUES = {
  backgroundSize: "cover",
  backgroundPosition: "50% 50%"
  // used only when backgroundSize is 'contain'.
};
function setBackgroundStyleDefaults(backgroundStyle) {
  if (!backgroundStyle || // @ts-expect-error
  !backgroundStyle?.backgroundImage?.url) {
    return;
  }
  let backgroundStylesWithDefaults;
  if (!backgroundStyle?.backgroundSize) {
    backgroundStylesWithDefaults = {
      backgroundSize: BACKGROUND_BLOCK_DEFAULT_VALUES.backgroundSize
    };
  }
  if ("contain" === backgroundStyle?.backgroundSize && !backgroundStyle?.backgroundPosition) {
    backgroundStylesWithDefaults = {
      backgroundPosition: BACKGROUND_BLOCK_DEFAULT_VALUES.backgroundPosition
    };
  }
  return backgroundStylesWithDefaults;
}

// packages/global-styles-engine/build-module/utils/layout.mjs
var LAYOUT_DEFINITIONS = {
  default: {
    name: "default",
    slug: "flow",
    className: "is-layout-flow",
    baseStyles: [
      {
        selector: " > .alignleft",
        rules: {
          float: "left",
          "margin-inline-start": "0",
          "margin-inline-end": "2em"
        }
      },
      {
        selector: " > .alignright",
        rules: {
          float: "right",
          "margin-inline-start": "2em",
          "margin-inline-end": "0"
        }
      },
      {
        selector: " > .aligncenter",
        rules: {
          "margin-left": "auto !important",
          "margin-right": "auto !important"
        }
      }
    ],
    spacingStyles: [
      {
        selector: " > :first-child",
        rules: {
          "margin-block-start": "0"
        }
      },
      {
        selector: " > :last-child",
        rules: {
          "margin-block-end": "0"
        }
      },
      {
        selector: " > *",
        rules: {
          "margin-block-start": null,
          "margin-block-end": "0"
        }
      }
    ]
  },
  constrained: {
    name: "constrained",
    slug: "constrained",
    className: "is-layout-constrained",
    baseStyles: [
      {
        selector: " > .alignleft",
        rules: {
          float: "left",
          "margin-inline-start": "0",
          "margin-inline-end": "2em"
        }
      },
      {
        selector: " > .alignright",
        rules: {
          float: "right",
          "margin-inline-start": "2em",
          "margin-inline-end": "0"
        }
      },
      {
        selector: " > .aligncenter",
        rules: {
          "margin-left": "auto !important",
          "margin-right": "auto !important"
        }
      },
      {
        selector: " > :where(:not(.alignleft):not(.alignright):not(.alignfull))",
        rules: {
          "max-width": "var(--wp--style--global--content-size)",
          "margin-left": "auto !important",
          "margin-right": "auto !important"
        }
      },
      {
        selector: " > .alignwide",
        rules: {
          "max-width": "var(--wp--style--global--wide-size)"
        }
      }
    ],
    spacingStyles: [
      {
        selector: " > :first-child",
        rules: {
          "margin-block-start": "0"
        }
      },
      {
        selector: " > :last-child",
        rules: {
          "margin-block-end": "0"
        }
      },
      {
        selector: " > *",
        rules: {
          "margin-block-start": null,
          "margin-block-end": "0"
        }
      }
    ]
  },
  flex: {
    name: "flex",
    slug: "flex",
    className: "is-layout-flex",
    displayMode: "flex",
    baseStyles: [
      {
        selector: "",
        rules: {
          "flex-wrap": "wrap",
          "align-items": "center"
        }
      },
      {
        selector: " > :is(*, div)",
        // :is(*, div) instead of just * increases the specificity by 001.
        rules: {
          margin: "0"
        }
      }
    ],
    spacingStyles: [
      {
        selector: "",
        rules: {
          gap: null
        }
      }
    ]
  },
  grid: {
    name: "grid",
    slug: "grid",
    className: "is-layout-grid",
    displayMode: "grid",
    baseStyles: [
      {
        selector: " > :is(*, div)",
        // :is(*, div) instead of just * increases the specificity by 001.
        rules: {
          margin: "0"
        }
      }
    ],
    spacingStyles: [
      {
        selector: "",
        rules: {
          gap: null
        }
      }
    ]
  }
};

// packages/global-styles-engine/build-module/core/render.mjs
var ELEMENT_CLASS_NAMES = {
  button: "wp-element-button",
  caption: "wp-element-caption"
};
var BLOCK_SUPPORT_FEATURE_LEVEL_SELECTORS = {
  __experimentalBorder: "border",
  color: "color",
  dimensions: "dimensions",
  spacing: "spacing",
  typography: "typography"
};
function getPresetsDeclarations(blockPresets = {}, mergedSettings) {
  return PRESET_METADATA.reduce(
    (declarations, { path, valueKey, valueFunc, cssVarInfix }) => {
      const presetByOrigin = getValueFromObjectPath(
        blockPresets,
        path,
        []
      );
      ["default", "theme", "custom"].forEach((origin) => {
        if (presetByOrigin[origin]) {
          presetByOrigin[origin].forEach((value) => {
            if (valueKey && !valueFunc) {
              declarations.push(
                `--wp--preset--${cssVarInfix}--${kebabCase(
                  value.slug
                )}: ${value[valueKey]}`
              );
            } else if (valueFunc && typeof valueFunc === "function") {
              declarations.push(
                `--wp--preset--${cssVarInfix}--${kebabCase(
                  value.slug
                )}: ${valueFunc(value, mergedSettings)}`
              );
            }
          });
        }
      });
      return declarations;
    },
    []
  );
}
function getPresetsClasses(blockSelector = "*", blockPresets = {}) {
  return PRESET_METADATA.reduce(
    (declarations, { path, cssVarInfix, classes }) => {
      if (!classes) {
        return declarations;
      }
      const presetByOrigin = getValueFromObjectPath(
        blockPresets,
        path,
        []
      );
      ["default", "theme", "custom"].forEach((origin) => {
        if (presetByOrigin[origin]) {
          presetByOrigin[origin].forEach(
            ({ slug }) => {
              classes.forEach(
                ({
                  classSuffix,
                  propertyName
                }) => {
                  const classSelectorToUse = `.has-${kebabCase(
                    slug
                  )}-${classSuffix}`;
                  const selectorToUse = blockSelector.split(",").map(
                    (selector) => `${selector}${classSelectorToUse}`
                  ).join(",");
                  const value = `var(--wp--preset--${cssVarInfix}--${kebabCase(
                    slug
                  )})`;
                  declarations += `${selectorToUse}{${propertyName}: ${value} !important;}`;
                }
              );
            }
          );
        }
      });
      return declarations;
    },
    ""
  );
}
function getPresetsSvgFilters(blockPresets = {}) {
  return PRESET_METADATA.filter(
    // Duotone are the only type of filters for now.
    (metadata) => metadata.path.at(-1) === "duotone"
  ).flatMap((metadata) => {
    const presetByOrigin = getValueFromObjectPath(
      blockPresets,
      metadata.path,
      {}
    );
    return ["default", "theme"].filter((origin) => presetByOrigin[origin]).flatMap(
      (origin) => presetByOrigin[origin].map(
        (preset) => getDuotoneFilter(
          `wp-duotone-${preset.slug}`,
          preset.colors
        )
      )
    ).join("");
  });
}
function flattenTree(input = {}, prefix, token) {
  let result = [];
  Object.keys(input).forEach((key) => {
    const newKey = prefix + kebabCase(key.replace("/", "-"));
    const newLeaf = input[key];
    if (newLeaf instanceof Object) {
      const newPrefix = newKey + token;
      result = [...result, ...flattenTree(newLeaf, newPrefix, token)];
    } else {
      result.push(`${newKey}: ${newLeaf}`);
    }
  });
  return result;
}
function concatFeatureVariationSelectorString(featureSelector, styleVariationSelector) {
  const featureSelectors = featureSelector.split(",");
  const combinedSelectors = [];
  featureSelectors.forEach((selector) => {
    combinedSelectors.push(
      `${styleVariationSelector.trim()}${selector.trim()}`
    );
  });
  return combinedSelectors.join(", ");
}
var updateParagraphTextIndentSelector = (featureDeclarations, settings, blockName) => {
  if (blockName !== "core/paragraph") {
    return featureDeclarations;
  }
  const blockSettings = settings?.blocks?.["core/paragraph"];
  const textIndentSetting = blockSettings?.typography?.textIndent ?? settings?.typography?.textIndent ?? "subsequent";
  if (textIndentSetting !== "all") {
    return featureDeclarations;
  }
  const oldSelector = ".wp-block-paragraph + .wp-block-paragraph";
  const newSelector = ".wp-block-paragraph";
  if (oldSelector in featureDeclarations) {
    const declarations = featureDeclarations[oldSelector];
    const updated = { ...featureDeclarations };
    delete updated[oldSelector];
    updated[newSelector] = declarations;
    return updated;
  }
  return featureDeclarations;
};
var getFeatureDeclarations = (selectors, styles) => {
  const declarations = {};
  Object.entries(selectors).forEach(([feature, selector]) => {
    if (feature === "root" || !styles?.[feature]) {
      return;
    }
    const isShorthand = typeof selector === "string";
    if (!isShorthand && typeof selector === "object" && selector !== null) {
      Object.entries(selector).forEach(
        ([subfeature, subfeatureSelector]) => {
          if (subfeature === "root" || !styles?.[feature][subfeature]) {
            return;
          }
          const subfeatureStyles = {
            [feature]: {
              [subfeature]: styles[feature][subfeature]
            }
          };
          const newDeclarations = getStylesDeclarations(subfeatureStyles);
          declarations[subfeatureSelector] = [
            ...declarations[subfeatureSelector] || [],
            ...newDeclarations
          ];
          delete styles[feature][subfeature];
        }
      );
    }
    if (isShorthand || typeof selector === "object" && selector !== null && "root" in selector) {
      const featureSelector = isShorthand ? selector : selector.root;
      const featureStyles = { [feature]: styles[feature] };
      const newDeclarations = getStylesDeclarations(featureStyles);
      declarations[featureSelector] = [
        ...declarations[featureSelector] || [],
        ...newDeclarations
      ];
      delete styles[feature];
    }
  });
  return declarations;
};
function getStylesDeclarations(blockStyles = {}, selector = "", useRootPaddingAlign, tree = {}, disableRootPadding = false) {
  const isRoot = ROOT_BLOCK_SELECTOR === selector;
  const output = Object.entries(
    import_blocks.__EXPERIMENTAL_STYLE_PROPERTY
  ).reduce(
    (declarations, [key, { value, properties, useEngine, rootOnly }]) => {
      if (rootOnly && !isRoot) {
        return declarations;
      }
      const pathToValue = value;
      if (pathToValue[0] === "elements" || useEngine) {
        return declarations;
      }
      const styleValue = getValueFromObjectPath(
        blockStyles,
        pathToValue
      );
      if (key === "--wp--style--root--padding" && (typeof styleValue === "string" || !useRootPaddingAlign)) {
        return declarations;
      }
      if (properties && typeof styleValue !== "string") {
        Object.entries(properties).forEach((entry) => {
          const [name, prop] = entry;
          if (!getValueFromObjectPath(styleValue, [prop], false)) {
            return;
          }
          const cssProperty = name.startsWith("--") ? name : kebabCase(name);
          declarations.push(
            `${cssProperty}: ${(0, import_style_engine2.getCSSValueFromRawStyle)(
              getValueFromObjectPath(styleValue, [prop])
            )}`
          );
        });
      } else if (getValueFromObjectPath(blockStyles, pathToValue, false)) {
        const cssProperty = key.startsWith("--") ? key : kebabCase(key);
        declarations.push(
          `${cssProperty}: ${(0, import_style_engine2.getCSSValueFromRawStyle)(
            getValueFromObjectPath(blockStyles, pathToValue)
          )}`
        );
      }
      return declarations;
    },
    []
  );
  if (!!blockStyles.background) {
    if (blockStyles.background?.backgroundImage) {
      blockStyles.background.backgroundImage = getResolvedValue(
        blockStyles.background.backgroundImage,
        tree
      );
    }
    if (!isRoot && !!blockStyles.background?.backgroundImage?.id) {
      blockStyles = {
        ...blockStyles,
        background: {
          ...blockStyles.background,
          ...setBackgroundStyleDefaults(blockStyles.background)
        }
      };
    }
  }
  const extraRules = (0, import_style_engine2.getCSSRules)(blockStyles);
  extraRules.forEach((rule) => {
    if (isRoot && (useRootPaddingAlign || disableRootPadding) && rule.key.startsWith("padding")) {
      return;
    }
    const cssProperty = rule.key.startsWith("--") ? rule.key : kebabCase(rule.key);
    let ruleValue = getResolvedValue(rule.value, tree);
    if (cssProperty === "font-size") {
      ruleValue = getTypographyFontSizeValue(
        { name: "", slug: "", size: ruleValue },
        tree?.settings
      );
    }
    if (cssProperty === "aspect-ratio") {
      output.push("min-height: unset");
    }
    output.push(`${cssProperty}: ${ruleValue}`);
  });
  return output;
}
function getLayoutStyles({
  layoutDefinitions = LAYOUT_DEFINITIONS,
  style,
  selector,
  hasBlockGapSupport,
  hasFallbackGapSupport,
  fallbackGapValue
}) {
  let ruleset = "";
  let gapValue = hasBlockGapSupport ? getGapCSSValue(style?.spacing?.blockGap) : "";
  if (hasFallbackGapSupport) {
    if (selector === ROOT_BLOCK_SELECTOR) {
      gapValue = !gapValue ? "0.5em" : gapValue;
    } else if (!hasBlockGapSupport && fallbackGapValue) {
      gapValue = fallbackGapValue;
    }
  }
  if (gapValue && layoutDefinitions) {
    Object.values(layoutDefinitions).forEach(
      ({ className, name, spacingStyles }) => {
        if (!hasBlockGapSupport && "flex" !== name && "grid" !== name) {
          return;
        }
        if (spacingStyles?.length) {
          spacingStyles.forEach((spacingStyle) => {
            const declarations = [];
            if (spacingStyle.rules) {
              Object.entries(spacingStyle.rules).forEach(
                ([cssProperty, cssValue]) => {
                  declarations.push(
                    `${cssProperty}: ${cssValue ? cssValue : gapValue}`
                  );
                }
              );
            }
            if (declarations.length) {
              let combinedSelector = "";
              if (!hasBlockGapSupport) {
                combinedSelector = selector === ROOT_BLOCK_SELECTOR ? `:where(.${className}${spacingStyle?.selector || ""})` : `:where(${selector}.${className}${spacingStyle?.selector || ""})`;
              } else {
                combinedSelector = selector === ROOT_BLOCK_SELECTOR ? `:root :where(.${className})${spacingStyle?.selector || ""}` : `:root :where(${selector}-${className})${spacingStyle?.selector || ""}`;
              }
              ruleset += `${combinedSelector} { ${declarations.join(
                "; "
              )}; }`;
            }
          });
        }
      }
    );
    if (selector === ROOT_BLOCK_SELECTOR && hasBlockGapSupport) {
      ruleset += `${ROOT_CSS_PROPERTIES_SELECTOR} { --wp--style--block-gap: ${gapValue}; }`;
    }
  }
  if (selector === ROOT_BLOCK_SELECTOR && layoutDefinitions) {
    const validDisplayModes = ["block", "flex", "grid"];
    Object.values(layoutDefinitions).forEach(
      ({ className, displayMode, baseStyles }) => {
        if (displayMode && validDisplayModes.includes(displayMode)) {
          ruleset += `${selector} .${className} { display:${displayMode}; }`;
        }
        if (baseStyles?.length) {
          baseStyles.forEach((baseStyle) => {
            const declarations = [];
            if (baseStyle.rules) {
              Object.entries(baseStyle.rules).forEach(
                ([cssProperty, cssValue]) => {
                  declarations.push(
                    `${cssProperty}: ${cssValue}`
                  );
                }
              );
            }
            if (declarations.length) {
              const combinedSelector = `.${className}${baseStyle?.selector || ""}`;
              ruleset += `${combinedSelector} { ${declarations.join(
                "; "
              )}; }`;
            }
          });
        }
      }
    );
  }
  return ruleset;
}
var STYLE_KEYS = [
  "border",
  "color",
  "dimensions",
  "spacing",
  "typography",
  "filter",
  "outline",
  "shadow",
  "background"
];
function pickStyleKeys(treeToPickFrom) {
  if (!treeToPickFrom) {
    return {};
  }
  const entries = Object.entries(treeToPickFrom);
  const pickedEntries = entries.filter(
    ([key]) => STYLE_KEYS.includes(key)
  );
  const clonedEntries = pickedEntries.map(([key, style]) => [
    key,
    JSON.parse(JSON.stringify(style))
  ]);
  return Object.fromEntries(clonedEntries);
}
var getNodesWithStyles = (tree, blockSelectors) => {
  const nodes = [];
  if (!tree?.styles) {
    return nodes;
  }
  const styles = pickStyleKeys(tree.styles);
  if (styles) {
    nodes.push({
      styles,
      selector: ROOT_BLOCK_SELECTOR,
      // Root selector (body) styles should not be wrapped in `:root where()` to keep
      // specificity at (0,0,1) and maintain backwards compatibility.
      skipSelectorWrapper: true
    });
  }
  Object.entries(import_blocks.__EXPERIMENTAL_ELEMENTS).forEach(([name, selector]) => {
    if (tree.styles?.elements?.[name]) {
      nodes.push({
        styles: tree.styles?.elements?.[name] ?? {},
        selector,
        // Top level elements that don't use a class name should not receive the
        // `:root :where()` wrapper to maintain backwards compatibility.
        skipSelectorWrapper: !ELEMENT_CLASS_NAMES[name]
      });
    }
  });
  Object.entries(tree.styles?.blocks ?? {}).forEach(
    ([blockName, node]) => {
      const blockStyles = pickStyleKeys(node);
      const typedNode = node;
      const variationNodesToAdd = [];
      if (typedNode?.variations) {
        const variations = {};
        Object.entries(typedNode.variations).forEach(
          ([variationName, variation]) => {
            const typedVariation = variation;
            variations[variationName] = pickStyleKeys(typedVariation);
            if (typedVariation?.css) {
              variations[variationName].css = typedVariation.css;
            }
            const variationSelector = typeof blockSelectors !== "string" ? blockSelectors[blockName]?.styleVariationSelectors?.[variationName] : void 0;
            Object.entries(
              typedVariation?.elements ?? {}
            ).forEach(([element, elementStyles]) => {
              if (elementStyles && import_blocks.__EXPERIMENTAL_ELEMENTS[element]) {
                variationNodesToAdd.push({
                  styles: elementStyles,
                  selector: scopeSelector(
                    variationSelector,
                    import_blocks.__EXPERIMENTAL_ELEMENTS[element]
                  )
                });
              }
            });
            Object.entries(typedVariation?.blocks ?? {}).forEach(
              ([
                variationBlockName,
                variationBlockStyles
              ]) => {
                const variationBlockSelector = typeof blockSelectors !== "string" ? scopeSelector(
                  variationSelector,
                  blockSelectors[variationBlockName]?.selector
                ) : void 0;
                const variationDuotoneSelector = typeof blockSelectors !== "string" ? scopeSelector(
                  variationSelector,
                  blockSelectors[variationBlockName]?.duotoneSelector
                ) : void 0;
                const variationFeatureSelectors = typeof blockSelectors !== "string" ? scopeFeatureSelectors(
                  variationSelector,
                  blockSelectors[variationBlockName]?.featureSelectors ?? {}
                ) : void 0;
                const variationBlockStyleNodes = pickStyleKeys(variationBlockStyles);
                if (variationBlockStyles?.css) {
                  variationBlockStyleNodes.css = variationBlockStyles.css;
                }
                if (!variationBlockSelector || typeof blockSelectors === "string") {
                  return;
                }
                variationNodesToAdd.push({
                  selector: variationBlockSelector,
                  duotoneSelector: variationDuotoneSelector,
                  featureSelectors: variationFeatureSelectors,
                  fallbackGapValue: blockSelectors[variationBlockName]?.fallbackGapValue,
                  hasLayoutSupport: blockSelectors[variationBlockName]?.hasLayoutSupport,
                  styles: variationBlockStyleNodes
                });
                Object.entries(
                  variationBlockStyles.elements ?? {}
                ).forEach(
                  ([
                    variationBlockElement,
                    variationBlockElementStyles
                  ]) => {
                    if (variationBlockElementStyles && import_blocks.__EXPERIMENTAL_ELEMENTS[variationBlockElement]) {
                      variationNodesToAdd.push({
                        styles: variationBlockElementStyles,
                        selector: scopeSelector(
                          variationBlockSelector,
                          import_blocks.__EXPERIMENTAL_ELEMENTS[variationBlockElement]
                        )
                      });
                    }
                  }
                );
              }
            );
          }
        );
        blockStyles.variations = variations;
      }
      if (typeof blockSelectors !== "string" && blockSelectors?.[blockName]?.selector) {
        nodes.push({
          duotoneSelector: blockSelectors[blockName].duotoneSelector,
          fallbackGapValue: blockSelectors[blockName].fallbackGapValue,
          hasLayoutSupport: blockSelectors[blockName].hasLayoutSupport,
          selector: blockSelectors[blockName].selector,
          styles: blockStyles,
          featureSelectors: blockSelectors[blockName].featureSelectors,
          styleVariationSelectors: blockSelectors[blockName].styleVariationSelectors,
          name: blockName
        });
      }
      Object.entries(typedNode?.elements ?? {}).forEach(
        ([elementName, value]) => {
          if (typeof blockSelectors !== "string" && value && blockSelectors?.[blockName] && import_blocks.__EXPERIMENTAL_ELEMENTS[elementName]) {
            nodes.push({
              styles: value,
              selector: blockSelectors[blockName]?.selector.split(",").map((sel) => {
                const elementSelectors = import_blocks.__EXPERIMENTAL_ELEMENTS[elementName].split(",");
                return elementSelectors.map(
                  (elementSelector) => sel + " " + elementSelector
                );
              }).join(",")
            });
          }
        }
      );
      nodes.push(...variationNodesToAdd);
    }
  );
  return nodes;
};
var getNodesWithSettings = (tree, blockSelectors) => {
  const nodes = [];
  if (!tree?.settings) {
    return nodes;
  }
  const pickPresets = (treeToPickFrom) => {
    let presets2 = {};
    PRESET_METADATA.forEach(({ path }) => {
      const value = getValueFromObjectPath(treeToPickFrom, path, false);
      if (value !== false) {
        presets2 = setImmutably(presets2, path, value);
      }
    });
    return presets2;
  };
  const presets = pickPresets(tree.settings);
  const custom = tree.settings?.custom;
  if (Object.keys(presets).length > 0 || custom) {
    nodes.push({
      presets,
      custom,
      selector: ROOT_CSS_PROPERTIES_SELECTOR
    });
  }
  Object.entries(tree.settings?.blocks ?? {}).forEach(
    ([blockName, node]) => {
      const blockCustom = node.custom;
      if (typeof blockSelectors === "string" || !blockSelectors[blockName]) {
        return;
      }
      const blockPresets = pickPresets(node);
      if (Object.keys(blockPresets).length > 0 || blockCustom) {
        nodes.push({
          presets: blockPresets,
          custom: blockCustom,
          selector: blockSelectors[blockName]?.selector
        });
      }
    }
  );
  return nodes;
};
var generateCustomProperties = (tree, blockSelectors) => {
  const settings = getNodesWithSettings(tree, blockSelectors);
  let ruleset = "";
  settings.forEach(({ presets, custom, selector }) => {
    const declarations = tree?.settings ? getPresetsDeclarations(presets, tree?.settings) : [];
    const customProps = flattenTree(custom, "--wp--custom--", "--");
    if (customProps.length > 0) {
      declarations.push(...customProps);
    }
    if (declarations.length > 0) {
      ruleset += `${selector}{${declarations.join(";")};}`;
    }
  });
  return ruleset;
};
var transformToStyles = (tree, blockSelectors, hasBlockGapSupport, hasFallbackGapSupport, disableLayoutStyles = false, disableRootPadding = false, styleOptions = {}) => {
  const options = {
    blockGap: true,
    blockStyles: true,
    layoutStyles: true,
    marginReset: true,
    presets: true,
    rootPadding: true,
    variationStyles: false,
    ...styleOptions
  };
  const nodesWithStyles = getNodesWithStyles(tree, blockSelectors);
  const nodesWithSettings = getNodesWithSettings(tree, blockSelectors);
  const useRootPaddingAlign = tree?.settings?.useRootPaddingAwareAlignments;
  const { contentSize, wideSize } = tree?.settings?.layout || {};
  const hasBodyStyles = options.marginReset || options.rootPadding || options.layoutStyles;
  let ruleset = "";
  if (options.presets && (contentSize || wideSize)) {
    ruleset += `${ROOT_CSS_PROPERTIES_SELECTOR} {`;
    ruleset = contentSize ? ruleset + ` --wp--style--global--content-size: ${contentSize};` : ruleset;
    ruleset = wideSize ? ruleset + ` --wp--style--global--wide-size: ${wideSize};` : ruleset;
    ruleset += "}";
  }
  if (hasBodyStyles) {
    ruleset += ":where(body) {margin: 0;";
    if (options.rootPadding && useRootPaddingAlign) {
      ruleset += `padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }
				.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
				.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;
				`;
    }
    ruleset += "}";
  }
  if (options.blockStyles) {
    nodesWithStyles.forEach(
      ({
        selector,
        duotoneSelector,
        styles,
        fallbackGapValue,
        hasLayoutSupport,
        featureSelectors,
        styleVariationSelectors,
        skipSelectorWrapper,
        name
      }) => {
        if (featureSelectors) {
          let featureDeclarations = getFeatureDeclarations(
            featureSelectors,
            styles
          );
          featureDeclarations = updateParagraphTextIndentSelector(
            featureDeclarations,
            tree.settings,
            name
          );
          Object.entries(featureDeclarations).forEach(
            ([cssSelector, declarations]) => {
              if (declarations.length) {
                const rules = declarations.join(";");
                ruleset += `:root :where(${cssSelector}){${rules};}`;
              }
            }
          );
        }
        if (duotoneSelector) {
          const duotoneStyles = {};
          if (styles?.filter) {
            duotoneStyles.filter = styles.filter;
            delete styles.filter;
          }
          const duotoneDeclarations = getStylesDeclarations(duotoneStyles);
          if (duotoneDeclarations.length) {
            ruleset += `${duotoneSelector}{${duotoneDeclarations.join(
              ";"
            )};}`;
          }
        }
        if (!disableLayoutStyles && (ROOT_BLOCK_SELECTOR === selector || hasLayoutSupport)) {
          ruleset += getLayoutStyles({
            style: styles,
            selector,
            hasBlockGapSupport,
            hasFallbackGapSupport,
            fallbackGapValue
          });
        }
        const styleDeclarations = getStylesDeclarations(
          styles,
          selector,
          useRootPaddingAlign,
          tree,
          disableRootPadding
        );
        if (styleDeclarations?.length) {
          const generalSelector = skipSelectorWrapper ? selector : `:root :where(${selector})`;
          ruleset += `${generalSelector}{${styleDeclarations.join(
            ";"
          )};}`;
        }
        if (styles?.css) {
          ruleset += processCSSNesting(
            styles.css,
            `:root :where(${selector})`
          );
        }
        if (options.variationStyles && styleVariationSelectors) {
          Object.entries(styleVariationSelectors).forEach(
            ([styleVariationName, styleVariationSelector]) => {
              const styleVariations = styles?.variations?.[styleVariationName];
              if (styleVariations) {
                if (featureSelectors) {
                  let featureDeclarations = getFeatureDeclarations(
                    featureSelectors,
                    styleVariations
                  );
                  featureDeclarations = updateParagraphTextIndentSelector(
                    featureDeclarations,
                    tree.settings,
                    name
                  );
                  Object.entries(
                    featureDeclarations
                  ).forEach(
                    ([baseSelector, declarations]) => {
                      if (declarations.length) {
                        const cssSelector = concatFeatureVariationSelectorString(
                          baseSelector,
                          styleVariationSelector
                        );
                        const rules = declarations.join(";");
                        ruleset += `:root :where(${cssSelector}){${rules};}`;
                      }
                    }
                  );
                }
                const styleVariationDeclarations = getStylesDeclarations(
                  styleVariations,
                  styleVariationSelector,
                  useRootPaddingAlign,
                  tree
                );
                if (styleVariationDeclarations.length) {
                  ruleset += `:root :where(${styleVariationSelector}){${styleVariationDeclarations.join(
                    ";"
                  )};}`;
                }
                if (styleVariations?.css) {
                  ruleset += processCSSNesting(
                    styleVariations.css,
                    `:root :where(${styleVariationSelector})`
                  );
                }
                if (hasLayoutSupport && styleVariations?.spacing?.blockGap) {
                  const variationSelectorWithBlock = styleVariationSelector + selector;
                  ruleset += getLayoutStyles({
                    style: styleVariations,
                    selector: variationSelectorWithBlock,
                    hasBlockGapSupport: true,
                    hasFallbackGapSupport,
                    fallbackGapValue
                  });
                }
              }
            }
          );
        }
        const pseudoSelectorStyles = Object.entries(styles).filter(
          ([key]) => key.startsWith(":")
        );
        if (pseudoSelectorStyles?.length) {
          pseudoSelectorStyles.forEach(
            ([pseudoKey, pseudoStyle]) => {
              const pseudoDeclarations = getStylesDeclarations(pseudoStyle);
              if (!pseudoDeclarations?.length) {
                return;
              }
              const _selector = selector.split(",").map((sel) => sel + pseudoKey).join(",");
              const pseudoRule = `:root :where(${_selector}){${pseudoDeclarations.join(
                ";"
              )};}`;
              ruleset += pseudoRule;
            }
          );
        }
      }
    );
  }
  if (options.layoutStyles) {
    ruleset = ruleset + ".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }";
    ruleset = ruleset + ".wp-site-blocks > .alignright { float: right; margin-left: 2em; }";
    ruleset = ruleset + ".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }";
  }
  if (options.blockGap && hasBlockGapSupport) {
    const gapValue = getGapCSSValue(tree?.styles?.spacing?.blockGap) || "0.5em";
    ruleset = ruleset + `:root :where(.wp-site-blocks) > * { margin-block-start: ${gapValue}; margin-block-end: 0; }`;
    ruleset = ruleset + ":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }";
    ruleset = ruleset + ":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }";
  }
  if (options.presets) {
    nodesWithSettings.forEach(({ selector, presets }) => {
      if (ROOT_BLOCK_SELECTOR === selector || ROOT_CSS_PROPERTIES_SELECTOR === selector) {
        selector = "";
      }
      const classes = getPresetsClasses(selector, presets);
      if (classes.length > 0) {
        ruleset += classes;
      }
    });
  }
  return ruleset;
};
function generateSvgFilters(tree, blockSelectors) {
  const nodesWithSettings = getNodesWithSettings(tree, blockSelectors);
  return nodesWithSettings.flatMap(({ presets }) => {
    return getPresetsSvgFilters(presets);
  });
}
var getSelectorsConfig = (blockType, rootSelector) => {
  if (blockType?.selectors && Object.keys(blockType.selectors).length > 0) {
    return blockType.selectors;
  }
  const config = {
    root: rootSelector
  };
  Object.entries(BLOCK_SUPPORT_FEATURE_LEVEL_SELECTORS).forEach(
    ([featureKey, featureName]) => {
      const featureSelector = getBlockSelector(blockType, featureKey);
      if (featureSelector) {
        config[featureName] = featureSelector;
      }
    }
  );
  return config;
};
var getBlockSelectors = (blockTypes, variationInstanceId) => {
  const { getBlockStyles } = (0, import_data2.select)(import_blocks.store);
  const result = {};
  blockTypes.forEach((blockType) => {
    const name = blockType.name;
    const selector = getBlockSelector(blockType);
    if (!selector) {
      return;
    }
    let duotoneSelector = getBlockSelector(blockType, "filter.duotone");
    if (!duotoneSelector) {
      const rootSelector = getBlockSelector(blockType);
      const duotoneSupport = (0, import_blocks.getBlockSupport)(
        blockType,
        "color.__experimentalDuotone",
        false
      );
      duotoneSelector = duotoneSupport && rootSelector && scopeSelector(rootSelector, duotoneSupport);
    }
    const hasLayoutSupport = !!blockType?.supports?.layout || !!blockType?.supports?.__experimentalLayout;
    const fallbackGapValue = (
      // @ts-expect-error
      blockType?.supports?.spacing?.blockGap?.__experimentalDefault
    );
    const blockStyleVariations = getBlockStyles(name);
    const styleVariationSelectors = {};
    blockStyleVariations?.forEach((variation) => {
      const variationSuffix = variationInstanceId ? `-${variationInstanceId}` : "";
      const variationName = `${variation.name}${variationSuffix}`;
      const styleVariationSelector = getBlockStyleVariationSelector(
        variationName,
        selector
      );
      styleVariationSelectors[variationName] = styleVariationSelector;
    });
    const featureSelectors = getSelectorsConfig(blockType, selector);
    result[name] = {
      duotoneSelector: duotoneSelector ?? void 0,
      fallbackGapValue,
      featureSelectors: Object.keys(featureSelectors).length ? featureSelectors : void 0,
      hasLayoutSupport,
      name,
      selector,
      styleVariationSelectors: blockStyleVariations?.length ? styleVariationSelectors : void 0
    };
  });
  return result;
};
function updateConfigWithSeparator(config) {
  const blocks = config.styles?.blocks;
  const separatorBlock = blocks?.["core/separator"];
  const needsSeparatorStyleUpdate = separatorBlock && separatorBlock.color?.background && !separatorBlock.color?.text && !separatorBlock.border?.color;
  if (needsSeparatorStyleUpdate) {
    return {
      ...config,
      styles: {
        ...config.styles,
        blocks: {
          ...blocks,
          "core/separator": {
            ...separatorBlock,
            color: {
              ...separatorBlock.color,
              text: separatorBlock.color?.background
            }
          }
        }
      }
    };
  }
  return config;
}
function processCSSNesting(css, blockSelector) {
  let processedCSS = "";
  if (!css || css.trim() === "") {
    return processedCSS;
  }
  const parts = css.split("&");
  parts.forEach((part) => {
    if (!part || part.trim() === "") {
      return;
    }
    const isRootCss = !part.includes("{");
    if (isRootCss) {
      processedCSS += `:root :where(${blockSelector}){${part.trim()}}`;
    } else {
      const splitPart = part.replace("}", "").split("{");
      if (splitPart.length !== 2) {
        return;
      }
      const [nestedSelector, cssValue] = splitPart;
      const matches = nestedSelector.match(/([>+~\s]*::[a-zA-Z-]+)/);
      const pseudoPart = matches ? matches[1] : "";
      const withoutPseudoElement = matches ? nestedSelector.replace(pseudoPart, "").trim() : nestedSelector.trim();
      let combinedSelector;
      if (withoutPseudoElement === "") {
        combinedSelector = blockSelector;
      } else {
        combinedSelector = nestedSelector.startsWith(" ") ? scopeSelector(blockSelector, withoutPseudoElement) : appendToSelector(blockSelector, withoutPseudoElement);
      }
      processedCSS += `:root :where(${combinedSelector})${pseudoPart}{${cssValue.trim()}}`;
    }
  });
  return processedCSS;
}
function generateGlobalStyles(config = {}, blockTypes = [], options = {}) {
  const {
    hasBlockGapSupport: hasBlockGapSupportOption,
    hasFallbackGapSupport: hasFallbackGapSupportOption,
    disableLayoutStyles = false,
    disableRootPadding = false,
    styleOptions = {}
  } = options;
  const blocks = blockTypes.length > 0 ? blockTypes : (0, import_blocks.getBlockTypes)();
  const blockGap = getSetting(config, "spacing.blockGap");
  const hasBlockGapSupport = hasBlockGapSupportOption ?? blockGap !== null;
  const hasFallbackGapSupport = hasFallbackGapSupportOption ?? !hasBlockGapSupport;
  if (!config?.styles || !config?.settings) {
    return [[], {}];
  }
  const updatedConfig = updateConfigWithSeparator(config);
  const blockSelectors = getBlockSelectors(blocks);
  const customProperties = generateCustomProperties(
    updatedConfig,
    blockSelectors
  );
  const globalStyles = transformToStyles(
    updatedConfig,
    blockSelectors,
    hasBlockGapSupport,
    hasFallbackGapSupport,
    disableLayoutStyles,
    disableRootPadding,
    styleOptions
  );
  const svgs = generateSvgFilters(updatedConfig, blockSelectors);
  const styles = [
    {
      css: customProperties,
      isGlobalStyles: true
    },
    {
      css: globalStyles,
      isGlobalStyles: true
    },
    // Load custom CSS in own stylesheet so that any invalid CSS entered in the input won't break all the global styles in the editor.
    {
      css: updatedConfig?.styles?.css ?? "",
      isGlobalStyles: true
    },
    {
      assets: svgs,
      __unstableType: "svg",
      isGlobalStyles: true
    }
  ];
  blocks.forEach((blockType) => {
    const blockStyles = updatedConfig?.styles?.blocks?.[blockType.name];
    if (blockStyles?.css) {
      const selector = blockSelectors[blockType.name].selector;
      styles.push({
        css: processCSSNesting(blockStyles.css, selector),
        isGlobalStyles: true
      });
    }
  });
  return [styles, updatedConfig.settings];
}

// packages/lazy-editor/build-module/hooks/use-editor-settings.mjs
var import_core_data3 = __toESM(require_core_data(), 1);
var import_element2 = __toESM(require_element(), 1);
var import_data4 = __toESM(require_data(), 1);

// packages/lazy-editor/build-module/hooks/use-global-styles.mjs
var import_core_data2 = __toESM(require_core_data(), 1);
var import_data3 = __toESM(require_data(), 1);
var import_element = __toESM(require_element(), 1);
function useUserGlobalStyles(id) {
  const { userGlobalStyles } = (0, import_data3.useSelect)(
    (select2) => {
      const { getEntityRecord, getEditedEntityRecord, canUser } = select2(import_core_data2.store);
      const userCanEditGlobalStyles = canUser("update", {
        kind: "root",
        name: "globalStyles",
        id
      });
      let record;
      if (
        /*
         * Test that the OPTIONS request for user capabilities is complete
         * before fetching the global styles entity record.
         * This is to avoid fetching the global styles entity unnecessarily.
         */
        typeof userCanEditGlobalStyles === "boolean"
      ) {
        if (userCanEditGlobalStyles) {
          record = getEditedEntityRecord(
            "root",
            "globalStyles",
            id
          );
        } else {
          record = getEntityRecord("root", "globalStyles", id, {
            context: "view"
          });
        }
      }
      return {
        userGlobalStyles: record
      };
    },
    [id]
  );
  return (0, import_element.useMemo)(() => {
    if (!userGlobalStyles) {
      return {
        user: void 0
      };
    }
    const user = userGlobalStyles;
    return {
      user
    };
  }, [userGlobalStyles]);
}

// packages/lazy-editor/build-module/lock-unlock.mjs
var import_private_apis = __toESM(require_private_apis(), 1);
var { unlock } = (0, import_private_apis.__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/lazy-editor"
);

// packages/lazy-editor/build-module/hooks/use-editor-settings.mjs
function useEditorSettings({ stylesId }) {
  const { editorSettings } = (0, import_data4.useSelect)(
    (select2) => ({
      editorSettings: unlock(
        select2(import_core_data3.store)
      ).getEditorSettings()
    }),
    []
  );
  const { user: globalStyles } = useUserGlobalStyles(stylesId);
  const [globalStylesCSS] = generateGlobalStyles(globalStyles);
  const hasEditorSettings = !!editorSettings;
  const styles = (0, import_element2.useMemo)(() => {
    if (!hasEditorSettings) {
      return [];
    }
    return [
      ...editorSettings?.styles ?? [],
      ...globalStylesCSS
    ];
  }, [hasEditorSettings, editorSettings?.styles, globalStylesCSS]);
  return {
    isReady: hasEditorSettings,
    editorSettings: (0, import_element2.useMemo)(
      () => ({
        ...editorSettings ?? {},
        styles
      }),
      [editorSettings, styles]
    )
  };
}

// packages/asset-loader/build-module/index.mjs
function injectImportMap(scriptModules) {
  if (!scriptModules || Object.keys(scriptModules).length === 0) {
    return;
  }
  const existingMapElement = document.querySelector(
    "script#wp-importmap[type=importmap]"
  );
  if (existingMapElement) {
    try {
      const existingMap = JSON.parse(existingMapElement.text);
      if (!existingMap.imports) {
        existingMap.imports = {};
      }
      existingMap.imports = {
        ...existingMap.imports,
        ...scriptModules
      };
      existingMapElement.text = JSON.stringify(existingMap, null, 2);
    } catch (error) {
      console.error("Failed to parse or update import map:", error);
    }
  } else {
    const script = document.createElement("script");
    script.type = "importmap";
    script.id = "wp-importmap";
    script.text = JSON.stringify(
      {
        imports: scriptModules
      },
      null,
      2
    );
    document.head.appendChild(script);
  }
}
function loadStylesheet(handle, styleData) {
  return new Promise((resolve) => {
    if (!styleData.src) {
      resolve();
      return;
    }
    const existingLink = document.getElementById(handle + "-css");
    if (existingLink) {
      resolve();
      return;
    }
    const link = document.createElement("link");
    link.rel = "stylesheet";
    link.href = styleData.src + (styleData.version ? "?ver=" + styleData.version : "");
    link.id = handle + "-css";
    link.media = styleData.media || "all";
    link.onload = () => resolve();
    link.onerror = () => {
      console.error(`Failed to load stylesheet: ${handle}`);
      resolve();
    };
    document.head.appendChild(link);
  });
}
function loadScript(handle, scriptData) {
  if (!scriptData.src) {
    const marker = document.createElement("script");
    marker.id = handle + "-js";
    marker.textContent = "// Processed: " + handle;
    return marker;
  }
  const script = document.createElement("script");
  script.src = scriptData.src + (scriptData.version ? "?ver=" + scriptData.version : "");
  script.id = handle + "-js";
  script.async = false;
  return script;
}
function injectInlineStyle(handle, inlineStyle, position) {
  let styleContent = "";
  if (Array.isArray(inlineStyle)) {
    styleContent = inlineStyle.join("\n");
  } else if (typeof inlineStyle === "string") {
    styleContent = inlineStyle;
  }
  if (styleContent && styleContent.trim()) {
    const styleId = handle + "-" + position + "-inline-css";
    if (!document.getElementById(styleId)) {
      const style = document.createElement("style");
      style.id = styleId;
      style.textContent = styleContent.trim();
      document.head.appendChild(style);
    }
  }
}
function injectInlineScript(handle, inlineScript, position) {
  let scriptContent = inlineScript;
  if (Array.isArray(scriptContent)) {
    scriptContent = scriptContent.join("\n");
  }
  const script = document.createElement("script");
  script.id = handle + "-" + position + "-js";
  script.textContent = scriptContent.trim();
  return script;
}
function buildDependencyOrderedList(assetsData) {
  const visited = /* @__PURE__ */ new Set();
  const visiting = /* @__PURE__ */ new Set();
  const orderedList = [];
  function visit(handle) {
    if (visited.has(handle)) {
      return;
    }
    if (visiting.has(handle)) {
      console.warn(
        `Circular dependency detected for handle: ${handle}`
      );
      return;
    }
    visiting.add(handle);
    if (assetsData[handle]) {
      const deps = assetsData[handle].deps || [];
      deps.forEach((dep) => {
        if (assetsData[dep]) {
          visit(dep);
        }
      });
    }
    visiting.delete(handle);
    visited.add(handle);
    if (assetsData[handle]) {
      orderedList.push(handle);
    }
  }
  Object.keys(assetsData).forEach((handle) => {
    visit(handle);
  });
  return orderedList;
}
async function performScriptLoad(scriptElements, destination) {
  let parallel = [];
  for (const scriptElement of scriptElements) {
    if (scriptElement.src) {
      const loader = Promise.withResolvers();
      scriptElement.onload = () => loader.resolve();
      scriptElement.onerror = () => {
        console.error(`Failed to load script: ${scriptElement.id}`);
        loader.resolve();
      };
      parallel.push(loader.promise);
    } else {
      await Promise.all(parallel);
      parallel = [];
    }
    destination.appendChild(scriptElement);
  }
  await Promise.all(parallel);
  parallel = [];
}
async function loadAssets(scriptsData, inlineScripts, stylesData, inlineStyles, htmlTemplates, scriptModules) {
  if (scriptModules) {
    injectImportMap(scriptModules);
  }
  const orderedStyles = buildDependencyOrderedList(stylesData);
  const orderedScripts = buildDependencyOrderedList(scriptsData);
  const stylePromises = [];
  for (const handle of orderedStyles) {
    const beforeInline = inlineStyles.before?.[handle];
    if (beforeInline) {
      injectInlineStyle(handle, beforeInline, "before");
    }
    stylePromises.push(loadStylesheet(handle, stylesData[handle]));
    const afterInline = inlineStyles.after?.[handle];
    if (afterInline) {
      injectInlineStyle(handle, afterInline, "after");
    }
  }
  const scriptElements = [];
  for (const handle of orderedScripts) {
    const beforeInline = inlineScripts.before?.[handle];
    if (beforeInline) {
      scriptElements.push(
        injectInlineScript(handle, beforeInline, "before")
      );
    }
    scriptElements.push(loadScript(handle, scriptsData[handle]));
    const afterInline = inlineScripts.after?.[handle];
    if (afterInline) {
      scriptElements.push(
        injectInlineScript(handle, afterInline, "after")
      );
    }
  }
  const scriptsPromise = performScriptLoad(scriptElements, document.body);
  await Promise.all([Promise.all(stylePromises), scriptsPromise]);
  if (htmlTemplates && htmlTemplates.length > 0) {
    htmlTemplates.forEach((templateHtml) => {
      const scriptMatch = templateHtml.match(
        /<script([^>]*)>(.*?)<\/script>/is
      );
      if (scriptMatch) {
        const attributes = scriptMatch[1];
        const content = scriptMatch[2];
        const script = document.createElement("script");
        const idMatch = attributes.match(/id=["']([^"']+)["']/);
        if (idMatch) {
          script.id = idMatch[1];
        }
        const typeMatch = attributes.match(/type=["']([^"']+)["']/);
        if (typeMatch) {
          script.type = typeMatch[1];
        }
        script.textContent = content;
        document.body.appendChild(script);
      }
    });
  }
}
var index_default = loadAssets;

// packages/lazy-editor/build-module/hooks/use-editor-assets.mjs
var import_core_data4 = __toESM(require_core_data(), 1);
var import_element3 = __toESM(require_element(), 1);
var import_data5 = __toESM(require_data(), 1);
var loadAssetsPromise;
async function loadEditorAssets() {
  const load = async () => {
    const editorAssets = await unlock(
      (0, import_data5.resolveSelect)(import_core_data4.store)
    ).getEditorAssets();
    await index_default(
      editorAssets.scripts || {},
      editorAssets.inline_scripts || { before: {}, after: {} },
      editorAssets.styles || {},
      editorAssets.inline_styles || { before: {}, after: {} },
      editorAssets.html_templates || [],
      editorAssets.script_modules || {}
    );
  };
  if (!loadAssetsPromise) {
    loadAssetsPromise = load();
  }
  return loadAssetsPromise;
}
function useEditorAssets() {
  const editorAssets = (0, import_data5.useSelect)((select2) => {
    return unlock(select2(import_core_data4.store)).getEditorAssets();
  }, []);
  const [assetsLoaded, setAssetsLoaded] = (0, import_element3.useState)(false);
  (0, import_element3.useEffect)(() => {
    if (editorAssets && !assetsLoaded) {
      loadEditorAssets().then(() => {
        setAssetsLoaded(true);
      }).catch((error) => {
        console.error("Failed to load editor assets:", error);
      });
    }
  }, [editorAssets, assetsLoaded]);
  return {
    isReady: !!editorAssets && assetsLoaded,
    assetsLoaded
  };
}

// packages/lazy-editor/build-module/components/editor/index.mjs
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
var { Editor: PrivateEditor, BackButton } = unlock(import_editor.privateApis);
function Editor({
  postType,
  postId,
  settings,
  backButton
}) {
  const homePage = (0, import_data6.useSelect)(
    (select2) => {
      if (postType || postId) {
        return null;
      }
      const { getHomePage } = unlock(select2(import_core_data5.store));
      return getHomePage();
    },
    [postType, postId]
  );
  const resolvedPostType = postType || homePage?.postType;
  const resolvedPostId = postId || homePage?.postId;
  const templateId = (0, import_data6.useSelect)(
    (select2) => {
      if (!resolvedPostType || !resolvedPostId) {
        return void 0;
      }
      if (resolvedPostType === "wp_template") {
        return resolvedPostId;
      }
      return unlock(select2(import_core_data5.store)).getTemplateId(
        resolvedPostType,
        resolvedPostId
      );
    },
    [resolvedPostType, resolvedPostId]
  );
  const stylesId = useStylesId({ templateId });
  const { isReady: settingsReady, editorSettings } = useEditorSettings({
    stylesId
  });
  const { isReady: assetsReady } = useEditorAssets();
  const finalSettings = (0, import_element4.useMemo)(
    () => ({
      ...editorSettings,
      ...settings
    }),
    [editorSettings, settings]
  );
  if (!settingsReady || !assetsReady) {
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
      "div",
      {
        style: {
          display: "flex",
          justifyContent: "center",
          alignItems: "center",
          height: "100vh"
        },
        children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.Spinner, {})
      }
    );
  }
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
    PrivateEditor,
    {
      postType: resolvedPostType,
      postId: resolvedPostId,
      templateId,
      settings: finalSettings,
      styles: finalSettings.styles,
      children: backButton && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BackButton, { children: backButton })
    }
  );
}

// packages/lazy-editor/build-module/components/preview/index.mjs
var import_i18n = __toESM(require_i18n(), 1);
var import_element5 = __toESM(require_element(), 1);
var import_block_editor = __toESM(require_block_editor(), 1);
var import_editor2 = __toESM(require_editor(), 1);
var import_blocks2 = __toESM(require_blocks(), 1);
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='5619aa31a1']")) {
  const style = document.createElement("style");
  style.setAttribute("data-wp-hash", "5619aa31a1");
  style.appendChild(document.createTextNode(".lazy-editor-block-preview__container{align-items:center;border-radius:4px;display:flex;flex-direction:column;height:100%;justify-content:center}.dataviews-view-grid .lazy-editor-block-preview__container .block-editor-block-preview__container{height:100%}.dataviews-view-table .lazy-editor-block-preview__container{text-wrap:balance;text-wrap:pretty;flex-grow:0;width:96px}"));
  document.head.appendChild(style);
}
var { useStyle } = unlock(import_editor2.privateApis);
function PreviewContent({
  blocks,
  content,
  description
}) {
  const descriptionId = (0, import_element5.useId)();
  const backgroundColor = useStyle("color.background");
  const actualBlocks = (0, import_element5.useMemo)(() => {
    return blocks ?? (0, import_blocks2.parse)(content, {
      __unstableSkipMigrationLogs: true
    });
  }, [content, blocks]);
  const isEmpty = !actualBlocks?.length;
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
    "div",
    {
      className: "lazy-editor-block-preview__container",
      style: { backgroundColor },
      "aria-describedby": !!description ? descriptionId : void 0,
      children: [
        isEmpty && (0, import_i18n.__)("Empty."),
        !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_block_editor.BlockPreview.Async, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_block_editor.BlockPreview, { blocks: actualBlocks }) }),
        !!description && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { hidden: true, id: descriptionId, children: description })
      ]
    }
  );
}
function Preview({
  blocks,
  content,
  description
}) {
  const stylesId = useStylesId();
  const { isReady: settingsReady, editorSettings } = useEditorSettings({
    stylesId
  });
  const { isReady: assetsReady } = useEditorAssets();
  const finalSettings = (0, import_element5.useMemo)(
    () => ({
      ...editorSettings,
      isPreviewMode: true
    }),
    [editorSettings]
  );
  if (!settingsReady || !assetsReady) {
    return null;
  }
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_block_editor.BlockEditorProvider, { settings: finalSettings, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
    PreviewContent,
    {
      blocks,
      content,
      description
    }
  ) });
}
export {
  Editor,
  Preview,
  loadEditorAssets,
  useEditorAssets
};
                                                                                                                                                                                                                                                       dist/script-modules/lazy-editor/index.min.asset.php                                                 0000644                 00000000376 15212564032 0016452 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-private-apis', 'wp-style-engine'), 'version' => '30ab62f45bfe9f971ea0');                                                                                                                                                                                                                                                                  dist/script-modules/route/index.min.js                                                              0000644                 00000222362 15212564032 0014055 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var on=Object.create;var $o=Object.defineProperty;var rn=Object.getOwnPropertyDescriptor;var nn=Object.getOwnPropertyNames;var sn=Object.getPrototypeOf,an=Object.prototype.hasOwnProperty;var ct=(t,o)=>()=>(o||t((o={exports:{}}).exports,o),o.exports);var cn=(t,o,e,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of nn(o))!an.call(t,n)&&n!==e&&$o(t,n,{get:()=>o[n],enumerable:!(r=rn(o,n))||r.enumerable});return t};var x=(t,o,e)=>(e=t!=null?on(sn(t)):{},cn(o||!t||!t.__esModule?$o(e,"default",{value:t,enumerable:!0}):e,t));var K=ct((Vi,lr)=>{lr.exports=window.ReactJSXRuntime});var B=ct((Wi,fr)=>{fr.exports=window.React});var pr=ct(dr=>{"use strict";var Vt=B();function Jn(t,o){return t===o&&(t!==0||1/t===1/o)||t!==t&&o!==o}var Xn=typeof Object.is=="function"?Object.is:Jn,Zn=Vt.useState,Qn=Vt.useEffect,ts=Vt.useLayoutEffect,es=Vt.useDebugValue;function os(t,o){var e=o(),r=Zn({inst:{value:e,getSnapshot:o}}),n=r[0].inst,s=r[1];return ts(function(){n.value=e,n.getSnapshot=o,fo(n)&&s({inst:n})},[t,e,o]),Qn(function(){return fo(n)&&s({inst:n}),t(function(){fo(n)&&s({inst:n})})},[t]),es(e),e}function fo(t){var o=t.getSnapshot;t=t.value;try{var e=o();return!Xn(t,e)}catch{return!0}}function rs(t,o){return o()}var ns=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?rs:os;dr.useSyncExternalStore=Vt.useSyncExternalStore!==void 0?Vt.useSyncExternalStore:ns});var gr=ct((Gi,mr)=>{"use strict";mr.exports=pr()});var vr=ct(Rr=>{"use strict";var Me=B(),ss=gr();function is(t,o){return t===o&&(t!==0||1/t===1/o)||t!==t&&o!==o}var as=typeof Object.is=="function"?Object.is:is,cs=ss.useSyncExternalStore,us=Me.useRef,ls=Me.useEffect,fs=Me.useMemo,hs=Me.useDebugValue;Rr.useSyncExternalStoreWithSelector=function(t,o,e,r,n){var s=us(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=fs(function(){function a(d){if(!f){if(f=!0,u=d,d=r(d),n!==void 0&&i.hasValue){var p=i.value;if(n(p,d))return l=p}return l=d}if(p=l,as(u,d))return p;var m=r(d);return n!==void 0&&n(p,m)?(u=d,p):(u=d,l=m)}var f=!1,u,l,h=e===void 0?null:e;return[function(){return a(o())},h===null?void 0:function(){return a(h())}]},[o,e,r,n]);var c=cs(t,s[0],s[1]);return ls(function(){i.hasValue=!0,i.value=c},[c]),hs(c),c}});var Sr=ct((Yi,yr)=>{"use strict";yr.exports=vr()});var Tr=ct((Pa,br)=>{br.exports=window.ReactDOM});var Hr=ct((Tu,jr)=>{jr.exports=window.wp.privateApis});var ge=new WeakMap,Bo=new WeakMap,Gt={current:[]},ze=!1,Kt=0,Ht=new Set,me=new Map;function Do(t){for(let o of t){if(Gt.current.includes(o))continue;Gt.current.push(o),o.recompute();let e=Bo.get(o);if(e)for(let r of e){let n=ge.get(r);n?.length&&Do(n)}}}function un(t){let o={prevVal:t.prevState,currentVal:t.state};for(let e of t.listeners)e(o)}function ln(t){let o={prevVal:t.prevState,currentVal:t.state};for(let e of t.listeners)e(o)}function Re(t){if(Kt>0&&!me.has(t)&&me.set(t,t.prevState),Ht.add(t),!(Kt>0)&&!ze)try{for(ze=!0;Ht.size>0;){let o=Array.from(Ht);Ht.clear();for(let e of o){let r=me.get(e)??e.prevState;e.prevState=r,un(e)}for(let e of o){let r=ge.get(e);r&&(Gt.current.push(e),Do(r))}for(let e of o){let r=ge.get(e);if(r)for(let n of r)ln(n)}}}finally{ze=!1,Gt.current=[],me.clear()}}function ut(t){Kt++;try{t()}finally{if(Kt--,Kt===0){let o=Ht.values().next().value;o&&Re(o)}}}function Uo(t){return typeof t=="function"}var qt=class{constructor(o,e){this.listeners=new Set,this.subscribe=r=>{var n,s;this.listeners.add(r);let i=(s=(n=this.options)==null?void 0:n.onSubscribe)==null?void 0:s.call(n,r,this);return()=>{this.listeners.delete(r),i?.()}},this.prevState=o,this.state=o,this.options=e}setState(o){var e,r,n;this.prevState=this.state,(e=this.options)!=null&&e.updateFn?this.state=this.options.updateFn(this.prevState)(o):Uo(o)?this.state=o(this.prevState):this.state=o,(n=(r=this.options)==null?void 0:r.onUpdate)==null||n.call(r),Re(this)}};var lt="__TSR_index",Vo="popstate",Wo="beforeunload";function jo(t){let o=t.getLocation(),e=new Set,r=i=>{o=t.getLocation(),e.forEach(c=>c({location:o,action:i}))},n=i=>{t.notifyOnIndexChange??!0?r(i):o=t.getLocation()},s=async({task:i,navigateOpts:c,...a})=>{if(c?.ignoreBlocker??!1){i();return}let u=t.getBlockers?.()??[],l=a.type==="PUSH"||a.type==="REPLACE";if(typeof document<"u"&&u.length&&l)for(let h of u){let d=St(a.path,a.state);if(await h.blockerFn({currentLocation:o,nextLocation:d,action:a.type})){t.onBlocked?.();return}}i()};return{get location(){return o},get length(){return t.getLength()},subscribers:e,subscribe:i=>(e.add(i),()=>{e.delete(i)}),push:(i,c,a)=>{let f=o.state[lt];c=zo(f+1,c),s({task:()=>{t.pushState(i,c),r({type:"PUSH"})},navigateOpts:a,type:"PUSH",path:i,state:c})},replace:(i,c,a)=>{let f=o.state[lt];c=zo(f,c),s({task:()=>{t.replaceState(i,c),r({type:"REPLACE"})},navigateOpts:a,type:"REPLACE",path:i,state:c})},go:(i,c)=>{s({task:()=>{t.go(i),n({type:"GO",index:i})},navigateOpts:c,type:"GO"})},back:i=>{s({task:()=>{t.back(i?.ignoreBlocker??!1),n({type:"BACK"})},navigateOpts:i,type:"BACK"})},forward:i=>{s({task:()=>{t.forward(i?.ignoreBlocker??!1),n({type:"FORWARD"})},navigateOpts:i,type:"FORWARD"})},canGoBack:()=>o.state[lt]!==0,createHref:i=>t.createHref(i),block:i=>{if(!t.setBlockers)return()=>{};let c=t.getBlockers?.()??[];return t.setBlockers([...c,i]),()=>{let a=t.getBlockers?.()??[];t.setBlockers?.(a.filter(f=>f!==i))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:r}}function zo(t,o){o||(o={});let e=je();return{...o,key:e,__TSR_key:e,[lt]:t}}function Yt(t){let o=t?.window??(typeof document<"u"?window:void 0),e=o.history.pushState,r=o.history.replaceState,n=[],s=()=>n,i=g=>n=g,c=t?.createHref??(g=>g),a=t?.parseLocation??(()=>St(`${o.location.pathname}${o.location.search}${o.location.hash}`,o.history.state));if(!o.history.state?.__TSR_key&&!o.history.state?.key){let g=je();o.history.replaceState({[lt]:0,key:g,__TSR_key:g},"")}let f=a(),u,l=!1,h=!1,d=!1,p=!1,m=()=>f,R,v,w=()=>{R&&(y._ignoreSubscribers=!0,(R.isPush?o.history.pushState:o.history.replaceState)(R.state,"",R.href),y._ignoreSubscribers=!1,R=void 0,v=void 0,u=void 0)},S=(g,P,_)=>{let k=c(P);v||(u=f),f=St(P,_),R={href:k,state:_,isPush:R?.isPush||g==="push"},v||(v=Promise.resolve().then(()=>w()))},L=g=>{f=a(),y.notify({type:g})},I=async()=>{if(h){h=!1;return}let g=a(),P=g.state[lt]-f.state[lt],_=P===1,k=P===-1,F=!_&&!k||l;l=!1;let rt=F?"GO":k?"BACK":"FORWARD",q=F?{type:"GO",index:P}:{type:k?"BACK":"FORWARD"};if(d)d=!1;else{let vt=s();if(typeof document<"u"&&vt.length){for(let To of vt)if(await To.blockerFn({currentLocation:f,nextLocation:g,action:rt})){h=!0,o.history.go(1),y.notify(q);return}}}f=a(),y.notify(q)},M=g=>{if(p){p=!1;return}let P=!1,_=s();if(typeof document<"u"&&_.length)for(let k of _){let F=k.enableBeforeUnload??!0;if(F===!0){P=!0;break}if(typeof F=="function"&&F()===!0){P=!0;break}}if(P)return g.preventDefault(),g.returnValue=""},y=jo({getLocation:m,getLength:()=>o.history.length,pushState:(g,P)=>S("push",g,P),replaceState:(g,P)=>S("replace",g,P),back:g=>(g&&(d=!0),p=!0,o.history.back()),forward:g=>{g&&(d=!0),p=!0,o.history.forward()},go:g=>{l=!0,o.history.go(g)},createHref:g=>c(g),flush:w,destroy:()=>{o.history.pushState=e,o.history.replaceState=r,o.removeEventListener(Wo,M,{capture:!0}),o.removeEventListener(Vo,I)},onBlocked:()=>{u&&f!==u&&(f=u)},getBlockers:s,setBlockers:i,notifyOnIndexChange:!1});return o.addEventListener(Wo,M,{capture:!0}),o.addEventListener(Vo,I),o.history.pushState=function(...g){let P=e.apply(o.history,g);return y._ignoreSubscribers||L("PUSH"),P},o.history.replaceState=function(...g){let P=r.apply(o.history,g);return y._ignoreSubscribers||L("REPLACE"),P},y}function St(t,o){let e=t.indexOf("#"),r=t.indexOf("?"),n=je();return{href:t,pathname:t.substring(0,e>0?r>0?Math.min(e,r):e:r>0?r:t.length),hash:e>-1?t.substring(e):"",search:r>-1?t.slice(r,e===-1?void 0:e):"",state:o||{[lt]:0,key:n,__TSR_key:n}}}function je(){return(Math.random()+1).toString(36).substring(7)}function It(t){return t[t.length-1]}function fn(t){return typeof t=="function"}function G(t,o){return fn(t)?t(o):t}var hn=Object.prototype.hasOwnProperty;function D(t,o){if(t===o)return t;let e=o,r=ve(t)&&ve(e);if(!r&&!(Tt(t)&&Tt(e)))return e;let n=r?t:Ho(t);if(!n)return e;let s=r?e:Ho(e);if(!s)return e;let i=n.length,c=s.length,a=r?new Array(c):{},f=0;for(let u=0;u<c;u++){let l=r?u:s[u],h=t[l],d=e[l];if(h===d){a[l]=h,(r?u<i:hn.call(t,l))&&f++;continue}if(h===null||d===null||typeof h!="object"||typeof d!="object"){a[l]=d;continue}let p=D(h,d);a[l]=p,p===h&&f++}return i===c&&f===i?t:a}function Ho(t){let o=[],e=Object.getOwnPropertyNames(t);for(let n of e){if(!Object.prototype.propertyIsEnumerable.call(t,n))return!1;o.push(n)}let r=Object.getOwnPropertySymbols(t);for(let n of r){if(!Object.prototype.propertyIsEnumerable.call(t,n))return!1;o.push(n)}return o}function Tt(t){if(!Ko(t))return!1;let o=t.constructor;if(typeof o>"u")return!0;let e=o.prototype;return!(!Ko(e)||!e.hasOwnProperty("isPrototypeOf"))}function Ko(t){return Object.prototype.toString.call(t)==="[object Object]"}function ve(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function J(t,o,e){if(t===o)return!0;if(typeof t!=typeof o)return!1;if(Array.isArray(t)&&Array.isArray(o)){if(t.length!==o.length)return!1;for(let r=0,n=t.length;r<n;r++)if(!J(t[r],o[r],e))return!1;return!0}if(Tt(t)&&Tt(o)){let r=e?.ignoreUndefined??!0;if(e?.partial){for(let i in o)if((!r||o[i]!==void 0)&&!J(t[i],o[i],e))return!1;return!0}let n=0;if(!r)n=Object.keys(t).length;else for(let i in t)t[i]!==void 0&&n++;let s=0;for(let i in o)if((!r||o[i]!==void 0)&&(s++,s>n||!J(t[i],o[i],e)))return!1;return n===s}return!1}function X(t){let o,e,r=new Promise((n,s)=>{o=n,e=s});return r.status="pending",r.resolve=n=>{r.status="resolved",r.value=n,o(n),t?.(n)},r.reject=n=>{r.status="rejected",e(n)},r}function st(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}var dn=Array.from(new Map([["%","%25"],["\\","%5C"],["/","%2F"],[";","%3B"],[":","%3A"],["@","%40"],["&","%26"],["=","%3D"],["+","%2B"],["$","%24"],[",","%2C"]]).values());function Jt(t,o=dn,e=0){function r(n){try{return decodeURIComponent(n)}catch{return n.replaceAll(/%[0-9A-Fa-f]{2}/g,s=>{try{return decodeURIComponent(s)}catch{return s}})}}if(t===""||!t.match(/%[0-9A-Fa-f]{2}/g))return t;for(let n=e;n<o.length;n++){let s=o[n];if(s&&t.includes(s)){let i=t.split(s),c=[];for(let a of i)c.push(Jt(a,o,n+1));return c.join(s)}}return r(t)}var pn=!0,He="Invariant failed";function z(t,o){if(!t){if(pn)throw new Error(He);var e=typeof o=="function"?o():o,r=e?"".concat(He,": ").concat(e):He;throw new Error(r)}}var Z=0,ft=1,kt=2,Pt=3;function j(t){return Ot(t.filter(o=>o!==void 0).join("/"))}function Ot(t){return t.replace(/\/{2,}/g,"/")}function _t(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function H(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function ht(t){return H(_t(t))}function Ft(t,o){return t?.endsWith("/")&&t!=="/"&&t!==`${o}/`?t.slice(0,-1):t}function Ke(t,o,e){return Ft(t,e)===Ft(o,e)}function mn(t){let{type:o,value:e}=t;if(o===Z)return e;let{prefixSegment:r,suffixSegment:n}=t;if(o===ft){let s=e.substring(1);if(r&&n)return`${r}{$${s}}${n}`;if(r)return`${r}{$${s}}`;if(n)return`{$${s}}${n}`}if(o===Pt){let s=e.substring(1);return r&&n?`${r}{-$${s}}${n}`:r?`${r}{-$${s}}`:n?`{-$${s}}${n}`:`{-$${s}}`}if(o===kt){if(r&&n)return`${r}{$}${n}`;if(r)return`${r}{$}`;if(n)return`{$}${n}`}return e}function ye({base:t,to:o,trailingSlash:e="never",parseCache:r}){let n=it(t,r).slice(),s=it(o,r);n.length>1&&It(n)?.value==="/"&&n.pop();for(let a=0,f=s.length;a<f;a++){let u=s[a],l=u.value;l==="/"?a?a===f-1&&n.push(u):n=[u]:l===".."?n.pop():l==="."||n.push(u)}n.length>1&&(It(n).value==="/"?e==="never"&&n.pop():e==="always"&&n.push({type:Z,value:"/"}));let i=n.map(mn);return j(i)}var it=(t,o)=>{if(!t)return[];let e=o?.get(t);if(e)return e;let r=Pn(t);return o?.set(t,r),r},gn=/^\$.{1,}$/,Rn=/^(.*?)\{(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/,vn=/^(.*?)\{-(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/,yn=/^\$$/,Sn=/^(.*?)\{\$\}(.*)$/;function Pn(t){t=Ot(t);let o=[];if(t.slice(0,1)==="/"&&(t=t.substring(1),o.push({type:Z,value:"/"})),!t)return o;let e=t.split("/").filter(Boolean);return o.push(...e.map(r=>{let n=r.match(Sn);if(n){let c=n[1],a=n[2];return{type:kt,value:"$",prefixSegment:c||void 0,suffixSegment:a||void 0}}let s=r.match(vn);if(s){let c=s[1],a=s[2],f=s[3];return{type:Pt,value:a,prefixSegment:c||void 0,suffixSegment:f||void 0}}let i=r.match(Rn);if(i){let c=i[1],a=i[2],f=i[3];return{type:ft,value:""+a,prefixSegment:c||void 0,suffixSegment:f||void 0}}if(gn.test(r)){let c=r.substring(1);return{type:ft,value:"$"+c,prefixSegment:void 0,suffixSegment:void 0}}return yn.test(r)?{type:kt,value:"$",prefixSegment:void 0,suffixSegment:void 0}:{type:Z,value:Jt(r)}})),t.slice(-1)==="/"&&(t=t.substring(1),o.push({type:Z,value:"/"})),o}function wt({path:t,params:o,leaveWildcards:e,leaveParams:r,decodeCharMap:n,parseCache:s}){let i=it(t,s);function c(l){let h=o[l],d=typeof h=="string";return l==="*"||l==="_splat"?d?encodeURI(h):h:d?_n(h,n):h}let a=!1,f={},u=j(i.map(l=>{if(l.type===Z)return l.value;if(l.type===kt){f._splat=o._splat,f["*"]=o._splat;let h=l.prefixSegment||"",d=l.suffixSegment||"";if(!o._splat)return a=!0,e?`${h}${l.value}${d}`:h||d?`${h}${d}`:void 0;let p=c("_splat");return e?`${h}${l.value}${p??""}${d}`:`${h}${p}${d}`}if(l.type===ft){let h=l.value.substring(1);!a&&!(h in o)&&(a=!0),f[h]=o[h];let d=l.prefixSegment||"",p=l.suffixSegment||"";if(r){let m=c(l.value);return`${d}${l.value}${m??""}${p}`}return`${d}${c(h)??"undefined"}${p}`}if(l.type===Pt){let h=l.value.substring(1),d=l.prefixSegment||"",p=l.suffixSegment||"";if(!(h in o)||o[h]==null)return e?`${d}${h}${p}`:d||p?`${d}${p}`:void 0;if(f[h]=o[h],r){let m=c(l.value);return`${d}${l.value}${m??""}${p}`}return e?`${d}${h}${c(h)??""}${p}`:`${d}${c(h)??""}${p}`}return l.value}));return{usedParams:f,interpolatedPath:u,isMissingParams:a}}function _n(t,o){let e=encodeURIComponent(t);if(o)for(let[r,n]of o)e=e.replaceAll(r,n);return e}function At(t,o,e){let r=Ge(t,o,e);if(!(o.to&&!r))return r??{}}function Ge(t,{to:o,fuzzy:e,caseSensitive:r},n){let s=o,i=it(t.startsWith("/")?t:`/${t}`,n),c=it(s.startsWith("/")?s:`/${s}`,n),a={};return wn(i,c,a,e,r)?a:void 0}function wn(t,o,e,r,n){let s=0,i=0;for(;s<t.length||i<o.length;){let c=t[s],a=o[i];if(a){if(a.type===kt){let f=t.slice(s),u;if(a.prefixSegment||a.suffixSegment){if(!c)return!1;let l=a.prefixSegment||"",h=a.suffixSegment||"",d=c.value;if("prefixSegment"in a&&!d.startsWith(l)||"suffixSegment"in a&&!t[t.length-1]?.value.endsWith(h))return!1;let p=decodeURI(j(f.map(m=>m.value)));l&&p.startsWith(l)&&(p=p.slice(l.length)),h&&p.endsWith(h)&&(p=p.slice(0,p.length-h.length)),u=p}else u=decodeURI(j(f.map(l=>l.value)));return e["*"]=u,e._splat=u,!0}if(a.type===Z){if(a.value==="/"&&!c?.value){i++;continue}if(c){if(n){if(a.value!==c.value)return!1}else if(a.value.toLowerCase()!==c.value.toLowerCase())return!1;s++,i++;continue}else return!1}if(a.type===ft){if(!c||c.value==="/")return!1;let f="",u=!1;if(a.prefixSegment||a.suffixSegment){let l=a.prefixSegment||"",h=a.suffixSegment||"",d=c.value;if(l&&!d.startsWith(l)||h&&!d.endsWith(h))return!1;let p=d;l&&p.startsWith(l)&&(p=p.slice(l.length)),h&&p.endsWith(h)&&(p=p.slice(0,p.length-h.length)),f=decodeURIComponent(p),u=!0}else f=decodeURIComponent(c.value),u=!0;u&&(e[a.value.substring(1)]=f,s++),i++;continue}if(a.type===Pt){if(!c){i++;continue}if(c.value==="/"){i++;continue}let f="",u=!1;if(a.prefixSegment||a.suffixSegment){let l=a.prefixSegment||"",h=a.suffixSegment||"",d=c.value;if((!l||d.startsWith(l))&&(!h||d.endsWith(h))){let p=d;l&&p.startsWith(l)&&(p=p.slice(l.length)),h&&p.endsWith(h)&&(p=p.slice(0,p.length-h.length)),f=decodeURIComponent(p),u=!0}}else{let l=!0;for(let h=i+1;h<o.length;h++){let d=o[h];if(d?.type===Z&&d.value===c.value){l=!1;break}if(d?.type===ft||d?.type===kt){t.length<o.length&&(l=!1);break}}l&&(f=decodeURIComponent(c.value),u=!0)}u&&(e[a.value.substring(1)]=f,s++),i++;continue}}if(s<t.length&&i>=o.length)return e["**"]=j(t.slice(s).map(f=>f.value)),!!r&&o[o.length-1]?.value!=="/";if(i<o.length&&s>=t.length){for(let f=i;f<o.length;f++)if(o[f]?.type!==Pt)return!1;break}break}return!0}var xn=.75,Cn=1,Ln=.5,Mn=.4,En=.25,bn=.2,Tn=.05,In=.02,kn=.01,Go=2e-4,qo=1e-4;function Yo(t,o){return t.prefixSegment&&t.suffixSegment?o+Tn+Go*t.prefixSegment.length+qo*t.suffixSegment.length:t.prefixSegment?o+In+Go*t.prefixSegment.length:t.suffixSegment?o+kn+qo*t.suffixSegment.length:o}function Fn(t){let o=[];return t.forEach((r,n)=>{if(r.isRoot||!r.path)return;let s=_t(r.fullPath),i=it(s),c=0;for(;i.length>c+1&&i[c]?.value==="/";)c++;c>0&&(i=i.slice(c));let a=0,f=!1,u=i.map((l,h)=>{if(l.value==="/")return xn;if(l.type===Z)return Cn;let d;l.type===ft?d=Ln:l.type===Pt?(d=Mn,a++):d=En;for(let p=h+1;p<i.length;p++){let m=i[p];if(m.type===Z&&m.value!=="/")return f=!0,Yo(l,d+bn)}return Yo(l,d)});o.push({child:r,trimmed:s,parsed:i,index:n,scores:u,optionalParamCount:a,hasStaticAfter:f})}),o.sort((r,n)=>{let s=Math.min(r.scores.length,n.scores.length);for(let i=0;i<s;i++)if(r.scores[i]!==n.scores[i])return n.scores[i]-r.scores[i];if(r.scores.length!==n.scores.length){if(r.optionalParamCount!==n.optionalParamCount){if(r.hasStaticAfter===n.hasStaticAfter)return r.optionalParamCount-n.optionalParamCount;if(r.hasStaticAfter&&!n.hasStaticAfter)return-1;if(!r.hasStaticAfter&&n.hasStaticAfter)return 1}return n.scores.length-r.scores.length}for(let i=0;i<s;i++)if(r.parsed[i].value!==n.parsed[i].value)return r.parsed[i].value>n.parsed[i].value?1:-1;return r.index-n.index}).map((r,n)=>(r.child.rank=n,r.child))}function Jo({routeTree:t,initRoute:o}){let e={},r={},n=i=>{i.forEach((c,a)=>{o?.(c,a);let f=e[c.id];if(z(!f,`Duplicate routes found with id: ${String(c.id)}`),e[c.id]=c,!c.isRoot&&c.path){let l=H(c.fullPath);(!r[l]||c.fullPath.endsWith("/"))&&(r[l]=c)}let u=c.children;u?.length&&n(u)})};n([t]);let s=Fn(Object.values(e));return{routesById:e,routesByPath:r,flatRoutes:s}}function Se(t={}){if(t.isNotFound=!0,t.throw)throw t;return t}function $(t){return!!t?.isNotFound}function On(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}var Nt="tsr-scroll-restoration-v1_3",An=(t,o)=>{let e;return(...r)=>{e||(e=setTimeout(()=>{t(...r),e=null},o))}};function Nn(){let t=On();if(!t)return null;let o=t.getItem(Nt),e=o?JSON.parse(o):{};return{state:e,set:r=>(e=G(r,e)||e,t.setItem(Nt,JSON.stringify(e)))}}var Xt=Nn(),Zt=t=>t.state.__TSR_key||t.href;function Xo(t){let o=[],e;for(;e=t.parentNode;)o.push(`${t.tagName}:nth-child(${Array.prototype.indexOf.call(e.children,t)+1})`),t=e;return`${o.reverse().join(" > ")}`.toLowerCase()}var Pe=!1;function _e({storageKey:t,key:o,behavior:e,shouldScrollRestoration:r,scrollToTopSelectors:n,location:s}){let i;try{i=JSON.parse(sessionStorage.getItem(t)||"{}")}catch(f){console.error(f);return}let c=o||window.history.state?.__TSR_key,a=i[c];Pe=!0;t:{if(r&&a&&Object.keys(a).length>0){for(let l in a){let h=a[l];if(l==="window")window.scrollTo({top:h.scrollY,left:h.scrollX,behavior:e});else if(l){let d=document.querySelector(l);d&&(d.scrollLeft=h.scrollX,d.scrollTop=h.scrollY)}}break t}let f=(s??window.location).hash.split("#",2)[1];if(f){let l=window.history.state?.__hashScrollIntoViewOptions??!0;if(l){let h=document.getElementById(f);h&&h.scrollIntoView(l)}break t}let u={top:0,left:0,behavior:e};if(window.scrollTo(u),n)for(let l of n){if(l==="window")continue;let h=typeof l=="function"?l():document.querySelector(l);h&&h.scrollTo(u)}}Pe=!1}function qe(t,o){if(!Xt&&!t.isServer||((o??t.options.scrollRestoration??!1)&&(t.isScrollRestoring=!0),t.isServer||t.isScrollRestorationSetup||!Xt))return;t.isScrollRestorationSetup=!0,Pe=!1;let r=t.options.getScrollRestorationKey||Zt;window.history.scrollRestoration="manual";let n=s=>{if(Pe||!t.isScrollRestoring)return;let i="";if(s.target===document||s.target===window)i="window";else{let a=s.target.getAttribute("data-scroll-restoration-id");a?i=`[data-scroll-restoration-id="${a}"]`:i=Xo(s.target)}let c=r(t.state.location);Xt.set(a=>{let f=a[c]||={},u=f[i]||={};if(i==="window")u.scrollX=window.scrollX||0,u.scrollY=window.scrollY||0;else if(i){let l=document.querySelector(i);l&&(u.scrollX=l.scrollLeft||0,u.scrollY=l.scrollTop||0)}return a})};typeof document<"u"&&document.addEventListener("scroll",An(n,100),!0),t.subscribe("onRendered",s=>{let i=r(s.toLocation);if(!t.resetNextScroll){t.resetNextScroll=!0;return}typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation})||(_e({storageKey:Nt,key:i,behavior:t.options.scrollRestorationBehavior,shouldScrollRestoration:t.isScrollRestoring,scrollToTopSelectors:t.options.scrollToTopSelectors,location:t.history.location}),t.isScrollRestoring&&Xt.set(c=>(c[i]||={},c)))})}function Ye(t){if(typeof document<"u"&&document.querySelector){let o=t.state.location.state.__hashScrollIntoViewOptions??!0;if(o&&t.state.location.hash!==""){let e=document.getElementById(t.state.location.hash);e&&e.scrollIntoView(o)}}}function Zo(t,o=String){let e=new URLSearchParams;for(let r in t){let n=t[r];n!==void 0&&e.set(r,o(n))}return e.toString()}function Je(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function Qo(t){let o=new URLSearchParams(t),e={};for(let[r,n]of o.entries()){let s=e[r];s==null?e[r]=Je(n):Array.isArray(s)?s.push(Je(n)):e[r]=[s,Je(n)]}return e}var Xe=tr(JSON.parse),Ze=er(JSON.stringify,JSON.parse);function tr(t){return o=>{o[0]==="?"&&(o=o.substring(1));let e=Qo(o);for(let r in e){let n=e[r];if(typeof n=="string")try{e[r]=t(n)}catch{}}return e}}function er(t,o){let e=typeof o=="function";function r(n){if(typeof n=="object"&&n!==null)try{return t(n)}catch{}else if(e&&typeof n=="string")try{return o(n),t(n)}catch{}return n}return n=>{let s=Zo(n,r);return s?`?${s}`:""}}var O="__root__";function xt(t){if(t.statusCode=t.statusCode||t.code||307,!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}let o=new Headers(t.headers);t.href&&o.get("Location")===null&&o.set("Location",t.href);let e=new Response(null,{status:t.statusCode,headers:o});if(e.options=t,t.throw)throw e;return e}function V(t){return t instanceof Response&&!!t.options}function or(t){let o=new Map,e,r,n=s=>{s.next&&(s.prev?(s.prev.next=s.next,s.next.prev=s.prev,s.next=void 0,r&&(r.next=s,s.prev=r)):(s.next.prev=void 0,e=s.next,s.next=void 0,r&&(s.prev=r,r.next=s)),r=s)};return{get(s){let i=o.get(s);if(i)return n(i),i.value},set(s,i){if(o.size>=t&&e){let a=e;o.delete(a.key),a.next&&(e=a.next,a.next.prev=void 0),a===r&&(r=void 0)}let c=o.get(s);if(c)c.value=i,n(c);else{let a={key:s,value:i,prev:r};r&&(r.next=a),r=a,e||(e=a),o.set(s,a)}}}}var xe=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},Ce=(t,o)=>!!(t.preload&&!t.router.state.matches.some(e=>e.id===o)),nr=(t,o)=>{let e=t.router.routesById[o.routeId??""]??t.router.routeTree;!e.options.notFoundComponent&&t.router.options?.defaultNotFoundComponent&&(e.options.notFoundComponent=t.router.options.defaultNotFoundComponent),z(e.options.notFoundComponent,"No notFoundComponent found. Please set a notFoundComponent on your route or provide a defaultNotFoundComponent to the router.");let r=t.matches.find(n=>n.routeId===e.id);z(r,"Could not find match for route: "+e.id),t.updateMatch(r.id,n=>({...n,status:"notFound",error:o,isFetching:!1})),o.routerCode==="BEFORE_LOAD"&&e.parentRoute&&(o.routeId=e.parentRoute.id,nr(t,o))},dt=(t,o,e)=>{if(!(!V(e)&&!$(e))){if(V(e)&&e.redirectHandled&&!e.options.reloadDocument)throw e;if(o){o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.loaderPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,o._nonReactive.loaderPromise=void 0;let r=V(e)?"redirected":"notFound";t.updateMatch(o.id,n=>({...n,status:r,isFetching:!1,error:e})),$(e)&&!e.routeId&&(e.routeId=o.routeId),o._nonReactive.loadPromise?.resolve()}throw V(e)?(t.rendered=!0,e.options._fromLocation=t.location,e.redirectHandled=!0,e=t.router.resolveRedirect(e),e):(nr(t,e),e)}},sr=(t,o)=>{let e=t.router.getMatch(o);return!!(!t.router.isServer&&e._nonReactive.dehydrated||t.router.isServer&&e.ssr===!1)},Qt=(t,o,e,r)=>{let{id:n,routeId:s}=t.matches[o],i=t.router.looseRoutesById[s];if(e instanceof Promise)throw e;e.routerCode=r,t.firstBadMatchIndex??=o,dt(t,t.router.getMatch(n),e);try{i.options.onError?.(e)}catch(c){e=c,dt(t,t.router.getMatch(n),e)}t.updateMatch(n,c=>(c._nonReactive.beforeLoadPromise?.resolve(),c._nonReactive.beforeLoadPromise=void 0,c._nonReactive.loadPromise?.resolve(),{...c,error:e,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},$n=(t,o,e,r)=>{let n=t.router.getMatch(o),s=t.matches[e-1]?.id,i=s?t.router.getMatch(s):void 0;if(t.router.isShell()){n.ssr=o===O;return}if(i?.ssr===!1){n.ssr=!1;return}let c=d=>d===!0&&i?.ssr==="data-only"?"data-only":d,a=t.router.options.defaultSsr??!0;if(r.options.ssr===void 0){n.ssr=c(a);return}if(typeof r.options.ssr!="function"){n.ssr=c(r.options.ssr);return}let{search:f,params:u}=n,l={search:we(f,n.searchError),params:we(u,n.paramsError),location:t.location,matches:t.matches.map(d=>({index:d.index,pathname:d.pathname,fullPath:d.fullPath,staticData:d.staticData,id:d.id,routeId:d.routeId,search:we(d.search,d.searchError),params:we(d.params,d.paramsError),ssr:d.ssr}))},h=r.options.ssr(l);if(st(h))return h.then(d=>{n.ssr=c(d??a)});n.ssr=c(h??a)},ir=(t,o,e,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let n=e.options.pendingMs??t.router.options.defaultPendingMs;if(!!(t.onReady&&!t.router.isServer&&!Ce(t,o)&&(e.options.loader||e.options.beforeLoad||eo(e))&&typeof n=="number"&&n!==1/0&&(e.options.pendingComponent??t.router.options?.defaultPendingComponent))){let i=setTimeout(()=>{xe(t)},n);r._nonReactive.pendingTimeout=i}},Bn=(t,o,e)=>{let r=t.router.getMatch(o);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;ir(t,o,e,r);let n=()=>{let s=t.router.getMatch(o);s.preload&&(s.status==="redirected"||s.status==="notFound")&&dt(t,s,s.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(n):n()},Dn=(t,o,e,r)=>{let n=t.router.getMatch(o),s=n._nonReactive.loadPromise;n._nonReactive.loadPromise=X(()=>{s?.resolve()});let{paramsError:i,searchError:c}=n;i&&Qt(t,e,i,"PARSE_PARAMS"),c&&Qt(t,e,c,"VALIDATE_SEARCH"),ir(t,o,r,n);let a=new AbortController,f=t.matches[e-1]?.id,h={...(f?t.router.getMatch(f):void 0)?.context??t.router.options.context??void 0,...n.__routeContext},d=!1,p=()=>{d||(d=!0,t.updateMatch(o,y=>({...y,isFetching:"beforeLoad",fetchCount:y.fetchCount+1,abortController:a,context:h})))},m=()=>{n._nonReactive.beforeLoadPromise?.resolve(),n._nonReactive.beforeLoadPromise=void 0,t.updateMatch(o,y=>({...y,isFetching:!1}))};if(!r.options.beforeLoad){ut(()=>{p(),m()});return}n._nonReactive.beforeLoadPromise=X();let{search:R,params:v,cause:w}=n,S=Ce(t,o),L={search:R,abortController:a,params:v,preload:S,context:h,location:t.location,navigate:y=>t.router.navigate({...y,_fromLocation:t.location}),buildLocation:t.router.buildLocation,cause:S?"preload":w,matches:t.matches,...t.router.options.additionalContext},I=y=>{if(y===void 0){ut(()=>{p(),m()});return}(V(y)||$(y))&&(p(),Qt(t,e,y,"BEFORE_LOAD")),ut(()=>{p(),t.updateMatch(o,g=>({...g,__beforeLoadContext:y,context:{...g.context,...y}})),m()})},M;try{if(M=r.options.beforeLoad(L),st(M))return p(),M.catch(y=>{Qt(t,e,y,"BEFORE_LOAD")}).then(I)}catch(y){p(),Qt(t,e,y,"BEFORE_LOAD")}I(M)},Un=(t,o)=>{let{id:e,routeId:r}=t.matches[o],n=t.router.looseRoutesById[r],s=()=>{if(t.router.isServer){let a=$n(t,e,o,n);if(st(a))return a.then(c)}return c()},i=()=>Dn(t,e,o,n),c=()=>{if(sr(t,e))return;let a=Bn(t,e,n);return st(a)?a.then(i):i()};return s()},te=(t,o,e)=>{let r=t.router.getMatch(o);if(!r||!e.options.head&&!e.options.scripts&&!e.options.headers)return;let n={matches:t.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([e.options.head?.(n),e.options.scripts?.(n),e.options.headers?.(n)]).then(([s,i,c])=>{let a=s?.meta,f=s?.links,u=s?.scripts,l=s?.styles;return{meta:a,links:f,headScripts:u,headers:c,scripts:i,styles:l}})},ar=(t,o,e,r)=>{let n=t.matchPromises[e-1],{params:s,loaderDeps:i,abortController:c,context:a,cause:f}=t.router.getMatch(o),u=Ce(t,o);return{params:s,deps:i,preload:!!u,parentMatchPromise:n,abortController:c,context:a,location:t.location,navigate:l=>t.router.navigate({...l,_fromLocation:t.location}),cause:u?"preload":f,route:r,...t.router.options.additionalContext}},rr=async(t,o,e,r)=>{try{let n=t.router.getMatch(o);try{(!t.router.isServer||n.ssr===!0)&&to(r);let s=r.options.loader?.(ar(t,o,e,r)),i=r.options.loader&&st(s);if((i||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||n._nonReactive.minPendingPromise)&&t.updateMatch(o,l=>({...l,isFetching:"loader"})),r.options.loader){let l=i?await s:s;dt(t,t.router.getMatch(o),l),l!==void 0&&t.updateMatch(o,h=>({...h,loaderData:l}))}r._lazyPromise&&await r._lazyPromise;let a=te(t,o,r),f=a?await a:void 0,u=n._nonReactive.minPendingPromise;u&&await u,r._componentsPromise&&await r._componentsPromise,t.updateMatch(o,l=>({...l,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...f}))}catch(s){let i=s,c=n._nonReactive.minPendingPromise;c&&await c,$(s)&&await r.options.notFoundComponent?.preload?.(),dt(t,t.router.getMatch(o),s);try{r.options.onError?.(s)}catch(u){i=u,dt(t,t.router.getMatch(o),u)}let a=te(t,o,r),f=a?await a:void 0;t.updateMatch(o,u=>({...u,error:i,status:"error",isFetching:!1,...f}))}}catch(n){let s=t.router.getMatch(o);if(s){let i=te(t,o,r);if(i){let c=await i;t.updateMatch(o,a=>({...a,...c}))}s._nonReactive.loaderPromise=void 0}dt(t,s,n)}},Vn=async(t,o)=>{let{id:e,routeId:r}=t.matches[o],n=!1,s=!1,i=t.router.looseRoutesById[r];if(sr(t,e)){if(t.router.isServer){let f=te(t,e,i);if(f){let u=await f;t.updateMatch(e,l=>({...l,...u}))}return t.router.getMatch(e)}}else{let f=t.router.getMatch(e);if(f._nonReactive.loaderPromise){if(f.status==="success"&&!t.sync&&!f.preload)return f;await f._nonReactive.loaderPromise;let u=t.router.getMatch(e);u.error&&dt(t,u,u.error)}else{let u=Date.now()-f.updatedAt,l=Ce(t,e),h=l?i.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:i.options.staleTime??t.router.options.defaultStaleTime??0,d=i.options.shouldReload,p=typeof d=="function"?d(ar(t,e,o,i)):d,m=!!l&&!t.router.state.matches.some(S=>S.id===e),R=t.router.getMatch(e);R._nonReactive.loaderPromise=X(),m!==R.preload&&t.updateMatch(e,S=>({...S,preload:m}));let{status:v,invalid:w}=R;if(n=v==="success"&&(w||(p??u>h)),!(l&&i.options.preload===!1))if(n&&!t.sync)s=!0,(async()=>{try{await rr(t,e,o,i);let S=t.router.getMatch(e);S._nonReactive.loaderPromise?.resolve(),S._nonReactive.loadPromise?.resolve(),S._nonReactive.loaderPromise=void 0}catch(S){V(S)&&await t.router.navigate(S.options)}})();else if(v!=="success"||n&&t.sync)await rr(t,e,o,i);else{let S=te(t,e,i);if(S){let L=await S;t.updateMatch(e,I=>({...I,...L}))}}}}let c=t.router.getMatch(e);s||(c._nonReactive.loaderPromise?.resolve(),c._nonReactive.loadPromise?.resolve()),clearTimeout(c._nonReactive.pendingTimeout),c._nonReactive.pendingTimeout=void 0,s||(c._nonReactive.loaderPromise=void 0),c._nonReactive.dehydrated=void 0;let a=s?c.isFetching:!1;return a!==c.isFetching||c.invalid!==!1?(t.updateMatch(e,f=>({...f,isFetching:a,invalid:!1})),t.router.getMatch(e)):c};async function Qe(t){let o=Object.assign(t,{matchPromises:[]});!o.router.isServer&&o.router.state.matches.some(e=>e._forcePending)&&xe(o);try{for(let n=0;n<o.matches.length;n++){let s=Un(o,n);st(s)&&await s}let e=o.firstBadMatchIndex??o.matches.length;for(let n=0;n<e;n++)o.matchPromises.push(Vn(o,n));await Promise.all(o.matchPromises);let r=xe(o);st(r)&&await r}catch(e){if($(e)&&!o.preload){let r=xe(o);throw st(r)&&await r,e}if(V(e))throw e}return o.matches}async function to(t){if(!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(o=>{let{id:e,...r}=o.options;Object.assign(t.options,r),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0),!t._componentsLoaded&&t._componentsPromise===void 0){let o=()=>{let e=[];for(let r of oo){let n=t.options[r]?.preload;n&&e.push(n())}if(e.length)return Promise.all(e).then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0});t._componentsLoaded=!0,t._componentsPromise=void 0};t._componentsPromise=t._lazyPromise?t._lazyPromise.then(o):o()}return t._componentsPromise}function we(t,o){return o?{status:"error",error:o}:{status:"success",value:t}}function eo(t){for(let o of oo)if(t.options[o]?.preload)return!0;return!1}var oo=["component","errorComponent","pendingComponent","notFoundComponent"];function ro(t){return{input:({url:o})=>{for(let e of t)o=no(e,o);return o},output:({url:o})=>{for(let e=t.length-1;e>=0;e--)o=so(t[e],o);return o}}}function cr(t){let o=ht(t.basepath),e=`/${o}`,r=`${e}/`,n=t.caseSensitive?e:e.toLowerCase(),s=t.caseSensitive?r:r.toLowerCase();return{input:({url:i})=>{let c=t.caseSensitive?i.pathname:i.pathname.toLowerCase();return c===n?i.pathname="/":c.startsWith(s)&&(i.pathname=i.pathname.slice(e.length)),i},output:({url:i})=>(i.pathname=j(["/",o,i.pathname]),i)}}function no(t,o){let e=t?.input?.({url:o});if(e){if(typeof e=="string")return new URL(e);if(e instanceof URL)return e}return o}function so(t,o){let e=t?.output?.({url:o});if(e){if(typeof e=="string")return new URL(e);if(e instanceof URL)return e}return o}function tt(t){let o=t.resolvedLocation,e=t.location,r=o?.pathname!==e.pathname,n=o?.href!==e.href,s=o?.hash!==e.hash;return{fromLocation:o,toLocation:e,pathChanged:r,hrefChanged:n,hashChanged:s}}var ee=class{constructor(o){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=e=>e(),this.update=e=>{e.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");let r=this.options,n=this.basepath??r?.basepath??"/",s=this.basepath===void 0,i=r?.rewrite;this.options={...r,...e},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(h=>[encodeURIComponent(h),h])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=Yt())),this.origin=this.options.origin,this.origin||(!this.isServer&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new qt(ao(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(h=>!["redirected"].includes(h.status))}}}),qe(this));let c=!1,a=this.options.basepath??"/",f=this.options.rewrite;if(s||n!==a||i!==f){this.basepath=a;let h=[];ht(a)!==""&&h.push(cr({basepath:a})),f&&h.push(f),this.rewrite=h.length===0?void 0:h.length===1?h[0]:ro(h),this.history&&this.updateLatestLocation(),c=!0}c&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let{routesById:e,routesByPath:r,flatRoutes:n}=Jo({routeTree:this.routeTree,initRoute:(i,c)=>{i.init({originalIndex:c})}});this.routesById=e,this.routesByPath=r,this.flatRoutes=n;let s=this.options.notFoundRoute;s&&(s.init({originalIndex:99999999999}),this.routesById[s.id]=s)},this.subscribe=(e,r)=>{let n={eventType:e,fn:r};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(r=>{r.eventType===e.type&&r.fn(e)})},this.parseLocation=(e,r)=>{let n=({href:a,state:f})=>{let u=new URL(a,this.origin),l=no(this.rewrite,u),h=this.options.parseSearch(l.search),d=this.options.stringifySearch(h);l.search=d;let p=l.href.replace(l.origin,""),{pathname:m,hash:R}=l;return{href:p,publicHref:a,url:l.href,pathname:m,searchStr:d,search:D(r?.search,h),hash:R.split("#").reverse()[0]??"",state:D(r?.state,f)}},s=n(e),{__tempLocation:i,__tempKey:c}=s.state;if(i&&(!c||c===this.tempLocationKey)){let a=n(i);return a.state.key=s.state.key,a.state.__TSR_key=s.state.__TSR_key,delete a.state.__tempLocation,{...a,maskedLocation:s}}return s},this.resolvePathWithBase=(e,r)=>ye({base:e,to:Ot(r),trailingSlash:this.options.trailingSlash,parseCache:this.parsePathnameCache}),this.matchRoutes=(e,r,n)=>typeof e=="string"?this.matchRoutesInternal({pathname:e,search:r},n):this.matchRoutesInternal(e,r),this.parsePathnameCache=or(1e3),this.getMatchedRoutes=(e,r)=>ur({pathname:e,routePathname:r,caseSensitive:this.options.caseSensitive,routesByPath:this.routesByPath,routesById:this.routesById,flatRoutes:this.flatRoutes,parseCache:this.parsePathnameCache}),this.cancelMatch=e=>{let r=this.getMatch(e);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.state.pendingMatches?.forEach(e=>{this.cancelMatch(e.id)})},this.buildLocation=e=>{let r=(s={})=>{let i=s._fromLocation||this.latestLocation,c=this.matchRoutes(i,{_buildLocation:!0}),a=It(c);s.from;let f=s.unsafeRelative==="path"?i.pathname:s.from??a.fullPath,u=this.resolvePathWithBase(f,"."),l=a.search,h={...a.params},d=s.to?this.resolvePathWithBase(u,`${s.to}`):this.resolvePathWithBase(u,"."),p=s.params===!1||s.params===null?{}:(s.params??!0)===!0?h:Object.assign(h,G(s.params,h)),m=wt({path:d,params:p,parseCache:this.parsePathnameCache}).interpolatedPath,R=this.matchRoutes(m,void 0,{_buildLocation:!0}).map(_=>this.looseRoutesById[_.routeId]);if(Object.keys(p).length>0)for(let _ of R){let k=_.options.params?.stringify??_.options.stringifyParams;k&&Object.assign(p,k(p))}let v=Jt(wt({path:d,params:p,leaveWildcards:!1,leaveParams:e.leaveParams,decodeCharMap:this.pathParamsDecodeCharMap,parseCache:this.parsePathnameCache}).interpolatedPath),w=l;if(e._includeValidateSearch&&this.options.search?.strict){let _={};R.forEach(k=>{if(k.options.validateSearch)try{Object.assign(_,io(k.options.validateSearch,{..._,...w}))}catch{}}),w=_}w=Wn({search:w,dest:s,destRoutes:R,_includeValidateSearch:e._includeValidateSearch}),w=D(l,w);let S=this.options.stringifySearch(w),L=s.hash===!0?i.hash:s.hash?G(s.hash,i.hash):void 0,I=L?`#${L}`:"",M=s.state===!0?i.state:s.state?G(s.state,i.state):{};M=D(i.state,M);let y=`${v}${S}${I}`,g=new URL(y,this.origin),P=so(this.rewrite,g);return{publicHref:P.pathname+P.search+P.hash,href:y,url:P.href,pathname:v,search:w,searchStr:S,state:M,hash:L??"",unmaskOnReload:s.unmaskOnReload}},n=(s={},i)=>{let c=r(s),a=i?r(i):void 0;if(!a){let f={},u=this.options.routeMasks?.find(l=>{let h=At(c.pathname,{to:l.from,caseSensitive:!1,fuzzy:!1},this.parsePathnameCache);return h?(f=h,!0):!1});if(u){let{from:l,...h}=u;i={from:e.from,...h,params:f},a=r(i)}}return a&&(c.maskedLocation=a),c};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=({viewTransition:e,ignoreBlocker:r,...n})=>{let s=()=>{let a=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];a.forEach(u=>{n.state[u]=this.latestLocation.state[u]});let f=J(n.state,this.latestLocation.state);return a.forEach(u=>{delete n.state[u]}),f},i=H(this.latestLocation.href)===H(n.href),c=this.commitLocationPromise;if(this.commitLocationPromise=X(()=>{c?.resolve()}),i&&s())this.load();else{let{maskedLocation:a,hashScrollIntoView:f,...u}=n;a&&(u={...a,state:{...a.state,__tempKey:void 0,__tempLocation:{...u,search:u.searchStr,state:{...u.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(u.unmaskOnReload??this.options.unmaskOnReload??!1)&&(u.state.__tempKey=this.tempLocationKey)),u.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,this.history[n.replace?"replace":"push"](u.publicHref,u.state,{ignoreBlocker:r})}return this.resetNextScroll=n.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:r,hashScrollIntoView:n,viewTransition:s,ignoreBlocker:i,href:c,...a}={})=>{if(c){let u=this.history.location.state.__TSR_index,l=St(c,{__TSR_index:e?u:u+1});a.to=l.pathname,a.search=this.options.parseSearch(l.search),a.hash=l.hash.slice(1)}let f=this.buildLocation({...a,_includeValidateSearch:!0});return this.commitLocation({...f,viewTransition:s,replace:e,resetScroll:r,hashScrollIntoView:n,ignoreBlocker:i})},this.navigate=({to:e,reloadDocument:r,href:n,...s})=>{if(!r&&n)try{new URL(`${n}`),r=!0}catch{}return r?(n||(n=this.buildLocation({to:e,...s}).url),s.replace?window.location.replace(n):window.location.href=n,Promise.resolve()):this.buildAndCommitLocation({...s,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){let r=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),n=s=>{try{return encodeURI(decodeURI(s))}catch{return s}};if(ht(n(this.latestLocation.href))!==ht(n(r.href))){let s=r.url;throw this.origin&&s.startsWith(this.origin)&&(s=s.replace(this.origin,"")||"/"),xt({href:s})}}let e=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:e,cachedMatches:r.cachedMatches.filter(n=>!e.some(s=>s.id===n.id))}))},this.load=async e=>{let r,n,s;for(s=new Promise(c=>{this.startTransition(async()=>{try{this.beforeLoad();let a=this.latestLocation,f=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...tt({resolvedLocation:f,location:a})}),this.emit({type:"onBeforeLoad",...tt({resolvedLocation:f,location:a})}),await Qe({router:this,sync:e?.sync,matches:this.state.pendingMatches,location:a,updateMatch:this.updateMatch,onReady:async()=>{this.startViewTransition(async()=>{let u,l,h;ut(()=>{this.__store.setState(d=>{let p=d.matches,m=d.pendingMatches||d.matches;return u=p.filter(R=>!m.some(v=>v.id===R.id)),l=m.filter(R=>!p.some(v=>v.id===R.id)),h=p.filter(R=>m.some(v=>v.id===R.id)),{...d,isLoading:!1,loadedAt:Date.now(),matches:m,pendingMatches:void 0,cachedMatches:[...d.cachedMatches,...u.filter(R=>R.status!=="error")]}}),this.clearExpiredCache()}),[[u,"onLeave"],[l,"onEnter"],[h,"onStay"]].forEach(([d,p])=>{d.forEach(m=>{this.looseRoutesById[m.routeId].options[p]?.(m)})})})}})}catch(a){V(a)?(r=a,this.isServer||this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):$(a)&&(n=a),this.__store.setState(f=>({...f,statusCode:r?r.status:n?404:f.matches.some(u=>u.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===s&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),c()})}),this.latestLoadPromise=s,await s;this.latestLoadPromise&&s!==this.latestLoadPromise;)await this.latestLoadPromise;let i;this.hasNotFoundMatch()?i=404:this.__store.state.matches.some(c=>c.status==="error")&&(i=500),i!==void 0&&this.__store.setState(c=>({...c,statusCode:i}))},this.startViewTransition=e=>{let r=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let n;if(typeof r=="object"&&this.isViewTransitionTypesSupported){let s=this.latestLocation,i=this.state.resolvedLocation,c=typeof r.types=="function"?r.types(tt({resolvedLocation:i,location:s})):r.types;if(c===!1){e();return}n={update:e,types:c}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,r)=>{let n=this.state.pendingMatches?.some(s=>s.id===e)?"pendingMatches":this.state.matches.some(s=>s.id===e)?"matches":this.state.cachedMatches.some(s=>s.id===e)?"cachedMatches":"";n&&this.__store.setState(s=>({...s,[n]:s[n]?.map(i=>i.id===e?r(i):i)}))},this.getMatch=e=>{let r=n=>n.id===e;return this.state.cachedMatches.find(r)??this.state.pendingMatches?.find(r)??this.state.matches.find(r)},this.invalidate=e=>{let r=n=>e?.filter?.(n)??!0?{...n,invalid:!0,...e?.forcePending||n.status==="error"?{status:"pending",error:void 0}:void 0}:n;return this.__store.setState(n=>({...n,matches:n.matches.map(r),cachedMatches:n.cachedMatches.map(r),pendingMatches:n.pendingMatches?.map(r)})),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{if(!e.options.href){let r=this.buildLocation(e.options),n=r.url;this.origin&&n.startsWith(this.origin)&&(n=n.replace(this.origin,"")||"/"),e.options.href=r.href,e.headers.set("Location",n)}return e.headers.get("Location")||e.headers.set("Location",e.options.href),e},this.clearCache=e=>{let r=e?.filter;r!==void 0?this.__store.setState(n=>({...n,cachedMatches:n.cachedMatches.filter(s=>!r(s))})):this.__store.setState(n=>({...n,cachedMatches:[]}))},this.clearExpiredCache=()=>{let e=r=>{let n=this.looseRoutesById[r.routeId];if(!n.options.loader)return!0;let s=(r.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=s};this.clearCache({filter:e})},this.loadRouteChunk=to,this.preloadRoute=async e=>{let r=this.buildLocation(e),n=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:e}),s=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(c=>c.id)),i=new Set([...s,...this.state.cachedMatches.map(c=>c.id)]);ut(()=>{n.forEach(c=>{i.has(c.id)||this.__store.setState(a=>({...a,cachedMatches:[...a.cachedMatches,c]}))})});try{return n=await Qe({router:this,matches:n,location:r,preload:!0,updateMatch:(c,a)=>{s.has(c)?n=n.map(f=>f.id===c?a(f):f):this.updateMatch(c,a)}}),n}catch(c){if(V(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:r});$(c)||console.error(c);return}},this.matchRoute=(e,r)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||"",e.to):void 0,params:e.params||{},leaveParams:!0},s=this.buildLocation(n);if(r?.pending&&this.state.status!=="pending")return!1;let c=(r?.pending===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,a=At(c.pathname,{...r,to:s.pathname},this.parsePathnameCache);return!a||e.params&&!J(a,e.params,{partial:!0})?!1:a&&(r?.includeSearch??!0)?J(c.search,s.search,{partial:!0})?a:!1:a},this.hasNotFoundMatch=()=>this.__store.state.matches.some(e=>e.status==="notFound"||e.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...o,caseSensitive:o.caseSensitive??!1,notFoundMode:o.notFoundMode??"fuzzy",stringifySearch:o.stringifySearch??Ze,parseSearch:o.parseSearch??Xe}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(o,e){let{foundRoute:r,matchedRoutes:n,routeParams:s}=this.getMatchedRoutes(o.pathname,e?.dest?.to),i=!1;(r?r.path!=="/"&&s["**"]:H(o.pathname))&&(this.options.notFoundRoute?n.push(this.options.notFoundRoute):i=!0);let c=(()=>{if(i){if(this.options.notFoundMode!=="root")for(let u=n.length-1;u>=0;u--){let l=n[u];if(l.children)return l.id}return O}})(),a=[],f=u=>u?.id?u.context??this.options.context??void 0:this.options.context??void 0;return n.forEach((u,l)=>{let h=a[l-1],[d,p,m]=(()=>{let F=h?.search??o.search,rt=h?._strictSearch??void 0;try{let q=io(u.options.validateSearch,{...F})??void 0;return[{...F,...q},{...rt,...q},void 0]}catch(q){let vt=q;if(q instanceof pt||(vt=new pt(q.message,{cause:q})),e?.throwOnError)throw vt;return[F,{},vt]}})(),R=u.options.loaderDeps?.({search:d})??"",v=R?JSON.stringify(R):"",{interpolatedPath:w,usedParams:S}=wt({path:u.fullPath,params:s,decodeCharMap:this.pathParamsDecodeCharMap}),L=wt({path:u.id,params:s,leaveWildcards:!0,decodeCharMap:this.pathParamsDecodeCharMap,parseCache:this.parsePathnameCache}).interpolatedPath+v,I=this.getMatch(L),M=this.state.matches.find(F=>F.routeId===u.id),y=I?._strictParams??S,g;if(!I){let F=u.options.params?.parse??u.options.parseParams;if(F)try{Object.assign(y,F(y))}catch(rt){if(g=new oe(rt.message,{cause:rt}),e?.throwOnError)throw g}}Object.assign(s,y);let P=M?"stay":"enter",_;if(I)_={...I,cause:P,params:M?D(M.params,s):s,_strictParams:y,search:M?D(M.search,d):D(I.search,d),_strictSearch:p};else{let F=u.options.loader||u.options.beforeLoad||u.lazyFn||eo(u)?"pending":"success";_={id:L,index:l,routeId:u.id,params:M?D(M.params,s):s,_strictParams:y,pathname:w,updatedAt:Date.now(),search:M?D(M.search,d):d,_strictSearch:p,searchError:void 0,status:F,isFetching:!1,error:void 0,paramsError:g,__routeContext:void 0,_nonReactive:{loadPromise:X()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:P,loaderDeps:M?D(M.loaderDeps,R):R,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:u.options.staticData||{},fullPath:u.fullPath}}e?.preload||(_.globalNotFound=c===u.id),_.searchError=m;let k=f(h);_.context={...k,..._.__routeContext,..._.__beforeLoadContext},a.push(_)}),a.forEach((u,l)=>{let h=this.looseRoutesById[u.routeId];if(!this.getMatch(u.id)&&e?._buildLocation!==!0){let p=a[l-1],m=f(p);if(h.options.context){let R={deps:u.loaderDeps,params:u.params,context:m??{},location:o,navigate:v=>this.navigate({...v,_fromLocation:o}),buildLocation:this.buildLocation,cause:u.cause,abortController:u.abortController,preload:!!u.preload,matches:a};u.__routeContext=h.options.context(R)??void 0}u.context={...m,...u.__routeContext,...u.__beforeLoadContext}}}),a}},pt=class extends Error{},oe=class extends Error{};function ao(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function io(t,o){if(t==null)return{};if("~standard"in t){let e=t["~standard"].validate(o);if(e instanceof Promise)throw new pt("Async validation not supported");if(e.issues)throw new pt(JSON.stringify(e.issues,void 0,2),{cause:e});return e.value}return"parse"in t?t.parse(o):typeof t=="function"?t(o):{}}function ur({pathname:t,routePathname:o,caseSensitive:e,routesByPath:r,routesById:n,flatRoutes:s,parseCache:i}){let c={},a=H(t),f=d=>At(a,{to:d.fullPath,caseSensitive:d.options?.caseSensitive??e,fuzzy:!0},i),u=o!==void 0?r[o]:void 0;if(u)c=f(u);else{let d;for(let p of s){let m=f(p);if(m)if(p.path!=="/"&&m["**"])d||(d={foundRoute:p,routeParams:m});else{u=p,c=m;break}}!u&&d&&(u=d.foundRoute,c=d.routeParams)}let l=u||n[O],h=[l];for(;l.parentRoute;)l=l.parentRoute,h.push(l);return h.reverse(),{matchedRoutes:h,routeParams:c,foundRoute:u}}function Wn({search:t,dest:o,destRoutes:e,_includeValidateSearch:r}){let n=e.reduce((c,a)=>{let f=[];if("search"in a.options)a.options.search?.middlewares&&f.push(...a.options.search.middlewares);else if(a.options.preSearchFilters||a.options.postSearchFilters){let u=({search:l,next:h})=>{let d=l;"preSearchFilters"in a.options&&a.options.preSearchFilters&&(d=a.options.preSearchFilters.reduce((m,R)=>R(m),l));let p=h(d);return"postSearchFilters"in a.options&&a.options.postSearchFilters?a.options.postSearchFilters.reduce((m,R)=>R(m),p):p};f.push(u)}if(r&&a.options.validateSearch){let u=({search:l,next:h})=>{let d=h(l);try{return{...d,...io(a.options.validateSearch,d)??void 0}}catch{return d}};f.push(u)}return c.concat(f)},[])??[],s=({search:c})=>o.search?o.search===!0?c:G(o.search,c):{};n.push(s);let i=(c,a)=>{if(c>=n.length)return a;let f=n[c];return f({search:a,next:l=>i(c+1,l)})};return i(0,t)}var co="Error preloading route! \u261D\uFE0F";var $t=class{constructor(o){if(this.init=e=>{this.originalIndex=e.originalIndex;let r=this.options,n=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=O:this.parentRoute||z(!1,"Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.");let s=n?O:r?.path;s&&s!=="/"&&(s=_t(s));let i=r?.id||s,c=n?O:j([this.parentRoute.id===O?"":this.parentRoute.id,i]);s===O&&(s="/"),c!==O&&(c=j(["/",c]));let a=c===O?"/":j([this.parentRoute.fullPath,s]);this._path=s,this._id=c,this._fullPath=a,this._to=a},this.clone=e=>{this._path=e._path,this._id=e._id,this._fullPath=e._fullPath,this._to=e._to,this.options.getParentRoute=e.options.getParentRoute,this.children=e.children},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.options=o||{},this.isRoot=!o?.getParentRoute,o?.id&&o?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}};var re=class extends $t{constructor(o){super(o)}};var Q=x(K(),1),Bt=x(B(),1);function Dt(t){let o=t.errorComponent??Ut;return(0,Q.jsx)(uo,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:e,reset:r})=>e?Bt.createElement(o,{error:e,reset:r}):t.children})}var uo=class extends Bt.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(o){return{resetKey:o.getResetKey()}}static getDerivedStateFromError(o){return{error:o}}reset(){this.setState({error:null})}componentDidUpdate(o,e){e.error&&e.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(o,e){this.props.onCatch&&this.props.onCatch(o,e)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}};function Ut({error:t}){let[o,e]=Bt.useState(!1);return(0,Q.jsxs)("div",{style:{padding:".5rem",maxWidth:"100%"},children:[(0,Q.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[(0,Q.jsx)("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),(0,Q.jsx)("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>e(r=>!r),children:o?"Hide Error":"Show Error"})]}),(0,Q.jsx)("div",{style:{height:".25rem"}}),o?(0,Q.jsx)("div",{children:(0,Q.jsx)("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?(0,Q.jsx)("code",{children:t.message}):null})}):null]})}var lo=x(K(),1),Le=x(B(),1);function hr({children:t,fallback:o=null}){return Kn()?(0,lo.jsx)(Le.default.Fragment,{children:t}):(0,lo.jsx)(Le.default.Fragment,{children:o})}function Kn(){return Le.default.useSyncExternalStore(Gn,()=>!0,()=>!1)}function Gn(){return()=>{}}var qn=!0;function Yn(t,o){if(!qn){if(t)return;var e="Warning: "+o;typeof console<"u"&&console.warn(e);try{throw Error(e)}catch{}}}var at=Yn;var vo=x(K(),1);var yo=x(B(),1);var Er=x(B(),1);var _r=x(Sr(),1);function wr(t,o=r=>r,e={}){let r=e.equal??ds;return(0,_r.useSyncExternalStoreWithSelector)(t.subscribe,()=>t.state,()=>t.state,o,r)}function ds(t,o){if(Object.is(t,o))return!0;if(typeof t!="object"||t===null||typeof o!="object"||o===null)return!1;if(t instanceof Map&&o instanceof Map){if(t.size!==o.size)return!1;for(let[r,n]of t)if(!o.has(r)||!Object.is(n,o.get(r)))return!1;return!0}if(t instanceof Set&&o instanceof Set){if(t.size!==o.size)return!1;for(let r of t)if(!o.has(r))return!1;return!0}if(t instanceof Date&&o instanceof Date)return t.getTime()===o.getTime();let e=Pr(t);if(e.length!==Pr(o).length)return!1;for(let r=0;r<e.length;r++)if(!Object.prototype.hasOwnProperty.call(o,e[r])||!Object.is(t[e[r]],o[e[r]]))return!1;return!0}function Pr(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}var Lr=x(B(),1);var Cr=x(B(),1);var xr=x(B(),1),ho=xr.createContext(null);function Ee(){return typeof document>"u"?ho:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=ho,ho)}function E(t){let o=Cr.useContext(Ee());return at(!((t?.warn??!0)&&!o),"useRouter must be used inside a <RouterProvider> component!"),o}function C(t){let o=E({warn:t?.router===void 0}),e=t?.router||o,r=(0,Lr.useRef)(void 0);return wr(e.__store,n=>{if(t?.select){if(t.structuralSharing??e.options.defaultStructuralSharing){let s=D(r.current,t.select(n));return r.current=s,s}return t.select(n)}return n})}var po=x(B(),1),Ct=po.createContext(void 0),Mr=po.createContext(void 0);function U(t){let o=Er.useContext(t.from?Mr:Ct);return C({select:r=>{let n=r.matches.find(s=>t.from?t.from===s.routeId:s.id===o);if(z(!((t.shouldThrow??!0)&&!n),`Could not find ${t.from?`an active match from "${t.from}"`:"a nearest match!"}`),n!==void 0)return t.select?t.select(n):n},structuralSharing:t.structuralSharing})}function mt(t){return U({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:o=>t.select?t.select(o.loaderData):o.loaderData})}function ne(t){let{select:o,...e}=t;return U({...e,select:r=>o?o(r.loaderDeps):r.loaderDeps})}function Lt(t){return U({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:o=>{let e=t.strict===!1?o.params:o._strictParams;return t.select?t.select(e):e}})}function Mt(t){return U({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:o=>t.select?t.select(o.search):o.search})}var be=x(B(),1);function Et(t){let o=E();return be.useCallback(e=>o.navigate({...e,from:e.from??t?.from}),[t?.from,o])}var Fr=x(K(),1),A=x(B(),1),Or=x(Tr(),1);var et=x(B(),1);var se=typeof window<"u"?et.useLayoutEffect:et.useEffect;function Te(t){let o=et.useRef({value:t,prev:null}),e=o.current.value;return t!==e&&(o.current={value:t,prev:e}),o.current.prev}function Ir(t,o,e={},r={}){et.useEffect(()=>{if(!t.current||r.disabled||typeof IntersectionObserver!="function")return;let n=new IntersectionObserver(([s])=>{o(s)},e);return n.observe(t.current),()=>{n.disconnect()}},[o,e,r.disabled,t])}function kr(t){let o=et.useRef(null);return et.useImperativeHandle(t,()=>o.current,[]),o}function go(t,o){let e=E(),[r,n]=A.useState(!1),s=A.useRef(!1),i=kr(o),{activeProps:c,inactiveProps:a,activeOptions:f,to:u,preload:l,preloadDelay:h,hashScrollIntoView:d,replace:p,startTransition:m,resetScroll:R,viewTransition:v,children:w,target:S,disabled:L,style:I,className:M,onClick:y,onFocus:g,onMouseEnter:P,onMouseLeave:_,onTouchStart:k,ignoreBlocker:F,params:rt,search:q,hash:vt,state:To,mask:Yr,reloadDocument:_s,unsafeRelative:ws,from:xs,_fromLocation:Cs,...Io}=t,Jr=C({select:b=>b.location.search,structuralSharing:!0}),ko=t.from,jt=A.useMemo(()=>({...t,from:ko}),[e,Jr,ko,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),nt=A.useMemo(()=>e.buildLocation({...jt}),[e,jt]),fe=A.useMemo(()=>{if(L)return;let b=nt.maskedLocation?nt.maskedLocation.url:nt.url,N=!1;return e.origin&&(b.startsWith(e.origin)?b=e.history.createHref(b.replace(e.origin,""))||"/":N=!0),{href:b,external:N}},[L,nt.maskedLocation,nt.url,e.origin,e.history]),he=A.useMemo(()=>{if(fe?.external)return fe.href;try{return new URL(u),u}catch{}},[u,fe]),bt=t.reloadDocument||he?!1:l??e.options.defaultPreload,Ve=h??e.options.defaultPreloadDelay??0,We=C({select:b=>{if(he)return!1;if(f?.exact){if(!Ke(b.location.pathname,nt.pathname,e.basepath))return!1}else{let N=Ft(b.location.pathname,e.basepath),Y=Ft(nt.pathname,e.basepath);if(!(N.startsWith(Y)&&(N.length===Y.length||N[Y.length]==="/")))return!1}return(f?.includeSearch??!0)&&!J(b.location.search,nt.search,{partial:!f?.exact,ignoreUndefined:!f?.explicitUndefined})?!1:f?.includeHash?b.location.hash===nt.hash:!0}}),yt=A.useCallback(()=>{e.preloadRoute({...jt}).catch(b=>{console.warn(b),console.warn(co)})},[e,jt]),Xr=A.useCallback(b=>{b?.isIntersecting&&yt()},[yt]);Ir(i,Xr,vs,{disabled:!!L||bt!=="viewport"}),A.useEffect(()=>{s.current||!L&&bt==="render"&&(yt(),s.current=!0)},[L,yt,bt]);let Zr=b=>{let N=b.currentTarget.getAttribute("target"),Y=S!==void 0?S:N;if(!L&&!ys(b)&&!b.defaultPrevented&&(!Y||Y==="_self")&&b.button===0){b.preventDefault(),(0,Or.flushSync)(()=>{n(!0)});let No=e.subscribe("onResolved",()=>{No(),n(!1)});e.navigate({...jt,replace:p,resetScroll:R,hashScrollIntoView:d,startTransition:m,viewTransition:v,ignoreBlocker:F})}};if(he)return{...Io,ref:i,href:he,...w&&{children:w},...S&&{target:S},...L&&{disabled:L},...I&&{style:I},...M&&{className:M},...y&&{onClick:y},...g&&{onFocus:g},...P&&{onMouseEnter:P},..._&&{onMouseLeave:_},...k&&{onTouchStart:k}};let Fo=b=>{L||bt&&yt()},Qr=Fo,tn=b=>{if(!(L||!bt))if(!Ve)yt();else{let N=b.target;if(ie.has(N))return;let Y=setTimeout(()=>{ie.delete(N),yt()},Ve);ie.set(N,Y)}},en=b=>{if(L||!bt||!Ve)return;let N=b.target,Y=ie.get(N);Y&&(clearTimeout(Y),ie.delete(N))},de=We?G(c,{})??ps:mo,pe=We?mo:G(a,{})??mo,Oo=[M,de.className,pe.className].filter(Boolean).join(" "),Ao=(I||de.style||pe.style)&&{...I,...de.style,...pe.style};return{...Io,...de,...pe,href:fe?.href,ref:i,onClick:ae([y,Zr]),onFocus:ae([g,Fo]),onMouseEnter:ae([P,tn]),onMouseLeave:ae([_,en]),onTouchStart:ae([k,Qr]),disabled:!!L,target:S,...Ao&&{style:Ao},...Oo&&{className:Oo},...L&&ms,...We&&gs,...r&&Rs}}var mo={},ps={className:"active"},ms={role:"link","aria-disabled":!0},gs={"data-status":"active","aria-current":"page"},Rs={"data-transitioning":"transitioning"},ie=new WeakMap,vs={rootMargin:"100px"},ae=t=>o=>{for(let e of t)if(e){if(o.defaultPrevented)return;e(o)}};function Ro(t){return A.forwardRef(function(e,r){return(0,Fr.jsx)(Wt,{...e,_asChild:t,ref:r})})}var Wt=A.forwardRef((t,o)=>{let{_asChild:e,...r}=t,{type:n,ref:s,...i}=go(r,o),c=typeof r.children=="function"?r.children({isActive:i["data-status"]==="active"}):r.children;return e===void 0&&delete i.disabled,A.createElement(e||"a",{...i,ref:s},c)});function ys(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var Ie=class extends $t{constructor(o){super(o),this.useMatch=e=>U({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>U({...e,from:this.id,select:r=>e?.select?e.select(r.context):r.context}),this.useSearch=e=>Mt({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Lt({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ne({...e,from:this.id}),this.useLoaderData=e=>mt({...e,from:this.id}),this.useNavigate=()=>Et({from:this.fullPath}),this.Link=yo.default.forwardRef((e,r)=>(0,vo.jsx)(Wt,{ref:r,from:this.fullPath,...e})),this.$$typeof=Symbol.for("react.memo")}};function ce(t){return new Ie(t)}var ke=class extends re{constructor(o){super(o),this.useMatch=e=>U({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>U({...e,from:this.id,select:r=>e?.select?e.select(r.context):r.context}),this.useSearch=e=>Mt({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Lt({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ne({...e,from:this.id}),this.useLoaderData=e=>mt({...e,from:this.id}),this.useNavigate=()=>Et({from:this.fullPath}),this.Link=yo.default.forwardRef((e,r)=>(0,vo.jsx)(Wt,{ref:r,from:this.fullPath,...e})),this.$$typeof=Symbol.for("react.memo")}};function So(t){return new ke(t)}function Fe(t){return typeof t=="object"?new ue(t,{silent:!0}).createRoute(t):new ue(t,{silent:!0}).createRoute}var ue=class{constructor(o,e){this.path=o,this.createRoute=r=>{at(this.silent,"FileRoute is deprecated and will be removed in the next major version. Use the createFileRoute(path)(options) function instead.");let n=ce(r);return n.isRoot=!1,n},this.silent=e?.silent}};var zt=class{constructor(o){this.useMatch=e=>U({select:e?.select,from:this.options.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>U({from:this.options.id,select:r=>e?.select?e.select(r.context):r.context}),this.useSearch=e=>Mt({select:e?.select,structuralSharing:e?.structuralSharing,from:this.options.id}),this.useParams=e=>Lt({select:e?.select,structuralSharing:e?.structuralSharing,from:this.options.id}),this.useLoaderDeps=e=>ne({...e,from:this.options.id}),this.useLoaderData=e=>mt({...e,from:this.options.id}),this.useNavigate=()=>{let e=E();return Et({from:e.routesById[this.options.id].fullPath})},this.options=o,this.$$typeof=Symbol.for("react.memo")}};function Po(t){return o=>new zt({id:t,...o})}function Oe(t){return typeof t=="object"?new zt(t):o=>new zt({id:t,...o})}var ot=x(K(),1),De=x(B(),1);var gt=x(B(),1);function Ar(){let t=E(),o=gt.useRef({router:t,mounted:!1}),[e,r]=gt.useState(!1),{hasPendingMatches:n,isLoading:s}=C({select:l=>({isLoading:l.isLoading,hasPendingMatches:l.matches.some(h=>h.status==="pending")}),structuralSharing:!0}),i=Te(s),c=s||e||n,a=Te(c),f=s||n,u=Te(f);return t.startTransition=l=>{r(!0),gt.startTransition(()=>{l(),r(!1)})},gt.useEffect(()=>{let l=t.history.subscribe(t.load),h=t.buildLocation({to:t.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return H(t.latestLocation.href)!==H(h.href)&&t.commitLocation({...h,replace:!0}),()=>{l()}},[t,t.history]),se(()=>{if(typeof window<"u"&&t.ssr||o.current.router===t&&o.current.mounted)return;o.current={router:t,mounted:!0},(async()=>{try{await t.load()}catch(h){console.error(h)}})()},[t]),se(()=>{i&&!s&&t.emit({type:"onLoad",...tt(t.state)})},[i,t,s]),se(()=>{u&&!f&&t.emit({type:"onBeforeRouteMount",...tt(t.state)})},[f,u,t]),se(()=>{a&&!c&&(t.emit({type:"onResolved",...tt(t.state)}),t.__store.setState(l=>({...l,status:"idle",resolvedLocation:l.location})),Ye(t))},[c,a,t]),null}var T=x(K(),1),W=x(B(),1);var _o=x(K(),1);function Nr(t){let o=C({select:e=>`not-found-${e.location.pathname}-${e.status}`});return(0,_o.jsx)(Dt,{getResetKey:()=>o,onCatch:(e,r)=>{if($(e))t.onCatch?.(e,r);else throw e},errorComponent:({error:e})=>{if($(e))return t.fallback?.(e);throw e},children:t.children})}function $r(){return(0,_o.jsx)("p",{children:"Not Found"})}var Ae=x(K(),1);function Rt(t){return(0,Ae.jsx)(Ae.Fragment,{children:t.children})}var Ne=x(K(),1);function wo(t,o,e){return o.options.notFoundComponent?(0,Ne.jsx)(o.options.notFoundComponent,{data:e}):t.options.defaultNotFoundComponent?(0,Ne.jsx)(t.options.defaultNotFoundComponent,{data:e}):(0,Ne.jsx)($r,{})}var Ur=x(K(),1);var Br=x(K(),1);function Dr({children:t}){let o=E();return o.isServer?(0,Br.jsx)("script",{nonce:o.options.ssr?.nonce,className:"$tsr",dangerouslySetInnerHTML:{__html:[t].filter(Boolean).join(`
`)+";$_TSR.c()"}}):null}function Vr(){let t=E();if(!t.isScrollRestoring||!t.isServer||typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return null;let e=(t.options.getScrollRestorationKey||Zt)(t.latestLocation),r=e!==Zt(t.latestLocation)?e:void 0,n={storageKey:Nt,shouldScrollRestoration:!0};return r&&(n.key=r),(0,Ur.jsx)(Dr,{children:`(${_e.toString()})(${JSON.stringify(n)})`})}var $e=W.memo(function({matchId:o}){let e=E(),r=C({select:v=>{let w=v.matches.find(S=>S.id===o);return z(w,`Could not find match for matchId "${o}". Please file an issue!`),{routeId:w.routeId,ssr:w.ssr,_displayPending:w._displayPending}},structuralSharing:!0}),n=e.routesById[r.routeId],s=n.options.pendingComponent??e.options.defaultPendingComponent,i=s?(0,T.jsx)(s,{}):null,c=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,f=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,u=r.ssr===!1||r.ssr==="data-only",l=(!n.isRoot||n.options.wrapInSuspense||u)&&(n.options.wrapInSuspense??s??(n.options.errorComponent?.preload||u))?W.Suspense:Rt,h=c?Dt:Rt,d=f?Nr:Rt,p=C({select:v=>v.loadedAt}),m=C({select:v=>{let w=v.matches.findIndex(S=>S.id===o);return v.matches[w-1]?.routeId}}),R=n.isRoot?n.options.shellComponent??Rt:Rt;return(0,T.jsxs)(R,{children:[(0,T.jsx)(Ct.Provider,{value:o,children:(0,T.jsx)(l,{fallback:i,children:(0,T.jsx)(h,{getResetKey:()=>p,errorComponent:c||Ut,onCatch:(v,w)=>{if($(v))throw v;at(!1,`Error in route match: ${o}`),a?.(v,w)},children:(0,T.jsx)(d,{fallback:v=>{if(!f||v.routeId&&v.routeId!==r.routeId||!v.routeId&&!n.isRoot)throw v;return W.createElement(f,v)},children:u||r._displayPending?(0,T.jsx)(hr,{fallback:i,children:(0,T.jsx)(Wr,{matchId:o})}):(0,T.jsx)(Wr,{matchId:o})})})})}),m===O&&e.options.scrollRestoration?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(Ss,{}),(0,T.jsx)(Vr,{})]}):null]})});function Ss(){let t=E(),o=W.useRef(void 0);return(0,T.jsx)("script",{suppressHydrationWarning:!0,ref:e=>{e&&(o.current===void 0||o.current.href!==t.latestLocation.href)&&(t.emit({type:"onRendered",...tt(t.state)}),o.current=t.latestLocation)}},t.latestLocation.state.__TSR_key)}var Wr=W.memo(function({matchId:o}){let e=E(),{match:r,key:n,routeId:s}=C({select:a=>{let f=a.matches.find(p=>p.id===o),u=f.routeId,h=(e.routesById[u].options.remountDeps??e.options.defaultRemountDeps)?.({routeId:u,loaderDeps:f.loaderDeps,params:f._strictParams,search:f._strictSearch});return{key:h?JSON.stringify(h):void 0,routeId:u,match:{id:f.id,status:f.status,error:f.error,_forcePending:f._forcePending,_displayPending:f._displayPending}}},structuralSharing:!0}),i=e.routesById[s],c=W.useMemo(()=>{let a=i.options.component??e.options.defaultComponent;return a?(0,T.jsx)(a,{},n):(0,T.jsx)(Be,{})},[n,i.options.component,e.options.defaultComponent]);if(r._displayPending)throw e.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw e.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status==="pending"){let a=i.options.pendingMinMs??e.options.defaultPendingMinMs;if(a){let f=e.getMatch(r.id);if(f&&!f._nonReactive.minPendingPromise&&!e.isServer){let u=X();f._nonReactive.minPendingPromise=u,setTimeout(()=>{u.resolve(),f._nonReactive.minPendingPromise=void 0},a)}}throw e.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return z($(r.error),"Expected a notFound error"),wo(e,i,r.error);if(r.status==="redirected")throw z(V(r.error),"Expected a redirect error"),e.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error"){if(e.isServer){let a=(i.options.errorComponent??e.options.defaultErrorComponent)||Ut;return(0,T.jsx)(a,{error:r.error,reset:void 0,info:{componentStack:""}})}throw r.error}return c}),Be=W.memo(function(){let o=E(),e=W.useContext(Ct),r=C({select:f=>f.matches.find(u=>u.id===e)?.routeId}),n=o.routesById[r],s=C({select:f=>{let l=f.matches.find(h=>h.id===e);return z(l,`Could not find parent match for matchId "${e}"`),l.globalNotFound}}),i=C({select:f=>{let u=f.matches,l=u.findIndex(h=>h.id===e);return u[l+1]?.id}}),c=o.options.defaultPendingComponent?(0,T.jsx)(o.options.defaultPendingComponent,{}):null;if(s)return wo(o,n,void 0);if(!i)return null;let a=(0,T.jsx)($e,{matchId:i});return e===O?(0,T.jsx)(W.Suspense,{fallback:c,children:a}):a});function xo(){let t=E(),e=t.routesById[O].options.pendingComponent??t.options.defaultPendingComponent,r=e?(0,ot.jsx)(e,{}):null,n=t.isServer||typeof document<"u"&&t.ssr?Rt:De.Suspense,s=(0,ot.jsxs)(n,{fallback:r,children:[!t.isServer&&(0,ot.jsx)(Ar,{}),(0,ot.jsx)(Ps,{})]});return t.options.InnerWrap?(0,ot.jsx)(t.options.InnerWrap,{children:s}):s}function Ps(){let t=E(),o=C({select:n=>n.matches[0]?.id}),e=C({select:n=>n.loadedAt}),r=o?(0,ot.jsx)($e,{matchId:o}):null;return(0,ot.jsx)(Ct.Provider,{value:o,children:t.options.disableGlobalCatchBoundary?r:(0,ot.jsx)(Dt,{getResetKey:()=>e,errorComponent:Ut,onCatch:n=>{at(!1,"The following error wasn't caught by any route! At the very least, consider setting an 'errorComponent' in your RootRoute!"),at(!1,n.message||n.toString())},children:r})})}function Co(t){return C({select:o=>{let e=o.matches;return t?.select?t.select(e):e},structuralSharing:t?.structuralSharing})}var Lo=t=>new Ue(t),Ue=class extends ee{constructor(o){super(o)}};typeof globalThis<"u"?(globalThis.createFileRoute=Fe,globalThis.createLazyFileRoute=Oe):typeof window<"u"&&(window.createFileRoute=Fe,window.createLazyFileRoute=Oe);var le=x(K(),1);function zr({router:t,children:o,...e}){Object.keys(e).length>0&&t.update({...t.options,...e,context:{...t.options.context,...e.context}});let r=Ee(),n=(0,le.jsx)(r.Provider,{value:t,children:o});return t.options.Wrap?(0,le.jsx)(t.options.Wrap,{children:n}):n}function Mo({router:t,...o}){return(0,le.jsx)(zr,{router:t,...o,children:(0,le.jsx)(xo,{})})}function Eo(t){return C({select:o=>t?.select?t.select(o.location):o.location})}function bo(){return C({select:t=>t.location.state.__TSR_index!==0})}var Kr=x(Hr(),1),{lock:Gr,unlock:Iu}=(0,Kr.__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/route");var qr={};Gr(qr,{createBrowserHistory:Yt,createLazyRoute:Po,createRouter:Lo,createRootRoute:So,createRoute:ce,Outlet:Be,RouterProvider:Mo,redirect:xt,createLink:Ro,useCanGoBack:bo,useLoaderData:mt,useLocation:Eo,useMatches:Co,useRouter:E,useRouterState:C,parseHref:St});function Uu(){let t=E();return()=>t.invalidate()}export{Wt as Link,Se as notFound,qr as privateApis,xt as redirect,Uu as useInvalidate,go as useLinkProps,Et as useNavigate,Lt as useParams,Mt as useSearch};
/*! Bundled license information:

use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
  (**
   * @license React
   * use-sync-external-store-shim.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:
  (**
   * @license React
   * use-sync-external-store-shim/with-selector.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)
*/
                                                                                                                                                                                                                                                                              dist/script-modules/route/index.js                                                                  0000644                 00000542626 15212564032 0013303 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));

// vendor-external:react/jsx-runtime
var require_jsx_runtime = __commonJS({
  "vendor-external:react/jsx-runtime"(exports, module) {
    module.exports = window.ReactJSXRuntime;
  }
});

// vendor-external:react
var require_react = __commonJS({
  "vendor-external:react"(exports, module) {
    module.exports = window.React;
  }
});

// node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
var require_use_sync_external_store_shim_development = __commonJS({
  "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports) {
    "use strict";
    (function() {
      function is(x, y) {
        return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
      }
      function useSyncExternalStore$2(subscribe2, getSnapshot) {
        didWarnOld18Alpha || void 0 === React12.startTransition || (didWarnOld18Alpha = true, console.error(
          "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
        ));
        var value = getSnapshot();
        if (!didWarnUncachedGetSnapshot) {
          var cachedValue = getSnapshot();
          objectIs(value, cachedValue) || (console.error(
            "The result of getSnapshot should be cached to avoid an infinite loop"
          ), didWarnUncachedGetSnapshot = true);
        }
        cachedValue = useState4({
          inst: { value, getSnapshot }
        });
        var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
        useLayoutEffect3(
          function() {
            inst.value = value;
            inst.getSnapshot = getSnapshot;
            checkIfSnapshotChanged(inst) && forceUpdate({ inst });
          },
          [subscribe2, value, getSnapshot]
        );
        useEffect5(
          function() {
            checkIfSnapshotChanged(inst) && forceUpdate({ inst });
            return subscribe2(function() {
              checkIfSnapshotChanged(inst) && forceUpdate({ inst });
            });
          },
          [subscribe2]
        );
        useDebugValue(value);
        return value;
      }
      function checkIfSnapshotChanged(inst) {
        var latestGetSnapshot = inst.getSnapshot;
        inst = inst.value;
        try {
          var nextValue = latestGetSnapshot();
          return !objectIs(inst, nextValue);
        } catch (error) {
          return true;
        }
      }
      function useSyncExternalStore$1(subscribe2, getSnapshot) {
        return getSnapshot();
      }
      "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
      var React12 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState4 = React12.useState, useEffect5 = React12.useEffect, useLayoutEffect3 = React12.useLayoutEffect, useDebugValue = React12.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
      exports.useSyncExternalStore = void 0 !== React12.useSyncExternalStore ? React12.useSyncExternalStore : shim;
      "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
    })();
  }
});

// node_modules/use-sync-external-store/shim/index.js
var require_shim = __commonJS({
  "node_modules/use-sync-external-store/shim/index.js"(exports, module) {
    "use strict";
    if (false) {
      module.exports = null;
    } else {
      module.exports = require_use_sync_external_store_shim_development();
    }
  }
});

// node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
var require_with_selector_development = __commonJS({
  "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"(exports) {
    "use strict";
    (function() {
      function is(x, y) {
        return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
      }
      "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
      var React12 = require_react(), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore = shim.useSyncExternalStore, useRef7 = React12.useRef, useEffect5 = React12.useEffect, useMemo3 = React12.useMemo, useDebugValue = React12.useDebugValue;
      exports.useSyncExternalStoreWithSelector = function(subscribe2, getSnapshot, getServerSnapshot, selector, isEqual) {
        var instRef = useRef7(null);
        if (null === instRef.current) {
          var inst = { hasValue: false, value: null };
          instRef.current = inst;
        } else inst = instRef.current;
        instRef = useMemo3(
          function() {
            function memoizedSelector(nextSnapshot) {
              if (!hasMemo) {
                hasMemo = true;
                memoizedSnapshot = nextSnapshot;
                nextSnapshot = selector(nextSnapshot);
                if (void 0 !== isEqual && inst.hasValue) {
                  var currentSelection = inst.value;
                  if (isEqual(currentSelection, nextSnapshot))
                    return memoizedSelection = currentSelection;
                }
                return memoizedSelection = nextSnapshot;
              }
              currentSelection = memoizedSelection;
              if (objectIs(memoizedSnapshot, nextSnapshot))
                return currentSelection;
              var nextSelection = selector(nextSnapshot);
              if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
                return memoizedSnapshot = nextSnapshot, currentSelection;
              memoizedSnapshot = nextSnapshot;
              return memoizedSelection = nextSelection;
            }
            var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
            return [
              function() {
                return memoizedSelector(getSnapshot());
              },
              null === maybeGetServerSnapshot ? void 0 : function() {
                return memoizedSelector(maybeGetServerSnapshot());
              }
            ];
          },
          [getSnapshot, getServerSnapshot, selector, isEqual]
        );
        var value = useSyncExternalStore(subscribe2, instRef[0], instRef[1]);
        useEffect5(
          function() {
            inst.hasValue = true;
            inst.value = value;
          },
          [value]
        );
        useDebugValue(value);
        return value;
      };
      "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
    })();
  }
});

// node_modules/use-sync-external-store/shim/with-selector.js
var require_with_selector = __commonJS({
  "node_modules/use-sync-external-store/shim/with-selector.js"(exports, module) {
    "use strict";
    if (false) {
      module.exports = null;
    } else {
      module.exports = require_with_selector_development();
    }
  }
});

// vendor-external:react-dom
var require_react_dom = __commonJS({
  "vendor-external:react-dom"(exports, module) {
    module.exports = window.ReactDOM;
  }
});

// package-external:@wordpress/private-apis
var require_private_apis = __commonJS({
  "package-external:@wordpress/private-apis"(exports, module) {
    module.exports = window.wp.privateApis;
  }
});

// node_modules/@tanstack/store/dist/esm/scheduler.js
var __storeToDerived = /* @__PURE__ */ new WeakMap();
var __derivedToStore = /* @__PURE__ */ new WeakMap();
var __depsThatHaveWrittenThisTick = {
  current: []
};
var __isFlushing = false;
var __batchDepth = 0;
var __pendingUpdates = /* @__PURE__ */ new Set();
var __initialBatchValues = /* @__PURE__ */ new Map();
function __flush_internals(relatedVals) {
  for (const derived of relatedVals) {
    if (__depsThatHaveWrittenThisTick.current.includes(derived)) {
      continue;
    }
    __depsThatHaveWrittenThisTick.current.push(derived);
    derived.recompute();
    const stores = __derivedToStore.get(derived);
    if (stores) {
      for (const store of stores) {
        const relatedLinkedDerivedVals = __storeToDerived.get(store);
        if (!(relatedLinkedDerivedVals == null ? void 0 : relatedLinkedDerivedVals.length)) continue;
        __flush_internals(relatedLinkedDerivedVals);
      }
    }
  }
}
function __notifyListeners(store) {
  const value = {
    prevVal: store.prevState,
    currentVal: store.state
  };
  for (const listener of store.listeners) {
    listener(value);
  }
}
function __notifyDerivedListeners(derived) {
  const value = {
    prevVal: derived.prevState,
    currentVal: derived.state
  };
  for (const listener of derived.listeners) {
    listener(value);
  }
}
function __flush(store) {
  if (__batchDepth > 0 && !__initialBatchValues.has(store)) {
    __initialBatchValues.set(store, store.prevState);
  }
  __pendingUpdates.add(store);
  if (__batchDepth > 0) return;
  if (__isFlushing) return;
  try {
    __isFlushing = true;
    while (__pendingUpdates.size > 0) {
      const stores = Array.from(__pendingUpdates);
      __pendingUpdates.clear();
      for (const store2 of stores) {
        const prevState = __initialBatchValues.get(store2) ?? store2.prevState;
        store2.prevState = prevState;
        __notifyListeners(store2);
      }
      for (const store2 of stores) {
        const derivedVals = __storeToDerived.get(store2);
        if (!derivedVals) continue;
        __depsThatHaveWrittenThisTick.current.push(store2);
        __flush_internals(derivedVals);
      }
      for (const store2 of stores) {
        const derivedVals = __storeToDerived.get(store2);
        if (!derivedVals) continue;
        for (const derived of derivedVals) {
          __notifyDerivedListeners(derived);
        }
      }
    }
  } finally {
    __isFlushing = false;
    __depsThatHaveWrittenThisTick.current = [];
    __initialBatchValues.clear();
  }
}
function batch(fn) {
  __batchDepth++;
  try {
    fn();
  } finally {
    __batchDepth--;
    if (__batchDepth === 0) {
      const pendingUpdateToFlush = __pendingUpdates.values().next().value;
      if (pendingUpdateToFlush) {
        __flush(pendingUpdateToFlush);
      }
    }
  }
}

// node_modules/@tanstack/store/dist/esm/types.js
function isUpdaterFunction(updater) {
  return typeof updater === "function";
}

// node_modules/@tanstack/store/dist/esm/store.js
var Store = class {
  constructor(initialState, options) {
    this.listeners = /* @__PURE__ */ new Set();
    this.subscribe = (listener) => {
      var _a, _b;
      this.listeners.add(listener);
      const unsub = (_b = (_a = this.options) == null ? void 0 : _a.onSubscribe) == null ? void 0 : _b.call(_a, listener, this);
      return () => {
        this.listeners.delete(listener);
        unsub == null ? void 0 : unsub();
      };
    };
    this.prevState = initialState;
    this.state = initialState;
    this.options = options;
  }
  setState(updater) {
    var _a, _b, _c;
    this.prevState = this.state;
    if ((_a = this.options) == null ? void 0 : _a.updateFn) {
      this.state = this.options.updateFn(this.prevState)(updater);
    } else {
      if (isUpdaterFunction(updater)) {
        this.state = updater(this.prevState);
      } else {
        this.state = updater;
      }
    }
    (_c = (_b = this.options) == null ? void 0 : _b.onUpdate) == null ? void 0 : _c.call(_b);
    __flush(this);
  }
};

// node_modules/@tanstack/history/dist/esm/index.js
var stateIndexKey = "__TSR_index";
var popStateEvent = "popstate";
var beforeUnloadEvent = "beforeunload";
function createHistory(opts) {
  let location = opts.getLocation();
  const subscribers = /* @__PURE__ */ new Set();
  const notify = (action) => {
    location = opts.getLocation();
    subscribers.forEach((subscriber) => subscriber({ location, action }));
  };
  const handleIndexChange = (action) => {
    if (opts.notifyOnIndexChange ?? true) notify(action);
    else location = opts.getLocation();
  };
  const tryNavigation = async ({
    task,
    navigateOpts,
    ...actionInfo
  }) => {
    const ignoreBlocker = navigateOpts?.ignoreBlocker ?? false;
    if (ignoreBlocker) {
      task();
      return;
    }
    const blockers = opts.getBlockers?.() ?? [];
    const isPushOrReplace = actionInfo.type === "PUSH" || actionInfo.type === "REPLACE";
    if (typeof document !== "undefined" && blockers.length && isPushOrReplace) {
      for (const blocker of blockers) {
        const nextLocation = parseHref(actionInfo.path, actionInfo.state);
        const isBlocked = await blocker.blockerFn({
          currentLocation: location,
          nextLocation,
          action: actionInfo.type
        });
        if (isBlocked) {
          opts.onBlocked?.();
          return;
        }
      }
    }
    task();
  };
  return {
    get location() {
      return location;
    },
    get length() {
      return opts.getLength();
    },
    subscribers,
    subscribe: (cb) => {
      subscribers.add(cb);
      return () => {
        subscribers.delete(cb);
      };
    },
    push: (path, state, navigateOpts) => {
      const currentIndex = location.state[stateIndexKey];
      state = assignKeyAndIndex(currentIndex + 1, state);
      tryNavigation({
        task: () => {
          opts.pushState(path, state);
          notify({ type: "PUSH" });
        },
        navigateOpts,
        type: "PUSH",
        path,
        state
      });
    },
    replace: (path, state, navigateOpts) => {
      const currentIndex = location.state[stateIndexKey];
      state = assignKeyAndIndex(currentIndex, state);
      tryNavigation({
        task: () => {
          opts.replaceState(path, state);
          notify({ type: "REPLACE" });
        },
        navigateOpts,
        type: "REPLACE",
        path,
        state
      });
    },
    go: (index, navigateOpts) => {
      tryNavigation({
        task: () => {
          opts.go(index);
          handleIndexChange({ type: "GO", index });
        },
        navigateOpts,
        type: "GO"
      });
    },
    back: (navigateOpts) => {
      tryNavigation({
        task: () => {
          opts.back(navigateOpts?.ignoreBlocker ?? false);
          handleIndexChange({ type: "BACK" });
        },
        navigateOpts,
        type: "BACK"
      });
    },
    forward: (navigateOpts) => {
      tryNavigation({
        task: () => {
          opts.forward(navigateOpts?.ignoreBlocker ?? false);
          handleIndexChange({ type: "FORWARD" });
        },
        navigateOpts,
        type: "FORWARD"
      });
    },
    canGoBack: () => location.state[stateIndexKey] !== 0,
    createHref: (str) => opts.createHref(str),
    block: (blocker) => {
      if (!opts.setBlockers) return () => {
      };
      const blockers = opts.getBlockers?.() ?? [];
      opts.setBlockers([...blockers, blocker]);
      return () => {
        const blockers2 = opts.getBlockers?.() ?? [];
        opts.setBlockers?.(blockers2.filter((b) => b !== blocker));
      };
    },
    flush: () => opts.flush?.(),
    destroy: () => opts.destroy?.(),
    notify
  };
}
function assignKeyAndIndex(index, state) {
  if (!state) {
    state = {};
  }
  const key = createRandomKey();
  return {
    ...state,
    key,
    // TODO: Remove in v2 - use __TSR_key instead
    __TSR_key: key,
    [stateIndexKey]: index
  };
}
function createBrowserHistory(opts) {
  const win = opts?.window ?? (typeof document !== "undefined" ? window : void 0);
  const originalPushState = win.history.pushState;
  const originalReplaceState = win.history.replaceState;
  let blockers = [];
  const _getBlockers = () => blockers;
  const _setBlockers = (newBlockers) => blockers = newBlockers;
  const createHref = opts?.createHref ?? ((path) => path);
  const parseLocation = opts?.parseLocation ?? (() => parseHref(
    `${win.location.pathname}${win.location.search}${win.location.hash}`,
    win.history.state
  ));
  if (!win.history.state?.__TSR_key && !win.history.state?.key) {
    const addedKey = createRandomKey();
    win.history.replaceState(
      {
        [stateIndexKey]: 0,
        key: addedKey,
        // TODO: Remove in v2 - use __TSR_key instead
        __TSR_key: addedKey
      },
      ""
    );
  }
  let currentLocation = parseLocation();
  let rollbackLocation;
  let nextPopIsGo = false;
  let ignoreNextPop = false;
  let skipBlockerNextPop = false;
  let ignoreNextBeforeUnload = false;
  const getLocation = () => currentLocation;
  let next;
  let scheduled;
  const flush = () => {
    if (!next) {
      return;
    }
    history._ignoreSubscribers = true;
    (next.isPush ? win.history.pushState : win.history.replaceState)(
      next.state,
      "",
      next.href
    );
    history._ignoreSubscribers = false;
    next = void 0;
    scheduled = void 0;
    rollbackLocation = void 0;
  };
  const queueHistoryAction = (type, destHref, state) => {
    const href = createHref(destHref);
    if (!scheduled) {
      rollbackLocation = currentLocation;
    }
    currentLocation = parseHref(destHref, state);
    next = {
      href,
      state,
      isPush: next?.isPush || type === "push"
    };
    if (!scheduled) {
      scheduled = Promise.resolve().then(() => flush());
    }
  };
  const onPushPop = (type) => {
    currentLocation = parseLocation();
    history.notify({ type });
  };
  const onPushPopEvent = async () => {
    if (ignoreNextPop) {
      ignoreNextPop = false;
      return;
    }
    const nextLocation = parseLocation();
    const delta = nextLocation.state[stateIndexKey] - currentLocation.state[stateIndexKey];
    const isForward = delta === 1;
    const isBack = delta === -1;
    const isGo = !isForward && !isBack || nextPopIsGo;
    nextPopIsGo = false;
    const action = isGo ? "GO" : isBack ? "BACK" : "FORWARD";
    const notify = isGo ? {
      type: "GO",
      index: delta
    } : {
      type: isBack ? "BACK" : "FORWARD"
    };
    if (skipBlockerNextPop) {
      skipBlockerNextPop = false;
    } else {
      const blockers2 = _getBlockers();
      if (typeof document !== "undefined" && blockers2.length) {
        for (const blocker of blockers2) {
          const isBlocked = await blocker.blockerFn({
            currentLocation,
            nextLocation,
            action
          });
          if (isBlocked) {
            ignoreNextPop = true;
            win.history.go(1);
            history.notify(notify);
            return;
          }
        }
      }
    }
    currentLocation = parseLocation();
    history.notify(notify);
  };
  const onBeforeUnload = (e) => {
    if (ignoreNextBeforeUnload) {
      ignoreNextBeforeUnload = false;
      return;
    }
    let shouldBlock = false;
    const blockers2 = _getBlockers();
    if (typeof document !== "undefined" && blockers2.length) {
      for (const blocker of blockers2) {
        const shouldHaveBeforeUnload = blocker.enableBeforeUnload ?? true;
        if (shouldHaveBeforeUnload === true) {
          shouldBlock = true;
          break;
        }
        if (typeof shouldHaveBeforeUnload === "function" && shouldHaveBeforeUnload() === true) {
          shouldBlock = true;
          break;
        }
      }
    }
    if (shouldBlock) {
      e.preventDefault();
      return e.returnValue = "";
    }
    return;
  };
  const history = createHistory({
    getLocation,
    getLength: () => win.history.length,
    pushState: (href, state) => queueHistoryAction("push", href, state),
    replaceState: (href, state) => queueHistoryAction("replace", href, state),
    back: (ignoreBlocker) => {
      if (ignoreBlocker) skipBlockerNextPop = true;
      ignoreNextBeforeUnload = true;
      return win.history.back();
    },
    forward: (ignoreBlocker) => {
      if (ignoreBlocker) skipBlockerNextPop = true;
      ignoreNextBeforeUnload = true;
      win.history.forward();
    },
    go: (n) => {
      nextPopIsGo = true;
      win.history.go(n);
    },
    createHref: (href) => createHref(href),
    flush,
    destroy: () => {
      win.history.pushState = originalPushState;
      win.history.replaceState = originalReplaceState;
      win.removeEventListener(beforeUnloadEvent, onBeforeUnload, {
        capture: true
      });
      win.removeEventListener(popStateEvent, onPushPopEvent);
    },
    onBlocked: () => {
      if (rollbackLocation && currentLocation !== rollbackLocation) {
        currentLocation = rollbackLocation;
      }
    },
    getBlockers: _getBlockers,
    setBlockers: _setBlockers,
    notifyOnIndexChange: false
  });
  win.addEventListener(beforeUnloadEvent, onBeforeUnload, { capture: true });
  win.addEventListener(popStateEvent, onPushPopEvent);
  win.history.pushState = function(...args) {
    const res = originalPushState.apply(win.history, args);
    if (!history._ignoreSubscribers) onPushPop("PUSH");
    return res;
  };
  win.history.replaceState = function(...args) {
    const res = originalReplaceState.apply(win.history, args);
    if (!history._ignoreSubscribers) onPushPop("REPLACE");
    return res;
  };
  return history;
}
function parseHref(href, state) {
  const hashIndex = href.indexOf("#");
  const searchIndex = href.indexOf("?");
  const addedKey = createRandomKey();
  return {
    href,
    pathname: href.substring(
      0,
      hashIndex > 0 ? searchIndex > 0 ? Math.min(hashIndex, searchIndex) : hashIndex : searchIndex > 0 ? searchIndex : href.length
    ),
    hash: hashIndex > -1 ? href.substring(hashIndex) : "",
    search: searchIndex > -1 ? href.slice(searchIndex, hashIndex === -1 ? void 0 : hashIndex) : "",
    state: state || { [stateIndexKey]: 0, key: addedKey, __TSR_key: addedKey }
  };
}
function createRandomKey() {
  return (Math.random() + 1).toString(36).substring(7);
}

// node_modules/@tanstack/router-core/dist/esm/utils.js
function last(arr) {
  return arr[arr.length - 1];
}
function isFunction(d) {
  return typeof d === "function";
}
function functionalUpdate(updater, previous) {
  if (isFunction(updater)) {
    return updater(previous);
  }
  return updater;
}
var hasOwn = Object.prototype.hasOwnProperty;
function replaceEqualDeep(prev, _next) {
  if (prev === _next) {
    return prev;
  }
  const next = _next;
  const array = isPlainArray(prev) && isPlainArray(next);
  if (!array && !(isPlainObject(prev) && isPlainObject(next))) return next;
  const prevItems = array ? prev : getEnumerableOwnKeys(prev);
  if (!prevItems) return next;
  const nextItems = array ? next : getEnumerableOwnKeys(next);
  if (!nextItems) return next;
  const prevSize = prevItems.length;
  const nextSize = nextItems.length;
  const copy = array ? new Array(nextSize) : {};
  let equalItems = 0;
  for (let i = 0; i < nextSize; i++) {
    const key = array ? i : nextItems[i];
    const p = prev[key];
    const n = next[key];
    if (p === n) {
      copy[key] = p;
      if (array ? i < prevSize : hasOwn.call(prev, key)) equalItems++;
      continue;
    }
    if (p === null || n === null || typeof p !== "object" || typeof n !== "object") {
      copy[key] = n;
      continue;
    }
    const v = replaceEqualDeep(p, n);
    copy[key] = v;
    if (v === p) equalItems++;
  }
  return prevSize === nextSize && equalItems === prevSize ? prev : copy;
}
function getEnumerableOwnKeys(o) {
  const keys = [];
  const names = Object.getOwnPropertyNames(o);
  for (const name of names) {
    if (!Object.prototype.propertyIsEnumerable.call(o, name)) return false;
    keys.push(name);
  }
  const symbols = Object.getOwnPropertySymbols(o);
  for (const symbol of symbols) {
    if (!Object.prototype.propertyIsEnumerable.call(o, symbol)) return false;
    keys.push(symbol);
  }
  return keys;
}
function isPlainObject(o) {
  if (!hasObjectPrototype(o)) {
    return false;
  }
  const ctor = o.constructor;
  if (typeof ctor === "undefined") {
    return true;
  }
  const prot = ctor.prototype;
  if (!hasObjectPrototype(prot)) {
    return false;
  }
  if (!prot.hasOwnProperty("isPrototypeOf")) {
    return false;
  }
  return true;
}
function hasObjectPrototype(o) {
  return Object.prototype.toString.call(o) === "[object Object]";
}
function isPlainArray(value) {
  return Array.isArray(value) && value.length === Object.keys(value).length;
}
function deepEqual(a, b, opts) {
  if (a === b) {
    return true;
  }
  if (typeof a !== typeof b) {
    return false;
  }
  if (Array.isArray(a) && Array.isArray(b)) {
    if (a.length !== b.length) return false;
    for (let i = 0, l = a.length; i < l; i++) {
      if (!deepEqual(a[i], b[i], opts)) return false;
    }
    return true;
  }
  if (isPlainObject(a) && isPlainObject(b)) {
    const ignoreUndefined = opts?.ignoreUndefined ?? true;
    if (opts?.partial) {
      for (const k in b) {
        if (!ignoreUndefined || b[k] !== void 0) {
          if (!deepEqual(a[k], b[k], opts)) return false;
        }
      }
      return true;
    }
    let aCount = 0;
    if (!ignoreUndefined) {
      aCount = Object.keys(a).length;
    } else {
      for (const k in a) {
        if (a[k] !== void 0) aCount++;
      }
    }
    let bCount = 0;
    for (const k in b) {
      if (!ignoreUndefined || b[k] !== void 0) {
        bCount++;
        if (bCount > aCount || !deepEqual(a[k], b[k], opts)) return false;
      }
    }
    return aCount === bCount;
  }
  return false;
}
function createControlledPromise(onResolve) {
  let resolveLoadPromise;
  let rejectLoadPromise;
  const controlledPromise = new Promise((resolve, reject) => {
    resolveLoadPromise = resolve;
    rejectLoadPromise = reject;
  });
  controlledPromise.status = "pending";
  controlledPromise.resolve = (value) => {
    controlledPromise.status = "resolved";
    controlledPromise.value = value;
    resolveLoadPromise(value);
    onResolve?.(value);
  };
  controlledPromise.reject = (e) => {
    controlledPromise.status = "rejected";
    rejectLoadPromise(e);
  };
  return controlledPromise;
}
function isPromise(value) {
  return Boolean(
    value && typeof value === "object" && typeof value.then === "function"
  );
}
function findLast(array, predicate) {
  for (let i = array.length - 1; i >= 0; i--) {
    const item = array[i];
    if (predicate(item)) return item;
  }
  return void 0;
}
var DECODE_IGNORE_LIST = Array.from(
  (/* @__PURE__ */ new Map([
    ["%", "%25"],
    ["\\", "%5C"],
    ["/", "%2F"],
    [";", "%3B"],
    [":", "%3A"],
    ["@", "%40"],
    ["&", "%26"],
    ["=", "%3D"],
    ["+", "%2B"],
    ["$", "%24"],
    [",", "%2C"]
  ])).values()
);
function decodePathSegment(part, decodeIgnore = DECODE_IGNORE_LIST, startIndex = 0) {
  function decode2(part2) {
    try {
      return decodeURIComponent(part2);
    } catch {
      return part2.replaceAll(/%[0-9A-Fa-f]{2}/g, (match) => {
        try {
          return decodeURIComponent(match);
        } catch {
          return match;
        }
      });
    }
  }
  if (part === "" || !part.match(/%[0-9A-Fa-f]{2}/g)) return part;
  for (let i = startIndex; i < decodeIgnore.length; i++) {
    const char = decodeIgnore[i];
    if (char && part.includes(char)) {
      const partsToDecode = part.split(char);
      const partsToJoin = [];
      for (const partToDecode of partsToDecode) {
        partsToJoin.push(decodePathSegment(partToDecode, decodeIgnore, i + 1));
      }
      return partsToJoin.join(char);
    }
  }
  return decode2(part);
}

// node_modules/tiny-invariant/dist/esm/tiny-invariant.js
var isProduction = false;
var prefix = "Invariant failed";
function invariant(condition, message) {
  if (condition) {
    return;
  }
  if (isProduction) {
    throw new Error(prefix);
  }
  var provided = typeof message === "function" ? message() : message;
  var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
  throw new Error(value);
}

// node_modules/@tanstack/router-core/dist/esm/path.js
var SEGMENT_TYPE_PATHNAME = 0;
var SEGMENT_TYPE_PARAM = 1;
var SEGMENT_TYPE_WILDCARD = 2;
var SEGMENT_TYPE_OPTIONAL_PARAM = 3;
function joinPaths(paths) {
  return cleanPath(
    paths.filter((val) => {
      return val !== void 0;
    }).join("/")
  );
}
function cleanPath(path) {
  return path.replace(/\/{2,}/g, "/");
}
function trimPathLeft(path) {
  return path === "/" ? path : path.replace(/^\/{1,}/, "");
}
function trimPathRight(path) {
  return path === "/" ? path : path.replace(/\/{1,}$/, "");
}
function trimPath(path) {
  return trimPathRight(trimPathLeft(path));
}
function removeTrailingSlash(value, basepath) {
  if (value?.endsWith("/") && value !== "/" && value !== `${basepath}/`) {
    return value.slice(0, -1);
  }
  return value;
}
function exactPathTest(pathName1, pathName2, basepath) {
  return removeTrailingSlash(pathName1, basepath) === removeTrailingSlash(pathName2, basepath);
}
function segmentToString(segment) {
  const { type, value } = segment;
  if (type === SEGMENT_TYPE_PATHNAME) {
    return value;
  }
  const { prefixSegment, suffixSegment } = segment;
  if (type === SEGMENT_TYPE_PARAM) {
    const param = value.substring(1);
    if (prefixSegment && suffixSegment) {
      return `${prefixSegment}{$${param}}${suffixSegment}`;
    } else if (prefixSegment) {
      return `${prefixSegment}{$${param}}`;
    } else if (suffixSegment) {
      return `{$${param}}${suffixSegment}`;
    }
  }
  if (type === SEGMENT_TYPE_OPTIONAL_PARAM) {
    const param = value.substring(1);
    if (prefixSegment && suffixSegment) {
      return `${prefixSegment}{-$${param}}${suffixSegment}`;
    } else if (prefixSegment) {
      return `${prefixSegment}{-$${param}}`;
    } else if (suffixSegment) {
      return `{-$${param}}${suffixSegment}`;
    }
    return `{-$${param}}`;
  }
  if (type === SEGMENT_TYPE_WILDCARD) {
    if (prefixSegment && suffixSegment) {
      return `${prefixSegment}{$}${suffixSegment}`;
    } else if (prefixSegment) {
      return `${prefixSegment}{$}`;
    } else if (suffixSegment) {
      return `{$}${suffixSegment}`;
    }
  }
  return value;
}
function resolvePath({
  base,
  to,
  trailingSlash = "never",
  parseCache
}) {
  let baseSegments = parsePathname(base, parseCache).slice();
  const toSegments = parsePathname(to, parseCache);
  if (baseSegments.length > 1 && last(baseSegments)?.value === "/") {
    baseSegments.pop();
  }
  for (let index = 0, length = toSegments.length; index < length; index++) {
    const toSegment = toSegments[index];
    const value = toSegment.value;
    if (value === "/") {
      if (!index) {
        baseSegments = [toSegment];
      } else if (index === length - 1) {
        baseSegments.push(toSegment);
      } else ;
    } else if (value === "..") {
      baseSegments.pop();
    } else if (value === ".") ;
    else {
      baseSegments.push(toSegment);
    }
  }
  if (baseSegments.length > 1) {
    if (last(baseSegments).value === "/") {
      if (trailingSlash === "never") {
        baseSegments.pop();
      }
    } else if (trailingSlash === "always") {
      baseSegments.push({ type: SEGMENT_TYPE_PATHNAME, value: "/" });
    }
  }
  const segmentValues = baseSegments.map(segmentToString);
  const joined = joinPaths(segmentValues);
  return joined;
}
var parsePathname = (pathname, cache) => {
  if (!pathname) return [];
  const cached = cache?.get(pathname);
  if (cached) return cached;
  const parsed = baseParsePathname(pathname);
  cache?.set(pathname, parsed);
  return parsed;
};
var PARAM_RE = /^\$.{1,}$/;
var PARAM_W_CURLY_BRACES_RE = /^(.*?)\{(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/;
var OPTIONAL_PARAM_W_CURLY_BRACES_RE = /^(.*?)\{-(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/;
var WILDCARD_RE = /^\$$/;
var WILDCARD_W_CURLY_BRACES_RE = /^(.*?)\{\$\}(.*)$/;
function baseParsePathname(pathname) {
  pathname = cleanPath(pathname);
  const segments = [];
  if (pathname.slice(0, 1) === "/") {
    pathname = pathname.substring(1);
    segments.push({
      type: SEGMENT_TYPE_PATHNAME,
      value: "/"
    });
  }
  if (!pathname) {
    return segments;
  }
  const split = pathname.split("/").filter(Boolean);
  segments.push(
    ...split.map((part) => {
      const wildcardBracesMatch = part.match(WILDCARD_W_CURLY_BRACES_RE);
      if (wildcardBracesMatch) {
        const prefix2 = wildcardBracesMatch[1];
        const suffix = wildcardBracesMatch[2];
        return {
          type: SEGMENT_TYPE_WILDCARD,
          value: "$",
          prefixSegment: prefix2 || void 0,
          suffixSegment: suffix || void 0
        };
      }
      const optionalParamBracesMatch = part.match(
        OPTIONAL_PARAM_W_CURLY_BRACES_RE
      );
      if (optionalParamBracesMatch) {
        const prefix2 = optionalParamBracesMatch[1];
        const paramName = optionalParamBracesMatch[2];
        const suffix = optionalParamBracesMatch[3];
        return {
          type: SEGMENT_TYPE_OPTIONAL_PARAM,
          value: paramName,
          // Now just $paramName (no prefix)
          prefixSegment: prefix2 || void 0,
          suffixSegment: suffix || void 0
        };
      }
      const paramBracesMatch = part.match(PARAM_W_CURLY_BRACES_RE);
      if (paramBracesMatch) {
        const prefix2 = paramBracesMatch[1];
        const paramName = paramBracesMatch[2];
        const suffix = paramBracesMatch[3];
        return {
          type: SEGMENT_TYPE_PARAM,
          value: "" + paramName,
          prefixSegment: prefix2 || void 0,
          suffixSegment: suffix || void 0
        };
      }
      if (PARAM_RE.test(part)) {
        const paramName = part.substring(1);
        return {
          type: SEGMENT_TYPE_PARAM,
          value: "$" + paramName,
          prefixSegment: void 0,
          suffixSegment: void 0
        };
      }
      if (WILDCARD_RE.test(part)) {
        return {
          type: SEGMENT_TYPE_WILDCARD,
          value: "$",
          prefixSegment: void 0,
          suffixSegment: void 0
        };
      }
      return {
        type: SEGMENT_TYPE_PATHNAME,
        value: decodePathSegment(part)
      };
    })
  );
  if (pathname.slice(-1) === "/") {
    pathname = pathname.substring(1);
    segments.push({
      type: SEGMENT_TYPE_PATHNAME,
      value: "/"
    });
  }
  return segments;
}
function interpolatePath({
  path,
  params,
  leaveWildcards,
  leaveParams,
  decodeCharMap,
  parseCache
}) {
  const interpolatedPathSegments = parsePathname(path, parseCache);
  function encodeParam(key) {
    const value = params[key];
    const isValueString = typeof value === "string";
    if (key === "*" || key === "_splat") {
      return isValueString ? encodeURI(value) : value;
    } else {
      return isValueString ? encodePathParam(value, decodeCharMap) : value;
    }
  }
  let isMissingParams = false;
  const usedParams = {};
  const interpolatedPath = joinPaths(
    interpolatedPathSegments.map((segment) => {
      if (segment.type === SEGMENT_TYPE_PATHNAME) {
        return segment.value;
      }
      if (segment.type === SEGMENT_TYPE_WILDCARD) {
        usedParams._splat = params._splat;
        usedParams["*"] = params._splat;
        const segmentPrefix = segment.prefixSegment || "";
        const segmentSuffix = segment.suffixSegment || "";
        if (!params._splat) {
          isMissingParams = true;
          if (leaveWildcards) {
            return `${segmentPrefix}${segment.value}${segmentSuffix}`;
          }
          if (segmentPrefix || segmentSuffix) {
            return `${segmentPrefix}${segmentSuffix}`;
          }
          return void 0;
        }
        const value = encodeParam("_splat");
        if (leaveWildcards) {
          return `${segmentPrefix}${segment.value}${value ?? ""}${segmentSuffix}`;
        }
        return `${segmentPrefix}${value}${segmentSuffix}`;
      }
      if (segment.type === SEGMENT_TYPE_PARAM) {
        const key = segment.value.substring(1);
        if (!isMissingParams && !(key in params)) {
          isMissingParams = true;
        }
        usedParams[key] = params[key];
        const segmentPrefix = segment.prefixSegment || "";
        const segmentSuffix = segment.suffixSegment || "";
        if (leaveParams) {
          const value = encodeParam(segment.value);
          return `${segmentPrefix}${segment.value}${value ?? ""}${segmentSuffix}`;
        }
        return `${segmentPrefix}${encodeParam(key) ?? "undefined"}${segmentSuffix}`;
      }
      if (segment.type === SEGMENT_TYPE_OPTIONAL_PARAM) {
        const key = segment.value.substring(1);
        const segmentPrefix = segment.prefixSegment || "";
        const segmentSuffix = segment.suffixSegment || "";
        if (!(key in params) || params[key] == null) {
          if (leaveWildcards) {
            return `${segmentPrefix}${key}${segmentSuffix}`;
          }
          if (segmentPrefix || segmentSuffix) {
            return `${segmentPrefix}${segmentSuffix}`;
          }
          return void 0;
        }
        usedParams[key] = params[key];
        if (leaveParams) {
          const value = encodeParam(segment.value);
          return `${segmentPrefix}${segment.value}${value ?? ""}${segmentSuffix}`;
        }
        if (leaveWildcards) {
          return `${segmentPrefix}${key}${encodeParam(key) ?? ""}${segmentSuffix}`;
        }
        return `${segmentPrefix}${encodeParam(key) ?? ""}${segmentSuffix}`;
      }
      return segment.value;
    })
  );
  return { usedParams, interpolatedPath, isMissingParams };
}
function encodePathParam(value, decodeCharMap) {
  let encoded = encodeURIComponent(value);
  if (decodeCharMap) {
    for (const [encodedChar, char] of decodeCharMap) {
      encoded = encoded.replaceAll(encodedChar, char);
    }
  }
  return encoded;
}
function matchPathname(currentPathname, matchLocation, parseCache) {
  const pathParams = matchByPath(currentPathname, matchLocation, parseCache);
  if (matchLocation.to && !pathParams) {
    return;
  }
  return pathParams ?? {};
}
function matchByPath(from, {
  to,
  fuzzy,
  caseSensitive
}, parseCache) {
  const stringTo = to;
  const baseSegments = parsePathname(
    from.startsWith("/") ? from : `/${from}`,
    parseCache
  );
  const routeSegments = parsePathname(
    stringTo.startsWith("/") ? stringTo : `/${stringTo}`,
    parseCache
  );
  const params = {};
  const result = isMatch(
    baseSegments,
    routeSegments,
    params,
    fuzzy,
    caseSensitive
  );
  return result ? params : void 0;
}
function isMatch(baseSegments, routeSegments, params, fuzzy, caseSensitive) {
  let baseIndex = 0;
  let routeIndex = 0;
  while (baseIndex < baseSegments.length || routeIndex < routeSegments.length) {
    const baseSegment = baseSegments[baseIndex];
    const routeSegment = routeSegments[routeIndex];
    if (routeSegment) {
      if (routeSegment.type === SEGMENT_TYPE_WILDCARD) {
        const remainingBaseSegments = baseSegments.slice(baseIndex);
        let _splat;
        if (routeSegment.prefixSegment || routeSegment.suffixSegment) {
          if (!baseSegment) return false;
          const prefix2 = routeSegment.prefixSegment || "";
          const suffix = routeSegment.suffixSegment || "";
          const baseValue = baseSegment.value;
          if ("prefixSegment" in routeSegment) {
            if (!baseValue.startsWith(prefix2)) {
              return false;
            }
          }
          if ("suffixSegment" in routeSegment) {
            if (!baseSegments[baseSegments.length - 1]?.value.endsWith(suffix)) {
              return false;
            }
          }
          let rejoinedSplat = decodeURI(
            joinPaths(remainingBaseSegments.map((d) => d.value))
          );
          if (prefix2 && rejoinedSplat.startsWith(prefix2)) {
            rejoinedSplat = rejoinedSplat.slice(prefix2.length);
          }
          if (suffix && rejoinedSplat.endsWith(suffix)) {
            rejoinedSplat = rejoinedSplat.slice(
              0,
              rejoinedSplat.length - suffix.length
            );
          }
          _splat = rejoinedSplat;
        } else {
          _splat = decodeURI(
            joinPaths(remainingBaseSegments.map((d) => d.value))
          );
        }
        params["*"] = _splat;
        params["_splat"] = _splat;
        return true;
      }
      if (routeSegment.type === SEGMENT_TYPE_PATHNAME) {
        if (routeSegment.value === "/" && !baseSegment?.value) {
          routeIndex++;
          continue;
        }
        if (baseSegment) {
          if (caseSensitive) {
            if (routeSegment.value !== baseSegment.value) {
              return false;
            }
          } else if (routeSegment.value.toLowerCase() !== baseSegment.value.toLowerCase()) {
            return false;
          }
          baseIndex++;
          routeIndex++;
          continue;
        } else {
          return false;
        }
      }
      if (routeSegment.type === SEGMENT_TYPE_PARAM) {
        if (!baseSegment) {
          return false;
        }
        if (baseSegment.value === "/") {
          return false;
        }
        let _paramValue = "";
        let matched = false;
        if (routeSegment.prefixSegment || routeSegment.suffixSegment) {
          const prefix2 = routeSegment.prefixSegment || "";
          const suffix = routeSegment.suffixSegment || "";
          const baseValue = baseSegment.value;
          if (prefix2 && !baseValue.startsWith(prefix2)) {
            return false;
          }
          if (suffix && !baseValue.endsWith(suffix)) {
            return false;
          }
          let paramValue = baseValue;
          if (prefix2 && paramValue.startsWith(prefix2)) {
            paramValue = paramValue.slice(prefix2.length);
          }
          if (suffix && paramValue.endsWith(suffix)) {
            paramValue = paramValue.slice(0, paramValue.length - suffix.length);
          }
          _paramValue = decodeURIComponent(paramValue);
          matched = true;
        } else {
          _paramValue = decodeURIComponent(baseSegment.value);
          matched = true;
        }
        if (matched) {
          params[routeSegment.value.substring(1)] = _paramValue;
          baseIndex++;
        }
        routeIndex++;
        continue;
      }
      if (routeSegment.type === SEGMENT_TYPE_OPTIONAL_PARAM) {
        if (!baseSegment) {
          routeIndex++;
          continue;
        }
        if (baseSegment.value === "/") {
          routeIndex++;
          continue;
        }
        let _paramValue = "";
        let matched = false;
        if (routeSegment.prefixSegment || routeSegment.suffixSegment) {
          const prefix2 = routeSegment.prefixSegment || "";
          const suffix = routeSegment.suffixSegment || "";
          const baseValue = baseSegment.value;
          if ((!prefix2 || baseValue.startsWith(prefix2)) && (!suffix || baseValue.endsWith(suffix))) {
            let paramValue = baseValue;
            if (prefix2 && paramValue.startsWith(prefix2)) {
              paramValue = paramValue.slice(prefix2.length);
            }
            if (suffix && paramValue.endsWith(suffix)) {
              paramValue = paramValue.slice(
                0,
                paramValue.length - suffix.length
              );
            }
            _paramValue = decodeURIComponent(paramValue);
            matched = true;
          }
        } else {
          let shouldMatchOptional = true;
          for (let lookAhead = routeIndex + 1; lookAhead < routeSegments.length; lookAhead++) {
            const futureRouteSegment = routeSegments[lookAhead];
            if (futureRouteSegment?.type === SEGMENT_TYPE_PATHNAME && futureRouteSegment.value === baseSegment.value) {
              shouldMatchOptional = false;
              break;
            }
            if (futureRouteSegment?.type === SEGMENT_TYPE_PARAM || futureRouteSegment?.type === SEGMENT_TYPE_WILDCARD) {
              if (baseSegments.length < routeSegments.length) {
                shouldMatchOptional = false;
              }
              break;
            }
          }
          if (shouldMatchOptional) {
            _paramValue = decodeURIComponent(baseSegment.value);
            matched = true;
          }
        }
        if (matched) {
          params[routeSegment.value.substring(1)] = _paramValue;
          baseIndex++;
        }
        routeIndex++;
        continue;
      }
    }
    if (baseIndex < baseSegments.length && routeIndex >= routeSegments.length) {
      params["**"] = joinPaths(
        baseSegments.slice(baseIndex).map((d) => d.value)
      );
      return !!fuzzy && routeSegments[routeSegments.length - 1]?.value !== "/";
    }
    if (routeIndex < routeSegments.length && baseIndex >= baseSegments.length) {
      for (let i = routeIndex; i < routeSegments.length; i++) {
        if (routeSegments[i]?.type !== SEGMENT_TYPE_OPTIONAL_PARAM) {
          return false;
        }
      }
      break;
    }
    break;
  }
  return true;
}

// node_modules/@tanstack/router-core/dist/esm/process-route-tree.js
var SLASH_SCORE = 0.75;
var STATIC_SEGMENT_SCORE = 1;
var REQUIRED_PARAM_BASE_SCORE = 0.5;
var OPTIONAL_PARAM_BASE_SCORE = 0.4;
var WILDCARD_PARAM_BASE_SCORE = 0.25;
var STATIC_AFTER_DYNAMIC_BONUS_SCORE = 0.2;
var BOTH_PRESENCE_BASE_SCORE = 0.05;
var PREFIX_PRESENCE_BASE_SCORE = 0.02;
var SUFFIX_PRESENCE_BASE_SCORE = 0.01;
var PREFIX_LENGTH_SCORE_MULTIPLIER = 2e-4;
var SUFFIX_LENGTH_SCORE_MULTIPLIER = 1e-4;
function handleParam(segment, baseScore) {
  if (segment.prefixSegment && segment.suffixSegment) {
    return baseScore + BOTH_PRESENCE_BASE_SCORE + PREFIX_LENGTH_SCORE_MULTIPLIER * segment.prefixSegment.length + SUFFIX_LENGTH_SCORE_MULTIPLIER * segment.suffixSegment.length;
  }
  if (segment.prefixSegment) {
    return baseScore + PREFIX_PRESENCE_BASE_SCORE + PREFIX_LENGTH_SCORE_MULTIPLIER * segment.prefixSegment.length;
  }
  if (segment.suffixSegment) {
    return baseScore + SUFFIX_PRESENCE_BASE_SCORE + SUFFIX_LENGTH_SCORE_MULTIPLIER * segment.suffixSegment.length;
  }
  return baseScore;
}
function sortRoutes(routes) {
  const scoredRoutes = [];
  routes.forEach((d, i) => {
    if (d.isRoot || !d.path) {
      return;
    }
    const trimmed = trimPathLeft(d.fullPath);
    let parsed = parsePathname(trimmed);
    let skip = 0;
    while (parsed.length > skip + 1 && parsed[skip]?.value === "/") {
      skip++;
    }
    if (skip > 0) parsed = parsed.slice(skip);
    let optionalParamCount = 0;
    let hasStaticAfter = false;
    const scores = parsed.map((segment, index) => {
      if (segment.value === "/") {
        return SLASH_SCORE;
      }
      if (segment.type === SEGMENT_TYPE_PATHNAME) {
        return STATIC_SEGMENT_SCORE;
      }
      let baseScore = void 0;
      if (segment.type === SEGMENT_TYPE_PARAM) {
        baseScore = REQUIRED_PARAM_BASE_SCORE;
      } else if (segment.type === SEGMENT_TYPE_OPTIONAL_PARAM) {
        baseScore = OPTIONAL_PARAM_BASE_SCORE;
        optionalParamCount++;
      } else {
        baseScore = WILDCARD_PARAM_BASE_SCORE;
      }
      for (let i2 = index + 1; i2 < parsed.length; i2++) {
        const nextSegment = parsed[i2];
        if (nextSegment.type === SEGMENT_TYPE_PATHNAME && nextSegment.value !== "/") {
          hasStaticAfter = true;
          return handleParam(
            segment,
            baseScore + STATIC_AFTER_DYNAMIC_BONUS_SCORE
          );
        }
      }
      return handleParam(segment, baseScore);
    });
    scoredRoutes.push({
      child: d,
      trimmed,
      parsed,
      index: i,
      scores,
      optionalParamCount,
      hasStaticAfter
    });
  });
  const flatRoutes = scoredRoutes.sort((a, b) => {
    const minLength = Math.min(a.scores.length, b.scores.length);
    for (let i = 0; i < minLength; i++) {
      if (a.scores[i] !== b.scores[i]) {
        return b.scores[i] - a.scores[i];
      }
    }
    if (a.scores.length !== b.scores.length) {
      if (a.optionalParamCount !== b.optionalParamCount) {
        if (a.hasStaticAfter === b.hasStaticAfter) {
          return a.optionalParamCount - b.optionalParamCount;
        } else if (a.hasStaticAfter && !b.hasStaticAfter) {
          return -1;
        } else if (!a.hasStaticAfter && b.hasStaticAfter) {
          return 1;
        }
      }
      return b.scores.length - a.scores.length;
    }
    for (let i = 0; i < minLength; i++) {
      if (a.parsed[i].value !== b.parsed[i].value) {
        return a.parsed[i].value > b.parsed[i].value ? 1 : -1;
      }
    }
    return a.index - b.index;
  }).map((d, i) => {
    d.child.rank = i;
    return d.child;
  });
  return flatRoutes;
}
function processRouteTree({
  routeTree,
  initRoute
}) {
  const routesById = {};
  const routesByPath = {};
  const recurseRoutes = (childRoutes) => {
    childRoutes.forEach((childRoute, i) => {
      initRoute?.(childRoute, i);
      const existingRoute = routesById[childRoute.id];
      invariant(
        !existingRoute,
        `Duplicate routes found with id: ${String(childRoute.id)}`
      );
      routesById[childRoute.id] = childRoute;
      if (!childRoute.isRoot && childRoute.path) {
        const trimmedFullPath = trimPathRight(childRoute.fullPath);
        if (!routesByPath[trimmedFullPath] || childRoute.fullPath.endsWith("/")) {
          routesByPath[trimmedFullPath] = childRoute;
        }
      }
      const children = childRoute.children;
      if (children?.length) {
        recurseRoutes(children);
      }
    });
  };
  recurseRoutes([routeTree]);
  const flatRoutes = sortRoutes(Object.values(routesById));
  return { routesById, routesByPath, flatRoutes };
}

// node_modules/@tanstack/router-core/dist/esm/not-found.js
function notFound(options = {}) {
  options.isNotFound = true;
  if (options.throw) throw options;
  return options;
}
function isNotFound(obj) {
  return !!obj?.isNotFound;
}

// node_modules/@tanstack/router-core/dist/esm/scroll-restoration.js
function getSafeSessionStorage() {
  try {
    if (typeof window !== "undefined" && typeof window.sessionStorage === "object") {
      return window.sessionStorage;
    }
  } catch {
  }
  return void 0;
}
var storageKey = "tsr-scroll-restoration-v1_3";
var throttle = (fn, wait) => {
  let timeout;
  return (...args) => {
    if (!timeout) {
      timeout = setTimeout(() => {
        fn(...args);
        timeout = null;
      }, wait);
    }
  };
};
function createScrollRestorationCache() {
  const safeSessionStorage = getSafeSessionStorage();
  if (!safeSessionStorage) {
    return null;
  }
  const persistedState = safeSessionStorage.getItem(storageKey);
  let state = persistedState ? JSON.parse(persistedState) : {};
  return {
    state,
    // This setter is simply to make sure that we set the sessionStorage right
    // after the state is updated. It doesn't necessarily need to be a functional
    // update.
    set: (updater) => (state = functionalUpdate(updater, state) || state, safeSessionStorage.setItem(storageKey, JSON.stringify(state)))
  };
}
var scrollRestorationCache = createScrollRestorationCache();
var defaultGetScrollRestorationKey = (location) => {
  return location.state.__TSR_key || location.href;
};
function getCssSelector(el) {
  const path = [];
  let parent;
  while (parent = el.parentNode) {
    path.push(
      `${el.tagName}:nth-child(${Array.prototype.indexOf.call(parent.children, el) + 1})`
    );
    el = parent;
  }
  return `${path.reverse().join(" > ")}`.toLowerCase();
}
var ignoreScroll = false;
function restoreScroll({
  storageKey: storageKey2,
  key,
  behavior,
  shouldScrollRestoration,
  scrollToTopSelectors,
  location
}) {
  let byKey;
  try {
    byKey = JSON.parse(sessionStorage.getItem(storageKey2) || "{}");
  } catch (error) {
    console.error(error);
    return;
  }
  const resolvedKey = key || window.history.state?.__TSR_key;
  const elementEntries = byKey[resolvedKey];
  ignoreScroll = true;
  scroll: {
    if (shouldScrollRestoration && elementEntries && Object.keys(elementEntries).length > 0) {
      for (const elementSelector in elementEntries) {
        const entry = elementEntries[elementSelector];
        if (elementSelector === "window") {
          window.scrollTo({
            top: entry.scrollY,
            left: entry.scrollX,
            behavior
          });
        } else if (elementSelector) {
          const element = document.querySelector(elementSelector);
          if (element) {
            element.scrollLeft = entry.scrollX;
            element.scrollTop = entry.scrollY;
          }
        }
      }
      break scroll;
    }
    const hash = (location ?? window.location).hash.split("#", 2)[1];
    if (hash) {
      const hashScrollIntoViewOptions = window.history.state?.__hashScrollIntoViewOptions ?? true;
      if (hashScrollIntoViewOptions) {
        const el = document.getElementById(hash);
        if (el) {
          el.scrollIntoView(hashScrollIntoViewOptions);
        }
      }
      break scroll;
    }
    const scrollOptions = { top: 0, left: 0, behavior };
    window.scrollTo(scrollOptions);
    if (scrollToTopSelectors) {
      for (const selector of scrollToTopSelectors) {
        if (selector === "window") continue;
        const element = typeof selector === "function" ? selector() : document.querySelector(selector);
        if (element) element.scrollTo(scrollOptions);
      }
    }
  }
  ignoreScroll = false;
}
function setupScrollRestoration(router, force) {
  if (!scrollRestorationCache && !router.isServer) {
    return;
  }
  const shouldScrollRestoration = force ?? router.options.scrollRestoration ?? false;
  if (shouldScrollRestoration) {
    router.isScrollRestoring = true;
  }
  if (router.isServer || router.isScrollRestorationSetup || !scrollRestorationCache) {
    return;
  }
  router.isScrollRestorationSetup = true;
  ignoreScroll = false;
  const getKey = router.options.getScrollRestorationKey || defaultGetScrollRestorationKey;
  window.history.scrollRestoration = "manual";
  const onScroll = (event) => {
    if (ignoreScroll || !router.isScrollRestoring) {
      return;
    }
    let elementSelector = "";
    if (event.target === document || event.target === window) {
      elementSelector = "window";
    } else {
      const attrId = event.target.getAttribute(
        "data-scroll-restoration-id"
      );
      if (attrId) {
        elementSelector = `[data-scroll-restoration-id="${attrId}"]`;
      } else {
        elementSelector = getCssSelector(event.target);
      }
    }
    const restoreKey = getKey(router.state.location);
    scrollRestorationCache.set((state) => {
      const keyEntry = state[restoreKey] ||= {};
      const elementEntry = keyEntry[elementSelector] ||= {};
      if (elementSelector === "window") {
        elementEntry.scrollX = window.scrollX || 0;
        elementEntry.scrollY = window.scrollY || 0;
      } else if (elementSelector) {
        const element = document.querySelector(elementSelector);
        if (element) {
          elementEntry.scrollX = element.scrollLeft || 0;
          elementEntry.scrollY = element.scrollTop || 0;
        }
      }
      return state;
    });
  };
  if (typeof document !== "undefined") {
    document.addEventListener("scroll", throttle(onScroll, 100), true);
  }
  router.subscribe("onRendered", (event) => {
    const cacheKey = getKey(event.toLocation);
    if (!router.resetNextScroll) {
      router.resetNextScroll = true;
      return;
    }
    if (typeof router.options.scrollRestoration === "function") {
      const shouldRestore = router.options.scrollRestoration({
        location: router.latestLocation
      });
      if (!shouldRestore) {
        return;
      }
    }
    restoreScroll({
      storageKey,
      key: cacheKey,
      behavior: router.options.scrollRestorationBehavior,
      shouldScrollRestoration: router.isScrollRestoring,
      scrollToTopSelectors: router.options.scrollToTopSelectors,
      location: router.history.location
    });
    if (router.isScrollRestoring) {
      scrollRestorationCache.set((state) => {
        state[cacheKey] ||= {};
        return state;
      });
    }
  });
}
function handleHashScroll(router) {
  if (typeof document !== "undefined" && document.querySelector) {
    const hashScrollIntoViewOptions = router.state.location.state.__hashScrollIntoViewOptions ?? true;
    if (hashScrollIntoViewOptions && router.state.location.hash !== "") {
      const el = document.getElementById(router.state.location.hash);
      if (el) {
        el.scrollIntoView(hashScrollIntoViewOptions);
      }
    }
  }
}

// node_modules/@tanstack/router-core/dist/esm/qss.js
function encode(obj, stringify = String) {
  const result = new URLSearchParams();
  for (const key in obj) {
    const val = obj[key];
    if (val !== void 0) {
      result.set(key, stringify(val));
    }
  }
  return result.toString();
}
function toValue(str) {
  if (!str) return "";
  if (str === "false") return false;
  if (str === "true") return true;
  return +str * 0 === 0 && +str + "" === str ? +str : str;
}
function decode(str) {
  const searchParams = new URLSearchParams(str);
  const result = {};
  for (const [key, value] of searchParams.entries()) {
    const previousValue = result[key];
    if (previousValue == null) {
      result[key] = toValue(value);
    } else if (Array.isArray(previousValue)) {
      previousValue.push(toValue(value));
    } else {
      result[key] = [previousValue, toValue(value)];
    }
  }
  return result;
}

// node_modules/@tanstack/router-core/dist/esm/searchParams.js
var defaultParseSearch = parseSearchWith(JSON.parse);
var defaultStringifySearch = stringifySearchWith(
  JSON.stringify,
  JSON.parse
);
function parseSearchWith(parser) {
  return (searchStr) => {
    if (searchStr[0] === "?") {
      searchStr = searchStr.substring(1);
    }
    const query = decode(searchStr);
    for (const key in query) {
      const value = query[key];
      if (typeof value === "string") {
        try {
          query[key] = parser(value);
        } catch (_err) {
        }
      }
    }
    return query;
  };
}
function stringifySearchWith(stringify, parser) {
  const hasParser = typeof parser === "function";
  function stringifyValue(val) {
    if (typeof val === "object" && val !== null) {
      try {
        return stringify(val);
      } catch (_err) {
      }
    } else if (hasParser && typeof val === "string") {
      try {
        parser(val);
        return stringify(val);
      } catch (_err) {
      }
    }
    return val;
  }
  return (search) => {
    const searchStr = encode(search, stringifyValue);
    return searchStr ? `?${searchStr}` : "";
  };
}

// node_modules/@tanstack/router-core/dist/esm/root.js
var rootRouteId = "__root__";

// node_modules/@tanstack/router-core/dist/esm/redirect.js
function redirect(opts) {
  opts.statusCode = opts.statusCode || opts.code || 307;
  if (!opts.reloadDocument && typeof opts.href === "string") {
    try {
      new URL(opts.href);
      opts.reloadDocument = true;
    } catch {
    }
  }
  const headers = new Headers(opts.headers);
  if (opts.href && headers.get("Location") === null) {
    headers.set("Location", opts.href);
  }
  const response = new Response(null, {
    status: opts.statusCode,
    headers
  });
  response.options = opts;
  if (opts.throw) {
    throw response;
  }
  return response;
}
function isRedirect(obj) {
  return obj instanceof Response && !!obj.options;
}

// node_modules/@tanstack/router-core/dist/esm/lru-cache.js
function createLRUCache(max) {
  const cache = /* @__PURE__ */ new Map();
  let oldest;
  let newest;
  const touch = (entry) => {
    if (!entry.next) return;
    if (!entry.prev) {
      entry.next.prev = void 0;
      oldest = entry.next;
      entry.next = void 0;
      if (newest) {
        entry.prev = newest;
        newest.next = entry;
      }
    } else {
      entry.prev.next = entry.next;
      entry.next.prev = entry.prev;
      entry.next = void 0;
      if (newest) {
        newest.next = entry;
        entry.prev = newest;
      }
    }
    newest = entry;
  };
  return {
    get(key) {
      const entry = cache.get(key);
      if (!entry) return void 0;
      touch(entry);
      return entry.value;
    },
    set(key, value) {
      if (cache.size >= max && oldest) {
        const toDelete = oldest;
        cache.delete(toDelete.key);
        if (toDelete.next) {
          oldest = toDelete.next;
          toDelete.next.prev = void 0;
        }
        if (toDelete === newest) {
          newest = void 0;
        }
      }
      const existing = cache.get(key);
      if (existing) {
        existing.value = value;
        touch(existing);
      } else {
        const entry = { key, value, prev: newest };
        if (newest) newest.next = entry;
        newest = entry;
        if (!oldest) oldest = entry;
        cache.set(key, entry);
      }
    }
  };
}

// node_modules/@tanstack/router-core/dist/esm/load-matches.js
var triggerOnReady = (inner) => {
  if (!inner.rendered) {
    inner.rendered = true;
    return inner.onReady?.();
  }
};
var resolvePreload = (inner, matchId) => {
  return !!(inner.preload && !inner.router.state.matches.some((d) => d.id === matchId));
};
var _handleNotFound = (inner, err) => {
  const routeCursor = inner.router.routesById[err.routeId ?? ""] ?? inner.router.routeTree;
  if (!routeCursor.options.notFoundComponent && inner.router.options?.defaultNotFoundComponent) {
    routeCursor.options.notFoundComponent = inner.router.options.defaultNotFoundComponent;
  }
  invariant(
    routeCursor.options.notFoundComponent,
    "No notFoundComponent found. Please set a notFoundComponent on your route or provide a defaultNotFoundComponent to the router."
  );
  const matchForRoute = inner.matches.find((m) => m.routeId === routeCursor.id);
  invariant(matchForRoute, "Could not find match for route: " + routeCursor.id);
  inner.updateMatch(matchForRoute.id, (prev) => ({
    ...prev,
    status: "notFound",
    error: err,
    isFetching: false
  }));
  if (err.routerCode === "BEFORE_LOAD" && routeCursor.parentRoute) {
    err.routeId = routeCursor.parentRoute.id;
    _handleNotFound(inner, err);
  }
};
var handleRedirectAndNotFound = (inner, match, err) => {
  if (!isRedirect(err) && !isNotFound(err)) return;
  if (isRedirect(err) && err.redirectHandled && !err.options.reloadDocument) {
    throw err;
  }
  if (match) {
    match._nonReactive.beforeLoadPromise?.resolve();
    match._nonReactive.loaderPromise?.resolve();
    match._nonReactive.beforeLoadPromise = void 0;
    match._nonReactive.loaderPromise = void 0;
    const status = isRedirect(err) ? "redirected" : "notFound";
    inner.updateMatch(match.id, (prev) => ({
      ...prev,
      status,
      isFetching: false,
      error: err
    }));
    if (isNotFound(err) && !err.routeId) {
      err.routeId = match.routeId;
    }
    match._nonReactive.loadPromise?.resolve();
  }
  if (isRedirect(err)) {
    inner.rendered = true;
    err.options._fromLocation = inner.location;
    err.redirectHandled = true;
    err = inner.router.resolveRedirect(err);
    throw err;
  } else {
    _handleNotFound(inner, err);
    throw err;
  }
};
var shouldSkipLoader = (inner, matchId) => {
  const match = inner.router.getMatch(matchId);
  if (!inner.router.isServer && match._nonReactive.dehydrated) {
    return true;
  }
  if (inner.router.isServer && match.ssr === false) {
    return true;
  }
  return false;
};
var handleSerialError = (inner, index, err, routerCode) => {
  const { id: matchId, routeId } = inner.matches[index];
  const route = inner.router.looseRoutesById[routeId];
  if (err instanceof Promise) {
    throw err;
  }
  err.routerCode = routerCode;
  inner.firstBadMatchIndex ??= index;
  handleRedirectAndNotFound(inner, inner.router.getMatch(matchId), err);
  try {
    route.options.onError?.(err);
  } catch (errorHandlerErr) {
    err = errorHandlerErr;
    handleRedirectAndNotFound(inner, inner.router.getMatch(matchId), err);
  }
  inner.updateMatch(matchId, (prev) => {
    prev._nonReactive.beforeLoadPromise?.resolve();
    prev._nonReactive.beforeLoadPromise = void 0;
    prev._nonReactive.loadPromise?.resolve();
    return {
      ...prev,
      error: err,
      status: "error",
      isFetching: false,
      updatedAt: Date.now(),
      abortController: new AbortController()
    };
  });
};
var isBeforeLoadSsr = (inner, matchId, index, route) => {
  const existingMatch = inner.router.getMatch(matchId);
  const parentMatchId = inner.matches[index - 1]?.id;
  const parentMatch = parentMatchId ? inner.router.getMatch(parentMatchId) : void 0;
  if (inner.router.isShell()) {
    existingMatch.ssr = matchId === rootRouteId;
    return;
  }
  if (parentMatch?.ssr === false) {
    existingMatch.ssr = false;
    return;
  }
  const parentOverride = (tempSsr2) => {
    if (tempSsr2 === true && parentMatch?.ssr === "data-only") {
      return "data-only";
    }
    return tempSsr2;
  };
  const defaultSsr = inner.router.options.defaultSsr ?? true;
  if (route.options.ssr === void 0) {
    existingMatch.ssr = parentOverride(defaultSsr);
    return;
  }
  if (typeof route.options.ssr !== "function") {
    existingMatch.ssr = parentOverride(route.options.ssr);
    return;
  }
  const { search, params } = existingMatch;
  const ssrFnContext = {
    search: makeMaybe(search, existingMatch.searchError),
    params: makeMaybe(params, existingMatch.paramsError),
    location: inner.location,
    matches: inner.matches.map((match) => ({
      index: match.index,
      pathname: match.pathname,
      fullPath: match.fullPath,
      staticData: match.staticData,
      id: match.id,
      routeId: match.routeId,
      search: makeMaybe(match.search, match.searchError),
      params: makeMaybe(match.params, match.paramsError),
      ssr: match.ssr
    }))
  };
  const tempSsr = route.options.ssr(ssrFnContext);
  if (isPromise(tempSsr)) {
    return tempSsr.then((ssr) => {
      existingMatch.ssr = parentOverride(ssr ?? defaultSsr);
    });
  }
  existingMatch.ssr = parentOverride(tempSsr ?? defaultSsr);
  return;
};
var setupPendingTimeout = (inner, matchId, route, match) => {
  if (match._nonReactive.pendingTimeout !== void 0) return;
  const pendingMs = route.options.pendingMs ?? inner.router.options.defaultPendingMs;
  const shouldPending = !!(inner.onReady && !inner.router.isServer && !resolvePreload(inner, matchId) && (route.options.loader || route.options.beforeLoad || routeNeedsPreload(route)) && typeof pendingMs === "number" && pendingMs !== Infinity && (route.options.pendingComponent ?? inner.router.options?.defaultPendingComponent));
  if (shouldPending) {
    const pendingTimeout = setTimeout(() => {
      triggerOnReady(inner);
    }, pendingMs);
    match._nonReactive.pendingTimeout = pendingTimeout;
  }
};
var preBeforeLoadSetup = (inner, matchId, route) => {
  const existingMatch = inner.router.getMatch(matchId);
  if (!existingMatch._nonReactive.beforeLoadPromise && !existingMatch._nonReactive.loaderPromise)
    return;
  setupPendingTimeout(inner, matchId, route, existingMatch);
  const then = () => {
    const match = inner.router.getMatch(matchId);
    if (match.preload && (match.status === "redirected" || match.status === "notFound")) {
      handleRedirectAndNotFound(inner, match, match.error);
    }
  };
  return existingMatch._nonReactive.beforeLoadPromise ? existingMatch._nonReactive.beforeLoadPromise.then(then) : then();
};
var executeBeforeLoad = (inner, matchId, index, route) => {
  const match = inner.router.getMatch(matchId);
  const prevLoadPromise = match._nonReactive.loadPromise;
  match._nonReactive.loadPromise = createControlledPromise(() => {
    prevLoadPromise?.resolve();
  });
  const { paramsError, searchError } = match;
  if (paramsError) {
    handleSerialError(inner, index, paramsError, "PARSE_PARAMS");
  }
  if (searchError) {
    handleSerialError(inner, index, searchError, "VALIDATE_SEARCH");
  }
  setupPendingTimeout(inner, matchId, route, match);
  const abortController = new AbortController();
  const parentMatchId = inner.matches[index - 1]?.id;
  const parentMatch = parentMatchId ? inner.router.getMatch(parentMatchId) : void 0;
  const parentMatchContext = parentMatch?.context ?? inner.router.options.context ?? void 0;
  const context = { ...parentMatchContext, ...match.__routeContext };
  let isPending = false;
  const pending = () => {
    if (isPending) return;
    isPending = true;
    inner.updateMatch(matchId, (prev) => ({
      ...prev,
      isFetching: "beforeLoad",
      fetchCount: prev.fetchCount + 1,
      abortController,
      context
    }));
  };
  const resolve = () => {
    match._nonReactive.beforeLoadPromise?.resolve();
    match._nonReactive.beforeLoadPromise = void 0;
    inner.updateMatch(matchId, (prev) => ({
      ...prev,
      isFetching: false
    }));
  };
  if (!route.options.beforeLoad) {
    batch(() => {
      pending();
      resolve();
    });
    return;
  }
  match._nonReactive.beforeLoadPromise = createControlledPromise();
  const { search, params, cause } = match;
  const preload = resolvePreload(inner, matchId);
  const beforeLoadFnContext = {
    search,
    abortController,
    params,
    preload,
    context,
    location: inner.location,
    navigate: (opts) => inner.router.navigate({
      ...opts,
      _fromLocation: inner.location
    }),
    buildLocation: inner.router.buildLocation,
    cause: preload ? "preload" : cause,
    matches: inner.matches,
    ...inner.router.options.additionalContext
  };
  const updateContext = (beforeLoadContext2) => {
    if (beforeLoadContext2 === void 0) {
      batch(() => {
        pending();
        resolve();
      });
      return;
    }
    if (isRedirect(beforeLoadContext2) || isNotFound(beforeLoadContext2)) {
      pending();
      handleSerialError(inner, index, beforeLoadContext2, "BEFORE_LOAD");
    }
    batch(() => {
      pending();
      inner.updateMatch(matchId, (prev) => ({
        ...prev,
        __beforeLoadContext: beforeLoadContext2,
        context: {
          ...prev.context,
          ...beforeLoadContext2
        }
      }));
      resolve();
    });
  };
  let beforeLoadContext;
  try {
    beforeLoadContext = route.options.beforeLoad(beforeLoadFnContext);
    if (isPromise(beforeLoadContext)) {
      pending();
      return beforeLoadContext.catch((err) => {
        handleSerialError(inner, index, err, "BEFORE_LOAD");
      }).then(updateContext);
    }
  } catch (err) {
    pending();
    handleSerialError(inner, index, err, "BEFORE_LOAD");
  }
  updateContext(beforeLoadContext);
  return;
};
var handleBeforeLoad = (inner, index) => {
  const { id: matchId, routeId } = inner.matches[index];
  const route = inner.router.looseRoutesById[routeId];
  const serverSsr = () => {
    if (inner.router.isServer) {
      const maybePromise = isBeforeLoadSsr(inner, matchId, index, route);
      if (isPromise(maybePromise)) return maybePromise.then(queueExecution);
    }
    return queueExecution();
  };
  const execute = () => executeBeforeLoad(inner, matchId, index, route);
  const queueExecution = () => {
    if (shouldSkipLoader(inner, matchId)) return;
    const result = preBeforeLoadSetup(inner, matchId, route);
    return isPromise(result) ? result.then(execute) : execute();
  };
  return serverSsr();
};
var executeHead = (inner, matchId, route) => {
  const match = inner.router.getMatch(matchId);
  if (!match) {
    return;
  }
  if (!route.options.head && !route.options.scripts && !route.options.headers) {
    return;
  }
  const assetContext = {
    matches: inner.matches,
    match,
    params: match.params,
    loaderData: match.loaderData
  };
  return Promise.all([
    route.options.head?.(assetContext),
    route.options.scripts?.(assetContext),
    route.options.headers?.(assetContext)
  ]).then(([headFnContent, scripts, headers]) => {
    const meta = headFnContent?.meta;
    const links = headFnContent?.links;
    const headScripts = headFnContent?.scripts;
    const styles = headFnContent?.styles;
    return {
      meta,
      links,
      headScripts,
      headers,
      scripts,
      styles
    };
  });
};
var getLoaderContext = (inner, matchId, index, route) => {
  const parentMatchPromise = inner.matchPromises[index - 1];
  const { params, loaderDeps, abortController, context, cause } = inner.router.getMatch(matchId);
  const preload = resolvePreload(inner, matchId);
  return {
    params,
    deps: loaderDeps,
    preload: !!preload,
    parentMatchPromise,
    abortController,
    context,
    location: inner.location,
    navigate: (opts) => inner.router.navigate({
      ...opts,
      _fromLocation: inner.location
    }),
    cause: preload ? "preload" : cause,
    route,
    ...inner.router.options.additionalContext
  };
};
var runLoader = async (inner, matchId, index, route) => {
  try {
    const match = inner.router.getMatch(matchId);
    try {
      if (!inner.router.isServer || match.ssr === true) {
        loadRouteChunk(route);
      }
      const loaderResult = route.options.loader?.(
        getLoaderContext(inner, matchId, index, route)
      );
      const loaderResultIsPromise = route.options.loader && isPromise(loaderResult);
      const willLoadSomething = !!(loaderResultIsPromise || route._lazyPromise || route._componentsPromise || route.options.head || route.options.scripts || route.options.headers || match._nonReactive.minPendingPromise);
      if (willLoadSomething) {
        inner.updateMatch(matchId, (prev) => ({
          ...prev,
          isFetching: "loader"
        }));
      }
      if (route.options.loader) {
        const loaderData = loaderResultIsPromise ? await loaderResult : loaderResult;
        handleRedirectAndNotFound(
          inner,
          inner.router.getMatch(matchId),
          loaderData
        );
        if (loaderData !== void 0) {
          inner.updateMatch(matchId, (prev) => ({
            ...prev,
            loaderData
          }));
        }
      }
      if (route._lazyPromise) await route._lazyPromise;
      const headResult = executeHead(inner, matchId, route);
      const head = headResult ? await headResult : void 0;
      const pendingPromise = match._nonReactive.minPendingPromise;
      if (pendingPromise) await pendingPromise;
      if (route._componentsPromise) await route._componentsPromise;
      inner.updateMatch(matchId, (prev) => ({
        ...prev,
        error: void 0,
        status: "success",
        isFetching: false,
        updatedAt: Date.now(),
        ...head
      }));
    } catch (e) {
      let error = e;
      const pendingPromise = match._nonReactive.minPendingPromise;
      if (pendingPromise) await pendingPromise;
      if (isNotFound(e)) {
        await route.options.notFoundComponent?.preload?.();
      }
      handleRedirectAndNotFound(inner, inner.router.getMatch(matchId), e);
      try {
        route.options.onError?.(e);
      } catch (onErrorError) {
        error = onErrorError;
        handleRedirectAndNotFound(
          inner,
          inner.router.getMatch(matchId),
          onErrorError
        );
      }
      const headResult = executeHead(inner, matchId, route);
      const head = headResult ? await headResult : void 0;
      inner.updateMatch(matchId, (prev) => ({
        ...prev,
        error,
        status: "error",
        isFetching: false,
        ...head
      }));
    }
  } catch (err) {
    const match = inner.router.getMatch(matchId);
    if (match) {
      const headResult = executeHead(inner, matchId, route);
      if (headResult) {
        const head = await headResult;
        inner.updateMatch(matchId, (prev) => ({
          ...prev,
          ...head
        }));
      }
      match._nonReactive.loaderPromise = void 0;
    }
    handleRedirectAndNotFound(inner, match, err);
  }
};
var loadRouteMatch = async (inner, index) => {
  const { id: matchId, routeId } = inner.matches[index];
  let loaderShouldRunAsync = false;
  let loaderIsRunningAsync = false;
  const route = inner.router.looseRoutesById[routeId];
  if (shouldSkipLoader(inner, matchId)) {
    if (inner.router.isServer) {
      const headResult = executeHead(inner, matchId, route);
      if (headResult) {
        const head = await headResult;
        inner.updateMatch(matchId, (prev) => ({
          ...prev,
          ...head
        }));
      }
      return inner.router.getMatch(matchId);
    }
  } else {
    const prevMatch = inner.router.getMatch(matchId);
    if (prevMatch._nonReactive.loaderPromise) {
      if (prevMatch.status === "success" && !inner.sync && !prevMatch.preload) {
        return prevMatch;
      }
      await prevMatch._nonReactive.loaderPromise;
      const match2 = inner.router.getMatch(matchId);
      if (match2.error) {
        handleRedirectAndNotFound(inner, match2, match2.error);
      }
    } else {
      const age = Date.now() - prevMatch.updatedAt;
      const preload = resolvePreload(inner, matchId);
      const staleAge = preload ? route.options.preloadStaleTime ?? inner.router.options.defaultPreloadStaleTime ?? 3e4 : route.options.staleTime ?? inner.router.options.defaultStaleTime ?? 0;
      const shouldReloadOption = route.options.shouldReload;
      const shouldReload = typeof shouldReloadOption === "function" ? shouldReloadOption(getLoaderContext(inner, matchId, index, route)) : shouldReloadOption;
      const nextPreload = !!preload && !inner.router.state.matches.some((d) => d.id === matchId);
      const match2 = inner.router.getMatch(matchId);
      match2._nonReactive.loaderPromise = createControlledPromise();
      if (nextPreload !== match2.preload) {
        inner.updateMatch(matchId, (prev) => ({
          ...prev,
          preload: nextPreload
        }));
      }
      const { status, invalid } = match2;
      loaderShouldRunAsync = status === "success" && (invalid || (shouldReload ?? age > staleAge));
      if (preload && route.options.preload === false) ;
      else if (loaderShouldRunAsync && !inner.sync) {
        loaderIsRunningAsync = true;
        (async () => {
          try {
            await runLoader(inner, matchId, index, route);
            const match3 = inner.router.getMatch(matchId);
            match3._nonReactive.loaderPromise?.resolve();
            match3._nonReactive.loadPromise?.resolve();
            match3._nonReactive.loaderPromise = void 0;
          } catch (err) {
            if (isRedirect(err)) {
              await inner.router.navigate(err.options);
            }
          }
        })();
      } else if (status !== "success" || loaderShouldRunAsync && inner.sync) {
        await runLoader(inner, matchId, index, route);
      } else {
        const headResult = executeHead(inner, matchId, route);
        if (headResult) {
          const head = await headResult;
          inner.updateMatch(matchId, (prev) => ({
            ...prev,
            ...head
          }));
        }
      }
    }
  }
  const match = inner.router.getMatch(matchId);
  if (!loaderIsRunningAsync) {
    match._nonReactive.loaderPromise?.resolve();
    match._nonReactive.loadPromise?.resolve();
  }
  clearTimeout(match._nonReactive.pendingTimeout);
  match._nonReactive.pendingTimeout = void 0;
  if (!loaderIsRunningAsync) match._nonReactive.loaderPromise = void 0;
  match._nonReactive.dehydrated = void 0;
  const nextIsFetching = loaderIsRunningAsync ? match.isFetching : false;
  if (nextIsFetching !== match.isFetching || match.invalid !== false) {
    inner.updateMatch(matchId, (prev) => ({
      ...prev,
      isFetching: nextIsFetching,
      invalid: false
    }));
    return inner.router.getMatch(matchId);
  } else {
    return match;
  }
};
async function loadMatches(arg) {
  const inner = Object.assign(arg, {
    matchPromises: []
  });
  if (!inner.router.isServer && inner.router.state.matches.some((d) => d._forcePending)) {
    triggerOnReady(inner);
  }
  try {
    for (let i = 0; i < inner.matches.length; i++) {
      const beforeLoad = handleBeforeLoad(inner, i);
      if (isPromise(beforeLoad)) await beforeLoad;
    }
    const max = inner.firstBadMatchIndex ?? inner.matches.length;
    for (let i = 0; i < max; i++) {
      inner.matchPromises.push(loadRouteMatch(inner, i));
    }
    await Promise.all(inner.matchPromises);
    const readyPromise = triggerOnReady(inner);
    if (isPromise(readyPromise)) await readyPromise;
  } catch (err) {
    if (isNotFound(err) && !inner.preload) {
      const readyPromise = triggerOnReady(inner);
      if (isPromise(readyPromise)) await readyPromise;
      throw err;
    }
    if (isRedirect(err)) {
      throw err;
    }
  }
  return inner.matches;
}
async function loadRouteChunk(route) {
  if (!route._lazyLoaded && route._lazyPromise === void 0) {
    if (route.lazyFn) {
      route._lazyPromise = route.lazyFn().then((lazyRoute) => {
        const { id: _id, ...options } = lazyRoute.options;
        Object.assign(route.options, options);
        route._lazyLoaded = true;
        route._lazyPromise = void 0;
      });
    } else {
      route._lazyLoaded = true;
    }
  }
  if (!route._componentsLoaded && route._componentsPromise === void 0) {
    const loadComponents = () => {
      const preloads = [];
      for (const type of componentTypes) {
        const preload = route.options[type]?.preload;
        if (preload) preloads.push(preload());
      }
      if (preloads.length)
        return Promise.all(preloads).then(() => {
          route._componentsLoaded = true;
          route._componentsPromise = void 0;
        });
      route._componentsLoaded = true;
      route._componentsPromise = void 0;
      return;
    };
    route._componentsPromise = route._lazyPromise ? route._lazyPromise.then(loadComponents) : loadComponents();
  }
  return route._componentsPromise;
}
function makeMaybe(value, error) {
  if (error) {
    return { status: "error", error };
  }
  return { status: "success", value };
}
function routeNeedsPreload(route) {
  for (const componentType of componentTypes) {
    if (route.options[componentType]?.preload) {
      return true;
    }
  }
  return false;
}
var componentTypes = [
  "component",
  "errorComponent",
  "pendingComponent",
  "notFoundComponent"
];

// node_modules/@tanstack/router-core/dist/esm/rewrite.js
function composeRewrites(rewrites) {
  return {
    input: ({ url }) => {
      for (const rewrite of rewrites) {
        url = executeRewriteInput(rewrite, url);
      }
      return url;
    },
    output: ({ url }) => {
      for (let i = rewrites.length - 1; i >= 0; i--) {
        url = executeRewriteOutput(rewrites[i], url);
      }
      return url;
    }
  };
}
function rewriteBasepath(opts) {
  const trimmedBasepath = trimPath(opts.basepath);
  const normalizedBasepath = `/${trimmedBasepath}`;
  const normalizedBasepathWithSlash = `${normalizedBasepath}/`;
  const checkBasepath = opts.caseSensitive ? normalizedBasepath : normalizedBasepath.toLowerCase();
  const checkBasepathWithSlash = opts.caseSensitive ? normalizedBasepathWithSlash : normalizedBasepathWithSlash.toLowerCase();
  return {
    input: ({ url }) => {
      const pathname = opts.caseSensitive ? url.pathname : url.pathname.toLowerCase();
      if (pathname === checkBasepath) {
        url.pathname = "/";
      } else if (pathname.startsWith(checkBasepathWithSlash)) {
        url.pathname = url.pathname.slice(normalizedBasepath.length);
      }
      return url;
    },
    output: ({ url }) => {
      url.pathname = joinPaths(["/", trimmedBasepath, url.pathname]);
      return url;
    }
  };
}
function executeRewriteInput(rewrite, url) {
  const res = rewrite?.input?.({ url });
  if (res) {
    if (typeof res === "string") {
      return new URL(res);
    } else if (res instanceof URL) {
      return res;
    }
  }
  return url;
}
function executeRewriteOutput(rewrite, url) {
  const res = rewrite?.output?.({ url });
  if (res) {
    if (typeof res === "string") {
      return new URL(res);
    } else if (res instanceof URL) {
      return res;
    }
  }
  return url;
}

// node_modules/@tanstack/router-core/dist/esm/router.js
function getLocationChangeInfo(routerState) {
  const fromLocation = routerState.resolvedLocation;
  const toLocation = routerState.location;
  const pathChanged = fromLocation?.pathname !== toLocation.pathname;
  const hrefChanged = fromLocation?.href !== toLocation.href;
  const hashChanged = fromLocation?.hash !== toLocation.hash;
  return { fromLocation, toLocation, pathChanged, hrefChanged, hashChanged };
}
var RouterCore = class {
  /**
   * @deprecated Use the `createRouter` function instead
   */
  constructor(options) {
    this.tempLocationKey = `${Math.round(
      Math.random() * 1e7
    )}`;
    this.resetNextScroll = true;
    this.shouldViewTransition = void 0;
    this.isViewTransitionTypesSupported = void 0;
    this.subscribers = /* @__PURE__ */ new Set();
    this.isScrollRestoring = false;
    this.isScrollRestorationSetup = false;
    this.startTransition = (fn) => fn();
    this.update = (newOptions) => {
      if (newOptions.notFoundRoute) {
        console.warn(
          "The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info."
        );
      }
      const prevOptions = this.options;
      const prevBasepath = this.basepath ?? prevOptions?.basepath ?? "/";
      const basepathWasUnset = this.basepath === void 0;
      const prevRewriteOption = prevOptions?.rewrite;
      this.options = {
        ...prevOptions,
        ...newOptions
      };
      this.isServer = this.options.isServer ?? typeof document === "undefined";
      this.pathParamsDecodeCharMap = this.options.pathParamsAllowedCharacters ? new Map(
        this.options.pathParamsAllowedCharacters.map((char) => [
          encodeURIComponent(char),
          char
        ])
      ) : void 0;
      if (!this.history || this.options.history && this.options.history !== this.history) {
        if (!this.options.history) {
          if (!this.isServer) {
            this.history = createBrowserHistory();
          }
        } else {
          this.history = this.options.history;
        }
      }
      this.origin = this.options.origin;
      if (!this.origin) {
        if (!this.isServer && window?.origin && window.origin !== "null") {
          this.origin = window.origin;
        } else {
          this.origin = "http://localhost";
        }
      }
      if (this.history) {
        this.updateLatestLocation();
      }
      if (this.options.routeTree !== this.routeTree) {
        this.routeTree = this.options.routeTree;
        this.buildRouteTree();
      }
      if (!this.__store && this.latestLocation) {
        this.__store = new Store(getInitialRouterState(this.latestLocation), {
          onUpdate: () => {
            this.__store.state = {
              ...this.state,
              cachedMatches: this.state.cachedMatches.filter(
                (d) => !["redirected"].includes(d.status)
              )
            };
          }
        });
        setupScrollRestoration(this);
      }
      let needsLocationUpdate = false;
      const nextBasepath = this.options.basepath ?? "/";
      const nextRewriteOption = this.options.rewrite;
      const basepathChanged = basepathWasUnset || prevBasepath !== nextBasepath;
      const rewriteChanged = prevRewriteOption !== nextRewriteOption;
      if (basepathChanged || rewriteChanged) {
        this.basepath = nextBasepath;
        const rewrites = [];
        if (trimPath(nextBasepath) !== "") {
          rewrites.push(
            rewriteBasepath({
              basepath: nextBasepath
            })
          );
        }
        if (nextRewriteOption) {
          rewrites.push(nextRewriteOption);
        }
        this.rewrite = rewrites.length === 0 ? void 0 : rewrites.length === 1 ? rewrites[0] : composeRewrites(rewrites);
        if (this.history) {
          this.updateLatestLocation();
        }
        needsLocationUpdate = true;
      }
      if (needsLocationUpdate && this.__store) {
        this.__store.state = {
          ...this.state,
          location: this.latestLocation
        };
      }
      if (typeof window !== "undefined" && "CSS" in window && typeof window.CSS?.supports === "function") {
        this.isViewTransitionTypesSupported = window.CSS.supports(
          "selector(:active-view-transition-type(a)"
        );
      }
    };
    this.updateLatestLocation = () => {
      this.latestLocation = this.parseLocation(
        this.history.location,
        this.latestLocation
      );
    };
    this.buildRouteTree = () => {
      const { routesById, routesByPath, flatRoutes } = processRouteTree({
        routeTree: this.routeTree,
        initRoute: (route, i) => {
          route.init({
            originalIndex: i
          });
        }
      });
      this.routesById = routesById;
      this.routesByPath = routesByPath;
      this.flatRoutes = flatRoutes;
      const notFoundRoute = this.options.notFoundRoute;
      if (notFoundRoute) {
        notFoundRoute.init({
          originalIndex: 99999999999
        });
        this.routesById[notFoundRoute.id] = notFoundRoute;
      }
    };
    this.subscribe = (eventType, fn) => {
      const listener = {
        eventType,
        fn
      };
      this.subscribers.add(listener);
      return () => {
        this.subscribers.delete(listener);
      };
    };
    this.emit = (routerEvent) => {
      this.subscribers.forEach((listener) => {
        if (listener.eventType === routerEvent.type) {
          listener.fn(routerEvent);
        }
      });
    };
    this.parseLocation = (locationToParse, previousLocation) => {
      const parse = ({
        href,
        state
      }) => {
        const fullUrl = new URL(href, this.origin);
        const url = executeRewriteInput(this.rewrite, fullUrl);
        const parsedSearch = this.options.parseSearch(url.search);
        const searchStr = this.options.stringifySearch(parsedSearch);
        url.search = searchStr;
        const fullPath = url.href.replace(url.origin, "");
        const { pathname, hash } = url;
        return {
          href: fullPath,
          publicHref: href,
          url: url.href,
          pathname,
          searchStr,
          search: replaceEqualDeep(previousLocation?.search, parsedSearch),
          hash: hash.split("#").reverse()[0] ?? "",
          state: replaceEqualDeep(previousLocation?.state, state)
        };
      };
      const location = parse(locationToParse);
      const { __tempLocation, __tempKey } = location.state;
      if (__tempLocation && (!__tempKey || __tempKey === this.tempLocationKey)) {
        const parsedTempLocation = parse(__tempLocation);
        parsedTempLocation.state.key = location.state.key;
        parsedTempLocation.state.__TSR_key = location.state.__TSR_key;
        delete parsedTempLocation.state.__tempLocation;
        return {
          ...parsedTempLocation,
          maskedLocation: location
        };
      }
      return location;
    };
    this.resolvePathWithBase = (from, path) => {
      const resolvedPath = resolvePath({
        base: from,
        to: cleanPath(path),
        trailingSlash: this.options.trailingSlash,
        parseCache: this.parsePathnameCache
      });
      return resolvedPath;
    };
    this.matchRoutes = (pathnameOrNext, locationSearchOrOpts, opts) => {
      if (typeof pathnameOrNext === "string") {
        return this.matchRoutesInternal(
          {
            pathname: pathnameOrNext,
            search: locationSearchOrOpts
          },
          opts
        );
      }
      return this.matchRoutesInternal(pathnameOrNext, locationSearchOrOpts);
    };
    this.parsePathnameCache = createLRUCache(1e3);
    this.getMatchedRoutes = (pathname, routePathname) => {
      return getMatchedRoutes({
        pathname,
        routePathname,
        caseSensitive: this.options.caseSensitive,
        routesByPath: this.routesByPath,
        routesById: this.routesById,
        flatRoutes: this.flatRoutes,
        parseCache: this.parsePathnameCache
      });
    };
    this.cancelMatch = (id) => {
      const match = this.getMatch(id);
      if (!match) return;
      match.abortController.abort();
      clearTimeout(match._nonReactive.pendingTimeout);
      match._nonReactive.pendingTimeout = void 0;
    };
    this.cancelMatches = () => {
      this.state.pendingMatches?.forEach((match) => {
        this.cancelMatch(match.id);
      });
    };
    this.buildLocation = (opts) => {
      const build = (dest = {}) => {
        const currentLocation = dest._fromLocation || this.latestLocation;
        const allCurrentLocationMatches = this.matchRoutes(currentLocation, {
          _buildLocation: true
        });
        const lastMatch = last(allCurrentLocationMatches);
        if (dest.from && true && dest._isNavigate) {
          const allFromMatches = this.getMatchedRoutes(
            dest.from,
            void 0
          ).matchedRoutes;
          const matchedFrom = findLast(allCurrentLocationMatches, (d) => {
            return comparePaths(d.fullPath, dest.from);
          });
          const matchedCurrent = findLast(allFromMatches, (d) => {
            return comparePaths(d.fullPath, lastMatch.fullPath);
          });
          if (!matchedFrom && !matchedCurrent) {
            console.warn(`Could not find match for from: ${dest.from}`);
          }
        }
        const defaultedFromPath = dest.unsafeRelative === "path" ? currentLocation.pathname : dest.from ?? lastMatch.fullPath;
        const fromPath = this.resolvePathWithBase(defaultedFromPath, ".");
        const fromSearch = lastMatch.search;
        const fromParams = { ...lastMatch.params };
        const nextTo = dest.to ? this.resolvePathWithBase(fromPath, `${dest.to}`) : this.resolvePathWithBase(fromPath, ".");
        const nextParams = dest.params === false || dest.params === null ? {} : (dest.params ?? true) === true ? fromParams : Object.assign(
          fromParams,
          functionalUpdate(dest.params, fromParams)
        );
        const interpolatedNextTo = interpolatePath({
          path: nextTo,
          params: nextParams,
          parseCache: this.parsePathnameCache
        }).interpolatedPath;
        const destRoutes = this.matchRoutes(interpolatedNextTo, void 0, {
          _buildLocation: true
        }).map((d) => this.looseRoutesById[d.routeId]);
        if (Object.keys(nextParams).length > 0) {
          for (const route of destRoutes) {
            const fn = route.options.params?.stringify ?? route.options.stringifyParams;
            if (fn) {
              Object.assign(nextParams, fn(nextParams));
            }
          }
        }
        const nextPathname = decodePathSegment(
          interpolatePath({
            // Use the original template path for interpolation
            // This preserves the original parameter syntax including optional parameters
            path: nextTo,
            params: nextParams,
            leaveWildcards: false,
            leaveParams: opts.leaveParams,
            decodeCharMap: this.pathParamsDecodeCharMap,
            parseCache: this.parsePathnameCache
          }).interpolatedPath
        );
        let nextSearch = fromSearch;
        if (opts._includeValidateSearch && this.options.search?.strict) {
          const validatedSearch = {};
          destRoutes.forEach((route) => {
            if (route.options.validateSearch) {
              try {
                Object.assign(
                  validatedSearch,
                  validateSearch(route.options.validateSearch, {
                    ...validatedSearch,
                    ...nextSearch
                  })
                );
              } catch {
              }
            }
          });
          nextSearch = validatedSearch;
        }
        nextSearch = applySearchMiddleware({
          search: nextSearch,
          dest,
          destRoutes,
          _includeValidateSearch: opts._includeValidateSearch
        });
        nextSearch = replaceEqualDeep(fromSearch, nextSearch);
        const searchStr = this.options.stringifySearch(nextSearch);
        const hash = dest.hash === true ? currentLocation.hash : dest.hash ? functionalUpdate(dest.hash, currentLocation.hash) : void 0;
        const hashStr = hash ? `#${hash}` : "";
        let nextState = dest.state === true ? currentLocation.state : dest.state ? functionalUpdate(dest.state, currentLocation.state) : {};
        nextState = replaceEqualDeep(currentLocation.state, nextState);
        const fullPath = `${nextPathname}${searchStr}${hashStr}`;
        const url = new URL(fullPath, this.origin);
        const rewrittenUrl = executeRewriteOutput(this.rewrite, url);
        return {
          publicHref: rewrittenUrl.pathname + rewrittenUrl.search + rewrittenUrl.hash,
          href: fullPath,
          url: rewrittenUrl.href,
          pathname: nextPathname,
          search: nextSearch,
          searchStr,
          state: nextState,
          hash: hash ?? "",
          unmaskOnReload: dest.unmaskOnReload
        };
      };
      const buildWithMatches = (dest = {}, maskedDest) => {
        const next = build(dest);
        let maskedNext = maskedDest ? build(maskedDest) : void 0;
        if (!maskedNext) {
          let params = {};
          const foundMask = this.options.routeMasks?.find((d) => {
            const match = matchPathname(
              next.pathname,
              {
                to: d.from,
                caseSensitive: false,
                fuzzy: false
              },
              this.parsePathnameCache
            );
            if (match) {
              params = match;
              return true;
            }
            return false;
          });
          if (foundMask) {
            const { from: _from, ...maskProps } = foundMask;
            maskedDest = {
              from: opts.from,
              ...maskProps,
              params
            };
            maskedNext = build(maskedDest);
          }
        }
        if (maskedNext) {
          next.maskedLocation = maskedNext;
        }
        return next;
      };
      if (opts.mask) {
        return buildWithMatches(opts, {
          from: opts.from,
          ...opts.mask
        });
      }
      return buildWithMatches(opts);
    };
    this.commitLocation = ({
      viewTransition,
      ignoreBlocker,
      ...next
    }) => {
      const isSameState = () => {
        const ignoredProps = [
          "key",
          // TODO: Remove in v2 - use __TSR_key instead
          "__TSR_key",
          "__TSR_index",
          "__hashScrollIntoViewOptions"
        ];
        ignoredProps.forEach((prop) => {
          next.state[prop] = this.latestLocation.state[prop];
        });
        const isEqual = deepEqual(next.state, this.latestLocation.state);
        ignoredProps.forEach((prop) => {
          delete next.state[prop];
        });
        return isEqual;
      };
      const isSameUrl = trimPathRight(this.latestLocation.href) === trimPathRight(next.href);
      const previousCommitPromise = this.commitLocationPromise;
      this.commitLocationPromise = createControlledPromise(() => {
        previousCommitPromise?.resolve();
      });
      if (isSameUrl && isSameState()) {
        this.load();
      } else {
        let { maskedLocation, hashScrollIntoView, ...nextHistory } = next;
        if (maskedLocation) {
          nextHistory = {
            ...maskedLocation,
            state: {
              ...maskedLocation.state,
              __tempKey: void 0,
              __tempLocation: {
                ...nextHistory,
                search: nextHistory.searchStr,
                state: {
                  ...nextHistory.state,
                  __tempKey: void 0,
                  __tempLocation: void 0,
                  __TSR_key: void 0,
                  key: void 0
                  // TODO: Remove in v2 - use __TSR_key instead
                }
              }
            }
          };
          if (nextHistory.unmaskOnReload ?? this.options.unmaskOnReload ?? false) {
            nextHistory.state.__tempKey = this.tempLocationKey;
          }
        }
        nextHistory.state.__hashScrollIntoViewOptions = hashScrollIntoView ?? this.options.defaultHashScrollIntoView ?? true;
        this.shouldViewTransition = viewTransition;
        this.history[next.replace ? "replace" : "push"](
          nextHistory.publicHref,
          nextHistory.state,
          { ignoreBlocker }
        );
      }
      this.resetNextScroll = next.resetScroll ?? true;
      if (!this.history.subscribers.size) {
        this.load();
      }
      return this.commitLocationPromise;
    };
    this.buildAndCommitLocation = ({
      replace,
      resetScroll,
      hashScrollIntoView,
      viewTransition,
      ignoreBlocker,
      href,
      ...rest
    } = {}) => {
      if (href) {
        const currentIndex = this.history.location.state.__TSR_index;
        const parsed = parseHref(href, {
          __TSR_index: replace ? currentIndex : currentIndex + 1
        });
        rest.to = parsed.pathname;
        rest.search = this.options.parseSearch(parsed.search);
        rest.hash = parsed.hash.slice(1);
      }
      const location = this.buildLocation({
        ...rest,
        _includeValidateSearch: true
      });
      return this.commitLocation({
        ...location,
        viewTransition,
        replace,
        resetScroll,
        hashScrollIntoView,
        ignoreBlocker
      });
    };
    this.navigate = ({ to, reloadDocument, href, ...rest }) => {
      if (!reloadDocument && href) {
        try {
          new URL(`${href}`);
          reloadDocument = true;
        } catch {
        }
      }
      if (reloadDocument) {
        if (!href) {
          const location = this.buildLocation({ to, ...rest });
          href = location.url;
        }
        if (rest.replace) {
          window.location.replace(href);
        } else {
          window.location.href = href;
        }
        return Promise.resolve();
      }
      return this.buildAndCommitLocation({
        ...rest,
        href,
        to,
        _isNavigate: true
      });
    };
    this.beforeLoad = () => {
      this.cancelMatches();
      this.updateLatestLocation();
      if (this.isServer) {
        const nextLocation = this.buildLocation({
          to: this.latestLocation.pathname,
          search: true,
          params: true,
          hash: true,
          state: true,
          _includeValidateSearch: true
        });
        const normalizeUrl = (url) => {
          try {
            return encodeURI(decodeURI(url));
          } catch {
            return url;
          }
        };
        if (trimPath(normalizeUrl(this.latestLocation.href)) !== trimPath(normalizeUrl(nextLocation.href))) {
          let href = nextLocation.url;
          if (this.origin && href.startsWith(this.origin)) {
            href = href.replace(this.origin, "") || "/";
          }
          throw redirect({ href });
        }
      }
      const pendingMatches = this.matchRoutes(this.latestLocation);
      this.__store.setState((s) => ({
        ...s,
        status: "pending",
        statusCode: 200,
        isLoading: true,
        location: this.latestLocation,
        pendingMatches,
        // If a cached moved to pendingMatches, remove it from cachedMatches
        cachedMatches: s.cachedMatches.filter(
          (d) => !pendingMatches.some((e) => e.id === d.id)
        )
      }));
    };
    this.load = async (opts) => {
      let redirect2;
      let notFound2;
      let loadPromise;
      loadPromise = new Promise((resolve) => {
        this.startTransition(async () => {
          try {
            this.beforeLoad();
            const next = this.latestLocation;
            const prevLocation = this.state.resolvedLocation;
            if (!this.state.redirect) {
              this.emit({
                type: "onBeforeNavigate",
                ...getLocationChangeInfo({
                  resolvedLocation: prevLocation,
                  location: next
                })
              });
            }
            this.emit({
              type: "onBeforeLoad",
              ...getLocationChangeInfo({
                resolvedLocation: prevLocation,
                location: next
              })
            });
            await loadMatches({
              router: this,
              sync: opts?.sync,
              matches: this.state.pendingMatches,
              location: next,
              updateMatch: this.updateMatch,
              // eslint-disable-next-line @typescript-eslint/require-await
              onReady: async () => {
                this.startViewTransition(async () => {
                  let exitingMatches;
                  let enteringMatches;
                  let stayingMatches;
                  batch(() => {
                    this.__store.setState((s) => {
                      const previousMatches = s.matches;
                      const newMatches = s.pendingMatches || s.matches;
                      exitingMatches = previousMatches.filter(
                        (match) => !newMatches.some((d) => d.id === match.id)
                      );
                      enteringMatches = newMatches.filter(
                        (match) => !previousMatches.some((d) => d.id === match.id)
                      );
                      stayingMatches = previousMatches.filter(
                        (match) => newMatches.some((d) => d.id === match.id)
                      );
                      return {
                        ...s,
                        isLoading: false,
                        loadedAt: Date.now(),
                        matches: newMatches,
                        pendingMatches: void 0,
                        cachedMatches: [
                          ...s.cachedMatches,
                          ...exitingMatches.filter((d) => d.status !== "error")
                        ]
                      };
                    });
                    this.clearExpiredCache();
                  });
                  [
                    [exitingMatches, "onLeave"],
                    [enteringMatches, "onEnter"],
                    [stayingMatches, "onStay"]
                  ].forEach(([matches, hook]) => {
                    matches.forEach((match) => {
                      this.looseRoutesById[match.routeId].options[hook]?.(match);
                    });
                  });
                });
              }
            });
          } catch (err) {
            if (isRedirect(err)) {
              redirect2 = err;
              if (!this.isServer) {
                this.navigate({
                  ...redirect2.options,
                  replace: true,
                  ignoreBlocker: true
                });
              }
            } else if (isNotFound(err)) {
              notFound2 = err;
            }
            this.__store.setState((s) => ({
              ...s,
              statusCode: redirect2 ? redirect2.status : notFound2 ? 404 : s.matches.some((d) => d.status === "error") ? 500 : 200,
              redirect: redirect2
            }));
          }
          if (this.latestLoadPromise === loadPromise) {
            this.commitLocationPromise?.resolve();
            this.latestLoadPromise = void 0;
            this.commitLocationPromise = void 0;
          }
          resolve();
        });
      });
      this.latestLoadPromise = loadPromise;
      await loadPromise;
      while (this.latestLoadPromise && loadPromise !== this.latestLoadPromise) {
        await this.latestLoadPromise;
      }
      let newStatusCode = void 0;
      if (this.hasNotFoundMatch()) {
        newStatusCode = 404;
      } else if (this.__store.state.matches.some((d) => d.status === "error")) {
        newStatusCode = 500;
      }
      if (newStatusCode !== void 0) {
        this.__store.setState((s) => ({
          ...s,
          statusCode: newStatusCode
        }));
      }
    };
    this.startViewTransition = (fn) => {
      const shouldViewTransition = this.shouldViewTransition ?? this.options.defaultViewTransition;
      delete this.shouldViewTransition;
      if (shouldViewTransition && typeof document !== "undefined" && "startViewTransition" in document && typeof document.startViewTransition === "function") {
        let startViewTransitionParams;
        if (typeof shouldViewTransition === "object" && this.isViewTransitionTypesSupported) {
          const next = this.latestLocation;
          const prevLocation = this.state.resolvedLocation;
          const resolvedViewTransitionTypes = typeof shouldViewTransition.types === "function" ? shouldViewTransition.types(
            getLocationChangeInfo({
              resolvedLocation: prevLocation,
              location: next
            })
          ) : shouldViewTransition.types;
          if (resolvedViewTransitionTypes === false) {
            fn();
            return;
          }
          startViewTransitionParams = {
            update: fn,
            types: resolvedViewTransitionTypes
          };
        } else {
          startViewTransitionParams = fn;
        }
        document.startViewTransition(startViewTransitionParams);
      } else {
        fn();
      }
    };
    this.updateMatch = (id, updater) => {
      const matchesKey = this.state.pendingMatches?.some((d) => d.id === id) ? "pendingMatches" : this.state.matches.some((d) => d.id === id) ? "matches" : this.state.cachedMatches.some((d) => d.id === id) ? "cachedMatches" : "";
      if (matchesKey) {
        this.__store.setState((s) => ({
          ...s,
          [matchesKey]: s[matchesKey]?.map((d) => d.id === id ? updater(d) : d)
        }));
      }
    };
    this.getMatch = (matchId) => {
      const findFn = (d) => d.id === matchId;
      return this.state.cachedMatches.find(findFn) ?? this.state.pendingMatches?.find(findFn) ?? this.state.matches.find(findFn);
    };
    this.invalidate = (opts) => {
      const invalidate = (d) => {
        if (opts?.filter?.(d) ?? true) {
          return {
            ...d,
            invalid: true,
            ...opts?.forcePending || d.status === "error" ? { status: "pending", error: void 0 } : void 0
          };
        }
        return d;
      };
      this.__store.setState((s) => ({
        ...s,
        matches: s.matches.map(invalidate),
        cachedMatches: s.cachedMatches.map(invalidate),
        pendingMatches: s.pendingMatches?.map(invalidate)
      }));
      this.shouldViewTransition = false;
      return this.load({ sync: opts?.sync });
    };
    this.resolveRedirect = (redirect2) => {
      if (!redirect2.options.href) {
        const location = this.buildLocation(redirect2.options);
        let href = location.url;
        if (this.origin && href.startsWith(this.origin)) {
          href = href.replace(this.origin, "") || "/";
        }
        redirect2.options.href = location.href;
        redirect2.headers.set("Location", href);
      }
      if (!redirect2.headers.get("Location")) {
        redirect2.headers.set("Location", redirect2.options.href);
      }
      return redirect2;
    };
    this.clearCache = (opts) => {
      const filter = opts?.filter;
      if (filter !== void 0) {
        this.__store.setState((s) => {
          return {
            ...s,
            cachedMatches: s.cachedMatches.filter(
              (m) => !filter(m)
            )
          };
        });
      } else {
        this.__store.setState((s) => {
          return {
            ...s,
            cachedMatches: []
          };
        });
      }
    };
    this.clearExpiredCache = () => {
      const filter = (d) => {
        const route = this.looseRoutesById[d.routeId];
        if (!route.options.loader) {
          return true;
        }
        const gcTime = (d.preload ? route.options.preloadGcTime ?? this.options.defaultPreloadGcTime : route.options.gcTime ?? this.options.defaultGcTime) ?? 5 * 60 * 1e3;
        const isError = d.status === "error";
        if (isError) return true;
        const gcEligible = Date.now() - d.updatedAt >= gcTime;
        return gcEligible;
      };
      this.clearCache({ filter });
    };
    this.loadRouteChunk = loadRouteChunk;
    this.preloadRoute = async (opts) => {
      const next = this.buildLocation(opts);
      let matches = this.matchRoutes(next, {
        throwOnError: true,
        preload: true,
        dest: opts
      });
      const activeMatchIds = new Set(
        [...this.state.matches, ...this.state.pendingMatches ?? []].map(
          (d) => d.id
        )
      );
      const loadedMatchIds = /* @__PURE__ */ new Set([
        ...activeMatchIds,
        ...this.state.cachedMatches.map((d) => d.id)
      ]);
      batch(() => {
        matches.forEach((match) => {
          if (!loadedMatchIds.has(match.id)) {
            this.__store.setState((s) => ({
              ...s,
              cachedMatches: [...s.cachedMatches, match]
            }));
          }
        });
      });
      try {
        matches = await loadMatches({
          router: this,
          matches,
          location: next,
          preload: true,
          updateMatch: (id, updater) => {
            if (activeMatchIds.has(id)) {
              matches = matches.map((d) => d.id === id ? updater(d) : d);
            } else {
              this.updateMatch(id, updater);
            }
          }
        });
        return matches;
      } catch (err) {
        if (isRedirect(err)) {
          if (err.options.reloadDocument) {
            return void 0;
          }
          return await this.preloadRoute({
            ...err.options,
            _fromLocation: next
          });
        }
        if (!isNotFound(err)) {
          console.error(err);
        }
        return void 0;
      }
    };
    this.matchRoute = (location, opts) => {
      const matchLocation = {
        ...location,
        to: location.to ? this.resolvePathWithBase(
          location.from || "",
          location.to
        ) : void 0,
        params: location.params || {},
        leaveParams: true
      };
      const next = this.buildLocation(matchLocation);
      if (opts?.pending && this.state.status !== "pending") {
        return false;
      }
      const pending = opts?.pending === void 0 ? !this.state.isLoading : opts.pending;
      const baseLocation = pending ? this.latestLocation : this.state.resolvedLocation || this.state.location;
      const match = matchPathname(
        baseLocation.pathname,
        {
          ...opts,
          to: next.pathname
        },
        this.parsePathnameCache
      );
      if (!match) {
        return false;
      }
      if (location.params) {
        if (!deepEqual(match, location.params, { partial: true })) {
          return false;
        }
      }
      if (match && (opts?.includeSearch ?? true)) {
        return deepEqual(baseLocation.search, next.search, { partial: true }) ? match : false;
      }
      return match;
    };
    this.hasNotFoundMatch = () => {
      return this.__store.state.matches.some(
        (d) => d.status === "notFound" || d.globalNotFound
      );
    };
    this.update({
      defaultPreloadDelay: 50,
      defaultPendingMs: 1e3,
      defaultPendingMinMs: 500,
      context: void 0,
      ...options,
      caseSensitive: options.caseSensitive ?? false,
      notFoundMode: options.notFoundMode ?? "fuzzy",
      stringifySearch: options.stringifySearch ?? defaultStringifySearch,
      parseSearch: options.parseSearch ?? defaultParseSearch
    });
    if (typeof document !== "undefined") {
      self.__TSR_ROUTER__ = this;
    }
  }
  isShell() {
    return !!this.options.isShell;
  }
  isPrerendering() {
    return !!this.options.isPrerendering;
  }
  get state() {
    return this.__store.state;
  }
  get looseRoutesById() {
    return this.routesById;
  }
  matchRoutesInternal(next, opts) {
    const { foundRoute, matchedRoutes, routeParams } = this.getMatchedRoutes(
      next.pathname,
      opts?.dest?.to
    );
    let isGlobalNotFound = false;
    if (
      // If we found a route, and it's not an index route and we have left over path
      foundRoute ? foundRoute.path !== "/" && routeParams["**"] : (
        // Or if we didn't find a route and we have left over path
        trimPathRight(next.pathname)
      )
    ) {
      if (this.options.notFoundRoute) {
        matchedRoutes.push(this.options.notFoundRoute);
      } else {
        isGlobalNotFound = true;
      }
    }
    const globalNotFoundRouteId = (() => {
      if (!isGlobalNotFound) {
        return void 0;
      }
      if (this.options.notFoundMode !== "root") {
        for (let i = matchedRoutes.length - 1; i >= 0; i--) {
          const route = matchedRoutes[i];
          if (route.children) {
            return route.id;
          }
        }
      }
      return rootRouteId;
    })();
    const matches = [];
    const getParentContext = (parentMatch) => {
      const parentMatchId = parentMatch?.id;
      const parentContext = !parentMatchId ? this.options.context ?? void 0 : parentMatch.context ?? this.options.context ?? void 0;
      return parentContext;
    };
    matchedRoutes.forEach((route, index) => {
      const parentMatch = matches[index - 1];
      const [preMatchSearch, strictMatchSearch, searchError] = (() => {
        const parentSearch = parentMatch?.search ?? next.search;
        const parentStrictSearch = parentMatch?._strictSearch ?? void 0;
        try {
          const strictSearch = validateSearch(route.options.validateSearch, { ...parentSearch }) ?? void 0;
          return [
            {
              ...parentSearch,
              ...strictSearch
            },
            { ...parentStrictSearch, ...strictSearch },
            void 0
          ];
        } catch (err) {
          let searchParamError = err;
          if (!(err instanceof SearchParamError)) {
            searchParamError = new SearchParamError(err.message, {
              cause: err
            });
          }
          if (opts?.throwOnError) {
            throw searchParamError;
          }
          return [parentSearch, {}, searchParamError];
        }
      })();
      const loaderDeps = route.options.loaderDeps?.({
        search: preMatchSearch
      }) ?? "";
      const loaderDepsHash = loaderDeps ? JSON.stringify(loaderDeps) : "";
      const { interpolatedPath, usedParams } = interpolatePath({
        path: route.fullPath,
        params: routeParams,
        decodeCharMap: this.pathParamsDecodeCharMap
      });
      const matchId = interpolatePath({
        path: route.id,
        params: routeParams,
        leaveWildcards: true,
        decodeCharMap: this.pathParamsDecodeCharMap,
        parseCache: this.parsePathnameCache
      }).interpolatedPath + loaderDepsHash;
      const existingMatch = this.getMatch(matchId);
      const previousMatch = this.state.matches.find(
        (d) => d.routeId === route.id
      );
      const strictParams = existingMatch?._strictParams ?? usedParams;
      let paramsError = void 0;
      if (!existingMatch) {
        const strictParseParams = route.options.params?.parse ?? route.options.parseParams;
        if (strictParseParams) {
          try {
            Object.assign(
              strictParams,
              strictParseParams(strictParams)
            );
          } catch (err) {
            paramsError = new PathParamError(err.message, {
              cause: err
            });
            if (opts?.throwOnError) {
              throw paramsError;
            }
          }
        }
      }
      Object.assign(routeParams, strictParams);
      const cause = previousMatch ? "stay" : "enter";
      let match;
      if (existingMatch) {
        match = {
          ...existingMatch,
          cause,
          params: previousMatch ? replaceEqualDeep(previousMatch.params, routeParams) : routeParams,
          _strictParams: strictParams,
          search: previousMatch ? replaceEqualDeep(previousMatch.search, preMatchSearch) : replaceEqualDeep(existingMatch.search, preMatchSearch),
          _strictSearch: strictMatchSearch
        };
      } else {
        const status = route.options.loader || route.options.beforeLoad || route.lazyFn || routeNeedsPreload(route) ? "pending" : "success";
        match = {
          id: matchId,
          index,
          routeId: route.id,
          params: previousMatch ? replaceEqualDeep(previousMatch.params, routeParams) : routeParams,
          _strictParams: strictParams,
          pathname: interpolatedPath,
          updatedAt: Date.now(),
          search: previousMatch ? replaceEqualDeep(previousMatch.search, preMatchSearch) : preMatchSearch,
          _strictSearch: strictMatchSearch,
          searchError: void 0,
          status,
          isFetching: false,
          error: void 0,
          paramsError,
          __routeContext: void 0,
          _nonReactive: {
            loadPromise: createControlledPromise()
          },
          __beforeLoadContext: void 0,
          context: {},
          abortController: new AbortController(),
          fetchCount: 0,
          cause,
          loaderDeps: previousMatch ? replaceEqualDeep(previousMatch.loaderDeps, loaderDeps) : loaderDeps,
          invalid: false,
          preload: false,
          links: void 0,
          scripts: void 0,
          headScripts: void 0,
          meta: void 0,
          staticData: route.options.staticData || {},
          fullPath: route.fullPath
        };
      }
      if (!opts?.preload) {
        match.globalNotFound = globalNotFoundRouteId === route.id;
      }
      match.searchError = searchError;
      const parentContext = getParentContext(parentMatch);
      match.context = {
        ...parentContext,
        ...match.__routeContext,
        ...match.__beforeLoadContext
      };
      matches.push(match);
    });
    matches.forEach((match, index) => {
      const route = this.looseRoutesById[match.routeId];
      const existingMatch = this.getMatch(match.id);
      if (!existingMatch && opts?._buildLocation !== true) {
        const parentMatch = matches[index - 1];
        const parentContext = getParentContext(parentMatch);
        if (route.options.context) {
          const contextFnContext = {
            deps: match.loaderDeps,
            params: match.params,
            context: parentContext ?? {},
            location: next,
            navigate: (opts2) => this.navigate({ ...opts2, _fromLocation: next }),
            buildLocation: this.buildLocation,
            cause: match.cause,
            abortController: match.abortController,
            preload: !!match.preload,
            matches
          };
          match.__routeContext = route.options.context(contextFnContext) ?? void 0;
        }
        match.context = {
          ...parentContext,
          ...match.__routeContext,
          ...match.__beforeLoadContext
        };
      }
    });
    return matches;
  }
};
var SearchParamError = class extends Error {
};
var PathParamError = class extends Error {
};
var normalize = (str) => str.endsWith("/") && str.length > 1 ? str.slice(0, -1) : str;
function comparePaths(a, b) {
  return normalize(a) === normalize(b);
}
function getInitialRouterState(location) {
  return {
    loadedAt: 0,
    isLoading: false,
    isTransitioning: false,
    status: "idle",
    resolvedLocation: void 0,
    location,
    matches: [],
    pendingMatches: [],
    cachedMatches: [],
    statusCode: 200
  };
}
function validateSearch(validateSearch2, input) {
  if (validateSearch2 == null) return {};
  if ("~standard" in validateSearch2) {
    const result = validateSearch2["~standard"].validate(input);
    if (result instanceof Promise)
      throw new SearchParamError("Async validation not supported");
    if (result.issues)
      throw new SearchParamError(JSON.stringify(result.issues, void 0, 2), {
        cause: result
      });
    return result.value;
  }
  if ("parse" in validateSearch2) {
    return validateSearch2.parse(input);
  }
  if (typeof validateSearch2 === "function") {
    return validateSearch2(input);
  }
  return {};
}
function getMatchedRoutes({
  pathname,
  routePathname,
  caseSensitive,
  routesByPath,
  routesById,
  flatRoutes,
  parseCache
}) {
  let routeParams = {};
  const trimmedPath = trimPathRight(pathname);
  const getMatchedParams = (route) => {
    const result = matchPathname(
      trimmedPath,
      {
        to: route.fullPath,
        caseSensitive: route.options?.caseSensitive ?? caseSensitive,
        // we need fuzzy matching for `notFoundMode: 'fuzzy'`
        fuzzy: true
      },
      parseCache
    );
    return result;
  };
  let foundRoute = routePathname !== void 0 ? routesByPath[routePathname] : void 0;
  if (foundRoute) {
    routeParams = getMatchedParams(foundRoute);
  } else {
    let fuzzyMatch = void 0;
    for (const route of flatRoutes) {
      const matchedParams = getMatchedParams(route);
      if (matchedParams) {
        if (route.path !== "/" && matchedParams["**"]) {
          if (!fuzzyMatch) {
            fuzzyMatch = { foundRoute: route, routeParams: matchedParams };
          }
        } else {
          foundRoute = route;
          routeParams = matchedParams;
          break;
        }
      }
    }
    if (!foundRoute && fuzzyMatch) {
      foundRoute = fuzzyMatch.foundRoute;
      routeParams = fuzzyMatch.routeParams;
    }
  }
  let routeCursor = foundRoute || routesById[rootRouteId];
  const matchedRoutes = [routeCursor];
  while (routeCursor.parentRoute) {
    routeCursor = routeCursor.parentRoute;
    matchedRoutes.push(routeCursor);
  }
  matchedRoutes.reverse();
  return { matchedRoutes, routeParams, foundRoute };
}
function applySearchMiddleware({
  search,
  dest,
  destRoutes,
  _includeValidateSearch
}) {
  const allMiddlewares = destRoutes.reduce(
    (acc, route) => {
      const middlewares = [];
      if ("search" in route.options) {
        if (route.options.search?.middlewares) {
          middlewares.push(...route.options.search.middlewares);
        }
      } else if (route.options.preSearchFilters || route.options.postSearchFilters) {
        const legacyMiddleware = ({
          search: search2,
          next
        }) => {
          let nextSearch = search2;
          if ("preSearchFilters" in route.options && route.options.preSearchFilters) {
            nextSearch = route.options.preSearchFilters.reduce(
              (prev, next2) => next2(prev),
              search2
            );
          }
          const result = next(nextSearch);
          if ("postSearchFilters" in route.options && route.options.postSearchFilters) {
            return route.options.postSearchFilters.reduce(
              (prev, next2) => next2(prev),
              result
            );
          }
          return result;
        };
        middlewares.push(legacyMiddleware);
      }
      if (_includeValidateSearch && route.options.validateSearch) {
        const validate = ({ search: search2, next }) => {
          const result = next(search2);
          try {
            const validatedSearch = {
              ...result,
              ...validateSearch(route.options.validateSearch, result) ?? void 0
            };
            return validatedSearch;
          } catch {
            return result;
          }
        };
        middlewares.push(validate);
      }
      return acc.concat(middlewares);
    },
    []
  ) ?? [];
  const final = ({ search: search2 }) => {
    if (!dest.search) {
      return {};
    }
    if (dest.search === true) {
      return search2;
    }
    return functionalUpdate(dest.search, search2);
  };
  allMiddlewares.push(final);
  const applyNext = (index, currentSearch) => {
    if (index >= allMiddlewares.length) {
      return currentSearch;
    }
    const middleware = allMiddlewares[index];
    const next = (newSearch) => {
      return applyNext(index + 1, newSearch);
    };
    return middleware({ search: currentSearch, next });
  };
  return applyNext(0, search);
}

// node_modules/@tanstack/router-core/dist/esm/link.js
var preloadWarning = "Error preloading route! \u261D\uFE0F";

// node_modules/@tanstack/router-core/dist/esm/route.js
var BaseRoute = class {
  constructor(options) {
    this.init = (opts) => {
      this.originalIndex = opts.originalIndex;
      const options2 = this.options;
      const isRoot = !options2?.path && !options2?.id;
      this.parentRoute = this.options.getParentRoute?.();
      if (isRoot) {
        this._path = rootRouteId;
      } else if (!this.parentRoute) {
        invariant(
          false,
          `Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.`
        );
      }
      let path = isRoot ? rootRouteId : options2?.path;
      if (path && path !== "/") {
        path = trimPathLeft(path);
      }
      const customId = options2?.id || path;
      let id = isRoot ? rootRouteId : joinPaths([
        this.parentRoute.id === rootRouteId ? "" : this.parentRoute.id,
        customId
      ]);
      if (path === rootRouteId) {
        path = "/";
      }
      if (id !== rootRouteId) {
        id = joinPaths(["/", id]);
      }
      const fullPath = id === rootRouteId ? "/" : joinPaths([this.parentRoute.fullPath, path]);
      this._path = path;
      this._id = id;
      this._fullPath = fullPath;
      this._to = fullPath;
    };
    this.clone = (other) => {
      this._path = other._path;
      this._id = other._id;
      this._fullPath = other._fullPath;
      this._to = other._to;
      this.options.getParentRoute = other.options.getParentRoute;
      this.children = other.children;
    };
    this.addChildren = (children) => {
      return this._addFileChildren(children);
    };
    this._addFileChildren = (children) => {
      if (Array.isArray(children)) {
        this.children = children;
      }
      if (typeof children === "object" && children !== null) {
        this.children = Object.values(children);
      }
      return this;
    };
    this._addFileTypes = () => {
      return this;
    };
    this.updateLoader = (options2) => {
      Object.assign(this.options, options2);
      return this;
    };
    this.update = (options2) => {
      Object.assign(this.options, options2);
      return this;
    };
    this.lazy = (lazyFn2) => {
      this.lazyFn = lazyFn2;
      return this;
    };
    this.options = options || {};
    this.isRoot = !options?.getParentRoute;
    if (options?.id && options?.path) {
      throw new Error(`Route cannot have both an 'id' and a 'path' option.`);
    }
  }
  get to() {
    return this._to;
  }
  get id() {
    return this._id;
  }
  get path() {
    return this._path;
  }
  get fullPath() {
    return this._fullPath;
  }
};
var BaseRootRoute = class extends BaseRoute {
  constructor(options) {
    super(options);
  }
};

// node_modules/@tanstack/react-router/dist/esm/CatchBoundary.js
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
var React = __toESM(require_react(), 1);
function CatchBoundary(props) {
  const errorComponent = props.errorComponent ?? ErrorComponent;
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
    CatchBoundaryImpl,
    {
      getResetKey: props.getResetKey,
      onCatch: props.onCatch,
      children: ({ error, reset }) => {
        if (error) {
          return React.createElement(errorComponent, {
            error,
            reset
          });
        }
        return props.children;
      }
    }
  );
}
var CatchBoundaryImpl = class extends React.Component {
  constructor() {
    super(...arguments);
    this.state = { error: null };
  }
  static getDerivedStateFromProps(props) {
    return { resetKey: props.getResetKey() };
  }
  static getDerivedStateFromError(error) {
    return { error };
  }
  reset() {
    this.setState({ error: null });
  }
  componentDidUpdate(prevProps, prevState) {
    if (prevState.error && prevState.resetKey !== this.state.resetKey) {
      this.reset();
    }
  }
  componentDidCatch(error, errorInfo) {
    if (this.props.onCatch) {
      this.props.onCatch(error, errorInfo);
    }
  }
  render() {
    return this.props.children({
      error: this.state.resetKey !== this.props.getResetKey() ? null : this.state.error,
      reset: () => {
        this.reset();
      }
    });
  }
};
function ErrorComponent({ error }) {
  const [show, setShow] = React.useState(true);
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: ".5rem", maxWidth: "100%" }, children: [
    /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: ".5rem" }, children: [
      /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { style: { fontSize: "1rem" }, children: "Something went wrong!" }),
      /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
        "button",
        {
          style: {
            appearance: "none",
            fontSize: ".6em",
            border: "1px solid currentColor",
            padding: ".1rem .2rem",
            fontWeight: "bold",
            borderRadius: ".25rem"
          },
          onClick: () => setShow((d) => !d),
          children: show ? "Hide Error" : "Show Error"
        }
      )
    ] }),
    /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { height: ".25rem" } }),
    show ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
      "pre",
      {
        style: {
          fontSize: ".7em",
          border: "1px solid red",
          borderRadius: ".25rem",
          padding: ".3rem",
          color: "red",
          overflow: "auto"
        },
        children: error.message ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { children: error.message }) : null
      }
    ) }) : null
  ] });
}

// node_modules/@tanstack/react-router/dist/esm/ClientOnly.js
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
var import_react = __toESM(require_react(), 1);
function ClientOnly({ children, fallback = null }) {
  return useHydrated() ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react.default.Fragment, { children }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react.default.Fragment, { children: fallback });
}
function useHydrated() {
  return import_react.default.useSyncExternalStore(
    subscribe,
    () => true,
    () => false
  );
}
function subscribe() {
  return () => {
  };
}

// node_modules/tiny-warning/dist/tiny-warning.esm.js
var isProduction2 = false;
function warning(condition, message) {
  if (!isProduction2) {
    if (condition) {
      return;
    }
    var text = "Warning: " + message;
    if (typeof console !== "undefined") {
      console.warn(text);
    }
    try {
      throw Error(text);
    } catch (x) {
    }
  }
}
var tiny_warning_esm_default = warning;

// node_modules/@tanstack/react-router/dist/esm/route.js
var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
var import_react3 = __toESM(require_react(), 1);

// node_modules/@tanstack/react-router/dist/esm/useMatch.js
var React5 = __toESM(require_react(), 1);

// node_modules/@tanstack/react-store/dist/esm/index.js
var import_with_selector = __toESM(require_with_selector(), 1);
function useStore(store, selector = (d) => d, options = {}) {
  const equal = options.equal ?? shallow;
  const slice = (0, import_with_selector.useSyncExternalStoreWithSelector)(
    store.subscribe,
    () => store.state,
    () => store.state,
    selector,
    equal
  );
  return slice;
}
function shallow(objA, objB) {
  if (Object.is(objA, objB)) {
    return true;
  }
  if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) {
    return false;
  }
  if (objA instanceof Map && objB instanceof Map) {
    if (objA.size !== objB.size) return false;
    for (const [k, v] of objA) {
      if (!objB.has(k) || !Object.is(v, objB.get(k))) return false;
    }
    return true;
  }
  if (objA instanceof Set && objB instanceof Set) {
    if (objA.size !== objB.size) return false;
    for (const v of objA) {
      if (!objB.has(v)) return false;
    }
    return true;
  }
  if (objA instanceof Date && objB instanceof Date) {
    if (objA.getTime() !== objB.getTime()) return false;
    return true;
  }
  const keysA = getOwnKeys(objA);
  if (keysA.length !== getOwnKeys(objB).length) {
    return false;
  }
  for (let i = 0; i < keysA.length; i++) {
    if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !Object.is(objA[keysA[i]], objB[keysA[i]])) {
      return false;
    }
  }
  return true;
}
function getOwnKeys(obj) {
  return Object.keys(obj).concat(
    Object.getOwnPropertySymbols(obj)
  );
}

// node_modules/@tanstack/react-router/dist/esm/useRouterState.js
var import_react2 = __toESM(require_react(), 1);

// node_modules/@tanstack/react-router/dist/esm/useRouter.js
var React3 = __toESM(require_react(), 1);

// node_modules/@tanstack/react-router/dist/esm/routerContext.js
var React2 = __toESM(require_react(), 1);
var routerContext = React2.createContext(null);
function getRouterContext() {
  if (typeof document === "undefined") {
    return routerContext;
  }
  if (window.__TSR_ROUTER_CONTEXT__) {
    return window.__TSR_ROUTER_CONTEXT__;
  }
  window.__TSR_ROUTER_CONTEXT__ = routerContext;
  return routerContext;
}

// node_modules/@tanstack/react-router/dist/esm/useRouter.js
function useRouter(opts) {
  const value = React3.useContext(getRouterContext());
  tiny_warning_esm_default(
    !((opts?.warn ?? true) && !value),
    "useRouter must be used inside a <RouterProvider> component!"
  );
  return value;
}

// node_modules/@tanstack/react-router/dist/esm/useRouterState.js
function useRouterState(opts) {
  const contextRouter = useRouter({
    warn: opts?.router === void 0
  });
  const router = opts?.router || contextRouter;
  const previousResult = (0, import_react2.useRef)(void 0);
  return useStore(router.__store, (state) => {
    if (opts?.select) {
      if (opts.structuralSharing ?? router.options.defaultStructuralSharing) {
        const newSlice = replaceEqualDeep(
          previousResult.current,
          opts.select(state)
        );
        previousResult.current = newSlice;
        return newSlice;
      }
      return opts.select(state);
    }
    return state;
  });
}

// node_modules/@tanstack/react-router/dist/esm/matchContext.js
var React4 = __toESM(require_react(), 1);
var matchContext = React4.createContext(void 0);
var dummyMatchContext = React4.createContext(
  void 0
);

// node_modules/@tanstack/react-router/dist/esm/useMatch.js
function useMatch(opts) {
  const nearestMatchId = React5.useContext(
    opts.from ? dummyMatchContext : matchContext
  );
  const matchSelection = useRouterState({
    select: (state) => {
      const match = state.matches.find(
        (d) => opts.from ? opts.from === d.routeId : d.id === nearestMatchId
      );
      invariant(
        !((opts.shouldThrow ?? true) && !match),
        `Could not find ${opts.from ? `an active match from "${opts.from}"` : "a nearest match!"}`
      );
      if (match === void 0) {
        return void 0;
      }
      return opts.select ? opts.select(match) : match;
    },
    structuralSharing: opts.structuralSharing
  });
  return matchSelection;
}

// node_modules/@tanstack/react-router/dist/esm/useLoaderData.js
function useLoaderData(opts) {
  return useMatch({
    from: opts.from,
    strict: opts.strict,
    structuralSharing: opts.structuralSharing,
    select: (s) => {
      return opts.select ? opts.select(s.loaderData) : s.loaderData;
    }
  });
}

// node_modules/@tanstack/react-router/dist/esm/useLoaderDeps.js
function useLoaderDeps(opts) {
  const { select, ...rest } = opts;
  return useMatch({
    ...rest,
    select: (s) => {
      return select ? select(s.loaderDeps) : s.loaderDeps;
    }
  });
}

// node_modules/@tanstack/react-router/dist/esm/useParams.js
function useParams(opts) {
  return useMatch({
    from: opts.from,
    shouldThrow: opts.shouldThrow,
    structuralSharing: opts.structuralSharing,
    strict: opts.strict,
    select: (match) => {
      const params = opts.strict === false ? match.params : match._strictParams;
      return opts.select ? opts.select(params) : params;
    }
  });
}

// node_modules/@tanstack/react-router/dist/esm/useSearch.js
function useSearch(opts) {
  return useMatch({
    from: opts.from,
    strict: opts.strict,
    shouldThrow: opts.shouldThrow,
    structuralSharing: opts.structuralSharing,
    select: (match) => {
      return opts.select ? opts.select(match.search) : match.search;
    }
  });
}

// node_modules/@tanstack/react-router/dist/esm/useNavigate.js
var React6 = __toESM(require_react(), 1);
function useNavigate(_defaultOpts) {
  const router = useRouter();
  return React6.useCallback(
    (options) => {
      return router.navigate({
        ...options,
        from: options.from ?? _defaultOpts?.from
      });
    },
    [_defaultOpts?.from, router]
  );
}

// node_modules/@tanstack/react-router/dist/esm/link.js
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
var React8 = __toESM(require_react(), 1);
var import_react_dom = __toESM(require_react_dom(), 1);

// node_modules/@tanstack/react-router/dist/esm/utils.js
var React7 = __toESM(require_react(), 1);
var useLayoutEffect2 = typeof window !== "undefined" ? React7.useLayoutEffect : React7.useEffect;
function usePrevious(value) {
  const ref = React7.useRef({
    value,
    prev: null
  });
  const current = ref.current.value;
  if (value !== current) {
    ref.current = {
      value,
      prev: current
    };
  }
  return ref.current.prev;
}
function useIntersectionObserver(ref, callback, intersectionObserverOptions2 = {}, options = {}) {
  React7.useEffect(() => {
    if (!ref.current || options.disabled || typeof IntersectionObserver !== "function") {
      return;
    }
    const observer = new IntersectionObserver(([entry]) => {
      callback(entry);
    }, intersectionObserverOptions2);
    observer.observe(ref.current);
    return () => {
      observer.disconnect();
    };
  }, [callback, intersectionObserverOptions2, options.disabled, ref]);
}
function useForwardedRef(ref) {
  const innerRef = React7.useRef(null);
  React7.useImperativeHandle(ref, () => innerRef.current, []);
  return innerRef;
}

// node_modules/@tanstack/react-router/dist/esm/link.js
function useLinkProps(options, forwardedRef) {
  const router = useRouter();
  const [isTransitioning, setIsTransitioning] = React8.useState(false);
  const hasRenderFetched = React8.useRef(false);
  const innerRef = useForwardedRef(forwardedRef);
  const {
    // custom props
    activeProps,
    inactiveProps,
    activeOptions,
    to,
    preload: userPreload,
    preloadDelay: userPreloadDelay,
    hashScrollIntoView,
    replace,
    startTransition: startTransition2,
    resetScroll,
    viewTransition,
    // element props
    children,
    target,
    disabled,
    style,
    className,
    onClick,
    onFocus,
    onMouseEnter,
    onMouseLeave,
    onTouchStart,
    ignoreBlocker,
    // prevent these from being returned
    params: _params,
    search: _search,
    hash: _hash,
    state: _state,
    mask: _mask,
    reloadDocument: _reloadDocument,
    unsafeRelative: _unsafeRelative,
    from: _from,
    _fromLocation,
    ...propsSafeToSpread
  } = options;
  const currentSearch = useRouterState({
    select: (s) => s.location.search,
    structuralSharing: true
  });
  const from = options.from;
  const _options = React8.useMemo(
    () => {
      return { ...options, from };
    },
    // eslint-disable-next-line react-hooks/exhaustive-deps
    [
      router,
      currentSearch,
      from,
      options._fromLocation,
      options.hash,
      options.to,
      options.search,
      options.params,
      options.state,
      options.mask,
      options.unsafeRelative
    ]
  );
  const next = React8.useMemo(
    () => router.buildLocation({ ..._options }),
    [router, _options]
  );
  const hrefOption = React8.useMemo(() => {
    if (disabled) {
      return void 0;
    }
    let href = next.maskedLocation ? next.maskedLocation.url : next.url;
    let external = false;
    if (router.origin) {
      if (href.startsWith(router.origin)) {
        href = router.history.createHref(href.replace(router.origin, "")) || "/";
      } else {
        external = true;
      }
    }
    return { href, external };
  }, [disabled, next.maskedLocation, next.url, router.origin, router.history]);
  const externalLink = React8.useMemo(() => {
    if (hrefOption?.external) {
      return hrefOption.href;
    }
    try {
      new URL(to);
      return to;
    } catch {
    }
    return void 0;
  }, [to, hrefOption]);
  const preload = options.reloadDocument || externalLink ? false : userPreload ?? router.options.defaultPreload;
  const preloadDelay = userPreloadDelay ?? router.options.defaultPreloadDelay ?? 0;
  const isActive = useRouterState({
    select: (s) => {
      if (externalLink) return false;
      if (activeOptions?.exact) {
        const testExact = exactPathTest(
          s.location.pathname,
          next.pathname,
          router.basepath
        );
        if (!testExact) {
          return false;
        }
      } else {
        const currentPathSplit = removeTrailingSlash(
          s.location.pathname,
          router.basepath
        );
        const nextPathSplit = removeTrailingSlash(
          next.pathname,
          router.basepath
        );
        const pathIsFuzzyEqual = currentPathSplit.startsWith(nextPathSplit) && (currentPathSplit.length === nextPathSplit.length || currentPathSplit[nextPathSplit.length] === "/");
        if (!pathIsFuzzyEqual) {
          return false;
        }
      }
      if (activeOptions?.includeSearch ?? true) {
        const searchTest = deepEqual(s.location.search, next.search, {
          partial: !activeOptions?.exact,
          ignoreUndefined: !activeOptions?.explicitUndefined
        });
        if (!searchTest) {
          return false;
        }
      }
      if (activeOptions?.includeHash) {
        return s.location.hash === next.hash;
      }
      return true;
    }
  });
  const doPreload = React8.useCallback(() => {
    router.preloadRoute({ ..._options }).catch((err) => {
      console.warn(err);
      console.warn(preloadWarning);
    });
  }, [router, _options]);
  const preloadViewportIoCallback = React8.useCallback(
    (entry) => {
      if (entry?.isIntersecting) {
        doPreload();
      }
    },
    [doPreload]
  );
  useIntersectionObserver(
    innerRef,
    preloadViewportIoCallback,
    intersectionObserverOptions,
    { disabled: !!disabled || !(preload === "viewport") }
  );
  React8.useEffect(() => {
    if (hasRenderFetched.current) {
      return;
    }
    if (!disabled && preload === "render") {
      doPreload();
      hasRenderFetched.current = true;
    }
  }, [disabled, doPreload, preload]);
  const handleClick = (e) => {
    const elementTarget = e.currentTarget.getAttribute("target");
    const effectiveTarget = target !== void 0 ? target : elementTarget;
    if (!disabled && !isCtrlEvent(e) && !e.defaultPrevented && (!effectiveTarget || effectiveTarget === "_self") && e.button === 0) {
      e.preventDefault();
      (0, import_react_dom.flushSync)(() => {
        setIsTransitioning(true);
      });
      const unsub = router.subscribe("onResolved", () => {
        unsub();
        setIsTransitioning(false);
      });
      router.navigate({
        ..._options,
        replace,
        resetScroll,
        hashScrollIntoView,
        startTransition: startTransition2,
        viewTransition,
        ignoreBlocker
      });
    }
  };
  if (externalLink) {
    return {
      ...propsSafeToSpread,
      ref: innerRef,
      href: externalLink,
      ...children && { children },
      ...target && { target },
      ...disabled && { disabled },
      ...style && { style },
      ...className && { className },
      ...onClick && { onClick },
      ...onFocus && { onFocus },
      ...onMouseEnter && { onMouseEnter },
      ...onMouseLeave && { onMouseLeave },
      ...onTouchStart && { onTouchStart }
    };
  }
  const handleFocus = (_) => {
    if (disabled) return;
    if (preload) {
      doPreload();
    }
  };
  const handleTouchStart = handleFocus;
  const handleEnter = (e) => {
    if (disabled || !preload) return;
    if (!preloadDelay) {
      doPreload();
    } else {
      const eventTarget = e.target;
      if (timeoutMap.has(eventTarget)) {
        return;
      }
      const id = setTimeout(() => {
        timeoutMap.delete(eventTarget);
        doPreload();
      }, preloadDelay);
      timeoutMap.set(eventTarget, id);
    }
  };
  const handleLeave = (e) => {
    if (disabled || !preload || !preloadDelay) return;
    const eventTarget = e.target;
    const id = timeoutMap.get(eventTarget);
    if (id) {
      clearTimeout(id);
      timeoutMap.delete(eventTarget);
    }
  };
  const resolvedActiveProps = isActive ? functionalUpdate(activeProps, {}) ?? STATIC_ACTIVE_OBJECT : STATIC_EMPTY_OBJECT;
  const resolvedInactiveProps = isActive ? STATIC_EMPTY_OBJECT : functionalUpdate(inactiveProps, {}) ?? STATIC_EMPTY_OBJECT;
  const resolvedClassName = [
    className,
    resolvedActiveProps.className,
    resolvedInactiveProps.className
  ].filter(Boolean).join(" ");
  const resolvedStyle = (style || resolvedActiveProps.style || resolvedInactiveProps.style) && {
    ...style,
    ...resolvedActiveProps.style,
    ...resolvedInactiveProps.style
  };
  return {
    ...propsSafeToSpread,
    ...resolvedActiveProps,
    ...resolvedInactiveProps,
    href: hrefOption?.href,
    ref: innerRef,
    onClick: composeHandlers([onClick, handleClick]),
    onFocus: composeHandlers([onFocus, handleFocus]),
    onMouseEnter: composeHandlers([onMouseEnter, handleEnter]),
    onMouseLeave: composeHandlers([onMouseLeave, handleLeave]),
    onTouchStart: composeHandlers([onTouchStart, handleTouchStart]),
    disabled: !!disabled,
    target,
    ...resolvedStyle && { style: resolvedStyle },
    ...resolvedClassName && { className: resolvedClassName },
    ...disabled && STATIC_DISABLED_PROPS,
    ...isActive && STATIC_ACTIVE_PROPS,
    ...isTransitioning && STATIC_TRANSITIONING_PROPS
  };
}
var STATIC_EMPTY_OBJECT = {};
var STATIC_ACTIVE_OBJECT = { className: "active" };
var STATIC_DISABLED_PROPS = { role: "link", "aria-disabled": true };
var STATIC_ACTIVE_PROPS = { "data-status": "active", "aria-current": "page" };
var STATIC_TRANSITIONING_PROPS = { "data-transitioning": "transitioning" };
var timeoutMap = /* @__PURE__ */ new WeakMap();
var intersectionObserverOptions = {
  rootMargin: "100px"
};
var composeHandlers = (handlers) => (e) => {
  for (const handler of handlers) {
    if (!handler) continue;
    if (e.defaultPrevented) return;
    handler(e);
  }
};
function createLink(Comp) {
  return React8.forwardRef(function CreatedLink(props, ref) {
    return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Link, { ...props, _asChild: Comp, ref });
  });
}
var Link = React8.forwardRef(
  (props, ref) => {
    const { _asChild, ...rest } = props;
    const {
      type: _type,
      ref: innerRef,
      ...linkProps
    } = useLinkProps(rest, ref);
    const children = typeof rest.children === "function" ? rest.children({
      isActive: linkProps["data-status"] === "active"
    }) : rest.children;
    if (_asChild === void 0) {
      delete linkProps.disabled;
    }
    return React8.createElement(
      _asChild ? _asChild : "a",
      {
        ...linkProps,
        ref: innerRef
      },
      children
    );
  }
);
function isCtrlEvent(e) {
  return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
}

// node_modules/@tanstack/react-router/dist/esm/route.js
var Route = class extends BaseRoute {
  /**
   * @deprecated Use the `createRoute` function instead.
   */
  constructor(options) {
    super(options);
    this.useMatch = (opts) => {
      return useMatch({
        select: opts?.select,
        from: this.id,
        structuralSharing: opts?.structuralSharing
      });
    };
    this.useRouteContext = (opts) => {
      return useMatch({
        ...opts,
        from: this.id,
        select: (d) => opts?.select ? opts.select(d.context) : d.context
      });
    };
    this.useSearch = (opts) => {
      return useSearch({
        select: opts?.select,
        structuralSharing: opts?.structuralSharing,
        from: this.id
      });
    };
    this.useParams = (opts) => {
      return useParams({
        select: opts?.select,
        structuralSharing: opts?.structuralSharing,
        from: this.id
      });
    };
    this.useLoaderDeps = (opts) => {
      return useLoaderDeps({ ...opts, from: this.id });
    };
    this.useLoaderData = (opts) => {
      return useLoaderData({ ...opts, from: this.id });
    };
    this.useNavigate = () => {
      return useNavigate({ from: this.fullPath });
    };
    this.Link = import_react3.default.forwardRef(
      (props, ref) => {
        return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Link, { ref, from: this.fullPath, ...props });
      }
    );
    this.$$typeof = /* @__PURE__ */ Symbol.for("react.memo");
  }
};
function createRoute(options) {
  return new Route(
    // TODO: Help us TypeChris, you're our only hope!
    options
  );
}
var RootRoute = class extends BaseRootRoute {
  /**
   * @deprecated `RootRoute` is now an internal implementation detail. Use `createRootRoute()` instead.
   */
  constructor(options) {
    super(options);
    this.useMatch = (opts) => {
      return useMatch({
        select: opts?.select,
        from: this.id,
        structuralSharing: opts?.structuralSharing
      });
    };
    this.useRouteContext = (opts) => {
      return useMatch({
        ...opts,
        from: this.id,
        select: (d) => opts?.select ? opts.select(d.context) : d.context
      });
    };
    this.useSearch = (opts) => {
      return useSearch({
        select: opts?.select,
        structuralSharing: opts?.structuralSharing,
        from: this.id
      });
    };
    this.useParams = (opts) => {
      return useParams({
        select: opts?.select,
        structuralSharing: opts?.structuralSharing,
        from: this.id
      });
    };
    this.useLoaderDeps = (opts) => {
      return useLoaderDeps({ ...opts, from: this.id });
    };
    this.useLoaderData = (opts) => {
      return useLoaderData({ ...opts, from: this.id });
    };
    this.useNavigate = () => {
      return useNavigate({ from: this.fullPath });
    };
    this.Link = import_react3.default.forwardRef(
      (props, ref) => {
        return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Link, { ref, from: this.fullPath, ...props });
      }
    );
    this.$$typeof = /* @__PURE__ */ Symbol.for("react.memo");
  }
};
function createRootRoute(options) {
  return new RootRoute(options);
}

// node_modules/@tanstack/react-router/dist/esm/fileRoute.js
function createFileRoute(path) {
  if (typeof path === "object") {
    return new FileRoute(path, {
      silent: true
    }).createRoute(path);
  }
  return new FileRoute(path, {
    silent: true
  }).createRoute;
}
var FileRoute = class {
  constructor(path, _opts) {
    this.path = path;
    this.createRoute = (options) => {
      tiny_warning_esm_default(
        this.silent,
        "FileRoute is deprecated and will be removed in the next major version. Use the createFileRoute(path)(options) function instead."
      );
      const route = createRoute(options);
      route.isRoot = false;
      return route;
    };
    this.silent = _opts?.silent;
  }
};
var LazyRoute = class {
  constructor(opts) {
    this.useMatch = (opts2) => {
      return useMatch({
        select: opts2?.select,
        from: this.options.id,
        structuralSharing: opts2?.structuralSharing
      });
    };
    this.useRouteContext = (opts2) => {
      return useMatch({
        from: this.options.id,
        select: (d) => opts2?.select ? opts2.select(d.context) : d.context
      });
    };
    this.useSearch = (opts2) => {
      return useSearch({
        select: opts2?.select,
        structuralSharing: opts2?.structuralSharing,
        from: this.options.id
      });
    };
    this.useParams = (opts2) => {
      return useParams({
        select: opts2?.select,
        structuralSharing: opts2?.structuralSharing,
        from: this.options.id
      });
    };
    this.useLoaderDeps = (opts2) => {
      return useLoaderDeps({ ...opts2, from: this.options.id });
    };
    this.useLoaderData = (opts2) => {
      return useLoaderData({ ...opts2, from: this.options.id });
    };
    this.useNavigate = () => {
      const router = useRouter();
      return useNavigate({ from: router.routesById[this.options.id].fullPath });
    };
    this.options = opts;
    this.$$typeof = /* @__PURE__ */ Symbol.for("react.memo");
  }
};
function createLazyRoute(id) {
  return (opts) => {
    return new LazyRoute({
      id,
      ...opts
    });
  };
}
function createLazyFileRoute(id) {
  if (typeof id === "object") {
    return new LazyRoute(id);
  }
  return (opts) => new LazyRoute({ id, ...opts });
}

// node_modules/@tanstack/react-router/dist/esm/Matches.js
var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
var React11 = __toESM(require_react(), 1);

// node_modules/@tanstack/react-router/dist/esm/Transitioner.js
var React9 = __toESM(require_react(), 1);
function Transitioner() {
  const router = useRouter();
  const mountLoadForRouter = React9.useRef({ router, mounted: false });
  const [isTransitioning, setIsTransitioning] = React9.useState(false);
  const { hasPendingMatches, isLoading } = useRouterState({
    select: (s) => ({
      isLoading: s.isLoading,
      hasPendingMatches: s.matches.some((d) => d.status === "pending")
    }),
    structuralSharing: true
  });
  const previousIsLoading = usePrevious(isLoading);
  const isAnyPending = isLoading || isTransitioning || hasPendingMatches;
  const previousIsAnyPending = usePrevious(isAnyPending);
  const isPagePending = isLoading || hasPendingMatches;
  const previousIsPagePending = usePrevious(isPagePending);
  router.startTransition = (fn) => {
    setIsTransitioning(true);
    React9.startTransition(() => {
      fn();
      setIsTransitioning(false);
    });
  };
  React9.useEffect(() => {
    const unsub = router.history.subscribe(router.load);
    const nextLocation = router.buildLocation({
      to: router.latestLocation.pathname,
      search: true,
      params: true,
      hash: true,
      state: true,
      _includeValidateSearch: true
    });
    if (trimPathRight(router.latestLocation.href) !== trimPathRight(nextLocation.href)) {
      router.commitLocation({ ...nextLocation, replace: true });
    }
    return () => {
      unsub();
    };
  }, [router, router.history]);
  useLayoutEffect2(() => {
    if (
      // if we are hydrating from SSR, loading is triggered in ssr-client
      typeof window !== "undefined" && router.ssr || mountLoadForRouter.current.router === router && mountLoadForRouter.current.mounted
    ) {
      return;
    }
    mountLoadForRouter.current = { router, mounted: true };
    const tryLoad = async () => {
      try {
        await router.load();
      } catch (err) {
        console.error(err);
      }
    };
    tryLoad();
  }, [router]);
  useLayoutEffect2(() => {
    if (previousIsLoading && !isLoading) {
      router.emit({
        type: "onLoad",
        // When the new URL has committed, when the new matches have been loaded into state.matches
        ...getLocationChangeInfo(router.state)
      });
    }
  }, [previousIsLoading, router, isLoading]);
  useLayoutEffect2(() => {
    if (previousIsPagePending && !isPagePending) {
      router.emit({
        type: "onBeforeRouteMount",
        ...getLocationChangeInfo(router.state)
      });
    }
  }, [isPagePending, previousIsPagePending, router]);
  useLayoutEffect2(() => {
    if (previousIsAnyPending && !isAnyPending) {
      router.emit({
        type: "onResolved",
        ...getLocationChangeInfo(router.state)
      });
      router.__store.setState((s) => ({
        ...s,
        status: "idle",
        resolvedLocation: s.location
      }));
      handleHashScroll(router);
    }
  }, [isAnyPending, previousIsAnyPending, router]);
  return null;
}

// node_modules/@tanstack/react-router/dist/esm/Match.js
var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
var React10 = __toESM(require_react(), 1);

// node_modules/@tanstack/react-router/dist/esm/not-found.js
var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
function CatchNotFound(props) {
  const resetKey = useRouterState({
    select: (s) => `not-found-${s.location.pathname}-${s.status}`
  });
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
    CatchBoundary,
    {
      getResetKey: () => resetKey,
      onCatch: (error, errorInfo) => {
        if (isNotFound(error)) {
          props.onCatch?.(error, errorInfo);
        } else {
          throw error;
        }
      },
      errorComponent: ({ error }) => {
        if (isNotFound(error)) {
          return props.fallback?.(error);
        } else {
          throw error;
        }
      },
      children: props.children
    }
  );
}
function DefaultGlobalNotFound() {
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { children: "Not Found" });
}

// node_modules/@tanstack/react-router/dist/esm/SafeFragment.js
var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
function SafeFragment(props) {
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: props.children });
}

// node_modules/@tanstack/react-router/dist/esm/renderRouteNotFound.js
var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
function renderRouteNotFound(router, route, data) {
  if (!route.options.notFoundComponent) {
    if (router.options.defaultNotFoundComponent) {
      return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(router.options.defaultNotFoundComponent, { data });
    }
    if (true) {
      tiny_warning_esm_default(
        route.options.notFoundComponent,
        `A notFoundError was encountered on the route with ID "${route.id}", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (<div>Not Found<div>)`
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DefaultGlobalNotFound, {});
  }
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(route.options.notFoundComponent, { data });
}

// node_modules/@tanstack/react-router/dist/esm/scroll-restoration.js
var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);

// node_modules/@tanstack/react-router/dist/esm/ScriptOnce.js
var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
function ScriptOnce({ children }) {
  const router = useRouter();
  if (!router.isServer) {
    return null;
  }
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
    "script",
    {
      nonce: router.options.ssr?.nonce,
      className: "$tsr",
      dangerouslySetInnerHTML: {
        __html: [children].filter(Boolean).join("\n") + ";$_TSR.c()"
      }
    }
  );
}

// node_modules/@tanstack/react-router/dist/esm/scroll-restoration.js
function ScrollRestoration() {
  const router = useRouter();
  if (!router.isScrollRestoring || !router.isServer) {
    return null;
  }
  if (typeof router.options.scrollRestoration === "function") {
    const shouldRestore = router.options.scrollRestoration({
      location: router.latestLocation
    });
    if (!shouldRestore) {
      return null;
    }
  }
  const getKey = router.options.getScrollRestorationKey || defaultGetScrollRestorationKey;
  const userKey = getKey(router.latestLocation);
  const resolvedKey = userKey !== defaultGetScrollRestorationKey(router.latestLocation) ? userKey : void 0;
  const restoreScrollOptions = {
    storageKey,
    shouldScrollRestoration: true
  };
  if (resolvedKey) {
    restoreScrollOptions.key = resolvedKey;
  }
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
    ScriptOnce,
    {
      children: `(${restoreScroll.toString()})(${JSON.stringify(restoreScrollOptions)})`
    }
  );
}

// node_modules/@tanstack/react-router/dist/esm/Match.js
var Match = React10.memo(function MatchImpl({
  matchId
}) {
  const router = useRouter();
  const matchState = useRouterState({
    select: (s) => {
      const match = s.matches.find((d) => d.id === matchId);
      invariant(
        match,
        `Could not find match for matchId "${matchId}". Please file an issue!`
      );
      return {
        routeId: match.routeId,
        ssr: match.ssr,
        _displayPending: match._displayPending
      };
    },
    structuralSharing: true
  });
  const route = router.routesById[matchState.routeId];
  const PendingComponent = route.options.pendingComponent ?? router.options.defaultPendingComponent;
  const pendingElement = PendingComponent ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PendingComponent, {}) : null;
  const routeErrorComponent = route.options.errorComponent ?? router.options.defaultErrorComponent;
  const routeOnCatch = route.options.onCatch ?? router.options.defaultOnCatch;
  const routeNotFoundComponent = route.isRoot ? (
    // If it's the root route, use the globalNotFound option, with fallback to the notFoundRoute's component
    route.options.notFoundComponent ?? router.options.notFoundRoute?.options.component
  ) : route.options.notFoundComponent;
  const resolvedNoSsr = matchState.ssr === false || matchState.ssr === "data-only";
  const ResolvedSuspenseBoundary = (
    // If we're on the root route, allow forcefully wrapping in suspense
    (!route.isRoot || route.options.wrapInSuspense || resolvedNoSsr) && (route.options.wrapInSuspense ?? PendingComponent ?? (route.options.errorComponent?.preload || resolvedNoSsr)) ? React10.Suspense : SafeFragment
  );
  const ResolvedCatchBoundary = routeErrorComponent ? CatchBoundary : SafeFragment;
  const ResolvedNotFoundBoundary = routeNotFoundComponent ? CatchNotFound : SafeFragment;
  const resetKey = useRouterState({
    select: (s) => s.loadedAt
  });
  const parentRouteId = useRouterState({
    select: (s) => {
      const index = s.matches.findIndex((d) => d.id === matchId);
      return s.matches[index - 1]?.routeId;
    }
  });
  const ShellComponent = route.isRoot ? route.options.shellComponent ?? SafeFragment : SafeFragment;
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(ShellComponent, { children: [
    /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(matchContext.Provider, { value: matchId, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ResolvedSuspenseBoundary, { fallback: pendingElement, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
      ResolvedCatchBoundary,
      {
        getResetKey: () => resetKey,
        errorComponent: routeErrorComponent || ErrorComponent,
        onCatch: (error, errorInfo) => {
          if (isNotFound(error)) throw error;
          tiny_warning_esm_default(false, `Error in route match: ${matchId}`);
          routeOnCatch?.(error, errorInfo);
        },
        children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
          ResolvedNotFoundBoundary,
          {
            fallback: (error) => {
              if (!routeNotFoundComponent || error.routeId && error.routeId !== matchState.routeId || !error.routeId && !route.isRoot)
                throw error;
              return React10.createElement(routeNotFoundComponent, error);
            },
            children: resolvedNoSsr || matchState._displayPending ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ClientOnly, { fallback: pendingElement, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MatchInner, { matchId }) }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MatchInner, { matchId })
          }
        )
      }
    ) }) }),
    parentRouteId === rootRouteId && router.options.scrollRestoration ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(OnRendered, {}),
      /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ScrollRestoration, {})
    ] }) : null
  ] });
});
function OnRendered() {
  const router = useRouter();
  const prevLocationRef = React10.useRef(
    void 0
  );
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
    "script",
    {
      suppressHydrationWarning: true,
      ref: (el) => {
        if (el && (prevLocationRef.current === void 0 || prevLocationRef.current.href !== router.latestLocation.href)) {
          router.emit({
            type: "onRendered",
            ...getLocationChangeInfo(router.state)
          });
          prevLocationRef.current = router.latestLocation;
        }
      }
    },
    router.latestLocation.state.__TSR_key
  );
}
var MatchInner = React10.memo(function MatchInnerImpl({
  matchId
}) {
  const router = useRouter();
  const { match, key, routeId } = useRouterState({
    select: (s) => {
      const match2 = s.matches.find((d) => d.id === matchId);
      const routeId2 = match2.routeId;
      const remountFn = router.routesById[routeId2].options.remountDeps ?? router.options.defaultRemountDeps;
      const remountDeps = remountFn?.({
        routeId: routeId2,
        loaderDeps: match2.loaderDeps,
        params: match2._strictParams,
        search: match2._strictSearch
      });
      const key2 = remountDeps ? JSON.stringify(remountDeps) : void 0;
      return {
        key: key2,
        routeId: routeId2,
        match: {
          id: match2.id,
          status: match2.status,
          error: match2.error,
          _forcePending: match2._forcePending,
          _displayPending: match2._displayPending
        }
      };
    },
    structuralSharing: true
  });
  const route = router.routesById[routeId];
  const out = React10.useMemo(() => {
    const Comp = route.options.component ?? router.options.defaultComponent;
    if (Comp) {
      return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Comp, {}, key);
    }
    return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Outlet, {});
  }, [key, route.options.component, router.options.defaultComponent]);
  if (match._displayPending) {
    throw router.getMatch(match.id)?._nonReactive.displayPendingPromise;
  }
  if (match._forcePending) {
    throw router.getMatch(match.id)?._nonReactive.minPendingPromise;
  }
  if (match.status === "pending") {
    const pendingMinMs = route.options.pendingMinMs ?? router.options.defaultPendingMinMs;
    if (pendingMinMs) {
      const routerMatch = router.getMatch(match.id);
      if (routerMatch && !routerMatch._nonReactive.minPendingPromise) {
        if (!router.isServer) {
          const minPendingPromise = createControlledPromise();
          routerMatch._nonReactive.minPendingPromise = minPendingPromise;
          setTimeout(() => {
            minPendingPromise.resolve();
            routerMatch._nonReactive.minPendingPromise = void 0;
          }, pendingMinMs);
        }
      }
    }
    throw router.getMatch(match.id)?._nonReactive.loadPromise;
  }
  if (match.status === "notFound") {
    invariant(isNotFound(match.error), "Expected a notFound error");
    return renderRouteNotFound(router, route, match.error);
  }
  if (match.status === "redirected") {
    invariant(isRedirect(match.error), "Expected a redirect error");
    throw router.getMatch(match.id)?._nonReactive.loadPromise;
  }
  if (match.status === "error") {
    if (router.isServer) {
      const RouteErrorComponent = (route.options.errorComponent ?? router.options.defaultErrorComponent) || ErrorComponent;
      return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
        RouteErrorComponent,
        {
          error: match.error,
          reset: void 0,
          info: {
            componentStack: ""
          }
        }
      );
    }
    throw match.error;
  }
  return out;
});
var Outlet = React10.memo(function OutletImpl() {
  const router = useRouter();
  const matchId = React10.useContext(matchContext);
  const routeId = useRouterState({
    select: (s) => s.matches.find((d) => d.id === matchId)?.routeId
  });
  const route = router.routesById[routeId];
  const parentGlobalNotFound = useRouterState({
    select: (s) => {
      const matches = s.matches;
      const parentMatch = matches.find((d) => d.id === matchId);
      invariant(
        parentMatch,
        `Could not find parent match for matchId "${matchId}"`
      );
      return parentMatch.globalNotFound;
    }
  });
  const childMatchId = useRouterState({
    select: (s) => {
      const matches = s.matches;
      const index = matches.findIndex((d) => d.id === matchId);
      return matches[index + 1]?.id;
    }
  });
  const pendingElement = router.options.defaultPendingComponent ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(router.options.defaultPendingComponent, {}) : null;
  if (parentGlobalNotFound) {
    return renderRouteNotFound(router, route, void 0);
  }
  if (!childMatchId) {
    return null;
  }
  const nextMatch = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Match, { matchId: childMatchId });
  if (matchId === rootRouteId) {
    return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(React10.Suspense, { fallback: pendingElement, children: nextMatch });
  }
  return nextMatch;
});

// node_modules/@tanstack/react-router/dist/esm/Matches.js
function Matches() {
  const router = useRouter();
  const rootRoute = router.routesById[rootRouteId];
  const PendingComponent = rootRoute.options.pendingComponent ?? router.options.defaultPendingComponent;
  const pendingElement = PendingComponent ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PendingComponent, {}) : null;
  const ResolvedSuspense = router.isServer || typeof document !== "undefined" && router.ssr ? SafeFragment : React11.Suspense;
  const inner = /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(ResolvedSuspense, { fallback: pendingElement, children: [
    !router.isServer && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Transitioner, {}),
    /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(MatchesInner, {})
  ] });
  return router.options.InnerWrap ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(router.options.InnerWrap, { children: inner }) : inner;
}
function MatchesInner() {
  const router = useRouter();
  const matchId = useRouterState({
    select: (s) => {
      return s.matches[0]?.id;
    }
  });
  const resetKey = useRouterState({
    select: (s) => s.loadedAt
  });
  const matchComponent = matchId ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Match, { matchId }) : null;
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(matchContext.Provider, { value: matchId, children: router.options.disableGlobalCatchBoundary ? matchComponent : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
    CatchBoundary,
    {
      getResetKey: () => resetKey,
      errorComponent: ErrorComponent,
      onCatch: (error) => {
        tiny_warning_esm_default(
          false,
          `The following error wasn't caught by any route! At the very least, consider setting an 'errorComponent' in your RootRoute!`
        );
        tiny_warning_esm_default(false, error.message || error.toString());
      },
      children: matchComponent
    }
  ) });
}
function useMatches(opts) {
  return useRouterState({
    select: (state) => {
      const matches = state.matches;
      return opts?.select ? opts.select(matches) : matches;
    },
    structuralSharing: opts?.structuralSharing
  });
}

// node_modules/@tanstack/react-router/dist/esm/router.js
var createRouter = (options) => {
  return new Router(options);
};
var Router = class extends RouterCore {
  constructor(options) {
    super(options);
  }
};
if (typeof globalThis !== "undefined") {
  globalThis.createFileRoute = createFileRoute;
  globalThis.createLazyFileRoute = createLazyFileRoute;
} else if (typeof window !== "undefined") {
  window.createFileRoute = createFileRoute;
  window.createLazyFileRoute = createLazyFileRoute;
}

// node_modules/@tanstack/react-router/dist/esm/RouterProvider.js
var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
function RouterContextProvider({
  router,
  children,
  ...rest
}) {
  if (Object.keys(rest).length > 0) {
    router.update({
      ...router.options,
      ...rest,
      context: {
        ...router.options.context,
        ...rest.context
      }
    });
  }
  const routerContext2 = getRouterContext();
  const provider = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(routerContext2.Provider, { value: router, children });
  if (router.options.Wrap) {
    return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(router.options.Wrap, { children: provider });
  }
  return provider;
}
function RouterProvider({ router, ...rest }) {
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(RouterContextProvider, { router, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Matches, {}) });
}

// node_modules/@tanstack/react-router/dist/esm/useLocation.js
function useLocation(opts) {
  return useRouterState({
    select: (state) => opts?.select ? opts.select(state.location) : state.location
  });
}

// node_modules/@tanstack/react-router/dist/esm/useCanGoBack.js
function useCanGoBack() {
  return useRouterState({ select: (s) => s.location.state.__TSR_index !== 0 });
}

// packages/route/build-module/lock-unlock.mjs
var import_private_apis = __toESM(require_private_apis(), 1);
var { lock, unlock } = (0, import_private_apis.__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/route"
);

// packages/route/build-module/private-apis.mjs
var privateApis = {};
lock(privateApis, {
  // Router creation and setup
  createBrowserHistory,
  createLazyRoute,
  createRouter,
  createRootRoute,
  createRoute,
  Outlet,
  RouterProvider,
  // Internal routing utilities
  redirect,
  createLink,
  useCanGoBack,
  useLoaderData,
  useLocation,
  useMatches,
  useRouter,
  useRouterState,
  // History utilities
  parseHref
});

// packages/route/build-module/index.mjs
function useInvalidate() {
  const router = useRouter();
  return () => router.invalidate();
}
export {
  Link,
  notFound,
  privateApis,
  redirect,
  useInvalidate,
  useLinkProps,
  useNavigate,
  useParams,
  useSearch
};
/*! Bundled license information:

use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
  (**
   * @license React
   * use-sync-external-store-shim.development.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:
  (**
   * @license React
   * use-sync-external-store-shim/with-selector.development.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)
*/
                                                                                                          dist/script-modules/route/index.min.asset.php                                                       0000644                 00000000217 15212564032 0015337 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-private-apis'), 'version' => 'c5843b6c5e84b352f43b');                                                                                                                                                                                                                                                                                                                                                                                 dist/script-modules/workflow/index.min.js                                                           0000644                 00000174130 15212564032 0014570 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var Wa=Object.create;var vr=Object.defineProperty;var Ba=Object.getOwnPropertyDescriptor;var Va=Object.getOwnPropertyNames;var $a=Object.getPrototypeOf,Ua=Object.prototype.hasOwnProperty;var te=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ha=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Va(t))!Ua.call(e,a)&&a!==r&&vr(e,a,{get:()=>t[a],enumerable:!(o=Ba(t,a))||o.enumerable});return e};var m=(e,t,r)=>(r=e!=null?Wa($a(e)):{},Ha(t||!e||!e.__esModule?vr(r,"default",{value:e,enumerable:!0}):r,e));var je=te((vl,hr)=>{hr.exports=window.wp.element});var b=te((gl,br)=>{br.exports=window.React});var U=te((bl,xr)=>{xr.exports=window.ReactJSXRuntime});var ue=te((Dl,Or)=>{Or.exports=window.ReactDOM});var Ea=te((af,ba)=>{ba.exports=window.wp.data});var xa=te((nf,Sa)=>{Sa.exports=window.wp.i18n});var _a=te((lf,Ca)=>{Ca.exports=window.wp.components});var Pa=te((sf,ka)=>{ka.exports=window.wp.keyboardShortcuts});var Da=te((ff,Oa)=>{Oa.exports=window.wp.primitives});var Ia=te((gf,Na)=>{Na.exports=window.wp.privateApis});var pt=m(je(),1);var gr=1,za=.9,Ka=.8,Ga=.17,yt=.1,Rt=.999,qa=.9999,Ya=.99,Xa=/[\\\/_+.#"@\[\(\{&]/,Za=/[\\\/_+.#"@\[\(\{&]/g,Ja=/[\s-]/,yr=/[\s-]/g;function bt(e,t,r,o,a,n,l){if(n===t.length)return a===e.length?gr:Ya;var i=`${a},${n}`;if(l[i]!==void 0)return l[i];for(var u=o.charAt(n),s=r.indexOf(u,a),f=0,c,g,w,C;s>=0;)c=bt(e,t,r,o,s+1,n+1,l),c>f&&(s===a?c*=gr:Xa.test(e.charAt(s-1))?(c*=Ka,w=e.slice(a,s-1).match(Za),w&&a>0&&(c*=Math.pow(Rt,w.length))):Ja.test(e.charAt(s-1))?(c*=za,C=e.slice(a,s-1).match(yr),C&&a>0&&(c*=Math.pow(Rt,C.length))):(c*=Ga,a>0&&(c*=Math.pow(Rt,s-a))),e.charAt(s)!==t.charAt(n)&&(c*=qa)),(c<yt&&r.charAt(s-1)===o.charAt(n+1)||o.charAt(n+1)===o.charAt(n)&&r.charAt(s-1)!==o.charAt(n))&&(g=bt(e,t,r,o,s+1,n+2,l),g*yt>c&&(c=g*yt)),c>f&&(f=c),s=r.indexOf(u,s+1);return l[i]=f,f}function wr(e){return e.toLowerCase().replace(yr," ")}function Rr(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,bt(e,t,wr(e),wr(t),0,0,{})}var N=m(b(),1);var wl=!!(typeof window<"u"&&window.document&&window.document.createElement);function ye(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e?.(a),r===!1||!a.defaultPrevented)return t?.(a)}}var Sr=m(b(),1);function Er(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Et(...e){return t=>{let r=!1,o=e.map(a=>{let n=Er(a,t);return!r&&typeof n=="function"&&(r=!0),n});if(r)return()=>{for(let a=0;a<o.length;a++){let n=o[a];typeof n=="function"?n():Er(e[a],null)}}}}function We(...e){return Sr.useCallback(Et(...e),e)}var Z=m(b(),1),St=m(U(),1);function Cr(e,t){let r=Z.createContext(t),o=n=>{let{children:l,...i}=n,u=Z.useMemo(()=>i,Object.values(i));return(0,St.jsx)(r.Provider,{value:u,children:l})};o.displayName=e+"Provider";function a(n){let l=Z.useContext(r);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${n}\` must be used within \`${e}\``)}return[o,a]}function _r(e,t=[]){let r=[];function o(n,l){let i=Z.createContext(l),u=r.length;r=[...r,l];let s=c=>{let{scope:g,children:w,...C}=c,v=g?.[e]?.[u]||i,p=Z.useMemo(()=>C,Object.values(C));return(0,St.jsx)(v.Provider,{value:p,children:w})};s.displayName=n+"Provider";function f(c,g){let w=g?.[e]?.[u]||i,C=Z.useContext(w);if(C)return C;if(l!==void 0)return l;throw new Error(`\`${c}\` must be used within \`${n}\``)}return[s,f]}let a=()=>{let n=r.map(l=>Z.createContext(l));return function(i){let u=i?.[e]||n;return Z.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return a.scopeName=e,[o,Qa(a,...t)]}function Qa(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(n){let l=o.reduce((i,{useScope:u,scopeName:s})=>{let c=u(n)[`__scope${s}`];return{...i,...c}},{});return Z.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return r.scopeName=t.scopeName,r}var xt=m(b(),1);var kr=m(b(),1),Be=globalThis?.document?kr.useLayoutEffect:()=>{};var en=xt[" useId ".trim().toString()]||(()=>{}),tn=0;function Ve(e){let[t,r]=xt.useState(en());return Be(()=>{e||r(o=>o??String(tn++))},[e]),e||(t?`radix-${t}`:"")}var J=m(b(),1);var $e=m(b(),1);var rn=J[" useInsertionEffect ".trim().toString()]||Be;function Pr({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){let[a,n,l]=on({defaultProp:t,onChange:r}),i=e!==void 0,u=i?e:a;{let f=J.useRef(e!==void 0);J.useEffect(()=>{let c=f.current;c!==i&&console.warn(`${o} is changing from ${c?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,o])}let s=J.useCallback(f=>{if(i){let c=an(f)?f(e):f;c!==e&&l.current?.(c)}else n(f)},[i,e,n,l]);return[u,s]}function on({defaultProp:e,onChange:t}){let[r,o]=J.useState(e),a=J.useRef(r),n=J.useRef(t);return rn(()=>{n.current=t},[t]),J.useEffect(()=>{a.current!==r&&(n.current?.(r),a.current=r)},[r,a]),[r,o,n]}function an(e){return typeof e=="function"}var F=m(b(),1);var Pl=!!(typeof window<"u"&&window.document&&window.document.createElement);function Ue(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e?.(a),r===!1||!a.defaultPrevented)return t?.(a)}}var Ar=m(b(),1),Tr=m(ue(),1);var W=m(b(),1);var Nr=m(b(),1);function Dr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ct(...e){return t=>{let r=!1,o=e.map(a=>{let n=Dr(a,t);return!r&&typeof n=="function"&&(r=!0),n});if(r)return()=>{for(let a=0;a<o.length;a++){let n=o[a];typeof n=="function"?n():Dr(e[a],null)}}}}function _t(...e){return Nr.useCallback(Ct(...e),e)}var He=m(U(),1);function Ir(e){let t=nn(e),r=W.forwardRef((o,a)=>{let{children:n,...l}=o,i=W.Children.toArray(n),u=i.find(sn);if(u){let s=u.props.children,f=i.map(c=>c===u?W.Children.count(s)>1?W.Children.only(null):W.isValidElement(s)?s.props.children:null:c);return(0,He.jsx)(t,{...l,ref:a,children:W.isValidElement(s)?W.cloneElement(s,void 0,f):null})}return(0,He.jsx)(t,{...l,ref:a,children:n})});return r.displayName=`${e}.Slot`,r}function nn(e){let t=W.forwardRef((r,o)=>{let{children:a,...n}=r;if(W.isValidElement(a)){let l=fn(a),i=un(n,a.props);return a.type!==W.Fragment&&(i.ref=o?Ct(o,l):l),W.cloneElement(a,i)}return W.Children.count(a)>1?W.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ln=Symbol("radix.slottable");function sn(e){return W.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ln}function un(e,t){let r={...t};for(let o in t){let a=e[o],n=t[o];/^on[A-Z]/.test(o)?a&&n?r[o]=(...i)=>{let u=n(...i);return a(...i),u}:a&&(r[o]=a):o==="style"?r[o]={...a,...n}:o==="className"&&(r[o]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}function fn(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Lr=m(U(),1),cn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],kt=cn.reduce((e,t)=>{let r=Ir(`Primitive.${t}`),o=Ar.forwardRef((a,n)=>{let{asChild:l,...i}=a,u=l?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,Lr.jsx)(u,{...i,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Mr(e,t){e&&Tr.flushSync(()=>e.dispatchEvent(t))}var Re=m(b(),1);function De(e){let t=Re.useRef(e);return Re.useEffect(()=>{t.current=e}),Re.useMemo(()=>(...r)=>t.current?.(...r),[])}var Fr=m(b(),1);function jr(e,t=globalThis?.document){let r=De(e);Fr.useEffect(()=>{let o=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[r,t])}var Ot=m(U(),1),dn="DismissableLayer",Pt="dismissableLayer.update",mn="dismissableLayer.pointerDownOutside",pn="dismissableLayer.focusOutside",Wr,Vr=F.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Dt=F.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:n,onInteractOutside:l,onDismiss:i,...u}=e,s=F.useContext(Vr),[f,c]=F.useState(null),g=f?.ownerDocument??globalThis?.document,[,w]=F.useState({}),C=_t(t,R=>c(R)),v=Array.from(s.layers),[p]=[...s.layersWithOutsidePointerEventsDisabled].slice(-1),E=v.indexOf(p),k=f?v.indexOf(f):-1,T=s.layersWithOutsidePointerEventsDisabled.size>0,L=k>=E,P=gn(R=>{let z=R.target,ne=[...s.branches].some(se=>se.contains(z));!L||ne||(a?.(R),l?.(R),R.defaultPrevented||i?.())},g),x=wn(R=>{let z=R.target;[...s.branches].some(se=>se.contains(z))||(n?.(R),l?.(R),R.defaultPrevented||i?.())},g);return jr(R=>{k===s.layers.size-1&&(o?.(R),!R.defaultPrevented&&i&&(R.preventDefault(),i()))},g),F.useEffect(()=>{if(f)return r&&(s.layersWithOutsidePointerEventsDisabled.size===0&&(Wr=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),s.layersWithOutsidePointerEventsDisabled.add(f)),s.layers.add(f),Br(),()=>{r&&s.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Wr)}},[f,g,r,s]),F.useEffect(()=>()=>{f&&(s.layers.delete(f),s.layersWithOutsidePointerEventsDisabled.delete(f),Br())},[f,s]),F.useEffect(()=>{let R=()=>w({});return document.addEventListener(Pt,R),()=>document.removeEventListener(Pt,R)},[]),(0,Ot.jsx)(kt.div,{...u,ref:C,style:{pointerEvents:T?L?"auto":"none":void 0,...e.style},onFocusCapture:Ue(e.onFocusCapture,x.onFocusCapture),onBlurCapture:Ue(e.onBlurCapture,x.onBlurCapture),onPointerDownCapture:Ue(e.onPointerDownCapture,P.onPointerDownCapture)})});Dt.displayName=dn;var vn="DismissableLayerBranch",hn=F.forwardRef((e,t)=>{let r=F.useContext(Vr),o=F.useRef(null),a=_t(t,o);return F.useEffect(()=>{let n=o.current;if(n)return r.branches.add(n),()=>{r.branches.delete(n)}},[r.branches]),(0,Ot.jsx)(kt.div,{...e,ref:a})});hn.displayName=vn;function gn(e,t=globalThis?.document){let r=De(e),o=F.useRef(!1),a=F.useRef(()=>{});return F.useEffect(()=>{let n=i=>{if(i.target&&!o.current){let s=function(){$r(mn,r,f,{discrete:!0})};var u=s;let f={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=s,t.addEventListener("click",a.current,{once:!0})):s()}else t.removeEventListener("click",a.current);o.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",n)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",n),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}function wn(e,t=globalThis?.document){let r=De(e),o=F.useRef(!1);return F.useEffect(()=>{let a=n=>{n.target&&!o.current&&$r(pn,r,{originalEvent:n},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Br(){let e=new CustomEvent(Pt);document.dispatchEvent(e)}function $r(e,t,r,{discrete:o}){let a=r.originalEvent.target,n=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),o?Mr(a,n):a.dispatchEvent(n)}var Q=m(b(),1);var Hr=m(b(),1);function Ur(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Nt(...e){return t=>{let r=!1,o=e.map(a=>{let n=Ur(a,t);return!r&&typeof n=="function"&&(r=!0),n});if(r)return()=>{for(let a=0;a<o.length;a++){let n=o[a];typeof n=="function"?n():Ur(e[a],null)}}}}function zr(...e){return Hr.useCallback(Nt(...e),e)}var Gr=m(b(),1),xn=m(ue(),1);var B=m(b(),1);var ze=m(U(),1);function Kr(e){let t=yn(e),r=B.forwardRef((o,a)=>{let{children:n,...l}=o,i=B.Children.toArray(n),u=i.find(bn);if(u){let s=u.props.children,f=i.map(c=>c===u?B.Children.count(s)>1?B.Children.only(null):B.isValidElement(s)?s.props.children:null:c);return(0,ze.jsx)(t,{...l,ref:a,children:B.isValidElement(s)?B.cloneElement(s,void 0,f):null})}return(0,ze.jsx)(t,{...l,ref:a,children:n})});return r.displayName=`${e}.Slot`,r}function yn(e){let t=B.forwardRef((r,o)=>{let{children:a,...n}=r;if(B.isValidElement(a)){let l=Sn(a),i=En(n,a.props);return a.type!==B.Fragment&&(i.ref=o?Nt(o,l):l),B.cloneElement(a,i)}return B.Children.count(a)>1?B.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Rn=Symbol("radix.slottable");function bn(e){return B.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Rn}function En(e,t){let r={...t};for(let o in t){let a=e[o],n=t[o];/^on[A-Z]/.test(o)?a&&n?r[o]=(...i)=>{let u=n(...i);return a(...i),u}:a&&(r[o]=a):o==="style"?r[o]={...a,...n}:o==="className"&&(r[o]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}function Sn(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var qr=m(U(),1),Cn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Yr=Cn.reduce((e,t)=>{let r=Kr(`Primitive.${t}`),o=Gr.forwardRef((a,n)=>{let{asChild:l,...i}=a,u=l?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,qr.jsx)(u,{...i,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});var be=m(b(),1);function It(e){let t=be.useRef(e);return be.useEffect(()=>{t.current=e}),be.useMemo(()=>(...r)=>t.current?.(...r),[])}var eo=m(U(),1),At="focusScope.autoFocusOnMount",Tt="focusScope.autoFocusOnUnmount",Xr={bubbles:!1,cancelable:!0},_n="FocusScope",Lt=Q.forwardRef((e,t)=>{let{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:n,...l}=e,[i,u]=Q.useState(null),s=It(a),f=It(n),c=Q.useRef(null),g=zr(t,v=>u(v)),w=Q.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Q.useEffect(()=>{if(o){let k=function(x){if(w.paused||!i)return;let R=x.target;i.contains(R)?c.current=R:ie(c.current,{select:!0})},T=function(x){if(w.paused||!i)return;let R=x.relatedTarget;R!==null&&(i.contains(R)||ie(c.current,{select:!0}))},L=function(x){if(document.activeElement===document.body)for(let z of x)z.removedNodes.length>0&&ie(i)};var v=k,p=T,E=L;document.addEventListener("focusin",k),document.addEventListener("focusout",T);let P=new MutationObserver(L);return i&&P.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",T),P.disconnect()}}},[o,i,w.paused]),Q.useEffect(()=>{if(i){Jr.add(w);let v=document.activeElement;if(!i.contains(v)){let E=new CustomEvent(At,Xr);i.addEventListener(At,s),i.dispatchEvent(E),E.defaultPrevented||(kn(In(to(i)),{select:!0}),document.activeElement===v&&ie(i))}return()=>{i.removeEventListener(At,s),setTimeout(()=>{let E=new CustomEvent(Tt,Xr);i.addEventListener(Tt,f),i.dispatchEvent(E),E.defaultPrevented||ie(v??document.body,{select:!0}),i.removeEventListener(Tt,f),Jr.remove(w)},0)}}},[i,s,f,w]);let C=Q.useCallback(v=>{if(!r&&!o||w.paused)return;let p=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,E=document.activeElement;if(p&&E){let k=v.currentTarget,[T,L]=Pn(k);T&&L?!v.shiftKey&&E===L?(v.preventDefault(),r&&ie(T,{select:!0})):v.shiftKey&&E===T&&(v.preventDefault(),r&&ie(L,{select:!0})):E===k&&v.preventDefault()}},[r,o,w.paused]);return(0,eo.jsx)(Yr.div,{tabIndex:-1,...l,ref:g,onKeyDown:C})});Lt.displayName=_n;function kn(e,{select:t=!1}={}){let r=document.activeElement;for(let o of e)if(ie(o,{select:t}),document.activeElement!==r)return}function Pn(e){let t=to(e),r=Zr(t,e),o=Zr(t.reverse(),e);return[r,o]}function to(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{let a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Zr(e,t){for(let r of e)if(!On(r,{upTo:t}))return r}function On(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Dn(e){return e instanceof HTMLInputElement&&"select"in e}function ie(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Dn(e)&&t&&e.select()}}var Jr=Nn();function Nn(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),e=Qr(e,t),e.unshift(t)},remove(t){e=Qr(e,t),e[0]?.resume()}}}function Qr(e,t){let r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function In(e){return e.filter(t=>t.tagName!=="A")}var Ge=m(b(),1),fo=m(ue(),1);var no=m(b(),1),Wn=m(ue(),1);var V=m(b(),1);var An=m(b(),1);function ro(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function oo(...e){return t=>{let r=!1,o=e.map(a=>{let n=ro(a,t);return!r&&typeof n=="function"&&(r=!0),n});if(r)return()=>{for(let a=0;a<o.length;a++){let n=o[a];typeof n=="function"?n():ro(e[a],null)}}}}var Ke=m(U(),1);function ao(e){let t=Tn(e),r=V.forwardRef((o,a)=>{let{children:n,...l}=o,i=V.Children.toArray(n),u=i.find(Mn);if(u){let s=u.props.children,f=i.map(c=>c===u?V.Children.count(s)>1?V.Children.only(null):V.isValidElement(s)?s.props.children:null:c);return(0,Ke.jsx)(t,{...l,ref:a,children:V.isValidElement(s)?V.cloneElement(s,void 0,f):null})}return(0,Ke.jsx)(t,{...l,ref:a,children:n})});return r.displayName=`${e}.Slot`,r}function Tn(e){let t=V.forwardRef((r,o)=>{let{children:a,...n}=r;if(V.isValidElement(a)){let l=jn(a),i=Fn(n,a.props);return a.type!==V.Fragment&&(i.ref=o?oo(o,l):l),V.cloneElement(a,i)}return V.Children.count(a)>1?V.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ln=Symbol("radix.slottable");function Mn(e){return V.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ln}function Fn(e,t){let r={...t};for(let o in t){let a=e[o],n=t[o];/^on[A-Z]/.test(o)?a&&n?r[o]=(...i)=>{let u=n(...i);return a(...i),u}:a&&(r[o]=a):o==="style"?r[o]={...a,...n}:o==="className"&&(r[o]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}function jn(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var io=m(U(),1),Bn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],lo=Bn.reduce((e,t)=>{let r=ao(`Primitive.${t}`),o=no.forwardRef((a,n)=>{let{asChild:l,...i}=a,u=l?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,io.jsx)(u,{...i,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});var so=m(b(),1),uo=globalThis?.document?so.useLayoutEffect:()=>{};var co=m(U(),1),Vn="Portal",Mt=Ge.forwardRef((e,t)=>{let{container:r,...o}=e,[a,n]=Ge.useState(!1);uo(()=>n(!0),[]);let l=r||a&&globalThis?.document?.body;return l?fo.default.createPortal((0,co.jsx)(lo.div,{...o,ref:t}),l):null});Mt.displayName=Vn;var q=m(b(),1);var po=m(b(),1);function mo(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function $n(...e){return t=>{let r=!1,o=e.map(a=>{let n=mo(a,t);return!r&&typeof n=="function"&&(r=!0),n});if(r)return()=>{for(let a=0;a<o.length;a++){let n=o[a];typeof n=="function"?n():mo(e[a],null)}}}}function vo(...e){return po.useCallback($n(...e),e)}var ho=m(b(),1),Ft=globalThis?.document?ho.useLayoutEffect:()=>{};var go=m(b(),1);function Un(e,t){return go.useReducer((r,o)=>t[r][o]??r,e)}var Ne=e=>{let{present:t,children:r}=e,o=Hn(t),a=typeof r=="function"?r({present:o.isPresent}):q.Children.only(r),n=vo(o.ref,zn(a));return typeof r=="function"||o.isPresent?q.cloneElement(a,{ref:n}):null};Ne.displayName="Presence";function Hn(e){let[t,r]=q.useState(),o=q.useRef(null),a=q.useRef(e),n=q.useRef("none"),l=e?"mounted":"unmounted",[i,u]=Un(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return q.useEffect(()=>{let s=qe(o.current);n.current=i==="mounted"?s:"none"},[i]),Ft(()=>{let s=o.current,f=a.current;if(f!==e){let g=n.current,w=qe(s);e?u("MOUNT"):w==="none"||s?.display==="none"?u("UNMOUNT"):u(f&&g!==w?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,u]),Ft(()=>{if(t){let s,f=t.ownerDocument.defaultView??window,c=w=>{let v=qe(o.current).includes(CSS.escape(w.animationName));if(w.target===t&&v&&(u("ANIMATION_END"),!a.current)){let p=t.style.animationFillMode;t.style.animationFillMode="forwards",s=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=p)})}},g=w=>{w.target===t&&(n.current=qe(o.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{f.clearTimeout(s),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:q.useCallback(s=>{o.current=s?getComputedStyle(s):null,r(s)},[])}}function qe(e){return e?.animationName||"none"}function zn(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var wo=m(b(),1),Zn=m(ue(),1);var $=m(b(),1);var Ye=m(U(),1);function Xe(e){let t=Kn(e),r=$.forwardRef((o,a)=>{let{children:n,...l}=o,i=$.Children.toArray(n),u=i.find(qn);if(u){let s=u.props.children,f=i.map(c=>c===u?$.Children.count(s)>1?$.Children.only(null):$.isValidElement(s)?s.props.children:null:c);return(0,Ye.jsx)(t,{...l,ref:a,children:$.isValidElement(s)?$.cloneElement(s,void 0,f):null})}return(0,Ye.jsx)(t,{...l,ref:a,children:n})});return r.displayName=`${e}.Slot`,r}function Kn(e){let t=$.forwardRef((r,o)=>{let{children:a,...n}=r;if($.isValidElement(a)){let l=Xn(a),i=Yn(n,a.props);return a.type!==$.Fragment&&(i.ref=o?Et(o,l):l),$.cloneElement(a,i)}return $.Children.count(a)>1?$.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Gn=Symbol("radix.slottable");function qn(e){return $.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Gn}function Yn(e,t){let r={...t};for(let o in t){let a=e[o],n=t[o];/^on[A-Z]/.test(o)?a&&n?r[o]=(...i)=>{let u=n(...i);return a(...i),u}:a&&(r[o]=a):o==="style"?r[o]={...a,...n}:o==="className"&&(r[o]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}function Xn(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var yo=m(U(),1),Jn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ee=Jn.reduce((e,t)=>{let r=Xe(`Primitive.${t}`),o=wo.forwardRef((a,n)=>{let{asChild:l,...i}=a,u=l?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,yo.jsx)(u,{...i,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});var bo=m(b(),1),jt=0;function Eo(){bo.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ro()),document.body.insertAdjacentElement("beforeend",e[1]??Ro()),jt++,()=>{jt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),jt--}},[])}function Ro(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Y=function(){return Y=Object.assign||function(t){for(var r,o=1,a=arguments.length;o<a;o++){r=arguments[o];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Y.apply(this,arguments)};function Ze(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(r[o[a]]=e[o[a]]);return r}function So(e,t,r){if(r||arguments.length===2)for(var o=0,a=t.length,n;o<a;o++)(n||!(o in t))&&(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var rt=m(b());var H=m(b());var fe="right-scroll-bar-position",ce="width-before-scroll-bar",Wt="with-scroll-bars-hidden",Bt="--removed-body-scroll-bar-size";function Je(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var xo=m(b());function Co(e,t){var r=(0,xo.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(o){var a=r.value;a!==o&&(r.value=o,r.callback(o,a))}}}})[0];return r.callback=t,r.facade}var Qe=m(b());var Qn=typeof window<"u"?Qe.useLayoutEffect:Qe.useEffect,_o=new WeakMap;function Vt(e,t){var r=Co(t||null,function(o){return e.forEach(function(a){return Je(a,o)})});return Qn(function(){var o=_o.get(r);if(o){var a=new Set(o),n=new Set(e),l=r.current;a.forEach(function(i){n.has(i)||Je(i,null)}),n.forEach(function(i){a.has(i)||Je(i,l)})}_o.set(r,e)},[e]),r}function ei(e){return e}function ti(e,t){t===void 0&&(t=ei);var r=[],o=!1,a={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(n){var l=t(n,o);return r.push(l),function(){r=r.filter(function(i){return i!==l})}},assignSyncMedium:function(n){for(o=!0;r.length;){var l=r;r=[],l.forEach(n)}r={push:function(i){return n(i)},filter:function(){return r}}},assignMedium:function(n){o=!0;var l=[];if(r.length){var i=r;r=[],i.forEach(n),l=r}var u=function(){var f=l;l=[],f.forEach(n)},s=function(){return Promise.resolve().then(u)};s(),r={push:function(f){l.push(f),s()},filter:function(f){return l=l.filter(f),r}}}};return a}function $t(e){e===void 0&&(e={});var t=ti(null);return t.options=Y({async:!0,ssr:!1},e),t}var ko=m(b()),Po=function(e){var t=e.sideCar,r=Ze(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return ko.createElement(o,Y({},r))};Po.isSideCarExport=!0;function Ut(e,t){return e.useMedium(t),Po}var et=$t();var Ht=function(){},Ie=H.forwardRef(function(e,t){var r=H.useRef(null),o=H.useState({onScrollCapture:Ht,onWheelCapture:Ht,onTouchMoveCapture:Ht}),a=o[0],n=o[1],l=e.forwardProps,i=e.children,u=e.className,s=e.removeScrollBar,f=e.enabled,c=e.shards,g=e.sideCar,w=e.noRelative,C=e.noIsolation,v=e.inert,p=e.allowPinchZoom,E=e.as,k=E===void 0?"div":E,T=e.gapMode,L=Ze(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=g,x=Vt([r,t]),R=Y(Y({},L),a);return H.createElement(H.Fragment,null,f&&H.createElement(P,{sideCar:et,removeScrollBar:s,shards:c,noRelative:w,noIsolation:C,inert:v,setCallbacks:n,allowPinchZoom:!!p,lockRef:r,gapMode:T}),l?H.cloneElement(H.Children.only(i),Y(Y({},R),{ref:x})):H.createElement(k,Y({},R,{className:u,ref:x}),i))});Ie.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ie.classNames={fullWidth:ce,zeroRight:fe};var I=m(b());var xe=m(b());var No=m(b());var Oo;var Do=function(){if(Oo)return Oo;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ri(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Do();return t&&e.setAttribute("nonce",t),e}function oi(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ai(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var zt=function(){var e=0,t=null;return{add:function(r){e==0&&(t=ri())&&(oi(t,r),ai(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var Kt=function(){var e=zt();return function(t,r){No.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}};var Ae=function(){var e=Kt(),t=function(r){var o=r.styles,a=r.dynamic;return e(o,a),null};return t};var ni={left:0,top:0,right:0,gap:0},Gt=function(e){return parseInt(e||"",10)||0},ii=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Gt(r),Gt(o),Gt(a)]},qt=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ni;var t=ii(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-r+t[2]-t[0])}};var li=Ae(),Se="data-scroll-locked",si=function(e,t,r,o){var a=e.left,n=e.top,l=e.right,i=e.gap;return r===void 0&&(r="margin"),`
  .`.concat(Wt,` {
   overflow: hidden `).concat(o,`;
   padding-right: `).concat(i,"px ").concat(o,`;
  }
  body[`).concat(Se,`] {
    overflow: hidden `).concat(o,`;
    overscroll-behavior: contain;
    `).concat([t&&"position: relative ".concat(o,";"),r==="margin"&&`
    padding-left: `.concat(a,`px;
    padding-top: `).concat(n,`px;
    padding-right: `).concat(l,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(i,"px ").concat(o,`;
    `),r==="padding"&&"padding-right: ".concat(i,"px ").concat(o,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(fe,` {
    right: `).concat(i,"px ").concat(o,`;
  }
  
  .`).concat(ce,` {
    margin-right: `).concat(i,"px ").concat(o,`;
  }
  
  .`).concat(fe," .").concat(fe,` {
    right: 0 `).concat(o,`;
  }
  
  .`).concat(ce," .").concat(ce,` {
    margin-right: 0 `).concat(o,`;
  }
  
  body[`).concat(Se,`] {
    `).concat(Bt,": ").concat(i,`px;
  }
`)},Io=function(){var e=parseInt(document.body.getAttribute(Se)||"0",10);return isFinite(e)?e:0},ui=function(){xe.useEffect(function(){return document.body.setAttribute(Se,(Io()+1).toString()),function(){var e=Io()-1;e<=0?document.body.removeAttribute(Se):document.body.setAttribute(Se,e.toString())}},[])},Yt=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,a=o===void 0?"margin":o;ui();var n=xe.useMemo(function(){return qt(a)},[a]);return xe.createElement(li,{styles:si(n,!t,a,r?"":"!important")})};var Xt=!1;if(typeof window<"u")try{Te=Object.defineProperty({},"passive",{get:function(){return Xt=!0,!0}}),window.addEventListener("test",Te,Te),window.removeEventListener("test",Te,Te)}catch{Xt=!1}var Te,de=Xt?{passive:!1}:!1;var fi=function(e){return e.tagName==="TEXTAREA"},Ao=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!fi(e)&&r[t]==="visible")},ci=function(e){return Ao(e,"overflowY")},di=function(e){return Ao(e,"overflowX")},Zt=function(e,t){var r=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var a=To(e,o);if(a){var n=Lo(e,o),l=n[1],i=n[2];if(l>i)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},mi=function(e){var t=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[t,r,o]},pi=function(e){var t=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[t,r,o]},To=function(e,t){return e==="v"?ci(t):di(t)},Lo=function(e,t){return e==="v"?mi(t):pi(t)},vi=function(e,t){return e==="h"&&t==="rtl"?-1:1},Mo=function(e,t,r,o,a){var n=vi(e,window.getComputedStyle(t).direction),l=n*o,i=r.target,u=t.contains(i),s=!1,f=l>0,c=0,g=0;do{if(!i)break;var w=Lo(e,i),C=w[0],v=w[1],p=w[2],E=v-p-n*C;(C||E)&&To(e,i)&&(c+=E,g+=C);var k=i.parentNode;i=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!u&&i!==document.body||u&&(t.contains(i)||t===i));return(f&&(a&&Math.abs(c)<1||!a&&l>c)||!f&&(a&&Math.abs(g)<1||!a&&-l>g))&&(s=!0),s};var tt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Fo=function(e){return[e.deltaX,e.deltaY]},jo=function(e){return e&&"current"in e?e.current:e},hi=function(e,t){return e[0]===t[0]&&e[1]===t[1]},gi=function(e){return`
  .block-interactivity-`.concat(e,` {pointer-events: none;}
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},wi=0,Ce=[];function Wo(e){var t=I.useRef([]),r=I.useRef([0,0]),o=I.useRef(),a=I.useState(wi++)[0],n=I.useState(Ae)[0],l=I.useRef(e);I.useEffect(function(){l.current=e},[e]),I.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var v=So([e.lockRef.current],(e.shards||[]).map(jo),!0).filter(Boolean);return v.forEach(function(p){return p.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),v.forEach(function(p){return p.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var i=I.useCallback(function(v,p){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!l.current.allowPinchZoom;var E=tt(v),k=r.current,T="deltaX"in v?v.deltaX:k[0]-E[0],L="deltaY"in v?v.deltaY:k[1]-E[1],P,x=v.target,R=Math.abs(T)>Math.abs(L)?"h":"v";if("touches"in v&&R==="h"&&x.type==="range")return!1;var z=Zt(R,x);if(!z)return!0;if(z?P=R:(P=R==="v"?"h":"v",z=Zt(R,x)),!z)return!1;if(!o.current&&"changedTouches"in v&&(T||L)&&(o.current=P),!P)return!0;var ne=o.current||P;return Mo(ne,p,v,ne==="h"?T:L,!0)},[]),u=I.useCallback(function(v){var p=v;if(!(!Ce.length||Ce[Ce.length-1]!==n)){var E="deltaY"in p?Fo(p):tt(p),k=t.current.filter(function(P){return P.name===p.type&&(P.target===p.target||p.target===P.shadowParent)&&hi(P.delta,E)})[0];if(k&&k.should){p.cancelable&&p.preventDefault();return}if(!k){var T=(l.current.shards||[]).map(jo).filter(Boolean).filter(function(P){return P.contains(p.target)}),L=T.length>0?i(p,T[0]):!l.current.noIsolation;L&&p.cancelable&&p.preventDefault()}}},[]),s=I.useCallback(function(v,p,E,k){var T={name:v,delta:p,target:E,should:k,shadowParent:yi(E)};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(L){return L!==T})},1)},[]),f=I.useCallback(function(v){r.current=tt(v),o.current=void 0},[]),c=I.useCallback(function(v){s(v.type,Fo(v),v.target,i(v,e.lockRef.current))},[]),g=I.useCallback(function(v){s(v.type,tt(v),v.target,i(v,e.lockRef.current))},[]);I.useEffect(function(){return Ce.push(n),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:g}),document.addEventListener("wheel",u,de),document.addEventListener("touchmove",u,de),document.addEventListener("touchstart",f,de),function(){Ce=Ce.filter(function(v){return v!==n}),document.removeEventListener("wheel",u,de),document.removeEventListener("touchmove",u,de),document.removeEventListener("touchstart",f,de)}},[]);var w=e.removeScrollBar,C=e.inert;return I.createElement(I.Fragment,null,C?I.createElement(n,{styles:gi(a)}):null,w?I.createElement(Yt,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function yi(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Bo=Ut(et,Wo);var Vo=rt.forwardRef(function(e,t){return rt.createElement(Ie,Y({},e,{ref:t,sideCar:Bo}))});Vo.classNames=Ie.classNames;var Jt=Vo;var Ri=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_e=new WeakMap,ot=new WeakMap,at={},Qt=0,$o=function(e){return e&&(e.host||$o(e.parentNode))},bi=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=$o(r);return o&&e.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Ei=function(e,t,r,o){var a=bi(t,Array.isArray(e)?e:[e]);at[r]||(at[r]=new WeakMap);var n=at[r],l=[],i=new Set,u=new Set(a),s=function(c){!c||i.has(c)||(i.add(c),s(c.parentNode))};a.forEach(s);var f=function(c){!c||u.has(c)||Array.prototype.forEach.call(c.children,function(g){if(i.has(g))f(g);else try{var w=g.getAttribute(o),C=w!==null&&w!=="false",v=(_e.get(g)||0)+1,p=(n.get(g)||0)+1;_e.set(g,v),n.set(g,p),l.push(g),v===1&&C&&ot.set(g,!0),p===1&&g.setAttribute(r,"true"),C||g.setAttribute(o,"true")}catch(E){console.error("aria-hidden: cannot operate on ",g,E)}})};return f(t),i.clear(),Qt++,function(){l.forEach(function(c){var g=_e.get(c)-1,w=n.get(c)-1;_e.set(c,g),n.set(c,w),g||(ot.has(c)||c.removeAttribute(o),ot.delete(c)),w||c.removeAttribute(r)}),Qt--,Qt||(_e=new WeakMap,_e=new WeakMap,ot=new WeakMap,at={})}},Uo=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),a=t||Ri(e);return a?(o.push.apply(o,Array.from(a.querySelectorAll("[aria-live], script"))),Ei(o,a,r,"aria-hidden")):function(){return null}};var O=m(U(),1),it="Dialog",[Ho,Uu]=_r(it),[Si,ee]=Ho(it),zo=e=>{let{__scopeDialog:t,children:r,open:o,defaultOpen:a,onOpenChange:n,modal:l=!0}=e,i=N.useRef(null),u=N.useRef(null),[s,f]=Pr({prop:o,defaultProp:a??!1,onChange:n,caller:it});return(0,O.jsx)(Si,{scope:t,triggerRef:i,contentRef:u,contentId:Ve(),titleId:Ve(),descriptionId:Ve(),open:s,onOpenChange:f,onOpenToggle:N.useCallback(()=>f(c=>!c),[f]),modal:l,children:r})};zo.displayName=it;var Ko="DialogTrigger",xi=N.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,a=ee(Ko,r),n=We(t,a.triggerRef);return(0,O.jsx)(Ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":rr(a.open),...o,ref:n,onClick:ye(e.onClick,a.onOpenToggle)})});xi.displayName=Ko;var er="DialogPortal",[Ci,Go]=Ho(er,{forceMount:void 0}),qo=e=>{let{__scopeDialog:t,forceMount:r,children:o,container:a}=e,n=ee(er,t);return(0,O.jsx)(Ci,{scope:t,forceMount:r,children:N.Children.map(o,l=>(0,O.jsx)(Ne,{present:r||n.open,children:(0,O.jsx)(Mt,{asChild:!0,container:a,children:l})}))})};qo.displayName=er;var nt="DialogOverlay",Yo=N.forwardRef((e,t)=>{let r=Go(nt,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,n=ee(nt,e.__scopeDialog);return n.modal?(0,O.jsx)(Ne,{present:o||n.open,children:(0,O.jsx)(ki,{...a,ref:t})}):null});Yo.displayName=nt;var _i=Xe("DialogOverlay.RemoveScroll"),ki=N.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,a=ee(nt,r);return(0,O.jsx)(Jt,{as:_i,allowPinchZoom:!0,shards:[a.contentRef],children:(0,O.jsx)(Ee.div,{"data-state":rr(a.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),me="DialogContent",Xo=N.forwardRef((e,t)=>{let r=Go(me,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,n=ee(me,e.__scopeDialog);return(0,O.jsx)(Ne,{present:o||n.open,children:n.modal?(0,O.jsx)(Pi,{...a,ref:t}):(0,O.jsx)(Oi,{...a,ref:t})})});Xo.displayName=me;var Pi=N.forwardRef((e,t)=>{let r=ee(me,e.__scopeDialog),o=N.useRef(null),a=We(t,r.contentRef,o);return N.useEffect(()=>{let n=o.current;if(n)return Uo(n)},[]),(0,O.jsx)(Zo,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ye(e.onCloseAutoFocus,n=>{n.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:ye(e.onPointerDownOutside,n=>{let l=n.detail.originalEvent,i=l.button===0&&l.ctrlKey===!0;(l.button===2||i)&&n.preventDefault()}),onFocusOutside:ye(e.onFocusOutside,n=>n.preventDefault())})}),Oi=N.forwardRef((e,t)=>{let r=ee(me,e.__scopeDialog),o=N.useRef(!1),a=N.useRef(!1);return(0,O.jsx)(Zo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{e.onCloseAutoFocus?.(n),n.defaultPrevented||(o.current||r.triggerRef.current?.focus(),n.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:n=>{e.onInteractOutside?.(n),n.defaultPrevented||(o.current=!0,n.detail.originalEvent.type==="pointerdown"&&(a.current=!0));let l=n.target;r.triggerRef.current?.contains(l)&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&a.current&&n.preventDefault()}})}),Zo=N.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:n,...l}=e,i=ee(me,r),u=N.useRef(null),s=We(t,u);return Eo(),(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(Lt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:n,children:(0,O.jsx)(Dt,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":rr(i.open),...l,ref:s,onDismiss:()=>i.onOpenChange(!1)})}),(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(Ai,{titleId:i.titleId}),(0,O.jsx)(Li,{contentRef:u,descriptionId:i.descriptionId})]})]})}),tr="DialogTitle",Di=N.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,a=ee(tr,r);return(0,O.jsx)(Ee.h2,{id:a.titleId,...o,ref:t})});Di.displayName=tr;var Jo="DialogDescription",Ni=N.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,a=ee(Jo,r);return(0,O.jsx)(Ee.p,{id:a.descriptionId,...o,ref:t})});Ni.displayName=Jo;var Qo="DialogClose",Ii=N.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,a=ee(Qo,r);return(0,O.jsx)(Ee.button,{type:"button",...o,ref:t,onClick:ye(e.onClick,()=>a.onOpenChange(!1))})});Ii.displayName=Qo;function rr(e){return e?"open":"closed"}var ea="DialogTitleWarning",[Hu,ta]=Cr(ea,{contentName:me,titleName:tr,docsSlug:"dialog"}),Ai=({titleId:e})=>{let t=ta(ea),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return N.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Ti="DialogDescriptionWarning",Li=({contentRef:e,descriptionId:t})=>{let o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ta(Ti).contentName}}.`;return N.useEffect(()=>{let a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},ra=zo;var oa=qo,aa=Yo,na=Xo;var h=m(b(),1);var ua=m(b(),1),zi=m(ue(),1);var j=m(b(),1);var Fi=m(b(),1);function ia(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function le(...e){return t=>{let r=!1,o=e.map(a=>{let n=ia(a,t);return!r&&typeof n=="function"&&(r=!0),n});if(r)return()=>{for(let a=0;a<o.length;a++){let n=o[a];typeof n=="function"?n():ia(e[a],null)}}}}var lt=m(U(),1),ji=Symbol.for("react.lazy"),st=j[" use ".trim().toString()];function Wi(e){return typeof e=="object"&&e!==null&&"then"in e}function la(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===ji&&"_payload"in e&&Wi(e._payload)}function sa(e){let t=Bi(e),r=j.forwardRef((o,a)=>{let{children:n,...l}=o;la(n)&&typeof st=="function"&&(n=st(n._payload));let i=j.Children.toArray(n),u=i.find($i);if(u){let s=u.props.children,f=i.map(c=>c===u?j.Children.count(s)>1?j.Children.only(null):j.isValidElement(s)?s.props.children:null:c);return(0,lt.jsx)(t,{...l,ref:a,children:j.isValidElement(s)?j.cloneElement(s,void 0,f):null})}return(0,lt.jsx)(t,{...l,ref:a,children:n})});return r.displayName=`${e}.Slot`,r}function Bi(e){let t=j.forwardRef((r,o)=>{let{children:a,...n}=r;if(la(a)&&typeof st=="function"&&(a=st(a._payload)),j.isValidElement(a)){let l=Hi(a),i=Ui(n,a.props);return a.type!==j.Fragment&&(i.ref=o?le(o,l):l),j.cloneElement(a,i)}return j.Children.count(a)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Vi=Symbol("radix.slottable");function $i(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vi}function Ui(e,t){let r={...t};for(let o in t){let a=e[o],n=t[o];/^on[A-Z]/.test(o)?a&&n?r[o]=(...i)=>{let u=n(...i);return a(...i),u}:a&&(r[o]=a):o==="style"?r[o]={...a,...n}:o==="className"&&(r[o]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}function Hi(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var fa=m(U(),1),Ki=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ae=Ki.reduce((e,t)=>{let r=sa(`Primitive.${t}`),o=ua.forwardRef((a,n)=>{let{asChild:l,...i}=a,u=l?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,fa.jsx)(u,{...i,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});var or=m(b(),1);var ca=m(b(),1),da=globalThis?.document?ca.useLayoutEffect:()=>{};var Gi=or[" useId ".trim().toString()]||(()=>{}),qi=0;function pe(e){let[t,r]=or.useState(Gi());return da(()=>{e||r(o=>o??String(qi++))},[e]),e||(t?`radix-${t}`:"")}var Le='[cmdk-group=""]',ar='[cmdk-group-items=""]',Yi='[cmdk-group-heading=""]',pa='[cmdk-item=""]',ma=`${pa}:not([aria-disabled="true"])`,nr="cmdk-item-select",ke="data-value",Xi=(e,t,r)=>Rr(e,t,r),va=h.createContext(void 0),Me=()=>h.useContext(va),ha=h.createContext(void 0),ir=()=>h.useContext(ha),ga=h.createContext(void 0),wa=h.forwardRef((e,t)=>{let r=Pe(()=>{var d,S;return{search:"",value:(S=(d=e.value)!=null?d:e.defaultValue)!=null?S:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=Pe(()=>new Set),a=Pe(()=>new Map),n=Pe(()=>new Map),l=Pe(()=>new Set),i=ya(e),{label:u,children:s,value:f,onValueChange:c,filter:g,shouldFilter:w,loop:C,disablePointerSelection:v=!1,vimBindings:p=!0,...E}=e,k=pe(),T=pe(),L=pe(),P=h.useRef(null),x=ll();ve(()=>{if(f!==void 0){let d=f.trim();r.current.value=d,R.emit()}},[f]),ve(()=>{x(6,fr)},[]);let R=h.useMemo(()=>({subscribe:d=>(l.current.add(d),()=>l.current.delete(d)),snapshot:()=>r.current,setState:(d,S,_)=>{var y,D,M,X;if(!Object.is(r.current[d],S)){if(r.current[d]=S,d==="search")ht(),se(),x(1,vt);else if(d==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let K=document.getElementById(L);K?K.focus():(y=document.getElementById(k))==null||y.focus()}if(x(7,()=>{var K;r.current.selectedItemId=(K=we())==null?void 0:K.id,R.emit()}),_||x(5,fr),((D=i.current)==null?void 0:D.value)!==void 0){let K=S??"";(X=(M=i.current).onValueChange)==null||X.call(M,K);return}}R.emit()}},emit:()=>{l.current.forEach(d=>d())}}),[]),z=h.useMemo(()=>({value:(d,S,_)=>{var y;S!==((y=n.current.get(d))==null?void 0:y.value)&&(n.current.set(d,{value:S,keywords:_}),r.current.filtered.items.set(d,ne(S,_)),x(2,()=>{se(),R.emit()}))},item:(d,S)=>(o.current.add(d),S&&(a.current.has(S)?a.current.get(S).add(d):a.current.set(S,new Set([d]))),x(3,()=>{ht(),se(),r.current.value||vt(),R.emit()}),()=>{n.current.delete(d),o.current.delete(d),r.current.filtered.items.delete(d);let _=we();x(4,()=>{ht(),_?.getAttribute("id")===d&&vt(),R.emit()})}),group:d=>(a.current.has(d)||a.current.set(d,new Set),()=>{n.current.delete(d),a.current.delete(d)}),filter:()=>i.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:k,inputId:L,labelId:T,listInnerRef:P}),[]);function ne(d,S){var _,y;let D=(y=(_=i.current)==null?void 0:_.filter)!=null?y:Xi;return d?D(d,r.current.search,S):0}function se(){if(!r.current.search||i.current.shouldFilter===!1)return;let d=r.current.filtered.items,S=[];r.current.filtered.groups.forEach(y=>{let D=a.current.get(y),M=0;D.forEach(X=>{let K=d.get(X);M=Math.max(K,M)}),S.push([y,M])});let _=P.current;Oe().sort((y,D)=>{var M,X;let K=y.getAttribute("id"),Fe=D.getAttribute("id");return((M=d.get(Fe))!=null?M:0)-((X=d.get(K))!=null?X:0)}).forEach(y=>{let D=y.closest(ar);D?D.appendChild(y.parentElement===D?y:y.closest(`${ar} > *`)):_.appendChild(y.parentElement===_?y:y.closest(`${ar} > *`))}),S.sort((y,D)=>D[1]-y[1]).forEach(y=>{var D;let M=(D=P.current)==null?void 0:D.querySelector(`${Le}[${ke}="${encodeURIComponent(y[0])}"]`);M?.parentElement.appendChild(M)})}function vt(){let d=Oe().find(_=>_.getAttribute("aria-disabled")!=="true"),S=d?.getAttribute(ke);R.setState("value",S||void 0)}function ht(){var d,S,_,y;if(!r.current.search||i.current.shouldFilter===!1){r.current.filtered.count=o.current.size;return}r.current.filtered.groups=new Set;let D=0;for(let M of o.current){let X=(S=(d=n.current.get(M))==null?void 0:d.value)!=null?S:"",K=(y=(_=n.current.get(M))==null?void 0:_.keywords)!=null?y:[],Fe=ne(X,K);r.current.filtered.items.set(M,Fe),Fe>0&&D++}for(let[M,X]of a.current)for(let K of X)if(r.current.filtered.items.get(K)>0){r.current.filtered.groups.add(M);break}r.current.filtered.count=D}function fr(){var d,S,_;let y=we();y&&(((d=y.parentElement)==null?void 0:d.firstChild)===y&&((_=(S=y.closest(Le))==null?void 0:S.querySelector(Yi))==null||_.scrollIntoView({block:"nearest"})),y.scrollIntoView({block:"nearest"}))}function we(){var d;return(d=P.current)==null?void 0:d.querySelector(`${pa}[aria-selected="true"]`)}function Oe(){var d;return Array.from(((d=P.current)==null?void 0:d.querySelectorAll(ma))||[])}function gt(d){let S=Oe()[d];S&&R.setState("value",S.getAttribute(ke))}function wt(d){var S;let _=we(),y=Oe(),D=y.findIndex(X=>X===_),M=y[D+d];(S=i.current)!=null&&S.loop&&(M=D+d<0?y[y.length-1]:D+d===y.length?y[0]:y[D+d]),M&&R.setState("value",M.getAttribute(ke))}function cr(d){let S=we(),_=S?.closest(Le),y;for(;_&&!y;)_=d>0?nl(_,Le):il(_,Le),y=_?.querySelector(ma);y?R.setState("value",y.getAttribute(ke)):wt(d)}let dr=()=>gt(Oe().length-1),mr=d=>{d.preventDefault(),d.metaKey?dr():d.altKey?cr(1):wt(1)},pr=d=>{d.preventDefault(),d.metaKey?gt(0):d.altKey?cr(-1):wt(-1)};return h.createElement(ae.div,{ref:t,tabIndex:-1,...E,"cmdk-root":"",onKeyDown:d=>{var S;(S=E.onKeyDown)==null||S.call(E,d);let _=d.nativeEvent.isComposing||d.keyCode===229;if(!(d.defaultPrevented||_))switch(d.key){case"n":case"j":{p&&d.ctrlKey&&mr(d);break}case"ArrowDown":{mr(d);break}case"p":case"k":{p&&d.ctrlKey&&pr(d);break}case"ArrowUp":{pr(d);break}case"Home":{d.preventDefault(),gt(0);break}case"End":{d.preventDefault(),dr();break}case"Enter":{d.preventDefault();let y=we();if(y){let D=new Event(nr);y.dispatchEvent(D)}}}}},h.createElement("label",{"cmdk-label":"",htmlFor:z.inputId,id:z.labelId,style:ul},u),ut(e,d=>h.createElement(ha.Provider,{value:R},h.createElement(va.Provider,{value:z},d))))}),Zi=h.forwardRef((e,t)=>{var r,o;let a=pe(),n=h.useRef(null),l=h.useContext(ga),i=Me(),u=ya(e),s=(o=(r=u.current)==null?void 0:r.forceMount)!=null?o:l?.forceMount;ve(()=>{if(!s)return i.item(a,l?.id)},[s]);let f=Ra(a,n,[e.value,e.children,n],e.keywords),c=ir(),g=re(x=>x.value&&x.value===f.current),w=re(x=>s||i.filter()===!1?!0:x.search?x.filtered.items.get(a)>0:!0);h.useEffect(()=>{let x=n.current;if(!(!x||e.disabled))return x.addEventListener(nr,C),()=>x.removeEventListener(nr,C)},[w,e.onSelect,e.disabled]);function C(){var x,R;v(),(R=(x=u.current).onSelect)==null||R.call(x,f.current)}function v(){c.setState("value",f.current,!0)}if(!w)return null;let{disabled:p,value:E,onSelect:k,forceMount:T,keywords:L,...P}=e;return h.createElement(ae.div,{ref:le(n,t),...P,id:a,"cmdk-item":"",role:"option","aria-disabled":!!p,"aria-selected":!!g,"data-disabled":!!p,"data-selected":!!g,onPointerMove:p||i.getDisablePointerSelection()?void 0:v,onClick:p?void 0:C},e.children)}),Ji=h.forwardRef((e,t)=>{let{heading:r,children:o,forceMount:a,...n}=e,l=pe(),i=h.useRef(null),u=h.useRef(null),s=pe(),f=Me(),c=re(w=>a||f.filter()===!1?!0:w.search?w.filtered.groups.has(l):!0);ve(()=>f.group(l),[]),Ra(l,i,[e.value,e.heading,u]);let g=h.useMemo(()=>({id:l,forceMount:a}),[a]);return h.createElement(ae.div,{ref:le(i,t),...n,"cmdk-group":"",role:"presentation",hidden:c?void 0:!0},r&&h.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:s},r),ut(e,w=>h.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?s:void 0},h.createElement(ga.Provider,{value:g},w))))}),Qi=h.forwardRef((e,t)=>{let{alwaysRender:r,...o}=e,a=h.useRef(null),n=re(l=>!l.search);return!r&&!n?null:h.createElement(ae.div,{ref:le(a,t),...o,"cmdk-separator":"",role:"separator"})}),el=h.forwardRef((e,t)=>{let{onValueChange:r,...o}=e,a=e.value!=null,n=ir(),l=re(s=>s.search),i=re(s=>s.selectedItemId),u=Me();return h.useEffect(()=>{e.value!=null&&n.setState("search",e.value)},[e.value]),h.createElement(ae.input,{ref:t,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":i,id:u.inputId,type:"text",value:a?e.value:l,onChange:s=>{a||n.setState("search",s.target.value),r?.(s.target.value)}})}),tl=h.forwardRef((e,t)=>{let{children:r,label:o="Suggestions",...a}=e,n=h.useRef(null),l=h.useRef(null),i=re(s=>s.selectedItemId),u=Me();return h.useEffect(()=>{if(l.current&&n.current){let s=l.current,f=n.current,c,g=new ResizeObserver(()=>{c=requestAnimationFrame(()=>{let w=s.offsetHeight;f.style.setProperty("--cmdk-list-height",w.toFixed(1)+"px")})});return g.observe(s),()=>{cancelAnimationFrame(c),g.unobserve(s)}}},[]),h.createElement(ae.div,{ref:le(n,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":o,id:u.listId},ut(e,s=>h.createElement("div",{ref:le(l,u.listInnerRef),"cmdk-list-sizer":""},s)))}),rl=h.forwardRef((e,t)=>{let{open:r,onOpenChange:o,overlayClassName:a,contentClassName:n,container:l,...i}=e;return h.createElement(ra,{open:r,onOpenChange:o},h.createElement(oa,{container:l},h.createElement(aa,{"cmdk-overlay":"",className:a}),h.createElement(na,{"aria-label":e.label,"cmdk-dialog":"",className:n},h.createElement(wa,{ref:t,...i}))))}),ol=h.forwardRef((e,t)=>re(r=>r.filtered.count===0)?h.createElement(ae.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),al=h.forwardRef((e,t)=>{let{progress:r,children:o,label:a="Loading...",...n}=e;return h.createElement(ae.div,{ref:t,...n,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},ut(e,l=>h.createElement("div",{"aria-hidden":!0},l)))}),he=Object.assign(wa,{List:tl,Item:Zi,Input:el,Group:Ji,Separator:Qi,Dialog:rl,Empty:ol,Loading:al});function nl(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function il(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function ya(e){let t=h.useRef(e);return ve(()=>{t.current=e}),t}var ve=typeof window>"u"?h.useEffect:h.useLayoutEffect;function Pe(e){let t=h.useRef();return t.current===void 0&&(t.current=e()),t}function re(e){let t=ir(),r=()=>e(t.snapshot());return h.useSyncExternalStore(t.subscribe,r,r)}function Ra(e,t,r,o=[]){let a=h.useRef(),n=Me();return ve(()=>{var l;let i=(()=>{var s;for(let f of r){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(s=f.current.textContent)==null?void 0:s.trim():a.current}})(),u=o.map(s=>s.trim());n.value(e,i,u),(l=t.current)==null||l.setAttribute(ke,i),a.current=i}),a}var ll=()=>{let[e,t]=h.useState(),r=Pe(()=>new Map);return ve(()=>{r.current.forEach(o=>o()),r.current=new Map},[e]),(o,a)=>{r.current.set(o,a),t({})}};function sl(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function ut({asChild:e,children:t},r){return e&&h.isValidElement(t)?h.cloneElement(sl(t),{ref:t.ref},r(t.props.children)):r(t)}var ul={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};var dt=m(Ea(),1),G=m(je(),1),ge=m(xa(),1),oe=m(_a(),1),mt=m(Pa(),1);var ft=m(je(),1),lr=(0,ft.forwardRef)(({icon:e,size:t=24,...r},o)=>(0,ft.cloneElement)(e,{width:t,height:t,...r,ref:o}));var ct=m(Da(),1),sr=m(U(),1),ur=(0,sr.jsx)(ct.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,sr.jsx)(ct.Path,{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"})});import{executeAbility as fl,store as cl}from"@wordpress/abilities";var Aa=m(Ia(),1),{lock:wf,unlock:Ta}=(0,Aa.__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/workflows");var A=m(U(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='cbad731ae6']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","cbad731ae6"),e.appendChild(document.createTextNode(":root{--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color);--wp-editor-canvas-background:#ddd;--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,160.5;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.workflows-workflow-menu{border-radius:4px;margin:auto;max-width:400px;position:relative;top:calc(5% + 64px);width:calc(100% - 32px)}@media (min-width:600px){.workflows-workflow-menu{top:calc(10% + 64px)}}.workflows-workflow-menu .components-modal__content{margin:0;padding:0}.workflows-workflow-menu__overlay{align-items:start;display:block}.workflows-workflow-menu__header{padding:0 16px}.workflows-workflow-menu__header-search-icon:dir(ltr){transform:scaleX(-1)}.workflows-workflow-menu__container{will-change:transform}.workflows-workflow-menu__container:focus{outline:none}.workflows-workflow-menu__container [cmdk-input]{border:none;border-radius:0;color:#1e1e1e;font-size:15px;line-height:28px;margin:0;outline:none;padding:16px 4px;width:100%}.workflows-workflow-menu__container [cmdk-input]::placeholder{color:#757575}.workflows-workflow-menu__container [cmdk-input]:focus{box-shadow:none;outline:none}.workflows-workflow-menu__container [cmdk-item]{align-items:center;border-radius:2px;color:#1e1e1e;cursor:pointer;display:flex;font-size:13px}.workflows-workflow-menu__container [cmdk-item]:active,.workflows-workflow-menu__container [cmdk-item][aria-selected=true]{background:var(--wp-admin-theme-color);color:#fff}.workflows-workflow-menu__container [cmdk-item][aria-disabled=true]{color:#949494;cursor:not-allowed}.workflows-workflow-menu__container [cmdk-item]>div{min-height:40px;padding:4px 4px 4px 16px}.workflows-workflow-menu__container [cmdk-root]>[cmdk-list]{max-height:368px;overflow:auto}.workflows-workflow-menu__container [cmdk-root]>[cmdk-list] [cmdk-list-sizer]>[cmdk-group]:last-child [cmdk-group-items]:not(:empty){padding-bottom:8px}.workflows-workflow-menu__container [cmdk-root]>[cmdk-list] [cmdk-list-sizer]>[cmdk-group]>[cmdk-group-items]:not(:empty){padding:0 8px}.workflows-workflow-menu__container [cmdk-empty]{align-items:center;color:#1e1e1e;display:flex;justify-content:center;padding:8px 0 32px;white-space:pre-wrap}.workflows-workflow-menu__container [cmdk-loading]{padding:16px}.workflows-workflow-menu__container [cmdk-list-sizer]{position:relative}.workflows-workflow-menu__item span{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.workflows-workflow-menu__item mark{background:unset;color:inherit;font-weight:600}.workflows-workflow-menu__output{padding:16px}.workflows-workflow-menu__output-header{border-bottom:1px solid #ddd;margin-bottom:16px;padding-bottom:8px}.workflows-workflow-menu__output-header h3{color:#1e1e1e;font-size:16px;font-weight:600;margin:0 0 4px}.workflows-workflow-menu__output-hint{color:#757575;font-size:12px;margin:0}.workflows-workflow-menu__output-content{max-height:400px;overflow:auto}.workflows-workflow-menu__output-content pre{background:#f0f0f0;border-radius:2px;color:#1e1e1e;font-size:12px;line-height:1.5;margin:0;padding:12px;white-space:pre-wrap;word-break:break-word}.workflows-workflow-menu__output-error{background:#e0e0e0;border:1px solid #9e1313;border-radius:2px;color:#cc1818;padding:12px}.workflows-workflow-menu__output-error p{font-size:13px;margin:0}.workflows-workflow-menu__executing{color:#757575;font-size:14px;padding:24px 16px}")),document.head.appendChild(e)}var{withIgnoreIMEEvents:La}=Ta(oe.privateApis),dl=[],Ma=(0,ge.__)("Run abilities and workflows");function ml({isOpen:e,search:t,setSearch:r,abilities:o}){let a=(0,G.useRef)(),n=re(i=>i.value),l=(0,G.useMemo)(()=>o.find(u=>u.label===n)?.name,[n,o]);return(0,G.useEffect)(()=>{e&&a.current.focus()},[e]),(0,A.jsx)(he.Input,{ref:a,value:t,onValueChange:r,placeholder:Ma,"aria-activedescendant":l})}function Fa(){let{registerShortcut:e}=(0,dt.useDispatch)(mt.store),[t,r]=(0,G.useState)(""),[o,a]=(0,G.useState)(!1),[n,l]=(0,G.useState)(null),[i,u]=(0,G.useState)(!1),s=(0,G.useRef)(),f=(0,dt.useSelect)(p=>p(cl).getAbilities()||dl,[]),c=(0,G.useMemo)(()=>{if(!t)return f;let p=t.toLowerCase();return f.filter(E=>E.label?.toLowerCase().includes(p)||E.name?.toLowerCase().includes(p))},[f,t]);(0,G.useEffect)(()=>{n&&s.current&&s.current.focus()},[n]),(0,G.useEffect)(()=>{e({name:"core/workflows",category:"global",description:(0,ge.__)("Open the workflow palette."),keyCombination:{modifier:"primary",character:"j"}})},[e]),(0,mt.useShortcut)("core/workflows",La(p=>{p.defaultPrevented||(p.preventDefault(),a(!o))}),{bindGlobal:!0});let g=()=>{r(""),a(!1),l(null),u(!1)},w=()=>{l(null),u(!1),r("")},C=async p=>{u(!0);try{let E=await fl(p.name);l({name:p.name,label:p?.label||p.name,description:p?.description||"",success:!0,data:E})}catch(E){l({name:p.name,label:p?.label||p.name,description:p?.description||"",success:!1,error:E.message||String(E)})}finally{u(!1)}},v=p=>{n&&(p.key==="Escape"||p.key==="Backspace"||p.key==="Delete")&&(p.preventDefault(),p.stopPropagation(),w())};return o?(0,A.jsx)(oe.Modal,{className:"workflows-workflow-menu",overlayClassName:"workflows-workflow-menu__overlay",onRequestClose:n?w:g,__experimentalHideHeader:!0,contentLabel:(0,ge.__)("Workflow palette"),children:(0,A.jsx)("div",{className:"workflows-workflow-menu__container",onKeyDown:La(v),ref:s,tabIndex:-1,role:"presentation",children:n?(0,A.jsxs)("div",{className:"workflows-workflow-menu__output",children:[(0,A.jsxs)("div",{className:"workflows-workflow-menu__output-header",children:[(0,A.jsx)("h3",{children:n.label}),n.description&&(0,A.jsx)("p",{className:"workflows-workflow-menu__output-hint",children:n.description})]}),(0,A.jsx)("div",{className:"workflows-workflow-menu__output-content",children:n.success?(0,A.jsx)("pre",{children:JSON.stringify(n.data,null,2)}):(0,A.jsx)("div",{className:"workflows-workflow-menu__output-error",children:(0,A.jsx)("p",{children:n.error})})})]}):(0,A.jsxs)(he,{label:Ma,shouldFilter:!1,children:[(0,A.jsxs)(oe.__experimentalHStack,{className:"workflows-workflow-menu__header",children:[(0,A.jsx)(lr,{className:"workflows-workflow-menu__header-search-icon",icon:ur}),(0,A.jsx)(ml,{search:t,setSearch:r,isOpen:o,abilities:f})]}),(0,A.jsxs)(he.List,{label:(0,ge.__)("Workflow suggestions"),children:[i&&(0,A.jsx)(oe.__experimentalHStack,{className:"workflows-workflow-menu__executing",align:"center",children:(0,ge.__)("Executing ability\u2026")}),!i&&t&&c.length===0&&(0,A.jsx)(he.Empty,{children:(0,ge.__)("No results found.")}),!i&&c.length>0&&(0,A.jsx)(he.Group,{children:c.map(p=>(0,A.jsx)(he.Item,{value:p.label,className:"workflows-workflow-menu__item",onSelect:()=>C(p),id:p.name,children:(0,A.jsx)(oe.__experimentalHStack,{alignment:"left",children:(0,A.jsx)("span",{children:(0,A.jsx)(oe.TextHighlight,{text:p.label,highlight:t})})})},p.name))})]})]})})}):null}var ja=document.createElement("div");document.body.appendChild(ja);(0,pt.createRoot)(ja).render((0,pt.createElement)(Fa));
                                                                                                                                                                                                                                                                                                                                                                                                                                        dist/script-modules/workflow/index.js                                                               0000644                 00000421314 15212564032 0014005 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));

// package-external:@wordpress/element
var require_element = __commonJS({
  "package-external:@wordpress/element"(exports, module) {
    module.exports = window.wp.element;
  }
});

// vendor-external:react
var require_react = __commonJS({
  "vendor-external:react"(exports, module) {
    module.exports = window.React;
  }
});

// vendor-external:react/jsx-runtime
var require_jsx_runtime = __commonJS({
  "vendor-external:react/jsx-runtime"(exports, module) {
    module.exports = window.ReactJSXRuntime;
  }
});

// vendor-external:react-dom
var require_react_dom = __commonJS({
  "vendor-external:react-dom"(exports, module) {
    module.exports = window.ReactDOM;
  }
});

// package-external:@wordpress/data
var require_data = __commonJS({
  "package-external:@wordpress/data"(exports, module) {
    module.exports = window.wp.data;
  }
});

// package-external:@wordpress/i18n
var require_i18n = __commonJS({
  "package-external:@wordpress/i18n"(exports, module) {
    module.exports = window.wp.i18n;
  }
});

// package-external:@wordpress/components
var require_components = __commonJS({
  "package-external:@wordpress/components"(exports, module) {
    module.exports = window.wp.components;
  }
});

// package-external:@wordpress/keyboard-shortcuts
var require_keyboard_shortcuts = __commonJS({
  "package-external:@wordpress/keyboard-shortcuts"(exports, module) {
    module.exports = window.wp.keyboardShortcuts;
  }
});

// package-external:@wordpress/primitives
var require_primitives = __commonJS({
  "package-external:@wordpress/primitives"(exports, module) {
    module.exports = window.wp.primitives;
  }
});

// package-external:@wordpress/private-apis
var require_private_apis = __commonJS({
  "package-external:@wordpress/private-apis"(exports, module) {
    module.exports = window.wp.privateApis;
  }
});

// packages/workflow/build-module/index.mjs
var import_element3 = __toESM(require_element(), 1);

// node_modules/cmdk/dist/chunk-NZJY6EH4.mjs
var U = 1;
var Y = 0.9;
var H = 0.8;
var J = 0.17;
var p = 0.1;
var u = 0.999;
var $ = 0.9999;
var k = 0.99;
var m = /[\\\/_+.#"@\[\(\{&]/;
var B = /[\\\/_+.#"@\[\(\{&]/g;
var K = /[\s-]/;
var X = /[\s-]/g;
function G(_, C, h, P2, A, f, O) {
  if (f === C.length) return A === _.length ? U : k;
  var T2 = `${A},${f}`;
  if (O[T2] !== void 0) return O[T2];
  for (var L2 = P2.charAt(f), c = h.indexOf(L2, A), S = 0, E, N2, R, M; c >= 0; ) E = G(_, C, h, P2, c + 1, f + 1, O), E > S && (c === A ? E *= U : m.test(_.charAt(c - 1)) ? (E *= H, R = _.slice(A, c - 1).match(B), R && A > 0 && (E *= Math.pow(u, R.length))) : K.test(_.charAt(c - 1)) ? (E *= Y, M = _.slice(A, c - 1).match(X), M && A > 0 && (E *= Math.pow(u, M.length))) : (E *= J, A > 0 && (E *= Math.pow(u, c - A))), _.charAt(c) !== C.charAt(f) && (E *= $)), (E < p && h.charAt(c - 1) === P2.charAt(f + 1) || P2.charAt(f + 1) === P2.charAt(f) && h.charAt(c - 1) !== P2.charAt(f)) && (N2 = G(_, C, h, P2, c + 1, f + 2, O), N2 * p > E && (E = N2 * p)), E > S && (S = E), c = h.indexOf(L2, c + 1);
  return O[T2] = S, S;
}
function D(_) {
  return _.toLowerCase().replace(X, " ");
}
function W(_, C, h) {
  return _ = h && h.length > 0 ? `${_ + " " + h.join(" ")}` : _, G(_, C, D(_), D(C), 0, 0, {});
}

// node_modules/@radix-ui/react-dialog/dist/index.mjs
var React37 = __toESM(require_react(), 1);

// node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.mjs
var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
  return function handleEvent(event) {
    originalEventHandler?.(event);
    if (checkForDefaultPrevented === false || !event.defaultPrevented) {
      return ourEventHandler?.(event);
    }
  };
}

// node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
var React = __toESM(require_react(), 1);
function setRef(ref, value) {
  if (typeof ref === "function") {
    return ref(value);
  } else if (ref !== null && ref !== void 0) {
    ref.current = value;
  }
}
function composeRefs(...refs) {
  return (node) => {
    let hasCleanup = false;
    const cleanups = refs.map((ref) => {
      const cleanup = setRef(ref, node);
      if (!hasCleanup && typeof cleanup == "function") {
        hasCleanup = true;
      }
      return cleanup;
    });
    if (hasCleanup) {
      return () => {
        for (let i = 0; i < cleanups.length; i++) {
          const cleanup = cleanups[i];
          if (typeof cleanup == "function") {
            cleanup();
          } else {
            setRef(refs[i], null);
          }
        }
      };
    }
  };
}
function useComposedRefs(...refs) {
  return React.useCallback(composeRefs(...refs), refs);
}

// node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.mjs
var React2 = __toESM(require_react(), 1);
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
function createContext2(rootComponentName, defaultContext) {
  const Context = React2.createContext(defaultContext);
  const Provider = (props) => {
    const { children, ...context } = props;
    const value = React2.useMemo(() => context, Object.values(context));
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
  };
  Provider.displayName = rootComponentName + "Provider";
  function useContext22(consumerName) {
    const context = React2.useContext(Context);
    if (context) return context;
    if (defaultContext !== void 0) return defaultContext;
    throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
  }
  return [Provider, useContext22];
}
function createContextScope(scopeName, createContextScopeDeps = []) {
  let defaultContexts = [];
  function createContext32(rootComponentName, defaultContext) {
    const BaseContext = React2.createContext(defaultContext);
    const index = defaultContexts.length;
    defaultContexts = [...defaultContexts, defaultContext];
    const Provider = (props) => {
      const { scope, children, ...context } = props;
      const Context = scope?.[scopeName]?.[index] || BaseContext;
      const value = React2.useMemo(() => context, Object.values(context));
      return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
    };
    Provider.displayName = rootComponentName + "Provider";
    function useContext22(consumerName, scope) {
      const Context = scope?.[scopeName]?.[index] || BaseContext;
      const context = React2.useContext(Context);
      if (context) return context;
      if (defaultContext !== void 0) return defaultContext;
      throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
    }
    return [Provider, useContext22];
  }
  const createScope = () => {
    const scopeContexts = defaultContexts.map((defaultContext) => {
      return React2.createContext(defaultContext);
    });
    return function useScope(scope) {
      const contexts = scope?.[scopeName] || scopeContexts;
      return React2.useMemo(
        () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
        [scope, contexts]
      );
    };
  };
  createScope.scopeName = scopeName;
  return [createContext32, composeContextScopes(createScope, ...createContextScopeDeps)];
}
function composeContextScopes(...scopes) {
  const baseScope = scopes[0];
  if (scopes.length === 1) return baseScope;
  const createScope = () => {
    const scopeHooks = scopes.map((createScope2) => ({
      useScope: createScope2(),
      scopeName: createScope2.scopeName
    }));
    return function useComposedScopes(overrideScopes) {
      const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
        const scopeProps = useScope(overrideScopes);
        const currentScope = scopeProps[`__scope${scopeName}`];
        return { ...nextScopes2, ...currentScope };
      }, {});
      return React2.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
    };
  };
  createScope.scopeName = baseScope.scopeName;
  return createScope;
}

// node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/dist/index.mjs
var React4 = __toESM(require_react(), 1);

// node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
var React3 = __toESM(require_react(), 1);
var useLayoutEffect2 = globalThis?.document ? React3.useLayoutEffect : () => {
};

// node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/dist/index.mjs
var useReactId = React4[" useId ".trim().toString()] || (() => void 0);
var count = 0;
function useId(deterministicId) {
  const [id, setId] = React4.useState(useReactId());
  useLayoutEffect2(() => {
    if (!deterministicId) setId((reactId) => reactId ?? String(count++));
  }, [deterministicId]);
  return deterministicId || (id ? `radix-${id}` : "");
}

// node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
var React5 = __toESM(require_react(), 1);
var React22 = __toESM(require_react(), 1);
var useInsertionEffect = React5[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
function useControllableState({
  prop,
  defaultProp,
  onChange = () => {
  },
  caller
}) {
  const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
    defaultProp,
    onChange
  });
  const isControlled = prop !== void 0;
  const value = isControlled ? prop : uncontrolledProp;
  if (true) {
    const isControlledRef = React5.useRef(prop !== void 0);
    React5.useEffect(() => {
      const wasControlled = isControlledRef.current;
      if (wasControlled !== isControlled) {
        const from = wasControlled ? "controlled" : "uncontrolled";
        const to = isControlled ? "controlled" : "uncontrolled";
        console.warn(
          `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
        );
      }
      isControlledRef.current = isControlled;
    }, [isControlled, caller]);
  }
  const setValue = React5.useCallback(
    (nextValue) => {
      if (isControlled) {
        const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
        if (value2 !== prop) {
          onChangeRef.current?.(value2);
        }
      } else {
        setUncontrolledProp(nextValue);
      }
    },
    [isControlled, prop, setUncontrolledProp, onChangeRef]
  );
  return [value, setValue];
}
function useUncontrolledState({
  defaultProp,
  onChange
}) {
  const [value, setValue] = React5.useState(defaultProp);
  const prevValueRef = React5.useRef(value);
  const onChangeRef = React5.useRef(onChange);
  useInsertionEffect(() => {
    onChangeRef.current = onChange;
  }, [onChange]);
  React5.useEffect(() => {
    if (prevValueRef.current !== value) {
      onChangeRef.current?.(value);
      prevValueRef.current = value;
    }
  }, [value, prevValueRef]);
  return [value, setValue, onChangeRef];
}
function isFunction(value) {
  return typeof value === "function";
}

// node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
var React11 = __toESM(require_react(), 1);

// node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/primitive/dist/index.mjs
var canUseDOM2 = !!(typeof window !== "undefined" && window.document && window.document.createElement);
function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
  return function handleEvent(event) {
    originalEventHandler?.(event);
    if (checkForDefaultPrevented === false || !event.defaultPrevented) {
      return ourEventHandler?.(event);
    }
  };
}

// node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-primitive/dist/index.mjs
var React8 = __toESM(require_react(), 1);
var ReactDOM = __toESM(require_react_dom(), 1);

// node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-slot/dist/index.mjs
var React7 = __toESM(require_react(), 1);

// node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
var React6 = __toESM(require_react(), 1);
function setRef2(ref, value) {
  if (typeof ref === "function") {
    return ref(value);
  } else if (ref !== null && ref !== void 0) {
    ref.current = value;
  }
}
function composeRefs2(...refs) {
  return (node) => {
    let hasCleanup = false;
    const cleanups = refs.map((ref) => {
      const cleanup = setRef2(ref, node);
      if (!hasCleanup && typeof cleanup == "function") {
        hasCleanup = true;
      }
      return cleanup;
    });
    if (hasCleanup) {
      return () => {
        for (let i = 0; i < cleanups.length; i++) {
          const cleanup = cleanups[i];
          if (typeof cleanup == "function") {
            cleanup();
          } else {
            setRef2(refs[i], null);
          }
        }
      };
    }
  };
}
function useComposedRefs2(...refs) {
  return React6.useCallback(composeRefs2(...refs), refs);
}

// node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-slot/dist/index.mjs
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
// @__NO_SIDE_EFFECTS__
function createSlot(ownerName) {
  const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
  const Slot2 = React7.forwardRef((props, forwardedRef) => {
    const { children, ...slotProps } = props;
    const childrenArray = React7.Children.toArray(children);
    const slottable = childrenArray.find(isSlottable);
    if (slottable) {
      const newElement = slottable.props.children;
      const newChildren = childrenArray.map((child) => {
        if (child === slottable) {
          if (React7.Children.count(newElement) > 1) return React7.Children.only(null);
          return React7.isValidElement(newElement) ? newElement.props.children : null;
        } else {
          return child;
        }
      });
      return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React7.isValidElement(newElement) ? React7.cloneElement(newElement, void 0, newChildren) : null });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
  });
  Slot2.displayName = `${ownerName}.Slot`;
  return Slot2;
}
// @__NO_SIDE_EFFECTS__
function createSlotClone(ownerName) {
  const SlotClone = React7.forwardRef((props, forwardedRef) => {
    const { children, ...slotProps } = props;
    if (React7.isValidElement(children)) {
      const childrenRef = getElementRef(children);
      const props2 = mergeProps(slotProps, children.props);
      if (children.type !== React7.Fragment) {
        props2.ref = forwardedRef ? composeRefs2(forwardedRef, childrenRef) : childrenRef;
      }
      return React7.cloneElement(children, props2);
    }
    return React7.Children.count(children) > 1 ? React7.Children.only(null) : null;
  });
  SlotClone.displayName = `${ownerName}.SlotClone`;
  return SlotClone;
}
var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
function isSlottable(child) {
  return React7.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
}
function mergeProps(slotProps, childProps) {
  const overrideProps = { ...childProps };
  for (const propName in childProps) {
    const slotPropValue = slotProps[propName];
    const childPropValue = childProps[propName];
    const isHandler = /^on[A-Z]/.test(propName);
    if (isHandler) {
      if (slotPropValue && childPropValue) {
        overrideProps[propName] = (...args) => {
          const result = childPropValue(...args);
          slotPropValue(...args);
          return result;
        };
      } else if (slotPropValue) {
        overrideProps[propName] = slotPropValue;
      }
    } else if (propName === "style") {
      overrideProps[propName] = { ...slotPropValue, ...childPropValue };
    } else if (propName === "className") {
      overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
    }
  }
  return { ...slotProps, ...overrideProps };
}
function getElementRef(element) {
  let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
  if (mayWarn) {
    return element.ref;
  }
  getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
  mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
  if (mayWarn) {
    return element.props.ref;
  }
  return element.props.ref || element.ref;
}

// node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-primitive/dist/index.mjs
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
var NODES = [
  "a",
  "button",
  "div",
  "form",
  "h2",
  "h3",
  "img",
  "input",
  "label",
  "li",
  "nav",
  "ol",
  "p",
  "select",
  "span",
  "svg",
  "ul"
];
var Primitive = NODES.reduce((primitive, node) => {
  const Slot2 = createSlot(`Primitive.${node}`);
  const Node2 = React8.forwardRef((props, forwardedRef) => {
    const { asChild, ...primitiveProps } = props;
    const Comp = asChild ? Slot2 : node;
    if (typeof window !== "undefined") {
      window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
  });
  Node2.displayName = `Primitive.${node}`;
  return { ...primitive, [node]: Node2 };
}, {});
function dispatchDiscreteCustomEvent(target, event) {
  if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
}

// node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
var React9 = __toESM(require_react(), 1);
function useCallbackRef(callback) {
  const callbackRef = React9.useRef(callback);
  React9.useEffect(() => {
    callbackRef.current = callback;
  });
  return React9.useMemo(() => (...args) => callbackRef.current?.(...args), []);
}

// node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
var React10 = __toESM(require_react(), 1);
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
  const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
  React10.useEffect(() => {
    const handleKeyDown = (event) => {
      if (event.key === "Escape") {
        onEscapeKeyDown(event);
      }
    };
    ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
    return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
  }, [onEscapeKeyDown, ownerDocument]);
}

// node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
var CONTEXT_UPDATE = "dismissableLayer.update";
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
var originalBodyPointerEvents;
var DismissableLayerContext = React11.createContext({
  layers: /* @__PURE__ */ new Set(),
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
  branches: /* @__PURE__ */ new Set()
});
var DismissableLayer = React11.forwardRef(
  (props, forwardedRef) => {
    const {
      disableOutsidePointerEvents = false,
      onEscapeKeyDown,
      onPointerDownOutside,
      onFocusOutside,
      onInteractOutside,
      onDismiss,
      ...layerProps
    } = props;
    const context = React11.useContext(DismissableLayerContext);
    const [node, setNode] = React11.useState(null);
    const ownerDocument = node?.ownerDocument ?? globalThis?.document;
    const [, force] = React11.useState({});
    const composedRefs = useComposedRefs2(forwardedRef, (node2) => setNode(node2));
    const layers = Array.from(context.layers);
    const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
    const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
    const index = node ? layers.indexOf(node) : -1;
    const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
    const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
    const pointerDownOutside = usePointerDownOutside((event) => {
      const target = event.target;
      const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
      if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
      onPointerDownOutside?.(event);
      onInteractOutside?.(event);
      if (!event.defaultPrevented) onDismiss?.();
    }, ownerDocument);
    const focusOutside = useFocusOutside((event) => {
      const target = event.target;
      const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
      if (isFocusInBranch) return;
      onFocusOutside?.(event);
      onInteractOutside?.(event);
      if (!event.defaultPrevented) onDismiss?.();
    }, ownerDocument);
    useEscapeKeydown((event) => {
      const isHighestLayer = index === context.layers.size - 1;
      if (!isHighestLayer) return;
      onEscapeKeyDown?.(event);
      if (!event.defaultPrevented && onDismiss) {
        event.preventDefault();
        onDismiss();
      }
    }, ownerDocument);
    React11.useEffect(() => {
      if (!node) return;
      if (disableOutsidePointerEvents) {
        if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
          originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
          ownerDocument.body.style.pointerEvents = "none";
        }
        context.layersWithOutsidePointerEventsDisabled.add(node);
      }
      context.layers.add(node);
      dispatchUpdate();
      return () => {
        if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {
          ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
        }
      };
    }, [node, ownerDocument, disableOutsidePointerEvents, context]);
    React11.useEffect(() => {
      return () => {
        if (!node) return;
        context.layers.delete(node);
        context.layersWithOutsidePointerEventsDisabled.delete(node);
        dispatchUpdate();
      };
    }, [node, context]);
    React11.useEffect(() => {
      const handleUpdate = () => force({});
      document.addEventListener(CONTEXT_UPDATE, handleUpdate);
      return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
      Primitive.div,
      {
        ...layerProps,
        ref: composedRefs,
        style: {
          pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
          ...props.style
        },
        onFocusCapture: composeEventHandlers2(props.onFocusCapture, focusOutside.onFocusCapture),
        onBlurCapture: composeEventHandlers2(props.onBlurCapture, focusOutside.onBlurCapture),
        onPointerDownCapture: composeEventHandlers2(
          props.onPointerDownCapture,
          pointerDownOutside.onPointerDownCapture
        )
      }
    );
  }
);
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
var BRANCH_NAME = "DismissableLayerBranch";
var DismissableLayerBranch = React11.forwardRef((props, forwardedRef) => {
  const context = React11.useContext(DismissableLayerContext);
  const ref = React11.useRef(null);
  const composedRefs = useComposedRefs2(forwardedRef, ref);
  React11.useEffect(() => {
    const node = ref.current;
    if (node) {
      context.branches.add(node);
      return () => {
        context.branches.delete(node);
      };
    }
  }, [context.branches]);
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Primitive.div, { ...props, ref: composedRefs });
});
DismissableLayerBranch.displayName = BRANCH_NAME;
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
  const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
  const isPointerInsideReactTreeRef = React11.useRef(false);
  const handleClickRef = React11.useRef(() => {
  });
  React11.useEffect(() => {
    const handlePointerDown = (event) => {
      if (event.target && !isPointerInsideReactTreeRef.current) {
        let handleAndDispatchPointerDownOutsideEvent2 = function() {
          handleAndDispatchCustomEvent(
            POINTER_DOWN_OUTSIDE,
            handlePointerDownOutside,
            eventDetail,
            { discrete: true }
          );
        };
        var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;
        const eventDetail = { originalEvent: event };
        if (event.pointerType === "touch") {
          ownerDocument.removeEventListener("click", handleClickRef.current);
          handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
          ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
        } else {
          handleAndDispatchPointerDownOutsideEvent2();
        }
      } else {
        ownerDocument.removeEventListener("click", handleClickRef.current);
      }
      isPointerInsideReactTreeRef.current = false;
    };
    const timerId = window.setTimeout(() => {
      ownerDocument.addEventListener("pointerdown", handlePointerDown);
    }, 0);
    return () => {
      window.clearTimeout(timerId);
      ownerDocument.removeEventListener("pointerdown", handlePointerDown);
      ownerDocument.removeEventListener("click", handleClickRef.current);
    };
  }, [ownerDocument, handlePointerDownOutside]);
  return {
    // ensures we check React component tree (not just DOM tree)
    onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
  };
}
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
  const handleFocusOutside = useCallbackRef(onFocusOutside);
  const isFocusInsideReactTreeRef = React11.useRef(false);
  React11.useEffect(() => {
    const handleFocus = (event) => {
      if (event.target && !isFocusInsideReactTreeRef.current) {
        const eventDetail = { originalEvent: event };
        handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
          discrete: false
        });
      }
    };
    ownerDocument.addEventListener("focusin", handleFocus);
    return () => ownerDocument.removeEventListener("focusin", handleFocus);
  }, [ownerDocument, handleFocusOutside]);
  return {
    onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
    onBlurCapture: () => isFocusInsideReactTreeRef.current = false
  };
}
function dispatchUpdate() {
  const event = new CustomEvent(CONTEXT_UPDATE);
  document.dispatchEvent(event);
}
function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
  const target = detail.originalEvent.target;
  const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
  if (handler) target.addEventListener(name, handler, { once: true });
  if (discrete) {
    dispatchDiscreteCustomEvent(target, event);
  } else {
    target.dispatchEvent(event);
  }
}

// node_modules/@radix-ui/react-focus-scope/dist/index.mjs
var React16 = __toESM(require_react(), 1);

// node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
var React12 = __toESM(require_react(), 1);
function setRef3(ref, value) {
  if (typeof ref === "function") {
    return ref(value);
  } else if (ref !== null && ref !== void 0) {
    ref.current = value;
  }
}
function composeRefs3(...refs) {
  return (node) => {
    let hasCleanup = false;
    const cleanups = refs.map((ref) => {
      const cleanup = setRef3(ref, node);
      if (!hasCleanup && typeof cleanup == "function") {
        hasCleanup = true;
      }
      return cleanup;
    });
    if (hasCleanup) {
      return () => {
        for (let i = 0; i < cleanups.length; i++) {
          const cleanup = cleanups[i];
          if (typeof cleanup == "function") {
            cleanup();
          } else {
            setRef3(refs[i], null);
          }
        }
      };
    }
  };
}
function useComposedRefs3(...refs) {
  return React12.useCallback(composeRefs3(...refs), refs);
}

// node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-primitive/dist/index.mjs
var React14 = __toESM(require_react(), 1);
var ReactDOM2 = __toESM(require_react_dom(), 1);

// node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-slot/dist/index.mjs
var React13 = __toESM(require_react(), 1);
var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
// @__NO_SIDE_EFFECTS__
function createSlot2(ownerName) {
  const SlotClone = /* @__PURE__ */ createSlotClone2(ownerName);
  const Slot2 = React13.forwardRef((props, forwardedRef) => {
    const { children, ...slotProps } = props;
    const childrenArray = React13.Children.toArray(children);
    const slottable = childrenArray.find(isSlottable2);
    if (slottable) {
      const newElement = slottable.props.children;
      const newChildren = childrenArray.map((child) => {
        if (child === slottable) {
          if (React13.Children.count(newElement) > 1) return React13.Children.only(null);
          return React13.isValidElement(newElement) ? newElement.props.children : null;
        } else {
          return child;
        }
      });
      return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React13.isValidElement(newElement) ? React13.cloneElement(newElement, void 0, newChildren) : null });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
  });
  Slot2.displayName = `${ownerName}.Slot`;
  return Slot2;
}
// @__NO_SIDE_EFFECTS__
function createSlotClone2(ownerName) {
  const SlotClone = React13.forwardRef((props, forwardedRef) => {
    const { children, ...slotProps } = props;
    if (React13.isValidElement(children)) {
      const childrenRef = getElementRef2(children);
      const props2 = mergeProps2(slotProps, children.props);
      if (children.type !== React13.Fragment) {
        props2.ref = forwardedRef ? composeRefs3(forwardedRef, childrenRef) : childrenRef;
      }
      return React13.cloneElement(children, props2);
    }
    return React13.Children.count(children) > 1 ? React13.Children.only(null) : null;
  });
  SlotClone.displayName = `${ownerName}.SlotClone`;
  return SlotClone;
}
var SLOTTABLE_IDENTIFIER2 = /* @__PURE__ */ Symbol("radix.slottable");
function isSlottable2(child) {
  return React13.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
}
function mergeProps2(slotProps, childProps) {
  const overrideProps = { ...childProps };
  for (const propName in childProps) {
    const slotPropValue = slotProps[propName];
    const childPropValue = childProps[propName];
    const isHandler = /^on[A-Z]/.test(propName);
    if (isHandler) {
      if (slotPropValue && childPropValue) {
        overrideProps[propName] = (...args) => {
          const result = childPropValue(...args);
          slotPropValue(...args);
          return result;
        };
      } else if (slotPropValue) {
        overrideProps[propName] = slotPropValue;
      }
    } else if (propName === "style") {
      overrideProps[propName] = { ...slotPropValue, ...childPropValue };
    } else if (propName === "className") {
      overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
    }
  }
  return { ...slotProps, ...overrideProps };
}
function getElementRef2(element) {
  let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
  if (mayWarn) {
    return element.ref;
  }
  getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
  mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
  if (mayWarn) {
    return element.props.ref;
  }
  return element.props.ref || element.ref;
}

// node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-primitive/dist/index.mjs
var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
var NODES2 = [
  "a",
  "button",
  "div",
  "form",
  "h2",
  "h3",
  "img",
  "input",
  "label",
  "li",
  "nav",
  "ol",
  "p",
  "select",
  "span",
  "svg",
  "ul"
];
var Primitive2 = NODES2.reduce((primitive, node) => {
  const Slot2 = createSlot2(`Primitive.${node}`);
  const Node2 = React14.forwardRef((props, forwardedRef) => {
    const { asChild, ...primitiveProps } = props;
    const Comp = asChild ? Slot2 : node;
    if (typeof window !== "undefined") {
      window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
  });
  Node2.displayName = `Primitive.${node}`;
  return { ...primitive, [node]: Node2 };
}, {});

// node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
var React15 = __toESM(require_react(), 1);
function useCallbackRef2(callback) {
  const callbackRef = React15.useRef(callback);
  React15.useEffect(() => {
    callbackRef.current = callback;
  });
  return React15.useMemo(() => (...args) => callbackRef.current?.(...args), []);
}

// node_modules/@radix-ui/react-focus-scope/dist/index.mjs
var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
var FOCUS_SCOPE_NAME = "FocusScope";
var FocusScope = React16.forwardRef((props, forwardedRef) => {
  const {
    loop = false,
    trapped = false,
    onMountAutoFocus: onMountAutoFocusProp,
    onUnmountAutoFocus: onUnmountAutoFocusProp,
    ...scopeProps
  } = props;
  const [container, setContainer] = React16.useState(null);
  const onMountAutoFocus = useCallbackRef2(onMountAutoFocusProp);
  const onUnmountAutoFocus = useCallbackRef2(onUnmountAutoFocusProp);
  const lastFocusedElementRef = React16.useRef(null);
  const composedRefs = useComposedRefs3(forwardedRef, (node) => setContainer(node));
  const focusScope = React16.useRef({
    paused: false,
    pause() {
      this.paused = true;
    },
    resume() {
      this.paused = false;
    }
  }).current;
  React16.useEffect(() => {
    if (trapped) {
      let handleFocusIn2 = function(event) {
        if (focusScope.paused || !container) return;
        const target = event.target;
        if (container.contains(target)) {
          lastFocusedElementRef.current = target;
        } else {
          focus(lastFocusedElementRef.current, { select: true });
        }
      }, handleFocusOut2 = function(event) {
        if (focusScope.paused || !container) return;
        const relatedTarget = event.relatedTarget;
        if (relatedTarget === null) return;
        if (!container.contains(relatedTarget)) {
          focus(lastFocusedElementRef.current, { select: true });
        }
      }, handleMutations2 = function(mutations) {
        const focusedElement = document.activeElement;
        if (focusedElement !== document.body) return;
        for (const mutation of mutations) {
          if (mutation.removedNodes.length > 0) focus(container);
        }
      };
      var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;
      document.addEventListener("focusin", handleFocusIn2);
      document.addEventListener("focusout", handleFocusOut2);
      const mutationObserver = new MutationObserver(handleMutations2);
      if (container) mutationObserver.observe(container, { childList: true, subtree: true });
      return () => {
        document.removeEventListener("focusin", handleFocusIn2);
        document.removeEventListener("focusout", handleFocusOut2);
        mutationObserver.disconnect();
      };
    }
  }, [trapped, container, focusScope.paused]);
  React16.useEffect(() => {
    if (container) {
      focusScopesStack.add(focusScope);
      const previouslyFocusedElement = document.activeElement;
      const hasFocusedCandidate = container.contains(previouslyFocusedElement);
      if (!hasFocusedCandidate) {
        const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
        container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
        container.dispatchEvent(mountEvent);
        if (!mountEvent.defaultPrevented) {
          focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
          if (document.activeElement === previouslyFocusedElement) {
            focus(container);
          }
        }
      }
      return () => {
        container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
        setTimeout(() => {
          const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
          container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
          container.dispatchEvent(unmountEvent);
          if (!unmountEvent.defaultPrevented) {
            focus(previouslyFocusedElement ?? document.body, { select: true });
          }
          container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
          focusScopesStack.remove(focusScope);
        }, 0);
      };
    }
  }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
  const handleKeyDown = React16.useCallback(
    (event) => {
      if (!loop && !trapped) return;
      if (focusScope.paused) return;
      const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
      const focusedElement = document.activeElement;
      if (isTabKey && focusedElement) {
        const container2 = event.currentTarget;
        const [first, last] = getTabbableEdges(container2);
        const hasTabbableElementsInside = first && last;
        if (!hasTabbableElementsInside) {
          if (focusedElement === container2) event.preventDefault();
        } else {
          if (!event.shiftKey && focusedElement === last) {
            event.preventDefault();
            if (loop) focus(first, { select: true });
          } else if (event.shiftKey && focusedElement === first) {
            event.preventDefault();
            if (loop) focus(last, { select: true });
          }
        }
      }
    },
    [loop, trapped, focusScope.paused]
  );
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Primitive2.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
});
FocusScope.displayName = FOCUS_SCOPE_NAME;
function focusFirst(candidates, { select = false } = {}) {
  const previouslyFocusedElement = document.activeElement;
  for (const candidate of candidates) {
    focus(candidate, { select });
    if (document.activeElement !== previouslyFocusedElement) return;
  }
}
function getTabbableEdges(container) {
  const candidates = getTabbableCandidates(container);
  const first = findVisible(candidates, container);
  const last = findVisible(candidates.reverse(), container);
  return [first, last];
}
function getTabbableCandidates(container) {
  const nodes = [];
  const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
    acceptNode: (node) => {
      const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
      if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
      return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
    }
  });
  while (walker.nextNode()) nodes.push(walker.currentNode);
  return nodes;
}
function findVisible(elements, container) {
  for (const element of elements) {
    if (!isHidden(element, { upTo: container })) return element;
  }
}
function isHidden(node, { upTo }) {
  if (getComputedStyle(node).visibility === "hidden") return true;
  while (node) {
    if (upTo !== void 0 && node === upTo) return false;
    if (getComputedStyle(node).display === "none") return true;
    node = node.parentElement;
  }
  return false;
}
function isSelectableInput(element) {
  return element instanceof HTMLInputElement && "select" in element;
}
function focus(element, { select = false } = {}) {
  if (element && element.focus) {
    const previouslyFocusedElement = document.activeElement;
    element.focus({ preventScroll: true });
    if (element !== previouslyFocusedElement && isSelectableInput(element) && select)
      element.select();
  }
}
var focusScopesStack = createFocusScopesStack();
function createFocusScopesStack() {
  let stack = [];
  return {
    add(focusScope) {
      const activeFocusScope = stack[0];
      if (focusScope !== activeFocusScope) {
        activeFocusScope?.pause();
      }
      stack = arrayRemove(stack, focusScope);
      stack.unshift(focusScope);
    },
    remove(focusScope) {
      stack = arrayRemove(stack, focusScope);
      stack[0]?.resume();
    }
  };
}
function arrayRemove(array, item) {
  const updatedArray = [...array];
  const index = updatedArray.indexOf(item);
  if (index !== -1) {
    updatedArray.splice(index, 1);
  }
  return updatedArray;
}
function removeLinks(items) {
  return items.filter((item) => item.tagName !== "A");
}

// node_modules/@radix-ui/react-portal/dist/index.mjs
var React21 = __toESM(require_react(), 1);
var import_react_dom = __toESM(require_react_dom(), 1);

// node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-primitive/dist/index.mjs
var React19 = __toESM(require_react(), 1);
var ReactDOM3 = __toESM(require_react_dom(), 1);

// node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-slot/dist/index.mjs
var React18 = __toESM(require_react(), 1);

// node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
var React17 = __toESM(require_react(), 1);
function setRef4(ref, value) {
  if (typeof ref === "function") {
    return ref(value);
  } else if (ref !== null && ref !== void 0) {
    ref.current = value;
  }
}
function composeRefs4(...refs) {
  return (node) => {
    let hasCleanup = false;
    const cleanups = refs.map((ref) => {
      const cleanup = setRef4(ref, node);
      if (!hasCleanup && typeof cleanup == "function") {
        hasCleanup = true;
      }
      return cleanup;
    });
    if (hasCleanup) {
      return () => {
        for (let i = 0; i < cleanups.length; i++) {
          const cleanup = cleanups[i];
          if (typeof cleanup == "function") {
            cleanup();
          } else {
            setRef4(refs[i], null);
          }
        }
      };
    }
  };
}

// node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-slot/dist/index.mjs
var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
// @__NO_SIDE_EFFECTS__
function createSlot3(ownerName) {
  const SlotClone = /* @__PURE__ */ createSlotClone3(ownerName);
  const Slot2 = React18.forwardRef((props, forwardedRef) => {
    const { children, ...slotProps } = props;
    const childrenArray = React18.Children.toArray(children);
    const slottable = childrenArray.find(isSlottable3);
    if (slottable) {
      const newElement = slottable.props.children;
      const newChildren = childrenArray.map((child) => {
        if (child === slottable) {
          if (React18.Children.count(newElement) > 1) return React18.Children.only(null);
          return React18.isValidElement(newElement) ? newElement.props.children : null;
        } else {
          return child;
        }
      });
      return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React18.isValidElement(newElement) ? React18.cloneElement(newElement, void 0, newChildren) : null });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
  });
  Slot2.displayName = `${ownerName}.Slot`;
  return Slot2;
}
// @__NO_SIDE_EFFECTS__
function createSlotClone3(ownerName) {
  const SlotClone = React18.forwardRef((props, forwardedRef) => {
    const { children, ...slotProps } = props;
    if (React18.isValidElement(children)) {
      const childrenRef = getElementRef3(children);
      const props2 = mergeProps3(slotProps, children.props);
      if (children.type !== React18.Fragment) {
        props2.ref = forwardedRef ? composeRefs4(forwardedRef, childrenRef) : childrenRef;
      }
      return React18.cloneElement(children, props2);
    }
    return React18.Children.count(children) > 1 ? React18.Children.only(null) : null;
  });
  SlotClone.displayName = `${ownerName}.SlotClone`;
  return SlotClone;
}
var SLOTTABLE_IDENTIFIER3 = /* @__PURE__ */ Symbol("radix.slottable");
function isSlottable3(child) {
  return React18.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER3;
}
function mergeProps3(slotProps, childProps) {
  const overrideProps = { ...childProps };
  for (const propName in childProps) {
    const slotPropValue = slotProps[propName];
    const childPropValue = childProps[propName];
    const isHandler = /^on[A-Z]/.test(propName);
    if (isHandler) {
      if (slotPropValue && childPropValue) {
        overrideProps[propName] = (...args) => {
          const result = childPropValue(...args);
          slotPropValue(...args);
          return result;
        };
      } else if (slotPropValue) {
        overrideProps[propName] = slotPropValue;
      }
    } else if (propName === "style") {
      overrideProps[propName] = { ...slotPropValue, ...childPropValue };
    } else if (propName === "className") {
      overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
    }
  }
  return { ...slotProps, ...overrideProps };
}
function getElementRef3(element) {
  let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
  if (mayWarn) {
    return element.ref;
  }
  getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
  mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
  if (mayWarn) {
    return element.props.ref;
  }
  return element.props.ref || element.ref;
}

// node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-primitive/dist/index.mjs
var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
var NODES3 = [
  "a",
  "button",
  "div",
  "form",
  "h2",
  "h3",
  "img",
  "input",
  "label",
  "li",
  "nav",
  "ol",
  "p",
  "select",
  "span",
  "svg",
  "ul"
];
var Primitive3 = NODES3.reduce((primitive, node) => {
  const Slot2 = createSlot3(`Primitive.${node}`);
  const Node2 = React19.forwardRef((props, forwardedRef) => {
    const { asChild, ...primitiveProps } = props;
    const Comp = asChild ? Slot2 : node;
    if (typeof window !== "undefined") {
      window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
  });
  Node2.displayName = `Primitive.${node}`;
  return { ...primitive, [node]: Node2 };
}, {});

// node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
var React20 = __toESM(require_react(), 1);
var useLayoutEffect22 = globalThis?.document ? React20.useLayoutEffect : () => {
};

// node_modules/@radix-ui/react-portal/dist/index.mjs
var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
var PORTAL_NAME = "Portal";
var Portal = React21.forwardRef((props, forwardedRef) => {
  const { container: containerProp, ...portalProps } = props;
  const [mounted, setMounted] = React21.useState(false);
  useLayoutEffect22(() => setMounted(true), []);
  const container = containerProp || mounted && globalThis?.document?.body;
  return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Primitive3.div, { ...portalProps, ref: forwardedRef }), container) : null;
});
Portal.displayName = PORTAL_NAME;

// node_modules/@radix-ui/react-presence/dist/index.mjs
var React25 = __toESM(require_react(), 1);

// node_modules/@radix-ui/react-presence/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
var React23 = __toESM(require_react(), 1);
function setRef5(ref, value) {
  if (typeof ref === "function") {
    return ref(value);
  } else if (ref !== null && ref !== void 0) {
    ref.current = value;
  }
}
function composeRefs5(...refs) {
  return (node) => {
    let hasCleanup = false;
    const cleanups = refs.map((ref) => {
      const cleanup = setRef5(ref, node);
      if (!hasCleanup && typeof cleanup == "function") {
        hasCleanup = true;
      }
      return cleanup;
    });
    if (hasCleanup) {
      return () => {
        for (let i = 0; i < cleanups.length; i++) {
          const cleanup = cleanups[i];
          if (typeof cleanup == "function") {
            cleanup();
          } else {
            setRef5(refs[i], null);
          }
        }
      };
    }
  };
}
function useComposedRefs4(...refs) {
  return React23.useCallback(composeRefs5(...refs), refs);
}

// node_modules/@radix-ui/react-presence/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
var React24 = __toESM(require_react(), 1);
var useLayoutEffect23 = globalThis?.document ? React24.useLayoutEffect : () => {
};

// node_modules/@radix-ui/react-presence/dist/index.mjs
var React26 = __toESM(require_react(), 1);
function useStateMachine(initialState, machine) {
  return React26.useReducer((state, event) => {
    const nextState = machine[state][event];
    return nextState ?? state;
  }, initialState);
}
var Presence = (props) => {
  const { present, children } = props;
  const presence = usePresence(present);
  const child = typeof children === "function" ? children({ present: presence.isPresent }) : React25.Children.only(children);
  const ref = useComposedRefs4(presence.ref, getElementRef4(child));
  const forceMount = typeof children === "function";
  return forceMount || presence.isPresent ? React25.cloneElement(child, { ref }) : null;
};
Presence.displayName = "Presence";
function usePresence(present) {
  const [node, setNode] = React25.useState();
  const stylesRef = React25.useRef(null);
  const prevPresentRef = React25.useRef(present);
  const prevAnimationNameRef = React25.useRef("none");
  const initialState = present ? "mounted" : "unmounted";
  const [state, send] = useStateMachine(initialState, {
    mounted: {
      UNMOUNT: "unmounted",
      ANIMATION_OUT: "unmountSuspended"
    },
    unmountSuspended: {
      MOUNT: "mounted",
      ANIMATION_END: "unmounted"
    },
    unmounted: {
      MOUNT: "mounted"
    }
  });
  React25.useEffect(() => {
    const currentAnimationName = getAnimationName(stylesRef.current);
    prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
  }, [state]);
  useLayoutEffect23(() => {
    const styles = stylesRef.current;
    const wasPresent = prevPresentRef.current;
    const hasPresentChanged = wasPresent !== present;
    if (hasPresentChanged) {
      const prevAnimationName = prevAnimationNameRef.current;
      const currentAnimationName = getAnimationName(styles);
      if (present) {
        send("MOUNT");
      } else if (currentAnimationName === "none" || styles?.display === "none") {
        send("UNMOUNT");
      } else {
        const isAnimating = prevAnimationName !== currentAnimationName;
        if (wasPresent && isAnimating) {
          send("ANIMATION_OUT");
        } else {
          send("UNMOUNT");
        }
      }
      prevPresentRef.current = present;
    }
  }, [present, send]);
  useLayoutEffect23(() => {
    if (node) {
      let timeoutId;
      const ownerWindow = node.ownerDocument.defaultView ?? window;
      const handleAnimationEnd = (event) => {
        const currentAnimationName = getAnimationName(stylesRef.current);
        const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
        if (event.target === node && isCurrentAnimation) {
          send("ANIMATION_END");
          if (!prevPresentRef.current) {
            const currentFillMode = node.style.animationFillMode;
            node.style.animationFillMode = "forwards";
            timeoutId = ownerWindow.setTimeout(() => {
              if (node.style.animationFillMode === "forwards") {
                node.style.animationFillMode = currentFillMode;
              }
            });
          }
        }
      };
      const handleAnimationStart = (event) => {
        if (event.target === node) {
          prevAnimationNameRef.current = getAnimationName(stylesRef.current);
        }
      };
      node.addEventListener("animationstart", handleAnimationStart);
      node.addEventListener("animationcancel", handleAnimationEnd);
      node.addEventListener("animationend", handleAnimationEnd);
      return () => {
        ownerWindow.clearTimeout(timeoutId);
        node.removeEventListener("animationstart", handleAnimationStart);
        node.removeEventListener("animationcancel", handleAnimationEnd);
        node.removeEventListener("animationend", handleAnimationEnd);
      };
    } else {
      send("ANIMATION_END");
    }
  }, [node, send]);
  return {
    isPresent: ["mounted", "unmountSuspended"].includes(state),
    ref: React25.useCallback((node2) => {
      stylesRef.current = node2 ? getComputedStyle(node2) : null;
      setNode(node2);
    }, [])
  };
}
function getAnimationName(styles) {
  return styles?.animationName || "none";
}
function getElementRef4(element) {
  let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
  if (mayWarn) {
    return element.ref;
  }
  getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
  mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
  if (mayWarn) {
    return element.props.ref;
  }
  return element.props.ref || element.ref;
}

// node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.mjs
var React28 = __toESM(require_react(), 1);
var ReactDOM5 = __toESM(require_react_dom(), 1);

// node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.mjs
var React27 = __toESM(require_react(), 1);
var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
// @__NO_SIDE_EFFECTS__
function createSlot4(ownerName) {
  const SlotClone = /* @__PURE__ */ createSlotClone4(ownerName);
  const Slot2 = React27.forwardRef((props, forwardedRef) => {
    const { children, ...slotProps } = props;
    const childrenArray = React27.Children.toArray(children);
    const slottable = childrenArray.find(isSlottable4);
    if (slottable) {
      const newElement = slottable.props.children;
      const newChildren = childrenArray.map((child) => {
        if (child === slottable) {
          if (React27.Children.count(newElement) > 1) return React27.Children.only(null);
          return React27.isValidElement(newElement) ? newElement.props.children : null;
        } else {
          return child;
        }
      });
      return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React27.isValidElement(newElement) ? React27.cloneElement(newElement, void 0, newChildren) : null });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
  });
  Slot2.displayName = `${ownerName}.Slot`;
  return Slot2;
}
// @__NO_SIDE_EFFECTS__
function createSlotClone4(ownerName) {
  const SlotClone = React27.forwardRef((props, forwardedRef) => {
    const { children, ...slotProps } = props;
    if (React27.isValidElement(children)) {
      const childrenRef = getElementRef5(children);
      const props2 = mergeProps4(slotProps, children.props);
      if (children.type !== React27.Fragment) {
        props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
      }
      return React27.cloneElement(children, props2);
    }
    return React27.Children.count(children) > 1 ? React27.Children.only(null) : null;
  });
  SlotClone.displayName = `${ownerName}.SlotClone`;
  return SlotClone;
}
var SLOTTABLE_IDENTIFIER4 = /* @__PURE__ */ Symbol("radix.slottable");
function isSlottable4(child) {
  return React27.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER4;
}
function mergeProps4(slotProps, childProps) {
  const overrideProps = { ...childProps };
  for (const propName in childProps) {
    const slotPropValue = slotProps[propName];
    const childPropValue = childProps[propName];
    const isHandler = /^on[A-Z]/.test(propName);
    if (isHandler) {
      if (slotPropValue && childPropValue) {
        overrideProps[propName] = (...args) => {
          const result = childPropValue(...args);
          slotPropValue(...args);
          return result;
        };
      } else if (slotPropValue) {
        overrideProps[propName] = slotPropValue;
      }
    } else if (propName === "style") {
      overrideProps[propName] = { ...slotPropValue, ...childPropValue };
    } else if (propName === "className") {
      overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
    }
  }
  return { ...slotProps, ...overrideProps };
}
function getElementRef5(element) {
  let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
  if (mayWarn) {
    return element.ref;
  }
  getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
  mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
  if (mayWarn) {
    return element.props.ref;
  }
  return element.props.ref || element.ref;
}

// node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.mjs
var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
var NODES4 = [
  "a",
  "button",
  "div",
  "form",
  "h2",
  "h3",
  "img",
  "input",
  "label",
  "li",
  "nav",
  "ol",
  "p",
  "select",
  "span",
  "svg",
  "ul"
];
var Primitive4 = NODES4.reduce((primitive, node) => {
  const Slot2 = createSlot4(`Primitive.${node}`);
  const Node2 = React28.forwardRef((props, forwardedRef) => {
    const { asChild, ...primitiveProps } = props;
    const Comp = asChild ? Slot2 : node;
    if (typeof window !== "undefined") {
      window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
  });
  Node2.displayName = `Primitive.${node}`;
  return { ...primitive, [node]: Node2 };
}, {});

// node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
var React29 = __toESM(require_react(), 1);
var count2 = 0;
function useFocusGuards() {
  React29.useEffect(() => {
    const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
    document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
    document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
    count2++;
    return () => {
      if (count2 === 1) {
        document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
      }
      count2--;
    };
  }, []);
}
function createFocusGuard() {
  const element = document.createElement("span");
  element.setAttribute("data-radix-focus-guard", "");
  element.tabIndex = 0;
  element.style.outline = "none";
  element.style.opacity = "0";
  element.style.position = "fixed";
  element.style.pointerEvents = "none";
  return element;
}

// node_modules/tslib/tslib.es6.mjs
var __assign = function() {
  __assign = Object.assign || function __assign2(t2) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
      s = arguments[i];
      for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2)) t2[p2] = s[p2];
    }
    return t2;
  };
  return __assign.apply(this, arguments);
};
function __rest(s, e) {
  var t2 = {};
  for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2) && e.indexOf(p2) < 0)
    t2[p2] = s[p2];
  if (s != null && typeof Object.getOwnPropertySymbols === "function")
    for (var i = 0, p2 = Object.getOwnPropertySymbols(s); i < p2.length; i++) {
      if (e.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p2[i]))
        t2[p2[i]] = s[p2[i]];
    }
  return t2;
}
function __spreadArray(to, from, pack) {
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
    if (ar || !(i in from)) {
      if (!ar) ar = Array.prototype.slice.call(from, 0, i);
      ar[i] = from[i];
    }
  }
  return to.concat(ar || Array.prototype.slice.call(from));
}

// node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/Combination.js
var React36 = __toESM(require_react());

// node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/UI.js
var React32 = __toESM(require_react());

// node_modules/react-remove-scroll-bar/dist/es2015/constants.js
var zeroRightClassName = "right-scroll-bar-position";
var fullWidthClassName = "width-before-scroll-bar";
var noScrollbarsClassName = "with-scroll-bars-hidden";
var removedBarSizeVariable = "--removed-body-scroll-bar-size";

// node_modules/use-callback-ref/dist/es2015/assignRef.js
function assignRef(ref, value) {
  if (typeof ref === "function") {
    ref(value);
  } else if (ref) {
    ref.current = value;
  }
  return ref;
}

// node_modules/use-callback-ref/dist/es2015/useRef.js
var import_react = __toESM(require_react());
function useCallbackRef3(initialValue, callback) {
  var ref = (0, import_react.useState)(function() {
    return {
      // value
      value: initialValue,
      // last callback
      callback,
      // "memoized" public interface
      facade: {
        get current() {
          return ref.value;
        },
        set current(value) {
          var last = ref.value;
          if (last !== value) {
            ref.value = value;
            ref.callback(value, last);
          }
        }
      }
    };
  })[0];
  ref.callback = callback;
  return ref.facade;
}

// node_modules/use-callback-ref/dist/es2015/useMergeRef.js
var React30 = __toESM(require_react());
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React30.useLayoutEffect : React30.useEffect;
var currentValues = /* @__PURE__ */ new WeakMap();
function useMergeRefs(refs, defaultValue) {
  var callbackRef = useCallbackRef3(defaultValue || null, function(newValue) {
    return refs.forEach(function(ref) {
      return assignRef(ref, newValue);
    });
  });
  useIsomorphicLayoutEffect(function() {
    var oldValue = currentValues.get(callbackRef);
    if (oldValue) {
      var prevRefs_1 = new Set(oldValue);
      var nextRefs_1 = new Set(refs);
      var current_1 = callbackRef.current;
      prevRefs_1.forEach(function(ref) {
        if (!nextRefs_1.has(ref)) {
          assignRef(ref, null);
        }
      });
      nextRefs_1.forEach(function(ref) {
        if (!prevRefs_1.has(ref)) {
          assignRef(ref, current_1);
        }
      });
    }
    currentValues.set(callbackRef, refs);
  }, [refs]);
  return callbackRef;
}

// node_modules/use-sidecar/dist/es2015/medium.js
function ItoI(a) {
  return a;
}
function innerCreateMedium(defaults, middleware) {
  if (middleware === void 0) {
    middleware = ItoI;
  }
  var buffer = [];
  var assigned = false;
  var medium = {
    read: function() {
      if (assigned) {
        throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
      }
      if (buffer.length) {
        return buffer[buffer.length - 1];
      }
      return defaults;
    },
    useMedium: function(data) {
      var item = middleware(data, assigned);
      buffer.push(item);
      return function() {
        buffer = buffer.filter(function(x) {
          return x !== item;
        });
      };
    },
    assignSyncMedium: function(cb) {
      assigned = true;
      while (buffer.length) {
        var cbs = buffer;
        buffer = [];
        cbs.forEach(cb);
      }
      buffer = {
        push: function(x) {
          return cb(x);
        },
        filter: function() {
          return buffer;
        }
      };
    },
    assignMedium: function(cb) {
      assigned = true;
      var pendingQueue = [];
      if (buffer.length) {
        var cbs = buffer;
        buffer = [];
        cbs.forEach(cb);
        pendingQueue = buffer;
      }
      var executeQueue = function() {
        var cbs2 = pendingQueue;
        pendingQueue = [];
        cbs2.forEach(cb);
      };
      var cycle = function() {
        return Promise.resolve().then(executeQueue);
      };
      cycle();
      buffer = {
        push: function(x) {
          pendingQueue.push(x);
          cycle();
        },
        filter: function(filter) {
          pendingQueue = pendingQueue.filter(filter);
          return buffer;
        }
      };
    }
  };
  return medium;
}
function createSidecarMedium(options) {
  if (options === void 0) {
    options = {};
  }
  var medium = innerCreateMedium(null);
  medium.options = __assign({ async: true, ssr: false }, options);
  return medium;
}

// node_modules/use-sidecar/dist/es2015/exports.js
var React31 = __toESM(require_react());
var SideCar = function(_a) {
  var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
  if (!sideCar) {
    throw new Error("Sidecar: please provide `sideCar` property to import the right car");
  }
  var Target = sideCar.read();
  if (!Target) {
    throw new Error("Sidecar medium not found");
  }
  return React31.createElement(Target, __assign({}, rest));
};
SideCar.isSideCarExport = true;
function exportSidecar(medium, exported) {
  medium.useMedium(exported);
  return SideCar;
}

// node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/medium.js
var effectCar = createSidecarMedium();

// node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/UI.js
var nothing = function() {
  return;
};
var RemoveScroll = React32.forwardRef(function(props, parentRef) {
  var ref = React32.useRef(null);
  var _a = React32.useState({
    onScrollCapture: nothing,
    onWheelCapture: nothing,
    onTouchMoveCapture: nothing
  }), callbacks = _a[0], setCallbacks = _a[1];
  var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
  var SideCar2 = sideCar;
  var containerRef = useMergeRefs([ref, parentRef]);
  var containerProps = __assign(__assign({}, rest), callbacks);
  return React32.createElement(
    React32.Fragment,
    null,
    enabled && React32.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
    forwardProps ? React32.cloneElement(React32.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React32.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
  );
});
RemoveScroll.defaultProps = {
  enabled: true,
  removeScrollBar: true,
  inert: false
};
RemoveScroll.classNames = {
  fullWidth: fullWidthClassName,
  zeroRight: zeroRightClassName
};

// node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
var React35 = __toESM(require_react());

// node_modules/react-remove-scroll-bar/dist/es2015/component.js
var React34 = __toESM(require_react());

// node_modules/react-style-singleton/dist/es2015/hook.js
var React33 = __toESM(require_react());

// node_modules/get-nonce/dist/es2015/index.js
var currentNonce;
var getNonce = function() {
  if (currentNonce) {
    return currentNonce;
  }
  if (typeof __webpack_nonce__ !== "undefined") {
    return __webpack_nonce__;
  }
  return void 0;
};

// node_modules/react-style-singleton/dist/es2015/singleton.js
function makeStyleTag() {
  if (!document)
    return null;
  var tag = document.createElement("style");
  tag.type = "text/css";
  var nonce = getNonce();
  if (nonce) {
    tag.setAttribute("nonce", nonce);
  }
  return tag;
}
function injectStyles(tag, css) {
  if (tag.styleSheet) {
    tag.styleSheet.cssText = css;
  } else {
    tag.appendChild(document.createTextNode(css));
  }
}
function insertStyleTag(tag) {
  var head = document.head || document.getElementsByTagName("head")[0];
  head.appendChild(tag);
}
var stylesheetSingleton = function() {
  var counter = 0;
  var stylesheet = null;
  return {
    add: function(style) {
      if (counter == 0) {
        if (stylesheet = makeStyleTag()) {
          injectStyles(stylesheet, style);
          insertStyleTag(stylesheet);
        }
      }
      counter++;
    },
    remove: function() {
      counter--;
      if (!counter && stylesheet) {
        stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
        stylesheet = null;
      }
    }
  };
};

// node_modules/react-style-singleton/dist/es2015/hook.js
var styleHookSingleton = function() {
  var sheet = stylesheetSingleton();
  return function(styles, isDynamic) {
    React33.useEffect(function() {
      sheet.add(styles);
      return function() {
        sheet.remove();
      };
    }, [styles && isDynamic]);
  };
};

// node_modules/react-style-singleton/dist/es2015/component.js
var styleSingleton = function() {
  var useStyle = styleHookSingleton();
  var Sheet = function(_a) {
    var styles = _a.styles, dynamic = _a.dynamic;
    useStyle(styles, dynamic);
    return null;
  };
  return Sheet;
};

// node_modules/react-remove-scroll-bar/dist/es2015/utils.js
var zeroGap = {
  left: 0,
  top: 0,
  right: 0,
  gap: 0
};
var parse = function(x) {
  return parseInt(x || "", 10) || 0;
};
var getOffset = function(gapMode) {
  var cs = window.getComputedStyle(document.body);
  var left = cs[gapMode === "padding" ? "paddingLeft" : "marginLeft"];
  var top = cs[gapMode === "padding" ? "paddingTop" : "marginTop"];
  var right = cs[gapMode === "padding" ? "paddingRight" : "marginRight"];
  return [parse(left), parse(top), parse(right)];
};
var getGapWidth = function(gapMode) {
  if (gapMode === void 0) {
    gapMode = "margin";
  }
  if (typeof window === "undefined") {
    return zeroGap;
  }
  var offsets = getOffset(gapMode);
  var documentWidth = document.documentElement.clientWidth;
  var windowWidth = window.innerWidth;
  return {
    left: offsets[0],
    top: offsets[1],
    right: offsets[2],
    gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0])
  };
};

// node_modules/react-remove-scroll-bar/dist/es2015/component.js
var Style = styleSingleton();
var lockAttribute = "data-scroll-locked";
var getStyles = function(_a, allowRelative, gapMode, important) {
  var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;
  if (gapMode === void 0) {
    gapMode = "margin";
  }
  return "\n  .".concat(noScrollbarsClassName, " {\n   overflow: hidden ").concat(important, ";\n   padding-right: ").concat(gap, "px ").concat(important, ";\n  }\n  body[").concat(lockAttribute, "] {\n    overflow: hidden ").concat(important, ";\n    overscroll-behavior: contain;\n    ").concat([
    allowRelative && "position: relative ".concat(important, ";"),
    gapMode === "margin" && "\n    padding-left: ".concat(left, "px;\n    padding-top: ").concat(top, "px;\n    padding-right: ").concat(right, "px;\n    margin-left:0;\n    margin-top:0;\n    margin-right: ").concat(gap, "px ").concat(important, ";\n    "),
    gapMode === "padding" && "padding-right: ".concat(gap, "px ").concat(important, ";")
  ].filter(Boolean).join(""), "\n  }\n  \n  .").concat(zeroRightClassName, " {\n    right: ").concat(gap, "px ").concat(important, ";\n  }\n  \n  .").concat(fullWidthClassName, " {\n    margin-right: ").concat(gap, "px ").concat(important, ";\n  }\n  \n  .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n    right: 0 ").concat(important, ";\n  }\n  \n  .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n    margin-right: 0 ").concat(important, ";\n  }\n  \n  body[").concat(lockAttribute, "] {\n    ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n  }\n");
};
var getCurrentUseCounter = function() {
  var counter = parseInt(document.body.getAttribute(lockAttribute) || "0", 10);
  return isFinite(counter) ? counter : 0;
};
var useLockAttribute = function() {
  React34.useEffect(function() {
    document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
    return function() {
      var newCounter = getCurrentUseCounter() - 1;
      if (newCounter <= 0) {
        document.body.removeAttribute(lockAttribute);
      } else {
        document.body.setAttribute(lockAttribute, newCounter.toString());
      }
    };
  }, []);
};
var RemoveScrollBar = function(_a) {
  var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
  useLockAttribute();
  var gap = React34.useMemo(function() {
    return getGapWidth(gapMode);
  }, [gapMode]);
  return React34.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
};

// node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
var passiveSupported = false;
if (typeof window !== "undefined") {
  try {
    options = Object.defineProperty({}, "passive", {
      get: function() {
        passiveSupported = true;
        return true;
      }
    });
    window.addEventListener("test", options, options);
    window.removeEventListener("test", options, options);
  } catch (err) {
    passiveSupported = false;
  }
}
var options;
var nonPassive = passiveSupported ? { passive: false } : false;

// node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/handleScroll.js
var alwaysContainsScroll = function(node) {
  return node.tagName === "TEXTAREA";
};
var elementCanBeScrolled = function(node, overflow) {
  if (!(node instanceof Element)) {
    return false;
  }
  var styles = window.getComputedStyle(node);
  return (
    // not-not-scrollable
    styles[overflow] !== "hidden" && // contains scroll inside self
    !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === "visible")
  );
};
var elementCouldBeVScrolled = function(node) {
  return elementCanBeScrolled(node, "overflowY");
};
var elementCouldBeHScrolled = function(node) {
  return elementCanBeScrolled(node, "overflowX");
};
var locationCouldBeScrolled = function(axis, node) {
  var ownerDocument = node.ownerDocument;
  var current = node;
  do {
    if (typeof ShadowRoot !== "undefined" && current instanceof ShadowRoot) {
      current = current.host;
    }
    var isScrollable = elementCouldBeScrolled(axis, current);
    if (isScrollable) {
      var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];
      if (scrollHeight > clientHeight) {
        return true;
      }
    }
    current = current.parentNode;
  } while (current && current !== ownerDocument.body);
  return false;
};
var getVScrollVariables = function(_a) {
  var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
  return [
    scrollTop,
    scrollHeight,
    clientHeight
  ];
};
var getHScrollVariables = function(_a) {
  var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
  return [
    scrollLeft,
    scrollWidth,
    clientWidth
  ];
};
var elementCouldBeScrolled = function(axis, node) {
  return axis === "v" ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
};
var getScrollVariables = function(axis, node) {
  return axis === "v" ? getVScrollVariables(node) : getHScrollVariables(node);
};
var getDirectionFactor = function(axis, direction) {
  return axis === "h" && direction === "rtl" ? -1 : 1;
};
var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
  var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
  var delta = directionFactor * sourceDelta;
  var target = event.target;
  var targetInLock = endTarget.contains(target);
  var shouldCancelScroll = false;
  var isDeltaPositive = delta > 0;
  var availableScroll = 0;
  var availableScrollTop = 0;
  do {
    if (!target) {
      break;
    }
    var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
    var elementScroll = scroll_1 - capacity - directionFactor * position;
    if (position || elementScroll) {
      if (elementCouldBeScrolled(axis, target)) {
        availableScroll += elementScroll;
        availableScrollTop += position;
      }
    }
    var parent_1 = target.parentNode;
    target = parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1;
  } while (
    // portaled content
    !targetInLock && target !== document.body || // self content
    targetInLock && (endTarget.contains(target) || endTarget === target)
  );
  if (isDeltaPositive && (noOverscroll && Math.abs(availableScroll) < 1 || !noOverscroll && delta > availableScroll)) {
    shouldCancelScroll = true;
  } else if (!isDeltaPositive && (noOverscroll && Math.abs(availableScrollTop) < 1 || !noOverscroll && -delta > availableScrollTop)) {
    shouldCancelScroll = true;
  }
  return shouldCancelScroll;
};

// node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
var getTouchXY = function(event) {
  return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
};
var getDeltaXY = function(event) {
  return [event.deltaX, event.deltaY];
};
var extractRef = function(ref) {
  return ref && "current" in ref ? ref.current : ref;
};
var deltaCompare = function(x, y) {
  return x[0] === y[0] && x[1] === y[1];
};
var generateStyle = function(id) {
  return "\n  .block-interactivity-".concat(id, " {pointer-events: none;}\n  .allow-interactivity-").concat(id, " {pointer-events: all;}\n");
};
var idCounter = 0;
var lockStack = [];
function RemoveScrollSideCar(props) {
  var shouldPreventQueue = React35.useRef([]);
  var touchStartRef = React35.useRef([0, 0]);
  var activeAxis = React35.useRef();
  var id = React35.useState(idCounter++)[0];
  var Style2 = React35.useState(styleSingleton)[0];
  var lastProps = React35.useRef(props);
  React35.useEffect(function() {
    lastProps.current = props;
  }, [props]);
  React35.useEffect(function() {
    if (props.inert) {
      document.body.classList.add("block-interactivity-".concat(id));
      var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
      allow_1.forEach(function(el) {
        return el.classList.add("allow-interactivity-".concat(id));
      });
      return function() {
        document.body.classList.remove("block-interactivity-".concat(id));
        allow_1.forEach(function(el) {
          return el.classList.remove("allow-interactivity-".concat(id));
        });
      };
    }
    return;
  }, [props.inert, props.lockRef.current, props.shards]);
  var shouldCancelEvent = React35.useCallback(function(event, parent) {
    if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) {
      return !lastProps.current.allowPinchZoom;
    }
    var touch = getTouchXY(event);
    var touchStart = touchStartRef.current;
    var deltaX = "deltaX" in event ? event.deltaX : touchStart[0] - touch[0];
    var deltaY = "deltaY" in event ? event.deltaY : touchStart[1] - touch[1];
    var currentAxis;
    var target = event.target;
    var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? "h" : "v";
    if ("touches" in event && moveDirection === "h" && target.type === "range") {
      return false;
    }
    var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
    if (!canBeScrolledInMainDirection) {
      return true;
    }
    if (canBeScrolledInMainDirection) {
      currentAxis = moveDirection;
    } else {
      currentAxis = moveDirection === "v" ? "h" : "v";
      canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
    }
    if (!canBeScrolledInMainDirection) {
      return false;
    }
    if (!activeAxis.current && "changedTouches" in event && (deltaX || deltaY)) {
      activeAxis.current = currentAxis;
    }
    if (!currentAxis) {
      return true;
    }
    var cancelingAxis = activeAxis.current || currentAxis;
    return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
  }, []);
  var shouldPrevent = React35.useCallback(function(_event) {
    var event = _event;
    if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
      return;
    }
    var delta = "deltaY" in event ? getDeltaXY(event) : getTouchXY(event);
    var sourceEvent = shouldPreventQueue.current.filter(function(e) {
      return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta);
    })[0];
    if (sourceEvent && sourceEvent.should) {
      if (event.cancelable) {
        event.preventDefault();
      }
      return;
    }
    if (!sourceEvent) {
      var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function(node) {
        return node.contains(event.target);
      });
      var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
      if (shouldStop) {
        if (event.cancelable) {
          event.preventDefault();
        }
      }
    }
  }, []);
  var shouldCancel = React35.useCallback(function(name, delta, target, should) {
    var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
    shouldPreventQueue.current.push(event);
    setTimeout(function() {
      shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) {
        return e !== event;
      });
    }, 1);
  }, []);
  var scrollTouchStart = React35.useCallback(function(event) {
    touchStartRef.current = getTouchXY(event);
    activeAxis.current = void 0;
  }, []);
  var scrollWheel = React35.useCallback(function(event) {
    shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
  }, []);
  var scrollTouchMove = React35.useCallback(function(event) {
    shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
  }, []);
  React35.useEffect(function() {
    lockStack.push(Style2);
    props.setCallbacks({
      onScrollCapture: scrollWheel,
      onWheelCapture: scrollWheel,
      onTouchMoveCapture: scrollTouchMove
    });
    document.addEventListener("wheel", shouldPrevent, nonPassive);
    document.addEventListener("touchmove", shouldPrevent, nonPassive);
    document.addEventListener("touchstart", scrollTouchStart, nonPassive);
    return function() {
      lockStack = lockStack.filter(function(inst) {
        return inst !== Style2;
      });
      document.removeEventListener("wheel", shouldPrevent, nonPassive);
      document.removeEventListener("touchmove", shouldPrevent, nonPassive);
      document.removeEventListener("touchstart", scrollTouchStart, nonPassive);
    };
  }, []);
  var removeScrollBar = props.removeScrollBar, inert = props.inert;
  return React35.createElement(
    React35.Fragment,
    null,
    inert ? React35.createElement(Style2, { styles: generateStyle(id) }) : null,
    removeScrollBar ? React35.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
  );
}
function getOutermostShadowParent(node) {
  var shadowParent = null;
  while (node !== null) {
    if (node instanceof ShadowRoot) {
      shadowParent = node.host;
      node = node.host;
    }
    node = node.parentNode;
  }
  return shadowParent;
}

// node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/sidecar.js
var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);

// node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/Combination.js
var ReactRemoveScroll = React36.forwardRef(function(props, ref) {
  return React36.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
});
ReactRemoveScroll.classNames = RemoveScroll.classNames;
var Combination_default = ReactRemoveScroll;

// node_modules/aria-hidden/dist/es2015/index.js
var getDefaultParent = function(originalTarget) {
  if (typeof document === "undefined") {
    return null;
  }
  var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
  return sampleTarget.ownerDocument.body;
};
var counterMap = /* @__PURE__ */ new WeakMap();
var uncontrolledNodes = /* @__PURE__ */ new WeakMap();
var markerMap = {};
var lockCount = 0;
var unwrapHost = function(node) {
  return node && (node.host || unwrapHost(node.parentNode));
};
var correctTargets = function(parent, targets) {
  return targets.map(function(target) {
    if (parent.contains(target)) {
      return target;
    }
    var correctedTarget = unwrapHost(target);
    if (correctedTarget && parent.contains(correctedTarget)) {
      return correctedTarget;
    }
    console.error("aria-hidden", target, "in not contained inside", parent, ". Doing nothing");
    return null;
  }).filter(function(x) {
    return Boolean(x);
  });
};
var applyAttributeToOthers = function(originalTarget, parentNode, markerName, controlAttribute) {
  var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
  if (!markerMap[markerName]) {
    markerMap[markerName] = /* @__PURE__ */ new WeakMap();
  }
  var markerCounter = markerMap[markerName];
  var hiddenNodes = [];
  var elementsToKeep = /* @__PURE__ */ new Set();
  var elementsToStop = new Set(targets);
  var keep = function(el) {
    if (!el || elementsToKeep.has(el)) {
      return;
    }
    elementsToKeep.add(el);
    keep(el.parentNode);
  };
  targets.forEach(keep);
  var deep = function(parent) {
    if (!parent || elementsToStop.has(parent)) {
      return;
    }
    Array.prototype.forEach.call(parent.children, function(node) {
      if (elementsToKeep.has(node)) {
        deep(node);
      } else {
        try {
          var attr = node.getAttribute(controlAttribute);
          var alreadyHidden = attr !== null && attr !== "false";
          var counterValue = (counterMap.get(node) || 0) + 1;
          var markerValue = (markerCounter.get(node) || 0) + 1;
          counterMap.set(node, counterValue);
          markerCounter.set(node, markerValue);
          hiddenNodes.push(node);
          if (counterValue === 1 && alreadyHidden) {
            uncontrolledNodes.set(node, true);
          }
          if (markerValue === 1) {
            node.setAttribute(markerName, "true");
          }
          if (!alreadyHidden) {
            node.setAttribute(controlAttribute, "true");
          }
        } catch (e) {
          console.error("aria-hidden: cannot operate on ", node, e);
        }
      }
    });
  };
  deep(parentNode);
  elementsToKeep.clear();
  lockCount++;
  return function() {
    hiddenNodes.forEach(function(node) {
      var counterValue = counterMap.get(node) - 1;
      var markerValue = markerCounter.get(node) - 1;
      counterMap.set(node, counterValue);
      markerCounter.set(node, markerValue);
      if (!counterValue) {
        if (!uncontrolledNodes.has(node)) {
          node.removeAttribute(controlAttribute);
        }
        uncontrolledNodes.delete(node);
      }
      if (!markerValue) {
        node.removeAttribute(markerName);
      }
    });
    lockCount--;
    if (!lockCount) {
      counterMap = /* @__PURE__ */ new WeakMap();
      counterMap = /* @__PURE__ */ new WeakMap();
      uncontrolledNodes = /* @__PURE__ */ new WeakMap();
      markerMap = {};
    }
  };
};
var hideOthers = function(originalTarget, parentNode, markerName) {
  if (markerName === void 0) {
    markerName = "data-aria-hidden";
  }
  var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
  var activeParentNode = parentNode || getDefaultParent(originalTarget);
  if (!activeParentNode) {
    return function() {
      return null;
    };
  }
  targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live], script")));
  return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
};

// node_modules/@radix-ui/react-dialog/dist/index.mjs
var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
var DIALOG_NAME = "Dialog";
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
var Dialog = (props) => {
  const {
    __scopeDialog,
    children,
    open: openProp,
    defaultOpen,
    onOpenChange,
    modal = true
  } = props;
  const triggerRef = React37.useRef(null);
  const contentRef = React37.useRef(null);
  const [open, setOpen] = useControllableState({
    prop: openProp,
    defaultProp: defaultOpen ?? false,
    onChange: onOpenChange,
    caller: DIALOG_NAME
  });
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
    DialogProvider,
    {
      scope: __scopeDialog,
      triggerRef,
      contentRef,
      contentId: useId(),
      titleId: useId(),
      descriptionId: useId(),
      open,
      onOpenChange: setOpen,
      onOpenToggle: React37.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
      modal,
      children
    }
  );
};
Dialog.displayName = DIALOG_NAME;
var TRIGGER_NAME = "DialogTrigger";
var DialogTrigger = React37.forwardRef(
  (props, forwardedRef) => {
    const { __scopeDialog, ...triggerProps } = props;
    const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
    const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
    return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
      Primitive4.button,
      {
        type: "button",
        "aria-haspopup": "dialog",
        "aria-expanded": context.open,
        "aria-controls": context.contentId,
        "data-state": getState(context.open),
        ...triggerProps,
        ref: composedTriggerRef,
        onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
      }
    );
  }
);
DialogTrigger.displayName = TRIGGER_NAME;
var PORTAL_NAME2 = "DialogPortal";
var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME2, {
  forceMount: void 0
});
var DialogPortal = (props) => {
  const { __scopeDialog, forceMount, children, container } = props;
  const context = useDialogContext(PORTAL_NAME2, __scopeDialog);
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React37.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Portal, { asChild: true, container, children: child }) })) });
};
DialogPortal.displayName = PORTAL_NAME2;
var OVERLAY_NAME = "DialogOverlay";
var DialogOverlay = React37.forwardRef(
  (props, forwardedRef) => {
    const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
    const { forceMount = portalContext.forceMount, ...overlayProps } = props;
    const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
    return context.modal ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
  }
);
DialogOverlay.displayName = OVERLAY_NAME;
var Slot = createSlot4("DialogOverlay.RemoveScroll");
var DialogOverlayImpl = React37.forwardRef(
  (props, forwardedRef) => {
    const { __scopeDialog, ...overlayProps } = props;
    const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
    return (
      // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
      // ie. when `Overlay` and `Content` are siblings
      /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Combination_default, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
        Primitive4.div,
        {
          "data-state": getState(context.open),
          ...overlayProps,
          ref: forwardedRef,
          style: { pointerEvents: "auto", ...overlayProps.style }
        }
      ) })
    );
  }
);
var CONTENT_NAME = "DialogContent";
var DialogContent = React37.forwardRef(
  (props, forwardedRef) => {
    const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
    const { forceMount = portalContext.forceMount, ...contentProps } = props;
    const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
    return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
  }
);
DialogContent.displayName = CONTENT_NAME;
var DialogContentModal = React37.forwardRef(
  (props, forwardedRef) => {
    const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
    const contentRef = React37.useRef(null);
    const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
    React37.useEffect(() => {
      const content = contentRef.current;
      if (content) return hideOthers(content);
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
      DialogContentImpl,
      {
        ...props,
        ref: composedRefs,
        trapFocus: context.open,
        disableOutsidePointerEvents: true,
        onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
          event.preventDefault();
          context.triggerRef.current?.focus();
        }),
        onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
          const originalEvent = event.detail.originalEvent;
          const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
          const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
          if (isRightClick) event.preventDefault();
        }),
        onFocusOutside: composeEventHandlers(
          props.onFocusOutside,
          (event) => event.preventDefault()
        )
      }
    );
  }
);
var DialogContentNonModal = React37.forwardRef(
  (props, forwardedRef) => {
    const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
    const hasInteractedOutsideRef = React37.useRef(false);
    const hasPointerDownOutsideRef = React37.useRef(false);
    return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
      DialogContentImpl,
      {
        ...props,
        ref: forwardedRef,
        trapFocus: false,
        disableOutsidePointerEvents: false,
        onCloseAutoFocus: (event) => {
          props.onCloseAutoFocus?.(event);
          if (!event.defaultPrevented) {
            if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
            event.preventDefault();
          }
          hasInteractedOutsideRef.current = false;
          hasPointerDownOutsideRef.current = false;
        },
        onInteractOutside: (event) => {
          props.onInteractOutside?.(event);
          if (!event.defaultPrevented) {
            hasInteractedOutsideRef.current = true;
            if (event.detail.originalEvent.type === "pointerdown") {
              hasPointerDownOutsideRef.current = true;
            }
          }
          const target = event.target;
          const targetIsTrigger = context.triggerRef.current?.contains(target);
          if (targetIsTrigger) event.preventDefault();
          if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
            event.preventDefault();
          }
        }
      }
    );
  }
);
var DialogContentImpl = React37.forwardRef(
  (props, forwardedRef) => {
    const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
    const context = useDialogContext(CONTENT_NAME, __scopeDialog);
    const contentRef = React37.useRef(null);
    const composedRefs = useComposedRefs(forwardedRef, contentRef);
    useFocusGuards();
    return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
        FocusScope,
        {
          asChild: true,
          loop: true,
          trapped: trapFocus,
          onMountAutoFocus: onOpenAutoFocus,
          onUnmountAutoFocus: onCloseAutoFocus,
          children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
            DismissableLayer,
            {
              role: "dialog",
              id: context.contentId,
              "aria-describedby": context.descriptionId,
              "aria-labelledby": context.titleId,
              "data-state": getState(context.open),
              ...contentProps,
              ref: composedRefs,
              onDismiss: () => context.onOpenChange(false)
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(TitleWarning, { titleId: context.titleId }),
        /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
      ] })
    ] });
  }
);
var TITLE_NAME = "DialogTitle";
var DialogTitle = React37.forwardRef(
  (props, forwardedRef) => {
    const { __scopeDialog, ...titleProps } = props;
    const context = useDialogContext(TITLE_NAME, __scopeDialog);
    return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Primitive4.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
  }
);
DialogTitle.displayName = TITLE_NAME;
var DESCRIPTION_NAME = "DialogDescription";
var DialogDescription = React37.forwardRef(
  (props, forwardedRef) => {
    const { __scopeDialog, ...descriptionProps } = props;
    const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
    return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Primitive4.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
  }
);
DialogDescription.displayName = DESCRIPTION_NAME;
var CLOSE_NAME = "DialogClose";
var DialogClose = React37.forwardRef(
  (props, forwardedRef) => {
    const { __scopeDialog, ...closeProps } = props;
    const context = useDialogContext(CLOSE_NAME, __scopeDialog);
    return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
      Primitive4.button,
      {
        type: "button",
        ...closeProps,
        ref: forwardedRef,
        onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
      }
    );
  }
);
DialogClose.displayName = CLOSE_NAME;
function getState(open) {
  return open ? "open" : "closed";
}
var TITLE_WARNING_NAME = "DialogTitleWarning";
var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
  contentName: CONTENT_NAME,
  titleName: TITLE_NAME,
  docsSlug: "dialog"
});
var TitleWarning = ({ titleId }) => {
  const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
  const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
  React37.useEffect(() => {
    if (titleId) {
      const hasTitle = document.getElementById(titleId);
      if (!hasTitle) console.error(MESSAGE);
    }
  }, [MESSAGE, titleId]);
  return null;
};
var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
var DescriptionWarning = ({ contentRef, descriptionId }) => {
  const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
  const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
  React37.useEffect(() => {
    const describedById = contentRef.current?.getAttribute("aria-describedby");
    if (descriptionId && describedById) {
      const hasDescription = document.getElementById(descriptionId);
      if (!hasDescription) console.warn(MESSAGE);
    }
  }, [MESSAGE, contentRef, descriptionId]);
  return null;
};
var Root = Dialog;
var Portal2 = DialogPortal;
var Overlay = DialogOverlay;
var Content = DialogContent;

// node_modules/cmdk/dist/index.mjs
var t = __toESM(require_react(), 1);

// node_modules/cmdk/node_modules/@radix-ui/react-primitive/dist/index.mjs
var React40 = __toESM(require_react(), 1);
var ReactDOM6 = __toESM(require_react_dom(), 1);

// node_modules/cmdk/node_modules/@radix-ui/react-slot/dist/index.mjs
var React39 = __toESM(require_react(), 1);

// node_modules/cmdk/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
var React38 = __toESM(require_react(), 1);
function setRef6(ref, value) {
  if (typeof ref === "function") {
    return ref(value);
  } else if (ref !== null && ref !== void 0) {
    ref.current = value;
  }
}
function composeRefs6(...refs) {
  return (node) => {
    let hasCleanup = false;
    const cleanups = refs.map((ref) => {
      const cleanup = setRef6(ref, node);
      if (!hasCleanup && typeof cleanup == "function") {
        hasCleanup = true;
      }
      return cleanup;
    });
    if (hasCleanup) {
      return () => {
        for (let i = 0; i < cleanups.length; i++) {
          const cleanup = cleanups[i];
          if (typeof cleanup == "function") {
            cleanup();
          } else {
            setRef6(refs[i], null);
          }
        }
      };
    }
  };
}

// node_modules/cmdk/node_modules/@radix-ui/react-slot/dist/index.mjs
var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
var use = React39[" use ".trim().toString()];
function isPromiseLike(value) {
  return typeof value === "object" && value !== null && "then" in value;
}
function isLazyComponent(element) {
  return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
}
// @__NO_SIDE_EFFECTS__
function createSlot5(ownerName) {
  const SlotClone = /* @__PURE__ */ createSlotClone5(ownerName);
  const Slot2 = React39.forwardRef((props, forwardedRef) => {
    let { children, ...slotProps } = props;
    if (isLazyComponent(children) && typeof use === "function") {
      children = use(children._payload);
    }
    const childrenArray = React39.Children.toArray(children);
    const slottable = childrenArray.find(isSlottable5);
    if (slottable) {
      const newElement = slottable.props.children;
      const newChildren = childrenArray.map((child) => {
        if (child === slottable) {
          if (React39.Children.count(newElement) > 1) return React39.Children.only(null);
          return React39.isValidElement(newElement) ? newElement.props.children : null;
        } else {
          return child;
        }
      });
      return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React39.isValidElement(newElement) ? React39.cloneElement(newElement, void 0, newChildren) : null });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
  });
  Slot2.displayName = `${ownerName}.Slot`;
  return Slot2;
}
// @__NO_SIDE_EFFECTS__
function createSlotClone5(ownerName) {
  const SlotClone = React39.forwardRef((props, forwardedRef) => {
    let { children, ...slotProps } = props;
    if (isLazyComponent(children) && typeof use === "function") {
      children = use(children._payload);
    }
    if (React39.isValidElement(children)) {
      const childrenRef = getElementRef6(children);
      const props2 = mergeProps5(slotProps, children.props);
      if (children.type !== React39.Fragment) {
        props2.ref = forwardedRef ? composeRefs6(forwardedRef, childrenRef) : childrenRef;
      }
      return React39.cloneElement(children, props2);
    }
    return React39.Children.count(children) > 1 ? React39.Children.only(null) : null;
  });
  SlotClone.displayName = `${ownerName}.SlotClone`;
  return SlotClone;
}
var SLOTTABLE_IDENTIFIER5 = /* @__PURE__ */ Symbol("radix.slottable");
function isSlottable5(child) {
  return React39.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER5;
}
function mergeProps5(slotProps, childProps) {
  const overrideProps = { ...childProps };
  for (const propName in childProps) {
    const slotPropValue = slotProps[propName];
    const childPropValue = childProps[propName];
    const isHandler = /^on[A-Z]/.test(propName);
    if (isHandler) {
      if (slotPropValue && childPropValue) {
        overrideProps[propName] = (...args) => {
          const result = childPropValue(...args);
          slotPropValue(...args);
          return result;
        };
      } else if (slotPropValue) {
        overrideProps[propName] = slotPropValue;
      }
    } else if (propName === "style") {
      overrideProps[propName] = { ...slotPropValue, ...childPropValue };
    } else if (propName === "className") {
      overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
    }
  }
  return { ...slotProps, ...overrideProps };
}
function getElementRef6(element) {
  let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
  if (mayWarn) {
    return element.ref;
  }
  getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
  mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
  if (mayWarn) {
    return element.props.ref;
  }
  return element.props.ref || element.ref;
}

// node_modules/cmdk/node_modules/@radix-ui/react-primitive/dist/index.mjs
var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
var NODES5 = [
  "a",
  "button",
  "div",
  "form",
  "h2",
  "h3",
  "img",
  "input",
  "label",
  "li",
  "nav",
  "ol",
  "p",
  "select",
  "span",
  "svg",
  "ul"
];
var Primitive5 = NODES5.reduce((primitive, node) => {
  const Slot2 = createSlot5(`Primitive.${node}`);
  const Node2 = React40.forwardRef((props, forwardedRef) => {
    const { asChild, ...primitiveProps } = props;
    const Comp = asChild ? Slot2 : node;
    if (typeof window !== "undefined") {
      window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
  });
  Node2.displayName = `Primitive.${node}`;
  return { ...primitive, [node]: Node2 };
}, {});

// node_modules/cmdk/node_modules/@radix-ui/react-id/dist/index.mjs
var React42 = __toESM(require_react(), 1);

// node_modules/cmdk/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
var React41 = __toESM(require_react(), 1);
var useLayoutEffect24 = globalThis?.document ? React41.useLayoutEffect : () => {
};

// node_modules/cmdk/node_modules/@radix-ui/react-id/dist/index.mjs
var useReactId2 = React42[" useId ".trim().toString()] || (() => void 0);
var count3 = 0;
function useId2(deterministicId) {
  const [id, setId] = React42.useState(useReactId2());
  useLayoutEffect24(() => {
    if (!deterministicId) setId((reactId) => reactId ?? String(count3++));
  }, [deterministicId]);
  return deterministicId || (id ? `radix-${id}` : "");
}

// node_modules/cmdk/dist/index.mjs
var N = '[cmdk-group=""]';
var Y2 = '[cmdk-group-items=""]';
var be = '[cmdk-group-heading=""]';
var le = '[cmdk-item=""]';
var ce = `${le}:not([aria-disabled="true"])`;
var Z = "cmdk-item-select";
var T = "data-value";
var Re = (r, o, n) => W(r, o, n);
var ue = t.createContext(void 0);
var K2 = () => t.useContext(ue);
var de = t.createContext(void 0);
var ee = () => t.useContext(de);
var fe = t.createContext(void 0);
var me = t.forwardRef((r, o) => {
  let n = L(() => {
    var e, a;
    return { search: "", value: (a = (e = r.value) != null ? e : r.defaultValue) != null ? a : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
  }), u2 = L(() => /* @__PURE__ */ new Set()), c = L(() => /* @__PURE__ */ new Map()), d = L(() => /* @__PURE__ */ new Map()), f = L(() => /* @__PURE__ */ new Set()), p2 = pe(r), { label: b, children: m2, value: R, onValueChange: x, filter: C, shouldFilter: S, loop: A, disablePointerSelection: ge = false, vimBindings: j = true, ...O } = r, $2 = useId2(), q = useId2(), _ = useId2(), I = t.useRef(null), v = ke();
  k2(() => {
    if (R !== void 0) {
      let e = R.trim();
      n.current.value = e, E.emit();
    }
  }, [R]), k2(() => {
    v(6, ne);
  }, []);
  let E = t.useMemo(() => ({ subscribe: (e) => (f.current.add(e), () => f.current.delete(e)), snapshot: () => n.current, setState: (e, a, s) => {
    var i, l, g, y;
    if (!Object.is(n.current[e], a)) {
      if (n.current[e] = a, e === "search") J2(), z(), v(1, W2);
      else if (e === "value") {
        if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
          let h = document.getElementById(_);
          h ? h.focus() : (i = document.getElementById($2)) == null || i.focus();
        }
        if (v(7, () => {
          var h;
          n.current.selectedItemId = (h = M()) == null ? void 0 : h.id, E.emit();
        }), s || v(5, ne), ((l = p2.current) == null ? void 0 : l.value) !== void 0) {
          let h = a != null ? a : "";
          (y = (g = p2.current).onValueChange) == null || y.call(g, h);
          return;
        }
      }
      E.emit();
    }
  }, emit: () => {
    f.current.forEach((e) => e());
  } }), []), U2 = t.useMemo(() => ({ value: (e, a, s) => {
    var i;
    a !== ((i = d.current.get(e)) == null ? void 0 : i.value) && (d.current.set(e, { value: a, keywords: s }), n.current.filtered.items.set(e, te(a, s)), v(2, () => {
      z(), E.emit();
    }));
  }, item: (e, a) => (u2.current.add(e), a && (c.current.has(a) ? c.current.get(a).add(e) : c.current.set(a, /* @__PURE__ */ new Set([e]))), v(3, () => {
    J2(), z(), n.current.value || W2(), E.emit();
  }), () => {
    d.current.delete(e), u2.current.delete(e), n.current.filtered.items.delete(e);
    let s = M();
    v(4, () => {
      J2(), (s == null ? void 0 : s.getAttribute("id")) === e && W2(), E.emit();
    });
  }), group: (e) => (c.current.has(e) || c.current.set(e, /* @__PURE__ */ new Set()), () => {
    d.current.delete(e), c.current.delete(e);
  }), filter: () => p2.current.shouldFilter, label: b || r["aria-label"], getDisablePointerSelection: () => p2.current.disablePointerSelection, listId: $2, inputId: _, labelId: q, listInnerRef: I }), []);
  function te(e, a) {
    var i, l;
    let s = (l = (i = p2.current) == null ? void 0 : i.filter) != null ? l : Re;
    return e ? s(e, n.current.search, a) : 0;
  }
  function z() {
    if (!n.current.search || p2.current.shouldFilter === false) return;
    let e = n.current.filtered.items, a = [];
    n.current.filtered.groups.forEach((i) => {
      let l = c.current.get(i), g = 0;
      l.forEach((y) => {
        let h = e.get(y);
        g = Math.max(h, g);
      }), a.push([i, g]);
    });
    let s = I.current;
    V().sort((i, l) => {
      var h, F;
      let g = i.getAttribute("id"), y = l.getAttribute("id");
      return ((h = e.get(y)) != null ? h : 0) - ((F = e.get(g)) != null ? F : 0);
    }).forEach((i) => {
      let l = i.closest(Y2);
      l ? l.appendChild(i.parentElement === l ? i : i.closest(`${Y2} > *`)) : s.appendChild(i.parentElement === s ? i : i.closest(`${Y2} > *`));
    }), a.sort((i, l) => l[1] - i[1]).forEach((i) => {
      var g;
      let l = (g = I.current) == null ? void 0 : g.querySelector(`${N}[${T}="${encodeURIComponent(i[0])}"]`);
      l == null || l.parentElement.appendChild(l);
    });
  }
  function W2() {
    let e = V().find((s) => s.getAttribute("aria-disabled") !== "true"), a = e == null ? void 0 : e.getAttribute(T);
    E.setState("value", a || void 0);
  }
  function J2() {
    var a, s, i, l;
    if (!n.current.search || p2.current.shouldFilter === false) {
      n.current.filtered.count = u2.current.size;
      return;
    }
    n.current.filtered.groups = /* @__PURE__ */ new Set();
    let e = 0;
    for (let g of u2.current) {
      let y = (s = (a = d.current.get(g)) == null ? void 0 : a.value) != null ? s : "", h = (l = (i = d.current.get(g)) == null ? void 0 : i.keywords) != null ? l : [], F = te(y, h);
      n.current.filtered.items.set(g, F), F > 0 && e++;
    }
    for (let [g, y] of c.current) for (let h of y) if (n.current.filtered.items.get(h) > 0) {
      n.current.filtered.groups.add(g);
      break;
    }
    n.current.filtered.count = e;
  }
  function ne() {
    var a, s, i;
    let e = M();
    e && (((a = e.parentElement) == null ? void 0 : a.firstChild) === e && ((i = (s = e.closest(N)) == null ? void 0 : s.querySelector(be)) == null || i.scrollIntoView({ block: "nearest" })), e.scrollIntoView({ block: "nearest" }));
  }
  function M() {
    var e;
    return (e = I.current) == null ? void 0 : e.querySelector(`${le}[aria-selected="true"]`);
  }
  function V() {
    var e;
    return Array.from(((e = I.current) == null ? void 0 : e.querySelectorAll(ce)) || []);
  }
  function X2(e) {
    let s = V()[e];
    s && E.setState("value", s.getAttribute(T));
  }
  function Q(e) {
    var g;
    let a = M(), s = V(), i = s.findIndex((y) => y === a), l = s[i + e];
    (g = p2.current) != null && g.loop && (l = i + e < 0 ? s[s.length - 1] : i + e === s.length ? s[0] : s[i + e]), l && E.setState("value", l.getAttribute(T));
  }
  function re(e) {
    let a = M(), s = a == null ? void 0 : a.closest(N), i;
    for (; s && !i; ) s = e > 0 ? we(s, N) : De(s, N), i = s == null ? void 0 : s.querySelector(ce);
    i ? E.setState("value", i.getAttribute(T)) : Q(e);
  }
  let oe = () => X2(V().length - 1), ie = (e) => {
    e.preventDefault(), e.metaKey ? oe() : e.altKey ? re(1) : Q(1);
  }, se = (e) => {
    e.preventDefault(), e.metaKey ? X2(0) : e.altKey ? re(-1) : Q(-1);
  };
  return t.createElement(Primitive5.div, { ref: o, tabIndex: -1, ...O, "cmdk-root": "", onKeyDown: (e) => {
    var s;
    (s = O.onKeyDown) == null || s.call(O, e);
    let a = e.nativeEvent.isComposing || e.keyCode === 229;
    if (!(e.defaultPrevented || a)) switch (e.key) {
      case "n":
      case "j": {
        j && e.ctrlKey && ie(e);
        break;
      }
      case "ArrowDown": {
        ie(e);
        break;
      }
      case "p":
      case "k": {
        j && e.ctrlKey && se(e);
        break;
      }
      case "ArrowUp": {
        se(e);
        break;
      }
      case "Home": {
        e.preventDefault(), X2(0);
        break;
      }
      case "End": {
        e.preventDefault(), oe();
        break;
      }
      case "Enter": {
        e.preventDefault();
        let i = M();
        if (i) {
          let l = new Event(Z);
          i.dispatchEvent(l);
        }
      }
    }
  } }, t.createElement("label", { "cmdk-label": "", htmlFor: U2.inputId, id: U2.labelId, style: Te }, b), B2(r, (e) => t.createElement(de.Provider, { value: E }, t.createElement(ue.Provider, { value: U2 }, e))));
});
var he = t.forwardRef((r, o) => {
  var _, I;
  let n = useId2(), u2 = t.useRef(null), c = t.useContext(fe), d = K2(), f = pe(r), p2 = (I = (_ = f.current) == null ? void 0 : _.forceMount) != null ? I : c == null ? void 0 : c.forceMount;
  k2(() => {
    if (!p2) return d.item(n, c == null ? void 0 : c.id);
  }, [p2]);
  let b = ve(n, u2, [r.value, r.children, u2], r.keywords), m2 = ee(), R = P((v) => v.value && v.value === b.current), x = P((v) => p2 || d.filter() === false ? true : v.search ? v.filtered.items.get(n) > 0 : true);
  t.useEffect(() => {
    let v = u2.current;
    if (!(!v || r.disabled)) return v.addEventListener(Z, C), () => v.removeEventListener(Z, C);
  }, [x, r.onSelect, r.disabled]);
  function C() {
    var v, E;
    S(), (E = (v = f.current).onSelect) == null || E.call(v, b.current);
  }
  function S() {
    m2.setState("value", b.current, true);
  }
  if (!x) return null;
  let { disabled: A, value: ge, onSelect: j, forceMount: O, keywords: $2, ...q } = r;
  return t.createElement(Primitive5.div, { ref: composeRefs6(u2, o), ...q, id: n, "cmdk-item": "", role: "option", "aria-disabled": !!A, "aria-selected": !!R, "data-disabled": !!A, "data-selected": !!R, onPointerMove: A || d.getDisablePointerSelection() ? void 0 : S, onClick: A ? void 0 : C }, r.children);
});
var Ee = t.forwardRef((r, o) => {
  let { heading: n, children: u2, forceMount: c, ...d } = r, f = useId2(), p2 = t.useRef(null), b = t.useRef(null), m2 = useId2(), R = K2(), x = P((S) => c || R.filter() === false ? true : S.search ? S.filtered.groups.has(f) : true);
  k2(() => R.group(f), []), ve(f, p2, [r.value, r.heading, b]);
  let C = t.useMemo(() => ({ id: f, forceMount: c }), [c]);
  return t.createElement(Primitive5.div, { ref: composeRefs6(p2, o), ...d, "cmdk-group": "", role: "presentation", hidden: x ? void 0 : true }, n && t.createElement("div", { ref: b, "cmdk-group-heading": "", "aria-hidden": true, id: m2 }, n), B2(r, (S) => t.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? m2 : void 0 }, t.createElement(fe.Provider, { value: C }, S))));
});
var ye = t.forwardRef((r, o) => {
  let { alwaysRender: n, ...u2 } = r, c = t.useRef(null), d = P((f) => !f.search);
  return !n && !d ? null : t.createElement(Primitive5.div, { ref: composeRefs6(c, o), ...u2, "cmdk-separator": "", role: "separator" });
});
var Se = t.forwardRef((r, o) => {
  let { onValueChange: n, ...u2 } = r, c = r.value != null, d = ee(), f = P((m2) => m2.search), p2 = P((m2) => m2.selectedItemId), b = K2();
  return t.useEffect(() => {
    r.value != null && d.setState("search", r.value);
  }, [r.value]), t.createElement(Primitive5.input, { ref: o, ...u2, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: false, "aria-autocomplete": "list", role: "combobox", "aria-expanded": true, "aria-controls": b.listId, "aria-labelledby": b.labelId, "aria-activedescendant": p2, id: b.inputId, type: "text", value: c ? r.value : f, onChange: (m2) => {
    c || d.setState("search", m2.target.value), n == null || n(m2.target.value);
  } });
});
var Ce = t.forwardRef((r, o) => {
  let { children: n, label: u2 = "Suggestions", ...c } = r, d = t.useRef(null), f = t.useRef(null), p2 = P((m2) => m2.selectedItemId), b = K2();
  return t.useEffect(() => {
    if (f.current && d.current) {
      let m2 = f.current, R = d.current, x, C = new ResizeObserver(() => {
        x = requestAnimationFrame(() => {
          let S = m2.offsetHeight;
          R.style.setProperty("--cmdk-list-height", S.toFixed(1) + "px");
        });
      });
      return C.observe(m2), () => {
        cancelAnimationFrame(x), C.unobserve(m2);
      };
    }
  }, []), t.createElement(Primitive5.div, { ref: composeRefs6(d, o), ...c, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b.listId }, B2(r, (m2) => t.createElement("div", { ref: composeRefs6(f, b.listInnerRef), "cmdk-list-sizer": "" }, m2)));
});
var xe = t.forwardRef((r, o) => {
  let { open: n, onOpenChange: u2, overlayClassName: c, contentClassName: d, container: f, ...p2 } = r;
  return t.createElement(Root, { open: n, onOpenChange: u2 }, t.createElement(Portal2, { container: f }, t.createElement(Overlay, { "cmdk-overlay": "", className: c }), t.createElement(Content, { "aria-label": r.label, "cmdk-dialog": "", className: d }, t.createElement(me, { ref: o, ...p2 }))));
});
var Ie = t.forwardRef((r, o) => P((u2) => u2.filtered.count === 0) ? t.createElement(Primitive5.div, { ref: o, ...r, "cmdk-empty": "", role: "presentation" }) : null);
var Pe = t.forwardRef((r, o) => {
  let { progress: n, children: u2, label: c = "Loading...", ...d } = r;
  return t.createElement(Primitive5.div, { ref: o, ...d, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": c }, B2(r, (f) => t.createElement("div", { "aria-hidden": true }, f)));
});
var _e = Object.assign(me, { List: Ce, Item: he, Input: Se, Group: Ee, Separator: ye, Dialog: xe, Empty: Ie, Loading: Pe });
function we(r, o) {
  let n = r.nextElementSibling;
  for (; n; ) {
    if (n.matches(o)) return n;
    n = n.nextElementSibling;
  }
}
function De(r, o) {
  let n = r.previousElementSibling;
  for (; n; ) {
    if (n.matches(o)) return n;
    n = n.previousElementSibling;
  }
}
function pe(r) {
  let o = t.useRef(r);
  return k2(() => {
    o.current = r;
  }), o;
}
var k2 = typeof window == "undefined" ? t.useEffect : t.useLayoutEffect;
function L(r) {
  let o = t.useRef();
  return o.current === void 0 && (o.current = r()), o;
}
function P(r) {
  let o = ee(), n = () => r(o.snapshot());
  return t.useSyncExternalStore(o.subscribe, n, n);
}
function ve(r, o, n, u2 = []) {
  let c = t.useRef(), d = K2();
  return k2(() => {
    var b;
    let f = (() => {
      var m2;
      for (let R of n) {
        if (typeof R == "string") return R.trim();
        if (typeof R == "object" && "current" in R) return R.current ? (m2 = R.current.textContent) == null ? void 0 : m2.trim() : c.current;
      }
    })(), p2 = u2.map((m2) => m2.trim());
    d.value(r, f, p2), (b = o.current) == null || b.setAttribute(T, f), c.current = f;
  }), c;
}
var ke = () => {
  let [r, o] = t.useState(), n = L(() => /* @__PURE__ */ new Map());
  return k2(() => {
    n.current.forEach((u2) => u2()), n.current = /* @__PURE__ */ new Map();
  }, [r]), (u2, c) => {
    n.current.set(u2, c), o({});
  };
};
function Me(r) {
  let o = r.type;
  return typeof o == "function" ? o(r.props) : "render" in o ? o.render(r.props) : r;
}
function B2({ asChild: r, children: o }, n) {
  return r && t.isValidElement(o) ? t.cloneElement(Me(o), { ref: o.ref }, n(o.props.children)) : n(o);
}
var Te = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };

// packages/workflow/build-module/components/workflow-menu.mjs
var import_data = __toESM(require_data(), 1);
var import_element2 = __toESM(require_element(), 1);
var import_i18n = __toESM(require_i18n(), 1);
var import_components = __toESM(require_components(), 1);
var import_keyboard_shortcuts = __toESM(require_keyboard_shortcuts(), 1);

// packages/icons/build-module/icon/index.mjs
var import_element = __toESM(require_element(), 1);
var icon_default = (0, import_element.forwardRef)(
  ({ icon, size = 24, ...props }, ref) => {
    return (0, import_element.cloneElement)(icon, {
      width: size,
      height: size,
      ...props,
      ref
    });
  }
);

// packages/icons/build-module/library/search.mjs
var import_primitives = __toESM(require_primitives(), 1);
var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
var search_default = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives.Path, { 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" }) });

// packages/workflow/build-module/components/workflow-menu.mjs
import { executeAbility, store as abilitiesStore } from "@wordpress/abilities";

// packages/workflow/build-module/lock-unlock.mjs
var import_private_apis = __toESM(require_private_apis(), 1);
var { lock, unlock } = (0, import_private_apis.__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/workflows"
);

// packages/workflow/build-module/components/workflow-menu.mjs
var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='cbad731ae6']")) {
  const style = document.createElement("style");
  style.setAttribute("data-wp-hash", "cbad731ae6");
  style.appendChild(document.createTextNode(":root{--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color);--wp-editor-canvas-background:#ddd;--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,160.5;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.workflows-workflow-menu{border-radius:4px;margin:auto;max-width:400px;position:relative;top:calc(5% + 64px);width:calc(100% - 32px)}@media (min-width:600px){.workflows-workflow-menu{top:calc(10% + 64px)}}.workflows-workflow-menu .components-modal__content{margin:0;padding:0}.workflows-workflow-menu__overlay{align-items:start;display:block}.workflows-workflow-menu__header{padding:0 16px}.workflows-workflow-menu__header-search-icon:dir(ltr){transform:scaleX(-1)}.workflows-workflow-menu__container{will-change:transform}.workflows-workflow-menu__container:focus{outline:none}.workflows-workflow-menu__container [cmdk-input]{border:none;border-radius:0;color:#1e1e1e;font-size:15px;line-height:28px;margin:0;outline:none;padding:16px 4px;width:100%}.workflows-workflow-menu__container [cmdk-input]::placeholder{color:#757575}.workflows-workflow-menu__container [cmdk-input]:focus{box-shadow:none;outline:none}.workflows-workflow-menu__container [cmdk-item]{align-items:center;border-radius:2px;color:#1e1e1e;cursor:pointer;display:flex;font-size:13px}.workflows-workflow-menu__container [cmdk-item]:active,.workflows-workflow-menu__container [cmdk-item][aria-selected=true]{background:var(--wp-admin-theme-color);color:#fff}.workflows-workflow-menu__container [cmdk-item][aria-disabled=true]{color:#949494;cursor:not-allowed}.workflows-workflow-menu__container [cmdk-item]>div{min-height:40px;padding:4px 4px 4px 16px}.workflows-workflow-menu__container [cmdk-root]>[cmdk-list]{max-height:368px;overflow:auto}.workflows-workflow-menu__container [cmdk-root]>[cmdk-list] [cmdk-list-sizer]>[cmdk-group]:last-child [cmdk-group-items]:not(:empty){padding-bottom:8px}.workflows-workflow-menu__container [cmdk-root]>[cmdk-list] [cmdk-list-sizer]>[cmdk-group]>[cmdk-group-items]:not(:empty){padding:0 8px}.workflows-workflow-menu__container [cmdk-empty]{align-items:center;color:#1e1e1e;display:flex;justify-content:center;padding:8px 0 32px;white-space:pre-wrap}.workflows-workflow-menu__container [cmdk-loading]{padding:16px}.workflows-workflow-menu__container [cmdk-list-sizer]{position:relative}.workflows-workflow-menu__item span{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.workflows-workflow-menu__item mark{background:unset;color:inherit;font-weight:600}.workflows-workflow-menu__output{padding:16px}.workflows-workflow-menu__output-header{border-bottom:1px solid #ddd;margin-bottom:16px;padding-bottom:8px}.workflows-workflow-menu__output-header h3{color:#1e1e1e;font-size:16px;font-weight:600;margin:0 0 4px}.workflows-workflow-menu__output-hint{color:#757575;font-size:12px;margin:0}.workflows-workflow-menu__output-content{max-height:400px;overflow:auto}.workflows-workflow-menu__output-content pre{background:#f0f0f0;border-radius:2px;color:#1e1e1e;font-size:12px;line-height:1.5;margin:0;padding:12px;white-space:pre-wrap;word-break:break-word}.workflows-workflow-menu__output-error{background:#e0e0e0;border:1px solid #9e1313;border-radius:2px;color:#cc1818;padding:12px}.workflows-workflow-menu__output-error p{font-size:13px;margin:0}.workflows-workflow-menu__executing{color:#757575;font-size:14px;padding:24px 16px}"));
  document.head.appendChild(style);
}
var { withIgnoreIMEEvents } = unlock(import_components.privateApis);
var EMPTY_ARRAY = [];
var inputLabel = (0, import_i18n.__)("Run abilities and workflows");
function WorkflowInput({ isOpen, search, setSearch, abilities }) {
  const workflowMenuInput = (0, import_element2.useRef)();
  const _value = P((state) => state.value);
  const selectedItemId = (0, import_element2.useMemo)(() => {
    const ability = abilities.find((a) => a.label === _value);
    return ability?.name;
  }, [_value, abilities]);
  (0, import_element2.useEffect)(() => {
    if (isOpen) {
      workflowMenuInput.current.focus();
    }
  }, [isOpen]);
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
    _e.Input,
    {
      ref: workflowMenuInput,
      value: search,
      onValueChange: setSearch,
      placeholder: inputLabel,
      "aria-activedescendant": selectedItemId
    }
  );
}
function WorkflowMenu() {
  const { registerShortcut } = (0, import_data.useDispatch)(import_keyboard_shortcuts.store);
  const [search, setSearch] = (0, import_element2.useState)("");
  const [isOpen, setIsOpen] = (0, import_element2.useState)(false);
  const [abilityOutput, setAbilityOutput] = (0, import_element2.useState)(null);
  const [isExecuting, setIsExecuting] = (0, import_element2.useState)(false);
  const containerRef = (0, import_element2.useRef)();
  const abilities = (0, import_data.useSelect)((select) => {
    const allAbilities = select(abilitiesStore).getAbilities();
    return allAbilities || EMPTY_ARRAY;
  }, []);
  const filteredAbilities = (0, import_element2.useMemo)(() => {
    if (!search) {
      return abilities;
    }
    const searchLower = search.toLowerCase();
    return abilities.filter(
      (ability) => ability.label?.toLowerCase().includes(searchLower) || ability.name?.toLowerCase().includes(searchLower)
    );
  }, [abilities, search]);
  (0, import_element2.useEffect)(() => {
    if (abilityOutput && containerRef.current) {
      containerRef.current.focus();
    }
  }, [abilityOutput]);
  (0, import_element2.useEffect)(() => {
    registerShortcut({
      name: "core/workflows",
      category: "global",
      description: (0, import_i18n.__)("Open the workflow palette."),
      keyCombination: {
        modifier: "primary",
        character: "j"
      }
    });
  }, [registerShortcut]);
  (0, import_keyboard_shortcuts.useShortcut)(
    "core/workflows",
    /** @type {React.KeyboardEventHandler} */
    withIgnoreIMEEvents((event) => {
      if (event.defaultPrevented) {
        return;
      }
      event.preventDefault();
      setIsOpen(!isOpen);
    }),
    {
      bindGlobal: true
    }
  );
  const closeAndReset = () => {
    setSearch("");
    setIsOpen(false);
    setAbilityOutput(null);
    setIsExecuting(false);
  };
  const goBack = () => {
    setAbilityOutput(null);
    setIsExecuting(false);
    setSearch("");
  };
  const handleExecuteAbility = async (ability) => {
    setIsExecuting(true);
    try {
      const result = await executeAbility(ability.name);
      setAbilityOutput({
        name: ability.name,
        label: ability?.label || ability.name,
        description: ability?.description || "",
        success: true,
        data: result
      });
    } catch (error) {
      setAbilityOutput({
        name: ability.name,
        label: ability?.label || ability.name,
        description: ability?.description || "",
        success: false,
        error: error.message || String(error)
      });
    } finally {
      setIsExecuting(false);
    }
  };
  const onContainerKeyDown = (event) => {
    if (abilityOutput && (event.key === "Escape" || event.key === "Backspace" || event.key === "Delete")) {
      event.preventDefault();
      event.stopPropagation();
      goBack();
    }
  };
  if (!isOpen) {
    return null;
  }
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
    import_components.Modal,
    {
      className: "workflows-workflow-menu",
      overlayClassName: "workflows-workflow-menu__overlay",
      onRequestClose: abilityOutput ? goBack : closeAndReset,
      __experimentalHideHeader: true,
      contentLabel: (0, import_i18n.__)("Workflow palette"),
      children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
        "div",
        {
          className: "workflows-workflow-menu__container",
          onKeyDown: withIgnoreIMEEvents(onContainerKeyDown),
          ref: containerRef,
          tabIndex: -1,
          role: "presentation",
          children: abilityOutput ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "workflows-workflow-menu__output", children: [
            /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "workflows-workflow-menu__output-header", children: [
              /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h3", { children: abilityOutput.label }),
              abilityOutput.description && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "workflows-workflow-menu__output-hint", children: abilityOutput.description })
            ] }),
            /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "workflows-workflow-menu__output-content", children: abilityOutput.success ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("pre", { children: JSON.stringify(
              abilityOutput.data,
              null,
              2
            ) }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "workflows-workflow-menu__output-error", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: abilityOutput.error }) }) })
          ] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(_e, { label: inputLabel, shouldFilter: false, children: [
            /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_components.__experimentalHStack, { className: "workflows-workflow-menu__header", children: [
              /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
                icon_default,
                {
                  className: "workflows-workflow-menu__header-search-icon",
                  icon: search_default
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
                WorkflowInput,
                {
                  search,
                  setSearch,
                  isOpen,
                  abilities
                }
              )
            ] }),
            /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(_e.List, { label: (0, import_i18n.__)("Workflow suggestions"), children: [
              isExecuting && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
                import_components.__experimentalHStack,
                {
                  className: "workflows-workflow-menu__executing",
                  align: "center",
                  children: (0, import_i18n.__)("Executing ability\u2026")
                }
              ),
              !isExecuting && search && filteredAbilities.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(_e.Empty, { children: (0, import_i18n.__)("No results found.") }),
              !isExecuting && filteredAbilities.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(_e.Group, { children: filteredAbilities.map((ability) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
                _e.Item,
                {
                  value: ability.label,
                  className: "workflows-workflow-menu__item",
                  onSelect: () => handleExecuteAbility(ability),
                  id: ability.name,
                  children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_components.__experimentalHStack, { alignment: "left", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
                    import_components.TextHighlight,
                    {
                      text: ability.label,
                      highlight: search
                    }
                  ) }) })
                },
                ability.name
              )) })
            ] })
          ] })
        }
      )
    }
  );
}

// packages/workflow/build-module/index.mjs
var root = document.createElement("div");
document.body.appendChild(root);
(0, import_element3.createRoot)(root).render((0, import_element3.createElement)(WorkflowMenu));
                                                                                                                                                                                                                                                                                                                    dist/script-modules/workflow/index.min.asset.php                                                    0000644                 00000000513 15212564032 0016052 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-primitives', 'wp-private-apis'), 'module_dependencies' => array(array('id' => '@wordpress/abilities', 'import' => 'static')), 'version' => '13556bc597bbf2a8d620');                                                                                                                                                                                     dist/script-modules/registry.php                                                                    0000644                 00000010010 15212564032 0013032 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php
/**
 * Script module registry - Auto-generated by build process.
 * Do not edit this file manually.
 *
 * @package wp
 */

return array(
	array(
		'id' => '@wordpress/a11y',
		'path' => 'a11y/index',
		'asset' => 'a11y/index.min.asset.php',
	),
	array(
		'id' => '@wordpress/abilities',
		'path' => 'abilities/index',
		'asset' => 'abilities/index.min.asset.php',
	),
	array(
		'id' => '@wordpress/block-editor/utils/fit-text-frontend',
		'path' => 'block-editor/utils/fit-text-frontend',
		'asset' => 'block-editor/utils/fit-text-frontend.min.asset.php',
	),
	array(
		'id' => '@wordpress/block-library/accordion/view',
		'path' => 'block-library/accordion/view',
		'asset' => 'block-library/accordion/view.min.asset.php',
	),
	array(
		'id' => '@wordpress/block-library/file/view',
		'path' => 'block-library/file/view',
		'asset' => 'block-library/file/view.min.asset.php',
	),
	array(
		'id' => '@wordpress/block-library/form/view',
		'path' => 'block-library/form/view',
		'asset' => 'block-library/form/view.min.asset.php',
	),
	array(
		'id' => '@wordpress/block-library/image/view',
		'path' => 'block-library/image/view',
		'asset' => 'block-library/image/view.min.asset.php',
	),
	array(
		'id' => '@wordpress/block-library/navigation/view',
		'path' => 'block-library/navigation/view',
		'asset' => 'block-library/navigation/view.min.asset.php',
	),
	array(
		'id' => '@wordpress/block-library/playlist/view',
		'path' => 'block-library/playlist/view',
		'asset' => 'block-library/playlist/view.min.asset.php',
	),
	array(
		'id' => '@wordpress/block-library/query/view',
		'path' => 'block-library/query/view',
		'asset' => 'block-library/query/view.min.asset.php',
	),
	array(
		'id' => '@wordpress/block-library/search/view',
		'path' => 'block-library/search/view',
		'asset' => 'block-library/search/view.min.asset.php',
	),
	array(
		'id' => '@wordpress/block-library/tabs/view',
		'path' => 'block-library/tabs/view',
		'asset' => 'block-library/tabs/view.min.asset.php',
	),
	array(
		'id' => '@wordpress/boot',
		'path' => 'boot/index',
		'asset' => 'boot/index.min.asset.php',
	),
	array(
		'id' => '@wordpress/boot',
		'path' => 'boot/index',
		'asset' => 'boot/index.min.asset.php',
	),
	array(
		'id' => '@wordpress/connectors',
		'path' => 'connectors/index',
		'asset' => 'connectors/index.min.asset.php',
	),
	array(
		'id' => '@wordpress/core-abilities',
		'path' => 'core-abilities/index',
		'asset' => 'core-abilities/index.min.asset.php',
	),
	array(
		'id' => '@wordpress/edit-site-init',
		'path' => 'edit-site-init/index',
		'asset' => 'edit-site-init/index.min.asset.php',
	),
	array(
		'id' => '@wordpress/interactivity',
		'path' => 'interactivity/index',
		'asset' => 'interactivity/index.min.asset.php',
	),
	array(
		'id' => '@wordpress/interactivity-router',
		'path' => 'interactivity-router/index',
		'asset' => 'interactivity-router/index.min.asset.php',
	),
	array(
		'id' => '@wordpress/interactivity-router/full-page',
		'path' => 'interactivity-router/full-page',
		'asset' => 'interactivity-router/full-page.min.asset.php',
	),
	array(
		'id' => '@wordpress/latex-to-mathml',
		'path' => 'latex-to-mathml/index',
		'asset' => 'latex-to-mathml/index.min.asset.php',
	),
	array(
		'id' => '@wordpress/latex-to-mathml/loader',
		'path' => 'latex-to-mathml/loader',
		'asset' => 'latex-to-mathml/loader.min.asset.php',
	),
	array(
		'id' => '@wordpress/lazy-editor',
		'path' => 'lazy-editor/index',
		'asset' => 'lazy-editor/index.min.asset.php',
	),
	array(
		'id' => '@wordpress/route',
		'path' => 'route/index',
		'asset' => 'route/index.min.asset.php',
	),
	array(
		'id' => '@wordpress/route',
		'path' => 'route/index',
		'asset' => 'route/index.min.asset.php',
	),
	array(
		'id' => '@wordpress/vips/loader',
		'path' => 'vips/loader',
		'asset' => 'vips/loader.min.asset.php',
	),
	array(
		'id' => '@wordpress/vips/worker',
		'path' => 'vips/worker',
		'asset' => 'vips/worker.min.asset.php',
		'min_only' => true,
	),
	array(
		'id' => '@wordpress/workflow',
		'path' => 'workflow/index',
		'asset' => 'workflow/index.min.asset.php',
	),
);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        dist/server-side-render.js                                                                          0000644                 00000025737 15212564032 0011570 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;
(wp ||= {}).serverSideRender = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // package-external:@wordpress/components
  var require_components = __commonJS({
    "package-external:@wordpress/components"(exports, module) {
      module.exports = window.wp.components;
    }
  });

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // package-external:@wordpress/api-fetch
  var require_api_fetch = __commonJS({
    "package-external:@wordpress/api-fetch"(exports, module) {
      module.exports = window.wp.apiFetch;
    }
  });

  // package-external:@wordpress/url
  var require_url = __commonJS({
    "package-external:@wordpress/url"(exports, module) {
      module.exports = window.wp.url;
    }
  });

  // package-external:@wordpress/blocks
  var require_blocks = __commonJS({
    "package-external:@wordpress/blocks"(exports, module) {
      module.exports = window.wp.blocks;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // packages/server-side-render/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    ServerSideRender: () => ServerSideRenderWithPostId,
    default: () => index_default,
    useServerSideRender: () => useServerSideRender
  });

  // packages/server-side-render/build-module/server-side-render.mjs
  var import_element2 = __toESM(require_element(), 1);
  var import_i18n = __toESM(require_i18n(), 1);
  var import_components = __toESM(require_components(), 1);
  var import_data = __toESM(require_data(), 1);

  // packages/server-side-render/build-module/hook.mjs
  var import_compose = __toESM(require_compose(), 1);
  var import_element = __toESM(require_element(), 1);
  var import_api_fetch = __toESM(require_api_fetch(), 1);
  var import_url = __toESM(require_url(), 1);
  var import_blocks = __toESM(require_blocks(), 1);
  function rendererPath(block, attributes = null, urlQueryArgs = {}) {
    return (0, import_url.addQueryArgs)(`/wp/v2/block-renderer/${block}`, {
      context: "edit",
      ...null !== attributes ? { attributes } : {},
      ...urlQueryArgs
    });
  }
  function removeBlockSupportAttributes(attributes) {
    const {
      backgroundColor,
      borderColor,
      fontFamily,
      fontSize,
      gradient,
      textColor,
      className,
      ...restAttributes
    } = attributes;
    const {
      border,
      color,
      elements,
      shadow,
      spacing,
      typography,
      ...restStyles
    } = attributes?.style || {};
    return {
      ...restAttributes,
      style: restStyles
    };
  }
  function useServerSideRender(args) {
    const [response, setResponse] = (0, import_element.useState)({ status: "idle" });
    const shouldDebounceRef = (0, import_element.useRef)(false);
    const {
      attributes,
      block,
      skipBlockSupportAttributes = false,
      httpMethod = "GET",
      urlQueryArgs
    } = args;
    let sanitizedAttributes = attributes && (0, import_blocks.__experimentalSanitizeBlockAttributes)(block, attributes);
    if (skipBlockSupportAttributes) {
      sanitizedAttributes = removeBlockSupportAttributes(sanitizedAttributes);
    }
    const isPostRequest = "POST" === httpMethod;
    const urlAttributes = isPostRequest ? null : sanitizedAttributes;
    const path = rendererPath(block, urlAttributes, urlQueryArgs);
    const body = isPostRequest ? JSON.stringify({ attributes: sanitizedAttributes ?? null }) : void 0;
    (0, import_element.useEffect)(() => {
      const controller = new AbortController();
      const debouncedFetch = (0, import_compose.debounce)(
        function() {
          {
            setResponse({ status: "loading" });
            (0, import_api_fetch.default)({
              path,
              method: isPostRequest ? "POST" : "GET",
              body,
              headers: isPostRequest ? {
                "Content-Type": "application/json"
              } : {},
              signal: controller.signal
            }).then((res) => {
              setResponse({
                status: "success",
                content: res ? res.rendered : ""
              });
            }).catch((error) => {
              if (error.name === "AbortError") {
                return;
              }
              setResponse({
                status: "error",
                error: error.message
              });
            }).finally(() => {
              shouldDebounceRef.current = true;
            });
          }
        },
        shouldDebounceRef.current ? 500 : 0
      );
      debouncedFetch();
      return () => {
        controller.abort();
        debouncedFetch.cancel();
      };
    }, [path, isPostRequest, body]);
    return response;
  }

  // packages/server-side-render/build-module/server-side-render.mjs
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  var EMPTY_OBJECT = {};
  function DefaultEmptyResponsePlaceholder({ className }) {
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.Placeholder, { className, children: (0, import_i18n.__)("Block rendered as empty.") });
  }
  function DefaultErrorResponsePlaceholder({ message, className }) {
    const errorMessage = (0, import_i18n.sprintf)(
      // translators: %s: error message describing the problem
      (0, import_i18n.__)("Error loading block: %s"),
      message
    );
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.Placeholder, { className, children: errorMessage });
  }
  function DefaultLoadingResponsePlaceholder({ children }) {
    const [showLoader, setShowLoader] = (0, import_element2.useState)(false);
    (0, import_element2.useEffect)(() => {
      const timeout = setTimeout(() => {
        setShowLoader(true);
      }, 1e3);
      return () => clearTimeout(timeout);
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { position: "relative" }, children: [
      showLoader && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
        "div",
        {
          style: {
            position: "absolute",
            top: "50%",
            left: "50%",
            marginTop: "-9px",
            marginLeft: "-9px"
          },
          children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.Spinner, {})
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { opacity: showLoader ? "0.3" : 1 }, children })
    ] });
  }
  function ServerSideRender(props) {
    const prevContentRef = (0, import_element2.useRef)("");
    const {
      className,
      EmptyResponsePlaceholder = DefaultEmptyResponsePlaceholder,
      ErrorResponsePlaceholder = DefaultErrorResponsePlaceholder,
      LoadingResponsePlaceholder = DefaultLoadingResponsePlaceholder,
      ...restProps
    } = props;
    const { content, status, error } = useServerSideRender(restProps);
    (0, import_element2.useEffect)(() => {
      if (content) {
        prevContentRef.current = content;
      }
    }, [content]);
    if (status === "loading") {
      return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoadingResponsePlaceholder, { ...props, children: !!prevContentRef.current && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_element2.RawHTML, { className, children: prevContentRef.current }) });
    }
    if (status === "success" && !content) {
      return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyResponsePlaceholder, { ...props });
    }
    if (status === "error") {
      return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorResponsePlaceholder, { message: error, ...props });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_element2.RawHTML, { className, children: content });
  }
  function ServerSideRenderWithPostId({
    urlQueryArgs = EMPTY_OBJECT,
    ...props
  }) {
    const currentPostId = (0, import_data.useSelect)((select) => {
      const postId = select("core/editor")?.getCurrentPostId();
      return postId && typeof postId === "number" ? postId : null;
    }, []);
    const newUrlQueryArgs = (0, import_element2.useMemo)(() => {
      if (!currentPostId) {
        return urlQueryArgs;
      }
      return {
        post_id: currentPostId,
        ...urlQueryArgs
      };
    }, [currentPostId, urlQueryArgs]);
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ServerSideRender, { urlQueryArgs: newUrlQueryArgs, ...props });
  }

  // packages/server-side-render/build-module/index.mjs
  var ServerSideRenderCompat = ServerSideRenderWithPostId;
  ServerSideRenderCompat.ServerSideRender = ServerSideRenderWithPostId;
  ServerSideRenderCompat.useServerSideRender = useServerSideRender;
  var index_default = ServerSideRenderCompat;
  return __toCommonJS(index_exports);
})();
if (typeof wp.serverSideRender === 'object' && wp.serverSideRender.default) { wp.serverSideRender = wp.serverSideRender.default; }
                                 dist/server-side-render.min.js                                                                      0000644                 00000007640 15212564032 0012343 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;(wp||={}).serverSideRender=(()=>{var V=Object.create;var g=Object.defineProperty;var Z=Object.getOwnPropertyDescriptor;var ee=Object.getOwnPropertyNames;var re=Object.getPrototypeOf,te=Object.prototype.hasOwnProperty;var d=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),oe=(e,r)=>{for(var t in r)g(e,t,{get:r[t],enumerable:!0})},k=(e,r,t,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of ee(r))!te.call(e,n)&&n!==t&&g(e,n,{get:()=>r[n],enumerable:!(s=Z(r,n))||s.enumerable});return e};var c=(e,r,t)=>(t=e!=null?V(re(e)):{},k(r||!e||!e.__esModule?g(t,"default",{value:e,enumerable:!0}):t,e)),ne=e=>k(g({},"__esModule",{value:!0}),e);var A=d((Se,C)=>{C.exports=window.wp.element});var L=d((we,_)=>{_.exports=window.wp.i18n});var I=d((he,B)=>{B.exports=window.wp.components});var D=d((Re,M)=>{M.exports=window.wp.data});var O=d((be,F)=>{F.exports=window.wp.compose});var z=d((ve,j)=>{j.exports=window.wp.apiFetch});var N=d((ge,J)=>{J.exports=window.wp.url});var Q=d((xe,G)=>{G.exports=window.wp.blocks});var Y=d((Pe,X)=>{X.exports=window.ReactJSXRuntime});var fe={};oe(fe,{ServerSideRender:()=>x,default:()=>pe,useServerSideRender:()=>w});var i=c(A(),1),h=c(L(),1),R=c(I(),1),$=c(D(),1);var W=c(O(),1),m=c(A(),1),q=c(z(),1),H=c(N(),1),U=c(Q(),1);function se(e,r=null,t={}){return(0,H.addQueryArgs)(`/wp/v2/block-renderer/${e}`,{context:"edit",...r!==null?{attributes:r}:{},...t})}function ie(e){let{backgroundColor:r,borderColor:t,fontFamily:s,fontSize:n,gradient:u,textColor:b,className:l,...a}=e,{border:p,color:f,elements:K,shadow:y,spacing:P,typography:E,...v}=e?.style||{};return{...a,style:v}}function w(e){let[r,t]=(0,m.useState)({status:"idle"}),s=(0,m.useRef)(!1),{attributes:n,block:u,skipBlockSupportAttributes:b=!1,httpMethod:l="GET",urlQueryArgs:a}=e,p=n&&(0,U.__experimentalSanitizeBlockAttributes)(u,n);b&&(p=ie(p));let f=l==="POST",y=se(u,f?null:p,a),P=f?JSON.stringify({attributes:p??null}):void 0;return(0,m.useEffect)(()=>{let E=new AbortController,v=(0,W.debounce)(function(){t({status:"loading"}),(0,q.default)({path:y,method:f?"POST":"GET",body:P,headers:f?{"Content-Type":"application/json"}:{},signal:E.signal}).then(S=>{t({status:"success",content:S?S.rendered:""})}).catch(S=>{S.name!=="AbortError"&&t({status:"error",error:S.message})}).finally(()=>{s.current=!0})},s.current?500:0);return v(),()=>{E.abort(),v.cancel()}},[y,f,P]),r}var o=c(Y(),1),ce={};function ue({className:e}){return(0,o.jsx)(R.Placeholder,{className:e,children:(0,h.__)("Block rendered as empty.")})}function de({message:e,className:r}){let t=(0,h.sprintf)((0,h.__)("Error loading block: %s"),e);return(0,o.jsx)(R.Placeholder,{className:r,children:t})}function le({children:e}){let[r,t]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{let s=setTimeout(()=>{t(!0)},1e3);return()=>clearTimeout(s)},[]),(0,o.jsxs)("div",{style:{position:"relative"},children:[r&&(0,o.jsx)("div",{style:{position:"absolute",top:"50%",left:"50%",marginTop:"-9px",marginLeft:"-9px"},children:(0,o.jsx)(R.Spinner,{})}),(0,o.jsx)("div",{style:{opacity:r?"0.3":1},children:e})]})}function ae(e){let r=(0,i.useRef)(""),{className:t,EmptyResponsePlaceholder:s=ue,ErrorResponsePlaceholder:n=de,LoadingResponsePlaceholder:u=le,...b}=e,{content:l,status:a,error:p}=w(b);return(0,i.useEffect)(()=>{l&&(r.current=l)},[l]),a==="loading"?(0,o.jsx)(u,{...e,children:!!r.current&&(0,o.jsx)(i.RawHTML,{className:t,children:r.current})}):a==="success"&&!l?(0,o.jsx)(s,{...e}):a==="error"?(0,o.jsx)(n,{message:p,...e}):(0,o.jsx)(i.RawHTML,{className:t,children:l})}function x({urlQueryArgs:e=ce,...r}){let t=(0,$.useSelect)(n=>{let u=n("core/editor")?.getCurrentPostId();return u&&typeof u=="number"?u:null},[]),s=(0,i.useMemo)(()=>t?{post_id:t,...e}:e,[t,e]);return(0,o.jsx)(ae,{urlQueryArgs:s,...r})}var T=x;T.ServerSideRender=x;T.useServerSideRender=w;var pe=T;return ne(fe);})();
if (typeof wp.serverSideRender === 'object' && wp.serverSideRender.default) { wp.serverSideRender = wp.serverSideRender.default; }
                                                                                                dist/shortcode.js                                                                                   0000644                 00000017726 15212564032 0010054 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).shortcode = (() => {
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // packages/shortcode/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    attrs: () => attrs,
    default: () => index_default,
    fromMatch: () => fromMatch,
    next: () => next,
    regexp: () => regexp,
    replace: () => replace,
    string: () => string
  });

  // node_modules/memize/dist/index.js
  function memize(fn, options) {
    var size = 0;
    var head;
    var tail;
    options = options || {};
    function memoized() {
      var node = head, len = arguments.length, args, i;
      searchCache: while (node) {
        if (node.args.length !== arguments.length) {
          node = node.next;
          continue;
        }
        for (i = 0; i < len; i++) {
          if (node.args[i] !== arguments[i]) {
            node = node.next;
            continue searchCache;
          }
        }
        if (node !== head) {
          if (node === tail) {
            tail = node.prev;
          }
          node.prev.next = node.next;
          if (node.next) {
            node.next.prev = node.prev;
          }
          node.next = head;
          node.prev = null;
          head.prev = node;
          head = node;
        }
        return node.val;
      }
      args = new Array(len);
      for (i = 0; i < len; i++) {
        args[i] = arguments[i];
      }
      node = {
        args,
        // Generate the result from original function
        val: fn.apply(null, args)
      };
      if (head) {
        head.prev = node;
        node.next = head;
      } else {
        tail = node;
      }
      if (size === /** @type {MemizeOptions} */
      options.maxSize) {
        tail = /** @type {MemizeCacheNode} */
        tail.prev;
        tail.next = null;
      } else {
        size++;
      }
      head = node;
      return node.val;
    }
    memoized.clear = function() {
      head = null;
      tail = null;
      size = 0;
    };
    return memoized;
  }

  // packages/shortcode/build-module/index.mjs
  function next(tag, text, index = 0) {
    const re = regexp(tag);
    re.lastIndex = index;
    const match = re.exec(text);
    if (!match) {
      return;
    }
    if ("[" === match[1] && "]" === match[7]) {
      return next(tag, text, re.lastIndex);
    }
    const result = {
      index: match.index,
      content: match[0],
      shortcode: fromMatch(match)
    };
    if (match[1]) {
      result.content = result.content.slice(1);
      result.index++;
    }
    if (match[7]) {
      result.content = result.content.slice(0, -1);
    }
    return result;
  }
  function replace(tag, text, callback) {
    return text.replace(
      regexp(tag),
      // Let us use spread syntax to capture the arguments object.
      (...args) => {
        const match = args[0];
        const left = args[1];
        const right = args[7];
        if (left === "[" && right === "]") {
          return match;
        }
        const result = callback(fromMatch(args));
        return result || result === "" ? left + result + right : match;
      }
    );
  }
  function string(options) {
    return new Shortcode(options).string();
  }
  function regexp(tag) {
    return new RegExp(
      "\\[(\\[?)(" + tag + ")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)",
      "g"
    );
  }
  var attrs = memize((text) => {
    const named = {};
    const numeric = [];
    const pattern = /([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|'([^']*)'(?:\s|$)|(\S+)(?:\s|$)/g;
    text = text.replace(/[\u00a0\u200b]/g, " ");
    let match;
    while (match = pattern.exec(text)) {
      if (match[1]) {
        named[match[1].toLowerCase()] = match[2];
      } else if (match[3]) {
        named[match[3].toLowerCase()] = match[4];
      } else if (match[5]) {
        named[match[5].toLowerCase()] = match[6];
      } else if (match[7]) {
        numeric.push(match[7]);
      } else if (match[8]) {
        numeric.push(match[8]);
      } else if (match[9]) {
        numeric.push(match[9]);
      }
    }
    return { named, numeric };
  });
  function fromMatch(match) {
    let type;
    if (match[4]) {
      type = "self-closing";
    } else if (match[6]) {
      type = "closed";
    } else {
      type = "single";
    }
    return new Shortcode({
      tag: match[2],
      attrs: match[3],
      type,
      content: match[5]
    });
  }
  var Shortcode = class {
    // Instance properties
    tag;
    type;
    content;
    attrs;
    // Static methods
    static next = next;
    static replace = replace;
    static string = string;
    static regexp = regexp;
    static attrs = attrs;
    static fromMatch = fromMatch;
    constructor(options) {
      const { tag, attrs: attributes, type, content } = options;
      this.tag = tag;
      this.type = type;
      this.content = content;
      this.attrs = {
        named: {},
        numeric: []
      };
      if (!attributes) {
        return;
      }
      if (typeof attributes === "string") {
        this.attrs = attrs(attributes);
      } else if ("named" in attributes && "numeric" in attributes && attributes.named !== void 0 && attributes.numeric !== void 0) {
        this.attrs = attributes;
      } else {
        Object.entries(attributes).forEach(([key, value]) => {
          if (value !== void 0) {
            this.set(key, String(value));
          }
        });
      }
    }
    /**
     * Get a shortcode attribute.
     *
     * Automatically detects whether `attr` is named or numeric and routes it
     * accordingly.
     *
     * @param attr Attribute key.
     *
     * @return Attribute value.
     */
    get(attr) {
      if (typeof attr === "number") {
        return this.attrs.numeric[attr];
      }
      return this.attrs.named[attr];
    }
    /**
     * Set a shortcode attribute.
     *
     * Automatically detects whether `attr` is named or numeric and routes it
     * accordingly.
     *
     * @param attr  Attribute key.
     * @param value Attribute value.
     *
     * @return Shortcode instance.
     */
    set(attr, value) {
      if (typeof attr === "number") {
        this.attrs.numeric[attr] = value;
      } else {
        this.attrs.named[attr] = value;
      }
      return this;
    }
    /**
     * Transform the shortcode into a string.
     *
     * @return String representation of the shortcode.
     */
    string() {
      let text = "[" + this.tag;
      this.attrs.numeric.forEach((value) => {
        if (/\s/.test(value)) {
          text += ' "' + value + '"';
        } else {
          text += " " + value;
        }
      });
      Object.entries(this.attrs.named).forEach(([name, value]) => {
        text += " " + name + '="' + value + '"';
      });
      if ("single" === this.type) {
        return text + "]";
      } else if ("self-closing" === this.type) {
        return text + " /]";
      }
      text += "]";
      if (this.content) {
        text += this.content;
      }
      return text + "[/" + this.tag + "]";
    }
  };
  var index_default = Shortcode;
  return __toCommonJS(index_exports);
})();
if (typeof wp.shortcode === 'object' && wp.shortcode.default) { wp.shortcode = wp.shortcode.default; }
                                          dist/shortcode.min.js                                                                               0000644                 00000006376 15212564032 0010635 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).shortcode=(()=>{var h=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var $=(e,n)=>{for(var s in n)h(e,s,{get:n[s],enumerable:!0})},z=(e,n,s,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of y(n))!b.call(e,t)&&t!==s&&h(e,t,{get:()=>n[t],enumerable:!(i=w(n,t))||i.enumerable});return e};var E=e=>z(h({},"__esModule",{value:!0}),e);var C={};$(C,{attrs:()=>p,default:()=>S,fromMatch:()=>u,next:()=>g,regexp:()=>f,replace:()=>x,string:()=>v});function d(e,n){var s=0,i,t;n=n||{};function c(){var r=i,o=arguments.length,l,a;e:for(;r;){if(r.args.length!==arguments.length){r=r.next;continue}for(a=0;a<o;a++)if(r.args[a]!==arguments[a]){r=r.next;continue e}return r!==i&&(r===t&&(t=r.prev),r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=i,r.prev=null,i.prev=r,i=r),r.val}for(l=new Array(o),a=0;a<o;a++)l[a]=arguments[a];return r={args:l,val:e.apply(null,l)},i?(i.prev=r,r.next=i):t=r,s===n.maxSize?(t=t.prev,t.next=null):s++,i=r,r.val}return c.clear=function(){i=null,t=null,s=0},c}function g(e,n,s=0){let i=f(e);i.lastIndex=s;let t=i.exec(n);if(!t)return;if(t[1]==="["&&t[7]==="]")return g(e,n,i.lastIndex);let c={index:t.index,content:t[0],shortcode:u(t)};return t[1]&&(c.content=c.content.slice(1),c.index++),t[7]&&(c.content=c.content.slice(0,-1)),c}function x(e,n,s){return n.replace(f(e),(...i)=>{let t=i[0],c=i[1],r=i[7];if(c==="["&&r==="]")return t;let o=s(u(i));return o||o===""?c+o+r:t})}function v(e){return new m(e).string()}function f(e){return new RegExp("\\[(\\[?)("+e+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}var p=d(e=>{let n={},s=[],i=/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|'([^']*)'(?:\s|$)|(\S+)(?:\s|$)/g;e=e.replace(/[\u00a0\u200b]/g," ");let t;for(;t=i.exec(e);)t[1]?n[t[1].toLowerCase()]=t[2]:t[3]?n[t[3].toLowerCase()]=t[4]:t[5]?n[t[5].toLowerCase()]=t[6]:t[7]?s.push(t[7]):t[8]?s.push(t[8]):t[9]&&s.push(t[9]);return{named:n,numeric:s}});function u(e){let n;return e[4]?n="self-closing":e[6]?n="closed":n="single",new m({tag:e[2],attrs:e[3],type:n,content:e[5]})}var m=class{tag;type;content;attrs;static next=g;static replace=x;static string=v;static regexp=f;static attrs=p;static fromMatch=u;constructor(e){let{tag:n,attrs:s,type:i,content:t}=e;this.tag=n,this.type=i,this.content=t,this.attrs={named:{},numeric:[]},s&&(typeof s=="string"?this.attrs=p(s):"named"in s&&"numeric"in s&&s.named!==void 0&&s.numeric!==void 0?this.attrs=s:Object.entries(s).forEach(([c,r])=>{r!==void 0&&this.set(c,String(r))}))}get(e){return typeof e=="number"?this.attrs.numeric[e]:this.attrs.named[e]}set(e,n){return typeof e=="number"?this.attrs.numeric[e]=n:this.attrs.named[e]=n,this}string(){let e="["+this.tag;return this.attrs.numeric.forEach(n=>{/\s/.test(n)?e+=' "'+n+'"':e+=" "+n}),Object.entries(this.attrs.named).forEach(([n,s])=>{e+=" "+n+'="'+s+'"'}),this.type==="single"?e+"]":this.type==="self-closing"?e+" /]":(e+="]",this.content&&(e+=this.content),e+"[/"+this.tag+"]")}},S=m;return E(C);})();
if (typeof wp.shortcode === 'object' && wp.shortcode.default) { wp.shortcode = wp.shortcode.default; }
                                                                                                                                                                                                                                                                  dist/style-engine.js                                                                                0000644                 00000043170 15212564032 0010455 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).styleEngine = (() => {
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // packages/style-engine/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    compileCSS: () => compileCSS,
    getCSSRules: () => getCSSRules,
    getCSSValueFromRawStyle: () => getCSSValueFromRawStyle
  });

  // node_modules/tslib/tslib.es6.mjs
  var __assign = function() {
    __assign = Object.assign || function __assign2(t) {
      for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
      }
      return t;
    };
    return __assign.apply(this, arguments);
  };

  // node_modules/lower-case/dist.es2015/index.js
  function lowerCase(str) {
    return str.toLowerCase();
  }

  // node_modules/no-case/dist.es2015/index.js
  var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
  var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
  function noCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    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;
    var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
    var start = 0;
    var end = result.length;
    while (result.charAt(start) === "\0")
      start++;
    while (result.charAt(end - 1) === "\0")
      end--;
    return result.slice(start, end).split("\0").map(transform).join(delimiter);
  }
  function replace(input, re, value) {
    if (re instanceof RegExp)
      return input.replace(re, value);
    return re.reduce(function(input2, re2) {
      return input2.replace(re2, value);
    }, input);
  }

  // node_modules/dot-case/dist.es2015/index.js
  function dotCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    return noCase(input, __assign({ delimiter: "." }, options));
  }

  // node_modules/param-case/dist.es2015/index.js
  function paramCase(input, options) {
    if (options === void 0) {
      options = {};
    }
    return dotCase(input, __assign({ delimiter: "-" }, options));
  }

  // packages/style-engine/build-module/styles/constants.mjs
  var VARIABLE_REFERENCE_PREFIX = "var:";
  var VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE = "|";
  var VARIABLE_PATH_SEPARATOR_TOKEN_STYLE = "--";

  // packages/style-engine/build-module/styles/utils.mjs
  var getStyleValueByPath = (object, path) => {
    let value = object;
    path.forEach((fieldName) => {
      value = value?.[fieldName];
    });
    return value;
  };
  function generateRule(style, options, path, ruleKey) {
    const styleValue = getStyleValueByPath(style, path);
    return styleValue ? [
      {
        selector: options?.selector,
        key: ruleKey,
        value: getCSSValueFromRawStyle(styleValue)
      }
    ] : [];
  }
  function generateBoxRules(style, options, path, ruleKeys, individualProperties = ["top", "right", "bottom", "left"]) {
    const boxStyle = getStyleValueByPath(
      style,
      path
    );
    if (!boxStyle) {
      return [];
    }
    const rules = [];
    if (typeof boxStyle === "string") {
      rules.push({
        selector: options?.selector,
        key: ruleKeys.default,
        value: getCSSValueFromRawStyle(boxStyle)
      });
    } else {
      const sideRules = individualProperties.reduce(
        (acc, side) => {
          const value = getCSSValueFromRawStyle(
            getStyleValueByPath(boxStyle, [side])
          );
          if (value) {
            acc.push({
              selector: options?.selector,
              key: ruleKeys?.individual.replace(
                "%s",
                upperFirst(side)
              ),
              value
            });
          }
          return acc;
        },
        []
      );
      rules.push(...sideRules);
    }
    return rules;
  }
  function getCSSValueFromRawStyle(styleValue) {
    if (typeof styleValue === "string" && styleValue.startsWith(VARIABLE_REFERENCE_PREFIX)) {
      const variable = styleValue.slice(VARIABLE_REFERENCE_PREFIX.length).split(VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE).map(
        (presetVariable) => paramCase(presetVariable, {
          splitRegexp: [
            /([a-z0-9])([A-Z])/g,
            // fooBar => foo-bar, 3Bar => 3-bar
            /([0-9])([a-z])/g,
            // 3bar => 3-bar
            /([A-Za-z])([0-9])/g,
            // Foo3 => foo-3, foo3 => foo-3
            /([A-Z])([A-Z][a-z])/g
            // FOOBar => foo-bar
          ]
        })
      ).join(VARIABLE_PATH_SEPARATOR_TOKEN_STYLE);
      return `var(--wp--${variable})`;
    }
    return styleValue;
  }
  function upperFirst(string) {
    const [firstLetter, ...rest] = string;
    return firstLetter.toUpperCase() + rest.join("");
  }
  function camelCaseJoin(strings) {
    const [firstItem, ...rest] = strings;
    return firstItem.toLowerCase() + rest.map(upperFirst).join("");
  }
  function safeDecodeURI(uri) {
    try {
      return decodeURI(uri);
    } catch (uriError) {
      return uri;
    }
  }

  // packages/style-engine/build-module/styles/border/index.mjs
  function createBorderGenerateFunction(path) {
    return (style, options) => generateRule(style, options, path, camelCaseJoin(path));
  }
  function createBorderEdgeGenerateFunction(edge) {
    return (style, options) => {
      return ["color", "style", "width"].flatMap((key) => {
        const path = ["border", edge, key];
        return createBorderGenerateFunction(path)(style, options);
      });
    };
  }
  var color = {
    name: "color",
    generate: createBorderGenerateFunction(["border", "color"])
  };
  var radius = {
    name: "radius",
    generate: (style, options) => {
      return generateBoxRules(
        style,
        options,
        ["border", "radius"],
        {
          default: "borderRadius",
          individual: "border%sRadius"
        },
        ["topLeft", "topRight", "bottomLeft", "bottomRight"]
      );
    }
  };
  var borderStyle = {
    name: "style",
    generate: createBorderGenerateFunction(["border", "style"])
  };
  var width = {
    name: "width",
    generate: createBorderGenerateFunction(["border", "width"])
  };
  var borderTop = {
    name: "borderTop",
    generate: createBorderEdgeGenerateFunction("top")
  };
  var borderRight = {
    name: "borderRight",
    generate: createBorderEdgeGenerateFunction("right")
  };
  var borderBottom = {
    name: "borderBottom",
    generate: createBorderEdgeGenerateFunction("bottom")
  };
  var borderLeft = {
    name: "borderLeft",
    generate: createBorderEdgeGenerateFunction("left")
  };
  var border_default = [
    color,
    borderStyle,
    width,
    radius,
    borderTop,
    borderRight,
    borderBottom,
    borderLeft
  ];

  // packages/style-engine/build-module/styles/color/background.mjs
  var background = {
    name: "background",
    generate: (style, options) => {
      return generateRule(
        style,
        options,
        ["color", "background"],
        "backgroundColor"
      );
    }
  };
  var background_default = background;

  // packages/style-engine/build-module/styles/color/gradient.mjs
  var gradient = {
    name: "gradient",
    generate: (style, options) => {
      return generateRule(
        style,
        options,
        ["color", "gradient"],
        "background"
      );
    }
  };
  var gradient_default = gradient;

  // packages/style-engine/build-module/styles/color/text.mjs
  var text = {
    name: "text",
    generate: (style, options) => {
      return generateRule(style, options, ["color", "text"], "color");
    }
  };
  var text_default = text;

  // packages/style-engine/build-module/styles/color/index.mjs
  var color_default = [text_default, gradient_default, background_default];

  // packages/style-engine/build-module/styles/dimensions/index.mjs
  var height = {
    name: "height",
    generate: (style, options) => {
      return generateRule(
        style,
        options,
        ["dimensions", "height"],
        "height"
      );
    }
  };
  var minHeight = {
    name: "minHeight",
    generate: (style, options) => {
      return generateRule(
        style,
        options,
        ["dimensions", "minHeight"],
        "minHeight"
      );
    }
  };
  var aspectRatio = {
    name: "aspectRatio",
    generate: (style, options) => {
      return generateRule(
        style,
        options,
        ["dimensions", "aspectRatio"],
        "aspectRatio"
      );
    }
  };
  var width2 = {
    name: "width",
    generate: (style, options) => {
      return generateRule(
        style,
        options,
        ["dimensions", "width"],
        "width"
      );
    }
  };
  var dimensions_default = [height, minHeight, aspectRatio, width2];

  // packages/style-engine/build-module/styles/background/index.mjs
  var backgroundImage = {
    name: "backgroundImage",
    generate: (style, options) => {
      const _backgroundImage = style?.background?.backgroundImage;
      if (typeof _backgroundImage === "object" && _backgroundImage?.url) {
        return [
          {
            selector: options.selector,
            key: "backgroundImage",
            // Passed `url` may already be encoded. To prevent double encoding, decodeURI is executed to revert to the original string.
            value: `url( '${encodeURI(
              safeDecodeURI(_backgroundImage.url)
            )}' )`
          }
        ];
      }
      return generateRule(
        style,
        options,
        ["background", "backgroundImage"],
        "backgroundImage"
      );
    }
  };
  var backgroundPosition = {
    name: "backgroundPosition",
    generate: (style, options) => {
      return generateRule(
        style,
        options,
        ["background", "backgroundPosition"],
        "backgroundPosition"
      );
    }
  };
  var backgroundRepeat = {
    name: "backgroundRepeat",
    generate: (style, options) => {
      return generateRule(
        style,
        options,
        ["background", "backgroundRepeat"],
        "backgroundRepeat"
      );
    }
  };
  var backgroundSize = {
    name: "backgroundSize",
    generate: (style, options) => {
      return generateRule(
        style,
        options,
        ["background", "backgroundSize"],
        "backgroundSize"
      );
    }
  };
  var backgroundAttachment = {
    name: "backgroundAttachment",
    generate: (style, options) => {
      return generateRule(
        style,
        options,
        ["background", "backgroundAttachment"],
        "backgroundAttachment"
      );
    }
  };
  var background_default2 = [
    backgroundImage,
    backgroundPosition,
    backgroundRepeat,
    backgroundSize,
    backgroundAttachment
  ];

  // packages/style-engine/build-module/styles/shadow/index.mjs
  var shadow = {
    name: "shadow",
    generate: (style, options) => {
      return generateRule(style, options, ["shadow"], "boxShadow");
    }
  };
  var shadow_default = [shadow];

  // packages/style-engine/build-module/styles/outline/index.mjs
  var color2 = {
    name: "color",
    generate: (style, options, path = ["outline", "color"], ruleKey = "outlineColor") => {
      return generateRule(style, options, path, ruleKey);
    }
  };
  var offset = {
    name: "offset",
    generate: (style, options, path = ["outline", "offset"], ruleKey = "outlineOffset") => {
      return generateRule(style, options, path, ruleKey);
    }
  };
  var outlineStyle = {
    name: "style",
    generate: (style, options, path = ["outline", "style"], ruleKey = "outlineStyle") => {
      return generateRule(style, options, path, ruleKey);
    }
  };
  var width3 = {
    name: "width",
    generate: (style, options, path = ["outline", "width"], ruleKey = "outlineWidth") => {
      return generateRule(style, options, path, ruleKey);
    }
  };
  var outline_default = [color2, outlineStyle, offset, width3];

  // packages/style-engine/build-module/styles/spacing/padding.mjs
  var padding = {
    name: "padding",
    generate: (style, options) => {
      return generateBoxRules(style, options, ["spacing", "padding"], {
        default: "padding",
        individual: "padding%s"
      });
    }
  };
  var padding_default = padding;

  // packages/style-engine/build-module/styles/spacing/margin.mjs
  var margin = {
    name: "margin",
    generate: (style, options) => {
      return generateBoxRules(style, options, ["spacing", "margin"], {
        default: "margin",
        individual: "margin%s"
      });
    }
  };
  var margin_default = margin;

  // packages/style-engine/build-module/styles/spacing/index.mjs
  var spacing_default = [margin_default, padding_default];

  // packages/style-engine/build-module/styles/typography/index.mjs
  var fontSize = {
    name: "fontSize",
    generate: (style, options) => {
      return generateRule(
        style,
        options,
        ["typography", "fontSize"],
        "fontSize"
      );
    }
  };
  var fontStyle = {
    name: "fontStyle",
    generate: (style, options) => {
      return generateRule(
        style,
        options,
        ["typography", "fontStyle"],
        "fontStyle"
      );
    }
  };
  var fontWeight = {
    name: "fontWeight",
    generate: (style, options) => {
      return generateRule(
        style,
        options,
        ["typography", "fontWeight"],
        "fontWeight"
      );
    }
  };
  var fontFamily = {
    name: "fontFamily",
    generate: (style, options) => {
      return generateRule(
        style,
        options,
        ["typography", "fontFamily"],
        "fontFamily"
      );
    }
  };
  var letterSpacing = {
    name: "letterSpacing",
    generate: (style, options) => {
      return generateRule(
        style,
        options,
        ["typography", "letterSpacing"],
        "letterSpacing"
      );
    }
  };
  var lineHeight = {
    name: "lineHeight",
    generate: (style, options) => {
      return generateRule(
        style,
        options,
        ["typography", "lineHeight"],
        "lineHeight"
      );
    }
  };
  var textColumns = {
    name: "textColumns",
    generate: (style, options) => {
      return generateRule(
        style,
        options,
        ["typography", "textColumns"],
        "columnCount"
      );
    }
  };
  var textDecoration = {
    name: "textDecoration",
    generate: (style, options) => {
      return generateRule(
        style,
        options,
        ["typography", "textDecoration"],
        "textDecoration"
      );
    }
  };
  var textIndent = {
    name: "textIndent",
    generate: (style, options) => {
      return generateRule(
        style,
        options,
        ["typography", "textIndent"],
        "textIndent"
      );
    }
  };
  var textTransform = {
    name: "textTransform",
    generate: (style, options) => {
      return generateRule(
        style,
        options,
        ["typography", "textTransform"],
        "textTransform"
      );
    }
  };
  var writingMode = {
    name: "writingMode",
    generate: (style, options) => {
      return generateRule(
        style,
        options,
        ["typography", "writingMode"],
        "writingMode"
      );
    }
  };
  var typography_default = [
    fontFamily,
    fontSize,
    fontStyle,
    fontWeight,
    letterSpacing,
    lineHeight,
    textColumns,
    textDecoration,
    textIndent,
    textTransform,
    writingMode
  ];

  // packages/style-engine/build-module/styles/index.mjs
  var styleDefinitions = [
    ...border_default,
    ...color_default,
    ...dimensions_default,
    ...outline_default,
    ...spacing_default,
    ...typography_default,
    ...shadow_default,
    ...background_default2
  ];

  // packages/style-engine/build-module/index.mjs
  function compileCSS(style, options = {}) {
    const rules = getCSSRules(style, options);
    if (!options?.selector) {
      const inlineRules = [];
      rules.forEach((rule) => {
        inlineRules.push(`${paramCase(rule.key)}: ${rule.value};`);
      });
      return inlineRules.join(" ");
    }
    const groupedRules = rules.reduce(
      (acc, rule) => {
        const { selector } = rule;
        if (!selector) {
          return acc;
        }
        if (!acc[selector]) {
          acc[selector] = [];
        }
        acc[selector].push(rule);
        return acc;
      },
      {}
    );
    const selectorRules = Object.keys(groupedRules).reduce(
      (acc, subSelector) => {
        acc.push(
          `${subSelector} { ${groupedRules[subSelector].map(
            (rule) => `${paramCase(rule.key)}: ${rule.value};`
          ).join(" ")} }`
        );
        return acc;
      },
      []
    );
    return selectorRules.join("\n");
  }
  function getCSSRules(style, options = {}) {
    const rules = [];
    styleDefinitions.forEach((definition) => {
      if (typeof definition.generate === "function") {
        rules.push(...definition.generate(style, options));
      }
    });
    return rules;
  }
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                                                                                                        dist/style-engine.min.js                                                                            0000644                 00000014606 15212564032 0011241 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).styleEngine=(()=>{var _=Object.defineProperty;var W=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var X=Object.prototype.hasOwnProperty;var J=(r,e)=>{for(var t in e)_(r,t,{get:e[t],enumerable:!0})},Y=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of K(e))!X.call(r,i)&&i!==t&&_(r,i,{get:()=>e[i],enumerable:!(o=W(e,i))||o.enumerable});return r};var q=r=>Y(_({},"__esModule",{value:!0}),r);var $e={};J($e,{compileCSS:()=>He,getCSSRules:()=>N,getCSSValueFromRawStyle:()=>g});var l=function(){return l=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++){t=arguments[o];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},l.apply(this,arguments)};function R(r){return r.toLowerCase()}var Q=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],ee=/[^A-Z0-9]+/gi;function E(r,e){e===void 0&&(e={});for(var t=e.splitRegexp,o=t===void 0?Q:t,i=e.stripRegexp,a=i===void 0?ee:i,u=e.transform,f=u===void 0?R:u,p=e.delimiter,m=p===void 0?" ":p,c=S(S(r,o,"$1\0$2"),a,"\0"),b=0,v=c.length;c.charAt(b)==="\0";)b++;for(;c.charAt(v-1)==="\0";)v--;return c.slice(b,v).split("\0").map(f).join(m)}function S(r,e,t){return e instanceof RegExp?r.replace(e,t):e.reduce(function(o,i){return o.replace(i,t)},r)}function O(r,e){return e===void 0&&(e={}),E(r,l({delimiter:"."},e))}function d(r,e){return e===void 0&&(e={}),O(r,l({delimiter:"-"},e))}var w="var:",j="|",A="--";var x=(r,e)=>{let t=r;return e.forEach(o=>{t=t?.[o]}),t};function n(r,e,t,o){let i=x(r,t);return i?[{selector:e?.selector,key:o,value:g(i)}]:[]}function s(r,e,t,o,i=["top","right","bottom","left"]){let a=x(r,t);if(!a)return[];let u=[];if(typeof a=="string")u.push({selector:e?.selector,key:o.default,value:g(a)});else{let f=i.reduce((p,m)=>{let c=g(x(a,[m]));return c&&p.push({selector:e?.selector,key:o?.individual.replace("%s",P(m)),value:c}),p},[]);u.push(...f)}return u}function g(r){return typeof r=="string"&&r.startsWith(w)?`var(--wp--${r.slice(w.length).split(j).map(t=>d(t,{splitRegexp:[/([a-z0-9])([A-Z])/g,/([0-9])([a-z])/g,/([A-Za-z])([0-9])/g,/([A-Z])([A-Z][a-z])/g]})).join(A)})`:r}function P(r){let[e,...t]=r;return e.toUpperCase()+t.join("")}function T(r){let[e,...t]=r;return e.toLowerCase()+t.map(P).join("")}function I(r){try{return decodeURI(r)}catch{return r}}function y(r){return(e,t)=>n(e,t,r,T(r))}function h(r){return(e,t)=>["color","style","width"].flatMap(o=>y(["border",r,o])(e,t))}var re={name:"color",generate:y(["border","color"])},te={name:"radius",generate:(r,e)=>s(r,e,["border","radius"],{default:"borderRadius",individual:"border%sRadius"},["topLeft","topRight","bottomLeft","bottomRight"])},ne={name:"style",generate:y(["border","style"])},oe={name:"width",generate:y(["border","width"])},ae={name:"borderTop",generate:h("top")},ie={name:"borderRight",generate:h("right")},ue={name:"borderBottom",generate:h("bottom")},fe={name:"borderLeft",generate:h("left")},C=[re,ne,oe,te,ae,ie,ue,fe];var ce={name:"background",generate:(r,e)=>n(r,e,["color","background"],"backgroundColor")},k=ce;var le={name:"gradient",generate:(r,e)=>n(r,e,["color","gradient"],"background")},D=le;var se={name:"text",generate:(r,e)=>n(r,e,["color","text"],"color")},L=se;var F=[L,D,k];var pe={name:"height",generate:(r,e)=>n(r,e,["dimensions","height"],"height")},de={name:"minHeight",generate:(r,e)=>n(r,e,["dimensions","minHeight"],"minHeight")},ge={name:"aspectRatio",generate:(r,e)=>n(r,e,["dimensions","aspectRatio"],"aspectRatio")},me={name:"width",generate:(r,e)=>n(r,e,["dimensions","width"],"width")},B=[pe,de,ge,me];var ye={name:"backgroundImage",generate:(r,e)=>{let t=r?.background?.backgroundImage;return typeof t=="object"&&t?.url?[{selector:e.selector,key:"backgroundImage",value:`url( '${encodeURI(I(t.url))}' )`}]:n(r,e,["background","backgroundImage"],"backgroundImage")}},he={name:"backgroundPosition",generate:(r,e)=>n(r,e,["background","backgroundPosition"],"backgroundPosition")},be={name:"backgroundRepeat",generate:(r,e)=>n(r,e,["background","backgroundRepeat"],"backgroundRepeat")},ve={name:"backgroundSize",generate:(r,e)=>n(r,e,["background","backgroundSize"],"backgroundSize")},_e={name:"backgroundAttachment",generate:(r,e)=>n(r,e,["background","backgroundAttachment"],"backgroundAttachment")},z=[ye,he,be,ve,_e];var we={name:"shadow",generate:(r,e)=>n(r,e,["shadow"],"boxShadow")},H=[we];var xe={name:"color",generate:(r,e,t=["outline","color"],o="outlineColor")=>n(r,e,t,o)},Re={name:"offset",generate:(r,e,t=["outline","offset"],o="outlineOffset")=>n(r,e,t,o)},Se={name:"style",generate:(r,e,t=["outline","style"],o="outlineStyle")=>n(r,e,t,o)},Ee={name:"width",generate:(r,e,t=["outline","width"],o="outlineWidth")=>n(r,e,t,o)},$=[xe,Se,Re,Ee];var Oe={name:"padding",generate:(r,e)=>s(r,e,["spacing","padding"],{default:"padding",individual:"padding%s"})},U=Oe;var je={name:"margin",generate:(r,e)=>s(r,e,["spacing","margin"],{default:"margin",individual:"margin%s"})},M=je;var V=[M,U];var Ae={name:"fontSize",generate:(r,e)=>n(r,e,["typography","fontSize"],"fontSize")},Pe={name:"fontStyle",generate:(r,e)=>n(r,e,["typography","fontStyle"],"fontStyle")},Te={name:"fontWeight",generate:(r,e)=>n(r,e,["typography","fontWeight"],"fontWeight")},Ie={name:"fontFamily",generate:(r,e)=>n(r,e,["typography","fontFamily"],"fontFamily")},Ce={name:"letterSpacing",generate:(r,e)=>n(r,e,["typography","letterSpacing"],"letterSpacing")},ke={name:"lineHeight",generate:(r,e)=>n(r,e,["typography","lineHeight"],"lineHeight")},De={name:"textColumns",generate:(r,e)=>n(r,e,["typography","textColumns"],"columnCount")},Le={name:"textDecoration",generate:(r,e)=>n(r,e,["typography","textDecoration"],"textDecoration")},Fe={name:"textIndent",generate:(r,e)=>n(r,e,["typography","textIndent"],"textIndent")},Be={name:"textTransform",generate:(r,e)=>n(r,e,["typography","textTransform"],"textTransform")},ze={name:"writingMode",generate:(r,e)=>n(r,e,["typography","writingMode"],"writingMode")},Z=[Ie,Ae,Pe,Te,Ce,ke,De,Le,Fe,Be,ze];var G=[...C,...F,...B,...$,...V,...Z,...H,...z];function He(r,e={}){let t=N(r,e);if(!e?.selector){let a=[];return t.forEach(u=>{a.push(`${d(u.key)}: ${u.value};`)}),a.join(" ")}let o=t.reduce((a,u)=>{let{selector:f}=u;return f&&(a[f]||(a[f]=[]),a[f].push(u)),a},{});return Object.keys(o).reduce((a,u)=>(a.push(`${u} { ${o[u].map(f=>`${d(f.key)}: ${f.value};`).join(" ")} }`),a),[]).join(`
`)}function N(r,e={}){let t=[];return G.forEach(o=>{typeof o.generate=="function"&&t.push(...o.generate(r,e))}),t}return q($e);})();
                                                                                                                          dist/token-list.js                                                                                  0000644                 00000014166 15212564032 0010146 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).tokenList = (() => {
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // packages/token-list/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    default: () => TokenList
  });
  var TokenList = class {
    _currentValue;
    _valueAsArray;
    /**
     * Constructs a new instance of TokenList.
     *
     * @param initialValue Initial value to assign.
     */
    constructor(initialValue = "") {
      this._currentValue = "";
      this._valueAsArray = [];
      this.value = initialValue;
    }
    entries(...args) {
      return this._valueAsArray.entries(...args);
    }
    forEach(...args) {
      return this._valueAsArray.forEach(...args);
    }
    keys(...args) {
      return this._valueAsArray.keys(...args);
    }
    values(...args) {
      return this._valueAsArray.values(...args);
    }
    /**
     * Returns the associated set as string.
     *
     * @see https://dom.spec.whatwg.org/#dom-domtokenlist-value
     *
     * @return Token set as string.
     */
    get value() {
      return this._currentValue;
    }
    /**
     * Replaces the associated set with a new string value.
     *
     * @see https://dom.spec.whatwg.org/#dom-domtokenlist-value
     *
     * @param value New token set as string.
     */
    set value(value) {
      value = String(value);
      this._valueAsArray = [
        ...new Set(value.split(/\s+/g).filter(Boolean))
      ];
      this._currentValue = this._valueAsArray.join(" ");
    }
    /**
     * Returns the number of tokens.
     *
     * @see https://dom.spec.whatwg.org/#dom-domtokenlist-length
     *
     * @return Number of tokens.
     */
    get length() {
      return this._valueAsArray.length;
    }
    /**
     * Returns the stringified form of the TokenList.
     *
     * @see https://dom.spec.whatwg.org/#DOMTokenList-stringification-behavior
     * @see https://www.ecma-international.org/ecma-262/9.0/index.html#sec-tostring
     *
     * @return Token set as string.
     */
    toString() {
      return this.value;
    }
    /**
     * Returns an iterator for the TokenList, iterating items of the set.
     *
     * @see https://dom.spec.whatwg.org/#domtokenlist
     *
     * @return TokenList iterator.
     */
    *[Symbol.iterator]() {
      return yield* this._valueAsArray;
    }
    /**
     * Returns the token with index `index`.
     *
     * @see https://dom.spec.whatwg.org/#dom-domtokenlist-item
     *
     * @param index Index at which to return token.
     *
     * @return Token at index.
     */
    item(index) {
      return this._valueAsArray[index];
    }
    /**
     * Returns true if `token` is present, and false otherwise.
     *
     * @see https://dom.spec.whatwg.org/#dom-domtokenlist-contains
     *
     * @param item Token to test.
     *
     * @return Whether token is present.
     */
    contains(item) {
      return this._valueAsArray.indexOf(item) !== -1;
    }
    /**
     * Adds all arguments passed, except those already present.
     *
     * @see https://dom.spec.whatwg.org/#dom-domtokenlist-add
     *
     * @param items Items to add.
     */
    add(...items) {
      this.value += " " + items.join(" ");
    }
    /**
     * Removes arguments passed, if they are present.
     *
     * @see https://dom.spec.whatwg.org/#dom-domtokenlist-remove
     *
     * @param items Items to remove.
     */
    remove(...items) {
      this.value = this._valueAsArray.filter((val) => !items.includes(val)).join(" ");
    }
    /**
     * If `force` is not given, "toggles" `token`, removing it if itâ€™s present
     * and adding it if itâ€™s not present. If `force` is true, adds token (same
     * as add()). If force is false, removes token (same as remove()). Returns
     * true if `token` is now present, and false otherwise.
     *
     * @see https://dom.spec.whatwg.org/#dom-domtokenlist-toggle
     *
     * @param token   Token to toggle.
     * @param [force] Presence to force.
     *
     * @return Whether token is present after toggle.
     */
    toggle(token, force) {
      if (void 0 === force) {
        force = !this.contains(token);
      }
      if (force) {
        this.add(token);
      } else {
        this.remove(token);
      }
      return force;
    }
    /**
     * Replaces `token` with `newToken`. Returns true if `token` was replaced
     * with `newToken`, and false otherwise.
     *
     * @see https://dom.spec.whatwg.org/#dom-domtokenlist-replace
     *
     * @param token    Token to replace with `newToken`.
     * @param newToken Token to use in place of `token`.
     *
     * @return Whether replacement occurred.
     */
    replace(token, newToken) {
      if (!this.contains(token)) {
        return false;
      }
      this.remove(token);
      this.add(newToken);
      return true;
    }
    /* eslint-disable @typescript-eslint/no-unused-vars */
    /**
     * Returns true if `token` is in the associated attributeâ€™s supported
     * tokens. Returns false otherwise.
     *
     * Always returns `true` in this implementation.
     *
     * @param _token
     * @see https://dom.spec.whatwg.org/#dom-domtokenlist-supports
     *
     * @return Whether token is supported.
     */
    supports(_token) {
      return true;
    }
    /* eslint-enable @typescript-eslint/no-unused-vars */
  };
  return __toCommonJS(index_exports);
})();
if (typeof wp.tokenList === 'object' && wp.tokenList.default) { wp.tokenList = wp.tokenList.default; }
                                                                                                                                                                                                                                                                                                                                                                                                          dist/token-list.min.js                                                                              0000644                 00000003127 15212564032 0010723 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).tokenList=(()=>{var a=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var h=(r,e)=>{for(var s in e)a(r,s,{get:e[s],enumerable:!0})},A=(r,e,s,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of l(e))!n.call(r,t)&&t!==s&&a(r,t,{get:()=>e[t],enumerable:!(i=u(e,t))||i.enumerable});return r};var v=r=>A(a({},"__esModule",{value:!0}),r);var _={};h(_,{default:()=>o});var o=class{_currentValue;_valueAsArray;constructor(r=""){this._currentValue="",this._valueAsArray=[],this.value=r}entries(...r){return this._valueAsArray.entries(...r)}forEach(...r){return this._valueAsArray.forEach(...r)}keys(...r){return this._valueAsArray.keys(...r)}values(...r){return this._valueAsArray.values(...r)}get value(){return this._currentValue}set value(r){r=String(r),this._valueAsArray=[...new Set(r.split(/\s+/g).filter(Boolean))],this._currentValue=this._valueAsArray.join(" ")}get length(){return this._valueAsArray.length}toString(){return this.value}*[Symbol.iterator](){return yield*this._valueAsArray}item(r){return this._valueAsArray[r]}contains(r){return this._valueAsArray.indexOf(r)!==-1}add(...r){this.value+=" "+r.join(" ")}remove(...r){this.value=this._valueAsArray.filter(e=>!r.includes(e)).join(" ")}toggle(r,e){return e===void 0&&(e=!this.contains(r)),e?this.add(r):this.remove(r),e}replace(r,e){return this.contains(r)?(this.remove(r),this.add(e),!0):!1}supports(r){return!0}};return v(_);})();
if (typeof wp.tokenList === 'object' && wp.tokenList.default) { wp.tokenList = wp.tokenList.default; }
                                                                                                                                                                                                                                                                                                                                                                                                                                         dist/url.js                                                                                         0000644                 00000056617 15212564032 0006666 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).url = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // node_modules/remove-accents/index.js
  var require_remove_accents = __commonJS({
    "node_modules/remove-accents/index.js"(exports, module) {
      var characterMap = {
        "\xC0": "A",
        "\xC1": "A",
        "\xC2": "A",
        "\xC3": "A",
        "\xC4": "A",
        "\xC5": "A",
        "\u1EA4": "A",
        "\u1EAE": "A",
        "\u1EB2": "A",
        "\u1EB4": "A",
        "\u1EB6": "A",
        "\xC6": "AE",
        "\u1EA6": "A",
        "\u1EB0": "A",
        "\u0202": "A",
        "\u1EA2": "A",
        "\u1EA0": "A",
        "\u1EA8": "A",
        "\u1EAA": "A",
        "\u1EAC": "A",
        "\xC7": "C",
        "\u1E08": "C",
        "\xC8": "E",
        "\xC9": "E",
        "\xCA": "E",
        "\xCB": "E",
        "\u1EBE": "E",
        "\u1E16": "E",
        "\u1EC0": "E",
        "\u1E14": "E",
        "\u1E1C": "E",
        "\u0206": "E",
        "\u1EBA": "E",
        "\u1EBC": "E",
        "\u1EB8": "E",
        "\u1EC2": "E",
        "\u1EC4": "E",
        "\u1EC6": "E",
        "\xCC": "I",
        "\xCD": "I",
        "\xCE": "I",
        "\xCF": "I",
        "\u1E2E": "I",
        "\u020A": "I",
        "\u1EC8": "I",
        "\u1ECA": "I",
        "\xD0": "D",
        "\xD1": "N",
        "\xD2": "O",
        "\xD3": "O",
        "\xD4": "O",
        "\xD5": "O",
        "\xD6": "O",
        "\xD8": "O",
        "\u1ED0": "O",
        "\u1E4C": "O",
        "\u1E52": "O",
        "\u020E": "O",
        "\u1ECE": "O",
        "\u1ECC": "O",
        "\u1ED4": "O",
        "\u1ED6": "O",
        "\u1ED8": "O",
        "\u1EDC": "O",
        "\u1EDE": "O",
        "\u1EE0": "O",
        "\u1EDA": "O",
        "\u1EE2": "O",
        "\xD9": "U",
        "\xDA": "U",
        "\xDB": "U",
        "\xDC": "U",
        "\u1EE6": "U",
        "\u1EE4": "U",
        "\u1EEC": "U",
        "\u1EEE": "U",
        "\u1EF0": "U",
        "\xDD": "Y",
        "\xE0": "a",
        "\xE1": "a",
        "\xE2": "a",
        "\xE3": "a",
        "\xE4": "a",
        "\xE5": "a",
        "\u1EA5": "a",
        "\u1EAF": "a",
        "\u1EB3": "a",
        "\u1EB5": "a",
        "\u1EB7": "a",
        "\xE6": "ae",
        "\u1EA7": "a",
        "\u1EB1": "a",
        "\u0203": "a",
        "\u1EA3": "a",
        "\u1EA1": "a",
        "\u1EA9": "a",
        "\u1EAB": "a",
        "\u1EAD": "a",
        "\xE7": "c",
        "\u1E09": "c",
        "\xE8": "e",
        "\xE9": "e",
        "\xEA": "e",
        "\xEB": "e",
        "\u1EBF": "e",
        "\u1E17": "e",
        "\u1EC1": "e",
        "\u1E15": "e",
        "\u1E1D": "e",
        "\u0207": "e",
        "\u1EBB": "e",
        "\u1EBD": "e",
        "\u1EB9": "e",
        "\u1EC3": "e",
        "\u1EC5": "e",
        "\u1EC7": "e",
        "\xEC": "i",
        "\xED": "i",
        "\xEE": "i",
        "\xEF": "i",
        "\u1E2F": "i",
        "\u020B": "i",
        "\u1EC9": "i",
        "\u1ECB": "i",
        "\xF0": "d",
        "\xF1": "n",
        "\xF2": "o",
        "\xF3": "o",
        "\xF4": "o",
        "\xF5": "o",
        "\xF6": "o",
        "\xF8": "o",
        "\u1ED1": "o",
        "\u1E4D": "o",
        "\u1E53": "o",
        "\u020F": "o",
        "\u1ECF": "o",
        "\u1ECD": "o",
        "\u1ED5": "o",
        "\u1ED7": "o",
        "\u1ED9": "o",
        "\u1EDD": "o",
        "\u1EDF": "o",
        "\u1EE1": "o",
        "\u1EDB": "o",
        "\u1EE3": "o",
        "\xF9": "u",
        "\xFA": "u",
        "\xFB": "u",
        "\xFC": "u",
        "\u1EE7": "u",
        "\u1EE5": "u",
        "\u1EED": "u",
        "\u1EEF": "u",
        "\u1EF1": "u",
        "\xFD": "y",
        "\xFF": "y",
        "\u0100": "A",
        "\u0101": "a",
        "\u0102": "A",
        "\u0103": "a",
        "\u0104": "A",
        "\u0105": "a",
        "\u0106": "C",
        "\u0107": "c",
        "\u0108": "C",
        "\u0109": "c",
        "\u010A": "C",
        "\u010B": "c",
        "\u010C": "C",
        "\u010D": "c",
        "C\u0306": "C",
        "c\u0306": "c",
        "\u010E": "D",
        "\u010F": "d",
        "\u0110": "D",
        "\u0111": "d",
        "\u0112": "E",
        "\u0113": "e",
        "\u0114": "E",
        "\u0115": "e",
        "\u0116": "E",
        "\u0117": "e",
        "\u0118": "E",
        "\u0119": "e",
        "\u011A": "E",
        "\u011B": "e",
        "\u011C": "G",
        "\u01F4": "G",
        "\u011D": "g",
        "\u01F5": "g",
        "\u011E": "G",
        "\u011F": "g",
        "\u0120": "G",
        "\u0121": "g",
        "\u0122": "G",
        "\u0123": "g",
        "\u0124": "H",
        "\u0125": "h",
        "\u0126": "H",
        "\u0127": "h",
        "\u1E2A": "H",
        "\u1E2B": "h",
        "\u0128": "I",
        "\u0129": "i",
        "\u012A": "I",
        "\u012B": "i",
        "\u012C": "I",
        "\u012D": "i",
        "\u012E": "I",
        "\u012F": "i",
        "\u0130": "I",
        "\u0131": "i",
        "\u0132": "IJ",
        "\u0133": "ij",
        "\u0134": "J",
        "\u0135": "j",
        "\u0136": "K",
        "\u0137": "k",
        "\u1E30": "K",
        "\u1E31": "k",
        "K\u0306": "K",
        "k\u0306": "k",
        "\u0139": "L",
        "\u013A": "l",
        "\u013B": "L",
        "\u013C": "l",
        "\u013D": "L",
        "\u013E": "l",
        "\u013F": "L",
        "\u0140": "l",
        "\u0141": "l",
        "\u0142": "l",
        "\u1E3E": "M",
        "\u1E3F": "m",
        "M\u0306": "M",
        "m\u0306": "m",
        "\u0143": "N",
        "\u0144": "n",
        "\u0145": "N",
        "\u0146": "n",
        "\u0147": "N",
        "\u0148": "n",
        "\u0149": "n",
        "N\u0306": "N",
        "n\u0306": "n",
        "\u014C": "O",
        "\u014D": "o",
        "\u014E": "O",
        "\u014F": "o",
        "\u0150": "O",
        "\u0151": "o",
        "\u0152": "OE",
        "\u0153": "oe",
        "P\u0306": "P",
        "p\u0306": "p",
        "\u0154": "R",
        "\u0155": "r",
        "\u0156": "R",
        "\u0157": "r",
        "\u0158": "R",
        "\u0159": "r",
        "R\u0306": "R",
        "r\u0306": "r",
        "\u0212": "R",
        "\u0213": "r",
        "\u015A": "S",
        "\u015B": "s",
        "\u015C": "S",
        "\u015D": "s",
        "\u015E": "S",
        "\u0218": "S",
        "\u0219": "s",
        "\u015F": "s",
        "\u0160": "S",
        "\u0161": "s",
        "\u0162": "T",
        "\u0163": "t",
        "\u021B": "t",
        "\u021A": "T",
        "\u0164": "T",
        "\u0165": "t",
        "\u0166": "T",
        "\u0167": "t",
        "T\u0306": "T",
        "t\u0306": "t",
        "\u0168": "U",
        "\u0169": "u",
        "\u016A": "U",
        "\u016B": "u",
        "\u016C": "U",
        "\u016D": "u",
        "\u016E": "U",
        "\u016F": "u",
        "\u0170": "U",
        "\u0171": "u",
        "\u0172": "U",
        "\u0173": "u",
        "\u0216": "U",
        "\u0217": "u",
        "V\u0306": "V",
        "v\u0306": "v",
        "\u0174": "W",
        "\u0175": "w",
        "\u1E82": "W",
        "\u1E83": "w",
        "X\u0306": "X",
        "x\u0306": "x",
        "\u0176": "Y",
        "\u0177": "y",
        "\u0178": "Y",
        "Y\u0306": "Y",
        "y\u0306": "y",
        "\u0179": "Z",
        "\u017A": "z",
        "\u017B": "Z",
        "\u017C": "z",
        "\u017D": "Z",
        "\u017E": "z",
        "\u017F": "s",
        "\u0192": "f",
        "\u01A0": "O",
        "\u01A1": "o",
        "\u01AF": "U",
        "\u01B0": "u",
        "\u01CD": "A",
        "\u01CE": "a",
        "\u01CF": "I",
        "\u01D0": "i",
        "\u01D1": "O",
        "\u01D2": "o",
        "\u01D3": "U",
        "\u01D4": "u",
        "\u01D5": "U",
        "\u01D6": "u",
        "\u01D7": "U",
        "\u01D8": "u",
        "\u01D9": "U",
        "\u01DA": "u",
        "\u01DB": "U",
        "\u01DC": "u",
        "\u1EE8": "U",
        "\u1EE9": "u",
        "\u1E78": "U",
        "\u1E79": "u",
        "\u01FA": "A",
        "\u01FB": "a",
        "\u01FC": "AE",
        "\u01FD": "ae",
        "\u01FE": "O",
        "\u01FF": "o",
        "\xDE": "TH",
        "\xFE": "th",
        "\u1E54": "P",
        "\u1E55": "p",
        "\u1E64": "S",
        "\u1E65": "s",
        "X\u0301": "X",
        "x\u0301": "x",
        "\u0403": "\u0413",
        "\u0453": "\u0433",
        "\u040C": "\u041A",
        "\u045C": "\u043A",
        "A\u030B": "A",
        "a\u030B": "a",
        "E\u030B": "E",
        "e\u030B": "e",
        "I\u030B": "I",
        "i\u030B": "i",
        "\u01F8": "N",
        "\u01F9": "n",
        "\u1ED2": "O",
        "\u1ED3": "o",
        "\u1E50": "O",
        "\u1E51": "o",
        "\u1EEA": "U",
        "\u1EEB": "u",
        "\u1E80": "W",
        "\u1E81": "w",
        "\u1EF2": "Y",
        "\u1EF3": "y",
        "\u0200": "A",
        "\u0201": "a",
        "\u0204": "E",
        "\u0205": "e",
        "\u0208": "I",
        "\u0209": "i",
        "\u020C": "O",
        "\u020D": "o",
        "\u0210": "R",
        "\u0211": "r",
        "\u0214": "U",
        "\u0215": "u",
        "B\u030C": "B",
        "b\u030C": "b",
        "\u010C\u0323": "C",
        "\u010D\u0323": "c",
        "\xCA\u030C": "E",
        "\xEA\u030C": "e",
        "F\u030C": "F",
        "f\u030C": "f",
        "\u01E6": "G",
        "\u01E7": "g",
        "\u021E": "H",
        "\u021F": "h",
        "J\u030C": "J",
        "\u01F0": "j",
        "\u01E8": "K",
        "\u01E9": "k",
        "M\u030C": "M",
        "m\u030C": "m",
        "P\u030C": "P",
        "p\u030C": "p",
        "Q\u030C": "Q",
        "q\u030C": "q",
        "\u0158\u0329": "R",
        "\u0159\u0329": "r",
        "\u1E66": "S",
        "\u1E67": "s",
        "V\u030C": "V",
        "v\u030C": "v",
        "W\u030C": "W",
        "w\u030C": "w",
        "X\u030C": "X",
        "x\u030C": "x",
        "Y\u030C": "Y",
        "y\u030C": "y",
        "A\u0327": "A",
        "a\u0327": "a",
        "B\u0327": "B",
        "b\u0327": "b",
        "\u1E10": "D",
        "\u1E11": "d",
        "\u0228": "E",
        "\u0229": "e",
        "\u0190\u0327": "E",
        "\u025B\u0327": "e",
        "\u1E28": "H",
        "\u1E29": "h",
        "I\u0327": "I",
        "i\u0327": "i",
        "\u0197\u0327": "I",
        "\u0268\u0327": "i",
        "M\u0327": "M",
        "m\u0327": "m",
        "O\u0327": "O",
        "o\u0327": "o",
        "Q\u0327": "Q",
        "q\u0327": "q",
        "U\u0327": "U",
        "u\u0327": "u",
        "X\u0327": "X",
        "x\u0327": "x",
        "Z\u0327": "Z",
        "z\u0327": "z",
        "\u0439": "\u0438",
        "\u0419": "\u0418",
        "\u0451": "\u0435",
        "\u0401": "\u0415"
      };
      var chars = Object.keys(characterMap).join("|");
      var allAccents = new RegExp(chars, "g");
      var firstAccent = new RegExp(chars, "");
      function matcher(match) {
        return characterMap[match];
      }
      var removeAccents2 = function(string) {
        return string.replace(allAccents, matcher);
      };
      var hasAccents = function(string) {
        return !!string.match(firstAccent);
      };
      module.exports = removeAccents2;
      module.exports.has = hasAccents;
      module.exports.remove = removeAccents2;
    }
  });

  // packages/url/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    addQueryArgs: () => addQueryArgs,
    buildQueryString: () => buildQueryString,
    cleanForSlug: () => cleanForSlug,
    filterURLForDisplay: () => filterURLForDisplay,
    getAuthority: () => getAuthority,
    getFilename: () => getFilename,
    getFragment: () => getFragment,
    getPath: () => getPath,
    getPathAndQueryString: () => getPathAndQueryString,
    getProtocol: () => getProtocol,
    getQueryArg: () => getQueryArg,
    getQueryArgs: () => getQueryArgs,
    getQueryString: () => getQueryString,
    hasQueryArg: () => hasQueryArg,
    isEmail: () => isEmail,
    isPhoneNumber: () => isPhoneNumber,
    isURL: () => isURL,
    isValidAuthority: () => isValidAuthority,
    isValidFragment: () => isValidFragment,
    isValidPath: () => isValidPath,
    isValidProtocol: () => isValidProtocol,
    isValidQueryString: () => isValidQueryString,
    normalizePath: () => normalizePath,
    prependHTTP: () => prependHTTP,
    prependHTTPS: () => prependHTTPS,
    removeQueryArgs: () => removeQueryArgs,
    safeDecodeURI: () => safeDecodeURI,
    safeDecodeURIComponent: () => safeDecodeURIComponent
  });

  // packages/url/build-module/is-url.mjs
  function isURL(url) {
    try {
      new URL(url);
      return true;
    } catch {
      return false;
    }
  }

  // packages/url/build-module/is-email.mjs
  var EMAIL_REGEXP = /^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i;
  function isEmail(email) {
    return EMAIL_REGEXP.test(email);
  }

  // packages/url/build-module/is-phone-number.mjs
  var PHONE_REGEXP = /^(tel:)?(\+)?\d{6,15}$/;
  function isPhoneNumber(phoneNumber) {
    phoneNumber = phoneNumber.replace(/[-.() ]/g, "");
    return PHONE_REGEXP.test(phoneNumber);
  }

  // packages/url/build-module/get-protocol.mjs
  function getProtocol(url) {
    const matches = /^([^\s:]+:)/.exec(url);
    if (matches) {
      return matches[1];
    }
  }

  // packages/url/build-module/is-valid-protocol.mjs
  function isValidProtocol(protocol) {
    if (!protocol) {
      return false;
    }
    return /^[a-z\-.\+]+[0-9]*:$/i.test(protocol);
  }

  // packages/url/build-module/get-authority.mjs
  function getAuthority(url) {
    const matches = /^[^\/\s:]+:(?:\/\/)?\/?([^\/\s#?]+)[\/#?]{0,1}\S*$/.exec(
      url
    );
    if (matches) {
      return matches[1];
    }
  }

  // packages/url/build-module/is-valid-authority.mjs
  function isValidAuthority(authority) {
    if (!authority) {
      return false;
    }
    return /^[^\s#?]+$/.test(authority);
  }

  // packages/url/build-module/get-path.mjs
  function getPath(url) {
    const matches = /^[^\/\s:]+:(?:\/\/)?[^\/\s#?]+[\/]([^\s#?]+)[#?]{0,1}\S*$/.exec(url);
    if (matches) {
      return matches[1];
    }
  }

  // packages/url/build-module/is-valid-path.mjs
  function isValidPath(path) {
    if (!path) {
      return false;
    }
    return /^[^\s#?]+$/.test(path);
  }

  // packages/url/build-module/get-query-string.mjs
  function getQueryString(url) {
    let query;
    try {
      query = new URL(url, "http://example.com").search.substring(1);
    } catch (error) {
    }
    if (query) {
      return query;
    }
  }

  // packages/url/build-module/build-query-string.mjs
  function buildQueryString(data) {
    let string = "";
    const stack = Object.entries(data);
    let pair;
    while (pair = stack.shift()) {
      let [key, value] = pair;
      const hasNestedData = Array.isArray(value) || value && value.constructor === Object;
      if (hasNestedData) {
        const valuePairs = Object.entries(value).reverse();
        for (const [member, memberValue] of valuePairs) {
          stack.unshift([`${key}[${member}]`, memberValue]);
        }
      } else if (value !== void 0) {
        if (value === null) {
          value = "";
        }
        string += "&" + [key, String(value)].map(encodeURIComponent).join("=");
      }
    }
    return string.substr(1);
  }

  // packages/url/build-module/is-valid-query-string.mjs
  function isValidQueryString(queryString) {
    if (!queryString) {
      return false;
    }
    return /^[^\s#?\/]+$/.test(queryString);
  }

  // packages/url/build-module/get-path-and-query-string.mjs
  function getPathAndQueryString(url) {
    const path = getPath(url);
    const queryString = getQueryString(url);
    let value = "/";
    if (path) {
      value += path;
    }
    if (queryString) {
      value += `?${queryString}`;
    }
    return value;
  }

  // packages/url/build-module/get-fragment.mjs
  function getFragment(url) {
    const matches = /^\S+?(#[^\s\?]*)/.exec(url);
    if (matches) {
      return matches[1];
    }
  }

  // packages/url/build-module/is-valid-fragment.mjs
  function isValidFragment(fragment) {
    if (!fragment) {
      return false;
    }
    return /^#[^\s#?\/]*$/.test(fragment);
  }

  // packages/url/build-module/safe-decode-uri-component.mjs
  function safeDecodeURIComponent(uriComponent) {
    try {
      return decodeURIComponent(uriComponent);
    } catch (uriComponentError) {
      return uriComponent;
    }
  }

  // packages/url/build-module/get-query-args.mjs
  function setPath(object, path, value) {
    const length = path.length;
    const lastIndex = length - 1;
    for (let i = 0; i < length; i++) {
      let key = path[i];
      if (!key && Array.isArray(object)) {
        key = object.length.toString();
      }
      key = ["__proto__", "constructor", "prototype"].includes(key) ? key.toUpperCase() : key;
      const isNextKeyArrayIndex = !isNaN(Number(path[i + 1]));
      object[key] = i === lastIndex ? (
        // If at end of path, assign the intended value.
        value
      ) : (
        // Otherwise, advance to the next object in the path, creating
        // it if it does not yet exist.
        object[key] || (isNextKeyArrayIndex ? [] : {})
      );
      if (Array.isArray(object[key]) && !isNextKeyArrayIndex) {
        object[key] = { ...object[key] };
      }
      object = object[key];
    }
  }
  function getQueryArgs(url) {
    return (getQueryString(url) || "").replace(/\+/g, "%20").split("&").reduce((accumulator, keyValue) => {
      const [key, value = ""] = keyValue.split("=").filter(Boolean).map(safeDecodeURIComponent);
      if (key) {
        const segments = key.replace(/\]/g, "").split("[");
        setPath(accumulator, segments, value);
      }
      return accumulator;
    }, /* @__PURE__ */ Object.create(null));
  }

  // packages/url/build-module/add-query-args.mjs
  function addQueryArgs(url = "", args) {
    if (!args || !Object.keys(args).length) {
      return url;
    }
    const fragment = getFragment(url) || "";
    let baseUrl = url.replace(fragment, "");
    const queryStringIndex = url.indexOf("?");
    if (queryStringIndex !== -1) {
      args = Object.assign(getQueryArgs(url), args);
      baseUrl = baseUrl.substr(0, queryStringIndex);
    }
    return baseUrl + "?" + buildQueryString(args) + fragment;
  }

  // packages/url/build-module/get-query-arg.mjs
  function getQueryArg(url, arg) {
    return getQueryArgs(url)[arg];
  }

  // packages/url/build-module/has-query-arg.mjs
  function hasQueryArg(url, arg) {
    return getQueryArg(url, arg) !== void 0;
  }

  // packages/url/build-module/remove-query-args.mjs
  function removeQueryArgs(url, ...args) {
    const fragment = url.replace(/^[^#]*/, "");
    url = url.replace(/#.*/, "");
    const queryStringIndex = url.indexOf("?");
    if (queryStringIndex === -1) {
      return url + fragment;
    }
    const query = getQueryArgs(url);
    const baseURL = url.substr(0, queryStringIndex);
    args.forEach((arg) => delete query[arg]);
    const queryString = buildQueryString(query);
    const updatedUrl = queryString ? baseURL + "?" + queryString : baseURL;
    return updatedUrl + fragment;
  }

  // packages/url/build-module/prepend-http.mjs
  var USABLE_HREF_REGEXP = /^(?:[a-z]+:|#|\?|\.|\/)/i;
  function prependHTTP(url) {
    if (!url) {
      return url;
    }
    url = url.trim();
    if (!USABLE_HREF_REGEXP.test(url) && !isEmail(url)) {
      return "http://" + url;
    }
    return url;
  }

  // packages/url/build-module/safe-decode-uri.mjs
  function safeDecodeURI(uri) {
    try {
      return decodeURI(uri);
    } catch (uriError) {
      return uri;
    }
  }

  // packages/url/build-module/filter-url-for-display.mjs
  function filterURLForDisplay(url, maxLength = null) {
    if (!url) {
      return "";
    }
    let filteredURL = url.replace(/^[a-z\-.\+]+[0-9]*:(\/\/)?/i, "").replace(/^www\./i, "");
    if (filteredURL.match(/^[^\/]+\/$/)) {
      filteredURL = filteredURL.replace("/", "");
    }
    const fileRegexp = /\/([^\/?]+)\.(?:[\w]+)(?=\?|$)/;
    if (!maxLength || filteredURL.length <= maxLength || !filteredURL.match(fileRegexp)) {
      return filteredURL;
    }
    filteredURL = filteredURL.split("?")[0];
    const urlPieces = filteredURL.split("/");
    const file = urlPieces[urlPieces.length - 1];
    if (file.length <= maxLength) {
      return "\u2026" + filteredURL.slice(-maxLength);
    }
    const index = file.lastIndexOf(".");
    const [fileName, extension] = [
      file.slice(0, index),
      file.slice(index + 1)
    ];
    const truncatedFile = fileName.slice(-3) + "." + extension;
    return file.slice(0, maxLength - truncatedFile.length - 1) + "\u2026" + truncatedFile;
  }

  // packages/url/build-module/clean-for-slug.mjs
  var import_remove_accents = __toESM(require_remove_accents(), 1);
  function cleanForSlug(string) {
    if (!string) {
      return "";
    }
    return (0, import_remove_accents.default)(string).replace(/(&nbsp;|&ndash;|&mdash;)/g, "-").replace(/[\s\./]+/g, "-").replace(/&\S+?;/g, "").replace(/[^\p{L}\p{N}_-]+/gu, "").toLowerCase().replace(/-+/g, "-").replace(/(^-+)|(-+$)/g, "");
  }

  // packages/url/build-module/get-filename.mjs
  function getFilename(url) {
    let filename;
    if (!url) {
      return;
    }
    try {
      filename = new URL(url, "http://example.com").pathname.split("/").pop();
    } catch (error) {
    }
    if (filename) {
      return filename;
    }
  }

  // packages/url/build-module/normalize-path.mjs
  function normalizePath(path) {
    const split = path.split("?");
    const query = split[1];
    const base = split[0];
    if (!query) {
      return base;
    }
    return base + "?" + query.split("&").map((entry) => entry.split("=")).map((pair) => pair.map(decodeURIComponent)).sort((a, b) => a[0].localeCompare(b[0])).map((pair) => pair.map(encodeURIComponent)).map((pair) => pair.join("=")).join("&");
  }

  // packages/url/build-module/prepend-https.mjs
  function prependHTTPS(url) {
    if (!url) {
      return url;
    }
    if (url.startsWith("http://")) {
      return url;
    }
    url = prependHTTP(url);
    return url.replace(/^http:/, "https:");
  }
  return __toCommonJS(index_exports);
})();
                                                                                                                 dist/url.min.js                                                                                     0000644                 00000024137 15212564032 0007440 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).url=(()=>{var M=Object.create;var l=Object.defineProperty;var Y=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var B=Object.getPrototypeOf,K=Object.prototype.hasOwnProperty;var W=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Z=(e,t)=>{for(var r in t)l(e,r,{get:t[r],enumerable:!0})},E=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of j(t))!K.call(e,o)&&o!==r&&l(e,o,{get:()=>t[o],enumerable:!(n=Y(t,o))||n.enumerable});return e};var J=(e,t,r)=>(r=e!=null?M(B(e)):{},E(t||!e||!e.__esModule?l(r,"default",{value:e,enumerable:!0}):r,e)),ee=e=>E(l({},"__esModule",{value:!0}),e);var L=W((Me,U)=>{var z={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u1EA4:"A",\u1EAE:"A",\u1EB2:"A",\u1EB4:"A",\u1EB6:"A",\u00C6:"AE",\u1EA6:"A",\u1EB0:"A",\u0202:"A",\u1EA2:"A",\u1EA0:"A",\u1EA8:"A",\u1EAA:"A",\u1EAC:"A",\u00C7:"C",\u1E08:"C",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u1EBE:"E",\u1E16:"E",\u1EC0:"E",\u1E14:"E",\u1E1C:"E",\u0206:"E",\u1EBA:"E",\u1EBC:"E",\u1EB8:"E",\u1EC2:"E",\u1EC4:"E",\u1EC6:"E",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u1E2E:"I",\u020A:"I",\u1EC8:"I",\u1ECA:"I",\u00D0:"D",\u00D1:"N",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u1ED0:"O",\u1E4C:"O",\u1E52:"O",\u020E:"O",\u1ECE:"O",\u1ECC:"O",\u1ED4:"O",\u1ED6:"O",\u1ED8:"O",\u1EDC:"O",\u1EDE:"O",\u1EE0:"O",\u1EDA:"O",\u1EE2:"O",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u1EE6:"U",\u1EE4:"U",\u1EEC:"U",\u1EEE:"U",\u1EF0:"U",\u00DD:"Y",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u1EA5:"a",\u1EAF:"a",\u1EB3:"a",\u1EB5:"a",\u1EB7:"a",\u00E6:"ae",\u1EA7:"a",\u1EB1:"a",\u0203:"a",\u1EA3:"a",\u1EA1:"a",\u1EA9:"a",\u1EAB:"a",\u1EAD:"a",\u00E7:"c",\u1E09:"c",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u1EBF:"e",\u1E17:"e",\u1EC1:"e",\u1E15:"e",\u1E1D:"e",\u0207:"e",\u1EBB:"e",\u1EBD:"e",\u1EB9:"e",\u1EC3:"e",\u1EC5:"e",\u1EC7:"e",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u1E2F:"i",\u020B:"i",\u1EC9:"i",\u1ECB:"i",\u00F0:"d",\u00F1:"n",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u1ED1:"o",\u1E4D:"o",\u1E53:"o",\u020F:"o",\u1ECF:"o",\u1ECD:"o",\u1ED5:"o",\u1ED7:"o",\u1ED9:"o",\u1EDD:"o",\u1EDF:"o",\u1EE1:"o",\u1EDB:"o",\u1EE3:"o",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u1EE7:"u",\u1EE5:"u",\u1EED:"u",\u1EEF:"u",\u1EF1:"u",\u00FD:"y",\u00FF:"y",\u0100:"A",\u0101:"a",\u0102:"A",\u0103:"a",\u0104:"A",\u0105:"a",\u0106:"C",\u0107:"c",\u0108:"C",\u0109:"c",\u010A:"C",\u010B:"c",\u010C:"C",\u010D:"c",C\u0306:"C",c\u0306:"c",\u010E:"D",\u010F:"d",\u0110:"D",\u0111:"d",\u0112:"E",\u0113:"e",\u0114:"E",\u0115:"e",\u0116:"E",\u0117:"e",\u0118:"E",\u0119:"e",\u011A:"E",\u011B:"e",\u011C:"G",\u01F4:"G",\u011D:"g",\u01F5:"g",\u011E:"G",\u011F:"g",\u0120:"G",\u0121:"g",\u0122:"G",\u0123:"g",\u0124:"H",\u0125:"h",\u0126:"H",\u0127:"h",\u1E2A:"H",\u1E2B:"h",\u0128:"I",\u0129:"i",\u012A:"I",\u012B:"i",\u012C:"I",\u012D:"i",\u012E:"I",\u012F:"i",\u0130:"I",\u0131:"i",\u0132:"IJ",\u0133:"ij",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u1E30:"K",\u1E31:"k",K\u0306:"K",k\u0306:"k",\u0139:"L",\u013A:"l",\u013B:"L",\u013C:"l",\u013D:"L",\u013E:"l",\u013F:"L",\u0140:"l",\u0141:"l",\u0142:"l",\u1E3E:"M",\u1E3F:"m",M\u0306:"M",m\u0306:"m",\u0143:"N",\u0144:"n",\u0145:"N",\u0146:"n",\u0147:"N",\u0148:"n",\u0149:"n",N\u0306:"N",n\u0306:"n",\u014C:"O",\u014D:"o",\u014E:"O",\u014F:"o",\u0150:"O",\u0151:"o",\u0152:"OE",\u0153:"oe",P\u0306:"P",p\u0306:"p",\u0154:"R",\u0155:"r",\u0156:"R",\u0157:"r",\u0158:"R",\u0159:"r",R\u0306:"R",r\u0306:"r",\u0212:"R",\u0213:"r",\u015A:"S",\u015B:"s",\u015C:"S",\u015D:"s",\u015E:"S",\u0218:"S",\u0219:"s",\u015F:"s",\u0160:"S",\u0161:"s",\u0162:"T",\u0163:"t",\u021B:"t",\u021A:"T",\u0164:"T",\u0165:"t",\u0166:"T",\u0167:"t",T\u0306:"T",t\u0306:"t",\u0168:"U",\u0169:"u",\u016A:"U",\u016B:"u",\u016C:"U",\u016D:"u",\u016E:"U",\u016F:"u",\u0170:"U",\u0171:"u",\u0172:"U",\u0173:"u",\u0216:"U",\u0217:"u",V\u0306:"V",v\u0306:"v",\u0174:"W",\u0175:"w",\u1E82:"W",\u1E83:"w",X\u0306:"X",x\u0306:"x",\u0176:"Y",\u0177:"y",\u0178:"Y",Y\u0306:"Y",y\u0306:"y",\u0179:"Z",\u017A:"z",\u017B:"Z",\u017C:"z",\u017D:"Z",\u017E:"z",\u017F:"s",\u0192:"f",\u01A0:"O",\u01A1:"o",\u01AF:"U",\u01B0:"u",\u01CD:"A",\u01CE:"a",\u01CF:"I",\u01D0:"i",\u01D1:"O",\u01D2:"o",\u01D3:"U",\u01D4:"u",\u01D5:"U",\u01D6:"u",\u01D7:"U",\u01D8:"u",\u01D9:"U",\u01DA:"u",\u01DB:"U",\u01DC:"u",\u1EE8:"U",\u1EE9:"u",\u1E78:"U",\u1E79:"u",\u01FA:"A",\u01FB:"a",\u01FC:"AE",\u01FD:"ae",\u01FE:"O",\u01FF:"o",\u00DE:"TH",\u00FE:"th",\u1E54:"P",\u1E55:"p",\u1E64:"S",\u1E65:"s",X\u0301:"X",x\u0301:"x",\u0403:"\u0413",\u0453:"\u0433",\u040C:"\u041A",\u045C:"\u043A",A\u030B:"A",a\u030B:"a",E\u030B:"E",e\u030B:"e",I\u030B:"I",i\u030B:"i",\u01F8:"N",\u01F9:"n",\u1ED2:"O",\u1ED3:"o",\u1E50:"O",\u1E51:"o",\u1EEA:"U",\u1EEB:"u",\u1E80:"W",\u1E81:"w",\u1EF2:"Y",\u1EF3:"y",\u0200:"A",\u0201:"a",\u0204:"E",\u0205:"e",\u0208:"I",\u0209:"i",\u020C:"O",\u020D:"o",\u0210:"R",\u0211:"r",\u0214:"U",\u0215:"u",B\u030C:"B",b\u030C:"b",\u010C\u0323:"C",\u010D\u0323:"c",\u00CA\u030C:"E",\u00EA\u030C:"e",F\u030C:"F",f\u030C:"f",\u01E6:"G",\u01E7:"g",\u021E:"H",\u021F:"h",J\u030C:"J",\u01F0:"j",\u01E8:"K",\u01E9:"k",M\u030C:"M",m\u030C:"m",P\u030C:"P",p\u030C:"p",Q\u030C:"Q",q\u030C:"q",\u0158\u0329:"R",\u0159\u0329:"r",\u1E66:"S",\u1E67:"s",V\u030C:"V",v\u030C:"v",W\u030C:"W",w\u030C:"w",X\u030C:"X",x\u030C:"x",Y\u030C:"Y",y\u030C:"y",A\u0327:"A",a\u0327:"a",B\u0327:"B",b\u0327:"b",\u1E10:"D",\u1E11:"d",\u0228:"E",\u0229:"e",\u0190\u0327:"E",\u025B\u0327:"e",\u1E28:"H",\u1E29:"h",I\u0327:"I",i\u0327:"i",\u0197\u0327:"I",\u0268\u0327:"i",M\u0327:"M",m\u0327:"m",O\u0327:"O",o\u0327:"o",Q\u0327:"Q",q\u0327:"q",U\u0327:"U",u\u0327:"u",X\u0327:"X",x\u0327:"x",Z\u0327:"Z",z\u0327:"z",\u0439:"\u0438",\u0419:"\u0418",\u0451:"\u0435",\u0401:"\u0415"},D=Object.keys(z).join("|"),ie=new RegExp(D,"g"),ae=new RegExp(D,"");function se(e){return z[e]}var H=function(e){return e.replace(ie,se)},ce=function(e){return!!e.match(ae)};U.exports=H;U.exports.has=ce;U.exports.remove=H});var pe={};Z(pe,{addQueryArgs:()=>w,buildQueryString:()=>u,cleanForSlug:()=>X,filterURLForDisplay:()=>$,getAuthority:()=>P,getFilename:()=>q,getFragment:()=>A,getPath:()=>d,getPathAndQueryString:()=>b,getProtocol:()=>R,getQueryArg:()=>h,getQueryArgs:()=>s,getQueryString:()=>p,hasQueryArg:()=>N,isEmail:()=>g,isPhoneNumber:()=>I,isURL:()=>O,isValidAuthority:()=>Q,isValidFragment:()=>T,isValidPath:()=>v,isValidProtocol:()=>S,isValidQueryString:()=>C,normalizePath:()=>_,prependHTTP:()=>x,prependHTTPS:()=>G,removeQueryArgs:()=>F,safeDecodeURI:()=>V,safeDecodeURIComponent:()=>y});function O(e){try{return new URL(e),!0}catch{return!1}}var te=/^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i;function g(e){return te.test(e)}var re=/^(tel:)?(\+)?\d{6,15}$/;function I(e){return e=e.replace(/[-.() ]/g,""),re.test(e)}function R(e){let t=/^([^\s:]+:)/.exec(e);if(t)return t[1]}function S(e){return e?/^[a-z\-.\+]+[0-9]*:$/i.test(e):!1}function P(e){let t=/^[^\/\s:]+:(?:\/\/)?\/?([^\/\s#?]+)[\/#?]{0,1}\S*$/.exec(e);if(t)return t[1]}function Q(e){return e?/^[^\s#?]+$/.test(e):!1}function d(e){let t=/^[^\/\s:]+:(?:\/\/)?[^\/\s#?]+[\/]([^\s#?]+)[#?]{0,1}\S*$/.exec(e);if(t)return t[1]}function v(e){return e?/^[^\s#?]+$/.test(e):!1}function p(e){let t;try{t=new URL(e,"http://example.com").search.substring(1)}catch{}if(t)return t}function u(e){let t="",r=Object.entries(e),n;for(;n=r.shift();){let[o,i]=n;if(Array.isArray(i)||i&&i.constructor===Object){let c=Object.entries(i).reverse();for(let[m,f]of c)r.unshift([`${o}[${m}]`,f])}else i!==void 0&&(i===null&&(i=""),t+="&"+[o,String(i)].map(encodeURIComponent).join("="))}return t.substr(1)}function C(e){return e?/^[^\s#?\/]+$/.test(e):!1}function b(e){let t=d(e),r=p(e),n="/";return t&&(n+=t),r&&(n+=`?${r}`),n}function A(e){let t=/^\S+?(#[^\s\?]*)/.exec(e);if(t)return t[1]}function T(e){return e?/^#[^\s#?\/]*$/.test(e):!1}function y(e){try{return decodeURIComponent(e)}catch{return e}}function oe(e,t,r){let n=t.length,o=n-1;for(let i=0;i<n;i++){let a=t[i];!a&&Array.isArray(e)&&(a=e.length.toString()),a=["__proto__","constructor","prototype"].includes(a)?a.toUpperCase():a;let c=!isNaN(Number(t[i+1]));e[a]=i===o?r:e[a]||(c?[]:{}),Array.isArray(e[a])&&!c&&(e[a]={...e[a]}),e=e[a]}}function s(e){return(p(e)||"").replace(/\+/g,"%20").split("&").reduce((t,r)=>{let[n,o=""]=r.split("=").filter(Boolean).map(y);if(n){let i=n.replace(/\]/g,"").split("[");oe(t,i,o)}return t},Object.create(null))}function w(e="",t){if(!t||!Object.keys(t).length)return e;let r=A(e)||"",n=e.replace(r,""),o=e.indexOf("?");return o!==-1&&(t=Object.assign(s(e),t),n=n.substr(0,o)),n+"?"+u(t)+r}function h(e,t){return s(e)[t]}function N(e,t){return h(e,t)!==void 0}function F(e,...t){let r=e.replace(/^[^#]*/,"");e=e.replace(/#.*/,"");let n=e.indexOf("?");if(n===-1)return e+r;let o=s(e),i=e.substr(0,n);t.forEach(m=>delete o[m]);let a=u(o);return(a?i+"?"+a:i)+r}var ne=/^(?:[a-z]+:|#|\?|\.|\/)/i;function x(e){return e&&(e=e.trim(),!ne.test(e)&&!g(e)?"http://"+e:e)}function V(e){try{return decodeURI(e)}catch{return e}}function $(e,t=null){if(!e)return"";let r=e.replace(/^[a-z\-.\+]+[0-9]*:(\/\/)?/i,"").replace(/^www\./i,"");r.match(/^[^\/]+\/$/)&&(r=r.replace("/",""));let n=/\/([^\/?]+)\.(?:[\w]+)(?=\?|$)/;if(!t||r.length<=t||!r.match(n))return r;r=r.split("?")[0];let o=r.split("/"),i=o[o.length-1];if(i.length<=t)return"\u2026"+r.slice(-t);let a=i.lastIndexOf("."),[c,m]=[i.slice(0,a),i.slice(a+1)],f=c.slice(-3)+"."+m;return i.slice(0,t-f.length-1)+"\u2026"+f}var k=J(L(),1);function X(e){return e?(0,k.default)(e).replace(/(&nbsp;|&ndash;|&mdash;)/g,"-").replace(/[\s\./]+/g,"-").replace(/&\S+?;/g,"").replace(/[^\p{L}\p{N}_-]+/gu,"").toLowerCase().replace(/-+/g,"-").replace(/(^-+)|(-+$)/g,""):""}function q(e){let t;if(e){try{t=new URL(e,"http://example.com").pathname.split("/").pop()}catch{}if(t)return t}}function _(e){let t=e.split("?"),r=t[1],n=t[0];return r?n+"?"+r.split("&").map(o=>o.split("=")).map(o=>o.map(decodeURIComponent)).sort((o,i)=>o[0].localeCompare(i[0])).map(o=>o.map(encodeURIComponent)).map(o=>o.join("=")).join("&"):n}function G(e){return!e||e.startsWith("http://")?e:(e=x(e),e.replace(/^http:/,"https:"))}return ee(pe);})();
                                                                                                                                                                                                                                                                                                                                                                                                                                 dist/vendor/lodash.js                                                                               0000644                 00002052231 15212564032 0010621 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */
;(function() {

  /** Used as a safe reference for `undefined` in pre-ES5 environments. */
  var undefined;

  /** Used as the semantic version number. */
  var VERSION = '4.18.1';

  /** Used as the size to enable large array optimizations. */
  var LARGE_ARRAY_SIZE = 200;

  /** Error message constants. */
  var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
      FUNC_ERROR_TEXT = 'Expected a function',
      INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`',
      INVALID_TEMPL_IMPORTS_ERROR_TEXT = 'Invalid `imports` option passed into `_.template`';

  /** Used to stand-in for `undefined` hash values. */
  var HASH_UNDEFINED = '__lodash_hash_undefined__';

  /** Used as the maximum memoize cache size. */
  var MAX_MEMOIZE_SIZE = 500;

  /** Used as the internal argument placeholder. */
  var PLACEHOLDER = '__lodash_placeholder__';

  /** Used to compose bitmasks for cloning. */
  var CLONE_DEEP_FLAG = 1,
      CLONE_FLAT_FLAG = 2,
      CLONE_SYMBOLS_FLAG = 4;

  /** Used to compose bitmasks for value comparisons. */
  var COMPARE_PARTIAL_FLAG = 1,
      COMPARE_UNORDERED_FLAG = 2;

  /** Used to compose bitmasks for function metadata. */
  var WRAP_BIND_FLAG = 1,
      WRAP_BIND_KEY_FLAG = 2,
      WRAP_CURRY_BOUND_FLAG = 4,
      WRAP_CURRY_FLAG = 8,
      WRAP_CURRY_RIGHT_FLAG = 16,
      WRAP_PARTIAL_FLAG = 32,
      WRAP_PARTIAL_RIGHT_FLAG = 64,
      WRAP_ARY_FLAG = 128,
      WRAP_REARG_FLAG = 256,
      WRAP_FLIP_FLAG = 512;

  /** Used as default options for `_.truncate`. */
  var DEFAULT_TRUNC_LENGTH = 30,
      DEFAULT_TRUNC_OMISSION = '...';

  /** Used to detect hot functions by number of calls within a span of milliseconds. */
  var HOT_COUNT = 800,
      HOT_SPAN = 16;

  /** Used to indicate the type of lazy iteratees. */
  var LAZY_FILTER_FLAG = 1,
      LAZY_MAP_FLAG = 2,
      LAZY_WHILE_FLAG = 3;

  /** Used as references for various `Number` constants. */
  var INFINITY = 1 / 0,
      MAX_SAFE_INTEGER = 9007199254740991,
      MAX_INTEGER = 1.7976931348623157e+308,
      NAN = 0 / 0;

  /** Used as references for the maximum length and index of an array. */
  var MAX_ARRAY_LENGTH = 4294967295,
      MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
      HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;

  /** Used to associate wrap methods with their bit flags. */
  var wrapFlags = [
    ['ary', WRAP_ARY_FLAG],
    ['bind', WRAP_BIND_FLAG],
    ['bindKey', WRAP_BIND_KEY_FLAG],
    ['curry', WRAP_CURRY_FLAG],
    ['curryRight', WRAP_CURRY_RIGHT_FLAG],
    ['flip', WRAP_FLIP_FLAG],
    ['partial', WRAP_PARTIAL_FLAG],
    ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
    ['rearg', WRAP_REARG_FLAG]
  ];

  /** `Object#toString` result references. */
  var argsTag = '[object Arguments]',
      arrayTag = '[object Array]',
      asyncTag = '[object AsyncFunction]',
      boolTag = '[object Boolean]',
      dateTag = '[object Date]',
      domExcTag = '[object DOMException]',
      errorTag = '[object Error]',
      funcTag = '[object Function]',
      genTag = '[object GeneratorFunction]',
      mapTag = '[object Map]',
      numberTag = '[object Number]',
      nullTag = '[object Null]',
      objectTag = '[object Object]',
      promiseTag = '[object Promise]',
      proxyTag = '[object Proxy]',
      regexpTag = '[object RegExp]',
      setTag = '[object Set]',
      stringTag = '[object String]',
      symbolTag = '[object Symbol]',
      undefinedTag = '[object Undefined]',
      weakMapTag = '[object WeakMap]',
      weakSetTag = '[object WeakSet]';

  var arrayBufferTag = '[object ArrayBuffer]',
      dataViewTag = '[object DataView]',
      float32Tag = '[object Float32Array]',
      float64Tag = '[object Float64Array]',
      int8Tag = '[object Int8Array]',
      int16Tag = '[object Int16Array]',
      int32Tag = '[object Int32Array]',
      uint8Tag = '[object Uint8Array]',
      uint8ClampedTag = '[object Uint8ClampedArray]',
      uint16Tag = '[object Uint16Array]',
      uint32Tag = '[object Uint32Array]';

  /** Used to match empty string literals in compiled template source. */
  var reEmptyStringLeading = /\b__p \+= '';/g,
      reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
      reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;

  /** Used to match HTML entities and HTML characters. */
  var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
      reUnescapedHtml = /[&<>"']/g,
      reHasEscapedHtml = RegExp(reEscapedHtml.source),
      reHasUnescapedHtml = RegExp(reUnescapedHtml.source);

  /** Used to match template delimiters. */
  var reEscape = /<%-([\s\S]+?)%>/g,
      reEvaluate = /<%([\s\S]+?)%>/g,
      reInterpolate = /<%=([\s\S]+?)%>/g;

  /** Used to match property names within property paths. */
  var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
      reIsPlainProp = /^\w*$/,
      rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;

  /**
   * Used to match `RegExp`
   * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
   */
  var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
      reHasRegExpChar = RegExp(reRegExpChar.source);

  /** Used to match leading whitespace. */
  var reTrimStart = /^\s+/;

  /** Used to match a single whitespace character. */
  var reWhitespace = /\s/;

  /** Used to match wrap detail comments. */
  var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
      reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
      reSplitDetails = /,? & /;

  /** Used to match words composed of alphanumeric characters. */
  var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;

  /**
   * Used to validate the `validate` option in `_.template` variable.
   *
   * Forbids characters which could potentially change the meaning of the function argument definition:
   * - "()," (modification of function parameters)
   * - "=" (default value)
   * - "[]{}" (destructuring of function parameters)
   * - "/" (beginning of a comment)
   * - whitespace
   */
  var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;

  /** Used to match backslashes in property paths. */
  var reEscapeChar = /\\(\\)?/g;

  /**
   * Used to match
   * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
   */
  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;

  /** Used to match `RegExp` flags from their coerced string values. */
  var reFlags = /\w*$/;

  /** Used to detect bad signed hexadecimal string values. */
  var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;

  /** Used to detect binary string values. */
  var reIsBinary = /^0b[01]+$/i;

  /** Used to detect host constructors (Safari). */
  var reIsHostCtor = /^\[object .+?Constructor\]$/;

  /** Used to detect octal string values. */
  var reIsOctal = /^0o[0-7]+$/i;

  /** Used to detect unsigned integer values. */
  var reIsUint = /^(?:0|[1-9]\d*)$/;

  /** Used to match Latin Unicode letters (excluding mathematical operators). */
  var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;

  /** Used to ensure capturing order of template delimiters. */
  var reNoMatch = /($^)/;

  /** Used to match unescaped characters in compiled string literals. */
  var reUnescapedString = /['\n\r\u2028\u2029\\]/g;

  /** Used to compose unicode character classes. */
  var rsAstralRange = '\\ud800-\\udfff',
      rsComboMarksRange = '\\u0300-\\u036f',
      reComboHalfMarksRange = '\\ufe20-\\ufe2f',
      rsComboSymbolsRange = '\\u20d0-\\u20ff',
      rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
      rsDingbatRange = '\\u2700-\\u27bf',
      rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
      rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
      rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
      rsPunctuationRange = '\\u2000-\\u206f',
      rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
      rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
      rsVarRange = '\\ufe0e\\ufe0f',
      rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;

  /** Used to compose unicode capture groups. */
  var rsApos = "['\u2019]",
      rsAstral = '[' + rsAstralRange + ']',
      rsBreak = '[' + rsBreakRange + ']',
      rsCombo = '[' + rsComboRange + ']',
      rsDigits = '\\d+',
      rsDingbat = '[' + rsDingbatRange + ']',
      rsLower = '[' + rsLowerRange + ']',
      rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
      rsFitz = '\\ud83c[\\udffb-\\udfff]',
      rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
      rsNonAstral = '[^' + rsAstralRange + ']',
      rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
      rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
      rsUpper = '[' + rsUpperRange + ']',
      rsZWJ = '\\u200d';

  /** Used to compose unicode regexes. */
  var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
      rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
      rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
      rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
      reOptMod = rsModifier + '?',
      rsOptVar = '[' + rsVarRange + ']?',
      rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
      rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
      rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
      rsSeq = rsOptVar + reOptMod + rsOptJoin,
      rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
      rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';

  /** Used to match apostrophes. */
  var reApos = RegExp(rsApos, 'g');

  /**
   * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
   * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
   */
  var reComboMark = RegExp(rsCombo, 'g');

  /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
  var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');

  /** Used to match complex or compound words. */
  var reUnicodeWord = RegExp([
    rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
    rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
    rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
    rsUpper + '+' + rsOptContrUpper,
    rsOrdUpper,
    rsOrdLower,
    rsDigits,
    rsEmoji
  ].join('|'), 'g');

  /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
  var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');

  /** Used to detect strings that need a more robust regexp to match words. */
  var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;

  /** Used to assign default `context` object properties. */
  var contextProps = [
    'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
    'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
    'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
    'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
    '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
  ];

  /** Used to make template sourceURLs easier to identify. */
  var templateCounter = -1;

  /** Used to identify `toStringTag` values of typed arrays. */
  var typedArrayTags = {};
  typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
  typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
  typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
  typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
  typedArrayTags[uint32Tag] = true;
  typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
  typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
  typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
  typedArrayTags[errorTag] = typedArrayTags[funcTag] =
  typedArrayTags[mapTag] = typedArrayTags[numberTag] =
  typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
  typedArrayTags[setTag] = typedArrayTags[stringTag] =
  typedArrayTags[weakMapTag] = false;

  /** Used to identify `toStringTag` values supported by `_.clone`. */
  var cloneableTags = {};
  cloneableTags[argsTag] = cloneableTags[arrayTag] =
  cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
  cloneableTags[boolTag] = cloneableTags[dateTag] =
  cloneableTags[float32Tag] = cloneableTags[float64Tag] =
  cloneableTags[int8Tag] = cloneableTags[int16Tag] =
  cloneableTags[int32Tag] = cloneableTags[mapTag] =
  cloneableTags[numberTag] = cloneableTags[objectTag] =
  cloneableTags[regexpTag] = cloneableTags[setTag] =
  cloneableTags[stringTag] = cloneableTags[symbolTag] =
  cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
  cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  cloneableTags[errorTag] = cloneableTags[funcTag] =
  cloneableTags[weakMapTag] = false;

  /** Used to map Latin Unicode letters to basic Latin letters. */
  var deburredLetters = {
    // Latin-1 Supplement block.
    '\xc0': 'A',  '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
    '\xe0': 'a',  '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
    '\xc7': 'C',  '\xe7': 'c',
    '\xd0': 'D',  '\xf0': 'd',
    '\xc8': 'E',  '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
    '\xe8': 'e',  '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
    '\xcc': 'I',  '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
    '\xec': 'i',  '\xed': 'i', '\xee': 'i', '\xef': 'i',
    '\xd1': 'N',  '\xf1': 'n',
    '\xd2': 'O',  '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
    '\xf2': 'o',  '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
    '\xd9': 'U',  '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
    '\xf9': 'u',  '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
    '\xdd': 'Y',  '\xfd': 'y', '\xff': 'y',
    '\xc6': 'Ae', '\xe6': 'ae',
    '\xde': 'Th', '\xfe': 'th',
    '\xdf': 'ss',
    // Latin Extended-A block.
    '\u0100': 'A',  '\u0102': 'A', '\u0104': 'A',
    '\u0101': 'a',  '\u0103': 'a', '\u0105': 'a',
    '\u0106': 'C',  '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
    '\u0107': 'c',  '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
    '\u010e': 'D',  '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
    '\u0112': 'E',  '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
    '\u0113': 'e',  '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
    '\u011c': 'G',  '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
    '\u011d': 'g',  '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
    '\u0124': 'H',  '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
    '\u0128': 'I',  '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
    '\u0129': 'i',  '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
    '\u0134': 'J',  '\u0135': 'j',
    '\u0136': 'K',  '\u0137': 'k', '\u0138': 'k',
    '\u0139': 'L',  '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
    '\u013a': 'l',  '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
    '\u0143': 'N',  '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
    '\u0144': 'n',  '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
    '\u014c': 'O',  '\u014e': 'O', '\u0150': 'O',
    '\u014d': 'o',  '\u014f': 'o', '\u0151': 'o',
    '\u0154': 'R',  '\u0156': 'R', '\u0158': 'R',
    '\u0155': 'r',  '\u0157': 'r', '\u0159': 'r',
    '\u015a': 'S',  '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
    '\u015b': 's',  '\u015d': 's', '\u015f': 's', '\u0161': 's',
    '\u0162': 'T',  '\u0164': 'T', '\u0166': 'T',
    '\u0163': 't',  '\u0165': 't', '\u0167': 't',
    '\u0168': 'U',  '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
    '\u0169': 'u',  '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
    '\u0174': 'W',  '\u0175': 'w',
    '\u0176': 'Y',  '\u0177': 'y', '\u0178': 'Y',
    '\u0179': 'Z',  '\u017b': 'Z', '\u017d': 'Z',
    '\u017a': 'z',  '\u017c': 'z', '\u017e': 'z',
    '\u0132': 'IJ', '\u0133': 'ij',
    '\u0152': 'Oe', '\u0153': 'oe',
    '\u0149': "'n", '\u017f': 's'
  };

  /** Used to map characters to HTML entities. */
  var htmlEscapes = {
    '&': '&amp;',
    '<': '&lt;',
    '>': '&gt;',
    '"': '&quot;',
    "'": '&#39;'
  };

  /** Used to map HTML entities to characters. */
  var htmlUnescapes = {
    '&amp;': '&',
    '&lt;': '<',
    '&gt;': '>',
    '&quot;': '"',
    '&#39;': "'"
  };

  /** Used to escape characters for inclusion in compiled string literals. */
  var stringEscapes = {
    '\\': '\\',
    "'": "'",
    '\n': 'n',
    '\r': 'r',
    '\u2028': 'u2028',
    '\u2029': 'u2029'
  };

  /** Built-in method references without a dependency on `root`. */
  var freeParseFloat = parseFloat,
      freeParseInt = parseInt;

  /** Detect free variable `global` from Node.js. */
  var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;

  /** Detect free variable `self`. */
  var freeSelf = typeof self == 'object' && self && self.Object === Object && self;

  /** Used as a reference to the global object. */
  var root = freeGlobal || freeSelf || Function('return this')();

  /** Detect free variable `exports`. */
  var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;

  /** Detect free variable `module`. */
  var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;

  /** Detect the popular CommonJS extension `module.exports`. */
  var moduleExports = freeModule && freeModule.exports === freeExports;

  /** Detect free variable `process` from Node.js. */
  var freeProcess = moduleExports && freeGlobal.process;

  /** Used to access faster Node.js helpers. */
  var nodeUtil = (function() {
    try {
      // Use `util.types` for Node.js 10+.
      var types = freeModule && freeModule.require && freeModule.require('util').types;

      if (types) {
        return types;
      }

      // Legacy `process.binding('util')` for Node.js < 10.
      return freeProcess && freeProcess.binding && freeProcess.binding('util');
    } catch (e) {}
  }());

  /* Node.js helper references. */
  var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
      nodeIsDate = nodeUtil && nodeUtil.isDate,
      nodeIsMap = nodeUtil && nodeUtil.isMap,
      nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
      nodeIsSet = nodeUtil && nodeUtil.isSet,
      nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;

  /*--------------------------------------------------------------------------*/

  /**
   * A faster alternative to `Function#apply`, this function invokes `func`
   * with the `this` binding of `thisArg` and the arguments of `args`.
   *
   * @private
   * @param {Function} func The function to invoke.
   * @param {*} thisArg The `this` binding of `func`.
   * @param {Array} args The arguments to invoke `func` with.
   * @returns {*} Returns the result of `func`.
   */
  function apply(func, thisArg, args) {
    switch (args.length) {
      case 0: return func.call(thisArg);
      case 1: return func.call(thisArg, args[0]);
      case 2: return func.call(thisArg, args[0], args[1]);
      case 3: return func.call(thisArg, args[0], args[1], args[2]);
    }
    return func.apply(thisArg, args);
  }

  /**
   * A specialized version of `baseAggregator` for arrays.
   *
   * @private
   * @param {Array} [array] The array to iterate over.
   * @param {Function} setter The function to set `accumulator` values.
   * @param {Function} iteratee The iteratee to transform keys.
   * @param {Object} accumulator The initial aggregated object.
   * @returns {Function} Returns `accumulator`.
   */
  function arrayAggregator(array, setter, iteratee, accumulator) {
    var index = -1,
        length = array == null ? 0 : array.length;

    while (++index < length) {
      var value = array[index];
      setter(accumulator, value, iteratee(value), array);
    }
    return accumulator;
  }

  /**
   * A specialized version of `_.forEach` for arrays without support for
   * iteratee shorthands.
   *
   * @private
   * @param {Array} [array] The array to iterate over.
   * @param {Function} iteratee The function invoked per iteration.
   * @returns {Array} Returns `array`.
   */
  function arrayEach(array, iteratee) {
    var index = -1,
        length = array == null ? 0 : array.length;

    while (++index < length) {
      if (iteratee(array[index], index, array) === false) {
        break;
      }
    }
    return array;
  }

  /**
   * A specialized version of `_.forEachRight` for arrays without support for
   * iteratee shorthands.
   *
   * @private
   * @param {Array} [array] The array to iterate over.
   * @param {Function} iteratee The function invoked per iteration.
   * @returns {Array} Returns `array`.
   */
  function arrayEachRight(array, iteratee) {
    var length = array == null ? 0 : array.length;

    while (length--) {
      if (iteratee(array[length], length, array) === false) {
        break;
      }
    }
    return array;
  }

  /**
   * A specialized version of `_.every` for arrays without support for
   * iteratee shorthands.
   *
   * @private
   * @param {Array} [array] The array to iterate over.
   * @param {Function} predicate The function invoked per iteration.
   * @returns {boolean} Returns `true` if all elements pass the predicate check,
   *  else `false`.
   */
  function arrayEvery(array, predicate) {
    var index = -1,
        length = array == null ? 0 : array.length;

    while (++index < length) {
      if (!predicate(array[index], index, array)) {
        return false;
      }
    }
    return true;
  }

  /**
   * A specialized version of `_.filter` for arrays without support for
   * iteratee shorthands.
   *
   * @private
   * @param {Array} [array] The array to iterate over.
   * @param {Function} predicate The function invoked per iteration.
   * @returns {Array} Returns the new filtered array.
   */
  function arrayFilter(array, predicate) {
    var index = -1,
        length = array == null ? 0 : array.length,
        resIndex = 0,
        result = [];

    while (++index < length) {
      var value = array[index];
      if (predicate(value, index, array)) {
        result[resIndex++] = value;
      }
    }
    return result;
  }

  /**
   * A specialized version of `_.includes` for arrays without support for
   * specifying an index to search from.
   *
   * @private
   * @param {Array} [array] The array to inspect.
   * @param {*} target The value to search for.
   * @returns {boolean} Returns `true` if `target` is found, else `false`.
   */
  function arrayIncludes(array, value) {
    var length = array == null ? 0 : array.length;
    return !!length && baseIndexOf(array, value, 0) > -1;
  }

  /**
   * This function is like `arrayIncludes` except that it accepts a comparator.
   *
   * @private
   * @param {Array} [array] The array to inspect.
   * @param {*} target The value to search for.
   * @param {Function} comparator The comparator invoked per element.
   * @returns {boolean} Returns `true` if `target` is found, else `false`.
   */
  function arrayIncludesWith(array, value, comparator) {
    var index = -1,
        length = array == null ? 0 : array.length;

    while (++index < length) {
      if (comparator(value, array[index])) {
        return true;
      }
    }
    return false;
  }

  /**
   * A specialized version of `_.map` for arrays without support for iteratee
   * shorthands.
   *
   * @private
   * @param {Array} [array] The array to iterate over.
   * @param {Function} iteratee The function invoked per iteration.
   * @returns {Array} Returns the new mapped array.
   */
  function arrayMap(array, iteratee) {
    var index = -1,
        length = array == null ? 0 : array.length,
        result = Array(length);

    while (++index < length) {
      result[index] = iteratee(array[index], index, array);
    }
    return result;
  }

  /**
   * Appends the elements of `values` to `array`.
   *
   * @private
   * @param {Array} array The array to modify.
   * @param {Array} values The values to append.
   * @returns {Array} Returns `array`.
   */
  function arrayPush(array, values) {
    var index = -1,
        length = values.length,
        offset = array.length;

    while (++index < length) {
      array[offset + index] = values[index];
    }
    return array;
  }

  /**
   * A specialized version of `_.reduce` for arrays without support for
   * iteratee shorthands.
   *
   * @private
   * @param {Array} [array] The array to iterate over.
   * @param {Function} iteratee The function invoked per iteration.
   * @param {*} [accumulator] The initial value.
   * @param {boolean} [initAccum] Specify using the first element of `array` as
   *  the initial value.
   * @returns {*} Returns the accumulated value.
   */
  function arrayReduce(array, iteratee, accumulator, initAccum) {
    var index = -1,
        length = array == null ? 0 : array.length;

    if (initAccum && length) {
      accumulator = array[++index];
    }
    while (++index < length) {
      accumulator = iteratee(accumulator, array[index], index, array);
    }
    return accumulator;
  }

  /**
   * A specialized version of `_.reduceRight` for arrays without support for
   * iteratee shorthands.
   *
   * @private
   * @param {Array} [array] The array to iterate over.
   * @param {Function} iteratee The function invoked per iteration.
   * @param {*} [accumulator] The initial value.
   * @param {boolean} [initAccum] Specify using the last element of `array` as
   *  the initial value.
   * @returns {*} Returns the accumulated value.
   */
  function arrayReduceRight(array, iteratee, accumulator, initAccum) {
    var length = array == null ? 0 : array.length;
    if (initAccum && length) {
      accumulator = array[--length];
    }
    while (length--) {
      accumulator = iteratee(accumulator, array[length], length, array);
    }
    return accumulator;
  }

  /**
   * A specialized version of `_.some` for arrays without support for iteratee
   * shorthands.
   *
   * @private
   * @param {Array} [array] The array to iterate over.
   * @param {Function} predicate The function invoked per iteration.
   * @returns {boolean} Returns `true` if any element passes the predicate check,
   *  else `false`.
   */
  function arraySome(array, predicate) {
    var index = -1,
        length = array == null ? 0 : array.length;

    while (++index < length) {
      if (predicate(array[index], index, array)) {
        return true;
      }
    }
    return false;
  }

  /**
   * Gets the size of an ASCII `string`.
   *
   * @private
   * @param {string} string The string inspect.
   * @returns {number} Returns the string size.
   */
  var asciiSize = baseProperty('length');

  /**
   * Converts an ASCII `string` to an array.
   *
   * @private
   * @param {string} string The string to convert.
   * @returns {Array} Returns the converted array.
   */
  function asciiToArray(string) {
    return string.split('');
  }

  /**
   * Splits an ASCII `string` into an array of its words.
   *
   * @private
   * @param {string} The string to inspect.
   * @returns {Array} Returns the words of `string`.
   */
  function asciiWords(string) {
    return string.match(reAsciiWord) || [];
  }

  /**
   * The base implementation of methods like `_.findKey` and `_.findLastKey`,
   * without support for iteratee shorthands, which iterates over `collection`
   * using `eachFunc`.
   *
   * @private
   * @param {Array|Object} collection The collection to inspect.
   * @param {Function} predicate The function invoked per iteration.
   * @param {Function} eachFunc The function to iterate over `collection`.
   * @returns {*} Returns the found element or its key, else `undefined`.
   */
  function baseFindKey(collection, predicate, eachFunc) {
    var result;
    eachFunc(collection, function(value, key, collection) {
      if (predicate(value, key, collection)) {
        result = key;
        return false;
      }
    });
    return result;
  }

  /**
   * The base implementation of `_.findIndex` and `_.findLastIndex` without
   * support for iteratee shorthands.
   *
   * @private
   * @param {Array} array The array to inspect.
   * @param {Function} predicate The function invoked per iteration.
   * @param {number} fromIndex The index to search from.
   * @param {boolean} [fromRight] Specify iterating from right to left.
   * @returns {number} Returns the index of the matched value, else `-1`.
   */
  function baseFindIndex(array, predicate, fromIndex, fromRight) {
    var length = array.length,
        index = fromIndex + (fromRight ? 1 : -1);

    while ((fromRight ? index-- : ++index < length)) {
      if (predicate(array[index], index, array)) {
        return index;
      }
    }
    return -1;
  }

  /**
   * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
   *
   * @private
   * @param {Array} array The array to inspect.
   * @param {*} value The value to search for.
   * @param {number} fromIndex The index to search from.
   * @returns {number} Returns the index of the matched value, else `-1`.
   */
  function baseIndexOf(array, value, fromIndex) {
    return value === value
      ? strictIndexOf(array, value, fromIndex)
      : baseFindIndex(array, baseIsNaN, fromIndex);
  }

  /**
   * This function is like `baseIndexOf` except that it accepts a comparator.
   *
   * @private
   * @param {Array} array The array to inspect.
   * @param {*} value The value to search for.
   * @param {number} fromIndex The index to search from.
   * @param {Function} comparator The comparator invoked per element.
   * @returns {number} Returns the index of the matched value, else `-1`.
   */
  function baseIndexOfWith(array, value, fromIndex, comparator) {
    var index = fromIndex - 1,
        length = array.length;

    while (++index < length) {
      if (comparator(array[index], value)) {
        return index;
      }
    }
    return -1;
  }

  /**
   * The base implementation of `_.isNaN` without support for number objects.
   *
   * @private
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
   */
  function baseIsNaN(value) {
    return value !== value;
  }

  /**
   * The base implementation of `_.mean` and `_.meanBy` without support for
   * iteratee shorthands.
   *
   * @private
   * @param {Array} array The array to iterate over.
   * @param {Function} iteratee The function invoked per iteration.
   * @returns {number} Returns the mean.
   */
  function baseMean(array, iteratee) {
    var length = array == null ? 0 : array.length;
    return length ? (baseSum(array, iteratee) / length) : NAN;
  }

  /**
   * The base implementation of `_.property` without support for deep paths.
   *
   * @private
   * @param {string} key The key of the property to get.
   * @returns {Function} Returns the new accessor function.
   */
  function baseProperty(key) {
    return function(object) {
      return object == null ? undefined : object[key];
    };
  }

  /**
   * The base implementation of `_.propertyOf` without support for deep paths.
   *
   * @private
   * @param {Object} object The object to query.
   * @returns {Function} Returns the new accessor function.
   */
  function basePropertyOf(object) {
    return function(key) {
      return object == null ? undefined : object[key];
    };
  }

  /**
   * The base implementation of `_.reduce` and `_.reduceRight`, without support
   * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
   *
   * @private
   * @param {Array|Object} collection The collection to iterate over.
   * @param {Function} iteratee The function invoked per iteration.
   * @param {*} accumulator The initial value.
   * @param {boolean} initAccum Specify using the first or last element of
   *  `collection` as the initial value.
   * @param {Function} eachFunc The function to iterate over `collection`.
   * @returns {*} Returns the accumulated value.
   */
  function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
    eachFunc(collection, function(value, index, collection) {
      accumulator = initAccum
        ? (initAccum = false, value)
        : iteratee(accumulator, value, index, collection);
    });
    return accumulator;
  }

  /**
   * The base implementation of `_.sortBy` which uses `comparer` to define the
   * sort order of `array` and replaces criteria objects with their corresponding
   * values.
   *
   * @private
   * @param {Array} array The array to sort.
   * @param {Function} comparer The function to define sort order.
   * @returns {Array} Returns `array`.
   */
  function baseSortBy(array, comparer) {
    var length = array.length;

    array.sort(comparer);
    while (length--) {
      array[length] = array[length].value;
    }
    return array;
  }

  /**
   * The base implementation of `_.sum` and `_.sumBy` without support for
   * iteratee shorthands.
   *
   * @private
   * @param {Array} array The array to iterate over.
   * @param {Function} iteratee The function invoked per iteration.
   * @returns {number} Returns the sum.
   */
  function baseSum(array, iteratee) {
    var result,
        index = -1,
        length = array.length;

    while (++index < length) {
      var current = iteratee(array[index]);
      if (current !== undefined) {
        result = result === undefined ? current : (result + current);
      }
    }
    return result;
  }

  /**
   * The base implementation of `_.times` without support for iteratee shorthands
   * or max array length checks.
   *
   * @private
   * @param {number} n The number of times to invoke `iteratee`.
   * @param {Function} iteratee The function invoked per iteration.
   * @returns {Array} Returns the array of results.
   */
  function baseTimes(n, iteratee) {
    var index = -1,
        result = Array(n);

    while (++index < n) {
      result[index] = iteratee(index);
    }
    return result;
  }

  /**
   * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
   * of key-value pairs for `object` corresponding to the property names of `props`.
   *
   * @private
   * @param {Object} object The object to query.
   * @param {Array} props The property names to get values for.
   * @returns {Object} Returns the key-value pairs.
   */
  function baseToPairs(object, props) {
    return arrayMap(props, function(key) {
      return [key, object[key]];
    });
  }

  /**
   * The base implementation of `_.trim`.
   *
   * @private
   * @param {string} string The string to trim.
   * @returns {string} Returns the trimmed string.
   */
  function baseTrim(string) {
    return string
      ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
      : string;
  }

  /**
   * The base implementation of `_.unary` without support for storing metadata.
   *
   * @private
   * @param {Function} func The function to cap arguments for.
   * @returns {Function} Returns the new capped function.
   */
  function baseUnary(func) {
    return function(value) {
      return func(value);
    };
  }

  /**
   * The base implementation of `_.values` and `_.valuesIn` which creates an
   * array of `object` property values corresponding to the property names
   * of `props`.
   *
   * @private
   * @param {Object} object The object to query.
   * @param {Array} props The property names to get values for.
   * @returns {Object} Returns the array of property values.
   */
  function baseValues(object, props) {
    return arrayMap(props, function(key) {
      return object[key];
    });
  }

  /**
   * Checks if a `cache` value for `key` exists.
   *
   * @private
   * @param {Object} cache The cache to query.
   * @param {string} key The key of the entry to check.
   * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
   */
  function cacheHas(cache, key) {
    return cache.has(key);
  }

  /**
   * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
   * that is not found in the character symbols.
   *
   * @private
   * @param {Array} strSymbols The string symbols to inspect.
   * @param {Array} chrSymbols The character symbols to find.
   * @returns {number} Returns the index of the first unmatched string symbol.
   */
  function charsStartIndex(strSymbols, chrSymbols) {
    var index = -1,
        length = strSymbols.length;

    while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
    return index;
  }

  /**
   * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
   * that is not found in the character symbols.
   *
   * @private
   * @param {Array} strSymbols The string symbols to inspect.
   * @param {Array} chrSymbols The character symbols to find.
   * @returns {number} Returns the index of the last unmatched string symbol.
   */
  function charsEndIndex(strSymbols, chrSymbols) {
    var index = strSymbols.length;

    while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
    return index;
  }

  /**
   * Gets the number of `placeholder` occurrences in `array`.
   *
   * @private
   * @param {Array} array The array to inspect.
   * @param {*} placeholder The placeholder to search for.
   * @returns {number} Returns the placeholder count.
   */
  function countHolders(array, placeholder) {
    var length = array.length,
        result = 0;

    while (length--) {
      if (array[length] === placeholder) {
        ++result;
      }
    }
    return result;
  }

  /**
   * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
   * letters to basic Latin letters.
   *
   * @private
   * @param {string} letter The matched letter to deburr.
   * @returns {string} Returns the deburred letter.
   */
  var deburrLetter = basePropertyOf(deburredLetters);

  /**
   * Used by `_.escape` to convert characters to HTML entities.
   *
   * @private
   * @param {string} chr The matched character to escape.
   * @returns {string} Returns the escaped character.
   */
  var escapeHtmlChar = basePropertyOf(htmlEscapes);

  /**
   * Used by `_.template` to escape characters for inclusion in compiled string literals.
   *
   * @private
   * @param {string} chr The matched character to escape.
   * @returns {string} Returns the escaped character.
   */
  function escapeStringChar(chr) {
    return '\\' + stringEscapes[chr];
  }

  /**
   * Gets the value at `key` of `object`.
   *
   * @private
   * @param {Object} [object] The object to query.
   * @param {string} key The key of the property to get.
   * @returns {*} Returns the property value.
   */
  function getValue(object, key) {
    return object == null ? undefined : object[key];
  }

  /**
   * Checks if `string` contains Unicode symbols.
   *
   * @private
   * @param {string} string The string to inspect.
   * @returns {boolean} Returns `true` if a symbol is found, else `false`.
   */
  function hasUnicode(string) {
    return reHasUnicode.test(string);
  }

  /**
   * Checks if `string` contains a word composed of Unicode symbols.
   *
   * @private
   * @param {string} string The string to inspect.
   * @returns {boolean} Returns `true` if a word is found, else `false`.
   */
  function hasUnicodeWord(string) {
    return reHasUnicodeWord.test(string);
  }

  /**
   * Converts `iterator` to an array.
   *
   * @private
   * @param {Object} iterator The iterator to convert.
   * @returns {Array} Returns the converted array.
   */
  function iteratorToArray(iterator) {
    var data,
        result = [];

    while (!(data = iterator.next()).done) {
      result.push(data.value);
    }
    return result;
  }

  /**
   * Converts `map` to its key-value pairs.
   *
   * @private
   * @param {Object} map The map to convert.
   * @returns {Array} Returns the key-value pairs.
   */
  function mapToArray(map) {
    var index = -1,
        result = Array(map.size);

    map.forEach(function(value, key) {
      result[++index] = [key, value];
    });
    return result;
  }

  /**
   * Creates a unary function that invokes `func` with its argument transformed.
   *
   * @private
   * @param {Function} func The function to wrap.
   * @param {Function} transform The argument transform.
   * @returns {Function} Returns the new function.
   */
  function overArg(func, transform) {
    return function(arg) {
      return func(transform(arg));
    };
  }

  /**
   * Replaces all `placeholder` elements in `array` with an internal placeholder
   * and returns an array of their indexes.
   *
   * @private
   * @param {Array} array The array to modify.
   * @param {*} placeholder The placeholder to replace.
   * @returns {Array} Returns the new array of placeholder indexes.
   */
  function replaceHolders(array, placeholder) {
    var index = -1,
        length = array.length,
        resIndex = 0,
        result = [];

    while (++index < length) {
      var value = array[index];
      if (value === placeholder || value === PLACEHOLDER) {
        array[index] = PLACEHOLDER;
        result[resIndex++] = index;
      }
    }
    return result;
  }

  /**
   * Converts `set` to an array of its values.
   *
   * @private
   * @param {Object} set The set to convert.
   * @returns {Array} Returns the values.
   */
  function setToArray(set) {
    var index = -1,
        result = Array(set.size);

    set.forEach(function(value) {
      result[++index] = value;
    });
    return result;
  }

  /**
   * Converts `set` to its value-value pairs.
   *
   * @private
   * @param {Object} set The set to convert.
   * @returns {Array} Returns the value-value pairs.
   */
  function setToPairs(set) {
    var index = -1,
        result = Array(set.size);

    set.forEach(function(value) {
      result[++index] = [value, value];
    });
    return result;
  }

  /**
   * A specialized version of `_.indexOf` which performs strict equality
   * comparisons of values, i.e. `===`.
   *
   * @private
   * @param {Array} array The array to inspect.
   * @param {*} value The value to search for.
   * @param {number} fromIndex The index to search from.
   * @returns {number} Returns the index of the matched value, else `-1`.
   */
  function strictIndexOf(array, value, fromIndex) {
    var index = fromIndex - 1,
        length = array.length;

    while (++index < length) {
      if (array[index] === value) {
        return index;
      }
    }
    return -1;
  }

  /**
   * A specialized version of `_.lastIndexOf` which performs strict equality
   * comparisons of values, i.e. `===`.
   *
   * @private
   * @param {Array} array The array to inspect.
   * @param {*} value The value to search for.
   * @param {number} fromIndex The index to search from.
   * @returns {number} Returns the index of the matched value, else `-1`.
   */
  function strictLastIndexOf(array, value, fromIndex) {
    var index = fromIndex + 1;
    while (index--) {
      if (array[index] === value) {
        return index;
      }
    }
    return index;
  }

  /**
   * Gets the number of symbols in `string`.
   *
   * @private
   * @param {string} string The string to inspect.
   * @returns {number} Returns the string size.
   */
  function stringSize(string) {
    return hasUnicode(string)
      ? unicodeSize(string)
      : asciiSize(string);
  }

  /**
   * Converts `string` to an array.
   *
   * @private
   * @param {string} string The string to convert.
   * @returns {Array} Returns the converted array.
   */
  function stringToArray(string) {
    return hasUnicode(string)
      ? unicodeToArray(string)
      : asciiToArray(string);
  }

  /**
   * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
   * character of `string`.
   *
   * @private
   * @param {string} string The string to inspect.
   * @returns {number} Returns the index of the last non-whitespace character.
   */
  function trimmedEndIndex(string) {
    var index = string.length;

    while (index-- && reWhitespace.test(string.charAt(index))) {}
    return index;
  }

  /**
   * Used by `_.unescape` to convert HTML entities to characters.
   *
   * @private
   * @param {string} chr The matched character to unescape.
   * @returns {string} Returns the unescaped character.
   */
  var unescapeHtmlChar = basePropertyOf(htmlUnescapes);

  /**
   * Gets the size of a Unicode `string`.
   *
   * @private
   * @param {string} string The string inspect.
   * @returns {number} Returns the string size.
   */
  function unicodeSize(string) {
    var result = reUnicode.lastIndex = 0;
    while (reUnicode.test(string)) {
      ++result;
    }
    return result;
  }

  /**
   * Converts a Unicode `string` to an array.
   *
   * @private
   * @param {string} string The string to convert.
   * @returns {Array} Returns the converted array.
   */
  function unicodeToArray(string) {
    return string.match(reUnicode) || [];
  }

  /**
   * Splits a Unicode `string` into an array of its words.
   *
   * @private
   * @param {string} The string to inspect.
   * @returns {Array} Returns the words of `string`.
   */
  function unicodeWords(string) {
    return string.match(reUnicodeWord) || [];
  }

  /*--------------------------------------------------------------------------*/

  /**
   * Create a new pristine `lodash` function using the `context` object.
   *
   * @static
   * @memberOf _
   * @since 1.1.0
   * @category Util
   * @param {Object} [context=root] The context object.
   * @returns {Function} Returns a new `lodash` function.
   * @example
   *
   * _.mixin({ 'foo': _.constant('foo') });
   *
   * var lodash = _.runInContext();
   * lodash.mixin({ 'bar': lodash.constant('bar') });
   *
   * _.isFunction(_.foo);
   * // => true
   * _.isFunction(_.bar);
   * // => false
   *
   * lodash.isFunction(lodash.foo);
   * // => false
   * lodash.isFunction(lodash.bar);
   * // => true
   *
   * // Create a suped-up `defer` in Node.js.
   * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
   */
  var runInContext = (function runInContext(context) {
    context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));

    /** Built-in constructor references. */
    var Array = context.Array,
        Date = context.Date,
        Error = context.Error,
        Function = context.Function,
        Math = context.Math,
        Object = context.Object,
        RegExp = context.RegExp,
        String = context.String,
        TypeError = context.TypeError;

    /** Used for built-in method references. */
    var arrayProto = Array.prototype,
        funcProto = Function.prototype,
        objectProto = Object.prototype;

    /** Used to detect overreaching core-js shims. */
    var coreJsData = context['__core-js_shared__'];

    /** Used to resolve the decompiled source of functions. */
    var funcToString = funcProto.toString;

    /** Used to check objects for own properties. */
    var hasOwnProperty = objectProto.hasOwnProperty;

    /** Used to generate unique IDs. */
    var idCounter = 0;

    /** Used to detect methods masquerading as native. */
    var maskSrcKey = (function() {
      var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
      return uid ? ('Symbol(src)_1.' + uid) : '';
    }());

    /**
     * Used to resolve the
     * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
     * of values.
     */
    var nativeObjectToString = objectProto.toString;

    /** Used to infer the `Object` constructor. */
    var objectCtorString = funcToString.call(Object);

    /** Used to restore the original `_` reference in `_.noConflict`. */
    var oldDash = root._;

    /** Used to detect if a method is native. */
    var reIsNative = RegExp('^' +
      funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
      .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
    );

    /** Built-in value references. */
    var Buffer = moduleExports ? context.Buffer : undefined,
        Symbol = context.Symbol,
        Uint8Array = context.Uint8Array,
        allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
        getPrototype = overArg(Object.getPrototypeOf, Object),
        objectCreate = Object.create,
        propertyIsEnumerable = objectProto.propertyIsEnumerable,
        splice = arrayProto.splice,
        spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
        symIterator = Symbol ? Symbol.iterator : undefined,
        symToStringTag = Symbol ? Symbol.toStringTag : undefined;

    var defineProperty = (function() {
      try {
        var func = getNative(Object, 'defineProperty');
        func({}, '', {});
        return func;
      } catch (e) {}
    }());

    /** Mocked built-ins. */
    var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
        ctxNow = Date && Date.now !== root.Date.now && Date.now,
        ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;

    /* Built-in method references for those with the same name as other `lodash` methods. */
    var nativeCeil = Math.ceil,
        nativeFloor = Math.floor,
        nativeGetSymbols = Object.getOwnPropertySymbols,
        nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
        nativeIsFinite = context.isFinite,
        nativeJoin = arrayProto.join,
        nativeKeys = overArg(Object.keys, Object),
        nativeMax = Math.max,
        nativeMin = Math.min,
        nativeNow = Date.now,
        nativeParseInt = context.parseInt,
        nativeRandom = Math.random,
        nativeReverse = arrayProto.reverse;

    /* Built-in method references that are verified to be native. */
    var DataView = getNative(context, 'DataView'),
        Map = getNative(context, 'Map'),
        Promise = getNative(context, 'Promise'),
        Set = getNative(context, 'Set'),
        WeakMap = getNative(context, 'WeakMap'),
        nativeCreate = getNative(Object, 'create');

    /** Used to store function metadata. */
    var metaMap = WeakMap && new WeakMap;

    /** Used to lookup unminified function names. */
    var realNames = {};

    /** Used to detect maps, sets, and weakmaps. */
    var dataViewCtorString = toSource(DataView),
        mapCtorString = toSource(Map),
        promiseCtorString = toSource(Promise),
        setCtorString = toSource(Set),
        weakMapCtorString = toSource(WeakMap);

    /** Used to convert symbols to primitives and strings. */
    var symbolProto = Symbol ? Symbol.prototype : undefined,
        symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
        symbolToString = symbolProto ? symbolProto.toString : undefined;

    /*------------------------------------------------------------------------*/

    /**
     * Creates a `lodash` object which wraps `value` to enable implicit method
     * chain sequences. Methods that operate on and return arrays, collections,
     * and functions can be chained together. Methods that retrieve a single value
     * or may return a primitive value will automatically end the chain sequence
     * and return the unwrapped value. Otherwise, the value must be unwrapped
     * with `_#value`.
     *
     * Explicit chain sequences, which must be unwrapped with `_#value`, may be
     * enabled using `_.chain`.
     *
     * The execution of chained methods is lazy, that is, it's deferred until
     * `_#value` is implicitly or explicitly called.
     *
     * Lazy evaluation allows several methods to support shortcut fusion.
     * Shortcut fusion is an optimization to merge iteratee calls; this avoids
     * the creation of intermediate arrays and can greatly reduce the number of
     * iteratee executions. Sections of a chain sequence qualify for shortcut
     * fusion if the section is applied to an array and iteratees accept only
     * one argument. The heuristic for whether a section qualifies for shortcut
     * fusion is subject to change.
     *
     * Chaining is supported in custom builds as long as the `_#value` method is
     * directly or indirectly included in the build.
     *
     * In addition to lodash methods, wrappers have `Array` and `String` methods.
     *
     * The wrapper `Array` methods are:
     * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
     *
     * The wrapper `String` methods are:
     * `replace` and `split`
     *
     * The wrapper methods that support shortcut fusion are:
     * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
     * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
     * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
     *
     * The chainable wrapper methods are:
     * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
     * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
     * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
     * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
     * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
     * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
     * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
     * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
     * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
     * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
     * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
     * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
     * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
     * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
     * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
     * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
     * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
     * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
     * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
     * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
     * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
     * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
     * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
     * `zipObject`, `zipObjectDeep`, and `zipWith`
     *
     * The wrapper methods that are **not** chainable by default are:
     * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
     * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
     * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
     * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
     * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
     * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
     * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
     * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
     * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
     * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
     * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
     * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
     * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
     * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
     * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
     * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
     * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
     * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
     * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
     * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
     * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
     * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
     * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
     * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
     * `upperFirst`, `value`, and `words`
     *
     * @name _
     * @constructor
     * @category Seq
     * @param {*} value The value to wrap in a `lodash` instance.
     * @returns {Object} Returns the new `lodash` wrapper instance.
     * @example
     *
     * function square(n) {
     *   return n * n;
     * }
     *
     * var wrapped = _([1, 2, 3]);
     *
     * // Returns an unwrapped value.
     * wrapped.reduce(_.add);
     * // => 6
     *
     * // Returns a wrapped value.
     * var squares = wrapped.map(square);
     *
     * _.isArray(squares);
     * // => false
     *
     * _.isArray(squares.value());
     * // => true
     */
    function lodash(value) {
      if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
        if (value instanceof LodashWrapper) {
          return value;
        }
        if (hasOwnProperty.call(value, '__wrapped__')) {
          return wrapperClone(value);
        }
      }
      return new LodashWrapper(value);
    }

    /**
     * The base implementation of `_.create` without support for assigning
     * properties to the created object.
     *
     * @private
     * @param {Object} proto The object to inherit from.
     * @returns {Object} Returns the new object.
     */
    var baseCreate = (function() {
      function object() {}
      return function(proto) {
        if (!isObject(proto)) {
          return {};
        }
        if (objectCreate) {
          return objectCreate(proto);
        }
        object.prototype = proto;
        var result = new object;
        object.prototype = undefined;
        return result;
      };
    }());

    /**
     * The function whose prototype chain sequence wrappers inherit from.
     *
     * @private
     */
    function baseLodash() {
      // No operation performed.
    }

    /**
     * The base constructor for creating `lodash` wrapper objects.
     *
     * @private
     * @param {*} value The value to wrap.
     * @param {boolean} [chainAll] Enable explicit method chain sequences.
     */
    function LodashWrapper(value, chainAll) {
      this.__wrapped__ = value;
      this.__actions__ = [];
      this.__chain__ = !!chainAll;
      this.__index__ = 0;
      this.__values__ = undefined;
    }

    /**
     * By default, the template delimiters used by lodash are like those in
     * embedded Ruby (ERB) as well as ES2015 template strings. Change the
     * following template settings to use alternative delimiters.
     *
     * **Security:** See
     * [threat model](https://github.com/lodash/lodash/blob/main/threat-model.md)
     * â€” `_.template` is insecure and will be removed in v5.
     *
     * @static
     * @memberOf _
     * @type {Object}
     */
    lodash.templateSettings = {

      /**
       * Used to detect `data` property values to be HTML-escaped.
       *
       * @memberOf _.templateSettings
       * @type {RegExp}
       */
      'escape': reEscape,

      /**
       * Used to detect code to be evaluated.
       *
       * @memberOf _.templateSettings
       * @type {RegExp}
       */
      'evaluate': reEvaluate,

      /**
       * Used to detect `data` property values to inject.
       *
       * @memberOf _.templateSettings
       * @type {RegExp}
       */
      'interpolate': reInterpolate,

      /**
       * Used to reference the data object in the template text.
       *
       * @memberOf _.templateSettings
       * @type {string}
       */
      'variable': '',

      /**
       * Used to import variables into the compiled template.
       *
       * @memberOf _.templateSettings
       * @type {Object}
       */
      'imports': {

        /**
         * A reference to the `lodash` function.
         *
         * @memberOf _.templateSettings.imports
         * @type {Function}
         */
        '_': lodash
      }
    };

    // Ensure wrappers are instances of `baseLodash`.
    lodash.prototype = baseLodash.prototype;
    lodash.prototype.constructor = lodash;

    LodashWrapper.prototype = baseCreate(baseLodash.prototype);
    LodashWrapper.prototype.constructor = LodashWrapper;

    /*------------------------------------------------------------------------*/

    /**
     * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
     *
     * @private
     * @constructor
     * @param {*} value The value to wrap.
     */
    function LazyWrapper(value) {
      this.__wrapped__ = value;
      this.__actions__ = [];
      this.__dir__ = 1;
      this.__filtered__ = false;
      this.__iteratees__ = [];
      this.__takeCount__ = MAX_ARRAY_LENGTH;
      this.__views__ = [];
    }

    /**
     * Creates a clone of the lazy wrapper object.
     *
     * @private
     * @name clone
     * @memberOf LazyWrapper
     * @returns {Object} Returns the cloned `LazyWrapper` object.
     */
    function lazyClone() {
      var result = new LazyWrapper(this.__wrapped__);
      result.__actions__ = copyArray(this.__actions__);
      result.__dir__ = this.__dir__;
      result.__filtered__ = this.__filtered__;
      result.__iteratees__ = copyArray(this.__iteratees__);
      result.__takeCount__ = this.__takeCount__;
      result.__views__ = copyArray(this.__views__);
      return result;
    }

    /**
     * Reverses the direction of lazy iteration.
     *
     * @private
     * @name reverse
     * @memberOf LazyWrapper
     * @returns {Object} Returns the new reversed `LazyWrapper` object.
     */
    function lazyReverse() {
      if (this.__filtered__) {
        var result = new LazyWrapper(this);
        result.__dir__ = -1;
        result.__filtered__ = true;
      } else {
        result = this.clone();
        result.__dir__ *= -1;
      }
      return result;
    }

    /**
     * Extracts the unwrapped value from its lazy wrapper.
     *
     * @private
     * @name value
     * @memberOf LazyWrapper
     * @returns {*} Returns the unwrapped value.
     */
    function lazyValue() {
      var array = this.__wrapped__.value(),
          dir = this.__dir__,
          isArr = isArray(array),
          isRight = dir < 0,
          arrLength = isArr ? array.length : 0,
          view = getView(0, arrLength, this.__views__),
          start = view.start,
          end = view.end,
          length = end - start,
          index = isRight ? end : (start - 1),
          iteratees = this.__iteratees__,
          iterLength = iteratees.length,
          resIndex = 0,
          takeCount = nativeMin(length, this.__takeCount__);

      if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
        return baseWrapperValue(array, this.__actions__);
      }
      var result = [];

      outer:
      while (length-- && resIndex < takeCount) {
        index += dir;

        var iterIndex = -1,
            value = array[index];

        while (++iterIndex < iterLength) {
          var data = iteratees[iterIndex],
              iteratee = data.iteratee,
              type = data.type,
              computed = iteratee(value);

          if (type == LAZY_MAP_FLAG) {
            value = computed;
          } else if (!computed) {
            if (type == LAZY_FILTER_FLAG) {
              continue outer;
            } else {
              break outer;
            }
          }
        }
        result[resIndex++] = value;
      }
      return result;
    }

    // Ensure `LazyWrapper` is an instance of `baseLodash`.
    LazyWrapper.prototype = baseCreate(baseLodash.prototype);
    LazyWrapper.prototype.constructor = LazyWrapper;

    /*------------------------------------------------------------------------*/

    /**
     * Creates a hash object.
     *
     * @private
     * @constructor
     * @param {Array} [entries] The key-value pairs to cache.
     */
    function Hash(entries) {
      var index = -1,
          length = entries == null ? 0 : entries.length;

      this.clear();
      while (++index < length) {
        var entry = entries[index];
        this.set(entry[0], entry[1]);
      }
    }

    /**
     * Removes all key-value entries from the hash.
     *
     * @private
     * @name clear
     * @memberOf Hash
     */
    function hashClear() {
      this.__data__ = nativeCreate ? nativeCreate(null) : {};
      this.size = 0;
    }

    /**
     * Removes `key` and its value from the hash.
     *
     * @private
     * @name delete
     * @memberOf Hash
     * @param {Object} hash The hash to modify.
     * @param {string} key The key of the value to remove.
     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
     */
    function hashDelete(key) {
      var result = this.has(key) && delete this.__data__[key];
      this.size -= result ? 1 : 0;
      return result;
    }

    /**
     * Gets the hash value for `key`.
     *
     * @private
     * @name get
     * @memberOf Hash
     * @param {string} key The key of the value to get.
     * @returns {*} Returns the entry value.
     */
    function hashGet(key) {
      var data = this.__data__;
      if (nativeCreate) {
        var result = data[key];
        return result === HASH_UNDEFINED ? undefined : result;
      }
      return hasOwnProperty.call(data, key) ? data[key] : undefined;
    }

    /**
     * Checks if a hash value for `key` exists.
     *
     * @private
     * @name has
     * @memberOf Hash
     * @param {string} key The key of the entry to check.
     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
     */
    function hashHas(key) {
      var data = this.__data__;
      return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
    }

    /**
     * Sets the hash `key` to `value`.
     *
     * @private
     * @name set
     * @memberOf Hash
     * @param {string} key The key of the value to set.
     * @param {*} value The value to set.
     * @returns {Object} Returns the hash instance.
     */
    function hashSet(key, value) {
      var data = this.__data__;
      this.size += this.has(key) ? 0 : 1;
      data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
      return this;
    }

    // Add methods to `Hash`.
    Hash.prototype.clear = hashClear;
    Hash.prototype['delete'] = hashDelete;
    Hash.prototype.get = hashGet;
    Hash.prototype.has = hashHas;
    Hash.prototype.set = hashSet;

    /*------------------------------------------------------------------------*/

    /**
     * Creates an list cache object.
     *
     * @private
     * @constructor
     * @param {Array} [entries] The key-value pairs to cache.
     */
    function ListCache(entries) {
      var index = -1,
          length = entries == null ? 0 : entries.length;

      this.clear();
      while (++index < length) {
        var entry = entries[index];
        this.set(entry[0], entry[1]);
      }
    }

    /**
     * Removes all key-value entries from the list cache.
     *
     * @private
     * @name clear
     * @memberOf ListCache
     */
    function listCacheClear() {
      this.__data__ = [];
      this.size = 0;
    }

    /**
     * Removes `key` and its value from the list cache.
     *
     * @private
     * @name delete
     * @memberOf ListCache
     * @param {string} key The key of the value to remove.
     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
     */
    function listCacheDelete(key) {
      var data = this.__data__,
          index = assocIndexOf(data, key);

      if (index < 0) {
        return false;
      }
      var lastIndex = data.length - 1;
      if (index == lastIndex) {
        data.pop();
      } else {
        splice.call(data, index, 1);
      }
      --this.size;
      return true;
    }

    /**
     * Gets the list cache value for `key`.
     *
     * @private
     * @name get
     * @memberOf ListCache
     * @param {string} key The key of the value to get.
     * @returns {*} Returns the entry value.
     */
    function listCacheGet(key) {
      var data = this.__data__,
          index = assocIndexOf(data, key);

      return index < 0 ? undefined : data[index][1];
    }

    /**
     * Checks if a list cache value for `key` exists.
     *
     * @private
     * @name has
     * @memberOf ListCache
     * @param {string} key The key of the entry to check.
     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
     */
    function listCacheHas(key) {
      return assocIndexOf(this.__data__, key) > -1;
    }

    /**
     * Sets the list cache `key` to `value`.
     *
     * @private
     * @name set
     * @memberOf ListCache
     * @param {string} key The key of the value to set.
     * @param {*} value The value to set.
     * @returns {Object} Returns the list cache instance.
     */
    function listCacheSet(key, value) {
      var data = this.__data__,
          index = assocIndexOf(data, key);

      if (index < 0) {
        ++this.size;
        data.push([key, value]);
      } else {
        data[index][1] = value;
      }
      return this;
    }

    // Add methods to `ListCache`.
    ListCache.prototype.clear = listCacheClear;
    ListCache.prototype['delete'] = listCacheDelete;
    ListCache.prototype.get = listCacheGet;
    ListCache.prototype.has = listCacheHas;
    ListCache.prototype.set = listCacheSet;

    /*------------------------------------------------------------------------*/

    /**
     * Creates a map cache object to store key-value pairs.
     *
     * @private
     * @constructor
     * @param {Array} [entries] The key-value pairs to cache.
     */
    function MapCache(entries) {
      var index = -1,
          length = entries == null ? 0 : entries.length;

      this.clear();
      while (++index < length) {
        var entry = entries[index];
        this.set(entry[0], entry[1]);
      }
    }

    /**
     * Removes all key-value entries from the map.
     *
     * @private
     * @name clear
     * @memberOf MapCache
     */
    function mapCacheClear() {
      this.size = 0;
      this.__data__ = {
        'hash': new Hash,
        'map': new (Map || ListCache),
        'string': new Hash
      };
    }

    /**
     * Removes `key` and its value from the map.
     *
     * @private
     * @name delete
     * @memberOf MapCache
     * @param {string} key The key of the value to remove.
     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
     */
    function mapCacheDelete(key) {
      var result = getMapData(this, key)['delete'](key);
      this.size -= result ? 1 : 0;
      return result;
    }

    /**
     * Gets the map value for `key`.
     *
     * @private
     * @name get
     * @memberOf MapCache
     * @param {string} key The key of the value to get.
     * @returns {*} Returns the entry value.
     */
    function mapCacheGet(key) {
      return getMapData(this, key).get(key);
    }

    /**
     * Checks if a map value for `key` exists.
     *
     * @private
     * @name has
     * @memberOf MapCache
     * @param {string} key The key of the entry to check.
     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
     */
    function mapCacheHas(key) {
      return getMapData(this, key).has(key);
    }

    /**
     * Sets the map `key` to `value`.
     *
     * @private
     * @name set
     * @memberOf MapCache
     * @param {string} key The key of the value to set.
     * @param {*} value The value to set.
     * @returns {Object} Returns the map cache instance.
     */
    function mapCacheSet(key, value) {
      var data = getMapData(this, key),
          size = data.size;

      data.set(key, value);
      this.size += data.size == size ? 0 : 1;
      return this;
    }

    // Add methods to `MapCache`.
    MapCache.prototype.clear = mapCacheClear;
    MapCache.prototype['delete'] = mapCacheDelete;
    MapCache.prototype.get = mapCacheGet;
    MapCache.prototype.has = mapCacheHas;
    MapCache.prototype.set = mapCacheSet;

    /*------------------------------------------------------------------------*/

    /**
     *
     * Creates an array cache object to store unique values.
     *
     * @private
     * @constructor
     * @param {Array} [values] The values to cache.
     */
    function SetCache(values) {
      var index = -1,
          length = values == null ? 0 : values.length;

      this.__data__ = new MapCache;
      while (++index < length) {
        this.add(values[index]);
      }
    }

    /**
     * Adds `value` to the array cache.
     *
     * @private
     * @name add
     * @memberOf SetCache
     * @alias push
     * @param {*} value The value to cache.
     * @returns {Object} Returns the cache instance.
     */
    function setCacheAdd(value) {
      this.__data__.set(value, HASH_UNDEFINED);
      return this;
    }

    /**
     * Checks if `value` is in the array cache.
     *
     * @private
     * @name has
     * @memberOf SetCache
     * @param {*} value The value to search for.
     * @returns {boolean} Returns `true` if `value` is found, else `false`.
     */
    function setCacheHas(value) {
      return this.__data__.has(value);
    }

    // Add methods to `SetCache`.
    SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
    SetCache.prototype.has = setCacheHas;

    /*------------------------------------------------------------------------*/

    /**
     * Creates a stack cache object to store key-value pairs.
     *
     * @private
     * @constructor
     * @param {Array} [entries] The key-value pairs to cache.
     */
    function Stack(entries) {
      var data = this.__data__ = new ListCache(entries);
      this.size = data.size;
    }

    /**
     * Removes all key-value entries from the stack.
     *
     * @private
     * @name clear
     * @memberOf Stack
     */
    function stackClear() {
      this.__data__ = new ListCache;
      this.size = 0;
    }

    /**
     * Removes `key` and its value from the stack.
     *
     * @private
     * @name delete
     * @memberOf Stack
     * @param {string} key The key of the value to remove.
     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
     */
    function stackDelete(key) {
      var data = this.__data__,
          result = data['delete'](key);

      this.size = data.size;
      return result;
    }

    /**
     * Gets the stack value for `key`.
     *
     * @private
     * @name get
     * @memberOf Stack
     * @param {string} key The key of the value to get.
     * @returns {*} Returns the entry value.
     */
    function stackGet(key) {
      return this.__data__.get(key);
    }

    /**
     * Checks if a stack value for `key` exists.
     *
     * @private
     * @name has
     * @memberOf Stack
     * @param {string} key The key of the entry to check.
     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
     */
    function stackHas(key) {
      return this.__data__.has(key);
    }

    /**
     * Sets the stack `key` to `value`.
     *
     * @private
     * @name set
     * @memberOf Stack
     * @param {string} key The key of the value to set.
     * @param {*} value The value to set.
     * @returns {Object} Returns the stack cache instance.
     */
    function stackSet(key, value) {
      var data = this.__data__;
      if (data instanceof ListCache) {
        var pairs = data.__data__;
        if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
          pairs.push([key, value]);
          this.size = ++data.size;
          return this;
        }
        data = this.__data__ = new MapCache(pairs);
      }
      data.set(key, value);
      this.size = data.size;
      return this;
    }

    // Add methods to `Stack`.
    Stack.prototype.clear = stackClear;
    Stack.prototype['delete'] = stackDelete;
    Stack.prototype.get = stackGet;
    Stack.prototype.has = stackHas;
    Stack.prototype.set = stackSet;

    /*------------------------------------------------------------------------*/

    /**
     * Creates an array of the enumerable property names of the array-like `value`.
     *
     * @private
     * @param {*} value The value to query.
     * @param {boolean} inherited Specify returning inherited property names.
     * @returns {Array} Returns the array of property names.
     */
    function arrayLikeKeys(value, inherited) {
      var isArr = isArray(value),
          isArg = !isArr && isArguments(value),
          isBuff = !isArr && !isArg && isBuffer(value),
          isType = !isArr && !isArg && !isBuff && isTypedArray(value),
          skipIndexes = isArr || isArg || isBuff || isType,
          result = skipIndexes ? baseTimes(value.length, String) : [],
          length = result.length;

      for (var key in value) {
        if ((inherited || hasOwnProperty.call(value, key)) &&
            !(skipIndexes && (
               // Safari 9 has enumerable `arguments.length` in strict mode.
               key == 'length' ||
               // Node.js 0.10 has enumerable non-index properties on buffers.
               (isBuff && (key == 'offset' || key == 'parent')) ||
               // PhantomJS 2 has enumerable non-index properties on typed arrays.
               (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
               // Skip index properties.
               isIndex(key, length)
            ))) {
          result.push(key);
        }
      }
      return result;
    }

    /**
     * A specialized version of `_.sample` for arrays.
     *
     * @private
     * @param {Array} array The array to sample.
     * @returns {*} Returns the random element.
     */
    function arraySample(array) {
      var length = array.length;
      return length ? array[baseRandom(0, length - 1)] : undefined;
    }

    /**
     * A specialized version of `_.sampleSize` for arrays.
     *
     * @private
     * @param {Array} array The array to sample.
     * @param {number} n The number of elements to sample.
     * @returns {Array} Returns the random elements.
     */
    function arraySampleSize(array, n) {
      return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
    }

    /**
     * A specialized version of `_.shuffle` for arrays.
     *
     * @private
     * @param {Array} array The array to shuffle.
     * @returns {Array} Returns the new shuffled array.
     */
    function arrayShuffle(array) {
      return shuffleSelf(copyArray(array));
    }

    /**
     * This function is like `assignValue` except that it doesn't assign
     * `undefined` values.
     *
     * @private
     * @param {Object} object The object to modify.
     * @param {string} key The key of the property to assign.
     * @param {*} value The value to assign.
     */
    function assignMergeValue(object, key, value) {
      if ((value !== undefined && !eq(object[key], value)) ||
          (value === undefined && !(key in object))) {
        baseAssignValue(object, key, value);
      }
    }

    /**
     * Assigns `value` to `key` of `object` if the existing value is not equivalent
     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
     * for equality comparisons.
     *
     * @private
     * @param {Object} object The object to modify.
     * @param {string} key The key of the property to assign.
     * @param {*} value The value to assign.
     */
    function assignValue(object, key, value) {
      var objValue = object[key];
      if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
          (value === undefined && !(key in object))) {
        baseAssignValue(object, key, value);
      }
    }

    /**
     * Gets the index at which the `key` is found in `array` of key-value pairs.
     *
     * @private
     * @param {Array} array The array to inspect.
     * @param {*} key The key to search for.
     * @returns {number} Returns the index of the matched value, else `-1`.
     */
    function assocIndexOf(array, key) {
      var length = array.length;
      while (length--) {
        if (eq(array[length][0], key)) {
          return length;
        }
      }
      return -1;
    }

    /**
     * Aggregates elements of `collection` on `accumulator` with keys transformed
     * by `iteratee` and values set by `setter`.
     *
     * @private
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} setter The function to set `accumulator` values.
     * @param {Function} iteratee The iteratee to transform keys.
     * @param {Object} accumulator The initial aggregated object.
     * @returns {Function} Returns `accumulator`.
     */
    function baseAggregator(collection, setter, iteratee, accumulator) {
      baseEach(collection, function(value, key, collection) {
        setter(accumulator, value, iteratee(value), collection);
      });
      return accumulator;
    }

    /**
     * The base implementation of `_.assign` without support for multiple sources
     * or `customizer` functions.
     *
     * @private
     * @param {Object} object The destination object.
     * @param {Object} source The source object.
     * @returns {Object} Returns `object`.
     */
    function baseAssign(object, source) {
      return object && copyObject(source, keys(source), object);
    }

    /**
     * The base implementation of `_.assignIn` without support for multiple sources
     * or `customizer` functions.
     *
     * @private
     * @param {Object} object The destination object.
     * @param {Object} source The source object.
     * @returns {Object} Returns `object`.
     */
    function baseAssignIn(object, source) {
      return object && copyObject(source, keysIn(source), object);
    }

    /**
     * The base implementation of `assignValue` and `assignMergeValue` without
     * value checks.
     *
     * @private
     * @param {Object} object The object to modify.
     * @param {string} key The key of the property to assign.
     * @param {*} value The value to assign.
     */
    function baseAssignValue(object, key, value) {
      if (key == '__proto__' && defineProperty) {
        defineProperty(object, key, {
          'configurable': true,
          'enumerable': true,
          'value': value,
          'writable': true
        });
      } else {
        object[key] = value;
      }
    }

    /**
     * The base implementation of `_.at` without support for individual paths.
     *
     * @private
     * @param {Object} object The object to iterate over.
     * @param {string[]} paths The property paths to pick.
     * @returns {Array} Returns the picked elements.
     */
    function baseAt(object, paths) {
      var index = -1,
          length = paths.length,
          result = Array(length),
          skip = object == null;

      while (++index < length) {
        result[index] = skip ? undefined : get(object, paths[index]);
      }
      return result;
    }

    /**
     * The base implementation of `_.clamp` which doesn't coerce arguments.
     *
     * @private
     * @param {number} number The number to clamp.
     * @param {number} [lower] The lower bound.
     * @param {number} upper The upper bound.
     * @returns {number} Returns the clamped number.
     */
    function baseClamp(number, lower, upper) {
      if (number === number) {
        if (upper !== undefined) {
          number = number <= upper ? number : upper;
        }
        if (lower !== undefined) {
          number = number >= lower ? number : lower;
        }
      }
      return number;
    }

    /**
     * The base implementation of `_.clone` and `_.cloneDeep` which tracks
     * traversed objects.
     *
     * @private
     * @param {*} value The value to clone.
     * @param {boolean} bitmask The bitmask flags.
     *  1 - Deep clone
     *  2 - Flatten inherited properties
     *  4 - Clone symbols
     * @param {Function} [customizer] The function to customize cloning.
     * @param {string} [key] The key of `value`.
     * @param {Object} [object] The parent object of `value`.
     * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
     * @returns {*} Returns the cloned value.
     */
    function baseClone(value, bitmask, customizer, key, object, stack) {
      var result,
          isDeep = bitmask & CLONE_DEEP_FLAG,
          isFlat = bitmask & CLONE_FLAT_FLAG,
          isFull = bitmask & CLONE_SYMBOLS_FLAG;

      if (customizer) {
        result = object ? customizer(value, key, object, stack) : customizer(value);
      }
      if (result !== undefined) {
        return result;
      }
      if (!isObject(value)) {
        return value;
      }
      var isArr = isArray(value);
      if (isArr) {
        result = initCloneArray(value);
        if (!isDeep) {
          return copyArray(value, result);
        }
      } else {
        var tag = getTag(value),
            isFunc = tag == funcTag || tag == genTag;

        if (isBuffer(value)) {
          return cloneBuffer(value, isDeep);
        }
        if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
          result = (isFlat || isFunc) ? {} : initCloneObject(value);
          if (!isDeep) {
            return isFlat
              ? copySymbolsIn(value, baseAssignIn(result, value))
              : copySymbols(value, baseAssign(result, value));
          }
        } else {
          if (!cloneableTags[tag]) {
            return object ? value : {};
          }
          result = initCloneByTag(value, tag, isDeep);
        }
      }
      // Check for circular references and return its corresponding clone.
      stack || (stack = new Stack);
      var stacked = stack.get(value);
      if (stacked) {
        return stacked;
      }
      stack.set(value, result);

      if (isSet(value)) {
        value.forEach(function(subValue) {
          result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
        });
      } else if (isMap(value)) {
        value.forEach(function(subValue, key) {
          result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
        });
      }

      var keysFunc = isFull
        ? (isFlat ? getAllKeysIn : getAllKeys)
        : (isFlat ? keysIn : keys);

      var props = isArr ? undefined : keysFunc(value);
      arrayEach(props || value, function(subValue, key) {
        if (props) {
          key = subValue;
          subValue = value[key];
        }
        // Recursively populate clone (susceptible to call stack limits).
        assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
      });
      return result;
    }

    /**
     * The base implementation of `_.conforms` which doesn't clone `source`.
     *
     * @private
     * @param {Object} source The object of property predicates to conform to.
     * @returns {Function} Returns the new spec function.
     */
    function baseConforms(source) {
      var props = keys(source);
      return function(object) {
        return baseConformsTo(object, source, props);
      };
    }

    /**
     * The base implementation of `_.conformsTo` which accepts `props` to check.
     *
     * @private
     * @param {Object} object The object to inspect.
     * @param {Object} source The object of property predicates to conform to.
     * @returns {boolean} Returns `true` if `object` conforms, else `false`.
     */
    function baseConformsTo(object, source, props) {
      var length = props.length;
      if (object == null) {
        return !length;
      }
      object = Object(object);
      while (length--) {
        var key = props[length],
            predicate = source[key],
            value = object[key];

        if ((value === undefined && !(key in object)) || !predicate(value)) {
          return false;
        }
      }
      return true;
    }

    /**
     * The base implementation of `_.delay` and `_.defer` which accepts `args`
     * to provide to `func`.
     *
     * @private
     * @param {Function} func The function to delay.
     * @param {number} wait The number of milliseconds to delay invocation.
     * @param {Array} args The arguments to provide to `func`.
     * @returns {number|Object} Returns the timer id or timeout object.
     */
    function baseDelay(func, wait, args) {
      if (typeof func != 'function') {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      return setTimeout(function() { func.apply(undefined, args); }, wait);
    }

    /**
     * The base implementation of methods like `_.difference` without support
     * for excluding multiple arrays or iteratee shorthands.
     *
     * @private
     * @param {Array} array The array to inspect.
     * @param {Array} values The values to exclude.
     * @param {Function} [iteratee] The iteratee invoked per element.
     * @param {Function} [comparator] The comparator invoked per element.
     * @returns {Array} Returns the new array of filtered values.
     */
    function baseDifference(array, values, iteratee, comparator) {
      var index = -1,
          includes = arrayIncludes,
          isCommon = true,
          length = array.length,
          result = [],
          valuesLength = values.length;

      if (!length) {
        return result;
      }
      if (iteratee) {
        values = arrayMap(values, baseUnary(iteratee));
      }
      if (comparator) {
        includes = arrayIncludesWith;
        isCommon = false;
      }
      else if (values.length >= LARGE_ARRAY_SIZE) {
        includes = cacheHas;
        isCommon = false;
        values = new SetCache(values);
      }
      outer:
      while (++index < length) {
        var value = array[index],
            computed = iteratee == null ? value : iteratee(value);

        value = (comparator || value !== 0) ? value : 0;
        if (isCommon && computed === computed) {
          var valuesIndex = valuesLength;
          while (valuesIndex--) {
            if (values[valuesIndex] === computed) {
              continue outer;
            }
          }
          result.push(value);
        }
        else if (!includes(values, computed, comparator)) {
          result.push(value);
        }
      }
      return result;
    }

    /**
     * The base implementation of `_.forEach` without support for iteratee shorthands.
     *
     * @private
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} iteratee The function invoked per iteration.
     * @returns {Array|Object} Returns `collection`.
     */
    var baseEach = createBaseEach(baseForOwn);

    /**
     * The base implementation of `_.forEachRight` without support for iteratee shorthands.
     *
     * @private
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} iteratee The function invoked per iteration.
     * @returns {Array|Object} Returns `collection`.
     */
    var baseEachRight = createBaseEach(baseForOwnRight, true);

    /**
     * The base implementation of `_.every` without support for iteratee shorthands.
     *
     * @private
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} predicate The function invoked per iteration.
     * @returns {boolean} Returns `true` if all elements pass the predicate check,
     *  else `false`
     */
    function baseEvery(collection, predicate) {
      var result = true;
      baseEach(collection, function(value, index, collection) {
        result = !!predicate(value, index, collection);
        return result;
      });
      return result;
    }

    /**
     * The base implementation of methods like `_.max` and `_.min` which accepts a
     * `comparator` to determine the extremum value.
     *
     * @private
     * @param {Array} array The array to iterate over.
     * @param {Function} iteratee The iteratee invoked per iteration.
     * @param {Function} comparator The comparator used to compare values.
     * @returns {*} Returns the extremum value.
     */
    function baseExtremum(array, iteratee, comparator) {
      var index = -1,
          length = array.length;

      while (++index < length) {
        var value = array[index],
            current = iteratee(value);

        if (current != null && (computed === undefined
              ? (current === current && !isSymbol(current))
              : comparator(current, computed)
            )) {
          var computed = current,
              result = value;
        }
      }
      return result;
    }

    /**
     * The base implementation of `_.fill` without an iteratee call guard.
     *
     * @private
     * @param {Array} array The array to fill.
     * @param {*} value The value to fill `array` with.
     * @param {number} [start=0] The start position.
     * @param {number} [end=array.length] The end position.
     * @returns {Array} Returns `array`.
     */
    function baseFill(array, value, start, end) {
      var length = array.length;

      start = toInteger(start);
      if (start < 0) {
        start = -start > length ? 0 : (length + start);
      }
      end = (end === undefined || end > length) ? length : toInteger(end);
      if (end < 0) {
        end += length;
      }
      end = start > end ? 0 : toLength(end);
      while (start < end) {
        array[start++] = value;
      }
      return array;
    }

    /**
     * The base implementation of `_.filter` without support for iteratee shorthands.
     *
     * @private
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} predicate The function invoked per iteration.
     * @returns {Array} Returns the new filtered array.
     */
    function baseFilter(collection, predicate) {
      var result = [];
      baseEach(collection, function(value, index, collection) {
        if (predicate(value, index, collection)) {
          result.push(value);
        }
      });
      return result;
    }

    /**
     * The base implementation of `_.flatten` with support for restricting flattening.
     *
     * @private
     * @param {Array} array The array to flatten.
     * @param {number} depth The maximum recursion depth.
     * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
     * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
     * @param {Array} [result=[]] The initial result value.
     * @returns {Array} Returns the new flattened array.
     */
    function baseFlatten(array, depth, predicate, isStrict, result) {
      var index = -1,
          length = array.length;

      predicate || (predicate = isFlattenable);
      result || (result = []);

      while (++index < length) {
        var value = array[index];
        if (depth > 0 && predicate(value)) {
          if (depth > 1) {
            // Recursively flatten arrays (susceptible to call stack limits).
            baseFlatten(value, depth - 1, predicate, isStrict, result);
          } else {
            arrayPush(result, value);
          }
        } else if (!isStrict) {
          result[result.length] = value;
        }
      }
      return result;
    }

    /**
     * The base implementation of `baseForOwn` which iterates over `object`
     * properties returned by `keysFunc` and invokes `iteratee` for each property.
     * Iteratee functions may exit iteration early by explicitly returning `false`.
     *
     * @private
     * @param {Object} object The object to iterate over.
     * @param {Function} iteratee The function invoked per iteration.
     * @param {Function} keysFunc The function to get the keys of `object`.
     * @returns {Object} Returns `object`.
     */
    var baseFor = createBaseFor();

    /**
     * This function is like `baseFor` except that it iterates over properties
     * in the opposite order.
     *
     * @private
     * @param {Object} object The object to iterate over.
     * @param {Function} iteratee The function invoked per iteration.
     * @param {Function} keysFunc The function to get the keys of `object`.
     * @returns {Object} Returns `object`.
     */
    var baseForRight = createBaseFor(true);

    /**
     * The base implementation of `_.forOwn` without support for iteratee shorthands.
     *
     * @private
     * @param {Object} object The object to iterate over.
     * @param {Function} iteratee The function invoked per iteration.
     * @returns {Object} Returns `object`.
     */
    function baseForOwn(object, iteratee) {
      return object && baseFor(object, iteratee, keys);
    }

    /**
     * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
     *
     * @private
     * @param {Object} object The object to iterate over.
     * @param {Function} iteratee The function invoked per iteration.
     * @returns {Object} Returns `object`.
     */
    function baseForOwnRight(object, iteratee) {
      return object && baseForRight(object, iteratee, keys);
    }

    /**
     * The base implementation of `_.functions` which creates an array of
     * `object` function property names filtered from `props`.
     *
     * @private
     * @param {Object} object The object to inspect.
     * @param {Array} props The property names to filter.
     * @returns {Array} Returns the function names.
     */
    function baseFunctions(object, props) {
      return arrayFilter(props, function(key) {
        return isFunction(object[key]);
      });
    }

    /**
     * The base implementation of `_.get` without support for default values.
     *
     * @private
     * @param {Object} object The object to query.
     * @param {Array|string} path The path of the property to get.
     * @returns {*} Returns the resolved value.
     */
    function baseGet(object, path) {
      path = castPath(path, object);

      var index = 0,
          length = path.length;

      while (object != null && index < length) {
        object = object[toKey(path[index++])];
      }
      return (index && index == length) ? object : undefined;
    }

    /**
     * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
     * `keysFunc` and `symbolsFunc` to get the enumerable property names and
     * symbols of `object`.
     *
     * @private
     * @param {Object} object The object to query.
     * @param {Function} keysFunc The function to get the keys of `object`.
     * @param {Function} symbolsFunc The function to get the symbols of `object`.
     * @returns {Array} Returns the array of property names and symbols.
     */
    function baseGetAllKeys(object, keysFunc, symbolsFunc) {
      var result = keysFunc(object);
      return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
    }

    /**
     * The base implementation of `getTag` without fallbacks for buggy environments.
     *
     * @private
     * @param {*} value The value to query.
     * @returns {string} Returns the `toStringTag`.
     */
    function baseGetTag(value) {
      if (value == null) {
        return value === undefined ? undefinedTag : nullTag;
      }
      return (symToStringTag && symToStringTag in Object(value))
        ? getRawTag(value)
        : objectToString(value);
    }

    /**
     * The base implementation of `_.gt` which doesn't coerce arguments.
     *
     * @private
     * @param {*} value The value to compare.
     * @param {*} other The other value to compare.
     * @returns {boolean} Returns `true` if `value` is greater than `other`,
     *  else `false`.
     */
    function baseGt(value, other) {
      return value > other;
    }

    /**
     * The base implementation of `_.has` without support for deep paths.
     *
     * @private
     * @param {Object} [object] The object to query.
     * @param {Array|string} key The key to check.
     * @returns {boolean} Returns `true` if `key` exists, else `false`.
     */
    function baseHas(object, key) {
      return object != null && hasOwnProperty.call(object, key);
    }

    /**
     * The base implementation of `_.hasIn` without support for deep paths.
     *
     * @private
     * @param {Object} [object] The object to query.
     * @param {Array|string} key The key to check.
     * @returns {boolean} Returns `true` if `key` exists, else `false`.
     */
    function baseHasIn(object, key) {
      return object != null && key in Object(object);
    }

    /**
     * The base implementation of `_.inRange` which doesn't coerce arguments.
     *
     * @private
     * @param {number} number The number to check.
     * @param {number} start The start of the range.
     * @param {number} end The end of the range.
     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
     */
    function baseInRange(number, start, end) {
      return number >= nativeMin(start, end) && number < nativeMax(start, end);
    }

    /**
     * The base implementation of methods like `_.intersection`, without support
     * for iteratee shorthands, that accepts an array of arrays to inspect.
     *
     * @private
     * @param {Array} arrays The arrays to inspect.
     * @param {Function} [iteratee] The iteratee invoked per element.
     * @param {Function} [comparator] The comparator invoked per element.
     * @returns {Array} Returns the new array of shared values.
     */
    function baseIntersection(arrays, iteratee, comparator) {
      var includes = comparator ? arrayIncludesWith : arrayIncludes,
          length = arrays[0].length,
          othLength = arrays.length,
          othIndex = othLength,
          caches = Array(othLength),
          maxLength = Infinity,
          result = [];

      while (othIndex--) {
        var array = arrays[othIndex];
        if (othIndex && iteratee) {
          array = arrayMap(array, baseUnary(iteratee));
        }
        maxLength = nativeMin(array.length, maxLength);
        caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
          ? new SetCache(othIndex && array)
          : undefined;
      }
      array = arrays[0];

      var index = -1,
          seen = caches[0];

      outer:
      while (++index < length && result.length < maxLength) {
        var value = array[index],
            computed = iteratee ? iteratee(value) : value;

        value = (comparator || value !== 0) ? value : 0;
        if (!(seen
              ? cacheHas(seen, computed)
              : includes(result, computed, comparator)
            )) {
          othIndex = othLength;
          while (--othIndex) {
            var cache = caches[othIndex];
            if (!(cache
                  ? cacheHas(cache, computed)
                  : includes(arrays[othIndex], computed, comparator))
                ) {
              continue outer;
            }
          }
          if (seen) {
            seen.push(computed);
          }
          result.push(value);
        }
      }
      return result;
    }

    /**
     * The base implementation of `_.invert` and `_.invertBy` which inverts
     * `object` with values transformed by `iteratee` and set by `setter`.
     *
     * @private
     * @param {Object} object The object to iterate over.
     * @param {Function} setter The function to set `accumulator` values.
     * @param {Function} iteratee The iteratee to transform values.
     * @param {Object} accumulator The initial inverted object.
     * @returns {Function} Returns `accumulator`.
     */
    function baseInverter(object, setter, iteratee, accumulator) {
      baseForOwn(object, function(value, key, object) {
        setter(accumulator, iteratee(value), key, object);
      });
      return accumulator;
    }

    /**
     * The base implementation of `_.invoke` without support for individual
     * method arguments.
     *
     * @private
     * @param {Object} object The object to query.
     * @param {Array|string} path The path of the method to invoke.
     * @param {Array} args The arguments to invoke the method with.
     * @returns {*} Returns the result of the invoked method.
     */
    function baseInvoke(object, path, args) {
      path = castPath(path, object);
      object = parent(object, path);
      var func = object == null ? object : object[toKey(last(path))];
      return func == null ? undefined : apply(func, object, args);
    }

    /**
     * The base implementation of `_.isArguments`.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is an `arguments` object,
     */
    function baseIsArguments(value) {
      return isObjectLike(value) && baseGetTag(value) == argsTag;
    }

    /**
     * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
     */
    function baseIsArrayBuffer(value) {
      return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
    }

    /**
     * The base implementation of `_.isDate` without Node.js optimizations.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
     */
    function baseIsDate(value) {
      return isObjectLike(value) && baseGetTag(value) == dateTag;
    }

    /**
     * The base implementation of `_.isEqual` which supports partial comparisons
     * and tracks traversed objects.
     *
     * @private
     * @param {*} value The value to compare.
     * @param {*} other The other value to compare.
     * @param {boolean} bitmask The bitmask flags.
     *  1 - Unordered comparison
     *  2 - Partial comparison
     * @param {Function} [customizer] The function to customize comparisons.
     * @param {Object} [stack] Tracks traversed `value` and `other` objects.
     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
     */
    function baseIsEqual(value, other, bitmask, customizer, stack) {
      if (value === other) {
        return true;
      }
      if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
        return value !== value && other !== other;
      }
      return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
    }

    /**
     * A specialized version of `baseIsEqual` for arrays and objects which performs
     * deep comparisons and tracks traversed objects enabling objects with circular
     * references to be compared.
     *
     * @private
     * @param {Object} object The object to compare.
     * @param {Object} other The other object to compare.
     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
     * @param {Function} customizer The function to customize comparisons.
     * @param {Function} equalFunc The function to determine equivalents of values.
     * @param {Object} [stack] Tracks traversed `object` and `other` objects.
     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
     */
    function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
      var objIsArr = isArray(object),
          othIsArr = isArray(other),
          objTag = objIsArr ? arrayTag : getTag(object),
          othTag = othIsArr ? arrayTag : getTag(other);

      objTag = objTag == argsTag ? objectTag : objTag;
      othTag = othTag == argsTag ? objectTag : othTag;

      var objIsObj = objTag == objectTag,
          othIsObj = othTag == objectTag,
          isSameTag = objTag == othTag;

      if (isSameTag && isBuffer(object)) {
        if (!isBuffer(other)) {
          return false;
        }
        objIsArr = true;
        objIsObj = false;
      }
      if (isSameTag && !objIsObj) {
        stack || (stack = new Stack);
        return (objIsArr || isTypedArray(object))
          ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
          : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
      }
      if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
        var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
            othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');

        if (objIsWrapped || othIsWrapped) {
          var objUnwrapped = objIsWrapped ? object.value() : object,
              othUnwrapped = othIsWrapped ? other.value() : other;

          stack || (stack = new Stack);
          return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
        }
      }
      if (!isSameTag) {
        return false;
      }
      stack || (stack = new Stack);
      return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
    }

    /**
     * The base implementation of `_.isMap` without Node.js optimizations.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a map, else `false`.
     */
    function baseIsMap(value) {
      return isObjectLike(value) && getTag(value) == mapTag;
    }

    /**
     * The base implementation of `_.isMatch` without support for iteratee shorthands.
     *
     * @private
     * @param {Object} object The object to inspect.
     * @param {Object} source The object of property values to match.
     * @param {Array} matchData The property names, values, and compare flags to match.
     * @param {Function} [customizer] The function to customize comparisons.
     * @returns {boolean} Returns `true` if `object` is a match, else `false`.
     */
    function baseIsMatch(object, source, matchData, customizer) {
      var index = matchData.length,
          length = index,
          noCustomizer = !customizer;

      if (object == null) {
        return !length;
      }
      object = Object(object);
      while (index--) {
        var data = matchData[index];
        if ((noCustomizer && data[2])
              ? data[1] !== object[data[0]]
              : !(data[0] in object)
            ) {
          return false;
        }
      }
      while (++index < length) {
        data = matchData[index];
        var key = data[0],
            objValue = object[key],
            srcValue = data[1];

        if (noCustomizer && data[2]) {
          if (objValue === undefined && !(key in object)) {
            return false;
          }
        } else {
          var stack = new Stack;
          if (customizer) {
            var result = customizer(objValue, srcValue, key, object, source, stack);
          }
          if (!(result === undefined
                ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
                : result
              )) {
            return false;
          }
        }
      }
      return true;
    }

    /**
     * The base implementation of `_.isNative` without bad shim checks.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a native function,
     *  else `false`.
     */
    function baseIsNative(value) {
      if (!isObject(value) || isMasked(value)) {
        return false;
      }
      var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
      return pattern.test(toSource(value));
    }

    /**
     * The base implementation of `_.isRegExp` without Node.js optimizations.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
     */
    function baseIsRegExp(value) {
      return isObjectLike(value) && baseGetTag(value) == regexpTag;
    }

    /**
     * The base implementation of `_.isSet` without Node.js optimizations.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a set, else `false`.
     */
    function baseIsSet(value) {
      return isObjectLike(value) && getTag(value) == setTag;
    }

    /**
     * The base implementation of `_.isTypedArray` without Node.js optimizations.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
     */
    function baseIsTypedArray(value) {
      return isObjectLike(value) &&
        isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
    }

    /**
     * The base implementation of `_.iteratee`.
     *
     * @private
     * @param {*} [value=_.identity] The value to convert to an iteratee.
     * @returns {Function} Returns the iteratee.
     */
    function baseIteratee(value) {
      // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
      // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
      if (typeof value == 'function') {
        return value;
      }
      if (value == null) {
        return identity;
      }
      if (typeof value == 'object') {
        return isArray(value)
          ? baseMatchesProperty(value[0], value[1])
          : baseMatches(value);
      }
      return property(value);
    }

    /**
     * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
     *
     * @private
     * @param {Object} object The object to query.
     * @returns {Array} Returns the array of property names.
     */
    function baseKeys(object) {
      if (!isPrototype(object)) {
        return nativeKeys(object);
      }
      var result = [];
      for (var key in Object(object)) {
        if (hasOwnProperty.call(object, key) && key != 'constructor') {
          result.push(key);
        }
      }
      return result;
    }

    /**
     * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
     *
     * @private
     * @param {Object} object The object to query.
     * @returns {Array} Returns the array of property names.
     */
    function baseKeysIn(object) {
      if (!isObject(object)) {
        return nativeKeysIn(object);
      }
      var isProto = isPrototype(object),
          result = [];

      for (var key in object) {
        if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
          result.push(key);
        }
      }
      return result;
    }

    /**
     * The base implementation of `_.lt` which doesn't coerce arguments.
     *
     * @private
     * @param {*} value The value to compare.
     * @param {*} other The other value to compare.
     * @returns {boolean} Returns `true` if `value` is less than `other`,
     *  else `false`.
     */
    function baseLt(value, other) {
      return value < other;
    }

    /**
     * The base implementation of `_.map` without support for iteratee shorthands.
     *
     * @private
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} iteratee The function invoked per iteration.
     * @returns {Array} Returns the new mapped array.
     */
    function baseMap(collection, iteratee) {
      var index = -1,
          result = isArrayLike(collection) ? Array(collection.length) : [];

      baseEach(collection, function(value, key, collection) {
        result[++index] = iteratee(value, key, collection);
      });
      return result;
    }

    /**
     * The base implementation of `_.matches` which doesn't clone `source`.
     *
     * @private
     * @param {Object} source The object of property values to match.
     * @returns {Function} Returns the new spec function.
     */
    function baseMatches(source) {
      var matchData = getMatchData(source);
      if (matchData.length == 1 && matchData[0][2]) {
        return matchesStrictComparable(matchData[0][0], matchData[0][1]);
      }
      return function(object) {
        return object === source || baseIsMatch(object, source, matchData);
      };
    }

    /**
     * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
     *
     * @private
     * @param {string} path The path of the property to get.
     * @param {*} srcValue The value to match.
     * @returns {Function} Returns the new spec function.
     */
    function baseMatchesProperty(path, srcValue) {
      if (isKey(path) && isStrictComparable(srcValue)) {
        return matchesStrictComparable(toKey(path), srcValue);
      }
      return function(object) {
        var objValue = get(object, path);
        return (objValue === undefined && objValue === srcValue)
          ? hasIn(object, path)
          : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
      };
    }

    /**
     * The base implementation of `_.merge` without support for multiple sources.
     *
     * @private
     * @param {Object} object The destination object.
     * @param {Object} source The source object.
     * @param {number} srcIndex The index of `source`.
     * @param {Function} [customizer] The function to customize merged values.
     * @param {Object} [stack] Tracks traversed source values and their merged
     *  counterparts.
     */
    function baseMerge(object, source, srcIndex, customizer, stack) {
      if (object === source) {
        return;
      }
      baseFor(source, function(srcValue, key) {
        stack || (stack = new Stack);
        if (isObject(srcValue)) {
          baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
        }
        else {
          var newValue = customizer
            ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
            : undefined;

          if (newValue === undefined) {
            newValue = srcValue;
          }
          assignMergeValue(object, key, newValue);
        }
      }, keysIn);
    }

    /**
     * A specialized version of `baseMerge` for arrays and objects which performs
     * deep merges and tracks traversed objects enabling objects with circular
     * references to be merged.
     *
     * @private
     * @param {Object} object The destination object.
     * @param {Object} source The source object.
     * @param {string} key The key of the value to merge.
     * @param {number} srcIndex The index of `source`.
     * @param {Function} mergeFunc The function to merge values.
     * @param {Function} [customizer] The function to customize assigned values.
     * @param {Object} [stack] Tracks traversed source values and their merged
     *  counterparts.
     */
    function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
      var objValue = safeGet(object, key),
          srcValue = safeGet(source, key),
          stacked = stack.get(srcValue);

      if (stacked) {
        assignMergeValue(object, key, stacked);
        return;
      }
      var newValue = customizer
        ? customizer(objValue, srcValue, (key + ''), object, source, stack)
        : undefined;

      var isCommon = newValue === undefined;

      if (isCommon) {
        var isArr = isArray(srcValue),
            isBuff = !isArr && isBuffer(srcValue),
            isTyped = !isArr && !isBuff && isTypedArray(srcValue);

        newValue = srcValue;
        if (isArr || isBuff || isTyped) {
          if (isArray(objValue)) {
            newValue = objValue;
          }
          else if (isArrayLikeObject(objValue)) {
            newValue = copyArray(objValue);
          }
          else if (isBuff) {
            isCommon = false;
            newValue = cloneBuffer(srcValue, true);
          }
          else if (isTyped) {
            isCommon = false;
            newValue = cloneTypedArray(srcValue, true);
          }
          else {
            newValue = [];
          }
        }
        else if (isPlainObject(srcValue) || isArguments(srcValue)) {
          newValue = objValue;
          if (isArguments(objValue)) {
            newValue = toPlainObject(objValue);
          }
          else if (!isObject(objValue) || isFunction(objValue)) {
            newValue = initCloneObject(srcValue);
          }
        }
        else {
          isCommon = false;
        }
      }
      if (isCommon) {
        // Recursively merge objects and arrays (susceptible to call stack limits).
        stack.set(srcValue, newValue);
        mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
        stack['delete'](srcValue);
      }
      assignMergeValue(object, key, newValue);
    }

    /**
     * The base implementation of `_.nth` which doesn't coerce arguments.
     *
     * @private
     * @param {Array} array The array to query.
     * @param {number} n The index of the element to return.
     * @returns {*} Returns the nth element of `array`.
     */
    function baseNth(array, n) {
      var length = array.length;
      if (!length) {
        return;
      }
      n += n < 0 ? length : 0;
      return isIndex(n, length) ? array[n] : undefined;
    }

    /**
     * The base implementation of `_.orderBy` without param guards.
     *
     * @private
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
     * @param {string[]} orders The sort orders of `iteratees`.
     * @returns {Array} Returns the new sorted array.
     */
    function baseOrderBy(collection, iteratees, orders) {
      if (iteratees.length) {
        iteratees = arrayMap(iteratees, function(iteratee) {
          if (isArray(iteratee)) {
            return function(value) {
              return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
            };
          }
          return iteratee;
        });
      } else {
        iteratees = [identity];
      }

      var index = -1;
      iteratees = arrayMap(iteratees, baseUnary(getIteratee()));

      var result = baseMap(collection, function(value, key, collection) {
        var criteria = arrayMap(iteratees, function(iteratee) {
          return iteratee(value);
        });
        return { 'criteria': criteria, 'index': ++index, 'value': value };
      });

      return baseSortBy(result, function(object, other) {
        return compareMultiple(object, other, orders);
      });
    }

    /**
     * The base implementation of `_.pick` without support for individual
     * property identifiers.
     *
     * @private
     * @param {Object} object The source object.
     * @param {string[]} paths The property paths to pick.
     * @returns {Object} Returns the new object.
     */
    function basePick(object, paths) {
      return basePickBy(object, paths, function(value, path) {
        return hasIn(object, path);
      });
    }

    /**
     * The base implementation of  `_.pickBy` without support for iteratee shorthands.
     *
     * @private
     * @param {Object} object The source object.
     * @param {string[]} paths The property paths to pick.
     * @param {Function} predicate The function invoked per property.
     * @returns {Object} Returns the new object.
     */
    function basePickBy(object, paths, predicate) {
      var index = -1,
          length = paths.length,
          result = {};

      while (++index < length) {
        var path = paths[index],
            value = baseGet(object, path);

        if (predicate(value, path)) {
          baseSet(result, castPath(path, object), value);
        }
      }
      return result;
    }

    /**
     * A specialized version of `baseProperty` which supports deep paths.
     *
     * @private
     * @param {Array|string} path The path of the property to get.
     * @returns {Function} Returns the new accessor function.
     */
    function basePropertyDeep(path) {
      return function(object) {
        return baseGet(object, path);
      };
    }

    /**
     * The base implementation of `_.pullAllBy` without support for iteratee
     * shorthands.
     *
     * @private
     * @param {Array} array The array to modify.
     * @param {Array} values The values to remove.
     * @param {Function} [iteratee] The iteratee invoked per element.
     * @param {Function} [comparator] The comparator invoked per element.
     * @returns {Array} Returns `array`.
     */
    function basePullAll(array, values, iteratee, comparator) {
      var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
          index = -1,
          length = values.length,
          seen = array;

      if (array === values) {
        values = copyArray(values);
      }
      if (iteratee) {
        seen = arrayMap(array, baseUnary(iteratee));
      }
      while (++index < length) {
        var fromIndex = 0,
            value = values[index],
            computed = iteratee ? iteratee(value) : value;

        while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
          if (seen !== array) {
            splice.call(seen, fromIndex, 1);
          }
          splice.call(array, fromIndex, 1);
        }
      }
      return array;
    }

    /**
     * The base implementation of `_.pullAt` without support for individual
     * indexes or capturing the removed elements.
     *
     * @private
     * @param {Array} array The array to modify.
     * @param {number[]} indexes The indexes of elements to remove.
     * @returns {Array} Returns `array`.
     */
    function basePullAt(array, indexes) {
      var length = array ? indexes.length : 0,
          lastIndex = length - 1;

      while (length--) {
        var index = indexes[length];
        if (length == lastIndex || index !== previous) {
          var previous = index;
          if (isIndex(index)) {
            splice.call(array, index, 1);
          } else {
            baseUnset(array, index);
          }
        }
      }
      return array;
    }

    /**
     * The base implementation of `_.random` without support for returning
     * floating-point numbers.
     *
     * @private
     * @param {number} lower The lower bound.
     * @param {number} upper The upper bound.
     * @returns {number} Returns the random number.
     */
    function baseRandom(lower, upper) {
      return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
    }

    /**
     * The base implementation of `_.range` and `_.rangeRight` which doesn't
     * coerce arguments.
     *
     * @private
     * @param {number} start The start of the range.
     * @param {number} end The end of the range.
     * @param {number} step The value to increment or decrement by.
     * @param {boolean} [fromRight] Specify iterating from right to left.
     * @returns {Array} Returns the range of numbers.
     */
    function baseRange(start, end, step, fromRight) {
      var index = -1,
          length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
          result = Array(length);

      while (length--) {
        result[fromRight ? length : ++index] = start;
        start += step;
      }
      return result;
    }

    /**
     * The base implementation of `_.repeat` which doesn't coerce arguments.
     *
     * @private
     * @param {string} string The string to repeat.
     * @param {number} n The number of times to repeat the string.
     * @returns {string} Returns the repeated string.
     */
    function baseRepeat(string, n) {
      var result = '';
      if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
        return result;
      }
      // Leverage the exponentiation by squaring algorithm for a faster repeat.
      // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
      do {
        if (n % 2) {
          result += string;
        }
        n = nativeFloor(n / 2);
        if (n) {
          string += string;
        }
      } while (n);

      return result;
    }

    /**
     * The base implementation of `_.rest` which doesn't validate or coerce arguments.
     *
     * @private
     * @param {Function} func The function to apply a rest parameter to.
     * @param {number} [start=func.length-1] The start position of the rest parameter.
     * @returns {Function} Returns the new function.
     */
    function baseRest(func, start) {
      return setToString(overRest(func, start, identity), func + '');
    }

    /**
     * The base implementation of `_.sample`.
     *
     * @private
     * @param {Array|Object} collection The collection to sample.
     * @returns {*} Returns the random element.
     */
    function baseSample(collection) {
      return arraySample(values(collection));
    }

    /**
     * The base implementation of `_.sampleSize` without param guards.
     *
     * @private
     * @param {Array|Object} collection The collection to sample.
     * @param {number} n The number of elements to sample.
     * @returns {Array} Returns the random elements.
     */
    function baseSampleSize(collection, n) {
      var array = values(collection);
      return shuffleSelf(array, baseClamp(n, 0, array.length));
    }

    /**
     * The base implementation of `_.set`.
     *
     * @private
     * @param {Object} object The object to modify.
     * @param {Array|string} path The path of the property to set.
     * @param {*} value The value to set.
     * @param {Function} [customizer] The function to customize path creation.
     * @returns {Object} Returns `object`.
     */
    function baseSet(object, path, value, customizer) {
      if (!isObject(object)) {
        return object;
      }
      path = castPath(path, object);

      var index = -1,
          length = path.length,
          lastIndex = length - 1,
          nested = object;

      while (nested != null && ++index < length) {
        var key = toKey(path[index]),
            newValue = value;

        if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
          return object;
        }

        if (index != lastIndex) {
          var objValue = nested[key];
          newValue = customizer ? customizer(objValue, key, nested) : undefined;
          if (newValue === undefined) {
            newValue = isObject(objValue)
              ? objValue
              : (isIndex(path[index + 1]) ? [] : {});
          }
        }
        assignValue(nested, key, newValue);
        nested = nested[key];
      }
      return object;
    }

    /**
     * The base implementation of `setData` without support for hot loop shorting.
     *
     * @private
     * @param {Function} func The function to associate metadata with.
     * @param {*} data The metadata.
     * @returns {Function} Returns `func`.
     */
    var baseSetData = !metaMap ? identity : function(func, data) {
      metaMap.set(func, data);
      return func;
    };

    /**
     * The base implementation of `setToString` without support for hot loop shorting.
     *
     * @private
     * @param {Function} func The function to modify.
     * @param {Function} string The `toString` result.
     * @returns {Function} Returns `func`.
     */
    var baseSetToString = !defineProperty ? identity : function(func, string) {
      return defineProperty(func, 'toString', {
        'configurable': true,
        'enumerable': false,
        'value': constant(string),
        'writable': true
      });
    };

    /**
     * The base implementation of `_.shuffle`.
     *
     * @private
     * @param {Array|Object} collection The collection to shuffle.
     * @returns {Array} Returns the new shuffled array.
     */
    function baseShuffle(collection) {
      return shuffleSelf(values(collection));
    }

    /**
     * The base implementation of `_.slice` without an iteratee call guard.
     *
     * @private
     * @param {Array} array The array to slice.
     * @param {number} [start=0] The start position.
     * @param {number} [end=array.length] The end position.
     * @returns {Array} Returns the slice of `array`.
     */
    function baseSlice(array, start, end) {
      var index = -1,
          length = array.length;

      if (start < 0) {
        start = -start > length ? 0 : (length + start);
      }
      end = end > length ? length : end;
      if (end < 0) {
        end += length;
      }
      length = start > end ? 0 : ((end - start) >>> 0);
      start >>>= 0;

      var result = Array(length);
      while (++index < length) {
        result[index] = array[index + start];
      }
      return result;
    }

    /**
     * The base implementation of `_.some` without support for iteratee shorthands.
     *
     * @private
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} predicate The function invoked per iteration.
     * @returns {boolean} Returns `true` if any element passes the predicate check,
     *  else `false`.
     */
    function baseSome(collection, predicate) {
      var result;

      baseEach(collection, function(value, index, collection) {
        result = predicate(value, index, collection);
        return !result;
      });
      return !!result;
    }

    /**
     * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
     * performs a binary search of `array` to determine the index at which `value`
     * should be inserted into `array` in order to maintain its sort order.
     *
     * @private
     * @param {Array} array The sorted array to inspect.
     * @param {*} value The value to evaluate.
     * @param {boolean} [retHighest] Specify returning the highest qualified index.
     * @returns {number} Returns the index at which `value` should be inserted
     *  into `array`.
     */
    function baseSortedIndex(array, value, retHighest) {
      var low = 0,
          high = array == null ? low : array.length;

      if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
        while (low < high) {
          var mid = (low + high) >>> 1,
              computed = array[mid];

          if (computed !== null && !isSymbol(computed) &&
              (retHighest ? (computed <= value) : (computed < value))) {
            low = mid + 1;
          } else {
            high = mid;
          }
        }
        return high;
      }
      return baseSortedIndexBy(array, value, identity, retHighest);
    }

    /**
     * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
     * which invokes `iteratee` for `value` and each element of `array` to compute
     * their sort ranking. The iteratee is invoked with one argument; (value).
     *
     * @private
     * @param {Array} array The sorted array to inspect.
     * @param {*} value The value to evaluate.
     * @param {Function} iteratee The iteratee invoked per element.
     * @param {boolean} [retHighest] Specify returning the highest qualified index.
     * @returns {number} Returns the index at which `value` should be inserted
     *  into `array`.
     */
    function baseSortedIndexBy(array, value, iteratee, retHighest) {
      var low = 0,
          high = array == null ? 0 : array.length;
      if (high === 0) {
        return 0;
      }

      value = iteratee(value);
      var valIsNaN = value !== value,
          valIsNull = value === null,
          valIsSymbol = isSymbol(value),
          valIsUndefined = value === undefined;

      while (low < high) {
        var mid = nativeFloor((low + high) / 2),
            computed = iteratee(array[mid]),
            othIsDefined = computed !== undefined,
            othIsNull = computed === null,
            othIsReflexive = computed === computed,
            othIsSymbol = isSymbol(computed);

        if (valIsNaN) {
          var setLow = retHighest || othIsReflexive;
        } else if (valIsUndefined) {
          setLow = othIsReflexive && (retHighest || othIsDefined);
        } else if (valIsNull) {
          setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
        } else if (valIsSymbol) {
          setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
        } else if (othIsNull || othIsSymbol) {
          setLow = false;
        } else {
          setLow = retHighest ? (computed <= value) : (computed < value);
        }
        if (setLow) {
          low = mid + 1;
        } else {
          high = mid;
        }
      }
      return nativeMin(high, MAX_ARRAY_INDEX);
    }

    /**
     * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
     * support for iteratee shorthands.
     *
     * @private
     * @param {Array} array The array to inspect.
     * @param {Function} [iteratee] The iteratee invoked per element.
     * @returns {Array} Returns the new duplicate free array.
     */
    function baseSortedUniq(array, iteratee) {
      var index = -1,
          length = array.length,
          resIndex = 0,
          result = [];

      while (++index < length) {
        var value = array[index],
            computed = iteratee ? iteratee(value) : value;

        if (!index || !eq(computed, seen)) {
          var seen = computed;
          result[resIndex++] = value === 0 ? 0 : value;
        }
      }
      return result;
    }

    /**
     * The base implementation of `_.toNumber` which doesn't ensure correct
     * conversions of binary, hexadecimal, or octal string values.
     *
     * @private
     * @param {*} value The value to process.
     * @returns {number} Returns the number.
     */
    function baseToNumber(value) {
      if (typeof value == 'number') {
        return value;
      }
      if (isSymbol(value)) {
        return NAN;
      }
      return +value;
    }

    /**
     * The base implementation of `_.toString` which doesn't convert nullish
     * values to empty strings.
     *
     * @private
     * @param {*} value The value to process.
     * @returns {string} Returns the string.
     */
    function baseToString(value) {
      // Exit early for strings to avoid a performance hit in some environments.
      if (typeof value == 'string') {
        return value;
      }
      if (isArray(value)) {
        // Recursively convert values (susceptible to call stack limits).
        return arrayMap(value, baseToString) + '';
      }
      if (isSymbol(value)) {
        return symbolToString ? symbolToString.call(value) : '';
      }
      var result = (value + '');
      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
    }

    /**
     * The base implementation of `_.uniqBy` without support for iteratee shorthands.
     *
     * @private
     * @param {Array} array The array to inspect.
     * @param {Function} [iteratee] The iteratee invoked per element.
     * @param {Function} [comparator] The comparator invoked per element.
     * @returns {Array} Returns the new duplicate free array.
     */
    function baseUniq(array, iteratee, comparator) {
      var index = -1,
          includes = arrayIncludes,
          length = array.length,
          isCommon = true,
          result = [],
          seen = result;

      if (comparator) {
        isCommon = false;
        includes = arrayIncludesWith;
      }
      else if (length >= LARGE_ARRAY_SIZE) {
        var set = iteratee ? null : createSet(array);
        if (set) {
          return setToArray(set);
        }
        isCommon = false;
        includes = cacheHas;
        seen = new SetCache;
      }
      else {
        seen = iteratee ? [] : result;
      }
      outer:
      while (++index < length) {
        var value = array[index],
            computed = iteratee ? iteratee(value) : value;

        value = (comparator || value !== 0) ? value : 0;
        if (isCommon && computed === computed) {
          var seenIndex = seen.length;
          while (seenIndex--) {
            if (seen[seenIndex] === computed) {
              continue outer;
            }
          }
          if (iteratee) {
            seen.push(computed);
          }
          result.push(value);
        }
        else if (!includes(seen, computed, comparator)) {
          if (seen !== result) {
            seen.push(computed);
          }
          result.push(value);
        }
      }
      return result;
    }

    /**
     * The base implementation of `_.unset`.
     *
     * @private
     * @param {Object} object The object to modify.
     * @param {Array|string} path The property path to unset.
     * @returns {boolean} Returns `true` if the property is deleted, else `false`.
     */
    function baseUnset(object, path) {
      path = castPath(path, object);

      // Prevent prototype pollution:
      // https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg
      // https://github.com/lodash/lodash/security/advisories/GHSA-f23m-r3pf-42rh
      var index = -1,
          length = path.length;

      if (!length) {
        return true;
      }

      while (++index < length) {
        var key = toKey(path[index]);

        // Always block "__proto__" anywhere in the path if it's not expected
        if (key === '__proto__' && !hasOwnProperty.call(object, '__proto__')) {
          return false;
        }

        // Block constructor/prototype as non-terminal traversal keys to prevent
        // escaping the object graph into built-in constructors and prototypes.
        if ((key === 'constructor' || key === 'prototype') && index < length - 1) {
          return false;
        }
      }

      var obj = parent(object, path);
      return obj == null || delete obj[toKey(last(path))];
    }

    /**
     * The base implementation of `_.update`.
     *
     * @private
     * @param {Object} object The object to modify.
     * @param {Array|string} path The path of the property to update.
     * @param {Function} updater The function to produce the updated value.
     * @param {Function} [customizer] The function to customize path creation.
     * @returns {Object} Returns `object`.
     */
    function baseUpdate(object, path, updater, customizer) {
      return baseSet(object, path, updater(baseGet(object, path)), customizer);
    }

    /**
     * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
     * without support for iteratee shorthands.
     *
     * @private
     * @param {Array} array The array to query.
     * @param {Function} predicate The function invoked per iteration.
     * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
     * @param {boolean} [fromRight] Specify iterating from right to left.
     * @returns {Array} Returns the slice of `array`.
     */
    function baseWhile(array, predicate, isDrop, fromRight) {
      var length = array.length,
          index = fromRight ? length : -1;

      while ((fromRight ? index-- : ++index < length) &&
        predicate(array[index], index, array)) {}

      return isDrop
        ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
        : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
    }

    /**
     * The base implementation of `wrapperValue` which returns the result of
     * performing a sequence of actions on the unwrapped `value`, where each
     * successive action is supplied the return value of the previous.
     *
     * @private
     * @param {*} value The unwrapped value.
     * @param {Array} actions Actions to perform to resolve the unwrapped value.
     * @returns {*} Returns the resolved value.
     */
    function baseWrapperValue(value, actions) {
      var result = value;
      if (result instanceof LazyWrapper) {
        result = result.value();
      }
      return arrayReduce(actions, function(result, action) {
        return action.func.apply(action.thisArg, arrayPush([result], action.args));
      }, result);
    }

    /**
     * The base implementation of methods like `_.xor`, without support for
     * iteratee shorthands, that accepts an array of arrays to inspect.
     *
     * @private
     * @param {Array} arrays The arrays to inspect.
     * @param {Function} [iteratee] The iteratee invoked per element.
     * @param {Function} [comparator] The comparator invoked per element.
     * @returns {Array} Returns the new array of values.
     */
    function baseXor(arrays, iteratee, comparator) {
      var length = arrays.length;
      if (length < 2) {
        return length ? baseUniq(arrays[0]) : [];
      }
      var index = -1,
          result = Array(length);

      while (++index < length) {
        var array = arrays[index],
            othIndex = -1;

        while (++othIndex < length) {
          if (othIndex != index) {
            result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
          }
        }
      }
      return baseUniq(baseFlatten(result, 1), iteratee, comparator);
    }

    /**
     * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
     *
     * @private
     * @param {Array} props The property identifiers.
     * @param {Array} values The property values.
     * @param {Function} assignFunc The function to assign values.
     * @returns {Object} Returns the new object.
     */
    function baseZipObject(props, values, assignFunc) {
      var index = -1,
          length = props.length,
          valsLength = values.length,
          result = {};

      while (++index < length) {
        var value = index < valsLength ? values[index] : undefined;
        assignFunc(result, props[index], value);
      }
      return result;
    }

    /**
     * Casts `value` to an empty array if it's not an array like object.
     *
     * @private
     * @param {*} value The value to inspect.
     * @returns {Array|Object} Returns the cast array-like object.
     */
    function castArrayLikeObject(value) {
      return isArrayLikeObject(value) ? value : [];
    }

    /**
     * Casts `value` to `identity` if it's not a function.
     *
     * @private
     * @param {*} value The value to inspect.
     * @returns {Function} Returns cast function.
     */
    function castFunction(value) {
      return typeof value == 'function' ? value : identity;
    }

    /**
     * Casts `value` to a path array if it's not one.
     *
     * @private
     * @param {*} value The value to inspect.
     * @param {Object} [object] The object to query keys on.
     * @returns {Array} Returns the cast property path array.
     */
    function castPath(value, object) {
      if (isArray(value)) {
        return value;
      }
      return isKey(value, object) ? [value] : stringToPath(toString(value));
    }

    /**
     * A `baseRest` alias which can be replaced with `identity` by module
     * replacement plugins.
     *
     * @private
     * @type {Function}
     * @param {Function} func The function to apply a rest parameter to.
     * @returns {Function} Returns the new function.
     */
    var castRest = baseRest;

    /**
     * Casts `array` to a slice if it's needed.
     *
     * @private
     * @param {Array} array The array to inspect.
     * @param {number} start The start position.
     * @param {number} [end=array.length] The end position.
     * @returns {Array} Returns the cast slice.
     */
    function castSlice(array, start, end) {
      var length = array.length;
      end = end === undefined ? length : end;
      return (!start && end >= length) ? array : baseSlice(array, start, end);
    }

    /**
     * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
     *
     * @private
     * @param {number|Object} id The timer id or timeout object of the timer to clear.
     */
    var clearTimeout = ctxClearTimeout || function(id) {
      return root.clearTimeout(id);
    };

    /**
     * Creates a clone of  `buffer`.
     *
     * @private
     * @param {Buffer} buffer The buffer to clone.
     * @param {boolean} [isDeep] Specify a deep clone.
     * @returns {Buffer} Returns the cloned buffer.
     */
    function cloneBuffer(buffer, isDeep) {
      if (isDeep) {
        return buffer.slice();
      }
      var length = buffer.length,
          result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);

      buffer.copy(result);
      return result;
    }

    /**
     * Creates a clone of `arrayBuffer`.
     *
     * @private
     * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
     * @returns {ArrayBuffer} Returns the cloned array buffer.
     */
    function cloneArrayBuffer(arrayBuffer) {
      var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
      new Uint8Array(result).set(new Uint8Array(arrayBuffer));
      return result;
    }

    /**
     * Creates a clone of `dataView`.
     *
     * @private
     * @param {Object} dataView The data view to clone.
     * @param {boolean} [isDeep] Specify a deep clone.
     * @returns {Object} Returns the cloned data view.
     */
    function cloneDataView(dataView, isDeep) {
      var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
      return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
    }

    /**
     * Creates a clone of `regexp`.
     *
     * @private
     * @param {Object} regexp The regexp to clone.
     * @returns {Object} Returns the cloned regexp.
     */
    function cloneRegExp(regexp) {
      var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
      result.lastIndex = regexp.lastIndex;
      return result;
    }

    /**
     * Creates a clone of the `symbol` object.
     *
     * @private
     * @param {Object} symbol The symbol object to clone.
     * @returns {Object} Returns the cloned symbol object.
     */
    function cloneSymbol(symbol) {
      return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
    }

    /**
     * Creates a clone of `typedArray`.
     *
     * @private
     * @param {Object} typedArray The typed array to clone.
     * @param {boolean} [isDeep] Specify a deep clone.
     * @returns {Object} Returns the cloned typed array.
     */
    function cloneTypedArray(typedArray, isDeep) {
      var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
      return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
    }

    /**
     * Compares values to sort them in ascending order.
     *
     * @private
     * @param {*} value The value to compare.
     * @param {*} other The other value to compare.
     * @returns {number} Returns the sort order indicator for `value`.
     */
    function compareAscending(value, other) {
      if (value !== other) {
        var valIsDefined = value !== undefined,
            valIsNull = value === null,
            valIsReflexive = value === value,
            valIsSymbol = isSymbol(value);

        var othIsDefined = other !== undefined,
            othIsNull = other === null,
            othIsReflexive = other === other,
            othIsSymbol = isSymbol(other);

        if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
            (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
            (valIsNull && othIsDefined && othIsReflexive) ||
            (!valIsDefined && othIsReflexive) ||
            !valIsReflexive) {
          return 1;
        }
        if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
            (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
            (othIsNull && valIsDefined && valIsReflexive) ||
            (!othIsDefined && valIsReflexive) ||
            !othIsReflexive) {
          return -1;
        }
      }
      return 0;
    }

    /**
     * Used by `_.orderBy` to compare multiple properties of a value to another
     * and stable sort them.
     *
     * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
     * specify an order of "desc" for descending or "asc" for ascending sort order
     * of corresponding values.
     *
     * @private
     * @param {Object} object The object to compare.
     * @param {Object} other The other object to compare.
     * @param {boolean[]|string[]} orders The order to sort by for each property.
     * @returns {number} Returns the sort order indicator for `object`.
     */
    function compareMultiple(object, other, orders) {
      var index = -1,
          objCriteria = object.criteria,
          othCriteria = other.criteria,
          length = objCriteria.length,
          ordersLength = orders.length;

      while (++index < length) {
        var result = compareAscending(objCriteria[index], othCriteria[index]);
        if (result) {
          if (index >= ordersLength) {
            return result;
          }
          var order = orders[index];
          return result * (order == 'desc' ? -1 : 1);
        }
      }
      // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
      // that causes it, under certain circumstances, to provide the same value for
      // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
      // for more details.
      //
      // This also ensures a stable sort in V8 and other engines.
      // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
      return object.index - other.index;
    }

    /**
     * Creates an array that is the composition of partially applied arguments,
     * placeholders, and provided arguments into a single array of arguments.
     *
     * @private
     * @param {Array} args The provided arguments.
     * @param {Array} partials The arguments to prepend to those provided.
     * @param {Array} holders The `partials` placeholder indexes.
     * @params {boolean} [isCurried] Specify composing for a curried function.
     * @returns {Array} Returns the new array of composed arguments.
     */
    function composeArgs(args, partials, holders, isCurried) {
      var argsIndex = -1,
          argsLength = args.length,
          holdersLength = holders.length,
          leftIndex = -1,
          leftLength = partials.length,
          rangeLength = nativeMax(argsLength - holdersLength, 0),
          result = Array(leftLength + rangeLength),
          isUncurried = !isCurried;

      while (++leftIndex < leftLength) {
        result[leftIndex] = partials[leftIndex];
      }
      while (++argsIndex < holdersLength) {
        if (isUncurried || argsIndex < argsLength) {
          result[holders[argsIndex]] = args[argsIndex];
        }
      }
      while (rangeLength--) {
        result[leftIndex++] = args[argsIndex++];
      }
      return result;
    }

    /**
     * This function is like `composeArgs` except that the arguments composition
     * is tailored for `_.partialRight`.
     *
     * @private
     * @param {Array} args The provided arguments.
     * @param {Array} partials The arguments to append to those provided.
     * @param {Array} holders The `partials` placeholder indexes.
     * @params {boolean} [isCurried] Specify composing for a curried function.
     * @returns {Array} Returns the new array of composed arguments.
     */
    function composeArgsRight(args, partials, holders, isCurried) {
      var argsIndex = -1,
          argsLength = args.length,
          holdersIndex = -1,
          holdersLength = holders.length,
          rightIndex = -1,
          rightLength = partials.length,
          rangeLength = nativeMax(argsLength - holdersLength, 0),
          result = Array(rangeLength + rightLength),
          isUncurried = !isCurried;

      while (++argsIndex < rangeLength) {
        result[argsIndex] = args[argsIndex];
      }
      var offset = argsIndex;
      while (++rightIndex < rightLength) {
        result[offset + rightIndex] = partials[rightIndex];
      }
      while (++holdersIndex < holdersLength) {
        if (isUncurried || argsIndex < argsLength) {
          result[offset + holders[holdersIndex]] = args[argsIndex++];
        }
      }
      return result;
    }

    /**
     * Copies the values of `source` to `array`.
     *
     * @private
     * @param {Array} source The array to copy values from.
     * @param {Array} [array=[]] The array to copy values to.
     * @returns {Array} Returns `array`.
     */
    function copyArray(source, array) {
      var index = -1,
          length = source.length;

      array || (array = Array(length));
      while (++index < length) {
        array[index] = source[index];
      }
      return array;
    }

    /**
     * Copies properties of `source` to `object`.
     *
     * @private
     * @param {Object} source The object to copy properties from.
     * @param {Array} props The property identifiers to copy.
     * @param {Object} [object={}] The object to copy properties to.
     * @param {Function} [customizer] The function to customize copied values.
     * @returns {Object} Returns `object`.
     */
    function copyObject(source, props, object, customizer) {
      var isNew = !object;
      object || (object = {});

      var index = -1,
          length = props.length;

      while (++index < length) {
        var key = props[index];

        var newValue = customizer
          ? customizer(object[key], source[key], key, object, source)
          : undefined;

        if (newValue === undefined) {
          newValue = source[key];
        }
        if (isNew) {
          baseAssignValue(object, key, newValue);
        } else {
          assignValue(object, key, newValue);
        }
      }
      return object;
    }

    /**
     * Copies own symbols of `source` to `object`.
     *
     * @private
     * @param {Object} source The object to copy symbols from.
     * @param {Object} [object={}] The object to copy symbols to.
     * @returns {Object} Returns `object`.
     */
    function copySymbols(source, object) {
      return copyObject(source, getSymbols(source), object);
    }

    /**
     * Copies own and inherited symbols of `source` to `object`.
     *
     * @private
     * @param {Object} source The object to copy symbols from.
     * @param {Object} [object={}] The object to copy symbols to.
     * @returns {Object} Returns `object`.
     */
    function copySymbolsIn(source, object) {
      return copyObject(source, getSymbolsIn(source), object);
    }

    /**
     * Creates a function like `_.groupBy`.
     *
     * @private
     * @param {Function} setter The function to set accumulator values.
     * @param {Function} [initializer] The accumulator object initializer.
     * @returns {Function} Returns the new aggregator function.
     */
    function createAggregator(setter, initializer) {
      return function(collection, iteratee) {
        var func = isArray(collection) ? arrayAggregator : baseAggregator,
            accumulator = initializer ? initializer() : {};

        return func(collection, setter, getIteratee(iteratee, 2), accumulator);
      };
    }

    /**
     * Creates a function like `_.assign`.
     *
     * @private
     * @param {Function} assigner The function to assign values.
     * @returns {Function} Returns the new assigner function.
     */
    function createAssigner(assigner) {
      return baseRest(function(object, sources) {
        var index = -1,
            length = sources.length,
            customizer = length > 1 ? sources[length - 1] : undefined,
            guard = length > 2 ? sources[2] : undefined;

        customizer = (assigner.length > 3 && typeof customizer == 'function')
          ? (length--, customizer)
          : undefined;

        if (guard && isIterateeCall(sources[0], sources[1], guard)) {
          customizer = length < 3 ? undefined : customizer;
          length = 1;
        }
        object = Object(object);
        while (++index < length) {
          var source = sources[index];
          if (source) {
            assigner(object, source, index, customizer);
          }
        }
        return object;
      });
    }

    /**
     * Creates a `baseEach` or `baseEachRight` function.
     *
     * @private
     * @param {Function} eachFunc The function to iterate over a collection.
     * @param {boolean} [fromRight] Specify iterating from right to left.
     * @returns {Function} Returns the new base function.
     */
    function createBaseEach(eachFunc, fromRight) {
      return function(collection, iteratee) {
        if (collection == null) {
          return collection;
        }
        if (!isArrayLike(collection)) {
          return eachFunc(collection, iteratee);
        }
        var length = collection.length,
            index = fromRight ? length : -1,
            iterable = Object(collection);

        while ((fromRight ? index-- : ++index < length)) {
          if (iteratee(iterable[index], index, iterable) === false) {
            break;
          }
        }
        return collection;
      };
    }

    /**
     * Creates a base function for methods like `_.forIn` and `_.forOwn`.
     *
     * @private
     * @param {boolean} [fromRight] Specify iterating from right to left.
     * @returns {Function} Returns the new base function.
     */
    function createBaseFor(fromRight) {
      return function(object, iteratee, keysFunc) {
        var index = -1,
            iterable = Object(object),
            props = keysFunc(object),
            length = props.length;

        while (length--) {
          var key = props[fromRight ? length : ++index];
          if (iteratee(iterable[key], key, iterable) === false) {
            break;
          }
        }
        return object;
      };
    }

    /**
     * Creates a function that wraps `func` to invoke it with the optional `this`
     * binding of `thisArg`.
     *
     * @private
     * @param {Function} func The function to wrap.
     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
     * @param {*} [thisArg] The `this` binding of `func`.
     * @returns {Function} Returns the new wrapped function.
     */
    function createBind(func, bitmask, thisArg) {
      var isBind = bitmask & WRAP_BIND_FLAG,
          Ctor = createCtor(func);

      function wrapper() {
        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
        return fn.apply(isBind ? thisArg : this, arguments);
      }
      return wrapper;
    }

    /**
     * Creates a function like `_.lowerFirst`.
     *
     * @private
     * @param {string} methodName The name of the `String` case method to use.
     * @returns {Function} Returns the new case function.
     */
    function createCaseFirst(methodName) {
      return function(string) {
        string = toString(string);

        var strSymbols = hasUnicode(string)
          ? stringToArray(string)
          : undefined;

        var chr = strSymbols
          ? strSymbols[0]
          : string.charAt(0);

        var trailing = strSymbols
          ? castSlice(strSymbols, 1).join('')
          : string.slice(1);

        return chr[methodName]() + trailing;
      };
    }

    /**
     * Creates a function like `_.camelCase`.
     *
     * @private
     * @param {Function} callback The function to combine each word.
     * @returns {Function} Returns the new compounder function.
     */
    function createCompounder(callback) {
      return function(string) {
        return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
      };
    }

    /**
     * Creates a function that produces an instance of `Ctor` regardless of
     * whether it was invoked as part of a `new` expression or by `call` or `apply`.
     *
     * @private
     * @param {Function} Ctor The constructor to wrap.
     * @returns {Function} Returns the new wrapped function.
     */
    function createCtor(Ctor) {
      return function() {
        // Use a `switch` statement to work with class constructors. See
        // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
        // for more details.
        var args = arguments;
        switch (args.length) {
          case 0: return new Ctor;
          case 1: return new Ctor(args[0]);
          case 2: return new Ctor(args[0], args[1]);
          case 3: return new Ctor(args[0], args[1], args[2]);
          case 4: return new Ctor(args[0], args[1], args[2], args[3]);
          case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
          case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
          case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
        }
        var thisBinding = baseCreate(Ctor.prototype),
            result = Ctor.apply(thisBinding, args);

        // Mimic the constructor's `return` behavior.
        // See https://es5.github.io/#x13.2.2 for more details.
        return isObject(result) ? result : thisBinding;
      };
    }

    /**
     * Creates a function that wraps `func` to enable currying.
     *
     * @private
     * @param {Function} func The function to wrap.
     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
     * @param {number} arity The arity of `func`.
     * @returns {Function} Returns the new wrapped function.
     */
    function createCurry(func, bitmask, arity) {
      var Ctor = createCtor(func);

      function wrapper() {
        var length = arguments.length,
            args = Array(length),
            index = length,
            placeholder = getHolder(wrapper);

        while (index--) {
          args[index] = arguments[index];
        }
        var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
          ? []
          : replaceHolders(args, placeholder);

        length -= holders.length;
        if (length < arity) {
          return createRecurry(
            func, bitmask, createHybrid, wrapper.placeholder, undefined,
            args, holders, undefined, undefined, arity - length);
        }
        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
        return apply(fn, this, args);
      }
      return wrapper;
    }

    /**
     * Creates a `_.find` or `_.findLast` function.
     *
     * @private
     * @param {Function} findIndexFunc The function to find the collection index.
     * @returns {Function} Returns the new find function.
     */
    function createFind(findIndexFunc) {
      return function(collection, predicate, fromIndex) {
        var iterable = Object(collection);
        if (!isArrayLike(collection)) {
          var iteratee = getIteratee(predicate, 3);
          collection = keys(collection);
          predicate = function(key) { return iteratee(iterable[key], key, iterable); };
        }
        var index = findIndexFunc(collection, predicate, fromIndex);
        return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
      };
    }

    /**
     * Creates a `_.flow` or `_.flowRight` function.
     *
     * @private
     * @param {boolean} [fromRight] Specify iterating from right to left.
     * @returns {Function} Returns the new flow function.
     */
    function createFlow(fromRight) {
      return flatRest(function(funcs) {
        var length = funcs.length,
            index = length,
            prereq = LodashWrapper.prototype.thru;

        if (fromRight) {
          funcs.reverse();
        }
        while (index--) {
          var func = funcs[index];
          if (typeof func != 'function') {
            throw new TypeError(FUNC_ERROR_TEXT);
          }
          if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
            var wrapper = new LodashWrapper([], true);
          }
        }
        index = wrapper ? index : length;
        while (++index < length) {
          func = funcs[index];

          var funcName = getFuncName(func),
              data = funcName == 'wrapper' ? getData(func) : undefined;

          if (data && isLaziable(data[0]) &&
                data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
                !data[4].length && data[9] == 1
              ) {
            wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
          } else {
            wrapper = (func.length == 1 && isLaziable(func))
              ? wrapper[funcName]()
              : wrapper.thru(func);
          }
        }
        return function() {
          var args = arguments,
              value = args[0];

          if (wrapper && args.length == 1 && isArray(value)) {
            return wrapper.plant(value).value();
          }
          var index = 0,
              result = length ? funcs[index].apply(this, args) : value;

          while (++index < length) {
            result = funcs[index].call(this, result);
          }
          return result;
        };
      });
    }

    /**
     * Creates a function that wraps `func` to invoke it with optional `this`
     * binding of `thisArg`, partial application, and currying.
     *
     * @private
     * @param {Function|string} func The function or method name to wrap.
     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
     * @param {*} [thisArg] The `this` binding of `func`.
     * @param {Array} [partials] The arguments to prepend to those provided to
     *  the new function.
     * @param {Array} [holders] The `partials` placeholder indexes.
     * @param {Array} [partialsRight] The arguments to append to those provided
     *  to the new function.
     * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
     * @param {Array} [argPos] The argument positions of the new function.
     * @param {number} [ary] The arity cap of `func`.
     * @param {number} [arity] The arity of `func`.
     * @returns {Function} Returns the new wrapped function.
     */
    function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
      var isAry = bitmask & WRAP_ARY_FLAG,
          isBind = bitmask & WRAP_BIND_FLAG,
          isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
          isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
          isFlip = bitmask & WRAP_FLIP_FLAG,
          Ctor = isBindKey ? undefined : createCtor(func);

      function wrapper() {
        var length = arguments.length,
            args = Array(length),
            index = length;

        while (index--) {
          args[index] = arguments[index];
        }
        if (isCurried) {
          var placeholder = getHolder(wrapper),
              holdersCount = countHolders(args, placeholder);
        }
        if (partials) {
          args = composeArgs(args, partials, holders, isCurried);
        }
        if (partialsRight) {
          args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
        }
        length -= holdersCount;
        if (isCurried && length < arity) {
          var newHolders = replaceHolders(args, placeholder);
          return createRecurry(
            func, bitmask, createHybrid, wrapper.placeholder, thisArg,
            args, newHolders, argPos, ary, arity - length
          );
        }
        var thisBinding = isBind ? thisArg : this,
            fn = isBindKey ? thisBinding[func] : func;

        length = args.length;
        if (argPos) {
          args = reorder(args, argPos);
        } else if (isFlip && length > 1) {
          args.reverse();
        }
        if (isAry && ary < length) {
          args.length = ary;
        }
        if (this && this !== root && this instanceof wrapper) {
          fn = Ctor || createCtor(fn);
        }
        return fn.apply(thisBinding, args);
      }
      return wrapper;
    }

    /**
     * Creates a function like `_.invertBy`.
     *
     * @private
     * @param {Function} setter The function to set accumulator values.
     * @param {Function} toIteratee The function to resolve iteratees.
     * @returns {Function} Returns the new inverter function.
     */
    function createInverter(setter, toIteratee) {
      return function(object, iteratee) {
        return baseInverter(object, setter, toIteratee(iteratee), {});
      };
    }

    /**
     * Creates a function that performs a mathematical operation on two values.
     *
     * @private
     * @param {Function} operator The function to perform the operation.
     * @param {number} [defaultValue] The value used for `undefined` arguments.
     * @returns {Function} Returns the new mathematical operation function.
     */
    function createMathOperation(operator, defaultValue) {
      return function(value, other) {
        var result;
        if (value === undefined && other === undefined) {
          return defaultValue;
        }
        if (value !== undefined) {
          result = value;
        }
        if (other !== undefined) {
          if (result === undefined) {
            return other;
          }
          if (typeof value == 'string' || typeof other == 'string') {
            value = baseToString(value);
            other = baseToString(other);
          } else {
            value = baseToNumber(value);
            other = baseToNumber(other);
          }
          result = operator(value, other);
        }
        return result;
      };
    }

    /**
     * Creates a function like `_.over`.
     *
     * @private
     * @param {Function} arrayFunc The function to iterate over iteratees.
     * @returns {Function} Returns the new over function.
     */
    function createOver(arrayFunc) {
      return flatRest(function(iteratees) {
        iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
        return baseRest(function(args) {
          var thisArg = this;
          return arrayFunc(iteratees, function(iteratee) {
            return apply(iteratee, thisArg, args);
          });
        });
      });
    }

    /**
     * Creates the padding for `string` based on `length`. The `chars` string
     * is truncated if the number of characters exceeds `length`.
     *
     * @private
     * @param {number} length The padding length.
     * @param {string} [chars=' '] The string used as padding.
     * @returns {string} Returns the padding for `string`.
     */
    function createPadding(length, chars) {
      chars = chars === undefined ? ' ' : baseToString(chars);

      var charsLength = chars.length;
      if (charsLength < 2) {
        return charsLength ? baseRepeat(chars, length) : chars;
      }
      var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
      return hasUnicode(chars)
        ? castSlice(stringToArray(result), 0, length).join('')
        : result.slice(0, length);
    }

    /**
     * Creates a function that wraps `func` to invoke it with the `this` binding
     * of `thisArg` and `partials` prepended to the arguments it receives.
     *
     * @private
     * @param {Function} func The function to wrap.
     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
     * @param {*} thisArg The `this` binding of `func`.
     * @param {Array} partials The arguments to prepend to those provided to
     *  the new function.
     * @returns {Function} Returns the new wrapped function.
     */
    function createPartial(func, bitmask, thisArg, partials) {
      var isBind = bitmask & WRAP_BIND_FLAG,
          Ctor = createCtor(func);

      function wrapper() {
        var argsIndex = -1,
            argsLength = arguments.length,
            leftIndex = -1,
            leftLength = partials.length,
            args = Array(leftLength + argsLength),
            fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;

        while (++leftIndex < leftLength) {
          args[leftIndex] = partials[leftIndex];
        }
        while (argsLength--) {
          args[leftIndex++] = arguments[++argsIndex];
        }
        return apply(fn, isBind ? thisArg : this, args);
      }
      return wrapper;
    }

    /**
     * Creates a `_.range` or `_.rangeRight` function.
     *
     * @private
     * @param {boolean} [fromRight] Specify iterating from right to left.
     * @returns {Function} Returns the new range function.
     */
    function createRange(fromRight) {
      return function(start, end, step) {
        if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
          end = step = undefined;
        }
        // Ensure the sign of `-0` is preserved.
        start = toFinite(start);
        if (end === undefined) {
          end = start;
          start = 0;
        } else {
          end = toFinite(end);
        }
        step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
        return baseRange(start, end, step, fromRight);
      };
    }

    /**
     * Creates a function that performs a relational operation on two values.
     *
     * @private
     * @param {Function} operator The function to perform the operation.
     * @returns {Function} Returns the new relational operation function.
     */
    function createRelationalOperation(operator) {
      return function(value, other) {
        if (!(typeof value == 'string' && typeof other == 'string')) {
          value = toNumber(value);
          other = toNumber(other);
        }
        return operator(value, other);
      };
    }

    /**
     * Creates a function that wraps `func` to continue currying.
     *
     * @private
     * @param {Function} func The function to wrap.
     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
     * @param {Function} wrapFunc The function to create the `func` wrapper.
     * @param {*} placeholder The placeholder value.
     * @param {*} [thisArg] The `this` binding of `func`.
     * @param {Array} [partials] The arguments to prepend to those provided to
     *  the new function.
     * @param {Array} [holders] The `partials` placeholder indexes.
     * @param {Array} [argPos] The argument positions of the new function.
     * @param {number} [ary] The arity cap of `func`.
     * @param {number} [arity] The arity of `func`.
     * @returns {Function} Returns the new wrapped function.
     */
    function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
      var isCurry = bitmask & WRAP_CURRY_FLAG,
          newHolders = isCurry ? holders : undefined,
          newHoldersRight = isCurry ? undefined : holders,
          newPartials = isCurry ? partials : undefined,
          newPartialsRight = isCurry ? undefined : partials;

      bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
      bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);

      if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
        bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
      }
      var newData = [
        func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
        newHoldersRight, argPos, ary, arity
      ];

      var result = wrapFunc.apply(undefined, newData);
      if (isLaziable(func)) {
        setData(result, newData);
      }
      result.placeholder = placeholder;
      return setWrapToString(result, func, bitmask);
    }

    /**
     * Creates a function like `_.round`.
     *
     * @private
     * @param {string} methodName The name of the `Math` method to use when rounding.
     * @returns {Function} Returns the new round function.
     */
    function createRound(methodName) {
      var func = Math[methodName];
      return function(number, precision) {
        number = toNumber(number);
        precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
        if (precision && nativeIsFinite(number)) {
          // Shift with exponential notation to avoid floating-point issues.
          // See [MDN](https://mdn.io/round#Examples) for more details.
          var pair = (toString(number) + 'e').split('e'),
              value = func(pair[0] + 'e' + (+pair[1] + precision));

          pair = (toString(value) + 'e').split('e');
          return +(pair[0] + 'e' + (+pair[1] - precision));
        }
        return func(number);
      };
    }

    /**
     * Creates a set object of `values`.
     *
     * @private
     * @param {Array} values The values to add to the set.
     * @returns {Object} Returns the new set.
     */
    var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
      return new Set(values);
    };

    /**
     * Creates a `_.toPairs` or `_.toPairsIn` function.
     *
     * @private
     * @param {Function} keysFunc The function to get the keys of a given object.
     * @returns {Function} Returns the new pairs function.
     */
    function createToPairs(keysFunc) {
      return function(object) {
        var tag = getTag(object);
        if (tag == mapTag) {
          return mapToArray(object);
        }
        if (tag == setTag) {
          return setToPairs(object);
        }
        return baseToPairs(object, keysFunc(object));
      };
    }

    /**
     * Creates a function that either curries or invokes `func` with optional
     * `this` binding and partially applied arguments.
     *
     * @private
     * @param {Function|string} func The function or method name to wrap.
     * @param {number} bitmask The bitmask flags.
     *    1 - `_.bind`
     *    2 - `_.bindKey`
     *    4 - `_.curry` or `_.curryRight` of a bound function
     *    8 - `_.curry`
     *   16 - `_.curryRight`
     *   32 - `_.partial`
     *   64 - `_.partialRight`
     *  128 - `_.rearg`
     *  256 - `_.ary`
     *  512 - `_.flip`
     * @param {*} [thisArg] The `this` binding of `func`.
     * @param {Array} [partials] The arguments to be partially applied.
     * @param {Array} [holders] The `partials` placeholder indexes.
     * @param {Array} [argPos] The argument positions of the new function.
     * @param {number} [ary] The arity cap of `func`.
     * @param {number} [arity] The arity of `func`.
     * @returns {Function} Returns the new wrapped function.
     */
    function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
      var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
      if (!isBindKey && typeof func != 'function') {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      var length = partials ? partials.length : 0;
      if (!length) {
        bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
        partials = holders = undefined;
      }
      ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
      arity = arity === undefined ? arity : toInteger(arity);
      length -= holders ? holders.length : 0;

      if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
        var partialsRight = partials,
            holdersRight = holders;

        partials = holders = undefined;
      }
      var data = isBindKey ? undefined : getData(func);

      var newData = [
        func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
        argPos, ary, arity
      ];

      if (data) {
        mergeData(newData, data);
      }
      func = newData[0];
      bitmask = newData[1];
      thisArg = newData[2];
      partials = newData[3];
      holders = newData[4];
      arity = newData[9] = newData[9] === undefined
        ? (isBindKey ? 0 : func.length)
        : nativeMax(newData[9] - length, 0);

      if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
        bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
      }
      if (!bitmask || bitmask == WRAP_BIND_FLAG) {
        var result = createBind(func, bitmask, thisArg);
      } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
        result = createCurry(func, bitmask, arity);
      } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
        result = createPartial(func, bitmask, thisArg, partials);
      } else {
        result = createHybrid.apply(undefined, newData);
      }
      var setter = data ? baseSetData : setData;
      return setWrapToString(setter(result, newData), func, bitmask);
    }

    /**
     * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
     * of source objects to the destination object for all destination properties
     * that resolve to `undefined`.
     *
     * @private
     * @param {*} objValue The destination value.
     * @param {*} srcValue The source value.
     * @param {string} key The key of the property to assign.
     * @param {Object} object The parent object of `objValue`.
     * @returns {*} Returns the value to assign.
     */
    function customDefaultsAssignIn(objValue, srcValue, key, object) {
      if (objValue === undefined ||
          (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
        return srcValue;
      }
      return objValue;
    }

    /**
     * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
     * objects into destination objects that are passed thru.
     *
     * @private
     * @param {*} objValue The destination value.
     * @param {*} srcValue The source value.
     * @param {string} key The key of the property to merge.
     * @param {Object} object The parent object of `objValue`.
     * @param {Object} source The parent object of `srcValue`.
     * @param {Object} [stack] Tracks traversed source values and their merged
     *  counterparts.
     * @returns {*} Returns the value to assign.
     */
    function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
      if (isObject(objValue) && isObject(srcValue)) {
        // Recursively merge objects and arrays (susceptible to call stack limits).
        stack.set(srcValue, objValue);
        baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
        stack['delete'](srcValue);
      }
      return objValue;
    }

    /**
     * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
     * objects.
     *
     * @private
     * @param {*} value The value to inspect.
     * @param {string} key The key of the property to inspect.
     * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
     */
    function customOmitClone(value) {
      return isPlainObject(value) ? undefined : value;
    }

    /**
     * A specialized version of `baseIsEqualDeep` for arrays with support for
     * partial deep comparisons.
     *
     * @private
     * @param {Array} array The array to compare.
     * @param {Array} other The other array to compare.
     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
     * @param {Function} customizer The function to customize comparisons.
     * @param {Function} equalFunc The function to determine equivalents of values.
     * @param {Object} stack Tracks traversed `array` and `other` objects.
     * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
     */
    function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
          arrLength = array.length,
          othLength = other.length;

      if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
        return false;
      }
      // Check that cyclic values are equal.
      var arrStacked = stack.get(array);
      var othStacked = stack.get(other);
      if (arrStacked && othStacked) {
        return arrStacked == other && othStacked == array;
      }
      var index = -1,
          result = true,
          seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;

      stack.set(array, other);
      stack.set(other, array);

      // Ignore non-index properties.
      while (++index < arrLength) {
        var arrValue = array[index],
            othValue = other[index];

        if (customizer) {
          var compared = isPartial
            ? customizer(othValue, arrValue, index, other, array, stack)
            : customizer(arrValue, othValue, index, array, other, stack);
        }
        if (compared !== undefined) {
          if (compared) {
            continue;
          }
          result = false;
          break;
        }
        // Recursively compare arrays (susceptible to call stack limits).
        if (seen) {
          if (!arraySome(other, function(othValue, othIndex) {
                if (!cacheHas(seen, othIndex) &&
                    (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
                  return seen.push(othIndex);
                }
              })) {
            result = false;
            break;
          }
        } else if (!(
              arrValue === othValue ||
                equalFunc(arrValue, othValue, bitmask, customizer, stack)
            )) {
          result = false;
          break;
        }
      }
      stack['delete'](array);
      stack['delete'](other);
      return result;
    }

    /**
     * A specialized version of `baseIsEqualDeep` for comparing objects of
     * the same `toStringTag`.
     *
     * **Note:** This function only supports comparing values with tags of
     * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
     *
     * @private
     * @param {Object} object The object to compare.
     * @param {Object} other The other object to compare.
     * @param {string} tag The `toStringTag` of the objects to compare.
     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
     * @param {Function} customizer The function to customize comparisons.
     * @param {Function} equalFunc The function to determine equivalents of values.
     * @param {Object} stack Tracks traversed `object` and `other` objects.
     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
     */
    function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
      switch (tag) {
        case dataViewTag:
          if ((object.byteLength != other.byteLength) ||
              (object.byteOffset != other.byteOffset)) {
            return false;
          }
          object = object.buffer;
          other = other.buffer;

        case arrayBufferTag:
          if ((object.byteLength != other.byteLength) ||
              !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
            return false;
          }
          return true;

        case boolTag:
        case dateTag:
        case numberTag:
          // Coerce booleans to `1` or `0` and dates to milliseconds.
          // Invalid dates are coerced to `NaN`.
          return eq(+object, +other);

        case errorTag:
          return object.name == other.name && object.message == other.message;

        case regexpTag:
        case stringTag:
          // Coerce regexes to strings and treat strings, primitives and objects,
          // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
          // for more details.
          return object == (other + '');

        case mapTag:
          var convert = mapToArray;

        case setTag:
          var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
          convert || (convert = setToArray);

          if (object.size != other.size && !isPartial) {
            return false;
          }
          // Assume cyclic values are equal.
          var stacked = stack.get(object);
          if (stacked) {
            return stacked == other;
          }
          bitmask |= COMPARE_UNORDERED_FLAG;

          // Recursively compare objects (susceptible to call stack limits).
          stack.set(object, other);
          var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
          stack['delete'](object);
          return result;

        case symbolTag:
          if (symbolValueOf) {
            return symbolValueOf.call(object) == symbolValueOf.call(other);
          }
      }
      return false;
    }

    /**
     * A specialized version of `baseIsEqualDeep` for objects with support for
     * partial deep comparisons.
     *
     * @private
     * @param {Object} object The object to compare.
     * @param {Object} other The other object to compare.
     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
     * @param {Function} customizer The function to customize comparisons.
     * @param {Function} equalFunc The function to determine equivalents of values.
     * @param {Object} stack Tracks traversed `object` and `other` objects.
     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
     */
    function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
          objProps = getAllKeys(object),
          objLength = objProps.length,
          othProps = getAllKeys(other),
          othLength = othProps.length;

      if (objLength != othLength && !isPartial) {
        return false;
      }
      var index = objLength;
      while (index--) {
        var key = objProps[index];
        if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
          return false;
        }
      }
      // Check that cyclic values are equal.
      var objStacked = stack.get(object);
      var othStacked = stack.get(other);
      if (objStacked && othStacked) {
        return objStacked == other && othStacked == object;
      }
      var result = true;
      stack.set(object, other);
      stack.set(other, object);

      var skipCtor = isPartial;
      while (++index < objLength) {
        key = objProps[index];
        var objValue = object[key],
            othValue = other[key];

        if (customizer) {
          var compared = isPartial
            ? customizer(othValue, objValue, key, other, object, stack)
            : customizer(objValue, othValue, key, object, other, stack);
        }
        // Recursively compare objects (susceptible to call stack limits).
        if (!(compared === undefined
              ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
              : compared
            )) {
          result = false;
          break;
        }
        skipCtor || (skipCtor = key == 'constructor');
      }
      if (result && !skipCtor) {
        var objCtor = object.constructor,
            othCtor = other.constructor;

        // Non `Object` object instances with different constructors are not equal.
        if (objCtor != othCtor &&
            ('constructor' in object && 'constructor' in other) &&
            !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
              typeof othCtor == 'function' && othCtor instanceof othCtor)) {
          result = false;
        }
      }
      stack['delete'](object);
      stack['delete'](other);
      return result;
    }

    /**
     * A specialized version of `baseRest` which flattens the rest array.
     *
     * @private
     * @param {Function} func The function to apply a rest parameter to.
     * @returns {Function} Returns the new function.
     */
    function flatRest(func) {
      return setToString(overRest(func, undefined, flatten), func + '');
    }

    /**
     * Creates an array of own enumerable property names and symbols of `object`.
     *
     * @private
     * @param {Object} object The object to query.
     * @returns {Array} Returns the array of property names and symbols.
     */
    function getAllKeys(object) {
      return baseGetAllKeys(object, keys, getSymbols);
    }

    /**
     * Creates an array of own and inherited enumerable property names and
     * symbols of `object`.
     *
     * @private
     * @param {Object} object The object to query.
     * @returns {Array} Returns the array of property names and symbols.
     */
    function getAllKeysIn(object) {
      return baseGetAllKeys(object, keysIn, getSymbolsIn);
    }

    /**
     * Gets metadata for `func`.
     *
     * @private
     * @param {Function} func The function to query.
     * @returns {*} Returns the metadata for `func`.
     */
    var getData = !metaMap ? noop : function(func) {
      return metaMap.get(func);
    };

    /**
     * Gets the name of `func`.
     *
     * @private
     * @param {Function} func The function to query.
     * @returns {string} Returns the function name.
     */
    function getFuncName(func) {
      var result = (func.name + ''),
          array = realNames[result],
          length = hasOwnProperty.call(realNames, result) ? array.length : 0;

      while (length--) {
        var data = array[length],
            otherFunc = data.func;
        if (otherFunc == null || otherFunc == func) {
          return data.name;
        }
      }
      return result;
    }

    /**
     * Gets the argument placeholder value for `func`.
     *
     * @private
     * @param {Function} func The function to inspect.
     * @returns {*} Returns the placeholder value.
     */
    function getHolder(func) {
      var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
      return object.placeholder;
    }

    /**
     * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
     * this function returns the custom method, otherwise it returns `baseIteratee`.
     * If arguments are provided, the chosen function is invoked with them and
     * its result is returned.
     *
     * @private
     * @param {*} [value] The value to convert to an iteratee.
     * @param {number} [arity] The arity of the created iteratee.
     * @returns {Function} Returns the chosen function or its result.
     */
    function getIteratee() {
      var result = lodash.iteratee || iteratee;
      result = result === iteratee ? baseIteratee : result;
      return arguments.length ? result(arguments[0], arguments[1]) : result;
    }

    /**
     * Gets the data for `map`.
     *
     * @private
     * @param {Object} map The map to query.
     * @param {string} key The reference key.
     * @returns {*} Returns the map data.
     */
    function getMapData(map, key) {
      var data = map.__data__;
      return isKeyable(key)
        ? data[typeof key == 'string' ? 'string' : 'hash']
        : data.map;
    }

    /**
     * Gets the property names, values, and compare flags of `object`.
     *
     * @private
     * @param {Object} object The object to query.
     * @returns {Array} Returns the match data of `object`.
     */
    function getMatchData(object) {
      var result = keys(object),
          length = result.length;

      while (length--) {
        var key = result[length],
            value = object[key];

        result[length] = [key, value, isStrictComparable(value)];
      }
      return result;
    }

    /**
     * Gets the native function at `key` of `object`.
     *
     * @private
     * @param {Object} object The object to query.
     * @param {string} key The key of the method to get.
     * @returns {*} Returns the function if it's native, else `undefined`.
     */
    function getNative(object, key) {
      var value = getValue(object, key);
      return baseIsNative(value) ? value : undefined;
    }

    /**
     * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
     *
     * @private
     * @param {*} value The value to query.
     * @returns {string} Returns the raw `toStringTag`.
     */
    function getRawTag(value) {
      var isOwn = hasOwnProperty.call(value, symToStringTag),
          tag = value[symToStringTag];

      try {
        value[symToStringTag] = undefined;
        var unmasked = true;
      } catch (e) {}

      var result = nativeObjectToString.call(value);
      if (unmasked) {
        if (isOwn) {
          value[symToStringTag] = tag;
        } else {
          delete value[symToStringTag];
        }
      }
      return result;
    }

    /**
     * Creates an array of the own enumerable symbols of `object`.
     *
     * @private
     * @param {Object} object The object to query.
     * @returns {Array} Returns the array of symbols.
     */
    var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
      if (object == null) {
        return [];
      }
      object = Object(object);
      return arrayFilter(nativeGetSymbols(object), function(symbol) {
        return propertyIsEnumerable.call(object, symbol);
      });
    };

    /**
     * Creates an array of the own and inherited enumerable symbols of `object`.
     *
     * @private
     * @param {Object} object The object to query.
     * @returns {Array} Returns the array of symbols.
     */
    var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
      var result = [];
      while (object) {
        arrayPush(result, getSymbols(object));
        object = getPrototype(object);
      }
      return result;
    };

    /**
     * Gets the `toStringTag` of `value`.
     *
     * @private
     * @param {*} value The value to query.
     * @returns {string} Returns the `toStringTag`.
     */
    var getTag = baseGetTag;

    // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
    if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
        (Map && getTag(new Map) != mapTag) ||
        (Promise && getTag(Promise.resolve()) != promiseTag) ||
        (Set && getTag(new Set) != setTag) ||
        (WeakMap && getTag(new WeakMap) != weakMapTag)) {
      getTag = function(value) {
        var result = baseGetTag(value),
            Ctor = result == objectTag ? value.constructor : undefined,
            ctorString = Ctor ? toSource(Ctor) : '';

        if (ctorString) {
          switch (ctorString) {
            case dataViewCtorString: return dataViewTag;
            case mapCtorString: return mapTag;
            case promiseCtorString: return promiseTag;
            case setCtorString: return setTag;
            case weakMapCtorString: return weakMapTag;
          }
        }
        return result;
      };
    }

    /**
     * Gets the view, applying any `transforms` to the `start` and `end` positions.
     *
     * @private
     * @param {number} start The start of the view.
     * @param {number} end The end of the view.
     * @param {Array} transforms The transformations to apply to the view.
     * @returns {Object} Returns an object containing the `start` and `end`
     *  positions of the view.
     */
    function getView(start, end, transforms) {
      var index = -1,
          length = transforms.length;

      while (++index < length) {
        var data = transforms[index],
            size = data.size;

        switch (data.type) {
          case 'drop':      start += size; break;
          case 'dropRight': end -= size; break;
          case 'take':      end = nativeMin(end, start + size); break;
          case 'takeRight': start = nativeMax(start, end - size); break;
        }
      }
      return { 'start': start, 'end': end };
    }

    /**
     * Extracts wrapper details from the `source` body comment.
     *
     * @private
     * @param {string} source The source to inspect.
     * @returns {Array} Returns the wrapper details.
     */
    function getWrapDetails(source) {
      var match = source.match(reWrapDetails);
      return match ? match[1].split(reSplitDetails) : [];
    }

    /**
     * Checks if `path` exists on `object`.
     *
     * @private
     * @param {Object} object The object to query.
     * @param {Array|string} path The path to check.
     * @param {Function} hasFunc The function to check properties.
     * @returns {boolean} Returns `true` if `path` exists, else `false`.
     */
    function hasPath(object, path, hasFunc) {
      path = castPath(path, object);

      var index = -1,
          length = path.length,
          result = false;

      while (++index < length) {
        var key = toKey(path[index]);
        if (!(result = object != null && hasFunc(object, key))) {
          break;
        }
        object = object[key];
      }
      if (result || ++index != length) {
        return result;
      }
      length = object == null ? 0 : object.length;
      return !!length && isLength(length) && isIndex(key, length) &&
        (isArray(object) || isArguments(object));
    }

    /**
     * Initializes an array clone.
     *
     * @private
     * @param {Array} array The array to clone.
     * @returns {Array} Returns the initialized clone.
     */
    function initCloneArray(array) {
      var length = array.length,
          result = new array.constructor(length);

      // Add properties assigned by `RegExp#exec`.
      if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
        result.index = array.index;
        result.input = array.input;
      }
      return result;
    }

    /**
     * Initializes an object clone.
     *
     * @private
     * @param {Object} object The object to clone.
     * @returns {Object} Returns the initialized clone.
     */
    function initCloneObject(object) {
      return (typeof object.constructor == 'function' && !isPrototype(object))
        ? baseCreate(getPrototype(object))
        : {};
    }

    /**
     * Initializes an object clone based on its `toStringTag`.
     *
     * **Note:** This function only supports cloning values with tags of
     * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
     *
     * @private
     * @param {Object} object The object to clone.
     * @param {string} tag The `toStringTag` of the object to clone.
     * @param {boolean} [isDeep] Specify a deep clone.
     * @returns {Object} Returns the initialized clone.
     */
    function initCloneByTag(object, tag, isDeep) {
      var Ctor = object.constructor;
      switch (tag) {
        case arrayBufferTag:
          return cloneArrayBuffer(object);

        case boolTag:
        case dateTag:
          return new Ctor(+object);

        case dataViewTag:
          return cloneDataView(object, isDeep);

        case float32Tag: case float64Tag:
        case int8Tag: case int16Tag: case int32Tag:
        case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
          return cloneTypedArray(object, isDeep);

        case mapTag:
          return new Ctor;

        case numberTag:
        case stringTag:
          return new Ctor(object);

        case regexpTag:
          return cloneRegExp(object);

        case setTag:
          return new Ctor;

        case symbolTag:
          return cloneSymbol(object);
      }
    }

    /**
     * Inserts wrapper `details` in a comment at the top of the `source` body.
     *
     * @private
     * @param {string} source The source to modify.
     * @returns {Array} details The details to insert.
     * @returns {string} Returns the modified source.
     */
    function insertWrapDetails(source, details) {
      var length = details.length;
      if (!length) {
        return source;
      }
      var lastIndex = length - 1;
      details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
      details = details.join(length > 2 ? ', ' : ' ');
      return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
    }

    /**
     * Checks if `value` is a flattenable `arguments` object or array.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
     */
    function isFlattenable(value) {
      return isArray(value) || isArguments(value) ||
        !!(spreadableSymbol && value && value[spreadableSymbol]);
    }

    /**
     * Checks if `value` is a valid array-like index.
     *
     * @private
     * @param {*} value The value to check.
     * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
     * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
     */
    function isIndex(value, length) {
      var type = typeof value;
      length = length == null ? MAX_SAFE_INTEGER : length;

      return !!length &&
        (type == 'number' ||
          (type != 'symbol' && reIsUint.test(value))) &&
            (value > -1 && value % 1 == 0 && value < length);
    }

    /**
     * Checks if the given arguments are from an iteratee call.
     *
     * @private
     * @param {*} value The potential iteratee value argument.
     * @param {*} index The potential iteratee index or key argument.
     * @param {*} object The potential iteratee object argument.
     * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
     *  else `false`.
     */
    function isIterateeCall(value, index, object) {
      if (!isObject(object)) {
        return false;
      }
      var type = typeof index;
      if (type == 'number'
            ? (isArrayLike(object) && isIndex(index, object.length))
            : (type == 'string' && index in object)
          ) {
        return eq(object[index], value);
      }
      return false;
    }

    /**
     * Checks if `value` is a property name and not a property path.
     *
     * @private
     * @param {*} value The value to check.
     * @param {Object} [object] The object to query keys on.
     * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
     */
    function isKey(value, object) {
      if (isArray(value)) {
        return false;
      }
      var type = typeof value;
      if (type == 'number' || type == 'symbol' || type == 'boolean' ||
          value == null || isSymbol(value)) {
        return true;
      }
      return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
        (object != null && value in Object(object));
    }

    /**
     * Checks if `value` is suitable for use as unique object key.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
     */
    function isKeyable(value) {
      var type = typeof value;
      return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
        ? (value !== '__proto__')
        : (value === null);
    }

    /**
     * Checks if `func` has a lazy counterpart.
     *
     * @private
     * @param {Function} func The function to check.
     * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
     *  else `false`.
     */
    function isLaziable(func) {
      var funcName = getFuncName(func),
          other = lodash[funcName];

      if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
        return false;
      }
      if (func === other) {
        return true;
      }
      var data = getData(other);
      return !!data && func === data[0];
    }

    /**
     * Checks if `func` has its source masked.
     *
     * @private
     * @param {Function} func The function to check.
     * @returns {boolean} Returns `true` if `func` is masked, else `false`.
     */
    function isMasked(func) {
      return !!maskSrcKey && (maskSrcKey in func);
    }

    /**
     * Checks if `func` is capable of being masked.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
     */
    var isMaskable = coreJsData ? isFunction : stubFalse;

    /**
     * Checks if `value` is likely a prototype object.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
     */
    function isPrototype(value) {
      var Ctor = value && value.constructor,
          proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;

      return value === proto;
    }

    /**
     * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` if suitable for strict
     *  equality comparisons, else `false`.
     */
    function isStrictComparable(value) {
      return value === value && !isObject(value);
    }

    /**
     * A specialized version of `matchesProperty` for source values suitable
     * for strict equality comparisons, i.e. `===`.
     *
     * @private
     * @param {string} key The key of the property to get.
     * @param {*} srcValue The value to match.
     * @returns {Function} Returns the new spec function.
     */
    function matchesStrictComparable(key, srcValue) {
      return function(object) {
        if (object == null) {
          return false;
        }
        return object[key] === srcValue &&
          (srcValue !== undefined || (key in Object(object)));
      };
    }

    /**
     * A specialized version of `_.memoize` which clears the memoized function's
     * cache when it exceeds `MAX_MEMOIZE_SIZE`.
     *
     * @private
     * @param {Function} func The function to have its output memoized.
     * @returns {Function} Returns the new memoized function.
     */
    function memoizeCapped(func) {
      var result = memoize(func, function(key) {
        if (cache.size === MAX_MEMOIZE_SIZE) {
          cache.clear();
        }
        return key;
      });

      var cache = result.cache;
      return result;
    }

    /**
     * Merges the function metadata of `source` into `data`.
     *
     * Merging metadata reduces the number of wrappers used to invoke a function.
     * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
     * may be applied regardless of execution order. Methods like `_.ary` and
     * `_.rearg` modify function arguments, making the order in which they are
     * executed important, preventing the merging of metadata. However, we make
     * an exception for a safe combined case where curried functions have `_.ary`
     * and or `_.rearg` applied.
     *
     * @private
     * @param {Array} data The destination metadata.
     * @param {Array} source The source metadata.
     * @returns {Array} Returns `data`.
     */
    function mergeData(data, source) {
      var bitmask = data[1],
          srcBitmask = source[1],
          newBitmask = bitmask | srcBitmask,
          isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);

      var isCombo =
        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
        ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));

      // Exit early if metadata can't be merged.
      if (!(isCommon || isCombo)) {
        return data;
      }
      // Use source `thisArg` if available.
      if (srcBitmask & WRAP_BIND_FLAG) {
        data[2] = source[2];
        // Set when currying a bound function.
        newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
      }
      // Compose partial arguments.
      var value = source[3];
      if (value) {
        var partials = data[3];
        data[3] = partials ? composeArgs(partials, value, source[4]) : value;
        data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
      }
      // Compose partial right arguments.
      value = source[5];
      if (value) {
        partials = data[5];
        data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
        data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
      }
      // Use source `argPos` if available.
      value = source[7];
      if (value) {
        data[7] = value;
      }
      // Use source `ary` if it's smaller.
      if (srcBitmask & WRAP_ARY_FLAG) {
        data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
      }
      // Use source `arity` if one is not provided.
      if (data[9] == null) {
        data[9] = source[9];
      }
      // Use source `func` and merge bitmasks.
      data[0] = source[0];
      data[1] = newBitmask;

      return data;
    }

    /**
     * This function is like
     * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
     * except that it includes inherited enumerable properties.
     *
     * @private
     * @param {Object} object The object to query.
     * @returns {Array} Returns the array of property names.
     */
    function nativeKeysIn(object) {
      var result = [];
      if (object != null) {
        for (var key in Object(object)) {
          result.push(key);
        }
      }
      return result;
    }

    /**
     * Converts `value` to a string using `Object.prototype.toString`.
     *
     * @private
     * @param {*} value The value to convert.
     * @returns {string} Returns the converted string.
     */
    function objectToString(value) {
      return nativeObjectToString.call(value);
    }

    /**
     * A specialized version of `baseRest` which transforms the rest array.
     *
     * @private
     * @param {Function} func The function to apply a rest parameter to.
     * @param {number} [start=func.length-1] The start position of the rest parameter.
     * @param {Function} transform The rest array transform.
     * @returns {Function} Returns the new function.
     */
    function overRest(func, start, transform) {
      start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
      return function() {
        var args = arguments,
            index = -1,
            length = nativeMax(args.length - start, 0),
            array = Array(length);

        while (++index < length) {
          array[index] = args[start + index];
        }
        index = -1;
        var otherArgs = Array(start + 1);
        while (++index < start) {
          otherArgs[index] = args[index];
        }
        otherArgs[start] = transform(array);
        return apply(func, this, otherArgs);
      };
    }

    /**
     * Gets the parent value at `path` of `object`.
     *
     * @private
     * @param {Object} object The object to query.
     * @param {Array} path The path to get the parent value of.
     * @returns {*} Returns the parent value.
     */
    function parent(object, path) {
      return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
    }

    /**
     * Reorder `array` according to the specified indexes where the element at
     * the first index is assigned as the first element, the element at
     * the second index is assigned as the second element, and so on.
     *
     * @private
     * @param {Array} array The array to reorder.
     * @param {Array} indexes The arranged array indexes.
     * @returns {Array} Returns `array`.
     */
    function reorder(array, indexes) {
      var arrLength = array.length,
          length = nativeMin(indexes.length, arrLength),
          oldArray = copyArray(array);

      while (length--) {
        var index = indexes[length];
        array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
      }
      return array;
    }

    /**
     * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
     *
     * @private
     * @param {Object} object The object to query.
     * @param {string} key The key of the property to get.
     * @returns {*} Returns the property value.
     */
    function safeGet(object, key) {
      if (key === 'constructor' && typeof object[key] === 'function') {
        return;
      }

      if (key == '__proto__') {
        return;
      }

      return object[key];
    }

    /**
     * Sets metadata for `func`.
     *
     * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
     * period of time, it will trip its breaker and transition to an identity
     * function to avoid garbage collection pauses in V8. See
     * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
     * for more details.
     *
     * @private
     * @param {Function} func The function to associate metadata with.
     * @param {*} data The metadata.
     * @returns {Function} Returns `func`.
     */
    var setData = shortOut(baseSetData);

    /**
     * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
     *
     * @private
     * @param {Function} func The function to delay.
     * @param {number} wait The number of milliseconds to delay invocation.
     * @returns {number|Object} Returns the timer id or timeout object.
     */
    var setTimeout = ctxSetTimeout || function(func, wait) {
      return root.setTimeout(func, wait);
    };

    /**
     * Sets the `toString` method of `func` to return `string`.
     *
     * @private
     * @param {Function} func The function to modify.
     * @param {Function} string The `toString` result.
     * @returns {Function} Returns `func`.
     */
    var setToString = shortOut(baseSetToString);

    /**
     * Sets the `toString` method of `wrapper` to mimic the source of `reference`
     * with wrapper details in a comment at the top of the source body.
     *
     * @private
     * @param {Function} wrapper The function to modify.
     * @param {Function} reference The reference function.
     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
     * @returns {Function} Returns `wrapper`.
     */
    function setWrapToString(wrapper, reference, bitmask) {
      var source = (reference + '');
      return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
    }

    /**
     * Creates a function that'll short out and invoke `identity` instead
     * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
     * milliseconds.
     *
     * @private
     * @param {Function} func The function to restrict.
     * @returns {Function} Returns the new shortable function.
     */
    function shortOut(func) {
      var count = 0,
          lastCalled = 0;

      return function() {
        var stamp = nativeNow(),
            remaining = HOT_SPAN - (stamp - lastCalled);

        lastCalled = stamp;
        if (remaining > 0) {
          if (++count >= HOT_COUNT) {
            return arguments[0];
          }
        } else {
          count = 0;
        }
        return func.apply(undefined, arguments);
      };
    }

    /**
     * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
     *
     * @private
     * @param {Array} array The array to shuffle.
     * @param {number} [size=array.length] The size of `array`.
     * @returns {Array} Returns `array`.
     */
    function shuffleSelf(array, size) {
      var index = -1,
          length = array.length,
          lastIndex = length - 1;

      size = size === undefined ? length : size;
      while (++index < size) {
        var rand = baseRandom(index, lastIndex),
            value = array[rand];

        array[rand] = array[index];
        array[index] = value;
      }
      array.length = size;
      return array;
    }

    /**
     * Converts `string` to a property path array.
     *
     * @private
     * @param {string} string The string to convert.
     * @returns {Array} Returns the property path array.
     */
    var stringToPath = memoizeCapped(function(string) {
      var result = [];
      if (string.charCodeAt(0) === 46 /* . */) {
        result.push('');
      }
      string.replace(rePropName, function(match, number, quote, subString) {
        result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
      });
      return result;
    });

    /**
     * Converts `value` to a string key if it's not a string or symbol.
     *
     * @private
     * @param {*} value The value to inspect.
     * @returns {string|symbol} Returns the key.
     */
    function toKey(value) {
      if (typeof value == 'string' || isSymbol(value)) {
        return value;
      }
      var result = (value + '');
      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
    }

    /**
     * Converts `func` to its source code.
     *
     * @private
     * @param {Function} func The function to convert.
     * @returns {string} Returns the source code.
     */
    function toSource(func) {
      if (func != null) {
        try {
          return funcToString.call(func);
        } catch (e) {}
        try {
          return (func + '');
        } catch (e) {}
      }
      return '';
    }

    /**
     * Updates wrapper `details` based on `bitmask` flags.
     *
     * @private
     * @returns {Array} details The details to modify.
     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
     * @returns {Array} Returns `details`.
     */
    function updateWrapDetails(details, bitmask) {
      arrayEach(wrapFlags, function(pair) {
        var value = '_.' + pair[0];
        if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
          details.push(value);
        }
      });
      return details.sort();
    }

    /**
     * Creates a clone of `wrapper`.
     *
     * @private
     * @param {Object} wrapper The wrapper to clone.
     * @returns {Object} Returns the cloned wrapper.
     */
    function wrapperClone(wrapper) {
      if (wrapper instanceof LazyWrapper) {
        return wrapper.clone();
      }
      var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
      result.__actions__ = copyArray(wrapper.__actions__);
      result.__index__  = wrapper.__index__;
      result.__values__ = wrapper.__values__;
      return result;
    }

    /*------------------------------------------------------------------------*/

    /**
     * Creates an array of elements split into groups the length of `size`.
     * If `array` can't be split evenly, the final chunk will be the remaining
     * elements.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Array
     * @param {Array} array The array to process.
     * @param {number} [size=1] The length of each chunk
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {Array} Returns the new array of chunks.
     * @example
     *
     * _.chunk(['a', 'b', 'c', 'd'], 2);
     * // => [['a', 'b'], ['c', 'd']]
     *
     * _.chunk(['a', 'b', 'c', 'd'], 3);
     * // => [['a', 'b', 'c'], ['d']]
     */
    function chunk(array, size, guard) {
      if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
        size = 1;
      } else {
        size = nativeMax(toInteger(size), 0);
      }
      var length = array == null ? 0 : array.length;
      if (!length || size < 1) {
        return [];
      }
      var index = 0,
          resIndex = 0,
          result = Array(nativeCeil(length / size));

      while (index < length) {
        result[resIndex++] = baseSlice(array, index, (index += size));
      }
      return result;
    }

    /**
     * Creates an array with all falsey values removed. The values `false`, `null`,
     * `0`, `-0`, `0n`, `""`, `undefined`, and `NaN` are falsy.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {Array} array The array to compact.
     * @returns {Array} Returns the new array of filtered values.
     * @example
     *
     * _.compact([0, 1, false, 2, '', 3]);
     * // => [1, 2, 3]
     */
    function compact(array) {
      var index = -1,
          length = array == null ? 0 : array.length,
          resIndex = 0,
          result = [];

      while (++index < length) {
        var value = array[index];
        if (value) {
          result[resIndex++] = value;
        }
      }
      return result;
    }

    /**
     * Creates a new array concatenating `array` with any additional arrays
     * and/or values.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to concatenate.
     * @param {...*} [values] The values to concatenate.
     * @returns {Array} Returns the new concatenated array.
     * @example
     *
     * var array = [1];
     * var other = _.concat(array, 2, [3], [[4]]);
     *
     * console.log(other);
     * // => [1, 2, 3, [4]]
     *
     * console.log(array);
     * // => [1]
     */
    function concat() {
      var length = arguments.length;
      if (!length) {
        return [];
      }
      var args = Array(length - 1),
          array = arguments[0],
          index = length;

      while (index--) {
        args[index - 1] = arguments[index];
      }
      return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
    }

    /**
     * Creates an array of `array` values not included in the other given arrays
     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
     * for equality comparisons. The order and references of result values are
     * determined by the first array.
     *
     * **Note:** Unlike `_.pullAll`, this method returns a new array.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {...Array} [values] The values to exclude.
     * @returns {Array} Returns the new array of filtered values.
     * @see _.without, _.xor
     * @example
     *
     * _.difference([2, 1], [2, 3]);
     * // => [1]
     */
    var difference = baseRest(function(array, values) {
      return isArrayLikeObject(array)
        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
        : [];
    });

    /**
     * This method is like `_.difference` except that it accepts `iteratee` which
     * is invoked for each element of `array` and `values` to generate the criterion
     * by which they're compared. The order and references of result values are
     * determined by the first array. The iteratee is invoked with one argument:
     * (value).
     *
     * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {...Array} [values] The values to exclude.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {Array} Returns the new array of filtered values.
     * @example
     *
     * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
     * // => [1.2]
     *
     * // The `_.property` iteratee shorthand.
     * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
     * // => [{ 'x': 2 }]
     */
    var differenceBy = baseRest(function(array, values) {
      var iteratee = last(values);
      if (isArrayLikeObject(iteratee)) {
        iteratee = undefined;
      }
      return isArrayLikeObject(array)
        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
        : [];
    });

    /**
     * This method is like `_.difference` except that it accepts `comparator`
     * which is invoked to compare elements of `array` to `values`. The order and
     * references of result values are determined by the first array. The comparator
     * is invoked with two arguments: (arrVal, othVal).
     *
     * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {...Array} [values] The values to exclude.
     * @param {Function} [comparator] The comparator invoked per element.
     * @returns {Array} Returns the new array of filtered values.
     * @example
     *
     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
     *
     * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
     * // => [{ 'x': 2, 'y': 1 }]
     */
    var differenceWith = baseRest(function(array, values) {
      var comparator = last(values);
      if (isArrayLikeObject(comparator)) {
        comparator = undefined;
      }
      return isArrayLikeObject(array)
        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
        : [];
    });

    /**
     * Creates a slice of `array` with `n` elements dropped from the beginning.
     *
     * @static
     * @memberOf _
     * @since 0.5.0
     * @category Array
     * @param {Array} array The array to query.
     * @param {number} [n=1] The number of elements to drop.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {Array} Returns the slice of `array`.
     * @example
     *
     * _.drop([1, 2, 3]);
     * // => [2, 3]
     *
     * _.drop([1, 2, 3], 2);
     * // => [3]
     *
     * _.drop([1, 2, 3], 5);
     * // => []
     *
     * _.drop([1, 2, 3], 0);
     * // => [1, 2, 3]
     */
    function drop(array, n, guard) {
      var length = array == null ? 0 : array.length;
      if (!length) {
        return [];
      }
      n = (guard || n === undefined) ? 1 : toInteger(n);
      return baseSlice(array, n < 0 ? 0 : n, length);
    }

    /**
     * Creates a slice of `array` with `n` elements dropped from the end.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Array
     * @param {Array} array The array to query.
     * @param {number} [n=1] The number of elements to drop.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {Array} Returns the slice of `array`.
     * @example
     *
     * _.dropRight([1, 2, 3]);
     * // => [1, 2]
     *
     * _.dropRight([1, 2, 3], 2);
     * // => [1]
     *
     * _.dropRight([1, 2, 3], 5);
     * // => []
     *
     * _.dropRight([1, 2, 3], 0);
     * // => [1, 2, 3]
     */
    function dropRight(array, n, guard) {
      var length = array == null ? 0 : array.length;
      if (!length) {
        return [];
      }
      n = (guard || n === undefined) ? 1 : toInteger(n);
      n = length - n;
      return baseSlice(array, 0, n < 0 ? 0 : n);
    }

    /**
     * Creates a slice of `array` excluding elements dropped from the end.
     * Elements are dropped until `predicate` returns falsey. The predicate is
     * invoked with three arguments: (value, index, array).
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Array
     * @param {Array} array The array to query.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @returns {Array} Returns the slice of `array`.
     * @example
     *
     * var users = [
     *   { 'user': 'barney',  'active': true },
     *   { 'user': 'fred',    'active': false },
     *   { 'user': 'pebbles', 'active': false }
     * ];
     *
     * _.dropRightWhile(users, function(o) { return !o.active; });
     * // => objects for ['barney']
     *
     * // The `_.matches` iteratee shorthand.
     * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
     * // => objects for ['barney', 'fred']
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.dropRightWhile(users, ['active', false]);
     * // => objects for ['barney']
     *
     * // The `_.property` iteratee shorthand.
     * _.dropRightWhile(users, 'active');
     * // => objects for ['barney', 'fred', 'pebbles']
     */
    function dropRightWhile(array, predicate) {
      return (array && array.length)
        ? baseWhile(array, getIteratee(predicate, 3), true, true)
        : [];
    }

    /**
     * Creates a slice of `array` excluding elements dropped from the beginning.
     * Elements are dropped until `predicate` returns falsey. The predicate is
     * invoked with three arguments: (value, index, array).
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Array
     * @param {Array} array The array to query.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @returns {Array} Returns the slice of `array`.
     * @example
     *
     * var users = [
     *   { 'user': 'barney',  'active': false },
     *   { 'user': 'fred',    'active': false },
     *   { 'user': 'pebbles', 'active': true }
     * ];
     *
     * _.dropWhile(users, function(o) { return !o.active; });
     * // => objects for ['pebbles']
     *
     * // The `_.matches` iteratee shorthand.
     * _.dropWhile(users, { 'user': 'barney', 'active': false });
     * // => objects for ['fred', 'pebbles']
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.dropWhile(users, ['active', false]);
     * // => objects for ['pebbles']
     *
     * // The `_.property` iteratee shorthand.
     * _.dropWhile(users, 'active');
     * // => objects for ['barney', 'fred', 'pebbles']
     */
    function dropWhile(array, predicate) {
      return (array && array.length)
        ? baseWhile(array, getIteratee(predicate, 3), true)
        : [];
    }

    /**
     * Fills elements of `array` with `value` from `start` up to, but not
     * including, `end`.
     *
     * **Note:** This method mutates `array`.
     *
     * @static
     * @memberOf _
     * @since 3.2.0
     * @category Array
     * @param {Array} array The array to fill.
     * @param {*} value The value to fill `array` with.
     * @param {number} [start=0] The start position.
     * @param {number} [end=array.length] The end position.
     * @returns {Array} Returns `array`.
     * @example
     *
     * var array = [1, 2, 3];
     *
     * _.fill(array, 'a');
     * console.log(array);
     * // => ['a', 'a', 'a']
     *
     * _.fill(Array(3), 2);
     * // => [2, 2, 2]
     *
     * _.fill([4, 6, 8, 10], '*', 1, 3);
     * // => [4, '*', '*', 10]
     */
    function fill(array, value, start, end) {
      var length = array == null ? 0 : array.length;
      if (!length) {
        return [];
      }
      if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
        start = 0;
        end = length;
      }
      return baseFill(array, value, start, end);
    }

    /**
     * This method is like `_.find` except that it returns the index of the first
     * element `predicate` returns truthy for instead of the element itself.
     *
     * @static
     * @memberOf _
     * @since 1.1.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @param {number} [fromIndex=0] The index to search from.
     * @returns {number} Returns the index of the found element, else `-1`.
     * @example
     *
     * var users = [
     *   { 'user': 'barney',  'active': false },
     *   { 'user': 'fred',    'active': false },
     *   { 'user': 'pebbles', 'active': true }
     * ];
     *
     * _.findIndex(users, function(o) { return o.user == 'barney'; });
     * // => 0
     *
     * // The `_.matches` iteratee shorthand.
     * _.findIndex(users, { 'user': 'fred', 'active': false });
     * // => 1
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.findIndex(users, ['active', false]);
     * // => 0
     *
     * // The `_.property` iteratee shorthand.
     * _.findIndex(users, 'active');
     * // => 2
     */
    function findIndex(array, predicate, fromIndex) {
      var length = array == null ? 0 : array.length;
      if (!length) {
        return -1;
      }
      var index = fromIndex == null ? 0 : toInteger(fromIndex);
      if (index < 0) {
        index = nativeMax(length + index, 0);
      }
      return baseFindIndex(array, getIteratee(predicate, 3), index);
    }

    /**
     * This method is like `_.findIndex` except that it iterates over elements
     * of `collection` from right to left.
     *
     * @static
     * @memberOf _
     * @since 2.0.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @param {number} [fromIndex=array.length-1] The index to search from.
     * @returns {number} Returns the index of the found element, else `-1`.
     * @example
     *
     * var users = [
     *   { 'user': 'barney',  'active': true },
     *   { 'user': 'fred',    'active': false },
     *   { 'user': 'pebbles', 'active': false }
     * ];
     *
     * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
     * // => 2
     *
     * // The `_.matches` iteratee shorthand.
     * _.findLastIndex(users, { 'user': 'barney', 'active': true });
     * // => 0
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.findLastIndex(users, ['active', false]);
     * // => 2
     *
     * // The `_.property` iteratee shorthand.
     * _.findLastIndex(users, 'active');
     * // => 0
     */
    function findLastIndex(array, predicate, fromIndex) {
      var length = array == null ? 0 : array.length;
      if (!length) {
        return -1;
      }
      var index = length - 1;
      if (fromIndex !== undefined) {
        index = toInteger(fromIndex);
        index = fromIndex < 0
          ? nativeMax(length + index, 0)
          : nativeMin(index, length - 1);
      }
      return baseFindIndex(array, getIteratee(predicate, 3), index, true);
    }

    /**
     * Flattens `array` a single level deep.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {Array} array The array to flatten.
     * @returns {Array} Returns the new flattened array.
     * @example
     *
     * _.flatten([1, [2, [3, [4]], 5]]);
     * // => [1, 2, [3, [4]], 5]
     */
    function flatten(array) {
      var length = array == null ? 0 : array.length;
      return length ? baseFlatten(array, 1) : [];
    }

    /**
     * Recursively flattens `array`.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Array
     * @param {Array} array The array to flatten.
     * @returns {Array} Returns the new flattened array.
     * @example
     *
     * _.flattenDeep([1, [2, [3, [4]], 5]]);
     * // => [1, 2, 3, 4, 5]
     */
    function flattenDeep(array) {
      var length = array == null ? 0 : array.length;
      return length ? baseFlatten(array, INFINITY) : [];
    }

    /**
     * Recursively flatten `array` up to `depth` times.
     *
     * @static
     * @memberOf _
     * @since 4.4.0
     * @category Array
     * @param {Array} array The array to flatten.
     * @param {number} [depth=1] The maximum recursion depth.
     * @returns {Array} Returns the new flattened array.
     * @example
     *
     * var array = [1, [2, [3, [4]], 5]];
     *
     * _.flattenDepth(array, 1);
     * // => [1, 2, [3, [4]], 5]
     *
     * _.flattenDepth(array, 2);
     * // => [1, 2, 3, [4], 5]
     */
    function flattenDepth(array, depth) {
      var length = array == null ? 0 : array.length;
      if (!length) {
        return [];
      }
      depth = depth === undefined ? 1 : toInteger(depth);
      return baseFlatten(array, depth);
    }

    /**
     * The inverse of `_.toPairs`; this method returns an object composed
     * from key-value `pairs`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} pairs The key-value pairs.
     * @returns {Object} Returns the new object.
     * @example
     *
     * _.fromPairs([['a', 1], ['b', 2]]);
     * // => { 'a': 1, 'b': 2 }
     */
    function fromPairs(pairs) {
      var index = -1,
          length = pairs == null ? 0 : pairs.length,
          result = {};

      while (++index < length) {
        var pair = pairs[index];
        baseAssignValue(result, pair[0], pair[1]);
      }
      return result;
    }

    /**
     * Gets the first element of `array`.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @alias first
     * @category Array
     * @param {Array} array The array to query.
     * @returns {*} Returns the first element of `array`.
     * @example
     *
     * _.head([1, 2, 3]);
     * // => 1
     *
     * _.head([]);
     * // => undefined
     */
    function head(array) {
      return (array && array.length) ? array[0] : undefined;
    }

    /**
     * Gets the index at which the first occurrence of `value` is found in `array`
     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
     * for equality comparisons. If `fromIndex` is negative, it's used as the
     * offset from the end of `array`.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {*} value The value to search for.
     * @param {number} [fromIndex=0] The index to search from.
     * @returns {number} Returns the index of the matched value, else `-1`.
     * @example
     *
     * _.indexOf([1, 2, 1, 2], 2);
     * // => 1
     *
     * // Search from the `fromIndex`.
     * _.indexOf([1, 2, 1, 2], 2, 2);
     * // => 3
     */
    function indexOf(array, value, fromIndex) {
      var length = array == null ? 0 : array.length;
      if (!length) {
        return -1;
      }
      var index = fromIndex == null ? 0 : toInteger(fromIndex);
      if (index < 0) {
        index = nativeMax(length + index, 0);
      }
      return baseIndexOf(array, value, index);
    }

    /**
     * Gets all but the last element of `array`.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {Array} array The array to query.
     * @returns {Array} Returns the slice of `array`.
     * @example
     *
     * _.initial([1, 2, 3]);
     * // => [1, 2]
     */
    function initial(array) {
      var length = array == null ? 0 : array.length;
      return length ? baseSlice(array, 0, -1) : [];
    }

    /**
     * Creates an array of unique values that are included in all given arrays
     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
     * for equality comparisons. The order and references of result values are
     * determined by the first array.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {...Array} [arrays] The arrays to inspect.
     * @returns {Array} Returns the new array of intersecting values.
     * @example
     *
     * _.intersection([2, 1], [2, 3]);
     * // => [2]
     */
    var intersection = baseRest(function(arrays) {
      var mapped = arrayMap(arrays, castArrayLikeObject);
      return (mapped.length && mapped[0] === arrays[0])
        ? baseIntersection(mapped)
        : [];
    });

    /**
     * This method is like `_.intersection` except that it accepts `iteratee`
     * which is invoked for each element of each `arrays` to generate the criterion
     * by which they're compared. The order and references of result values are
     * determined by the first array. The iteratee is invoked with one argument:
     * (value).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {...Array} [arrays] The arrays to inspect.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {Array} Returns the new array of intersecting values.
     * @example
     *
     * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
     * // => [2.1]
     *
     * // The `_.property` iteratee shorthand.
     * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
     * // => [{ 'x': 1 }]
     */
    var intersectionBy = baseRest(function(arrays) {
      var iteratee = last(arrays),
          mapped = arrayMap(arrays, castArrayLikeObject);

      if (iteratee === last(mapped)) {
        iteratee = undefined;
      } else {
        mapped.pop();
      }
      return (mapped.length && mapped[0] === arrays[0])
        ? baseIntersection(mapped, getIteratee(iteratee, 2))
        : [];
    });

    /**
     * This method is like `_.intersection` except that it accepts `comparator`
     * which is invoked to compare elements of `arrays`. The order and references
     * of result values are determined by the first array. The comparator is
     * invoked with two arguments: (arrVal, othVal).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {...Array} [arrays] The arrays to inspect.
     * @param {Function} [comparator] The comparator invoked per element.
     * @returns {Array} Returns the new array of intersecting values.
     * @example
     *
     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
     *
     * _.intersectionWith(objects, others, _.isEqual);
     * // => [{ 'x': 1, 'y': 2 }]
     */
    var intersectionWith = baseRest(function(arrays) {
      var comparator = last(arrays),
          mapped = arrayMap(arrays, castArrayLikeObject);

      comparator = typeof comparator == 'function' ? comparator : undefined;
      if (comparator) {
        mapped.pop();
      }
      return (mapped.length && mapped[0] === arrays[0])
        ? baseIntersection(mapped, undefined, comparator)
        : [];
    });

    /**
     * Converts all elements in `array` into a string separated by `separator`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to convert.
     * @param {string} [separator=','] The element separator.
     * @returns {string} Returns the joined string.
     * @example
     *
     * _.join(['a', 'b', 'c'], '~');
     * // => 'a~b~c'
     */
    function join(array, separator) {
      return array == null ? '' : nativeJoin.call(array, separator);
    }

    /**
     * Gets the last element of `array`.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {Array} array The array to query.
     * @returns {*} Returns the last element of `array`.
     * @example
     *
     * _.last([1, 2, 3]);
     * // => 3
     */
    function last(array) {
      var length = array == null ? 0 : array.length;
      return length ? array[length - 1] : undefined;
    }

    /**
     * This method is like `_.indexOf` except that it iterates over elements of
     * `array` from right to left.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {*} value The value to search for.
     * @param {number} [fromIndex=array.length-1] The index to search from.
     * @returns {number} Returns the index of the matched value, else `-1`.
     * @example
     *
     * _.lastIndexOf([1, 2, 1, 2], 2);
     * // => 3
     *
     * // Search from the `fromIndex`.
     * _.lastIndexOf([1, 2, 1, 2], 2, 2);
     * // => 1
     */
    function lastIndexOf(array, value, fromIndex) {
      var length = array == null ? 0 : array.length;
      if (!length) {
        return -1;
      }
      var index = length;
      if (fromIndex !== undefined) {
        index = toInteger(fromIndex);
        index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
      }
      return value === value
        ? strictLastIndexOf(array, value, index)
        : baseFindIndex(array, baseIsNaN, index, true);
    }

    /**
     * Gets the element at index `n` of `array`. If `n` is negative, the nth
     * element from the end is returned.
     *
     * @static
     * @memberOf _
     * @since 4.11.0
     * @category Array
     * @param {Array} array The array to query.
     * @param {number} [n=0] The index of the element to return.
     * @returns {*} Returns the nth element of `array`.
     * @example
     *
     * var array = ['a', 'b', 'c', 'd'];
     *
     * _.nth(array, 1);
     * // => 'b'
     *
     * _.nth(array, -2);
     * // => 'c';
     */
    function nth(array, n) {
      return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
    }

    /**
     * Removes all given values from `array` using
     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
     * for equality comparisons.
     *
     * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
     * to remove elements from an array by predicate.
     *
     * @static
     * @memberOf _
     * @since 2.0.0
     * @category Array
     * @param {Array} array The array to modify.
     * @param {...*} [values] The values to remove.
     * @returns {Array} Returns `array`.
     * @example
     *
     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
     *
     * _.pull(array, 'a', 'c');
     * console.log(array);
     * // => ['b', 'b']
     */
    var pull = baseRest(pullAll);

    /**
     * This method is like `_.pull` except that it accepts an array of values to remove.
     *
     * **Note:** Unlike `_.difference`, this method mutates `array`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to modify.
     * @param {Array} values The values to remove.
     * @returns {Array} Returns `array`.
     * @example
     *
     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
     *
     * _.pullAll(array, ['a', 'c']);
     * console.log(array);
     * // => ['b', 'b']
     */
    function pullAll(array, values) {
      return (array && array.length && values && values.length)
        ? basePullAll(array, values)
        : array;
    }

    /**
     * This method is like `_.pullAll` except that it accepts `iteratee` which is
     * invoked for each element of `array` and `values` to generate the criterion
     * by which they're compared. The iteratee is invoked with one argument: (value).
     *
     * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to modify.
     * @param {Array} values The values to remove.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {Array} Returns `array`.
     * @example
     *
     * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
     *
     * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
     * console.log(array);
     * // => [{ 'x': 2 }]
     */
    function pullAllBy(array, values, iteratee) {
      return (array && array.length && values && values.length)
        ? basePullAll(array, values, getIteratee(iteratee, 2))
        : array;
    }

    /**
     * This method is like `_.pullAll` except that it accepts `comparator` which
     * is invoked to compare elements of `array` to `values`. The comparator is
     * invoked with two arguments: (arrVal, othVal).
     *
     * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
     *
     * @static
     * @memberOf _
     * @since 4.6.0
     * @category Array
     * @param {Array} array The array to modify.
     * @param {Array} values The values to remove.
     * @param {Function} [comparator] The comparator invoked per element.
     * @returns {Array} Returns `array`.
     * @example
     *
     * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
     *
     * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
     * console.log(array);
     * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
     */
    function pullAllWith(array, values, comparator) {
      return (array && array.length && values && values.length)
        ? basePullAll(array, values, undefined, comparator)
        : array;
    }

    /**
     * Removes elements from `array` corresponding to `indexes` and returns an
     * array of removed elements.
     *
     * **Note:** Unlike `_.at`, this method mutates `array`.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Array
     * @param {Array} array The array to modify.
     * @param {...(number|number[])} [indexes] The indexes of elements to remove.
     * @returns {Array} Returns the new array of removed elements.
     * @example
     *
     * var array = ['a', 'b', 'c', 'd'];
     * var pulled = _.pullAt(array, [1, 3]);
     *
     * console.log(array);
     * // => ['a', 'c']
     *
     * console.log(pulled);
     * // => ['b', 'd']
     */
    var pullAt = flatRest(function(array, indexes) {
      var length = array == null ? 0 : array.length,
          result = baseAt(array, indexes);

      basePullAt(array, arrayMap(indexes, function(index) {
        return isIndex(index, length) ? +index : index;
      }).sort(compareAscending));

      return result;
    });

    /**
     * Removes all elements from `array` that `predicate` returns truthy for
     * and returns an array of the removed elements. The predicate is invoked
     * with three arguments: (value, index, array).
     *
     * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
     * to pull elements from an array by value.
     *
     * @static
     * @memberOf _
     * @since 2.0.0
     * @category Array
     * @param {Array} array The array to modify.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @returns {Array} Returns the new array of removed elements.
     * @example
     *
     * var array = [1, 2, 3, 4];
     * var evens = _.remove(array, function(n) {
     *   return n % 2 == 0;
     * });
     *
     * console.log(array);
     * // => [1, 3]
     *
     * console.log(evens);
     * // => [2, 4]
     */
    function remove(array, predicate) {
      var result = [];
      if (!(array && array.length)) {
        return result;
      }
      var index = -1,
          indexes = [],
          length = array.length;

      predicate = getIteratee(predicate, 3);
      while (++index < length) {
        var value = array[index];
        if (predicate(value, index, array)) {
          result.push(value);
          indexes.push(index);
        }
      }
      basePullAt(array, indexes);
      return result;
    }

    /**
     * Reverses `array` so that the first element becomes the last, the second
     * element becomes the second to last, and so on.
     *
     * **Note:** This method mutates `array` and is based on
     * [`Array#reverse`](https://mdn.io/Array/reverse).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to modify.
     * @returns {Array} Returns `array`.
     * @example
     *
     * var array = [1, 2, 3];
     *
     * _.reverse(array);
     * // => [3, 2, 1]
     *
     * console.log(array);
     * // => [3, 2, 1]
     */
    function reverse(array) {
      return array == null ? array : nativeReverse.call(array);
    }

    /**
     * Creates a slice of `array` from `start` up to, but not including, `end`.
     *
     * **Note:** This method is used instead of
     * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
     * returned.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Array
     * @param {Array} array The array to slice.
     * @param {number} [start=0] The start position.
     * @param {number} [end=array.length] The end position.
     * @returns {Array} Returns the slice of `array`.
     */
    function slice(array, start, end) {
      var length = array == null ? 0 : array.length;
      if (!length) {
        return [];
      }
      if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
        start = 0;
        end = length;
      }
      else {
        start = start == null ? 0 : toInteger(start);
        end = end === undefined ? length : toInteger(end);
      }
      return baseSlice(array, start, end);
    }

    /**
     * Uses a binary search to determine the lowest index at which `value`
     * should be inserted into `array` in order to maintain its sort order.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {Array} array The sorted array to inspect.
     * @param {*} value The value to evaluate.
     * @returns {number} Returns the index at which `value` should be inserted
     *  into `array`.
     * @example
     *
     * _.sortedIndex([30, 50], 40);
     * // => 1
     */
    function sortedIndex(array, value) {
      return baseSortedIndex(array, value);
    }

    /**
     * This method is like `_.sortedIndex` except that it accepts `iteratee`
     * which is invoked for `value` and each element of `array` to compute their
     * sort ranking. The iteratee is invoked with one argument: (value).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The sorted array to inspect.
     * @param {*} value The value to evaluate.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {number} Returns the index at which `value` should be inserted
     *  into `array`.
     * @example
     *
     * var objects = [{ 'x': 4 }, { 'x': 5 }];
     *
     * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
     * // => 0
     *
     * // The `_.property` iteratee shorthand.
     * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
     * // => 0
     */
    function sortedIndexBy(array, value, iteratee) {
      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
    }

    /**
     * This method is like `_.indexOf` except that it performs a binary
     * search on a sorted `array`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {*} value The value to search for.
     * @returns {number} Returns the index of the matched value, else `-1`.
     * @example
     *
     * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
     * // => 1
     */
    function sortedIndexOf(array, value) {
      var length = array == null ? 0 : array.length;
      if (length) {
        var index = baseSortedIndex(array, value);
        if (index < length && eq(array[index], value)) {
          return index;
        }
      }
      return -1;
    }

    /**
     * This method is like `_.sortedIndex` except that it returns the highest
     * index at which `value` should be inserted into `array` in order to
     * maintain its sort order.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Array
     * @param {Array} array The sorted array to inspect.
     * @param {*} value The value to evaluate.
     * @returns {number} Returns the index at which `value` should be inserted
     *  into `array`.
     * @example
     *
     * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
     * // => 4
     */
    function sortedLastIndex(array, value) {
      return baseSortedIndex(array, value, true);
    }

    /**
     * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
     * which is invoked for `value` and each element of `array` to compute their
     * sort ranking. The iteratee is invoked with one argument: (value).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The sorted array to inspect.
     * @param {*} value The value to evaluate.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {number} Returns the index at which `value` should be inserted
     *  into `array`.
     * @example
     *
     * var objects = [{ 'x': 4 }, { 'x': 5 }];
     *
     * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
     * // => 1
     *
     * // The `_.property` iteratee shorthand.
     * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
     * // => 1
     */
    function sortedLastIndexBy(array, value, iteratee) {
      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
    }

    /**
     * This method is like `_.lastIndexOf` except that it performs a binary
     * search on a sorted `array`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {*} value The value to search for.
     * @returns {number} Returns the index of the matched value, else `-1`.
     * @example
     *
     * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
     * // => 3
     */
    function sortedLastIndexOf(array, value) {
      var length = array == null ? 0 : array.length;
      if (length) {
        var index = baseSortedIndex(array, value, true) - 1;
        if (eq(array[index], value)) {
          return index;
        }
      }
      return -1;
    }

    /**
     * This method is like `_.uniq` except that it's designed and optimized
     * for sorted arrays.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @returns {Array} Returns the new duplicate free array.
     * @example
     *
     * _.sortedUniq([1, 1, 2]);
     * // => [1, 2]
     */
    function sortedUniq(array) {
      return (array && array.length)
        ? baseSortedUniq(array)
        : [];
    }

    /**
     * This method is like `_.uniqBy` except that it's designed and optimized
     * for sorted arrays.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {Function} [iteratee] The iteratee invoked per element.
     * @returns {Array} Returns the new duplicate free array.
     * @example
     *
     * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
     * // => [1.1, 2.3]
     */
    function sortedUniqBy(array, iteratee) {
      return (array && array.length)
        ? baseSortedUniq(array, getIteratee(iteratee, 2))
        : [];
    }

    /**
     * Gets all but the first element of `array`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to query.
     * @returns {Array} Returns the slice of `array`.
     * @example
     *
     * _.tail([1, 2, 3]);
     * // => [2, 3]
     */
    function tail(array) {
      var length = array == null ? 0 : array.length;
      return length ? baseSlice(array, 1, length) : [];
    }

    /**
     * Creates a slice of `array` with `n` elements taken from the beginning.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {Array} array The array to query.
     * @param {number} [n=1] The number of elements to take.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {Array} Returns the slice of `array`.
     * @example
     *
     * _.take([1, 2, 3]);
     * // => [1]
     *
     * _.take([1, 2, 3], 2);
     * // => [1, 2]
     *
     * _.take([1, 2, 3], 5);
     * // => [1, 2, 3]
     *
     * _.take([1, 2, 3], 0);
     * // => []
     */
    function take(array, n, guard) {
      if (!(array && array.length)) {
        return [];
      }
      n = (guard || n === undefined) ? 1 : toInteger(n);
      return baseSlice(array, 0, n < 0 ? 0 : n);
    }

    /**
     * Creates a slice of `array` with `n` elements taken from the end.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Array
     * @param {Array} array The array to query.
     * @param {number} [n=1] The number of elements to take.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {Array} Returns the slice of `array`.
     * @example
     *
     * _.takeRight([1, 2, 3]);
     * // => [3]
     *
     * _.takeRight([1, 2, 3], 2);
     * // => [2, 3]
     *
     * _.takeRight([1, 2, 3], 5);
     * // => [1, 2, 3]
     *
     * _.takeRight([1, 2, 3], 0);
     * // => []
     */
    function takeRight(array, n, guard) {
      var length = array == null ? 0 : array.length;
      if (!length) {
        return [];
      }
      n = (guard || n === undefined) ? 1 : toInteger(n);
      n = length - n;
      return baseSlice(array, n < 0 ? 0 : n, length);
    }

    /**
     * Creates a slice of `array` with elements taken from the end. Elements are
     * taken until `predicate` returns falsey. The predicate is invoked with
     * three arguments: (value, index, array).
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Array
     * @param {Array} array The array to query.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @returns {Array} Returns the slice of `array`.
     * @example
     *
     * var users = [
     *   { 'user': 'barney',  'active': true },
     *   { 'user': 'fred',    'active': false },
     *   { 'user': 'pebbles', 'active': false }
     * ];
     *
     * _.takeRightWhile(users, function(o) { return !o.active; });
     * // => objects for ['fred', 'pebbles']
     *
     * // The `_.matches` iteratee shorthand.
     * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
     * // => objects for ['pebbles']
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.takeRightWhile(users, ['active', false]);
     * // => objects for ['fred', 'pebbles']
     *
     * // The `_.property` iteratee shorthand.
     * _.takeRightWhile(users, 'active');
     * // => []
     */
    function takeRightWhile(array, predicate) {
      return (array && array.length)
        ? baseWhile(array, getIteratee(predicate, 3), false, true)
        : [];
    }

    /**
     * Creates a slice of `array` with elements taken from the beginning. Elements
     * are taken until `predicate` returns falsey. The predicate is invoked with
     * three arguments: (value, index, array).
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Array
     * @param {Array} array The array to query.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @returns {Array} Returns the slice of `array`.
     * @example
     *
     * var users = [
     *   { 'user': 'barney',  'active': false },
     *   { 'user': 'fred',    'active': false },
     *   { 'user': 'pebbles', 'active': true }
     * ];
     *
     * _.takeWhile(users, function(o) { return !o.active; });
     * // => objects for ['barney', 'fred']
     *
     * // The `_.matches` iteratee shorthand.
     * _.takeWhile(users, { 'user': 'barney', 'active': false });
     * // => objects for ['barney']
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.takeWhile(users, ['active', false]);
     * // => objects for ['barney', 'fred']
     *
     * // The `_.property` iteratee shorthand.
     * _.takeWhile(users, 'active');
     * // => []
     */
    function takeWhile(array, predicate) {
      return (array && array.length)
        ? baseWhile(array, getIteratee(predicate, 3))
        : [];
    }

    /**
     * Creates an array of unique values, in order, from all given arrays using
     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
     * for equality comparisons.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {...Array} [arrays] The arrays to inspect.
     * @returns {Array} Returns the new array of combined values.
     * @example
     *
     * _.union([2], [1, 2]);
     * // => [2, 1]
     */
    var union = baseRest(function(arrays) {
      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
    });

    /**
     * This method is like `_.union` except that it accepts `iteratee` which is
     * invoked for each element of each `arrays` to generate the criterion by
     * which uniqueness is computed. Result values are chosen from the first
     * array in which the value occurs. The iteratee is invoked with one argument:
     * (value).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {...Array} [arrays] The arrays to inspect.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {Array} Returns the new array of combined values.
     * @example
     *
     * _.unionBy([2.1], [1.2, 2.3], Math.floor);
     * // => [2.1, 1.2]
     *
     * // The `_.property` iteratee shorthand.
     * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
     * // => [{ 'x': 1 }, { 'x': 2 }]
     */
    var unionBy = baseRest(function(arrays) {
      var iteratee = last(arrays);
      if (isArrayLikeObject(iteratee)) {
        iteratee = undefined;
      }
      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
    });

    /**
     * This method is like `_.union` except that it accepts `comparator` which
     * is invoked to compare elements of `arrays`. Result values are chosen from
     * the first array in which the value occurs. The comparator is invoked
     * with two arguments: (arrVal, othVal).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {...Array} [arrays] The arrays to inspect.
     * @param {Function} [comparator] The comparator invoked per element.
     * @returns {Array} Returns the new array of combined values.
     * @example
     *
     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
     *
     * _.unionWith(objects, others, _.isEqual);
     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
     */
    var unionWith = baseRest(function(arrays) {
      var comparator = last(arrays);
      comparator = typeof comparator == 'function' ? comparator : undefined;
      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
    });

    /**
     * Creates a duplicate-free version of an array, using
     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
     * for equality comparisons, in which only the first occurrence of each element
     * is kept. The order of result values is determined by the order they occur
     * in the array.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @returns {Array} Returns the new duplicate free array.
     * @example
     *
     * _.uniq([2, 1, 2]);
     * // => [2, 1]
     */
    function uniq(array) {
      return (array && array.length) ? baseUniq(array) : [];
    }

    /**
     * This method is like `_.uniq` except that it accepts `iteratee` which is
     * invoked for each element in `array` to generate the criterion by which
     * uniqueness is computed. The order of result values is determined by the
     * order they occur in the array. The iteratee is invoked with one argument:
     * (value).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {Array} Returns the new duplicate free array.
     * @example
     *
     * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
     * // => [2.1, 1.2]
     *
     * // The `_.property` iteratee shorthand.
     * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
     * // => [{ 'x': 1 }, { 'x': 2 }]
     */
    function uniqBy(array, iteratee) {
      return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
    }

    /**
     * This method is like `_.uniq` except that it accepts `comparator` which
     * is invoked to compare elements of `array`. The order of result values is
     * determined by the order they occur in the array.The comparator is invoked
     * with two arguments: (arrVal, othVal).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {Function} [comparator] The comparator invoked per element.
     * @returns {Array} Returns the new duplicate free array.
     * @example
     *
     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
     *
     * _.uniqWith(objects, _.isEqual);
     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
     */
    function uniqWith(array, comparator) {
      comparator = typeof comparator == 'function' ? comparator : undefined;
      return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
    }

    /**
     * This method is like `_.zip` except that it accepts an array of grouped
     * elements and creates an array regrouping the elements to their pre-zip
     * configuration.
     *
     * @static
     * @memberOf _
     * @since 1.2.0
     * @category Array
     * @param {Array} array The array of grouped elements to process.
     * @returns {Array} Returns the new array of regrouped elements.
     * @example
     *
     * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
     * // => [['a', 1, true], ['b', 2, false]]
     *
     * _.unzip(zipped);
     * // => [['a', 'b'], [1, 2], [true, false]]
     */
    function unzip(array) {
      if (!(array && array.length)) {
        return [];
      }
      var length = 0;
      array = arrayFilter(array, function(group) {
        if (isArrayLikeObject(group)) {
          length = nativeMax(group.length, length);
          return true;
        }
      });
      return baseTimes(length, function(index) {
        return arrayMap(array, baseProperty(index));
      });
    }

    /**
     * This method is like `_.unzip` except that it accepts `iteratee` to specify
     * how regrouped values should be combined. The iteratee is invoked with the
     * elements of each group: (...group).
     *
     * @static
     * @memberOf _
     * @since 3.8.0
     * @category Array
     * @param {Array} array The array of grouped elements to process.
     * @param {Function} [iteratee=_.identity] The function to combine
     *  regrouped values.
     * @returns {Array} Returns the new array of regrouped elements.
     * @example
     *
     * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
     * // => [[1, 10, 100], [2, 20, 200]]
     *
     * _.unzipWith(zipped, _.add);
     * // => [3, 30, 300]
     */
    function unzipWith(array, iteratee) {
      if (!(array && array.length)) {
        return [];
      }
      var result = unzip(array);
      if (iteratee == null) {
        return result;
      }
      return arrayMap(result, function(group) {
        return apply(iteratee, undefined, group);
      });
    }

    /**
     * Creates an array excluding all given values using
     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
     * for equality comparisons.
     *
     * **Note:** Unlike `_.pull`, this method returns a new array.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {...*} [values] The values to exclude.
     * @returns {Array} Returns the new array of filtered values.
     * @see _.difference, _.xor
     * @example
     *
     * _.without([2, 1, 2, 3], 1, 2);
     * // => [3]
     */
    var without = baseRest(function(array, values) {
      return isArrayLikeObject(array)
        ? baseDifference(array, values)
        : [];
    });

    /**
     * Creates an array of unique values that is the
     * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
     * of the given arrays. The order of result values is determined by the order
     * they occur in the arrays.
     *
     * @static
     * @memberOf _
     * @since 2.4.0
     * @category Array
     * @param {...Array} [arrays] The arrays to inspect.
     * @returns {Array} Returns the new array of filtered values.
     * @see _.difference, _.without
     * @example
     *
     * _.xor([2, 1], [2, 3]);
     * // => [1, 3]
     */
    var xor = baseRest(function(arrays) {
      return baseXor(arrayFilter(arrays, isArrayLikeObject));
    });

    /**
     * This method is like `_.xor` except that it accepts `iteratee` which is
     * invoked for each element of each `arrays` to generate the criterion by
     * which by which they're compared. The order of result values is determined
     * by the order they occur in the arrays. The iteratee is invoked with one
     * argument: (value).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {...Array} [arrays] The arrays to inspect.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {Array} Returns the new array of filtered values.
     * @example
     *
     * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
     * // => [1.2, 3.4]
     *
     * // The `_.property` iteratee shorthand.
     * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
     * // => [{ 'x': 2 }]
     */
    var xorBy = baseRest(function(arrays) {
      var iteratee = last(arrays);
      if (isArrayLikeObject(iteratee)) {
        iteratee = undefined;
      }
      return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
    });

    /**
     * This method is like `_.xor` except that it accepts `comparator` which is
     * invoked to compare elements of `arrays`. The order of result values is
     * determined by the order they occur in the arrays. The comparator is invoked
     * with two arguments: (arrVal, othVal).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {...Array} [arrays] The arrays to inspect.
     * @param {Function} [comparator] The comparator invoked per element.
     * @returns {Array} Returns the new array of filtered values.
     * @example
     *
     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
     *
     * _.xorWith(objects, others, _.isEqual);
     * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
     */
    var xorWith = baseRest(function(arrays) {
      var comparator = last(arrays);
      comparator = typeof comparator == 'function' ? comparator : undefined;
      return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
    });

    /**
     * Creates an array of grouped elements, the first of which contains the
     * first elements of the given arrays, the second of which contains the
     * second elements of the given arrays, and so on.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {...Array} [arrays] The arrays to process.
     * @returns {Array} Returns the new array of grouped elements.
     * @example
     *
     * _.zip(['a', 'b'], [1, 2], [true, false]);
     * // => [['a', 1, true], ['b', 2, false]]
     */
    var zip = baseRest(unzip);

    /**
     * This method is like `_.fromPairs` except that it accepts two arrays,
     * one of property identifiers and one of corresponding values.
     *
     * @static
     * @memberOf _
     * @since 0.4.0
     * @category Array
     * @param {Array} [props=[]] The property identifiers.
     * @param {Array} [values=[]] The property values.
     * @returns {Object} Returns the new object.
     * @example
     *
     * _.zipObject(['a', 'b'], [1, 2]);
     * // => { 'a': 1, 'b': 2 }
     */
    function zipObject(props, values) {
      return baseZipObject(props || [], values || [], assignValue);
    }

    /**
     * This method is like `_.zipObject` except that it supports property paths.
     *
     * @static
     * @memberOf _
     * @since 4.1.0
     * @category Array
     * @param {Array} [props=[]] The property identifiers.
     * @param {Array} [values=[]] The property values.
     * @returns {Object} Returns the new object.
     * @example
     *
     * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
     * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
     */
    function zipObjectDeep(props, values) {
      return baseZipObject(props || [], values || [], baseSet);
    }

    /**
     * This method is like `_.zip` except that it accepts `iteratee` to specify
     * how grouped values should be combined. The iteratee is invoked with the
     * elements of each group: (...group).
     *
     * @static
     * @memberOf _
     * @since 3.8.0
     * @category Array
     * @param {...Array} [arrays] The arrays to process.
     * @param {Function} [iteratee=_.identity] The function to combine
     *  grouped values.
     * @returns {Array} Returns the new array of grouped elements.
     * @example
     *
     * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
     *   return a + b + c;
     * });
     * // => [111, 222]
     */
    var zipWith = baseRest(function(arrays) {
      var length = arrays.length,
          iteratee = length > 1 ? arrays[length - 1] : undefined;

      iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
      return unzipWith(arrays, iteratee);
    });

    /*------------------------------------------------------------------------*/

    /**
     * Creates a `lodash` wrapper instance that wraps `value` with explicit method
     * chain sequences enabled. The result of such sequences must be unwrapped
     * with `_#value`.
     *
     * @static
     * @memberOf _
     * @since 1.3.0
     * @category Seq
     * @param {*} value The value to wrap.
     * @returns {Object} Returns the new `lodash` wrapper instance.
     * @example
     *
     * var users = [
     *   { 'user': 'barney',  'age': 36 },
     *   { 'user': 'fred',    'age': 40 },
     *   { 'user': 'pebbles', 'age': 1 }
     * ];
     *
     * var youngest = _
     *   .chain(users)
     *   .sortBy('age')
     *   .map(function(o) {
     *     return o.user + ' is ' + o.age;
     *   })
     *   .head()
     *   .value();
     * // => 'pebbles is 1'
     */
    function chain(value) {
      var result = lodash(value);
      result.__chain__ = true;
      return result;
    }

    /**
     * This method invokes `interceptor` and returns `value`. The interceptor
     * is invoked with one argument; (value). The purpose of this method is to
     * "tap into" a method chain sequence in order to modify intermediate results.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Seq
     * @param {*} value The value to provide to `interceptor`.
     * @param {Function} interceptor The function to invoke.
     * @returns {*} Returns `value`.
     * @example
     *
     * _([1, 2, 3])
     *  .tap(function(array) {
     *    // Mutate input array.
     *    array.pop();
     *  })
     *  .reverse()
     *  .value();
     * // => [2, 1]
     */
    function tap(value, interceptor) {
      interceptor(value);
      return value;
    }

    /**
     * This method is like `_.tap` except that it returns the result of `interceptor`.
     * The purpose of this method is to "pass thru" values replacing intermediate
     * results in a method chain sequence.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Seq
     * @param {*} value The value to provide to `interceptor`.
     * @param {Function} interceptor The function to invoke.
     * @returns {*} Returns the result of `interceptor`.
     * @example
     *
     * _('  abc  ')
     *  .chain()
     *  .trim()
     *  .thru(function(value) {
     *    return [value];
     *  })
     *  .value();
     * // => ['abc']
     */
    function thru(value, interceptor) {
      return interceptor(value);
    }

    /**
     * This method is the wrapper version of `_.at`.
     *
     * @name at
     * @memberOf _
     * @since 1.0.0
     * @category Seq
     * @param {...(string|string[])} [paths] The property paths to pick.
     * @returns {Object} Returns the new `lodash` wrapper instance.
     * @example
     *
     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
     *
     * _(object).at(['a[0].b.c', 'a[1]']).value();
     * // => [3, 4]
     */
    var wrapperAt = flatRest(function(paths) {
      var length = paths.length,
          start = length ? paths[0] : 0,
          value = this.__wrapped__,
          interceptor = function(object) { return baseAt(object, paths); };

      if (length > 1 || this.__actions__.length ||
          !(value instanceof LazyWrapper) || !isIndex(start)) {
        return this.thru(interceptor);
      }
      value = value.slice(start, +start + (length ? 1 : 0));
      value.__actions__.push({
        'func': thru,
        'args': [interceptor],
        'thisArg': undefined
      });
      return new LodashWrapper(value, this.__chain__).thru(function(array) {
        if (length && !array.length) {
          array.push(undefined);
        }
        return array;
      });
    });

    /**
     * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
     *
     * @name chain
     * @memberOf _
     * @since 0.1.0
     * @category Seq
     * @returns {Object} Returns the new `lodash` wrapper instance.
     * @example
     *
     * var users = [
     *   { 'user': 'barney', 'age': 36 },
     *   { 'user': 'fred',   'age': 40 }
     * ];
     *
     * // A sequence without explicit chaining.
     * _(users).head();
     * // => { 'user': 'barney', 'age': 36 }
     *
     * // A sequence with explicit chaining.
     * _(users)
     *   .chain()
     *   .head()
     *   .pick('user')
     *   .value();
     * // => { 'user': 'barney' }
     */
    function wrapperChain() {
      return chain(this);
    }

    /**
     * Executes the chain sequence and returns the wrapped result.
     *
     * @name commit
     * @memberOf _
     * @since 3.2.0
     * @category Seq
     * @returns {Object} Returns the new `lodash` wrapper instance.
     * @example
     *
     * var array = [1, 2];
     * var wrapped = _(array).push(3);
     *
     * console.log(array);
     * // => [1, 2]
     *
     * wrapped = wrapped.commit();
     * console.log(array);
     * // => [1, 2, 3]
     *
     * wrapped.last();
     * // => 3
     *
     * console.log(array);
     * // => [1, 2, 3]
     */
    function wrapperCommit() {
      return new LodashWrapper(this.value(), this.__chain__);
    }

    /**
     * Gets the next value on a wrapped object following the
     * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
     *
     * @name next
     * @memberOf _
     * @since 4.0.0
     * @category Seq
     * @returns {Object} Returns the next iterator value.
     * @example
     *
     * var wrapped = _([1, 2]);
     *
     * wrapped.next();
     * // => { 'done': false, 'value': 1 }
     *
     * wrapped.next();
     * // => { 'done': false, 'value': 2 }
     *
     * wrapped.next();
     * // => { 'done': true, 'value': undefined }
     */
    function wrapperNext() {
      if (this.__values__ === undefined) {
        this.__values__ = toArray(this.value());
      }
      var done = this.__index__ >= this.__values__.length,
          value = done ? undefined : this.__values__[this.__index__++];

      return { 'done': done, 'value': value };
    }

    /**
     * Enables the wrapper to be iterable.
     *
     * @name Symbol.iterator
     * @memberOf _
     * @since 4.0.0
     * @category Seq
     * @returns {Object} Returns the wrapper object.
     * @example
     *
     * var wrapped = _([1, 2]);
     *
     * wrapped[Symbol.iterator]() === wrapped;
     * // => true
     *
     * Array.from(wrapped);
     * // => [1, 2]
     */
    function wrapperToIterator() {
      return this;
    }

    /**
     * Creates a clone of the chain sequence planting `value` as the wrapped value.
     *
     * @name plant
     * @memberOf _
     * @since 3.2.0
     * @category Seq
     * @param {*} value The value to plant.
     * @returns {Object} Returns the new `lodash` wrapper instance.
     * @example
     *
     * function square(n) {
     *   return n * n;
     * }
     *
     * var wrapped = _([1, 2]).map(square);
     * var other = wrapped.plant([3, 4]);
     *
     * other.value();
     * // => [9, 16]
     *
     * wrapped.value();
     * // => [1, 4]
     */
    function wrapperPlant(value) {
      var result,
          parent = this;

      while (parent instanceof baseLodash) {
        var clone = wrapperClone(parent);
        clone.__index__ = 0;
        clone.__values__ = undefined;
        if (result) {
          previous.__wrapped__ = clone;
        } else {
          result = clone;
        }
        var previous = clone;
        parent = parent.__wrapped__;
      }
      previous.__wrapped__ = value;
      return result;
    }

    /**
     * This method is the wrapper version of `_.reverse`.
     *
     * **Note:** This method mutates the wrapped array.
     *
     * @name reverse
     * @memberOf _
     * @since 0.1.0
     * @category Seq
     * @returns {Object} Returns the new `lodash` wrapper instance.
     * @example
     *
     * var array = [1, 2, 3];
     *
     * _(array).reverse().value()
     * // => [3, 2, 1]
     *
     * console.log(array);
     * // => [3, 2, 1]
     */
    function wrapperReverse() {
      var value = this.__wrapped__;
      if (value instanceof LazyWrapper) {
        var wrapped = value;
        if (this.__actions__.length) {
          wrapped = new LazyWrapper(this);
        }
        wrapped = wrapped.reverse();
        wrapped.__actions__.push({
          'func': thru,
          'args': [reverse],
          'thisArg': undefined
        });
        return new LodashWrapper(wrapped, this.__chain__);
      }
      return this.thru(reverse);
    }

    /**
     * Executes the chain sequence to resolve the unwrapped value.
     *
     * @name value
     * @memberOf _
     * @since 0.1.0
     * @alias toJSON, valueOf
     * @category Seq
     * @returns {*} Returns the resolved unwrapped value.
     * @example
     *
     * _([1, 2, 3]).value();
     * // => [1, 2, 3]
     */
    function wrapperValue() {
      return baseWrapperValue(this.__wrapped__, this.__actions__);
    }

    /*------------------------------------------------------------------------*/

    /**
     * Creates an object composed of keys generated from the results of running
     * each element of `collection` thru `iteratee`. The corresponding value of
     * each key is the number of times the key was returned by `iteratee`. The
     * iteratee is invoked with one argument: (value).
     *
     * @static
     * @memberOf _
     * @since 0.5.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
     * @returns {Object} Returns the composed aggregate object.
     * @example
     *
     * _.countBy([6.1, 4.2, 6.3], Math.floor);
     * // => { '4': 1, '6': 2 }
     *
     * // The `_.property` iteratee shorthand.
     * _.countBy(['one', 'two', 'three'], 'length');
     * // => { '3': 2, '5': 1 }
     */
    var countBy = createAggregator(function(result, value, key) {
      if (hasOwnProperty.call(result, key)) {
        ++result[key];
      } else {
        baseAssignValue(result, key, 1);
      }
    });

    /**
     * Checks if `predicate` returns truthy for **all** elements of `collection`.
     * Iteration is stopped once `predicate` returns falsey. The predicate is
     * invoked with three arguments: (value, index|key, collection).
     *
     * **Note:** This method returns `true` for
     * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
     * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
     * elements of empty collections.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {boolean} Returns `true` if all elements pass the predicate check,
     *  else `false`.
     * @example
     *
     * _.every([true, 1, null, 'yes'], Boolean);
     * // => false
     *
     * var users = [
     *   { 'user': 'barney', 'age': 36, 'active': false },
     *   { 'user': 'fred',   'age': 40, 'active': false }
     * ];
     *
     * // The `_.matches` iteratee shorthand.
     * _.every(users, { 'user': 'barney', 'active': false });
     * // => false
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.every(users, ['active', false]);
     * // => true
     *
     * // The `_.property` iteratee shorthand.
     * _.every(users, 'active');
     * // => false
     */
    function every(collection, predicate, guard) {
      var func = isArray(collection) ? arrayEvery : baseEvery;
      if (guard && isIterateeCall(collection, predicate, guard)) {
        predicate = undefined;
      }
      return func(collection, getIteratee(predicate, 3));
    }

    /**
     * Iterates over elements of `collection`, returning an array of all elements
     * `predicate` returns truthy for. The predicate is invoked with three
     * arguments: (value, index|key, collection).
     *
     * **Note:** Unlike `_.remove`, this method returns a new array.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @returns {Array} Returns the new filtered array.
     * @see _.reject
     * @example
     *
     * var users = [
     *   { 'user': 'barney', 'age': 36, 'active': true },
     *   { 'user': 'fred',   'age': 40, 'active': false }
     * ];
     *
     * _.filter(users, function(o) { return !o.active; });
     * // => objects for ['fred']
     *
     * // The `_.matches` iteratee shorthand.
     * _.filter(users, { 'age': 36, 'active': true });
     * // => objects for ['barney']
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.filter(users, ['active', false]);
     * // => objects for ['fred']
     *
     * // The `_.property` iteratee shorthand.
     * _.filter(users, 'active');
     * // => objects for ['barney']
     *
     * // Combining several predicates using `_.overEvery` or `_.overSome`.
     * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
     * // => objects for ['fred', 'barney']
     */
    function filter(collection, predicate) {
      var func = isArray(collection) ? arrayFilter : baseFilter;
      return func(collection, getIteratee(predicate, 3));
    }

    /**
     * Iterates over elements of `collection`, returning the first element
     * `predicate` returns truthy for. The predicate is invoked with three
     * arguments: (value, index|key, collection).
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object} collection The collection to inspect.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @param {number} [fromIndex=0] The index to search from.
     * @returns {*} Returns the matched element, else `undefined`.
     * @example
     *
     * var users = [
     *   { 'user': 'barney',  'age': 36, 'active': true },
     *   { 'user': 'fred',    'age': 40, 'active': false },
     *   { 'user': 'pebbles', 'age': 1,  'active': true }
     * ];
     *
     * _.find(users, function(o) { return o.age < 40; });
     * // => object for 'barney'
     *
     * // The `_.matches` iteratee shorthand.
     * _.find(users, { 'age': 1, 'active': true });
     * // => object for 'pebbles'
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.find(users, ['active', false]);
     * // => object for 'fred'
     *
     * // The `_.property` iteratee shorthand.
     * _.find(users, 'active');
     * // => object for 'barney'
     */
    var find = createFind(findIndex);

    /**
     * This method is like `_.find` except that it iterates over elements of
     * `collection` from right to left.
     *
     * @static
     * @memberOf _
     * @since 2.0.0
     * @category Collection
     * @param {Array|Object} collection The collection to inspect.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @param {number} [fromIndex=collection.length-1] The index to search from.
     * @returns {*} Returns the matched element, else `undefined`.
     * @example
     *
     * _.findLast([1, 2, 3, 4], function(n) {
     *   return n % 2 == 1;
     * });
     * // => 3
     */
    var findLast = createFind(findLastIndex);

    /**
     * Creates a flattened array of values by running each element in `collection`
     * thru `iteratee` and flattening the mapped results. The iteratee is invoked
     * with three arguments: (value, index|key, collection).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @returns {Array} Returns the new flattened array.
     * @example
     *
     * function duplicate(n) {
     *   return [n, n];
     * }
     *
     * _.flatMap([1, 2], duplicate);
     * // => [1, 1, 2, 2]
     */
    function flatMap(collection, iteratee) {
      return baseFlatten(map(collection, iteratee), 1);
    }

    /**
     * This method is like `_.flatMap` except that it recursively flattens the
     * mapped results.
     *
     * @static
     * @memberOf _
     * @since 4.7.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @returns {Array} Returns the new flattened array.
     * @example
     *
     * function duplicate(n) {
     *   return [[[n, n]]];
     * }
     *
     * _.flatMapDeep([1, 2], duplicate);
     * // => [1, 1, 2, 2]
     */
    function flatMapDeep(collection, iteratee) {
      return baseFlatten(map(collection, iteratee), INFINITY);
    }

    /**
     * This method is like `_.flatMap` except that it recursively flattens the
     * mapped results up to `depth` times.
     *
     * @static
     * @memberOf _
     * @since 4.7.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @param {number} [depth=1] The maximum recursion depth.
     * @returns {Array} Returns the new flattened array.
     * @example
     *
     * function duplicate(n) {
     *   return [[[n, n]]];
     * }
     *
     * _.flatMapDepth([1, 2], duplicate, 2);
     * // => [[1, 1], [2, 2]]
     */
    function flatMapDepth(collection, iteratee, depth) {
      depth = depth === undefined ? 1 : toInteger(depth);
      return baseFlatten(map(collection, iteratee), depth);
    }

    /**
     * Iterates over elements of `collection` and invokes `iteratee` for each element.
     * The iteratee is invoked with three arguments: (value, index|key, collection).
     * Iteratee functions may exit iteration early by explicitly returning `false`.
     *
     * **Note:** As with other "Collections" methods, objects with a "length"
     * property are iterated like arrays. To avoid this behavior use `_.forIn`
     * or `_.forOwn` for object iteration.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @alias each
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @returns {Array|Object} Returns `collection`.
     * @see _.forEachRight
     * @example
     *
     * _.forEach([1, 2], function(value) {
     *   console.log(value);
     * });
     * // => Logs `1` then `2`.
     *
     * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
     *   console.log(key);
     * });
     * // => Logs 'a' then 'b' (iteration order is not guaranteed).
     */
    function forEach(collection, iteratee) {
      var func = isArray(collection) ? arrayEach : baseEach;
      return func(collection, getIteratee(iteratee, 3));
    }

    /**
     * This method is like `_.forEach` except that it iterates over elements of
     * `collection` from right to left.
     *
     * @static
     * @memberOf _
     * @since 2.0.0
     * @alias eachRight
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @returns {Array|Object} Returns `collection`.
     * @see _.forEach
     * @example
     *
     * _.forEachRight([1, 2], function(value) {
     *   console.log(value);
     * });
     * // => Logs `2` then `1`.
     */
    function forEachRight(collection, iteratee) {
      var func = isArray(collection) ? arrayEachRight : baseEachRight;
      return func(collection, getIteratee(iteratee, 3));
    }

    /**
     * Creates an object composed of keys generated from the results of running
     * each element of `collection` thru `iteratee`. The order of grouped values
     * is determined by the order they occur in `collection`. The corresponding
     * value of each key is an array of elements responsible for generating the
     * key. The iteratee is invoked with one argument: (value).
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
     * @returns {Object} Returns the composed aggregate object.
     * @example
     *
     * _.groupBy([6.1, 4.2, 6.3], Math.floor);
     * // => { '4': [4.2], '6': [6.1, 6.3] }
     *
     * // The `_.property` iteratee shorthand.
     * _.groupBy(['one', 'two', 'three'], 'length');
     * // => { '3': ['one', 'two'], '5': ['three'] }
     */
    var groupBy = createAggregator(function(result, value, key) {
      if (hasOwnProperty.call(result, key)) {
        result[key].push(value);
      } else {
        baseAssignValue(result, key, [value]);
      }
    });

    /**
     * Checks if `value` is in `collection`. If `collection` is a string, it's
     * checked for a substring of `value`, otherwise
     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
     * is used for equality comparisons. If `fromIndex` is negative, it's used as
     * the offset from the end of `collection`.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object|string} collection The collection to inspect.
     * @param {*} value The value to search for.
     * @param {number} [fromIndex=0] The index to search from.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
     * @returns {boolean} Returns `true` if `value` is found, else `false`.
     * @example
     *
     * _.includes([1, 2, 3], 1);
     * // => true
     *
     * _.includes([1, 2, 3], 1, 2);
     * // => false
     *
     * _.includes({ 'a': 1, 'b': 2 }, 1);
     * // => true
     *
     * _.includes('abcd', 'bc');
     * // => true
     */
    function includes(collection, value, fromIndex, guard) {
      collection = isArrayLike(collection) ? collection : values(collection);
      fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;

      var length = collection.length;
      if (fromIndex < 0) {
        fromIndex = nativeMax(length + fromIndex, 0);
      }
      return isString(collection)
        ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
        : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
    }

    /**
     * Invokes the method at `path` of each element in `collection`, returning
     * an array of the results of each invoked method. Any additional arguments
     * are provided to each invoked method. If `path` is a function, it's invoked
     * for, and `this` bound to, each element in `collection`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Array|Function|string} path The path of the method to invoke or
     *  the function invoked per iteration.
     * @param {...*} [args] The arguments to invoke each method with.
     * @returns {Array} Returns the array of results.
     * @example
     *
     * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
     * // => [[1, 5, 7], [1, 2, 3]]
     *
     * _.invokeMap([123, 456], String.prototype.split, '');
     * // => [['1', '2', '3'], ['4', '5', '6']]
     */
    var invokeMap = baseRest(function(collection, path, args) {
      var index = -1,
          isFunc = typeof path == 'function',
          result = isArrayLike(collection) ? Array(collection.length) : [];

      baseEach(collection, function(value) {
        result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
      });
      return result;
    });

    /**
     * Creates an object composed of keys generated from the results of running
     * each element of `collection` thru `iteratee`. The corresponding value of
     * each key is the last element responsible for generating the key. The
     * iteratee is invoked with one argument: (value).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
     * @returns {Object} Returns the composed aggregate object.
     * @example
     *
     * var array = [
     *   { 'dir': 'left', 'code': 97 },
     *   { 'dir': 'right', 'code': 100 }
     * ];
     *
     * _.keyBy(array, function(o) {
     *   return String.fromCharCode(o.code);
     * });
     * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
     *
     * _.keyBy(array, 'dir');
     * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
     */
    var keyBy = createAggregator(function(result, value, key) {
      baseAssignValue(result, key, value);
    });

    /**
     * Creates an array of values by running each element in `collection` thru
     * `iteratee`. The iteratee is invoked with three arguments:
     * (value, index|key, collection).
     *
     * Many lodash methods are guarded to work as iteratees for methods like
     * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
     *
     * The guarded methods are:
     * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
     * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
     * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
     * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @returns {Array} Returns the new mapped array.
     * @example
     *
     * function square(n) {
     *   return n * n;
     * }
     *
     * _.map([4, 8], square);
     * // => [16, 64]
     *
     * _.map({ 'a': 4, 'b': 8 }, square);
     * // => [16, 64] (iteration order is not guaranteed)
     *
     * var users = [
     *   { 'user': 'barney' },
     *   { 'user': 'fred' }
     * ];
     *
     * // The `_.property` iteratee shorthand.
     * _.map(users, 'user');
     * // => ['barney', 'fred']
     */
    function map(collection, iteratee) {
      var func = isArray(collection) ? arrayMap : baseMap;
      return func(collection, getIteratee(iteratee, 3));
    }

    /**
     * This method is like `_.sortBy` except that it allows specifying the sort
     * orders of the iteratees to sort by. If `orders` is unspecified, all values
     * are sorted in ascending order. Otherwise, specify an order of "desc" for
     * descending or "asc" for ascending sort order of corresponding values.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
     *  The iteratees to sort by.
     * @param {string[]} [orders] The sort orders of `iteratees`.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
     * @returns {Array} Returns the new sorted array.
     * @example
     *
     * var users = [
     *   { 'user': 'fred',   'age': 48 },
     *   { 'user': 'barney', 'age': 34 },
     *   { 'user': 'fred',   'age': 40 },
     *   { 'user': 'barney', 'age': 36 }
     * ];
     *
     * // Sort by `user` in ascending order and by `age` in descending order.
     * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
     */
    function orderBy(collection, iteratees, orders, guard) {
      if (collection == null) {
        return [];
      }
      if (!isArray(iteratees)) {
        iteratees = iteratees == null ? [] : [iteratees];
      }
      orders = guard ? undefined : orders;
      if (!isArray(orders)) {
        orders = orders == null ? [] : [orders];
      }
      return baseOrderBy(collection, iteratees, orders);
    }

    /**
     * Creates an array of elements split into two groups, the first of which
     * contains elements `predicate` returns truthy for, the second of which
     * contains elements `predicate` returns falsey for. The predicate is
     * invoked with one argument: (value).
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @returns {Array} Returns the array of grouped elements.
     * @example
     *
     * var users = [
     *   { 'user': 'barney',  'age': 36, 'active': false },
     *   { 'user': 'fred',    'age': 40, 'active': true },
     *   { 'user': 'pebbles', 'age': 1,  'active': false }
     * ];
     *
     * _.partition(users, function(o) { return o.active; });
     * // => objects for [['fred'], ['barney', 'pebbles']]
     *
     * // The `_.matches` iteratee shorthand.
     * _.partition(users, { 'age': 1, 'active': false });
     * // => objects for [['pebbles'], ['barney', 'fred']]
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.partition(users, ['active', false]);
     * // => objects for [['barney', 'pebbles'], ['fred']]
     *
     * // The `_.property` iteratee shorthand.
     * _.partition(users, 'active');
     * // => objects for [['fred'], ['barney', 'pebbles']]
     */
    var partition = createAggregator(function(result, value, key) {
      result[key ? 0 : 1].push(value);
    }, function() { return [[], []]; });

    /**
     * Reduces `collection` to a value which is the accumulated result of running
     * each element in `collection` thru `iteratee`, where each successive
     * invocation is supplied the return value of the previous. If `accumulator`
     * is not given, the first element of `collection` is used as the initial
     * value. The iteratee is invoked with four arguments:
     * (accumulator, value, index|key, collection).
     *
     * Many lodash methods are guarded to work as iteratees for methods like
     * `_.reduce`, `_.reduceRight`, and `_.transform`.
     *
     * The guarded methods are:
     * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
     * and `sortBy`
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @param {*} [accumulator] The initial value.
     * @returns {*} Returns the accumulated value.
     * @see _.reduceRight
     * @example
     *
     * _.reduce([1, 2], function(sum, n) {
     *   return sum + n;
     * }, 0);
     * // => 3
     *
     * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
     *   (result[value] || (result[value] = [])).push(key);
     *   return result;
     * }, {});
     * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
     */
    function reduce(collection, iteratee, accumulator) {
      var func = isArray(collection) ? arrayReduce : baseReduce,
          initAccum = arguments.length < 3;

      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
    }

    /**
     * This method is like `_.reduce` except that it iterates over elements of
     * `collection` from right to left.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @param {*} [accumulator] The initial value.
     * @returns {*} Returns the accumulated value.
     * @see _.reduce
     * @example
     *
     * var array = [[0, 1], [2, 3], [4, 5]];
     *
     * _.reduceRight(array, function(flattened, other) {
     *   return flattened.concat(other);
     * }, []);
     * // => [4, 5, 2, 3, 0, 1]
     */
    function reduceRight(collection, iteratee, accumulator) {
      var func = isArray(collection) ? arrayReduceRight : baseReduce,
          initAccum = arguments.length < 3;

      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
    }

    /**
     * The opposite of `_.filter`; this method returns the elements of `collection`
     * that `predicate` does **not** return truthy for.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @returns {Array} Returns the new filtered array.
     * @see _.filter
     * @example
     *
     * var users = [
     *   { 'user': 'barney', 'age': 36, 'active': false },
     *   { 'user': 'fred',   'age': 40, 'active': true }
     * ];
     *
     * _.reject(users, function(o) { return !o.active; });
     * // => objects for ['fred']
     *
     * // The `_.matches` iteratee shorthand.
     * _.reject(users, { 'age': 40, 'active': true });
     * // => objects for ['barney']
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.reject(users, ['active', false]);
     * // => objects for ['fred']
     *
     * // The `_.property` iteratee shorthand.
     * _.reject(users, 'active');
     * // => objects for ['barney']
     */
    function reject(collection, predicate) {
      var func = isArray(collection) ? arrayFilter : baseFilter;
      return func(collection, negate(getIteratee(predicate, 3)));
    }

    /**
     * Gets a random element from `collection`.
     *
     * @static
     * @memberOf _
     * @since 2.0.0
     * @category Collection
     * @param {Array|Object} collection The collection to sample.
     * @returns {*} Returns the random element.
     * @example
     *
     * _.sample([1, 2, 3, 4]);
     * // => 2
     */
    function sample(collection) {
      var func = isArray(collection) ? arraySample : baseSample;
      return func(collection);
    }

    /**
     * Gets `n` random elements at unique keys from `collection` up to the
     * size of `collection`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Collection
     * @param {Array|Object} collection The collection to sample.
     * @param {number} [n=1] The number of elements to sample.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {Array} Returns the random elements.
     * @example
     *
     * _.sampleSize([1, 2, 3], 2);
     * // => [3, 1]
     *
     * _.sampleSize([1, 2, 3], 4);
     * // => [2, 3, 1]
     */
    function sampleSize(collection, n, guard) {
      if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
        n = 1;
      } else {
        n = toInteger(n);
      }
      var func = isArray(collection) ? arraySampleSize : baseSampleSize;
      return func(collection, n);
    }

    /**
     * Creates an array of shuffled values, using a version of the
     * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object} collection The collection to shuffle.
     * @returns {Array} Returns the new shuffled array.
     * @example
     *
     * _.shuffle([1, 2, 3, 4]);
     * // => [4, 1, 3, 2]
     */
    function shuffle(collection) {
      var func = isArray(collection) ? arrayShuffle : baseShuffle;
      return func(collection);
    }

    /**
     * Gets the size of `collection` by returning its length for array-like
     * values or the number of own enumerable string keyed properties for objects.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object|string} collection The collection to inspect.
     * @returns {number} Returns the collection size.
     * @example
     *
     * _.size([1, 2, 3]);
     * // => 3
     *
     * _.size({ 'a': 1, 'b': 2 });
     * // => 2
     *
     * _.size('pebbles');
     * // => 7
     */
    function size(collection) {
      if (collection == null) {
        return 0;
      }
      if (isArrayLike(collection)) {
        return isString(collection) ? stringSize(collection) : collection.length;
      }
      var tag = getTag(collection);
      if (tag == mapTag || tag == setTag) {
        return collection.size;
      }
      return baseKeys(collection).length;
    }

    /**
     * Checks if `predicate` returns truthy for **any** element of `collection`.
     * Iteration is stopped once `predicate` returns truthy. The predicate is
     * invoked with three arguments: (value, index|key, collection).
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {boolean} Returns `true` if any element passes the predicate check,
     *  else `false`.
     * @example
     *
     * _.some([null, 0, 'yes', false], Boolean);
     * // => true
     *
     * var users = [
     *   { 'user': 'barney', 'active': true },
     *   { 'user': 'fred',   'active': false }
     * ];
     *
     * // The `_.matches` iteratee shorthand.
     * _.some(users, { 'user': 'barney', 'active': false });
     * // => false
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.some(users, ['active', false]);
     * // => true
     *
     * // The `_.property` iteratee shorthand.
     * _.some(users, 'active');
     * // => true
     */
    function some(collection, predicate, guard) {
      var func = isArray(collection) ? arraySome : baseSome;
      if (guard && isIterateeCall(collection, predicate, guard)) {
        predicate = undefined;
      }
      return func(collection, getIteratee(predicate, 3));
    }

    /**
     * Creates an array of elements, sorted in ascending order by the results of
     * running each element in a collection thru each iteratee. This method
     * performs a stable sort, that is, it preserves the original sort order of
     * equal elements. The iteratees are invoked with one argument: (value).
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {...(Function|Function[])} [iteratees=[_.identity]]
     *  The iteratees to sort by.
     * @returns {Array} Returns the new sorted array.
     * @example
     *
     * var users = [
     *   { 'user': 'fred',   'age': 48 },
     *   { 'user': 'barney', 'age': 36 },
     *   { 'user': 'fred',   'age': 30 },
     *   { 'user': 'barney', 'age': 34 }
     * ];
     *
     * _.sortBy(users, [function(o) { return o.user; }]);
     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
     *
     * _.sortBy(users, ['user', 'age']);
     * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
     */
    var sortBy = baseRest(function(collection, iteratees) {
      if (collection == null) {
        return [];
      }
      var length = iteratees.length;
      if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
        iteratees = [];
      } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
        iteratees = [iteratees[0]];
      }
      return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
    });

    /*------------------------------------------------------------------------*/

    /**
     * Gets the timestamp of the number of milliseconds that have elapsed since
     * the Unix epoch (1 January 1970 00:00:00 UTC).
     *
     * @static
     * @memberOf _
     * @since 2.4.0
     * @category Date
     * @returns {number} Returns the timestamp.
     * @example
     *
     * _.defer(function(stamp) {
     *   console.log(_.now() - stamp);
     * }, _.now());
     * // => Logs the number of milliseconds it took for the deferred invocation.
     */
    var now = ctxNow || function() {
      return root.Date.now();
    };

    /*------------------------------------------------------------------------*/

    /**
     * The opposite of `_.before`; this method creates a function that invokes
     * `func` once it's called `n` or more times.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Function
     * @param {number} n The number of calls before `func` is invoked.
     * @param {Function} func The function to restrict.
     * @returns {Function} Returns the new restricted function.
     * @example
     *
     * var saves = ['profile', 'settings'];
     *
     * var done = _.after(saves.length, function() {
     *   console.log('done saving!');
     * });
     *
     * _.forEach(saves, function(type) {
     *   asyncSave({ 'type': type, 'complete': done });
     * });
     * // => Logs 'done saving!' after the two async saves have completed.
     */
    function after(n, func) {
      if (typeof func != 'function') {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      n = toInteger(n);
      return function() {
        if (--n < 1) {
          return func.apply(this, arguments);
        }
      };
    }

    /**
     * Creates a function that invokes `func`, with up to `n` arguments,
     * ignoring any additional arguments.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Function
     * @param {Function} func The function to cap arguments for.
     * @param {number} [n=func.length] The arity cap.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {Function} Returns the new capped function.
     * @example
     *
     * _.map(['6', '8', '10'], _.ary(parseInt, 1));
     * // => [6, 8, 10]
     */
    function ary(func, n, guard) {
      n = guard ? undefined : n;
      n = (func && n == null) ? func.length : n;
      return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
    }

    /**
     * Creates a function that invokes `func`, with the `this` binding and arguments
     * of the created function, while it's called less than `n` times. Subsequent
     * calls to the created function return the result of the last `func` invocation.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Function
     * @param {number} n The number of calls at which `func` is no longer invoked.
     * @param {Function} func The function to restrict.
     * @returns {Function} Returns the new restricted function.
     * @example
     *
     * jQuery(element).on('click', _.before(5, addContactToList));
     * // => Allows adding up to 4 contacts to the list.
     */
    function before(n, func) {
      var result;
      if (typeof func != 'function') {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      n = toInteger(n);
      return function() {
        if (--n > 0) {
          result = func.apply(this, arguments);
        }
        if (n <= 1) {
          func = undefined;
        }
        return result;
      };
    }

    /**
     * Creates a function that invokes `func` with the `this` binding of `thisArg`
     * and `partials` prepended to the arguments it receives.
     *
     * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
     * may be used as a placeholder for partially applied arguments.
     *
     * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
     * property of bound functions.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Function
     * @param {Function} func The function to bind.
     * @param {*} thisArg The `this` binding of `func`.
     * @param {...*} [partials] The arguments to be partially applied.
     * @returns {Function} Returns the new bound function.
     * @example
     *
     * function greet(greeting, punctuation) {
     *   return greeting + ' ' + this.user + punctuation;
     * }
     *
     * var object = { 'user': 'fred' };
     *
     * var bound = _.bind(greet, object, 'hi');
     * bound('!');
     * // => 'hi fred!'
     *
     * // Bound with placeholders.
     * var bound = _.bind(greet, object, _, '!');
     * bound('hi');
     * // => 'hi fred!'
     */
    var bind = baseRest(function(func, thisArg, partials) {
      var bitmask = WRAP_BIND_FLAG;
      if (partials.length) {
        var holders = replaceHolders(partials, getHolder(bind));
        bitmask |= WRAP_PARTIAL_FLAG;
      }
      return createWrap(func, bitmask, thisArg, partials, holders);
    });

    /**
     * Creates a function that invokes the method at `object[key]` with `partials`
     * prepended to the arguments it receives.
     *
     * This method differs from `_.bind` by allowing bound functions to reference
     * methods that may be redefined or don't yet exist. See
     * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
     * for more details.
     *
     * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
     * builds, may be used as a placeholder for partially applied arguments.
     *
     * @static
     * @memberOf _
     * @since 0.10.0
     * @category Function
     * @param {Object} object The object to invoke the method on.
     * @param {string} key The key of the method.
     * @param {...*} [partials] The arguments to be partially applied.
     * @returns {Function} Returns the new bound function.
     * @example
     *
     * var object = {
     *   'user': 'fred',
     *   'greet': function(greeting, punctuation) {
     *     return greeting + ' ' + this.user + punctuation;
     *   }
     * };
     *
     * var bound = _.bindKey(object, 'greet', 'hi');
     * bound('!');
     * // => 'hi fred!'
     *
     * object.greet = function(greeting, punctuation) {
     *   return greeting + 'ya ' + this.user + punctuation;
     * };
     *
     * bound('!');
     * // => 'hiya fred!'
     *
     * // Bound with placeholders.
     * var bound = _.bindKey(object, 'greet', _, '!');
     * bound('hi');
     * // => 'hiya fred!'
     */
    var bindKey = baseRest(function(object, key, partials) {
      var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
      if (partials.length) {
        var holders = replaceHolders(partials, getHolder(bindKey));
        bitmask |= WRAP_PARTIAL_FLAG;
      }
      return createWrap(key, bitmask, object, partials, holders);
    });

    /**
     * Creates a function that accepts arguments of `func` and either invokes
     * `func` returning its result, if at least `arity` number of arguments have
     * been provided, or returns a function that accepts the remaining `func`
     * arguments, and so on. The arity of `func` may be specified if `func.length`
     * is not sufficient.
     *
     * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
     * may be used as a placeholder for provided arguments.
     *
     * **Note:** This method doesn't set the "length" property of curried functions.
     *
     * @static
     * @memberOf _
     * @since 2.0.0
     * @category Function
     * @param {Function} func The function to curry.
     * @param {number} [arity=func.length] The arity of `func`.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {Function} Returns the new curried function.
     * @example
     *
     * var abc = function(a, b, c) {
     *   return [a, b, c];
     * };
     *
     * var curried = _.curry(abc);
     *
     * curried(1)(2)(3);
     * // => [1, 2, 3]
     *
     * curried(1, 2)(3);
     * // => [1, 2, 3]
     *
     * curried(1, 2, 3);
     * // => [1, 2, 3]
     *
     * // Curried with placeholders.
     * curried(1)(_, 3)(2);
     * // => [1, 2, 3]
     */
    function curry(func, arity, guard) {
      arity = guard ? undefined : arity;
      var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
      result.placeholder = curry.placeholder;
      return result;
    }

    /**
     * This method is like `_.curry` except that arguments are applied to `func`
     * in the manner of `_.partialRight` instead of `_.partial`.
     *
     * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
     * builds, may be used as a placeholder for provided arguments.
     *
     * **Note:** This method doesn't set the "length" property of curried functions.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Function
     * @param {Function} func The function to curry.
     * @param {number} [arity=func.length] The arity of `func`.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {Function} Returns the new curried function.
     * @example
     *
     * var abc = function(a, b, c) {
     *   return [a, b, c];
     * };
     *
     * var curried = _.curryRight(abc);
     *
     * curried(3)(2)(1);
     * // => [1, 2, 3]
     *
     * curried(2, 3)(1);
     * // => [1, 2, 3]
     *
     * curried(1, 2, 3);
     * // => [1, 2, 3]
     *
     * // Curried with placeholders.
     * curried(3)(1, _)(2);
     * // => [1, 2, 3]
     */
    function curryRight(func, arity, guard) {
      arity = guard ? undefined : arity;
      var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
      result.placeholder = curryRight.placeholder;
      return result;
    }

    /**
     * Creates a debounced function that delays invoking `func` until after `wait`
     * milliseconds have elapsed since the last time the debounced function was
     * invoked. The debounced function comes with a `cancel` method to cancel
     * delayed `func` invocations and a `flush` method to immediately invoke them.
     * Provide `options` to indicate whether `func` should be invoked on the
     * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
     * with the last arguments provided to the debounced function. Subsequent
     * calls to the debounced function return the result of the last `func`
     * invocation.
     *
     * **Note:** If `leading` and `trailing` options are `true`, `func` is
     * invoked on the trailing edge of the timeout only if the debounced function
     * is invoked more than once during the `wait` timeout.
     *
     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
     * until to the next tick, similar to `setTimeout` with a timeout of `0`.
     *
     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
     * for details over the differences between `_.debounce` and `_.throttle`.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Function
     * @param {Function} func The function to debounce.
     * @param {number} [wait=0] The number of milliseconds to delay.
     * @param {Object} [options={}] The options object.
     * @param {boolean} [options.leading=false]
     *  Specify invoking on the leading edge of the timeout.
     * @param {number} [options.maxWait]
     *  The maximum time `func` is allowed to be delayed before it's invoked.
     * @param {boolean} [options.trailing=true]
     *  Specify invoking on the trailing edge of the timeout.
     * @returns {Function} Returns the new debounced function.
     * @example
     *
     * // Avoid costly calculations while the window size is in flux.
     * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
     *
     * // Invoke `sendMail` when clicked, debouncing subsequent calls.
     * jQuery(element).on('click', _.debounce(sendMail, 300, {
     *   'leading': true,
     *   'trailing': false
     * }));
     *
     * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
     * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
     * var source = new EventSource('/stream');
     * jQuery(source).on('message', debounced);
     *
     * // Cancel the trailing debounced invocation.
     * jQuery(window).on('popstate', debounced.cancel);
     */
    function debounce(func, wait, options) {
      var lastArgs,
          lastThis,
          maxWait,
          result,
          timerId,
          lastCallTime,
          lastInvokeTime = 0,
          leading = false,
          maxing = false,
          trailing = true;

      if (typeof func != 'function') {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      wait = toNumber(wait) || 0;
      if (isObject(options)) {
        leading = !!options.leading;
        maxing = 'maxWait' in options;
        maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
        trailing = 'trailing' in options ? !!options.trailing : trailing;
      }

      function invokeFunc(time) {
        var args = lastArgs,
            thisArg = lastThis;

        lastArgs = lastThis = undefined;
        lastInvokeTime = time;
        result = func.apply(thisArg, args);
        return result;
      }

      function leadingEdge(time) {
        // Reset any `maxWait` timer.
        lastInvokeTime = time;
        // Start the timer for the trailing edge.
        timerId = setTimeout(timerExpired, wait);
        // Invoke the leading edge.
        return leading ? invokeFunc(time) : result;
      }

      function remainingWait(time) {
        var timeSinceLastCall = time - lastCallTime,
            timeSinceLastInvoke = time - lastInvokeTime,
            timeWaiting = wait - timeSinceLastCall;

        return maxing
          ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
          : timeWaiting;
      }

      function shouldInvoke(time) {
        var timeSinceLastCall = time - lastCallTime,
            timeSinceLastInvoke = time - lastInvokeTime;

        // Either this is the first call, activity has stopped and we're at the
        // trailing edge, the system time has gone backwards and we're treating
        // it as the trailing edge, or we've hit the `maxWait` limit.
        return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
          (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
      }

      function timerExpired() {
        var time = now();
        if (shouldInvoke(time)) {
          return trailingEdge(time);
        }
        // Restart the timer.
        timerId = setTimeout(timerExpired, remainingWait(time));
      }

      function trailingEdge(time) {
        timerId = undefined;

        // Only invoke if we have `lastArgs` which means `func` has been
        // debounced at least once.
        if (trailing && lastArgs) {
          return invokeFunc(time);
        }
        lastArgs = lastThis = undefined;
        return result;
      }

      function cancel() {
        if (timerId !== undefined) {
          clearTimeout(timerId);
        }
        lastInvokeTime = 0;
        lastArgs = lastCallTime = lastThis = timerId = undefined;
      }

      function flush() {
        return timerId === undefined ? result : trailingEdge(now());
      }

      function debounced() {
        var time = now(),
            isInvoking = shouldInvoke(time);

        lastArgs = arguments;
        lastThis = this;
        lastCallTime = time;

        if (isInvoking) {
          if (timerId === undefined) {
            return leadingEdge(lastCallTime);
          }
          if (maxing) {
            // Handle invocations in a tight loop.
            clearTimeout(timerId);
            timerId = setTimeout(timerExpired, wait);
            return invokeFunc(lastCallTime);
          }
        }
        if (timerId === undefined) {
          timerId = setTimeout(timerExpired, wait);
        }
        return result;
      }
      debounced.cancel = cancel;
      debounced.flush = flush;
      return debounced;
    }

    /**
     * Defers invoking the `func` until the current call stack has cleared. Any
     * additional arguments are provided to `func` when it's invoked.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Function
     * @param {Function} func The function to defer.
     * @param {...*} [args] The arguments to invoke `func` with.
     * @returns {number} Returns the timer id.
     * @example
     *
     * _.defer(function(text) {
     *   console.log(text);
     * }, 'deferred');
     * // => Logs 'deferred' after one millisecond.
     */
    var defer = baseRest(function(func, args) {
      return baseDelay(func, 1, args);
    });

    /**
     * Invokes `func` after `wait` milliseconds. Any additional arguments are
     * provided to `func` when it's invoked.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Function
     * @param {Function} func The function to delay.
     * @param {number} wait The number of milliseconds to delay invocation.
     * @param {...*} [args] The arguments to invoke `func` with.
     * @returns {number} Returns the timer id.
     * @example
     *
     * _.delay(function(text) {
     *   console.log(text);
     * }, 1000, 'later');
     * // => Logs 'later' after one second.
     */
    var delay = baseRest(function(func, wait, args) {
      return baseDelay(func, toNumber(wait) || 0, args);
    });

    /**
     * Creates a function that invokes `func` with arguments reversed.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Function
     * @param {Function} func The function to flip arguments for.
     * @returns {Function} Returns the new flipped function.
     * @example
     *
     * var flipped = _.flip(function() {
     *   return _.toArray(arguments);
     * });
     *
     * flipped('a', 'b', 'c', 'd');
     * // => ['d', 'c', 'b', 'a']
     */
    function flip(func) {
      return createWrap(func, WRAP_FLIP_FLAG);
    }

    /**
     * Creates a function that memoizes the result of `func`. If `resolver` is
     * provided, it determines the cache key for storing the result based on the
     * arguments provided to the memoized function. By default, the first argument
     * provided to the memoized function is used as the map cache key. The `func`
     * is invoked with the `this` binding of the memoized function.
     *
     * **Note:** The cache is exposed as the `cache` property on the memoized
     * function. Its creation may be customized by replacing the `_.memoize.Cache`
     * constructor with one whose instances implement the
     * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
     * method interface of `clear`, `delete`, `get`, `has`, and `set`.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Function
     * @param {Function} func The function to have its output memoized.
     * @param {Function} [resolver] The function to resolve the cache key.
     * @returns {Function} Returns the new memoized function.
     * @example
     *
     * var object = { 'a': 1, 'b': 2 };
     * var other = { 'c': 3, 'd': 4 };
     *
     * var values = _.memoize(_.values);
     * values(object);
     * // => [1, 2]
     *
     * values(other);
     * // => [3, 4]
     *
     * object.a = 2;
     * values(object);
     * // => [1, 2]
     *
     * // Modify the result cache.
     * values.cache.set(object, ['a', 'b']);
     * values(object);
     * // => ['a', 'b']
     *
     * // Replace `_.memoize.Cache`.
     * _.memoize.Cache = WeakMap;
     */
    function memoize(func, resolver) {
      if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      var memoized = function() {
        var args = arguments,
            key = resolver ? resolver.apply(this, args) : args[0],
            cache = memoized.cache;

        if (cache.has(key)) {
          return cache.get(key);
        }
        var result = func.apply(this, args);
        memoized.cache = cache.set(key, result) || cache;
        return result;
      };
      memoized.cache = new (memoize.Cache || MapCache);
      return memoized;
    }

    // Expose `MapCache`.
    memoize.Cache = MapCache;

    /**
     * Creates a function that negates the result of the predicate `func`. The
     * `func` predicate is invoked with the `this` binding and arguments of the
     * created function.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Function
     * @param {Function} predicate The predicate to negate.
     * @returns {Function} Returns the new negated function.
     * @example
     *
     * function isEven(n) {
     *   return n % 2 == 0;
     * }
     *
     * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
     * // => [1, 3, 5]
     */
    function negate(predicate) {
      if (typeof predicate != 'function') {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      return function() {
        var args = arguments;
        switch (args.length) {
          case 0: return !predicate.call(this);
          case 1: return !predicate.call(this, args[0]);
          case 2: return !predicate.call(this, args[0], args[1]);
          case 3: return !predicate.call(this, args[0], args[1], args[2]);
        }
        return !predicate.apply(this, args);
      };
    }

    /**
     * Creates a function that is restricted to invoking `func` once. Repeat calls
     * to the function return the value of the first invocation. The `func` is
     * invoked with the `this` binding and arguments of the created function.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Function
     * @param {Function} func The function to restrict.
     * @returns {Function} Returns the new restricted function.
     * @example
     *
     * var initialize = _.once(createApplication);
     * initialize();
     * initialize();
     * // => `createApplication` is invoked once
     */
    function once(func) {
      return before(2, func);
    }

    /**
     * Creates a function that invokes `func` with its arguments transformed.
     *
     * @static
     * @since 4.0.0
     * @memberOf _
     * @category Function
     * @param {Function} func The function to wrap.
     * @param {...(Function|Function[])} [transforms=[_.identity]]
     *  The argument transforms.
     * @returns {Function} Returns the new function.
     * @example
     *
     * function doubled(n) {
     *   return n * 2;
     * }
     *
     * function square(n) {
     *   return n * n;
     * }
     *
     * var func = _.overArgs(function(x, y) {
     *   return [x, y];
     * }, [square, doubled]);
     *
     * func(9, 3);
     * // => [81, 6]
     *
     * func(10, 5);
     * // => [100, 10]
     */
    var overArgs = castRest(function(func, transforms) {
      transforms = (transforms.length == 1 && isArray(transforms[0]))
        ? arrayMap(transforms[0], baseUnary(getIteratee()))
        : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));

      var funcsLength = transforms.length;
      return baseRest(function(args) {
        var index = -1,
            length = nativeMin(args.length, funcsLength);

        while (++index < length) {
          args[index] = transforms[index].call(this, args[index]);
        }
        return apply(func, this, args);
      });
    });

    /**
     * Creates a function that invokes `func` with `partials` prepended to the
     * arguments it receives. This method is like `_.bind` except it does **not**
     * alter the `this` binding.
     *
     * The `_.partial.placeholder` value, which defaults to `_` in monolithic
     * builds, may be used as a placeholder for partially applied arguments.
     *
     * **Note:** This method doesn't set the "length" property of partially
     * applied functions.
     *
     * @static
     * @memberOf _
     * @since 0.2.0
     * @category Function
     * @param {Function} func The function to partially apply arguments to.
     * @param {...*} [partials] The arguments to be partially applied.
     * @returns {Function} Returns the new partially applied function.
     * @example
     *
     * function greet(greeting, name) {
     *   return greeting + ' ' + name;
     * }
     *
     * var sayHelloTo = _.partial(greet, 'hello');
     * sayHelloTo('fred');
     * // => 'hello fred'
     *
     * // Partially applied with placeholders.
     * var greetFred = _.partial(greet, _, 'fred');
     * greetFred('hi');
     * // => 'hi fred'
     */
    var partial = baseRest(function(func, partials) {
      var holders = replaceHolders(partials, getHolder(partial));
      return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
    });

    /**
     * This method is like `_.partial` except that partially applied arguments
     * are appended to the arguments it receives.
     *
     * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
     * builds, may be used as a placeholder for partially applied arguments.
     *
     * **Note:** This method doesn't set the "length" property of partially
     * applied functions.
     *
     * @static
     * @memberOf _
     * @since 1.0.0
     * @category Function
     * @param {Function} func The function to partially apply arguments to.
     * @param {...*} [partials] The arguments to be partially applied.
     * @returns {Function} Returns the new partially applied function.
     * @example
     *
     * function greet(greeting, name) {
     *   return greeting + ' ' + name;
     * }
     *
     * var greetFred = _.partialRight(greet, 'fred');
     * greetFred('hi');
     * // => 'hi fred'
     *
     * // Partially applied with placeholders.
     * var sayHelloTo = _.partialRight(greet, 'hello', _);
     * sayHelloTo('fred');
     * // => 'hello fred'
     */
    var partialRight = baseRest(function(func, partials) {
      var holders = replaceHolders(partials, getHolder(partialRight));
      return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
    });

    /**
     * Creates a function that invokes `func` with arguments arranged according
     * to the specified `indexes` where the argument value at the first index is
     * provided as the first argument, the argument value at the second index is
     * provided as the second argument, and so on.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Function
     * @param {Function} func The function to rearrange arguments for.
     * @param {...(number|number[])} indexes The arranged argument indexes.
     * @returns {Function} Returns the new function.
     * @example
     *
     * var rearged = _.rearg(function(a, b, c) {
     *   return [a, b, c];
     * }, [2, 0, 1]);
     *
     * rearged('b', 'c', 'a')
     * // => ['a', 'b', 'c']
     */
    var rearg = flatRest(function(func, indexes) {
      return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
    });

    /**
     * Creates a function that invokes `func` with the `this` binding of the
     * created function and arguments from `start` and beyond provided as
     * an array.
     *
     * **Note:** This method is based on the
     * [rest parameter](https://mdn.io/rest_parameters).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Function
     * @param {Function} func The function to apply a rest parameter to.
     * @param {number} [start=func.length-1] The start position of the rest parameter.
     * @returns {Function} Returns the new function.
     * @example
     *
     * var say = _.rest(function(what, names) {
     *   return what + ' ' + _.initial(names).join(', ') +
     *     (_.size(names) > 1 ? ', & ' : '') + _.last(names);
     * });
     *
     * say('hello', 'fred', 'barney', 'pebbles');
     * // => 'hello fred, barney, & pebbles'
     */
    function rest(func, start) {
      if (typeof func != 'function') {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      start = start === undefined ? start : toInteger(start);
      return baseRest(func, start);
    }

    /**
     * Creates a function that invokes `func` with the `this` binding of the
     * create function and an array of arguments much like
     * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
     *
     * **Note:** This method is based on the
     * [spread operator](https://mdn.io/spread_operator).
     *
     * @static
     * @memberOf _
     * @since 3.2.0
     * @category Function
     * @param {Function} func The function to spread arguments over.
     * @param {number} [start=0] The start position of the spread.
     * @returns {Function} Returns the new function.
     * @example
     *
     * var say = _.spread(function(who, what) {
     *   return who + ' says ' + what;
     * });
     *
     * say(['fred', 'hello']);
     * // => 'fred says hello'
     *
     * var numbers = Promise.all([
     *   Promise.resolve(40),
     *   Promise.resolve(36)
     * ]);
     *
     * numbers.then(_.spread(function(x, y) {
     *   return x + y;
     * }));
     * // => a Promise of 76
     */
    function spread(func, start) {
      if (typeof func != 'function') {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      start = start == null ? 0 : nativeMax(toInteger(start), 0);
      return baseRest(function(args) {
        var array = args[start],
            otherArgs = castSlice(args, 0, start);

        if (array) {
          arrayPush(otherArgs, array);
        }
        return apply(func, this, otherArgs);
      });
    }

    /**
     * Creates a throttled function that only invokes `func` at most once per
     * every `wait` milliseconds. The throttled function comes with a `cancel`
     * method to cancel delayed `func` invocations and a `flush` method to
     * immediately invoke them. Provide `options` to indicate whether `func`
     * should be invoked on the leading and/or trailing edge of the `wait`
     * timeout. The `func` is invoked with the last arguments provided to the
     * throttled function. Subsequent calls to the throttled function return the
     * result of the last `func` invocation.
     *
     * **Note:** If `leading` and `trailing` options are `true`, `func` is
     * invoked on the trailing edge of the timeout only if the throttled function
     * is invoked more than once during the `wait` timeout.
     *
     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
     * until to the next tick, similar to `setTimeout` with a timeout of `0`.
     *
     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
     * for details over the differences between `_.throttle` and `_.debounce`.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Function
     * @param {Function} func The function to throttle.
     * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
     * @param {Object} [options={}] The options object.
     * @param {boolean} [options.leading=true]
     *  Specify invoking on the leading edge of the timeout.
     * @param {boolean} [options.trailing=true]
     *  Specify invoking on the trailing edge of the timeout.
     * @returns {Function} Returns the new throttled function.
     * @example
     *
     * // Avoid excessively updating the position while scrolling.
     * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
     *
     * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
     * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
     * jQuery(element).on('click', throttled);
     *
     * // Cancel the trailing throttled invocation.
     * jQuery(window).on('popstate', throttled.cancel);
     */
    function throttle(func, wait, options) {
      var leading = true,
          trailing = true;

      if (typeof func != 'function') {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      if (isObject(options)) {
        leading = 'leading' in options ? !!options.leading : leading;
        trailing = 'trailing' in options ? !!options.trailing : trailing;
      }
      return debounce(func, wait, {
        'leading': leading,
        'maxWait': wait,
        'trailing': trailing
      });
    }

    /**
     * Creates a function that accepts up to one argument, ignoring any
     * additional arguments.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Function
     * @param {Function} func The function to cap arguments for.
     * @returns {Function} Returns the new capped function.
     * @example
     *
     * _.map(['6', '8', '10'], _.unary(parseInt));
     * // => [6, 8, 10]
     */
    function unary(func) {
      return ary(func, 1);
    }

    /**
     * Creates a function that provides `value` to `wrapper` as its first
     * argument. Any additional arguments provided to the function are appended
     * to those provided to the `wrapper`. The wrapper is invoked with the `this`
     * binding of the created function.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Function
     * @param {*} value The value to wrap.
     * @param {Function} [wrapper=identity] The wrapper function.
     * @returns {Function} Returns the new function.
     * @example
     *
     * var p = _.wrap(_.escape, function(func, text) {
     *   return '<p>' + func(text) + '</p>';
     * });
     *
     * p('fred, barney, & pebbles');
     * // => '<p>fred, barney, &amp; pebbles</p>'
     */
    function wrap(value, wrapper) {
      return partial(castFunction(wrapper), value);
    }

    /*------------------------------------------------------------------------*/

    /**
     * Casts `value` as an array if it's not one.
     *
     * @static
     * @memberOf _
     * @since 4.4.0
     * @category Lang
     * @param {*} value The value to inspect.
     * @returns {Array} Returns the cast array.
     * @example
     *
     * _.castArray(1);
     * // => [1]
     *
     * _.castArray({ 'a': 1 });
     * // => [{ 'a': 1 }]
     *
     * _.castArray('abc');
     * // => ['abc']
     *
     * _.castArray(null);
     * // => [null]
     *
     * _.castArray(undefined);
     * // => [undefined]
     *
     * _.castArray();
     * // => []
     *
     * var array = [1, 2, 3];
     * console.log(_.castArray(array) === array);
     * // => true
     */
    function castArray() {
      if (!arguments.length) {
        return [];
      }
      var value = arguments[0];
      return isArray(value) ? value : [value];
    }

    /**
     * Creates a shallow clone of `value`.
     *
     * **Note:** This method is loosely based on the
     * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
     * and supports cloning arrays, array buffers, booleans, date objects, maps,
     * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
     * arrays. The own enumerable properties of `arguments` objects are cloned
     * as plain objects. An empty object is returned for uncloneable values such
     * as error objects, functions, DOM nodes, and WeakMaps.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to clone.
     * @returns {*} Returns the cloned value.
     * @see _.cloneDeep
     * @example
     *
     * var objects = [{ 'a': 1 }, { 'b': 2 }];
     *
     * var shallow = _.clone(objects);
     * console.log(shallow[0] === objects[0]);
     * // => true
     */
    function clone(value) {
      return baseClone(value, CLONE_SYMBOLS_FLAG);
    }

    /**
     * This method is like `_.clone` except that it accepts `customizer` which
     * is invoked to produce the cloned value. If `customizer` returns `undefined`,
     * cloning is handled by the method instead. The `customizer` is invoked with
     * up to four arguments; (value [, index|key, object, stack]).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to clone.
     * @param {Function} [customizer] The function to customize cloning.
     * @returns {*} Returns the cloned value.
     * @see _.cloneDeepWith
     * @example
     *
     * function customizer(value) {
     *   if (_.isElement(value)) {
     *     return value.cloneNode(false);
     *   }
     * }
     *
     * var el = _.cloneWith(document.body, customizer);
     *
     * console.log(el === document.body);
     * // => false
     * console.log(el.nodeName);
     * // => 'BODY'
     * console.log(el.childNodes.length);
     * // => 0
     */
    function cloneWith(value, customizer) {
      customizer = typeof customizer == 'function' ? customizer : undefined;
      return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
    }

    /**
     * This method is like `_.clone` except that it recursively clones `value`.
     *
     * @static
     * @memberOf _
     * @since 1.0.0
     * @category Lang
     * @param {*} value The value to recursively clone.
     * @returns {*} Returns the deep cloned value.
     * @see _.clone
     * @example
     *
     * var objects = [{ 'a': 1 }, { 'b': 2 }];
     *
     * var deep = _.cloneDeep(objects);
     * console.log(deep[0] === objects[0]);
     * // => false
     */
    function cloneDeep(value) {
      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
    }

    /**
     * This method is like `_.cloneWith` except that it recursively clones `value`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to recursively clone.
     * @param {Function} [customizer] The function to customize cloning.
     * @returns {*} Returns the deep cloned value.
     * @see _.cloneWith
     * @example
     *
     * function customizer(value) {
     *   if (_.isElement(value)) {
     *     return value.cloneNode(true);
     *   }
     * }
     *
     * var el = _.cloneDeepWith(document.body, customizer);
     *
     * console.log(el === document.body);
     * // => false
     * console.log(el.nodeName);
     * // => 'BODY'
     * console.log(el.childNodes.length);
     * // => 20
     */
    function cloneDeepWith(value, customizer) {
      customizer = typeof customizer == 'function' ? customizer : undefined;
      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
    }

    /**
     * Checks if `object` conforms to `source` by invoking the predicate
     * properties of `source` with the corresponding property values of `object`.
     *
     * **Note:** This method is equivalent to `_.conforms` when `source` is
     * partially applied.
     *
     * @static
     * @memberOf _
     * @since 4.14.0
     * @category Lang
     * @param {Object} object The object to inspect.
     * @param {Object} source The object of property predicates to conform to.
     * @returns {boolean} Returns `true` if `object` conforms, else `false`.
     * @example
     *
     * var object = { 'a': 1, 'b': 2 };
     *
     * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
     * // => true
     *
     * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
     * // => false
     */
    function conformsTo(object, source) {
      return source == null || baseConformsTo(object, source, keys(source));
    }

    /**
     * Performs a
     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
     * comparison between two values to determine if they are equivalent.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to compare.
     * @param {*} other The other value to compare.
     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
     * @example
     *
     * var object = { 'a': 1 };
     * var other = { 'a': 1 };
     *
     * _.eq(object, object);
     * // => true
     *
     * _.eq(object, other);
     * // => false
     *
     * _.eq('a', 'a');
     * // => true
     *
     * _.eq('a', Object('a'));
     * // => false
     *
     * _.eq(NaN, NaN);
     * // => true
     */
    function eq(value, other) {
      return value === other || (value !== value && other !== other);
    }

    /**
     * Checks if `value` is greater than `other`.
     *
     * @static
     * @memberOf _
     * @since 3.9.0
     * @category Lang
     * @param {*} value The value to compare.
     * @param {*} other The other value to compare.
     * @returns {boolean} Returns `true` if `value` is greater than `other`,
     *  else `false`.
     * @see _.lt
     * @example
     *
     * _.gt(3, 1);
     * // => true
     *
     * _.gt(3, 3);
     * // => false
     *
     * _.gt(1, 3);
     * // => false
     */
    var gt = createRelationalOperation(baseGt);

    /**
     * Checks if `value` is greater than or equal to `other`.
     *
     * @static
     * @memberOf _
     * @since 3.9.0
     * @category Lang
     * @param {*} value The value to compare.
     * @param {*} other The other value to compare.
     * @returns {boolean} Returns `true` if `value` is greater than or equal to
     *  `other`, else `false`.
     * @see _.lte
     * @example
     *
     * _.gte(3, 1);
     * // => true
     *
     * _.gte(3, 3);
     * // => true
     *
     * _.gte(1, 3);
     * // => false
     */
    var gte = createRelationalOperation(function(value, other) {
      return value >= other;
    });

    /**
     * Checks if `value` is likely an `arguments` object.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is an `arguments` object,
     *  else `false`.
     * @example
     *
     * _.isArguments(function() { return arguments; }());
     * // => true
     *
     * _.isArguments([1, 2, 3]);
     * // => false
     */
    var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
      return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
        !propertyIsEnumerable.call(value, 'callee');
    };

    /**
     * Checks if `value` is classified as an `Array` object.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is an array, else `false`.
     * @example
     *
     * _.isArray([1, 2, 3]);
     * // => true
     *
     * _.isArray(document.body.children);
     * // => false
     *
     * _.isArray('abc');
     * // => false
     *
     * _.isArray(_.noop);
     * // => false
     */
    var isArray = Array.isArray;

    /**
     * Checks if `value` is classified as an `ArrayBuffer` object.
     *
     * @static
     * @memberOf _
     * @since 4.3.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
     * @example
     *
     * _.isArrayBuffer(new ArrayBuffer(2));
     * // => true
     *
     * _.isArrayBuffer(new Array(2));
     * // => false
     */
    var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;

    /**
     * Checks if `value` is array-like. A value is considered array-like if it's
     * not a function and has a `value.length` that's an integer greater than or
     * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
     * @example
     *
     * _.isArrayLike([1, 2, 3]);
     * // => true
     *
     * _.isArrayLike(document.body.children);
     * // => true
     *
     * _.isArrayLike('abc');
     * // => true
     *
     * _.isArrayLike(_.noop);
     * // => false
     */
    function isArrayLike(value) {
      return value != null && isLength(value.length) && !isFunction(value);
    }

    /**
     * This method is like `_.isArrayLike` except that it also checks if `value`
     * is an object.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is an array-like object,
     *  else `false`.
     * @example
     *
     * _.isArrayLikeObject([1, 2, 3]);
     * // => true
     *
     * _.isArrayLikeObject(document.body.children);
     * // => true
     *
     * _.isArrayLikeObject('abc');
     * // => false
     *
     * _.isArrayLikeObject(_.noop);
     * // => false
     */
    function isArrayLikeObject(value) {
      return isObjectLike(value) && isArrayLike(value);
    }

    /**
     * Checks if `value` is classified as a boolean primitive or object.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
     * @example
     *
     * _.isBoolean(false);
     * // => true
     *
     * _.isBoolean(null);
     * // => false
     */
    function isBoolean(value) {
      return value === true || value === false ||
        (isObjectLike(value) && baseGetTag(value) == boolTag);
    }

    /**
     * Checks if `value` is a buffer.
     *
     * @static
     * @memberOf _
     * @since 4.3.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
     * @example
     *
     * _.isBuffer(new Buffer(2));
     * // => true
     *
     * _.isBuffer(new Uint8Array(2));
     * // => false
     */
    var isBuffer = nativeIsBuffer || stubFalse;

    /**
     * Checks if `value` is classified as a `Date` object.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
     * @example
     *
     * _.isDate(new Date);
     * // => true
     *
     * _.isDate('Mon April 23 2012');
     * // => false
     */
    var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;

    /**
     * Checks if `value` is likely a DOM element.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
     * @example
     *
     * _.isElement(document.body);
     * // => true
     *
     * _.isElement('<body>');
     * // => false
     */
    function isElement(value) {
      return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
    }

    /**
     * Checks if `value` is an empty object, collection, map, or set.
     *
     * Objects are considered empty if they have no own enumerable string keyed
     * properties.
     *
     * Array-like values such as `arguments` objects, arrays, buffers, strings, or
     * jQuery-like collections are considered empty if they have a `length` of `0`.
     * Similarly, maps and sets are considered empty if they have a `size` of `0`.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is empty, else `false`.
     * @example
     *
     * _.isEmpty(null);
     * // => true
     *
     * _.isEmpty(true);
     * // => true
     *
     * _.isEmpty(1);
     * // => true
     *
     * _.isEmpty([1, 2, 3]);
     * // => false
     *
     * _.isEmpty({ 'a': 1 });
     * // => false
     */
    function isEmpty(value) {
      if (value == null) {
        return true;
      }
      if (isArrayLike(value) &&
          (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
            isBuffer(value) || isTypedArray(value) || isArguments(value))) {
        return !value.length;
      }
      var tag = getTag(value);
      if (tag == mapTag || tag == setTag) {
        return !value.size;
      }
      if (isPrototype(value)) {
        return !baseKeys(value).length;
      }
      for (var key in value) {
        if (hasOwnProperty.call(value, key)) {
          return false;
        }
      }
      return true;
    }

    /**
     * Performs a deep comparison between two values to determine if they are
     * equivalent.
     *
     * **Note:** This method supports comparing arrays, array buffers, booleans,
     * date objects, error objects, maps, numbers, `Object` objects, regexes,
     * sets, strings, symbols, and typed arrays. `Object` objects are compared
     * by their own, not inherited, enumerable properties. Functions and DOM
     * nodes are compared by strict equality, i.e. `===`.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to compare.
     * @param {*} other The other value to compare.
     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
     * @example
     *
     * var object = { 'a': 1 };
     * var other = { 'a': 1 };
     *
     * _.isEqual(object, other);
     * // => true
     *
     * object === other;
     * // => false
     */
    function isEqual(value, other) {
      return baseIsEqual(value, other);
    }

    /**
     * This method is like `_.isEqual` except that it accepts `customizer` which
     * is invoked to compare values. If `customizer` returns `undefined`, comparisons
     * are handled by the method instead. The `customizer` is invoked with up to
     * six arguments: (objValue, othValue [, index|key, object, other, stack]).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to compare.
     * @param {*} other The other value to compare.
     * @param {Function} [customizer] The function to customize comparisons.
     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
     * @example
     *
     * function isGreeting(value) {
     *   return /^h(?:i|ello)$/.test(value);
     * }
     *
     * function customizer(objValue, othValue) {
     *   if (isGreeting(objValue) && isGreeting(othValue)) {
     *     return true;
     *   }
     * }
     *
     * var array = ['hello', 'goodbye'];
     * var other = ['hi', 'goodbye'];
     *
     * _.isEqualWith(array, other, customizer);
     * // => true
     */
    function isEqualWith(value, other, customizer) {
      customizer = typeof customizer == 'function' ? customizer : undefined;
      var result = customizer ? customizer(value, other) : undefined;
      return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
    }

    /**
     * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
     * `SyntaxError`, `TypeError`, or `URIError` object.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
     * @example
     *
     * _.isError(new Error);
     * // => true
     *
     * _.isError(Error);
     * // => false
     */
    function isError(value) {
      if (!isObjectLike(value)) {
        return false;
      }
      var tag = baseGetTag(value);
      return tag == errorTag || tag == domExcTag ||
        (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
    }

    /**
     * Checks if `value` is a finite primitive number.
     *
     * **Note:** This method is based on
     * [`Number.isFinite`](https://mdn.io/Number/isFinite).
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
     * @example
     *
     * _.isFinite(3);
     * // => true
     *
     * _.isFinite(Number.MIN_VALUE);
     * // => true
     *
     * _.isFinite(Infinity);
     * // => false
     *
     * _.isFinite('3');
     * // => false
     */
    function isFinite(value) {
      return typeof value == 'number' && nativeIsFinite(value);
    }

    /**
     * Checks if `value` is classified as a `Function` object.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a function, else `false`.
     * @example
     *
     * _.isFunction(_);
     * // => true
     *
     * _.isFunction(/abc/);
     * // => false
     */
    function isFunction(value) {
      if (!isObject(value)) {
        return false;
      }
      // The use of `Object#toString` avoids issues with the `typeof` operator
      // in Safari 9 which returns 'object' for typed arrays and other constructors.
      var tag = baseGetTag(value);
      return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
    }

    /**
     * Checks if `value` is an integer.
     *
     * **Note:** This method is based on
     * [`Number.isInteger`](https://mdn.io/Number/isInteger).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
     * @example
     *
     * _.isInteger(3);
     * // => true
     *
     * _.isInteger(Number.MIN_VALUE);
     * // => false
     *
     * _.isInteger(Infinity);
     * // => false
     *
     * _.isInteger('3');
     * // => false
     */
    function isInteger(value) {
      return typeof value == 'number' && value == toInteger(value);
    }

    /**
     * Checks if `value` is a valid array-like length.
     *
     * **Note:** This method is loosely based on
     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
     * @example
     *
     * _.isLength(3);
     * // => true
     *
     * _.isLength(Number.MIN_VALUE);
     * // => false
     *
     * _.isLength(Infinity);
     * // => false
     *
     * _.isLength('3');
     * // => false
     */
    function isLength(value) {
      return typeof value == 'number' &&
        value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
    }

    /**
     * Checks if `value` is the
     * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
     * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is an object, else `false`.
     * @example
     *
     * _.isObject({});
     * // => true
     *
     * _.isObject([1, 2, 3]);
     * // => true
     *
     * _.isObject(_.noop);
     * // => true
     *
     * _.isObject(null);
     * // => false
     */
    function isObject(value) {
      var type = typeof value;
      return value != null && (type == 'object' || type == 'function');
    }

    /**
     * Checks if `value` is object-like. A value is object-like if it's not `null`
     * and has a `typeof` result of "object".
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
     * @example
     *
     * _.isObjectLike({});
     * // => true
     *
     * _.isObjectLike([1, 2, 3]);
     * // => true
     *
     * _.isObjectLike(_.noop);
     * // => false
     *
     * _.isObjectLike(null);
     * // => false
     */
    function isObjectLike(value) {
      return value != null && typeof value == 'object';
    }

    /**
     * Checks if `value` is classified as a `Map` object.
     *
     * @static
     * @memberOf _
     * @since 4.3.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a map, else `false`.
     * @example
     *
     * _.isMap(new Map);
     * // => true
     *
     * _.isMap(new WeakMap);
     * // => false
     */
    var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;

    /**
     * Performs a partial deep comparison between `object` and `source` to
     * determine if `object` contains equivalent property values.
     *
     * **Note:** This method is equivalent to `_.matches` when `source` is
     * partially applied.
     *
     * Partial comparisons will match empty array and empty object `source`
     * values against any array or object value, respectively. See `_.isEqual`
     * for a list of supported value comparisons.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Lang
     * @param {Object} object The object to inspect.
     * @param {Object} source The object of property values to match.
     * @returns {boolean} Returns `true` if `object` is a match, else `false`.
     * @example
     *
     * var object = { 'a': 1, 'b': 2 };
     *
     * _.isMatch(object, { 'b': 2 });
     * // => true
     *
     * _.isMatch(object, { 'b': 1 });
     * // => false
     */
    function isMatch(object, source) {
      return object === source || baseIsMatch(object, source, getMatchData(source));
    }

    /**
     * This method is like `_.isMatch` except that it accepts `customizer` which
     * is invoked to compare values. If `customizer` returns `undefined`, comparisons
     * are handled by the method instead. The `customizer` is invoked with five
     * arguments: (objValue, srcValue, index|key, object, source).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {Object} object The object to inspect.
     * @param {Object} source The object of property values to match.
     * @param {Function} [customizer] The function to customize comparisons.
     * @returns {boolean} Returns `true` if `object` is a match, else `false`.
     * @example
     *
     * function isGreeting(value) {
     *   return /^h(?:i|ello)$/.test(value);
     * }
     *
     * function customizer(objValue, srcValue) {
     *   if (isGreeting(objValue) && isGreeting(srcValue)) {
     *     return true;
     *   }
     * }
     *
     * var object = { 'greeting': 'hello' };
     * var source = { 'greeting': 'hi' };
     *
     * _.isMatchWith(object, source, customizer);
     * // => true
     */
    function isMatchWith(object, source, customizer) {
      customizer = typeof customizer == 'function' ? customizer : undefined;
      return baseIsMatch(object, source, getMatchData(source), customizer);
    }

    /**
     * Checks if `value` is `NaN`.
     *
     * **Note:** This method is based on
     * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
     * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
     * `undefined` and other non-number values.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
     * @example
     *
     * _.isNaN(NaN);
     * // => true
     *
     * _.isNaN(new Number(NaN));
     * // => true
     *
     * isNaN(undefined);
     * // => true
     *
     * _.isNaN(undefined);
     * // => false
     */
    function isNaN(value) {
      // An `NaN` primitive is the only value that is not equal to itself.
      // Perform the `toStringTag` check first to avoid errors with some
      // ActiveX objects in IE.
      return isNumber(value) && value != +value;
    }

    /**
     * Checks if `value` is a pristine native function.
     *
     * **Note:** This method can't reliably detect native functions in the presence
     * of the core-js package because core-js circumvents this kind of detection.
     * Despite multiple requests, the core-js maintainer has made it clear: any
     * attempt to fix the detection will be obstructed. As a result, we're left
     * with little choice but to throw an error. Unfortunately, this also affects
     * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
     * which rely on core-js.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a native function,
     *  else `false`.
     * @example
     *
     * _.isNative(Array.prototype.push);
     * // => true
     *
     * _.isNative(_);
     * // => false
     */
    function isNative(value) {
      if (isMaskable(value)) {
        throw new Error(CORE_ERROR_TEXT);
      }
      return baseIsNative(value);
    }

    /**
     * Checks if `value` is `null`.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
     * @example
     *
     * _.isNull(null);
     * // => true
     *
     * _.isNull(void 0);
     * // => false
     */
    function isNull(value) {
      return value === null;
    }

    /**
     * Checks if `value` is `null` or `undefined`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
     * @example
     *
     * _.isNil(null);
     * // => true
     *
     * _.isNil(void 0);
     * // => true
     *
     * _.isNil(NaN);
     * // => false
     */
    function isNil(value) {
      return value == null;
    }

    /**
     * Checks if `value` is classified as a `Number` primitive or object.
     *
     * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
     * classified as numbers, use the `_.isFinite` method.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a number, else `false`.
     * @example
     *
     * _.isNumber(3);
     * // => true
     *
     * _.isNumber(Number.MIN_VALUE);
     * // => true
     *
     * _.isNumber(Infinity);
     * // => true
     *
     * _.isNumber('3');
     * // => false
     */
    function isNumber(value) {
      return typeof value == 'number' ||
        (isObjectLike(value) && baseGetTag(value) == numberTag);
    }

    /**
     * Checks if `value` is a plain object, that is, an object created by the
     * `Object` constructor or one with a `[[Prototype]]` of `null`.
     *
     * @static
     * @memberOf _
     * @since 0.8.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     * }
     *
     * _.isPlainObject(new Foo);
     * // => false
     *
     * _.isPlainObject([1, 2, 3]);
     * // => false
     *
     * _.isPlainObject({ 'x': 0, 'y': 0 });
     * // => true
     *
     * _.isPlainObject(Object.create(null));
     * // => true
     */
    function isPlainObject(value) {
      if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
        return false;
      }
      var proto = getPrototype(value);
      if (proto === null) {
        return true;
      }
      var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
      return typeof Ctor == 'function' && Ctor instanceof Ctor &&
        funcToString.call(Ctor) == objectCtorString;
    }

    /**
     * Checks if `value` is classified as a `RegExp` object.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
     * @example
     *
     * _.isRegExp(/abc/);
     * // => true
     *
     * _.isRegExp('/abc/');
     * // => false
     */
    var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;

    /**
     * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
     * double precision number which isn't the result of a rounded unsafe integer.
     *
     * **Note:** This method is based on
     * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
     * @example
     *
     * _.isSafeInteger(3);
     * // => true
     *
     * _.isSafeInteger(Number.MIN_VALUE);
     * // => false
     *
     * _.isSafeInteger(Infinity);
     * // => false
     *
     * _.isSafeInteger('3');
     * // => false
     */
    function isSafeInteger(value) {
      return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
    }

    /**
     * Checks if `value` is classified as a `Set` object.
     *
     * @static
     * @memberOf _
     * @since 4.3.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a set, else `false`.
     * @example
     *
     * _.isSet(new Set);
     * // => true
     *
     * _.isSet(new WeakSet);
     * // => false
     */
    var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;

    /**
     * Checks if `value` is classified as a `String` primitive or object.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a string, else `false`.
     * @example
     *
     * _.isString('abc');
     * // => true
     *
     * _.isString(1);
     * // => false
     */
    function isString(value) {
      return typeof value == 'string' ||
        (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
    }

    /**
     * Checks if `value` is classified as a `Symbol` primitive or object.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
     * @example
     *
     * _.isSymbol(Symbol.iterator);
     * // => true
     *
     * _.isSymbol('abc');
     * // => false
     */
    function isSymbol(value) {
      return typeof value == 'symbol' ||
        (isObjectLike(value) && baseGetTag(value) == symbolTag);
    }

    /**
     * Checks if `value` is classified as a typed array.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
     * @example
     *
     * _.isTypedArray(new Uint8Array);
     * // => true
     *
     * _.isTypedArray([]);
     * // => false
     */
    var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;

    /**
     * Checks if `value` is `undefined`.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
     * @example
     *
     * _.isUndefined(void 0);
     * // => true
     *
     * _.isUndefined(null);
     * // => false
     */
    function isUndefined(value) {
      return value === undefined;
    }

    /**
     * Checks if `value` is classified as a `WeakMap` object.
     *
     * @static
     * @memberOf _
     * @since 4.3.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
     * @example
     *
     * _.isWeakMap(new WeakMap);
     * // => true
     *
     * _.isWeakMap(new Map);
     * // => false
     */
    function isWeakMap(value) {
      return isObjectLike(value) && getTag(value) == weakMapTag;
    }

    /**
     * Checks if `value` is classified as a `WeakSet` object.
     *
     * @static
     * @memberOf _
     * @since 4.3.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
     * @example
     *
     * _.isWeakSet(new WeakSet);
     * // => true
     *
     * _.isWeakSet(new Set);
     * // => false
     */
    function isWeakSet(value) {
      return isObjectLike(value) && baseGetTag(value) == weakSetTag;
    }

    /**
     * Checks if `value` is less than `other`.
     *
     * @static
     * @memberOf _
     * @since 3.9.0
     * @category Lang
     * @param {*} value The value to compare.
     * @param {*} other The other value to compare.
     * @returns {boolean} Returns `true` if `value` is less than `other`,
     *  else `false`.
     * @see _.gt
     * @example
     *
     * _.lt(1, 3);
     * // => true
     *
     * _.lt(3, 3);
     * // => false
     *
     * _.lt(3, 1);
     * // => false
     */
    var lt = createRelationalOperation(baseLt);

    /**
     * Checks if `value` is less than or equal to `other`.
     *
     * @static
     * @memberOf _
     * @since 3.9.0
     * @category Lang
     * @param {*} value The value to compare.
     * @param {*} other The other value to compare.
     * @returns {boolean} Returns `true` if `value` is less than or equal to
     *  `other`, else `false`.
     * @see _.gte
     * @example
     *
     * _.lte(1, 3);
     * // => true
     *
     * _.lte(3, 3);
     * // => true
     *
     * _.lte(3, 1);
     * // => false
     */
    var lte = createRelationalOperation(function(value, other) {
      return value <= other;
    });

    /**
     * Converts `value` to an array.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Lang
     * @param {*} value The value to convert.
     * @returns {Array} Returns the converted array.
     * @example
     *
     * _.toArray({ 'a': 1, 'b': 2 });
     * // => [1, 2]
     *
     * _.toArray('abc');
     * // => ['a', 'b', 'c']
     *
     * _.toArray(1);
     * // => []
     *
     * _.toArray(null);
     * // => []
     */
    function toArray(value) {
      if (!value) {
        return [];
      }
      if (isArrayLike(value)) {
        return isString(value) ? stringToArray(value) : copyArray(value);
      }
      if (symIterator && value[symIterator]) {
        return iteratorToArray(value[symIterator]());
      }
      var tag = getTag(value),
          func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);

      return func(value);
    }

    /**
     * Converts `value` to a finite number.
     *
     * @static
     * @memberOf _
     * @since 4.12.0
     * @category Lang
     * @param {*} value The value to convert.
     * @returns {number} Returns the converted number.
     * @example
     *
     * _.toFinite(3.2);
     * // => 3.2
     *
     * _.toFinite(Number.MIN_VALUE);
     * // => 5e-324
     *
     * _.toFinite(Infinity);
     * // => 1.7976931348623157e+308
     *
     * _.toFinite('3.2');
     * // => 3.2
     */
    function toFinite(value) {
      if (!value) {
        return value === 0 ? value : 0;
      }
      value = toNumber(value);
      if (value === INFINITY || value === -INFINITY) {
        var sign = (value < 0 ? -1 : 1);
        return sign * MAX_INTEGER;
      }
      return value === value ? value : 0;
    }

    /**
     * Converts `value` to an integer.
     *
     * **Note:** This method is loosely based on
     * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to convert.
     * @returns {number} Returns the converted integer.
     * @example
     *
     * _.toInteger(3.2);
     * // => 3
     *
     * _.toInteger(Number.MIN_VALUE);
     * // => 0
     *
     * _.toInteger(Infinity);
     * // => 1.7976931348623157e+308
     *
     * _.toInteger('3.2');
     * // => 3
     */
    function toInteger(value) {
      var result = toFinite(value),
          remainder = result % 1;

      return result === result ? (remainder ? result - remainder : result) : 0;
    }

    /**
     * Converts `value` to an integer suitable for use as the length of an
     * array-like object.
     *
     * **Note:** This method is based on
     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to convert.
     * @returns {number} Returns the converted integer.
     * @example
     *
     * _.toLength(3.2);
     * // => 3
     *
     * _.toLength(Number.MIN_VALUE);
     * // => 0
     *
     * _.toLength(Infinity);
     * // => 4294967295
     *
     * _.toLength('3.2');
     * // => 3
     */
    function toLength(value) {
      return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
    }

    /**
     * Converts `value` to a number.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to process.
     * @returns {number} Returns the number.
     * @example
     *
     * _.toNumber(3.2);
     * // => 3.2
     *
     * _.toNumber(Number.MIN_VALUE);
     * // => 5e-324
     *
     * _.toNumber(Infinity);
     * // => Infinity
     *
     * _.toNumber('3.2');
     * // => 3.2
     */
    function toNumber(value) {
      if (typeof value == 'number') {
        return value;
      }
      if (isSymbol(value)) {
        return NAN;
      }
      if (isObject(value)) {
        var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
        value = isObject(other) ? (other + '') : other;
      }
      if (typeof value != 'string') {
        return value === 0 ? value : +value;
      }
      value = baseTrim(value);
      var isBinary = reIsBinary.test(value);
      return (isBinary || reIsOctal.test(value))
        ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
        : (reIsBadHex.test(value) ? NAN : +value);
    }

    /**
     * Converts `value` to a plain object flattening inherited enumerable string
     * keyed properties of `value` to own properties of the plain object.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Lang
     * @param {*} value The value to convert.
     * @returns {Object} Returns the converted plain object.
     * @example
     *
     * function Foo() {
     *   this.b = 2;
     * }
     *
     * Foo.prototype.c = 3;
     *
     * _.assign({ 'a': 1 }, new Foo);
     * // => { 'a': 1, 'b': 2 }
     *
     * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
     * // => { 'a': 1, 'b': 2, 'c': 3 }
     */
    function toPlainObject(value) {
      return copyObject(value, keysIn(value));
    }

    /**
     * Converts `value` to a safe integer. A safe integer can be compared and
     * represented correctly.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to convert.
     * @returns {number} Returns the converted integer.
     * @example
     *
     * _.toSafeInteger(3.2);
     * // => 3
     *
     * _.toSafeInteger(Number.MIN_VALUE);
     * // => 0
     *
     * _.toSafeInteger(Infinity);
     * // => 9007199254740991
     *
     * _.toSafeInteger('3.2');
     * // => 3
     */
    function toSafeInteger(value) {
      return value
        ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
        : (value === 0 ? value : 0);
    }

    /**
     * Converts `value` to a string. An empty string is returned for `null`
     * and `undefined` values. The sign of `-0` is preserved.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to convert.
     * @returns {string} Returns the converted string.
     * @example
     *
     * _.toString(null);
     * // => ''
     *
     * _.toString(-0);
     * // => '-0'
     *
     * _.toString([1, 2, 3]);
     * // => '1,2,3'
     */
    function toString(value) {
      return value == null ? '' : baseToString(value);
    }

    /*------------------------------------------------------------------------*/

    /**
     * Assigns own enumerable string keyed properties of source objects to the
     * destination object. Source objects are applied from left to right.
     * Subsequent sources overwrite property assignments of previous sources.
     *
     * **Note:** This method mutates `object` and is loosely based on
     * [`Object.assign`](https://mdn.io/Object/assign).
     *
     * @static
     * @memberOf _
     * @since 0.10.0
     * @category Object
     * @param {Object} object The destination object.
     * @param {...Object} [sources] The source objects.
     * @returns {Object} Returns `object`.
     * @see _.assignIn
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     * }
     *
     * function Bar() {
     *   this.c = 3;
     * }
     *
     * Foo.prototype.b = 2;
     * Bar.prototype.d = 4;
     *
     * _.assign({ 'a': 0 }, new Foo, new Bar);
     * // => { 'a': 1, 'c': 3 }
     */
    var assign = createAssigner(function(object, source) {
      if (isPrototype(source) || isArrayLike(source)) {
        copyObject(source, keys(source), object);
        return;
      }
      for (var key in source) {
        if (hasOwnProperty.call(source, key)) {
          assignValue(object, key, source[key]);
        }
      }
    });

    /**
     * This method is like `_.assign` except that it iterates over own and
     * inherited source properties.
     *
     * **Note:** This method mutates `object`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @alias extend
     * @category Object
     * @param {Object} object The destination object.
     * @param {...Object} [sources] The source objects.
     * @returns {Object} Returns `object`.
     * @see _.assign
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     * }
     *
     * function Bar() {
     *   this.c = 3;
     * }
     *
     * Foo.prototype.b = 2;
     * Bar.prototype.d = 4;
     *
     * _.assignIn({ 'a': 0 }, new Foo, new Bar);
     * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
     */
    var assignIn = createAssigner(function(object, source) {
      copyObject(source, keysIn(source), object);
    });

    /**
     * This method is like `_.assignIn` except that it accepts `customizer`
     * which is invoked to produce the assigned values. If `customizer` returns
     * `undefined`, assignment is handled by the method instead. The `customizer`
     * is invoked with five arguments: (objValue, srcValue, key, object, source).
     *
     * **Note:** This method mutates `object`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @alias extendWith
     * @category Object
     * @param {Object} object The destination object.
     * @param {...Object} sources The source objects.
     * @param {Function} [customizer] The function to customize assigned values.
     * @returns {Object} Returns `object`.
     * @see _.assignWith
     * @example
     *
     * function customizer(objValue, srcValue) {
     *   return _.isUndefined(objValue) ? srcValue : objValue;
     * }
     *
     * var defaults = _.partialRight(_.assignInWith, customizer);
     *
     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
     * // => { 'a': 1, 'b': 2 }
     */
    var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
      copyObject(source, keysIn(source), object, customizer);
    });

    /**
     * This method is like `_.assign` except that it accepts `customizer`
     * which is invoked to produce the assigned values. If `customizer` returns
     * `undefined`, assignment is handled by the method instead. The `customizer`
     * is invoked with five arguments: (objValue, srcValue, key, object, source).
     *
     * **Note:** This method mutates `object`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Object
     * @param {Object} object The destination object.
     * @param {...Object} sources The source objects.
     * @param {Function} [customizer] The function to customize assigned values.
     * @returns {Object} Returns `object`.
     * @see _.assignInWith
     * @example
     *
     * function customizer(objValue, srcValue) {
     *   return _.isUndefined(objValue) ? srcValue : objValue;
     * }
     *
     * var defaults = _.partialRight(_.assignWith, customizer);
     *
     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
     * // => { 'a': 1, 'b': 2 }
     */
    var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
      copyObject(source, keys(source), object, customizer);
    });

    /**
     * Creates an array of values corresponding to `paths` of `object`.
     *
     * @static
     * @memberOf _
     * @since 1.0.0
     * @category Object
     * @param {Object} object The object to iterate over.
     * @param {...(string|string[])} [paths] The property paths to pick.
     * @returns {Array} Returns the picked values.
     * @example
     *
     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
     *
     * _.at(object, ['a[0].b.c', 'a[1]']);
     * // => [3, 4]
     */
    var at = flatRest(baseAt);

    /**
     * Creates an object that inherits from the `prototype` object. If a
     * `properties` object is given, its own enumerable string keyed properties
     * are assigned to the created object.
     *
     * @static
     * @memberOf _
     * @since 2.3.0
     * @category Object
     * @param {Object} prototype The object to inherit from.
     * @param {Object} [properties] The properties to assign to the object.
     * @returns {Object} Returns the new object.
     * @example
     *
     * function Shape() {
     *   this.x = 0;
     *   this.y = 0;
     * }
     *
     * function Circle() {
     *   Shape.call(this);
     * }
     *
     * Circle.prototype = _.create(Shape.prototype, {
     *   'constructor': Circle
     * });
     *
     * var circle = new Circle;
     * circle instanceof Circle;
     * // => true
     *
     * circle instanceof Shape;
     * // => true
     */
    function create(prototype, properties) {
      var result = baseCreate(prototype);
      return properties == null ? result : baseAssign(result, properties);
    }

    /**
     * Assigns own and inherited enumerable string keyed properties of source
     * objects to the destination object for all destination properties that
     * resolve to `undefined`. Source objects are applied from left to right.
     * Once a property is set, additional values of the same property are ignored.
     *
     * **Note:** This method mutates `object`.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Object
     * @param {Object} object The destination object.
     * @param {...Object} [sources] The source objects.
     * @returns {Object} Returns `object`.
     * @see _.defaultsDeep
     * @example
     *
     * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
     * // => { 'a': 1, 'b': 2 }
     */
    var defaults = baseRest(function(object, sources) {
      object = Object(object);

      var index = -1;
      var length = sources.length;
      var guard = length > 2 ? sources[2] : undefined;

      if (guard && isIterateeCall(sources[0], sources[1], guard)) {
        length = 1;
      }

      while (++index < length) {
        var source = sources[index];
        var props = keysIn(source);
        var propsIndex = -1;
        var propsLength = props.length;

        while (++propsIndex < propsLength) {
          var key = props[propsIndex];
          var value = object[key];

          if (value === undefined ||
              (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
            object[key] = source[key];
          }
        }
      }

      return object;
    });

    /**
     * This method is like `_.defaults` except that it recursively assigns
     * default properties.
     *
     * **Note:** This method mutates `object`.
     *
     * @static
     * @memberOf _
     * @since 3.10.0
     * @category Object
     * @param {Object} object The destination object.
     * @param {...Object} [sources] The source objects.
     * @returns {Object} Returns `object`.
     * @see _.defaults
     * @example
     *
     * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
     * // => { 'a': { 'b': 2, 'c': 3 } }
     */
    var defaultsDeep = baseRest(function(args) {
      args.push(undefined, customDefaultsMerge);
      return apply(mergeWith, undefined, args);
    });

    /**
     * This method is like `_.find` except that it returns the key of the first
     * element `predicate` returns truthy for instead of the element itself.
     *
     * @static
     * @memberOf _
     * @since 1.1.0
     * @category Object
     * @param {Object} object The object to inspect.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @returns {string|undefined} Returns the key of the matched element,
     *  else `undefined`.
     * @example
     *
     * var users = {
     *   'barney':  { 'age': 36, 'active': true },
     *   'fred':    { 'age': 40, 'active': false },
     *   'pebbles': { 'age': 1,  'active': true }
     * };
     *
     * _.findKey(users, function(o) { return o.age < 40; });
     * // => 'barney' (iteration order is not guaranteed)
     *
     * // The `_.matches` iteratee shorthand.
     * _.findKey(users, { 'age': 1, 'active': true });
     * // => 'pebbles'
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.findKey(users, ['active', false]);
     * // => 'fred'
     *
     * // The `_.property` iteratee shorthand.
     * _.findKey(users, 'active');
     * // => 'barney'
     */
    function findKey(object, predicate) {
      return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
    }

    /**
     * This method is like `_.findKey` except that it iterates over elements of
     * a collection in the opposite order.
     *
     * @static
     * @memberOf _
     * @since 2.0.0
     * @category Object
     * @param {Object} object The object to inspect.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @returns {string|undefined} Returns the key of the matched element,
     *  else `undefined`.
     * @example
     *
     * var users = {
     *   'barney':  { 'age': 36, 'active': true },
     *   'fred':    { 'age': 40, 'active': false },
     *   'pebbles': { 'age': 1,  'active': true }
     * };
     *
     * _.findLastKey(users, function(o) { return o.age < 40; });
     * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
     *
     * // The `_.matches` iteratee shorthand.
     * _.findLastKey(users, { 'age': 36, 'active': true });
     * // => 'barney'
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.findLastKey(users, ['active', false]);
     * // => 'fred'
     *
     * // The `_.property` iteratee shorthand.
     * _.findLastKey(users, 'active');
     * // => 'pebbles'
     */
    function findLastKey(object, predicate) {
      return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
    }

    /**
     * Iterates over own and inherited enumerable string keyed properties of an
     * object and invokes `iteratee` for each property. The iteratee is invoked
     * with three arguments: (value, key, object). Iteratee functions may exit
     * iteration early by explicitly returning `false`.
     *
     * @static
     * @memberOf _
     * @since 0.3.0
     * @category Object
     * @param {Object} object The object to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @returns {Object} Returns `object`.
     * @see _.forInRight
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     *   this.b = 2;
     * }
     *
     * Foo.prototype.c = 3;
     *
     * _.forIn(new Foo, function(value, key) {
     *   console.log(key);
     * });
     * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
     */
    function forIn(object, iteratee) {
      return object == null
        ? object
        : baseFor(object, getIteratee(iteratee, 3), keysIn);
    }

    /**
     * This method is like `_.forIn` except that it iterates over properties of
     * `object` in the opposite order.
     *
     * @static
     * @memberOf _
     * @since 2.0.0
     * @category Object
     * @param {Object} object The object to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @returns {Object} Returns `object`.
     * @see _.forIn
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     *   this.b = 2;
     * }
     *
     * Foo.prototype.c = 3;
     *
     * _.forInRight(new Foo, function(value, key) {
     *   console.log(key);
     * });
     * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
     */
    function forInRight(object, iteratee) {
      return object == null
        ? object
        : baseForRight(object, getIteratee(iteratee, 3), keysIn);
    }

    /**
     * Iterates over own enumerable string keyed properties of an object and
     * invokes `iteratee` for each property. The iteratee is invoked with three
     * arguments: (value, key, object). Iteratee functions may exit iteration
     * early by explicitly returning `false`.
     *
     * @static
     * @memberOf _
     * @since 0.3.0
     * @category Object
     * @param {Object} object The object to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @returns {Object} Returns `object`.
     * @see _.forOwnRight
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     *   this.b = 2;
     * }
     *
     * Foo.prototype.c = 3;
     *
     * _.forOwn(new Foo, function(value, key) {
     *   console.log(key);
     * });
     * // => Logs 'a' then 'b' (iteration order is not guaranteed).
     */
    function forOwn(object, iteratee) {
      return object && baseForOwn(object, getIteratee(iteratee, 3));
    }

    /**
     * This method is like `_.forOwn` except that it iterates over properties of
     * `object` in the opposite order.
     *
     * @static
     * @memberOf _
     * @since 2.0.0
     * @category Object
     * @param {Object} object The object to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @returns {Object} Returns `object`.
     * @see _.forOwn
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     *   this.b = 2;
     * }
     *
     * Foo.prototype.c = 3;
     *
     * _.forOwnRight(new Foo, function(value, key) {
     *   console.log(key);
     * });
     * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
     */
    function forOwnRight(object, iteratee) {
      return object && baseForOwnRight(object, getIteratee(iteratee, 3));
    }

    /**
     * Creates an array of function property names from own enumerable properties
     * of `object`.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Object
     * @param {Object} object The object to inspect.
     * @returns {Array} Returns the function names.
     * @see _.functionsIn
     * @example
     *
     * function Foo() {
     *   this.a = _.constant('a');
     *   this.b = _.constant('b');
     * }
     *
     * Foo.prototype.c = _.constant('c');
     *
     * _.functions(new Foo);
     * // => ['a', 'b']
     */
    function functions(object) {
      return object == null ? [] : baseFunctions(object, keys(object));
    }

    /**
     * Creates an array of function property names from own and inherited
     * enumerable properties of `object`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Object
     * @param {Object} object The object to inspect.
     * @returns {Array} Returns the function names.
     * @see _.functions
     * @example
     *
     * function Foo() {
     *   this.a = _.constant('a');
     *   this.b = _.constant('b');
     * }
     *
     * Foo.prototype.c = _.constant('c');
     *
     * _.functionsIn(new Foo);
     * // => ['a', 'b', 'c']
     */
    function functionsIn(object) {
      return object == null ? [] : baseFunctions(object, keysIn(object));
    }

    /**
     * Gets the value at `path` of `object`. If the resolved value is
     * `undefined`, the `defaultValue` is returned in its place.
     *
     * @static
     * @memberOf _
     * @since 3.7.0
     * @category Object
     * @param {Object} object The object to query.
     * @param {Array|string} path The path of the property to get.
     * @param {*} [defaultValue] The value returned for `undefined` resolved values.
     * @returns {*} Returns the resolved value.
     * @example
     *
     * var object = { 'a': [{ 'b': { 'c': 3 } }] };
     *
     * _.get(object, 'a[0].b.c');
     * // => 3
     *
     * _.get(object, ['a', '0', 'b', 'c']);
     * // => 3
     *
     * _.get(object, 'a.b.c', 'default');
     * // => 'default'
     */
    function get(object, path, defaultValue) {
      var result = object == null ? undefined : baseGet(object, path);
      return result === undefined ? defaultValue : result;
    }

    /**
     * Checks if `path` is a direct property of `object`.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Object
     * @param {Object} object The object to query.
     * @param {Array|string} path The path to check.
     * @returns {boolean} Returns `true` if `path` exists, else `false`.
     * @example
     *
     * var object = { 'a': { 'b': 2 } };
     * var other = _.create({ 'a': _.create({ 'b': 2 }) });
     *
     * _.has(object, 'a');
     * // => true
     *
     * _.has(object, 'a.b');
     * // => true
     *
     * _.has(object, ['a', 'b']);
     * // => true
     *
     * _.has(other, 'a');
     * // => false
     */
    function has(object, path) {
      return object != null && hasPath(object, path, baseHas);
    }

    /**
     * Checks if `path` is a direct or inherited property of `object`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Object
     * @param {Object} object The object to query.
     * @param {Array|string} path The path to check.
     * @returns {boolean} Returns `true` if `path` exists, else `false`.
     * @example
     *
     * var object = _.create({ 'a': _.create({ 'b': 2 }) });
     *
     * _.hasIn(object, 'a');
     * // => true
     *
     * _.hasIn(object, 'a.b');
     * // => true
     *
     * _.hasIn(object, ['a', 'b']);
     * // => true
     *
     * _.hasIn(object, 'b');
     * // => false
     */
    function hasIn(object, path) {
      return object != null && hasPath(object, path, baseHasIn);
    }

    /**
     * Creates an object composed of the inverted keys and values of `object`.
     * If `object` contains duplicate values, subsequent values overwrite
     * property assignments of previous values.
     *
     * @static
     * @memberOf _
     * @since 0.7.0
     * @category Object
     * @param {Object} object The object to invert.
     * @returns {Object} Returns the new inverted object.
     * @example
     *
     * var object = { 'a': 1, 'b': 2, 'c': 1 };
     *
     * _.invert(object);
     * // => { '1': 'c', '2': 'b' }
     */
    var invert = createInverter(function(result, value, key) {
      if (value != null &&
          typeof value.toString != 'function') {
        value = nativeObjectToString.call(value);
      }

      result[value] = key;
    }, constant(identity));

    /**
     * This method is like `_.invert` except that the inverted object is generated
     * from the results of running each element of `object` thru `iteratee`. The
     * corresponding inverted value of each inverted key is an array of keys
     * responsible for generating the inverted value. The iteratee is invoked
     * with one argument: (value).
     *
     * @static
     * @memberOf _
     * @since 4.1.0
     * @category Object
     * @param {Object} object The object to invert.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {Object} Returns the new inverted object.
     * @example
     *
     * var object = { 'a': 1, 'b': 2, 'c': 1 };
     *
     * _.invertBy(object);
     * // => { '1': ['a', 'c'], '2': ['b'] }
     *
     * _.invertBy(object, function(value) {
     *   return 'group' + value;
     * });
     * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
     */
    var invertBy = createInverter(function(result, value, key) {
      if (value != null &&
          typeof value.toString != 'function') {
        value = nativeObjectToString.call(value);
      }

      if (hasOwnProperty.call(result, value)) {
        result[value].push(key);
      } else {
        result[value] = [key];
      }
    }, getIteratee);

    /**
     * Invokes the method at `path` of `object`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Object
     * @param {Object} object The object to query.
     * @param {Array|string} path The path of the method to invoke.
     * @param {...*} [args] The arguments to invoke the method with.
     * @returns {*} Returns the result of the invoked method.
     * @example
     *
     * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
     *
     * _.invoke(object, 'a[0].b.c.slice', 1, 3);
     * // => [2, 3]
     */
    var invoke = baseRest(baseInvoke);

    /**
     * Creates an array of the own enumerable property names of `object`.
     *
     * **Note:** Non-object values are coerced to objects. See the
     * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
     * for more details.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Object
     * @param {Object} object The object to query.
     * @returns {Array} Returns the array of property names.
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     *   this.b = 2;
     * }
     *
     * Foo.prototype.c = 3;
     *
     * _.keys(new Foo);
     * // => ['a', 'b'] (iteration order is not guaranteed)
     *
     * _.keys('hi');
     * // => ['0', '1']
     */
    function keys(object) {
      return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
    }

    /**
     * Creates an array of the own and inherited enumerable property names of `object`.
     *
     * **Note:** Non-object values are coerced to objects.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Object
     * @param {Object} object The object to query.
     * @returns {Array} Returns the array of property names.
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     *   this.b = 2;
     * }
     *
     * Foo.prototype.c = 3;
     *
     * _.keysIn(new Foo);
     * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
     */
    function keysIn(object) {
      return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
    }

    /**
     * The opposite of `_.mapValues`; this method creates an object with the
     * same values as `object` and keys generated by running each own enumerable
     * string keyed property of `object` thru `iteratee`. The iteratee is invoked
     * with three arguments: (value, key, object).
     *
     * @static
     * @memberOf _
     * @since 3.8.0
     * @category Object
     * @param {Object} object The object to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @returns {Object} Returns the new mapped object.
     * @see _.mapValues
     * @example
     *
     * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
     *   return key + value;
     * });
     * // => { 'a1': 1, 'b2': 2 }
     */
    function mapKeys(object, iteratee) {
      var result = {};
      iteratee = getIteratee(iteratee, 3);

      baseForOwn(object, function(value, key, object) {
        baseAssignValue(result, iteratee(value, key, object), value);
      });
      return result;
    }

    /**
     * Creates an object with the same keys as `object` and values generated
     * by running each own enumerable string keyed property of `object` thru
     * `iteratee`. The iteratee is invoked with three arguments:
     * (value, key, object).
     *
     * @static
     * @memberOf _
     * @since 2.4.0
     * @category Object
     * @param {Object} object The object to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @returns {Object} Returns the new mapped object.
     * @see _.mapKeys
     * @example
     *
     * var users = {
     *   'fred':    { 'user': 'fred',    'age': 40 },
     *   'pebbles': { 'user': 'pebbles', 'age': 1 }
     * };
     *
     * _.mapValues(users, function(o) { return o.age; });
     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
     *
     * // The `_.property` iteratee shorthand.
     * _.mapValues(users, 'age');
     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
     */
    function mapValues(object, iteratee) {
      var result = {};
      iteratee = getIteratee(iteratee, 3);

      baseForOwn(object, function(value, key, object) {
        baseAssignValue(result, key, iteratee(value, key, object));
      });
      return result;
    }

    /**
     * This method is like `_.assign` except that it recursively merges own and
     * inherited enumerable string keyed properties of source objects into the
     * destination object. Source properties that resolve to `undefined` are
     * skipped if a destination value exists. Array and plain object properties
     * are merged recursively. Other objects and value types are overridden by
     * assignment. Source objects are applied from left to right. Subsequent
     * sources overwrite property assignments of previous sources.
     *
     * **Note:** This method mutates `object`.
     *
     * @static
     * @memberOf _
     * @since 0.5.0
     * @category Object
     * @param {Object} object The destination object.
     * @param {...Object} [sources] The source objects.
     * @returns {Object} Returns `object`.
     * @example
     *
     * var object = {
     *   'a': [{ 'b': 2 }, { 'd': 4 }]
     * };
     *
     * var other = {
     *   'a': [{ 'c': 3 }, { 'e': 5 }]
     * };
     *
     * _.merge(object, other);
     * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
     */
    var merge = createAssigner(function(object, source, srcIndex) {
      baseMerge(object, source, srcIndex);
    });

    /**
     * This method is like `_.merge` except that it accepts `customizer` which
     * is invoked to produce the merged values of the destination and source
     * properties. If `customizer` returns `undefined`, merging is handled by the
     * method instead. The `customizer` is invoked with six arguments:
     * (objValue, srcValue, key, object, source, stack).
     *
     * **Note:** This method mutates `object`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Object
     * @param {Object} object The destination object.
     * @param {...Object} sources The source objects.
     * @param {Function} customizer The function to customize assigned values.
     * @returns {Object} Returns `object`.
     * @example
     *
     * function customizer(objValue, srcValue) {
     *   if (_.isArray(objValue)) {
     *     return objValue.concat(srcValue);
     *   }
     * }
     *
     * var object = { 'a': [1], 'b': [2] };
     * var other = { 'a': [3], 'b': [4] };
     *
     * _.mergeWith(object, other, customizer);
     * // => { 'a': [1, 3], 'b': [2, 4] }
     */
    var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
      baseMerge(object, source, srcIndex, customizer);
    });

    /**
     * The opposite of `_.pick`; this method creates an object composed of the
     * own and inherited enumerable property paths of `object` that are not omitted.
     *
     * **Note:** This method is considerably slower than `_.pick`.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Object
     * @param {Object} object The source object.
     * @param {...(string|string[])} [paths] The property paths to omit.
     * @returns {Object} Returns the new object.
     * @example
     *
     * var object = { 'a': 1, 'b': '2', 'c': 3 };
     *
     * _.omit(object, ['a', 'c']);
     * // => { 'b': '2' }
     */
    var omit = flatRest(function(object, paths) {
      var result = {};
      if (object == null) {
        return result;
      }
      var isDeep = false;
      paths = arrayMap(paths, function(path) {
        path = castPath(path, object);
        isDeep || (isDeep = path.length > 1);
        return path;
      });
      copyObject(object, getAllKeysIn(object), result);
      if (isDeep) {
        result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
      }
      var length = paths.length;
      while (length--) {
        baseUnset(result, paths[length]);
      }
      return result;
    });

    /**
     * The opposite of `_.pickBy`; this method creates an object composed of
     * the own and inherited enumerable string keyed properties of `object` that
     * `predicate` doesn't return truthy for. The predicate is invoked with two
     * arguments: (value, key).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Object
     * @param {Object} object The source object.
     * @param {Function} [predicate=_.identity] The function invoked per property.
     * @returns {Object} Returns the new object.
     * @example
     *
     * var object = { 'a': 1, 'b': '2', 'c': 3 };
     *
     * _.omitBy(object, _.isNumber);
     * // => { 'b': '2' }
     */
    function omitBy(object, predicate) {
      return pickBy(object, negate(getIteratee(predicate)));
    }

    /**
     * Creates an object composed of the picked `object` properties.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Object
     * @param {Object} object The source object.
     * @param {...(string|string[])} [paths] The property paths to pick.
     * @returns {Object} Returns the new object.
     * @example
     *
     * var object = { 'a': 1, 'b': '2', 'c': 3 };
     *
     * _.pick(object, ['a', 'c']);
     * // => { 'a': 1, 'c': 3 }
     */
    var pick = flatRest(function(object, paths) {
      return object == null ? {} : basePick(object, paths);
    });

    /**
     * Creates an object composed of the `object` properties `predicate` returns
     * truthy for. The predicate is invoked with two arguments: (value, key).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Object
     * @param {Object} object The source object.
     * @param {Function} [predicate=_.identity] The function invoked per property.
     * @returns {Object} Returns the new object.
     * @example
     *
     * var object = { 'a': 1, 'b': '2', 'c': 3 };
     *
     * _.pickBy(object, _.isNumber);
     * // => { 'a': 1, 'c': 3 }
     */
    function pickBy(object, predicate) {
      if (object == null) {
        return {};
      }
      var props = arrayMap(getAllKeysIn(object), function(prop) {
        return [prop];
      });
      predicate = getIteratee(predicate);
      return basePickBy(object, props, function(value, path) {
        return predicate(value, path[0]);
      });
    }

    /**
     * This method is like `_.get` except that if the resolved value is a
     * function it's invoked with the `this` binding of its parent object and
     * its result is returned.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Object
     * @param {Object} object The object to query.
     * @param {Array|string} path The path of the property to resolve.
     * @param {*} [defaultValue] The value returned for `undefined` resolved values.
     * @returns {*} Returns the resolved value.
     * @example
     *
     * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
     *
     * _.result(object, 'a[0].b.c1');
     * // => 3
     *
     * _.result(object, 'a[0].b.c2');
     * // => 4
     *
     * _.result(object, 'a[0].b.c3', 'default');
     * // => 'default'
     *
     * _.result(object, 'a[0].b.c3', _.constant('default'));
     * // => 'default'
     */
    function result(object, path, defaultValue) {
      path = castPath(path, object);

      var index = -1,
          length = path.length;

      // Ensure the loop is entered when path is empty.
      if (!length) {
        length = 1;
        object = undefined;
      }
      while (++index < length) {
        var value = object == null ? undefined : object[toKey(path[index])];
        if (value === undefined) {
          index = length;
          value = defaultValue;
        }
        object = isFunction(value) ? value.call(object) : value;
      }
      return object;
    }

    /**
     * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
     * it's created. Arrays are created for missing index properties while objects
     * are created for all other missing properties. Use `_.setWith` to customize
     * `path` creation.
     *
     * **Note:** This method mutates `object`.
     *
     * @static
     * @memberOf _
     * @since 3.7.0
     * @category Object
     * @param {Object} object The object to modify.
     * @param {Array|string} path The path of the property to set.
     * @param {*} value The value to set.
     * @returns {Object} Returns `object`.
     * @example
     *
     * var object = { 'a': [{ 'b': { 'c': 3 } }] };
     *
     * _.set(object, 'a[0].b.c', 4);
     * console.log(object.a[0].b.c);
     * // => 4
     *
     * _.set(object, ['x', '0', 'y', 'z'], 5);
     * console.log(object.x[0].y.z);
     * // => 5
     */
    function set(object, path, value) {
      return object == null ? object : baseSet(object, path, value);
    }

    /**
     * This method is like `_.set` except that it accepts `customizer` which is
     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
     * path creation is handled by the method instead. The `customizer` is invoked
     * with three arguments: (nsValue, key, nsObject).
     *
     * **Note:** This method mutates `object`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Object
     * @param {Object} object The object to modify.
     * @param {Array|string} path The path of the property to set.
     * @param {*} value The value to set.
     * @param {Function} [customizer] The function to customize assigned values.
     * @returns {Object} Returns `object`.
     * @example
     *
     * var object = {};
     *
     * _.setWith(object, '[0][1]', 'a', Object);
     * // => { '0': { '1': 'a' } }
     */
    function setWith(object, path, value, customizer) {
      customizer = typeof customizer == 'function' ? customizer : undefined;
      return object == null ? object : baseSet(object, path, value, customizer);
    }

    /**
     * Creates an array of own enumerable string keyed-value pairs for `object`
     * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
     * entries are returned.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @alias entries
     * @category Object
     * @param {Object} object The object to query.
     * @returns {Array} Returns the key-value pairs.
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     *   this.b = 2;
     * }
     *
     * Foo.prototype.c = 3;
     *
     * _.toPairs(new Foo);
     * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
     */
    var toPairs = createToPairs(keys);

    /**
     * Creates an array of own and inherited enumerable string keyed-value pairs
     * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
     * or set, its entries are returned.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @alias entriesIn
     * @category Object
     * @param {Object} object The object to query.
     * @returns {Array} Returns the key-value pairs.
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     *   this.b = 2;
     * }
     *
     * Foo.prototype.c = 3;
     *
     * _.toPairsIn(new Foo);
     * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
     */
    var toPairsIn = createToPairs(keysIn);

    /**
     * An alternative to `_.reduce`; this method transforms `object` to a new
     * `accumulator` object which is the result of running each of its own
     * enumerable string keyed properties thru `iteratee`, with each invocation
     * potentially mutating the `accumulator` object. If `accumulator` is not
     * provided, a new object with the same `[[Prototype]]` will be used. The
     * iteratee is invoked with four arguments: (accumulator, value, key, object).
     * Iteratee functions may exit iteration early by explicitly returning `false`.
     *
     * @static
     * @memberOf _
     * @since 1.3.0
     * @category Object
     * @param {Object} object The object to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @param {*} [accumulator] The custom accumulator value.
     * @returns {*} Returns the accumulated value.
     * @example
     *
     * _.transform([2, 3, 4], function(result, n) {
     *   result.push(n *= n);
     *   return n % 2 == 0;
     * }, []);
     * // => [4, 9]
     *
     * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
     *   (result[value] || (result[value] = [])).push(key);
     * }, {});
     * // => { '1': ['a', 'c'], '2': ['b'] }
     */
    function transform(object, iteratee, accumulator) {
      var isArr = isArray(object),
          isArrLike = isArr || isBuffer(object) || isTypedArray(object);

      iteratee = getIteratee(iteratee, 4);
      if (accumulator == null) {
        var Ctor = object && object.constructor;
        if (isArrLike) {
          accumulator = isArr ? new Ctor : [];
        }
        else if (isObject(object)) {
          accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
        }
        else {
          accumulator = {};
        }
      }
      (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
        return iteratee(accumulator, value, index, object);
      });
      return accumulator;
    }

    /**
     * Removes the property at `path` of `object`.
     *
     * **Note:** This method mutates `object`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Object
     * @param {Object} object The object to modify.
     * @param {Array|string} path The path of the property to unset.
     * @returns {boolean} Returns `true` if the property is deleted, else `false`.
     * @example
     *
     * var object = { 'a': [{ 'b': { 'c': 7 } }] };
     * _.unset(object, 'a[0].b.c');
     * // => true
     *
     * console.log(object);
     * // => { 'a': [{ 'b': {} }] };
     *
     * _.unset(object, ['a', '0', 'b', 'c']);
     * // => true
     *
     * console.log(object);
     * // => { 'a': [{ 'b': {} }] };
     */
    function unset(object, path) {
      return object == null ? true : baseUnset(object, path);
    }

    /**
     * This method is like `_.set` except that accepts `updater` to produce the
     * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
     * is invoked with one argument: (value).
     *
     * **Note:** This method mutates `object`.
     *
     * @static
     * @memberOf _
     * @since 4.6.0
     * @category Object
     * @param {Object} object The object to modify.
     * @param {Array|string} path The path of the property to set.
     * @param {Function} updater The function to produce the updated value.
     * @returns {Object} Returns `object`.
     * @example
     *
     * var object = { 'a': [{ 'b': { 'c': 3 } }] };
     *
     * _.update(object, 'a[0].b.c', function(n) { return n * n; });
     * console.log(object.a[0].b.c);
     * // => 9
     *
     * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
     * console.log(object.x[0].y.z);
     * // => 0
     */
    function update(object, path, updater) {
      return object == null ? object : baseUpdate(object, path, castFunction(updater));
    }

    /**
     * This method is like `_.update` except that it accepts `customizer` which is
     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
     * path creation is handled by the method instead. The `customizer` is invoked
     * with three arguments: (nsValue, key, nsObject).
     *
     * **Note:** This method mutates `object`.
     *
     * @static
     * @memberOf _
     * @since 4.6.0
     * @category Object
     * @param {Object} object The object to modify.
     * @param {Array|string} path The path of the property to set.
     * @param {Function} updater The function to produce the updated value.
     * @param {Function} [customizer] The function to customize assigned values.
     * @returns {Object} Returns `object`.
     * @example
     *
     * var object = {};
     *
     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
     * // => { '0': { '1': 'a' } }
     */
    function updateWith(object, path, updater, customizer) {
      customizer = typeof customizer == 'function' ? customizer : undefined;
      return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
    }

    /**
     * Creates an array of the own enumerable string keyed property values of `object`.
     *
     * **Note:** Non-object values are coerced to objects.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Object
     * @param {Object} object The object to query.
     * @returns {Array} Returns the array of property values.
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     *   this.b = 2;
     * }
     *
     * Foo.prototype.c = 3;
     *
     * _.values(new Foo);
     * // => [1, 2] (iteration order is not guaranteed)
     *
     * _.values('hi');
     * // => ['h', 'i']
     */
    function values(object) {
      return object == null ? [] : baseValues(object, keys(object));
    }

    /**
     * Creates an array of the own and inherited enumerable string keyed property
     * values of `object`.
     *
     * **Note:** Non-object values are coerced to objects.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Object
     * @param {Object} object The object to query.
     * @returns {Array} Returns the array of property values.
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     *   this.b = 2;
     * }
     *
     * Foo.prototype.c = 3;
     *
     * _.valuesIn(new Foo);
     * // => [1, 2, 3] (iteration order is not guaranteed)
     */
    function valuesIn(object) {
      return object == null ? [] : baseValues(object, keysIn(object));
    }

    /*------------------------------------------------------------------------*/

    /**
     * Clamps `number` within the inclusive `lower` and `upper` bounds.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Number
     * @param {number} number The number to clamp.
     * @param {number} [lower] The lower bound.
     * @param {number} upper The upper bound.
     * @returns {number} Returns the clamped number.
     * @example
     *
     * _.clamp(-10, -5, 5);
     * // => -5
     *
     * _.clamp(10, -5, 5);
     * // => 5
     */
    function clamp(number, lower, upper) {
      if (upper === undefined) {
        upper = lower;
        lower = undefined;
      }
      if (upper !== undefined) {
        upper = toNumber(upper);
        upper = upper === upper ? upper : 0;
      }
      if (lower !== undefined) {
        lower = toNumber(lower);
        lower = lower === lower ? lower : 0;
      }
      return baseClamp(toNumber(number), lower, upper);
    }

    /**
     * Checks if `n` is between `start` and up to, but not including, `end`. If
     * `end` is not specified, it's set to `start` with `start` then set to `0`.
     * If `start` is greater than `end` the params are swapped to support
     * negative ranges.
     *
     * @static
     * @memberOf _
     * @since 3.3.0
     * @category Number
     * @param {number} number The number to check.
     * @param {number} [start=0] The start of the range.
     * @param {number} end The end of the range.
     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
     * @see _.range, _.rangeRight
     * @example
     *
     * _.inRange(3, 2, 4);
     * // => true
     *
     * _.inRange(4, 8);
     * // => true
     *
     * _.inRange(4, 2);
     * // => false
     *
     * _.inRange(2, 2);
     * // => false
     *
     * _.inRange(1.2, 2);
     * // => true
     *
     * _.inRange(5.2, 4);
     * // => false
     *
     * _.inRange(-3, -2, -6);
     * // => true
     */
    function inRange(number, start, end) {
      start = toFinite(start);
      if (end === undefined) {
        end = start;
        start = 0;
      } else {
        end = toFinite(end);
      }
      number = toNumber(number);
      return baseInRange(number, start, end);
    }

    /**
     * Produces a random number between the inclusive `lower` and `upper` bounds.
     * If only one argument is provided a number between `0` and the given number
     * is returned. If `floating` is `true`, or either `lower` or `upper` are
     * floats, a floating-point number is returned instead of an integer.
     *
     * **Note:** JavaScript follows the IEEE-754 standard for resolving
     * floating-point values which can produce unexpected results.
     *
     * **Note:** If `lower` is greater than `upper`, the values are swapped.
     *
     * @static
     * @memberOf _
     * @since 0.7.0
     * @category Number
     * @param {number} [lower=0] The lower bound.
     * @param {number} [upper=1] The upper bound.
     * @param {boolean} [floating] Specify returning a floating-point number.
     * @returns {number} Returns the random number.
     * @example
     *
     * _.random(0, 5);
     * // => an integer between 0 and 5
     *
     * // when lower is greater than upper the values are swapped
     * _.random(5, 0);
     * // => an integer between 0 and 5
     *
     * _.random(5);
     * // => also an integer between 0 and 5
     *
     * _.random(-5);
     * // => an integer between -5 and 0
     *
     * _.random(5, true);
     * // => a floating-point number between 0 and 5
     *
     * _.random(1.2, 5.2);
     * // => a floating-point number between 1.2 and 5.2
     */
    function random(lower, upper, floating) {
      if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
        upper = floating = undefined;
      }
      if (floating === undefined) {
        if (typeof upper == 'boolean') {
          floating = upper;
          upper = undefined;
        }
        else if (typeof lower == 'boolean') {
          floating = lower;
          lower = undefined;
        }
      }
      if (lower === undefined && upper === undefined) {
        lower = 0;
        upper = 1;
      }
      else {
        lower = toFinite(lower);
        if (upper === undefined) {
          upper = lower;
          lower = 0;
        } else {
          upper = toFinite(upper);
        }
      }
      if (lower > upper) {
        var temp = lower;
        lower = upper;
        upper = temp;
      }
      if (floating || lower % 1 || upper % 1) {
        var rand = nativeRandom();
        return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
      }
      return baseRandom(lower, upper);
    }

    /*------------------------------------------------------------------------*/

    /**
     * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category String
     * @param {string} [string=''] The string to convert.
     * @returns {string} Returns the camel cased string.
     * @example
     *
     * _.camelCase('Foo Bar');
     * // => 'fooBar'
     *
     * _.camelCase('--foo-bar--');
     * // => 'fooBar'
     *
     * _.camelCase('__FOO_BAR__');
     * // => 'fooBar'
     */
    var camelCase = createCompounder(function(result, word, index) {
      word = word.toLowerCase();
      return result + (index ? capitalize(word) : word);
    });

    /**
     * Converts the first character of `string` to upper case and the remaining
     * to lower case.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category String
     * @param {string} [string=''] The string to capitalize.
     * @returns {string} Returns the capitalized string.
     * @example
     *
     * _.capitalize('FRED');
     * // => 'Fred'
     */
    function capitalize(string) {
      return upperFirst(toString(string).toLowerCase());
    }

    /**
     * Deburrs `string` by converting
     * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
     * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
     * letters to basic Latin letters and removing
     * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category String
     * @param {string} [string=''] The string to deburr.
     * @returns {string} Returns the deburred string.
     * @example
     *
     * _.deburr('dÃ©jÃ  vu');
     * // => 'deja vu'
     */
    function deburr(string) {
      string = toString(string);
      return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
    }

    /**
     * Checks if `string` ends with the given target string.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category String
     * @param {string} [string=''] The string to inspect.
     * @param {string} [target] The string to search for.
     * @param {number} [position=string.length] The position to search up to.
     * @returns {boolean} Returns `true` if `string` ends with `target`,
     *  else `false`.
     * @example
     *
     * _.endsWith('abc', 'c');
     * // => true
     *
     * _.endsWith('abc', 'b');
     * // => false
     *
     * _.endsWith('abc', 'b', 2);
     * // => true
     */
    function endsWith(string, target, position) {
      string = toString(string);
      target = baseToString(target);

      var length = string.length;
      position = position === undefined
        ? length
        : baseClamp(toInteger(position), 0, length);

      var end = position;
      position -= target.length;
      return position >= 0 && string.slice(position, end) == target;
    }

    /**
     * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
     * corresponding HTML entities.
     *
     * **Note:** No other characters are escaped. To escape additional
     * characters use a third-party library like [_he_](https://mths.be/he).
     *
     * Though the ">" character is escaped for symmetry, characters like
     * ">" and "/" don't need escaping in HTML and have no special meaning
     * unless they're part of a tag or unquoted attribute value. See
     * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
     * (under "semi-related fun fact") for more details.
     *
     * When working with HTML you should always
     * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
     * XSS vectors.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category String
     * @param {string} [string=''] The string to escape.
     * @returns {string} Returns the escaped string.
     * @example
     *
     * _.escape('fred, barney, & pebbles');
     * // => 'fred, barney, &amp; pebbles'
     */
    function escape(string) {
      string = toString(string);
      return (string && reHasUnescapedHtml.test(string))
        ? string.replace(reUnescapedHtml, escapeHtmlChar)
        : string;
    }

    /**
     * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
     * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category String
     * @param {string} [string=''] The string to escape.
     * @returns {string} Returns the escaped string.
     * @example
     *
     * _.escapeRegExp('[lodash](https://lodash.com/)');
     * // => '\[lodash\]\(https://lodash\.com/\)'
     */
    function escapeRegExp(string) {
      string = toString(string);
      return (string && reHasRegExpChar.test(string))
        ? string.replace(reRegExpChar, '\\$&')
        : string;
    }

    /**
     * Converts `string` to
     * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category String
     * @param {string} [string=''] The string to convert.
     * @returns {string} Returns the kebab cased string.
     * @example
     *
     * _.kebabCase('Foo Bar');
     * // => 'foo-bar'
     *
     * _.kebabCase('fooBar');
     * // => 'foo-bar'
     *
     * _.kebabCase('__FOO_BAR__');
     * // => 'foo-bar'
     */
    var kebabCase = createCompounder(function(result, word, index) {
      return result + (index ? '-' : '') + word.toLowerCase();
    });

    /**
     * Converts `string`, as space separated words, to lower case.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to convert.
     * @returns {string} Returns the lower cased string.
     * @example
     *
     * _.lowerCase('--Foo-Bar--');
     * // => 'foo bar'
     *
     * _.lowerCase('fooBar');
     * // => 'foo bar'
     *
     * _.lowerCase('__FOO_BAR__');
     * // => 'foo bar'
     */
    var lowerCase = createCompounder(function(result, word, index) {
      return result + (index ? ' ' : '') + word.toLowerCase();
    });

    /**
     * Converts the first character of `string` to lower case.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to convert.
     * @returns {string} Returns the converted string.
     * @example
     *
     * _.lowerFirst('Fred');
     * // => 'fred'
     *
     * _.lowerFirst('FRED');
     * // => 'fRED'
     */
    var lowerFirst = createCaseFirst('toLowerCase');

    /**
     * Pads `string` on the left and right sides if it's shorter than `length`.
     * Padding characters are truncated if they can't be evenly divided by `length`.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category String
     * @param {string} [string=''] The string to pad.
     * @param {number} [length=0] The padding length.
     * @param {string} [chars=' '] The string used as padding.
     * @returns {string} Returns the padded string.
     * @example
     *
     * _.pad('abc', 8);
     * // => '  abc   '
     *
     * _.pad('abc', 8, '_-');
     * // => '_-abc_-_'
     *
     * _.pad('abc', 3);
     * // => 'abc'
     */
    function pad(string, length, chars) {
      string = toString(string);
      length = toInteger(length);

      var strLength = length ? stringSize(string) : 0;
      if (!length || strLength >= length) {
        return string;
      }
      var mid = (length - strLength) / 2;
      return (
        createPadding(nativeFloor(mid), chars) +
        string +
        createPadding(nativeCeil(mid), chars)
      );
    }

    /**
     * Pads `string` on the right side if it's shorter than `length`. Padding
     * characters are truncated if they exceed `length`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to pad.
     * @param {number} [length=0] The padding length.
     * @param {string} [chars=' '] The string used as padding.
     * @returns {string} Returns the padded string.
     * @example
     *
     * _.padEnd('abc', 6);
     * // => 'abc   '
     *
     * _.padEnd('abc', 6, '_-');
     * // => 'abc_-_'
     *
     * _.padEnd('abc', 3);
     * // => 'abc'
     */
    function padEnd(string, length, chars) {
      string = toString(string);
      length = toInteger(length);

      var strLength = length ? stringSize(string) : 0;
      return (length && strLength < length)
        ? (string + createPadding(length - strLength, chars))
        : string;
    }

    /**
     * Pads `string` on the left side if it's shorter than `length`. Padding
     * characters are truncated if they exceed `length`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to pad.
     * @param {number} [length=0] The padding length.
     * @param {string} [chars=' '] The string used as padding.
     * @returns {string} Returns the padded string.
     * @example
     *
     * _.padStart('abc', 6);
     * // => '   abc'
     *
     * _.padStart('abc', 6, '_-');
     * // => '_-_abc'
     *
     * _.padStart('abc', 3);
     * // => 'abc'
     */
    function padStart(string, length, chars) {
      string = toString(string);
      length = toInteger(length);

      var strLength = length ? stringSize(string) : 0;
      return (length && strLength < length)
        ? (createPadding(length - strLength, chars) + string)
        : string;
    }

    /**
     * Converts `string` to an integer of the specified radix. If `radix` is
     * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
     * hexadecimal, in which case a `radix` of `16` is used.
     *
     * **Note:** This method aligns with the
     * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
     *
     * @static
     * @memberOf _
     * @since 1.1.0
     * @category String
     * @param {string} string The string to convert.
     * @param {number} [radix=10] The radix to interpret `value` by.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {number} Returns the converted integer.
     * @example
     *
     * _.parseInt('08');
     * // => 8
     *
     * _.map(['6', '08', '10'], _.parseInt);
     * // => [6, 8, 10]
     */
    function parseInt(string, radix, guard) {
      if (guard || radix == null) {
        radix = 0;
      } else if (radix) {
        radix = +radix;
      }
      return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
    }

    /**
     * Repeats the given string `n` times.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category String
     * @param {string} [string=''] The string to repeat.
     * @param {number} [n=1] The number of times to repeat the string.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {string} Returns the repeated string.
     * @example
     *
     * _.repeat('*', 3);
     * // => '***'
     *
     * _.repeat('abc', 2);
     * // => 'abcabc'
     *
     * _.repeat('abc', 0);
     * // => ''
     */
    function repeat(string, n, guard) {
      if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
        n = 1;
      } else {
        n = toInteger(n);
      }
      return baseRepeat(toString(string), n);
    }

    /**
     * Replaces matches for `pattern` in `string` with `replacement`.
     *
     * **Note:** This method is based on
     * [`String#replace`](https://mdn.io/String/replace).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to modify.
     * @param {RegExp|string} pattern The pattern to replace.
     * @param {Function|string} replacement The match replacement.
     * @returns {string} Returns the modified string.
     * @example
     *
     * _.replace('Hi Fred', 'Fred', 'Barney');
     * // => 'Hi Barney'
     */
    function replace() {
      var args = arguments,
          string = toString(args[0]);

      return args.length < 3 ? string : string.replace(args[1], args[2]);
    }

    /**
     * Converts `string` to
     * [snake case](https://en.wikipedia.org/wiki/Snake_case).
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category String
     * @param {string} [string=''] The string to convert.
     * @returns {string} Returns the snake cased string.
     * @example
     *
     * _.snakeCase('Foo Bar');
     * // => 'foo_bar'
     *
     * _.snakeCase('fooBar');
     * // => 'foo_bar'
     *
     * _.snakeCase('--FOO-BAR--');
     * // => 'foo_bar'
     */
    var snakeCase = createCompounder(function(result, word, index) {
      return result + (index ? '_' : '') + word.toLowerCase();
    });

    /**
     * Splits `string` by `separator`.
     *
     * **Note:** This method is based on
     * [`String#split`](https://mdn.io/String/split).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to split.
     * @param {RegExp|string} separator The separator pattern to split by.
     * @param {number} [limit] The length to truncate results to.
     * @returns {Array} Returns the string segments.
     * @example
     *
     * _.split('a-b-c', '-', 2);
     * // => ['a', 'b']
     */
    function split(string, separator, limit) {
      if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
        separator = limit = undefined;
      }
      limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
      if (!limit) {
        return [];
      }
      string = toString(string);
      if (string && (
            typeof separator == 'string' ||
            (separator != null && !isRegExp(separator))
          )) {
        separator = baseToString(separator);
        if (!separator && hasUnicode(string)) {
          return castSlice(stringToArray(string), 0, limit);
        }
      }
      return string.split(separator, limit);
    }

    /**
     * Converts `string` to
     * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
     *
     * @static
     * @memberOf _
     * @since 3.1.0
     * @category String
     * @param {string} [string=''] The string to convert.
     * @returns {string} Returns the start cased string.
     * @example
     *
     * _.startCase('--foo-bar--');
     * // => 'Foo Bar'
     *
     * _.startCase('fooBar');
     * // => 'Foo Bar'
     *
     * _.startCase('__FOO_BAR__');
     * // => 'FOO BAR'
     */
    var startCase = createCompounder(function(result, word, index) {
      return result + (index ? ' ' : '') + upperFirst(word);
    });

    /**
     * Checks if `string` starts with the given target string.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category String
     * @param {string} [string=''] The string to inspect.
     * @param {string} [target] The string to search for.
     * @param {number} [position=0] The position to search from.
     * @returns {boolean} Returns `true` if `string` starts with `target`,
     *  else `false`.
     * @example
     *
     * _.startsWith('abc', 'a');
     * // => true
     *
     * _.startsWith('abc', 'b');
     * // => false
     *
     * _.startsWith('abc', 'b', 1);
     * // => true
     */
    function startsWith(string, target, position) {
      string = toString(string);
      position = position == null
        ? 0
        : baseClamp(toInteger(position), 0, string.length);

      target = baseToString(target);
      return string.slice(position, position + target.length) == target;
    }

    /**
     * Creates a compiled template function that can interpolate data properties
     * in "interpolate" delimiters, HTML-escape interpolated data properties in
     * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
     * properties may be accessed as free variables in the template. If a setting
     * object is given, it takes precedence over `_.templateSettings` values.
     *
     * **Security:** `_.template` is insecure and should not be used. It will be
     * removed in Lodash v5. Avoid untrusted input. See
     * [threat model](https://github.com/lodash/lodash/blob/main/threat-model.md).
     *
     * **Note:** In the development build `_.template` utilizes
     * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
     * for easier debugging.
     *
     * For more information on precompiling templates see
     * [lodash's custom builds documentation](https://lodash.com/custom-builds).
     *
     * For more information on Chrome extension sandboxes see
     * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category String
     * @param {string} [string=''] The template string.
     * @param {Object} [options={}] The options object.
     * @param {RegExp} [options.escape=_.templateSettings.escape]
     *  The HTML "escape" delimiter.
     * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
     *  The "evaluate" delimiter.
     * @param {Object} [options.imports=_.templateSettings.imports]
     *  An object to import into the template as free variables.
     * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
     *  The "interpolate" delimiter.
     * @param {string} [options.sourceURL='lodash.templateSources[n]']
     *  The sourceURL of the compiled template.
     * @param {string} [options.variable='obj']
     *  The data object variable name.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {Function} Returns the compiled template function.
     * @example
     *
     * // Use the "interpolate" delimiter to create a compiled template.
     * var compiled = _.template('hello <%= user %>!');
     * compiled({ 'user': 'fred' });
     * // => 'hello fred!'
     *
     * // Use the HTML "escape" delimiter to escape data property values.
     * var compiled = _.template('<b><%- value %></b>');
     * compiled({ 'value': '<script>' });
     * // => '<b>&lt;script&gt;</b>'
     *
     * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
     * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
     * compiled({ 'users': ['fred', 'barney'] });
     * // => '<li>fred</li><li>barney</li>'
     *
     * // Use the internal `print` function in "evaluate" delimiters.
     * var compiled = _.template('<% print("hello " + user); %>!');
     * compiled({ 'user': 'barney' });
     * // => 'hello barney!'
     *
     * // Use the ES template literal delimiter as an "interpolate" delimiter.
     * // Disable support by replacing the "interpolate" delimiter.
     * var compiled = _.template('hello ${ user }!');
     * compiled({ 'user': 'pebbles' });
     * // => 'hello pebbles!'
     *
     * // Use backslashes to treat delimiters as plain text.
     * var compiled = _.template('<%= "\\<%- value %\\>" %>');
     * compiled({ 'value': 'ignored' });
     * // => '<%- value %>'
     *
     * // Use the `imports` option to import `jQuery` as `jq`.
     * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
     * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
     * compiled({ 'users': ['fred', 'barney'] });
     * // => '<li>fred</li><li>barney</li>'
     *
     * // Use the `sourceURL` option to specify a custom sourceURL for the template.
     * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
     * compiled(data);
     * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
     *
     * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
     * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
     * compiled.source;
     * // => function(data) {
     * //   var __t, __p = '';
     * //   __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
     * //   return __p;
     * // }
     *
     * // Use custom template delimiters.
     * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
     * var compiled = _.template('hello {{ user }}!');
     * compiled({ 'user': 'mustache' });
     * // => 'hello mustache!'
     *
     * // Use the `source` property to inline compiled templates for meaningful
     * // line numbers in error messages and stack traces.
     * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
     *   var JST = {\
     *     "main": ' + _.template(mainText).source + '\
     *   };\
     * ');
     */
    function template(string, options, guard) {
      // Based on John Resig's `tmpl` implementation
      // (http://ejohn.org/blog/javascript-micro-templating/)
      // and Laura Doktorova's doT.js (https://github.com/olado/doT).
      var settings = lodash.templateSettings;

      if (guard && isIterateeCall(string, options, guard)) {
        options = undefined;
      }
      string = toString(string);
      options = assignWith({}, options, settings, customDefaultsAssignIn);

      var imports = assignWith({}, options.imports, settings.imports, customDefaultsAssignIn),
          importsKeys = keys(imports),
          importsValues = baseValues(imports, importsKeys);

      arrayEach(importsKeys, function(key) {
        if (reForbiddenIdentifierChars.test(key)) {
          throw new Error(INVALID_TEMPL_IMPORTS_ERROR_TEXT);
        }
      });

      var isEscaping,
          isEvaluating,
          index = 0,
          interpolate = options.interpolate || reNoMatch,
          source = "__p += '";

      // Compile the regexp to match each delimiter.
      var reDelimiters = RegExp(
        (options.escape || reNoMatch).source + '|' +
        interpolate.source + '|' +
        (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
        (options.evaluate || reNoMatch).source + '|$'
      , 'g');

      // Use a sourceURL for easier debugging.
      // The sourceURL gets injected into the source that's eval-ed, so be careful
      // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
      // and escape the comment, thus injecting code that gets evaled.
      var sourceURL = '//# sourceURL=' +
        (hasOwnProperty.call(options, 'sourceURL')
          ? (options.sourceURL + '').replace(/\s/g, ' ')
          : ('lodash.templateSources[' + (++templateCounter) + ']')
        ) + '\n';

      string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
        interpolateValue || (interpolateValue = esTemplateValue);

        // Escape characters that can't be included in string literals.
        source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);

        // Replace delimiters with snippets.
        if (escapeValue) {
          isEscaping = true;
          source += "' +\n__e(" + escapeValue + ") +\n'";
        }
        if (evaluateValue) {
          isEvaluating = true;
          source += "';\n" + evaluateValue + ";\n__p += '";
        }
        if (interpolateValue) {
          source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
        }
        index = offset + match.length;

        // The JS engine embedded in Adobe products needs `match` returned in
        // order to produce the correct `offset` value.
        return match;
      });

      source += "';\n";

      // If `variable` is not specified wrap a with-statement around the generated
      // code to add the data object to the top of the scope chain.
      var variable = hasOwnProperty.call(options, 'variable') && options.variable;
      if (!variable) {
        source = 'with (obj) {\n' + source + '\n}\n';
      }
      // Throw an error if a forbidden character was found in `variable`, to prevent
      // potential command injection attacks.
      else if (reForbiddenIdentifierChars.test(variable)) {
        throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
      }

      // Cleanup code by stripping empty strings.
      source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
        .replace(reEmptyStringMiddle, '$1')
        .replace(reEmptyStringTrailing, '$1;');

      // Frame code as the function body.
      source = 'function(' + (variable || 'obj') + ') {\n' +
        (variable
          ? ''
          : 'obj || (obj = {});\n'
        ) +
        "var __t, __p = ''" +
        (isEscaping
           ? ', __e = _.escape'
           : ''
        ) +
        (isEvaluating
          ? ', __j = Array.prototype.join;\n' +
            "function print() { __p += __j.call(arguments, '') }\n"
          : ';\n'
        ) +
        source +
        'return __p\n}';

      var result = attempt(function() {
        return Function(importsKeys, sourceURL + 'return ' + source)
          .apply(undefined, importsValues);
      });

      // Provide the compiled function's source by its `toString` method or
      // the `source` property as a convenience for inlining compiled templates.
      result.source = source;
      if (isError(result)) {
        throw result;
      }
      return result;
    }

    /**
     * Converts `string`, as a whole, to lower case just like
     * [String#toLowerCase](https://mdn.io/toLowerCase).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to convert.
     * @returns {string} Returns the lower cased string.
     * @example
     *
     * _.toLower('--Foo-Bar--');
     * // => '--foo-bar--'
     *
     * _.toLower('fooBar');
     * // => 'foobar'
     *
     * _.toLower('__FOO_BAR__');
     * // => '__foo_bar__'
     */
    function toLower(value) {
      return toString(value).toLowerCase();
    }

    /**
     * Converts `string`, as a whole, to upper case just like
     * [String#toUpperCase](https://mdn.io/toUpperCase).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to convert.
     * @returns {string} Returns the upper cased string.
     * @example
     *
     * _.toUpper('--foo-bar--');
     * // => '--FOO-BAR--'
     *
     * _.toUpper('fooBar');
     * // => 'FOOBAR'
     *
     * _.toUpper('__foo_bar__');
     * // => '__FOO_BAR__'
     */
    function toUpper(value) {
      return toString(value).toUpperCase();
    }

    /**
     * Removes leading and trailing whitespace or specified characters from `string`.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category String
     * @param {string} [string=''] The string to trim.
     * @param {string} [chars=whitespace] The characters to trim.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {string} Returns the trimmed string.
     * @example
     *
     * _.trim('  abc  ');
     * // => 'abc'
     *
     * _.trim('-_-abc-_-', '_-');
     * // => 'abc'
     *
     * _.map(['  foo  ', '  bar  '], _.trim);
     * // => ['foo', 'bar']
     */
    function trim(string, chars, guard) {
      string = toString(string);
      if (string && (guard || chars === undefined)) {
        return baseTrim(string);
      }
      if (!string || !(chars = baseToString(chars))) {
        return string;
      }
      var strSymbols = stringToArray(string),
          chrSymbols = stringToArray(chars),
          start = charsStartIndex(strSymbols, chrSymbols),
          end = charsEndIndex(strSymbols, chrSymbols) + 1;

      return castSlice(strSymbols, start, end).join('');
    }

    /**
     * Removes trailing whitespace or specified characters from `string`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to trim.
     * @param {string} [chars=whitespace] The characters to trim.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {string} Returns the trimmed string.
     * @example
     *
     * _.trimEnd('  abc  ');
     * // => '  abc'
     *
     * _.trimEnd('-_-abc-_-', '_-');
     * // => '-_-abc'
     */
    function trimEnd(string, chars, guard) {
      string = toString(string);
      if (string && (guard || chars === undefined)) {
        return string.slice(0, trimmedEndIndex(string) + 1);
      }
      if (!string || !(chars = baseToString(chars))) {
        return string;
      }
      var strSymbols = stringToArray(string),
          end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;

      return castSlice(strSymbols, 0, end).join('');
    }

    /**
     * Removes leading whitespace or specified characters from `string`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to trim.
     * @param {string} [chars=whitespace] The characters to trim.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {string} Returns the trimmed string.
     * @example
     *
     * _.trimStart('  abc  ');
     * // => 'abc  '
     *
     * _.trimStart('-_-abc-_-', '_-');
     * // => 'abc-_-'
     */
    function trimStart(string, chars, guard) {
      string = toString(string);
      if (string && (guard || chars === undefined)) {
        return string.replace(reTrimStart, '');
      }
      if (!string || !(chars = baseToString(chars))) {
        return string;
      }
      var strSymbols = stringToArray(string),
          start = charsStartIndex(strSymbols, stringToArray(chars));

      return castSlice(strSymbols, start).join('');
    }

    /**
     * Truncates `string` if it's longer than the given maximum string length.
     * The last characters of the truncated string are replaced with the omission
     * string which defaults to "...".
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to truncate.
     * @param {Object} [options={}] The options object.
     * @param {number} [options.length=30] The maximum string length.
     * @param {string} [options.omission='...'] The string to indicate text is omitted.
     * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
     * @returns {string} Returns the truncated string.
     * @example
     *
     * _.truncate('hi-diddly-ho there, neighborino');
     * // => 'hi-diddly-ho there, neighbo...'
     *
     * _.truncate('hi-diddly-ho there, neighborino', {
     *   'length': 24,
     *   'separator': ' '
     * });
     * // => 'hi-diddly-ho there,...'
     *
     * _.truncate('hi-diddly-ho there, neighborino', {
     *   'length': 24,
     *   'separator': /,? +/
     * });
     * // => 'hi-diddly-ho there...'
     *
     * _.truncate('hi-diddly-ho there, neighborino', {
     *   'omission': ' [...]'
     * });
     * // => 'hi-diddly-ho there, neig [...]'
     */
    function truncate(string, options) {
      var length = DEFAULT_TRUNC_LENGTH,
          omission = DEFAULT_TRUNC_OMISSION;

      if (isObject(options)) {
        var separator = 'separator' in options ? options.separator : separator;
        length = 'length' in options ? toInteger(options.length) : length;
        omission = 'omission' in options ? baseToString(options.omission) : omission;
      }
      string = toString(string);

      var strLength = string.length;
      if (hasUnicode(string)) {
        var strSymbols = stringToArray(string);
        strLength = strSymbols.length;
      }
      if (length >= strLength) {
        return string;
      }
      var end = length - stringSize(omission);
      if (end < 1) {
        return omission;
      }
      var result = strSymbols
        ? castSlice(strSymbols, 0, end).join('')
        : string.slice(0, end);

      if (separator === undefined) {
        return result + omission;
      }
      if (strSymbols) {
        end += (result.length - end);
      }
      if (isRegExp(separator)) {
        if (string.slice(end).search(separator)) {
          var match,
              substring = result;

          if (!separator.global) {
            separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
          }
          separator.lastIndex = 0;
          while ((match = separator.exec(substring))) {
            var newEnd = match.index;
          }
          result = result.slice(0, newEnd === undefined ? end : newEnd);
        }
      } else if (string.indexOf(baseToString(separator), end) != end) {
        var index = result.lastIndexOf(separator);
        if (index > -1) {
          result = result.slice(0, index);
        }
      }
      return result + omission;
    }

    /**
     * The inverse of `_.escape`; this method converts the HTML entities
     * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
     * their corresponding characters.
     *
     * **Note:** No other HTML entities are unescaped. To unescape additional
     * HTML entities use a third-party library like [_he_](https://mths.be/he).
     *
     * @static
     * @memberOf _
     * @since 0.6.0
     * @category String
     * @param {string} [string=''] The string to unescape.
     * @returns {string} Returns the unescaped string.
     * @example
     *
     * _.unescape('fred, barney, &amp; pebbles');
     * // => 'fred, barney, & pebbles'
     */
    function unescape(string) {
      string = toString(string);
      return (string && reHasEscapedHtml.test(string))
        ? string.replace(reEscapedHtml, unescapeHtmlChar)
        : string;
    }

    /**
     * Converts `string`, as space separated words, to upper case.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to convert.
     * @returns {string} Returns the upper cased string.
     * @example
     *
     * _.upperCase('--foo-bar');
     * // => 'FOO BAR'
     *
     * _.upperCase('fooBar');
     * // => 'FOO BAR'
     *
     * _.upperCase('__foo_bar__');
     * // => 'FOO BAR'
     */
    var upperCase = createCompounder(function(result, word, index) {
      return result + (index ? ' ' : '') + word.toUpperCase();
    });

    /**
     * Converts the first character of `string` to upper case.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to convert.
     * @returns {string} Returns the converted string.
     * @example
     *
     * _.upperFirst('fred');
     * // => 'Fred'
     *
     * _.upperFirst('FRED');
     * // => 'FRED'
     */
    var upperFirst = createCaseFirst('toUpperCase');

    /**
     * Splits `string` into an array of its words.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category String
     * @param {string} [string=''] The string to inspect.
     * @param {RegExp|string} [pattern] The pattern to match words.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {Array} Returns the words of `string`.
     * @example
     *
     * _.words('fred, barney, & pebbles');
     * // => ['fred', 'barney', 'pebbles']
     *
     * _.words('fred, barney, & pebbles', /[^, ]+/g);
     * // => ['fred', 'barney', '&', 'pebbles']
     */
    function words(string, pattern, guard) {
      string = toString(string);
      pattern = guard ? undefined : pattern;

      if (pattern === undefined) {
        return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
      }
      return string.match(pattern) || [];
    }

    /*------------------------------------------------------------------------*/

    /**
     * Attempts to invoke `func`, returning either the result or the caught error
     * object. Any additional arguments are provided to `func` when it's invoked.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Util
     * @param {Function} func The function to attempt.
     * @param {...*} [args] The arguments to invoke `func` with.
     * @returns {*} Returns the `func` result or error object.
     * @example
     *
     * // Avoid throwing errors for invalid selectors.
     * var elements = _.attempt(function(selector) {
     *   return document.querySelectorAll(selector);
     * }, '>_>');
     *
     * if (_.isError(elements)) {
     *   elements = [];
     * }
     */
    var attempt = baseRest(function(func, args) {
      try {
        return apply(func, undefined, args);
      } catch (e) {
        return isError(e) ? e : new Error(e);
      }
    });

    /**
     * Binds methods of an object to the object itself, overwriting the existing
     * method.
     *
     * **Note:** This method doesn't set the "length" property of bound functions.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Util
     * @param {Object} object The object to bind and assign the bound methods to.
     * @param {...(string|string[])} methodNames The object method names to bind.
     * @returns {Object} Returns `object`.
     * @example
     *
     * var view = {
     *   'label': 'docs',
     *   'click': function() {
     *     console.log('clicked ' + this.label);
     *   }
     * };
     *
     * _.bindAll(view, ['click']);
     * jQuery(element).on('click', view.click);
     * // => Logs 'clicked docs' when clicked.
     */
    var bindAll = flatRest(function(object, methodNames) {
      arrayEach(methodNames, function(key) {
        key = toKey(key);
        baseAssignValue(object, key, bind(object[key], object));
      });
      return object;
    });

    /**
     * Creates a function that iterates over `pairs` and invokes the corresponding
     * function of the first predicate to return truthy. The predicate-function
     * pairs are invoked with the `this` binding and arguments of the created
     * function.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Util
     * @param {Array} pairs The predicate-function pairs.
     * @returns {Function} Returns the new composite function.
     * @example
     *
     * var func = _.cond([
     *   [_.matches({ 'a': 1 }),           _.constant('matches A')],
     *   [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
     *   [_.stubTrue,                      _.constant('no match')]
     * ]);
     *
     * func({ 'a': 1, 'b': 2 });
     * // => 'matches A'
     *
     * func({ 'a': 0, 'b': 1 });
     * // => 'matches B'
     *
     * func({ 'a': '1', 'b': '2' });
     * // => 'no match'
     */
    function cond(pairs) {
      var length = pairs == null ? 0 : pairs.length,
          toIteratee = getIteratee();

      pairs = !length ? [] : arrayMap(pairs, function(pair) {
        if (typeof pair[1] != 'function') {
          throw new TypeError(FUNC_ERROR_TEXT);
        }
        return [toIteratee(pair[0]), pair[1]];
      });

      return baseRest(function(args) {
        var index = -1;
        while (++index < length) {
          var pair = pairs[index];
          if (apply(pair[0], this, args)) {
            return apply(pair[1], this, args);
          }
        }
      });
    }

    /**
     * Creates a function that invokes the predicate properties of `source` with
     * the corresponding property values of a given object, returning `true` if
     * all predicates return truthy, else `false`.
     *
     * **Note:** The created function is equivalent to `_.conformsTo` with
     * `source` partially applied.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Util
     * @param {Object} source The object of property predicates to conform to.
     * @returns {Function} Returns the new spec function.
     * @example
     *
     * var objects = [
     *   { 'a': 2, 'b': 1 },
     *   { 'a': 1, 'b': 2 }
     * ];
     *
     * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
     * // => [{ 'a': 1, 'b': 2 }]
     */
    function conforms(source) {
      return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
    }

    /**
     * Creates a function that returns `value`.
     *
     * @static
     * @memberOf _
     * @since 2.4.0
     * @category Util
     * @param {*} value The value to return from the new function.
     * @returns {Function} Returns the new constant function.
     * @example
     *
     * var objects = _.times(2, _.constant({ 'a': 1 }));
     *
     * console.log(objects);
     * // => [{ 'a': 1 }, { 'a': 1 }]
     *
     * console.log(objects[0] === objects[1]);
     * // => true
     */
    function constant(value) {
      return function() {
        return value;
      };
    }

    /**
     * Checks `value` to determine whether a default value should be returned in
     * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
     * or `undefined`.
     *
     * @static
     * @memberOf _
     * @since 4.14.0
     * @category Util
     * @param {*} value The value to check.
     * @param {*} defaultValue The default value.
     * @returns {*} Returns the resolved value.
     * @example
     *
     * _.defaultTo(1, 10);
     * // => 1
     *
     * _.defaultTo(undefined, 10);
     * // => 10
     */
    function defaultTo(value, defaultValue) {
      return (value == null || value !== value) ? defaultValue : value;
    }

    /**
     * Creates a function that returns the result of invoking the given functions
     * with the `this` binding of the created function, where each successive
     * invocation is supplied the return value of the previous.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Util
     * @param {...(Function|Function[])} [funcs] The functions to invoke.
     * @returns {Function} Returns the new composite function.
     * @see _.flowRight
     * @example
     *
     * function square(n) {
     *   return n * n;
     * }
     *
     * var addSquare = _.flow([_.add, square]);
     * addSquare(1, 2);
     * // => 9
     */
    var flow = createFlow();

    /**
     * This method is like `_.flow` except that it creates a function that
     * invokes the given functions from right to left.
     *
     * @static
     * @since 3.0.0
     * @memberOf _
     * @category Util
     * @param {...(Function|Function[])} [funcs] The functions to invoke.
     * @returns {Function} Returns the new composite function.
     * @see _.flow
     * @example
     *
     * function square(n) {
     *   return n * n;
     * }
     *
     * var addSquare = _.flowRight([square, _.add]);
     * addSquare(1, 2);
     * // => 9
     */
    var flowRight = createFlow(true);

    /**
     * This method returns the first argument it receives.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Util
     * @param {*} value Any value.
     * @returns {*} Returns `value`.
     * @example
     *
     * var object = { 'a': 1 };
     *
     * console.log(_.identity(object) === object);
     * // => true
     */
    function identity(value) {
      return value;
    }

    /**
     * Creates a function that invokes `func` with the arguments of the created
     * function. If `func` is a property name, the created function returns the
     * property value for a given element. If `func` is an array or object, the
     * created function returns `true` for elements that contain the equivalent
     * source properties, otherwise it returns `false`.
     *
     * @static
     * @since 4.0.0
     * @memberOf _
     * @category Util
     * @param {*} [func=_.identity] The value to convert to a callback.
     * @returns {Function} Returns the callback.
     * @example
     *
     * var users = [
     *   { 'user': 'barney', 'age': 36, 'active': true },
     *   { 'user': 'fred',   'age': 40, 'active': false }
     * ];
     *
     * // The `_.matches` iteratee shorthand.
     * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
     * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.filter(users, _.iteratee(['user', 'fred']));
     * // => [{ 'user': 'fred', 'age': 40 }]
     *
     * // The `_.property` iteratee shorthand.
     * _.map(users, _.iteratee('user'));
     * // => ['barney', 'fred']
     *
     * // Create custom iteratee shorthands.
     * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
     *   return !_.isRegExp(func) ? iteratee(func) : function(string) {
     *     return func.test(string);
     *   };
     * });
     *
     * _.filter(['abc', 'def'], /ef/);
     * // => ['def']
     */
    function iteratee(func) {
      return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
    }

    /**
     * Creates a function that performs a partial deep comparison between a given
     * object and `source`, returning `true` if the given object has equivalent
     * property values, else `false`.
     *
     * **Note:** The created function is equivalent to `_.isMatch` with `source`
     * partially applied.
     *
     * Partial comparisons will match empty array and empty object `source`
     * values against any array or object value, respectively. See `_.isEqual`
     * for a list of supported value comparisons.
     *
     * **Note:** Multiple values can be checked by combining several matchers
     * using `_.overSome`
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Util
     * @param {Object} source The object of property values to match.
     * @returns {Function} Returns the new spec function.
     * @example
     *
     * var objects = [
     *   { 'a': 1, 'b': 2, 'c': 3 },
     *   { 'a': 4, 'b': 5, 'c': 6 }
     * ];
     *
     * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
     * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
     *
     * // Checking for several possible values
     * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
     */
    function matches(source) {
      return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
    }

    /**
     * Creates a function that performs a partial deep comparison between the
     * value at `path` of a given object to `srcValue`, returning `true` if the
     * object value is equivalent, else `false`.
     *
     * **Note:** Partial comparisons will match empty array and empty object
     * `srcValue` values against any array or object value, respectively. See
     * `_.isEqual` for a list of supported value comparisons.
     *
     * **Note:** Multiple values can be checked by combining several matchers
     * using `_.overSome`
     *
     * @static
     * @memberOf _
     * @since 3.2.0
     * @category Util
     * @param {Array|string} path The path of the property to get.
     * @param {*} srcValue The value to match.
     * @returns {Function} Returns the new spec function.
     * @example
     *
     * var objects = [
     *   { 'a': 1, 'b': 2, 'c': 3 },
     *   { 'a': 4, 'b': 5, 'c': 6 }
     * ];
     *
     * _.find(objects, _.matchesProperty('a', 4));
     * // => { 'a': 4, 'b': 5, 'c': 6 }
     *
     * // Checking for several possible values
     * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
     */
    function matchesProperty(path, srcValue) {
      return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
    }

    /**
     * Creates a function that invokes the method at `path` of a given object.
     * Any additional arguments are provided to the invoked method.
     *
     * @static
     * @memberOf _
     * @since 3.7.0
     * @category Util
     * @param {Array|string} path The path of the method to invoke.
     * @param {...*} [args] The arguments to invoke the method with.
     * @returns {Function} Returns the new invoker function.
     * @example
     *
     * var objects = [
     *   { 'a': { 'b': _.constant(2) } },
     *   { 'a': { 'b': _.constant(1) } }
     * ];
     *
     * _.map(objects, _.method('a.b'));
     * // => [2, 1]
     *
     * _.map(objects, _.method(['a', 'b']));
     * // => [2, 1]
     */
    var method = baseRest(function(path, args) {
      return function(object) {
        return baseInvoke(object, path, args);
      };
    });

    /**
     * The opposite of `_.method`; this method creates a function that invokes
     * the method at a given path of `object`. Any additional arguments are
     * provided to the invoked method.
     *
     * @static
     * @memberOf _
     * @since 3.7.0
     * @category Util
     * @param {Object} object The object to query.
     * @param {...*} [args] The arguments to invoke the method with.
     * @returns {Function} Returns the new invoker function.
     * @example
     *
     * var array = _.times(3, _.constant),
     *     object = { 'a': array, 'b': array, 'c': array };
     *
     * _.map(['a[2]', 'c[0]'], _.methodOf(object));
     * // => [2, 0]
     *
     * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
     * // => [2, 0]
     */
    var methodOf = baseRest(function(object, args) {
      return function(path) {
        return baseInvoke(object, path, args);
      };
    });

    /**
     * Adds all own enumerable string keyed function properties of a source
     * object to the destination object. If `object` is a function, then methods
     * are added to its prototype as well.
     *
     * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
     * avoid conflicts caused by modifying the original.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Util
     * @param {Function|Object} [object=lodash] The destination object.
     * @param {Object} source The object of functions to add.
     * @param {Object} [options={}] The options object.
     * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
     * @returns {Function|Object} Returns `object`.
     * @example
     *
     * function vowels(string) {
     *   return _.filter(string, function(v) {
     *     return /[aeiou]/i.test(v);
     *   });
     * }
     *
     * _.mixin({ 'vowels': vowels });
     * _.vowels('fred');
     * // => ['e']
     *
     * _('fred').vowels().value();
     * // => ['e']
     *
     * _.mixin({ 'vowels': vowels }, { 'chain': false });
     * _('fred').vowels();
     * // => ['e']
     */
    function mixin(object, source, options) {
      var props = keys(source),
          methodNames = baseFunctions(source, props);

      if (options == null &&
          !(isObject(source) && (methodNames.length || !props.length))) {
        options = source;
        source = object;
        object = this;
        methodNames = baseFunctions(source, keys(source));
      }
      var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
          isFunc = isFunction(object);

      arrayEach(methodNames, function(methodName) {
        var func = source[methodName];
        object[methodName] = func;
        if (isFunc) {
          object.prototype[methodName] = function() {
            var chainAll = this.__chain__;
            if (chain || chainAll) {
              var result = object(this.__wrapped__),
                  actions = result.__actions__ = copyArray(this.__actions__);

              actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
              result.__chain__ = chainAll;
              return result;
            }
            return func.apply(object, arrayPush([this.value()], arguments));
          };
        }
      });

      return object;
    }

    /**
     * Reverts the `_` variable to its previous value and returns a reference to
     * the `lodash` function.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Util
     * @returns {Function} Returns the `lodash` function.
     * @example
     *
     * var lodash = _.noConflict();
     */
    function noConflict() {
      if (root._ === this) {
        root._ = oldDash;
      }
      return this;
    }

    /**
     * This method returns `undefined`.
     *
     * @static
     * @memberOf _
     * @since 2.3.0
     * @category Util
     * @example
     *
     * _.times(2, _.noop);
     * // => [undefined, undefined]
     */
    function noop() {
      // No operation performed.
    }

    /**
     * Creates a function that gets the argument at index `n`. If `n` is negative,
     * the nth argument from the end is returned.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Util
     * @param {number} [n=0] The index of the argument to return.
     * @returns {Function} Returns the new pass-thru function.
     * @example
     *
     * var func = _.nthArg(1);
     * func('a', 'b', 'c', 'd');
     * // => 'b'
     *
     * var func = _.nthArg(-2);
     * func('a', 'b', 'c', 'd');
     * // => 'c'
     */
    function nthArg(n) {
      n = toInteger(n);
      return baseRest(function(args) {
        return baseNth(args, n);
      });
    }

    /**
     * Creates a function that invokes `iteratees` with the arguments it receives
     * and returns their results.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Util
     * @param {...(Function|Function[])} [iteratees=[_.identity]]
     *  The iteratees to invoke.
     * @returns {Function} Returns the new function.
     * @example
     *
     * var func = _.over([Math.max, Math.min]);
     *
     * func(1, 2, 3, 4);
     * // => [4, 1]
     */
    var over = createOver(arrayMap);

    /**
     * Creates a function that checks if **all** of the `predicates` return
     * truthy when invoked with the arguments it receives.
     *
     * Following shorthands are possible for providing predicates.
     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Util
     * @param {...(Function|Function[])} [predicates=[_.identity]]
     *  The predicates to check.
     * @returns {Function} Returns the new function.
     * @example
     *
     * var func = _.overEvery([Boolean, isFinite]);
     *
     * func('1');
     * // => true
     *
     * func(null);
     * // => false
     *
     * func(NaN);
     * // => false
     */
    var overEvery = createOver(arrayEvery);

    /**
     * Creates a function that checks if **any** of the `predicates` return
     * truthy when invoked with the arguments it receives.
     *
     * Following shorthands are possible for providing predicates.
     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Util
     * @param {...(Function|Function[])} [predicates=[_.identity]]
     *  The predicates to check.
     * @returns {Function} Returns the new function.
     * @example
     *
     * var func = _.overSome([Boolean, isFinite]);
     *
     * func('1');
     * // => true
     *
     * func(null);
     * // => true
     *
     * func(NaN);
     * // => false
     *
     * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
     * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
     */
    var overSome = createOver(arraySome);

    /**
     * Creates a function that returns the value at `path` of a given object.
     *
     * @static
     * @memberOf _
     * @since 2.4.0
     * @category Util
     * @param {Array|string} path The path of the property to get.
     * @returns {Function} Returns the new accessor function.
     * @example
     *
     * var objects = [
     *   { 'a': { 'b': 2 } },
     *   { 'a': { 'b': 1 } }
     * ];
     *
     * _.map(objects, _.property('a.b'));
     * // => [2, 1]
     *
     * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
     * // => [1, 2]
     */
    function property(path) {
      return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
    }

    /**
     * The opposite of `_.property`; this method creates a function that returns
     * the value at a given path of `object`.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Util
     * @param {Object} object The object to query.
     * @returns {Function} Returns the new accessor function.
     * @example
     *
     * var array = [0, 1, 2],
     *     object = { 'a': array, 'b': array, 'c': array };
     *
     * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
     * // => [2, 0]
     *
     * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
     * // => [2, 0]
     */
    function propertyOf(object) {
      return function(path) {
        return object == null ? undefined : baseGet(object, path);
      };
    }

    /**
     * Creates an array of numbers (positive and/or negative) progressing from
     * `start` up to, but not including, `end`. A step of `-1` is used if a negative
     * `start` is specified without an `end` or `step`. If `end` is not specified,
     * it's set to `start` with `start` then set to `0`.
     *
     * **Note:** JavaScript follows the IEEE-754 standard for resolving
     * floating-point values which can produce unexpected results.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Util
     * @param {number} [start=0] The start of the range.
     * @param {number} end The end of the range.
     * @param {number} [step=1] The value to increment or decrement by.
     * @returns {Array} Returns the range of numbers.
     * @see _.inRange, _.rangeRight
     * @example
     *
     * _.range(4);
     * // => [0, 1, 2, 3]
     *
     * _.range(-4);
     * // => [0, -1, -2, -3]
     *
     * _.range(1, 5);
     * // => [1, 2, 3, 4]
     *
     * _.range(0, 20, 5);
     * // => [0, 5, 10, 15]
     *
     * _.range(0, -4, -1);
     * // => [0, -1, -2, -3]
     *
     * _.range(1, 4, 0);
     * // => [1, 1, 1]
     *
     * _.range(0);
     * // => []
     */
    var range = createRange();

    /**
     * This method is like `_.range` except that it populates values in
     * descending order.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Util
     * @param {number} [start=0] The start of the range.
     * @param {number} end The end of the range.
     * @param {number} [step=1] The value to increment or decrement by.
     * @returns {Array} Returns the range of numbers.
     * @see _.inRange, _.range
     * @example
     *
     * _.rangeRight(4);
     * // => [3, 2, 1, 0]
     *
     * _.rangeRight(-4);
     * // => [-3, -2, -1, 0]
     *
     * _.rangeRight(1, 5);
     * // => [4, 3, 2, 1]
     *
     * _.rangeRight(0, 20, 5);
     * // => [15, 10, 5, 0]
     *
     * _.rangeRight(0, -4, -1);
     * // => [-3, -2, -1, 0]
     *
     * _.rangeRight(1, 4, 0);
     * // => [1, 1, 1]
     *
     * _.rangeRight(0);
     * // => []
     */
    var rangeRight = createRange(true);

    /**
     * This method returns a new empty array.
     *
     * @static
     * @memberOf _
     * @since 4.13.0
     * @category Util
     * @returns {Array} Returns the new empty array.
     * @example
     *
     * var arrays = _.times(2, _.stubArray);
     *
     * console.log(arrays);
     * // => [[], []]
     *
     * console.log(arrays[0] === arrays[1]);
     * // => false
     */
    function stubArray() {
      return [];
    }

    /**
     * This method returns `false`.
     *
     * @static
     * @memberOf _
     * @since 4.13.0
     * @category Util
     * @returns {boolean} Returns `false`.
     * @example
     *
     * _.times(2, _.stubFalse);
     * // => [false, false]
     */
    function stubFalse() {
      return false;
    }

    /**
     * This method returns a new empty object.
     *
     * @static
     * @memberOf _
     * @since 4.13.0
     * @category Util
     * @returns {Object} Returns the new empty object.
     * @example
     *
     * var objects = _.times(2, _.stubObject);
     *
     * console.log(objects);
     * // => [{}, {}]
     *
     * console.log(objects[0] === objects[1]);
     * // => false
     */
    function stubObject() {
      return {};
    }

    /**
     * This method returns an empty string.
     *
     * @static
     * @memberOf _
     * @since 4.13.0
     * @category Util
     * @returns {string} Returns the empty string.
     * @example
     *
     * _.times(2, _.stubString);
     * // => ['', '']
     */
    function stubString() {
      return '';
    }

    /**
     * This method returns `true`.
     *
     * @static
     * @memberOf _
     * @since 4.13.0
     * @category Util
     * @returns {boolean} Returns `true`.
     * @example
     *
     * _.times(2, _.stubTrue);
     * // => [true, true]
     */
    function stubTrue() {
      return true;
    }

    /**
     * Invokes the iteratee `n` times, returning an array of the results of
     * each invocation. The iteratee is invoked with one argument; (index).
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Util
     * @param {number} n The number of times to invoke `iteratee`.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @returns {Array} Returns the array of results.
     * @example
     *
     * _.times(3, String);
     * // => ['0', '1', '2']
     *
     *  _.times(4, _.constant(0));
     * // => [0, 0, 0, 0]
     */
    function times(n, iteratee) {
      n = toInteger(n);
      if (n < 1 || n > MAX_SAFE_INTEGER) {
        return [];
      }
      var index = MAX_ARRAY_LENGTH,
          length = nativeMin(n, MAX_ARRAY_LENGTH);

      iteratee = getIteratee(iteratee);
      n -= MAX_ARRAY_LENGTH;

      var result = baseTimes(length, iteratee);
      while (++index < n) {
        iteratee(index);
      }
      return result;
    }

    /**
     * Converts `value` to a property path array.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Util
     * @param {*} value The value to convert.
     * @returns {Array} Returns the new property path array.
     * @example
     *
     * _.toPath('a.b.c');
     * // => ['a', 'b', 'c']
     *
     * _.toPath('a[0].b.c');
     * // => ['a', '0', 'b', 'c']
     */
    function toPath(value) {
      if (isArray(value)) {
        return arrayMap(value, toKey);
      }
      return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
    }

    /**
     * Generates a unique ID. If `prefix` is given, the ID is appended to it.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Util
     * @param {string} [prefix=''] The value to prefix the ID with.
     * @returns {string} Returns the unique ID.
     * @example
     *
     * _.uniqueId('contact_');
     * // => 'contact_104'
     *
     * _.uniqueId();
     * // => '105'
     */
    function uniqueId(prefix) {
      var id = ++idCounter;
      return toString(prefix) + id;
    }

    /*------------------------------------------------------------------------*/

    /**
     * Adds two numbers.
     *
     * @static
     * @memberOf _
     * @since 3.4.0
     * @category Math
     * @param {number} augend The first number in an addition.
     * @param {number} addend The second number in an addition.
     * @returns {number} Returns the total.
     * @example
     *
     * _.add(6, 4);
     * // => 10
     */
    var add = createMathOperation(function(augend, addend) {
      return augend + addend;
    }, 0);

    /**
     * Computes `number` rounded up to `precision`.
     *
     * @static
     * @memberOf _
     * @since 3.10.0
     * @category Math
     * @param {number} number The number to round up.
     * @param {number} [precision=0] The precision to round up to.
     * @returns {number} Returns the rounded up number.
     * @example
     *
     * _.ceil(4.006);
     * // => 5
     *
     * _.ceil(6.004, 2);
     * // => 6.01
     *
     * _.ceil(6040, -2);
     * // => 6100
     */
    var ceil = createRound('ceil');

    /**
     * Divide two numbers.
     *
     * @static
     * @memberOf _
     * @since 4.7.0
     * @category Math
     * @param {number} dividend The first number in a division.
     * @param {number} divisor The second number in a division.
     * @returns {number} Returns the quotient.
     * @example
     *
     * _.divide(6, 4);
     * // => 1.5
     */
    var divide = createMathOperation(function(dividend, divisor) {
      return dividend / divisor;
    }, 1);

    /**
     * Computes `number` rounded down to `precision`.
     *
     * @static
     * @memberOf _
     * @since 3.10.0
     * @category Math
     * @param {number} number The number to round down.
     * @param {number} [precision=0] The precision to round down to.
     * @returns {number} Returns the rounded down number.
     * @example
     *
     * _.floor(4.006);
     * // => 4
     *
     * _.floor(0.046, 2);
     * // => 0.04
     *
     * _.floor(4060, -2);
     * // => 4000
     */
    var floor = createRound('floor');

    /**
     * Computes the maximum value of `array`. If `array` is empty or falsey,
     * `undefined` is returned.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Math
     * @param {Array} array The array to iterate over.
     * @returns {*} Returns the maximum value.
     * @example
     *
     * _.max([4, 2, 8, 6]);
     * // => 8
     *
     * _.max([]);
     * // => undefined
     */
    function max(array) {
      return (array && array.length)
        ? baseExtremum(array, identity, baseGt)
        : undefined;
    }

    /**
     * This method is like `_.max` except that it accepts `iteratee` which is
     * invoked for each element in `array` to generate the criterion by which
     * the value is ranked. The iteratee is invoked with one argument: (value).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Math
     * @param {Array} array The array to iterate over.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {*} Returns the maximum value.
     * @example
     *
     * var objects = [{ 'n': 1 }, { 'n': 2 }];
     *
     * _.maxBy(objects, function(o) { return o.n; });
     * // => { 'n': 2 }
     *
     * // The `_.property` iteratee shorthand.
     * _.maxBy(objects, 'n');
     * // => { 'n': 2 }
     */
    function maxBy(array, iteratee) {
      return (array && array.length)
        ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
        : undefined;
    }

    /**
     * Computes the mean of the values in `array`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Math
     * @param {Array} array The array to iterate over.
     * @returns {number} Returns the mean.
     * @example
     *
     * _.mean([4, 2, 8, 6]);
     * // => 5
     */
    function mean(array) {
      return baseMean(array, identity);
    }

    /**
     * This method is like `_.mean` except that it accepts `iteratee` which is
     * invoked for each element in `array` to generate the value to be averaged.
     * The iteratee is invoked with one argument: (value).
     *
     * @static
     * @memberOf _
     * @since 4.7.0
     * @category Math
     * @param {Array} array The array to iterate over.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {number} Returns the mean.
     * @example
     *
     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
     *
     * _.meanBy(objects, function(o) { return o.n; });
     * // => 5
     *
     * // The `_.property` iteratee shorthand.
     * _.meanBy(objects, 'n');
     * // => 5
     */
    function meanBy(array, iteratee) {
      return baseMean(array, getIteratee(iteratee, 2));
    }

    /**
     * Computes the minimum value of `array`. If `array` is empty or falsey,
     * `undefined` is returned.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Math
     * @param {Array} array The array to iterate over.
     * @returns {*} Returns the minimum value.
     * @example
     *
     * _.min([4, 2, 8, 6]);
     * // => 2
     *
     * _.min([]);
     * // => undefined
     */
    function min(array) {
      return (array && array.length)
        ? baseExtremum(array, identity, baseLt)
        : undefined;
    }

    /**
     * This method is like `_.min` except that it accepts `iteratee` which is
     * invoked for each element in `array` to generate the criterion by which
     * the value is ranked. The iteratee is invoked with one argument: (value).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Math
     * @param {Array} array The array to iterate over.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {*} Returns the minimum value.
     * @example
     *
     * var objects = [{ 'n': 1 }, { 'n': 2 }];
     *
     * _.minBy(objects, function(o) { return o.n; });
     * // => { 'n': 1 }
     *
     * // The `_.property` iteratee shorthand.
     * _.minBy(objects, 'n');
     * // => { 'n': 1 }
     */
    function minBy(array, iteratee) {
      return (array && array.length)
        ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
        : undefined;
    }

    /**
     * Multiply two numbers.
     *
     * @static
     * @memberOf _
     * @since 4.7.0
     * @category Math
     * @param {number} multiplier The first number in a multiplication.
     * @param {number} multiplicand The second number in a multiplication.
     * @returns {number} Returns the product.
     * @example
     *
     * _.multiply(6, 4);
     * // => 24
     */
    var multiply = createMathOperation(function(multiplier, multiplicand) {
      return multiplier * multiplicand;
    }, 1);

    /**
     * Computes `number` rounded to `precision`.
     *
     * @static
     * @memberOf _
     * @since 3.10.0
     * @category Math
     * @param {number} number The number to round.
     * @param {number} [precision=0] The precision to round to.
     * @returns {number} Returns the rounded number.
     * @example
     *
     * _.round(4.006);
     * // => 4
     *
     * _.round(4.006, 2);
     * // => 4.01
     *
     * _.round(4060, -2);
     * // => 4100
     */
    var round = createRound('round');

    /**
     * Subtract two numbers.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Math
     * @param {number} minuend The first number in a subtraction.
     * @param {number} subtrahend The second number in a subtraction.
     * @returns {number} Returns the difference.
     * @example
     *
     * _.subtract(6, 4);
     * // => 2
     */
    var subtract = createMathOperation(function(minuend, subtrahend) {
      return minuend - subtrahend;
    }, 0);

    /**
     * Computes the sum of the values in `array`.
     *
     * @static
     * @memberOf _
     * @since 3.4.0
     * @category Math
     * @param {Array} array The array to iterate over.
     * @returns {number} Returns the sum.
     * @example
     *
     * _.sum([4, 2, 8, 6]);
     * // => 20
     */
    function sum(array) {
      return (array && array.length)
        ? baseSum(array, identity)
        : 0;
    }

    /**
     * This method is like `_.sum` except that it accepts `iteratee` which is
     * invoked for each element in `array` to generate the value to be summed.
     * The iteratee is invoked with one argument: (value).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Math
     * @param {Array} array The array to iterate over.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {number} Returns the sum.
     * @example
     *
     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
     *
     * _.sumBy(objects, function(o) { return o.n; });
     * // => 20
     *
     * // The `_.property` iteratee shorthand.
     * _.sumBy(objects, 'n');
     * // => 20
     */
    function sumBy(array, iteratee) {
      return (array && array.length)
        ? baseSum(array, getIteratee(iteratee, 2))
        : 0;
    }

    /*------------------------------------------------------------------------*/

    // Add methods that return wrapped values in chain sequences.
    lodash.after = after;
    lodash.ary = ary;
    lodash.assign = assign;
    lodash.assignIn = assignIn;
    lodash.assignInWith = assignInWith;
    lodash.assignWith = assignWith;
    lodash.at = at;
    lodash.before = before;
    lodash.bind = bind;
    lodash.bindAll = bindAll;
    lodash.bindKey = bindKey;
    lodash.castArray = castArray;
    lodash.chain = chain;
    lodash.chunk = chunk;
    lodash.compact = compact;
    lodash.concat = concat;
    lodash.cond = cond;
    lodash.conforms = conforms;
    lodash.constant = constant;
    lodash.countBy = countBy;
    lodash.create = create;
    lodash.curry = curry;
    lodash.curryRight = curryRight;
    lodash.debounce = debounce;
    lodash.defaults = defaults;
    lodash.defaultsDeep = defaultsDeep;
    lodash.defer = defer;
    lodash.delay = delay;
    lodash.difference = difference;
    lodash.differenceBy = differenceBy;
    lodash.differenceWith = differenceWith;
    lodash.drop = drop;
    lodash.dropRight = dropRight;
    lodash.dropRightWhile = dropRightWhile;
    lodash.dropWhile = dropWhile;
    lodash.fill = fill;
    lodash.filter = filter;
    lodash.flatMap = flatMap;
    lodash.flatMapDeep = flatMapDeep;
    lodash.flatMapDepth = flatMapDepth;
    lodash.flatten = flatten;
    lodash.flattenDeep = flattenDeep;
    lodash.flattenDepth = flattenDepth;
    lodash.flip = flip;
    lodash.flow = flow;
    lodash.flowRight = flowRight;
    lodash.fromPairs = fromPairs;
    lodash.functions = functions;
    lodash.functionsIn = functionsIn;
    lodash.groupBy = groupBy;
    lodash.initial = initial;
    lodash.intersection = intersection;
    lodash.intersectionBy = intersectionBy;
    lodash.intersectionWith = intersectionWith;
    lodash.invert = invert;
    lodash.invertBy = invertBy;
    lodash.invokeMap = invokeMap;
    lodash.iteratee = iteratee;
    lodash.keyBy = keyBy;
    lodash.keys = keys;
    lodash.keysIn = keysIn;
    lodash.map = map;
    lodash.mapKeys = mapKeys;
    lodash.mapValues = mapValues;
    lodash.matches = matches;
    lodash.matchesProperty = matchesProperty;
    lodash.memoize = memoize;
    lodash.merge = merge;
    lodash.mergeWith = mergeWith;
    lodash.method = method;
    lodash.methodOf = methodOf;
    lodash.mixin = mixin;
    lodash.negate = negate;
    lodash.nthArg = nthArg;
    lodash.omit = omit;
    lodash.omitBy = omitBy;
    lodash.once = once;
    lodash.orderBy = orderBy;
    lodash.over = over;
    lodash.overArgs = overArgs;
    lodash.overEvery = overEvery;
    lodash.overSome = overSome;
    lodash.partial = partial;
    lodash.partialRight = partialRight;
    lodash.partition = partition;
    lodash.pick = pick;
    lodash.pickBy = pickBy;
    lodash.property = property;
    lodash.propertyOf = propertyOf;
    lodash.pull = pull;
    lodash.pullAll = pullAll;
    lodash.pullAllBy = pullAllBy;
    lodash.pullAllWith = pullAllWith;
    lodash.pullAt = pullAt;
    lodash.range = range;
    lodash.rangeRight = rangeRight;
    lodash.rearg = rearg;
    lodash.reject = reject;
    lodash.remove = remove;
    lodash.rest = rest;
    lodash.reverse = reverse;
    lodash.sampleSize = sampleSize;
    lodash.set = set;
    lodash.setWith = setWith;
    lodash.shuffle = shuffle;
    lodash.slice = slice;
    lodash.sortBy = sortBy;
    lodash.sortedUniq = sortedUniq;
    lodash.sortedUniqBy = sortedUniqBy;
    lodash.split = split;
    lodash.spread = spread;
    lodash.tail = tail;
    lodash.take = take;
    lodash.takeRight = takeRight;
    lodash.takeRightWhile = takeRightWhile;
    lodash.takeWhile = takeWhile;
    lodash.tap = tap;
    lodash.throttle = throttle;
    lodash.thru = thru;
    lodash.toArray = toArray;
    lodash.toPairs = toPairs;
    lodash.toPairsIn = toPairsIn;
    lodash.toPath = toPath;
    lodash.toPlainObject = toPlainObject;
    lodash.transform = transform;
    lodash.unary = unary;
    lodash.union = union;
    lodash.unionBy = unionBy;
    lodash.unionWith = unionWith;
    lodash.uniq = uniq;
    lodash.uniqBy = uniqBy;
    lodash.uniqWith = uniqWith;
    lodash.unset = unset;
    lodash.unzip = unzip;
    lodash.unzipWith = unzipWith;
    lodash.update = update;
    lodash.updateWith = updateWith;
    lodash.values = values;
    lodash.valuesIn = valuesIn;
    lodash.without = without;
    lodash.words = words;
    lodash.wrap = wrap;
    lodash.xor = xor;
    lodash.xorBy = xorBy;
    lodash.xorWith = xorWith;
    lodash.zip = zip;
    lodash.zipObject = zipObject;
    lodash.zipObjectDeep = zipObjectDeep;
    lodash.zipWith = zipWith;

    // Add aliases.
    lodash.entries = toPairs;
    lodash.entriesIn = toPairsIn;
    lodash.extend = assignIn;
    lodash.extendWith = assignInWith;

    // Add methods to `lodash.prototype`.
    mixin(lodash, lodash);

    /*------------------------------------------------------------------------*/

    // Add methods that return unwrapped values in chain sequences.
    lodash.add = add;
    lodash.attempt = attempt;
    lodash.camelCase = camelCase;
    lodash.capitalize = capitalize;
    lodash.ceil = ceil;
    lodash.clamp = clamp;
    lodash.clone = clone;
    lodash.cloneDeep = cloneDeep;
    lodash.cloneDeepWith = cloneDeepWith;
    lodash.cloneWith = cloneWith;
    lodash.conformsTo = conformsTo;
    lodash.deburr = deburr;
    lodash.defaultTo = defaultTo;
    lodash.divide = divide;
    lodash.endsWith = endsWith;
    lodash.eq = eq;
    lodash.escape = escape;
    lodash.escapeRegExp = escapeRegExp;
    lodash.every = every;
    lodash.find = find;
    lodash.findIndex = findIndex;
    lodash.findKey = findKey;
    lodash.findLast = findLast;
    lodash.findLastIndex = findLastIndex;
    lodash.findLastKey = findLastKey;
    lodash.floor = floor;
    lodash.forEach = forEach;
    lodash.forEachRight = forEachRight;
    lodash.forIn = forIn;
    lodash.forInRight = forInRight;
    lodash.forOwn = forOwn;
    lodash.forOwnRight = forOwnRight;
    lodash.get = get;
    lodash.gt = gt;
    lodash.gte = gte;
    lodash.has = has;
    lodash.hasIn = hasIn;
    lodash.head = head;
    lodash.identity = identity;
    lodash.includes = includes;
    lodash.indexOf = indexOf;
    lodash.inRange = inRange;
    lodash.invoke = invoke;
    lodash.isArguments = isArguments;
    lodash.isArray = isArray;
    lodash.isArrayBuffer = isArrayBuffer;
    lodash.isArrayLike = isArrayLike;
    lodash.isArrayLikeObject = isArrayLikeObject;
    lodash.isBoolean = isBoolean;
    lodash.isBuffer = isBuffer;
    lodash.isDate = isDate;
    lodash.isElement = isElement;
    lodash.isEmpty = isEmpty;
    lodash.isEqual = isEqual;
    lodash.isEqualWith = isEqualWith;
    lodash.isError = isError;
    lodash.isFinite = isFinite;
    lodash.isFunction = isFunction;
    lodash.isInteger = isInteger;
    lodash.isLength = isLength;
    lodash.isMap = isMap;
    lodash.isMatch = isMatch;
    lodash.isMatchWith = isMatchWith;
    lodash.isNaN = isNaN;
    lodash.isNative = isNative;
    lodash.isNil = isNil;
    lodash.isNull = isNull;
    lodash.isNumber = isNumber;
    lodash.isObject = isObject;
    lodash.isObjectLike = isObjectLike;
    lodash.isPlainObject = isPlainObject;
    lodash.isRegExp = isRegExp;
    lodash.isSafeInteger = isSafeInteger;
    lodash.isSet = isSet;
    lodash.isString = isString;
    lodash.isSymbol = isSymbol;
    lodash.isTypedArray = isTypedArray;
    lodash.isUndefined = isUndefined;
    lodash.isWeakMap = isWeakMap;
    lodash.isWeakSet = isWeakSet;
    lodash.join = join;
    lodash.kebabCase = kebabCase;
    lodash.last = last;
    lodash.lastIndexOf = lastIndexOf;
    lodash.lowerCase = lowerCase;
    lodash.lowerFirst = lowerFirst;
    lodash.lt = lt;
    lodash.lte = lte;
    lodash.max = max;
    lodash.maxBy = maxBy;
    lodash.mean = mean;
    lodash.meanBy = meanBy;
    lodash.min = min;
    lodash.minBy = minBy;
    lodash.stubArray = stubArray;
    lodash.stubFalse = stubFalse;
    lodash.stubObject = stubObject;
    lodash.stubString = stubString;
    lodash.stubTrue = stubTrue;
    lodash.multiply = multiply;
    lodash.nth = nth;
    lodash.noConflict = noConflict;
    lodash.noop = noop;
    lodash.now = now;
    lodash.pad = pad;
    lodash.padEnd = padEnd;
    lodash.padStart = padStart;
    lodash.parseInt = parseInt;
    lodash.random = random;
    lodash.reduce = reduce;
    lodash.reduceRight = reduceRight;
    lodash.repeat = repeat;
    lodash.replace = replace;
    lodash.result = result;
    lodash.round = round;
    lodash.runInContext = runInContext;
    lodash.sample = sample;
    lodash.size = size;
    lodash.snakeCase = snakeCase;
    lodash.some = some;
    lodash.sortedIndex = sortedIndex;
    lodash.sortedIndexBy = sortedIndexBy;
    lodash.sortedIndexOf = sortedIndexOf;
    lodash.sortedLastIndex = sortedLastIndex;
    lodash.sortedLastIndexBy = sortedLastIndexBy;
    lodash.sortedLastIndexOf = sortedLastIndexOf;
    lodash.startCase = startCase;
    lodash.startsWith = startsWith;
    lodash.subtract = subtract;
    lodash.sum = sum;
    lodash.sumBy = sumBy;
    lodash.template = template;
    lodash.times = times;
    lodash.toFinite = toFinite;
    lodash.toInteger = toInteger;
    lodash.toLength = toLength;
    lodash.toLower = toLower;
    lodash.toNumber = toNumber;
    lodash.toSafeInteger = toSafeInteger;
    lodash.toString = toString;
    lodash.toUpper = toUpper;
    lodash.trim = trim;
    lodash.trimEnd = trimEnd;
    lodash.trimStart = trimStart;
    lodash.truncate = truncate;
    lodash.unescape = unescape;
    lodash.uniqueId = uniqueId;
    lodash.upperCase = upperCase;
    lodash.upperFirst = upperFirst;

    // Add aliases.
    lodash.each = forEach;
    lodash.eachRight = forEachRight;
    lodash.first = head;

    mixin(lodash, (function() {
      var source = {};
      baseForOwn(lodash, function(func, methodName) {
        if (!hasOwnProperty.call(lodash.prototype, methodName)) {
          source[methodName] = func;
        }
      });
      return source;
    }()), { 'chain': false });

    /*------------------------------------------------------------------------*/

    /**
     * The semantic version number.
     *
     * @static
     * @memberOf _
     * @type {string}
     */
    lodash.VERSION = VERSION;

    // Assign default placeholders.
    arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
      lodash[methodName].placeholder = lodash;
    });

    // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
    arrayEach(['drop', 'take'], function(methodName, index) {
      LazyWrapper.prototype[methodName] = function(n) {
        n = n === undefined ? 1 : nativeMax(toInteger(n), 0);

        var result = (this.__filtered__ && !index)
          ? new LazyWrapper(this)
          : this.clone();

        if (result.__filtered__) {
          result.__takeCount__ = nativeMin(n, result.__takeCount__);
        } else {
          result.__views__.push({
            'size': nativeMin(n, MAX_ARRAY_LENGTH),
            'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
          });
        }
        return result;
      };

      LazyWrapper.prototype[methodName + 'Right'] = function(n) {
        return this.reverse()[methodName](n).reverse();
      };
    });

    // Add `LazyWrapper` methods that accept an `iteratee` value.
    arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
      var type = index + 1,
          isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;

      LazyWrapper.prototype[methodName] = function(iteratee) {
        var result = this.clone();
        result.__iteratees__.push({
          'iteratee': getIteratee(iteratee, 3),
          'type': type
        });
        result.__filtered__ = result.__filtered__ || isFilter;
        return result;
      };
    });

    // Add `LazyWrapper` methods for `_.head` and `_.last`.
    arrayEach(['head', 'last'], function(methodName, index) {
      var takeName = 'take' + (index ? 'Right' : '');

      LazyWrapper.prototype[methodName] = function() {
        return this[takeName](1).value()[0];
      };
    });

    // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
    arrayEach(['initial', 'tail'], function(methodName, index) {
      var dropName = 'drop' + (index ? '' : 'Right');

      LazyWrapper.prototype[methodName] = function() {
        return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
      };
    });

    LazyWrapper.prototype.compact = function() {
      return this.filter(identity);
    };

    LazyWrapper.prototype.find = function(predicate) {
      return this.filter(predicate).head();
    };

    LazyWrapper.prototype.findLast = function(predicate) {
      return this.reverse().find(predicate);
    };

    LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
      if (typeof path == 'function') {
        return new LazyWrapper(this);
      }
      return this.map(function(value) {
        return baseInvoke(value, path, args);
      });
    });

    LazyWrapper.prototype.reject = function(predicate) {
      return this.filter(negate(getIteratee(predicate)));
    };

    LazyWrapper.prototype.slice = function(start, end) {
      start = toInteger(start);

      var result = this;
      if (result.__filtered__ && (start > 0 || end < 0)) {
        return new LazyWrapper(result);
      }
      if (start < 0) {
        result = result.takeRight(-start);
      } else if (start) {
        result = result.drop(start);
      }
      if (end !== undefined) {
        end = toInteger(end);
        result = end < 0 ? result.dropRight(-end) : result.take(end - start);
      }
      return result;
    };

    LazyWrapper.prototype.takeRightWhile = function(predicate) {
      return this.reverse().takeWhile(predicate).reverse();
    };

    LazyWrapper.prototype.toArray = function() {
      return this.take(MAX_ARRAY_LENGTH);
    };

    // Add `LazyWrapper` methods to `lodash.prototype`.
    baseForOwn(LazyWrapper.prototype, function(func, methodName) {
      var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
          isTaker = /^(?:head|last)$/.test(methodName),
          lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
          retUnwrapped = isTaker || /^find/.test(methodName);

      if (!lodashFunc) {
        return;
      }
      lodash.prototype[methodName] = function() {
        var value = this.__wrapped__,
            args = isTaker ? [1] : arguments,
            isLazy = value instanceof LazyWrapper,
            iteratee = args[0],
            useLazy = isLazy || isArray(value);

        var interceptor = function(value) {
          var result = lodashFunc.apply(lodash, arrayPush([value], args));
          return (isTaker && chainAll) ? result[0] : result;
        };

        if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
          // Avoid lazy use if the iteratee has a "length" value other than `1`.
          isLazy = useLazy = false;
        }
        var chainAll = this.__chain__,
            isHybrid = !!this.__actions__.length,
            isUnwrapped = retUnwrapped && !chainAll,
            onlyLazy = isLazy && !isHybrid;

        if (!retUnwrapped && useLazy) {
          value = onlyLazy ? value : new LazyWrapper(this);
          var result = func.apply(value, args);
          result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
          return new LodashWrapper(result, chainAll);
        }
        if (isUnwrapped && onlyLazy) {
          return func.apply(this, args);
        }
        result = this.thru(interceptor);
        return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
      };
    });

    // Add `Array` methods to `lodash.prototype`.
    arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
      var func = arrayProto[methodName],
          chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
          retUnwrapped = /^(?:pop|shift)$/.test(methodName);

      lodash.prototype[methodName] = function() {
        var args = arguments;
        if (retUnwrapped && !this.__chain__) {
          var value = this.value();
          return func.apply(isArray(value) ? value : [], args);
        }
        return this[chainName](function(value) {
          return func.apply(isArray(value) ? value : [], args);
        });
      };
    });

    // Map minified method names to their real names.
    baseForOwn(LazyWrapper.prototype, function(func, methodName) {
      var lodashFunc = lodash[methodName];
      if (lodashFunc) {
        var key = lodashFunc.name + '';
        if (!hasOwnProperty.call(realNames, key)) {
          realNames[key] = [];
        }
        realNames[key].push({ 'name': methodName, 'func': lodashFunc });
      }
    });

    realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
      'name': 'wrapper',
      'func': undefined
    }];

    // Add methods to `LazyWrapper`.
    LazyWrapper.prototype.clone = lazyClone;
    LazyWrapper.prototype.reverse = lazyReverse;
    LazyWrapper.prototype.value = lazyValue;

    // Add chain sequence methods to the `lodash` wrapper.
    lodash.prototype.at = wrapperAt;
    lodash.prototype.chain = wrapperChain;
    lodash.prototype.commit = wrapperCommit;
    lodash.prototype.next = wrapperNext;
    lodash.prototype.plant = wrapperPlant;
    lodash.prototype.reverse = wrapperReverse;
    lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;

    // Add lazy aliases.
    lodash.prototype.first = lodash.prototype.head;

    if (symIterator) {
      lodash.prototype[symIterator] = wrapperToIterator;
    }
    return lodash;
  });

  /*--------------------------------------------------------------------------*/

  // Export lodash.
  var _ = runInContext();

  // Some AMD build optimizers, like r.js, check for condition patterns like:
  if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
    // Expose Lodash on the global object to prevent errors when Lodash is
    // loaded by a script tag in the presence of an AMD loader.
    // See http://requirejs.org/docs/errors.html#mismatch for more details.
    // Use `_.noConflict` to remove Lodash from the global object.
    root._ = _;

    // Define as an anonymous module so, through path mapping, it can be
    // referenced as the "underscore" module.
    define(function() {
      return _;
    });
  }
  // Check for `exports` after `define` in case a build optimizer adds it.
  else if (freeModule) {
    // Export for Node.js.
    (freeModule.exports = _)._ = _;
    // Export for CommonJS support.
    freeExports._ = _;
  }
  else {
    // Export to the global object.
    root._ = _;
  }
}.call(this));
                                                                                                                                                                                                                                                                                                                                                                       dist/vendor/lodash.min.js                                                                           0000644                 00000217022 15212564032 0011402 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @license
 * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
 */
;(function(){function n(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function t(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u<i;){var o=n[u];t(e,o,r(o),n)}return e}function r(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&t(n[r],r,n)!==false;);return n}function e(n,t){for(var r=null==n?0:n.length;r--&&t(n[r],r,n)!==false;);return n}function u(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return false;
return true}function i(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[u++]=o)}return i}function o(n,t){return!!(null==n?0:n.length)&&y(n,t,0)>-1}function f(n,t,r){for(var e=-1,u=null==n?0:n.length;++e<u;)if(r(t,n[e]))return true;return false}function c(n,t){for(var r=-1,e=null==n?0:n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function a(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function l(n,t,r,e){var u=-1,i=null==n?0:n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);
return r}function s(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function h(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return true;return false}function p(n){return n.split("")}function _(n){return n.match(Dt)||[]}function v(n,t,r){var e;return r(n,function(n,r,u){if(t(n,r,u))return e=r,false}),e}function g(n,t,r,e){for(var u=n.length,i=r+(e?1:-1);e?i--:++i<u;)if(t(n[i],i,n))return i;return-1}function y(n,t,r){return t===t?Z(n,t,r):g(n,b,r)}function d(n,t,r,e){
for(var u=r-1,i=n.length;++u<i;)if(e(n[u],t))return u;return-1}function b(n){return n!==n}function w(n,t){var r=null==n?0:n.length;return r?k(n,t)/r:Un}function m(n){return function(t){return null==t?X:t[n]}}function x(n){return function(t){return null==n?X:n[t]}}function j(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=false,n):t(r,n,u,i)}),r}function A(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;return n}function k(n,t){for(var r,e=-1,u=n.length;++e<u;){var i=t(n[e]);i!==X&&(r=r===X?i:r+i)}return r;
}function I(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function O(n,t){return c(t,function(t){return[t,n[t]]})}function R(n){return n?n.slice(0,H(n)+1).replace(Ct,""):n}function z(n){return function(t){return n(t)}}function E(n,t){return c(t,function(t){return n[t]})}function S(n,t){return n.has(t)}function W(n,t){for(var r=-1,e=n.length;++r<e&&y(t,n[r],0)>-1;);return r}function L(n,t){for(var r=n.length;r--&&y(t,n[r],0)>-1;);return r}function C(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;
return e}function U(n){return"\\"+Yr[n]}function B(n,t){return null==n?X:n[t]}function T(n){return Pr.test(n)}function $(n){return qr.test(n)}function D(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function M(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function F(n,t){return function(r){return n(t(r))}}function N(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r];o!==t&&o!==an||(n[r]=an,i[u++]=r)}return i}function P(n){var t=-1,r=Array(n.size);
return n.forEach(function(n){r[++t]=n}),r}function q(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function Z(n,t,r){for(var e=r-1,u=n.length;++e<u;)if(n[e]===t)return e;return-1}function K(n,t,r){for(var e=r+1;e--;)if(n[e]===t)return e;return e}function V(n){return T(n)?J(n):_e(n)}function G(n){return T(n)?Y(n):p(n)}function H(n){for(var t=n.length;t--&&Ut.test(n.charAt(t)););return t}function J(n){for(var t=Fr.lastIndex=0;Fr.test(n);)++t;return t}function Y(n){return n.match(Fr)||[];
}function Q(n){return n.match(Nr)||[]}var X,nn="4.18.1",tn=200,rn="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",en="Expected a function",un="Invalid `variable` option passed into `_.template`",on="Invalid `imports` option passed into `_.template`",fn="__lodash_hash_undefined__",cn=500,an="__lodash_placeholder__",ln=1,sn=2,hn=4,pn=1,_n=2,vn=1,gn=2,yn=4,dn=8,bn=16,wn=32,mn=64,xn=128,jn=256,An=512,kn=30,In="...",On=800,Rn=16,zn=1,En=2,Sn=3,Wn=1/0,Ln=9007199254740991,Cn=1.7976931348623157e308,Un=NaN,Bn=4294967295,Tn=Bn-1,$n=Bn>>>1,Dn=[["ary",xn],["bind",vn],["bindKey",gn],["curry",dn],["curryRight",bn],["flip",An],["partial",wn],["partialRight",mn],["rearg",jn]],Mn="[object Arguments]",Fn="[object Array]",Nn="[object AsyncFunction]",Pn="[object Boolean]",qn="[object Date]",Zn="[object DOMException]",Kn="[object Error]",Vn="[object Function]",Gn="[object GeneratorFunction]",Hn="[object Map]",Jn="[object Number]",Yn="[object Null]",Qn="[object Object]",Xn="[object Promise]",nt="[object Proxy]",tt="[object RegExp]",rt="[object Set]",et="[object String]",ut="[object Symbol]",it="[object Undefined]",ot="[object WeakMap]",ft="[object WeakSet]",ct="[object ArrayBuffer]",at="[object DataView]",lt="[object Float32Array]",st="[object Float64Array]",ht="[object Int8Array]",pt="[object Int16Array]",_t="[object Int32Array]",vt="[object Uint8Array]",gt="[object Uint8ClampedArray]",yt="[object Uint16Array]",dt="[object Uint32Array]",bt=/\b__p\+='';/g,wt=/\b(__p\+=)''\+/g,mt=/(__e\(.*?\)|\b__t\))\+'';/g,xt=/&(?:amp|lt|gt|quot|#39);/g,jt=/[&<>"']/g,At=RegExp(xt.source),kt=RegExp(jt.source),It=/<%-([\s\S]+?)%>/g,Ot=/<%([\s\S]+?)%>/g,Rt=/<%=([\s\S]+?)%>/g,zt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Et=/^\w*$/,St=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Wt=/[\\^$.*+?()[\]{}|]/g,Lt=RegExp(Wt.source),Ct=/^\s+/,Ut=/\s/,Bt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Tt=/\{\n\/\* \[wrapped with (.+)\] \*/,$t=/,? & /,Dt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Mt=/[()=,{}\[\]\/\s]/,Ft=/\\(\\)?/g,Nt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Pt=/\w*$/,qt=/^[-+]0x[0-9a-f]+$/i,Zt=/^0b[01]+$/i,Kt=/^\[object .+?Constructor\]$/,Vt=/^0o[0-7]+$/i,Gt=/^(?:0|[1-9]\d*)$/,Ht=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Jt=/($^)/,Yt=/['\n\r\u2028\u2029\\]/g,Qt="\\ud800-\\udfff",Xt="\\u0300-\\u036f",nr="\\ufe20-\\ufe2f",tr="\\u20d0-\\u20ff",rr=Xt+nr+tr,er="\\u2700-\\u27bf",ur="a-z\\xdf-\\xf6\\xf8-\\xff",ir="\\xac\\xb1\\xd7\\xf7",or="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",fr="\\u2000-\\u206f",cr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ar="A-Z\\xc0-\\xd6\\xd8-\\xde",lr="\\ufe0e\\ufe0f",sr=ir+or+fr+cr,hr="['\u2019]",pr="["+Qt+"]",_r="["+sr+"]",vr="["+rr+"]",gr="\\d+",yr="["+er+"]",dr="["+ur+"]",br="[^"+Qt+sr+gr+er+ur+ar+"]",wr="\\ud83c[\\udffb-\\udfff]",mr="(?:"+vr+"|"+wr+")",xr="[^"+Qt+"]",jr="(?:\\ud83c[\\udde6-\\uddff]){2}",Ar="[\\ud800-\\udbff][\\udc00-\\udfff]",kr="["+ar+"]",Ir="\\u200d",Or="(?:"+dr+"|"+br+")",Rr="(?:"+kr+"|"+br+")",zr="(?:"+hr+"(?:d|ll|m|re|s|t|ve))?",Er="(?:"+hr+"(?:D|LL|M|RE|S|T|VE))?",Sr=mr+"?",Wr="["+lr+"]?",Lr="(?:"+Ir+"(?:"+[xr,jr,Ar].join("|")+")"+Wr+Sr+")*",Cr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ur="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Br=Wr+Sr+Lr,Tr="(?:"+[yr,jr,Ar].join("|")+")"+Br,$r="(?:"+[xr+vr+"?",vr,jr,Ar,pr].join("|")+")",Dr=RegExp(hr,"g"),Mr=RegExp(vr,"g"),Fr=RegExp(wr+"(?="+wr+")|"+$r+Br,"g"),Nr=RegExp([kr+"?"+dr+"+"+zr+"(?="+[_r,kr,"$"].join("|")+")",Rr+"+"+Er+"(?="+[_r,kr+Or,"$"].join("|")+")",kr+"?"+Or+"+"+zr,kr+"+"+Er,Ur,Cr,gr,Tr].join("|"),"g"),Pr=RegExp("["+Ir+Qt+rr+lr+"]"),qr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Zr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Kr={};
Kr[lt]=Kr[st]=Kr[ht]=Kr[pt]=Kr[_t]=Kr[vt]=Kr[gt]=Kr[yt]=Kr[dt]=true,Kr[Mn]=Kr[Fn]=Kr[ct]=Kr[Pn]=Kr[at]=Kr[qn]=Kr[Kn]=Kr[Vn]=Kr[Hn]=Kr[Jn]=Kr[Qn]=Kr[tt]=Kr[rt]=Kr[et]=Kr[ot]=false;var Vr={};Vr[Mn]=Vr[Fn]=Vr[ct]=Vr[at]=Vr[Pn]=Vr[qn]=Vr[lt]=Vr[st]=Vr[ht]=Vr[pt]=Vr[_t]=Vr[Hn]=Vr[Jn]=Vr[Qn]=Vr[tt]=Vr[rt]=Vr[et]=Vr[ut]=Vr[vt]=Vr[gt]=Vr[yt]=Vr[dt]=true,Vr[Kn]=Vr[Vn]=Vr[ot]=false;var Gr={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a",
"\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae",
"\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g",
"\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O",
"\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w",
"\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"},Hr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Jr={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Yr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Qr=parseFloat,Xr=parseInt,ne=typeof global=="object"&&global&&global.Object===Object&&global,te=typeof self=="object"&&self&&self.Object===Object&&self,re=ne||te||Function("return this")(),ee=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ue=ee&&typeof module=="object"&&module&&!module.nodeType&&module,ie=ue&&ue.exports===ee,oe=ie&&ne.process,fe=function(){
try{var n=ue&&ue.require&&ue.require("util").types;return n?n:oe&&oe.binding&&oe.binding("util")}catch(n){}}(),ce=fe&&fe.isArrayBuffer,ae=fe&&fe.isDate,le=fe&&fe.isMap,se=fe&&fe.isRegExp,he=fe&&fe.isSet,pe=fe&&fe.isTypedArray,_e=m("length"),ve=x(Gr),ge=x(Hr),ye=x(Jr),de=function p(x){function Z(n){if(cc(n)&&!bh(n)&&!(n instanceof Ut)){if(n instanceof Y)return n;if(bl.call(n,"__wrapped__"))return eo(n)}return new Y(n)}function J(){}function Y(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,
this.__index__=0,this.__values__=X}function Ut(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=Bn,this.__views__=[]}function Dt(){var n=new Ut(this.__wrapped__);return n.__actions__=Tu(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Tu(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Tu(this.__views__),n}function Qt(){if(this.__filtered__){var n=new Ut(this);n.__dir__=-1,
n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n}function Xt(){var n=this.__wrapped__.value(),t=this.__dir__,r=bh(n),e=t<0,u=r?n.length:0,i=Ii(0,u,this.__views__),o=i.start,f=i.end,c=f-o,a=e?f:o-1,l=this.__iteratees__,s=l.length,h=0,p=Hl(c,this.__takeCount__);if(!r||!e&&u==c&&p==c)return wu(n,this.__actions__);var _=[];n:for(;c--&&h<p;){a+=t;for(var v=-1,g=n[a];++v<s;){var y=l[v],d=y.iteratee,b=y.type,w=d(g);if(b==En)g=w;else if(!w){if(b==zn)continue n;break n}}_[h++]=g}return _}function nr(n){
var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function tr(){this.__data__=is?is(null):{},this.size=0}function rr(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}function er(n){var t=this.__data__;if(is){var r=t[n];return r===fn?X:r}return bl.call(t,n)?t[n]:X}function ur(n){var t=this.__data__;return is?t[n]!==X:bl.call(t,n)}function ir(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=is&&t===X?fn:t,this}function or(n){
var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function fr(){this.__data__=[],this.size=0}function cr(n){var t=this.__data__,r=Lr(t,n);return!(r<0)&&(r==t.length-1?t.pop():Ll.call(t,r,1),--this.size,true)}function ar(n){var t=this.__data__,r=Lr(t,n);return r<0?X:t[r][1]}function lr(n){return Lr(this.__data__,n)>-1}function sr(n,t){var r=this.__data__,e=Lr(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this}function hr(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){
var e=n[t];this.set(e[0],e[1])}}function pr(){this.size=0,this.__data__={hash:new nr,map:new(ts||or),string:new nr}}function _r(n){var t=xi(this,n).delete(n);return this.size-=t?1:0,t}function vr(n){return xi(this,n).get(n)}function gr(n){return xi(this,n).has(n)}function yr(n,t){var r=xi(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this}function dr(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new hr;++t<r;)this.add(n[t])}function br(n){return this.__data__.set(n,fn),this}function wr(n){
return this.__data__.has(n)}function mr(n){this.size=(this.__data__=new or(n)).size}function xr(){this.__data__=new or,this.size=0}function jr(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r}function Ar(n){return this.__data__.get(n)}function kr(n){return this.__data__.has(n)}function Ir(n,t){var r=this.__data__;if(r instanceof or){var e=r.__data__;if(!ts||e.length<tn-1)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new hr(e)}return r.set(n,t),this.size=r.size,this}function Or(n,t){
var r=bh(n),e=!r&&dh(n),u=!r&&!e&&mh(n),i=!r&&!e&&!u&&Ih(n),o=r||e||u||i,f=o?I(n.length,hl):[],c=f.length;for(var a in n)!t&&!bl.call(n,a)||o&&("length"==a||u&&("offset"==a||"parent"==a)||i&&("buffer"==a||"byteLength"==a||"byteOffset"==a)||Ci(a,c))||f.push(a);return f}function Rr(n){var t=n.length;return t?n[tu(0,t-1)]:X}function zr(n,t){return Xi(Tu(n),Fr(t,0,n.length))}function Er(n){return Xi(Tu(n))}function Sr(n,t,r){(r===X||Gf(n[t],r))&&(r!==X||t in n)||Tr(n,t,r)}function Wr(n,t,r){var e=n[t];
bl.call(n,t)&&Gf(e,r)&&(r!==X||t in n)||Tr(n,t,r)}function Lr(n,t){for(var r=n.length;r--;)if(Gf(n[r][0],t))return r;return-1}function Cr(n,t,r,e){return ys(n,function(n,u,i){t(e,n,r(n),i)}),e}function Ur(n,t){return n&&$u(t,Pc(t),n)}function Br(n,t){return n&&$u(t,qc(t),n)}function Tr(n,t,r){"__proto__"==t&&Tl?Tl(n,t,{configurable:true,enumerable:true,value:r,writable:true}):n[t]=r}function $r(n,t){for(var r=-1,e=t.length,u=il(e),i=null==n;++r<e;)u[r]=i?X:Mc(n,t[r]);return u}function Fr(n,t,r){return n===n&&(r!==X&&(n=n<=r?n:r),
t!==X&&(n=n>=t?n:t)),n}function Nr(n,t,e,u,i,o){var f,c=t&ln,a=t&sn,l=t&hn;if(e&&(f=i?e(n,u,i,o):e(n)),f!==X)return f;if(!fc(n))return n;var s=bh(n);if(s){if(f=zi(n),!c)return Tu(n,f)}else{var h=zs(n),p=h==Vn||h==Gn;if(mh(n))return Ou(n,c);if(h==Qn||h==Mn||p&&!i){if(f=a||p?{}:Ei(n),!c)return a?Mu(n,Br(f,n)):Du(n,Ur(f,n))}else{if(!Vr[h])return i?n:{};f=Si(n,h,c)}}o||(o=new mr);var _=o.get(n);if(_)return _;o.set(n,f),kh(n)?n.forEach(function(r){f.add(Nr(r,t,e,r,n,o))}):jh(n)&&n.forEach(function(r,u){
f.set(u,Nr(r,t,e,u,n,o))});var v=l?a?di:yi:a?qc:Pc,g=s?X:v(n);return r(g||n,function(r,u){g&&(u=r,r=n[u]),Wr(f,u,Nr(r,t,e,u,n,o))}),f}function Pr(n){var t=Pc(n);return function(r){return qr(r,n,t)}}function qr(n,t,r){var e=r.length;if(null==n)return!e;for(n=ll(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===X&&!(u in n)||!i(o))return false}return true}function Gr(n,t,r){if(typeof n!="function")throw new pl(en);return Ws(function(){n.apply(X,r)},t)}function Hr(n,t,r,e){var u=-1,i=o,a=true,l=n.length,s=[],h=t.length;
if(!l)return s;r&&(t=c(t,z(r))),e?(i=f,a=false):t.length>=tn&&(i=S,a=false,t=new dr(t));n:for(;++u<l;){var p=n[u],_=null==r?p:r(p);if(p=e||0!==p?p:0,a&&_===_){for(var v=h;v--;)if(t[v]===_)continue n;s.push(p)}else i(t,_,e)||s.push(p)}return s}function Jr(n,t){var r=true;return ys(n,function(n,e,u){return r=!!t(n,e,u)}),r}function Yr(n,t,r){for(var e=-1,u=n.length;++e<u;){var i=n[e],o=t(i);if(null!=o&&(f===X?o===o&&!bc(o):r(o,f)))var f=o,c=i}return c}function ne(n,t,r,e){var u=n.length;for(r=kc(r),r<0&&(r=-r>u?0:u+r),
e=e===X||e>u?u:kc(e),e<0&&(e+=u),e=r>e?0:Ic(e);r<e;)n[r++]=t;return n}function te(n,t){var r=[];return ys(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function ee(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=Li),u||(u=[]);++i<o;){var f=n[i];t>0&&r(f)?t>1?ee(f,t-1,r,e,u):a(u,f):e||(u[u.length]=f)}return u}function ue(n,t){return n&&bs(n,t,Pc)}function oe(n,t){return n&&ws(n,t,Pc)}function fe(n,t){return i(t,function(t){return uc(n[t])})}function _e(n,t){t=ku(t,n);for(var r=0,e=t.length;null!=n&&r<e;)n=n[no(t[r++])];
return r&&r==e?n:X}function de(n,t,r){var e=t(n);return bh(n)?e:a(e,r(n))}function we(n){return null==n?n===X?it:Yn:Bl&&Bl in ll(n)?ki(n):Ki(n)}function me(n,t){return n>t}function xe(n,t){return null!=n&&bl.call(n,t)}function je(n,t){return null!=n&&t in ll(n)}function Ae(n,t,r){return n>=Hl(t,r)&&n<Gl(t,r)}function ke(n,t,r){for(var e=r?f:o,u=n[0].length,i=n.length,a=i,l=il(i),s=1/0,h=[];a--;){var p=n[a];a&&t&&(p=c(p,z(t))),s=Hl(p.length,s),l[a]=!r&&(t||u>=120&&p.length>=120)?new dr(a&&p):X}p=n[0];
var _=-1,v=l[0];n:for(;++_<u&&h.length<s;){var g=p[_],y=t?t(g):g;if(g=r||0!==g?g:0,!(v?S(v,y):e(h,y,r))){for(a=i;--a;){var d=l[a];if(!(d?S(d,y):e(n[a],y,r)))continue n}v&&v.push(y),h.push(g)}}return h}function Ie(n,t,r,e){return ue(n,function(n,u,i){t(e,r(n),u,i)}),e}function Oe(t,r,e){r=ku(r,t),t=Gi(t,r);var u=null==t?t:t[no(jo(r))];return null==u?X:n(u,t,e)}function Re(n){return cc(n)&&we(n)==Mn}function ze(n){return cc(n)&&we(n)==ct}function Ee(n){return cc(n)&&we(n)==qn}function Se(n,t,r,e,u){
return n===t||(null==n||null==t||!cc(n)&&!cc(t)?n!==n&&t!==t:We(n,t,r,e,Se,u))}function We(n,t,r,e,u,i){var o=bh(n),f=bh(t),c=o?Fn:zs(n),a=f?Fn:zs(t);c=c==Mn?Qn:c,a=a==Mn?Qn:a;var l=c==Qn,s=a==Qn,h=c==a;if(h&&mh(n)){if(!mh(t))return false;o=true,l=false}if(h&&!l)return i||(i=new mr),o||Ih(n)?pi(n,t,r,e,u,i):_i(n,t,c,r,e,u,i);if(!(r&pn)){var p=l&&bl.call(n,"__wrapped__"),_=s&&bl.call(t,"__wrapped__");if(p||_){var v=p?n.value():n,g=_?t.value():t;return i||(i=new mr),u(v,g,r,e,i)}}return!!h&&(i||(i=new mr),vi(n,t,r,e,u,i));
}function Le(n){return cc(n)&&zs(n)==Hn}function Ce(n,t,r,e){var u=r.length,i=u,o=!e;if(null==n)return!i;for(n=ll(n);u--;){var f=r[u];if(o&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return false}for(;++u<i;){f=r[u];var c=f[0],a=n[c],l=f[1];if(o&&f[2]){if(a===X&&!(c in n))return false}else{var s=new mr;if(e)var h=e(a,l,c,n,t,s);if(!(h===X?Se(l,a,pn|_n,e,s):h))return false}}return true}function Ue(n){return!(!fc(n)||Di(n))&&(uc(n)?kl:Kt).test(to(n))}function Be(n){return cc(n)&&we(n)==tt}function Te(n){return cc(n)&&zs(n)==rt;
}function $e(n){return cc(n)&&oc(n.length)&&!!Kr[we(n)]}function De(n){return typeof n=="function"?n:null==n?La:typeof n=="object"?bh(n)?Ze(n[0],n[1]):qe(n):Fa(n)}function Me(n){if(!Mi(n))return Vl(n);var t=[];for(var r in ll(n))bl.call(n,r)&&"constructor"!=r&&t.push(r);return t}function Fe(n){if(!fc(n))return Zi(n);var t=Mi(n),r=[];for(var e in n)("constructor"!=e||!t&&bl.call(n,e))&&r.push(e);return r}function Ne(n,t){return n<t}function Pe(n,t){var r=-1,e=Hf(n)?il(n.length):[];return ys(n,function(n,u,i){
e[++r]=t(n,u,i)}),e}function qe(n){var t=ji(n);return 1==t.length&&t[0][2]?Ni(t[0][0],t[0][1]):function(r){return r===n||Ce(r,n,t)}}function Ze(n,t){return Bi(n)&&Fi(t)?Ni(no(n),t):function(r){var e=Mc(r,n);return e===X&&e===t?Nc(r,n):Se(t,e,pn|_n)}}function Ke(n,t,r,e,u){n!==t&&bs(t,function(i,o){if(u||(u=new mr),fc(i))Ve(n,t,o,r,Ke,e,u);else{var f=e?e(Ji(n,o),i,o+"",n,t,u):X;f===X&&(f=i),Sr(n,o,f)}},qc)}function Ve(n,t,r,e,u,i,o){var f=Ji(n,r),c=Ji(t,r),a=o.get(c);if(a)return Sr(n,r,a),X;var l=i?i(f,c,r+"",n,t,o):X,s=l===X;
if(s){var h=bh(c),p=!h&&mh(c),_=!h&&!p&&Ih(c);l=c,h||p||_?bh(f)?l=f:Jf(f)?l=Tu(f):p?(s=false,l=Ou(c,true)):_?(s=false,l=Wu(c,true)):l=[]:gc(c)||dh(c)?(l=f,dh(f)?l=Rc(f):fc(f)&&!uc(f)||(l=Ei(c))):s=false}s&&(o.set(c,l),u(l,c,e,i,o),o.delete(c)),Sr(n,r,l)}function Ge(n,t){var r=n.length;if(r)return t+=t<0?r:0,Ci(t,r)?n[t]:X}function He(n,t,r){t=t.length?c(t,function(n){return bh(n)?function(t){return _e(t,1===n.length?n[0]:n)}:n}):[La];var e=-1;return t=c(t,z(mi())),A(Pe(n,function(n,r,u){return{a:c(t,function(t){
return t(n)}),b:++e,c:n}}),function(n,t){return Cu(n,t,r)})}function Je(n,t){return Ye(n,t,function(t,r){return Nc(n,r)})}function Ye(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=_e(n,o);r(f,o)&&fu(i,ku(o,n),f)}return i}function Qe(n){return function(t){return _e(t,n)}}function Xe(n,t,r,e){var u=e?d:y,i=-1,o=t.length,f=n;for(n===t&&(t=Tu(t)),r&&(f=c(n,z(r)));++i<o;)for(var a=0,l=t[i],s=r?r(l):l;(a=u(f,s,a,e))>-1;)f!==n&&Ll.call(f,a,1),Ll.call(n,a,1);return n}function nu(n,t){for(var r=n?t.length:0,e=r-1;r--;){
var u=t[r];if(r==e||u!==i){var i=u;Ci(u)?Ll.call(n,u,1):yu(n,u)}}return n}function tu(n,t){return n+Nl(Ql()*(t-n+1))}function ru(n,t,r,e){for(var u=-1,i=Gl(Fl((t-n)/(r||1)),0),o=il(i);i--;)o[e?i:++u]=n,n+=r;return o}function eu(n,t){var r="";if(!n||t<1||t>Ln)return r;do t%2&&(r+=n),t=Nl(t/2),t&&(n+=n);while(t);return r}function uu(n,t){return Ls(Vi(n,t,La),n+"")}function iu(n){return Rr(ra(n))}function ou(n,t){var r=ra(n);return Xi(r,Fr(t,0,r.length))}function fu(n,t,r,e){if(!fc(n))return n;t=ku(t,n);
for(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++u<i;){var c=no(t[u]),a=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return n;if(u!=o){var l=f[c];a=e?e(l,c,f):X,a===X&&(a=fc(l)?l:Ci(t[u+1])?[]:{})}Wr(f,c,a),f=f[c]}return n}function cu(n){return Xi(ra(n))}function au(n,t,r){var e=-1,u=n.length;t<0&&(t=-t>u?0:u+t),r=r>u?u:r,r<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var i=il(u);++e<u;)i[e]=n[e+t];return i}function lu(n,t){var r;return ys(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function su(n,t,r){
var e=0,u=null==n?e:n.length;if(typeof t=="number"&&t===t&&u<=$n){for(;e<u;){var i=e+u>>>1,o=n[i];null!==o&&!bc(o)&&(r?o<=t:o<t)?e=i+1:u=i}return u}return hu(n,t,La,r)}function hu(n,t,r,e){var u=0,i=null==n?0:n.length;if(0===i)return 0;t=r(t);for(var o=t!==t,f=null===t,c=bc(t),a=t===X;u<i;){var l=Nl((u+i)/2),s=r(n[l]),h=s!==X,p=null===s,_=s===s,v=bc(s);if(o)var g=e||_;else g=a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):!p&&!v&&(e?s<=t:s<t);g?u=l+1:i=l}return Hl(i,Tn)}function pu(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){
var o=n[r],f=t?t(o):o;if(!r||!Gf(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function _u(n){return typeof n=="number"?n:bc(n)?Un:+n}function vu(n){if(typeof n=="string")return n;if(bh(n))return c(n,vu)+"";if(bc(n))return vs?vs.call(n):"";var t=n+"";return"0"==t&&1/n==-Wn?"-0":t}function gu(n,t,r){var e=-1,u=o,i=n.length,c=true,a=[],l=a;if(r)c=false,u=f;else if(i>=tn){var s=t?null:ks(n);if(s)return P(s);c=false,u=S,l=new dr}else l=t?[]:a;n:for(;++e<i;){var h=n[e],p=t?t(h):h;if(h=r||0!==h?h:0,c&&p===p){for(var _=l.length;_--;)if(l[_]===p)continue n;
t&&l.push(p),a.push(h)}else u(l,p,r)||(l!==a&&l.push(p),a.push(h))}return a}function yu(n,t){t=ku(t,n);var r=-1,e=t.length;if(!e)return true;for(;++r<e;){var u=no(t[r]);if("__proto__"===u&&!bl.call(n,"__proto__"))return false;if(("constructor"===u||"prototype"===u)&&r<e-1)return false}var i=Gi(n,t);return null==i||delete i[no(jo(t))]}function du(n,t,r,e){return fu(n,t,r(_e(n,t)),e)}function bu(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?au(n,e?0:i,e?i+1:u):au(n,e?i+1:0,e?u:i)}
function wu(n,t){var r=n;return r instanceof Ut&&(r=r.value()),l(t,function(n,t){return t.func.apply(t.thisArg,a([n],t.args))},r)}function mu(n,t,r){var e=n.length;if(e<2)return e?gu(n[0]):[];for(var u=-1,i=il(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=Hr(i[u]||o,n[f],t,r));return gu(ee(i,1),t,r)}function xu(n,t,r){for(var e=-1,u=n.length,i=t.length,o={};++e<u;){r(o,n[e],e<i?t[e]:X)}return o}function ju(n){return Jf(n)?n:[]}function Au(n){return typeof n=="function"?n:La}function ku(n,t){return bh(n)?n:Bi(n,t)?[n]:Cs(Ec(n));
}function Iu(n,t,r){var e=n.length;return r=r===X?e:r,!t&&r>=e?n:au(n,t,r)}function Ou(n,t){if(t)return n.slice();var r=n.length,e=zl?zl(r):new n.constructor(r);return n.copy(e),e}function Ru(n){var t=new n.constructor(n.byteLength);return new Rl(t).set(new Rl(n)),t}function zu(n,t){return new n.constructor(t?Ru(n.buffer):n.buffer,n.byteOffset,n.byteLength)}function Eu(n){var t=new n.constructor(n.source,Pt.exec(n));return t.lastIndex=n.lastIndex,t}function Su(n){return _s?ll(_s.call(n)):{}}function Wu(n,t){
return new n.constructor(t?Ru(n.buffer):n.buffer,n.byteOffset,n.length)}function Lu(n,t){if(n!==t){var r=n!==X,e=null===n,u=n===n,i=bc(n),o=t!==X,f=null===t,c=t===t,a=bc(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n<t||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return 0}function Cu(n,t,r){for(var e=-1,u=n.a,i=t.a,o=u.length,f=r.length;++e<o;){var c=Lu(u[e],i[e]);if(c){if(e>=f)return c;return c*("desc"==r[e]?-1:1)}}return n.b-t.b}function Uu(n,t,r,e){for(var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Gl(i-o,0),l=il(c+a),s=!e;++f<c;)l[f]=t[f];
for(;++u<o;)(s||u<i)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l}function Bu(n,t,r,e){for(var u=-1,i=n.length,o=-1,f=r.length,c=-1,a=t.length,l=Gl(i-f,0),s=il(l+a),h=!e;++u<l;)s[u]=n[u];for(var p=u;++c<a;)s[p+c]=t[c];for(;++o<f;)(h||u<i)&&(s[p+r[o]]=n[u++]);return s}function Tu(n,t){var r=-1,e=n.length;for(t||(t=il(e));++r<e;)t[r]=n[r];return t}function $u(n,t,r,e){var u=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var f=t[i],c=e?e(r[f],n[f],f,r,n):X;c===X&&(c=n[f]),u?Tr(r,f,c):Wr(r,f,c)}return r;
}function Du(n,t){return $u(n,Os(n),t)}function Mu(n,t){return $u(n,Rs(n),t)}function Fu(n,r){return function(e,u){var i=bh(e)?t:Cr,o=r?r():{};return i(e,n,mi(u,2),o)}}function Nu(n){return uu(function(t,r){var e=-1,u=r.length,i=u>1?r[u-1]:X,o=u>2?r[2]:X;for(i=n.length>3&&typeof i=="function"?(u--,i):X,o&&Ui(r[0],r[1],o)&&(i=u<3?X:i,u=1),t=ll(t);++e<u;){var f=r[e];f&&n(t,f,e,i)}return t})}function Pu(n,t){return function(r,e){if(null==r)return r;if(!Hf(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=ll(r);(t?i--:++i<u)&&e(o[i],i,o)!==false;);
return r}}function qu(n){return function(t,r,e){for(var u=-1,i=ll(t),o=e(t),f=o.length;f--;){var c=o[n?f:++u];if(r(i[c],c,i)===false)break}return t}}function Zu(n,t,r){function e(){return(this&&this!==re&&this instanceof e?i:n).apply(u?r:this,arguments)}var u=t&vn,i=Gu(n);return e}function Ku(n){return function(t){t=Ec(t);var r=T(t)?G(t):X,e=r?r[0]:t.charAt(0),u=r?Iu(r,1).join(""):t.slice(1);return e[n]()+u}}function Vu(n){return function(t){return l(Ra(ca(t).replace(Dr,"")),n,"")}}function Gu(n){return function(){
var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=gs(n.prototype),e=n.apply(r,t);return fc(e)?e:r}}function Hu(t,r,e){function u(){for(var o=arguments.length,f=il(o),c=o,a=wi(u);c--;)f[c]=arguments[c];var l=o<3&&f[0]!==a&&f[o-1]!==a?[]:N(f,a);
return o-=l.length,o<e?oi(t,r,Qu,u.placeholder,X,f,l,X,X,e-o):n(this&&this!==re&&this instanceof u?i:t,this,f)}var i=Gu(t);return u}function Ju(n){return function(t,r,e){var u=ll(t);if(!Hf(t)){var i=mi(r,3);t=Pc(t),r=function(n){return i(u[n],n,u)}}var o=n(t,r,e);return o>-1?u[i?t[o]:o]:X}}function Yu(n){return gi(function(t){var r=t.length,e=r,u=Y.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if(typeof i!="function")throw new pl(en);if(u&&!o&&"wrapper"==bi(i))var o=new Y([],true)}for(e=o?e:r;++e<r;){
i=t[e];var f=bi(i),c="wrapper"==f?Is(i):X;o=c&&$i(c[0])&&c[1]==(xn|dn|wn|jn)&&!c[4].length&&1==c[9]?o[bi(c[0])].apply(o,c[3]):1==i.length&&$i(i)?o[f]():o.thru(i)}return function(){var n=arguments,e=n[0];if(o&&1==n.length&&bh(e))return o.plant(e).value();for(var u=0,i=r?t[u].apply(this,n):e;++u<r;)i=t[u].call(this,i);return i}})}function Qu(n,t,r,e,u,i,o,f,c,a){function l(){for(var y=arguments.length,d=il(y),b=y;b--;)d[b]=arguments[b];if(_)var w=wi(l),m=C(d,w);if(e&&(d=Uu(d,e,u,_)),i&&(d=Bu(d,i,o,_)),
y-=m,_&&y<a){return oi(n,t,Qu,l.placeholder,r,d,N(d,w),f,c,a-y)}var x=h?r:this,j=p?x[n]:n;return y=d.length,f?d=Hi(d,f):v&&y>1&&d.reverse(),s&&c<y&&(d.length=c),this&&this!==re&&this instanceof l&&(j=g||Gu(j)),j.apply(x,d)}var s=t&xn,h=t&vn,p=t&gn,_=t&(dn|bn),v=t&An,g=p?X:Gu(n);return l}function Xu(n,t){return function(r,e){return Ie(r,n,t(e),{})}}function ni(n,t){return function(r,e){var u;if(r===X&&e===X)return t;if(r!==X&&(u=r),e!==X){if(u===X)return e;typeof r=="string"||typeof e=="string"?(r=vu(r),
e=vu(e)):(r=_u(r),e=_u(e)),u=n(r,e)}return u}}function ti(t){return gi(function(r){return r=c(r,z(mi())),uu(function(e){var u=this;return t(r,function(t){return n(t,u,e)})})})}function ri(n,t){t=t===X?" ":vu(t);var r=t.length;if(r<2)return r?eu(t,n):t;var e=eu(t,Fl(n/V(t)));return T(t)?Iu(G(e),0,n).join(""):e.slice(0,n)}function ei(t,r,e,u){function i(){for(var r=-1,c=arguments.length,a=-1,l=u.length,s=il(l+c),h=this&&this!==re&&this instanceof i?f:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++r];
return n(h,o?e:this,s)}var o=r&vn,f=Gu(t);return i}function ui(n){return function(t,r,e){return e&&typeof e!="number"&&Ui(t,r,e)&&(r=e=X),t=Ac(t),r===X?(r=t,t=0):r=Ac(r),e=e===X?t<r?1:-1:Ac(e),ru(t,r,e,n)}}function ii(n){return function(t,r){return typeof t=="string"&&typeof r=="string"||(t=Oc(t),r=Oc(r)),n(t,r)}}function oi(n,t,r,e,u,i,o,f,c,a){var l=t&dn,s=l?o:X,h=l?X:o,p=l?i:X,_=l?X:i;t|=l?wn:mn,t&=~(l?mn:wn),t&yn||(t&=~(vn|gn));var v=[n,t,u,p,s,_,h,f,c,a],g=r.apply(X,v);return $i(n)&&Ss(g,v),g.placeholder=e,
Yi(g,n,t)}function fi(n){var t=al[n];return function(n,r){if(n=Oc(n),r=null==r?0:Hl(kc(r),292),r&&Zl(n)){var e=(Ec(n)+"e").split("e");return e=(Ec(t(e[0]+"e"+(+e[1]+r)))+"e").split("e"),+(e[0]+"e"+(+e[1]-r))}return t(n)}}function ci(n){return function(t){var r=zs(t);return r==Hn?M(t):r==rt?q(t):O(t,n(t))}}function ai(n,t,r,e,u,i,o,f){var c=t&gn;if(!c&&typeof n!="function")throw new pl(en);var a=e?e.length:0;if(a||(t&=~(wn|mn),e=u=X),o=o===X?o:Gl(kc(o),0),f=f===X?f:kc(f),a-=u?u.length:0,t&mn){var l=e,s=u;
e=u=X}var h=c?X:Is(n),p=[n,t,r,e,u,l,s,i,o,f];if(h&&qi(p,h),n=p[0],t=p[1],r=p[2],e=p[3],u=p[4],f=p[9]=p[9]===X?c?0:n.length:Gl(p[9]-a,0),!f&&t&(dn|bn)&&(t&=~(dn|bn)),t&&t!=vn)_=t==dn||t==bn?Hu(n,t,f):t!=wn&&t!=(vn|wn)||u.length?Qu.apply(X,p):ei(n,t,r,e);else var _=Zu(n,t,r);return Yi((h?ms:Ss)(_,p),n,t)}function li(n,t,r,e){return n===X||Gf(n,gl[r])&&!bl.call(e,r)?t:n}function si(n,t,r,e,u,i){return fc(n)&&fc(t)&&(i.set(t,n),Ke(n,t,X,si,i),i.delete(t)),n}function hi(n){return gc(n)?X:n}function pi(n,t,r,e,u,i){
var o=r&pn,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;var a=i.get(n),l=i.get(t);if(a&&l)return a==t&&l==n;var s=-1,p=true,_=r&_n?new dr:X;for(i.set(n,t),i.set(t,n);++s<f;){var v=n[s],g=t[s];if(e)var y=o?e(g,v,s,t,n,i):e(v,g,s,n,t,i);if(y!==X){if(y)continue;p=false;break}if(_){if(!h(t,function(n,t){if(!S(_,t)&&(v===n||u(v,n,r,e,i)))return _.push(t)})){p=false;break}}else if(v!==g&&!u(v,g,r,e,i)){p=false;break}}return i.delete(n),i.delete(t),p}function _i(n,t,r,e,u,i,o){switch(r){case at:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return false;
n=n.buffer,t=t.buffer;case ct:return!(n.byteLength!=t.byteLength||!i(new Rl(n),new Rl(t)));case Pn:case qn:case Jn:return Gf(+n,+t);case Kn:return n.name==t.name&&n.message==t.message;case tt:case et:return n==t+"";case Hn:var f=M;case rt:var c=e&pn;if(f||(f=P),n.size!=t.size&&!c)return false;var a=o.get(n);if(a)return a==t;e|=_n,o.set(n,t);var l=pi(f(n),f(t),e,u,i,o);return o.delete(n),l;case ut:if(_s)return _s.call(n)==_s.call(t)}return false}function vi(n,t,r,e,u,i){var o=r&pn,f=yi(n),c=f.length;if(c!=yi(t).length&&!o)return false;
for(var a=c;a--;){var l=f[a];if(!(o?l in t:bl.call(t,l)))return false}var s=i.get(n),h=i.get(t);if(s&&h)return s==t&&h==n;var p=true;i.set(n,t),i.set(t,n);for(var _=o;++a<c;){l=f[a];var v=n[l],g=t[l];if(e)var y=o?e(g,v,l,t,n,i):e(v,g,l,n,t,i);if(!(y===X?v===g||u(v,g,r,e,i):y)){p=false;break}_||(_="constructor"==l)}if(p&&!_){var d=n.constructor,b=t.constructor;d!=b&&"constructor"in n&&"constructor"in t&&!(typeof d=="function"&&d instanceof d&&typeof b=="function"&&b instanceof b)&&(p=false)}return i.delete(n),
i.delete(t),p}function gi(n){return Ls(Vi(n,X,_o),n+"")}function yi(n){return de(n,Pc,Os)}function di(n){return de(n,qc,Rs)}function bi(n){for(var t=n.name+"",r=fs[t],e=bl.call(fs,t)?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function wi(n){return(bl.call(Z,"placeholder")?Z:n).placeholder}function mi(){var n=Z.iteratee||Ca;return n=n===Ca?De:n,arguments.length?n(arguments[0],arguments[1]):n}function xi(n,t){var r=n.__data__;return Ti(t)?r[typeof t=="string"?"string":"hash"]:r.map;
}function ji(n){for(var t=Pc(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,Fi(u)]}return t}function Ai(n,t){var r=B(n,t);return Ue(r)?r:X}function ki(n){var t=bl.call(n,Bl),r=n[Bl];try{n[Bl]=X;var e=true}catch(n){}var u=xl.call(n);return e&&(t?n[Bl]=r:delete n[Bl]),u}function Ii(n,t,r){for(var e=-1,u=r.length;++e<u;){var i=r[e],o=i.size;switch(i.type){case"drop":n+=o;break;case"dropRight":t-=o;break;case"take":t=Hl(t,n+o);break;case"takeRight":n=Gl(n,t-o)}}return{start:n,end:t}}function Oi(n){var t=n.match(Tt);
return t?t[1].split($t):[]}function Ri(n,t,r){t=ku(t,n);for(var e=-1,u=t.length,i=false;++e<u;){var o=no(t[e]);if(!(i=null!=n&&r(n,o)))break;n=n[o]}return i||++e!=u?i:(u=null==n?0:n.length,!!u&&oc(u)&&Ci(o,u)&&(bh(n)||dh(n)))}function zi(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&bl.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Ei(n){return typeof n.constructor!="function"||Mi(n)?{}:gs(El(n))}function Si(n,t,r){var e=n.constructor;switch(t){case ct:return Ru(n);
case Pn:case qn:return new e(+n);case at:return zu(n,r);case lt:case st:case ht:case pt:case _t:case vt:case gt:case yt:case dt:return Wu(n,r);case Hn:return new e;case Jn:case et:return new e(n);case tt:return Eu(n);case rt:return new e;case ut:return Su(n)}}function Wi(n,t){var r=t.length;if(!r)return n;var e=r-1;return t[e]=(r>1?"& ":"")+t[e],t=t.join(r>2?", ":" "),n.replace(Bt,"{\n/* [wrapped with "+t+"] */\n")}function Li(n){return bh(n)||dh(n)||!!(Cl&&n&&n[Cl])}function Ci(n,t){var r=typeof n;
return t=null==t?Ln:t,!!t&&("number"==r||"symbol"!=r&&Gt.test(n))&&n>-1&&n%1==0&&n<t}function Ui(n,t,r){if(!fc(r))return false;var e=typeof t;return!!("number"==e?Hf(r)&&Ci(t,r.length):"string"==e&&t in r)&&Gf(r[t],n)}function Bi(n,t){if(bh(n))return false;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!bc(n))||(Et.test(n)||!zt.test(n)||null!=t&&n in ll(t))}function Ti(n){var t=typeof n;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==n:null===n}function $i(n){
var t=bi(n),r=Z[t];if(typeof r!="function"||!(t in Ut.prototype))return false;if(n===r)return true;var e=Is(r);return!!e&&n===e[0]}function Di(n){return!!ml&&ml in n}function Mi(n){var t=n&&n.constructor;return n===(typeof t=="function"&&t.prototype||gl)}function Fi(n){return n===n&&!fc(n)}function Ni(n,t){return function(r){return null!=r&&(r[n]===t&&(t!==X||n in ll(r)))}}function Pi(n){var t=Cf(n,function(n){return r.size===cn&&r.clear(),n}),r=t.cache;return t}function qi(n,t){var r=n[1],e=t[1],u=r|e,i=u<(vn|gn|xn),o=e==xn&&r==dn||e==xn&&r==jn&&n[7].length<=t[8]||e==(xn|jn)&&t[7].length<=t[8]&&r==dn;
if(!i&&!o)return n;e&vn&&(n[2]=t[2],u|=r&vn?0:yn);var f=t[3];if(f){var c=n[3];n[3]=c?Uu(c,f,t[4]):f,n[4]=c?N(n[3],an):t[4]}return f=t[5],f&&(c=n[5],n[5]=c?Bu(c,f,t[6]):f,n[6]=c?N(n[5],an):t[6]),f=t[7],f&&(n[7]=f),e&xn&&(n[8]=null==n[8]?t[8]:Hl(n[8],t[8])),null==n[9]&&(n[9]=t[9]),n[0]=t[0],n[1]=u,n}function Zi(n){var t=[];if(null!=n)for(var r in ll(n))t.push(r);return t}function Ki(n){return xl.call(n)}function Vi(t,r,e){return r=Gl(r===X?t.length-1:r,0),function(){for(var u=arguments,i=-1,o=Gl(u.length-r,0),f=il(o);++i<o;)f[i]=u[r+i];
i=-1;for(var c=il(r+1);++i<r;)c[i]=u[i];return c[r]=e(f),n(t,this,c)}}function Gi(n,t){return t.length<2?n:_e(n,au(t,0,-1))}function Hi(n,t){for(var r=n.length,e=Hl(t.length,r),u=Tu(n);e--;){var i=t[e];n[e]=Ci(i,r)?u[i]:X}return n}function Ji(n,t){if(("constructor"!==t||"function"!=typeof n[t])&&"__proto__"!=t)return n[t]}function Yi(n,t,r){var e=t+"";return Ls(n,Wi(e,ro(Oi(e),r)))}function Qi(n){var t=0,r=0;return function(){var e=Jl(),u=Rn-(e-r);if(r=e,u>0){if(++t>=On)return arguments[0]}else t=0;
return n.apply(X,arguments)}}function Xi(n,t){var r=-1,e=n.length,u=e-1;for(t=t===X?e:t;++r<t;){var i=tu(r,u),o=n[i];n[i]=n[r],n[r]=o}return n.length=t,n}function no(n){if(typeof n=="string"||bc(n))return n;var t=n+"";return"0"==t&&1/n==-Wn?"-0":t}function to(n){if(null!=n){try{return dl.call(n)}catch(n){}try{return n+""}catch(n){}}return""}function ro(n,t){return r(Dn,function(r){var e="_."+r[0];t&r[1]&&!o(n,e)&&n.push(e)}),n.sort()}function eo(n){if(n instanceof Ut)return n.clone();var t=new Y(n.__wrapped__,n.__chain__);
return t.__actions__=Tu(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function uo(n,t,r){t=(r?Ui(n,t,r):t===X)?1:Gl(kc(t),0);var e=null==n?0:n.length;if(!e||t<1)return[];for(var u=0,i=0,o=il(Fl(e/t));u<e;)o[i++]=au(n,u,u+=t);return o}function io(n){for(var t=-1,r=null==n?0:n.length,e=0,u=[];++t<r;){var i=n[t];i&&(u[e++]=i)}return u}function oo(){var n=arguments.length;if(!n)return[];for(var t=il(n-1),r=arguments[0],e=n;e--;)t[e-1]=arguments[e];return a(bh(r)?Tu(r):[r],ee(t,1));
}function fo(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===X?1:kc(t),au(n,t<0?0:t,e)):[]}function co(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===X?1:kc(t),t=e-t,au(n,0,t<0?0:t)):[]}function ao(n,t){return n&&n.length?bu(n,mi(t,3),true,true):[]}function lo(n,t){return n&&n.length?bu(n,mi(t,3),true):[]}function so(n,t,r,e){var u=null==n?0:n.length;return u?(r&&typeof r!="number"&&Ui(n,t,r)&&(r=0,e=u),ne(n,t,r,e)):[]}function ho(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:kc(r);
return u<0&&(u=Gl(e+u,0)),g(n,mi(t,3),u)}function po(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==X&&(u=kc(r),u=r<0?Gl(e+u,0):Hl(u,e-1)),g(n,mi(t,3),u,true)}function _o(n){return(null==n?0:n.length)?ee(n,1):[]}function vo(n){return(null==n?0:n.length)?ee(n,Wn):[]}function go(n,t){return(null==n?0:n.length)?(t=t===X?1:kc(t),ee(n,t)):[]}function yo(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){var u=n[t];Tr(e,u[0],u[1])}return e}function bo(n){return n&&n.length?n[0]:X}function wo(n,t,r){
var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:kc(r);return u<0&&(u=Gl(e+u,0)),y(n,t,u)}function mo(n){return(null==n?0:n.length)?au(n,0,-1):[]}function xo(n,t){return null==n?"":Kl.call(n,t)}function jo(n){var t=null==n?0:n.length;return t?n[t-1]:X}function Ao(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;return r!==X&&(u=kc(r),u=u<0?Gl(e+u,0):Hl(u,e-1)),t===t?K(n,t,u):g(n,b,u,true)}function ko(n,t){return n&&n.length?Ge(n,kc(t)):X}function Io(n,t){return n&&n.length&&t&&t.length?Xe(n,t):n;
}function Oo(n,t,r){return n&&n.length&&t&&t.length?Xe(n,t,mi(r,2)):n}function Ro(n,t,r){return n&&n.length&&t&&t.length?Xe(n,t,X,r):n}function zo(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=mi(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),u.push(e))}return nu(n,u),r}function Eo(n){return null==n?n:Xl.call(n)}function So(n,t,r){var e=null==n?0:n.length;return e?(r&&typeof r!="number"&&Ui(n,t,r)?(t=0,r=e):(t=null==t?0:kc(t),r=r===X?e:kc(r)),au(n,t,r)):[]}function Wo(n,t){
return su(n,t)}function Lo(n,t,r){return hu(n,t,mi(r,2))}function Co(n,t){var r=null==n?0:n.length;if(r){var e=su(n,t);if(e<r&&Gf(n[e],t))return e}return-1}function Uo(n,t){return su(n,t,true)}function Bo(n,t,r){return hu(n,t,mi(r,2),true)}function To(n,t){if(null==n?0:n.length){var r=su(n,t,true)-1;if(Gf(n[r],t))return r}return-1}function $o(n){return n&&n.length?pu(n):[]}function Do(n,t){return n&&n.length?pu(n,mi(t,2)):[]}function Mo(n){var t=null==n?0:n.length;return t?au(n,1,t):[]}function Fo(n,t,r){
return n&&n.length?(t=r||t===X?1:kc(t),au(n,0,t<0?0:t)):[]}function No(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===X?1:kc(t),t=e-t,au(n,t<0?0:t,e)):[]}function Po(n,t){return n&&n.length?bu(n,mi(t,3),false,true):[]}function qo(n,t){return n&&n.length?bu(n,mi(t,3)):[]}function Zo(n){return n&&n.length?gu(n):[]}function Ko(n,t){return n&&n.length?gu(n,mi(t,2)):[]}function Vo(n,t){return t=typeof t=="function"?t:X,n&&n.length?gu(n,X,t):[]}function Go(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){
if(Jf(n))return t=Gl(n.length,t),true}),I(t,function(t){return c(n,m(t))})}function Ho(t,r){if(!t||!t.length)return[];var e=Go(t);return null==r?e:c(e,function(t){return n(r,X,t)})}function Jo(n,t){return xu(n||[],t||[],Wr)}function Yo(n,t){return xu(n||[],t||[],fu)}function Qo(n){var t=Z(n);return t.__chain__=true,t}function Xo(n,t){return t(n),n}function nf(n,t){return t(n)}function tf(){return Qo(this)}function rf(){return new Y(this.value(),this.__chain__)}function ef(){this.__values__===X&&(this.__values__=jc(this.value()));
var n=this.__index__>=this.__values__.length;return{done:n,value:n?X:this.__values__[this.__index__++]}}function uf(){return this}function of(n){for(var t,r=this;r instanceof J;){var e=eo(r);e.__index__=0,e.__values__=X,t?u.__wrapped__=e:t=e;var u=e;r=r.__wrapped__}return u.__wrapped__=n,t}function ff(){var n=this.__wrapped__;if(n instanceof Ut){var t=n;return this.__actions__.length&&(t=new Ut(this)),t=t.reverse(),t.__actions__.push({func:nf,args:[Eo],thisArg:X}),new Y(t,this.__chain__)}return this.thru(Eo);
}function cf(){return wu(this.__wrapped__,this.__actions__)}function af(n,t,r){var e=bh(n)?u:Jr;return r&&Ui(n,t,r)&&(t=X),e(n,mi(t,3))}function lf(n,t){return(bh(n)?i:te)(n,mi(t,3))}function sf(n,t){return ee(yf(n,t),1)}function hf(n,t){return ee(yf(n,t),Wn)}function pf(n,t,r){return r=r===X?1:kc(r),ee(yf(n,t),r)}function _f(n,t){return(bh(n)?r:ys)(n,mi(t,3))}function vf(n,t){return(bh(n)?e:ds)(n,mi(t,3))}function gf(n,t,r,e){n=Hf(n)?n:ra(n),r=r&&!e?kc(r):0;var u=n.length;return r<0&&(r=Gl(u+r,0)),
dc(n)?r<=u&&n.indexOf(t,r)>-1:!!u&&y(n,t,r)>-1}function yf(n,t){return(bh(n)?c:Pe)(n,mi(t,3))}function df(n,t,r,e){return null==n?[]:(bh(t)||(t=null==t?[]:[t]),r=e?X:r,bh(r)||(r=null==r?[]:[r]),He(n,t,r))}function bf(n,t,r){var e=bh(n)?l:j,u=arguments.length<3;return e(n,mi(t,4),r,u,ys)}function wf(n,t,r){var e=bh(n)?s:j,u=arguments.length<3;return e(n,mi(t,4),r,u,ds)}function mf(n,t){return(bh(n)?i:te)(n,Uf(mi(t,3)))}function xf(n){return(bh(n)?Rr:iu)(n)}function jf(n,t,r){return t=(r?Ui(n,t,r):t===X)?1:kc(t),
(bh(n)?zr:ou)(n,t)}function Af(n){return(bh(n)?Er:cu)(n)}function kf(n){if(null==n)return 0;if(Hf(n))return dc(n)?V(n):n.length;var t=zs(n);return t==Hn||t==rt?n.size:Me(n).length}function If(n,t,r){var e=bh(n)?h:lu;return r&&Ui(n,t,r)&&(t=X),e(n,mi(t,3))}function Of(n,t){if(typeof t!="function")throw new pl(en);return n=kc(n),function(){if(--n<1)return t.apply(this,arguments)}}function Rf(n,t,r){return t=r?X:t,t=n&&null==t?n.length:t,ai(n,xn,X,X,X,X,t)}function zf(n,t){var r;if(typeof t!="function")throw new pl(en);
return n=kc(n),function(){return--n>0&&(r=t.apply(this,arguments)),n<=1&&(t=X),r}}function Ef(n,t,r){t=r?X:t;var e=ai(n,dn,X,X,X,X,X,t);return e.placeholder=Ef.placeholder,e}function Sf(n,t,r){t=r?X:t;var e=ai(n,bn,X,X,X,X,X,t);return e.placeholder=Sf.placeholder,e}function Wf(n,t,r){function e(t){var r=h,e=p;return h=p=X,d=t,v=n.apply(e,r)}function u(n){return d=n,g=Ws(f,t),b?e(n):v}function i(n){var r=n-y,e=n-d,u=t-r;return w?Hl(u,_-e):u}function o(n){var r=n-y,e=n-d;return y===X||r>=t||r<0||w&&e>=_;
}function f(){var n=fh();return o(n)?c(n):(g=Ws(f,i(n)),X)}function c(n){return g=X,m&&h?e(n):(h=p=X,v)}function a(){g!==X&&As(g),d=0,h=y=p=g=X}function l(){return g===X?v:c(fh())}function s(){var n=fh(),r=o(n);if(h=arguments,p=this,y=n,r){if(g===X)return u(y);if(w)return As(g),g=Ws(f,t),e(y)}return g===X&&(g=Ws(f,t)),v}var h,p,_,v,g,y,d=0,b=false,w=false,m=true;if(typeof n!="function")throw new pl(en);return t=Oc(t)||0,fc(r)&&(b=!!r.leading,w="maxWait"in r,_=w?Gl(Oc(r.maxWait)||0,t):_,m="trailing"in r?!!r.trailing:m),
s.cancel=a,s.flush=l,s}function Lf(n){return ai(n,An)}function Cf(n,t){if(typeof n!="function"||null!=t&&typeof t!="function")throw new pl(en);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u))return i.get(u);var o=n.apply(this,e);return r.cache=i.set(u,o)||i,o};return r.cache=new(Cf.Cache||hr),r}function Uf(n){if(typeof n!="function")throw new pl(en);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:
return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function Bf(n){return zf(2,n)}function Tf(n,t){if(typeof n!="function")throw new pl(en);return t=t===X?t:kc(t),uu(n,t)}function $f(t,r){if(typeof t!="function")throw new pl(en);return r=null==r?0:Gl(kc(r),0),uu(function(e){var u=e[r],i=Iu(e,0,r);return u&&a(i,u),n(t,this,i)})}function Df(n,t,r){var e=true,u=true;if(typeof n!="function")throw new pl(en);return fc(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),
Wf(n,t,{leading:e,maxWait:t,trailing:u})}function Mf(n){return Rf(n,1)}function Ff(n,t){return ph(Au(t),n)}function Nf(){if(!arguments.length)return[];var n=arguments[0];return bh(n)?n:[n]}function Pf(n){return Nr(n,hn)}function qf(n,t){return t=typeof t=="function"?t:X,Nr(n,hn,t)}function Zf(n){return Nr(n,ln|hn)}function Kf(n,t){return t=typeof t=="function"?t:X,Nr(n,ln|hn,t)}function Vf(n,t){return null==t||qr(n,t,Pc(t))}function Gf(n,t){return n===t||n!==n&&t!==t}function Hf(n){return null!=n&&oc(n.length)&&!uc(n);
}function Jf(n){return cc(n)&&Hf(n)}function Yf(n){return n===true||n===false||cc(n)&&we(n)==Pn}function Qf(n){return cc(n)&&1===n.nodeType&&!gc(n)}function Xf(n){if(null==n)return true;if(Hf(n)&&(bh(n)||typeof n=="string"||typeof n.splice=="function"||mh(n)||Ih(n)||dh(n)))return!n.length;var t=zs(n);if(t==Hn||t==rt)return!n.size;if(Mi(n))return!Me(n).length;for(var r in n)if(bl.call(n,r))return false;return true}function nc(n,t){return Se(n,t)}function tc(n,t,r){r=typeof r=="function"?r:X;var e=r?r(n,t):X;return e===X?Se(n,t,X,r):!!e;
}function rc(n){if(!cc(n))return false;var t=we(n);return t==Kn||t==Zn||typeof n.message=="string"&&typeof n.name=="string"&&!gc(n)}function ec(n){return typeof n=="number"&&Zl(n)}function uc(n){if(!fc(n))return false;var t=we(n);return t==Vn||t==Gn||t==Nn||t==nt}function ic(n){return typeof n=="number"&&n==kc(n)}function oc(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=Ln}function fc(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function cc(n){return null!=n&&typeof n=="object"}function ac(n,t){
return n===t||Ce(n,t,ji(t))}function lc(n,t,r){return r=typeof r=="function"?r:X,Ce(n,t,ji(t),r)}function sc(n){return vc(n)&&n!=+n}function hc(n){if(Es(n))throw new fl(rn);return Ue(n)}function pc(n){return null===n}function _c(n){return null==n}function vc(n){return typeof n=="number"||cc(n)&&we(n)==Jn}function gc(n){if(!cc(n)||we(n)!=Qn)return false;var t=El(n);if(null===t)return true;var r=bl.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&dl.call(r)==jl}function yc(n){
return ic(n)&&n>=-Ln&&n<=Ln}function dc(n){return typeof n=="string"||!bh(n)&&cc(n)&&we(n)==et}function bc(n){return typeof n=="symbol"||cc(n)&&we(n)==ut}function wc(n){return n===X}function mc(n){return cc(n)&&zs(n)==ot}function xc(n){return cc(n)&&we(n)==ft}function jc(n){if(!n)return[];if(Hf(n))return dc(n)?G(n):Tu(n);if(Ul&&n[Ul])return D(n[Ul]());var t=zs(n);return(t==Hn?M:t==rt?P:ra)(n)}function Ac(n){if(!n)return 0===n?n:0;if(n=Oc(n),n===Wn||n===-Wn){return(n<0?-1:1)*Cn}return n===n?n:0}function kc(n){
var t=Ac(n),r=t%1;return t===t?r?t-r:t:0}function Ic(n){return n?Fr(kc(n),0,Bn):0}function Oc(n){if(typeof n=="number")return n;if(bc(n))return Un;if(fc(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=fc(t)?t+"":t}if(typeof n!="string")return 0===n?n:+n;n=R(n);var r=Zt.test(n);return r||Vt.test(n)?Xr(n.slice(2),r?2:8):qt.test(n)?Un:+n}function Rc(n){return $u(n,qc(n))}function zc(n){return n?Fr(kc(n),-Ln,Ln):0===n?n:0}function Ec(n){return null==n?"":vu(n)}function Sc(n,t){var r=gs(n);return null==t?r:Ur(r,t);
}function Wc(n,t){return v(n,mi(t,3),ue)}function Lc(n,t){return v(n,mi(t,3),oe)}function Cc(n,t){return null==n?n:bs(n,mi(t,3),qc)}function Uc(n,t){return null==n?n:ws(n,mi(t,3),qc)}function Bc(n,t){return n&&ue(n,mi(t,3))}function Tc(n,t){return n&&oe(n,mi(t,3))}function $c(n){return null==n?[]:fe(n,Pc(n))}function Dc(n){return null==n?[]:fe(n,qc(n))}function Mc(n,t,r){var e=null==n?X:_e(n,t);return e===X?r:e}function Fc(n,t){return null!=n&&Ri(n,t,xe)}function Nc(n,t){return null!=n&&Ri(n,t,je);
}function Pc(n){return Hf(n)?Or(n):Me(n)}function qc(n){return Hf(n)?Or(n,true):Fe(n)}function Zc(n,t){var r={};return t=mi(t,3),ue(n,function(n,e,u){Tr(r,t(n,e,u),n)}),r}function Kc(n,t){var r={};return t=mi(t,3),ue(n,function(n,e,u){Tr(r,e,t(n,e,u))}),r}function Vc(n,t){return Gc(n,Uf(mi(t)))}function Gc(n,t){if(null==n)return{};var r=c(di(n),function(n){return[n]});return t=mi(t),Ye(n,r,function(n,r){return t(n,r[0])})}function Hc(n,t,r){t=ku(t,n);var e=-1,u=t.length;for(u||(u=1,n=X);++e<u;){var i=null==n?X:n[no(t[e])];
i===X&&(e=u,i=r),n=uc(i)?i.call(n):i}return n}function Jc(n,t,r){return null==n?n:fu(n,t,r)}function Yc(n,t,r,e){return e=typeof e=="function"?e:X,null==n?n:fu(n,t,r,e)}function Qc(n,t,e){var u=bh(n),i=u||mh(n)||Ih(n);if(t=mi(t,4),null==e){var o=n&&n.constructor;e=i?u?new o:[]:fc(n)&&uc(o)?gs(El(n)):{}}return(i?r:ue)(n,function(n,r,u){return t(e,n,r,u)}),e}function Xc(n,t){return null==n||yu(n,t)}function na(n,t,r){return null==n?n:du(n,t,Au(r))}function ta(n,t,r,e){return e=typeof e=="function"?e:X,
null==n?n:du(n,t,Au(r),e)}function ra(n){return null==n?[]:E(n,Pc(n))}function ea(n){return null==n?[]:E(n,qc(n))}function ua(n,t,r){return r===X&&(r=t,t=X),r!==X&&(r=Oc(r),r=r===r?r:0),t!==X&&(t=Oc(t),t=t===t?t:0),Fr(Oc(n),t,r)}function ia(n,t,r){return t=Ac(t),r===X?(r=t,t=0):r=Ac(r),n=Oc(n),Ae(n,t,r)}function oa(n,t,r){if(r&&typeof r!="boolean"&&Ui(n,t,r)&&(t=r=X),r===X&&(typeof t=="boolean"?(r=t,t=X):typeof n=="boolean"&&(r=n,n=X)),n===X&&t===X?(n=0,t=1):(n=Ac(n),t===X?(t=n,n=0):t=Ac(t)),n>t){
var e=n;n=t,t=e}if(r||n%1||t%1){var u=Ql();return Hl(n+u*(t-n+Qr("1e-"+((u+"").length-1))),t)}return tu(n,t)}function fa(n){return Qh(Ec(n).toLowerCase())}function ca(n){return n=Ec(n),n&&n.replace(Ht,ve).replace(Mr,"")}function aa(n,t,r){n=Ec(n),t=vu(t);var e=n.length;r=r===X?e:Fr(kc(r),0,e);var u=r;return r-=t.length,r>=0&&n.slice(r,u)==t}function la(n){return n=Ec(n),n&&kt.test(n)?n.replace(jt,ge):n}function sa(n){return n=Ec(n),n&&Lt.test(n)?n.replace(Wt,"\\$&"):n}function ha(n,t,r){n=Ec(n),t=kc(t);
var e=t?V(n):0;if(!t||e>=t)return n;var u=(t-e)/2;return ri(Nl(u),r)+n+ri(Fl(u),r)}function pa(n,t,r){n=Ec(n),t=kc(t);var e=t?V(n):0;return t&&e<t?n+ri(t-e,r):n}function _a(n,t,r){n=Ec(n),t=kc(t);var e=t?V(n):0;return t&&e<t?ri(t-e,r)+n:n}function va(n,t,r){return r||null==t?t=0:t&&(t=+t),Yl(Ec(n).replace(Ct,""),t||0)}function ga(n,t,r){return t=(r?Ui(n,t,r):t===X)?1:kc(t),eu(Ec(n),t)}function ya(){var n=arguments,t=Ec(n[0]);return n.length<3?t:t.replace(n[1],n[2])}function da(n,t,r){return r&&typeof r!="number"&&Ui(n,t,r)&&(t=r=X),
(r=r===X?Bn:r>>>0)?(n=Ec(n),n&&(typeof t=="string"||null!=t&&!Ah(t))&&(t=vu(t),!t&&T(n))?Iu(G(n),0,r):n.split(t,r)):[]}function ba(n,t,r){return n=Ec(n),r=null==r?0:Fr(kc(r),0,n.length),t=vu(t),n.slice(r,r+t.length)==t}function wa(n,t,e){var u=Z.templateSettings;e&&Ui(n,t,e)&&(t=X),n=Ec(n),t=Wh({},t,u,li);var i=Wh({},t.imports,u.imports,li),o=Pc(i),f=E(i,o);r(o,function(n){if(Mt.test(n))throw new fl(on)});var c,a,l=0,s=t.interpolate||Jt,h="__p+='",p=sl((t.escape||Jt).source+"|"+s.source+"|"+(s===Rt?Nt:Jt).source+"|"+(t.evaluate||Jt).source+"|$","g"),_=bl.call(t,"sourceURL")?"//# sourceURL="+(t.sourceURL+"").replace(/\s/g," ")+"\n":"";
n.replace(p,function(t,r,e,u,i,o){return e||(e=u),h+=n.slice(l,o).replace(Yt,U),r&&(c=true,h+="'+__e("+r+")+'"),i&&(a=true,h+="';"+i+";\n__p+='"),e&&(h+="'+((__t=("+e+"))==null?'':__t)+'"),l=o+t.length,t}),h+="';";var v=bl.call(t,"variable")&&t.variable;if(v){if(Mt.test(v))throw new fl(un)}else h="with(obj){"+h+"}";h=(a?h.replace(bt,""):h).replace(wt,"$1").replace(mt,"$1;"),h="function("+(v||"obj")+"){"+(v?"":"obj||(obj={});")+"var __t,__p=''"+(c?",__e=_.escape":"")+(a?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+h+"return __p}";
var g=Xh(function(){return cl(o,_+"return "+h).apply(X,f)});if(g.source=h,rc(g))throw g;return g}function ma(n){return Ec(n).toLowerCase()}function xa(n){return Ec(n).toUpperCase()}function ja(n,t,r){if(n=Ec(n),n&&(r||t===X))return R(n);if(!n||!(t=vu(t)))return n;var e=G(n),u=G(t);return Iu(e,W(e,u),L(e,u)+1).join("")}function Aa(n,t,r){if(n=Ec(n),n&&(r||t===X))return n.slice(0,H(n)+1);if(!n||!(t=vu(t)))return n;var e=G(n);return Iu(e,0,L(e,G(t))+1).join("")}function ka(n,t,r){if(n=Ec(n),n&&(r||t===X))return n.replace(Ct,"");
if(!n||!(t=vu(t)))return n;var e=G(n);return Iu(e,W(e,G(t))).join("")}function Ia(n,t){var r=kn,e=In;if(fc(t)){var u="separator"in t?t.separator:u;r="length"in t?kc(t.length):r,e="omission"in t?vu(t.omission):e}n=Ec(n);var i=n.length;if(T(n)){var o=G(n);i=o.length}if(r>=i)return n;var f=r-V(e);if(f<1)return e;var c=o?Iu(o,0,f).join(""):n.slice(0,f);if(u===X)return c+e;if(o&&(f+=c.length-f),Ah(u)){if(n.slice(f).search(u)){var a,l=c;for(u.global||(u=sl(u.source,Ec(Pt.exec(u))+"g")),u.lastIndex=0;a=u.exec(l);)var s=a.index;
c=c.slice(0,s===X?f:s)}}else if(n.indexOf(vu(u),f)!=f){var h=c.lastIndexOf(u);h>-1&&(c=c.slice(0,h))}return c+e}function Oa(n){return n=Ec(n),n&&At.test(n)?n.replace(xt,ye):n}function Ra(n,t,r){return n=Ec(n),t=r?X:t,t===X?$(n)?Q(n):_(n):n.match(t)||[]}function za(t){var r=null==t?0:t.length,e=mi();return t=r?c(t,function(n){if("function"!=typeof n[1])throw new pl(en);return[e(n[0]),n[1]]}):[],uu(function(e){for(var u=-1;++u<r;){var i=t[u];if(n(i[0],this,e))return n(i[1],this,e)}})}function Ea(n){
return Pr(Nr(n,ln))}function Sa(n){return function(){return n}}function Wa(n,t){return null==n||n!==n?t:n}function La(n){return n}function Ca(n){return De(typeof n=="function"?n:Nr(n,ln))}function Ua(n){return qe(Nr(n,ln))}function Ba(n,t){return Ze(n,Nr(t,ln))}function Ta(n,t,e){var u=Pc(t),i=fe(t,u);null!=e||fc(t)&&(i.length||!u.length)||(e=t,t=n,n=this,i=fe(t,Pc(t)));var o=!(fc(e)&&"chain"in e&&!e.chain),f=uc(n);return r(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;
if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Tu(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))})}),n}function $a(){return re._===this&&(re._=Al),this}function Da(){}function Ma(n){return n=kc(n),uu(function(t){return Ge(t,n)})}function Fa(n){return Bi(n)?m(no(n)):Qe(n)}function Na(n){return function(t){return null==n?X:_e(n,t)}}function Pa(){return[]}function qa(){return false}function Za(){return{}}function Ka(){return"";
}function Va(){return true}function Ga(n,t){if(n=kc(n),n<1||n>Ln)return[];var r=Bn,e=Hl(n,Bn);t=mi(t),n-=Bn;for(var u=I(e,t);++r<n;)t(r);return u}function Ha(n){return bh(n)?c(n,no):bc(n)?[n]:Tu(Cs(Ec(n)))}function Ja(n){var t=++wl;return Ec(n)+t}function Ya(n){return n&&n.length?Yr(n,La,me):X}function Qa(n,t){return n&&n.length?Yr(n,mi(t,2),me):X}function Xa(n){return w(n,La)}function nl(n,t){return w(n,mi(t,2))}function tl(n){return n&&n.length?Yr(n,La,Ne):X}function rl(n,t){return n&&n.length?Yr(n,mi(t,2),Ne):X;
}function el(n){return n&&n.length?k(n,La):0}function ul(n,t){return n&&n.length?k(n,mi(t,2)):0}x=null==x?re:be.defaults(re.Object(),x,be.pick(re,Zr));var il=x.Array,ol=x.Date,fl=x.Error,cl=x.Function,al=x.Math,ll=x.Object,sl=x.RegExp,hl=x.String,pl=x.TypeError,_l=il.prototype,vl=cl.prototype,gl=ll.prototype,yl=x["__core-js_shared__"],dl=vl.toString,bl=gl.hasOwnProperty,wl=0,ml=function(){var n=/[^.]+$/.exec(yl&&yl.keys&&yl.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),xl=gl.toString,jl=dl.call(ll),Al=re._,kl=sl("^"+dl.call(bl).replace(Wt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Il=ie?x.Buffer:X,Ol=x.Symbol,Rl=x.Uint8Array,zl=Il?Il.allocUnsafe:X,El=F(ll.getPrototypeOf,ll),Sl=ll.create,Wl=gl.propertyIsEnumerable,Ll=_l.splice,Cl=Ol?Ol.isConcatSpreadable:X,Ul=Ol?Ol.iterator:X,Bl=Ol?Ol.toStringTag:X,Tl=function(){
try{var n=Ai(ll,"defineProperty");return n({},"",{}),n}catch(n){}}(),$l=x.clearTimeout!==re.clearTimeout&&x.clearTimeout,Dl=ol&&ol.now!==re.Date.now&&ol.now,Ml=x.setTimeout!==re.setTimeout&&x.setTimeout,Fl=al.ceil,Nl=al.floor,Pl=ll.getOwnPropertySymbols,ql=Il?Il.isBuffer:X,Zl=x.isFinite,Kl=_l.join,Vl=F(ll.keys,ll),Gl=al.max,Hl=al.min,Jl=ol.now,Yl=x.parseInt,Ql=al.random,Xl=_l.reverse,ns=Ai(x,"DataView"),ts=Ai(x,"Map"),rs=Ai(x,"Promise"),es=Ai(x,"Set"),us=Ai(x,"WeakMap"),is=Ai(ll,"create"),os=us&&new us,fs={},cs=to(ns),as=to(ts),ls=to(rs),ss=to(es),hs=to(us),ps=Ol?Ol.prototype:X,_s=ps?ps.valueOf:X,vs=ps?ps.toString:X,gs=function(){
function n(){}return function(t){if(!fc(t))return{};if(Sl)return Sl(t);n.prototype=t;var r=new n;return n.prototype=X,r}}();Z.templateSettings={escape:It,evaluate:Ot,interpolate:Rt,variable:"",imports:{_:Z}},Z.prototype=J.prototype,Z.prototype.constructor=Z,Y.prototype=gs(J.prototype),Y.prototype.constructor=Y,Ut.prototype=gs(J.prototype),Ut.prototype.constructor=Ut,nr.prototype.clear=tr,nr.prototype.delete=rr,nr.prototype.get=er,nr.prototype.has=ur,nr.prototype.set=ir,or.prototype.clear=fr,or.prototype.delete=cr,
or.prototype.get=ar,or.prototype.has=lr,or.prototype.set=sr,hr.prototype.clear=pr,hr.prototype.delete=_r,hr.prototype.get=vr,hr.prototype.has=gr,hr.prototype.set=yr,dr.prototype.add=dr.prototype.push=br,dr.prototype.has=wr,mr.prototype.clear=xr,mr.prototype.delete=jr,mr.prototype.get=Ar,mr.prototype.has=kr,mr.prototype.set=Ir;var ys=Pu(ue),ds=Pu(oe,true),bs=qu(),ws=qu(true),ms=os?function(n,t){return os.set(n,t),n}:La,xs=Tl?function(n,t){return Tl(n,"toString",{configurable:true,enumerable:false,value:Sa(t),
writable:true})}:La,js=uu,As=$l||function(n){return re.clearTimeout(n)},ks=es&&1/P(new es([,-0]))[1]==Wn?function(n){return new es(n)}:Da,Is=os?function(n){return os.get(n)}:Da,Os=Pl?function(n){return null==n?[]:(n=ll(n),i(Pl(n),function(t){return Wl.call(n,t)}))}:Pa,Rs=Pl?function(n){for(var t=[];n;)a(t,Os(n)),n=El(n);return t}:Pa,zs=we;(ns&&zs(new ns(new ArrayBuffer(1)))!=at||ts&&zs(new ts)!=Hn||rs&&zs(rs.resolve())!=Xn||es&&zs(new es)!=rt||us&&zs(new us)!=ot)&&(zs=function(n){var t=we(n),r=t==Qn?n.constructor:X,e=r?to(r):"";
if(e)switch(e){case cs:return at;case as:return Hn;case ls:return Xn;case ss:return rt;case hs:return ot}return t});var Es=yl?uc:qa,Ss=Qi(ms),Ws=Ml||function(n,t){return re.setTimeout(n,t)},Ls=Qi(xs),Cs=Pi(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(St,function(n,r,e,u){t.push(e?u.replace(Ft,"$1"):r||n)}),t}),Us=uu(function(n,t){return Jf(n)?Hr(n,ee(t,1,Jf,true)):[]}),Bs=uu(function(n,t){var r=jo(t);return Jf(r)&&(r=X),Jf(n)?Hr(n,ee(t,1,Jf,true),mi(r,2)):[]}),Ts=uu(function(n,t){
var r=jo(t);return Jf(r)&&(r=X),Jf(n)?Hr(n,ee(t,1,Jf,true),X,r):[]}),$s=uu(function(n){var t=c(n,ju);return t.length&&t[0]===n[0]?ke(t):[]}),Ds=uu(function(n){var t=jo(n),r=c(n,ju);return t===jo(r)?t=X:r.pop(),r.length&&r[0]===n[0]?ke(r,mi(t,2)):[]}),Ms=uu(function(n){var t=jo(n),r=c(n,ju);return t=typeof t=="function"?t:X,t&&r.pop(),r.length&&r[0]===n[0]?ke(r,X,t):[]}),Fs=uu(Io),Ns=gi(function(n,t){var r=null==n?0:n.length,e=$r(n,t);return nu(n,c(t,function(n){return Ci(n,r)?+n:n}).sort(Lu)),e}),Ps=uu(function(n){
return gu(ee(n,1,Jf,true))}),qs=uu(function(n){var t=jo(n);return Jf(t)&&(t=X),gu(ee(n,1,Jf,true),mi(t,2))}),Zs=uu(function(n){var t=jo(n);return t=typeof t=="function"?t:X,gu(ee(n,1,Jf,true),X,t)}),Ks=uu(function(n,t){return Jf(n)?Hr(n,t):[]}),Vs=uu(function(n){return mu(i(n,Jf))}),Gs=uu(function(n){var t=jo(n);return Jf(t)&&(t=X),mu(i(n,Jf),mi(t,2))}),Hs=uu(function(n){var t=jo(n);return t=typeof t=="function"?t:X,mu(i(n,Jf),X,t)}),Js=uu(Go),Ys=uu(function(n){var t=n.length,r=t>1?n[t-1]:X;return r=typeof r=="function"?(n.pop(),
r):X,Ho(n,r)}),Qs=gi(function(n){var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return $r(t,n)};return!(t>1||this.__actions__.length)&&e instanceof Ut&&Ci(r)?(e=e.slice(r,+r+(t?1:0)),e.__actions__.push({func:nf,args:[u],thisArg:X}),new Y(e,this.__chain__).thru(function(n){return t&&!n.length&&n.push(X),n})):this.thru(u)}),Xs=Fu(function(n,t,r){bl.call(n,r)?++n[r]:Tr(n,r,1)}),nh=Ju(ho),th=Ju(po),rh=Fu(function(n,t,r){bl.call(n,r)?n[r].push(t):Tr(n,r,[t])}),eh=uu(function(t,r,e){var u=-1,i=typeof r=="function",o=Hf(t)?il(t.length):[];
return ys(t,function(t){o[++u]=i?n(r,t,e):Oe(t,r,e)}),o}),uh=Fu(function(n,t,r){Tr(n,r,t)}),ih=Fu(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),oh=uu(function(n,t){if(null==n)return[];var r=t.length;return r>1&&Ui(n,t[0],t[1])?t=[]:r>2&&Ui(t[0],t[1],t[2])&&(t=[t[0]]),He(n,ee(t,1),[])}),fh=Dl||function(){return re.Date.now()},ch=uu(function(n,t,r){var e=vn;if(r.length){var u=N(r,wi(ch));e|=wn}return ai(n,e,t,r,u)}),ah=uu(function(n,t,r){var e=vn|gn;if(r.length){var u=N(r,wi(ah));e|=wn;
}return ai(t,e,n,r,u)}),lh=uu(function(n,t){return Gr(n,1,t)}),sh=uu(function(n,t,r){return Gr(n,Oc(t)||0,r)});Cf.Cache=hr;var hh=js(function(t,r){r=1==r.length&&bh(r[0])?c(r[0],z(mi())):c(ee(r,1),z(mi()));var e=r.length;return uu(function(u){for(var i=-1,o=Hl(u.length,e);++i<o;)u[i]=r[i].call(this,u[i]);return n(t,this,u)})}),ph=uu(function(n,t){return ai(n,wn,X,t,N(t,wi(ph)))}),_h=uu(function(n,t){return ai(n,mn,X,t,N(t,wi(_h)))}),vh=gi(function(n,t){return ai(n,jn,X,X,X,t)}),gh=ii(me),yh=ii(function(n,t){
return n>=t}),dh=Re(function(){return arguments}())?Re:function(n){return cc(n)&&bl.call(n,"callee")&&!Wl.call(n,"callee")},bh=il.isArray,wh=ce?z(ce):ze,mh=ql||qa,xh=ae?z(ae):Ee,jh=le?z(le):Le,Ah=se?z(se):Be,kh=he?z(he):Te,Ih=pe?z(pe):$e,Oh=ii(Ne),Rh=ii(function(n,t){return n<=t}),zh=Nu(function(n,t){if(Mi(t)||Hf(t))return $u(t,Pc(t),n),X;for(var r in t)bl.call(t,r)&&Wr(n,r,t[r])}),Eh=Nu(function(n,t){$u(t,qc(t),n)}),Sh=Nu(function(n,t,r,e){$u(t,qc(t),n,e)}),Wh=Nu(function(n,t,r,e){$u(t,Pc(t),n,e);
}),Lh=gi($r),Ch=uu(function(n,t){n=ll(n);var r=-1,e=t.length,u=e>2?t[2]:X;for(u&&Ui(t[0],t[1],u)&&(e=1);++r<e;)for(var i=t[r],o=qc(i),f=-1,c=o.length;++f<c;){var a=o[f],l=n[a];(l===X||Gf(l,gl[a])&&!bl.call(n,a))&&(n[a]=i[a])}return n}),Uh=uu(function(t){return t.push(X,si),n(Mh,X,t)}),Bh=Xu(function(n,t,r){null!=t&&typeof t.toString!="function"&&(t=xl.call(t)),n[t]=r},Sa(La)),Th=Xu(function(n,t,r){null!=t&&typeof t.toString!="function"&&(t=xl.call(t)),bl.call(n,t)?n[t].push(r):n[t]=[r]},mi),$h=uu(Oe),Dh=Nu(function(n,t,r){
Ke(n,t,r)}),Mh=Nu(function(n,t,r,e){Ke(n,t,r,e)}),Fh=gi(function(n,t){var r={};if(null==n)return r;var e=false;t=c(t,function(t){return t=ku(t,n),e||(e=t.length>1),t}),$u(n,di(n),r),e&&(r=Nr(r,ln|sn|hn,hi));for(var u=t.length;u--;)yu(r,t[u]);return r}),Nh=gi(function(n,t){return null==n?{}:Je(n,t)}),Ph=ci(Pc),qh=ci(qc),Zh=Vu(function(n,t,r){return t=t.toLowerCase(),n+(r?fa(t):t)}),Kh=Vu(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Vh=Vu(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Gh=Ku("toLowerCase"),Hh=Vu(function(n,t,r){
return n+(r?"_":"")+t.toLowerCase()}),Jh=Vu(function(n,t,r){return n+(r?" ":"")+Qh(t)}),Yh=Vu(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Qh=Ku("toUpperCase"),Xh=uu(function(t,r){try{return n(t,X,r)}catch(n){return rc(n)?n:new fl(n)}}),np=gi(function(n,t){return r(t,function(t){t=no(t),Tr(n,t,ch(n[t],n))}),n}),tp=Yu(),rp=Yu(true),ep=uu(function(n,t){return function(r){return Oe(r,n,t)}}),up=uu(function(n,t){return function(r){return Oe(n,r,t)}}),ip=ti(c),op=ti(u),fp=ti(h),cp=ui(),ap=ui(true),lp=ni(function(n,t){
return n+t},0),sp=fi("ceil"),hp=ni(function(n,t){return n/t},1),pp=fi("floor"),_p=ni(function(n,t){return n*t},1),vp=fi("round"),gp=ni(function(n,t){return n-t},0);return Z.after=Of,Z.ary=Rf,Z.assign=zh,Z.assignIn=Eh,Z.assignInWith=Sh,Z.assignWith=Wh,Z.at=Lh,Z.before=zf,Z.bind=ch,Z.bindAll=np,Z.bindKey=ah,Z.castArray=Nf,Z.chain=Qo,Z.chunk=uo,Z.compact=io,Z.concat=oo,Z.cond=za,Z.conforms=Ea,Z.constant=Sa,Z.countBy=Xs,Z.create=Sc,Z.curry=Ef,Z.curryRight=Sf,Z.debounce=Wf,Z.defaults=Ch,Z.defaultsDeep=Uh,
Z.defer=lh,Z.delay=sh,Z.difference=Us,Z.differenceBy=Bs,Z.differenceWith=Ts,Z.drop=fo,Z.dropRight=co,Z.dropRightWhile=ao,Z.dropWhile=lo,Z.fill=so,Z.filter=lf,Z.flatMap=sf,Z.flatMapDeep=hf,Z.flatMapDepth=pf,Z.flatten=_o,Z.flattenDeep=vo,Z.flattenDepth=go,Z.flip=Lf,Z.flow=tp,Z.flowRight=rp,Z.fromPairs=yo,Z.functions=$c,Z.functionsIn=Dc,Z.groupBy=rh,Z.initial=mo,Z.intersection=$s,Z.intersectionBy=Ds,Z.intersectionWith=Ms,Z.invert=Bh,Z.invertBy=Th,Z.invokeMap=eh,Z.iteratee=Ca,Z.keyBy=uh,Z.keys=Pc,Z.keysIn=qc,
Z.map=yf,Z.mapKeys=Zc,Z.mapValues=Kc,Z.matches=Ua,Z.matchesProperty=Ba,Z.memoize=Cf,Z.merge=Dh,Z.mergeWith=Mh,Z.method=ep,Z.methodOf=up,Z.mixin=Ta,Z.negate=Uf,Z.nthArg=Ma,Z.omit=Fh,Z.omitBy=Vc,Z.once=Bf,Z.orderBy=df,Z.over=ip,Z.overArgs=hh,Z.overEvery=op,Z.overSome=fp,Z.partial=ph,Z.partialRight=_h,Z.partition=ih,Z.pick=Nh,Z.pickBy=Gc,Z.property=Fa,Z.propertyOf=Na,Z.pull=Fs,Z.pullAll=Io,Z.pullAllBy=Oo,Z.pullAllWith=Ro,Z.pullAt=Ns,Z.range=cp,Z.rangeRight=ap,Z.rearg=vh,Z.reject=mf,Z.remove=zo,Z.rest=Tf,
Z.reverse=Eo,Z.sampleSize=jf,Z.set=Jc,Z.setWith=Yc,Z.shuffle=Af,Z.slice=So,Z.sortBy=oh,Z.sortedUniq=$o,Z.sortedUniqBy=Do,Z.split=da,Z.spread=$f,Z.tail=Mo,Z.take=Fo,Z.takeRight=No,Z.takeRightWhile=Po,Z.takeWhile=qo,Z.tap=Xo,Z.throttle=Df,Z.thru=nf,Z.toArray=jc,Z.toPairs=Ph,Z.toPairsIn=qh,Z.toPath=Ha,Z.toPlainObject=Rc,Z.transform=Qc,Z.unary=Mf,Z.union=Ps,Z.unionBy=qs,Z.unionWith=Zs,Z.uniq=Zo,Z.uniqBy=Ko,Z.uniqWith=Vo,Z.unset=Xc,Z.unzip=Go,Z.unzipWith=Ho,Z.update=na,Z.updateWith=ta,Z.values=ra,Z.valuesIn=ea,
Z.without=Ks,Z.words=Ra,Z.wrap=Ff,Z.xor=Vs,Z.xorBy=Gs,Z.xorWith=Hs,Z.zip=Js,Z.zipObject=Jo,Z.zipObjectDeep=Yo,Z.zipWith=Ys,Z.entries=Ph,Z.entriesIn=qh,Z.extend=Eh,Z.extendWith=Sh,Ta(Z,Z),Z.add=lp,Z.attempt=Xh,Z.camelCase=Zh,Z.capitalize=fa,Z.ceil=sp,Z.clamp=ua,Z.clone=Pf,Z.cloneDeep=Zf,Z.cloneDeepWith=Kf,Z.cloneWith=qf,Z.conformsTo=Vf,Z.deburr=ca,Z.defaultTo=Wa,Z.divide=hp,Z.endsWith=aa,Z.eq=Gf,Z.escape=la,Z.escapeRegExp=sa,Z.every=af,Z.find=nh,Z.findIndex=ho,Z.findKey=Wc,Z.findLast=th,Z.findLastIndex=po,
Z.findLastKey=Lc,Z.floor=pp,Z.forEach=_f,Z.forEachRight=vf,Z.forIn=Cc,Z.forInRight=Uc,Z.forOwn=Bc,Z.forOwnRight=Tc,Z.get=Mc,Z.gt=gh,Z.gte=yh,Z.has=Fc,Z.hasIn=Nc,Z.head=bo,Z.identity=La,Z.includes=gf,Z.indexOf=wo,Z.inRange=ia,Z.invoke=$h,Z.isArguments=dh,Z.isArray=bh,Z.isArrayBuffer=wh,Z.isArrayLike=Hf,Z.isArrayLikeObject=Jf,Z.isBoolean=Yf,Z.isBuffer=mh,Z.isDate=xh,Z.isElement=Qf,Z.isEmpty=Xf,Z.isEqual=nc,Z.isEqualWith=tc,Z.isError=rc,Z.isFinite=ec,Z.isFunction=uc,Z.isInteger=ic,Z.isLength=oc,Z.isMap=jh,
Z.isMatch=ac,Z.isMatchWith=lc,Z.isNaN=sc,Z.isNative=hc,Z.isNil=_c,Z.isNull=pc,Z.isNumber=vc,Z.isObject=fc,Z.isObjectLike=cc,Z.isPlainObject=gc,Z.isRegExp=Ah,Z.isSafeInteger=yc,Z.isSet=kh,Z.isString=dc,Z.isSymbol=bc,Z.isTypedArray=Ih,Z.isUndefined=wc,Z.isWeakMap=mc,Z.isWeakSet=xc,Z.join=xo,Z.kebabCase=Kh,Z.last=jo,Z.lastIndexOf=Ao,Z.lowerCase=Vh,Z.lowerFirst=Gh,Z.lt=Oh,Z.lte=Rh,Z.max=Ya,Z.maxBy=Qa,Z.mean=Xa,Z.meanBy=nl,Z.min=tl,Z.minBy=rl,Z.stubArray=Pa,Z.stubFalse=qa,Z.stubObject=Za,Z.stubString=Ka,
Z.stubTrue=Va,Z.multiply=_p,Z.nth=ko,Z.noConflict=$a,Z.noop=Da,Z.now=fh,Z.pad=ha,Z.padEnd=pa,Z.padStart=_a,Z.parseInt=va,Z.random=oa,Z.reduce=bf,Z.reduceRight=wf,Z.repeat=ga,Z.replace=ya,Z.result=Hc,Z.round=vp,Z.runInContext=p,Z.sample=xf,Z.size=kf,Z.snakeCase=Hh,Z.some=If,Z.sortedIndex=Wo,Z.sortedIndexBy=Lo,Z.sortedIndexOf=Co,Z.sortedLastIndex=Uo,Z.sortedLastIndexBy=Bo,Z.sortedLastIndexOf=To,Z.startCase=Jh,Z.startsWith=ba,Z.subtract=gp,Z.sum=el,Z.sumBy=ul,Z.template=wa,Z.times=Ga,Z.toFinite=Ac,Z.toInteger=kc,
Z.toLength=Ic,Z.toLower=ma,Z.toNumber=Oc,Z.toSafeInteger=zc,Z.toString=Ec,Z.toUpper=xa,Z.trim=ja,Z.trimEnd=Aa,Z.trimStart=ka,Z.truncate=Ia,Z.unescape=Oa,Z.uniqueId=Ja,Z.upperCase=Yh,Z.upperFirst=Qh,Z.each=_f,Z.eachRight=vf,Z.first=bo,Ta(Z,function(){var n={};return ue(Z,function(t,r){bl.call(Z.prototype,r)||(n[r]=t)}),n}(),{chain:false}),Z.VERSION=nn,r(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){Z[n].placeholder=Z}),r(["drop","take"],function(n,t){Ut.prototype[n]=function(r){
r=r===X?1:Gl(kc(r),0);var e=this.__filtered__&&!t?new Ut(this):this.clone();return e.__filtered__?e.__takeCount__=Hl(r,e.__takeCount__):e.__views__.push({size:Hl(r,Bn),type:n+(e.__dir__<0?"Right":"")}),e},Ut.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){var r=t+1,e=r==zn||r==Sn;Ut.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:mi(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){
var r="take"+(t?"Right":"");Ut.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Ut.prototype[n]=function(){return this.__filtered__?new Ut(this):this[r](1)}}),Ut.prototype.compact=function(){return this.filter(La)},Ut.prototype.find=function(n){return this.filter(n).head()},Ut.prototype.findLast=function(n){return this.reverse().find(n)},Ut.prototype.invokeMap=uu(function(n,t){return typeof n=="function"?new Ut(this):this.map(function(r){
return Oe(r,n,t)})}),Ut.prototype.reject=function(n){return this.filter(Uf(mi(n)))},Ut.prototype.slice=function(n,t){n=kc(n);var r=this;return r.__filtered__&&(n>0||t<0)?new Ut(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==X&&(t=kc(t),r=t<0?r.dropRight(-t):r.take(t-n)),r)},Ut.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Ut.prototype.toArray=function(){return this.take(Bn)},ue(Ut.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=Z[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);
u&&(Z.prototype[t]=function(){var t=this.__wrapped__,o=e?[1]:arguments,f=t instanceof Ut,c=o[0],l=f||bh(t),s=function(n){var t=u.apply(Z,a([n],o));return e&&h?t[0]:t};l&&r&&typeof c=="function"&&1!=c.length&&(f=l=false);var h=this.__chain__,p=!!this.__actions__.length,_=i&&!h,v=f&&!p;if(!i&&l){t=v?t:new Ut(this);var g=n.apply(t,o);return g.__actions__.push({func:nf,args:[s],thisArg:X}),new Y(g,h)}return _&&v?n.apply(this,o):(g=this.thru(s),_?e?g.value()[0]:g.value():g)})}),r(["pop","push","shift","sort","splice","unshift"],function(n){
var t=_l[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);Z.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(bh(u)?u:[],n)}return this[r](function(r){return t.apply(bh(r)?r:[],n)})}}),ue(Ut.prototype,function(n,t){var r=Z[t];if(r){var e=r.name+"";bl.call(fs,e)||(fs[e]=[]),fs[e].push({name:t,func:r})}}),fs[Qu(X,gn).name]=[{name:"wrapper",func:X}],Ut.prototype.clone=Dt,Ut.prototype.reverse=Qt,Ut.prototype.value=Xt,Z.prototype.at=Qs,
Z.prototype.chain=tf,Z.prototype.commit=rf,Z.prototype.next=ef,Z.prototype.plant=of,Z.prototype.reverse=ff,Z.prototype.toJSON=Z.prototype.valueOf=Z.prototype.value=cf,Z.prototype.first=Z.prototype.head,Ul&&(Z.prototype[Ul]=uf),Z},be=de();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(re._=be, define(function(){return be})):ue?((ue.exports=be)._=be,ee._=be):re._=be}).call(this);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              dist/vendor/moment.js                                                                               0000644                 00000530463 15212564032 0010654 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       //! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com

;(function (global, factory) {
    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
    typeof define === 'function' && define.amd ? define(factory) :
    global.moment = factory()
}(this, (function () { 'use strict';

    var hookCallback;

    function hooks() {
        return hookCallback.apply(null, arguments);
    }

    // This is done to register the method called with moment()
    // without creating circular dependencies.
    function setHookCallback(callback) {
        hookCallback = callback;
    }

    function isArray(input) {
        return (
            input instanceof Array ||
            Object.prototype.toString.call(input) === '[object Array]'
        );
    }

    function isObject(input) {
        // IE8 will treat undefined and null as object if it wasn't for
        // input != null
        return (
            input != null &&
            Object.prototype.toString.call(input) === '[object Object]'
        );
    }

    function hasOwnProp(a, b) {
        return Object.prototype.hasOwnProperty.call(a, b);
    }

    function isObjectEmpty(obj) {
        if (Object.getOwnPropertyNames) {
            return Object.getOwnPropertyNames(obj).length === 0;
        } else {
            var k;
            for (k in obj) {
                if (hasOwnProp(obj, k)) {
                    return false;
                }
            }
            return true;
        }
    }

    function isUndefined(input) {
        return input === void 0;
    }

    function isNumber(input) {
        return (
            typeof input === 'number' ||
            Object.prototype.toString.call(input) === '[object Number]'
        );
    }

    function isDate(input) {
        return (
            input instanceof Date ||
            Object.prototype.toString.call(input) === '[object Date]'
        );
    }

    function map(arr, fn) {
        var res = [],
            i,
            arrLen = arr.length;
        for (i = 0; i < arrLen; ++i) {
            res.push(fn(arr[i], i));
        }
        return res;
    }

    function extend(a, b) {
        for (var i in b) {
            if (hasOwnProp(b, i)) {
                a[i] = b[i];
            }
        }

        if (hasOwnProp(b, 'toString')) {
            a.toString = b.toString;
        }

        if (hasOwnProp(b, 'valueOf')) {
            a.valueOf = b.valueOf;
        }

        return a;
    }

    function createUTC(input, format, locale, strict) {
        return createLocalOrUTC(input, format, locale, strict, true).utc();
    }

    function defaultParsingFlags() {
        // We need to deep clone this object.
        return {
            empty: false,
            unusedTokens: [],
            unusedInput: [],
            overflow: -2,
            charsLeftOver: 0,
            nullInput: false,
            invalidEra: null,
            invalidMonth: null,
            invalidFormat: false,
            userInvalidated: false,
            iso: false,
            parsedDateParts: [],
            era: null,
            meridiem: null,
            rfc2822: false,
            weekdayMismatch: false,
        };
    }

    function getParsingFlags(m) {
        if (m._pf == null) {
            m._pf = defaultParsingFlags();
        }
        return m._pf;
    }

    var some;
    if (Array.prototype.some) {
        some = Array.prototype.some;
    } else {
        some = function (fun) {
            var t = Object(this),
                len = t.length >>> 0,
                i;

            for (i = 0; i < len; i++) {
                if (i in t && fun.call(this, t[i], i, t)) {
                    return true;
                }
            }

            return false;
        };
    }

    function isValid(m) {
        var flags = null,
            parsedParts = false,
            isNowValid = m._d && !isNaN(m._d.getTime());
        if (isNowValid) {
            flags = getParsingFlags(m);
            parsedParts = some.call(flags.parsedDateParts, function (i) {
                return i != null;
            });
            isNowValid =
                flags.overflow < 0 &&
                !flags.empty &&
                !flags.invalidEra &&
                !flags.invalidMonth &&
                !flags.invalidWeekday &&
                !flags.weekdayMismatch &&
                !flags.nullInput &&
                !flags.invalidFormat &&
                !flags.userInvalidated &&
                (!flags.meridiem || (flags.meridiem && parsedParts));
            if (m._strict) {
                isNowValid =
                    isNowValid &&
                    flags.charsLeftOver === 0 &&
                    flags.unusedTokens.length === 0 &&
                    flags.bigHour === undefined;
            }
        }
        if (Object.isFrozen == null || !Object.isFrozen(m)) {
            m._isValid = isNowValid;
        } else {
            return isNowValid;
        }
        return m._isValid;
    }

    function createInvalid(flags) {
        var m = createUTC(NaN);
        if (flags != null) {
            extend(getParsingFlags(m), flags);
        } else {
            getParsingFlags(m).userInvalidated = true;
        }

        return m;
    }

    // Plugins that add properties should also add the key here (null value),
    // so we can properly clone ourselves.
    var momentProperties = (hooks.momentProperties = []),
        updateInProgress = false;

    function copyConfig(to, from) {
        var i,
            prop,
            val,
            momentPropertiesLen = momentProperties.length;

        if (!isUndefined(from._isAMomentObject)) {
            to._isAMomentObject = from._isAMomentObject;
        }
        if (!isUndefined(from._i)) {
            to._i = from._i;
        }
        if (!isUndefined(from._f)) {
            to._f = from._f;
        }
        if (!isUndefined(from._l)) {
            to._l = from._l;
        }
        if (!isUndefined(from._strict)) {
            to._strict = from._strict;
        }
        if (!isUndefined(from._tzm)) {
            to._tzm = from._tzm;
        }
        if (!isUndefined(from._isUTC)) {
            to._isUTC = from._isUTC;
        }
        if (!isUndefined(from._offset)) {
            to._offset = from._offset;
        }
        if (!isUndefined(from._pf)) {
            to._pf = getParsingFlags(from);
        }
        if (!isUndefined(from._locale)) {
            to._locale = from._locale;
        }

        if (momentPropertiesLen > 0) {
            for (i = 0; i < momentPropertiesLen; i++) {
                prop = momentProperties[i];
                val = from[prop];
                if (!isUndefined(val)) {
                    to[prop] = val;
                }
            }
        }

        return to;
    }

    // Moment prototype object
    function Moment(config) {
        copyConfig(this, config);
        this._d = new Date(config._d != null ? config._d.getTime() : NaN);
        if (!this.isValid()) {
            this._d = new Date(NaN);
        }
        // Prevent infinite loop in case updateOffset creates new moment
        // objects.
        if (updateInProgress === false) {
            updateInProgress = true;
            hooks.updateOffset(this);
            updateInProgress = false;
        }
    }

    function isMoment(obj) {
        return (
            obj instanceof Moment || (obj != null && obj._isAMomentObject != null)
        );
    }

    function warn(msg) {
        if (
            hooks.suppressDeprecationWarnings === false &&
            typeof console !== 'undefined' &&
            console.warn
        ) {
            console.warn('Deprecation warning: ' + msg);
        }
    }

    function deprecate(msg, fn) {
        var firstTime = true;

        return extend(function () {
            if (hooks.deprecationHandler != null) {
                hooks.deprecationHandler(null, msg);
            }
            if (firstTime) {
                var args = [],
                    arg,
                    i,
                    key,
                    argLen = arguments.length;
                for (i = 0; i < argLen; i++) {
                    arg = '';
                    if (typeof arguments[i] === 'object') {
                        arg += '\n[' + i + '] ';
                        for (key in arguments[0]) {
                            if (hasOwnProp(arguments[0], key)) {
                                arg += key + ': ' + arguments[0][key] + ', ';
                            }
                        }
                        arg = arg.slice(0, -2); // Remove trailing comma and space
                    } else {
                        arg = arguments[i];
                    }
                    args.push(arg);
                }
                warn(
                    msg +
                        '\nArguments: ' +
                        Array.prototype.slice.call(args).join('') +
                        '\n' +
                        new Error().stack
                );
                firstTime = false;
            }
            return fn.apply(this, arguments);
        }, fn);
    }

    var deprecations = {};

    function deprecateSimple(name, msg) {
        if (hooks.deprecationHandler != null) {
            hooks.deprecationHandler(name, msg);
        }
        if (!deprecations[name]) {
            warn(msg);
            deprecations[name] = true;
        }
    }

    hooks.suppressDeprecationWarnings = false;
    hooks.deprecationHandler = null;

    function isFunction(input) {
        return (
            (typeof Function !== 'undefined' && input instanceof Function) ||
            Object.prototype.toString.call(input) === '[object Function]'
        );
    }

    function set(config) {
        var prop, i;
        for (i in config) {
            if (hasOwnProp(config, i)) {
                prop = config[i];
                if (isFunction(prop)) {
                    this[i] = prop;
                } else {
                    this['_' + i] = prop;
                }
            }
        }
        this._config = config;
        // Lenient ordinal parsing accepts just a number in addition to
        // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
        // TODO: Remove "ordinalParse" fallback in next major release.
        this._dayOfMonthOrdinalParseLenient = new RegExp(
            (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
                '|' +
                /\d{1,2}/.source
        );
    }

    function mergeConfigs(parentConfig, childConfig) {
        var res = extend({}, parentConfig),
            prop;
        for (prop in childConfig) {
            if (hasOwnProp(childConfig, prop)) {
                if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
                    res[prop] = {};
                    extend(res[prop], parentConfig[prop]);
                    extend(res[prop], childConfig[prop]);
                } else if (childConfig[prop] != null) {
                    res[prop] = childConfig[prop];
                } else {
                    delete res[prop];
                }
            }
        }
        for (prop in parentConfig) {
            if (
                hasOwnProp(parentConfig, prop) &&
                !hasOwnProp(childConfig, prop) &&
                isObject(parentConfig[prop])
            ) {
                // make sure changes to properties don't modify parent config
                res[prop] = extend({}, res[prop]);
            }
        }
        return res;
    }

    function Locale(config) {
        if (config != null) {
            this.set(config);
        }
    }

    var keys;

    if (Object.keys) {
        keys = Object.keys;
    } else {
        keys = function (obj) {
            var i,
                res = [];
            for (i in obj) {
                if (hasOwnProp(obj, i)) {
                    res.push(i);
                }
            }
            return res;
        };
    }

    var defaultCalendar = {
        sameDay: '[Today at] LT',
        nextDay: '[Tomorrow at] LT',
        nextWeek: 'dddd [at] LT',
        lastDay: '[Yesterday at] LT',
        lastWeek: '[Last] dddd [at] LT',
        sameElse: 'L',
    };

    function calendar(key, mom, now) {
        var output = this._calendar[key] || this._calendar['sameElse'];
        return isFunction(output) ? output.call(mom, now) : output;
    }

    function zeroFill(number, targetLength, forceSign) {
        var absNumber = '' + Math.abs(number),
            zerosToFill = targetLength - absNumber.length,
            sign = number >= 0;
        return (
            (sign ? (forceSign ? '+' : '') : '-') +
            Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +
            absNumber
        );
    }

    var formattingTokens =
            /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
        localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
        formatFunctions = {},
        formatTokenFunctions = {};

    // token:    'M'
    // padded:   ['MM', 2]
    // ordinal:  'Mo'
    // callback: function () { this.month() + 1 }
    function addFormatToken(token, padded, ordinal, callback) {
        var func = callback;
        if (typeof callback === 'string') {
            func = function () {
                return this[callback]();
            };
        }
        if (token) {
            formatTokenFunctions[token] = func;
        }
        if (padded) {
            formatTokenFunctions[padded[0]] = function () {
                return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
            };
        }
        if (ordinal) {
            formatTokenFunctions[ordinal] = function () {
                return this.localeData().ordinal(
                    func.apply(this, arguments),
                    token
                );
            };
        }
    }

    function removeFormattingTokens(input) {
        if (input.match(/\[[\s\S]/)) {
            return input.replace(/^\[|\]$/g, '');
        }
        return input.replace(/\\/g, '');
    }

    function makeFormatFunction(format) {
        var array = format.match(formattingTokens),
            i,
            length;

        for (i = 0, length = array.length; i < length; i++) {
            if (formatTokenFunctions[array[i]]) {
                array[i] = formatTokenFunctions[array[i]];
            } else {
                array[i] = removeFormattingTokens(array[i]);
            }
        }

        return function (mom) {
            var output = '',
                i;
            for (i = 0; i < length; i++) {
                output += isFunction(array[i])
                    ? array[i].call(mom, format)
                    : array[i];
            }
            return output;
        };
    }

    // format date using native date object
    function formatMoment(m, format) {
        if (!m.isValid()) {
            return m.localeData().invalidDate();
        }

        format = expandFormat(format, m.localeData());
        formatFunctions[format] =
            formatFunctions[format] || makeFormatFunction(format);

        return formatFunctions[format](m);
    }

    function expandFormat(format, locale) {
        var i = 5;

        function replaceLongDateFormatTokens(input) {
            return locale.longDateFormat(input) || input;
        }

        localFormattingTokens.lastIndex = 0;
        while (i >= 0 && localFormattingTokens.test(format)) {
            format = format.replace(
                localFormattingTokens,
                replaceLongDateFormatTokens
            );
            localFormattingTokens.lastIndex = 0;
            i -= 1;
        }

        return format;
    }

    var defaultLongDateFormat = {
        LTS: 'h:mm:ss A',
        LT: 'h:mm A',
        L: 'MM/DD/YYYY',
        LL: 'MMMM D, YYYY',
        LLL: 'MMMM D, YYYY h:mm A',
        LLLL: 'dddd, MMMM D, YYYY h:mm A',
    };

    function longDateFormat(key) {
        var format = this._longDateFormat[key],
            formatUpper = this._longDateFormat[key.toUpperCase()];

        if (format || !formatUpper) {
            return format;
        }

        this._longDateFormat[key] = formatUpper
            .match(formattingTokens)
            .map(function (tok) {
                if (
                    tok === 'MMMM' ||
                    tok === 'MM' ||
                    tok === 'DD' ||
                    tok === 'dddd'
                ) {
                    return tok.slice(1);
                }
                return tok;
            })
            .join('');

        return this._longDateFormat[key];
    }

    var defaultInvalidDate = 'Invalid date';

    function invalidDate() {
        return this._invalidDate;
    }

    var defaultOrdinal = '%d',
        defaultDayOfMonthOrdinalParse = /\d{1,2}/;

    function ordinal(number) {
        return this._ordinal.replace('%d', number);
    }

    var defaultRelativeTime = {
        future: 'in %s',
        past: '%s ago',
        s: 'a few seconds',
        ss: '%d seconds',
        m: 'a minute',
        mm: '%d minutes',
        h: 'an hour',
        hh: '%d hours',
        d: 'a day',
        dd: '%d days',
        w: 'a week',
        ww: '%d weeks',
        M: 'a month',
        MM: '%d months',
        y: 'a year',
        yy: '%d years',
    };

    function relativeTime(number, withoutSuffix, string, isFuture) {
        var output = this._relativeTime[string];
        return isFunction(output)
            ? output(number, withoutSuffix, string, isFuture)
            : output.replace(/%d/i, number);
    }

    function pastFuture(diff, output) {
        var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
        return isFunction(format) ? format(output) : format.replace(/%s/i, output);
    }

    var aliases = {
        D: 'date',
        dates: 'date',
        date: 'date',
        d: 'day',
        days: 'day',
        day: 'day',
        e: 'weekday',
        weekdays: 'weekday',
        weekday: 'weekday',
        E: 'isoWeekday',
        isoweekdays: 'isoWeekday',
        isoweekday: 'isoWeekday',
        DDD: 'dayOfYear',
        dayofyears: 'dayOfYear',
        dayofyear: 'dayOfYear',
        h: 'hour',
        hours: 'hour',
        hour: 'hour',
        ms: 'millisecond',
        milliseconds: 'millisecond',
        millisecond: 'millisecond',
        m: 'minute',
        minutes: 'minute',
        minute: 'minute',
        M: 'month',
        months: 'month',
        month: 'month',
        Q: 'quarter',
        quarters: 'quarter',
        quarter: 'quarter',
        s: 'second',
        seconds: 'second',
        second: 'second',
        gg: 'weekYear',
        weekyears: 'weekYear',
        weekyear: 'weekYear',
        GG: 'isoWeekYear',
        isoweekyears: 'isoWeekYear',
        isoweekyear: 'isoWeekYear',
        w: 'week',
        weeks: 'week',
        week: 'week',
        W: 'isoWeek',
        isoweeks: 'isoWeek',
        isoweek: 'isoWeek',
        y: 'year',
        years: 'year',
        year: 'year',
    };

    function normalizeUnits(units) {
        return typeof units === 'string'
            ? aliases[units] || aliases[units.toLowerCase()]
            : undefined;
    }

    function normalizeObjectUnits(inputObject) {
        var normalizedInput = {},
            normalizedProp,
            prop;

        for (prop in inputObject) {
            if (hasOwnProp(inputObject, prop)) {
                normalizedProp = normalizeUnits(prop);
                if (normalizedProp) {
                    normalizedInput[normalizedProp] = inputObject[prop];
                }
            }
        }

        return normalizedInput;
    }

    var priorities = {
        date: 9,
        day: 11,
        weekday: 11,
        isoWeekday: 11,
        dayOfYear: 4,
        hour: 13,
        millisecond: 16,
        minute: 14,
        month: 8,
        quarter: 7,
        second: 15,
        weekYear: 1,
        isoWeekYear: 1,
        week: 5,
        isoWeek: 5,
        year: 1,
    };

    function getPrioritizedUnits(unitsObj) {
        var units = [],
            u;
        for (u in unitsObj) {
            if (hasOwnProp(unitsObj, u)) {
                units.push({ unit: u, priority: priorities[u] });
            }
        }
        units.sort(function (a, b) {
            return a.priority - b.priority;
        });
        return units;
    }

    var match1 = /\d/, //       0 - 9
        match2 = /\d\d/, //      00 - 99
        match3 = /\d{3}/, //     000 - 999
        match4 = /\d{4}/, //    0000 - 9999
        match6 = /[+-]?\d{6}/, // -999999 - 999999
        match1to2 = /\d\d?/, //       0 - 99
        match3to4 = /\d\d\d\d?/, //     999 - 9999
        match5to6 = /\d\d\d\d\d\d?/, //   99999 - 999999
        match1to3 = /\d{1,3}/, //       0 - 999
        match1to4 = /\d{1,4}/, //       0 - 9999
        match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999
        matchUnsigned = /\d+/, //       0 - inf
        matchSigned = /[+-]?\d+/, //    -inf - inf
        matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
        matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z
        matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
        // any word (or two) characters or numbers including two/three word month in arabic.
        // includes scottish gaelic two word and hyphenated months
        matchWord =
            /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
        match1to2NoLeadingZero = /^[1-9]\d?/, //         1-99
        match1to2HasZero = /^([1-9]\d|\d)/, //           0-99
        regexes;

    regexes = {};

    function addRegexToken(token, regex, strictRegex) {
        regexes[token] = isFunction(regex)
            ? regex
            : function (isStrict, localeData) {
                  return isStrict && strictRegex ? strictRegex : regex;
              };
    }

    function getParseRegexForToken(token, config) {
        if (!hasOwnProp(regexes, token)) {
            return new RegExp(unescapeFormat(token));
        }

        return regexes[token](config._strict, config._locale);
    }

    // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
    function unescapeFormat(s) {
        return regexEscape(
            s
                .replace('\\', '')
                .replace(
                    /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
                    function (matched, p1, p2, p3, p4) {
                        return p1 || p2 || p3 || p4;
                    }
                )
        );
    }

    function regexEscape(s) {
        return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
    }

    function absFloor(number) {
        if (number < 0) {
            // -0 -> 0
            return Math.ceil(number) || 0;
        } else {
            return Math.floor(number);
        }
    }

    function toInt(argumentForCoercion) {
        var coercedNumber = +argumentForCoercion,
            value = 0;

        if (coercedNumber !== 0 && isFinite(coercedNumber)) {
            value = absFloor(coercedNumber);
        }

        return value;
    }

    var tokens = {};

    function addParseToken(token, callback) {
        var i,
            func = callback,
            tokenLen;
        if (typeof token === 'string') {
            token = [token];
        }
        if (isNumber(callback)) {
            func = function (input, array) {
                array[callback] = toInt(input);
            };
        }
        tokenLen = token.length;
        for (i = 0; i < tokenLen; i++) {
            tokens[token[i]] = func;
        }
    }

    function addWeekParseToken(token, callback) {
        addParseToken(token, function (input, array, config, token) {
            config._w = config._w || {};
            callback(input, config._w, config, token);
        });
    }

    function addTimeToArrayFromToken(token, input, config) {
        if (input != null && hasOwnProp(tokens, token)) {
            tokens[token](input, config._a, config, token);
        }
    }

    function isLeapYear(year) {
        return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
    }

    var YEAR = 0,
        MONTH = 1,
        DATE = 2,
        HOUR = 3,
        MINUTE = 4,
        SECOND = 5,
        MILLISECOND = 6,
        WEEK = 7,
        WEEKDAY = 8;

    // FORMATTING

    addFormatToken('Y', 0, 0, function () {
        var y = this.year();
        return y <= 9999 ? zeroFill(y, 4) : '+' + y;
    });

    addFormatToken(0, ['YY', 2], 0, function () {
        return this.year() % 100;
    });

    addFormatToken(0, ['YYYY', 4], 0, 'year');
    addFormatToken(0, ['YYYYY', 5], 0, 'year');
    addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');

    // PARSING

    addRegexToken('Y', matchSigned);
    addRegexToken('YY', match1to2, match2);
    addRegexToken('YYYY', match1to4, match4);
    addRegexToken('YYYYY', match1to6, match6);
    addRegexToken('YYYYYY', match1to6, match6);

    addParseToken(['YYYYY', 'YYYYYY'], YEAR);
    addParseToken('YYYY', function (input, array) {
        array[YEAR] =
            input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
    });
    addParseToken('YY', function (input, array) {
        array[YEAR] = hooks.parseTwoDigitYear(input);
    });
    addParseToken('Y', function (input, array) {
        array[YEAR] = parseInt(input, 10);
    });

    // HELPERS

    function daysInYear(year) {
        return isLeapYear(year) ? 366 : 365;
    }

    // HOOKS

    hooks.parseTwoDigitYear = function (input) {
        return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
    };

    // MOMENTS

    var getSetYear = makeGetSet('FullYear', true);

    function getIsLeapYear() {
        return isLeapYear(this.year());
    }

    function makeGetSet(unit, keepTime) {
        return function (value) {
            if (value != null) {
                set$1(this, unit, value);
                hooks.updateOffset(this, keepTime);
                return this;
            } else {
                return get(this, unit);
            }
        };
    }

    function get(mom, unit) {
        if (!mom.isValid()) {
            return NaN;
        }

        var d = mom._d,
            isUTC = mom._isUTC;

        switch (unit) {
            case 'Milliseconds':
                return isUTC ? d.getUTCMilliseconds() : d.getMilliseconds();
            case 'Seconds':
                return isUTC ? d.getUTCSeconds() : d.getSeconds();
            case 'Minutes':
                return isUTC ? d.getUTCMinutes() : d.getMinutes();
            case 'Hours':
                return isUTC ? d.getUTCHours() : d.getHours();
            case 'Date':
                return isUTC ? d.getUTCDate() : d.getDate();
            case 'Day':
                return isUTC ? d.getUTCDay() : d.getDay();
            case 'Month':
                return isUTC ? d.getUTCMonth() : d.getMonth();
            case 'FullYear':
                return isUTC ? d.getUTCFullYear() : d.getFullYear();
            default:
                return NaN; // Just in case
        }
    }

    function set$1(mom, unit, value) {
        var d, isUTC, year, month, date;

        if (!mom.isValid() || isNaN(value)) {
            return;
        }

        d = mom._d;
        isUTC = mom._isUTC;

        switch (unit) {
            case 'Milliseconds':
                return void (isUTC
                    ? d.setUTCMilliseconds(value)
                    : d.setMilliseconds(value));
            case 'Seconds':
                return void (isUTC ? d.setUTCSeconds(value) : d.setSeconds(value));
            case 'Minutes':
                return void (isUTC ? d.setUTCMinutes(value) : d.setMinutes(value));
            case 'Hours':
                return void (isUTC ? d.setUTCHours(value) : d.setHours(value));
            case 'Date':
                return void (isUTC ? d.setUTCDate(value) : d.setDate(value));
            // case 'Day': // Not real
            //    return void (isUTC ? d.setUTCDay(value) : d.setDay(value));
            // case 'Month': // Not used because we need to pass two variables
            //     return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value));
            case 'FullYear':
                break; // See below ...
            default:
                return; // Just in case
        }

        year = value;
        month = mom.month();
        date = mom.date();
        date = date === 29 && month === 1 && !isLeapYear(year) ? 28 : date;
        void (isUTC
            ? d.setUTCFullYear(year, month, date)
            : d.setFullYear(year, month, date));
    }

    // MOMENTS

    function stringGet(units) {
        units = normalizeUnits(units);
        if (isFunction(this[units])) {
            return this[units]();
        }
        return this;
    }

    function stringSet(units, value) {
        if (typeof units === 'object') {
            units = normalizeObjectUnits(units);
            var prioritized = getPrioritizedUnits(units),
                i,
                prioritizedLen = prioritized.length;
            for (i = 0; i < prioritizedLen; i++) {
                this[prioritized[i].unit](units[prioritized[i].unit]);
            }
        } else {
            units = normalizeUnits(units);
            if (isFunction(this[units])) {
                return this[units](value);
            }
        }
        return this;
    }

    function mod(n, x) {
        return ((n % x) + x) % x;
    }

    var indexOf;

    if (Array.prototype.indexOf) {
        indexOf = Array.prototype.indexOf;
    } else {
        indexOf = function (o) {
            // I know
            var i;
            for (i = 0; i < this.length; ++i) {
                if (this[i] === o) {
                    return i;
                }
            }
            return -1;
        };
    }

    function daysInMonth(year, month) {
        if (isNaN(year) || isNaN(month)) {
            return NaN;
        }
        var modMonth = mod(month, 12);
        year += (month - modMonth) / 12;
        return modMonth === 1
            ? isLeapYear(year)
                ? 29
                : 28
            : 31 - ((modMonth % 7) % 2);
    }

    // FORMATTING

    addFormatToken('M', ['MM', 2], 'Mo', function () {
        return this.month() + 1;
    });

    addFormatToken('MMM', 0, 0, function (format) {
        return this.localeData().monthsShort(this, format);
    });

    addFormatToken('MMMM', 0, 0, function (format) {
        return this.localeData().months(this, format);
    });

    // PARSING

    addRegexToken('M', match1to2, match1to2NoLeadingZero);
    addRegexToken('MM', match1to2, match2);
    addRegexToken('MMM', function (isStrict, locale) {
        return locale.monthsShortRegex(isStrict);
    });
    addRegexToken('MMMM', function (isStrict, locale) {
        return locale.monthsRegex(isStrict);
    });

    addParseToken(['M', 'MM'], function (input, array) {
        array[MONTH] = toInt(input) - 1;
    });

    addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
        var month = config._locale.monthsParse(input, token, config._strict);
        // if we didn't find a month name, mark the date as invalid.
        if (month != null) {
            array[MONTH] = month;
        } else {
            getParsingFlags(config).invalidMonth = input;
        }
    });

    // LOCALES

    var defaultLocaleMonths =
            'January_February_March_April_May_June_July_August_September_October_November_December'.split(
                '_'
            ),
        defaultLocaleMonthsShort =
            'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
        MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
        defaultMonthsShortRegex = matchWord,
        defaultMonthsRegex = matchWord;

    function localeMonths(m, format) {
        if (!m) {
            return isArray(this._months)
                ? this._months
                : this._months['standalone'];
        }
        return isArray(this._months)
            ? this._months[m.month()]
            : this._months[
                  (this._months.isFormat || MONTHS_IN_FORMAT).test(format)
                      ? 'format'
                      : 'standalone'
              ][m.month()];
    }

    function localeMonthsShort(m, format) {
        if (!m) {
            return isArray(this._monthsShort)
                ? this._monthsShort
                : this._monthsShort['standalone'];
        }
        return isArray(this._monthsShort)
            ? this._monthsShort[m.month()]
            : this._monthsShort[
                  MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'
              ][m.month()];
    }

    function handleStrictParse(monthName, format, strict) {
        var i,
            ii,
            mom,
            llc = monthName.toLocaleLowerCase();
        if (!this._monthsParse) {
            // this is not used
            this._monthsParse = [];
            this._longMonthsParse = [];
            this._shortMonthsParse = [];
            for (i = 0; i < 12; ++i) {
                mom = createUTC([2000, i]);
                this._shortMonthsParse[i] = this.monthsShort(
                    mom,
                    ''
                ).toLocaleLowerCase();
                this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
            }
        }

        if (strict) {
            if (format === 'MMM') {
                ii = indexOf.call(this._shortMonthsParse, llc);
                return ii !== -1 ? ii : null;
            } else {
                ii = indexOf.call(this._longMonthsParse, llc);
                return ii !== -1 ? ii : null;
            }
        } else {
            if (format === 'MMM') {
                ii = indexOf.call(this._shortMonthsParse, llc);
                if (ii !== -1) {
                    return ii;
                }
                ii = indexOf.call(this._longMonthsParse, llc);
                return ii !== -1 ? ii : null;
            } else {
                ii = indexOf.call(this._longMonthsParse, llc);
                if (ii !== -1) {
                    return ii;
                }
                ii = indexOf.call(this._shortMonthsParse, llc);
                return ii !== -1 ? ii : null;
            }
        }
    }

    function localeMonthsParse(monthName, format, strict) {
        var i, mom, regex;

        if (this._monthsParseExact) {
            return handleStrictParse.call(this, monthName, format, strict);
        }

        if (!this._monthsParse) {
            this._monthsParse = [];
            this._longMonthsParse = [];
            this._shortMonthsParse = [];
        }

        // TODO: add sorting
        // Sorting makes sure if one month (or abbr) is a prefix of another
        // see sorting in computeMonthsParse
        for (i = 0; i < 12; i++) {
            // make the regex if we don't have it already
            mom = createUTC([2000, i]);
            if (strict && !this._longMonthsParse[i]) {
                this._longMonthsParse[i] = new RegExp(
                    '^' + this.months(mom, '').replace('.', '') + '$',
                    'i'
                );
                this._shortMonthsParse[i] = new RegExp(
                    '^' + this.monthsShort(mom, '').replace('.', '') + '$',
                    'i'
                );
            }
            if (!strict && !this._monthsParse[i]) {
                regex =
                    '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
                this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
            }
            // test the regex
            if (
                strict &&
                format === 'MMMM' &&
                this._longMonthsParse[i].test(monthName)
            ) {
                return i;
            } else if (
                strict &&
                format === 'MMM' &&
                this._shortMonthsParse[i].test(monthName)
            ) {
                return i;
            } else if (!strict && this._monthsParse[i].test(monthName)) {
                return i;
            }
        }
    }

    // MOMENTS

    function setMonth(mom, value) {
        if (!mom.isValid()) {
            // No op
            return mom;
        }

        if (typeof value === 'string') {
            if (/^\d+$/.test(value)) {
                value = toInt(value);
            } else {
                value = mom.localeData().monthsParse(value);
                // TODO: Another silent failure?
                if (!isNumber(value)) {
                    return mom;
                }
            }
        }

        var month = value,
            date = mom.date();

        date = date < 29 ? date : Math.min(date, daysInMonth(mom.year(), month));
        void (mom._isUTC
            ? mom._d.setUTCMonth(month, date)
            : mom._d.setMonth(month, date));
        return mom;
    }

    function getSetMonth(value) {
        if (value != null) {
            setMonth(this, value);
            hooks.updateOffset(this, true);
            return this;
        } else {
            return get(this, 'Month');
        }
    }

    function getDaysInMonth() {
        return daysInMonth(this.year(), this.month());
    }

    function monthsShortRegex(isStrict) {
        if (this._monthsParseExact) {
            if (!hasOwnProp(this, '_monthsRegex')) {
                computeMonthsParse.call(this);
            }
            if (isStrict) {
                return this._monthsShortStrictRegex;
            } else {
                return this._monthsShortRegex;
            }
        } else {
            if (!hasOwnProp(this, '_monthsShortRegex')) {
                this._monthsShortRegex = defaultMonthsShortRegex;
            }
            return this._monthsShortStrictRegex && isStrict
                ? this._monthsShortStrictRegex
                : this._monthsShortRegex;
        }
    }

    function monthsRegex(isStrict) {
        if (this._monthsParseExact) {
            if (!hasOwnProp(this, '_monthsRegex')) {
                computeMonthsParse.call(this);
            }
            if (isStrict) {
                return this._monthsStrictRegex;
            } else {
                return this._monthsRegex;
            }
        } else {
            if (!hasOwnProp(this, '_monthsRegex')) {
                this._monthsRegex = defaultMonthsRegex;
            }
            return this._monthsStrictRegex && isStrict
                ? this._monthsStrictRegex
                : this._monthsRegex;
        }
    }

    function computeMonthsParse() {
        function cmpLenRev(a, b) {
            return b.length - a.length;
        }

        var shortPieces = [],
            longPieces = [],
            mixedPieces = [],
            i,
            mom,
            shortP,
            longP;
        for (i = 0; i < 12; i++) {
            // make the regex if we don't have it already
            mom = createUTC([2000, i]);
            shortP = regexEscape(this.monthsShort(mom, ''));
            longP = regexEscape(this.months(mom, ''));
            shortPieces.push(shortP);
            longPieces.push(longP);
            mixedPieces.push(longP);
            mixedPieces.push(shortP);
        }
        // Sorting makes sure if one month (or abbr) is a prefix of another it
        // will match the longer piece.
        shortPieces.sort(cmpLenRev);
        longPieces.sort(cmpLenRev);
        mixedPieces.sort(cmpLenRev);

        this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
        this._monthsShortRegex = this._monthsRegex;
        this._monthsStrictRegex = new RegExp(
            '^(' + longPieces.join('|') + ')',
            'i'
        );
        this._monthsShortStrictRegex = new RegExp(
            '^(' + shortPieces.join('|') + ')',
            'i'
        );
    }

    function createDate(y, m, d, h, M, s, ms) {
        // can't just apply() to create a date:
        // https://stackoverflow.com/q/181348
        var date;
        // the date constructor remaps years 0-99 to 1900-1999
        if (y < 100 && y >= 0) {
            // preserve leap years using a full 400 year cycle, then reset
            date = new Date(y + 400, m, d, h, M, s, ms);
            if (isFinite(date.getFullYear())) {
                date.setFullYear(y);
            }
        } else {
            date = new Date(y, m, d, h, M, s, ms);
        }

        return date;
    }

    function createUTCDate(y) {
        var date, args;
        // the Date.UTC function remaps years 0-99 to 1900-1999
        if (y < 100 && y >= 0) {
            args = Array.prototype.slice.call(arguments);
            // preserve leap years using a full 400 year cycle, then reset
            args[0] = y + 400;
            date = new Date(Date.UTC.apply(null, args));
            if (isFinite(date.getUTCFullYear())) {
                date.setUTCFullYear(y);
            }
        } else {
            date = new Date(Date.UTC.apply(null, arguments));
        }

        return date;
    }

    // start-of-first-week - start-of-year
    function firstWeekOffset(year, dow, doy) {
        var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
            fwd = 7 + dow - doy,
            // first-week day local weekday -- which local weekday is fwd
            fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;

        return -fwdlw + fwd - 1;
    }

    // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
    function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
        var localWeekday = (7 + weekday - dow) % 7,
            weekOffset = firstWeekOffset(year, dow, doy),
            dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
            resYear,
            resDayOfYear;

        if (dayOfYear <= 0) {
            resYear = year - 1;
            resDayOfYear = daysInYear(resYear) + dayOfYear;
        } else if (dayOfYear > daysInYear(year)) {
            resYear = year + 1;
            resDayOfYear = dayOfYear - daysInYear(year);
        } else {
            resYear = year;
            resDayOfYear = dayOfYear;
        }

        return {
            year: resYear,
            dayOfYear: resDayOfYear,
        };
    }

    function weekOfYear(mom, dow, doy) {
        var weekOffset = firstWeekOffset(mom.year(), dow, doy),
            week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
            resWeek,
            resYear;

        if (week < 1) {
            resYear = mom.year() - 1;
            resWeek = week + weeksInYear(resYear, dow, doy);
        } else if (week > weeksInYear(mom.year(), dow, doy)) {
            resWeek = week - weeksInYear(mom.year(), dow, doy);
            resYear = mom.year() + 1;
        } else {
            resYear = mom.year();
            resWeek = week;
        }

        return {
            week: resWeek,
            year: resYear,
        };
    }

    function weeksInYear(year, dow, doy) {
        var weekOffset = firstWeekOffset(year, dow, doy),
            weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
        return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
    }

    // FORMATTING

    addFormatToken('w', ['ww', 2], 'wo', 'week');
    addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');

    // PARSING

    addRegexToken('w', match1to2, match1to2NoLeadingZero);
    addRegexToken('ww', match1to2, match2);
    addRegexToken('W', match1to2, match1to2NoLeadingZero);
    addRegexToken('WW', match1to2, match2);

    addWeekParseToken(
        ['w', 'ww', 'W', 'WW'],
        function (input, week, config, token) {
            week[token.substr(0, 1)] = toInt(input);
        }
    );

    // HELPERS

    // LOCALES

    function localeWeek(mom) {
        return weekOfYear(mom, this._week.dow, this._week.doy).week;
    }

    var defaultLocaleWeek = {
        dow: 0, // Sunday is the first day of the week.
        doy: 6, // The week that contains Jan 6th is the first week of the year.
    };

    function localeFirstDayOfWeek() {
        return this._week.dow;
    }

    function localeFirstDayOfYear() {
        return this._week.doy;
    }

    // MOMENTS

    function getSetWeek(input) {
        var week = this.localeData().week(this);
        return input == null ? week : this.add((input - week) * 7, 'd');
    }

    function getSetISOWeek(input) {
        var week = weekOfYear(this, 1, 4).week;
        return input == null ? week : this.add((input - week) * 7, 'd');
    }

    // FORMATTING

    addFormatToken('d', 0, 'do', 'day');

    addFormatToken('dd', 0, 0, function (format) {
        return this.localeData().weekdaysMin(this, format);
    });

    addFormatToken('ddd', 0, 0, function (format) {
        return this.localeData().weekdaysShort(this, format);
    });

    addFormatToken('dddd', 0, 0, function (format) {
        return this.localeData().weekdays(this, format);
    });

    addFormatToken('e', 0, 0, 'weekday');
    addFormatToken('E', 0, 0, 'isoWeekday');

    // PARSING

    addRegexToken('d', match1to2);
    addRegexToken('e', match1to2);
    addRegexToken('E', match1to2);
    addRegexToken('dd', function (isStrict, locale) {
        return locale.weekdaysMinRegex(isStrict);
    });
    addRegexToken('ddd', function (isStrict, locale) {
        return locale.weekdaysShortRegex(isStrict);
    });
    addRegexToken('dddd', function (isStrict, locale) {
        return locale.weekdaysRegex(isStrict);
    });

    addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
        var weekday = config._locale.weekdaysParse(input, token, config._strict);
        // if we didn't get a weekday name, mark the date as invalid
        if (weekday != null) {
            week.d = weekday;
        } else {
            getParsingFlags(config).invalidWeekday = input;
        }
    });

    addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
        week[token] = toInt(input);
    });

    // HELPERS

    function parseWeekday(input, locale) {
        if (typeof input !== 'string') {
            return input;
        }

        if (!isNaN(input)) {
            return parseInt(input, 10);
        }

        input = locale.weekdaysParse(input);
        if (typeof input === 'number') {
            return input;
        }

        return null;
    }

    function parseIsoWeekday(input, locale) {
        if (typeof input === 'string') {
            return locale.weekdaysParse(input) % 7 || 7;
        }
        return isNaN(input) ? null : input;
    }

    // LOCALES
    function shiftWeekdays(ws, n) {
        return ws.slice(n, 7).concat(ws.slice(0, n));
    }

    var defaultLocaleWeekdays =
            'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
        defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
        defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
        defaultWeekdaysRegex = matchWord,
        defaultWeekdaysShortRegex = matchWord,
        defaultWeekdaysMinRegex = matchWord;

    function localeWeekdays(m, format) {
        var weekdays = isArray(this._weekdays)
            ? this._weekdays
            : this._weekdays[
                  m && m !== true && this._weekdays.isFormat.test(format)
                      ? 'format'
                      : 'standalone'
              ];
        return m === true
            ? shiftWeekdays(weekdays, this._week.dow)
            : m
              ? weekdays[m.day()]
              : weekdays;
    }

    function localeWeekdaysShort(m) {
        return m === true
            ? shiftWeekdays(this._weekdaysShort, this._week.dow)
            : m
              ? this._weekdaysShort[m.day()]
              : this._weekdaysShort;
    }

    function localeWeekdaysMin(m) {
        return m === true
            ? shiftWeekdays(this._weekdaysMin, this._week.dow)
            : m
              ? this._weekdaysMin[m.day()]
              : this._weekdaysMin;
    }

    function handleStrictParse$1(weekdayName, format, strict) {
        var i,
            ii,
            mom,
            llc = weekdayName.toLocaleLowerCase();
        if (!this._weekdaysParse) {
            this._weekdaysParse = [];
            this._shortWeekdaysParse = [];
            this._minWeekdaysParse = [];

            for (i = 0; i < 7; ++i) {
                mom = createUTC([2000, 1]).day(i);
                this._minWeekdaysParse[i] = this.weekdaysMin(
                    mom,
                    ''
                ).toLocaleLowerCase();
                this._shortWeekdaysParse[i] = this.weekdaysShort(
                    mom,
                    ''
                ).toLocaleLowerCase();
                this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
            }
        }

        if (strict) {
            if (format === 'dddd') {
                ii = indexOf.call(this._weekdaysParse, llc);
                return ii !== -1 ? ii : null;
            } else if (format === 'ddd') {
                ii = indexOf.call(this._shortWeekdaysParse, llc);
                return ii !== -1 ? ii : null;
            } else {
                ii = indexOf.call(this._minWeekdaysParse, llc);
                return ii !== -1 ? ii : null;
            }
        } else {
            if (format === 'dddd') {
                ii = indexOf.call(this._weekdaysParse, llc);
                if (ii !== -1) {
                    return ii;
                }
                ii = indexOf.call(this._shortWeekdaysParse, llc);
                if (ii !== -1) {
                    return ii;
                }
                ii = indexOf.call(this._minWeekdaysParse, llc);
                return ii !== -1 ? ii : null;
            } else if (format === 'ddd') {
                ii = indexOf.call(this._shortWeekdaysParse, llc);
                if (ii !== -1) {
                    return ii;
                }
                ii = indexOf.call(this._weekdaysParse, llc);
                if (ii !== -1) {
                    return ii;
                }
                ii = indexOf.call(this._minWeekdaysParse, llc);
                return ii !== -1 ? ii : null;
            } else {
                ii = indexOf.call(this._minWeekdaysParse, llc);
                if (ii !== -1) {
                    return ii;
                }
                ii = indexOf.call(this._weekdaysParse, llc);
                if (ii !== -1) {
                    return ii;
                }
                ii = indexOf.call(this._shortWeekdaysParse, llc);
                return ii !== -1 ? ii : null;
            }
        }
    }

    function localeWeekdaysParse(weekdayName, format, strict) {
        var i, mom, regex;

        if (this._weekdaysParseExact) {
            return handleStrictParse$1.call(this, weekdayName, format, strict);
        }

        if (!this._weekdaysParse) {
            this._weekdaysParse = [];
            this._minWeekdaysParse = [];
            this._shortWeekdaysParse = [];
            this._fullWeekdaysParse = [];
        }

        for (i = 0; i < 7; i++) {
            // make the regex if we don't have it already

            mom = createUTC([2000, 1]).day(i);
            if (strict && !this._fullWeekdaysParse[i]) {
                this._fullWeekdaysParse[i] = new RegExp(
                    '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$',
                    'i'
                );
                this._shortWeekdaysParse[i] = new RegExp(
                    '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$',
                    'i'
                );
                this._minWeekdaysParse[i] = new RegExp(
                    '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$',
                    'i'
                );
            }
            if (!this._weekdaysParse[i]) {
                regex =
                    '^' +
                    this.weekdays(mom, '') +
                    '|^' +
                    this.weekdaysShort(mom, '') +
                    '|^' +
                    this.weekdaysMin(mom, '');
                this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
            }
            // test the regex
            if (
                strict &&
                format === 'dddd' &&
                this._fullWeekdaysParse[i].test(weekdayName)
            ) {
                return i;
            } else if (
                strict &&
                format === 'ddd' &&
                this._shortWeekdaysParse[i].test(weekdayName)
            ) {
                return i;
            } else if (
                strict &&
                format === 'dd' &&
                this._minWeekdaysParse[i].test(weekdayName)
            ) {
                return i;
            } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
                return i;
            }
        }
    }

    // MOMENTS

    function getSetDayOfWeek(input) {
        if (!this.isValid()) {
            return input != null ? this : NaN;
        }

        var day = get(this, 'Day');
        if (input != null) {
            input = parseWeekday(input, this.localeData());
            return this.add(input - day, 'd');
        } else {
            return day;
        }
    }

    function getSetLocaleDayOfWeek(input) {
        if (!this.isValid()) {
            return input != null ? this : NaN;
        }
        var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
        return input == null ? weekday : this.add(input - weekday, 'd');
    }

    function getSetISODayOfWeek(input) {
        if (!this.isValid()) {
            return input != null ? this : NaN;
        }

        // behaves the same as moment#day except
        // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
        // as a setter, sunday should belong to the previous week.

        if (input != null) {
            var weekday = parseIsoWeekday(input, this.localeData());
            return this.day(this.day() % 7 ? weekday : weekday - 7);
        } else {
            return this.day() || 7;
        }
    }

    function weekdaysRegex(isStrict) {
        if (this._weekdaysParseExact) {
            if (!hasOwnProp(this, '_weekdaysRegex')) {
                computeWeekdaysParse.call(this);
            }
            if (isStrict) {
                return this._weekdaysStrictRegex;
            } else {
                return this._weekdaysRegex;
            }
        } else {
            if (!hasOwnProp(this, '_weekdaysRegex')) {
                this._weekdaysRegex = defaultWeekdaysRegex;
            }
            return this._weekdaysStrictRegex && isStrict
                ? this._weekdaysStrictRegex
                : this._weekdaysRegex;
        }
    }

    function weekdaysShortRegex(isStrict) {
        if (this._weekdaysParseExact) {
            if (!hasOwnProp(this, '_weekdaysRegex')) {
                computeWeekdaysParse.call(this);
            }
            if (isStrict) {
                return this._weekdaysShortStrictRegex;
            } else {
                return this._weekdaysShortRegex;
            }
        } else {
            if (!hasOwnProp(this, '_weekdaysShortRegex')) {
                this._weekdaysShortRegex = defaultWeekdaysShortRegex;
            }
            return this._weekdaysShortStrictRegex && isStrict
                ? this._weekdaysShortStrictRegex
                : this._weekdaysShortRegex;
        }
    }

    function weekdaysMinRegex(isStrict) {
        if (this._weekdaysParseExact) {
            if (!hasOwnProp(this, '_weekdaysRegex')) {
                computeWeekdaysParse.call(this);
            }
            if (isStrict) {
                return this._weekdaysMinStrictRegex;
            } else {
                return this._weekdaysMinRegex;
            }
        } else {
            if (!hasOwnProp(this, '_weekdaysMinRegex')) {
                this._weekdaysMinRegex = defaultWeekdaysMinRegex;
            }
            return this._weekdaysMinStrictRegex && isStrict
                ? this._weekdaysMinStrictRegex
                : this._weekdaysMinRegex;
        }
    }

    function computeWeekdaysParse() {
        function cmpLenRev(a, b) {
            return b.length - a.length;
        }

        var minPieces = [],
            shortPieces = [],
            longPieces = [],
            mixedPieces = [],
            i,
            mom,
            minp,
            shortp,
            longp;
        for (i = 0; i < 7; i++) {
            // make the regex if we don't have it already
            mom = createUTC([2000, 1]).day(i);
            minp = regexEscape(this.weekdaysMin(mom, ''));
            shortp = regexEscape(this.weekdaysShort(mom, ''));
            longp = regexEscape(this.weekdays(mom, ''));
            minPieces.push(minp);
            shortPieces.push(shortp);
            longPieces.push(longp);
            mixedPieces.push(minp);
            mixedPieces.push(shortp);
            mixedPieces.push(longp);
        }
        // Sorting makes sure if one weekday (or abbr) is a prefix of another it
        // will match the longer piece.
        minPieces.sort(cmpLenRev);
        shortPieces.sort(cmpLenRev);
        longPieces.sort(cmpLenRev);
        mixedPieces.sort(cmpLenRev);

        this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
        this._weekdaysShortRegex = this._weekdaysRegex;
        this._weekdaysMinRegex = this._weekdaysRegex;

        this._weekdaysStrictRegex = new RegExp(
            '^(' + longPieces.join('|') + ')',
            'i'
        );
        this._weekdaysShortStrictRegex = new RegExp(
            '^(' + shortPieces.join('|') + ')',
            'i'
        );
        this._weekdaysMinStrictRegex = new RegExp(
            '^(' + minPieces.join('|') + ')',
            'i'
        );
    }

    // FORMATTING

    function hFormat() {
        return this.hours() % 12 || 12;
    }

    function kFormat() {
        return this.hours() || 24;
    }

    addFormatToken('H', ['HH', 2], 0, 'hour');
    addFormatToken('h', ['hh', 2], 0, hFormat);
    addFormatToken('k', ['kk', 2], 0, kFormat);

    addFormatToken('hmm', 0, 0, function () {
        return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
    });

    addFormatToken('hmmss', 0, 0, function () {
        return (
            '' +
            hFormat.apply(this) +
            zeroFill(this.minutes(), 2) +
            zeroFill(this.seconds(), 2)
        );
    });

    addFormatToken('Hmm', 0, 0, function () {
        return '' + this.hours() + zeroFill(this.minutes(), 2);
    });

    addFormatToken('Hmmss', 0, 0, function () {
        return (
            '' +
            this.hours() +
            zeroFill(this.minutes(), 2) +
            zeroFill(this.seconds(), 2)
        );
    });

    function meridiem(token, lowercase) {
        addFormatToken(token, 0, 0, function () {
            return this.localeData().meridiem(
                this.hours(),
                this.minutes(),
                lowercase
            );
        });
    }

    meridiem('a', true);
    meridiem('A', false);

    // PARSING

    function matchMeridiem(isStrict, locale) {
        return locale._meridiemParse;
    }

    addRegexToken('a', matchMeridiem);
    addRegexToken('A', matchMeridiem);
    addRegexToken('H', match1to2, match1to2HasZero);
    addRegexToken('h', match1to2, match1to2NoLeadingZero);
    addRegexToken('k', match1to2, match1to2NoLeadingZero);
    addRegexToken('HH', match1to2, match2);
    addRegexToken('hh', match1to2, match2);
    addRegexToken('kk', match1to2, match2);

    addRegexToken('hmm', match3to4);
    addRegexToken('hmmss', match5to6);
    addRegexToken('Hmm', match3to4);
    addRegexToken('Hmmss', match5to6);

    addParseToken(['H', 'HH'], HOUR);
    addParseToken(['k', 'kk'], function (input, array, config) {
        var kInput = toInt(input);
        array[HOUR] = kInput === 24 ? 0 : kInput;
    });
    addParseToken(['a', 'A'], function (input, array, config) {
        config._isPm = config._locale.isPM(input);
        config._meridiem = input;
    });
    addParseToken(['h', 'hh'], function (input, array, config) {
        array[HOUR] = toInt(input);
        getParsingFlags(config).bigHour = true;
    });
    addParseToken('hmm', function (input, array, config) {
        var pos = input.length - 2;
        array[HOUR] = toInt(input.substr(0, pos));
        array[MINUTE] = toInt(input.substr(pos));
        getParsingFlags(config).bigHour = true;
    });
    addParseToken('hmmss', function (input, array, config) {
        var pos1 = input.length - 4,
            pos2 = input.length - 2;
        array[HOUR] = toInt(input.substr(0, pos1));
        array[MINUTE] = toInt(input.substr(pos1, 2));
        array[SECOND] = toInt(input.substr(pos2));
        getParsingFlags(config).bigHour = true;
    });
    addParseToken('Hmm', function (input, array, config) {
        var pos = input.length - 2;
        array[HOUR] = toInt(input.substr(0, pos));
        array[MINUTE] = toInt(input.substr(pos));
    });
    addParseToken('Hmmss', function (input, array, config) {
        var pos1 = input.length - 4,
            pos2 = input.length - 2;
        array[HOUR] = toInt(input.substr(0, pos1));
        array[MINUTE] = toInt(input.substr(pos1, 2));
        array[SECOND] = toInt(input.substr(pos2));
    });

    // LOCALES

    function localeIsPM(input) {
        // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
        // Using charAt should be more compatible.
        return (input + '').toLowerCase().charAt(0) === 'p';
    }

    var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i,
        // Setting the hour should keep the time, because the user explicitly
        // specified which hour they want. So trying to maintain the same hour (in
        // a new timezone) makes sense. Adding/subtracting hours does not follow
        // this rule.
        getSetHour = makeGetSet('Hours', true);

    function localeMeridiem(hours, minutes, isLower) {
        if (hours > 11) {
            return isLower ? 'pm' : 'PM';
        } else {
            return isLower ? 'am' : 'AM';
        }
    }

    var baseConfig = {
        calendar: defaultCalendar,
        longDateFormat: defaultLongDateFormat,
        invalidDate: defaultInvalidDate,
        ordinal: defaultOrdinal,
        dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
        relativeTime: defaultRelativeTime,

        months: defaultLocaleMonths,
        monthsShort: defaultLocaleMonthsShort,

        week: defaultLocaleWeek,

        weekdays: defaultLocaleWeekdays,
        weekdaysMin: defaultLocaleWeekdaysMin,
        weekdaysShort: defaultLocaleWeekdaysShort,

        meridiemParse: defaultLocaleMeridiemParse,
    };

    // internal storage for locale config files
    var locales = {},
        localeFamilies = {},
        globalLocale;

    function commonPrefix(arr1, arr2) {
        var i,
            minl = Math.min(arr1.length, arr2.length);
        for (i = 0; i < minl; i += 1) {
            if (arr1[i] !== arr2[i]) {
                return i;
            }
        }
        return minl;
    }

    function normalizeLocale(key) {
        return key ? key.toLowerCase().replace('_', '-') : key;
    }

    // pick the locale from the array
    // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
    // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
    function chooseLocale(names) {
        var i = 0,
            j,
            next,
            locale,
            split;

        while (i < names.length) {
            split = normalizeLocale(names[i]).split('-');
            j = split.length;
            next = normalizeLocale(names[i + 1]);
            next = next ? next.split('-') : null;
            while (j > 0) {
                locale = loadLocale(split.slice(0, j).join('-'));
                if (locale) {
                    return locale;
                }
                if (
                    next &&
                    next.length >= j &&
                    commonPrefix(split, next) >= j - 1
                ) {
                    //the next array item is better than a shallower substring of this one
                    break;
                }
                j--;
            }
            i++;
        }
        return globalLocale;
    }

    function isLocaleNameSane(name) {
        // Prevent names that look like filesystem paths, i.e contain '/' or '\'
        // Ensure name is available and function returns boolean
        return !!(name && name.match('^[^/\\\\]*$'));
    }

    function loadLocale(name) {
        var oldLocale = null,
            aliasedRequire;
        // TODO: Find a better way to register and load all the locales in Node
        if (
            locales[name] === undefined &&
            typeof module !== 'undefined' &&
            module &&
            module.exports &&
            isLocaleNameSane(name)
        ) {
            try {
                oldLocale = globalLocale._abbr;
                aliasedRequire = require;
                aliasedRequire('./locale/' + name);
                getSetGlobalLocale(oldLocale);
            } catch (e) {
                // mark as not found to avoid repeating expensive file require call causing high CPU
                // when trying to find en-US, en_US, en-us for every format call
                locales[name] = null; // null means not found
            }
        }
        return locales[name];
    }

    // This function will load locale and then set the global locale.  If
    // no arguments are passed in, it will simply return the current global
    // locale key.
    function getSetGlobalLocale(key, values) {
        var data;
        if (key) {
            if (isUndefined(values)) {
                data = getLocale(key);
            } else {
                data = defineLocale(key, values);
            }

            if (data) {
                // moment.duration._locale = moment._locale = data;
                globalLocale = data;
            } else {
                if (typeof console !== 'undefined' && console.warn) {
                    //warn user if arguments are passed but the locale could not be set
                    console.warn(
                        'Locale ' + key + ' not found. Did you forget to load it?'
                    );
                }
            }
        }

        return globalLocale._abbr;
    }

    function defineLocale(name, config) {
        if (config !== null) {
            var locale,
                parentConfig = baseConfig;
            config.abbr = name;
            if (locales[name] != null) {
                deprecateSimple(
                    'defineLocaleOverride',
                    'use moment.updateLocale(localeName, config) to change ' +
                        'an existing locale. moment.defineLocale(localeName, ' +
                        'config) should only be used for creating a new locale ' +
                        'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'
                );
                parentConfig = locales[name]._config;
            } else if (config.parentLocale != null) {
                if (locales[config.parentLocale] != null) {
                    parentConfig = locales[config.parentLocale]._config;
                } else {
                    locale = loadLocale(config.parentLocale);
                    if (locale != null) {
                        parentConfig = locale._config;
                    } else {
                        if (!localeFamilies[config.parentLocale]) {
                            localeFamilies[config.parentLocale] = [];
                        }
                        localeFamilies[config.parentLocale].push({
                            name: name,
                            config: config,
                        });
                        return null;
                    }
                }
            }
            locales[name] = new Locale(mergeConfigs(parentConfig, config));

            if (localeFamilies[name]) {
                localeFamilies[name].forEach(function (x) {
                    defineLocale(x.name, x.config);
                });
            }

            // backwards compat for now: also set the locale
            // make sure we set the locale AFTER all child locales have been
            // created, so we won't end up with the child locale set.
            getSetGlobalLocale(name);

            return locales[name];
        } else {
            // useful for testing
            delete locales[name];
            return null;
        }
    }

    function updateLocale(name, config) {
        if (config != null) {
            var locale,
                tmpLocale,
                parentConfig = baseConfig;

            if (locales[name] != null && locales[name].parentLocale != null) {
                // Update existing child locale in-place to avoid memory-leaks
                locales[name].set(mergeConfigs(locales[name]._config, config));
            } else {
                // MERGE
                tmpLocale = loadLocale(name);
                if (tmpLocale != null) {
                    parentConfig = tmpLocale._config;
                }
                config = mergeConfigs(parentConfig, config);
                if (tmpLocale == null) {
                    // updateLocale is called for creating a new locale
                    // Set abbr so it will have a name (getters return
                    // undefined otherwise).
                    config.abbr = name;
                }
                locale = new Locale(config);
                locale.parentLocale = locales[name];
                locales[name] = locale;
            }

            // backwards compat for now: also set the locale
            getSetGlobalLocale(name);
        } else {
            // pass null for config to unupdate, useful for tests
            if (locales[name] != null) {
                if (locales[name].parentLocale != null) {
                    locales[name] = locales[name].parentLocale;
                    if (name === getSetGlobalLocale()) {
                        getSetGlobalLocale(name);
                    }
                } else if (locales[name] != null) {
                    delete locales[name];
                }
            }
        }
        return locales[name];
    }

    // returns locale data
    function getLocale(key) {
        var locale;

        if (key && key._locale && key._locale._abbr) {
            key = key._locale._abbr;
        }

        if (!key) {
            return globalLocale;
        }

        if (!isArray(key)) {
            //short-circuit everything else
            locale = loadLocale(key);
            if (locale) {
                return locale;
            }
            key = [key];
        }

        return chooseLocale(key);
    }

    function listLocales() {
        return keys(locales);
    }

    function checkOverflow(m) {
        var overflow,
            a = m._a;

        if (a && getParsingFlags(m).overflow === -2) {
            overflow =
                a[MONTH] < 0 || a[MONTH] > 11
                    ? MONTH
                    : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
                      ? DATE
                      : a[HOUR] < 0 ||
                          a[HOUR] > 24 ||
                          (a[HOUR] === 24 &&
                              (a[MINUTE] !== 0 ||
                                  a[SECOND] !== 0 ||
                                  a[MILLISECOND] !== 0))
                        ? HOUR
                        : a[MINUTE] < 0 || a[MINUTE] > 59
                          ? MINUTE
                          : a[SECOND] < 0 || a[SECOND] > 59
                            ? SECOND
                            : a[MILLISECOND] < 0 || a[MILLISECOND] > 999
                              ? MILLISECOND
                              : -1;

            if (
                getParsingFlags(m)._overflowDayOfYear &&
                (overflow < YEAR || overflow > DATE)
            ) {
                overflow = DATE;
            }
            if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
                overflow = WEEK;
            }
            if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
                overflow = WEEKDAY;
            }

            getParsingFlags(m).overflow = overflow;
        }

        return m;
    }

    // iso 8601 regex
    // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
    var extendedIsoRegex =
            /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
        basicIsoRegex =
            /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
        tzRegex = /Z|[+-]\d\d(?::?\d\d)?/,
        isoDates = [
            ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
            ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
            ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
            ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
            ['YYYY-DDD', /\d{4}-\d{3}/],
            ['YYYY-MM', /\d{4}-\d\d/, false],
            ['YYYYYYMMDD', /[+-]\d{10}/],
            ['YYYYMMDD', /\d{8}/],
            ['GGGG[W]WWE', /\d{4}W\d{3}/],
            ['GGGG[W]WW', /\d{4}W\d{2}/, false],
            ['YYYYDDD', /\d{7}/],
            ['YYYYMM', /\d{6}/, false],
            ['YYYY', /\d{4}/, false],
        ],
        // iso time formats and regexes
        isoTimes = [
            ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
            ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
            ['HH:mm:ss', /\d\d:\d\d:\d\d/],
            ['HH:mm', /\d\d:\d\d/],
            ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
            ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
            ['HHmmss', /\d\d\d\d\d\d/],
            ['HHmm', /\d\d\d\d/],
            ['HH', /\d\d/],
        ],
        aspNetJsonRegex = /^\/?Date\((-?\d+)/i,
        // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
        rfc2822 =
            /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,
        obsOffsets = {
            UT: 0,
            GMT: 0,
            EDT: -4 * 60,
            EST: -5 * 60,
            CDT: -5 * 60,
            CST: -6 * 60,
            MDT: -6 * 60,
            MST: -7 * 60,
            PDT: -7 * 60,
            PST: -8 * 60,
        };

    // date from iso format
    function configFromISO(config) {
        var i,
            l,
            string = config._i,
            match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
            allowTime,
            dateFormat,
            timeFormat,
            tzFormat,
            isoDatesLen = isoDates.length,
            isoTimesLen = isoTimes.length;

        if (match) {
            getParsingFlags(config).iso = true;
            for (i = 0, l = isoDatesLen; i < l; i++) {
                if (isoDates[i][1].exec(match[1])) {
                    dateFormat = isoDates[i][0];
                    allowTime = isoDates[i][2] !== false;
                    break;
                }
            }
            if (dateFormat == null) {
                config._isValid = false;
                return;
            }
            if (match[3]) {
                for (i = 0, l = isoTimesLen; i < l; i++) {
                    if (isoTimes[i][1].exec(match[3])) {
                        // match[2] should be 'T' or space
                        timeFormat = (match[2] || ' ') + isoTimes[i][0];
                        break;
                    }
                }
                if (timeFormat == null) {
                    config._isValid = false;
                    return;
                }
            }
            if (!allowTime && timeFormat != null) {
                config._isValid = false;
                return;
            }
            if (match[4]) {
                if (tzRegex.exec(match[4])) {
                    tzFormat = 'Z';
                } else {
                    config._isValid = false;
                    return;
                }
            }
            config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
            configFromStringAndFormat(config);
        } else {
            config._isValid = false;
        }
    }

    function extractFromRFC2822Strings(
        yearStr,
        monthStr,
        dayStr,
        hourStr,
        minuteStr,
        secondStr
    ) {
        var result = [
            untruncateYear(yearStr),
            defaultLocaleMonthsShort.indexOf(monthStr),
            parseInt(dayStr, 10),
            parseInt(hourStr, 10),
            parseInt(minuteStr, 10),
        ];

        if (secondStr) {
            result.push(parseInt(secondStr, 10));
        }

        return result;
    }

    function untruncateYear(yearStr) {
        var year = parseInt(yearStr, 10);
        if (year <= 49) {
            return 2000 + year;
        } else if (year <= 999) {
            return 1900 + year;
        }
        return year;
    }

    function preprocessRFC2822(s) {
        // Remove comments and folding whitespace and replace multiple-spaces with a single space
        return s
            .replace(/\([^()]*\)|[\n\t]/g, ' ')
            .replace(/(\s\s+)/g, ' ')
            .replace(/^\s\s*/, '')
            .replace(/\s\s*$/, '');
    }

    function checkWeekday(weekdayStr, parsedInput, config) {
        if (weekdayStr) {
            // TODO: Replace the vanilla JS Date object with an independent day-of-week check.
            var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
                weekdayActual = new Date(
                    parsedInput[0],
                    parsedInput[1],
                    parsedInput[2]
                ).getDay();
            if (weekdayProvided !== weekdayActual) {
                getParsingFlags(config).weekdayMismatch = true;
                config._isValid = false;
                return false;
            }
        }
        return true;
    }

    function calculateOffset(obsOffset, militaryOffset, numOffset) {
        if (obsOffset) {
            return obsOffsets[obsOffset];
        } else if (militaryOffset) {
            // the only allowed military tz is Z
            return 0;
        } else {
            var hm = parseInt(numOffset, 10),
                m = hm % 100,
                h = (hm - m) / 100;
            return h * 60 + m;
        }
    }

    // date and time from ref 2822 format
    function configFromRFC2822(config) {
        var match = rfc2822.exec(preprocessRFC2822(config._i)),
            parsedArray;
        if (match) {
            parsedArray = extractFromRFC2822Strings(
                match[4],
                match[3],
                match[2],
                match[5],
                match[6],
                match[7]
            );
            if (!checkWeekday(match[1], parsedArray, config)) {
                return;
            }

            config._a = parsedArray;
            config._tzm = calculateOffset(match[8], match[9], match[10]);

            config._d = createUTCDate.apply(null, config._a);
            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);

            getParsingFlags(config).rfc2822 = true;
        } else {
            config._isValid = false;
        }
    }

    // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict
    function configFromString(config) {
        var matched = aspNetJsonRegex.exec(config._i);
        if (matched !== null) {
            config._d = new Date(+matched[1]);
            return;
        }

        configFromISO(config);
        if (config._isValid === false) {
            delete config._isValid;
        } else {
            return;
        }

        configFromRFC2822(config);
        if (config._isValid === false) {
            delete config._isValid;
        } else {
            return;
        }

        if (config._strict) {
            config._isValid = false;
        } else {
            // Final attempt, use Input Fallback
            hooks.createFromInputFallback(config);
        }
    }

    hooks.createFromInputFallback = deprecate(
        'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
            'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
            'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',
        function (config) {
            config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
        }
    );

    // Pick the first defined of two or three arguments.
    function defaults(a, b, c) {
        if (a != null) {
            return a;
        }
        if (b != null) {
            return b;
        }
        return c;
    }

    function currentDateArray(config) {
        // hooks is actually the exported moment object
        var nowValue = new Date(hooks.now());
        if (config._useUTC) {
            return [
                nowValue.getUTCFullYear(),
                nowValue.getUTCMonth(),
                nowValue.getUTCDate(),
            ];
        }
        return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
    }

    // convert an array to a date.
    // the array should mirror the parameters below
    // note: all values past the year are optional and will default to the lowest possible value.
    // [year, month, day , hour, minute, second, millisecond]
    function configFromArray(config) {
        var i,
            date,
            input = [],
            currentDate,
            expectedWeekday,
            yearToUse;

        if (config._d) {
            return;
        }

        currentDate = currentDateArray(config);

        //compute day of the year from weeks and weekdays
        if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
            dayOfYearFromWeekInfo(config);
        }

        //if the day of the year is set, figure out what it is
        if (config._dayOfYear != null) {
            yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);

            if (
                config._dayOfYear > daysInYear(yearToUse) ||
                config._dayOfYear === 0
            ) {
                getParsingFlags(config)._overflowDayOfYear = true;
            }

            date = createUTCDate(yearToUse, 0, config._dayOfYear);
            config._a[MONTH] = date.getUTCMonth();
            config._a[DATE] = date.getUTCDate();
        }

        // Default to current date.
        // * if no year, month, day of month are given, default to today
        // * if day of month is given, default month and year
        // * if month is given, default only year
        // * if year is given, don't default anything
        for (i = 0; i < 3 && config._a[i] == null; ++i) {
            config._a[i] = input[i] = currentDate[i];
        }

        // Zero out whatever was not defaulted, including time
        for (; i < 7; i++) {
            config._a[i] = input[i] =
                config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];
        }

        // Check for 24:00:00.000
        if (
            config._a[HOUR] === 24 &&
            config._a[MINUTE] === 0 &&
            config._a[SECOND] === 0 &&
            config._a[MILLISECOND] === 0
        ) {
            config._nextDay = true;
            config._a[HOUR] = 0;
        }

        config._d = (config._useUTC ? createUTCDate : createDate).apply(
            null,
            input
        );
        expectedWeekday = config._useUTC
            ? config._d.getUTCDay()
            : config._d.getDay();

        // Apply timezone offset from input. The actual utcOffset can be changed
        // with parseZone.
        if (config._tzm != null) {
            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
        }

        if (config._nextDay) {
            config._a[HOUR] = 24;
        }

        // check for mismatching day of week
        if (
            config._w &&
            typeof config._w.d !== 'undefined' &&
            config._w.d !== expectedWeekday
        ) {
            getParsingFlags(config).weekdayMismatch = true;
        }
    }

    function dayOfYearFromWeekInfo(config) {
        var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;

        w = config._w;
        if (w.GG != null || w.W != null || w.E != null) {
            dow = 1;
            doy = 4;

            // TODO: We need to take the current isoWeekYear, but that depends on
            // how we interpret now (local, utc, fixed offset). So create
            // a now version of current config (take local/utc/offset flags, and
            // create now).
            weekYear = defaults(
                w.GG,
                config._a[YEAR],
                weekOfYear(createLocal(), 1, 4).year
            );
            week = defaults(w.W, 1);
            weekday = defaults(w.E, 1);
            if (weekday < 1 || weekday > 7) {
                weekdayOverflow = true;
            }
        } else {
            dow = config._locale._week.dow;
            doy = config._locale._week.doy;

            curWeek = weekOfYear(createLocal(), dow, doy);

            weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);

            // Default to current week.
            week = defaults(w.w, curWeek.week);

            if (w.d != null) {
                // weekday -- low day numbers are considered next week
                weekday = w.d;
                if (weekday < 0 || weekday > 6) {
                    weekdayOverflow = true;
                }
            } else if (w.e != null) {
                // local weekday -- counting starts from beginning of week
                weekday = w.e + dow;
                if (w.e < 0 || w.e > 6) {
                    weekdayOverflow = true;
                }
            } else {
                // default to beginning of week
                weekday = dow;
            }
        }
        if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
            getParsingFlags(config)._overflowWeeks = true;
        } else if (weekdayOverflow != null) {
            getParsingFlags(config)._overflowWeekday = true;
        } else {
            temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
            config._a[YEAR] = temp.year;
            config._dayOfYear = temp.dayOfYear;
        }
    }

    // constant that refers to the ISO standard
    hooks.ISO_8601 = function () {};

    // constant that refers to the RFC 2822 form
    hooks.RFC_2822 = function () {};

    // date from string and format string
    function configFromStringAndFormat(config) {
        // TODO: Move this to another part of the creation flow to prevent circular deps
        if (config._f === hooks.ISO_8601) {
            configFromISO(config);
            return;
        }
        if (config._f === hooks.RFC_2822) {
            configFromRFC2822(config);
            return;
        }
        config._a = [];
        getParsingFlags(config).empty = true;

        // This array is used to make a Date, either with `new Date` or `Date.UTC`
        var string = '' + config._i,
            i,
            parsedInput,
            tokens,
            token,
            skipped,
            stringLength = string.length,
            totalParsedInputLength = 0,
            era,
            tokenLen;

        tokens =
            expandFormat(config._f, config._locale).match(formattingTokens) || [];
        tokenLen = tokens.length;
        for (i = 0; i < tokenLen; i++) {
            token = tokens[i];
            parsedInput = (string.match(getParseRegexForToken(token, config)) ||
                [])[0];
            if (parsedInput) {
                skipped = string.substr(0, string.indexOf(parsedInput));
                if (skipped.length > 0) {
                    getParsingFlags(config).unusedInput.push(skipped);
                }
                string = string.slice(
                    string.indexOf(parsedInput) + parsedInput.length
                );
                totalParsedInputLength += parsedInput.length;
            }
            // don't parse if it's not a known token
            if (formatTokenFunctions[token]) {
                if (parsedInput) {
                    getParsingFlags(config).empty = false;
                } else {
                    getParsingFlags(config).unusedTokens.push(token);
                }
                addTimeToArrayFromToken(token, parsedInput, config);
            } else if (config._strict && !parsedInput) {
                getParsingFlags(config).unusedTokens.push(token);
            }
        }

        // add remaining unparsed input length to the string
        getParsingFlags(config).charsLeftOver =
            stringLength - totalParsedInputLength;
        if (string.length > 0) {
            getParsingFlags(config).unusedInput.push(string);
        }

        // clear _12h flag if hour is <= 12
        if (
            config._a[HOUR] <= 12 &&
            getParsingFlags(config).bigHour === true &&
            config._a[HOUR] > 0
        ) {
            getParsingFlags(config).bigHour = undefined;
        }

        getParsingFlags(config).parsedDateParts = config._a.slice(0);
        getParsingFlags(config).meridiem = config._meridiem;
        // handle meridiem
        config._a[HOUR] = meridiemFixWrap(
            config._locale,
            config._a[HOUR],
            config._meridiem
        );

        // handle era
        era = getParsingFlags(config).era;
        if (era !== null) {
            config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);
        }

        configFromArray(config);
        checkOverflow(config);
    }

    function meridiemFixWrap(locale, hour, meridiem) {
        var isPm;

        if (meridiem == null) {
            // nothing to do
            return hour;
        }
        if (locale.meridiemHour != null) {
            return locale.meridiemHour(hour, meridiem);
        } else if (locale.isPM != null) {
            // Fallback
            isPm = locale.isPM(meridiem);
            if (isPm && hour < 12) {
                hour += 12;
            }
            if (!isPm && hour === 12) {
                hour = 0;
            }
            return hour;
        } else {
            // this is not supposed to happen
            return hour;
        }
    }

    // date from string and array of format strings
    function configFromStringAndArray(config) {
        var tempConfig,
            bestMoment,
            scoreToBeat,
            i,
            currentScore,
            validFormatFound,
            bestFormatIsValid = false,
            configfLen = config._f.length;

        if (configfLen === 0) {
            getParsingFlags(config).invalidFormat = true;
            config._d = new Date(NaN);
            return;
        }

        for (i = 0; i < configfLen; i++) {
            currentScore = 0;
            validFormatFound = false;
            tempConfig = copyConfig({}, config);
            if (config._useUTC != null) {
                tempConfig._useUTC = config._useUTC;
            }
            tempConfig._f = config._f[i];
            configFromStringAndFormat(tempConfig);

            if (isValid(tempConfig)) {
                validFormatFound = true;
            }

            // if there is any input that was not parsed add a penalty for that format
            currentScore += getParsingFlags(tempConfig).charsLeftOver;

            //or tokens
            currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;

            getParsingFlags(tempConfig).score = currentScore;

            if (!bestFormatIsValid) {
                if (
                    scoreToBeat == null ||
                    currentScore < scoreToBeat ||
                    validFormatFound
                ) {
                    scoreToBeat = currentScore;
                    bestMoment = tempConfig;
                    if (validFormatFound) {
                        bestFormatIsValid = true;
                    }
                }
            } else {
                if (currentScore < scoreToBeat) {
                    scoreToBeat = currentScore;
                    bestMoment = tempConfig;
                }
            }
        }

        extend(config, bestMoment || tempConfig);
    }

    function configFromObject(config) {
        if (config._d) {
            return;
        }

        var i = normalizeObjectUnits(config._i),
            dayOrDate = i.day === undefined ? i.date : i.day;
        config._a = map(
            [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],
            function (obj) {
                return obj && parseInt(obj, 10);
            }
        );

        configFromArray(config);
    }

    function createFromConfig(config) {
        var res = new Moment(checkOverflow(prepareConfig(config)));
        if (res._nextDay) {
            // Adding is smart enough around DST
            res.add(1, 'd');
            res._nextDay = undefined;
        }

        return res;
    }

    function prepareConfig(config) {
        var input = config._i,
            format = config._f;

        config._locale = config._locale || getLocale(config._l);

        if (input === null || (format === undefined && input === '')) {
            return createInvalid({ nullInput: true });
        }

        if (typeof input === 'string') {
            config._i = input = config._locale.preparse(input);
        }

        if (isMoment(input)) {
            return new Moment(checkOverflow(input));
        } else if (isDate(input)) {
            config._d = input;
        } else if (isArray(format)) {
            configFromStringAndArray(config);
        } else if (format) {
            configFromStringAndFormat(config);
        } else {
            configFromInput(config);
        }

        if (!isValid(config)) {
            config._d = null;
        }

        return config;
    }

    function configFromInput(config) {
        var input = config._i;
        if (isUndefined(input)) {
            config._d = new Date(hooks.now());
        } else if (isDate(input)) {
            config._d = new Date(input.valueOf());
        } else if (typeof input === 'string') {
            configFromString(config);
        } else if (isArray(input)) {
            config._a = map(input.slice(0), function (obj) {
                return parseInt(obj, 10);
            });
            configFromArray(config);
        } else if (isObject(input)) {
            configFromObject(config);
        } else if (isNumber(input)) {
            // from milliseconds
            config._d = new Date(input);
        } else {
            hooks.createFromInputFallback(config);
        }
    }

    function createLocalOrUTC(input, format, locale, strict, isUTC) {
        var c = {};

        if (format === true || format === false) {
            strict = format;
            format = undefined;
        }

        if (locale === true || locale === false) {
            strict = locale;
            locale = undefined;
        }

        if (
            (isObject(input) && isObjectEmpty(input)) ||
            (isArray(input) && input.length === 0)
        ) {
            input = undefined;
        }
        // object construction must be done this way.
        // https://github.com/moment/moment/issues/1423
        c._isAMomentObject = true;
        c._useUTC = c._isUTC = isUTC;
        c._l = locale;
        c._i = input;
        c._f = format;
        c._strict = strict;

        return createFromConfig(c);
    }

    function createLocal(input, format, locale, strict) {
        return createLocalOrUTC(input, format, locale, strict, false);
    }

    var prototypeMin = deprecate(
            'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
            function () {
                var other = createLocal.apply(null, arguments);
                if (this.isValid() && other.isValid()) {
                    return other < this ? this : other;
                } else {
                    return createInvalid();
                }
            }
        ),
        prototypeMax = deprecate(
            'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
            function () {
                var other = createLocal.apply(null, arguments);
                if (this.isValid() && other.isValid()) {
                    return other > this ? this : other;
                } else {
                    return createInvalid();
                }
            }
        );

    // Pick a moment m from moments so that m[fn](other) is true for all
    // other. This relies on the function fn to be transitive.
    //
    // moments should either be an array of moment objects or an array, whose
    // first element is an array of moment objects.
    function pickBy(fn, moments) {
        var res, i;
        if (moments.length === 1 && isArray(moments[0])) {
            moments = moments[0];
        }
        if (!moments.length) {
            return createLocal();
        }
        res = moments[0];
        for (i = 1; i < moments.length; ++i) {
            if (!moments[i].isValid() || moments[i][fn](res)) {
                res = moments[i];
            }
        }
        return res;
    }

    // TODO: Use [].sort instead?
    function min() {
        var args = [].slice.call(arguments, 0);

        return pickBy('isBefore', args);
    }

    function max() {
        var args = [].slice.call(arguments, 0);

        return pickBy('isAfter', args);
    }

    var now = function () {
        return Date.now ? Date.now() : +new Date();
    };

    var ordering = [
        'year',
        'quarter',
        'month',
        'week',
        'day',
        'hour',
        'minute',
        'second',
        'millisecond',
    ];

    function isDurationValid(m) {
        var key,
            unitHasDecimal = false,
            i,
            orderLen = ordering.length;
        for (key in m) {
            if (
                hasOwnProp(m, key) &&
                !(
                    indexOf.call(ordering, key) !== -1 &&
                    (m[key] == null || !isNaN(m[key]))
                )
            ) {
                return false;
            }
        }

        for (i = 0; i < orderLen; ++i) {
            if (m[ordering[i]]) {
                if (unitHasDecimal) {
                    return false; // only allow non-integers for smallest unit
                }
                if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
                    unitHasDecimal = true;
                }
            }
        }

        return true;
    }

    function isValid$1() {
        return this._isValid;
    }

    function createInvalid$1() {
        return createDuration(NaN);
    }

    function Duration(duration) {
        var normalizedInput = normalizeObjectUnits(duration),
            years = normalizedInput.year || 0,
            quarters = normalizedInput.quarter || 0,
            months = normalizedInput.month || 0,
            weeks = normalizedInput.week || normalizedInput.isoWeek || 0,
            days = normalizedInput.day || 0,
            hours = normalizedInput.hour || 0,
            minutes = normalizedInput.minute || 0,
            seconds = normalizedInput.second || 0,
            milliseconds = normalizedInput.millisecond || 0;

        this._isValid = isDurationValid(normalizedInput);

        // representation for dateAddRemove
        this._milliseconds =
            +milliseconds +
            seconds * 1e3 + // 1000
            minutes * 6e4 + // 1000 * 60
            hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
        // Because of dateAddRemove treats 24 hours as different from a
        // day when working around DST, we need to store them separately
        this._days = +days + weeks * 7;
        // It is impossible to translate months into days without knowing
        // which months you are are talking about, so we have to store
        // it separately.
        this._months = +months + quarters * 3 + years * 12;

        this._data = {};

        this._locale = getLocale();

        this._bubble();
    }

    function isDuration(obj) {
        return obj instanceof Duration;
    }

    function absRound(number) {
        if (number < 0) {
            return Math.round(-1 * number) * -1;
        } else {
            return Math.round(number);
        }
    }

    // compare two arrays, return the number of differences
    function compareArrays(array1, array2, dontConvert) {
        var len = Math.min(array1.length, array2.length),
            lengthDiff = Math.abs(array1.length - array2.length),
            diffs = 0,
            i;
        for (i = 0; i < len; i++) {
            if (
                (dontConvert && array1[i] !== array2[i]) ||
                (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))
            ) {
                diffs++;
            }
        }
        return diffs + lengthDiff;
    }

    // FORMATTING

    function offset(token, separator) {
        addFormatToken(token, 0, 0, function () {
            var offset = this.utcOffset(),
                sign = '+';
            if (offset < 0) {
                offset = -offset;
                sign = '-';
            }
            return (
                sign +
                zeroFill(~~(offset / 60), 2) +
                separator +
                zeroFill(~~offset % 60, 2)
            );
        });
    }

    offset('Z', ':');
    offset('ZZ', '');

    // PARSING

    addRegexToken('Z', matchShortOffset);
    addRegexToken('ZZ', matchShortOffset);
    addParseToken(['Z', 'ZZ'], function (input, array, config) {
        config._useUTC = true;
        config._tzm = offsetFromString(matchShortOffset, input);
    });

    // HELPERS

    // timezone chunker
    // '+10:00' > ['10',  '00']
    // '-1530'  > ['-15', '30']
    var chunkOffset = /([\+\-]|\d\d)/gi;

    function offsetFromString(matcher, string) {
        var matches = (string || '').match(matcher),
            chunk,
            parts,
            minutes;

        if (matches === null) {
            return null;
        }

        chunk = matches[matches.length - 1] || [];
        parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
        minutes = +(parts[1] * 60) + toInt(parts[2]);

        return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;
    }

    // Return a moment from input, that is local/utc/zone equivalent to model.
    function cloneWithOffset(input, model) {
        var res, diff;
        if (model._isUTC) {
            res = model.clone();
            diff =
                (isMoment(input) || isDate(input)
                    ? input.valueOf()
                    : createLocal(input).valueOf()) - res.valueOf();
            // Use low-level api, because this fn is low-level api.
            res._d.setTime(res._d.valueOf() + diff);
            hooks.updateOffset(res, false);
            return res;
        } else {
            return createLocal(input).local();
        }
    }

    function getDateOffset(m) {
        // On Firefox.24 Date#getTimezoneOffset returns a floating point.
        // https://github.com/moment/moment/pull/1871
        return -Math.round(m._d.getTimezoneOffset());
    }

    // HOOKS

    // This function will be called whenever a moment is mutated.
    // It is intended to keep the offset in sync with the timezone.
    hooks.updateOffset = function () {};

    // MOMENTS

    // keepLocalTime = true means only change the timezone, without
    // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
    // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
    // +0200, so we adjust the time as needed, to be valid.
    //
    // Keeping the time actually adds/subtracts (one hour)
    // from the actual represented time. That is why we call updateOffset
    // a second time. In case it wants us to change the offset again
    // _changeInProgress == true case, then we have to adjust, because
    // there is no such time in the given timezone.
    function getSetOffset(input, keepLocalTime, keepMinutes) {
        var offset = this._offset || 0,
            localAdjust;
        if (!this.isValid()) {
            return input != null ? this : NaN;
        }
        if (input != null) {
            if (typeof input === 'string') {
                input = offsetFromString(matchShortOffset, input);
                if (input === null) {
                    return this;
                }
            } else if (Math.abs(input) < 16 && !keepMinutes) {
                input = input * 60;
            }
            if (!this._isUTC && keepLocalTime) {
                localAdjust = getDateOffset(this);
            }
            this._offset = input;
            this._isUTC = true;
            if (localAdjust != null) {
                this.add(localAdjust, 'm');
            }
            if (offset !== input) {
                if (!keepLocalTime || this._changeInProgress) {
                    addSubtract(
                        this,
                        createDuration(input - offset, 'm'),
                        1,
                        false
                    );
                } else if (!this._changeInProgress) {
                    this._changeInProgress = true;
                    hooks.updateOffset(this, true);
                    this._changeInProgress = null;
                }
            }
            return this;
        } else {
            return this._isUTC ? offset : getDateOffset(this);
        }
    }

    function getSetZone(input, keepLocalTime) {
        if (input != null) {
            if (typeof input !== 'string') {
                input = -input;
            }

            this.utcOffset(input, keepLocalTime);

            return this;
        } else {
            return -this.utcOffset();
        }
    }

    function setOffsetToUTC(keepLocalTime) {
        return this.utcOffset(0, keepLocalTime);
    }

    function setOffsetToLocal(keepLocalTime) {
        if (this._isUTC) {
            this.utcOffset(0, keepLocalTime);
            this._isUTC = false;

            if (keepLocalTime) {
                this.subtract(getDateOffset(this), 'm');
            }
        }
        return this;
    }

    function setOffsetToParsedOffset() {
        if (this._tzm != null) {
            this.utcOffset(this._tzm, false, true);
        } else if (typeof this._i === 'string') {
            var tZone = offsetFromString(matchOffset, this._i);
            if (tZone != null) {
                this.utcOffset(tZone);
            } else {
                this.utcOffset(0, true);
            }
        }
        return this;
    }

    function hasAlignedHourOffset(input) {
        if (!this.isValid()) {
            return false;
        }
        input = input ? createLocal(input).utcOffset() : 0;

        return (this.utcOffset() - input) % 60 === 0;
    }

    function isDaylightSavingTime() {
        return (
            this.utcOffset() > this.clone().month(0).utcOffset() ||
            this.utcOffset() > this.clone().month(5).utcOffset()
        );
    }

    function isDaylightSavingTimeShifted() {
        if (!isUndefined(this._isDSTShifted)) {
            return this._isDSTShifted;
        }

        var c = {},
            other;

        copyConfig(c, this);
        c = prepareConfig(c);

        if (c._a) {
            other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
            this._isDSTShifted =
                this.isValid() && compareArrays(c._a, other.toArray()) > 0;
        } else {
            this._isDSTShifted = false;
        }

        return this._isDSTShifted;
    }

    function isLocal() {
        return this.isValid() ? !this._isUTC : false;
    }

    function isUtcOffset() {
        return this.isValid() ? this._isUTC : false;
    }

    function isUtc() {
        return this.isValid() ? this._isUTC && this._offset === 0 : false;
    }

    // ASP.NET json date format regex
    var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,
        // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
        // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
        // and further modified to allow for strings containing both week and day
        isoRegex =
            /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;

    function createDuration(input, key) {
        var duration = input,
            // matching against regexp is expensive, do it on demand
            match = null,
            sign,
            ret,
            diffRes;

        if (isDuration(input)) {
            duration = {
                ms: input._milliseconds,
                d: input._days,
                M: input._months,
            };
        } else if (isNumber(input) || !isNaN(+input)) {
            duration = {};
            if (key) {
                duration[key] = +input;
            } else {
                duration.milliseconds = +input;
            }
        } else if ((match = aspNetRegex.exec(input))) {
            sign = match[1] === '-' ? -1 : 1;
            duration = {
                y: 0,
                d: toInt(match[DATE]) * sign,
                h: toInt(match[HOUR]) * sign,
                m: toInt(match[MINUTE]) * sign,
                s: toInt(match[SECOND]) * sign,
                ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match
            };
        } else if ((match = isoRegex.exec(input))) {
            sign = match[1] === '-' ? -1 : 1;
            duration = {
                y: parseIso(match[2], sign),
                M: parseIso(match[3], sign),
                w: parseIso(match[4], sign),
                d: parseIso(match[5], sign),
                h: parseIso(match[6], sign),
                m: parseIso(match[7], sign),
                s: parseIso(match[8], sign),
            };
        } else if (duration == null) {
            // checks for null or undefined
            duration = {};
        } else if (
            typeof duration === 'object' &&
            ('from' in duration || 'to' in duration)
        ) {
            diffRes = momentsDifference(
                createLocal(duration.from),
                createLocal(duration.to)
            );

            duration = {};
            duration.ms = diffRes.milliseconds;
            duration.M = diffRes.months;
        }

        ret = new Duration(duration);

        if (isDuration(input) && hasOwnProp(input, '_locale')) {
            ret._locale = input._locale;
        }

        if (isDuration(input) && hasOwnProp(input, '_isValid')) {
            ret._isValid = input._isValid;
        }

        return ret;
    }

    createDuration.fn = Duration.prototype;
    createDuration.invalid = createInvalid$1;

    function parseIso(inp, sign) {
        // We'd normally use ~~inp for this, but unfortunately it also
        // converts floats to ints.
        // inp may be undefined, so careful calling replace on it.
        var res = inp && parseFloat(inp.replace(',', '.'));
        // apply sign while we're at it
        return (isNaN(res) ? 0 : res) * sign;
    }

    function positiveMomentsDifference(base, other) {
        var res = {};

        res.months =
            other.month() - base.month() + (other.year() - base.year()) * 12;
        if (base.clone().add(res.months, 'M').isAfter(other)) {
            --res.months;
        }

        res.milliseconds = +other - +base.clone().add(res.months, 'M');

        return res;
    }

    function momentsDifference(base, other) {
        var res;
        if (!(base.isValid() && other.isValid())) {
            return { milliseconds: 0, months: 0 };
        }

        other = cloneWithOffset(other, base);
        if (base.isBefore(other)) {
            res = positiveMomentsDifference(base, other);
        } else {
            res = positiveMomentsDifference(other, base);
            res.milliseconds = -res.milliseconds;
            res.months = -res.months;
        }

        return res;
    }

    // TODO: remove 'name' arg after deprecation is removed
    function createAdder(direction, name) {
        return function (val, period) {
            var dur, tmp;
            //invert the arguments, but complain about it
            if (period !== null && !isNaN(+period)) {
                deprecateSimple(
                    name,
                    'moment().' +
                        name +
                        '(period, number) is deprecated. Please use moment().' +
                        name +
                        '(number, period). ' +
                        'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'
                );
                tmp = val;
                val = period;
                period = tmp;
            }

            dur = createDuration(val, period);
            addSubtract(this, dur, direction);
            return this;
        };
    }

    function addSubtract(mom, duration, isAdding, updateOffset) {
        var milliseconds = duration._milliseconds,
            days = absRound(duration._days),
            months = absRound(duration._months);

        if (!mom.isValid()) {
            // No op
            return;
        }

        updateOffset = updateOffset == null ? true : updateOffset;

        if (months) {
            setMonth(mom, get(mom, 'Month') + months * isAdding);
        }
        if (days) {
            set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
        }
        if (milliseconds) {
            mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
        }
        if (updateOffset) {
            hooks.updateOffset(mom, days || months);
        }
    }

    var add = createAdder(1, 'add'),
        subtract = createAdder(-1, 'subtract');

    function isString(input) {
        return typeof input === 'string' || input instanceof String;
    }

    // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined
    function isMomentInput(input) {
        return (
            isMoment(input) ||
            isDate(input) ||
            isString(input) ||
            isNumber(input) ||
            isNumberOrStringArray(input) ||
            isMomentInputObject(input) ||
            input === null ||
            input === undefined
        );
    }

    function isMomentInputObject(input) {
        var objectTest = isObject(input) && !isObjectEmpty(input),
            propertyTest = false,
            properties = [
                'years',
                'year',
                'y',
                'months',
                'month',
                'M',
                'days',
                'day',
                'd',
                'dates',
                'date',
                'D',
                'hours',
                'hour',
                'h',
                'minutes',
                'minute',
                'm',
                'seconds',
                'second',
                's',
                'milliseconds',
                'millisecond',
                'ms',
            ],
            i,
            property,
            propertyLen = properties.length;

        for (i = 0; i < propertyLen; i += 1) {
            property = properties[i];
            propertyTest = propertyTest || hasOwnProp(input, property);
        }

        return objectTest && propertyTest;
    }

    function isNumberOrStringArray(input) {
        var arrayTest = isArray(input),
            dataTypeTest = false;
        if (arrayTest) {
            dataTypeTest =
                input.filter(function (item) {
                    return !isNumber(item) && isString(input);
                }).length === 0;
        }
        return arrayTest && dataTypeTest;
    }

    function isCalendarSpec(input) {
        var objectTest = isObject(input) && !isObjectEmpty(input),
            propertyTest = false,
            properties = [
                'sameDay',
                'nextDay',
                'lastDay',
                'nextWeek',
                'lastWeek',
                'sameElse',
            ],
            i,
            property;

        for (i = 0; i < properties.length; i += 1) {
            property = properties[i];
            propertyTest = propertyTest || hasOwnProp(input, property);
        }

        return objectTest && propertyTest;
    }

    function getCalendarFormat(myMoment, now) {
        var diff = myMoment.diff(now, 'days', true);
        return diff < -6
            ? 'sameElse'
            : diff < -1
              ? 'lastWeek'
              : diff < 0
                ? 'lastDay'
                : diff < 1
                  ? 'sameDay'
                  : diff < 2
                    ? 'nextDay'
                    : diff < 7
                      ? 'nextWeek'
                      : 'sameElse';
    }

    function calendar$1(time, formats) {
        // Support for single parameter, formats only overload to the calendar function
        if (arguments.length === 1) {
            if (!arguments[0]) {
                time = undefined;
                formats = undefined;
            } else if (isMomentInput(arguments[0])) {
                time = arguments[0];
                formats = undefined;
            } else if (isCalendarSpec(arguments[0])) {
                formats = arguments[0];
                time = undefined;
            }
        }
        // We want to compare the start of today, vs this.
        // Getting start-of-today depends on whether we're local/utc/offset or not.
        var now = time || createLocal(),
            sod = cloneWithOffset(now, this).startOf('day'),
            format = hooks.calendarFormat(this, sod) || 'sameElse',
            output =
                formats &&
                (isFunction(formats[format])
                    ? formats[format].call(this, now)
                    : formats[format]);

        return this.format(
            output || this.localeData().calendar(format, this, createLocal(now))
        );
    }

    function clone() {
        return new Moment(this);
    }

    function isAfter(input, units) {
        var localInput = isMoment(input) ? input : createLocal(input);
        if (!(this.isValid() && localInput.isValid())) {
            return false;
        }
        units = normalizeUnits(units) || 'millisecond';
        if (units === 'millisecond') {
            return this.valueOf() > localInput.valueOf();
        } else {
            return localInput.valueOf() < this.clone().startOf(units).valueOf();
        }
    }

    function isBefore(input, units) {
        var localInput = isMoment(input) ? input : createLocal(input);
        if (!(this.isValid() && localInput.isValid())) {
            return false;
        }
        units = normalizeUnits(units) || 'millisecond';
        if (units === 'millisecond') {
            return this.valueOf() < localInput.valueOf();
        } else {
            return this.clone().endOf(units).valueOf() < localInput.valueOf();
        }
    }

    function isBetween(from, to, units, inclusivity) {
        var localFrom = isMoment(from) ? from : createLocal(from),
            localTo = isMoment(to) ? to : createLocal(to);
        if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {
            return false;
        }
        inclusivity = inclusivity || '()';
        return (
            (inclusivity[0] === '('
                ? this.isAfter(localFrom, units)
                : !this.isBefore(localFrom, units)) &&
            (inclusivity[1] === ')'
                ? this.isBefore(localTo, units)
                : !this.isAfter(localTo, units))
        );
    }

    function isSame(input, units) {
        var localInput = isMoment(input) ? input : createLocal(input),
            inputMs;
        if (!(this.isValid() && localInput.isValid())) {
            return false;
        }
        units = normalizeUnits(units) || 'millisecond';
        if (units === 'millisecond') {
            return this.valueOf() === localInput.valueOf();
        } else {
            inputMs = localInput.valueOf();
            return (
                this.clone().startOf(units).valueOf() <= inputMs &&
                inputMs <= this.clone().endOf(units).valueOf()
            );
        }
    }

    function isSameOrAfter(input, units) {
        return this.isSame(input, units) || this.isAfter(input, units);
    }

    function isSameOrBefore(input, units) {
        return this.isSame(input, units) || this.isBefore(input, units);
    }

    function diff(input, units, asFloat) {
        var that, zoneDelta, output;

        if (!this.isValid()) {
            return NaN;
        }

        that = cloneWithOffset(input, this);

        if (!that.isValid()) {
            return NaN;
        }

        zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;

        units = normalizeUnits(units);

        switch (units) {
            case 'year':
                output = monthDiff(this, that) / 12;
                break;
            case 'month':
                output = monthDiff(this, that);
                break;
            case 'quarter':
                output = monthDiff(this, that) / 3;
                break;
            case 'second':
                output = (this - that) / 1e3;
                break; // 1000
            case 'minute':
                output = (this - that) / 6e4;
                break; // 1000 * 60
            case 'hour':
                output = (this - that) / 36e5;
                break; // 1000 * 60 * 60
            case 'day':
                output = (this - that - zoneDelta) / 864e5;
                break; // 1000 * 60 * 60 * 24, negate dst
            case 'week':
                output = (this - that - zoneDelta) / 6048e5;
                break; // 1000 * 60 * 60 * 24 * 7, negate dst
            default:
                output = this - that;
        }

        return asFloat ? output : absFloor(output);
    }

    function monthDiff(a, b) {
        if (a.date() < b.date()) {
            // end-of-month calculations work correct when the start month has more
            // days than the end month.
            return -monthDiff(b, a);
        }
        // difference in months
        var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),
            // b is in (anchor - 1 month, anchor + 1 month)
            anchor = a.clone().add(wholeMonthDiff, 'months'),
            anchor2,
            adjust;

        if (b - anchor < 0) {
            anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
            // linear across the month
            adjust = (b - anchor) / (anchor - anchor2);
        } else {
            anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
            // linear across the month
            adjust = (b - anchor) / (anchor2 - anchor);
        }

        //check for negative zero, return zero if negative zero
        return -(wholeMonthDiff + adjust) || 0;
    }

    hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
    hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';

    function toString() {
        return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
    }

    function toISOString(keepOffset) {
        if (!this.isValid()) {
            return null;
        }
        var utc = keepOffset !== true,
            m = utc ? this.clone().utc() : this;
        if (m.year() < 0 || m.year() > 9999) {
            return formatMoment(
                m,
                utc
                    ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'
                    : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'
            );
        }
        if (isFunction(Date.prototype.toISOString)) {
            // native implementation is ~50x faster, use it when we can
            if (utc) {
                return this.toDate().toISOString();
            } else {
                return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)
                    .toISOString()
                    .replace('Z', formatMoment(m, 'Z'));
            }
        }
        return formatMoment(
            m,
            utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'
        );
    }

    /**
     * Return a human readable representation of a moment that can
     * also be evaluated to get a new moment which is the same
     *
     * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
     */
    function inspect() {
        if (!this.isValid()) {
            return 'moment.invalid(/* ' + this._i + ' */)';
        }
        var func = 'moment',
            zone = '',
            prefix,
            year,
            datetime,
            suffix;
        if (!this.isLocal()) {
            func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
            zone = 'Z';
        }
        prefix = '[' + func + '("]';
        year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';
        datetime = '-MM-DD[T]HH:mm:ss.SSS';
        suffix = zone + '[")]';

        return this.format(prefix + year + datetime + suffix);
    }

    function format(inputString) {
        if (!inputString) {
            inputString = this.isUtc()
                ? hooks.defaultFormatUtc
                : hooks.defaultFormat;
        }
        var output = formatMoment(this, inputString);
        return this.localeData().postformat(output);
    }

    function from(time, withoutSuffix) {
        if (
            this.isValid() &&
            ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
        ) {
            return createDuration({ to: this, from: time })
                .locale(this.locale())
                .humanize(!withoutSuffix);
        } else {
            return this.localeData().invalidDate();
        }
    }

    function fromNow(withoutSuffix) {
        return this.from(createLocal(), withoutSuffix);
    }

    function to(time, withoutSuffix) {
        if (
            this.isValid() &&
            ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
        ) {
            return createDuration({ from: this, to: time })
                .locale(this.locale())
                .humanize(!withoutSuffix);
        } else {
            return this.localeData().invalidDate();
        }
    }

    function toNow(withoutSuffix) {
        return this.to(createLocal(), withoutSuffix);
    }

    // If passed a locale key, it will set the locale for this
    // instance.  Otherwise, it will return the locale configuration
    // variables for this instance.
    function locale(key) {
        var newLocaleData;

        if (key === undefined) {
            return this._locale._abbr;
        } else {
            newLocaleData = getLocale(key);
            if (newLocaleData != null) {
                this._locale = newLocaleData;
            }
            return this;
        }
    }

    var lang = deprecate(
        'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
        function (key) {
            if (key === undefined) {
                return this.localeData();
            } else {
                return this.locale(key);
            }
        }
    );

    function localeData() {
        return this._locale;
    }

    var MS_PER_SECOND = 1000,
        MS_PER_MINUTE = 60 * MS_PER_SECOND,
        MS_PER_HOUR = 60 * MS_PER_MINUTE,
        MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;

    // actual modulo - handles negative numbers (for dates before 1970):
    function mod$1(dividend, divisor) {
        return ((dividend % divisor) + divisor) % divisor;
    }

    function localStartOfDate(y, m, d) {
        // the date constructor remaps years 0-99 to 1900-1999
        if (y < 100 && y >= 0) {
            // preserve leap years using a full 400 year cycle, then reset
            return new Date(y + 400, m, d) - MS_PER_400_YEARS;
        } else {
            return new Date(y, m, d).valueOf();
        }
    }

    function utcStartOfDate(y, m, d) {
        // Date.UTC remaps years 0-99 to 1900-1999
        if (y < 100 && y >= 0) {
            // preserve leap years using a full 400 year cycle, then reset
            return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;
        } else {
            return Date.UTC(y, m, d);
        }
    }

    function startOf(units) {
        var time, startOfDate;
        units = normalizeUnits(units);
        if (units === undefined || units === 'millisecond' || !this.isValid()) {
            return this;
        }

        startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;

        switch (units) {
            case 'year':
                time = startOfDate(this.year(), 0, 1);
                break;
            case 'quarter':
                time = startOfDate(
                    this.year(),
                    this.month() - (this.month() % 3),
                    1
                );
                break;
            case 'month':
                time = startOfDate(this.year(), this.month(), 1);
                break;
            case 'week':
                time = startOfDate(
                    this.year(),
                    this.month(),
                    this.date() - this.weekday()
                );
                break;
            case 'isoWeek':
                time = startOfDate(
                    this.year(),
                    this.month(),
                    this.date() - (this.isoWeekday() - 1)
                );
                break;
            case 'day':
            case 'date':
                time = startOfDate(this.year(), this.month(), this.date());
                break;
            case 'hour':
                time = this._d.valueOf();
                time -= mod$1(
                    time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
                    MS_PER_HOUR
                );
                break;
            case 'minute':
                time = this._d.valueOf();
                time -= mod$1(time, MS_PER_MINUTE);
                break;
            case 'second':
                time = this._d.valueOf();
                time -= mod$1(time, MS_PER_SECOND);
                break;
        }

        this._d.setTime(time);
        hooks.updateOffset(this, true);
        return this;
    }

    function endOf(units) {
        var time, startOfDate;
        units = normalizeUnits(units);
        if (units === undefined || units === 'millisecond' || !this.isValid()) {
            return this;
        }

        startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;

        switch (units) {
            case 'year':
                time = startOfDate(this.year() + 1, 0, 1) - 1;
                break;
            case 'quarter':
                time =
                    startOfDate(
                        this.year(),
                        this.month() - (this.month() % 3) + 3,
                        1
                    ) - 1;
                break;
            case 'month':
                time = startOfDate(this.year(), this.month() + 1, 1) - 1;
                break;
            case 'week':
                time =
                    startOfDate(
                        this.year(),
                        this.month(),
                        this.date() - this.weekday() + 7
                    ) - 1;
                break;
            case 'isoWeek':
                time =
                    startOfDate(
                        this.year(),
                        this.month(),
                        this.date() - (this.isoWeekday() - 1) + 7
                    ) - 1;
                break;
            case 'day':
            case 'date':
                time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;
                break;
            case 'hour':
                time = this._d.valueOf();
                time +=
                    MS_PER_HOUR -
                    mod$1(
                        time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
                        MS_PER_HOUR
                    ) -
                    1;
                break;
            case 'minute':
                time = this._d.valueOf();
                time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;
                break;
            case 'second':
                time = this._d.valueOf();
                time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;
                break;
        }

        this._d.setTime(time);
        hooks.updateOffset(this, true);
        return this;
    }

    function valueOf() {
        return this._d.valueOf() - (this._offset || 0) * 60000;
    }

    function unix() {
        return Math.floor(this.valueOf() / 1000);
    }

    function toDate() {
        return new Date(this.valueOf());
    }

    function toArray() {
        var m = this;
        return [
            m.year(),
            m.month(),
            m.date(),
            m.hour(),
            m.minute(),
            m.second(),
            m.millisecond(),
        ];
    }

    function toObject() {
        var m = this;
        return {
            years: m.year(),
            months: m.month(),
            date: m.date(),
            hours: m.hours(),
            minutes: m.minutes(),
            seconds: m.seconds(),
            milliseconds: m.milliseconds(),
        };
    }

    function toJSON() {
        // new Date(NaN).toJSON() === null
        return this.isValid() ? this.toISOString() : null;
    }

    function isValid$2() {
        return isValid(this);
    }

    function parsingFlags() {
        return extend({}, getParsingFlags(this));
    }

    function invalidAt() {
        return getParsingFlags(this).overflow;
    }

    function creationData() {
        return {
            input: this._i,
            format: this._f,
            locale: this._locale,
            isUTC: this._isUTC,
            strict: this._strict,
        };
    }

    addFormatToken('N', 0, 0, 'eraAbbr');
    addFormatToken('NN', 0, 0, 'eraAbbr');
    addFormatToken('NNN', 0, 0, 'eraAbbr');
    addFormatToken('NNNN', 0, 0, 'eraName');
    addFormatToken('NNNNN', 0, 0, 'eraNarrow');

    addFormatToken('y', ['y', 1], 'yo', 'eraYear');
    addFormatToken('y', ['yy', 2], 0, 'eraYear');
    addFormatToken('y', ['yyy', 3], 0, 'eraYear');
    addFormatToken('y', ['yyyy', 4], 0, 'eraYear');

    addRegexToken('N', matchEraAbbr);
    addRegexToken('NN', matchEraAbbr);
    addRegexToken('NNN', matchEraAbbr);
    addRegexToken('NNNN', matchEraName);
    addRegexToken('NNNNN', matchEraNarrow);

    addParseToken(
        ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],
        function (input, array, config, token) {
            var era = config._locale.erasParse(input, token, config._strict);
            if (era) {
                getParsingFlags(config).era = era;
            } else {
                getParsingFlags(config).invalidEra = input;
            }
        }
    );

    addRegexToken('y', matchUnsigned);
    addRegexToken('yy', matchUnsigned);
    addRegexToken('yyy', matchUnsigned);
    addRegexToken('yyyy', matchUnsigned);
    addRegexToken('yo', matchEraYearOrdinal);

    addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);
    addParseToken(['yo'], function (input, array, config, token) {
        var match;
        if (config._locale._eraYearOrdinalRegex) {
            match = input.match(config._locale._eraYearOrdinalRegex);
        }

        if (config._locale.eraYearOrdinalParse) {
            array[YEAR] = config._locale.eraYearOrdinalParse(input, match);
        } else {
            array[YEAR] = parseInt(input, 10);
        }
    });

    function localeEras(m, format) {
        var i,
            l,
            date,
            eras = this._eras || getLocale('en')._eras;
        for (i = 0, l = eras.length; i < l; ++i) {
            switch (typeof eras[i].since) {
                case 'string':
                    // truncate time
                    date = hooks(eras[i].since).startOf('day');
                    eras[i].since = date.valueOf();
                    break;
            }

            switch (typeof eras[i].until) {
                case 'undefined':
                    eras[i].until = +Infinity;
                    break;
                case 'string':
                    // truncate time
                    date = hooks(eras[i].until).startOf('day').valueOf();
                    eras[i].until = date.valueOf();
                    break;
            }
        }
        return eras;
    }

    function localeErasParse(eraName, format, strict) {
        var i,
            l,
            eras = this.eras(),
            name,
            abbr,
            narrow;
        eraName = eraName.toUpperCase();

        for (i = 0, l = eras.length; i < l; ++i) {
            name = eras[i].name.toUpperCase();
            abbr = eras[i].abbr.toUpperCase();
            narrow = eras[i].narrow.toUpperCase();

            if (strict) {
                switch (format) {
                    case 'N':
                    case 'NN':
                    case 'NNN':
                        if (abbr === eraName) {
                            return eras[i];
                        }
                        break;

                    case 'NNNN':
                        if (name === eraName) {
                            return eras[i];
                        }
                        break;

                    case 'NNNNN':
                        if (narrow === eraName) {
                            return eras[i];
                        }
                        break;
                }
            } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {
                return eras[i];
            }
        }
    }

    function localeErasConvertYear(era, year) {
        var dir = era.since <= era.until ? +1 : -1;
        if (year === undefined) {
            return hooks(era.since).year();
        } else {
            return hooks(era.since).year() + (year - era.offset) * dir;
        }
    }

    function getEraName() {
        var i,
            l,
            val,
            eras = this.localeData().eras();
        for (i = 0, l = eras.length; i < l; ++i) {
            // truncate time
            val = this.clone().startOf('day').valueOf();

            if (eras[i].since <= val && val <= eras[i].until) {
                return eras[i].name;
            }
            if (eras[i].until <= val && val <= eras[i].since) {
                return eras[i].name;
            }
        }

        return '';
    }

    function getEraNarrow() {
        var i,
            l,
            val,
            eras = this.localeData().eras();
        for (i = 0, l = eras.length; i < l; ++i) {
            // truncate time
            val = this.clone().startOf('day').valueOf();

            if (eras[i].since <= val && val <= eras[i].until) {
                return eras[i].narrow;
            }
            if (eras[i].until <= val && val <= eras[i].since) {
                return eras[i].narrow;
            }
        }

        return '';
    }

    function getEraAbbr() {
        var i,
            l,
            val,
            eras = this.localeData().eras();
        for (i = 0, l = eras.length; i < l; ++i) {
            // truncate time
            val = this.clone().startOf('day').valueOf();

            if (eras[i].since <= val && val <= eras[i].until) {
                return eras[i].abbr;
            }
            if (eras[i].until <= val && val <= eras[i].since) {
                return eras[i].abbr;
            }
        }

        return '';
    }

    function getEraYear() {
        var i,
            l,
            dir,
            val,
            eras = this.localeData().eras();
        for (i = 0, l = eras.length; i < l; ++i) {
            dir = eras[i].since <= eras[i].until ? +1 : -1;

            // truncate time
            val = this.clone().startOf('day').valueOf();

            if (
                (eras[i].since <= val && val <= eras[i].until) ||
                (eras[i].until <= val && val <= eras[i].since)
            ) {
                return (
                    (this.year() - hooks(eras[i].since).year()) * dir +
                    eras[i].offset
                );
            }
        }

        return this.year();
    }

    function erasNameRegex(isStrict) {
        if (!hasOwnProp(this, '_erasNameRegex')) {
            computeErasParse.call(this);
        }
        return isStrict ? this._erasNameRegex : this._erasRegex;
    }

    function erasAbbrRegex(isStrict) {
        if (!hasOwnProp(this, '_erasAbbrRegex')) {
            computeErasParse.call(this);
        }
        return isStrict ? this._erasAbbrRegex : this._erasRegex;
    }

    function erasNarrowRegex(isStrict) {
        if (!hasOwnProp(this, '_erasNarrowRegex')) {
            computeErasParse.call(this);
        }
        return isStrict ? this._erasNarrowRegex : this._erasRegex;
    }

    function matchEraAbbr(isStrict, locale) {
        return locale.erasAbbrRegex(isStrict);
    }

    function matchEraName(isStrict, locale) {
        return locale.erasNameRegex(isStrict);
    }

    function matchEraNarrow(isStrict, locale) {
        return locale.erasNarrowRegex(isStrict);
    }

    function matchEraYearOrdinal(isStrict, locale) {
        return locale._eraYearOrdinalRegex || matchUnsigned;
    }

    function computeErasParse() {
        var abbrPieces = [],
            namePieces = [],
            narrowPieces = [],
            mixedPieces = [],
            i,
            l,
            erasName,
            erasAbbr,
            erasNarrow,
            eras = this.eras();

        for (i = 0, l = eras.length; i < l; ++i) {
            erasName = regexEscape(eras[i].name);
            erasAbbr = regexEscape(eras[i].abbr);
            erasNarrow = regexEscape(eras[i].narrow);

            namePieces.push(erasName);
            abbrPieces.push(erasAbbr);
            narrowPieces.push(erasNarrow);
            mixedPieces.push(erasName);
            mixedPieces.push(erasAbbr);
            mixedPieces.push(erasNarrow);
        }

        this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
        this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');
        this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');
        this._erasNarrowRegex = new RegExp(
            '^(' + narrowPieces.join('|') + ')',
            'i'
        );
    }

    // FORMATTING

    addFormatToken(0, ['gg', 2], 0, function () {
        return this.weekYear() % 100;
    });

    addFormatToken(0, ['GG', 2], 0, function () {
        return this.isoWeekYear() % 100;
    });

    function addWeekYearFormatToken(token, getter) {
        addFormatToken(0, [token, token.length], 0, getter);
    }

    addWeekYearFormatToken('gggg', 'weekYear');
    addWeekYearFormatToken('ggggg', 'weekYear');
    addWeekYearFormatToken('GGGG', 'isoWeekYear');
    addWeekYearFormatToken('GGGGG', 'isoWeekYear');

    // ALIASES

    // PARSING

    addRegexToken('G', matchSigned);
    addRegexToken('g', matchSigned);
    addRegexToken('GG', match1to2, match2);
    addRegexToken('gg', match1to2, match2);
    addRegexToken('GGGG', match1to4, match4);
    addRegexToken('gggg', match1to4, match4);
    addRegexToken('GGGGG', match1to6, match6);
    addRegexToken('ggggg', match1to6, match6);

    addWeekParseToken(
        ['gggg', 'ggggg', 'GGGG', 'GGGGG'],
        function (input, week, config, token) {
            week[token.substr(0, 2)] = toInt(input);
        }
    );

    addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
        week[token] = hooks.parseTwoDigitYear(input);
    });

    // MOMENTS

    function getSetWeekYear(input) {
        return getSetWeekYearHelper.call(
            this,
            input,
            this.week(),
            this.weekday() + this.localeData()._week.dow,
            this.localeData()._week.dow,
            this.localeData()._week.doy
        );
    }

    function getSetISOWeekYear(input) {
        return getSetWeekYearHelper.call(
            this,
            input,
            this.isoWeek(),
            this.isoWeekday(),
            1,
            4
        );
    }

    function getISOWeeksInYear() {
        return weeksInYear(this.year(), 1, 4);
    }

    function getISOWeeksInISOWeekYear() {
        return weeksInYear(this.isoWeekYear(), 1, 4);
    }

    function getWeeksInYear() {
        var weekInfo = this.localeData()._week;
        return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
    }

    function getWeeksInWeekYear() {
        var weekInfo = this.localeData()._week;
        return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);
    }

    function getSetWeekYearHelper(input, week, weekday, dow, doy) {
        var weeksTarget;
        if (input == null) {
            return weekOfYear(this, dow, doy).year;
        } else {
            weeksTarget = weeksInYear(input, dow, doy);
            if (week > weeksTarget) {
                week = weeksTarget;
            }
            return setWeekAll.call(this, input, week, weekday, dow, doy);
        }
    }

    function setWeekAll(weekYear, week, weekday, dow, doy) {
        var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
            date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);

        this.year(date.getUTCFullYear());
        this.month(date.getUTCMonth());
        this.date(date.getUTCDate());
        return this;
    }

    // FORMATTING

    addFormatToken('Q', 0, 'Qo', 'quarter');

    // PARSING

    addRegexToken('Q', match1);
    addParseToken('Q', function (input, array) {
        array[MONTH] = (toInt(input) - 1) * 3;
    });

    // MOMENTS

    function getSetQuarter(input) {
        return input == null
            ? Math.ceil((this.month() + 1) / 3)
            : this.month((input - 1) * 3 + (this.month() % 3));
    }

    // FORMATTING

    addFormatToken('D', ['DD', 2], 'Do', 'date');

    // PARSING

    addRegexToken('D', match1to2, match1to2NoLeadingZero);
    addRegexToken('DD', match1to2, match2);
    addRegexToken('Do', function (isStrict, locale) {
        // TODO: Remove "ordinalParse" fallback in next major release.
        return isStrict
            ? locale._dayOfMonthOrdinalParse || locale._ordinalParse
            : locale._dayOfMonthOrdinalParseLenient;
    });

    addParseToken(['D', 'DD'], DATE);
    addParseToken('Do', function (input, array) {
        array[DATE] = toInt(input.match(match1to2)[0]);
    });

    // MOMENTS

    var getSetDayOfMonth = makeGetSet('Date', true);

    // FORMATTING

    addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');

    // PARSING

    addRegexToken('DDD', match1to3);
    addRegexToken('DDDD', match3);
    addParseToken(['DDD', 'DDDD'], function (input, array, config) {
        config._dayOfYear = toInt(input);
    });

    // HELPERS

    // MOMENTS

    function getSetDayOfYear(input) {
        var dayOfYear =
            Math.round(
                (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5
            ) + 1;
        return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');
    }

    // FORMATTING

    addFormatToken('m', ['mm', 2], 0, 'minute');

    // PARSING

    addRegexToken('m', match1to2, match1to2HasZero);
    addRegexToken('mm', match1to2, match2);
    addParseToken(['m', 'mm'], MINUTE);

    // MOMENTS

    var getSetMinute = makeGetSet('Minutes', false);

    // FORMATTING

    addFormatToken('s', ['ss', 2], 0, 'second');

    // PARSING

    addRegexToken('s', match1to2, match1to2HasZero);
    addRegexToken('ss', match1to2, match2);
    addParseToken(['s', 'ss'], SECOND);

    // MOMENTS

    var getSetSecond = makeGetSet('Seconds', false);

    // FORMATTING

    addFormatToken('S', 0, 0, function () {
        return ~~(this.millisecond() / 100);
    });

    addFormatToken(0, ['SS', 2], 0, function () {
        return ~~(this.millisecond() / 10);
    });

    addFormatToken(0, ['SSS', 3], 0, 'millisecond');
    addFormatToken(0, ['SSSS', 4], 0, function () {
        return this.millisecond() * 10;
    });
    addFormatToken(0, ['SSSSS', 5], 0, function () {
        return this.millisecond() * 100;
    });
    addFormatToken(0, ['SSSSSS', 6], 0, function () {
        return this.millisecond() * 1000;
    });
    addFormatToken(0, ['SSSSSSS', 7], 0, function () {
        return this.millisecond() * 10000;
    });
    addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
        return this.millisecond() * 100000;
    });
    addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
        return this.millisecond() * 1000000;
    });

    // PARSING

    addRegexToken('S', match1to3, match1);
    addRegexToken('SS', match1to3, match2);
    addRegexToken('SSS', match1to3, match3);

    var token, getSetMillisecond;
    for (token = 'SSSS'; token.length <= 9; token += 'S') {
        addRegexToken(token, matchUnsigned);
    }

    function parseMs(input, array) {
        array[MILLISECOND] = toInt(('0.' + input) * 1000);
    }

    for (token = 'S'; token.length <= 9; token += 'S') {
        addParseToken(token, parseMs);
    }

    getSetMillisecond = makeGetSet('Milliseconds', false);

    // FORMATTING

    addFormatToken('z', 0, 0, 'zoneAbbr');
    addFormatToken('zz', 0, 0, 'zoneName');

    // MOMENTS

    function getZoneAbbr() {
        return this._isUTC ? 'UTC' : '';
    }

    function getZoneName() {
        return this._isUTC ? 'Coordinated Universal Time' : '';
    }

    var proto = Moment.prototype;

    proto.add = add;
    proto.calendar = calendar$1;
    proto.clone = clone;
    proto.diff = diff;
    proto.endOf = endOf;
    proto.format = format;
    proto.from = from;
    proto.fromNow = fromNow;
    proto.to = to;
    proto.toNow = toNow;
    proto.get = stringGet;
    proto.invalidAt = invalidAt;
    proto.isAfter = isAfter;
    proto.isBefore = isBefore;
    proto.isBetween = isBetween;
    proto.isSame = isSame;
    proto.isSameOrAfter = isSameOrAfter;
    proto.isSameOrBefore = isSameOrBefore;
    proto.isValid = isValid$2;
    proto.lang = lang;
    proto.locale = locale;
    proto.localeData = localeData;
    proto.max = prototypeMax;
    proto.min = prototypeMin;
    proto.parsingFlags = parsingFlags;
    proto.set = stringSet;
    proto.startOf = startOf;
    proto.subtract = subtract;
    proto.toArray = toArray;
    proto.toObject = toObject;
    proto.toDate = toDate;
    proto.toISOString = toISOString;
    proto.inspect = inspect;
    if (typeof Symbol !== 'undefined' && Symbol.for != null) {
        proto[Symbol.for('nodejs.util.inspect.custom')] = function () {
            return 'Moment<' + this.format() + '>';
        };
    }
    proto.toJSON = toJSON;
    proto.toString = toString;
    proto.unix = unix;
    proto.valueOf = valueOf;
    proto.creationData = creationData;
    proto.eraName = getEraName;
    proto.eraNarrow = getEraNarrow;
    proto.eraAbbr = getEraAbbr;
    proto.eraYear = getEraYear;
    proto.year = getSetYear;
    proto.isLeapYear = getIsLeapYear;
    proto.weekYear = getSetWeekYear;
    proto.isoWeekYear = getSetISOWeekYear;
    proto.quarter = proto.quarters = getSetQuarter;
    proto.month = getSetMonth;
    proto.daysInMonth = getDaysInMonth;
    proto.week = proto.weeks = getSetWeek;
    proto.isoWeek = proto.isoWeeks = getSetISOWeek;
    proto.weeksInYear = getWeeksInYear;
    proto.weeksInWeekYear = getWeeksInWeekYear;
    proto.isoWeeksInYear = getISOWeeksInYear;
    proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
    proto.date = getSetDayOfMonth;
    proto.day = proto.days = getSetDayOfWeek;
    proto.weekday = getSetLocaleDayOfWeek;
    proto.isoWeekday = getSetISODayOfWeek;
    proto.dayOfYear = getSetDayOfYear;
    proto.hour = proto.hours = getSetHour;
    proto.minute = proto.minutes = getSetMinute;
    proto.second = proto.seconds = getSetSecond;
    proto.millisecond = proto.milliseconds = getSetMillisecond;
    proto.utcOffset = getSetOffset;
    proto.utc = setOffsetToUTC;
    proto.local = setOffsetToLocal;
    proto.parseZone = setOffsetToParsedOffset;
    proto.hasAlignedHourOffset = hasAlignedHourOffset;
    proto.isDST = isDaylightSavingTime;
    proto.isLocal = isLocal;
    proto.isUtcOffset = isUtcOffset;
    proto.isUtc = isUtc;
    proto.isUTC = isUtc;
    proto.zoneAbbr = getZoneAbbr;
    proto.zoneName = getZoneName;
    proto.dates = deprecate(
        'dates accessor is deprecated. Use date instead.',
        getSetDayOfMonth
    );
    proto.months = deprecate(
        'months accessor is deprecated. Use month instead',
        getSetMonth
    );
    proto.years = deprecate(
        'years accessor is deprecated. Use year instead',
        getSetYear
    );
    proto.zone = deprecate(
        'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',
        getSetZone
    );
    proto.isDSTShifted = deprecate(
        'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',
        isDaylightSavingTimeShifted
    );

    function createUnix(input) {
        return createLocal(input * 1000);
    }

    function createInZone() {
        return createLocal.apply(null, arguments).parseZone();
    }

    function preParsePostFormat(string) {
        return string;
    }

    var proto$1 = Locale.prototype;

    proto$1.calendar = calendar;
    proto$1.longDateFormat = longDateFormat;
    proto$1.invalidDate = invalidDate;
    proto$1.ordinal = ordinal;
    proto$1.preparse = preParsePostFormat;
    proto$1.postformat = preParsePostFormat;
    proto$1.relativeTime = relativeTime;
    proto$1.pastFuture = pastFuture;
    proto$1.set = set;
    proto$1.eras = localeEras;
    proto$1.erasParse = localeErasParse;
    proto$1.erasConvertYear = localeErasConvertYear;
    proto$1.erasAbbrRegex = erasAbbrRegex;
    proto$1.erasNameRegex = erasNameRegex;
    proto$1.erasNarrowRegex = erasNarrowRegex;

    proto$1.months = localeMonths;
    proto$1.monthsShort = localeMonthsShort;
    proto$1.monthsParse = localeMonthsParse;
    proto$1.monthsRegex = monthsRegex;
    proto$1.monthsShortRegex = monthsShortRegex;
    proto$1.week = localeWeek;
    proto$1.firstDayOfYear = localeFirstDayOfYear;
    proto$1.firstDayOfWeek = localeFirstDayOfWeek;

    proto$1.weekdays = localeWeekdays;
    proto$1.weekdaysMin = localeWeekdaysMin;
    proto$1.weekdaysShort = localeWeekdaysShort;
    proto$1.weekdaysParse = localeWeekdaysParse;

    proto$1.weekdaysRegex = weekdaysRegex;
    proto$1.weekdaysShortRegex = weekdaysShortRegex;
    proto$1.weekdaysMinRegex = weekdaysMinRegex;

    proto$1.isPM = localeIsPM;
    proto$1.meridiem = localeMeridiem;

    function get$1(format, index, field, setter) {
        var locale = getLocale(),
            utc = createUTC().set(setter, index);
        return locale[field](utc, format);
    }

    function listMonthsImpl(format, index, field) {
        if (isNumber(format)) {
            index = format;
            format = undefined;
        }

        format = format || '';

        if (index != null) {
            return get$1(format, index, field, 'month');
        }

        var i,
            out = [];
        for (i = 0; i < 12; i++) {
            out[i] = get$1(format, i, field, 'month');
        }
        return out;
    }

    // ()
    // (5)
    // (fmt, 5)
    // (fmt)
    // (true)
    // (true, 5)
    // (true, fmt, 5)
    // (true, fmt)
    function listWeekdaysImpl(localeSorted, format, index, field) {
        if (typeof localeSorted === 'boolean') {
            if (isNumber(format)) {
                index = format;
                format = undefined;
            }

            format = format || '';
        } else {
            format = localeSorted;
            index = format;
            localeSorted = false;

            if (isNumber(format)) {
                index = format;
                format = undefined;
            }

            format = format || '';
        }

        var locale = getLocale(),
            shift = localeSorted ? locale._week.dow : 0,
            i,
            out = [];

        if (index != null) {
            return get$1(format, (index + shift) % 7, field, 'day');
        }

        for (i = 0; i < 7; i++) {
            out[i] = get$1(format, (i + shift) % 7, field, 'day');
        }
        return out;
    }

    function listMonths(format, index) {
        return listMonthsImpl(format, index, 'months');
    }

    function listMonthsShort(format, index) {
        return listMonthsImpl(format, index, 'monthsShort');
    }

    function listWeekdays(localeSorted, format, index) {
        return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
    }

    function listWeekdaysShort(localeSorted, format, index) {
        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
    }

    function listWeekdaysMin(localeSorted, format, index) {
        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
    }

    getSetGlobalLocale('en', {
        eras: [
            {
                since: '0001-01-01',
                until: +Infinity,
                offset: 1,
                name: 'Anno Domini',
                narrow: 'AD',
                abbr: 'AD',
            },
            {
                since: '0000-12-31',
                until: -Infinity,
                offset: 1,
                name: 'Before Christ',
                narrow: 'BC',
                abbr: 'BC',
            },
        ],
        dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
        ordinal: function (number) {
            var b = number % 10,
                output =
                    toInt((number % 100) / 10) === 1
                        ? 'th'
                        : b === 1
                          ? 'st'
                          : b === 2
                            ? 'nd'
                            : b === 3
                              ? 'rd'
                              : 'th';
            return number + output;
        },
    });

    // Side effect imports

    hooks.lang = deprecate(
        'moment.lang is deprecated. Use moment.locale instead.',
        getSetGlobalLocale
    );
    hooks.langData = deprecate(
        'moment.langData is deprecated. Use moment.localeData instead.',
        getLocale
    );

    var mathAbs = Math.abs;

    function abs() {
        var data = this._data;

        this._milliseconds = mathAbs(this._milliseconds);
        this._days = mathAbs(this._days);
        this._months = mathAbs(this._months);

        data.milliseconds = mathAbs(data.milliseconds);
        data.seconds = mathAbs(data.seconds);
        data.minutes = mathAbs(data.minutes);
        data.hours = mathAbs(data.hours);
        data.months = mathAbs(data.months);
        data.years = mathAbs(data.years);

        return this;
    }

    function addSubtract$1(duration, input, value, direction) {
        var other = createDuration(input, value);

        duration._milliseconds += direction * other._milliseconds;
        duration._days += direction * other._days;
        duration._months += direction * other._months;

        return duration._bubble();
    }

    // supports only 2.0-style add(1, 's') or add(duration)
    function add$1(input, value) {
        return addSubtract$1(this, input, value, 1);
    }

    // supports only 2.0-style subtract(1, 's') or subtract(duration)
    function subtract$1(input, value) {
        return addSubtract$1(this, input, value, -1);
    }

    function absCeil(number) {
        if (number < 0) {
            return Math.floor(number);
        } else {
            return Math.ceil(number);
        }
    }

    function bubble() {
        var milliseconds = this._milliseconds,
            days = this._days,
            months = this._months,
            data = this._data,
            seconds,
            minutes,
            hours,
            years,
            monthsFromDays;

        // if we have a mix of positive and negative values, bubble down first
        // check: https://github.com/moment/moment/issues/2166
        if (
            !(
                (milliseconds >= 0 && days >= 0 && months >= 0) ||
                (milliseconds <= 0 && days <= 0 && months <= 0)
            )
        ) {
            milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
            days = 0;
            months = 0;
        }

        // The following code bubbles up values, see the tests for
        // examples of what that means.
        data.milliseconds = milliseconds % 1000;

        seconds = absFloor(milliseconds / 1000);
        data.seconds = seconds % 60;

        minutes = absFloor(seconds / 60);
        data.minutes = minutes % 60;

        hours = absFloor(minutes / 60);
        data.hours = hours % 24;

        days += absFloor(hours / 24);

        // convert days to months
        monthsFromDays = absFloor(daysToMonths(days));
        months += monthsFromDays;
        days -= absCeil(monthsToDays(monthsFromDays));

        // 12 months -> 1 year
        years = absFloor(months / 12);
        months %= 12;

        data.days = days;
        data.months = months;
        data.years = years;

        return this;
    }

    function daysToMonths(days) {
        // 400 years have 146097 days (taking into account leap year rules)
        // 400 years have 12 months === 4800
        return (days * 4800) / 146097;
    }

    function monthsToDays(months) {
        // the reverse of daysToMonths
        return (months * 146097) / 4800;
    }

    function as(units) {
        if (!this.isValid()) {
            return NaN;
        }
        var days,
            months,
            milliseconds = this._milliseconds;

        units = normalizeUnits(units);

        if (units === 'month' || units === 'quarter' || units === 'year') {
            days = this._days + milliseconds / 864e5;
            months = this._months + daysToMonths(days);
            switch (units) {
                case 'month':
                    return months;
                case 'quarter':
                    return months / 3;
                case 'year':
                    return months / 12;
            }
        } else {
            // handle milliseconds separately because of floating point math errors (issue #1867)
            days = this._days + Math.round(monthsToDays(this._months));
            switch (units) {
                case 'week':
                    return days / 7 + milliseconds / 6048e5;
                case 'day':
                    return days + milliseconds / 864e5;
                case 'hour':
                    return days * 24 + milliseconds / 36e5;
                case 'minute':
                    return days * 1440 + milliseconds / 6e4;
                case 'second':
                    return days * 86400 + milliseconds / 1000;
                // Math.floor prevents floating point math errors here
                case 'millisecond':
                    return Math.floor(days * 864e5) + milliseconds;
                default:
                    throw new Error('Unknown unit ' + units);
            }
        }
    }

    function makeAs(alias) {
        return function () {
            return this.as(alias);
        };
    }

    var asMilliseconds = makeAs('ms'),
        asSeconds = makeAs('s'),
        asMinutes = makeAs('m'),
        asHours = makeAs('h'),
        asDays = makeAs('d'),
        asWeeks = makeAs('w'),
        asMonths = makeAs('M'),
        asQuarters = makeAs('Q'),
        asYears = makeAs('y'),
        valueOf$1 = asMilliseconds;

    function clone$1() {
        return createDuration(this);
    }

    function get$2(units) {
        units = normalizeUnits(units);
        return this.isValid() ? this[units + 's']() : NaN;
    }

    function makeGetter(name) {
        return function () {
            return this.isValid() ? this._data[name] : NaN;
        };
    }

    var milliseconds = makeGetter('milliseconds'),
        seconds = makeGetter('seconds'),
        minutes = makeGetter('minutes'),
        hours = makeGetter('hours'),
        days = makeGetter('days'),
        months = makeGetter('months'),
        years = makeGetter('years');

    function weeks() {
        return absFloor(this.days() / 7);
    }

    var round = Math.round,
        thresholds = {
            ss: 44, // a few seconds to seconds
            s: 45, // seconds to minute
            m: 45, // minutes to hour
            h: 22, // hours to day
            d: 26, // days to month/week
            w: null, // weeks to month
            M: 11, // months to year
        };

    // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
    function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
        return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
    }

    function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {
        var duration = createDuration(posNegDuration).abs(),
            seconds = round(duration.as('s')),
            minutes = round(duration.as('m')),
            hours = round(duration.as('h')),
            days = round(duration.as('d')),
            months = round(duration.as('M')),
            weeks = round(duration.as('w')),
            years = round(duration.as('y')),
            a =
                (seconds <= thresholds.ss && ['s', seconds]) ||
                (seconds < thresholds.s && ['ss', seconds]) ||
                (minutes <= 1 && ['m']) ||
                (minutes < thresholds.m && ['mm', minutes]) ||
                (hours <= 1 && ['h']) ||
                (hours < thresholds.h && ['hh', hours]) ||
                (days <= 1 && ['d']) ||
                (days < thresholds.d && ['dd', days]);

        if (thresholds.w != null) {
            a =
                a ||
                (weeks <= 1 && ['w']) ||
                (weeks < thresholds.w && ['ww', weeks]);
        }
        a = a ||
            (months <= 1 && ['M']) ||
            (months < thresholds.M && ['MM', months]) ||
            (years <= 1 && ['y']) || ['yy', years];

        a[2] = withoutSuffix;
        a[3] = +posNegDuration > 0;
        a[4] = locale;
        return substituteTimeAgo.apply(null, a);
    }

    // This function allows you to set the rounding function for relative time strings
    function getSetRelativeTimeRounding(roundingFunction) {
        if (roundingFunction === undefined) {
            return round;
        }
        if (typeof roundingFunction === 'function') {
            round = roundingFunction;
            return true;
        }
        return false;
    }

    // This function allows you to set a threshold for relative time strings
    function getSetRelativeTimeThreshold(threshold, limit) {
        if (thresholds[threshold] === undefined) {
            return false;
        }
        if (limit === undefined) {
            return thresholds[threshold];
        }
        thresholds[threshold] = limit;
        if (threshold === 's') {
            thresholds.ss = limit - 1;
        }
        return true;
    }

    function humanize(argWithSuffix, argThresholds) {
        if (!this.isValid()) {
            return this.localeData().invalidDate();
        }

        var withSuffix = false,
            th = thresholds,
            locale,
            output;

        if (typeof argWithSuffix === 'object') {
            argThresholds = argWithSuffix;
            argWithSuffix = false;
        }
        if (typeof argWithSuffix === 'boolean') {
            withSuffix = argWithSuffix;
        }
        if (typeof argThresholds === 'object') {
            th = Object.assign({}, thresholds, argThresholds);
            if (argThresholds.s != null && argThresholds.ss == null) {
                th.ss = argThresholds.s - 1;
            }
        }

        locale = this.localeData();
        output = relativeTime$1(this, !withSuffix, th, locale);

        if (withSuffix) {
            output = locale.pastFuture(+this, output);
        }

        return locale.postformat(output);
    }

    var abs$1 = Math.abs;

    function sign(x) {
        return (x > 0) - (x < 0) || +x;
    }

    function toISOString$1() {
        // for ISO strings we do not use the normal bubbling rules:
        //  * milliseconds bubble up until they become hours
        //  * days do not bubble at all
        //  * months bubble up until they become years
        // This is because there is no context-free conversion between hours and days
        // (think of clock changes)
        // and also not between days and months (28-31 days per month)
        if (!this.isValid()) {
            return this.localeData().invalidDate();
        }

        var seconds = abs$1(this._milliseconds) / 1000,
            days = abs$1(this._days),
            months = abs$1(this._months),
            minutes,
            hours,
            years,
            s,
            total = this.asSeconds(),
            totalSign,
            ymSign,
            daysSign,
            hmsSign;

        if (!total) {
            // this is the same as C#'s (Noda) and python (isodate)...
            // but not other JS (goog.date)
            return 'P0D';
        }

        // 3600 seconds -> 60 minutes -> 1 hour
        minutes = absFloor(seconds / 60);
        hours = absFloor(minutes / 60);
        seconds %= 60;
        minutes %= 60;

        // 12 months -> 1 year
        years = absFloor(months / 12);
        months %= 12;

        // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
        s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';

        totalSign = total < 0 ? '-' : '';
        ymSign = sign(this._months) !== sign(total) ? '-' : '';
        daysSign = sign(this._days) !== sign(total) ? '-' : '';
        hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';

        return (
            totalSign +
            'P' +
            (years ? ymSign + years + 'Y' : '') +
            (months ? ymSign + months + 'M' : '') +
            (days ? daysSign + days + 'D' : '') +
            (hours || minutes || seconds ? 'T' : '') +
            (hours ? hmsSign + hours + 'H' : '') +
            (minutes ? hmsSign + minutes + 'M' : '') +
            (seconds ? hmsSign + s + 'S' : '')
        );
    }

    var proto$2 = Duration.prototype;

    proto$2.isValid = isValid$1;
    proto$2.abs = abs;
    proto$2.add = add$1;
    proto$2.subtract = subtract$1;
    proto$2.as = as;
    proto$2.asMilliseconds = asMilliseconds;
    proto$2.asSeconds = asSeconds;
    proto$2.asMinutes = asMinutes;
    proto$2.asHours = asHours;
    proto$2.asDays = asDays;
    proto$2.asWeeks = asWeeks;
    proto$2.asMonths = asMonths;
    proto$2.asQuarters = asQuarters;
    proto$2.asYears = asYears;
    proto$2.valueOf = valueOf$1;
    proto$2._bubble = bubble;
    proto$2.clone = clone$1;
    proto$2.get = get$2;
    proto$2.milliseconds = milliseconds;
    proto$2.seconds = seconds;
    proto$2.minutes = minutes;
    proto$2.hours = hours;
    proto$2.days = days;
    proto$2.weeks = weeks;
    proto$2.months = months;
    proto$2.years = years;
    proto$2.humanize = humanize;
    proto$2.toISOString = toISOString$1;
    proto$2.toString = toISOString$1;
    proto$2.toJSON = toISOString$1;
    proto$2.locale = locale;
    proto$2.localeData = localeData;

    proto$2.toIsoString = deprecate(
        'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',
        toISOString$1
    );
    proto$2.lang = lang;

    // FORMATTING

    addFormatToken('X', 0, 0, 'unix');
    addFormatToken('x', 0, 0, 'valueOf');

    // PARSING

    addRegexToken('x', matchSigned);
    addRegexToken('X', matchTimestamp);
    addParseToken('X', function (input, array, config) {
        config._d = new Date(parseFloat(input) * 1000);
    });
    addParseToken('x', function (input, array, config) {
        config._d = new Date(toInt(input));
    });

    //! moment.js

    hooks.version = '2.30.1';

    setHookCallback(createLocal);

    hooks.fn = proto;
    hooks.min = min;
    hooks.max = max;
    hooks.now = now;
    hooks.utc = createUTC;
    hooks.unix = createUnix;
    hooks.months = listMonths;
    hooks.isDate = isDate;
    hooks.locale = getSetGlobalLocale;
    hooks.invalid = createInvalid;
    hooks.duration = createDuration;
    hooks.isMoment = isMoment;
    hooks.weekdays = listWeekdays;
    hooks.parseZone = createInZone;
    hooks.localeData = getLocale;
    hooks.isDuration = isDuration;
    hooks.monthsShort = listMonthsShort;
    hooks.weekdaysMin = listWeekdaysMin;
    hooks.defineLocale = defineLocale;
    hooks.updateLocale = updateLocale;
    hooks.locales = listLocales;
    hooks.weekdaysShort = listWeekdaysShort;
    hooks.normalizeUnits = normalizeUnits;
    hooks.relativeTimeRounding = getSetRelativeTimeRounding;
    hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
    hooks.calendarFormat = getCalendarFormat;
    hooks.prototype = proto;

    // currently HTML5 input type only supports 24-hour formats
    hooks.HTML5_FMT = {
        DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type="datetime-local" />
        DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type="datetime-local" step="1" />
        DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type="datetime-local" step="0.001" />
        DATE: 'YYYY-MM-DD', // <input type="date" />
        TIME: 'HH:mm', // <input type="time" />
        TIME_SECONDS: 'HH:mm:ss', // <input type="time" step="1" />
        TIME_MS: 'HH:mm:ss.SSS', // <input type="time" step="0.001" />
        WEEK: 'GGGG-[W]WW', // <input type="week" />
        MONTH: 'YYYY-MM', // <input type="month" />
    };

    return hooks;

})));
                                                                                                                                                                                                             dist/vendor/moment.min.js                                                                           0000644                 00000162674 15212564033 0011444 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var H;function _(){return H.apply(null,arguments)}function y(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function F(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function L(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(c(e,t))return;return 1}function g(e){return void 0===e}function w(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function V(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function G(e,t){for(var n=[],s=e.length,i=0;i<s;++i)n.push(t(e[i],i));return n}function E(e,t){for(var n in t)c(t,n)&&(e[n]=t[n]);return c(t,"toString")&&(e.toString=t.toString),c(t,"valueOf")&&(e.valueOf=t.valueOf),e}function l(e,t,n,s){return Wt(e,t,n,s,!0).utc()}function p(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function A(e){var t,n,s=e._d&&!isNaN(e._d.getTime());return s&&(t=p(e),n=j.call(t.parsedDateParts,function(e){return null!=e}),s=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||(t.meridiem,n)),e._strict)&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e)?s:(e._isValid=s,e._isValid)}function I(e){var t=l(NaN);return null!=e?E(p(t),e):p(t).userInvalidated=!0,t}var j=Array.prototype.some||function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1},Z=_.momentProperties=[],z=!1;function q(e,t){var n,s,i,r=Z.length;if(g(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),g(t._i)||(e._i=t._i),g(t._f)||(e._f=t._f),g(t._l)||(e._l=t._l),g(t._strict)||(e._strict=t._strict),g(t._tzm)||(e._tzm=t._tzm),g(t._isUTC)||(e._isUTC=t._isUTC),g(t._offset)||(e._offset=t._offset),g(t._pf)||(e._pf=p(t)),g(t._locale)||(e._locale=t._locale),0<r)for(n=0;n<r;n++)g(i=t[s=Z[n]])||(e[s]=i);return e}function $(e){q(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===z&&(z=!0,_.updateOffset(this),z=!1)}function k(e){return e instanceof $||null!=e&&null!=e._isAMomentObject}function B(e){!1===_.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function e(r,a){var o=!0;return E(function(){if(null!=_.deprecationHandler&&_.deprecationHandler(null,r),o){for(var e,t,n=[],s=arguments.length,i=0;i<s;i++){if(e="","object"==typeof arguments[i]){for(t in e+="\n["+i+"] ",arguments[0])c(arguments[0],t)&&(e+=t+": "+arguments[0][t]+", ");e=e.slice(0,-2)}else e=arguments[i];n.push(e)}B(r+"\nArguments: "+Array.prototype.slice.call(n).join("")+"\n"+(new Error).stack),o=!1}return a.apply(this,arguments)},a)}var J={};function Q(e,t){null!=_.deprecationHandler&&_.deprecationHandler(e,t),J[e]||(B(t),J[e]=!0)}function a(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function X(e,t){var n,s=E({},e);for(n in t)c(t,n)&&(F(e[n])&&F(t[n])?(s[n]={},E(s[n],e[n]),E(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)c(e,n)&&!c(t,n)&&F(e[n])&&(s[n]=E({},s[n]));return s}function K(e){null!=e&&this.set(e)}_.suppressDeprecationWarnings=!1,_.deprecationHandler=null;var ee=Object.keys||function(e){var t,n=[];for(t in e)c(e,t)&&n.push(t);return n};function r(e,t,n){var s=""+Math.abs(e);return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,t-s.length)).toString().substr(1)+s}var te=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ne=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,se={},ie={};function s(e,t,n,s){var i="string"==typeof s?function(){return this[s]()}:s;e&&(ie[e]=i),t&&(ie[t[0]]=function(){return r(i.apply(this,arguments),t[1],t[2])}),n&&(ie[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function re(e,t){return e.isValid()?(t=ae(t,e.localeData()),se[t]=se[t]||function(s){for(var e,i=s.match(te),t=0,r=i.length;t<r;t++)ie[i[t]]?i[t]=ie[i[t]]:i[t]=(e=i[t]).match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"");return function(e){for(var t="",n=0;n<r;n++)t+=a(i[n])?i[n].call(e,s):i[n];return t}}(t),se[t](e)):e.localeData().invalidDate()}function ae(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(ne.lastIndex=0;0<=n&&ne.test(e);)e=e.replace(ne,s),ne.lastIndex=0,--n;return e}var oe={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function o(e){return"string"==typeof e?oe[e]||oe[e.toLowerCase()]:void 0}function ue(e){var t,n,s={};for(n in e)c(e,n)&&(t=o(n))&&(s[t]=e[n]);return s}var le={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};var de=/\d/,t=/\d\d/,he=/\d{3}/,ce=/\d{4}/,fe=/[+-]?\d{6}/,n=/\d\d?/,me=/\d\d\d\d?/,_e=/\d\d\d\d\d\d?/,ye=/\d{1,3}/,ge=/\d{1,4}/,we=/[+-]?\d{1,6}/,pe=/\d+/,ke=/[+-]?\d+/,Me=/Z|[+-]\d\d:?\d\d/gi,ve=/Z|[+-]\d\d(?::?\d\d)?/gi,i=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,u=/^[1-9]\d?/,d=/^([1-9]\d|\d)/;function h(e,n,s){Ye[e]=a(n)?n:function(e,t){return e&&s?s:n}}function De(e,t){return c(Ye,e)?Ye[e](t._strict,t._locale):new RegExp(f(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function f(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function m(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function M(e){var e=+e,t=0;return t=0!=e&&isFinite(e)?m(e):t}var Ye={},Se={};function v(e,n){var t,s,i=n;for("string"==typeof e&&(e=[e]),w(n)&&(i=function(e,t){t[n]=M(e)}),s=e.length,t=0;t<s;t++)Se[e[t]]=i}function Oe(e,i){v(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}function be(e){return e%4==0&&e%100!=0||e%400==0}var D=0,Y=1,S=2,O=3,b=4,T=5,Te=6,xe=7,Ne=8;function We(e){return be(e)?366:365}s("Y",0,0,function(){var e=this.year();return e<=9999?r(e,4):"+"+e}),s(0,["YY",2],0,function(){return this.year()%100}),s(0,["YYYY",4],0,"year"),s(0,["YYYYY",5],0,"year"),s(0,["YYYYYY",6,!0],0,"year"),h("Y",ke),h("YY",n,t),h("YYYY",ge,ce),h("YYYYY",we,fe),h("YYYYYY",we,fe),v(["YYYYY","YYYYYY"],D),v("YYYY",function(e,t){t[D]=2===e.length?_.parseTwoDigitYear(e):M(e)}),v("YY",function(e,t){t[D]=_.parseTwoDigitYear(e)}),v("Y",function(e,t){t[D]=parseInt(e,10)}),_.parseTwoDigitYear=function(e){return M(e)+(68<M(e)?1900:2e3)};var x,Pe=Re("FullYear",!0);function Re(t,n){return function(e){return null!=e?(Ue(this,t,e),_.updateOffset(this,n),this):Ce(this,t)}}function Ce(e,t){if(!e.isValid())return NaN;var n=e._d,s=e._isUTC;switch(t){case"Milliseconds":return s?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return s?n.getUTCSeconds():n.getSeconds();case"Minutes":return s?n.getUTCMinutes():n.getMinutes();case"Hours":return s?n.getUTCHours():n.getHours();case"Date":return s?n.getUTCDate():n.getDate();case"Day":return s?n.getUTCDay():n.getDay();case"Month":return s?n.getUTCMonth():n.getMonth();case"FullYear":return s?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Ue(e,t,n){var s,i,r;if(e.isValid()&&!isNaN(n)){switch(s=e._d,i=e._isUTC,t){case"Milliseconds":return i?s.setUTCMilliseconds(n):s.setMilliseconds(n);case"Seconds":return i?s.setUTCSeconds(n):s.setSeconds(n);case"Minutes":return i?s.setUTCMinutes(n):s.setMinutes(n);case"Hours":return i?s.setUTCHours(n):s.setHours(n);case"Date":return i?s.setUTCDate(n):s.setDate(n);case"FullYear":break;default:return}t=n,r=e.month(),e=29!==(e=e.date())||1!==r||be(t)?e:28,i?s.setUTCFullYear(t,r,e):s.setFullYear(t,r,e)}}function He(e,t){var n;return isNaN(e)||isNaN(t)?NaN:(n=(t%(n=12)+n)%n,e+=(t-n)/12,1==n?be(e)?29:28:31-n%7%2)}x=Array.prototype.indexOf||function(e){for(var t=0;t<this.length;++t)if(this[t]===e)return t;return-1},s("M",["MM",2],"Mo",function(){return this.month()+1}),s("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),s("MMMM",0,0,function(e){return this.localeData().months(this,e)}),h("M",n,u),h("MM",n,t),h("MMM",function(e,t){return t.monthsShortRegex(e)}),h("MMMM",function(e,t){return t.monthsRegex(e)}),v(["M","MM"],function(e,t){t[Y]=M(e)-1}),v(["MMM","MMMM"],function(e,t,n,s){s=n._locale.monthsParse(e,s,n._strict);null!=s?t[Y]=s:p(n).invalidMonth=e});var Fe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Le="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Ve=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ge=i,Ee=i;function Ae(e,t){if(e.isValid()){if("string"==typeof t)if(/^\d+$/.test(t))t=M(t);else if(!w(t=e.localeData().monthsParse(t)))return;var n=(n=e.date())<29?n:Math.min(n,He(e.year(),t));e._isUTC?e._d.setUTCMonth(t,n):e._d.setMonth(t,n)}}function Ie(e){return null!=e?(Ae(this,e),_.updateOffset(this,!0),this):Ce(this,"Month")}function je(){function e(e,t){return t.length-e.length}for(var t,n,s=[],i=[],r=[],a=0;a<12;a++)n=l([2e3,a]),t=f(this.monthsShort(n,"")),n=f(this.months(n,"")),s.push(t),i.push(n),r.push(n),r.push(t);s.sort(e),i.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ze(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}function ze(e){var t;return e<100&&0<=e?((t=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,t)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function qe(e,t,n){n=7+t-n;return n-(7+ze(e,0,n).getUTCDay()-t)%7-1}function $e(e,t,n,s,i){var r,t=1+7*(t-1)+(7+n-s)%7+qe(e,s,i),n=t<=0?We(r=e-1)+t:t>We(e)?(r=e+1,t-We(e)):(r=e,t);return{year:r,dayOfYear:n}}function Be(e,t,n){var s,i,r=qe(e.year(),t,n),r=Math.floor((e.dayOfYear()-r-1)/7)+1;return r<1?s=r+N(i=e.year()-1,t,n):r>N(e.year(),t,n)?(s=r-N(e.year(),t,n),i=e.year()+1):(i=e.year(),s=r),{week:s,year:i}}function N(e,t,n){var s=qe(e,t,n),t=qe(e+1,t,n);return(We(e)-s+t)/7}s("w",["ww",2],"wo","week"),s("W",["WW",2],"Wo","isoWeek"),h("w",n,u),h("ww",n,t),h("W",n,u),h("WW",n,t),Oe(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=M(e)});function Je(e,t){return e.slice(t,7).concat(e.slice(0,t))}s("d",0,"do","day"),s("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),s("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),s("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),s("e",0,0,"weekday"),s("E",0,0,"isoWeekday"),h("d",n),h("e",n),h("E",n),h("dd",function(e,t){return t.weekdaysMinRegex(e)}),h("ddd",function(e,t){return t.weekdaysShortRegex(e)}),h("dddd",function(e,t){return t.weekdaysRegex(e)}),Oe(["dd","ddd","dddd"],function(e,t,n,s){s=n._locale.weekdaysParse(e,s,n._strict);null!=s?t.d=s:p(n).invalidWeekday=e}),Oe(["d","e","E"],function(e,t,n,s){t[s]=M(e)});var Qe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Xe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ke="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),et=i,tt=i,nt=i;function st(){function e(e,t){return t.length-e.length}for(var t,n,s,i=[],r=[],a=[],o=[],u=0;u<7;u++)s=l([2e3,1]).day(u),t=f(this.weekdaysMin(s,"")),n=f(this.weekdaysShort(s,"")),s=f(this.weekdays(s,"")),i.push(t),r.push(n),a.push(s),o.push(t),o.push(n),o.push(s);i.sort(e),r.sort(e),a.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function it(){return this.hours()%12||12}function rt(e,t){s(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function at(e,t){return t._meridiemParse}s("H",["HH",2],0,"hour"),s("h",["hh",2],0,it),s("k",["kk",2],0,function(){return this.hours()||24}),s("hmm",0,0,function(){return""+it.apply(this)+r(this.minutes(),2)}),s("hmmss",0,0,function(){return""+it.apply(this)+r(this.minutes(),2)+r(this.seconds(),2)}),s("Hmm",0,0,function(){return""+this.hours()+r(this.minutes(),2)}),s("Hmmss",0,0,function(){return""+this.hours()+r(this.minutes(),2)+r(this.seconds(),2)}),rt("a",!0),rt("A",!1),h("a",at),h("A",at),h("H",n,d),h("h",n,u),h("k",n,u),h("HH",n,t),h("hh",n,t),h("kk",n,t),h("hmm",me),h("hmmss",_e),h("Hmm",me),h("Hmmss",_e),v(["H","HH"],O),v(["k","kk"],function(e,t,n){e=M(e);t[O]=24===e?0:e}),v(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),v(["h","hh"],function(e,t,n){t[O]=M(e),p(n).bigHour=!0}),v("hmm",function(e,t,n){var s=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s)),p(n).bigHour=!0}),v("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s,2)),t[T]=M(e.substr(i)),p(n).bigHour=!0}),v("Hmm",function(e,t,n){var s=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s))}),v("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s,2)),t[T]=M(e.substr(i))});i=Re("Hours",!0);var ot,ut={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Fe,monthsShort:Le,week:{dow:0,doy:6},weekdays:Qe,weekdaysMin:Ke,weekdaysShort:Xe,meridiemParse:/[ap]\.?m?\.?/i},W={},lt={};function dt(e){return e&&e.toLowerCase().replace("_","-")}function ht(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=dt(e[r]).split("-")).length,n=(n=dt(e[r+1]))?n.split("-"):null;0<t;){if(s=ct(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&function(e,t){for(var n=Math.min(e.length,t.length),s=0;s<n;s+=1)if(e[s]!==t[s])return s;return n}(i,n)>=t-1)break;t--}r++}return ot}function ct(t){var e,n;if(void 0===W[t]&&"undefined"!=typeof module&&module&&module.exports&&(n=t)&&n.match("^[^/\\\\]*$"))try{e=ot._abbr,require("./locale/"+t),ft(e)}catch(e){W[t]=null}return W[t]}function ft(e,t){return e&&((t=g(t)?P(e):mt(e,t))?ot=t:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ot._abbr}function mt(e,t){if(null===t)return delete W[e],null;var n,s=ut;if(t.abbr=e,null!=W[e])Q("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=W[e]._config;else if(null!=t.parentLocale)if(null!=W[t.parentLocale])s=W[t.parentLocale]._config;else{if(null==(n=ct(t.parentLocale)))return lt[t.parentLocale]||(lt[t.parentLocale]=[]),lt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return W[e]=new K(X(s,t)),lt[e]&&lt[e].forEach(function(e){mt(e.name,e.config)}),ft(e),W[e]}function P(e){var t;if(!(e=e&&e._locale&&e._locale._abbr?e._locale._abbr:e))return ot;if(!y(e)){if(t=ct(e))return t;e=[e]}return ht(e)}function _t(e){var t=e._a;return t&&-2===p(e).overflow&&(t=t[Y]<0||11<t[Y]?Y:t[S]<1||t[S]>He(t[D],t[Y])?S:t[O]<0||24<t[O]||24===t[O]&&(0!==t[b]||0!==t[T]||0!==t[Te])?O:t[b]<0||59<t[b]?b:t[T]<0||59<t[T]?T:t[Te]<0||999<t[Te]?Te:-1,p(e)._overflowDayOfYear&&(t<D||S<t)&&(t=S),p(e)._overflowWeeks&&-1===t&&(t=xe),p(e)._overflowWeekday&&-1===t&&(t=Ne),p(e).overflow=t),e}var yt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,pt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],kt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Mt=/^\/?Date\((-?\d+)/i,vt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Dt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Yt(e){var t,n,s,i,r,a,o=e._i,u=yt.exec(o)||gt.exec(o),o=pt.length,l=kt.length;if(u){for(p(e).iso=!0,t=0,n=o;t<n;t++)if(pt[t][1].exec(u[1])){i=pt[t][0],s=!1!==pt[t][2];break}if(null==i)e._isValid=!1;else{if(u[3]){for(t=0,n=l;t<n;t++)if(kt[t][1].exec(u[3])){r=(u[2]||" ")+kt[t][0];break}if(null==r)return void(e._isValid=!1)}if(s||null==r){if(u[4]){if(!wt.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(r||"")+(a||""),xt(e)}else e._isValid=!1}}else e._isValid=!1}function St(e,t,n,s,i,r){e=[function(e){e=parseInt(e,10);{if(e<=49)return 2e3+e;if(e<=999)return 1900+e}return e}(e),Le.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return r&&e.push(parseInt(r,10)),e}function Ot(e){var t,n,s=vt.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));s?(t=St(s[4],s[3],s[2],s[5],s[6],s[7]),function(e,t,n){if(!e||Xe.indexOf(e)===new Date(t[0],t[1],t[2]).getDay())return 1;p(n).weekdayMismatch=!0,n._isValid=!1}(s[1],t,e)&&(e._a=t,e._tzm=(t=s[8],n=s[9],s=s[10],t?Dt[t]:n?0:60*(((t=parseInt(s,10))-(n=t%100))/100)+n),e._d=ze.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),p(e).rfc2822=!0)):e._isValid=!1}function bt(e,t,n){return null!=e?e:null!=t?t:n}function Tt(e){var t,n,s,i,r,a,o,u,l,d,h,c=[];if(!e._d){for(s=e,i=new Date(_.now()),n=s._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()],e._w&&null==e._a[S]&&null==e._a[Y]&&(null!=(i=(s=e)._w).GG||null!=i.W||null!=i.E?(u=1,l=4,r=bt(i.GG,s._a[D],Be(R(),1,4).year),a=bt(i.W,1),((o=bt(i.E,1))<1||7<o)&&(d=!0)):(u=s._locale._week.dow,l=s._locale._week.doy,h=Be(R(),u,l),r=bt(i.gg,s._a[D],h.year),a=bt(i.w,h.week),null!=i.d?((o=i.d)<0||6<o)&&(d=!0):null!=i.e?(o=i.e+u,(i.e<0||6<i.e)&&(d=!0)):o=u),a<1||a>N(r,u,l)?p(s)._overflowWeeks=!0:null!=d?p(s)._overflowWeekday=!0:(h=$e(r,a,o,u,l),s._a[D]=h.year,s._dayOfYear=h.dayOfYear)),null!=e._dayOfYear&&(i=bt(e._a[D],n[D]),(e._dayOfYear>We(i)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),d=ze(i,0,e._dayOfYear),e._a[Y]=d.getUTCMonth(),e._a[S]=d.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=c[t]=n[t];for(;t<7;t++)e._a[t]=c[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[O]&&0===e._a[b]&&0===e._a[T]&&0===e._a[Te]&&(e._nextDay=!0,e._a[O]=0),e._d=(e._useUTC?ze:Ze).apply(null,c),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[O]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(p(e).weekdayMismatch=!0)}}function xt(e){if(e._f===_.ISO_8601)Yt(e);else if(e._f===_.RFC_2822)Ot(e);else{e._a=[],p(e).empty=!0;for(var t,n,s,i,r,a=""+e._i,o=a.length,u=0,l=ae(e._f,e._locale).match(te)||[],d=l.length,h=0;h<d;h++)n=l[h],(t=(a.match(De(n,e))||[])[0])&&(0<(s=a.substr(0,a.indexOf(t))).length&&p(e).unusedInput.push(s),a=a.slice(a.indexOf(t)+t.length),u+=t.length),ie[n]?(t?p(e).empty=!1:p(e).unusedTokens.push(n),s=n,r=e,null!=(i=t)&&c(Se,s)&&Se[s](i,r._a,r,s)):e._strict&&!t&&p(e).unusedTokens.push(n);p(e).charsLeftOver=o-u,0<a.length&&p(e).unusedInput.push(a),e._a[O]<=12&&!0===p(e).bigHour&&0<e._a[O]&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[O]=function(e,t,n){if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((e=e.isPM(n))&&t<12&&(t+=12),t=e||12!==t?t:0):t}(e._locale,e._a[O],e._meridiem),null!==(o=p(e).era)&&(e._a[D]=e._locale.erasConvertYear(o,e._a[D])),Tt(e),_t(e)}}function Nt(e){var t,n,s,i=e._i,r=e._f;if(e._locale=e._locale||P(e._l),null===i||void 0===r&&""===i)return I({nullInput:!0});if("string"==typeof i&&(e._i=i=e._locale.preparse(i)),k(i))return new $(_t(i));if(V(i))e._d=i;else if(y(r)){var a,o,u,l,d,h,c=e,f=!1,m=c._f.length;if(0===m)p(c).invalidFormat=!0,c._d=new Date(NaN);else{for(l=0;l<m;l++)d=0,h=!1,a=q({},c),null!=c._useUTC&&(a._useUTC=c._useUTC),a._f=c._f[l],xt(a),A(a)&&(h=!0),d=(d+=p(a).charsLeftOver)+10*p(a).unusedTokens.length,p(a).score=d,f?d<u&&(u=d,o=a):(null==u||d<u||h)&&(u=d,o=a,h)&&(f=!0);E(c,o||a)}}else if(r)xt(e);else if(g(r=(i=e)._i))i._d=new Date(_.now());else V(r)?i._d=new Date(r.valueOf()):"string"==typeof r?(n=i,null!==(t=Mt.exec(n._i))?n._d=new Date(+t[1]):(Yt(n),!1===n._isValid&&(delete n._isValid,Ot(n),!1===n._isValid)&&(delete n._isValid,n._strict?n._isValid=!1:_.createFromInputFallback(n)))):y(r)?(i._a=G(r.slice(0),function(e){return parseInt(e,10)}),Tt(i)):F(r)?(t=i)._d||(s=void 0===(n=ue(t._i)).day?n.date:n.day,t._a=G([n.year,n.month,s,n.hour,n.minute,n.second,n.millisecond],function(e){return e&&parseInt(e,10)}),Tt(t)):w(r)?i._d=new Date(r):_.createFromInputFallback(i);return A(e)||(e._d=null),e}function Wt(e,t,n,s,i){var r={};return!0!==t&&!1!==t||(s=t,t=void 0),!0!==n&&!1!==n||(s=n,n=void 0),(F(e)&&L(e)||y(e)&&0===e.length)&&(e=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=i,r._l=n,r._i=e,r._f=t,r._strict=s,(i=new $(_t(Nt(i=r))))._nextDay&&(i.add(1,"d"),i._nextDay=void 0),i}function R(e,t,n,s){return Wt(e,t,n,s,!1)}_.createFromInputFallback=e("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),_.ISO_8601=function(){},_.RFC_2822=function(){};me=e("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=R.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:I()}),_e=e("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=R.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:I()});function Pt(e,t){var n,s;if(!(t=1===t.length&&y(t[0])?t[0]:t).length)return R();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Rt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ct(e){var e=ue(e),t=e.year||0,n=e.quarter||0,s=e.month||0,i=e.week||e.isoWeek||0,r=e.day||0,a=e.hour||0,o=e.minute||0,u=e.second||0,l=e.millisecond||0;this._isValid=function(e){var t,n,s=!1,i=Rt.length;for(t in e)if(c(e,t)&&(-1===x.call(Rt,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[Rt[n]]){if(s)return!1;parseFloat(e[Rt[n]])!==M(e[Rt[n]])&&(s=!0)}return!0}(e),this._milliseconds=+l+1e3*u+6e4*o+1e3*a*60*60,this._days=+r+7*i,this._months=+s+3*n+12*t,this._data={},this._locale=P(),this._bubble()}function Ut(e){return e instanceof Ct}function Ht(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,n){s(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+r(~~(e/60),2)+n+r(~~e%60,2)})}Ft("Z",":"),Ft("ZZ",""),h("Z",ve),h("ZZ",ve),v(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Vt(ve,e)});var Lt=/([\+\-]|\d\d)/gi;function Vt(e,t){var t=(t||"").match(e);return null===t?null:0===(t=60*(e=((t[t.length-1]||[])+"").match(Lt)||["-",0,0])[1]+M(e[2]))?0:"+"===e[0]?t:-t}function Gt(e,t){var n;return t._isUTC?(t=t.clone(),n=(k(e)||V(e)?e:R(e)).valueOf()-t.valueOf(),t._d.setTime(t._d.valueOf()+n),_.updateOffset(t,!1),t):R(e).local()}function Et(e){return-Math.round(e._d.getTimezoneOffset())}function At(){return!!this.isValid()&&this._isUTC&&0===this._offset}_.updateOffset=function(){};var It=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,jt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function C(e,t){var n,s=e;return Ut(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:w(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(t=It.exec(e))?(n="-"===t[1]?-1:1,s={y:0,d:M(t[S])*n,h:M(t[O])*n,m:M(t[b])*n,s:M(t[T])*n,ms:M(Ht(1e3*t[Te]))*n}):(t=jt.exec(e))?(n="-"===t[1]?-1:1,s={y:Zt(t[2],n),M:Zt(t[3],n),w:Zt(t[4],n),d:Zt(t[5],n),h:Zt(t[6],n),m:Zt(t[7],n),s:Zt(t[8],n)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(t=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Gt(t,e),e.isBefore(t)?n=zt(e,t):((n=zt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(R(s.from),R(s.to)),(s={}).ms=t.milliseconds,s.M=t.months),n=new Ct(s),Ut(e)&&c(e,"_locale")&&(n._locale=e._locale),Ut(e)&&c(e,"_isValid")&&(n._isValid=e._isValid),n}function Zt(e,t){e=e&&parseFloat(e.replace(",","."));return(isNaN(e)?0:e)*t}function zt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function qt(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(Q(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=e,e=t,t=n),$t(this,C(e,t),s),this}}function $t(e,t,n,s){var i=t._milliseconds,r=Ht(t._days),t=Ht(t._months);e.isValid()&&(s=null==s||s,t&&Ae(e,Ce(e,"Month")+t*n),r&&Ue(e,"Date",Ce(e,"Date")+r*n),i&&e._d.setTime(e._d.valueOf()+i*n),s)&&_.updateOffset(e,r||t)}C.fn=Ct.prototype,C.invalid=function(){return C(NaN)};Fe=qt(1,"add"),Qe=qt(-1,"subtract");function Bt(e){return"string"==typeof e||e instanceof String}function Jt(e){return k(e)||V(e)||Bt(e)||w(e)||function(t){var e=y(t),n=!1;e&&(n=0===t.filter(function(e){return!w(e)&&Bt(t)}).length);return e&&n}(e)||function(e){var t,n,s=F(e)&&!L(e),i=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],a=r.length;for(t=0;t<a;t+=1)n=r[t],i=i||c(e,n);return s&&i}(e)||null==e}function Qt(e,t){var n,s;return e.date()<t.date()?-Qt(t,e):-((n=12*(t.year()-e.year())+(t.month()-e.month()))+(t-(s=e.clone().add(n,"months"))<0?(t-s)/(s-e.clone().add(n-1,"months")):(t-s)/(e.clone().add(1+n,"months")-s)))||0}function Xt(e){return void 0===e?this._locale._abbr:(null!=(e=P(e))&&(this._locale=e),this)}_.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",_.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";Ke=e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function Kt(){return this._locale}var en=126227808e5;function tn(e,t){return(e%t+t)%t}function nn(e,t,n){return e<100&&0<=e?new Date(e+400,t,n)-en:new Date(e,t,n).valueOf()}function sn(e,t,n){return e<100&&0<=e?Date.UTC(e+400,t,n)-en:Date.UTC(e,t,n)}function rn(e,t){return t.erasAbbrRegex(e)}function an(){for(var e,t,n,s=[],i=[],r=[],a=[],o=this.eras(),u=0,l=o.length;u<l;++u)e=f(o[u].name),t=f(o[u].abbr),n=f(o[u].narrow),i.push(e),s.push(t),r.push(n),a.push(e),a.push(t),a.push(n);this._erasRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+i.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}function on(e,t){s(0,[e,e.length],0,t)}function un(e,t,n,s,i){var r;return null==e?Be(this,s,i).year:(r=N(e,s,i),function(e,t,n,s,i){e=$e(e,t,n,s,i),t=ze(e.year,0,e.dayOfYear);return this.year(t.getUTCFullYear()),this.month(t.getUTCMonth()),this.date(t.getUTCDate()),this}.call(this,e,t=r<t?r:t,n,s,i))}s("N",0,0,"eraAbbr"),s("NN",0,0,"eraAbbr"),s("NNN",0,0,"eraAbbr"),s("NNNN",0,0,"eraName"),s("NNNNN",0,0,"eraNarrow"),s("y",["y",1],"yo","eraYear"),s("y",["yy",2],0,"eraYear"),s("y",["yyy",3],0,"eraYear"),s("y",["yyyy",4],0,"eraYear"),h("N",rn),h("NN",rn),h("NNN",rn),h("NNNN",function(e,t){return t.erasNameRegex(e)}),h("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),v(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,s){s=n._locale.erasParse(e,s,n._strict);s?p(n).era=s:p(n).invalidEra=e}),h("y",pe),h("yy",pe),h("yyy",pe),h("yyyy",pe),h("yo",function(e,t){return t._eraYearOrdinalRegex||pe}),v(["y","yy","yyy","yyyy"],D),v(["yo"],function(e,t,n,s){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[D]=n._locale.eraYearOrdinalParse(e,i):t[D]=parseInt(e,10)}),s(0,["gg",2],0,function(){return this.weekYear()%100}),s(0,["GG",2],0,function(){return this.isoWeekYear()%100}),on("gggg","weekYear"),on("ggggg","weekYear"),on("GGGG","isoWeekYear"),on("GGGGG","isoWeekYear"),h("G",ke),h("g",ke),h("GG",n,t),h("gg",n,t),h("GGGG",ge,ce),h("gggg",ge,ce),h("GGGGG",we,fe),h("ggggg",we,fe),Oe(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=M(e)}),Oe(["gg","GG"],function(e,t,n,s){t[s]=_.parseTwoDigitYear(e)}),s("Q",0,"Qo","quarter"),h("Q",de),v("Q",function(e,t){t[Y]=3*(M(e)-1)}),s("D",["DD",2],"Do","date"),h("D",n,u),h("DD",n,t),h("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),v(["D","DD"],S),v("Do",function(e,t){t[S]=M(e.match(n)[0])});ge=Re("Date",!0);s("DDD",["DDDD",3],"DDDo","dayOfYear"),h("DDD",ye),h("DDDD",he),v(["DDD","DDDD"],function(e,t,n){n._dayOfYear=M(e)}),s("m",["mm",2],0,"minute"),h("m",n,d),h("mm",n,t),v(["m","mm"],b);var ln,ce=Re("Minutes",!1),we=(s("s",["ss",2],0,"second"),h("s",n,d),h("ss",n,t),v(["s","ss"],T),Re("Seconds",!1));for(s("S",0,0,function(){return~~(this.millisecond()/100)}),s(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),s(0,["SSS",3],0,"millisecond"),s(0,["SSSS",4],0,function(){return 10*this.millisecond()}),s(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),s(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),s(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),s(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),s(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),h("S",ye,de),h("SS",ye,t),h("SSS",ye,he),ln="SSSS";ln.length<=9;ln+="S")h(ln,pe);function dn(e,t){t[Te]=M(1e3*("0."+e))}for(ln="S";ln.length<=9;ln+="S")v(ln,dn);fe=Re("Milliseconds",!1),s("z",0,0,"zoneAbbr"),s("zz",0,0,"zoneName");u=$.prototype;function hn(e){return e}u.add=Fe,u.calendar=function(e,t){1===arguments.length&&(arguments[0]?Jt(arguments[0])?(e=arguments[0],t=void 0):function(e){for(var t=F(e)&&!L(e),n=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i=0;i<s.length;i+=1)n=n||c(e,s[i]);return t&&n}(arguments[0])&&(t=arguments[0],e=void 0):t=e=void 0);var e=e||R(),n=Gt(e,this).startOf("day"),n=_.calendarFormat(this,n)||"sameElse",t=t&&(a(t[n])?t[n].call(this,e):t[n]);return this.format(t||this.localeData().calendar(n,this,R(e)))},u.clone=function(){return new $(this)},u.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Gt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=o(t)){case"year":r=Qt(this,s)/12;break;case"month":r=Qt(this,s);break;case"quarter":r=Qt(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:m(r)},u.endOf=function(e){var t,n;if(void 0!==(e=o(e))&&"millisecond"!==e&&this.isValid()){switch(n=this._isUTC?sn:nn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-tn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-tn(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-tn(t,1e3)-1}this._d.setTime(t),_.updateOffset(this,!0)}return this},u.format=function(e){return e=e||(this.isUtc()?_.defaultFormatUtc:_.defaultFormat),e=re(this,e),this.localeData().postformat(e)},u.from=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||R(e).isValid())?C({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},u.fromNow=function(e){return this.from(R(),e)},u.to=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||R(e).isValid())?C({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},u.toNow=function(e){return this.to(R(),e)},u.get=function(e){return a(this[e=o(e)])?this[e]():this},u.invalidAt=function(){return p(this).overflow},u.isAfter=function(e,t){return e=k(e)?e:R(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=o(t)||"millisecond")?this.valueOf()>e.valueOf():e.valueOf()<this.clone().startOf(t).valueOf())},u.isBefore=function(e,t){return e=k(e)?e:R(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=o(t)||"millisecond")?this.valueOf()<e.valueOf():this.clone().endOf(t).valueOf()<e.valueOf())},u.isBetween=function(e,t,n,s){return e=k(e)?e:R(e),t=k(t)?t:R(t),!!(this.isValid()&&e.isValid()&&t.isValid())&&("("===(s=s||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===s[1]?this.isBefore(t,n):!this.isAfter(t,n))},u.isSame=function(e,t){var e=k(e)?e:R(e);return!(!this.isValid()||!e.isValid())&&("millisecond"===(t=o(t)||"millisecond")?this.valueOf()===e.valueOf():(e=e.valueOf(),this.clone().startOf(t).valueOf()<=e&&e<=this.clone().endOf(t).valueOf()))},u.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},u.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},u.isValid=function(){return A(this)},u.lang=Ke,u.locale=Xt,u.localeData=Kt,u.max=_e,u.min=me,u.parsingFlags=function(){return E({},p(this))},u.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t,n=[];for(t in e)c(e,t)&&n.push({unit:t,priority:le[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=ue(e)),s=n.length,i=0;i<s;i++)this[n[i].unit](e[n[i].unit]);else if(a(this[e=o(e)]))return this[e](t);return this},u.startOf=function(e){var t,n;if(void 0!==(e=o(e))&&"millisecond"!==e&&this.isValid()){switch(n=this._isUTC?sn:nn,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=tn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=tn(t,6e4);break;case"second":t=this._d.valueOf(),t-=tn(t,1e3)}this._d.setTime(t),_.updateOffset(this,!0)}return this},u.subtract=Qe,u.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},u.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},u.toDate=function(){return new Date(this.valueOf())},u.toISOString=function(e){var t;return this.isValid()?(t=(e=!0!==e)?this.clone().utc():this).year()<0||9999<t.year()?re(t,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):a(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",re(t,"Z")):re(t,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ"):null},u.inspect=function(){var e,t,n;return this.isValid()?(t="moment",e="",this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z"),t="["+t+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(t+n+"-MM-DD[T]HH:mm:ss.SSS"+(e+'[")]'))):"moment.invalid(/* "+this._i+" */)"},"undefined"!=typeof Symbol&&null!=Symbol.for&&(u[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),u.toJSON=function(){return this.isValid()?this.toISOString():null},u.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},u.unix=function(){return Math.floor(this.valueOf()/1e3)},u.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},u.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},u.eraName=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].name;if(t[n].until<=e&&e<=t[n].since)return t[n].name}return""},u.eraNarrow=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].narrow;if(t[n].until<=e&&e<=t[n].since)return t[n].narrow}return""},u.eraAbbr=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].abbr;if(t[n].until<=e&&e<=t[n].since)return t[n].abbr}return""},u.eraYear=function(){for(var e,t,n=this.localeData().eras(),s=0,i=n.length;s<i;++s)if(e=n[s].since<=n[s].until?1:-1,t=this.clone().startOf("day").valueOf(),n[s].since<=t&&t<=n[s].until||n[s].until<=t&&t<=n[s].since)return(this.year()-_(n[s].since).year())*e+n[s].offset;return this.year()},u.year=Pe,u.isLeapYear=function(){return be(this.year())},u.weekYear=function(e){return un.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)},u.isoWeekYear=function(e){return un.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},u.quarter=u.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},u.month=Ie,u.daysInMonth=function(){return He(this.year(),this.month())},u.week=u.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},u.isoWeek=u.isoWeeks=function(e){var t=Be(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},u.weeksInYear=function(){var e=this.localeData()._week;return N(this.year(),e.dow,e.doy)},u.weeksInWeekYear=function(){var e=this.localeData()._week;return N(this.weekYear(),e.dow,e.doy)},u.isoWeeksInYear=function(){return N(this.year(),1,4)},u.isoWeeksInISOWeekYear=function(){return N(this.isoWeekYear(),1,4)},u.date=ge,u.day=u.days=function(e){var t,n,s;return this.isValid()?(t=Ce(this,"Day"),null!=e?(n=e,s=this.localeData(),e="string"!=typeof n?n:isNaN(n)?"number"==typeof(n=s.weekdaysParse(n))?n:null:parseInt(n,10),this.add(e-t,"d")):t):null!=e?this:NaN},u.weekday=function(e){var t;return this.isValid()?(t=(this.day()+7-this.localeData()._week.dow)%7,null==e?t:this.add(e-t,"d")):null!=e?this:NaN},u.isoWeekday=function(e){var t,n;return this.isValid()?null!=e?(t=e,n=this.localeData(),n="string"==typeof t?n.weekdaysParse(t)%7||7:isNaN(t)?null:t,this.day(this.day()%7?n:n-7)):this.day()||7:null!=e?this:NaN},u.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},u.hour=u.hours=i,u.minute=u.minutes=ce,u.second=u.seconds=we,u.millisecond=u.milliseconds=fe,u.utcOffset=function(e,t,n){var s,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?i:Et(this);if("string"==typeof e){if(null===(e=Vt(ve,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Et(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),i!==e&&(!t||this._changeInProgress?$t(this,C(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,_.updateOffset(this,!0),this._changeInProgress=null)),this},u.utc=function(e){return this.utcOffset(0,e)},u.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e)&&this.subtract(Et(this),"m"),this},u.parseZone=function(){var e;return null!=this._tzm?this.utcOffset(this._tzm,!1,!0):"string"==typeof this._i&&(null!=(e=Vt(Me,this._i))?this.utcOffset(e):this.utcOffset(0,!0)),this},u.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?R(e).utcOffset():0,(this.utcOffset()-e)%60==0)},u.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},u.isLocal=function(){return!!this.isValid()&&!this._isUTC},u.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},u.isUtc=At,u.isUTC=At,u.zoneAbbr=function(){return this._isUTC?"UTC":""},u.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},u.dates=e("dates accessor is deprecated. Use date instead.",ge),u.months=e("months accessor is deprecated. Use month instead",Ie),u.years=e("years accessor is deprecated. Use year instead",Pe),u.zone=e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?(this.utcOffset(e="string"!=typeof e?-e:e,t),this):-this.utcOffset()}),u.isDSTShifted=e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){var e,t;return g(this._isDSTShifted)&&(q(e={},this),(e=Nt(e))._a?(t=(e._isUTC?l:R)(e._a),this._isDSTShifted=this.isValid()&&0<function(e,t,n){for(var s=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),r=0,a=0;a<s;a++)(n&&e[a]!==t[a]||!n&&M(e[a])!==M(t[a]))&&r++;return r+i}(e._a,t.toArray())):this._isDSTShifted=!1),this._isDSTShifted});d=K.prototype;function cn(e,t,n,s){var i=P(),s=l().set(s,t);return i[n](s,e)}function fn(e,t,n){if(w(e)&&(t=e,e=void 0),e=e||"",null!=t)return cn(e,t,n,"month");for(var s=[],i=0;i<12;i++)s[i]=cn(e,i,n,"month");return s}function mn(e,t,n,s){t=("boolean"==typeof e?w(t)&&(n=t,t=void 0):(t=e,e=!1,w(n=t)&&(n=t,t=void 0)),t||"");var i,r=P(),a=e?r._week.dow:0,o=[];if(null!=n)return cn(t,(n+a)%7,s,"day");for(i=0;i<7;i++)o[i]=cn(t,(i+a)%7,s,"day");return o}d.calendar=function(e,t,n){return a(e=this._calendar[e]||this._calendar.sameElse)?e.call(t,n):e},d.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(te).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},d.invalidDate=function(){return this._invalidDate},d.ordinal=function(e){return this._ordinal.replace("%d",e)},d.preparse=hn,d.postformat=hn,d.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return a(i)?i(e,t,n,s):i.replace(/%d/i,e)},d.pastFuture=function(e,t){return a(e=this._relativeTime[0<e?"future":"past"])?e(t):e.replace(/%s/i,t)},d.set=function(e){var t,n;for(n in e)c(e,n)&&(a(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},d.eras=function(e,t){for(var n,s=this._eras||P("en")._eras,i=0,r=s.length;i<r;++i)switch("string"==typeof s[i].since&&(n=_(s[i].since).startOf("day"),s[i].since=n.valueOf()),typeof s[i].until){case"undefined":s[i].until=1/0;break;case"string":n=_(s[i].until).startOf("day").valueOf(),s[i].until=n.valueOf()}return s},d.erasParse=function(e,t,n){var s,i,r,a,o,u=this.eras();for(e=e.toUpperCase(),s=0,i=u.length;s<i;++s)if(r=u[s].name.toUpperCase(),a=u[s].abbr.toUpperCase(),o=u[s].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return u[s];break;case"NNNN":if(r===e)return u[s];break;case"NNNNN":if(o===e)return u[s]}else if(0<=[r,a,o].indexOf(e))return u[s]},d.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?_(e.since).year():_(e.since).year()+(t-e.offset)*n},d.erasAbbrRegex=function(e){return c(this,"_erasAbbrRegex")||an.call(this),e?this._erasAbbrRegex:this._erasRegex},d.erasNameRegex=function(e){return c(this,"_erasNameRegex")||an.call(this),e?this._erasNameRegex:this._erasRegex},d.erasNarrowRegex=function(e){return c(this,"_erasNarrowRegex")||an.call(this),e?this._erasNarrowRegex:this._erasRegex},d.months=function(e,t){return e?(y(this._months)?this._months:this._months[(this._months.isFormat||Ve).test(t)?"format":"standalone"])[e.month()]:y(this._months)?this._months:this._months.standalone},d.monthsShort=function(e,t){return e?(y(this._monthsShort)?this._monthsShort:this._monthsShort[Ve.test(t)?"format":"standalone"])[e.month()]:y(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},d.monthsParse=function(e,t,n){var s,i;if(this._monthsParseExact)return function(e,t,n){var s,i,r,e=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=l([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=x.call(this._shortMonthsParse,e))?i:null:-1!==(i=x.call(this._longMonthsParse,e))?i:null:"MMM"===t?-1!==(i=x.call(this._shortMonthsParse,e))||-1!==(i=x.call(this._longMonthsParse,e))?i:null:-1!==(i=x.call(this._longMonthsParse,e))||-1!==(i=x.call(this._shortMonthsParse,e))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=l([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(i="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},d.monthsRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||je.call(this),e?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=Ee),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},d.monthsShortRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||je.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=Ge),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},d.week=function(e){return Be(e,this._week.dow,this._week.doy).week},d.firstDayOfYear=function(){return this._week.doy},d.firstDayOfWeek=function(){return this._week.dow},d.weekdays=function(e,t){return t=y(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"],!0===e?Je(t,this._week.dow):e?t[e.day()]:t},d.weekdaysMin=function(e){return!0===e?Je(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},d.weekdaysShort=function(e){return!0===e?Je(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},d.weekdaysParse=function(e,t,n){var s,i;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,e=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=l([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=x.call(this._weekdaysParse,e))?i:null:"ddd"===t?-1!==(i=x.call(this._shortWeekdaysParse,e))?i:null:-1!==(i=x.call(this._minWeekdaysParse,e))?i:null:"dddd"===t?-1!==(i=x.call(this._weekdaysParse,e))||-1!==(i=x.call(this._shortWeekdaysParse,e))||-1!==(i=x.call(this._minWeekdaysParse,e))?i:null:"ddd"===t?-1!==(i=x.call(this._shortWeekdaysParse,e))||-1!==(i=x.call(this._weekdaysParse,e))||-1!==(i=x.call(this._minWeekdaysParse,e))?i:null:-1!==(i=x.call(this._minWeekdaysParse,e))||-1!==(i=x.call(this._weekdaysParse,e))||-1!==(i=x.call(this._shortWeekdaysParse,e))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=l([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(i="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},d.weekdaysRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||st.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=et),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},d.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||st.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=tt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},d.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||st.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=nt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},d.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},d.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},ft("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===M(e%100/10)?"th":1==t?"st":2==t?"nd":3==t?"rd":"th")}}),_.lang=e("moment.lang is deprecated. Use moment.locale instead.",ft),_.langData=e("moment.langData is deprecated. Use moment.localeData instead.",P);var _n=Math.abs;function yn(e,t,n,s){t=C(t,n);return e._milliseconds+=s*t._milliseconds,e._days+=s*t._days,e._months+=s*t._months,e._bubble()}function gn(e){return e<0?Math.floor(e):Math.ceil(e)}function wn(e){return 4800*e/146097}function pn(e){return 146097*e/4800}function kn(e){return function(){return this.as(e)}}de=kn("ms"),t=kn("s"),ye=kn("m"),he=kn("h"),Fe=kn("d"),_e=kn("w"),me=kn("M"),Qe=kn("Q"),i=kn("y"),ce=de;function Mn(e){return function(){return this.isValid()?this._data[e]:NaN}}var we=Mn("milliseconds"),fe=Mn("seconds"),ge=Mn("minutes"),Pe=Mn("hours"),d=Mn("days"),vn=Mn("months"),Dn=Mn("years");var Yn=Math.round,Sn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function On(e,t,n,s){var i=C(e).abs(),r=Yn(i.as("s")),a=Yn(i.as("m")),o=Yn(i.as("h")),u=Yn(i.as("d")),l=Yn(i.as("M")),d=Yn(i.as("w")),i=Yn(i.as("y")),r=(r<=n.ss?["s",r]:r<n.s&&["ss",r])||(a<=1?["m"]:a<n.m&&["mm",a])||(o<=1?["h"]:o<n.h&&["hh",o])||(u<=1?["d"]:u<n.d&&["dd",u]);return(r=(r=null!=n.w?r||(d<=1?["w"]:d<n.w&&["ww",d]):r)||(l<=1?["M"]:l<n.M&&["MM",l])||(i<=1?["y"]:["yy",i]))[2]=t,r[3]=0<+e,r[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,r)}var bn=Math.abs;function Tn(e){return(0<e)-(e<0)||+e}function xn(){var e,t,n,s,i,r,a,o,u,l,d;return this.isValid()?(e=bn(this._milliseconds)/1e3,t=bn(this._days),n=bn(this._months),(o=this.asSeconds())?(s=m(e/60),i=m(s/60),e%=60,s%=60,r=m(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",u=Tn(this._months)!==Tn(o)?"-":"",l=Tn(this._days)!==Tn(o)?"-":"",d=Tn(this._milliseconds)!==Tn(o)?"-":"",(o<0?"-":"")+"P"+(r?u+r+"Y":"")+(n?u+n+"M":"")+(t?l+t+"D":"")+(i||s||e?"T":"")+(i?d+i+"H":"")+(s?d+s+"M":"")+(e?d+a+"S":"")):"P0D"):this.localeData().invalidDate()}var U=Ct.prototype;return U.isValid=function(){return this._isValid},U.abs=function(){var e=this._data;return this._milliseconds=_n(this._milliseconds),this._days=_n(this._days),this._months=_n(this._months),e.milliseconds=_n(e.milliseconds),e.seconds=_n(e.seconds),e.minutes=_n(e.minutes),e.hours=_n(e.hours),e.months=_n(e.months),e.years=_n(e.years),this},U.add=function(e,t){return yn(this,e,t,1)},U.subtract=function(e,t){return yn(this,e,t,-1)},U.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=o(e))||"quarter"===e||"year"===e)switch(t=this._days+s/864e5,n=this._months+wn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(pn(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},U.asMilliseconds=de,U.asSeconds=t,U.asMinutes=ye,U.asHours=he,U.asDays=Fe,U.asWeeks=_e,U.asMonths=me,U.asQuarters=Qe,U.asYears=i,U.valueOf=ce,U._bubble=function(){var e=this._milliseconds,t=this._days,n=this._months,s=this._data;return 0<=e&&0<=t&&0<=n||e<=0&&t<=0&&n<=0||(e+=864e5*gn(pn(n)+t),n=t=0),s.milliseconds=e%1e3,e=m(e/1e3),s.seconds=e%60,e=m(e/60),s.minutes=e%60,e=m(e/60),s.hours=e%24,t+=m(e/24),n+=e=m(wn(t)),t-=gn(pn(e)),e=m(n/12),n%=12,s.days=t,s.months=n,s.years=e,this},U.clone=function(){return C(this)},U.get=function(e){return e=o(e),this.isValid()?this[e+"s"]():NaN},U.milliseconds=we,U.seconds=fe,U.minutes=ge,U.hours=Pe,U.days=d,U.weeks=function(){return m(this.days()/7)},U.months=vn,U.years=Dn,U.humanize=function(e,t){var n,s;return this.isValid()?(n=!1,s=Sn,"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(n=e),"object"==typeof t&&(s=Object.assign({},Sn,t),null!=t.s)&&null==t.ss&&(s.ss=t.s-1),e=this.localeData(),t=On(this,!n,s,e),n&&(t=e.pastFuture(+this,t)),e.postformat(t)):this.localeData().invalidDate()},U.toISOString=xn,U.toString=xn,U.toJSON=xn,U.locale=Xt,U.localeData=Kt,U.toIsoString=e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",xn),U.lang=Ke,s("X",0,0,"unix"),s("x",0,0,"valueOf"),h("x",ke),h("X",/[+-]?\d+(\.\d{1,3})?/),v("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),v("x",function(e,t,n){n._d=new Date(M(e))}),_.version="2.30.1",H=R,_.fn=u,_.min=function(){return Pt("isBefore",[].slice.call(arguments,0))},_.max=function(){return Pt("isAfter",[].slice.call(arguments,0))},_.now=function(){return Date.now?Date.now():+new Date},_.utc=l,_.unix=function(e){return R(1e3*e)},_.months=function(e,t){return fn(e,t,"months")},_.isDate=V,_.locale=ft,_.invalid=I,_.duration=C,_.isMoment=k,_.weekdays=function(e,t,n){return mn(e,t,n,"weekdays")},_.parseZone=function(){return R.apply(null,arguments).parseZone()},_.localeData=P,_.isDuration=Ut,_.monthsShort=function(e,t){return fn(e,t,"monthsShort")},_.weekdaysMin=function(e,t,n){return mn(e,t,n,"weekdaysMin")},_.defineLocale=mt,_.updateLocale=function(e,t){var n,s;return null!=t?(s=ut,null!=W[e]&&null!=W[e].parentLocale?W[e].set(X(W[e]._config,t)):(t=X(s=null!=(n=ct(e))?n._config:s,t),null==n&&(t.abbr=e),(s=new K(t)).parentLocale=W[e],W[e]=s),ft(e)):null!=W[e]&&(null!=W[e].parentLocale?(W[e]=W[e].parentLocale,e===ft()&&ft(e)):null!=W[e]&&delete W[e]),W[e]},_.locales=function(){return ee(W)},_.weekdaysShort=function(e,t,n){return mn(e,t,n,"weekdaysShort")},_.normalizeUnits=o,_.relativeTimeRounding=function(e){return void 0===e?Yn:"function"==typeof e&&(Yn=e,!0)},_.relativeTimeThreshold=function(e,t){return void 0!==Sn[e]&&(void 0===t?Sn[e]:(Sn[e]=t,"s"===e&&(Sn.ss=t-1),!0))},_.calendarFormat=function(e,t){return(e=e.diff(t,"days",!0))<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse"},_.prototype=u,_.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},_});                                                                    dist/vendor/react-dom.js                                                                            0000644                 00004075643 15212564034 0011242 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @license React
 * react-dom.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
(function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
  typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
  (global = global || self, factory(global.ReactDOM = {}, global.React));
}(this, (function (exports, React) { 'use strict';

  var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;

  var suppressWarning = false;
  function setSuppressWarning(newSuppressWarning) {
    {
      suppressWarning = newSuppressWarning;
    }
  } // In DEV, calls to console.warn and console.error get replaced
  // by calls to these methods by a Babel plugin.
  //
  // In PROD (or in packages without access to React internals),
  // they are left as they are instead.

  function warn(format) {
    {
      if (!suppressWarning) {
        for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
          args[_key - 1] = arguments[_key];
        }

        printWarning('warn', format, args);
      }
    }
  }
  function error(format) {
    {
      if (!suppressWarning) {
        for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
          args[_key2 - 1] = arguments[_key2];
        }

        printWarning('error', format, args);
      }
    }
  }

  function printWarning(level, format, args) {
    // When changing this logic, you might want to also
    // update consoleWithStackDev.www.js as well.
    {
      var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
      var stack = ReactDebugCurrentFrame.getStackAddendum();

      if (stack !== '') {
        format += '%s';
        args = args.concat([stack]);
      } // eslint-disable-next-line react-internal/safe-string-coercion


      var argsWithFormat = args.map(function (item) {
        return String(item);
      }); // Careful: RN currently depends on this prefix

      argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
      // breaks IE9: https://github.com/facebook/react/issues/13610
      // eslint-disable-next-line react-internal/no-production-logging

      Function.prototype.apply.call(console[level], console, argsWithFormat);
    }
  }

  var FunctionComponent = 0;
  var ClassComponent = 1;
  var IndeterminateComponent = 2; // Before we know whether it is function or class

  var HostRoot = 3; // Root of a host tree. Could be nested inside another node.

  var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.

  var HostComponent = 5;
  var HostText = 6;
  var Fragment = 7;
  var Mode = 8;
  var ContextConsumer = 9;
  var ContextProvider = 10;
  var ForwardRef = 11;
  var Profiler = 12;
  var SuspenseComponent = 13;
  var MemoComponent = 14;
  var SimpleMemoComponent = 15;
  var LazyComponent = 16;
  var IncompleteClassComponent = 17;
  var DehydratedFragment = 18;
  var SuspenseListComponent = 19;
  var ScopeComponent = 21;
  var OffscreenComponent = 22;
  var LegacyHiddenComponent = 23;
  var CacheComponent = 24;
  var TracingMarkerComponent = 25;

  // -----------------------------------------------------------------------------

  var enableClientRenderFallbackOnTextMismatch = true; // TODO: Need to review this code one more time before landing
  // the react-reconciler package.

  var enableNewReconciler = false; // Support legacy Primer support on internal FB www

  var enableLazyContextPropagation = false; // FB-only usage. The new API has different semantics.

  var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber

  var enableSuspenseAvoidThisFallback = false; // Enables unstable_avoidThisFallback feature in Fizz
  // React DOM Chopping Block
  //
  // Similar to main Chopping Block but only flags related to React DOM. These are
  // grouped because we will likely batch all of them into a single major release.
  // -----------------------------------------------------------------------------
  // Disable support for comment nodes as React DOM containers. Already disabled
  // in open source, but www codebase still relies on it. Need to remove.

  var disableCommentsAsDOMContainers = true; // Disable javascript: URL strings in href for XSS protection.
  // and client rendering, mostly to allow JSX attributes to apply to the custom
  // element's object properties instead of only HTML attributes.
  // https://github.com/facebook/react/issues/11347

  var enableCustomElementPropertySupport = false; // Disables children for <textarea> elements
  var warnAboutStringRefs = true; // -----------------------------------------------------------------------------
  // Debugging and DevTools
  // -----------------------------------------------------------------------------
  // Adds user timing marks for e.g. state updates, suspense, and work loop stuff,
  // for an experimental timeline tool.

  var enableSchedulingProfiler = true; // Helps identify side effects in render-phase lifecycle hooks and setState

  var enableProfilerTimer = true; // Record durations for commit and passive effects phases.

  var enableProfilerCommitHooks = true; // Phase param passed to onRender callback differentiates between an "update" and a "cascading-update".

  var allNativeEvents = new Set();
  /**
   * Mapping from registration name to event name
   */


  var registrationNameDependencies = {};
  /**
   * Mapping from lowercase registration names to the properly cased version,
   * used to warn in the case of missing event handlers. Available
   * only in true.
   * @type {Object}
   */

  var possibleRegistrationNames =  {} ; // Trust the developer to only use possibleRegistrationNames in true

  function registerTwoPhaseEvent(registrationName, dependencies) {
    registerDirectEvent(registrationName, dependencies);
    registerDirectEvent(registrationName + 'Capture', dependencies);
  }
  function registerDirectEvent(registrationName, dependencies) {
    {
      if (registrationNameDependencies[registrationName]) {
        error('EventRegistry: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName);
      }
    }

    registrationNameDependencies[registrationName] = dependencies;

    {
      var lowerCasedName = registrationName.toLowerCase();
      possibleRegistrationNames[lowerCasedName] = registrationName;

      if (registrationName === 'onDoubleClick') {
        possibleRegistrationNames.ondblclick = registrationName;
      }
    }

    for (var i = 0; i < dependencies.length; i++) {
      allNativeEvents.add(dependencies[i]);
    }
  }

  var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');

  var hasOwnProperty = Object.prototype.hasOwnProperty;

  /*
   * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
   * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
   *
   * The functions in this module will throw an easier-to-understand,
   * easier-to-debug exception with a clear errors message message explaining the
   * problem. (Instead of a confusing exception thrown inside the implementation
   * of the `value` object).
   */
  // $FlowFixMe only called in DEV, so void return is not possible.
  function typeName(value) {
    {
      // toStringTag is needed for namespaced types like Temporal.Instant
      var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
      var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
      return type;
    }
  } // $FlowFixMe only called in DEV, so void return is not possible.


  function willCoercionThrow(value) {
    {
      try {
        testStringCoercion(value);
        return false;
      } catch (e) {
        return true;
      }
    }
  }

  function testStringCoercion(value) {
    // If you ended up here by following an exception call stack, here's what's
    // happened: you supplied an object or symbol value to React (as a prop, key,
    // DOM attribute, CSS property, string ref, etc.) and when React tried to
    // coerce it to a string using `'' + value`, an exception was thrown.
    //
    // The most common types that will cause this exception are `Symbol` instances
    // and Temporal objects like `Temporal.Instant`. But any object that has a
    // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
    // exception. (Library authors do this to prevent users from using built-in
    // numeric operators like `+` or comparison operators like `>=` because custom
    // methods are needed to perform accurate arithmetic or comparison.)
    //
    // To fix the problem, coerce this object or symbol value to a string before
    // passing it to React. The most reliable way is usually `String(value)`.
    //
    // To find which value is throwing, check the browser or debugger console.
    // Before this exception was thrown, there should be `console.error` output
    // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
    // problem and how that type was used: key, atrribute, input value prop, etc.
    // In most cases, this console output also shows the component and its
    // ancestor components where the exception happened.
    //
    // eslint-disable-next-line react-internal/safe-string-coercion
    return '' + value;
  }

  function checkAttributeStringCoercion(value, attributeName) {
    {
      if (willCoercionThrow(value)) {
        error('The provided `%s` attribute is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', attributeName, typeName(value));

        return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
      }
    }
  }
  function checkKeyStringCoercion(value) {
    {
      if (willCoercionThrow(value)) {
        error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));

        return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
      }
    }
  }
  function checkPropStringCoercion(value, propName) {
    {
      if (willCoercionThrow(value)) {
        error('The provided `%s` prop is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', propName, typeName(value));

        return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
      }
    }
  }
  function checkCSSPropertyStringCoercion(value, propName) {
    {
      if (willCoercionThrow(value)) {
        error('The provided `%s` CSS property is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', propName, typeName(value));

        return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
      }
    }
  }
  function checkHtmlStringCoercion(value) {
    {
      if (willCoercionThrow(value)) {
        error('The provided HTML markup uses a value of unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));

        return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
      }
    }
  }
  function checkFormFieldValueStringCoercion(value) {
    {
      if (willCoercionThrow(value)) {
        error('Form field values (value, checked, defaultValue, or defaultChecked props)' + ' must be strings, not %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));

        return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
      }
    }
  }

  // A reserved attribute.
  // It is handled by React separately and shouldn't be written to the DOM.
  var RESERVED = 0; // A simple string attribute.
  // Attributes that aren't in the filter are presumed to have this type.

  var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
  // "enumerated" attributes with "true" and "false" as possible values.
  // When true, it should be set to a "true" string.
  // When false, it should be set to a "false" string.

  var BOOLEANISH_STRING = 2; // A real boolean attribute.
  // When true, it should be present (set either to an empty string or its name).
  // When false, it should be omitted.

  var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.
  // When true, it should be present (set either to an empty string or its name).
  // When false, it should be omitted.
  // For any other value, should be present with that value.

  var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.
  // When falsy, it should be removed.

  var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.
  // When falsy, it should be removed.

  var POSITIVE_NUMERIC = 6;

  /* eslint-disable max-len */
  var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
  /* eslint-enable max-len */

  var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
  var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');
  var illegalAttributeNameCache = {};
  var validatedAttributeNameCache = {};
  function isAttributeNameSafe(attributeName) {
    if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {
      return true;
    }

    if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {
      return false;
    }

    if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
      validatedAttributeNameCache[attributeName] = true;
      return true;
    }

    illegalAttributeNameCache[attributeName] = true;

    {
      error('Invalid attribute name: `%s`', attributeName);
    }

    return false;
  }
  function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {
    if (propertyInfo !== null) {
      return propertyInfo.type === RESERVED;
    }

    if (isCustomComponentTag) {
      return false;
    }

    if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {
      return true;
    }

    return false;
  }
  function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {
    if (propertyInfo !== null && propertyInfo.type === RESERVED) {
      return false;
    }

    switch (typeof value) {
      case 'function': // $FlowIssue symbol is perfectly valid here

      case 'symbol':
        // eslint-disable-line
        return true;

      case 'boolean':
        {
          if (isCustomComponentTag) {
            return false;
          }

          if (propertyInfo !== null) {
            return !propertyInfo.acceptsBooleans;
          } else {
            var prefix = name.toLowerCase().slice(0, 5);
            return prefix !== 'data-' && prefix !== 'aria-';
          }
        }

      default:
        return false;
    }
  }
  function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {
    if (value === null || typeof value === 'undefined') {
      return true;
    }

    if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {
      return true;
    }

    if (isCustomComponentTag) {

      return false;
    }

    if (propertyInfo !== null) {

      switch (propertyInfo.type) {
        case BOOLEAN:
          return !value;

        case OVERLOADED_BOOLEAN:
          return value === false;

        case NUMERIC:
          return isNaN(value);

        case POSITIVE_NUMERIC:
          return isNaN(value) || value < 1;
      }
    }

    return false;
  }
  function getPropertyInfo(name) {
    return properties.hasOwnProperty(name) ? properties[name] : null;
  }

  function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
    this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
    this.attributeName = attributeName;
    this.attributeNamespace = attributeNamespace;
    this.mustUseProperty = mustUseProperty;
    this.propertyName = name;
    this.type = type;
    this.sanitizeURL = sanitizeURL;
    this.removeEmptyString = removeEmptyString;
  } // When adding attributes to this list, be sure to also add them to
  // the `possibleStandardNames` module to ensure casing and incorrect
  // name warnings.


  var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.

  var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular
  // elements (not just inputs). Now that ReactDOMInput assigns to the
  // defaultValue property -- do we need this?
  'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];

  reservedProps.forEach(function (name) {
    properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
    name, // attributeName
    null, // attributeNamespace
    false, // sanitizeURL
    false);
  }); // A few React string attributes have a different name.
  // This is a mapping from React prop names to the attribute names.

  [['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
    var name = _ref[0],
        attributeName = _ref[1];
    properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
    attributeName, // attributeName
    null, // attributeNamespace
    false, // sanitizeURL
    false);
  }); // These are "enumerated" HTML attributes that accept "true" and "false".
  // In React, we let users pass `true` and `false` even though technically
  // these aren't boolean attributes (they are coerced to strings).

  ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {
    properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
    name.toLowerCase(), // attributeName
    null, // attributeNamespace
    false, // sanitizeURL
    false);
  }); // These are "enumerated" SVG attributes that accept "true" and "false".
  // In React, we let users pass `true` and `false` even though technically
  // these aren't boolean attributes (they are coerced to strings).
  // Since these are SVG attributes, their attribute names are case-sensitive.

  ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
    properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
    name, // attributeName
    null, // attributeNamespace
    false, // sanitizeURL
    false);
  }); // These are HTML boolean attributes.

  ['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM
  // on the client side because the browsers are inconsistent. Instead we call focus().
  'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
  'itemScope'].forEach(function (name) {
    properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
    name.toLowerCase(), // attributeName
    null, // attributeNamespace
    false, // sanitizeURL
    false);
  }); // These are the few React props that we set as DOM properties
  // rather than attributes. These are all booleans.

  ['checked', // Note: `option.selected` is not updated if `select.multiple` is
  // disabled with `removeAttribute`. We have special logic for handling this.
  'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,
  // you'll need to set attributeName to name.toLowerCase()
  // instead in the assignment below.
  ].forEach(function (name) {
    properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
    name, // attributeName
    null, // attributeNamespace
    false, // sanitizeURL
    false);
  }); // These are HTML attributes that are "overloaded booleans": they behave like
  // booleans, but can also accept a string value.

  ['capture', 'download' // NOTE: if you add a camelCased prop to this list,
  // you'll need to set attributeName to name.toLowerCase()
  // instead in the assignment below.
  ].forEach(function (name) {
    properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
    name, // attributeName
    null, // attributeNamespace
    false, // sanitizeURL
    false);
  }); // These are HTML attributes that must be positive numbers.

  ['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,
  // you'll need to set attributeName to name.toLowerCase()
  // instead in the assignment below.
  ].forEach(function (name) {
    properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
    name, // attributeName
    null, // attributeNamespace
    false, // sanitizeURL
    false);
  }); // These are HTML attributes that must be numbers.

  ['rowSpan', 'start'].forEach(function (name) {
    properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
    name.toLowerCase(), // attributeName
    null, // attributeNamespace
    false, // sanitizeURL
    false);
  });
  var CAMELIZE = /[\-\:]([a-z])/g;

  var capitalize = function (token) {
    return token[1].toUpperCase();
  }; // This is a list of all SVG attributes that need special casing, namespacing,
  // or boolean value assignment. Regular attributes that just accept strings
  // and have the same names are omitted, just like in the HTML attribute filter.
  // Some of these attributes can be hard to find. This list was created by
  // scraping the MDN documentation.


  ['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list,
  // you'll need to set attributeName to name.toLowerCase()
  // instead in the assignment below.
  ].forEach(function (attributeName) {
    var name = attributeName.replace(CAMELIZE, capitalize);
    properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
    attributeName, null, // attributeNamespace
    false, // sanitizeURL
    false);
  }); // String SVG attributes with the xlink namespace.

  ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,
  // you'll need to set attributeName to name.toLowerCase()
  // instead in the assignment below.
  ].forEach(function (attributeName) {
    var name = attributeName.replace(CAMELIZE, capitalize);
    properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
    attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL
    false);
  }); // String SVG attributes with the xml namespace.

  ['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
  // you'll need to set attributeName to name.toLowerCase()
  // instead in the assignment below.
  ].forEach(function (attributeName) {
    var name = attributeName.replace(CAMELIZE, capitalize);
    properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
    attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL
    false);
  }); // These attribute exists both in HTML and SVG.
  // The attribute name is case-sensitive in SVG so we can't just use
  // the React name like we do for attributes that exist only in HTML.

  ['tabIndex', 'crossOrigin'].forEach(function (attributeName) {
    properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
    attributeName.toLowerCase(), // attributeName
    null, // attributeNamespace
    false, // sanitizeURL
    false);
  }); // These attributes accept URLs. These must not allow javascript: URLS.
  // These will also need to accept Trusted Types object in the future.

  var xlinkHref = 'xlinkHref';
  properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
  'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL
  false);
  ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
    properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
    attributeName.toLowerCase(), // attributeName
    null, // attributeNamespace
    true, // sanitizeURL
    true);
  });

  // and any newline or tab are filtered out as if they're not part of the URL.
  // https://url.spec.whatwg.org/#url-parsing
  // Tab or newline are defined as \r\n\t:
  // https://infra.spec.whatwg.org/#ascii-tab-or-newline
  // A C0 control is a code point in the range \u0000 NULL to \u001F
  // INFORMATION SEPARATOR ONE, inclusive:
  // https://infra.spec.whatwg.org/#c0-control-or-space

  /* eslint-disable max-len */

  var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;
  var didWarn = false;

  function sanitizeURL(url) {
    {
      if (!didWarn && isJavaScriptProtocol.test(url)) {
        didWarn = true;

        error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));
      }
    }
  }

  /**
   * Get the value for a property on a node. Only used in DEV for SSR validation.
   * The "expected" argument is used as a hint of what the expected value is.
   * Some properties have multiple equivalent values.
   */
  function getValueForProperty(node, name, expected, propertyInfo) {
    {
      if (propertyInfo.mustUseProperty) {
        var propertyName = propertyInfo.propertyName;
        return node[propertyName];
      } else {
        // This check protects multiple uses of `expected`, which is why the
        // react-internal/safe-string-coercion rule is disabled in several spots
        // below.
        {
          checkAttributeStringCoercion(expected, name);
        }

        if ( propertyInfo.sanitizeURL) {
          // If we haven't fully disabled javascript: URLs, and if
          // the hydration is successful of a javascript: URL, we
          // still want to warn on the client.
          // eslint-disable-next-line react-internal/safe-string-coercion
          sanitizeURL('' + expected);
        }

        var attributeName = propertyInfo.attributeName;
        var stringValue = null;

        if (propertyInfo.type === OVERLOADED_BOOLEAN) {
          if (node.hasAttribute(attributeName)) {
            var value = node.getAttribute(attributeName);

            if (value === '') {
              return true;
            }

            if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
              return value;
            } // eslint-disable-next-line react-internal/safe-string-coercion


            if (value === '' + expected) {
              return expected;
            }

            return value;
          }
        } else if (node.hasAttribute(attributeName)) {
          if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
            // We had an attribute but shouldn't have had one, so read it
            // for the error message.
            return node.getAttribute(attributeName);
          }

          if (propertyInfo.type === BOOLEAN) {
            // If this was a boolean, it doesn't matter what the value is
            // the fact that we have it is the same as the expected.
            return expected;
          } // Even if this property uses a namespace we use getAttribute
          // because we assume its namespaced name is the same as our config.
          // To use getAttributeNS we need the local name which we don't have
          // in our config atm.


          stringValue = node.getAttribute(attributeName);
        }

        if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
          return stringValue === null ? expected : stringValue; // eslint-disable-next-line react-internal/safe-string-coercion
        } else if (stringValue === '' + expected) {
          return expected;
        } else {
          return stringValue;
        }
      }
    }
  }
  /**
   * Get the value for a attribute on a node. Only used in DEV for SSR validation.
   * The third argument is used as a hint of what the expected value is. Some
   * attributes have multiple equivalent values.
   */

  function getValueForAttribute(node, name, expected, isCustomComponentTag) {
    {
      if (!isAttributeNameSafe(name)) {
        return;
      }

      if (!node.hasAttribute(name)) {
        return expected === undefined ? undefined : null;
      }

      var value = node.getAttribute(name);

      {
        checkAttributeStringCoercion(expected, name);
      }

      if (value === '' + expected) {
        return expected;
      }

      return value;
    }
  }
  /**
   * Sets the value for a property on a node.
   *
   * @param {DOMElement} node
   * @param {string} name
   * @param {*} value
   */

  function setValueForProperty(node, name, value, isCustomComponentTag) {
    var propertyInfo = getPropertyInfo(name);

    if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {
      return;
    }

    if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {
      value = null;
    }


    if (isCustomComponentTag || propertyInfo === null) {
      if (isAttributeNameSafe(name)) {
        var _attributeName = name;

        if (value === null) {
          node.removeAttribute(_attributeName);
        } else {
          {
            checkAttributeStringCoercion(value, name);
          }

          node.setAttribute(_attributeName,  '' + value);
        }
      }

      return;
    }

    var mustUseProperty = propertyInfo.mustUseProperty;

    if (mustUseProperty) {
      var propertyName = propertyInfo.propertyName;

      if (value === null) {
        var type = propertyInfo.type;
        node[propertyName] = type === BOOLEAN ? false : '';
      } else {
        // Contrary to `setAttribute`, object properties are properly
        // `toString`ed by IE8/9.
        node[propertyName] = value;
      }

      return;
    } // The rest are treated as attributes with special cases.


    var attributeName = propertyInfo.attributeName,
        attributeNamespace = propertyInfo.attributeNamespace;

    if (value === null) {
      node.removeAttribute(attributeName);
    } else {
      var _type = propertyInfo.type;
      var attributeValue;

      if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {
        // If attribute type is boolean, we know for sure it won't be an execution sink
        // and we won't require Trusted Type here.
        attributeValue = '';
      } else {
        // `setAttribute` with objects becomes only `[object]` in IE8/9,
        // ('' + value) makes it output the correct toString()-value.
        {
          {
            checkAttributeStringCoercion(value, attributeName);
          }

          attributeValue = '' + value;
        }

        if (propertyInfo.sanitizeURL) {
          sanitizeURL(attributeValue.toString());
        }
      }

      if (attributeNamespace) {
        node.setAttributeNS(attributeNamespace, attributeName, attributeValue);
      } else {
        node.setAttribute(attributeName, attributeValue);
      }
    }
  }

  // ATTENTION
  // When adding new symbols to this file,
  // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
  // The Symbol used to tag the ReactElement-like types.
  var REACT_ELEMENT_TYPE = Symbol.for('react.element');
  var REACT_PORTAL_TYPE = Symbol.for('react.portal');
  var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
  var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
  var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
  var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
  var REACT_CONTEXT_TYPE = Symbol.for('react.context');
  var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
  var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
  var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
  var REACT_MEMO_TYPE = Symbol.for('react.memo');
  var REACT_LAZY_TYPE = Symbol.for('react.lazy');
  var REACT_SCOPE_TYPE = Symbol.for('react.scope');
  var REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for('react.debug_trace_mode');
  var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
  var REACT_LEGACY_HIDDEN_TYPE = Symbol.for('react.legacy_hidden');
  var REACT_CACHE_TYPE = Symbol.for('react.cache');
  var REACT_TRACING_MARKER_TYPE = Symbol.for('react.tracing_marker');
  var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
  var FAUX_ITERATOR_SYMBOL = '@@iterator';
  function getIteratorFn(maybeIterable) {
    if (maybeIterable === null || typeof maybeIterable !== 'object') {
      return null;
    }

    var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];

    if (typeof maybeIterator === 'function') {
      return maybeIterator;
    }

    return null;
  }

  var assign = Object.assign;

  // Helpers to patch console.logs to avoid logging during side-effect free
  // replaying on render function. This currently only patches the object
  // lazily which won't cover if the log function was extracted eagerly.
  // We could also eagerly patch the method.
  var disabledDepth = 0;
  var prevLog;
  var prevInfo;
  var prevWarn;
  var prevError;
  var prevGroup;
  var prevGroupCollapsed;
  var prevGroupEnd;

  function disabledLog() {}

  disabledLog.__reactDisabledLog = true;
  function disableLogs() {
    {
      if (disabledDepth === 0) {
        /* eslint-disable react-internal/no-production-logging */
        prevLog = console.log;
        prevInfo = console.info;
        prevWarn = console.warn;
        prevError = console.error;
        prevGroup = console.group;
        prevGroupCollapsed = console.groupCollapsed;
        prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099

        var props = {
          configurable: true,
          enumerable: true,
          value: disabledLog,
          writable: true
        }; // $FlowFixMe Flow thinks console is immutable.

        Object.defineProperties(console, {
          info: props,
          log: props,
          warn: props,
          error: props,
          group: props,
          groupCollapsed: props,
          groupEnd: props
        });
        /* eslint-enable react-internal/no-production-logging */
      }

      disabledDepth++;
    }
  }
  function reenableLogs() {
    {
      disabledDepth--;

      if (disabledDepth === 0) {
        /* eslint-disable react-internal/no-production-logging */
        var props = {
          configurable: true,
          enumerable: true,
          writable: true
        }; // $FlowFixMe Flow thinks console is immutable.

        Object.defineProperties(console, {
          log: assign({}, props, {
            value: prevLog
          }),
          info: assign({}, props, {
            value: prevInfo
          }),
          warn: assign({}, props, {
            value: prevWarn
          }),
          error: assign({}, props, {
            value: prevError
          }),
          group: assign({}, props, {
            value: prevGroup
          }),
          groupCollapsed: assign({}, props, {
            value: prevGroupCollapsed
          }),
          groupEnd: assign({}, props, {
            value: prevGroupEnd
          })
        });
        /* eslint-enable react-internal/no-production-logging */
      }

      if (disabledDepth < 0) {
        error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
      }
    }
  }

  var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
  var prefix;
  function describeBuiltInComponentFrame(name, source, ownerFn) {
    {
      if (prefix === undefined) {
        // Extract the VM specific prefix used by each line.
        try {
          throw Error();
        } catch (x) {
          var match = x.stack.trim().match(/\n( *(at )?)/);
          prefix = match && match[1] || '';
        }
      } // We use the prefix to ensure our stacks line up with native stack frames.


      return '\n' + prefix + name;
    }
  }
  var reentry = false;
  var componentFrameCache;

  {
    var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
    componentFrameCache = new PossiblyWeakMap();
  }

  function describeNativeComponentFrame(fn, construct) {
    // If something asked for a stack inside a fake render, it should get ignored.
    if ( !fn || reentry) {
      return '';
    }

    {
      var frame = componentFrameCache.get(fn);

      if (frame !== undefined) {
        return frame;
      }
    }

    var control;
    reentry = true;
    var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.

    Error.prepareStackTrace = undefined;
    var previousDispatcher;

    {
      previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
      // for warnings.

      ReactCurrentDispatcher.current = null;
      disableLogs();
    }

    try {
      // This should throw.
      if (construct) {
        // Something should be setting the props in the constructor.
        var Fake = function () {
          throw Error();
        }; // $FlowFixMe


        Object.defineProperty(Fake.prototype, 'props', {
          set: function () {
            // We use a throwing setter instead of frozen or non-writable props
            // because that won't throw in a non-strict mode function.
            throw Error();
          }
        });

        if (typeof Reflect === 'object' && Reflect.construct) {
          // We construct a different control for this case to include any extra
          // frames added by the construct call.
          try {
            Reflect.construct(Fake, []);
          } catch (x) {
            control = x;
          }

          Reflect.construct(fn, [], Fake);
        } else {
          try {
            Fake.call();
          } catch (x) {
            control = x;
          }

          fn.call(Fake.prototype);
        }
      } else {
        try {
          throw Error();
        } catch (x) {
          control = x;
        }

        fn();
      }
    } catch (sample) {
      // This is inlined manually because closure doesn't do it for us.
      if (sample && control && typeof sample.stack === 'string') {
        // This extracts the first frame from the sample that isn't also in the control.
        // Skipping one frame that we assume is the frame that calls the two.
        var sampleLines = sample.stack.split('\n');
        var controlLines = control.stack.split('\n');
        var s = sampleLines.length - 1;
        var c = controlLines.length - 1;

        while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
          // We expect at least one stack frame to be shared.
          // Typically this will be the root most one. However, stack frames may be
          // cut off due to maximum stack limits. In this case, one maybe cut off
          // earlier than the other. We assume that the sample is longer or the same
          // and there for cut off earlier. So we should find the root most frame in
          // the sample somewhere in the control.
          c--;
        }

        for (; s >= 1 && c >= 0; s--, c--) {
          // Next we find the first one that isn't the same which should be the
          // frame that called our sample function and the control.
          if (sampleLines[s] !== controlLines[c]) {
            // In V8, the first line is describing the message but other VMs don't.
            // If we're about to return the first line, and the control is also on the same
            // line, that's a pretty good indicator that our sample threw at same line as
            // the control. I.e. before we entered the sample frame. So we ignore this result.
            // This can happen if you passed a class to function component, or non-function.
            if (s !== 1 || c !== 1) {
              do {
                s--;
                c--; // We may still have similar intermediate frames from the construct call.
                // The next one that isn't the same should be our match though.

                if (c < 0 || sampleLines[s] !== controlLines[c]) {
                  // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
                  var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
                  // but we have a user-provided "displayName"
                  // splice it in to make the stack more readable.


                  if (fn.displayName && _frame.includes('<anonymous>')) {
                    _frame = _frame.replace('<anonymous>', fn.displayName);
                  }

                  {
                    if (typeof fn === 'function') {
                      componentFrameCache.set(fn, _frame);
                    }
                  } // Return the line we found.


                  return _frame;
                }
              } while (s >= 1 && c >= 0);
            }

            break;
          }
        }
      }
    } finally {
      reentry = false;

      {
        ReactCurrentDispatcher.current = previousDispatcher;
        reenableLogs();
      }

      Error.prepareStackTrace = previousPrepareStackTrace;
    } // Fallback to just using the name if we couldn't make it throw.


    var name = fn ? fn.displayName || fn.name : '';
    var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';

    {
      if (typeof fn === 'function') {
        componentFrameCache.set(fn, syntheticFrame);
      }
    }

    return syntheticFrame;
  }

  function describeClassComponentFrame(ctor, source, ownerFn) {
    {
      return describeNativeComponentFrame(ctor, true);
    }
  }
  function describeFunctionComponentFrame(fn, source, ownerFn) {
    {
      return describeNativeComponentFrame(fn, false);
    }
  }

  function shouldConstruct(Component) {
    var prototype = Component.prototype;
    return !!(prototype && prototype.isReactComponent);
  }

  function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {

    if (type == null) {
      return '';
    }

    if (typeof type === 'function') {
      {
        return describeNativeComponentFrame(type, shouldConstruct(type));
      }
    }

    if (typeof type === 'string') {
      return describeBuiltInComponentFrame(type);
    }

    switch (type) {
      case REACT_SUSPENSE_TYPE:
        return describeBuiltInComponentFrame('Suspense');

      case REACT_SUSPENSE_LIST_TYPE:
        return describeBuiltInComponentFrame('SuspenseList');
    }

    if (typeof type === 'object') {
      switch (type.$$typeof) {
        case REACT_FORWARD_REF_TYPE:
          return describeFunctionComponentFrame(type.render);

        case REACT_MEMO_TYPE:
          // Memo may contain any component type so we recursively resolve it.
          return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);

        case REACT_LAZY_TYPE:
          {
            var lazyComponent = type;
            var payload = lazyComponent._payload;
            var init = lazyComponent._init;

            try {
              // Lazy may contain any component type so we recursively resolve it.
              return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
            } catch (x) {}
          }
      }
    }

    return '';
  }

  function describeFiber(fiber) {
    var owner =  fiber._debugOwner ? fiber._debugOwner.type : null ;
    var source =  fiber._debugSource ;

    switch (fiber.tag) {
      case HostComponent:
        return describeBuiltInComponentFrame(fiber.type);

      case LazyComponent:
        return describeBuiltInComponentFrame('Lazy');

      case SuspenseComponent:
        return describeBuiltInComponentFrame('Suspense');

      case SuspenseListComponent:
        return describeBuiltInComponentFrame('SuspenseList');

      case FunctionComponent:
      case IndeterminateComponent:
      case SimpleMemoComponent:
        return describeFunctionComponentFrame(fiber.type);

      case ForwardRef:
        return describeFunctionComponentFrame(fiber.type.render);

      case ClassComponent:
        return describeClassComponentFrame(fiber.type);

      default:
        return '';
    }
  }

  function getStackByFiberInDevAndProd(workInProgress) {
    try {
      var info = '';
      var node = workInProgress;

      do {
        info += describeFiber(node);
        node = node.return;
      } while (node);

      return info;
    } catch (x) {
      return '\nError generating stack: ' + x.message + '\n' + x.stack;
    }
  }

  function getWrappedName(outerType, innerType, wrapperName) {
    var displayName = outerType.displayName;

    if (displayName) {
      return displayName;
    }

    var functionName = innerType.displayName || innerType.name || '';
    return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
  } // Keep in sync with react-reconciler/getComponentNameFromFiber


  function getContextName(type) {
    return type.displayName || 'Context';
  } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.


  function getComponentNameFromType(type) {
    if (type == null) {
      // Host root, text node or just invalid type.
      return null;
    }

    {
      if (typeof type.tag === 'number') {
        error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
      }
    }

    if (typeof type === 'function') {
      return type.displayName || type.name || null;
    }

    if (typeof type === 'string') {
      return type;
    }

    switch (type) {
      case REACT_FRAGMENT_TYPE:
        return 'Fragment';

      case REACT_PORTAL_TYPE:
        return 'Portal';

      case REACT_PROFILER_TYPE:
        return 'Profiler';

      case REACT_STRICT_MODE_TYPE:
        return 'StrictMode';

      case REACT_SUSPENSE_TYPE:
        return 'Suspense';

      case REACT_SUSPENSE_LIST_TYPE:
        return 'SuspenseList';

    }

    if (typeof type === 'object') {
      switch (type.$$typeof) {
        case REACT_CONTEXT_TYPE:
          var context = type;
          return getContextName(context) + '.Consumer';

        case REACT_PROVIDER_TYPE:
          var provider = type;
          return getContextName(provider._context) + '.Provider';

        case REACT_FORWARD_REF_TYPE:
          return getWrappedName(type, type.render, 'ForwardRef');

        case REACT_MEMO_TYPE:
          var outerName = type.displayName || null;

          if (outerName !== null) {
            return outerName;
          }

          return getComponentNameFromType(type.type) || 'Memo';

        case REACT_LAZY_TYPE:
          {
            var lazyComponent = type;
            var payload = lazyComponent._payload;
            var init = lazyComponent._init;

            try {
              return getComponentNameFromType(init(payload));
            } catch (x) {
              return null;
            }
          }

        // eslint-disable-next-line no-fallthrough
      }
    }

    return null;
  }

  function getWrappedName$1(outerType, innerType, wrapperName) {
    var functionName = innerType.displayName || innerType.name || '';
    return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
  } // Keep in sync with shared/getComponentNameFromType


  function getContextName$1(type) {
    return type.displayName || 'Context';
  }

  function getComponentNameFromFiber(fiber) {
    var tag = fiber.tag,
        type = fiber.type;

    switch (tag) {
      case CacheComponent:
        return 'Cache';

      case ContextConsumer:
        var context = type;
        return getContextName$1(context) + '.Consumer';

      case ContextProvider:
        var provider = type;
        return getContextName$1(provider._context) + '.Provider';

      case DehydratedFragment:
        return 'DehydratedFragment';

      case ForwardRef:
        return getWrappedName$1(type, type.render, 'ForwardRef');

      case Fragment:
        return 'Fragment';

      case HostComponent:
        // Host component type is the display name (e.g. "div", "View")
        return type;

      case HostPortal:
        return 'Portal';

      case HostRoot:
        return 'Root';

      case HostText:
        return 'Text';

      case LazyComponent:
        // Name comes from the type in this case; we don't have a tag.
        return getComponentNameFromType(type);

      case Mode:
        if (type === REACT_STRICT_MODE_TYPE) {
          // Don't be less specific than shared/getComponentNameFromType
          return 'StrictMode';
        }

        return 'Mode';

      case OffscreenComponent:
        return 'Offscreen';

      case Profiler:
        return 'Profiler';

      case ScopeComponent:
        return 'Scope';

      case SuspenseComponent:
        return 'Suspense';

      case SuspenseListComponent:
        return 'SuspenseList';

      case TracingMarkerComponent:
        return 'TracingMarker';
      // The display name for this tags come from the user-provided type:

      case ClassComponent:
      case FunctionComponent:
      case IncompleteClassComponent:
      case IndeterminateComponent:
      case MemoComponent:
      case SimpleMemoComponent:
        if (typeof type === 'function') {
          return type.displayName || type.name || null;
        }

        if (typeof type === 'string') {
          return type;
        }

        break;

    }

    return null;
  }

  var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
  var current = null;
  var isRendering = false;
  function getCurrentFiberOwnerNameInDevOrNull() {
    {
      if (current === null) {
        return null;
      }

      var owner = current._debugOwner;

      if (owner !== null && typeof owner !== 'undefined') {
        return getComponentNameFromFiber(owner);
      }
    }

    return null;
  }

  function getCurrentFiberStackInDev() {
    {
      if (current === null) {
        return '';
      } // Safe because if current fiber exists, we are reconciling,
      // and it is guaranteed to be the work-in-progress version.


      return getStackByFiberInDevAndProd(current);
    }
  }

  function resetCurrentFiber() {
    {
      ReactDebugCurrentFrame.getCurrentStack = null;
      current = null;
      isRendering = false;
    }
  }
  function setCurrentFiber(fiber) {
    {
      ReactDebugCurrentFrame.getCurrentStack = fiber === null ? null : getCurrentFiberStackInDev;
      current = fiber;
      isRendering = false;
    }
  }
  function getCurrentFiber() {
    {
      return current;
    }
  }
  function setIsRendering(rendering) {
    {
      isRendering = rendering;
    }
  }

  // Flow does not allow string concatenation of most non-string types. To work
  // around this limitation, we use an opaque type that can only be obtained by
  // passing the value through getToStringValue first.
  function toString(value) {
    // The coercion safety check is performed in getToStringValue().
    // eslint-disable-next-line react-internal/safe-string-coercion
    return '' + value;
  }
  function getToStringValue(value) {
    switch (typeof value) {
      case 'boolean':
      case 'number':
      case 'string':
      case 'undefined':
        return value;

      case 'object':
        {
          checkFormFieldValueStringCoercion(value);
        }

        return value;

      default:
        // function, symbol are assigned as empty strings
        return '';
    }
  }

  var hasReadOnlyValue = {
    button: true,
    checkbox: true,
    image: true,
    hidden: true,
    radio: true,
    reset: true,
    submit: true
  };
  function checkControlledValueProps(tagName, props) {
    {
      if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {
        error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
      }

      if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {
        error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
      }
    }
  }

  function isCheckable(elem) {
    var type = elem.type;
    var nodeName = elem.nodeName;
    return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');
  }

  function getTracker(node) {
    return node._valueTracker;
  }

  function detachTracker(node) {
    node._valueTracker = null;
  }

  function getValueFromNode(node) {
    var value = '';

    if (!node) {
      return value;
    }

    if (isCheckable(node)) {
      value = node.checked ? 'true' : 'false';
    } else {
      value = node.value;
    }

    return value;
  }

  function trackValueOnNode(node) {
    var valueField = isCheckable(node) ? 'checked' : 'value';
    var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);

    {
      checkFormFieldValueStringCoercion(node[valueField]);
    }

    var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail
    // and don't track value will cause over reporting of changes,
    // but it's better then a hard failure
    // (needed for certain tests that spyOn input values and Safari)

    if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {
      return;
    }

    var get = descriptor.get,
        set = descriptor.set;
    Object.defineProperty(node, valueField, {
      configurable: true,
      get: function () {
        return get.call(this);
      },
      set: function (value) {
        {
          checkFormFieldValueStringCoercion(value);
        }

        currentValue = '' + value;
        set.call(this, value);
      }
    }); // We could've passed this the first time
    // but it triggers a bug in IE11 and Edge 14/15.
    // Calling defineProperty() again should be equivalent.
    // https://github.com/facebook/react/issues/11768

    Object.defineProperty(node, valueField, {
      enumerable: descriptor.enumerable
    });
    var tracker = {
      getValue: function () {
        return currentValue;
      },
      setValue: function (value) {
        {
          checkFormFieldValueStringCoercion(value);
        }

        currentValue = '' + value;
      },
      stopTracking: function () {
        detachTracker(node);
        delete node[valueField];
      }
    };
    return tracker;
  }

  function track(node) {
    if (getTracker(node)) {
      return;
    } // TODO: Once it's just Fiber we can move this to node._wrapperState


    node._valueTracker = trackValueOnNode(node);
  }
  function updateValueIfChanged(node) {
    if (!node) {
      return false;
    }

    var tracker = getTracker(node); // if there is no tracker at this point it's unlikely
    // that trying again will succeed

    if (!tracker) {
      return true;
    }

    var lastValue = tracker.getValue();
    var nextValue = getValueFromNode(node);

    if (nextValue !== lastValue) {
      tracker.setValue(nextValue);
      return true;
    }

    return false;
  }

  function getActiveElement(doc) {
    doc = doc || (typeof document !== 'undefined' ? document : undefined);

    if (typeof doc === 'undefined') {
      return null;
    }

    try {
      return doc.activeElement || doc.body;
    } catch (e) {
      return doc.body;
    }
  }

  var didWarnValueDefaultValue = false;
  var didWarnCheckedDefaultChecked = false;
  var didWarnControlledToUncontrolled = false;
  var didWarnUncontrolledToControlled = false;

  function isControlled(props) {
    var usesChecked = props.type === 'checkbox' || props.type === 'radio';
    return usesChecked ? props.checked != null : props.value != null;
  }
  /**
   * Implements an <input> host component that allows setting these optional
   * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
   *
   * If `checked` or `value` are not supplied (or null/undefined), user actions
   * that affect the checked state or value will trigger updates to the element.
   *
   * If they are supplied (and not null/undefined), the rendered element will not
   * trigger updates to the element. Instead, the props must change in order for
   * the rendered element to be updated.
   *
   * The rendered element will be initialized as unchecked (or `defaultChecked`)
   * with an empty value (or `defaultValue`).
   *
   * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
   */


  function getHostProps(element, props) {
    var node = element;
    var checked = props.checked;
    var hostProps = assign({}, props, {
      defaultChecked: undefined,
      defaultValue: undefined,
      value: undefined,
      checked: checked != null ? checked : node._wrapperState.initialChecked
    });
    return hostProps;
  }
  function initWrapperState(element, props) {
    {
      checkControlledValueProps('input', props);

      if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
        error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);

        didWarnCheckedDefaultChecked = true;
      }

      if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
        error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);

        didWarnValueDefaultValue = true;
      }
    }

    var node = element;
    var defaultValue = props.defaultValue == null ? '' : props.defaultValue;
    node._wrapperState = {
      initialChecked: props.checked != null ? props.checked : props.defaultChecked,
      initialValue: getToStringValue(props.value != null ? props.value : defaultValue),
      controlled: isControlled(props)
    };
  }
  function updateChecked(element, props) {
    var node = element;
    var checked = props.checked;

    if (checked != null) {
      setValueForProperty(node, 'checked', checked, false);
    }
  }
  function updateWrapper(element, props) {
    var node = element;

    {
      var controlled = isControlled(props);

      if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
        error('A component is changing an uncontrolled input to be controlled. ' + 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');

        didWarnUncontrolledToControlled = true;
      }

      if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
        error('A component is changing a controlled input to be uncontrolled. ' + 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');

        didWarnControlledToUncontrolled = true;
      }
    }

    updateChecked(element, props);
    var value = getToStringValue(props.value);
    var type = props.type;

    if (value != null) {
      if (type === 'number') {
        if (value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible.
        // eslint-disable-next-line
        node.value != value) {
          node.value = toString(value);
        }
      } else if (node.value !== toString(value)) {
        node.value = toString(value);
      }
    } else if (type === 'submit' || type === 'reset') {
      // Submit/reset inputs need the attribute removed completely to avoid
      // blank-text buttons.
      node.removeAttribute('value');
      return;
    }

    {
      // When syncing the value attribute, the value comes from a cascade of
      // properties:
      //  1. The value React property
      //  2. The defaultValue React property
      //  3. Otherwise there should be no change
      if (props.hasOwnProperty('value')) {
        setDefaultValue(node, props.type, value);
      } else if (props.hasOwnProperty('defaultValue')) {
        setDefaultValue(node, props.type, getToStringValue(props.defaultValue));
      }
    }

    {
      // When syncing the checked attribute, it only changes when it needs
      // to be removed, such as transitioning from a checkbox into a text input
      if (props.checked == null && props.defaultChecked != null) {
        node.defaultChecked = !!props.defaultChecked;
      }
    }
  }
  function postMountWrapper(element, props, isHydrating) {
    var node = element; // Do not assign value if it is already set. This prevents user text input
    // from being lost during SSR hydration.

    if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) {
      var type = props.type;
      var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the
      // default value provided by the browser. See: #12872

      if (isButton && (props.value === undefined || props.value === null)) {
        return;
      }

      var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input
      // from being lost during SSR hydration.

      if (!isHydrating) {
        {
          // When syncing the value attribute, the value property should use
          // the wrapperState._initialValue property. This uses:
          //
          //   1. The value React property when present
          //   2. The defaultValue React property when present
          //   3. An empty string
          if (initialValue !== node.value) {
            node.value = initialValue;
          }
        }
      }

      {
        // Otherwise, the value attribute is synchronized to the property,
        // so we assign defaultValue to the same thing as the value property
        // assignment step above.
        node.defaultValue = initialValue;
      }
    } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug
    // this is needed to work around a chrome bug where setting defaultChecked
    // will sometimes influence the value of checked (even after detachment).
    // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416
    // We need to temporarily unset name to avoid disrupting radio button groups.


    var name = node.name;

    if (name !== '') {
      node.name = '';
    }

    {
      // When syncing the checked attribute, both the checked property and
      // attribute are assigned at the same time using defaultChecked. This uses:
      //
      //   1. The checked React property when present
      //   2. The defaultChecked React property when present
      //   3. Otherwise, false
      node.defaultChecked = !node.defaultChecked;
      node.defaultChecked = !!node._wrapperState.initialChecked;
    }

    if (name !== '') {
      node.name = name;
    }
  }
  function restoreControlledState(element, props) {
    var node = element;
    updateWrapper(node, props);
    updateNamedCousins(node, props);
  }

  function updateNamedCousins(rootNode, props) {
    var name = props.name;

    if (props.type === 'radio' && name != null) {
      var queryRoot = rootNode;

      while (queryRoot.parentNode) {
        queryRoot = queryRoot.parentNode;
      } // If `rootNode.form` was non-null, then we could try `form.elements`,
      // but that sometimes behaves strangely in IE8. We could also try using
      // `form.getElementsByName`, but that will only return direct children
      // and won't include inputs that use the HTML5 `form=` attribute. Since
      // the input might not even be in a form. It might not even be in the
      // document. Let's just use the local `querySelectorAll` to ensure we don't
      // miss anything.


      {
        checkAttributeStringCoercion(name, 'name');
      }

      var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]');

      for (var i = 0; i < group.length; i++) {
        var otherNode = group[i];

        if (otherNode === rootNode || otherNode.form !== rootNode.form) {
          continue;
        } // This will throw if radio buttons rendered by different copies of React
        // and the same name are rendered into the same form (same as #1939).
        // That's probably okay; we don't support it just as we don't support
        // mixing React radio buttons with non-React ones.


        var otherProps = getFiberCurrentPropsFromNode(otherNode);

        if (!otherProps) {
          throw new Error('ReactDOMInput: Mixing React and non-React radio inputs with the ' + 'same `name` is not supported.');
        } // We need update the tracked value on the named cousin since the value
        // was changed but the input saw no event or value set


        updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that
        // was previously checked to update will cause it to be come re-checked
        // as appropriate.

        updateWrapper(otherNode, otherProps);
      }
    }
  } // In Chrome, assigning defaultValue to certain input types triggers input validation.
  // For number inputs, the display value loses trailing decimal points. For email inputs,
  // Chrome raises "The specified value <x> is not a valid email address".
  //
  // Here we check to see if the defaultValue has actually changed, avoiding these problems
  // when the user is inputting text
  //
  // https://github.com/facebook/react/issues/7253


  function setDefaultValue(node, type, value) {
    if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js
    type !== 'number' || getActiveElement(node.ownerDocument) !== node) {
      if (value == null) {
        node.defaultValue = toString(node._wrapperState.initialValue);
      } else if (node.defaultValue !== toString(value)) {
        node.defaultValue = toString(value);
      }
    }
  }

  var didWarnSelectedSetOnOption = false;
  var didWarnInvalidChild = false;
  var didWarnInvalidInnerHTML = false;
  /**
   * Implements an <option> host component that warns when `selected` is set.
   */

  function validateProps(element, props) {
    {
      // If a value is not provided, then the children must be simple.
      if (props.value == null) {
        if (typeof props.children === 'object' && props.children !== null) {
          React.Children.forEach(props.children, function (child) {
            if (child == null) {
              return;
            }

            if (typeof child === 'string' || typeof child === 'number') {
              return;
            }

            if (!didWarnInvalidChild) {
              didWarnInvalidChild = true;

              error('Cannot infer the option value of complex children. ' + 'Pass a `value` prop or use a plain string as children to <option>.');
            }
          });
        } else if (props.dangerouslySetInnerHTML != null) {
          if (!didWarnInvalidInnerHTML) {
            didWarnInvalidInnerHTML = true;

            error('Pass a `value` prop if you set dangerouslyInnerHTML so React knows ' + 'which value should be selected.');
          }
        }
      } // TODO: Remove support for `selected` in <option>.


      if (props.selected != null && !didWarnSelectedSetOnOption) {
        error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');

        didWarnSelectedSetOnOption = true;
      }
    }
  }
  function postMountWrapper$1(element, props) {
    // value="" should make a value attribute (#6219)
    if (props.value != null) {
      element.setAttribute('value', toString(getToStringValue(props.value)));
    }
  }

  var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare

  function isArray(a) {
    return isArrayImpl(a);
  }

  var didWarnValueDefaultValue$1;

  {
    didWarnValueDefaultValue$1 = false;
  }

  function getDeclarationErrorAddendum() {
    var ownerName = getCurrentFiberOwnerNameInDevOrNull();

    if (ownerName) {
      return '\n\nCheck the render method of `' + ownerName + '`.';
    }

    return '';
  }

  var valuePropNames = ['value', 'defaultValue'];
  /**
   * Validation function for `value` and `defaultValue`.
   */

  function checkSelectPropTypes(props) {
    {
      checkControlledValueProps('select', props);

      for (var i = 0; i < valuePropNames.length; i++) {
        var propName = valuePropNames[i];

        if (props[propName] == null) {
          continue;
        }

        var propNameIsArray = isArray(props[propName]);

        if (props.multiple && !propNameIsArray) {
          error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());
        } else if (!props.multiple && propNameIsArray) {
          error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());
        }
      }
    }
  }

  function updateOptions(node, multiple, propValue, setDefaultSelected) {
    var options = node.options;

    if (multiple) {
      var selectedValues = propValue;
      var selectedValue = {};

      for (var i = 0; i < selectedValues.length; i++) {
        // Prefix to avoid chaos with special keys.
        selectedValue['$' + selectedValues[i]] = true;
      }

      for (var _i = 0; _i < options.length; _i++) {
        var selected = selectedValue.hasOwnProperty('$' + options[_i].value);

        if (options[_i].selected !== selected) {
          options[_i].selected = selected;
        }

        if (selected && setDefaultSelected) {
          options[_i].defaultSelected = true;
        }
      }
    } else {
      // Do not set `select.value` as exact behavior isn't consistent across all
      // browsers for all cases.
      var _selectedValue = toString(getToStringValue(propValue));

      var defaultSelected = null;

      for (var _i2 = 0; _i2 < options.length; _i2++) {
        if (options[_i2].value === _selectedValue) {
          options[_i2].selected = true;

          if (setDefaultSelected) {
            options[_i2].defaultSelected = true;
          }

          return;
        }

        if (defaultSelected === null && !options[_i2].disabled) {
          defaultSelected = options[_i2];
        }
      }

      if (defaultSelected !== null) {
        defaultSelected.selected = true;
      }
    }
  }
  /**
   * Implements a <select> host component that allows optionally setting the
   * props `value` and `defaultValue`. If `multiple` is false, the prop must be a
   * stringable. If `multiple` is true, the prop must be an array of stringables.
   *
   * If `value` is not supplied (or null/undefined), user actions that change the
   * selected option will trigger updates to the rendered options.
   *
   * If it is supplied (and not null/undefined), the rendered options will not
   * update in response to user actions. Instead, the `value` prop must change in
   * order for the rendered options to update.
   *
   * If `defaultValue` is provided, any options with the supplied values will be
   * selected.
   */


  function getHostProps$1(element, props) {
    return assign({}, props, {
      value: undefined
    });
  }
  function initWrapperState$1(element, props) {
    var node = element;

    {
      checkSelectPropTypes(props);
    }

    node._wrapperState = {
      wasMultiple: !!props.multiple
    };

    {
      if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {
        error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components');

        didWarnValueDefaultValue$1 = true;
      }
    }
  }
  function postMountWrapper$2(element, props) {
    var node = element;
    node.multiple = !!props.multiple;
    var value = props.value;

    if (value != null) {
      updateOptions(node, !!props.multiple, value, false);
    } else if (props.defaultValue != null) {
      updateOptions(node, !!props.multiple, props.defaultValue, true);
    }
  }
  function postUpdateWrapper(element, props) {
    var node = element;
    var wasMultiple = node._wrapperState.wasMultiple;
    node._wrapperState.wasMultiple = !!props.multiple;
    var value = props.value;

    if (value != null) {
      updateOptions(node, !!props.multiple, value, false);
    } else if (wasMultiple !== !!props.multiple) {
      // For simplicity, reapply `defaultValue` if `multiple` is toggled.
      if (props.defaultValue != null) {
        updateOptions(node, !!props.multiple, props.defaultValue, true);
      } else {
        // Revert the select back to its default unselected state.
        updateOptions(node, !!props.multiple, props.multiple ? [] : '', false);
      }
    }
  }
  function restoreControlledState$1(element, props) {
    var node = element;
    var value = props.value;

    if (value != null) {
      updateOptions(node, !!props.multiple, value, false);
    }
  }

  var didWarnValDefaultVal = false;

  /**
   * Implements a <textarea> host component that allows setting `value`, and
   * `defaultValue`. This differs from the traditional DOM API because value is
   * usually set as PCDATA children.
   *
   * If `value` is not supplied (or null/undefined), user actions that affect the
   * value will trigger updates to the element.
   *
   * If `value` is supplied (and not null/undefined), the rendered element will
   * not trigger updates to the element. Instead, the `value` prop must change in
   * order for the rendered element to be updated.
   *
   * The rendered element will be initialized with an empty value, the prop
   * `defaultValue` if specified, or the children content (deprecated).
   */
  function getHostProps$2(element, props) {
    var node = element;

    if (props.dangerouslySetInnerHTML != null) {
      throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.');
    } // Always set children to the same thing. In IE9, the selection range will
    // get reset if `textContent` is mutated.  We could add a check in setTextContent
    // to only set the value if/when the value differs from the node value (which would
    // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this
    // solution. The value can be a boolean or object so that's why it's forced
    // to be a string.


    var hostProps = assign({}, props, {
      value: undefined,
      defaultValue: undefined,
      children: toString(node._wrapperState.initialValue)
    });

    return hostProps;
  }
  function initWrapperState$2(element, props) {
    var node = element;

    {
      checkControlledValueProps('textarea', props);

      if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
        error('%s contains a textarea with both value and defaultValue props. ' + 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component');

        didWarnValDefaultVal = true;
      }
    }

    var initialValue = props.value; // Only bother fetching default value if we're going to use it

    if (initialValue == null) {
      var children = props.children,
          defaultValue = props.defaultValue;

      if (children != null) {
        {
          error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
        }

        {
          if (defaultValue != null) {
            throw new Error('If you supply `defaultValue` on a <textarea>, do not pass children.');
          }

          if (isArray(children)) {
            if (children.length > 1) {
              throw new Error('<textarea> can only have at most one child.');
            }

            children = children[0];
          }

          defaultValue = children;
        }
      }

      if (defaultValue == null) {
        defaultValue = '';
      }

      initialValue = defaultValue;
    }

    node._wrapperState = {
      initialValue: getToStringValue(initialValue)
    };
  }
  function updateWrapper$1(element, props) {
    var node = element;
    var value = getToStringValue(props.value);
    var defaultValue = getToStringValue(props.defaultValue);

    if (value != null) {
      // Cast `value` to a string to ensure the value is set correctly. While
      // browsers typically do this as necessary, jsdom doesn't.
      var newValue = toString(value); // To avoid side effects (such as losing text selection), only set value if changed

      if (newValue !== node.value) {
        node.value = newValue;
      }

      if (props.defaultValue == null && node.defaultValue !== newValue) {
        node.defaultValue = newValue;
      }
    }

    if (defaultValue != null) {
      node.defaultValue = toString(defaultValue);
    }
  }
  function postMountWrapper$3(element, props) {
    var node = element; // This is in postMount because we need access to the DOM node, which is not
    // available until after the component has mounted.

    var textContent = node.textContent; // Only set node.value if textContent is equal to the expected
    // initial value. In IE10/IE11 there is a bug where the placeholder attribute
    // will populate textContent as well.
    // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/

    if (textContent === node._wrapperState.initialValue) {
      if (textContent !== '' && textContent !== null) {
        node.value = textContent;
      }
    }
  }
  function restoreControlledState$2(element, props) {
    // DOM component is still mounted; update
    updateWrapper$1(element, props);
  }

  var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
  var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
  var SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; // Assumes there is no parent namespace.

  function getIntrinsicNamespace(type) {
    switch (type) {
      case 'svg':
        return SVG_NAMESPACE;

      case 'math':
        return MATH_NAMESPACE;

      default:
        return HTML_NAMESPACE;
    }
  }
  function getChildNamespace(parentNamespace, type) {
    if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {
      // No (or default) parent namespace: potential entry point.
      return getIntrinsicNamespace(type);
    }

    if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {
      // We're leaving SVG.
      return HTML_NAMESPACE;
    } // By default, pass namespace below.


    return parentNamespace;
  }

  /* globals MSApp */

  /**
   * Create a function which has 'unsafe' privileges (required by windows8 apps)
   */
  var createMicrosoftUnsafeLocalFunction = function (func) {
    if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
      return function (arg0, arg1, arg2, arg3) {
        MSApp.execUnsafeLocalFunction(function () {
          return func(arg0, arg1, arg2, arg3);
        });
      };
    } else {
      return func;
    }
  };

  var reusableSVGContainer;
  /**
   * Set the innerHTML property of a node
   *
   * @param {DOMElement} node
   * @param {string} html
   * @internal
   */

  var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
    if (node.namespaceURI === SVG_NAMESPACE) {

      if (!('innerHTML' in node)) {
        // IE does not have innerHTML for SVG nodes, so instead we inject the
        // new markup in a temp node and then move the child nodes across into
        // the target node
        reusableSVGContainer = reusableSVGContainer || document.createElement('div');
        reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>';
        var svgNode = reusableSVGContainer.firstChild;

        while (node.firstChild) {
          node.removeChild(node.firstChild);
        }

        while (svgNode.firstChild) {
          node.appendChild(svgNode.firstChild);
        }

        return;
      }
    }

    node.innerHTML = html;
  });

  /**
   * HTML nodeType values that represent the type of the node
   */
  var ELEMENT_NODE = 1;
  var TEXT_NODE = 3;
  var COMMENT_NODE = 8;
  var DOCUMENT_NODE = 9;
  var DOCUMENT_FRAGMENT_NODE = 11;

  /**
   * Set the textContent property of a node. For text updates, it's faster
   * to set the `nodeValue` of the Text node directly instead of using
   * `.textContent` which will remove the existing node and create a new one.
   *
   * @param {DOMElement} node
   * @param {string} text
   * @internal
   */

  var setTextContent = function (node, text) {
    if (text) {
      var firstChild = node.firstChild;

      if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {
        firstChild.nodeValue = text;
        return;
      }
    }

    node.textContent = text;
  };

  // List derived from Gecko source code:
  // https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js
  var shorthandToLonghand = {
    animation: ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction'],
    background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'],
    backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],
    border: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTopColor', 'borderTopStyle', 'borderTopWidth'],
    borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'],
    borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'],
    borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'],
    borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],
    borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'],
    borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'],
    borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'],
    borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'],
    borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'],
    borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'],
    borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'],
    borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'],
    borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'],
    columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'],
    columns: ['columnCount', 'columnWidth'],
    flex: ['flexBasis', 'flexGrow', 'flexShrink'],
    flexFlow: ['flexDirection', 'flexWrap'],
    font: ['fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontLanguageOverride', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition', 'fontWeight', 'lineHeight'],
    fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'],
    gap: ['columnGap', 'rowGap'],
    grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],
    gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'],
    gridColumn: ['gridColumnEnd', 'gridColumnStart'],
    gridColumnGap: ['columnGap'],
    gridGap: ['columnGap', 'rowGap'],
    gridRow: ['gridRowEnd', 'gridRowStart'],
    gridRowGap: ['rowGap'],
    gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],
    listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'],
    margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],
    marker: ['markerEnd', 'markerMid', 'markerStart'],
    mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY', 'maskRepeat', 'maskSize'],
    maskPosition: ['maskPositionX', 'maskPositionY'],
    outline: ['outlineColor', 'outlineStyle', 'outlineWidth'],
    overflow: ['overflowX', 'overflowY'],
    padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],
    placeContent: ['alignContent', 'justifyContent'],
    placeItems: ['alignItems', 'justifyItems'],
    placeSelf: ['alignSelf', 'justifySelf'],
    textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'],
    textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'],
    transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction'],
    wordWrap: ['overflowWrap']
  };

  /**
   * CSS properties which accept numbers but are not in units of "px".
   */
  var isUnitlessNumber = {
    animationIterationCount: true,
    aspectRatio: true,
    borderImageOutset: true,
    borderImageSlice: true,
    borderImageWidth: true,
    boxFlex: true,
    boxFlexGroup: true,
    boxOrdinalGroup: true,
    columnCount: true,
    columns: true,
    flex: true,
    flexGrow: true,
    flexPositive: true,
    flexShrink: true,
    flexNegative: true,
    flexOrder: true,
    gridArea: true,
    gridRow: true,
    gridRowEnd: true,
    gridRowSpan: true,
    gridRowStart: true,
    gridColumn: true,
    gridColumnEnd: true,
    gridColumnSpan: true,
    gridColumnStart: true,
    fontWeight: true,
    lineClamp: true,
    lineHeight: true,
    opacity: true,
    order: true,
    orphans: true,
    tabSize: true,
    widows: true,
    zIndex: true,
    zoom: true,
    // SVG-related properties
    fillOpacity: true,
    floodOpacity: true,
    stopOpacity: true,
    strokeDasharray: true,
    strokeDashoffset: true,
    strokeMiterlimit: true,
    strokeOpacity: true,
    strokeWidth: true
  };
  /**
   * @param {string} prefix vendor-specific prefix, eg: Webkit
   * @param {string} key style name, eg: transitionDuration
   * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
   * WebkitTransitionDuration
   */

  function prefixKey(prefix, key) {
    return prefix + key.charAt(0).toUpperCase() + key.substring(1);
  }
  /**
   * Support style names that may come passed in prefixed by adding permutations
   * of vendor prefixes.
   */


  var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
  // infinite loop, because it iterates over the newly added props too.

  Object.keys(isUnitlessNumber).forEach(function (prop) {
    prefixes.forEach(function (prefix) {
      isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
    });
  });

  /**
   * Convert a value into the proper css writable value. The style name `name`
   * should be logical (no hyphens), as specified
   * in `CSSProperty.isUnitlessNumber`.
   *
   * @param {string} name CSS property name such as `topMargin`.
   * @param {*} value CSS property value such as `10px`.
   * @return {string} Normalized style value with dimensions applied.
   */

  function dangerousStyleValue(name, value, isCustomProperty) {
    // Note that we've removed escapeTextForBrowser() calls here since the
    // whole string will be escaped when the attribute is injected into
    // the markup. If you provide unsafe user data here they can inject
    // arbitrary CSS which may be problematic (I couldn't repro this):
    // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
    // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
    // This is not an XSS hole but instead a potential CSS injection issue
    // which has lead to a greater discussion about how we're going to
    // trust URLs moving forward. See #2115901
    var isEmpty = value == null || typeof value === 'boolean' || value === '';

    if (isEmpty) {
      return '';
    }

    if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {
      return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
    }

    {
      checkCSSPropertyStringCoercion(value, name);
    }

    return ('' + value).trim();
  }

  var uppercasePattern = /([A-Z])/g;
  var msPattern = /^ms-/;
  /**
   * Hyphenates a camelcased CSS property name, for example:
   *
   *   > hyphenateStyleName('backgroundColor')
   *   < "background-color"
   *   > hyphenateStyleName('MozTransition')
   *   < "-moz-transition"
   *   > hyphenateStyleName('msTransition')
   *   < "-ms-transition"
   *
   * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
   * is converted to `-ms-`.
   */

  function hyphenateStyleName(name) {
    return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
  }

  var warnValidStyle = function () {};

  {
    // 'msTransform' is correct, but the other prefixes should be capitalized
    var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
    var msPattern$1 = /^-ms-/;
    var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon

    var badStyleValueWithSemicolonPattern = /;\s*$/;
    var warnedStyleNames = {};
    var warnedStyleValues = {};
    var warnedForNaNValue = false;
    var warnedForInfinityValue = false;

    var camelize = function (string) {
      return string.replace(hyphenPattern, function (_, character) {
        return character.toUpperCase();
      });
    };

    var warnHyphenatedStyleName = function (name) {
      if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
        return;
      }

      warnedStyleNames[name] = true;

      error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests
      // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
      // is converted to lowercase `ms`.
      camelize(name.replace(msPattern$1, 'ms-')));
    };

    var warnBadVendoredStyleName = function (name) {
      if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
        return;
      }

      warnedStyleNames[name] = true;

      error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));
    };

    var warnStyleValueWithSemicolon = function (name, value) {
      if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
        return;
      }

      warnedStyleValues[value] = true;

      error("Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
    };

    var warnStyleValueIsNaN = function (name, value) {
      if (warnedForNaNValue) {
        return;
      }

      warnedForNaNValue = true;

      error('`NaN` is an invalid value for the `%s` css style property.', name);
    };

    var warnStyleValueIsInfinity = function (name, value) {
      if (warnedForInfinityValue) {
        return;
      }

      warnedForInfinityValue = true;

      error('`Infinity` is an invalid value for the `%s` css style property.', name);
    };

    warnValidStyle = function (name, value) {
      if (name.indexOf('-') > -1) {
        warnHyphenatedStyleName(name);
      } else if (badVendoredStyleNamePattern.test(name)) {
        warnBadVendoredStyleName(name);
      } else if (badStyleValueWithSemicolonPattern.test(value)) {
        warnStyleValueWithSemicolon(name, value);
      }

      if (typeof value === 'number') {
        if (isNaN(value)) {
          warnStyleValueIsNaN(name, value);
        } else if (!isFinite(value)) {
          warnStyleValueIsInfinity(name, value);
        }
      }
    };
  }

  var warnValidStyle$1 = warnValidStyle;

  /**
   * Operations for dealing with CSS properties.
   */

  /**
   * This creates a string that is expected to be equivalent to the style
   * attribute generated by server-side rendering. It by-passes warnings and
   * security checks so it's not safe to use this value for anything other than
   * comparison. It is only used in DEV for SSR validation.
   */

  function createDangerousStringForStyles(styles) {
    {
      var serialized = '';
      var delimiter = '';

      for (var styleName in styles) {
        if (!styles.hasOwnProperty(styleName)) {
          continue;
        }

        var styleValue = styles[styleName];

        if (styleValue != null) {
          var isCustomProperty = styleName.indexOf('--') === 0;
          serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';
          serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);
          delimiter = ';';
        }
      }

      return serialized || null;
    }
  }
  /**
   * Sets the value for multiple styles on a node.  If a value is specified as
   * '' (empty string), the corresponding style property will be unset.
   *
   * @param {DOMElement} node
   * @param {object} styles
   */

  function setValueForStyles(node, styles) {
    var style = node.style;

    for (var styleName in styles) {
      if (!styles.hasOwnProperty(styleName)) {
        continue;
      }

      var isCustomProperty = styleName.indexOf('--') === 0;

      {
        if (!isCustomProperty) {
          warnValidStyle$1(styleName, styles[styleName]);
        }
      }

      var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);

      if (styleName === 'float') {
        styleName = 'cssFloat';
      }

      if (isCustomProperty) {
        style.setProperty(styleName, styleValue);
      } else {
        style[styleName] = styleValue;
      }
    }
  }

  function isValueEmpty(value) {
    return value == null || typeof value === 'boolean' || value === '';
  }
  /**
   * Given {color: 'red', overflow: 'hidden'} returns {
   *   color: 'color',
   *   overflowX: 'overflow',
   *   overflowY: 'overflow',
   * }. This can be read as "the overflowY property was set by the overflow
   * shorthand". That is, the values are the property that each was derived from.
   */


  function expandShorthandMap(styles) {
    var expanded = {};

    for (var key in styles) {
      var longhands = shorthandToLonghand[key] || [key];

      for (var i = 0; i < longhands.length; i++) {
        expanded[longhands[i]] = key;
      }
    }

    return expanded;
  }
  /**
   * When mixing shorthand and longhand property names, we warn during updates if
   * we expect an incorrect result to occur. In particular, we warn for:
   *
   * Updating a shorthand property (longhand gets overwritten):
   *   {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
   *   becomes .style.font = 'baz'
   * Removing a shorthand property (longhand gets lost too):
   *   {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}
   *   becomes .style.font = ''
   * Removing a longhand property (should revert to shorthand; doesn't):
   *   {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}
   *   becomes .style.fontVariant = ''
   */


  function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {
    {
      if (!nextStyles) {
        return;
      }

      var expandedUpdates = expandShorthandMap(styleUpdates);
      var expandedStyles = expandShorthandMap(nextStyles);
      var warnedAbout = {};

      for (var key in expandedUpdates) {
        var originalKey = expandedUpdates[key];
        var correctOriginalKey = expandedStyles[key];

        if (correctOriginalKey && originalKey !== correctOriginalKey) {
          var warningKey = originalKey + ',' + correctOriginalKey;

          if (warnedAbout[warningKey]) {
            continue;
          }

          warnedAbout[warningKey] = true;

          error('%s a style property during rerender (%s) when a ' + 'conflicting property is set (%s) can lead to styling bugs. To ' + "avoid this, don't mix shorthand and non-shorthand properties " + 'for the same value; instead, replace the shorthand with ' + 'separate values.', isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', originalKey, correctOriginalKey);
        }
      }
    }
  }

  // For HTML, certain tags should omit their close tag. We keep a list for
  // those special-case tags.
  var omittedCloseTags = {
    area: true,
    base: true,
    br: true,
    col: true,
    embed: true,
    hr: true,
    img: true,
    input: true,
    keygen: true,
    link: true,
    meta: true,
    param: true,
    source: true,
    track: true,
    wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.

  };

  // `omittedCloseTags` except that `menuitem` should still have its closing tag.

  var voidElementTags = assign({
    menuitem: true
  }, omittedCloseTags);

  var HTML = '__html';

  function assertValidProps(tag, props) {
    if (!props) {
      return;
    } // Note the use of `==` which checks for null or undefined.


    if (voidElementTags[tag]) {
      if (props.children != null || props.dangerouslySetInnerHTML != null) {
        throw new Error(tag + " is a void element tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.');
      }
    }

    if (props.dangerouslySetInnerHTML != null) {
      if (props.children != null) {
        throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.');
      }

      if (typeof props.dangerouslySetInnerHTML !== 'object' || !(HTML in props.dangerouslySetInnerHTML)) {
        throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.');
      }
    }

    {
      if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {
        error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.');
      }
    }

    if (props.style != null && typeof props.style !== 'object') {
      throw new Error('The `style` prop expects a mapping from style properties to values, ' + "not a string. For example, style={{marginRight: spacing + 'em'}} when " + 'using JSX.');
    }
  }

  function isCustomComponent(tagName, props) {
    if (tagName.indexOf('-') === -1) {
      return typeof props.is === 'string';
    }

    switch (tagName) {
      // These are reserved SVG and MathML elements.
      // We don't mind this list too much because we expect it to never grow.
      // The alternative is to track the namespace in a few places which is convoluted.
      // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
      case 'annotation-xml':
      case 'color-profile':
      case 'font-face':
      case 'font-face-src':
      case 'font-face-uri':
      case 'font-face-format':
      case 'font-face-name':
      case 'missing-glyph':
        return false;

      default:
        return true;
    }
  }

  // When adding attributes to the HTML or SVG allowed attribute list, be sure to
  // also add them to this module to ensure casing and incorrect name
  // warnings.
  var possibleStandardNames = {
    // HTML
    accept: 'accept',
    acceptcharset: 'acceptCharset',
    'accept-charset': 'acceptCharset',
    accesskey: 'accessKey',
    action: 'action',
    allowfullscreen: 'allowFullScreen',
    alt: 'alt',
    as: 'as',
    async: 'async',
    autocapitalize: 'autoCapitalize',
    autocomplete: 'autoComplete',
    autocorrect: 'autoCorrect',
    autofocus: 'autoFocus',
    autoplay: 'autoPlay',
    autosave: 'autoSave',
    capture: 'capture',
    cellpadding: 'cellPadding',
    cellspacing: 'cellSpacing',
    challenge: 'challenge',
    charset: 'charSet',
    checked: 'checked',
    children: 'children',
    cite: 'cite',
    class: 'className',
    classid: 'classID',
    classname: 'className',
    cols: 'cols',
    colspan: 'colSpan',
    content: 'content',
    contenteditable: 'contentEditable',
    contextmenu: 'contextMenu',
    controls: 'controls',
    controlslist: 'controlsList',
    coords: 'coords',
    crossorigin: 'crossOrigin',
    dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
    data: 'data',
    datetime: 'dateTime',
    default: 'default',
    defaultchecked: 'defaultChecked',
    defaultvalue: 'defaultValue',
    defer: 'defer',
    dir: 'dir',
    disabled: 'disabled',
    disablepictureinpicture: 'disablePictureInPicture',
    disableremoteplayback: 'disableRemotePlayback',
    download: 'download',
    draggable: 'draggable',
    enctype: 'encType',
    enterkeyhint: 'enterKeyHint',
    for: 'htmlFor',
    form: 'form',
    formmethod: 'formMethod',
    formaction: 'formAction',
    formenctype: 'formEncType',
    formnovalidate: 'formNoValidate',
    formtarget: 'formTarget',
    frameborder: 'frameBorder',
    headers: 'headers',
    height: 'height',
    hidden: 'hidden',
    high: 'high',
    href: 'href',
    hreflang: 'hrefLang',
    htmlfor: 'htmlFor',
    httpequiv: 'httpEquiv',
    'http-equiv': 'httpEquiv',
    icon: 'icon',
    id: 'id',
    imagesizes: 'imageSizes',
    imagesrcset: 'imageSrcSet',
    innerhtml: 'innerHTML',
    inputmode: 'inputMode',
    integrity: 'integrity',
    is: 'is',
    itemid: 'itemID',
    itemprop: 'itemProp',
    itemref: 'itemRef',
    itemscope: 'itemScope',
    itemtype: 'itemType',
    keyparams: 'keyParams',
    keytype: 'keyType',
    kind: 'kind',
    label: 'label',
    lang: 'lang',
    list: 'list',
    loop: 'loop',
    low: 'low',
    manifest: 'manifest',
    marginwidth: 'marginWidth',
    marginheight: 'marginHeight',
    max: 'max',
    maxlength: 'maxLength',
    media: 'media',
    mediagroup: 'mediaGroup',
    method: 'method',
    min: 'min',
    minlength: 'minLength',
    multiple: 'multiple',
    muted: 'muted',
    name: 'name',
    nomodule: 'noModule',
    nonce: 'nonce',
    novalidate: 'noValidate',
    open: 'open',
    optimum: 'optimum',
    pattern: 'pattern',
    placeholder: 'placeholder',
    playsinline: 'playsInline',
    poster: 'poster',
    preload: 'preload',
    profile: 'profile',
    radiogroup: 'radioGroup',
    readonly: 'readOnly',
    referrerpolicy: 'referrerPolicy',
    rel: 'rel',
    required: 'required',
    reversed: 'reversed',
    role: 'role',
    rows: 'rows',
    rowspan: 'rowSpan',
    sandbox: 'sandbox',
    scope: 'scope',
    scoped: 'scoped',
    scrolling: 'scrolling',
    seamless: 'seamless',
    selected: 'selected',
    shape: 'shape',
    size: 'size',
    sizes: 'sizes',
    span: 'span',
    spellcheck: 'spellCheck',
    src: 'src',
    srcdoc: 'srcDoc',
    srclang: 'srcLang',
    srcset: 'srcSet',
    start: 'start',
    step: 'step',
    style: 'style',
    summary: 'summary',
    tabindex: 'tabIndex',
    target: 'target',
    title: 'title',
    type: 'type',
    usemap: 'useMap',
    value: 'value',
    width: 'width',
    wmode: 'wmode',
    wrap: 'wrap',
    // SVG
    about: 'about',
    accentheight: 'accentHeight',
    'accent-height': 'accentHeight',
    accumulate: 'accumulate',
    additive: 'additive',
    alignmentbaseline: 'alignmentBaseline',
    'alignment-baseline': 'alignmentBaseline',
    allowreorder: 'allowReorder',
    alphabetic: 'alphabetic',
    amplitude: 'amplitude',
    arabicform: 'arabicForm',
    'arabic-form': 'arabicForm',
    ascent: 'ascent',
    attributename: 'attributeName',
    attributetype: 'attributeType',
    autoreverse: 'autoReverse',
    azimuth: 'azimuth',
    basefrequency: 'baseFrequency',
    baselineshift: 'baselineShift',
    'baseline-shift': 'baselineShift',
    baseprofile: 'baseProfile',
    bbox: 'bbox',
    begin: 'begin',
    bias: 'bias',
    by: 'by',
    calcmode: 'calcMode',
    capheight: 'capHeight',
    'cap-height': 'capHeight',
    clip: 'clip',
    clippath: 'clipPath',
    'clip-path': 'clipPath',
    clippathunits: 'clipPathUnits',
    cliprule: 'clipRule',
    'clip-rule': 'clipRule',
    color: 'color',
    colorinterpolation: 'colorInterpolation',
    'color-interpolation': 'colorInterpolation',
    colorinterpolationfilters: 'colorInterpolationFilters',
    'color-interpolation-filters': 'colorInterpolationFilters',
    colorprofile: 'colorProfile',
    'color-profile': 'colorProfile',
    colorrendering: 'colorRendering',
    'color-rendering': 'colorRendering',
    contentscripttype: 'contentScriptType',
    contentstyletype: 'contentStyleType',
    cursor: 'cursor',
    cx: 'cx',
    cy: 'cy',
    d: 'd',
    datatype: 'datatype',
    decelerate: 'decelerate',
    descent: 'descent',
    diffuseconstant: 'diffuseConstant',
    direction: 'direction',
    display: 'display',
    divisor: 'divisor',
    dominantbaseline: 'dominantBaseline',
    'dominant-baseline': 'dominantBaseline',
    dur: 'dur',
    dx: 'dx',
    dy: 'dy',
    edgemode: 'edgeMode',
    elevation: 'elevation',
    enablebackground: 'enableBackground',
    'enable-background': 'enableBackground',
    end: 'end',
    exponent: 'exponent',
    externalresourcesrequired: 'externalResourcesRequired',
    fill: 'fill',
    fillopacity: 'fillOpacity',
    'fill-opacity': 'fillOpacity',
    fillrule: 'fillRule',
    'fill-rule': 'fillRule',
    filter: 'filter',
    filterres: 'filterRes',
    filterunits: 'filterUnits',
    floodopacity: 'floodOpacity',
    'flood-opacity': 'floodOpacity',
    floodcolor: 'floodColor',
    'flood-color': 'floodColor',
    focusable: 'focusable',
    fontfamily: 'fontFamily',
    'font-family': 'fontFamily',
    fontsize: 'fontSize',
    'font-size': 'fontSize',
    fontsizeadjust: 'fontSizeAdjust',
    'font-size-adjust': 'fontSizeAdjust',
    fontstretch: 'fontStretch',
    'font-stretch': 'fontStretch',
    fontstyle: 'fontStyle',
    'font-style': 'fontStyle',
    fontvariant: 'fontVariant',
    'font-variant': 'fontVariant',
    fontweight: 'fontWeight',
    'font-weight': 'fontWeight',
    format: 'format',
    from: 'from',
    fx: 'fx',
    fy: 'fy',
    g1: 'g1',
    g2: 'g2',
    glyphname: 'glyphName',
    'glyph-name': 'glyphName',
    glyphorientationhorizontal: 'glyphOrientationHorizontal',
    'glyph-orientation-horizontal': 'glyphOrientationHorizontal',
    glyphorientationvertical: 'glyphOrientationVertical',
    'glyph-orientation-vertical': 'glyphOrientationVertical',
    glyphref: 'glyphRef',
    gradienttransform: 'gradientTransform',
    gradientunits: 'gradientUnits',
    hanging: 'hanging',
    horizadvx: 'horizAdvX',
    'horiz-adv-x': 'horizAdvX',
    horizoriginx: 'horizOriginX',
    'horiz-origin-x': 'horizOriginX',
    ideographic: 'ideographic',
    imagerendering: 'imageRendering',
    'image-rendering': 'imageRendering',
    in2: 'in2',
    in: 'in',
    inlist: 'inlist',
    intercept: 'intercept',
    k1: 'k1',
    k2: 'k2',
    k3: 'k3',
    k4: 'k4',
    k: 'k',
    kernelmatrix: 'kernelMatrix',
    kernelunitlength: 'kernelUnitLength',
    kerning: 'kerning',
    keypoints: 'keyPoints',
    keysplines: 'keySplines',
    keytimes: 'keyTimes',
    lengthadjust: 'lengthAdjust',
    letterspacing: 'letterSpacing',
    'letter-spacing': 'letterSpacing',
    lightingcolor: 'lightingColor',
    'lighting-color': 'lightingColor',
    limitingconeangle: 'limitingConeAngle',
    local: 'local',
    markerend: 'markerEnd',
    'marker-end': 'markerEnd',
    markerheight: 'markerHeight',
    markermid: 'markerMid',
    'marker-mid': 'markerMid',
    markerstart: 'markerStart',
    'marker-start': 'markerStart',
    markerunits: 'markerUnits',
    markerwidth: 'markerWidth',
    mask: 'mask',
    maskcontentunits: 'maskContentUnits',
    maskunits: 'maskUnits',
    mathematical: 'mathematical',
    mode: 'mode',
    numoctaves: 'numOctaves',
    offset: 'offset',
    opacity: 'opacity',
    operator: 'operator',
    order: 'order',
    orient: 'orient',
    orientation: 'orientation',
    origin: 'origin',
    overflow: 'overflow',
    overlineposition: 'overlinePosition',
    'overline-position': 'overlinePosition',
    overlinethickness: 'overlineThickness',
    'overline-thickness': 'overlineThickness',
    paintorder: 'paintOrder',
    'paint-order': 'paintOrder',
    panose1: 'panose1',
    'panose-1': 'panose1',
    pathlength: 'pathLength',
    patterncontentunits: 'patternContentUnits',
    patterntransform: 'patternTransform',
    patternunits: 'patternUnits',
    pointerevents: 'pointerEvents',
    'pointer-events': 'pointerEvents',
    points: 'points',
    pointsatx: 'pointsAtX',
    pointsaty: 'pointsAtY',
    pointsatz: 'pointsAtZ',
    prefix: 'prefix',
    preservealpha: 'preserveAlpha',
    preserveaspectratio: 'preserveAspectRatio',
    primitiveunits: 'primitiveUnits',
    property: 'property',
    r: 'r',
    radius: 'radius',
    refx: 'refX',
    refy: 'refY',
    renderingintent: 'renderingIntent',
    'rendering-intent': 'renderingIntent',
    repeatcount: 'repeatCount',
    repeatdur: 'repeatDur',
    requiredextensions: 'requiredExtensions',
    requiredfeatures: 'requiredFeatures',
    resource: 'resource',
    restart: 'restart',
    result: 'result',
    results: 'results',
    rotate: 'rotate',
    rx: 'rx',
    ry: 'ry',
    scale: 'scale',
    security: 'security',
    seed: 'seed',
    shaperendering: 'shapeRendering',
    'shape-rendering': 'shapeRendering',
    slope: 'slope',
    spacing: 'spacing',
    specularconstant: 'specularConstant',
    specularexponent: 'specularExponent',
    speed: 'speed',
    spreadmethod: 'spreadMethod',
    startoffset: 'startOffset',
    stddeviation: 'stdDeviation',
    stemh: 'stemh',
    stemv: 'stemv',
    stitchtiles: 'stitchTiles',
    stopcolor: 'stopColor',
    'stop-color': 'stopColor',
    stopopacity: 'stopOpacity',
    'stop-opacity': 'stopOpacity',
    strikethroughposition: 'strikethroughPosition',
    'strikethrough-position': 'strikethroughPosition',
    strikethroughthickness: 'strikethroughThickness',
    'strikethrough-thickness': 'strikethroughThickness',
    string: 'string',
    stroke: 'stroke',
    strokedasharray: 'strokeDasharray',
    'stroke-dasharray': 'strokeDasharray',
    strokedashoffset: 'strokeDashoffset',
    'stroke-dashoffset': 'strokeDashoffset',
    strokelinecap: 'strokeLinecap',
    'stroke-linecap': 'strokeLinecap',
    strokelinejoin: 'strokeLinejoin',
    'stroke-linejoin': 'strokeLinejoin',
    strokemiterlimit: 'strokeMiterlimit',
    'stroke-miterlimit': 'strokeMiterlimit',
    strokewidth: 'strokeWidth',
    'stroke-width': 'strokeWidth',
    strokeopacity: 'strokeOpacity',
    'stroke-opacity': 'strokeOpacity',
    suppresscontenteditablewarning: 'suppressContentEditableWarning',
    suppresshydrationwarning: 'suppressHydrationWarning',
    surfacescale: 'surfaceScale',
    systemlanguage: 'systemLanguage',
    tablevalues: 'tableValues',
    targetx: 'targetX',
    targety: 'targetY',
    textanchor: 'textAnchor',
    'text-anchor': 'textAnchor',
    textdecoration: 'textDecoration',
    'text-decoration': 'textDecoration',
    textlength: 'textLength',
    textrendering: 'textRendering',
    'text-rendering': 'textRendering',
    to: 'to',
    transform: 'transform',
    typeof: 'typeof',
    u1: 'u1',
    u2: 'u2',
    underlineposition: 'underlinePosition',
    'underline-position': 'underlinePosition',
    underlinethickness: 'underlineThickness',
    'underline-thickness': 'underlineThickness',
    unicode: 'unicode',
    unicodebidi: 'unicodeBidi',
    'unicode-bidi': 'unicodeBidi',
    unicoderange: 'unicodeRange',
    'unicode-range': 'unicodeRange',
    unitsperem: 'unitsPerEm',
    'units-per-em': 'unitsPerEm',
    unselectable: 'unselectable',
    valphabetic: 'vAlphabetic',
    'v-alphabetic': 'vAlphabetic',
    values: 'values',
    vectoreffect: 'vectorEffect',
    'vector-effect': 'vectorEffect',
    version: 'version',
    vertadvy: 'vertAdvY',
    'vert-adv-y': 'vertAdvY',
    vertoriginx: 'vertOriginX',
    'vert-origin-x': 'vertOriginX',
    vertoriginy: 'vertOriginY',
    'vert-origin-y': 'vertOriginY',
    vhanging: 'vHanging',
    'v-hanging': 'vHanging',
    videographic: 'vIdeographic',
    'v-ideographic': 'vIdeographic',
    viewbox: 'viewBox',
    viewtarget: 'viewTarget',
    visibility: 'visibility',
    vmathematical: 'vMathematical',
    'v-mathematical': 'vMathematical',
    vocab: 'vocab',
    widths: 'widths',
    wordspacing: 'wordSpacing',
    'word-spacing': 'wordSpacing',
    writingmode: 'writingMode',
    'writing-mode': 'writingMode',
    x1: 'x1',
    x2: 'x2',
    x: 'x',
    xchannelselector: 'xChannelSelector',
    xheight: 'xHeight',
    'x-height': 'xHeight',
    xlinkactuate: 'xlinkActuate',
    'xlink:actuate': 'xlinkActuate',
    xlinkarcrole: 'xlinkArcrole',
    'xlink:arcrole': 'xlinkArcrole',
    xlinkhref: 'xlinkHref',
    'xlink:href': 'xlinkHref',
    xlinkrole: 'xlinkRole',
    'xlink:role': 'xlinkRole',
    xlinkshow: 'xlinkShow',
    'xlink:show': 'xlinkShow',
    xlinktitle: 'xlinkTitle',
    'xlink:title': 'xlinkTitle',
    xlinktype: 'xlinkType',
    'xlink:type': 'xlinkType',
    xmlbase: 'xmlBase',
    'xml:base': 'xmlBase',
    xmllang: 'xmlLang',
    'xml:lang': 'xmlLang',
    xmlns: 'xmlns',
    'xml:space': 'xmlSpace',
    xmlnsxlink: 'xmlnsXlink',
    'xmlns:xlink': 'xmlnsXlink',
    xmlspace: 'xmlSpace',
    y1: 'y1',
    y2: 'y2',
    y: 'y',
    ychannelselector: 'yChannelSelector',
    z: 'z',
    zoomandpan: 'zoomAndPan'
  };

  var ariaProperties = {
    'aria-current': 0,
    // state
    'aria-description': 0,
    'aria-details': 0,
    'aria-disabled': 0,
    // state
    'aria-hidden': 0,
    // state
    'aria-invalid': 0,
    // state
    'aria-keyshortcuts': 0,
    'aria-label': 0,
    'aria-roledescription': 0,
    // Widget Attributes
    'aria-autocomplete': 0,
    'aria-checked': 0,
    'aria-expanded': 0,
    'aria-haspopup': 0,
    'aria-level': 0,
    'aria-modal': 0,
    'aria-multiline': 0,
    'aria-multiselectable': 0,
    'aria-orientation': 0,
    'aria-placeholder': 0,
    'aria-pressed': 0,
    'aria-readonly': 0,
    'aria-required': 0,
    'aria-selected': 0,
    'aria-sort': 0,
    'aria-valuemax': 0,
    'aria-valuemin': 0,
    'aria-valuenow': 0,
    'aria-valuetext': 0,
    // Live Region Attributes
    'aria-atomic': 0,
    'aria-busy': 0,
    'aria-live': 0,
    'aria-relevant': 0,
    // Drag-and-Drop Attributes
    'aria-dropeffect': 0,
    'aria-grabbed': 0,
    // Relationship Attributes
    'aria-activedescendant': 0,
    'aria-colcount': 0,
    'aria-colindex': 0,
    'aria-colspan': 0,
    'aria-controls': 0,
    'aria-describedby': 0,
    'aria-errormessage': 0,
    'aria-flowto': 0,
    'aria-labelledby': 0,
    'aria-owns': 0,
    'aria-posinset': 0,
    'aria-rowcount': 0,
    'aria-rowindex': 0,
    'aria-rowspan': 0,
    'aria-setsize': 0
  };

  var warnedProperties = {};
  var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
  var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');

  function validateProperty(tagName, name) {
    {
      if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) {
        return true;
      }

      if (rARIACamel.test(name)) {
        var ariaName = 'aria-' + name.slice(4).toLowerCase();
        var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM
        // DOM properties, then it is an invalid aria-* attribute.

        if (correctName == null) {
          error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);

          warnedProperties[name] = true;
          return true;
        } // aria-* attributes should be lowercase; suggest the lowercase version.


        if (name !== correctName) {
          error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);

          warnedProperties[name] = true;
          return true;
        }
      }

      if (rARIA.test(name)) {
        var lowerCasedName = name.toLowerCase();
        var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM
        // DOM properties, then it is an invalid aria-* attribute.

        if (standardName == null) {
          warnedProperties[name] = true;
          return false;
        } // aria-* attributes should be lowercase; suggest the lowercase version.


        if (name !== standardName) {
          error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);

          warnedProperties[name] = true;
          return true;
        }
      }
    }

    return true;
  }

  function warnInvalidARIAProps(type, props) {
    {
      var invalidProps = [];

      for (var key in props) {
        var isValid = validateProperty(type, key);

        if (!isValid) {
          invalidProps.push(key);
        }
      }

      var unknownPropString = invalidProps.map(function (prop) {
        return '`' + prop + '`';
      }).join(', ');

      if (invalidProps.length === 1) {
        error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
      } else if (invalidProps.length > 1) {
        error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
      }
    }
  }

  function validateProperties(type, props) {
    if (isCustomComponent(type, props)) {
      return;
    }

    warnInvalidARIAProps(type, props);
  }

  var didWarnValueNull = false;
  function validateProperties$1(type, props) {
    {
      if (type !== 'input' && type !== 'textarea' && type !== 'select') {
        return;
      }

      if (props != null && props.value === null && !didWarnValueNull) {
        didWarnValueNull = true;

        if (type === 'select' && props.multiple) {
          error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);
        } else {
          error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
        }
      }
    }
  }

  var validateProperty$1 = function () {};

  {
    var warnedProperties$1 = {};
    var EVENT_NAME_REGEX = /^on./;
    var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;
    var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
    var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');

    validateProperty$1 = function (tagName, name, value, eventRegistry) {
      if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
        return true;
      }

      var lowerCasedName = name.toLowerCase();

      if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
        error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');

        warnedProperties$1[name] = true;
        return true;
      } // We can't rely on the event system being injected on the server.


      if (eventRegistry != null) {
        var registrationNameDependencies = eventRegistry.registrationNameDependencies,
            possibleRegistrationNames = eventRegistry.possibleRegistrationNames;

        if (registrationNameDependencies.hasOwnProperty(name)) {
          return true;
        }

        var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;

        if (registrationName != null) {
          error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);

          warnedProperties$1[name] = true;
          return true;
        }

        if (EVENT_NAME_REGEX.test(name)) {
          error('Unknown event handler property `%s`. It will be ignored.', name);

          warnedProperties$1[name] = true;
          return true;
        }
      } else if (EVENT_NAME_REGEX.test(name)) {
        // If no event plugins have been injected, we are in a server environment.
        // So we can't tell if the event name is correct for sure, but we can filter
        // out known bad ones like `onclick`. We can't suggest a specific replacement though.
        if (INVALID_EVENT_NAME_REGEX.test(name)) {
          error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
        }

        warnedProperties$1[name] = true;
        return true;
      } // Let the ARIA attribute hook validate ARIA attributes


      if (rARIA$1.test(name) || rARIACamel$1.test(name)) {
        return true;
      }

      if (lowerCasedName === 'innerhtml') {
        error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');

        warnedProperties$1[name] = true;
        return true;
      }

      if (lowerCasedName === 'aria') {
        error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');

        warnedProperties$1[name] = true;
        return true;
      }

      if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {
        error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);

        warnedProperties$1[name] = true;
        return true;
      }

      if (typeof value === 'number' && isNaN(value)) {
        error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);

        warnedProperties$1[name] = true;
        return true;
      }

      var propertyInfo = getPropertyInfo(name);
      var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.

      if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
        var standardName = possibleStandardNames[lowerCasedName];

        if (standardName !== name) {
          error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);

          warnedProperties$1[name] = true;
          return true;
        }
      } else if (!isReserved && name !== lowerCasedName) {
        // Unknown attributes should have lowercase casing since that's how they
        // will be cased anyway with server rendering.
        error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);

        warnedProperties$1[name] = true;
        return true;
      }

      if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
        if (value) {
          error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.', value, name, name, value, name);
        } else {
          error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);
        }

        warnedProperties$1[name] = true;
        return true;
      } // Now that we've validated casing, do not validate
      // data types for reserved props


      if (isReserved) {
        return true;
      } // Warn when a known attribute is a bad type


      if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
        warnedProperties$1[name] = true;
        return false;
      } // Warn when passing the strings 'false' or 'true' into a boolean prop


      if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
        error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string "false".', name, value);

        warnedProperties$1[name] = true;
        return true;
      }

      return true;
    };
  }

  var warnUnknownProperties = function (type, props, eventRegistry) {
    {
      var unknownProps = [];

      for (var key in props) {
        var isValid = validateProperty$1(type, key, props[key], eventRegistry);

        if (!isValid) {
          unknownProps.push(key);
        }
      }

      var unknownPropString = unknownProps.map(function (prop) {
        return '`' + prop + '`';
      }).join(', ');

      if (unknownProps.length === 1) {
        error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
      } else if (unknownProps.length > 1) {
        error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
      }
    }
  };

  function validateProperties$2(type, props, eventRegistry) {
    if (isCustomComponent(type, props)) {
      return;
    }

    warnUnknownProperties(type, props, eventRegistry);
  }

  var IS_EVENT_HANDLE_NON_MANAGED_NODE = 1;
  var IS_NON_DELEGATED = 1 << 1;
  var IS_CAPTURE_PHASE = 1 << 2;
  // set to LEGACY_FB_SUPPORT. LEGACY_FB_SUPPORT only gets set when
  // we call willDeferLaterForLegacyFBSupport, thus not bailing out
  // will result in endless cycles like an infinite loop.
  // We also don't want to defer during event replaying.

  var SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS = IS_EVENT_HANDLE_NON_MANAGED_NODE | IS_NON_DELEGATED | IS_CAPTURE_PHASE;

  // This exists to avoid circular dependency between ReactDOMEventReplaying
  // and DOMPluginEventSystem.
  var currentReplayingEvent = null;
  function setReplayingEvent(event) {
    {
      if (currentReplayingEvent !== null) {
        error('Expected currently replaying event to be null. This error ' + 'is likely caused by a bug in React. Please file an issue.');
      }
    }

    currentReplayingEvent = event;
  }
  function resetReplayingEvent() {
    {
      if (currentReplayingEvent === null) {
        error('Expected currently replaying event to not be null. This error ' + 'is likely caused by a bug in React. Please file an issue.');
      }
    }

    currentReplayingEvent = null;
  }
  function isReplayingEvent(event) {
    return event === currentReplayingEvent;
  }

  /**
   * Gets the target node from a native browser event by accounting for
   * inconsistencies in browser DOM APIs.
   *
   * @param {object} nativeEvent Native browser event.
   * @return {DOMEventTarget} Target node.
   */

  function getEventTarget(nativeEvent) {
    // Fallback to nativeEvent.srcElement for IE9
    // https://github.com/facebook/react/issues/12506
    var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963

    if (target.correspondingUseElement) {
      target = target.correspondingUseElement;
    } // Safari may fire events on text nodes (Node.TEXT_NODE is 3).
    // @see http://www.quirksmode.org/js/events_properties.html


    return target.nodeType === TEXT_NODE ? target.parentNode : target;
  }

  var restoreImpl = null;
  var restoreTarget = null;
  var restoreQueue = null;

  function restoreStateOfTarget(target) {
    // We perform this translation at the end of the event loop so that we
    // always receive the correct fiber here
    var internalInstance = getInstanceFromNode(target);

    if (!internalInstance) {
      // Unmounted
      return;
    }

    if (typeof restoreImpl !== 'function') {
      throw new Error('setRestoreImplementation() needs to be called to handle a target for controlled ' + 'events. This error is likely caused by a bug in React. Please file an issue.');
    }

    var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.

    if (stateNode) {
      var _props = getFiberCurrentPropsFromNode(stateNode);

      restoreImpl(internalInstance.stateNode, internalInstance.type, _props);
    }
  }

  function setRestoreImplementation(impl) {
    restoreImpl = impl;
  }
  function enqueueStateRestore(target) {
    if (restoreTarget) {
      if (restoreQueue) {
        restoreQueue.push(target);
      } else {
        restoreQueue = [target];
      }
    } else {
      restoreTarget = target;
    }
  }
  function needsStateRestore() {
    return restoreTarget !== null || restoreQueue !== null;
  }
  function restoreStateIfNeeded() {
    if (!restoreTarget) {
      return;
    }

    var target = restoreTarget;
    var queuedTargets = restoreQueue;
    restoreTarget = null;
    restoreQueue = null;
    restoreStateOfTarget(target);

    if (queuedTargets) {
      for (var i = 0; i < queuedTargets.length; i++) {
        restoreStateOfTarget(queuedTargets[i]);
      }
    }
  }

  // the renderer. Such as when we're dispatching events or if third party
  // libraries need to call batchedUpdates. Eventually, this API will go away when
  // everything is batched by default. We'll then have a similar API to opt-out of
  // scheduled work and instead do synchronous work.
  // Defaults

  var batchedUpdatesImpl = function (fn, bookkeeping) {
    return fn(bookkeeping);
  };

  var flushSyncImpl = function () {};

  var isInsideEventHandler = false;

  function finishEventHandler() {
    // Here we wait until all updates have propagated, which is important
    // when using controlled components within layers:
    // https://github.com/facebook/react/issues/1698
    // Then we restore state of any controlled component.
    var controlledComponentsHavePendingUpdates = needsStateRestore();

    if (controlledComponentsHavePendingUpdates) {
      // If a controlled event was fired, we may need to restore the state of
      // the DOM node back to the controlled value. This is necessary when React
      // bails out of the update without touching the DOM.
      // TODO: Restore state in the microtask, after the discrete updates flush,
      // instead of early flushing them here.
      flushSyncImpl();
      restoreStateIfNeeded();
    }
  }

  function batchedUpdates(fn, a, b) {
    if (isInsideEventHandler) {
      // If we are currently inside another batch, we need to wait until it
      // fully completes before restoring state.
      return fn(a, b);
    }

    isInsideEventHandler = true;

    try {
      return batchedUpdatesImpl(fn, a, b);
    } finally {
      isInsideEventHandler = false;
      finishEventHandler();
    }
  } // TODO: Replace with flushSync
  function setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushSyncImpl) {
    batchedUpdatesImpl = _batchedUpdatesImpl;
    flushSyncImpl = _flushSyncImpl;
  }

  function isInteractive(tag) {
    return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
  }

  function shouldPreventMouseEvent(name, type, props) {
    switch (name) {
      case 'onClick':
      case 'onClickCapture':
      case 'onDoubleClick':
      case 'onDoubleClickCapture':
      case 'onMouseDown':
      case 'onMouseDownCapture':
      case 'onMouseMove':
      case 'onMouseMoveCapture':
      case 'onMouseUp':
      case 'onMouseUpCapture':
      case 'onMouseEnter':
        return !!(props.disabled && isInteractive(type));

      default:
        return false;
    }
  }
  /**
   * @param {object} inst The instance, which is the source of events.
   * @param {string} registrationName Name of listener (e.g. `onClick`).
   * @return {?function} The stored callback.
   */


  function getListener(inst, registrationName) {
    var stateNode = inst.stateNode;

    if (stateNode === null) {
      // Work in progress (ex: onload events in incremental mode).
      return null;
    }

    var props = getFiberCurrentPropsFromNode(stateNode);

    if (props === null) {
      // Work in progress.
      return null;
    }

    var listener = props[registrationName];

    if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
      return null;
    }

    if (listener && typeof listener !== 'function') {
      throw new Error("Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type.");
    }

    return listener;
  }

  var passiveBrowserEventsSupported = false; // Check if browser support events with passive listeners
  // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support

  if (canUseDOM) {
    try {
      var options = {}; // $FlowFixMe: Ignore Flow complaining about needing a value

      Object.defineProperty(options, 'passive', {
        get: function () {
          passiveBrowserEventsSupported = true;
        }
      });
      window.addEventListener('test', options, options);
      window.removeEventListener('test', options, options);
    } catch (e) {
      passiveBrowserEventsSupported = false;
    }
  }

  function invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) {
    var funcArgs = Array.prototype.slice.call(arguments, 3);

    try {
      func.apply(context, funcArgs);
    } catch (error) {
      this.onError(error);
    }
  }

  var invokeGuardedCallbackImpl = invokeGuardedCallbackProd;

  {
    // In DEV mode, we swap out invokeGuardedCallback for a special version
    // that plays more nicely with the browser's DevTools. The idea is to preserve
    // "Pause on exceptions" behavior. Because React wraps all user-provided
    // functions in invokeGuardedCallback, and the production version of
    // invokeGuardedCallback uses a try-catch, all user exceptions are treated
    // like caught exceptions, and the DevTools won't pause unless the developer
    // takes the extra step of enabling pause on caught exceptions. This is
    // unintuitive, though, because even though React has caught the error, from
    // the developer's perspective, the error is uncaught.
    //
    // To preserve the expected "Pause on exceptions" behavior, we don't use a
    // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
    // DOM node, and call the user-provided callback from inside an event handler
    // for that fake event. If the callback throws, the error is "captured" using
    // a global event handler. But because the error happens in a different
    // event loop context, it does not interrupt the normal program flow.
    // Effectively, this gives us try-catch behavior without actually using
    // try-catch. Neat!
    // Check that the browser supports the APIs we need to implement our special
    // DEV version of invokeGuardedCallback
    if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
      var fakeNode = document.createElement('react');

      invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(name, func, context, a, b, c, d, e, f) {
        // If document doesn't exist we know for sure we will crash in this method
        // when we call document.createEvent(). However this can cause confusing
        // errors: https://github.com/facebook/create-react-app/issues/3482
        // So we preemptively throw with a better message instead.
        if (typeof document === 'undefined' || document === null) {
          throw new Error('The `document` global was defined when React was initialized, but is not ' + 'defined anymore. This can happen in a test environment if a component ' + 'schedules an update from an asynchronous callback, but the test has already ' + 'finished running. To solve this, you can either unmount the component at ' + 'the end of your test (and ensure that any asynchronous operations get ' + 'canceled in `componentWillUnmount`), or you can change the test itself ' + 'to be asynchronous.');
        }

        var evt = document.createEvent('Event');
        var didCall = false; // Keeps track of whether the user-provided callback threw an error. We
        // set this to true at the beginning, then set it to false right after
        // calling the function. If the function errors, `didError` will never be
        // set to false. This strategy works even if the browser is flaky and
        // fails to call our global error handler, because it doesn't rely on
        // the error event at all.

        var didError = true; // Keeps track of the value of window.event so that we can reset it
        // during the callback to let user code access window.event in the
        // browsers that support it.

        var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event
        // dispatching: https://github.com/facebook/react/issues/13688

        var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event');

        function restoreAfterDispatch() {
          // We immediately remove the callback from event listeners so that
          // nested `invokeGuardedCallback` calls do not clash. Otherwise, a
          // nested call would trigger the fake event handlers of any call higher
          // in the stack.
          fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the
          // window.event assignment in both IE <= 10 as they throw an error
          // "Member not found" in strict mode, and in Firefox which does not
          // support window.event.

          if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {
            window.event = windowEvent;
          }
        } // Create an event handler for our fake event. We will synchronously
        // dispatch our fake event using `dispatchEvent`. Inside the handler, we
        // call the user-provided callback.


        var funcArgs = Array.prototype.slice.call(arguments, 3);

        function callCallback() {
          didCall = true;
          restoreAfterDispatch();
          func.apply(context, funcArgs);
          didError = false;
        } // Create a global error event handler. We use this to capture the value
        // that was thrown. It's possible that this error handler will fire more
        // than once; for example, if non-React code also calls `dispatchEvent`
        // and a handler for that event throws. We should be resilient to most of
        // those cases. Even if our error event handler fires more than once, the
        // last error event is always used. If the callback actually does error,
        // we know that the last error event is the correct one, because it's not
        // possible for anything else to have happened in between our callback
        // erroring and the code that follows the `dispatchEvent` call below. If
        // the callback doesn't error, but the error event was fired, we know to
        // ignore it because `didError` will be false, as described above.


        var error; // Use this to track whether the error event is ever called.

        var didSetError = false;
        var isCrossOriginError = false;

        function handleWindowError(event) {
          error = event.error;
          didSetError = true;

          if (error === null && event.colno === 0 && event.lineno === 0) {
            isCrossOriginError = true;
          }

          if (event.defaultPrevented) {
            // Some other error handler has prevented default.
            // Browsers silence the error report if this happens.
            // We'll remember this to later decide whether to log it or not.
            if (error != null && typeof error === 'object') {
              try {
                error._suppressLogging = true;
              } catch (inner) {// Ignore.
              }
            }
          }
        } // Create a fake event type.


        var evtType = "react-" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers

        window.addEventListener('error', handleWindowError);
        fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function
        // errors, it will trigger our global error handler.

        evt.initEvent(evtType, false, false);
        fakeNode.dispatchEvent(evt);

        if (windowEventDescriptor) {
          Object.defineProperty(window, 'event', windowEventDescriptor);
        }

        if (didCall && didError) {
          if (!didSetError) {
            // The callback errored, but the error event never fired.
            // eslint-disable-next-line react-internal/prod-error-codes
            error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');
          } else if (isCrossOriginError) {
            // eslint-disable-next-line react-internal/prod-error-codes
            error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://reactjs.org/link/crossorigin-error for more information.');
          }

          this.onError(error);
        } // Remove our event listeners


        window.removeEventListener('error', handleWindowError);

        if (!didCall) {
          // Something went really wrong, and our event was not dispatched.
          // https://github.com/facebook/react/issues/16734
          // https://github.com/facebook/react/issues/16585
          // Fall back to the production implementation.
          restoreAfterDispatch();
          return invokeGuardedCallbackProd.apply(this, arguments);
        }
      };
    }
  }

  var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;

  var hasError = false;
  var caughtError = null; // Used by event system to capture/rethrow the first error.

  var hasRethrowError = false;
  var rethrowError = null;
  var reporter = {
    onError: function (error) {
      hasError = true;
      caughtError = error;
    }
  };
  /**
   * Call a function while guarding against errors that happens within it.
   * Returns an error if it throws, otherwise null.
   *
   * In production, this is implemented using a try-catch. The reason we don't
   * use a try-catch directly is so that we can swap out a different
   * implementation in DEV mode.
   *
   * @param {String} name of the guard to use for logging or debugging
   * @param {Function} func The function to invoke
   * @param {*} context The context to use when calling the function
   * @param {...*} args Arguments for function
   */

  function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
    hasError = false;
    caughtError = null;
    invokeGuardedCallbackImpl$1.apply(reporter, arguments);
  }
  /**
   * Same as invokeGuardedCallback, but instead of returning an error, it stores
   * it in a global so it can be rethrown by `rethrowCaughtError` later.
   * TODO: See if caughtError and rethrowError can be unified.
   *
   * @param {String} name of the guard to use for logging or debugging
   * @param {Function} func The function to invoke
   * @param {*} context The context to use when calling the function
   * @param {...*} args Arguments for function
   */

  function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
    invokeGuardedCallback.apply(this, arguments);

    if (hasError) {
      var error = clearCaughtError();

      if (!hasRethrowError) {
        hasRethrowError = true;
        rethrowError = error;
      }
    }
  }
  /**
   * During execution of guarded functions we will capture the first error which
   * we will rethrow to be handled by the top level error handler.
   */

  function rethrowCaughtError() {
    if (hasRethrowError) {
      var error = rethrowError;
      hasRethrowError = false;
      rethrowError = null;
      throw error;
    }
  }
  function hasCaughtError() {
    return hasError;
  }
  function clearCaughtError() {
    if (hasError) {
      var error = caughtError;
      hasError = false;
      caughtError = null;
      return error;
    } else {
      throw new Error('clearCaughtError was called but no error was captured. This error ' + 'is likely caused by a bug in React. Please file an issue.');
    }
  }

  var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
  var _ReactInternals$Sched = ReactInternals.Scheduler,
      unstable_cancelCallback = _ReactInternals$Sched.unstable_cancelCallback,
      unstable_now = _ReactInternals$Sched.unstable_now,
      unstable_scheduleCallback = _ReactInternals$Sched.unstable_scheduleCallback,
      unstable_shouldYield = _ReactInternals$Sched.unstable_shouldYield,
      unstable_requestPaint = _ReactInternals$Sched.unstable_requestPaint,
      unstable_getFirstCallbackNode = _ReactInternals$Sched.unstable_getFirstCallbackNode,
      unstable_runWithPriority = _ReactInternals$Sched.unstable_runWithPriority,
      unstable_next = _ReactInternals$Sched.unstable_next,
      unstable_continueExecution = _ReactInternals$Sched.unstable_continueExecution,
      unstable_pauseExecution = _ReactInternals$Sched.unstable_pauseExecution,
      unstable_getCurrentPriorityLevel = _ReactInternals$Sched.unstable_getCurrentPriorityLevel,
      unstable_ImmediatePriority = _ReactInternals$Sched.unstable_ImmediatePriority,
      unstable_UserBlockingPriority = _ReactInternals$Sched.unstable_UserBlockingPriority,
      unstable_NormalPriority = _ReactInternals$Sched.unstable_NormalPriority,
      unstable_LowPriority = _ReactInternals$Sched.unstable_LowPriority,
      unstable_IdlePriority = _ReactInternals$Sched.unstable_IdlePriority,
      unstable_forceFrameRate = _ReactInternals$Sched.unstable_forceFrameRate,
      unstable_flushAllWithoutAsserting = _ReactInternals$Sched.unstable_flushAllWithoutAsserting,
      unstable_yieldValue = _ReactInternals$Sched.unstable_yieldValue,
      unstable_setDisableYieldValue = _ReactInternals$Sched.unstable_setDisableYieldValue;

  /**
   * `ReactInstanceMap` maintains a mapping from a public facing stateful
   * instance (key) and the internal representation (value). This allows public
   * methods to accept the user facing instance as an argument and map them back
   * to internal methods.
   *
   * Note that this module is currently shared and assumed to be stateless.
   * If this becomes an actual Map, that will break.
   */
  function get(key) {
    return key._reactInternals;
  }
  function has(key) {
    return key._reactInternals !== undefined;
  }
  function set(key, value) {
    key._reactInternals = value;
  }

  // Don't change these two values. They're used by React Dev Tools.
  var NoFlags =
  /*                      */
  0;
  var PerformedWork =
  /*                */
  1; // You can change the rest (and add more).

  var Placement =
  /*                    */
  2;
  var Update =
  /*                       */
  4;
  var ChildDeletion =
  /*                */
  16;
  var ContentReset =
  /*                 */
  32;
  var Callback =
  /*                     */
  64;
  var DidCapture =
  /*                   */
  128;
  var ForceClientRender =
  /*            */
  256;
  var Ref =
  /*                          */
  512;
  var Snapshot =
  /*                     */
  1024;
  var Passive =
  /*                      */
  2048;
  var Hydrating =
  /*                    */
  4096;
  var Visibility =
  /*                   */
  8192;
  var StoreConsistency =
  /*             */
  16384;
  var LifecycleEffectMask = Passive | Update | Callback | Ref | Snapshot | StoreConsistency; // Union of all commit flags (flags with the lifetime of a particular commit)

  var HostEffectMask =
  /*               */
  32767; // These are not really side effects, but we still reuse this field.

  var Incomplete =
  /*                   */
  32768;
  var ShouldCapture =
  /*                */
  65536;
  var ForceUpdateForLegacySuspense =
  /* */
  131072;
  var Forked =
  /*                       */
  1048576; // Static tags describe aspects of a fiber that are not specific to a render,
  // e.g. a fiber uses a passive effect (even if there are no updates on this particular render).
  // This enables us to defer more work in the unmount case,
  // since we can defer traversing the tree during layout to look for Passive effects,
  // and instead rely on the static flag as a signal that there may be cleanup work.

  var RefStatic =
  /*                    */
  2097152;
  var LayoutStatic =
  /*                 */
  4194304;
  var PassiveStatic =
  /*                */
  8388608; // These flags allow us to traverse to fibers that have effects on mount
  // without traversing the entire tree after every commit for
  // double invoking

  var MountLayoutDev =
  /*               */
  16777216;
  var MountPassiveDev =
  /*              */
  33554432; // Groups of flags that are used in the commit phase to skip over trees that
  // don't contain effects, by checking subtreeFlags.

  var BeforeMutationMask = // TODO: Remove Update flag from before mutation phase by re-landing Visibility
  // flag logic (see #20043)
  Update | Snapshot | ( 0);
  var MutationMask = Placement | Update | ChildDeletion | ContentReset | Ref | Hydrating | Visibility;
  var LayoutMask = Update | Callback | Ref | Visibility; // TODO: Split into PassiveMountMask and PassiveUnmountMask

  var PassiveMask = Passive | ChildDeletion; // Union of tags that don't get reset on clones.
  // This allows certain concepts to persist without recalculating them,
  // e.g. whether a subtree contains passive effects or portals.

  var StaticMask = LayoutStatic | PassiveStatic | RefStatic;

  var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
  function getNearestMountedFiber(fiber) {
    var node = fiber;
    var nearestMounted = fiber;

    if (!fiber.alternate) {
      // If there is no alternate, this might be a new tree that isn't inserted
      // yet. If it is, then it will have a pending insertion effect on it.
      var nextNode = node;

      do {
        node = nextNode;

        if ((node.flags & (Placement | Hydrating)) !== NoFlags) {
          // This is an insertion or in-progress hydration. The nearest possible
          // mounted fiber is the parent but we need to continue to figure out
          // if that one is still mounted.
          nearestMounted = node.return;
        }

        nextNode = node.return;
      } while (nextNode);
    } else {
      while (node.return) {
        node = node.return;
      }
    }

    if (node.tag === HostRoot) {
      // TODO: Check if this was a nested HostRoot when used with
      // renderContainerIntoSubtree.
      return nearestMounted;
    } // If we didn't hit the root, that means that we're in an disconnected tree
    // that has been unmounted.


    return null;
  }
  function getSuspenseInstanceFromFiber(fiber) {
    if (fiber.tag === SuspenseComponent) {
      var suspenseState = fiber.memoizedState;

      if (suspenseState === null) {
        var current = fiber.alternate;

        if (current !== null) {
          suspenseState = current.memoizedState;
        }
      }

      if (suspenseState !== null) {
        return suspenseState.dehydrated;
      }
    }

    return null;
  }
  function getContainerFromFiber(fiber) {
    return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;
  }
  function isFiberMounted(fiber) {
    return getNearestMountedFiber(fiber) === fiber;
  }
  function isMounted(component) {
    {
      var owner = ReactCurrentOwner.current;

      if (owner !== null && owner.tag === ClassComponent) {
        var ownerFiber = owner;
        var instance = ownerFiber.stateNode;

        if (!instance._warnedAboutRefsInRender) {
          error('%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentNameFromFiber(ownerFiber) || 'A component');
        }

        instance._warnedAboutRefsInRender = true;
      }
    }

    var fiber = get(component);

    if (!fiber) {
      return false;
    }

    return getNearestMountedFiber(fiber) === fiber;
  }

  function assertIsMounted(fiber) {
    if (getNearestMountedFiber(fiber) !== fiber) {
      throw new Error('Unable to find node on an unmounted component.');
    }
  }

  function findCurrentFiberUsingSlowPath(fiber) {
    var alternate = fiber.alternate;

    if (!alternate) {
      // If there is no alternate, then we only need to check if it is mounted.
      var nearestMounted = getNearestMountedFiber(fiber);

      if (nearestMounted === null) {
        throw new Error('Unable to find node on an unmounted component.');
      }

      if (nearestMounted !== fiber) {
        return null;
      }

      return fiber;
    } // If we have two possible branches, we'll walk backwards up to the root
    // to see what path the root points to. On the way we may hit one of the
    // special cases and we'll deal with them.


    var a = fiber;
    var b = alternate;

    while (true) {
      var parentA = a.return;

      if (parentA === null) {
        // We're at the root.
        break;
      }

      var parentB = parentA.alternate;

      if (parentB === null) {
        // There is no alternate. This is an unusual case. Currently, it only
        // happens when a Suspense component is hidden. An extra fragment fiber
        // is inserted in between the Suspense fiber and its children. Skip
        // over this extra fragment fiber and proceed to the next parent.
        var nextParent = parentA.return;

        if (nextParent !== null) {
          a = b = nextParent;
          continue;
        } // If there's no parent, we're at the root.


        break;
      } // If both copies of the parent fiber point to the same child, we can
      // assume that the child is current. This happens when we bailout on low
      // priority: the bailed out fiber's child reuses the current child.


      if (parentA.child === parentB.child) {
        var child = parentA.child;

        while (child) {
          if (child === a) {
            // We've determined that A is the current branch.
            assertIsMounted(parentA);
            return fiber;
          }

          if (child === b) {
            // We've determined that B is the current branch.
            assertIsMounted(parentA);
            return alternate;
          }

          child = child.sibling;
        } // We should never have an alternate for any mounting node. So the only
        // way this could possibly happen is if this was unmounted, if at all.


        throw new Error('Unable to find node on an unmounted component.');
      }

      if (a.return !== b.return) {
        // The return pointer of A and the return pointer of B point to different
        // fibers. We assume that return pointers never criss-cross, so A must
        // belong to the child set of A.return, and B must belong to the child
        // set of B.return.
        a = parentA;
        b = parentB;
      } else {
        // The return pointers point to the same fiber. We'll have to use the
        // default, slow path: scan the child sets of each parent alternate to see
        // which child belongs to which set.
        //
        // Search parent A's child set
        var didFindChild = false;
        var _child = parentA.child;

        while (_child) {
          if (_child === a) {
            didFindChild = true;
            a = parentA;
            b = parentB;
            break;
          }

          if (_child === b) {
            didFindChild = true;
            b = parentA;
            a = parentB;
            break;
          }

          _child = _child.sibling;
        }

        if (!didFindChild) {
          // Search parent B's child set
          _child = parentB.child;

          while (_child) {
            if (_child === a) {
              didFindChild = true;
              a = parentB;
              b = parentA;
              break;
            }

            if (_child === b) {
              didFindChild = true;
              b = parentB;
              a = parentA;
              break;
            }

            _child = _child.sibling;
          }

          if (!didFindChild) {
            throw new Error('Child was not found in either parent set. This indicates a bug ' + 'in React related to the return pointer. Please file an issue.');
          }
        }
      }

      if (a.alternate !== b) {
        throw new Error("Return fibers should always be each others' alternates. " + 'This error is likely caused by a bug in React. Please file an issue.');
      }
    } // If the root is not a host container, we're in a disconnected tree. I.e.
    // unmounted.


    if (a.tag !== HostRoot) {
      throw new Error('Unable to find node on an unmounted component.');
    }

    if (a.stateNode.current === a) {
      // We've determined that A is the current branch.
      return fiber;
    } // Otherwise B has to be current branch.


    return alternate;
  }
  function findCurrentHostFiber(parent) {
    var currentParent = findCurrentFiberUsingSlowPath(parent);
    return currentParent !== null ? findCurrentHostFiberImpl(currentParent) : null;
  }

  function findCurrentHostFiberImpl(node) {
    // Next we'll drill down this component to find the first HostComponent/Text.
    if (node.tag === HostComponent || node.tag === HostText) {
      return node;
    }

    var child = node.child;

    while (child !== null) {
      var match = findCurrentHostFiberImpl(child);

      if (match !== null) {
        return match;
      }

      child = child.sibling;
    }

    return null;
  }

  function findCurrentHostFiberWithNoPortals(parent) {
    var currentParent = findCurrentFiberUsingSlowPath(parent);
    return currentParent !== null ? findCurrentHostFiberWithNoPortalsImpl(currentParent) : null;
  }

  function findCurrentHostFiberWithNoPortalsImpl(node) {
    // Next we'll drill down this component to find the first HostComponent/Text.
    if (node.tag === HostComponent || node.tag === HostText) {
      return node;
    }

    var child = node.child;

    while (child !== null) {
      if (child.tag !== HostPortal) {
        var match = findCurrentHostFiberWithNoPortalsImpl(child);

        if (match !== null) {
          return match;
        }
      }

      child = child.sibling;
    }

    return null;
  }

  // This module only exists as an ESM wrapper around the external CommonJS
  var scheduleCallback = unstable_scheduleCallback;
  var cancelCallback = unstable_cancelCallback;
  var shouldYield = unstable_shouldYield;
  var requestPaint = unstable_requestPaint;
  var now = unstable_now;
  var getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
  var ImmediatePriority = unstable_ImmediatePriority;
  var UserBlockingPriority = unstable_UserBlockingPriority;
  var NormalPriority = unstable_NormalPriority;
  var LowPriority = unstable_LowPriority;
  var IdlePriority = unstable_IdlePriority;
  // this doesn't actually exist on the scheduler, but it *does*
  // on scheduler/unstable_mock, which we'll need for internal testing
  var unstable_yieldValue$1 = unstable_yieldValue;
  var unstable_setDisableYieldValue$1 = unstable_setDisableYieldValue;

  var rendererID = null;
  var injectedHook = null;
  var injectedProfilingHooks = null;
  var hasLoggedError = false;
  var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';
  function injectInternals(internals) {
    if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
      // No DevTools
      return false;
    }

    var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;

    if (hook.isDisabled) {
      // This isn't a real property on the hook, but it can be set to opt out
      // of DevTools integration and associated warnings and logs.
      // https://github.com/facebook/react/issues/3877
      return true;
    }

    if (!hook.supportsFiber) {
      {
        error('The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://reactjs.org/link/react-devtools');
      } // DevTools exists, even though it doesn't support Fiber.


      return true;
    }

    try {
      if (enableSchedulingProfiler) {
        // Conditionally inject these hooks only if Timeline profiler is supported by this build.
        // This gives DevTools a way to feature detect that isn't tied to version number
        // (since profiling and timeline are controlled by different feature flags).
        internals = assign({}, internals, {
          getLaneLabelMap: getLaneLabelMap,
          injectProfilingHooks: injectProfilingHooks
        });
      }

      rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.

      injectedHook = hook;
    } catch (err) {
      // Catch all errors because it is unsafe to throw during initialization.
      {
        error('React instrumentation encountered an error: %s.', err);
      }
    }

    if (hook.checkDCE) {
      // This is the real DevTools.
      return true;
    } else {
      // This is likely a hook installed by Fast Refresh runtime.
      return false;
    }
  }
  function onScheduleRoot(root, children) {
    {
      if (injectedHook && typeof injectedHook.onScheduleFiberRoot === 'function') {
        try {
          injectedHook.onScheduleFiberRoot(rendererID, root, children);
        } catch (err) {
          if ( !hasLoggedError) {
            hasLoggedError = true;

            error('React instrumentation encountered an error: %s', err);
          }
        }
      }
    }
  }
  function onCommitRoot(root, eventPriority) {
    if (injectedHook && typeof injectedHook.onCommitFiberRoot === 'function') {
      try {
        var didError = (root.current.flags & DidCapture) === DidCapture;

        if (enableProfilerTimer) {
          var schedulerPriority;

          switch (eventPriority) {
            case DiscreteEventPriority:
              schedulerPriority = ImmediatePriority;
              break;

            case ContinuousEventPriority:
              schedulerPriority = UserBlockingPriority;
              break;

            case DefaultEventPriority:
              schedulerPriority = NormalPriority;
              break;

            case IdleEventPriority:
              schedulerPriority = IdlePriority;
              break;

            default:
              schedulerPriority = NormalPriority;
              break;
          }

          injectedHook.onCommitFiberRoot(rendererID, root, schedulerPriority, didError);
        } else {
          injectedHook.onCommitFiberRoot(rendererID, root, undefined, didError);
        }
      } catch (err) {
        {
          if (!hasLoggedError) {
            hasLoggedError = true;

            error('React instrumentation encountered an error: %s', err);
          }
        }
      }
    }
  }
  function onPostCommitRoot(root) {
    if (injectedHook && typeof injectedHook.onPostCommitFiberRoot === 'function') {
      try {
        injectedHook.onPostCommitFiberRoot(rendererID, root);
      } catch (err) {
        {
          if (!hasLoggedError) {
            hasLoggedError = true;

            error('React instrumentation encountered an error: %s', err);
          }
        }
      }
    }
  }
  function onCommitUnmount(fiber) {
    if (injectedHook && typeof injectedHook.onCommitFiberUnmount === 'function') {
      try {
        injectedHook.onCommitFiberUnmount(rendererID, fiber);
      } catch (err) {
        {
          if (!hasLoggedError) {
            hasLoggedError = true;

            error('React instrumentation encountered an error: %s', err);
          }
        }
      }
    }
  }
  function setIsStrictModeForDevtools(newIsStrictMode) {
    {
      if (typeof unstable_yieldValue$1 === 'function') {
        // We're in a test because Scheduler.unstable_yieldValue only exists
        // in SchedulerMock. To reduce the noise in strict mode tests,
        // suppress warnings and disable scheduler yielding during the double render
        unstable_setDisableYieldValue$1(newIsStrictMode);
        setSuppressWarning(newIsStrictMode);
      }

      if (injectedHook && typeof injectedHook.setStrictMode === 'function') {
        try {
          injectedHook.setStrictMode(rendererID, newIsStrictMode);
        } catch (err) {
          {
            if (!hasLoggedError) {
              hasLoggedError = true;

              error('React instrumentation encountered an error: %s', err);
            }
          }
        }
      }
    }
  } // Profiler API hooks

  function injectProfilingHooks(profilingHooks) {
    injectedProfilingHooks = profilingHooks;
  }

  function getLaneLabelMap() {
    {
      var map = new Map();
      var lane = 1;

      for (var index = 0; index < TotalLanes; index++) {
        var label = getLabelForLane(lane);
        map.set(lane, label);
        lane *= 2;
      }

      return map;
    }
  }

  function markCommitStarted(lanes) {
    {
      if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markCommitStarted === 'function') {
        injectedProfilingHooks.markCommitStarted(lanes);
      }
    }
  }
  function markCommitStopped() {
    {
      if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markCommitStopped === 'function') {
        injectedProfilingHooks.markCommitStopped();
      }
    }
  }
  function markComponentRenderStarted(fiber) {
    {
      if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentRenderStarted === 'function') {
        injectedProfilingHooks.markComponentRenderStarted(fiber);
      }
    }
  }
  function markComponentRenderStopped() {
    {
      if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentRenderStopped === 'function') {
        injectedProfilingHooks.markComponentRenderStopped();
      }
    }
  }
  function markComponentPassiveEffectMountStarted(fiber) {
    {
      if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectMountStarted === 'function') {
        injectedProfilingHooks.markComponentPassiveEffectMountStarted(fiber);
      }
    }
  }
  function markComponentPassiveEffectMountStopped() {
    {
      if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectMountStopped === 'function') {
        injectedProfilingHooks.markComponentPassiveEffectMountStopped();
      }
    }
  }
  function markComponentPassiveEffectUnmountStarted(fiber) {
    {
      if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStarted === 'function') {
        injectedProfilingHooks.markComponentPassiveEffectUnmountStarted(fiber);
      }
    }
  }
  function markComponentPassiveEffectUnmountStopped() {
    {
      if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped === 'function') {
        injectedProfilingHooks.markComponentPassiveEffectUnmountStopped();
      }
    }
  }
  function markComponentLayoutEffectMountStarted(fiber) {
    {
      if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectMountStarted === 'function') {
        injectedProfilingHooks.markComponentLayoutEffectMountStarted(fiber);
      }
    }
  }
  function markComponentLayoutEffectMountStopped() {
    {
      if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectMountStopped === 'function') {
        injectedProfilingHooks.markComponentLayoutEffectMountStopped();
      }
    }
  }
  function markComponentLayoutEffectUnmountStarted(fiber) {
    {
      if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted === 'function') {
        injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(fiber);
      }
    }
  }
  function markComponentLayoutEffectUnmountStopped() {
    {
      if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped === 'function') {
        injectedProfilingHooks.markComponentLayoutEffectUnmountStopped();
      }
    }
  }
  function markComponentErrored(fiber, thrownValue, lanes) {
    {
      if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentErrored === 'function') {
        injectedProfilingHooks.markComponentErrored(fiber, thrownValue, lanes);
      }
    }
  }
  function markComponentSuspended(fiber, wakeable, lanes) {
    {
      if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentSuspended === 'function') {
        injectedProfilingHooks.markComponentSuspended(fiber, wakeable, lanes);
      }
    }
  }
  function markLayoutEffectsStarted(lanes) {
    {
      if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markLayoutEffectsStarted === 'function') {
        injectedProfilingHooks.markLayoutEffectsStarted(lanes);
      }
    }
  }
  function markLayoutEffectsStopped() {
    {
      if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markLayoutEffectsStopped === 'function') {
        injectedProfilingHooks.markLayoutEffectsStopped();
      }
    }
  }
  function markPassiveEffectsStarted(lanes) {
    {
      if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markPassiveEffectsStarted === 'function') {
        injectedProfilingHooks.markPassiveEffectsStarted(lanes);
      }
    }
  }
  function markPassiveEffectsStopped() {
    {
      if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markPassiveEffectsStopped === 'function') {
        injectedProfilingHooks.markPassiveEffectsStopped();
      }
    }
  }
  function markRenderStarted(lanes) {
    {
      if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderStarted === 'function') {
        injectedProfilingHooks.markRenderStarted(lanes);
      }
    }
  }
  function markRenderYielded() {
    {
      if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderYielded === 'function') {
        injectedProfilingHooks.markRenderYielded();
      }
    }
  }
  function markRenderStopped() {
    {
      if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderStopped === 'function') {
        injectedProfilingHooks.markRenderStopped();
      }
    }
  }
  function markRenderScheduled(lane) {
    {
      if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderScheduled === 'function') {
        injectedProfilingHooks.markRenderScheduled(lane);
      }
    }
  }
  function markForceUpdateScheduled(fiber, lane) {
    {
      if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markForceUpdateScheduled === 'function') {
        injectedProfilingHooks.markForceUpdateScheduled(fiber, lane);
      }
    }
  }
  function markStateUpdateScheduled(fiber, lane) {
    {
      if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markStateUpdateScheduled === 'function') {
        injectedProfilingHooks.markStateUpdateScheduled(fiber, lane);
      }
    }
  }

  var NoMode =
  /*                         */
  0; // TODO: Remove ConcurrentMode by reading from the root tag instead

  var ConcurrentMode =
  /*                 */
  1;
  var ProfileMode =
  /*                    */
  2;
  var StrictLegacyMode =
  /*               */
  8;
  var StrictEffectsMode =
  /*              */
  16;

  // TODO: This is pretty well supported by browsers. Maybe we can drop it.
  var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros.
  // Based on:
  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32

  var log = Math.log;
  var LN2 = Math.LN2;

  function clz32Fallback(x) {
    var asUint = x >>> 0;

    if (asUint === 0) {
      return 32;
    }

    return 31 - (log(asUint) / LN2 | 0) | 0;
  }

  // If those values are changed that package should be rebuilt and redeployed.

  var TotalLanes = 31;
  var NoLanes =
  /*                        */
  0;
  var NoLane =
  /*                          */
  0;
  var SyncLane =
  /*                        */
  1;
  var InputContinuousHydrationLane =
  /*    */
  2;
  var InputContinuousLane =
  /*             */
  4;
  var DefaultHydrationLane =
  /*            */
  8;
  var DefaultLane =
  /*                     */
  16;
  var TransitionHydrationLane =
  /*                */
  32;
  var TransitionLanes =
  /*                       */
  4194240;
  var TransitionLane1 =
  /*                        */
  64;
  var TransitionLane2 =
  /*                        */
  128;
  var TransitionLane3 =
  /*                        */
  256;
  var TransitionLane4 =
  /*                        */
  512;
  var TransitionLane5 =
  /*                        */
  1024;
  var TransitionLane6 =
  /*                        */
  2048;
  var TransitionLane7 =
  /*                        */
  4096;
  var TransitionLane8 =
  /*                        */
  8192;
  var TransitionLane9 =
  /*                        */
  16384;
  var TransitionLane10 =
  /*                       */
  32768;
  var TransitionLane11 =
  /*                       */
  65536;
  var TransitionLane12 =
  /*                       */
  131072;
  var TransitionLane13 =
  /*                       */
  262144;
  var TransitionLane14 =
  /*                       */
  524288;
  var TransitionLane15 =
  /*                       */
  1048576;
  var TransitionLane16 =
  /*                       */
  2097152;
  var RetryLanes =
  /*                            */
  130023424;
  var RetryLane1 =
  /*                             */
  4194304;
  var RetryLane2 =
  /*                             */
  8388608;
  var RetryLane3 =
  /*                             */
  16777216;
  var RetryLane4 =
  /*                             */
  33554432;
  var RetryLane5 =
  /*                             */
  67108864;
  var SomeRetryLane = RetryLane1;
  var SelectiveHydrationLane =
  /*          */
  134217728;
  var NonIdleLanes =
  /*                          */
  268435455;
  var IdleHydrationLane =
  /*               */
  268435456;
  var IdleLane =
  /*                        */
  536870912;
  var OffscreenLane =
  /*                   */
  1073741824; // This function is used for the experimental timeline (react-devtools-timeline)
  // It should be kept in sync with the Lanes values above.

  function getLabelForLane(lane) {
    {
      if (lane & SyncLane) {
        return 'Sync';
      }

      if (lane & InputContinuousHydrationLane) {
        return 'InputContinuousHydration';
      }

      if (lane & InputContinuousLane) {
        return 'InputContinuous';
      }

      if (lane & DefaultHydrationLane) {
        return 'DefaultHydration';
      }

      if (lane & DefaultLane) {
        return 'Default';
      }

      if (lane & TransitionHydrationLane) {
        return 'TransitionHydration';
      }

      if (lane & TransitionLanes) {
        return 'Transition';
      }

      if (lane & RetryLanes) {
        return 'Retry';
      }

      if (lane & SelectiveHydrationLane) {
        return 'SelectiveHydration';
      }

      if (lane & IdleHydrationLane) {
        return 'IdleHydration';
      }

      if (lane & IdleLane) {
        return 'Idle';
      }

      if (lane & OffscreenLane) {
        return 'Offscreen';
      }
    }
  }
  var NoTimestamp = -1;
  var nextTransitionLane = TransitionLane1;
  var nextRetryLane = RetryLane1;

  function getHighestPriorityLanes(lanes) {
    switch (getHighestPriorityLane(lanes)) {
      case SyncLane:
        return SyncLane;

      case InputContinuousHydrationLane:
        return InputContinuousHydrationLane;

      case InputContinuousLane:
        return InputContinuousLane;

      case DefaultHydrationLane:
        return DefaultHydrationLane;

      case DefaultLane:
        return DefaultLane;

      case TransitionHydrationLane:
        return TransitionHydrationLane;

      case TransitionLane1:
      case TransitionLane2:
      case TransitionLane3:
      case TransitionLane4:
      case TransitionLane5:
      case TransitionLane6:
      case TransitionLane7:
      case TransitionLane8:
      case TransitionLane9:
      case TransitionLane10:
      case TransitionLane11:
      case TransitionLane12:
      case TransitionLane13:
      case TransitionLane14:
      case TransitionLane15:
      case TransitionLane16:
        return lanes & TransitionLanes;

      case RetryLane1:
      case RetryLane2:
      case RetryLane3:
      case RetryLane4:
      case RetryLane5:
        return lanes & RetryLanes;

      case SelectiveHydrationLane:
        return SelectiveHydrationLane;

      case IdleHydrationLane:
        return IdleHydrationLane;

      case IdleLane:
        return IdleLane;

      case OffscreenLane:
        return OffscreenLane;

      default:
        {
          error('Should have found matching lanes. This is a bug in React.');
        } // This shouldn't be reachable, but as a fallback, return the entire bitmask.


        return lanes;
    }
  }

  function getNextLanes(root, wipLanes) {
    // Early bailout if there's no pending work left.
    var pendingLanes = root.pendingLanes;

    if (pendingLanes === NoLanes) {
      return NoLanes;
    }

    var nextLanes = NoLanes;
    var suspendedLanes = root.suspendedLanes;
    var pingedLanes = root.pingedLanes; // Do not work on any idle work until all the non-idle work has finished,
    // even if the work is suspended.

    var nonIdlePendingLanes = pendingLanes & NonIdleLanes;

    if (nonIdlePendingLanes !== NoLanes) {
      var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes;

      if (nonIdleUnblockedLanes !== NoLanes) {
        nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes);
      } else {
        var nonIdlePingedLanes = nonIdlePendingLanes & pingedLanes;

        if (nonIdlePingedLanes !== NoLanes) {
          nextLanes = getHighestPriorityLanes(nonIdlePingedLanes);
        }
      }
    } else {
      // The only remaining work is Idle.
      var unblockedLanes = pendingLanes & ~suspendedLanes;

      if (unblockedLanes !== NoLanes) {
        nextLanes = getHighestPriorityLanes(unblockedLanes);
      } else {
        if (pingedLanes !== NoLanes) {
          nextLanes = getHighestPriorityLanes(pingedLanes);
        }
      }
    }

    if (nextLanes === NoLanes) {
      // This should only be reachable if we're suspended
      // TODO: Consider warning in this path if a fallback timer is not scheduled.
      return NoLanes;
    } // If we're already in the middle of a render, switching lanes will interrupt
    // it and we'll lose our progress. We should only do this if the new lanes are
    // higher priority.


    if (wipLanes !== NoLanes && wipLanes !== nextLanes && // If we already suspended with a delay, then interrupting is fine. Don't
    // bother waiting until the root is complete.
    (wipLanes & suspendedLanes) === NoLanes) {
      var nextLane = getHighestPriorityLane(nextLanes);
      var wipLane = getHighestPriorityLane(wipLanes);

      if ( // Tests whether the next lane is equal or lower priority than the wip
      // one. This works because the bits decrease in priority as you go left.
      nextLane >= wipLane || // Default priority updates should not interrupt transition updates. The
      // only difference between default updates and transition updates is that
      // default updates do not support refresh transitions.
      nextLane === DefaultLane && (wipLane & TransitionLanes) !== NoLanes) {
        // Keep working on the existing in-progress tree. Do not interrupt.
        return wipLanes;
      }
    }

    if ((nextLanes & InputContinuousLane) !== NoLanes) {
      // When updates are sync by default, we entangle continuous priority updates
      // and default updates, so they render in the same batch. The only reason
      // they use separate lanes is because continuous updates should interrupt
      // transitions, but default updates should not.
      nextLanes |= pendingLanes & DefaultLane;
    } // Check for entangled lanes and add them to the batch.
    //
    // A lane is said to be entangled with another when it's not allowed to render
    // in a batch that does not also include the other lane. Typically we do this
    // when multiple updates have the same source, and we only want to respond to
    // the most recent event from that source.
    //
    // Note that we apply entanglements *after* checking for partial work above.
    // This means that if a lane is entangled during an interleaved event while
    // it's already rendering, we won't interrupt it. This is intentional, since
    // entanglement is usually "best effort": we'll try our best to render the
    // lanes in the same batch, but it's not worth throwing out partially
    // completed work in order to do it.
    // TODO: Reconsider this. The counter-argument is that the partial work
    // represents an intermediate state, which we don't want to show to the user.
    // And by spending extra time finishing it, we're increasing the amount of
    // time it takes to show the final state, which is what they are actually
    // waiting for.
    //
    // For those exceptions where entanglement is semantically important, like
    // useMutableSource, we should ensure that there is no partial work at the
    // time we apply the entanglement.


    var entangledLanes = root.entangledLanes;

    if (entangledLanes !== NoLanes) {
      var entanglements = root.entanglements;
      var lanes = nextLanes & entangledLanes;

      while (lanes > 0) {
        var index = pickArbitraryLaneIndex(lanes);
        var lane = 1 << index;
        nextLanes |= entanglements[index];
        lanes &= ~lane;
      }
    }

    return nextLanes;
  }
  function getMostRecentEventTime(root, lanes) {
    var eventTimes = root.eventTimes;
    var mostRecentEventTime = NoTimestamp;

    while (lanes > 0) {
      var index = pickArbitraryLaneIndex(lanes);
      var lane = 1 << index;
      var eventTime = eventTimes[index];

      if (eventTime > mostRecentEventTime) {
        mostRecentEventTime = eventTime;
      }

      lanes &= ~lane;
    }

    return mostRecentEventTime;
  }

  function computeExpirationTime(lane, currentTime) {
    switch (lane) {
      case SyncLane:
      case InputContinuousHydrationLane:
      case InputContinuousLane:
        // User interactions should expire slightly more quickly.
        //
        // NOTE: This is set to the corresponding constant as in Scheduler.js.
        // When we made it larger, a product metric in www regressed, suggesting
        // there's a user interaction that's being starved by a series of
        // synchronous updates. If that theory is correct, the proper solution is
        // to fix the starvation. However, this scenario supports the idea that
        // expiration times are an important safeguard when starvation
        // does happen.
        return currentTime + 250;

      case DefaultHydrationLane:
      case DefaultLane:
      case TransitionHydrationLane:
      case TransitionLane1:
      case TransitionLane2:
      case TransitionLane3:
      case TransitionLane4:
      case TransitionLane5:
      case TransitionLane6:
      case TransitionLane7:
      case TransitionLane8:
      case TransitionLane9:
      case TransitionLane10:
      case TransitionLane11:
      case TransitionLane12:
      case TransitionLane13:
      case TransitionLane14:
      case TransitionLane15:
      case TransitionLane16:
        return currentTime + 5000;

      case RetryLane1:
      case RetryLane2:
      case RetryLane3:
      case RetryLane4:
      case RetryLane5:
        // TODO: Retries should be allowed to expire if they are CPU bound for
        // too long, but when I made this change it caused a spike in browser
        // crashes. There must be some other underlying bug; not super urgent but
        // ideally should figure out why and fix it. Unfortunately we don't have
        // a repro for the crashes, only detected via production metrics.
        return NoTimestamp;

      case SelectiveHydrationLane:
      case IdleHydrationLane:
      case IdleLane:
      case OffscreenLane:
        // Anything idle priority or lower should never expire.
        return NoTimestamp;

      default:
        {
          error('Should have found matching lanes. This is a bug in React.');
        }

        return NoTimestamp;
    }
  }

  function markStarvedLanesAsExpired(root, currentTime) {
    // TODO: This gets called every time we yield. We can optimize by storing
    // the earliest expiration time on the root. Then use that to quickly bail out
    // of this function.
    var pendingLanes = root.pendingLanes;
    var suspendedLanes = root.suspendedLanes;
    var pingedLanes = root.pingedLanes;
    var expirationTimes = root.expirationTimes; // Iterate through the pending lanes and check if we've reached their
    // expiration time. If so, we'll assume the update is being starved and mark
    // it as expired to force it to finish.

    var lanes = pendingLanes;

    while (lanes > 0) {
      var index = pickArbitraryLaneIndex(lanes);
      var lane = 1 << index;
      var expirationTime = expirationTimes[index];

      if (expirationTime === NoTimestamp) {
        // Found a pending lane with no expiration time. If it's not suspended, or
        // if it's pinged, assume it's CPU-bound. Compute a new expiration time
        // using the current time.
        if ((lane & suspendedLanes) === NoLanes || (lane & pingedLanes) !== NoLanes) {
          // Assumes timestamps are monotonically increasing.
          expirationTimes[index] = computeExpirationTime(lane, currentTime);
        }
      } else if (expirationTime <= currentTime) {
        // This lane expired
        root.expiredLanes |= lane;
      }

      lanes &= ~lane;
    }
  } // This returns the highest priority pending lanes regardless of whether they
  // are suspended.

  function getHighestPriorityPendingLanes(root) {
    return getHighestPriorityLanes(root.pendingLanes);
  }
  function getLanesToRetrySynchronouslyOnError(root) {
    var everythingButOffscreen = root.pendingLanes & ~OffscreenLane;

    if (everythingButOffscreen !== NoLanes) {
      return everythingButOffscreen;
    }

    if (everythingButOffscreen & OffscreenLane) {
      return OffscreenLane;
    }

    return NoLanes;
  }
  function includesSyncLane(lanes) {
    return (lanes & SyncLane) !== NoLanes;
  }
  function includesNonIdleWork(lanes) {
    return (lanes & NonIdleLanes) !== NoLanes;
  }
  function includesOnlyRetries(lanes) {
    return (lanes & RetryLanes) === lanes;
  }
  function includesOnlyNonUrgentLanes(lanes) {
    var UrgentLanes = SyncLane | InputContinuousLane | DefaultLane;
    return (lanes & UrgentLanes) === NoLanes;
  }
  function includesOnlyTransitions(lanes) {
    return (lanes & TransitionLanes) === lanes;
  }
  function includesBlockingLane(root, lanes) {

    var SyncDefaultLanes = InputContinuousHydrationLane | InputContinuousLane | DefaultHydrationLane | DefaultLane;
    return (lanes & SyncDefaultLanes) !== NoLanes;
  }
  function includesExpiredLane(root, lanes) {
    // This is a separate check from includesBlockingLane because a lane can
    // expire after a render has already started.
    return (lanes & root.expiredLanes) !== NoLanes;
  }
  function isTransitionLane(lane) {
    return (lane & TransitionLanes) !== NoLanes;
  }
  function claimNextTransitionLane() {
    // Cycle through the lanes, assigning each new transition to the next lane.
    // In most cases, this means every transition gets its own lane, until we
    // run out of lanes and cycle back to the beginning.
    var lane = nextTransitionLane;
    nextTransitionLane <<= 1;

    if ((nextTransitionLane & TransitionLanes) === NoLanes) {
      nextTransitionLane = TransitionLane1;
    }

    return lane;
  }
  function claimNextRetryLane() {
    var lane = nextRetryLane;
    nextRetryLane <<= 1;

    if ((nextRetryLane & RetryLanes) === NoLanes) {
      nextRetryLane = RetryLane1;
    }

    return lane;
  }
  function getHighestPriorityLane(lanes) {
    return lanes & -lanes;
  }
  function pickArbitraryLane(lanes) {
    // This wrapper function gets inlined. Only exists so to communicate that it
    // doesn't matter which bit is selected; you can pick any bit without
    // affecting the algorithms where its used. Here I'm using
    // getHighestPriorityLane because it requires the fewest operations.
    return getHighestPriorityLane(lanes);
  }

  function pickArbitraryLaneIndex(lanes) {
    return 31 - clz32(lanes);
  }

  function laneToIndex(lane) {
    return pickArbitraryLaneIndex(lane);
  }

  function includesSomeLane(a, b) {
    return (a & b) !== NoLanes;
  }
  function isSubsetOfLanes(set, subset) {
    return (set & subset) === subset;
  }
  function mergeLanes(a, b) {
    return a | b;
  }
  function removeLanes(set, subset) {
    return set & ~subset;
  }
  function intersectLanes(a, b) {
    return a & b;
  } // Seems redundant, but it changes the type from a single lane (used for
  // updates) to a group of lanes (used for flushing work).

  function laneToLanes(lane) {
    return lane;
  }
  function higherPriorityLane(a, b) {
    // This works because the bit ranges decrease in priority as you go left.
    return a !== NoLane && a < b ? a : b;
  }
  function createLaneMap(initial) {
    // Intentionally pushing one by one.
    // https://v8.dev/blog/elements-kinds#avoid-creating-holes
    var laneMap = [];

    for (var i = 0; i < TotalLanes; i++) {
      laneMap.push(initial);
    }

    return laneMap;
  }
  function markRootUpdated(root, updateLane, eventTime) {
    root.pendingLanes |= updateLane; // If there are any suspended transitions, it's possible this new update
    // could unblock them. Clear the suspended lanes so that we can try rendering
    // them again.
    //
    // TODO: We really only need to unsuspend only lanes that are in the
    // `subtreeLanes` of the updated fiber, or the update lanes of the return
    // path. This would exclude suspended updates in an unrelated sibling tree,
    // since there's no way for this update to unblock it.
    //
    // We don't do this if the incoming update is idle, because we never process
    // idle updates until after all the regular updates have finished; there's no
    // way it could unblock a transition.

    if (updateLane !== IdleLane) {
      root.suspendedLanes = NoLanes;
      root.pingedLanes = NoLanes;
    }

    var eventTimes = root.eventTimes;
    var index = laneToIndex(updateLane); // We can always overwrite an existing timestamp because we prefer the most
    // recent event, and we assume time is monotonically increasing.

    eventTimes[index] = eventTime;
  }
  function markRootSuspended(root, suspendedLanes) {
    root.suspendedLanes |= suspendedLanes;
    root.pingedLanes &= ~suspendedLanes; // The suspended lanes are no longer CPU-bound. Clear their expiration times.

    var expirationTimes = root.expirationTimes;
    var lanes = suspendedLanes;

    while (lanes > 0) {
      var index = pickArbitraryLaneIndex(lanes);
      var lane = 1 << index;
      expirationTimes[index] = NoTimestamp;
      lanes &= ~lane;
    }
  }
  function markRootPinged(root, pingedLanes, eventTime) {
    root.pingedLanes |= root.suspendedLanes & pingedLanes;
  }
  function markRootFinished(root, remainingLanes) {
    var noLongerPendingLanes = root.pendingLanes & ~remainingLanes;
    root.pendingLanes = remainingLanes; // Let's try everything again

    root.suspendedLanes = NoLanes;
    root.pingedLanes = NoLanes;
    root.expiredLanes &= remainingLanes;
    root.mutableReadLanes &= remainingLanes;
    root.entangledLanes &= remainingLanes;
    var entanglements = root.entanglements;
    var eventTimes = root.eventTimes;
    var expirationTimes = root.expirationTimes; // Clear the lanes that no longer have pending work

    var lanes = noLongerPendingLanes;

    while (lanes > 0) {
      var index = pickArbitraryLaneIndex(lanes);
      var lane = 1 << index;
      entanglements[index] = NoLanes;
      eventTimes[index] = NoTimestamp;
      expirationTimes[index] = NoTimestamp;
      lanes &= ~lane;
    }
  }
  function markRootEntangled(root, entangledLanes) {
    // In addition to entangling each of the given lanes with each other, we also
    // have to consider _transitive_ entanglements. For each lane that is already
    // entangled with *any* of the given lanes, that lane is now transitively
    // entangled with *all* the given lanes.
    //
    // Translated: If C is entangled with A, then entangling A with B also
    // entangles C with B.
    //
    // If this is hard to grasp, it might help to intentionally break this
    // function and look at the tests that fail in ReactTransition-test.js. Try
    // commenting out one of the conditions below.
    var rootEntangledLanes = root.entangledLanes |= entangledLanes;
    var entanglements = root.entanglements;
    var lanes = rootEntangledLanes;

    while (lanes) {
      var index = pickArbitraryLaneIndex(lanes);
      var lane = 1 << index;

      if ( // Is this one of the newly entangled lanes?
      lane & entangledLanes | // Is this lane transitively entangled with the newly entangled lanes?
      entanglements[index] & entangledLanes) {
        entanglements[index] |= entangledLanes;
      }

      lanes &= ~lane;
    }
  }
  function getBumpedLaneForHydration(root, renderLanes) {
    var renderLane = getHighestPriorityLane(renderLanes);
    var lane;

    switch (renderLane) {
      case InputContinuousLane:
        lane = InputContinuousHydrationLane;
        break;

      case DefaultLane:
        lane = DefaultHydrationLane;
        break;

      case TransitionLane1:
      case TransitionLane2:
      case TransitionLane3:
      case TransitionLane4:
      case TransitionLane5:
      case TransitionLane6:
      case TransitionLane7:
      case TransitionLane8:
      case TransitionLane9:
      case TransitionLane10:
      case TransitionLane11:
      case TransitionLane12:
      case TransitionLane13:
      case TransitionLane14:
      case TransitionLane15:
      case TransitionLane16:
      case RetryLane1:
      case RetryLane2:
      case RetryLane3:
      case RetryLane4:
      case RetryLane5:
        lane = TransitionHydrationLane;
        break;

      case IdleLane:
        lane = IdleHydrationLane;
        break;

      default:
        // Everything else is already either a hydration lane, or shouldn't
        // be retried at a hydration lane.
        lane = NoLane;
        break;
    } // Check if the lane we chose is suspended. If so, that indicates that we
    // already attempted and failed to hydrate at that level. Also check if we're
    // already rendering that lane, which is rare but could happen.


    if ((lane & (root.suspendedLanes | renderLanes)) !== NoLane) {
      // Give up trying to hydrate and fall back to client render.
      return NoLane;
    }

    return lane;
  }
  function addFiberToLanesMap(root, fiber, lanes) {

    if (!isDevToolsPresent) {
      return;
    }

    var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap;

    while (lanes > 0) {
      var index = laneToIndex(lanes);
      var lane = 1 << index;
      var updaters = pendingUpdatersLaneMap[index];
      updaters.add(fiber);
      lanes &= ~lane;
    }
  }
  function movePendingFibersToMemoized(root, lanes) {

    if (!isDevToolsPresent) {
      return;
    }

    var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap;
    var memoizedUpdaters = root.memoizedUpdaters;

    while (lanes > 0) {
      var index = laneToIndex(lanes);
      var lane = 1 << index;
      var updaters = pendingUpdatersLaneMap[index];

      if (updaters.size > 0) {
        updaters.forEach(function (fiber) {
          var alternate = fiber.alternate;

          if (alternate === null || !memoizedUpdaters.has(alternate)) {
            memoizedUpdaters.add(fiber);
          }
        });
        updaters.clear();
      }

      lanes &= ~lane;
    }
  }
  function getTransitionsForLanes(root, lanes) {
    {
      return null;
    }
  }

  var DiscreteEventPriority = SyncLane;
  var ContinuousEventPriority = InputContinuousLane;
  var DefaultEventPriority = DefaultLane;
  var IdleEventPriority = IdleLane;
  var currentUpdatePriority = NoLane;
  function getCurrentUpdatePriority() {
    return currentUpdatePriority;
  }
  function setCurrentUpdatePriority(newPriority) {
    currentUpdatePriority = newPriority;
  }
  function runWithPriority(priority, fn) {
    var previousPriority = currentUpdatePriority;

    try {
      currentUpdatePriority = priority;
      return fn();
    } finally {
      currentUpdatePriority = previousPriority;
    }
  }
  function higherEventPriority(a, b) {
    return a !== 0 && a < b ? a : b;
  }
  function lowerEventPriority(a, b) {
    return a === 0 || a > b ? a : b;
  }
  function isHigherEventPriority(a, b) {
    return a !== 0 && a < b;
  }
  function lanesToEventPriority(lanes) {
    var lane = getHighestPriorityLane(lanes);

    if (!isHigherEventPriority(DiscreteEventPriority, lane)) {
      return DiscreteEventPriority;
    }

    if (!isHigherEventPriority(ContinuousEventPriority, lane)) {
      return ContinuousEventPriority;
    }

    if (includesNonIdleWork(lane)) {
      return DefaultEventPriority;
    }

    return IdleEventPriority;
  }

  // This is imported by the event replaying implementation in React DOM. It's
  // in a separate file to break a circular dependency between the renderer and
  // the reconciler.
  function isRootDehydrated(root) {
    var currentState = root.current.memoizedState;
    return currentState.isDehydrated;
  }

  var _attemptSynchronousHydration;

  function setAttemptSynchronousHydration(fn) {
    _attemptSynchronousHydration = fn;
  }
  function attemptSynchronousHydration(fiber) {
    _attemptSynchronousHydration(fiber);
  }
  var attemptContinuousHydration;
  function setAttemptContinuousHydration(fn) {
    attemptContinuousHydration = fn;
  }
  var attemptHydrationAtCurrentPriority;
  function setAttemptHydrationAtCurrentPriority(fn) {
    attemptHydrationAtCurrentPriority = fn;
  }
  var getCurrentUpdatePriority$1;
  function setGetCurrentUpdatePriority(fn) {
    getCurrentUpdatePriority$1 = fn;
  }
  var attemptHydrationAtPriority;
  function setAttemptHydrationAtPriority(fn) {
    attemptHydrationAtPriority = fn;
  } // TODO: Upgrade this definition once we're on a newer version of Flow that
  // has this definition built-in.

  var hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed.

  var queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout.
  // if the last target was dehydrated.

  var queuedFocus = null;
  var queuedDrag = null;
  var queuedMouse = null; // For pointer events there can be one latest event per pointerId.

  var queuedPointers = new Map();
  var queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.

  var queuedExplicitHydrationTargets = [];
  var discreteReplayableEvents = ['mousedown', 'mouseup', 'touchcancel', 'touchend', 'touchstart', 'auxclick', 'dblclick', 'pointercancel', 'pointerdown', 'pointerup', 'dragend', 'dragstart', 'drop', 'compositionend', 'compositionstart', 'keydown', 'keypress', 'keyup', 'input', 'textInput', // Intentionally camelCase
  'copy', 'cut', 'paste', 'click', 'change', 'contextmenu', 'reset', 'submit'];
  function isDiscreteEventThatRequiresHydration(eventType) {
    return discreteReplayableEvents.indexOf(eventType) > -1;
  }

  function createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
    return {
      blockedOn: blockedOn,
      domEventName: domEventName,
      eventSystemFlags: eventSystemFlags,
      nativeEvent: nativeEvent,
      targetContainers: [targetContainer]
    };
  }

  function clearIfContinuousEvent(domEventName, nativeEvent) {
    switch (domEventName) {
      case 'focusin':
      case 'focusout':
        queuedFocus = null;
        break;

      case 'dragenter':
      case 'dragleave':
        queuedDrag = null;
        break;

      case 'mouseover':
      case 'mouseout':
        queuedMouse = null;
        break;

      case 'pointerover':
      case 'pointerout':
        {
          var pointerId = nativeEvent.pointerId;
          queuedPointers.delete(pointerId);
          break;
        }

      case 'gotpointercapture':
      case 'lostpointercapture':
        {
          var _pointerId = nativeEvent.pointerId;
          queuedPointerCaptures.delete(_pointerId);
          break;
        }
    }
  }

  function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
    if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {
      var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);

      if (blockedOn !== null) {
        var _fiber2 = getInstanceFromNode(blockedOn);

        if (_fiber2 !== null) {
          // Attempt to increase the priority of this target.
          attemptContinuousHydration(_fiber2);
        }
      }

      return queuedEvent;
    } // If we have already queued this exact event, then it's because
    // the different event systems have different DOM event listeners.
    // We can accumulate the flags, and the targetContainers, and
    // store a single event to be replayed.


    existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
    var targetContainers = existingQueuedEvent.targetContainers;

    if (targetContainer !== null && targetContainers.indexOf(targetContainer) === -1) {
      targetContainers.push(targetContainer);
    }

    return existingQueuedEvent;
  }

  function queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
    // These set relatedTarget to null because the replayed event will be treated as if we
    // moved from outside the window (no target) onto the target once it hydrates.
    // Instead of mutating we could clone the event.
    switch (domEventName) {
      case 'focusin':
        {
          var focusEvent = nativeEvent;
          queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, domEventName, eventSystemFlags, targetContainer, focusEvent);
          return true;
        }

      case 'dragenter':
        {
          var dragEvent = nativeEvent;
          queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, domEventName, eventSystemFlags, targetContainer, dragEvent);
          return true;
        }

      case 'mouseover':
        {
          var mouseEvent = nativeEvent;
          queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, domEventName, eventSystemFlags, targetContainer, mouseEvent);
          return true;
        }

      case 'pointerover':
        {
          var pointerEvent = nativeEvent;
          var pointerId = pointerEvent.pointerId;
          queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, pointerEvent));
          return true;
        }

      case 'gotpointercapture':
        {
          var _pointerEvent = nativeEvent;
          var _pointerId2 = _pointerEvent.pointerId;
          queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, _pointerEvent));
          return true;
        }
    }

    return false;
  } // Check if this target is unblocked. Returns true if it's unblocked.

  function attemptExplicitHydrationTarget(queuedTarget) {
    // TODO: This function shares a lot of logic with findInstanceBlockingEvent.
    // Try to unify them. It's a bit tricky since it would require two return
    // values.
    var targetInst = getClosestInstanceFromNode(queuedTarget.target);

    if (targetInst !== null) {
      var nearestMounted = getNearestMountedFiber(targetInst);

      if (nearestMounted !== null) {
        var tag = nearestMounted.tag;

        if (tag === SuspenseComponent) {
          var instance = getSuspenseInstanceFromFiber(nearestMounted);

          if (instance !== null) {
            // We're blocked on hydrating this boundary.
            // Increase its priority.
            queuedTarget.blockedOn = instance;
            attemptHydrationAtPriority(queuedTarget.priority, function () {
              attemptHydrationAtCurrentPriority(nearestMounted);
            });
            return;
          }
        } else if (tag === HostRoot) {
          var root = nearestMounted.stateNode;

          if (isRootDehydrated(root)) {
            queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of
            // a root other than sync.

            return;
          }
        }
      }
    }

    queuedTarget.blockedOn = null;
  }

  function queueExplicitHydrationTarget(target) {
    // TODO: This will read the priority if it's dispatched by the React
    // event system but not native events. Should read window.event.type, like
    // we do for updates (getCurrentEventPriority).
    var updatePriority = getCurrentUpdatePriority$1();
    var queuedTarget = {
      blockedOn: null,
      target: target,
      priority: updatePriority
    };
    var i = 0;

    for (; i < queuedExplicitHydrationTargets.length; i++) {
      // Stop once we hit the first target with lower priority than
      if (!isHigherEventPriority(updatePriority, queuedExplicitHydrationTargets[i].priority)) {
        break;
      }
    }

    queuedExplicitHydrationTargets.splice(i, 0, queuedTarget);

    if (i === 0) {
      attemptExplicitHydrationTarget(queuedTarget);
    }
  }

  function attemptReplayContinuousQueuedEvent(queuedEvent) {
    if (queuedEvent.blockedOn !== null) {
      return false;
    }

    var targetContainers = queuedEvent.targetContainers;

    while (targetContainers.length > 0) {
      var targetContainer = targetContainers[0];
      var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.domEventName, queuedEvent.eventSystemFlags, targetContainer, queuedEvent.nativeEvent);

      if (nextBlockedOn === null) {
        {
          var nativeEvent = queuedEvent.nativeEvent;
          var nativeEventClone = new nativeEvent.constructor(nativeEvent.type, nativeEvent);
          setReplayingEvent(nativeEventClone);
          nativeEvent.target.dispatchEvent(nativeEventClone);
          resetReplayingEvent();
        }
      } else {
        // We're still blocked. Try again later.
        var _fiber3 = getInstanceFromNode(nextBlockedOn);

        if (_fiber3 !== null) {
          attemptContinuousHydration(_fiber3);
        }

        queuedEvent.blockedOn = nextBlockedOn;
        return false;
      } // This target container was successfully dispatched. Try the next.


      targetContainers.shift();
    }

    return true;
  }

  function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
    if (attemptReplayContinuousQueuedEvent(queuedEvent)) {
      map.delete(key);
    }
  }

  function replayUnblockedEvents() {
    hasScheduledReplayAttempt = false;


    if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {
      queuedFocus = null;
    }

    if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {
      queuedDrag = null;
    }

    if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {
      queuedMouse = null;
    }

    queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
    queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
  }

  function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
    if (queuedEvent.blockedOn === unblocked) {
      queuedEvent.blockedOn = null;

      if (!hasScheduledReplayAttempt) {
        hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are
        // now unblocked. This first might not actually be unblocked yet.
        // We could check it early to avoid scheduling an unnecessary callback.

        unstable_scheduleCallback(unstable_NormalPriority, replayUnblockedEvents);
      }
    }
  }

  function retryIfBlockedOn(unblocked) {
    // Mark anything that was blocked on this as no longer blocked
    // and eligible for a replay.
    if (queuedDiscreteEvents.length > 0) {
      scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's
      // worth it because we expect very few discrete events to queue up and once
      // we are actually fully unblocked it will be fast to replay them.

      for (var i = 1; i < queuedDiscreteEvents.length; i++) {
        var queuedEvent = queuedDiscreteEvents[i];

        if (queuedEvent.blockedOn === unblocked) {
          queuedEvent.blockedOn = null;
        }
      }
    }

    if (queuedFocus !== null) {
      scheduleCallbackIfUnblocked(queuedFocus, unblocked);
    }

    if (queuedDrag !== null) {
      scheduleCallbackIfUnblocked(queuedDrag, unblocked);
    }

    if (queuedMouse !== null) {
      scheduleCallbackIfUnblocked(queuedMouse, unblocked);
    }

    var unblock = function (queuedEvent) {
      return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
    };

    queuedPointers.forEach(unblock);
    queuedPointerCaptures.forEach(unblock);

    for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {
      var queuedTarget = queuedExplicitHydrationTargets[_i];

      if (queuedTarget.blockedOn === unblocked) {
        queuedTarget.blockedOn = null;
      }
    }

    while (queuedExplicitHydrationTargets.length > 0) {
      var nextExplicitTarget = queuedExplicitHydrationTargets[0];

      if (nextExplicitTarget.blockedOn !== null) {
        // We're still blocked.
        break;
      } else {
        attemptExplicitHydrationTarget(nextExplicitTarget);

        if (nextExplicitTarget.blockedOn === null) {
          // We're unblocked.
          queuedExplicitHydrationTargets.shift();
        }
      }
    }
  }

  var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; // TODO: can we stop exporting these?

  var _enabled = true; // This is exported in FB builds for use by legacy FB layer infra.
  // We'd like to remove this but it's not clear if this is safe.

  function setEnabled(enabled) {
    _enabled = !!enabled;
  }
  function isEnabled() {
    return _enabled;
  }
  function createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags) {
    var eventPriority = getEventPriority(domEventName);
    var listenerWrapper;

    switch (eventPriority) {
      case DiscreteEventPriority:
        listenerWrapper = dispatchDiscreteEvent;
        break;

      case ContinuousEventPriority:
        listenerWrapper = dispatchContinuousEvent;
        break;

      case DefaultEventPriority:
      default:
        listenerWrapper = dispatchEvent;
        break;
    }

    return listenerWrapper.bind(null, domEventName, eventSystemFlags, targetContainer);
  }

  function dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {
    var previousPriority = getCurrentUpdatePriority();
    var prevTransition = ReactCurrentBatchConfig.transition;
    ReactCurrentBatchConfig.transition = null;

    try {
      setCurrentUpdatePriority(DiscreteEventPriority);
      dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
    } finally {
      setCurrentUpdatePriority(previousPriority);
      ReactCurrentBatchConfig.transition = prevTransition;
    }
  }

  function dispatchContinuousEvent(domEventName, eventSystemFlags, container, nativeEvent) {
    var previousPriority = getCurrentUpdatePriority();
    var prevTransition = ReactCurrentBatchConfig.transition;
    ReactCurrentBatchConfig.transition = null;

    try {
      setCurrentUpdatePriority(ContinuousEventPriority);
      dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
    } finally {
      setCurrentUpdatePriority(previousPriority);
      ReactCurrentBatchConfig.transition = prevTransition;
    }
  }

  function dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
    if (!_enabled) {
      return;
    }

    {
      dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay(domEventName, eventSystemFlags, targetContainer, nativeEvent);
    }
  }

  function dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
    var blockedOn = findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);

    if (blockedOn === null) {
      dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, return_targetInst, targetContainer);
      clearIfContinuousEvent(domEventName, nativeEvent);
      return;
    }

    if (queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent)) {
      nativeEvent.stopPropagation();
      return;
    } // We need to clear only if we didn't queue because
    // queueing is accumulative.


    clearIfContinuousEvent(domEventName, nativeEvent);

    if (eventSystemFlags & IS_CAPTURE_PHASE && isDiscreteEventThatRequiresHydration(domEventName)) {
      while (blockedOn !== null) {
        var fiber = getInstanceFromNode(blockedOn);

        if (fiber !== null) {
          attemptSynchronousHydration(fiber);
        }

        var nextBlockedOn = findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);

        if (nextBlockedOn === null) {
          dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, return_targetInst, targetContainer);
        }

        if (nextBlockedOn === blockedOn) {
          break;
        }

        blockedOn = nextBlockedOn;
      }

      if (blockedOn !== null) {
        nativeEvent.stopPropagation();
      }

      return;
    } // This is not replayable so we'll invoke it but without a target,
    // in case the event system needs to trace it.


    dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, null, targetContainer);
  }

  var return_targetInst = null; // Returns a SuspenseInstance or Container if it's blocked.
  // The return_targetInst field above is conceptually part of the return value.

  function findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
    // TODO: Warn if _enabled is false.
    return_targetInst = null;
    var nativeEventTarget = getEventTarget(nativeEvent);
    var targetInst = getClosestInstanceFromNode(nativeEventTarget);

    if (targetInst !== null) {
      var nearestMounted = getNearestMountedFiber(targetInst);

      if (nearestMounted === null) {
        // This tree has been unmounted already. Dispatch without a target.
        targetInst = null;
      } else {
        var tag = nearestMounted.tag;

        if (tag === SuspenseComponent) {
          var instance = getSuspenseInstanceFromFiber(nearestMounted);

          if (instance !== null) {
            // Queue the event to be replayed later. Abort dispatching since we
            // don't want this event dispatched twice through the event system.
            // TODO: If this is the first discrete event in the queue. Schedule an increased
            // priority for this boundary.
            return instance;
          } // This shouldn't happen, something went wrong but to avoid blocking
          // the whole system, dispatch the event without a target.
          // TODO: Warn.


          targetInst = null;
        } else if (tag === HostRoot) {
          var root = nearestMounted.stateNode;

          if (isRootDehydrated(root)) {
            // If this happens during a replay something went wrong and it might block
            // the whole system.
            return getContainerFromFiber(nearestMounted);
          }

          targetInst = null;
        } else if (nearestMounted !== targetInst) {
          // If we get an event (ex: img onload) before committing that
          // component's mount, ignore it for now (that is, treat it as if it was an
          // event on a non-React tree). We might also consider queueing events and
          // dispatching them after the mount.
          targetInst = null;
        }
      }
    }

    return_targetInst = targetInst; // We're not blocked on anything.

    return null;
  }
  function getEventPriority(domEventName) {
    switch (domEventName) {
      // Used by SimpleEventPlugin:
      case 'cancel':
      case 'click':
      case 'close':
      case 'contextmenu':
      case 'copy':
      case 'cut':
      case 'auxclick':
      case 'dblclick':
      case 'dragend':
      case 'dragstart':
      case 'drop':
      case 'focusin':
      case 'focusout':
      case 'input':
      case 'invalid':
      case 'keydown':
      case 'keypress':
      case 'keyup':
      case 'mousedown':
      case 'mouseup':
      case 'paste':
      case 'pause':
      case 'play':
      case 'pointercancel':
      case 'pointerdown':
      case 'pointerup':
      case 'ratechange':
      case 'reset':
      case 'resize':
      case 'seeked':
      case 'submit':
      case 'touchcancel':
      case 'touchend':
      case 'touchstart':
      case 'volumechange': // Used by polyfills:
      // eslint-disable-next-line no-fallthrough

      case 'change':
      case 'selectionchange':
      case 'textInput':
      case 'compositionstart':
      case 'compositionend':
      case 'compositionupdate': // Only enableCreateEventHandleAPI:
      // eslint-disable-next-line no-fallthrough

      case 'beforeblur':
      case 'afterblur': // Not used by React but could be by user code:
      // eslint-disable-next-line no-fallthrough

      case 'beforeinput':
      case 'blur':
      case 'fullscreenchange':
      case 'focus':
      case 'hashchange':
      case 'popstate':
      case 'select':
      case 'selectstart':
        return DiscreteEventPriority;

      case 'drag':
      case 'dragenter':
      case 'dragexit':
      case 'dragleave':
      case 'dragover':
      case 'mousemove':
      case 'mouseout':
      case 'mouseover':
      case 'pointermove':
      case 'pointerout':
      case 'pointerover':
      case 'scroll':
      case 'toggle':
      case 'touchmove':
      case 'wheel': // Not used by React but could be by user code:
      // eslint-disable-next-line no-fallthrough

      case 'mouseenter':
      case 'mouseleave':
      case 'pointerenter':
      case 'pointerleave':
        return ContinuousEventPriority;

      case 'message':
        {
          // We might be in the Scheduler callback.
          // Eventually this mechanism will be replaced by a check
          // of the current priority on the native scheduler.
          var schedulerPriority = getCurrentPriorityLevel();

          switch (schedulerPriority) {
            case ImmediatePriority:
              return DiscreteEventPriority;

            case UserBlockingPriority:
              return ContinuousEventPriority;

            case NormalPriority:
            case LowPriority:
              // TODO: Handle LowSchedulerPriority, somehow. Maybe the same lane as hydration.
              return DefaultEventPriority;

            case IdlePriority:
              return IdleEventPriority;

            default:
              return DefaultEventPriority;
          }
        }

      default:
        return DefaultEventPriority;
    }
  }

  function addEventBubbleListener(target, eventType, listener) {
    target.addEventListener(eventType, listener, false);
    return listener;
  }
  function addEventCaptureListener(target, eventType, listener) {
    target.addEventListener(eventType, listener, true);
    return listener;
  }
  function addEventCaptureListenerWithPassiveFlag(target, eventType, listener, passive) {
    target.addEventListener(eventType, listener, {
      capture: true,
      passive: passive
    });
    return listener;
  }
  function addEventBubbleListenerWithPassiveFlag(target, eventType, listener, passive) {
    target.addEventListener(eventType, listener, {
      passive: passive
    });
    return listener;
  }

  /**
   * These variables store information about text content of a target node,
   * allowing comparison of content before and after a given event.
   *
   * Identify the node where selection currently begins, then observe
   * both its text content and its current position in the DOM. Since the
   * browser may natively replace the target node during composition, we can
   * use its position to find its replacement.
   *
   *
   */
  var root = null;
  var startText = null;
  var fallbackText = null;
  function initialize(nativeEventTarget) {
    root = nativeEventTarget;
    startText = getText();
    return true;
  }
  function reset() {
    root = null;
    startText = null;
    fallbackText = null;
  }
  function getData() {
    if (fallbackText) {
      return fallbackText;
    }

    var start;
    var startValue = startText;
    var startLength = startValue.length;
    var end;
    var endValue = getText();
    var endLength = endValue.length;

    for (start = 0; start < startLength; start++) {
      if (startValue[start] !== endValue[start]) {
        break;
      }
    }

    var minEnd = startLength - start;

    for (end = 1; end <= minEnd; end++) {
      if (startValue[startLength - end] !== endValue[endLength - end]) {
        break;
      }
    }

    var sliceTail = end > 1 ? 1 - end : undefined;
    fallbackText = endValue.slice(start, sliceTail);
    return fallbackText;
  }
  function getText() {
    if ('value' in root) {
      return root.value;
    }

    return root.textContent;
  }

  /**
   * `charCode` represents the actual "character code" and is safe to use with
   * `String.fromCharCode`. As such, only keys that correspond to printable
   * characters produce a valid `charCode`, the only exception to this is Enter.
   * The Tab-key is considered non-printable and does not have a `charCode`,
   * presumably because it does not produce a tab-character in browsers.
   *
   * @param {object} nativeEvent Native browser event.
   * @return {number} Normalized `charCode` property.
   */
  function getEventCharCode(nativeEvent) {
    var charCode;
    var keyCode = nativeEvent.keyCode;

    if ('charCode' in nativeEvent) {
      charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.

      if (charCode === 0 && keyCode === 13) {
        charCode = 13;
      }
    } else {
      // IE8 does not implement `charCode`, but `keyCode` has the correct value.
      charCode = keyCode;
    } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
    // report Enter as charCode 10 when ctrl is pressed.


    if (charCode === 10) {
      charCode = 13;
    } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
    // Must not discard the (non-)printable Enter-key.


    if (charCode >= 32 || charCode === 13) {
      return charCode;
    }

    return 0;
  }

  function functionThatReturnsTrue() {
    return true;
  }

  function functionThatReturnsFalse() {
    return false;
  } // This is intentionally a factory so that we have different returned constructors.
  // If we had a single constructor, it would be megamorphic and engines would deopt.


  function createSyntheticEvent(Interface) {
    /**
     * Synthetic events are dispatched by event plugins, typically in response to a
     * top-level event delegation handler.
     *
     * These systems should generally use pooling to reduce the frequency of garbage
     * collection. The system should check `isPersistent` to determine whether the
     * event should be released into the pool after being dispatched. Users that
     * need a persisted event should invoke `persist`.
     *
     * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
     * normalizing browser quirks. Subclasses do not necessarily have to implement a
     * DOM interface; custom application-specific events can also subclass this.
     */
    function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {
      this._reactName = reactName;
      this._targetInst = targetInst;
      this.type = reactEventType;
      this.nativeEvent = nativeEvent;
      this.target = nativeEventTarget;
      this.currentTarget = null;

      for (var _propName in Interface) {
        if (!Interface.hasOwnProperty(_propName)) {
          continue;
        }

        var normalize = Interface[_propName];

        if (normalize) {
          this[_propName] = normalize(nativeEvent);
        } else {
          this[_propName] = nativeEvent[_propName];
        }
      }

      var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;

      if (defaultPrevented) {
        this.isDefaultPrevented = functionThatReturnsTrue;
      } else {
        this.isDefaultPrevented = functionThatReturnsFalse;
      }

      this.isPropagationStopped = functionThatReturnsFalse;
      return this;
    }

    assign(SyntheticBaseEvent.prototype, {
      preventDefault: function () {
        this.defaultPrevented = true;
        var event = this.nativeEvent;

        if (!event) {
          return;
        }

        if (event.preventDefault) {
          event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE
        } else if (typeof event.returnValue !== 'unknown') {
          event.returnValue = false;
        }

        this.isDefaultPrevented = functionThatReturnsTrue;
      },
      stopPropagation: function () {
        var event = this.nativeEvent;

        if (!event) {
          return;
        }

        if (event.stopPropagation) {
          event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE
        } else if (typeof event.cancelBubble !== 'unknown') {
          // The ChangeEventPlugin registers a "propertychange" event for
          // IE. This event does not support bubbling or cancelling, and
          // any references to cancelBubble throw "Member not found".  A
          // typeof check of "unknown" circumvents this issue (and is also
          // IE specific).
          event.cancelBubble = true;
        }

        this.isPropagationStopped = functionThatReturnsTrue;
      },

      /**
       * We release all dispatched `SyntheticEvent`s after each event loop, adding
       * them back into the pool. This allows a way to hold onto a reference that
       * won't be added back into the pool.
       */
      persist: function () {// Modern event system doesn't use pooling.
      },

      /**
       * Checks if this event should be released back into the pool.
       *
       * @return {boolean} True if this should not be released, false otherwise.
       */
      isPersistent: functionThatReturnsTrue
    });
    return SyntheticBaseEvent;
  }
  /**
   * @interface Event
   * @see http://www.w3.org/TR/DOM-Level-3-Events/
   */


  var EventInterface = {
    eventPhase: 0,
    bubbles: 0,
    cancelable: 0,
    timeStamp: function (event) {
      return event.timeStamp || Date.now();
    },
    defaultPrevented: 0,
    isTrusted: 0
  };
  var SyntheticEvent = createSyntheticEvent(EventInterface);

  var UIEventInterface = assign({}, EventInterface, {
    view: 0,
    detail: 0
  });

  var SyntheticUIEvent = createSyntheticEvent(UIEventInterface);
  var lastMovementX;
  var lastMovementY;
  var lastMouseEvent;

  function updateMouseMovementPolyfillState(event) {
    if (event !== lastMouseEvent) {
      if (lastMouseEvent && event.type === 'mousemove') {
        lastMovementX = event.screenX - lastMouseEvent.screenX;
        lastMovementY = event.screenY - lastMouseEvent.screenY;
      } else {
        lastMovementX = 0;
        lastMovementY = 0;
      }

      lastMouseEvent = event;
    }
  }
  /**
   * @interface MouseEvent
   * @see http://www.w3.org/TR/DOM-Level-3-Events/
   */


  var MouseEventInterface = assign({}, UIEventInterface, {
    screenX: 0,
    screenY: 0,
    clientX: 0,
    clientY: 0,
    pageX: 0,
    pageY: 0,
    ctrlKey: 0,
    shiftKey: 0,
    altKey: 0,
    metaKey: 0,
    getModifierState: getEventModifierState,
    button: 0,
    buttons: 0,
    relatedTarget: function (event) {
      if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;
      return event.relatedTarget;
    },
    movementX: function (event) {
      if ('movementX' in event) {
        return event.movementX;
      }

      updateMouseMovementPolyfillState(event);
      return lastMovementX;
    },
    movementY: function (event) {
      if ('movementY' in event) {
        return event.movementY;
      } // Don't need to call updateMouseMovementPolyfillState() here
      // because it's guaranteed to have already run when movementX
      // was copied.


      return lastMovementY;
    }
  });

  var SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);
  /**
   * @interface DragEvent
   * @see http://www.w3.org/TR/DOM-Level-3-Events/
   */

  var DragEventInterface = assign({}, MouseEventInterface, {
    dataTransfer: 0
  });

  var SyntheticDragEvent = createSyntheticEvent(DragEventInterface);
  /**
   * @interface FocusEvent
   * @see http://www.w3.org/TR/DOM-Level-3-Events/
   */

  var FocusEventInterface = assign({}, UIEventInterface, {
    relatedTarget: 0
  });

  var SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);
  /**
   * @interface Event
   * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
   * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
   */

  var AnimationEventInterface = assign({}, EventInterface, {
    animationName: 0,
    elapsedTime: 0,
    pseudoElement: 0
  });

  var SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);
  /**
   * @interface Event
   * @see http://www.w3.org/TR/clipboard-apis/
   */

  var ClipboardEventInterface = assign({}, EventInterface, {
    clipboardData: function (event) {
      return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
    }
  });

  var SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);
  /**
   * @interface Event
   * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
   */

  var CompositionEventInterface = assign({}, EventInterface, {
    data: 0
  });

  var SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);
  /**
   * @interface Event
   * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
   *      /#events-inputevents
   */
  // Happens to share the same list for now.

  var SyntheticInputEvent = SyntheticCompositionEvent;
  /**
   * Normalization of deprecated HTML5 `key` values
   * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
   */

  var normalizeKey = {
    Esc: 'Escape',
    Spacebar: ' ',
    Left: 'ArrowLeft',
    Up: 'ArrowUp',
    Right: 'ArrowRight',
    Down: 'ArrowDown',
    Del: 'Delete',
    Win: 'OS',
    Menu: 'ContextMenu',
    Apps: 'ContextMenu',
    Scroll: 'ScrollLock',
    MozPrintableKey: 'Unidentified'
  };
  /**
   * Translation from legacy `keyCode` to HTML5 `key`
   * Only special keys supported, all others depend on keyboard layout or browser
   * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
   */

  var translateToKey = {
    '8': 'Backspace',
    '9': 'Tab',
    '12': 'Clear',
    '13': 'Enter',
    '16': 'Shift',
    '17': 'Control',
    '18': 'Alt',
    '19': 'Pause',
    '20': 'CapsLock',
    '27': 'Escape',
    '32': ' ',
    '33': 'PageUp',
    '34': 'PageDown',
    '35': 'End',
    '36': 'Home',
    '37': 'ArrowLeft',
    '38': 'ArrowUp',
    '39': 'ArrowRight',
    '40': 'ArrowDown',
    '45': 'Insert',
    '46': 'Delete',
    '112': 'F1',
    '113': 'F2',
    '114': 'F3',
    '115': 'F4',
    '116': 'F5',
    '117': 'F6',
    '118': 'F7',
    '119': 'F8',
    '120': 'F9',
    '121': 'F10',
    '122': 'F11',
    '123': 'F12',
    '144': 'NumLock',
    '145': 'ScrollLock',
    '224': 'Meta'
  };
  /**
   * @param {object} nativeEvent Native browser event.
   * @return {string} Normalized `key` property.
   */

  function getEventKey(nativeEvent) {
    if (nativeEvent.key) {
      // Normalize inconsistent values reported by browsers due to
      // implementations of a working draft specification.
      // FireFox implements `key` but returns `MozPrintableKey` for all
      // printable characters (normalized to `Unidentified`), ignore it.
      var key = normalizeKey[nativeEvent.key] || nativeEvent.key;

      if (key !== 'Unidentified') {
        return key;
      }
    } // Browser does not implement `key`, polyfill as much of it as we can.


    if (nativeEvent.type === 'keypress') {
      var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can
      // thus be captured by `keypress`, no other non-printable key should.

      return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
    }

    if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
      // While user keyboard layout determines the actual meaning of each
      // `keyCode` value, almost all function keys have a universal value.
      return translateToKey[nativeEvent.keyCode] || 'Unidentified';
    }

    return '';
  }
  /**
   * Translation from modifier key to the associated property in the event.
   * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
   */


  var modifierKeyToProp = {
    Alt: 'altKey',
    Control: 'ctrlKey',
    Meta: 'metaKey',
    Shift: 'shiftKey'
  }; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
  // getModifierState. If getModifierState is not supported, we map it to a set of
  // modifier keys exposed by the event. In this case, Lock-keys are not supported.

  function modifierStateGetter(keyArg) {
    var syntheticEvent = this;
    var nativeEvent = syntheticEvent.nativeEvent;

    if (nativeEvent.getModifierState) {
      return nativeEvent.getModifierState(keyArg);
    }

    var keyProp = modifierKeyToProp[keyArg];
    return keyProp ? !!nativeEvent[keyProp] : false;
  }

  function getEventModifierState(nativeEvent) {
    return modifierStateGetter;
  }
  /**
   * @interface KeyboardEvent
   * @see http://www.w3.org/TR/DOM-Level-3-Events/
   */


  var KeyboardEventInterface = assign({}, UIEventInterface, {
    key: getEventKey,
    code: 0,
    location: 0,
    ctrlKey: 0,
    shiftKey: 0,
    altKey: 0,
    metaKey: 0,
    repeat: 0,
    locale: 0,
    getModifierState: getEventModifierState,
    // Legacy Interface
    charCode: function (event) {
      // `charCode` is the result of a KeyPress event and represents the value of
      // the actual printable character.
      // KeyPress is deprecated, but its replacement is not yet final and not
      // implemented in any major browser. Only KeyPress has charCode.
      if (event.type === 'keypress') {
        return getEventCharCode(event);
      }

      return 0;
    },
    keyCode: function (event) {
      // `keyCode` is the result of a KeyDown/Up event and represents the value of
      // physical keyboard key.
      // The actual meaning of the value depends on the users' keyboard layout
      // which cannot be detected. Assuming that it is a US keyboard layout
      // provides a surprisingly accurate mapping for US and European users.
      // Due to this, it is left to the user to implement at this time.
      if (event.type === 'keydown' || event.type === 'keyup') {
        return event.keyCode;
      }

      return 0;
    },
    which: function (event) {
      // `which` is an alias for either `keyCode` or `charCode` depending on the
      // type of the event.
      if (event.type === 'keypress') {
        return getEventCharCode(event);
      }

      if (event.type === 'keydown' || event.type === 'keyup') {
        return event.keyCode;
      }

      return 0;
    }
  });

  var SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);
  /**
   * @interface PointerEvent
   * @see http://www.w3.org/TR/pointerevents/
   */

  var PointerEventInterface = assign({}, MouseEventInterface, {
    pointerId: 0,
    width: 0,
    height: 0,
    pressure: 0,
    tangentialPressure: 0,
    tiltX: 0,
    tiltY: 0,
    twist: 0,
    pointerType: 0,
    isPrimary: 0
  });

  var SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);
  /**
   * @interface TouchEvent
   * @see http://www.w3.org/TR/touch-events/
   */

  var TouchEventInterface = assign({}, UIEventInterface, {
    touches: 0,
    targetTouches: 0,
    changedTouches: 0,
    altKey: 0,
    metaKey: 0,
    ctrlKey: 0,
    shiftKey: 0,
    getModifierState: getEventModifierState
  });

  var SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);
  /**
   * @interface Event
   * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
   * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
   */

  var TransitionEventInterface = assign({}, EventInterface, {
    propertyName: 0,
    elapsedTime: 0,
    pseudoElement: 0
  });

  var SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);
  /**
   * @interface WheelEvent
   * @see http://www.w3.org/TR/DOM-Level-3-Events/
   */

  var WheelEventInterface = assign({}, MouseEventInterface, {
    deltaX: function (event) {
      return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
      'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
    },
    deltaY: function (event) {
      return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
      'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
      'wheelDelta' in event ? -event.wheelDelta : 0;
    },
    deltaZ: 0,
    // Browsers without "deltaMode" is reporting in raw wheel delta where one
    // notch on the scroll is always +/- 120, roughly equivalent to pixels.
    // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
    // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
    deltaMode: 0
  });

  var SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);

  var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space

  var START_KEYCODE = 229;
  var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;
  var documentMode = null;

  if (canUseDOM && 'documentMode' in document) {
    documentMode = document.documentMode;
  } // Webkit offers a very useful `textInput` event that can be used to
  // directly represent `beforeInput`. The IE `textinput` event is not as
  // useful, so we don't use it.


  var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied
  // by the native compositionend event may be incorrect. Japanese ideographic
  // spaces, for instance (\u3000) are not recorded correctly.

  var useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
  var SPACEBAR_CODE = 32;
  var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);

  function registerEvents() {
    registerTwoPhaseEvent('onBeforeInput', ['compositionend', 'keypress', 'textInput', 'paste']);
    registerTwoPhaseEvent('onCompositionEnd', ['compositionend', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
    registerTwoPhaseEvent('onCompositionStart', ['compositionstart', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
    registerTwoPhaseEvent('onCompositionUpdate', ['compositionupdate', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
  } // Track whether we've ever handled a keypress on the space key.


  var hasSpaceKeypress = false;
  /**
   * Return whether a native keypress event is assumed to be a command.
   * This is required because Firefox fires `keypress` events for key commands
   * (cut, copy, select-all, etc.) even though no character is inserted.
   */

  function isKeypressCommand(nativeEvent) {
    return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.
    !(nativeEvent.ctrlKey && nativeEvent.altKey);
  }
  /**
   * Translate native top level events into event types.
   */


  function getCompositionEventType(domEventName) {
    switch (domEventName) {
      case 'compositionstart':
        return 'onCompositionStart';

      case 'compositionend':
        return 'onCompositionEnd';

      case 'compositionupdate':
        return 'onCompositionUpdate';
    }
  }
  /**
   * Does our fallback best-guess model think this event signifies that
   * composition has begun?
   */


  function isFallbackCompositionStart(domEventName, nativeEvent) {
    return domEventName === 'keydown' && nativeEvent.keyCode === START_KEYCODE;
  }
  /**
   * Does our fallback mode think that this event is the end of composition?
   */


  function isFallbackCompositionEnd(domEventName, nativeEvent) {
    switch (domEventName) {
      case 'keyup':
        // Command keys insert or clear IME input.
        return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;

      case 'keydown':
        // Expect IME keyCode on each keydown. If we get any other
        // code we must have exited earlier.
        return nativeEvent.keyCode !== START_KEYCODE;

      case 'keypress':
      case 'mousedown':
      case 'focusout':
        // Events are not possible without cancelling IME.
        return true;

      default:
        return false;
    }
  }
  /**
   * Google Input Tools provides composition data via a CustomEvent,
   * with the `data` property populated in the `detail` object. If this
   * is available on the event object, use it. If not, this is a plain
   * composition event and we have nothing special to extract.
   *
   * @param {object} nativeEvent
   * @return {?string}
   */


  function getDataFromCustomEvent(nativeEvent) {
    var detail = nativeEvent.detail;

    if (typeof detail === 'object' && 'data' in detail) {
      return detail.data;
    }

    return null;
  }
  /**
   * Check if a composition event was triggered by Korean IME.
   * Our fallback mode does not work well with IE's Korean IME,
   * so just use native composition events when Korean IME is used.
   * Although CompositionEvent.locale property is deprecated,
   * it is available in IE, where our fallback mode is enabled.
   *
   * @param {object} nativeEvent
   * @return {boolean}
   */


  function isUsingKoreanIME(nativeEvent) {
    return nativeEvent.locale === 'ko';
  } // Track the current IME composition status, if any.


  var isComposing = false;
  /**
   * @return {?object} A SyntheticCompositionEvent.
   */

  function extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {
    var eventType;
    var fallbackData;

    if (canUseCompositionEvent) {
      eventType = getCompositionEventType(domEventName);
    } else if (!isComposing) {
      if (isFallbackCompositionStart(domEventName, nativeEvent)) {
        eventType = 'onCompositionStart';
      }
    } else if (isFallbackCompositionEnd(domEventName, nativeEvent)) {
      eventType = 'onCompositionEnd';
    }

    if (!eventType) {
      return null;
    }

    if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {
      // The current composition is stored statically and must not be
      // overwritten while composition continues.
      if (!isComposing && eventType === 'onCompositionStart') {
        isComposing = initialize(nativeEventTarget);
      } else if (eventType === 'onCompositionEnd') {
        if (isComposing) {
          fallbackData = getData();
        }
      }
    }

    var listeners = accumulateTwoPhaseListeners(targetInst, eventType);

    if (listeners.length > 0) {
      var event = new SyntheticCompositionEvent(eventType, domEventName, null, nativeEvent, nativeEventTarget);
      dispatchQueue.push({
        event: event,
        listeners: listeners
      });

      if (fallbackData) {
        // Inject data generated from fallback path into the synthetic event.
        // This matches the property of native CompositionEventInterface.
        event.data = fallbackData;
      } else {
        var customData = getDataFromCustomEvent(nativeEvent);

        if (customData !== null) {
          event.data = customData;
        }
      }
    }
  }

  function getNativeBeforeInputChars(domEventName, nativeEvent) {
    switch (domEventName) {
      case 'compositionend':
        return getDataFromCustomEvent(nativeEvent);

      case 'keypress':
        /**
         * If native `textInput` events are available, our goal is to make
         * use of them. However, there is a special case: the spacebar key.
         * In Webkit, preventing default on a spacebar `textInput` event
         * cancels character insertion, but it *also* causes the browser
         * to fall back to its default spacebar behavior of scrolling the
         * page.
         *
         * Tracking at:
         * https://code.google.com/p/chromium/issues/detail?id=355103
         *
         * To avoid this issue, use the keypress event as if no `textInput`
         * event is available.
         */
        var which = nativeEvent.which;

        if (which !== SPACEBAR_CODE) {
          return null;
        }

        hasSpaceKeypress = true;
        return SPACEBAR_CHAR;

      case 'textInput':
        // Record the characters to be added to the DOM.
        var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled
        // it at the keypress level and bail immediately. Android Chrome
        // doesn't give us keycodes, so we need to ignore it.

        if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
          return null;
        }

        return chars;

      default:
        // For other native event types, do nothing.
        return null;
    }
  }
  /**
   * For browsers that do not provide the `textInput` event, extract the
   * appropriate string to use for SyntheticInputEvent.
   */


  function getFallbackBeforeInputChars(domEventName, nativeEvent) {
    // If we are currently composing (IME) and using a fallback to do so,
    // try to extract the composed characters from the fallback object.
    // If composition event is available, we extract a string only at
    // compositionevent, otherwise extract it at fallback events.
    if (isComposing) {
      if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {
        var chars = getData();
        reset();
        isComposing = false;
        return chars;
      }

      return null;
    }

    switch (domEventName) {
      case 'paste':
        // If a paste event occurs after a keypress, throw out the input
        // chars. Paste events should not lead to BeforeInput events.
        return null;

      case 'keypress':
        /**
         * As of v27, Firefox may fire keypress events even when no character
         * will be inserted. A few possibilities:
         *
         * - `which` is `0`. Arrow keys, Esc key, etc.
         *
         * - `which` is the pressed key code, but no char is available.
         *   Ex: 'AltGr + d` in Polish. There is no modified character for
         *   this key combination and no character is inserted into the
         *   document, but FF fires the keypress for char code `100` anyway.
         *   No `input` event will occur.
         *
         * - `which` is the pressed key code, but a command combination is
         *   being used. Ex: `Cmd+C`. No character is inserted, and no
         *   `input` event will occur.
         */
        if (!isKeypressCommand(nativeEvent)) {
          // IE fires the `keypress` event when a user types an emoji via
          // Touch keyboard of Windows.  In such a case, the `char` property
          // holds an emoji character like `\uD83D\uDE0A`.  Because its length
          // is 2, the property `which` does not represent an emoji correctly.
          // In such a case, we directly return the `char` property instead of
          // using `which`.
          if (nativeEvent.char && nativeEvent.char.length > 1) {
            return nativeEvent.char;
          } else if (nativeEvent.which) {
            return String.fromCharCode(nativeEvent.which);
          }
        }

        return null;

      case 'compositionend':
        return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;

      default:
        return null;
    }
  }
  /**
   * Extract a SyntheticInputEvent for `beforeInput`, based on either native
   * `textInput` or fallback behavior.
   *
   * @return {?object} A SyntheticInputEvent.
   */


  function extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {
    var chars;

    if (canUseTextInputEvent) {
      chars = getNativeBeforeInputChars(domEventName, nativeEvent);
    } else {
      chars = getFallbackBeforeInputChars(domEventName, nativeEvent);
    } // If no characters are being inserted, no BeforeInput event should
    // be fired.


    if (!chars) {
      return null;
    }

    var listeners = accumulateTwoPhaseListeners(targetInst, 'onBeforeInput');

    if (listeners.length > 0) {
      var event = new SyntheticInputEvent('onBeforeInput', 'beforeinput', null, nativeEvent, nativeEventTarget);
      dispatchQueue.push({
        event: event,
        listeners: listeners
      });
      event.data = chars;
    }
  }
  /**
   * Create an `onBeforeInput` event to match
   * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
   *
   * This event plugin is based on the native `textInput` event
   * available in Chrome, Safari, Opera, and IE. This event fires after
   * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
   *
   * `beforeInput` is spec'd but not implemented in any browsers, and
   * the `input` event does not provide any useful information about what has
   * actually been added, contrary to the spec. Thus, `textInput` is the best
   * available event to identify the characters that have actually been inserted
   * into the target node.
   *
   * This plugin is also responsible for emitting `composition` events, thus
   * allowing us to share composition fallback code for both `beforeInput` and
   * `composition` event types.
   */


  function extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
    extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
    extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
  }

  /**
   * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
   */
  var supportedInputTypes = {
    color: true,
    date: true,
    datetime: true,
    'datetime-local': true,
    email: true,
    month: true,
    number: true,
    password: true,
    range: true,
    search: true,
    tel: true,
    text: true,
    time: true,
    url: true,
    week: true
  };

  function isTextInputElement(elem) {
    var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();

    if (nodeName === 'input') {
      return !!supportedInputTypes[elem.type];
    }

    if (nodeName === 'textarea') {
      return true;
    }

    return false;
  }

  /**
   * Checks if an event is supported in the current execution environment.
   *
   * NOTE: This will not work correctly for non-generic events such as `change`,
   * `reset`, `load`, `error`, and `select`.
   *
   * Borrows from Modernizr.
   *
   * @param {string} eventNameSuffix Event name, e.g. "click".
   * @return {boolean} True if the event is supported.
   * @internal
   * @license Modernizr 3.0.0pre (Custom Build) | MIT
   */

  function isEventSupported(eventNameSuffix) {
    if (!canUseDOM) {
      return false;
    }

    var eventName = 'on' + eventNameSuffix;
    var isSupported = (eventName in document);

    if (!isSupported) {
      var element = document.createElement('div');
      element.setAttribute(eventName, 'return;');
      isSupported = typeof element[eventName] === 'function';
    }

    return isSupported;
  }

  function registerEvents$1() {
    registerTwoPhaseEvent('onChange', ['change', 'click', 'focusin', 'focusout', 'input', 'keydown', 'keyup', 'selectionchange']);
  }

  function createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {
    // Flag this event loop as needing state restore.
    enqueueStateRestore(target);
    var listeners = accumulateTwoPhaseListeners(inst, 'onChange');

    if (listeners.length > 0) {
      var event = new SyntheticEvent('onChange', 'change', null, nativeEvent, target);
      dispatchQueue.push({
        event: event,
        listeners: listeners
      });
    }
  }
  /**
   * For IE shims
   */


  var activeElement = null;
  var activeElementInst = null;
  /**
   * SECTION: handle `change` event
   */

  function shouldUseChangeEvent(elem) {
    var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
    return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
  }

  function manualDispatchChangeEvent(nativeEvent) {
    var dispatchQueue = [];
    createAndAccumulateChangeEvent(dispatchQueue, activeElementInst, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the
    // other events and have it go through ReactBrowserEventEmitter. Since it
    // doesn't, we manually listen for the events and so we have to enqueue and
    // process the abstract event manually.
    //
    // Batching is necessary here in order to ensure that all event handlers run
    // before the next rerender (including event handlers attached to ancestor
    // elements instead of directly on the input). Without this, controlled
    // components don't work properly in conjunction with event bubbling because
    // the component is rerendered and the value reverted before all the event
    // handlers can run. See https://github.com/facebook/react/issues/708.

    batchedUpdates(runEventInBatch, dispatchQueue);
  }

  function runEventInBatch(dispatchQueue) {
    processDispatchQueue(dispatchQueue, 0);
  }

  function getInstIfValueChanged(targetInst) {
    var targetNode = getNodeFromInstance(targetInst);

    if (updateValueIfChanged(targetNode)) {
      return targetInst;
    }
  }

  function getTargetInstForChangeEvent(domEventName, targetInst) {
    if (domEventName === 'change') {
      return targetInst;
    }
  }
  /**
   * SECTION: handle `input` event
   */


  var isInputEventSupported = false;

  if (canUseDOM) {
    // IE9 claims to support the input event but fails to trigger it when
    // deleting text, so we ignore its input events.
    isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);
  }
  /**
   * (For IE <=9) Starts tracking propertychange events on the passed-in element
   * and override the value property so that we can distinguish user events from
   * value changes in JS.
   */


  function startWatchingForValueChange(target, targetInst) {
    activeElement = target;
    activeElementInst = targetInst;
    activeElement.attachEvent('onpropertychange', handlePropertyChange);
  }
  /**
   * (For IE <=9) Removes the event listeners from the currently-tracked element,
   * if any exists.
   */


  function stopWatchingForValueChange() {
    if (!activeElement) {
      return;
    }

    activeElement.detachEvent('onpropertychange', handlePropertyChange);
    activeElement = null;
    activeElementInst = null;
  }
  /**
   * (For IE <=9) Handles a propertychange event, sending a `change` event if
   * the value of the active element has changed.
   */


  function handlePropertyChange(nativeEvent) {
    if (nativeEvent.propertyName !== 'value') {
      return;
    }

    if (getInstIfValueChanged(activeElementInst)) {
      manualDispatchChangeEvent(nativeEvent);
    }
  }

  function handleEventsForInputEventPolyfill(domEventName, target, targetInst) {
    if (domEventName === 'focusin') {
      // In IE9, propertychange fires for most input events but is buggy and
      // doesn't fire when text is deleted, but conveniently, selectionchange
      // appears to fire in all of the remaining cases so we catch those and
      // forward the event if the value has changed
      // In either case, we don't want to call the event handler if the value
      // is changed from JS so we redefine a setter for `.value` that updates
      // our activeElementValue variable, allowing us to ignore those changes
      //
      // stopWatching() should be a noop here but we call it just in case we
      // missed a blur event somehow.
      stopWatchingForValueChange();
      startWatchingForValueChange(target, targetInst);
    } else if (domEventName === 'focusout') {
      stopWatchingForValueChange();
    }
  } // For IE8 and IE9.


  function getTargetInstForInputEventPolyfill(domEventName, targetInst) {
    if (domEventName === 'selectionchange' || domEventName === 'keyup' || domEventName === 'keydown') {
      // On the selectionchange event, the target is just document which isn't
      // helpful for us so just check activeElement instead.
      //
      // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
      // propertychange on the first input event after setting `value` from a
      // script and fires only keydown, keypress, keyup. Catching keyup usually
      // gets it and catching keydown lets us fire an event for the first
      // keystroke if user does a key repeat (it'll be a little delayed: right
      // before the second keystroke). Other input methods (e.g., paste) seem to
      // fire selectionchange normally.
      return getInstIfValueChanged(activeElementInst);
    }
  }
  /**
   * SECTION: handle `click` event
   */


  function shouldUseClickEvent(elem) {
    // Use the `click` event to detect changes to checkbox and radio inputs.
    // This approach works across all browsers, whereas `change` does not fire
    // until `blur` in IE8.
    var nodeName = elem.nodeName;
    return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
  }

  function getTargetInstForClickEvent(domEventName, targetInst) {
    if (domEventName === 'click') {
      return getInstIfValueChanged(targetInst);
    }
  }

  function getTargetInstForInputOrChangeEvent(domEventName, targetInst) {
    if (domEventName === 'input' || domEventName === 'change') {
      return getInstIfValueChanged(targetInst);
    }
  }

  function handleControlledInputBlur(node) {
    var state = node._wrapperState;

    if (!state || !state.controlled || node.type !== 'number') {
      return;
    }

    {
      // If controlled, assign the value attribute to the current value on blur
      setDefaultValue(node, 'number', node.value);
    }
  }
  /**
   * This plugin creates an `onChange` event that normalizes change events
   * across form elements. This event fires at a time when it's possible to
   * change the element's value without seeing a flicker.
   *
   * Supported elements are:
   * - input (see `isTextInputElement`)
   * - textarea
   * - select
   */


  function extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
    var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;
    var getTargetInstFunc, handleEventFunc;

    if (shouldUseChangeEvent(targetNode)) {
      getTargetInstFunc = getTargetInstForChangeEvent;
    } else if (isTextInputElement(targetNode)) {
      if (isInputEventSupported) {
        getTargetInstFunc = getTargetInstForInputOrChangeEvent;
      } else {
        getTargetInstFunc = getTargetInstForInputEventPolyfill;
        handleEventFunc = handleEventsForInputEventPolyfill;
      }
    } else if (shouldUseClickEvent(targetNode)) {
      getTargetInstFunc = getTargetInstForClickEvent;
    }

    if (getTargetInstFunc) {
      var inst = getTargetInstFunc(domEventName, targetInst);

      if (inst) {
        createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, nativeEventTarget);
        return;
      }
    }

    if (handleEventFunc) {
      handleEventFunc(domEventName, targetNode, targetInst);
    } // When blurring, set the value attribute for number inputs


    if (domEventName === 'focusout') {
      handleControlledInputBlur(targetNode);
    }
  }

  function registerEvents$2() {
    registerDirectEvent('onMouseEnter', ['mouseout', 'mouseover']);
    registerDirectEvent('onMouseLeave', ['mouseout', 'mouseover']);
    registerDirectEvent('onPointerEnter', ['pointerout', 'pointerover']);
    registerDirectEvent('onPointerLeave', ['pointerout', 'pointerover']);
  }
  /**
   * For almost every interaction we care about, there will be both a top-level
   * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
   * we do not extract duplicate events. However, moving the mouse into the
   * browser from outside will not fire a `mouseout` event. In this case, we use
   * the `mouseover` top-level event.
   */


  function extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
    var isOverEvent = domEventName === 'mouseover' || domEventName === 'pointerover';
    var isOutEvent = domEventName === 'mouseout' || domEventName === 'pointerout';

    if (isOverEvent && !isReplayingEvent(nativeEvent)) {
      // If this is an over event with a target, we might have already dispatched
      // the event in the out event of the other target. If this is replayed,
      // then it's because we couldn't dispatch against this target previously
      // so we have to do it now instead.
      var related = nativeEvent.relatedTarget || nativeEvent.fromElement;

      if (related) {
        // If the related node is managed by React, we can assume that we have
        // already dispatched the corresponding events during its mouseout.
        if (getClosestInstanceFromNode(related) || isContainerMarkedAsRoot(related)) {
          return;
        }
      }
    }

    if (!isOutEvent && !isOverEvent) {
      // Must not be a mouse or pointer in or out - ignoring.
      return;
    }

    var win; // TODO: why is this nullable in the types but we read from it?

    if (nativeEventTarget.window === nativeEventTarget) {
      // `nativeEventTarget` is probably a window object.
      win = nativeEventTarget;
    } else {
      // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
      var doc = nativeEventTarget.ownerDocument;

      if (doc) {
        win = doc.defaultView || doc.parentWindow;
      } else {
        win = window;
      }
    }

    var from;
    var to;

    if (isOutEvent) {
      var _related = nativeEvent.relatedTarget || nativeEvent.toElement;

      from = targetInst;
      to = _related ? getClosestInstanceFromNode(_related) : null;

      if (to !== null) {
        var nearestMounted = getNearestMountedFiber(to);

        if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) {
          to = null;
        }
      }
    } else {
      // Moving to a node from outside the window.
      from = null;
      to = targetInst;
    }

    if (from === to) {
      // Nothing pertains to our managed components.
      return;
    }

    var SyntheticEventCtor = SyntheticMouseEvent;
    var leaveEventType = 'onMouseLeave';
    var enterEventType = 'onMouseEnter';
    var eventTypePrefix = 'mouse';

    if (domEventName === 'pointerout' || domEventName === 'pointerover') {
      SyntheticEventCtor = SyntheticPointerEvent;
      leaveEventType = 'onPointerLeave';
      enterEventType = 'onPointerEnter';
      eventTypePrefix = 'pointer';
    }

    var fromNode = from == null ? win : getNodeFromInstance(from);
    var toNode = to == null ? win : getNodeFromInstance(to);
    var leave = new SyntheticEventCtor(leaveEventType, eventTypePrefix + 'leave', from, nativeEvent, nativeEventTarget);
    leave.target = fromNode;
    leave.relatedTarget = toNode;
    var enter = null; // We should only process this nativeEvent if we are processing
    // the first ancestor. Next time, we will ignore the event.

    var nativeTargetInst = getClosestInstanceFromNode(nativeEventTarget);

    if (nativeTargetInst === targetInst) {
      var enterEvent = new SyntheticEventCtor(enterEventType, eventTypePrefix + 'enter', to, nativeEvent, nativeEventTarget);
      enterEvent.target = toNode;
      enterEvent.relatedTarget = fromNode;
      enter = enterEvent;
    }

    accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leave, enter, from, to);
  }

  /**
   * inlined Object.is polyfill to avoid requiring consumers ship their own
   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
   */
  function is(x, y) {
    return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
    ;
  }

  var objectIs = typeof Object.is === 'function' ? Object.is : is;

  /**
   * Performs equality by iterating through keys on an object and returning false
   * when any key has values which are not strictly equal between the arguments.
   * Returns true when the values of all keys are strictly equal.
   */

  function shallowEqual(objA, objB) {
    if (objectIs(objA, objB)) {
      return true;
    }

    if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
      return false;
    }

    var keysA = Object.keys(objA);
    var keysB = Object.keys(objB);

    if (keysA.length !== keysB.length) {
      return false;
    } // Test for A's keys different from B.


    for (var i = 0; i < keysA.length; i++) {
      var currentKey = keysA[i];

      if (!hasOwnProperty.call(objB, currentKey) || !objectIs(objA[currentKey], objB[currentKey])) {
        return false;
      }
    }

    return true;
  }

  /**
   * Given any node return the first leaf node without children.
   *
   * @param {DOMElement|DOMTextNode} node
   * @return {DOMElement|DOMTextNode}
   */

  function getLeafNode(node) {
    while (node && node.firstChild) {
      node = node.firstChild;
    }

    return node;
  }
  /**
   * Get the next sibling within a container. This will walk up the
   * DOM if a node's siblings have been exhausted.
   *
   * @param {DOMElement|DOMTextNode} node
   * @return {?DOMElement|DOMTextNode}
   */


  function getSiblingNode(node) {
    while (node) {
      if (node.nextSibling) {
        return node.nextSibling;
      }

      node = node.parentNode;
    }
  }
  /**
   * Get object describing the nodes which contain characters at offset.
   *
   * @param {DOMElement|DOMTextNode} root
   * @param {number} offset
   * @return {?object}
   */


  function getNodeForCharacterOffset(root, offset) {
    var node = getLeafNode(root);
    var nodeStart = 0;
    var nodeEnd = 0;

    while (node) {
      if (node.nodeType === TEXT_NODE) {
        nodeEnd = nodeStart + node.textContent.length;

        if (nodeStart <= offset && nodeEnd >= offset) {
          return {
            node: node,
            offset: offset - nodeStart
          };
        }

        nodeStart = nodeEnd;
      }

      node = getLeafNode(getSiblingNode(node));
    }
  }

  /**
   * @param {DOMElement} outerNode
   * @return {?object}
   */

  function getOffsets(outerNode) {
    var ownerDocument = outerNode.ownerDocument;
    var win = ownerDocument && ownerDocument.defaultView || window;
    var selection = win.getSelection && win.getSelection();

    if (!selection || selection.rangeCount === 0) {
      return null;
    }

    var anchorNode = selection.anchorNode,
        anchorOffset = selection.anchorOffset,
        focusNode = selection.focusNode,
        focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the
    // up/down buttons on an <input type="number">. Anonymous divs do not seem to
    // expose properties, triggering a "Permission denied error" if any of its
    // properties are accessed. The only seemingly possible way to avoid erroring
    // is to access a property that typically works for non-anonymous divs and
    // catch any error that may otherwise arise. See
    // https://bugzilla.mozilla.org/show_bug.cgi?id=208427

    try {
      /* eslint-disable no-unused-expressions */
      anchorNode.nodeType;
      focusNode.nodeType;
      /* eslint-enable no-unused-expressions */
    } catch (e) {
      return null;
    }

    return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);
  }
  /**
   * Returns {start, end} where `start` is the character/codepoint index of
   * (anchorNode, anchorOffset) within the textContent of `outerNode`, and
   * `end` is the index of (focusNode, focusOffset).
   *
   * Returns null if you pass in garbage input but we should probably just crash.
   *
   * Exported only for testing.
   */

  function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {
    var length = 0;
    var start = -1;
    var end = -1;
    var indexWithinAnchor = 0;
    var indexWithinFocus = 0;
    var node = outerNode;
    var parentNode = null;

    outer: while (true) {
      var next = null;

      while (true) {
        if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {
          start = length + anchorOffset;
        }

        if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {
          end = length + focusOffset;
        }

        if (node.nodeType === TEXT_NODE) {
          length += node.nodeValue.length;
        }

        if ((next = node.firstChild) === null) {
          break;
        } // Moving from `node` to its first child `next`.


        parentNode = node;
        node = next;
      }

      while (true) {
        if (node === outerNode) {
          // If `outerNode` has children, this is always the second time visiting
          // it. If it has no children, this is still the first loop, and the only
          // valid selection is anchorNode and focusNode both equal to this node
          // and both offsets 0, in which case we will have handled above.
          break outer;
        }

        if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {
          start = length;
        }

        if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {
          end = length;
        }

        if ((next = node.nextSibling) !== null) {
          break;
        }

        node = parentNode;
        parentNode = node.parentNode;
      } // Moving from `node` to its next sibling `next`.


      node = next;
    }

    if (start === -1 || end === -1) {
      // This should never happen. (Would happen if the anchor/focus nodes aren't
      // actually inside the passed-in node.)
      return null;
    }

    return {
      start: start,
      end: end
    };
  }
  /**
   * In modern non-IE browsers, we can support both forward and backward
   * selections.
   *
   * Note: IE10+ supports the Selection object, but it does not support
   * the `extend` method, which means that even in modern IE, it's not possible
   * to programmatically create a backward selection. Thus, for all IE
   * versions, we use the old IE API to create our selections.
   *
   * @param {DOMElement|DOMTextNode} node
   * @param {object} offsets
   */

  function setOffsets(node, offsets) {
    var doc = node.ownerDocument || document;
    var win = doc && doc.defaultView || window; // Edge fails with "Object expected" in some scenarios.
    // (For instance: TinyMCE editor used in a list component that supports pasting to add more,
    // fails when pasting 100+ items)

    if (!win.getSelection) {
      return;
    }

    var selection = win.getSelection();
    var length = node.textContent.length;
    var start = Math.min(offsets.start, length);
    var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method.
    // Flip backward selections, so we can set with a single range.

    if (!selection.extend && start > end) {
      var temp = end;
      end = start;
      start = temp;
    }

    var startMarker = getNodeForCharacterOffset(node, start);
    var endMarker = getNodeForCharacterOffset(node, end);

    if (startMarker && endMarker) {
      if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {
        return;
      }

      var range = doc.createRange();
      range.setStart(startMarker.node, startMarker.offset);
      selection.removeAllRanges();

      if (start > end) {
        selection.addRange(range);
        selection.extend(endMarker.node, endMarker.offset);
      } else {
        range.setEnd(endMarker.node, endMarker.offset);
        selection.addRange(range);
      }
    }
  }

  function isTextNode(node) {
    return node && node.nodeType === TEXT_NODE;
  }

  function containsNode(outerNode, innerNode) {
    if (!outerNode || !innerNode) {
      return false;
    } else if (outerNode === innerNode) {
      return true;
    } else if (isTextNode(outerNode)) {
      return false;
    } else if (isTextNode(innerNode)) {
      return containsNode(outerNode, innerNode.parentNode);
    } else if ('contains' in outerNode) {
      return outerNode.contains(innerNode);
    } else if (outerNode.compareDocumentPosition) {
      return !!(outerNode.compareDocumentPosition(innerNode) & 16);
    } else {
      return false;
    }
  }

  function isInDocument(node) {
    return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);
  }

  function isSameOriginFrame(iframe) {
    try {
      // Accessing the contentDocument of a HTMLIframeElement can cause the browser
      // to throw, e.g. if it has a cross-origin src attribute.
      // Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g:
      // iframe.contentDocument.defaultView;
      // A safety way is to access one of the cross origin properties: Window or Location
      // Which might result in "SecurityError" DOM Exception and it is compatible to Safari.
      // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl
      return typeof iframe.contentWindow.location.href === 'string';
    } catch (err) {
      return false;
    }
  }

  function getActiveElementDeep() {
    var win = window;
    var element = getActiveElement();

    while (element instanceof win.HTMLIFrameElement) {
      if (isSameOriginFrame(element)) {
        win = element.contentWindow;
      } else {
        return element;
      }

      element = getActiveElement(win.document);
    }

    return element;
  }
  /**
   * @ReactInputSelection: React input selection module. Based on Selection.js,
   * but modified to be suitable for react and has a couple of bug fixes (doesn't
   * assume buttons have range selections allowed).
   * Input selection module for React.
   */

  /**
   * @hasSelectionCapabilities: we get the element types that support selection
   * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`
   * and `selectionEnd` rows.
   */


  function hasSelectionCapabilities(elem) {
    var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
    return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');
  }
  function getSelectionInformation() {
    var focusedElem = getActiveElementDeep();
    return {
      focusedElem: focusedElem,
      selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null
    };
  }
  /**
   * @restoreSelection: If any selection information was potentially lost,
   * restore it. This is useful when performing operations that could remove dom
   * nodes and place them back in, resulting in focus being lost.
   */

  function restoreSelection(priorSelectionInformation) {
    var curFocusedElem = getActiveElementDeep();
    var priorFocusedElem = priorSelectionInformation.focusedElem;
    var priorSelectionRange = priorSelectionInformation.selectionRange;

    if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
      if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {
        setSelection(priorFocusedElem, priorSelectionRange);
      } // Focusing a node can change the scroll position, which is undesirable


      var ancestors = [];
      var ancestor = priorFocusedElem;

      while (ancestor = ancestor.parentNode) {
        if (ancestor.nodeType === ELEMENT_NODE) {
          ancestors.push({
            element: ancestor,
            left: ancestor.scrollLeft,
            top: ancestor.scrollTop
          });
        }
      }

      if (typeof priorFocusedElem.focus === 'function') {
        priorFocusedElem.focus();
      }

      for (var i = 0; i < ancestors.length; i++) {
        var info = ancestors[i];
        info.element.scrollLeft = info.left;
        info.element.scrollTop = info.top;
      }
    }
  }
  /**
   * @getSelection: Gets the selection bounds of a focused textarea, input or
   * contentEditable node.
   * -@input: Look up selection bounds of this input
   * -@return {start: selectionStart, end: selectionEnd}
   */

  function getSelection(input) {
    var selection;

    if ('selectionStart' in input) {
      // Modern browser with input or textarea.
      selection = {
        start: input.selectionStart,
        end: input.selectionEnd
      };
    } else {
      // Content editable or old IE textarea.
      selection = getOffsets(input);
    }

    return selection || {
      start: 0,
      end: 0
    };
  }
  /**
   * @setSelection: Sets the selection bounds of a textarea or input and focuses
   * the input.
   * -@input     Set selection bounds of this input or textarea
   * -@offsets   Object of same form that is returned from get*
   */

  function setSelection(input, offsets) {
    var start = offsets.start;
    var end = offsets.end;

    if (end === undefined) {
      end = start;
    }

    if ('selectionStart' in input) {
      input.selectionStart = start;
      input.selectionEnd = Math.min(end, input.value.length);
    } else {
      setOffsets(input, offsets);
    }
  }

  var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;

  function registerEvents$3() {
    registerTwoPhaseEvent('onSelect', ['focusout', 'contextmenu', 'dragend', 'focusin', 'keydown', 'keyup', 'mousedown', 'mouseup', 'selectionchange']);
  }

  var activeElement$1 = null;
  var activeElementInst$1 = null;
  var lastSelection = null;
  var mouseDown = false;
  /**
   * Get an object which is a unique representation of the current selection.
   *
   * The return value will not be consistent across nodes or browsers, but
   * two identical selections on the same node will return identical objects.
   */

  function getSelection$1(node) {
    if ('selectionStart' in node && hasSelectionCapabilities(node)) {
      return {
        start: node.selectionStart,
        end: node.selectionEnd
      };
    } else {
      var win = node.ownerDocument && node.ownerDocument.defaultView || window;
      var selection = win.getSelection();
      return {
        anchorNode: selection.anchorNode,
        anchorOffset: selection.anchorOffset,
        focusNode: selection.focusNode,
        focusOffset: selection.focusOffset
      };
    }
  }
  /**
   * Get document associated with the event target.
   */


  function getEventTargetDocument(eventTarget) {
    return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;
  }
  /**
   * Poll selection to see whether it's changed.
   *
   * @param {object} nativeEvent
   * @param {object} nativeEventTarget
   * @return {?SyntheticEvent}
   */


  function constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {
    // Ensure we have the right element, and that the user is not dragging a
    // selection (this matches native `select` event behavior). In HTML5, select
    // fires only on input and textarea thus if there's no focused element we
    // won't dispatch.
    var doc = getEventTargetDocument(nativeEventTarget);

    if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {
      return;
    } // Only fire when selection has actually changed.


    var currentSelection = getSelection$1(activeElement$1);

    if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
      lastSelection = currentSelection;
      var listeners = accumulateTwoPhaseListeners(activeElementInst$1, 'onSelect');

      if (listeners.length > 0) {
        var event = new SyntheticEvent('onSelect', 'select', null, nativeEvent, nativeEventTarget);
        dispatchQueue.push({
          event: event,
          listeners: listeners
        });
        event.target = activeElement$1;
      }
    }
  }
  /**
   * This plugin creates an `onSelect` event that normalizes select events
   * across form elements.
   *
   * Supported elements are:
   * - input (see `isTextInputElement`)
   * - textarea
   * - contentEditable
   *
   * This differs from native browser implementations in the following ways:
   * - Fires on contentEditable fields as well as inputs.
   * - Fires for collapsed selection.
   * - Fires after user input.
   */


  function extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
    var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;

    switch (domEventName) {
      // Track the input node that has focus.
      case 'focusin':
        if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
          activeElement$1 = targetNode;
          activeElementInst$1 = targetInst;
          lastSelection = null;
        }

        break;

      case 'focusout':
        activeElement$1 = null;
        activeElementInst$1 = null;
        lastSelection = null;
        break;
      // Don't fire the event while the user is dragging. This matches the
      // semantics of the native select event.

      case 'mousedown':
        mouseDown = true;
        break;

      case 'contextmenu':
      case 'mouseup':
      case 'dragend':
        mouseDown = false;
        constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
        break;
      // Chrome and IE fire non-standard event when selection is changed (and
      // sometimes when it hasn't). IE's event fires out of order with respect
      // to key and input events on deletion, so we discard it.
      //
      // Firefox doesn't support selectionchange, so check selection status
      // after each key entry. The selection changes after keydown and before
      // keyup, but we check on keydown as well in the case of holding down a
      // key, when multiple keydown events are fired but only one keyup is.
      // This is also our approach for IE handling, for the reason above.

      case 'selectionchange':
        if (skipSelectionChangeEvent) {
          break;
        }

      // falls through

      case 'keydown':
      case 'keyup':
        constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
    }
  }

  /**
   * Generate a mapping of standard vendor prefixes using the defined style property and event name.
   *
   * @param {string} styleProp
   * @param {string} eventName
   * @returns {object}
   */

  function makePrefixMap(styleProp, eventName) {
    var prefixes = {};
    prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
    prefixes['Webkit' + styleProp] = 'webkit' + eventName;
    prefixes['Moz' + styleProp] = 'moz' + eventName;
    return prefixes;
  }
  /**
   * A list of event names to a configurable list of vendor prefixes.
   */


  var vendorPrefixes = {
    animationend: makePrefixMap('Animation', 'AnimationEnd'),
    animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
    animationstart: makePrefixMap('Animation', 'AnimationStart'),
    transitionend: makePrefixMap('Transition', 'TransitionEnd')
  };
  /**
   * Event names that have already been detected and prefixed (if applicable).
   */

  var prefixedEventNames = {};
  /**
   * Element to check for prefixes on.
   */

  var style = {};
  /**
   * Bootstrap if a DOM exists.
   */

  if (canUseDOM) {
    style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,
    // the un-prefixed "animation" and "transition" properties are defined on the
    // style object but the events that fire will still be prefixed, so we need
    // to check if the un-prefixed events are usable, and if not remove them from the map.

    if (!('AnimationEvent' in window)) {
      delete vendorPrefixes.animationend.animation;
      delete vendorPrefixes.animationiteration.animation;
      delete vendorPrefixes.animationstart.animation;
    } // Same as above


    if (!('TransitionEvent' in window)) {
      delete vendorPrefixes.transitionend.transition;
    }
  }
  /**
   * Attempts to determine the correct vendor prefixed event name.
   *
   * @param {string} eventName
   * @returns {string}
   */


  function getVendorPrefixedEventName(eventName) {
    if (prefixedEventNames[eventName]) {
      return prefixedEventNames[eventName];
    } else if (!vendorPrefixes[eventName]) {
      return eventName;
    }

    var prefixMap = vendorPrefixes[eventName];

    for (var styleProp in prefixMap) {
      if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
        return prefixedEventNames[eventName] = prefixMap[styleProp];
      }
    }

    return eventName;
  }

  var ANIMATION_END = getVendorPrefixedEventName('animationend');
  var ANIMATION_ITERATION = getVendorPrefixedEventName('animationiteration');
  var ANIMATION_START = getVendorPrefixedEventName('animationstart');
  var TRANSITION_END = getVendorPrefixedEventName('transitionend');

  var topLevelEventsToReactNames = new Map(); // NOTE: Capitalization is important in this list!
  //
  // E.g. it needs "pointerDown", not "pointerdown".
  // This is because we derive both React name ("onPointerDown")
  // and DOM name ("pointerdown") from the same list.
  //
  // Exceptions that don't match this convention are listed separately.
  //
  // prettier-ignore

  var simpleEventPluginEvents = ['abort', 'auxClick', 'cancel', 'canPlay', 'canPlayThrough', 'click', 'close', 'contextMenu', 'copy', 'cut', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'gotPointerCapture', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'lostPointerCapture', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'pointerCancel', 'pointerDown', 'pointerMove', 'pointerOut', 'pointerOver', 'pointerUp', 'progress', 'rateChange', 'reset', 'resize', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'touchCancel', 'touchEnd', 'touchStart', 'volumeChange', 'scroll', 'toggle', 'touchMove', 'waiting', 'wheel'];

  function registerSimpleEvent(domEventName, reactName) {
    topLevelEventsToReactNames.set(domEventName, reactName);
    registerTwoPhaseEvent(reactName, [domEventName]);
  }

  function registerSimpleEvents() {
    for (var i = 0; i < simpleEventPluginEvents.length; i++) {
      var eventName = simpleEventPluginEvents[i];
      var domEventName = eventName.toLowerCase();
      var capitalizedEvent = eventName[0].toUpperCase() + eventName.slice(1);
      registerSimpleEvent(domEventName, 'on' + capitalizedEvent);
    } // Special cases where event names don't match.


    registerSimpleEvent(ANIMATION_END, 'onAnimationEnd');
    registerSimpleEvent(ANIMATION_ITERATION, 'onAnimationIteration');
    registerSimpleEvent(ANIMATION_START, 'onAnimationStart');
    registerSimpleEvent('dblclick', 'onDoubleClick');
    registerSimpleEvent('focusin', 'onFocus');
    registerSimpleEvent('focusout', 'onBlur');
    registerSimpleEvent(TRANSITION_END, 'onTransitionEnd');
  }

  function extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
    var reactName = topLevelEventsToReactNames.get(domEventName);

    if (reactName === undefined) {
      return;
    }

    var SyntheticEventCtor = SyntheticEvent;
    var reactEventType = domEventName;

    switch (domEventName) {
      case 'keypress':
        // Firefox creates a keypress event for function keys too. This removes
        // the unwanted keypress events. Enter is however both printable and
        // non-printable. One would expect Tab to be as well (but it isn't).
        if (getEventCharCode(nativeEvent) === 0) {
          return;
        }

      /* falls through */

      case 'keydown':
      case 'keyup':
        SyntheticEventCtor = SyntheticKeyboardEvent;
        break;

      case 'focusin':
        reactEventType = 'focus';
        SyntheticEventCtor = SyntheticFocusEvent;
        break;

      case 'focusout':
        reactEventType = 'blur';
        SyntheticEventCtor = SyntheticFocusEvent;
        break;

      case 'beforeblur':
      case 'afterblur':
        SyntheticEventCtor = SyntheticFocusEvent;
        break;

      case 'click':
        // Firefox creates a click event on right mouse clicks. This removes the
        // unwanted click events.
        if (nativeEvent.button === 2) {
          return;
        }

      /* falls through */

      case 'auxclick':
      case 'dblclick':
      case 'mousedown':
      case 'mousemove':
      case 'mouseup': // TODO: Disabled elements should not respond to mouse events

      /* falls through */

      case 'mouseout':
      case 'mouseover':
      case 'contextmenu':
        SyntheticEventCtor = SyntheticMouseEvent;
        break;

      case 'drag':
      case 'dragend':
      case 'dragenter':
      case 'dragexit':
      case 'dragleave':
      case 'dragover':
      case 'dragstart':
      case 'drop':
        SyntheticEventCtor = SyntheticDragEvent;
        break;

      case 'touchcancel':
      case 'touchend':
      case 'touchmove':
      case 'touchstart':
        SyntheticEventCtor = SyntheticTouchEvent;
        break;

      case ANIMATION_END:
      case ANIMATION_ITERATION:
      case ANIMATION_START:
        SyntheticEventCtor = SyntheticAnimationEvent;
        break;

      case TRANSITION_END:
        SyntheticEventCtor = SyntheticTransitionEvent;
        break;

      case 'scroll':
        SyntheticEventCtor = SyntheticUIEvent;
        break;

      case 'wheel':
        SyntheticEventCtor = SyntheticWheelEvent;
        break;

      case 'copy':
      case 'cut':
      case 'paste':
        SyntheticEventCtor = SyntheticClipboardEvent;
        break;

      case 'gotpointercapture':
      case 'lostpointercapture':
      case 'pointercancel':
      case 'pointerdown':
      case 'pointermove':
      case 'pointerout':
      case 'pointerover':
      case 'pointerup':
        SyntheticEventCtor = SyntheticPointerEvent;
        break;
    }

    var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;

    {
      // Some events don't bubble in the browser.
      // In the past, React has always bubbled them, but this can be surprising.
      // We're going to try aligning closer to the browser behavior by not bubbling
      // them in React either. We'll start by not bubbling onScroll, and then expand.
      var accumulateTargetOnly = !inCapturePhase && // TODO: ideally, we'd eventually add all events from
      // nonDelegatedEvents list in DOMPluginEventSystem.
      // Then we can remove this special list.
      // This is a breaking change that can wait until React 18.
      domEventName === 'scroll';

      var _listeners = accumulateSinglePhaseListeners(targetInst, reactName, nativeEvent.type, inCapturePhase, accumulateTargetOnly);

      if (_listeners.length > 0) {
        // Intentionally create event lazily.
        var _event = new SyntheticEventCtor(reactName, reactEventType, null, nativeEvent, nativeEventTarget);

        dispatchQueue.push({
          event: _event,
          listeners: _listeners
        });
      }
    }
  }

  // TODO: remove top-level side effect.
  registerSimpleEvents();
  registerEvents$2();
  registerEvents$1();
  registerEvents$3();
  registerEvents();

  function extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
    // TODO: we should remove the concept of a "SimpleEventPlugin".
    // This is the basic functionality of the event system. All
    // the other plugins are essentially polyfills. So the plugin
    // should probably be inlined somewhere and have its logic
    // be core the to event system. This would potentially allow
    // us to ship builds of React without the polyfilled plugins below.
    extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
    var shouldProcessPolyfillPlugins = (eventSystemFlags & SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS) === 0; // We don't process these events unless we are in the
    // event's native "bubble" phase, which means that we're
    // not in the capture phase. That's because we emulate
    // the capture phase here still. This is a trade-off,
    // because in an ideal world we would not emulate and use
    // the phases properly, like we do with the SimpleEvent
    // plugin. However, the plugins below either expect
    // emulation (EnterLeave) or use state localized to that
    // plugin (BeforeInput, Change, Select). The state in
    // these modules complicates things, as you'll essentially
    // get the case where the capture phase event might change
    // state, only for the following bubble event to come in
    // later and not trigger anything as the state now
    // invalidates the heuristics of the event plugin. We
    // could alter all these plugins to work in such ways, but
    // that might cause other unknown side-effects that we
    // can't foresee right now.

    if (shouldProcessPolyfillPlugins) {
      extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
      extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
      extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
      extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
    }
  } // List of events that need to be individually attached to media elements.


  var mediaEventTypes = ['abort', 'canplay', 'canplaythrough', 'durationchange', 'emptied', 'encrypted', 'ended', 'error', 'loadeddata', 'loadedmetadata', 'loadstart', 'pause', 'play', 'playing', 'progress', 'ratechange', 'resize', 'seeked', 'seeking', 'stalled', 'suspend', 'timeupdate', 'volumechange', 'waiting']; // We should not delegate these events to the container, but rather
  // set them on the actual target element itself. This is primarily
  // because these events do not consistently bubble in the DOM.

  var nonDelegatedEvents = new Set(['cancel', 'close', 'invalid', 'load', 'scroll', 'toggle'].concat(mediaEventTypes));

  function executeDispatch(event, listener, currentTarget) {
    var type = event.type || 'unknown-event';
    event.currentTarget = currentTarget;
    invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
    event.currentTarget = null;
  }

  function processDispatchQueueItemsInOrder(event, dispatchListeners, inCapturePhase) {
    var previousInstance;

    if (inCapturePhase) {
      for (var i = dispatchListeners.length - 1; i >= 0; i--) {
        var _dispatchListeners$i = dispatchListeners[i],
            instance = _dispatchListeners$i.instance,
            currentTarget = _dispatchListeners$i.currentTarget,
            listener = _dispatchListeners$i.listener;

        if (instance !== previousInstance && event.isPropagationStopped()) {
          return;
        }

        executeDispatch(event, listener, currentTarget);
        previousInstance = instance;
      }
    } else {
      for (var _i = 0; _i < dispatchListeners.length; _i++) {
        var _dispatchListeners$_i = dispatchListeners[_i],
            _instance = _dispatchListeners$_i.instance,
            _currentTarget = _dispatchListeners$_i.currentTarget,
            _listener = _dispatchListeners$_i.listener;

        if (_instance !== previousInstance && event.isPropagationStopped()) {
          return;
        }

        executeDispatch(event, _listener, _currentTarget);
        previousInstance = _instance;
      }
    }
  }

  function processDispatchQueue(dispatchQueue, eventSystemFlags) {
    var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;

    for (var i = 0; i < dispatchQueue.length; i++) {
      var _dispatchQueue$i = dispatchQueue[i],
          event = _dispatchQueue$i.event,
          listeners = _dispatchQueue$i.listeners;
      processDispatchQueueItemsInOrder(event, listeners, inCapturePhase); //  event system doesn't use pooling.
    } // This would be a good time to rethrow if any of the event handlers threw.


    rethrowCaughtError();
  }

  function dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {
    var nativeEventTarget = getEventTarget(nativeEvent);
    var dispatchQueue = [];
    extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
    processDispatchQueue(dispatchQueue, eventSystemFlags);
  }

  function listenToNonDelegatedEvent(domEventName, targetElement) {
    {
      if (!nonDelegatedEvents.has(domEventName)) {
        error('Did not expect a listenToNonDelegatedEvent() call for "%s". ' + 'This is a bug in React. Please file an issue.', domEventName);
      }
    }

    var isCapturePhaseListener = false;
    var listenerSet = getEventListenerSet(targetElement);
    var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener);

    if (!listenerSet.has(listenerSetKey)) {
      addTrappedEventListener(targetElement, domEventName, IS_NON_DELEGATED, isCapturePhaseListener);
      listenerSet.add(listenerSetKey);
    }
  }
  function listenToNativeEvent(domEventName, isCapturePhaseListener, target) {
    {
      if (nonDelegatedEvents.has(domEventName) && !isCapturePhaseListener) {
        error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. ' + 'This is a bug in React. Please file an issue.', domEventName);
      }
    }

    var eventSystemFlags = 0;

    if (isCapturePhaseListener) {
      eventSystemFlags |= IS_CAPTURE_PHASE;
    }

    addTrappedEventListener(target, domEventName, eventSystemFlags, isCapturePhaseListener);
  } // This is only used by createEventHandle when the
  var listeningMarker = '_reactListening' + Math.random().toString(36).slice(2);
  function listenToAllSupportedEvents(rootContainerElement) {
    if (!rootContainerElement[listeningMarker]) {
      rootContainerElement[listeningMarker] = true;
      allNativeEvents.forEach(function (domEventName) {
        // We handle selectionchange separately because it
        // doesn't bubble and needs to be on the document.
        if (domEventName !== 'selectionchange') {
          if (!nonDelegatedEvents.has(domEventName)) {
            listenToNativeEvent(domEventName, false, rootContainerElement);
          }

          listenToNativeEvent(domEventName, true, rootContainerElement);
        }
      });
      var ownerDocument = rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;

      if (ownerDocument !== null) {
        // The selectionchange event also needs deduplication
        // but it is attached to the document.
        if (!ownerDocument[listeningMarker]) {
          ownerDocument[listeningMarker] = true;
          listenToNativeEvent('selectionchange', false, ownerDocument);
        }
      }
    }
  }

  function addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener, isDeferredListenerForLegacyFBSupport) {
    var listener = createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags); // If passive option is not supported, then the event will be
    // active and not passive.

    var isPassiveListener = undefined;

    if (passiveBrowserEventsSupported) {
      // Browsers introduced an intervention, making these events
      // passive by default on document. React doesn't bind them
      // to document anymore, but changing this now would undo
      // the performance wins from the change. So we emulate
      // the existing behavior manually on the roots now.
      // https://github.com/facebook/react/issues/19651
      if (domEventName === 'touchstart' || domEventName === 'touchmove' || domEventName === 'wheel') {
        isPassiveListener = true;
      }
    }

    targetContainer =  targetContainer;
    var unsubscribeListener; // When legacyFBSupport is enabled, it's for when we


    if (isCapturePhaseListener) {
      if (isPassiveListener !== undefined) {
        unsubscribeListener = addEventCaptureListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);
      } else {
        unsubscribeListener = addEventCaptureListener(targetContainer, domEventName, listener);
      }
    } else {
      if (isPassiveListener !== undefined) {
        unsubscribeListener = addEventBubbleListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);
      } else {
        unsubscribeListener = addEventBubbleListener(targetContainer, domEventName, listener);
      }
    }
  }

  function isMatchingRootContainer(grandContainer, targetContainer) {
    return grandContainer === targetContainer || grandContainer.nodeType === COMMENT_NODE && grandContainer.parentNode === targetContainer;
  }

  function dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {
    var ancestorInst = targetInst;

    if ((eventSystemFlags & IS_EVENT_HANDLE_NON_MANAGED_NODE) === 0 && (eventSystemFlags & IS_NON_DELEGATED) === 0) {
      var targetContainerNode = targetContainer; // If we are using the legacy FB support flag, we

      if (targetInst !== null) {
        // The below logic attempts to work out if we need to change
        // the target fiber to a different ancestor. We had similar logic
        // in the legacy event system, except the big difference between
        // systems is that the modern event system now has an event listener
        // attached to each React Root and React Portal Root. Together,
        // the DOM nodes representing these roots are the "rootContainer".
        // To figure out which ancestor instance we should use, we traverse
        // up the fiber tree from the target instance and attempt to find
        // root boundaries that match that of our current "rootContainer".
        // If we find that "rootContainer", we find the parent fiber
        // sub-tree for that root and make that our ancestor instance.
        var node = targetInst;

        mainLoop: while (true) {
          if (node === null) {
            return;
          }

          var nodeTag = node.tag;

          if (nodeTag === HostRoot || nodeTag === HostPortal) {
            var container = node.stateNode.containerInfo;

            if (isMatchingRootContainer(container, targetContainerNode)) {
              break;
            }

            if (nodeTag === HostPortal) {
              // The target is a portal, but it's not the rootContainer we're looking for.
              // Normally portals handle their own events all the way down to the root.
              // So we should be able to stop now. However, we don't know if this portal
              // was part of *our* root.
              var grandNode = node.return;

              while (grandNode !== null) {
                var grandTag = grandNode.tag;

                if (grandTag === HostRoot || grandTag === HostPortal) {
                  var grandContainer = grandNode.stateNode.containerInfo;

                  if (isMatchingRootContainer(grandContainer, targetContainerNode)) {
                    // This is the rootContainer we're looking for and we found it as
                    // a parent of the Portal. That means we can ignore it because the
                    // Portal will bubble through to us.
                    return;
                  }
                }

                grandNode = grandNode.return;
              }
            } // Now we need to find it's corresponding host fiber in the other
            // tree. To do this we can use getClosestInstanceFromNode, but we
            // need to validate that the fiber is a host instance, otherwise
            // we need to traverse up through the DOM till we find the correct
            // node that is from the other tree.


            while (container !== null) {
              var parentNode = getClosestInstanceFromNode(container);

              if (parentNode === null) {
                return;
              }

              var parentTag = parentNode.tag;

              if (parentTag === HostComponent || parentTag === HostText) {
                node = ancestorInst = parentNode;
                continue mainLoop;
              }

              container = container.parentNode;
            }
          }

          node = node.return;
        }
      }
    }

    batchedUpdates(function () {
      return dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, ancestorInst);
    });
  }

  function createDispatchListener(instance, listener, currentTarget) {
    return {
      instance: instance,
      listener: listener,
      currentTarget: currentTarget
    };
  }

  function accumulateSinglePhaseListeners(targetFiber, reactName, nativeEventType, inCapturePhase, accumulateTargetOnly, nativeEvent) {
    var captureName = reactName !== null ? reactName + 'Capture' : null;
    var reactEventName = inCapturePhase ? captureName : reactName;
    var listeners = [];
    var instance = targetFiber;
    var lastHostComponent = null; // Accumulate all instances and listeners via the target -> root path.

    while (instance !== null) {
      var _instance2 = instance,
          stateNode = _instance2.stateNode,
          tag = _instance2.tag; // Handle listeners that are on HostComponents (i.e. <div>)

      if (tag === HostComponent && stateNode !== null) {
        lastHostComponent = stateNode; // createEventHandle listeners


        if (reactEventName !== null) {
          var listener = getListener(instance, reactEventName);

          if (listener != null) {
            listeners.push(createDispatchListener(instance, listener, lastHostComponent));
          }
        }
      } // If we are only accumulating events for the target, then we don't
      // continue to propagate through the React fiber tree to find other
      // listeners.


      if (accumulateTargetOnly) {
        break;
      } // If we are processing the onBeforeBlur event, then we need to take

      instance = instance.return;
    }

    return listeners;
  } // We should only use this function for:
  // - BeforeInputEventPlugin
  // - ChangeEventPlugin
  // - SelectEventPlugin
  // This is because we only process these plugins
  // in the bubble phase, so we need to accumulate two
  // phase event listeners (via emulation).

  function accumulateTwoPhaseListeners(targetFiber, reactName) {
    var captureName = reactName + 'Capture';
    var listeners = [];
    var instance = targetFiber; // Accumulate all instances and listeners via the target -> root path.

    while (instance !== null) {
      var _instance3 = instance,
          stateNode = _instance3.stateNode,
          tag = _instance3.tag; // Handle listeners that are on HostComponents (i.e. <div>)

      if (tag === HostComponent && stateNode !== null) {
        var currentTarget = stateNode;
        var captureListener = getListener(instance, captureName);

        if (captureListener != null) {
          listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));
        }

        var bubbleListener = getListener(instance, reactName);

        if (bubbleListener != null) {
          listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));
        }
      }

      instance = instance.return;
    }

    return listeners;
  }

  function getParent(inst) {
    if (inst === null) {
      return null;
    }

    do {
      inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.
      // That is depending on if we want nested subtrees (layers) to bubble
      // events to their parent. We could also go through parentNode on the
      // host node but that wouldn't work for React Native and doesn't let us
      // do the portal feature.
    } while (inst && inst.tag !== HostComponent);

    if (inst) {
      return inst;
    }

    return null;
  }
  /**
   * Return the lowest common ancestor of A and B, or null if they are in
   * different trees.
   */


  function getLowestCommonAncestor(instA, instB) {
    var nodeA = instA;
    var nodeB = instB;
    var depthA = 0;

    for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {
      depthA++;
    }

    var depthB = 0;

    for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {
      depthB++;
    } // If A is deeper, crawl up.


    while (depthA - depthB > 0) {
      nodeA = getParent(nodeA);
      depthA--;
    } // If B is deeper, crawl up.


    while (depthB - depthA > 0) {
      nodeB = getParent(nodeB);
      depthB--;
    } // Walk in lockstep until we find a match.


    var depth = depthA;

    while (depth--) {
      if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {
        return nodeA;
      }

      nodeA = getParent(nodeA);
      nodeB = getParent(nodeB);
    }

    return null;
  }

  function accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {
    var registrationName = event._reactName;
    var listeners = [];
    var instance = target;

    while (instance !== null) {
      if (instance === common) {
        break;
      }

      var _instance4 = instance,
          alternate = _instance4.alternate,
          stateNode = _instance4.stateNode,
          tag = _instance4.tag;

      if (alternate !== null && alternate === common) {
        break;
      }

      if (tag === HostComponent && stateNode !== null) {
        var currentTarget = stateNode;

        if (inCapturePhase) {
          var captureListener = getListener(instance, registrationName);

          if (captureListener != null) {
            listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));
          }
        } else if (!inCapturePhase) {
          var bubbleListener = getListener(instance, registrationName);

          if (bubbleListener != null) {
            listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));
          }
        }
      }

      instance = instance.return;
    }

    if (listeners.length !== 0) {
      dispatchQueue.push({
        event: event,
        listeners: listeners
      });
    }
  } // We should only use this function for:
  // - EnterLeaveEventPlugin
  // This is because we only process this plugin
  // in the bubble phase, so we need to accumulate two
  // phase event listeners.


  function accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leaveEvent, enterEvent, from, to) {
    var common = from && to ? getLowestCommonAncestor(from, to) : null;

    if (from !== null) {
      accumulateEnterLeaveListenersForEvent(dispatchQueue, leaveEvent, from, common, false);
    }

    if (to !== null && enterEvent !== null) {
      accumulateEnterLeaveListenersForEvent(dispatchQueue, enterEvent, to, common, true);
    }
  }
  function getListenerSetKey(domEventName, capture) {
    return domEventName + "__" + (capture ? 'capture' : 'bubble');
  }

  var didWarnInvalidHydration = false;
  var DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML';
  var SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning';
  var SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';
  var AUTOFOCUS = 'autoFocus';
  var CHILDREN = 'children';
  var STYLE = 'style';
  var HTML$1 = '__html';
  var warnedUnknownTags;
  var validatePropertiesInDevelopment;
  var warnForPropDifference;
  var warnForExtraAttributes;
  var warnForInvalidEventListener;
  var canDiffStyleForHydrationWarning;
  var normalizeHTML;

  {
    warnedUnknownTags = {
      // There are working polyfills for <dialog>. Let people use it.
      dialog: true,
      // Electron ships a custom <webview> tag to display external web content in
      // an isolated frame and process.
      // This tag is not present in non Electron environments such as JSDom which
      // is often used for testing purposes.
      // @see https://electronjs.org/docs/api/webview-tag
      webview: true
    };

    validatePropertiesInDevelopment = function (type, props) {
      validateProperties(type, props);
      validateProperties$1(type, props);
      validateProperties$2(type, props, {
        registrationNameDependencies: registrationNameDependencies,
        possibleRegistrationNames: possibleRegistrationNames
      });
    }; // IE 11 parses & normalizes the style attribute as opposed to other
    // browsers. It adds spaces and sorts the properties in some
    // non-alphabetical order. Handling that would require sorting CSS
    // properties in the client & server versions or applying
    // `expectedStyle` to a temporary DOM node to read its `style` attribute
    // normalized. Since it only affects IE, we're skipping style warnings
    // in that browser completely in favor of doing all that work.
    // See https://github.com/facebook/react/issues/11807


    canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode;

    warnForPropDifference = function (propName, serverValue, clientValue) {
      if (didWarnInvalidHydration) {
        return;
      }

      var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);
      var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);

      if (normalizedServerValue === normalizedClientValue) {
        return;
      }

      didWarnInvalidHydration = true;

      error('Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));
    };

    warnForExtraAttributes = function (attributeNames) {
      if (didWarnInvalidHydration) {
        return;
      }

      didWarnInvalidHydration = true;
      var names = [];
      attributeNames.forEach(function (name) {
        names.push(name);
      });

      error('Extra attributes from the server: %s', names);
    };

    warnForInvalidEventListener = function (registrationName, listener) {
      if (listener === false) {
        error('Expected `%s` listener to be a function, instead got `false`.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName);
      } else {
        error('Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener);
      }
    }; // Parse the HTML and read it back to normalize the HTML string so that it
    // can be used for comparison.


    normalizeHTML = function (parent, html) {
      // We could have created a separate document here to avoid
      // re-initializing custom elements if they exist. But this breaks
      // how <noscript> is being handled. So we use the same document.
      // See the discussion in https://github.com/facebook/react/pull/11157.
      var testElement = parent.namespaceURI === HTML_NAMESPACE ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);
      testElement.innerHTML = html;
      return testElement.innerHTML;
    };
  } // HTML parsing normalizes CR and CRLF to LF.
  // It also can turn \u0000 into \uFFFD inside attributes.
  // https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream
  // If we have a mismatch, it might be caused by that.
  // We will still patch up in this case but not fire the warning.


  var NORMALIZE_NEWLINES_REGEX = /\r\n?/g;
  var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g;

  function normalizeMarkupForTextOrAttribute(markup) {
    {
      checkHtmlStringCoercion(markup);
    }

    var markupString = typeof markup === 'string' ? markup : '' + markup;
    return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');
  }

  function checkForUnmatchedText(serverText, clientText, isConcurrentMode, shouldWarnDev) {
    var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);
    var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);

    if (normalizedServerText === normalizedClientText) {
      return;
    }

    if (shouldWarnDev) {
      {
        if (!didWarnInvalidHydration) {
          didWarnInvalidHydration = true;

          error('Text content did not match. Server: "%s" Client: "%s"', normalizedServerText, normalizedClientText);
        }
      }
    }

    if (isConcurrentMode && enableClientRenderFallbackOnTextMismatch) {
      // In concurrent roots, we throw when there's a text mismatch and revert to
      // client rendering, up to the nearest Suspense boundary.
      throw new Error('Text content does not match server-rendered HTML.');
    }
  }

  function getOwnerDocumentFromRootContainer(rootContainerElement) {
    return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;
  }

  function noop() {}

  function trapClickOnNonInteractiveElement(node) {
    // Mobile Safari does not fire properly bubble click events on
    // non-interactive elements, which means delegated click listeners do not
    // fire. The workaround for this bug involves attaching an empty click
    // listener on the target node.
    // https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
    // Just set it using the onclick property so that we don't have to manage any
    // bookkeeping for it. Not sure if we need to clear it when the listener is
    // removed.
    // TODO: Only do this for the relevant Safaris maybe?
    node.onclick = noop;
  }

  function setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {
    for (var propKey in nextProps) {
      if (!nextProps.hasOwnProperty(propKey)) {
        continue;
      }

      var nextProp = nextProps[propKey];

      if (propKey === STYLE) {
        {
          if (nextProp) {
            // Freeze the next style object so that we can assume it won't be
            // mutated. We have already warned for this in the past.
            Object.freeze(nextProp);
          }
        } // Relies on `updateStylesByID` not mutating `styleUpdates`.


        setValueForStyles(domElement, nextProp);
      } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
        var nextHtml = nextProp ? nextProp[HTML$1] : undefined;

        if (nextHtml != null) {
          setInnerHTML(domElement, nextHtml);
        }
      } else if (propKey === CHILDREN) {
        if (typeof nextProp === 'string') {
          // Avoid setting initial textContent when the text is empty. In IE11 setting
          // textContent on a <textarea> will cause the placeholder to not
          // show within the <textarea> until it has been focused and blurred again.
          // https://github.com/facebook/react/issues/6731#issuecomment-254874553
          var canSetTextContent = tag !== 'textarea' || nextProp !== '';

          if (canSetTextContent) {
            setTextContent(domElement, nextProp);
          }
        } else if (typeof nextProp === 'number') {
          setTextContent(domElement, '' + nextProp);
        }
      } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
        if (nextProp != null) {
          if ( typeof nextProp !== 'function') {
            warnForInvalidEventListener(propKey, nextProp);
          }

          if (propKey === 'onScroll') {
            listenToNonDelegatedEvent('scroll', domElement);
          }
        }
      } else if (nextProp != null) {
        setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag);
      }
    }
  }

  function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {
    // TODO: Handle wasCustomComponentTag
    for (var i = 0; i < updatePayload.length; i += 2) {
      var propKey = updatePayload[i];
      var propValue = updatePayload[i + 1];

      if (propKey === STYLE) {
        setValueForStyles(domElement, propValue);
      } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
        setInnerHTML(domElement, propValue);
      } else if (propKey === CHILDREN) {
        setTextContent(domElement, propValue);
      } else {
        setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);
      }
    }
  }

  function createElement(type, props, rootContainerElement, parentNamespace) {
    var isCustomComponentTag; // We create tags in the namespace of their parent container, except HTML
    // tags get no namespace.

    var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);
    var domElement;
    var namespaceURI = parentNamespace;

    if (namespaceURI === HTML_NAMESPACE) {
      namespaceURI = getIntrinsicNamespace(type);
    }

    if (namespaceURI === HTML_NAMESPACE) {
      {
        isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to
        // allow <SVG> or <mATH>.

        if (!isCustomComponentTag && type !== type.toLowerCase()) {
          error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);
        }
      }

      if (type === 'script') {
        // Create the script via .innerHTML so its "parser-inserted" flag is
        // set to true and it does not execute
        var div = ownerDocument.createElement('div');

        div.innerHTML = '<script><' + '/script>'; // eslint-disable-line
        // This is guaranteed to yield a script element.

        var firstChild = div.firstChild;
        domElement = div.removeChild(firstChild);
      } else if (typeof props.is === 'string') {
        // $FlowIssue `createElement` should be updated for Web Components
        domElement = ownerDocument.createElement(type, {
          is: props.is
        });
      } else {
        // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.
        // See discussion in https://github.com/facebook/react/pull/6896
        // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
        domElement = ownerDocument.createElement(type); // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size`
        // attributes on `select`s needs to be added before `option`s are inserted.
        // This prevents:
        // - a bug where the `select` does not scroll to the correct option because singular
        //  `select` elements automatically pick the first item #13222
        // - a bug where the `select` set the first item as selected despite the `size` attribute #14239
        // See https://github.com/facebook/react/issues/13222
        // and https://github.com/facebook/react/issues/14239

        if (type === 'select') {
          var node = domElement;

          if (props.multiple) {
            node.multiple = true;
          } else if (props.size) {
            // Setting a size greater than 1 causes a select to behave like `multiple=true`, where
            // it is possible that no option is selected.
            //
            // This is only necessary when a select in "single selection mode".
            node.size = props.size;
          }
        }
      }
    } else {
      domElement = ownerDocument.createElementNS(namespaceURI, type);
    }

    {
      if (namespaceURI === HTML_NAMESPACE) {
        if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !hasOwnProperty.call(warnedUnknownTags, type)) {
          warnedUnknownTags[type] = true;

          error('The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);
        }
      }
    }

    return domElement;
  }
  function createTextNode(text, rootContainerElement) {
    return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text);
  }
  function setInitialProperties(domElement, tag, rawProps, rootContainerElement) {
    var isCustomComponentTag = isCustomComponent(tag, rawProps);

    {
      validatePropertiesInDevelopment(tag, rawProps);
    } // TODO: Make sure that we check isMounted before firing any of these events.


    var props;

    switch (tag) {
      case 'dialog':
        listenToNonDelegatedEvent('cancel', domElement);
        listenToNonDelegatedEvent('close', domElement);
        props = rawProps;
        break;

      case 'iframe':
      case 'object':
      case 'embed':
        // We listen to this event in case to ensure emulated bubble
        // listeners still fire for the load event.
        listenToNonDelegatedEvent('load', domElement);
        props = rawProps;
        break;

      case 'video':
      case 'audio':
        // We listen to these events in case to ensure emulated bubble
        // listeners still fire for all the media events.
        for (var i = 0; i < mediaEventTypes.length; i++) {
          listenToNonDelegatedEvent(mediaEventTypes[i], domElement);
        }

        props = rawProps;
        break;

      case 'source':
        // We listen to this event in case to ensure emulated bubble
        // listeners still fire for the error event.
        listenToNonDelegatedEvent('error', domElement);
        props = rawProps;
        break;

      case 'img':
      case 'image':
      case 'link':
        // We listen to these events in case to ensure emulated bubble
        // listeners still fire for error and load events.
        listenToNonDelegatedEvent('error', domElement);
        listenToNonDelegatedEvent('load', domElement);
        props = rawProps;
        break;

      case 'details':
        // We listen to this event in case to ensure emulated bubble
        // listeners still fire for the toggle event.
        listenToNonDelegatedEvent('toggle', domElement);
        props = rawProps;
        break;

      case 'input':
        initWrapperState(domElement, rawProps);
        props = getHostProps(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
        // listeners still fire for the invalid event.

        listenToNonDelegatedEvent('invalid', domElement);
        break;

      case 'option':
        validateProps(domElement, rawProps);
        props = rawProps;
        break;

      case 'select':
        initWrapperState$1(domElement, rawProps);
        props = getHostProps$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
        // listeners still fire for the invalid event.

        listenToNonDelegatedEvent('invalid', domElement);
        break;

      case 'textarea':
        initWrapperState$2(domElement, rawProps);
        props = getHostProps$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
        // listeners still fire for the invalid event.

        listenToNonDelegatedEvent('invalid', domElement);
        break;

      default:
        props = rawProps;
    }

    assertValidProps(tag, props);
    setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag);

    switch (tag) {
      case 'input':
        // TODO: Make sure we check if this is still unmounted or do any clean
        // up necessary since we never stop tracking anymore.
        track(domElement);
        postMountWrapper(domElement, rawProps, false);
        break;

      case 'textarea':
        // TODO: Make sure we check if this is still unmounted or do any clean
        // up necessary since we never stop tracking anymore.
        track(domElement);
        postMountWrapper$3(domElement);
        break;

      case 'option':
        postMountWrapper$1(domElement, rawProps);
        break;

      case 'select':
        postMountWrapper$2(domElement, rawProps);
        break;

      default:
        if (typeof props.onClick === 'function') {
          // TODO: This cast may not be sound for SVG, MathML or custom elements.
          trapClickOnNonInteractiveElement(domElement);
        }

        break;
    }
  } // Calculate the diff between the two objects.

  function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {
    {
      validatePropertiesInDevelopment(tag, nextRawProps);
    }

    var updatePayload = null;
    var lastProps;
    var nextProps;

    switch (tag) {
      case 'input':
        lastProps = getHostProps(domElement, lastRawProps);
        nextProps = getHostProps(domElement, nextRawProps);
        updatePayload = [];
        break;

      case 'select':
        lastProps = getHostProps$1(domElement, lastRawProps);
        nextProps = getHostProps$1(domElement, nextRawProps);
        updatePayload = [];
        break;

      case 'textarea':
        lastProps = getHostProps$2(domElement, lastRawProps);
        nextProps = getHostProps$2(domElement, nextRawProps);
        updatePayload = [];
        break;

      default:
        lastProps = lastRawProps;
        nextProps = nextRawProps;

        if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {
          // TODO: This cast may not be sound for SVG, MathML or custom elements.
          trapClickOnNonInteractiveElement(domElement);
        }

        break;
    }

    assertValidProps(tag, nextProps);
    var propKey;
    var styleName;
    var styleUpdates = null;

    for (propKey in lastProps) {
      if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
        continue;
      }

      if (propKey === STYLE) {
        var lastStyle = lastProps[propKey];

        for (styleName in lastStyle) {
          if (lastStyle.hasOwnProperty(styleName)) {
            if (!styleUpdates) {
              styleUpdates = {};
            }

            styleUpdates[styleName] = '';
          }
        }
      } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
        // This is a special case. If any listener updates we need to ensure
        // that the "current" fiber pointer gets updated so we need a commit
        // to update this element.
        if (!updatePayload) {
          updatePayload = [];
        }
      } else {
        // For all other deleted properties we add it to the queue. We use
        // the allowed property list in the commit phase instead.
        (updatePayload = updatePayload || []).push(propKey, null);
      }
    }

    for (propKey in nextProps) {
      var nextProp = nextProps[propKey];
      var lastProp = lastProps != null ? lastProps[propKey] : undefined;

      if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
        continue;
      }

      if (propKey === STYLE) {
        {
          if (nextProp) {
            // Freeze the next style object so that we can assume it won't be
            // mutated. We have already warned for this in the past.
            Object.freeze(nextProp);
          }
        }

        if (lastProp) {
          // Unset styles on `lastProp` but not on `nextProp`.
          for (styleName in lastProp) {
            if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
              if (!styleUpdates) {
                styleUpdates = {};
              }

              styleUpdates[styleName] = '';
            }
          } // Update styles that changed since `lastProp`.


          for (styleName in nextProp) {
            if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
              if (!styleUpdates) {
                styleUpdates = {};
              }

              styleUpdates[styleName] = nextProp[styleName];
            }
          }
        } else {
          // Relies on `updateStylesByID` not mutating `styleUpdates`.
          if (!styleUpdates) {
            if (!updatePayload) {
              updatePayload = [];
            }

            updatePayload.push(propKey, styleUpdates);
          }

          styleUpdates = nextProp;
        }
      } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
        var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
        var lastHtml = lastProp ? lastProp[HTML$1] : undefined;

        if (nextHtml != null) {
          if (lastHtml !== nextHtml) {
            (updatePayload = updatePayload || []).push(propKey, nextHtml);
          }
        }
      } else if (propKey === CHILDREN) {
        if (typeof nextProp === 'string' || typeof nextProp === 'number') {
          (updatePayload = updatePayload || []).push(propKey, '' + nextProp);
        }
      } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
        if (nextProp != null) {
          // We eagerly listen to this even though we haven't committed yet.
          if ( typeof nextProp !== 'function') {
            warnForInvalidEventListener(propKey, nextProp);
          }

          if (propKey === 'onScroll') {
            listenToNonDelegatedEvent('scroll', domElement);
          }
        }

        if (!updatePayload && lastProp !== nextProp) {
          // This is a special case. If any listener updates we need to ensure
          // that the "current" props pointer gets updated so we need a commit
          // to update this element.
          updatePayload = [];
        }
      } else {
        // For any other property we always add it to the queue and then we
        // filter it out using the allowed property list during the commit.
        (updatePayload = updatePayload || []).push(propKey, nextProp);
      }
    }

    if (styleUpdates) {
      {
        validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE]);
      }

      (updatePayload = updatePayload || []).push(STYLE, styleUpdates);
    }

    return updatePayload;
  } // Apply the diff.

  function updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
    // Update checked *before* name.
    // In the middle of an update, it is possible to have multiple checked.
    // When a checked radio tries to change name, browser makes another radio's checked false.
    if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {
      updateChecked(domElement, nextRawProps);
    }

    var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);
    var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff.

    updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props
    // changed.

    switch (tag) {
      case 'input':
        // Update the wrapper around inputs *after* updating props. This has to
        // happen after `updateDOMProperties`. Otherwise HTML5 input validations
        // raise warnings and prevent the new value from being assigned.
        updateWrapper(domElement, nextRawProps);
        break;

      case 'textarea':
        updateWrapper$1(domElement, nextRawProps);
        break;

      case 'select':
        // <select> value update needs to occur after <option> children
        // reconciliation
        postUpdateWrapper(domElement, nextRawProps);
        break;
    }
  }

  function getPossibleStandardName(propName) {
    {
      var lowerCasedName = propName.toLowerCase();

      if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) {
        return null;
      }

      return possibleStandardNames[lowerCasedName] || null;
    }
  }

  function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement, isConcurrentMode, shouldWarnDev) {
    var isCustomComponentTag;
    var extraAttributeNames;

    {
      isCustomComponentTag = isCustomComponent(tag, rawProps);
      validatePropertiesInDevelopment(tag, rawProps);
    } // TODO: Make sure that we check isMounted before firing any of these events.


    switch (tag) {
      case 'dialog':
        listenToNonDelegatedEvent('cancel', domElement);
        listenToNonDelegatedEvent('close', domElement);
        break;

      case 'iframe':
      case 'object':
      case 'embed':
        // We listen to this event in case to ensure emulated bubble
        // listeners still fire for the load event.
        listenToNonDelegatedEvent('load', domElement);
        break;

      case 'video':
      case 'audio':
        // We listen to these events in case to ensure emulated bubble
        // listeners still fire for all the media events.
        for (var i = 0; i < mediaEventTypes.length; i++) {
          listenToNonDelegatedEvent(mediaEventTypes[i], domElement);
        }

        break;

      case 'source':
        // We listen to this event in case to ensure emulated bubble
        // listeners still fire for the error event.
        listenToNonDelegatedEvent('error', domElement);
        break;

      case 'img':
      case 'image':
      case 'link':
        // We listen to these events in case to ensure emulated bubble
        // listeners still fire for error and load events.
        listenToNonDelegatedEvent('error', domElement);
        listenToNonDelegatedEvent('load', domElement);
        break;

      case 'details':
        // We listen to this event in case to ensure emulated bubble
        // listeners still fire for the toggle event.
        listenToNonDelegatedEvent('toggle', domElement);
        break;

      case 'input':
        initWrapperState(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
        // listeners still fire for the invalid event.

        listenToNonDelegatedEvent('invalid', domElement);
        break;

      case 'option':
        validateProps(domElement, rawProps);
        break;

      case 'select':
        initWrapperState$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
        // listeners still fire for the invalid event.

        listenToNonDelegatedEvent('invalid', domElement);
        break;

      case 'textarea':
        initWrapperState$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
        // listeners still fire for the invalid event.

        listenToNonDelegatedEvent('invalid', domElement);
        break;
    }

    assertValidProps(tag, rawProps);

    {
      extraAttributeNames = new Set();
      var attributes = domElement.attributes;

      for (var _i = 0; _i < attributes.length; _i++) {
        var name = attributes[_i].name.toLowerCase();

        switch (name) {
          // Controlled attributes are not validated
          // TODO: Only ignore them on controlled tags.
          case 'value':
            break;

          case 'checked':
            break;

          case 'selected':
            break;

          default:
            // Intentionally use the original name.
            // See discussion in https://github.com/facebook/react/pull/10676.
            extraAttributeNames.add(attributes[_i].name);
        }
      }
    }

    var updatePayload = null;

    for (var propKey in rawProps) {
      if (!rawProps.hasOwnProperty(propKey)) {
        continue;
      }

      var nextProp = rawProps[propKey];

      if (propKey === CHILDREN) {
        // For text content children we compare against textContent. This
        // might match additional HTML that is hidden when we read it using
        // textContent. E.g. "foo" will match "f<span>oo</span>" but that still
        // satisfies our requirement. Our requirement is not to produce perfect
        // HTML and attributes. Ideally we should preserve structure but it's
        // ok not to if the visible content is still enough to indicate what
        // even listeners these nodes might be wired up to.
        // TODO: Warn if there is more than a single textNode as a child.
        // TODO: Should we use domElement.firstChild.nodeValue to compare?
        if (typeof nextProp === 'string') {
          if (domElement.textContent !== nextProp) {
            if (rawProps[SUPPRESS_HYDRATION_WARNING] !== true) {
              checkForUnmatchedText(domElement.textContent, nextProp, isConcurrentMode, shouldWarnDev);
            }

            updatePayload = [CHILDREN, nextProp];
          }
        } else if (typeof nextProp === 'number') {
          if (domElement.textContent !== '' + nextProp) {
            if (rawProps[SUPPRESS_HYDRATION_WARNING] !== true) {
              checkForUnmatchedText(domElement.textContent, nextProp, isConcurrentMode, shouldWarnDev);
            }

            updatePayload = [CHILDREN, '' + nextProp];
          }
        }
      } else if (registrationNameDependencies.hasOwnProperty(propKey)) {
        if (nextProp != null) {
          if ( typeof nextProp !== 'function') {
            warnForInvalidEventListener(propKey, nextProp);
          }

          if (propKey === 'onScroll') {
            listenToNonDelegatedEvent('scroll', domElement);
          }
        }
      } else if (shouldWarnDev && true && // Convince Flow we've calculated it (it's DEV-only in this method.)
      typeof isCustomComponentTag === 'boolean') {
        // Validate that the properties correspond to their expected values.
        var serverValue = void 0;
        var propertyInfo = isCustomComponentTag && enableCustomElementPropertySupport ? null : getPropertyInfo(propKey);

        if (rawProps[SUPPRESS_HYDRATION_WARNING] === true) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated
        // TODO: Only ignore them on controlled tags.
        propKey === 'value' || propKey === 'checked' || propKey === 'selected') ; else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
          var serverHTML = domElement.innerHTML;
          var nextHtml = nextProp ? nextProp[HTML$1] : undefined;

          if (nextHtml != null) {
            var expectedHTML = normalizeHTML(domElement, nextHtml);

            if (expectedHTML !== serverHTML) {
              warnForPropDifference(propKey, serverHTML, expectedHTML);
            }
          }
        } else if (propKey === STYLE) {
          // $FlowFixMe - Should be inferred as not undefined.
          extraAttributeNames.delete(propKey);

          if (canDiffStyleForHydrationWarning) {
            var expectedStyle = createDangerousStringForStyles(nextProp);
            serverValue = domElement.getAttribute('style');

            if (expectedStyle !== serverValue) {
              warnForPropDifference(propKey, serverValue, expectedStyle);
            }
          }
        } else if (isCustomComponentTag && !enableCustomElementPropertySupport) {
          // $FlowFixMe - Should be inferred as not undefined.
          extraAttributeNames.delete(propKey.toLowerCase());
          serverValue = getValueForAttribute(domElement, propKey, nextProp);

          if (nextProp !== serverValue) {
            warnForPropDifference(propKey, serverValue, nextProp);
          }
        } else if (!shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag)) {
          var isMismatchDueToBadCasing = false;

          if (propertyInfo !== null) {
            // $FlowFixMe - Should be inferred as not undefined.
            extraAttributeNames.delete(propertyInfo.attributeName);
            serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo);
          } else {
            var ownNamespace = parentNamespace;

            if (ownNamespace === HTML_NAMESPACE) {
              ownNamespace = getIntrinsicNamespace(tag);
            }

            if (ownNamespace === HTML_NAMESPACE) {
              // $FlowFixMe - Should be inferred as not undefined.
              extraAttributeNames.delete(propKey.toLowerCase());
            } else {
              var standardName = getPossibleStandardName(propKey);

              if (standardName !== null && standardName !== propKey) {
                // If an SVG prop is supplied with bad casing, it will
                // be successfully parsed from HTML, but will produce a mismatch
                // (and would be incorrectly rendered on the client).
                // However, we already warn about bad casing elsewhere.
                // So we'll skip the misleading extra mismatch warning in this case.
                isMismatchDueToBadCasing = true; // $FlowFixMe - Should be inferred as not undefined.

                extraAttributeNames.delete(standardName);
              } // $FlowFixMe - Should be inferred as not undefined.


              extraAttributeNames.delete(propKey);
            }

            serverValue = getValueForAttribute(domElement, propKey, nextProp);
          }

          var dontWarnCustomElement = enableCustomElementPropertySupport  ;

          if (!dontWarnCustomElement && nextProp !== serverValue && !isMismatchDueToBadCasing) {
            warnForPropDifference(propKey, serverValue, nextProp);
          }
        }
      }
    }

    {
      if (shouldWarnDev) {
        if ( // $FlowFixMe - Should be inferred as not undefined.
        extraAttributeNames.size > 0 && rawProps[SUPPRESS_HYDRATION_WARNING] !== true) {
          // $FlowFixMe - Should be inferred as not undefined.
          warnForExtraAttributes(extraAttributeNames);
        }
      }
    }

    switch (tag) {
      case 'input':
        // TODO: Make sure we check if this is still unmounted or do any clean
        // up necessary since we never stop tracking anymore.
        track(domElement);
        postMountWrapper(domElement, rawProps, true);
        break;

      case 'textarea':
        // TODO: Make sure we check if this is still unmounted or do any clean
        // up necessary since we never stop tracking anymore.
        track(domElement);
        postMountWrapper$3(domElement);
        break;

      case 'select':
      case 'option':
        // For input and textarea we current always set the value property at
        // post mount to force it to diverge from attributes. However, for
        // option and select we don't quite do the same thing and select
        // is not resilient to the DOM state changing so we don't do that here.
        // TODO: Consider not doing this for input and textarea.
        break;

      default:
        if (typeof rawProps.onClick === 'function') {
          // TODO: This cast may not be sound for SVG, MathML or custom elements.
          trapClickOnNonInteractiveElement(domElement);
        }

        break;
    }

    return updatePayload;
  }
  function diffHydratedText(textNode, text, isConcurrentMode) {
    var isDifferent = textNode.nodeValue !== text;
    return isDifferent;
  }
  function warnForDeletedHydratableElement(parentNode, child) {
    {
      if (didWarnInvalidHydration) {
        return;
      }

      didWarnInvalidHydration = true;

      error('Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());
    }
  }
  function warnForDeletedHydratableText(parentNode, child) {
    {
      if (didWarnInvalidHydration) {
        return;
      }

      didWarnInvalidHydration = true;

      error('Did not expect server HTML to contain the text node "%s" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());
    }
  }
  function warnForInsertedHydratedElement(parentNode, tag, props) {
    {
      if (didWarnInvalidHydration) {
        return;
      }

      didWarnInvalidHydration = true;

      error('Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());
    }
  }
  function warnForInsertedHydratedText(parentNode, text) {
    {
      if (text === '') {
        // We expect to insert empty text nodes since they're not represented in
        // the HTML.
        // TODO: Remove this special case if we can just avoid inserting empty
        // text nodes.
        return;
      }

      if (didWarnInvalidHydration) {
        return;
      }

      didWarnInvalidHydration = true;

      error('Expected server HTML to contain a matching text node for "%s" in <%s>.', text, parentNode.nodeName.toLowerCase());
    }
  }
  function restoreControlledState$3(domElement, tag, props) {
    switch (tag) {
      case 'input':
        restoreControlledState(domElement, props);
        return;

      case 'textarea':
        restoreControlledState$2(domElement, props);
        return;

      case 'select':
        restoreControlledState$1(domElement, props);
        return;
    }
  }

  var validateDOMNesting = function () {};

  var updatedAncestorInfo = function () {};

  {
    // This validation code was written based on the HTML5 parsing spec:
    // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
    //
    // Note: this does not catch all invalid nesting, nor does it try to (as it's
    // not clear what practical benefit doing so provides); instead, we warn only
    // for cases where the parser will give a parse tree differing from what React
    // intended. For example, <b><div></div></b> is invalid but we don't warn
    // because it still parses correctly; we do warn for other cases like nested
    // <p> tags where the beginning of the second element implicitly closes the
    // first, causing a confusing mess.
    // https://html.spec.whatwg.org/multipage/syntax.html#special
    var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope

    var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
    // TODO: Distinguish by namespace here -- for <title>, including it here
    // errs on the side of fewer warnings
    'foreignObject', 'desc', 'title']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope

    var buttonScopeTags = inScopeTags.concat(['button']); // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags

    var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];
    var emptyAncestorInfo = {
      current: null,
      formTag: null,
      aTagInScope: null,
      buttonTagInScope: null,
      nobrTagInScope: null,
      pTagInButtonScope: null,
      listItemTagAutoclosing: null,
      dlItemTagAutoclosing: null
    };

    updatedAncestorInfo = function (oldInfo, tag) {
      var ancestorInfo = assign({}, oldInfo || emptyAncestorInfo);

      var info = {
        tag: tag
      };

      if (inScopeTags.indexOf(tag) !== -1) {
        ancestorInfo.aTagInScope = null;
        ancestorInfo.buttonTagInScope = null;
        ancestorInfo.nobrTagInScope = null;
      }

      if (buttonScopeTags.indexOf(tag) !== -1) {
        ancestorInfo.pTagInButtonScope = null;
      } // See rules for 'li', 'dd', 'dt' start tags in
      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody


      if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {
        ancestorInfo.listItemTagAutoclosing = null;
        ancestorInfo.dlItemTagAutoclosing = null;
      }

      ancestorInfo.current = info;

      if (tag === 'form') {
        ancestorInfo.formTag = info;
      }

      if (tag === 'a') {
        ancestorInfo.aTagInScope = info;
      }

      if (tag === 'button') {
        ancestorInfo.buttonTagInScope = info;
      }

      if (tag === 'nobr') {
        ancestorInfo.nobrTagInScope = info;
      }

      if (tag === 'p') {
        ancestorInfo.pTagInButtonScope = info;
      }

      if (tag === 'li') {
        ancestorInfo.listItemTagAutoclosing = info;
      }

      if (tag === 'dd' || tag === 'dt') {
        ancestorInfo.dlItemTagAutoclosing = info;
      }

      return ancestorInfo;
    };
    /**
     * Returns whether
     */


    var isTagValidWithParent = function (tag, parentTag) {
      // First, let's check if we're in an unusual parsing mode...
      switch (parentTag) {
        // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect
        case 'select':
          return tag === 'option' || tag === 'optgroup' || tag === '#text';

        case 'optgroup':
          return tag === 'option' || tag === '#text';
        // Strictly speaking, seeing an <option> doesn't mean we're in a <select>
        // but

        case 'option':
          return tag === '#text';
        // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd
        // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption
        // No special behavior since these rules fall back to "in body" mode for
        // all except special table nodes which cause bad parsing behavior anyway.
        // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr

        case 'tr':
          return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';
        // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody

        case 'tbody':
        case 'thead':
        case 'tfoot':
          return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';
        // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup

        case 'colgroup':
          return tag === 'col' || tag === 'template';
        // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable

        case 'table':
          return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';
        // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead

        case 'head':
          return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';
        // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element

        case 'html':
          return tag === 'head' || tag === 'body' || tag === 'frameset';

        case 'frameset':
          return tag === 'frame';

        case '#document':
          return tag === 'html';
      } // Probably in the "in body" parsing mode, so we outlaw only tag combos
      // where the parsing rules cause implicit opens or closes to be added.
      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody


      switch (tag) {
        case 'h1':
        case 'h2':
        case 'h3':
        case 'h4':
        case 'h5':
        case 'h6':
          return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';

        case 'rp':
        case 'rt':
          return impliedEndTags.indexOf(parentTag) === -1;

        case 'body':
        case 'caption':
        case 'col':
        case 'colgroup':
        case 'frameset':
        case 'frame':
        case 'head':
        case 'html':
        case 'tbody':
        case 'td':
        case 'tfoot':
        case 'th':
        case 'thead':
        case 'tr':
          // These tags are only valid with a few parents that have special child
          // parsing rules -- if we're down here, then none of those matched and
          // so we allow it only if we don't know what the parent is, as all other
          // cases are invalid.
          return parentTag == null;
      }

      return true;
    };
    /**
     * Returns whether
     */


    var findInvalidAncestorForTag = function (tag, ancestorInfo) {
      switch (tag) {
        case 'address':
        case 'article':
        case 'aside':
        case 'blockquote':
        case 'center':
        case 'details':
        case 'dialog':
        case 'dir':
        case 'div':
        case 'dl':
        case 'fieldset':
        case 'figcaption':
        case 'figure':
        case 'footer':
        case 'header':
        case 'hgroup':
        case 'main':
        case 'menu':
        case 'nav':
        case 'ol':
        case 'p':
        case 'section':
        case 'summary':
        case 'ul':
        case 'pre':
        case 'listing':
        case 'table':
        case 'hr':
        case 'xmp':
        case 'h1':
        case 'h2':
        case 'h3':
        case 'h4':
        case 'h5':
        case 'h6':
          return ancestorInfo.pTagInButtonScope;

        case 'form':
          return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;

        case 'li':
          return ancestorInfo.listItemTagAutoclosing;

        case 'dd':
        case 'dt':
          return ancestorInfo.dlItemTagAutoclosing;

        case 'button':
          return ancestorInfo.buttonTagInScope;

        case 'a':
          // Spec says something about storing a list of markers, but it sounds
          // equivalent to this check.
          return ancestorInfo.aTagInScope;

        case 'nobr':
          return ancestorInfo.nobrTagInScope;
      }

      return null;
    };

    var didWarn$1 = {};

    validateDOMNesting = function (childTag, childText, ancestorInfo) {
      ancestorInfo = ancestorInfo || emptyAncestorInfo;
      var parentInfo = ancestorInfo.current;
      var parentTag = parentInfo && parentInfo.tag;

      if (childText != null) {
        if (childTag != null) {
          error('validateDOMNesting: when childText is passed, childTag should be null');
        }

        childTag = '#text';
      }

      var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
      var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
      var invalidParentOrAncestor = invalidParent || invalidAncestor;

      if (!invalidParentOrAncestor) {
        return;
      }

      var ancestorTag = invalidParentOrAncestor.tag;
      var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag;

      if (didWarn$1[warnKey]) {
        return;
      }

      didWarn$1[warnKey] = true;
      var tagDisplayName = childTag;
      var whitespaceInfo = '';

      if (childTag === '#text') {
        if (/\S/.test(childText)) {
          tagDisplayName = 'Text nodes';
        } else {
          tagDisplayName = 'Whitespace text nodes';
          whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.';
        }
      } else {
        tagDisplayName = '<' + childTag + '>';
      }

      if (invalidParent) {
        var info = '';

        if (ancestorTag === 'table' && childTag === 'tr') {
          info += ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + 'the browser.';
        }

        error('validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info);
      } else {
        error('validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.', tagDisplayName, ancestorTag);
      }
    };
  }

  var SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning';
  var SUSPENSE_START_DATA = '$';
  var SUSPENSE_END_DATA = '/$';
  var SUSPENSE_PENDING_START_DATA = '$?';
  var SUSPENSE_FALLBACK_START_DATA = '$!';
  var STYLE$1 = 'style';
  var eventsEnabled = null;
  var selectionInformation = null;
  function getRootHostContext(rootContainerInstance) {
    var type;
    var namespace;
    var nodeType = rootContainerInstance.nodeType;

    switch (nodeType) {
      case DOCUMENT_NODE:
      case DOCUMENT_FRAGMENT_NODE:
        {
          type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment';
          var root = rootContainerInstance.documentElement;
          namespace = root ? root.namespaceURI : getChildNamespace(null, '');
          break;
        }

      default:
        {
          var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance;
          var ownNamespace = container.namespaceURI || null;
          type = container.tagName;
          namespace = getChildNamespace(ownNamespace, type);
          break;
        }
    }

    {
      var validatedTag = type.toLowerCase();
      var ancestorInfo = updatedAncestorInfo(null, validatedTag);
      return {
        namespace: namespace,
        ancestorInfo: ancestorInfo
      };
    }
  }
  function getChildHostContext(parentHostContext, type, rootContainerInstance) {
    {
      var parentHostContextDev = parentHostContext;
      var namespace = getChildNamespace(parentHostContextDev.namespace, type);
      var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type);
      return {
        namespace: namespace,
        ancestorInfo: ancestorInfo
      };
    }
  }
  function getPublicInstance(instance) {
    return instance;
  }
  function prepareForCommit(containerInfo) {
    eventsEnabled = isEnabled();
    selectionInformation = getSelectionInformation();
    var activeInstance = null;

    setEnabled(false);
    return activeInstance;
  }
  function resetAfterCommit(containerInfo) {
    restoreSelection(selectionInformation);
    setEnabled(eventsEnabled);
    eventsEnabled = null;
    selectionInformation = null;
  }
  function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
    var parentNamespace;

    {
      // TODO: take namespace into account when validating.
      var hostContextDev = hostContext;
      validateDOMNesting(type, null, hostContextDev.ancestorInfo);

      if (typeof props.children === 'string' || typeof props.children === 'number') {
        var string = '' + props.children;
        var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
        validateDOMNesting(null, string, ownAncestorInfo);
      }

      parentNamespace = hostContextDev.namespace;
    }

    var domElement = createElement(type, props, rootContainerInstance, parentNamespace);
    precacheFiberNode(internalInstanceHandle, domElement);
    updateFiberProps(domElement, props);
    return domElement;
  }
  function appendInitialChild(parentInstance, child) {
    parentInstance.appendChild(child);
  }
  function finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) {
    setInitialProperties(domElement, type, props, rootContainerInstance);

    switch (type) {
      case 'button':
      case 'input':
      case 'select':
      case 'textarea':
        return !!props.autoFocus;

      case 'img':
        return true;

      default:
        return false;
    }
  }
  function prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) {
    {
      var hostContextDev = hostContext;

      if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) {
        var string = '' + newProps.children;
        var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
        validateDOMNesting(null, string, ownAncestorInfo);
      }
    }

    return diffProperties(domElement, type, oldProps, newProps);
  }
  function shouldSetTextContent(type, props) {
    return type === 'textarea' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;
  }
  function createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {
    {
      var hostContextDev = hostContext;
      validateDOMNesting(null, text, hostContextDev.ancestorInfo);
    }

    var textNode = createTextNode(text, rootContainerInstance);
    precacheFiberNode(internalInstanceHandle, textNode);
    return textNode;
  }
  function getCurrentEventPriority() {
    var currentEvent = window.event;

    if (currentEvent === undefined) {
      return DefaultEventPriority;
    }

    return getEventPriority(currentEvent.type);
  }
  // if a component just imports ReactDOM (e.g. for findDOMNode).
  // Some environments might not have setTimeout or clearTimeout.

  var scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;
  var cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;
  var noTimeout = -1;
  var localPromise = typeof Promise === 'function' ? Promise : undefined; // -------------------
  var scheduleMicrotask = typeof queueMicrotask === 'function' ? queueMicrotask : typeof localPromise !== 'undefined' ? function (callback) {
    return localPromise.resolve(null).then(callback).catch(handleErrorInNextTick);
  } : scheduleTimeout; // TODO: Determine the best fallback here.

  function handleErrorInNextTick(error) {
    setTimeout(function () {
      throw error;
    });
  } // -------------------
  function commitMount(domElement, type, newProps, internalInstanceHandle) {
    // Despite the naming that might imply otherwise, this method only
    // fires if there is an `Update` effect scheduled during mounting.
    // This happens if `finalizeInitialChildren` returns `true` (which it
    // does to implement the `autoFocus` attribute on the client). But
    // there are also other cases when this might happen (such as patching
    // up text content during hydration mismatch). So we'll check this again.
    switch (type) {
      case 'button':
      case 'input':
      case 'select':
      case 'textarea':
        if (newProps.autoFocus) {
          domElement.focus();
        }

        return;

      case 'img':
        {
          if (newProps.src) {
            domElement.src = newProps.src;
          }

          return;
        }
    }
  }
  function commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {
    // Apply the diff to the DOM node.
    updateProperties(domElement, updatePayload, type, oldProps, newProps); // Update the props handle so that we know which props are the ones with
    // with current event handlers.

    updateFiberProps(domElement, newProps);
  }
  function resetTextContent(domElement) {
    setTextContent(domElement, '');
  }
  function commitTextUpdate(textInstance, oldText, newText) {
    textInstance.nodeValue = newText;
  }
  function appendChild(parentInstance, child) {
    parentInstance.appendChild(child);
  }
  function appendChildToContainer(container, child) {
    var parentNode;

    if (container.nodeType === COMMENT_NODE) {
      parentNode = container.parentNode;
      parentNode.insertBefore(child, container);
    } else {
      parentNode = container;
      parentNode.appendChild(child);
    } // This container might be used for a portal.
    // If something inside a portal is clicked, that click should bubble
    // through the React tree. However, on Mobile Safari the click would
    // never bubble through the *DOM* tree unless an ancestor with onclick
    // event exists. So we wouldn't see it and dispatch it.
    // This is why we ensure that non React root containers have inline onclick
    // defined.
    // https://github.com/facebook/react/issues/11918


    var reactRootContainer = container._reactRootContainer;

    if ((reactRootContainer === null || reactRootContainer === undefined) && parentNode.onclick === null) {
      // TODO: This cast may not be sound for SVG, MathML or custom elements.
      trapClickOnNonInteractiveElement(parentNode);
    }
  }
  function insertBefore(parentInstance, child, beforeChild) {
    parentInstance.insertBefore(child, beforeChild);
  }
  function insertInContainerBefore(container, child, beforeChild) {
    if (container.nodeType === COMMENT_NODE) {
      container.parentNode.insertBefore(child, beforeChild);
    } else {
      container.insertBefore(child, beforeChild);
    }
  }

  function removeChild(parentInstance, child) {
    parentInstance.removeChild(child);
  }
  function removeChildFromContainer(container, child) {
    if (container.nodeType === COMMENT_NODE) {
      container.parentNode.removeChild(child);
    } else {
      container.removeChild(child);
    }
  }
  function clearSuspenseBoundary(parentInstance, suspenseInstance) {
    var node = suspenseInstance; // Delete all nodes within this suspense boundary.
    // There might be nested nodes so we need to keep track of how
    // deep we are and only break out when we're back on top.

    var depth = 0;

    do {
      var nextNode = node.nextSibling;
      parentInstance.removeChild(node);

      if (nextNode && nextNode.nodeType === COMMENT_NODE) {
        var data = nextNode.data;

        if (data === SUSPENSE_END_DATA) {
          if (depth === 0) {
            parentInstance.removeChild(nextNode); // Retry if any event replaying was blocked on this.

            retryIfBlockedOn(suspenseInstance);
            return;
          } else {
            depth--;
          }
        } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_PENDING_START_DATA || data === SUSPENSE_FALLBACK_START_DATA) {
          depth++;
        }
      }

      node = nextNode;
    } while (node); // TODO: Warn, we didn't find the end comment boundary.
    // Retry if any event replaying was blocked on this.


    retryIfBlockedOn(suspenseInstance);
  }
  function clearSuspenseBoundaryFromContainer(container, suspenseInstance) {
    if (container.nodeType === COMMENT_NODE) {
      clearSuspenseBoundary(container.parentNode, suspenseInstance);
    } else if (container.nodeType === ELEMENT_NODE) {
      clearSuspenseBoundary(container, suspenseInstance);
    } // Retry if any event replaying was blocked on this.


    retryIfBlockedOn(container);
  }
  function hideInstance(instance) {
    // TODO: Does this work for all element types? What about MathML? Should we
    // pass host context to this method?
    instance = instance;
    var style = instance.style;

    if (typeof style.setProperty === 'function') {
      style.setProperty('display', 'none', 'important');
    } else {
      style.display = 'none';
    }
  }
  function hideTextInstance(textInstance) {
    textInstance.nodeValue = '';
  }
  function unhideInstance(instance, props) {
    instance = instance;
    var styleProp = props[STYLE$1];
    var display = styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') ? styleProp.display : null;
    instance.style.display = dangerousStyleValue('display', display);
  }
  function unhideTextInstance(textInstance, text) {
    textInstance.nodeValue = text;
  }
  function clearContainer(container) {
    if (container.nodeType === ELEMENT_NODE) {
      container.textContent = '';
    } else if (container.nodeType === DOCUMENT_NODE) {
      if (container.documentElement) {
        container.removeChild(container.documentElement);
      }
    }
  } // -------------------
  function canHydrateInstance(instance, type, props) {
    if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {
      return null;
    } // This has now been refined to an element node.


    return instance;
  }
  function canHydrateTextInstance(instance, text) {
    if (text === '' || instance.nodeType !== TEXT_NODE) {
      // Empty strings are not parsed by HTML so there won't be a correct match here.
      return null;
    } // This has now been refined to a text node.


    return instance;
  }
  function canHydrateSuspenseInstance(instance) {
    if (instance.nodeType !== COMMENT_NODE) {
      // Empty strings are not parsed by HTML so there won't be a correct match here.
      return null;
    } // This has now been refined to a suspense node.


    return instance;
  }
  function isSuspenseInstancePending(instance) {
    return instance.data === SUSPENSE_PENDING_START_DATA;
  }
  function isSuspenseInstanceFallback(instance) {
    return instance.data === SUSPENSE_FALLBACK_START_DATA;
  }
  function getSuspenseInstanceFallbackErrorDetails(instance) {
    var dataset = instance.nextSibling && instance.nextSibling.dataset;
    var digest, message, stack;

    if (dataset) {
      digest = dataset.dgst;

      {
        message = dataset.msg;
        stack = dataset.stck;
      }
    }

    {
      return {
        message: message,
        digest: digest,
        stack: stack
      };
    } // let value = {message: undefined, hash: undefined};
    // const nextSibling = instance.nextSibling;
    // if (nextSibling) {
    //   const dataset = ((nextSibling: any): HTMLTemplateElement).dataset;
    //   value.message = dataset.msg;
    //   value.hash = dataset.hash;
    //   if (true) {
    //     value.stack = dataset.stack;
    //   }
    // }
    // return value;

  }
  function registerSuspenseInstanceRetry(instance, callback) {
    instance._reactRetry = callback;
  }

  function getNextHydratable(node) {
    // Skip non-hydratable nodes.
    for (; node != null; node = node.nextSibling) {
      var nodeType = node.nodeType;

      if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) {
        break;
      }

      if (nodeType === COMMENT_NODE) {
        var nodeData = node.data;

        if (nodeData === SUSPENSE_START_DATA || nodeData === SUSPENSE_FALLBACK_START_DATA || nodeData === SUSPENSE_PENDING_START_DATA) {
          break;
        }

        if (nodeData === SUSPENSE_END_DATA) {
          return null;
        }
      }
    }

    return node;
  }

  function getNextHydratableSibling(instance) {
    return getNextHydratable(instance.nextSibling);
  }
  function getFirstHydratableChild(parentInstance) {
    return getNextHydratable(parentInstance.firstChild);
  }
  function getFirstHydratableChildWithinContainer(parentContainer) {
    return getNextHydratable(parentContainer.firstChild);
  }
  function getFirstHydratableChildWithinSuspenseInstance(parentInstance) {
    return getNextHydratable(parentInstance.nextSibling);
  }
  function hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle, shouldWarnDev) {
    precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events
    // get attached.

    updateFiberProps(instance, props);
    var parentNamespace;

    {
      var hostContextDev = hostContext;
      parentNamespace = hostContextDev.namespace;
    } // TODO: Temporary hack to check if we're in a concurrent root. We can delete
    // when the legacy root API is removed.


    var isConcurrentMode = (internalInstanceHandle.mode & ConcurrentMode) !== NoMode;
    return diffHydratedProperties(instance, type, props, parentNamespace, rootContainerInstance, isConcurrentMode, shouldWarnDev);
  }
  function hydrateTextInstance(textInstance, text, internalInstanceHandle, shouldWarnDev) {
    precacheFiberNode(internalInstanceHandle, textInstance); // TODO: Temporary hack to check if we're in a concurrent root. We can delete
    // when the legacy root API is removed.

    var isConcurrentMode = (internalInstanceHandle.mode & ConcurrentMode) !== NoMode;
    return diffHydratedText(textInstance, text);
  }
  function hydrateSuspenseInstance(suspenseInstance, internalInstanceHandle) {
    precacheFiberNode(internalInstanceHandle, suspenseInstance);
  }
  function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) {
    var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary.
    // There might be nested nodes so we need to keep track of how
    // deep we are and only break out when we're back on top.

    var depth = 0;

    while (node) {
      if (node.nodeType === COMMENT_NODE) {
        var data = node.data;

        if (data === SUSPENSE_END_DATA) {
          if (depth === 0) {
            return getNextHydratableSibling(node);
          } else {
            depth--;
          }
        } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {
          depth++;
        }
      }

      node = node.nextSibling;
    } // TODO: Warn, we didn't find the end comment boundary.


    return null;
  } // Returns the SuspenseInstance if this node is a direct child of a
  // SuspenseInstance. I.e. if its previous sibling is a Comment with
  // SUSPENSE_x_START_DATA. Otherwise, null.

  function getParentSuspenseInstance(targetInstance) {
    var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.
    // There might be nested nodes so we need to keep track of how
    // deep we are and only break out when we're back on top.

    var depth = 0;

    while (node) {
      if (node.nodeType === COMMENT_NODE) {
        var data = node.data;

        if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {
          if (depth === 0) {
            return node;
          } else {
            depth--;
          }
        } else if (data === SUSPENSE_END_DATA) {
          depth++;
        }
      }

      node = node.previousSibling;
    }

    return null;
  }
  function commitHydratedContainer(container) {
    // Retry if any event replaying was blocked on this.
    retryIfBlockedOn(container);
  }
  function commitHydratedSuspenseInstance(suspenseInstance) {
    // Retry if any event replaying was blocked on this.
    retryIfBlockedOn(suspenseInstance);
  }
  function shouldDeleteUnhydratedTailInstances(parentType) {
    return parentType !== 'head' && parentType !== 'body';
  }
  function didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text, isConcurrentMode) {
    var shouldWarnDev = true;
    checkForUnmatchedText(textInstance.nodeValue, text, isConcurrentMode, shouldWarnDev);
  }
  function didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text, isConcurrentMode) {
    if (parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
      var shouldWarnDev = true;
      checkForUnmatchedText(textInstance.nodeValue, text, isConcurrentMode, shouldWarnDev);
    }
  }
  function didNotHydrateInstanceWithinContainer(parentContainer, instance) {
    {
      if (instance.nodeType === ELEMENT_NODE) {
        warnForDeletedHydratableElement(parentContainer, instance);
      } else if (instance.nodeType === COMMENT_NODE) ; else {
        warnForDeletedHydratableText(parentContainer, instance);
      }
    }
  }
  function didNotHydrateInstanceWithinSuspenseInstance(parentInstance, instance) {
    {
      // $FlowFixMe: Only Element or Document can be parent nodes.
      var parentNode = parentInstance.parentNode;

      if (parentNode !== null) {
        if (instance.nodeType === ELEMENT_NODE) {
          warnForDeletedHydratableElement(parentNode, instance);
        } else if (instance.nodeType === COMMENT_NODE) ; else {
          warnForDeletedHydratableText(parentNode, instance);
        }
      }
    }
  }
  function didNotHydrateInstance(parentType, parentProps, parentInstance, instance, isConcurrentMode) {
    {
      if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
        if (instance.nodeType === ELEMENT_NODE) {
          warnForDeletedHydratableElement(parentInstance, instance);
        } else if (instance.nodeType === COMMENT_NODE) ; else {
          warnForDeletedHydratableText(parentInstance, instance);
        }
      }
    }
  }
  function didNotFindHydratableInstanceWithinContainer(parentContainer, type, props) {
    {
      warnForInsertedHydratedElement(parentContainer, type);
    }
  }
  function didNotFindHydratableTextInstanceWithinContainer(parentContainer, text) {
    {
      warnForInsertedHydratedText(parentContainer, text);
    }
  }
  function didNotFindHydratableInstanceWithinSuspenseInstance(parentInstance, type, props) {
    {
      // $FlowFixMe: Only Element or Document can be parent nodes.
      var parentNode = parentInstance.parentNode;
      if (parentNode !== null) warnForInsertedHydratedElement(parentNode, type);
    }
  }
  function didNotFindHydratableTextInstanceWithinSuspenseInstance(parentInstance, text) {
    {
      // $FlowFixMe: Only Element or Document can be parent nodes.
      var parentNode = parentInstance.parentNode;
      if (parentNode !== null) warnForInsertedHydratedText(parentNode, text);
    }
  }
  function didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props, isConcurrentMode) {
    {
      if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
        warnForInsertedHydratedElement(parentInstance, type);
      }
    }
  }
  function didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text, isConcurrentMode) {
    {
      if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
        warnForInsertedHydratedText(parentInstance, text);
      }
    }
  }
  function errorHydratingContainer(parentContainer) {
    {
      // TODO: This gets logged by onRecoverableError, too, so we should be
      // able to remove it.
      error('An error occurred during hydration. The server HTML was replaced with client content in <%s>.', parentContainer.nodeName.toLowerCase());
    }
  }
  function preparePortalMount(portalInstance) {
    listenToAllSupportedEvents(portalInstance);
  }

  var randomKey = Math.random().toString(36).slice(2);
  var internalInstanceKey = '__reactFiber$' + randomKey;
  var internalPropsKey = '__reactProps$' + randomKey;
  var internalContainerInstanceKey = '__reactContainer$' + randomKey;
  var internalEventHandlersKey = '__reactEvents$' + randomKey;
  var internalEventHandlerListenersKey = '__reactListeners$' + randomKey;
  var internalEventHandlesSetKey = '__reactHandles$' + randomKey;
  function detachDeletedInstance(node) {
    // TODO: This function is only called on host components. I don't think all of
    // these fields are relevant.
    delete node[internalInstanceKey];
    delete node[internalPropsKey];
    delete node[internalEventHandlersKey];
    delete node[internalEventHandlerListenersKey];
    delete node[internalEventHandlesSetKey];
  }
  function precacheFiberNode(hostInst, node) {
    node[internalInstanceKey] = hostInst;
  }
  function markContainerAsRoot(hostRoot, node) {
    node[internalContainerInstanceKey] = hostRoot;
  }
  function unmarkContainerAsRoot(node) {
    node[internalContainerInstanceKey] = null;
  }
  function isContainerMarkedAsRoot(node) {
    return !!node[internalContainerInstanceKey];
  } // Given a DOM node, return the closest HostComponent or HostText fiber ancestor.
  // If the target node is part of a hydrated or not yet rendered subtree, then
  // this may also return a SuspenseComponent or HostRoot to indicate that.
  // Conceptually the HostRoot fiber is a child of the Container node. So if you
  // pass the Container node as the targetNode, you will not actually get the
  // HostRoot back. To get to the HostRoot, you need to pass a child of it.
  // The same thing applies to Suspense boundaries.

  function getClosestInstanceFromNode(targetNode) {
    var targetInst = targetNode[internalInstanceKey];

    if (targetInst) {
      // Don't return HostRoot or SuspenseComponent here.
      return targetInst;
    } // If the direct event target isn't a React owned DOM node, we need to look
    // to see if one of its parents is a React owned DOM node.


    var parentNode = targetNode.parentNode;

    while (parentNode) {
      // We'll check if this is a container root that could include
      // React nodes in the future. We need to check this first because
      // if we're a child of a dehydrated container, we need to first
      // find that inner container before moving on to finding the parent
      // instance. Note that we don't check this field on  the targetNode
      // itself because the fibers are conceptually between the container
      // node and the first child. It isn't surrounding the container node.
      // If it's not a container, we check if it's an instance.
      targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];

      if (targetInst) {
        // Since this wasn't the direct target of the event, we might have
        // stepped past dehydrated DOM nodes to get here. However they could
        // also have been non-React nodes. We need to answer which one.
        // If we the instance doesn't have any children, then there can't be
        // a nested suspense boundary within it. So we can use this as a fast
        // bailout. Most of the time, when people add non-React children to
        // the tree, it is using a ref to a child-less DOM node.
        // Normally we'd only need to check one of the fibers because if it
        // has ever gone from having children to deleting them or vice versa
        // it would have deleted the dehydrated boundary nested inside already.
        // However, since the HostRoot starts out with an alternate it might
        // have one on the alternate so we need to check in case this was a
        // root.
        var alternate = targetInst.alternate;

        if (targetInst.child !== null || alternate !== null && alternate.child !== null) {
          // Next we need to figure out if the node that skipped past is
          // nested within a dehydrated boundary and if so, which one.
          var suspenseInstance = getParentSuspenseInstance(targetNode);

          while (suspenseInstance !== null) {
            // We found a suspense instance. That means that we haven't
            // hydrated it yet. Even though we leave the comments in the
            // DOM after hydrating, and there are boundaries in the DOM
            // that could already be hydrated, we wouldn't have found them
            // through this pass since if the target is hydrated it would
            // have had an internalInstanceKey on it.
            // Let's get the fiber associated with the SuspenseComponent
            // as the deepest instance.
            var targetSuspenseInst = suspenseInstance[internalInstanceKey];

            if (targetSuspenseInst) {
              return targetSuspenseInst;
            } // If we don't find a Fiber on the comment, it might be because
            // we haven't gotten to hydrate it yet. There might still be a
            // parent boundary that hasn't above this one so we need to find
            // the outer most that is known.


            suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent
            // host component also hasn't hydrated yet. We can return it
            // below since it will bail out on the isMounted check later.
          }
        }

        return targetInst;
      }

      targetNode = parentNode;
      parentNode = targetNode.parentNode;
    }

    return null;
  }
  /**
   * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
   * instance, or null if the node was not rendered by this React.
   */

  function getInstanceFromNode(node) {
    var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];

    if (inst) {
      if (inst.tag === HostComponent || inst.tag === HostText || inst.tag === SuspenseComponent || inst.tag === HostRoot) {
        return inst;
      } else {
        return null;
      }
    }

    return null;
  }
  /**
   * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
   * DOM node.
   */

  function getNodeFromInstance(inst) {
    if (inst.tag === HostComponent || inst.tag === HostText) {
      // In Fiber this, is just the state node right now. We assume it will be
      // a host component or host text.
      return inst.stateNode;
    } // Without this first invariant, passing a non-DOM-component triggers the next
    // invariant for a missing parent, which is super confusing.


    throw new Error('getNodeFromInstance: Invalid argument.');
  }
  function getFiberCurrentPropsFromNode(node) {
    return node[internalPropsKey] || null;
  }
  function updateFiberProps(node, props) {
    node[internalPropsKey] = props;
  }
  function getEventListenerSet(node) {
    var elementListenerSet = node[internalEventHandlersKey];

    if (elementListenerSet === undefined) {
      elementListenerSet = node[internalEventHandlersKey] = new Set();
    }

    return elementListenerSet;
  }

  var loggedTypeFailures = {};
  var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;

  function setCurrentlyValidatingElement(element) {
    {
      if (element) {
        var owner = element._owner;
        var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
        ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
      } else {
        ReactDebugCurrentFrame$1.setExtraStackFrame(null);
      }
    }
  }

  function checkPropTypes(typeSpecs, values, location, componentName, element) {
    {
      // $FlowFixMe This is okay but Flow doesn't know it.
      var has = Function.call.bind(hasOwnProperty);

      for (var typeSpecName in typeSpecs) {
        if (has(typeSpecs, typeSpecName)) {
          var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
          // fail the render phase where it didn't fail before. So we log it.
          // After these have been cleaned up, we'll let them throw.

          try {
            // This is intentionally an invariant that gets caught. It's the same
            // behavior as without this statement except with a better message.
            if (typeof typeSpecs[typeSpecName] !== 'function') {
              // eslint-disable-next-line react-internal/prod-error-codes
              var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
              err.name = 'Invariant Violation';
              throw err;
            }

            error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
          } catch (ex) {
            error$1 = ex;
          }

          if (error$1 && !(error$1 instanceof Error)) {
            setCurrentlyValidatingElement(element);

            error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);

            setCurrentlyValidatingElement(null);
          }

          if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
            // Only monitor this failure once because there tends to be a lot of the
            // same error.
            loggedTypeFailures[error$1.message] = true;
            setCurrentlyValidatingElement(element);

            error('Failed %s type: %s', location, error$1.message);

            setCurrentlyValidatingElement(null);
          }
        }
      }
    }
  }

  var valueStack = [];
  var fiberStack;

  {
    fiberStack = [];
  }

  var index = -1;

  function createCursor(defaultValue) {
    return {
      current: defaultValue
    };
  }

  function pop(cursor, fiber) {
    if (index < 0) {
      {
        error('Unexpected pop.');
      }

      return;
    }

    {
      if (fiber !== fiberStack[index]) {
        error('Unexpected Fiber popped.');
      }
    }

    cursor.current = valueStack[index];
    valueStack[index] = null;

    {
      fiberStack[index] = null;
    }

    index--;
  }

  function push(cursor, value, fiber) {
    index++;
    valueStack[index] = cursor.current;

    {
      fiberStack[index] = fiber;
    }

    cursor.current = value;
  }

  var warnedAboutMissingGetChildContext;

  {
    warnedAboutMissingGetChildContext = {};
  }

  var emptyContextObject = {};

  {
    Object.freeze(emptyContextObject);
  } // A cursor to the current merged context object on the stack.


  var contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed.

  var didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack.
  // We use this to get access to the parent context after we have already
  // pushed the next context provider, and now need to merge their contexts.

  var previousContext = emptyContextObject;

  function getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) {
    {
      if (didPushOwnContextIfProvider && isContextProvider(Component)) {
        // If the fiber is a context provider itself, when we read its context
        // we may have already pushed its own child context on the stack. A context
        // provider should not "see" its own child context. Therefore we read the
        // previous (parent) context instead for a context provider.
        return previousContext;
      }

      return contextStackCursor.current;
    }
  }

  function cacheContext(workInProgress, unmaskedContext, maskedContext) {
    {
      var instance = workInProgress.stateNode;
      instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;
      instance.__reactInternalMemoizedMaskedChildContext = maskedContext;
    }
  }

  function getMaskedContext(workInProgress, unmaskedContext) {
    {
      var type = workInProgress.type;
      var contextTypes = type.contextTypes;

      if (!contextTypes) {
        return emptyContextObject;
      } // Avoid recreating masked context unless unmasked context has changed.
      // Failing to do this will result in unnecessary calls to componentWillReceiveProps.
      // This may trigger infinite loops if componentWillReceiveProps calls setState.


      var instance = workInProgress.stateNode;

      if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {
        return instance.__reactInternalMemoizedMaskedChildContext;
      }

      var context = {};

      for (var key in contextTypes) {
        context[key] = unmaskedContext[key];
      }

      {
        var name = getComponentNameFromFiber(workInProgress) || 'Unknown';
        checkPropTypes(contextTypes, context, 'context', name);
      } // Cache unmasked context so we can avoid recreating masked context unless necessary.
      // Context is created before the class component is instantiated so check for instance.


      if (instance) {
        cacheContext(workInProgress, unmaskedContext, context);
      }

      return context;
    }
  }

  function hasContextChanged() {
    {
      return didPerformWorkStackCursor.current;
    }
  }

  function isContextProvider(type) {
    {
      var childContextTypes = type.childContextTypes;
      return childContextTypes !== null && childContextTypes !== undefined;
    }
  }

  function popContext(fiber) {
    {
      pop(didPerformWorkStackCursor, fiber);
      pop(contextStackCursor, fiber);
    }
  }

  function popTopLevelContextObject(fiber) {
    {
      pop(didPerformWorkStackCursor, fiber);
      pop(contextStackCursor, fiber);
    }
  }

  function pushTopLevelContextObject(fiber, context, didChange) {
    {
      if (contextStackCursor.current !== emptyContextObject) {
        throw new Error('Unexpected context found on stack. ' + 'This error is likely caused by a bug in React. Please file an issue.');
      }

      push(contextStackCursor, context, fiber);
      push(didPerformWorkStackCursor, didChange, fiber);
    }
  }

  function processChildContext(fiber, type, parentContext) {
    {
      var instance = fiber.stateNode;
      var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future.
      // It has only been added in Fiber to match the (unintentional) behavior in Stack.

      if (typeof instance.getChildContext !== 'function') {
        {
          var componentName = getComponentNameFromFiber(fiber) || 'Unknown';

          if (!warnedAboutMissingGetChildContext[componentName]) {
            warnedAboutMissingGetChildContext[componentName] = true;

            error('%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);
          }
        }

        return parentContext;
      }

      var childContext = instance.getChildContext();

      for (var contextKey in childContext) {
        if (!(contextKey in childContextTypes)) {
          throw new Error((getComponentNameFromFiber(fiber) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes.");
        }
      }

      {
        var name = getComponentNameFromFiber(fiber) || 'Unknown';
        checkPropTypes(childContextTypes, childContext, 'child context', name);
      }

      return assign({}, parentContext, childContext);
    }
  }

  function pushContextProvider(workInProgress) {
    {
      var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity.
      // If the instance does not exist yet, we will push null at first,
      // and replace it on the stack later when invalidating the context.

      var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject; // Remember the parent context so we can merge with it later.
      // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.

      previousContext = contextStackCursor.current;
      push(contextStackCursor, memoizedMergedChildContext, workInProgress);
      push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);
      return true;
    }
  }

  function invalidateContextProvider(workInProgress, type, didChange) {
    {
      var instance = workInProgress.stateNode;

      if (!instance) {
        throw new Error('Expected to have an instance by this point. ' + 'This error is likely caused by a bug in React. Please file an issue.');
      }

      if (didChange) {
        // Merge parent and own context.
        // Skip this if we're not updating due to sCU.
        // This avoids unnecessarily recomputing memoized values.
        var mergedContext = processChildContext(workInProgress, type, previousContext);
        instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one.
        // It is important to unwind the context in the reverse order.

        pop(didPerformWorkStackCursor, workInProgress);
        pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed.

        push(contextStackCursor, mergedContext, workInProgress);
        push(didPerformWorkStackCursor, didChange, workInProgress);
      } else {
        pop(didPerformWorkStackCursor, workInProgress);
        push(didPerformWorkStackCursor, didChange, workInProgress);
      }
    }
  }

  function findCurrentUnmaskedContext(fiber) {
    {
      // Currently this is only used with renderSubtreeIntoContainer; not sure if it
      // makes sense elsewhere
      if (!isFiberMounted(fiber) || fiber.tag !== ClassComponent) {
        throw new Error('Expected subtree parent to be a mounted class component. ' + 'This error is likely caused by a bug in React. Please file an issue.');
      }

      var node = fiber;

      do {
        switch (node.tag) {
          case HostRoot:
            return node.stateNode.context;

          case ClassComponent:
            {
              var Component = node.type;

              if (isContextProvider(Component)) {
                return node.stateNode.__reactInternalMemoizedMergedChildContext;
              }

              break;
            }
        }

        node = node.return;
      } while (node !== null);

      throw new Error('Found unexpected detached subtree parent. ' + 'This error is likely caused by a bug in React. Please file an issue.');
    }
  }

  var LegacyRoot = 0;
  var ConcurrentRoot = 1;

  var syncQueue = null;
  var includesLegacySyncCallbacks = false;
  var isFlushingSyncQueue = false;
  function scheduleSyncCallback(callback) {
    // Push this callback into an internal queue. We'll flush these either in
    // the next tick, or earlier if something calls `flushSyncCallbackQueue`.
    if (syncQueue === null) {
      syncQueue = [callback];
    } else {
      // Push onto existing queue. Don't need to schedule a callback because
      // we already scheduled one when we created the queue.
      syncQueue.push(callback);
    }
  }
  function scheduleLegacySyncCallback(callback) {
    includesLegacySyncCallbacks = true;
    scheduleSyncCallback(callback);
  }
  function flushSyncCallbacksOnlyInLegacyMode() {
    // Only flushes the queue if there's a legacy sync callback scheduled.
    // TODO: There's only a single type of callback: performSyncOnWorkOnRoot. So
    // it might make more sense for the queue to be a list of roots instead of a
    // list of generic callbacks. Then we can have two: one for legacy roots, one
    // for concurrent roots. And this method would only flush the legacy ones.
    if (includesLegacySyncCallbacks) {
      flushSyncCallbacks();
    }
  }
  function flushSyncCallbacks() {
    if (!isFlushingSyncQueue && syncQueue !== null) {
      // Prevent re-entrance.
      isFlushingSyncQueue = true;
      var i = 0;
      var previousUpdatePriority = getCurrentUpdatePriority();

      try {
        var isSync = true;
        var queue = syncQueue; // TODO: Is this necessary anymore? The only user code that runs in this
        // queue is in the render or commit phases.

        setCurrentUpdatePriority(DiscreteEventPriority);

        for (; i < queue.length; i++) {
          var callback = queue[i];

          do {
            callback = callback(isSync);
          } while (callback !== null);
        }

        syncQueue = null;
        includesLegacySyncCallbacks = false;
      } catch (error) {
        // If something throws, leave the remaining callbacks on the queue.
        if (syncQueue !== null) {
          syncQueue = syncQueue.slice(i + 1);
        } // Resume flushing in the next tick


        scheduleCallback(ImmediatePriority, flushSyncCallbacks);
        throw error;
      } finally {
        setCurrentUpdatePriority(previousUpdatePriority);
        isFlushingSyncQueue = false;
      }
    }

    return null;
  }

  // TODO: Use the unified fiber stack module instead of this local one?
  // Intentionally not using it yet to derisk the initial implementation, because
  // the way we push/pop these values is a bit unusual. If there's a mistake, I'd
  // rather the ids be wrong than crash the whole reconciler.
  var forkStack = [];
  var forkStackIndex = 0;
  var treeForkProvider = null;
  var treeForkCount = 0;
  var idStack = [];
  var idStackIndex = 0;
  var treeContextProvider = null;
  var treeContextId = 1;
  var treeContextOverflow = '';
  function isForkedChild(workInProgress) {
    warnIfNotHydrating();
    return (workInProgress.flags & Forked) !== NoFlags;
  }
  function getForksAtLevel(workInProgress) {
    warnIfNotHydrating();
    return treeForkCount;
  }
  function getTreeId() {
    var overflow = treeContextOverflow;
    var idWithLeadingBit = treeContextId;
    var id = idWithLeadingBit & ~getLeadingBit(idWithLeadingBit);
    return id.toString(32) + overflow;
  }
  function pushTreeFork(workInProgress, totalChildren) {
    // This is called right after we reconcile an array (or iterator) of child
    // fibers, because that's the only place where we know how many children in
    // the whole set without doing extra work later, or storing addtional
    // information on the fiber.
    //
    // That's why this function is separate from pushTreeId â€” it's called during
    // the render phase of the fork parent, not the child, which is where we push
    // the other context values.
    //
    // In the Fizz implementation this is much simpler because the child is
    // rendered in the same callstack as the parent.
    //
    // It might be better to just add a `forks` field to the Fiber type. It would
    // make this module simpler.
    warnIfNotHydrating();
    forkStack[forkStackIndex++] = treeForkCount;
    forkStack[forkStackIndex++] = treeForkProvider;
    treeForkProvider = workInProgress;
    treeForkCount = totalChildren;
  }
  function pushTreeId(workInProgress, totalChildren, index) {
    warnIfNotHydrating();
    idStack[idStackIndex++] = treeContextId;
    idStack[idStackIndex++] = treeContextOverflow;
    idStack[idStackIndex++] = treeContextProvider;
    treeContextProvider = workInProgress;
    var baseIdWithLeadingBit = treeContextId;
    var baseOverflow = treeContextOverflow; // The leftmost 1 marks the end of the sequence, non-inclusive. It's not part
    // of the id; we use it to account for leading 0s.

    var baseLength = getBitLength(baseIdWithLeadingBit) - 1;
    var baseId = baseIdWithLeadingBit & ~(1 << baseLength);
    var slot = index + 1;
    var length = getBitLength(totalChildren) + baseLength; // 30 is the max length we can store without overflowing, taking into
    // consideration the leading 1 we use to mark the end of the sequence.

    if (length > 30) {
      // We overflowed the bitwise-safe range. Fall back to slower algorithm.
      // This branch assumes the length of the base id is greater than 5; it won't
      // work for smaller ids, because you need 5 bits per character.
      //
      // We encode the id in multiple steps: first the base id, then the
      // remaining digits.
      //
      // Each 5 bit sequence corresponds to a single base 32 character. So for
      // example, if the current id is 23 bits long, we can convert 20 of those
      // bits into a string of 4 characters, with 3 bits left over.
      //
      // First calculate how many bits in the base id represent a complete
      // sequence of characters.
      var numberOfOverflowBits = baseLength - baseLength % 5; // Then create a bitmask that selects only those bits.

      var newOverflowBits = (1 << numberOfOverflowBits) - 1; // Select the bits, and convert them to a base 32 string.

      var newOverflow = (baseId & newOverflowBits).toString(32); // Now we can remove those bits from the base id.

      var restOfBaseId = baseId >> numberOfOverflowBits;
      var restOfBaseLength = baseLength - numberOfOverflowBits; // Finally, encode the rest of the bits using the normal algorithm. Because
      // we made more room, this time it won't overflow.

      var restOfLength = getBitLength(totalChildren) + restOfBaseLength;
      var restOfNewBits = slot << restOfBaseLength;
      var id = restOfNewBits | restOfBaseId;
      var overflow = newOverflow + baseOverflow;
      treeContextId = 1 << restOfLength | id;
      treeContextOverflow = overflow;
    } else {
      // Normal path
      var newBits = slot << baseLength;

      var _id = newBits | baseId;

      var _overflow = baseOverflow;
      treeContextId = 1 << length | _id;
      treeContextOverflow = _overflow;
    }
  }
  function pushMaterializedTreeId(workInProgress) {
    warnIfNotHydrating(); // This component materialized an id. This will affect any ids that appear
    // in its children.

    var returnFiber = workInProgress.return;

    if (returnFiber !== null) {
      var numberOfForks = 1;
      var slotIndex = 0;
      pushTreeFork(workInProgress, numberOfForks);
      pushTreeId(workInProgress, numberOfForks, slotIndex);
    }
  }

  function getBitLength(number) {
    return 32 - clz32(number);
  }

  function getLeadingBit(id) {
    return 1 << getBitLength(id) - 1;
  }

  function popTreeContext(workInProgress) {
    // Restore the previous values.
    // This is a bit more complicated than other context-like modules in Fiber
    // because the same Fiber may appear on the stack multiple times and for
    // different reasons. We have to keep popping until the work-in-progress is
    // no longer at the top of the stack.
    while (workInProgress === treeForkProvider) {
      treeForkProvider = forkStack[--forkStackIndex];
      forkStack[forkStackIndex] = null;
      treeForkCount = forkStack[--forkStackIndex];
      forkStack[forkStackIndex] = null;
    }

    while (workInProgress === treeContextProvider) {
      treeContextProvider = idStack[--idStackIndex];
      idStack[idStackIndex] = null;
      treeContextOverflow = idStack[--idStackIndex];
      idStack[idStackIndex] = null;
      treeContextId = idStack[--idStackIndex];
      idStack[idStackIndex] = null;
    }
  }
  function getSuspendedTreeContext() {
    warnIfNotHydrating();

    if (treeContextProvider !== null) {
      return {
        id: treeContextId,
        overflow: treeContextOverflow
      };
    } else {
      return null;
    }
  }
  function restoreSuspendedTreeContext(workInProgress, suspendedContext) {
    warnIfNotHydrating();
    idStack[idStackIndex++] = treeContextId;
    idStack[idStackIndex++] = treeContextOverflow;
    idStack[idStackIndex++] = treeContextProvider;
    treeContextId = suspendedContext.id;
    treeContextOverflow = suspendedContext.overflow;
    treeContextProvider = workInProgress;
  }

  function warnIfNotHydrating() {
    {
      if (!getIsHydrating()) {
        error('Expected to be hydrating. This is a bug in React. Please file ' + 'an issue.');
      }
    }
  }

  // This may have been an insertion or a hydration.

  var hydrationParentFiber = null;
  var nextHydratableInstance = null;
  var isHydrating = false; // This flag allows for warning supression when we expect there to be mismatches
  // due to earlier mismatches or a suspended fiber.

  var didSuspendOrErrorDEV = false; // Hydration errors that were thrown inside this boundary

  var hydrationErrors = null;

  function warnIfHydrating() {
    {
      if (isHydrating) {
        error('We should not be hydrating here. This is a bug in React. Please file a bug.');
      }
    }
  }

  function markDidThrowWhileHydratingDEV() {
    {
      didSuspendOrErrorDEV = true;
    }
  }
  function didSuspendOrErrorWhileHydratingDEV() {
    {
      return didSuspendOrErrorDEV;
    }
  }

  function enterHydrationState(fiber) {

    var parentInstance = fiber.stateNode.containerInfo;
    nextHydratableInstance = getFirstHydratableChildWithinContainer(parentInstance);
    hydrationParentFiber = fiber;
    isHydrating = true;
    hydrationErrors = null;
    didSuspendOrErrorDEV = false;
    return true;
  }

  function reenterHydrationStateFromDehydratedSuspenseInstance(fiber, suspenseInstance, treeContext) {

    nextHydratableInstance = getFirstHydratableChildWithinSuspenseInstance(suspenseInstance);
    hydrationParentFiber = fiber;
    isHydrating = true;
    hydrationErrors = null;
    didSuspendOrErrorDEV = false;

    if (treeContext !== null) {
      restoreSuspendedTreeContext(fiber, treeContext);
    }

    return true;
  }

  function warnUnhydratedInstance(returnFiber, instance) {
    {
      switch (returnFiber.tag) {
        case HostRoot:
          {
            didNotHydrateInstanceWithinContainer(returnFiber.stateNode.containerInfo, instance);
            break;
          }

        case HostComponent:
          {
            var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;
            didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance, // TODO: Delete this argument when we remove the legacy root API.
            isConcurrentMode);
            break;
          }

        case SuspenseComponent:
          {
            var suspenseState = returnFiber.memoizedState;
            if (suspenseState.dehydrated !== null) didNotHydrateInstanceWithinSuspenseInstance(suspenseState.dehydrated, instance);
            break;
          }
      }
    }
  }

  function deleteHydratableInstance(returnFiber, instance) {
    warnUnhydratedInstance(returnFiber, instance);
    var childToDelete = createFiberFromHostInstanceForDeletion();
    childToDelete.stateNode = instance;
    childToDelete.return = returnFiber;
    var deletions = returnFiber.deletions;

    if (deletions === null) {
      returnFiber.deletions = [childToDelete];
      returnFiber.flags |= ChildDeletion;
    } else {
      deletions.push(childToDelete);
    }
  }

  function warnNonhydratedInstance(returnFiber, fiber) {
    {
      if (didSuspendOrErrorDEV) {
        // Inside a boundary that already suspended. We're currently rendering the
        // siblings of a suspended node. The mismatch may be due to the missing
        // data, so it's probably a false positive.
        return;
      }

      switch (returnFiber.tag) {
        case HostRoot:
          {
            var parentContainer = returnFiber.stateNode.containerInfo;

            switch (fiber.tag) {
              case HostComponent:
                var type = fiber.type;
                var props = fiber.pendingProps;
                didNotFindHydratableInstanceWithinContainer(parentContainer, type);
                break;

              case HostText:
                var text = fiber.pendingProps;
                didNotFindHydratableTextInstanceWithinContainer(parentContainer, text);
                break;
            }

            break;
          }

        case HostComponent:
          {
            var parentType = returnFiber.type;
            var parentProps = returnFiber.memoizedProps;
            var parentInstance = returnFiber.stateNode;

            switch (fiber.tag) {
              case HostComponent:
                {
                  var _type = fiber.type;
                  var _props = fiber.pendingProps;
                  var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;
                  didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type, _props, // TODO: Delete this argument when we remove the legacy root API.
                  isConcurrentMode);
                  break;
                }

              case HostText:
                {
                  var _text = fiber.pendingProps;

                  var _isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;

                  didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text, // TODO: Delete this argument when we remove the legacy root API.
                  _isConcurrentMode);
                  break;
                }
            }

            break;
          }

        case SuspenseComponent:
          {
            var suspenseState = returnFiber.memoizedState;
            var _parentInstance = suspenseState.dehydrated;
            if (_parentInstance !== null) switch (fiber.tag) {
              case HostComponent:
                var _type2 = fiber.type;
                var _props2 = fiber.pendingProps;
                didNotFindHydratableInstanceWithinSuspenseInstance(_parentInstance, _type2);
                break;

              case HostText:
                var _text2 = fiber.pendingProps;
                didNotFindHydratableTextInstanceWithinSuspenseInstance(_parentInstance, _text2);
                break;
            }
            break;
          }

        default:
          return;
      }
    }
  }

  function insertNonHydratedInstance(returnFiber, fiber) {
    fiber.flags = fiber.flags & ~Hydrating | Placement;
    warnNonhydratedInstance(returnFiber, fiber);
  }

  function tryHydrate(fiber, nextInstance) {
    switch (fiber.tag) {
      case HostComponent:
        {
          var type = fiber.type;
          var props = fiber.pendingProps;
          var instance = canHydrateInstance(nextInstance, type);

          if (instance !== null) {
            fiber.stateNode = instance;
            hydrationParentFiber = fiber;
            nextHydratableInstance = getFirstHydratableChild(instance);
            return true;
          }

          return false;
        }

      case HostText:
        {
          var text = fiber.pendingProps;
          var textInstance = canHydrateTextInstance(nextInstance, text);

          if (textInstance !== null) {
            fiber.stateNode = textInstance;
            hydrationParentFiber = fiber; // Text Instances don't have children so there's nothing to hydrate.

            nextHydratableInstance = null;
            return true;
          }

          return false;
        }

      case SuspenseComponent:
        {
          var suspenseInstance = canHydrateSuspenseInstance(nextInstance);

          if (suspenseInstance !== null) {
            var suspenseState = {
              dehydrated: suspenseInstance,
              treeContext: getSuspendedTreeContext(),
              retryLane: OffscreenLane
            };
            fiber.memoizedState = suspenseState; // Store the dehydrated fragment as a child fiber.
            // This simplifies the code for getHostSibling and deleting nodes,
            // since it doesn't have to consider all Suspense boundaries and
            // check if they're dehydrated ones or not.

            var dehydratedFragment = createFiberFromDehydratedFragment(suspenseInstance);
            dehydratedFragment.return = fiber;
            fiber.child = dehydratedFragment;
            hydrationParentFiber = fiber; // While a Suspense Instance does have children, we won't step into
            // it during the first pass. Instead, we'll reenter it later.

            nextHydratableInstance = null;
            return true;
          }

          return false;
        }

      default:
        return false;
    }
  }

  function shouldClientRenderOnMismatch(fiber) {
    return (fiber.mode & ConcurrentMode) !== NoMode && (fiber.flags & DidCapture) === NoFlags;
  }

  function throwOnHydrationMismatch(fiber) {
    throw new Error('Hydration failed because the initial UI does not match what was ' + 'rendered on the server.');
  }

  function tryToClaimNextHydratableInstance(fiber) {
    if (!isHydrating) {
      return;
    }

    var nextInstance = nextHydratableInstance;

    if (!nextInstance) {
      if (shouldClientRenderOnMismatch(fiber)) {
        warnNonhydratedInstance(hydrationParentFiber, fiber);
        throwOnHydrationMismatch();
      } // Nothing to hydrate. Make it an insertion.


      insertNonHydratedInstance(hydrationParentFiber, fiber);
      isHydrating = false;
      hydrationParentFiber = fiber;
      return;
    }

    var firstAttemptedInstance = nextInstance;

    if (!tryHydrate(fiber, nextInstance)) {
      if (shouldClientRenderOnMismatch(fiber)) {
        warnNonhydratedInstance(hydrationParentFiber, fiber);
        throwOnHydrationMismatch();
      } // If we can't hydrate this instance let's try the next one.
      // We use this as a heuristic. It's based on intuition and not data so it
      // might be flawed or unnecessary.


      nextInstance = getNextHydratableSibling(firstAttemptedInstance);
      var prevHydrationParentFiber = hydrationParentFiber;

      if (!nextInstance || !tryHydrate(fiber, nextInstance)) {
        // Nothing to hydrate. Make it an insertion.
        insertNonHydratedInstance(hydrationParentFiber, fiber);
        isHydrating = false;
        hydrationParentFiber = fiber;
        return;
      } // We matched the next one, we'll now assume that the first one was
      // superfluous and we'll delete it. Since we can't eagerly delete it
      // we'll have to schedule a deletion. To do that, this node needs a dummy
      // fiber associated with it.


      deleteHydratableInstance(prevHydrationParentFiber, firstAttemptedInstance);
    }
  }

  function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {

    var instance = fiber.stateNode;
    var shouldWarnIfMismatchDev = !didSuspendOrErrorDEV;
    var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber, shouldWarnIfMismatchDev); // TODO: Type this specific to this type of component.

    fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there
    // is a new ref we mark this as an update.

    if (updatePayload !== null) {
      return true;
    }

    return false;
  }

  function prepareToHydrateHostTextInstance(fiber) {

    var textInstance = fiber.stateNode;
    var textContent = fiber.memoizedProps;
    var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);

    if (shouldUpdate) {
      // We assume that prepareToHydrateHostTextInstance is called in a context where the
      // hydration parent is the parent host component of this host text.
      var returnFiber = hydrationParentFiber;

      if (returnFiber !== null) {
        switch (returnFiber.tag) {
          case HostRoot:
            {
              var parentContainer = returnFiber.stateNode.containerInfo;
              var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;
              didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent, // TODO: Delete this argument when we remove the legacy root API.
              isConcurrentMode);
              break;
            }

          case HostComponent:
            {
              var parentType = returnFiber.type;
              var parentProps = returnFiber.memoizedProps;
              var parentInstance = returnFiber.stateNode;

              var _isConcurrentMode2 = (returnFiber.mode & ConcurrentMode) !== NoMode;

              didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent, // TODO: Delete this argument when we remove the legacy root API.
              _isConcurrentMode2);
              break;
            }
        }
      }
    }

    return shouldUpdate;
  }

  function prepareToHydrateHostSuspenseInstance(fiber) {

    var suspenseState = fiber.memoizedState;
    var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;

    if (!suspenseInstance) {
      throw new Error('Expected to have a hydrated suspense instance. ' + 'This error is likely caused by a bug in React. Please file an issue.');
    }

    hydrateSuspenseInstance(suspenseInstance, fiber);
  }

  function skipPastDehydratedSuspenseInstance(fiber) {

    var suspenseState = fiber.memoizedState;
    var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;

    if (!suspenseInstance) {
      throw new Error('Expected to have a hydrated suspense instance. ' + 'This error is likely caused by a bug in React. Please file an issue.');
    }

    return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);
  }

  function popToNextHostParent(fiber) {
    var parent = fiber.return;

    while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {
      parent = parent.return;
    }

    hydrationParentFiber = parent;
  }

  function popHydrationState(fiber) {

    if (fiber !== hydrationParentFiber) {
      // We're deeper than the current hydration context, inside an inserted
      // tree.
      return false;
    }

    if (!isHydrating) {
      // If we're not currently hydrating but we're in a hydration context, then
      // we were an insertion and now need to pop up reenter hydration of our
      // siblings.
      popToNextHostParent(fiber);
      isHydrating = true;
      return false;
    } // If we have any remaining hydratable nodes, we need to delete them now.
    // We only do this deeper than head and body since they tend to have random
    // other nodes in them. We also ignore components with pure text content in
    // side of them. We also don't delete anything inside the root container.


    if (fiber.tag !== HostRoot && (fiber.tag !== HostComponent || shouldDeleteUnhydratedTailInstances(fiber.type) && !shouldSetTextContent(fiber.type, fiber.memoizedProps))) {
      var nextInstance = nextHydratableInstance;

      if (nextInstance) {
        if (shouldClientRenderOnMismatch(fiber)) {
          warnIfUnhydratedTailNodes(fiber);
          throwOnHydrationMismatch();
        } else {
          while (nextInstance) {
            deleteHydratableInstance(fiber, nextInstance);
            nextInstance = getNextHydratableSibling(nextInstance);
          }
        }
      }
    }

    popToNextHostParent(fiber);

    if (fiber.tag === SuspenseComponent) {
      nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);
    } else {
      nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;
    }

    return true;
  }

  function hasUnhydratedTailNodes() {
    return isHydrating && nextHydratableInstance !== null;
  }

  function warnIfUnhydratedTailNodes(fiber) {
    var nextInstance = nextHydratableInstance;

    while (nextInstance) {
      warnUnhydratedInstance(fiber, nextInstance);
      nextInstance = getNextHydratableSibling(nextInstance);
    }
  }

  function resetHydrationState() {

    hydrationParentFiber = null;
    nextHydratableInstance = null;
    isHydrating = false;
    didSuspendOrErrorDEV = false;
  }

  function upgradeHydrationErrorsToRecoverable() {
    if (hydrationErrors !== null) {
      // Successfully completed a forced client render. The errors that occurred
      // during the hydration attempt are now recovered. We will log them in
      // commit phase, once the entire tree has finished.
      queueRecoverableErrors(hydrationErrors);
      hydrationErrors = null;
    }
  }

  function getIsHydrating() {
    return isHydrating;
  }

  function queueHydrationError(error) {
    if (hydrationErrors === null) {
      hydrationErrors = [error];
    } else {
      hydrationErrors.push(error);
    }
  }

  var ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;
  var NoTransition = null;
  function requestCurrentTransition() {
    return ReactCurrentBatchConfig$1.transition;
  }

  var ReactStrictModeWarnings = {
    recordUnsafeLifecycleWarnings: function (fiber, instance) {},
    flushPendingUnsafeLifecycleWarnings: function () {},
    recordLegacyContextWarning: function (fiber, instance) {},
    flushLegacyContextWarning: function () {},
    discardPendingWarnings: function () {}
  };

  {
    var findStrictRoot = function (fiber) {
      var maybeStrictRoot = null;
      var node = fiber;

      while (node !== null) {
        if (node.mode & StrictLegacyMode) {
          maybeStrictRoot = node;
        }

        node = node.return;
      }

      return maybeStrictRoot;
    };

    var setToSortedString = function (set) {
      var array = [];
      set.forEach(function (value) {
        array.push(value);
      });
      return array.sort().join(', ');
    };

    var pendingComponentWillMountWarnings = [];
    var pendingUNSAFE_ComponentWillMountWarnings = [];
    var pendingComponentWillReceivePropsWarnings = [];
    var pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
    var pendingComponentWillUpdateWarnings = [];
    var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about.

    var didWarnAboutUnsafeLifecycles = new Set();

    ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) {
      // Dedupe strategy: Warn once per component.
      if (didWarnAboutUnsafeLifecycles.has(fiber.type)) {
        return;
      }

      if (typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components.
      instance.componentWillMount.__suppressDeprecationWarning !== true) {
        pendingComponentWillMountWarnings.push(fiber);
      }

      if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillMount === 'function') {
        pendingUNSAFE_ComponentWillMountWarnings.push(fiber);
      }

      if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
        pendingComponentWillReceivePropsWarnings.push(fiber);
      }

      if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
        pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber);
      }

      if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
        pendingComponentWillUpdateWarnings.push(fiber);
      }

      if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillUpdate === 'function') {
        pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber);
      }
    };

    ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {
      // We do an initial pass to gather component names
      var componentWillMountUniqueNames = new Set();

      if (pendingComponentWillMountWarnings.length > 0) {
        pendingComponentWillMountWarnings.forEach(function (fiber) {
          componentWillMountUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');
          didWarnAboutUnsafeLifecycles.add(fiber.type);
        });
        pendingComponentWillMountWarnings = [];
      }

      var UNSAFE_componentWillMountUniqueNames = new Set();

      if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) {
        pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) {
          UNSAFE_componentWillMountUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');
          didWarnAboutUnsafeLifecycles.add(fiber.type);
        });
        pendingUNSAFE_ComponentWillMountWarnings = [];
      }

      var componentWillReceivePropsUniqueNames = new Set();

      if (pendingComponentWillReceivePropsWarnings.length > 0) {
        pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {
          componentWillReceivePropsUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');
          didWarnAboutUnsafeLifecycles.add(fiber.type);
        });
        pendingComponentWillReceivePropsWarnings = [];
      }

      var UNSAFE_componentWillReceivePropsUniqueNames = new Set();

      if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) {
        pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) {
          UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');
          didWarnAboutUnsafeLifecycles.add(fiber.type);
        });
        pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
      }

      var componentWillUpdateUniqueNames = new Set();

      if (pendingComponentWillUpdateWarnings.length > 0) {
        pendingComponentWillUpdateWarnings.forEach(function (fiber) {
          componentWillUpdateUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');
          didWarnAboutUnsafeLifecycles.add(fiber.type);
        });
        pendingComponentWillUpdateWarnings = [];
      }

      var UNSAFE_componentWillUpdateUniqueNames = new Set();

      if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) {
        pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) {
          UNSAFE_componentWillUpdateUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');
          didWarnAboutUnsafeLifecycles.add(fiber.type);
        });
        pendingUNSAFE_ComponentWillUpdateWarnings = [];
      } // Finally, we flush all the warnings
      // UNSAFE_ ones before the deprecated ones, since they'll be 'louder'


      if (UNSAFE_componentWillMountUniqueNames.size > 0) {
        var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);

        error('Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '\nPlease update the following components: %s', sortedNames);
      }

      if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {
        var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);

        error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, " + 'refactor your code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n' + '\nPlease update the following components: %s', _sortedNames);
      }

      if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {
        var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);

        error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '\nPlease update the following components: %s', _sortedNames2);
      }

      if (componentWillMountUniqueNames.size > 0) {
        var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);

        warn('componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames3);
      }

      if (componentWillReceivePropsUniqueNames.size > 0) {
        var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);

        warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, refactor your " + 'code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames4);
      }

      if (componentWillUpdateUniqueNames.size > 0) {
        var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);

        warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames5);
      }
    };

    var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about.

    var didWarnAboutLegacyContext = new Set();

    ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) {
      var strictRoot = findStrictRoot(fiber);

      if (strictRoot === null) {
        error('Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.');

        return;
      } // Dedup strategy: Warn once per component.


      if (didWarnAboutLegacyContext.has(fiber.type)) {
        return;
      }

      var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);

      if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === 'function') {
        if (warningsForRoot === undefined) {
          warningsForRoot = [];
          pendingLegacyContextWarning.set(strictRoot, warningsForRoot);
        }

        warningsForRoot.push(fiber);
      }
    };

    ReactStrictModeWarnings.flushLegacyContextWarning = function () {
      pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) {
        if (fiberArray.length === 0) {
          return;
        }

        var firstFiber = fiberArray[0];
        var uniqueNames = new Set();
        fiberArray.forEach(function (fiber) {
          uniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');
          didWarnAboutLegacyContext.add(fiber.type);
        });
        var sortedNames = setToSortedString(uniqueNames);

        try {
          setCurrentFiber(firstFiber);

          error('Legacy context API has been detected within a strict-mode tree.' + '\n\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context', sortedNames);
        } finally {
          resetCurrentFiber();
        }
      });
    };

    ReactStrictModeWarnings.discardPendingWarnings = function () {
      pendingComponentWillMountWarnings = [];
      pendingUNSAFE_ComponentWillMountWarnings = [];
      pendingComponentWillReceivePropsWarnings = [];
      pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
      pendingComponentWillUpdateWarnings = [];
      pendingUNSAFE_ComponentWillUpdateWarnings = [];
      pendingLegacyContextWarning = new Map();
    };
  }

  var didWarnAboutMaps;
  var didWarnAboutGenerators;
  var didWarnAboutStringRefs;
  var ownerHasKeyUseWarning;
  var ownerHasFunctionTypeWarning;

  var warnForMissingKey = function (child, returnFiber) {};

  {
    didWarnAboutMaps = false;
    didWarnAboutGenerators = false;
    didWarnAboutStringRefs = {};
    /**
     * Warn if there's no key explicitly set on dynamic arrays of children or
     * object keys are not valid. This allows us to keep track of children between
     * updates.
     */

    ownerHasKeyUseWarning = {};
    ownerHasFunctionTypeWarning = {};

    warnForMissingKey = function (child, returnFiber) {
      if (child === null || typeof child !== 'object') {
        return;
      }

      if (!child._store || child._store.validated || child.key != null) {
        return;
      }

      if (typeof child._store !== 'object') {
        throw new Error('React Component in warnForMissingKey should have a _store. ' + 'This error is likely caused by a bug in React. Please file an issue.');
      }

      child._store.validated = true;
      var componentName = getComponentNameFromFiber(returnFiber) || 'Component';

      if (ownerHasKeyUseWarning[componentName]) {
        return;
      }

      ownerHasKeyUseWarning[componentName] = true;

      error('Each child in a list should have a unique ' + '"key" prop. See https://reactjs.org/link/warning-keys for ' + 'more information.');
    };
  }

  function isReactClass(type) {
    return type.prototype && type.prototype.isReactComponent;
  }

  function coerceRef(returnFiber, current, element) {
    var mixedRef = element.ref;

    if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') {
      {
        // TODO: Clean this up once we turn on the string ref warning for
        // everyone, because the strict mode case will no longer be relevant
        if ((returnFiber.mode & StrictLegacyMode || warnAboutStringRefs) && // We warn in ReactElement.js if owner and self are equal for string refs
        // because these cannot be automatically converted to an arrow function
        // using a codemod. Therefore, we don't have to warn about string refs again.
        !(element._owner && element._self && element._owner.stateNode !== element._self) && // Will already throw with "Function components cannot have string refs"
        !(element._owner && element._owner.tag !== ClassComponent) && // Will already warn with "Function components cannot be given refs"
        !(typeof element.type === 'function' && !isReactClass(element.type)) && // Will already throw with "Element ref was specified as a string (someStringRef) but no owner was set"
        element._owner) {
          var componentName = getComponentNameFromFiber(returnFiber) || 'Component';

          if (!didWarnAboutStringRefs[componentName]) {
            {
              error('Component "%s" contains the string ref "%s". Support for string refs ' + 'will be removed in a future major release. We recommend using ' + 'useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, mixedRef);
            }

            didWarnAboutStringRefs[componentName] = true;
          }
        }
      }

      if (element._owner) {
        var owner = element._owner;
        var inst;

        if (owner) {
          var ownerFiber = owner;

          if (ownerFiber.tag !== ClassComponent) {
            throw new Error('Function components cannot have string refs. ' + 'We recommend using useRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref');
          }

          inst = ownerFiber.stateNode;
        }

        if (!inst) {
          throw new Error("Missing owner for string ref " + mixedRef + ". This error is likely caused by a " + 'bug in React. Please file an issue.');
        } // Assigning this to a const so Flow knows it won't change in the closure


        var resolvedInst = inst;

        {
          checkPropStringCoercion(mixedRef, 'ref');
        }

        var stringRef = '' + mixedRef; // Check if previous string ref matches new string ref

        if (current !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) {
          return current.ref;
        }

        var ref = function (value) {
          var refs = resolvedInst.refs;

          if (value === null) {
            delete refs[stringRef];
          } else {
            refs[stringRef] = value;
          }
        };

        ref._stringRef = stringRef;
        return ref;
      } else {
        if (typeof mixedRef !== 'string') {
          throw new Error('Expected ref to be a function, a string, an object returned by React.createRef(), or null.');
        }

        if (!element._owner) {
          throw new Error("Element ref was specified as a string (" + mixedRef + ") but no owner was set. This could happen for one of" + ' the following reasons:\n' + '1. You may be adding a ref to a function component\n' + "2. You may be adding a ref to a component that was not created inside a component's render method\n" + '3. You have multiple copies of React loaded\n' + 'See https://reactjs.org/link/refs-must-have-owner for more information.');
        }
      }
    }

    return mixedRef;
  }

  function throwOnInvalidObjectType(returnFiber, newChild) {
    var childString = Object.prototype.toString.call(newChild);
    throw new Error("Objects are not valid as a React child (found: " + (childString === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : childString) + "). " + 'If you meant to render a collection of children, use an array ' + 'instead.');
  }

  function warnOnFunctionType(returnFiber) {
    {
      var componentName = getComponentNameFromFiber(returnFiber) || 'Component';

      if (ownerHasFunctionTypeWarning[componentName]) {
        return;
      }

      ownerHasFunctionTypeWarning[componentName] = true;

      error('Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.');
    }
  }

  function resolveLazy(lazyType) {
    var payload = lazyType._payload;
    var init = lazyType._init;
    return init(payload);
  } // This wrapper function exists because I expect to clone the code in each path
  // to be able to optimize each path individually by branching early. This needs
  // a compiler or we can do it manually. Helpers that don't need this branching
  // live outside of this function.


  function ChildReconciler(shouldTrackSideEffects) {
    function deleteChild(returnFiber, childToDelete) {
      if (!shouldTrackSideEffects) {
        // Noop.
        return;
      }

      var deletions = returnFiber.deletions;

      if (deletions === null) {
        returnFiber.deletions = [childToDelete];
        returnFiber.flags |= ChildDeletion;
      } else {
        deletions.push(childToDelete);
      }
    }

    function deleteRemainingChildren(returnFiber, currentFirstChild) {
      if (!shouldTrackSideEffects) {
        // Noop.
        return null;
      } // TODO: For the shouldClone case, this could be micro-optimized a bit by
      // assuming that after the first child we've already added everything.


      var childToDelete = currentFirstChild;

      while (childToDelete !== null) {
        deleteChild(returnFiber, childToDelete);
        childToDelete = childToDelete.sibling;
      }

      return null;
    }

    function mapRemainingChildren(returnFiber, currentFirstChild) {
      // Add the remaining children to a temporary map so that we can find them by
      // keys quickly. Implicit (null) keys get added to this set with their index
      // instead.
      var existingChildren = new Map();
      var existingChild = currentFirstChild;

      while (existingChild !== null) {
        if (existingChild.key !== null) {
          existingChildren.set(existingChild.key, existingChild);
        } else {
          existingChildren.set(existingChild.index, existingChild);
        }

        existingChild = existingChild.sibling;
      }

      return existingChildren;
    }

    function useFiber(fiber, pendingProps) {
      // We currently set sibling to null and index to 0 here because it is easy
      // to forget to do before returning it. E.g. for the single child case.
      var clone = createWorkInProgress(fiber, pendingProps);
      clone.index = 0;
      clone.sibling = null;
      return clone;
    }

    function placeChild(newFiber, lastPlacedIndex, newIndex) {
      newFiber.index = newIndex;

      if (!shouldTrackSideEffects) {
        // During hydration, the useId algorithm needs to know which fibers are
        // part of a list of children (arrays, iterators).
        newFiber.flags |= Forked;
        return lastPlacedIndex;
      }

      var current = newFiber.alternate;

      if (current !== null) {
        var oldIndex = current.index;

        if (oldIndex < lastPlacedIndex) {
          // This is a move.
          newFiber.flags |= Placement;
          return lastPlacedIndex;
        } else {
          // This item can stay in place.
          return oldIndex;
        }
      } else {
        // This is an insertion.
        newFiber.flags |= Placement;
        return lastPlacedIndex;
      }
    }

    function placeSingleChild(newFiber) {
      // This is simpler for the single child case. We only need to do a
      // placement for inserting new children.
      if (shouldTrackSideEffects && newFiber.alternate === null) {
        newFiber.flags |= Placement;
      }

      return newFiber;
    }

    function updateTextNode(returnFiber, current, textContent, lanes) {
      if (current === null || current.tag !== HostText) {
        // Insert
        var created = createFiberFromText(textContent, returnFiber.mode, lanes);
        created.return = returnFiber;
        return created;
      } else {
        // Update
        var existing = useFiber(current, textContent);
        existing.return = returnFiber;
        return existing;
      }
    }

    function updateElement(returnFiber, current, element, lanes) {
      var elementType = element.type;

      if (elementType === REACT_FRAGMENT_TYPE) {
        return updateFragment(returnFiber, current, element.props.children, lanes, element.key);
      }

      if (current !== null) {
        if (current.elementType === elementType || ( // Keep this check inline so it only runs on the false path:
         isCompatibleFamilyForHotReloading(current, element) ) || // Lazy types should reconcile their resolved type.
        // We need to do this after the Hot Reloading check above,
        // because hot reloading has different semantics than prod because
        // it doesn't resuspend. So we can't let the call below suspend.
        typeof elementType === 'object' && elementType !== null && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === current.type) {
          // Move based on index
          var existing = useFiber(current, element.props);
          existing.ref = coerceRef(returnFiber, current, element);
          existing.return = returnFiber;

          {
            existing._debugSource = element._source;
            existing._debugOwner = element._owner;
          }

          return existing;
        }
      } // Insert


      var created = createFiberFromElement(element, returnFiber.mode, lanes);
      created.ref = coerceRef(returnFiber, current, element);
      created.return = returnFiber;
      return created;
    }

    function updatePortal(returnFiber, current, portal, lanes) {
      if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
        // Insert
        var created = createFiberFromPortal(portal, returnFiber.mode, lanes);
        created.return = returnFiber;
        return created;
      } else {
        // Update
        var existing = useFiber(current, portal.children || []);
        existing.return = returnFiber;
        return existing;
      }
    }

    function updateFragment(returnFiber, current, fragment, lanes, key) {
      if (current === null || current.tag !== Fragment) {
        // Insert
        var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);
        created.return = returnFiber;
        return created;
      } else {
        // Update
        var existing = useFiber(current, fragment);
        existing.return = returnFiber;
        return existing;
      }
    }

    function createChild(returnFiber, newChild, lanes) {
      if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {
        // Text nodes don't have keys. If the previous node is implicitly keyed
        // we can continue to replace it without aborting even if it is not a text
        // node.
        var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);
        created.return = returnFiber;
        return created;
      }

      if (typeof newChild === 'object' && newChild !== null) {
        switch (newChild.$$typeof) {
          case REACT_ELEMENT_TYPE:
            {
              var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);

              _created.ref = coerceRef(returnFiber, null, newChild);
              _created.return = returnFiber;
              return _created;
            }

          case REACT_PORTAL_TYPE:
            {
              var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);

              _created2.return = returnFiber;
              return _created2;
            }

          case REACT_LAZY_TYPE:
            {
              var payload = newChild._payload;
              var init = newChild._init;
              return createChild(returnFiber, init(payload), lanes);
            }
        }

        if (isArray(newChild) || getIteratorFn(newChild)) {
          var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);

          _created3.return = returnFiber;
          return _created3;
        }

        throwOnInvalidObjectType(returnFiber, newChild);
      }

      {
        if (typeof newChild === 'function') {
          warnOnFunctionType(returnFiber);
        }
      }

      return null;
    }

    function updateSlot(returnFiber, oldFiber, newChild, lanes) {
      // Update the fiber if the keys match, otherwise return null.
      var key = oldFiber !== null ? oldFiber.key : null;

      if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {
        // Text nodes don't have keys. If the previous node is implicitly keyed
        // we can continue to replace it without aborting even if it is not a text
        // node.
        if (key !== null) {
          return null;
        }

        return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);
      }

      if (typeof newChild === 'object' && newChild !== null) {
        switch (newChild.$$typeof) {
          case REACT_ELEMENT_TYPE:
            {
              if (newChild.key === key) {
                return updateElement(returnFiber, oldFiber, newChild, lanes);
              } else {
                return null;
              }
            }

          case REACT_PORTAL_TYPE:
            {
              if (newChild.key === key) {
                return updatePortal(returnFiber, oldFiber, newChild, lanes);
              } else {
                return null;
              }
            }

          case REACT_LAZY_TYPE:
            {
              var payload = newChild._payload;
              var init = newChild._init;
              return updateSlot(returnFiber, oldFiber, init(payload), lanes);
            }
        }

        if (isArray(newChild) || getIteratorFn(newChild)) {
          if (key !== null) {
            return null;
          }

          return updateFragment(returnFiber, oldFiber, newChild, lanes, null);
        }

        throwOnInvalidObjectType(returnFiber, newChild);
      }

      {
        if (typeof newChild === 'function') {
          warnOnFunctionType(returnFiber);
        }
      }

      return null;
    }

    function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {
      if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {
        // Text nodes don't have keys, so we neither have to check the old nor
        // new node for the key. If both are text nodes, they match.
        var matchedFiber = existingChildren.get(newIdx) || null;
        return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);
      }

      if (typeof newChild === 'object' && newChild !== null) {
        switch (newChild.$$typeof) {
          case REACT_ELEMENT_TYPE:
            {
              var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;

              return updateElement(returnFiber, _matchedFiber, newChild, lanes);
            }

          case REACT_PORTAL_TYPE:
            {
              var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;

              return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);
            }

          case REACT_LAZY_TYPE:
            var payload = newChild._payload;
            var init = newChild._init;
            return updateFromMap(existingChildren, returnFiber, newIdx, init(payload), lanes);
        }

        if (isArray(newChild) || getIteratorFn(newChild)) {
          var _matchedFiber3 = existingChildren.get(newIdx) || null;

          return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);
        }

        throwOnInvalidObjectType(returnFiber, newChild);
      }

      {
        if (typeof newChild === 'function') {
          warnOnFunctionType(returnFiber);
        }
      }

      return null;
    }
    /**
     * Warns if there is a duplicate or missing key
     */


    function warnOnInvalidKey(child, knownKeys, returnFiber) {
      {
        if (typeof child !== 'object' || child === null) {
          return knownKeys;
        }

        switch (child.$$typeof) {
          case REACT_ELEMENT_TYPE:
          case REACT_PORTAL_TYPE:
            warnForMissingKey(child, returnFiber);
            var key = child.key;

            if (typeof key !== 'string') {
              break;
            }

            if (knownKeys === null) {
              knownKeys = new Set();
              knownKeys.add(key);
              break;
            }

            if (!knownKeys.has(key)) {
              knownKeys.add(key);
              break;
            }

            error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted â€” the behavior is unsupported and ' + 'could change in a future version.', key);

            break;

          case REACT_LAZY_TYPE:
            var payload = child._payload;
            var init = child._init;
            warnOnInvalidKey(init(payload), knownKeys, returnFiber);
            break;
        }
      }

      return knownKeys;
    }

    function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {
      // This algorithm can't optimize by searching from both ends since we
      // don't have backpointers on fibers. I'm trying to see how far we can get
      // with that model. If it ends up not being worth the tradeoffs, we can
      // add it later.
      // Even with a two ended optimization, we'd want to optimize for the case
      // where there are few changes and brute force the comparison instead of
      // going for the Map. It'd like to explore hitting that path first in
      // forward-only mode and only go for the Map once we notice that we need
      // lots of look ahead. This doesn't handle reversal as well as two ended
      // search but that's unusual. Besides, for the two ended optimization to
      // work on Iterables, we'd need to copy the whole set.
      // In this first iteration, we'll just live with hitting the bad case
      // (adding everything to a Map) in for every insert/move.
      // If you change this code, also update reconcileChildrenIterator() which
      // uses the same algorithm.
      {
        // First, validate keys.
        var knownKeys = null;

        for (var i = 0; i < newChildren.length; i++) {
          var child = newChildren[i];
          knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);
        }
      }

      var resultingFirstChild = null;
      var previousNewFiber = null;
      var oldFiber = currentFirstChild;
      var lastPlacedIndex = 0;
      var newIdx = 0;
      var nextOldFiber = null;

      for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {
        if (oldFiber.index > newIdx) {
          nextOldFiber = oldFiber;
          oldFiber = null;
        } else {
          nextOldFiber = oldFiber.sibling;
        }

        var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);

        if (newFiber === null) {
          // TODO: This breaks on empty slots like null children. That's
          // unfortunate because it triggers the slow path all the time. We need
          // a better way to communicate whether this was a miss or null,
          // boolean, undefined, etc.
          if (oldFiber === null) {
            oldFiber = nextOldFiber;
          }

          break;
        }

        if (shouldTrackSideEffects) {
          if (oldFiber && newFiber.alternate === null) {
            // We matched the slot, but we didn't reuse the existing fiber, so we
            // need to delete the existing child.
            deleteChild(returnFiber, oldFiber);
          }
        }

        lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);

        if (previousNewFiber === null) {
          // TODO: Move out of the loop. This only happens for the first run.
          resultingFirstChild = newFiber;
        } else {
          // TODO: Defer siblings if we're not at the right index for this slot.
          // I.e. if we had null values before, then we want to defer this
          // for each null value. However, we also don't want to call updateSlot
          // with the previous one.
          previousNewFiber.sibling = newFiber;
        }

        previousNewFiber = newFiber;
        oldFiber = nextOldFiber;
      }

      if (newIdx === newChildren.length) {
        // We've reached the end of the new children. We can delete the rest.
        deleteRemainingChildren(returnFiber, oldFiber);

        if (getIsHydrating()) {
          var numberOfForks = newIdx;
          pushTreeFork(returnFiber, numberOfForks);
        }

        return resultingFirstChild;
      }

      if (oldFiber === null) {
        // If we don't have any more existing children we can choose a fast path
        // since the rest will all be insertions.
        for (; newIdx < newChildren.length; newIdx++) {
          var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);

          if (_newFiber === null) {
            continue;
          }

          lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);

          if (previousNewFiber === null) {
            // TODO: Move out of the loop. This only happens for the first run.
            resultingFirstChild = _newFiber;
          } else {
            previousNewFiber.sibling = _newFiber;
          }

          previousNewFiber = _newFiber;
        }

        if (getIsHydrating()) {
          var _numberOfForks = newIdx;
          pushTreeFork(returnFiber, _numberOfForks);
        }

        return resultingFirstChild;
      } // Add all children to a key map for quick lookups.


      var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.

      for (; newIdx < newChildren.length; newIdx++) {
        var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);

        if (_newFiber2 !== null) {
          if (shouldTrackSideEffects) {
            if (_newFiber2.alternate !== null) {
              // The new fiber is a work in progress, but if there exists a
              // current, that means that we reused the fiber. We need to delete
              // it from the child list so that we don't add it to the deletion
              // list.
              existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);
            }
          }

          lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);

          if (previousNewFiber === null) {
            resultingFirstChild = _newFiber2;
          } else {
            previousNewFiber.sibling = _newFiber2;
          }

          previousNewFiber = _newFiber2;
        }
      }

      if (shouldTrackSideEffects) {
        // Any existing children that weren't consumed above were deleted. We need
        // to add them to the deletion list.
        existingChildren.forEach(function (child) {
          return deleteChild(returnFiber, child);
        });
      }

      if (getIsHydrating()) {
        var _numberOfForks2 = newIdx;
        pushTreeFork(returnFiber, _numberOfForks2);
      }

      return resultingFirstChild;
    }

    function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {
      // This is the same implementation as reconcileChildrenArray(),
      // but using the iterator instead.
      var iteratorFn = getIteratorFn(newChildrenIterable);

      if (typeof iteratorFn !== 'function') {
        throw new Error('An object is not an iterable. This error is likely caused by a bug in ' + 'React. Please file an issue.');
      }

      {
        // We don't support rendering Generators because it's a mutation.
        // See https://github.com/facebook/react/issues/12995
        if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag
        newChildrenIterable[Symbol.toStringTag] === 'Generator') {
          if (!didWarnAboutGenerators) {
            error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');
          }

          didWarnAboutGenerators = true;
        } // Warn about using Maps as children


        if (newChildrenIterable.entries === iteratorFn) {
          if (!didWarnAboutMaps) {
            error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
          }

          didWarnAboutMaps = true;
        } // First, validate keys.
        // We'll get a different iterator later for the main pass.


        var _newChildren = iteratorFn.call(newChildrenIterable);

        if (_newChildren) {
          var knownKeys = null;

          var _step = _newChildren.next();

          for (; !_step.done; _step = _newChildren.next()) {
            var child = _step.value;
            knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);
          }
        }
      }

      var newChildren = iteratorFn.call(newChildrenIterable);

      if (newChildren == null) {
        throw new Error('An iterable object provided no iterator.');
      }

      var resultingFirstChild = null;
      var previousNewFiber = null;
      var oldFiber = currentFirstChild;
      var lastPlacedIndex = 0;
      var newIdx = 0;
      var nextOldFiber = null;
      var step = newChildren.next();

      for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {
        if (oldFiber.index > newIdx) {
          nextOldFiber = oldFiber;
          oldFiber = null;
        } else {
          nextOldFiber = oldFiber.sibling;
        }

        var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);

        if (newFiber === null) {
          // TODO: This breaks on empty slots like null children. That's
          // unfortunate because it triggers the slow path all the time. We need
          // a better way to communicate whether this was a miss or null,
          // boolean, undefined, etc.
          if (oldFiber === null) {
            oldFiber = nextOldFiber;
          }

          break;
        }

        if (shouldTrackSideEffects) {
          if (oldFiber && newFiber.alternate === null) {
            // We matched the slot, but we didn't reuse the existing fiber, so we
            // need to delete the existing child.
            deleteChild(returnFiber, oldFiber);
          }
        }

        lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);

        if (previousNewFiber === null) {
          // TODO: Move out of the loop. This only happens for the first run.
          resultingFirstChild = newFiber;
        } else {
          // TODO: Defer siblings if we're not at the right index for this slot.
          // I.e. if we had null values before, then we want to defer this
          // for each null value. However, we also don't want to call updateSlot
          // with the previous one.
          previousNewFiber.sibling = newFiber;
        }

        previousNewFiber = newFiber;
        oldFiber = nextOldFiber;
      }

      if (step.done) {
        // We've reached the end of the new children. We can delete the rest.
        deleteRemainingChildren(returnFiber, oldFiber);

        if (getIsHydrating()) {
          var numberOfForks = newIdx;
          pushTreeFork(returnFiber, numberOfForks);
        }

        return resultingFirstChild;
      }

      if (oldFiber === null) {
        // If we don't have any more existing children we can choose a fast path
        // since the rest will all be insertions.
        for (; !step.done; newIdx++, step = newChildren.next()) {
          var _newFiber3 = createChild(returnFiber, step.value, lanes);

          if (_newFiber3 === null) {
            continue;
          }

          lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);

          if (previousNewFiber === null) {
            // TODO: Move out of the loop. This only happens for the first run.
            resultingFirstChild = _newFiber3;
          } else {
            previousNewFiber.sibling = _newFiber3;
          }

          previousNewFiber = _newFiber3;
        }

        if (getIsHydrating()) {
          var _numberOfForks3 = newIdx;
          pushTreeFork(returnFiber, _numberOfForks3);
        }

        return resultingFirstChild;
      } // Add all children to a key map for quick lookups.


      var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.

      for (; !step.done; newIdx++, step = newChildren.next()) {
        var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);

        if (_newFiber4 !== null) {
          if (shouldTrackSideEffects) {
            if (_newFiber4.alternate !== null) {
              // The new fiber is a work in progress, but if there exists a
              // current, that means that we reused the fiber. We need to delete
              // it from the child list so that we don't add it to the deletion
              // list.
              existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);
            }
          }

          lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);

          if (previousNewFiber === null) {
            resultingFirstChild = _newFiber4;
          } else {
            previousNewFiber.sibling = _newFiber4;
          }

          previousNewFiber = _newFiber4;
        }
      }

      if (shouldTrackSideEffects) {
        // Any existing children that weren't consumed above were deleted. We need
        // to add them to the deletion list.
        existingChildren.forEach(function (child) {
          return deleteChild(returnFiber, child);
        });
      }

      if (getIsHydrating()) {
        var _numberOfForks4 = newIdx;
        pushTreeFork(returnFiber, _numberOfForks4);
      }

      return resultingFirstChild;
    }

    function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {
      // There's no need to check for keys on text nodes since we don't have a
      // way to define them.
      if (currentFirstChild !== null && currentFirstChild.tag === HostText) {
        // We already have an existing node so let's just update it and delete
        // the rest.
        deleteRemainingChildren(returnFiber, currentFirstChild.sibling);
        var existing = useFiber(currentFirstChild, textContent);
        existing.return = returnFiber;
        return existing;
      } // The existing first child is not a text node so we need to create one
      // and delete the existing ones.


      deleteRemainingChildren(returnFiber, currentFirstChild);
      var created = createFiberFromText(textContent, returnFiber.mode, lanes);
      created.return = returnFiber;
      return created;
    }

    function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {
      var key = element.key;
      var child = currentFirstChild;

      while (child !== null) {
        // TODO: If key === null and child.key === null, then this only applies to
        // the first item in the list.
        if (child.key === key) {
          var elementType = element.type;

          if (elementType === REACT_FRAGMENT_TYPE) {
            if (child.tag === Fragment) {
              deleteRemainingChildren(returnFiber, child.sibling);
              var existing = useFiber(child, element.props.children);
              existing.return = returnFiber;

              {
                existing._debugSource = element._source;
                existing._debugOwner = element._owner;
              }

              return existing;
            }
          } else {
            if (child.elementType === elementType || ( // Keep this check inline so it only runs on the false path:
             isCompatibleFamilyForHotReloading(child, element) ) || // Lazy types should reconcile their resolved type.
            // We need to do this after the Hot Reloading check above,
            // because hot reloading has different semantics than prod because
            // it doesn't resuspend. So we can't let the call below suspend.
            typeof elementType === 'object' && elementType !== null && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === child.type) {
              deleteRemainingChildren(returnFiber, child.sibling);

              var _existing = useFiber(child, element.props);

              _existing.ref = coerceRef(returnFiber, child, element);
              _existing.return = returnFiber;

              {
                _existing._debugSource = element._source;
                _existing._debugOwner = element._owner;
              }

              return _existing;
            }
          } // Didn't match.


          deleteRemainingChildren(returnFiber, child);
          break;
        } else {
          deleteChild(returnFiber, child);
        }

        child = child.sibling;
      }

      if (element.type === REACT_FRAGMENT_TYPE) {
        var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);
        created.return = returnFiber;
        return created;
      } else {
        var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);

        _created4.ref = coerceRef(returnFiber, currentFirstChild, element);
        _created4.return = returnFiber;
        return _created4;
      }
    }

    function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {
      var key = portal.key;
      var child = currentFirstChild;

      while (child !== null) {
        // TODO: If key === null and child.key === null, then this only applies to
        // the first item in the list.
        if (child.key === key) {
          if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {
            deleteRemainingChildren(returnFiber, child.sibling);
            var existing = useFiber(child, portal.children || []);
            existing.return = returnFiber;
            return existing;
          } else {
            deleteRemainingChildren(returnFiber, child);
            break;
          }
        } else {
          deleteChild(returnFiber, child);
        }

        child = child.sibling;
      }

      var created = createFiberFromPortal(portal, returnFiber.mode, lanes);
      created.return = returnFiber;
      return created;
    } // This API will tag the children with the side-effect of the reconciliation
    // itself. They will be added to the side-effect list as we pass through the
    // children and the parent.


    function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {
      // This function is not recursive.
      // If the top level item is an array, we treat it as a set of children,
      // not as a fragment. Nested arrays on the other hand will be treated as
      // fragment nodes. Recursion happens at the normal flow.
      // Handle top level unkeyed fragments as if they were arrays.
      // This leads to an ambiguity between <>{[...]}</> and <>...</>.
      // We treat the ambiguous cases above the same.
      var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;

      if (isUnkeyedTopLevelFragment) {
        newChild = newChild.props.children;
      } // Handle object types


      if (typeof newChild === 'object' && newChild !== null) {
        switch (newChild.$$typeof) {
          case REACT_ELEMENT_TYPE:
            return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));

          case REACT_PORTAL_TYPE:
            return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));

          case REACT_LAZY_TYPE:
            var payload = newChild._payload;
            var init = newChild._init; // TODO: This function is supposed to be non-recursive.

            return reconcileChildFibers(returnFiber, currentFirstChild, init(payload), lanes);
        }

        if (isArray(newChild)) {
          return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);
        }

        if (getIteratorFn(newChild)) {
          return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);
        }

        throwOnInvalidObjectType(returnFiber, newChild);
      }

      if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {
        return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));
      }

      {
        if (typeof newChild === 'function') {
          warnOnFunctionType(returnFiber);
        }
      } // Remaining cases are all treated as empty.


      return deleteRemainingChildren(returnFiber, currentFirstChild);
    }

    return reconcileChildFibers;
  }

  var reconcileChildFibers = ChildReconciler(true);
  var mountChildFibers = ChildReconciler(false);
  function cloneChildFibers(current, workInProgress) {
    if (current !== null && workInProgress.child !== current.child) {
      throw new Error('Resuming work not yet implemented.');
    }

    if (workInProgress.child === null) {
      return;
    }

    var currentChild = workInProgress.child;
    var newChild = createWorkInProgress(currentChild, currentChild.pendingProps);
    workInProgress.child = newChild;
    newChild.return = workInProgress;

    while (currentChild.sibling !== null) {
      currentChild = currentChild.sibling;
      newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps);
      newChild.return = workInProgress;
    }

    newChild.sibling = null;
  } // Reset a workInProgress child set to prepare it for a second pass.

  function resetChildFibers(workInProgress, lanes) {
    var child = workInProgress.child;

    while (child !== null) {
      resetWorkInProgress(child, lanes);
      child = child.sibling;
    }
  }

  var valueCursor = createCursor(null);
  var rendererSigil;

  {
    // Use this to detect multiple renderers using the same context
    rendererSigil = {};
  }

  var currentlyRenderingFiber = null;
  var lastContextDependency = null;
  var lastFullyObservedContext = null;
  var isDisallowedContextReadInDEV = false;
  function resetContextDependencies() {
    // This is called right before React yields execution, to ensure `readContext`
    // cannot be called outside the render phase.
    currentlyRenderingFiber = null;
    lastContextDependency = null;
    lastFullyObservedContext = null;

    {
      isDisallowedContextReadInDEV = false;
    }
  }
  function enterDisallowedContextReadInDEV() {
    {
      isDisallowedContextReadInDEV = true;
    }
  }
  function exitDisallowedContextReadInDEV() {
    {
      isDisallowedContextReadInDEV = false;
    }
  }
  function pushProvider(providerFiber, context, nextValue) {
    {
      push(valueCursor, context._currentValue, providerFiber);
      context._currentValue = nextValue;

      {
        if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {
          error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');
        }

        context._currentRenderer = rendererSigil;
      }
    }
  }
  function popProvider(context, providerFiber) {
    var currentValue = valueCursor.current;
    pop(valueCursor, providerFiber);

    {
      {
        context._currentValue = currentValue;
      }
    }
  }
  function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) {
    // Update the child lanes of all the ancestors, including the alternates.
    var node = parent;

    while (node !== null) {
      var alternate = node.alternate;

      if (!isSubsetOfLanes(node.childLanes, renderLanes)) {
        node.childLanes = mergeLanes(node.childLanes, renderLanes);

        if (alternate !== null) {
          alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);
        }
      } else if (alternate !== null && !isSubsetOfLanes(alternate.childLanes, renderLanes)) {
        alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);
      }

      if (node === propagationRoot) {
        break;
      }

      node = node.return;
    }

    {
      if (node !== propagationRoot) {
        error('Expected to find the propagation root when scheduling context work. ' + 'This error is likely caused by a bug in React. Please file an issue.');
      }
    }
  }
  function propagateContextChange(workInProgress, context, renderLanes) {
    {
      propagateContextChange_eager(workInProgress, context, renderLanes);
    }
  }

  function propagateContextChange_eager(workInProgress, context, renderLanes) {

    var fiber = workInProgress.child;

    if (fiber !== null) {
      // Set the return pointer of the child to the work-in-progress fiber.
      fiber.return = workInProgress;
    }

    while (fiber !== null) {
      var nextFiber = void 0; // Visit this fiber.

      var list = fiber.dependencies;

      if (list !== null) {
        nextFiber = fiber.child;
        var dependency = list.firstContext;

        while (dependency !== null) {
          // Check if the context matches.
          if (dependency.context === context) {
            // Match! Schedule an update on this fiber.
            if (fiber.tag === ClassComponent) {
              // Schedule a force update on the work-in-progress.
              var lane = pickArbitraryLane(renderLanes);
              var update = createUpdate(NoTimestamp, lane);
              update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the
              // update to the current fiber, too, which means it will persist even if
              // this render is thrown away. Since it's a race condition, not sure it's
              // worth fixing.
              // Inlined `enqueueUpdate` to remove interleaved update check

              var updateQueue = fiber.updateQueue;

              if (updateQueue === null) ; else {
                var sharedQueue = updateQueue.shared;
                var pending = sharedQueue.pending;

                if (pending === null) {
                  // This is the first update. Create a circular list.
                  update.next = update;
                } else {
                  update.next = pending.next;
                  pending.next = update;
                }

                sharedQueue.pending = update;
              }
            }

            fiber.lanes = mergeLanes(fiber.lanes, renderLanes);
            var alternate = fiber.alternate;

            if (alternate !== null) {
              alternate.lanes = mergeLanes(alternate.lanes, renderLanes);
            }

            scheduleContextWorkOnParentPath(fiber.return, renderLanes, workInProgress); // Mark the updated lanes on the list, too.

            list.lanes = mergeLanes(list.lanes, renderLanes); // Since we already found a match, we can stop traversing the
            // dependency list.

            break;
          }

          dependency = dependency.next;
        }
      } else if (fiber.tag === ContextProvider) {
        // Don't scan deeper if this is a matching provider
        nextFiber = fiber.type === workInProgress.type ? null : fiber.child;
      } else if (fiber.tag === DehydratedFragment) {
        // If a dehydrated suspense boundary is in this subtree, we don't know
        // if it will have any context consumers in it. The best we can do is
        // mark it as having updates.
        var parentSuspense = fiber.return;

        if (parentSuspense === null) {
          throw new Error('We just came from a parent so we must have had a parent. This is a bug in React.');
        }

        parentSuspense.lanes = mergeLanes(parentSuspense.lanes, renderLanes);
        var _alternate = parentSuspense.alternate;

        if (_alternate !== null) {
          _alternate.lanes = mergeLanes(_alternate.lanes, renderLanes);
        } // This is intentionally passing this fiber as the parent
        // because we want to schedule this fiber as having work
        // on its children. We'll use the childLanes on
        // this fiber to indicate that a context has changed.


        scheduleContextWorkOnParentPath(parentSuspense, renderLanes, workInProgress);
        nextFiber = fiber.sibling;
      } else {
        // Traverse down.
        nextFiber = fiber.child;
      }

      if (nextFiber !== null) {
        // Set the return pointer of the child to the work-in-progress fiber.
        nextFiber.return = fiber;
      } else {
        // No child. Traverse to next sibling.
        nextFiber = fiber;

        while (nextFiber !== null) {
          if (nextFiber === workInProgress) {
            // We're back to the root of this subtree. Exit.
            nextFiber = null;
            break;
          }

          var sibling = nextFiber.sibling;

          if (sibling !== null) {
            // Set the return pointer of the sibling to the work-in-progress fiber.
            sibling.return = nextFiber.return;
            nextFiber = sibling;
            break;
          } // No more siblings. Traverse up.


          nextFiber = nextFiber.return;
        }
      }

      fiber = nextFiber;
    }
  }
  function prepareToReadContext(workInProgress, renderLanes) {
    currentlyRenderingFiber = workInProgress;
    lastContextDependency = null;
    lastFullyObservedContext = null;
    var dependencies = workInProgress.dependencies;

    if (dependencies !== null) {
      {
        var firstContext = dependencies.firstContext;

        if (firstContext !== null) {
          if (includesSomeLane(dependencies.lanes, renderLanes)) {
            // Context list has a pending update. Mark that this fiber performed work.
            markWorkInProgressReceivedUpdate();
          } // Reset the work-in-progress list


          dependencies.firstContext = null;
        }
      }
    }
  }
  function readContext(context) {
    {
      // This warning would fire if you read context inside a Hook like useMemo.
      // Unlike the class check below, it's not enforced in production for perf.
      if (isDisallowedContextReadInDEV) {
        error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');
      }
    }

    var value =  context._currentValue ;

    if (lastFullyObservedContext === context) ; else {
      var contextItem = {
        context: context,
        memoizedValue: value,
        next: null
      };

      if (lastContextDependency === null) {
        if (currentlyRenderingFiber === null) {
          throw new Error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');
        } // This is the first dependency for this component. Create a new list.


        lastContextDependency = contextItem;
        currentlyRenderingFiber.dependencies = {
          lanes: NoLanes,
          firstContext: contextItem
        };
      } else {
        // Append a new context item.
        lastContextDependency = lastContextDependency.next = contextItem;
      }
    }

    return value;
  }

  // render. When this render exits, either because it finishes or because it is
  // interrupted, the interleaved updates will be transferred onto the main part
  // of the queue.

  var concurrentQueues = null;
  function pushConcurrentUpdateQueue(queue) {
    if (concurrentQueues === null) {
      concurrentQueues = [queue];
    } else {
      concurrentQueues.push(queue);
    }
  }
  function finishQueueingConcurrentUpdates() {
    // Transfer the interleaved updates onto the main queue. Each queue has a
    // `pending` field and an `interleaved` field. When they are not null, they
    // point to the last node in a circular linked list. We need to append the
    // interleaved list to the end of the pending list by joining them into a
    // single, circular list.
    if (concurrentQueues !== null) {
      for (var i = 0; i < concurrentQueues.length; i++) {
        var queue = concurrentQueues[i];
        var lastInterleavedUpdate = queue.interleaved;

        if (lastInterleavedUpdate !== null) {
          queue.interleaved = null;
          var firstInterleavedUpdate = lastInterleavedUpdate.next;
          var lastPendingUpdate = queue.pending;

          if (lastPendingUpdate !== null) {
            var firstPendingUpdate = lastPendingUpdate.next;
            lastPendingUpdate.next = firstInterleavedUpdate;
            lastInterleavedUpdate.next = firstPendingUpdate;
          }

          queue.pending = lastInterleavedUpdate;
        }
      }

      concurrentQueues = null;
    }
  }
  function enqueueConcurrentHookUpdate(fiber, queue, update, lane) {
    var interleaved = queue.interleaved;

    if (interleaved === null) {
      // This is the first update. Create a circular list.
      update.next = update; // At the end of the current render, this queue's interleaved updates will
      // be transferred to the pending queue.

      pushConcurrentUpdateQueue(queue);
    } else {
      update.next = interleaved.next;
      interleaved.next = update;
    }

    queue.interleaved = update;
    return markUpdateLaneFromFiberToRoot(fiber, lane);
  }
  function enqueueConcurrentHookUpdateAndEagerlyBailout(fiber, queue, update, lane) {
    var interleaved = queue.interleaved;

    if (interleaved === null) {
      // This is the first update. Create a circular list.
      update.next = update; // At the end of the current render, this queue's interleaved updates will
      // be transferred to the pending queue.

      pushConcurrentUpdateQueue(queue);
    } else {
      update.next = interleaved.next;
      interleaved.next = update;
    }

    queue.interleaved = update;
  }
  function enqueueConcurrentClassUpdate(fiber, queue, update, lane) {
    var interleaved = queue.interleaved;

    if (interleaved === null) {
      // This is the first update. Create a circular list.
      update.next = update; // At the end of the current render, this queue's interleaved updates will
      // be transferred to the pending queue.

      pushConcurrentUpdateQueue(queue);
    } else {
      update.next = interleaved.next;
      interleaved.next = update;
    }

    queue.interleaved = update;
    return markUpdateLaneFromFiberToRoot(fiber, lane);
  }
  function enqueueConcurrentRenderForLane(fiber, lane) {
    return markUpdateLaneFromFiberToRoot(fiber, lane);
  } // Calling this function outside this module should only be done for backwards
  // compatibility and should always be accompanied by a warning.

  var unsafe_markUpdateLaneFromFiberToRoot = markUpdateLaneFromFiberToRoot;

  function markUpdateLaneFromFiberToRoot(sourceFiber, lane) {
    // Update the source fiber's lanes
    sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);
    var alternate = sourceFiber.alternate;

    if (alternate !== null) {
      alternate.lanes = mergeLanes(alternate.lanes, lane);
    }

    {
      if (alternate === null && (sourceFiber.flags & (Placement | Hydrating)) !== NoFlags) {
        warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
      }
    } // Walk the parent path to the root and update the child lanes.


    var node = sourceFiber;
    var parent = sourceFiber.return;

    while (parent !== null) {
      parent.childLanes = mergeLanes(parent.childLanes, lane);
      alternate = parent.alternate;

      if (alternate !== null) {
        alternate.childLanes = mergeLanes(alternate.childLanes, lane);
      } else {
        {
          if ((parent.flags & (Placement | Hydrating)) !== NoFlags) {
            warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
          }
        }
      }

      node = parent;
      parent = parent.return;
    }

    if (node.tag === HostRoot) {
      var root = node.stateNode;
      return root;
    } else {
      return null;
    }
  }

  var UpdateState = 0;
  var ReplaceState = 1;
  var ForceUpdate = 2;
  var CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`.
  // It should only be read right after calling `processUpdateQueue`, via
  // `checkHasForceUpdateAfterProcessing`.

  var hasForceUpdate = false;
  var didWarnUpdateInsideUpdate;
  var currentlyProcessingQueue;

  {
    didWarnUpdateInsideUpdate = false;
    currentlyProcessingQueue = null;
  }

  function initializeUpdateQueue(fiber) {
    var queue = {
      baseState: fiber.memoizedState,
      firstBaseUpdate: null,
      lastBaseUpdate: null,
      shared: {
        pending: null,
        interleaved: null,
        lanes: NoLanes
      },
      effects: null
    };
    fiber.updateQueue = queue;
  }
  function cloneUpdateQueue(current, workInProgress) {
    // Clone the update queue from current. Unless it's already a clone.
    var queue = workInProgress.updateQueue;
    var currentQueue = current.updateQueue;

    if (queue === currentQueue) {
      var clone = {
        baseState: currentQueue.baseState,
        firstBaseUpdate: currentQueue.firstBaseUpdate,
        lastBaseUpdate: currentQueue.lastBaseUpdate,
        shared: currentQueue.shared,
        effects: currentQueue.effects
      };
      workInProgress.updateQueue = clone;
    }
  }
  function createUpdate(eventTime, lane) {
    var update = {
      eventTime: eventTime,
      lane: lane,
      tag: UpdateState,
      payload: null,
      callback: null,
      next: null
    };
    return update;
  }
  function enqueueUpdate(fiber, update, lane) {
    var updateQueue = fiber.updateQueue;

    if (updateQueue === null) {
      // Only occurs if the fiber has been unmounted.
      return null;
    }

    var sharedQueue = updateQueue.shared;

    {
      if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) {
        error('An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.');

        didWarnUpdateInsideUpdate = true;
      }
    }

    if (isUnsafeClassRenderPhaseUpdate()) {
      // This is an unsafe render phase update. Add directly to the update
      // queue so we can process it immediately during the current render.
      var pending = sharedQueue.pending;

      if (pending === null) {
        // This is the first update. Create a circular list.
        update.next = update;
      } else {
        update.next = pending.next;
        pending.next = update;
      }

      sharedQueue.pending = update; // Update the childLanes even though we're most likely already rendering
      // this fiber. This is for backwards compatibility in the case where you
      // update a different component during render phase than the one that is
      // currently renderings (a pattern that is accompanied by a warning).

      return unsafe_markUpdateLaneFromFiberToRoot(fiber, lane);
    } else {
      return enqueueConcurrentClassUpdate(fiber, sharedQueue, update, lane);
    }
  }
  function entangleTransitions(root, fiber, lane) {
    var updateQueue = fiber.updateQueue;

    if (updateQueue === null) {
      // Only occurs if the fiber has been unmounted.
      return;
    }

    var sharedQueue = updateQueue.shared;

    if (isTransitionLane(lane)) {
      var queueLanes = sharedQueue.lanes; // If any entangled lanes are no longer pending on the root, then they must
      // have finished. We can remove them from the shared queue, which represents
      // a superset of the actually pending lanes. In some cases we may entangle
      // more than we need to, but that's OK. In fact it's worse if we *don't*
      // entangle when we should.

      queueLanes = intersectLanes(queueLanes, root.pendingLanes); // Entangle the new transition lane with the other transition lanes.

      var newQueueLanes = mergeLanes(queueLanes, lane);
      sharedQueue.lanes = newQueueLanes; // Even if queue.lanes already include lane, we don't know for certain if
      // the lane finished since the last time we entangled it. So we need to
      // entangle it again, just to be sure.

      markRootEntangled(root, newQueueLanes);
    }
  }
  function enqueueCapturedUpdate(workInProgress, capturedUpdate) {
    // Captured updates are updates that are thrown by a child during the render
    // phase. They should be discarded if the render is aborted. Therefore,
    // we should only put them on the work-in-progress queue, not the current one.
    var queue = workInProgress.updateQueue; // Check if the work-in-progress queue is a clone.

    var current = workInProgress.alternate;

    if (current !== null) {
      var currentQueue = current.updateQueue;

      if (queue === currentQueue) {
        // The work-in-progress queue is the same as current. This happens when
        // we bail out on a parent fiber that then captures an error thrown by
        // a child. Since we want to append the update only to the work-in
        // -progress queue, we need to clone the updates. We usually clone during
        // processUpdateQueue, but that didn't happen in this case because we
        // skipped over the parent when we bailed out.
        var newFirst = null;
        var newLast = null;
        var firstBaseUpdate = queue.firstBaseUpdate;

        if (firstBaseUpdate !== null) {
          // Loop through the updates and clone them.
          var update = firstBaseUpdate;

          do {
            var clone = {
              eventTime: update.eventTime,
              lane: update.lane,
              tag: update.tag,
              payload: update.payload,
              callback: update.callback,
              next: null
            };

            if (newLast === null) {
              newFirst = newLast = clone;
            } else {
              newLast.next = clone;
              newLast = clone;
            }

            update = update.next;
          } while (update !== null); // Append the captured update the end of the cloned list.


          if (newLast === null) {
            newFirst = newLast = capturedUpdate;
          } else {
            newLast.next = capturedUpdate;
            newLast = capturedUpdate;
          }
        } else {
          // There are no base updates.
          newFirst = newLast = capturedUpdate;
        }

        queue = {
          baseState: currentQueue.baseState,
          firstBaseUpdate: newFirst,
          lastBaseUpdate: newLast,
          shared: currentQueue.shared,
          effects: currentQueue.effects
        };
        workInProgress.updateQueue = queue;
        return;
      }
    } // Append the update to the end of the list.


    var lastBaseUpdate = queue.lastBaseUpdate;

    if (lastBaseUpdate === null) {
      queue.firstBaseUpdate = capturedUpdate;
    } else {
      lastBaseUpdate.next = capturedUpdate;
    }

    queue.lastBaseUpdate = capturedUpdate;
  }

  function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {
    switch (update.tag) {
      case ReplaceState:
        {
          var payload = update.payload;

          if (typeof payload === 'function') {
            // Updater function
            {
              enterDisallowedContextReadInDEV();
            }

            var nextState = payload.call(instance, prevState, nextProps);

            {
              if ( workInProgress.mode & StrictLegacyMode) {
                setIsStrictModeForDevtools(true);

                try {
                  payload.call(instance, prevState, nextProps);
                } finally {
                  setIsStrictModeForDevtools(false);
                }
              }

              exitDisallowedContextReadInDEV();
            }

            return nextState;
          } // State object


          return payload;
        }

      case CaptureUpdate:
        {
          workInProgress.flags = workInProgress.flags & ~ShouldCapture | DidCapture;
        }
      // Intentional fallthrough

      case UpdateState:
        {
          var _payload = update.payload;
          var partialState;

          if (typeof _payload === 'function') {
            // Updater function
            {
              enterDisallowedContextReadInDEV();
            }

            partialState = _payload.call(instance, prevState, nextProps);

            {
              if ( workInProgress.mode & StrictLegacyMode) {
                setIsStrictModeForDevtools(true);

                try {
                  _payload.call(instance, prevState, nextProps);
                } finally {
                  setIsStrictModeForDevtools(false);
                }
              }

              exitDisallowedContextReadInDEV();
            }
          } else {
            // Partial state object
            partialState = _payload;
          }

          if (partialState === null || partialState === undefined) {
            // Null and undefined are treated as no-ops.
            return prevState;
          } // Merge the partial state and the previous state.


          return assign({}, prevState, partialState);
        }

      case ForceUpdate:
        {
          hasForceUpdate = true;
          return prevState;
        }
    }

    return prevState;
  }

  function processUpdateQueue(workInProgress, props, instance, renderLanes) {
    // This is always non-null on a ClassComponent or HostRoot
    var queue = workInProgress.updateQueue;
    hasForceUpdate = false;

    {
      currentlyProcessingQueue = queue.shared;
    }

    var firstBaseUpdate = queue.firstBaseUpdate;
    var lastBaseUpdate = queue.lastBaseUpdate; // Check if there are pending updates. If so, transfer them to the base queue.

    var pendingQueue = queue.shared.pending;

    if (pendingQueue !== null) {
      queue.shared.pending = null; // The pending queue is circular. Disconnect the pointer between first
      // and last so that it's non-circular.

      var lastPendingUpdate = pendingQueue;
      var firstPendingUpdate = lastPendingUpdate.next;
      lastPendingUpdate.next = null; // Append pending updates to base queue

      if (lastBaseUpdate === null) {
        firstBaseUpdate = firstPendingUpdate;
      } else {
        lastBaseUpdate.next = firstPendingUpdate;
      }

      lastBaseUpdate = lastPendingUpdate; // If there's a current queue, and it's different from the base queue, then
      // we need to transfer the updates to that queue, too. Because the base
      // queue is a singly-linked list with no cycles, we can append to both
      // lists and take advantage of structural sharing.
      // TODO: Pass `current` as argument

      var current = workInProgress.alternate;

      if (current !== null) {
        // This is always non-null on a ClassComponent or HostRoot
        var currentQueue = current.updateQueue;
        var currentLastBaseUpdate = currentQueue.lastBaseUpdate;

        if (currentLastBaseUpdate !== lastBaseUpdate) {
          if (currentLastBaseUpdate === null) {
            currentQueue.firstBaseUpdate = firstPendingUpdate;
          } else {
            currentLastBaseUpdate.next = firstPendingUpdate;
          }

          currentQueue.lastBaseUpdate = lastPendingUpdate;
        }
      }
    } // These values may change as we process the queue.


    if (firstBaseUpdate !== null) {
      // Iterate through the list of updates to compute the result.
      var newState = queue.baseState; // TODO: Don't need to accumulate this. Instead, we can remove renderLanes
      // from the original lanes.

      var newLanes = NoLanes;
      var newBaseState = null;
      var newFirstBaseUpdate = null;
      var newLastBaseUpdate = null;
      var update = firstBaseUpdate;

      do {
        var updateLane = update.lane;
        var updateEventTime = update.eventTime;

        if (!isSubsetOfLanes(renderLanes, updateLane)) {
          // Priority is insufficient. Skip this update. If this is the first
          // skipped update, the previous update/state is the new base
          // update/state.
          var clone = {
            eventTime: updateEventTime,
            lane: updateLane,
            tag: update.tag,
            payload: update.payload,
            callback: update.callback,
            next: null
          };

          if (newLastBaseUpdate === null) {
            newFirstBaseUpdate = newLastBaseUpdate = clone;
            newBaseState = newState;
          } else {
            newLastBaseUpdate = newLastBaseUpdate.next = clone;
          } // Update the remaining priority in the queue.


          newLanes = mergeLanes(newLanes, updateLane);
        } else {
          // This update does have sufficient priority.
          if (newLastBaseUpdate !== null) {
            var _clone = {
              eventTime: updateEventTime,
              // This update is going to be committed so we never want uncommit
              // it. Using NoLane works because 0 is a subset of all bitmasks, so
              // this will never be skipped by the check above.
              lane: NoLane,
              tag: update.tag,
              payload: update.payload,
              callback: update.callback,
              next: null
            };
            newLastBaseUpdate = newLastBaseUpdate.next = _clone;
          } // Process this update.


          newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);
          var callback = update.callback;

          if (callback !== null && // If the update was already committed, we should not queue its
          // callback again.
          update.lane !== NoLane) {
            workInProgress.flags |= Callback;
            var effects = queue.effects;

            if (effects === null) {
              queue.effects = [update];
            } else {
              effects.push(update);
            }
          }
        }

        update = update.next;

        if (update === null) {
          pendingQueue = queue.shared.pending;

          if (pendingQueue === null) {
            break;
          } else {
            // An update was scheduled from inside a reducer. Add the new
            // pending updates to the end of the list and keep processing.
            var _lastPendingUpdate = pendingQueue; // Intentionally unsound. Pending updates form a circular list, but we
            // unravel them when transferring them to the base queue.

            var _firstPendingUpdate = _lastPendingUpdate.next;
            _lastPendingUpdate.next = null;
            update = _firstPendingUpdate;
            queue.lastBaseUpdate = _lastPendingUpdate;
            queue.shared.pending = null;
          }
        }
      } while (true);

      if (newLastBaseUpdate === null) {
        newBaseState = newState;
      }

      queue.baseState = newBaseState;
      queue.firstBaseUpdate = newFirstBaseUpdate;
      queue.lastBaseUpdate = newLastBaseUpdate; // Interleaved updates are stored on a separate queue. We aren't going to
      // process them during this render, but we do need to track which lanes
      // are remaining.

      var lastInterleaved = queue.shared.interleaved;

      if (lastInterleaved !== null) {
        var interleaved = lastInterleaved;

        do {
          newLanes = mergeLanes(newLanes, interleaved.lane);
          interleaved = interleaved.next;
        } while (interleaved !== lastInterleaved);
      } else if (firstBaseUpdate === null) {
        // `queue.lanes` is used for entangling transitions. We can set it back to
        // zero once the queue is empty.
        queue.shared.lanes = NoLanes;
      } // Set the remaining expiration time to be whatever is remaining in the queue.
      // This should be fine because the only two other things that contribute to
      // expiration time are props and context. We're already in the middle of the
      // begin phase by the time we start processing the queue, so we've already
      // dealt with the props. Context in components that specify
      // shouldComponentUpdate is tricky; but we'll have to account for
      // that regardless.


      markSkippedUpdateLanes(newLanes);
      workInProgress.lanes = newLanes;
      workInProgress.memoizedState = newState;
    }

    {
      currentlyProcessingQueue = null;
    }
  }

  function callCallback(callback, context) {
    if (typeof callback !== 'function') {
      throw new Error('Invalid argument passed as callback. Expected a function. Instead ' + ("received: " + callback));
    }

    callback.call(context);
  }

  function resetHasForceUpdateBeforeProcessing() {
    hasForceUpdate = false;
  }
  function checkHasForceUpdateAfterProcessing() {
    return hasForceUpdate;
  }
  function commitUpdateQueue(finishedWork, finishedQueue, instance) {
    // Commit the effects
    var effects = finishedQueue.effects;
    finishedQueue.effects = null;

    if (effects !== null) {
      for (var i = 0; i < effects.length; i++) {
        var effect = effects[i];
        var callback = effect.callback;

        if (callback !== null) {
          effect.callback = null;
          callCallback(callback, instance);
        }
      }
    }
  }

  var NO_CONTEXT = {};
  var contextStackCursor$1 = createCursor(NO_CONTEXT);
  var contextFiberStackCursor = createCursor(NO_CONTEXT);
  var rootInstanceStackCursor = createCursor(NO_CONTEXT);

  function requiredContext(c) {
    if (c === NO_CONTEXT) {
      throw new Error('Expected host context to exist. This error is likely caused by a bug ' + 'in React. Please file an issue.');
    }

    return c;
  }

  function getRootHostContainer() {
    var rootInstance = requiredContext(rootInstanceStackCursor.current);
    return rootInstance;
  }

  function pushHostContainer(fiber, nextRootInstance) {
    // Push current root instance onto the stack;
    // This allows us to reset root when portals are popped.
    push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it.
    // This enables us to pop only Fibers that provide unique contexts.

    push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack.
    // However, we can't just call getRootHostContext() and push it because
    // we'd have a different number of entries on the stack depending on
    // whether getRootHostContext() throws somewhere in renderer code or not.
    // So we push an empty value first. This lets us safely unwind on errors.

    push(contextStackCursor$1, NO_CONTEXT, fiber);
    var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it.

    pop(contextStackCursor$1, fiber);
    push(contextStackCursor$1, nextRootContext, fiber);
  }

  function popHostContainer(fiber) {
    pop(contextStackCursor$1, fiber);
    pop(contextFiberStackCursor, fiber);
    pop(rootInstanceStackCursor, fiber);
  }

  function getHostContext() {
    var context = requiredContext(contextStackCursor$1.current);
    return context;
  }

  function pushHostContext(fiber) {
    var rootInstance = requiredContext(rootInstanceStackCursor.current);
    var context = requiredContext(contextStackCursor$1.current);
    var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique.

    if (context === nextContext) {
      return;
    } // Track the context and the Fiber that provided it.
    // This enables us to pop only Fibers that provide unique contexts.


    push(contextFiberStackCursor, fiber, fiber);
    push(contextStackCursor$1, nextContext, fiber);
  }

  function popHostContext(fiber) {
    // Do not pop unless this Fiber provided the current context.
    // pushHostContext() only pushes Fibers that provide unique contexts.
    if (contextFiberStackCursor.current !== fiber) {
      return;
    }

    pop(contextStackCursor$1, fiber);
    pop(contextFiberStackCursor, fiber);
  }

  var DefaultSuspenseContext = 0; // The Suspense Context is split into two parts. The lower bits is
  // inherited deeply down the subtree. The upper bits only affect
  // this immediate suspense boundary and gets reset each new
  // boundary or suspense list.

  var SubtreeSuspenseContextMask = 1; // Subtree Flags:
  // InvisibleParentSuspenseContext indicates that one of our parent Suspense
  // boundaries is not currently showing visible main content.
  // Either because it is already showing a fallback or is not mounted at all.
  // We can use this to determine if it is desirable to trigger a fallback at
  // the parent. If not, then we might need to trigger undesirable boundaries
  // and/or suspend the commit to avoid hiding the parent content.

  var InvisibleParentSuspenseContext = 1; // Shallow Flags:
  // ForceSuspenseFallback can be used by SuspenseList to force newly added
  // items into their fallback state during one of the render passes.

  var ForceSuspenseFallback = 2;
  var suspenseStackCursor = createCursor(DefaultSuspenseContext);
  function hasSuspenseContext(parentContext, flag) {
    return (parentContext & flag) !== 0;
  }
  function setDefaultShallowSuspenseContext(parentContext) {
    return parentContext & SubtreeSuspenseContextMask;
  }
  function setShallowSuspenseContext(parentContext, shallowContext) {
    return parentContext & SubtreeSuspenseContextMask | shallowContext;
  }
  function addSubtreeSuspenseContext(parentContext, subtreeContext) {
    return parentContext | subtreeContext;
  }
  function pushSuspenseContext(fiber, newContext) {
    push(suspenseStackCursor, newContext, fiber);
  }
  function popSuspenseContext(fiber) {
    pop(suspenseStackCursor, fiber);
  }

  function shouldCaptureSuspense(workInProgress, hasInvisibleParent) {
    // If it was the primary children that just suspended, capture and render the
    // fallback. Otherwise, don't capture and bubble to the next boundary.
    var nextState = workInProgress.memoizedState;

    if (nextState !== null) {
      if (nextState.dehydrated !== null) {
        // A dehydrated boundary always captures.
        return true;
      }

      return false;
    }

    var props = workInProgress.memoizedProps; // Regular boundaries always capture.

    {
      return true;
    } // If it's a boundary we should avoid, then we prefer to bubble up to the
  }
  function findFirstSuspended(row) {
    var node = row;

    while (node !== null) {
      if (node.tag === SuspenseComponent) {
        var state = node.memoizedState;

        if (state !== null) {
          var dehydrated = state.dehydrated;

          if (dehydrated === null || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) {
            return node;
          }
        }
      } else if (node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't
      // keep track of whether it suspended or not.
      node.memoizedProps.revealOrder !== undefined) {
        var didSuspend = (node.flags & DidCapture) !== NoFlags;

        if (didSuspend) {
          return node;
        }
      } else if (node.child !== null) {
        node.child.return = node;
        node = node.child;
        continue;
      }

      if (node === row) {
        return null;
      }

      while (node.sibling === null) {
        if (node.return === null || node.return === row) {
          return null;
        }

        node = node.return;
      }

      node.sibling.return = node.return;
      node = node.sibling;
    }

    return null;
  }

  var NoFlags$1 =
  /*   */
  0; // Represents whether effect should fire.

  var HasEffect =
  /* */
  1; // Represents the phase in which the effect (not the clean-up) fires.

  var Insertion =
  /*  */
  2;
  var Layout =
  /*    */
  4;
  var Passive$1 =
  /*   */
  8;

  // and should be reset before starting a new render.
  // This tracks which mutable sources need to be reset after a render.

  var workInProgressSources = [];
  function resetWorkInProgressVersions() {
    for (var i = 0; i < workInProgressSources.length; i++) {
      var mutableSource = workInProgressSources[i];

      {
        mutableSource._workInProgressVersionPrimary = null;
      }
    }

    workInProgressSources.length = 0;
  }
  // This ensures that the version used for server rendering matches the one
  // that is eventually read during hydration.
  // If they don't match there's a potential tear and a full deopt render is required.

  function registerMutableSourceForHydration(root, mutableSource) {
    var getVersion = mutableSource._getVersion;
    var version = getVersion(mutableSource._source); // TODO Clear this data once all pending hydration work is finished.
    // Retaining it forever may interfere with GC.

    if (root.mutableSourceEagerHydrationData == null) {
      root.mutableSourceEagerHydrationData = [mutableSource, version];
    } else {
      root.mutableSourceEagerHydrationData.push(mutableSource, version);
    }
  }

  var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
      ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig;
  var didWarnAboutMismatchedHooksForComponent;
  var didWarnUncachedGetSnapshot;

  {
    didWarnAboutMismatchedHooksForComponent = new Set();
  }

  // These are set right before calling the component.
  var renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from
  // the work-in-progress hook.

  var currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The
  // current hook list is the list that belongs to the current fiber. The
  // work-in-progress hook list is a new list that will be added to the
  // work-in-progress fiber.

  var currentHook = null;
  var workInProgressHook = null; // Whether an update was scheduled at any point during the render phase. This
  // does not get reset if we do another render pass; only when we're completely
  // finished evaluating this component. This is an optimization so we know
  // whether we need to clear render phase updates after a throw.

  var didScheduleRenderPhaseUpdate = false; // Where an update was scheduled only during the current render pass. This
  // gets reset after each attempt.
  // TODO: Maybe there's some way to consolidate this with
  // `didScheduleRenderPhaseUpdate`. Or with `numberOfReRenders`.

  var didScheduleRenderPhaseUpdateDuringThisPass = false; // Counts the number of useId hooks in this component.

  var localIdCounter = 0; // Used for ids that are generated completely client-side (i.e. not during
  // hydration). This counter is global, so client ids are not stable across
  // render attempts.

  var globalClientIdCounter = 0;
  var RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook

  var currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders.
  // The list stores the order of hooks used during the initial render (mount).
  // Subsequent renders (updates) reference this list.

  var hookTypesDev = null;
  var hookTypesUpdateIndexDev = -1; // In DEV, this tracks whether currently rendering component needs to ignore
  // the dependencies for Hooks that need them (e.g. useEffect or useMemo).
  // When true, such Hooks will always be "remounted". Only used during hot reload.

  var ignorePreviousDependencies = false;

  function mountHookTypesDev() {
    {
      var hookName = currentHookNameInDev;

      if (hookTypesDev === null) {
        hookTypesDev = [hookName];
      } else {
        hookTypesDev.push(hookName);
      }
    }
  }

  function updateHookTypesDev() {
    {
      var hookName = currentHookNameInDev;

      if (hookTypesDev !== null) {
        hookTypesUpdateIndexDev++;

        if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) {
          warnOnHookMismatchInDev(hookName);
        }
      }
    }
  }

  function checkDepsAreArrayDev(deps) {
    {
      if (deps !== undefined && deps !== null && !isArray(deps)) {
        // Verify deps, but only on mount to avoid extra checks.
        // It's unlikely their type would change as usually you define them inline.
        error('%s received a final argument that is not an array (instead, received `%s`). When ' + 'specified, the final argument must be an array.', currentHookNameInDev, typeof deps);
      }
    }
  }

  function warnOnHookMismatchInDev(currentHookName) {
    {
      var componentName = getComponentNameFromFiber(currentlyRenderingFiber$1);

      if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) {
        didWarnAboutMismatchedHooksForComponent.add(componentName);

        if (hookTypesDev !== null) {
          var table = '';
          var secondColumnStart = 30;

          for (var i = 0; i <= hookTypesUpdateIndexDev; i++) {
            var oldHookName = hookTypesDev[i];
            var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName;
            var row = i + 1 + ". " + oldHookName; // Extra space so second column lines up
            // lol @ IE not supporting String#repeat

            while (row.length < secondColumnStart) {
              row += ' ';
            }

            row += newHookName + '\n';
            table += row;
          }

          error('React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + 'For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' + '   Previous render            Next render\n' + '   ------------------------------------------------------\n' + '%s' + '   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', componentName, table);
        }
      }
    }
  }

  function throwInvalidHookError() {
    throw new Error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');
  }

  function areHookInputsEqual(nextDeps, prevDeps) {
    {
      if (ignorePreviousDependencies) {
        // Only true when this component is being hot reloaded.
        return false;
      }
    }

    if (prevDeps === null) {
      {
        error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);
      }

      return false;
    }

    {
      // Don't bother comparing lengths in prod because these arrays should be
      // passed inline.
      if (nextDeps.length !== prevDeps.length) {
        error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\n\n' + 'Previous: %s\n' + 'Incoming: %s', currentHookNameInDev, "[" + prevDeps.join(', ') + "]", "[" + nextDeps.join(', ') + "]");
      }
    }

    for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {
      if (objectIs(nextDeps[i], prevDeps[i])) {
        continue;
      }

      return false;
    }

    return true;
  }

  function renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderLanes) {
    renderLanes = nextRenderLanes;
    currentlyRenderingFiber$1 = workInProgress;

    {
      hookTypesDev = current !== null ? current._debugHookTypes : null;
      hookTypesUpdateIndexDev = -1; // Used for hot reloading:

      ignorePreviousDependencies = current !== null && current.type !== workInProgress.type;
    }

    workInProgress.memoizedState = null;
    workInProgress.updateQueue = null;
    workInProgress.lanes = NoLanes; // The following should have already been reset
    // currentHook = null;
    // workInProgressHook = null;
    // didScheduleRenderPhaseUpdate = false;
    // localIdCounter = 0;
    // TODO Warn if no hooks are used at all during mount, then some are used during update.
    // Currently we will identify the update render as a mount because memoizedState === null.
    // This is tricky because it's valid for certain types of components (e.g. React.lazy)
    // Using memoizedState to differentiate between mount/update only works if at least one stateful hook is used.
    // Non-stateful hooks (e.g. context) don't get added to memoizedState,
    // so memoizedState would be null during updates and mounts.

    {
      if (current !== null && current.memoizedState !== null) {
        ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV;
      } else if (hookTypesDev !== null) {
        // This dispatcher handles an edge case where a component is updating,
        // but no stateful hooks have been used.
        // We want to match the production code behavior (which will use HooksDispatcherOnMount),
        // but with the extra DEV validation to ensure hooks ordering hasn't changed.
        // This dispatcher does that.
        ReactCurrentDispatcher$1.current = HooksDispatcherOnMountWithHookTypesInDEV;
      } else {
        ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV;
      }
    }

    var children = Component(props, secondArg); // Check if there was a render phase update

    if (didScheduleRenderPhaseUpdateDuringThisPass) {
      // Keep rendering in a loop for as long as render phase updates continue to
      // be scheduled. Use a counter to prevent infinite loops.
      var numberOfReRenders = 0;

      do {
        didScheduleRenderPhaseUpdateDuringThisPass = false;
        localIdCounter = 0;

        if (numberOfReRenders >= RE_RENDER_LIMIT) {
          throw new Error('Too many re-renders. React limits the number of renders to prevent ' + 'an infinite loop.');
        }

        numberOfReRenders += 1;

        {
          // Even when hot reloading, allow dependencies to stabilize
          // after first render to prevent infinite render phase updates.
          ignorePreviousDependencies = false;
        } // Start over from the beginning of the list


        currentHook = null;
        workInProgressHook = null;
        workInProgress.updateQueue = null;

        {
          // Also validate hook order for cascading updates.
          hookTypesUpdateIndexDev = -1;
        }

        ReactCurrentDispatcher$1.current =  HooksDispatcherOnRerenderInDEV ;
        children = Component(props, secondArg);
      } while (didScheduleRenderPhaseUpdateDuringThisPass);
    } // We can assume the previous dispatcher is always this one, since we set it
    // at the beginning of the render phase and there's no re-entrance.


    ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;

    {
      workInProgress._debugHookTypes = hookTypesDev;
    } // This check uses currentHook so that it works the same in DEV and prod bundles.
    // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles.


    var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;
    renderLanes = NoLanes;
    currentlyRenderingFiber$1 = null;
    currentHook = null;
    workInProgressHook = null;

    {
      currentHookNameInDev = null;
      hookTypesDev = null;
      hookTypesUpdateIndexDev = -1; // Confirm that a static flag was not added or removed since the last
      // render. If this fires, it suggests that we incorrectly reset the static
      // flags in some other part of the codebase. This has happened before, for
      // example, in the SuspenseList implementation.

      if (current !== null && (current.flags & StaticMask) !== (workInProgress.flags & StaticMask) && // Disable this warning in legacy mode, because legacy Suspense is weird
      // and creates false positives. To make this work in legacy mode, we'd
      // need to mark fibers that commit in an incomplete state, somehow. For
      // now I'll disable the warning that most of the bugs that would trigger
      // it are either exclusive to concurrent mode or exist in both.
      (current.mode & ConcurrentMode) !== NoMode) {
        error('Internal React error: Expected static flag was missing. Please ' + 'notify the React team.');
      }
    }

    didScheduleRenderPhaseUpdate = false; // This is reset by checkDidRenderIdHook
    // localIdCounter = 0;

    if (didRenderTooFewHooks) {
      throw new Error('Rendered fewer hooks than expected. This may be caused by an accidental ' + 'early return statement.');
    }

    return children;
  }
  function checkDidRenderIdHook() {
    // This should be called immediately after every renderWithHooks call.
    // Conceptually, it's part of the return value of renderWithHooks; it's only a
    // separate function to avoid using an array tuple.
    var didRenderIdHook = localIdCounter !== 0;
    localIdCounter = 0;
    return didRenderIdHook;
  }
  function bailoutHooks(current, workInProgress, lanes) {
    workInProgress.updateQueue = current.updateQueue; // TODO: Don't need to reset the flags here, because they're reset in the
    // complete phase (bubbleProperties).

    if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {
      workInProgress.flags &= ~(MountPassiveDev | MountLayoutDev | Passive | Update);
    } else {
      workInProgress.flags &= ~(Passive | Update);
    }

    current.lanes = removeLanes(current.lanes, lanes);
  }
  function resetHooksAfterThrow() {
    // We can assume the previous dispatcher is always this one, since we set it
    // at the beginning of the render phase and there's no re-entrance.
    ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;

    if (didScheduleRenderPhaseUpdate) {
      // There were render phase updates. These are only valid for this render
      // phase, which we are now aborting. Remove the updates from the queues so
      // they do not persist to the next render. Do not remove updates from hooks
      // that weren't processed.
      //
      // Only reset the updates from the queue if it has a clone. If it does
      // not have a clone, that means it wasn't processed, and the updates were
      // scheduled before we entered the render phase.
      var hook = currentlyRenderingFiber$1.memoizedState;

      while (hook !== null) {
        var queue = hook.queue;

        if (queue !== null) {
          queue.pending = null;
        }

        hook = hook.next;
      }

      didScheduleRenderPhaseUpdate = false;
    }

    renderLanes = NoLanes;
    currentlyRenderingFiber$1 = null;
    currentHook = null;
    workInProgressHook = null;

    {
      hookTypesDev = null;
      hookTypesUpdateIndexDev = -1;
      currentHookNameInDev = null;
      isUpdatingOpaqueValueInRenderPhase = false;
    }

    didScheduleRenderPhaseUpdateDuringThisPass = false;
    localIdCounter = 0;
  }

  function mountWorkInProgressHook() {
    var hook = {
      memoizedState: null,
      baseState: null,
      baseQueue: null,
      queue: null,
      next: null
    };

    if (workInProgressHook === null) {
      // This is the first hook in the list
      currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook;
    } else {
      // Append to the end of the list
      workInProgressHook = workInProgressHook.next = hook;
    }

    return workInProgressHook;
  }

  function updateWorkInProgressHook() {
    // This function is used both for updates and for re-renders triggered by a
    // render phase update. It assumes there is either a current hook we can
    // clone, or a work-in-progress hook from a previous render pass that we can
    // use as a base. When we reach the end of the base list, we must switch to
    // the dispatcher used for mounts.
    var nextCurrentHook;

    if (currentHook === null) {
      var current = currentlyRenderingFiber$1.alternate;

      if (current !== null) {
        nextCurrentHook = current.memoizedState;
      } else {
        nextCurrentHook = null;
      }
    } else {
      nextCurrentHook = currentHook.next;
    }

    var nextWorkInProgressHook;

    if (workInProgressHook === null) {
      nextWorkInProgressHook = currentlyRenderingFiber$1.memoizedState;
    } else {
      nextWorkInProgressHook = workInProgressHook.next;
    }

    if (nextWorkInProgressHook !== null) {
      // There's already a work-in-progress. Reuse it.
      workInProgressHook = nextWorkInProgressHook;
      nextWorkInProgressHook = workInProgressHook.next;
      currentHook = nextCurrentHook;
    } else {
      // Clone from the current hook.
      if (nextCurrentHook === null) {
        throw new Error('Rendered more hooks than during the previous render.');
      }

      currentHook = nextCurrentHook;
      var newHook = {
        memoizedState: currentHook.memoizedState,
        baseState: currentHook.baseState,
        baseQueue: currentHook.baseQueue,
        queue: currentHook.queue,
        next: null
      };

      if (workInProgressHook === null) {
        // This is the first hook in the list.
        currentlyRenderingFiber$1.memoizedState = workInProgressHook = newHook;
      } else {
        // Append to the end of the list.
        workInProgressHook = workInProgressHook.next = newHook;
      }
    }

    return workInProgressHook;
  }

  function createFunctionComponentUpdateQueue() {
    return {
      lastEffect: null,
      stores: null
    };
  }

  function basicStateReducer(state, action) {
    // $FlowFixMe: Flow doesn't like mixed types
    return typeof action === 'function' ? action(state) : action;
  }

  function mountReducer(reducer, initialArg, init) {
    var hook = mountWorkInProgressHook();
    var initialState;

    if (init !== undefined) {
      initialState = init(initialArg);
    } else {
      initialState = initialArg;
    }

    hook.memoizedState = hook.baseState = initialState;
    var queue = {
      pending: null,
      interleaved: null,
      lanes: NoLanes,
      dispatch: null,
      lastRenderedReducer: reducer,
      lastRenderedState: initialState
    };
    hook.queue = queue;
    var dispatch = queue.dispatch = dispatchReducerAction.bind(null, currentlyRenderingFiber$1, queue);
    return [hook.memoizedState, dispatch];
  }

  function updateReducer(reducer, initialArg, init) {
    var hook = updateWorkInProgressHook();
    var queue = hook.queue;

    if (queue === null) {
      throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.');
    }

    queue.lastRenderedReducer = reducer;
    var current = currentHook; // The last rebase update that is NOT part of the base state.

    var baseQueue = current.baseQueue; // The last pending update that hasn't been processed yet.

    var pendingQueue = queue.pending;

    if (pendingQueue !== null) {
      // We have new updates that haven't been processed yet.
      // We'll add them to the base queue.
      if (baseQueue !== null) {
        // Merge the pending queue and the base queue.
        var baseFirst = baseQueue.next;
        var pendingFirst = pendingQueue.next;
        baseQueue.next = pendingFirst;
        pendingQueue.next = baseFirst;
      }

      {
        if (current.baseQueue !== baseQueue) {
          // Internal invariant that should never happen, but feasibly could in
          // the future if we implement resuming, or some form of that.
          error('Internal error: Expected work-in-progress queue to be a clone. ' + 'This is a bug in React.');
        }
      }

      current.baseQueue = baseQueue = pendingQueue;
      queue.pending = null;
    }

    if (baseQueue !== null) {
      // We have a queue to process.
      var first = baseQueue.next;
      var newState = current.baseState;
      var newBaseState = null;
      var newBaseQueueFirst = null;
      var newBaseQueueLast = null;
      var update = first;

      do {
        var updateLane = update.lane;

        if (!isSubsetOfLanes(renderLanes, updateLane)) {
          // Priority is insufficient. Skip this update. If this is the first
          // skipped update, the previous update/state is the new base
          // update/state.
          var clone = {
            lane: updateLane,
            action: update.action,
            hasEagerState: update.hasEagerState,
            eagerState: update.eagerState,
            next: null
          };

          if (newBaseQueueLast === null) {
            newBaseQueueFirst = newBaseQueueLast = clone;
            newBaseState = newState;
          } else {
            newBaseQueueLast = newBaseQueueLast.next = clone;
          } // Update the remaining priority in the queue.
          // TODO: Don't need to accumulate this. Instead, we can remove
          // renderLanes from the original lanes.


          currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, updateLane);
          markSkippedUpdateLanes(updateLane);
        } else {
          // This update does have sufficient priority.
          if (newBaseQueueLast !== null) {
            var _clone = {
              // This update is going to be committed so we never want uncommit
              // it. Using NoLane works because 0 is a subset of all bitmasks, so
              // this will never be skipped by the check above.
              lane: NoLane,
              action: update.action,
              hasEagerState: update.hasEagerState,
              eagerState: update.eagerState,
              next: null
            };
            newBaseQueueLast = newBaseQueueLast.next = _clone;
          } // Process this update.


          if (update.hasEagerState) {
            // If this update is a state update (not a reducer) and was processed eagerly,
            // we can use the eagerly computed state
            newState = update.eagerState;
          } else {
            var action = update.action;
            newState = reducer(newState, action);
          }
        }

        update = update.next;
      } while (update !== null && update !== first);

      if (newBaseQueueLast === null) {
        newBaseState = newState;
      } else {
        newBaseQueueLast.next = newBaseQueueFirst;
      } // Mark that the fiber performed work, but only if the new state is
      // different from the current state.


      if (!objectIs(newState, hook.memoizedState)) {
        markWorkInProgressReceivedUpdate();
      }

      hook.memoizedState = newState;
      hook.baseState = newBaseState;
      hook.baseQueue = newBaseQueueLast;
      queue.lastRenderedState = newState;
    } // Interleaved updates are stored on a separate queue. We aren't going to
    // process them during this render, but we do need to track which lanes
    // are remaining.


    var lastInterleaved = queue.interleaved;

    if (lastInterleaved !== null) {
      var interleaved = lastInterleaved;

      do {
        var interleavedLane = interleaved.lane;
        currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, interleavedLane);
        markSkippedUpdateLanes(interleavedLane);
        interleaved = interleaved.next;
      } while (interleaved !== lastInterleaved);
    } else if (baseQueue === null) {
      // `queue.lanes` is used for entangling transitions. We can set it back to
      // zero once the queue is empty.
      queue.lanes = NoLanes;
    }

    var dispatch = queue.dispatch;
    return [hook.memoizedState, dispatch];
  }

  function rerenderReducer(reducer, initialArg, init) {
    var hook = updateWorkInProgressHook();
    var queue = hook.queue;

    if (queue === null) {
      throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.');
    }

    queue.lastRenderedReducer = reducer; // This is a re-render. Apply the new render phase updates to the previous
    // work-in-progress hook.

    var dispatch = queue.dispatch;
    var lastRenderPhaseUpdate = queue.pending;
    var newState = hook.memoizedState;

    if (lastRenderPhaseUpdate !== null) {
      // The queue doesn't persist past this render pass.
      queue.pending = null;
      var firstRenderPhaseUpdate = lastRenderPhaseUpdate.next;
      var update = firstRenderPhaseUpdate;

      do {
        // Process this render phase update. We don't have to check the
        // priority because it will always be the same as the current
        // render's.
        var action = update.action;
        newState = reducer(newState, action);
        update = update.next;
      } while (update !== firstRenderPhaseUpdate); // Mark that the fiber performed work, but only if the new state is
      // different from the current state.


      if (!objectIs(newState, hook.memoizedState)) {
        markWorkInProgressReceivedUpdate();
      }

      hook.memoizedState = newState; // Don't persist the state accumulated from the render phase updates to
      // the base state unless the queue is empty.
      // TODO: Not sure if this is the desired semantics, but it's what we
      // do for gDSFP. I can't remember why.

      if (hook.baseQueue === null) {
        hook.baseState = newState;
      }

      queue.lastRenderedState = newState;
    }

    return [newState, dispatch];
  }

  function mountMutableSource(source, getSnapshot, subscribe) {
    {
      return undefined;
    }
  }

  function updateMutableSource(source, getSnapshot, subscribe) {
    {
      return undefined;
    }
  }

  function mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
    var fiber = currentlyRenderingFiber$1;
    var hook = mountWorkInProgressHook();
    var nextSnapshot;
    var isHydrating = getIsHydrating();

    if (isHydrating) {
      if (getServerSnapshot === undefined) {
        throw new Error('Missing getServerSnapshot, which is required for ' + 'server-rendered content. Will revert to client rendering.');
      }

      nextSnapshot = getServerSnapshot();

      {
        if (!didWarnUncachedGetSnapshot) {
          if (nextSnapshot !== getServerSnapshot()) {
            error('The result of getServerSnapshot should be cached to avoid an infinite loop');

            didWarnUncachedGetSnapshot = true;
          }
        }
      }
    } else {
      nextSnapshot = getSnapshot();

      {
        if (!didWarnUncachedGetSnapshot) {
          var cachedSnapshot = getSnapshot();

          if (!objectIs(nextSnapshot, cachedSnapshot)) {
            error('The result of getSnapshot should be cached to avoid an infinite loop');

            didWarnUncachedGetSnapshot = true;
          }
        }
      } // Unless we're rendering a blocking lane, schedule a consistency check.
      // Right before committing, we will walk the tree and check if any of the
      // stores were mutated.
      //
      // We won't do this if we're hydrating server-rendered content, because if
      // the content is stale, it's already visible anyway. Instead we'll patch
      // it up in a passive effect.


      var root = getWorkInProgressRoot();

      if (root === null) {
        throw new Error('Expected a work-in-progress root. This is a bug in React. Please file an issue.');
      }

      if (!includesBlockingLane(root, renderLanes)) {
        pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);
      }
    } // Read the current snapshot from the store on every render. This breaks the
    // normal rules of React, and only works because store updates are
    // always synchronous.


    hook.memoizedState = nextSnapshot;
    var inst = {
      value: nextSnapshot,
      getSnapshot: getSnapshot
    };
    hook.queue = inst; // Schedule an effect to subscribe to the store.

    mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [subscribe]); // Schedule an effect to update the mutable instance fields. We will update
    // this whenever subscribe, getSnapshot, or value changes. Because there's no
    // clean-up function, and we track the deps correctly, we can call pushEffect
    // directly, without storing any additional state. For the same reason, we
    // don't need to set a static flag, either.
    // TODO: We can move this to the passive phase once we add a pre-commit
    // consistency check. See the next comment.

    fiber.flags |= Passive;
    pushEffect(HasEffect | Passive$1, updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot), undefined, null);
    return nextSnapshot;
  }

  function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
    var fiber = currentlyRenderingFiber$1;
    var hook = updateWorkInProgressHook(); // Read the current snapshot from the store on every render. This breaks the
    // normal rules of React, and only works because store updates are
    // always synchronous.

    var nextSnapshot = getSnapshot();

    {
      if (!didWarnUncachedGetSnapshot) {
        var cachedSnapshot = getSnapshot();

        if (!objectIs(nextSnapshot, cachedSnapshot)) {
          error('The result of getSnapshot should be cached to avoid an infinite loop');

          didWarnUncachedGetSnapshot = true;
        }
      }
    }

    var prevSnapshot = hook.memoizedState;
    var snapshotChanged = !objectIs(prevSnapshot, nextSnapshot);

    if (snapshotChanged) {
      hook.memoizedState = nextSnapshot;
      markWorkInProgressReceivedUpdate();
    }

    var inst = hook.queue;
    updateEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [subscribe]); // Whenever getSnapshot or subscribe changes, we need to check in the
    // commit phase if there was an interleaved mutation. In concurrent mode
    // this can happen all the time, but even in synchronous mode, an earlier
    // effect may have mutated the store.

    if (inst.getSnapshot !== getSnapshot || snapshotChanged || // Check if the susbcribe function changed. We can save some memory by
    // checking whether we scheduled a subscription effect above.
    workInProgressHook !== null && workInProgressHook.memoizedState.tag & HasEffect) {
      fiber.flags |= Passive;
      pushEffect(HasEffect | Passive$1, updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot), undefined, null); // Unless we're rendering a blocking lane, schedule a consistency check.
      // Right before committing, we will walk the tree and check if any of the
      // stores were mutated.

      var root = getWorkInProgressRoot();

      if (root === null) {
        throw new Error('Expected a work-in-progress root. This is a bug in React. Please file an issue.');
      }

      if (!includesBlockingLane(root, renderLanes)) {
        pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);
      }
    }

    return nextSnapshot;
  }

  function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {
    fiber.flags |= StoreConsistency;
    var check = {
      getSnapshot: getSnapshot,
      value: renderedSnapshot
    };
    var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;

    if (componentUpdateQueue === null) {
      componentUpdateQueue = createFunctionComponentUpdateQueue();
      currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;
      componentUpdateQueue.stores = [check];
    } else {
      var stores = componentUpdateQueue.stores;

      if (stores === null) {
        componentUpdateQueue.stores = [check];
      } else {
        stores.push(check);
      }
    }
  }

  function updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {
    // These are updated in the passive phase
    inst.value = nextSnapshot;
    inst.getSnapshot = getSnapshot; // Something may have been mutated in between render and commit. This could
    // have been in an event that fired before the passive effects, or it could
    // have been in a layout effect. In that case, we would have used the old
    // snapsho and getSnapshot values to bail out. We need to check one more time.

    if (checkIfSnapshotChanged(inst)) {
      // Force a re-render.
      forceStoreRerender(fiber);
    }
  }

  function subscribeToStore(fiber, inst, subscribe) {
    var handleStoreChange = function () {
      // The store changed. Check if the snapshot changed since the last time we
      // read from the store.
      if (checkIfSnapshotChanged(inst)) {
        // Force a re-render.
        forceStoreRerender(fiber);
      }
    }; // Subscribe to the store and return a clean-up function.


    return subscribe(handleStoreChange);
  }

  function checkIfSnapshotChanged(inst) {
    var latestGetSnapshot = inst.getSnapshot;
    var prevValue = inst.value;

    try {
      var nextValue = latestGetSnapshot();
      return !objectIs(prevValue, nextValue);
    } catch (error) {
      return true;
    }
  }

  function forceStoreRerender(fiber) {
    var root = enqueueConcurrentRenderForLane(fiber, SyncLane);

    if (root !== null) {
      scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
    }
  }

  function mountState(initialState) {
    var hook = mountWorkInProgressHook();

    if (typeof initialState === 'function') {
      // $FlowFixMe: Flow doesn't like mixed types
      initialState = initialState();
    }

    hook.memoizedState = hook.baseState = initialState;
    var queue = {
      pending: null,
      interleaved: null,
      lanes: NoLanes,
      dispatch: null,
      lastRenderedReducer: basicStateReducer,
      lastRenderedState: initialState
    };
    hook.queue = queue;
    var dispatch = queue.dispatch = dispatchSetState.bind(null, currentlyRenderingFiber$1, queue);
    return [hook.memoizedState, dispatch];
  }

  function updateState(initialState) {
    return updateReducer(basicStateReducer);
  }

  function rerenderState(initialState) {
    return rerenderReducer(basicStateReducer);
  }

  function pushEffect(tag, create, destroy, deps) {
    var effect = {
      tag: tag,
      create: create,
      destroy: destroy,
      deps: deps,
      // Circular
      next: null
    };
    var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;

    if (componentUpdateQueue === null) {
      componentUpdateQueue = createFunctionComponentUpdateQueue();
      currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;
      componentUpdateQueue.lastEffect = effect.next = effect;
    } else {
      var lastEffect = componentUpdateQueue.lastEffect;

      if (lastEffect === null) {
        componentUpdateQueue.lastEffect = effect.next = effect;
      } else {
        var firstEffect = lastEffect.next;
        lastEffect.next = effect;
        effect.next = firstEffect;
        componentUpdateQueue.lastEffect = effect;
      }
    }

    return effect;
  }

  function mountRef(initialValue) {
    var hook = mountWorkInProgressHook();

    {
      var _ref2 = {
        current: initialValue
      };
      hook.memoizedState = _ref2;
      return _ref2;
    }
  }

  function updateRef(initialValue) {
    var hook = updateWorkInProgressHook();
    return hook.memoizedState;
  }

  function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
    var hook = mountWorkInProgressHook();
    var nextDeps = deps === undefined ? null : deps;
    currentlyRenderingFiber$1.flags |= fiberFlags;
    hook.memoizedState = pushEffect(HasEffect | hookFlags, create, undefined, nextDeps);
  }

  function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
    var hook = updateWorkInProgressHook();
    var nextDeps = deps === undefined ? null : deps;
    var destroy = undefined;

    if (currentHook !== null) {
      var prevEffect = currentHook.memoizedState;
      destroy = prevEffect.destroy;

      if (nextDeps !== null) {
        var prevDeps = prevEffect.deps;

        if (areHookInputsEqual(nextDeps, prevDeps)) {
          hook.memoizedState = pushEffect(hookFlags, create, destroy, nextDeps);
          return;
        }
      }
    }

    currentlyRenderingFiber$1.flags |= fiberFlags;
    hook.memoizedState = pushEffect(HasEffect | hookFlags, create, destroy, nextDeps);
  }

  function mountEffect(create, deps) {
    if ( (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {
      return mountEffectImpl(MountPassiveDev | Passive | PassiveStatic, Passive$1, create, deps);
    } else {
      return mountEffectImpl(Passive | PassiveStatic, Passive$1, create, deps);
    }
  }

  function updateEffect(create, deps) {
    return updateEffectImpl(Passive, Passive$1, create, deps);
  }

  function mountInsertionEffect(create, deps) {
    return mountEffectImpl(Update, Insertion, create, deps);
  }

  function updateInsertionEffect(create, deps) {
    return updateEffectImpl(Update, Insertion, create, deps);
  }

  function mountLayoutEffect(create, deps) {
    var fiberFlags = Update;

    {
      fiberFlags |= LayoutStatic;
    }

    if ( (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {
      fiberFlags |= MountLayoutDev;
    }

    return mountEffectImpl(fiberFlags, Layout, create, deps);
  }

  function updateLayoutEffect(create, deps) {
    return updateEffectImpl(Update, Layout, create, deps);
  }

  function imperativeHandleEffect(create, ref) {
    if (typeof ref === 'function') {
      var refCallback = ref;

      var _inst = create();

      refCallback(_inst);
      return function () {
        refCallback(null);
      };
    } else if (ref !== null && ref !== undefined) {
      var refObject = ref;

      {
        if (!refObject.hasOwnProperty('current')) {
          error('Expected useImperativeHandle() first argument to either be a ' + 'ref callback or React.createRef() object. Instead received: %s.', 'an object with keys {' + Object.keys(refObject).join(', ') + '}');
        }
      }

      var _inst2 = create();

      refObject.current = _inst2;
      return function () {
        refObject.current = null;
      };
    }
  }

  function mountImperativeHandle(ref, create, deps) {
    {
      if (typeof create !== 'function') {
        error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');
      }
    } // TODO: If deps are provided, should we skip comparing the ref itself?


    var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;
    var fiberFlags = Update;

    {
      fiberFlags |= LayoutStatic;
    }

    if ( (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {
      fiberFlags |= MountLayoutDev;
    }

    return mountEffectImpl(fiberFlags, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
  }

  function updateImperativeHandle(ref, create, deps) {
    {
      if (typeof create !== 'function') {
        error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');
      }
    } // TODO: If deps are provided, should we skip comparing the ref itself?


    var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;
    return updateEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
  }

  function mountDebugValue(value, formatterFn) {// This hook is normally a no-op.
    // The react-debug-hooks package injects its own implementation
    // so that e.g. DevTools can display custom hook values.
  }

  var updateDebugValue = mountDebugValue;

  function mountCallback(callback, deps) {
    var hook = mountWorkInProgressHook();
    var nextDeps = deps === undefined ? null : deps;
    hook.memoizedState = [callback, nextDeps];
    return callback;
  }

  function updateCallback(callback, deps) {
    var hook = updateWorkInProgressHook();
    var nextDeps = deps === undefined ? null : deps;
    var prevState = hook.memoizedState;

    if (prevState !== null) {
      if (nextDeps !== null) {
        var prevDeps = prevState[1];

        if (areHookInputsEqual(nextDeps, prevDeps)) {
          return prevState[0];
        }
      }
    }

    hook.memoizedState = [callback, nextDeps];
    return callback;
  }

  function mountMemo(nextCreate, deps) {
    var hook = mountWorkInProgressHook();
    var nextDeps = deps === undefined ? null : deps;
    var nextValue = nextCreate();
    hook.memoizedState = [nextValue, nextDeps];
    return nextValue;
  }

  function updateMemo(nextCreate, deps) {
    var hook = updateWorkInProgressHook();
    var nextDeps = deps === undefined ? null : deps;
    var prevState = hook.memoizedState;

    if (prevState !== null) {
      // Assume these are defined. If they're not, areHookInputsEqual will warn.
      if (nextDeps !== null) {
        var prevDeps = prevState[1];

        if (areHookInputsEqual(nextDeps, prevDeps)) {
          return prevState[0];
        }
      }
    }

    var nextValue = nextCreate();
    hook.memoizedState = [nextValue, nextDeps];
    return nextValue;
  }

  function mountDeferredValue(value) {
    var hook = mountWorkInProgressHook();
    hook.memoizedState = value;
    return value;
  }

  function updateDeferredValue(value) {
    var hook = updateWorkInProgressHook();
    var resolvedCurrentHook = currentHook;
    var prevValue = resolvedCurrentHook.memoizedState;
    return updateDeferredValueImpl(hook, prevValue, value);
  }

  function rerenderDeferredValue(value) {
    var hook = updateWorkInProgressHook();

    if (currentHook === null) {
      // This is a rerender during a mount.
      hook.memoizedState = value;
      return value;
    } else {
      // This is a rerender during an update.
      var prevValue = currentHook.memoizedState;
      return updateDeferredValueImpl(hook, prevValue, value);
    }
  }

  function updateDeferredValueImpl(hook, prevValue, value) {
    var shouldDeferValue = !includesOnlyNonUrgentLanes(renderLanes);

    if (shouldDeferValue) {
      // This is an urgent update. If the value has changed, keep using the
      // previous value and spawn a deferred render to update it later.
      if (!objectIs(value, prevValue)) {
        // Schedule a deferred render
        var deferredLane = claimNextTransitionLane();
        currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, deferredLane);
        markSkippedUpdateLanes(deferredLane); // Set this to true to indicate that the rendered value is inconsistent
        // from the latest value. The name "baseState" doesn't really match how we
        // use it because we're reusing a state hook field instead of creating a
        // new one.

        hook.baseState = true;
      } // Reuse the previous value


      return prevValue;
    } else {
      // This is not an urgent update, so we can use the latest value regardless
      // of what it is. No need to defer it.
      // However, if we're currently inside a spawned render, then we need to mark
      // this as an update to prevent the fiber from bailing out.
      //
      // `baseState` is true when the current value is different from the rendered
      // value. The name doesn't really match how we use it because we're reusing
      // a state hook field instead of creating a new one.
      if (hook.baseState) {
        // Flip this back to false.
        hook.baseState = false;
        markWorkInProgressReceivedUpdate();
      }

      hook.memoizedState = value;
      return value;
    }
  }

  function startTransition(setPending, callback, options) {
    var previousPriority = getCurrentUpdatePriority();
    setCurrentUpdatePriority(higherEventPriority(previousPriority, ContinuousEventPriority));
    setPending(true);
    var prevTransition = ReactCurrentBatchConfig$2.transition;
    ReactCurrentBatchConfig$2.transition = {};
    var currentTransition = ReactCurrentBatchConfig$2.transition;

    {
      ReactCurrentBatchConfig$2.transition._updatedFibers = new Set();
    }

    try {
      setPending(false);
      callback();
    } finally {
      setCurrentUpdatePriority(previousPriority);
      ReactCurrentBatchConfig$2.transition = prevTransition;

      {
        if (prevTransition === null && currentTransition._updatedFibers) {
          var updatedFibersCount = currentTransition._updatedFibers.size;

          if (updatedFibersCount > 10) {
            warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');
          }

          currentTransition._updatedFibers.clear();
        }
      }
    }
  }

  function mountTransition() {
    var _mountState = mountState(false),
        isPending = _mountState[0],
        setPending = _mountState[1]; // The `start` method never changes.


    var start = startTransition.bind(null, setPending);
    var hook = mountWorkInProgressHook();
    hook.memoizedState = start;
    return [isPending, start];
  }

  function updateTransition() {
    var _updateState = updateState(),
        isPending = _updateState[0];

    var hook = updateWorkInProgressHook();
    var start = hook.memoizedState;
    return [isPending, start];
  }

  function rerenderTransition() {
    var _rerenderState = rerenderState(),
        isPending = _rerenderState[0];

    var hook = updateWorkInProgressHook();
    var start = hook.memoizedState;
    return [isPending, start];
  }

  var isUpdatingOpaqueValueInRenderPhase = false;
  function getIsUpdatingOpaqueValueInRenderPhaseInDEV() {
    {
      return isUpdatingOpaqueValueInRenderPhase;
    }
  }

  function mountId() {
    var hook = mountWorkInProgressHook();
    var root = getWorkInProgressRoot(); // TODO: In Fizz, id generation is specific to each server config. Maybe we
    // should do this in Fiber, too? Deferring this decision for now because
    // there's no other place to store the prefix except for an internal field on
    // the public createRoot object, which the fiber tree does not currently have
    // a reference to.

    var identifierPrefix = root.identifierPrefix;
    var id;

    if (getIsHydrating()) {
      var treeId = getTreeId(); // Use a captial R prefix for server-generated ids.

      id = ':' + identifierPrefix + 'R' + treeId; // Unless this is the first id at this level, append a number at the end
      // that represents the position of this useId hook among all the useId
      // hooks for this fiber.

      var localId = localIdCounter++;

      if (localId > 0) {
        id += 'H' + localId.toString(32);
      }

      id += ':';
    } else {
      // Use a lowercase r prefix for client-generated ids.
      var globalClientId = globalClientIdCounter++;
      id = ':' + identifierPrefix + 'r' + globalClientId.toString(32) + ':';
    }

    hook.memoizedState = id;
    return id;
  }

  function updateId() {
    var hook = updateWorkInProgressHook();
    var id = hook.memoizedState;
    return id;
  }

  function dispatchReducerAction(fiber, queue, action) {
    {
      if (typeof arguments[3] === 'function') {
        error("State updates from the useState() and useReducer() Hooks don't support the " + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');
      }
    }

    var lane = requestUpdateLane(fiber);
    var update = {
      lane: lane,
      action: action,
      hasEagerState: false,
      eagerState: null,
      next: null
    };

    if (isRenderPhaseUpdate(fiber)) {
      enqueueRenderPhaseUpdate(queue, update);
    } else {
      var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane);

      if (root !== null) {
        var eventTime = requestEventTime();
        scheduleUpdateOnFiber(root, fiber, lane, eventTime);
        entangleTransitionUpdate(root, queue, lane);
      }
    }

    markUpdateInDevTools(fiber, lane);
  }

  function dispatchSetState(fiber, queue, action) {
    {
      if (typeof arguments[3] === 'function') {
        error("State updates from the useState() and useReducer() Hooks don't support the " + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');
      }
    }

    var lane = requestUpdateLane(fiber);
    var update = {
      lane: lane,
      action: action,
      hasEagerState: false,
      eagerState: null,
      next: null
    };

    if (isRenderPhaseUpdate(fiber)) {
      enqueueRenderPhaseUpdate(queue, update);
    } else {
      var alternate = fiber.alternate;

      if (fiber.lanes === NoLanes && (alternate === null || alternate.lanes === NoLanes)) {
        // The queue is currently empty, which means we can eagerly compute the
        // next state before entering the render phase. If the new state is the
        // same as the current state, we may be able to bail out entirely.
        var lastRenderedReducer = queue.lastRenderedReducer;

        if (lastRenderedReducer !== null) {
          var prevDispatcher;

          {
            prevDispatcher = ReactCurrentDispatcher$1.current;
            ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
          }

          try {
            var currentState = queue.lastRenderedState;
            var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to compute
            // it, on the update object. If the reducer hasn't changed by the
            // time we enter the render phase, then the eager state can be used
            // without calling the reducer again.

            update.hasEagerState = true;
            update.eagerState = eagerState;

            if (objectIs(eagerState, currentState)) {
              // Fast path. We can bail out without scheduling React to re-render.
              // It's still possible that we'll need to rebase this update later,
              // if the component re-renders for a different reason and by that
              // time the reducer has changed.
              // TODO: Do we still need to entangle transitions in this case?
              enqueueConcurrentHookUpdateAndEagerlyBailout(fiber, queue, update, lane);
              return;
            }
          } catch (error) {// Suppress the error. It will throw again in the render phase.
          } finally {
            {
              ReactCurrentDispatcher$1.current = prevDispatcher;
            }
          }
        }
      }

      var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane);

      if (root !== null) {
        var eventTime = requestEventTime();
        scheduleUpdateOnFiber(root, fiber, lane, eventTime);
        entangleTransitionUpdate(root, queue, lane);
      }
    }

    markUpdateInDevTools(fiber, lane);
  }

  function isRenderPhaseUpdate(fiber) {
    var alternate = fiber.alternate;
    return fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1;
  }

  function enqueueRenderPhaseUpdate(queue, update) {
    // This is a render phase update. Stash it in a lazily-created map of
    // queue -> linked list of updates. After this render pass, we'll restart
    // and apply the stashed updates on top of the work-in-progress hook.
    didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;
    var pending = queue.pending;

    if (pending === null) {
      // This is the first update. Create a circular list.
      update.next = update;
    } else {
      update.next = pending.next;
      pending.next = update;
    }

    queue.pending = update;
  } // TODO: Move to ReactFiberConcurrentUpdates?


  function entangleTransitionUpdate(root, queue, lane) {
    if (isTransitionLane(lane)) {
      var queueLanes = queue.lanes; // If any entangled lanes are no longer pending on the root, then they
      // must have finished. We can remove them from the shared queue, which
      // represents a superset of the actually pending lanes. In some cases we
      // may entangle more than we need to, but that's OK. In fact it's worse if
      // we *don't* entangle when we should.

      queueLanes = intersectLanes(queueLanes, root.pendingLanes); // Entangle the new transition lane with the other transition lanes.

      var newQueueLanes = mergeLanes(queueLanes, lane);
      queue.lanes = newQueueLanes; // Even if queue.lanes already include lane, we don't know for certain if
      // the lane finished since the last time we entangled it. So we need to
      // entangle it again, just to be sure.

      markRootEntangled(root, newQueueLanes);
    }
  }

  function markUpdateInDevTools(fiber, lane, action) {

    {
      markStateUpdateScheduled(fiber, lane);
    }
  }

  var ContextOnlyDispatcher = {
    readContext: readContext,
    useCallback: throwInvalidHookError,
    useContext: throwInvalidHookError,
    useEffect: throwInvalidHookError,
    useImperativeHandle: throwInvalidHookError,
    useInsertionEffect: throwInvalidHookError,
    useLayoutEffect: throwInvalidHookError,
    useMemo: throwInvalidHookError,
    useReducer: throwInvalidHookError,
    useRef: throwInvalidHookError,
    useState: throwInvalidHookError,
    useDebugValue: throwInvalidHookError,
    useDeferredValue: throwInvalidHookError,
    useTransition: throwInvalidHookError,
    useMutableSource: throwInvalidHookError,
    useSyncExternalStore: throwInvalidHookError,
    useId: throwInvalidHookError,
    unstable_isNewReconciler: enableNewReconciler
  };

  var HooksDispatcherOnMountInDEV = null;
  var HooksDispatcherOnMountWithHookTypesInDEV = null;
  var HooksDispatcherOnUpdateInDEV = null;
  var HooksDispatcherOnRerenderInDEV = null;
  var InvalidNestedHooksDispatcherOnMountInDEV = null;
  var InvalidNestedHooksDispatcherOnUpdateInDEV = null;
  var InvalidNestedHooksDispatcherOnRerenderInDEV = null;

  {
    var warnInvalidContextAccess = function () {
      error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');
    };

    var warnInvalidHookAccess = function () {
      error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://reactjs.org/link/rules-of-hooks');
    };

    HooksDispatcherOnMountInDEV = {
      readContext: function (context) {
        return readContext(context);
      },
      useCallback: function (callback, deps) {
        currentHookNameInDev = 'useCallback';
        mountHookTypesDev();
        checkDepsAreArrayDev(deps);
        return mountCallback(callback, deps);
      },
      useContext: function (context) {
        currentHookNameInDev = 'useContext';
        mountHookTypesDev();
        return readContext(context);
      },
      useEffect: function (create, deps) {
        currentHookNameInDev = 'useEffect';
        mountHookTypesDev();
        checkDepsAreArrayDev(deps);
        return mountEffect(create, deps);
      },
      useImperativeHandle: function (ref, create, deps) {
        currentHookNameInDev = 'useImperativeHandle';
        mountHookTypesDev();
        checkDepsAreArrayDev(deps);
        return mountImperativeHandle(ref, create, deps);
      },
      useInsertionEffect: function (create, deps) {
        currentHookNameInDev = 'useInsertionEffect';
        mountHookTypesDev();
        checkDepsAreArrayDev(deps);
        return mountInsertionEffect(create, deps);
      },
      useLayoutEffect: function (create, deps) {
        currentHookNameInDev = 'useLayoutEffect';
        mountHookTypesDev();
        checkDepsAreArrayDev(deps);
        return mountLayoutEffect(create, deps);
      },
      useMemo: function (create, deps) {
        currentHookNameInDev = 'useMemo';
        mountHookTypesDev();
        checkDepsAreArrayDev(deps);
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;

        try {
          return mountMemo(create, deps);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useReducer: function (reducer, initialArg, init) {
        currentHookNameInDev = 'useReducer';
        mountHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;

        try {
          return mountReducer(reducer, initialArg, init);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useRef: function (initialValue) {
        currentHookNameInDev = 'useRef';
        mountHookTypesDev();
        return mountRef(initialValue);
      },
      useState: function (initialState) {
        currentHookNameInDev = 'useState';
        mountHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;

        try {
          return mountState(initialState);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useDebugValue: function (value, formatterFn) {
        currentHookNameInDev = 'useDebugValue';
        mountHookTypesDev();
        return mountDebugValue();
      },
      useDeferredValue: function (value) {
        currentHookNameInDev = 'useDeferredValue';
        mountHookTypesDev();
        return mountDeferredValue(value);
      },
      useTransition: function () {
        currentHookNameInDev = 'useTransition';
        mountHookTypesDev();
        return mountTransition();
      },
      useMutableSource: function (source, getSnapshot, subscribe) {
        currentHookNameInDev = 'useMutableSource';
        mountHookTypesDev();
        return mountMutableSource();
      },
      useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
        currentHookNameInDev = 'useSyncExternalStore';
        mountHookTypesDev();
        return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
      },
      useId: function () {
        currentHookNameInDev = 'useId';
        mountHookTypesDev();
        return mountId();
      },
      unstable_isNewReconciler: enableNewReconciler
    };

    HooksDispatcherOnMountWithHookTypesInDEV = {
      readContext: function (context) {
        return readContext(context);
      },
      useCallback: function (callback, deps) {
        currentHookNameInDev = 'useCallback';
        updateHookTypesDev();
        return mountCallback(callback, deps);
      },
      useContext: function (context) {
        currentHookNameInDev = 'useContext';
        updateHookTypesDev();
        return readContext(context);
      },
      useEffect: function (create, deps) {
        currentHookNameInDev = 'useEffect';
        updateHookTypesDev();
        return mountEffect(create, deps);
      },
      useImperativeHandle: function (ref, create, deps) {
        currentHookNameInDev = 'useImperativeHandle';
        updateHookTypesDev();
        return mountImperativeHandle(ref, create, deps);
      },
      useInsertionEffect: function (create, deps) {
        currentHookNameInDev = 'useInsertionEffect';
        updateHookTypesDev();
        return mountInsertionEffect(create, deps);
      },
      useLayoutEffect: function (create, deps) {
        currentHookNameInDev = 'useLayoutEffect';
        updateHookTypesDev();
        return mountLayoutEffect(create, deps);
      },
      useMemo: function (create, deps) {
        currentHookNameInDev = 'useMemo';
        updateHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;

        try {
          return mountMemo(create, deps);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useReducer: function (reducer, initialArg, init) {
        currentHookNameInDev = 'useReducer';
        updateHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;

        try {
          return mountReducer(reducer, initialArg, init);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useRef: function (initialValue) {
        currentHookNameInDev = 'useRef';
        updateHookTypesDev();
        return mountRef(initialValue);
      },
      useState: function (initialState) {
        currentHookNameInDev = 'useState';
        updateHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;

        try {
          return mountState(initialState);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useDebugValue: function (value, formatterFn) {
        currentHookNameInDev = 'useDebugValue';
        updateHookTypesDev();
        return mountDebugValue();
      },
      useDeferredValue: function (value) {
        currentHookNameInDev = 'useDeferredValue';
        updateHookTypesDev();
        return mountDeferredValue(value);
      },
      useTransition: function () {
        currentHookNameInDev = 'useTransition';
        updateHookTypesDev();
        return mountTransition();
      },
      useMutableSource: function (source, getSnapshot, subscribe) {
        currentHookNameInDev = 'useMutableSource';
        updateHookTypesDev();
        return mountMutableSource();
      },
      useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
        currentHookNameInDev = 'useSyncExternalStore';
        updateHookTypesDev();
        return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
      },
      useId: function () {
        currentHookNameInDev = 'useId';
        updateHookTypesDev();
        return mountId();
      },
      unstable_isNewReconciler: enableNewReconciler
    };

    HooksDispatcherOnUpdateInDEV = {
      readContext: function (context) {
        return readContext(context);
      },
      useCallback: function (callback, deps) {
        currentHookNameInDev = 'useCallback';
        updateHookTypesDev();
        return updateCallback(callback, deps);
      },
      useContext: function (context) {
        currentHookNameInDev = 'useContext';
        updateHookTypesDev();
        return readContext(context);
      },
      useEffect: function (create, deps) {
        currentHookNameInDev = 'useEffect';
        updateHookTypesDev();
        return updateEffect(create, deps);
      },
      useImperativeHandle: function (ref, create, deps) {
        currentHookNameInDev = 'useImperativeHandle';
        updateHookTypesDev();
        return updateImperativeHandle(ref, create, deps);
      },
      useInsertionEffect: function (create, deps) {
        currentHookNameInDev = 'useInsertionEffect';
        updateHookTypesDev();
        return updateInsertionEffect(create, deps);
      },
      useLayoutEffect: function (create, deps) {
        currentHookNameInDev = 'useLayoutEffect';
        updateHookTypesDev();
        return updateLayoutEffect(create, deps);
      },
      useMemo: function (create, deps) {
        currentHookNameInDev = 'useMemo';
        updateHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;

        try {
          return updateMemo(create, deps);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useReducer: function (reducer, initialArg, init) {
        currentHookNameInDev = 'useReducer';
        updateHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;

        try {
          return updateReducer(reducer, initialArg, init);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useRef: function (initialValue) {
        currentHookNameInDev = 'useRef';
        updateHookTypesDev();
        return updateRef();
      },
      useState: function (initialState) {
        currentHookNameInDev = 'useState';
        updateHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;

        try {
          return updateState(initialState);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useDebugValue: function (value, formatterFn) {
        currentHookNameInDev = 'useDebugValue';
        updateHookTypesDev();
        return updateDebugValue();
      },
      useDeferredValue: function (value) {
        currentHookNameInDev = 'useDeferredValue';
        updateHookTypesDev();
        return updateDeferredValue(value);
      },
      useTransition: function () {
        currentHookNameInDev = 'useTransition';
        updateHookTypesDev();
        return updateTransition();
      },
      useMutableSource: function (source, getSnapshot, subscribe) {
        currentHookNameInDev = 'useMutableSource';
        updateHookTypesDev();
        return updateMutableSource();
      },
      useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
        currentHookNameInDev = 'useSyncExternalStore';
        updateHookTypesDev();
        return updateSyncExternalStore(subscribe, getSnapshot);
      },
      useId: function () {
        currentHookNameInDev = 'useId';
        updateHookTypesDev();
        return updateId();
      },
      unstable_isNewReconciler: enableNewReconciler
    };

    HooksDispatcherOnRerenderInDEV = {
      readContext: function (context) {
        return readContext(context);
      },
      useCallback: function (callback, deps) {
        currentHookNameInDev = 'useCallback';
        updateHookTypesDev();
        return updateCallback(callback, deps);
      },
      useContext: function (context) {
        currentHookNameInDev = 'useContext';
        updateHookTypesDev();
        return readContext(context);
      },
      useEffect: function (create, deps) {
        currentHookNameInDev = 'useEffect';
        updateHookTypesDev();
        return updateEffect(create, deps);
      },
      useImperativeHandle: function (ref, create, deps) {
        currentHookNameInDev = 'useImperativeHandle';
        updateHookTypesDev();
        return updateImperativeHandle(ref, create, deps);
      },
      useInsertionEffect: function (create, deps) {
        currentHookNameInDev = 'useInsertionEffect';
        updateHookTypesDev();
        return updateInsertionEffect(create, deps);
      },
      useLayoutEffect: function (create, deps) {
        currentHookNameInDev = 'useLayoutEffect';
        updateHookTypesDev();
        return updateLayoutEffect(create, deps);
      },
      useMemo: function (create, deps) {
        currentHookNameInDev = 'useMemo';
        updateHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;

        try {
          return updateMemo(create, deps);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useReducer: function (reducer, initialArg, init) {
        currentHookNameInDev = 'useReducer';
        updateHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;

        try {
          return rerenderReducer(reducer, initialArg, init);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useRef: function (initialValue) {
        currentHookNameInDev = 'useRef';
        updateHookTypesDev();
        return updateRef();
      },
      useState: function (initialState) {
        currentHookNameInDev = 'useState';
        updateHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;

        try {
          return rerenderState(initialState);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useDebugValue: function (value, formatterFn) {
        currentHookNameInDev = 'useDebugValue';
        updateHookTypesDev();
        return updateDebugValue();
      },
      useDeferredValue: function (value) {
        currentHookNameInDev = 'useDeferredValue';
        updateHookTypesDev();
        return rerenderDeferredValue(value);
      },
      useTransition: function () {
        currentHookNameInDev = 'useTransition';
        updateHookTypesDev();
        return rerenderTransition();
      },
      useMutableSource: function (source, getSnapshot, subscribe) {
        currentHookNameInDev = 'useMutableSource';
        updateHookTypesDev();
        return updateMutableSource();
      },
      useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
        currentHookNameInDev = 'useSyncExternalStore';
        updateHookTypesDev();
        return updateSyncExternalStore(subscribe, getSnapshot);
      },
      useId: function () {
        currentHookNameInDev = 'useId';
        updateHookTypesDev();
        return updateId();
      },
      unstable_isNewReconciler: enableNewReconciler
    };

    InvalidNestedHooksDispatcherOnMountInDEV = {
      readContext: function (context) {
        warnInvalidContextAccess();
        return readContext(context);
      },
      useCallback: function (callback, deps) {
        currentHookNameInDev = 'useCallback';
        warnInvalidHookAccess();
        mountHookTypesDev();
        return mountCallback(callback, deps);
      },
      useContext: function (context) {
        currentHookNameInDev = 'useContext';
        warnInvalidHookAccess();
        mountHookTypesDev();
        return readContext(context);
      },
      useEffect: function (create, deps) {
        currentHookNameInDev = 'useEffect';
        warnInvalidHookAccess();
        mountHookTypesDev();
        return mountEffect(create, deps);
      },
      useImperativeHandle: function (ref, create, deps) {
        currentHookNameInDev = 'useImperativeHandle';
        warnInvalidHookAccess();
        mountHookTypesDev();
        return mountImperativeHandle(ref, create, deps);
      },
      useInsertionEffect: function (create, deps) {
        currentHookNameInDev = 'useInsertionEffect';
        warnInvalidHookAccess();
        mountHookTypesDev();
        return mountInsertionEffect(create, deps);
      },
      useLayoutEffect: function (create, deps) {
        currentHookNameInDev = 'useLayoutEffect';
        warnInvalidHookAccess();
        mountHookTypesDev();
        return mountLayoutEffect(create, deps);
      },
      useMemo: function (create, deps) {
        currentHookNameInDev = 'useMemo';
        warnInvalidHookAccess();
        mountHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;

        try {
          return mountMemo(create, deps);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useReducer: function (reducer, initialArg, init) {
        currentHookNameInDev = 'useReducer';
        warnInvalidHookAccess();
        mountHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;

        try {
          return mountReducer(reducer, initialArg, init);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useRef: function (initialValue) {
        currentHookNameInDev = 'useRef';
        warnInvalidHookAccess();
        mountHookTypesDev();
        return mountRef(initialValue);
      },
      useState: function (initialState) {
        currentHookNameInDev = 'useState';
        warnInvalidHookAccess();
        mountHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;

        try {
          return mountState(initialState);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useDebugValue: function (value, formatterFn) {
        currentHookNameInDev = 'useDebugValue';
        warnInvalidHookAccess();
        mountHookTypesDev();
        return mountDebugValue();
      },
      useDeferredValue: function (value) {
        currentHookNameInDev = 'useDeferredValue';
        warnInvalidHookAccess();
        mountHookTypesDev();
        return mountDeferredValue(value);
      },
      useTransition: function () {
        currentHookNameInDev = 'useTransition';
        warnInvalidHookAccess();
        mountHookTypesDev();
        return mountTransition();
      },
      useMutableSource: function (source, getSnapshot, subscribe) {
        currentHookNameInDev = 'useMutableSource';
        warnInvalidHookAccess();
        mountHookTypesDev();
        return mountMutableSource();
      },
      useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
        currentHookNameInDev = 'useSyncExternalStore';
        warnInvalidHookAccess();
        mountHookTypesDev();
        return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
      },
      useId: function () {
        currentHookNameInDev = 'useId';
        warnInvalidHookAccess();
        mountHookTypesDev();
        return mountId();
      },
      unstable_isNewReconciler: enableNewReconciler
    };

    InvalidNestedHooksDispatcherOnUpdateInDEV = {
      readContext: function (context) {
        warnInvalidContextAccess();
        return readContext(context);
      },
      useCallback: function (callback, deps) {
        currentHookNameInDev = 'useCallback';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateCallback(callback, deps);
      },
      useContext: function (context) {
        currentHookNameInDev = 'useContext';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return readContext(context);
      },
      useEffect: function (create, deps) {
        currentHookNameInDev = 'useEffect';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateEffect(create, deps);
      },
      useImperativeHandle: function (ref, create, deps) {
        currentHookNameInDev = 'useImperativeHandle';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateImperativeHandle(ref, create, deps);
      },
      useInsertionEffect: function (create, deps) {
        currentHookNameInDev = 'useInsertionEffect';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateInsertionEffect(create, deps);
      },
      useLayoutEffect: function (create, deps) {
        currentHookNameInDev = 'useLayoutEffect';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateLayoutEffect(create, deps);
      },
      useMemo: function (create, deps) {
        currentHookNameInDev = 'useMemo';
        warnInvalidHookAccess();
        updateHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;

        try {
          return updateMemo(create, deps);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useReducer: function (reducer, initialArg, init) {
        currentHookNameInDev = 'useReducer';
        warnInvalidHookAccess();
        updateHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;

        try {
          return updateReducer(reducer, initialArg, init);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useRef: function (initialValue) {
        currentHookNameInDev = 'useRef';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateRef();
      },
      useState: function (initialState) {
        currentHookNameInDev = 'useState';
        warnInvalidHookAccess();
        updateHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;

        try {
          return updateState(initialState);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useDebugValue: function (value, formatterFn) {
        currentHookNameInDev = 'useDebugValue';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateDebugValue();
      },
      useDeferredValue: function (value) {
        currentHookNameInDev = 'useDeferredValue';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateDeferredValue(value);
      },
      useTransition: function () {
        currentHookNameInDev = 'useTransition';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateTransition();
      },
      useMutableSource: function (source, getSnapshot, subscribe) {
        currentHookNameInDev = 'useMutableSource';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateMutableSource();
      },
      useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
        currentHookNameInDev = 'useSyncExternalStore';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateSyncExternalStore(subscribe, getSnapshot);
      },
      useId: function () {
        currentHookNameInDev = 'useId';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateId();
      },
      unstable_isNewReconciler: enableNewReconciler
    };

    InvalidNestedHooksDispatcherOnRerenderInDEV = {
      readContext: function (context) {
        warnInvalidContextAccess();
        return readContext(context);
      },
      useCallback: function (callback, deps) {
        currentHookNameInDev = 'useCallback';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateCallback(callback, deps);
      },
      useContext: function (context) {
        currentHookNameInDev = 'useContext';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return readContext(context);
      },
      useEffect: function (create, deps) {
        currentHookNameInDev = 'useEffect';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateEffect(create, deps);
      },
      useImperativeHandle: function (ref, create, deps) {
        currentHookNameInDev = 'useImperativeHandle';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateImperativeHandle(ref, create, deps);
      },
      useInsertionEffect: function (create, deps) {
        currentHookNameInDev = 'useInsertionEffect';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateInsertionEffect(create, deps);
      },
      useLayoutEffect: function (create, deps) {
        currentHookNameInDev = 'useLayoutEffect';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateLayoutEffect(create, deps);
      },
      useMemo: function (create, deps) {
        currentHookNameInDev = 'useMemo';
        warnInvalidHookAccess();
        updateHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;

        try {
          return updateMemo(create, deps);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useReducer: function (reducer, initialArg, init) {
        currentHookNameInDev = 'useReducer';
        warnInvalidHookAccess();
        updateHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;

        try {
          return rerenderReducer(reducer, initialArg, init);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useRef: function (initialValue) {
        currentHookNameInDev = 'useRef';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateRef();
      },
      useState: function (initialState) {
        currentHookNameInDev = 'useState';
        warnInvalidHookAccess();
        updateHookTypesDev();
        var prevDispatcher = ReactCurrentDispatcher$1.current;
        ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;

        try {
          return rerenderState(initialState);
        } finally {
          ReactCurrentDispatcher$1.current = prevDispatcher;
        }
      },
      useDebugValue: function (value, formatterFn) {
        currentHookNameInDev = 'useDebugValue';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateDebugValue();
      },
      useDeferredValue: function (value) {
        currentHookNameInDev = 'useDeferredValue';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return rerenderDeferredValue(value);
      },
      useTransition: function () {
        currentHookNameInDev = 'useTransition';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return rerenderTransition();
      },
      useMutableSource: function (source, getSnapshot, subscribe) {
        currentHookNameInDev = 'useMutableSource';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateMutableSource();
      },
      useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
        currentHookNameInDev = 'useSyncExternalStore';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateSyncExternalStore(subscribe, getSnapshot);
      },
      useId: function () {
        currentHookNameInDev = 'useId';
        warnInvalidHookAccess();
        updateHookTypesDev();
        return updateId();
      },
      unstable_isNewReconciler: enableNewReconciler
    };
  }

  var now$1 = unstable_now;
  var commitTime = 0;
  var layoutEffectStartTime = -1;
  var profilerStartTime = -1;
  var passiveEffectStartTime = -1;
  /**
   * Tracks whether the current update was a nested/cascading update (scheduled from a layout effect).
   *
   * The overall sequence is:
   *   1. render
   *   2. commit (and call `onRender`, `onCommit`)
   *   3. check for nested updates
   *   4. flush passive effects (and call `onPostCommit`)
   *
   * Nested updates are identified in step 3 above,
   * but step 4 still applies to the work that was just committed.
   * We use two flags to track nested updates then:
   * one tracks whether the upcoming update is a nested update,
   * and the other tracks whether the current update was a nested update.
   * The first value gets synced to the second at the start of the render phase.
   */

  var currentUpdateIsNested = false;
  var nestedUpdateScheduled = false;

  function isCurrentUpdateNested() {
    return currentUpdateIsNested;
  }

  function markNestedUpdateScheduled() {
    {
      nestedUpdateScheduled = true;
    }
  }

  function resetNestedUpdateFlag() {
    {
      currentUpdateIsNested = false;
      nestedUpdateScheduled = false;
    }
  }

  function syncNestedUpdateFlag() {
    {
      currentUpdateIsNested = nestedUpdateScheduled;
      nestedUpdateScheduled = false;
    }
  }

  function getCommitTime() {
    return commitTime;
  }

  function recordCommitTime() {

    commitTime = now$1();
  }

  function startProfilerTimer(fiber) {

    profilerStartTime = now$1();

    if (fiber.actualStartTime < 0) {
      fiber.actualStartTime = now$1();
    }
  }

  function stopProfilerTimerIfRunning(fiber) {

    profilerStartTime = -1;
  }

  function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {

    if (profilerStartTime >= 0) {
      var elapsedTime = now$1() - profilerStartTime;
      fiber.actualDuration += elapsedTime;

      if (overrideBaseTime) {
        fiber.selfBaseDuration = elapsedTime;
      }

      profilerStartTime = -1;
    }
  }

  function recordLayoutEffectDuration(fiber) {

    if (layoutEffectStartTime >= 0) {
      var elapsedTime = now$1() - layoutEffectStartTime;
      layoutEffectStartTime = -1; // Store duration on the next nearest Profiler ancestor
      // Or the root (for the DevTools Profiler to read)

      var parentFiber = fiber.return;

      while (parentFiber !== null) {
        switch (parentFiber.tag) {
          case HostRoot:
            var root = parentFiber.stateNode;
            root.effectDuration += elapsedTime;
            return;

          case Profiler:
            var parentStateNode = parentFiber.stateNode;
            parentStateNode.effectDuration += elapsedTime;
            return;
        }

        parentFiber = parentFiber.return;
      }
    }
  }

  function recordPassiveEffectDuration(fiber) {

    if (passiveEffectStartTime >= 0) {
      var elapsedTime = now$1() - passiveEffectStartTime;
      passiveEffectStartTime = -1; // Store duration on the next nearest Profiler ancestor
      // Or the root (for the DevTools Profiler to read)

      var parentFiber = fiber.return;

      while (parentFiber !== null) {
        switch (parentFiber.tag) {
          case HostRoot:
            var root = parentFiber.stateNode;

            if (root !== null) {
              root.passiveEffectDuration += elapsedTime;
            }

            return;

          case Profiler:
            var parentStateNode = parentFiber.stateNode;

            if (parentStateNode !== null) {
              // Detached fibers have their state node cleared out.
              // In this case, the return pointer is also cleared out,
              // so we won't be able to report the time spent in this Profiler's subtree.
              parentStateNode.passiveEffectDuration += elapsedTime;
            }

            return;
        }

        parentFiber = parentFiber.return;
      }
    }
  }

  function startLayoutEffectTimer() {

    layoutEffectStartTime = now$1();
  }

  function startPassiveEffectTimer() {

    passiveEffectStartTime = now$1();
  }

  function transferActualDuration(fiber) {
    // Transfer time spent rendering these children so we don't lose it
    // after we rerender. This is used as a helper in special cases
    // where we should count the work of multiple passes.
    var child = fiber.child;

    while (child) {
      fiber.actualDuration += child.actualDuration;
      child = child.sibling;
    }
  }

  function resolveDefaultProps(Component, baseProps) {
    if (Component && Component.defaultProps) {
      // Resolve default props. Taken from ReactElement
      var props = assign({}, baseProps);
      var defaultProps = Component.defaultProps;

      for (var propName in defaultProps) {
        if (props[propName] === undefined) {
          props[propName] = defaultProps[propName];
        }
      }

      return props;
    }

    return baseProps;
  }

  var fakeInternalInstance = {};
  var didWarnAboutStateAssignmentForComponent;
  var didWarnAboutUninitializedState;
  var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;
  var didWarnAboutLegacyLifecyclesAndDerivedState;
  var didWarnAboutUndefinedDerivedState;
  var warnOnUndefinedDerivedState;
  var warnOnInvalidCallback;
  var didWarnAboutDirectlyAssigningPropsToState;
  var didWarnAboutContextTypeAndContextTypes;
  var didWarnAboutInvalidateContextType;
  var didWarnAboutLegacyContext$1;

  {
    didWarnAboutStateAssignmentForComponent = new Set();
    didWarnAboutUninitializedState = new Set();
    didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();
    didWarnAboutLegacyLifecyclesAndDerivedState = new Set();
    didWarnAboutDirectlyAssigningPropsToState = new Set();
    didWarnAboutUndefinedDerivedState = new Set();
    didWarnAboutContextTypeAndContextTypes = new Set();
    didWarnAboutInvalidateContextType = new Set();
    didWarnAboutLegacyContext$1 = new Set();
    var didWarnOnInvalidCallback = new Set();

    warnOnInvalidCallback = function (callback, callerName) {
      if (callback === null || typeof callback === 'function') {
        return;
      }

      var key = callerName + '_' + callback;

      if (!didWarnOnInvalidCallback.has(key)) {
        didWarnOnInvalidCallback.add(key);

        error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
      }
    };

    warnOnUndefinedDerivedState = function (type, partialState) {
      if (partialState === undefined) {
        var componentName = getComponentNameFromType(type) || 'Component';

        if (!didWarnAboutUndefinedDerivedState.has(componentName)) {
          didWarnAboutUndefinedDerivedState.add(componentName);

          error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);
        }
      }
    }; // This is so gross but it's at least non-critical and can be removed if
    // it causes problems. This is meant to give a nicer error message for
    // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,
    // ...)) which otherwise throws a "_processChildContext is not a function"
    // exception.


    Object.defineProperty(fakeInternalInstance, '_processChildContext', {
      enumerable: false,
      value: function () {
        throw new Error('_processChildContext is not available in React 16+. This likely ' + 'means you have multiple copies of React and are attempting to nest ' + 'a React 15 tree inside a React 16 tree using ' + "unstable_renderSubtreeIntoContainer, which isn't supported. Try " + 'to make sure you have only one copy of React (and ideally, switch ' + 'to ReactDOM.createPortal).');
      }
    });
    Object.freeze(fakeInternalInstance);
  }

  function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {
    var prevState = workInProgress.memoizedState;
    var partialState = getDerivedStateFromProps(nextProps, prevState);

    {
      if ( workInProgress.mode & StrictLegacyMode) {
        setIsStrictModeForDevtools(true);

        try {
          // Invoke the function an extra time to help detect side-effects.
          partialState = getDerivedStateFromProps(nextProps, prevState);
        } finally {
          setIsStrictModeForDevtools(false);
        }
      }

      warnOnUndefinedDerivedState(ctor, partialState);
    } // Merge the partial state and the previous state.


    var memoizedState = partialState === null || partialState === undefined ? prevState : assign({}, prevState, partialState);
    workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the
    // base state.

    if (workInProgress.lanes === NoLanes) {
      // Queue is always non-null for classes
      var updateQueue = workInProgress.updateQueue;
      updateQueue.baseState = memoizedState;
    }
  }

  var classComponentUpdater = {
    isMounted: isMounted,
    enqueueSetState: function (inst, payload, callback) {
      var fiber = get(inst);
      var eventTime = requestEventTime();
      var lane = requestUpdateLane(fiber);
      var update = createUpdate(eventTime, lane);
      update.payload = payload;

      if (callback !== undefined && callback !== null) {
        {
          warnOnInvalidCallback(callback, 'setState');
        }

        update.callback = callback;
      }

      var root = enqueueUpdate(fiber, update, lane);

      if (root !== null) {
        scheduleUpdateOnFiber(root, fiber, lane, eventTime);
        entangleTransitions(root, fiber, lane);
      }

      {
        markStateUpdateScheduled(fiber, lane);
      }
    },
    enqueueReplaceState: function (inst, payload, callback) {
      var fiber = get(inst);
      var eventTime = requestEventTime();
      var lane = requestUpdateLane(fiber);
      var update = createUpdate(eventTime, lane);
      update.tag = ReplaceState;
      update.payload = payload;

      if (callback !== undefined && callback !== null) {
        {
          warnOnInvalidCallback(callback, 'replaceState');
        }

        update.callback = callback;
      }

      var root = enqueueUpdate(fiber, update, lane);

      if (root !== null) {
        scheduleUpdateOnFiber(root, fiber, lane, eventTime);
        entangleTransitions(root, fiber, lane);
      }

      {
        markStateUpdateScheduled(fiber, lane);
      }
    },
    enqueueForceUpdate: function (inst, callback) {
      var fiber = get(inst);
      var eventTime = requestEventTime();
      var lane = requestUpdateLane(fiber);
      var update = createUpdate(eventTime, lane);
      update.tag = ForceUpdate;

      if (callback !== undefined && callback !== null) {
        {
          warnOnInvalidCallback(callback, 'forceUpdate');
        }

        update.callback = callback;
      }

      var root = enqueueUpdate(fiber, update, lane);

      if (root !== null) {
        scheduleUpdateOnFiber(root, fiber, lane, eventTime);
        entangleTransitions(root, fiber, lane);
      }

      {
        markForceUpdateScheduled(fiber, lane);
      }
    }
  };

  function checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {
    var instance = workInProgress.stateNode;

    if (typeof instance.shouldComponentUpdate === 'function') {
      var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);

      {
        if ( workInProgress.mode & StrictLegacyMode) {
          setIsStrictModeForDevtools(true);

          try {
            // Invoke the function an extra time to help detect side-effects.
            shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);
          } finally {
            setIsStrictModeForDevtools(false);
          }
        }

        if (shouldUpdate === undefined) {
          error('%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentNameFromType(ctor) || 'Component');
        }
      }

      return shouldUpdate;
    }

    if (ctor.prototype && ctor.prototype.isPureReactComponent) {
      return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);
    }

    return true;
  }

  function checkClassInstance(workInProgress, ctor, newProps) {
    var instance = workInProgress.stateNode;

    {
      var name = getComponentNameFromType(ctor) || 'Component';
      var renderPresent = instance.render;

      if (!renderPresent) {
        if (ctor.prototype && typeof ctor.prototype.render === 'function') {
          error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);
        } else {
          error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);
        }
      }

      if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {
        error('getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name);
      }

      if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {
        error('getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name);
      }

      if (instance.propTypes) {
        error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);
      }

      if (instance.contextType) {
        error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);
      }

      {
        if (ctor.childContextTypes && !didWarnAboutLegacyContext$1.has(ctor) && // Strict Mode has its own warning for legacy context, so we can skip
        // this one.
        (workInProgress.mode & StrictLegacyMode) === NoMode) {
          didWarnAboutLegacyContext$1.add(ctor);

          error('%s uses the legacy childContextTypes API which is no longer ' + 'supported and will be removed in the next major release. Use ' + 'React.createContext() instead\n\n.' + 'Learn more about this warning here: https://reactjs.org/link/legacy-context', name);
        }

        if (ctor.contextTypes && !didWarnAboutLegacyContext$1.has(ctor) && // Strict Mode has its own warning for legacy context, so we can skip
        // this one.
        (workInProgress.mode & StrictLegacyMode) === NoMode) {
          didWarnAboutLegacyContext$1.add(ctor);

          error('%s uses the legacy contextTypes API which is no longer supported ' + 'and will be removed in the next major release. Use ' + 'React.createContext() with static contextType instead.\n\n' + 'Learn more about this warning here: https://reactjs.org/link/legacy-context', name);
        }

        if (instance.contextTypes) {
          error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);
        }

        if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {
          didWarnAboutContextTypeAndContextTypes.add(ctor);

          error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);
        }
      }

      if (typeof instance.componentShouldUpdate === 'function') {
        error('%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name);
      }

      if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {
        error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentNameFromType(ctor) || 'A pure component');
      }

      if (typeof instance.componentDidUnmount === 'function') {
        error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);
      }

      if (typeof instance.componentDidReceiveProps === 'function') {
        error('%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name);
      }

      if (typeof instance.componentWillRecieveProps === 'function') {
        error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);
      }

      if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {
        error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);
      }

      var hasMutatedProps = instance.props !== newProps;

      if (instance.props !== undefined && hasMutatedProps) {
        error('%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name);
      }

      if (instance.defaultProps) {
        error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);
      }

      if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {
        didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);

        error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentNameFromType(ctor));
      }

      if (typeof instance.getDerivedStateFromProps === 'function') {
        error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);
      }

      if (typeof instance.getDerivedStateFromError === 'function') {
        error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);
      }

      if (typeof ctor.getSnapshotBeforeUpdate === 'function') {
        error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);
      }

      var _state = instance.state;

      if (_state && (typeof _state !== 'object' || isArray(_state))) {
        error('%s.state: must be set to an object or null', name);
      }

      if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {
        error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);
      }
    }
  }

  function adoptClassInstance(workInProgress, instance) {
    instance.updater = classComponentUpdater;
    workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates

    set(instance, workInProgress);

    {
      instance._reactInternalInstance = fakeInternalInstance;
    }
  }

  function constructClassInstance(workInProgress, ctor, props) {
    var isLegacyContextConsumer = false;
    var unmaskedContext = emptyContextObject;
    var context = emptyContextObject;
    var contextType = ctor.contextType;

    {
      if ('contextType' in ctor) {
        var isValid = // Allow null for conditional declaration
        contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>

        if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
          didWarnAboutInvalidateContextType.add(ctor);
          var addendum = '';

          if (contextType === undefined) {
            addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';
          } else if (typeof contextType !== 'object') {
            addendum = ' However, it is set to a ' + typeof contextType + '.';
          } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
            addendum = ' Did you accidentally pass the Context.Provider instead?';
          } else if (contextType._context !== undefined) {
            // <Context.Consumer>
            addendum = ' Did you accidentally pass the Context.Consumer instead?';
          } else {
            addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';
          }

          error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentNameFromType(ctor) || 'Component', addendum);
        }
      }
    }

    if (typeof contextType === 'object' && contextType !== null) {
      context = readContext(contextType);
    } else {
      unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
      var contextTypes = ctor.contextTypes;
      isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined;
      context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;
    }

    var instance = new ctor(props, context); // Instantiate twice to help detect side-effects.

    {
      if ( workInProgress.mode & StrictLegacyMode) {
        setIsStrictModeForDevtools(true);

        try {
          instance = new ctor(props, context); // eslint-disable-line no-new
        } finally {
          setIsStrictModeForDevtools(false);
        }
      }
    }

    var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;
    adoptClassInstance(workInProgress, instance);

    {
      if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) {
        var componentName = getComponentNameFromType(ctor) || 'Component';

        if (!didWarnAboutUninitializedState.has(componentName)) {
          didWarnAboutUninitializedState.add(componentName);

          error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName);
        }
      } // If new component APIs are defined, "unsafe" lifecycles won't be called.
      // Warn about these lifecycles if they are present.
      // Don't warn about react-lifecycles-compat polyfilled methods though.


      if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {
        var foundWillMountName = null;
        var foundWillReceivePropsName = null;
        var foundWillUpdateName = null;

        if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {
          foundWillMountName = 'componentWillMount';
        } else if (typeof instance.UNSAFE_componentWillMount === 'function') {
          foundWillMountName = 'UNSAFE_componentWillMount';
        }

        if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
          foundWillReceivePropsName = 'componentWillReceiveProps';
        } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
          foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
        }

        if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
          foundWillUpdateName = 'componentWillUpdate';
        } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
          foundWillUpdateName = 'UNSAFE_componentWillUpdate';
        }

        if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
          var _componentName = getComponentNameFromType(ctor) || 'Component';

          var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';

          if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {
            didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);

            error('Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + 'https://reactjs.org/link/unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? "\n  " + foundWillMountName : '', foundWillReceivePropsName !== null ? "\n  " + foundWillReceivePropsName : '', foundWillUpdateName !== null ? "\n  " + foundWillUpdateName : '');
          }
        }
      }
    } // Cache unmasked context so we can avoid recreating masked context unless necessary.
    // ReactFiberContext usually updates this cache but can't for newly-created instances.


    if (isLegacyContextConsumer) {
      cacheContext(workInProgress, unmaskedContext, context);
    }

    return instance;
  }

  function callComponentWillMount(workInProgress, instance) {
    var oldState = instance.state;

    if (typeof instance.componentWillMount === 'function') {
      instance.componentWillMount();
    }

    if (typeof instance.UNSAFE_componentWillMount === 'function') {
      instance.UNSAFE_componentWillMount();
    }

    if (oldState !== instance.state) {
      {
        error('%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentNameFromFiber(workInProgress) || 'Component');
      }

      classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
    }
  }

  function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {
    var oldState = instance.state;

    if (typeof instance.componentWillReceiveProps === 'function') {
      instance.componentWillReceiveProps(newProps, nextContext);
    }

    if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
      instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
    }

    if (instance.state !== oldState) {
      {
        var componentName = getComponentNameFromFiber(workInProgress) || 'Component';

        if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {
          didWarnAboutStateAssignmentForComponent.add(componentName);

          error('%s.componentWillReceiveProps(): Assigning directly to ' + "this.state is deprecated (except inside a component's " + 'constructor). Use setState instead.', componentName);
        }
      }

      classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
    }
  } // Invokes the mount life-cycles on a previously never rendered instance.


  function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
    {
      checkClassInstance(workInProgress, ctor, newProps);
    }

    var instance = workInProgress.stateNode;
    instance.props = newProps;
    instance.state = workInProgress.memoizedState;
    instance.refs = {};
    initializeUpdateQueue(workInProgress);
    var contextType = ctor.contextType;

    if (typeof contextType === 'object' && contextType !== null) {
      instance.context = readContext(contextType);
    } else {
      var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
      instance.context = getMaskedContext(workInProgress, unmaskedContext);
    }

    {
      if (instance.state === newProps) {
        var componentName = getComponentNameFromType(ctor) || 'Component';

        if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {
          didWarnAboutDirectlyAssigningPropsToState.add(componentName);

          error('%s: It is not recommended to assign props directly to state ' + "because updates to props won't be reflected in state. " + 'In most cases, it is better to use props directly.', componentName);
        }
      }

      if (workInProgress.mode & StrictLegacyMode) {
        ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);
      }

      {
        ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);
      }
    }

    instance.state = workInProgress.memoizedState;
    var getDerivedStateFromProps = ctor.getDerivedStateFromProps;

    if (typeof getDerivedStateFromProps === 'function') {
      applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
      instance.state = workInProgress.memoizedState;
    } // In order to support react-lifecycles-compat polyfilled components,
    // Unsafe lifecycles should not be invoked for components using the new APIs.


    if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
      callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's
      // process them now.

      processUpdateQueue(workInProgress, newProps, instance, renderLanes);
      instance.state = workInProgress.memoizedState;
    }

    if (typeof instance.componentDidMount === 'function') {
      var fiberFlags = Update;

      {
        fiberFlags |= LayoutStatic;
      }

      if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {
        fiberFlags |= MountLayoutDev;
      }

      workInProgress.flags |= fiberFlags;
    }
  }

  function resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {
    var instance = workInProgress.stateNode;
    var oldProps = workInProgress.memoizedProps;
    instance.props = oldProps;
    var oldContext = instance.context;
    var contextType = ctor.contextType;
    var nextContext = emptyContextObject;

    if (typeof contextType === 'object' && contextType !== null) {
      nextContext = readContext(contextType);
    } else {
      var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
      nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);
    }

    var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
    var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what
    // ever the previously attempted to render - not the "current". However,
    // during componentDidUpdate we pass the "current" props.
    // In order to support react-lifecycles-compat polyfilled components,
    // Unsafe lifecycles should not be invoked for components using the new APIs.

    if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
      if (oldProps !== newProps || oldContext !== nextContext) {
        callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
      }
    }

    resetHasForceUpdateBeforeProcessing();
    var oldState = workInProgress.memoizedState;
    var newState = instance.state = oldState;
    processUpdateQueue(workInProgress, newProps, instance, renderLanes);
    newState = workInProgress.memoizedState;

    if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
      // If an update was already in progress, we should schedule an Update
      // effect even though we're bailing out, so that cWU/cDU are called.
      if (typeof instance.componentDidMount === 'function') {
        var fiberFlags = Update;

        {
          fiberFlags |= LayoutStatic;
        }

        if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {
          fiberFlags |= MountLayoutDev;
        }

        workInProgress.flags |= fiberFlags;
      }

      return false;
    }

    if (typeof getDerivedStateFromProps === 'function') {
      applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
      newState = workInProgress.memoizedState;
    }

    var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);

    if (shouldUpdate) {
      // In order to support react-lifecycles-compat polyfilled components,
      // Unsafe lifecycles should not be invoked for components using the new APIs.
      if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
        if (typeof instance.componentWillMount === 'function') {
          instance.componentWillMount();
        }

        if (typeof instance.UNSAFE_componentWillMount === 'function') {
          instance.UNSAFE_componentWillMount();
        }
      }

      if (typeof instance.componentDidMount === 'function') {
        var _fiberFlags = Update;

        {
          _fiberFlags |= LayoutStatic;
        }

        if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {
          _fiberFlags |= MountLayoutDev;
        }

        workInProgress.flags |= _fiberFlags;
      }
    } else {
      // If an update was already in progress, we should schedule an Update
      // effect even though we're bailing out, so that cWU/cDU are called.
      if (typeof instance.componentDidMount === 'function') {
        var _fiberFlags2 = Update;

        {
          _fiberFlags2 |= LayoutStatic;
        }

        if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {
          _fiberFlags2 |= MountLayoutDev;
        }

        workInProgress.flags |= _fiberFlags2;
      } // If shouldComponentUpdate returned false, we should still update the
      // memoized state to indicate that this work can be reused.


      workInProgress.memoizedProps = newProps;
      workInProgress.memoizedState = newState;
    } // Update the existing instance's state, props, and context pointers even
    // if shouldComponentUpdate returns false.


    instance.props = newProps;
    instance.state = newState;
    instance.context = nextContext;
    return shouldUpdate;
  } // Invokes the update life-cycles and returns false if it shouldn't rerender.


  function updateClassInstance(current, workInProgress, ctor, newProps, renderLanes) {
    var instance = workInProgress.stateNode;
    cloneUpdateQueue(current, workInProgress);
    var unresolvedOldProps = workInProgress.memoizedProps;
    var oldProps = workInProgress.type === workInProgress.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress.type, unresolvedOldProps);
    instance.props = oldProps;
    var unresolvedNewProps = workInProgress.pendingProps;
    var oldContext = instance.context;
    var contextType = ctor.contextType;
    var nextContext = emptyContextObject;

    if (typeof contextType === 'object' && contextType !== null) {
      nextContext = readContext(contextType);
    } else {
      var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
      nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);
    }

    var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
    var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what
    // ever the previously attempted to render - not the "current". However,
    // during componentDidUpdate we pass the "current" props.
    // In order to support react-lifecycles-compat polyfilled components,
    // Unsafe lifecycles should not be invoked for components using the new APIs.

    if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
      if (unresolvedOldProps !== unresolvedNewProps || oldContext !== nextContext) {
        callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
      }
    }

    resetHasForceUpdateBeforeProcessing();
    var oldState = workInProgress.memoizedState;
    var newState = instance.state = oldState;
    processUpdateQueue(workInProgress, newProps, instance, renderLanes);
    newState = workInProgress.memoizedState;

    if (unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing() && !(enableLazyContextPropagation   )) {
      // If an update was already in progress, we should schedule an Update
      // effect even though we're bailing out, so that cWU/cDU are called.
      if (typeof instance.componentDidUpdate === 'function') {
        if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
          workInProgress.flags |= Update;
        }
      }

      if (typeof instance.getSnapshotBeforeUpdate === 'function') {
        if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
          workInProgress.flags |= Snapshot;
        }
      }

      return false;
    }

    if (typeof getDerivedStateFromProps === 'function') {
      applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
      newState = workInProgress.memoizedState;
    }

    var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) || // TODO: In some cases, we'll end up checking if context has changed twice,
    // both before and after `shouldComponentUpdate` has been called. Not ideal,
    // but I'm loath to refactor this function. This only happens for memoized
    // components so it's not that common.
    enableLazyContextPropagation   ;

    if (shouldUpdate) {
      // In order to support react-lifecycles-compat polyfilled components,
      // Unsafe lifecycles should not be invoked for components using the new APIs.
      if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {
        if (typeof instance.componentWillUpdate === 'function') {
          instance.componentWillUpdate(newProps, newState, nextContext);
        }

        if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
          instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);
        }
      }

      if (typeof instance.componentDidUpdate === 'function') {
        workInProgress.flags |= Update;
      }

      if (typeof instance.getSnapshotBeforeUpdate === 'function') {
        workInProgress.flags |= Snapshot;
      }
    } else {
      // If an update was already in progress, we should schedule an Update
      // effect even though we're bailing out, so that cWU/cDU are called.
      if (typeof instance.componentDidUpdate === 'function') {
        if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
          workInProgress.flags |= Update;
        }
      }

      if (typeof instance.getSnapshotBeforeUpdate === 'function') {
        if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
          workInProgress.flags |= Snapshot;
        }
      } // If shouldComponentUpdate returned false, we should still update the
      // memoized props/state to indicate that this work can be reused.


      workInProgress.memoizedProps = newProps;
      workInProgress.memoizedState = newState;
    } // Update the existing instance's state, props, and context pointers even
    // if shouldComponentUpdate returns false.


    instance.props = newProps;
    instance.state = newState;
    instance.context = nextContext;
    return shouldUpdate;
  }

  function createCapturedValueAtFiber(value, source) {
    // If the value is an error, call this function immediately after it is thrown
    // so the stack is accurate.
    return {
      value: value,
      source: source,
      stack: getStackByFiberInDevAndProd(source),
      digest: null
    };
  }
  function createCapturedValue(value, digest, stack) {
    return {
      value: value,
      source: null,
      stack: stack != null ? stack : null,
      digest: digest != null ? digest : null
    };
  }

  // This module is forked in different environments.
  // By default, return `true` to log errors to the console.
  // Forks can return `false` if this isn't desirable.
  function showErrorDialog(boundary, errorInfo) {
    return true;
  }

  function logCapturedError(boundary, errorInfo) {
    try {
      var logError = showErrorDialog(boundary, errorInfo); // Allow injected showErrorDialog() to prevent default console.error logging.
      // This enables renderers like ReactNative to better manage redbox behavior.

      if (logError === false) {
        return;
      }

      var error = errorInfo.value;

      if (true) {
        var source = errorInfo.source;
        var stack = errorInfo.stack;
        var componentStack = stack !== null ? stack : ''; // Browsers support silencing uncaught errors by calling
        // `preventDefault()` in window `error` handler.
        // We record this information as an expando on the error.

        if (error != null && error._suppressLogging) {
          if (boundary.tag === ClassComponent) {
            // The error is recoverable and was silenced.
            // Ignore it and don't print the stack addendum.
            // This is handy for testing error boundaries without noise.
            return;
          } // The error is fatal. Since the silencing might have
          // been accidental, we'll surface it anyway.
          // However, the browser would have silenced the original error
          // so we'll print it first, and then print the stack addendum.


          console['error'](error); // Don't transform to our wrapper
          // For a more detailed description of this block, see:
          // https://github.com/facebook/react/pull/13384
        }

        var componentName = source ? getComponentNameFromFiber(source) : null;
        var componentNameMessage = componentName ? "The above error occurred in the <" + componentName + "> component:" : 'The above error occurred in one of your React components:';
        var errorBoundaryMessage;

        if (boundary.tag === HostRoot) {
          errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.';
        } else {
          var errorBoundaryName = getComponentNameFromFiber(boundary) || 'Anonymous';
          errorBoundaryMessage = "React will try to recreate this component tree from scratch " + ("using the error boundary you provided, " + errorBoundaryName + ".");
        }

        var combinedMessage = componentNameMessage + "\n" + componentStack + "\n\n" + ("" + errorBoundaryMessage); // In development, we provide our own message with just the component stack.
        // We don't include the original error message and JS stack because the browser
        // has already printed it. Even if the application swallows the error, it is still
        // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.

        console['error'](combinedMessage); // Don't transform to our wrapper
      } else {
        // In production, we print the error directly.
        // This will include the message, the JS stack, and anything the browser wants to show.
        // We pass the error object instead of custom message so that the browser displays the error natively.
        console['error'](error); // Don't transform to our wrapper
      }
    } catch (e) {
      // This method must not throw, or React internal state will get messed up.
      // If console.error is overridden, or logCapturedError() shows a dialog that throws,
      // we want to report this error outside of the normal stack as a last resort.
      // https://github.com/facebook/react/issues/13188
      setTimeout(function () {
        throw e;
      });
    }
  }

  var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;

  function createRootErrorUpdate(fiber, errorInfo, lane) {
    var update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null.

    update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property
    // being called "element".

    update.payload = {
      element: null
    };
    var error = errorInfo.value;

    update.callback = function () {
      onUncaughtError(error);
      logCapturedError(fiber, errorInfo);
    };

    return update;
  }

  function createClassErrorUpdate(fiber, errorInfo, lane) {
    var update = createUpdate(NoTimestamp, lane);
    update.tag = CaptureUpdate;
    var getDerivedStateFromError = fiber.type.getDerivedStateFromError;

    if (typeof getDerivedStateFromError === 'function') {
      var error$1 = errorInfo.value;

      update.payload = function () {
        return getDerivedStateFromError(error$1);
      };

      update.callback = function () {
        {
          markFailedErrorBoundaryForHotReloading(fiber);
        }

        logCapturedError(fiber, errorInfo);
      };
    }

    var inst = fiber.stateNode;

    if (inst !== null && typeof inst.componentDidCatch === 'function') {
      update.callback = function callback() {
        {
          markFailedErrorBoundaryForHotReloading(fiber);
        }

        logCapturedError(fiber, errorInfo);

        if (typeof getDerivedStateFromError !== 'function') {
          // To preserve the preexisting retry behavior of error boundaries,
          // we keep track of which ones already failed during this batch.
          // This gets reset before we yield back to the browser.
          // TODO: Warn in strict mode if getDerivedStateFromError is
          // not defined.
          markLegacyErrorBoundaryAsFailed(this);
        }

        var error$1 = errorInfo.value;
        var stack = errorInfo.stack;
        this.componentDidCatch(error$1, {
          componentStack: stack !== null ? stack : ''
        });

        {
          if (typeof getDerivedStateFromError !== 'function') {
            // If componentDidCatch is the only error boundary method defined,
            // then it needs to call setState to recover from errors.
            // If no state update is scheduled then the boundary will swallow the error.
            if (!includesSomeLane(fiber.lanes, SyncLane)) {
              error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentNameFromFiber(fiber) || 'Unknown');
            }
          }
        }
      };
    }

    return update;
  }

  function attachPingListener(root, wakeable, lanes) {
    // Attach a ping listener
    //
    // The data might resolve before we have a chance to commit the fallback. Or,
    // in the case of a refresh, we'll never commit a fallback. So we need to
    // attach a listener now. When it resolves ("pings"), we can decide whether to
    // try rendering the tree again.
    //
    // Only attach a listener if one does not already exist for the lanes
    // we're currently rendering (which acts like a "thread ID" here).
    //
    // We only need to do this in concurrent mode. Legacy Suspense always
    // commits fallbacks synchronously, so there are no pings.
    var pingCache = root.pingCache;
    var threadIDs;

    if (pingCache === null) {
      pingCache = root.pingCache = new PossiblyWeakMap$1();
      threadIDs = new Set();
      pingCache.set(wakeable, threadIDs);
    } else {
      threadIDs = pingCache.get(wakeable);

      if (threadIDs === undefined) {
        threadIDs = new Set();
        pingCache.set(wakeable, threadIDs);
      }
    }

    if (!threadIDs.has(lanes)) {
      // Memoize using the thread ID to prevent redundant listeners.
      threadIDs.add(lanes);
      var ping = pingSuspendedRoot.bind(null, root, wakeable, lanes);

      {
        if (isDevToolsPresent) {
          // If we have pending work still, restore the original updaters
          restorePendingUpdaters(root, lanes);
        }
      }

      wakeable.then(ping, ping);
    }
  }

  function attachRetryListener(suspenseBoundary, root, wakeable, lanes) {
    // Retry listener
    //
    // If the fallback does commit, we need to attach a different type of
    // listener. This one schedules an update on the Suspense boundary to turn
    // the fallback state off.
    //
    // Stash the wakeable on the boundary fiber so we can access it in the
    // commit phase.
    //
    // When the wakeable resolves, we'll attempt to render the boundary
    // again ("retry").
    var wakeables = suspenseBoundary.updateQueue;

    if (wakeables === null) {
      var updateQueue = new Set();
      updateQueue.add(wakeable);
      suspenseBoundary.updateQueue = updateQueue;
    } else {
      wakeables.add(wakeable);
    }
  }

  function resetSuspendedComponent(sourceFiber, rootRenderLanes) {
    // A legacy mode Suspense quirk, only relevant to hook components.


    var tag = sourceFiber.tag;

    if ((sourceFiber.mode & ConcurrentMode) === NoMode && (tag === FunctionComponent || tag === ForwardRef || tag === SimpleMemoComponent)) {
      var currentSource = sourceFiber.alternate;

      if (currentSource) {
        sourceFiber.updateQueue = currentSource.updateQueue;
        sourceFiber.memoizedState = currentSource.memoizedState;
        sourceFiber.lanes = currentSource.lanes;
      } else {
        sourceFiber.updateQueue = null;
        sourceFiber.memoizedState = null;
      }
    }
  }

  function getNearestSuspenseBoundaryToCapture(returnFiber) {
    var node = returnFiber;

    do {
      if (node.tag === SuspenseComponent && shouldCaptureSuspense(node)) {
        return node;
      } // This boundary already captured during this render. Continue to the next
      // boundary.


      node = node.return;
    } while (node !== null);

    return null;
  }

  function markSuspenseBoundaryShouldCapture(suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes) {
    // This marks a Suspense boundary so that when we're unwinding the stack,
    // it captures the suspended "exception" and does a second (fallback) pass.
    if ((suspenseBoundary.mode & ConcurrentMode) === NoMode) {
      // Legacy Mode Suspense
      //
      // If the boundary is in legacy mode, we should *not*
      // suspend the commit. Pretend as if the suspended component rendered
      // null and keep rendering. When the Suspense boundary completes,
      // we'll do a second pass to render the fallback.
      if (suspenseBoundary === returnFiber) {
        // Special case where we suspended while reconciling the children of
        // a Suspense boundary's inner Offscreen wrapper fiber. This happens
        // when a React.lazy component is a direct child of a
        // Suspense boundary.
        //
        // Suspense boundaries are implemented as multiple fibers, but they
        // are a single conceptual unit. The legacy mode behavior where we
        // pretend the suspended fiber committed as `null` won't work,
        // because in this case the "suspended" fiber is the inner
        // Offscreen wrapper.
        //
        // Because the contents of the boundary haven't started rendering
        // yet (i.e. nothing in the tree has partially rendered) we can
        // switch to the regular, concurrent mode behavior: mark the
        // boundary with ShouldCapture and enter the unwind phase.
        suspenseBoundary.flags |= ShouldCapture;
      } else {
        suspenseBoundary.flags |= DidCapture;
        sourceFiber.flags |= ForceUpdateForLegacySuspense; // We're going to commit this fiber even though it didn't complete.
        // But we shouldn't call any lifecycle methods or callbacks. Remove
        // all lifecycle effect tags.

        sourceFiber.flags &= ~(LifecycleEffectMask | Incomplete);

        if (sourceFiber.tag === ClassComponent) {
          var currentSourceFiber = sourceFiber.alternate;

          if (currentSourceFiber === null) {
            // This is a new mount. Change the tag so it's not mistaken for a
            // completed class component. For example, we should not call
            // componentWillUnmount if it is deleted.
            sourceFiber.tag = IncompleteClassComponent;
          } else {
            // When we try rendering again, we should not reuse the current fiber,
            // since it's known to be in an inconsistent state. Use a force update to
            // prevent a bail out.
            var update = createUpdate(NoTimestamp, SyncLane);
            update.tag = ForceUpdate;
            enqueueUpdate(sourceFiber, update, SyncLane);
          }
        } // The source fiber did not complete. Mark it with Sync priority to
        // indicate that it still has pending work.


        sourceFiber.lanes = mergeLanes(sourceFiber.lanes, SyncLane);
      }

      return suspenseBoundary;
    } // Confirmed that the boundary is in a concurrent mode tree. Continue
    // with the normal suspend path.
    //
    // After this we'll use a set of heuristics to determine whether this
    // render pass will run to completion or restart or "suspend" the commit.
    // The actual logic for this is spread out in different places.
    //
    // This first principle is that if we're going to suspend when we complete
    // a root, then we should also restart if we get an update or ping that
    // might unsuspend it, and vice versa. The only reason to suspend is
    // because you think you might want to restart before committing. However,
    // it doesn't make sense to restart only while in the period we're suspended.
    //
    // Restarting too aggressively is also not good because it starves out any
    // intermediate loading state. So we use heuristics to determine when.
    // Suspense Heuristics
    //
    // If nothing threw a Promise or all the same fallbacks are already showing,
    // then don't suspend/restart.
    //
    // If this is an initial render of a new tree of Suspense boundaries and
    // those trigger a fallback, then don't suspend/restart. We want to ensure
    // that we can show the initial loading state as quickly as possible.
    //
    // If we hit a "Delayed" case, such as when we'd switch from content back into
    // a fallback, then we should always suspend/restart. Transitions apply
    // to this case. If none is defined, JND is used instead.
    //
    // If we're already showing a fallback and it gets "retried", allowing us to show
    // another level, but there's still an inner boundary that would show a fallback,
    // then we suspend/restart for 500ms since the last time we showed a fallback
    // anywhere in the tree. This effectively throttles progressive loading into a
    // consistent train of commits. This also gives us an opportunity to restart to
    // get to the completed state slightly earlier.
    //
    // If there's ambiguity due to batching it's resolved in preference of:
    // 1) "delayed", 2) "initial render", 3) "retry".
    //
    // We want to ensure that a "busy" state doesn't get force committed. We want to
    // ensure that new initial loading states can commit as soon as possible.


    suspenseBoundary.flags |= ShouldCapture; // TODO: I think we can remove this, since we now use `DidCapture` in
    // the begin phase to prevent an early bailout.

    suspenseBoundary.lanes = rootRenderLanes;
    return suspenseBoundary;
  }

  function throwException(root, returnFiber, sourceFiber, value, rootRenderLanes) {
    // The source fiber did not complete.
    sourceFiber.flags |= Incomplete;

    {
      if (isDevToolsPresent) {
        // If we have pending work still, restore the original updaters
        restorePendingUpdaters(root, rootRenderLanes);
      }
    }

    if (value !== null && typeof value === 'object' && typeof value.then === 'function') {
      // This is a wakeable. The component suspended.
      var wakeable = value;
      resetSuspendedComponent(sourceFiber);

      {
        if (getIsHydrating() && sourceFiber.mode & ConcurrentMode) {
          markDidThrowWhileHydratingDEV();
        }
      }


      var suspenseBoundary = getNearestSuspenseBoundaryToCapture(returnFiber);

      if (suspenseBoundary !== null) {
        suspenseBoundary.flags &= ~ForceClientRender;
        markSuspenseBoundaryShouldCapture(suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes); // We only attach ping listeners in concurrent mode. Legacy Suspense always
        // commits fallbacks synchronously, so there are no pings.

        if (suspenseBoundary.mode & ConcurrentMode) {
          attachPingListener(root, wakeable, rootRenderLanes);
        }

        attachRetryListener(suspenseBoundary, root, wakeable);
        return;
      } else {
        // No boundary was found. Unless this is a sync update, this is OK.
        // We can suspend and wait for more data to arrive.
        if (!includesSyncLane(rootRenderLanes)) {
          // This is not a sync update. Suspend. Since we're not activating a
          // Suspense boundary, this will unwind all the way to the root without
          // performing a second pass to render a fallback. (This is arguably how
          // refresh transitions should work, too, since we're not going to commit
          // the fallbacks anyway.)
          //
          // This case also applies to initial hydration.
          attachPingListener(root, wakeable, rootRenderLanes);
          renderDidSuspendDelayIfPossible();
          return;
        } // This is a sync/discrete update. We treat this case like an error
        // because discrete renders are expected to produce a complete tree
        // synchronously to maintain consistency with external state.


        var uncaughtSuspenseError = new Error('A component suspended while responding to synchronous input. This ' + 'will cause the UI to be replaced with a loading indicator. To ' + 'fix, updates that suspend should be wrapped ' + 'with startTransition.'); // If we're outside a transition, fall through to the regular error path.
        // The error will be caught by the nearest suspense boundary.

        value = uncaughtSuspenseError;
      }
    } else {
      // This is a regular error, not a Suspense wakeable.
      if (getIsHydrating() && sourceFiber.mode & ConcurrentMode) {
        markDidThrowWhileHydratingDEV();

        var _suspenseBoundary = getNearestSuspenseBoundaryToCapture(returnFiber); // If the error was thrown during hydration, we may be able to recover by
        // discarding the dehydrated content and switching to a client render.
        // Instead of surfacing the error, find the nearest Suspense boundary
        // and render it again without hydration.


        if (_suspenseBoundary !== null) {
          if ((_suspenseBoundary.flags & ShouldCapture) === NoFlags) {
            // Set a flag to indicate that we should try rendering the normal
            // children again, not the fallback.
            _suspenseBoundary.flags |= ForceClientRender;
          }

          markSuspenseBoundaryShouldCapture(_suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes); // Even though the user may not be affected by this error, we should
          // still log it so it can be fixed.

          queueHydrationError(createCapturedValueAtFiber(value, sourceFiber));
          return;
        }
      }
    }

    value = createCapturedValueAtFiber(value, sourceFiber);
    renderDidError(value); // We didn't find a boundary that could handle this type of exception. Start
    // over and traverse parent path again, this time treating the exception
    // as an error.

    var workInProgress = returnFiber;

    do {
      switch (workInProgress.tag) {
        case HostRoot:
          {
            var _errorInfo = value;
            workInProgress.flags |= ShouldCapture;
            var lane = pickArbitraryLane(rootRenderLanes);
            workInProgress.lanes = mergeLanes(workInProgress.lanes, lane);
            var update = createRootErrorUpdate(workInProgress, _errorInfo, lane);
            enqueueCapturedUpdate(workInProgress, update);
            return;
          }

        case ClassComponent:
          // Capture and retry
          var errorInfo = value;
          var ctor = workInProgress.type;
          var instance = workInProgress.stateNode;

          if ((workInProgress.flags & DidCapture) === NoFlags && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {
            workInProgress.flags |= ShouldCapture;

            var _lane = pickArbitraryLane(rootRenderLanes);

            workInProgress.lanes = mergeLanes(workInProgress.lanes, _lane); // Schedule the error boundary to re-render using updated state

            var _update = createClassErrorUpdate(workInProgress, errorInfo, _lane);

            enqueueCapturedUpdate(workInProgress, _update);
            return;
          }

          break;
      }

      workInProgress = workInProgress.return;
    } while (workInProgress !== null);
  }

  function getSuspendedCache() {
    {
      return null;
    } // This function is called when a Suspense boundary suspends. It returns the
  }

  var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
  var didReceiveUpdate = false;
  var didWarnAboutBadClass;
  var didWarnAboutModulePatternComponent;
  var didWarnAboutContextTypeOnFunctionComponent;
  var didWarnAboutGetDerivedStateOnFunctionComponent;
  var didWarnAboutFunctionRefs;
  var didWarnAboutReassigningProps;
  var didWarnAboutRevealOrder;
  var didWarnAboutTailOptions;
  var didWarnAboutDefaultPropsOnFunctionComponent;

  {
    didWarnAboutBadClass = {};
    didWarnAboutModulePatternComponent = {};
    didWarnAboutContextTypeOnFunctionComponent = {};
    didWarnAboutGetDerivedStateOnFunctionComponent = {};
    didWarnAboutFunctionRefs = {};
    didWarnAboutReassigningProps = false;
    didWarnAboutRevealOrder = {};
    didWarnAboutTailOptions = {};
    didWarnAboutDefaultPropsOnFunctionComponent = {};
  }

  function reconcileChildren(current, workInProgress, nextChildren, renderLanes) {
    if (current === null) {
      // If this is a fresh new component that hasn't been rendered yet, we
      // won't update its child set by applying minimal side-effects. Instead,
      // we will add them all to the child before it gets rendered. That means
      // we can optimize this reconciliation pass by not tracking side-effects.
      workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);
    } else {
      // If the current child is the same as the work in progress, it means that
      // we haven't yet started any work on these children. Therefore, we use
      // the clone algorithm to create a copy of all the current children.
      // If we had any progressed work already, that is invalid at this point so
      // let's throw it out.
      workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderLanes);
    }
  }

  function forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes) {
    // This function is fork of reconcileChildren. It's used in cases where we
    // want to reconcile without matching against the existing set. This has the
    // effect of all current children being unmounted; even if the type and key
    // are the same, the old child is unmounted and a new child is created.
    //
    // To do this, we're going to go through the reconcile algorithm twice. In
    // the first pass, we schedule a deletion for all the current children by
    // passing null.
    workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderLanes); // In the second pass, we mount the new children. The trick here is that we
    // pass null in place of where we usually pass the current child set. This has
    // the effect of remounting all children regardless of whether their
    // identities match.

    workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);
  }

  function updateForwardRef(current, workInProgress, Component, nextProps, renderLanes) {
    // TODO: current can be non-null here even if the component
    // hasn't yet mounted. This happens after the first render suspends.
    // We'll need to figure out if this is fine or can cause issues.
    {
      if (workInProgress.type !== workInProgress.elementType) {
        // Lazy component props can't be validated in createElement
        // because they're only guaranteed to be resolved here.
        var innerPropTypes = Component.propTypes;

        if (innerPropTypes) {
          checkPropTypes(innerPropTypes, nextProps, // Resolved props
          'prop', getComponentNameFromType(Component));
        }
      }
    }

    var render = Component.render;
    var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent

    var nextChildren;
    var hasId;
    prepareToReadContext(workInProgress, renderLanes);

    {
      markComponentRenderStarted(workInProgress);
    }

    {
      ReactCurrentOwner$1.current = workInProgress;
      setIsRendering(true);
      nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);
      hasId = checkDidRenderIdHook();

      if ( workInProgress.mode & StrictLegacyMode) {
        setIsStrictModeForDevtools(true);

        try {
          nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);
          hasId = checkDidRenderIdHook();
        } finally {
          setIsStrictModeForDevtools(false);
        }
      }

      setIsRendering(false);
    }

    {
      markComponentRenderStopped();
    }

    if (current !== null && !didReceiveUpdate) {
      bailoutHooks(current, workInProgress, renderLanes);
      return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
    }

    if (getIsHydrating() && hasId) {
      pushMaterializedTreeId(workInProgress);
    } // React DevTools reads this flag.


    workInProgress.flags |= PerformedWork;
    reconcileChildren(current, workInProgress, nextChildren, renderLanes);
    return workInProgress.child;
  }

  function updateMemoComponent(current, workInProgress, Component, nextProps, renderLanes) {
    if (current === null) {
      var type = Component.type;

      if (isSimpleFunctionComponent(type) && Component.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either.
      Component.defaultProps === undefined) {
        var resolvedType = type;

        {
          resolvedType = resolveFunctionForHotReloading(type);
        } // If this is a plain function component without default props,
        // and with only the default shallow comparison, we upgrade it
        // to a SimpleMemoComponent to allow fast path updates.


        workInProgress.tag = SimpleMemoComponent;
        workInProgress.type = resolvedType;

        {
          validateFunctionComponentInDev(workInProgress, type);
        }

        return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, renderLanes);
      }

      {
        var innerPropTypes = type.propTypes;

        if (innerPropTypes) {
          // Inner memo component props aren't currently validated in createElement.
          // We could move it there, but we'd still need this for lazy code path.
          checkPropTypes(innerPropTypes, nextProps, // Resolved props
          'prop', getComponentNameFromType(type));
        }

        if ( Component.defaultProps !== undefined) {
          var componentName = getComponentNameFromType(type) || 'Unknown';

          if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) {
            error('%s: Support for defaultProps will be removed from memo components ' + 'in a future major release. Use JavaScript default parameters instead.', componentName);

            didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true;
          }
        }
      }

      var child = createFiberFromTypeAndProps(Component.type, null, nextProps, workInProgress, workInProgress.mode, renderLanes);
      child.ref = workInProgress.ref;
      child.return = workInProgress;
      workInProgress.child = child;
      return child;
    }

    {
      var _type = Component.type;
      var _innerPropTypes = _type.propTypes;

      if (_innerPropTypes) {
        // Inner memo component props aren't currently validated in createElement.
        // We could move it there, but we'd still need this for lazy code path.
        checkPropTypes(_innerPropTypes, nextProps, // Resolved props
        'prop', getComponentNameFromType(_type));
      }
    }

    var currentChild = current.child; // This is always exactly one child

    var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(current, renderLanes);

    if (!hasScheduledUpdateOrContext) {
      // This will be the props with resolved defaultProps,
      // unlike current.memoizedProps which will be the unresolved ones.
      var prevProps = currentChild.memoizedProps; // Default to shallow comparison

      var compare = Component.compare;
      compare = compare !== null ? compare : shallowEqual;

      if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) {
        return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
      }
    } // React DevTools reads this flag.


    workInProgress.flags |= PerformedWork;
    var newChild = createWorkInProgress(currentChild, nextProps);
    newChild.ref = workInProgress.ref;
    newChild.return = workInProgress;
    workInProgress.child = newChild;
    return newChild;
  }

  function updateSimpleMemoComponent(current, workInProgress, Component, nextProps, renderLanes) {
    // TODO: current can be non-null here even if the component
    // hasn't yet mounted. This happens when the inner render suspends.
    // We'll need to figure out if this is fine or can cause issues.
    {
      if (workInProgress.type !== workInProgress.elementType) {
        // Lazy component props can't be validated in createElement
        // because they're only guaranteed to be resolved here.
        var outerMemoType = workInProgress.elementType;

        if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {
          // We warn when you define propTypes on lazy()
          // so let's just skip over it to find memo() outer wrapper.
          // Inner props for memo are validated later.
          var lazyComponent = outerMemoType;
          var payload = lazyComponent._payload;
          var init = lazyComponent._init;

          try {
            outerMemoType = init(payload);
          } catch (x) {
            outerMemoType = null;
          } // Inner propTypes will be validated in the function component path.


          var outerPropTypes = outerMemoType && outerMemoType.propTypes;

          if (outerPropTypes) {
            checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)
            'prop', getComponentNameFromType(outerMemoType));
          }
        }
      }
    }

    if (current !== null) {
      var prevProps = current.memoizedProps;

      if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress.ref && ( // Prevent bailout if the implementation changed due to hot reload.
       workInProgress.type === current.type )) {
        didReceiveUpdate = false; // The props are shallowly equal. Reuse the previous props object, like we
        // would during a normal fiber bailout.
        //
        // We don't have strong guarantees that the props object is referentially
        // equal during updates where we can't bail out anyway â€” like if the props
        // are shallowly equal, but there's a local state or context update in the
        // same batch.
        //
        // However, as a principle, we should aim to make the behavior consistent
        // across different ways of memoizing a component. For example, React.memo
        // has a different internal Fiber layout if you pass a normal function
        // component (SimpleMemoComponent) versus if you pass a different type
        // like forwardRef (MemoComponent). But this is an implementation detail.
        // Wrapping a component in forwardRef (or React.lazy, etc) shouldn't
        // affect whether the props object is reused during a bailout.

        workInProgress.pendingProps = nextProps = prevProps;

        if (!checkScheduledUpdateOrContext(current, renderLanes)) {
          // The pending lanes were cleared at the beginning of beginWork. We're
          // about to bail out, but there might be other lanes that weren't
          // included in the current render. Usually, the priority level of the
          // remaining updates is accumulated during the evaluation of the
          // component (i.e. when processing the update queue). But since since
          // we're bailing out early *without* evaluating the component, we need
          // to account for it here, too. Reset to the value of the current fiber.
          // NOTE: This only applies to SimpleMemoComponent, not MemoComponent,
          // because a MemoComponent fiber does not have hooks or an update queue;
          // rather, it wraps around an inner component, which may or may not
          // contains hooks.
          // TODO: Move the reset at in beginWork out of the common path so that
          // this is no longer necessary.
          workInProgress.lanes = current.lanes;
          return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
        } else if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {
          // This is a special case that only exists for legacy mode.
          // See https://github.com/facebook/react/pull/19216.
          didReceiveUpdate = true;
        }
      }
    }

    return updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes);
  }

  function updateOffscreenComponent(current, workInProgress, renderLanes) {
    var nextProps = workInProgress.pendingProps;
    var nextChildren = nextProps.children;
    var prevState = current !== null ? current.memoizedState : null;

    if (nextProps.mode === 'hidden' || enableLegacyHidden ) {
      // Rendering a hidden tree.
      if ((workInProgress.mode & ConcurrentMode) === NoMode) {
        // In legacy sync mode, don't defer the subtree. Render it now.
        // TODO: Consider how Offscreen should work with transitions in the future
        var nextState = {
          baseLanes: NoLanes,
          cachePool: null,
          transitions: null
        };
        workInProgress.memoizedState = nextState;

        pushRenderLanes(workInProgress, renderLanes);
      } else if (!includesSomeLane(renderLanes, OffscreenLane)) {
        var spawnedCachePool = null; // We're hidden, and we're not rendering at Offscreen. We will bail out
        // and resume this tree later.

        var nextBaseLanes;

        if (prevState !== null) {
          var prevBaseLanes = prevState.baseLanes;
          nextBaseLanes = mergeLanes(prevBaseLanes, renderLanes);
        } else {
          nextBaseLanes = renderLanes;
        } // Schedule this fiber to re-render at offscreen priority. Then bailout.


        workInProgress.lanes = workInProgress.childLanes = laneToLanes(OffscreenLane);
        var _nextState = {
          baseLanes: nextBaseLanes,
          cachePool: spawnedCachePool,
          transitions: null
        };
        workInProgress.memoizedState = _nextState;
        workInProgress.updateQueue = null;
        // to avoid a push/pop misalignment.


        pushRenderLanes(workInProgress, nextBaseLanes);

        return null;
      } else {
        // This is the second render. The surrounding visible content has already
        // committed. Now we resume rendering the hidden tree.
        // Rendering at offscreen, so we can clear the base lanes.
        var _nextState2 = {
          baseLanes: NoLanes,
          cachePool: null,
          transitions: null
        };
        workInProgress.memoizedState = _nextState2; // Push the lanes that were skipped when we bailed out.

        var subtreeRenderLanes = prevState !== null ? prevState.baseLanes : renderLanes;

        pushRenderLanes(workInProgress, subtreeRenderLanes);
      }
    } else {
      // Rendering a visible tree.
      var _subtreeRenderLanes;

      if (prevState !== null) {
        // We're going from hidden -> visible.
        _subtreeRenderLanes = mergeLanes(prevState.baseLanes, renderLanes);

        workInProgress.memoizedState = null;
      } else {
        // We weren't previously hidden, and we still aren't, so there's nothing
        // special to do. Need to push to the stack regardless, though, to avoid
        // a push/pop misalignment.
        _subtreeRenderLanes = renderLanes;
      }

      pushRenderLanes(workInProgress, _subtreeRenderLanes);
    }

    reconcileChildren(current, workInProgress, nextChildren, renderLanes);
    return workInProgress.child;
  } // Note: These happen to have identical begin phases, for now. We shouldn't hold

  function updateFragment(current, workInProgress, renderLanes) {
    var nextChildren = workInProgress.pendingProps;
    reconcileChildren(current, workInProgress, nextChildren, renderLanes);
    return workInProgress.child;
  }

  function updateMode(current, workInProgress, renderLanes) {
    var nextChildren = workInProgress.pendingProps.children;
    reconcileChildren(current, workInProgress, nextChildren, renderLanes);
    return workInProgress.child;
  }

  function updateProfiler(current, workInProgress, renderLanes) {
    {
      workInProgress.flags |= Update;

      {
        // Reset effect durations for the next eventual effect phase.
        // These are reset during render to allow the DevTools commit hook a chance to read them,
        var stateNode = workInProgress.stateNode;
        stateNode.effectDuration = 0;
        stateNode.passiveEffectDuration = 0;
      }
    }

    var nextProps = workInProgress.pendingProps;
    var nextChildren = nextProps.children;
    reconcileChildren(current, workInProgress, nextChildren, renderLanes);
    return workInProgress.child;
  }

  function markRef(current, workInProgress) {
    var ref = workInProgress.ref;

    if (current === null && ref !== null || current !== null && current.ref !== ref) {
      // Schedule a Ref effect
      workInProgress.flags |= Ref;

      {
        workInProgress.flags |= RefStatic;
      }
    }
  }

  function updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes) {
    {
      if (workInProgress.type !== workInProgress.elementType) {
        // Lazy component props can't be validated in createElement
        // because they're only guaranteed to be resolved here.
        var innerPropTypes = Component.propTypes;

        if (innerPropTypes) {
          checkPropTypes(innerPropTypes, nextProps, // Resolved props
          'prop', getComponentNameFromType(Component));
        }
      }
    }

    var context;

    {
      var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);
      context = getMaskedContext(workInProgress, unmaskedContext);
    }

    var nextChildren;
    var hasId;
    prepareToReadContext(workInProgress, renderLanes);

    {
      markComponentRenderStarted(workInProgress);
    }

    {
      ReactCurrentOwner$1.current = workInProgress;
      setIsRendering(true);
      nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);
      hasId = checkDidRenderIdHook();

      if ( workInProgress.mode & StrictLegacyMode) {
        setIsStrictModeForDevtools(true);

        try {
          nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);
          hasId = checkDidRenderIdHook();
        } finally {
          setIsStrictModeForDevtools(false);
        }
      }

      setIsRendering(false);
    }

    {
      markComponentRenderStopped();
    }

    if (current !== null && !didReceiveUpdate) {
      bailoutHooks(current, workInProgress, renderLanes);
      return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
    }

    if (getIsHydrating() && hasId) {
      pushMaterializedTreeId(workInProgress);
    } // React DevTools reads this flag.


    workInProgress.flags |= PerformedWork;
    reconcileChildren(current, workInProgress, nextChildren, renderLanes);
    return workInProgress.child;
  }

  function updateClassComponent(current, workInProgress, Component, nextProps, renderLanes) {
    {
      // This is used by DevTools to force a boundary to error.
      switch (shouldError(workInProgress)) {
        case false:
          {
            var _instance = workInProgress.stateNode;
            var ctor = workInProgress.type; // TODO This way of resetting the error boundary state is a hack.
            // Is there a better way to do this?

            var tempInstance = new ctor(workInProgress.memoizedProps, _instance.context);
            var state = tempInstance.state;

            _instance.updater.enqueueSetState(_instance, state, null);

            break;
          }

        case true:
          {
            workInProgress.flags |= DidCapture;
            workInProgress.flags |= ShouldCapture; // eslint-disable-next-line react-internal/prod-error-codes

            var error$1 = new Error('Simulated error coming from DevTools');
            var lane = pickArbitraryLane(renderLanes);
            workInProgress.lanes = mergeLanes(workInProgress.lanes, lane); // Schedule the error boundary to re-render using updated state

            var update = createClassErrorUpdate(workInProgress, createCapturedValueAtFiber(error$1, workInProgress), lane);
            enqueueCapturedUpdate(workInProgress, update);
            break;
          }
      }

      if (workInProgress.type !== workInProgress.elementType) {
        // Lazy component props can't be validated in createElement
        // because they're only guaranteed to be resolved here.
        var innerPropTypes = Component.propTypes;

        if (innerPropTypes) {
          checkPropTypes(innerPropTypes, nextProps, // Resolved props
          'prop', getComponentNameFromType(Component));
        }
      }
    } // Push context providers early to prevent context stack mismatches.
    // During mounting we don't know the child context yet as the instance doesn't exist.
    // We will invalidate the child context in finishClassComponent() right after rendering.


    var hasContext;

    if (isContextProvider(Component)) {
      hasContext = true;
      pushContextProvider(workInProgress);
    } else {
      hasContext = false;
    }

    prepareToReadContext(workInProgress, renderLanes);
    var instance = workInProgress.stateNode;
    var shouldUpdate;

    if (instance === null) {
      resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); // In the initial pass we might need to construct the instance.

      constructClassInstance(workInProgress, Component, nextProps);
      mountClassInstance(workInProgress, Component, nextProps, renderLanes);
      shouldUpdate = true;
    } else if (current === null) {
      // In a resume, we'll already have an instance we can reuse.
      shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderLanes);
    } else {
      shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderLanes);
    }

    var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes);

    {
      var inst = workInProgress.stateNode;

      if (shouldUpdate && inst.props !== nextProps) {
        if (!didWarnAboutReassigningProps) {
          error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentNameFromFiber(workInProgress) || 'a component');
        }

        didWarnAboutReassigningProps = true;
      }
    }

    return nextUnitOfWork;
  }

  function finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes) {
    // Refs should update even if shouldComponentUpdate returns false
    markRef(current, workInProgress);
    var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags;

    if (!shouldUpdate && !didCaptureError) {
      // Context providers should defer to sCU for rendering
      if (hasContext) {
        invalidateContextProvider(workInProgress, Component, false);
      }

      return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
    }

    var instance = workInProgress.stateNode; // Rerender

    ReactCurrentOwner$1.current = workInProgress;
    var nextChildren;

    if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') {
      // If we captured an error, but getDerivedStateFromError is not defined,
      // unmount all the children. componentDidCatch will schedule an update to
      // re-render a fallback. This is temporary until we migrate everyone to
      // the new API.
      // TODO: Warn in a future release.
      nextChildren = null;

      {
        stopProfilerTimerIfRunning();
      }
    } else {
      {
        markComponentRenderStarted(workInProgress);
      }

      {
        setIsRendering(true);
        nextChildren = instance.render();

        if ( workInProgress.mode & StrictLegacyMode) {
          setIsStrictModeForDevtools(true);

          try {
            instance.render();
          } finally {
            setIsStrictModeForDevtools(false);
          }
        }

        setIsRendering(false);
      }

      {
        markComponentRenderStopped();
      }
    } // React DevTools reads this flag.


    workInProgress.flags |= PerformedWork;

    if (current !== null && didCaptureError) {
      // If we're recovering from an error, reconcile without reusing any of
      // the existing children. Conceptually, the normal children and the children
      // that are shown on error are two different sets, so we shouldn't reuse
      // normal children even if their identities match.
      forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes);
    } else {
      reconcileChildren(current, workInProgress, nextChildren, renderLanes);
    } // Memoize state using the values we just used to render.
    // TODO: Restructure so we never read values from the instance.


    workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it.

    if (hasContext) {
      invalidateContextProvider(workInProgress, Component, true);
    }

    return workInProgress.child;
  }

  function pushHostRootContext(workInProgress) {
    var root = workInProgress.stateNode;

    if (root.pendingContext) {
      pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);
    } else if (root.context) {
      // Should always be set
      pushTopLevelContextObject(workInProgress, root.context, false);
    }

    pushHostContainer(workInProgress, root.containerInfo);
  }

  function updateHostRoot(current, workInProgress, renderLanes) {
    pushHostRootContext(workInProgress);

    if (current === null) {
      throw new Error('Should have a current fiber. This is a bug in React.');
    }

    var nextProps = workInProgress.pendingProps;
    var prevState = workInProgress.memoizedState;
    var prevChildren = prevState.element;
    cloneUpdateQueue(current, workInProgress);
    processUpdateQueue(workInProgress, nextProps, null, renderLanes);
    var nextState = workInProgress.memoizedState;
    var root = workInProgress.stateNode;
    // being called "element".


    var nextChildren = nextState.element;

    if ( prevState.isDehydrated) {
      // This is a hydration root whose shell has not yet hydrated. We should
      // attempt to hydrate.
      // Flip isDehydrated to false to indicate that when this render
      // finishes, the root will no longer be dehydrated.
      var overrideState = {
        element: nextChildren,
        isDehydrated: false,
        cache: nextState.cache,
        pendingSuspenseBoundaries: nextState.pendingSuspenseBoundaries,
        transitions: nextState.transitions
      };
      var updateQueue = workInProgress.updateQueue; // `baseState` can always be the last state because the root doesn't
      // have reducer functions so it doesn't need rebasing.

      updateQueue.baseState = overrideState;
      workInProgress.memoizedState = overrideState;

      if (workInProgress.flags & ForceClientRender) {
        // Something errored during a previous attempt to hydrate the shell, so we
        // forced a client render.
        var recoverableError = createCapturedValueAtFiber(new Error('There was an error while hydrating. Because the error happened outside ' + 'of a Suspense boundary, the entire root will switch to ' + 'client rendering.'), workInProgress);
        return mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, recoverableError);
      } else if (nextChildren !== prevChildren) {
        var _recoverableError = createCapturedValueAtFiber(new Error('This root received an early update, before anything was able ' + 'hydrate. Switched the entire root to client rendering.'), workInProgress);

        return mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, _recoverableError);
      } else {
        // The outermost shell has not hydrated yet. Start hydrating.
        enterHydrationState(workInProgress);

        var child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);
        workInProgress.child = child;
        var node = child;

        while (node) {
          // Mark each child as hydrating. This is a fast path to know whether this
          // tree is part of a hydrating tree. This is used to determine if a child
          // node has fully mounted yet, and for scheduling event replaying.
          // Conceptually this is similar to Placement in that a new subtree is
          // inserted into the React tree here. It just happens to not need DOM
          // mutations because it already exists.
          node.flags = node.flags & ~Placement | Hydrating;
          node = node.sibling;
        }
      }
    } else {
      // Root is not dehydrated. Either this is a client-only root, or it
      // already hydrated.
      resetHydrationState();

      if (nextChildren === prevChildren) {
        return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
      }

      reconcileChildren(current, workInProgress, nextChildren, renderLanes);
    }

    return workInProgress.child;
  }

  function mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, recoverableError) {
    // Revert to client rendering.
    resetHydrationState();
    queueHydrationError(recoverableError);
    workInProgress.flags |= ForceClientRender;
    reconcileChildren(current, workInProgress, nextChildren, renderLanes);
    return workInProgress.child;
  }

  function updateHostComponent(current, workInProgress, renderLanes) {
    pushHostContext(workInProgress);

    if (current === null) {
      tryToClaimNextHydratableInstance(workInProgress);
    }

    var type = workInProgress.type;
    var nextProps = workInProgress.pendingProps;
    var prevProps = current !== null ? current.memoizedProps : null;
    var nextChildren = nextProps.children;
    var isDirectTextChild = shouldSetTextContent(type, nextProps);

    if (isDirectTextChild) {
      // We special case a direct text child of a host node. This is a common
      // case. We won't handle it as a reified child. We will instead handle
      // this in the host environment that also has access to this prop. That
      // avoids allocating another HostText fiber and traversing it.
      nextChildren = null;
    } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {
      // If we're switching from a direct text child to a normal child, or to
      // empty, we need to schedule the text content to be reset.
      workInProgress.flags |= ContentReset;
    }

    markRef(current, workInProgress);
    reconcileChildren(current, workInProgress, nextChildren, renderLanes);
    return workInProgress.child;
  }

  function updateHostText(current, workInProgress) {
    if (current === null) {
      tryToClaimNextHydratableInstance(workInProgress);
    } // Nothing to do here. This is terminal. We'll do the completion step
    // immediately after.


    return null;
  }

  function mountLazyComponent(_current, workInProgress, elementType, renderLanes) {
    resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);
    var props = workInProgress.pendingProps;
    var lazyComponent = elementType;
    var payload = lazyComponent._payload;
    var init = lazyComponent._init;
    var Component = init(payload); // Store the unwrapped component in the type.

    workInProgress.type = Component;
    var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);
    var resolvedProps = resolveDefaultProps(Component, props);
    var child;

    switch (resolvedTag) {
      case FunctionComponent:
        {
          {
            validateFunctionComponentInDev(workInProgress, Component);
            workInProgress.type = Component = resolveFunctionForHotReloading(Component);
          }

          child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderLanes);
          return child;
        }

      case ClassComponent:
        {
          {
            workInProgress.type = Component = resolveClassForHotReloading(Component);
          }

          child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderLanes);
          return child;
        }

      case ForwardRef:
        {
          {
            workInProgress.type = Component = resolveForwardRefForHotReloading(Component);
          }

          child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderLanes);
          return child;
        }

      case MemoComponent:
        {
          {
            if (workInProgress.type !== workInProgress.elementType) {
              var outerPropTypes = Component.propTypes;

              if (outerPropTypes) {
                checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only
                'prop', getComponentNameFromType(Component));
              }
            }
          }

          child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
          renderLanes);
          return child;
        }
    }

    var hint = '';

    {
      if (Component !== null && typeof Component === 'object' && Component.$$typeof === REACT_LAZY_TYPE) {
        hint = ' Did you wrap a component in React.lazy() more than once?';
      }
    } // This message intentionally doesn't mention ForwardRef or MemoComponent
    // because the fact that it's a separate type of work is an
    // implementation detail.


    throw new Error("Element type is invalid. Received a promise that resolves to: " + Component + ". " + ("Lazy element type must resolve to a class or function." + hint));
  }

  function mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderLanes) {
    resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); // Promote the fiber to a class and try rendering again.

    workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent`
    // Push context providers early to prevent context stack mismatches.
    // During mounting we don't know the child context yet as the instance doesn't exist.
    // We will invalidate the child context in finishClassComponent() right after rendering.

    var hasContext;

    if (isContextProvider(Component)) {
      hasContext = true;
      pushContextProvider(workInProgress);
    } else {
      hasContext = false;
    }

    prepareToReadContext(workInProgress, renderLanes);
    constructClassInstance(workInProgress, Component, nextProps);
    mountClassInstance(workInProgress, Component, nextProps, renderLanes);
    return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);
  }

  function mountIndeterminateComponent(_current, workInProgress, Component, renderLanes) {
    resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);
    var props = workInProgress.pendingProps;
    var context;

    {
      var unmaskedContext = getUnmaskedContext(workInProgress, Component, false);
      context = getMaskedContext(workInProgress, unmaskedContext);
    }

    prepareToReadContext(workInProgress, renderLanes);
    var value;
    var hasId;

    {
      markComponentRenderStarted(workInProgress);
    }

    {
      if (Component.prototype && typeof Component.prototype.render === 'function') {
        var componentName = getComponentNameFromType(Component) || 'Unknown';

        if (!didWarnAboutBadClass[componentName]) {
          error("The <%s /> component appears to have a render method, but doesn't extend React.Component. " + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);

          didWarnAboutBadClass[componentName] = true;
        }
      }

      if (workInProgress.mode & StrictLegacyMode) {
        ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);
      }

      setIsRendering(true);
      ReactCurrentOwner$1.current = workInProgress;
      value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);
      hasId = checkDidRenderIdHook();
      setIsRendering(false);
    }

    {
      markComponentRenderStopped();
    } // React DevTools reads this flag.


    workInProgress.flags |= PerformedWork;

    {
      // Support for module components is deprecated and is removed behind a flag.
      // Whether or not it would crash later, we want to show a good message in DEV first.
      if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
        var _componentName = getComponentNameFromType(Component) || 'Unknown';

        if (!didWarnAboutModulePatternComponent[_componentName]) {
          error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName, _componentName, _componentName);

          didWarnAboutModulePatternComponent[_componentName] = true;
        }
      }
    }

    if ( // Run these checks in production only if the flag is off.
    // Eventually we'll delete this branch altogether.
     typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
      {
        var _componentName2 = getComponentNameFromType(Component) || 'Unknown';

        if (!didWarnAboutModulePatternComponent[_componentName2]) {
          error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName2, _componentName2, _componentName2);

          didWarnAboutModulePatternComponent[_componentName2] = true;
        }
      } // Proceed under the assumption that this is a class instance


      workInProgress.tag = ClassComponent; // Throw out any hooks that were used.

      workInProgress.memoizedState = null;
      workInProgress.updateQueue = null; // Push context providers early to prevent context stack mismatches.
      // During mounting we don't know the child context yet as the instance doesn't exist.
      // We will invalidate the child context in finishClassComponent() right after rendering.

      var hasContext = false;

      if (isContextProvider(Component)) {
        hasContext = true;
        pushContextProvider(workInProgress);
      } else {
        hasContext = false;
      }

      workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null;
      initializeUpdateQueue(workInProgress);
      adoptClassInstance(workInProgress, value);
      mountClassInstance(workInProgress, Component, props, renderLanes);
      return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);
    } else {
      // Proceed under the assumption that this is a function component
      workInProgress.tag = FunctionComponent;

      {

        if ( workInProgress.mode & StrictLegacyMode) {
          setIsStrictModeForDevtools(true);

          try {
            value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);
            hasId = checkDidRenderIdHook();
          } finally {
            setIsStrictModeForDevtools(false);
          }
        }
      }

      if (getIsHydrating() && hasId) {
        pushMaterializedTreeId(workInProgress);
      }

      reconcileChildren(null, workInProgress, value, renderLanes);

      {
        validateFunctionComponentInDev(workInProgress, Component);
      }

      return workInProgress.child;
    }
  }

  function validateFunctionComponentInDev(workInProgress, Component) {
    {
      if (Component) {
        if (Component.childContextTypes) {
          error('%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component');
        }
      }

      if (workInProgress.ref !== null) {
        var info = '';
        var ownerName = getCurrentFiberOwnerNameInDevOrNull();

        if (ownerName) {
          info += '\n\nCheck the render method of `' + ownerName + '`.';
        }

        var warningKey = ownerName || '';
        var debugSource = workInProgress._debugSource;

        if (debugSource) {
          warningKey = debugSource.fileName + ':' + debugSource.lineNumber;
        }

        if (!didWarnAboutFunctionRefs[warningKey]) {
          didWarnAboutFunctionRefs[warningKey] = true;

          error('Function components cannot be given refs. ' + 'Attempts to access this ref will fail. ' + 'Did you mean to use React.forwardRef()?%s', info);
        }
      }

      if ( Component.defaultProps !== undefined) {
        var componentName = getComponentNameFromType(Component) || 'Unknown';

        if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) {
          error('%s: Support for defaultProps will be removed from function components ' + 'in a future major release. Use JavaScript default parameters instead.', componentName);

          didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true;
        }
      }

      if (typeof Component.getDerivedStateFromProps === 'function') {
        var _componentName3 = getComponentNameFromType(Component) || 'Unknown';

        if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {
          error('%s: Function components do not support getDerivedStateFromProps.', _componentName3);

          didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;
        }
      }

      if (typeof Component.contextType === 'object' && Component.contextType !== null) {
        var _componentName4 = getComponentNameFromType(Component) || 'Unknown';

        if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {
          error('%s: Function components do not support contextType.', _componentName4);

          didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;
        }
      }
    }
  }

  var SUSPENDED_MARKER = {
    dehydrated: null,
    treeContext: null,
    retryLane: NoLane
  };

  function mountSuspenseOffscreenState(renderLanes) {
    return {
      baseLanes: renderLanes,
      cachePool: getSuspendedCache(),
      transitions: null
    };
  }

  function updateSuspenseOffscreenState(prevOffscreenState, renderLanes) {
    var cachePool = null;

    return {
      baseLanes: mergeLanes(prevOffscreenState.baseLanes, renderLanes),
      cachePool: cachePool,
      transitions: prevOffscreenState.transitions
    };
  } // TODO: Probably should inline this back


  function shouldRemainOnFallback(suspenseContext, current, workInProgress, renderLanes) {
    // If we're already showing a fallback, there are cases where we need to
    // remain on that fallback regardless of whether the content has resolved.
    // For example, SuspenseList coordinates when nested content appears.
    if (current !== null) {
      var suspenseState = current.memoizedState;

      if (suspenseState === null) {
        // Currently showing content. Don't hide it, even if ForceSuspenseFallback
        // is true. More precise name might be "ForceRemainSuspenseFallback".
        // Note: This is a factoring smell. Can't remain on a fallback if there's
        // no fallback to remain on.
        return false;
      }
    } // Not currently showing content. Consult the Suspense context.


    return hasSuspenseContext(suspenseContext, ForceSuspenseFallback);
  }

  function getRemainingWorkInPrimaryTree(current, renderLanes) {
    // TODO: Should not remove render lanes that were pinged during this render
    return removeLanes(current.childLanes, renderLanes);
  }

  function updateSuspenseComponent(current, workInProgress, renderLanes) {
    var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend.

    {
      if (shouldSuspend(workInProgress)) {
        workInProgress.flags |= DidCapture;
      }
    }

    var suspenseContext = suspenseStackCursor.current;
    var showFallback = false;
    var didSuspend = (workInProgress.flags & DidCapture) !== NoFlags;

    if (didSuspend || shouldRemainOnFallback(suspenseContext, current)) {
      // Something in this boundary's subtree already suspended. Switch to
      // rendering the fallback children.
      showFallback = true;
      workInProgress.flags &= ~DidCapture;
    } else {
      // Attempting the main content
      if (current === null || current.memoizedState !== null) {
        // This is a new mount or this boundary is already showing a fallback state.
        // Mark this subtree context as having at least one invisible parent that could
        // handle the fallback state.
        // Avoided boundaries are not considered since they cannot handle preferred fallback states.
        {
          suspenseContext = addSubtreeSuspenseContext(suspenseContext, InvisibleParentSuspenseContext);
        }
      }
    }

    suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
    pushSuspenseContext(workInProgress, suspenseContext); // OK, the next part is confusing. We're about to reconcile the Suspense
    // boundary's children. This involves some custom reconciliation logic. Two
    // main reasons this is so complicated.
    //
    // First, Legacy Mode has different semantics for backwards compatibility. The
    // primary tree will commit in an inconsistent state, so when we do the
    // second pass to render the fallback, we do some exceedingly, uh, clever
    // hacks to make that not totally break. Like transferring effects and
    // deletions from hidden tree. In Concurrent Mode, it's much simpler,
    // because we bailout on the primary tree completely and leave it in its old
    // state, no effects. Same as what we do for Offscreen (except that
    // Offscreen doesn't have the first render pass).
    //
    // Second is hydration. During hydration, the Suspense fiber has a slightly
    // different layout, where the child points to a dehydrated fragment, which
    // contains the DOM rendered by the server.
    //
    // Third, even if you set all that aside, Suspense is like error boundaries in
    // that we first we try to render one tree, and if that fails, we render again
    // and switch to a different tree. Like a try/catch block. So we have to track
    // which branch we're currently rendering. Ideally we would model this using
    // a stack.

    if (current === null) {
      // Initial mount
      // Special path for hydration
      // If we're currently hydrating, try to hydrate this boundary.
      tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component.

      var suspenseState = workInProgress.memoizedState;

      if (suspenseState !== null) {
        var dehydrated = suspenseState.dehydrated;

        if (dehydrated !== null) {
          return mountDehydratedSuspenseComponent(workInProgress, dehydrated);
        }
      }

      var nextPrimaryChildren = nextProps.children;
      var nextFallbackChildren = nextProps.fallback;

      if (showFallback) {
        var fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);
        var primaryChildFragment = workInProgress.child;
        primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);
        workInProgress.memoizedState = SUSPENDED_MARKER;

        return fallbackFragment;
      } else {
        return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren);
      }
    } else {
      // This is an update.
      // Special path for hydration
      var prevState = current.memoizedState;

      if (prevState !== null) {
        var _dehydrated = prevState.dehydrated;

        if (_dehydrated !== null) {
          return updateDehydratedSuspenseComponent(current, workInProgress, didSuspend, nextProps, _dehydrated, prevState, renderLanes);
        }
      }

      if (showFallback) {
        var _nextFallbackChildren = nextProps.fallback;
        var _nextPrimaryChildren = nextProps.children;
        var fallbackChildFragment = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren, _nextFallbackChildren, renderLanes);
        var _primaryChildFragment2 = workInProgress.child;
        var prevOffscreenState = current.child.memoizedState;
        _primaryChildFragment2.memoizedState = prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(prevOffscreenState, renderLanes);

        _primaryChildFragment2.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes);
        workInProgress.memoizedState = SUSPENDED_MARKER;
        return fallbackChildFragment;
      } else {
        var _nextPrimaryChildren2 = nextProps.children;

        var _primaryChildFragment3 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren2, renderLanes);

        workInProgress.memoizedState = null;
        return _primaryChildFragment3;
      }
    }
  }

  function mountSuspensePrimaryChildren(workInProgress, primaryChildren, renderLanes) {
    var mode = workInProgress.mode;
    var primaryChildProps = {
      mode: 'visible',
      children: primaryChildren
    };
    var primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, mode);
    primaryChildFragment.return = workInProgress;
    workInProgress.child = primaryChildFragment;
    return primaryChildFragment;
  }

  function mountSuspenseFallbackChildren(workInProgress, primaryChildren, fallbackChildren, renderLanes) {
    var mode = workInProgress.mode;
    var progressedPrimaryFragment = workInProgress.child;
    var primaryChildProps = {
      mode: 'hidden',
      children: primaryChildren
    };
    var primaryChildFragment;
    var fallbackChildFragment;

    if ((mode & ConcurrentMode) === NoMode && progressedPrimaryFragment !== null) {
      // In legacy mode, we commit the primary tree as if it successfully
      // completed, even though it's in an inconsistent state.
      primaryChildFragment = progressedPrimaryFragment;
      primaryChildFragment.childLanes = NoLanes;
      primaryChildFragment.pendingProps = primaryChildProps;

      if ( workInProgress.mode & ProfileMode) {
        // Reset the durations from the first pass so they aren't included in the
        // final amounts. This seems counterintuitive, since we're intentionally
        // not measuring part of the render phase, but this makes it match what we
        // do in Concurrent Mode.
        primaryChildFragment.actualDuration = 0;
        primaryChildFragment.actualStartTime = -1;
        primaryChildFragment.selfBaseDuration = 0;
        primaryChildFragment.treeBaseDuration = 0;
      }

      fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);
    } else {
      primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, mode);
      fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);
    }

    primaryChildFragment.return = workInProgress;
    fallbackChildFragment.return = workInProgress;
    primaryChildFragment.sibling = fallbackChildFragment;
    workInProgress.child = primaryChildFragment;
    return fallbackChildFragment;
  }

  function mountWorkInProgressOffscreenFiber(offscreenProps, mode, renderLanes) {
    // The props argument to `createFiberFromOffscreen` is `any` typed, so we use
    // this wrapper function to constrain it.
    return createFiberFromOffscreen(offscreenProps, mode, NoLanes, null);
  }

  function updateWorkInProgressOffscreenFiber(current, offscreenProps) {
    // The props argument to `createWorkInProgress` is `any` typed, so we use this
    // wrapper function to constrain it.
    return createWorkInProgress(current, offscreenProps);
  }

  function updateSuspensePrimaryChildren(current, workInProgress, primaryChildren, renderLanes) {
    var currentPrimaryChildFragment = current.child;
    var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
    var primaryChildFragment = updateWorkInProgressOffscreenFiber(currentPrimaryChildFragment, {
      mode: 'visible',
      children: primaryChildren
    });

    if ((workInProgress.mode & ConcurrentMode) === NoMode) {
      primaryChildFragment.lanes = renderLanes;
    }

    primaryChildFragment.return = workInProgress;
    primaryChildFragment.sibling = null;

    if (currentFallbackChildFragment !== null) {
      // Delete the fallback child fragment
      var deletions = workInProgress.deletions;

      if (deletions === null) {
        workInProgress.deletions = [currentFallbackChildFragment];
        workInProgress.flags |= ChildDeletion;
      } else {
        deletions.push(currentFallbackChildFragment);
      }
    }

    workInProgress.child = primaryChildFragment;
    return primaryChildFragment;
  }

  function updateSuspenseFallbackChildren(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {
    var mode = workInProgress.mode;
    var currentPrimaryChildFragment = current.child;
    var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
    var primaryChildProps = {
      mode: 'hidden',
      children: primaryChildren
    };
    var primaryChildFragment;

    if ( // In legacy mode, we commit the primary tree as if it successfully
    // completed, even though it's in an inconsistent state.
    (mode & ConcurrentMode) === NoMode && // Make sure we're on the second pass, i.e. the primary child fragment was
    // already cloned. In legacy mode, the only case where this isn't true is
    // when DevTools forces us to display a fallback; we skip the first render
    // pass entirely and go straight to rendering the fallback. (In Concurrent
    // Mode, SuspenseList can also trigger this scenario, but this is a legacy-
    // only codepath.)
    workInProgress.child !== currentPrimaryChildFragment) {
      var progressedPrimaryFragment = workInProgress.child;
      primaryChildFragment = progressedPrimaryFragment;
      primaryChildFragment.childLanes = NoLanes;
      primaryChildFragment.pendingProps = primaryChildProps;

      if ( workInProgress.mode & ProfileMode) {
        // Reset the durations from the first pass so they aren't included in the
        // final amounts. This seems counterintuitive, since we're intentionally
        // not measuring part of the render phase, but this makes it match what we
        // do in Concurrent Mode.
        primaryChildFragment.actualDuration = 0;
        primaryChildFragment.actualStartTime = -1;
        primaryChildFragment.selfBaseDuration = currentPrimaryChildFragment.selfBaseDuration;
        primaryChildFragment.treeBaseDuration = currentPrimaryChildFragment.treeBaseDuration;
      } // The fallback fiber was added as a deletion during the first pass.
      // However, since we're going to remain on the fallback, we no longer want
      // to delete it.


      workInProgress.deletions = null;
    } else {
      primaryChildFragment = updateWorkInProgressOffscreenFiber(currentPrimaryChildFragment, primaryChildProps); // Since we're reusing a current tree, we need to reuse the flags, too.
      // (We don't do this in legacy mode, because in legacy mode we don't re-use
      // the current tree; see previous branch.)

      primaryChildFragment.subtreeFlags = currentPrimaryChildFragment.subtreeFlags & StaticMask;
    }

    var fallbackChildFragment;

    if (currentFallbackChildFragment !== null) {
      fallbackChildFragment = createWorkInProgress(currentFallbackChildFragment, fallbackChildren);
    } else {
      fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); // Needs a placement effect because the parent (the Suspense boundary) already
      // mounted but this is a new fiber.

      fallbackChildFragment.flags |= Placement;
    }

    fallbackChildFragment.return = workInProgress;
    primaryChildFragment.return = workInProgress;
    primaryChildFragment.sibling = fallbackChildFragment;
    workInProgress.child = primaryChildFragment;
    return fallbackChildFragment;
  }

  function retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, recoverableError) {
    // Falling back to client rendering. Because this has performance
    // implications, it's considered a recoverable error, even though the user
    // likely won't observe anything wrong with the UI.
    //
    // The error is passed in as an argument to enforce that every caller provide
    // a custom message, or explicitly opt out (currently the only path that opts
    // out is legacy mode; every concurrent path provides an error).
    if (recoverableError !== null) {
      queueHydrationError(recoverableError);
    } // This will add the old fiber to the deletion list


    reconcileChildFibers(workInProgress, current.child, null, renderLanes); // We're now not suspended nor dehydrated.

    var nextProps = workInProgress.pendingProps;
    var primaryChildren = nextProps.children;
    var primaryChildFragment = mountSuspensePrimaryChildren(workInProgress, primaryChildren); // Needs a placement effect because the parent (the Suspense boundary) already
    // mounted but this is a new fiber.

    primaryChildFragment.flags |= Placement;
    workInProgress.memoizedState = null;
    return primaryChildFragment;
  }

  function mountSuspenseFallbackAfterRetryWithoutHydrating(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {
    var fiberMode = workInProgress.mode;
    var primaryChildProps = {
      mode: 'visible',
      children: primaryChildren
    };
    var primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, fiberMode);
    var fallbackChildFragment = createFiberFromFragment(fallbackChildren, fiberMode, renderLanes, null); // Needs a placement effect because the parent (the Suspense
    // boundary) already mounted but this is a new fiber.

    fallbackChildFragment.flags |= Placement;
    primaryChildFragment.return = workInProgress;
    fallbackChildFragment.return = workInProgress;
    primaryChildFragment.sibling = fallbackChildFragment;
    workInProgress.child = primaryChildFragment;

    if ((workInProgress.mode & ConcurrentMode) !== NoMode) {
      // We will have dropped the effect list which contains the
      // deletion. We need to reconcile to delete the current child.
      reconcileChildFibers(workInProgress, current.child, null, renderLanes);
    }

    return fallbackChildFragment;
  }

  function mountDehydratedSuspenseComponent(workInProgress, suspenseInstance, renderLanes) {
    // During the first pass, we'll bail out and not drill into the children.
    // Instead, we'll leave the content in place and try to hydrate it later.
    if ((workInProgress.mode & ConcurrentMode) === NoMode) {
      {
        error('Cannot hydrate Suspense in legacy mode. Switch from ' + 'ReactDOM.hydrate(element, container) to ' + 'ReactDOMClient.hydrateRoot(container, <App />)' + '.render(element) or remove the Suspense components from ' + 'the server rendered components.');
      }

      workInProgress.lanes = laneToLanes(SyncLane);
    } else if (isSuspenseInstanceFallback(suspenseInstance)) {
      // This is a client-only boundary. Since we won't get any content from the server
      // for this, we need to schedule that at a higher priority based on when it would
      // have timed out. In theory we could render it in this pass but it would have the
      // wrong priority associated with it and will prevent hydration of parent path.
      // Instead, we'll leave work left on it to render it in a separate commit.
      // TODO This time should be the time at which the server rendered response that is
      // a parent to this boundary was displayed. However, since we currently don't have
      // a protocol to transfer that time, we'll just estimate it by using the current
      // time. This will mean that Suspense timeouts are slightly shifted to later than
      // they should be.
      // Schedule a normal pri update to render this content.
      workInProgress.lanes = laneToLanes(DefaultHydrationLane);
    } else {
      // We'll continue hydrating the rest at offscreen priority since we'll already
      // be showing the right content coming from the server, it is no rush.
      workInProgress.lanes = laneToLanes(OffscreenLane);
    }

    return null;
  }

  function updateDehydratedSuspenseComponent(current, workInProgress, didSuspend, nextProps, suspenseInstance, suspenseState, renderLanes) {
    if (!didSuspend) {
      // This is the first render pass. Attempt to hydrate.
      // We should never be hydrating at this point because it is the first pass,
      // but after we've already committed once.
      warnIfHydrating();

      if ((workInProgress.mode & ConcurrentMode) === NoMode) {
        return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, // TODO: When we delete legacy mode, we should make this error argument
        // required â€” every concurrent mode path that causes hydration to
        // de-opt to client rendering should have an error message.
        null);
      }

      if (isSuspenseInstanceFallback(suspenseInstance)) {
        // This boundary is in a permanent fallback state. In this case, we'll never
        // get an update and we'll never be able to hydrate the final content. Let's just try the
        // client side render instead.
        var digest, message, stack;

        {
          var _getSuspenseInstanceF = getSuspenseInstanceFallbackErrorDetails(suspenseInstance);

          digest = _getSuspenseInstanceF.digest;
          message = _getSuspenseInstanceF.message;
          stack = _getSuspenseInstanceF.stack;
        }

        var error;

        if (message) {
          // eslint-disable-next-line react-internal/prod-error-codes
          error = new Error(message);
        } else {
          error = new Error('The server could not finish this Suspense boundary, likely ' + 'due to an error during server rendering. Switched to ' + 'client rendering.');
        }

        var capturedValue = createCapturedValue(error, digest, stack);
        return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, capturedValue);
      }
      // any context has changed, we need to treat is as if the input might have changed.


      var hasContextChanged = includesSomeLane(renderLanes, current.childLanes);

      if (didReceiveUpdate || hasContextChanged) {
        // This boundary has changed since the first render. This means that we are now unable to
        // hydrate it. We might still be able to hydrate it using a higher priority lane.
        var root = getWorkInProgressRoot();

        if (root !== null) {
          var attemptHydrationAtLane = getBumpedLaneForHydration(root, renderLanes);

          if (attemptHydrationAtLane !== NoLane && attemptHydrationAtLane !== suspenseState.retryLane) {
            // Intentionally mutating since this render will get interrupted. This
            // is one of the very rare times where we mutate the current tree
            // during the render phase.
            suspenseState.retryLane = attemptHydrationAtLane; // TODO: Ideally this would inherit the event time of the current render

            var eventTime = NoTimestamp;
            enqueueConcurrentRenderForLane(current, attemptHydrationAtLane);
            scheduleUpdateOnFiber(root, current, attemptHydrationAtLane, eventTime);
          }
        } // If we have scheduled higher pri work above, this will probably just abort the render
        // since we now have higher priority work, but in case it doesn't, we need to prepare to
        // render something, if we time out. Even if that requires us to delete everything and
        // skip hydration.
        // Delay having to do this as long as the suspense timeout allows us.


        renderDidSuspendDelayIfPossible();

        var _capturedValue = createCapturedValue(new Error('This Suspense boundary received an update before it finished ' + 'hydrating. This caused the boundary to switch to client rendering. ' + 'The usual way to fix this is to wrap the original update ' + 'in startTransition.'));

        return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, _capturedValue);
      } else if (isSuspenseInstancePending(suspenseInstance)) {
        // This component is still pending more data from the server, so we can't hydrate its
        // content. We treat it as if this component suspended itself. It might seem as if
        // we could just try to render it client-side instead. However, this will perform a
        // lot of unnecessary work and is unlikely to complete since it often will suspend
        // on missing data anyway. Additionally, the server might be able to render more
        // than we can on the client yet. In that case we'd end up with more fallback states
        // on the client than if we just leave it alone. If the server times out or errors
        // these should update this boundary to the permanent Fallback state instead.
        // Mark it as having captured (i.e. suspended).
        workInProgress.flags |= DidCapture; // Leave the child in place. I.e. the dehydrated fragment.

        workInProgress.child = current.child; // Register a callback to retry this boundary once the server has sent the result.

        var retry = retryDehydratedSuspenseBoundary.bind(null, current);
        registerSuspenseInstanceRetry(suspenseInstance, retry);
        return null;
      } else {
        // This is the first attempt.
        reenterHydrationStateFromDehydratedSuspenseInstance(workInProgress, suspenseInstance, suspenseState.treeContext);
        var primaryChildren = nextProps.children;
        var primaryChildFragment = mountSuspensePrimaryChildren(workInProgress, primaryChildren); // Mark the children as hydrating. This is a fast path to know whether this
        // tree is part of a hydrating tree. This is used to determine if a child
        // node has fully mounted yet, and for scheduling event replaying.
        // Conceptually this is similar to Placement in that a new subtree is
        // inserted into the React tree here. It just happens to not need DOM
        // mutations because it already exists.

        primaryChildFragment.flags |= Hydrating;
        return primaryChildFragment;
      }
    } else {
      // This is the second render pass. We already attempted to hydrated, but
      // something either suspended or errored.
      if (workInProgress.flags & ForceClientRender) {
        // Something errored during hydration. Try again without hydrating.
        workInProgress.flags &= ~ForceClientRender;

        var _capturedValue2 = createCapturedValue(new Error('There was an error while hydrating this Suspense boundary. ' + 'Switched to client rendering.'));

        return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, _capturedValue2);
      } else if (workInProgress.memoizedState !== null) {
        // Something suspended and we should still be in dehydrated mode.
        // Leave the existing child in place.
        workInProgress.child = current.child; // The dehydrated completion pass expects this flag to be there
        // but the normal suspense pass doesn't.

        workInProgress.flags |= DidCapture;
        return null;
      } else {
        // Suspended but we should no longer be in dehydrated mode.
        // Therefore we now have to render the fallback.
        var nextPrimaryChildren = nextProps.children;
        var nextFallbackChildren = nextProps.fallback;
        var fallbackChildFragment = mountSuspenseFallbackAfterRetryWithoutHydrating(current, workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);
        var _primaryChildFragment4 = workInProgress.child;
        _primaryChildFragment4.memoizedState = mountSuspenseOffscreenState(renderLanes);
        workInProgress.memoizedState = SUSPENDED_MARKER;
        return fallbackChildFragment;
      }
    }
  }

  function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {
    fiber.lanes = mergeLanes(fiber.lanes, renderLanes);
    var alternate = fiber.alternate;

    if (alternate !== null) {
      alternate.lanes = mergeLanes(alternate.lanes, renderLanes);
    }

    scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot);
  }

  function propagateSuspenseContextChange(workInProgress, firstChild, renderLanes) {
    // Mark any Suspense boundaries with fallbacks as having work to do.
    // If they were previously forced into fallbacks, they may now be able
    // to unblock.
    var node = firstChild;

    while (node !== null) {
      if (node.tag === SuspenseComponent) {
        var state = node.memoizedState;

        if (state !== null) {
          scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress);
        }
      } else if (node.tag === SuspenseListComponent) {
        // If the tail is hidden there might not be an Suspense boundaries
        // to schedule work on. In this case we have to schedule it on the
        // list itself.
        // We don't have to traverse to the children of the list since
        // the list will propagate the change when it rerenders.
        scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress);
      } else if (node.child !== null) {
        node.child.return = node;
        node = node.child;
        continue;
      }

      if (node === workInProgress) {
        return;
      }

      while (node.sibling === null) {
        if (node.return === null || node.return === workInProgress) {
          return;
        }

        node = node.return;
      }

      node.sibling.return = node.return;
      node = node.sibling;
    }
  }

  function findLastContentRow(firstChild) {
    // This is going to find the last row among these children that is already
    // showing content on the screen, as opposed to being in fallback state or
    // new. If a row has multiple Suspense boundaries, any of them being in the
    // fallback state, counts as the whole row being in a fallback state.
    // Note that the "rows" will be workInProgress, but any nested children
    // will still be current since we haven't rendered them yet. The mounted
    // order may not be the same as the new order. We use the new order.
    var row = firstChild;
    var lastContentRow = null;

    while (row !== null) {
      var currentRow = row.alternate; // New rows can't be content rows.

      if (currentRow !== null && findFirstSuspended(currentRow) === null) {
        lastContentRow = row;
      }

      row = row.sibling;
    }

    return lastContentRow;
  }

  function validateRevealOrder(revealOrder) {
    {
      if (revealOrder !== undefined && revealOrder !== 'forwards' && revealOrder !== 'backwards' && revealOrder !== 'together' && !didWarnAboutRevealOrder[revealOrder]) {
        didWarnAboutRevealOrder[revealOrder] = true;

        if (typeof revealOrder === 'string') {
          switch (revealOrder.toLowerCase()) {
            case 'together':
            case 'forwards':
            case 'backwards':
              {
                error('"%s" is not a valid value for revealOrder on <SuspenseList />. ' + 'Use lowercase "%s" instead.', revealOrder, revealOrder.toLowerCase());

                break;
              }

            case 'forward':
            case 'backward':
              {
                error('"%s" is not a valid value for revealOrder on <SuspenseList />. ' + 'React uses the -s suffix in the spelling. Use "%ss" instead.', revealOrder, revealOrder.toLowerCase());

                break;
              }

            default:
              error('"%s" is not a supported revealOrder on <SuspenseList />. ' + 'Did you mean "together", "forwards" or "backwards"?', revealOrder);

              break;
          }
        } else {
          error('%s is not a supported value for revealOrder on <SuspenseList />. ' + 'Did you mean "together", "forwards" or "backwards"?', revealOrder);
        }
      }
    }
  }

  function validateTailOptions(tailMode, revealOrder) {
    {
      if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) {
        if (tailMode !== 'collapsed' && tailMode !== 'hidden') {
          didWarnAboutTailOptions[tailMode] = true;

          error('"%s" is not a supported value for tail on <SuspenseList />. ' + 'Did you mean "collapsed" or "hidden"?', tailMode);
        } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') {
          didWarnAboutTailOptions[tailMode] = true;

          error('<SuspenseList tail="%s" /> is only valid if revealOrder is ' + '"forwards" or "backwards". ' + 'Did you mean to specify revealOrder="forwards"?', tailMode);
        }
      }
    }
  }

  function validateSuspenseListNestedChild(childSlot, index) {
    {
      var isAnArray = isArray(childSlot);
      var isIterable = !isAnArray && typeof getIteratorFn(childSlot) === 'function';

      if (isAnArray || isIterable) {
        var type = isAnArray ? 'array' : 'iterable';

        error('A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + 'an additional SuspenseList to configure its revealOrder: ' + '<SuspenseList revealOrder=...> ... ' + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + '</SuspenseList>', type, index, type);

        return false;
      }
    }

    return true;
  }

  function validateSuspenseListChildren(children, revealOrder) {
    {
      if ((revealOrder === 'forwards' || revealOrder === 'backwards') && children !== undefined && children !== null && children !== false) {
        if (isArray(children)) {
          for (var i = 0; i < children.length; i++) {
            if (!validateSuspenseListNestedChild(children[i], i)) {
              return;
            }
          }
        } else {
          var iteratorFn = getIteratorFn(children);

          if (typeof iteratorFn === 'function') {
            var childrenIterator = iteratorFn.call(children);

            if (childrenIterator) {
              var step = childrenIterator.next();
              var _i = 0;

              for (; !step.done; step = childrenIterator.next()) {
                if (!validateSuspenseListNestedChild(step.value, _i)) {
                  return;
                }

                _i++;
              }
            }
          } else {
            error('A single row was passed to a <SuspenseList revealOrder="%s" />. ' + 'This is not useful since it needs multiple rows. ' + 'Did you mean to pass multiple children or an array?', revealOrder);
          }
        }
      }
    }
  }

  function initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode) {
    var renderState = workInProgress.memoizedState;

    if (renderState === null) {
      workInProgress.memoizedState = {
        isBackwards: isBackwards,
        rendering: null,
        renderingStartTime: 0,
        last: lastContentRow,
        tail: tail,
        tailMode: tailMode
      };
    } else {
      // We can reuse the existing object from previous renders.
      renderState.isBackwards = isBackwards;
      renderState.rendering = null;
      renderState.renderingStartTime = 0;
      renderState.last = lastContentRow;
      renderState.tail = tail;
      renderState.tailMode = tailMode;
    }
  } // This can end up rendering this component multiple passes.
  // The first pass splits the children fibers into two sets. A head and tail.
  // We first render the head. If anything is in fallback state, we do another
  // pass through beginWork to rerender all children (including the tail) with
  // the force suspend context. If the first render didn't have anything in
  // in fallback state. Then we render each row in the tail one-by-one.
  // That happens in the completeWork phase without going back to beginWork.


  function updateSuspenseListComponent(current, workInProgress, renderLanes) {
    var nextProps = workInProgress.pendingProps;
    var revealOrder = nextProps.revealOrder;
    var tailMode = nextProps.tail;
    var newChildren = nextProps.children;
    validateRevealOrder(revealOrder);
    validateTailOptions(tailMode, revealOrder);
    validateSuspenseListChildren(newChildren, revealOrder);
    reconcileChildren(current, workInProgress, newChildren, renderLanes);
    var suspenseContext = suspenseStackCursor.current;
    var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);

    if (shouldForceFallback) {
      suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);
      workInProgress.flags |= DidCapture;
    } else {
      var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;

      if (didSuspendBefore) {
        // If we previously forced a fallback, we need to schedule work
        // on any nested boundaries to let them know to try to render
        // again. This is the same as context updating.
        propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);
      }

      suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
    }

    pushSuspenseContext(workInProgress, suspenseContext);

    if ((workInProgress.mode & ConcurrentMode) === NoMode) {
      // In legacy mode, SuspenseList doesn't work so we just
      // use make it a noop by treating it as the default revealOrder.
      workInProgress.memoizedState = null;
    } else {
      switch (revealOrder) {
        case 'forwards':
          {
            var lastContentRow = findLastContentRow(workInProgress.child);
            var tail;

            if (lastContentRow === null) {
              // The whole list is part of the tail.
              // TODO: We could fast path by just rendering the tail now.
              tail = workInProgress.child;
              workInProgress.child = null;
            } else {
              // Disconnect the tail rows after the content row.
              // We're going to render them separately later.
              tail = lastContentRow.sibling;
              lastContentRow.sibling = null;
            }

            initSuspenseListRenderState(workInProgress, false, // isBackwards
            tail, lastContentRow, tailMode);
            break;
          }

        case 'backwards':
          {
            // We're going to find the first row that has existing content.
            // At the same time we're going to reverse the list of everything
            // we pass in the meantime. That's going to be our tail in reverse
            // order.
            var _tail = null;
            var row = workInProgress.child;
            workInProgress.child = null;

            while (row !== null) {
              var currentRow = row.alternate; // New rows can't be content rows.

              if (currentRow !== null && findFirstSuspended(currentRow) === null) {
                // This is the beginning of the main content.
                workInProgress.child = row;
                break;
              }

              var nextRow = row.sibling;
              row.sibling = _tail;
              _tail = row;
              row = nextRow;
            } // TODO: If workInProgress.child is null, we can continue on the tail immediately.


            initSuspenseListRenderState(workInProgress, true, // isBackwards
            _tail, null, // last
            tailMode);
            break;
          }

        case 'together':
          {
            initSuspenseListRenderState(workInProgress, false, // isBackwards
            null, // tail
            null, // last
            undefined);
            break;
          }

        default:
          {
            // The default reveal order is the same as not having
            // a boundary.
            workInProgress.memoizedState = null;
          }
      }
    }

    return workInProgress.child;
  }

  function updatePortalComponent(current, workInProgress, renderLanes) {
    pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
    var nextChildren = workInProgress.pendingProps;

    if (current === null) {
      // Portals are special because we don't append the children during mount
      // but at commit. Therefore we need to track insertions which the normal
      // flow doesn't do during mount. This doesn't happen at the root because
      // the root always starts with a "current" with a null child.
      // TODO: Consider unifying this with how the root works.
      workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);
    } else {
      reconcileChildren(current, workInProgress, nextChildren, renderLanes);
    }

    return workInProgress.child;
  }

  var hasWarnedAboutUsingNoValuePropOnContextProvider = false;

  function updateContextProvider(current, workInProgress, renderLanes) {
    var providerType = workInProgress.type;
    var context = providerType._context;
    var newProps = workInProgress.pendingProps;
    var oldProps = workInProgress.memoizedProps;
    var newValue = newProps.value;

    {
      if (!('value' in newProps)) {
        if (!hasWarnedAboutUsingNoValuePropOnContextProvider) {
          hasWarnedAboutUsingNoValuePropOnContextProvider = true;

          error('The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?');
        }
      }

      var providerPropTypes = workInProgress.type.propTypes;

      if (providerPropTypes) {
        checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider');
      }
    }

    pushProvider(workInProgress, context, newValue);

    {
      if (oldProps !== null) {
        var oldValue = oldProps.value;

        if (objectIs(oldValue, newValue)) {
          // No change. Bailout early if children are the same.
          if (oldProps.children === newProps.children && !hasContextChanged()) {
            return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
          }
        } else {
          // The context value changed. Search for matching consumers and schedule
          // them to update.
          propagateContextChange(workInProgress, context, renderLanes);
        }
      }
    }

    var newChildren = newProps.children;
    reconcileChildren(current, workInProgress, newChildren, renderLanes);
    return workInProgress.child;
  }

  var hasWarnedAboutUsingContextAsConsumer = false;

  function updateContextConsumer(current, workInProgress, renderLanes) {
    var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In
    // DEV mode, we create a separate object for Context.Consumer that acts
    // like a proxy to Context. This proxy object adds unnecessary code in PROD
    // so we use the old behaviour (Context.Consumer references Context) to
    // reduce size and overhead. The separate object references context via
    // a property called "_context", which also gives us the ability to check
    // in DEV mode if this property exists or not and warn if it does not.

    {
      if (context._context === undefined) {
        // This may be because it's a Context (rather than a Consumer).
        // Or it may be because it's older React where they're the same thing.
        // We only want to warn if we're sure it's a new React.
        if (context !== context.Consumer) {
          if (!hasWarnedAboutUsingContextAsConsumer) {
            hasWarnedAboutUsingContextAsConsumer = true;

            error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
          }
        }
      } else {
        context = context._context;
      }
    }

    var newProps = workInProgress.pendingProps;
    var render = newProps.children;

    {
      if (typeof render !== 'function') {
        error('A context consumer was rendered with multiple children, or a child ' + "that isn't a function. A context consumer expects a single child " + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.');
      }
    }

    prepareToReadContext(workInProgress, renderLanes);
    var newValue = readContext(context);

    {
      markComponentRenderStarted(workInProgress);
    }

    var newChildren;

    {
      ReactCurrentOwner$1.current = workInProgress;
      setIsRendering(true);
      newChildren = render(newValue);
      setIsRendering(false);
    }

    {
      markComponentRenderStopped();
    } // React DevTools reads this flag.


    workInProgress.flags |= PerformedWork;
    reconcileChildren(current, workInProgress, newChildren, renderLanes);
    return workInProgress.child;
  }

  function markWorkInProgressReceivedUpdate() {
    didReceiveUpdate = true;
  }

  function resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) {
    if ((workInProgress.mode & ConcurrentMode) === NoMode) {
      if (current !== null) {
        // A lazy component only mounts if it suspended inside a non-
        // concurrent tree, in an inconsistent state. We want to treat it like
        // a new mount, even though an empty version of it already committed.
        // Disconnect the alternate pointers.
        current.alternate = null;
        workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect

        workInProgress.flags |= Placement;
      }
    }
  }

  function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {
    if (current !== null) {
      // Reuse previous dependencies
      workInProgress.dependencies = current.dependencies;
    }

    {
      // Don't update "base" render times for bailouts.
      stopProfilerTimerIfRunning();
    }

    markSkippedUpdateLanes(workInProgress.lanes); // Check if the children have any pending work.

    if (!includesSomeLane(renderLanes, workInProgress.childLanes)) {
      // The children don't have any work either. We can skip them.
      // TODO: Once we add back resuming, we should check if the children are
      // a work-in-progress set. If so, we need to transfer their effects.
      {
        return null;
      }
    } // This fiber doesn't have work, but its subtree does. Clone the child
    // fibers and continue.


    cloneChildFibers(current, workInProgress);
    return workInProgress.child;
  }

  function remountFiber(current, oldWorkInProgress, newWorkInProgress) {
    {
      var returnFiber = oldWorkInProgress.return;

      if (returnFiber === null) {
        // eslint-disable-next-line react-internal/prod-error-codes
        throw new Error('Cannot swap the root fiber.');
      } // Disconnect from the old current.
      // It will get deleted.


      current.alternate = null;
      oldWorkInProgress.alternate = null; // Connect to the new tree.

      newWorkInProgress.index = oldWorkInProgress.index;
      newWorkInProgress.sibling = oldWorkInProgress.sibling;
      newWorkInProgress.return = oldWorkInProgress.return;
      newWorkInProgress.ref = oldWorkInProgress.ref; // Replace the child/sibling pointers above it.

      if (oldWorkInProgress === returnFiber.child) {
        returnFiber.child = newWorkInProgress;
      } else {
        var prevSibling = returnFiber.child;

        if (prevSibling === null) {
          // eslint-disable-next-line react-internal/prod-error-codes
          throw new Error('Expected parent to have a child.');
        }

        while (prevSibling.sibling !== oldWorkInProgress) {
          prevSibling = prevSibling.sibling;

          if (prevSibling === null) {
            // eslint-disable-next-line react-internal/prod-error-codes
            throw new Error('Expected to find the previous sibling.');
          }
        }

        prevSibling.sibling = newWorkInProgress;
      } // Delete the old fiber and place the new one.
      // Since the old fiber is disconnected, we have to schedule it manually.


      var deletions = returnFiber.deletions;

      if (deletions === null) {
        returnFiber.deletions = [current];
        returnFiber.flags |= ChildDeletion;
      } else {
        deletions.push(current);
      }

      newWorkInProgress.flags |= Placement; // Restart work from the new fiber.

      return newWorkInProgress;
    }
  }

  function checkScheduledUpdateOrContext(current, renderLanes) {
    // Before performing an early bailout, we must check if there are pending
    // updates or context.
    var updateLanes = current.lanes;

    if (includesSomeLane(updateLanes, renderLanes)) {
      return true;
    } // No pending update, but because context is propagated lazily, we need

    return false;
  }

  function attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress, renderLanes) {
    // This fiber does not have any pending work. Bailout without entering
    // the begin phase. There's still some bookkeeping we that needs to be done
    // in this optimized path, mostly pushing stuff onto the stack.
    switch (workInProgress.tag) {
      case HostRoot:
        pushHostRootContext(workInProgress);
        var root = workInProgress.stateNode;

        resetHydrationState();
        break;

      case HostComponent:
        pushHostContext(workInProgress);
        break;

      case ClassComponent:
        {
          var Component = workInProgress.type;

          if (isContextProvider(Component)) {
            pushContextProvider(workInProgress);
          }

          break;
        }

      case HostPortal:
        pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
        break;

      case ContextProvider:
        {
          var newValue = workInProgress.memoizedProps.value;
          var context = workInProgress.type._context;
          pushProvider(workInProgress, context, newValue);
          break;
        }

      case Profiler:
        {
          // Profiler should only call onRender when one of its descendants actually rendered.
          var hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);

          if (hasChildWork) {
            workInProgress.flags |= Update;
          }

          {
            // Reset effect durations for the next eventual effect phase.
            // These are reset during render to allow the DevTools commit hook a chance to read them,
            var stateNode = workInProgress.stateNode;
            stateNode.effectDuration = 0;
            stateNode.passiveEffectDuration = 0;
          }
        }

        break;

      case SuspenseComponent:
        {
          var state = workInProgress.memoizedState;

          if (state !== null) {
            if (state.dehydrated !== null) {
              pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // We know that this component will suspend again because if it has
              // been unsuspended it has committed as a resolved Suspense component.
              // If it needs to be retried, it should have work scheduled on it.

              workInProgress.flags |= DidCapture; // We should never render the children of a dehydrated boundary until we
              // upgrade it. We return null instead of bailoutOnAlreadyFinishedWork.

              return null;
            } // If this boundary is currently timed out, we need to decide
            // whether to retry the primary children, or to skip over it and
            // go straight to the fallback. Check the priority of the primary
            // child fragment.


            var primaryChildFragment = workInProgress.child;
            var primaryChildLanes = primaryChildFragment.childLanes;

            if (includesSomeLane(renderLanes, primaryChildLanes)) {
              // The primary children have pending work. Use the normal path
              // to attempt to render the primary children again.
              return updateSuspenseComponent(current, workInProgress, renderLanes);
            } else {
              // The primary child fragment does not have pending work marked
              // on it
              pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // The primary children do not have pending work with sufficient
              // priority. Bailout.

              var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);

              if (child !== null) {
                // The fallback children have pending work. Skip over the
                // primary children and work on the fallback.
                return child.sibling;
              } else {
                // Note: We can return `null` here because we already checked
                // whether there were nested context consumers, via the call to
                // `bailoutOnAlreadyFinishedWork` above.
                return null;
              }
            }
          } else {
            pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));
          }

          break;
        }

      case SuspenseListComponent:
        {
          var didSuspendBefore = (current.flags & DidCapture) !== NoFlags;

          var _hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);

          if (didSuspendBefore) {
            if (_hasChildWork) {
              // If something was in fallback state last time, and we have all the
              // same children then we're still in progressive loading state.
              // Something might get unblocked by state updates or retries in the
              // tree which will affect the tail. So we need to use the normal
              // path to compute the correct tail.
              return updateSuspenseListComponent(current, workInProgress, renderLanes);
            } // If none of the children had any work, that means that none of
            // them got retried so they'll still be blocked in the same way
            // as before. We can fast bail out.


            workInProgress.flags |= DidCapture;
          } // If nothing suspended before and we're rendering the same children,
          // then the tail doesn't matter. Anything new that suspends will work
          // in the "together" mode, so we can continue from the state we had.


          var renderState = workInProgress.memoizedState;

          if (renderState !== null) {
            // Reset to the "together" mode in case we've started a different
            // update in the past but didn't complete it.
            renderState.rendering = null;
            renderState.tail = null;
            renderState.lastEffect = null;
          }

          pushSuspenseContext(workInProgress, suspenseStackCursor.current);

          if (_hasChildWork) {
            break;
          } else {
            // If none of the children had any work, that means that none of
            // them got retried so they'll still be blocked in the same way
            // as before. We can fast bail out.
            return null;
          }
        }

      case OffscreenComponent:
      case LegacyHiddenComponent:
        {
          // Need to check if the tree still needs to be deferred. This is
          // almost identical to the logic used in the normal update path,
          // so we'll just enter that. The only difference is we'll bail out
          // at the next level instead of this one, because the child props
          // have not changed. Which is fine.
          // TODO: Probably should refactor `beginWork` to split the bailout
          // path from the normal path. I'm tempted to do a labeled break here
          // but I won't :)
          workInProgress.lanes = NoLanes;
          return updateOffscreenComponent(current, workInProgress, renderLanes);
        }
    }

    return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
  }

  function beginWork(current, workInProgress, renderLanes) {
    {
      if (workInProgress._debugNeedsRemount && current !== null) {
        // This will restart the begin phase with a new fiber.
        return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.lanes));
      }
    }

    if (current !== null) {
      var oldProps = current.memoizedProps;
      var newProps = workInProgress.pendingProps;

      if (oldProps !== newProps || hasContextChanged() || ( // Force a re-render if the implementation changed due to hot reload:
       workInProgress.type !== current.type )) {
        // If props or context changed, mark the fiber as having performed work.
        // This may be unset if the props are determined to be equal later (memo).
        didReceiveUpdate = true;
      } else {
        // Neither props nor legacy context changes. Check if there's a pending
        // update or context change.
        var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(current, renderLanes);

        if (!hasScheduledUpdateOrContext && // If this is the second pass of an error or suspense boundary, there
        // may not be work scheduled on `current`, so we check for this flag.
        (workInProgress.flags & DidCapture) === NoFlags) {
          // No pending updates or context. Bail out now.
          didReceiveUpdate = false;
          return attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress, renderLanes);
        }

        if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {
          // This is a special case that only exists for legacy mode.
          // See https://github.com/facebook/react/pull/19216.
          didReceiveUpdate = true;
        } else {
          // An update was scheduled on this fiber, but there are no new props
          // nor legacy context. Set this to false. If an update queue or context
          // consumer produces a changed value, it will set this to true. Otherwise,
          // the component will assume the children have not changed and bail out.
          didReceiveUpdate = false;
        }
      }
    } else {
      didReceiveUpdate = false;

      if (getIsHydrating() && isForkedChild(workInProgress)) {
        // Check if this child belongs to a list of muliple children in
        // its parent.
        //
        // In a true multi-threaded implementation, we would render children on
        // parallel threads. This would represent the beginning of a new render
        // thread for this subtree.
        //
        // We only use this for id generation during hydration, which is why the
        // logic is located in this special branch.
        var slotIndex = workInProgress.index;
        var numberOfForks = getForksAtLevel();
        pushTreeId(workInProgress, numberOfForks, slotIndex);
      }
    } // Before entering the begin phase, clear pending update priority.
    // TODO: This assumes that we're about to evaluate the component and process
    // the update queue. However, there's an exception: SimpleMemoComponent
    // sometimes bails out later in the begin phase. This indicates that we should
    // move this assignment out of the common path and into each branch.


    workInProgress.lanes = NoLanes;

    switch (workInProgress.tag) {
      case IndeterminateComponent:
        {
          return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderLanes);
        }

      case LazyComponent:
        {
          var elementType = workInProgress.elementType;
          return mountLazyComponent(current, workInProgress, elementType, renderLanes);
        }

      case FunctionComponent:
        {
          var Component = workInProgress.type;
          var unresolvedProps = workInProgress.pendingProps;
          var resolvedProps = workInProgress.elementType === Component ? unresolvedProps : resolveDefaultProps(Component, unresolvedProps);
          return updateFunctionComponent(current, workInProgress, Component, resolvedProps, renderLanes);
        }

      case ClassComponent:
        {
          var _Component = workInProgress.type;
          var _unresolvedProps = workInProgress.pendingProps;

          var _resolvedProps = workInProgress.elementType === _Component ? _unresolvedProps : resolveDefaultProps(_Component, _unresolvedProps);

          return updateClassComponent(current, workInProgress, _Component, _resolvedProps, renderLanes);
        }

      case HostRoot:
        return updateHostRoot(current, workInProgress, renderLanes);

      case HostComponent:
        return updateHostComponent(current, workInProgress, renderLanes);

      case HostText:
        return updateHostText(current, workInProgress);

      case SuspenseComponent:
        return updateSuspenseComponent(current, workInProgress, renderLanes);

      case HostPortal:
        return updatePortalComponent(current, workInProgress, renderLanes);

      case ForwardRef:
        {
          var type = workInProgress.type;
          var _unresolvedProps2 = workInProgress.pendingProps;

          var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);

          return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderLanes);
        }

      case Fragment:
        return updateFragment(current, workInProgress, renderLanes);

      case Mode:
        return updateMode(current, workInProgress, renderLanes);

      case Profiler:
        return updateProfiler(current, workInProgress, renderLanes);

      case ContextProvider:
        return updateContextProvider(current, workInProgress, renderLanes);

      case ContextConsumer:
        return updateContextConsumer(current, workInProgress, renderLanes);

      case MemoComponent:
        {
          var _type2 = workInProgress.type;
          var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props.

          var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3);

          {
            if (workInProgress.type !== workInProgress.elementType) {
              var outerPropTypes = _type2.propTypes;

              if (outerPropTypes) {
                checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer only
                'prop', getComponentNameFromType(_type2));
              }
            }
          }

          _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);
          return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, renderLanes);
        }

      case SimpleMemoComponent:
        {
          return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, renderLanes);
        }

      case IncompleteClassComponent:
        {
          var _Component2 = workInProgress.type;
          var _unresolvedProps4 = workInProgress.pendingProps;

          var _resolvedProps4 = workInProgress.elementType === _Component2 ? _unresolvedProps4 : resolveDefaultProps(_Component2, _unresolvedProps4);

          return mountIncompleteClassComponent(current, workInProgress, _Component2, _resolvedProps4, renderLanes);
        }

      case SuspenseListComponent:
        {
          return updateSuspenseListComponent(current, workInProgress, renderLanes);
        }

      case ScopeComponent:
        {

          break;
        }

      case OffscreenComponent:
        {
          return updateOffscreenComponent(current, workInProgress, renderLanes);
        }
    }

    throw new Error("Unknown unit of work tag (" + workInProgress.tag + "). This error is likely caused by a bug in " + 'React. Please file an issue.');
  }

  function markUpdate(workInProgress) {
    // Tag the fiber with an update effect. This turns a Placement into
    // a PlacementAndUpdate.
    workInProgress.flags |= Update;
  }

  function markRef$1(workInProgress) {
    workInProgress.flags |= Ref;

    {
      workInProgress.flags |= RefStatic;
    }
  }

  var appendAllChildren;
  var updateHostContainer;
  var updateHostComponent$1;
  var updateHostText$1;

  {
    // Mutation mode
    appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) {
      // We only have the top Fiber that was created but we need recurse down its
      // children to find all the terminal nodes.
      var node = workInProgress.child;

      while (node !== null) {
        if (node.tag === HostComponent || node.tag === HostText) {
          appendInitialChild(parent, node.stateNode);
        } else if (node.tag === HostPortal) ; else if (node.child !== null) {
          node.child.return = node;
          node = node.child;
          continue;
        }

        if (node === workInProgress) {
          return;
        }

        while (node.sibling === null) {
          if (node.return === null || node.return === workInProgress) {
            return;
          }

          node = node.return;
        }

        node.sibling.return = node.return;
        node = node.sibling;
      }
    };

    updateHostContainer = function (current, workInProgress) {// Noop
    };

    updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {
      // If we have an alternate, that means this is an update and we need to
      // schedule a side-effect to do the updates.
      var oldProps = current.memoizedProps;

      if (oldProps === newProps) {
        // In mutation mode, this is sufficient for a bailout because
        // we won't touch this node even if children changed.
        return;
      } // If we get updated because one of our children updated, we don't
      // have newProps so we'll have to reuse them.
      // TODO: Split the update API as separate for the props vs. children.
      // Even better would be if children weren't special cased at all tho.


      var instance = workInProgress.stateNode;
      var currentHostContext = getHostContext(); // TODO: Experiencing an error where oldProps is null. Suggests a host
      // component is hitting the resume path. Figure out why. Possibly
      // related to `hidden`.

      var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext); // TODO: Type this specific to this type of component.

      workInProgress.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there
      // is a new ref we mark this as an update. All the work is done in commitWork.

      if (updatePayload) {
        markUpdate(workInProgress);
      }
    };

    updateHostText$1 = function (current, workInProgress, oldText, newText) {
      // If the text differs, mark it as an update. All the work in done in commitWork.
      if (oldText !== newText) {
        markUpdate(workInProgress);
      }
    };
  }

  function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
    if (getIsHydrating()) {
      // If we're hydrating, we should consume as many items as we can
      // so we don't leave any behind.
      return;
    }

    switch (renderState.tailMode) {
      case 'hidden':
        {
          // Any insertions at the end of the tail list after this point
          // should be invisible. If there are already mounted boundaries
          // anything before them are not considered for collapsing.
          // Therefore we need to go through the whole tail to find if
          // there are any.
          var tailNode = renderState.tail;
          var lastTailNode = null;

          while (tailNode !== null) {
            if (tailNode.alternate !== null) {
              lastTailNode = tailNode;
            }

            tailNode = tailNode.sibling;
          } // Next we're simply going to delete all insertions after the
          // last rendered item.


          if (lastTailNode === null) {
            // All remaining items in the tail are insertions.
            renderState.tail = null;
          } else {
            // Detach the insertion after the last node that was already
            // inserted.
            lastTailNode.sibling = null;
          }

          break;
        }

      case 'collapsed':
        {
          // Any insertions at the end of the tail list after this point
          // should be invisible. If there are already mounted boundaries
          // anything before them are not considered for collapsing.
          // Therefore we need to go through the whole tail to find if
          // there are any.
          var _tailNode = renderState.tail;
          var _lastTailNode = null;

          while (_tailNode !== null) {
            if (_tailNode.alternate !== null) {
              _lastTailNode = _tailNode;
            }

            _tailNode = _tailNode.sibling;
          } // Next we're simply going to delete all insertions after the
          // last rendered item.


          if (_lastTailNode === null) {
            // All remaining items in the tail are insertions.
            if (!hasRenderedATailFallback && renderState.tail !== null) {
              // We suspended during the head. We want to show at least one
              // row at the tail. So we'll keep on and cut off the rest.
              renderState.tail.sibling = null;
            } else {
              renderState.tail = null;
            }
          } else {
            // Detach the insertion after the last node that was already
            // inserted.
            _lastTailNode.sibling = null;
          }

          break;
        }
    }
  }

  function bubbleProperties(completedWork) {
    var didBailout = completedWork.alternate !== null && completedWork.alternate.child === completedWork.child;
    var newChildLanes = NoLanes;
    var subtreeFlags = NoFlags;

    if (!didBailout) {
      // Bubble up the earliest expiration time.
      if ( (completedWork.mode & ProfileMode) !== NoMode) {
        // In profiling mode, resetChildExpirationTime is also used to reset
        // profiler durations.
        var actualDuration = completedWork.actualDuration;
        var treeBaseDuration = completedWork.selfBaseDuration;
        var child = completedWork.child;

        while (child !== null) {
          newChildLanes = mergeLanes(newChildLanes, mergeLanes(child.lanes, child.childLanes));
          subtreeFlags |= child.subtreeFlags;
          subtreeFlags |= child.flags; // When a fiber is cloned, its actualDuration is reset to 0. This value will
          // only be updated if work is done on the fiber (i.e. it doesn't bailout).
          // When work is done, it should bubble to the parent's actualDuration. If
          // the fiber has not been cloned though, (meaning no work was done), then
          // this value will reflect the amount of time spent working on a previous
          // render. In that case it should not bubble. We determine whether it was
          // cloned by comparing the child pointer.

          actualDuration += child.actualDuration;
          treeBaseDuration += child.treeBaseDuration;
          child = child.sibling;
        }

        completedWork.actualDuration = actualDuration;
        completedWork.treeBaseDuration = treeBaseDuration;
      } else {
        var _child = completedWork.child;

        while (_child !== null) {
          newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child.lanes, _child.childLanes));
          subtreeFlags |= _child.subtreeFlags;
          subtreeFlags |= _child.flags; // Update the return pointer so the tree is consistent. This is a code
          // smell because it assumes the commit phase is never concurrent with
          // the render phase. Will address during refactor to alternate model.

          _child.return = completedWork;
          _child = _child.sibling;
        }
      }

      completedWork.subtreeFlags |= subtreeFlags;
    } else {
      // Bubble up the earliest expiration time.
      if ( (completedWork.mode & ProfileMode) !== NoMode) {
        // In profiling mode, resetChildExpirationTime is also used to reset
        // profiler durations.
        var _treeBaseDuration = completedWork.selfBaseDuration;
        var _child2 = completedWork.child;

        while (_child2 !== null) {
          newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child2.lanes, _child2.childLanes)); // "Static" flags share the lifetime of the fiber/hook they belong to,
          // so we should bubble those up even during a bailout. All the other
          // flags have a lifetime only of a single render + commit, so we should
          // ignore them.

          subtreeFlags |= _child2.subtreeFlags & StaticMask;
          subtreeFlags |= _child2.flags & StaticMask;
          _treeBaseDuration += _child2.treeBaseDuration;
          _child2 = _child2.sibling;
        }

        completedWork.treeBaseDuration = _treeBaseDuration;
      } else {
        var _child3 = completedWork.child;

        while (_child3 !== null) {
          newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child3.lanes, _child3.childLanes)); // "Static" flags share the lifetime of the fiber/hook they belong to,
          // so we should bubble those up even during a bailout. All the other
          // flags have a lifetime only of a single render + commit, so we should
          // ignore them.

          subtreeFlags |= _child3.subtreeFlags & StaticMask;
          subtreeFlags |= _child3.flags & StaticMask; // Update the return pointer so the tree is consistent. This is a code
          // smell because it assumes the commit phase is never concurrent with
          // the render phase. Will address during refactor to alternate model.

          _child3.return = completedWork;
          _child3 = _child3.sibling;
        }
      }

      completedWork.subtreeFlags |= subtreeFlags;
    }

    completedWork.childLanes = newChildLanes;
    return didBailout;
  }

  function completeDehydratedSuspenseBoundary(current, workInProgress, nextState) {
    if (hasUnhydratedTailNodes() && (workInProgress.mode & ConcurrentMode) !== NoMode && (workInProgress.flags & DidCapture) === NoFlags) {
      warnIfUnhydratedTailNodes(workInProgress);
      resetHydrationState();
      workInProgress.flags |= ForceClientRender | Incomplete | ShouldCapture;
      return false;
    }

    var wasHydrated = popHydrationState(workInProgress);

    if (nextState !== null && nextState.dehydrated !== null) {
      // We might be inside a hydration state the first time we're picking up this
      // Suspense boundary, and also after we've reentered it for further hydration.
      if (current === null) {
        if (!wasHydrated) {
          throw new Error('A dehydrated suspense component was completed without a hydrated node. ' + 'This is probably a bug in React.');
        }

        prepareToHydrateHostSuspenseInstance(workInProgress);
        bubbleProperties(workInProgress);

        {
          if ((workInProgress.mode & ProfileMode) !== NoMode) {
            var isTimedOutSuspense = nextState !== null;

            if (isTimedOutSuspense) {
              // Don't count time spent in a timed out Suspense subtree as part of the base duration.
              var primaryChildFragment = workInProgress.child;

              if (primaryChildFragment !== null) {
                // $FlowFixMe Flow doesn't support type casting in combination with the -= operator
                workInProgress.treeBaseDuration -= primaryChildFragment.treeBaseDuration;
              }
            }
          }
        }

        return false;
      } else {
        // We might have reentered this boundary to hydrate it. If so, we need to reset the hydration
        // state since we're now exiting out of it. popHydrationState doesn't do that for us.
        resetHydrationState();

        if ((workInProgress.flags & DidCapture) === NoFlags) {
          // This boundary did not suspend so it's now hydrated and unsuspended.
          workInProgress.memoizedState = null;
        } // If nothing suspended, we need to schedule an effect to mark this boundary
        // as having hydrated so events know that they're free to be invoked.
        // It's also a signal to replay events and the suspense callback.
        // If something suspended, schedule an effect to attach retry listeners.
        // So we might as well always mark this.


        workInProgress.flags |= Update;
        bubbleProperties(workInProgress);

        {
          if ((workInProgress.mode & ProfileMode) !== NoMode) {
            var _isTimedOutSuspense = nextState !== null;

            if (_isTimedOutSuspense) {
              // Don't count time spent in a timed out Suspense subtree as part of the base duration.
              var _primaryChildFragment = workInProgress.child;

              if (_primaryChildFragment !== null) {
                // $FlowFixMe Flow doesn't support type casting in combination with the -= operator
                workInProgress.treeBaseDuration -= _primaryChildFragment.treeBaseDuration;
              }
            }
          }
        }

        return false;
      }
    } else {
      // Successfully completed this tree. If this was a forced client render,
      // there may have been recoverable errors during first hydration
      // attempt. If so, add them to a queue so we can log them in the
      // commit phase.
      upgradeHydrationErrorsToRecoverable(); // Fall through to normal Suspense path

      return true;
    }
  }

  function completeWork(current, workInProgress, renderLanes) {
    var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing
    // to the current tree provider fiber is just as fast and less error-prone.
    // Ideally we would have a special version of the work loop only
    // for hydration.

    popTreeContext(workInProgress);

    switch (workInProgress.tag) {
      case IndeterminateComponent:
      case LazyComponent:
      case SimpleMemoComponent:
      case FunctionComponent:
      case ForwardRef:
      case Fragment:
      case Mode:
      case Profiler:
      case ContextConsumer:
      case MemoComponent:
        bubbleProperties(workInProgress);
        return null;

      case ClassComponent:
        {
          var Component = workInProgress.type;

          if (isContextProvider(Component)) {
            popContext(workInProgress);
          }

          bubbleProperties(workInProgress);
          return null;
        }

      case HostRoot:
        {
          var fiberRoot = workInProgress.stateNode;
          popHostContainer(workInProgress);
          popTopLevelContextObject(workInProgress);
          resetWorkInProgressVersions();

          if (fiberRoot.pendingContext) {
            fiberRoot.context = fiberRoot.pendingContext;
            fiberRoot.pendingContext = null;
          }

          if (current === null || current.child === null) {
            // If we hydrated, pop so that we can delete any remaining children
            // that weren't hydrated.
            var wasHydrated = popHydrationState(workInProgress);

            if (wasHydrated) {
              // If we hydrated, then we'll need to schedule an update for
              // the commit side-effects on the root.
              markUpdate(workInProgress);
            } else {
              if (current !== null) {
                var prevState = current.memoizedState;

                if ( // Check if this is a client root
                !prevState.isDehydrated || // Check if we reverted to client rendering (e.g. due to an error)
                (workInProgress.flags & ForceClientRender) !== NoFlags) {
                  // Schedule an effect to clear this container at the start of the
                  // next commit. This handles the case of React rendering into a
                  // container with previous children. It's also safe to do for
                  // updates too, because current.child would only be null if the
                  // previous render was null (so the container would already
                  // be empty).
                  workInProgress.flags |= Snapshot; // If this was a forced client render, there may have been
                  // recoverable errors during first hydration attempt. If so, add
                  // them to a queue so we can log them in the commit phase.

                  upgradeHydrationErrorsToRecoverable();
                }
              }
            }
          }

          updateHostContainer(current, workInProgress);
          bubbleProperties(workInProgress);

          return null;
        }

      case HostComponent:
        {
          popHostContext(workInProgress);
          var rootContainerInstance = getRootHostContainer();
          var type = workInProgress.type;

          if (current !== null && workInProgress.stateNode != null) {
            updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance);

            if (current.ref !== workInProgress.ref) {
              markRef$1(workInProgress);
            }
          } else {
            if (!newProps) {
              if (workInProgress.stateNode === null) {
                throw new Error('We must have new props for new mounts. This error is likely ' + 'caused by a bug in React. Please file an issue.');
              } // This can happen when we abort work.


              bubbleProperties(workInProgress);
              return null;
            }

            var currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context
            // "stack" as the parent. Then append children as we go in beginWork
            // or completeWork depending on whether we want to add them top->down or
            // bottom->up. Top->down is faster in IE11.

            var _wasHydrated = popHydrationState(workInProgress);

            if (_wasHydrated) {
              // TODO: Move this and createInstance step into the beginPhase
              // to consolidate.
              if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext)) {
                // If changes to the hydrated node need to be applied at the
                // commit-phase we mark this as such.
                markUpdate(workInProgress);
              }
            } else {
              var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress);
              appendAllChildren(instance, workInProgress, false, false);
              workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount.
              // (eg DOM renderer supports auto-focus for certain elements).
              // Make sure such renderers get scheduled for later work.

              if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance)) {
                markUpdate(workInProgress);
              }
            }

            if (workInProgress.ref !== null) {
              // If there is a ref on a host node we need to schedule a callback
              markRef$1(workInProgress);
            }
          }

          bubbleProperties(workInProgress);
          return null;
        }

      case HostText:
        {
          var newText = newProps;

          if (current && workInProgress.stateNode != null) {
            var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need
            // to schedule a side-effect to do the updates.

            updateHostText$1(current, workInProgress, oldText, newText);
          } else {
            if (typeof newText !== 'string') {
              if (workInProgress.stateNode === null) {
                throw new Error('We must have new props for new mounts. This error is likely ' + 'caused by a bug in React. Please file an issue.');
              } // This can happen when we abort work.

            }

            var _rootContainerInstance = getRootHostContainer();

            var _currentHostContext = getHostContext();

            var _wasHydrated2 = popHydrationState(workInProgress);

            if (_wasHydrated2) {
              if (prepareToHydrateHostTextInstance(workInProgress)) {
                markUpdate(workInProgress);
              }
            } else {
              workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress);
            }
          }

          bubbleProperties(workInProgress);
          return null;
        }

      case SuspenseComponent:
        {
          popSuspenseContext(workInProgress);
          var nextState = workInProgress.memoizedState; // Special path for dehydrated boundaries. We may eventually move this
          // to its own fiber type so that we can add other kinds of hydration
          // boundaries that aren't associated with a Suspense tree. In anticipation
          // of such a refactor, all the hydration logic is contained in
          // this branch.

          if (current === null || current.memoizedState !== null && current.memoizedState.dehydrated !== null) {
            var fallthroughToNormalSuspensePath = completeDehydratedSuspenseBoundary(current, workInProgress, nextState);

            if (!fallthroughToNormalSuspensePath) {
              if (workInProgress.flags & ShouldCapture) {
                // Special case. There were remaining unhydrated nodes. We treat
                // this as a mismatch. Revert to client rendering.
                return workInProgress;
              } else {
                // Did not finish hydrating, either because this is the initial
                // render or because something suspended.
                return null;
              }
            } // Continue with the normal Suspense path.

          }

          if ((workInProgress.flags & DidCapture) !== NoFlags) {
            // Something suspended. Re-render with the fallback children.
            workInProgress.lanes = renderLanes; // Do not reset the effect list.

            if ( (workInProgress.mode & ProfileMode) !== NoMode) {
              transferActualDuration(workInProgress);
            } // Don't bubble properties in this case.


            return workInProgress;
          }

          var nextDidTimeout = nextState !== null;
          var prevDidTimeout = current !== null && current.memoizedState !== null;
          // a passive effect, which is when we process the transitions


          if (nextDidTimeout !== prevDidTimeout) {
            // an effect to toggle the subtree's visibility. When we switch from
            // fallback -> primary, the inner Offscreen fiber schedules this effect
            // as part of its normal complete phase. But when we switch from
            // primary -> fallback, the inner Offscreen fiber does not have a complete
            // phase. So we need to schedule its effect here.
            //
            // We also use this flag to connect/disconnect the effects, but the same
            // logic applies: when re-connecting, the Offscreen fiber's complete
            // phase will handle scheduling the effect. It's only when the fallback
            // is active that we have to do anything special.


            if (nextDidTimeout) {
              var _offscreenFiber2 = workInProgress.child;
              _offscreenFiber2.flags |= Visibility; // TODO: This will still suspend a synchronous tree if anything
              // in the concurrent tree already suspended during this render.
              // This is a known bug.

              if ((workInProgress.mode & ConcurrentMode) !== NoMode) {
                // TODO: Move this back to throwException because this is too late
                // if this is a large tree which is common for initial loads. We
                // don't know if we should restart a render or not until we get
                // this marker, and this is too late.
                // If this render already had a ping or lower pri updates,
                // and this is the first time we know we're going to suspend we
                // should be able to immediately restart from within throwException.
                var hasInvisibleChildContext = current === null && (workInProgress.memoizedProps.unstable_avoidThisFallback !== true || !enableSuspenseAvoidThisFallback);

                if (hasInvisibleChildContext || hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext)) {
                  // If this was in an invisible tree or a new render, then showing
                  // this boundary is ok.
                  renderDidSuspend();
                } else {
                  // Otherwise, we're going to have to hide content so we should
                  // suspend for longer if possible.
                  renderDidSuspendDelayIfPossible();
                }
              }
            }
          }

          var wakeables = workInProgress.updateQueue;

          if (wakeables !== null) {
            // Schedule an effect to attach a retry listener to the promise.
            // TODO: Move to passive phase
            workInProgress.flags |= Update;
          }

          bubbleProperties(workInProgress);

          {
            if ((workInProgress.mode & ProfileMode) !== NoMode) {
              if (nextDidTimeout) {
                // Don't count time spent in a timed out Suspense subtree as part of the base duration.
                var primaryChildFragment = workInProgress.child;

                if (primaryChildFragment !== null) {
                  // $FlowFixMe Flow doesn't support type casting in combination with the -= operator
                  workInProgress.treeBaseDuration -= primaryChildFragment.treeBaseDuration;
                }
              }
            }
          }

          return null;
        }

      case HostPortal:
        popHostContainer(workInProgress);
        updateHostContainer(current, workInProgress);

        if (current === null) {
          preparePortalMount(workInProgress.stateNode.containerInfo);
        }

        bubbleProperties(workInProgress);
        return null;

      case ContextProvider:
        // Pop provider fiber
        var context = workInProgress.type._context;
        popProvider(context, workInProgress);
        bubbleProperties(workInProgress);
        return null;

      case IncompleteClassComponent:
        {
          // Same as class component case. I put it down here so that the tags are
          // sequential to ensure this switch is compiled to a jump table.
          var _Component = workInProgress.type;

          if (isContextProvider(_Component)) {
            popContext(workInProgress);
          }

          bubbleProperties(workInProgress);
          return null;
        }

      case SuspenseListComponent:
        {
          popSuspenseContext(workInProgress);
          var renderState = workInProgress.memoizedState;

          if (renderState === null) {
            // We're running in the default, "independent" mode.
            // We don't do anything in this mode.
            bubbleProperties(workInProgress);
            return null;
          }

          var didSuspendAlready = (workInProgress.flags & DidCapture) !== NoFlags;
          var renderedTail = renderState.rendering;

          if (renderedTail === null) {
            // We just rendered the head.
            if (!didSuspendAlready) {
              // This is the first pass. We need to figure out if anything is still
              // suspended in the rendered set.
              // If new content unsuspended, but there's still some content that
              // didn't. Then we need to do a second pass that forces everything
              // to keep showing their fallbacks.
              // We might be suspended if something in this render pass suspended, or
              // something in the previous committed pass suspended. Otherwise,
              // there's no chance so we can skip the expensive call to
              // findFirstSuspended.
              var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.flags & DidCapture) === NoFlags);

              if (!cannotBeSuspended) {
                var row = workInProgress.child;

                while (row !== null) {
                  var suspended = findFirstSuspended(row);

                  if (suspended !== null) {
                    didSuspendAlready = true;
                    workInProgress.flags |= DidCapture;
                    cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as
                    // part of the second pass. In that case nothing will subscribe to
                    // its thenables. Instead, we'll transfer its thenables to the
                    // SuspenseList so that it can retry if they resolve.
                    // There might be multiple of these in the list but since we're
                    // going to wait for all of them anyway, it doesn't really matter
                    // which ones gets to ping. In theory we could get clever and keep
                    // track of how many dependencies remain but it gets tricky because
                    // in the meantime, we can add/remove/change items and dependencies.
                    // We might bail out of the loop before finding any but that
                    // doesn't matter since that means that the other boundaries that
                    // we did find already has their listeners attached.

                    var newThenables = suspended.updateQueue;

                    if (newThenables !== null) {
                      workInProgress.updateQueue = newThenables;
                      workInProgress.flags |= Update;
                    } // Rerender the whole list, but this time, we'll force fallbacks
                    // to stay in place.
                    // Reset the effect flags before doing the second pass since that's now invalid.
                    // Reset the child fibers to their original state.


                    workInProgress.subtreeFlags = NoFlags;
                    resetChildFibers(workInProgress, renderLanes); // Set up the Suspense Context to force suspense and immediately
                    // rerender the children.

                    pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback)); // Don't bubble properties in this case.

                    return workInProgress.child;
                  }

                  row = row.sibling;
                }
              }

              if (renderState.tail !== null && now() > getRenderTargetTime()) {
                // We have already passed our CPU deadline but we still have rows
                // left in the tail. We'll just give up further attempts to render
                // the main content and only render fallbacks.
                workInProgress.flags |= DidCapture;
                didSuspendAlready = true;
                cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this
                // to get it started back up to attempt the next item. While in terms
                // of priority this work has the same priority as this current render,
                // it's not part of the same transition once the transition has
                // committed. If it's sync, we still want to yield so that it can be
                // painted. Conceptually, this is really the same as pinging.
                // We can use any RetryLane even if it's the one currently rendering
                // since we're leaving it behind on this node.

                workInProgress.lanes = SomeRetryLane;
              }
            } else {
              cutOffTailIfNeeded(renderState, false);
            } // Next we're going to render the tail.

          } else {
            // Append the rendered row to the child list.
            if (!didSuspendAlready) {
              var _suspended = findFirstSuspended(renderedTail);

              if (_suspended !== null) {
                workInProgress.flags |= DidCapture;
                didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't
                // get lost if this row ends up dropped during a second pass.

                var _newThenables = _suspended.updateQueue;

                if (_newThenables !== null) {
                  workInProgress.updateQueue = _newThenables;
                  workInProgress.flags |= Update;
                }

                cutOffTailIfNeeded(renderState, true); // This might have been modified.

                if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate && !getIsHydrating() // We don't cut it if we're hydrating.
                ) {
                    // We're done.
                    bubbleProperties(workInProgress);
                    return null;
                  }
              } else if ( // The time it took to render last row is greater than the remaining
              // time we have to render. So rendering one more row would likely
              // exceed it.
              now() * 2 - renderState.renderingStartTime > getRenderTargetTime() && renderLanes !== OffscreenLane) {
                // We have now passed our CPU deadline and we'll just give up further
                // attempts to render the main content and only render fallbacks.
                // The assumption is that this is usually faster.
                workInProgress.flags |= DidCapture;
                didSuspendAlready = true;
                cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this
                // to get it started back up to attempt the next item. While in terms
                // of priority this work has the same priority as this current render,
                // it's not part of the same transition once the transition has
                // committed. If it's sync, we still want to yield so that it can be
                // painted. Conceptually, this is really the same as pinging.
                // We can use any RetryLane even if it's the one currently rendering
                // since we're leaving it behind on this node.

                workInProgress.lanes = SomeRetryLane;
              }
            }

            if (renderState.isBackwards) {
              // The effect list of the backwards tail will have been added
              // to the end. This breaks the guarantee that life-cycles fire in
              // sibling order but that isn't a strong guarantee promised by React.
              // Especially since these might also just pop in during future commits.
              // Append to the beginning of the list.
              renderedTail.sibling = workInProgress.child;
              workInProgress.child = renderedTail;
            } else {
              var previousSibling = renderState.last;

              if (previousSibling !== null) {
                previousSibling.sibling = renderedTail;
              } else {
                workInProgress.child = renderedTail;
              }

              renderState.last = renderedTail;
            }
          }

          if (renderState.tail !== null) {
            // We still have tail rows to render.
            // Pop a row.
            var next = renderState.tail;
            renderState.rendering = next;
            renderState.tail = next.sibling;
            renderState.renderingStartTime = now();
            next.sibling = null; // Restore the context.
            // TODO: We can probably just avoid popping it instead and only
            // setting it the first time we go from not suspended to suspended.

            var suspenseContext = suspenseStackCursor.current;

            if (didSuspendAlready) {
              suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);
            } else {
              suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
            }

            pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row.
            // Don't bubble properties in this case.

            return next;
          }

          bubbleProperties(workInProgress);
          return null;
        }

      case ScopeComponent:
        {

          break;
        }

      case OffscreenComponent:
      case LegacyHiddenComponent:
        {
          popRenderLanes(workInProgress);
          var _nextState = workInProgress.memoizedState;
          var nextIsHidden = _nextState !== null;

          if (current !== null) {
            var _prevState = current.memoizedState;
            var prevIsHidden = _prevState !== null;

            if (prevIsHidden !== nextIsHidden && ( // LegacyHidden doesn't do any hiding â€” it only pre-renders.
            !enableLegacyHidden )) {
              workInProgress.flags |= Visibility;
            }
          }

          if (!nextIsHidden || (workInProgress.mode & ConcurrentMode) === NoMode) {
            bubbleProperties(workInProgress);
          } else {
            // Don't bubble properties for hidden children unless we're rendering
            // at offscreen priority.
            if (includesSomeLane(subtreeRenderLanes, OffscreenLane)) {
              bubbleProperties(workInProgress);

              {
                // Check if there was an insertion or update in the hidden subtree.
                // If so, we need to hide those nodes in the commit phase, so
                // schedule a visibility effect.
                if ( workInProgress.subtreeFlags & (Placement | Update)) {
                  workInProgress.flags |= Visibility;
                }
              }
            }
          }
          return null;
        }

      case CacheComponent:
        {

          return null;
        }

      case TracingMarkerComponent:
        {

          return null;
        }
    }

    throw new Error("Unknown unit of work tag (" + workInProgress.tag + "). This error is likely caused by a bug in " + 'React. Please file an issue.');
  }

  function unwindWork(current, workInProgress, renderLanes) {
    // Note: This intentionally doesn't check if we're hydrating because comparing
    // to the current tree provider fiber is just as fast and less error-prone.
    // Ideally we would have a special version of the work loop only
    // for hydration.
    popTreeContext(workInProgress);

    switch (workInProgress.tag) {
      case ClassComponent:
        {
          var Component = workInProgress.type;

          if (isContextProvider(Component)) {
            popContext(workInProgress);
          }

          var flags = workInProgress.flags;

          if (flags & ShouldCapture) {
            workInProgress.flags = flags & ~ShouldCapture | DidCapture;

            if ( (workInProgress.mode & ProfileMode) !== NoMode) {
              transferActualDuration(workInProgress);
            }

            return workInProgress;
          }

          return null;
        }

      case HostRoot:
        {
          var root = workInProgress.stateNode;
          popHostContainer(workInProgress);
          popTopLevelContextObject(workInProgress);
          resetWorkInProgressVersions();
          var _flags = workInProgress.flags;

          if ((_flags & ShouldCapture) !== NoFlags && (_flags & DidCapture) === NoFlags) {
            // There was an error during render that wasn't captured by a suspense
            // boundary. Do a second pass on the root to unmount the children.
            workInProgress.flags = _flags & ~ShouldCapture | DidCapture;
            return workInProgress;
          } // We unwound to the root without completing it. Exit.


          return null;
        }

      case HostComponent:
        {
          // TODO: popHydrationState
          popHostContext(workInProgress);
          return null;
        }

      case SuspenseComponent:
        {
          popSuspenseContext(workInProgress);
          var suspenseState = workInProgress.memoizedState;

          if (suspenseState !== null && suspenseState.dehydrated !== null) {
            if (workInProgress.alternate === null) {
              throw new Error('Threw in newly mounted dehydrated component. This is likely a bug in ' + 'React. Please file an issue.');
            }

            resetHydrationState();
          }

          var _flags2 = workInProgress.flags;

          if (_flags2 & ShouldCapture) {
            workInProgress.flags = _flags2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.

            if ( (workInProgress.mode & ProfileMode) !== NoMode) {
              transferActualDuration(workInProgress);
            }

            return workInProgress;
          }

          return null;
        }

      case SuspenseListComponent:
        {
          popSuspenseContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been
          // caught by a nested boundary. If not, it should bubble through.

          return null;
        }

      case HostPortal:
        popHostContainer(workInProgress);
        return null;

      case ContextProvider:
        var context = workInProgress.type._context;
        popProvider(context, workInProgress);
        return null;

      case OffscreenComponent:
      case LegacyHiddenComponent:
        popRenderLanes(workInProgress);
        return null;

      case CacheComponent:

        return null;

      default:
        return null;
    }
  }

  function unwindInterruptedWork(current, interruptedWork, renderLanes) {
    // Note: This intentionally doesn't check if we're hydrating because comparing
    // to the current tree provider fiber is just as fast and less error-prone.
    // Ideally we would have a special version of the work loop only
    // for hydration.
    popTreeContext(interruptedWork);

    switch (interruptedWork.tag) {
      case ClassComponent:
        {
          var childContextTypes = interruptedWork.type.childContextTypes;

          if (childContextTypes !== null && childContextTypes !== undefined) {
            popContext(interruptedWork);
          }

          break;
        }

      case HostRoot:
        {
          var root = interruptedWork.stateNode;
          popHostContainer(interruptedWork);
          popTopLevelContextObject(interruptedWork);
          resetWorkInProgressVersions();
          break;
        }

      case HostComponent:
        {
          popHostContext(interruptedWork);
          break;
        }

      case HostPortal:
        popHostContainer(interruptedWork);
        break;

      case SuspenseComponent:
        popSuspenseContext(interruptedWork);
        break;

      case SuspenseListComponent:
        popSuspenseContext(interruptedWork);
        break;

      case ContextProvider:
        var context = interruptedWork.type._context;
        popProvider(context, interruptedWork);
        break;

      case OffscreenComponent:
      case LegacyHiddenComponent:
        popRenderLanes(interruptedWork);
        break;
    }
  }

  var didWarnAboutUndefinedSnapshotBeforeUpdate = null;

  {
    didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();
  } // Used during the commit phase to track the state of the Offscreen component stack.
  // Allows us to avoid traversing the return path to find the nearest Offscreen ancestor.
  // Only used when enableSuspenseLayoutEffectSemantics is enabled.


  var offscreenSubtreeIsHidden = false;
  var offscreenSubtreeWasHidden = false;
  var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;
  var nextEffect = null; // Used for Profiling builds to track updaters.

  var inProgressLanes = null;
  var inProgressRoot = null;
  function reportUncaughtErrorInDEV(error) {
    // Wrapping each small part of the commit phase into a guarded
    // callback is a bit too slow (https://github.com/facebook/react/pull/21666).
    // But we rely on it to surface errors to DEV tools like overlays
    // (https://github.com/facebook/react/issues/21712).
    // As a compromise, rethrow only caught errors in a guard.
    {
      invokeGuardedCallback(null, function () {
        throw error;
      });
      clearCaughtError();
    }
  }

  var callComponentWillUnmountWithTimer = function (current, instance) {
    instance.props = current.memoizedProps;
    instance.state = current.memoizedState;

    if ( current.mode & ProfileMode) {
      try {
        startLayoutEffectTimer();
        instance.componentWillUnmount();
      } finally {
        recordLayoutEffectDuration(current);
      }
    } else {
      instance.componentWillUnmount();
    }
  }; // Capture errors so they don't interrupt mounting.


  function safelyCallCommitHookLayoutEffectListMount(current, nearestMountedAncestor) {
    try {
      commitHookEffectListMount(Layout, current);
    } catch (error) {
      captureCommitPhaseError(current, nearestMountedAncestor, error);
    }
  } // Capture errors so they don't interrupt unmounting.


  function safelyCallComponentWillUnmount(current, nearestMountedAncestor, instance) {
    try {
      callComponentWillUnmountWithTimer(current, instance);
    } catch (error) {
      captureCommitPhaseError(current, nearestMountedAncestor, error);
    }
  } // Capture errors so they don't interrupt mounting.


  function safelyCallComponentDidMount(current, nearestMountedAncestor, instance) {
    try {
      instance.componentDidMount();
    } catch (error) {
      captureCommitPhaseError(current, nearestMountedAncestor, error);
    }
  } // Capture errors so they don't interrupt mounting.


  function safelyAttachRef(current, nearestMountedAncestor) {
    try {
      commitAttachRef(current);
    } catch (error) {
      captureCommitPhaseError(current, nearestMountedAncestor, error);
    }
  }

  function safelyDetachRef(current, nearestMountedAncestor) {
    var ref = current.ref;

    if (ref !== null) {
      if (typeof ref === 'function') {
        var retVal;

        try {
          if (enableProfilerTimer && enableProfilerCommitHooks && current.mode & ProfileMode) {
            try {
              startLayoutEffectTimer();
              retVal = ref(null);
            } finally {
              recordLayoutEffectDuration(current);
            }
          } else {
            retVal = ref(null);
          }
        } catch (error) {
          captureCommitPhaseError(current, nearestMountedAncestor, error);
        }

        {
          if (typeof retVal === 'function') {
            error('Unexpected return value from a callback ref in %s. ' + 'A callback ref should not return a function.', getComponentNameFromFiber(current));
          }
        }
      } else {
        ref.current = null;
      }
    }
  }

  function safelyCallDestroy(current, nearestMountedAncestor, destroy) {
    try {
      destroy();
    } catch (error) {
      captureCommitPhaseError(current, nearestMountedAncestor, error);
    }
  }

  var focusedInstanceHandle = null;
  var shouldFireAfterActiveInstanceBlur = false;
  function commitBeforeMutationEffects(root, firstChild) {
    focusedInstanceHandle = prepareForCommit(root.containerInfo);
    nextEffect = firstChild;
    commitBeforeMutationEffects_begin(); // We no longer need to track the active instance fiber

    var shouldFire = shouldFireAfterActiveInstanceBlur;
    shouldFireAfterActiveInstanceBlur = false;
    focusedInstanceHandle = null;
    return shouldFire;
  }

  function commitBeforeMutationEffects_begin() {
    while (nextEffect !== null) {
      var fiber = nextEffect; // This phase is only used for beforeActiveInstanceBlur.

      var child = fiber.child;

      if ((fiber.subtreeFlags & BeforeMutationMask) !== NoFlags && child !== null) {
        child.return = fiber;
        nextEffect = child;
      } else {
        commitBeforeMutationEffects_complete();
      }
    }
  }

  function commitBeforeMutationEffects_complete() {
    while (nextEffect !== null) {
      var fiber = nextEffect;
      setCurrentFiber(fiber);

      try {
        commitBeforeMutationEffectsOnFiber(fiber);
      } catch (error) {
        captureCommitPhaseError(fiber, fiber.return, error);
      }

      resetCurrentFiber();
      var sibling = fiber.sibling;

      if (sibling !== null) {
        sibling.return = fiber.return;
        nextEffect = sibling;
        return;
      }

      nextEffect = fiber.return;
    }
  }

  function commitBeforeMutationEffectsOnFiber(finishedWork) {
    var current = finishedWork.alternate;
    var flags = finishedWork.flags;

    if ((flags & Snapshot) !== NoFlags) {
      setCurrentFiber(finishedWork);

      switch (finishedWork.tag) {
        case FunctionComponent:
        case ForwardRef:
        case SimpleMemoComponent:
          {
            break;
          }

        case ClassComponent:
          {
            if (current !== null) {
              var prevProps = current.memoizedProps;
              var prevState = current.memoizedState;
              var instance = finishedWork.stateNode; // We could update instance props and state here,
              // but instead we rely on them being set during last render.
              // TODO: revisit this when we implement resuming.

              {
                if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
                  if (instance.props !== finishedWork.memoizedProps) {
                    error('Expected %s props to match memoized props before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');
                  }

                  if (instance.state !== finishedWork.memoizedState) {
                    error('Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');
                  }
                }
              }

              var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);

              {
                var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;

                if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) {
                  didWarnSet.add(finishedWork.type);

                  error('%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentNameFromFiber(finishedWork));
                }
              }

              instance.__reactInternalSnapshotBeforeUpdate = snapshot;
            }

            break;
          }

        case HostRoot:
          {
            {
              var root = finishedWork.stateNode;
              clearContainer(root.containerInfo);
            }

            break;
          }

        case HostComponent:
        case HostText:
        case HostPortal:
        case IncompleteClassComponent:
          // Nothing to do for these component types
          break;

        default:
          {
            throw new Error('This unit of work tag should not have side-effects. This error is ' + 'likely caused by a bug in React. Please file an issue.');
          }
      }

      resetCurrentFiber();
    }
  }

  function commitHookEffectListUnmount(flags, finishedWork, nearestMountedAncestor) {
    var updateQueue = finishedWork.updateQueue;
    var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;

    if (lastEffect !== null) {
      var firstEffect = lastEffect.next;
      var effect = firstEffect;

      do {
        if ((effect.tag & flags) === flags) {
          // Unmount
          var destroy = effect.destroy;
          effect.destroy = undefined;

          if (destroy !== undefined) {
            {
              if ((flags & Passive$1) !== NoFlags$1) {
                markComponentPassiveEffectUnmountStarted(finishedWork);
              } else if ((flags & Layout) !== NoFlags$1) {
                markComponentLayoutEffectUnmountStarted(finishedWork);
              }
            }

            {
              if ((flags & Insertion) !== NoFlags$1) {
                setIsRunningInsertionEffect(true);
              }
            }

            safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy);

            {
              if ((flags & Insertion) !== NoFlags$1) {
                setIsRunningInsertionEffect(false);
              }
            }

            {
              if ((flags & Passive$1) !== NoFlags$1) {
                markComponentPassiveEffectUnmountStopped();
              } else if ((flags & Layout) !== NoFlags$1) {
                markComponentLayoutEffectUnmountStopped();
              }
            }
          }
        }

        effect = effect.next;
      } while (effect !== firstEffect);
    }
  }

  function commitHookEffectListMount(flags, finishedWork) {
    var updateQueue = finishedWork.updateQueue;
    var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;

    if (lastEffect !== null) {
      var firstEffect = lastEffect.next;
      var effect = firstEffect;

      do {
        if ((effect.tag & flags) === flags) {
          {
            if ((flags & Passive$1) !== NoFlags$1) {
              markComponentPassiveEffectMountStarted(finishedWork);
            } else if ((flags & Layout) !== NoFlags$1) {
              markComponentLayoutEffectMountStarted(finishedWork);
            }
          } // Mount


          var create = effect.create;

          {
            if ((flags & Insertion) !== NoFlags$1) {
              setIsRunningInsertionEffect(true);
            }
          }

          effect.destroy = create();

          {
            if ((flags & Insertion) !== NoFlags$1) {
              setIsRunningInsertionEffect(false);
            }
          }

          {
            if ((flags & Passive$1) !== NoFlags$1) {
              markComponentPassiveEffectMountStopped();
            } else if ((flags & Layout) !== NoFlags$1) {
              markComponentLayoutEffectMountStopped();
            }
          }

          {
            var destroy = effect.destroy;

            if (destroy !== undefined && typeof destroy !== 'function') {
              var hookName = void 0;

              if ((effect.tag & Layout) !== NoFlags) {
                hookName = 'useLayoutEffect';
              } else if ((effect.tag & Insertion) !== NoFlags) {
                hookName = 'useInsertionEffect';
              } else {
                hookName = 'useEffect';
              }

              var addendum = void 0;

              if (destroy === null) {
                addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).';
              } else if (typeof destroy.then === 'function') {
                addendum = '\n\nIt looks like you wrote ' + hookName + '(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\n\n' + hookName + '(() => {\n' + '  async function fetchData() {\n' + '    // You can await here\n' + '    const response = await MyAPI.getData(someId);\n' + '    // ...\n' + '  }\n' + '  fetchData();\n' + "}, [someId]); // Or [] if effect doesn't need props or state\n\n" + 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching';
              } else {
                addendum = ' You returned: ' + destroy;
              }

              error('%s must not return anything besides a function, ' + 'which is used for clean-up.%s', hookName, addendum);
            }
          }
        }

        effect = effect.next;
      } while (effect !== firstEffect);
    }
  }

  function commitPassiveEffectDurations(finishedRoot, finishedWork) {
    {
      // Only Profilers with work in their subtree will have an Update effect scheduled.
      if ((finishedWork.flags & Update) !== NoFlags) {
        switch (finishedWork.tag) {
          case Profiler:
            {
              var passiveEffectDuration = finishedWork.stateNode.passiveEffectDuration;
              var _finishedWork$memoize = finishedWork.memoizedProps,
                  id = _finishedWork$memoize.id,
                  onPostCommit = _finishedWork$memoize.onPostCommit; // This value will still reflect the previous commit phase.
              // It does not get reset until the start of the next commit phase.

              var commitTime = getCommitTime();
              var phase = finishedWork.alternate === null ? 'mount' : 'update';

              {
                if (isCurrentUpdateNested()) {
                  phase = 'nested-update';
                }
              }

              if (typeof onPostCommit === 'function') {
                onPostCommit(id, phase, passiveEffectDuration, commitTime);
              } // Bubble times to the next nearest ancestor Profiler.
              // After we process that Profiler, we'll bubble further up.


              var parentFiber = finishedWork.return;

              outer: while (parentFiber !== null) {
                switch (parentFiber.tag) {
                  case HostRoot:
                    var root = parentFiber.stateNode;
                    root.passiveEffectDuration += passiveEffectDuration;
                    break outer;

                  case Profiler:
                    var parentStateNode = parentFiber.stateNode;
                    parentStateNode.passiveEffectDuration += passiveEffectDuration;
                    break outer;
                }

                parentFiber = parentFiber.return;
              }

              break;
            }
        }
      }
    }
  }

  function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork, committedLanes) {
    if ((finishedWork.flags & LayoutMask) !== NoFlags) {
      switch (finishedWork.tag) {
        case FunctionComponent:
        case ForwardRef:
        case SimpleMemoComponent:
          {
            if ( !offscreenSubtreeWasHidden) {
              // At this point layout effects have already been destroyed (during mutation phase).
              // This is done to prevent sibling component effects from interfering with each other,
              // e.g. a destroy function in one component should never override a ref set
              // by a create function in another component during the same commit.
              if ( finishedWork.mode & ProfileMode) {
                try {
                  startLayoutEffectTimer();
                  commitHookEffectListMount(Layout | HasEffect, finishedWork);
                } finally {
                  recordLayoutEffectDuration(finishedWork);
                }
              } else {
                commitHookEffectListMount(Layout | HasEffect, finishedWork);
              }
            }

            break;
          }

        case ClassComponent:
          {
            var instance = finishedWork.stateNode;

            if (finishedWork.flags & Update) {
              if (!offscreenSubtreeWasHidden) {
                if (current === null) {
                  // We could update instance props and state here,
                  // but instead we rely on them being set during last render.
                  // TODO: revisit this when we implement resuming.
                  {
                    if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
                      if (instance.props !== finishedWork.memoizedProps) {
                        error('Expected %s props to match memoized props before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');
                      }

                      if (instance.state !== finishedWork.memoizedState) {
                        error('Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');
                      }
                    }
                  }

                  if ( finishedWork.mode & ProfileMode) {
                    try {
                      startLayoutEffectTimer();
                      instance.componentDidMount();
                    } finally {
                      recordLayoutEffectDuration(finishedWork);
                    }
                  } else {
                    instance.componentDidMount();
                  }
                } else {
                  var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);
                  var prevState = current.memoizedState; // We could update instance props and state here,
                  // but instead we rely on them being set during last render.
                  // TODO: revisit this when we implement resuming.

                  {
                    if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
                      if (instance.props !== finishedWork.memoizedProps) {
                        error('Expected %s props to match memoized props before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');
                      }

                      if (instance.state !== finishedWork.memoizedState) {
                        error('Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');
                      }
                    }
                  }

                  if ( finishedWork.mode & ProfileMode) {
                    try {
                      startLayoutEffectTimer();
                      instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);
                    } finally {
                      recordLayoutEffectDuration(finishedWork);
                    }
                  } else {
                    instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);
                  }
                }
              }
            } // TODO: I think this is now always non-null by the time it reaches the
            // commit phase. Consider removing the type check.


            var updateQueue = finishedWork.updateQueue;

            if (updateQueue !== null) {
              {
                if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
                  if (instance.props !== finishedWork.memoizedProps) {
                    error('Expected %s props to match memoized props before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');
                  }

                  if (instance.state !== finishedWork.memoizedState) {
                    error('Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');
                  }
                }
              } // We could update instance props and state here,
              // but instead we rely on them being set during last render.
              // TODO: revisit this when we implement resuming.


              commitUpdateQueue(finishedWork, updateQueue, instance);
            }

            break;
          }

        case HostRoot:
          {
            // TODO: I think this is now always non-null by the time it reaches the
            // commit phase. Consider removing the type check.
            var _updateQueue = finishedWork.updateQueue;

            if (_updateQueue !== null) {
              var _instance = null;

              if (finishedWork.child !== null) {
                switch (finishedWork.child.tag) {
                  case HostComponent:
                    _instance = getPublicInstance(finishedWork.child.stateNode);
                    break;

                  case ClassComponent:
                    _instance = finishedWork.child.stateNode;
                    break;
                }
              }

              commitUpdateQueue(finishedWork, _updateQueue, _instance);
            }

            break;
          }

        case HostComponent:
          {
            var _instance2 = finishedWork.stateNode; // Renderers may schedule work to be done after host components are mounted
            // (eg DOM renderer may schedule auto-focus for inputs and form controls).
            // These effects should only be committed when components are first mounted,
            // aka when there is no current/alternate.

            if (current === null && finishedWork.flags & Update) {
              var type = finishedWork.type;
              var props = finishedWork.memoizedProps;
              commitMount(_instance2, type, props);
            }

            break;
          }

        case HostText:
          {
            // We have no life-cycles associated with text.
            break;
          }

        case HostPortal:
          {
            // We have no life-cycles associated with portals.
            break;
          }

        case Profiler:
          {
            {
              var _finishedWork$memoize2 = finishedWork.memoizedProps,
                  onCommit = _finishedWork$memoize2.onCommit,
                  onRender = _finishedWork$memoize2.onRender;
              var effectDuration = finishedWork.stateNode.effectDuration;
              var commitTime = getCommitTime();
              var phase = current === null ? 'mount' : 'update';

              {
                if (isCurrentUpdateNested()) {
                  phase = 'nested-update';
                }
              }

              if (typeof onRender === 'function') {
                onRender(finishedWork.memoizedProps.id, phase, finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, commitTime);
              }

              {
                if (typeof onCommit === 'function') {
                  onCommit(finishedWork.memoizedProps.id, phase, effectDuration, commitTime);
                } // Schedule a passive effect for this Profiler to call onPostCommit hooks.
                // This effect should be scheduled even if there is no onPostCommit callback for this Profiler,
                // because the effect is also where times bubble to parent Profilers.


                enqueuePendingPassiveProfilerEffect(finishedWork); // Propagate layout effect durations to the next nearest Profiler ancestor.
                // Do not reset these values until the next render so DevTools has a chance to read them first.

                var parentFiber = finishedWork.return;

                outer: while (parentFiber !== null) {
                  switch (parentFiber.tag) {
                    case HostRoot:
                      var root = parentFiber.stateNode;
                      root.effectDuration += effectDuration;
                      break outer;

                    case Profiler:
                      var parentStateNode = parentFiber.stateNode;
                      parentStateNode.effectDuration += effectDuration;
                      break outer;
                  }

                  parentFiber = parentFiber.return;
                }
              }
            }

            break;
          }

        case SuspenseComponent:
          {
            commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
            break;
          }

        case SuspenseListComponent:
        case IncompleteClassComponent:
        case ScopeComponent:
        case OffscreenComponent:
        case LegacyHiddenComponent:
        case TracingMarkerComponent:
          {
            break;
          }

        default:
          throw new Error('This unit of work tag should not have side-effects. This error is ' + 'likely caused by a bug in React. Please file an issue.');
      }
    }

    if ( !offscreenSubtreeWasHidden) {
      {
        if (finishedWork.flags & Ref) {
          commitAttachRef(finishedWork);
        }
      }
    }
  }

  function reappearLayoutEffectsOnFiber(node) {
    // Turn on layout effects in a tree that previously disappeared.
    // TODO (Offscreen) Check: flags & LayoutStatic
    switch (node.tag) {
      case FunctionComponent:
      case ForwardRef:
      case SimpleMemoComponent:
        {
          if ( node.mode & ProfileMode) {
            try {
              startLayoutEffectTimer();
              safelyCallCommitHookLayoutEffectListMount(node, node.return);
            } finally {
              recordLayoutEffectDuration(node);
            }
          } else {
            safelyCallCommitHookLayoutEffectListMount(node, node.return);
          }

          break;
        }

      case ClassComponent:
        {
          var instance = node.stateNode;

          if (typeof instance.componentDidMount === 'function') {
            safelyCallComponentDidMount(node, node.return, instance);
          }

          safelyAttachRef(node, node.return);
          break;
        }

      case HostComponent:
        {
          safelyAttachRef(node, node.return);
          break;
        }
    }
  }

  function hideOrUnhideAllChildren(finishedWork, isHidden) {
    // Only hide or unhide the top-most host nodes.
    var hostSubtreeRoot = null;

    {
      // We only have the top Fiber that was inserted but we need to recurse down its
      // children to find all the terminal nodes.
      var node = finishedWork;

      while (true) {
        if (node.tag === HostComponent) {
          if (hostSubtreeRoot === null) {
            hostSubtreeRoot = node;

            try {
              var instance = node.stateNode;

              if (isHidden) {
                hideInstance(instance);
              } else {
                unhideInstance(node.stateNode, node.memoizedProps);
              }
            } catch (error) {
              captureCommitPhaseError(finishedWork, finishedWork.return, error);
            }
          }
        } else if (node.tag === HostText) {
          if (hostSubtreeRoot === null) {
            try {
              var _instance3 = node.stateNode;

              if (isHidden) {
                hideTextInstance(_instance3);
              } else {
                unhideTextInstance(_instance3, node.memoizedProps);
              }
            } catch (error) {
              captureCommitPhaseError(finishedWork, finishedWork.return, error);
            }
          }
        } else if ((node.tag === OffscreenComponent || node.tag === LegacyHiddenComponent) && node.memoizedState !== null && node !== finishedWork) ; else if (node.child !== null) {
          node.child.return = node;
          node = node.child;
          continue;
        }

        if (node === finishedWork) {
          return;
        }

        while (node.sibling === null) {
          if (node.return === null || node.return === finishedWork) {
            return;
          }

          if (hostSubtreeRoot === node) {
            hostSubtreeRoot = null;
          }

          node = node.return;
        }

        if (hostSubtreeRoot === node) {
          hostSubtreeRoot = null;
        }

        node.sibling.return = node.return;
        node = node.sibling;
      }
    }
  }

  function commitAttachRef(finishedWork) {
    var ref = finishedWork.ref;

    if (ref !== null) {
      var instance = finishedWork.stateNode;
      var instanceToUse;

      switch (finishedWork.tag) {
        case HostComponent:
          instanceToUse = getPublicInstance(instance);
          break;

        default:
          instanceToUse = instance;
      } // Moved outside to ensure DCE works with this flag

      if (typeof ref === 'function') {
        var retVal;

        if ( finishedWork.mode & ProfileMode) {
          try {
            startLayoutEffectTimer();
            retVal = ref(instanceToUse);
          } finally {
            recordLayoutEffectDuration(finishedWork);
          }
        } else {
          retVal = ref(instanceToUse);
        }

        {
          if (typeof retVal === 'function') {
            error('Unexpected return value from a callback ref in %s. ' + 'A callback ref should not return a function.', getComponentNameFromFiber(finishedWork));
          }
        }
      } else {
        {
          if (!ref.hasOwnProperty('current')) {
            error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().', getComponentNameFromFiber(finishedWork));
          }
        }

        ref.current = instanceToUse;
      }
    }
  }

  function detachFiberMutation(fiber) {
    // Cut off the return pointer to disconnect it from the tree.
    // This enables us to detect and warn against state updates on an unmounted component.
    // It also prevents events from bubbling from within disconnected components.
    //
    // Ideally, we should also clear the child pointer of the parent alternate to let this
    // get GC:ed but we don't know which for sure which parent is the current
    // one so we'll settle for GC:ing the subtree of this child.
    // This child itself will be GC:ed when the parent updates the next time.
    //
    // Note that we can't clear child or sibling pointers yet.
    // They're needed for passive effects and for findDOMNode.
    // We defer those fields, and all other cleanup, to the passive phase (see detachFiberAfterEffects).
    //
    // Don't reset the alternate yet, either. We need that so we can detach the
    // alternate's fields in the passive phase. Clearing the return pointer is
    // sufficient for findDOMNode semantics.
    var alternate = fiber.alternate;

    if (alternate !== null) {
      alternate.return = null;
    }

    fiber.return = null;
  }

  function detachFiberAfterEffects(fiber) {
    var alternate = fiber.alternate;

    if (alternate !== null) {
      fiber.alternate = null;
      detachFiberAfterEffects(alternate);
    } // Note: Defensively using negation instead of < in case
    // `deletedTreeCleanUpLevel` is undefined.


    {
      // Clear cyclical Fiber fields. This level alone is designed to roughly
      // approximate the planned Fiber refactor. In that world, `setState` will be
      // bound to a special "instance" object instead of a Fiber. The Instance
      // object will not have any of these fields. It will only be connected to
      // the fiber tree via a single link at the root. So if this level alone is
      // sufficient to fix memory issues, that bodes well for our plans.
      fiber.child = null;
      fiber.deletions = null;
      fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host
      // tree, which has its own pointers to children, parents, and siblings.
      // The other host nodes also point back to fibers, so we should detach that
      // one, too.

      if (fiber.tag === HostComponent) {
        var hostInstance = fiber.stateNode;

        if (hostInstance !== null) {
          detachDeletedInstance(hostInstance);
        }
      }

      fiber.stateNode = null; // I'm intentionally not clearing the `return` field in this level. We
      // already disconnect the `return` pointer at the root of the deleted
      // subtree (in `detachFiberMutation`). Besides, `return` by itself is not
      // cyclical â€” it's only cyclical when combined with `child`, `sibling`, and
      // `alternate`. But we'll clear it in the next level anyway, just in case.

      {
        fiber._debugOwner = null;
      }

      {
        // Theoretically, nothing in here should be necessary, because we already
        // disconnected the fiber from the tree. So even if something leaks this
        // particular fiber, it won't leak anything else
        //
        // The purpose of this branch is to be super aggressive so we can measure
        // if there's any difference in memory impact. If there is, that could
        // indicate a React leak we don't know about.
        fiber.return = null;
        fiber.dependencies = null;
        fiber.memoizedProps = null;
        fiber.memoizedState = null;
        fiber.pendingProps = null;
        fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead.

        fiber.updateQueue = null;
      }
    }
  }

  function getHostParentFiber(fiber) {
    var parent = fiber.return;

    while (parent !== null) {
      if (isHostParent(parent)) {
        return parent;
      }

      parent = parent.return;
    }

    throw new Error('Expected to find a host parent. This error is likely caused by a bug ' + 'in React. Please file an issue.');
  }

  function isHostParent(fiber) {
    return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;
  }

  function getHostSibling(fiber) {
    // We're going to search forward into the tree until we find a sibling host
    // node. Unfortunately, if multiple insertions are done in a row we have to
    // search past them. This leads to exponential search for the next sibling.
    // TODO: Find a more efficient way to do this.
    var node = fiber;

    siblings: while (true) {
      // If we didn't find anything, let's try the next sibling.
      while (node.sibling === null) {
        if (node.return === null || isHostParent(node.return)) {
          // If we pop out of the root or hit the parent the fiber we are the
          // last sibling.
          return null;
        }

        node = node.return;
      }

      node.sibling.return = node.return;
      node = node.sibling;

      while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) {
        // If it is not host node and, we might have a host node inside it.
        // Try to search down until we find one.
        if (node.flags & Placement) {
          // If we don't have a child, try the siblings instead.
          continue siblings;
        } // If we don't have a child, try the siblings instead.
        // We also skip portals because they are not part of this host tree.


        if (node.child === null || node.tag === HostPortal) {
          continue siblings;
        } else {
          node.child.return = node;
          node = node.child;
        }
      } // Check if this host node is stable or about to be placed.


      if (!(node.flags & Placement)) {
        // Found it!
        return node.stateNode;
      }
    }
  }

  function commitPlacement(finishedWork) {


    var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together.

    switch (parentFiber.tag) {
      case HostComponent:
        {
          var parent = parentFiber.stateNode;

          if (parentFiber.flags & ContentReset) {
            // Reset the text content of the parent before doing any insertions
            resetTextContent(parent); // Clear ContentReset from the effect tag

            parentFiber.flags &= ~ContentReset;
          }

          var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its
          // children to find all the terminal nodes.

          insertOrAppendPlacementNode(finishedWork, before, parent);
          break;
        }

      case HostRoot:
      case HostPortal:
        {
          var _parent = parentFiber.stateNode.containerInfo;

          var _before = getHostSibling(finishedWork);

          insertOrAppendPlacementNodeIntoContainer(finishedWork, _before, _parent);
          break;
        }
      // eslint-disable-next-line-no-fallthrough

      default:
        throw new Error('Invalid host parent fiber. This error is likely caused by a bug ' + 'in React. Please file an issue.');
    }
  }

  function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
    var tag = node.tag;
    var isHost = tag === HostComponent || tag === HostText;

    if (isHost) {
      var stateNode = node.stateNode;

      if (before) {
        insertInContainerBefore(parent, stateNode, before);
      } else {
        appendChildToContainer(parent, stateNode);
      }
    } else if (tag === HostPortal) ; else {
      var child = node.child;

      if (child !== null) {
        insertOrAppendPlacementNodeIntoContainer(child, before, parent);
        var sibling = child.sibling;

        while (sibling !== null) {
          insertOrAppendPlacementNodeIntoContainer(sibling, before, parent);
          sibling = sibling.sibling;
        }
      }
    }
  }

  function insertOrAppendPlacementNode(node, before, parent) {
    var tag = node.tag;
    var isHost = tag === HostComponent || tag === HostText;

    if (isHost) {
      var stateNode = node.stateNode;

      if (before) {
        insertBefore(parent, stateNode, before);
      } else {
        appendChild(parent, stateNode);
      }
    } else if (tag === HostPortal) ; else {
      var child = node.child;

      if (child !== null) {
        insertOrAppendPlacementNode(child, before, parent);
        var sibling = child.sibling;

        while (sibling !== null) {
          insertOrAppendPlacementNode(sibling, before, parent);
          sibling = sibling.sibling;
        }
      }
    }
  } // These are tracked on the stack as we recursively traverse a
  // deleted subtree.
  // TODO: Update these during the whole mutation phase, not just during
  // a deletion.


  var hostParent = null;
  var hostParentIsContainer = false;

  function commitDeletionEffects(root, returnFiber, deletedFiber) {
    {
      // We only have the top Fiber that was deleted but we need to recurse down its
      // children to find all the terminal nodes.
      // Recursively delete all host nodes from the parent, detach refs, clean
      // up mounted layout effects, and call componentWillUnmount.
      // We only need to remove the topmost host child in each branch. But then we
      // still need to keep traversing to unmount effects, refs, and cWU. TODO: We
      // could split this into two separate traversals functions, where the second
      // one doesn't include any removeChild logic. This is maybe the same
      // function as "disappearLayoutEffects" (or whatever that turns into after
      // the layout phase is refactored to use recursion).
      // Before starting, find the nearest host parent on the stack so we know
      // which instance/container to remove the children from.
      // TODO: Instead of searching up the fiber return path on every deletion, we
      // can track the nearest host component on the JS stack as we traverse the
      // tree during the commit phase. This would make insertions faster, too.
      var parent = returnFiber;

      findParent: while (parent !== null) {
        switch (parent.tag) {
          case HostComponent:
            {
              hostParent = parent.stateNode;
              hostParentIsContainer = false;
              break findParent;
            }

          case HostRoot:
            {
              hostParent = parent.stateNode.containerInfo;
              hostParentIsContainer = true;
              break findParent;
            }

          case HostPortal:
            {
              hostParent = parent.stateNode.containerInfo;
              hostParentIsContainer = true;
              break findParent;
            }
        }

        parent = parent.return;
      }

      if (hostParent === null) {
        throw new Error('Expected to find a host parent. This error is likely caused by ' + 'a bug in React. Please file an issue.');
      }

      commitDeletionEffectsOnFiber(root, returnFiber, deletedFiber);
      hostParent = null;
      hostParentIsContainer = false;
    }

    detachFiberMutation(deletedFiber);
  }

  function recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, parent) {
    // TODO: Use a static flag to skip trees that don't have unmount effects
    var child = parent.child;

    while (child !== null) {
      commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, child);
      child = child.sibling;
    }
  }

  function commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, deletedFiber) {
    onCommitUnmount(deletedFiber); // The cases in this outer switch modify the stack before they traverse
    // into their subtree. There are simpler cases in the inner switch
    // that don't modify the stack.

    switch (deletedFiber.tag) {
      case HostComponent:
        {
          if (!offscreenSubtreeWasHidden) {
            safelyDetachRef(deletedFiber, nearestMountedAncestor);
          } // Intentional fallthrough to next branch

        }
      // eslint-disable-next-line-no-fallthrough

      case HostText:
        {
          // We only need to remove the nearest host child. Set the host parent
          // to `null` on the stack to indicate that nested children don't
          // need to be removed.
          {
            var prevHostParent = hostParent;
            var prevHostParentIsContainer = hostParentIsContainer;
            hostParent = null;
            recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
            hostParent = prevHostParent;
            hostParentIsContainer = prevHostParentIsContainer;

            if (hostParent !== null) {
              // Now that all the child effects have unmounted, we can remove the
              // node from the tree.
              if (hostParentIsContainer) {
                removeChildFromContainer(hostParent, deletedFiber.stateNode);
              } else {
                removeChild(hostParent, deletedFiber.stateNode);
              }
            }
          }

          return;
        }

      case DehydratedFragment:
        {
          // Delete the dehydrated suspense boundary and all of its content.


          {
            if (hostParent !== null) {
              if (hostParentIsContainer) {
                clearSuspenseBoundaryFromContainer(hostParent, deletedFiber.stateNode);
              } else {
                clearSuspenseBoundary(hostParent, deletedFiber.stateNode);
              }
            }
          }

          return;
        }

      case HostPortal:
        {
          {
            // When we go into a portal, it becomes the parent to remove from.
            var _prevHostParent = hostParent;
            var _prevHostParentIsContainer = hostParentIsContainer;
            hostParent = deletedFiber.stateNode.containerInfo;
            hostParentIsContainer = true;
            recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
            hostParent = _prevHostParent;
            hostParentIsContainer = _prevHostParentIsContainer;
          }

          return;
        }

      case FunctionComponent:
      case ForwardRef:
      case MemoComponent:
      case SimpleMemoComponent:
        {
          if (!offscreenSubtreeWasHidden) {
            var updateQueue = deletedFiber.updateQueue;

            if (updateQueue !== null) {
              var lastEffect = updateQueue.lastEffect;

              if (lastEffect !== null) {
                var firstEffect = lastEffect.next;
                var effect = firstEffect;

                do {
                  var _effect = effect,
                      destroy = _effect.destroy,
                      tag = _effect.tag;

                  if (destroy !== undefined) {
                    if ((tag & Insertion) !== NoFlags$1) {
                      safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);
                    } else if ((tag & Layout) !== NoFlags$1) {
                      {
                        markComponentLayoutEffectUnmountStarted(deletedFiber);
                      }

                      if ( deletedFiber.mode & ProfileMode) {
                        startLayoutEffectTimer();
                        safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);
                        recordLayoutEffectDuration(deletedFiber);
                      } else {
                        safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);
                      }

                      {
                        markComponentLayoutEffectUnmountStopped();
                      }
                    }
                  }

                  effect = effect.next;
                } while (effect !== firstEffect);
              }
            }
          }

          recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
          return;
        }

      case ClassComponent:
        {
          if (!offscreenSubtreeWasHidden) {
            safelyDetachRef(deletedFiber, nearestMountedAncestor);
            var instance = deletedFiber.stateNode;

            if (typeof instance.componentWillUnmount === 'function') {
              safelyCallComponentWillUnmount(deletedFiber, nearestMountedAncestor, instance);
            }
          }

          recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
          return;
        }

      case ScopeComponent:
        {

          recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
          return;
        }

      case OffscreenComponent:
        {
          if ( // TODO: Remove this dead flag
           deletedFiber.mode & ConcurrentMode) {
            // If this offscreen component is hidden, we already unmounted it. Before
            // deleting the children, track that it's already unmounted so that we
            // don't attempt to unmount the effects again.
            // TODO: If the tree is hidden, in most cases we should be able to skip
            // over the nested children entirely. An exception is we haven't yet found
            // the topmost host node to delete, which we already track on the stack.
            // But the other case is portals, which need to be detached no matter how
            // deeply they are nested. We should use a subtree flag to track whether a
            // subtree includes a nested portal.
            var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
            offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || deletedFiber.memoizedState !== null;
            recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
            offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
          } else {
            recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
          }

          break;
        }

      default:
        {
          recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
          return;
        }
    }
  }

  function commitSuspenseCallback(finishedWork) {
    // TODO: Move this to passive phase
    var newState = finishedWork.memoizedState;
  }

  function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {

    var newState = finishedWork.memoizedState;

    if (newState === null) {
      var current = finishedWork.alternate;

      if (current !== null) {
        var prevState = current.memoizedState;

        if (prevState !== null) {
          var suspenseInstance = prevState.dehydrated;

          if (suspenseInstance !== null) {
            commitHydratedSuspenseInstance(suspenseInstance);
          }
        }
      }
    }
  }

  function attachSuspenseRetryListeners(finishedWork) {
    // If this boundary just timed out, then it will have a set of wakeables.
    // For each wakeable, attach a listener so that when it resolves, React
    // attempts to re-render the boundary in the primary (pre-timeout) state.
    var wakeables = finishedWork.updateQueue;

    if (wakeables !== null) {
      finishedWork.updateQueue = null;
      var retryCache = finishedWork.stateNode;

      if (retryCache === null) {
        retryCache = finishedWork.stateNode = new PossiblyWeakSet();
      }

      wakeables.forEach(function (wakeable) {
        // Memoize using the boundary fiber to prevent redundant listeners.
        var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);

        if (!retryCache.has(wakeable)) {
          retryCache.add(wakeable);

          {
            if (isDevToolsPresent) {
              if (inProgressLanes !== null && inProgressRoot !== null) {
                // If we have pending work still, associate the original updaters with it.
                restorePendingUpdaters(inProgressRoot, inProgressLanes);
              } else {
                throw Error('Expected finished root and lanes to be set. This is a bug in React.');
              }
            }
          }

          wakeable.then(retry, retry);
        }
      });
    }
  } // This function detects when a Suspense boundary goes from visible to hidden.
  function commitMutationEffects(root, finishedWork, committedLanes) {
    inProgressLanes = committedLanes;
    inProgressRoot = root;
    setCurrentFiber(finishedWork);
    commitMutationEffectsOnFiber(finishedWork, root);
    setCurrentFiber(finishedWork);
    inProgressLanes = null;
    inProgressRoot = null;
  }

  function recursivelyTraverseMutationEffects(root, parentFiber, lanes) {
    // Deletions effects can be scheduled on any fiber type. They need to happen
    // before the children effects hae fired.
    var deletions = parentFiber.deletions;

    if (deletions !== null) {
      for (var i = 0; i < deletions.length; i++) {
        var childToDelete = deletions[i];

        try {
          commitDeletionEffects(root, parentFiber, childToDelete);
        } catch (error) {
          captureCommitPhaseError(childToDelete, parentFiber, error);
        }
      }
    }

    var prevDebugFiber = getCurrentFiber();

    if (parentFiber.subtreeFlags & MutationMask) {
      var child = parentFiber.child;

      while (child !== null) {
        setCurrentFiber(child);
        commitMutationEffectsOnFiber(child, root);
        child = child.sibling;
      }
    }

    setCurrentFiber(prevDebugFiber);
  }

  function commitMutationEffectsOnFiber(finishedWork, root, lanes) {
    var current = finishedWork.alternate;
    var flags = finishedWork.flags; // The effect flag should be checked *after* we refine the type of fiber,
    // because the fiber tag is more specific. An exception is any flag related
    // to reconcilation, because those can be set on all fiber types.

    switch (finishedWork.tag) {
      case FunctionComponent:
      case ForwardRef:
      case MemoComponent:
      case SimpleMemoComponent:
        {
          recursivelyTraverseMutationEffects(root, finishedWork);
          commitReconciliationEffects(finishedWork);

          if (flags & Update) {
            try {
              commitHookEffectListUnmount(Insertion | HasEffect, finishedWork, finishedWork.return);
              commitHookEffectListMount(Insertion | HasEffect, finishedWork);
            } catch (error) {
              captureCommitPhaseError(finishedWork, finishedWork.return, error);
            } // Layout effects are destroyed during the mutation phase so that all
            // destroy functions for all fibers are called before any create functions.
            // This prevents sibling component effects from interfering with each other,
            // e.g. a destroy function in one component should never override a ref set
            // by a create function in another component during the same commit.


            if ( finishedWork.mode & ProfileMode) {
              try {
                startLayoutEffectTimer();
                commitHookEffectListUnmount(Layout | HasEffect, finishedWork, finishedWork.return);
              } catch (error) {
                captureCommitPhaseError(finishedWork, finishedWork.return, error);
              }

              recordLayoutEffectDuration(finishedWork);
            } else {
              try {
                commitHookEffectListUnmount(Layout | HasEffect, finishedWork, finishedWork.return);
              } catch (error) {
                captureCommitPhaseError(finishedWork, finishedWork.return, error);
              }
            }
          }

          return;
        }

      case ClassComponent:
        {
          recursivelyTraverseMutationEffects(root, finishedWork);
          commitReconciliationEffects(finishedWork);

          if (flags & Ref) {
            if (current !== null) {
              safelyDetachRef(current, current.return);
            }
          }

          return;
        }

      case HostComponent:
        {
          recursivelyTraverseMutationEffects(root, finishedWork);
          commitReconciliationEffects(finishedWork);

          if (flags & Ref) {
            if (current !== null) {
              safelyDetachRef(current, current.return);
            }
          }

          {
            // TODO: ContentReset gets cleared by the children during the commit
            // phase. This is a refactor hazard because it means we must read
            // flags the flags after `commitReconciliationEffects` has already run;
            // the order matters. We should refactor so that ContentReset does not
            // rely on mutating the flag during commit. Like by setting a flag
            // during the render phase instead.
            if (finishedWork.flags & ContentReset) {
              var instance = finishedWork.stateNode;

              try {
                resetTextContent(instance);
              } catch (error) {
                captureCommitPhaseError(finishedWork, finishedWork.return, error);
              }
            }

            if (flags & Update) {
              var _instance4 = finishedWork.stateNode;

              if (_instance4 != null) {
                // Commit the work prepared earlier.
                var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps
                // as the newProps. The updatePayload will contain the real change in
                // this case.

                var oldProps = current !== null ? current.memoizedProps : newProps;
                var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components.

                var updatePayload = finishedWork.updateQueue;
                finishedWork.updateQueue = null;

                if (updatePayload !== null) {
                  try {
                    commitUpdate(_instance4, updatePayload, type, oldProps, newProps, finishedWork);
                  } catch (error) {
                    captureCommitPhaseError(finishedWork, finishedWork.return, error);
                  }
                }
              }
            }
          }

          return;
        }

      case HostText:
        {
          recursivelyTraverseMutationEffects(root, finishedWork);
          commitReconciliationEffects(finishedWork);

          if (flags & Update) {
            {
              if (finishedWork.stateNode === null) {
                throw new Error('This should have a text node initialized. This error is likely ' + 'caused by a bug in React. Please file an issue.');
              }

              var textInstance = finishedWork.stateNode;
              var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps
              // as the newProps. The updatePayload will contain the real change in
              // this case.

              var oldText = current !== null ? current.memoizedProps : newText;

              try {
                commitTextUpdate(textInstance, oldText, newText);
              } catch (error) {
                captureCommitPhaseError(finishedWork, finishedWork.return, error);
              }
            }
          }

          return;
        }

      case HostRoot:
        {
          recursivelyTraverseMutationEffects(root, finishedWork);
          commitReconciliationEffects(finishedWork);

          if (flags & Update) {
            {
              if (current !== null) {
                var prevRootState = current.memoizedState;

                if (prevRootState.isDehydrated) {
                  try {
                    commitHydratedContainer(root.containerInfo);
                  } catch (error) {
                    captureCommitPhaseError(finishedWork, finishedWork.return, error);
                  }
                }
              }
            }
          }

          return;
        }

      case HostPortal:
        {
          recursivelyTraverseMutationEffects(root, finishedWork);
          commitReconciliationEffects(finishedWork);

          return;
        }

      case SuspenseComponent:
        {
          recursivelyTraverseMutationEffects(root, finishedWork);
          commitReconciliationEffects(finishedWork);
          var offscreenFiber = finishedWork.child;

          if (offscreenFiber.flags & Visibility) {
            var offscreenInstance = offscreenFiber.stateNode;
            var newState = offscreenFiber.memoizedState;
            var isHidden = newState !== null; // Track the current state on the Offscreen instance so we can
            // read it during an event

            offscreenInstance.isHidden = isHidden;

            if (isHidden) {
              var wasHidden = offscreenFiber.alternate !== null && offscreenFiber.alternate.memoizedState !== null;

              if (!wasHidden) {
                // TODO: Move to passive phase
                markCommitTimeOfFallback();
              }
            }
          }

          if (flags & Update) {
            try {
              commitSuspenseCallback(finishedWork);
            } catch (error) {
              captureCommitPhaseError(finishedWork, finishedWork.return, error);
            }

            attachSuspenseRetryListeners(finishedWork);
          }

          return;
        }

      case OffscreenComponent:
        {
          var _wasHidden = current !== null && current.memoizedState !== null;

          if ( // TODO: Remove this dead flag
           finishedWork.mode & ConcurrentMode) {
            // Before committing the children, track on the stack whether this
            // offscreen subtree was already hidden, so that we don't unmount the
            // effects again.
            var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
            offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || _wasHidden;
            recursivelyTraverseMutationEffects(root, finishedWork);
            offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
          } else {
            recursivelyTraverseMutationEffects(root, finishedWork);
          }

          commitReconciliationEffects(finishedWork);

          if (flags & Visibility) {
            var _offscreenInstance = finishedWork.stateNode;
            var _newState = finishedWork.memoizedState;

            var _isHidden = _newState !== null;

            var offscreenBoundary = finishedWork; // Track the current state on the Offscreen instance so we can
            // read it during an event

            _offscreenInstance.isHidden = _isHidden;

            {
              if (_isHidden) {
                if (!_wasHidden) {
                  if ((offscreenBoundary.mode & ConcurrentMode) !== NoMode) {
                    nextEffect = offscreenBoundary;
                    var offscreenChild = offscreenBoundary.child;

                    while (offscreenChild !== null) {
                      nextEffect = offscreenChild;
                      disappearLayoutEffects_begin(offscreenChild);
                      offscreenChild = offscreenChild.sibling;
                    }
                  }
                }
              }
            }

            {
              // TODO: This needs to run whenever there's an insertion or update
              // inside a hidden Offscreen tree.
              hideOrUnhideAllChildren(offscreenBoundary, _isHidden);
            }
          }

          return;
        }

      case SuspenseListComponent:
        {
          recursivelyTraverseMutationEffects(root, finishedWork);
          commitReconciliationEffects(finishedWork);

          if (flags & Update) {
            attachSuspenseRetryListeners(finishedWork);
          }

          return;
        }

      case ScopeComponent:
        {

          return;
        }

      default:
        {
          recursivelyTraverseMutationEffects(root, finishedWork);
          commitReconciliationEffects(finishedWork);
          return;
        }
    }
  }

  function commitReconciliationEffects(finishedWork) {
    // Placement effects (insertions, reorders) can be scheduled on any fiber
    // type. They needs to happen after the children effects have fired, but
    // before the effects on this fiber have fired.
    var flags = finishedWork.flags;

    if (flags & Placement) {
      try {
        commitPlacement(finishedWork);
      } catch (error) {
        captureCommitPhaseError(finishedWork, finishedWork.return, error);
      } // Clear the "placement" from effect tag so that we know that this is
      // inserted, before any life-cycles like componentDidMount gets called.
      // TODO: findDOMNode doesn't rely on this any more but isMounted does
      // and isMounted is deprecated anyway so we should be able to kill this.


      finishedWork.flags &= ~Placement;
    }

    if (flags & Hydrating) {
      finishedWork.flags &= ~Hydrating;
    }
  }

  function commitLayoutEffects(finishedWork, root, committedLanes) {
    inProgressLanes = committedLanes;
    inProgressRoot = root;
    nextEffect = finishedWork;
    commitLayoutEffects_begin(finishedWork, root, committedLanes);
    inProgressLanes = null;
    inProgressRoot = null;
  }

  function commitLayoutEffects_begin(subtreeRoot, root, committedLanes) {
    // Suspense layout effects semantics don't change for legacy roots.
    var isModernRoot = (subtreeRoot.mode & ConcurrentMode) !== NoMode;

    while (nextEffect !== null) {
      var fiber = nextEffect;
      var firstChild = fiber.child;

      if ( fiber.tag === OffscreenComponent && isModernRoot) {
        // Keep track of the current Offscreen stack's state.
        var isHidden = fiber.memoizedState !== null;
        var newOffscreenSubtreeIsHidden = isHidden || offscreenSubtreeIsHidden;

        if (newOffscreenSubtreeIsHidden) {
          // The Offscreen tree is hidden. Skip over its layout effects.
          commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes);
          continue;
        } else {
          // TODO (Offscreen) Also check: subtreeFlags & LayoutMask
          var current = fiber.alternate;
          var wasHidden = current !== null && current.memoizedState !== null;
          var newOffscreenSubtreeWasHidden = wasHidden || offscreenSubtreeWasHidden;
          var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden;
          var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; // Traverse the Offscreen subtree with the current Offscreen as the root.

          offscreenSubtreeIsHidden = newOffscreenSubtreeIsHidden;
          offscreenSubtreeWasHidden = newOffscreenSubtreeWasHidden;

          if (offscreenSubtreeWasHidden && !prevOffscreenSubtreeWasHidden) {
            // This is the root of a reappearing boundary. Turn its layout effects
            // back on.
            nextEffect = fiber;
            reappearLayoutEffects_begin(fiber);
          }

          var child = firstChild;

          while (child !== null) {
            nextEffect = child;
            commitLayoutEffects_begin(child, // New root; bubble back up to here and stop.
            root, committedLanes);
            child = child.sibling;
          } // Restore Offscreen state and resume in our-progress traversal.


          nextEffect = fiber;
          offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;
          offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
          commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes);
          continue;
        }
      }

      if ((fiber.subtreeFlags & LayoutMask) !== NoFlags && firstChild !== null) {
        firstChild.return = fiber;
        nextEffect = firstChild;
      } else {
        commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes);
      }
    }
  }

  function commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes) {
    while (nextEffect !== null) {
      var fiber = nextEffect;

      if ((fiber.flags & LayoutMask) !== NoFlags) {
        var current = fiber.alternate;
        setCurrentFiber(fiber);

        try {
          commitLayoutEffectOnFiber(root, current, fiber, committedLanes);
        } catch (error) {
          captureCommitPhaseError(fiber, fiber.return, error);
        }

        resetCurrentFiber();
      }

      if (fiber === subtreeRoot) {
        nextEffect = null;
        return;
      }

      var sibling = fiber.sibling;

      if (sibling !== null) {
        sibling.return = fiber.return;
        nextEffect = sibling;
        return;
      }

      nextEffect = fiber.return;
    }
  }

  function disappearLayoutEffects_begin(subtreeRoot) {
    while (nextEffect !== null) {
      var fiber = nextEffect;
      var firstChild = fiber.child; // TODO (Offscreen) Check: flags & (RefStatic | LayoutStatic)

      switch (fiber.tag) {
        case FunctionComponent:
        case ForwardRef:
        case MemoComponent:
        case SimpleMemoComponent:
          {
            if ( fiber.mode & ProfileMode) {
              try {
                startLayoutEffectTimer();
                commitHookEffectListUnmount(Layout, fiber, fiber.return);
              } finally {
                recordLayoutEffectDuration(fiber);
              }
            } else {
              commitHookEffectListUnmount(Layout, fiber, fiber.return);
            }

            break;
          }

        case ClassComponent:
          {
            // TODO (Offscreen) Check: flags & RefStatic
            safelyDetachRef(fiber, fiber.return);
            var instance = fiber.stateNode;

            if (typeof instance.componentWillUnmount === 'function') {
              safelyCallComponentWillUnmount(fiber, fiber.return, instance);
            }

            break;
          }

        case HostComponent:
          {
            safelyDetachRef(fiber, fiber.return);
            break;
          }

        case OffscreenComponent:
          {
            // Check if this is a
            var isHidden = fiber.memoizedState !== null;

            if (isHidden) {
              // Nested Offscreen tree is already hidden. Don't disappear
              // its effects.
              disappearLayoutEffects_complete(subtreeRoot);
              continue;
            }

            break;
          }
      } // TODO (Offscreen) Check: subtreeFlags & LayoutStatic


      if (firstChild !== null) {
        firstChild.return = fiber;
        nextEffect = firstChild;
      } else {
        disappearLayoutEffects_complete(subtreeRoot);
      }
    }
  }

  function disappearLayoutEffects_complete(subtreeRoot) {
    while (nextEffect !== null) {
      var fiber = nextEffect;

      if (fiber === subtreeRoot) {
        nextEffect = null;
        return;
      }

      var sibling = fiber.sibling;

      if (sibling !== null) {
        sibling.return = fiber.return;
        nextEffect = sibling;
        return;
      }

      nextEffect = fiber.return;
    }
  }

  function reappearLayoutEffects_begin(subtreeRoot) {
    while (nextEffect !== null) {
      var fiber = nextEffect;
      var firstChild = fiber.child;

      if (fiber.tag === OffscreenComponent) {
        var isHidden = fiber.memoizedState !== null;

        if (isHidden) {
          // Nested Offscreen tree is still hidden. Don't re-appear its effects.
          reappearLayoutEffects_complete(subtreeRoot);
          continue;
        }
      } // TODO (Offscreen) Check: subtreeFlags & LayoutStatic


      if (firstChild !== null) {
        // This node may have been reused from a previous render, so we can't
        // assume its return pointer is correct.
        firstChild.return = fiber;
        nextEffect = firstChild;
      } else {
        reappearLayoutEffects_complete(subtreeRoot);
      }
    }
  }

  function reappearLayoutEffects_complete(subtreeRoot) {
    while (nextEffect !== null) {
      var fiber = nextEffect; // TODO (Offscreen) Check: flags & LayoutStatic

      setCurrentFiber(fiber);

      try {
        reappearLayoutEffectsOnFiber(fiber);
      } catch (error) {
        captureCommitPhaseError(fiber, fiber.return, error);
      }

      resetCurrentFiber();

      if (fiber === subtreeRoot) {
        nextEffect = null;
        return;
      }

      var sibling = fiber.sibling;

      if (sibling !== null) {
        // This node may have been reused from a previous render, so we can't
        // assume its return pointer is correct.
        sibling.return = fiber.return;
        nextEffect = sibling;
        return;
      }

      nextEffect = fiber.return;
    }
  }

  function commitPassiveMountEffects(root, finishedWork, committedLanes, committedTransitions) {
    nextEffect = finishedWork;
    commitPassiveMountEffects_begin(finishedWork, root, committedLanes, committedTransitions);
  }

  function commitPassiveMountEffects_begin(subtreeRoot, root, committedLanes, committedTransitions) {
    while (nextEffect !== null) {
      var fiber = nextEffect;
      var firstChild = fiber.child;

      if ((fiber.subtreeFlags & PassiveMask) !== NoFlags && firstChild !== null) {
        firstChild.return = fiber;
        nextEffect = firstChild;
      } else {
        commitPassiveMountEffects_complete(subtreeRoot, root, committedLanes, committedTransitions);
      }
    }
  }

  function commitPassiveMountEffects_complete(subtreeRoot, root, committedLanes, committedTransitions) {
    while (nextEffect !== null) {
      var fiber = nextEffect;

      if ((fiber.flags & Passive) !== NoFlags) {
        setCurrentFiber(fiber);

        try {
          commitPassiveMountOnFiber(root, fiber, committedLanes, committedTransitions);
        } catch (error) {
          captureCommitPhaseError(fiber, fiber.return, error);
        }

        resetCurrentFiber();
      }

      if (fiber === subtreeRoot) {
        nextEffect = null;
        return;
      }

      var sibling = fiber.sibling;

      if (sibling !== null) {
        sibling.return = fiber.return;
        nextEffect = sibling;
        return;
      }

      nextEffect = fiber.return;
    }
  }

  function commitPassiveMountOnFiber(finishedRoot, finishedWork, committedLanes, committedTransitions) {
    switch (finishedWork.tag) {
      case FunctionComponent:
      case ForwardRef:
      case SimpleMemoComponent:
        {
          if ( finishedWork.mode & ProfileMode) {
            startPassiveEffectTimer();

            try {
              commitHookEffectListMount(Passive$1 | HasEffect, finishedWork);
            } finally {
              recordPassiveEffectDuration(finishedWork);
            }
          } else {
            commitHookEffectListMount(Passive$1 | HasEffect, finishedWork);
          }

          break;
        }
    }
  }

  function commitPassiveUnmountEffects(firstChild) {
    nextEffect = firstChild;
    commitPassiveUnmountEffects_begin();
  }

  function commitPassiveUnmountEffects_begin() {
    while (nextEffect !== null) {
      var fiber = nextEffect;
      var child = fiber.child;

      if ((nextEffect.flags & ChildDeletion) !== NoFlags) {
        var deletions = fiber.deletions;

        if (deletions !== null) {
          for (var i = 0; i < deletions.length; i++) {
            var fiberToDelete = deletions[i];
            nextEffect = fiberToDelete;
            commitPassiveUnmountEffectsInsideOfDeletedTree_begin(fiberToDelete, fiber);
          }

          {
            // A fiber was deleted from this parent fiber, but it's still part of
            // the previous (alternate) parent fiber's list of children. Because
            // children are a linked list, an earlier sibling that's still alive
            // will be connected to the deleted fiber via its `alternate`:
            //
            //   live fiber
            //   --alternate--> previous live fiber
            //   --sibling--> deleted fiber
            //
            // We can't disconnect `alternate` on nodes that haven't been deleted
            // yet, but we can disconnect the `sibling` and `child` pointers.
            var previousFiber = fiber.alternate;

            if (previousFiber !== null) {
              var detachedChild = previousFiber.child;

              if (detachedChild !== null) {
                previousFiber.child = null;

                do {
                  var detachedSibling = detachedChild.sibling;
                  detachedChild.sibling = null;
                  detachedChild = detachedSibling;
                } while (detachedChild !== null);
              }
            }
          }

          nextEffect = fiber;
        }
      }

      if ((fiber.subtreeFlags & PassiveMask) !== NoFlags && child !== null) {
        child.return = fiber;
        nextEffect = child;
      } else {
        commitPassiveUnmountEffects_complete();
      }
    }
  }

  function commitPassiveUnmountEffects_complete() {
    while (nextEffect !== null) {
      var fiber = nextEffect;

      if ((fiber.flags & Passive) !== NoFlags) {
        setCurrentFiber(fiber);
        commitPassiveUnmountOnFiber(fiber);
        resetCurrentFiber();
      }

      var sibling = fiber.sibling;

      if (sibling !== null) {
        sibling.return = fiber.return;
        nextEffect = sibling;
        return;
      }

      nextEffect = fiber.return;
    }
  }

  function commitPassiveUnmountOnFiber(finishedWork) {
    switch (finishedWork.tag) {
      case FunctionComponent:
      case ForwardRef:
      case SimpleMemoComponent:
        {
          if ( finishedWork.mode & ProfileMode) {
            startPassiveEffectTimer();
            commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork, finishedWork.return);
            recordPassiveEffectDuration(finishedWork);
          } else {
            commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork, finishedWork.return);
          }

          break;
        }
    }
  }

  function commitPassiveUnmountEffectsInsideOfDeletedTree_begin(deletedSubtreeRoot, nearestMountedAncestor) {
    while (nextEffect !== null) {
      var fiber = nextEffect; // Deletion effects fire in parent -> child order
      // TODO: Check if fiber has a PassiveStatic flag

      setCurrentFiber(fiber);
      commitPassiveUnmountInsideDeletedTreeOnFiber(fiber, nearestMountedAncestor);
      resetCurrentFiber();
      var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag. (But, if we
      // do this, still need to handle `deletedTreeCleanUpLevel` correctly.)

      if (child !== null) {
        child.return = fiber;
        nextEffect = child;
      } else {
        commitPassiveUnmountEffectsInsideOfDeletedTree_complete(deletedSubtreeRoot);
      }
    }
  }

  function commitPassiveUnmountEffectsInsideOfDeletedTree_complete(deletedSubtreeRoot) {
    while (nextEffect !== null) {
      var fiber = nextEffect;
      var sibling = fiber.sibling;
      var returnFiber = fiber.return;

      {
        // Recursively traverse the entire deleted tree and clean up fiber fields.
        // This is more aggressive than ideal, and the long term goal is to only
        // have to detach the deleted tree at the root.
        detachFiberAfterEffects(fiber);

        if (fiber === deletedSubtreeRoot) {
          nextEffect = null;
          return;
        }
      }

      if (sibling !== null) {
        sibling.return = returnFiber;
        nextEffect = sibling;
        return;
      }

      nextEffect = returnFiber;
    }
  }

  function commitPassiveUnmountInsideDeletedTreeOnFiber(current, nearestMountedAncestor) {
    switch (current.tag) {
      case FunctionComponent:
      case ForwardRef:
      case SimpleMemoComponent:
        {
          if ( current.mode & ProfileMode) {
            startPassiveEffectTimer();
            commitHookEffectListUnmount(Passive$1, current, nearestMountedAncestor);
            recordPassiveEffectDuration(current);
          } else {
            commitHookEffectListUnmount(Passive$1, current, nearestMountedAncestor);
          }

          break;
        }
    }
  } // TODO: Reuse reappearLayoutEffects traversal here?


  function invokeLayoutEffectMountInDEV(fiber) {
    {
      // We don't need to re-check StrictEffectsMode here.
      // This function is only called if that check has already passed.
      switch (fiber.tag) {
        case FunctionComponent:
        case ForwardRef:
        case SimpleMemoComponent:
          {
            try {
              commitHookEffectListMount(Layout | HasEffect, fiber);
            } catch (error) {
              captureCommitPhaseError(fiber, fiber.return, error);
            }

            break;
          }

        case ClassComponent:
          {
            var instance = fiber.stateNode;

            try {
              instance.componentDidMount();
            } catch (error) {
              captureCommitPhaseError(fiber, fiber.return, error);
            }

            break;
          }
      }
    }
  }

  function invokePassiveEffectMountInDEV(fiber) {
    {
      // We don't need to re-check StrictEffectsMode here.
      // This function is only called if that check has already passed.
      switch (fiber.tag) {
        case FunctionComponent:
        case ForwardRef:
        case SimpleMemoComponent:
          {
            try {
              commitHookEffectListMount(Passive$1 | HasEffect, fiber);
            } catch (error) {
              captureCommitPhaseError(fiber, fiber.return, error);
            }

            break;
          }
      }
    }
  }

  function invokeLayoutEffectUnmountInDEV(fiber) {
    {
      // We don't need to re-check StrictEffectsMode here.
      // This function is only called if that check has already passed.
      switch (fiber.tag) {
        case FunctionComponent:
        case ForwardRef:
        case SimpleMemoComponent:
          {
            try {
              commitHookEffectListUnmount(Layout | HasEffect, fiber, fiber.return);
            } catch (error) {
              captureCommitPhaseError(fiber, fiber.return, error);
            }

            break;
          }

        case ClassComponent:
          {
            var instance = fiber.stateNode;

            if (typeof instance.componentWillUnmount === 'function') {
              safelyCallComponentWillUnmount(fiber, fiber.return, instance);
            }

            break;
          }
      }
    }
  }

  function invokePassiveEffectUnmountInDEV(fiber) {
    {
      // We don't need to re-check StrictEffectsMode here.
      // This function is only called if that check has already passed.
      switch (fiber.tag) {
        case FunctionComponent:
        case ForwardRef:
        case SimpleMemoComponent:
          {
            try {
              commitHookEffectListUnmount(Passive$1 | HasEffect, fiber, fiber.return);
            } catch (error) {
              captureCommitPhaseError(fiber, fiber.return, error);
            }
          }
      }
    }
  }

  var COMPONENT_TYPE = 0;
  var HAS_PSEUDO_CLASS_TYPE = 1;
  var ROLE_TYPE = 2;
  var TEST_NAME_TYPE = 3;
  var TEXT_TYPE = 4;

  if (typeof Symbol === 'function' && Symbol.for) {
    var symbolFor = Symbol.for;
    COMPONENT_TYPE = symbolFor('selector.component');
    HAS_PSEUDO_CLASS_TYPE = symbolFor('selector.has_pseudo_class');
    ROLE_TYPE = symbolFor('selector.role');
    TEST_NAME_TYPE = symbolFor('selector.test_id');
    TEXT_TYPE = symbolFor('selector.text');
  }
  var commitHooks = [];
  function onCommitRoot$1() {
    {
      commitHooks.forEach(function (commitHook) {
        return commitHook();
      });
    }
  }

  var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue;
  function isLegacyActEnvironment(fiber) {
    {
      // Legacy mode. We preserve the behavior of React 17's act. It assumes an
      // act environment whenever `jest` is defined, but you can still turn off
      // spurious warnings by setting IS_REACT_ACT_ENVIRONMENT explicitly
      // to false.
      var isReactActEnvironmentGlobal = // $FlowExpectedError â€“ Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global
      typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined' ? IS_REACT_ACT_ENVIRONMENT : undefined; // $FlowExpectedError - Flow doesn't know about jest

      var jestIsDefined = typeof jest !== 'undefined';
      return  jestIsDefined && isReactActEnvironmentGlobal !== false;
    }
  }
  function isConcurrentActEnvironment() {
    {
      var isReactActEnvironmentGlobal = // $FlowExpectedError â€“ Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global
      typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined' ? IS_REACT_ACT_ENVIRONMENT : undefined;

      if (!isReactActEnvironmentGlobal && ReactCurrentActQueue.current !== null) {
        // TODO: Include link to relevant documentation page.
        error('The current testing environment is not configured to support ' + 'act(...)');
      }

      return isReactActEnvironmentGlobal;
    }
  }

  var ceil = Math.ceil;
  var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,
      ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
      ReactCurrentBatchConfig$3 = ReactSharedInternals.ReactCurrentBatchConfig,
      ReactCurrentActQueue$1 = ReactSharedInternals.ReactCurrentActQueue;
  var NoContext =
  /*             */
  0;
  var BatchedContext =
  /*               */
  1;
  var RenderContext =
  /*                */
  2;
  var CommitContext =
  /*                */
  4;
  var RootInProgress = 0;
  var RootFatalErrored = 1;
  var RootErrored = 2;
  var RootSuspended = 3;
  var RootSuspendedWithDelay = 4;
  var RootCompleted = 5;
  var RootDidNotComplete = 6; // Describes where we are in the React execution stack

  var executionContext = NoContext; // The root we're working on

  var workInProgressRoot = null; // The fiber we're working on

  var workInProgress = null; // The lanes we're rendering

  var workInProgressRootRenderLanes = NoLanes; // Stack that allows components to change the render lanes for its subtree
  // This is a superset of the lanes we started working on at the root. The only
  // case where it's different from `workInProgressRootRenderLanes` is when we
  // enter a subtree that is hidden and needs to be unhidden: Suspense and
  // Offscreen component.
  //
  // Most things in the work loop should deal with workInProgressRootRenderLanes.
  // Most things in begin/complete phases should deal with subtreeRenderLanes.

  var subtreeRenderLanes = NoLanes;
  var subtreeRenderLanesCursor = createCursor(NoLanes); // Whether to root completed, errored, suspended, etc.

  var workInProgressRootExitStatus = RootInProgress; // A fatal error, if one is thrown

  var workInProgressRootFatalError = null; // "Included" lanes refer to lanes that were worked on during this render. It's
  // slightly different than `renderLanes` because `renderLanes` can change as you
  // enter and exit an Offscreen tree. This value is the combination of all render
  // lanes for the entire render phase.

  var workInProgressRootIncludedLanes = NoLanes; // The work left over by components that were visited during this render. Only
  // includes unprocessed updates, not work in bailed out children.

  var workInProgressRootSkippedLanes = NoLanes; // Lanes that were updated (in an interleaved event) during this render.

  var workInProgressRootInterleavedUpdatedLanes = NoLanes; // Lanes that were updated during the render phase (*not* an interleaved event).

  var workInProgressRootPingedLanes = NoLanes; // Errors that are thrown during the render phase.

  var workInProgressRootConcurrentErrors = null; // These are errors that we recovered from without surfacing them to the UI.
  // We will log them once the tree commits.

  var workInProgressRootRecoverableErrors = null; // The most recent time we committed a fallback. This lets us ensure a train
  // model where we don't commit new loading states in too quick succession.

  var globalMostRecentFallbackTime = 0;
  var FALLBACK_THROTTLE_MS = 500; // The absolute time for when we should start giving up on rendering
  // more and prefer CPU suspense heuristics instead.

  var workInProgressRootRenderTargetTime = Infinity; // How long a render is supposed to take before we start following CPU
  // suspense heuristics and opt out of rendering more content.

  var RENDER_TIMEOUT_MS = 500;
  var workInProgressTransitions = null;

  function resetRenderTimer() {
    workInProgressRootRenderTargetTime = now() + RENDER_TIMEOUT_MS;
  }

  function getRenderTargetTime() {
    return workInProgressRootRenderTargetTime;
  }
  var hasUncaughtError = false;
  var firstUncaughtError = null;
  var legacyErrorBoundariesThatAlreadyFailed = null; // Only used when enableProfilerNestedUpdateScheduledHook is true;
  var rootDoesHavePassiveEffects = false;
  var rootWithPendingPassiveEffects = null;
  var pendingPassiveEffectsLanes = NoLanes;
  var pendingPassiveProfilerEffects = [];
  var pendingPassiveTransitions = null; // Use these to prevent an infinite loop of nested updates

  var NESTED_UPDATE_LIMIT = 50;
  var nestedUpdateCount = 0;
  var rootWithNestedUpdates = null;
  var isFlushingPassiveEffects = false;
  var didScheduleUpdateDuringPassiveEffects = false;
  var NESTED_PASSIVE_UPDATE_LIMIT = 50;
  var nestedPassiveUpdateCount = 0;
  var rootWithPassiveNestedUpdates = null; // If two updates are scheduled within the same event, we should treat their
  // event times as simultaneous, even if the actual clock time has advanced
  // between the first and second call.

  var currentEventTime = NoTimestamp;
  var currentEventTransitionLane = NoLanes;
  var isRunningInsertionEffect = false;
  function getWorkInProgressRoot() {
    return workInProgressRoot;
  }
  function requestEventTime() {
    if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
      // We're inside React, so it's fine to read the actual time.
      return now();
    } // We're not inside React, so we may be in the middle of a browser event.


    if (currentEventTime !== NoTimestamp) {
      // Use the same start time for all updates until we enter React again.
      return currentEventTime;
    } // This is the first update since React yielded. Compute a new start time.


    currentEventTime = now();
    return currentEventTime;
  }
  function requestUpdateLane(fiber) {
    // Special cases
    var mode = fiber.mode;

    if ((mode & ConcurrentMode) === NoMode) {
      return SyncLane;
    } else if ( (executionContext & RenderContext) !== NoContext && workInProgressRootRenderLanes !== NoLanes) {
      // This is a render phase update. These are not officially supported. The
      // old behavior is to give this the same "thread" (lanes) as
      // whatever is currently rendering. So if you call `setState` on a component
      // that happens later in the same render, it will flush. Ideally, we want to
      // remove the special case and treat them as if they came from an
      // interleaved event. Regardless, this pattern is not officially supported.
      // This behavior is only a fallback. The flag only exists until we can roll
      // out the setState warning, since existing code might accidentally rely on
      // the current behavior.
      return pickArbitraryLane(workInProgressRootRenderLanes);
    }

    var isTransition = requestCurrentTransition() !== NoTransition;

    if (isTransition) {
      if ( ReactCurrentBatchConfig$3.transition !== null) {
        var transition = ReactCurrentBatchConfig$3.transition;

        if (!transition._updatedFibers) {
          transition._updatedFibers = new Set();
        }

        transition._updatedFibers.add(fiber);
      } // The algorithm for assigning an update to a lane should be stable for all
      // updates at the same priority within the same event. To do this, the
      // inputs to the algorithm must be the same.
      //
      // The trick we use is to cache the first of each of these inputs within an
      // event. Then reset the cached values once we can be sure the event is
      // over. Our heuristic for that is whenever we enter a concurrent work loop.


      if (currentEventTransitionLane === NoLane) {
        // All transitions within the same event are assigned the same lane.
        currentEventTransitionLane = claimNextTransitionLane();
      }

      return currentEventTransitionLane;
    } // Updates originating inside certain React methods, like flushSync, have
    // their priority set by tracking it with a context variable.
    //
    // The opaque type returned by the host config is internally a lane, so we can
    // use that directly.
    // TODO: Move this type conversion to the event priority module.


    var updateLane = getCurrentUpdatePriority();

    if (updateLane !== NoLane) {
      return updateLane;
    } // This update originated outside React. Ask the host environment for an
    // appropriate priority, based on the type of event.
    //
    // The opaque type returned by the host config is internally a lane, so we can
    // use that directly.
    // TODO: Move this type conversion to the event priority module.


    var eventLane = getCurrentEventPriority();
    return eventLane;
  }

  function requestRetryLane(fiber) {
    // This is a fork of `requestUpdateLane` designed specifically for Suspense
    // "retries" â€” a special update that attempts to flip a Suspense boundary
    // from its placeholder state to its primary/resolved state.
    // Special cases
    var mode = fiber.mode;

    if ((mode & ConcurrentMode) === NoMode) {
      return SyncLane;
    }

    return claimNextRetryLane();
  }

  function scheduleUpdateOnFiber(root, fiber, lane, eventTime) {
    checkForNestedUpdates();

    {
      if (isRunningInsertionEffect) {
        error('useInsertionEffect must not schedule updates.');
      }
    }

    {
      if (isFlushingPassiveEffects) {
        didScheduleUpdateDuringPassiveEffects = true;
      }
    } // Mark that the root has a pending update.


    markRootUpdated(root, lane, eventTime);

    if ((executionContext & RenderContext) !== NoLanes && root === workInProgressRoot) {
      // This update was dispatched during the render phase. This is a mistake
      // if the update originates from user space (with the exception of local
      // hook updates, which are handled differently and don't reach this
      // function), but there are some internal React features that use this as
      // an implementation detail, like selective hydration.
      warnAboutRenderPhaseUpdatesInDEV(fiber); // Track lanes that were updated during the render phase
    } else {
      // This is a normal update, scheduled from outside the render phase. For
      // example, during an input event.
      {
        if (isDevToolsPresent) {
          addFiberToLanesMap(root, fiber, lane);
        }
      }

      warnIfUpdatesNotWrappedWithActDEV(fiber);

      if (root === workInProgressRoot) {
        // Received an update to a tree that's in the middle of rendering. Mark
        // that there was an interleaved update work on this root. Unless the
        // `deferRenderPhaseUpdateToNextBatch` flag is off and this is a render
        // phase update. In that case, we don't treat render phase updates as if
        // they were interleaved, for backwards compat reasons.
        if ( (executionContext & RenderContext) === NoContext) {
          workInProgressRootInterleavedUpdatedLanes = mergeLanes(workInProgressRootInterleavedUpdatedLanes, lane);
        }

        if (workInProgressRootExitStatus === RootSuspendedWithDelay) {
          // The root already suspended with a delay, which means this render
          // definitely won't finish. Since we have a new update, let's mark it as
          // suspended now, right before marking the incoming update. This has the
          // effect of interrupting the current render and switching to the update.
          // TODO: Make sure this doesn't override pings that happen while we've
          // already started rendering.
          markRootSuspended$1(root, workInProgressRootRenderLanes);
        }
      }

      ensureRootIsScheduled(root, eventTime);

      if (lane === SyncLane && executionContext === NoContext && (fiber.mode & ConcurrentMode) === NoMode && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.
      !( ReactCurrentActQueue$1.isBatchingLegacy)) {
        // Flush the synchronous work now, unless we're already working or inside
        // a batch. This is intentionally inside scheduleUpdateOnFiber instead of
        // scheduleCallbackForFiber to preserve the ability to schedule a callback
        // without immediately flushing it. We only do this for user-initiated
        // updates, to preserve historical behavior of legacy mode.
        resetRenderTimer();
        flushSyncCallbacksOnlyInLegacyMode();
      }
    }
  }
  function scheduleInitialHydrationOnRoot(root, lane, eventTime) {
    // This is a special fork of scheduleUpdateOnFiber that is only used to
    // schedule the initial hydration of a root that has just been created. Most
    // of the stuff in scheduleUpdateOnFiber can be skipped.
    //
    // The main reason for this separate path, though, is to distinguish the
    // initial children from subsequent updates. In fully client-rendered roots
    // (createRoot instead of hydrateRoot), all top-level renders are modeled as
    // updates, but hydration roots are special because the initial render must
    // match what was rendered on the server.
    var current = root.current;
    current.lanes = lane;
    markRootUpdated(root, lane, eventTime);
    ensureRootIsScheduled(root, eventTime);
  }
  function isUnsafeClassRenderPhaseUpdate(fiber) {
    // Check if this is a render phase update. Only called by class components,
    // which special (deprecated) behavior for UNSAFE_componentWillReceive props.
    return (// TODO: Remove outdated deferRenderPhaseUpdateToNextBatch experiment. We
      // decided not to enable it.
       (executionContext & RenderContext) !== NoContext
    );
  } // Use this function to schedule a task for a root. There's only one task per
  // root; if a task was already scheduled, we'll check to make sure the priority
  // of the existing task is the same as the priority of the next level that the
  // root has work on. This function is called on every update, and right before
  // exiting a task.

  function ensureRootIsScheduled(root, currentTime) {
    var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as
    // expired so we know to work on those next.

    markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.

    var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);

    if (nextLanes === NoLanes) {
      // Special case: There's nothing to work on.
      if (existingCallbackNode !== null) {
        cancelCallback$1(existingCallbackNode);
      }

      root.callbackNode = null;
      root.callbackPriority = NoLane;
      return;
    } // We use the highest priority lane to represent the priority of the callback.


    var newCallbackPriority = getHighestPriorityLane(nextLanes); // Check if there's an existing task. We may be able to reuse it.

    var existingCallbackPriority = root.callbackPriority;

    if (existingCallbackPriority === newCallbackPriority && // Special case related to `act`. If the currently scheduled task is a
    // Scheduler task, rather than an `act` task, cancel it and re-scheduled
    // on the `act` queue.
    !( ReactCurrentActQueue$1.current !== null && existingCallbackNode !== fakeActCallbackNode)) {
      {
        // If we're going to re-use an existing task, it needs to exist.
        // Assume that discrete update microtasks are non-cancellable and null.
        // TODO: Temporary until we confirm this warning is not fired.
        if (existingCallbackNode == null && existingCallbackPriority !== SyncLane) {
          error('Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.');
        }
      } // The priority hasn't changed. We can reuse the existing task. Exit.


      return;
    }

    if (existingCallbackNode != null) {
      // Cancel the existing callback. We'll schedule a new one below.
      cancelCallback$1(existingCallbackNode);
    } // Schedule a new callback.


    var newCallbackNode;

    if (newCallbackPriority === SyncLane) {
      // Special case: Sync React callbacks are scheduled on a special
      // internal queue
      if (root.tag === LegacyRoot) {
        if ( ReactCurrentActQueue$1.isBatchingLegacy !== null) {
          ReactCurrentActQueue$1.didScheduleLegacyUpdate = true;
        }

        scheduleLegacySyncCallback(performSyncWorkOnRoot.bind(null, root));
      } else {
        scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));
      }

      {
        // Flush the queue in a microtask.
        if ( ReactCurrentActQueue$1.current !== null) {
          // Inside `act`, use our internal `act` queue so that these get flushed
          // at the end of the current scope even when using the sync version
          // of `act`.
          ReactCurrentActQueue$1.current.push(flushSyncCallbacks);
        } else {
          scheduleMicrotask(function () {
            // In Safari, appending an iframe forces microtasks to run.
            // https://github.com/facebook/react/issues/22459
            // We don't support running callbacks in the middle of render
            // or commit so we need to check against that.
            if ((executionContext & (RenderContext | CommitContext)) === NoContext) {
              // Note that this would still prematurely flush the callbacks
              // if this happens outside render or commit phase (e.g. in an event).
              flushSyncCallbacks();
            }
          });
        }
      }

      newCallbackNode = null;
    } else {
      var schedulerPriorityLevel;

      switch (lanesToEventPriority(nextLanes)) {
        case DiscreteEventPriority:
          schedulerPriorityLevel = ImmediatePriority;
          break;

        case ContinuousEventPriority:
          schedulerPriorityLevel = UserBlockingPriority;
          break;

        case DefaultEventPriority:
          schedulerPriorityLevel = NormalPriority;
          break;

        case IdleEventPriority:
          schedulerPriorityLevel = IdlePriority;
          break;

        default:
          schedulerPriorityLevel = NormalPriority;
          break;
      }

      newCallbackNode = scheduleCallback$1(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));
    }

    root.callbackPriority = newCallbackPriority;
    root.callbackNode = newCallbackNode;
  } // This is the entry point for every concurrent task, i.e. anything that
  // goes through Scheduler.


  function performConcurrentWorkOnRoot(root, didTimeout) {
    {
      resetNestedUpdateFlag();
    } // Since we know we're in a React event, we can clear the current
    // event time. The next update will compute a new event time.


    currentEventTime = NoTimestamp;
    currentEventTransitionLane = NoLanes;

    if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
      throw new Error('Should not already be working.');
    } // Flush any pending passive effects before deciding which lanes to work on,
    // in case they schedule additional work.


    var originalCallbackNode = root.callbackNode;
    var didFlushPassiveEffects = flushPassiveEffects();

    if (didFlushPassiveEffects) {
      // Something in the passive effect phase may have canceled the current task.
      // Check if the task node for this root was changed.
      if (root.callbackNode !== originalCallbackNode) {
        // The current task was canceled. Exit. We don't need to call
        // `ensureRootIsScheduled` because the check above implies either that
        // there's a new task, or that there's no remaining work on this root.
        return null;
      }
    } // Determine the next lanes to work on, using the fields stored
    // on the root.


    var lanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);

    if (lanes === NoLanes) {
      // Defensive coding. This is never expected to happen.
      return null;
    } // We disable time-slicing in some cases: if the work has been CPU-bound
    // for too long ("expired" work, to prevent starvation), or we're in
    // sync-updates-by-default mode.
    // TODO: We only check `didTimeout` defensively, to account for a Scheduler
    // bug we're still investigating. Once the bug in Scheduler is fixed,
    // we can remove this, since we track expiration ourselves.


    var shouldTimeSlice = !includesBlockingLane(root, lanes) && !includesExpiredLane(root, lanes) && ( !didTimeout);
    var exitStatus = shouldTimeSlice ? renderRootConcurrent(root, lanes) : renderRootSync(root, lanes);

    if (exitStatus !== RootInProgress) {
      if (exitStatus === RootErrored) {
        // If something threw an error, try rendering one more time. We'll
        // render synchronously to block concurrent data mutations, and we'll
        // includes all pending updates are included. If it still fails after
        // the second attempt, we'll give up and commit the resulting tree.
        var errorRetryLanes = getLanesToRetrySynchronouslyOnError(root);

        if (errorRetryLanes !== NoLanes) {
          lanes = errorRetryLanes;
          exitStatus = recoverFromConcurrentError(root, errorRetryLanes);
        }
      }

      if (exitStatus === RootFatalErrored) {
        var fatalError = workInProgressRootFatalError;
        prepareFreshStack(root, NoLanes);
        markRootSuspended$1(root, lanes);
        ensureRootIsScheduled(root, now());
        throw fatalError;
      }

      if (exitStatus === RootDidNotComplete) {
        // The render unwound without completing the tree. This happens in special
        // cases where need to exit the current render without producing a
        // consistent tree or committing.
        //
        // This should only happen during a concurrent render, not a discrete or
        // synchronous update. We should have already checked for this when we
        // unwound the stack.
        markRootSuspended$1(root, lanes);
      } else {
        // The render completed.
        // Check if this render may have yielded to a concurrent event, and if so,
        // confirm that any newly rendered stores are consistent.
        // TODO: It's possible that even a concurrent render may never have yielded
        // to the main thread, if it was fast enough, or if it expired. We could
        // skip the consistency check in that case, too.
        var renderWasConcurrent = !includesBlockingLane(root, lanes);
        var finishedWork = root.current.alternate;

        if (renderWasConcurrent && !isRenderConsistentWithExternalStores(finishedWork)) {
          // A store was mutated in an interleaved event. Render again,
          // synchronously, to block further mutations.
          exitStatus = renderRootSync(root, lanes); // We need to check again if something threw

          if (exitStatus === RootErrored) {
            var _errorRetryLanes = getLanesToRetrySynchronouslyOnError(root);

            if (_errorRetryLanes !== NoLanes) {
              lanes = _errorRetryLanes;
              exitStatus = recoverFromConcurrentError(root, _errorRetryLanes); // We assume the tree is now consistent because we didn't yield to any
              // concurrent events.
            }
          }

          if (exitStatus === RootFatalErrored) {
            var _fatalError = workInProgressRootFatalError;
            prepareFreshStack(root, NoLanes);
            markRootSuspended$1(root, lanes);
            ensureRootIsScheduled(root, now());
            throw _fatalError;
          }
        } // We now have a consistent tree. The next step is either to commit it,
        // or, if something suspended, wait to commit it after a timeout.


        root.finishedWork = finishedWork;
        root.finishedLanes = lanes;
        finishConcurrentRender(root, exitStatus, lanes);
      }
    }

    ensureRootIsScheduled(root, now());

    if (root.callbackNode === originalCallbackNode) {
      // The task node scheduled for this root is the same one that's
      // currently executed. Need to return a continuation.
      return performConcurrentWorkOnRoot.bind(null, root);
    }

    return null;
  }

  function recoverFromConcurrentError(root, errorRetryLanes) {
    // If an error occurred during hydration, discard server response and fall
    // back to client side render.
    // Before rendering again, save the errors from the previous attempt.
    var errorsFromFirstAttempt = workInProgressRootConcurrentErrors;

    if (isRootDehydrated(root)) {
      // The shell failed to hydrate. Set a flag to force a client rendering
      // during the next attempt. To do this, we call prepareFreshStack now
      // to create the root work-in-progress fiber. This is a bit weird in terms
      // of factoring, because it relies on renderRootSync not calling
      // prepareFreshStack again in the call below, which happens because the
      // root and lanes haven't changed.
      //
      // TODO: I think what we should do is set ForceClientRender inside
      // throwException, like we do for nested Suspense boundaries. The reason
      // it's here instead is so we can switch to the synchronous work loop, too.
      // Something to consider for a future refactor.
      var rootWorkInProgress = prepareFreshStack(root, errorRetryLanes);
      rootWorkInProgress.flags |= ForceClientRender;

      {
        errorHydratingContainer(root.containerInfo);
      }
    }

    var exitStatus = renderRootSync(root, errorRetryLanes);

    if (exitStatus !== RootErrored) {
      // Successfully finished rendering on retry
      // The errors from the failed first attempt have been recovered. Add
      // them to the collection of recoverable errors. We'll log them in the
      // commit phase.
      var errorsFromSecondAttempt = workInProgressRootRecoverableErrors;
      workInProgressRootRecoverableErrors = errorsFromFirstAttempt; // The errors from the second attempt should be queued after the errors
      // from the first attempt, to preserve the causal sequence.

      if (errorsFromSecondAttempt !== null) {
        queueRecoverableErrors(errorsFromSecondAttempt);
      }
    }

    return exitStatus;
  }

  function queueRecoverableErrors(errors) {
    if (workInProgressRootRecoverableErrors === null) {
      workInProgressRootRecoverableErrors = errors;
    } else {
      workInProgressRootRecoverableErrors.push.apply(workInProgressRootRecoverableErrors, errors);
    }
  }

  function finishConcurrentRender(root, exitStatus, lanes) {
    switch (exitStatus) {
      case RootInProgress:
      case RootFatalErrored:
        {
          throw new Error('Root did not complete. This is a bug in React.');
        }
      // Flow knows about invariant, so it complains if I add a break
      // statement, but eslint doesn't know about invariant, so it complains
      // if I do. eslint-disable-next-line no-fallthrough

      case RootErrored:
        {
          // We should have already attempted to retry this tree. If we reached
          // this point, it errored again. Commit it.
          commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);
          break;
        }

      case RootSuspended:
        {
          markRootSuspended$1(root, lanes); // We have an acceptable loading state. We need to figure out if we
          // should immediately commit it or wait a bit.

          if (includesOnlyRetries(lanes) && // do not delay if we're inside an act() scope
          !shouldForceFlushFallbacksInDEV()) {
            // This render only included retries, no updates. Throttle committing
            // retries so that we don't show too many loading states too quickly.
            var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time.

            if (msUntilTimeout > 10) {
              var nextLanes = getNextLanes(root, NoLanes);

              if (nextLanes !== NoLanes) {
                // There's additional work on this root.
                break;
              }

              var suspendedLanes = root.suspendedLanes;

              if (!isSubsetOfLanes(suspendedLanes, lanes)) {
                // We should prefer to render the fallback of at the last
                // suspended level. Ping the last suspended level to try
                // rendering it again.
                // FIXME: What if the suspended lanes are Idle? Should not restart.
                var eventTime = requestEventTime();
                markRootPinged(root, suspendedLanes);
                break;
              } // The render is suspended, it hasn't timed out, and there's no
              // lower priority work to do. Instead of committing the fallback
              // immediately, wait for more data to arrive.


              root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root, workInProgressRootRecoverableErrors, workInProgressTransitions), msUntilTimeout);
              break;
            }
          } // The work expired. Commit immediately.


          commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);
          break;
        }

      case RootSuspendedWithDelay:
        {
          markRootSuspended$1(root, lanes);

          if (includesOnlyTransitions(lanes)) {
            // This is a transition, so we should exit without committing a
            // placeholder and without scheduling a timeout. Delay indefinitely
            // until we receive more data.
            break;
          }

          if (!shouldForceFlushFallbacksInDEV()) {
            // This is not a transition, but we did trigger an avoided state.
            // Schedule a placeholder to display after a short delay, using the Just
            // Noticeable Difference.
            // TODO: Is the JND optimization worth the added complexity? If this is
            // the only reason we track the event time, then probably not.
            // Consider removing.
            var mostRecentEventTime = getMostRecentEventTime(root, lanes);
            var eventTimeMs = mostRecentEventTime;
            var timeElapsedMs = now() - eventTimeMs;

            var _msUntilTimeout = jnd(timeElapsedMs) - timeElapsedMs; // Don't bother with a very short suspense time.


            if (_msUntilTimeout > 10) {
              // Instead of committing the fallback immediately, wait for more data
              // to arrive.
              root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root, workInProgressRootRecoverableErrors, workInProgressTransitions), _msUntilTimeout);
              break;
            }
          } // Commit the placeholder.


          commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);
          break;
        }

      case RootCompleted:
        {
          // The work completed. Ready to commit.
          commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);
          break;
        }

      default:
        {
          throw new Error('Unknown root exit status.');
        }
    }
  }

  function isRenderConsistentWithExternalStores(finishedWork) {
    // Search the rendered tree for external store reads, and check whether the
    // stores were mutated in a concurrent event. Intentionally using an iterative
    // loop instead of recursion so we can exit early.
    var node = finishedWork;

    while (true) {
      if (node.flags & StoreConsistency) {
        var updateQueue = node.updateQueue;

        if (updateQueue !== null) {
          var checks = updateQueue.stores;

          if (checks !== null) {
            for (var i = 0; i < checks.length; i++) {
              var check = checks[i];
              var getSnapshot = check.getSnapshot;
              var renderedValue = check.value;

              try {
                if (!objectIs(getSnapshot(), renderedValue)) {
                  // Found an inconsistent store.
                  return false;
                }
              } catch (error) {
                // If `getSnapshot` throws, return `false`. This will schedule
                // a re-render, and the error will be rethrown during render.
                return false;
              }
            }
          }
        }
      }

      var child = node.child;

      if (node.subtreeFlags & StoreConsistency && child !== null) {
        child.return = node;
        node = child;
        continue;
      }

      if (node === finishedWork) {
        return true;
      }

      while (node.sibling === null) {
        if (node.return === null || node.return === finishedWork) {
          return true;
        }

        node = node.return;
      }

      node.sibling.return = node.return;
      node = node.sibling;
    } // Flow doesn't know this is unreachable, but eslint does
    // eslint-disable-next-line no-unreachable


    return true;
  }

  function markRootSuspended$1(root, suspendedLanes) {
    // When suspending, we should always exclude lanes that were pinged or (more
    // rarely, since we try to avoid it) updated during the render phase.
    // TODO: Lol maybe there's a better way to factor this besides this
    // obnoxiously named function :)
    suspendedLanes = removeLanes(suspendedLanes, workInProgressRootPingedLanes);
    suspendedLanes = removeLanes(suspendedLanes, workInProgressRootInterleavedUpdatedLanes);
    markRootSuspended(root, suspendedLanes);
  } // This is the entry point for synchronous tasks that don't go
  // through Scheduler


  function performSyncWorkOnRoot(root) {
    {
      syncNestedUpdateFlag();
    }

    if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
      throw new Error('Should not already be working.');
    }

    flushPassiveEffects();
    var lanes = getNextLanes(root, NoLanes);

    if (!includesSomeLane(lanes, SyncLane)) {
      // There's no remaining sync work left.
      ensureRootIsScheduled(root, now());
      return null;
    }

    var exitStatus = renderRootSync(root, lanes);

    if (root.tag !== LegacyRoot && exitStatus === RootErrored) {
      // If something threw an error, try rendering one more time. We'll render
      // synchronously to block concurrent data mutations, and we'll includes
      // all pending updates are included. If it still fails after the second
      // attempt, we'll give up and commit the resulting tree.
      var errorRetryLanes = getLanesToRetrySynchronouslyOnError(root);

      if (errorRetryLanes !== NoLanes) {
        lanes = errorRetryLanes;
        exitStatus = recoverFromConcurrentError(root, errorRetryLanes);
      }
    }

    if (exitStatus === RootFatalErrored) {
      var fatalError = workInProgressRootFatalError;
      prepareFreshStack(root, NoLanes);
      markRootSuspended$1(root, lanes);
      ensureRootIsScheduled(root, now());
      throw fatalError;
    }

    if (exitStatus === RootDidNotComplete) {
      throw new Error('Root did not complete. This is a bug in React.');
    } // We now have a consistent tree. Because this is a sync render, we
    // will commit it even if something suspended.


    var finishedWork = root.current.alternate;
    root.finishedWork = finishedWork;
    root.finishedLanes = lanes;
    commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions); // Before exiting, make sure there's a callback scheduled for the next
    // pending level.

    ensureRootIsScheduled(root, now());
    return null;
  }

  function flushRoot(root, lanes) {
    if (lanes !== NoLanes) {
      markRootEntangled(root, mergeLanes(lanes, SyncLane));
      ensureRootIsScheduled(root, now());

      if ((executionContext & (RenderContext | CommitContext)) === NoContext) {
        resetRenderTimer();
        flushSyncCallbacks();
      }
    }
  }
  function batchedUpdates$1(fn, a) {
    var prevExecutionContext = executionContext;
    executionContext |= BatchedContext;

    try {
      return fn(a);
    } finally {
      executionContext = prevExecutionContext; // If there were legacy sync updates, flush them at the end of the outer
      // most batchedUpdates-like method.

      if (executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.
      !( ReactCurrentActQueue$1.isBatchingLegacy)) {
        resetRenderTimer();
        flushSyncCallbacksOnlyInLegacyMode();
      }
    }
  }
  function discreteUpdates(fn, a, b, c, d) {
    var previousPriority = getCurrentUpdatePriority();
    var prevTransition = ReactCurrentBatchConfig$3.transition;

    try {
      ReactCurrentBatchConfig$3.transition = null;
      setCurrentUpdatePriority(DiscreteEventPriority);
      return fn(a, b, c, d);
    } finally {
      setCurrentUpdatePriority(previousPriority);
      ReactCurrentBatchConfig$3.transition = prevTransition;

      if (executionContext === NoContext) {
        resetRenderTimer();
      }
    }
  } // Overload the definition to the two valid signatures.
  // Warning, this opts-out of checking the function body.

  // eslint-disable-next-line no-redeclare
  function flushSync(fn) {
    // In legacy mode, we flush pending passive effects at the beginning of the
    // next event, not at the end of the previous one.
    if (rootWithPendingPassiveEffects !== null && rootWithPendingPassiveEffects.tag === LegacyRoot && (executionContext & (RenderContext | CommitContext)) === NoContext) {
      flushPassiveEffects();
    }

    var prevExecutionContext = executionContext;
    executionContext |= BatchedContext;
    var prevTransition = ReactCurrentBatchConfig$3.transition;
    var previousPriority = getCurrentUpdatePriority();

    try {
      ReactCurrentBatchConfig$3.transition = null;
      setCurrentUpdatePriority(DiscreteEventPriority);

      if (fn) {
        return fn();
      } else {
        return undefined;
      }
    } finally {
      setCurrentUpdatePriority(previousPriority);
      ReactCurrentBatchConfig$3.transition = prevTransition;
      executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.
      // Note that this will happen even if batchedUpdates is higher up
      // the stack.

      if ((executionContext & (RenderContext | CommitContext)) === NoContext) {
        flushSyncCallbacks();
      }
    }
  }
  function isAlreadyRendering() {
    // Used by the renderer to print a warning if certain APIs are called from
    // the wrong context.
    return  (executionContext & (RenderContext | CommitContext)) !== NoContext;
  }
  function pushRenderLanes(fiber, lanes) {
    push(subtreeRenderLanesCursor, subtreeRenderLanes, fiber);
    subtreeRenderLanes = mergeLanes(subtreeRenderLanes, lanes);
    workInProgressRootIncludedLanes = mergeLanes(workInProgressRootIncludedLanes, lanes);
  }
  function popRenderLanes(fiber) {
    subtreeRenderLanes = subtreeRenderLanesCursor.current;
    pop(subtreeRenderLanesCursor, fiber);
  }

  function prepareFreshStack(root, lanes) {
    root.finishedWork = null;
    root.finishedLanes = NoLanes;
    var timeoutHandle = root.timeoutHandle;

    if (timeoutHandle !== noTimeout) {
      // The root previous suspended and scheduled a timeout to commit a fallback
      // state. Now that we have additional work, cancel the timeout.
      root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above

      cancelTimeout(timeoutHandle);
    }

    if (workInProgress !== null) {
      var interruptedWork = workInProgress.return;

      while (interruptedWork !== null) {
        var current = interruptedWork.alternate;
        unwindInterruptedWork(current, interruptedWork);
        interruptedWork = interruptedWork.return;
      }
    }

    workInProgressRoot = root;
    var rootWorkInProgress = createWorkInProgress(root.current, null);
    workInProgress = rootWorkInProgress;
    workInProgressRootRenderLanes = subtreeRenderLanes = workInProgressRootIncludedLanes = lanes;
    workInProgressRootExitStatus = RootInProgress;
    workInProgressRootFatalError = null;
    workInProgressRootSkippedLanes = NoLanes;
    workInProgressRootInterleavedUpdatedLanes = NoLanes;
    workInProgressRootPingedLanes = NoLanes;
    workInProgressRootConcurrentErrors = null;
    workInProgressRootRecoverableErrors = null;
    finishQueueingConcurrentUpdates();

    {
      ReactStrictModeWarnings.discardPendingWarnings();
    }

    return rootWorkInProgress;
  }

  function handleError(root, thrownValue) {
    do {
      var erroredWork = workInProgress;

      try {
        // Reset module-level state that was set during the render phase.
        resetContextDependencies();
        resetHooksAfterThrow();
        resetCurrentFiber(); // TODO: I found and added this missing line while investigating a
        // separate issue. Write a regression test using string refs.

        ReactCurrentOwner$2.current = null;

        if (erroredWork === null || erroredWork.return === null) {
          // Expected to be working on a non-root fiber. This is a fatal error
          // because there's no ancestor that can handle it; the root is
          // supposed to capture all errors that weren't caught by an error
          // boundary.
          workInProgressRootExitStatus = RootFatalErrored;
          workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next
          // sibling, or the parent if there are no siblings. But since the root
          // has no siblings nor a parent, we set it to null. Usually this is
          // handled by `completeUnitOfWork` or `unwindWork`, but since we're
          // intentionally not calling those, we need set it here.
          // TODO: Consider calling `unwindWork` to pop the contexts.

          workInProgress = null;
          return;
        }

        if (enableProfilerTimer && erroredWork.mode & ProfileMode) {
          // Record the time spent rendering before an error was thrown. This
          // avoids inaccurate Profiler durations in the case of a
          // suspended render.
          stopProfilerTimerIfRunningAndRecordDelta(erroredWork, true);
        }

        if (enableSchedulingProfiler) {
          markComponentRenderStopped();

          if (thrownValue !== null && typeof thrownValue === 'object' && typeof thrownValue.then === 'function') {
            var wakeable = thrownValue;
            markComponentSuspended(erroredWork, wakeable, workInProgressRootRenderLanes);
          } else {
            markComponentErrored(erroredWork, thrownValue, workInProgressRootRenderLanes);
          }
        }

        throwException(root, erroredWork.return, erroredWork, thrownValue, workInProgressRootRenderLanes);
        completeUnitOfWork(erroredWork);
      } catch (yetAnotherThrownValue) {
        // Something in the return path also threw.
        thrownValue = yetAnotherThrownValue;

        if (workInProgress === erroredWork && erroredWork !== null) {
          // If this boundary has already errored, then we had trouble processing
          // the error. Bubble it to the next boundary.
          erroredWork = erroredWork.return;
          workInProgress = erroredWork;
        } else {
          erroredWork = workInProgress;
        }

        continue;
      } // Return to the normal work loop.


      return;
    } while (true);
  }

  function pushDispatcher() {
    var prevDispatcher = ReactCurrentDispatcher$2.current;
    ReactCurrentDispatcher$2.current = ContextOnlyDispatcher;

    if (prevDispatcher === null) {
      // The React isomorphic package does not include a default dispatcher.
      // Instead the first renderer will lazily attach one, in order to give
      // nicer error messages.
      return ContextOnlyDispatcher;
    } else {
      return prevDispatcher;
    }
  }

  function popDispatcher(prevDispatcher) {
    ReactCurrentDispatcher$2.current = prevDispatcher;
  }

  function markCommitTimeOfFallback() {
    globalMostRecentFallbackTime = now();
  }
  function markSkippedUpdateLanes(lane) {
    workInProgressRootSkippedLanes = mergeLanes(lane, workInProgressRootSkippedLanes);
  }
  function renderDidSuspend() {
    if (workInProgressRootExitStatus === RootInProgress) {
      workInProgressRootExitStatus = RootSuspended;
    }
  }
  function renderDidSuspendDelayIfPossible() {
    if (workInProgressRootExitStatus === RootInProgress || workInProgressRootExitStatus === RootSuspended || workInProgressRootExitStatus === RootErrored) {
      workInProgressRootExitStatus = RootSuspendedWithDelay;
    } // Check if there are updates that we skipped tree that might have unblocked
    // this render.


    if (workInProgressRoot !== null && (includesNonIdleWork(workInProgressRootSkippedLanes) || includesNonIdleWork(workInProgressRootInterleavedUpdatedLanes))) {
      // Mark the current render as suspended so that we switch to working on
      // the updates that were skipped. Usually we only suspend at the end of
      // the render phase.
      // TODO: We should probably always mark the root as suspended immediately
      // (inside this function), since by suspending at the end of the render
      // phase introduces a potential mistake where we suspend lanes that were
      // pinged or updated while we were rendering.
      markRootSuspended$1(workInProgressRoot, workInProgressRootRenderLanes);
    }
  }
  function renderDidError(error) {
    if (workInProgressRootExitStatus !== RootSuspendedWithDelay) {
      workInProgressRootExitStatus = RootErrored;
    }

    if (workInProgressRootConcurrentErrors === null) {
      workInProgressRootConcurrentErrors = [error];
    } else {
      workInProgressRootConcurrentErrors.push(error);
    }
  } // Called during render to determine if anything has suspended.
  // Returns false if we're not sure.

  function renderHasNotSuspendedYet() {
    // If something errored or completed, we can't really be sure,
    // so those are false.
    return workInProgressRootExitStatus === RootInProgress;
  }

  function renderRootSync(root, lanes) {
    var prevExecutionContext = executionContext;
    executionContext |= RenderContext;
    var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack
    // and prepare a fresh one. Otherwise we'll continue where we left off.

    if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {
      {
        if (isDevToolsPresent) {
          var memoizedUpdaters = root.memoizedUpdaters;

          if (memoizedUpdaters.size > 0) {
            restorePendingUpdaters(root, workInProgressRootRenderLanes);
            memoizedUpdaters.clear();
          } // At this point, move Fibers that scheduled the upcoming work from the Map to the Set.
          // If we bailout on this work, we'll move them back (like above).
          // It's important to move them now in case the work spawns more work at the same priority with different updaters.
          // That way we can keep the current update and future updates separate.


          movePendingFibersToMemoized(root, lanes);
        }
      }

      workInProgressTransitions = getTransitionsForLanes();
      prepareFreshStack(root, lanes);
    }

    {
      markRenderStarted(lanes);
    }

    do {
      try {
        workLoopSync();
        break;
      } catch (thrownValue) {
        handleError(root, thrownValue);
      }
    } while (true);

    resetContextDependencies();
    executionContext = prevExecutionContext;
    popDispatcher(prevDispatcher);

    if (workInProgress !== null) {
      // This is a sync render, so we should have finished the whole tree.
      throw new Error('Cannot commit an incomplete root. This error is likely caused by a ' + 'bug in React. Please file an issue.');
    }

    {
      markRenderStopped();
    } // Set this to null to indicate there's no in-progress render.


    workInProgressRoot = null;
    workInProgressRootRenderLanes = NoLanes;
    return workInProgressRootExitStatus;
  } // The work loop is an extremely hot path. Tell Closure not to inline it.

  /** @noinline */


  function workLoopSync() {
    // Already timed out, so perform work without checking if we need to yield.
    while (workInProgress !== null) {
      performUnitOfWork(workInProgress);
    }
  }

  function renderRootConcurrent(root, lanes) {
    var prevExecutionContext = executionContext;
    executionContext |= RenderContext;
    var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack
    // and prepare a fresh one. Otherwise we'll continue where we left off.

    if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {
      {
        if (isDevToolsPresent) {
          var memoizedUpdaters = root.memoizedUpdaters;

          if (memoizedUpdaters.size > 0) {
            restorePendingUpdaters(root, workInProgressRootRenderLanes);
            memoizedUpdaters.clear();
          } // At this point, move Fibers that scheduled the upcoming work from the Map to the Set.
          // If we bailout on this work, we'll move them back (like above).
          // It's important to move them now in case the work spawns more work at the same priority with different updaters.
          // That way we can keep the current update and future updates separate.


          movePendingFibersToMemoized(root, lanes);
        }
      }

      workInProgressTransitions = getTransitionsForLanes();
      resetRenderTimer();
      prepareFreshStack(root, lanes);
    }

    {
      markRenderStarted(lanes);
    }

    do {
      try {
        workLoopConcurrent();
        break;
      } catch (thrownValue) {
        handleError(root, thrownValue);
      }
    } while (true);

    resetContextDependencies();
    popDispatcher(prevDispatcher);
    executionContext = prevExecutionContext;


    if (workInProgress !== null) {
      // Still work remaining.
      {
        markRenderYielded();
      }

      return RootInProgress;
    } else {
      // Completed the tree.
      {
        markRenderStopped();
      } // Set this to null to indicate there's no in-progress render.


      workInProgressRoot = null;
      workInProgressRootRenderLanes = NoLanes; // Return the final exit status.

      return workInProgressRootExitStatus;
    }
  }
  /** @noinline */


  function workLoopConcurrent() {
    // Perform work until Scheduler asks us to yield
    while (workInProgress !== null && !shouldYield()) {
      performUnitOfWork(workInProgress);
    }
  }

  function performUnitOfWork(unitOfWork) {
    // The current, flushed, state of this fiber is the alternate. Ideally
    // nothing should rely on this, but relying on it here means that we don't
    // need an additional field on the work in progress.
    var current = unitOfWork.alternate;
    setCurrentFiber(unitOfWork);
    var next;

    if ( (unitOfWork.mode & ProfileMode) !== NoMode) {
      startProfilerTimer(unitOfWork);
      next = beginWork$1(current, unitOfWork, subtreeRenderLanes);
      stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);
    } else {
      next = beginWork$1(current, unitOfWork, subtreeRenderLanes);
    }

    resetCurrentFiber();
    unitOfWork.memoizedProps = unitOfWork.pendingProps;

    if (next === null) {
      // If this doesn't spawn new work, complete the current work.
      completeUnitOfWork(unitOfWork);
    } else {
      workInProgress = next;
    }

    ReactCurrentOwner$2.current = null;
  }

  function completeUnitOfWork(unitOfWork) {
    // Attempt to complete the current unit of work, then move to the next
    // sibling. If there are no more siblings, return to the parent fiber.
    var completedWork = unitOfWork;

    do {
      // The current, flushed, state of this fiber is the alternate. Ideally
      // nothing should rely on this, but relying on it here means that we don't
      // need an additional field on the work in progress.
      var current = completedWork.alternate;
      var returnFiber = completedWork.return; // Check if the work completed or if something threw.

      if ((completedWork.flags & Incomplete) === NoFlags) {
        setCurrentFiber(completedWork);
        var next = void 0;

        if ( (completedWork.mode & ProfileMode) === NoMode) {
          next = completeWork(current, completedWork, subtreeRenderLanes);
        } else {
          startProfilerTimer(completedWork);
          next = completeWork(current, completedWork, subtreeRenderLanes); // Update render duration assuming we didn't error.

          stopProfilerTimerIfRunningAndRecordDelta(completedWork, false);
        }

        resetCurrentFiber();

        if (next !== null) {
          // Completing this fiber spawned new work. Work on that next.
          workInProgress = next;
          return;
        }
      } else {
        // This fiber did not complete because something threw. Pop values off
        // the stack without entering the complete phase. If this is a boundary,
        // capture values if possible.
        var _next = unwindWork(current, completedWork); // Because this fiber did not complete, don't reset its lanes.


        if (_next !== null) {
          // If completing this work spawned new work, do that next. We'll come
          // back here again.
          // Since we're restarting, remove anything that is not a host effect
          // from the effect tag.
          _next.flags &= HostEffectMask;
          workInProgress = _next;
          return;
        }

        if ( (completedWork.mode & ProfileMode) !== NoMode) {
          // Record the render duration for the fiber that errored.
          stopProfilerTimerIfRunningAndRecordDelta(completedWork, false); // Include the time spent working on failed children before continuing.

          var actualDuration = completedWork.actualDuration;
          var child = completedWork.child;

          while (child !== null) {
            actualDuration += child.actualDuration;
            child = child.sibling;
          }

          completedWork.actualDuration = actualDuration;
        }

        if (returnFiber !== null) {
          // Mark the parent fiber as incomplete and clear its subtree flags.
          returnFiber.flags |= Incomplete;
          returnFiber.subtreeFlags = NoFlags;
          returnFiber.deletions = null;
        } else {
          // We've unwound all the way to the root.
          workInProgressRootExitStatus = RootDidNotComplete;
          workInProgress = null;
          return;
        }
      }

      var siblingFiber = completedWork.sibling;

      if (siblingFiber !== null) {
        // If there is more work to do in this returnFiber, do that next.
        workInProgress = siblingFiber;
        return;
      } // Otherwise, return to the parent


      completedWork = returnFiber; // Update the next thing we're working on in case something throws.

      workInProgress = completedWork;
    } while (completedWork !== null); // We've reached the root.


    if (workInProgressRootExitStatus === RootInProgress) {
      workInProgressRootExitStatus = RootCompleted;
    }
  }

  function commitRoot(root, recoverableErrors, transitions) {
    // TODO: This no longer makes any sense. We already wrap the mutation and
    // layout phases. Should be able to remove.
    var previousUpdateLanePriority = getCurrentUpdatePriority();
    var prevTransition = ReactCurrentBatchConfig$3.transition;

    try {
      ReactCurrentBatchConfig$3.transition = null;
      setCurrentUpdatePriority(DiscreteEventPriority);
      commitRootImpl(root, recoverableErrors, transitions, previousUpdateLanePriority);
    } finally {
      ReactCurrentBatchConfig$3.transition = prevTransition;
      setCurrentUpdatePriority(previousUpdateLanePriority);
    }

    return null;
  }

  function commitRootImpl(root, recoverableErrors, transitions, renderPriorityLevel) {
    do {
      // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which
      // means `flushPassiveEffects` will sometimes result in additional
      // passive effects. So we need to keep flushing in a loop until there are
      // no more pending effects.
      // TODO: Might be better if `flushPassiveEffects` did not automatically
      // flush synchronous work at the end, to avoid factoring hazards like this.
      flushPassiveEffects();
    } while (rootWithPendingPassiveEffects !== null);

    flushRenderPhaseStrictModeWarningsInDEV();

    if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
      throw new Error('Should not already be working.');
    }

    var finishedWork = root.finishedWork;
    var lanes = root.finishedLanes;

    {
      markCommitStarted(lanes);
    }

    if (finishedWork === null) {

      {
        markCommitStopped();
      }

      return null;
    } else {
      {
        if (lanes === NoLanes) {
          error('root.finishedLanes should not be empty during a commit. This is a ' + 'bug in React.');
        }
      }
    }

    root.finishedWork = null;
    root.finishedLanes = NoLanes;

    if (finishedWork === root.current) {
      throw new Error('Cannot commit the same tree as before. This error is likely caused by ' + 'a bug in React. Please file an issue.');
    } // commitRoot never returns a continuation; it always finishes synchronously.
    // So we can clear these now to allow a new callback to be scheduled.


    root.callbackNode = null;
    root.callbackPriority = NoLane; // Update the first and last pending times on this root. The new first
    // pending time is whatever is left on the root fiber.

    var remainingLanes = mergeLanes(finishedWork.lanes, finishedWork.childLanes);
    markRootFinished(root, remainingLanes);

    if (root === workInProgressRoot) {
      // We can reset these now that they are finished.
      workInProgressRoot = null;
      workInProgress = null;
      workInProgressRootRenderLanes = NoLanes;
    } // If there are pending passive effects, schedule a callback to process them.
    // Do this as early as possible, so it is queued before anything else that
    // might get scheduled in the commit phase. (See #16714.)
    // TODO: Delete all other places that schedule the passive effect callback
    // They're redundant.


    if ((finishedWork.subtreeFlags & PassiveMask) !== NoFlags || (finishedWork.flags & PassiveMask) !== NoFlags) {
      if (!rootDoesHavePassiveEffects) {
        rootDoesHavePassiveEffects = true;
        // to store it in pendingPassiveTransitions until they get processed
        // We need to pass this through as an argument to commitRoot
        // because workInProgressTransitions might have changed between
        // the previous render and commit if we throttle the commit
        // with setTimeout

        pendingPassiveTransitions = transitions;
        scheduleCallback$1(NormalPriority, function () {
          flushPassiveEffects(); // This render triggered passive effects: release the root cache pool
          // *after* passive effects fire to avoid freeing a cache pool that may
          // be referenced by a node in the tree (HostRoot, Cache boundary etc)

          return null;
        });
      }
    } // Check if there are any effects in the whole tree.
    // TODO: This is left over from the effect list implementation, where we had
    // to check for the existence of `firstEffect` to satisfy Flow. I think the
    // only other reason this optimization exists is because it affects profiling.
    // Reconsider whether this is necessary.


    var subtreeHasEffects = (finishedWork.subtreeFlags & (BeforeMutationMask | MutationMask | LayoutMask | PassiveMask)) !== NoFlags;
    var rootHasEffect = (finishedWork.flags & (BeforeMutationMask | MutationMask | LayoutMask | PassiveMask)) !== NoFlags;

    if (subtreeHasEffects || rootHasEffect) {
      var prevTransition = ReactCurrentBatchConfig$3.transition;
      ReactCurrentBatchConfig$3.transition = null;
      var previousPriority = getCurrentUpdatePriority();
      setCurrentUpdatePriority(DiscreteEventPriority);
      var prevExecutionContext = executionContext;
      executionContext |= CommitContext; // Reset this to null before calling lifecycles

      ReactCurrentOwner$2.current = null; // The commit phase is broken into several sub-phases. We do a separate pass
      // of the effect list for each phase: all mutation effects come before all
      // layout effects, and so on.
      // The first phase a "before mutation" phase. We use this phase to read the
      // state of the host tree right before we mutate it. This is where
      // getSnapshotBeforeUpdate is called.

      var shouldFireAfterActiveInstanceBlur = commitBeforeMutationEffects(root, finishedWork);

      {
        // Mark the current commit time to be shared by all Profilers in this
        // batch. This enables them to be grouped later.
        recordCommitTime();
      }


      commitMutationEffects(root, finishedWork, lanes);

      resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come after
      // the mutation phase, so that the previous tree is still current during
      // componentWillUnmount, but before the layout phase, so that the finished
      // work is current during componentDidMount/Update.

      root.current = finishedWork; // The next phase is the layout phase, where we call effects that read

      {
        markLayoutEffectsStarted(lanes);
      }

      commitLayoutEffects(finishedWork, root, lanes);

      {
        markLayoutEffectsStopped();
      }
      // opportunity to paint.


      requestPaint();
      executionContext = prevExecutionContext; // Reset the priority to the previous non-sync value.

      setCurrentUpdatePriority(previousPriority);
      ReactCurrentBatchConfig$3.transition = prevTransition;
    } else {
      // No effects.
      root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were
      // no effects.
      // TODO: Maybe there's a better way to report this.

      {
        recordCommitTime();
      }
    }

    var rootDidHavePassiveEffects = rootDoesHavePassiveEffects;

    if (rootDoesHavePassiveEffects) {
      // This commit has passive effects. Stash a reference to them. But don't
      // schedule a callback until after flushing layout work.
      rootDoesHavePassiveEffects = false;
      rootWithPendingPassiveEffects = root;
      pendingPassiveEffectsLanes = lanes;
    } else {

      {
        nestedPassiveUpdateCount = 0;
        rootWithPassiveNestedUpdates = null;
      }
    } // Read this again, since an effect might have updated it


    remainingLanes = root.pendingLanes; // Check if there's remaining work on this root
    // TODO: This is part of the `componentDidCatch` implementation. Its purpose
    // is to detect whether something might have called setState inside
    // `componentDidCatch`. The mechanism is known to be flawed because `setState`
    // inside `componentDidCatch` is itself flawed â€” that's why we recommend
    // `getDerivedStateFromError` instead. However, it could be improved by
    // checking if remainingLanes includes Sync work, instead of whether there's
    // any work remaining at all (which would also include stuff like Suspense
    // retries or transitions). It's been like this for a while, though, so fixing
    // it probably isn't that urgent.

    if (remainingLanes === NoLanes) {
      // If there's no remaining work, we can clear the set of already failed
      // error boundaries.
      legacyErrorBoundariesThatAlreadyFailed = null;
    }

    {
      if (!rootDidHavePassiveEffects) {
        commitDoubleInvokeEffectsInDEV(root.current, false);
      }
    }

    onCommitRoot(finishedWork.stateNode, renderPriorityLevel);

    {
      if (isDevToolsPresent) {
        root.memoizedUpdaters.clear();
      }
    }

    {
      onCommitRoot$1();
    } // Always call this before exiting `commitRoot`, to ensure that any
    // additional work on this root is scheduled.


    ensureRootIsScheduled(root, now());

    if (recoverableErrors !== null) {
      // There were errors during this render, but recovered from them without
      // needing to surface it to the UI. We log them here.
      var onRecoverableError = root.onRecoverableError;

      for (var i = 0; i < recoverableErrors.length; i++) {
        var recoverableError = recoverableErrors[i];
        var componentStack = recoverableError.stack;
        var digest = recoverableError.digest;
        onRecoverableError(recoverableError.value, {
          componentStack: componentStack,
          digest: digest
        });
      }
    }

    if (hasUncaughtError) {
      hasUncaughtError = false;
      var error$1 = firstUncaughtError;
      firstUncaughtError = null;
      throw error$1;
    } // If the passive effects are the result of a discrete render, flush them
    // synchronously at the end of the current task so that the result is
    // immediately observable. Otherwise, we assume that they are not
    // order-dependent and do not need to be observed by external systems, so we
    // can wait until after paint.
    // TODO: We can optimize this by not scheduling the callback earlier. Since we
    // currently schedule the callback in multiple places, will wait until those
    // are consolidated.


    if (includesSomeLane(pendingPassiveEffectsLanes, SyncLane) && root.tag !== LegacyRoot) {
      flushPassiveEffects();
    } // Read this again, since a passive effect might have updated it


    remainingLanes = root.pendingLanes;

    if (includesSomeLane(remainingLanes, SyncLane)) {
      {
        markNestedUpdateScheduled();
      } // Count the number of times the root synchronously re-renders without
      // finishing. If there are too many, it indicates an infinite update loop.


      if (root === rootWithNestedUpdates) {
        nestedUpdateCount++;
      } else {
        nestedUpdateCount = 0;
        rootWithNestedUpdates = root;
      }
    } else {
      nestedUpdateCount = 0;
    } // If layout work was scheduled, flush it now.


    flushSyncCallbacks();

    {
      markCommitStopped();
    }

    return null;
  }

  function flushPassiveEffects() {
    // Returns whether passive effects were flushed.
    // TODO: Combine this check with the one in flushPassiveEFfectsImpl. We should
    // probably just combine the two functions. I believe they were only separate
    // in the first place because we used to wrap it with
    // `Scheduler.runWithPriority`, which accepts a function. But now we track the
    // priority within React itself, so we can mutate the variable directly.
    if (rootWithPendingPassiveEffects !== null) {
      var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes);
      var priority = lowerEventPriority(DefaultEventPriority, renderPriority);
      var prevTransition = ReactCurrentBatchConfig$3.transition;
      var previousPriority = getCurrentUpdatePriority();

      try {
        ReactCurrentBatchConfig$3.transition = null;
        setCurrentUpdatePriority(priority);
        return flushPassiveEffectsImpl();
      } finally {
        setCurrentUpdatePriority(previousPriority);
        ReactCurrentBatchConfig$3.transition = prevTransition; // Once passive effects have run for the tree - giving components a
      }
    }

    return false;
  }
  function enqueuePendingPassiveProfilerEffect(fiber) {
    {
      pendingPassiveProfilerEffects.push(fiber);

      if (!rootDoesHavePassiveEffects) {
        rootDoesHavePassiveEffects = true;
        scheduleCallback$1(NormalPriority, function () {
          flushPassiveEffects();
          return null;
        });
      }
    }
  }

  function flushPassiveEffectsImpl() {
    if (rootWithPendingPassiveEffects === null) {
      return false;
    } // Cache and clear the transitions flag


    var transitions = pendingPassiveTransitions;
    pendingPassiveTransitions = null;
    var root = rootWithPendingPassiveEffects;
    var lanes = pendingPassiveEffectsLanes;
    rootWithPendingPassiveEffects = null; // TODO: This is sometimes out of sync with rootWithPendingPassiveEffects.
    // Figure out why and fix it. It's not causing any known issues (probably
    // because it's only used for profiling), but it's a refactor hazard.

    pendingPassiveEffectsLanes = NoLanes;

    if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
      throw new Error('Cannot flush passive effects while already rendering.');
    }

    {
      isFlushingPassiveEffects = true;
      didScheduleUpdateDuringPassiveEffects = false;
    }

    {
      markPassiveEffectsStarted(lanes);
    }

    var prevExecutionContext = executionContext;
    executionContext |= CommitContext;
    commitPassiveUnmountEffects(root.current);
    commitPassiveMountEffects(root, root.current, lanes, transitions); // TODO: Move to commitPassiveMountEffects

    {
      var profilerEffects = pendingPassiveProfilerEffects;
      pendingPassiveProfilerEffects = [];

      for (var i = 0; i < profilerEffects.length; i++) {
        var _fiber = profilerEffects[i];
        commitPassiveEffectDurations(root, _fiber);
      }
    }

    {
      markPassiveEffectsStopped();
    }

    {
      commitDoubleInvokeEffectsInDEV(root.current, true);
    }

    executionContext = prevExecutionContext;
    flushSyncCallbacks();

    {
      // If additional passive effects were scheduled, increment a counter. If this
      // exceeds the limit, we'll fire a warning.
      if (didScheduleUpdateDuringPassiveEffects) {
        if (root === rootWithPassiveNestedUpdates) {
          nestedPassiveUpdateCount++;
        } else {
          nestedPassiveUpdateCount = 0;
          rootWithPassiveNestedUpdates = root;
        }
      } else {
        nestedPassiveUpdateCount = 0;
      }

      isFlushingPassiveEffects = false;
      didScheduleUpdateDuringPassiveEffects = false;
    } // TODO: Move to commitPassiveMountEffects


    onPostCommitRoot(root);

    {
      var stateNode = root.current.stateNode;
      stateNode.effectDuration = 0;
      stateNode.passiveEffectDuration = 0;
    }

    return true;
  }

  function isAlreadyFailedLegacyErrorBoundary(instance) {
    return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);
  }
  function markLegacyErrorBoundaryAsFailed(instance) {
    if (legacyErrorBoundariesThatAlreadyFailed === null) {
      legacyErrorBoundariesThatAlreadyFailed = new Set([instance]);
    } else {
      legacyErrorBoundariesThatAlreadyFailed.add(instance);
    }
  }

  function prepareToThrowUncaughtError(error) {
    if (!hasUncaughtError) {
      hasUncaughtError = true;
      firstUncaughtError = error;
    }
  }

  var onUncaughtError = prepareToThrowUncaughtError;

  function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
    var errorInfo = createCapturedValueAtFiber(error, sourceFiber);
    var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane);
    var root = enqueueUpdate(rootFiber, update, SyncLane);
    var eventTime = requestEventTime();

    if (root !== null) {
      markRootUpdated(root, SyncLane, eventTime);
      ensureRootIsScheduled(root, eventTime);
    }
  }

  function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error$1) {
    {
      reportUncaughtErrorInDEV(error$1);
      setIsRunningInsertionEffect(false);
    }

    if (sourceFiber.tag === HostRoot) {
      // Error was thrown at the root. There is no parent, so the root
      // itself should capture it.
      captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error$1);
      return;
    }

    var fiber = null;

    {
      fiber = nearestMountedAncestor;
    }

    while (fiber !== null) {
      if (fiber.tag === HostRoot) {
        captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error$1);
        return;
      } else if (fiber.tag === ClassComponent) {
        var ctor = fiber.type;
        var instance = fiber.stateNode;

        if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {
          var errorInfo = createCapturedValueAtFiber(error$1, sourceFiber);
          var update = createClassErrorUpdate(fiber, errorInfo, SyncLane);
          var root = enqueueUpdate(fiber, update, SyncLane);
          var eventTime = requestEventTime();

          if (root !== null) {
            markRootUpdated(root, SyncLane, eventTime);
            ensureRootIsScheduled(root, eventTime);
          }

          return;
        }
      }

      fiber = fiber.return;
    }

    {
      // TODO: Until we re-land skipUnmountedBoundaries (see #20147), this warning
      // will fire for errors that are thrown by destroy functions inside deleted
      // trees. What it should instead do is propagate the error to the parent of
      // the deleted tree. In the meantime, do not add this warning to the
      // allowlist; this is only for our internal use.
      error('Internal React error: Attempted to capture a commit phase error ' + 'inside a detached tree. This indicates a bug in React. Likely ' + 'causes include deleting the same fiber more than once, committing an ' + 'already-finished tree, or an inconsistent return pointer.\n\n' + 'Error message:\n\n%s', error$1);
    }
  }
  function pingSuspendedRoot(root, wakeable, pingedLanes) {
    var pingCache = root.pingCache;

    if (pingCache !== null) {
      // The wakeable resolved, so we no longer need to memoize, because it will
      // never be thrown again.
      pingCache.delete(wakeable);
    }

    var eventTime = requestEventTime();
    markRootPinged(root, pingedLanes);
    warnIfSuspenseResolutionNotWrappedWithActDEV(root);

    if (workInProgressRoot === root && isSubsetOfLanes(workInProgressRootRenderLanes, pingedLanes)) {
      // Received a ping at the same priority level at which we're currently
      // rendering. We might want to restart this render. This should mirror
      // the logic of whether or not a root suspends once it completes.
      // TODO: If we're rendering sync either due to Sync, Batched or expired,
      // we should probably never restart.
      // If we're suspended with delay, or if it's a retry, we'll always suspend
      // so we can always restart.
      if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && includesOnlyRetries(workInProgressRootRenderLanes) && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {
        // Restart from the root.
        prepareFreshStack(root, NoLanes);
      } else {
        // Even though we can't restart right now, we might get an
        // opportunity later. So we mark this render as having a ping.
        workInProgressRootPingedLanes = mergeLanes(workInProgressRootPingedLanes, pingedLanes);
      }
    }

    ensureRootIsScheduled(root, eventTime);
  }

  function retryTimedOutBoundary(boundaryFiber, retryLane) {
    // The boundary fiber (a Suspense component or SuspenseList component)
    // previously was rendered in its fallback state. One of the promises that
    // suspended it has resolved, which means at least part of the tree was
    // likely unblocked. Try rendering again, at a new lanes.
    if (retryLane === NoLane) {
      // TODO: Assign this to `suspenseState.retryLane`? to avoid
      // unnecessary entanglement?
      retryLane = requestRetryLane(boundaryFiber);
    } // TODO: Special case idle priority?


    var eventTime = requestEventTime();
    var root = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);

    if (root !== null) {
      markRootUpdated(root, retryLane, eventTime);
      ensureRootIsScheduled(root, eventTime);
    }
  }

  function retryDehydratedSuspenseBoundary(boundaryFiber) {
    var suspenseState = boundaryFiber.memoizedState;
    var retryLane = NoLane;

    if (suspenseState !== null) {
      retryLane = suspenseState.retryLane;
    }

    retryTimedOutBoundary(boundaryFiber, retryLane);
  }
  function resolveRetryWakeable(boundaryFiber, wakeable) {
    var retryLane = NoLane; // Default

    var retryCache;

    switch (boundaryFiber.tag) {
      case SuspenseComponent:
        retryCache = boundaryFiber.stateNode;
        var suspenseState = boundaryFiber.memoizedState;

        if (suspenseState !== null) {
          retryLane = suspenseState.retryLane;
        }

        break;

      case SuspenseListComponent:
        retryCache = boundaryFiber.stateNode;
        break;

      default:
        throw new Error('Pinged unknown suspense boundary type. ' + 'This is probably a bug in React.');
    }

    if (retryCache !== null) {
      // The wakeable resolved, so we no longer need to memoize, because it will
      // never be thrown again.
      retryCache.delete(wakeable);
    }

    retryTimedOutBoundary(boundaryFiber, retryLane);
  } // Computes the next Just Noticeable Difference (JND) boundary.
  // The theory is that a person can't tell the difference between small differences in time.
  // Therefore, if we wait a bit longer than necessary that won't translate to a noticeable
  // difference in the experience. However, waiting for longer might mean that we can avoid
  // showing an intermediate loading state. The longer we have already waited, the harder it
  // is to tell small differences in time. Therefore, the longer we've already waited,
  // the longer we can wait additionally. At some point we have to give up though.
  // We pick a train model where the next boundary commits at a consistent schedule.
  // These particular numbers are vague estimates. We expect to adjust them based on research.

  function jnd(timeElapsed) {
    return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3000 ? 3000 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960;
  }

  function checkForNestedUpdates() {
    if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
      nestedUpdateCount = 0;
      rootWithNestedUpdates = null;
      throw new Error('Maximum update depth exceeded. This can happen when a component ' + 'repeatedly calls setState inside componentWillUpdate or ' + 'componentDidUpdate. React limits the number of nested updates to ' + 'prevent infinite loops.');
    }

    {
      if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) {
        nestedPassiveUpdateCount = 0;
        rootWithPassiveNestedUpdates = null;

        error('Maximum update depth exceeded. This can happen when a component ' + "calls setState inside useEffect, but useEffect either doesn't " + 'have a dependency array, or one of the dependencies changes on ' + 'every render.');
      }
    }
  }

  function flushRenderPhaseStrictModeWarningsInDEV() {
    {
      ReactStrictModeWarnings.flushLegacyContextWarning();

      {
        ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
      }
    }
  }

  function commitDoubleInvokeEffectsInDEV(fiber, hasPassiveEffects) {
    {
      // TODO (StrictEffects) Should we set a marker on the root if it contains strict effects
      // so we don't traverse unnecessarily? similar to subtreeFlags but just at the root level.
      // Maybe not a big deal since this is DEV only behavior.
      setCurrentFiber(fiber);
      invokeEffectsInDev(fiber, MountLayoutDev, invokeLayoutEffectUnmountInDEV);

      if (hasPassiveEffects) {
        invokeEffectsInDev(fiber, MountPassiveDev, invokePassiveEffectUnmountInDEV);
      }

      invokeEffectsInDev(fiber, MountLayoutDev, invokeLayoutEffectMountInDEV);

      if (hasPassiveEffects) {
        invokeEffectsInDev(fiber, MountPassiveDev, invokePassiveEffectMountInDEV);
      }

      resetCurrentFiber();
    }
  }

  function invokeEffectsInDev(firstChild, fiberFlags, invokeEffectFn) {
    {
      // We don't need to re-check StrictEffectsMode here.
      // This function is only called if that check has already passed.
      var current = firstChild;
      var subtreeRoot = null;

      while (current !== null) {
        var primarySubtreeFlag = current.subtreeFlags & fiberFlags;

        if (current !== subtreeRoot && current.child !== null && primarySubtreeFlag !== NoFlags) {
          current = current.child;
        } else {
          if ((current.flags & fiberFlags) !== NoFlags) {
            invokeEffectFn(current);
          }

          if (current.sibling !== null) {
            current = current.sibling;
          } else {
            current = subtreeRoot = current.return;
          }
        }
      }
    }
  }

  var didWarnStateUpdateForNotYetMountedComponent = null;
  function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {
    {
      if ((executionContext & RenderContext) !== NoContext) {
        // We let the other warning about render phase updates deal with this one.
        return;
      }

      if (!(fiber.mode & ConcurrentMode)) {
        return;
      }

      var tag = fiber.tag;

      if (tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent) {
        // Only warn for user-defined components, not internal ones like Suspense.
        return;
      } // We show the whole stack but dedupe on the top component's name because
      // the problematic code almost always lies inside that component.


      var componentName = getComponentNameFromFiber(fiber) || 'ReactComponent';

      if (didWarnStateUpdateForNotYetMountedComponent !== null) {
        if (didWarnStateUpdateForNotYetMountedComponent.has(componentName)) {
          return;
        }

        didWarnStateUpdateForNotYetMountedComponent.add(componentName);
      } else {
        didWarnStateUpdateForNotYetMountedComponent = new Set([componentName]);
      }

      var previousFiber = current;

      try {
        setCurrentFiber(fiber);

        error("Can't perform a React state update on a component that hasn't mounted yet. " + 'This indicates that you have a side-effect in your render function that ' + 'asynchronously later calls tries to update the component. Move this work to ' + 'useEffect instead.');
      } finally {
        if (previousFiber) {
          setCurrentFiber(fiber);
        } else {
          resetCurrentFiber();
        }
      }
    }
  }
  var beginWork$1;

  {
    var dummyFiber = null;

    beginWork$1 = function (current, unitOfWork, lanes) {
      // If a component throws an error, we replay it again in a synchronously
      // dispatched event, so that the debugger will treat it as an uncaught
      // error See ReactErrorUtils for more information.
      // Before entering the begin phase, copy the work-in-progress onto a dummy
      // fiber. If beginWork throws, we'll use this to reset the state.
      var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork);

      try {
        return beginWork(current, unitOfWork, lanes);
      } catch (originalError) {
        if (didSuspendOrErrorWhileHydratingDEV() || originalError !== null && typeof originalError === 'object' && typeof originalError.then === 'function') {
          // Don't replay promises.
          // Don't replay errors if we are hydrating and have already suspended or handled an error
          throw originalError;
        } // Keep this code in sync with handleError; any changes here must have
        // corresponding changes there.


        resetContextDependencies();
        resetHooksAfterThrow(); // Don't reset current debug fiber, since we're about to work on the
        // same fiber again.
        // Unwind the failed stack frame

        unwindInterruptedWork(current, unitOfWork); // Restore the original properties of the fiber.

        assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);

        if ( unitOfWork.mode & ProfileMode) {
          // Reset the profiler timer.
          startProfilerTimer(unitOfWork);
        } // Run beginWork again.


        invokeGuardedCallback(null, beginWork, null, current, unitOfWork, lanes);

        if (hasCaughtError()) {
          var replayError = clearCaughtError();

          if (typeof replayError === 'object' && replayError !== null && replayError._suppressLogging && typeof originalError === 'object' && originalError !== null && !originalError._suppressLogging) {
            // If suppressed, let the flag carry over to the original error which is the one we'll rethrow.
            originalError._suppressLogging = true;
          }
        } // We always throw the original error in case the second render pass is not idempotent.
        // This can happen if a memoized function or CommonJS module doesn't throw after first invocation.


        throw originalError;
      }
    };
  }

  var didWarnAboutUpdateInRender = false;
  var didWarnAboutUpdateInRenderForAnotherComponent;

  {
    didWarnAboutUpdateInRenderForAnotherComponent = new Set();
  }

  function warnAboutRenderPhaseUpdatesInDEV(fiber) {
    {
      if (isRendering && !getIsUpdatingOpaqueValueInRenderPhaseInDEV()) {
        switch (fiber.tag) {
          case FunctionComponent:
          case ForwardRef:
          case SimpleMemoComponent:
            {
              var renderingComponentName = workInProgress && getComponentNameFromFiber(workInProgress) || 'Unknown'; // Dedupe by the rendering component because it's the one that needs to be fixed.

              var dedupeKey = renderingComponentName;

              if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) {
                didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);
                var setStateComponentName = getComponentNameFromFiber(fiber) || 'Unknown';

                error('Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + 'follow the stack trace as described in https://reactjs.org/link/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName);
              }

              break;
            }

          case ClassComponent:
            {
              if (!didWarnAboutUpdateInRender) {
                error('Cannot update during an existing state transition (such as ' + 'within `render`). Render methods should be a pure ' + 'function of props and state.');

                didWarnAboutUpdateInRender = true;
              }

              break;
            }
        }
      }
    }
  }

  function restorePendingUpdaters(root, lanes) {
    {
      if (isDevToolsPresent) {
        var memoizedUpdaters = root.memoizedUpdaters;
        memoizedUpdaters.forEach(function (schedulingFiber) {
          addFiberToLanesMap(root, schedulingFiber, lanes);
        }); // This function intentionally does not clear memoized updaters.
        // Those may still be relevant to the current commit
        // and a future one (e.g. Suspense).
      }
    }
  }
  var fakeActCallbackNode = {};

  function scheduleCallback$1(priorityLevel, callback) {
    {
      // If we're currently inside an `act` scope, bypass Scheduler and push to
      // the `act` queue instead.
      var actQueue = ReactCurrentActQueue$1.current;

      if (actQueue !== null) {
        actQueue.push(callback);
        return fakeActCallbackNode;
      } else {
        return scheduleCallback(priorityLevel, callback);
      }
    }
  }

  function cancelCallback$1(callbackNode) {
    if ( callbackNode === fakeActCallbackNode) {
      return;
    } // In production, always call Scheduler. This function will be stripped out.


    return cancelCallback(callbackNode);
  }

  function shouldForceFlushFallbacksInDEV() {
    // Never force flush in production. This function should get stripped out.
    return  ReactCurrentActQueue$1.current !== null;
  }

  function warnIfUpdatesNotWrappedWithActDEV(fiber) {
    {
      if (fiber.mode & ConcurrentMode) {
        if (!isConcurrentActEnvironment()) {
          // Not in an act environment. No need to warn.
          return;
        }
      } else {
        // Legacy mode has additional cases where we suppress a warning.
        if (!isLegacyActEnvironment()) {
          // Not in an act environment. No need to warn.
          return;
        }

        if (executionContext !== NoContext) {
          // Legacy mode doesn't warn if the update is batched, i.e.
          // batchedUpdates or flushSync.
          return;
        }

        if (fiber.tag !== FunctionComponent && fiber.tag !== ForwardRef && fiber.tag !== SimpleMemoComponent) {
          // For backwards compatibility with pre-hooks code, legacy mode only
          // warns for updates that originate from a hook.
          return;
        }
      }

      if (ReactCurrentActQueue$1.current === null) {
        var previousFiber = current;

        try {
          setCurrentFiber(fiber);

          error('An update to %s inside a test was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + '  /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act', getComponentNameFromFiber(fiber));
        } finally {
          if (previousFiber) {
            setCurrentFiber(fiber);
          } else {
            resetCurrentFiber();
          }
        }
      }
    }
  }

  function warnIfSuspenseResolutionNotWrappedWithActDEV(root) {
    {
      if (root.tag !== LegacyRoot && isConcurrentActEnvironment() && ReactCurrentActQueue$1.current === null) {
        error('A suspended resource finished loading inside a test, but the event ' + 'was not wrapped in act(...).\n\n' + 'When testing, code that resolves suspended data should be wrapped ' + 'into act(...):\n\n' + 'act(() => {\n' + '  /* finish loading suspended data */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act');
      }
    }
  }

  function setIsRunningInsertionEffect(isRunning) {
    {
      isRunningInsertionEffect = isRunning;
    }
  }

  /* eslint-disable react-internal/prod-error-codes */
  var resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below.

  var failedBoundaries = null;
  var setRefreshHandler = function (handler) {
    {
      resolveFamily = handler;
    }
  };
  function resolveFunctionForHotReloading(type) {
    {
      if (resolveFamily === null) {
        // Hot reloading is disabled.
        return type;
      }

      var family = resolveFamily(type);

      if (family === undefined) {
        return type;
      } // Use the latest known implementation.


      return family.current;
    }
  }
  function resolveClassForHotReloading(type) {
    // No implementation differences.
    return resolveFunctionForHotReloading(type);
  }
  function resolveForwardRefForHotReloading(type) {
    {
      if (resolveFamily === null) {
        // Hot reloading is disabled.
        return type;
      }

      var family = resolveFamily(type);

      if (family === undefined) {
        // Check if we're dealing with a real forwardRef. Don't want to crash early.
        if (type !== null && type !== undefined && typeof type.render === 'function') {
          // ForwardRef is special because its resolved .type is an object,
          // but it's possible that we only have its inner render function in the map.
          // If that inner render function is different, we'll build a new forwardRef type.
          var currentRender = resolveFunctionForHotReloading(type.render);

          if (type.render !== currentRender) {
            var syntheticType = {
              $$typeof: REACT_FORWARD_REF_TYPE,
              render: currentRender
            };

            if (type.displayName !== undefined) {
              syntheticType.displayName = type.displayName;
            }

            return syntheticType;
          }
        }

        return type;
      } // Use the latest known implementation.


      return family.current;
    }
  }
  function isCompatibleFamilyForHotReloading(fiber, element) {
    {
      if (resolveFamily === null) {
        // Hot reloading is disabled.
        return false;
      }

      var prevType = fiber.elementType;
      var nextType = element.type; // If we got here, we know types aren't === equal.

      var needsCompareFamilies = false;
      var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null;

      switch (fiber.tag) {
        case ClassComponent:
          {
            if (typeof nextType === 'function') {
              needsCompareFamilies = true;
            }

            break;
          }

        case FunctionComponent:
          {
            if (typeof nextType === 'function') {
              needsCompareFamilies = true;
            } else if ($$typeofNextType === REACT_LAZY_TYPE) {
              // We don't know the inner type yet.
              // We're going to assume that the lazy inner type is stable,
              // and so it is sufficient to avoid reconciling it away.
              // We're not going to unwrap or actually use the new lazy type.
              needsCompareFamilies = true;
            }

            break;
          }

        case ForwardRef:
          {
            if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {
              needsCompareFamilies = true;
            } else if ($$typeofNextType === REACT_LAZY_TYPE) {
              needsCompareFamilies = true;
            }

            break;
          }

        case MemoComponent:
        case SimpleMemoComponent:
          {
            if ($$typeofNextType === REACT_MEMO_TYPE) {
              // TODO: if it was but can no longer be simple,
              // we shouldn't set this.
              needsCompareFamilies = true;
            } else if ($$typeofNextType === REACT_LAZY_TYPE) {
              needsCompareFamilies = true;
            }

            break;
          }

        default:
          return false;
      } // Check if both types have a family and it's the same one.


      if (needsCompareFamilies) {
        // Note: memo() and forwardRef() we'll compare outer rather than inner type.
        // This means both of them need to be registered to preserve state.
        // If we unwrapped and compared the inner types for wrappers instead,
        // then we would risk falsely saying two separate memo(Foo)
        // calls are equivalent because they wrap the same Foo function.
        var prevFamily = resolveFamily(prevType);

        if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {
          return true;
        }
      }

      return false;
    }
  }
  function markFailedErrorBoundaryForHotReloading(fiber) {
    {
      if (resolveFamily === null) {
        // Hot reloading is disabled.
        return;
      }

      if (typeof WeakSet !== 'function') {
        return;
      }

      if (failedBoundaries === null) {
        failedBoundaries = new WeakSet();
      }

      failedBoundaries.add(fiber);
    }
  }
  var scheduleRefresh = function (root, update) {
    {
      if (resolveFamily === null) {
        // Hot reloading is disabled.
        return;
      }

      var staleFamilies = update.staleFamilies,
          updatedFamilies = update.updatedFamilies;
      flushPassiveEffects();
      flushSync(function () {
        scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);
      });
    }
  };
  var scheduleRoot = function (root, element) {
    {
      if (root.context !== emptyContextObject) {
        // Super edge case: root has a legacy _renderSubtree context
        // but we don't know the parentComponent so we can't pass it.
        // Just ignore. We'll delete this with _renderSubtree code path later.
        return;
      }

      flushPassiveEffects();
      flushSync(function () {
        updateContainer(element, root, null, null);
      });
    }
  };

  function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {
    {
      var alternate = fiber.alternate,
          child = fiber.child,
          sibling = fiber.sibling,
          tag = fiber.tag,
          type = fiber.type;
      var candidateType = null;

      switch (tag) {
        case FunctionComponent:
        case SimpleMemoComponent:
        case ClassComponent:
          candidateType = type;
          break;

        case ForwardRef:
          candidateType = type.render;
          break;
      }

      if (resolveFamily === null) {
        throw new Error('Expected resolveFamily to be set during hot reload.');
      }

      var needsRender = false;
      var needsRemount = false;

      if (candidateType !== null) {
        var family = resolveFamily(candidateType);

        if (family !== undefined) {
          if (staleFamilies.has(family)) {
            needsRemount = true;
          } else if (updatedFamilies.has(family)) {
            if (tag === ClassComponent) {
              needsRemount = true;
            } else {
              needsRender = true;
            }
          }
        }
      }

      if (failedBoundaries !== null) {
        if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {
          needsRemount = true;
        }
      }

      if (needsRemount) {
        fiber._debugNeedsRemount = true;
      }

      if (needsRemount || needsRender) {
        var _root = enqueueConcurrentRenderForLane(fiber, SyncLane);

        if (_root !== null) {
          scheduleUpdateOnFiber(_root, fiber, SyncLane, NoTimestamp);
        }
      }

      if (child !== null && !needsRemount) {
        scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);
      }

      if (sibling !== null) {
        scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);
      }
    }
  }

  var findHostInstancesForRefresh = function (root, families) {
    {
      var hostInstances = new Set();
      var types = new Set(families.map(function (family) {
        return family.current;
      }));
      findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances);
      return hostInstances;
    }
  };

  function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {
    {
      var child = fiber.child,
          sibling = fiber.sibling,
          tag = fiber.tag,
          type = fiber.type;
      var candidateType = null;

      switch (tag) {
        case FunctionComponent:
        case SimpleMemoComponent:
        case ClassComponent:
          candidateType = type;
          break;

        case ForwardRef:
          candidateType = type.render;
          break;
      }

      var didMatch = false;

      if (candidateType !== null) {
        if (types.has(candidateType)) {
          didMatch = true;
        }
      }

      if (didMatch) {
        // We have a match. This only drills down to the closest host components.
        // There's no need to search deeper because for the purpose of giving
        // visual feedback, "flashing" outermost parent rectangles is sufficient.
        findHostInstancesForFiberShallowly(fiber, hostInstances);
      } else {
        // If there's no match, maybe there will be one further down in the child tree.
        if (child !== null) {
          findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);
        }
      }

      if (sibling !== null) {
        findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);
      }
    }
  }

  function findHostInstancesForFiberShallowly(fiber, hostInstances) {
    {
      var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);

      if (foundHostInstances) {
        return;
      } // If we didn't find any host children, fallback to closest host parent.


      var node = fiber;

      while (true) {
        switch (node.tag) {
          case HostComponent:
            hostInstances.add(node.stateNode);
            return;

          case HostPortal:
            hostInstances.add(node.stateNode.containerInfo);
            return;

          case HostRoot:
            hostInstances.add(node.stateNode.containerInfo);
            return;
        }

        if (node.return === null) {
          throw new Error('Expected to reach root first.');
        }

        node = node.return;
      }
    }
  }

  function findChildHostInstancesForFiberShallowly(fiber, hostInstances) {
    {
      var node = fiber;
      var foundHostInstances = false;

      while (true) {
        if (node.tag === HostComponent) {
          // We got a match.
          foundHostInstances = true;
          hostInstances.add(node.stateNode); // There may still be more, so keep searching.
        } else if (node.child !== null) {
          node.child.return = node;
          node = node.child;
          continue;
        }

        if (node === fiber) {
          return foundHostInstances;
        }

        while (node.sibling === null) {
          if (node.return === null || node.return === fiber) {
            return foundHostInstances;
          }

          node = node.return;
        }

        node.sibling.return = node.return;
        node = node.sibling;
      }
    }

    return false;
  }

  var hasBadMapPolyfill;

  {
    hasBadMapPolyfill = false;

    try {
      var nonExtensibleObject = Object.preventExtensions({});
      /* eslint-disable no-new */

      new Map([[nonExtensibleObject, null]]);
      new Set([nonExtensibleObject]);
      /* eslint-enable no-new */
    } catch (e) {
      // TODO: Consider warning about bad polyfills
      hasBadMapPolyfill = true;
    }
  }

  function FiberNode(tag, pendingProps, key, mode) {
    // Instance
    this.tag = tag;
    this.key = key;
    this.elementType = null;
    this.type = null;
    this.stateNode = null; // Fiber

    this.return = null;
    this.child = null;
    this.sibling = null;
    this.index = 0;
    this.ref = null;
    this.pendingProps = pendingProps;
    this.memoizedProps = null;
    this.updateQueue = null;
    this.memoizedState = null;
    this.dependencies = null;
    this.mode = mode; // Effects

    this.flags = NoFlags;
    this.subtreeFlags = NoFlags;
    this.deletions = null;
    this.lanes = NoLanes;
    this.childLanes = NoLanes;
    this.alternate = null;

    {
      // Note: The following is done to avoid a v8 performance cliff.
      //
      // Initializing the fields below to smis and later updating them with
      // double values will cause Fibers to end up having separate shapes.
      // This behavior/bug has something to do with Object.preventExtension().
      // Fortunately this only impacts DEV builds.
      // Unfortunately it makes React unusably slow for some applications.
      // To work around this, initialize the fields below with doubles.
      //
      // Learn more about this here:
      // https://github.com/facebook/react/issues/14365
      // https://bugs.chromium.org/p/v8/issues/detail?id=8538
      this.actualDuration = Number.NaN;
      this.actualStartTime = Number.NaN;
      this.selfBaseDuration = Number.NaN;
      this.treeBaseDuration = Number.NaN; // It's okay to replace the initial doubles with smis after initialization.
      // This won't trigger the performance cliff mentioned above,
      // and it simplifies other profiler code (including DevTools).

      this.actualDuration = 0;
      this.actualStartTime = -1;
      this.selfBaseDuration = 0;
      this.treeBaseDuration = 0;
    }

    {
      // This isn't directly used but is handy for debugging internals:
      this._debugSource = null;
      this._debugOwner = null;
      this._debugNeedsRemount = false;
      this._debugHookTypes = null;

      if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') {
        Object.preventExtensions(this);
      }
    }
  } // This is a constructor function, rather than a POJO constructor, still
  // please ensure we do the following:
  // 1) Nobody should add any instance methods on this. Instance methods can be
  //    more difficult to predict when they get optimized and they are almost
  //    never inlined properly in static compilers.
  // 2) Nobody should rely on `instanceof Fiber` for type testing. We should
  //    always know when it is a fiber.
  // 3) We might want to experiment with using numeric keys since they are easier
  //    to optimize in a non-JIT environment.
  // 4) We can easily go from a constructor to a createFiber object literal if that
  //    is faster.
  // 5) It should be easy to port this to a C struct and keep a C implementation
  //    compatible.


  var createFiber = function (tag, pendingProps, key, mode) {
    // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors
    return new FiberNode(tag, pendingProps, key, mode);
  };

  function shouldConstruct$1(Component) {
    var prototype = Component.prototype;
    return !!(prototype && prototype.isReactComponent);
  }

  function isSimpleFunctionComponent(type) {
    return typeof type === 'function' && !shouldConstruct$1(type) && type.defaultProps === undefined;
  }
  function resolveLazyComponentTag(Component) {
    if (typeof Component === 'function') {
      return shouldConstruct$1(Component) ? ClassComponent : FunctionComponent;
    } else if (Component !== undefined && Component !== null) {
      var $$typeof = Component.$$typeof;

      if ($$typeof === REACT_FORWARD_REF_TYPE) {
        return ForwardRef;
      }

      if ($$typeof === REACT_MEMO_TYPE) {
        return MemoComponent;
      }
    }

    return IndeterminateComponent;
  } // This is used to create an alternate fiber to do work on.

  function createWorkInProgress(current, pendingProps) {
    var workInProgress = current.alternate;

    if (workInProgress === null) {
      // We use a double buffering pooling technique because we know that we'll
      // only ever need at most two versions of a tree. We pool the "other" unused
      // node that we're free to reuse. This is lazily created to avoid allocating
      // extra objects for things that are never updated. It also allow us to
      // reclaim the extra memory if needed.
      workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);
      workInProgress.elementType = current.elementType;
      workInProgress.type = current.type;
      workInProgress.stateNode = current.stateNode;

      {
        // DEV-only fields
        workInProgress._debugSource = current._debugSource;
        workInProgress._debugOwner = current._debugOwner;
        workInProgress._debugHookTypes = current._debugHookTypes;
      }

      workInProgress.alternate = current;
      current.alternate = workInProgress;
    } else {
      workInProgress.pendingProps = pendingProps; // Needed because Blocks store data on type.

      workInProgress.type = current.type; // We already have an alternate.
      // Reset the effect tag.

      workInProgress.flags = NoFlags; // The effects are no longer valid.

      workInProgress.subtreeFlags = NoFlags;
      workInProgress.deletions = null;

      {
        // We intentionally reset, rather than copy, actualDuration & actualStartTime.
        // This prevents time from endlessly accumulating in new commits.
        // This has the downside of resetting values for different priority renders,
        // But works for yielding (the common case) and should support resuming.
        workInProgress.actualDuration = 0;
        workInProgress.actualStartTime = -1;
      }
    } // Reset all effects except static ones.
    // Static effects are not specific to a render.


    workInProgress.flags = current.flags & StaticMask;
    workInProgress.childLanes = current.childLanes;
    workInProgress.lanes = current.lanes;
    workInProgress.child = current.child;
    workInProgress.memoizedProps = current.memoizedProps;
    workInProgress.memoizedState = current.memoizedState;
    workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so
    // it cannot be shared with the current fiber.

    var currentDependencies = current.dependencies;
    workInProgress.dependencies = currentDependencies === null ? null : {
      lanes: currentDependencies.lanes,
      firstContext: currentDependencies.firstContext
    }; // These will be overridden during the parent's reconciliation

    workInProgress.sibling = current.sibling;
    workInProgress.index = current.index;
    workInProgress.ref = current.ref;

    {
      workInProgress.selfBaseDuration = current.selfBaseDuration;
      workInProgress.treeBaseDuration = current.treeBaseDuration;
    }

    {
      workInProgress._debugNeedsRemount = current._debugNeedsRemount;

      switch (workInProgress.tag) {
        case IndeterminateComponent:
        case FunctionComponent:
        case SimpleMemoComponent:
          workInProgress.type = resolveFunctionForHotReloading(current.type);
          break;

        case ClassComponent:
          workInProgress.type = resolveClassForHotReloading(current.type);
          break;

        case ForwardRef:
          workInProgress.type = resolveForwardRefForHotReloading(current.type);
          break;
      }
    }

    return workInProgress;
  } // Used to reuse a Fiber for a second pass.

  function resetWorkInProgress(workInProgress, renderLanes) {
    // This resets the Fiber to what createFiber or createWorkInProgress would
    // have set the values to before during the first pass. Ideally this wouldn't
    // be necessary but unfortunately many code paths reads from the workInProgress
    // when they should be reading from current and writing to workInProgress.
    // We assume pendingProps, index, key, ref, return are still untouched to
    // avoid doing another reconciliation.
    // Reset the effect flags but keep any Placement tags, since that's something
    // that child fiber is setting, not the reconciliation.
    workInProgress.flags &= StaticMask | Placement; // The effects are no longer valid.

    var current = workInProgress.alternate;

    if (current === null) {
      // Reset to createFiber's initial values.
      workInProgress.childLanes = NoLanes;
      workInProgress.lanes = renderLanes;
      workInProgress.child = null;
      workInProgress.subtreeFlags = NoFlags;
      workInProgress.memoizedProps = null;
      workInProgress.memoizedState = null;
      workInProgress.updateQueue = null;
      workInProgress.dependencies = null;
      workInProgress.stateNode = null;

      {
        // Note: We don't reset the actualTime counts. It's useful to accumulate
        // actual time across multiple render passes.
        workInProgress.selfBaseDuration = 0;
        workInProgress.treeBaseDuration = 0;
      }
    } else {
      // Reset to the cloned values that createWorkInProgress would've.
      workInProgress.childLanes = current.childLanes;
      workInProgress.lanes = current.lanes;
      workInProgress.child = current.child;
      workInProgress.subtreeFlags = NoFlags;
      workInProgress.deletions = null;
      workInProgress.memoizedProps = current.memoizedProps;
      workInProgress.memoizedState = current.memoizedState;
      workInProgress.updateQueue = current.updateQueue; // Needed because Blocks store data on type.

      workInProgress.type = current.type; // Clone the dependencies object. This is mutated during the render phase, so
      // it cannot be shared with the current fiber.

      var currentDependencies = current.dependencies;
      workInProgress.dependencies = currentDependencies === null ? null : {
        lanes: currentDependencies.lanes,
        firstContext: currentDependencies.firstContext
      };

      {
        // Note: We don't reset the actualTime counts. It's useful to accumulate
        // actual time across multiple render passes.
        workInProgress.selfBaseDuration = current.selfBaseDuration;
        workInProgress.treeBaseDuration = current.treeBaseDuration;
      }
    }

    return workInProgress;
  }
  function createHostRootFiber(tag, isStrictMode, concurrentUpdatesByDefaultOverride) {
    var mode;

    if (tag === ConcurrentRoot) {
      mode = ConcurrentMode;

      if (isStrictMode === true) {
        mode |= StrictLegacyMode;

        {
          mode |= StrictEffectsMode;
        }
      }
    } else {
      mode = NoMode;
    }

    if ( isDevToolsPresent) {
      // Always collect profile timings when DevTools are present.
      // This enables DevTools to start capturing timing at any pointâ€“
      // Without some nodes in the tree having empty base times.
      mode |= ProfileMode;
    }

    return createFiber(HostRoot, null, null, mode);
  }
  function createFiberFromTypeAndProps(type, // React$ElementType
  key, pendingProps, owner, mode, lanes) {
    var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.

    var resolvedType = type;

    if (typeof type === 'function') {
      if (shouldConstruct$1(type)) {
        fiberTag = ClassComponent;

        {
          resolvedType = resolveClassForHotReloading(resolvedType);
        }
      } else {
        {
          resolvedType = resolveFunctionForHotReloading(resolvedType);
        }
      }
    } else if (typeof type === 'string') {
      fiberTag = HostComponent;
    } else {
      getTag: switch (type) {
        case REACT_FRAGMENT_TYPE:
          return createFiberFromFragment(pendingProps.children, mode, lanes, key);

        case REACT_STRICT_MODE_TYPE:
          fiberTag = Mode;
          mode |= StrictLegacyMode;

          if ( (mode & ConcurrentMode) !== NoMode) {
            // Strict effects should never run on legacy roots
            mode |= StrictEffectsMode;
          }

          break;

        case REACT_PROFILER_TYPE:
          return createFiberFromProfiler(pendingProps, mode, lanes, key);

        case REACT_SUSPENSE_TYPE:
          return createFiberFromSuspense(pendingProps, mode, lanes, key);

        case REACT_SUSPENSE_LIST_TYPE:
          return createFiberFromSuspenseList(pendingProps, mode, lanes, key);

        case REACT_OFFSCREEN_TYPE:
          return createFiberFromOffscreen(pendingProps, mode, lanes, key);

        case REACT_LEGACY_HIDDEN_TYPE:

        // eslint-disable-next-line no-fallthrough

        case REACT_SCOPE_TYPE:

        // eslint-disable-next-line no-fallthrough

        case REACT_CACHE_TYPE:

        // eslint-disable-next-line no-fallthrough

        case REACT_TRACING_MARKER_TYPE:

        // eslint-disable-next-line no-fallthrough

        case REACT_DEBUG_TRACING_MODE_TYPE:

        // eslint-disable-next-line no-fallthrough

        default:
          {
            if (typeof type === 'object' && type !== null) {
              switch (type.$$typeof) {
                case REACT_PROVIDER_TYPE:
                  fiberTag = ContextProvider;
                  break getTag;

                case REACT_CONTEXT_TYPE:
                  // This is a consumer
                  fiberTag = ContextConsumer;
                  break getTag;

                case REACT_FORWARD_REF_TYPE:
                  fiberTag = ForwardRef;

                  {
                    resolvedType = resolveForwardRefForHotReloading(resolvedType);
                  }

                  break getTag;

                case REACT_MEMO_TYPE:
                  fiberTag = MemoComponent;
                  break getTag;

                case REACT_LAZY_TYPE:
                  fiberTag = LazyComponent;
                  resolvedType = null;
                  break getTag;
              }
            }

            var info = '';

            {
              if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
                info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and " + 'named imports.';
              }

              var ownerName = owner ? getComponentNameFromFiber(owner) : null;

              if (ownerName) {
                info += '\n\nCheck the render method of `' + ownerName + '`.';
              }
            }

            throw new Error('Element type is invalid: expected a string (for built-in ' + 'components) or a class/function (for composite components) ' + ("but got: " + (type == null ? type : typeof type) + "." + info));
          }
      }
    }

    var fiber = createFiber(fiberTag, pendingProps, key, mode);
    fiber.elementType = type;
    fiber.type = resolvedType;
    fiber.lanes = lanes;

    {
      fiber._debugOwner = owner;
    }

    return fiber;
  }
  function createFiberFromElement(element, mode, lanes) {
    var owner = null;

    {
      owner = element._owner;
    }

    var type = element.type;
    var key = element.key;
    var pendingProps = element.props;
    var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes);

    {
      fiber._debugSource = element._source;
      fiber._debugOwner = element._owner;
    }

    return fiber;
  }
  function createFiberFromFragment(elements, mode, lanes, key) {
    var fiber = createFiber(Fragment, elements, key, mode);
    fiber.lanes = lanes;
    return fiber;
  }

  function createFiberFromProfiler(pendingProps, mode, lanes, key) {
    {
      if (typeof pendingProps.id !== 'string') {
        error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.', typeof pendingProps.id);
      }
    }

    var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode);
    fiber.elementType = REACT_PROFILER_TYPE;
    fiber.lanes = lanes;

    {
      fiber.stateNode = {
        effectDuration: 0,
        passiveEffectDuration: 0
      };
    }

    return fiber;
  }

  function createFiberFromSuspense(pendingProps, mode, lanes, key) {
    var fiber = createFiber(SuspenseComponent, pendingProps, key, mode);
    fiber.elementType = REACT_SUSPENSE_TYPE;
    fiber.lanes = lanes;
    return fiber;
  }
  function createFiberFromSuspenseList(pendingProps, mode, lanes, key) {
    var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);
    fiber.elementType = REACT_SUSPENSE_LIST_TYPE;
    fiber.lanes = lanes;
    return fiber;
  }
  function createFiberFromOffscreen(pendingProps, mode, lanes, key) {
    var fiber = createFiber(OffscreenComponent, pendingProps, key, mode);
    fiber.elementType = REACT_OFFSCREEN_TYPE;
    fiber.lanes = lanes;
    var primaryChildInstance = {
      isHidden: false
    };
    fiber.stateNode = primaryChildInstance;
    return fiber;
  }
  function createFiberFromText(content, mode, lanes) {
    var fiber = createFiber(HostText, content, null, mode);
    fiber.lanes = lanes;
    return fiber;
  }
  function createFiberFromHostInstanceForDeletion() {
    var fiber = createFiber(HostComponent, null, null, NoMode);
    fiber.elementType = 'DELETED';
    return fiber;
  }
  function createFiberFromDehydratedFragment(dehydratedNode) {
    var fiber = createFiber(DehydratedFragment, null, null, NoMode);
    fiber.stateNode = dehydratedNode;
    return fiber;
  }
  function createFiberFromPortal(portal, mode, lanes) {
    var pendingProps = portal.children !== null ? portal.children : [];
    var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);
    fiber.lanes = lanes;
    fiber.stateNode = {
      containerInfo: portal.containerInfo,
      pendingChildren: null,
      // Used by persistent updates
      implementation: portal.implementation
    };
    return fiber;
  } // Used for stashing WIP properties to replay failed work in DEV.

  function assignFiberPropertiesInDEV(target, source) {
    if (target === null) {
      // This Fiber's initial properties will always be overwritten.
      // We only use a Fiber to ensure the same hidden class so DEV isn't slow.
      target = createFiber(IndeterminateComponent, null, null, NoMode);
    } // This is intentionally written as a list of all properties.
    // We tried to use Object.assign() instead but this is called in
    // the hottest path, and Object.assign() was too slow:
    // https://github.com/facebook/react/issues/12502
    // This code is DEV-only so size is not a concern.


    target.tag = source.tag;
    target.key = source.key;
    target.elementType = source.elementType;
    target.type = source.type;
    target.stateNode = source.stateNode;
    target.return = source.return;
    target.child = source.child;
    target.sibling = source.sibling;
    target.index = source.index;
    target.ref = source.ref;
    target.pendingProps = source.pendingProps;
    target.memoizedProps = source.memoizedProps;
    target.updateQueue = source.updateQueue;
    target.memoizedState = source.memoizedState;
    target.dependencies = source.dependencies;
    target.mode = source.mode;
    target.flags = source.flags;
    target.subtreeFlags = source.subtreeFlags;
    target.deletions = source.deletions;
    target.lanes = source.lanes;
    target.childLanes = source.childLanes;
    target.alternate = source.alternate;

    {
      target.actualDuration = source.actualDuration;
      target.actualStartTime = source.actualStartTime;
      target.selfBaseDuration = source.selfBaseDuration;
      target.treeBaseDuration = source.treeBaseDuration;
    }

    target._debugSource = source._debugSource;
    target._debugOwner = source._debugOwner;
    target._debugNeedsRemount = source._debugNeedsRemount;
    target._debugHookTypes = source._debugHookTypes;
    return target;
  }

  function FiberRootNode(containerInfo, tag, hydrate, identifierPrefix, onRecoverableError) {
    this.tag = tag;
    this.containerInfo = containerInfo;
    this.pendingChildren = null;
    this.current = null;
    this.pingCache = null;
    this.finishedWork = null;
    this.timeoutHandle = noTimeout;
    this.context = null;
    this.pendingContext = null;
    this.callbackNode = null;
    this.callbackPriority = NoLane;
    this.eventTimes = createLaneMap(NoLanes);
    this.expirationTimes = createLaneMap(NoTimestamp);
    this.pendingLanes = NoLanes;
    this.suspendedLanes = NoLanes;
    this.pingedLanes = NoLanes;
    this.expiredLanes = NoLanes;
    this.mutableReadLanes = NoLanes;
    this.finishedLanes = NoLanes;
    this.entangledLanes = NoLanes;
    this.entanglements = createLaneMap(NoLanes);
    this.identifierPrefix = identifierPrefix;
    this.onRecoverableError = onRecoverableError;

    {
      this.mutableSourceEagerHydrationData = null;
    }

    {
      this.effectDuration = 0;
      this.passiveEffectDuration = 0;
    }

    {
      this.memoizedUpdaters = new Set();
      var pendingUpdatersLaneMap = this.pendingUpdatersLaneMap = [];

      for (var _i = 0; _i < TotalLanes; _i++) {
        pendingUpdatersLaneMap.push(new Set());
      }
    }

    {
      switch (tag) {
        case ConcurrentRoot:
          this._debugRootType = hydrate ? 'hydrateRoot()' : 'createRoot()';
          break;

        case LegacyRoot:
          this._debugRootType = hydrate ? 'hydrate()' : 'render()';
          break;
      }
    }
  }

  function createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, // TODO: We have several of these arguments that are conceptually part of the
  // host config, but because they are passed in at runtime, we have to thread
  // them through the root constructor. Perhaps we should put them all into a
  // single type, like a DynamicHostConfig that is defined by the renderer.
  identifierPrefix, onRecoverableError, transitionCallbacks) {
    var root = new FiberRootNode(containerInfo, tag, hydrate, identifierPrefix, onRecoverableError);
    // stateNode is any.


    var uninitializedFiber = createHostRootFiber(tag, isStrictMode);
    root.current = uninitializedFiber;
    uninitializedFiber.stateNode = root;

    {
      var _initialState = {
        element: initialChildren,
        isDehydrated: hydrate,
        cache: null,
        // not enabled yet
        transitions: null,
        pendingSuspenseBoundaries: null
      };
      uninitializedFiber.memoizedState = _initialState;
    }

    initializeUpdateQueue(uninitializedFiber);
    return root;
  }

  var ReactVersion = '18.3.1';

  function createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.
  implementation) {
    var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;

    {
      checkKeyStringCoercion(key);
    }

    return {
      // This tag allow us to uniquely identify this as a React Portal
      $$typeof: REACT_PORTAL_TYPE,
      key: key == null ? null : '' + key,
      children: children,
      containerInfo: containerInfo,
      implementation: implementation
    };
  }

  var didWarnAboutNestedUpdates;
  var didWarnAboutFindNodeInStrictMode;

  {
    didWarnAboutNestedUpdates = false;
    didWarnAboutFindNodeInStrictMode = {};
  }

  function getContextForSubtree(parentComponent) {
    if (!parentComponent) {
      return emptyContextObject;
    }

    var fiber = get(parentComponent);
    var parentContext = findCurrentUnmaskedContext(fiber);

    if (fiber.tag === ClassComponent) {
      var Component = fiber.type;

      if (isContextProvider(Component)) {
        return processChildContext(fiber, Component, parentContext);
      }
    }

    return parentContext;
  }

  function findHostInstanceWithWarning(component, methodName) {
    {
      var fiber = get(component);

      if (fiber === undefined) {
        if (typeof component.render === 'function') {
          throw new Error('Unable to find node on an unmounted component.');
        } else {
          var keys = Object.keys(component).join(',');
          throw new Error("Argument appears to not be a ReactComponent. Keys: " + keys);
        }
      }

      var hostFiber = findCurrentHostFiber(fiber);

      if (hostFiber === null) {
        return null;
      }

      if (hostFiber.mode & StrictLegacyMode) {
        var componentName = getComponentNameFromFiber(fiber) || 'Component';

        if (!didWarnAboutFindNodeInStrictMode[componentName]) {
          didWarnAboutFindNodeInStrictMode[componentName] = true;
          var previousFiber = current;

          try {
            setCurrentFiber(hostFiber);

            if (fiber.mode & StrictLegacyMode) {
              error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);
            } else {
              error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);
            }
          } finally {
            // Ideally this should reset to previous but this shouldn't be called in
            // render and there's another warning for that anyway.
            if (previousFiber) {
              setCurrentFiber(previousFiber);
            } else {
              resetCurrentFiber();
            }
          }
        }
      }

      return hostFiber.stateNode;
    }
  }

  function createContainer(containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks) {
    var hydrate = false;
    var initialChildren = null;
    return createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);
  }
  function createHydrationContainer(initialChildren, // TODO: Remove `callback` when we delete legacy mode.
  callback, containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks) {
    var hydrate = true;
    var root = createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError); // TODO: Move this to FiberRoot constructor

    root.context = getContextForSubtree(null); // Schedule the initial render. In a hydration root, this is different from
    // a regular update because the initial render must match was was rendered
    // on the server.
    // NOTE: This update intentionally doesn't have a payload. We're only using
    // the update to schedule work on the root fiber (and, for legacy roots, to
    // enqueue the callback if one is provided).

    var current = root.current;
    var eventTime = requestEventTime();
    var lane = requestUpdateLane(current);
    var update = createUpdate(eventTime, lane);
    update.callback = callback !== undefined && callback !== null ? callback : null;
    enqueueUpdate(current, update, lane);
    scheduleInitialHydrationOnRoot(root, lane, eventTime);
    return root;
  }
  function updateContainer(element, container, parentComponent, callback) {
    {
      onScheduleRoot(container, element);
    }

    var current$1 = container.current;
    var eventTime = requestEventTime();
    var lane = requestUpdateLane(current$1);

    {
      markRenderScheduled(lane);
    }

    var context = getContextForSubtree(parentComponent);

    if (container.context === null) {
      container.context = context;
    } else {
      container.pendingContext = context;
    }

    {
      if (isRendering && current !== null && !didWarnAboutNestedUpdates) {
        didWarnAboutNestedUpdates = true;

        error('Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\n\n' + 'Check the render method of %s.', getComponentNameFromFiber(current) || 'Unknown');
      }
    }

    var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property
    // being called "element".

    update.payload = {
      element: element
    };
    callback = callback === undefined ? null : callback;

    if (callback !== null) {
      {
        if (typeof callback !== 'function') {
          error('render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);
        }
      }

      update.callback = callback;
    }

    var root = enqueueUpdate(current$1, update, lane);

    if (root !== null) {
      scheduleUpdateOnFiber(root, current$1, lane, eventTime);
      entangleTransitions(root, current$1, lane);
    }

    return lane;
  }
  function getPublicRootInstance(container) {
    var containerFiber = container.current;

    if (!containerFiber.child) {
      return null;
    }

    switch (containerFiber.child.tag) {
      case HostComponent:
        return getPublicInstance(containerFiber.child.stateNode);

      default:
        return containerFiber.child.stateNode;
    }
  }
  function attemptSynchronousHydration$1(fiber) {
    switch (fiber.tag) {
      case HostRoot:
        {
          var root = fiber.stateNode;

          if (isRootDehydrated(root)) {
            // Flush the first scheduled "update".
            var lanes = getHighestPriorityPendingLanes(root);
            flushRoot(root, lanes);
          }

          break;
        }

      case SuspenseComponent:
        {
          flushSync(function () {
            var root = enqueueConcurrentRenderForLane(fiber, SyncLane);

            if (root !== null) {
              var eventTime = requestEventTime();
              scheduleUpdateOnFiber(root, fiber, SyncLane, eventTime);
            }
          }); // If we're still blocked after this, we need to increase
          // the priority of any promises resolving within this
          // boundary so that they next attempt also has higher pri.

          var retryLane = SyncLane;
          markRetryLaneIfNotHydrated(fiber, retryLane);
          break;
        }
    }
  }

  function markRetryLaneImpl(fiber, retryLane) {
    var suspenseState = fiber.memoizedState;

    if (suspenseState !== null && suspenseState.dehydrated !== null) {
      suspenseState.retryLane = higherPriorityLane(suspenseState.retryLane, retryLane);
    }
  } // Increases the priority of thenables when they resolve within this boundary.


  function markRetryLaneIfNotHydrated(fiber, retryLane) {
    markRetryLaneImpl(fiber, retryLane);
    var alternate = fiber.alternate;

    if (alternate) {
      markRetryLaneImpl(alternate, retryLane);
    }
  }
  function attemptContinuousHydration$1(fiber) {
    if (fiber.tag !== SuspenseComponent) {
      // We ignore HostRoots here because we can't increase
      // their priority and they should not suspend on I/O,
      // since you have to wrap anything that might suspend in
      // Suspense.
      return;
    }

    var lane = SelectiveHydrationLane;
    var root = enqueueConcurrentRenderForLane(fiber, lane);

    if (root !== null) {
      var eventTime = requestEventTime();
      scheduleUpdateOnFiber(root, fiber, lane, eventTime);
    }

    markRetryLaneIfNotHydrated(fiber, lane);
  }
  function attemptHydrationAtCurrentPriority$1(fiber) {
    if (fiber.tag !== SuspenseComponent) {
      // We ignore HostRoots here because we can't increase
      // their priority other than synchronously flush it.
      return;
    }

    var lane = requestUpdateLane(fiber);
    var root = enqueueConcurrentRenderForLane(fiber, lane);

    if (root !== null) {
      var eventTime = requestEventTime();
      scheduleUpdateOnFiber(root, fiber, lane, eventTime);
    }

    markRetryLaneIfNotHydrated(fiber, lane);
  }
  function findHostInstanceWithNoPortals(fiber) {
    var hostFiber = findCurrentHostFiberWithNoPortals(fiber);

    if (hostFiber === null) {
      return null;
    }

    return hostFiber.stateNode;
  }

  var shouldErrorImpl = function (fiber) {
    return null;
  };

  function shouldError(fiber) {
    return shouldErrorImpl(fiber);
  }

  var shouldSuspendImpl = function (fiber) {
    return false;
  };

  function shouldSuspend(fiber) {
    return shouldSuspendImpl(fiber);
  }
  var overrideHookState = null;
  var overrideHookStateDeletePath = null;
  var overrideHookStateRenamePath = null;
  var overrideProps = null;
  var overridePropsDeletePath = null;
  var overridePropsRenamePath = null;
  var scheduleUpdate = null;
  var setErrorHandler = null;
  var setSuspenseHandler = null;

  {
    var copyWithDeleteImpl = function (obj, path, index) {
      var key = path[index];
      var updated = isArray(obj) ? obj.slice() : assign({}, obj);

      if (index + 1 === path.length) {
        if (isArray(updated)) {
          updated.splice(key, 1);
        } else {
          delete updated[key];
        }

        return updated;
      } // $FlowFixMe number or string is fine here


      updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);
      return updated;
    };

    var copyWithDelete = function (obj, path) {
      return copyWithDeleteImpl(obj, path, 0);
    };

    var copyWithRenameImpl = function (obj, oldPath, newPath, index) {
      var oldKey = oldPath[index];
      var updated = isArray(obj) ? obj.slice() : assign({}, obj);

      if (index + 1 === oldPath.length) {
        var newKey = newPath[index]; // $FlowFixMe number or string is fine here

        updated[newKey] = updated[oldKey];

        if (isArray(updated)) {
          updated.splice(oldKey, 1);
        } else {
          delete updated[oldKey];
        }
      } else {
        // $FlowFixMe number or string is fine here
        updated[oldKey] = copyWithRenameImpl( // $FlowFixMe number or string is fine here
        obj[oldKey], oldPath, newPath, index + 1);
      }

      return updated;
    };

    var copyWithRename = function (obj, oldPath, newPath) {
      if (oldPath.length !== newPath.length) {
        warn('copyWithRename() expects paths of the same length');

        return;
      } else {
        for (var i = 0; i < newPath.length - 1; i++) {
          if (oldPath[i] !== newPath[i]) {
            warn('copyWithRename() expects paths to be the same except for the deepest key');

            return;
          }
        }
      }

      return copyWithRenameImpl(obj, oldPath, newPath, 0);
    };

    var copyWithSetImpl = function (obj, path, index, value) {
      if (index >= path.length) {
        return value;
      }

      var key = path[index];
      var updated = isArray(obj) ? obj.slice() : assign({}, obj); // $FlowFixMe number or string is fine here

      updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);
      return updated;
    };

    var copyWithSet = function (obj, path, value) {
      return copyWithSetImpl(obj, path, 0, value);
    };

    var findHook = function (fiber, id) {
      // For now, the "id" of stateful hooks is just the stateful hook index.
      // This may change in the future with e.g. nested hooks.
      var currentHook = fiber.memoizedState;

      while (currentHook !== null && id > 0) {
        currentHook = currentHook.next;
        id--;
      }

      return currentHook;
    }; // Support DevTools editable values for useState and useReducer.


    overrideHookState = function (fiber, id, path, value) {
      var hook = findHook(fiber, id);

      if (hook !== null) {
        var newState = copyWithSet(hook.memoizedState, path, value);
        hook.memoizedState = newState;
        hook.baseState = newState; // We aren't actually adding an update to the queue,
        // because there is no update we can add for useReducer hooks that won't trigger an error.
        // (There's no appropriate action type for DevTools overrides.)
        // As a result though, React will see the scheduled update as a noop and bailout.
        // Shallow cloning props works as a workaround for now to bypass the bailout check.

        fiber.memoizedProps = assign({}, fiber.memoizedProps);
        var root = enqueueConcurrentRenderForLane(fiber, SyncLane);

        if (root !== null) {
          scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
        }
      }
    };

    overrideHookStateDeletePath = function (fiber, id, path) {
      var hook = findHook(fiber, id);

      if (hook !== null) {
        var newState = copyWithDelete(hook.memoizedState, path);
        hook.memoizedState = newState;
        hook.baseState = newState; // We aren't actually adding an update to the queue,
        // because there is no update we can add for useReducer hooks that won't trigger an error.
        // (There's no appropriate action type for DevTools overrides.)
        // As a result though, React will see the scheduled update as a noop and bailout.
        // Shallow cloning props works as a workaround for now to bypass the bailout check.

        fiber.memoizedProps = assign({}, fiber.memoizedProps);
        var root = enqueueConcurrentRenderForLane(fiber, SyncLane);

        if (root !== null) {
          scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
        }
      }
    };

    overrideHookStateRenamePath = function (fiber, id, oldPath, newPath) {
      var hook = findHook(fiber, id);

      if (hook !== null) {
        var newState = copyWithRename(hook.memoizedState, oldPath, newPath);
        hook.memoizedState = newState;
        hook.baseState = newState; // We aren't actually adding an update to the queue,
        // because there is no update we can add for useReducer hooks that won't trigger an error.
        // (There's no appropriate action type for DevTools overrides.)
        // As a result though, React will see the scheduled update as a noop and bailout.
        // Shallow cloning props works as a workaround for now to bypass the bailout check.

        fiber.memoizedProps = assign({}, fiber.memoizedProps);
        var root = enqueueConcurrentRenderForLane(fiber, SyncLane);

        if (root !== null) {
          scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
        }
      }
    }; // Support DevTools props for function components, forwardRef, memo, host components, etc.


    overrideProps = function (fiber, path, value) {
      fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value);

      if (fiber.alternate) {
        fiber.alternate.pendingProps = fiber.pendingProps;
      }

      var root = enqueueConcurrentRenderForLane(fiber, SyncLane);

      if (root !== null) {
        scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
      }
    };

    overridePropsDeletePath = function (fiber, path) {
      fiber.pendingProps = copyWithDelete(fiber.memoizedProps, path);

      if (fiber.alternate) {
        fiber.alternate.pendingProps = fiber.pendingProps;
      }

      var root = enqueueConcurrentRenderForLane(fiber, SyncLane);

      if (root !== null) {
        scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
      }
    };

    overridePropsRenamePath = function (fiber, oldPath, newPath) {
      fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath);

      if (fiber.alternate) {
        fiber.alternate.pendingProps = fiber.pendingProps;
      }

      var root = enqueueConcurrentRenderForLane(fiber, SyncLane);

      if (root !== null) {
        scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
      }
    };

    scheduleUpdate = function (fiber) {
      var root = enqueueConcurrentRenderForLane(fiber, SyncLane);

      if (root !== null) {
        scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
      }
    };

    setErrorHandler = function (newShouldErrorImpl) {
      shouldErrorImpl = newShouldErrorImpl;
    };

    setSuspenseHandler = function (newShouldSuspendImpl) {
      shouldSuspendImpl = newShouldSuspendImpl;
    };
  }

  function findHostInstanceByFiber(fiber) {
    var hostFiber = findCurrentHostFiber(fiber);

    if (hostFiber === null) {
      return null;
    }

    return hostFiber.stateNode;
  }

  function emptyFindFiberByHostInstance(instance) {
    return null;
  }

  function getCurrentFiberForDevTools() {
    return current;
  }

  function injectIntoDevTools(devToolsConfig) {
    var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;
    var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
    return injectInternals({
      bundleType: devToolsConfig.bundleType,
      version: devToolsConfig.version,
      rendererPackageName: devToolsConfig.rendererPackageName,
      rendererConfig: devToolsConfig.rendererConfig,
      overrideHookState: overrideHookState,
      overrideHookStateDeletePath: overrideHookStateDeletePath,
      overrideHookStateRenamePath: overrideHookStateRenamePath,
      overrideProps: overrideProps,
      overridePropsDeletePath: overridePropsDeletePath,
      overridePropsRenamePath: overridePropsRenamePath,
      setErrorHandler: setErrorHandler,
      setSuspenseHandler: setSuspenseHandler,
      scheduleUpdate: scheduleUpdate,
      currentDispatcherRef: ReactCurrentDispatcher,
      findHostInstanceByFiber: findHostInstanceByFiber,
      findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance,
      // React Refresh
      findHostInstancesForRefresh:  findHostInstancesForRefresh ,
      scheduleRefresh:  scheduleRefresh ,
      scheduleRoot:  scheduleRoot ,
      setRefreshHandler:  setRefreshHandler ,
      // Enables DevTools to append owner stacks to error messages in DEV mode.
      getCurrentFiber:  getCurrentFiberForDevTools ,
      // Enables DevTools to detect reconciler version rather than renderer version
      // which may not match for third party renderers.
      reconcilerVersion: ReactVersion
    });
  }

  /* global reportError */

  var defaultOnRecoverableError = typeof reportError === 'function' ? // In modern browsers, reportError will dispatch an error event,
  // emulating an uncaught JavaScript error.
  reportError : function (error) {
    // In older browsers and test environments, fallback to console.error.
    // eslint-disable-next-line react-internal/no-production-logging
    console['error'](error);
  };

  function ReactDOMRoot(internalRoot) {
    this._internalRoot = internalRoot;
  }

  ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = function (children) {
    var root = this._internalRoot;

    if (root === null) {
      throw new Error('Cannot update an unmounted root.');
    }

    {
      if (typeof arguments[1] === 'function') {
        error('render(...): does not support the second callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');
      } else if (isValidContainer(arguments[1])) {
        error('You passed a container to the second argument of root.render(...). ' + "You don't need to pass it again since you already passed it to create the root.");
      } else if (typeof arguments[1] !== 'undefined') {
        error('You passed a second argument to root.render(...) but it only accepts ' + 'one argument.');
      }

      var container = root.containerInfo;

      if (container.nodeType !== COMMENT_NODE) {
        var hostInstance = findHostInstanceWithNoPortals(root.current);

        if (hostInstance) {
          if (hostInstance.parentNode !== container) {
            error('render(...): It looks like the React-rendered content of the ' + 'root container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + "root.unmount() to empty a root's container.");
          }
        }
      }
    }

    updateContainer(children, root, null, null);
  };

  ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = function () {
    {
      if (typeof arguments[0] === 'function') {
        error('unmount(...): does not support a callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');
      }
    }

    var root = this._internalRoot;

    if (root !== null) {
      this._internalRoot = null;
      var container = root.containerInfo;

      {
        if (isAlreadyRendering()) {
          error('Attempted to synchronously unmount a root while React was already ' + 'rendering. React cannot finish unmounting the root until the ' + 'current render has completed, which may lead to a race condition.');
        }
      }

      flushSync(function () {
        updateContainer(null, root, null, null);
      });
      unmarkContainerAsRoot(container);
    }
  };

  function createRoot(container, options) {
    if (!isValidContainer(container)) {
      throw new Error('createRoot(...): Target container is not a DOM element.');
    }

    warnIfReactDOMContainerInDEV(container);
    var isStrictMode = false;
    var concurrentUpdatesByDefaultOverride = false;
    var identifierPrefix = '';
    var onRecoverableError = defaultOnRecoverableError;
    var transitionCallbacks = null;

    if (options !== null && options !== undefined) {
      {
        if (options.hydrate) {
          warn('hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead.');
        } else {
          if (typeof options === 'object' && options !== null && options.$$typeof === REACT_ELEMENT_TYPE) {
            error('You passed a JSX element to createRoot. You probably meant to ' + 'call root.render instead. ' + 'Example usage:\n\n' + '  let root = createRoot(domContainer);\n' + '  root.render(<App />);');
          }
        }
      }

      if (options.unstable_strictMode === true) {
        isStrictMode = true;
      }

      if (options.identifierPrefix !== undefined) {
        identifierPrefix = options.identifierPrefix;
      }

      if (options.onRecoverableError !== undefined) {
        onRecoverableError = options.onRecoverableError;
      }

      if (options.transitionCallbacks !== undefined) {
        transitionCallbacks = options.transitionCallbacks;
      }
    }

    var root = createContainer(container, ConcurrentRoot, null, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);
    markContainerAsRoot(root.current, container);
    var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;
    listenToAllSupportedEvents(rootContainerElement);
    return new ReactDOMRoot(root);
  }

  function ReactDOMHydrationRoot(internalRoot) {
    this._internalRoot = internalRoot;
  }

  function scheduleHydration(target) {
    if (target) {
      queueExplicitHydrationTarget(target);
    }
  }

  ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = scheduleHydration;
  function hydrateRoot(container, initialChildren, options) {
    if (!isValidContainer(container)) {
      throw new Error('hydrateRoot(...): Target container is not a DOM element.');
    }

    warnIfReactDOMContainerInDEV(container);

    {
      if (initialChildren === undefined) {
        error('Must provide initial children as second argument to hydrateRoot. ' + 'Example usage: hydrateRoot(domContainer, <App />)');
      }
    } // For now we reuse the whole bag of options since they contain
    // the hydration callbacks.


    var hydrationCallbacks = options != null ? options : null; // TODO: Delete this option

    var mutableSources = options != null && options.hydratedSources || null;
    var isStrictMode = false;
    var concurrentUpdatesByDefaultOverride = false;
    var identifierPrefix = '';
    var onRecoverableError = defaultOnRecoverableError;

    if (options !== null && options !== undefined) {
      if (options.unstable_strictMode === true) {
        isStrictMode = true;
      }

      if (options.identifierPrefix !== undefined) {
        identifierPrefix = options.identifierPrefix;
      }

      if (options.onRecoverableError !== undefined) {
        onRecoverableError = options.onRecoverableError;
      }
    }

    var root = createHydrationContainer(initialChildren, null, container, ConcurrentRoot, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);
    markContainerAsRoot(root.current, container); // This can't be a comment node since hydration doesn't work on comment nodes anyway.

    listenToAllSupportedEvents(container);

    if (mutableSources) {
      for (var i = 0; i < mutableSources.length; i++) {
        var mutableSource = mutableSources[i];
        registerMutableSourceForHydration(root, mutableSource);
      }
    }

    return new ReactDOMHydrationRoot(root);
  }
  function isValidContainer(node) {
    return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || !disableCommentsAsDOMContainers  ));
  } // TODO: Remove this function which also includes comment nodes.
  // We only use it in places that are currently more relaxed.

  function isValidContainerLegacy(node) {
    return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable '));
  }

  function warnIfReactDOMContainerInDEV(container) {
    {
      if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') {
        error('createRoot(): Creating roots directly with document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try using a container element created ' + 'for your app.');
      }

      if (isContainerMarkedAsRoot(container)) {
        if (container._reactRootContainer) {
          error('You are calling ReactDOMClient.createRoot() on a container that was previously ' + 'passed to ReactDOM.render(). This is not supported.');
        } else {
          error('You are calling ReactDOMClient.createRoot() on a container that ' + 'has already been passed to createRoot() before. Instead, call ' + 'root.render() on the existing root instead if you want to update it.');
        }
      }
    }
  }

  var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;
  var topLevelUpdateWarnings;

  {
    topLevelUpdateWarnings = function (container) {
      if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {
        var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer.current);

        if (hostInstance) {
          if (hostInstance.parentNode !== container) {
            error('render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.');
          }
        }
      }

      var isRootRenderedBySomeReact = !!container._reactRootContainer;
      var rootEl = getReactRootElementInContainer(container);
      var hasNonRootReactChild = !!(rootEl && getInstanceFromNode(rootEl));

      if (hasNonRootReactChild && !isRootRenderedBySomeReact) {
        error('render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.');
      }

      if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') {
        error('render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.');
      }
    };
  }

  function getReactRootElementInContainer(container) {
    if (!container) {
      return null;
    }

    if (container.nodeType === DOCUMENT_NODE) {
      return container.documentElement;
    } else {
      return container.firstChild;
    }
  }

  function noopOnRecoverableError() {// This isn't reachable because onRecoverableError isn't called in the
    // legacy API.
  }

  function legacyCreateRootFromDOMContainer(container, initialChildren, parentComponent, callback, isHydrationContainer) {
    if (isHydrationContainer) {
      if (typeof callback === 'function') {
        var originalCallback = callback;

        callback = function () {
          var instance = getPublicRootInstance(root);
          originalCallback.call(instance);
        };
      }

      var root = createHydrationContainer(initialChildren, callback, container, LegacyRoot, null, // hydrationCallbacks
      false, // isStrictMode
      false, // concurrentUpdatesByDefaultOverride,
      '', // identifierPrefix
      noopOnRecoverableError);
      container._reactRootContainer = root;
      markContainerAsRoot(root.current, container);
      var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;
      listenToAllSupportedEvents(rootContainerElement);
      flushSync();
      return root;
    } else {
      // First clear any existing content.
      var rootSibling;

      while (rootSibling = container.lastChild) {
        container.removeChild(rootSibling);
      }

      if (typeof callback === 'function') {
        var _originalCallback = callback;

        callback = function () {
          var instance = getPublicRootInstance(_root);

          _originalCallback.call(instance);
        };
      }

      var _root = createContainer(container, LegacyRoot, null, // hydrationCallbacks
      false, // isStrictMode
      false, // concurrentUpdatesByDefaultOverride,
      '', // identifierPrefix
      noopOnRecoverableError);

      container._reactRootContainer = _root;
      markContainerAsRoot(_root.current, container);

      var _rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;

      listenToAllSupportedEvents(_rootContainerElement); // Initial mount should not be batched.

      flushSync(function () {
        updateContainer(initialChildren, _root, parentComponent, callback);
      });
      return _root;
    }
  }

  function warnOnInvalidCallback$1(callback, callerName) {
    {
      if (callback !== null && typeof callback !== 'function') {
        error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
      }
    }
  }

  function legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) {
    {
      topLevelUpdateWarnings(container);
      warnOnInvalidCallback$1(callback === undefined ? null : callback, 'render');
    }

    var maybeRoot = container._reactRootContainer;
    var root;

    if (!maybeRoot) {
      // Initial mount
      root = legacyCreateRootFromDOMContainer(container, children, parentComponent, callback, forceHydrate);
    } else {
      root = maybeRoot;

      if (typeof callback === 'function') {
        var originalCallback = callback;

        callback = function () {
          var instance = getPublicRootInstance(root);
          originalCallback.call(instance);
        };
      } // Update


      updateContainer(children, root, parentComponent, callback);
    }

    return getPublicRootInstance(root);
  }

  var didWarnAboutFindDOMNode = false;
  function findDOMNode(componentOrElement) {
    {
      if (!didWarnAboutFindDOMNode) {
        didWarnAboutFindDOMNode = true;

        error('findDOMNode is deprecated and will be removed in the next major ' + 'release. Instead, add a ref directly to the element you want ' + 'to reference. Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node');
      }

      var owner = ReactCurrentOwner$3.current;

      if (owner !== null && owner.stateNode !== null) {
        var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;

        if (!warnedAboutRefsInRender) {
          error('%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentNameFromType(owner.type) || 'A component');
        }

        owner.stateNode._warnedAboutRefsInRender = true;
      }
    }

    if (componentOrElement == null) {
      return null;
    }

    if (componentOrElement.nodeType === ELEMENT_NODE) {
      return componentOrElement;
    }

    {
      return findHostInstanceWithWarning(componentOrElement, 'findDOMNode');
    }
  }
  function hydrate(element, container, callback) {
    {
      error('ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot ' + 'instead. Until you switch to the new API, your app will behave as ' + "if it's running React 17. Learn " + 'more: https://reactjs.org/link/switch-to-createroot');
    }

    if (!isValidContainerLegacy(container)) {
      throw new Error('Target container is not a DOM element.');
    }

    {
      var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;

      if (isModernRoot) {
        error('You are calling ReactDOM.hydrate() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. ' + 'Did you mean to call hydrateRoot(container, element)?');
      }
    } // TODO: throw or warn if we couldn't hydrate?


    return legacyRenderSubtreeIntoContainer(null, element, container, true, callback);
  }
  function render(element, container, callback) {
    {
      error('ReactDOM.render is no longer supported in React 18. Use createRoot ' + 'instead. Until you switch to the new API, your app will behave as ' + "if it's running React 17. Learn " + 'more: https://reactjs.org/link/switch-to-createroot');
    }

    if (!isValidContainerLegacy(container)) {
      throw new Error('Target container is not a DOM element.');
    }

    {
      var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;

      if (isModernRoot) {
        error('You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. ' + 'Did you mean to call root.render(element)?');
      }
    }

    return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);
  }
  function unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {
    {
      error('ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported ' + 'in React 18. Consider using a portal instead. Until you switch to ' + "the createRoot API, your app will behave as if it's running React " + '17. Learn more: https://reactjs.org/link/switch-to-createroot');
    }

    if (!isValidContainerLegacy(containerNode)) {
      throw new Error('Target container is not a DOM element.');
    }

    if (parentComponent == null || !has(parentComponent)) {
      throw new Error('parentComponent must be a valid React Component');
    }

    return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);
  }
  var didWarnAboutUnmountComponentAtNode = false;
  function unmountComponentAtNode(container) {
    {
      if (!didWarnAboutUnmountComponentAtNode) {
        didWarnAboutUnmountComponentAtNode = true;

        error('unmountComponentAtNode is deprecated and will be removed in the ' + 'next major release. Switch to the createRoot API. Learn ' + 'more: https://reactjs.org/link/switch-to-createroot');
      }
    }

    if (!isValidContainerLegacy(container)) {
      throw new Error('unmountComponentAtNode(...): Target container is not a DOM element.');
    }

    {
      var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;

      if (isModernRoot) {
        error('You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?');
      }
    }

    if (container._reactRootContainer) {
      {
        var rootEl = getReactRootElementInContainer(container);
        var renderedByDifferentReact = rootEl && !getInstanceFromNode(rootEl);

        if (renderedByDifferentReact) {
          error("unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.');
        }
      } // Unmount should not be batched.


      flushSync(function () {
        legacyRenderSubtreeIntoContainer(null, null, container, false, function () {
          // $FlowFixMe This should probably use `delete container._reactRootContainer`
          container._reactRootContainer = null;
          unmarkContainerAsRoot(container);
        });
      }); // If you call unmountComponentAtNode twice in quick succession, you'll
      // get `true` twice. That's probably fine?

      return true;
    } else {
      {
        var _rootEl = getReactRootElementInContainer(container);

        var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode(_rootEl)); // Check if the container itself is a React root node.

        var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainerLegacy(container.parentNode) && !!container.parentNode._reactRootContainer;

        if (hasNonRootReactChild) {
          error("unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.');
        }
      }

      return false;
    }
  }

  setAttemptSynchronousHydration(attemptSynchronousHydration$1);
  setAttemptContinuousHydration(attemptContinuousHydration$1);
  setAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1);
  setGetCurrentUpdatePriority(getCurrentUpdatePriority);
  setAttemptHydrationAtPriority(runWithPriority);

  {
    if (typeof Map !== 'function' || // $FlowIssue Flow incorrectly thinks Map has no prototype
    Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || // $FlowIssue Flow incorrectly thinks Set has no prototype
    Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {
      error('React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');
    }
  }

  setRestoreImplementation(restoreControlledState$3);
  setBatchingImplementation(batchedUpdates$1, discreteUpdates, flushSync);

  function createPortal$1(children, container) {
    var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;

    if (!isValidContainer(container)) {
      throw new Error('Target container is not a DOM element.');
    } // TODO: pass ReactDOM portal implementation as third argument
    // $FlowFixMe The Flow type is opaque but there's no way to actually create it.


    return createPortal(children, container, null, key);
  }

  function renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {
    return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);
  }

  var Internals = {
    usingClientEntryPoint: false,
    // Keep in sync with ReactTestUtils.js.
    // This is an array for better minification.
    Events: [getInstanceFromNode, getNodeFromInstance, getFiberCurrentPropsFromNode, enqueueStateRestore, restoreStateIfNeeded, batchedUpdates$1]
  };

  function createRoot$1(container, options) {
    {
      if (!Internals.usingClientEntryPoint && !true) {
        error('You are importing createRoot from "react-dom" which is not supported. ' + 'You should instead import it from "react-dom/client".');
      }
    }

    return createRoot(container, options);
  }

  function hydrateRoot$1(container, initialChildren, options) {
    {
      if (!Internals.usingClientEntryPoint && !true) {
        error('You are importing hydrateRoot from "react-dom" which is not supported. ' + 'You should instead import it from "react-dom/client".');
      }
    }

    return hydrateRoot(container, initialChildren, options);
  } // Overload the definition to the two valid signatures.
  // Warning, this opts-out of checking the function body.


  // eslint-disable-next-line no-redeclare
  function flushSync$1(fn) {
    {
      if (isAlreadyRendering()) {
        error('flushSync was called from inside a lifecycle method. React cannot ' + 'flush when React is already rendering. Consider moving this call to ' + 'a scheduler task or micro task.');
      }
    }

    return flushSync(fn);
  }
  var foundDevTools = injectIntoDevTools({
    findFiberByHostInstance: getClosestInstanceFromNode,
    bundleType:  1 ,
    version: ReactVersion,
    rendererPackageName: 'react-dom'
  });

  {
    if (!foundDevTools && canUseDOM && window.top === window.self) {
      // If we're in Chrome or Firefox, provide a download link if not installed.
      if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {
        var protocol = window.location.protocol; // Don't warn in exotic cases like chrome-extension://.

        if (/^(https?|file):$/.test(protocol)) {
          // eslint-disable-next-line react-internal/no-production-logging
          console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://reactjs.org/link/react-devtools' + (protocol === 'file:' ? '\nYou might need to use a local HTTP server (instead of file://): ' + 'https://reactjs.org/link/react-devtools-faq' : ''), 'font-weight:bold');
        }
      }
    }
  }

  exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
  exports.createPortal = createPortal$1;
  exports.createRoot = createRoot$1;
  exports.findDOMNode = findDOMNode;
  exports.flushSync = flushSync$1;
  exports.hydrate = hydrate;
  exports.hydrateRoot = hydrateRoot$1;
  exports.render = render;
  exports.unmountComponentAtNode = unmountComponentAtNode;
  exports.unstable_batchedUpdates = batchedUpdates$1;
  exports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;
  exports.version = ReactVersion;

})));
                                                                                             dist/vendor/react-dom.min.js                                                                        0000644                 00000401373 15212564037 0012014 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @license React
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
(function(){/*
 Modernizr 3.0.0pre (Custom Build) | MIT
*/
'use strict';(function(Q,zb){"object"===typeof exports&&"undefined"!==typeof module?zb(exports,require("react")):"function"===typeof define&&define.amd?define(["exports","react"],zb):(Q=Q||self,zb(Q.ReactDOM={},Q.React))})(this,function(Q,zb){function m(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
function mb(a,b){Ab(a,b);Ab(a+"Capture",b)}function Ab(a,b){$b[a]=b;for(a=0;a<b.length;a++)cg.add(b[a])}function bj(a){if(Zd.call(dg,a))return!0;if(Zd.call(eg,a))return!1;if(cj.test(a))return dg[a]=!0;eg[a]=!0;return!1}function dj(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}function ej(a,b,c,d){if(null===
b||"undefined"===typeof b||dj(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function Y(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}function $d(a,b,c,d){var e=R.hasOwnProperty(b)?R[b]:null;if(null!==e?0!==e.type:d||!(2<b.length)||"o"!==
b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1])ej(b,c,e,d)&&(c=null),d||null===e?bj(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c)))}function ac(a){if(null===a||"object"!==typeof a)return null;a=fg&&a[fg]||a["@@iterator"];return"function"===typeof a?a:null}function bc(a,b,
c){if(void 0===ae)try{throw Error();}catch(d){ae=(b=d.stack.trim().match(/\n( *(at )?)/))&&b[1]||""}return"\n"+ae+a}function be(a,b){if(!a||ce)return"";ce=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(b)if(b=function(){throw Error();},Object.defineProperty(b.prototype,"props",{set:function(){throw Error();}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(b,[])}catch(n){var d=n}Reflect.construct(a,[],b)}else{try{b.call()}catch(n){d=n}a.call(b.prototype)}else{try{throw Error();
}catch(n){d=n}a()}}catch(n){if(n&&d&&"string"===typeof n.stack){for(var e=n.stack.split("\n"),f=d.stack.split("\n"),g=e.length-1,h=f.length-1;1<=g&&0<=h&&e[g]!==f[h];)h--;for(;1<=g&&0<=h;g--,h--)if(e[g]!==f[h]){if(1!==g||1!==h){do if(g--,h--,0>h||e[g]!==f[h]){var k="\n"+e[g].replace(" at new "," at ");a.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{ce=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:"")?bc(a):
""}function fj(a){switch(a.tag){case 5:return bc(a.type);case 16:return bc("Lazy");case 13:return bc("Suspense");case 19:return bc("SuspenseList");case 0:case 2:case 15:return a=be(a.type,!1),a;case 11:return a=be(a.type.render,!1),a;case 1:return a=be(a.type,!0),a;default:return""}}function de(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case Bb:return"Fragment";case Cb:return"Portal";case ee:return"Profiler";case fe:return"StrictMode";
case ge:return"Suspense";case he:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case gg:return(a.displayName||"Context")+".Consumer";case hg:return(a._context.displayName||"Context")+".Provider";case ie:var b=a.render;a=a.displayName;a||(a=b.displayName||b.name||"",a=""!==a?"ForwardRef("+a+")":"ForwardRef");return a;case je:return b=a.displayName||null,null!==b?b:de(a.type)||"Memo";case Ta:b=a._payload;a=a._init;try{return de(a(b))}catch(c){}}return null}function gj(a){var b=a.type;
switch(a.tag){case 24:return"Cache";case 9:return(b.displayName||"Context")+".Consumer";case 10:return(b._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=b.render,a=a.displayName||a.name||"",b.displayName||(""!==a?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return b;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return de(b);case 8:return b===fe?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";
case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof b)return b.displayName||b.name||null;if("string"===typeof b)return b}return null}function Ua(a){switch(typeof a){case "boolean":case "number":case "string":case "undefined":return a;case "object":return a;default:return""}}function ig(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===
b)}function hj(a){var b=ig(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=
null;delete a[b]}}}}function Pc(a){a._valueTracker||(a._valueTracker=hj(a))}function jg(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=ig(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Qc(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}function ke(a,b){var c=b.checked;return E({},b,{defaultChecked:void 0,defaultValue:void 0,
value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function kg(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Ua(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function lg(a,b){b=b.checked;null!=b&&$d(a,"checked",b,!1)}function le(a,b){lg(a,b);var c=Ua(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=
c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?me(a,b.type,c):b.hasOwnProperty("defaultValue")&&me(a,b.type,Ua(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}function mg(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;
c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)}function me(a,b,c){if("number"!==b||Qc(a.ownerDocument)!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}function Db(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=
!0)}else{c=""+Ua(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}function ne(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(m(91));return E({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function ng(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(m(92));if(cc(c)){if(1<c.length)throw Error(m(93));
c=c[0]}b=c}null==b&&(b="");c=b}a._wrapperState={initialValue:Ua(c)}}function og(a,b){var c=Ua(b.value),d=Ua(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function pg(a,b){b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b)}function qg(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}
function oe(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?qg(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}function rg(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||dc.hasOwnProperty(a)&&dc[a]?(""+b).trim():b+"px"}function sg(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=rg(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}function pe(a,b){if(b){if(ij[a]&&
(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(m(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(m(60));if("object"!==typeof b.dangerouslySetInnerHTML||!("__html"in b.dangerouslySetInnerHTML))throw Error(m(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(m(62));}}function qe(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;
default:return!0}}function re(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}function tg(a){if(a=ec(a)){if("function"!==typeof se)throw Error(m(280));var b=a.stateNode;b&&(b=Rc(b),se(a.stateNode,a.type,b))}}function ug(a){Eb?Fb?Fb.push(a):Fb=[a]:Eb=a}function vg(){if(Eb){var a=Eb,b=Fb;Fb=Eb=null;tg(a);if(b)for(a=0;a<b.length;a++)tg(b[a])}}function wg(a,b,c){if(te)return a(b,c);te=!0;try{return xg(a,b,c)}finally{if(te=
!1,null!==Eb||null!==Fb)yg(),vg()}}function fc(a,b){var c=a.stateNode;if(null===c)return null;var d=Rc(c);if(null===d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;
if(c&&"function"!==typeof c)throw Error(m(231,b,typeof c));return c}function jj(a,b,c,d,e,f,g,h,k){gc=!1;Sc=null;kj.apply(lj,arguments)}function mj(a,b,c,d,e,f,g,h,k){jj.apply(this,arguments);if(gc){if(gc){var n=Sc;gc=!1;Sc=null}else throw Error(m(198));Tc||(Tc=!0,ue=n)}}function nb(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&4098)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function zg(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,
null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function Ag(a){if(nb(a)!==a)throw Error(m(188));}function nj(a){var b=a.alternate;if(!b){b=nb(a);if(null===b)throw Error(m(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return Ag(e),a;if(f===d)return Ag(e),b;f=f.sibling}throw Error(m(188));}if(c.return!==d.return)c=e,d=f;
else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(m(189));}}if(c.alternate!==d)throw Error(m(190));}if(3!==c.tag)throw Error(m(188));return c.stateNode.current===c?a:b}function Bg(a){a=nj(a);return null!==a?Cg(a):null}function Cg(a){if(5===a.tag||6===a.tag)return a;for(a=a.child;null!==a;){var b=Cg(a);if(null!==b)return b;a=a.sibling}return null}
function oj(a,b){if(Ca&&"function"===typeof Ca.onCommitFiberRoot)try{Ca.onCommitFiberRoot(Uc,a,void 0,128===(a.current.flags&128))}catch(c){}}function pj(a){a>>>=0;return 0===a?32:31-(qj(a)/rj|0)|0}function hc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&
4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function Vc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=hc(h):(f&=g,0!==f&&(d=hc(f)))}else g=c&~e,0!==g?d=hc(g):0!==f&&(d=hc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&
(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0<b;)c=31-ta(b),e=1<<c,d|=a[c],b&=~e;return d}function sj(a,b){switch(a){case 1:case 2:case 4:return b+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return b+5E3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;
case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tj(a,b){for(var c=a.suspendedLanes,d=a.pingedLanes,e=a.expirationTimes,f=a.pendingLanes;0<f;){var g=31-ta(f),h=1<<g,k=e[g];if(-1===k){if(0===(h&c)||0!==(h&d))e[g]=sj(h,b)}else k<=b&&(a.expiredLanes|=h);f&=~h}}function ve(a){a=a.pendingLanes&-1073741825;return 0!==a?a:a&1073741824?1073741824:0}function Dg(){var a=Wc;Wc<<=1;0===(Wc&4194240)&&(Wc=64);return a}function we(a){for(var b=[],c=0;31>c;c++)b.push(a);
return b}function ic(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-ta(b);a[b]=c}function uj(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0<c;){var e=31-ta(c),f=1<<e;b[e]=0;d[e]=-1;a[e]=-1;c&=~f}}function xe(a,b){var c=a.entangledLanes|=b;for(a=a.entanglements;c;){var d=31-ta(c),e=1<<d;e&b|a[d]&
b&&(a[d]|=b);c&=~e}}function Eg(a){a&=-a;return 1<a?4<a?0!==(a&268435455)?16:536870912:4:1}function Fg(a,b){switch(a){case "focusin":case "focusout":Va=null;break;case "dragenter":case "dragleave":Wa=null;break;case "mouseover":case "mouseout":Xa=null;break;case "pointerover":case "pointerout":jc.delete(b.pointerId);break;case "gotpointercapture":case "lostpointercapture":kc.delete(b.pointerId)}}function lc(a,b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a={blockedOn:b,domEventName:c,eventSystemFlags:d,
nativeEvent:f,targetContainers:[e]},null!==b&&(b=ec(b),null!==b&&Gg(b)),a;a.eventSystemFlags|=d;b=a.targetContainers;null!==e&&-1===b.indexOf(e)&&b.push(e);return a}function vj(a,b,c,d,e){switch(b){case "focusin":return Va=lc(Va,a,b,c,d,e),!0;case "dragenter":return Wa=lc(Wa,a,b,c,d,e),!0;case "mouseover":return Xa=lc(Xa,a,b,c,d,e),!0;case "pointerover":var f=e.pointerId;jc.set(f,lc(jc.get(f)||null,a,b,c,d,e));return!0;case "gotpointercapture":return f=e.pointerId,kc.set(f,lc(kc.get(f)||null,a,b,
c,d,e)),!0}return!1}function Hg(a){var b=ob(a.target);if(null!==b){var c=nb(b);if(null!==c)if(b=c.tag,13===b){if(b=zg(c),null!==b){a.blockedOn=b;wj(a.priority,function(){xj(c)});return}}else if(3===b&&c.stateNode.current.memoizedState.isDehydrated){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null}function Xc(a){if(null!==a.blockedOn)return!1;for(var b=a.targetContainers;0<b.length;){var c=ye(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null===c){c=a.nativeEvent;
var d=new c.constructor(c.type,c);ze=d;c.target.dispatchEvent(d);ze=null}else return b=ec(c),null!==b&&Gg(b),a.blockedOn=c,!1;b.shift()}return!0}function Ig(a,b,c){Xc(a)&&c.delete(b)}function yj(){Ae=!1;null!==Va&&Xc(Va)&&(Va=null);null!==Wa&&Xc(Wa)&&(Wa=null);null!==Xa&&Xc(Xa)&&(Xa=null);jc.forEach(Ig);kc.forEach(Ig)}function mc(a,b){a.blockedOn===b&&(a.blockedOn=null,Ae||(Ae=!0,Jg(Kg,yj)))}function nc(a){if(0<Yc.length){mc(Yc[0],a);for(var b=1;b<Yc.length;b++){var c=Yc[b];c.blockedOn===a&&(c.blockedOn=
null)}}null!==Va&&mc(Va,a);null!==Wa&&mc(Wa,a);null!==Xa&&mc(Xa,a);b=function(b){return mc(b,a)};jc.forEach(b);kc.forEach(b);for(b=0;b<Ya.length;b++)c=Ya[b],c.blockedOn===a&&(c.blockedOn=null);for(;0<Ya.length&&(b=Ya[0],null===b.blockedOn);)Hg(b),null===b.blockedOn&&Ya.shift()}function zj(a,b,c,d){var e=z,f=Gb.transition;Gb.transition=null;try{z=1,Be(a,b,c,d)}finally{z=e,Gb.transition=f}}function Aj(a,b,c,d){var e=z,f=Gb.transition;Gb.transition=null;try{z=4,Be(a,b,c,d)}finally{z=e,Gb.transition=
f}}function Be(a,b,c,d){if(Zc){var e=ye(a,b,c,d);if(null===e)Ce(a,b,d,$c,c),Fg(a,d);else if(vj(e,a,b,c,d))d.stopPropagation();else if(Fg(a,d),b&4&&-1<Bj.indexOf(a)){for(;null!==e;){var f=ec(e);null!==f&&Cj(f);f=ye(a,b,c,d);null===f&&Ce(a,b,d,$c,c);if(f===e)break;e=f}null!==e&&d.stopPropagation()}else Ce(a,b,d,null,c)}}function ye(a,b,c,d){$c=null;a=re(d);a=ob(a);if(null!==a)if(b=nb(a),null===b)a=null;else if(c=b.tag,13===c){a=zg(b);if(null!==a)return a;a=null}else if(3===c){if(b.stateNode.current.memoizedState.isDehydrated)return 3===
b.tag?b.stateNode.containerInfo:null;a=null}else b!==a&&(a=null);$c=a;return null}function Lg(a){switch(a){case "cancel":case "click":case "close":case "contextmenu":case "copy":case "cut":case "auxclick":case "dblclick":case "dragend":case "dragstart":case "drop":case "focusin":case "focusout":case "input":case "invalid":case "keydown":case "keypress":case "keyup":case "mousedown":case "mouseup":case "paste":case "pause":case "play":case "pointercancel":case "pointerdown":case "pointerup":case "ratechange":case "reset":case "resize":case "seeked":case "submit":case "touchcancel":case "touchend":case "touchstart":case "volumechange":case "change":case "selectionchange":case "textInput":case "compositionstart":case "compositionend":case "compositionupdate":case "beforeblur":case "afterblur":case "beforeinput":case "blur":case "fullscreenchange":case "focus":case "hashchange":case "popstate":case "select":case "selectstart":return 1;
case "drag":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "mousemove":case "mouseout":case "mouseover":case "pointermove":case "pointerout":case "pointerover":case "scroll":case "toggle":case "touchmove":case "wheel":case "mouseenter":case "mouseleave":case "pointerenter":case "pointerleave":return 4;case "message":switch(Dj()){case De:return 1;case Mg:return 4;case ad:case Ej:return 16;case Ng:return 536870912;default:return 16}default:return 16}}function Og(){if(bd)return bd;
var a,b=Ee,c=b.length,d,e="value"in Za?Za.value:Za.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return bd=e.slice(a,1<d?1-d:void 0)}function cd(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function dd(){return!0}function Pg(){return!1}function ka(a){function b(b,d,e,f,g){this._reactName=b;this._targetInst=e;this.type=d;this.nativeEvent=f;this.target=g;this.currentTarget=null;
for(var c in a)a.hasOwnProperty(c)&&(b=a[c],this[c]=b?b(f):f[c]);this.isDefaultPrevented=(null!=f.defaultPrevented?f.defaultPrevented:!1===f.returnValue)?dd:Pg;this.isPropagationStopped=Pg;return this}E(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=dd)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():
"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=dd)},persist:function(){},isPersistent:dd});return b}function Fj(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Gj[a])?!!b[a]:!1}function Fe(a){return Fj}function Qg(a,b){switch(a){case "keyup":return-1!==Hj.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "focusout":return!0;default:return!1}}function Rg(a){a=a.detail;return"object"===typeof a&&
"data"in a?a.data:null}function Ij(a,b){switch(a){case "compositionend":return Rg(b);case "keypress":if(32!==b.which)return null;Sg=!0;return Tg;case "textInput":return a=b.data,a===Tg&&Sg?null:a;default:return null}}function Jj(a,b){if(Hb)return"compositionend"===a||!Ge&&Qg(a,b)?(a=Og(),bd=Ee=Za=null,Hb=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;
case "compositionend":return Ug&&"ko"!==b.locale?null:b.data;default:return null}}function Vg(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!Kj[a.type]:"textarea"===b?!0:!1}function Lj(a){if(!Ia)return!1;a="on"+a;var b=a in document;b||(b=document.createElement("div"),b.setAttribute(a,"return;"),b="function"===typeof b[a]);return b}function Wg(a,b,c,d){ug(d);b=ed(b,"onChange");0<b.length&&(c=new He("onChange","change",null,c,d),a.push({event:c,listeners:b}))}function Mj(a){Xg(a,
0)}function fd(a){var b=Ib(a);if(jg(b))return a}function Nj(a,b){if("change"===a)return b}function Yg(){oc&&(oc.detachEvent("onpropertychange",Zg),pc=oc=null)}function Zg(a){if("value"===a.propertyName&&fd(pc)){var b=[];Wg(b,pc,a,re(a));wg(Mj,b)}}function Oj(a,b,c){"focusin"===a?(Yg(),oc=b,pc=c,oc.attachEvent("onpropertychange",Zg)):"focusout"===a&&Yg()}function Pj(a,b){if("selectionchange"===a||"keyup"===a||"keydown"===a)return fd(pc)}function Qj(a,b){if("click"===a)return fd(b)}function Rj(a,b){if("input"===
a||"change"===a)return fd(b)}function Sj(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}function qc(a,b){if(ua(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++){var e=c[d];if(!Zd.call(b,e)||!ua(a[e],b[e]))return!1}return!0}function $g(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function ah(a,b){var c=$g(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;
if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=$g(c)}}function bh(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?bh(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function ch(){for(var a=window,b=Qc();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;
b=Qc(a.document)}return b}function Ie(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}function Tj(a){var b=ch(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&bh(c.ownerDocument.documentElement,c)){if(null!==d&&Ie(c))if(b=d.start,a=d.end,void 0===a&&(a=b),"selectionStart"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);
else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=ah(c,f);var g=ah(c,d);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),
a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});"function"===typeof c.focus&&c.focus();for(c=0;c<b.length;c++)a=b[c],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}}function dh(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Je||null==Jb||Jb!==Qc(d)||(d=Jb,"selectionStart"in d&&Ie(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d=
{anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),rc&&qc(rc,d)||(rc=d,d=ed(Ke,"onSelect"),0<d.length&&(b=new He("onSelect","select",null,b,c),a.push({event:b,listeners:d}),b.target=Jb)))}function gd(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}function hd(a){if(Le[a])return Le[a];if(!Kb[a])return a;var b=Kb[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in eh)return Le[a]=b[c];return a}function $a(a,
b){fh.set(a,b);mb(b,[a])}function gh(a,b,c){var d=a.type||"unknown-event";a.currentTarget=c;mj(d,b,void 0,a);a.currentTarget=null}function Xg(a,b){b=0!==(b&4);for(var c=0;c<a.length;c++){var d=a[c],e=d.event;d=d.listeners;a:{var f=void 0;if(b)for(var g=d.length-1;0<=g;g--){var h=d[g],k=h.instance,n=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;gh(e,h,n);f=k}else for(g=0;g<d.length;g++){h=d[g];k=h.instance;n=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;
gh(e,h,n);f=k}}}if(Tc)throw a=ue,Tc=!1,ue=null,a;}function B(a,b){var c=b[Me];void 0===c&&(c=b[Me]=new Set);var d=a+"__bubble";c.has(d)||(hh(b,a,2,!1),c.add(d))}function Ne(a,b,c){var d=0;b&&(d|=4);hh(c,a,d,b)}function sc(a){if(!a[id]){a[id]=!0;cg.forEach(function(b){"selectionchange"!==b&&(Uj.has(b)||Ne(b,!1,a),Ne(b,!0,a))});var b=9===a.nodeType?a:a.ownerDocument;null===b||b[id]||(b[id]=!0,Ne("selectionchange",!1,b))}}function hh(a,b,c,d,e){switch(Lg(b)){case 1:e=zj;break;case 4:e=Aj;break;default:e=
Be}c=e.bind(null,b,c,a);e=void 0;!Oe||"touchstart"!==b&&"touchmove"!==b&&"wheel"!==b||(e=!0);d?void 0!==e?a.addEventListener(b,c,{capture:!0,passive:e}):a.addEventListener(b,c,!0):void 0!==e?a.addEventListener(b,c,{passive:e}):a.addEventListener(b,c,!1)}function Ce(a,b,c,d,e){var f=d;if(0===(b&1)&&0===(b&2)&&null!==d)a:for(;;){if(null===d)return;var g=d.tag;if(3===g||4===g){var h=d.stateNode.containerInfo;if(h===e||8===h.nodeType&&h.parentNode===e)break;if(4===g)for(g=d.return;null!==g;){var k=g.tag;
if(3===k||4===k)if(k=g.stateNode.containerInfo,k===e||8===k.nodeType&&k.parentNode===e)return;g=g.return}for(;null!==h;){g=ob(h);if(null===g)return;k=g.tag;if(5===k||6===k){d=f=g;continue a}h=h.parentNode}}d=d.return}wg(function(){var d=f,e=re(c),g=[];a:{var h=fh.get(a);if(void 0!==h){var k=He,m=a;switch(a){case "keypress":if(0===cd(c))break a;case "keydown":case "keyup":k=Vj;break;case "focusin":m="focus";k=Pe;break;case "focusout":m="blur";k=Pe;break;case "beforeblur":case "afterblur":k=Pe;break;
case "click":if(2===c.button)break a;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":k=ih;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":k=Wj;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":k=Xj;break;case jh:case kh:case lh:k=Yj;break;case mh:k=Zj;break;case "scroll":k=ak;break;case "wheel":k=bk;break;case "copy":case "cut":case "paste":k=
ck;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":k=nh}var l=0!==(b&4),p=!l&&"scroll"===a,w=l?null!==h?h+"Capture":null:h;l=[];for(var A=d,t;null!==A;){t=A;var M=t.stateNode;5===t.tag&&null!==M&&(t=M,null!==w&&(M=fc(A,w),null!=M&&l.push(tc(A,M,t))));if(p)break;A=A.return}0<l.length&&(h=new k(h,m,null,c,e),g.push({event:h,listeners:l}))}}if(0===(b&7)){a:{h="mouseover"===a||"pointerover"===
a;k="mouseout"===a||"pointerout"===a;if(h&&c!==ze&&(m=c.relatedTarget||c.fromElement)&&(ob(m)||m[Ja]))break a;if(k||h){h=e.window===e?e:(h=e.ownerDocument)?h.defaultView||h.parentWindow:window;if(k){if(m=c.relatedTarget||c.toElement,k=d,m=m?ob(m):null,null!==m&&(p=nb(m),m!==p||5!==m.tag&&6!==m.tag))m=null}else k=null,m=d;if(k!==m){l=ih;M="onMouseLeave";w="onMouseEnter";A="mouse";if("pointerout"===a||"pointerover"===a)l=nh,M="onPointerLeave",w="onPointerEnter",A="pointer";p=null==k?h:Ib(k);t=null==
m?h:Ib(m);h=new l(M,A+"leave",k,c,e);h.target=p;h.relatedTarget=t;M=null;ob(e)===d&&(l=new l(w,A+"enter",m,c,e),l.target=t,l.relatedTarget=p,M=l);p=M;if(k&&m)b:{l=k;w=m;A=0;for(t=l;t;t=Lb(t))A++;t=0;for(M=w;M;M=Lb(M))t++;for(;0<A-t;)l=Lb(l),A--;for(;0<t-A;)w=Lb(w),t--;for(;A--;){if(l===w||null!==w&&l===w.alternate)break b;l=Lb(l);w=Lb(w)}l=null}else l=null;null!==k&&oh(g,h,k,l,!1);null!==m&&null!==p&&oh(g,p,m,l,!0)}}}a:{h=d?Ib(d):window;k=h.nodeName&&h.nodeName.toLowerCase();if("select"===k||"input"===
k&&"file"===h.type)var ma=Nj;else if(Vg(h))if(ph)ma=Rj;else{ma=Pj;var va=Oj}else(k=h.nodeName)&&"input"===k.toLowerCase()&&("checkbox"===h.type||"radio"===h.type)&&(ma=Qj);if(ma&&(ma=ma(a,d))){Wg(g,ma,c,e);break a}va&&va(a,h,d);"focusout"===a&&(va=h._wrapperState)&&va.controlled&&"number"===h.type&&me(h,"number",h.value)}va=d?Ib(d):window;switch(a){case "focusin":if(Vg(va)||"true"===va.contentEditable)Jb=va,Ke=d,rc=null;break;case "focusout":rc=Ke=Jb=null;break;case "mousedown":Je=!0;break;case "contextmenu":case "mouseup":case "dragend":Je=
!1;dh(g,c,e);break;case "selectionchange":if(dk)break;case "keydown":case "keyup":dh(g,c,e)}var ab;if(Ge)b:{switch(a){case "compositionstart":var da="onCompositionStart";break b;case "compositionend":da="onCompositionEnd";break b;case "compositionupdate":da="onCompositionUpdate";break b}da=void 0}else Hb?Qg(a,c)&&(da="onCompositionEnd"):"keydown"===a&&229===c.keyCode&&(da="onCompositionStart");da&&(Ug&&"ko"!==c.locale&&(Hb||"onCompositionStart"!==da?"onCompositionEnd"===da&&Hb&&(ab=Og()):(Za=e,Ee=
"value"in Za?Za.value:Za.textContent,Hb=!0)),va=ed(d,da),0<va.length&&(da=new qh(da,a,null,c,e),g.push({event:da,listeners:va}),ab?da.data=ab:(ab=Rg(c),null!==ab&&(da.data=ab))));if(ab=ek?Ij(a,c):Jj(a,c))d=ed(d,"onBeforeInput"),0<d.length&&(e=new fk("onBeforeInput","beforeinput",null,c,e),g.push({event:e,listeners:d}),e.data=ab)}Xg(g,b)})}function tc(a,b,c){return{instance:a,listener:b,currentTarget:c}}function ed(a,b){for(var c=b+"Capture",d=[];null!==a;){var e=a,f=e.stateNode;5===e.tag&&null!==
f&&(e=f,f=fc(a,c),null!=f&&d.unshift(tc(a,f,e)),f=fc(a,b),null!=f&&d.push(tc(a,f,e)));a=a.return}return d}function Lb(a){if(null===a)return null;do a=a.return;while(a&&5!==a.tag);return a?a:null}function oh(a,b,c,d,e){for(var f=b._reactName,g=[];null!==c&&c!==d;){var h=c,k=h.alternate,n=h.stateNode;if(null!==k&&k===d)break;5===h.tag&&null!==n&&(h=n,e?(k=fc(c,f),null!=k&&g.unshift(tc(c,k,h))):e||(k=fc(c,f),null!=k&&g.push(tc(c,k,h))));c=c.return}0!==g.length&&a.push({event:b,listeners:g})}function rh(a){return("string"===
typeof a?a:""+a).replace(gk,"\n").replace(hk,"")}function jd(a,b,c,d){b=rh(b);if(rh(a)!==b&&c)throw Error(m(425));}function kd(){}function Qe(a,b){return"textarea"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}function ik(a){setTimeout(function(){throw a;})}function Re(a,b){var c=b,d=0;do{var e=c.nextSibling;a.removeChild(c);if(e&&8===e.nodeType)if(c=
e.data,"/$"===c){if(0===d){a.removeChild(e);nc(b);return}d--}else"$"!==c&&"$?"!==c&&"$!"!==c||d++;c=e}while(c);nc(b)}function Ka(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break;if(8===b){b=a.data;if("$"===b||"$!"===b||"$?"===b)break;if("/$"===b)return null}}return a}function sh(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if("$"===c||"$!"===c||"$?"===c){if(0===b)return a;b--}else"/$"===c&&b++}a=a.previousSibling}return null}function ob(a){var b=a[Da];
if(b)return b;for(var c=a.parentNode;c;){if(b=c[Ja]||c[Da]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=sh(a);null!==a;){if(c=a[Da])return c;a=sh(a)}return b}a=c;c=a.parentNode}return null}function ec(a){a=a[Da]||a[Ja];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function Ib(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(m(33));}function Rc(a){return a[uc]||null}function bb(a){return{current:a}}function v(a,b){0>Mb||(a.current=Se[Mb],Se[Mb]=null,Mb--)}
function y(a,b,c){Mb++;Se[Mb]=a.current;a.current=b}function Nb(a,b){var c=a.type.contextTypes;if(!c)return cb;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function ea(a){a=a.childContextTypes;return null!==a&&void 0!==a}function th(a,b,c){if(J.current!==cb)throw Error(m(168));
y(J,b);y(S,c)}function uh(a,b,c){var d=a.stateNode;b=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(m(108,gj(a)||"Unknown",e));return E({},c,d)}function ld(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||cb;pb=J.current;y(J,a);y(S,S.current);return!0}function vh(a,b,c){var d=a.stateNode;if(!d)throw Error(m(169));c?(a=uh(a,b,pb),d.__reactInternalMemoizedMergedChildContext=a,v(S),v(J),y(J,a)):v(S);
y(S,c)}function wh(a){null===La?La=[a]:La.push(a)}function jk(a){md=!0;wh(a)}function db(){if(!Te&&null!==La){Te=!0;var a=0,b=z;try{var c=La;for(z=1;a<c.length;a++){var d=c[a];do d=d(!0);while(null!==d)}La=null;md=!1}catch(e){throw null!==La&&(La=La.slice(a+1)),xh(De,db),e;}finally{z=b,Te=!1}}return null}function qb(a,b){Ob[Pb++]=nd;Ob[Pb++]=od;od=a;nd=b}function yh(a,b,c){na[oa++]=Ma;na[oa++]=Na;na[oa++]=rb;rb=a;var d=Ma;a=Na;var e=32-ta(d)-1;d&=~(1<<e);c+=1;var f=32-ta(b)+e;if(30<f){var g=e-e%5;
f=(d&(1<<g)-1).toString(32);d>>=g;e-=g;Ma=1<<32-ta(b)+e|c<<e|d;Na=f+a}else Ma=1<<f|c<<e|d,Na=a}function Ue(a){null!==a.return&&(qb(a,1),yh(a,1,0))}function Ve(a){for(;a===od;)od=Ob[--Pb],Ob[Pb]=null,nd=Ob[--Pb],Ob[Pb]=null;for(;a===rb;)rb=na[--oa],na[oa]=null,Na=na[--oa],na[oa]=null,Ma=na[--oa],na[oa]=null}function zh(a,b){var c=pa(5,null,null,0);c.elementType="DELETED";c.stateNode=b;c.return=a;b=a.deletions;null===b?(a.deletions=[c],a.flags|=16):b.push(c)}function Ah(a,b){switch(a.tag){case 5:var c=
a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,la=a,fa=Ka(b.firstChild),!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,la=a,fa=null,!0):!1;case 13:return b=8!==b.nodeType?null:b,null!==b?(c=null!==rb?{id:Ma,overflow:Na}:null,a.memoizedState={dehydrated:b,treeContext:c,retryLane:1073741824},c=pa(18,null,null,0),c.stateNode=b,c.return=a,a.child=c,la=a,fa=null,!0):!1;default:return!1}}function We(a){return 0!==
(a.mode&1)&&0===(a.flags&128)}function Xe(a){if(D){var b=fa;if(b){var c=b;if(!Ah(a,b)){if(We(a))throw Error(m(418));b=Ka(c.nextSibling);var d=la;b&&Ah(a,b)?zh(d,c):(a.flags=a.flags&-4097|2,D=!1,la=a)}}else{if(We(a))throw Error(m(418));a.flags=a.flags&-4097|2;D=!1;la=a}}}function Bh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;la=a}function pd(a){if(a!==la)return!1;if(!D)return Bh(a),D=!0,!1;var b;(b=3!==a.tag)&&!(b=5!==a.tag)&&(b=a.type,b="head"!==b&&"body"!==b&&!Qe(a.type,
a.memoizedProps));if(b&&(b=fa)){if(We(a)){for(a=fa;a;)a=Ka(a.nextSibling);throw Error(m(418));}for(;b;)zh(a,b),b=Ka(b.nextSibling)}Bh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(m(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if("/$"===c){if(0===b){fa=Ka(a.nextSibling);break a}b--}else"$"!==c&&"$!"!==c&&"$?"!==c||b++}a=a.nextSibling}fa=null}}else fa=la?Ka(a.stateNode.nextSibling):null;return!0}function Qb(){fa=la=null;D=!1}function Ye(a){null===
wa?wa=[a]:wa.push(a)}function vc(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(m(309));var d=c.stateNode}if(!d)throw Error(m(147,a));var e=d,f=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===f)return b.ref;b=function(a){var b=e.refs;null===a?delete b[f]:b[f]=a};b._stringRef=f;return b}if("string"!==typeof a)throw Error(m(284));if(!c._owner)throw Error(m(290,a));}return a}function qd(a,b){a=
Object.prototype.toString.call(b);throw Error(m(31,"[object Object]"===a?"object with keys {"+Object.keys(b).join(", ")+"}":a));}function Ch(a){var b=a._init;return b(a._payload)}function Dh(a){function b(b,c){if(a){var d=b.deletions;null===d?(b.deletions=[c],b.flags|=16):d.push(c)}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=eb(a,b);a.index=
0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return b.flags|=1048576,c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.flags|=2,c):d;b.flags|=2;return c}function g(b){a&&null===b.alternate&&(b.flags|=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=Ze(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){var f=c.type;if(f===Bb)return l(a,b,c.props.children,d,c.key);if(null!==b&&(b.elementType===f||"object"===typeof f&&null!==f&&f.$$typeof===Ta&&
Ch(f)===b.type))return d=e(b,c.props),d.ref=vc(a,b,c),d.return=a,d;d=rd(c.type,c.key,c.props,null,a.mode,d);d.ref=vc(a,b,c);d.return=a;return d}function n(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=$e(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function l(a,b,c,d,f){if(null===b||7!==b.tag)return b=sb(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function u(a,b,c){if("string"===
typeof b&&""!==b||"number"===typeof b)return b=Ze(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case sd:return c=rd(b.type,b.key,b.props,null,a.mode,c),c.ref=vc(a,null,b),c.return=a,c;case Cb:return b=$e(b,a.mode,c),b.return=a,b;case Ta:var d=b._init;return u(a,d(b._payload),c)}if(cc(b)||ac(b))return b=sb(b,a.mode,c,null),b.return=a,b;qd(a,b)}return null}function r(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c&&""!==c||"number"===typeof c)return null!==
e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case sd:return c.key===e?k(a,b,c,d):null;case Cb:return c.key===e?n(a,b,c,d):null;case Ta:return e=c._init,r(a,b,e(c._payload),d)}if(cc(c)||ac(c))return null!==e?null:l(a,b,c,d,null);qd(a,c)}return null}function p(a,b,c,d,e){if("string"===typeof d&&""!==d||"number"===typeof d)return a=a.get(c)||null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case sd:return a=a.get(null===d.key?c:d.key)||null,k(b,a,d,
e);case Cb:return a=a.get(null===d.key?c:d.key)||null,n(b,a,d,e);case Ta:var f=d._init;return p(a,b,c,f(d._payload),e)}if(cc(d)||ac(d))return a=a.get(c)||null,l(b,a,d,e,null);qd(b,d)}return null}function x(e,g,h,k){for(var n=null,m=null,l=g,t=g=0,q=null;null!==l&&t<h.length;t++){l.index>t?(q=l,l=null):q=l.sibling;var A=r(e,l,h[t],k);if(null===A){null===l&&(l=q);break}a&&l&&null===A.alternate&&b(e,l);g=f(A,g,t);null===m?n=A:m.sibling=A;m=A;l=q}if(t===h.length)return c(e,l),D&&qb(e,t),n;if(null===l){for(;t<
h.length;t++)l=u(e,h[t],k),null!==l&&(g=f(l,g,t),null===m?n=l:m.sibling=l,m=l);D&&qb(e,t);return n}for(l=d(e,l);t<h.length;t++)q=p(l,e,t,h[t],k),null!==q&&(a&&null!==q.alternate&&l.delete(null===q.key?t:q.key),g=f(q,g,t),null===m?n=q:m.sibling=q,m=q);a&&l.forEach(function(a){return b(e,a)});D&&qb(e,t);return n}function I(e,g,h,k){var n=ac(h);if("function"!==typeof n)throw Error(m(150));h=n.call(h);if(null==h)throw Error(m(151));for(var l=n=null,q=g,t=g=0,A=null,w=h.next();null!==q&&!w.done;t++,w=
h.next()){q.index>t?(A=q,q=null):A=q.sibling;var x=r(e,q,w.value,k);if(null===x){null===q&&(q=A);break}a&&q&&null===x.alternate&&b(e,q);g=f(x,g,t);null===l?n=x:l.sibling=x;l=x;q=A}if(w.done)return c(e,q),D&&qb(e,t),n;if(null===q){for(;!w.done;t++,w=h.next())w=u(e,w.value,k),null!==w&&(g=f(w,g,t),null===l?n=w:l.sibling=w,l=w);D&&qb(e,t);return n}for(q=d(e,q);!w.done;t++,w=h.next())w=p(q,e,t,w.value,k),null!==w&&(a&&null!==w.alternate&&q.delete(null===w.key?t:w.key),g=f(w,g,t),null===l?n=w:l.sibling=
w,l=w);a&&q.forEach(function(a){return b(e,a)});D&&qb(e,t);return n}function v(a,d,f,h){"object"===typeof f&&null!==f&&f.type===Bb&&null===f.key&&(f=f.props.children);if("object"===typeof f&&null!==f){switch(f.$$typeof){case sd:a:{for(var k=f.key,n=d;null!==n;){if(n.key===k){k=f.type;if(k===Bb){if(7===n.tag){c(a,n.sibling);d=e(n,f.props.children);d.return=a;a=d;break a}}else if(n.elementType===k||"object"===typeof k&&null!==k&&k.$$typeof===Ta&&Ch(k)===n.type){c(a,n.sibling);d=e(n,f.props);d.ref=vc(a,
n,f);d.return=a;a=d;break a}c(a,n);break}else b(a,n);n=n.sibling}f.type===Bb?(d=sb(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=rd(f.type,f.key,f.props,null,a.mode,h),h.ref=vc(a,d,f),h.return=a,a=h)}return g(a);case Cb:a:{for(n=f.key;null!==d;){if(d.key===n)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=$e(f,a.mode,h);d.return=a;
a=d}return g(a);case Ta:return n=f._init,v(a,d,n(f._payload),h)}if(cc(f))return x(a,d,f,h);if(ac(f))return I(a,d,f,h);qd(a,f)}return"string"===typeof f&&""!==f||"number"===typeof f?(f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Ze(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return v}function af(){bf=Rb=td=null}function cf(a,b){b=ud.current;v(ud);a._currentValue=b}function df(a,b,c){for(;null!==a;){var d=a.alternate;(a.childLanes&b)!==b?(a.childLanes|=b,null!==d&&(d.childLanes|=
b)):null!==d&&(d.childLanes&b)!==b&&(d.childLanes|=b);if(a===c)break;a=a.return}}function Sb(a,b){td=a;bf=Rb=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(ha=!0),a.firstContext=null)}function qa(a){var b=a._currentValue;if(bf!==a)if(a={context:a,memoizedValue:b,next:null},null===Rb){if(null===td)throw Error(m(308));Rb=a;td.dependencies={lanes:0,firstContext:a}}else Rb=Rb.next=a;return b}function ef(a){null===tb?tb=[a]:tb.push(a)}function Eh(a,b,c,d){var e=b.interleaved;
null===e?(c.next=c,ef(b)):(c.next=e.next,e.next=c);b.interleaved=c;return Oa(a,d)}function Oa(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);c=a;for(a=a.return;null!==a;)a.childLanes|=b,c=a.alternate,null!==c&&(c.childLanes|=b),c=a,a=a.return;return 3===c.tag?c.stateNode:null}function ff(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fh(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue=
{baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Pa(a,b){return{eventTime:a,lane:b,tag:0,payload:null,callback:null,next:null}}function fb(a,b,c){var d=a.updateQueue;if(null===d)return null;d=d.shared;if(0!==(p&2)){var e=d.pending;null===e?b.next=b:(b.next=e.next,e.next=b);d.pending=b;return kk(a,c)}e=d.interleaved;null===e?(b.next=b,ef(d)):(b.next=e.next,e.next=b);d.interleaved=b;return Oa(a,c)}function vd(a,b,c){b=
b.updateQueue;if(null!==b&&(b=b.shared,0!==(c&4194240))){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;xe(a,c)}}function Gh(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};null===f?e=f=g:f=f.next=g;c=c.next}while(null!==c);null===f?e=f=b:f=f.next=b}else e=f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,
shared:d.shared,effects:d.effects};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next=b;c.lastBaseUpdate=b}function wd(a,b,c,d){var e=a.updateQueue;gb=!1;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,n=k.next;k.next=null;null===g?f=n:g.next=n;g=k;var l=a.alternate;null!==l&&(l=l.updateQueue,h=l.lastBaseUpdate,h!==g&&(null===h?l.firstBaseUpdate=n:h.next=n,l.lastBaseUpdate=k))}if(null!==f){var m=e.baseState;g=0;l=
n=k=null;h=f;do{var r=h.lane,p=h.eventTime;if((d&r)===r){null!==l&&(l=l.next={eventTime:p,lane:0,tag:h.tag,payload:h.payload,callback:h.callback,next:null});a:{var x=a,v=h;r=b;p=c;switch(v.tag){case 1:x=v.payload;if("function"===typeof x){m=x.call(p,m,r);break a}m=x;break a;case 3:x.flags=x.flags&-65537|128;case 0:x=v.payload;r="function"===typeof x?x.call(p,m,r):x;if(null===r||void 0===r)break a;m=E({},m,r);break a;case 2:gb=!0}}null!==h.callback&&0!==h.lane&&(a.flags|=64,r=e.effects,null===r?e.effects=
[h]:r.push(h))}else p={eventTime:p,lane:r,tag:h.tag,payload:h.payload,callback:h.callback,next:null},null===l?(n=l=p,k=m):l=l.next=p,g|=r;h=h.next;if(null===h)if(h=e.shared.pending,null===h)break;else r=h,h=r.next,r.next=null,e.lastBaseUpdate=r,e.shared.pending=null}while(1);null===l&&(k=m);e.baseState=k;e.firstBaseUpdate=n;e.lastBaseUpdate=l;b=e.shared.interleaved;if(null!==b){e=b;do g|=e.lane,e=e.next;while(e!==b)}else null===f&&(e.shared.lanes=0);ra|=g;a.lanes=g;a.memoizedState=m}}function Hh(a,
b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=a[b],e=d.callback;if(null!==e){d.callback=null;d=c;if("function"!==typeof e)throw Error(m(191,e));e.call(d)}}}function ub(a){if(a===wc)throw Error(m(174));return a}function gf(a,b){y(xc,b);y(yc,a);y(Ea,wc);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:oe(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=oe(b,a)}v(Ea);y(Ea,b)}function Tb(a){v(Ea);v(yc);v(xc)}function Ih(a){ub(xc.current);
var b=ub(Ea.current);var c=oe(b,a.type);b!==c&&(y(yc,a),y(Ea,c))}function hf(a){yc.current===a&&(v(Ea),v(yc))}function xd(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||"$!"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=
b.return;b=b.sibling}return null}function jf(){for(var a=0;a<kf.length;a++)kf[a]._workInProgressVersionPrimary=null;kf.length=0}function V(){throw Error(m(321));}function lf(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!ua(a[c],b[c]))return!1;return!0}function mf(a,b,c,d,e,f){vb=f;C=b;b.memoizedState=null;b.updateQueue=null;b.lanes=0;yd.current=null===a||null===a.memoizedState?lk:mk;a=c(d,e);if(zc){f=0;do{zc=!1;Ac=0;if(25<=f)throw Error(m(301));f+=1;N=K=null;b.updateQueue=null;
yd.current=nk;a=c(d,e)}while(zc)}yd.current=zd;b=null!==K&&null!==K.next;vb=0;N=K=C=null;Ad=!1;if(b)throw Error(m(300));return a}function nf(){var a=0!==Ac;Ac=0;return a}function Fa(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===N?C.memoizedState=N=a:N=N.next=a;return N}function sa(){if(null===K){var a=C.alternate;a=null!==a?a.memoizedState:null}else a=K.next;var b=null===N?C.memoizedState:N.next;if(null!==b)N=b,K=a;else{if(null===a)throw Error(m(310));K=a;
a={memoizedState:K.memoizedState,baseState:K.baseState,baseQueue:K.baseQueue,queue:K.queue,next:null};null===N?C.memoizedState=N=a:N=N.next=a}return N}function Bc(a,b){return"function"===typeof b?b(a):b}function of(a,b,c){b=sa();c=b.queue;if(null===c)throw Error(m(311));c.lastRenderedReducer=a;var d=K,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){f=e.next;d=d.baseState;var h=g=null,k=null,n=f;do{var l=n.lane;if((vb&
l)===l)null!==k&&(k=k.next={lane:0,action:n.action,hasEagerState:n.hasEagerState,eagerState:n.eagerState,next:null}),d=n.hasEagerState?n.eagerState:a(d,n.action);else{var u={lane:l,action:n.action,hasEagerState:n.hasEagerState,eagerState:n.eagerState,next:null};null===k?(h=k=u,g=d):k=k.next=u;C.lanes|=l;ra|=l}n=n.next}while(null!==n&&n!==f);null===k?g=d:k.next=h;ua(d,b.memoizedState)||(ha=!0);b.memoizedState=d;b.baseState=g;b.baseQueue=k;c.lastRenderedState=d}a=c.interleaved;if(null!==a){e=a;do f=
e.lane,C.lanes|=f,ra|=f,e=e.next;while(e!==a)}else null===e&&(c.lanes=0);return[b.memoizedState,c.dispatch]}function pf(a,b,c){b=sa();c=b.queue;if(null===c)throw Error(m(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);ua(f,b.memoizedState)||(ha=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}function Jh(a,b,c){}function Kh(a,b,c){c=C;var d=sa(),
e=b(),f=!ua(d.memoizedState,e);f&&(d.memoizedState=e,ha=!0);d=d.queue;qf(Lh.bind(null,c,d,a),[a]);if(d.getSnapshot!==b||f||null!==N&&N.memoizedState.tag&1){c.flags|=2048;Cc(9,Mh.bind(null,c,d,e,b),void 0,null);if(null===O)throw Error(m(349));0!==(vb&30)||Nh(c,b,e)}return e}function Nh(a,b,c){a.flags|=16384;a={getSnapshot:b,value:c};b=C.updateQueue;null===b?(b={lastEffect:null,stores:null},C.updateQueue=b,b.stores=[a]):(c=b.stores,null===c?b.stores=[a]:c.push(a))}function Mh(a,b,c,d){b.value=c;b.getSnapshot=
d;Oh(b)&&Ph(a)}function Lh(a,b,c){return c(function(){Oh(b)&&Ph(a)})}function Oh(a){var b=a.getSnapshot;a=a.value;try{var c=b();return!ua(a,c)}catch(d){return!0}}function Ph(a){var b=Oa(a,1);null!==b&&xa(b,a,1,-1)}function Qh(a){var b=Fa();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Bc,lastRenderedState:a};b.queue=a;a=a.dispatch=ok.bind(null,C,a);return[b.memoizedState,a]}function Cc(a,b,c,d){a={tag:a,create:b,
destroy:c,deps:d,next:null};b=C.updateQueue;null===b?(b={lastEffect:null,stores:null},C.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}function Rh(a){return sa().memoizedState}function Bd(a,b,c,d){var e=Fa();C.flags|=a;e.memoizedState=Cc(1|b,c,void 0,void 0===d?null:d)}function Cd(a,b,c,d){var e=sa();d=void 0===d?null:d;var f=void 0;if(null!==K){var g=K.memoizedState;f=g.destroy;if(null!==d&&lf(d,g.deps)){e.memoizedState=
Cc(b,c,f,d);return}}C.flags|=a;e.memoizedState=Cc(1|b,c,f,d)}function Sh(a,b){return Bd(8390656,8,a,b)}function qf(a,b){return Cd(2048,8,a,b)}function Th(a,b){return Cd(4,2,a,b)}function Uh(a,b){return Cd(4,4,a,b)}function Vh(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function Wh(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Cd(4,4,Vh.bind(null,b,a),c)}function rf(a,b){}function Xh(a,b){var c=
sa();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&lf(b,d[1]))return d[0];c.memoizedState=[a,b];return a}function Yh(a,b){var c=sa();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&lf(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}function Zh(a,b,c){if(0===(vb&21))return a.baseState&&(a.baseState=!1,ha=!0),a.memoizedState=c;ua(c,b)||(c=Dg(),C.lanes|=c,ra|=c,a.baseState=!0);return b}function pk(a,b,c){c=z;z=0!==c&&4>c?c:4;a(!0);var d=sf.transition;sf.transition=
{};try{a(!1),b()}finally{z=c,sf.transition=d}}function $h(){return sa().memoizedState}function qk(a,b,c){var d=hb(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(ai(a))bi(b,c);else if(c=Eh(a,b,c,d),null!==c){var e=Z();xa(c,a,d,e);ci(c,b,d)}}function ok(a,b,c){var d=hb(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(ai(a))bi(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,
h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(ua(h,g)){var k=b.interleaved;null===k?(e.next=e,ef(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(n){}finally{}c=Eh(a,b,e,d);null!==c&&(e=Z(),xa(c,a,d,e),ci(c,b,d))}}function ai(a){var b=a.alternate;return a===C||null!==b&&b===C}function bi(a,b){zc=Ad=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function ci(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;xe(a,c)}}function ya(a,b){if(a&&
a.defaultProps){b=E({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b}function tf(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:E({},b,c);a.memoizedState=c;0===a.lanes&&(a.updateQueue.baseState=c)}function di(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!qc(c,d)||!qc(e,f):!0}function ei(a,b,c){var d=!1,e=cb;var f=b.contextType;"object"===typeof f&&
null!==f?f=qa(f):(e=ea(b)?pb:J.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Nb(a,e):cb);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=Dd;a.stateNode=b;b._reactInternals=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}function fi(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&
b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&Dd.enqueueReplaceState(b,b.state,null)}function uf(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs={};ff(a);var f=b.contextType;"object"===typeof f&&null!==f?e.context=qa(f):(f=ea(b)?pb:J.current,e.context=Nb(a,f));e.state=a.memoizedState;f=b.getDerivedStateFromProps;"function"===typeof f&&(tf(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||"function"!==
typeof e.UNSAFE_componentWillMount&&"function"!==typeof e.componentWillMount||(b=e.state,"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&Dd.enqueueReplaceState(e,e.state,null),wd(a,c,e,d),e.state=a.memoizedState);"function"===typeof e.componentDidMount&&(a.flags|=4194308)}function Ub(a,b){try{var c="",d=b;do c+=fj(d),d=d.return;while(d);var e=c}catch(f){e="\nError generating stack: "+f.message+
"\n"+f.stack}return{value:a,source:b,stack:e,digest:null}}function vf(a,b,c){return{value:a,source:null,stack:null!=c?c:null,digest:null!=b?b:null}}function wf(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}function gi(a,b,c){c=Pa(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Ed||(Ed=!0,xf=d);wf(a,b)};return c}function hi(a,b,c){c=Pa(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){return d(e)};
c.callback=function(){wf(a,b)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){wf(a,b);"function"!==typeof d&&(null===ib?ib=new Set([this]):ib.add(this));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c}function ii(a,b,c){var d=a.pingCache;if(null===d){d=a.pingCache=new rk;var e=new Set;d.set(b,e)}else e=d.get(b),void 0===e&&(e=new Set,d.set(b,e));e.has(c)||(e.add(c),a=sk.bind(null,a,b,c),b.then(a,a))}function ji(a){do{var b;
if(b=13===a.tag)b=a.memoizedState,b=null!==b?null!==b.dehydrated?!0:!1:!0;if(b)return a;a=a.return}while(null!==a);return null}function ki(a,b,c,d,e){if(0===(a.mode&1))return a===b?a.flags|=65536:(a.flags|=128,c.flags|=131072,c.flags&=-52805,1===c.tag&&(null===c.alternate?c.tag=17:(b=Pa(-1,1),b.tag=2,fb(c,b,1))),c.lanes|=1),a;a.flags|=65536;a.lanes=e;return a}function aa(a,b,c,d){b.child=null===a?li(b,null,c,d):Vb(b,a.child,c,d)}function mi(a,b,c,d,e){c=c.render;var f=b.ref;Sb(b,e);d=mf(a,b,c,d,f,
e);c=nf();if(null!==a&&!ha)return b.updateQueue=a.updateQueue,b.flags&=-2053,a.lanes&=~e,Qa(a,b,e);D&&c&&Ue(b);b.flags|=1;aa(a,b,d,e);return b.child}function ni(a,b,c,d,e){if(null===a){var f=c.type;if("function"===typeof f&&!yf(f)&&void 0===f.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=f,oi(a,b,f,d,e);a=rd(c.type,null,d,b,b.mode,e);a.ref=b.ref;a.return=b;return b.child=a}f=a.child;if(0===(a.lanes&e)){var g=f.memoizedProps;c=c.compare;c=null!==c?c:qc;if(c(g,d)&&a.ref===
b.ref)return Qa(a,b,e)}b.flags|=1;a=eb(f,d);a.ref=b.ref;a.return=b;return b.child=a}function oi(a,b,c,d,e){if(null!==a){var f=a.memoizedProps;if(qc(f,d)&&a.ref===b.ref)if(ha=!1,b.pendingProps=d=f,0!==(a.lanes&e))0!==(a.flags&131072)&&(ha=!0);else return b.lanes=a.lanes,Qa(a,b,e)}return zf(a,b,c,d,e)}function pi(a,b,c){var d=b.pendingProps,e=d.children,f=null!==a?a.memoizedState:null;if("hidden"===d.mode)if(0===(b.mode&1))b.memoizedState={baseLanes:0,cachePool:null,transitions:null},y(Ga,ba),ba|=c;
else{if(0===(c&1073741824))return a=null!==f?f.baseLanes|c:c,b.lanes=b.childLanes=1073741824,b.memoizedState={baseLanes:a,cachePool:null,transitions:null},b.updateQueue=null,y(Ga,ba),ba|=a,null;b.memoizedState={baseLanes:0,cachePool:null,transitions:null};d=null!==f?f.baseLanes:c;y(Ga,ba);ba|=d}else null!==f?(d=f.baseLanes|c,b.memoizedState=null):d=c,y(Ga,ba),ba|=d;aa(a,b,e,c);return b.child}function qi(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.flags|=512,b.flags|=2097152}function zf(a,
b,c,d,e){var f=ea(c)?pb:J.current;f=Nb(b,f);Sb(b,e);c=mf(a,b,c,d,f,e);d=nf();if(null!==a&&!ha)return b.updateQueue=a.updateQueue,b.flags&=-2053,a.lanes&=~e,Qa(a,b,e);D&&d&&Ue(b);b.flags|=1;aa(a,b,c,e);return b.child}function ri(a,b,c,d,e){if(ea(c)){var f=!0;ld(b)}else f=!1;Sb(b,e);if(null===b.stateNode)Fd(a,b),ei(b,c,d),uf(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,n=c.contextType;"object"===typeof n&&null!==n?n=qa(n):(n=ea(c)?pb:J.current,n=Nb(b,
n));var l=c.getDerivedStateFromProps,m="function"===typeof l||"function"===typeof g.getSnapshotBeforeUpdate;m||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==d||k!==n)&&fi(b,g,d,n);gb=!1;var r=b.memoizedState;g.state=r;wd(b,d,g,e);k=b.memoizedState;h!==d||r!==k||S.current||gb?("function"===typeof l&&(tf(b,c,l,d),k=b.memoizedState),(h=gb||di(b,c,h,d,r,k,n))?(m||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||
("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),"function"===typeof g.componentDidMount&&(b.flags|=4194308)):("function"===typeof g.componentDidMount&&(b.flags|=4194308),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=n,d=h):("function"===typeof g.componentDidMount&&(b.flags|=4194308),d=!1)}else{g=b.stateNode;Fh(a,b);h=b.memoizedProps;n=b.type===b.elementType?h:ya(b.type,h);g.props=
n;m=b.pendingProps;r=g.context;k=c.contextType;"object"===typeof k&&null!==k?k=qa(k):(k=ea(c)?pb:J.current,k=Nb(b,k));var p=c.getDerivedStateFromProps;(l="function"===typeof p||"function"===typeof g.getSnapshotBeforeUpdate)||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==m||r!==k)&&fi(b,g,d,k);gb=!1;r=b.memoizedState;g.state=r;wd(b,d,g,e);var x=b.memoizedState;h!==m||r!==x||S.current||gb?("function"===typeof p&&(tf(b,c,p,d),x=b.memoizedState),
(n=gb||di(b,c,n,d,r,x,k)||!1)?(l||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,x,k),"function"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,x,k)),"function"===typeof g.componentDidUpdate&&(b.flags|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.flags|=1024)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=
4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=1024),b.memoizedProps=d,b.memoizedState=x),g.props=d,g.state=x,g.context=k,d=n):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=1024),d=!1)}return Af(a,b,c,d,f,e)}function Af(a,b,c,d,e,f){qi(a,b);var g=0!==(b.flags&128);if(!d&&!g)return e&&vh(b,c,!1),
Qa(a,b,f);d=b.stateNode;tk.current=b;var h=g&&"function"!==typeof c.getDerivedStateFromError?null:d.render();b.flags|=1;null!==a&&g?(b.child=Vb(b,a.child,null,f),b.child=Vb(b,null,h,f)):aa(a,b,h,f);b.memoizedState=d.state;e&&vh(b,c,!0);return b.child}function si(a){var b=a.stateNode;b.pendingContext?th(a,b.pendingContext,b.pendingContext!==b.context):b.context&&th(a,b.context,!1);gf(a,b.containerInfo)}function ti(a,b,c,d,e){Qb();Ye(e);b.flags|=256;aa(a,b,c,d);return b.child}function Bf(a){return{baseLanes:a,
cachePool:null,transitions:null}}function ui(a,b,c){var d=b.pendingProps,e=F.current,f=!1,g=0!==(b.flags&128),h;(h=g)||(h=null!==a&&null===a.memoizedState?!1:0!==(e&2));if(h)f=!0,b.flags&=-129;else if(null===a||null!==a.memoizedState)e|=1;y(F,e&1);if(null===a){Xe(b);a=b.memoizedState;if(null!==a&&(a=a.dehydrated,null!==a))return 0===(b.mode&1)?b.lanes=1:"$!"===a.data?b.lanes=8:b.lanes=1073741824,null;g=d.children;a=d.fallback;return f?(d=b.mode,f=b.child,g={mode:"hidden",children:g},0===(d&1)&&null!==
f?(f.childLanes=0,f.pendingProps=g):f=Gd(g,d,0,null),a=sb(a,d,c,null),f.return=b,a.return=b,f.sibling=a,b.child=f,b.child.memoizedState=Bf(c),b.memoizedState=Cf,a):Df(b,g)}e=a.memoizedState;if(null!==e&&(h=e.dehydrated,null!==h))return uk(a,b,g,d,h,e,c);if(f){f=d.fallback;g=b.mode;e=a.child;h=e.sibling;var k={mode:"hidden",children:d.children};0===(g&1)&&b.child!==e?(d=b.child,d.childLanes=0,d.pendingProps=k,b.deletions=null):(d=eb(e,k),d.subtreeFlags=e.subtreeFlags&14680064);null!==h?f=eb(h,f):(f=
sb(f,g,c,null),f.flags|=2);f.return=b;d.return=b;d.sibling=f;b.child=d;d=f;f=b.child;g=a.child.memoizedState;g=null===g?Bf(c):{baseLanes:g.baseLanes|c,cachePool:null,transitions:g.transitions};f.memoizedState=g;f.childLanes=a.childLanes&~c;b.memoizedState=Cf;return d}f=a.child;a=f.sibling;d=eb(f,{mode:"visible",children:d.children});0===(b.mode&1)&&(d.lanes=c);d.return=b;d.sibling=null;null!==a&&(c=b.deletions,null===c?(b.deletions=[a],b.flags|=16):c.push(a));b.child=d;b.memoizedState=null;return d}
function Df(a,b,c){b=Gd({mode:"visible",children:b},a.mode,0,null);b.return=a;return a.child=b}function Hd(a,b,c,d){null!==d&&Ye(d);Vb(b,a.child,null,c);a=Df(b,b.pendingProps.children);a.flags|=2;b.memoizedState=null;return a}function uk(a,b,c,d,e,f,g){if(c){if(b.flags&256)return b.flags&=-257,d=vf(Error(m(422))),Hd(a,b,g,d);if(null!==b.memoizedState)return b.child=a.child,b.flags|=128,null;f=d.fallback;e=b.mode;d=Gd({mode:"visible",children:d.children},e,0,null);f=sb(f,e,g,null);f.flags|=2;d.return=
b;f.return=b;d.sibling=f;b.child=d;0!==(b.mode&1)&&Vb(b,a.child,null,g);b.child.memoizedState=Bf(g);b.memoizedState=Cf;return f}if(0===(b.mode&1))return Hd(a,b,g,null);if("$!"===e.data){d=e.nextSibling&&e.nextSibling.dataset;if(d)var h=d.dgst;d=h;f=Error(m(419));d=vf(f,d,void 0);return Hd(a,b,g,d)}h=0!==(g&a.childLanes);if(ha||h){d=O;if(null!==d){switch(g&-g){case 4:e=2;break;case 16:e=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:e=
32;break;case 536870912:e=268435456;break;default:e=0}e=0!==(e&(d.suspendedLanes|g))?0:e;0!==e&&e!==f.retryLane&&(f.retryLane=e,Oa(a,e),xa(d,a,e,-1))}Ef();d=vf(Error(m(421)));return Hd(a,b,g,d)}if("$?"===e.data)return b.flags|=128,b.child=a.child,b=vk.bind(null,a),e._reactRetry=b,null;a=f.treeContext;fa=Ka(e.nextSibling);la=b;D=!0;wa=null;null!==a&&(na[oa++]=Ma,na[oa++]=Na,na[oa++]=rb,Ma=a.id,Na=a.overflow,rb=b);b=Df(b,d.children);b.flags|=4096;return b}function vi(a,b,c){a.lanes|=b;var d=a.alternate;
null!==d&&(d.lanes|=b);df(a.return,b,c)}function Ff(a,b,c,d,e){var f=a.memoizedState;null===f?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:e}:(f.isBackwards=b,f.rendering=null,f.renderingStartTime=0,f.last=d,f.tail=c,f.tailMode=e)}function wi(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;aa(a,b,d.children,c);d=F.current;if(0!==(d&2))d=d&1|2,b.flags|=128;else{if(null!==a&&0!==(a.flags&128))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&
vi(a,c,b);else if(19===a.tag)vi(a,c,b);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}y(F,d);if(0===(b.mode&1))b.memoizedState=null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===xd(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);Ff(b,!1,e,c,f);break;case "backwards":c=
null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===xd(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}Ff(b,!0,c,null,f);break;case "together":Ff(b,!1,null,null,void 0);break;default:b.memoizedState=null}return b.child}function Fd(a,b){0===(b.mode&1)&&null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2)}function Qa(a,b,c){null!==a&&(b.dependencies=a.dependencies);ra|=b.lanes;if(0===(c&b.childLanes))return null;if(null!==a&&b.child!==a.child)throw Error(m(153));if(null!==
b.child){a=b.child;c=eb(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=eb(a,a.pendingProps),c.return=b;c.sibling=null}return b.child}function wk(a,b,c){switch(b.tag){case 3:si(b);Qb();break;case 5:Ih(b);break;case 1:ea(b.type)&&ld(b);break;case 4:gf(b,b.stateNode.containerInfo);break;case 10:var d=b.type._context,e=b.memoizedProps.value;y(ud,d._currentValue);d._currentValue=e;break;case 13:d=b.memoizedState;if(null!==d){if(null!==d.dehydrated)return y(F,F.current&
1),b.flags|=128,null;if(0!==(c&b.child.childLanes))return ui(a,b,c);y(F,F.current&1);a=Qa(a,b,c);return null!==a?a.sibling:null}y(F,F.current&1);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&128)){if(d)return wi(a,b,c);b.flags|=128}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);y(F,F.current);if(d)break;else return null;case 22:case 23:return b.lanes=0,pi(a,b,c)}return Qa(a,b,c)}function Dc(a,b){if(!D)switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==
b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}}function W(a){var b=null!==a.alternate&&a.alternate.child===a.child,c=0,d=0;if(b)for(var e=a.child;null!==e;)c|=e.lanes|e.childLanes,d|=e.subtreeFlags&14680064,d|=e.flags&14680064,e.return=a,e=e.sibling;else for(e=a.child;null!==e;)c|=e.lanes|e.childLanes,
d|=e.subtreeFlags,d|=e.flags,e.return=a,e=e.sibling;a.subtreeFlags|=d;a.childLanes=c;return b}function xk(a,b,c){var d=b.pendingProps;Ve(b);switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return W(b),null;case 1:return ea(b.type)&&(v(S),v(J)),W(b),null;case 3:d=b.stateNode;Tb();v(S);v(J);jf();d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)pd(b)?b.flags|=4:null===a||a.memoizedState.isDehydrated&&0===(b.flags&
256)||(b.flags|=1024,null!==wa&&(Gf(wa),wa=null));xi(a,b);W(b);return null;case 5:hf(b);var e=ub(xc.current);c=b.type;if(null!==a&&null!=b.stateNode)yk(a,b,c,d,e),a.ref!==b.ref&&(b.flags|=512,b.flags|=2097152);else{if(!d){if(null===b.stateNode)throw Error(m(166));W(b);return null}a=ub(Ea.current);if(pd(b)){d=b.stateNode;c=b.type;var f=b.memoizedProps;d[Da]=b;d[uc]=f;a=0!==(b.mode&1);switch(c){case "dialog":B("cancel",d);B("close",d);break;case "iframe":case "object":case "embed":B("load",d);break;
case "video":case "audio":for(e=0;e<Ec.length;e++)B(Ec[e],d);break;case "source":B("error",d);break;case "img":case "image":case "link":B("error",d);B("load",d);break;case "details":B("toggle",d);break;case "input":kg(d,f);B("invalid",d);break;case "select":d._wrapperState={wasMultiple:!!f.multiple};B("invalid",d);break;case "textarea":ng(d,f),B("invalid",d)}pe(c,f);e=null;for(var g in f)if(f.hasOwnProperty(g)){var h=f[g];"children"===g?"string"===typeof h?d.textContent!==h&&(!0!==f.suppressHydrationWarning&&
jd(d.textContent,h,a),e=["children",h]):"number"===typeof h&&d.textContent!==""+h&&(!0!==f.suppressHydrationWarning&&jd(d.textContent,h,a),e=["children",""+h]):$b.hasOwnProperty(g)&&null!=h&&"onScroll"===g&&B("scroll",d)}switch(c){case "input":Pc(d);mg(d,f,!0);break;case "textarea":Pc(d);pg(d);break;case "select":case "option":break;default:"function"===typeof f.onClick&&(d.onclick=kd)}d=e;b.updateQueue=d;null!==d&&(b.flags|=4)}else{g=9===e.nodeType?e:e.ownerDocument;"http://www.w3.org/1999/xhtml"===
a&&(a=qg(c));"http://www.w3.org/1999/xhtml"===a?"script"===c?(a=g.createElement("div"),a.innerHTML="<script>\x3c/script>",a=a.removeChild(a.firstChild)):"string"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),"select"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Da]=b;a[uc]=d;zk(a,b,!1,!1);b.stateNode=a;a:{g=qe(c,d);switch(c){case "dialog":B("cancel",a);B("close",a);e=d;break;case "iframe":case "object":case "embed":B("load",a);e=d;break;
case "video":case "audio":for(e=0;e<Ec.length;e++)B(Ec[e],a);e=d;break;case "source":B("error",a);e=d;break;case "img":case "image":case "link":B("error",a);B("load",a);e=d;break;case "details":B("toggle",a);e=d;break;case "input":kg(a,d);e=ke(a,d);B("invalid",a);break;case "option":e=d;break;case "select":a._wrapperState={wasMultiple:!!d.multiple};e=E({},d,{value:void 0});B("invalid",a);break;case "textarea":ng(a,d);e=ne(a,d);B("invalid",a);break;default:e=d}pe(c,e);h=e;for(f in h)if(h.hasOwnProperty(f)){var k=
h[f];"style"===f?sg(a,k):"dangerouslySetInnerHTML"===f?(k=k?k.__html:void 0,null!=k&&yi(a,k)):"children"===f?"string"===typeof k?("textarea"!==c||""!==k)&&Fc(a,k):"number"===typeof k&&Fc(a,""+k):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&($b.hasOwnProperty(f)?null!=k&&"onScroll"===f&&B("scroll",a):null!=k&&$d(a,f,k,g))}switch(c){case "input":Pc(a);mg(a,d,!1);break;case "textarea":Pc(a);pg(a);break;case "option":null!=d.value&&a.setAttribute("value",""+Ua(d.value));
break;case "select":a.multiple=!!d.multiple;f=d.value;null!=f?Db(a,!!d.multiple,f,!1):null!=d.defaultValue&&Db(a,!!d.multiple,d.defaultValue,!0);break;default:"function"===typeof e.onClick&&(a.onclick=kd)}switch(c){case "button":case "input":case "select":case "textarea":d=!!d.autoFocus;break a;case "img":d=!0;break a;default:d=!1}}d&&(b.flags|=4)}null!==b.ref&&(b.flags|=512,b.flags|=2097152)}W(b);return null;case 6:if(a&&null!=b.stateNode)Ak(a,b,a.memoizedProps,d);else{if("string"!==typeof d&&null===
b.stateNode)throw Error(m(166));c=ub(xc.current);ub(Ea.current);if(pd(b)){d=b.stateNode;c=b.memoizedProps;d[Da]=b;if(f=d.nodeValue!==c)if(a=la,null!==a)switch(a.tag){case 3:jd(d.nodeValue,c,0!==(a.mode&1));break;case 5:!0!==a.memoizedProps.suppressHydrationWarning&&jd(d.nodeValue,c,0!==(a.mode&1))}f&&(b.flags|=4)}else d=(9===c.nodeType?c:c.ownerDocument).createTextNode(d),d[Da]=b,b.stateNode=d}W(b);return null;case 13:v(F);d=b.memoizedState;if(null===a||null!==a.memoizedState&&null!==a.memoizedState.dehydrated){if(D&&
null!==fa&&0!==(b.mode&1)&&0===(b.flags&128)){for(f=fa;f;)f=Ka(f.nextSibling);Qb();b.flags|=98560;f=!1}else if(f=pd(b),null!==d&&null!==d.dehydrated){if(null===a){if(!f)throw Error(m(318));f=b.memoizedState;f=null!==f?f.dehydrated:null;if(!f)throw Error(m(317));f[Da]=b}else Qb(),0===(b.flags&128)&&(b.memoizedState=null),b.flags|=4;W(b);f=!1}else null!==wa&&(Gf(wa),wa=null),f=!0;if(!f)return b.flags&65536?b:null}if(0!==(b.flags&128))return b.lanes=c,b;d=null!==d;d!==(null!==a&&null!==a.memoizedState)&&
d&&(b.child.flags|=8192,0!==(b.mode&1)&&(null===a||0!==(F.current&1)?0===L&&(L=3):Ef()));null!==b.updateQueue&&(b.flags|=4);W(b);return null;case 4:return Tb(),xi(a,b),null===a&&sc(b.stateNode.containerInfo),W(b),null;case 10:return cf(b.type._context),W(b),null;case 17:return ea(b.type)&&(v(S),v(J)),W(b),null;case 19:v(F);f=b.memoizedState;if(null===f)return W(b),null;d=0!==(b.flags&128);g=f.rendering;if(null===g)if(d)Dc(f,!1);else{if(0!==L||null!==a&&0!==(a.flags&128))for(a=b.child;null!==a;){g=
xd(a);if(null!==g){b.flags|=128;Dc(f,!1);d=g.updateQueue;null!==d&&(b.updateQueue=d,b.flags|=4);b.subtreeFlags=0;d=c;for(c=b.child;null!==c;)f=c,a=d,f.flags&=14680066,g=f.alternate,null===g?(f.childLanes=0,f.lanes=a,f.child=null,f.subtreeFlags=0,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=g.childLanes,f.lanes=g.lanes,f.child=g.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=g.memoizedProps,f.memoizedState=g.memoizedState,
f.updateQueue=g.updateQueue,f.type=g.type,a=g.dependencies,f.dependencies=null===a?null:{lanes:a.lanes,firstContext:a.firstContext}),c=c.sibling;y(F,F.current&1|2);return b.child}a=a.sibling}null!==f.tail&&P()>Hf&&(b.flags|=128,d=!0,Dc(f,!1),b.lanes=4194304)}else{if(!d)if(a=xd(g),null!==a){if(b.flags|=128,d=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Dc(f,!0),null===f.tail&&"hidden"===f.tailMode&&!g.alternate&&!D)return W(b),null}else 2*P()-f.renderingStartTime>Hf&&1073741824!==c&&(b.flags|=
128,d=!0,Dc(f,!1),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g)}if(null!==f.tail)return b=f.tail,f.rendering=b,f.tail=b.sibling,f.renderingStartTime=P(),b.sibling=null,c=F.current,y(F,d?c&1|2:c&1),b;W(b);return null;case 22:case 23:return ba=Ga.current,v(Ga),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(ba&1073741824)&&(W(b),b.subtreeFlags&6&&(b.flags|=8192)):W(b),null;case 24:return null;
case 25:return null}throw Error(m(156,b.tag));}function Bk(a,b,c){Ve(b);switch(b.tag){case 1:return ea(b.type)&&(v(S),v(J)),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return Tb(),v(S),v(J),jf(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return hf(b),null;case 13:v(F);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(m(340));Qb()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return v(F),null;case 4:return Tb(),
null;case 10:return cf(b.type._context),null;case 22:case 23:return ba=Ga.current,v(Ga),null;case 24:return null;default:return null}}function Wb(a,b){var c=a.ref;if(null!==c)if("function"===typeof c)try{c(null)}catch(d){G(a,b,d)}else c.current=null}function If(a,b,c){try{c()}catch(d){G(a,b,d)}}function Ck(a,b){Jf=Zc;a=ch();if(Ie(a)){if("selectionStart"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();
if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(M){c=null;break a}var g=0,h=-1,k=-1,n=0,q=0,u=a,r=null;b:for(;;){for(var p;;){u!==c||0!==e&&3!==u.nodeType||(h=g+e);u!==f||0!==d&&3!==u.nodeType||(k=g+d);3===u.nodeType&&(g+=u.nodeValue.length);if(null===(p=u.firstChild))break;r=u;u=p}for(;;){if(u===a)break b;r===c&&++n===e&&(h=g);r===f&&++q===d&&(k=g);if(null!==(p=u.nextSibling))break;u=r;r=u.parentNode}u=p}c=-1===h||-1===k?null:
{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Kf={focusedElem:a,selectionRange:c};Zc=!1;for(l=b;null!==l;)if(b=l,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,l=a;else for(;null!==l;){b=l;try{var x=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break;case 1:if(null!==x){var v=x.memoizedProps,z=x.memoizedState,w=b.stateNode,A=w.getSnapshotBeforeUpdate(b.elementType===b.type?v:ya(b.type,v),z);w.__reactInternalSnapshotBeforeUpdate=A}break;case 3:var t=
b.stateNode.containerInfo;1===t.nodeType?t.textContent="":9===t.nodeType&&t.documentElement&&t.removeChild(t.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(m(163));}}catch(M){G(b,b.return,M)}a=b.sibling;if(null!==a){a.return=b.return;l=a;break}l=b.return}x=zi;zi=!1;return x}function Gc(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&If(b,c,f)}e=e.next}while(e!==d)}}
function Id(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function Lf(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}"function"===typeof b?b(a):b.current=a}}function Ai(a){var b=a.alternate;null!==b&&(a.alternate=null,Ai(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Da],delete b[uc],delete b[Me],delete b[Dk],
delete b[Ek]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Bi(a){return 5===a.tag||3===a.tag||4===a.tag}function Ci(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Bi(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&
2))return a.stateNode}}function Mf(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=kd));else if(4!==d&&(a=a.child,null!==a))for(Mf(a,b,c),a=a.sibling;null!==a;)Mf(a,b,c),a=a.sibling}function Nf(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);
else if(4!==d&&(a=a.child,null!==a))for(Nf(a,b,c),a=a.sibling;null!==a;)Nf(a,b,c),a=a.sibling}function jb(a,b,c){for(c=c.child;null!==c;)Di(a,b,c),c=c.sibling}function Di(a,b,c){if(Ca&&"function"===typeof Ca.onCommitFiberUnmount)try{Ca.onCommitFiberUnmount(Uc,c)}catch(h){}switch(c.tag){case 5:X||Wb(c,b);case 6:var d=T,e=za;T=null;jb(a,b,c);T=d;za=e;null!==T&&(za?(a=T,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):T.removeChild(c.stateNode));break;case 18:null!==T&&(za?
(a=T,c=c.stateNode,8===a.nodeType?Re(a.parentNode,c):1===a.nodeType&&Re(a,c),nc(a)):Re(T,c.stateNode));break;case 4:d=T;e=za;T=c.stateNode.containerInfo;za=!0;jb(a,b,c);T=d;za=e;break;case 0:case 11:case 14:case 15:if(!X&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?If(c,b,g):0!==(f&4)&&If(c,b,g));e=e.next}while(e!==d)}jb(a,b,c);break;case 1:if(!X&&(Wb(c,b),d=c.stateNode,"function"===typeof d.componentWillUnmount))try{d.props=
c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){G(c,b,h)}jb(a,b,c);break;case 21:jb(a,b,c);break;case 22:c.mode&1?(X=(d=X)||null!==c.memoizedState,jb(a,b,c),X=d):jb(a,b,c);break;default:jb(a,b,c)}}function Ei(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Fk);b.forEach(function(b){var d=Gk.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}function Aa(a,b,c){c=b.deletions;if(null!==c)for(var d=0;d<c.length;d++){var e=
c[d];try{var f=a,g=b,h=g;a:for(;null!==h;){switch(h.tag){case 5:T=h.stateNode;za=!1;break a;case 3:T=h.stateNode.containerInfo;za=!0;break a;case 4:T=h.stateNode.containerInfo;za=!0;break a}h=h.return}if(null===T)throw Error(m(160));Di(f,g,e);T=null;za=!1;var k=e.alternate;null!==k&&(k.return=null);e.return=null}catch(n){G(e,b,n)}}if(b.subtreeFlags&12854)for(b=b.child;null!==b;)Fi(b,a),b=b.sibling}function Fi(a,b,c){var d=a.alternate;c=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Aa(b,a);
Ha(a);if(c&4){try{Gc(3,a,a.return),Id(3,a)}catch(I){G(a,a.return,I)}try{Gc(5,a,a.return)}catch(I){G(a,a.return,I)}}break;case 1:Aa(b,a);Ha(a);c&512&&null!==d&&Wb(d,d.return);break;case 5:Aa(b,a);Ha(a);c&512&&null!==d&&Wb(d,d.return);if(a.flags&32){var e=a.stateNode;try{Fc(e,"")}catch(I){G(a,a.return,I)}}if(c&4&&(e=a.stateNode,null!=e)){var f=a.memoizedProps,g=null!==d?d.memoizedProps:f,h=a.type,k=a.updateQueue;a.updateQueue=null;if(null!==k)try{"input"===h&&"radio"===f.type&&null!=f.name&&lg(e,f);
qe(h,g);var n=qe(h,f);for(g=0;g<k.length;g+=2){var q=k[g],u=k[g+1];"style"===q?sg(e,u):"dangerouslySetInnerHTML"===q?yi(e,u):"children"===q?Fc(e,u):$d(e,q,u,n)}switch(h){case "input":le(e,f);break;case "textarea":og(e,f);break;case "select":var r=e._wrapperState.wasMultiple;e._wrapperState.wasMultiple=!!f.multiple;var p=f.value;null!=p?Db(e,!!f.multiple,p,!1):r!==!!f.multiple&&(null!=f.defaultValue?Db(e,!!f.multiple,f.defaultValue,!0):Db(e,!!f.multiple,f.multiple?[]:"",!1))}e[uc]=f}catch(I){G(a,a.return,
I)}}break;case 6:Aa(b,a);Ha(a);if(c&4){if(null===a.stateNode)throw Error(m(162));e=a.stateNode;f=a.memoizedProps;try{e.nodeValue=f}catch(I){G(a,a.return,I)}}break;case 3:Aa(b,a);Ha(a);if(c&4&&null!==d&&d.memoizedState.isDehydrated)try{nc(b.containerInfo)}catch(I){G(a,a.return,I)}break;case 4:Aa(b,a);Ha(a);break;case 13:Aa(b,a);Ha(a);e=a.child;e.flags&8192&&(f=null!==e.memoizedState,e.stateNode.isHidden=f,!f||null!==e.alternate&&null!==e.alternate.memoizedState||(Of=P()));c&4&&Ei(a);break;case 22:q=
null!==d&&null!==d.memoizedState;a.mode&1?(X=(n=X)||q,Aa(b,a),X=n):Aa(b,a);Ha(a);if(c&8192){n=null!==a.memoizedState;if((a.stateNode.isHidden=n)&&!q&&0!==(a.mode&1))for(l=a,q=a.child;null!==q;){for(u=l=q;null!==l;){r=l;p=r.child;switch(r.tag){case 0:case 11:case 14:case 15:Gc(4,r,r.return);break;case 1:Wb(r,r.return);var x=r.stateNode;if("function"===typeof x.componentWillUnmount){c=r;b=r.return;try{d=c,x.props=d.memoizedProps,x.state=d.memoizedState,x.componentWillUnmount()}catch(I){G(c,b,I)}}break;
case 5:Wb(r,r.return);break;case 22:if(null!==r.memoizedState){Gi(u);continue}}null!==p?(p.return=r,l=p):Gi(u)}q=q.sibling}a:for(q=null,u=a;;){if(5===u.tag){if(null===q){q=u;try{e=u.stateNode,n?(f=e.style,"function"===typeof f.setProperty?f.setProperty("display","none","important"):f.display="none"):(h=u.stateNode,k=u.memoizedProps.style,g=void 0!==k&&null!==k&&k.hasOwnProperty("display")?k.display:null,h.style.display=rg("display",g))}catch(I){G(a,a.return,I)}}}else if(6===u.tag){if(null===q)try{u.stateNode.nodeValue=
n?"":u.memoizedProps}catch(I){G(a,a.return,I)}}else if((22!==u.tag&&23!==u.tag||null===u.memoizedState||u===a)&&null!==u.child){u.child.return=u;u=u.child;continue}if(u===a)break a;for(;null===u.sibling;){if(null===u.return||u.return===a)break a;q===u&&(q=null);u=u.return}q===u&&(q=null);u.sibling.return=u.return;u=u.sibling}}break;case 19:Aa(b,a);Ha(a);c&4&&Ei(a);break;case 21:break;default:Aa(b,a),Ha(a)}}function Ha(a){var b=a.flags;if(b&2){try{a:{for(var c=a.return;null!==c;){if(Bi(c)){var d=c;
break a}c=c.return}throw Error(m(160));}switch(d.tag){case 5:var e=d.stateNode;d.flags&32&&(Fc(e,""),d.flags&=-33);var f=Ci(a);Nf(a,f,e);break;case 3:case 4:var g=d.stateNode.containerInfo,h=Ci(a);Mf(a,h,g);break;default:throw Error(m(161));}}catch(k){G(a,a.return,k)}a.flags&=-3}b&4096&&(a.flags&=-4097)}function Hk(a,b,c){l=a;Hi(a,b,c)}function Hi(a,b,c){for(var d=0!==(a.mode&1);null!==l;){var e=l,f=e.child;if(22===e.tag&&d){var g=null!==e.memoizedState||Jd;if(!g){var h=e.alternate,k=null!==h&&null!==
h.memoizedState||X;h=Jd;var n=X;Jd=g;if((X=k)&&!n)for(l=e;null!==l;)g=l,k=g.child,22===g.tag&&null!==g.memoizedState?Ii(e):null!==k?(k.return=g,l=k):Ii(e);for(;null!==f;)l=f,Hi(f,b,c),f=f.sibling;l=e;Jd=h;X=n}Ji(a,b,c)}else 0!==(e.subtreeFlags&8772)&&null!==f?(f.return=e,l=f):Ji(a,b,c)}}function Ji(a,b,c){for(;null!==l;){b=l;if(0!==(b.flags&8772)){c=b.alternate;try{if(0!==(b.flags&8772))switch(b.tag){case 0:case 11:case 15:X||Id(5,b);break;case 1:var d=b.stateNode;if(b.flags&4&&!X)if(null===c)d.componentDidMount();
else{var e=b.elementType===b.type?c.memoizedProps:ya(b.type,c.memoizedProps);d.componentDidUpdate(e,c.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var f=b.updateQueue;null!==f&&Hh(b,f,d);break;case 3:var g=b.updateQueue;if(null!==g){c=null;if(null!==b.child)switch(b.child.tag){case 5:c=b.child.stateNode;break;case 1:c=b.child.stateNode}Hh(b,g,c)}break;case 5:var h=b.stateNode;if(null===c&&b.flags&4){c=h;var k=b.memoizedProps;switch(b.type){case "button":case "input":case "select":case "textarea":k.autoFocus&&
c.focus();break;case "img":k.src&&(c.src=k.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(null===b.memoizedState){var n=b.alternate;if(null!==n){var q=n.memoizedState;if(null!==q){var p=q.dehydrated;null!==p&&nc(p)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(m(163));}X||b.flags&512&&Lf(b)}catch(r){G(b,b.return,r)}}if(b===a){l=null;break}c=b.sibling;if(null!==c){c.return=b.return;l=c;break}l=b.return}}function Gi(a){for(;null!==l;){var b=l;if(b===
a){l=null;break}var c=b.sibling;if(null!==c){c.return=b.return;l=c;break}l=b.return}}function Ii(a){for(;null!==l;){var b=l;try{switch(b.tag){case 0:case 11:case 15:var c=b.return;try{Id(4,b)}catch(k){G(b,c,k)}break;case 1:var d=b.stateNode;if("function"===typeof d.componentDidMount){var e=b.return;try{d.componentDidMount()}catch(k){G(b,e,k)}}var f=b.return;try{Lf(b)}catch(k){G(b,f,k)}break;case 5:var g=b.return;try{Lf(b)}catch(k){G(b,g,k)}}}catch(k){G(b,b.return,k)}if(b===a){l=null;break}var h=b.sibling;
if(null!==h){h.return=b.return;l=h;break}l=b.return}}function Hc(){Hf=P()+500}function Z(){return 0!==(p&6)?P():-1!==Kd?Kd:Kd=P()}function hb(a){if(0===(a.mode&1))return 1;if(0!==(p&2)&&0!==U)return U&-U;if(null!==Ik.transition)return 0===Ld&&(Ld=Dg()),Ld;a=z;if(0!==a)return a;a=window.event;a=void 0===a?16:Lg(a.type);return a}function xa(a,b,c,d){if(50<Ic)throw Ic=0,Pf=null,Error(m(185));ic(a,c,d);if(0===(p&2)||a!==O)a===O&&(0===(p&2)&&(Md|=c),4===L&&kb(a,U)),ia(a,d),1===c&&0===p&&0===(b.mode&1)&&
(Hc(),md&&db())}function ia(a,b){var c=a.callbackNode;tj(a,b);var d=Vc(a,a===O?U:0);if(0===d)null!==c&&Ki(c),a.callbackNode=null,a.callbackPriority=0;else if(b=d&-d,a.callbackPriority!==b){null!=c&&Ki(c);if(1===b)0===a.tag?jk(Li.bind(null,a)):wh(Li.bind(null,a)),Jk(function(){0===(p&6)&&db()}),c=null;else{switch(Eg(d)){case 1:c=De;break;case 4:c=Mg;break;case 16:c=ad;break;case 536870912:c=Ng;break;default:c=ad}c=Mi(c,Ni.bind(null,a))}a.callbackPriority=b;a.callbackNode=c}}function Ni(a,b){Kd=-1;
Ld=0;if(0!==(p&6))throw Error(m(327));var c=a.callbackNode;if(Xb()&&a.callbackNode!==c)return null;var d=Vc(a,a===O?U:0);if(0===d)return null;if(0!==(d&30)||0!==(d&a.expiredLanes)||b)b=Nd(a,d);else{b=d;var e=p;p|=2;var f=Oi();if(O!==a||U!==b)Ra=null,Hc(),wb(a,b);do try{Kk();break}catch(h){Pi(a,h)}while(1);af();Od.current=f;p=e;null!==H?b=0:(O=null,U=0,b=L)}if(0!==b){2===b&&(e=ve(a),0!==e&&(d=e,b=Qf(a,e)));if(1===b)throw c=Jc,wb(a,0),kb(a,d),ia(a,P()),c;if(6===b)kb(a,d);else{e=a.current.alternate;
if(0===(d&30)&&!Lk(e)&&(b=Nd(a,d),2===b&&(f=ve(a),0!==f&&(d=f,b=Qf(a,f))),1===b))throw c=Jc,wb(a,0),kb(a,d),ia(a,P()),c;a.finishedWork=e;a.finishedLanes=d;switch(b){case 0:case 1:throw Error(m(345));case 2:xb(a,ja,Ra);break;case 3:kb(a,d);if((d&130023424)===d&&(b=Of+500-P(),10<b)){if(0!==Vc(a,0))break;e=a.suspendedLanes;if((e&d)!==d){Z();a.pingedLanes|=a.suspendedLanes&e;break}a.timeoutHandle=Rf(xb.bind(null,a,ja,Ra),b);break}xb(a,ja,Ra);break;case 4:kb(a,d);if((d&4194240)===d)break;b=a.eventTimes;
for(e=-1;0<d;){var g=31-ta(d);f=1<<g;g=b[g];g>e&&(e=g);d&=~f}d=e;d=P()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*Mk(d/1960))-d;if(10<d){a.timeoutHandle=Rf(xb.bind(null,a,ja,Ra),d);break}xb(a,ja,Ra);break;case 5:xb(a,ja,Ra);break;default:throw Error(m(329));}}}ia(a,P());return a.callbackNode===c?Ni.bind(null,a):null}function Qf(a,b){var c=Kc;a.current.memoizedState.isDehydrated&&(wb(a,b).flags|=256);a=Nd(a,b);2!==a&&(b=ja,ja=c,null!==b&&Gf(b));return a}function Gf(a){null===
ja?ja=a:ja.push.apply(ja,a)}function Lk(a){for(var b=a;;){if(b.flags&16384){var c=b.updateQueue;if(null!==c&&(c=c.stores,null!==c))for(var d=0;d<c.length;d++){var e=c[d],f=e.getSnapshot;e=e.value;try{if(!ua(f(),e))return!1}catch(g){return!1}}}c=b.child;if(b.subtreeFlags&16384&&null!==c)c.return=b,b=c;else{if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return!0;b=b.return}b.sibling.return=b.return;b=b.sibling}}return!0}function kb(a,b){b&=~Sf;b&=~Md;a.suspendedLanes|=b;a.pingedLanes&=
~b;for(a=a.expirationTimes;0<b;){var c=31-ta(b),d=1<<c;a[c]=-1;b&=~d}}function Li(a){if(0!==(p&6))throw Error(m(327));Xb();var b=Vc(a,0);if(0===(b&1))return ia(a,P()),null;var c=Nd(a,b);if(0!==a.tag&&2===c){var d=ve(a);0!==d&&(b=d,c=Qf(a,d))}if(1===c)throw c=Jc,wb(a,0),kb(a,b),ia(a,P()),c;if(6===c)throw Error(m(345));a.finishedWork=a.current.alternate;a.finishedLanes=b;xb(a,ja,Ra);ia(a,P());return null}function Tf(a,b){var c=p;p|=1;try{return a(b)}finally{p=c,0===p&&(Hc(),md&&db())}}function yb(a){null!==
lb&&0===lb.tag&&0===(p&6)&&Xb();var b=p;p|=1;var c=ca.transition,d=z;try{if(ca.transition=null,z=1,a)return a()}finally{z=d,ca.transition=c,p=b,0===(p&6)&&db()}}function wb(a,b){a.finishedWork=null;a.finishedLanes=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,Nk(c));if(null!==H)for(c=H.return;null!==c;){var d=c;Ve(d);switch(d.tag){case 1:d=d.type.childContextTypes;null!==d&&void 0!==d&&(v(S),v(J));break;case 3:Tb();v(S);v(J);jf();break;case 5:hf(d);break;case 4:Tb();break;case 13:v(F);break;
case 19:v(F);break;case 10:cf(d.type._context);break;case 22:case 23:ba=Ga.current,v(Ga)}c=c.return}O=a;H=a=eb(a.current,null);U=ba=b;L=0;Jc=null;Sf=Md=ra=0;ja=Kc=null;if(null!==tb){for(b=0;b<tb.length;b++)if(c=tb[b],d=c.interleaved,null!==d){c.interleaved=null;var e=d.next,f=c.pending;if(null!==f){var g=f.next;f.next=e;d.next=g}c.pending=d}tb=null}return a}function Pi(a,b){do{var c=H;try{af();yd.current=zd;if(Ad){for(var d=C.memoizedState;null!==d;){var e=d.queue;null!==e&&(e.pending=null);d=d.next}Ad=
!1}vb=0;N=K=C=null;zc=!1;Ac=0;Uf.current=null;if(null===c||null===c.return){L=1;Jc=b;H=null;break}a:{var f=a,g=c.return,h=c,k=b;b=U;h.flags|=32768;if(null!==k&&"object"===typeof k&&"function"===typeof k.then){var n=k,l=h,p=l.tag;if(0===(l.mode&1)&&(0===p||11===p||15===p)){var r=l.alternate;r?(l.updateQueue=r.updateQueue,l.memoizedState=r.memoizedState,l.lanes=r.lanes):(l.updateQueue=null,l.memoizedState=null)}var v=ji(g);if(null!==v){v.flags&=-257;ki(v,g,h,f,b);v.mode&1&&ii(f,n,b);b=v;k=n;var x=b.updateQueue;
if(null===x){var z=new Set;z.add(k);b.updateQueue=z}else x.add(k);break a}else{if(0===(b&1)){ii(f,n,b);Ef();break a}k=Error(m(426))}}else if(D&&h.mode&1){var y=ji(g);if(null!==y){0===(y.flags&65536)&&(y.flags|=256);ki(y,g,h,f,b);Ye(Ub(k,h));break a}}f=k=Ub(k,h);4!==L&&(L=2);null===Kc?Kc=[f]:Kc.push(f);f=g;do{switch(f.tag){case 3:f.flags|=65536;b&=-b;f.lanes|=b;var w=gi(f,k,b);Gh(f,w);break a;case 1:h=k;var A=f.type,t=f.stateNode;if(0===(f.flags&128)&&("function"===typeof A.getDerivedStateFromError||
null!==t&&"function"===typeof t.componentDidCatch&&(null===ib||!ib.has(t)))){f.flags|=65536;b&=-b;f.lanes|=b;var B=hi(f,h,b);Gh(f,B);break a}}f=f.return}while(null!==f)}Qi(c)}catch(ma){b=ma;H===c&&null!==c&&(H=c=c.return);continue}break}while(1)}function Oi(){var a=Od.current;Od.current=zd;return null===a?zd:a}function Ef(){if(0===L||3===L||2===L)L=4;null===O||0===(ra&268435455)&&0===(Md&268435455)||kb(O,U)}function Nd(a,b){var c=p;p|=2;var d=Oi();if(O!==a||U!==b)Ra=null,wb(a,b);do try{Ok();break}catch(e){Pi(a,
e)}while(1);af();p=c;Od.current=d;if(null!==H)throw Error(m(261));O=null;U=0;return L}function Ok(){for(;null!==H;)Ri(H)}function Kk(){for(;null!==H&&!Pk();)Ri(H)}function Ri(a){var b=Qk(a.alternate,a,ba);a.memoizedProps=a.pendingProps;null===b?Qi(a):H=b;Uf.current=null}function Qi(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&32768)){if(c=xk(c,b,ba),null!==c){H=c;return}}else{c=Bk(c,b);if(null!==c){c.flags&=32767;H=c;return}if(null!==a)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;
else{L=6;H=null;return}}b=b.sibling;if(null!==b){H=b;return}H=b=a}while(null!==b);0===L&&(L=5)}function xb(a,b,c){var d=z,e=ca.transition;try{ca.transition=null,z=1,Rk(a,b,c,d)}finally{ca.transition=e,z=d}return null}function Rk(a,b,c,d){do Xb();while(null!==lb);if(0!==(p&6))throw Error(m(327));c=a.finishedWork;var e=a.finishedLanes;if(null===c)return null;a.finishedWork=null;a.finishedLanes=0;if(c===a.current)throw Error(m(177));a.callbackNode=null;a.callbackPriority=0;var f=c.lanes|c.childLanes;
uj(a,f);a===O&&(H=O=null,U=0);0===(c.subtreeFlags&2064)&&0===(c.flags&2064)||Pd||(Pd=!0,Mi(ad,function(){Xb();return null}));f=0!==(c.flags&15990);if(0!==(c.subtreeFlags&15990)||f){f=ca.transition;ca.transition=null;var g=z;z=1;var h=p;p|=4;Uf.current=null;Ck(a,c);Fi(c,a);Tj(Kf);Zc=!!Jf;Kf=Jf=null;a.current=c;Hk(c,a,e);Sk();p=h;z=g;ca.transition=f}else a.current=c;Pd&&(Pd=!1,lb=a,Qd=e);f=a.pendingLanes;0===f&&(ib=null);oj(c.stateNode,d);ia(a,P());if(null!==b)for(d=a.onRecoverableError,c=0;c<b.length;c++)e=
b[c],d(e.value,{componentStack:e.stack,digest:e.digest});if(Ed)throw Ed=!1,a=xf,xf=null,a;0!==(Qd&1)&&0!==a.tag&&Xb();f=a.pendingLanes;0!==(f&1)?a===Pf?Ic++:(Ic=0,Pf=a):Ic=0;db();return null}function Xb(){if(null!==lb){var a=Eg(Qd),b=ca.transition,c=z;try{ca.transition=null;z=16>a?16:a;if(null===lb)var d=!1;else{a=lb;lb=null;Qd=0;if(0!==(p&6))throw Error(m(331));var e=p;p|=4;for(l=a.current;null!==l;){var f=l,g=f.child;if(0!==(l.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;k<h.length;k++){var n=
h[k];for(l=n;null!==l;){var q=l;switch(q.tag){case 0:case 11:case 15:Gc(8,q,f)}var u=q.child;if(null!==u)u.return=q,l=u;else for(;null!==l;){q=l;var r=q.sibling,v=q.return;Ai(q);if(q===n){l=null;break}if(null!==r){r.return=v;l=r;break}l=v}}}var x=f.alternate;if(null!==x){var y=x.child;if(null!==y){x.child=null;do{var C=y.sibling;y.sibling=null;y=C}while(null!==y)}}l=f}}if(0!==(f.subtreeFlags&2064)&&null!==g)g.return=f,l=g;else b:for(;null!==l;){f=l;if(0!==(f.flags&2048))switch(f.tag){case 0:case 11:case 15:Gc(9,
f,f.return)}var w=f.sibling;if(null!==w){w.return=f.return;l=w;break b}l=f.return}}var A=a.current;for(l=A;null!==l;){g=l;var t=g.child;if(0!==(g.subtreeFlags&2064)&&null!==t)t.return=g,l=t;else b:for(g=A;null!==l;){h=l;if(0!==(h.flags&2048))try{switch(h.tag){case 0:case 11:case 15:Id(9,h)}}catch(ma){G(h,h.return,ma)}if(h===g){l=null;break b}var B=h.sibling;if(null!==B){B.return=h.return;l=B;break b}l=h.return}}p=e;db();if(Ca&&"function"===typeof Ca.onPostCommitFiberRoot)try{Ca.onPostCommitFiberRoot(Uc,
a)}catch(ma){}d=!0}return d}finally{z=c,ca.transition=b}}return!1}function Si(a,b,c){b=Ub(c,b);b=gi(a,b,1);a=fb(a,b,1);b=Z();null!==a&&(ic(a,1,b),ia(a,b))}function G(a,b,c){if(3===a.tag)Si(a,a,c);else for(;null!==b;){if(3===b.tag){Si(b,a,c);break}else if(1===b.tag){var d=b.stateNode;if("function"===typeof b.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===ib||!ib.has(d))){a=Ub(c,a);a=hi(b,a,1);b=fb(b,a,1);a=Z();null!==b&&(ic(b,1,a),ia(b,a));break}}b=b.return}}function sk(a,
b,c){var d=a.pingCache;null!==d&&d.delete(b);b=Z();a.pingedLanes|=a.suspendedLanes&c;O===a&&(U&c)===c&&(4===L||3===L&&(U&130023424)===U&&500>P()-Of?wb(a,0):Sf|=c);ia(a,b)}function Ti(a,b){0===b&&(0===(a.mode&1)?b=1:(b=Rd,Rd<<=1,0===(Rd&130023424)&&(Rd=4194304)));var c=Z();a=Oa(a,b);null!==a&&(ic(a,b,c),ia(a,c))}function vk(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Ti(a,c)}function Gk(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);
break;case 19:d=a.stateNode;break;default:throw Error(m(314));}null!==d&&d.delete(b);Ti(a,c)}function Mi(a,b){return xh(a,b)}function Tk(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function yf(a){a=
a.prototype;return!(!a||!a.isReactComponent)}function Uk(a){if("function"===typeof a)return yf(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===ie)return 11;if(a===je)return 14}return 2}function eb(a,b){var c=a.alternate;null===c?(c=pa(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=
a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}function rd(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)yf(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case Bb:return sb(c.children,e,f,b);case fe:g=8;e|=8;break;case ee:return a=pa(12,c,b,e|2),a.elementType=ee,a.lanes=f,a;case ge:return a=
pa(13,c,b,e),a.elementType=ge,a.lanes=f,a;case he:return a=pa(19,c,b,e),a.elementType=he,a.lanes=f,a;case Ui:return Gd(c,e,f,b);default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case hg:g=10;break a;case gg:g=9;break a;case ie:g=11;break a;case je:g=14;break a;case Ta:g=16;d=null;break a}throw Error(m(130,null==a?a:typeof a,""));}b=pa(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function sb(a,b,c,d){a=pa(7,a,d,b);a.lanes=c;return a}function Gd(a,b,c,d){a=pa(22,a,d,b);a.elementType=
Ui;a.lanes=c;a.stateNode={isHidden:!1};return a}function Ze(a,b,c){a=pa(6,a,null,b);a.lanes=c;return a}function $e(a,b,c){b=pa(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}function Vk(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=
0;this.eventTimes=we(0);this.expirationTimes=we(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=we(0);this.identifierPrefix=d;this.onRecoverableError=e;this.mutableSourceEagerHydrationData=null}function Vf(a,b,c,d,e,f,g,h,k,l){a=new Vk(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=pa(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,
pendingSuspenseBoundaries:null};ff(f);return a}function Wk(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Cb,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}function Vi(a){if(!a)return cb;a=a._reactInternals;a:{if(nb(a)!==a||1!==a.tag)throw Error(m(170));var b=a;do{switch(b.tag){case 3:b=b.stateNode.context;break a;case 1:if(ea(b.type)){b=b.stateNode.__reactInternalMemoizedMergedChildContext;break a}}b=b.return}while(null!==b);throw Error(m(171));
}if(1===a.tag){var c=a.type;if(ea(c))return uh(a,c,b)}return b}function Wi(a,b,c,d,e,f,g,h,k,l){a=Vf(c,d,!0,a,e,f,g,h,k);a.context=Vi(null);c=a.current;d=Z();e=hb(c);f=Pa(d,e);f.callback=void 0!==b&&null!==b?b:null;fb(c,f,e);a.current.lanes=e;ic(a,e,d);ia(a,d);return a}function Sd(a,b,c,d){var e=b.current,f=Z(),g=hb(e);c=Vi(c);null===b.context?b.context=c:b.pendingContext=c;b=Pa(f,g);b.payload={element:a};d=void 0===d?null:d;null!==d&&(b.callback=d);a=fb(e,b,g);null!==a&&(xa(a,e,g,f),vd(a,e,g));return g}
function Td(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function Xi(a,b){a=a.memoizedState;if(null!==a&&null!==a.dehydrated){var c=a.retryLane;a.retryLane=0!==c&&c<b?c:b}}function Wf(a,b){Xi(a,b);(a=a.alternate)&&Xi(a,b)}function Xk(a){a=Bg(a);return null===a?null:a.stateNode}function Yk(a){return null}function Xf(a){this._internalRoot=a}function Ud(a){this._internalRoot=a}function Yf(a){return!(!a||1!==a.nodeType&&9!==
a.nodeType&&11!==a.nodeType)}function Vd(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}function Yi(){}function Zk(a,b,c,d,e){if(e){if("function"===typeof d){var f=d;d=function(){var a=Td(g);f.call(a)}}var g=Wi(b,d,a,0,null,!1,!1,"",Yi);a._reactRootContainer=g;a[Ja]=g.current;sc(8===a.nodeType?a.parentNode:a);yb();return g}for(;e=a.lastChild;)a.removeChild(e);if("function"===typeof d){var h=d;d=function(){var a=Td(k);
h.call(a)}}var k=Vf(a,0,!1,null,null,!1,!1,"",Yi);a._reactRootContainer=k;a[Ja]=k.current;sc(8===a.nodeType?a.parentNode:a);yb(function(){Sd(b,k,c,d)});return k}function Wd(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f;if("function"===typeof e){var h=e;e=function(){var a=Td(g);h.call(a)}}Sd(b,g,a,e)}else g=Zk(c,b,a,e,d);return Td(g)}var cg=new Set,$b={},Ia=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),Zd=Object.prototype.hasOwnProperty,
cj=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,eg={},dg={},R={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){R[a]=
new Y(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];R[b]=new Y(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){R[a]=new Y(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){R[a]=new Y(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){R[a]=
new Y(a,3,!1,a.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(a){R[a]=new Y(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){R[a]=new Y(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){R[a]=new Y(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){R[a]=new Y(a,5,!1,a.toLowerCase(),null,!1,!1)});var Zf=/[\-:]([a-z])/g,$f=function(a){return a[1].toUpperCase()};"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=
a.replace(Zf,$f);R[b]=new Y(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(Zf,$f);R[b]=new Y(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(Zf,$f);R[b]=new Y(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){R[a]=new Y(a,1,!1,a.toLowerCase(),null,!1,!1)});R.xlinkHref=new Y("xlinkHref",
1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){R[a]=new Y(a,1,!1,a.toLowerCase(),null,!0,!0)});var Sa=zb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,sd=Symbol.for("react.element"),Cb=Symbol.for("react.portal"),Bb=Symbol.for("react.fragment"),fe=Symbol.for("react.strict_mode"),ee=Symbol.for("react.profiler"),hg=Symbol.for("react.provider"),gg=Symbol.for("react.context"),ie=Symbol.for("react.forward_ref"),ge=Symbol.for("react.suspense"),
he=Symbol.for("react.suspense_list"),je=Symbol.for("react.memo"),Ta=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var Ui=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var fg=Symbol.iterator,E=Object.assign,ae,ce=!1,cc=Array.isArray,Xd,yi=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,
c,d,e)})}:a}(function(a,b){if("http://www.w3.org/2000/svg"!==a.namespaceURI||"innerHTML"in a)a.innerHTML=b;else{Xd=Xd||document.createElement("div");Xd.innerHTML="<svg>"+b.valueOf().toString()+"</svg>";for(b=Xd.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}}),Fc=function(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b},dc={animationIterationCount:!0,aspectRatio:!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,gridArea:!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},$k=["Webkit","ms","Moz","O"];Object.keys(dc).forEach(function(a){$k.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);dc[b]=dc[a]})});var ij=E({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),ze=null,se=null,Eb=null,Fb=null,xg=function(a,b){return a(b)},yg=function(){},te=!1,Oe=!1;if(Ia)try{var Lc={};Object.defineProperty(Lc,
"passive",{get:function(){Oe=!0}});window.addEventListener("test",Lc,Lc);window.removeEventListener("test",Lc,Lc)}catch(a){Oe=!1}var kj=function(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(q){this.onError(q)}},gc=!1,Sc=null,Tc=!1,ue=null,lj={onError:function(a){gc=!0;Sc=a}},Ba=zb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler,Jg=Ba.unstable_scheduleCallback,Kg=Ba.unstable_NormalPriority,xh=Jg,Ki=Ba.unstable_cancelCallback,Pk=Ba.unstable_shouldYield,
Sk=Ba.unstable_requestPaint,P=Ba.unstable_now,Dj=Ba.unstable_getCurrentPriorityLevel,De=Ba.unstable_ImmediatePriority,Mg=Ba.unstable_UserBlockingPriority,ad=Kg,Ej=Ba.unstable_LowPriority,Ng=Ba.unstable_IdlePriority,Uc=null,Ca=null,ta=Math.clz32?Math.clz32:pj,qj=Math.log,rj=Math.LN2,Wc=64,Rd=4194304,z=0,Ae=!1,Yc=[],Va=null,Wa=null,Xa=null,jc=new Map,kc=new Map,Ya=[],Bj="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" "),
Gb=Sa.ReactCurrentBatchConfig,Zc=!0,$c=null,Za=null,Ee=null,bd=null,Yb={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},He=ka(Yb),Mc=E({},Yb,{view:0,detail:0}),ak=ka(Mc),ag,bg,Nc,Yd=E({},Mc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fe,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:
a.relatedTarget},movementX:function(a){if("movementX"in a)return a.movementX;a!==Nc&&(Nc&&"mousemove"===a.type?(ag=a.screenX-Nc.screenX,bg=a.screenY-Nc.screenY):bg=ag=0,Nc=a);return ag},movementY:function(a){return"movementY"in a?a.movementY:bg}}),ih=ka(Yd),al=E({},Yd,{dataTransfer:0}),Wj=ka(al),bl=E({},Mc,{relatedTarget:0}),Pe=ka(bl),cl=E({},Yb,{animationName:0,elapsedTime:0,pseudoElement:0}),Yj=ka(cl),dl=E({},Yb,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),
ck=ka(dl),el=E({},Yb,{data:0}),qh=ka(el),fk=qh,fl={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gl={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",
112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Gj={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},hl=E({},Mc,{key:function(a){if(a.key){var b=fl[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=cd(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?gl[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,
metaKey:0,repeat:0,locale:0,getModifierState:Fe,charCode:function(a){return"keypress"===a.type?cd(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===a.type?cd(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),Vj=ka(hl),il=E({},Yd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nh=ka(il),jl=E({},Mc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,
ctrlKey:0,shiftKey:0,getModifierState:Fe}),Xj=ka(jl),kl=E({},Yb,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zj=ka(kl),ll=E({},Yd,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),bk=ka(ll),Hj=[9,13,27,32],Ge=Ia&&"CompositionEvent"in window,Oc=null;Ia&&"documentMode"in document&&(Oc=document.documentMode);var ek=Ia&&"TextEvent"in
window&&!Oc,Ug=Ia&&(!Ge||Oc&&8<Oc&&11>=Oc),Tg=String.fromCharCode(32),Sg=!1,Hb=!1,Kj={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},oc=null,pc=null,ph=!1;Ia&&(ph=Lj("input")&&(!document.documentMode||9<document.documentMode));var ua="function"===typeof Object.is?Object.is:Sj,dk=Ia&&"documentMode"in document&&11>=document.documentMode,Jb=null,Ke=null,rc=null,Je=!1,Kb={animationend:gd("Animation","AnimationEnd"),
animationiteration:gd("Animation","AnimationIteration"),animationstart:gd("Animation","AnimationStart"),transitionend:gd("Transition","TransitionEnd")},Le={},eh={};Ia&&(eh=document.createElement("div").style,"AnimationEvent"in window||(delete Kb.animationend.animation,delete Kb.animationiteration.animation,delete Kb.animationstart.animation),"TransitionEvent"in window||delete Kb.transitionend.transition);var jh=hd("animationend"),kh=hd("animationiteration"),lh=hd("animationstart"),mh=hd("transitionend"),
fh=new Map,Zi="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");
(function(){for(var a=0;a<Zi.length;a++){var b=Zi[a],c=b.toLowerCase();b=b[0].toUpperCase()+b.slice(1);$a(c,"on"+b)}$a(jh,"onAnimationEnd");$a(kh,"onAnimationIteration");$a(lh,"onAnimationStart");$a("dblclick","onDoubleClick");$a("focusin","onFocus");$a("focusout","onBlur");$a(mh,"onTransitionEnd")})();Ab("onMouseEnter",["mouseout","mouseover"]);Ab("onMouseLeave",["mouseout","mouseover"]);Ab("onPointerEnter",["pointerout","pointerover"]);Ab("onPointerLeave",["pointerout","pointerover"]);mb("onChange",
"change click focusin focusout input keydown keyup selectionchange".split(" "));mb("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));mb("onBeforeInput",["compositionend","keypress","textInput","paste"]);mb("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));mb("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));mb("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));
var Ec="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Uj=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ec)),id="_reactListening"+Math.random().toString(36).slice(2),gk=/\r\n?/g,hk=/\u0000|\uFFFD/g,Jf=null,Kf=null,Rf="function"===typeof setTimeout?setTimeout:void 0,Nk="function"===typeof clearTimeout?
clearTimeout:void 0,$i="function"===typeof Promise?Promise:void 0,Jk="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof $i?function(a){return $i.resolve(null).then(a).catch(ik)}:Rf,Zb=Math.random().toString(36).slice(2),Da="__reactFiber$"+Zb,uc="__reactProps$"+Zb,Ja="__reactContainer$"+Zb,Me="__reactEvents$"+Zb,Dk="__reactListeners$"+Zb,Ek="__reactHandles$"+Zb,Se=[],Mb=-1,cb={},J=bb(cb),S=bb(!1),pb=cb,La=null,md=!1,Te=!1,Ob=[],Pb=0,od=null,nd=0,na=[],oa=0,rb=null,Ma=1,Na="",la=
null,fa=null,D=!1,wa=null,Ik=Sa.ReactCurrentBatchConfig,Vb=Dh(!0),li=Dh(!1),ud=bb(null),td=null,Rb=null,bf=null,tb=null,kk=Oa,gb=!1,wc={},Ea=bb(wc),yc=bb(wc),xc=bb(wc),F=bb(0),kf=[],yd=Sa.ReactCurrentDispatcher,sf=Sa.ReactCurrentBatchConfig,vb=0,C=null,K=null,N=null,Ad=!1,zc=!1,Ac=0,ml=0,zd={readContext:qa,useCallback:V,useContext:V,useEffect:V,useImperativeHandle:V,useInsertionEffect:V,useLayoutEffect:V,useMemo:V,useReducer:V,useRef:V,useState:V,useDebugValue:V,useDeferredValue:V,useTransition:V,
useMutableSource:V,useSyncExternalStore:V,useId:V,unstable_isNewReconciler:!1},lk={readContext:qa,useCallback:function(a,b){Fa().memoizedState=[a,void 0===b?null:b];return a},useContext:qa,useEffect:Sh,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Bd(4194308,4,Vh.bind(null,b,a),c)},useLayoutEffect:function(a,b){return Bd(4194308,4,a,b)},useInsertionEffect:function(a,b){return Bd(4,2,a,b)},useMemo:function(a,b){var c=Fa();b=void 0===b?null:b;a=a();c.memoizedState=
[a,b];return a},useReducer:function(a,b,c){var d=Fa();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=qk.bind(null,C,a);return[d.memoizedState,a]},useRef:function(a){var b=Fa();a={current:a};return b.memoizedState=a},useState:Qh,useDebugValue:rf,useDeferredValue:function(a){return Fa().memoizedState=a},useTransition:function(){var a=Qh(!1),b=a[0];a=pk.bind(null,a[1]);Fa().memoizedState=
a;return[b,a]},useMutableSource:function(a,b,c){},useSyncExternalStore:function(a,b,c){var d=C,e=Fa();if(D){if(void 0===c)throw Error(m(407));c=c()}else{c=b();if(null===O)throw Error(m(349));0!==(vb&30)||Nh(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;Sh(Lh.bind(null,d,f,a),[a]);d.flags|=2048;Cc(9,Mh.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=Fa(),b=O.identifierPrefix;if(D){var c=Na;var d=Ma;c=(d&~(1<<32-ta(d)-1)).toString(32)+c;b=":"+b+"R"+c;c=Ac++;0<c&&
(b+="H"+c.toString(32));b+=":"}else c=ml++,b=":"+b+"r"+c.toString(32)+":";return a.memoizedState=b},unstable_isNewReconciler:!1},mk={readContext:qa,useCallback:Xh,useContext:qa,useEffect:qf,useImperativeHandle:Wh,useInsertionEffect:Th,useLayoutEffect:Uh,useMemo:Yh,useReducer:of,useRef:Rh,useState:function(a){return of(Bc)},useDebugValue:rf,useDeferredValue:function(a){var b=sa();return Zh(b,K.memoizedState,a)},useTransition:function(){var a=of(Bc)[0],b=sa().memoizedState;return[a,b]},useMutableSource:Jh,
useSyncExternalStore:Kh,useId:$h,unstable_isNewReconciler:!1},nk={readContext:qa,useCallback:Xh,useContext:qa,useEffect:qf,useImperativeHandle:Wh,useInsertionEffect:Th,useLayoutEffect:Uh,useMemo:Yh,useReducer:pf,useRef:Rh,useState:function(a){return pf(Bc)},useDebugValue:rf,useDeferredValue:function(a){var b=sa();return null===K?b.memoizedState=a:Zh(b,K.memoizedState,a)},useTransition:function(){var a=pf(Bc)[0],b=sa().memoizedState;return[a,b]},useMutableSource:Jh,useSyncExternalStore:Kh,useId:$h,
unstable_isNewReconciler:!1},Dd={isMounted:function(a){return(a=a._reactInternals)?nb(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternals;var d=Z(),e=hb(a),f=Pa(d,e);f.payload=b;void 0!==c&&null!==c&&(f.callback=c);b=fb(a,f,e);null!==b&&(xa(b,a,e,d),vd(b,a,e))},enqueueReplaceState:function(a,b,c){a=a._reactInternals;var d=Z(),e=hb(a),f=Pa(d,e);f.tag=1;f.payload=b;void 0!==c&&null!==c&&(f.callback=c);b=fb(a,f,e);null!==b&&(xa(b,a,e,d),vd(b,a,e))},enqueueForceUpdate:function(a,b){a=a._reactInternals;
var c=Z(),d=hb(a),e=Pa(c,d);e.tag=2;void 0!==b&&null!==b&&(e.callback=b);b=fb(a,e,d);null!==b&&(xa(b,a,d,c),vd(b,a,d))}},rk="function"===typeof WeakMap?WeakMap:Map,tk=Sa.ReactCurrentOwner,ha=!1,Cf={dehydrated:null,treeContext:null,retryLane:0};var zk=function(a,b,c,d){for(c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=
c.return;c=c.sibling}};var xi=function(a,b){};var yk=function(a,b,c,d,e){var f=a.memoizedProps;if(f!==d){a=b.stateNode;ub(Ea.current);e=null;switch(c){case "input":f=ke(a,f);d=ke(a,d);e=[];break;case "select":f=E({},f,{value:void 0});d=E({},d,{value:void 0});e=[];break;case "textarea":f=ne(a,f);d=ne(a,d);e=[];break;default:"function"!==typeof f.onClick&&"function"===typeof d.onClick&&(a.onclick=kd)}pe(c,d);var g;c=null;for(l in f)if(!d.hasOwnProperty(l)&&f.hasOwnProperty(l)&&null!=f[l])if("style"===
l){var h=f[l];for(g in h)h.hasOwnProperty(g)&&(c||(c={}),c[g]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&($b.hasOwnProperty(l)?e||(e=[]):(e=e||[]).push(l,null));for(l in d){var k=d[l];h=null!=f?f[l]:void 0;if(d.hasOwnProperty(l)&&k!==h&&(null!=k||null!=h))if("style"===l)if(h){for(g in h)!h.hasOwnProperty(g)||k&&k.hasOwnProperty(g)||(c||(c={}),c[g]="");for(g in k)k.hasOwnProperty(g)&&h[g]!==k[g]&&(c||
(c={}),c[g]=k[g])}else c||(e||(e=[]),e.push(l,c)),c=k;else"dangerouslySetInnerHTML"===l?(k=k?k.__html:void 0,h=h?h.__html:void 0,null!=k&&h!==k&&(e=e||[]).push(l,k)):"children"===l?"string"!==typeof k&&"number"!==typeof k||(e=e||[]).push(l,""+k):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&($b.hasOwnProperty(l)?(null!=k&&"onScroll"===l&&B("scroll",a),e||h===k||(e=[])):(e=e||[]).push(l,k))}c&&(e=e||[]).push("style",c);var l=e;if(b.updateQueue=l)b.flags|=4}};var Ak=function(a,
b,c,d){c!==d&&(b.flags|=4)};var Jd=!1,X=!1,Fk="function"===typeof WeakSet?WeakSet:Set,l=null,zi=!1,T=null,za=!1,Mk=Math.ceil,Od=Sa.ReactCurrentDispatcher,Uf=Sa.ReactCurrentOwner,ca=Sa.ReactCurrentBatchConfig,p=0,O=null,H=null,U=0,ba=0,Ga=bb(0),L=0,Jc=null,ra=0,Md=0,Sf=0,Kc=null,ja=null,Of=0,Hf=Infinity,Ra=null,Ed=!1,xf=null,ib=null,Pd=!1,lb=null,Qd=0,Ic=0,Pf=null,Kd=-1,Ld=0;var Qk=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||S.current)ha=!0;else{if(0===(a.lanes&c)&&0===(b.flags&
128))return ha=!1,wk(a,b,c);ha=0!==(a.flags&131072)?!0:!1}else ha=!1,D&&0!==(b.flags&1048576)&&yh(b,nd,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;Fd(a,b);a=b.pendingProps;var e=Nb(b,J.current);Sb(b,c);e=mf(null,b,d,a,e,c);var f=nf();b.flags|=1;"object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=null,ea(d)?(f=!0,ld(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,ff(b),e.updater=Dd,b.stateNode=
e,e._reactInternals=b,uf(b,d,a,c),b=Af(null,b,d,!0,f,c)):(b.tag=0,D&&f&&Ue(b),aa(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{Fd(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=Uk(d);a=ya(d,a);switch(e){case 0:b=zf(null,b,d,a,c);break a;case 1:b=ri(null,b,d,a,c);break a;case 11:b=mi(null,b,d,a,c);break a;case 14:b=ni(null,b,d,ya(d.type,a),c);break a}throw Error(m(306,d,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ya(d,e),zf(a,b,d,e,c);
case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ya(d,e),ri(a,b,d,e,c);case 3:a:{si(b);if(null===a)throw Error(m(387));d=b.pendingProps;f=b.memoizedState;e=f.element;Fh(a,b);wd(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=f,b.memoizedState=f,b.flags&256){e=Ub(Error(m(423)),b);b=ti(a,b,d,c,e);break a}else if(d!==e){e=
Ub(Error(m(424)),b);b=ti(a,b,d,c,e);break a}else for(fa=Ka(b.stateNode.containerInfo.firstChild),la=b,D=!0,wa=null,c=li(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Qb();if(d===e){b=Qa(a,b,c);break a}aa(a,b,d,c)}b=b.child}return b;case 5:return Ih(b),null===a&&Xe(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Qe(d,e)?g=null:null!==f&&Qe(d,f)&&(b.flags|=32),qi(a,b),aa(a,b,g,c),b.child;case 6:return null===a&&Xe(b),null;case 13:return ui(a,b,c);case 4:return gf(b,
b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Vb(b,null,d,c):aa(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ya(d,e),mi(a,b,d,e,c);case 7:return aa(a,b,b.pendingProps,c),b.child;case 8:return aa(a,b,b.pendingProps.children,c),b.child;case 12:return aa(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;g=e.value;y(ud,d._currentValue);d._currentValue=g;if(null!==f)if(ua(f.value,g)){if(f.children===
e.children&&!S.current){b=Qa(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=Pa(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var p=l.pending;null===p?k.next=k:(k.next=p.next,p.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);df(f.return,c,b);h.lanes|=c;break}k=k.next}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===
f.tag){g=f.return;if(null===g)throw Error(m(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);df(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}aa(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,Sb(b,c),e=qa(e),d=d(e),b.flags|=1,aa(a,b,d,c),b.child;case 14:return d=b.type,e=ya(d,b.pendingProps),e=ya(d.type,e),ni(a,b,d,e,c);case 15:return oi(a,
b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ya(d,e),Fd(a,b),b.tag=1,ea(d)?(a=!0,ld(b)):a=!1,Sb(b,c),ei(b,d,e),uf(b,d,e,c),Af(null,b,d,!0,a,c);case 19:return wi(a,b,c);case 22:return pi(a,b,c)}throw Error(m(156,b.tag));};var pa=function(a,b,c,d){return new Tk(a,b,c,d)},aj="function"===typeof reportError?reportError:function(a){console.error(a)};Ud.prototype.render=Xf.prototype.render=function(a){var b=this._internalRoot;if(null===b)throw Error(m(409));
Sd(a,b,null,null)};Ud.prototype.unmount=Xf.prototype.unmount=function(){var a=this._internalRoot;if(null!==a){this._internalRoot=null;var b=a.containerInfo;yb(function(){Sd(null,a,null,null)});b[Ja]=null}};Ud.prototype.unstable_scheduleHydration=function(a){if(a){var b=nl();a={blockedOn:null,target:a,priority:b};for(var c=0;c<Ya.length&&0!==b&&b<Ya[c].priority;c++);Ya.splice(c,0,a);0===c&&Hg(a)}};var Cj=function(a){switch(a.tag){case 3:var b=a.stateNode;if(b.current.memoizedState.isDehydrated){var c=
hc(b.pendingLanes);0!==c&&(xe(b,c|1),ia(b,P()),0===(p&6)&&(Hc(),db()))}break;case 13:yb(function(){var b=Oa(a,1);if(null!==b){var c=Z();xa(b,a,1,c)}}),Wf(a,1)}};var Gg=function(a){if(13===a.tag){var b=Oa(a,134217728);if(null!==b){var c=Z();xa(b,a,134217728,c)}Wf(a,134217728)}};var xj=function(a){if(13===a.tag){var b=hb(a),c=Oa(a,b);if(null!==c){var d=Z();xa(c,a,b,d)}Wf(a,b)}};var nl=function(){return z};var wj=function(a,b){var c=z;try{return z=a,b()}finally{z=c}};se=function(a,b,c){switch(b){case "input":le(a,
c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Rc(d);if(!e)throw Error(m(90));jg(d);le(d,e)}}}break;case "textarea":og(a,c);break;case "select":b=c.value,null!=b&&Db(a,!!c.multiple,b,!1)}};(function(a,b,c){xg=a;yg=c})(Tf,function(a,b,c,d,e){var f=z,g=ca.transition;try{return ca.transition=null,z=1,a(b,c,d,e)}finally{z=f,ca.transition=
g,0===p&&Hc()}},yb);var ol={usingClientEntryPoint:!1,Events:[ec,Ib,Rc,ug,vg,Tf]};(function(a){a={bundleType:a.bundleType,version:a.version,rendererPackageName:a.rendererPackageName,rendererConfig:a.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Sa.ReactCurrentDispatcher,findHostInstanceByFiber:Xk,
findFiberByHostInstance:a.findFiberByHostInstance||Yk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1"};if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)a=!1;else{var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)a=!0;else{try{Uc=b.inject(a),Ca=b}catch(c){}a=b.checkDCE?!0:!1}}return a})({findFiberByHostInstance:ob,bundleType:0,version:"18.3.1-next-f1338f8080-20240426",
rendererPackageName:"react-dom"});Q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ol;Q.createPortal=function(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Yf(b))throw Error(m(200));return Wk(a,b,null,c)};Q.createRoot=function(a,b){if(!Yf(a))throw Error(m(299));var c=!1,d="",e=aj;null!==b&&void 0!==b&&(!0===b.unstable_strictMode&&(c=!0),void 0!==b.identifierPrefix&&(d=b.identifierPrefix),void 0!==b.onRecoverableError&&(e=b.onRecoverableError));b=Vf(a,1,!1,null,null,
c,!1,d,e);a[Ja]=b.current;sc(8===a.nodeType?a.parentNode:a);return new Xf(b)};Q.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if("function"===typeof a.render)throw Error(m(188));a=Object.keys(a).join(",");throw Error(m(268,a));}a=Bg(b);a=null===a?null:a.stateNode;return a};Q.flushSync=function(a){return yb(a)};Q.hydrate=function(a,b,c){if(!Vd(b))throw Error(m(200));return Wd(null,a,b,!0,c)};Q.hydrateRoot=function(a,b,c){if(!Yf(a))throw Error(m(405));
var d=null!=c&&c.hydratedSources||null,e=!1,f="",g=aj;null!==c&&void 0!==c&&(!0===c.unstable_strictMode&&(e=!0),void 0!==c.identifierPrefix&&(f=c.identifierPrefix),void 0!==c.onRecoverableError&&(g=c.onRecoverableError));b=Wi(b,null,a,1,null!=c?c:null,e,!1,f,g);a[Ja]=b.current;sc(a);if(d)for(a=0;a<d.length;a++)c=d[a],e=c._getVersion,e=e(c._source),null==b.mutableSourceEagerHydrationData?b.mutableSourceEagerHydrationData=[c,e]:b.mutableSourceEagerHydrationData.push(c,e);return new Ud(b)};Q.render=
function(a,b,c){if(!Vd(b))throw Error(m(200));return Wd(null,a,b,!1,c)};Q.unmountComponentAtNode=function(a){if(!Vd(a))throw Error(m(40));return a._reactRootContainer?(yb(function(){Wd(null,null,a,!1,function(){a._reactRootContainer=null;a[Ja]=null})}),!0):!1};Q.unstable_batchedUpdates=Tf;Q.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!Vd(c))throw Error(m(200));if(null==a||void 0===a._reactInternals)throw Error(m(38));return Wd(a,b,c,!1,d)};Q.version="18.3.1-next-f1338f8080-20240426"});
})();
                                                                                                                                                                                                                                                                     dist/vendor/react-jsx-runtime.js                                                                    0000644                 00000115265 15212564037 0012742 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var ReactJSXRuntime = (() => {
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };

  // react-external:react
  var require_react = __commonJS({
    "react-external:react"(exports, module) {
      module.exports = globalThis.React;
    }
  });

  // node_modules/react/cjs/react-jsx-runtime.development.js
  var require_react_jsx_runtime_development = __commonJS({
    "node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
      "use strict";
      if (true) {
        (function() {
          "use strict";
          var React = require_react();
          var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element");
          var REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
          var REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
          var REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode");
          var REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler");
          var REACT_PROVIDER_TYPE = /* @__PURE__ */ Symbol.for("react.provider");
          var REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context");
          var REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref");
          var REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense");
          var REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list");
          var REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo");
          var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
          var REACT_OFFSCREEN_TYPE = /* @__PURE__ */ Symbol.for("react.offscreen");
          var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
          var FAUX_ITERATOR_SYMBOL = "@@iterator";
          function getIteratorFn(maybeIterable) {
            if (maybeIterable === null || typeof maybeIterable !== "object") {
              return null;
            }
            var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
            if (typeof maybeIterator === "function") {
              return maybeIterator;
            }
            return null;
          }
          var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
          function error(format) {
            {
              {
                for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
                  args[_key2 - 1] = arguments[_key2];
                }
                printWarning("error", format, args);
              }
            }
          }
          function printWarning(level, format, args) {
            {
              var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
              var stack = ReactDebugCurrentFrame2.getStackAddendum();
              if (stack !== "") {
                format += "%s";
                args = args.concat([stack]);
              }
              var argsWithFormat = args.map(function(item) {
                return String(item);
              });
              argsWithFormat.unshift("Warning: " + format);
              Function.prototype.apply.call(console[level], console, argsWithFormat);
            }
          }
          var enableScopeAPI = false;
          var enableCacheElement = false;
          var enableTransitionTracing = false;
          var enableLegacyHidden = false;
          var enableDebugTracing = false;
          var REACT_MODULE_REFERENCE;
          {
            REACT_MODULE_REFERENCE = /* @__PURE__ */ Symbol.for("react.module.reference");
          }
          function isValidElementType(type) {
            if (typeof type === "string" || typeof type === "function") {
              return true;
            }
            if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
              return true;
            }
            if (typeof type === "object" && type !== null) {
              if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
              // types supported by any Flight configuration anywhere since
              // we don't know which Flight build this will end up being used
              // with.
              type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
                return true;
              }
            }
            return false;
          }
          function getWrappedName(outerType, innerType, wrapperName) {
            var displayName = outerType.displayName;
            if (displayName) {
              return displayName;
            }
            var functionName = innerType.displayName || innerType.name || "";
            return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
          }
          function getContextName(type) {
            return type.displayName || "Context";
          }
          function getComponentNameFromType(type) {
            if (type == null) {
              return null;
            }
            {
              if (typeof type.tag === "number") {
                error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
              }
            }
            if (typeof type === "function") {
              return type.displayName || type.name || null;
            }
            if (typeof type === "string") {
              return type;
            }
            switch (type) {
              case REACT_FRAGMENT_TYPE:
                return "Fragment";
              case REACT_PORTAL_TYPE:
                return "Portal";
              case REACT_PROFILER_TYPE:
                return "Profiler";
              case REACT_STRICT_MODE_TYPE:
                return "StrictMode";
              case REACT_SUSPENSE_TYPE:
                return "Suspense";
              case REACT_SUSPENSE_LIST_TYPE:
                return "SuspenseList";
            }
            if (typeof type === "object") {
              switch (type.$$typeof) {
                case REACT_CONTEXT_TYPE:
                  var context = type;
                  return getContextName(context) + ".Consumer";
                case REACT_PROVIDER_TYPE:
                  var provider = type;
                  return getContextName(provider._context) + ".Provider";
                case REACT_FORWARD_REF_TYPE:
                  return getWrappedName(type, type.render, "ForwardRef");
                case REACT_MEMO_TYPE:
                  var outerName = type.displayName || null;
                  if (outerName !== null) {
                    return outerName;
                  }
                  return getComponentNameFromType(type.type) || "Memo";
                case REACT_LAZY_TYPE: {
                  var lazyComponent = type;
                  var payload = lazyComponent._payload;
                  var init = lazyComponent._init;
                  try {
                    return getComponentNameFromType(init(payload));
                  } catch (x) {
                    return null;
                  }
                }
              }
            }
            return null;
          }
          var assign = Object.assign;
          var disabledDepth = 0;
          var prevLog;
          var prevInfo;
          var prevWarn;
          var prevError;
          var prevGroup;
          var prevGroupCollapsed;
          var prevGroupEnd;
          function disabledLog() {
          }
          disabledLog.__reactDisabledLog = true;
          function disableLogs() {
            {
              if (disabledDepth === 0) {
                prevLog = console.log;
                prevInfo = console.info;
                prevWarn = console.warn;
                prevError = console.error;
                prevGroup = console.group;
                prevGroupCollapsed = console.groupCollapsed;
                prevGroupEnd = console.groupEnd;
                var props = {
                  configurable: true,
                  enumerable: true,
                  value: disabledLog,
                  writable: true
                };
                Object.defineProperties(console, {
                  info: props,
                  log: props,
                  warn: props,
                  error: props,
                  group: props,
                  groupCollapsed: props,
                  groupEnd: props
                });
              }
              disabledDepth++;
            }
          }
          function reenableLogs() {
            {
              disabledDepth--;
              if (disabledDepth === 0) {
                var props = {
                  configurable: true,
                  enumerable: true,
                  writable: true
                };
                Object.defineProperties(console, {
                  log: assign({}, props, {
                    value: prevLog
                  }),
                  info: assign({}, props, {
                    value: prevInfo
                  }),
                  warn: assign({}, props, {
                    value: prevWarn
                  }),
                  error: assign({}, props, {
                    value: prevError
                  }),
                  group: assign({}, props, {
                    value: prevGroup
                  }),
                  groupCollapsed: assign({}, props, {
                    value: prevGroupCollapsed
                  }),
                  groupEnd: assign({}, props, {
                    value: prevGroupEnd
                  })
                });
              }
              if (disabledDepth < 0) {
                error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
              }
            }
          }
          var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
          var prefix;
          function describeBuiltInComponentFrame(name, source, ownerFn) {
            {
              if (prefix === void 0) {
                try {
                  throw Error();
                } catch (x) {
                  var match = x.stack.trim().match(/\n( *(at )?)/);
                  prefix = match && match[1] || "";
                }
              }
              return "\n" + prefix + name;
            }
          }
          var reentry = false;
          var componentFrameCache;
          {
            var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
            componentFrameCache = new PossiblyWeakMap();
          }
          function describeNativeComponentFrame(fn, construct) {
            if (!fn || reentry) {
              return "";
            }
            {
              var frame = componentFrameCache.get(fn);
              if (frame !== void 0) {
                return frame;
              }
            }
            var control;
            reentry = true;
            var previousPrepareStackTrace = Error.prepareStackTrace;
            Error.prepareStackTrace = void 0;
            var previousDispatcher;
            {
              previousDispatcher = ReactCurrentDispatcher.current;
              ReactCurrentDispatcher.current = null;
              disableLogs();
            }
            try {
              if (construct) {
                var Fake = function() {
                  throw Error();
                };
                Object.defineProperty(Fake.prototype, "props", {
                  set: function() {
                    throw Error();
                  }
                });
                if (typeof Reflect === "object" && Reflect.construct) {
                  try {
                    Reflect.construct(Fake, []);
                  } catch (x) {
                    control = x;
                  }
                  Reflect.construct(fn, [], Fake);
                } else {
                  try {
                    Fake.call();
                  } catch (x) {
                    control = x;
                  }
                  fn.call(Fake.prototype);
                }
              } else {
                try {
                  throw Error();
                } catch (x) {
                  control = x;
                }
                fn();
              }
            } catch (sample) {
              if (sample && control && typeof sample.stack === "string") {
                var sampleLines = sample.stack.split("\n");
                var controlLines = control.stack.split("\n");
                var s = sampleLines.length - 1;
                var c = controlLines.length - 1;
                while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
                  c--;
                }
                for (; s >= 1 && c >= 0; s--, c--) {
                  if (sampleLines[s] !== controlLines[c]) {
                    if (s !== 1 || c !== 1) {
                      do {
                        s--;
                        c--;
                        if (c < 0 || sampleLines[s] !== controlLines[c]) {
                          var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
                          if (fn.displayName && _frame.includes("<anonymous>")) {
                            _frame = _frame.replace("<anonymous>", fn.displayName);
                          }
                          {
                            if (typeof fn === "function") {
                              componentFrameCache.set(fn, _frame);
                            }
                          }
                          return _frame;
                        }
                      } while (s >= 1 && c >= 0);
                    }
                    break;
                  }
                }
              }
            } finally {
              reentry = false;
              {
                ReactCurrentDispatcher.current = previousDispatcher;
                reenableLogs();
              }
              Error.prepareStackTrace = previousPrepareStackTrace;
            }
            var name = fn ? fn.displayName || fn.name : "";
            var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
            {
              if (typeof fn === "function") {
                componentFrameCache.set(fn, syntheticFrame);
              }
            }
            return syntheticFrame;
          }
          function describeFunctionComponentFrame(fn, source, ownerFn) {
            {
              return describeNativeComponentFrame(fn, false);
            }
          }
          function shouldConstruct(Component) {
            var prototype = Component.prototype;
            return !!(prototype && prototype.isReactComponent);
          }
          function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
            if (type == null) {
              return "";
            }
            if (typeof type === "function") {
              {
                return describeNativeComponentFrame(type, shouldConstruct(type));
              }
            }
            if (typeof type === "string") {
              return describeBuiltInComponentFrame(type);
            }
            switch (type) {
              case REACT_SUSPENSE_TYPE:
                return describeBuiltInComponentFrame("Suspense");
              case REACT_SUSPENSE_LIST_TYPE:
                return describeBuiltInComponentFrame("SuspenseList");
            }
            if (typeof type === "object") {
              switch (type.$$typeof) {
                case REACT_FORWARD_REF_TYPE:
                  return describeFunctionComponentFrame(type.render);
                case REACT_MEMO_TYPE:
                  return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
                case REACT_LAZY_TYPE: {
                  var lazyComponent = type;
                  var payload = lazyComponent._payload;
                  var init = lazyComponent._init;
                  try {
                    return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
                  } catch (x) {
                  }
                }
              }
            }
            return "";
          }
          var hasOwnProperty = Object.prototype.hasOwnProperty;
          var loggedTypeFailures = {};
          var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
          function setCurrentlyValidatingElement(element) {
            {
              if (element) {
                var owner = element._owner;
                var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
                ReactDebugCurrentFrame.setExtraStackFrame(stack);
              } else {
                ReactDebugCurrentFrame.setExtraStackFrame(null);
              }
            }
          }
          function checkPropTypes(typeSpecs, values, location, componentName, element) {
            {
              var has = Function.call.bind(hasOwnProperty);
              for (var typeSpecName in typeSpecs) {
                if (has(typeSpecs, typeSpecName)) {
                  var error$1 = void 0;
                  try {
                    if (typeof typeSpecs[typeSpecName] !== "function") {
                      var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
                      err.name = "Invariant Violation";
                      throw err;
                    }
                    error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
                  } catch (ex) {
                    error$1 = ex;
                  }
                  if (error$1 && !(error$1 instanceof Error)) {
                    setCurrentlyValidatingElement(element);
                    error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
                    setCurrentlyValidatingElement(null);
                  }
                  if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
                    loggedTypeFailures[error$1.message] = true;
                    setCurrentlyValidatingElement(element);
                    error("Failed %s type: %s", location, error$1.message);
                    setCurrentlyValidatingElement(null);
                  }
                }
              }
            }
          }
          var isArrayImpl = Array.isArray;
          function isArray(a) {
            return isArrayImpl(a);
          }
          function typeName(value) {
            {
              var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
              var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
              return type;
            }
          }
          function willCoercionThrow(value) {
            {
              try {
                testStringCoercion(value);
                return false;
              } catch (e) {
                return true;
              }
            }
          }
          function testStringCoercion(value) {
            return "" + value;
          }
          function checkKeyStringCoercion(value) {
            {
              if (willCoercionThrow(value)) {
                error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
                return testStringCoercion(value);
              }
            }
          }
          var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
          var RESERVED_PROPS = {
            key: true,
            ref: true,
            __self: true,
            __source: true
          };
          var specialPropKeyWarningShown;
          var specialPropRefWarningShown;
          var didWarnAboutStringRefs;
          {
            didWarnAboutStringRefs = {};
          }
          function hasValidRef(config) {
            {
              if (hasOwnProperty.call(config, "ref")) {
                var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
                if (getter && getter.isReactWarning) {
                  return false;
                }
              }
            }
            return config.ref !== void 0;
          }
          function hasValidKey(config) {
            {
              if (hasOwnProperty.call(config, "key")) {
                var getter = Object.getOwnPropertyDescriptor(config, "key").get;
                if (getter && getter.isReactWarning) {
                  return false;
                }
              }
            }
            return config.key !== void 0;
          }
          function warnIfStringRefCannotBeAutoConverted(config, self) {
            {
              if (typeof config.ref === "string" && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
                var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
                if (!didWarnAboutStringRefs[componentName]) {
                  error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
                  didWarnAboutStringRefs[componentName] = true;
                }
              }
            }
          }
          function defineKeyPropWarningGetter(props, displayName) {
            {
              var warnAboutAccessingKey = function() {
                if (!specialPropKeyWarningShown) {
                  specialPropKeyWarningShown = true;
                  error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
                }
              };
              warnAboutAccessingKey.isReactWarning = true;
              Object.defineProperty(props, "key", {
                get: warnAboutAccessingKey,
                configurable: true
              });
            }
          }
          function defineRefPropWarningGetter(props, displayName) {
            {
              var warnAboutAccessingRef = function() {
                if (!specialPropRefWarningShown) {
                  specialPropRefWarningShown = true;
                  error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
                }
              };
              warnAboutAccessingRef.isReactWarning = true;
              Object.defineProperty(props, "ref", {
                get: warnAboutAccessingRef,
                configurable: true
              });
            }
          }
          var ReactElement = function(type, key, ref, self, source, owner, props) {
            var element = {
              // This tag allows us to uniquely identify this as a React Element
              $$typeof: REACT_ELEMENT_TYPE,
              // Built-in properties that belong on the element
              type,
              key,
              ref,
              props,
              // Record the component responsible for creating this element.
              _owner: owner
            };
            {
              element._store = {};
              Object.defineProperty(element._store, "validated", {
                configurable: false,
                enumerable: false,
                writable: true,
                value: false
              });
              Object.defineProperty(element, "_self", {
                configurable: false,
                enumerable: false,
                writable: false,
                value: self
              });
              Object.defineProperty(element, "_source", {
                configurable: false,
                enumerable: false,
                writable: false,
                value: source
              });
              if (Object.freeze) {
                Object.freeze(element.props);
                Object.freeze(element);
              }
            }
            return element;
          };
          function jsxDEV(type, config, maybeKey, source, self) {
            {
              var propName;
              var props = {};
              var key = null;
              var ref = null;
              if (maybeKey !== void 0) {
                {
                  checkKeyStringCoercion(maybeKey);
                }
                key = "" + maybeKey;
              }
              if (hasValidKey(config)) {
                {
                  checkKeyStringCoercion(config.key);
                }
                key = "" + config.key;
              }
              if (hasValidRef(config)) {
                ref = config.ref;
                warnIfStringRefCannotBeAutoConverted(config, self);
              }
              for (propName in config) {
                if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
                  props[propName] = config[propName];
                }
              }
              if (type && type.defaultProps) {
                var defaultProps = type.defaultProps;
                for (propName in defaultProps) {
                  if (props[propName] === void 0) {
                    props[propName] = defaultProps[propName];
                  }
                }
              }
              if (key || ref) {
                var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
                if (key) {
                  defineKeyPropWarningGetter(props, displayName);
                }
                if (ref) {
                  defineRefPropWarningGetter(props, displayName);
                }
              }
              return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
            }
          }
          var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
          var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
          function setCurrentlyValidatingElement$1(element) {
            {
              if (element) {
                var owner = element._owner;
                var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
                ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
              } else {
                ReactDebugCurrentFrame$1.setExtraStackFrame(null);
              }
            }
          }
          var propTypesMisspellWarningShown;
          {
            propTypesMisspellWarningShown = false;
          }
          function isValidElement(object) {
            {
              return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
            }
          }
          function getDeclarationErrorAddendum() {
            {
              if (ReactCurrentOwner$1.current) {
                var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
                if (name) {
                  return "\n\nCheck the render method of `" + name + "`.";
                }
              }
              return "";
            }
          }
          function getSourceInfoErrorAddendum(source) {
            {
              if (source !== void 0) {
                var fileName = source.fileName.replace(/^.*[\\\/]/, "");
                var lineNumber = source.lineNumber;
                return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
              }
              return "";
            }
          }
          var ownerHasKeyUseWarning = {};
          function getCurrentComponentErrorInfo(parentType) {
            {
              var info = getDeclarationErrorAddendum();
              if (!info) {
                var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
                if (parentName) {
                  info = "\n\nCheck the top-level render call using <" + parentName + ">.";
                }
              }
              return info;
            }
          }
          function validateExplicitKey(element, parentType) {
            {
              if (!element._store || element._store.validated || element.key != null) {
                return;
              }
              element._store.validated = true;
              var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
              if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
                return;
              }
              ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
              var childOwner = "";
              if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
                childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
              }
              setCurrentlyValidatingElement$1(element);
              error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
              setCurrentlyValidatingElement$1(null);
            }
          }
          function validateChildKeys(node, parentType) {
            {
              if (typeof node !== "object") {
                return;
              }
              if (isArray(node)) {
                for (var i = 0; i < node.length; i++) {
                  var child = node[i];
                  if (isValidElement(child)) {
                    validateExplicitKey(child, parentType);
                  }
                }
              } else if (isValidElement(node)) {
                if (node._store) {
                  node._store.validated = true;
                }
              } else if (node) {
                var iteratorFn = getIteratorFn(node);
                if (typeof iteratorFn === "function") {
                  if (iteratorFn !== node.entries) {
                    var iterator = iteratorFn.call(node);
                    var step;
                    while (!(step = iterator.next()).done) {
                      if (isValidElement(step.value)) {
                        validateExplicitKey(step.value, parentType);
                      }
                    }
                  }
                }
              }
            }
          }
          function validatePropTypes(element) {
            {
              var type = element.type;
              if (type === null || type === void 0 || typeof type === "string") {
                return;
              }
              var propTypes;
              if (typeof type === "function") {
                propTypes = type.propTypes;
              } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
              // Inner props are checked in the reconciler.
              type.$$typeof === REACT_MEMO_TYPE)) {
                propTypes = type.propTypes;
              } else {
                return;
              }
              if (propTypes) {
                var name = getComponentNameFromType(type);
                checkPropTypes(propTypes, element.props, "prop", name, element);
              } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
                propTypesMisspellWarningShown = true;
                var _name = getComponentNameFromType(type);
                error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
              }
              if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
                error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
              }
            }
          }
          function validateFragmentProps(fragment) {
            {
              var keys = Object.keys(fragment.props);
              for (var i = 0; i < keys.length; i++) {
                var key = keys[i];
                if (key !== "children" && key !== "key") {
                  setCurrentlyValidatingElement$1(fragment);
                  error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
                  setCurrentlyValidatingElement$1(null);
                  break;
                }
              }
              if (fragment.ref !== null) {
                setCurrentlyValidatingElement$1(fragment);
                error("Invalid attribute `ref` supplied to `React.Fragment`.");
                setCurrentlyValidatingElement$1(null);
              }
            }
          }
          var didWarnAboutKeySpread = {};
          function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
            {
              var validType = isValidElementType(type);
              if (!validType) {
                var info = "";
                if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
                  info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
                }
                var sourceInfo = getSourceInfoErrorAddendum(source);
                if (sourceInfo) {
                  info += sourceInfo;
                } else {
                  info += getDeclarationErrorAddendum();
                }
                var typeString;
                if (type === null) {
                  typeString = "null";
                } else if (isArray(type)) {
                  typeString = "array";
                } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
                  typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
                  info = " Did you accidentally export a JSX literal instead of a component?";
                } else {
                  typeString = typeof type;
                }
                error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
              }
              var element = jsxDEV(type, props, key, source, self);
              if (element == null) {
                return element;
              }
              if (validType) {
                var children = props.children;
                if (children !== void 0) {
                  if (isStaticChildren) {
                    if (isArray(children)) {
                      for (var i = 0; i < children.length; i++) {
                        validateChildKeys(children[i], type);
                      }
                      if (Object.freeze) {
                        Object.freeze(children);
                      }
                    } else {
                      error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
                    }
                  } else {
                    validateChildKeys(children, type);
                  }
                }
              }
              {
                if (hasOwnProperty.call(props, "key")) {
                  var componentName = getComponentNameFromType(type);
                  var keys = Object.keys(props).filter(function(k) {
                    return k !== "key";
                  });
                  var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
                  if (!didWarnAboutKeySpread[componentName + beforeExample]) {
                    var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}";
                    error('A props object containing a "key" prop is being spread into JSX:\n  let props = %s;\n  <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n  let props = %s;\n  <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
                    didWarnAboutKeySpread[componentName + beforeExample] = true;
                  }
                }
              }
              if (type === REACT_FRAGMENT_TYPE) {
                validateFragmentProps(element);
              } else {
                validatePropTypes(element);
              }
              return element;
            }
          }
          function jsxWithValidationStatic(type, props, key) {
            {
              return jsxWithValidation(type, props, key, true);
            }
          }
          function jsxWithValidationDynamic(type, props, key) {
            {
              return jsxWithValidation(type, props, key, false);
            }
          }
          var jsx = jsxWithValidationDynamic;
          var jsxs = jsxWithValidationStatic;
          exports.Fragment = REACT_FRAGMENT_TYPE;
          exports.jsx = jsx;
          exports.jsxs = jsxs;
        })();
      }
    }
  });

  // node_modules/react/jsx-runtime.js
  var require_jsx_runtime = __commonJS({
    "node_modules/react/jsx-runtime.js"(exports, module) {
      if (false) {
        module.exports = null;
      } else {
        module.exports = require_react_jsx_runtime_development();
      }
    }
  });
  return require_jsx_runtime();
})();
/*! Bundled license information:

react/cjs/react-jsx-runtime.development.js:
  (**
   * @license React
   * react-jsx-runtime.development.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)
*/
                                                                                                                                                                                                                                                                                                                                           dist/vendor/react-jsx-runtime.min.js                                                                0000644                 00000002161 15212564037 0013512 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var ReactJSXRuntime=(()=>{var l=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var u=l((R,p)=>{p.exports=globalThis.React});var c=l(s=>{"use strict";var d=u(),m=Symbol.for("react.element"),O=Symbol.for("react.fragment"),v=Object.prototype.hasOwnProperty,E=d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function _(t,e,f){var r,o={},n=null,i=null;f!==void 0&&(n=""+f),e.key!==void 0&&(n=""+e.key),e.ref!==void 0&&(i=e.ref);for(r in e)v.call(e,r)&&!a.hasOwnProperty(r)&&(o[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)o[r]===void 0&&(o[r]=e[r]);return{$$typeof:m,type:t,key:n,ref:i,props:o,_owner:E.current}}s.Fragment=O;s.jsx=_;s.jsxs=_});var j=l((k,y)=>{y.exports=c()});return j();})();
/*! Bundled license information:

react/cjs/react-jsx-runtime.production.min.js:
  (**
   * @license React
   * react-jsx-runtime.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)
*/
                                                                                                                                                                                                                                                                                                                                                                                                               dist/vendor/react.js                                                                                0000644                 00000326553 15212564037 0010463 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @license React
 * react.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
(function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
  (global = global || self, factory(global.React = {}));
}(this, (function (exports) { 'use strict';

  var ReactVersion = '18.3.1';

  // ATTENTION
  // When adding new symbols to this file,
  // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
  // The Symbol used to tag the ReactElement-like types.
  var REACT_ELEMENT_TYPE = Symbol.for('react.element');
  var REACT_PORTAL_TYPE = Symbol.for('react.portal');
  var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
  var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
  var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
  var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
  var REACT_CONTEXT_TYPE = Symbol.for('react.context');
  var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
  var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
  var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
  var REACT_MEMO_TYPE = Symbol.for('react.memo');
  var REACT_LAZY_TYPE = Symbol.for('react.lazy');
  var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
  var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
  var FAUX_ITERATOR_SYMBOL = '@@iterator';
  function getIteratorFn(maybeIterable) {
    if (maybeIterable === null || typeof maybeIterable !== 'object') {
      return null;
    }

    var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];

    if (typeof maybeIterator === 'function') {
      return maybeIterator;
    }

    return null;
  }

  /**
   * Keeps track of the current dispatcher.
   */
  var ReactCurrentDispatcher = {
    /**
     * @internal
     * @type {ReactComponent}
     */
    current: null
  };

  /**
   * Keeps track of the current batch's configuration such as how long an update
   * should suspend for if it needs to.
   */
  var ReactCurrentBatchConfig = {
    transition: null
  };

  var ReactCurrentActQueue = {
    current: null,
    // Used to reproduce behavior of `batchedUpdates` in legacy mode.
    isBatchingLegacy: false,
    didScheduleLegacyUpdate: false
  };

  /**
   * Keeps track of the current owner.
   *
   * The current owner is the component who should own any components that are
   * currently being constructed.
   */
  var ReactCurrentOwner = {
    /**
     * @internal
     * @type {ReactComponent}
     */
    current: null
  };

  var ReactDebugCurrentFrame = {};
  var currentExtraStackFrame = null;
  function setExtraStackFrame(stack) {
    {
      currentExtraStackFrame = stack;
    }
  }

  {
    ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {
      {
        currentExtraStackFrame = stack;
      }
    }; // Stack implementation injected by the current renderer.


    ReactDebugCurrentFrame.getCurrentStack = null;

    ReactDebugCurrentFrame.getStackAddendum = function () {
      var stack = ''; // Add an extra top frame while an element is being validated

      if (currentExtraStackFrame) {
        stack += currentExtraStackFrame;
      } // Delegate to the injected renderer-specific implementation


      var impl = ReactDebugCurrentFrame.getCurrentStack;

      if (impl) {
        stack += impl() || '';
      }

      return stack;
    };
  }

  // -----------------------------------------------------------------------------

  var enableScopeAPI = false; // Experimental Create Event Handle API.
  var enableCacheElement = false;
  var enableTransitionTracing = false; // No known bugs, but needs performance testing

  var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
  // stuff. Intended to enable React core members to more easily debug scheduling
  // issues in DEV builds.

  var enableDebugTracing = false; // Track which Fiber(s) schedule render work.

  var ReactSharedInternals = {
    ReactCurrentDispatcher: ReactCurrentDispatcher,
    ReactCurrentBatchConfig: ReactCurrentBatchConfig,
    ReactCurrentOwner: ReactCurrentOwner
  };

  {
    ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
    ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
  }

  // by calls to these methods by a Babel plugin.
  //
  // In PROD (or in packages without access to React internals),
  // they are left as they are instead.

  function warn(format) {
    {
      {
        for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
          args[_key - 1] = arguments[_key];
        }

        printWarning('warn', format, args);
      }
    }
  }
  function error(format) {
    {
      {
        for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
          args[_key2 - 1] = arguments[_key2];
        }

        printWarning('error', format, args);
      }
    }
  }

  function printWarning(level, format, args) {
    // When changing this logic, you might want to also
    // update consoleWithStackDev.www.js as well.
    {
      var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
      var stack = ReactDebugCurrentFrame.getStackAddendum();

      if (stack !== '') {
        format += '%s';
        args = args.concat([stack]);
      } // eslint-disable-next-line react-internal/safe-string-coercion


      var argsWithFormat = args.map(function (item) {
        return String(item);
      }); // Careful: RN currently depends on this prefix

      argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
      // breaks IE9: https://github.com/facebook/react/issues/13610
      // eslint-disable-next-line react-internal/no-production-logging

      Function.prototype.apply.call(console[level], console, argsWithFormat);
    }
  }

  var didWarnStateUpdateForUnmountedComponent = {};

  function warnNoop(publicInstance, callerName) {
    {
      var _constructor = publicInstance.constructor;
      var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
      var warningKey = componentName + "." + callerName;

      if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
        return;
      }

      error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);

      didWarnStateUpdateForUnmountedComponent[warningKey] = true;
    }
  }
  /**
   * This is the abstract API for an update queue.
   */


  var ReactNoopUpdateQueue = {
    /**
     * Checks whether or not this composite component is mounted.
     * @param {ReactClass} publicInstance The instance we want to test.
     * @return {boolean} True if mounted, false otherwise.
     * @protected
     * @final
     */
    isMounted: function (publicInstance) {
      return false;
    },

    /**
     * Forces an update. This should only be invoked when it is known with
     * certainty that we are **not** in a DOM transaction.
     *
     * You may want to call this when you know that some deeper aspect of the
     * component's state has changed but `setState` was not called.
     *
     * This will not invoke `shouldComponentUpdate`, but it will invoke
     * `componentWillUpdate` and `componentDidUpdate`.
     *
     * @param {ReactClass} publicInstance The instance that should rerender.
     * @param {?function} callback Called after component is updated.
     * @param {?string} callerName name of the calling function in the public API.
     * @internal
     */
    enqueueForceUpdate: function (publicInstance, callback, callerName) {
      warnNoop(publicInstance, 'forceUpdate');
    },

    /**
     * Replaces all of the state. Always use this or `setState` to mutate state.
     * You should treat `this.state` as immutable.
     *
     * There is no guarantee that `this.state` will be immediately updated, so
     * accessing `this.state` after calling this method may return the old value.
     *
     * @param {ReactClass} publicInstance The instance that should rerender.
     * @param {object} completeState Next state.
     * @param {?function} callback Called after component is updated.
     * @param {?string} callerName name of the calling function in the public API.
     * @internal
     */
    enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
      warnNoop(publicInstance, 'replaceState');
    },

    /**
     * Sets a subset of the state. This only exists because _pendingState is
     * internal. This provides a merging strategy that is not available to deep
     * properties which is confusing. TODO: Expose pendingState or don't use it
     * during the merge.
     *
     * @param {ReactClass} publicInstance The instance that should rerender.
     * @param {object} partialState Next partial state to be merged with state.
     * @param {?function} callback Called after component is updated.
     * @param {?string} Name of the calling function in the public API.
     * @internal
     */
    enqueueSetState: function (publicInstance, partialState, callback, callerName) {
      warnNoop(publicInstance, 'setState');
    }
  };

  var assign = Object.assign;

  var emptyObject = {};

  {
    Object.freeze(emptyObject);
  }
  /**
   * Base class helpers for the updating state of a component.
   */


  function Component(props, context, updater) {
    this.props = props;
    this.context = context; // If a component has string refs, we will assign a different object later.

    this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
    // renderer.

    this.updater = updater || ReactNoopUpdateQueue;
  }

  Component.prototype.isReactComponent = {};
  /**
   * Sets a subset of the state. Always use this to mutate
   * state. You should treat `this.state` as immutable.
   *
   * There is no guarantee that `this.state` will be immediately updated, so
   * accessing `this.state` after calling this method may return the old value.
   *
   * There is no guarantee that calls to `setState` will run synchronously,
   * as they may eventually be batched together.  You can provide an optional
   * callback that will be executed when the call to setState is actually
   * completed.
   *
   * When a function is provided to setState, it will be called at some point in
   * the future (not synchronously). It will be called with the up to date
   * component arguments (state, props, context). These values can be different
   * from this.* because your function may be called after receiveProps but before
   * shouldComponentUpdate, and this new state, props, and context will not yet be
   * assigned to this.
   *
   * @param {object|function} partialState Next partial state or function to
   *        produce next partial state to be merged with current state.
   * @param {?function} callback Called after state is updated.
   * @final
   * @protected
   */

  Component.prototype.setState = function (partialState, callback) {
    if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {
      throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.');
    }

    this.updater.enqueueSetState(this, partialState, callback, 'setState');
  };
  /**
   * Forces an update. This should only be invoked when it is known with
   * certainty that we are **not** in a DOM transaction.
   *
   * You may want to call this when you know that some deeper aspect of the
   * component's state has changed but `setState` was not called.
   *
   * This will not invoke `shouldComponentUpdate`, but it will invoke
   * `componentWillUpdate` and `componentDidUpdate`.
   *
   * @param {?function} callback Called after update is complete.
   * @final
   * @protected
   */


  Component.prototype.forceUpdate = function (callback) {
    this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
  };
  /**
   * Deprecated APIs. These APIs used to exist on classic React classes but since
   * we would like to deprecate them, we're not going to move them over to this
   * modern base class. Instead, we define a getter that warns if it's accessed.
   */


  {
    var deprecatedAPIs = {
      isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
      replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
    };

    var defineDeprecationWarning = function (methodName, info) {
      Object.defineProperty(Component.prototype, methodName, {
        get: function () {
          warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);

          return undefined;
        }
      });
    };

    for (var fnName in deprecatedAPIs) {
      if (deprecatedAPIs.hasOwnProperty(fnName)) {
        defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
      }
    }
  }

  function ComponentDummy() {}

  ComponentDummy.prototype = Component.prototype;
  /**
   * Convenience component with default shallow equality check for sCU.
   */

  function PureComponent(props, context, updater) {
    this.props = props;
    this.context = context; // If a component has string refs, we will assign a different object later.

    this.refs = emptyObject;
    this.updater = updater || ReactNoopUpdateQueue;
  }

  var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
  pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.

  assign(pureComponentPrototype, Component.prototype);
  pureComponentPrototype.isPureReactComponent = true;

  // an immutable object with a single mutable value
  function createRef() {
    var refObject = {
      current: null
    };

    {
      Object.seal(refObject);
    }

    return refObject;
  }

  var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare

  function isArray(a) {
    return isArrayImpl(a);
  }

  /*
   * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
   * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
   *
   * The functions in this module will throw an easier-to-understand,
   * easier-to-debug exception with a clear errors message message explaining the
   * problem. (Instead of a confusing exception thrown inside the implementation
   * of the `value` object).
   */
  // $FlowFixMe only called in DEV, so void return is not possible.
  function typeName(value) {
    {
      // toStringTag is needed for namespaced types like Temporal.Instant
      var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
      var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
      return type;
    }
  } // $FlowFixMe only called in DEV, so void return is not possible.


  function willCoercionThrow(value) {
    {
      try {
        testStringCoercion(value);
        return false;
      } catch (e) {
        return true;
      }
    }
  }

  function testStringCoercion(value) {
    // If you ended up here by following an exception call stack, here's what's
    // happened: you supplied an object or symbol value to React (as a prop, key,
    // DOM attribute, CSS property, string ref, etc.) and when React tried to
    // coerce it to a string using `'' + value`, an exception was thrown.
    //
    // The most common types that will cause this exception are `Symbol` instances
    // and Temporal objects like `Temporal.Instant`. But any object that has a
    // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
    // exception. (Library authors do this to prevent users from using built-in
    // numeric operators like `+` or comparison operators like `>=` because custom
    // methods are needed to perform accurate arithmetic or comparison.)
    //
    // To fix the problem, coerce this object or symbol value to a string before
    // passing it to React. The most reliable way is usually `String(value)`.
    //
    // To find which value is throwing, check the browser or debugger console.
    // Before this exception was thrown, there should be `console.error` output
    // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
    // problem and how that type was used: key, atrribute, input value prop, etc.
    // In most cases, this console output also shows the component and its
    // ancestor components where the exception happened.
    //
    // eslint-disable-next-line react-internal/safe-string-coercion
    return '' + value;
  }
  function checkKeyStringCoercion(value) {
    {
      if (willCoercionThrow(value)) {
        error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));

        return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
      }
    }
  }

  function getWrappedName(outerType, innerType, wrapperName) {
    var displayName = outerType.displayName;

    if (displayName) {
      return displayName;
    }

    var functionName = innerType.displayName || innerType.name || '';
    return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
  } // Keep in sync with react-reconciler/getComponentNameFromFiber


  function getContextName(type) {
    return type.displayName || 'Context';
  } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.


  function getComponentNameFromType(type) {
    if (type == null) {
      // Host root, text node or just invalid type.
      return null;
    }

    {
      if (typeof type.tag === 'number') {
        error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
      }
    }

    if (typeof type === 'function') {
      return type.displayName || type.name || null;
    }

    if (typeof type === 'string') {
      return type;
    }

    switch (type) {
      case REACT_FRAGMENT_TYPE:
        return 'Fragment';

      case REACT_PORTAL_TYPE:
        return 'Portal';

      case REACT_PROFILER_TYPE:
        return 'Profiler';

      case REACT_STRICT_MODE_TYPE:
        return 'StrictMode';

      case REACT_SUSPENSE_TYPE:
        return 'Suspense';

      case REACT_SUSPENSE_LIST_TYPE:
        return 'SuspenseList';

    }

    if (typeof type === 'object') {
      switch (type.$$typeof) {
        case REACT_CONTEXT_TYPE:
          var context = type;
          return getContextName(context) + '.Consumer';

        case REACT_PROVIDER_TYPE:
          var provider = type;
          return getContextName(provider._context) + '.Provider';

        case REACT_FORWARD_REF_TYPE:
          return getWrappedName(type, type.render, 'ForwardRef');

        case REACT_MEMO_TYPE:
          var outerName = type.displayName || null;

          if (outerName !== null) {
            return outerName;
          }

          return getComponentNameFromType(type.type) || 'Memo';

        case REACT_LAZY_TYPE:
          {
            var lazyComponent = type;
            var payload = lazyComponent._payload;
            var init = lazyComponent._init;

            try {
              return getComponentNameFromType(init(payload));
            } catch (x) {
              return null;
            }
          }

        // eslint-disable-next-line no-fallthrough
      }
    }

    return null;
  }

  var hasOwnProperty = Object.prototype.hasOwnProperty;

  var RESERVED_PROPS = {
    key: true,
    ref: true,
    __self: true,
    __source: true
  };
  var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;

  {
    didWarnAboutStringRefs = {};
  }

  function hasValidRef(config) {
    {
      if (hasOwnProperty.call(config, 'ref')) {
        var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;

        if (getter && getter.isReactWarning) {
          return false;
        }
      }
    }

    return config.ref !== undefined;
  }

  function hasValidKey(config) {
    {
      if (hasOwnProperty.call(config, 'key')) {
        var getter = Object.getOwnPropertyDescriptor(config, 'key').get;

        if (getter && getter.isReactWarning) {
          return false;
        }
      }
    }

    return config.key !== undefined;
  }

  function defineKeyPropWarningGetter(props, displayName) {
    var warnAboutAccessingKey = function () {
      {
        if (!specialPropKeyWarningShown) {
          specialPropKeyWarningShown = true;

          error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
        }
      }
    };

    warnAboutAccessingKey.isReactWarning = true;
    Object.defineProperty(props, 'key', {
      get: warnAboutAccessingKey,
      configurable: true
    });
  }

  function defineRefPropWarningGetter(props, displayName) {
    var warnAboutAccessingRef = function () {
      {
        if (!specialPropRefWarningShown) {
          specialPropRefWarningShown = true;

          error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
        }
      }
    };

    warnAboutAccessingRef.isReactWarning = true;
    Object.defineProperty(props, 'ref', {
      get: warnAboutAccessingRef,
      configurable: true
    });
  }

  function warnIfStringRefCannotBeAutoConverted(config) {
    {
      if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
        var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);

        if (!didWarnAboutStringRefs[componentName]) {
          error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);

          didWarnAboutStringRefs[componentName] = true;
        }
      }
    }
  }
  /**
   * Factory method to create a new React element. This no longer adheres to
   * the class pattern, so do not use new to call it. Also, instanceof check
   * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
   * if something is a React Element.
   *
   * @param {*} type
   * @param {*} props
   * @param {*} key
   * @param {string|object} ref
   * @param {*} owner
   * @param {*} self A *temporary* helper to detect places where `this` is
   * different from the `owner` when React.createElement is called, so that we
   * can warn. We want to get rid of owner and replace string `ref`s with arrow
   * functions, and as long as `this` and owner are the same, there will be no
   * change in behavior.
   * @param {*} source An annotation object (added by a transpiler or otherwise)
   * indicating filename, line number, and/or other information.
   * @internal
   */


  var ReactElement = function (type, key, ref, self, source, owner, props) {
    var element = {
      // This tag allows us to uniquely identify this as a React Element
      $$typeof: REACT_ELEMENT_TYPE,
      // Built-in properties that belong on the element
      type: type,
      key: key,
      ref: ref,
      props: props,
      // Record the component responsible for creating this element.
      _owner: owner
    };

    {
      // The validation flag is currently mutative. We put it on
      // an external backing store so that we can freeze the whole object.
      // This can be replaced with a WeakMap once they are implemented in
      // commonly used development environments.
      element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
      // the validation flag non-enumerable (where possible, which should
      // include every environment we run tests in), so the test framework
      // ignores it.

      Object.defineProperty(element._store, 'validated', {
        configurable: false,
        enumerable: false,
        writable: true,
        value: false
      }); // self and source are DEV only properties.

      Object.defineProperty(element, '_self', {
        configurable: false,
        enumerable: false,
        writable: false,
        value: self
      }); // Two elements created in two different places should be considered
      // equal for testing purposes and therefore we hide it from enumeration.

      Object.defineProperty(element, '_source', {
        configurable: false,
        enumerable: false,
        writable: false,
        value: source
      });

      if (Object.freeze) {
        Object.freeze(element.props);
        Object.freeze(element);
      }
    }

    return element;
  };
  /**
   * Create and return a new ReactElement of the given type.
   * See https://reactjs.org/docs/react-api.html#createelement
   */

  function createElement(type, config, children) {
    var propName; // Reserved names are extracted

    var props = {};
    var key = null;
    var ref = null;
    var self = null;
    var source = null;

    if (config != null) {
      if (hasValidRef(config)) {
        ref = config.ref;

        {
          warnIfStringRefCannotBeAutoConverted(config);
        }
      }

      if (hasValidKey(config)) {
        {
          checkKeyStringCoercion(config.key);
        }

        key = '' + config.key;
      }

      self = config.__self === undefined ? null : config.__self;
      source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object

      for (propName in config) {
        if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
          props[propName] = config[propName];
        }
      }
    } // Children can be more than one argument, and those are transferred onto
    // the newly allocated props object.


    var childrenLength = arguments.length - 2;

    if (childrenLength === 1) {
      props.children = children;
    } else if (childrenLength > 1) {
      var childArray = Array(childrenLength);

      for (var i = 0; i < childrenLength; i++) {
        childArray[i] = arguments[i + 2];
      }

      {
        if (Object.freeze) {
          Object.freeze(childArray);
        }
      }

      props.children = childArray;
    } // Resolve default props


    if (type && type.defaultProps) {
      var defaultProps = type.defaultProps;

      for (propName in defaultProps) {
        if (props[propName] === undefined) {
          props[propName] = defaultProps[propName];
        }
      }
    }

    {
      if (key || ref) {
        var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;

        if (key) {
          defineKeyPropWarningGetter(props, displayName);
        }

        if (ref) {
          defineRefPropWarningGetter(props, displayName);
        }
      }
    }

    return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
  }
  function cloneAndReplaceKey(oldElement, newKey) {
    var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
    return newElement;
  }
  /**
   * Clone and return a new ReactElement using element as the starting point.
   * See https://reactjs.org/docs/react-api.html#cloneelement
   */

  function cloneElement(element, config, children) {
    if (element === null || element === undefined) {
      throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
    }

    var propName; // Original props are copied

    var props = assign({}, element.props); // Reserved names are extracted

    var key = element.key;
    var ref = element.ref; // Self is preserved since the owner is preserved.

    var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a
    // transpiler, and the original source is probably a better indicator of the
    // true owner.

    var source = element._source; // Owner will be preserved, unless ref is overridden

    var owner = element._owner;

    if (config != null) {
      if (hasValidRef(config)) {
        // Silently steal the ref from the parent.
        ref = config.ref;
        owner = ReactCurrentOwner.current;
      }

      if (hasValidKey(config)) {
        {
          checkKeyStringCoercion(config.key);
        }

        key = '' + config.key;
      } // Remaining properties override existing props


      var defaultProps;

      if (element.type && element.type.defaultProps) {
        defaultProps = element.type.defaultProps;
      }

      for (propName in config) {
        if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
          if (config[propName] === undefined && defaultProps !== undefined) {
            // Resolve default props
            props[propName] = defaultProps[propName];
          } else {
            props[propName] = config[propName];
          }
        }
      }
    } // Children can be more than one argument, and those are transferred onto
    // the newly allocated props object.


    var childrenLength = arguments.length - 2;

    if (childrenLength === 1) {
      props.children = children;
    } else if (childrenLength > 1) {
      var childArray = Array(childrenLength);

      for (var i = 0; i < childrenLength; i++) {
        childArray[i] = arguments[i + 2];
      }

      props.children = childArray;
    }

    return ReactElement(element.type, key, ref, self, source, owner, props);
  }
  /**
   * Verifies the object is a ReactElement.
   * See https://reactjs.org/docs/react-api.html#isvalidelement
   * @param {?object} object
   * @return {boolean} True if `object` is a ReactElement.
   * @final
   */

  function isValidElement(object) {
    return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
  }

  var SEPARATOR = '.';
  var SUBSEPARATOR = ':';
  /**
   * Escape and wrap key so it is safe to use as a reactid
   *
   * @param {string} key to be escaped.
   * @return {string} the escaped key.
   */

  function escape(key) {
    var escapeRegex = /[=:]/g;
    var escaperLookup = {
      '=': '=0',
      ':': '=2'
    };
    var escapedString = key.replace(escapeRegex, function (match) {
      return escaperLookup[match];
    });
    return '$' + escapedString;
  }
  /**
   * TODO: Test that a single child and an array with one item have the same key
   * pattern.
   */


  var didWarnAboutMaps = false;
  var userProvidedKeyEscapeRegex = /\/+/g;

  function escapeUserProvidedKey(text) {
    return text.replace(userProvidedKeyEscapeRegex, '$&/');
  }
  /**
   * Generate a key string that identifies a element within a set.
   *
   * @param {*} element A element that could contain a manual key.
   * @param {number} index Index that is used if a manual key is not provided.
   * @return {string}
   */


  function getElementKey(element, index) {
    // Do some typechecking here since we call this blindly. We want to ensure
    // that we don't block potential future ES APIs.
    if (typeof element === 'object' && element !== null && element.key != null) {
      // Explicit key
      {
        checkKeyStringCoercion(element.key);
      }

      return escape('' + element.key);
    } // Implicit key determined by the index in the set


    return index.toString(36);
  }

  function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
    var type = typeof children;

    if (type === 'undefined' || type === 'boolean') {
      // All of the above are perceived as null.
      children = null;
    }

    var invokeCallback = false;

    if (children === null) {
      invokeCallback = true;
    } else {
      switch (type) {
        case 'string':
        case 'number':
          invokeCallback = true;
          break;

        case 'object':
          switch (children.$$typeof) {
            case REACT_ELEMENT_TYPE:
            case REACT_PORTAL_TYPE:
              invokeCallback = true;
          }

      }
    }

    if (invokeCallback) {
      var _child = children;
      var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array
      // so that it's consistent if the number of children grows:

      var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;

      if (isArray(mappedChild)) {
        var escapedChildKey = '';

        if (childKey != null) {
          escapedChildKey = escapeUserProvidedKey(childKey) + '/';
        }

        mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {
          return c;
        });
      } else if (mappedChild != null) {
        if (isValidElement(mappedChild)) {
          {
            // The `if` statement here prevents auto-disabling of the safe
            // coercion ESLint rule, so we must manually disable it below.
            // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
            if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {
              checkKeyStringCoercion(mappedChild.key);
            }
          }

          mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as
          // traverseAllChildren used to do for objects as children
          escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
          mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
          // eslint-disable-next-line react-internal/safe-string-coercion
          escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);
        }

        array.push(mappedChild);
      }

      return 1;
    }

    var child;
    var nextName;
    var subtreeCount = 0; // Count of children found in the current subtree.

    var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;

    if (isArray(children)) {
      for (var i = 0; i < children.length; i++) {
        child = children[i];
        nextName = nextNamePrefix + getElementKey(child, i);
        subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
      }
    } else {
      var iteratorFn = getIteratorFn(children);

      if (typeof iteratorFn === 'function') {
        var iterableChildren = children;

        {
          // Warn about using Maps as children
          if (iteratorFn === iterableChildren.entries) {
            if (!didWarnAboutMaps) {
              warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
            }

            didWarnAboutMaps = true;
          }
        }

        var iterator = iteratorFn.call(iterableChildren);
        var step;
        var ii = 0;

        while (!(step = iterator.next()).done) {
          child = step.value;
          nextName = nextNamePrefix + getElementKey(child, ii++);
          subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
        }
      } else if (type === 'object') {
        // eslint-disable-next-line react-internal/safe-string-coercion
        var childrenString = String(children);
        throw new Error("Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + "). " + 'If you meant to render a collection of children, use an array ' + 'instead.');
      }
    }

    return subtreeCount;
  }

  /**
   * Maps children that are typically specified as `props.children`.
   *
   * See https://reactjs.org/docs/react-api.html#reactchildrenmap
   *
   * The provided mapFunction(child, index) will be called for each
   * leaf child.
   *
   * @param {?*} children Children tree container.
   * @param {function(*, int)} func The map function.
   * @param {*} context Context for mapFunction.
   * @return {object} Object containing the ordered map of results.
   */
  function mapChildren(children, func, context) {
    if (children == null) {
      return children;
    }

    var result = [];
    var count = 0;
    mapIntoArray(children, result, '', '', function (child) {
      return func.call(context, child, count++);
    });
    return result;
  }
  /**
   * Count the number of children that are typically specified as
   * `props.children`.
   *
   * See https://reactjs.org/docs/react-api.html#reactchildrencount
   *
   * @param {?*} children Children tree container.
   * @return {number} The number of children.
   */


  function countChildren(children) {
    var n = 0;
    mapChildren(children, function () {
      n++; // Don't return anything
    });
    return n;
  }

  /**
   * Iterates through children that are typically specified as `props.children`.
   *
   * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
   *
   * The provided forEachFunc(child, index) will be called for each
   * leaf child.
   *
   * @param {?*} children Children tree container.
   * @param {function(*, int)} forEachFunc
   * @param {*} forEachContext Context for forEachContext.
   */
  function forEachChildren(children, forEachFunc, forEachContext) {
    mapChildren(children, function () {
      forEachFunc.apply(this, arguments); // Don't return anything.
    }, forEachContext);
  }
  /**
   * Flatten a children object (typically specified as `props.children`) and
   * return an array with appropriately re-keyed children.
   *
   * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
   */


  function toArray(children) {
    return mapChildren(children, function (child) {
      return child;
    }) || [];
  }
  /**
   * Returns the first child in a collection of children and verifies that there
   * is only one child in the collection.
   *
   * See https://reactjs.org/docs/react-api.html#reactchildrenonly
   *
   * The current implementation of this function assumes that a single child gets
   * passed without a wrapper, but the purpose of this helper function is to
   * abstract away the particular structure of children.
   *
   * @param {?object} children Child collection structure.
   * @return {ReactElement} The first and only `ReactElement` contained in the
   * structure.
   */


  function onlyChild(children) {
    if (!isValidElement(children)) {
      throw new Error('React.Children.only expected to receive a single React element child.');
    }

    return children;
  }

  function createContext(defaultValue) {
    // TODO: Second argument used to be an optional `calculateChangedBits`
    // function. Warn to reserve for future use?
    var context = {
      $$typeof: REACT_CONTEXT_TYPE,
      // As a workaround to support multiple concurrent renderers, we categorize
      // some renderers as primary and others as secondary. We only expect
      // there to be two concurrent renderers at most: React Native (primary) and
      // Fabric (secondary); React DOM (primary) and React ART (secondary).
      // Secondary renderers store their context values on separate fields.
      _currentValue: defaultValue,
      _currentValue2: defaultValue,
      // Used to track how many concurrent renderers this context currently
      // supports within in a single renderer. Such as parallel server rendering.
      _threadCount: 0,
      // These are circular
      Provider: null,
      Consumer: null,
      // Add these to use same hidden class in VM as ServerContext
      _defaultValue: null,
      _globalName: null
    };
    context.Provider = {
      $$typeof: REACT_PROVIDER_TYPE,
      _context: context
    };
    var hasWarnedAboutUsingNestedContextConsumers = false;
    var hasWarnedAboutUsingConsumerProvider = false;
    var hasWarnedAboutDisplayNameOnConsumer = false;

    {
      // A separate object, but proxies back to the original context object for
      // backwards compatibility. It has a different $$typeof, so we can properly
      // warn for the incorrect usage of Context as a Consumer.
      var Consumer = {
        $$typeof: REACT_CONTEXT_TYPE,
        _context: context
      }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here

      Object.defineProperties(Consumer, {
        Provider: {
          get: function () {
            if (!hasWarnedAboutUsingConsumerProvider) {
              hasWarnedAboutUsingConsumerProvider = true;

              error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');
            }

            return context.Provider;
          },
          set: function (_Provider) {
            context.Provider = _Provider;
          }
        },
        _currentValue: {
          get: function () {
            return context._currentValue;
          },
          set: function (_currentValue) {
            context._currentValue = _currentValue;
          }
        },
        _currentValue2: {
          get: function () {
            return context._currentValue2;
          },
          set: function (_currentValue2) {
            context._currentValue2 = _currentValue2;
          }
        },
        _threadCount: {
          get: function () {
            return context._threadCount;
          },
          set: function (_threadCount) {
            context._threadCount = _threadCount;
          }
        },
        Consumer: {
          get: function () {
            if (!hasWarnedAboutUsingNestedContextConsumers) {
              hasWarnedAboutUsingNestedContextConsumers = true;

              error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
            }

            return context.Consumer;
          }
        },
        displayName: {
          get: function () {
            return context.displayName;
          },
          set: function (displayName) {
            if (!hasWarnedAboutDisplayNameOnConsumer) {
              warn('Setting `displayName` on Context.Consumer has no effect. ' + "You should set it directly on the context with Context.displayName = '%s'.", displayName);

              hasWarnedAboutDisplayNameOnConsumer = true;
            }
          }
        }
      }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty

      context.Consumer = Consumer;
    }

    {
      context._currentRenderer = null;
      context._currentRenderer2 = null;
    }

    return context;
  }

  var Uninitialized = -1;
  var Pending = 0;
  var Resolved = 1;
  var Rejected = 2;

  function lazyInitializer(payload) {
    if (payload._status === Uninitialized) {
      var ctor = payload._result;
      var thenable = ctor(); // Transition to the next state.
      // This might throw either because it's missing or throws. If so, we treat it
      // as still uninitialized and try again next time. Which is the same as what
      // happens if the ctor or any wrappers processing the ctor throws. This might
      // end up fixing it if the resolution was a concurrency bug.

      thenable.then(function (moduleObject) {
        if (payload._status === Pending || payload._status === Uninitialized) {
          // Transition to the next state.
          var resolved = payload;
          resolved._status = Resolved;
          resolved._result = moduleObject;
        }
      }, function (error) {
        if (payload._status === Pending || payload._status === Uninitialized) {
          // Transition to the next state.
          var rejected = payload;
          rejected._status = Rejected;
          rejected._result = error;
        }
      });

      if (payload._status === Uninitialized) {
        // In case, we're still uninitialized, then we're waiting for the thenable
        // to resolve. Set it as pending in the meantime.
        var pending = payload;
        pending._status = Pending;
        pending._result = thenable;
      }
    }

    if (payload._status === Resolved) {
      var moduleObject = payload._result;

      {
        if (moduleObject === undefined) {
          error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\n\nYour code should look like: \n  ' + // Break up imports to avoid accidentally parsing them as dependencies.
          'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))\n\n" + 'Did you accidentally put curly braces around the import?', moduleObject);
        }
      }

      {
        if (!('default' in moduleObject)) {
          error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\n\nYour code should look like: \n  ' + // Break up imports to avoid accidentally parsing them as dependencies.
          'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))", moduleObject);
        }
      }

      return moduleObject.default;
    } else {
      throw payload._result;
    }
  }

  function lazy(ctor) {
    var payload = {
      // We use these fields to store the result.
      _status: Uninitialized,
      _result: ctor
    };
    var lazyType = {
      $$typeof: REACT_LAZY_TYPE,
      _payload: payload,
      _init: lazyInitializer
    };

    {
      // In production, this would just set it on the object.
      var defaultProps;
      var propTypes; // $FlowFixMe

      Object.defineProperties(lazyType, {
        defaultProps: {
          configurable: true,
          get: function () {
            return defaultProps;
          },
          set: function (newDefaultProps) {
            error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');

            defaultProps = newDefaultProps; // Match production behavior more closely:
            // $FlowFixMe

            Object.defineProperty(lazyType, 'defaultProps', {
              enumerable: true
            });
          }
        },
        propTypes: {
          configurable: true,
          get: function () {
            return propTypes;
          },
          set: function (newPropTypes) {
            error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');

            propTypes = newPropTypes; // Match production behavior more closely:
            // $FlowFixMe

            Object.defineProperty(lazyType, 'propTypes', {
              enumerable: true
            });
          }
        }
      });
    }

    return lazyType;
  }

  function forwardRef(render) {
    {
      if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
        error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
      } else if (typeof render !== 'function') {
        error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
      } else {
        if (render.length !== 0 && render.length !== 2) {
          error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');
        }
      }

      if (render != null) {
        if (render.defaultProps != null || render.propTypes != null) {
          error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
        }
      }
    }

    var elementType = {
      $$typeof: REACT_FORWARD_REF_TYPE,
      render: render
    };

    {
      var ownName;
      Object.defineProperty(elementType, 'displayName', {
        enumerable: false,
        configurable: true,
        get: function () {
          return ownName;
        },
        set: function (name) {
          ownName = name; // The inner component shouldn't inherit this display name in most cases,
          // because the component may be used elsewhere.
          // But it's nice for anonymous functions to inherit the name,
          // so that our component-stack generation logic will display their frames.
          // An anonymous function generally suggests a pattern like:
          //   React.forwardRef((props, ref) => {...});
          // This kind of inner function is not used elsewhere so the side effect is okay.

          if (!render.name && !render.displayName) {
            render.displayName = name;
          }
        }
      });
    }

    return elementType;
  }

  var REACT_MODULE_REFERENCE;

  {
    REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
  }

  function isValidElementType(type) {
    if (typeof type === 'string' || typeof type === 'function') {
      return true;
    } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).


    if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing  || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden  || type === REACT_OFFSCREEN_TYPE || enableScopeAPI  || enableCacheElement  || enableTransitionTracing ) {
      return true;
    }

    if (typeof type === 'object' && type !== null) {
      if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
      // types supported by any Flight configuration anywhere since
      // we don't know which Flight build this will end up being used
      // with.
      type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
        return true;
      }
    }

    return false;
  }

  function memo(type, compare) {
    {
      if (!isValidElementType(type)) {
        error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
      }
    }

    var elementType = {
      $$typeof: REACT_MEMO_TYPE,
      type: type,
      compare: compare === undefined ? null : compare
    };

    {
      var ownName;
      Object.defineProperty(elementType, 'displayName', {
        enumerable: false,
        configurable: true,
        get: function () {
          return ownName;
        },
        set: function (name) {
          ownName = name; // The inner component shouldn't inherit this display name in most cases,
          // because the component may be used elsewhere.
          // But it's nice for anonymous functions to inherit the name,
          // so that our component-stack generation logic will display their frames.
          // An anonymous function generally suggests a pattern like:
          //   React.memo((props) => {...});
          // This kind of inner function is not used elsewhere so the side effect is okay.

          if (!type.name && !type.displayName) {
            type.displayName = name;
          }
        }
      });
    }

    return elementType;
  }

  function resolveDispatcher() {
    var dispatcher = ReactCurrentDispatcher.current;

    {
      if (dispatcher === null) {
        error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');
      }
    } // Will result in a null access error if accessed outside render phase. We
    // intentionally don't throw our own error because this is in a hot path.
    // Also helps ensure this is inlined.


    return dispatcher;
  }
  function useContext(Context) {
    var dispatcher = resolveDispatcher();

    {
      // TODO: add a more generic warning for invalid values.
      if (Context._context !== undefined) {
        var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
        // and nobody should be using this in existing code.

        if (realContext.Consumer === Context) {
          error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');
        } else if (realContext.Provider === Context) {
          error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
        }
      }
    }

    return dispatcher.useContext(Context);
  }
  function useState(initialState) {
    var dispatcher = resolveDispatcher();
    return dispatcher.useState(initialState);
  }
  function useReducer(reducer, initialArg, init) {
    var dispatcher = resolveDispatcher();
    return dispatcher.useReducer(reducer, initialArg, init);
  }
  function useRef(initialValue) {
    var dispatcher = resolveDispatcher();
    return dispatcher.useRef(initialValue);
  }
  function useEffect(create, deps) {
    var dispatcher = resolveDispatcher();
    return dispatcher.useEffect(create, deps);
  }
  function useInsertionEffect(create, deps) {
    var dispatcher = resolveDispatcher();
    return dispatcher.useInsertionEffect(create, deps);
  }
  function useLayoutEffect(create, deps) {
    var dispatcher = resolveDispatcher();
    return dispatcher.useLayoutEffect(create, deps);
  }
  function useCallback(callback, deps) {
    var dispatcher = resolveDispatcher();
    return dispatcher.useCallback(callback, deps);
  }
  function useMemo(create, deps) {
    var dispatcher = resolveDispatcher();
    return dispatcher.useMemo(create, deps);
  }
  function useImperativeHandle(ref, create, deps) {
    var dispatcher = resolveDispatcher();
    return dispatcher.useImperativeHandle(ref, create, deps);
  }
  function useDebugValue(value, formatterFn) {
    {
      var dispatcher = resolveDispatcher();
      return dispatcher.useDebugValue(value, formatterFn);
    }
  }
  function useTransition() {
    var dispatcher = resolveDispatcher();
    return dispatcher.useTransition();
  }
  function useDeferredValue(value) {
    var dispatcher = resolveDispatcher();
    return dispatcher.useDeferredValue(value);
  }
  function useId() {
    var dispatcher = resolveDispatcher();
    return dispatcher.useId();
  }
  function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
    var dispatcher = resolveDispatcher();
    return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
  }

  // Helpers to patch console.logs to avoid logging during side-effect free
  // replaying on render function. This currently only patches the object
  // lazily which won't cover if the log function was extracted eagerly.
  // We could also eagerly patch the method.
  var disabledDepth = 0;
  var prevLog;
  var prevInfo;
  var prevWarn;
  var prevError;
  var prevGroup;
  var prevGroupCollapsed;
  var prevGroupEnd;

  function disabledLog() {}

  disabledLog.__reactDisabledLog = true;
  function disableLogs() {
    {
      if (disabledDepth === 0) {
        /* eslint-disable react-internal/no-production-logging */
        prevLog = console.log;
        prevInfo = console.info;
        prevWarn = console.warn;
        prevError = console.error;
        prevGroup = console.group;
        prevGroupCollapsed = console.groupCollapsed;
        prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099

        var props = {
          configurable: true,
          enumerable: true,
          value: disabledLog,
          writable: true
        }; // $FlowFixMe Flow thinks console is immutable.

        Object.defineProperties(console, {
          info: props,
          log: props,
          warn: props,
          error: props,
          group: props,
          groupCollapsed: props,
          groupEnd: props
        });
        /* eslint-enable react-internal/no-production-logging */
      }

      disabledDepth++;
    }
  }
  function reenableLogs() {
    {
      disabledDepth--;

      if (disabledDepth === 0) {
        /* eslint-disable react-internal/no-production-logging */
        var props = {
          configurable: true,
          enumerable: true,
          writable: true
        }; // $FlowFixMe Flow thinks console is immutable.

        Object.defineProperties(console, {
          log: assign({}, props, {
            value: prevLog
          }),
          info: assign({}, props, {
            value: prevInfo
          }),
          warn: assign({}, props, {
            value: prevWarn
          }),
          error: assign({}, props, {
            value: prevError
          }),
          group: assign({}, props, {
            value: prevGroup
          }),
          groupCollapsed: assign({}, props, {
            value: prevGroupCollapsed
          }),
          groupEnd: assign({}, props, {
            value: prevGroupEnd
          })
        });
        /* eslint-enable react-internal/no-production-logging */
      }

      if (disabledDepth < 0) {
        error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
      }
    }
  }

  var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
  var prefix;
  function describeBuiltInComponentFrame(name, source, ownerFn) {
    {
      if (prefix === undefined) {
        // Extract the VM specific prefix used by each line.
        try {
          throw Error();
        } catch (x) {
          var match = x.stack.trim().match(/\n( *(at )?)/);
          prefix = match && match[1] || '';
        }
      } // We use the prefix to ensure our stacks line up with native stack frames.


      return '\n' + prefix + name;
    }
  }
  var reentry = false;
  var componentFrameCache;

  {
    var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
    componentFrameCache = new PossiblyWeakMap();
  }

  function describeNativeComponentFrame(fn, construct) {
    // If something asked for a stack inside a fake render, it should get ignored.
    if ( !fn || reentry) {
      return '';
    }

    {
      var frame = componentFrameCache.get(fn);

      if (frame !== undefined) {
        return frame;
      }
    }

    var control;
    reentry = true;
    var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.

    Error.prepareStackTrace = undefined;
    var previousDispatcher;

    {
      previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function
      // for warnings.

      ReactCurrentDispatcher$1.current = null;
      disableLogs();
    }

    try {
      // This should throw.
      if (construct) {
        // Something should be setting the props in the constructor.
        var Fake = function () {
          throw Error();
        }; // $FlowFixMe


        Object.defineProperty(Fake.prototype, 'props', {
          set: function () {
            // We use a throwing setter instead of frozen or non-writable props
            // because that won't throw in a non-strict mode function.
            throw Error();
          }
        });

        if (typeof Reflect === 'object' && Reflect.construct) {
          // We construct a different control for this case to include any extra
          // frames added by the construct call.
          try {
            Reflect.construct(Fake, []);
          } catch (x) {
            control = x;
          }

          Reflect.construct(fn, [], Fake);
        } else {
          try {
            Fake.call();
          } catch (x) {
            control = x;
          }

          fn.call(Fake.prototype);
        }
      } else {
        try {
          throw Error();
        } catch (x) {
          control = x;
        }

        fn();
      }
    } catch (sample) {
      // This is inlined manually because closure doesn't do it for us.
      if (sample && control && typeof sample.stack === 'string') {
        // This extracts the first frame from the sample that isn't also in the control.
        // Skipping one frame that we assume is the frame that calls the two.
        var sampleLines = sample.stack.split('\n');
        var controlLines = control.stack.split('\n');
        var s = sampleLines.length - 1;
        var c = controlLines.length - 1;

        while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
          // We expect at least one stack frame to be shared.
          // Typically this will be the root most one. However, stack frames may be
          // cut off due to maximum stack limits. In this case, one maybe cut off
          // earlier than the other. We assume that the sample is longer or the same
          // and there for cut off earlier. So we should find the root most frame in
          // the sample somewhere in the control.
          c--;
        }

        for (; s >= 1 && c >= 0; s--, c--) {
          // Next we find the first one that isn't the same which should be the
          // frame that called our sample function and the control.
          if (sampleLines[s] !== controlLines[c]) {
            // In V8, the first line is describing the message but other VMs don't.
            // If we're about to return the first line, and the control is also on the same
            // line, that's a pretty good indicator that our sample threw at same line as
            // the control. I.e. before we entered the sample frame. So we ignore this result.
            // This can happen if you passed a class to function component, or non-function.
            if (s !== 1 || c !== 1) {
              do {
                s--;
                c--; // We may still have similar intermediate frames from the construct call.
                // The next one that isn't the same should be our match though.

                if (c < 0 || sampleLines[s] !== controlLines[c]) {
                  // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
                  var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
                  // but we have a user-provided "displayName"
                  // splice it in to make the stack more readable.


                  if (fn.displayName && _frame.includes('<anonymous>')) {
                    _frame = _frame.replace('<anonymous>', fn.displayName);
                  }

                  {
                    if (typeof fn === 'function') {
                      componentFrameCache.set(fn, _frame);
                    }
                  } // Return the line we found.


                  return _frame;
                }
              } while (s >= 1 && c >= 0);
            }

            break;
          }
        }
      }
    } finally {
      reentry = false;

      {
        ReactCurrentDispatcher$1.current = previousDispatcher;
        reenableLogs();
      }

      Error.prepareStackTrace = previousPrepareStackTrace;
    } // Fallback to just using the name if we couldn't make it throw.


    var name = fn ? fn.displayName || fn.name : '';
    var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';

    {
      if (typeof fn === 'function') {
        componentFrameCache.set(fn, syntheticFrame);
      }
    }

    return syntheticFrame;
  }
  function describeFunctionComponentFrame(fn, source, ownerFn) {
    {
      return describeNativeComponentFrame(fn, false);
    }
  }

  function shouldConstruct(Component) {
    var prototype = Component.prototype;
    return !!(prototype && prototype.isReactComponent);
  }

  function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {

    if (type == null) {
      return '';
    }

    if (typeof type === 'function') {
      {
        return describeNativeComponentFrame(type, shouldConstruct(type));
      }
    }

    if (typeof type === 'string') {
      return describeBuiltInComponentFrame(type);
    }

    switch (type) {
      case REACT_SUSPENSE_TYPE:
        return describeBuiltInComponentFrame('Suspense');

      case REACT_SUSPENSE_LIST_TYPE:
        return describeBuiltInComponentFrame('SuspenseList');
    }

    if (typeof type === 'object') {
      switch (type.$$typeof) {
        case REACT_FORWARD_REF_TYPE:
          return describeFunctionComponentFrame(type.render);

        case REACT_MEMO_TYPE:
          // Memo may contain any component type so we recursively resolve it.
          return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);

        case REACT_LAZY_TYPE:
          {
            var lazyComponent = type;
            var payload = lazyComponent._payload;
            var init = lazyComponent._init;

            try {
              // Lazy may contain any component type so we recursively resolve it.
              return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
            } catch (x) {}
          }
      }
    }

    return '';
  }

  var loggedTypeFailures = {};
  var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;

  function setCurrentlyValidatingElement(element) {
    {
      if (element) {
        var owner = element._owner;
        var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
        ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
      } else {
        ReactDebugCurrentFrame$1.setExtraStackFrame(null);
      }
    }
  }

  function checkPropTypes(typeSpecs, values, location, componentName, element) {
    {
      // $FlowFixMe This is okay but Flow doesn't know it.
      var has = Function.call.bind(hasOwnProperty);

      for (var typeSpecName in typeSpecs) {
        if (has(typeSpecs, typeSpecName)) {
          var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
          // fail the render phase where it didn't fail before. So we log it.
          // After these have been cleaned up, we'll let them throw.

          try {
            // This is intentionally an invariant that gets caught. It's the same
            // behavior as without this statement except with a better message.
            if (typeof typeSpecs[typeSpecName] !== 'function') {
              // eslint-disable-next-line react-internal/prod-error-codes
              var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
              err.name = 'Invariant Violation';
              throw err;
            }

            error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
          } catch (ex) {
            error$1 = ex;
          }

          if (error$1 && !(error$1 instanceof Error)) {
            setCurrentlyValidatingElement(element);

            error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);

            setCurrentlyValidatingElement(null);
          }

          if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
            // Only monitor this failure once because there tends to be a lot of the
            // same error.
            loggedTypeFailures[error$1.message] = true;
            setCurrentlyValidatingElement(element);

            error('Failed %s type: %s', location, error$1.message);

            setCurrentlyValidatingElement(null);
          }
        }
      }
    }
  }

  function setCurrentlyValidatingElement$1(element) {
    {
      if (element) {
        var owner = element._owner;
        var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
        setExtraStackFrame(stack);
      } else {
        setExtraStackFrame(null);
      }
    }
  }

  var propTypesMisspellWarningShown;

  {
    propTypesMisspellWarningShown = false;
  }

  function getDeclarationErrorAddendum() {
    if (ReactCurrentOwner.current) {
      var name = getComponentNameFromType(ReactCurrentOwner.current.type);

      if (name) {
        return '\n\nCheck the render method of `' + name + '`.';
      }
    }

    return '';
  }

  function getSourceInfoErrorAddendum(source) {
    if (source !== undefined) {
      var fileName = source.fileName.replace(/^.*[\\\/]/, '');
      var lineNumber = source.lineNumber;
      return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
    }

    return '';
  }

  function getSourceInfoErrorAddendumForProps(elementProps) {
    if (elementProps !== null && elementProps !== undefined) {
      return getSourceInfoErrorAddendum(elementProps.__source);
    }

    return '';
  }
  /**
   * Warn if there's no key explicitly set on dynamic arrays of children or
   * object keys are not valid. This allows us to keep track of children between
   * updates.
   */


  var ownerHasKeyUseWarning = {};

  function getCurrentComponentErrorInfo(parentType) {
    var info = getDeclarationErrorAddendum();

    if (!info) {
      var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;

      if (parentName) {
        info = "\n\nCheck the top-level render call using <" + parentName + ">.";
      }
    }

    return info;
  }
  /**
   * Warn if the element doesn't have an explicit key assigned to it.
   * This element is in an array. The array could grow and shrink or be
   * reordered. All children that haven't already been validated are required to
   * have a "key" property assigned to it. Error statuses are cached so a warning
   * will only be shown once.
   *
   * @internal
   * @param {ReactElement} element Element that requires a key.
   * @param {*} parentType element's parent's type.
   */


  function validateExplicitKey(element, parentType) {
    if (!element._store || element._store.validated || element.key != null) {
      return;
    }

    element._store.validated = true;
    var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);

    if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
      return;
    }

    ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
    // property, it may be the creator of the child that's responsible for
    // assigning it a key.

    var childOwner = '';

    if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
      // Give the component that originally created this child.
      childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
    }

    {
      setCurrentlyValidatingElement$1(element);

      error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);

      setCurrentlyValidatingElement$1(null);
    }
  }
  /**
   * Ensure that every element either is passed in a static location, in an
   * array with an explicit keys property defined, or in an object literal
   * with valid key property.
   *
   * @internal
   * @param {ReactNode} node Statically passed child of any type.
   * @param {*} parentType node's parent's type.
   */


  function validateChildKeys(node, parentType) {
    if (typeof node !== 'object') {
      return;
    }

    if (isArray(node)) {
      for (var i = 0; i < node.length; i++) {
        var child = node[i];

        if (isValidElement(child)) {
          validateExplicitKey(child, parentType);
        }
      }
    } else if (isValidElement(node)) {
      // This element was passed in a valid location.
      if (node._store) {
        node._store.validated = true;
      }
    } else if (node) {
      var iteratorFn = getIteratorFn(node);

      if (typeof iteratorFn === 'function') {
        // Entry iterators used to provide implicit keys,
        // but now we print a separate warning for them later.
        if (iteratorFn !== node.entries) {
          var iterator = iteratorFn.call(node);
          var step;

          while (!(step = iterator.next()).done) {
            if (isValidElement(step.value)) {
              validateExplicitKey(step.value, parentType);
            }
          }
        }
      }
    }
  }
  /**
   * Given an element, validate that its props follow the propTypes definition,
   * provided by the type.
   *
   * @param {ReactElement} element
   */


  function validatePropTypes(element) {
    {
      var type = element.type;

      if (type === null || type === undefined || typeof type === 'string') {
        return;
      }

      var propTypes;

      if (typeof type === 'function') {
        propTypes = type.propTypes;
      } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
      // Inner props are checked in the reconciler.
      type.$$typeof === REACT_MEMO_TYPE)) {
        propTypes = type.propTypes;
      } else {
        return;
      }

      if (propTypes) {
        // Intentionally inside to avoid triggering lazy initializers:
        var name = getComponentNameFromType(type);
        checkPropTypes(propTypes, element.props, 'prop', name, element);
      } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
        propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:

        var _name = getComponentNameFromType(type);

        error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
      }

      if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
        error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
      }
    }
  }
  /**
   * Given a fragment, validate that it can only be provided with fragment props
   * @param {ReactElement} fragment
   */


  function validateFragmentProps(fragment) {
    {
      var keys = Object.keys(fragment.props);

      for (var i = 0; i < keys.length; i++) {
        var key = keys[i];

        if (key !== 'children' && key !== 'key') {
          setCurrentlyValidatingElement$1(fragment);

          error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);

          setCurrentlyValidatingElement$1(null);
          break;
        }
      }

      if (fragment.ref !== null) {
        setCurrentlyValidatingElement$1(fragment);

        error('Invalid attribute `ref` supplied to `React.Fragment`.');

        setCurrentlyValidatingElement$1(null);
      }
    }
  }
  function createElementWithValidation(type, props, children) {
    var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
    // succeed and there will likely be errors in render.

    if (!validType) {
      var info = '';

      if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
        info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
      }

      var sourceInfo = getSourceInfoErrorAddendumForProps(props);

      if (sourceInfo) {
        info += sourceInfo;
      } else {
        info += getDeclarationErrorAddendum();
      }

      var typeString;

      if (type === null) {
        typeString = 'null';
      } else if (isArray(type)) {
        typeString = 'array';
      } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
        typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
        info = ' Did you accidentally export a JSX literal instead of a component?';
      } else {
        typeString = typeof type;
      }

      {
        error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
      }
    }

    var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.
    // TODO: Drop this when these are no longer allowed as the type argument.

    if (element == null) {
      return element;
    } // Skip key warning if the type isn't valid since our key validation logic
    // doesn't expect a non-string/function type and can throw confusing errors.
    // We don't want exception behavior to differ between dev and prod.
    // (Rendering will throw with a helpful message and as soon as the type is
    // fixed, the key warnings will appear.)


    if (validType) {
      for (var i = 2; i < arguments.length; i++) {
        validateChildKeys(arguments[i], type);
      }
    }

    if (type === REACT_FRAGMENT_TYPE) {
      validateFragmentProps(element);
    } else {
      validatePropTypes(element);
    }

    return element;
  }
  var didWarnAboutDeprecatedCreateFactory = false;
  function createFactoryWithValidation(type) {
    var validatedFactory = createElementWithValidation.bind(null, type);
    validatedFactory.type = type;

    {
      if (!didWarnAboutDeprecatedCreateFactory) {
        didWarnAboutDeprecatedCreateFactory = true;

        warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');
      } // Legacy hook: remove it


      Object.defineProperty(validatedFactory, 'type', {
        enumerable: false,
        get: function () {
          warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');

          Object.defineProperty(this, 'type', {
            value: type
          });
          return type;
        }
      });
    }

    return validatedFactory;
  }
  function cloneElementWithValidation(element, props, children) {
    var newElement = cloneElement.apply(this, arguments);

    for (var i = 2; i < arguments.length; i++) {
      validateChildKeys(arguments[i], newElement.type);
    }

    validatePropTypes(newElement);
    return newElement;
  }

  var enableSchedulerDebugging = false;
  var enableProfiling = false;
  var frameYieldMs = 5;

  function push(heap, node) {
    var index = heap.length;
    heap.push(node);
    siftUp(heap, node, index);
  }
  function peek(heap) {
    return heap.length === 0 ? null : heap[0];
  }
  function pop(heap) {
    if (heap.length === 0) {
      return null;
    }

    var first = heap[0];
    var last = heap.pop();

    if (last !== first) {
      heap[0] = last;
      siftDown(heap, last, 0);
    }

    return first;
  }

  function siftUp(heap, node, i) {
    var index = i;

    while (index > 0) {
      var parentIndex = index - 1 >>> 1;
      var parent = heap[parentIndex];

      if (compare(parent, node) > 0) {
        // The parent is larger. Swap positions.
        heap[parentIndex] = node;
        heap[index] = parent;
        index = parentIndex;
      } else {
        // The parent is smaller. Exit.
        return;
      }
    }
  }

  function siftDown(heap, node, i) {
    var index = i;
    var length = heap.length;
    var halfLength = length >>> 1;

    while (index < halfLength) {
      var leftIndex = (index + 1) * 2 - 1;
      var left = heap[leftIndex];
      var rightIndex = leftIndex + 1;
      var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those.

      if (compare(left, node) < 0) {
        if (rightIndex < length && compare(right, left) < 0) {
          heap[index] = right;
          heap[rightIndex] = node;
          index = rightIndex;
        } else {
          heap[index] = left;
          heap[leftIndex] = node;
          index = leftIndex;
        }
      } else if (rightIndex < length && compare(right, node) < 0) {
        heap[index] = right;
        heap[rightIndex] = node;
        index = rightIndex;
      } else {
        // Neither child is smaller. Exit.
        return;
      }
    }
  }

  function compare(a, b) {
    // Compare sort index first, then task id.
    var diff = a.sortIndex - b.sortIndex;
    return diff !== 0 ? diff : a.id - b.id;
  }

  // TODO: Use symbols?
  var ImmediatePriority = 1;
  var UserBlockingPriority = 2;
  var NormalPriority = 3;
  var LowPriority = 4;
  var IdlePriority = 5;

  function markTaskErrored(task, ms) {
  }

  /* eslint-disable no-var */
  var getCurrentTime;
  var hasPerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';

  if (hasPerformanceNow) {
    var localPerformance = performance;

    getCurrentTime = function () {
      return localPerformance.now();
    };
  } else {
    var localDate = Date;
    var initialTime = localDate.now();

    getCurrentTime = function () {
      return localDate.now() - initialTime;
    };
  } // Max 31 bit integer. The max integer size in V8 for 32-bit systems.
  // Math.pow(2, 30) - 1
  // 0b111111111111111111111111111111


  var maxSigned31BitInt = 1073741823; // Times out immediately

  var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out

  var USER_BLOCKING_PRIORITY_TIMEOUT = 250;
  var NORMAL_PRIORITY_TIMEOUT = 5000;
  var LOW_PRIORITY_TIMEOUT = 10000; // Never times out

  var IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; // Tasks are stored on a min heap

  var taskQueue = [];
  var timerQueue = []; // Incrementing id counter. Used to maintain insertion order.

  var taskIdCounter = 1; // Pausing the scheduler is useful for debugging.
  var currentTask = null;
  var currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrance.

  var isPerformingWork = false;
  var isHostCallbackScheduled = false;
  var isHostTimeoutScheduled = false; // Capture local references to native APIs, in case a polyfill overrides them.

  var localSetTimeout = typeof setTimeout === 'function' ? setTimeout : null;
  var localClearTimeout = typeof clearTimeout === 'function' ? clearTimeout : null;
  var localSetImmediate = typeof setImmediate !== 'undefined' ? setImmediate : null; // IE and Node.js + jsdom

  var isInputPending = typeof navigator !== 'undefined' && navigator.scheduling !== undefined && navigator.scheduling.isInputPending !== undefined ? navigator.scheduling.isInputPending.bind(navigator.scheduling) : null;

  function advanceTimers(currentTime) {
    // Check for tasks that are no longer delayed and add them to the queue.
    var timer = peek(timerQueue);

    while (timer !== null) {
      if (timer.callback === null) {
        // Timer was cancelled.
        pop(timerQueue);
      } else if (timer.startTime <= currentTime) {
        // Timer fired. Transfer to the task queue.
        pop(timerQueue);
        timer.sortIndex = timer.expirationTime;
        push(taskQueue, timer);
      } else {
        // Remaining timers are pending.
        return;
      }

      timer = peek(timerQueue);
    }
  }

  function handleTimeout(currentTime) {
    isHostTimeoutScheduled = false;
    advanceTimers(currentTime);

    if (!isHostCallbackScheduled) {
      if (peek(taskQueue) !== null) {
        isHostCallbackScheduled = true;
        requestHostCallback(flushWork);
      } else {
        var firstTimer = peek(timerQueue);

        if (firstTimer !== null) {
          requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
        }
      }
    }
  }

  function flushWork(hasTimeRemaining, initialTime) {


    isHostCallbackScheduled = false;

    if (isHostTimeoutScheduled) {
      // We scheduled a timeout but it's no longer needed. Cancel it.
      isHostTimeoutScheduled = false;
      cancelHostTimeout();
    }

    isPerformingWork = true;
    var previousPriorityLevel = currentPriorityLevel;

    try {
      if (enableProfiling) {
        try {
          return workLoop(hasTimeRemaining, initialTime);
        } catch (error) {
          if (currentTask !== null) {
            var currentTime = getCurrentTime();
            markTaskErrored(currentTask, currentTime);
            currentTask.isQueued = false;
          }

          throw error;
        }
      } else {
        // No catch in prod code path.
        return workLoop(hasTimeRemaining, initialTime);
      }
    } finally {
      currentTask = null;
      currentPriorityLevel = previousPriorityLevel;
      isPerformingWork = false;
    }
  }

  function workLoop(hasTimeRemaining, initialTime) {
    var currentTime = initialTime;
    advanceTimers(currentTime);
    currentTask = peek(taskQueue);

    while (currentTask !== null && !(enableSchedulerDebugging )) {
      if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) {
        // This currentTask hasn't expired, and we've reached the deadline.
        break;
      }

      var callback = currentTask.callback;

      if (typeof callback === 'function') {
        currentTask.callback = null;
        currentPriorityLevel = currentTask.priorityLevel;
        var didUserCallbackTimeout = currentTask.expirationTime <= currentTime;

        var continuationCallback = callback(didUserCallbackTimeout);
        currentTime = getCurrentTime();

        if (typeof continuationCallback === 'function') {
          currentTask.callback = continuationCallback;
        } else {

          if (currentTask === peek(taskQueue)) {
            pop(taskQueue);
          }
        }

        advanceTimers(currentTime);
      } else {
        pop(taskQueue);
      }

      currentTask = peek(taskQueue);
    } // Return whether there's additional work


    if (currentTask !== null) {
      return true;
    } else {
      var firstTimer = peek(timerQueue);

      if (firstTimer !== null) {
        requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
      }

      return false;
    }
  }

  function unstable_runWithPriority(priorityLevel, eventHandler) {
    switch (priorityLevel) {
      case ImmediatePriority:
      case UserBlockingPriority:
      case NormalPriority:
      case LowPriority:
      case IdlePriority:
        break;

      default:
        priorityLevel = NormalPriority;
    }

    var previousPriorityLevel = currentPriorityLevel;
    currentPriorityLevel = priorityLevel;

    try {
      return eventHandler();
    } finally {
      currentPriorityLevel = previousPriorityLevel;
    }
  }

  function unstable_next(eventHandler) {
    var priorityLevel;

    switch (currentPriorityLevel) {
      case ImmediatePriority:
      case UserBlockingPriority:
      case NormalPriority:
        // Shift down to normal priority
        priorityLevel = NormalPriority;
        break;

      default:
        // Anything lower than normal priority should remain at the current level.
        priorityLevel = currentPriorityLevel;
        break;
    }

    var previousPriorityLevel = currentPriorityLevel;
    currentPriorityLevel = priorityLevel;

    try {
      return eventHandler();
    } finally {
      currentPriorityLevel = previousPriorityLevel;
    }
  }

  function unstable_wrapCallback(callback) {
    var parentPriorityLevel = currentPriorityLevel;
    return function () {
      // This is a fork of runWithPriority, inlined for performance.
      var previousPriorityLevel = currentPriorityLevel;
      currentPriorityLevel = parentPriorityLevel;

      try {
        return callback.apply(this, arguments);
      } finally {
        currentPriorityLevel = previousPriorityLevel;
      }
    };
  }

  function unstable_scheduleCallback(priorityLevel, callback, options) {
    var currentTime = getCurrentTime();
    var startTime;

    if (typeof options === 'object' && options !== null) {
      var delay = options.delay;

      if (typeof delay === 'number' && delay > 0) {
        startTime = currentTime + delay;
      } else {
        startTime = currentTime;
      }
    } else {
      startTime = currentTime;
    }

    var timeout;

    switch (priorityLevel) {
      case ImmediatePriority:
        timeout = IMMEDIATE_PRIORITY_TIMEOUT;
        break;

      case UserBlockingPriority:
        timeout = USER_BLOCKING_PRIORITY_TIMEOUT;
        break;

      case IdlePriority:
        timeout = IDLE_PRIORITY_TIMEOUT;
        break;

      case LowPriority:
        timeout = LOW_PRIORITY_TIMEOUT;
        break;

      case NormalPriority:
      default:
        timeout = NORMAL_PRIORITY_TIMEOUT;
        break;
    }

    var expirationTime = startTime + timeout;
    var newTask = {
      id: taskIdCounter++,
      callback: callback,
      priorityLevel: priorityLevel,
      startTime: startTime,
      expirationTime: expirationTime,
      sortIndex: -1
    };

    if (startTime > currentTime) {
      // This is a delayed task.
      newTask.sortIndex = startTime;
      push(timerQueue, newTask);

      if (peek(taskQueue) === null && newTask === peek(timerQueue)) {
        // All tasks are delayed, and this is the task with the earliest delay.
        if (isHostTimeoutScheduled) {
          // Cancel an existing timeout.
          cancelHostTimeout();
        } else {
          isHostTimeoutScheduled = true;
        } // Schedule a timeout.


        requestHostTimeout(handleTimeout, startTime - currentTime);
      }
    } else {
      newTask.sortIndex = expirationTime;
      push(taskQueue, newTask);
      // wait until the next time we yield.


      if (!isHostCallbackScheduled && !isPerformingWork) {
        isHostCallbackScheduled = true;
        requestHostCallback(flushWork);
      }
    }

    return newTask;
  }

  function unstable_pauseExecution() {
  }

  function unstable_continueExecution() {

    if (!isHostCallbackScheduled && !isPerformingWork) {
      isHostCallbackScheduled = true;
      requestHostCallback(flushWork);
    }
  }

  function unstable_getFirstCallbackNode() {
    return peek(taskQueue);
  }

  function unstable_cancelCallback(task) {
    // remove from the queue because you can't remove arbitrary nodes from an
    // array based heap, only the first one.)


    task.callback = null;
  }

  function unstable_getCurrentPriorityLevel() {
    return currentPriorityLevel;
  }

  var isMessageLoopRunning = false;
  var scheduledHostCallback = null;
  var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main
  // thread, like user events. By default, it yields multiple times per frame.
  // It does not attempt to align with frame boundaries, since most tasks don't
  // need to be frame aligned; for those that do, use requestAnimationFrame.

  var frameInterval = frameYieldMs;
  var startTime = -1;

  function shouldYieldToHost() {
    var timeElapsed = getCurrentTime() - startTime;

    if (timeElapsed < frameInterval) {
      // The main thread has only been blocked for a really short amount of time;
      // smaller than a single frame. Don't yield yet.
      return false;
    } // The main thread has been blocked for a non-negligible amount of time. We


    return true;
  }

  function requestPaint() {

  }

  function forceFrameRate(fps) {
    if (fps < 0 || fps > 125) {
      // Using console['error'] to evade Babel and ESLint
      console['error']('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing frame rates higher than 125 fps is not supported');
      return;
    }

    if (fps > 0) {
      frameInterval = Math.floor(1000 / fps);
    } else {
      // reset the framerate
      frameInterval = frameYieldMs;
    }
  }

  var performWorkUntilDeadline = function () {
    if (scheduledHostCallback !== null) {
      var currentTime = getCurrentTime(); // Keep track of the start time so we can measure how long the main thread
      // has been blocked.

      startTime = currentTime;
      var hasTimeRemaining = true; // If a scheduler task throws, exit the current browser task so the
      // error can be observed.
      //
      // Intentionally not using a try-catch, since that makes some debugging
      // techniques harder. Instead, if `scheduledHostCallback` errors, then
      // `hasMoreWork` will remain true, and we'll continue the work loop.

      var hasMoreWork = true;

      try {
        hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);
      } finally {
        if (hasMoreWork) {
          // If there's more work, schedule the next message event at the end
          // of the preceding one.
          schedulePerformWorkUntilDeadline();
        } else {
          isMessageLoopRunning = false;
          scheduledHostCallback = null;
        }
      }
    } else {
      isMessageLoopRunning = false;
    } // Yielding to the browser will give it a chance to paint, so we can
  };

  var schedulePerformWorkUntilDeadline;

  if (typeof localSetImmediate === 'function') {
    // Node.js and old IE.
    // There's a few reasons for why we prefer setImmediate.
    //
    // Unlike MessageChannel, it doesn't prevent a Node.js process from exiting.
    // (Even though this is a DOM fork of the Scheduler, you could get here
    // with a mix of Node.js 15+, which has a MessageChannel, and jsdom.)
    // https://github.com/facebook/react/issues/20756
    //
    // But also, it runs earlier which is the semantic we want.
    // If other browsers ever implement it, it's better to use it.
    // Although both of these would be inferior to native scheduling.
    schedulePerformWorkUntilDeadline = function () {
      localSetImmediate(performWorkUntilDeadline);
    };
  } else if (typeof MessageChannel !== 'undefined') {
    // DOM and Worker environments.
    // We prefer MessageChannel because of the 4ms setTimeout clamping.
    var channel = new MessageChannel();
    var port = channel.port2;
    channel.port1.onmessage = performWorkUntilDeadline;

    schedulePerformWorkUntilDeadline = function () {
      port.postMessage(null);
    };
  } else {
    // We should only fallback here in non-browser environments.
    schedulePerformWorkUntilDeadline = function () {
      localSetTimeout(performWorkUntilDeadline, 0);
    };
  }

  function requestHostCallback(callback) {
    scheduledHostCallback = callback;

    if (!isMessageLoopRunning) {
      isMessageLoopRunning = true;
      schedulePerformWorkUntilDeadline();
    }
  }

  function requestHostTimeout(callback, ms) {
    taskTimeoutID = localSetTimeout(function () {
      callback(getCurrentTime());
    }, ms);
  }

  function cancelHostTimeout() {
    localClearTimeout(taskTimeoutID);
    taskTimeoutID = -1;
  }

  var unstable_requestPaint = requestPaint;
  var unstable_Profiling =  null;



  var Scheduler = /*#__PURE__*/Object.freeze({
    __proto__: null,
    unstable_ImmediatePriority: ImmediatePriority,
    unstable_UserBlockingPriority: UserBlockingPriority,
    unstable_NormalPriority: NormalPriority,
    unstable_IdlePriority: IdlePriority,
    unstable_LowPriority: LowPriority,
    unstable_runWithPriority: unstable_runWithPriority,
    unstable_next: unstable_next,
    unstable_scheduleCallback: unstable_scheduleCallback,
    unstable_cancelCallback: unstable_cancelCallback,
    unstable_wrapCallback: unstable_wrapCallback,
    unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel,
    unstable_shouldYield: shouldYieldToHost,
    unstable_requestPaint: unstable_requestPaint,
    unstable_continueExecution: unstable_continueExecution,
    unstable_pauseExecution: unstable_pauseExecution,
    unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
    get unstable_now () { return getCurrentTime; },
    unstable_forceFrameRate: forceFrameRate,
    unstable_Profiling: unstable_Profiling
  });

  var ReactSharedInternals$1 = {
    ReactCurrentDispatcher: ReactCurrentDispatcher,
    ReactCurrentOwner: ReactCurrentOwner,
    ReactCurrentBatchConfig: ReactCurrentBatchConfig,
    // Re-export the schedule API(s) for UMD bundles.
    // This avoids introducing a dependency on a new UMD global in a minor update,
    // Since that would be a breaking change (e.g. for all existing CodeSandboxes).
    // This re-export is only required for UMD bundles;
    // CJS bundles use the shared NPM package.
    Scheduler: Scheduler
  };

  {
    ReactSharedInternals$1.ReactCurrentActQueue = ReactCurrentActQueue;
    ReactSharedInternals$1.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
  }

  function startTransition(scope, options) {
    var prevTransition = ReactCurrentBatchConfig.transition;
    ReactCurrentBatchConfig.transition = {};
    var currentTransition = ReactCurrentBatchConfig.transition;

    {
      ReactCurrentBatchConfig.transition._updatedFibers = new Set();
    }

    try {
      scope();
    } finally {
      ReactCurrentBatchConfig.transition = prevTransition;

      {
        if (prevTransition === null && currentTransition._updatedFibers) {
          var updatedFibersCount = currentTransition._updatedFibers.size;

          if (updatedFibersCount > 10) {
            warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');
          }

          currentTransition._updatedFibers.clear();
        }
      }
    }
  }

  var didWarnAboutMessageChannel = false;
  var enqueueTaskImpl = null;
  function enqueueTask(task) {
    if (enqueueTaskImpl === null) {
      try {
        // read require off the module object to get around the bundlers.
        // we don't want them to detect a require and bundle a Node polyfill.
        var requireString = ('require' + Math.random()).slice(0, 7);
        var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's
        // version of setImmediate, bypassing fake timers if any.

        enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;
      } catch (_err) {
        // we're in a browser
        // we can't use regular timers because they may still be faked
        // so we try MessageChannel+postMessage instead
        enqueueTaskImpl = function (callback) {
          {
            if (didWarnAboutMessageChannel === false) {
              didWarnAboutMessageChannel = true;

              if (typeof MessageChannel === 'undefined') {
                error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.');
              }
            }
          }

          var channel = new MessageChannel();
          channel.port1.onmessage = callback;
          channel.port2.postMessage(undefined);
        };
      }
    }

    return enqueueTaskImpl(task);
  }

  var actScopeDepth = 0;
  var didWarnNoAwaitAct = false;
  function act(callback) {
    {
      // `act` calls can be nested, so we track the depth. This represents the
      // number of `act` scopes on the stack.
      var prevActScopeDepth = actScopeDepth;
      actScopeDepth++;

      if (ReactCurrentActQueue.current === null) {
        // This is the outermost `act` scope. Initialize the queue. The reconciler
        // will detect the queue and use it instead of Scheduler.
        ReactCurrentActQueue.current = [];
      }

      var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
      var result;

      try {
        // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only
        // set to `true` while the given callback is executed, not for updates
        // triggered during an async event, because this is how the legacy
        // implementation of `act` behaved.
        ReactCurrentActQueue.isBatchingLegacy = true;
        result = callback(); // Replicate behavior of original `act` implementation in legacy mode,
        // which flushed updates immediately after the scope function exits, even
        // if it's an async function.

        if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
          var queue = ReactCurrentActQueue.current;

          if (queue !== null) {
            ReactCurrentActQueue.didScheduleLegacyUpdate = false;
            flushActQueue(queue);
          }
        }
      } catch (error) {
        popActScope(prevActScopeDepth);
        throw error;
      } finally {
        ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
      }

      if (result !== null && typeof result === 'object' && typeof result.then === 'function') {
        var thenableResult = result; // The callback is an async function (i.e. returned a promise). Wait
        // for it to resolve before exiting the current scope.

        var wasAwaited = false;
        var thenable = {
          then: function (resolve, reject) {
            wasAwaited = true;
            thenableResult.then(function (returnValue) {
              popActScope(prevActScopeDepth);

              if (actScopeDepth === 0) {
                // We've exited the outermost act scope. Recursively flush the
                // queue until there's no remaining work.
                recursivelyFlushAsyncActWork(returnValue, resolve, reject);
              } else {
                resolve(returnValue);
              }
            }, function (error) {
              // The callback threw an error.
              popActScope(prevActScopeDepth);
              reject(error);
            });
          }
        };

        {
          if (!didWarnNoAwaitAct && typeof Promise !== 'undefined') {
            // eslint-disable-next-line no-undef
            Promise.resolve().then(function () {}).then(function () {
              if (!wasAwaited) {
                didWarnNoAwaitAct = true;

                error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, ' + 'interleaving multiple act calls and mixing their ' + 'scopes. ' + 'You should - await act(async () => ...);');
              }
            });
          }
        }

        return thenable;
      } else {
        var returnValue = result; // The callback is not an async function. Exit the current scope
        // immediately, without awaiting.

        popActScope(prevActScopeDepth);

        if (actScopeDepth === 0) {
          // Exiting the outermost act scope. Flush the queue.
          var _queue = ReactCurrentActQueue.current;

          if (_queue !== null) {
            flushActQueue(_queue);
            ReactCurrentActQueue.current = null;
          } // Return a thenable. If the user awaits it, we'll flush again in
          // case additional work was scheduled by a microtask.


          var _thenable = {
            then: function (resolve, reject) {
              // Confirm we haven't re-entered another `act` scope, in case
              // the user does something weird like await the thenable
              // multiple times.
              if (ReactCurrentActQueue.current === null) {
                // Recursively flush the queue until there's no remaining work.
                ReactCurrentActQueue.current = [];
                recursivelyFlushAsyncActWork(returnValue, resolve, reject);
              } else {
                resolve(returnValue);
              }
            }
          };
          return _thenable;
        } else {
          // Since we're inside a nested `act` scope, the returned thenable
          // immediately resolves. The outer scope will flush the queue.
          var _thenable2 = {
            then: function (resolve, reject) {
              resolve(returnValue);
            }
          };
          return _thenable2;
        }
      }
    }
  }

  function popActScope(prevActScopeDepth) {
    {
      if (prevActScopeDepth !== actScopeDepth - 1) {
        error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');
      }

      actScopeDepth = prevActScopeDepth;
    }
  }

  function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
    {
      var queue = ReactCurrentActQueue.current;

      if (queue !== null) {
        try {
          flushActQueue(queue);
          enqueueTask(function () {
            if (queue.length === 0) {
              // No additional work was scheduled. Finish.
              ReactCurrentActQueue.current = null;
              resolve(returnValue);
            } else {
              // Keep flushing work until there's none left.
              recursivelyFlushAsyncActWork(returnValue, resolve, reject);
            }
          });
        } catch (error) {
          reject(error);
        }
      } else {
        resolve(returnValue);
      }
    }
  }

  var isFlushing = false;

  function flushActQueue(queue) {
    {
      if (!isFlushing) {
        // Prevent re-entrance.
        isFlushing = true;
        var i = 0;

        try {
          for (; i < queue.length; i++) {
            var callback = queue[i];

            do {
              callback = callback(true);
            } while (callback !== null);
          }

          queue.length = 0;
        } catch (error) {
          // If something throws, leave the remaining callbacks on the queue.
          queue = queue.slice(i + 1);
          throw error;
        } finally {
          isFlushing = false;
        }
      }
    }
  }

  var createElement$1 =  createElementWithValidation ;
  var cloneElement$1 =  cloneElementWithValidation ;
  var createFactory =  createFactoryWithValidation ;
  var Children = {
    map: mapChildren,
    forEach: forEachChildren,
    count: countChildren,
    toArray: toArray,
    only: onlyChild
  };

  exports.Children = Children;
  exports.Component = Component;
  exports.Fragment = REACT_FRAGMENT_TYPE;
  exports.Profiler = REACT_PROFILER_TYPE;
  exports.PureComponent = PureComponent;
  exports.StrictMode = REACT_STRICT_MODE_TYPE;
  exports.Suspense = REACT_SUSPENSE_TYPE;
  exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals$1;
  exports.act = act;
  exports.cloneElement = cloneElement$1;
  exports.createContext = createContext;
  exports.createElement = createElement$1;
  exports.createFactory = createFactory;
  exports.createRef = createRef;
  exports.forwardRef = forwardRef;
  exports.isValidElement = isValidElement;
  exports.lazy = lazy;
  exports.memo = memo;
  exports.startTransition = startTransition;
  exports.unstable_act = act;
  exports.useCallback = useCallback;
  exports.useContext = useContext;
  exports.useDebugValue = useDebugValue;
  exports.useDeferredValue = useDeferredValue;
  exports.useEffect = useEffect;
  exports.useId = useId;
  exports.useImperativeHandle = useImperativeHandle;
  exports.useInsertionEffect = useInsertionEffect;
  exports.useLayoutEffect = useLayoutEffect;
  exports.useMemo = useMemo;
  exports.useReducer = useReducer;
  exports.useRef = useRef;
  exports.useState = useState;
  exports.useSyncExternalStore = useSyncExternalStore;
  exports.useTransition = useTransition;
  exports.version = ReactVersion;

})));
                                                                                                                                                     dist/vendor/react.min.js                                                                            0000644                 00000024777 15212564037 0011250 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @license React
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
(function(){'use strict';(function(c,x){"object"===typeof exports&&"undefined"!==typeof module?x(exports):"function"===typeof define&&define.amd?define(["exports"],x):(c=c||self,x(c.React={}))})(this,function(c){function x(a){if(null===a||"object"!==typeof a)return null;a=V&&a[V]||a["@@iterator"];return"function"===typeof a?a:null}function w(a,b,e){this.props=a;this.context=b;this.refs=W;this.updater=e||X}function Y(){}function K(a,b,e){this.props=a;this.context=b;this.refs=W;this.updater=e||X}function Z(a,b,
e){var m,d={},c=null,h=null;if(null!=b)for(m in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(c=""+b.key),b)aa.call(b,m)&&!ba.hasOwnProperty(m)&&(d[m]=b[m]);var l=arguments.length-2;if(1===l)d.children=e;else if(1<l){for(var f=Array(l),k=0;k<l;k++)f[k]=arguments[k+2];d.children=f}if(a&&a.defaultProps)for(m in l=a.defaultProps,l)void 0===d[m]&&(d[m]=l[m]);return{$$typeof:y,type:a,key:c,ref:h,props:d,_owner:L.current}}function oa(a,b){return{$$typeof:y,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}
function M(a){return"object"===typeof a&&null!==a&&a.$$typeof===y}function pa(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}function N(a,b){return"object"===typeof a&&null!==a&&null!=a.key?pa(""+a.key):b.toString(36)}function B(a,b,e,m,d){var c=typeof a;if("undefined"===c||"boolean"===c)a=null;var h=!1;if(null===a)h=!0;else switch(c){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case y:case qa:h=!0}}if(h)return h=a,d=d(h),a=""===m?"."+
N(h,0):m,ca(d)?(e="",null!=a&&(e=a.replace(da,"$&/")+"/"),B(d,b,e,"",function(a){return a})):null!=d&&(M(d)&&(d=oa(d,e+(!d.key||h&&h.key===d.key?"":(""+d.key).replace(da,"$&/")+"/")+a)),b.push(d)),1;h=0;m=""===m?".":m+":";if(ca(a))for(var l=0;l<a.length;l++){c=a[l];var f=m+N(c,l);h+=B(c,b,e,f,d)}else if(f=x(a),"function"===typeof f)for(a=f.call(a),l=0;!(c=a.next()).done;)c=c.value,f=m+N(c,l++),h+=B(c,b,e,f,d);else if("object"===c)throw b=String(a),Error("Objects are not valid as a React child (found: "+
("[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b)+"). If you meant to render a collection of children, use an array instead.");return h}function C(a,b,e){if(null==a)return a;var c=[],d=0;B(a,c,"","",function(a){return b.call(e,a,d++)});return c}function ra(a){if(-1===a._status){var b=a._result;b=b();b.then(function(b){if(0===a._status||-1===a._status)a._status=1,a._result=b},function(b){if(0===a._status||-1===a._status)a._status=2,a._result=b});-1===a._status&&(a._status=
0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;}function O(a,b){var e=a.length;a.push(b);a:for(;0<e;){var c=e-1>>>1,d=a[c];if(0<D(d,b))a[c]=b,a[e]=d,e=c;else break a}}function p(a){return 0===a.length?null:a[0]}function E(a){if(0===a.length)return null;var b=a[0],e=a.pop();if(e!==b){a[0]=e;a:for(var c=0,d=a.length,k=d>>>1;c<k;){var h=2*(c+1)-1,l=a[h],f=h+1,g=a[f];if(0>D(l,e))f<d&&0>D(g,l)?(a[c]=g,a[f]=e,c=f):(a[c]=l,a[h]=e,c=h);else if(f<d&&0>D(g,e))a[c]=g,a[f]=e,c=f;else break a}}return b}
function D(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}function P(a){for(var b=p(r);null!==b;){if(null===b.callback)E(r);else if(b.startTime<=a)E(r),b.sortIndex=b.expirationTime,O(q,b);else break;b=p(r)}}function Q(a){z=!1;P(a);if(!u)if(null!==p(q))u=!0,R(S);else{var b=p(r);null!==b&&T(Q,b.startTime-a)}}function S(a,b){u=!1;z&&(z=!1,ea(A),A=-1);F=!0;var c=k;try{P(b);for(n=p(q);null!==n&&(!(n.expirationTime>b)||a&&!fa());){var m=n.callback;if("function"===typeof m){n.callback=null;
k=n.priorityLevel;var d=m(n.expirationTime<=b);b=v();"function"===typeof d?n.callback=d:n===p(q)&&E(q);P(b)}else E(q);n=p(q)}if(null!==n)var g=!0;else{var h=p(r);null!==h&&T(Q,h.startTime-b);g=!1}return g}finally{n=null,k=c,F=!1}}function fa(){return v()-ha<ia?!1:!0}function R(a){G=a;H||(H=!0,I())}function T(a,b){A=ja(function(){a(v())},b)}function ka(a){throw Error("act(...) is not supported in production builds of React.");}var y=Symbol.for("react.element"),qa=Symbol.for("react.portal"),sa=Symbol.for("react.fragment"),
ta=Symbol.for("react.strict_mode"),ua=Symbol.for("react.profiler"),va=Symbol.for("react.provider"),wa=Symbol.for("react.context"),xa=Symbol.for("react.forward_ref"),ya=Symbol.for("react.suspense"),za=Symbol.for("react.memo"),Aa=Symbol.for("react.lazy"),V=Symbol.iterator,X={isMounted:function(a){return!1},enqueueForceUpdate:function(a,b,c){},enqueueReplaceState:function(a,b,c,m){},enqueueSetState:function(a,b,c,m){}},la=Object.assign,W={};w.prototype.isReactComponent={};w.prototype.setState=function(a,
b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,a,b,"setState")};w.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};Y.prototype=w.prototype;var t=K.prototype=new Y;t.constructor=K;la(t,w.prototype);t.isPureReactComponent=!0;var ca=Array.isArray,aa=Object.prototype.hasOwnProperty,L={current:null},
ba={key:!0,ref:!0,__self:!0,__source:!0},da=/\/+/g,g={current:null},J={transition:null};if("object"===typeof performance&&"function"===typeof performance.now){var Ba=performance;var v=function(){return Ba.now()}}else{var ma=Date,Ca=ma.now();v=function(){return ma.now()-Ca}}var q=[],r=[],Da=1,n=null,k=3,F=!1,u=!1,z=!1,ja="function"===typeof setTimeout?setTimeout:null,ea="function"===typeof clearTimeout?clearTimeout:null,na="undefined"!==typeof setImmediate?setImmediate:null;"undefined"!==typeof navigator&&
void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var H=!1,G=null,A=-1,ia=5,ha=-1,U=function(){if(null!==G){var a=v();ha=a;var b=!0;try{b=G(!0,a)}finally{b?I():(H=!1,G=null)}}else H=!1};if("function"===typeof na)var I=function(){na(U)};else if("undefined"!==typeof MessageChannel){t=new MessageChannel;var Ea=t.port2;t.port1.onmessage=U;I=function(){Ea.postMessage(null)}}else I=function(){ja(U,0)};t={ReactCurrentDispatcher:g,
ReactCurrentOwner:L,ReactCurrentBatchConfig:J,Scheduler:{__proto__:null,unstable_ImmediatePriority:1,unstable_UserBlockingPriority:2,unstable_NormalPriority:3,unstable_IdlePriority:5,unstable_LowPriority:4,unstable_runWithPriority:function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=k;k=a;try{return b()}finally{k=c}},unstable_next:function(a){switch(k){case 1:case 2:case 3:var b=3;break;default:b=k}var c=k;k=b;try{return a()}finally{k=c}},unstable_scheduleCallback:function(a,
b,c){var e=v();"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?e+c:e):c=e;switch(a){case 1:var d=-1;break;case 2:d=250;break;case 5:d=1073741823;break;case 4:d=1E4;break;default:d=5E3}d=c+d;a={id:Da++,callback:b,priorityLevel:a,startTime:c,expirationTime:d,sortIndex:-1};c>e?(a.sortIndex=c,O(r,a),null===p(q)&&a===p(r)&&(z?(ea(A),A=-1):z=!0,T(Q,c-e))):(a.sortIndex=d,O(q,a),u||F||(u=!0,R(S)));return a},unstable_cancelCallback:function(a){a.callback=null},unstable_wrapCallback:function(a){var b=
k;return function(){var c=k;k=b;try{return a.apply(this,arguments)}finally{k=c}}},unstable_getCurrentPriorityLevel:function(){return k},unstable_shouldYield:fa,unstable_requestPaint:function(){},unstable_continueExecution:function(){u||F||(u=!0,R(S))},unstable_pauseExecution:function(){},unstable_getFirstCallbackNode:function(){return p(q)},get unstable_now(){return v},unstable_forceFrameRate:function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):
ia=0<a?Math.floor(1E3/a):5},unstable_Profiling:null}};c.Children={map:C,forEach:function(a,b,c){C(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;C(a,function(){b++});return b},toArray:function(a){return C(a,function(a){return a})||[]},only:function(a){if(!M(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};c.Component=w;c.Fragment=sa;c.Profiler=ua;c.PureComponent=K;c.StrictMode=ta;c.Suspense=ya;c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=
t;c.act=ka;c.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+a+".");var e=la({},a.props),d=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=L.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var l=a.type.defaultProps;for(f in b)aa.call(b,f)&&!ba.hasOwnProperty(f)&&(e[f]=void 0===b[f]&&void 0!==l?l[f]:b[f])}var f=arguments.length-2;if(1===f)e.children=c;else if(1<f){l=
Array(f);for(var g=0;g<f;g++)l[g]=arguments[g+2];e.children=l}return{$$typeof:y,type:a.type,key:d,ref:k,props:e,_owner:h}};c.createContext=function(a){a={$$typeof:wa,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:va,_context:a};return a.Consumer=a};c.createElement=Z;c.createFactory=function(a){var b=Z.bind(null,a);b.type=a;return b};c.createRef=function(){return{current:null}};c.forwardRef=function(a){return{$$typeof:xa,
render:a}};c.isValidElement=M;c.lazy=function(a){return{$$typeof:Aa,_payload:{_status:-1,_result:a},_init:ra}};c.memo=function(a,b){return{$$typeof:za,type:a,compare:void 0===b?null:b}};c.startTransition=function(a,b){b=J.transition;J.transition={};try{a()}finally{J.transition=b}};c.unstable_act=ka;c.useCallback=function(a,b){return g.current.useCallback(a,b)};c.useContext=function(a){return g.current.useContext(a)};c.useDebugValue=function(a,b){};c.useDeferredValue=function(a){return g.current.useDeferredValue(a)};
c.useEffect=function(a,b){return g.current.useEffect(a,b)};c.useId=function(){return g.current.useId()};c.useImperativeHandle=function(a,b,c){return g.current.useImperativeHandle(a,b,c)};c.useInsertionEffect=function(a,b){return g.current.useInsertionEffect(a,b)};c.useLayoutEffect=function(a,b){return g.current.useLayoutEffect(a,b)};c.useMemo=function(a,b){return g.current.useMemo(a,b)};c.useReducer=function(a,b,c){return g.current.useReducer(a,b,c)};c.useRef=function(a){return g.current.useRef(a)};
c.useState=function(a){return g.current.useState(a)};c.useSyncExternalStore=function(a,b,c){return g.current.useSyncExternalStore(a,b,c)};c.useTransition=function(){return g.current.useTransition()};c.version="18.3.1"});
})();
 dist/vendor/regenerator-runtime.js                                                                  0000644                 00000061333 15212564037 0013353 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * Copyright (c) 2014-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

var runtime = (function (exports) {
  "use strict";

  var Op = Object.prototype;
  var hasOwn = Op.hasOwnProperty;
  var defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; };
  var undefined; // More compressible than void 0.
  var $Symbol = typeof Symbol === "function" ? Symbol : {};
  var iteratorSymbol = $Symbol.iterator || "@@iterator";
  var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";

  function define(obj, key, value) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
    return obj[key];
  }
  try {
    // IE 8 has a broken Object.defineProperty that only works on DOM objects.
    define({}, "");
  } catch (err) {
    define = function(obj, key, value) {
      return obj[key] = value;
    };
  }

  function wrap(innerFn, outerFn, self, tryLocsList) {
    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
    var generator = Object.create(protoGenerator.prototype);
    var context = new Context(tryLocsList || []);

    // The ._invoke method unifies the implementations of the .next,
    // .throw, and .return methods.
    defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) });

    return generator;
  }
  exports.wrap = wrap;

  // Try/catch helper to minimize deoptimizations. Returns a completion
  // record like context.tryEntries[i].completion. This interface could
  // have been (and was previously) designed to take a closure to be
  // invoked without arguments, but in all the cases we care about we
  // already have an existing method we want to call, so there's no need
  // to create a new function object. We can even get away with assuming
  // the method takes exactly one argument, since that happens to be true
  // in every case, so we don't have to touch the arguments object. The
  // only additional allocation required is the completion record, which
  // has a stable shape and so hopefully should be cheap to allocate.
  function tryCatch(fn, obj, arg) {
    try {
      return { type: "normal", arg: fn.call(obj, arg) };
    } catch (err) {
      return { type: "throw", arg: err };
    }
  }

  var GenStateSuspendedStart = "suspendedStart";
  var GenStateSuspendedYield = "suspendedYield";
  var GenStateExecuting = "executing";
  var GenStateCompleted = "completed";

  // Returning this object from the innerFn has the same effect as
  // breaking out of the dispatch switch statement.
  var ContinueSentinel = {};

  // Dummy constructor functions that we use as the .constructor and
  // .constructor.prototype properties for functions that return Generator
  // objects. For full spec compliance, you may wish to configure your
  // minifier not to mangle the names of these two functions.
  function Generator() {}
  function GeneratorFunction() {}
  function GeneratorFunctionPrototype() {}

  // This is a polyfill for %IteratorPrototype% for environments that
  // don't natively support it.
  var IteratorPrototype = {};
  define(IteratorPrototype, iteratorSymbol, function () {
    return this;
  });

  var getProto = Object.getPrototypeOf;
  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  if (NativeIteratorPrototype &&
      NativeIteratorPrototype !== Op &&
      hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
    // This environment has a native %IteratorPrototype%; use it instead
    // of the polyfill.
    IteratorPrototype = NativeIteratorPrototype;
  }

  var Gp = GeneratorFunctionPrototype.prototype =
    Generator.prototype = Object.create(IteratorPrototype);
  GeneratorFunction.prototype = GeneratorFunctionPrototype;
  defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: true });
  defineProperty(
    GeneratorFunctionPrototype,
    "constructor",
    { value: GeneratorFunction, configurable: true }
  );
  GeneratorFunction.displayName = define(
    GeneratorFunctionPrototype,
    toStringTagSymbol,
    "GeneratorFunction"
  );

  // Helper for defining the .next, .throw, and .return methods of the
  // Iterator interface in terms of a single ._invoke method.
  function defineIteratorMethods(prototype) {
    ["next", "throw", "return"].forEach(function(method) {
      define(prototype, method, function(arg) {
        return this._invoke(method, arg);
      });
    });
  }

  exports.isGeneratorFunction = function(genFun) {
    var ctor = typeof genFun === "function" && genFun.constructor;
    return ctor
      ? ctor === GeneratorFunction ||
        // For the native GeneratorFunction constructor, the best we can
        // do is to check its .name property.
        (ctor.displayName || ctor.name) === "GeneratorFunction"
      : false;
  };

  exports.mark = function(genFun) {
    if (Object.setPrototypeOf) {
      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
    } else {
      genFun.__proto__ = GeneratorFunctionPrototype;
      define(genFun, toStringTagSymbol, "GeneratorFunction");
    }
    genFun.prototype = Object.create(Gp);
    return genFun;
  };

  // Within the body of any async function, `await x` is transformed to
  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  // `hasOwn.call(value, "__await")` to determine if the yielded value is
  // meant to be awaited.
  exports.awrap = function(arg) {
    return { __await: arg };
  };

  function AsyncIterator(generator, PromiseImpl) {
    function invoke(method, arg, resolve, reject) {
      var record = tryCatch(generator[method], generator, arg);
      if (record.type === "throw") {
        reject(record.arg);
      } else {
        var result = record.arg;
        var value = result.value;
        if (value &&
            typeof value === "object" &&
            hasOwn.call(value, "__await")) {
          return PromiseImpl.resolve(value.__await).then(function(value) {
            invoke("next", value, resolve, reject);
          }, function(err) {
            invoke("throw", err, resolve, reject);
          });
        }

        return PromiseImpl.resolve(value).then(function(unwrapped) {
          // When a yielded Promise is resolved, its final value becomes
          // the .value of the Promise<{value,done}> result for the
          // current iteration.
          result.value = unwrapped;
          resolve(result);
        }, function(error) {
          // If a rejected Promise was yielded, throw the rejection back
          // into the async generator function so it can be handled there.
          return invoke("throw", error, resolve, reject);
        });
      }
    }

    var previousPromise;

    function enqueue(method, arg) {
      function callInvokeWithMethodAndArg() {
        return new PromiseImpl(function(resolve, reject) {
          invoke(method, arg, resolve, reject);
        });
      }

      return previousPromise =
        // If enqueue has been called before, then we want to wait until
        // all previous Promises have been resolved before calling invoke,
        // so that results are always delivered in the correct order. If
        // enqueue has not been called before, then it is important to
        // call invoke immediately, without waiting on a callback to fire,
        // so that the async generator function has the opportunity to do
        // any necessary setup in a predictable way. This predictability
        // is why the Promise constructor synchronously invokes its
        // executor callback, and why async functions synchronously
        // execute code before the first await. Since we implement simple
        // async functions in terms of async generators, it is especially
        // important to get this right, even though it requires care.
        previousPromise ? previousPromise.then(
          callInvokeWithMethodAndArg,
          // Avoid propagating failures to Promises returned by later
          // invocations of the iterator.
          callInvokeWithMethodAndArg
        ) : callInvokeWithMethodAndArg();
    }

    // Define the unified helper method that is used to implement .next,
    // .throw, and .return (see defineIteratorMethods).
    defineProperty(this, "_invoke", { value: enqueue });
  }

  defineIteratorMethods(AsyncIterator.prototype);
  define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
    return this;
  });
  exports.AsyncIterator = AsyncIterator;

  // Note that simple async functions are implemented on top of
  // AsyncIterator objects; they just return a Promise for the value of
  // the final result produced by the iterator.
  exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
    if (PromiseImpl === void 0) PromiseImpl = Promise;

    var iter = new AsyncIterator(
      wrap(innerFn, outerFn, self, tryLocsList),
      PromiseImpl
    );

    return exports.isGeneratorFunction(outerFn)
      ? iter // If outerFn is a generator, return the full iterator.
      : iter.next().then(function(result) {
          return result.done ? result.value : iter.next();
        });
  };

  function makeInvokeMethod(innerFn, self, context) {
    var state = GenStateSuspendedStart;

    return function invoke(method, arg) {
      if (state === GenStateExecuting) {
        throw new Error("Generator is already running");
      }

      if (state === GenStateCompleted) {
        if (method === "throw") {
          throw arg;
        }

        // Be forgiving, per GeneratorResume behavior specified since ES2015:
        // ES2015 spec, step 3: https://262.ecma-international.org/6.0/#sec-generatorresume
        // Latest spec, step 2: https://tc39.es/ecma262/#sec-generatorresume
        return doneResult();
      }

      context.method = method;
      context.arg = arg;

      while (true) {
        var delegate = context.delegate;
        if (delegate) {
          var delegateResult = maybeInvokeDelegate(delegate, context);
          if (delegateResult) {
            if (delegateResult === ContinueSentinel) continue;
            return delegateResult;
          }
        }

        if (context.method === "next") {
          // Setting context._sent for legacy support of Babel's
          // function.sent implementation.
          context.sent = context._sent = context.arg;

        } else if (context.method === "throw") {
          if (state === GenStateSuspendedStart) {
            state = GenStateCompleted;
            throw context.arg;
          }

          context.dispatchException(context.arg);

        } else if (context.method === "return") {
          context.abrupt("return", context.arg);
        }

        state = GenStateExecuting;

        var record = tryCatch(innerFn, self, context);
        if (record.type === "normal") {
          // If an exception is thrown from innerFn, we leave state ===
          // GenStateExecuting and loop back for another invocation.
          state = context.done
            ? GenStateCompleted
            : GenStateSuspendedYield;

          if (record.arg === ContinueSentinel) {
            continue;
          }

          return {
            value: record.arg,
            done: context.done
          };

        } else if (record.type === "throw") {
          state = GenStateCompleted;
          // Dispatch the exception by looping back around to the
          // context.dispatchException(context.arg) call above.
          context.method = "throw";
          context.arg = record.arg;
        }
      }
    };
  }

  // Call delegate.iterator[context.method](context.arg) and handle the
  // result, either by returning a { value, done } result from the
  // delegate iterator, or by modifying context.method and context.arg,
  // setting context.delegate to null, and returning the ContinueSentinel.
  function maybeInvokeDelegate(delegate, context) {
    var methodName = context.method;
    var method = delegate.iterator[methodName];
    if (method === undefined) {
      // A .throw or .return when the delegate iterator has no .throw
      // method, or a missing .next method, always terminate the
      // yield* loop.
      context.delegate = null;

      // Note: ["return"] must be used for ES3 parsing compatibility.
      if (methodName === "throw" && delegate.iterator["return"]) {
        // If the delegate iterator has a return method, give it a
        // chance to clean up.
        context.method = "return";
        context.arg = undefined;
        maybeInvokeDelegate(delegate, context);

        if (context.method === "throw") {
          // If maybeInvokeDelegate(context) changed context.method from
          // "return" to "throw", let that override the TypeError below.
          return ContinueSentinel;
        }
      }
      if (methodName !== "return") {
        context.method = "throw";
        context.arg = new TypeError(
          "The iterator does not provide a '" + methodName + "' method");
      }

      return ContinueSentinel;
    }

    var record = tryCatch(method, delegate.iterator, context.arg);

    if (record.type === "throw") {
      context.method = "throw";
      context.arg = record.arg;
      context.delegate = null;
      return ContinueSentinel;
    }

    var info = record.arg;

    if (! info) {
      context.method = "throw";
      context.arg = new TypeError("iterator result is not an object");
      context.delegate = null;
      return ContinueSentinel;
    }

    if (info.done) {
      // Assign the result of the finished delegate to the temporary
      // variable specified by delegate.resultName (see delegateYield).
      context[delegate.resultName] = info.value;

      // Resume execution at the desired location (see delegateYield).
      context.next = delegate.nextLoc;

      // If context.method was "throw" but the delegate handled the
      // exception, let the outer generator proceed normally. If
      // context.method was "next", forget context.arg since it has been
      // "consumed" by the delegate iterator. If context.method was
      // "return", allow the original .return call to continue in the
      // outer generator.
      if (context.method !== "return") {
        context.method = "next";
        context.arg = undefined;
      }

    } else {
      // Re-yield the result returned by the delegate method.
      return info;
    }

    // The delegate iterator is finished, so forget it and continue with
    // the outer generator.
    context.delegate = null;
    return ContinueSentinel;
  }

  // Define Generator.prototype.{next,throw,return} in terms of the
  // unified ._invoke helper method.
  defineIteratorMethods(Gp);

  define(Gp, toStringTagSymbol, "Generator");

  // A Generator should always return itself as the iterator object when the
  // @@iterator function is called on it. Some browsers' implementations of the
  // iterator prototype chain incorrectly implement this, causing the Generator
  // object to not be returned from this call. This ensures that doesn't happen.
  // See https://github.com/facebook/regenerator/issues/274 for more details.
  define(Gp, iteratorSymbol, function() {
    return this;
  });

  define(Gp, "toString", function() {
    return "[object Generator]";
  });

  function pushTryEntry(locs) {
    var entry = { tryLoc: locs[0] };

    if (1 in locs) {
      entry.catchLoc = locs[1];
    }

    if (2 in locs) {
      entry.finallyLoc = locs[2];
      entry.afterLoc = locs[3];
    }

    this.tryEntries.push(entry);
  }

  function resetTryEntry(entry) {
    var record = entry.completion || {};
    record.type = "normal";
    delete record.arg;
    entry.completion = record;
  }

  function Context(tryLocsList) {
    // The root entry object (effectively a try statement without a catch
    // or a finally block) gives us a place to store values thrown from
    // locations where there is no enclosing try statement.
    this.tryEntries = [{ tryLoc: "root" }];
    tryLocsList.forEach(pushTryEntry, this);
    this.reset(true);
  }

  exports.keys = function(val) {
    var object = Object(val);
    var keys = [];
    for (var key in object) {
      keys.push(key);
    }
    keys.reverse();

    // Rather than returning an object with a next method, we keep
    // things simple and return the next function itself.
    return function next() {
      while (keys.length) {
        var key = keys.pop();
        if (key in object) {
          next.value = key;
          next.done = false;
          return next;
        }
      }

      // To avoid creating an additional object, we just hang the .value
      // and .done properties off the next function object itself. This
      // also ensures that the minifier will not anonymize the function.
      next.done = true;
      return next;
    };
  };

  function values(iterable) {
    if (iterable != null) {
      var iteratorMethod = iterable[iteratorSymbol];
      if (iteratorMethod) {
        return iteratorMethod.call(iterable);
      }

      if (typeof iterable.next === "function") {
        return iterable;
      }

      if (!isNaN(iterable.length)) {
        var i = -1, next = function next() {
          while (++i < iterable.length) {
            if (hasOwn.call(iterable, i)) {
              next.value = iterable[i];
              next.done = false;
              return next;
            }
          }

          next.value = undefined;
          next.done = true;

          return next;
        };

        return next.next = next;
      }
    }

    throw new TypeError(typeof iterable + " is not iterable");
  }
  exports.values = values;

  function doneResult() {
    return { value: undefined, done: true };
  }

  Context.prototype = {
    constructor: Context,

    reset: function(skipTempReset) {
      this.prev = 0;
      this.next = 0;
      // Resetting context._sent for legacy support of Babel's
      // function.sent implementation.
      this.sent = this._sent = undefined;
      this.done = false;
      this.delegate = null;

      this.method = "next";
      this.arg = undefined;

      this.tryEntries.forEach(resetTryEntry);

      if (!skipTempReset) {
        for (var name in this) {
          // Not sure about the optimal order of these conditions:
          if (name.charAt(0) === "t" &&
              hasOwn.call(this, name) &&
              !isNaN(+name.slice(1))) {
            this[name] = undefined;
          }
        }
      }
    },

    stop: function() {
      this.done = true;

      var rootEntry = this.tryEntries[0];
      var rootRecord = rootEntry.completion;
      if (rootRecord.type === "throw") {
        throw rootRecord.arg;
      }

      return this.rval;
    },

    dispatchException: function(exception) {
      if (this.done) {
        throw exception;
      }

      var context = this;
      function handle(loc, caught) {
        record.type = "throw";
        record.arg = exception;
        context.next = loc;

        if (caught) {
          // If the dispatched exception was caught by a catch block,
          // then let that catch block handle the exception normally.
          context.method = "next";
          context.arg = undefined;
        }

        return !! caught;
      }

      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        var record = entry.completion;

        if (entry.tryLoc === "root") {
          // Exception thrown outside of any try block that could handle
          // it, so set the completion value of the entire function to
          // throw the exception.
          return handle("end");
        }

        if (entry.tryLoc <= this.prev) {
          var hasCatch = hasOwn.call(entry, "catchLoc");
          var hasFinally = hasOwn.call(entry, "finallyLoc");

          if (hasCatch && hasFinally) {
            if (this.prev < entry.catchLoc) {
              return handle(entry.catchLoc, true);
            } else if (this.prev < entry.finallyLoc) {
              return handle(entry.finallyLoc);
            }

          } else if (hasCatch) {
            if (this.prev < entry.catchLoc) {
              return handle(entry.catchLoc, true);
            }

          } else if (hasFinally) {
            if (this.prev < entry.finallyLoc) {
              return handle(entry.finallyLoc);
            }

          } else {
            throw new Error("try statement without catch or finally");
          }
        }
      }
    },

    abrupt: function(type, arg) {
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        if (entry.tryLoc <= this.prev &&
            hasOwn.call(entry, "finallyLoc") &&
            this.prev < entry.finallyLoc) {
          var finallyEntry = entry;
          break;
        }
      }

      if (finallyEntry &&
          (type === "break" ||
           type === "continue") &&
          finallyEntry.tryLoc <= arg &&
          arg <= finallyEntry.finallyLoc) {
        // Ignore the finally entry if control is not jumping to a
        // location outside the try/catch block.
        finallyEntry = null;
      }

      var record = finallyEntry ? finallyEntry.completion : {};
      record.type = type;
      record.arg = arg;

      if (finallyEntry) {
        this.method = "next";
        this.next = finallyEntry.finallyLoc;
        return ContinueSentinel;
      }

      return this.complete(record);
    },

    complete: function(record, afterLoc) {
      if (record.type === "throw") {
        throw record.arg;
      }

      if (record.type === "break" ||
          record.type === "continue") {
        this.next = record.arg;
      } else if (record.type === "return") {
        this.rval = this.arg = record.arg;
        this.method = "return";
        this.next = "end";
      } else if (record.type === "normal" && afterLoc) {
        this.next = afterLoc;
      }

      return ContinueSentinel;
    },

    finish: function(finallyLoc) {
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        if (entry.finallyLoc === finallyLoc) {
          this.complete(entry.completion, entry.afterLoc);
          resetTryEntry(entry);
          return ContinueSentinel;
        }
      }
    },

    "catch": function(tryLoc) {
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        if (entry.tryLoc === tryLoc) {
          var record = entry.completion;
          if (record.type === "throw") {
            var thrown = record.arg;
            resetTryEntry(entry);
          }
          return thrown;
        }
      }

      // The context.catch method must only be called with a location
      // argument that corresponds to a known catch block.
      throw new Error("illegal catch attempt");
    },

    delegateYield: function(iterable, resultName, nextLoc) {
      this.delegate = {
        iterator: values(iterable),
        resultName: resultName,
        nextLoc: nextLoc
      };

      if (this.method === "next") {
        // Deliberately forget the last sent value so that we don't
        // accidentally pass it on to the delegate.
        this.arg = undefined;
      }

      return ContinueSentinel;
    }
  };

  // Regardless of whether this script is executing as a CommonJS module
  // or not, return the runtime object so that we can declare the variable
  // regeneratorRuntime in the outer scope, which allows this module to be
  // injected easily by `bin/regenerator --include-runtime script.js`.
  return exports;

}(
  // If this script is executing as a CommonJS module, use module.exports
  // as the regeneratorRuntime namespace. Otherwise create a new empty
  // object. Either way, the resulting object will be used to initialize
  // the regeneratorRuntime variable at the top of this file.
  typeof module === "object" ? module.exports : {}
));

try {
  regeneratorRuntime = runtime;
} catch (accidentalStrictMode) {
  // This module should not be running in strict mode, so the above
  // assignment should always work unless something is misconfigured. Just
  // in case runtime.js accidentally runs in strict mode, in modern engines
  // we can explicitly access globalThis. In older engines we can escape
  // strict mode using a global Function call. This could conceivably fail
  // if a Content Security Policy forbids using Function, but in that case
  // the proper solution is to fix the accidental strict mode problem. If
  // you've misconfigured your bundler to force strict mode and applied a
  // CSP to forbid Function, and you're not willing to fix either of those
  // problems, please detail your unique predicament in a GitHub issue.
  if (typeof globalThis === "object") {
    globalThis.regeneratorRuntime = runtime;
  } else {
    Function("r", "regeneratorRuntime = r")(runtime);
  }
}
                                                                                                                                                                                                                                                                                                     dist/vendor/regenerator-runtime.min.js                                                              0000644                 00000014756 15212564037 0014144 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var runtime=function(a){"use strict";var u,t=Object.prototype,h=t.hasOwnProperty,l=Object.defineProperty||function(t,r,e){t[r]=e.value},r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",e=r.asyncIterator||"@@asyncIterator",o=r.toStringTag||"@@toStringTag";function i(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{i({},"")}catch(t){i=function(t,r,e){return t[r]=e}}function c(t,r,e,n){var o,i,a,c,r=r&&r.prototype instanceof d?r:d,r=Object.create(r.prototype),n=new O(n||[]);return l(r,"_invoke",{value:(o=t,i=e,a=n,c=s,function(t,r){if(c===y)throw new Error("Generator is already running");if(c===g){if("throw"===t)throw r;return{value:u,done:!0}}for(a.method=t,a.arg=r;;){var e=a.delegate;if(e){e=function t(r,e){var n=e.method;var o=r.iterator[n];if(o===u)return e.delegate=null,"throw"===n&&r.iterator.return&&(e.method="return",e.arg=u,t(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;n=f(o,r.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,v;o=n.arg;if(!o)return e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v;{if(!o.done)return o;e[r.resultName]=o.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=u)}e.delegate=null;return v}(e,a);if(e){if(e===v)continue;return e}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(c===s)throw c=g,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);c=y;e=f(o,i,a);if("normal"===e.type){if(c=a.done?g:p,e.arg!==v)return{value:e.arg,done:a.done}}else"throw"===e.type&&(c=g,a.method="throw",a.arg=e.arg)}})}),r}function f(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}a.wrap=c;var s="suspendedStart",p="suspendedYield",y="executing",g="completed",v={};function d(){}function m(){}function w(){}var r={},b=(i(r,n,function(){return this}),Object.getPrototypeOf),b=b&&b(b(k([]))),L=(b&&b!==t&&h.call(b,n)&&(r=b),w.prototype=d.prototype=Object.create(r));function x(t){["next","throw","return"].forEach(function(r){i(t,r,function(t){return this._invoke(r,t)})})}function E(a,c){var r;l(this,"_invoke",{value:function(e,n){function t(){return new c(function(t,r){!function r(t,e,n,o){var i,t=f(a[t],a,e);if("throw"!==t.type)return(e=(i=t.arg).value)&&"object"==typeof e&&h.call(e,"__await")?c.resolve(e.__await).then(function(t){r("next",t,n,o)},function(t){r("throw",t,n,o)}):c.resolve(e).then(function(t){i.value=t,n(i)},function(t){return r("throw",t,n,o)});o(t.arg)}(e,n,t,r)})}return r=r?r.then(t,t):t()}})}function j(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function _(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function k(r){if(null!=r){var e,t=r[n];if(t)return t.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length))return e=-1,(t=function t(){for(;++e<r.length;)if(h.call(r,e))return t.value=r[e],t.done=!1,t;return t.value=u,t.done=!0,t}).next=t}throw new TypeError(typeof r+" is not iterable")}return l(L,"constructor",{value:m.prototype=w,configurable:!0}),l(w,"constructor",{value:m,configurable:!0}),m.displayName=i(w,o,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,i(t,o,"GeneratorFunction")),t.prototype=Object.create(L),t},a.awrap=function(t){return{__await:t}},x(E.prototype),i(E.prototype,e,function(){return this}),a.AsyncIterator=E,a.async=function(t,r,e,n,o){void 0===o&&(o=Promise);var i=new E(c(t,r,e,n),o);return a.isGeneratorFunction(r)?i:i.next().then(function(t){return t.done?t.value:i.next()})},x(L),i(L,o,"Generator"),i(L,n,function(){return this}),i(L,"toString",function(){return"[object Generator]"}),a.keys=function(t){var r,e=Object(t),n=[];for(r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},a.values=k,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=u,this.done=!1,this.delegate=null,this.method="next",this.arg=u,this.tryEntries.forEach(_),!t)for(var r in this)"t"===r.charAt(0)&&h.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=u)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function t(t,r){return i.type="throw",i.arg=e,n.next=t,r&&(n.method="next",n.arg=u),!!r}for(var r=this.tryEntries.length-1;0<=r;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=h.call(o,"catchLoc"),c=h.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&h.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}var i=(o=o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc?null:o)?o.completion:{};return i.type=t,i.arg=r,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(i)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),v},finish:function(t){for(var r=this.tryEntries.length-1;0<=r;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),_(e),v}},catch:function(t){for(var r=this.tryEntries.length-1;0<=r;--r){var e,n,o=this.tryEntries[r];if(o.tryLoc===t)return"throw"===(e=o.completion).type&&(n=e.arg,_(o)),n}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:k(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=u),v}},a}("object"==typeof module?module.exports:{});try{regeneratorRuntime=runtime}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=runtime:Function("r","regeneratorRuntime = r")(runtime)}                  dist/vendor/wp-polyfill-dom-rect.js                                                                 0000644                 00000003607 15212564037 0013343 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       
// DOMRect
(function (global) {
	function number(v) {
		return v === undefined ? 0 : Number(v);
	}

	function different(u, v) {
		return u !== v && !(isNaN(u) && isNaN(v));
	}

	function DOMRect(xArg, yArg, wArg, hArg) {
		var x, y, width, height, left, right, top, bottom;

		x = number(xArg);
		y = number(yArg);
		width = number(wArg);
		height = number(hArg);

		Object.defineProperties(this, {
			x: {
				get: function () { return x; },
				set: function (newX) {
					if (different(x, newX)) {
						x = newX;
						left = right = undefined;
					}
				},
				enumerable: true
			},
			y: {
				get: function () { return y; },
				set: function (newY) {
					if (different(y, newY)) {
						y = newY;
						top = bottom = undefined;
					}
				},
				enumerable: true
			},
			width: {
				get: function () { return width; },
				set: function (newWidth) {
					if (different(width, newWidth)) {
						width = newWidth;
						left = right = undefined;
					}
				},
				enumerable: true
			},
			height: {
				get: function () { return height; },
				set: function (newHeight) {
					if (different(height, newHeight)) {
						height = newHeight;
						top = bottom = undefined;
					}
				},
				enumerable: true
			},
			left: {
				get: function () {
					if (left === undefined) {
						left = x + Math.min(0, width);
					}
					return left;
				},
				enumerable: true
			},
			right: {
				get: function () {
					if (right === undefined) {
						right = x + Math.max(0, width);
					}
					return right;
				},
				enumerable: true
			},
			top: {
				get: function () {
					if (top === undefined) {
						top = y + Math.min(0, height);
					}
					return top;
				},
				enumerable: true
			},
			bottom: {
				get: function () {
					if (bottom === undefined) {
						bottom = y + Math.max(0, height);
					}
					return bottom;
				},
				enumerable: true
			}
		});
	}

	global.DOMRect = DOMRect;
}(self));
                                                                                                                         dist/vendor/wp-polyfill-dom-rect.min.js                                                             0000644                 00000001573 15212564037 0014125 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(e){function n(e){return void 0===e?0:Number(e)}function t(e,n){return e!==n&&!(isNaN(e)&&isNaN(n))}function i(e,i,u,r){var o,f,c,a,m,b,d,g;o=n(e),f=n(i),c=n(u),a=n(r),Object.defineProperties(this,{x:{get:function(){return o},set:function(e){t(o,e)&&(o=e,m=b=void 0)},enumerable:!0},y:{get:function(){return f},set:function(e){t(f,e)&&(f=e,d=g=void 0)},enumerable:!0},width:{get:function(){return c},set:function(e){t(c,e)&&(c=e,m=b=void 0)},enumerable:!0},height:{get:function(){return a},set:function(e){t(a,e)&&(a=e,d=g=void 0)},enumerable:!0},left:{get:function(){return void 0===m&&(m=o+Math.min(0,c)),m},enumerable:!0},right:{get:function(){return void 0===b&&(b=o+Math.max(0,c)),b},enumerable:!0},top:{get:function(){return void 0===d&&(d=f+Math.min(0,a)),d},enumerable:!0},bottom:{get:function(){return void 0===g&&(g=f+Math.max(0,a)),g},enumerable:!0}})}e.DOMRect=i}(self);                                                                                                                                     dist/vendor/wp-polyfill-element-closest.js                                                          0000644                 00000000654 15212564037 0014733 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(e){var t=e.Element.prototype;"function"!=typeof t.matches&&(t.matches=t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),o=0;t[o]&&t[o]!==this;)++o;return Boolean(t[o])}),"function"!=typeof t.closest&&(t.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches(e))return t;t=t.parentNode}return null})}(window);
                                                                                    dist/vendor/wp-polyfill-element-closest.min.js                                                      0000644                 00000000654 15212564037 0015515 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(e){var t=e.Element.prototype;"function"!=typeof t.matches&&(t.matches=t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),o=0;t[o]&&t[o]!==this;)++o;return Boolean(t[o])}),"function"!=typeof t.closest&&(t.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches(e))return t;t=t.parentNode}return null})}(window);
                                                                                    dist/vendor/wp-polyfill-fetch.js                                                                    0000644                 00000046547 15212564037 0012734 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       (function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
  (factory((global.WHATWGFetch = {})));
}(this, (function (exports) { 'use strict';

  /* eslint-disable no-prototype-builtins */
  var g =
    (typeof globalThis !== 'undefined' && globalThis) ||
    (typeof self !== 'undefined' && self) ||
    // eslint-disable-next-line no-undef
    (typeof global !== 'undefined' && global) ||
    {};

  var support = {
    searchParams: 'URLSearchParams' in g,
    iterable: 'Symbol' in g && 'iterator' in Symbol,
    blob:
      'FileReader' in g &&
      'Blob' in g &&
      (function() {
        try {
          new Blob();
          return true
        } catch (e) {
          return false
        }
      })(),
    formData: 'FormData' in g,
    arrayBuffer: 'ArrayBuffer' in g
  };

  function isDataView(obj) {
    return obj && DataView.prototype.isPrototypeOf(obj)
  }

  if (support.arrayBuffer) {
    var viewClasses = [
      '[object Int8Array]',
      '[object Uint8Array]',
      '[object Uint8ClampedArray]',
      '[object Int16Array]',
      '[object Uint16Array]',
      '[object Int32Array]',
      '[object Uint32Array]',
      '[object Float32Array]',
      '[object Float64Array]'
    ];

    var isArrayBufferView =
      ArrayBuffer.isView ||
      function(obj) {
        return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
      };
  }

  function normalizeName(name) {
    if (typeof name !== 'string') {
      name = String(name);
    }
    if (/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(name) || name === '') {
      throw new TypeError('Invalid character in header field name: "' + name + '"')
    }
    return name.toLowerCase()
  }

  function normalizeValue(value) {
    if (typeof value !== 'string') {
      value = String(value);
    }
    return value
  }

  // Build a destructive iterator for the value list
  function iteratorFor(items) {
    var iterator = {
      next: function() {
        var value = items.shift();
        return {done: value === undefined, value: value}
      }
    };

    if (support.iterable) {
      iterator[Symbol.iterator] = function() {
        return iterator
      };
    }

    return iterator
  }

  function Headers(headers) {
    this.map = {};

    if (headers instanceof Headers) {
      headers.forEach(function(value, name) {
        this.append(name, value);
      }, this);
    } else if (Array.isArray(headers)) {
      headers.forEach(function(header) {
        if (header.length != 2) {
          throw new TypeError('Headers constructor: expected name/value pair to be length 2, found' + header.length)
        }
        this.append(header[0], header[1]);
      }, this);
    } else if (headers) {
      Object.getOwnPropertyNames(headers).forEach(function(name) {
        this.append(name, headers[name]);
      }, this);
    }
  }

  Headers.prototype.append = function(name, value) {
    name = normalizeName(name);
    value = normalizeValue(value);
    var oldValue = this.map[name];
    this.map[name] = oldValue ? oldValue + ', ' + value : value;
  };

  Headers.prototype['delete'] = function(name) {
    delete this.map[normalizeName(name)];
  };

  Headers.prototype.get = function(name) {
    name = normalizeName(name);
    return this.has(name) ? this.map[name] : null
  };

  Headers.prototype.has = function(name) {
    return this.map.hasOwnProperty(normalizeName(name))
  };

  Headers.prototype.set = function(name, value) {
    this.map[normalizeName(name)] = normalizeValue(value);
  };

  Headers.prototype.forEach = function(callback, thisArg) {
    for (var name in this.map) {
      if (this.map.hasOwnProperty(name)) {
        callback.call(thisArg, this.map[name], name, this);
      }
    }
  };

  Headers.prototype.keys = function() {
    var items = [];
    this.forEach(function(value, name) {
      items.push(name);
    });
    return iteratorFor(items)
  };

  Headers.prototype.values = function() {
    var items = [];
    this.forEach(function(value) {
      items.push(value);
    });
    return iteratorFor(items)
  };

  Headers.prototype.entries = function() {
    var items = [];
    this.forEach(function(value, name) {
      items.push([name, value]);
    });
    return iteratorFor(items)
  };

  if (support.iterable) {
    Headers.prototype[Symbol.iterator] = Headers.prototype.entries;
  }

  function consumed(body) {
    if (body._noBody) return
    if (body.bodyUsed) {
      return Promise.reject(new TypeError('Already read'))
    }
    body.bodyUsed = true;
  }

  function fileReaderReady(reader) {
    return new Promise(function(resolve, reject) {
      reader.onload = function() {
        resolve(reader.result);
      };
      reader.onerror = function() {
        reject(reader.error);
      };
    })
  }

  function readBlobAsArrayBuffer(blob) {
    var reader = new FileReader();
    var promise = fileReaderReady(reader);
    reader.readAsArrayBuffer(blob);
    return promise
  }

  function readBlobAsText(blob) {
    var reader = new FileReader();
    var promise = fileReaderReady(reader);
    var match = /charset=([A-Za-z0-9_-]+)/.exec(blob.type);
    var encoding = match ? match[1] : 'utf-8';
    reader.readAsText(blob, encoding);
    return promise
  }

  function readArrayBufferAsText(buf) {
    var view = new Uint8Array(buf);
    var chars = new Array(view.length);

    for (var i = 0; i < view.length; i++) {
      chars[i] = String.fromCharCode(view[i]);
    }
    return chars.join('')
  }

  function bufferClone(buf) {
    if (buf.slice) {
      return buf.slice(0)
    } else {
      var view = new Uint8Array(buf.byteLength);
      view.set(new Uint8Array(buf));
      return view.buffer
    }
  }

  function Body() {
    this.bodyUsed = false;

    this._initBody = function(body) {
      /*
        fetch-mock wraps the Response object in an ES6 Proxy to
        provide useful test harness features such as flush. However, on
        ES5 browsers without fetch or Proxy support pollyfills must be used;
        the proxy-pollyfill is unable to proxy an attribute unless it exists
        on the object before the Proxy is created. This change ensures
        Response.bodyUsed exists on the instance, while maintaining the
        semantic of setting Request.bodyUsed in the constructor before
        _initBody is called.
      */
      // eslint-disable-next-line no-self-assign
      this.bodyUsed = this.bodyUsed;
      this._bodyInit = body;
      if (!body) {
        this._noBody = true;
        this._bodyText = '';
      } else if (typeof body === 'string') {
        this._bodyText = body;
      } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
        this._bodyBlob = body;
      } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
        this._bodyFormData = body;
      } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
        this._bodyText = body.toString();
      } else if (support.arrayBuffer && support.blob && isDataView(body)) {
        this._bodyArrayBuffer = bufferClone(body.buffer);
        // IE 10-11 can't handle a DataView body.
        this._bodyInit = new Blob([this._bodyArrayBuffer]);
      } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
        this._bodyArrayBuffer = bufferClone(body);
      } else {
        this._bodyText = body = Object.prototype.toString.call(body);
      }

      if (!this.headers.get('content-type')) {
        if (typeof body === 'string') {
          this.headers.set('content-type', 'text/plain;charset=UTF-8');
        } else if (this._bodyBlob && this._bodyBlob.type) {
          this.headers.set('content-type', this._bodyBlob.type);
        } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
          this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
        }
      }
    };

    if (support.blob) {
      this.blob = function() {
        var rejected = consumed(this);
        if (rejected) {
          return rejected
        }

        if (this._bodyBlob) {
          return Promise.resolve(this._bodyBlob)
        } else if (this._bodyArrayBuffer) {
          return Promise.resolve(new Blob([this._bodyArrayBuffer]))
        } else if (this._bodyFormData) {
          throw new Error('could not read FormData body as blob')
        } else {
          return Promise.resolve(new Blob([this._bodyText]))
        }
      };
    }

    this.arrayBuffer = function() {
      if (this._bodyArrayBuffer) {
        var isConsumed = consumed(this);
        if (isConsumed) {
          return isConsumed
        } else if (ArrayBuffer.isView(this._bodyArrayBuffer)) {
          return Promise.resolve(
            this._bodyArrayBuffer.buffer.slice(
              this._bodyArrayBuffer.byteOffset,
              this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
            )
          )
        } else {
          return Promise.resolve(this._bodyArrayBuffer)
        }
      } else if (support.blob) {
        return this.blob().then(readBlobAsArrayBuffer)
      } else {
        throw new Error('could not read as ArrayBuffer')
      }
    };

    this.text = function() {
      var rejected = consumed(this);
      if (rejected) {
        return rejected
      }

      if (this._bodyBlob) {
        return readBlobAsText(this._bodyBlob)
      } else if (this._bodyArrayBuffer) {
        return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))
      } else if (this._bodyFormData) {
        throw new Error('could not read FormData body as text')
      } else {
        return Promise.resolve(this._bodyText)
      }
    };

    if (support.formData) {
      this.formData = function() {
        return this.text().then(decode)
      };
    }

    this.json = function() {
      return this.text().then(JSON.parse)
    };

    return this
  }

  // HTTP methods whose capitalization should be normalized
  var methods = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'];

  function normalizeMethod(method) {
    var upcased = method.toUpperCase();
    return methods.indexOf(upcased) > -1 ? upcased : method
  }

  function Request(input, options) {
    if (!(this instanceof Request)) {
      throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
    }

    options = options || {};
    var body = options.body;

    if (input instanceof Request) {
      if (input.bodyUsed) {
        throw new TypeError('Already read')
      }
      this.url = input.url;
      this.credentials = input.credentials;
      if (!options.headers) {
        this.headers = new Headers(input.headers);
      }
      this.method = input.method;
      this.mode = input.mode;
      this.signal = input.signal;
      if (!body && input._bodyInit != null) {
        body = input._bodyInit;
        input.bodyUsed = true;
      }
    } else {
      this.url = String(input);
    }

    this.credentials = options.credentials || this.credentials || 'same-origin';
    if (options.headers || !this.headers) {
      this.headers = new Headers(options.headers);
    }
    this.method = normalizeMethod(options.method || this.method || 'GET');
    this.mode = options.mode || this.mode || null;
    this.signal = options.signal || this.signal || (function () {
      if ('AbortController' in g) {
        var ctrl = new AbortController();
        return ctrl.signal;
      }
    }());
    this.referrer = null;

    if ((this.method === 'GET' || this.method === 'HEAD') && body) {
      throw new TypeError('Body not allowed for GET or HEAD requests')
    }
    this._initBody(body);

    if (this.method === 'GET' || this.method === 'HEAD') {
      if (options.cache === 'no-store' || options.cache === 'no-cache') {
        // Search for a '_' parameter in the query string
        var reParamSearch = /([?&])_=[^&]*/;
        if (reParamSearch.test(this.url)) {
          // If it already exists then set the value with the current time
          this.url = this.url.replace(reParamSearch, '$1_=' + new Date().getTime());
        } else {
          // Otherwise add a new '_' parameter to the end with the current time
          var reQueryString = /\?/;
          this.url += (reQueryString.test(this.url) ? '&' : '?') + '_=' + new Date().getTime();
        }
      }
    }
  }

  Request.prototype.clone = function() {
    return new Request(this, {body: this._bodyInit})
  };

  function decode(body) {
    var form = new FormData();
    body
      .trim()
      .split('&')
      .forEach(function(bytes) {
        if (bytes) {
          var split = bytes.split('=');
          var name = split.shift().replace(/\+/g, ' ');
          var value = split.join('=').replace(/\+/g, ' ');
          form.append(decodeURIComponent(name), decodeURIComponent(value));
        }
      });
    return form
  }

  function parseHeaders(rawHeaders) {
    var headers = new Headers();
    // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space
    // https://tools.ietf.org/html/rfc7230#section-3.2
    var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ');
    // Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill
    // https://github.com/github/fetch/issues/748
    // https://github.com/zloirock/core-js/issues/751
    preProcessedHeaders
      .split('\r')
      .map(function(header) {
        return header.indexOf('\n') === 0 ? header.substr(1, header.length) : header
      })
      .forEach(function(line) {
        var parts = line.split(':');
        var key = parts.shift().trim();
        if (key) {
          var value = parts.join(':').trim();
          try {
            headers.append(key, value);
          } catch (error) {
            console.warn('Response ' + error.message);
          }
        }
      });
    return headers
  }

  Body.call(Request.prototype);

  function Response(bodyInit, options) {
    if (!(this instanceof Response)) {
      throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
    }
    if (!options) {
      options = {};
    }

    this.type = 'default';
    this.status = options.status === undefined ? 200 : options.status;
    if (this.status < 200 || this.status > 599) {
      throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].")
    }
    this.ok = this.status >= 200 && this.status < 300;
    this.statusText = options.statusText === undefined ? '' : '' + options.statusText;
    this.headers = new Headers(options.headers);
    this.url = options.url || '';
    this._initBody(bodyInit);
  }

  Body.call(Response.prototype);

  Response.prototype.clone = function() {
    return new Response(this._bodyInit, {
      status: this.status,
      statusText: this.statusText,
      headers: new Headers(this.headers),
      url: this.url
    })
  };

  Response.error = function() {
    var response = new Response(null, {status: 200, statusText: ''});
    response.ok = false;
    response.status = 0;
    response.type = 'error';
    return response
  };

  var redirectStatuses = [301, 302, 303, 307, 308];

  Response.redirect = function(url, status) {
    if (redirectStatuses.indexOf(status) === -1) {
      throw new RangeError('Invalid status code')
    }

    return new Response(null, {status: status, headers: {location: url}})
  };

  exports.DOMException = g.DOMException;
  try {
    new exports.DOMException();
  } catch (err) {
    exports.DOMException = function(message, name) {
      this.message = message;
      this.name = name;
      var error = Error(message);
      this.stack = error.stack;
    };
    exports.DOMException.prototype = Object.create(Error.prototype);
    exports.DOMException.prototype.constructor = exports.DOMException;
  }

  function fetch(input, init) {
    return new Promise(function(resolve, reject) {
      var request = new Request(input, init);

      if (request.signal && request.signal.aborted) {
        return reject(new exports.DOMException('Aborted', 'AbortError'))
      }

      var xhr = new XMLHttpRequest();

      function abortXhr() {
        xhr.abort();
      }

      xhr.onload = function() {
        var options = {
          statusText: xhr.statusText,
          headers: parseHeaders(xhr.getAllResponseHeaders() || '')
        };
        // This check if specifically for when a user fetches a file locally from the file system
        // Only if the status is out of a normal range
        if (request.url.indexOf('file://') === 0 && (xhr.status < 200 || xhr.status > 599)) {
          options.status = 200;
        } else {
          options.status = xhr.status;
        }
        options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');
        var body = 'response' in xhr ? xhr.response : xhr.responseText;
        setTimeout(function() {
          resolve(new Response(body, options));
        }, 0);
      };

      xhr.onerror = function() {
        setTimeout(function() {
          reject(new TypeError('Network request failed'));
        }, 0);
      };

      xhr.ontimeout = function() {
        setTimeout(function() {
          reject(new TypeError('Network request timed out'));
        }, 0);
      };

      xhr.onabort = function() {
        setTimeout(function() {
          reject(new exports.DOMException('Aborted', 'AbortError'));
        }, 0);
      };

      function fixUrl(url) {
        try {
          return url === '' && g.location.href ? g.location.href : url
        } catch (e) {
          return url
        }
      }

      xhr.open(request.method, fixUrl(request.url), true);

      if (request.credentials === 'include') {
        xhr.withCredentials = true;
      } else if (request.credentials === 'omit') {
        xhr.withCredentials = false;
      }

      if ('responseType' in xhr) {
        if (support.blob) {
          xhr.responseType = 'blob';
        } else if (
          support.arrayBuffer
        ) {
          xhr.responseType = 'arraybuffer';
        }
      }

      if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers || (g.Headers && init.headers instanceof g.Headers))) {
        var names = [];
        Object.getOwnPropertyNames(init.headers).forEach(function(name) {
          names.push(normalizeName(name));
          xhr.setRequestHeader(name, normalizeValue(init.headers[name]));
        });
        request.headers.forEach(function(value, name) {
          if (names.indexOf(name) === -1) {
            xhr.setRequestHeader(name, value);
          }
        });
      } else {
        request.headers.forEach(function(value, name) {
          xhr.setRequestHeader(name, value);
        });
      }

      if (request.signal) {
        request.signal.addEventListener('abort', abortXhr);

        xhr.onreadystatechange = function() {
          // DONE (success or failure)
          if (xhr.readyState === 4) {
            request.signal.removeEventListener('abort', abortXhr);
          }
        };
      }

      xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);
    })
  }

  fetch.polyfill = true;

  if (!g.fetch) {
    g.fetch = fetch;
    g.Headers = Headers;
    g.Request = Request;
    g.Response = Response;
  }

  exports.Headers = Headers;
  exports.Request = Request;
  exports.Response = Response;
  exports.fetch = fetch;

  Object.defineProperty(exports, '__esModule', { value: true });

})));
                                                                                                                                                         dist/vendor/wp-polyfill-fetch.min.js                                                                0000644                 00000023435 15212564037 0013505 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.WHATWGFetch={})}(this,function(h){"use strict";var e,r,u="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||"undefined"!=typeof global&&global||{},o="URLSearchParams"in u,n="Symbol"in u&&"iterator"in Symbol,f="FileReader"in u&&"Blob"in u&&function(){try{return new Blob,!0}catch(t){return!1}}(),s="FormData"in u,d="ArrayBuffer"in u;function c(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function y(t){return t="string"!=typeof t?String(t):t}function t(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function l(e){this.map={},e instanceof l?e.forEach(function(t,e){this.append(e,t)},this):Array.isArray(e)?e.forEach(function(t){if(2!=t.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function i(t){if(!t._noBody)return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function a(r){return new Promise(function(t,e){r.onload=function(){t(r.result)},r.onerror=function(){e(r.error)}})}function p(t){var e=new FileReader,r=a(e);return e.readAsArrayBuffer(t),r}function b(t){var e;return t.slice?t.slice(0):((e=new Uint8Array(t.byteLength)).set(new Uint8Array(t)),e.buffer)}function m(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,(this._bodyInit=t)?"string"==typeof t?this._bodyText=t:f&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:s&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:o&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():d&&f&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=b(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):d&&(ArrayBuffer.prototype.isPrototypeOf(t)||r(t))?this._bodyArrayBuffer=b(t):this._bodyText=t=Object.prototype.toString.call(t):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},f&&(this.blob=function(){var t=i(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer)return i(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer));if(f)return this.blob().then(p);throw new Error("could not read as ArrayBuffer")},this.text=function(){var t,e,r,o=i(this);if(o)return o;if(this._bodyBlob)return o=this._bodyBlob,t=new FileReader,e=a(t),r=(r=/charset=([A-Za-z0-9_-]+)/.exec(o.type))?r[1]:"utf-8",t.readAsText(o,r),e;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),o=0;o<e.length;o++)r[o]=String.fromCharCode(e[o]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s&&(this.formData=function(){return this.text().then(A)}),this.json=function(){return this.text().then(JSON.parse)},this}d&&(e=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],r=ArrayBuffer.isView||function(t){return t&&-1<e.indexOf(Object.prototype.toString.call(t))}),l.prototype.append=function(t,e){t=c(t),e=y(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},l.prototype.delete=function(t){delete this.map[c(t)]},l.prototype.get=function(t){return t=c(t),this.has(t)?this.map[t]:null},l.prototype.has=function(t){return this.map.hasOwnProperty(c(t))},l.prototype.set=function(t,e){this.map[c(t)]=y(e)},l.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},l.prototype.keys=function(){var r=[];return this.forEach(function(t,e){r.push(e)}),t(r)},l.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),t(e)},l.prototype.entries=function(){var r=[];return this.forEach(function(t,e){r.push([e,t])}),t(r)},n&&(l.prototype[Symbol.iterator]=l.prototype.entries);var w=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function E(t,e){if(!(this instanceof E))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,o=(e=e||{}).body;if(t instanceof E){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new l(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,o||null==t._bodyInit||(o=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new l(e.headers)),this.method=(t=e.method||this.method||"GET",r=t.toUpperCase(),-1<w.indexOf(r)?r:t),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal||function(){if("AbortController"in u)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o),"GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache||((r=/([?&])_=[^&]*/).test(this.url)?this.url=this.url.replace(r,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime())}function A(t){var r=new FormData;return t.trim().split("&").forEach(function(t){var e;t&&(e=(t=t.split("=")).shift().replace(/\+/g," "),t=t.join("=").replace(/\+/g," "),r.append(decodeURIComponent(e),decodeURIComponent(t)))}),r}function g(t,e){if(!(this instanceof g))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(e=e||{},this.type="default",this.status=void 0===e.status?200:e.status,this.status<200||599<this.status)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=200<=this.status&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new l(e.headers),this.url=e.url||"",this._initBody(t)}E.prototype.clone=function(){return new E(this,{body:this._bodyInit})},m.call(E.prototype),m.call(g.prototype),g.prototype.clone=function(){return new g(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},g.error=function(){var t=new g(null,{status:200,statusText:""});return t.ok=!1,t.status=0,t.type="error",t};var T=[301,302,303,307,308];g.redirect=function(t,e){if(-1===T.indexOf(e))throw new RangeError("Invalid status code");return new g(null,{status:e,headers:{location:t}})},h.DOMException=u.DOMException;try{new h.DOMException}catch(t){h.DOMException=function(t,e){this.message=t,this.name=e;e=Error(t);this.stack=e.stack},h.DOMException.prototype=Object.create(Error.prototype),h.DOMException.prototype.constructor=h.DOMException}function _(o,a){return new Promise(function(n,t){var s=new E(o,a);if(s.signal&&s.signal.aborted)return t(new h.DOMException("Aborted","AbortError"));var r,i=new XMLHttpRequest;function e(){i.abort()}i.onload=function(){var t,r,e={statusText:i.statusText,headers:(t=i.getAllResponseHeaders()||"",r=new l,t.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t}).forEach(function(t){var t=t.split(":"),e=t.shift().trim();if(e){t=t.join(":").trim();try{r.append(e,t)}catch(t){console.warn("Response "+t.message)}}}),r)},o=(0===s.url.indexOf("file://")&&(i.status<200||599<i.status)?e.status=200:e.status=i.status,e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL"),"response"in i?i.response:i.responseText);setTimeout(function(){n(new g(o,e))},0)},i.onerror=function(){setTimeout(function(){t(new TypeError("Network request failed"))},0)},i.ontimeout=function(){setTimeout(function(){t(new TypeError("Network request timed out"))},0)},i.onabort=function(){setTimeout(function(){t(new h.DOMException("Aborted","AbortError"))},0)},i.open(s.method,function(e){try{return""===e&&u.location.href?u.location.href:e}catch(t){return e}}(s.url),!0),"include"===s.credentials?i.withCredentials=!0:"omit"===s.credentials&&(i.withCredentials=!1),"responseType"in i&&(f?i.responseType="blob":d&&(i.responseType="arraybuffer")),a&&"object"==typeof a.headers&&!(a.headers instanceof l||u.Headers&&a.headers instanceof u.Headers)?(r=[],Object.getOwnPropertyNames(a.headers).forEach(function(t){r.push(c(t)),i.setRequestHeader(t,y(a.headers[t]))}),s.headers.forEach(function(t,e){-1===r.indexOf(e)&&i.setRequestHeader(e,t)})):s.headers.forEach(function(t,e){i.setRequestHeader(e,t)}),s.signal&&(s.signal.addEventListener("abort",e),i.onreadystatechange=function(){4===i.readyState&&s.signal.removeEventListener("abort",e)}),i.send(void 0===s._bodyInit?null:s._bodyInit)})}_.polyfill=!0,u.fetch||(u.fetch=_,u.Headers=l,u.Request=E,u.Response=g),h.Headers=l,h.Request=E,h.Response=g,h.fetch=_,Object.defineProperty(h,"__esModule",{value:!0})});                                                                                                                                                                                                                                   dist/vendor/wp-polyfill-formdata.js                                                                 0000644                 00000027142 15212564037 0013426 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /* formdata-polyfill. MIT License. Jimmy WÃ¤rting <https://jimmy.warting.se/opensource> */

/* global FormData self Blob File */
/* eslint-disable no-inner-declarations */

if (typeof Blob !== 'undefined' && (typeof FormData === 'undefined' || !FormData.prototype.keys)) {
  const global = typeof globalThis === 'object'
    ? globalThis
    : typeof window === 'object'
      ? window
      : typeof self === 'object' ? self : this

  // keep a reference to native implementation
  const _FormData = global.FormData

  // To be monkey patched
  const _send = global.XMLHttpRequest && global.XMLHttpRequest.prototype.send
  const _fetch = global.Request && global.fetch
  const _sendBeacon = global.navigator && global.navigator.sendBeacon
  // Might be a worker thread...
  const _match = global.Element && global.Element.prototype

  // Unable to patch Request/Response constructor correctly #109
  // only way is to use ES6 class extend
  // https://github.com/babel/babel/issues/1966

  const stringTag = global.Symbol && Symbol.toStringTag

  // Add missing stringTags to blob and files
  if (stringTag) {
    if (!Blob.prototype[stringTag]) {
      Blob.prototype[stringTag] = 'Blob'
    }

    if ('File' in global && !File.prototype[stringTag]) {
      File.prototype[stringTag] = 'File'
    }
  }

  // Fix so you can construct your own File
  try {
    new File([], '') // eslint-disable-line
  } catch (a) {
    global.File = function File (b, d, c) {
      const blob = new Blob(b, c || {})
      const t = c && void 0 !== c.lastModified ? new Date(c.lastModified) : new Date()

      Object.defineProperties(blob, {
        name: {
          value: d
        },
        lastModified: {
          value: +t
        },
        toString: {
          value () {
            return '[object File]'
          }
        }
      })

      if (stringTag) {
        Object.defineProperty(blob, stringTag, {
          value: 'File'
        })
      }

      return blob
    }
  }

  function ensureArgs (args, expected) {
    if (args.length < expected) {
      throw new TypeError(`${expected} argument required, but only ${args.length} present.`)
    }
  }

  /**
   * @param {string} name
   * @param {string | undefined} filename
   * @returns {[string, File|string]}
   */
  function normalizeArgs (name, value, filename) {
    if (value instanceof Blob) {
      filename = filename !== undefined
      ? String(filename + '')
      : typeof value.name === 'string'
      ? value.name
      : 'blob'

      if (value.name !== filename || Object.prototype.toString.call(value) === '[object Blob]') {
        value = new File([value], filename)
      }
      return [String(name), value]
    }
    return [String(name), String(value)]
  }

  // normalize line feeds for textarea
  // https://html.spec.whatwg.org/multipage/form-elements.html#textarea-line-break-normalisation-transformation
  function normalizeLinefeeds (value) {
    return value.replace(/\r?\n|\r/g, '\r\n')
  }

  /**
   * @template T
   * @param {ArrayLike<T>} arr
   * @param {{ (elm: T): void; }} cb
   */
  function each (arr, cb) {
    for (let i = 0; i < arr.length; i++) {
      cb(arr[i])
    }
  }

  const escape = str => str.replace(/\n/g, '%0A').replace(/\r/g, '%0D').replace(/"/g, '%22')

  /**
   * @implements {Iterable}
   */
  class FormDataPolyfill {
    /**
     * FormData class
     *
     * @param {HTMLFormElement=} form
     */
    constructor (form) {
      /** @type {[string, string|File][]} */
      this._data = []

      const self = this
      form && each(form.elements, (/** @type {HTMLInputElement} */ elm) => {
        if (
          !elm.name ||
          elm.disabled ||
          elm.type === 'submit' ||
          elm.type === 'button' ||
          elm.matches('form fieldset[disabled] *')
        ) return

        if (elm.type === 'file') {
          const files = elm.files && elm.files.length
            ? elm.files
            : [new File([], '', { type: 'application/octet-stream' })] // #78

          each(files, file => {
            self.append(elm.name, file)
          })
        } else if (elm.type === 'select-multiple' || elm.type === 'select-one') {
          each(elm.options, opt => {
            !opt.disabled && opt.selected && self.append(elm.name, opt.value)
          })
        } else if (elm.type === 'checkbox' || elm.type === 'radio') {
          if (elm.checked) self.append(elm.name, elm.value)
        } else {
          const value = elm.type === 'textarea' ? normalizeLinefeeds(elm.value) : elm.value
          self.append(elm.name, value)
        }
      })
    }

    /**
     * Append a field
     *
     * @param   {string}           name      field name
     * @param   {string|Blob|File} value     string / blob / file
     * @param   {string=}          filename  filename to use with blob
     * @return  {undefined}
     */
    append (name, value, filename) {
      ensureArgs(arguments, 2)
      this._data.push(normalizeArgs(name, value, filename))
    }

    /**
     * Delete all fields values given name
     *
     * @param   {string}  name  Field name
     * @return  {undefined}
     */
    delete (name) {
      ensureArgs(arguments, 1)
      const result = []
      name = String(name)

      each(this._data, entry => {
        entry[0] !== name && result.push(entry)
      })

      this._data = result
    }

    /**
     * Iterate over all fields as [name, value]
     *
     * @return {Iterator}
     */
    * entries () {
      for (var i = 0; i < this._data.length; i++) {
        yield this._data[i]
      }
    }

    /**
     * Iterate over all fields
     *
     * @param   {Function}  callback  Executed for each item with parameters (value, name, thisArg)
     * @param   {Object=}   thisArg   `this` context for callback function
     */
    forEach (callback, thisArg) {
      ensureArgs(arguments, 1)
      for (const [name, value] of this) {
        callback.call(thisArg, value, name, this)
      }
    }

    /**
     * Return first field value given name
     * or null if non existent
     *
     * @param   {string}  name      Field name
     * @return  {string|File|null}  value Fields value
     */
    get (name) {
      ensureArgs(arguments, 1)
      const entries = this._data
      name = String(name)
      for (let i = 0; i < entries.length; i++) {
        if (entries[i][0] === name) {
          return entries[i][1]
        }
      }
      return null
    }

    /**
     * Return all fields values given name
     *
     * @param   {string}  name  Fields name
     * @return  {Array}         [{String|File}]
     */
    getAll (name) {
      ensureArgs(arguments, 1)
      const result = []
      name = String(name)
      each(this._data, data => {
        data[0] === name && result.push(data[1])
      })

      return result
    }

    /**
     * Check for field name existence
     *
     * @param   {string}   name  Field name
     * @return  {boolean}
     */
    has (name) {
      ensureArgs(arguments, 1)
      name = String(name)
      for (let i = 0; i < this._data.length; i++) {
        if (this._data[i][0] === name) {
          return true
        }
      }
      return false
    }

    /**
     * Iterate over all fields name
     *
     * @return {Iterator}
     */
    * keys () {
      for (const [name] of this) {
        yield name
      }
    }

    /**
     * Overwrite all values given name
     *
     * @param   {string}    name      Filed name
     * @param   {string}    value     Field value
     * @param   {string=}   filename  Filename (optional)
     */
    set (name, value, filename) {
      ensureArgs(arguments, 2)
      name = String(name)
      /** @type {[string, string|File][]} */
      const result = []
      const args = normalizeArgs(name, value, filename)
      let replace = true

      // - replace the first occurrence with same name
      // - discards the remaining with same name
      // - while keeping the same order items where added
      each(this._data, data => {
        data[0] === name
          ? replace && (replace = !result.push(args))
          : result.push(data)
      })

      replace && result.push(args)

      this._data = result
    }

    /**
     * Iterate over all fields
     *
     * @return {Iterator}
     */
    * values () {
      for (const [, value] of this) {
        yield value
      }
    }

    /**
     * Return a native (perhaps degraded) FormData with only a `append` method
     * Can throw if it's not supported
     *
     * @return {FormData}
     */
    ['_asNative'] () {
      const fd = new _FormData()

      for (const [name, value] of this) {
        fd.append(name, value)
      }

      return fd
    }

    /**
     * [_blob description]
     *
     * @return {Blob} [description]
     */
    ['_blob'] () {
        const boundary = '----formdata-polyfill-' + Math.random(),
          chunks = [],
          p = `--${boundary}\r\nContent-Disposition: form-data; name="`
        this.forEach((value, name) => typeof value == 'string'
          ? chunks.push(p + escape(normalizeLinefeeds(name)) + `"\r\n\r\n${normalizeLinefeeds(value)}\r\n`)
          : chunks.push(p + escape(normalizeLinefeeds(name)) + `"; filename="${escape(value.name)}"\r\nContent-Type: ${value.type||"application/octet-stream"}\r\n\r\n`, value, `\r\n`))
        chunks.push(`--${boundary}--`)
        return new Blob(chunks, {
          type: "multipart/form-data; boundary=" + boundary
        })
    }

    /**
     * The class itself is iterable
     * alias for formdata.entries()
     *
     * @return {Iterator}
     */
    [Symbol.iterator] () {
      return this.entries()
    }

    /**
     * Create the default string description.
     *
     * @return  {string} [object FormData]
     */
    toString () {
      return '[object FormData]'
    }
  }

  if (_match && !_match.matches) {
    _match.matches =
      _match.matchesSelector ||
      _match.mozMatchesSelector ||
      _match.msMatchesSelector ||
      _match.oMatchesSelector ||
      _match.webkitMatchesSelector ||
      function (s) {
        var matches = (this.document || this.ownerDocument).querySelectorAll(s)
        var i = matches.length
        while (--i >= 0 && matches.item(i) !== this) {}
        return i > -1
      }
  }

  if (stringTag) {
    /**
     * Create the default string description.
     * It is accessed internally by the Object.prototype.toString().
     */
    FormDataPolyfill.prototype[stringTag] = 'FormData'
  }

  // Patch xhr's send method to call _blob transparently
  if (_send) {
    const setRequestHeader = global.XMLHttpRequest.prototype.setRequestHeader

    global.XMLHttpRequest.prototype.setRequestHeader = function (name, value) {
      setRequestHeader.call(this, name, value)
      if (name.toLowerCase() === 'content-type') this._hasContentType = true
    }

    global.XMLHttpRequest.prototype.send = function (data) {
      // need to patch send b/c old IE don't send blob's type (#44)
      if (data instanceof FormDataPolyfill) {
        const blob = data['_blob']()
        if (!this._hasContentType) this.setRequestHeader('Content-Type', blob.type)
        _send.call(this, blob)
      } else {
        _send.call(this, data)
      }
    }
  }

  // Patch fetch's function to call _blob transparently
  if (_fetch) {
    global.fetch = function (input, init) {
      if (init && init.body && init.body instanceof FormDataPolyfill) {
        init.body = init.body['_blob']()
      }

      return _fetch.call(this, input, init)
    }
  }

  // Patch navigator.sendBeacon to use native FormData
  if (_sendBeacon) {
    global.navigator.sendBeacon = function (url, data) {
      if (data instanceof FormDataPolyfill) {
        data = data['_asNative']()
      }
      return _sendBeacon.call(this, url, data)
    }
  }

  global['FormData'] = FormDataPolyfill
}
                                                                                                                                                                                                                                                                                                                                                                                                                              dist/vendor/wp-polyfill-formdata.min.js                                                             0000644                 00000021272 15212564037 0014206 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! formdata-polyfill. MIT License. Jimmy W?rting <https://jimmy.warting.se/opensource> */
;(function(){var h;function l(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var m="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
function n(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var q=n(this);function r(a,b){if(b)a:{var c=q;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&m(c,a,{configurable:!0,writable:!0,value:b})}}
r("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.A=f;m(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.A};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
r("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=q[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&m(d.prototype,a,{configurable:!0,writable:!0,value:function(){return u(l(this))}})}return a});function u(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
function v(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:l(a)}}var w;if("function"==typeof Object.setPrototypeOf)w=Object.setPrototypeOf;else{var y;a:{var z={a:!0},A={};try{A.__proto__=z;y=A.a;break a}catch(a){}y=!1}w=y?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var B=w;function C(){this.m=!1;this.j=null;this.v=void 0;this.h=1;this.u=this.C=0;this.l=null}
function D(a){if(a.m)throw new TypeError("Generator is already running");a.m=!0}C.prototype.o=function(a){this.v=a};C.prototype.s=function(a){this.l={D:a,F:!0};this.h=this.C||this.u};C.prototype.return=function(a){this.l={return:a};this.h=this.u};function E(a,b){a.h=3;return{value:b}}function F(a){this.g=new C;this.G=a}F.prototype.o=function(a){D(this.g);if(this.g.j)return G(this,this.g.j.next,a,this.g.o);this.g.o(a);return H(this)};
function I(a,b){D(a.g);var c=a.g.j;if(c)return G(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return H(a)}F.prototype.s=function(a){D(this.g);if(this.g.j)return G(this,this.g.j["throw"],a,this.g.o);this.g.s(a);return H(this)};
function G(a,b,c,d){try{var e=b.call(a.g.j,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.m=!1,e;var f=e.value}catch(g){return a.g.j=null,a.g.s(g),H(a)}a.g.j=null;d.call(a.g,f);return H(a)}function H(a){for(;a.g.h;)try{var b=a.G(a.g);if(b)return a.g.m=!1,{value:b.value,done:!1}}catch(c){a.g.v=void 0,a.g.s(c)}a.g.m=!1;if(a.g.l){b=a.g.l;a.g.l=null;if(b.F)throw b.D;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
function J(a){this.next=function(b){return a.o(b)};this.throw=function(b){return a.s(b)};this.return=function(b){return I(a,b)};this[Symbol.iterator]=function(){return this}}function K(a,b){b=new J(new F(b));B&&a.prototype&&B(b,a.prototype);return b}function L(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}
r("Array.prototype.entries",function(a){return a?a:function(){return L(this,function(b,c){return[b,c]})}});
if("undefined"!==typeof Blob&&("undefined"===typeof FormData||!FormData.prototype.keys)){var M=function(a,b){for(var c=0;c<a.length;c++)b(a[c])},N=function(a){return a.replace(/\r?\n|\r/g,"\r\n")},O=function(a,b,c){if(b instanceof Blob){c=void 0!==c?String(c+""):"string"===typeof b.name?b.name:"blob";if(b.name!==c||"[object Blob]"===Object.prototype.toString.call(b))b=new File([b],c);return[String(a),b]}return[String(a),String(b)]},P=function(a,b){if(a.length<b)throw new TypeError(b+" argument required, but only "+
a.length+" present.");},Q="object"===typeof globalThis?globalThis:"object"===typeof window?window:"object"===typeof self?self:this,R=Q.FormData,S=Q.XMLHttpRequest&&Q.XMLHttpRequest.prototype.send,T=Q.Request&&Q.fetch,U=Q.navigator&&Q.navigator.sendBeacon,V=Q.Element&&Q.Element.prototype,W=Q.Symbol&&Symbol.toStringTag;W&&(Blob.prototype[W]||(Blob.prototype[W]="Blob"),"File"in Q&&!File.prototype[W]&&(File.prototype[W]="File"));try{new File([],"")}catch(a){Q.File=function(b,c,d){b=new Blob(b,d||{});
Object.defineProperties(b,{name:{value:c},lastModified:{value:+(d&&void 0!==d.lastModified?new Date(d.lastModified):new Date)},toString:{value:function(){return"[object File]"}}});W&&Object.defineProperty(b,W,{value:"File"});return b}}var escape=function(a){return a.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22")},X=function(a){this.i=[];var b=this;a&&M(a.elements,function(c){if(c.name&&!c.disabled&&"submit"!==c.type&&"button"!==c.type&&!c.matches("form fieldset[disabled] *"))if("file"===
c.type){var d=c.files&&c.files.length?c.files:[new File([],"",{type:"application/octet-stream"})];M(d,function(e){b.append(c.name,e)})}else"select-multiple"===c.type||"select-one"===c.type?M(c.options,function(e){!e.disabled&&e.selected&&b.append(c.name,e.value)}):"checkbox"===c.type||"radio"===c.type?c.checked&&b.append(c.name,c.value):(d="textarea"===c.type?N(c.value):c.value,b.append(c.name,d))})};h=X.prototype;h.append=function(a,b,c){P(arguments,2);this.i.push(O(a,b,c))};h.delete=function(a){P(arguments,
1);var b=[];a=String(a);M(this.i,function(c){c[0]!==a&&b.push(c)});this.i=b};h.entries=function b(){var c,d=this;return K(b,function(e){1==e.h&&(c=0);if(3!=e.h)return c<d.i.length?e=E(e,d.i[c]):(e.h=0,e=void 0),e;c++;e.h=2})};h.forEach=function(b,c){P(arguments,1);for(var d=v(this),e=d.next();!e.done;e=d.next()){var f=v(e.value);e=f.next().value;f=f.next().value;b.call(c,f,e,this)}};h.get=function(b){P(arguments,1);var c=this.i;b=String(b);for(var d=0;d<c.length;d++)if(c[d][0]===b)return c[d][1];
return null};h.getAll=function(b){P(arguments,1);var c=[];b=String(b);M(this.i,function(d){d[0]===b&&c.push(d[1])});return c};h.has=function(b){P(arguments,1);b=String(b);for(var c=0;c<this.i.length;c++)if(this.i[c][0]===b)return!0;return!1};h.keys=function c(){var d=this,e,f,g,k,p;return K(c,function(t){1==t.h&&(e=v(d),f=e.next());if(3!=t.h){if(f.done){t.h=0;return}g=f.value;k=v(g);p=k.next().value;return E(t,p)}f=e.next();t.h=2})};h.set=function(c,d,e){P(arguments,2);c=String(c);var f=[],g=O(c,
d,e),k=!0;M(this.i,function(p){p[0]===c?k&&(k=!f.push(g)):f.push(p)});k&&f.push(g);this.i=f};h.values=function d(){var e=this,f,g,k,p,t;return K(d,function(x){1==x.h&&(f=v(e),g=f.next());if(3!=x.h){if(g.done){x.h=0;return}k=g.value;p=v(k);p.next();t=p.next().value;return E(x,t)}g=f.next();x.h=2})};X.prototype._asNative=function(){for(var d=new R,e=v(this),f=e.next();!f.done;f=e.next()){var g=v(f.value);f=g.next().value;g=g.next().value;d.append(f,g)}return d};X.prototype._blob=function(){var d="----formdata-polyfill-"+
Math.random(),e=[],f="--"+d+'\r\nContent-Disposition: form-data; name="';this.forEach(function(g,k){return"string"==typeof g?e.push(f+escape(N(k))+('"\r\n\r\n'+N(g)+"\r\n")):e.push(f+escape(N(k))+('"; filename="'+escape(g.name)+'"\r\nContent-Type: '+(g.type||"application/octet-stream")+"\r\n\r\n"),g,"\r\n")});e.push("--"+d+"--");return new Blob(e,{type:"multipart/form-data; boundary="+d})};X.prototype[Symbol.iterator]=function(){return this.entries()};X.prototype.toString=function(){return"[object FormData]"};
V&&!V.matches&&(V.matches=V.matchesSelector||V.mozMatchesSelector||V.msMatchesSelector||V.oMatchesSelector||V.webkitMatchesSelector||function(d){d=(this.document||this.ownerDocument).querySelectorAll(d);for(var e=d.length;0<=--e&&d.item(e)!==this;);return-1<e});W&&(X.prototype[W]="FormData");if(S){var Y=Q.XMLHttpRequest.prototype.setRequestHeader;Q.XMLHttpRequest.prototype.setRequestHeader=function(d,e){Y.call(this,d,e);"content-type"===d.toLowerCase()&&(this.B=!0)};Q.XMLHttpRequest.prototype.send=
function(d){d instanceof X?(d=d._blob(),this.B||this.setRequestHeader("Content-Type",d.type),S.call(this,d)):S.call(this,d)}}T&&(Q.fetch=function(d,e){e&&e.body&&e.body instanceof X&&(e.body=e.body._blob());return T.call(this,d,e)});U&&(Q.navigator.sendBeacon=function(d,e){e instanceof X&&(e=e._asNative());return U.call(this,d,e)});Q.FormData=X};})();
                                                                                                                                                                                                                                                                                                                                      dist/vendor/wp-polyfill-inert.js                                                                    0000644                 00000073016 15212564037 0012753 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       (function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
  typeof define === 'function' && define.amd ? define('inert', factory) :
  (factory());
}(this, (function () { 'use strict';

  var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

  /**
   * This work is licensed under the W3C Software and Document License
   * (http://www.w3.org/Consortium/Legal/2015/copyright-software-and-document).
   */

  (function () {
    // Return early if we're not running inside of the browser.
    if (typeof window === 'undefined' || typeof Element === 'undefined') {
      return;
    }

    // Convenience function for converting NodeLists.
    /** @type {typeof Array.prototype.slice} */
    var slice = Array.prototype.slice;

    /**
     * IE has a non-standard name for "matches".
     * @type {typeof Element.prototype.matches}
     */
    var matches = Element.prototype.matches || Element.prototype.msMatchesSelector;

    /** @type {string} */
    var _focusableElementsString = ['a[href]', 'area[href]', 'input:not([disabled])', 'select:not([disabled])', 'textarea:not([disabled])', 'button:not([disabled])', 'details', 'summary', 'iframe', 'object', 'embed', 'video', '[contenteditable]'].join(',');

    /**
     * `InertRoot` manages a single inert subtree, i.e. a DOM subtree whose root element has an `inert`
     * attribute.
     *
     * Its main functions are:
     *
     * - to create and maintain a set of managed `InertNode`s, including when mutations occur in the
     *   subtree. The `makeSubtreeUnfocusable()` method handles collecting `InertNode`s via registering
     *   each focusable node in the subtree with the singleton `InertManager` which manages all known
     *   focusable nodes within inert subtrees. `InertManager` ensures that a single `InertNode`
     *   instance exists for each focusable node which has at least one inert root as an ancestor.
     *
     * - to notify all managed `InertNode`s when this subtree stops being inert (i.e. when the `inert`
     *   attribute is removed from the root node). This is handled in the destructor, which calls the
     *   `deregister` method on `InertManager` for each managed inert node.
     */

    var InertRoot = function () {
      /**
       * @param {!HTMLElement} rootElement The HTMLElement at the root of the inert subtree.
       * @param {!InertManager} inertManager The global singleton InertManager object.
       */
      function InertRoot(rootElement, inertManager) {
        _classCallCheck(this, InertRoot);

        /** @type {!InertManager} */
        this._inertManager = inertManager;

        /** @type {!HTMLElement} */
        this._rootElement = rootElement;

        /**
         * @type {!Set<!InertNode>}
         * All managed focusable nodes in this InertRoot's subtree.
         */
        this._managedNodes = new Set();

        // Make the subtree hidden from assistive technology
        if (this._rootElement.hasAttribute('aria-hidden')) {
          /** @type {?string} */
          this._savedAriaHidden = this._rootElement.getAttribute('aria-hidden');
        } else {
          this._savedAriaHidden = null;
        }
        this._rootElement.setAttribute('aria-hidden', 'true');

        // Make all focusable elements in the subtree unfocusable and add them to _managedNodes
        this._makeSubtreeUnfocusable(this._rootElement);

        // Watch for:
        // - any additions in the subtree: make them unfocusable too
        // - any removals from the subtree: remove them from this inert root's managed nodes
        // - attribute changes: if `tabindex` is added, or removed from an intrinsically focusable
        //   element, make that node a managed node.
        this._observer = new MutationObserver(this._onMutation.bind(this));
        this._observer.observe(this._rootElement, { attributes: true, childList: true, subtree: true });
      }

      /**
       * Call this whenever this object is about to become obsolete.  This unwinds all of the state
       * stored in this object and updates the state of all of the managed nodes.
       */


      _createClass(InertRoot, [{
        key: 'destructor',
        value: function destructor() {
          this._observer.disconnect();

          if (this._rootElement) {
            if (this._savedAriaHidden !== null) {
              this._rootElement.setAttribute('aria-hidden', this._savedAriaHidden);
            } else {
              this._rootElement.removeAttribute('aria-hidden');
            }
          }

          this._managedNodes.forEach(function (inertNode) {
            this._unmanageNode(inertNode.node);
          }, this);

          // Note we cast the nulls to the ANY type here because:
          // 1) We want the class properties to be declared as non-null, or else we
          //    need even more casts throughout this code. All bets are off if an
          //    instance has been destroyed and a method is called.
          // 2) We don't want to cast "this", because we want type-aware optimizations
          //    to know which properties we're setting.
          this._observer = /** @type {?} */null;
          this._rootElement = /** @type {?} */null;
          this._managedNodes = /** @type {?} */null;
          this._inertManager = /** @type {?} */null;
        }

        /**
         * @return {!Set<!InertNode>} A copy of this InertRoot's managed nodes set.
         */

      }, {
        key: '_makeSubtreeUnfocusable',


        /**
         * @param {!Node} startNode
         */
        value: function _makeSubtreeUnfocusable(startNode) {
          var _this2 = this;

          composedTreeWalk(startNode, function (node) {
            return _this2._visitNode(node);
          });

          var activeElement = document.activeElement;

          if (!document.body.contains(startNode)) {
            // startNode may be in shadow DOM, so find its nearest shadowRoot to get the activeElement.
            var node = startNode;
            /** @type {!ShadowRoot|undefined} */
            var root = undefined;
            while (node) {
              if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
                root = /** @type {!ShadowRoot} */node;
                break;
              }
              node = node.parentNode;
            }
            if (root) {
              activeElement = root.activeElement;
            }
          }
          if (startNode.contains(activeElement)) {
            activeElement.blur();
            // In IE11, if an element is already focused, and then set to tabindex=-1
            // calling blur() will not actually move the focus.
            // To work around this we call focus() on the body instead.
            if (activeElement === document.activeElement) {
              document.body.focus();
            }
          }
        }

        /**
         * @param {!Node} node
         */

      }, {
        key: '_visitNode',
        value: function _visitNode(node) {
          if (node.nodeType !== Node.ELEMENT_NODE) {
            return;
          }
          var element = /** @type {!HTMLElement} */node;

          // If a descendant inert root becomes un-inert, its descendants will still be inert because of
          // this inert root, so all of its managed nodes need to be adopted by this InertRoot.
          if (element !== this._rootElement && element.hasAttribute('inert')) {
            this._adoptInertRoot(element);
          }

          if (matches.call(element, _focusableElementsString) || element.hasAttribute('tabindex')) {
            this._manageNode(element);
          }
        }

        /**
         * Register the given node with this InertRoot and with InertManager.
         * @param {!Node} node
         */

      }, {
        key: '_manageNode',
        value: function _manageNode(node) {
          var inertNode = this._inertManager.register(node, this);
          this._managedNodes.add(inertNode);
        }

        /**
         * Unregister the given node with this InertRoot and with InertManager.
         * @param {!Node} node
         */

      }, {
        key: '_unmanageNode',
        value: function _unmanageNode(node) {
          var inertNode = this._inertManager.deregister(node, this);
          if (inertNode) {
            this._managedNodes['delete'](inertNode);
          }
        }

        /**
         * Unregister the entire subtree starting at `startNode`.
         * @param {!Node} startNode
         */

      }, {
        key: '_unmanageSubtree',
        value: function _unmanageSubtree(startNode) {
          var _this3 = this;

          composedTreeWalk(startNode, function (node) {
            return _this3._unmanageNode(node);
          });
        }

        /**
         * If a descendant node is found with an `inert` attribute, adopt its managed nodes.
         * @param {!HTMLElement} node
         */

      }, {
        key: '_adoptInertRoot',
        value: function _adoptInertRoot(node) {
          var inertSubroot = this._inertManager.getInertRoot(node);

          // During initialisation this inert root may not have been registered yet,
          // so register it now if need be.
          if (!inertSubroot) {
            this._inertManager.setInert(node, true);
            inertSubroot = this._inertManager.getInertRoot(node);
          }

          inertSubroot.managedNodes.forEach(function (savedInertNode) {
            this._manageNode(savedInertNode.node);
          }, this);
        }

        /**
         * Callback used when mutation observer detects subtree additions, removals, or attribute changes.
         * @param {!Array<!MutationRecord>} records
         * @param {!MutationObserver} self
         */

      }, {
        key: '_onMutation',
        value: function _onMutation(records, self) {
          records.forEach(function (record) {
            var target = /** @type {!HTMLElement} */record.target;
            if (record.type === 'childList') {
              // Manage added nodes
              slice.call(record.addedNodes).forEach(function (node) {
                this._makeSubtreeUnfocusable(node);
              }, this);

              // Un-manage removed nodes
              slice.call(record.removedNodes).forEach(function (node) {
                this._unmanageSubtree(node);
              }, this);
            } else if (record.type === 'attributes') {
              if (record.attributeName === 'tabindex') {
                // Re-initialise inert node if tabindex changes
                this._manageNode(target);
              } else if (target !== this._rootElement && record.attributeName === 'inert' && target.hasAttribute('inert')) {
                // If a new inert root is added, adopt its managed nodes and make sure it knows about the
                // already managed nodes from this inert subroot.
                this._adoptInertRoot(target);
                var inertSubroot = this._inertManager.getInertRoot(target);
                this._managedNodes.forEach(function (managedNode) {
                  if (target.contains(managedNode.node)) {
                    inertSubroot._manageNode(managedNode.node);
                  }
                });
              }
            }
          }, this);
        }
      }, {
        key: 'managedNodes',
        get: function get() {
          return new Set(this._managedNodes);
        }

        /** @return {boolean} */

      }, {
        key: 'hasSavedAriaHidden',
        get: function get() {
          return this._savedAriaHidden !== null;
        }

        /** @param {?string} ariaHidden */

      }, {
        key: 'savedAriaHidden',
        set: function set(ariaHidden) {
          this._savedAriaHidden = ariaHidden;
        }

        /** @return {?string} */
        ,
        get: function get() {
          return this._savedAriaHidden;
        }
      }]);

      return InertRoot;
    }();

    /**
     * `InertNode` initialises and manages a single inert node.
     * A node is inert if it is a descendant of one or more inert root elements.
     *
     * On construction, `InertNode` saves the existing `tabindex` value for the node, if any, and
     * either removes the `tabindex` attribute or sets it to `-1`, depending on whether the element
     * is intrinsically focusable or not.
     *
     * `InertNode` maintains a set of `InertRoot`s which are descendants of this `InertNode`. When an
     * `InertRoot` is destroyed, and calls `InertManager.deregister()`, the `InertManager` notifies the
     * `InertNode` via `removeInertRoot()`, which in turn destroys the `InertNode` if no `InertRoot`s
     * remain in the set. On destruction, `InertNode` reinstates the stored `tabindex` if one exists,
     * or removes the `tabindex` attribute if the element is intrinsically focusable.
     */


    var InertNode = function () {
      /**
       * @param {!Node} node A focusable element to be made inert.
       * @param {!InertRoot} inertRoot The inert root element associated with this inert node.
       */
      function InertNode(node, inertRoot) {
        _classCallCheck(this, InertNode);

        /** @type {!Node} */
        this._node = node;

        /** @type {boolean} */
        this._overrodeFocusMethod = false;

        /**
         * @type {!Set<!InertRoot>} The set of descendant inert roots.
         *    If and only if this set becomes empty, this node is no longer inert.
         */
        this._inertRoots = new Set([inertRoot]);

        /** @type {?number} */
        this._savedTabIndex = null;

        /** @type {boolean} */
        this._destroyed = false;

        // Save any prior tabindex info and make this node untabbable
        this.ensureUntabbable();
      }

      /**
       * Call this whenever this object is about to become obsolete.
       * This makes the managed node focusable again and deletes all of the previously stored state.
       */


      _createClass(InertNode, [{
        key: 'destructor',
        value: function destructor() {
          this._throwIfDestroyed();

          if (this._node && this._node.nodeType === Node.ELEMENT_NODE) {
            var element = /** @type {!HTMLElement} */this._node;
            if (this._savedTabIndex !== null) {
              element.setAttribute('tabindex', this._savedTabIndex);
            } else {
              element.removeAttribute('tabindex');
            }

            // Use `delete` to restore native focus method.
            if (this._overrodeFocusMethod) {
              delete element.focus;
            }
          }

          // See note in InertRoot.destructor for why we cast these nulls to ANY.
          this._node = /** @type {?} */null;
          this._inertRoots = /** @type {?} */null;
          this._destroyed = true;
        }

        /**
         * @type {boolean} Whether this object is obsolete because the managed node is no longer inert.
         * If the object has been destroyed, any attempt to access it will cause an exception.
         */

      }, {
        key: '_throwIfDestroyed',


        /**
         * Throw if user tries to access destroyed InertNode.
         */
        value: function _throwIfDestroyed() {
          if (this.destroyed) {
            throw new Error('Trying to access destroyed InertNode');
          }
        }

        /** @return {boolean} */

      }, {
        key: 'ensureUntabbable',


        /** Save the existing tabindex value and make the node untabbable and unfocusable */
        value: function ensureUntabbable() {
          if (this.node.nodeType !== Node.ELEMENT_NODE) {
            return;
          }
          var element = /** @type {!HTMLElement} */this.node;
          if (matches.call(element, _focusableElementsString)) {
            if ( /** @type {!HTMLElement} */element.tabIndex === -1 && this.hasSavedTabIndex) {
              return;
            }

            if (element.hasAttribute('tabindex')) {
              this._savedTabIndex = /** @type {!HTMLElement} */element.tabIndex;
            }
            element.setAttribute('tabindex', '-1');
            if (element.nodeType === Node.ELEMENT_NODE) {
              element.focus = function () {};
              this._overrodeFocusMethod = true;
            }
          } else if (element.hasAttribute('tabindex')) {
            this._savedTabIndex = /** @type {!HTMLElement} */element.tabIndex;
            element.removeAttribute('tabindex');
          }
        }

        /**
         * Add another inert root to this inert node's set of managing inert roots.
         * @param {!InertRoot} inertRoot
         */

      }, {
        key: 'addInertRoot',
        value: function addInertRoot(inertRoot) {
          this._throwIfDestroyed();
          this._inertRoots.add(inertRoot);
        }

        /**
         * Remove the given inert root from this inert node's set of managing inert roots.
         * If the set of managing inert roots becomes empty, this node is no longer inert,
         * so the object should be destroyed.
         * @param {!InertRoot} inertRoot
         */

      }, {
        key: 'removeInertRoot',
        value: function removeInertRoot(inertRoot) {
          this._throwIfDestroyed();
          this._inertRoots['delete'](inertRoot);
          if (this._inertRoots.size === 0) {
            this.destructor();
          }
        }
      }, {
        key: 'destroyed',
        get: function get() {
          return (/** @type {!InertNode} */this._destroyed
          );
        }
      }, {
        key: 'hasSavedTabIndex',
        get: function get() {
          return this._savedTabIndex !== null;
        }

        /** @return {!Node} */

      }, {
        key: 'node',
        get: function get() {
          this._throwIfDestroyed();
          return this._node;
        }

        /** @param {?number} tabIndex */

      }, {
        key: 'savedTabIndex',
        set: function set(tabIndex) {
          this._throwIfDestroyed();
          this._savedTabIndex = tabIndex;
        }

        /** @return {?number} */
        ,
        get: function get() {
          this._throwIfDestroyed();
          return this._savedTabIndex;
        }
      }]);

      return InertNode;
    }();

    /**
     * InertManager is a per-document singleton object which manages all inert roots and nodes.
     *
     * When an element becomes an inert root by having an `inert` attribute set and/or its `inert`
     * property set to `true`, the `setInert` method creates an `InertRoot` object for the element.
     * The `InertRoot` in turn registers itself as managing all of the element's focusable descendant
     * nodes via the `register()` method. The `InertManager` ensures that a single `InertNode` instance
     * is created for each such node, via the `_managedNodes` map.
     */


    var InertManager = function () {
      /**
       * @param {!Document} document
       */
      function InertManager(document) {
        _classCallCheck(this, InertManager);

        if (!document) {
          throw new Error('Missing required argument; InertManager needs to wrap a document.');
        }

        /** @type {!Document} */
        this._document = document;

        /**
         * All managed nodes known to this InertManager. In a map to allow looking up by Node.
         * @type {!Map<!Node, !InertNode>}
         */
        this._managedNodes = new Map();

        /**
         * All inert roots known to this InertManager. In a map to allow looking up by Node.
         * @type {!Map<!Node, !InertRoot>}
         */
        this._inertRoots = new Map();

        /**
         * Observer for mutations on `document.body`.
         * @type {!MutationObserver}
         */
        this._observer = new MutationObserver(this._watchForInert.bind(this));

        // Add inert style.
        addInertStyle(document.head || document.body || document.documentElement);

        // Wait for document to be loaded.
        if (document.readyState === 'loading') {
          document.addEventListener('DOMContentLoaded', this._onDocumentLoaded.bind(this));
        } else {
          this._onDocumentLoaded();
        }
      }

      /**
       * Set whether the given element should be an inert root or not.
       * @param {!HTMLElement} root
       * @param {boolean} inert
       */


      _createClass(InertManager, [{
        key: 'setInert',
        value: function setInert(root, inert) {
          if (inert) {
            if (this._inertRoots.has(root)) {
              // element is already inert
              return;
            }

            var inertRoot = new InertRoot(root, this);
            root.setAttribute('inert', '');
            this._inertRoots.set(root, inertRoot);
            // If not contained in the document, it must be in a shadowRoot.
            // Ensure inert styles are added there.
            if (!this._document.body.contains(root)) {
              var parent = root.parentNode;
              while (parent) {
                if (parent.nodeType === 11) {
                  addInertStyle(parent);
                }
                parent = parent.parentNode;
              }
            }
          } else {
            if (!this._inertRoots.has(root)) {
              // element is already non-inert
              return;
            }

            var _inertRoot = this._inertRoots.get(root);
            _inertRoot.destructor();
            this._inertRoots['delete'](root);
            root.removeAttribute('inert');
          }
        }

        /**
         * Get the InertRoot object corresponding to the given inert root element, if any.
         * @param {!Node} element
         * @return {!InertRoot|undefined}
         */

      }, {
        key: 'getInertRoot',
        value: function getInertRoot(element) {
          return this._inertRoots.get(element);
        }

        /**
         * Register the given InertRoot as managing the given node.
         * In the case where the node has a previously existing inert root, this inert root will
         * be added to its set of inert roots.
         * @param {!Node} node
         * @param {!InertRoot} inertRoot
         * @return {!InertNode} inertNode
         */

      }, {
        key: 'register',
        value: function register(node, inertRoot) {
          var inertNode = this._managedNodes.get(node);
          if (inertNode !== undefined) {
            // node was already in an inert subtree
            inertNode.addInertRoot(inertRoot);
          } else {
            inertNode = new InertNode(node, inertRoot);
          }

          this._managedNodes.set(node, inertNode);

          return inertNode;
        }

        /**
         * De-register the given InertRoot as managing the given inert node.
         * Removes the inert root from the InertNode's set of managing inert roots, and remove the inert
         * node from the InertManager's set of managed nodes if it is destroyed.
         * If the node is not currently managed, this is essentially a no-op.
         * @param {!Node} node
         * @param {!InertRoot} inertRoot
         * @return {?InertNode} The potentially destroyed InertNode associated with this node, if any.
         */

      }, {
        key: 'deregister',
        value: function deregister(node, inertRoot) {
          var inertNode = this._managedNodes.get(node);
          if (!inertNode) {
            return null;
          }

          inertNode.removeInertRoot(inertRoot);
          if (inertNode.destroyed) {
            this._managedNodes['delete'](node);
          }

          return inertNode;
        }

        /**
         * Callback used when document has finished loading.
         */

      }, {
        key: '_onDocumentLoaded',
        value: function _onDocumentLoaded() {
          // Find all inert roots in document and make them actually inert.
          var inertElements = slice.call(this._document.querySelectorAll('[inert]'));
          inertElements.forEach(function (inertElement) {
            this.setInert(inertElement, true);
          }, this);

          // Comment this out to use programmatic API only.
          this._observer.observe(this._document.body || this._document.documentElement, { attributes: true, subtree: true, childList: true });
        }

        /**
         * Callback used when mutation observer detects attribute changes.
         * @param {!Array<!MutationRecord>} records
         * @param {!MutationObserver} self
         */

      }, {
        key: '_watchForInert',
        value: function _watchForInert(records, self) {
          var _this = this;
          records.forEach(function (record) {
            switch (record.type) {
              case 'childList':
                slice.call(record.addedNodes).forEach(function (node) {
                  if (node.nodeType !== Node.ELEMENT_NODE) {
                    return;
                  }
                  var inertElements = slice.call(node.querySelectorAll('[inert]'));
                  if (matches.call(node, '[inert]')) {
                    inertElements.unshift(node);
                  }
                  inertElements.forEach(function (inertElement) {
                    this.setInert(inertElement, true);
                  }, _this);
                }, _this);
                break;
              case 'attributes':
                if (record.attributeName !== 'inert') {
                  return;
                }
                var target = /** @type {!HTMLElement} */record.target;
                var inert = target.hasAttribute('inert');
                _this.setInert(target, inert);
                break;
            }
          }, this);
        }
      }]);

      return InertManager;
    }();

    /**
     * Recursively walk the composed tree from |node|.
     * @param {!Node} node
     * @param {(function (!HTMLElement))=} callback Callback to be called for each element traversed,
     *     before descending into child nodes.
     * @param {?ShadowRoot=} shadowRootAncestor The nearest ShadowRoot ancestor, if any.
     */


    function composedTreeWalk(node, callback, shadowRootAncestor) {
      if (node.nodeType == Node.ELEMENT_NODE) {
        var element = /** @type {!HTMLElement} */node;
        if (callback) {
          callback(element);
        }

        // Descend into node:
        // If it has a ShadowRoot, ignore all child elements - these will be picked
        // up by the <content> or <shadow> elements. Descend straight into the
        // ShadowRoot.
        var shadowRoot = /** @type {!HTMLElement} */element.shadowRoot;
        if (shadowRoot) {
          composedTreeWalk(shadowRoot, callback, shadowRoot);
          return;
        }

        // If it is a <content> element, descend into distributed elements - these
        // are elements from outside the shadow root which are rendered inside the
        // shadow DOM.
        if (element.localName == 'content') {
          var content = /** @type {!HTMLContentElement} */element;
          // Verifies if ShadowDom v0 is supported.
          var distributedNodes = content.getDistributedNodes ? content.getDistributedNodes() : [];
          for (var i = 0; i < distributedNodes.length; i++) {
            composedTreeWalk(distributedNodes[i], callback, shadowRootAncestor);
          }
          return;
        }

        // If it is a <slot> element, descend into assigned nodes - these
        // are elements from outside the shadow root which are rendered inside the
        // shadow DOM.
        if (element.localName == 'slot') {
          var slot = /** @type {!HTMLSlotElement} */element;
          // Verify if ShadowDom v1 is supported.
          var _distributedNodes = slot.assignedNodes ? slot.assignedNodes({ flatten: true }) : [];
          for (var _i = 0; _i < _distributedNodes.length; _i++) {
            composedTreeWalk(_distributedNodes[_i], callback, shadowRootAncestor);
          }
          return;
        }
      }

      // If it is neither the parent of a ShadowRoot, a <content> element, a <slot>
      // element, nor a <shadow> element recurse normally.
      var child = node.firstChild;
      while (child != null) {
        composedTreeWalk(child, callback, shadowRootAncestor);
        child = child.nextSibling;
      }
    }

    /**
     * Adds a style element to the node containing the inert specific styles
     * @param {!Node} node
     */
    function addInertStyle(node) {
      if (node.querySelector('style#inert-style, link#inert-style')) {
        return;
      }
      var style = document.createElement('style');
      style.setAttribute('id', 'inert-style');
      style.textContent = '\n' + '[inert] {\n' + '  pointer-events: none;\n' + '  cursor: default;\n' + '}\n' + '\n' + '[inert], [inert] * {\n' + '  -webkit-user-select: none;\n' + '  -moz-user-select: none;\n' + '  -ms-user-select: none;\n' + '  user-select: none;\n' + '}\n';
      node.appendChild(style);
    }

    if (!HTMLElement.prototype.hasOwnProperty('inert')) {
      /** @type {!InertManager} */
      var inertManager = new InertManager(document);

      Object.defineProperty(HTMLElement.prototype, 'inert', {
        enumerable: true,
        /** @this {!HTMLElement} */
        get: function get() {
          return this.hasAttribute('inert');
        },
        /** @this {!HTMLElement} */
        set: function set(inert) {
          inertManager.setInert(this, inert);
        }
      });
    }
  })();

})));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  dist/vendor/wp-polyfill-inert.min.js                                                                0000644                 00000017776 15212564037 0013550 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(e){("object"!=typeof exports||"undefined"==typeof module)&&"function"==typeof define&&define.amd?define("inert",e):e()}(function(){"use strict";var o,r,t,i,s,n,e=function(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e};function a(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){d(this,u),this._inertManager=t,this._rootElement=e,this._managedNodes=new Set,this._rootElement.hasAttribute("aria-hidden")?this._savedAriaHidden=this._rootElement.getAttribute("aria-hidden"):this._savedAriaHidden=null,this._rootElement.setAttribute("aria-hidden","true"),this._makeSubtreeUnfocusable(this._rootElement),this._observer=new MutationObserver(this._onMutation.bind(this)),this._observer.observe(this._rootElement,{attributes:!0,childList:!0,subtree:!0})}function h(e,t){d(this,h),this._node=e,this._overrodeFocusMethod=!1,this._inertRoots=new Set([t]),this._savedTabIndex=null,this._destroyed=!1,this.ensureUntabbable()}function l(e){if(d(this,l),!e)throw new Error("Missing required argument; InertManager needs to wrap a document.");this._document=e,this._managedNodes=new Map,this._inertRoots=new Map,this._observer=new MutationObserver(this._watchForInert.bind(this)),_(e.head||e.body||e.documentElement),"loading"===e.readyState?e.addEventListener("DOMContentLoaded",this._onDocumentLoaded.bind(this)):this._onDocumentLoaded()}function c(e,t,n){if(e.nodeType==Node.ELEMENT_NODE){var i=e,o=(t&&t(i),i.shadowRoot);if(o)return void c(o,t,o);if("content"==i.localName){for(var o=i,r=o.getDistributedNodes?o.getDistributedNodes():[],s=0;s<r.length;s++)c(r[s],t,n);return}if("slot"==i.localName){for(var o=i,a=o.assignedNodes?o.assignedNodes({flatten:!0}):[],d=0;d<a.length;d++)c(a[d],t,n);return}}for(var u=e.firstChild;null!=u;)c(u,t,n),u=u.nextSibling}function _(e){var t;e.querySelector("style#inert-style, link#inert-style")||((t=document.createElement("style")).setAttribute("id","inert-style"),t.textContent="\n[inert] {\n  pointer-events: none;\n  cursor: default;\n}\n\n[inert], [inert] * {\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n",e.appendChild(t))}"undefined"!=typeof window&&"undefined"!=typeof Element&&(o=Array.prototype.slice,r=Element.prototype.matches||Element.prototype.msMatchesSelector,t=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","details","summary","iframe","object","embed","video","[contenteditable]"].join(","),e(u,[{key:"destructor",value:function(){this._observer.disconnect(),this._rootElement&&(null!==this._savedAriaHidden?this._rootElement.setAttribute("aria-hidden",this._savedAriaHidden):this._rootElement.removeAttribute("aria-hidden")),this._managedNodes.forEach(function(e){this._unmanageNode(e.node)},this),this._observer=null,this._rootElement=null,this._managedNodes=null,this._inertManager=null}},{key:"_makeSubtreeUnfocusable",value:function(e){var t=this,n=(c(e,function(e){return t._visitNode(e)}),document.activeElement);if(!document.body.contains(e)){for(var i=e,o=void 0;i;){if(i.nodeType===Node.DOCUMENT_FRAGMENT_NODE){o=i;break}i=i.parentNode}o&&(n=o.activeElement)}e.contains(n)&&(n.blur(),n===document.activeElement&&document.body.focus())}},{key:"_visitNode",value:function(e){e.nodeType===Node.ELEMENT_NODE&&((e=e)!==this._rootElement&&e.hasAttribute("inert")&&this._adoptInertRoot(e),(r.call(e,t)||e.hasAttribute("tabindex"))&&this._manageNode(e))}},{key:"_manageNode",value:function(e){e=this._inertManager.register(e,this);this._managedNodes.add(e)}},{key:"_unmanageNode",value:function(e){e=this._inertManager.deregister(e,this);e&&this._managedNodes.delete(e)}},{key:"_unmanageSubtree",value:function(e){var t=this;c(e,function(e){return t._unmanageNode(e)})}},{key:"_adoptInertRoot",value:function(e){var t=this._inertManager.getInertRoot(e);t||(this._inertManager.setInert(e,!0),t=this._inertManager.getInertRoot(e)),t.managedNodes.forEach(function(e){this._manageNode(e.node)},this)}},{key:"_onMutation",value:function(e,t){e.forEach(function(e){var t,n=e.target;"childList"===e.type?(o.call(e.addedNodes).forEach(function(e){this._makeSubtreeUnfocusable(e)},this),o.call(e.removedNodes).forEach(function(e){this._unmanageSubtree(e)},this)):"attributes"===e.type&&("tabindex"===e.attributeName?this._manageNode(n):n!==this._rootElement&&"inert"===e.attributeName&&n.hasAttribute("inert")&&(this._adoptInertRoot(n),t=this._inertManager.getInertRoot(n),this._managedNodes.forEach(function(e){n.contains(e.node)&&t._manageNode(e.node)})))},this)}},{key:"managedNodes",get:function(){return new Set(this._managedNodes)}},{key:"hasSavedAriaHidden",get:function(){return null!==this._savedAriaHidden}},{key:"savedAriaHidden",set:function(e){this._savedAriaHidden=e},get:function(){return this._savedAriaHidden}}]),i=u,e(h,[{key:"destructor",value:function(){var e;this._throwIfDestroyed(),this._node&&this._node.nodeType===Node.ELEMENT_NODE&&(e=this._node,null!==this._savedTabIndex?e.setAttribute("tabindex",this._savedTabIndex):e.removeAttribute("tabindex"),this._overrodeFocusMethod&&delete e.focus),this._node=null,this._inertRoots=null,this._destroyed=!0}},{key:"_throwIfDestroyed",value:function(){if(this.destroyed)throw new Error("Trying to access destroyed InertNode")}},{key:"ensureUntabbable",value:function(){var e;this.node.nodeType===Node.ELEMENT_NODE&&(e=this.node,r.call(e,t)?-1===e.tabIndex&&this.hasSavedTabIndex||(e.hasAttribute("tabindex")&&(this._savedTabIndex=e.tabIndex),e.setAttribute("tabindex","-1"),e.nodeType===Node.ELEMENT_NODE&&(e.focus=function(){},this._overrodeFocusMethod=!0)):e.hasAttribute("tabindex")&&(this._savedTabIndex=e.tabIndex,e.removeAttribute("tabindex")))}},{key:"addInertRoot",value:function(e){this._throwIfDestroyed(),this._inertRoots.add(e)}},{key:"removeInertRoot",value:function(e){this._throwIfDestroyed(),this._inertRoots.delete(e),0===this._inertRoots.size&&this.destructor()}},{key:"destroyed",get:function(){return this._destroyed}},{key:"hasSavedTabIndex",get:function(){return null!==this._savedTabIndex}},{key:"node",get:function(){return this._throwIfDestroyed(),this._node}},{key:"savedTabIndex",set:function(e){this._throwIfDestroyed(),this._savedTabIndex=e},get:function(){return this._throwIfDestroyed(),this._savedTabIndex}}]),s=h,e(l,[{key:"setInert",value:function(e,t){if(t){if(!this._inertRoots.has(e)){t=new i(e,this);if(e.setAttribute("inert",""),this._inertRoots.set(e,t),!this._document.body.contains(e))for(var n=e.parentNode;n;)11===n.nodeType&&_(n),n=n.parentNode}}else this._inertRoots.has(e)&&(this._inertRoots.get(e).destructor(),this._inertRoots.delete(e),e.removeAttribute("inert"))}},{key:"getInertRoot",value:function(e){return this._inertRoots.get(e)}},{key:"register",value:function(e,t){var n=this._managedNodes.get(e);return void 0!==n?n.addInertRoot(t):n=new s(e,t),this._managedNodes.set(e,n),n}},{key:"deregister",value:function(e,t){var n=this._managedNodes.get(e);return n?(n.removeInertRoot(t),n.destroyed&&this._managedNodes.delete(e),n):null}},{key:"_onDocumentLoaded",value:function(){o.call(this._document.querySelectorAll("[inert]")).forEach(function(e){this.setInert(e,!0)},this),this._observer.observe(this._document.body||this._document.documentElement,{attributes:!0,subtree:!0,childList:!0})}},{key:"_watchForInert",value:function(e,t){var i=this;e.forEach(function(e){switch(e.type){case"childList":o.call(e.addedNodes).forEach(function(e){var t;e.nodeType===Node.ELEMENT_NODE&&(t=o.call(e.querySelectorAll("[inert]")),r.call(e,"[inert]")&&t.unshift(e),t.forEach(function(e){this.setInert(e,!0)},i))},i);break;case"attributes":if("inert"!==e.attributeName)return;var t=e.target,n=t.hasAttribute("inert");i.setInert(t,n)}},this)}}]),e=l,HTMLElement.prototype.hasOwnProperty("inert")||(n=new e(document),Object.defineProperty(HTMLElement.prototype,"inert",{enumerable:!0,get:function(){return this.hasAttribute("inert")},set:function(e){n.setInert(this,e)}})))});
  dist/vendor/wp-polyfill-node-contains.js                                                            0000644                 00000001203 15212564037 0014360 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       
// Node.prototype.contains
(function() {

	function contains(node) {
		if (!(0 in arguments)) {
			throw new TypeError('1 argument is required');
		}

		do {
			if (this === node) {
				return true;
			}
		// eslint-disable-next-line no-cond-assign
		} while (node = node && node.parentNode);

		return false;
	}

	// IE
	if ('HTMLElement' in self && 'contains' in HTMLElement.prototype) {
		try {
			delete HTMLElement.prototype.contains;
		// eslint-disable-next-line no-empty
		} catch (e) {}
	}

	if ('Node' in self) {
		Node.prototype.contains = contains;
	} else {
		document.contains = Element.prototype.contains = contains;
	}

}());
                                                                                                                                                                                                                                                                                                                                                                                             dist/vendor/wp-polyfill-node-contains.min.js                                                        0000644                 00000000541 15212564037 0015146 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(){function e(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1}if("HTMLElement"in self&&"contains"in HTMLElement.prototype)try{delete HTMLElement.prototype.contains}catch(e){}"Node"in self?Node.prototype.contains=e:document.contains=Element.prototype.contains=e}();                                                                                                                                                               dist/vendor/wp-polyfill-object-fit.js                                                               0000644                 00000021741 15212564037 0013656 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*----------------------------------------
 * objectFitPolyfill 2.3.5
 *
 * Made by Constance Chen
 * Released under the ISC license
 *
 * https://github.com/constancecchen/object-fit-polyfill
 *--------------------------------------*/

(function() {
  'use strict';

  // if the page is being rendered on the server, don't continue
  if (typeof window === 'undefined') return;

  // Workaround for Edge 16-18, which only implemented object-fit for <img> tags
  var edgeMatch = window.navigator.userAgent.match(/Edge\/(\d{2})\./);
  var edgeVersion = edgeMatch ? parseInt(edgeMatch[1], 10) : null;
  var edgePartialSupport = edgeVersion
    ? edgeVersion >= 16 && edgeVersion <= 18
    : false;

  // If the browser does support object-fit, we don't need to continue
  var hasSupport = 'objectFit' in document.documentElement.style !== false;
  if (hasSupport && !edgePartialSupport) {
    window.objectFitPolyfill = function() {
      return false;
    };
    return;
  }

  /**
   * Check the container's parent element to make sure it will
   * correctly handle and clip absolutely positioned children
   *
   * @param {node} $container - parent element
   */
  var checkParentContainer = function($container) {
    var styles = window.getComputedStyle($container, null);
    var position = styles.getPropertyValue('position');
    var overflow = styles.getPropertyValue('overflow');
    var display = styles.getPropertyValue('display');

    if (!position || position === 'static') {
      $container.style.position = 'relative';
    }
    if (overflow !== 'hidden') {
      $container.style.overflow = 'hidden';
    }
    // Guesstimating that people want the parent to act like full width/height wrapper here.
    // Mostly attempts to target <picture> elements, which default to inline.
    if (!display || display === 'inline') {
      $container.style.display = 'block';
    }
    if ($container.clientHeight === 0) {
      $container.style.height = '100%';
    }

    // Add a CSS class hook, in case people need to override styles for any reason.
    if ($container.className.indexOf('object-fit-polyfill') === -1) {
      $container.className = $container.className + ' object-fit-polyfill';
    }
  };

  /**
   * Check for pre-set max-width/height, min-width/height,
   * positioning, or margins, which can mess up image calculations
   *
   * @param {node} $media - img/video element
   */
  var checkMediaProperties = function($media) {
    var styles = window.getComputedStyle($media, null);
    var constraints = {
      'max-width': 'none',
      'max-height': 'none',
      'min-width': '0px',
      'min-height': '0px',
      top: 'auto',
      right: 'auto',
      bottom: 'auto',
      left: 'auto',
      'margin-top': '0px',
      'margin-right': '0px',
      'margin-bottom': '0px',
      'margin-left': '0px',
    };

    for (var property in constraints) {
      var constraint = styles.getPropertyValue(property);

      if (constraint !== constraints[property]) {
        $media.style[property] = constraints[property];
      }
    }
  };

  /**
   * Calculate & set object-position
   *
   * @param {string} axis - either "x" or "y"
   * @param {node} $media - img or video element
   * @param {string} objectPosition - e.g. "50% 50%", "top left"
   */
  var setPosition = function(axis, $media, objectPosition) {
    var position, other, start, end, side;
    objectPosition = objectPosition.split(' ');

    if (objectPosition.length < 2) {
      objectPosition[1] = objectPosition[0];
    }

    /* istanbul ignore else */
    if (axis === 'x') {
      position = objectPosition[0];
      other = objectPosition[1];
      start = 'left';
      end = 'right';
      side = $media.clientWidth;
    } else if (axis === 'y') {
      position = objectPosition[1];
      other = objectPosition[0];
      start = 'top';
      end = 'bottom';
      side = $media.clientHeight;
    } else {
      return; // Neither x or y axis specified
    }

    if (position === start || other === start) {
      $media.style[start] = '0';
      return;
    }

    if (position === end || other === end) {
      $media.style[end] = '0';
      return;
    }

    if (position === 'center' || position === '50%') {
      $media.style[start] = '50%';
      $media.style['margin-' + start] = side / -2 + 'px';
      return;
    }

    // Percentage values (e.g., 30% 10%)
    if (position.indexOf('%') >= 0) {
      position = parseInt(position, 10);

      if (position < 50) {
        $media.style[start] = position + '%';
        $media.style['margin-' + start] = side * (position / -100) + 'px';
      } else {
        position = 100 - position;
        $media.style[end] = position + '%';
        $media.style['margin-' + end] = side * (position / -100) + 'px';
      }

      return;
    }
    // Length-based values (e.g. 10px / 10em)
    else {
      $media.style[start] = position;
    }
  };

  /**
   * Calculate & set object-fit
   *
   * @param {node} $media - img/video/picture element
   */
  var objectFit = function($media) {
    // IE 10- data polyfill
    var fit = $media.dataset
      ? $media.dataset.objectFit
      : $media.getAttribute('data-object-fit');
    var position = $media.dataset
      ? $media.dataset.objectPosition
      : $media.getAttribute('data-object-position');

    // Default fallbacks
    fit = fit || 'cover';
    position = position || '50% 50%';

    // If necessary, make the parent container work with absolutely positioned elements
    var $container = $media.parentNode;
    checkParentContainer($container);

    // Check for any pre-set CSS which could mess up image calculations
    checkMediaProperties($media);

    // Reset any pre-set width/height CSS and handle fit positioning
    $media.style.position = 'absolute';
    $media.style.width = 'auto';
    $media.style.height = 'auto';

    // `scale-down` chooses either `none` or `contain`, whichever is smaller
    if (fit === 'scale-down') {
      if (
        $media.clientWidth < $container.clientWidth &&
        $media.clientHeight < $container.clientHeight
      ) {
        fit = 'none';
      } else {
        fit = 'contain';
      }
    }

    // `none` (width/height auto) and `fill` (100%) and are straightforward
    if (fit === 'none') {
      setPosition('x', $media, position);
      setPosition('y', $media, position);
      return;
    }

    if (fit === 'fill') {
      $media.style.width = '100%';
      $media.style.height = '100%';
      setPosition('x', $media, position);
      setPosition('y', $media, position);
      return;
    }

    // `cover` and `contain` must figure out which side needs covering, and add CSS positioning & centering
    $media.style.height = '100%';

    if (
      (fit === 'cover' && $media.clientWidth > $container.clientWidth) ||
      (fit === 'contain' && $media.clientWidth < $container.clientWidth)
    ) {
      $media.style.top = '0';
      $media.style.marginTop = '0';
      setPosition('x', $media, position);
    } else {
      $media.style.width = '100%';
      $media.style.height = 'auto';
      $media.style.left = '0';
      $media.style.marginLeft = '0';
      setPosition('y', $media, position);
    }
  };

  /**
   * Initialize plugin
   *
   * @param {node} media - Optional specific DOM node(s) to be polyfilled
   */
  var objectFitPolyfill = function(media) {
    if (typeof media === 'undefined' || media instanceof Event) {
      // If left blank, or a default event, all media on the page will be polyfilled.
      media = document.querySelectorAll('[data-object-fit]');
    } else if (media && media.nodeName) {
      // If it's a single node, wrap it in an array so it works.
      media = [media];
    } else if (typeof media === 'object' && media.length && media[0].nodeName) {
      // If it's an array of DOM nodes (e.g. a jQuery selector), it's fine as-is.
      media = media;
    } else {
      // Otherwise, if it's invalid or an incorrect type, return false to let people know.
      return false;
    }

    for (var i = 0; i < media.length; i++) {
      if (!media[i].nodeName) continue;

      var mediaType = media[i].nodeName.toLowerCase();

      if (mediaType === 'img') {
        if (edgePartialSupport) continue; // Edge supports object-fit for images (but nothing else), so no need to polyfill

        if (media[i].complete) {
          objectFit(media[i]);
        } else {
          media[i].addEventListener('load', function() {
            objectFit(this);
          });
        }
      } else if (mediaType === 'video') {
        if (media[i].readyState > 0) {
          objectFit(media[i]);
        } else {
          media[i].addEventListener('loadedmetadata', function() {
            objectFit(this);
          });
        }
      } else {
        objectFit(media[i]);
      }
    }

    return true;
  };

  if (document.readyState === 'loading') {
    // Loading hasn't finished yet
    document.addEventListener('DOMContentLoaded', objectFitPolyfill);
  } else {
    // `DOMContentLoaded` has already fired
    objectFitPolyfill();
  }

  window.addEventListener('resize', objectFitPolyfill);

  window.objectFitPolyfill = objectFitPolyfill;
})();
                               dist/vendor/wp-polyfill-object-fit.min.js                                                           0000644                 00000005645 15212564037 0014445 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(){"use strict";if("undefined"!=typeof window){var t=window.navigator.userAgent.match(/Edge\/(\d{2})\./),e=t?parseInt(t[1],10):null,n=!!e&&(16<=e&&e<=18);if(!("objectFit"in document.documentElement.style!=!1)||n){var o=function(t,e,i){var n,o,l,a,d;if((i=i.split(" ")).length<2&&(i[1]=i[0]),"x"===t)n=i[0],o=i[1],l="left",a="right",d=e.clientWidth;else{if("y"!==t)return;n=i[1],o=i[0],l="top",a="bottom",d=e.clientHeight}if(n!==l&&o!==l){if(n!==a&&o!==a)return"center"===n||"50%"===n?(e.style[l]="50%",void(e.style["margin-"+l]=d/-2+"px")):void(0<=n.indexOf("%")?(n=parseInt(n,10))<50?(e.style[l]=n+"%",e.style["margin-"+l]=d*(n/-100)+"px"):(n=100-n,e.style[a]=n+"%",e.style["margin-"+a]=d*(n/-100)+"px"):e.style[l]=n);e.style[a]="0"}else e.style[l]="0"},l=function(t){var e=t.dataset?t.dataset.objectFit:t.getAttribute("data-object-fit"),i=t.dataset?t.dataset.objectPosition:t.getAttribute("data-object-position");e=e||"cover",i=i||"50% 50%";var n=t.parentNode;return function(t){var e=window.getComputedStyle(t,null),i=e.getPropertyValue("position"),n=e.getPropertyValue("overflow"),o=e.getPropertyValue("display");i&&"static"!==i||(t.style.position="relative"),"hidden"!==n&&(t.style.overflow="hidden"),o&&"inline"!==o||(t.style.display="block"),0===t.clientHeight&&(t.style.height="100%"),-1===t.className.indexOf("object-fit-polyfill")&&(t.className=t.className+" object-fit-polyfill")}(n),function(t){var e=window.getComputedStyle(t,null),i={"max-width":"none","max-height":"none","min-width":"0px","min-height":"0px",top:"auto",right:"auto",bottom:"auto",left:"auto","margin-top":"0px","margin-right":"0px","margin-bottom":"0px","margin-left":"0px"};for(var n in i)e.getPropertyValue(n)!==i[n]&&(t.style[n]=i[n])}(t),t.style.position="absolute",t.style.width="auto",t.style.height="auto","scale-down"===e&&(e=t.clientWidth<n.clientWidth&&t.clientHeight<n.clientHeight?"none":"contain"),"none"===e?(o("x",t,i),void o("y",t,i)):"fill"===e?(t.style.width="100%",t.style.height="100%",o("x",t,i),void o("y",t,i)):(t.style.height="100%",void("cover"===e&&t.clientWidth>n.clientWidth||"contain"===e&&t.clientWidth<n.clientWidth?(t.style.top="0",t.style.marginTop="0",o("x",t,i)):(t.style.width="100%",t.style.height="auto",t.style.left="0",t.style.marginLeft="0",o("y",t,i))))},i=function(t){if(void 0===t||t instanceof Event)t=document.querySelectorAll("[data-object-fit]");else if(t&&t.nodeName)t=[t];else{if("object"!=typeof t||!t.length||!t[0].nodeName)return!1;t=t}for(var e=0;e<t.length;e++)if(t[e].nodeName){var i=t[e].nodeName.toLowerCase();if("img"===i){if(n)continue;t[e].complete?l(t[e]):t[e].addEventListener("load",function(){l(this)})}else"video"===i?0<t[e].readyState?l(t[e]):t[e].addEventListener("loadedmetadata",function(){l(this)}):l(t[e])}return!0};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",i):i(),window.addEventListener("resize",i),window.objectFitPolyfill=i}else window.objectFitPolyfill=function(){return!1}}}();                                                                                           dist/vendor/wp-polyfill-url.js                                                                      0000644                 00000327374 15212564037 0012445 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
module.exports = function (it) {
  if (typeof it != 'function') {
    throw TypeError(String(it) + ' is not a function');
  } return it;
};

},{}],2:[function(require,module,exports){
var isObject = require('../internals/is-object');

module.exports = function (it) {
  if (!isObject(it) && it !== null) {
    throw TypeError("Can't set " + String(it) + ' as a prototype');
  } return it;
};

},{"../internals/is-object":37}],3:[function(require,module,exports){
var wellKnownSymbol = require('../internals/well-known-symbol');
var create = require('../internals/object-create');
var definePropertyModule = require('../internals/object-define-property');

var UNSCOPABLES = wellKnownSymbol('unscopables');
var ArrayPrototype = Array.prototype;

// Array.prototype[@@unscopables]
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
if (ArrayPrototype[UNSCOPABLES] == undefined) {
  definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
    configurable: true,
    value: create(null)
  });
}

// add a key to Array.prototype[@@unscopables]
module.exports = function (key) {
  ArrayPrototype[UNSCOPABLES][key] = true;
};

},{"../internals/object-create":45,"../internals/object-define-property":47,"../internals/well-known-symbol":77}],4:[function(require,module,exports){
module.exports = function (it, Constructor, name) {
  if (!(it instanceof Constructor)) {
    throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
  } return it;
};

},{}],5:[function(require,module,exports){
var isObject = require('../internals/is-object');

module.exports = function (it) {
  if (!isObject(it)) {
    throw TypeError(String(it) + ' is not an object');
  } return it;
};

},{"../internals/is-object":37}],6:[function(require,module,exports){
'use strict';
var bind = require('../internals/function-bind-context');
var toObject = require('../internals/to-object');
var callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');
var isArrayIteratorMethod = require('../internals/is-array-iterator-method');
var toLength = require('../internals/to-length');
var createProperty = require('../internals/create-property');
var getIteratorMethod = require('../internals/get-iterator-method');

// `Array.from` method implementation
// https://tc39.github.io/ecma262/#sec-array.from
module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
  var O = toObject(arrayLike);
  var C = typeof this == 'function' ? this : Array;
  var argumentsLength = arguments.length;
  var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
  var mapping = mapfn !== undefined;
  var iteratorMethod = getIteratorMethod(O);
  var index = 0;
  var length, result, step, iterator, next, value;
  if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);
  // if the target is not iterable or it's an array with the default iterator - use a simple case
  if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {
    iterator = iteratorMethod.call(O);
    next = iterator.next;
    result = new C();
    for (;!(step = next.call(iterator)).done; index++) {
      value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
      createProperty(result, index, value);
    }
  } else {
    length = toLength(O.length);
    result = new C(length);
    for (;length > index; index++) {
      value = mapping ? mapfn(O[index], index) : O[index];
      createProperty(result, index, value);
    }
  }
  result.length = index;
  return result;
};

},{"../internals/call-with-safe-iteration-closing":8,"../internals/create-property":16,"../internals/function-bind-context":23,"../internals/get-iterator-method":25,"../internals/is-array-iterator-method":35,"../internals/to-length":71,"../internals/to-object":72}],7:[function(require,module,exports){
var toIndexedObject = require('../internals/to-indexed-object');
var toLength = require('../internals/to-length');
var toAbsoluteIndex = require('../internals/to-absolute-index');

// `Array.prototype.{ indexOf, includes }` methods implementation
var createMethod = function (IS_INCLUDES) {
  return function ($this, el, fromIndex) {
    var O = toIndexedObject($this);
    var length = toLength(O.length);
    var index = toAbsoluteIndex(fromIndex, length);
    var value;
    // Array#includes uses SameValueZero equality algorithm
    // eslint-disable-next-line no-self-compare
    if (IS_INCLUDES && el != el) while (length > index) {
      value = O[index++];
      // eslint-disable-next-line no-self-compare
      if (value != value) return true;
    // Array#indexOf ignores holes, Array#includes - not
    } else for (;length > index; index++) {
      if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
    } return !IS_INCLUDES && -1;
  };
};

module.exports = {
  // `Array.prototype.includes` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.includes
  includes: createMethod(true),
  // `Array.prototype.indexOf` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
  indexOf: createMethod(false)
};

},{"../internals/to-absolute-index":68,"../internals/to-indexed-object":69,"../internals/to-length":71}],8:[function(require,module,exports){
var anObject = require('../internals/an-object');

// call something on iterator step with safe closing on error
module.exports = function (iterator, fn, value, ENTRIES) {
  try {
    return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
  // 7.4.6 IteratorClose(iterator, completion)
  } catch (error) {
    var returnMethod = iterator['return'];
    if (returnMethod !== undefined) anObject(returnMethod.call(iterator));
    throw error;
  }
};

},{"../internals/an-object":5}],9:[function(require,module,exports){
var toString = {}.toString;

module.exports = function (it) {
  return toString.call(it).slice(8, -1);
};

},{}],10:[function(require,module,exports){
var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');
var classofRaw = require('../internals/classof-raw');
var wellKnownSymbol = require('../internals/well-known-symbol');

var TO_STRING_TAG = wellKnownSymbol('toStringTag');
// ES3 wrong here
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';

// fallback for IE11 Script Access Denied error
var tryGet = function (it, key) {
  try {
    return it[key];
  } catch (error) { /* empty */ }
};

// getting tag from ES6+ `Object.prototype.toString`
module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
  var O, tag, result;
  return it === undefined ? 'Undefined' : it === null ? 'Null'
    // @@toStringTag case
    : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
    // builtinTag case
    : CORRECT_ARGUMENTS ? classofRaw(O)
    // ES3 arguments fallback
    : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
};

},{"../internals/classof-raw":9,"../internals/to-string-tag-support":74,"../internals/well-known-symbol":77}],11:[function(require,module,exports){
var has = require('../internals/has');
var ownKeys = require('../internals/own-keys');
var getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');
var definePropertyModule = require('../internals/object-define-property');

module.exports = function (target, source) {
  var keys = ownKeys(source);
  var defineProperty = definePropertyModule.f;
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  for (var i = 0; i < keys.length; i++) {
    var key = keys[i];
    if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  }
};

},{"../internals/has":28,"../internals/object-define-property":47,"../internals/object-get-own-property-descriptor":48,"../internals/own-keys":56}],12:[function(require,module,exports){
var fails = require('../internals/fails');

module.exports = !fails(function () {
  function F() { /* empty */ }
  F.prototype.constructor = null;
  return Object.getPrototypeOf(new F()) !== F.prototype;
});

},{"../internals/fails":22}],13:[function(require,module,exports){
'use strict';
var IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;
var create = require('../internals/object-create');
var createPropertyDescriptor = require('../internals/create-property-descriptor');
var setToStringTag = require('../internals/set-to-string-tag');
var Iterators = require('../internals/iterators');

var returnThis = function () { return this; };

module.exports = function (IteratorConstructor, NAME, next) {
  var TO_STRING_TAG = NAME + ' Iterator';
  IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
  setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
  Iterators[TO_STRING_TAG] = returnThis;
  return IteratorConstructor;
};

},{"../internals/create-property-descriptor":15,"../internals/iterators":40,"../internals/iterators-core":39,"../internals/object-create":45,"../internals/set-to-string-tag":62}],14:[function(require,module,exports){
var DESCRIPTORS = require('../internals/descriptors');
var definePropertyModule = require('../internals/object-define-property');
var createPropertyDescriptor = require('../internals/create-property-descriptor');

module.exports = DESCRIPTORS ? function (object, key, value) {
  return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
} : function (object, key, value) {
  object[key] = value;
  return object;
};

},{"../internals/create-property-descriptor":15,"../internals/descriptors":18,"../internals/object-define-property":47}],15:[function(require,module,exports){
module.exports = function (bitmap, value) {
  return {
    enumerable: !(bitmap & 1),
    configurable: !(bitmap & 2),
    writable: !(bitmap & 4),
    value: value
  };
};

},{}],16:[function(require,module,exports){
'use strict';
var toPrimitive = require('../internals/to-primitive');
var definePropertyModule = require('../internals/object-define-property');
var createPropertyDescriptor = require('../internals/create-property-descriptor');

module.exports = function (object, key, value) {
  var propertyKey = toPrimitive(key);
  if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
  else object[propertyKey] = value;
};

},{"../internals/create-property-descriptor":15,"../internals/object-define-property":47,"../internals/to-primitive":73}],17:[function(require,module,exports){
'use strict';
var $ = require('../internals/export');
var createIteratorConstructor = require('../internals/create-iterator-constructor');
var getPrototypeOf = require('../internals/object-get-prototype-of');
var setPrototypeOf = require('../internals/object-set-prototype-of');
var setToStringTag = require('../internals/set-to-string-tag');
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
var redefine = require('../internals/redefine');
var wellKnownSymbol = require('../internals/well-known-symbol');
var IS_PURE = require('../internals/is-pure');
var Iterators = require('../internals/iterators');
var IteratorsCore = require('../internals/iterators-core');

var IteratorPrototype = IteratorsCore.IteratorPrototype;
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
var ITERATOR = wellKnownSymbol('iterator');
var KEYS = 'keys';
var VALUES = 'values';
var ENTRIES = 'entries';

var returnThis = function () { return this; };

module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
  createIteratorConstructor(IteratorConstructor, NAME, next);

  var getIterationMethod = function (KIND) {
    if (KIND === DEFAULT && defaultIterator) return defaultIterator;
    if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
    switch (KIND) {
      case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
      case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
      case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
    } return function () { return new IteratorConstructor(this); };
  };

  var TO_STRING_TAG = NAME + ' Iterator';
  var INCORRECT_VALUES_NAME = false;
  var IterablePrototype = Iterable.prototype;
  var nativeIterator = IterablePrototype[ITERATOR]
    || IterablePrototype['@@iterator']
    || DEFAULT && IterablePrototype[DEFAULT];
  var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
  var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
  var CurrentIteratorPrototype, methods, KEY;

  // fix native
  if (anyNativeIterator) {
    CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
    if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
      if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
        if (setPrototypeOf) {
          setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
        } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {
          createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);
        }
      }
      // Set @@toStringTag to native iterators
      setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
      if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
    }
  }

  // fix Array#{values, @@iterator}.name in V8 / FF
  if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
    INCORRECT_VALUES_NAME = true;
    defaultIterator = function values() { return nativeIterator.call(this); };
  }

  // define iterator
  if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
    createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);
  }
  Iterators[NAME] = defaultIterator;

  // export additional methods
  if (DEFAULT) {
    methods = {
      values: getIterationMethod(VALUES),
      keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
      entries: getIterationMethod(ENTRIES)
    };
    if (FORCED) for (KEY in methods) {
      if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
        redefine(IterablePrototype, KEY, methods[KEY]);
      }
    } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
  }

  return methods;
};

},{"../internals/create-iterator-constructor":13,"../internals/create-non-enumerable-property":14,"../internals/export":21,"../internals/is-pure":38,"../internals/iterators":40,"../internals/iterators-core":39,"../internals/object-get-prototype-of":51,"../internals/object-set-prototype-of":55,"../internals/redefine":59,"../internals/set-to-string-tag":62,"../internals/well-known-symbol":77}],18:[function(require,module,exports){
var fails = require('../internals/fails');

// Thank's IE8 for his funny defineProperty
module.exports = !fails(function () {
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
});

},{"../internals/fails":22}],19:[function(require,module,exports){
var global = require('../internals/global');
var isObject = require('../internals/is-object');

var document = global.document;
// typeof document.createElement is 'object' in old IE
var EXISTS = isObject(document) && isObject(document.createElement);

module.exports = function (it) {
  return EXISTS ? document.createElement(it) : {};
};

},{"../internals/global":27,"../internals/is-object":37}],20:[function(require,module,exports){
// IE8- don't enum bug keys
module.exports = [
  'constructor',
  'hasOwnProperty',
  'isPrototypeOf',
  'propertyIsEnumerable',
  'toLocaleString',
  'toString',
  'valueOf'
];

},{}],21:[function(require,module,exports){
var global = require('../internals/global');
var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
var redefine = require('../internals/redefine');
var setGlobal = require('../internals/set-global');
var copyConstructorProperties = require('../internals/copy-constructor-properties');
var isForced = require('../internals/is-forced');

/*
  options.target      - name of the target object
  options.global      - target is the global object
  options.stat        - export as static methods of target
  options.proto       - export as prototype methods of target
  options.real        - real prototype method for the `pure` version
  options.forced      - export even if the native feature is available
  options.bind        - bind methods to the target, required for the `pure` version
  options.wrap        - wrap constructors to preventing global pollution, required for the `pure` version
  options.unsafe      - use the simple assignment of property instead of delete + defineProperty
  options.sham        - add a flag to not completely full polyfills
  options.enumerable  - export as enumerable property
  options.noTargetGet - prevent calling a getter on target
*/
module.exports = function (options, source) {
  var TARGET = options.target;
  var GLOBAL = options.global;
  var STATIC = options.stat;
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  if (GLOBAL) {
    target = global;
  } else if (STATIC) {
    target = global[TARGET] || setGlobal(TARGET, {});
  } else {
    target = (global[TARGET] || {}).prototype;
  }
  if (target) for (key in source) {
    sourceProperty = source[key];
    if (options.noTargetGet) {
      descriptor = getOwnPropertyDescriptor(target, key);
      targetProperty = descriptor && descriptor.value;
    } else targetProperty = target[key];
    FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
    // contained in target
    if (!FORCED && targetProperty !== undefined) {
      if (typeof sourceProperty === typeof targetProperty) continue;
      copyConstructorProperties(sourceProperty, targetProperty);
    }
    // add a flag to not completely full polyfills
    if (options.sham || (targetProperty && targetProperty.sham)) {
      createNonEnumerableProperty(sourceProperty, 'sham', true);
    }
    // extend global
    redefine(target, key, sourceProperty, options);
  }
};

},{"../internals/copy-constructor-properties":11,"../internals/create-non-enumerable-property":14,"../internals/global":27,"../internals/is-forced":36,"../internals/object-get-own-property-descriptor":48,"../internals/redefine":59,"../internals/set-global":61}],22:[function(require,module,exports){
module.exports = function (exec) {
  try {
    return !!exec();
  } catch (error) {
    return true;
  }
};

},{}],23:[function(require,module,exports){
var aFunction = require('../internals/a-function');

// optional / simple context binding
module.exports = function (fn, that, length) {
  aFunction(fn);
  if (that === undefined) return fn;
  switch (length) {
    case 0: return function () {
      return fn.call(that);
    };
    case 1: return function (a) {
      return fn.call(that, a);
    };
    case 2: return function (a, b) {
      return fn.call(that, a, b);
    };
    case 3: return function (a, b, c) {
      return fn.call(that, a, b, c);
    };
  }
  return function (/* ...args */) {
    return fn.apply(that, arguments);
  };
};

},{"../internals/a-function":1}],24:[function(require,module,exports){
var path = require('../internals/path');
var global = require('../internals/global');

var aFunction = function (variable) {
  return typeof variable == 'function' ? variable : undefined;
};

module.exports = function (namespace, method) {
  return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])
    : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
};

},{"../internals/global":27,"../internals/path":57}],25:[function(require,module,exports){
var classof = require('../internals/classof');
var Iterators = require('../internals/iterators');
var wellKnownSymbol = require('../internals/well-known-symbol');

var ITERATOR = wellKnownSymbol('iterator');

module.exports = function (it) {
  if (it != undefined) return it[ITERATOR]
    || it['@@iterator']
    || Iterators[classof(it)];
};

},{"../internals/classof":10,"../internals/iterators":40,"../internals/well-known-symbol":77}],26:[function(require,module,exports){
var anObject = require('../internals/an-object');
var getIteratorMethod = require('../internals/get-iterator-method');

module.exports = function (it) {
  var iteratorMethod = getIteratorMethod(it);
  if (typeof iteratorMethod != 'function') {
    throw TypeError(String(it) + ' is not iterable');
  } return anObject(iteratorMethod.call(it));
};

},{"../internals/an-object":5,"../internals/get-iterator-method":25}],27:[function(require,module,exports){
(function (global){
var check = function (it) {
  return it && it.Math == Math && it;
};

// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
module.exports =
  // eslint-disable-next-line no-undef
  check(typeof globalThis == 'object' && globalThis) ||
  check(typeof window == 'object' && window) ||
  check(typeof self == 'object' && self) ||
  check(typeof global == 'object' && global) ||
  // eslint-disable-next-line no-new-func
  Function('return this')();

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],28:[function(require,module,exports){
var hasOwnProperty = {}.hasOwnProperty;

module.exports = function (it, key) {
  return hasOwnProperty.call(it, key);
};

},{}],29:[function(require,module,exports){
module.exports = {};

},{}],30:[function(require,module,exports){
var getBuiltIn = require('../internals/get-built-in');

module.exports = getBuiltIn('document', 'documentElement');

},{"../internals/get-built-in":24}],31:[function(require,module,exports){
var DESCRIPTORS = require('../internals/descriptors');
var fails = require('../internals/fails');
var createElement = require('../internals/document-create-element');

// Thank's IE8 for his funny defineProperty
module.exports = !DESCRIPTORS && !fails(function () {
  return Object.defineProperty(createElement('div'), 'a', {
    get: function () { return 7; }
  }).a != 7;
});

},{"../internals/descriptors":18,"../internals/document-create-element":19,"../internals/fails":22}],32:[function(require,module,exports){
var fails = require('../internals/fails');
var classof = require('../internals/classof-raw');

var split = ''.split;

// fallback for non-array-like ES3 and non-enumerable old V8 strings
module.exports = fails(function () {
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  // eslint-disable-next-line no-prototype-builtins
  return !Object('z').propertyIsEnumerable(0);
}) ? function (it) {
  return classof(it) == 'String' ? split.call(it, '') : Object(it);
} : Object;

},{"../internals/classof-raw":9,"../internals/fails":22}],33:[function(require,module,exports){
var store = require('../internals/shared-store');

var functionToString = Function.toString;

// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
if (typeof store.inspectSource != 'function') {
  store.inspectSource = function (it) {
    return functionToString.call(it);
  };
}

module.exports = store.inspectSource;

},{"../internals/shared-store":64}],34:[function(require,module,exports){
var NATIVE_WEAK_MAP = require('../internals/native-weak-map');
var global = require('../internals/global');
var isObject = require('../internals/is-object');
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
var objectHas = require('../internals/has');
var sharedKey = require('../internals/shared-key');
var hiddenKeys = require('../internals/hidden-keys');

var WeakMap = global.WeakMap;
var set, get, has;

var enforce = function (it) {
  return has(it) ? get(it) : set(it, {});
};

var getterFor = function (TYPE) {
  return function (it) {
    var state;
    if (!isObject(it) || (state = get(it)).type !== TYPE) {
      throw TypeError('Incompatible receiver, ' + TYPE + ' required');
    } return state;
  };
};

if (NATIVE_WEAK_MAP) {
  var store = new WeakMap();
  var wmget = store.get;
  var wmhas = store.has;
  var wmset = store.set;
  set = function (it, metadata) {
    wmset.call(store, it, metadata);
    return metadata;
  };
  get = function (it) {
    return wmget.call(store, it) || {};
  };
  has = function (it) {
    return wmhas.call(store, it);
  };
} else {
  var STATE = sharedKey('state');
  hiddenKeys[STATE] = true;
  set = function (it, metadata) {
    createNonEnumerableProperty(it, STATE, metadata);
    return metadata;
  };
  get = function (it) {
    return objectHas(it, STATE) ? it[STATE] : {};
  };
  has = function (it) {
    return objectHas(it, STATE);
  };
}

module.exports = {
  set: set,
  get: get,
  has: has,
  enforce: enforce,
  getterFor: getterFor
};

},{"../internals/create-non-enumerable-property":14,"../internals/global":27,"../internals/has":28,"../internals/hidden-keys":29,"../internals/is-object":37,"../internals/native-weak-map":43,"../internals/shared-key":63}],35:[function(require,module,exports){
var wellKnownSymbol = require('../internals/well-known-symbol');
var Iterators = require('../internals/iterators');

var ITERATOR = wellKnownSymbol('iterator');
var ArrayPrototype = Array.prototype;

// check on default Array iterator
module.exports = function (it) {
  return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
};

},{"../internals/iterators":40,"../internals/well-known-symbol":77}],36:[function(require,module,exports){
var fails = require('../internals/fails');

var replacement = /#|\.prototype\./;

var isForced = function (feature, detection) {
  var value = data[normalize(feature)];
  return value == POLYFILL ? true
    : value == NATIVE ? false
    : typeof detection == 'function' ? fails(detection)
    : !!detection;
};

var normalize = isForced.normalize = function (string) {
  return String(string).replace(replacement, '.').toLowerCase();
};

var data = isForced.data = {};
var NATIVE = isForced.NATIVE = 'N';
var POLYFILL = isForced.POLYFILL = 'P';

module.exports = isForced;

},{"../internals/fails":22}],37:[function(require,module,exports){
module.exports = function (it) {
  return typeof it === 'object' ? it !== null : typeof it === 'function';
};

},{}],38:[function(require,module,exports){
module.exports = false;

},{}],39:[function(require,module,exports){
'use strict';
var getPrototypeOf = require('../internals/object-get-prototype-of');
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
var has = require('../internals/has');
var wellKnownSymbol = require('../internals/well-known-symbol');
var IS_PURE = require('../internals/is-pure');

var ITERATOR = wellKnownSymbol('iterator');
var BUGGY_SAFARI_ITERATORS = false;

var returnThis = function () { return this; };

// `%IteratorPrototype%` object
// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;

if ([].keys) {
  arrayIterator = [].keys();
  // Safari 8 has buggy iterators w/o `next`
  if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
  else {
    PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
    if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
  }
}

if (IteratorPrototype == undefined) IteratorPrototype = {};

// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
if (!IS_PURE && !has(IteratorPrototype, ITERATOR)) {
  createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
}

module.exports = {
  IteratorPrototype: IteratorPrototype,
  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
};

},{"../internals/create-non-enumerable-property":14,"../internals/has":28,"../internals/is-pure":38,"../internals/object-get-prototype-of":51,"../internals/well-known-symbol":77}],40:[function(require,module,exports){
arguments[4][29][0].apply(exports,arguments)
},{"dup":29}],41:[function(require,module,exports){
var fails = require('../internals/fails');

module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
  // Chrome 38 Symbol has incorrect toString conversion
  // eslint-disable-next-line no-undef
  return !String(Symbol());
});

},{"../internals/fails":22}],42:[function(require,module,exports){
var fails = require('../internals/fails');
var wellKnownSymbol = require('../internals/well-known-symbol');
var IS_PURE = require('../internals/is-pure');

var ITERATOR = wellKnownSymbol('iterator');

module.exports = !fails(function () {
  var url = new URL('b?a=1&b=2&c=3', 'http://a');
  var searchParams = url.searchParams;
  var result = '';
  url.pathname = 'c%20d';
  searchParams.forEach(function (value, key) {
    searchParams['delete']('b');
    result += key + value;
  });
  return (IS_PURE && !url.toJSON)
    || !searchParams.sort
    || url.href !== 'http://a/c%20d?a=1&c=3'
    || searchParams.get('c') !== '3'
    || String(new URLSearchParams('?a=1')) !== 'a=1'
    || !searchParams[ITERATOR]
    // throws in Edge
    || new URL('https://a@b').username !== 'a'
    || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'
    // not punycoded in Edge
    || new URL('http://Ñ‚ÐµÑÑ‚').host !== 'xn--e1aybc'
    // not escaped in Chrome 62-
    || new URL('http://a#Ð±').hash !== '#%D0%B1'
    // fails in Chrome 66-
    || result !== 'a1c3'
    // throws in Safari
    || new URL('http://x', undefined).host !== 'x';
});

},{"../internals/fails":22,"../internals/is-pure":38,"../internals/well-known-symbol":77}],43:[function(require,module,exports){
var global = require('../internals/global');
var inspectSource = require('../internals/inspect-source');

var WeakMap = global.WeakMap;

module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));

},{"../internals/global":27,"../internals/inspect-source":33}],44:[function(require,module,exports){
'use strict';
var DESCRIPTORS = require('../internals/descriptors');
var fails = require('../internals/fails');
var objectKeys = require('../internals/object-keys');
var getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');
var propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');
var toObject = require('../internals/to-object');
var IndexedObject = require('../internals/indexed-object');

var nativeAssign = Object.assign;
var defineProperty = Object.defineProperty;

// `Object.assign` method
// https://tc39.github.io/ecma262/#sec-object.assign
module.exports = !nativeAssign || fails(function () {
  // should have correct order of operations (Edge bug)
  if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {
    enumerable: true,
    get: function () {
      defineProperty(this, 'b', {
        value: 3,
        enumerable: false
      });
    }
  }), { b: 2 })).b !== 1) return true;
  // should work with symbols and should have deterministic property order (V8 bug)
  var A = {};
  var B = {};
  // eslint-disable-next-line no-undef
  var symbol = Symbol();
  var alphabet = 'abcdefghijklmnopqrst';
  A[symbol] = 7;
  alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
  var T = toObject(target);
  var argumentsLength = arguments.length;
  var index = 1;
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  var propertyIsEnumerable = propertyIsEnumerableModule.f;
  while (argumentsLength > index) {
    var S = IndexedObject(arguments[index++]);
    var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
    var length = keys.length;
    var j = 0;
    var key;
    while (length > j) {
      key = keys[j++];
      if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];
    }
  } return T;
} : nativeAssign;

},{"../internals/descriptors":18,"../internals/fails":22,"../internals/indexed-object":32,"../internals/object-get-own-property-symbols":50,"../internals/object-keys":53,"../internals/object-property-is-enumerable":54,"../internals/to-object":72}],45:[function(require,module,exports){
var anObject = require('../internals/an-object');
var defineProperties = require('../internals/object-define-properties');
var enumBugKeys = require('../internals/enum-bug-keys');
var hiddenKeys = require('../internals/hidden-keys');
var html = require('../internals/html');
var documentCreateElement = require('../internals/document-create-element');
var sharedKey = require('../internals/shared-key');

var GT = '>';
var LT = '<';
var PROTOTYPE = 'prototype';
var SCRIPT = 'script';
var IE_PROTO = sharedKey('IE_PROTO');

var EmptyConstructor = function () { /* empty */ };

var scriptTag = function (content) {
  return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
};

// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
var NullProtoObjectViaActiveX = function (activeXDocument) {
  activeXDocument.write(scriptTag(''));
  activeXDocument.close();
  var temp = activeXDocument.parentWindow.Object;
  activeXDocument = null; // avoid memory leak
  return temp;
};

// Create object with fake `null` prototype: use iframe Object with cleared prototype
var NullProtoObjectViaIFrame = function () {
  // Thrash, waste and sodomy: IE GC bug
  var iframe = documentCreateElement('iframe');
  var JS = 'java' + SCRIPT + ':';
  var iframeDocument;
  iframe.style.display = 'none';
  html.appendChild(iframe);
  // https://github.com/zloirock/core-js/issues/475
  iframe.src = String(JS);
  iframeDocument = iframe.contentWindow.document;
  iframeDocument.open();
  iframeDocument.write(scriptTag('document.F=Object'));
  iframeDocument.close();
  return iframeDocument.F;
};

// Check for document.domain and active x support
// No need to use active x approach when document.domain is not set
// see https://github.com/es-shims/es5-shim/issues/150
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
// avoid IE GC bug
var activeXDocument;
var NullProtoObject = function () {
  try {
    /* global ActiveXObject */
    activeXDocument = document.domain && new ActiveXObject('htmlfile');
  } catch (error) { /* ignore */ }
  NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
  var length = enumBugKeys.length;
  while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  return NullProtoObject();
};

hiddenKeys[IE_PROTO] = true;

// `Object.create` method
// https://tc39.github.io/ecma262/#sec-object.create
module.exports = Object.create || function create(O, Properties) {
  var result;
  if (O !== null) {
    EmptyConstructor[PROTOTYPE] = anObject(O);
    result = new EmptyConstructor();
    EmptyConstructor[PROTOTYPE] = null;
    // add "__proto__" for Object.getPrototypeOf polyfill
    result[IE_PROTO] = O;
  } else result = NullProtoObject();
  return Properties === undefined ? result : defineProperties(result, Properties);
};

},{"../internals/an-object":5,"../internals/document-create-element":19,"../internals/enum-bug-keys":20,"../internals/hidden-keys":29,"../internals/html":30,"../internals/object-define-properties":46,"../internals/shared-key":63}],46:[function(require,module,exports){
var DESCRIPTORS = require('../internals/descriptors');
var definePropertyModule = require('../internals/object-define-property');
var anObject = require('../internals/an-object');
var objectKeys = require('../internals/object-keys');

// `Object.defineProperties` method
// https://tc39.github.io/ecma262/#sec-object.defineproperties
module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
  anObject(O);
  var keys = objectKeys(Properties);
  var length = keys.length;
  var index = 0;
  var key;
  while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
  return O;
};

},{"../internals/an-object":5,"../internals/descriptors":18,"../internals/object-define-property":47,"../internals/object-keys":53}],47:[function(require,module,exports){
var DESCRIPTORS = require('../internals/descriptors');
var IE8_DOM_DEFINE = require('../internals/ie8-dom-define');
var anObject = require('../internals/an-object');
var toPrimitive = require('../internals/to-primitive');

var nativeDefineProperty = Object.defineProperty;

// `Object.defineProperty` method
// https://tc39.github.io/ecma262/#sec-object.defineproperty
exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
  anObject(O);
  P = toPrimitive(P, true);
  anObject(Attributes);
  if (IE8_DOM_DEFINE) try {
    return nativeDefineProperty(O, P, Attributes);
  } catch (error) { /* empty */ }
  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
  if ('value' in Attributes) O[P] = Attributes.value;
  return O;
};

},{"../internals/an-object":5,"../internals/descriptors":18,"../internals/ie8-dom-define":31,"../internals/to-primitive":73}],48:[function(require,module,exports){
var DESCRIPTORS = require('../internals/descriptors');
var propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');
var createPropertyDescriptor = require('../internals/create-property-descriptor');
var toIndexedObject = require('../internals/to-indexed-object');
var toPrimitive = require('../internals/to-primitive');
var has = require('../internals/has');
var IE8_DOM_DEFINE = require('../internals/ie8-dom-define');

var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;

// `Object.getOwnPropertyDescriptor` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  O = toIndexedObject(O);
  P = toPrimitive(P, true);
  if (IE8_DOM_DEFINE) try {
    return nativeGetOwnPropertyDescriptor(O, P);
  } catch (error) { /* empty */ }
  if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
};

},{"../internals/create-property-descriptor":15,"../internals/descriptors":18,"../internals/has":28,"../internals/ie8-dom-define":31,"../internals/object-property-is-enumerable":54,"../internals/to-indexed-object":69,"../internals/to-primitive":73}],49:[function(require,module,exports){
var internalObjectKeys = require('../internals/object-keys-internal');
var enumBugKeys = require('../internals/enum-bug-keys');

var hiddenKeys = enumBugKeys.concat('length', 'prototype');

// `Object.getOwnPropertyNames` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  return internalObjectKeys(O, hiddenKeys);
};

},{"../internals/enum-bug-keys":20,"../internals/object-keys-internal":52}],50:[function(require,module,exports){
exports.f = Object.getOwnPropertySymbols;

},{}],51:[function(require,module,exports){
var has = require('../internals/has');
var toObject = require('../internals/to-object');
var sharedKey = require('../internals/shared-key');
var CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');

var IE_PROTO = sharedKey('IE_PROTO');
var ObjectPrototype = Object.prototype;

// `Object.getPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-object.getprototypeof
module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
  O = toObject(O);
  if (has(O, IE_PROTO)) return O[IE_PROTO];
  if (typeof O.constructor == 'function' && O instanceof O.constructor) {
    return O.constructor.prototype;
  } return O instanceof Object ? ObjectPrototype : null;
};

},{"../internals/correct-prototype-getter":12,"../internals/has":28,"../internals/shared-key":63,"../internals/to-object":72}],52:[function(require,module,exports){
var has = require('../internals/has');
var toIndexedObject = require('../internals/to-indexed-object');
var indexOf = require('../internals/array-includes').indexOf;
var hiddenKeys = require('../internals/hidden-keys');

module.exports = function (object, names) {
  var O = toIndexedObject(object);
  var i = 0;
  var result = [];
  var key;
  for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
  // Don't enum bug & hidden keys
  while (names.length > i) if (has(O, key = names[i++])) {
    ~indexOf(result, key) || result.push(key);
  }
  return result;
};

},{"../internals/array-includes":7,"../internals/has":28,"../internals/hidden-keys":29,"../internals/to-indexed-object":69}],53:[function(require,module,exports){
var internalObjectKeys = require('../internals/object-keys-internal');
var enumBugKeys = require('../internals/enum-bug-keys');

// `Object.keys` method
// https://tc39.github.io/ecma262/#sec-object.keys
module.exports = Object.keys || function keys(O) {
  return internalObjectKeys(O, enumBugKeys);
};

},{"../internals/enum-bug-keys":20,"../internals/object-keys-internal":52}],54:[function(require,module,exports){
'use strict';
var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;

// Nashorn ~ JDK8 bug
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);

// `Object.prototype.propertyIsEnumerable` method implementation
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  var descriptor = getOwnPropertyDescriptor(this, V);
  return !!descriptor && descriptor.enumerable;
} : nativePropertyIsEnumerable;

},{}],55:[function(require,module,exports){
var anObject = require('../internals/an-object');
var aPossiblePrototype = require('../internals/a-possible-prototype');

// `Object.setPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-object.setprototypeof
// Works with __proto__ only. Old v8 can't work with null proto objects.
/* eslint-disable no-proto */
module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  var CORRECT_SETTER = false;
  var test = {};
  var setter;
  try {
    setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
    setter.call(test, []);
    CORRECT_SETTER = test instanceof Array;
  } catch (error) { /* empty */ }
  return function setPrototypeOf(O, proto) {
    anObject(O);
    aPossiblePrototype(proto);
    if (CORRECT_SETTER) setter.call(O, proto);
    else O.__proto__ = proto;
    return O;
  };
}() : undefined);

},{"../internals/a-possible-prototype":2,"../internals/an-object":5}],56:[function(require,module,exports){
var getBuiltIn = require('../internals/get-built-in');
var getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');
var getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');
var anObject = require('../internals/an-object');

// all object keys, includes non-enumerable and symbols
module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  var keys = getOwnPropertyNamesModule.f(anObject(it));
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
};

},{"../internals/an-object":5,"../internals/get-built-in":24,"../internals/object-get-own-property-names":49,"../internals/object-get-own-property-symbols":50}],57:[function(require,module,exports){
var global = require('../internals/global');

module.exports = global;

},{"../internals/global":27}],58:[function(require,module,exports){
var redefine = require('../internals/redefine');

module.exports = function (target, src, options) {
  for (var key in src) redefine(target, key, src[key], options);
  return target;
};

},{"../internals/redefine":59}],59:[function(require,module,exports){
var global = require('../internals/global');
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
var has = require('../internals/has');
var setGlobal = require('../internals/set-global');
var inspectSource = require('../internals/inspect-source');
var InternalStateModule = require('../internals/internal-state');

var getInternalState = InternalStateModule.get;
var enforceInternalState = InternalStateModule.enforce;
var TEMPLATE = String(String).split('String');

(module.exports = function (O, key, value, options) {
  var unsafe = options ? !!options.unsafe : false;
  var simple = options ? !!options.enumerable : false;
  var noTargetGet = options ? !!options.noTargetGet : false;
  if (typeof value == 'function') {
    if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
    enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
  }
  if (O === global) {
    if (simple) O[key] = value;
    else setGlobal(key, value);
    return;
  } else if (!unsafe) {
    delete O[key];
  } else if (!noTargetGet && O[key]) {
    simple = true;
  }
  if (simple) O[key] = value;
  else createNonEnumerableProperty(O, key, value);
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
})(Function.prototype, 'toString', function toString() {
  return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
});

},{"../internals/create-non-enumerable-property":14,"../internals/global":27,"../internals/has":28,"../internals/inspect-source":33,"../internals/internal-state":34,"../internals/set-global":61}],60:[function(require,module,exports){
// `RequireObjectCoercible` abstract operation
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
module.exports = function (it) {
  if (it == undefined) throw TypeError("Can't call method on " + it);
  return it;
};

},{}],61:[function(require,module,exports){
var global = require('../internals/global');
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');

module.exports = function (key, value) {
  try {
    createNonEnumerableProperty(global, key, value);
  } catch (error) {
    global[key] = value;
  } return value;
};

},{"../internals/create-non-enumerable-property":14,"../internals/global":27}],62:[function(require,module,exports){
var defineProperty = require('../internals/object-define-property').f;
var has = require('../internals/has');
var wellKnownSymbol = require('../internals/well-known-symbol');

var TO_STRING_TAG = wellKnownSymbol('toStringTag');

module.exports = function (it, TAG, STATIC) {
  if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
    defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
  }
};

},{"../internals/has":28,"../internals/object-define-property":47,"../internals/well-known-symbol":77}],63:[function(require,module,exports){
var shared = require('../internals/shared');
var uid = require('../internals/uid');

var keys = shared('keys');

module.exports = function (key) {
  return keys[key] || (keys[key] = uid(key));
};

},{"../internals/shared":65,"../internals/uid":75}],64:[function(require,module,exports){
var global = require('../internals/global');
var setGlobal = require('../internals/set-global');

var SHARED = '__core-js_shared__';
var store = global[SHARED] || setGlobal(SHARED, {});

module.exports = store;

},{"../internals/global":27,"../internals/set-global":61}],65:[function(require,module,exports){
var IS_PURE = require('../internals/is-pure');
var store = require('../internals/shared-store');

(module.exports = function (key, value) {
  return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
  version: '3.6.4',
  mode: IS_PURE ? 'pure' : 'global',
  copyright: 'Â© 2020 Denis Pushkarev (zloirock.ru)'
});

},{"../internals/is-pure":38,"../internals/shared-store":64}],66:[function(require,module,exports){
var toInteger = require('../internals/to-integer');
var requireObjectCoercible = require('../internals/require-object-coercible');

// `String.prototype.{ codePointAt, at }` methods implementation
var createMethod = function (CONVERT_TO_STRING) {
  return function ($this, pos) {
    var S = String(requireObjectCoercible($this));
    var position = toInteger(pos);
    var size = S.length;
    var first, second;
    if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
    first = S.charCodeAt(position);
    return first < 0xD800 || first > 0xDBFF || position + 1 === size
      || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
        ? CONVERT_TO_STRING ? S.charAt(position) : first
        : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  };
};

module.exports = {
  // `String.prototype.codePointAt` method
  // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
  codeAt: createMethod(false),
  // `String.prototype.at` method
  // https://github.com/mathiasbynens/String.prototype.at
  charAt: createMethod(true)
};

},{"../internals/require-object-coercible":60,"../internals/to-integer":70}],67:[function(require,module,exports){
'use strict';
// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js
var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
var base = 36;
var tMin = 1;
var tMax = 26;
var skew = 38;
var damp = 700;
var initialBias = 72;
var initialN = 128; // 0x80
var delimiter = '-'; // '\x2D'
var regexNonASCII = /[^\0-\u007E]/; // non-ASCII chars
var regexSeparators = /[.\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
var OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';
var baseMinusTMin = base - tMin;
var floor = Math.floor;
var stringFromCharCode = String.fromCharCode;

/**
 * Creates an array containing the numeric code points of each Unicode
 * character in the string. While JavaScript uses UCS-2 internally,
 * this function will convert a pair of surrogate halves (each of which
 * UCS-2 exposes as separate characters) into a single code point,
 * matching UTF-16.
 */
var ucs2decode = function (string) {
  var output = [];
  var counter = 0;
  var length = string.length;
  while (counter < length) {
    var value = string.charCodeAt(counter++);
    if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
      // It's a high surrogate, and there is a next character.
      var extra = string.charCodeAt(counter++);
      if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.
        output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
      } else {
        // It's an unmatched surrogate; only append this code unit, in case the
        // next code unit is the high surrogate of a surrogate pair.
        output.push(value);
        counter--;
      }
    } else {
      output.push(value);
    }
  }
  return output;
};

/**
 * Converts a digit/integer into a basic code point.
 */
var digitToBasic = function (digit) {
  //  0..25 map to ASCII a..z or A..Z
  // 26..35 map to ASCII 0..9
  return digit + 22 + 75 * (digit < 26);
};

/**
 * Bias adaptation function as per section 3.4 of RFC 3492.
 * https://tools.ietf.org/html/rfc3492#section-3.4
 */
var adapt = function (delta, numPoints, firstTime) {
  var k = 0;
  delta = firstTime ? floor(delta / damp) : delta >> 1;
  delta += floor(delta / numPoints);
  for (; delta > baseMinusTMin * tMax >> 1; k += base) {
    delta = floor(delta / baseMinusTMin);
  }
  return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
};

/**
 * Converts a string of Unicode symbols (e.g. a domain name label) to a
 * Punycode string of ASCII-only symbols.
 */
// eslint-disable-next-line  max-statements
var encode = function (input) {
  var output = [];

  // Convert the input in UCS-2 to an array of Unicode code points.
  input = ucs2decode(input);

  // Cache the length.
  var inputLength = input.length;

  // Initialize the state.
  var n = initialN;
  var delta = 0;
  var bias = initialBias;
  var i, currentValue;

  // Handle the basic code points.
  for (i = 0; i < input.length; i++) {
    currentValue = input[i];
    if (currentValue < 0x80) {
      output.push(stringFromCharCode(currentValue));
    }
  }

  var basicLength = output.length; // number of basic code points.
  var handledCPCount = basicLength; // number of code points that have been handled;

  // Finish the basic string with a delimiter unless it's empty.
  if (basicLength) {
    output.push(delimiter);
  }

  // Main encoding loop:
  while (handledCPCount < inputLength) {
    // All non-basic code points < n have been handled already. Find the next larger one:
    var m = maxInt;
    for (i = 0; i < input.length; i++) {
      currentValue = input[i];
      if (currentValue >= n && currentValue < m) {
        m = currentValue;
      }
    }

    // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.
    var handledCPCountPlusOne = handledCPCount + 1;
    if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
      throw RangeError(OVERFLOW_ERROR);
    }

    delta += (m - n) * handledCPCountPlusOne;
    n = m;

    for (i = 0; i < input.length; i++) {
      currentValue = input[i];
      if (currentValue < n && ++delta > maxInt) {
        throw RangeError(OVERFLOW_ERROR);
      }
      if (currentValue == n) {
        // Represent delta as a generalized variable-length integer.
        var q = delta;
        for (var k = base; /* no condition */; k += base) {
          var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
          if (q < t) break;
          var qMinusT = q - t;
          var baseMinusT = base - t;
          output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT)));
          q = floor(qMinusT / baseMinusT);
        }

        output.push(stringFromCharCode(digitToBasic(q)));
        bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
        delta = 0;
        ++handledCPCount;
      }
    }

    ++delta;
    ++n;
  }
  return output.join('');
};

module.exports = function (input) {
  var encoded = [];
  var labels = input.toLowerCase().replace(regexSeparators, '\u002E').split('.');
  var i, label;
  for (i = 0; i < labels.length; i++) {
    label = labels[i];
    encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label);
  }
  return encoded.join('.');
};

},{}],68:[function(require,module,exports){
var toInteger = require('../internals/to-integer');

var max = Math.max;
var min = Math.min;

// Helper for a popular repeating case of the spec:
// Let integer be ? ToInteger(index).
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
module.exports = function (index, length) {
  var integer = toInteger(index);
  return integer < 0 ? max(integer + length, 0) : min(integer, length);
};

},{"../internals/to-integer":70}],69:[function(require,module,exports){
// toObject with fallback for non-array-like ES3 strings
var IndexedObject = require('../internals/indexed-object');
var requireObjectCoercible = require('../internals/require-object-coercible');

module.exports = function (it) {
  return IndexedObject(requireObjectCoercible(it));
};

},{"../internals/indexed-object":32,"../internals/require-object-coercible":60}],70:[function(require,module,exports){
var ceil = Math.ceil;
var floor = Math.floor;

// `ToInteger` abstract operation
// https://tc39.github.io/ecma262/#sec-tointeger
module.exports = function (argument) {
  return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
};

},{}],71:[function(require,module,exports){
var toInteger = require('../internals/to-integer');

var min = Math.min;

// `ToLength` abstract operation
// https://tc39.github.io/ecma262/#sec-tolength
module.exports = function (argument) {
  return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
};

},{"../internals/to-integer":70}],72:[function(require,module,exports){
var requireObjectCoercible = require('../internals/require-object-coercible');

// `ToObject` abstract operation
// https://tc39.github.io/ecma262/#sec-toobject
module.exports = function (argument) {
  return Object(requireObjectCoercible(argument));
};

},{"../internals/require-object-coercible":60}],73:[function(require,module,exports){
var isObject = require('../internals/is-object');

// `ToPrimitive` abstract operation
// https://tc39.github.io/ecma262/#sec-toprimitive
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function (input, PREFERRED_STRING) {
  if (!isObject(input)) return input;
  var fn, val;
  if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
  if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  throw TypeError("Can't convert object to primitive value");
};

},{"../internals/is-object":37}],74:[function(require,module,exports){
var wellKnownSymbol = require('../internals/well-known-symbol');

var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var test = {};

test[TO_STRING_TAG] = 'z';

module.exports = String(test) === '[object z]';

},{"../internals/well-known-symbol":77}],75:[function(require,module,exports){
var id = 0;
var postfix = Math.random();

module.exports = function (key) {
  return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
};

},{}],76:[function(require,module,exports){
var NATIVE_SYMBOL = require('../internals/native-symbol');

module.exports = NATIVE_SYMBOL
  // eslint-disable-next-line no-undef
  && !Symbol.sham
  // eslint-disable-next-line no-undef
  && typeof Symbol.iterator == 'symbol';

},{"../internals/native-symbol":41}],77:[function(require,module,exports){
var global = require('../internals/global');
var shared = require('../internals/shared');
var has = require('../internals/has');
var uid = require('../internals/uid');
var NATIVE_SYMBOL = require('../internals/native-symbol');
var USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');

var WellKnownSymbolsStore = shared('wks');
var Symbol = global.Symbol;
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;

module.exports = function (name) {
  if (!has(WellKnownSymbolsStore, name)) {
    if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name];
    else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
  } return WellKnownSymbolsStore[name];
};

},{"../internals/global":27,"../internals/has":28,"../internals/native-symbol":41,"../internals/shared":65,"../internals/uid":75,"../internals/use-symbol-as-uid":76}],78:[function(require,module,exports){
'use strict';
var toIndexedObject = require('../internals/to-indexed-object');
var addToUnscopables = require('../internals/add-to-unscopables');
var Iterators = require('../internals/iterators');
var InternalStateModule = require('../internals/internal-state');
var defineIterator = require('../internals/define-iterator');

var ARRAY_ITERATOR = 'Array Iterator';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);

// `Array.prototype.entries` method
// https://tc39.github.io/ecma262/#sec-array.prototype.entries
// `Array.prototype.keys` method
// https://tc39.github.io/ecma262/#sec-array.prototype.keys
// `Array.prototype.values` method
// https://tc39.github.io/ecma262/#sec-array.prototype.values
// `Array.prototype[@@iterator]` method
// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator
// `CreateArrayIterator` internal method
// https://tc39.github.io/ecma262/#sec-createarrayiterator
module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
  setInternalState(this, {
    type: ARRAY_ITERATOR,
    target: toIndexedObject(iterated), // target
    index: 0,                          // next index
    kind: kind                         // kind
  });
// `%ArrayIteratorPrototype%.next` method
// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next
}, function () {
  var state = getInternalState(this);
  var target = state.target;
  var kind = state.kind;
  var index = state.index++;
  if (!target || index >= target.length) {
    state.target = undefined;
    return { value: undefined, done: true };
  }
  if (kind == 'keys') return { value: index, done: false };
  if (kind == 'values') return { value: target[index], done: false };
  return { value: [index, target[index]], done: false };
}, 'values');

// argumentsList[@@iterator] is %ArrayProto_values%
// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject
// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject
Iterators.Arguments = Iterators.Array;

// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');

},{"../internals/add-to-unscopables":3,"../internals/define-iterator":17,"../internals/internal-state":34,"../internals/iterators":40,"../internals/to-indexed-object":69}],79:[function(require,module,exports){
'use strict';
var charAt = require('../internals/string-multibyte').charAt;
var InternalStateModule = require('../internals/internal-state');
var defineIterator = require('../internals/define-iterator');

var STRING_ITERATOR = 'String Iterator';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);

// `String.prototype[@@iterator]` method
// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
defineIterator(String, 'String', function (iterated) {
  setInternalState(this, {
    type: STRING_ITERATOR,
    string: String(iterated),
    index: 0
  });
// `%StringIteratorPrototype%.next` method
// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
}, function next() {
  var state = getInternalState(this);
  var string = state.string;
  var index = state.index;
  var point;
  if (index >= string.length) return { value: undefined, done: true };
  point = charAt(string, index);
  state.index += point.length;
  return { value: point, done: false };
});

},{"../internals/define-iterator":17,"../internals/internal-state":34,"../internals/string-multibyte":66}],80:[function(require,module,exports){
'use strict';
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
require('../modules/es.array.iterator');
var $ = require('../internals/export');
var getBuiltIn = require('../internals/get-built-in');
var USE_NATIVE_URL = require('../internals/native-url');
var redefine = require('../internals/redefine');
var redefineAll = require('../internals/redefine-all');
var setToStringTag = require('../internals/set-to-string-tag');
var createIteratorConstructor = require('../internals/create-iterator-constructor');
var InternalStateModule = require('../internals/internal-state');
var anInstance = require('../internals/an-instance');
var hasOwn = require('../internals/has');
var bind = require('../internals/function-bind-context');
var classof = require('../internals/classof');
var anObject = require('../internals/an-object');
var isObject = require('../internals/is-object');
var create = require('../internals/object-create');
var createPropertyDescriptor = require('../internals/create-property-descriptor');
var getIterator = require('../internals/get-iterator');
var getIteratorMethod = require('../internals/get-iterator-method');
var wellKnownSymbol = require('../internals/well-known-symbol');

var $fetch = getBuiltIn('fetch');
var Headers = getBuiltIn('Headers');
var ITERATOR = wellKnownSymbol('iterator');
var URL_SEARCH_PARAMS = 'URLSearchParams';
var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';
var setInternalState = InternalStateModule.set;
var getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);
var getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);

var plus = /\+/g;
var sequences = Array(4);

var percentSequence = function (bytes) {
  return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\da-f]{2}){' + bytes + '})', 'gi'));
};

var percentDecode = function (sequence) {
  try {
    return decodeURIComponent(sequence);
  } catch (error) {
    return sequence;
  }
};

var deserialize = function (it) {
  var result = it.replace(plus, ' ');
  var bytes = 4;
  try {
    return decodeURIComponent(result);
  } catch (error) {
    while (bytes) {
      result = result.replace(percentSequence(bytes--), percentDecode);
    }
    return result;
  }
};

var find = /[!'()~]|%20/g;

var replace = {
  '!': '%21',
  "'": '%27',
  '(': '%28',
  ')': '%29',
  '~': '%7E',
  '%20': '+'
};

var replacer = function (match) {
  return replace[match];
};

var serialize = function (it) {
  return encodeURIComponent(it).replace(find, replacer);
};

var parseSearchParams = function (result, query) {
  if (query) {
    var attributes = query.split('&');
    var index = 0;
    var attribute, entry;
    while (index < attributes.length) {
      attribute = attributes[index++];
      if (attribute.length) {
        entry = attribute.split('=');
        result.push({
          key: deserialize(entry.shift()),
          value: deserialize(entry.join('='))
        });
      }
    }
  }
};

var updateSearchParams = function (query) {
  this.entries.length = 0;
  parseSearchParams(this.entries, query);
};

var validateArgumentsLength = function (passed, required) {
  if (passed < required) throw TypeError('Not enough arguments');
};

var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {
  setInternalState(this, {
    type: URL_SEARCH_PARAMS_ITERATOR,
    iterator: getIterator(getInternalParamsState(params).entries),
    kind: kind
  });
}, 'Iterator', function next() {
  var state = getInternalIteratorState(this);
  var kind = state.kind;
  var step = state.iterator.next();
  var entry = step.value;
  if (!step.done) {
    step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];
  } return step;
});

// `URLSearchParams` constructor
// https://url.spec.whatwg.org/#interface-urlsearchparams
var URLSearchParamsConstructor = function URLSearchParams(/* init */) {
  anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS);
  var init = arguments.length > 0 ? arguments[0] : undefined;
  var that = this;
  var entries = [];
  var iteratorMethod, iterator, next, step, entryIterator, entryNext, first, second, key;

  setInternalState(that, {
    type: URL_SEARCH_PARAMS,
    entries: entries,
    updateURL: function () { /* empty */ },
    updateSearchParams: updateSearchParams
  });

  if (init !== undefined) {
    if (isObject(init)) {
      iteratorMethod = getIteratorMethod(init);
      if (typeof iteratorMethod === 'function') {
        iterator = iteratorMethod.call(init);
        next = iterator.next;
        while (!(step = next.call(iterator)).done) {
          entryIterator = getIterator(anObject(step.value));
          entryNext = entryIterator.next;
          if (
            (first = entryNext.call(entryIterator)).done ||
            (second = entryNext.call(entryIterator)).done ||
            !entryNext.call(entryIterator).done
          ) throw TypeError('Expected sequence with length 2');
          entries.push({ key: first.value + '', value: second.value + '' });
        }
      } else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: init[key] + '' });
    } else {
      parseSearchParams(entries, typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : init + '');
    }
  }
};

var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;

redefineAll(URLSearchParamsPrototype, {
  // `URLSearchParams.prototype.appent` method
  // https://url.spec.whatwg.org/#dom-urlsearchparams-append
  append: function append(name, value) {
    validateArgumentsLength(arguments.length, 2);
    var state = getInternalParamsState(this);
    state.entries.push({ key: name + '', value: value + '' });
    state.updateURL();
  },
  // `URLSearchParams.prototype.delete` method
  // https://url.spec.whatwg.org/#dom-urlsearchparams-delete
  'delete': function (name) {
    validateArgumentsLength(arguments.length, 1);
    var state = getInternalParamsState(this);
    var entries = state.entries;
    var key = name + '';
    var index = 0;
    while (index < entries.length) {
      if (entries[index].key === key) entries.splice(index, 1);
      else index++;
    }
    state.updateURL();
  },
  // `URLSearchParams.prototype.get` method
  // https://url.spec.whatwg.org/#dom-urlsearchparams-get
  get: function get(name) {
    validateArgumentsLength(arguments.length, 1);
    var entries = getInternalParamsState(this).entries;
    var key = name + '';
    var index = 0;
    for (; index < entries.length; index++) {
      if (entries[index].key === key) return entries[index].value;
    }
    return null;
  },
  // `URLSearchParams.prototype.getAll` method
  // https://url.spec.whatwg.org/#dom-urlsearchparams-getall
  getAll: function getAll(name) {
    validateArgumentsLength(arguments.length, 1);
    var entries = getInternalParamsState(this).entries;
    var key = name + '';
    var result = [];
    var index = 0;
    for (; index < entries.length; index++) {
      if (entries[index].key === key) result.push(entries[index].value);
    }
    return result;
  },
  // `URLSearchParams.prototype.has` method
  // https://url.spec.whatwg.org/#dom-urlsearchparams-has
  has: function has(name) {
    validateArgumentsLength(arguments.length, 1);
    var entries = getInternalParamsState(this).entries;
    var key = name + '';
    var index = 0;
    while (index < entries.length) {
      if (entries[index++].key === key) return true;
    }
    return false;
  },
  // `URLSearchParams.prototype.set` method
  // https://url.spec.whatwg.org/#dom-urlsearchparams-set
  set: function set(name, value) {
    validateArgumentsLength(arguments.length, 1);
    var state = getInternalParamsState(this);
    var entries = state.entries;
    var found = false;
    var key = name + '';
    var val = value + '';
    var index = 0;
    var entry;
    for (; index < entries.length; index++) {
      entry = entries[index];
      if (entry.key === key) {
        if (found) entries.splice(index--, 1);
        else {
          found = true;
          entry.value = val;
        }
      }
    }
    if (!found) entries.push({ key: key, value: val });
    state.updateURL();
  },
  // `URLSearchParams.prototype.sort` method
  // https://url.spec.whatwg.org/#dom-urlsearchparams-sort
  sort: function sort() {
    var state = getInternalParamsState(this);
    var entries = state.entries;
    // Array#sort is not stable in some engines
    var slice = entries.slice();
    var entry, entriesIndex, sliceIndex;
    entries.length = 0;
    for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) {
      entry = slice[sliceIndex];
      for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) {
        if (entries[entriesIndex].key > entry.key) {
          entries.splice(entriesIndex, 0, entry);
          break;
        }
      }
      if (entriesIndex === sliceIndex) entries.push(entry);
    }
    state.updateURL();
  },
  // `URLSearchParams.prototype.forEach` method
  forEach: function forEach(callback /* , thisArg */) {
    var entries = getInternalParamsState(this).entries;
    var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3);
    var index = 0;
    var entry;
    while (index < entries.length) {
      entry = entries[index++];
      boundFunction(entry.value, entry.key, this);
    }
  },
  // `URLSearchParams.prototype.keys` method
  keys: function keys() {
    return new URLSearchParamsIterator(this, 'keys');
  },
  // `URLSearchParams.prototype.values` method
  values: function values() {
    return new URLSearchParamsIterator(this, 'values');
  },
  // `URLSearchParams.prototype.entries` method
  entries: function entries() {
    return new URLSearchParamsIterator(this, 'entries');
  }
}, { enumerable: true });

// `URLSearchParams.prototype[@@iterator]` method
redefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries);

// `URLSearchParams.prototype.toString` method
// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior
redefine(URLSearchParamsPrototype, 'toString', function toString() {
  var entries = getInternalParamsState(this).entries;
  var result = [];
  var index = 0;
  var entry;
  while (index < entries.length) {
    entry = entries[index++];
    result.push(serialize(entry.key) + '=' + serialize(entry.value));
  } return result.join('&');
}, { enumerable: true });

setToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);

$({ global: true, forced: !USE_NATIVE_URL }, {
  URLSearchParams: URLSearchParamsConstructor
});

// Wrap `fetch` for correct work with polyfilled `URLSearchParams`
// https://github.com/zloirock/core-js/issues/674
if (!USE_NATIVE_URL && typeof $fetch == 'function' && typeof Headers == 'function') {
  $({ global: true, enumerable: true, forced: true }, {
    fetch: function fetch(input /* , init */) {
      var args = [input];
      var init, body, headers;
      if (arguments.length > 1) {
        init = arguments[1];
        if (isObject(init)) {
          body = init.body;
          if (classof(body) === URL_SEARCH_PARAMS) {
            headers = init.headers ? new Headers(init.headers) : new Headers();
            if (!headers.has('content-type')) {
              headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
            }
            init = create(init, {
              body: createPropertyDescriptor(0, String(body)),
              headers: createPropertyDescriptor(0, headers)
            });
          }
        }
        args.push(init);
      } return $fetch.apply(this, args);
    }
  });
}

module.exports = {
  URLSearchParams: URLSearchParamsConstructor,
  getState: getInternalParamsState
};

},{"../internals/an-instance":4,"../internals/an-object":5,"../internals/classof":10,"../internals/create-iterator-constructor":13,"../internals/create-property-descriptor":15,"../internals/export":21,"../internals/function-bind-context":23,"../internals/get-built-in":24,"../internals/get-iterator":26,"../internals/get-iterator-method":25,"../internals/has":28,"../internals/internal-state":34,"../internals/is-object":37,"../internals/native-url":42,"../internals/object-create":45,"../internals/redefine":59,"../internals/redefine-all":58,"../internals/set-to-string-tag":62,"../internals/well-known-symbol":77,"../modules/es.array.iterator":78}],81:[function(require,module,exports){
'use strict';
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
require('../modules/es.string.iterator');
var $ = require('../internals/export');
var DESCRIPTORS = require('../internals/descriptors');
var USE_NATIVE_URL = require('../internals/native-url');
var global = require('../internals/global');
var defineProperties = require('../internals/object-define-properties');
var redefine = require('../internals/redefine');
var anInstance = require('../internals/an-instance');
var has = require('../internals/has');
var assign = require('../internals/object-assign');
var arrayFrom = require('../internals/array-from');
var codeAt = require('../internals/string-multibyte').codeAt;
var toASCII = require('../internals/string-punycode-to-ascii');
var setToStringTag = require('../internals/set-to-string-tag');
var URLSearchParamsModule = require('../modules/web.url-search-params');
var InternalStateModule = require('../internals/internal-state');

var NativeURL = global.URL;
var URLSearchParams = URLSearchParamsModule.URLSearchParams;
var getInternalSearchParamsState = URLSearchParamsModule.getState;
var setInternalState = InternalStateModule.set;
var getInternalURLState = InternalStateModule.getterFor('URL');
var floor = Math.floor;
var pow = Math.pow;

var INVALID_AUTHORITY = 'Invalid authority';
var INVALID_SCHEME = 'Invalid scheme';
var INVALID_HOST = 'Invalid host';
var INVALID_PORT = 'Invalid port';

var ALPHA = /[A-Za-z]/;
var ALPHANUMERIC = /[\d+\-.A-Za-z]/;
var DIGIT = /\d/;
var HEX_START = /^(0x|0X)/;
var OCT = /^[0-7]+$/;
var DEC = /^\d+$/;
var HEX = /^[\dA-Fa-f]+$/;
// eslint-disable-next-line no-control-regex
var FORBIDDEN_HOST_CODE_POINT = /[\u0000\u0009\u000A\u000D #%/:?@[\\]]/;
// eslint-disable-next-line no-control-regex
var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\u0000\u0009\u000A\u000D #/:?@[\\]]/;
// eslint-disable-next-line no-control-regex
var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g;
// eslint-disable-next-line no-control-regex
var TAB_AND_NEW_LINE = /[\u0009\u000A\u000D]/g;
var EOF;

var parseHost = function (url, input) {
  var result, codePoints, index;
  if (input.charAt(0) == '[') {
    if (input.charAt(input.length - 1) != ']') return INVALID_HOST;
    result = parseIPv6(input.slice(1, -1));
    if (!result) return INVALID_HOST;
    url.host = result;
  // opaque host
  } else if (!isSpecial(url)) {
    if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST;
    result = '';
    codePoints = arrayFrom(input);
    for (index = 0; index < codePoints.length; index++) {
      result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);
    }
    url.host = result;
  } else {
    input = toASCII(input);
    if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST;
    result = parseIPv4(input);
    if (result === null) return INVALID_HOST;
    url.host = result;
  }
};

var parseIPv4 = function (input) {
  var parts = input.split('.');
  var partsLength, numbers, index, part, radix, number, ipv4;
  if (parts.length && parts[parts.length - 1] == '') {
    parts.pop();
  }
  partsLength = parts.length;
  if (partsLength > 4) return input;
  numbers = [];
  for (index = 0; index < partsLength; index++) {
    part = parts[index];
    if (part == '') return input;
    radix = 10;
    if (part.length > 1 && part.charAt(0) == '0') {
      radix = HEX_START.test(part) ? 16 : 8;
      part = part.slice(radix == 8 ? 1 : 2);
    }
    if (part === '') {
      number = 0;
    } else {
      if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input;
      number = parseInt(part, radix);
    }
    numbers.push(number);
  }
  for (index = 0; index < partsLength; index++) {
    number = numbers[index];
    if (index == partsLength - 1) {
      if (number >= pow(256, 5 - partsLength)) return null;
    } else if (number > 255) return null;
  }
  ipv4 = numbers.pop();
  for (index = 0; index < numbers.length; index++) {
    ipv4 += numbers[index] * pow(256, 3 - index);
  }
  return ipv4;
};

// eslint-disable-next-line max-statements
var parseIPv6 = function (input) {
  var address = [0, 0, 0, 0, 0, 0, 0, 0];
  var pieceIndex = 0;
  var compress = null;
  var pointer = 0;
  var value, length, numbersSeen, ipv4Piece, number, swaps, swap;

  var char = function () {
    return input.charAt(pointer);
  };

  if (char() == ':') {
    if (input.charAt(1) != ':') return;
    pointer += 2;
    pieceIndex++;
    compress = pieceIndex;
  }
  while (char()) {
    if (pieceIndex == 8) return;
    if (char() == ':') {
      if (compress !== null) return;
      pointer++;
      pieceIndex++;
      compress = pieceIndex;
      continue;
    }
    value = length = 0;
    while (length < 4 && HEX.test(char())) {
      value = value * 16 + parseInt(char(), 16);
      pointer++;
      length++;
    }
    if (char() == '.') {
      if (length == 0) return;
      pointer -= length;
      if (pieceIndex > 6) return;
      numbersSeen = 0;
      while (char()) {
        ipv4Piece = null;
        if (numbersSeen > 0) {
          if (char() == '.' && numbersSeen < 4) pointer++;
          else return;
        }
        if (!DIGIT.test(char())) return;
        while (DIGIT.test(char())) {
          number = parseInt(char(), 10);
          if (ipv4Piece === null) ipv4Piece = number;
          else if (ipv4Piece == 0) return;
          else ipv4Piece = ipv4Piece * 10 + number;
          if (ipv4Piece > 255) return;
          pointer++;
        }
        address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;
        numbersSeen++;
        if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;
      }
      if (numbersSeen != 4) return;
      break;
    } else if (char() == ':') {
      pointer++;
      if (!char()) return;
    } else if (char()) return;
    address[pieceIndex++] = value;
  }
  if (compress !== null) {
    swaps = pieceIndex - compress;
    pieceIndex = 7;
    while (pieceIndex != 0 && swaps > 0) {
      swap = address[pieceIndex];
      address[pieceIndex--] = address[compress + swaps - 1];
      address[compress + --swaps] = swap;
    }
  } else if (pieceIndex != 8) return;
  return address;
};

var findLongestZeroSequence = function (ipv6) {
  var maxIndex = null;
  var maxLength = 1;
  var currStart = null;
  var currLength = 0;
  var index = 0;
  for (; index < 8; index++) {
    if (ipv6[index] !== 0) {
      if (currLength > maxLength) {
        maxIndex = currStart;
        maxLength = currLength;
      }
      currStart = null;
      currLength = 0;
    } else {
      if (currStart === null) currStart = index;
      ++currLength;
    }
  }
  if (currLength > maxLength) {
    maxIndex = currStart;
    maxLength = currLength;
  }
  return maxIndex;
};

var serializeHost = function (host) {
  var result, index, compress, ignore0;
  // ipv4
  if (typeof host == 'number') {
    result = [];
    for (index = 0; index < 4; index++) {
      result.unshift(host % 256);
      host = floor(host / 256);
    } return result.join('.');
  // ipv6
  } else if (typeof host == 'object') {
    result = '';
    compress = findLongestZeroSequence(host);
    for (index = 0; index < 8; index++) {
      if (ignore0 && host[index] === 0) continue;
      if (ignore0) ignore0 = false;
      if (compress === index) {
        result += index ? ':' : '::';
        ignore0 = true;
      } else {
        result += host[index].toString(16);
        if (index < 7) result += ':';
      }
    }
    return '[' + result + ']';
  } return host;
};

var C0ControlPercentEncodeSet = {};
var fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {
  ' ': 1, '"': 1, '<': 1, '>': 1, '`': 1
});
var pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {
  '#': 1, '?': 1, '{': 1, '}': 1
});
var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {
  '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\': 1, ']': 1, '^': 1, '|': 1
});

var percentEncode = function (char, set) {
  var code = codeAt(char, 0);
  return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char);
};

var specialSchemes = {
  ftp: 21,
  file: null,
  http: 80,
  https: 443,
  ws: 80,
  wss: 443
};

var isSpecial = function (url) {
  return has(specialSchemes, url.scheme);
};

var includesCredentials = function (url) {
  return url.username != '' || url.password != '';
};

var cannotHaveUsernamePasswordPort = function (url) {
  return !url.host || url.cannotBeABaseURL || url.scheme == 'file';
};

var isWindowsDriveLetter = function (string, normalized) {
  var second;
  return string.length == 2 && ALPHA.test(string.charAt(0))
    && ((second = string.charAt(1)) == ':' || (!normalized && second == '|'));
};

var startsWithWindowsDriveLetter = function (string) {
  var third;
  return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && (
    string.length == 2 ||
    ((third = string.charAt(2)) === '/' || third === '\\' || third === '?' || third === '#')
  );
};

var shortenURLsPath = function (url) {
  var path = url.path;
  var pathSize = path.length;
  if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {
    path.pop();
  }
};

var isSingleDot = function (segment) {
  return segment === '.' || segment.toLowerCase() === '%2e';
};

var isDoubleDot = function (segment) {
  segment = segment.toLowerCase();
  return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';
};

// States:
var SCHEME_START = {};
var SCHEME = {};
var NO_SCHEME = {};
var SPECIAL_RELATIVE_OR_AUTHORITY = {};
var PATH_OR_AUTHORITY = {};
var RELATIVE = {};
var RELATIVE_SLASH = {};
var SPECIAL_AUTHORITY_SLASHES = {};
var SPECIAL_AUTHORITY_IGNORE_SLASHES = {};
var AUTHORITY = {};
var HOST = {};
var HOSTNAME = {};
var PORT = {};
var FILE = {};
var FILE_SLASH = {};
var FILE_HOST = {};
var PATH_START = {};
var PATH = {};
var CANNOT_BE_A_BASE_URL_PATH = {};
var QUERY = {};
var FRAGMENT = {};

// eslint-disable-next-line max-statements
var parseURL = function (url, input, stateOverride, base) {
  var state = stateOverride || SCHEME_START;
  var pointer = 0;
  var buffer = '';
  var seenAt = false;
  var seenBracket = false;
  var seenPasswordToken = false;
  var codePoints, char, bufferCodePoints, failure;

  if (!stateOverride) {
    url.scheme = '';
    url.username = '';
    url.password = '';
    url.host = null;
    url.port = null;
    url.path = [];
    url.query = null;
    url.fragment = null;
    url.cannotBeABaseURL = false;
    input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');
  }

  input = input.replace(TAB_AND_NEW_LINE, '');

  codePoints = arrayFrom(input);

  while (pointer <= codePoints.length) {
    char = codePoints[pointer];
    switch (state) {
      case SCHEME_START:
        if (char && ALPHA.test(char)) {
          buffer += char.toLowerCase();
          state = SCHEME;
        } else if (!stateOverride) {
          state = NO_SCHEME;
          continue;
        } else return INVALID_SCHEME;
        break;

      case SCHEME:
        if (char && (ALPHANUMERIC.test(char) || char == '+' || char == '-' || char == '.')) {
          buffer += char.toLowerCase();
        } else if (char == ':') {
          if (stateOverride && (
            (isSpecial(url) != has(specialSchemes, buffer)) ||
            (buffer == 'file' && (includesCredentials(url) || url.port !== null)) ||
            (url.scheme == 'file' && !url.host)
          )) return;
          url.scheme = buffer;
          if (stateOverride) {
            if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null;
            return;
          }
          buffer = '';
          if (url.scheme == 'file') {
            state = FILE;
          } else if (isSpecial(url) && base && base.scheme == url.scheme) {
            state = SPECIAL_RELATIVE_OR_AUTHORITY;
          } else if (isSpecial(url)) {
            state = SPECIAL_AUTHORITY_SLASHES;
          } else if (codePoints[pointer + 1] == '/') {
            state = PATH_OR_AUTHORITY;
            pointer++;
          } else {
            url.cannotBeABaseURL = true;
            url.path.push('');
            state = CANNOT_BE_A_BASE_URL_PATH;
          }
        } else if (!stateOverride) {
          buffer = '';
          state = NO_SCHEME;
          pointer = 0;
          continue;
        } else return INVALID_SCHEME;
        break;

      case NO_SCHEME:
        if (!base || (base.cannotBeABaseURL && char != '#')) return INVALID_SCHEME;
        if (base.cannotBeABaseURL && char == '#') {
          url.scheme = base.scheme;
          url.path = base.path.slice();
          url.query = base.query;
          url.fragment = '';
          url.cannotBeABaseURL = true;
          state = FRAGMENT;
          break;
        }
        state = base.scheme == 'file' ? FILE : RELATIVE;
        continue;

      case SPECIAL_RELATIVE_OR_AUTHORITY:
        if (char == '/' && codePoints[pointer + 1] == '/') {
          state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
          pointer++;
        } else {
          state = RELATIVE;
          continue;
        } break;

      case PATH_OR_AUTHORITY:
        if (char == '/') {
          state = AUTHORITY;
          break;
        } else {
          state = PATH;
          continue;
        }

      case RELATIVE:
        url.scheme = base.scheme;
        if (char == EOF) {
          url.username = base.username;
          url.password = base.password;
          url.host = base.host;
          url.port = base.port;
          url.path = base.path.slice();
          url.query = base.query;
        } else if (char == '/' || (char == '\\' && isSpecial(url))) {
          state = RELATIVE_SLASH;
        } else if (char == '?') {
          url.username = base.username;
          url.password = base.password;
          url.host = base.host;
          url.port = base.port;
          url.path = base.path.slice();
          url.query = '';
          state = QUERY;
        } else if (char == '#') {
          url.username = base.username;
          url.password = base.password;
          url.host = base.host;
          url.port = base.port;
          url.path = base.path.slice();
          url.query = base.query;
          url.fragment = '';
          state = FRAGMENT;
        } else {
          url.username = base.username;
          url.password = base.password;
          url.host = base.host;
          url.port = base.port;
          url.path = base.path.slice();
          url.path.pop();
          state = PATH;
          continue;
        } break;

      case RELATIVE_SLASH:
        if (isSpecial(url) && (char == '/' || char == '\\')) {
          state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
        } else if (char == '/') {
          state = AUTHORITY;
        } else {
          url.username = base.username;
          url.password = base.password;
          url.host = base.host;
          url.port = base.port;
          state = PATH;
          continue;
        } break;

      case SPECIAL_AUTHORITY_SLASHES:
        state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
        if (char != '/' || buffer.charAt(pointer + 1) != '/') continue;
        pointer++;
        break;

      case SPECIAL_AUTHORITY_IGNORE_SLASHES:
        if (char != '/' && char != '\\') {
          state = AUTHORITY;
          continue;
        } break;

      case AUTHORITY:
        if (char == '@') {
          if (seenAt) buffer = '%40' + buffer;
          seenAt = true;
          bufferCodePoints = arrayFrom(buffer);
          for (var i = 0; i < bufferCodePoints.length; i++) {
            var codePoint = bufferCodePoints[i];
            if (codePoint == ':' && !seenPasswordToken) {
              seenPasswordToken = true;
              continue;
            }
            var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);
            if (seenPasswordToken) url.password += encodedCodePoints;
            else url.username += encodedCodePoints;
          }
          buffer = '';
        } else if (
          char == EOF || char == '/' || char == '?' || char == '#' ||
          (char == '\\' && isSpecial(url))
        ) {
          if (seenAt && buffer == '') return INVALID_AUTHORITY;
          pointer -= arrayFrom(buffer).length + 1;
          buffer = '';
          state = HOST;
        } else buffer += char;
        break;

      case HOST:
      case HOSTNAME:
        if (stateOverride && url.scheme == 'file') {
          state = FILE_HOST;
          continue;
        } else if (char == ':' && !seenBracket) {
          if (buffer == '') return INVALID_HOST;
          failure = parseHost(url, buffer);
          if (failure) return failure;
          buffer = '';
          state = PORT;
          if (stateOverride == HOSTNAME) return;
        } else if (
          char == EOF || char == '/' || char == '?' || char == '#' ||
          (char == '\\' && isSpecial(url))
        ) {
          if (isSpecial(url) && buffer == '') return INVALID_HOST;
          if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return;
          failure = parseHost(url, buffer);
          if (failure) return failure;
          buffer = '';
          state = PATH_START;
          if (stateOverride) return;
          continue;
        } else {
          if (char == '[') seenBracket = true;
          else if (char == ']') seenBracket = false;
          buffer += char;
        } break;

      case PORT:
        if (DIGIT.test(char)) {
          buffer += char;
        } else if (
          char == EOF || char == '/' || char == '?' || char == '#' ||
          (char == '\\' && isSpecial(url)) ||
          stateOverride
        ) {
          if (buffer != '') {
            var port = parseInt(buffer, 10);
            if (port > 0xFFFF) return INVALID_PORT;
            url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port;
            buffer = '';
          }
          if (stateOverride) return;
          state = PATH_START;
          continue;
        } else return INVALID_PORT;
        break;

      case FILE:
        url.scheme = 'file';
        if (char == '/' || char == '\\') state = FILE_SLASH;
        else if (base && base.scheme == 'file') {
          if (char == EOF) {
            url.host = base.host;
            url.path = base.path.slice();
            url.query = base.query;
          } else if (char == '?') {
            url.host = base.host;
            url.path = base.path.slice();
            url.query = '';
            state = QUERY;
          } else if (char == '#') {
            url.host = base.host;
            url.path = base.path.slice();
            url.query = base.query;
            url.fragment = '';
            state = FRAGMENT;
          } else {
            if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {
              url.host = base.host;
              url.path = base.path.slice();
              shortenURLsPath(url);
            }
            state = PATH;
            continue;
          }
        } else {
          state = PATH;
          continue;
        } break;

      case FILE_SLASH:
        if (char == '/' || char == '\\') {
          state = FILE_HOST;
          break;
        }
        if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {
          if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]);
          else url.host = base.host;
        }
        state = PATH;
        continue;

      case FILE_HOST:
        if (char == EOF || char == '/' || char == '\\' || char == '?' || char == '#') {
          if (!stateOverride && isWindowsDriveLetter(buffer)) {
            state = PATH;
          } else if (buffer == '') {
            url.host = '';
            if (stateOverride) return;
            state = PATH_START;
          } else {
            failure = parseHost(url, buffer);
            if (failure) return failure;
            if (url.host == 'localhost') url.host = '';
            if (stateOverride) return;
            buffer = '';
            state = PATH_START;
          } continue;
        } else buffer += char;
        break;

      case PATH_START:
        if (isSpecial(url)) {
          state = PATH;
          if (char != '/' && char != '\\') continue;
        } else if (!stateOverride && char == '?') {
          url.query = '';
          state = QUERY;
        } else if (!stateOverride && char == '#') {
          url.fragment = '';
          state = FRAGMENT;
        } else if (char != EOF) {
          state = PATH;
          if (char != '/') continue;
        } break;

      case PATH:
        if (
          char == EOF || char == '/' ||
          (char == '\\' && isSpecial(url)) ||
          (!stateOverride && (char == '?' || char == '#'))
        ) {
          if (isDoubleDot(buffer)) {
            shortenURLsPath(url);
            if (char != '/' && !(char == '\\' && isSpecial(url))) {
              url.path.push('');
            }
          } else if (isSingleDot(buffer)) {
            if (char != '/' && !(char == '\\' && isSpecial(url))) {
              url.path.push('');
            }
          } else {
            if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {
              if (url.host) url.host = '';
              buffer = buffer.charAt(0) + ':'; // normalize windows drive letter
            }
            url.path.push(buffer);
          }
          buffer = '';
          if (url.scheme == 'file' && (char == EOF || char == '?' || char == '#')) {
            while (url.path.length > 1 && url.path[0] === '') {
              url.path.shift();
            }
          }
          if (char == '?') {
            url.query = '';
            state = QUERY;
          } else if (char == '#') {
            url.fragment = '';
            state = FRAGMENT;
          }
        } else {
          buffer += percentEncode(char, pathPercentEncodeSet);
        } break;

      case CANNOT_BE_A_BASE_URL_PATH:
        if (char == '?') {
          url.query = '';
          state = QUERY;
        } else if (char == '#') {
          url.fragment = '';
          state = FRAGMENT;
        } else if (char != EOF) {
          url.path[0] += percentEncode(char, C0ControlPercentEncodeSet);
        } break;

      case QUERY:
        if (!stateOverride && char == '#') {
          url.fragment = '';
          state = FRAGMENT;
        } else if (char != EOF) {
          if (char == "'" && isSpecial(url)) url.query += '%27';
          else if (char == '#') url.query += '%23';
          else url.query += percentEncode(char, C0ControlPercentEncodeSet);
        } break;

      case FRAGMENT:
        if (char != EOF) url.fragment += percentEncode(char, fragmentPercentEncodeSet);
        break;
    }

    pointer++;
  }
};

// `URL` constructor
// https://url.spec.whatwg.org/#url-class
var URLConstructor = function URL(url /* , base */) {
  var that = anInstance(this, URLConstructor, 'URL');
  var base = arguments.length > 1 ? arguments[1] : undefined;
  var urlString = String(url);
  var state = setInternalState(that, { type: 'URL' });
  var baseState, failure;
  if (base !== undefined) {
    if (base instanceof URLConstructor) baseState = getInternalURLState(base);
    else {
      failure = parseURL(baseState = {}, String(base));
      if (failure) throw TypeError(failure);
    }
  }
  failure = parseURL(state, urlString, null, baseState);
  if (failure) throw TypeError(failure);
  var searchParams = state.searchParams = new URLSearchParams();
  var searchParamsState = getInternalSearchParamsState(searchParams);
  searchParamsState.updateSearchParams(state.query);
  searchParamsState.updateURL = function () {
    state.query = String(searchParams) || null;
  };
  if (!DESCRIPTORS) {
    that.href = serializeURL.call(that);
    that.origin = getOrigin.call(that);
    that.protocol = getProtocol.call(that);
    that.username = getUsername.call(that);
    that.password = getPassword.call(that);
    that.host = getHost.call(that);
    that.hostname = getHostname.call(that);
    that.port = getPort.call(that);
    that.pathname = getPathname.call(that);
    that.search = getSearch.call(that);
    that.searchParams = getSearchParams.call(that);
    that.hash = getHash.call(that);
  }
};

var URLPrototype = URLConstructor.prototype;

var serializeURL = function () {
  var url = getInternalURLState(this);
  var scheme = url.scheme;
  var username = url.username;
  var password = url.password;
  var host = url.host;
  var port = url.port;
  var path = url.path;
  var query = url.query;
  var fragment = url.fragment;
  var output = scheme + ':';
  if (host !== null) {
    output += '//';
    if (includesCredentials(url)) {
      output += username + (password ? ':' + password : '') + '@';
    }
    output += serializeHost(host);
    if (port !== null) output += ':' + port;
  } else if (scheme == 'file') output += '//';
  output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';
  if (query !== null) output += '?' + query;
  if (fragment !== null) output += '#' + fragment;
  return output;
};

var getOrigin = function () {
  var url = getInternalURLState(this);
  var scheme = url.scheme;
  var port = url.port;
  if (scheme == 'blob') try {
    return new URL(scheme.path[0]).origin;
  } catch (error) {
    return 'null';
  }
  if (scheme == 'file' || !isSpecial(url)) return 'null';
  return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : '');
};

var getProtocol = function () {
  return getInternalURLState(this).scheme + ':';
};

var getUsername = function () {
  return getInternalURLState(this).username;
};

var getPassword = function () {
  return getInternalURLState(this).password;
};

var getHost = function () {
  var url = getInternalURLState(this);
  var host = url.host;
  var port = url.port;
  return host === null ? ''
    : port === null ? serializeHost(host)
    : serializeHost(host) + ':' + port;
};

var getHostname = function () {
  var host = getInternalURLState(this).host;
  return host === null ? '' : serializeHost(host);
};

var getPort = function () {
  var port = getInternalURLState(this).port;
  return port === null ? '' : String(port);
};

var getPathname = function () {
  var url = getInternalURLState(this);
  var path = url.path;
  return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';
};

var getSearch = function () {
  var query = getInternalURLState(this).query;
  return query ? '?' + query : '';
};

var getSearchParams = function () {
  return getInternalURLState(this).searchParams;
};

var getHash = function () {
  var fragment = getInternalURLState(this).fragment;
  return fragment ? '#' + fragment : '';
};

var accessorDescriptor = function (getter, setter) {
  return { get: getter, set: setter, configurable: true, enumerable: true };
};

if (DESCRIPTORS) {
  defineProperties(URLPrototype, {
    // `URL.prototype.href` accessors pair
    // https://url.spec.whatwg.org/#dom-url-href
    href: accessorDescriptor(serializeURL, function (href) {
      var url = getInternalURLState(this);
      var urlString = String(href);
      var failure = parseURL(url, urlString);
      if (failure) throw TypeError(failure);
      getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);
    }),
    // `URL.prototype.origin` getter
    // https://url.spec.whatwg.org/#dom-url-origin
    origin: accessorDescriptor(getOrigin),
    // `URL.prototype.protocol` accessors pair
    // https://url.spec.whatwg.org/#dom-url-protocol
    protocol: accessorDescriptor(getProtocol, function (protocol) {
      var url = getInternalURLState(this);
      parseURL(url, String(protocol) + ':', SCHEME_START);
    }),
    // `URL.prototype.username` accessors pair
    // https://url.spec.whatwg.org/#dom-url-username
    username: accessorDescriptor(getUsername, function (username) {
      var url = getInternalURLState(this);
      var codePoints = arrayFrom(String(username));
      if (cannotHaveUsernamePasswordPort(url)) return;
      url.username = '';
      for (var i = 0; i < codePoints.length; i++) {
        url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);
      }
    }),
    // `URL.prototype.password` accessors pair
    // https://url.spec.whatwg.org/#dom-url-password
    password: accessorDescriptor(getPassword, function (password) {
      var url = getInternalURLState(this);
      var codePoints = arrayFrom(String(password));
      if (cannotHaveUsernamePasswordPort(url)) return;
      url.password = '';
      for (var i = 0; i < codePoints.length; i++) {
        url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);
      }
    }),
    // `URL.prototype.host` accessors pair
    // https://url.spec.whatwg.org/#dom-url-host
    host: accessorDescriptor(getHost, function (host) {
      var url = getInternalURLState(this);
      if (url.cannotBeABaseURL) return;
      parseURL(url, String(host), HOST);
    }),
    // `URL.prototype.hostname` accessors pair
    // https://url.spec.whatwg.org/#dom-url-hostname
    hostname: accessorDescriptor(getHostname, function (hostname) {
      var url = getInternalURLState(this);
      if (url.cannotBeABaseURL) return;
      parseURL(url, String(hostname), HOSTNAME);
    }),
    // `URL.prototype.port` accessors pair
    // https://url.spec.whatwg.org/#dom-url-port
    port: accessorDescriptor(getPort, function (port) {
      var url = getInternalURLState(this);
      if (cannotHaveUsernamePasswordPort(url)) return;
      port = String(port);
      if (port == '') url.port = null;
      else parseURL(url, port, PORT);
    }),
    // `URL.prototype.pathname` accessors pair
    // https://url.spec.whatwg.org/#dom-url-pathname
    pathname: accessorDescriptor(getPathname, function (pathname) {
      var url = getInternalURLState(this);
      if (url.cannotBeABaseURL) return;
      url.path = [];
      parseURL(url, pathname + '', PATH_START);
    }),
    // `URL.prototype.search` accessors pair
    // https://url.spec.whatwg.org/#dom-url-search
    search: accessorDescriptor(getSearch, function (search) {
      var url = getInternalURLState(this);
      search = String(search);
      if (search == '') {
        url.query = null;
      } else {
        if ('?' == search.charAt(0)) search = search.slice(1);
        url.query = '';
        parseURL(url, search, QUERY);
      }
      getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);
    }),
    // `URL.prototype.searchParams` getter
    // https://url.spec.whatwg.org/#dom-url-searchparams
    searchParams: accessorDescriptor(getSearchParams),
    // `URL.prototype.hash` accessors pair
    // https://url.spec.whatwg.org/#dom-url-hash
    hash: accessorDescriptor(getHash, function (hash) {
      var url = getInternalURLState(this);
      hash = String(hash);
      if (hash == '') {
        url.fragment = null;
        return;
      }
      if ('#' == hash.charAt(0)) hash = hash.slice(1);
      url.fragment = '';
      parseURL(url, hash, FRAGMENT);
    })
  });
}

// `URL.prototype.toJSON` method
// https://url.spec.whatwg.org/#dom-url-tojson
redefine(URLPrototype, 'toJSON', function toJSON() {
  return serializeURL.call(this);
}, { enumerable: true });

// `URL.prototype.toString` method
// https://url.spec.whatwg.org/#URL-stringification-behavior
redefine(URLPrototype, 'toString', function toString() {
  return serializeURL.call(this);
}, { enumerable: true });

if (NativeURL) {
  var nativeCreateObjectURL = NativeURL.createObjectURL;
  var nativeRevokeObjectURL = NativeURL.revokeObjectURL;
  // `URL.createObjectURL` method
  // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL
  // eslint-disable-next-line no-unused-vars
  if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) {
    return nativeCreateObjectURL.apply(NativeURL, arguments);
  });
  // `URL.revokeObjectURL` method
  // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL
  // eslint-disable-next-line no-unused-vars
  if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) {
    return nativeRevokeObjectURL.apply(NativeURL, arguments);
  });
}

setToStringTag(URLConstructor, 'URL');

$({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {
  URL: URLConstructor
});

},{"../internals/an-instance":4,"../internals/array-from":6,"../internals/descriptors":18,"../internals/export":21,"../internals/global":27,"../internals/has":28,"../internals/internal-state":34,"../internals/native-url":42,"../internals/object-assign":44,"../internals/object-define-properties":46,"../internals/redefine":59,"../internals/set-to-string-tag":62,"../internals/string-multibyte":66,"../internals/string-punycode-to-ascii":67,"../modules/es.string.iterator":79,"../modules/web.url-search-params":80}],82:[function(require,module,exports){
'use strict';
var $ = require('../internals/export');

// `URL.prototype.toJSON` method
// https://url.spec.whatwg.org/#dom-url-tojson
$({ target: 'URL', proto: true, enumerable: true }, {
  toJSON: function toJSON() {
    return URL.prototype.toString.call(this);
  }
});

},{"../internals/export":21}],83:[function(require,module,exports){
require('../modules/web.url');
require('../modules/web.url.to-json');
require('../modules/web.url-search-params');
var path = require('../internals/path');

module.exports = path.URL;

},{"../internals/path":57,"../modules/web.url":81,"../modules/web.url-search-params":80,"../modules/web.url.to-json":82}]},{},[83]);
                                                                                                                                                                                                                                                                    dist/vendor/wp-polyfill-url.min.js                                                                  0000644                 00000133755 15212564037 0013225 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[o]={exports:{}};t[o][0].call(u.exports,(function(e){return i(t[o][1][e]||e)}),u,u.exports,e,t,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){t.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},{}],2:[function(e,t,n){var r=e("../internals/is-object");t.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},{"../internals/is-object":37}],3:[function(e,t,n){var r=e("../internals/well-known-symbol"),i=e("../internals/object-create"),a=e("../internals/object-define-property"),o=r("unscopables"),s=Array.prototype;null==s[o]&&a.f(s,o,{configurable:!0,value:i(null)}),t.exports=function(e){s[o][e]=!0}},{"../internals/object-create":45,"../internals/object-define-property":47,"../internals/well-known-symbol":77}],4:[function(e,t,n){t.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},{}],5:[function(e,t,n){var r=e("../internals/is-object");t.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},{"../internals/is-object":37}],6:[function(e,t,n){"use strict";var r=e("../internals/function-bind-context"),i=e("../internals/to-object"),a=e("../internals/call-with-safe-iteration-closing"),o=e("../internals/is-array-iterator-method"),s=e("../internals/to-length"),l=e("../internals/create-property"),c=e("../internals/get-iterator-method");t.exports=function(e){var t,n,u,f,p,h,b=i(e),d="function"==typeof this?this:Array,y=arguments.length,g=y>1?arguments[1]:void 0,v=void 0!==g,m=c(b),w=0;if(v&&(g=r(g,y>2?arguments[2]:void 0,2)),null==m||d==Array&&o(m))for(n=new d(t=s(b.length));t>w;w++)h=v?g(b[w],w):b[w],l(n,w,h);else for(p=(f=m.call(b)).next,n=new d;!(u=p.call(f)).done;w++)h=v?a(f,g,[u.value,w],!0):u.value,l(n,w,h);return n.length=w,n}},{"../internals/call-with-safe-iteration-closing":8,"../internals/create-property":16,"../internals/function-bind-context":23,"../internals/get-iterator-method":25,"../internals/is-array-iterator-method":35,"../internals/to-length":71,"../internals/to-object":72}],7:[function(e,t,n){var r=e("../internals/to-indexed-object"),i=e("../internals/to-length"),a=e("../internals/to-absolute-index"),o=function(e){return function(t,n,o){var s,l=r(t),c=i(l.length),u=a(o,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},{"../internals/to-absolute-index":68,"../internals/to-indexed-object":69,"../internals/to-length":71}],8:[function(e,t,n){var r=e("../internals/an-object");t.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&r(a.call(e)),t}}},{"../internals/an-object":5}],9:[function(e,t,n){var r={}.toString;t.exports=function(e){return r.call(e).slice(8,-1)}},{}],10:[function(e,t,n){var r=e("../internals/to-string-tag-support"),i=e("../internals/classof-raw"),a=e("../internals/well-known-symbol")("toStringTag"),o="Arguments"==i(function(){return arguments}());t.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),a))?n:o?i(t):"Object"==(r=i(t))&&"function"==typeof t.callee?"Arguments":r}},{"../internals/classof-raw":9,"../internals/to-string-tag-support":74,"../internals/well-known-symbol":77}],11:[function(e,t,n){var r=e("../internals/has"),i=e("../internals/own-keys"),a=e("../internals/object-get-own-property-descriptor"),o=e("../internals/object-define-property");t.exports=function(e,t){for(var n=i(t),s=o.f,l=a.f,c=0;c<n.length;c++){var u=n[c];r(e,u)||s(e,u,l(t,u))}}},{"../internals/has":28,"../internals/object-define-property":47,"../internals/object-get-own-property-descriptor":48,"../internals/own-keys":56}],12:[function(e,t,n){var r=e("../internals/fails");t.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},{"../internals/fails":22}],13:[function(e,t,n){"use strict";var r=e("../internals/iterators-core").IteratorPrototype,i=e("../internals/object-create"),a=e("../internals/create-property-descriptor"),o=e("../internals/set-to-string-tag"),s=e("../internals/iterators"),l=function(){return this};t.exports=function(e,t,n){var c=t+" Iterator";return e.prototype=i(r,{next:a(1,n)}),o(e,c,!1,!0),s[c]=l,e}},{"../internals/create-property-descriptor":15,"../internals/iterators":40,"../internals/iterators-core":39,"../internals/object-create":45,"../internals/set-to-string-tag":62}],14:[function(e,t,n){var r=e("../internals/descriptors"),i=e("../internals/object-define-property"),a=e("../internals/create-property-descriptor");t.exports=r?function(e,t,n){return i.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},{"../internals/create-property-descriptor":15,"../internals/descriptors":18,"../internals/object-define-property":47}],15:[function(e,t,n){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],16:[function(e,t,n){"use strict";var r=e("../internals/to-primitive"),i=e("../internals/object-define-property"),a=e("../internals/create-property-descriptor");t.exports=function(e,t,n){var o=r(t);o in e?i.f(e,o,a(0,n)):e[o]=n}},{"../internals/create-property-descriptor":15,"../internals/object-define-property":47,"../internals/to-primitive":73}],17:[function(e,t,n){"use strict";var r=e("../internals/export"),i=e("../internals/create-iterator-constructor"),a=e("../internals/object-get-prototype-of"),o=e("../internals/object-set-prototype-of"),s=e("../internals/set-to-string-tag"),l=e("../internals/create-non-enumerable-property"),c=e("../internals/redefine"),u=e("../internals/well-known-symbol"),f=e("../internals/is-pure"),p=e("../internals/iterators"),h=e("../internals/iterators-core"),b=h.IteratorPrototype,d=h.BUGGY_SAFARI_ITERATORS,y=u("iterator"),g=function(){return this};t.exports=function(e,t,n,u,h,v,m){i(n,t,u);var w,j,x,k=function(e){if(e===h&&L)return L;if(!d&&e in O)return O[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},S=t+" Iterator",A=!1,O=e.prototype,R=O[y]||O["@@iterator"]||h&&O[h],L=!d&&R||k(h),U="Array"==t&&O.entries||R;if(U&&(w=a(U.call(new e)),b!==Object.prototype&&w.next&&(f||a(w)===b||(o?o(w,b):"function"!=typeof w[y]&&l(w,y,g)),s(w,S,!0,!0),f&&(p[S]=g))),"values"==h&&R&&"values"!==R.name&&(A=!0,L=function(){return R.call(this)}),f&&!m||O[y]===L||l(O,y,L),p[t]=L,h)if(j={values:k("values"),keys:v?L:k("keys"),entries:k("entries")},m)for(x in j)!d&&!A&&x in O||c(O,x,j[x]);else r({target:t,proto:!0,forced:d||A},j);return j}},{"../internals/create-iterator-constructor":13,"../internals/create-non-enumerable-property":14,"../internals/export":21,"../internals/is-pure":38,"../internals/iterators":40,"../internals/iterators-core":39,"../internals/object-get-prototype-of":51,"../internals/object-set-prototype-of":55,"../internals/redefine":59,"../internals/set-to-string-tag":62,"../internals/well-known-symbol":77}],18:[function(e,t,n){var r=e("../internals/fails");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},{"../internals/fails":22}],19:[function(e,t,n){var r=e("../internals/global"),i=e("../internals/is-object"),a=r.document,o=i(a)&&i(a.createElement);t.exports=function(e){return o?a.createElement(e):{}}},{"../internals/global":27,"../internals/is-object":37}],20:[function(e,t,n){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],21:[function(e,t,n){var r=e("../internals/global"),i=e("../internals/object-get-own-property-descriptor").f,a=e("../internals/create-non-enumerable-property"),o=e("../internals/redefine"),s=e("../internals/set-global"),l=e("../internals/copy-constructor-properties"),c=e("../internals/is-forced");t.exports=function(e,t){var n,u,f,p,h,b=e.target,d=e.global,y=e.stat;if(n=d?r:y?r[b]||s(b,{}):(r[b]||{}).prototype)for(u in t){if(p=t[u],f=e.noTargetGet?(h=i(n,u))&&h.value:n[u],!c(d?u:b+(y?".":"#")+u,e.forced)&&void 0!==f){if(typeof p==typeof f)continue;l(p,f)}(e.sham||f&&f.sham)&&a(p,"sham",!0),o(n,u,p,e)}}},{"../internals/copy-constructor-properties":11,"../internals/create-non-enumerable-property":14,"../internals/global":27,"../internals/is-forced":36,"../internals/object-get-own-property-descriptor":48,"../internals/redefine":59,"../internals/set-global":61}],22:[function(e,t,n){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],23:[function(e,t,n){var r=e("../internals/a-function");t.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},{"../internals/a-function":1}],24:[function(e,t,n){var r=e("../internals/path"),i=e("../internals/global"),a=function(e){return"function"==typeof e?e:void 0};t.exports=function(e,t){return arguments.length<2?a(r[e])||a(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},{"../internals/global":27,"../internals/path":57}],25:[function(e,t,n){var r=e("../internals/classof"),i=e("../internals/iterators"),a=e("../internals/well-known-symbol")("iterator");t.exports=function(e){if(null!=e)return e[a]||e["@@iterator"]||i[r(e)]}},{"../internals/classof":10,"../internals/iterators":40,"../internals/well-known-symbol":77}],26:[function(e,t,n){var r=e("../internals/an-object"),i=e("../internals/get-iterator-method");t.exports=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return r(t.call(e))}},{"../internals/an-object":5,"../internals/get-iterator-method":25}],27:[function(e,t,n){(function(e){var n=function(e){return e&&e.Math==Math&&e};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")()}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],28:[function(e,t,n){var r={}.hasOwnProperty;t.exports=function(e,t){return r.call(e,t)}},{}],29:[function(e,t,n){t.exports={}},{}],30:[function(e,t,n){var r=e("../internals/get-built-in");t.exports=r("document","documentElement")},{"../internals/get-built-in":24}],31:[function(e,t,n){var r=e("../internals/descriptors"),i=e("../internals/fails"),a=e("../internals/document-create-element");t.exports=!r&&!i((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},{"../internals/descriptors":18,"../internals/document-create-element":19,"../internals/fails":22}],32:[function(e,t,n){var r=e("../internals/fails"),i=e("../internals/classof-raw"),a="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?a.call(e,""):Object(e)}:Object},{"../internals/classof-raw":9,"../internals/fails":22}],33:[function(e,t,n){var r=e("../internals/shared-store"),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return i.call(e)}),t.exports=r.inspectSource},{"../internals/shared-store":64}],34:[function(e,t,n){var r,i,a,o=e("../internals/native-weak-map"),s=e("../internals/global"),l=e("../internals/is-object"),c=e("../internals/create-non-enumerable-property"),u=e("../internals/has"),f=e("../internals/shared-key"),p=e("../internals/hidden-keys"),h=s.WeakMap;if(o){var b=new h,d=b.get,y=b.has,g=b.set;r=function(e,t){return g.call(b,e,t),t},i=function(e){return d.call(b,e)||{}},a=function(e){return y.call(b,e)}}else{var v=f("state");p[v]=!0,r=function(e,t){return c(e,v,t),t},i=function(e){return u(e,v)?e[v]:{}},a=function(e){return u(e,v)}}t.exports={set:r,get:i,has:a,enforce:function(e){return a(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},{"../internals/create-non-enumerable-property":14,"../internals/global":27,"../internals/has":28,"../internals/hidden-keys":29,"../internals/is-object":37,"../internals/native-weak-map":43,"../internals/shared-key":63}],35:[function(e,t,n){var r=e("../internals/well-known-symbol"),i=e("../internals/iterators"),a=r("iterator"),o=Array.prototype;t.exports=function(e){return void 0!==e&&(i.Array===e||o[a]===e)}},{"../internals/iterators":40,"../internals/well-known-symbol":77}],36:[function(e,t,n){var r=e("../internals/fails"),i=/#|\.prototype\./,a=function(e,t){var n=s[o(e)];return n==c||n!=l&&("function"==typeof t?r(t):!!t)},o=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=a.data={},l=a.NATIVE="N",c=a.POLYFILL="P";t.exports=a},{"../internals/fails":22}],37:[function(e,t,n){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],38:[function(e,t,n){t.exports=!1},{}],39:[function(e,t,n){"use strict";var r,i,a,o=e("../internals/object-get-prototype-of"),s=e("../internals/create-non-enumerable-property"),l=e("../internals/has"),c=e("../internals/well-known-symbol"),u=e("../internals/is-pure"),f=c("iterator"),p=!1;[].keys&&("next"in(a=[].keys())?(i=o(o(a)))!==Object.prototype&&(r=i):p=!0),null==r&&(r={}),u||l(r,f)||s(r,f,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},{"../internals/create-non-enumerable-property":14,"../internals/has":28,"../internals/is-pure":38,"../internals/object-get-prototype-of":51,"../internals/well-known-symbol":77}],40:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{dup:29}],41:[function(e,t,n){var r=e("../internals/fails");t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},{"../internals/fails":22}],42:[function(e,t,n){var r=e("../internals/fails"),i=e("../internals/well-known-symbol"),a=e("../internals/is-pure"),o=i("iterator");t.exports=!r((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),a&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[o]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://Ñ‚ÐµÑÑ‚").host||"#%D0%B1"!==new URL("http://a#Ð±").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},{"../internals/fails":22,"../internals/is-pure":38,"../internals/well-known-symbol":77}],43:[function(e,t,n){var r=e("../internals/global"),i=e("../internals/inspect-source"),a=r.WeakMap;t.exports="function"==typeof a&&/native code/.test(i(a))},{"../internals/global":27,"../internals/inspect-source":33}],44:[function(e,t,n){"use strict";var r=e("../internals/descriptors"),i=e("../internals/fails"),a=e("../internals/object-keys"),o=e("../internals/object-get-own-property-symbols"),s=e("../internals/object-property-is-enumerable"),l=e("../internals/to-object"),c=e("../internals/indexed-object"),u=Object.assign,f=Object.defineProperty;t.exports=!u||i((function(){if(r&&1!==u({b:1},u(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=u({},e)[n]||"abcdefghijklmnopqrst"!=a(u({},t)).join("")}))?function(e,t){for(var n=l(e),i=arguments.length,u=1,f=o.f,p=s.f;i>u;)for(var h,b=c(arguments[u++]),d=f?a(b).concat(f(b)):a(b),y=d.length,g=0;y>g;)h=d[g++],r&&!p.call(b,h)||(n[h]=b[h]);return n}:u},{"../internals/descriptors":18,"../internals/fails":22,"../internals/indexed-object":32,"../internals/object-get-own-property-symbols":50,"../internals/object-keys":53,"../internals/object-property-is-enumerable":54,"../internals/to-object":72}],45:[function(e,t,n){var r,i=e("../internals/an-object"),a=e("../internals/object-define-properties"),o=e("../internals/enum-bug-keys"),s=e("../internals/hidden-keys"),l=e("../internals/html"),c=e("../internals/document-create-element"),u=e("../internals/shared-key"),f=u("IE_PROTO"),p=function(){},h=function(e){return"<script>"+e+"<\/script>"},b=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;b=r?function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):((t=c("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F);for(var n=o.length;n--;)delete b.prototype[o[n]];return b()};s[f]=!0,t.exports=Object.create||function(e,t){var n;return null!==e?(p.prototype=i(e),n=new p,p.prototype=null,n[f]=e):n=b(),void 0===t?n:a(n,t)}},{"../internals/an-object":5,"../internals/document-create-element":19,"../internals/enum-bug-keys":20,"../internals/hidden-keys":29,"../internals/html":30,"../internals/object-define-properties":46,"../internals/shared-key":63}],46:[function(e,t,n){var r=e("../internals/descriptors"),i=e("../internals/object-define-property"),a=e("../internals/an-object"),o=e("../internals/object-keys");t.exports=r?Object.defineProperties:function(e,t){a(e);for(var n,r=o(t),s=r.length,l=0;s>l;)i.f(e,n=r[l++],t[n]);return e}},{"../internals/an-object":5,"../internals/descriptors":18,"../internals/object-define-property":47,"../internals/object-keys":53}],47:[function(e,t,n){var r=e("../internals/descriptors"),i=e("../internals/ie8-dom-define"),a=e("../internals/an-object"),o=e("../internals/to-primitive"),s=Object.defineProperty;n.f=r?s:function(e,t,n){if(a(e),t=o(t,!0),a(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},{"../internals/an-object":5,"../internals/descriptors":18,"../internals/ie8-dom-define":31,"../internals/to-primitive":73}],48:[function(e,t,n){var r=e("../internals/descriptors"),i=e("../internals/object-property-is-enumerable"),a=e("../internals/create-property-descriptor"),o=e("../internals/to-indexed-object"),s=e("../internals/to-primitive"),l=e("../internals/has"),c=e("../internals/ie8-dom-define"),u=Object.getOwnPropertyDescriptor;n.f=r?u:function(e,t){if(e=o(e),t=s(t,!0),c)try{return u(e,t)}catch(e){}if(l(e,t))return a(!i.f.call(e,t),e[t])}},{"../internals/create-property-descriptor":15,"../internals/descriptors":18,"../internals/has":28,"../internals/ie8-dom-define":31,"../internals/object-property-is-enumerable":54,"../internals/to-indexed-object":69,"../internals/to-primitive":73}],49:[function(e,t,n){var r=e("../internals/object-keys-internal"),i=e("../internals/enum-bug-keys").concat("length","prototype");n.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},{"../internals/enum-bug-keys":20,"../internals/object-keys-internal":52}],50:[function(e,t,n){n.f=Object.getOwnPropertySymbols},{}],51:[function(e,t,n){var r=e("../internals/has"),i=e("../internals/to-object"),a=e("../internals/shared-key"),o=e("../internals/correct-prototype-getter"),s=a("IE_PROTO"),l=Object.prototype;t.exports=o?Object.getPrototypeOf:function(e){return e=i(e),r(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},{"../internals/correct-prototype-getter":12,"../internals/has":28,"../internals/shared-key":63,"../internals/to-object":72}],52:[function(e,t,n){var r=e("../internals/has"),i=e("../internals/to-indexed-object"),a=e("../internals/array-includes").indexOf,o=e("../internals/hidden-keys");t.exports=function(e,t){var n,s=i(e),l=0,c=[];for(n in s)!r(o,n)&&r(s,n)&&c.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~a(c,n)||c.push(n));return c}},{"../internals/array-includes":7,"../internals/has":28,"../internals/hidden-keys":29,"../internals/to-indexed-object":69}],53:[function(e,t,n){var r=e("../internals/object-keys-internal"),i=e("../internals/enum-bug-keys");t.exports=Object.keys||function(e){return r(e,i)}},{"../internals/enum-bug-keys":20,"../internals/object-keys-internal":52}],54:[function(e,t,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,a=i&&!r.call({1:2},1);n.f=a?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},{}],55:[function(e,t,n){var r=e("../internals/an-object"),i=e("../internals/a-possible-prototype");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,a){return r(n),i(a),t?e.call(n,a):n.__proto__=a,n}}():void 0)},{"../internals/a-possible-prototype":2,"../internals/an-object":5}],56:[function(e,t,n){var r=e("../internals/get-built-in"),i=e("../internals/object-get-own-property-names"),a=e("../internals/object-get-own-property-symbols"),o=e("../internals/an-object");t.exports=r("Reflect","ownKeys")||function(e){var t=i.f(o(e)),n=a.f;return n?t.concat(n(e)):t}},{"../internals/an-object":5,"../internals/get-built-in":24,"../internals/object-get-own-property-names":49,"../internals/object-get-own-property-symbols":50}],57:[function(e,t,n){var r=e("../internals/global");t.exports=r},{"../internals/global":27}],58:[function(e,t,n){var r=e("../internals/redefine");t.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},{"../internals/redefine":59}],59:[function(e,t,n){var r=e("../internals/global"),i=e("../internals/create-non-enumerable-property"),a=e("../internals/has"),o=e("../internals/set-global"),s=e("../internals/inspect-source"),l=e("../internals/internal-state"),c=l.get,u=l.enforce,f=String(String).split("String");(t.exports=function(e,t,n,s){var l=!!s&&!!s.unsafe,c=!!s&&!!s.enumerable,p=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof t||a(n,"name")||i(n,"name",t),u(n).source=f.join("string"==typeof t?t:"")),e!==r?(l?!p&&e[t]&&(c=!0):delete e[t],c?e[t]=n:i(e,t,n)):c?e[t]=n:o(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||s(this)}))},{"../internals/create-non-enumerable-property":14,"../internals/global":27,"../internals/has":28,"../internals/inspect-source":33,"../internals/internal-state":34,"../internals/set-global":61}],60:[function(e,t,n){t.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},{}],61:[function(e,t,n){var r=e("../internals/global"),i=e("../internals/create-non-enumerable-property");t.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},{"../internals/create-non-enumerable-property":14,"../internals/global":27}],62:[function(e,t,n){var r=e("../internals/object-define-property").f,i=e("../internals/has"),a=e("../internals/well-known-symbol")("toStringTag");t.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},{"../internals/has":28,"../internals/object-define-property":47,"../internals/well-known-symbol":77}],63:[function(e,t,n){var r=e("../internals/shared"),i=e("../internals/uid"),a=r("keys");t.exports=function(e){return a[e]||(a[e]=i(e))}},{"../internals/shared":65,"../internals/uid":75}],64:[function(e,t,n){var r=e("../internals/global"),i=e("../internals/set-global"),a=r["__core-js_shared__"]||i("__core-js_shared__",{});t.exports=a},{"../internals/global":27,"../internals/set-global":61}],65:[function(e,t,n){var r=e("../internals/is-pure"),i=e("../internals/shared-store");(t.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.4",mode:r?"pure":"global",copyright:"Â© 2020 Denis Pushkarev (zloirock.ru)"})},{"../internals/is-pure":38,"../internals/shared-store":64}],66:[function(e,t,n){var r=e("../internals/to-integer"),i=e("../internals/require-object-coercible"),a=function(e){return function(t,n){var a,o,s=String(i(t)),l=r(n),c=s.length;return l<0||l>=c?e?"":void 0:(a=s.charCodeAt(l))<55296||a>56319||l+1===c||(o=s.charCodeAt(l+1))<56320||o>57343?e?s.charAt(l):a:e?s.slice(l,l+2):o-56320+(a-55296<<10)+65536}};t.exports={codeAt:a(!1),charAt:a(!0)}},{"../internals/require-object-coercible":60,"../internals/to-integer":70}],67:[function(e,t,n){"use strict";var r=/[^\0-\u007E]/,i=/[.\u3002\uFF0E\uFF61]/g,a="Overflow: input needs wider integers to process",o=Math.floor,s=String.fromCharCode,l=function(e){return e+22+75*(e<26)},c=function(e,t,n){var r=0;for(e=n?o(e/700):e>>1,e+=o(e/t);e>455;r+=36)e=o(e/35);return o(r+36*e/(e+38))},u=function(e){var t,n,r=[],i=(e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var a=e.charCodeAt(n++);56320==(64512&a)?t.push(((1023&i)<<10)+(1023&a)+65536):(t.push(i),n--)}else t.push(i)}return t}(e)).length,u=128,f=0,p=72;for(t=0;t<e.length;t++)(n=e[t])<128&&r.push(s(n));var h=r.length,b=h;for(h&&r.push("-");b<i;){var d=2147483647;for(t=0;t<e.length;t++)(n=e[t])>=u&&n<d&&(d=n);var y=b+1;if(d-u>o((2147483647-f)/y))throw RangeError(a);for(f+=(d-u)*y,u=d,t=0;t<e.length;t++){if((n=e[t])<u&&++f>2147483647)throw RangeError(a);if(n==u){for(var g=f,v=36;;v+=36){var m=v<=p?1:v>=p+26?26:v-p;if(g<m)break;var w=g-m,j=36-m;r.push(s(l(m+w%j))),g=o(w/j)}r.push(s(l(g))),p=c(f,y,b==h),f=0,++b}}++f,++u}return r.join("")};t.exports=function(e){var t,n,a=[],o=e.toLowerCase().replace(i,".").split(".");for(t=0;t<o.length;t++)n=o[t],a.push(r.test(n)?"xn--"+u(n):n);return a.join(".")}},{}],68:[function(e,t,n){var r=e("../internals/to-integer"),i=Math.max,a=Math.min;t.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):a(n,t)}},{"../internals/to-integer":70}],69:[function(e,t,n){var r=e("../internals/indexed-object"),i=e("../internals/require-object-coercible");t.exports=function(e){return r(i(e))}},{"../internals/indexed-object":32,"../internals/require-object-coercible":60}],70:[function(e,t,n){var r=Math.ceil,i=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?i:r)(e)}},{}],71:[function(e,t,n){var r=e("../internals/to-integer"),i=Math.min;t.exports=function(e){return e>0?i(r(e),9007199254740991):0}},{"../internals/to-integer":70}],72:[function(e,t,n){var r=e("../internals/require-object-coercible");t.exports=function(e){return Object(r(e))}},{"../internals/require-object-coercible":60}],73:[function(e,t,n){var r=e("../internals/is-object");t.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},{"../internals/is-object":37}],74:[function(e,t,n){var r={};r[e("../internals/well-known-symbol")("toStringTag")]="z",t.exports="[object z]"===String(r)},{"../internals/well-known-symbol":77}],75:[function(e,t,n){var r=0,i=Math.random();t.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++r+i).toString(36)}},{}],76:[function(e,t,n){var r=e("../internals/native-symbol");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},{"../internals/native-symbol":41}],77:[function(e,t,n){var r=e("../internals/global"),i=e("../internals/shared"),a=e("../internals/has"),o=e("../internals/uid"),s=e("../internals/native-symbol"),l=e("../internals/use-symbol-as-uid"),c=i("wks"),u=r.Symbol,f=l?u:u&&u.withoutSetter||o;t.exports=function(e){return a(c,e)||(s&&a(u,e)?c[e]=u[e]:c[e]=f("Symbol."+e)),c[e]}},{"../internals/global":27,"../internals/has":28,"../internals/native-symbol":41,"../internals/shared":65,"../internals/uid":75,"../internals/use-symbol-as-uid":76}],78:[function(e,t,n){"use strict";var r=e("../internals/to-indexed-object"),i=e("../internals/add-to-unscopables"),a=e("../internals/iterators"),o=e("../internals/internal-state"),s=e("../internals/define-iterator"),l=o.set,c=o.getterFor("Array Iterator");t.exports=s(Array,"Array",(function(e,t){l(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=c(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),a.Arguments=a.Array,i("keys"),i("values"),i("entries")},{"../internals/add-to-unscopables":3,"../internals/define-iterator":17,"../internals/internal-state":34,"../internals/iterators":40,"../internals/to-indexed-object":69}],79:[function(e,t,n){"use strict";var r=e("../internals/string-multibyte").charAt,i=e("../internals/internal-state"),a=e("../internals/define-iterator"),o=i.set,s=i.getterFor("String Iterator");a(String,"String",(function(e){o(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=s(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})}))},{"../internals/define-iterator":17,"../internals/internal-state":34,"../internals/string-multibyte":66}],80:[function(e,t,n){"use strict";e("../modules/es.array.iterator");var r=e("../internals/export"),i=e("../internals/get-built-in"),a=e("../internals/native-url"),o=e("../internals/redefine"),s=e("../internals/redefine-all"),l=e("../internals/set-to-string-tag"),c=e("../internals/create-iterator-constructor"),u=e("../internals/internal-state"),f=e("../internals/an-instance"),p=e("../internals/has"),h=e("../internals/function-bind-context"),b=e("../internals/classof"),d=e("../internals/an-object"),y=e("../internals/is-object"),g=e("../internals/object-create"),v=e("../internals/create-property-descriptor"),m=e("../internals/get-iterator"),w=e("../internals/get-iterator-method"),j=e("../internals/well-known-symbol"),x=i("fetch"),k=i("Headers"),S=j("iterator"),A=u.set,O=u.getterFor("URLSearchParams"),R=u.getterFor("URLSearchParamsIterator"),L=/\+/g,U=Array(4),P=function(e){return U[e-1]||(U[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},I=function(e){try{return decodeURIComponent(e)}catch(t){return e}},q=function(e){var t=e.replace(L," "),n=4;try{return decodeURIComponent(t)}catch(e){for(;n;)t=t.replace(P(n--),I);return t}},E=/[!'()~]|%20/g,_={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},T=function(e){return _[e]},B=function(e){return encodeURIComponent(e).replace(E,T)},F=function(e,t){if(t)for(var n,r,i=t.split("&"),a=0;a<i.length;)(n=i[a++]).length&&(r=n.split("="),e.push({key:q(r.shift()),value:q(r.join("="))}))},C=function(e){this.entries.length=0,F(this.entries,e)},M=function(e,t){if(e<t)throw TypeError("Not enough arguments")},N=c((function(e,t){A(this,{type:"URLSearchParamsIterator",iterator:m(O(e).entries),kind:t})}),"Iterator",(function(){var e=R(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n})),D=function(){f(this,D,"URLSearchParams");var e,t,n,r,i,a,o,s,l,c=arguments.length>0?arguments[0]:void 0,u=this,h=[];if(A(u,{type:"URLSearchParams",entries:h,updateURL:function(){},updateSearchParams:C}),void 0!==c)if(y(c))if("function"==typeof(e=w(c)))for(n=(t=e.call(c)).next;!(r=n.call(t)).done;){if((o=(a=(i=m(d(r.value))).next).call(i)).done||(s=a.call(i)).done||!a.call(i).done)throw TypeError("Expected sequence with length 2");h.push({key:o.value+"",value:s.value+""})}else for(l in c)p(c,l)&&h.push({key:l,value:c[l]+""});else F(h,"string"==typeof c?"?"===c.charAt(0)?c.slice(1):c:c+"")},z=D.prototype;s(z,{append:function(e,t){M(arguments.length,2);var n=O(this);n.entries.push({key:e+"",value:t+""}),n.updateURL()},delete:function(e){M(arguments.length,1);for(var t=O(this),n=t.entries,r=e+"",i=0;i<n.length;)n[i].key===r?n.splice(i,1):i++;t.updateURL()},get:function(e){M(arguments.length,1);for(var t=O(this).entries,n=e+"",r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){M(arguments.length,1);for(var t=O(this).entries,n=e+"",r=[],i=0;i<t.length;i++)t[i].key===n&&r.push(t[i].value);return r},has:function(e){M(arguments.length,1);for(var t=O(this).entries,n=e+"",r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){M(arguments.length,1);for(var n,r=O(this),i=r.entries,a=!1,o=e+"",s=t+"",l=0;l<i.length;l++)(n=i[l]).key===o&&(a?i.splice(l--,1):(a=!0,n.value=s));a||i.push({key:o,value:s}),r.updateURL()},sort:function(){var e,t,n,r=O(this),i=r.entries,a=i.slice();for(i.length=0,n=0;n<a.length;n++){for(e=a[n],t=0;t<n;t++)if(i[t].key>e.key){i.splice(t,0,e);break}t===n&&i.push(e)}r.updateURL()},forEach:function(e){for(var t,n=O(this).entries,r=h(e,arguments.length>1?arguments[1]:void 0,3),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new N(this,"keys")},values:function(){return new N(this,"values")},entries:function(){return new N(this,"entries")}},{enumerable:!0}),o(z,S,z.entries),o(z,"toString",(function(){for(var e,t=O(this).entries,n=[],r=0;r<t.length;)e=t[r++],n.push(B(e.key)+"="+B(e.value));return n.join("&")}),{enumerable:!0}),l(D,"URLSearchParams"),r({global:!0,forced:!a},{URLSearchParams:D}),a||"function"!=typeof x||"function"!=typeof k||r({global:!0,enumerable:!0,forced:!0},{fetch:function(e){var t,n,r,i=[e];return arguments.length>1&&(t=arguments[1],y(t)&&(n=t.body,"URLSearchParams"===b(n)&&((r=t.headers?new k(t.headers):new k).has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=g(t,{body:v(0,String(n)),headers:v(0,r)}))),i.push(t)),x.apply(this,i)}}),t.exports={URLSearchParams:D,getState:O}},{"../internals/an-instance":4,"../internals/an-object":5,"../internals/classof":10,"../internals/create-iterator-constructor":13,"../internals/create-property-descriptor":15,"../internals/export":21,"../internals/function-bind-context":23,"../internals/get-built-in":24,"../internals/get-iterator":26,"../internals/get-iterator-method":25,"../internals/has":28,"../internals/internal-state":34,"../internals/is-object":37,"../internals/native-url":42,"../internals/object-create":45,"../internals/redefine":59,"../internals/redefine-all":58,"../internals/set-to-string-tag":62,"../internals/well-known-symbol":77,"../modules/es.array.iterator":78}],81:[function(e,t,n){"use strict";e("../modules/es.string.iterator");var r,i=e("../internals/export"),a=e("../internals/descriptors"),o=e("../internals/native-url"),s=e("../internals/global"),l=e("../internals/object-define-properties"),c=e("../internals/redefine"),u=e("../internals/an-instance"),f=e("../internals/has"),p=e("../internals/object-assign"),h=e("../internals/array-from"),b=e("../internals/string-multibyte").codeAt,d=e("../internals/string-punycode-to-ascii"),y=e("../internals/set-to-string-tag"),g=e("../modules/web.url-search-params"),v=e("../internals/internal-state"),m=s.URL,w=g.URLSearchParams,j=g.getState,x=v.set,k=v.getterFor("URL"),S=Math.floor,A=Math.pow,O=/[A-Za-z]/,R=/[\d+\-.A-Za-z]/,L=/\d/,U=/^(0x|0X)/,P=/^[0-7]+$/,I=/^\d+$/,q=/^[\dA-Fa-f]+$/,E=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,_=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,T=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,B=/[\u0009\u000A\u000D]/g,F=function(e,t){var n,r,i;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return"Invalid host";if(!(n=M(t.slice(1,-1))))return"Invalid host";e.host=n}else if(Y(e)){if(t=d(t),E.test(t))return"Invalid host";if(null===(n=C(t)))return"Invalid host";e.host=n}else{if(_.test(t))return"Invalid host";for(n="",r=h(t),i=0;i<r.length;i++)n+=$(r[i],D);e.host=n}},C=function(e){var t,n,r,i,a,o,s,l=e.split(".");if(l.length&&""==l[l.length-1]&&l.pop(),(t=l.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=l[r]))return e;if(a=10,i.length>1&&"0"==i.charAt(0)&&(a=U.test(i)?16:8,i=i.slice(8==a?1:2)),""===i)o=0;else{if(!(10==a?I:8==a?P:q).test(i))return e;o=parseInt(i,a)}n.push(o)}for(r=0;r<t;r++)if(o=n[r],r==t-1){if(o>=A(256,5-t))return null}else if(o>255)return null;for(s=n.pop(),r=0;r<n.length;r++)s+=n[r]*A(256,3-r);return s},M=function(e){var t,n,r,i,a,o,s,l=[0,0,0,0,0,0,0,0],c=0,u=null,f=0,p=function(){return e.charAt(f)};if(":"==p()){if(":"!=e.charAt(1))return;f+=2,u=++c}for(;p();){if(8==c)return;if(":"!=p()){for(t=n=0;n<4&&q.test(p());)t=16*t+parseInt(p(),16),f++,n++;if("."==p()){if(0==n)return;if(f-=n,c>6)return;for(r=0;p();){if(i=null,r>0){if(!("."==p()&&r<4))return;f++}if(!L.test(p()))return;for(;L.test(p());){if(a=parseInt(p(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;f++}l[c]=256*l[c]+i,2!=++r&&4!=r||c++}if(4!=r)return;break}if(":"==p()){if(f++,!p())return}else if(p())return;l[c++]=t}else{if(null!==u)return;f++,u=++c}}if(null!==u)for(o=c-u,c=7;0!=c&&o>0;)s=l[c],l[c--]=l[u+o-1],l[u+--o]=s;else if(8!=c)return;return l},N=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)t.unshift(e%256),e=S(e/256);return t.join(".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,a=0;a<8;a++)0!==e[a]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=a),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=e[n].toString(16),n<7&&(t+=":")));return"["+t+"]"}return e},D={},z=p({},D,{" ":1,'"':1,"<":1,">":1,"`":1}),G=p({},z,{"#":1,"?":1,"{":1,"}":1}),W=p({},G,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),$=function(e,t){var n=b(e,0);return n>32&&n<127&&!f(t,e)?e:encodeURIComponent(e)},J={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Y=function(e){return f(J,e.scheme)},X=function(e){return""!=e.username||""!=e.password},Z=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},H=function(e,t){var n;return 2==e.length&&O.test(e.charAt(0))&&(":"==(n=e.charAt(1))||!t&&"|"==n)},K=function(e){var t;return e.length>1&&H(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},V=function(e){var t=e.path,n=t.length;!n||"file"==e.scheme&&1==n&&H(t[0],!0)||t.pop()},Q=function(e){return"."===e||"%2e"===e.toLowerCase()},ee={},te={},ne={},re={},ie={},ae={},oe={},se={},le={},ce={},ue={},fe={},pe={},he={},be={},de={},ye={},ge={},ve={},me={},we={},je=function(e,t,n,i){var a,o,s,l,c,u=n||ee,p=0,b="",d=!1,y=!1,g=!1;for(n||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(T,"")),t=t.replace(B,""),a=h(t);p<=a.length;){switch(o=a[p],u){case ee:if(!o||!O.test(o)){if(n)return"Invalid scheme";u=ne;continue}b+=o.toLowerCase(),u=te;break;case te:if(o&&(R.test(o)||"+"==o||"-"==o||"."==o))b+=o.toLowerCase();else{if(":"!=o){if(n)return"Invalid scheme";b="",u=ne,p=0;continue}if(n&&(Y(e)!=f(J,b)||"file"==b&&(X(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=b,n)return void(Y(e)&&J[e.scheme]==e.port&&(e.port=null));b="","file"==e.scheme?u=he:Y(e)&&i&&i.scheme==e.scheme?u=re:Y(e)?u=se:"/"==a[p+1]?(u=ie,p++):(e.cannotBeABaseURL=!0,e.path.push(""),u=ve)}break;case ne:if(!i||i.cannotBeABaseURL&&"#"!=o)return"Invalid scheme";if(i.cannotBeABaseURL&&"#"==o){e.scheme=i.scheme,e.path=i.path.slice(),e.query=i.query,e.fragment="",e.cannotBeABaseURL=!0,u=we;break}u="file"==i.scheme?he:ae;continue;case re:if("/"!=o||"/"!=a[p+1]){u=ae;continue}u=le,p++;break;case ie:if("/"==o){u=ce;break}u=ge;continue;case ae:if(e.scheme=i.scheme,o==r)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query;else if("/"==o||"\\"==o&&Y(e))u=oe;else if("?"==o)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query="",u=me;else{if("#"!=o){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.path.pop(),u=ge;continue}e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query,e.fragment="",u=we}break;case oe:if(!Y(e)||"/"!=o&&"\\"!=o){if("/"!=o){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,u=ge;continue}u=ce}else u=le;break;case se:if(u=le,"/"!=o||"/"!=b.charAt(p+1))continue;p++;break;case le:if("/"!=o&&"\\"!=o){u=ce;continue}break;case ce:if("@"==o){d&&(b="%40"+b),d=!0,s=h(b);for(var v=0;v<s.length;v++){var m=s[v];if(":"!=m||g){var w=$(m,W);g?e.password+=w:e.username+=w}else g=!0}b=""}else if(o==r||"/"==o||"?"==o||"#"==o||"\\"==o&&Y(e)){if(d&&""==b)return"Invalid authority";p-=h(b).length+1,b="",u=ue}else b+=o;break;case ue:case fe:if(n&&"file"==e.scheme){u=de;continue}if(":"!=o||y){if(o==r||"/"==o||"?"==o||"#"==o||"\\"==o&&Y(e)){if(Y(e)&&""==b)return"Invalid host";if(n&&""==b&&(X(e)||null!==e.port))return;if(l=F(e,b))return l;if(b="",u=ye,n)return;continue}"["==o?y=!0:"]"==o&&(y=!1),b+=o}else{if(""==b)return"Invalid host";if(l=F(e,b))return l;if(b="",u=pe,n==fe)return}break;case pe:if(!L.test(o)){if(o==r||"/"==o||"?"==o||"#"==o||"\\"==o&&Y(e)||n){if(""!=b){var j=parseInt(b,10);if(j>65535)return"Invalid port";e.port=Y(e)&&j===J[e.scheme]?null:j,b=""}if(n)return;u=ye;continue}return"Invalid port"}b+=o;break;case he:if(e.scheme="file","/"==o||"\\"==o)u=be;else{if(!i||"file"!=i.scheme){u=ge;continue}if(o==r)e.host=i.host,e.path=i.path.slice(),e.query=i.query;else if("?"==o)e.host=i.host,e.path=i.path.slice(),e.query="",u=me;else{if("#"!=o){K(a.slice(p).join(""))||(e.host=i.host,e.path=i.path.slice(),V(e)),u=ge;continue}e.host=i.host,e.path=i.path.slice(),e.query=i.query,e.fragment="",u=we}}break;case be:if("/"==o||"\\"==o){u=de;break}i&&"file"==i.scheme&&!K(a.slice(p).join(""))&&(H(i.path[0],!0)?e.path.push(i.path[0]):e.host=i.host),u=ge;continue;case de:if(o==r||"/"==o||"\\"==o||"?"==o||"#"==o){if(!n&&H(b))u=ge;else if(""==b){if(e.host="",n)return;u=ye}else{if(l=F(e,b))return l;if("localhost"==e.host&&(e.host=""),n)return;b="",u=ye}continue}b+=o;break;case ye:if(Y(e)){if(u=ge,"/"!=o&&"\\"!=o)continue}else if(n||"?"!=o)if(n||"#"!=o){if(o!=r&&(u=ge,"/"!=o))continue}else e.fragment="",u=we;else e.query="",u=me;break;case ge:if(o==r||"/"==o||"\\"==o&&Y(e)||!n&&("?"==o||"#"==o)){if(".."===(c=(c=b).toLowerCase())||"%2e."===c||".%2e"===c||"%2e%2e"===c?(V(e),"/"==o||"\\"==o&&Y(e)||e.path.push("")):Q(b)?"/"==o||"\\"==o&&Y(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&H(b)&&(e.host&&(e.host=""),b=b.charAt(0)+":"),e.path.push(b)),b="","file"==e.scheme&&(o==r||"?"==o||"#"==o))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==o?(e.query="",u=me):"#"==o&&(e.fragment="",u=we)}else b+=$(o,G);break;case ve:"?"==o?(e.query="",u=me):"#"==o?(e.fragment="",u=we):o!=r&&(e.path[0]+=$(o,D));break;case me:n||"#"!=o?o!=r&&("'"==o&&Y(e)?e.query+="%27":e.query+="#"==o?"%23":$(o,D)):(e.fragment="",u=we);break;case we:o!=r&&(e.fragment+=$(o,z))}p++}},xe=function(e){var t,n,r=u(this,xe,"URL"),i=arguments.length>1?arguments[1]:void 0,o=String(e),s=x(r,{type:"URL"});if(void 0!==i)if(i instanceof xe)t=k(i);else if(n=je(t={},String(i)))throw TypeError(n);if(n=je(s,o,null,t))throw TypeError(n);var l=s.searchParams=new w,c=j(l);c.updateSearchParams(s.query),c.updateURL=function(){s.query=String(l)||null},a||(r.href=Se.call(r),r.origin=Ae.call(r),r.protocol=Oe.call(r),r.username=Re.call(r),r.password=Le.call(r),r.host=Ue.call(r),r.hostname=Pe.call(r),r.port=Ie.call(r),r.pathname=qe.call(r),r.search=Ee.call(r),r.searchParams=_e.call(r),r.hash=Te.call(r))},ke=xe.prototype,Se=function(){var e=k(this),t=e.scheme,n=e.username,r=e.password,i=e.host,a=e.port,o=e.path,s=e.query,l=e.fragment,c=t+":";return null!==i?(c+="//",X(e)&&(c+=n+(r?":"+r:"")+"@"),c+=N(i),null!==a&&(c+=":"+a)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?o[0]:o.length?"/"+o.join("/"):"",null!==s&&(c+="?"+s),null!==l&&(c+="#"+l),c},Ae=function(){var e=k(this),t=e.scheme,n=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&Y(e)?t+"://"+N(e.host)+(null!==n?":"+n:""):"null"},Oe=function(){return k(this).scheme+":"},Re=function(){return k(this).username},Le=function(){return k(this).password},Ue=function(){var e=k(this),t=e.host,n=e.port;return null===t?"":null===n?N(t):N(t)+":"+n},Pe=function(){var e=k(this).host;return null===e?"":N(e)},Ie=function(){var e=k(this).port;return null===e?"":String(e)},qe=function(){var e=k(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Ee=function(){var e=k(this).query;return e?"?"+e:""},_e=function(){return k(this).searchParams},Te=function(){var e=k(this).fragment;return e?"#"+e:""},Be=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(a&&l(ke,{href:Be(Se,(function(e){var t=k(this),n=String(e),r=je(t,n);if(r)throw TypeError(r);j(t.searchParams).updateSearchParams(t.query)})),origin:Be(Ae),protocol:Be(Oe,(function(e){var t=k(this);je(t,String(e)+":",ee)})),username:Be(Re,(function(e){var t=k(this),n=h(String(e));if(!Z(t)){t.username="";for(var r=0;r<n.length;r++)t.username+=$(n[r],W)}})),password:Be(Le,(function(e){var t=k(this),n=h(String(e));if(!Z(t)){t.password="";for(var r=0;r<n.length;r++)t.password+=$(n[r],W)}})),host:Be(Ue,(function(e){var t=k(this);t.cannotBeABaseURL||je(t,String(e),ue)})),hostname:Be(Pe,(function(e){var t=k(this);t.cannotBeABaseURL||je(t,String(e),fe)})),port:Be(Ie,(function(e){var t=k(this);Z(t)||(""==(e=String(e))?t.port=null:je(t,e,pe))})),pathname:Be(qe,(function(e){var t=k(this);t.cannotBeABaseURL||(t.path=[],je(t,e+"",ye))})),search:Be(Ee,(function(e){var t=k(this);""==(e=String(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",je(t,e,me)),j(t.searchParams).updateSearchParams(t.query)})),searchParams:Be(_e),hash:Be(Te,(function(e){var t=k(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",je(t,e,we)):t.fragment=null}))}),c(ke,"toJSON",(function(){return Se.call(this)}),{enumerable:!0}),c(ke,"toString",(function(){return Se.call(this)}),{enumerable:!0}),m){var Fe=m.createObjectURL,Ce=m.revokeObjectURL;Fe&&c(xe,"createObjectURL",(function(e){return Fe.apply(m,arguments)})),Ce&&c(xe,"revokeObjectURL",(function(e){return Ce.apply(m,arguments)}))}y(xe,"URL"),i({global:!0,forced:!o,sham:!a},{URL:xe})},{"../internals/an-instance":4,"../internals/array-from":6,"../internals/descriptors":18,"../internals/export":21,"../internals/global":27,"../internals/has":28,"../internals/internal-state":34,"../internals/native-url":42,"../internals/object-assign":44,"../internals/object-define-properties":46,"../internals/redefine":59,"../internals/set-to-string-tag":62,"../internals/string-multibyte":66,"../internals/string-punycode-to-ascii":67,"../modules/es.string.iterator":79,"../modules/web.url-search-params":80}],82:[function(e,t,n){"use strict";e("../internals/export")({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},{"../internals/export":21}],83:[function(e,t,n){e("../modules/web.url"),e("../modules/web.url.to-json"),e("../modules/web.url-search-params");var r=e("../internals/path");t.exports=r.URL},{"../internals/path":57,"../modules/web.url":81,"../modules/web.url-search-params":80,"../modules/web.url.to-json":82}]},{},[83]);                   dist/vendor/wp-polyfill.js                                                                          0000644                 00000324200 15212564037 0011626 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * core-js 3.39.0
 * Â© 2014-2024 Denis Pushkarev (zloirock.ru)
 * license: https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE
 * source: https://github.com/zloirock/core-js
 */
!function (undefined) { 'use strict'; /******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	var __webpack_require__ = function (moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(1);
__webpack_require__(53);
__webpack_require__(81);
__webpack_require__(82);
__webpack_require__(93);
__webpack_require__(94);
__webpack_require__(99);
__webpack_require__(100);
__webpack_require__(110);
__webpack_require__(120);
__webpack_require__(122);
__webpack_require__(123);
__webpack_require__(124);
module.exports = __webpack_require__(125);


/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var DESCRIPTORS = __webpack_require__(2);
var defineBuiltInAccessor = __webpack_require__(4);
var isDetached = __webpack_require__(48);

var ArrayBufferPrototype = ArrayBuffer.prototype;

// `ArrayBuffer.prototype.detached` getter
// https://tc39.es/ecma262/#sec-get-arraybuffer.prototype.detached
if (DESCRIPTORS && !('detached' in ArrayBufferPrototype)) {
  defineBuiltInAccessor(ArrayBufferPrototype, 'detached', {
    configurable: true,
    get: function detached() {
      return isDetached(this);
    }
  });
}


/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fails = __webpack_require__(3);

// Detect IE8's incomplete defineProperty implementation
module.exports = !fails(function () {
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
});


/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

module.exports = function (exec) {
  try {
    return !!exec();
  } catch (error) {
    return true;
  }
};


/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var makeBuiltIn = __webpack_require__(5);
var defineProperty = __webpack_require__(23);

module.exports = function (target, name, descriptor) {
  if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
  if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
  return defineProperty.f(target, name, descriptor);
};


/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var uncurryThis = __webpack_require__(6);
var fails = __webpack_require__(3);
var isCallable = __webpack_require__(8);
var hasOwn = __webpack_require__(9);
var DESCRIPTORS = __webpack_require__(2);
var CONFIGURABLE_FUNCTION_NAME = __webpack_require__(13).CONFIGURABLE;
var inspectSource = __webpack_require__(14);
var InternalStateModule = __webpack_require__(19);

var enforceInternalState = InternalStateModule.enforce;
var getInternalState = InternalStateModule.get;
var $String = String;
// eslint-disable-next-line es/no-object-defineproperty -- safe
var defineProperty = Object.defineProperty;
var stringSlice = uncurryThis(''.slice);
var replace = uncurryThis(''.replace);
var join = uncurryThis([].join);

var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {
  return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
});

var TEMPLATE = String(String).split('String');

var makeBuiltIn = module.exports = function (value, name, options) {
  if (stringSlice($String(name), 0, 7) === 'Symbol(') {
    name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
  }
  if (options && options.getter) name = 'get ' + name;
  if (options && options.setter) name = 'set ' + name;
  if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
    if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });
    else value.name = name;
  }
  if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {
    defineProperty(value, 'length', { value: options.arity });
  }
  try {
    if (options && hasOwn(options, 'constructor') && options.constructor) {
      if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });
    // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
    } else if (value.prototype) value.prototype = undefined;
  } catch (error) { /* empty */ }
  var state = enforceInternalState(value);
  if (!hasOwn(state, 'source')) {
    state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
  } return value;
};

// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
// eslint-disable-next-line no-extend-native -- required
Function.prototype.toString = makeBuiltIn(function toString() {
  return isCallable(this) && getInternalState(this).source || inspectSource(this);
}, 'toString');


/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var NATIVE_BIND = __webpack_require__(7);

var FunctionPrototype = Function.prototype;
var call = FunctionPrototype.call;
var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);

module.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
  return function () {
    return call.apply(fn, arguments);
  };
};


/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fails = __webpack_require__(3);

module.exports = !fails(function () {
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
  var test = (function () { /* empty */ }).bind();
  // eslint-disable-next-line no-prototype-builtins -- safe
  return typeof test != 'function' || test.hasOwnProperty('prototype');
});


/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
var documentAll = typeof document == 'object' && document.all;

// `IsCallable` abstract operation
// https://tc39.es/ecma262/#sec-iscallable
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
module.exports = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
  return typeof argument == 'function' || argument === documentAll;
} : function (argument) {
  return typeof argument == 'function';
};


/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var uncurryThis = __webpack_require__(6);
var toObject = __webpack_require__(10);

var hasOwnProperty = uncurryThis({}.hasOwnProperty);

// `HasOwnProperty` abstract operation
// https://tc39.es/ecma262/#sec-hasownproperty
// eslint-disable-next-line es/no-object-hasown -- safe
module.exports = Object.hasOwn || function hasOwn(it, key) {
  return hasOwnProperty(toObject(it), key);
};


/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var requireObjectCoercible = __webpack_require__(11);

var $Object = Object;

// `ToObject` abstract operation
// https://tc39.es/ecma262/#sec-toobject
module.exports = function (argument) {
  return $Object(requireObjectCoercible(argument));
};


/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var isNullOrUndefined = __webpack_require__(12);

var $TypeError = TypeError;

// `RequireObjectCoercible` abstract operation
// https://tc39.es/ecma262/#sec-requireobjectcoercible
module.exports = function (it) {
  if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it);
  return it;
};


/***/ }),
/* 12 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// we can't use just `it == null` since of `document.all` special case
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
module.exports = function (it) {
  return it === null || it === undefined;
};


/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var DESCRIPTORS = __webpack_require__(2);
var hasOwn = __webpack_require__(9);

var FunctionPrototype = Function.prototype;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;

var EXISTS = hasOwn(FunctionPrototype, 'name');
// additional protection from minified / mangled / dropped function names
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));

module.exports = {
  EXISTS: EXISTS,
  PROPER: PROPER,
  CONFIGURABLE: CONFIGURABLE
};


/***/ }),
/* 14 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var uncurryThis = __webpack_require__(6);
var isCallable = __webpack_require__(8);
var store = __webpack_require__(15);

var functionToString = uncurryThis(Function.toString);

// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
if (!isCallable(store.inspectSource)) {
  store.inspectSource = function (it) {
    return functionToString(it);
  };
}

module.exports = store.inspectSource;


/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var IS_PURE = __webpack_require__(16);
var globalThis = __webpack_require__(17);
var defineGlobalProperty = __webpack_require__(18);

var SHARED = '__core-js_shared__';
var store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});

(store.versions || (store.versions = [])).push({
  version: '3.39.0',
  mode: IS_PURE ? 'pure' : 'global',
  copyright: 'Â© 2014-2024 Denis Pushkarev (zloirock.ru)',
  license: 'https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE',
  source: 'https://github.com/zloirock/core-js'
});


/***/ }),
/* 16 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

module.exports = false;


/***/ }),
/* 17 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var check = function (it) {
  return it && it.Math === Math && it;
};

// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
module.exports =
  // eslint-disable-next-line es/no-global-this -- safe
  check(typeof globalThis == 'object' && globalThis) ||
  check(typeof window == 'object' && window) ||
  // eslint-disable-next-line no-restricted-globals -- safe
  check(typeof self == 'object' && self) ||
  check(typeof global == 'object' && global) ||
  check(typeof this == 'object' && this) ||
  // eslint-disable-next-line no-new-func -- fallback
  (function () { return this; })() || Function('return this')();


/***/ }),
/* 18 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var globalThis = __webpack_require__(17);

// eslint-disable-next-line es/no-object-defineproperty -- safe
var defineProperty = Object.defineProperty;

module.exports = function (key, value) {
  try {
    defineProperty(globalThis, key, { value: value, configurable: true, writable: true });
  } catch (error) {
    globalThis[key] = value;
  } return value;
};


/***/ }),
/* 19 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var NATIVE_WEAK_MAP = __webpack_require__(20);
var globalThis = __webpack_require__(17);
var isObject = __webpack_require__(21);
var createNonEnumerableProperty = __webpack_require__(22);
var hasOwn = __webpack_require__(9);
var shared = __webpack_require__(15);
var sharedKey = __webpack_require__(46);
var hiddenKeys = __webpack_require__(47);

var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
var TypeError = globalThis.TypeError;
var WeakMap = globalThis.WeakMap;
var set, get, has;

var enforce = function (it) {
  return has(it) ? get(it) : set(it, {});
};

var getterFor = function (TYPE) {
  return function (it) {
    var state;
    if (!isObject(it) || (state = get(it)).type !== TYPE) {
      throw new TypeError('Incompatible receiver, ' + TYPE + ' required');
    } return state;
  };
};

if (NATIVE_WEAK_MAP || shared.state) {
  var store = shared.state || (shared.state = new WeakMap());
  /* eslint-disable no-self-assign -- prototype methods protection */
  store.get = store.get;
  store.has = store.has;
  store.set = store.set;
  /* eslint-enable no-self-assign -- prototype methods protection */
  set = function (it, metadata) {
    if (store.has(it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
    metadata.facade = it;
    store.set(it, metadata);
    return metadata;
  };
  get = function (it) {
    return store.get(it) || {};
  };
  has = function (it) {
    return store.has(it);
  };
} else {
  var STATE = sharedKey('state');
  hiddenKeys[STATE] = true;
  set = function (it, metadata) {
    if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
    metadata.facade = it;
    createNonEnumerableProperty(it, STATE, metadata);
    return metadata;
  };
  get = function (it) {
    return hasOwn(it, STATE) ? it[STATE] : {};
  };
  has = function (it) {
    return hasOwn(it, STATE);
  };
}

module.exports = {
  set: set,
  get: get,
  has: has,
  enforce: enforce,
  getterFor: getterFor
};


/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var globalThis = __webpack_require__(17);
var isCallable = __webpack_require__(8);

var WeakMap = globalThis.WeakMap;

module.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));


/***/ }),
/* 21 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var isCallable = __webpack_require__(8);

module.exports = function (it) {
  return typeof it == 'object' ? it !== null : isCallable(it);
};


/***/ }),
/* 22 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var DESCRIPTORS = __webpack_require__(2);
var definePropertyModule = __webpack_require__(23);
var createPropertyDescriptor = __webpack_require__(45);

module.exports = DESCRIPTORS ? function (object, key, value) {
  return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
} : function (object, key, value) {
  object[key] = value;
  return object;
};


/***/ }),
/* 23 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var DESCRIPTORS = __webpack_require__(2);
var IE8_DOM_DEFINE = __webpack_require__(24);
var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(26);
var anObject = __webpack_require__(27);
var toPropertyKey = __webpack_require__(28);

var $TypeError = TypeError;
// eslint-disable-next-line es/no-object-defineproperty -- safe
var $defineProperty = Object.defineProperty;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
var ENUMERABLE = 'enumerable';
var CONFIGURABLE = 'configurable';
var WRITABLE = 'writable';

// `Object.defineProperty` method
// https://tc39.es/ecma262/#sec-object.defineproperty
exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
  anObject(O);
  P = toPropertyKey(P);
  anObject(Attributes);
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
    var current = $getOwnPropertyDescriptor(O, P);
    if (current && current[WRITABLE]) {
      O[P] = Attributes.value;
      Attributes = {
        configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
        enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
        writable: false
      };
    }
  } return $defineProperty(O, P, Attributes);
} : $defineProperty : function defineProperty(O, P, Attributes) {
  anObject(O);
  P = toPropertyKey(P);
  anObject(Attributes);
  if (IE8_DOM_DEFINE) try {
    return $defineProperty(O, P, Attributes);
  } catch (error) { /* empty */ }
  if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported');
  if ('value' in Attributes) O[P] = Attributes.value;
  return O;
};


/***/ }),
/* 24 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var DESCRIPTORS = __webpack_require__(2);
var fails = __webpack_require__(3);
var createElement = __webpack_require__(25);

// Thanks to IE8 for its funny defineProperty
module.exports = !DESCRIPTORS && !fails(function () {
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  return Object.defineProperty(createElement('div'), 'a', {
    get: function () { return 7; }
  }).a !== 7;
});


/***/ }),
/* 25 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var globalThis = __webpack_require__(17);
var isObject = __webpack_require__(21);

var document = globalThis.document;
// typeof document.createElement is 'object' in old IE
var EXISTS = isObject(document) && isObject(document.createElement);

module.exports = function (it) {
  return EXISTS ? document.createElement(it) : {};
};


/***/ }),
/* 26 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var DESCRIPTORS = __webpack_require__(2);
var fails = __webpack_require__(3);

// V8 ~ Chrome 36-
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
module.exports = DESCRIPTORS && fails(function () {
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
    value: 42,
    writable: false
  }).prototype !== 42;
});


/***/ }),
/* 27 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var isObject = __webpack_require__(21);

var $String = String;
var $TypeError = TypeError;

// `Assert: Type(argument) is Object`
module.exports = function (argument) {
  if (isObject(argument)) return argument;
  throw new $TypeError($String(argument) + ' is not an object');
};


/***/ }),
/* 28 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var toPrimitive = __webpack_require__(29);
var isSymbol = __webpack_require__(31);

// `ToPropertyKey` abstract operation
// https://tc39.es/ecma262/#sec-topropertykey
module.exports = function (argument) {
  var key = toPrimitive(argument, 'string');
  return isSymbol(key) ? key : key + '';
};


/***/ }),
/* 29 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var call = __webpack_require__(30);
var isObject = __webpack_require__(21);
var isSymbol = __webpack_require__(31);
var getMethod = __webpack_require__(38);
var ordinaryToPrimitive = __webpack_require__(41);
var wellKnownSymbol = __webpack_require__(42);

var $TypeError = TypeError;
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');

// `ToPrimitive` abstract operation
// https://tc39.es/ecma262/#sec-toprimitive
module.exports = function (input, pref) {
  if (!isObject(input) || isSymbol(input)) return input;
  var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  var result;
  if (exoticToPrim) {
    if (pref === undefined) pref = 'default';
    result = call(exoticToPrim, input, pref);
    if (!isObject(result) || isSymbol(result)) return result;
    throw new $TypeError("Can't convert object to primitive value");
  }
  if (pref === undefined) pref = 'number';
  return ordinaryToPrimitive(input, pref);
};


/***/ }),
/* 30 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var NATIVE_BIND = __webpack_require__(7);

var call = Function.prototype.call;

module.exports = NATIVE_BIND ? call.bind(call) : function () {
  return call.apply(call, arguments);
};


/***/ }),
/* 31 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var getBuiltIn = __webpack_require__(32);
var isCallable = __webpack_require__(8);
var isPrototypeOf = __webpack_require__(33);
var USE_SYMBOL_AS_UID = __webpack_require__(34);

var $Object = Object;

module.exports = USE_SYMBOL_AS_UID ? function (it) {
  return typeof it == 'symbol';
} : function (it) {
  var $Symbol = getBuiltIn('Symbol');
  return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
};


/***/ }),
/* 32 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var globalThis = __webpack_require__(17);
var isCallable = __webpack_require__(8);

var aFunction = function (argument) {
  return isCallable(argument) ? argument : undefined;
};

module.exports = function (namespace, method) {
  return arguments.length < 2 ? aFunction(globalThis[namespace]) : globalThis[namespace] && globalThis[namespace][method];
};


/***/ }),
/* 33 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var uncurryThis = __webpack_require__(6);

module.exports = uncurryThis({}.isPrototypeOf);


/***/ }),
/* 34 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

/* eslint-disable es/no-symbol -- required for testing */
var NATIVE_SYMBOL = __webpack_require__(35);

module.exports = NATIVE_SYMBOL &&
  !Symbol.sham &&
  typeof Symbol.iterator == 'symbol';


/***/ }),
/* 35 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

/* eslint-disable es/no-symbol -- required for testing */
var V8_VERSION = __webpack_require__(36);
var fails = __webpack_require__(3);
var globalThis = __webpack_require__(17);

var $String = globalThis.String;

// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
  var symbol = Symbol('symbol detection');
  // Chrome 38 Symbol has incorrect toString conversion
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
  // of course, fail.
  return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||
    // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
    !Symbol.sham && V8_VERSION && V8_VERSION < 41;
});


/***/ }),
/* 36 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var globalThis = __webpack_require__(17);
var userAgent = __webpack_require__(37);

var process = globalThis.process;
var Deno = globalThis.Deno;
var versions = process && process.versions || Deno && Deno.version;
var v8 = versions && versions.v8;
var match, version;

if (v8) {
  match = v8.split('.');
  // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  // but their correct versions are not interesting for us
  version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
}

// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
// so check `userAgent` even if `.v8` exists, but 0
if (!version && userAgent) {
  match = userAgent.match(/Edge\/(\d+)/);
  if (!match || match[1] >= 74) {
    match = userAgent.match(/Chrome\/(\d+)/);
    if (match) version = +match[1];
  }
}

module.exports = version;


/***/ }),
/* 37 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var globalThis = __webpack_require__(17);

var navigator = globalThis.navigator;
var userAgent = navigator && navigator.userAgent;

module.exports = userAgent ? String(userAgent) : '';


/***/ }),
/* 38 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var aCallable = __webpack_require__(39);
var isNullOrUndefined = __webpack_require__(12);

// `GetMethod` abstract operation
// https://tc39.es/ecma262/#sec-getmethod
module.exports = function (V, P) {
  var func = V[P];
  return isNullOrUndefined(func) ? undefined : aCallable(func);
};


/***/ }),
/* 39 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var isCallable = __webpack_require__(8);
var tryToString = __webpack_require__(40);

var $TypeError = TypeError;

// `Assert: IsCallable(argument) is true`
module.exports = function (argument) {
  if (isCallable(argument)) return argument;
  throw new $TypeError(tryToString(argument) + ' is not a function');
};


/***/ }),
/* 40 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $String = String;

module.exports = function (argument) {
  try {
    return $String(argument);
  } catch (error) {
    return 'Object';
  }
};


/***/ }),
/* 41 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var call = __webpack_require__(30);
var isCallable = __webpack_require__(8);
var isObject = __webpack_require__(21);

var $TypeError = TypeError;

// `OrdinaryToPrimitive` abstract operation
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
module.exports = function (input, pref) {
  var fn, val;
  if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
  if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  throw new $TypeError("Can't convert object to primitive value");
};


/***/ }),
/* 42 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var globalThis = __webpack_require__(17);
var shared = __webpack_require__(43);
var hasOwn = __webpack_require__(9);
var uid = __webpack_require__(44);
var NATIVE_SYMBOL = __webpack_require__(35);
var USE_SYMBOL_AS_UID = __webpack_require__(34);

var Symbol = globalThis.Symbol;
var WellKnownSymbolsStore = shared('wks');
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;

module.exports = function (name) {
  if (!hasOwn(WellKnownSymbolsStore, name)) {
    WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name)
      ? Symbol[name]
      : createWellKnownSymbol('Symbol.' + name);
  } return WellKnownSymbolsStore[name];
};


/***/ }),
/* 43 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var store = __webpack_require__(15);

module.exports = function (key, value) {
  return store[key] || (store[key] = value || {});
};


/***/ }),
/* 44 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var uncurryThis = __webpack_require__(6);

var id = 0;
var postfix = Math.random();
var toString = uncurryThis(1.0.toString);

module.exports = function (key) {
  return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
};


/***/ }),
/* 45 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

module.exports = function (bitmap, value) {
  return {
    enumerable: !(bitmap & 1),
    configurable: !(bitmap & 2),
    writable: !(bitmap & 4),
    value: value
  };
};


/***/ }),
/* 46 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var shared = __webpack_require__(43);
var uid = __webpack_require__(44);

var keys = shared('keys');

module.exports = function (key) {
  return keys[key] || (keys[key] = uid(key));
};


/***/ }),
/* 47 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

module.exports = {};


/***/ }),
/* 48 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var globalThis = __webpack_require__(17);
var uncurryThis = __webpack_require__(49);
var arrayBufferByteLength = __webpack_require__(51);

var ArrayBuffer = globalThis.ArrayBuffer;
var ArrayBufferPrototype = ArrayBuffer && ArrayBuffer.prototype;
var slice = ArrayBufferPrototype && uncurryThis(ArrayBufferPrototype.slice);

module.exports = function (O) {
  if (arrayBufferByteLength(O) !== 0) return false;
  if (!slice) return false;
  try {
    slice(O, 0, 0);
    return false;
  } catch (error) {
    return true;
  }
};


/***/ }),
/* 49 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var classofRaw = __webpack_require__(50);
var uncurryThis = __webpack_require__(6);

module.exports = function (fn) {
  // Nashorn bug:
  //   https://github.com/zloirock/core-js/issues/1128
  //   https://github.com/zloirock/core-js/issues/1130
  if (classofRaw(fn) === 'Function') return uncurryThis(fn);
};


/***/ }),
/* 50 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var uncurryThis = __webpack_require__(6);

var toString = uncurryThis({}.toString);
var stringSlice = uncurryThis(''.slice);

module.exports = function (it) {
  return stringSlice(toString(it), 8, -1);
};


/***/ }),
/* 51 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var globalThis = __webpack_require__(17);
var uncurryThisAccessor = __webpack_require__(52);
var classof = __webpack_require__(50);

var ArrayBuffer = globalThis.ArrayBuffer;
var TypeError = globalThis.TypeError;

// Includes
// - Perform ? RequireInternalSlot(O, [[ArrayBufferData]]).
// - If IsSharedArrayBuffer(O) is true, throw a TypeError exception.
module.exports = ArrayBuffer && uncurryThisAccessor(ArrayBuffer.prototype, 'byteLength', 'get') || function (O) {
  if (classof(O) !== 'ArrayBuffer') throw new TypeError('ArrayBuffer expected');
  return O.byteLength;
};


/***/ }),
/* 52 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var uncurryThis = __webpack_require__(6);
var aCallable = __webpack_require__(39);

module.exports = function (object, key, method) {
  try {
    // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
    return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
  } catch (error) { /* empty */ }
};


/***/ }),
/* 53 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(54);
var $transfer = __webpack_require__(73);

// `ArrayBuffer.prototype.transfer` method
// https://tc39.es/proposal-arraybuffer-transfer/#sec-arraybuffer.prototype.transfer
if ($transfer) $({ target: 'ArrayBuffer', proto: true }, {
  transfer: function transfer() {
    return $transfer(this, arguments.length ? arguments[0] : undefined, true);
  }
});


/***/ }),
/* 54 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var globalThis = __webpack_require__(17);
var getOwnPropertyDescriptor = __webpack_require__(55).f;
var createNonEnumerableProperty = __webpack_require__(22);
var defineBuiltIn = __webpack_require__(59);
var defineGlobalProperty = __webpack_require__(18);
var copyConstructorProperties = __webpack_require__(60);
var isForced = __webpack_require__(72);

/*
  options.target         - name of the target object
  options.global         - target is the global object
  options.stat           - export as static methods of target
  options.proto          - export as prototype methods of target
  options.real           - real prototype method for the `pure` version
  options.forced         - export even if the native feature is available
  options.bind           - bind methods to the target, required for the `pure` version
  options.wrap           - wrap constructors to preventing global pollution, required for the `pure` version
  options.unsafe         - use the simple assignment of property instead of delete + defineProperty
  options.sham           - add a flag to not completely full polyfills
  options.enumerable     - export as enumerable property
  options.dontCallGetSet - prevent calling a getter on target
  options.name           - the .name of the function if it does not match the key
*/
module.exports = function (options, source) {
  var TARGET = options.target;
  var GLOBAL = options.global;
  var STATIC = options.stat;
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  if (GLOBAL) {
    target = globalThis;
  } else if (STATIC) {
    target = globalThis[TARGET] || defineGlobalProperty(TARGET, {});
  } else {
    target = globalThis[TARGET] && globalThis[TARGET].prototype;
  }
  if (target) for (key in source) {
    sourceProperty = source[key];
    if (options.dontCallGetSet) {
      descriptor = getOwnPropertyDescriptor(target, key);
      targetProperty = descriptor && descriptor.value;
    } else targetProperty = target[key];
    FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
    // contained in target
    if (!FORCED && targetProperty !== undefined) {
      if (typeof sourceProperty == typeof targetProperty) continue;
      copyConstructorProperties(sourceProperty, targetProperty);
    }
    // add a flag to not completely full polyfills
    if (options.sham || (targetProperty && targetProperty.sham)) {
      createNonEnumerableProperty(sourceProperty, 'sham', true);
    }
    defineBuiltIn(target, key, sourceProperty, options);
  }
};


/***/ }),
/* 55 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var DESCRIPTORS = __webpack_require__(2);
var call = __webpack_require__(30);
var propertyIsEnumerableModule = __webpack_require__(56);
var createPropertyDescriptor = __webpack_require__(45);
var toIndexedObject = __webpack_require__(57);
var toPropertyKey = __webpack_require__(28);
var hasOwn = __webpack_require__(9);
var IE8_DOM_DEFINE = __webpack_require__(24);

// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;

// `Object.getOwnPropertyDescriptor` method
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  O = toIndexedObject(O);
  P = toPropertyKey(P);
  if (IE8_DOM_DEFINE) try {
    return $getOwnPropertyDescriptor(O, P);
  } catch (error) { /* empty */ }
  if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
};


/***/ }),
/* 56 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $propertyIsEnumerable = {}.propertyIsEnumerable;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;

// Nashorn ~ JDK8 bug
var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);

// `Object.prototype.propertyIsEnumerable` method implementation
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  var descriptor = getOwnPropertyDescriptor(this, V);
  return !!descriptor && descriptor.enumerable;
} : $propertyIsEnumerable;


/***/ }),
/* 57 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// toObject with fallback for non-array-like ES3 strings
var IndexedObject = __webpack_require__(58);
var requireObjectCoercible = __webpack_require__(11);

module.exports = function (it) {
  return IndexedObject(requireObjectCoercible(it));
};


/***/ }),
/* 58 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var uncurryThis = __webpack_require__(6);
var fails = __webpack_require__(3);
var classof = __webpack_require__(50);

var $Object = Object;
var split = uncurryThis(''.split);

// fallback for non-array-like ES3 and non-enumerable old V8 strings
module.exports = fails(function () {
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  // eslint-disable-next-line no-prototype-builtins -- safe
  return !$Object('z').propertyIsEnumerable(0);
}) ? function (it) {
  return classof(it) === 'String' ? split(it, '') : $Object(it);
} : $Object;


/***/ }),
/* 59 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var isCallable = __webpack_require__(8);
var definePropertyModule = __webpack_require__(23);
var makeBuiltIn = __webpack_require__(5);
var defineGlobalProperty = __webpack_require__(18);

module.exports = function (O, key, value, options) {
  if (!options) options = {};
  var simple = options.enumerable;
  var name = options.name !== undefined ? options.name : key;
  if (isCallable(value)) makeBuiltIn(value, name, options);
  if (options.global) {
    if (simple) O[key] = value;
    else defineGlobalProperty(key, value);
  } else {
    try {
      if (!options.unsafe) delete O[key];
      else if (O[key]) simple = true;
    } catch (error) { /* empty */ }
    if (simple) O[key] = value;
    else definePropertyModule.f(O, key, {
      value: value,
      enumerable: false,
      configurable: !options.nonConfigurable,
      writable: !options.nonWritable
    });
  } return O;
};


/***/ }),
/* 60 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var hasOwn = __webpack_require__(9);
var ownKeys = __webpack_require__(61);
var getOwnPropertyDescriptorModule = __webpack_require__(55);
var definePropertyModule = __webpack_require__(23);

module.exports = function (target, source, exceptions) {
  var keys = ownKeys(source);
  var defineProperty = definePropertyModule.f;
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  for (var i = 0; i < keys.length; i++) {
    var key = keys[i];
    if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
      defineProperty(target, key, getOwnPropertyDescriptor(source, key));
    }
  }
};


/***/ }),
/* 61 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var getBuiltIn = __webpack_require__(32);
var uncurryThis = __webpack_require__(6);
var getOwnPropertyNamesModule = __webpack_require__(62);
var getOwnPropertySymbolsModule = __webpack_require__(71);
var anObject = __webpack_require__(27);

var concat = uncurryThis([].concat);

// all object keys, includes non-enumerable and symbols
module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  var keys = getOwnPropertyNamesModule.f(anObject(it));
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
};


/***/ }),
/* 62 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var internalObjectKeys = __webpack_require__(63);
var enumBugKeys = __webpack_require__(70);

var hiddenKeys = enumBugKeys.concat('length', 'prototype');

// `Object.getOwnPropertyNames` method
// https://tc39.es/ecma262/#sec-object.getownpropertynames
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  return internalObjectKeys(O, hiddenKeys);
};


/***/ }),
/* 63 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var uncurryThis = __webpack_require__(6);
var hasOwn = __webpack_require__(9);
var toIndexedObject = __webpack_require__(57);
var indexOf = __webpack_require__(64).indexOf;
var hiddenKeys = __webpack_require__(47);

var push = uncurryThis([].push);

module.exports = function (object, names) {
  var O = toIndexedObject(object);
  var i = 0;
  var result = [];
  var key;
  for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
  // Don't enum bug & hidden keys
  while (names.length > i) if (hasOwn(O, key = names[i++])) {
    ~indexOf(result, key) || push(result, key);
  }
  return result;
};


/***/ }),
/* 64 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var toIndexedObject = __webpack_require__(57);
var toAbsoluteIndex = __webpack_require__(65);
var lengthOfArrayLike = __webpack_require__(68);

// `Array.prototype.{ indexOf, includes }` methods implementation
var createMethod = function (IS_INCLUDES) {
  return function ($this, el, fromIndex) {
    var O = toIndexedObject($this);
    var length = lengthOfArrayLike(O);
    if (length === 0) return !IS_INCLUDES && -1;
    var index = toAbsoluteIndex(fromIndex, length);
    var value;
    // Array#includes uses SameValueZero equality algorithm
    // eslint-disable-next-line no-self-compare -- NaN check
    if (IS_INCLUDES && el !== el) while (length > index) {
      value = O[index++];
      // eslint-disable-next-line no-self-compare -- NaN check
      if (value !== value) return true;
    // Array#indexOf ignores holes, Array#includes - not
    } else for (;length > index; index++) {
      if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
    } return !IS_INCLUDES && -1;
  };
};

module.exports = {
  // `Array.prototype.includes` method
  // https://tc39.es/ecma262/#sec-array.prototype.includes
  includes: createMethod(true),
  // `Array.prototype.indexOf` method
  // https://tc39.es/ecma262/#sec-array.prototype.indexof
  indexOf: createMethod(false)
};


/***/ }),
/* 65 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var toIntegerOrInfinity = __webpack_require__(66);

var max = Math.max;
var min = Math.min;

// Helper for a popular repeating case of the spec:
// Let integer be ? ToInteger(index).
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
module.exports = function (index, length) {
  var integer = toIntegerOrInfinity(index);
  return integer < 0 ? max(integer + length, 0) : min(integer, length);
};


/***/ }),
/* 66 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var trunc = __webpack_require__(67);

// `ToIntegerOrInfinity` abstract operation
// https://tc39.es/ecma262/#sec-tointegerorinfinity
module.exports = function (argument) {
  var number = +argument;
  // eslint-disable-next-line no-self-compare -- NaN check
  return number !== number || number === 0 ? 0 : trunc(number);
};


/***/ }),
/* 67 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var ceil = Math.ceil;
var floor = Math.floor;

// `Math.trunc` method
// https://tc39.es/ecma262/#sec-math.trunc
// eslint-disable-next-line es/no-math-trunc -- safe
module.exports = Math.trunc || function trunc(x) {
  var n = +x;
  return (n > 0 ? floor : ceil)(n);
};


/***/ }),
/* 68 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var toLength = __webpack_require__(69);

// `LengthOfArrayLike` abstract operation
// https://tc39.es/ecma262/#sec-lengthofarraylike
module.exports = function (obj) {
  return toLength(obj.length);
};


/***/ }),
/* 69 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var toIntegerOrInfinity = __webpack_require__(66);

var min = Math.min;

// `ToLength` abstract operation
// https://tc39.es/ecma262/#sec-tolength
module.exports = function (argument) {
  var len = toIntegerOrInfinity(argument);
  return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
};


/***/ }),
/* 70 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// IE8- don't enum bug keys
module.exports = [
  'constructor',
  'hasOwnProperty',
  'isPrototypeOf',
  'propertyIsEnumerable',
  'toLocaleString',
  'toString',
  'valueOf'
];


/***/ }),
/* 71 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
exports.f = Object.getOwnPropertySymbols;


/***/ }),
/* 72 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fails = __webpack_require__(3);
var isCallable = __webpack_require__(8);

var replacement = /#|\.prototype\./;

var isForced = function (feature, detection) {
  var value = data[normalize(feature)];
  return value === POLYFILL ? true
    : value === NATIVE ? false
    : isCallable(detection) ? fails(detection)
    : !!detection;
};

var normalize = isForced.normalize = function (string) {
  return String(string).replace(replacement, '.').toLowerCase();
};

var data = isForced.data = {};
var NATIVE = isForced.NATIVE = 'N';
var POLYFILL = isForced.POLYFILL = 'P';

module.exports = isForced;


/***/ }),
/* 73 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var globalThis = __webpack_require__(17);
var uncurryThis = __webpack_require__(6);
var uncurryThisAccessor = __webpack_require__(52);
var toIndex = __webpack_require__(74);
var notDetached = __webpack_require__(75);
var arrayBufferByteLength = __webpack_require__(51);
var detachTransferable = __webpack_require__(76);
var PROPER_STRUCTURED_CLONE_TRANSFER = __webpack_require__(80);

var structuredClone = globalThis.structuredClone;
var ArrayBuffer = globalThis.ArrayBuffer;
var DataView = globalThis.DataView;
var min = Math.min;
var ArrayBufferPrototype = ArrayBuffer.prototype;
var DataViewPrototype = DataView.prototype;
var slice = uncurryThis(ArrayBufferPrototype.slice);
var isResizable = uncurryThisAccessor(ArrayBufferPrototype, 'resizable', 'get');
var maxByteLength = uncurryThisAccessor(ArrayBufferPrototype, 'maxByteLength', 'get');
var getInt8 = uncurryThis(DataViewPrototype.getInt8);
var setInt8 = uncurryThis(DataViewPrototype.setInt8);

module.exports = (PROPER_STRUCTURED_CLONE_TRANSFER || detachTransferable) && function (arrayBuffer, newLength, preserveResizability) {
  var byteLength = arrayBufferByteLength(arrayBuffer);
  var newByteLength = newLength === undefined ? byteLength : toIndex(newLength);
  var fixedLength = !isResizable || !isResizable(arrayBuffer);
  var newBuffer;
  notDetached(arrayBuffer);
  if (PROPER_STRUCTURED_CLONE_TRANSFER) {
    arrayBuffer = structuredClone(arrayBuffer, { transfer: [arrayBuffer] });
    if (byteLength === newByteLength && (preserveResizability || fixedLength)) return arrayBuffer;
  }
  if (byteLength >= newByteLength && (!preserveResizability || fixedLength)) {
    newBuffer = slice(arrayBuffer, 0, newByteLength);
  } else {
    var options = preserveResizability && !fixedLength && maxByteLength ? { maxByteLength: maxByteLength(arrayBuffer) } : undefined;
    newBuffer = new ArrayBuffer(newByteLength, options);
    var a = new DataView(arrayBuffer);
    var b = new DataView(newBuffer);
    var copyLength = min(newByteLength, byteLength);
    for (var i = 0; i < copyLength; i++) setInt8(b, i, getInt8(a, i));
  }
  if (!PROPER_STRUCTURED_CLONE_TRANSFER) detachTransferable(arrayBuffer);
  return newBuffer;
};


/***/ }),
/* 74 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var toIntegerOrInfinity = __webpack_require__(66);
var toLength = __webpack_require__(69);

var $RangeError = RangeError;

// `ToIndex` abstract operation
// https://tc39.es/ecma262/#sec-toindex
module.exports = function (it) {
  if (it === undefined) return 0;
  var number = toIntegerOrInfinity(it);
  var length = toLength(number);
  if (number !== length) throw new $RangeError('Wrong length or index');
  return length;
};


/***/ }),
/* 75 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var isDetached = __webpack_require__(48);

var $TypeError = TypeError;

module.exports = function (it) {
  if (isDetached(it)) throw new $TypeError('ArrayBuffer is detached');
  return it;
};


/***/ }),
/* 76 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var globalThis = __webpack_require__(17);
var getBuiltInNodeModule = __webpack_require__(77);
var PROPER_STRUCTURED_CLONE_TRANSFER = __webpack_require__(80);

var structuredClone = globalThis.structuredClone;
var $ArrayBuffer = globalThis.ArrayBuffer;
var $MessageChannel = globalThis.MessageChannel;
var detach = false;
var WorkerThreads, channel, buffer, $detach;

if (PROPER_STRUCTURED_CLONE_TRANSFER) {
  detach = function (transferable) {
    structuredClone(transferable, { transfer: [transferable] });
  };
} else if ($ArrayBuffer) try {
  if (!$MessageChannel) {
    WorkerThreads = getBuiltInNodeModule('worker_threads');
    if (WorkerThreads) $MessageChannel = WorkerThreads.MessageChannel;
  }

  if ($MessageChannel) {
    channel = new $MessageChannel();
    buffer = new $ArrayBuffer(2);

    $detach = function (transferable) {
      channel.port1.postMessage(null, [transferable]);
    };

    if (buffer.byteLength === 2) {
      $detach(buffer);
      if (buffer.byteLength === 0) detach = $detach;
    }
  }
} catch (error) { /* empty */ }

module.exports = detach;


/***/ }),
/* 77 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var globalThis = __webpack_require__(17);
var IS_NODE = __webpack_require__(78);

module.exports = function (name) {
  if (IS_NODE) {
    try {
      return globalThis.process.getBuiltinModule(name);
    } catch (error) { /* empty */ }
    try {
      // eslint-disable-next-line no-new-func -- safe
      return Function('return require("' + name + '")')();
    } catch (error) { /* empty */ }
  }
};


/***/ }),
/* 78 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var ENVIRONMENT = __webpack_require__(79);

module.exports = ENVIRONMENT === 'NODE';


/***/ }),
/* 79 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

/* global Bun, Deno -- detection */
var globalThis = __webpack_require__(17);
var userAgent = __webpack_require__(37);
var classof = __webpack_require__(50);

var userAgentStartsWith = function (string) {
  return userAgent.slice(0, string.length) === string;
};

module.exports = (function () {
  if (userAgentStartsWith('Bun/')) return 'BUN';
  if (userAgentStartsWith('Cloudflare-Workers')) return 'CLOUDFLARE';
  if (userAgentStartsWith('Deno/')) return 'DENO';
  if (userAgentStartsWith('Node.js/')) return 'NODE';
  if (globalThis.Bun && typeof Bun.version == 'string') return 'BUN';
  if (globalThis.Deno && typeof Deno.version == 'object') return 'DENO';
  if (classof(globalThis.process) === 'process') return 'NODE';
  if (globalThis.window && globalThis.document) return 'BROWSER';
  return 'REST';
})();


/***/ }),
/* 80 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var globalThis = __webpack_require__(17);
var fails = __webpack_require__(3);
var V8 = __webpack_require__(36);
var ENVIRONMENT = __webpack_require__(79);

var structuredClone = globalThis.structuredClone;

module.exports = !!structuredClone && !fails(function () {
  // prevent V8 ArrayBufferDetaching protector cell invalidation and performance degradation
  // https://github.com/zloirock/core-js/issues/679
  if ((ENVIRONMENT === 'DENO' && V8 > 92) || (ENVIRONMENT === 'NODE' && V8 > 94) || (ENVIRONMENT === 'BROWSER' && V8 > 97)) return false;
  var buffer = new ArrayBuffer(8);
  var clone = structuredClone(buffer, { transfer: [buffer] });
  return buffer.byteLength !== 0 || clone.byteLength !== 8;
});


/***/ }),
/* 81 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(54);
var $transfer = __webpack_require__(73);

// `ArrayBuffer.prototype.transferToFixedLength` method
// https://tc39.es/proposal-arraybuffer-transfer/#sec-arraybuffer.prototype.transfertofixedlength
if ($transfer) $({ target: 'ArrayBuffer', proto: true }, {
  transferToFixedLength: function transferToFixedLength() {
    return $transfer(this, arguments.length ? arguments[0] : undefined, false);
  }
});


/***/ }),
/* 82 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(54);
var uncurryThis = __webpack_require__(6);
var aCallable = __webpack_require__(39);
var requireObjectCoercible = __webpack_require__(11);
var iterate = __webpack_require__(83);
var MapHelpers = __webpack_require__(92);
var IS_PURE = __webpack_require__(16);
var fails = __webpack_require__(3);

var Map = MapHelpers.Map;
var has = MapHelpers.has;
var get = MapHelpers.get;
var set = MapHelpers.set;
var push = uncurryThis([].push);

var DOES_NOT_WORK_WITH_PRIMITIVES = IS_PURE || fails(function () {
  return Map.groupBy('ab', function (it) {
    return it;
  }).get('a').length !== 1;
});

// `Map.groupBy` method
// https://tc39.es/ecma262/#sec-map.groupby
$({ target: 'Map', stat: true, forced: IS_PURE || DOES_NOT_WORK_WITH_PRIMITIVES }, {
  groupBy: function groupBy(items, callbackfn) {
    requireObjectCoercible(items);
    aCallable(callbackfn);
    var map = new Map();
    var k = 0;
    iterate(items, function (value) {
      var key = callbackfn(value, k++);
      if (!has(map, key)) set(map, key, [value]);
      else push(get(map, key), value);
    });
    return map;
  }
});


/***/ }),
/* 83 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var bind = __webpack_require__(84);
var call = __webpack_require__(30);
var anObject = __webpack_require__(27);
var tryToString = __webpack_require__(40);
var isArrayIteratorMethod = __webpack_require__(85);
var lengthOfArrayLike = __webpack_require__(68);
var isPrototypeOf = __webpack_require__(33);
var getIterator = __webpack_require__(87);
var getIteratorMethod = __webpack_require__(88);
var iteratorClose = __webpack_require__(91);

var $TypeError = TypeError;

var Result = function (stopped, result) {
  this.stopped = stopped;
  this.result = result;
};

var ResultPrototype = Result.prototype;

module.exports = function (iterable, unboundFunction, options) {
  var that = options && options.that;
  var AS_ENTRIES = !!(options && options.AS_ENTRIES);
  var IS_RECORD = !!(options && options.IS_RECORD);
  var IS_ITERATOR = !!(options && options.IS_ITERATOR);
  var INTERRUPTED = !!(options && options.INTERRUPTED);
  var fn = bind(unboundFunction, that);
  var iterator, iterFn, index, length, result, next, step;

  var stop = function (condition) {
    if (iterator) iteratorClose(iterator, 'normal', condition);
    return new Result(true, condition);
  };

  var callFn = function (value) {
    if (AS_ENTRIES) {
      anObject(value);
      return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
    } return INTERRUPTED ? fn(value, stop) : fn(value);
  };

  if (IS_RECORD) {
    iterator = iterable.iterator;
  } else if (IS_ITERATOR) {
    iterator = iterable;
  } else {
    iterFn = getIteratorMethod(iterable);
    if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable');
    // optimisation for array iterators
    if (isArrayIteratorMethod(iterFn)) {
      for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
        result = callFn(iterable[index]);
        if (result && isPrototypeOf(ResultPrototype, result)) return result;
      } return new Result(false);
    }
    iterator = getIterator(iterable, iterFn);
  }

  next = IS_RECORD ? iterable.next : iterator.next;
  while (!(step = call(next, iterator)).done) {
    try {
      result = callFn(step.value);
    } catch (error) {
      iteratorClose(iterator, 'throw', error);
    }
    if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
  } return new Result(false);
};


/***/ }),
/* 84 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var uncurryThis = __webpack_require__(49);
var aCallable = __webpack_require__(39);
var NATIVE_BIND = __webpack_require__(7);

var bind = uncurryThis(uncurryThis.bind);

// optional / simple context binding
module.exports = function (fn, that) {
  aCallable(fn);
  return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {
    return fn.apply(that, arguments);
  };
};


/***/ }),
/* 85 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var wellKnownSymbol = __webpack_require__(42);
var Iterators = __webpack_require__(86);

var ITERATOR = wellKnownSymbol('iterator');
var ArrayPrototype = Array.prototype;

// check on default Array iterator
module.exports = function (it) {
  return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
};


/***/ }),
/* 86 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

module.exports = {};


/***/ }),
/* 87 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var call = __webpack_require__(30);
var aCallable = __webpack_require__(39);
var anObject = __webpack_require__(27);
var tryToString = __webpack_require__(40);
var getIteratorMethod = __webpack_require__(88);

var $TypeError = TypeError;

module.exports = function (argument, usingIterator) {
  var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
  if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument));
  throw new $TypeError(tryToString(argument) + ' is not iterable');
};


/***/ }),
/* 88 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var classof = __webpack_require__(89);
var getMethod = __webpack_require__(38);
var isNullOrUndefined = __webpack_require__(12);
var Iterators = __webpack_require__(86);
var wellKnownSymbol = __webpack_require__(42);

var ITERATOR = wellKnownSymbol('iterator');

module.exports = function (it) {
  if (!isNullOrUndefined(it)) return getMethod(it, ITERATOR)
    || getMethod(it, '@@iterator')
    || Iterators[classof(it)];
};


/***/ }),
/* 89 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var TO_STRING_TAG_SUPPORT = __webpack_require__(90);
var isCallable = __webpack_require__(8);
var classofRaw = __webpack_require__(50);
var wellKnownSymbol = __webpack_require__(42);

var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var $Object = Object;

// ES3 wrong here
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';

// fallback for IE11 Script Access Denied error
var tryGet = function (it, key) {
  try {
    return it[key];
  } catch (error) { /* empty */ }
};

// getting tag from ES6+ `Object.prototype.toString`
module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
  var O, tag, result;
  return it === undefined ? 'Undefined' : it === null ? 'Null'
    // @@toStringTag case
    : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
    // builtinTag case
    : CORRECT_ARGUMENTS ? classofRaw(O)
    // ES3 arguments fallback
    : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;
};


/***/ }),
/* 90 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var wellKnownSymbol = __webpack_require__(42);

var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var test = {};

test[TO_STRING_TAG] = 'z';

module.exports = String(test) === '[object z]';


/***/ }),
/* 91 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var call = __webpack_require__(30);
var anObject = __webpack_require__(27);
var getMethod = __webpack_require__(38);

module.exports = function (iterator, kind, value) {
  var innerResult, innerError;
  anObject(iterator);
  try {
    innerResult = getMethod(iterator, 'return');
    if (!innerResult) {
      if (kind === 'throw') throw value;
      return value;
    }
    innerResult = call(innerResult, iterator);
  } catch (error) {
    innerError = true;
    innerResult = error;
  }
  if (kind === 'throw') throw value;
  if (innerError) throw innerResult;
  anObject(innerResult);
  return value;
};


/***/ }),
/* 92 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var uncurryThis = __webpack_require__(6);

// eslint-disable-next-line es/no-map -- safe
var MapPrototype = Map.prototype;

module.exports = {
  // eslint-disable-next-line es/no-map -- safe
  Map: Map,
  set: uncurryThis(MapPrototype.set),
  get: uncurryThis(MapPrototype.get),
  has: uncurryThis(MapPrototype.has),
  remove: uncurryThis(MapPrototype['delete']),
  proto: MapPrototype
};


/***/ }),
/* 93 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(54);
var getBuiltIn = __webpack_require__(32);
var uncurryThis = __webpack_require__(6);
var aCallable = __webpack_require__(39);
var requireObjectCoercible = __webpack_require__(11);
var toPropertyKey = __webpack_require__(28);
var iterate = __webpack_require__(83);
var fails = __webpack_require__(3);

// eslint-disable-next-line es/no-object-groupby -- testing
var nativeGroupBy = Object.groupBy;
var create = getBuiltIn('Object', 'create');
var push = uncurryThis([].push);

var DOES_NOT_WORK_WITH_PRIMITIVES = !nativeGroupBy || fails(function () {
  return nativeGroupBy('ab', function (it) {
    return it;
  }).a.length !== 1;
});

// `Object.groupBy` method
// https://tc39.es/ecma262/#sec-object.groupby
$({ target: 'Object', stat: true, forced: DOES_NOT_WORK_WITH_PRIMITIVES }, {
  groupBy: function groupBy(items, callbackfn) {
    requireObjectCoercible(items);
    aCallable(callbackfn);
    var obj = create(null);
    var k = 0;
    iterate(items, function (value) {
      var key = toPropertyKey(callbackfn(value, k++));
      // in some IE versions, `hasOwnProperty` returns incorrect result on integer keys
      // but since it's a `null` prototype object, we can safely use `in`
      if (key in obj) push(obj[key], value);
      else obj[key] = [value];
    });
    return obj;
  }
});


/***/ }),
/* 94 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(54);
var globalThis = __webpack_require__(17);
var apply = __webpack_require__(95);
var slice = __webpack_require__(96);
var newPromiseCapabilityModule = __webpack_require__(97);
var aCallable = __webpack_require__(39);
var perform = __webpack_require__(98);

var Promise = globalThis.Promise;

var ACCEPT_ARGUMENTS = false;
// Avoiding the use of polyfills of the previous iteration of this proposal
// that does not accept arguments of the callback
var FORCED = !Promise || !Promise['try'] || perform(function () {
  Promise['try'](function (argument) {
    ACCEPT_ARGUMENTS = argument === 8;
  }, 8);
}).error || !ACCEPT_ARGUMENTS;

// `Promise.try` method
// https://tc39.es/ecma262/#sec-promise.try
$({ target: 'Promise', stat: true, forced: FORCED }, {
  'try': function (callbackfn /* , ...args */) {
    var args = arguments.length > 1 ? slice(arguments, 1) : [];
    var promiseCapability = newPromiseCapabilityModule.f(this);
    var result = perform(function () {
      return apply(aCallable(callbackfn), undefined, args);
    });
    (result.error ? promiseCapability.reject : promiseCapability.resolve)(result.value);
    return promiseCapability.promise;
  }
});


/***/ }),
/* 95 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var NATIVE_BIND = __webpack_require__(7);

var FunctionPrototype = Function.prototype;
var apply = FunctionPrototype.apply;
var call = FunctionPrototype.call;

// eslint-disable-next-line es/no-reflect -- safe
module.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {
  return call.apply(apply, arguments);
});


/***/ }),
/* 96 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var uncurryThis = __webpack_require__(6);

module.exports = uncurryThis([].slice);


/***/ }),
/* 97 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var aCallable = __webpack_require__(39);

var $TypeError = TypeError;

var PromiseCapability = function (C) {
  var resolve, reject;
  this.promise = new C(function ($$resolve, $$reject) {
    if (resolve !== undefined || reject !== undefined) throw new $TypeError('Bad Promise constructor');
    resolve = $$resolve;
    reject = $$reject;
  });
  this.resolve = aCallable(resolve);
  this.reject = aCallable(reject);
};

// `NewPromiseCapability` abstract operation
// https://tc39.es/ecma262/#sec-newpromisecapability
module.exports.f = function (C) {
  return new PromiseCapability(C);
};


/***/ }),
/* 98 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

module.exports = function (exec) {
  try {
    return { error: false, value: exec() };
  } catch (error) {
    return { error: true, value: error };
  }
};


/***/ }),
/* 99 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(54);
var newPromiseCapabilityModule = __webpack_require__(97);

// `Promise.withResolvers` method
// https://tc39.es/ecma262/#sec-promise.withResolvers
$({ target: 'Promise', stat: true }, {
  withResolvers: function withResolvers() {
    var promiseCapability = newPromiseCapabilityModule.f(this);
    return {
      promise: promiseCapability.promise,
      resolve: promiseCapability.resolve,
      reject: promiseCapability.reject
    };
  }
});


/***/ }),
/* 100 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(54);
var globalThis = __webpack_require__(17);
var getBuiltIn = __webpack_require__(32);
var createPropertyDescriptor = __webpack_require__(45);
var defineProperty = __webpack_require__(23).f;
var hasOwn = __webpack_require__(9);
var anInstance = __webpack_require__(101);
var inheritIfRequired = __webpack_require__(102);
var normalizeStringArgument = __webpack_require__(106);
var DOMExceptionConstants = __webpack_require__(108);
var clearErrorStack = __webpack_require__(109);
var DESCRIPTORS = __webpack_require__(2);
var IS_PURE = __webpack_require__(16);

var DOM_EXCEPTION = 'DOMException';
var Error = getBuiltIn('Error');
var NativeDOMException = getBuiltIn(DOM_EXCEPTION);

var $DOMException = function DOMException() {
  anInstance(this, DOMExceptionPrototype);
  var argumentsLength = arguments.length;
  var message = normalizeStringArgument(argumentsLength < 1 ? undefined : arguments[0]);
  var name = normalizeStringArgument(argumentsLength < 2 ? undefined : arguments[1], 'Error');
  var that = new NativeDOMException(message, name);
  var error = new Error(message);
  error.name = DOM_EXCEPTION;
  defineProperty(that, 'stack', createPropertyDescriptor(1, clearErrorStack(error.stack, 1)));
  inheritIfRequired(that, this, $DOMException);
  return that;
};

var DOMExceptionPrototype = $DOMException.prototype = NativeDOMException.prototype;

var ERROR_HAS_STACK = 'stack' in new Error(DOM_EXCEPTION);
var DOM_EXCEPTION_HAS_STACK = 'stack' in new NativeDOMException(1, 2);

// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var descriptor = NativeDOMException && DESCRIPTORS && Object.getOwnPropertyDescriptor(globalThis, DOM_EXCEPTION);

// Bun ~ 0.1.1 DOMException have incorrect descriptor and we can't redefine it
// https://github.com/Jarred-Sumner/bun/issues/399
var BUGGY_DESCRIPTOR = !!descriptor && !(descriptor.writable && descriptor.configurable);

var FORCED_CONSTRUCTOR = ERROR_HAS_STACK && !BUGGY_DESCRIPTOR && !DOM_EXCEPTION_HAS_STACK;

// `DOMException` constructor patch for `.stack` where it's required
// https://webidl.spec.whatwg.org/#es-DOMException-specialness
$({ global: true, constructor: true, forced: IS_PURE || FORCED_CONSTRUCTOR }, { // TODO: fix export logic
  DOMException: FORCED_CONSTRUCTOR ? $DOMException : NativeDOMException
});

var PolyfilledDOMException = getBuiltIn(DOM_EXCEPTION);
var PolyfilledDOMExceptionPrototype = PolyfilledDOMException.prototype;

if (PolyfilledDOMExceptionPrototype.constructor !== PolyfilledDOMException) {
  if (!IS_PURE) {
    defineProperty(PolyfilledDOMExceptionPrototype, 'constructor', createPropertyDescriptor(1, PolyfilledDOMException));
  }

  for (var key in DOMExceptionConstants) if (hasOwn(DOMExceptionConstants, key)) {
    var constant = DOMExceptionConstants[key];
    var constantName = constant.s;
    if (!hasOwn(PolyfilledDOMException, constantName)) {
      defineProperty(PolyfilledDOMException, constantName, createPropertyDescriptor(6, constant.c));
    }
  }
}


/***/ }),
/* 101 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var isPrototypeOf = __webpack_require__(33);

var $TypeError = TypeError;

module.exports = function (it, Prototype) {
  if (isPrototypeOf(Prototype, it)) return it;
  throw new $TypeError('Incorrect invocation');
};


/***/ }),
/* 102 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var isCallable = __webpack_require__(8);
var isObject = __webpack_require__(21);
var setPrototypeOf = __webpack_require__(103);

// makes subclassing work correct for wrapped built-ins
module.exports = function ($this, dummy, Wrapper) {
  var NewTarget, NewTargetPrototype;
  if (
    // it can work only with native `setPrototypeOf`
    setPrototypeOf &&
    // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
    isCallable(NewTarget = dummy.constructor) &&
    NewTarget !== Wrapper &&
    isObject(NewTargetPrototype = NewTarget.prototype) &&
    NewTargetPrototype !== Wrapper.prototype
  ) setPrototypeOf($this, NewTargetPrototype);
  return $this;
};


/***/ }),
/* 103 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

/* eslint-disable no-proto -- safe */
var uncurryThisAccessor = __webpack_require__(52);
var isObject = __webpack_require__(21);
var requireObjectCoercible = __webpack_require__(11);
var aPossiblePrototype = __webpack_require__(104);

// `Object.setPrototypeOf` method
// https://tc39.es/ecma262/#sec-object.setprototypeof
// Works with __proto__ only. Old v8 can't work with null proto objects.
// eslint-disable-next-line es/no-object-setprototypeof -- safe
module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  var CORRECT_SETTER = false;
  var test = {};
  var setter;
  try {
    setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
    setter(test, []);
    CORRECT_SETTER = test instanceof Array;
  } catch (error) { /* empty */ }
  return function setPrototypeOf(O, proto) {
    requireObjectCoercible(O);
    aPossiblePrototype(proto);
    if (!isObject(O)) return O;
    if (CORRECT_SETTER) setter(O, proto);
    else O.__proto__ = proto;
    return O;
  };
}() : undefined);


/***/ }),
/* 104 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var isPossiblePrototype = __webpack_require__(105);

var $String = String;
var $TypeError = TypeError;

module.exports = function (argument) {
  if (isPossiblePrototype(argument)) return argument;
  throw new $TypeError("Can't set " + $String(argument) + ' as a prototype');
};


/***/ }),
/* 105 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var isObject = __webpack_require__(21);

module.exports = function (argument) {
  return isObject(argument) || argument === null;
};


/***/ }),
/* 106 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var toString = __webpack_require__(107);

module.exports = function (argument, $default) {
  return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument);
};


/***/ }),
/* 107 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var classof = __webpack_require__(89);

var $String = String;

module.exports = function (argument) {
  if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
  return $String(argument);
};


/***/ }),
/* 108 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

module.exports = {
  IndexSizeError: { s: 'INDEX_SIZE_ERR', c: 1, m: 1 },
  DOMStringSizeError: { s: 'DOMSTRING_SIZE_ERR', c: 2, m: 0 },
  HierarchyRequestError: { s: 'HIERARCHY_REQUEST_ERR', c: 3, m: 1 },
  WrongDocumentError: { s: 'WRONG_DOCUMENT_ERR', c: 4, m: 1 },
  InvalidCharacterError: { s: 'INVALID_CHARACTER_ERR', c: 5, m: 1 },
  NoDataAllowedError: { s: 'NO_DATA_ALLOWED_ERR', c: 6, m: 0 },
  NoModificationAllowedError: { s: 'NO_MODIFICATION_ALLOWED_ERR', c: 7, m: 1 },
  NotFoundError: { s: 'NOT_FOUND_ERR', c: 8, m: 1 },
  NotSupportedError: { s: 'NOT_SUPPORTED_ERR', c: 9, m: 1 },
  InUseAttributeError: { s: 'INUSE_ATTRIBUTE_ERR', c: 10, m: 1 },
  InvalidStateError: { s: 'INVALID_STATE_ERR', c: 11, m: 1 },
  SyntaxError: { s: 'SYNTAX_ERR', c: 12, m: 1 },
  InvalidModificationError: { s: 'INVALID_MODIFICATION_ERR', c: 13, m: 1 },
  NamespaceError: { s: 'NAMESPACE_ERR', c: 14, m: 1 },
  InvalidAccessError: { s: 'INVALID_ACCESS_ERR', c: 15, m: 1 },
  ValidationError: { s: 'VALIDATION_ERR', c: 16, m: 0 },
  TypeMismatchError: { s: 'TYPE_MISMATCH_ERR', c: 17, m: 1 },
  SecurityError: { s: 'SECURITY_ERR', c: 18, m: 1 },
  NetworkError: { s: 'NETWORK_ERR', c: 19, m: 1 },
  AbortError: { s: 'ABORT_ERR', c: 20, m: 1 },
  URLMismatchError: { s: 'URL_MISMATCH_ERR', c: 21, m: 1 },
  QuotaExceededError: { s: 'QUOTA_EXCEEDED_ERR', c: 22, m: 1 },
  TimeoutError: { s: 'TIMEOUT_ERR', c: 23, m: 1 },
  InvalidNodeTypeError: { s: 'INVALID_NODE_TYPE_ERR', c: 24, m: 1 },
  DataCloneError: { s: 'DATA_CLONE_ERR', c: 25, m: 1 }
};


/***/ }),
/* 109 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var uncurryThis = __webpack_require__(6);

var $Error = Error;
var replace = uncurryThis(''.replace);

var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');
// eslint-disable-next-line redos/no-vulnerable, sonarjs/slow-regex -- safe
var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);

module.exports = function (stack, dropEntries) {
  if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
    while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
  } return stack;
};


/***/ }),
/* 110 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var IS_PURE = __webpack_require__(16);
var $ = __webpack_require__(54);
var globalThis = __webpack_require__(17);
var getBuiltIn = __webpack_require__(32);
var uncurryThis = __webpack_require__(6);
var fails = __webpack_require__(3);
var uid = __webpack_require__(44);
var isCallable = __webpack_require__(8);
var isConstructor = __webpack_require__(111);
var isNullOrUndefined = __webpack_require__(12);
var isObject = __webpack_require__(21);
var isSymbol = __webpack_require__(31);
var iterate = __webpack_require__(83);
var anObject = __webpack_require__(27);
var classof = __webpack_require__(89);
var hasOwn = __webpack_require__(9);
var createProperty = __webpack_require__(112);
var createNonEnumerableProperty = __webpack_require__(22);
var lengthOfArrayLike = __webpack_require__(68);
var validateArgumentsLength = __webpack_require__(113);
var getRegExpFlags = __webpack_require__(114);
var MapHelpers = __webpack_require__(92);
var SetHelpers = __webpack_require__(116);
var setIterate = __webpack_require__(117);
var detachTransferable = __webpack_require__(76);
var ERROR_STACK_INSTALLABLE = __webpack_require__(119);
var PROPER_STRUCTURED_CLONE_TRANSFER = __webpack_require__(80);

var Object = globalThis.Object;
var Array = globalThis.Array;
var Date = globalThis.Date;
var Error = globalThis.Error;
var TypeError = globalThis.TypeError;
var PerformanceMark = globalThis.PerformanceMark;
var DOMException = getBuiltIn('DOMException');
var Map = MapHelpers.Map;
var mapHas = MapHelpers.has;
var mapGet = MapHelpers.get;
var mapSet = MapHelpers.set;
var Set = SetHelpers.Set;
var setAdd = SetHelpers.add;
var setHas = SetHelpers.has;
var objectKeys = getBuiltIn('Object', 'keys');
var push = uncurryThis([].push);
var thisBooleanValue = uncurryThis(true.valueOf);
var thisNumberValue = uncurryThis(1.0.valueOf);
var thisStringValue = uncurryThis(''.valueOf);
var thisTimeValue = uncurryThis(Date.prototype.getTime);
var PERFORMANCE_MARK = uid('structuredClone');
var DATA_CLONE_ERROR = 'DataCloneError';
var TRANSFERRING = 'Transferring';

var checkBasicSemantic = function (structuredCloneImplementation) {
  return !fails(function () {
    var set1 = new globalThis.Set([7]);
    var set2 = structuredCloneImplementation(set1);
    var number = structuredCloneImplementation(Object(7));
    return set2 === set1 || !set2.has(7) || !isObject(number) || +number !== 7;
  }) && structuredCloneImplementation;
};

var checkErrorsCloning = function (structuredCloneImplementation, $Error) {
  return !fails(function () {
    var error = new $Error();
    var test = structuredCloneImplementation({ a: error, b: error });
    return !(test && test.a === test.b && test.a instanceof $Error && test.a.stack === error.stack);
  });
};

// https://github.com/whatwg/html/pull/5749
var checkNewErrorsCloningSemantic = function (structuredCloneImplementation) {
  return !fails(function () {
    var test = structuredCloneImplementation(new globalThis.AggregateError([1], PERFORMANCE_MARK, { cause: 3 }));
    return test.name !== 'AggregateError' || test.errors[0] !== 1 || test.message !== PERFORMANCE_MARK || test.cause !== 3;
  });
};

// FF94+, Safari 15.4+, Chrome 98+, NodeJS 17.0+, Deno 1.13+
// FF<103 and Safari implementations can't clone errors
// https://bugzilla.mozilla.org/show_bug.cgi?id=1556604
// FF103 can clone errors, but `.stack` of clone is an empty string
// https://bugzilla.mozilla.org/show_bug.cgi?id=1778762
// FF104+ fixed it on usual errors, but not on DOMExceptions
// https://bugzilla.mozilla.org/show_bug.cgi?id=1777321
// Chrome <102 returns `null` if cloned object contains multiple references to one error
// https://bugs.chromium.org/p/v8/issues/detail?id=12542
// NodeJS implementation can't clone DOMExceptions
// https://github.com/nodejs/node/issues/41038
// only FF103+ supports new (html/5749) error cloning semantic
var nativeStructuredClone = globalThis.structuredClone;

var FORCED_REPLACEMENT = IS_PURE
  || !checkErrorsCloning(nativeStructuredClone, Error)
  || !checkErrorsCloning(nativeStructuredClone, DOMException)
  || !checkNewErrorsCloningSemantic(nativeStructuredClone);

// Chrome 82+, Safari 14.1+, Deno 1.11+
// Chrome 78-81 implementation swaps `.name` and `.message` of cloned `DOMException`
// Chrome returns `null` if cloned object contains multiple references to one error
// Safari 14.1 implementation doesn't clone some `RegExp` flags, so requires a workaround
// Safari implementation can't clone errors
// Deno 1.2-1.10 implementations too naive
// NodeJS 16.0+ does not have `PerformanceMark` constructor
// NodeJS <17.2 structured cloning implementation from `performance.mark` is too naive
// and can't clone, for example, `RegExp` or some boxed primitives
// https://github.com/nodejs/node/issues/40840
// no one of those implementations supports new (html/5749) error cloning semantic
var structuredCloneFromMark = !nativeStructuredClone && checkBasicSemantic(function (value) {
  return new PerformanceMark(PERFORMANCE_MARK, { detail: value }).detail;
});

var nativeRestrictedStructuredClone = checkBasicSemantic(nativeStructuredClone) || structuredCloneFromMark;

var throwUncloneable = function (type) {
  throw new DOMException('Uncloneable type: ' + type, DATA_CLONE_ERROR);
};

var throwUnpolyfillable = function (type, action) {
  throw new DOMException((action || 'Cloning') + ' of ' + type + ' cannot be properly polyfilled in this engine', DATA_CLONE_ERROR);
};

var tryNativeRestrictedStructuredClone = function (value, type) {
  if (!nativeRestrictedStructuredClone) throwUnpolyfillable(type);
  return nativeRestrictedStructuredClone(value);
};

var createDataTransfer = function () {
  var dataTransfer;
  try {
    dataTransfer = new globalThis.DataTransfer();
  } catch (error) {
    try {
      dataTransfer = new globalThis.ClipboardEvent('').clipboardData;
    } catch (error2) { /* empty */ }
  }
  return dataTransfer && dataTransfer.items && dataTransfer.files ? dataTransfer : null;
};

var cloneBuffer = function (value, map, $type) {
  if (mapHas(map, value)) return mapGet(map, value);

  var type = $type || classof(value);
  var clone, length, options, source, target, i;

  if (type === 'SharedArrayBuffer') {
    if (nativeRestrictedStructuredClone) clone = nativeRestrictedStructuredClone(value);
    // SharedArrayBuffer should use shared memory, we can't polyfill it, so return the original
    else clone = value;
  } else {
    var DataView = globalThis.DataView;

    // `ArrayBuffer#slice` is not available in IE10
    // `ArrayBuffer#slice` and `DataView` are not available in old FF
    if (!DataView && !isCallable(value.slice)) throwUnpolyfillable('ArrayBuffer');
    // detached buffers throws in `DataView` and `.slice`
    try {
      if (isCallable(value.slice) && !value.resizable) {
        clone = value.slice(0);
      } else {
        length = value.byteLength;
        options = 'maxByteLength' in value ? { maxByteLength: value.maxByteLength } : undefined;
        // eslint-disable-next-line es/no-resizable-and-growable-arraybuffers -- safe
        clone = new ArrayBuffer(length, options);
        source = new DataView(value);
        target = new DataView(clone);
        for (i = 0; i < length; i++) {
          target.setUint8(i, source.getUint8(i));
        }
      }
    } catch (error) {
      throw new DOMException('ArrayBuffer is detached', DATA_CLONE_ERROR);
    }
  }

  mapSet(map, value, clone);

  return clone;
};

var cloneView = function (value, type, offset, length, map) {
  var C = globalThis[type];
  // in some old engines like Safari 9, typeof C is 'object'
  // on Uint8ClampedArray or some other constructors
  if (!isObject(C)) throwUnpolyfillable(type);
  return new C(cloneBuffer(value.buffer, map), offset, length);
};

var structuredCloneInternal = function (value, map) {
  if (isSymbol(value)) throwUncloneable('Symbol');
  if (!isObject(value)) return value;
  // effectively preserves circular references
  if (map) {
    if (mapHas(map, value)) return mapGet(map, value);
  } else map = new Map();

  var type = classof(value);
  var C, name, cloned, dataTransfer, i, length, keys, key;

  switch (type) {
    case 'Array':
      cloned = Array(lengthOfArrayLike(value));
      break;
    case 'Object':
      cloned = {};
      break;
    case 'Map':
      cloned = new Map();
      break;
    case 'Set':
      cloned = new Set();
      break;
    case 'RegExp':
      // in this block because of a Safari 14.1 bug
      // old FF does not clone regexes passed to the constructor, so get the source and flags directly
      cloned = new RegExp(value.source, getRegExpFlags(value));
      break;
    case 'Error':
      name = value.name;
      switch (name) {
        case 'AggregateError':
          cloned = new (getBuiltIn(name))([]);
          break;
        case 'EvalError':
        case 'RangeError':
        case 'ReferenceError':
        case 'SuppressedError':
        case 'SyntaxError':
        case 'TypeError':
        case 'URIError':
          cloned = new (getBuiltIn(name))();
          break;
        case 'CompileError':
        case 'LinkError':
        case 'RuntimeError':
          cloned = new (getBuiltIn('WebAssembly', name))();
          break;
        default:
          cloned = new Error();
      }
      break;
    case 'DOMException':
      cloned = new DOMException(value.message, value.name);
      break;
    case 'ArrayBuffer':
    case 'SharedArrayBuffer':
      cloned = cloneBuffer(value, map, type);
      break;
    case 'DataView':
    case 'Int8Array':
    case 'Uint8Array':
    case 'Uint8ClampedArray':
    case 'Int16Array':
    case 'Uint16Array':
    case 'Int32Array':
    case 'Uint32Array':
    case 'Float16Array':
    case 'Float32Array':
    case 'Float64Array':
    case 'BigInt64Array':
    case 'BigUint64Array':
      length = type === 'DataView' ? value.byteLength : value.length;
      cloned = cloneView(value, type, value.byteOffset, length, map);
      break;
    case 'DOMQuad':
      try {
        cloned = new DOMQuad(
          structuredCloneInternal(value.p1, map),
          structuredCloneInternal(value.p2, map),
          structuredCloneInternal(value.p3, map),
          structuredCloneInternal(value.p4, map)
        );
      } catch (error) {
        cloned = tryNativeRestrictedStructuredClone(value, type);
      }
      break;
    case 'File':
      if (nativeRestrictedStructuredClone) try {
        cloned = nativeRestrictedStructuredClone(value);
        // NodeJS 20.0.0 bug, https://github.com/nodejs/node/issues/47612
        if (classof(cloned) !== type) cloned = undefined;
      } catch (error) { /* empty */ }
      if (!cloned) try {
        cloned = new File([value], value.name, value);
      } catch (error) { /* empty */ }
      if (!cloned) throwUnpolyfillable(type);
      break;
    case 'FileList':
      dataTransfer = createDataTransfer();
      if (dataTransfer) {
        for (i = 0, length = lengthOfArrayLike(value); i < length; i++) {
          dataTransfer.items.add(structuredCloneInternal(value[i], map));
        }
        cloned = dataTransfer.files;
      } else cloned = tryNativeRestrictedStructuredClone(value, type);
      break;
    case 'ImageData':
      // Safari 9 ImageData is a constructor, but typeof ImageData is 'object'
      try {
        cloned = new ImageData(
          structuredCloneInternal(value.data, map),
          value.width,
          value.height,
          { colorSpace: value.colorSpace }
        );
      } catch (error) {
        cloned = tryNativeRestrictedStructuredClone(value, type);
      } break;
    default:
      if (nativeRestrictedStructuredClone) {
        cloned = nativeRestrictedStructuredClone(value);
      } else switch (type) {
        case 'BigInt':
          // can be a 3rd party polyfill
          cloned = Object(value.valueOf());
          break;
        case 'Boolean':
          cloned = Object(thisBooleanValue(value));
          break;
        case 'Number':
          cloned = Object(thisNumberValue(value));
          break;
        case 'String':
          cloned = Object(thisStringValue(value));
          break;
        case 'Date':
          cloned = new Date(thisTimeValue(value));
          break;
        case 'Blob':
          try {
            cloned = value.slice(0, value.size, value.type);
          } catch (error) {
            throwUnpolyfillable(type);
          } break;
        case 'DOMPoint':
        case 'DOMPointReadOnly':
          C = globalThis[type];
          try {
            cloned = C.fromPoint
              ? C.fromPoint(value)
              : new C(value.x, value.y, value.z, value.w);
          } catch (error) {
            throwUnpolyfillable(type);
          } break;
        case 'DOMRect':
        case 'DOMRectReadOnly':
          C = globalThis[type];
          try {
            cloned = C.fromRect
              ? C.fromRect(value)
              : new C(value.x, value.y, value.width, value.height);
          } catch (error) {
            throwUnpolyfillable(type);
          } break;
        case 'DOMMatrix':
        case 'DOMMatrixReadOnly':
          C = globalThis[type];
          try {
            cloned = C.fromMatrix
              ? C.fromMatrix(value)
              : new C(value);
          } catch (error) {
            throwUnpolyfillable(type);
          } break;
        case 'AudioData':
        case 'VideoFrame':
          if (!isCallable(value.clone)) throwUnpolyfillable(type);
          try {
            cloned = value.clone();
          } catch (error) {
            throwUncloneable(type);
          } break;
        case 'CropTarget':
        case 'CryptoKey':
        case 'FileSystemDirectoryHandle':
        case 'FileSystemFileHandle':
        case 'FileSystemHandle':
        case 'GPUCompilationInfo':
        case 'GPUCompilationMessage':
        case 'ImageBitmap':
        case 'RTCCertificate':
        case 'WebAssembly.Module':
          throwUnpolyfillable(type);
          // break omitted
        default:
          throwUncloneable(type);
      }
  }

  mapSet(map, value, cloned);

  switch (type) {
    case 'Array':
    case 'Object':
      keys = objectKeys(value);
      for (i = 0, length = lengthOfArrayLike(keys); i < length; i++) {
        key = keys[i];
        createProperty(cloned, key, structuredCloneInternal(value[key], map));
      } break;
    case 'Map':
      value.forEach(function (v, k) {
        mapSet(cloned, structuredCloneInternal(k, map), structuredCloneInternal(v, map));
      });
      break;
    case 'Set':
      value.forEach(function (v) {
        setAdd(cloned, structuredCloneInternal(v, map));
      });
      break;
    case 'Error':
      createNonEnumerableProperty(cloned, 'message', structuredCloneInternal(value.message, map));
      if (hasOwn(value, 'cause')) {
        createNonEnumerableProperty(cloned, 'cause', structuredCloneInternal(value.cause, map));
      }
      if (name === 'AggregateError') {
        cloned.errors = structuredCloneInternal(value.errors, map);
      } else if (name === 'SuppressedError') {
        cloned.error = structuredCloneInternal(value.error, map);
        cloned.suppressed = structuredCloneInternal(value.suppressed, map);
      } // break omitted
    case 'DOMException':
      if (ERROR_STACK_INSTALLABLE) {
        createNonEnumerableProperty(cloned, 'stack', structuredCloneInternal(value.stack, map));
      }
  }

  return cloned;
};

var tryToTransfer = function (rawTransfer, map) {
  if (!isObject(rawTransfer)) throw new TypeError('Transfer option cannot be converted to a sequence');

  var transfer = [];

  iterate(rawTransfer, function (value) {
    push(transfer, anObject(value));
  });

  var i = 0;
  var length = lengthOfArrayLike(transfer);
  var buffers = new Set();
  var value, type, C, transferred, canvas, context;

  while (i < length) {
    value = transfer[i++];

    type = classof(value);

    if (type === 'ArrayBuffer' ? setHas(buffers, value) : mapHas(map, value)) {
      throw new DOMException('Duplicate transferable', DATA_CLONE_ERROR);
    }

    if (type === 'ArrayBuffer') {
      setAdd(buffers, value);
      continue;
    }

    if (PROPER_STRUCTURED_CLONE_TRANSFER) {
      transferred = nativeStructuredClone(value, { transfer: [value] });
    } else switch (type) {
      case 'ImageBitmap':
        C = globalThis.OffscreenCanvas;
        if (!isConstructor(C)) throwUnpolyfillable(type, TRANSFERRING);
        try {
          canvas = new C(value.width, value.height);
          context = canvas.getContext('bitmaprenderer');
          context.transferFromImageBitmap(value);
          transferred = canvas.transferToImageBitmap();
        } catch (error) { /* empty */ }
        break;
      case 'AudioData':
      case 'VideoFrame':
        if (!isCallable(value.clone) || !isCallable(value.close)) throwUnpolyfillable(type, TRANSFERRING);
        try {
          transferred = value.clone();
          value.close();
        } catch (error) { /* empty */ }
        break;
      case 'MediaSourceHandle':
      case 'MessagePort':
      case 'MIDIAccess':
      case 'OffscreenCanvas':
      case 'ReadableStream':
      case 'RTCDataChannel':
      case 'TransformStream':
      case 'WebTransportReceiveStream':
      case 'WebTransportSendStream':
      case 'WritableStream':
        throwUnpolyfillable(type, TRANSFERRING);
    }

    if (transferred === undefined) throw new DOMException('This object cannot be transferred: ' + type, DATA_CLONE_ERROR);

    mapSet(map, value, transferred);
  }

  return buffers;
};

var detachBuffers = function (buffers) {
  setIterate(buffers, function (buffer) {
    if (PROPER_STRUCTURED_CLONE_TRANSFER) {
      nativeRestrictedStructuredClone(buffer, { transfer: [buffer] });
    } else if (isCallable(buffer.transfer)) {
      buffer.transfer();
    } else if (detachTransferable) {
      detachTransferable(buffer);
    } else {
      throwUnpolyfillable('ArrayBuffer', TRANSFERRING);
    }
  });
};

// `structuredClone` method
// https://html.spec.whatwg.org/multipage/structured-data.html#dom-structuredclone
$({ global: true, enumerable: true, sham: !PROPER_STRUCTURED_CLONE_TRANSFER, forced: FORCED_REPLACEMENT }, {
  structuredClone: function structuredClone(value /* , { transfer } */) {
    var options = validateArgumentsLength(arguments.length, 1) > 1 && !isNullOrUndefined(arguments[1]) ? anObject(arguments[1]) : undefined;
    var transfer = options ? options.transfer : undefined;
    var map, buffers;

    if (transfer !== undefined) {
      map = new Map();
      buffers = tryToTransfer(transfer, map);
    }

    var clone = structuredCloneInternal(value, map);

    // since of an issue with cloning views of transferred buffers, we a forced to detach them later
    // https://github.com/zloirock/core-js/issues/1265
    if (buffers) detachBuffers(buffers);

    return clone;
  }
});


/***/ }),
/* 111 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var uncurryThis = __webpack_require__(6);
var fails = __webpack_require__(3);
var isCallable = __webpack_require__(8);
var classof = __webpack_require__(89);
var getBuiltIn = __webpack_require__(32);
var inspectSource = __webpack_require__(14);

var noop = function () { /* empty */ };
var construct = getBuiltIn('Reflect', 'construct');
var constructorRegExp = /^\s*(?:class|function)\b/;
var exec = uncurryThis(constructorRegExp.exec);
var INCORRECT_TO_STRING = !constructorRegExp.test(noop);

var isConstructorModern = function isConstructor(argument) {
  if (!isCallable(argument)) return false;
  try {
    construct(noop, [], argument);
    return true;
  } catch (error) {
    return false;
  }
};

var isConstructorLegacy = function isConstructor(argument) {
  if (!isCallable(argument)) return false;
  switch (classof(argument)) {
    case 'AsyncFunction':
    case 'GeneratorFunction':
    case 'AsyncGeneratorFunction': return false;
  }
  try {
    // we can't check .prototype since constructors produced by .bind haven't it
    // `Function#toString` throws on some built-it function in some legacy engines
    // (for example, `DOMQuad` and similar in FF41-)
    return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
  } catch (error) {
    return true;
  }
};

isConstructorLegacy.sham = true;

// `IsConstructor` abstract operation
// https://tc39.es/ecma262/#sec-isconstructor
module.exports = !construct || fails(function () {
  var called;
  return isConstructorModern(isConstructorModern.call)
    || !isConstructorModern(Object)
    || !isConstructorModern(function () { called = true; })
    || called;
}) ? isConstructorLegacy : isConstructorModern;


/***/ }),
/* 112 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var DESCRIPTORS = __webpack_require__(2);
var definePropertyModule = __webpack_require__(23);
var createPropertyDescriptor = __webpack_require__(45);

module.exports = function (object, key, value) {
  if (DESCRIPTORS) definePropertyModule.f(object, key, createPropertyDescriptor(0, value));
  else object[key] = value;
};


/***/ }),
/* 113 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $TypeError = TypeError;

module.exports = function (passed, required) {
  if (passed < required) throw new $TypeError('Not enough arguments');
  return passed;
};


/***/ }),
/* 114 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var call = __webpack_require__(30);
var hasOwn = __webpack_require__(9);
var isPrototypeOf = __webpack_require__(33);
var regExpFlags = __webpack_require__(115);

var RegExpPrototype = RegExp.prototype;

module.exports = function (R) {
  var flags = R.flags;
  return flags === undefined && !('flags' in RegExpPrototype) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype, R)
    ? call(regExpFlags, R) : flags;
};


/***/ }),
/* 115 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var anObject = __webpack_require__(27);

// `RegExp.prototype.flags` getter implementation
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
module.exports = function () {
  var that = anObject(this);
  var result = '';
  if (that.hasIndices) result += 'd';
  if (that.global) result += 'g';
  if (that.ignoreCase) result += 'i';
  if (that.multiline) result += 'm';
  if (that.dotAll) result += 's';
  if (that.unicode) result += 'u';
  if (that.unicodeSets) result += 'v';
  if (that.sticky) result += 'y';
  return result;
};


/***/ }),
/* 116 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var uncurryThis = __webpack_require__(6);

// eslint-disable-next-line es/no-set -- safe
var SetPrototype = Set.prototype;

module.exports = {
  // eslint-disable-next-line es/no-set -- safe
  Set: Set,
  add: uncurryThis(SetPrototype.add),
  has: uncurryThis(SetPrototype.has),
  remove: uncurryThis(SetPrototype['delete']),
  proto: SetPrototype
};


/***/ }),
/* 117 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var uncurryThis = __webpack_require__(6);
var iterateSimple = __webpack_require__(118);
var SetHelpers = __webpack_require__(116);

var Set = SetHelpers.Set;
var SetPrototype = SetHelpers.proto;
var forEach = uncurryThis(SetPrototype.forEach);
var keys = uncurryThis(SetPrototype.keys);
var next = keys(new Set()).next;

module.exports = function (set, fn, interruptible) {
  return interruptible ? iterateSimple({ iterator: keys(set), next: next }, fn) : forEach(set, fn);
};


/***/ }),
/* 118 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var call = __webpack_require__(30);

module.exports = function (record, fn, ITERATOR_INSTEAD_OF_RECORD) {
  var iterator = ITERATOR_INSTEAD_OF_RECORD ? record : record.iterator;
  var next = record.next;
  var step, result;
  while (!(step = call(next, iterator)).done) {
    result = fn(step.value);
    if (result !== undefined) return result;
  }
};


/***/ }),
/* 119 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fails = __webpack_require__(3);
var createPropertyDescriptor = __webpack_require__(45);

module.exports = !fails(function () {
  var error = new Error('a');
  if (!('stack' in error)) return true;
  // eslint-disable-next-line es/no-object-defineproperty -- safe
  Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));
  return error.stack !== 7;
});


/***/ }),
/* 120 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(54);
var getBuiltIn = __webpack_require__(32);
var fails = __webpack_require__(3);
var validateArgumentsLength = __webpack_require__(113);
var toString = __webpack_require__(107);
var USE_NATIVE_URL = __webpack_require__(121);

var URL = getBuiltIn('URL');

// https://github.com/nodejs/node/issues/47505
// https://github.com/denoland/deno/issues/18893
var THROWS_WITHOUT_ARGUMENTS = USE_NATIVE_URL && fails(function () {
  URL.canParse();
});

// Bun ~ 1.0.30 bug
// https://github.com/oven-sh/bun/issues/9250
var WRONG_ARITY = fails(function () {
  return URL.canParse.length !== 1;
});

// `URL.canParse` method
// https://url.spec.whatwg.org/#dom-url-canparse
$({ target: 'URL', stat: true, forced: !THROWS_WITHOUT_ARGUMENTS || WRONG_ARITY }, {
  canParse: function canParse(url) {
    var length = validateArgumentsLength(arguments.length, 1);
    var urlString = toString(url);
    var base = length < 2 || arguments[1] === undefined ? undefined : toString(arguments[1]);
    try {
      return !!new URL(urlString, base);
    } catch (error) {
      return false;
    }
  }
});


/***/ }),
/* 121 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fails = __webpack_require__(3);
var wellKnownSymbol = __webpack_require__(42);
var DESCRIPTORS = __webpack_require__(2);
var IS_PURE = __webpack_require__(16);

var ITERATOR = wellKnownSymbol('iterator');

module.exports = !fails(function () {
  // eslint-disable-next-line unicorn/relative-url-style -- required for testing
  var url = new URL('b?a=1&b=2&c=3', 'https://a');
  var params = url.searchParams;
  var params2 = new URLSearchParams('a=1&a=2&b=3');
  var result = '';
  url.pathname = 'c%20d';
  params.forEach(function (value, key) {
    params['delete']('b');
    result += key + value;
  });
  params2['delete']('a', 2);
  // `undefined` case is a Chromium 117 bug
  // https://bugs.chromium.org/p/v8/issues/detail?id=14222
  params2['delete']('b', undefined);
  return (IS_PURE && (!url.toJSON || !params2.has('a', 1) || params2.has('a', 2) || !params2.has('a', undefined) || params2.has('b')))
    || (!params.size && (IS_PURE || !DESCRIPTORS))
    || !params.sort
    || url.href !== 'https://a/c%20d?a=1&c=3'
    || params.get('c') !== '3'
    || String(new URLSearchParams('?a=1')) !== 'a=1'
    || !params[ITERATOR]
    // throws in Edge
    || new URL('https://a@b').username !== 'a'
    || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'
    // not punycoded in Edge
    || new URL('https://Ñ‚ÐµÑÑ‚').host !== 'xn--e1aybc'
    // not escaped in Chrome 62-
    || new URL('https://a#Ð±').hash !== '#%D0%B1'
    // fails in Chrome 66-
    || result !== 'a1c3'
    // throws in Safari
    || new URL('https://x', undefined).host !== 'x';
});


/***/ }),
/* 122 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(54);
var getBuiltIn = __webpack_require__(32);
var validateArgumentsLength = __webpack_require__(113);
var toString = __webpack_require__(107);
var USE_NATIVE_URL = __webpack_require__(121);

var URL = getBuiltIn('URL');

// `URL.parse` method
// https://url.spec.whatwg.org/#dom-url-canparse
$({ target: 'URL', stat: true, forced: !USE_NATIVE_URL }, {
  parse: function parse(url) {
    var length = validateArgumentsLength(arguments.length, 1);
    var urlString = toString(url);
    var base = length < 2 || arguments[1] === undefined ? undefined : toString(arguments[1]);
    try {
      return new URL(urlString, base);
    } catch (error) {
      return null;
    }
  }
});


/***/ }),
/* 123 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var defineBuiltIn = __webpack_require__(59);
var uncurryThis = __webpack_require__(6);
var toString = __webpack_require__(107);
var validateArgumentsLength = __webpack_require__(113);

var $URLSearchParams = URLSearchParams;
var URLSearchParamsPrototype = $URLSearchParams.prototype;
var append = uncurryThis(URLSearchParamsPrototype.append);
var $delete = uncurryThis(URLSearchParamsPrototype['delete']);
var forEach = uncurryThis(URLSearchParamsPrototype.forEach);
var push = uncurryThis([].push);
var params = new $URLSearchParams('a=1&a=2&b=3');

params['delete']('a', 1);
// `undefined` case is a Chromium 117 bug
// https://bugs.chromium.org/p/v8/issues/detail?id=14222
params['delete']('b', undefined);

if (params + '' !== 'a=2') {
  defineBuiltIn(URLSearchParamsPrototype, 'delete', function (name /* , value */) {
    var length = arguments.length;
    var $value = length < 2 ? undefined : arguments[1];
    if (length && $value === undefined) return $delete(this, name);
    var entries = [];
    forEach(this, function (v, k) { // also validates `this`
      push(entries, { key: k, value: v });
    });
    validateArgumentsLength(length, 1);
    var key = toString(name);
    var value = toString($value);
    var index = 0;
    var dindex = 0;
    var found = false;
    var entriesLength = entries.length;
    var entry;
    while (index < entriesLength) {
      entry = entries[index++];
      if (found || entry.key === key) {
        found = true;
        $delete(this, entry.key);
      } else dindex++;
    }
    while (dindex < entriesLength) {
      entry = entries[dindex++];
      if (!(entry.key === key && entry.value === value)) append(this, entry.key, entry.value);
    }
  }, { enumerable: true, unsafe: true });
}


/***/ }),
/* 124 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var defineBuiltIn = __webpack_require__(59);
var uncurryThis = __webpack_require__(6);
var toString = __webpack_require__(107);
var validateArgumentsLength = __webpack_require__(113);

var $URLSearchParams = URLSearchParams;
var URLSearchParamsPrototype = $URLSearchParams.prototype;
var getAll = uncurryThis(URLSearchParamsPrototype.getAll);
var $has = uncurryThis(URLSearchParamsPrototype.has);
var params = new $URLSearchParams('a=1');

// `undefined` case is a Chromium 117 bug
// https://bugs.chromium.org/p/v8/issues/detail?id=14222
if (params.has('a', 2) || !params.has('a', undefined)) {
  defineBuiltIn(URLSearchParamsPrototype, 'has', function has(name /* , value */) {
    var length = arguments.length;
    var $value = length < 2 ? undefined : arguments[1];
    if (length && $value === undefined) return $has(this, name);
    var values = getAll(this, name); // also validates `this`
    validateArgumentsLength(length, 1);
    var value = toString($value);
    var index = 0;
    while (index < values.length) {
      if (values[index++] === value) return true;
    } return false;
  }, { enumerable: true, unsafe: true });
}


/***/ }),
/* 125 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var DESCRIPTORS = __webpack_require__(2);
var uncurryThis = __webpack_require__(6);
var defineBuiltInAccessor = __webpack_require__(4);

var URLSearchParamsPrototype = URLSearchParams.prototype;
var forEach = uncurryThis(URLSearchParamsPrototype.forEach);

// `URLSearchParams.prototype.size` getter
// https://github.com/whatwg/url/pull/734
if (DESCRIPTORS && !('size' in URLSearchParamsPrototype)) {
  defineBuiltInAccessor(URLSearchParamsPrototype, 'size', {
    get: function size() {
      var count = 0;
      forEach(this, function () { count++; });
      return count;
    },
    configurable: true,
    enumerable: true
  });
}


/***/ })
/******/ ]); }();
                                                                                                                                                                                                                                                                                                                                                                                                dist/vendor/wp-polyfill.min.js                                                                      0000644                 00000101720 15212564037 0012410 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * core-js 3.39.0
 * Â© 2014-2024 Denis Pushkarev (zloirock.ru)
 * license: https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE
 * source: https://github.com/zloirock/core-js
 */
!function(r){"use strict";var t,e,n;t=[function(r,t,e){e(1),e(53),e(81),e(82),e(93),e(94),e(99),e(100),e(110),e(120),e(122),e(123),e(124),r.exports=e(125)},function(r,t,e){var n=e(2),o=e(4),a=e(48),c=ArrayBuffer.prototype;n&&!("detached"in c)&&o(c,"detached",{configurable:!0,get:function(){return a(this)}})},function(r,t,e){var n=e(3);r.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(r,t,e){r.exports=function(r){try{return!!r()}catch(r){return!0}}},function(r,t,e){var n=e(5),o=e(23);r.exports=function(r,t,e){return e.get&&n(e.get,t,{getter:!0}),e.set&&n(e.set,t,{setter:!0}),o.f(r,t,e)}},function(t,e,n){var o=n(6),a=n(3),c=n(8),i=n(9),u=n(2),s=n(13).CONFIGURABLE,f=n(14),p=n(19),l=p.enforce,y=p.get,v=String,h=Object.defineProperty,g=o("".slice),b=o("".replace),m=o([].join),d=u&&!a((function(){return 8!==h((function(){}),"length",{value:8}).length})),w=String(String).split("String"),E=t.exports=function(t,e,n){"Symbol("===g(v(e),0,7)&&(e="["+b(v(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!i(t,"name")||s&&t.name!==e)&&(u?h(t,"name",{value:e,configurable:!0}):t.name=e),d&&n&&i(n,"arity")&&t.length!==n.arity&&h(t,"length",{value:n.arity});try{n&&i(n,"constructor")&&n.constructor?u&&h(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=r)}catch(r){}var o=l(t);return i(o,"source")||(o.source=m(w,"string"==typeof e?e:"")),t};Function.prototype.toString=E((function(){return c(this)&&y(this).source||f(this)}),"toString")},function(r,t,e){var n=e(7),o=Function.prototype,a=o.call,c=n&&o.bind.bind(a,a);r.exports=n?c:function(r){return function(){return a.apply(r,arguments)}}},function(r,t,e){var n=e(3);r.exports=!n((function(){var r=function(){}.bind();return"function"!=typeof r||r.hasOwnProperty("prototype")}))},function(t,e,n){var o="object"==typeof document&&document.all;t.exports=void 0===o&&o!==r?function(r){return"function"==typeof r||r===o}:function(r){return"function"==typeof r}},function(r,t,e){var n=e(6),o=e(10),a=n({}.hasOwnProperty);r.exports=Object.hasOwn||function(r,t){return a(o(r),t)}},function(r,t,e){var n=e(11),o=Object;r.exports=function(r){return o(n(r))}},function(r,t,e){var n=e(12),o=TypeError;r.exports=function(r){if(n(r))throw new o("Can't call method on "+r);return r}},function(t,e,n){t.exports=function(t){return null===t||t===r}},function(r,t,e){var n=e(2),o=e(9),a=Function.prototype,c=n&&Object.getOwnPropertyDescriptor,i=o(a,"name"),u=i&&"something"===function(){}.name,s=i&&(!n||n&&c(a,"name").configurable);r.exports={EXISTS:i,PROPER:u,CONFIGURABLE:s}},function(r,t,e){var n=e(6),o=e(8),a=e(15),c=n(Function.toString);o(a.inspectSource)||(a.inspectSource=function(r){return c(r)}),r.exports=a.inspectSource},function(r,t,e){var n=e(16),o=e(17),a=e(18),c="__core-js_shared__",i=r.exports=o[c]||a(c,{});(i.versions||(i.versions=[])).push({version:"3.39.0",mode:n?"pure":"global",copyright:"Â© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE",source:"https://github.com/zloirock/core-js"})},function(r,t,e){r.exports=!1},function(r,t,e){var n=function(r){return r&&r.Math===Math&&r};r.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof global&&global)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},function(r,t,e){var n=e(17),o=Object.defineProperty;r.exports=function(r,t){try{o(n,r,{value:t,configurable:!0,writable:!0})}catch(e){n[r]=t}return t}},function(r,t,e){var n,o,a,c=e(20),i=e(17),u=e(21),s=e(22),f=e(9),p=e(15),l=e(46),y=e(47),v="Object already initialized",h=i.TypeError,g=i.WeakMap;if(c||p.state){var b=p.state||(p.state=new g);b.get=b.get,b.has=b.has,b.set=b.set,n=function(r,t){if(b.has(r))throw new h(v);return t.facade=r,b.set(r,t),t},o=function(r){return b.get(r)||{}},a=function(r){return b.has(r)}}else{var m=l("state");y[m]=!0,n=function(r,t){if(f(r,m))throw new h(v);return t.facade=r,s(r,m,t),t},o=function(r){return f(r,m)?r[m]:{}},a=function(r){return f(r,m)}}r.exports={set:n,get:o,has:a,enforce:function(r){return a(r)?o(r):n(r,{})},getterFor:function(r){return function(t){var e;if(!u(t)||(e=o(t)).type!==r)throw new h("Incompatible receiver, "+r+" required");return e}}}},function(r,t,e){var n=e(17),o=e(8),a=n.WeakMap;r.exports=o(a)&&/native code/.test(String(a))},function(r,t,e){var n=e(8);r.exports=function(r){return"object"==typeof r?null!==r:n(r)}},function(r,t,e){var n=e(2),o=e(23),a=e(45);r.exports=n?function(r,t,e){return o.f(r,t,a(1,e))}:function(r,t,e){return r[t]=e,r}},function(r,t,e){var n=e(2),o=e(24),a=e(26),c=e(27),i=e(28),u=TypeError,s=Object.defineProperty,f=Object.getOwnPropertyDescriptor,p="enumerable",l="configurable",y="writable";t.f=n?a?function(r,t,e){if(c(r),t=i(t),c(e),"function"==typeof r&&"prototype"===t&&"value"in e&&y in e&&!e[y]){var n=f(r,t);n&&n[y]&&(r[t]=e.value,e={configurable:l in e?e[l]:n[l],enumerable:p in e?e[p]:n[p],writable:!1})}return s(r,t,e)}:s:function(r,t,e){if(c(r),t=i(t),c(e),o)try{return s(r,t,e)}catch(r){}if("get"in e||"set"in e)throw new u("Accessors not supported");return"value"in e&&(r[t]=e.value),r}},function(r,t,e){var n=e(2),o=e(3),a=e(25);r.exports=!n&&!o((function(){return 7!==Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},function(r,t,e){var n=e(17),o=e(21),a=n.document,c=o(a)&&o(a.createElement);r.exports=function(r){return c?a.createElement(r):{}}},function(r,t,e){var n=e(2),o=e(3);r.exports=n&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},function(r,t,e){var n=e(21),o=String,a=TypeError;r.exports=function(r){if(n(r))return r;throw new a(o(r)+" is not an object")}},function(r,t,e){var n=e(29),o=e(31);r.exports=function(r){var t=n(r,"string");return o(t)?t:t+""}},function(t,e,n){var o=n(30),a=n(21),c=n(31),i=n(38),u=n(41),s=n(42),f=TypeError,p=s("toPrimitive");t.exports=function(t,e){if(!a(t)||c(t))return t;var n,s=i(t,p);if(s){if(e===r&&(e="default"),n=o(s,t,e),!a(n)||c(n))return n;throw new f("Can't convert object to primitive value")}return e===r&&(e="number"),u(t,e)}},function(r,t,e){var n=e(7),o=Function.prototype.call;r.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},function(r,t,e){var n=e(32),o=e(8),a=e(33),c=e(34),i=Object;r.exports=c?function(r){return"symbol"==typeof r}:function(r){var t=n("Symbol");return o(t)&&a(t.prototype,i(r))}},function(t,e,n){var o=n(17),a=n(8);t.exports=function(t,e){return arguments.length<2?(n=o[t],a(n)?n:r):o[t]&&o[t][e];var n}},function(r,t,e){var n=e(6);r.exports=n({}.isPrototypeOf)},function(r,t,e){var n=e(35);r.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(r,t,e){var n=e(36),o=e(3),a=e(17).String;r.exports=!!Object.getOwnPropertySymbols&&!o((function(){var r=Symbol("symbol detection");return!a(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},function(r,t,e){var n,o,a=e(17),c=e(37),i=a.process,u=a.Deno,s=i&&i.versions||u&&u.version,f=s&&s.v8;f&&(o=(n=f.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&c&&(!(n=c.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=c.match(/Chrome\/(\d+)/))&&(o=+n[1]),r.exports=o},function(r,t,e){var n=e(17).navigator,o=n&&n.userAgent;r.exports=o?String(o):""},function(t,e,n){var o=n(39),a=n(12);t.exports=function(t,e){var n=t[e];return a(n)?r:o(n)}},function(r,t,e){var n=e(8),o=e(40),a=TypeError;r.exports=function(r){if(n(r))return r;throw new a(o(r)+" is not a function")}},function(r,t,e){var n=String;r.exports=function(r){try{return n(r)}catch(r){return"Object"}}},function(r,t,e){var n=e(30),o=e(8),a=e(21),c=TypeError;r.exports=function(r,t){var e,i;if("string"===t&&o(e=r.toString)&&!a(i=n(e,r)))return i;if(o(e=r.valueOf)&&!a(i=n(e,r)))return i;if("string"!==t&&o(e=r.toString)&&!a(i=n(e,r)))return i;throw new c("Can't convert object to primitive value")}},function(r,t,e){var n=e(17),o=e(43),a=e(9),c=e(44),i=e(35),u=e(34),s=n.Symbol,f=o("wks"),p=u?s.for||s:s&&s.withoutSetter||c;r.exports=function(r){return a(f,r)||(f[r]=i&&a(s,r)?s[r]:p("Symbol."+r)),f[r]}},function(r,t,e){var n=e(15);r.exports=function(r,t){return n[r]||(n[r]=t||{})}},function(t,e,n){var o=n(6),a=0,c=Math.random(),i=o(1..toString);t.exports=function(t){return"Symbol("+(t===r?"":t)+")_"+i(++a+c,36)}},function(r,t,e){r.exports=function(r,t){return{enumerable:!(1&r),configurable:!(2&r),writable:!(4&r),value:t}}},function(r,t,e){var n=e(43),o=e(44),a=n("keys");r.exports=function(r){return a[r]||(a[r]=o(r))}},function(r,t,e){r.exports={}},function(r,t,e){var n=e(17),o=e(49),a=e(51),c=n.ArrayBuffer,i=c&&c.prototype,u=i&&o(i.slice);r.exports=function(r){if(0!==a(r))return!1;if(!u)return!1;try{return u(r,0,0),!1}catch(r){return!0}}},function(r,t,e){var n=e(50),o=e(6);r.exports=function(r){if("Function"===n(r))return o(r)}},function(r,t,e){var n=e(6),o=n({}.toString),a=n("".slice);r.exports=function(r){return a(o(r),8,-1)}},function(r,t,e){var n=e(17),o=e(52),a=e(50),c=n.ArrayBuffer,i=n.TypeError;r.exports=c&&o(c.prototype,"byteLength","get")||function(r){if("ArrayBuffer"!==a(r))throw new i("ArrayBuffer expected");return r.byteLength}},function(r,t,e){var n=e(6),o=e(39);r.exports=function(r,t,e){try{return n(o(Object.getOwnPropertyDescriptor(r,t)[e]))}catch(r){}}},function(t,e,n){var o=n(54),a=n(73);a&&o({target:"ArrayBuffer",proto:!0},{transfer:function(){return a(this,arguments.length?arguments[0]:r,!0)}})},function(t,e,n){var o=n(17),a=n(55).f,c=n(22),i=n(59),u=n(18),s=n(60),f=n(72);t.exports=function(t,e){var n,p,l,y,v,h=t.target,g=t.global,b=t.stat;if(n=g?o:b?o[h]||u(h,{}):o[h]&&o[h].prototype)for(p in e){if(y=e[p],l=t.dontCallGetSet?(v=a(n,p))&&v.value:n[p],!f(g?p:h+(b?".":"#")+p,t.forced)&&l!==r){if(typeof y==typeof l)continue;s(y,l)}(t.sham||l&&l.sham)&&c(y,"sham",!0),i(n,p,y,t)}}},function(r,t,e){var n=e(2),o=e(30),a=e(56),c=e(45),i=e(57),u=e(28),s=e(9),f=e(24),p=Object.getOwnPropertyDescriptor;t.f=n?p:function(r,t){if(r=i(r),t=u(t),f)try{return p(r,t)}catch(r){}if(s(r,t))return c(!o(a.f,r,t),r[t])}},function(r,t,e){var n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,a=o&&!n.call({1:2},1);t.f=a?function(r){var t=o(this,r);return!!t&&t.enumerable}:n},function(r,t,e){var n=e(58),o=e(11);r.exports=function(r){return n(o(r))}},function(r,t,e){var n=e(6),o=e(3),a=e(50),c=Object,i=n("".split);r.exports=o((function(){return!c("z").propertyIsEnumerable(0)}))?function(r){return"String"===a(r)?i(r,""):c(r)}:c},function(t,e,n){var o=n(8),a=n(23),c=n(5),i=n(18);t.exports=function(t,e,n,u){u||(u={});var s=u.enumerable,f=u.name!==r?u.name:e;if(o(n)&&c(n,f,u),u.global)s?t[e]=n:i(e,n);else{try{u.unsafe?t[e]&&(s=!0):delete t[e]}catch(r){}s?t[e]=n:a.f(t,e,{value:n,enumerable:!1,configurable:!u.nonConfigurable,writable:!u.nonWritable})}return t}},function(r,t,e){var n=e(9),o=e(61),a=e(55),c=e(23);r.exports=function(r,t,e){for(var i=o(t),u=c.f,s=a.f,f=0;f<i.length;f++){var p=i[f];n(r,p)||e&&n(e,p)||u(r,p,s(t,p))}}},function(r,t,e){var n=e(32),o=e(6),a=e(62),c=e(71),i=e(27),u=o([].concat);r.exports=n("Reflect","ownKeys")||function(r){var t=a.f(i(r)),e=c.f;return e?u(t,e(r)):t}},function(r,t,e){var n=e(63),o=e(70).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(r){return n(r,o)}},function(r,t,e){var n=e(6),o=e(9),a=e(57),c=e(64).indexOf,i=e(47),u=n([].push);r.exports=function(r,t){var e,n=a(r),s=0,f=[];for(e in n)!o(i,e)&&o(n,e)&&u(f,e);for(;t.length>s;)o(n,e=t[s++])&&(~c(f,e)||u(f,e));return f}},function(r,t,e){var n=e(57),o=e(65),a=e(68),c=function(r){return function(t,e,c){var i=n(t),u=a(i);if(0===u)return!r&&-1;var s,f=o(c,u);if(r&&e!=e){for(;u>f;)if((s=i[f++])!=s)return!0}else for(;u>f;f++)if((r||f in i)&&i[f]===e)return r||f||0;return!r&&-1}};r.exports={includes:c(!0),indexOf:c(!1)}},function(r,t,e){var n=e(66),o=Math.max,a=Math.min;r.exports=function(r,t){var e=n(r);return e<0?o(e+t,0):a(e,t)}},function(r,t,e){var n=e(67);r.exports=function(r){var t=+r;return t!=t||0===t?0:n(t)}},function(r,t,e){var n=Math.ceil,o=Math.floor;r.exports=Math.trunc||function(r){var t=+r;return(t>0?o:n)(t)}},function(r,t,e){var n=e(69);r.exports=function(r){return n(r.length)}},function(r,t,e){var n=e(66),o=Math.min;r.exports=function(r){var t=n(r);return t>0?o(t,9007199254740991):0}},function(r,t,e){r.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(r,t,e){t.f=Object.getOwnPropertySymbols},function(r,t,e){var n=e(3),o=e(8),a=/#|\.prototype\./,c=function(r,t){var e=u[i(r)];return e===f||e!==s&&(o(t)?n(t):!!t)},i=c.normalize=function(r){return String(r).replace(a,".").toLowerCase()},u=c.data={},s=c.NATIVE="N",f=c.POLYFILL="P";r.exports=c},function(t,e,n){var o=n(17),a=n(6),c=n(52),i=n(74),u=n(75),s=n(51),f=n(76),p=n(80),l=o.structuredClone,y=o.ArrayBuffer,v=o.DataView,h=Math.min,g=y.prototype,b=v.prototype,m=a(g.slice),d=c(g,"resizable","get"),w=c(g,"maxByteLength","get"),E=a(b.getInt8),x=a(b.setInt8);t.exports=(p||f)&&function(t,e,n){var o,a=s(t),c=e===r?a:i(e),g=!d||!d(t);if(u(t),p&&(t=l(t,{transfer:[t]}),a===c&&(n||g)))return t;if(a>=c&&(!n||g))o=m(t,0,c);else{var b=n&&!g&&w?{maxByteLength:w(t)}:r;o=new y(c,b);for(var O=new v(t),R=new v(o),S=h(c,a),A=0;A<S;A++)x(R,A,E(O,A))}return p||f(t),o}},function(t,e,n){var o=n(66),a=n(69),c=RangeError;t.exports=function(t){if(t===r)return 0;var e=o(t),n=a(e);if(e!==n)throw new c("Wrong length or index");return n}},function(r,t,e){var n=e(48),o=TypeError;r.exports=function(r){if(n(r))throw new o("ArrayBuffer is detached");return r}},function(r,t,e){var n,o,a,c,i=e(17),u=e(77),s=e(80),f=i.structuredClone,p=i.ArrayBuffer,l=i.MessageChannel,y=!1;if(s)y=function(r){f(r,{transfer:[r]})};else if(p)try{l||(n=u("worker_threads"))&&(l=n.MessageChannel),l&&(o=new l,a=new p(2),c=function(r){o.port1.postMessage(null,[r])},2===a.byteLength&&(c(a),0===a.byteLength&&(y=c)))}catch(r){}r.exports=y},function(r,t,e){var n=e(17),o=e(78);r.exports=function(r){if(o){try{return n.process.getBuiltinModule(r)}catch(r){}try{return Function('return require("'+r+'")')()}catch(r){}}}},function(r,t,e){var n=e(79);r.exports="NODE"===n},function(r,t,e){var n=e(17),o=e(37),a=e(50),c=function(r){return o.slice(0,r.length)===r};r.exports=c("Bun/")?"BUN":c("Cloudflare-Workers")?"CLOUDFLARE":c("Deno/")?"DENO":c("Node.js/")?"NODE":n.Bun&&"string"==typeof Bun.version?"BUN":n.Deno&&"object"==typeof Deno.version?"DENO":"process"===a(n.process)?"NODE":n.window&&n.document?"BROWSER":"REST"},function(r,t,e){var n=e(17),o=e(3),a=e(36),c=e(79),i=n.structuredClone;r.exports=!!i&&!o((function(){if("DENO"===c&&a>92||"NODE"===c&&a>94||"BROWSER"===c&&a>97)return!1;var r=new ArrayBuffer(8),t=i(r,{transfer:[r]});return 0!==r.byteLength||8!==t.byteLength}))},function(t,e,n){var o=n(54),a=n(73);a&&o({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return a(this,arguments.length?arguments[0]:r,!1)}})},function(r,t,e){var n=e(54),o=e(6),a=e(39),c=e(11),i=e(83),u=e(92),s=e(16),f=e(3),p=u.Map,l=u.has,y=u.get,v=u.set,h=o([].push),g=s||f((function(){return 1!==p.groupBy("ab",(function(r){return r})).get("a").length}));n({target:"Map",stat:!0,forced:s||g},{groupBy:function(r,t){c(r),a(t);var e=new p,n=0;return i(r,(function(r){var o=t(r,n++);l(e,o)?h(y(e,o),r):v(e,o,[r])})),e}})},function(r,t,e){var n=e(84),o=e(30),a=e(27),c=e(40),i=e(85),u=e(68),s=e(33),f=e(87),p=e(88),l=e(91),y=TypeError,v=function(r,t){this.stopped=r,this.result=t},h=v.prototype;r.exports=function(r,t,e){var g,b,m,d,w,E,x,O=e&&e.that,R=!(!e||!e.AS_ENTRIES),S=!(!e||!e.IS_RECORD),A=!(!e||!e.IS_ITERATOR),T=!(!e||!e.INTERRUPTED),D=n(t,O),_=function(r){return g&&l(g,"normal",r),new v(!0,r)},I=function(r){return R?(a(r),T?D(r[0],r[1],_):D(r[0],r[1])):T?D(r,_):D(r)};if(S)g=r.iterator;else if(A)g=r;else{if(!(b=p(r)))throw new y(c(r)+" is not iterable");if(i(b)){for(m=0,d=u(r);d>m;m++)if((w=I(r[m]))&&s(h,w))return w;return new v(!1)}g=f(r,b)}for(E=S?r.next:g.next;!(x=o(E,g)).done;){try{w=I(x.value)}catch(r){l(g,"throw",r)}if("object"==typeof w&&w&&s(h,w))return w}return new v(!1)}},function(t,e,n){var o=n(49),a=n(39),c=n(7),i=o(o.bind);t.exports=function(t,e){return a(t),e===r?t:c?i(t,e):function(){return t.apply(e,arguments)}}},function(t,e,n){var o=n(42),a=n(86),c=o("iterator"),i=Array.prototype;t.exports=function(t){return t!==r&&(a.Array===t||i[c]===t)}},function(r,t,e){r.exports={}},function(r,t,e){var n=e(30),o=e(39),a=e(27),c=e(40),i=e(88),u=TypeError;r.exports=function(r,t){var e=arguments.length<2?i(r):t;if(o(e))return a(n(e,r));throw new u(c(r)+" is not iterable")}},function(r,t,e){var n=e(89),o=e(38),a=e(12),c=e(86),i=e(42)("iterator");r.exports=function(r){if(!a(r))return o(r,i)||o(r,"@@iterator")||c[n(r)]}},function(t,e,n){var o=n(90),a=n(8),c=n(50),i=n(42)("toStringTag"),u=Object,s="Arguments"===c(function(){return arguments}());t.exports=o?c:function(t){var e,n,o;return t===r?"Undefined":null===t?"Null":"string"==typeof(n=function(r,t){try{return r[t]}catch(r){}}(e=u(t),i))?n:s?c(e):"Object"===(o=c(e))&&a(e.callee)?"Arguments":o}},function(r,t,e){var n={};n[e(42)("toStringTag")]="z",r.exports="[object z]"===String(n)},function(r,t,e){var n=e(30),o=e(27),a=e(38);r.exports=function(r,t,e){var c,i;o(r);try{if(!(c=a(r,"return"))){if("throw"===t)throw e;return e}c=n(c,r)}catch(r){i=!0,c=r}if("throw"===t)throw e;if(i)throw c;return o(c),e}},function(r,t,e){var n=e(6),o=Map.prototype;r.exports={Map:Map,set:n(o.set),get:n(o.get),has:n(o.has),remove:n(o.delete),proto:o}},function(r,t,e){var n=e(54),o=e(32),a=e(6),c=e(39),i=e(11),u=e(28),s=e(83),f=e(3),p=Object.groupBy,l=o("Object","create"),y=a([].push);n({target:"Object",stat:!0,forced:!p||f((function(){return 1!==p("ab",(function(r){return r})).a.length}))},{groupBy:function(r,t){i(r),c(t);var e=l(null),n=0;return s(r,(function(r){var o=u(t(r,n++));o in e?y(e[o],r):e[o]=[r]})),e}})},function(t,e,n){var o=n(54),a=n(17),c=n(95),i=n(96),u=n(97),s=n(39),f=n(98),p=a.Promise,l=!1;o({target:"Promise",stat:!0,forced:!p||!p.try||f((function(){p.try((function(r){l=8===r}),8)})).error||!l},{try:function(t){var e=arguments.length>1?i(arguments,1):[],n=u.f(this),o=f((function(){return c(s(t),r,e)}));return(o.error?n.reject:n.resolve)(o.value),n.promise}})},function(r,t,e){var n=e(7),o=Function.prototype,a=o.apply,c=o.call;r.exports="object"==typeof Reflect&&Reflect.apply||(n?c.bind(a):function(){return c.apply(a,arguments)})},function(r,t,e){var n=e(6);r.exports=n([].slice)},function(t,e,n){var o=n(39),a=TypeError,c=function(t){var e,n;this.promise=new t((function(t,o){if(e!==r||n!==r)throw new a("Bad Promise constructor");e=t,n=o})),this.resolve=o(e),this.reject=o(n)};t.exports.f=function(r){return new c(r)}},function(r,t,e){r.exports=function(r){try{return{error:!1,value:r()}}catch(r){return{error:!0,value:r}}}},function(r,t,e){var n=e(54),o=e(97);n({target:"Promise",stat:!0},{withResolvers:function(){var r=o.f(this);return{promise:r.promise,resolve:r.resolve,reject:r.reject}}})},function(t,e,n){var o=n(54),a=n(17),c=n(32),i=n(45),u=n(23).f,s=n(9),f=n(101),p=n(102),l=n(106),y=n(108),v=n(109),h=n(2),g=n(16),b="DOMException",m=c("Error"),d=c(b),w=function(){f(this,E);var t=arguments.length,e=l(t<1?r:arguments[0]),n=l(t<2?r:arguments[1],"Error"),o=new d(e,n),a=new m(e);return a.name=b,u(o,"stack",i(1,v(a.stack,1))),p(o,this,w),o},E=w.prototype=d.prototype,x="stack"in new m(b),O="stack"in new d(1,2),R=d&&h&&Object.getOwnPropertyDescriptor(a,b),S=!(!R||R.writable&&R.configurable),A=x&&!S&&!O;o({global:!0,constructor:!0,forced:g||A},{DOMException:A?w:d});var T=c(b),D=T.prototype;if(D.constructor!==T)for(var _ in g||u(D,"constructor",i(1,T)),y)if(s(y,_)){var I=y[_],j=I.s;s(T,j)||u(T,j,i(6,I.c))}},function(r,t,e){var n=e(33),o=TypeError;r.exports=function(r,t){if(n(t,r))return r;throw new o("Incorrect invocation")}},function(r,t,e){var n=e(8),o=e(21),a=e(103);r.exports=function(r,t,e){var c,i;return a&&n(c=t.constructor)&&c!==e&&o(i=c.prototype)&&i!==e.prototype&&a(r,i),r}},function(t,e,n){var o=n(52),a=n(21),c=n(11),i=n(104);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var r,t=!1,e={};try{(r=o(Object.prototype,"__proto__","set"))(e,[]),t=e instanceof Array}catch(r){}return function(e,n){return c(e),i(n),a(e)?(t?r(e,n):e.__proto__=n,e):e}}():r)},function(r,t,e){var n=e(105),o=String,a=TypeError;r.exports=function(r){if(n(r))return r;throw new a("Can't set "+o(r)+" as a prototype")}},function(r,t,e){var n=e(21);r.exports=function(r){return n(r)||null===r}},function(t,e,n){var o=n(107);t.exports=function(t,e){return t===r?arguments.length<2?"":e:o(t)}},function(r,t,e){var n=e(89),o=String;r.exports=function(r){if("Symbol"===n(r))throw new TypeError("Cannot convert a Symbol value to a string");return o(r)}},function(r,t,e){r.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},function(r,t,e){var n=e(6),o=Error,a=n("".replace),c=String(new o("zxcasd").stack),i=/\n\s*at [^:]*:[^\n]*/,u=i.test(c);r.exports=function(r,t){if(u&&"string"==typeof r&&!o.prepareStackTrace)for(;t--;)r=a(r,i,"");return r}},function(t,e,n){var o,a=n(16),c=n(54),i=n(17),u=n(32),s=n(6),f=n(3),p=n(44),l=n(8),y=n(111),v=n(12),h=n(21),g=n(31),b=n(83),m=n(27),d=n(89),w=n(9),E=n(112),x=n(22),O=n(68),R=n(113),S=n(114),A=n(92),T=n(116),D=n(117),_=n(76),I=n(119),j=n(80),M=i.Object,k=i.Array,P=i.Date,C=i.Error,L=i.TypeError,B=i.PerformanceMark,N=u("DOMException"),U=A.Map,F=A.has,z=A.get,W=A.set,V=T.Set,H=T.add,G=T.has,Y=u("Object","keys"),Q=s([].push),q=s((!0).valueOf),X=s(1..valueOf),K=s("".valueOf),Z=s(P.prototype.getTime),$=p("structuredClone"),J="DataCloneError",rr="Transferring",tr=function(r){return!f((function(){var t=new i.Set([7]),e=r(t),n=r(M(7));return e===t||!e.has(7)||!h(n)||7!=+n}))&&r},er=function(r,t){return!f((function(){var e=new t,n=r({a:e,b:e});return!(n&&n.a===n.b&&n.a instanceof t&&n.a.stack===e.stack)}))},nr=i.structuredClone,or=a||!er(nr,C)||!er(nr,N)||(o=nr,!!f((function(){var r=o(new i.AggregateError([1],$,{cause:3}));return"AggregateError"!==r.name||1!==r.errors[0]||r.message!==$||3!==r.cause}))),ar=!nr&&tr((function(r){return new B($,{detail:r}).detail})),cr=tr(nr)||ar,ir=function(r){throw new N("Uncloneable type: "+r,J)},ur=function(r,t){throw new N((t||"Cloning")+" of "+r+" cannot be properly polyfilled in this engine",J)},sr=function(r,t){return cr||ur(t),cr(r)},fr=function(t,e,n){if(F(e,t))return z(e,t);var o,a,c,u,s,f;if("SharedArrayBuffer"===(n||d(t)))o=cr?cr(t):t;else{var p=i.DataView;p||l(t.slice)||ur("ArrayBuffer");try{if(l(t.slice)&&!t.resizable)o=t.slice(0);else{a=t.byteLength,c="maxByteLength"in t?{maxByteLength:t.maxByteLength}:r,o=new ArrayBuffer(a,c),u=new p(t),s=new p(o);for(f=0;f<a;f++)s.setUint8(f,u.getUint8(f))}}catch(r){throw new N("ArrayBuffer is detached",J)}}return W(e,t,o),o},pr=function(t,e){if(g(t)&&ir("Symbol"),!h(t))return t;if(e){if(F(e,t))return z(e,t)}else e=new U;var n,o,a,c,s,f,p,y,v=d(t);switch(v){case"Array":a=k(O(t));break;case"Object":a={};break;case"Map":a=new U;break;case"Set":a=new V;break;case"RegExp":a=new RegExp(t.source,S(t));break;case"Error":switch(o=t.name){case"AggregateError":a=new(u(o))([]);break;case"EvalError":case"RangeError":case"ReferenceError":case"SuppressedError":case"SyntaxError":case"TypeError":case"URIError":a=new(u(o));break;case"CompileError":case"LinkError":case"RuntimeError":a=new(u("WebAssembly",o));break;default:a=new C}break;case"DOMException":a=new N(t.message,t.name);break;case"ArrayBuffer":case"SharedArrayBuffer":a=fr(t,e,v);break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float16Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":f="DataView"===v?t.byteLength:t.length,a=function(r,t,e,n,o){var a=i[t];return h(a)||ur(t),new a(fr(r.buffer,o),e,n)}(t,v,t.byteOffset,f,e);break;case"DOMQuad":try{a=new DOMQuad(pr(t.p1,e),pr(t.p2,e),pr(t.p3,e),pr(t.p4,e))}catch(r){a=sr(t,v)}break;case"File":if(cr)try{a=cr(t),d(a)!==v&&(a=r)}catch(r){}if(!a)try{a=new File([t],t.name,t)}catch(r){}a||ur(v);break;case"FileList":if(c=function(){var r;try{r=new i.DataTransfer}catch(t){try{r=new i.ClipboardEvent("").clipboardData}catch(r){}}return r&&r.items&&r.files?r:null}()){for(s=0,f=O(t);s<f;s++)c.items.add(pr(t[s],e));a=c.files}else a=sr(t,v);break;case"ImageData":try{a=new ImageData(pr(t.data,e),t.width,t.height,{colorSpace:t.colorSpace})}catch(r){a=sr(t,v)}break;default:if(cr)a=cr(t);else switch(v){case"BigInt":a=M(t.valueOf());break;case"Boolean":a=M(q(t));break;case"Number":a=M(X(t));break;case"String":a=M(K(t));break;case"Date":a=new P(Z(t));break;case"Blob":try{a=t.slice(0,t.size,t.type)}catch(r){ur(v)}break;case"DOMPoint":case"DOMPointReadOnly":n=i[v];try{a=n.fromPoint?n.fromPoint(t):new n(t.x,t.y,t.z,t.w)}catch(r){ur(v)}break;case"DOMRect":case"DOMRectReadOnly":n=i[v];try{a=n.fromRect?n.fromRect(t):new n(t.x,t.y,t.width,t.height)}catch(r){ur(v)}break;case"DOMMatrix":case"DOMMatrixReadOnly":n=i[v];try{a=n.fromMatrix?n.fromMatrix(t):new n(t)}catch(r){ur(v)}break;case"AudioData":case"VideoFrame":l(t.clone)||ur(v);try{a=t.clone()}catch(r){ir(v)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":ur(v);default:ir(v)}}switch(W(e,t,a),v){case"Array":case"Object":for(p=Y(t),s=0,f=O(p);s<f;s++)y=p[s],E(a,y,pr(t[y],e));break;case"Map":t.forEach((function(r,t){W(a,pr(t,e),pr(r,e))}));break;case"Set":t.forEach((function(r){H(a,pr(r,e))}));break;case"Error":x(a,"message",pr(t.message,e)),w(t,"cause")&&x(a,"cause",pr(t.cause,e)),"AggregateError"===o?a.errors=pr(t.errors,e):"SuppressedError"===o&&(a.error=pr(t.error,e),a.suppressed=pr(t.suppressed,e));case"DOMException":I&&x(a,"stack",pr(t.stack,e))}return a};c({global:!0,enumerable:!0,sham:!j,forced:or},{structuredClone:function(t){var e,n,o=R(arguments.length,1)>1&&!v(arguments[1])?m(arguments[1]):r,a=o?o.transfer:r;a!==r&&(n=function(t,e){if(!h(t))throw new L("Transfer option cannot be converted to a sequence");var n=[];b(t,(function(r){Q(n,m(r))}));for(var o,a,c,u,s,f=0,p=O(n),v=new V;f<p;){if(o=n[f++],"ArrayBuffer"===(a=d(o))?G(v,o):F(e,o))throw new N("Duplicate transferable",J);if("ArrayBuffer"!==a){if(j)u=nr(o,{transfer:[o]});else switch(a){case"ImageBitmap":c=i.OffscreenCanvas,y(c)||ur(a,rr);try{(s=new c(o.width,o.height)).getContext("bitmaprenderer").transferFromImageBitmap(o),u=s.transferToImageBitmap()}catch(r){}break;case"AudioData":case"VideoFrame":l(o.clone)&&l(o.close)||ur(a,rr);try{u=o.clone(),o.close()}catch(r){}break;case"MediaSourceHandle":case"MessagePort":case"MIDIAccess":case"OffscreenCanvas":case"ReadableStream":case"RTCDataChannel":case"TransformStream":case"WebTransportReceiveStream":case"WebTransportSendStream":case"WritableStream":ur(a,rr)}if(u===r)throw new N("This object cannot be transferred: "+a,J);W(e,o,u)}else H(v,o)}return v}(a,e=new U));var c=pr(t,e);return n&&function(r){D(r,(function(r){j?cr(r,{transfer:[r]}):l(r.transfer)?r.transfer():_?_(r):ur("ArrayBuffer",rr)}))}(n),c}})},function(r,t,e){var n=e(6),o=e(3),a=e(8),c=e(89),i=e(32),u=e(14),s=function(){},f=i("Reflect","construct"),p=/^\s*(?:class|function)\b/,l=n(p.exec),y=!p.test(s),v=function(r){if(!a(r))return!1;try{return f(s,[],r),!0}catch(r){return!1}},h=function(r){if(!a(r))return!1;switch(c(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return y||!!l(p,u(r))}catch(r){return!0}};h.sham=!0,r.exports=!f||o((function(){var r;return v(v.call)||!v(Object)||!v((function(){r=!0}))||r}))?h:v},function(r,t,e){var n=e(2),o=e(23),a=e(45);r.exports=function(r,t,e){n?o.f(r,t,a(0,e)):r[t]=e}},function(r,t,e){var n=TypeError;r.exports=function(r,t){if(r<t)throw new n("Not enough arguments");return r}},function(t,e,n){var o=n(30),a=n(9),c=n(33),i=n(115),u=RegExp.prototype;t.exports=function(t){var e=t.flags;return e!==r||"flags"in u||a(t,"flags")||!c(u,t)?e:o(i,t)}},function(r,t,e){var n=e(27);r.exports=function(){var r=n(this),t="";return r.hasIndices&&(t+="d"),r.global&&(t+="g"),r.ignoreCase&&(t+="i"),r.multiline&&(t+="m"),r.dotAll&&(t+="s"),r.unicode&&(t+="u"),r.unicodeSets&&(t+="v"),r.sticky&&(t+="y"),t}},function(r,t,e){var n=e(6),o=Set.prototype;r.exports={Set:Set,add:n(o.add),has:n(o.has),remove:n(o.delete),proto:o}},function(r,t,e){var n=e(6),o=e(118),a=e(116),c=a.Set,i=a.proto,u=n(i.forEach),s=n(i.keys),f=s(new c).next;r.exports=function(r,t,e){return e?o({iterator:s(r),next:f},t):u(r,t)}},function(t,e,n){var o=n(30);t.exports=function(t,e,n){for(var a,c,i=n?t:t.iterator,u=t.next;!(a=o(u,i)).done;)if((c=e(a.value))!==r)return c}},function(r,t,e){var n=e(3),o=e(45);r.exports=!n((function(){var r=new Error("a");return!("stack"in r)||(Object.defineProperty(r,"stack",o(1,7)),7!==r.stack)}))},function(t,e,n){var o=n(54),a=n(32),c=n(3),i=n(113),u=n(107),s=n(121),f=a("URL"),p=s&&c((function(){f.canParse()})),l=c((function(){return 1!==f.canParse.length}));o({target:"URL",stat:!0,forced:!p||l},{canParse:function(t){var e=i(arguments.length,1),n=u(t),o=e<2||arguments[1]===r?r:u(arguments[1]);try{return!!new f(n,o)}catch(r){return!1}}})},function(t,e,n){var o=n(3),a=n(42),c=n(2),i=n(16),u=a("iterator");t.exports=!o((function(){var t=new URL("b?a=1&b=2&c=3","https://a"),e=t.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),o="";return t.pathname="c%20d",e.forEach((function(r,t){e.delete("b"),o+=t+r})),n.delete("a",2),n.delete("b",r),i&&(!t.toJSON||!n.has("a",1)||n.has("a",2)||!n.has("a",r)||n.has("b"))||!e.size&&(i||!c)||!e.sort||"https://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[u]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://Ñ‚ÐµÑÑ‚").host||"#%D0%B1"!==new URL("https://a#Ð±").hash||"a1c3"!==o||"x"!==new URL("https://x",r).host}))},function(t,e,n){var o=n(54),a=n(32),c=n(113),i=n(107),u=n(121),s=a("URL");o({target:"URL",stat:!0,forced:!u},{parse:function(t){var e=c(arguments.length,1),n=i(t),o=e<2||arguments[1]===r?r:i(arguments[1]);try{return new s(n,o)}catch(r){return null}}})},function(t,e,n){var o=n(59),a=n(6),c=n(107),i=n(113),u=URLSearchParams,s=u.prototype,f=a(s.append),p=a(s.delete),l=a(s.forEach),y=a([].push),v=new u("a=1&a=2&b=3");v.delete("a",1),v.delete("b",r),v+""!="a=2"&&o(s,"delete",(function(t){var e=arguments.length,n=e<2?r:arguments[1];if(e&&n===r)return p(this,t);var o=[];l(this,(function(r,t){y(o,{key:t,value:r})})),i(e,1);for(var a,u=c(t),s=c(n),v=0,h=0,g=!1,b=o.length;v<b;)a=o[v++],g||a.key===u?(g=!0,p(this,a.key)):h++;for(;h<b;)(a=o[h++]).key===u&&a.value===s||f(this,a.key,a.value)}),{enumerable:!0,unsafe:!0})},function(t,e,n){var o=n(59),a=n(6),c=n(107),i=n(113),u=URLSearchParams,s=u.prototype,f=a(s.getAll),p=a(s.has),l=new u("a=1");!l.has("a",2)&&l.has("a",r)||o(s,"has",(function(t){var e=arguments.length,n=e<2?r:arguments[1];if(e&&n===r)return p(this,t);var o=f(this,t);i(e,1);for(var a=c(n),u=0;u<o.length;)if(o[u++]===a)return!0;return!1}),{enumerable:!0,unsafe:!0})},function(r,t,e){var n=e(2),o=e(6),a=e(4),c=URLSearchParams.prototype,i=o(c.forEach);n&&!("size"in c)&&a(c,"size",{get:function(){var r=0;return i(this,(function(){r++})),r},configurable:!0,enumerable:!0})}],e={},(n=function(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}).m=t,n.c=e,n.d=function(r,t,e){n.o(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:e})},n.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,t){if(1&t&&(r=n(r)),8&t)return r;if(4&t&&"object"==typeof r&&r&&r.__esModule)return r;var e=Object.create(null);if(n.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:r}),2&t&&"string"!=typeof r)for(var o in r)n.d(e,o,function(t){return r[t]}.bind(null,o));return e},n.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(t,"a",t),t},n.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},n.p="",n(n.s=0)}();                                                dist/viewport.js                                                                                    0000644                 00000015155 15212564037 0007740 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;
(wp ||= {}).viewport = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // packages/viewport/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    ifViewportMatches: () => if_viewport_matches_default,
    store: () => store,
    withViewportMatch: () => with_viewport_match_default
  });

  // packages/viewport/build-module/listener.mjs
  var import_compose = __toESM(require_compose(), 1);
  var import_data2 = __toESM(require_data(), 1);

  // packages/viewport/build-module/store/index.mjs
  var import_data = __toESM(require_data(), 1);

  // packages/viewport/build-module/store/reducer.mjs
  function reducer(state = {}, action) {
    switch (action.type) {
      case "SET_IS_MATCHING":
        return action.values;
    }
    return state;
  }
  var reducer_default = reducer;

  // packages/viewport/build-module/store/actions.mjs
  var actions_exports = {};
  __export(actions_exports, {
    setIsMatching: () => setIsMatching
  });
  function setIsMatching(values) {
    return {
      type: "SET_IS_MATCHING",
      values
    };
  }

  // packages/viewport/build-module/store/selectors.mjs
  var selectors_exports = {};
  __export(selectors_exports, {
    isViewportMatch: () => isViewportMatch
  });
  function isViewportMatch(state, query) {
    if (query.indexOf(" ") === -1) {
      query = ">= " + query;
    }
    return !!state[query];
  }

  // packages/viewport/build-module/store/index.mjs
  var STORE_NAME = "core/viewport";
  var store = (0, import_data.createReduxStore)(STORE_NAME, {
    reducer: reducer_default,
    actions: actions_exports,
    selectors: selectors_exports
  });
  (0, import_data.register)(store);

  // packages/viewport/build-module/listener.mjs
  var addDimensionsEventListener = (breakpoints, operators) => {
    const setIsMatching2 = (0, import_compose.debounce)(
      () => {
        const values = Object.fromEntries(
          queries.map(([key, query]) => [key, query.matches])
        );
        (0, import_data2.dispatch)(store).setIsMatching(values);
      },
      0,
      { leading: true }
    );
    const operatorEntries = Object.entries(operators);
    const queries = Object.entries(breakpoints).flatMap(
      ([name, width]) => {
        return operatorEntries.map(([operator, condition]) => {
          const list = window.matchMedia(
            `(${condition}: ${width}px)`
          );
          list.addEventListener("change", setIsMatching2);
          return [`${operator} ${name}`, list];
        });
      }
    );
    window.addEventListener("orientationchange", setIsMatching2);
    setIsMatching2();
    setIsMatching2.flush();
  };
  var listener_default = addDimensionsEventListener;

  // packages/viewport/build-module/if-viewport-matches.mjs
  var import_compose3 = __toESM(require_compose(), 1);

  // packages/viewport/build-module/with-viewport-match.mjs
  var import_compose2 = __toESM(require_compose(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  var withViewportMatch = (queries) => {
    const queryEntries = Object.entries(queries);
    const useViewPortQueriesResult = () => Object.fromEntries(
      queryEntries.map(([key, query]) => {
        let [operator, breakpointName] = query.split(" ");
        if (breakpointName === void 0) {
          breakpointName = operator;
          operator = ">=";
        }
        return [key, (0, import_compose2.useViewportMatch)(breakpointName, operator)];
      })
    );
    return (0, import_compose2.createHigherOrderComponent)((WrappedComponent) => {
      return (0, import_compose2.pure)((props) => {
        const queriesResult = useViewPortQueriesResult();
        return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(WrappedComponent, { ...props, ...queriesResult });
      });
    }, "withViewportMatch");
  };
  var with_viewport_match_default = withViewportMatch;

  // packages/viewport/build-module/if-viewport-matches.mjs
  var ifViewportMatches = (query) => (0, import_compose3.createHigherOrderComponent)(
    (0, import_compose3.compose)([
      with_viewport_match_default({
        isViewportMatch: query
      }),
      (0, import_compose3.ifCondition)((props) => props.isViewportMatch)
    ]),
    "ifViewportMatches"
  );
  var if_viewport_matches_default = ifViewportMatches;

  // packages/viewport/build-module/index.mjs
  var BREAKPOINTS = {
    huge: 1440,
    wide: 1280,
    large: 960,
    medium: 782,
    small: 600,
    mobile: 480
  };
  var OPERATORS = {
    "<": "max-width",
    ">=": "min-width"
  };
  listener_default(BREAKPOINTS, OPERATORS);
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                                                                                                                   dist/viewport.min.js                                                                                0000644                 00000004326 15212564037 0010520 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;(wp||={}).viewport=(()=>{var H=Object.create;var d=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty;var l=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),v=(e,t)=>{for(var r in t)d(e,r,{get:t[r],enumerable:!0})},O=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of $(t))!D.call(e,o)&&o!==r&&d(e,o,{get:()=>t[o],enumerable:!(a=L(t,o))||a.enumerable});return e};var n=(e,t,r)=>(r=e!=null?H(P(e)):{},O(t||!e||!e.__esModule?d(r,"default",{value:e,enumerable:!0}):r,e)),G=e=>O(d({},"__esModule",{value:!0}),e);var u=l((W,V)=>{V.exports=window.wp.compose});var M=l((Y,g)=>{g.exports=window.wp.data});var j=l((it,T)=>{T.exports=window.ReactJSXRuntime});var F={};v(F,{ifViewportMatches:()=>C,store:()=>c,withViewportMatch:()=>w});var S=n(u(),1),b=n(M(),1);var f=n(M(),1);function k(e={},t){return t.type==="SET_IS_MATCHING"?t.values:e}var R=k;var x={};v(x,{setIsMatching:()=>B});function B(e){return{type:"SET_IS_MATCHING",values:e}}var E={};v(E,{isViewportMatch:()=>J});function J(e,t){return t.indexOf(" ")===-1&&(t=">= "+t),!!e[t]}var K="core/viewport",c=(0,f.createReduxStore)(K,{reducer:R,actions:x,selectors:E});(0,f.register)(c);var Q=(e,t)=>{let r=(0,S.debounce)(()=>{let i=Object.fromEntries(o.map(([s,h])=>[s,h.matches]));(0,b.dispatch)(c).setIsMatching(i)},0,{leading:!0}),a=Object.entries(t),o=Object.entries(e).flatMap(([i,s])=>a.map(([h,N])=>{let _=window.matchMedia(`(${N}: ${s}px)`);return _.addEventListener("change",r),[`${h} ${i}`,_]}));window.addEventListener("orientationchange",r),r(),r.flush()},I=Q;var m=n(u(),1);var p=n(u(),1),A=n(j(),1),X=e=>{let t=Object.entries(e),r=()=>Object.fromEntries(t.map(([a,o])=>{let[i,s]=o.split(" ");return s===void 0&&(s=i,i=">="),[a,(0,p.useViewportMatch)(s,i)]}));return(0,p.createHigherOrderComponent)(a=>(0,p.pure)(o=>{let i=r();return(0,A.jsx)(a,{...o,...i})}),"withViewportMatch")},w=X;var q=e=>(0,m.createHigherOrderComponent)((0,m.compose)([w({isViewportMatch:e}),(0,m.ifCondition)(t=>t.isViewportMatch)]),"ifViewportMatches"),C=q;var y={huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},z={"<":"max-width",">=":"min-width"};I(y,z);return G(F);})();
                                                                                                                                                                                                                                                                                                          dist/warning.js                                                                                     0000644                 00000003027 15212564037 0007521 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).warning = (() => {
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // packages/warning/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    default: () => warning
  });

  // packages/warning/build-module/utils.mjs
  var logged = /* @__PURE__ */ new Set();

  // packages/warning/build-module/index.mjs
  function isDev() {
    return true;
  }
  function warning(message) {
    if (!isDev()) {
      return;
    }
    if (logged.has(message)) {
      return;
    }
    console.warn(message);
    try {
      throw Error(message);
    } catch (x) {
    }
    logged.add(message);
  }
  return __toCommonJS(index_exports);
})();
if (typeof wp.warning === 'object' && wp.warning.default) { wp.warning = wp.warning.default; }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         dist/warning.min.js                                                                                 0000644                 00000001320 15212564037 0010275 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).warning=(()=>{var i=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var c=(r,t)=>{for(var n in t)i(r,n,{get:t[n],enumerable:!0})},d=(r,t,n,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of f(t))!l.call(r,o)&&o!==n&&i(r,o,{get:()=>t[o],enumerable:!(u=a(t,o))||u.enumerable});return r};var h=r=>d(i({},"__esModule",{value:!0}),r);var p={};c(p,{default:()=>g});var e=new Set;function w(){return!1}function g(r){if(w()&&!e.has(r)){console.warn(r);try{throw Error(r)}catch{}e.add(r)}}return h(p);})();
if (typeof wp.warning === 'object' && wp.warning.default) { wp.warning = wp.warning.default; }
                                                                                                                                                                                                                                                                                                                dist/widgets.js                                                                                     0000644                 00000144122 15212564037 0007524 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;
(wp ||= {}).widgets = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name3 in all)
      __defProp(target, name3, { get: all[name3], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/blocks
  var require_blocks = __commonJS({
    "package-external:@wordpress/blocks"(exports, module) {
      module.exports = window.wp.blocks;
    }
  });

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/primitives
  var require_primitives = __commonJS({
    "package-external:@wordpress/primitives"(exports, module) {
      module.exports = window.wp.primitives;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // package-external:@wordpress/block-editor
  var require_block_editor = __commonJS({
    "package-external:@wordpress/block-editor"(exports, module) {
      module.exports = window.wp.blockEditor;
    }
  });

  // package-external:@wordpress/components
  var require_components = __commonJS({
    "package-external:@wordpress/components"(exports, module) {
      module.exports = window.wp.components;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // package-external:@wordpress/core-data
  var require_core_data = __commonJS({
    "package-external:@wordpress/core-data"(exports, module) {
      module.exports = window.wp.coreData;
    }
  });

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/notices
  var require_notices = __commonJS({
    "package-external:@wordpress/notices"(exports, module) {
      module.exports = window.wp.notices;
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // package-external:@wordpress/api-fetch
  var require_api_fetch = __commonJS({
    "package-external:@wordpress/api-fetch"(exports, module) {
      module.exports = window.wp.apiFetch;
    }
  });

  // packages/widgets/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    MoveToWidgetArea: () => MoveToWidgetArea,
    addWidgetIdToBlock: () => addWidgetIdToBlock,
    getWidgetIdFromBlock: () => getWidgetIdFromBlock,
    registerLegacyWidgetBlock: () => registerLegacyWidgetBlock,
    registerLegacyWidgetVariations: () => registerLegacyWidgetVariations,
    registerWidgetGroupBlock: () => registerWidgetGroupBlock
  });
  var import_blocks5 = __toESM(require_blocks(), 1);

  // packages/widgets/build-module/blocks/legacy-widget/index.mjs
  var legacy_widget_exports = {};
  __export(legacy_widget_exports, {
    metadata: () => block_default,
    name: () => name,
    settings: () => settings
  });

  // packages/icons/build-module/library/brush.mjs
  var import_primitives = __toESM(require_primitives(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  var brush_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { 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" }) });

  // packages/icons/build-module/library/group.mjs
  var import_primitives2 = __toESM(require_primitives(), 1);
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  var group_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.Path, { d: "M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z" }) });

  // packages/icons/build-module/library/move-to.mjs
  var import_primitives3 = __toESM(require_primitives(), 1);
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
  var move_to_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.Path, { d: "M19.75 9c0-1.257-.565-2.197-1.39-2.858-.797-.64-1.827-1.017-2.815-1.247-1.802-.42-3.703-.403-4.383-.396L11 4.5V6l.177-.001c.696-.006 2.416-.02 4.028.356.887.207 1.67.518 2.216.957.52.416.829.945.829 1.688 0 .592-.167.966-.407 1.23-.255.281-.656.508-1.236.674-1.19.34-2.82.346-4.607.346h-.077c-1.692 0-3.527 0-4.942.404-.732.209-1.424.545-1.935 1.108-.526.579-.796 1.33-.796 2.238 0 1.257.565 2.197 1.39 2.858.797.64 1.827 1.017 2.815 1.247 1.802.42 3.703.403 4.383.396L13 19.5h.714V22L18 18.5 13.714 15v3H13l-.177.001c-.696.006-2.416.02-4.028-.356-.887-.207-1.67-.518-2.216-.957-.52-.416-.829-.945-.829-1.688 0-.592.167-.966.407-1.23.255-.281.656-.508 1.237-.674 1.189-.34 2.819-.346 4.606-.346h.077c1.692 0 3.527 0 4.941-.404.732-.209 1.425-.545 1.936-1.108.526-.579.796-1.33.796-2.238z" }) });

  // packages/icons/build-module/library/widget.mjs
  var import_primitives4 = __toESM(require_primitives(), 1);
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
  var widget_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.Path, { d: "M6 3H8V5H16V3H18V5C19.1046 5 20 5.89543 20 7V19C20 20.1046 19.1046 21 18 21H6C4.89543 21 4 20.1046 4 19V7C4 5.89543 4.89543 5 6 5V3ZM18 6.5H6C5.72386 6.5 5.5 6.72386 5.5 7V8H18.5V7C18.5 6.72386 18.2761 6.5 18 6.5ZM18.5 9.5H5.5V19C5.5 19.2761 5.72386 19.5 6 19.5H18C18.2761 19.5 18.5 19.2761 18.5 19V9.5ZM11 11H13V13H11V11ZM7 11V13H9V11H7ZM15 13V11H17V13H15Z" }) });

  // packages/widgets/build-module/blocks/legacy-widget/block.json
  var block_default = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/legacy-widget",
    title: "Legacy Widget",
    category: "widgets",
    description: "Display a legacy widget.",
    textdomain: "default",
    attributes: {
      id: {
        type: "string",
        default: null
      },
      idBase: {
        type: "string",
        default: null
      },
      instance: {
        type: "object",
        default: null
      }
    },
    supports: {
      html: false,
      customClassName: false,
      reusable: false
    },
    editorStyle: "wp-block-legacy-widget-editor"
  };

  // node_modules/clsx/dist/clsx.mjs
  function 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 = 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 = r(e)) && (n && (n += " "), n += t);
    return n;
  }
  var clsx_default = clsx;

  // packages/widgets/build-module/blocks/legacy-widget/edit/index.mjs
  var import_block_editor3 = __toESM(require_block_editor(), 1);
  var import_components5 = __toESM(require_components(), 1);
  var import_i18n7 = __toESM(require_i18n(), 1);
  var import_element3 = __toESM(require_element(), 1);
  var import_core_data2 = __toESM(require_core_data(), 1);

  // packages/widgets/build-module/blocks/legacy-widget/edit/widget-type-selector.mjs
  var import_components = __toESM(require_components(), 1);
  var import_i18n = __toESM(require_i18n(), 1);
  var import_data = __toESM(require_data(), 1);
  var import_core_data = __toESM(require_core_data(), 1);
  var import_block_editor = __toESM(require_block_editor(), 1);
  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
  function WidgetTypeSelector({ selectedId, onSelect }) {
    const widgetTypes = (0, import_data.useSelect)((select2) => {
      const hiddenIds = select2(import_block_editor.store).getSettings()?.widgetTypesToHideFromLegacyWidgetBlock ?? [];
      return select2(import_core_data.store).getWidgetTypes({ per_page: -1 })?.filter((widgetType) => !hiddenIds.includes(widgetType.id));
    }, []);
    if (!widgetTypes) {
      return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_components.Spinner, {});
    }
    if (widgetTypes.length === 0) {
      return (0, import_i18n.__)("There are no widgets available.");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
      import_components.SelectControl,
      {
        __next40pxDefaultSize: true,
        label: (0, import_i18n.__)("Legacy widget"),
        value: selectedId ?? "",
        options: [
          { value: "", label: (0, import_i18n.__)("Select widget") },
          ...widgetTypes.map((widgetType) => ({
            value: widgetType.id,
            label: widgetType.name
          }))
        ],
        onChange: (value) => {
          if (value) {
            const selected = widgetTypes.find(
              (widgetType) => widgetType.id === value
            );
            onSelect({
              selectedId: selected.id,
              isMulti: selected.is_multi
            });
          } else {
            onSelect({ selectedId: null });
          }
        }
      }
    );
  }

  // packages/widgets/build-module/blocks/legacy-widget/edit/inspector-card.mjs
  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
  function InspectorCard({ name: name3, description }) {
    return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "wp-block-legacy-widget-inspector-card", children: [
      /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { className: "wp-block-legacy-widget-inspector-card__name", children: name3 }),
      /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: description })
    ] });
  }

  // packages/widgets/build-module/blocks/legacy-widget/edit/form.mjs
  var import_element = __toESM(require_element(), 1);
  var import_data2 = __toESM(require_data(), 1);
  var import_notices = __toESM(require_notices(), 1);
  var import_i18n3 = __toESM(require_i18n(), 1);
  var import_components2 = __toESM(require_components(), 1);
  var import_compose2 = __toESM(require_compose(), 1);

  // packages/widgets/build-module/blocks/legacy-widget/edit/control.mjs
  var import_api_fetch = __toESM(require_api_fetch(), 1);
  var import_compose = __toESM(require_compose(), 1);
  var import_i18n2 = __toESM(require_i18n(), 1);
  var Control = class {
    /**
     * Creates and loads a new control.
     *
     * @access public
     * @param {Object}   params
     * @param {string}   params.id
     * @param {string}   params.idBase
     * @param {Object}   params.instance
     * @param {Function} params.onChangeInstance
     * @param {Function} params.onChangeHasPreview
     * @param {Function} params.onError
     */
    constructor({
      id,
      idBase,
      instance,
      onChangeInstance,
      onChangeHasPreview,
      onError
    }) {
      this.id = id;
      this.idBase = idBase;
      this._instance = instance;
      this._hasPreview = null;
      this.onChangeInstance = onChangeInstance;
      this.onChangeHasPreview = onChangeHasPreview;
      this.onError = onError;
      this.number = ++lastNumber;
      this.handleFormChange = (0, import_compose.debounce)(
        this.handleFormChange.bind(this),
        200
      );
      this.handleFormSubmit = this.handleFormSubmit.bind(this);
      this.initDOM();
      this.bindEvents();
      this.loadContent();
    }
    /**
     * Clean up the control so that it can be garbage collected.
     *
     * @access public
     */
    destroy() {
      this.unbindEvents();
      this.element.remove();
    }
    /**
     * Creates the control's DOM structure.
     *
     * @access private
     */
    initDOM() {
      this.element = el("div", { class: "widget open" }, [
        el("div", { class: "widget-inside" }, [
          this.form = el("form", { class: "form", method: "post" }, [
            // These hidden form inputs are what most widgets' scripts
            // use to access data about the widget.
            el("input", {
              class: "widget-id",
              type: "hidden",
              name: "widget-id",
              value: this.id ?? `${this.idBase}-${this.number}`
            }),
            el("input", {
              class: "id_base",
              type: "hidden",
              name: "id_base",
              value: this.idBase ?? this.id
            }),
            el("input", {
              class: "widget-width",
              type: "hidden",
              name: "widget-width",
              value: "250"
            }),
            el("input", {
              class: "widget-height",
              type: "hidden",
              name: "widget-height",
              value: "200"
            }),
            el("input", {
              class: "widget_number",
              type: "hidden",
              name: "widget_number",
              value: this.idBase ? this.number.toString() : ""
            }),
            this.content = el("div", { class: "widget-content" }),
            // Non-multi widgets can be saved via a Save button.
            this.id && el(
              "button",
              {
                class: "button is-primary",
                type: "submit"
              },
              (0, import_i18n2.__)("Save")
            )
          ])
        ])
      ]);
    }
    /**
     * Adds the control's event listeners.
     *
     * @access private
     */
    bindEvents() {
      if (window.jQuery) {
        const { jQuery: $ } = window;
        $(this.form).on("change", null, this.handleFormChange);
        $(this.form).on("input", null, this.handleFormChange);
        $(this.form).on("submit", this.handleFormSubmit);
      } else {
        this.form.addEventListener("change", this.handleFormChange);
        this.form.addEventListener("input", this.handleFormChange);
        this.form.addEventListener("submit", this.handleFormSubmit);
      }
    }
    /**
     * Removes the control's event listeners.
     *
     * @access private
     */
    unbindEvents() {
      if (window.jQuery) {
        const { jQuery: $ } = window;
        $(this.form).off("change", null, this.handleFormChange);
        $(this.form).off("input", null, this.handleFormChange);
        $(this.form).off("submit", this.handleFormSubmit);
      } else {
        this.form.removeEventListener("change", this.handleFormChange);
        this.form.removeEventListener("input", this.handleFormChange);
        this.form.removeEventListener("submit", this.handleFormSubmit);
      }
    }
    /**
     * Fetches the widget's form HTML from the REST API and loads it into the
     * control's form.
     *
     * @access private
     */
    async loadContent() {
      try {
        if (this.id) {
          const { form } = await saveWidget(this.id);
          this.content.innerHTML = form;
        } else if (this.idBase) {
          const { form, preview } = await encodeWidget({
            idBase: this.idBase,
            instance: this.instance,
            number: this.number
          });
          this.content.innerHTML = form;
          this.hasPreview = !isEmptyHTML(preview);
          if (!this.instance.hash) {
            const { instance } = await encodeWidget({
              idBase: this.idBase,
              instance: this.instance,
              number: this.number,
              formData: serializeForm(this.form)
            });
            this.instance = instance;
          }
        }
        if (window.jQuery) {
          const { jQuery: $ } = window;
          $(document).trigger("widget-added", [$(this.element)]);
        }
      } catch (error) {
        this.onError(error);
      }
    }
    /**
     * Perform a save when a multi widget's form is changed. Non-multi widgets
     * are saved manually.
     *
     * @access private
     */
    handleFormChange() {
      if (this.idBase) {
        this.saveForm();
      }
    }
    /**
     * Perform a save when the control's form is manually submitted.
     *
     * @access private
     * @param {Event} event
     */
    handleFormSubmit(event) {
      event.preventDefault();
      this.saveForm();
    }
    /**
     * Serialize the control's form, send it to the REST API, and update the
     * instance with the encoded instance that the REST API returns.
     *
     * @access private
     */
    async saveForm() {
      const formData = serializeForm(this.form);
      try {
        if (this.id) {
          const { form } = await saveWidget(this.id, formData);
          this.content.innerHTML = form;
          if (window.jQuery) {
            const { jQuery: $ } = window;
            $(document).trigger("widget-updated", [
              $(this.element)
            ]);
          }
        } else if (this.idBase) {
          const { instance, preview } = await encodeWidget({
            idBase: this.idBase,
            instance: this.instance,
            number: this.number,
            formData
          });
          this.instance = instance;
          this.hasPreview = !isEmptyHTML(preview);
        }
      } catch (error) {
        this.onError(error);
      }
    }
    /**
     * The widget's instance object.
     *
     * @access private
     */
    get instance() {
      return this._instance;
    }
    /**
     * The widget's instance object.
     *
     * @access private
     */
    set instance(instance) {
      if (this._instance !== instance) {
        this._instance = instance;
        this.onChangeInstance(instance);
      }
    }
    /**
     * Whether or not the widget can be previewed.
     *
     * @access public
     */
    get hasPreview() {
      return this._hasPreview;
    }
    /**
     * Whether or not the widget can be previewed.
     *
     * @access private
     */
    set hasPreview(hasPreview) {
      if (this._hasPreview !== hasPreview) {
        this._hasPreview = hasPreview;
        this.onChangeHasPreview(hasPreview);
      }
    }
  };
  var lastNumber = 0;
  function el(tagName, attributes = {}, content = null) {
    const element = document.createElement(tagName);
    for (const [attribute, value] of Object.entries(attributes)) {
      element.setAttribute(attribute, value);
    }
    if (Array.isArray(content)) {
      for (const child of content) {
        if (child) {
          element.appendChild(child);
        }
      }
    } else if (typeof content === "string") {
      element.innerText = content;
    }
    return element;
  }
  async function saveWidget(id, formData = null) {
    let widget;
    if (formData) {
      widget = await (0, import_api_fetch.default)({
        path: `/wp/v2/widgets/${id}?context=edit`,
        method: "PUT",
        data: {
          form_data: formData
        }
      });
    } else {
      widget = await (0, import_api_fetch.default)({
        path: `/wp/v2/widgets/${id}?context=edit`,
        method: "GET"
      });
    }
    return { form: widget.rendered_form };
  }
  async function encodeWidget({ idBase, instance, number, formData = null }) {
    const response = await (0, import_api_fetch.default)({
      path: `/wp/v2/widget-types/${idBase}/encode`,
      method: "POST",
      data: {
        instance,
        number,
        form_data: formData
      }
    });
    return {
      instance: response.instance,
      form: response.form,
      preview: response.preview
    };
  }
  function isEmptyHTML(html) {
    const element = document.createElement("div");
    element.innerHTML = html;
    return isEmptyNode(element);
  }
  function isEmptyNode(node) {
    switch (node.nodeType) {
      case node.TEXT_NODE:
        return node.nodeValue.trim() === "";
      case node.ELEMENT_NODE:
        if ([
          "AUDIO",
          "CANVAS",
          "EMBED",
          "IFRAME",
          "IMG",
          "MATH",
          "OBJECT",
          "SVG",
          "VIDEO"
        ].includes(node.tagName)) {
          return false;
        }
        if (!node.hasChildNodes()) {
          return true;
        }
        return Array.from(node.childNodes).every(isEmptyNode);
      default:
        return true;
    }
  }
  function serializeForm(form) {
    return new window.URLSearchParams(
      Array.from(new window.FormData(form))
    ).toString();
  }

  // packages/widgets/build-module/blocks/legacy-widget/edit/form.mjs
  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
  function Form({
    title,
    isVisible,
    id,
    idBase,
    instance,
    isWide,
    onChangeInstance,
    onChangeHasPreview
  }) {
    const ref = (0, import_element.useRef)();
    const isMediumLargeViewport = (0, import_compose2.useViewportMatch)("small");
    const outgoingInstances = (0, import_element.useRef)(/* @__PURE__ */ new Set());
    const incomingInstances = (0, import_element.useRef)(/* @__PURE__ */ new Set());
    const { createNotice } = (0, import_data2.useDispatch)(import_notices.store);
    (0, import_element.useEffect)(() => {
      if (incomingInstances.current.has(instance)) {
        incomingInstances.current.delete(instance);
        return;
      }
      const control = new Control({
        id,
        idBase,
        instance,
        onChangeInstance(nextInstance) {
          outgoingInstances.current.add(instance);
          incomingInstances.current.add(nextInstance);
          onChangeInstance(nextInstance);
        },
        onChangeHasPreview,
        onError(error) {
          window.console.error(error);
          createNotice(
            "error",
            (0, import_i18n3.sprintf)(
              /* translators: %s: the name of the affected block. */
              (0, import_i18n3.__)(
                'The "%s" block was affected by errors and may not function properly. Check the developer tools for more details.'
              ),
              idBase || id
            )
          );
        }
      });
      ref.current.appendChild(control.element);
      return () => {
        if (outgoingInstances.current.has(instance)) {
          outgoingInstances.current.delete(instance);
          return;
        }
        control.destroy();
      };
    }, [
      id,
      idBase,
      instance,
      onChangeInstance,
      onChangeHasPreview,
      isMediumLargeViewport
    ]);
    if (isWide && isMediumLargeViewport) {
      return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
        "div",
        {
          className: clsx_default({
            "wp-block-legacy-widget__container": isVisible
          }),
          children: [
            isVisible && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h3", { className: "wp-block-legacy-widget__edit-form-title", children: title }),
            /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
              import_components2.Popover,
              {
                focusOnMount: false,
                placement: "right",
                offset: 32,
                resize: false,
                flip: false,
                shift: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
                  "div",
                  {
                    ref,
                    className: "wp-block-legacy-widget__edit-form",
                    hidden: !isVisible
                  }
                )
              }
            )
          ]
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
      "div",
      {
        ref,
        className: "wp-block-legacy-widget__edit-form",
        hidden: !isVisible,
        children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h3", { className: "wp-block-legacy-widget__edit-form-title", children: title })
      }
    );
  }

  // packages/widgets/build-module/blocks/legacy-widget/edit/preview.mjs
  var import_compose3 = __toESM(require_compose(), 1);
  var import_element2 = __toESM(require_element(), 1);
  var import_components3 = __toESM(require_components(), 1);
  var import_i18n4 = __toESM(require_i18n(), 1);
  var import_api_fetch2 = __toESM(require_api_fetch(), 1);
  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
  function Preview({ idBase, instance, isVisible }) {
    const [isLoaded, setIsLoaded] = (0, import_element2.useState)(false);
    const [srcDoc, setSrcDoc] = (0, import_element2.useState)("");
    (0, import_element2.useEffect)(() => {
      const abortController = typeof window.AbortController === "undefined" ? void 0 : new window.AbortController();
      async function fetchPreviewHTML() {
        const restRoute = `/wp/v2/widget-types/${idBase}/render`;
        return await (0, import_api_fetch2.default)({
          path: restRoute,
          method: "POST",
          signal: abortController?.signal,
          data: instance ? { instance } : {}
        });
      }
      fetchPreviewHTML().then((response) => {
        setSrcDoc(response.preview);
      }).catch((error) => {
        if ("AbortError" === error.name) {
          return;
        }
        throw error;
      });
      return () => abortController?.abort();
    }, [idBase, instance]);
    const ref = (0, import_compose3.useRefEffect)(
      (iframe) => {
        if (!isLoaded) {
          return;
        }
        function setHeight() {
          const height = Math.max(
            iframe.contentDocument.documentElement?.offsetHeight ?? 0,
            iframe.contentDocument.body?.offsetHeight ?? 0
          );
          iframe.style.height = `${height !== 0 ? height : 100}px`;
        }
        const { IntersectionObserver } = iframe.ownerDocument.defaultView;
        const intersectionObserver = new IntersectionObserver(
          ([entry]) => {
            if (entry.isIntersecting) {
              setHeight();
            }
          },
          {
            threshold: 1
          }
        );
        intersectionObserver.observe(iframe);
        iframe.addEventListener("load", setHeight);
        return () => {
          intersectionObserver.disconnect();
          iframe.removeEventListener("load", setHeight);
        };
      },
      [isLoaded]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
      isVisible && !isLoaded && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_components3.Placeholder, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_components3.Spinner, {}) }),
      /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
        "div",
        {
          className: clsx_default("wp-block-legacy-widget__edit-preview", {
            "is-offscreen": !isVisible || !isLoaded
          }),
          children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_components3.Disabled, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
            "iframe",
            {
              ref,
              className: "wp-block-legacy-widget__edit-preview-iframe",
              tabIndex: "-1",
              title: (0, import_i18n4.__)("Legacy Widget Preview"),
              srcDoc,
              onLoad: (event) => {
                event.target.contentDocument.body.style.overflow = "hidden";
                setIsLoaded(true);
              },
              height: 100
            }
          ) })
        }
      )
    ] });
  }

  // packages/widgets/build-module/blocks/legacy-widget/edit/no-preview.mjs
  var import_i18n5 = __toESM(require_i18n(), 1);
  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
  function NoPreview({ name: name3 }) {
    return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "wp-block-legacy-widget__edit-no-preview", children: [
      name3 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h3", { children: name3 }),
      /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { children: (0, import_i18n5.__)("No preview available.") })
    ] });
  }

  // packages/widgets/build-module/blocks/legacy-widget/edit/convert-to-blocks-button.mjs
  var import_data3 = __toESM(require_data(), 1);
  var import_block_editor2 = __toESM(require_block_editor(), 1);
  var import_components4 = __toESM(require_components(), 1);
  var import_blocks = __toESM(require_blocks(), 1);
  var import_i18n6 = __toESM(require_i18n(), 1);
  var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
  function ConvertToBlocksButton({ clientId, rawInstance }) {
    const { replaceBlocks } = (0, import_data3.useDispatch)(import_block_editor2.store);
    return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
      import_components4.ToolbarButton,
      {
        onClick: () => {
          if (rawInstance.title) {
            replaceBlocks(clientId, [
              (0, import_blocks.createBlock)("core/heading", {
                content: rawInstance.title
              }),
              ...(0, import_blocks.rawHandler)({ HTML: rawInstance.text })
            ]);
          } else {
            replaceBlocks(
              clientId,
              (0, import_blocks.rawHandler)({ HTML: rawInstance.text })
            );
          }
        },
        children: (0, import_i18n6.__)("Convert to blocks")
      }
    );
  }

  // packages/widgets/build-module/blocks/legacy-widget/edit/index.mjs
  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
  function Edit(props) {
    const { id, idBase } = props.attributes;
    const { isWide = false } = props;
    const blockProps = (0, import_block_editor3.useBlockProps)({
      className: clsx_default({
        "is-wide-widget": isWide
      })
    });
    return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { ...blockProps, children: !id && !idBase ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Empty, { ...props }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(NotEmpty, { ...props }) });
  }
  function Empty({ attributes: { id, idBase }, setAttributes }) {
    return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
      import_components5.Placeholder,
      {
        icon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_block_editor3.BlockIcon, { icon: brush_default }),
        label: (0, import_i18n7.__)("Legacy Widget"),
        children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_components5.Flex, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_components5.FlexBlock, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
          WidgetTypeSelector,
          {
            selectedId: id ?? idBase,
            onSelect: ({ selectedId, isMulti }) => {
              if (!selectedId) {
                setAttributes({
                  id: null,
                  idBase: null,
                  instance: null
                });
              } else if (isMulti) {
                setAttributes({
                  id: null,
                  idBase: selectedId,
                  instance: {}
                });
              } else {
                setAttributes({
                  id: selectedId,
                  idBase: null,
                  instance: null
                });
              }
            }
          }
        ) }) })
      }
    );
  }
  function NotEmpty({
    attributes: { id, idBase, instance },
    setAttributes,
    clientId,
    isSelected,
    isWide = false
  }) {
    const [hasPreview, setHasPreview] = (0, import_element3.useState)(null);
    const widgetTypeId = id ?? idBase;
    const { record: widgetType, hasResolved: hasResolvedWidgetType } = (0, import_core_data2.useEntityRecord)("root", "widgetType", widgetTypeId);
    const setInstance = (0, import_element3.useCallback)((nextInstance) => {
      setAttributes({ instance: nextInstance });
    }, []);
    if (!widgetType && hasResolvedWidgetType) {
      return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
        import_components5.Placeholder,
        {
          icon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_block_editor3.BlockIcon, { icon: brush_default }),
          label: (0, import_i18n7.__)("Legacy Widget"),
          children: (0, import_i18n7.__)("Widget is missing.")
        }
      );
    }
    if (!hasResolvedWidgetType) {
      return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_components5.Placeholder, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_components5.Spinner, {}) });
    }
    const mode = idBase && !isSelected ? "preview" : "edit";
    return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
      idBase === "text" && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_block_editor3.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
        ConvertToBlocksButton,
        {
          clientId,
          rawInstance: instance.raw
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_block_editor3.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
        InspectorCard,
        {
          name: widgetType.name,
          description: widgetType.description
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
        Form,
        {
          title: widgetType.name,
          isVisible: mode === "edit",
          id,
          idBase,
          instance,
          isWide,
          onChangeInstance: setInstance,
          onChangeHasPreview: setHasPreview
        }
      ),
      idBase && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
        hasPreview === null && mode === "preview" && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_components5.Placeholder, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_components5.Spinner, {}) }),
        hasPreview === true && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
          Preview,
          {
            idBase,
            instance,
            isVisible: mode === "preview"
          }
        ),
        hasPreview === false && mode === "preview" && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(NoPreview, { name: widgetType.name })
      ] })
    ] });
  }

  // packages/widgets/build-module/blocks/legacy-widget/transforms.mjs
  var import_blocks2 = __toESM(require_blocks(), 1);
  var legacyWidgetTransforms = [
    {
      block: "core/calendar",
      widget: "calendar"
    },
    {
      block: "core/search",
      widget: "search"
    },
    {
      block: "core/html",
      widget: "custom_html",
      transform: ({ content }) => ({
        content
      })
    },
    {
      block: "core/archives",
      widget: "archives",
      transform: ({ count, dropdown }) => {
        return {
          displayAsDropdown: !!dropdown,
          showPostCounts: !!count
        };
      }
    },
    {
      block: "core/latest-posts",
      widget: "recent-posts",
      transform: ({ show_date: displayPostDate, number }) => {
        return {
          displayPostDate: !!displayPostDate,
          postsToShow: number
        };
      }
    },
    {
      block: "core/latest-comments",
      widget: "recent-comments",
      transform: ({ number }) => {
        return {
          commentsToShow: number
        };
      }
    },
    {
      block: "core/tag-cloud",
      widget: "tag_cloud",
      transform: ({ taxonomy, count }) => {
        return {
          showTagCounts: !!count,
          taxonomy
        };
      }
    },
    {
      block: "core/categories",
      widget: "categories",
      transform: ({ count, dropdown, hierarchical }) => {
        return {
          displayAsDropdown: !!dropdown,
          showPostCounts: !!count,
          showHierarchy: !!hierarchical
        };
      }
    },
    {
      block: "core/audio",
      widget: "media_audio",
      transform: ({ url, preload, loop, attachment_id: id }) => {
        return {
          src: url,
          id,
          preload,
          loop
        };
      }
    },
    {
      block: "core/video",
      widget: "media_video",
      transform: ({ url, preload, loop, attachment_id: id }) => {
        return {
          src: url,
          id,
          preload,
          loop
        };
      }
    },
    {
      block: "core/image",
      widget: "media_image",
      transform: ({
        alt,
        attachment_id: id,
        caption,
        height,
        link_classes: linkClass,
        link_rel: rel,
        link_target_blank: targetBlack,
        link_type: linkDestination,
        link_url: link,
        size: sizeSlug,
        url,
        width
      }) => {
        return {
          alt,
          caption,
          height,
          id,
          link,
          linkClass,
          linkDestination,
          linkTarget: targetBlack ? "_blank" : void 0,
          rel,
          sizeSlug,
          url,
          width
        };
      }
    },
    {
      block: "core/gallery",
      widget: "media_gallery",
      transform: ({ ids, link_type: linkTo, size, number }) => {
        return {
          ids,
          columns: number,
          linkTo,
          sizeSlug: size,
          images: ids.map((id) => ({
            id
          }))
        };
      }
    },
    {
      block: "core/rss",
      widget: "rss",
      transform: ({
        url,
        show_author: displayAuthor,
        show_date: displayDate,
        show_summary: displayExcerpt,
        items
      }) => {
        return {
          feedURL: url,
          displayAuthor: !!displayAuthor,
          displayDate: !!displayDate,
          displayExcerpt: !!displayExcerpt,
          itemsToShow: items
        };
      }
    }
  ].map(({ block, widget, transform }) => {
    return {
      type: "block",
      blocks: [block],
      isMatch: ({ idBase, instance }) => {
        return idBase === widget && !!instance?.raw;
      },
      transform: ({ instance }) => {
        const transformedBlock = (0, import_blocks2.createBlock)(
          block,
          transform ? transform(instance.raw) : void 0
        );
        if (!instance.raw?.title) {
          return transformedBlock;
        }
        return [
          (0, import_blocks2.createBlock)("core/heading", {
            content: instance.raw.title
          }),
          transformedBlock
        ];
      }
    };
  });
  var transforms = {
    to: legacyWidgetTransforms
  };
  var transforms_default = transforms;

  // packages/widgets/build-module/blocks/legacy-widget/index.mjs
  var { name } = block_default;
  var settings = {
    icon: widget_default,
    edit: Edit,
    transforms: transforms_default
  };

  // packages/widgets/build-module/blocks/widget-group/index.mjs
  var widget_group_exports = {};
  __export(widget_group_exports, {
    metadata: () => block_default2,
    name: () => name2,
    settings: () => settings2
  });
  var import_i18n9 = __toESM(require_i18n(), 1);
  var import_blocks3 = __toESM(require_blocks(), 1);

  // packages/widgets/build-module/blocks/widget-group/block.json
  var block_default2 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/widget-group",
    title: "Widget Group",
    category: "widgets",
    attributes: {
      title: {
        type: "string"
      }
    },
    supports: {
      html: false,
      inserter: true,
      customClassName: true,
      reusable: false
    },
    editorStyle: "wp-block-widget-group-editor",
    style: "wp-block-widget-group"
  };

  // packages/widgets/build-module/blocks/widget-group/edit.mjs
  var import_block_editor4 = __toESM(require_block_editor(), 1);
  var import_components6 = __toESM(require_components(), 1);
  var import_i18n8 = __toESM(require_i18n(), 1);
  var import_data4 = __toESM(require_data(), 1);
  var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
  function Edit2(props) {
    const { clientId } = props;
    const hasInnerBlocks = (0, import_data4.useSelect)(
      (select2) => select2(import_block_editor4.store).getBlockCount(clientId) > 0,
      [clientId]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { ...(0, import_block_editor4.useBlockProps)({ className: "widget" }), children: !hasInnerBlocks ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PlaceholderContent, { ...props }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PreviewContent, { ...props }) });
  }
  function PlaceholderContent({ clientId }) {
    return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
        import_components6.Placeholder,
        {
          className: "wp-block-widget-group__placeholder",
          icon: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_block_editor4.BlockIcon, { icon: group_default }),
          label: (0, import_i18n8.__)("Widget Group"),
          children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_block_editor4.ButtonBlockAppender, { rootClientId: clientId })
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_block_editor4.InnerBlocks, { renderAppender: false })
    ] });
  }
  function PreviewContent({ attributes, setAttributes }) {
    return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
        import_block_editor4.RichText,
        {
          tagName: "h2",
          identifier: "title",
          className: "widget-title",
          allowedFormats: [],
          placeholder: (0, import_i18n8.__)("Title"),
          value: attributes.title ?? "",
          onChange: (title) => setAttributes({ title })
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_block_editor4.InnerBlocks, {})
    ] });
  }

  // packages/widgets/build-module/blocks/widget-group/save.mjs
  var import_block_editor5 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
  function save({ attributes }) {
    return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
        import_block_editor5.RichText.Content,
        {
          tagName: "h2",
          className: "widget-title",
          value: attributes.title
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "wp-widget-group__inner-blocks", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_block_editor5.InnerBlocks.Content, {}) })
    ] });
  }

  // packages/widgets/build-module/blocks/widget-group/deprecated.mjs
  var import_block_editor6 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
  var v1 = {
    attributes: {
      title: {
        type: "string"
      }
    },
    supports: {
      html: false,
      inserter: true,
      customClassName: true,
      reusable: false
    },
    save({ attributes }) {
      return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
          import_block_editor6.RichText.Content,
          {
            tagName: "h2",
            className: "widget-title",
            value: attributes.title
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_block_editor6.InnerBlocks.Content, {})
      ] });
    }
  };
  var deprecated_default = [v1];

  // packages/widgets/build-module/blocks/widget-group/index.mjs
  var { name: name2 } = block_default2;
  var settings2 = {
    title: (0, import_i18n9.__)("Widget Group"),
    description: (0, import_i18n9.__)(
      "Create a classic widget layout with a title that\u2019s styled by your theme for your widget areas."
    ),
    icon: group_default,
    __experimentalLabel: ({ name: label }) => label,
    edit: Edit2,
    save,
    transforms: {
      from: [
        {
          type: "block",
          isMultiBlock: true,
          blocks: ["*"],
          isMatch(attributes, blocks) {
            return !blocks.some(
              (block) => block.name === "core/widget-group"
            );
          },
          __experimentalConvert(blocks) {
            let innerBlocks = [
              ...blocks.map((block) => {
                return (0, import_blocks3.createBlock)(
                  block.name,
                  block.attributes,
                  block.innerBlocks
                );
              })
            ];
            const firstHeadingBlock = innerBlocks[0].name === "core/heading" ? innerBlocks[0] : null;
            innerBlocks = innerBlocks.filter(
              (block) => block !== firstHeadingBlock
            );
            return (0, import_blocks3.createBlock)(
              "core/widget-group",
              {
                ...firstHeadingBlock && {
                  title: firstHeadingBlock.attributes.content
                }
              },
              innerBlocks
            );
          }
        }
      ]
    },
    deprecated: deprecated_default
  };

  // packages/widgets/build-module/components/move-to-widget-area/index.mjs
  var import_components7 = __toESM(require_components(), 1);
  var import_i18n10 = __toESM(require_i18n(), 1);
  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
  function MoveToWidgetArea({
    currentWidgetAreaId,
    widgetAreas,
    onSelect
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_components7.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_components7.ToolbarItem, { children: (toggleProps) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
      import_components7.DropdownMenu,
      {
        icon: move_to_default,
        label: (0, import_i18n10.__)("Move to widget area"),
        toggleProps,
        children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_components7.MenuGroup, { label: (0, import_i18n10.__)("Move to"), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
          import_components7.MenuItemsChoice,
          {
            choices: widgetAreas.map(
              (widgetArea) => ({
                value: widgetArea.id,
                label: widgetArea.name,
                info: widgetArea.description
              })
            ),
            value: currentWidgetAreaId,
            onSelect: (value) => {
              onSelect(value);
              onClose();
            }
          }
        ) })
      }
    ) }) });
  }

  // packages/widgets/build-module/utils.mjs
  function getWidgetIdFromBlock(block) {
    return block.attributes.__internalWidgetId;
  }
  function addWidgetIdToBlock(block, widgetId) {
    return {
      ...block,
      attributes: {
        ...block.attributes || {},
        __internalWidgetId: widgetId
      }
    };
  }

  // packages/widgets/build-module/register-legacy-widget-variations.mjs
  var import_data5 = __toESM(require_data(), 1);
  var import_core_data3 = __toESM(require_core_data(), 1);
  var import_blocks4 = __toESM(require_blocks(), 1);
  function registerLegacyWidgetVariations(settings3) {
    const unsubscribe = (0, import_data5.subscribe)(() => {
      const hiddenIds = settings3?.widgetTypesToHideFromLegacyWidgetBlock ?? [];
      const widgetTypes = (0, import_data5.select)(import_core_data3.store).getWidgetTypes({ per_page: -1 })?.filter((widgetType) => !hiddenIds.includes(widgetType.id));
      if (widgetTypes) {
        unsubscribe();
        (0, import_data5.dispatch)(import_blocks4.store).addBlockVariations(
          "core/legacy-widget",
          widgetTypes.map((widgetType) => ({
            name: widgetType.id,
            title: widgetType.name,
            description: widgetType.description,
            attributes: widgetType.is_multi ? {
              idBase: widgetType.id,
              instance: {}
            } : {
              id: widgetType.id
            }
          }))
        );
      }
    });
  }

  // packages/widgets/build-module/index.mjs
  function registerLegacyWidgetBlock(supports = {}) {
    const { metadata, settings: settings3, name: name3 } = legacy_widget_exports;
    (0, import_blocks5.registerBlockType)(
      { name: name3, ...metadata },
      {
        ...settings3,
        supports: {
          ...settings3.supports,
          ...supports
        }
      }
    );
  }
  function registerWidgetGroupBlock(supports = {}) {
    const { metadata, settings: settings3, name: name3 } = widget_group_exports;
    (0, import_blocks5.registerBlockType)(
      { name: name3, ...metadata },
      {
        ...settings3,
        supports: {
          ...settings3.supports,
          ...supports
        }
      }
    );
  }
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                                                                                                                                              dist/widgets.min.js                                                                                 0000644                 00000051454 15212564037 0010313 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;(wp||={}).widgets=(()=>{var Fe=Object.create;var G=Object.defineProperty;var He=Object.getOwnPropertyDescriptor;var je=Object.getOwnPropertyNames;var Ve=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty;var c=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),it=(t,e)=>{for(var a in e)G(t,a,{get:e[a],enumerable:!0})},Tt=(t,e,a,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of je(e))!Me.call(t,s)&&s!==a&&G(t,s,{get:()=>e[s],enumerable:!(r=He(e,s))||r.enumerable});return t};var o=(t,e,a)=>(a=t!=null?Fe(Ve(t)):{},Tt(e||!t||!t.__esModule?G(a,"default",{value:t,enumerable:!0}):a,t)),Ne=t=>Tt(G({},"__esModule",{value:!0}),t);var j=c((ra,Et)=>{Et.exports=window.wp.blocks});var $=c((oa,Ft)=>{Ft.exports=window.wp.element});var I=c((sa,Ht)=>{Ht.exports=window.wp.primitives});var m=c((fa,jt)=>{jt.exports=window.ReactJSXRuntime});var E=c((va,Mt)=>{Mt.exports=window.wp.blockEditor});var L=c((ba,Nt)=>{Nt.exports=window.wp.components});var w=c((ya,Dt)=>{Dt.exports=window.wp.i18n});var K=c((ka,Pt)=>{Pt.exports=window.wp.coreData});var M=c((xa,Rt)=>{Rt.exports=window.wp.data});var Gt=c((La,Ut)=>{Ut.exports=window.wp.notices});var et=c((Ba,$t)=>{$t.exports=window.wp.compose});var wt=c((Sa,Qt)=>{Qt.exports=window.wp.apiFetch});var ea={};it(ea,{MoveToWidgetArea:()=>Be,addWidgetIdToBlock:()=>Ke,getWidgetIdFromBlock:()=>Xe,registerLegacyWidgetBlock:()=>Ye,registerLegacyWidgetVariations:()=>Ee,registerWidgetGroupBlock:()=>ta});var St=o(j(),1);var yt={};it(yt,{metadata:()=>ht,name:()=>Oe,settings:()=>Ue});var Q=o(I(),1),dt=o(m(),1),q=(0,dt.jsx)(Q.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,dt.jsx)(Q.Path,{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"})});var Z=o(I(),1),mt=o(m(),1),W=(0,mt.jsx)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mt.jsx)(Z.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"})});var J=o(I(),1),ut=o(m(),1),nt=(0,ut.jsx)(J.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ut.jsx)(J.Path,{d:"M19.75 9c0-1.257-.565-2.197-1.39-2.858-.797-.64-1.827-1.017-2.815-1.247-1.802-.42-3.703-.403-4.383-.396L11 4.5V6l.177-.001c.696-.006 2.416-.02 4.028.356.887.207 1.67.518 2.216.957.52.416.829.945.829 1.688 0 .592-.167.966-.407 1.23-.255.281-.656.508-1.236.674-1.19.34-2.82.346-4.607.346h-.077c-1.692 0-3.527 0-4.942.404-.732.209-1.424.545-1.935 1.108-.526.579-.796 1.33-.796 2.238 0 1.257.565 2.197 1.39 2.858.797.64 1.827 1.017 2.815 1.247 1.802.42 3.703.403 4.383.396L13 19.5h.714V22L18 18.5 13.714 15v3H13l-.177.001c-.696.006-2.416.02-4.028-.356-.887-.207-1.67-.518-2.216-.957-.52-.416-.829-.945-.829-1.688 0-.592.167-.966.407-1.23.255-.281.656-.508 1.237-.674 1.189-.34 2.819-.346 4.606-.346h.077c1.692 0 3.527 0 4.941-.404.732-.209 1.425-.545 1.936-1.108.526-.579.796-1.33.796-2.238z"})});var X=o(I(),1),pt=o(m(),1),ct=(0,pt.jsx)(X.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pt.jsx)(X.Path,{d:"M6 3H8V5H16V3H18V5C19.1046 5 20 5.89543 20 7V19C20 20.1046 19.1046 21 18 21H6C4.89543 21 4 20.1046 4 19V7C4 5.89543 4.89543 5 6 5V3ZM18 6.5H6C5.72386 6.5 5.5 6.72386 5.5 7V8H18.5V7C18.5 6.72386 18.2761 6.5 18 6.5ZM18.5 9.5H5.5V19C5.5 19.2761 5.72386 19.5 6 19.5H18C18.2761 19.5 18.5 19.2761 18.5 19V9.5ZM11 11H13V13H11V11ZM7 11V13H9V11H7ZM15 13V11H17V13H15Z"})});var ht={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/legacy-widget",title:"Legacy Widget",category:"widgets",description:"Display a legacy widget.",textdomain:"default",attributes:{id:{type:"string",default:null},idBase:{type:"string",default:null},instance:{type:"object",default:null}},supports:{html:!1,customClassName:!1,reusable:!1},editorStyle:"wp-block-legacy-widget-editor"};function Vt(t){var e,a,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(a=Vt(t[e]))&&(r&&(r+=" "),r+=a)}else for(a in t)t[a]&&(r&&(r+=" "),r+=a);return r}function Pe(){for(var t,e,a=0,r="",s=arguments.length;a<s;a++)(t=arguments[a])&&(e=Vt(t))&&(r&&(r+=" "),r+=e);return r}var V=Pe;var x=o(E(),1),h=o(L(),1);var ot=o(w(),1),st=o($(),1),ve=o(K(),1);var tt=o(L(),1),Y=o(w(),1),It=o(M(),1),Wt=o(K(),1),At=o(E(),1),gt=o(m(),1);function zt({selectedId:t,onSelect:e}){let a=(0,It.useSelect)(r=>{let s=r(At.store).getSettings()?.widgetTypesToHideFromLegacyWidgetBlock??[];return r(Wt.store).getWidgetTypes({per_page:-1})?.filter(l=>!s.includes(l.id))},[]);return a?a.length===0?(0,Y.__)("There are no widgets available."):(0,gt.jsx)(tt.SelectControl,{__next40pxDefaultSize:!0,label:(0,Y.__)("Legacy widget"),value:t??"",options:[{value:"",label:(0,Y.__)("Select widget")},...a.map(r=>({value:r.id,label:r.name}))],onChange:r=>{if(r){let s=a.find(l=>l.id===r);e({selectedId:s.id,isMulti:s.is_multi})}else e({selectedId:null})}}):(0,gt.jsx)(tt.Spinner,{})}var A=o(m(),1);function Ot({name:t,description:e}){return(0,A.jsxs)("div",{className:"wp-block-legacy-widget-inspector-card",children:[(0,A.jsx)("h3",{className:"wp-block-legacy-widget-inspector-card__name",children:t}),(0,A.jsx)("span",{children:e})]})}var N=o($(),1),ee=o(M(),1),ae=o(Gt(),1),rt=o(w(),1),re=o(L(),1),oe=o(et(),1);var at=o(wt(),1),Xt=o(et(),1),Kt=o(w(),1),Yt=class{constructor({id:t,idBase:e,instance:a,onChangeInstance:r,onChangeHasPreview:s,onError:l}){this.id=t,this.idBase=e,this._instance=a,this._hasPreview=null,this.onChangeInstance=r,this.onChangeHasPreview=s,this.onError=l,this.number=++Re,this.handleFormChange=(0,Xt.debounce)(this.handleFormChange.bind(this),200),this.handleFormSubmit=this.handleFormSubmit.bind(this),this.initDOM(),this.bindEvents(),this.loadContent()}destroy(){this.unbindEvents(),this.element.remove()}initDOM(){this.element=b("div",{class:"widget open"},[b("div",{class:"widget-inside"},[this.form=b("form",{class:"form",method:"post"},[b("input",{class:"widget-id",type:"hidden",name:"widget-id",value:this.id??`${this.idBase}-${this.number}`}),b("input",{class:"id_base",type:"hidden",name:"id_base",value:this.idBase??this.id}),b("input",{class:"widget-width",type:"hidden",name:"widget-width",value:"250"}),b("input",{class:"widget-height",type:"hidden",name:"widget-height",value:"200"}),b("input",{class:"widget_number",type:"hidden",name:"widget_number",value:this.idBase?this.number.toString():""}),this.content=b("div",{class:"widget-content"}),this.id&&b("button",{class:"button is-primary",type:"submit"},(0,Kt.__)("Save"))])])])}bindEvents(){if(window.jQuery){let{jQuery:t}=window;t(this.form).on("change",null,this.handleFormChange),t(this.form).on("input",null,this.handleFormChange),t(this.form).on("submit",this.handleFormSubmit)}else this.form.addEventListener("change",this.handleFormChange),this.form.addEventListener("input",this.handleFormChange),this.form.addEventListener("submit",this.handleFormSubmit)}unbindEvents(){if(window.jQuery){let{jQuery:t}=window;t(this.form).off("change",null,this.handleFormChange),t(this.form).off("input",null,this.handleFormChange),t(this.form).off("submit",this.handleFormSubmit)}else this.form.removeEventListener("change",this.handleFormChange),this.form.removeEventListener("input",this.handleFormChange),this.form.removeEventListener("submit",this.handleFormSubmit)}async loadContent(){try{if(this.id){let{form:t}=await qt(this.id);this.content.innerHTML=t}else if(this.idBase){let{form:t,preview:e}=await vt({idBase:this.idBase,instance:this.instance,number:this.number});if(this.content.innerHTML=t,this.hasPreview=!Zt(e),!this.instance.hash){let{instance:a}=await vt({idBase:this.idBase,instance:this.instance,number:this.number,formData:Jt(this.form)});this.instance=a}}if(window.jQuery){let{jQuery:t}=window;t(document).trigger("widget-added",[t(this.element)])}}catch(t){this.onError(t)}}handleFormChange(){this.idBase&&this.saveForm()}handleFormSubmit(t){t.preventDefault(),this.saveForm()}async saveForm(){let t=Jt(this.form);try{if(this.id){let{form:e}=await qt(this.id,t);if(this.content.innerHTML=e,window.jQuery){let{jQuery:a}=window;a(document).trigger("widget-updated",[a(this.element)])}}else if(this.idBase){let{instance:e,preview:a}=await vt({idBase:this.idBase,instance:this.instance,number:this.number,formData:t});this.instance=e,this.hasPreview=!Zt(a)}}catch(e){this.onError(e)}}get instance(){return this._instance}set instance(t){this._instance!==t&&(this._instance=t,this.onChangeInstance(t))}get hasPreview(){return this._hasPreview}set hasPreview(t){this._hasPreview!==t&&(this._hasPreview=t,this.onChangeHasPreview(t))}},Re=0;function b(t,e={},a=null){let r=document.createElement(t);for(let[s,l]of Object.entries(e))r.setAttribute(s,l);if(Array.isArray(a))for(let s of a)s&&r.appendChild(s);else typeof a=="string"&&(r.innerText=a);return r}async function qt(t,e=null){let a;return e?a=await(0,at.default)({path:`/wp/v2/widgets/${t}?context=edit`,method:"PUT",data:{form_data:e}}):a=await(0,at.default)({path:`/wp/v2/widgets/${t}?context=edit`,method:"GET"}),{form:a.rendered_form}}async function vt({idBase:t,instance:e,number:a,formData:r=null}){let s=await(0,at.default)({path:`/wp/v2/widget-types/${t}/encode`,method:"POST",data:{instance:e,number:a,form_data:r}});return{instance:s.instance,form:s.form,preview:s.preview}}function Zt(t){let e=document.createElement("div");return e.innerHTML=t,te(e)}function te(t){switch(t.nodeType){case t.TEXT_NODE:return t.nodeValue.trim()==="";case t.ELEMENT_NODE:return["AUDIO","CANVAS","EMBED","IFRAME","IMG","MATH","OBJECT","SVG","VIDEO"].includes(t.tagName)?!1:t.hasChildNodes()?Array.from(t.childNodes).every(te):!0;default:return!0}}function Jt(t){return new window.URLSearchParams(Array.from(new window.FormData(t))).toString()}var B=o(m(),1);function se({title:t,isVisible:e,id:a,idBase:r,instance:s,isWide:l,onChangeInstance:_,onChangeHasPreview:v}){let i=(0,N.useRef)(),p=(0,oe.useViewportMatch)("small"),d=(0,N.useRef)(new Set),g=(0,N.useRef)(new Set),{createNotice:C}=(0,ee.useDispatch)(ae.store);return(0,N.useEffect)(()=>{if(g.current.has(s)){g.current.delete(s);return}let T=new Yt({id:a,idBase:r,instance:s,onChangeInstance(H){d.current.add(s),g.current.add(H),_(H)},onChangeHasPreview:v,onError(H){window.console.error(H),C("error",(0,rt.sprintf)((0,rt.__)('The "%s" block was affected by errors and may not function properly. Check the developer tools for more details.'),r||a))}});return i.current.appendChild(T.element),()=>{if(d.current.has(s)){d.current.delete(s);return}T.destroy()}},[a,r,s,_,v,p]),l&&p?(0,B.jsxs)("div",{className:V({"wp-block-legacy-widget__container":e}),children:[e&&(0,B.jsx)("h3",{className:"wp-block-legacy-widget__edit-form-title",children:t}),(0,B.jsx)(re.Popover,{focusOnMount:!1,placement:"right",offset:32,resize:!1,flip:!1,shift:!0,children:(0,B.jsx)("div",{ref:i,className:"wp-block-legacy-widget__edit-form",hidden:!e})})]}):(0,B.jsx)("div",{ref:i,className:"wp-block-legacy-widget__edit-form",hidden:!e,children:(0,B.jsx)("h3",{className:"wp-block-legacy-widget__edit-form-title",children:t})})}var fe=o(et(),1),z=o($(),1),D=o(L(),1),le=o(w(),1),ie=o(wt(),1),y=o(m(),1);function de({idBase:t,instance:e,isVisible:a}){let[r,s]=(0,z.useState)(!1),[l,_]=(0,z.useState)("");(0,z.useEffect)(()=>{let i=typeof window.AbortController>"u"?void 0:new window.AbortController;async function p(){let d=`/wp/v2/widget-types/${t}/render`;return await(0,ie.default)({path:d,method:"POST",signal:i?.signal,data:e?{instance:e}:{}})}return p().then(d=>{_(d.preview)}).catch(d=>{if(d.name!=="AbortError")throw d}),()=>i?.abort()},[t,e]);let v=(0,fe.useRefEffect)(i=>{if(!r)return;function p(){let C=Math.max(i.contentDocument.documentElement?.offsetHeight??0,i.contentDocument.body?.offsetHeight??0);i.style.height=`${C!==0?C:100}px`}let{IntersectionObserver:d}=i.ownerDocument.defaultView,g=new d(([C])=>{C.isIntersecting&&p()},{threshold:1});return g.observe(i),i.addEventListener("load",p),()=>{g.disconnect(),i.removeEventListener("load",p)}},[r]);return(0,y.jsxs)(y.Fragment,{children:[a&&!r&&(0,y.jsx)(D.Placeholder,{children:(0,y.jsx)(D.Spinner,{})}),(0,y.jsx)("div",{className:V("wp-block-legacy-widget__edit-preview",{"is-offscreen":!a||!r}),children:(0,y.jsx)(D.Disabled,{children:(0,y.jsx)("iframe",{ref:v,className:"wp-block-legacy-widget__edit-preview-iframe",tabIndex:"-1",title:(0,le.__)("Legacy Widget Preview"),srcDoc:l,onLoad:i=>{i.target.contentDocument.body.style.overflow="hidden",s(!0)},height:100})})})]})}var me=o(w(),1),O=o(m(),1);function ue({name:t}){return(0,O.jsxs)("div",{className:"wp-block-legacy-widget__edit-no-preview",children:[t&&(0,O.jsx)("h3",{children:t}),(0,O.jsx)("p",{children:(0,me.__)("No preview available.")})]})}var ne=o(M(),1),pe=o(E(),1),ce=o(L(),1),U=o(j(),1),he=o(w(),1),ge=o(m(),1);function we({clientId:t,rawInstance:e}){let{replaceBlocks:a}=(0,ne.useDispatch)(pe.store);return(0,ge.jsx)(ce.ToolbarButton,{onClick:()=>{e.title?a(t,[(0,U.createBlock)("core/heading",{content:e.title}),...(0,U.rawHandler)({HTML:e.text})]):a(t,(0,U.rawHandler)({HTML:e.text}))},children:(0,he.__)("Convert to blocks")})}var f=o(m(),1);function be(t){let{id:e,idBase:a}=t.attributes,{isWide:r=!1}=t,s=(0,x.useBlockProps)({className:V({"is-wide-widget":r})});return(0,f.jsx)("div",{...s,children:!e&&!a?(0,f.jsx)(Ie,{...t}):(0,f.jsx)(We,{...t})})}function Ie({attributes:{id:t,idBase:e},setAttributes:a}){return(0,f.jsx)(h.Placeholder,{icon:(0,f.jsx)(x.BlockIcon,{icon:q}),label:(0,ot.__)("Legacy Widget"),children:(0,f.jsx)(h.Flex,{children:(0,f.jsx)(h.FlexBlock,{children:(0,f.jsx)(zt,{selectedId:t??e,onSelect:({selectedId:r,isMulti:s})=>{a(r?s?{id:null,idBase:r,instance:{}}:{id:r,idBase:null,instance:null}:{id:null,idBase:null,instance:null})}})})})})}function We({attributes:{id:t,idBase:e,instance:a},setAttributes:r,clientId:s,isSelected:l,isWide:_=!1}){let[v,i]=(0,st.useState)(null),p=t??e,{record:d,hasResolved:g}=(0,ve.useEntityRecord)("root","widgetType",p),C=(0,st.useCallback)(H=>{r({instance:H})},[]);if(!d&&g)return(0,f.jsx)(h.Placeholder,{icon:(0,f.jsx)(x.BlockIcon,{icon:q}),label:(0,ot.__)("Legacy Widget"),children:(0,ot.__)("Widget is missing.")});if(!g)return(0,f.jsx)(h.Placeholder,{children:(0,f.jsx)(h.Spinner,{})});let T=e&&!l?"preview":"edit";return(0,f.jsxs)(f.Fragment,{children:[e==="text"&&(0,f.jsx)(x.BlockControls,{group:"other",children:(0,f.jsx)(we,{clientId:s,rawInstance:a.raw})}),(0,f.jsx)(x.InspectorControls,{children:(0,f.jsx)(Ot,{name:d.name,description:d.description})}),(0,f.jsx)(se,{title:d.name,isVisible:T==="edit",id:t,idBase:e,instance:a,isWide:_,onChangeInstance:C,onChangeHasPreview:i}),e&&(0,f.jsxs)(f.Fragment,{children:[v===null&&T==="preview"&&(0,f.jsx)(h.Placeholder,{children:(0,f.jsx)(h.Spinner,{})}),v===!0&&(0,f.jsx)(de,{idBase:e,instance:a,isVisible:T==="preview"}),v===!1&&T==="preview"&&(0,f.jsx)(ue,{name:d.name})]})]})}var bt=o(j(),1),Ae=[{block:"core/calendar",widget:"calendar"},{block:"core/search",widget:"search"},{block:"core/html",widget:"custom_html",transform:({content:t})=>({content:t})},{block:"core/archives",widget:"archives",transform:({count:t,dropdown:e})=>({displayAsDropdown:!!e,showPostCounts:!!t})},{block:"core/latest-posts",widget:"recent-posts",transform:({show_date:t,number:e})=>({displayPostDate:!!t,postsToShow:e})},{block:"core/latest-comments",widget:"recent-comments",transform:({number:t})=>({commentsToShow:t})},{block:"core/tag-cloud",widget:"tag_cloud",transform:({taxonomy:t,count:e})=>({showTagCounts:!!e,taxonomy:t})},{block:"core/categories",widget:"categories",transform:({count:t,dropdown:e,hierarchical:a})=>({displayAsDropdown:!!e,showPostCounts:!!t,showHierarchy:!!a})},{block:"core/audio",widget:"media_audio",transform:({url:t,preload:e,loop:a,attachment_id:r})=>({src:t,id:r,preload:e,loop:a})},{block:"core/video",widget:"media_video",transform:({url:t,preload:e,loop:a,attachment_id:r})=>({src:t,id:r,preload:e,loop:a})},{block:"core/image",widget:"media_image",transform:({alt:t,attachment_id:e,caption:a,height:r,link_classes:s,link_rel:l,link_target_blank:_,link_type:v,link_url:i,size:p,url:d,width:g})=>({alt:t,caption:a,height:r,id:e,link:i,linkClass:s,linkDestination:v,linkTarget:_?"_blank":void 0,rel:l,sizeSlug:p,url:d,width:g})},{block:"core/gallery",widget:"media_gallery",transform:({ids:t,link_type:e,size:a,number:r})=>({ids:t,columns:r,linkTo:e,sizeSlug:a,images:t.map(s=>({id:s}))})},{block:"core/rss",widget:"rss",transform:({url:t,show_author:e,show_date:a,show_summary:r,items:s})=>({feedURL:t,displayAuthor:!!e,displayDate:!!a,displayExcerpt:!!r,itemsToShow:s})}].map(({block:t,widget:e,transform:a})=>({type:"block",blocks:[t],isMatch:({idBase:r,instance:s})=>r===e&&!!s?.raw,transform:({instance:r})=>{let s=(0,bt.createBlock)(t,a?a(r.raw):void 0);return r.raw?.title?[(0,bt.createBlock)("core/heading",{content:r.raw.title}),s]:s}})),ze={to:Ae},ye=ze;var{name:Oe}=ht,Ue={icon:ct,edit:be,transforms:ye};var Lt={};it(Lt,{metadata:()=>kt,name:()=>Ze,settings:()=>Je});var _t=o(w(),1),Ct=o(j(),1);var kt={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/widget-group",title:"Widget Group",category:"widgets",attributes:{title:{type:"string"}},supports:{html:!1,inserter:!0,customClassName:!0,reusable:!1},editorStyle:"wp-block-widget-group-editor",style:"wp-block-widget-group"};var n=o(E(),1),ke=o(L(),1);var xt=o(w(),1),xe=o(M(),1),u=o(m(),1);function _e(t){let{clientId:e}=t,a=(0,xe.useSelect)(r=>r(n.store).getBlockCount(e)>0,[e]);return(0,u.jsx)("div",{...(0,n.useBlockProps)({className:"widget"}),children:a?(0,u.jsx)(Qe,{...t}):(0,u.jsx)($e,{...t})})}function $e({clientId:t}){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(ke.Placeholder,{className:"wp-block-widget-group__placeholder",icon:(0,u.jsx)(n.BlockIcon,{icon:W}),label:(0,xt.__)("Widget Group"),children:(0,u.jsx)(n.ButtonBlockAppender,{rootClientId:t})}),(0,u.jsx)(n.InnerBlocks,{renderAppender:!1})]})}function Qe({attributes:t,setAttributes:e}){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.RichText,{tagName:"h2",identifier:"title",className:"widget-title",allowedFormats:[],placeholder:(0,xt.__)("Title"),value:t.title??"",onChange:a=>e({title:a})}),(0,u.jsx)(n.InnerBlocks,{})]})}var ft=o(E(),1),S=o(m(),1);function Ce({attributes:t}){return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(ft.RichText.Content,{tagName:"h2",className:"widget-title",value:t.title}),(0,S.jsx)("div",{className:"wp-widget-group__inner-blocks",children:(0,S.jsx)(ft.InnerBlocks.Content,{})})]})}var lt=o(E(),1),F=o(m(),1),qe={attributes:{title:{type:"string"}},supports:{html:!1,inserter:!0,customClassName:!0,reusable:!1},save({attributes:t}){return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(lt.RichText.Content,{tagName:"h2",className:"widget-title",value:t.title}),(0,F.jsx)(lt.InnerBlocks.Content,{})]})}},Le=[qe];var{name:Ze}=kt,Je={title:(0,_t.__)("Widget Group"),description:(0,_t.__)("Create a classic widget layout with a title that\u2019s styled by your theme for your widget areas."),icon:W,__experimentalLabel:({name:t})=>t,edit:_e,save:Ce,transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["*"],isMatch(t,e){return!e.some(a=>a.name==="core/widget-group")},__experimentalConvert(t){let e=[...t.map(r=>(0,Ct.createBlock)(r.name,r.attributes,r.innerBlocks))],a=e[0].name==="core/heading"?e[0]:null;return e=e.filter(r=>r!==a),(0,Ct.createBlock)("core/widget-group",{...a&&{title:a.attributes.content}},e)}}]},deprecated:Le};var k=o(L(),1),Bt=o(w(),1);var P=o(m(),1);function Be({currentWidgetAreaId:t,widgetAreas:e,onSelect:a}){return(0,P.jsx)(k.ToolbarGroup,{children:(0,P.jsx)(k.ToolbarItem,{children:r=>(0,P.jsx)(k.DropdownMenu,{icon:nt,label:(0,Bt.__)("Move to widget area"),toggleProps:r,children:({onClose:s})=>(0,P.jsx)(k.MenuGroup,{label:(0,Bt.__)("Move to"),children:(0,P.jsx)(k.MenuItemsChoice,{choices:e.map(l=>({value:l.id,label:l.name,info:l.description})),value:t,onSelect:l=>{a(l),s()}})})})})})}function Xe(t){return t.attributes.__internalWidgetId}function Ke(t,e){return{...t,attributes:{...t.attributes||{},__internalWidgetId:e}}}var R=o(M(),1),Se=o(K(),1),Te=o(j(),1);function Ee(t){let e=(0,R.subscribe)(()=>{let a=t?.widgetTypesToHideFromLegacyWidgetBlock??[],r=(0,R.select)(Se.store).getWidgetTypes({per_page:-1})?.filter(s=>!a.includes(s.id));r&&(e(),(0,R.dispatch)(Te.store).addBlockVariations("core/legacy-widget",r.map(s=>({name:s.id,title:s.name,description:s.description,attributes:s.is_multi?{idBase:s.id,instance:{}}:{id:s.id}}))))})}function Ye(t={}){let{metadata:e,settings:a,name:r}=yt;(0,St.registerBlockType)({name:r,...e},{...a,supports:{...a.supports,...t}})}function ta(t={}){let{metadata:e,settings:a,name:r}=Lt;(0,St.registerBlockType)({name:r,...e},{...a,supports:{...a.supports,...t}})}return Ne(ea);})();
                                                                                                                                                                                                                    dist/wordcount.js                                                                                   0000644                 00000015675 15212564037 0010114 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).wordcount = (() => {
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // packages/wordcount/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    count: () => count
  });

  // packages/wordcount/build-module/defaultSettings.mjs
  var defaultSettings = {
    HTMLRegExp: /<\/?[a-z][^>]*?>/gi,
    HTMLcommentRegExp: /<!--[\s\S]*?-->/g,
    spaceRegExp: /&nbsp;|&#160;/gi,
    HTMLEntityRegExp: /&\S+?;/g,
    // \u2014 = em-dash.
    connectorRegExp: /--|\u2014/g,
    // Characters to be removed from input text.
    removeRegExp: new RegExp(
      [
        "[",
        // Basic Latin (extract)
        "!-/:-@[-`{-~",
        // Latin-1 Supplement (extract)
        "\x80-\xBF\xD7\xF7",
        /*
         * The following range consists of:
         * General Punctuation
         * Superscripts and Subscripts
         * Currency Symbols
         * Combining Diacritical Marks for Symbols
         * Letterlike Symbols
         * Number Forms
         * Arrows
         * Mathematical Operators
         * Miscellaneous Technical
         * Control Pictures
         * Optical Character Recognition
         * Enclosed Alphanumerics
         * Box Drawing
         * Block Elements
         * Geometric Shapes
         * Miscellaneous Symbols
         * Dingbats
         * Miscellaneous Mathematical Symbols-A
         * Supplemental Arrows-A
         * Braille Patterns
         * Supplemental Arrows-B
         * Miscellaneous Mathematical Symbols-B
         * Supplemental Mathematical Operators
         * Miscellaneous Symbols and Arrows
         */
        "\u2000-\u2BFF",
        // Supplemental Punctuation.
        "\u2E00-\u2E7F",
        "]"
      ].join(""),
      "g"
    ),
    // Remove UTF-16 surrogate points, see https://en.wikipedia.org/wiki/UTF-16#U.2BD800_to_U.2BDFFF
    astralRegExp: /[\uD800-\uDBFF][\uDC00-\uDFFF]/g,
    wordsRegExp: /\S\s+/g,
    characters_excluding_spacesRegExp: /\S/g,
    /*
     * Match anything that is not a formatting character, excluding:
     * \f = form feed
     * \n = new line
     * \r = carriage return
     * \t = tab
     * \v = vertical tab
     * \u00AD = soft hyphen
     * \u2028 = line separator
     * \u2029 = paragraph separator
     */
    characters_including_spacesRegExp: /[^\f\n\r\t\v\u00AD\u2028\u2029]/g,
    l10n: {
      type: "words"
    }
  };

  // packages/wordcount/build-module/stripTags.mjs
  function stripTags(settings, text) {
    return text.replace(settings.HTMLRegExp, "\n");
  }

  // packages/wordcount/build-module/transposeAstralsToCountableChar.mjs
  function transposeAstralsToCountableChar(settings, text) {
    return text.replace(settings.astralRegExp, "a");
  }

  // packages/wordcount/build-module/stripHTMLEntities.mjs
  function stripHTMLEntities(settings, text) {
    return text.replace(settings.HTMLEntityRegExp, "");
  }

  // packages/wordcount/build-module/stripConnectors.mjs
  function stripConnectors(settings, text) {
    return text.replace(settings.connectorRegExp, " ");
  }

  // packages/wordcount/build-module/stripRemovables.mjs
  function stripRemovables(settings, text) {
    return text.replace(settings.removeRegExp, "");
  }

  // packages/wordcount/build-module/stripHTMLComments.mjs
  function stripHTMLComments(settings, text) {
    return text.replace(settings.HTMLcommentRegExp, "");
  }

  // packages/wordcount/build-module/stripShortcodes.mjs
  function stripShortcodes(settings, text) {
    if (settings.shortcodesRegExp) {
      return text.replace(settings.shortcodesRegExp, "\n");
    }
    return text;
  }

  // packages/wordcount/build-module/stripSpaces.mjs
  function stripSpaces(settings, text) {
    return text.replace(settings.spaceRegExp, " ");
  }

  // packages/wordcount/build-module/transposeHTMLEntitiesToCountableChars.mjs
  function transposeHTMLEntitiesToCountableChars(settings, text) {
    return text.replace(settings.HTMLEntityRegExp, "a");
  }

  // packages/wordcount/build-module/index.mjs
  function loadSettings(type = "words", userSettings = {}) {
    const mergedSettings = { ...defaultSettings, ...userSettings };
    const settings = {
      ...mergedSettings,
      type,
      shortcodes: []
    };
    settings.shortcodes = settings.l10n?.shortcodes ?? [];
    if (settings.shortcodes && settings.shortcodes.length) {
      settings.shortcodesRegExp = new RegExp(
        "\\[\\/?(?:" + settings.shortcodes.join("|") + ")[^\\]]*?\\]",
        "g"
      );
    }
    if (settings.type !== "characters_excluding_spaces" && settings.type !== "characters_including_spaces") {
      settings.type = "words";
    }
    return settings;
  }
  function countWords(text, regex, settings) {
    text = [
      stripTags.bind(null, settings),
      stripHTMLComments.bind(null, settings),
      stripShortcodes.bind(null, settings),
      stripSpaces.bind(null, settings),
      stripHTMLEntities.bind(null, settings),
      stripConnectors.bind(null, settings),
      stripRemovables.bind(null, settings)
    ].reduce((result, fn) => fn(result), text);
    text = text + "\n";
    return text.match(regex)?.length ?? 0;
  }
  function countCharacters(text, regex, settings) {
    text = [
      stripTags.bind(null, settings),
      stripHTMLComments.bind(null, settings),
      stripShortcodes.bind(null, settings),
      transposeAstralsToCountableChar.bind(null, settings),
      stripSpaces.bind(null, settings),
      transposeHTMLEntitiesToCountableChars.bind(null, settings)
    ].reduce((result, fn) => fn(result), text);
    text = text + "\n";
    return text.match(regex)?.length ?? 0;
  }
  function count(text, type, userSettings) {
    const settings = loadSettings(type, userSettings);
    let matchRegExp;
    switch (settings.type) {
      case "words":
        matchRegExp = settings.wordsRegExp;
        return countWords(text, matchRegExp, settings);
      case "characters_including_spaces":
        matchRegExp = settings.characters_including_spacesRegExp;
        return countCharacters(text, matchRegExp, settings);
      case "characters_excluding_spaces":
        matchRegExp = settings.characters_excluding_spacesRegExp;
        return countCharacters(text, matchRegExp, settings);
      default:
        return 0;
    }
  }
  return __toCommonJS(index_exports);
})();
                                                                   dist/wordcount.min.js                                                                               0000644                 00000004646 15212564037 0010672 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).wordcount=(()=>{var s=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var R=Object.prototype.hasOwnProperty;var b=(e,r)=>{for(var t in r)s(e,t,{get:r[t],enumerable:!0})},T=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of h(r))!R.call(e,o)&&o!==t&&s(e,o,{get:()=>r[o],enumerable:!(n=x(r,o))||n.enumerable});return e};var _=e=>T(s({},"__esModule",{value:!0}),e);var M={};b(M,{count:()=>L});var i={HTMLRegExp:/<\/?[a-z][^>]*?>/gi,HTMLcommentRegExp:/<!--[\s\S]*?-->/g,spaceRegExp:/&nbsp;|&#160;/gi,HTMLEntityRegExp:/&\S+?;/g,connectorRegExp:/--|\u2014/g,removeRegExp:new RegExp(["[","!-/:-@[-`{-~","\x80-\xBF\xD7\xF7","\u2000-\u2BFF","\u2E00-\u2E7F","]"].join(""),"g"),astralRegExp:/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wordsRegExp:/\S\s+/g,characters_excluding_spacesRegExp:/\S/g,characters_including_spacesRegExp:/[^\f\n\r\t\v\u00AD\u2028\u2029]/g,l10n:{type:"words"}};function a(e,r){return r.replace(e.HTMLRegExp,`
`)}function l(e,r){return r.replace(e.astralRegExp,"a")}function d(e,r){return r.replace(e.HTMLEntityRegExp,"")}function g(e,r){return r.replace(e.connectorRegExp," ")}function f(e,r){return r.replace(e.removeRegExp,"")}function c(e,r){return r.replace(e.HTMLcommentRegExp,"")}function p(e,r){return e.shortcodesRegExp?r.replace(e.shortcodesRegExp,`
`):r}function u(e,r){return r.replace(e.spaceRegExp," ")}function m(e,r){return r.replace(e.HTMLEntityRegExp,"a")}function C(e="words",r={}){let n={...{...i,...r},type:e,shortcodes:[]};return n.shortcodes=n.l10n?.shortcodes??[],n.shortcodes&&n.shortcodes.length&&(n.shortcodesRegExp=new RegExp("\\[\\/?(?:"+n.shortcodes.join("|")+")[^\\]]*?\\]","g")),n.type!=="characters_excluding_spaces"&&n.type!=="characters_including_spaces"&&(n.type="words"),n}function H(e,r,t){return e=[a.bind(null,t),c.bind(null,t),p.bind(null,t),u.bind(null,t),d.bind(null,t),g.bind(null,t),f.bind(null,t)].reduce((n,o)=>o(n),e),e=e+`
`,e.match(r)?.length??0}function E(e,r,t){return e=[a.bind(null,t),c.bind(null,t),p.bind(null,t),l.bind(null,t),u.bind(null,t),m.bind(null,t)].reduce((n,o)=>o(n),e),e=e+`
`,e.match(r)?.length??0}function L(e,r,t){let n=C(r,t),o;switch(n.type){case"words":return o=n.wordsRegExp,H(e,o,n);case"characters_including_spaces":return o=n.characters_including_spacesRegExp,E(e,o,n);case"characters_excluding_spaces":return o=n.characters_excluding_spacesRegExp,E(e,o,n);default:return 0}}return _(M);})();
                                                                                          dist/react-i18n.js                                                                                  0000644                 00000007637 15212564037 0007742 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).reactI18n = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // packages/react-i18n/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    I18nProvider: () => I18nProvider,
    useI18n: () => useI18n,
    withI18n: () => withI18n
  });
  var import_element = __toESM(require_element(), 1);
  var import_i18n = __toESM(require_i18n(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  function makeContextValue(i18n) {
    return {
      __: i18n.__.bind(i18n),
      _x: i18n._x.bind(i18n),
      _n: i18n._n.bind(i18n),
      _nx: i18n._nx.bind(i18n),
      isRTL: i18n.isRTL.bind(i18n),
      hasTranslation: i18n.hasTranslation.bind(i18n)
    };
  }
  var I18nContext = (0, import_element.createContext)(makeContextValue(import_i18n.defaultI18n));
  I18nContext.displayName = "I18nContext";
  function I18nProvider(props) {
    const { children, i18n = import_i18n.defaultI18n } = props;
    const [update, forceUpdate] = (0, import_element.useReducer)(() => [], []);
    (0, import_element.useEffect)(() => i18n.subscribe(forceUpdate), [i18n]);
    const value = (0, import_element.useMemo)(() => makeContextValue(i18n), [i18n, update]);
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(I18nContext.Provider, { value, children });
  }
  var useI18n = () => (0, import_element.useContext)(I18nContext);
  function withI18n(InnerComponent) {
    const EnhancedComponent = (props) => {
      const i18nProps = useI18n();
      return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InnerComponent, { ...props, ...i18nProps });
    };
    const innerComponentName = InnerComponent.displayName || InnerComponent.name || "Component";
    EnhancedComponent.displayName = `WithI18n(${innerComponentName})`;
    return EnhancedComponent;
  }
  return __toCommonJS(index_exports);
})();
                                                                                                 dist/sync.js                                                                                        0000644                 00001316633 15212564037 0007043 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).sync = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all2) => {
    for (var name in all2)
      __defProp(target, name, { get: all2[name], enumerable: true });
  };
  var __copyProps = (to, from2, except, desc) => {
    if (from2 && typeof from2 === "object" || typeof from2 === "function") {
      for (let key of __getOwnPropNames(from2))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/private-apis
  var require_private_apis = __commonJS({
    "package-external:@wordpress/private-apis"(exports, module) {
      module.exports = window.wp.privateApis;
    }
  });

  // package-external:@wordpress/hooks
  var require_hooks = __commonJS({
    "package-external:@wordpress/hooks"(exports, module) {
      module.exports = window.wp.hooks;
    }
  });

  // package-external:@wordpress/api-fetch
  var require_api_fetch = __commonJS({
    "package-external:@wordpress/api-fetch"(exports, module) {
      module.exports = window.wp.apiFetch;
    }
  });

  // node_modules/fast-deep-equal/es6/index.js
  var require_es6 = __commonJS({
    "node_modules/fast-deep-equal/es6/index.js"(exports, module) {
      "use strict";
      module.exports = function equal(a, b) {
        if (a === b) return true;
        if (a && b && typeof a == "object" && typeof b == "object") {
          if (a.constructor !== b.constructor) return false;
          var length3, i, keys2;
          if (Array.isArray(a)) {
            length3 = a.length;
            if (length3 != b.length) return false;
            for (i = length3; i-- !== 0; )
              if (!equal(a[i], b[i])) return false;
            return true;
          }
          if (a instanceof Map && b instanceof Map) {
            if (a.size !== b.size) return false;
            for (i of a.entries())
              if (!b.has(i[0])) return false;
            for (i of a.entries())
              if (!equal(i[1], b.get(i[0]))) return false;
            return true;
          }
          if (a instanceof Set && b instanceof Set) {
            if (a.size !== b.size) return false;
            for (i of a.entries())
              if (!b.has(i[0])) return false;
            return true;
          }
          if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
            length3 = a.length;
            if (length3 != b.length) return false;
            for (i = length3; i-- !== 0; )
              if (a[i] !== b[i]) return false;
            return true;
          }
          if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
          if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
          if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
          keys2 = Object.keys(a);
          length3 = keys2.length;
          if (length3 !== Object.keys(b).length) return false;
          for (i = length3; i-- !== 0; )
            if (!Object.prototype.hasOwnProperty.call(b, keys2[i])) return false;
          for (i = length3; i-- !== 0; ) {
            var key = keys2[i];
            if (!equal(a[key], b[key])) return false;
          }
          return true;
        }
        return a !== a && b !== b;
      };
    }
  });

  // packages/sync/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    Awareness: () => Awareness,
    Y: () => yjs_exports,
    YJS_VERSION: () => YJS_VERSION,
    privateApis: () => privateApis
  });

  // node_modules/yjs/dist/yjs.mjs
  var yjs_exports = {};
  __export(yjs_exports, {
    AbsolutePosition: () => AbsolutePosition,
    AbstractConnector: () => AbstractConnector,
    AbstractStruct: () => AbstractStruct,
    AbstractType: () => AbstractType,
    Array: () => YArray,
    ContentAny: () => ContentAny,
    ContentBinary: () => ContentBinary,
    ContentDeleted: () => ContentDeleted,
    ContentDoc: () => ContentDoc,
    ContentEmbed: () => ContentEmbed,
    ContentFormat: () => ContentFormat,
    ContentJSON: () => ContentJSON,
    ContentString: () => ContentString,
    ContentType: () => ContentType,
    Doc: () => Doc,
    GC: () => GC,
    ID: () => ID,
    Item: () => Item,
    Map: () => YMap,
    PermanentUserData: () => PermanentUserData,
    RelativePosition: () => RelativePosition,
    Skip: () => Skip,
    Snapshot: () => Snapshot,
    Text: () => YText,
    Transaction: () => Transaction,
    UndoManager: () => UndoManager,
    UpdateDecoderV1: () => UpdateDecoderV1,
    UpdateDecoderV2: () => UpdateDecoderV2,
    UpdateEncoderV1: () => UpdateEncoderV1,
    UpdateEncoderV2: () => UpdateEncoderV2,
    XmlElement: () => YXmlElement,
    XmlFragment: () => YXmlFragment,
    XmlHook: () => YXmlHook,
    XmlText: () => YXmlText,
    YArrayEvent: () => YArrayEvent,
    YEvent: () => YEvent,
    YMapEvent: () => YMapEvent,
    YTextEvent: () => YTextEvent,
    YXmlEvent: () => YXmlEvent,
    applyUpdate: () => applyUpdate,
    applyUpdateV2: () => applyUpdateV2,
    cleanupYTextFormatting: () => cleanupYTextFormatting,
    compareIDs: () => compareIDs,
    compareRelativePositions: () => compareRelativePositions,
    convertUpdateFormatV1ToV2: () => convertUpdateFormatV1ToV2,
    convertUpdateFormatV2ToV1: () => convertUpdateFormatV2ToV1,
    createAbsolutePositionFromRelativePosition: () => createAbsolutePositionFromRelativePosition,
    createDeleteSet: () => createDeleteSet,
    createDeleteSetFromStructStore: () => createDeleteSetFromStructStore,
    createDocFromSnapshot: () => createDocFromSnapshot,
    createID: () => createID,
    createRelativePositionFromJSON: () => createRelativePositionFromJSON,
    createRelativePositionFromTypeIndex: () => createRelativePositionFromTypeIndex,
    createSnapshot: () => createSnapshot,
    decodeRelativePosition: () => decodeRelativePosition,
    decodeSnapshot: () => decodeSnapshot,
    decodeSnapshotV2: () => decodeSnapshotV2,
    decodeStateVector: () => decodeStateVector,
    decodeUpdate: () => decodeUpdate,
    decodeUpdateV2: () => decodeUpdateV2,
    diffUpdate: () => diffUpdate,
    diffUpdateV2: () => diffUpdateV2,
    emptySnapshot: () => emptySnapshot,
    encodeRelativePosition: () => encodeRelativePosition,
    encodeSnapshot: () => encodeSnapshot,
    encodeSnapshotV2: () => encodeSnapshotV2,
    encodeStateAsUpdate: () => encodeStateAsUpdate,
    encodeStateAsUpdateV2: () => encodeStateAsUpdateV2,
    encodeStateVector: () => encodeStateVector,
    encodeStateVectorFromUpdate: () => encodeStateVectorFromUpdate,
    encodeStateVectorFromUpdateV2: () => encodeStateVectorFromUpdateV2,
    equalDeleteSets: () => equalDeleteSets,
    equalSnapshots: () => equalSnapshots,
    findIndexSS: () => findIndexSS,
    findRootTypeKey: () => findRootTypeKey,
    getItem: () => getItem,
    getItemCleanEnd: () => getItemCleanEnd,
    getItemCleanStart: () => getItemCleanStart,
    getState: () => getState,
    getTypeChildren: () => getTypeChildren,
    isDeleted: () => isDeleted,
    isParentOf: () => isParentOf,
    iterateDeletedStructs: () => iterateDeletedStructs,
    logType: () => logType,
    logUpdate: () => logUpdate,
    logUpdateV2: () => logUpdateV2,
    mergeDeleteSets: () => mergeDeleteSets,
    mergeUpdates: () => mergeUpdates,
    mergeUpdatesV2: () => mergeUpdatesV2,
    obfuscateUpdate: () => obfuscateUpdate,
    obfuscateUpdateV2: () => obfuscateUpdateV2,
    parseUpdateMeta: () => parseUpdateMeta,
    parseUpdateMetaV2: () => parseUpdateMetaV2,
    readUpdate: () => readUpdate,
    readUpdateV2: () => readUpdateV2,
    relativePositionToJSON: () => relativePositionToJSON,
    snapshot: () => snapshot,
    snapshotContainsUpdate: () => snapshotContainsUpdate,
    transact: () => transact,
    tryGc: () => tryGc,
    typeListToArraySnapshot: () => typeListToArraySnapshot,
    typeMapGetAllSnapshot: () => typeMapGetAllSnapshot,
    typeMapGetSnapshot: () => typeMapGetSnapshot
  });

  // node_modules/lib0/map.js
  var create = () => /* @__PURE__ */ new Map();
  var copy = (m) => {
    const r = create();
    m.forEach((v, k) => {
      r.set(k, v);
    });
    return r;
  };
  var setIfUndefined = (map2, key, createT) => {
    let set = map2.get(key);
    if (set === void 0) {
      map2.set(key, set = createT());
    }
    return set;
  };
  var map = (m, f) => {
    const res = [];
    for (const [key, value] of m) {
      res.push(f(value, key));
    }
    return res;
  };
  var any = (m, f) => {
    for (const [key, value] of m) {
      if (f(value, key)) {
        return true;
      }
    }
    return false;
  };

  // node_modules/lib0/set.js
  var create2 = () => /* @__PURE__ */ new Set();

  // node_modules/lib0/array.js
  var last = (arr) => arr[arr.length - 1];
  var appendTo = (dest, src) => {
    for (let i = 0; i < src.length; i++) {
      dest.push(src[i]);
    }
  };
  var from = Array.from;
  var some = (arr, f) => {
    for (let i = 0; i < arr.length; i++) {
      if (f(arr[i], i, arr)) {
        return true;
      }
    }
    return false;
  };
  var unfold = (len, f) => {
    const array = new Array(len);
    for (let i = 0; i < len; i++) {
      array[i] = f(i, array);
    }
    return array;
  };
  var isArray = Array.isArray;

  // node_modules/lib0/observable.js
  var ObservableV2 = class {
    constructor() {
      this._observers = create();
    }
    /**
     * @template {keyof EVENTS & string} NAME
     * @param {NAME} name
     * @param {EVENTS[NAME]} f
     */
    on(name, f) {
      setIfUndefined(
        this._observers,
        /** @type {string} */
        name,
        create2
      ).add(f);
      return f;
    }
    /**
     * @template {keyof EVENTS & string} NAME
     * @param {NAME} name
     * @param {EVENTS[NAME]} f
     */
    once(name, f) {
      const _f = (...args2) => {
        this.off(
          name,
          /** @type {any} */
          _f
        );
        f(...args2);
      };
      this.on(
        name,
        /** @type {any} */
        _f
      );
    }
    /**
     * @template {keyof EVENTS & string} NAME
     * @param {NAME} name
     * @param {EVENTS[NAME]} f
     */
    off(name, f) {
      const observers = this._observers.get(name);
      if (observers !== void 0) {
        observers.delete(f);
        if (observers.size === 0) {
          this._observers.delete(name);
        }
      }
    }
    /**
     * Emit a named event. All registered event listeners that listen to the
     * specified name will receive the event.
     *
     * @todo This should catch exceptions
     *
     * @template {keyof EVENTS & string} NAME
     * @param {NAME} name The event name.
     * @param {Parameters<EVENTS[NAME]>} args The arguments that are applied to the event listener.
     */
    emit(name, args2) {
      return from((this._observers.get(name) || create()).values()).forEach((f) => f(...args2));
    }
    destroy() {
      this._observers = create();
    }
  };
  var Observable = class {
    constructor() {
      this._observers = create();
    }
    /**
     * @param {N} name
     * @param {function} f
     */
    on(name, f) {
      setIfUndefined(this._observers, name, create2).add(f);
    }
    /**
     * @param {N} name
     * @param {function} f
     */
    once(name, f) {
      const _f = (...args2) => {
        this.off(name, _f);
        f(...args2);
      };
      this.on(name, _f);
    }
    /**
     * @param {N} name
     * @param {function} f
     */
    off(name, f) {
      const observers = this._observers.get(name);
      if (observers !== void 0) {
        observers.delete(f);
        if (observers.size === 0) {
          this._observers.delete(name);
        }
      }
    }
    /**
     * Emit a named event. All registered event listeners that listen to the
     * specified name will receive the event.
     *
     * @todo This should catch exceptions
     *
     * @param {N} name The event name.
     * @param {Array<any>} args The arguments that are applied to the event listener.
     */
    emit(name, args2) {
      return from((this._observers.get(name) || create()).values()).forEach((f) => f(...args2));
    }
    destroy() {
      this._observers = create();
    }
  };

  // node_modules/lib0/math.js
  var floor = Math.floor;
  var abs = Math.abs;
  var min = (a, b) => a < b ? a : b;
  var max = (a, b) => a > b ? a : b;
  var isNaN2 = Number.isNaN;
  var isNegativeZero = (n) => n !== 0 ? n < 0 : 1 / n < 0;

  // node_modules/lib0/binary.js
  var BIT1 = 1;
  var BIT2 = 2;
  var BIT3 = 4;
  var BIT4 = 8;
  var BIT6 = 32;
  var BIT7 = 64;
  var BIT8 = 128;
  var BIT18 = 1 << 17;
  var BIT19 = 1 << 18;
  var BIT20 = 1 << 19;
  var BIT21 = 1 << 20;
  var BIT22 = 1 << 21;
  var BIT23 = 1 << 22;
  var BIT24 = 1 << 23;
  var BIT25 = 1 << 24;
  var BIT26 = 1 << 25;
  var BIT27 = 1 << 26;
  var BIT28 = 1 << 27;
  var BIT29 = 1 << 28;
  var BIT30 = 1 << 29;
  var BIT31 = 1 << 30;
  var BIT32 = 1 << 31;
  var BITS5 = 31;
  var BITS6 = 63;
  var BITS7 = 127;
  var BITS17 = BIT18 - 1;
  var BITS18 = BIT19 - 1;
  var BITS19 = BIT20 - 1;
  var BITS20 = BIT21 - 1;
  var BITS21 = BIT22 - 1;
  var BITS22 = BIT23 - 1;
  var BITS23 = BIT24 - 1;
  var BITS24 = BIT25 - 1;
  var BITS25 = BIT26 - 1;
  var BITS26 = BIT27 - 1;
  var BITS27 = BIT28 - 1;
  var BITS28 = BIT29 - 1;
  var BITS29 = BIT30 - 1;
  var BITS30 = BIT31 - 1;
  var BITS31 = 2147483647;

  // node_modules/lib0/number.js
  var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER;
  var MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER;
  var LOWEST_INT32 = 1 << 31;
  var isInteger = Number.isInteger || ((num) => typeof num === "number" && isFinite(num) && floor(num) === num);
  var isNaN3 = Number.isNaN;
  var parseInt2 = Number.parseInt;

  // node_modules/lib0/string.js
  var fromCharCode = String.fromCharCode;
  var fromCodePoint = String.fromCodePoint;
  var MAX_UTF16_CHARACTER = fromCharCode(65535);
  var toLowerCase = (s) => s.toLowerCase();
  var trimLeftRegex = /^\s*/g;
  var trimLeft = (s) => s.replace(trimLeftRegex, "");
  var fromCamelCaseRegex = /([A-Z])/g;
  var fromCamelCase = (s, separator) => trimLeft(s.replace(fromCamelCaseRegex, (match) => `${separator}${toLowerCase(match)}`));
  var _encodeUtf8Polyfill = (str) => {
    const encodedString = unescape(encodeURIComponent(str));
    const len = encodedString.length;
    const buf = new Uint8Array(len);
    for (let i = 0; i < len; i++) {
      buf[i] = /** @type {number} */
      encodedString.codePointAt(i);
    }
    return buf;
  };
  var utf8TextEncoder = (
    /** @type {TextEncoder} */
    typeof TextEncoder !== "undefined" ? new TextEncoder() : null
  );
  var _encodeUtf8Native = (str) => utf8TextEncoder.encode(str);
  var encodeUtf8 = utf8TextEncoder ? _encodeUtf8Native : _encodeUtf8Polyfill;
  var utf8TextDecoder = typeof TextDecoder === "undefined" ? null : new TextDecoder("utf-8", { fatal: true, ignoreBOM: true });
  if (utf8TextDecoder && utf8TextDecoder.decode(new Uint8Array()).length === 1) {
    utf8TextDecoder = null;
  }
  var repeat = (source, n) => unfold(n, () => source).join("");

  // node_modules/lib0/encoding.js
  var Encoder = class {
    constructor() {
      this.cpos = 0;
      this.cbuf = new Uint8Array(100);
      this.bufs = [];
    }
  };
  var createEncoder = () => new Encoder();
  var length = (encoder) => {
    let len = encoder.cpos;
    for (let i = 0; i < encoder.bufs.length; i++) {
      len += encoder.bufs[i].length;
    }
    return len;
  };
  var toUint8Array = (encoder) => {
    const uint8arr = new Uint8Array(length(encoder));
    let curPos = 0;
    for (let i = 0; i < encoder.bufs.length; i++) {
      const d = encoder.bufs[i];
      uint8arr.set(d, curPos);
      curPos += d.length;
    }
    uint8arr.set(new Uint8Array(encoder.cbuf.buffer, 0, encoder.cpos), curPos);
    return uint8arr;
  };
  var verifyLen = (encoder, len) => {
    const bufferLen = encoder.cbuf.length;
    if (bufferLen - encoder.cpos < len) {
      encoder.bufs.push(new Uint8Array(encoder.cbuf.buffer, 0, encoder.cpos));
      encoder.cbuf = new Uint8Array(max(bufferLen, len) * 2);
      encoder.cpos = 0;
    }
  };
  var write = (encoder, num) => {
    const bufferLen = encoder.cbuf.length;
    if (encoder.cpos === bufferLen) {
      encoder.bufs.push(encoder.cbuf);
      encoder.cbuf = new Uint8Array(bufferLen * 2);
      encoder.cpos = 0;
    }
    encoder.cbuf[encoder.cpos++] = num;
  };
  var writeUint8 = write;
  var writeVarUint = (encoder, num) => {
    while (num > BITS7) {
      write(encoder, BIT8 | BITS7 & num);
      num = floor(num / 128);
    }
    write(encoder, BITS7 & num);
  };
  var writeVarInt = (encoder, num) => {
    const isNegative = isNegativeZero(num);
    if (isNegative) {
      num = -num;
    }
    write(encoder, (num > BITS6 ? BIT8 : 0) | (isNegative ? BIT7 : 0) | BITS6 & num);
    num = floor(num / 64);
    while (num > 0) {
      write(encoder, (num > BITS7 ? BIT8 : 0) | BITS7 & num);
      num = floor(num / 128);
    }
  };
  var _strBuffer = new Uint8Array(3e4);
  var _maxStrBSize = _strBuffer.length / 3;
  var _writeVarStringNative = (encoder, str) => {
    if (str.length < _maxStrBSize) {
      const written = utf8TextEncoder.encodeInto(str, _strBuffer).written || 0;
      writeVarUint(encoder, written);
      for (let i = 0; i < written; i++) {
        write(encoder, _strBuffer[i]);
      }
    } else {
      writeVarUint8Array(encoder, encodeUtf8(str));
    }
  };
  var _writeVarStringPolyfill = (encoder, str) => {
    const encodedString = unescape(encodeURIComponent(str));
    const len = encodedString.length;
    writeVarUint(encoder, len);
    for (let i = 0; i < len; i++) {
      write(
        encoder,
        /** @type {number} */
        encodedString.codePointAt(i)
      );
    }
  };
  var writeVarString = utf8TextEncoder && /** @type {any} */
  utf8TextEncoder.encodeInto ? _writeVarStringNative : _writeVarStringPolyfill;
  var writeBinaryEncoder = (encoder, append2) => writeUint8Array(encoder, toUint8Array(append2));
  var writeUint8Array = (encoder, uint8Array) => {
    const bufferLen = encoder.cbuf.length;
    const cpos = encoder.cpos;
    const leftCopyLen = min(bufferLen - cpos, uint8Array.length);
    const rightCopyLen = uint8Array.length - leftCopyLen;
    encoder.cbuf.set(uint8Array.subarray(0, leftCopyLen), cpos);
    encoder.cpos += leftCopyLen;
    if (rightCopyLen > 0) {
      encoder.bufs.push(encoder.cbuf);
      encoder.cbuf = new Uint8Array(max(bufferLen * 2, rightCopyLen));
      encoder.cbuf.set(uint8Array.subarray(leftCopyLen));
      encoder.cpos = rightCopyLen;
    }
  };
  var writeVarUint8Array = (encoder, uint8Array) => {
    writeVarUint(encoder, uint8Array.byteLength);
    writeUint8Array(encoder, uint8Array);
  };
  var writeOnDataView = (encoder, len) => {
    verifyLen(encoder, len);
    const dview = new DataView(encoder.cbuf.buffer, encoder.cpos, len);
    encoder.cpos += len;
    return dview;
  };
  var writeFloat32 = (encoder, num) => writeOnDataView(encoder, 4).setFloat32(0, num, false);
  var writeFloat64 = (encoder, num) => writeOnDataView(encoder, 8).setFloat64(0, num, false);
  var writeBigInt64 = (encoder, num) => (
    /** @type {any} */
    writeOnDataView(encoder, 8).setBigInt64(0, num, false)
  );
  var floatTestBed = new DataView(new ArrayBuffer(4));
  var isFloat32 = (num) => {
    floatTestBed.setFloat32(0, num);
    return floatTestBed.getFloat32(0) === num;
  };
  var writeAny = (encoder, data) => {
    switch (typeof data) {
      case "string":
        write(encoder, 119);
        writeVarString(encoder, data);
        break;
      case "number":
        if (isInteger(data) && abs(data) <= BITS31) {
          write(encoder, 125);
          writeVarInt(encoder, data);
        } else if (isFloat32(data)) {
          write(encoder, 124);
          writeFloat32(encoder, data);
        } else {
          write(encoder, 123);
          writeFloat64(encoder, data);
        }
        break;
      case "bigint":
        write(encoder, 122);
        writeBigInt64(encoder, data);
        break;
      case "object":
        if (data === null) {
          write(encoder, 126);
        } else if (isArray(data)) {
          write(encoder, 117);
          writeVarUint(encoder, data.length);
          for (let i = 0; i < data.length; i++) {
            writeAny(encoder, data[i]);
          }
        } else if (data instanceof Uint8Array) {
          write(encoder, 116);
          writeVarUint8Array(encoder, data);
        } else {
          write(encoder, 118);
          const keys2 = Object.keys(data);
          writeVarUint(encoder, keys2.length);
          for (let i = 0; i < keys2.length; i++) {
            const key = keys2[i];
            writeVarString(encoder, key);
            writeAny(encoder, data[key]);
          }
        }
        break;
      case "boolean":
        write(encoder, data ? 120 : 121);
        break;
      default:
        write(encoder, 127);
    }
  };
  var RleEncoder = class extends Encoder {
    /**
     * @param {function(Encoder, T):void} writer
     */
    constructor(writer) {
      super();
      this.w = writer;
      this.s = null;
      this.count = 0;
    }
    /**
     * @param {T} v
     */
    write(v) {
      if (this.s === v) {
        this.count++;
      } else {
        if (this.count > 0) {
          writeVarUint(this, this.count - 1);
        }
        this.count = 1;
        this.w(this, v);
        this.s = v;
      }
    }
  };
  var flushUintOptRleEncoder = (encoder) => {
    if (encoder.count > 0) {
      writeVarInt(encoder.encoder, encoder.count === 1 ? encoder.s : -encoder.s);
      if (encoder.count > 1) {
        writeVarUint(encoder.encoder, encoder.count - 2);
      }
    }
  };
  var UintOptRleEncoder = class {
    constructor() {
      this.encoder = new Encoder();
      this.s = 0;
      this.count = 0;
    }
    /**
     * @param {number} v
     */
    write(v) {
      if (this.s === v) {
        this.count++;
      } else {
        flushUintOptRleEncoder(this);
        this.count = 1;
        this.s = v;
      }
    }
    /**
     * Flush the encoded state and transform this to a Uint8Array.
     *
     * Note that this should only be called once.
     */
    toUint8Array() {
      flushUintOptRleEncoder(this);
      return toUint8Array(this.encoder);
    }
  };
  var flushIntDiffOptRleEncoder = (encoder) => {
    if (encoder.count > 0) {
      const encodedDiff = encoder.diff * 2 + (encoder.count === 1 ? 0 : 1);
      writeVarInt(encoder.encoder, encodedDiff);
      if (encoder.count > 1) {
        writeVarUint(encoder.encoder, encoder.count - 2);
      }
    }
  };
  var IntDiffOptRleEncoder = class {
    constructor() {
      this.encoder = new Encoder();
      this.s = 0;
      this.count = 0;
      this.diff = 0;
    }
    /**
     * @param {number} v
     */
    write(v) {
      if (this.diff === v - this.s) {
        this.s = v;
        this.count++;
      } else {
        flushIntDiffOptRleEncoder(this);
        this.count = 1;
        this.diff = v - this.s;
        this.s = v;
      }
    }
    /**
     * Flush the encoded state and transform this to a Uint8Array.
     *
     * Note that this should only be called once.
     */
    toUint8Array() {
      flushIntDiffOptRleEncoder(this);
      return toUint8Array(this.encoder);
    }
  };
  var StringEncoder = class {
    constructor() {
      this.sarr = [];
      this.s = "";
      this.lensE = new UintOptRleEncoder();
    }
    /**
     * @param {string} string
     */
    write(string) {
      this.s += string;
      if (this.s.length > 19) {
        this.sarr.push(this.s);
        this.s = "";
      }
      this.lensE.write(string.length);
    }
    toUint8Array() {
      const encoder = new Encoder();
      this.sarr.push(this.s);
      this.s = "";
      writeVarString(encoder, this.sarr.join(""));
      writeUint8Array(encoder, this.lensE.toUint8Array());
      return toUint8Array(encoder);
    }
  };

  // node_modules/lib0/error.js
  var create3 = (s) => new Error(s);
  var methodUnimplemented = () => {
    throw create3("Method unimplemented");
  };
  var unexpectedCase = () => {
    throw create3("Unexpected case");
  };

  // node_modules/lib0/decoding.js
  var errorUnexpectedEndOfArray = create3("Unexpected end of array");
  var errorIntegerOutOfRange = create3("Integer out of Range");
  var Decoder = class {
    /**
     * @param {Uint8Array} uint8Array Binary data to decode
     */
    constructor(uint8Array) {
      this.arr = uint8Array;
      this.pos = 0;
    }
  };
  var createDecoder = (uint8Array) => new Decoder(uint8Array);
  var hasContent = (decoder) => decoder.pos !== decoder.arr.length;
  var readUint8Array = (decoder, len) => {
    const view = new Uint8Array(decoder.arr.buffer, decoder.pos + decoder.arr.byteOffset, len);
    decoder.pos += len;
    return view;
  };
  var readVarUint8Array = (decoder) => readUint8Array(decoder, readVarUint(decoder));
  var readUint8 = (decoder) => decoder.arr[decoder.pos++];
  var readVarUint = (decoder) => {
    let num = 0;
    let mult = 1;
    const len = decoder.arr.length;
    while (decoder.pos < len) {
      const r = decoder.arr[decoder.pos++];
      num = num + (r & BITS7) * mult;
      mult *= 128;
      if (r < BIT8) {
        return num;
      }
      if (num > MAX_SAFE_INTEGER) {
        throw errorIntegerOutOfRange;
      }
    }
    throw errorUnexpectedEndOfArray;
  };
  var readVarInt = (decoder) => {
    let r = decoder.arr[decoder.pos++];
    let num = r & BITS6;
    let mult = 64;
    const sign = (r & BIT7) > 0 ? -1 : 1;
    if ((r & BIT8) === 0) {
      return sign * num;
    }
    const len = decoder.arr.length;
    while (decoder.pos < len) {
      r = decoder.arr[decoder.pos++];
      num = num + (r & BITS7) * mult;
      mult *= 128;
      if (r < BIT8) {
        return sign * num;
      }
      if (num > MAX_SAFE_INTEGER) {
        throw errorIntegerOutOfRange;
      }
    }
    throw errorUnexpectedEndOfArray;
  };
  var _readVarStringPolyfill = (decoder) => {
    let remainingLen = readVarUint(decoder);
    if (remainingLen === 0) {
      return "";
    } else {
      let encodedString = String.fromCodePoint(readUint8(decoder));
      if (--remainingLen < 100) {
        while (remainingLen--) {
          encodedString += String.fromCodePoint(readUint8(decoder));
        }
      } else {
        while (remainingLen > 0) {
          const nextLen = remainingLen < 1e4 ? remainingLen : 1e4;
          const bytes = decoder.arr.subarray(decoder.pos, decoder.pos + nextLen);
          decoder.pos += nextLen;
          encodedString += String.fromCodePoint.apply(
            null,
            /** @type {any} */
            bytes
          );
          remainingLen -= nextLen;
        }
      }
      return decodeURIComponent(escape(encodedString));
    }
  };
  var _readVarStringNative = (decoder) => (
    /** @type any */
    utf8TextDecoder.decode(readVarUint8Array(decoder))
  );
  var readVarString = utf8TextDecoder ? _readVarStringNative : _readVarStringPolyfill;
  var readFromDataView = (decoder, len) => {
    const dv = new DataView(decoder.arr.buffer, decoder.arr.byteOffset + decoder.pos, len);
    decoder.pos += len;
    return dv;
  };
  var readFloat32 = (decoder) => readFromDataView(decoder, 4).getFloat32(0, false);
  var readFloat64 = (decoder) => readFromDataView(decoder, 8).getFloat64(0, false);
  var readBigInt64 = (decoder) => (
    /** @type {any} */
    readFromDataView(decoder, 8).getBigInt64(0, false)
  );
  var readAnyLookupTable = [
    (decoder) => void 0,
    // CASE 127: undefined
    (decoder) => null,
    // CASE 126: null
    readVarInt,
    // CASE 125: integer
    readFloat32,
    // CASE 124: float32
    readFloat64,
    // CASE 123: float64
    readBigInt64,
    // CASE 122: bigint
    (decoder) => false,
    // CASE 121: boolean (false)
    (decoder) => true,
    // CASE 120: boolean (true)
    readVarString,
    // CASE 119: string
    (decoder) => {
      const len = readVarUint(decoder);
      const obj = {};
      for (let i = 0; i < len; i++) {
        const key = readVarString(decoder);
        obj[key] = readAny(decoder);
      }
      return obj;
    },
    (decoder) => {
      const len = readVarUint(decoder);
      const arr = [];
      for (let i = 0; i < len; i++) {
        arr.push(readAny(decoder));
      }
      return arr;
    },
    readVarUint8Array
    // CASE 116: Uint8Array
  ];
  var readAny = (decoder) => readAnyLookupTable[127 - readUint8(decoder)](decoder);
  var RleDecoder = class extends Decoder {
    /**
     * @param {Uint8Array} uint8Array
     * @param {function(Decoder):T} reader
     */
    constructor(uint8Array, reader) {
      super(uint8Array);
      this.reader = reader;
      this.s = null;
      this.count = 0;
    }
    read() {
      if (this.count === 0) {
        this.s = this.reader(this);
        if (hasContent(this)) {
          this.count = readVarUint(this) + 1;
        } else {
          this.count = -1;
        }
      }
      this.count--;
      return (
        /** @type {T} */
        this.s
      );
    }
  };
  var UintOptRleDecoder = class extends Decoder {
    /**
     * @param {Uint8Array} uint8Array
     */
    constructor(uint8Array) {
      super(uint8Array);
      this.s = 0;
      this.count = 0;
    }
    read() {
      if (this.count === 0) {
        this.s = readVarInt(this);
        const isNegative = isNegativeZero(this.s);
        this.count = 1;
        if (isNegative) {
          this.s = -this.s;
          this.count = readVarUint(this) + 2;
        }
      }
      this.count--;
      return (
        /** @type {number} */
        this.s
      );
    }
  };
  var IntDiffOptRleDecoder = class extends Decoder {
    /**
     * @param {Uint8Array} uint8Array
     */
    constructor(uint8Array) {
      super(uint8Array);
      this.s = 0;
      this.count = 0;
      this.diff = 0;
    }
    /**
     * @return {number}
     */
    read() {
      if (this.count === 0) {
        const diff = readVarInt(this);
        const hasCount = diff & 1;
        this.diff = floor(diff / 2);
        this.count = 1;
        if (hasCount) {
          this.count = readVarUint(this) + 2;
        }
      }
      this.s += this.diff;
      this.count--;
      return this.s;
    }
  };
  var StringDecoder = class {
    /**
     * @param {Uint8Array} uint8Array
     */
    constructor(uint8Array) {
      this.decoder = new UintOptRleDecoder(uint8Array);
      this.str = readVarString(this.decoder);
      this.spos = 0;
    }
    /**
     * @return {string}
     */
    read() {
      const end = this.spos + this.decoder.read();
      const res = this.str.slice(this.spos, end);
      this.spos = end;
      return res;
    }
  };

  // node_modules/lib0/webcrypto.js
  var subtle = crypto.subtle;
  var getRandomValues = crypto.getRandomValues.bind(crypto);

  // node_modules/lib0/random.js
  var uint32 = () => getRandomValues(new Uint32Array(1))[0];
  var uuidv4Template = "10000000-1000-4000-8000" + -1e11;
  var uuidv4 = () => uuidv4Template.replace(
    /[018]/g,
    /** @param {number} c */
    (c) => (c ^ uint32() & 15 >> c / 4).toString(16)
  );

  // node_modules/lib0/time.js
  var getUnixTime = Date.now;

  // node_modules/lib0/promise.js
  var create4 = (f) => (
    /** @type {Promise<T>} */
    new Promise(f)
  );
  var all = Promise.all.bind(Promise);

  // node_modules/lib0/conditions.js
  var undefinedToNull = (v) => v === void 0 ? null : v;

  // node_modules/lib0/storage.js
  var VarStoragePolyfill = class {
    constructor() {
      this.map = /* @__PURE__ */ new Map();
    }
    /**
     * @param {string} key
     * @param {any} newValue
     */
    setItem(key, newValue) {
      this.map.set(key, newValue);
    }
    /**
     * @param {string} key
     */
    getItem(key) {
      return this.map.get(key);
    }
  };
  var _localStorage = new VarStoragePolyfill();
  var usePolyfill = true;
  try {
    if (typeof localStorage !== "undefined" && localStorage) {
      _localStorage = localStorage;
      usePolyfill = false;
    }
  } catch (e) {
  }
  var varStorage = _localStorage;

  // node_modules/lib0/object.js
  var assign = Object.assign;
  var keys = Object.keys;
  var forEach = (obj, f) => {
    for (const key in obj) {
      f(obj[key], key);
    }
  };
  var length2 = (obj) => keys(obj).length;
  var size = (obj) => keys(obj).length;
  var isEmpty = (obj) => {
    for (const _k in obj) {
      return false;
    }
    return true;
  };
  var every = (obj, f) => {
    for (const key in obj) {
      if (!f(obj[key], key)) {
        return false;
      }
    }
    return true;
  };
  var hasProperty = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key);
  var equalFlat = (a, b) => a === b || size(a) === size(b) && every(a, (val, key) => (val !== void 0 || hasProperty(b, key)) && b[key] === val);
  var freeze = Object.freeze;
  var deepFreeze = (o) => {
    for (const key in o) {
      const c = o[key];
      if (typeof c === "object" || typeof c === "function") {
        deepFreeze(o[key]);
      }
    }
    return freeze(o);
  };

  // node_modules/lib0/function.js
  var callAll = (fs, args2, i = 0) => {
    try {
      for (; i < fs.length; i++) {
        fs[i](...args2);
      }
    } finally {
      if (i < fs.length) {
        callAll(fs, args2, i + 1);
      }
    }
  };
  var id = (a) => a;
  var equalityStrict = (a, b) => a === b;
  var equalityDeep = (a, b) => {
    if (a == null || b == null) {
      return equalityStrict(a, b);
    }
    if (a.constructor !== b.constructor) {
      return false;
    }
    if (a === b) {
      return true;
    }
    switch (a.constructor) {
      case ArrayBuffer:
        a = new Uint8Array(a);
        b = new Uint8Array(b);
      // eslint-disable-next-line no-fallthrough
      case Uint8Array: {
        if (a.byteLength !== b.byteLength) {
          return false;
        }
        for (let i = 0; i < a.length; i++) {
          if (a[i] !== b[i]) {
            return false;
          }
        }
        break;
      }
      case Set: {
        if (a.size !== b.size) {
          return false;
        }
        for (const value of a) {
          if (!b.has(value)) {
            return false;
          }
        }
        break;
      }
      case Map: {
        if (a.size !== b.size) {
          return false;
        }
        for (const key of a.keys()) {
          if (!b.has(key) || !equalityDeep(a.get(key), b.get(key))) {
            return false;
          }
        }
        break;
      }
      case Object:
        if (length2(a) !== length2(b)) {
          return false;
        }
        for (const key in a) {
          if (!hasProperty(a, key) || !equalityDeep(a[key], b[key])) {
            return false;
          }
        }
        break;
      case Array:
        if (a.length !== b.length) {
          return false;
        }
        for (let i = 0; i < a.length; i++) {
          if (!equalityDeep(a[i], b[i])) {
            return false;
          }
        }
        break;
      default:
        return false;
    }
    return true;
  };
  var isOneOf = (value, options) => options.includes(value);

  // node_modules/lib0/environment.js
  var isNode = typeof process !== "undefined" && process.release && /node|io\.js/.test(process.release.name) && Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]";
  var isBrowser = typeof window !== "undefined" && typeof document !== "undefined" && !isNode;
  var isMac = typeof navigator !== "undefined" ? /Mac/.test(navigator.platform) : false;
  var params;
  var args = [];
  var computeParams = () => {
    if (params === void 0) {
      if (isNode) {
        params = create();
        const pargs = process.argv;
        let currParamName = null;
        for (let i = 0; i < pargs.length; i++) {
          const parg = pargs[i];
          if (parg[0] === "-") {
            if (currParamName !== null) {
              params.set(currParamName, "");
            }
            currParamName = parg;
          } else {
            if (currParamName !== null) {
              params.set(currParamName, parg);
              currParamName = null;
            } else {
              args.push(parg);
            }
          }
        }
        if (currParamName !== null) {
          params.set(currParamName, "");
        }
      } else if (typeof location === "object") {
        params = create();
        (location.search || "?").slice(1).split("&").forEach((kv) => {
          if (kv.length !== 0) {
            const [key, value] = kv.split("=");
            params.set(`--${fromCamelCase(key, "-")}`, value);
            params.set(`-${fromCamelCase(key, "-")}`, value);
          }
        });
      } else {
        params = create();
      }
    }
    return params;
  };
  var hasParam = (name) => computeParams().has(name);
  var getVariable = (name) => isNode ? undefinedToNull(process.env[name.toUpperCase().replaceAll("-", "_")]) : undefinedToNull(varStorage.getItem(name));
  var hasConf = (name) => hasParam("--" + name) || getVariable(name) !== null;
  var production = hasConf("production");
  var forceColor = isNode && isOneOf(process.env.FORCE_COLOR, ["true", "1", "2"]);
  var supportsColor = forceColor || !hasParam("--no-colors") && // @todo deprecate --no-colors
  !hasConf("no-color") && (!isNode || process.stdout.isTTY) && (!isNode || hasParam("--color") || getVariable("COLORTERM") !== null || (getVariable("TERM") || "").includes("color"));

  // node_modules/lib0/buffer.js
  var createUint8ArrayFromLen = (len) => new Uint8Array(len);
  var createUint8ArrayViewFromArrayBuffer = (buffer, byteOffset, length3) => new Uint8Array(buffer, byteOffset, length3);
  var toBase64Browser = (bytes) => {
    let s = "";
    for (let i = 0; i < bytes.byteLength; i++) {
      s += fromCharCode(bytes[i]);
    }
    return btoa(s);
  };
  var toBase64Node = (bytes) => Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength).toString("base64");
  var fromBase64Browser = (s) => {
    const a = atob(s);
    const bytes = createUint8ArrayFromLen(a.length);
    for (let i = 0; i < a.length; i++) {
      bytes[i] = a.charCodeAt(i);
    }
    return bytes;
  };
  var fromBase64Node = (s) => {
    const buf = Buffer.from(s, "base64");
    return createUint8ArrayViewFromArrayBuffer(buf.buffer, buf.byteOffset, buf.byteLength);
  };
  var toBase64 = isBrowser ? toBase64Browser : toBase64Node;
  var fromBase64 = isBrowser ? fromBase64Browser : fromBase64Node;
  var copyUint8Array = (uint8Array) => {
    const newBuf = createUint8ArrayFromLen(uint8Array.byteLength);
    newBuf.set(uint8Array);
    return newBuf;
  };

  // node_modules/lib0/pair.js
  var Pair = class {
    /**
     * @param {L} left
     * @param {R} right
     */
    constructor(left, right) {
      this.left = left;
      this.right = right;
    }
  };
  var create5 = (left, right) => new Pair(left, right);

  // node_modules/lib0/dom.js
  var doc = (
    /** @type {Document} */
    typeof document !== "undefined" ? document : {}
  );
  var domParser = (
    /** @type {DOMParser} */
    typeof DOMParser !== "undefined" ? new DOMParser() : null
  );
  var mapToStyleString = (m) => map(m, (value, key) => `${key}:${value};`).join("");
  var ELEMENT_NODE = doc.ELEMENT_NODE;
  var TEXT_NODE = doc.TEXT_NODE;
  var CDATA_SECTION_NODE = doc.CDATA_SECTION_NODE;
  var COMMENT_NODE = doc.COMMENT_NODE;
  var DOCUMENT_NODE = doc.DOCUMENT_NODE;
  var DOCUMENT_TYPE_NODE = doc.DOCUMENT_TYPE_NODE;
  var DOCUMENT_FRAGMENT_NODE = doc.DOCUMENT_FRAGMENT_NODE;

  // node_modules/lib0/symbol.js
  var create6 = Symbol;

  // node_modules/lib0/logging.common.js
  var BOLD = create6();
  var UNBOLD = create6();
  var BLUE = create6();
  var GREY = create6();
  var GREEN = create6();
  var RED = create6();
  var PURPLE = create6();
  var ORANGE = create6();
  var UNCOLOR = create6();
  var computeNoColorLoggingArgs = (args2) => {
    if (args2.length === 1 && args2[0]?.constructor === Function) {
      args2 = /** @type {Array<string|Symbol|Object|number>} */
      /** @type {[function]} */
      args2[0]();
    }
    const strBuilder = [];
    const logArgs = [];
    let i = 0;
    for (; i < args2.length; i++) {
      const arg = args2[i];
      if (arg === void 0) {
        break;
      } else if (arg.constructor === String || arg.constructor === Number) {
        strBuilder.push(arg);
      } else if (arg.constructor === Object) {
        break;
      }
    }
    if (i > 0) {
      logArgs.push(strBuilder.join(""));
    }
    for (; i < args2.length; i++) {
      const arg = args2[i];
      if (!(arg instanceof Symbol)) {
        logArgs.push(arg);
      }
    }
    return logArgs;
  };
  var lastLoggingTime = getUnixTime();

  // node_modules/lib0/logging.js
  var _browserStyleMap = {
    [BOLD]: create5("font-weight", "bold"),
    [UNBOLD]: create5("font-weight", "normal"),
    [BLUE]: create5("color", "blue"),
    [GREEN]: create5("color", "green"),
    [GREY]: create5("color", "grey"),
    [RED]: create5("color", "red"),
    [PURPLE]: create5("color", "purple"),
    [ORANGE]: create5("color", "orange"),
    // not well supported in chrome when debugging node with inspector - TODO: deprecate
    [UNCOLOR]: create5("color", "black")
  };
  var computeBrowserLoggingArgs = (args2) => {
    if (args2.length === 1 && args2[0]?.constructor === Function) {
      args2 = /** @type {Array<string|Symbol|Object|number>} */
      /** @type {[function]} */
      args2[0]();
    }
    const strBuilder = [];
    const styles = [];
    const currentStyle = create();
    let logArgs = [];
    let i = 0;
    for (; i < args2.length; i++) {
      const arg = args2[i];
      const style = _browserStyleMap[arg];
      if (style !== void 0) {
        currentStyle.set(style.left, style.right);
      } else {
        if (arg === void 0) {
          break;
        }
        if (arg.constructor === String || arg.constructor === Number) {
          const style2 = mapToStyleString(currentStyle);
          if (i > 0 || style2.length > 0) {
            strBuilder.push("%c" + arg);
            styles.push(style2);
          } else {
            strBuilder.push(arg);
          }
        } else {
          break;
        }
      }
    }
    if (i > 0) {
      logArgs = styles;
      logArgs.unshift(strBuilder.join(""));
    }
    for (; i < args2.length; i++) {
      const arg = args2[i];
      if (!(arg instanceof Symbol)) {
        logArgs.push(arg);
      }
    }
    return logArgs;
  };
  var computeLoggingArgs = supportsColor ? computeBrowserLoggingArgs : computeNoColorLoggingArgs;
  var print = (...args2) => {
    console.log(...computeLoggingArgs(args2));
    vconsoles.forEach((vc) => vc.print(args2));
  };
  var warn = (...args2) => {
    console.warn(...computeLoggingArgs(args2));
    args2.unshift(ORANGE);
    vconsoles.forEach((vc) => vc.print(args2));
  };
  var vconsoles = create2();

  // node_modules/lib0/iterator.js
  var createIterator = (next) => ({
    /**
     * @return {IterableIterator<T>}
     */
    [Symbol.iterator]() {
      return this;
    },
    // @ts-ignore
    next
  });
  var iteratorFilter = (iterator, filter) => createIterator(() => {
    let res;
    do {
      res = iterator.next();
    } while (!res.done && !filter(res.value));
    return res;
  });
  var iteratorMap = (iterator, fmap) => createIterator(() => {
    const { done, value } = iterator.next();
    return { done, value: done ? void 0 : fmap(value) };
  });

  // node_modules/yjs/dist/yjs.mjs
  var AbstractConnector = class extends ObservableV2 {
    /**
     * @param {Doc} ydoc
     * @param {any} awareness
     */
    constructor(ydoc, awareness) {
      super();
      this.doc = ydoc;
      this.awareness = awareness;
    }
  };
  var DeleteItem = class {
    /**
     * @param {number} clock
     * @param {number} len
     */
    constructor(clock, len) {
      this.clock = clock;
      this.len = len;
    }
  };
  var DeleteSet = class {
    constructor() {
      this.clients = /* @__PURE__ */ new Map();
    }
  };
  var iterateDeletedStructs = (transaction, ds, f) => ds.clients.forEach((deletes, clientid) => {
    const structs = (
      /** @type {Array<GC|Item>} */
      transaction.doc.store.clients.get(clientid)
    );
    if (structs != null) {
      const lastStruct = structs[structs.length - 1];
      const clockState = lastStruct.id.clock + lastStruct.length;
      for (let i = 0, del = deletes[i]; i < deletes.length && del.clock < clockState; del = deletes[++i]) {
        iterateStructs(transaction, structs, del.clock, del.len, f);
      }
    }
  });
  var findIndexDS = (dis, clock) => {
    let left = 0;
    let right = dis.length - 1;
    while (left <= right) {
      const midindex = floor((left + right) / 2);
      const mid = dis[midindex];
      const midclock = mid.clock;
      if (midclock <= clock) {
        if (clock < midclock + mid.len) {
          return midindex;
        }
        left = midindex + 1;
      } else {
        right = midindex - 1;
      }
    }
    return null;
  };
  var isDeleted = (ds, id2) => {
    const dis = ds.clients.get(id2.client);
    return dis !== void 0 && findIndexDS(dis, id2.clock) !== null;
  };
  var sortAndMergeDeleteSet = (ds) => {
    ds.clients.forEach((dels) => {
      dels.sort((a, b) => a.clock - b.clock);
      let i, j;
      for (i = 1, j = 1; i < dels.length; i++) {
        const left = dels[j - 1];
        const right = dels[i];
        if (left.clock + left.len >= right.clock) {
          left.len = max(left.len, right.clock + right.len - left.clock);
        } else {
          if (j < i) {
            dels[j] = right;
          }
          j++;
        }
      }
      dels.length = j;
    });
  };
  var mergeDeleteSets = (dss) => {
    const merged = new DeleteSet();
    for (let dssI = 0; dssI < dss.length; dssI++) {
      dss[dssI].clients.forEach((delsLeft, client) => {
        if (!merged.clients.has(client)) {
          const dels = delsLeft.slice();
          for (let i = dssI + 1; i < dss.length; i++) {
            appendTo(dels, dss[i].clients.get(client) || []);
          }
          merged.clients.set(client, dels);
        }
      });
    }
    sortAndMergeDeleteSet(merged);
    return merged;
  };
  var addToDeleteSet = (ds, client, clock, length3) => {
    setIfUndefined(ds.clients, client, () => (
      /** @type {Array<DeleteItem>} */
      []
    )).push(new DeleteItem(clock, length3));
  };
  var createDeleteSet = () => new DeleteSet();
  var createDeleteSetFromStructStore = (ss) => {
    const ds = createDeleteSet();
    ss.clients.forEach((structs, client) => {
      const dsitems = [];
      for (let i = 0; i < structs.length; i++) {
        const struct = structs[i];
        if (struct.deleted) {
          const clock = struct.id.clock;
          let len = struct.length;
          if (i + 1 < structs.length) {
            for (let next = structs[i + 1]; i + 1 < structs.length && next.deleted; next = structs[++i + 1]) {
              len += next.length;
            }
          }
          dsitems.push(new DeleteItem(clock, len));
        }
      }
      if (dsitems.length > 0) {
        ds.clients.set(client, dsitems);
      }
    });
    return ds;
  };
  var writeDeleteSet = (encoder, ds) => {
    writeVarUint(encoder.restEncoder, ds.clients.size);
    from(ds.clients.entries()).sort((a, b) => b[0] - a[0]).forEach(([client, dsitems]) => {
      encoder.resetDsCurVal();
      writeVarUint(encoder.restEncoder, client);
      const len = dsitems.length;
      writeVarUint(encoder.restEncoder, len);
      for (let i = 0; i < len; i++) {
        const item = dsitems[i];
        encoder.writeDsClock(item.clock);
        encoder.writeDsLen(item.len);
      }
    });
  };
  var readDeleteSet = (decoder) => {
    const ds = new DeleteSet();
    const numClients = readVarUint(decoder.restDecoder);
    for (let i = 0; i < numClients; i++) {
      decoder.resetDsCurVal();
      const client = readVarUint(decoder.restDecoder);
      const numberOfDeletes = readVarUint(decoder.restDecoder);
      if (numberOfDeletes > 0) {
        const dsField = setIfUndefined(ds.clients, client, () => (
          /** @type {Array<DeleteItem>} */
          []
        ));
        for (let i2 = 0; i2 < numberOfDeletes; i2++) {
          dsField.push(new DeleteItem(decoder.readDsClock(), decoder.readDsLen()));
        }
      }
    }
    return ds;
  };
  var readAndApplyDeleteSet = (decoder, transaction, store) => {
    const unappliedDS = new DeleteSet();
    const numClients = readVarUint(decoder.restDecoder);
    for (let i = 0; i < numClients; i++) {
      decoder.resetDsCurVal();
      const client = readVarUint(decoder.restDecoder);
      const numberOfDeletes = readVarUint(decoder.restDecoder);
      const structs = store.clients.get(client) || [];
      const state = getState(store, client);
      for (let i2 = 0; i2 < numberOfDeletes; i2++) {
        const clock = decoder.readDsClock();
        const clockEnd = clock + decoder.readDsLen();
        if (clock < state) {
          if (state < clockEnd) {
            addToDeleteSet(unappliedDS, client, state, clockEnd - state);
          }
          let index = findIndexSS(structs, clock);
          let struct = structs[index];
          if (!struct.deleted && struct.id.clock < clock) {
            structs.splice(index + 1, 0, splitItem(transaction, struct, clock - struct.id.clock));
            index++;
          }
          while (index < structs.length) {
            struct = structs[index++];
            if (struct.id.clock < clockEnd) {
              if (!struct.deleted) {
                if (clockEnd < struct.id.clock + struct.length) {
                  structs.splice(index, 0, splitItem(transaction, struct, clockEnd - struct.id.clock));
                }
                struct.delete(transaction);
              }
            } else {
              break;
            }
          }
        } else {
          addToDeleteSet(unappliedDS, client, clock, clockEnd - clock);
        }
      }
    }
    if (unappliedDS.clients.size > 0) {
      const ds = new UpdateEncoderV2();
      writeVarUint(ds.restEncoder, 0);
      writeDeleteSet(ds, unappliedDS);
      return ds.toUint8Array();
    }
    return null;
  };
  var equalDeleteSets = (ds1, ds2) => {
    if (ds1.clients.size !== ds2.clients.size) return false;
    for (const [client, deleteItems1] of ds1.clients.entries()) {
      const deleteItems2 = (
        /** @type {Array<import('../internals.js').DeleteItem>} */
        ds2.clients.get(client)
      );
      if (deleteItems2 === void 0 || deleteItems1.length !== deleteItems2.length) return false;
      for (let i = 0; i < deleteItems1.length; i++) {
        const di1 = deleteItems1[i];
        const di2 = deleteItems2[i];
        if (di1.clock !== di2.clock || di1.len !== di2.len) {
          return false;
        }
      }
    }
    return true;
  };
  var generateNewClientId = uint32;
  var Doc = class _Doc extends ObservableV2 {
    /**
     * @param {DocOpts} opts configuration
     */
    constructor({ guid = uuidv4(), collectionid = null, gc = true, gcFilter = () => true, meta = null, autoLoad = false, shouldLoad = true } = {}) {
      super();
      this.gc = gc;
      this.gcFilter = gcFilter;
      this.clientID = generateNewClientId();
      this.guid = guid;
      this.collectionid = collectionid;
      this.share = /* @__PURE__ */ new Map();
      this.store = new StructStore();
      this._transaction = null;
      this._transactionCleanups = [];
      this.subdocs = /* @__PURE__ */ new Set();
      this._item = null;
      this.shouldLoad = shouldLoad;
      this.autoLoad = autoLoad;
      this.meta = meta;
      this.isLoaded = false;
      this.isSynced = false;
      this.isDestroyed = false;
      this.whenLoaded = create4((resolve) => {
        this.on("load", () => {
          this.isLoaded = true;
          resolve(this);
        });
      });
      const provideSyncedPromise = () => create4((resolve) => {
        const eventHandler = (isSynced) => {
          if (isSynced === void 0 || isSynced === true) {
            this.off("sync", eventHandler);
            resolve();
          }
        };
        this.on("sync", eventHandler);
      });
      this.on("sync", (isSynced) => {
        if (isSynced === false && this.isSynced) {
          this.whenSynced = provideSyncedPromise();
        }
        this.isSynced = isSynced === void 0 || isSynced === true;
        if (this.isSynced && !this.isLoaded) {
          this.emit("load", [this]);
        }
      });
      this.whenSynced = provideSyncedPromise();
    }
    /**
     * Notify the parent document that you request to load data into this subdocument (if it is a subdocument).
     *
     * `load()` might be used in the future to request any provider to load the most current data.
     *
     * It is safe to call `load()` multiple times.
     */
    load() {
      const item = this._item;
      if (item !== null && !this.shouldLoad) {
        transact(
          /** @type {any} */
          item.parent.doc,
          (transaction) => {
            transaction.subdocsLoaded.add(this);
          },
          null,
          true
        );
      }
      this.shouldLoad = true;
    }
    getSubdocs() {
      return this.subdocs;
    }
    getSubdocGuids() {
      return new Set(from(this.subdocs).map((doc2) => doc2.guid));
    }
    /**
     * Changes that happen inside of a transaction are bundled. This means that
     * the observer fires _after_ the transaction is finished and that all changes
     * that happened inside of the transaction are sent as one message to the
     * other peers.
     *
     * @template T
     * @param {function(Transaction):T} f The function that should be executed as a transaction
     * @param {any} [origin] Origin of who started the transaction. Will be stored on transaction.origin
     * @return T
     *
     * @public
     */
    transact(f, origin2 = null) {
      return transact(this, f, origin2);
    }
    /**
     * Define a shared data type.
     *
     * Multiple calls of `ydoc.get(name, TypeConstructor)` yield the same result
     * and do not overwrite each other. I.e.
     * `ydoc.get(name, Y.Array) === ydoc.get(name, Y.Array)`
     *
     * After this method is called, the type is also available on `ydoc.share.get(name)`.
     *
     * *Best Practices:*
     * Define all types right after the Y.Doc instance is created and store them in a separate object.
     * Also use the typed methods `getText(name)`, `getArray(name)`, ..
     *
     * @template {typeof AbstractType<any>} Type
     * @example
     *   const ydoc = new Y.Doc(..)
     *   const appState = {
     *     document: ydoc.getText('document')
     *     comments: ydoc.getArray('comments')
     *   }
     *
     * @param {string} name
     * @param {Type} TypeConstructor The constructor of the type definition. E.g. Y.Text, Y.Array, Y.Map, ...
     * @return {InstanceType<Type>} The created type. Constructed with TypeConstructor
     *
     * @public
     */
    get(name, TypeConstructor = (
      /** @type {any} */
      AbstractType
    )) {
      const type = setIfUndefined(this.share, name, () => {
        const t = new TypeConstructor();
        t._integrate(this, null);
        return t;
      });
      const Constr = type.constructor;
      if (TypeConstructor !== AbstractType && Constr !== TypeConstructor) {
        if (Constr === AbstractType) {
          const t = new TypeConstructor();
          t._map = type._map;
          type._map.forEach(
            /** @param {Item?} n */
            (n) => {
              for (; n !== null; n = n.left) {
                n.parent = t;
              }
            }
          );
          t._start = type._start;
          for (let n = t._start; n !== null; n = n.right) {
            n.parent = t;
          }
          t._length = type._length;
          this.share.set(name, t);
          t._integrate(this, null);
          return (
            /** @type {InstanceType<Type>} */
            t
          );
        } else {
          throw new Error(`Type with the name ${name} has already been defined with a different constructor`);
        }
      }
      return (
        /** @type {InstanceType<Type>} */
        type
      );
    }
    /**
     * @template T
     * @param {string} [name]
     * @return {YArray<T>}
     *
     * @public
     */
    getArray(name = "") {
      return (
        /** @type {YArray<T>} */
        this.get(name, YArray)
      );
    }
    /**
     * @param {string} [name]
     * @return {YText}
     *
     * @public
     */
    getText(name = "") {
      return this.get(name, YText);
    }
    /**
     * @template T
     * @param {string} [name]
     * @return {YMap<T>}
     *
     * @public
     */
    getMap(name = "") {
      return (
        /** @type {YMap<T>} */
        this.get(name, YMap)
      );
    }
    /**
     * @param {string} [name]
     * @return {YXmlElement}
     *
     * @public
     */
    getXmlElement(name = "") {
      return (
        /** @type {YXmlElement<{[key:string]:string}>} */
        this.get(name, YXmlElement)
      );
    }
    /**
     * @param {string} [name]
     * @return {YXmlFragment}
     *
     * @public
     */
    getXmlFragment(name = "") {
      return this.get(name, YXmlFragment);
    }
    /**
     * Converts the entire document into a js object, recursively traversing each yjs type
     * Doesn't log types that have not been defined (using ydoc.getType(..)).
     *
     * @deprecated Do not use this method and rather call toJSON directly on the shared types.
     *
     * @return {Object<string, any>}
     */
    toJSON() {
      const doc2 = {};
      this.share.forEach((value, key) => {
        doc2[key] = value.toJSON();
      });
      return doc2;
    }
    /**
     * Emit `destroy` event and unregister all event handlers.
     */
    destroy() {
      this.isDestroyed = true;
      from(this.subdocs).forEach((subdoc) => subdoc.destroy());
      const item = this._item;
      if (item !== null) {
        this._item = null;
        const content = (
          /** @type {ContentDoc} */
          item.content
        );
        content.doc = new _Doc({ guid: this.guid, ...content.opts, shouldLoad: false });
        content.doc._item = item;
        transact(
          /** @type {any} */
          item.parent.doc,
          (transaction) => {
            const doc2 = content.doc;
            if (!item.deleted) {
              transaction.subdocsAdded.add(doc2);
            }
            transaction.subdocsRemoved.add(this);
          },
          null,
          true
        );
      }
      this.emit("destroyed", [true]);
      this.emit("destroy", [this]);
      super.destroy();
    }
  };
  var DSDecoderV1 = class {
    /**
     * @param {decoding.Decoder} decoder
     */
    constructor(decoder) {
      this.restDecoder = decoder;
    }
    resetDsCurVal() {
    }
    /**
     * @return {number}
     */
    readDsClock() {
      return readVarUint(this.restDecoder);
    }
    /**
     * @return {number}
     */
    readDsLen() {
      return readVarUint(this.restDecoder);
    }
  };
  var UpdateDecoderV1 = class extends DSDecoderV1 {
    /**
     * @return {ID}
     */
    readLeftID() {
      return createID(readVarUint(this.restDecoder), readVarUint(this.restDecoder));
    }
    /**
     * @return {ID}
     */
    readRightID() {
      return createID(readVarUint(this.restDecoder), readVarUint(this.restDecoder));
    }
    /**
     * Read the next client id.
     * Use this in favor of readID whenever possible to reduce the number of objects created.
     */
    readClient() {
      return readVarUint(this.restDecoder);
    }
    /**
     * @return {number} info An unsigned 8-bit integer
     */
    readInfo() {
      return readUint8(this.restDecoder);
    }
    /**
     * @return {string}
     */
    readString() {
      return readVarString(this.restDecoder);
    }
    /**
     * @return {boolean} isKey
     */
    readParentInfo() {
      return readVarUint(this.restDecoder) === 1;
    }
    /**
     * @return {number} info An unsigned 8-bit integer
     */
    readTypeRef() {
      return readVarUint(this.restDecoder);
    }
    /**
     * Write len of a struct - well suited for Opt RLE encoder.
     *
     * @return {number} len
     */
    readLen() {
      return readVarUint(this.restDecoder);
    }
    /**
     * @return {any}
     */
    readAny() {
      return readAny(this.restDecoder);
    }
    /**
     * @return {Uint8Array}
     */
    readBuf() {
      return copyUint8Array(readVarUint8Array(this.restDecoder));
    }
    /**
     * Legacy implementation uses JSON parse. We use any-decoding in v2.
     *
     * @return {any}
     */
    readJSON() {
      return JSON.parse(readVarString(this.restDecoder));
    }
    /**
     * @return {string}
     */
    readKey() {
      return readVarString(this.restDecoder);
    }
  };
  var DSDecoderV2 = class {
    /**
     * @param {decoding.Decoder} decoder
     */
    constructor(decoder) {
      this.dsCurrVal = 0;
      this.restDecoder = decoder;
    }
    resetDsCurVal() {
      this.dsCurrVal = 0;
    }
    /**
     * @return {number}
     */
    readDsClock() {
      this.dsCurrVal += readVarUint(this.restDecoder);
      return this.dsCurrVal;
    }
    /**
     * @return {number}
     */
    readDsLen() {
      const diff = readVarUint(this.restDecoder) + 1;
      this.dsCurrVal += diff;
      return diff;
    }
  };
  var UpdateDecoderV2 = class extends DSDecoderV2 {
    /**
     * @param {decoding.Decoder} decoder
     */
    constructor(decoder) {
      super(decoder);
      this.keys = [];
      readVarUint(decoder);
      this.keyClockDecoder = new IntDiffOptRleDecoder(readVarUint8Array(decoder));
      this.clientDecoder = new UintOptRleDecoder(readVarUint8Array(decoder));
      this.leftClockDecoder = new IntDiffOptRleDecoder(readVarUint8Array(decoder));
      this.rightClockDecoder = new IntDiffOptRleDecoder(readVarUint8Array(decoder));
      this.infoDecoder = new RleDecoder(readVarUint8Array(decoder), readUint8);
      this.stringDecoder = new StringDecoder(readVarUint8Array(decoder));
      this.parentInfoDecoder = new RleDecoder(readVarUint8Array(decoder), readUint8);
      this.typeRefDecoder = new UintOptRleDecoder(readVarUint8Array(decoder));
      this.lenDecoder = new UintOptRleDecoder(readVarUint8Array(decoder));
    }
    /**
     * @return {ID}
     */
    readLeftID() {
      return new ID(this.clientDecoder.read(), this.leftClockDecoder.read());
    }
    /**
     * @return {ID}
     */
    readRightID() {
      return new ID(this.clientDecoder.read(), this.rightClockDecoder.read());
    }
    /**
     * Read the next client id.
     * Use this in favor of readID whenever possible to reduce the number of objects created.
     */
    readClient() {
      return this.clientDecoder.read();
    }
    /**
     * @return {number} info An unsigned 8-bit integer
     */
    readInfo() {
      return (
        /** @type {number} */
        this.infoDecoder.read()
      );
    }
    /**
     * @return {string}
     */
    readString() {
      return this.stringDecoder.read();
    }
    /**
     * @return {boolean}
     */
    readParentInfo() {
      return this.parentInfoDecoder.read() === 1;
    }
    /**
     * @return {number} An unsigned 8-bit integer
     */
    readTypeRef() {
      return this.typeRefDecoder.read();
    }
    /**
     * Write len of a struct - well suited for Opt RLE encoder.
     *
     * @return {number}
     */
    readLen() {
      return this.lenDecoder.read();
    }
    /**
     * @return {any}
     */
    readAny() {
      return readAny(this.restDecoder);
    }
    /**
     * @return {Uint8Array}
     */
    readBuf() {
      return readVarUint8Array(this.restDecoder);
    }
    /**
     * This is mainly here for legacy purposes.
     *
     * Initial we incoded objects using JSON. Now we use the much faster lib0/any-encoder. This method mainly exists for legacy purposes for the v1 encoder.
     *
     * @return {any}
     */
    readJSON() {
      return readAny(this.restDecoder);
    }
    /**
     * @return {string}
     */
    readKey() {
      const keyClock = this.keyClockDecoder.read();
      if (keyClock < this.keys.length) {
        return this.keys[keyClock];
      } else {
        const key = this.stringDecoder.read();
        this.keys.push(key);
        return key;
      }
    }
  };
  var DSEncoderV1 = class {
    constructor() {
      this.restEncoder = createEncoder();
    }
    toUint8Array() {
      return toUint8Array(this.restEncoder);
    }
    resetDsCurVal() {
    }
    /**
     * @param {number} clock
     */
    writeDsClock(clock) {
      writeVarUint(this.restEncoder, clock);
    }
    /**
     * @param {number} len
     */
    writeDsLen(len) {
      writeVarUint(this.restEncoder, len);
    }
  };
  var UpdateEncoderV1 = class extends DSEncoderV1 {
    /**
     * @param {ID} id
     */
    writeLeftID(id2) {
      writeVarUint(this.restEncoder, id2.client);
      writeVarUint(this.restEncoder, id2.clock);
    }
    /**
     * @param {ID} id
     */
    writeRightID(id2) {
      writeVarUint(this.restEncoder, id2.client);
      writeVarUint(this.restEncoder, id2.clock);
    }
    /**
     * Use writeClient and writeClock instead of writeID if possible.
     * @param {number} client
     */
    writeClient(client) {
      writeVarUint(this.restEncoder, client);
    }
    /**
     * @param {number} info An unsigned 8-bit integer
     */
    writeInfo(info) {
      writeUint8(this.restEncoder, info);
    }
    /**
     * @param {string} s
     */
    writeString(s) {
      writeVarString(this.restEncoder, s);
    }
    /**
     * @param {boolean} isYKey
     */
    writeParentInfo(isYKey) {
      writeVarUint(this.restEncoder, isYKey ? 1 : 0);
    }
    /**
     * @param {number} info An unsigned 8-bit integer
     */
    writeTypeRef(info) {
      writeVarUint(this.restEncoder, info);
    }
    /**
     * Write len of a struct - well suited for Opt RLE encoder.
     *
     * @param {number} len
     */
    writeLen(len) {
      writeVarUint(this.restEncoder, len);
    }
    /**
     * @param {any} any
     */
    writeAny(any2) {
      writeAny(this.restEncoder, any2);
    }
    /**
     * @param {Uint8Array} buf
     */
    writeBuf(buf) {
      writeVarUint8Array(this.restEncoder, buf);
    }
    /**
     * @param {any} embed
     */
    writeJSON(embed) {
      writeVarString(this.restEncoder, JSON.stringify(embed));
    }
    /**
     * @param {string} key
     */
    writeKey(key) {
      writeVarString(this.restEncoder, key);
    }
  };
  var DSEncoderV2 = class {
    constructor() {
      this.restEncoder = createEncoder();
      this.dsCurrVal = 0;
    }
    toUint8Array() {
      return toUint8Array(this.restEncoder);
    }
    resetDsCurVal() {
      this.dsCurrVal = 0;
    }
    /**
     * @param {number} clock
     */
    writeDsClock(clock) {
      const diff = clock - this.dsCurrVal;
      this.dsCurrVal = clock;
      writeVarUint(this.restEncoder, diff);
    }
    /**
     * @param {number} len
     */
    writeDsLen(len) {
      if (len === 0) {
        unexpectedCase();
      }
      writeVarUint(this.restEncoder, len - 1);
      this.dsCurrVal += len;
    }
  };
  var UpdateEncoderV2 = class extends DSEncoderV2 {
    constructor() {
      super();
      this.keyMap = /* @__PURE__ */ new Map();
      this.keyClock = 0;
      this.keyClockEncoder = new IntDiffOptRleEncoder();
      this.clientEncoder = new UintOptRleEncoder();
      this.leftClockEncoder = new IntDiffOptRleEncoder();
      this.rightClockEncoder = new IntDiffOptRleEncoder();
      this.infoEncoder = new RleEncoder(writeUint8);
      this.stringEncoder = new StringEncoder();
      this.parentInfoEncoder = new RleEncoder(writeUint8);
      this.typeRefEncoder = new UintOptRleEncoder();
      this.lenEncoder = new UintOptRleEncoder();
    }
    toUint8Array() {
      const encoder = createEncoder();
      writeVarUint(encoder, 0);
      writeVarUint8Array(encoder, this.keyClockEncoder.toUint8Array());
      writeVarUint8Array(encoder, this.clientEncoder.toUint8Array());
      writeVarUint8Array(encoder, this.leftClockEncoder.toUint8Array());
      writeVarUint8Array(encoder, this.rightClockEncoder.toUint8Array());
      writeVarUint8Array(encoder, toUint8Array(this.infoEncoder));
      writeVarUint8Array(encoder, this.stringEncoder.toUint8Array());
      writeVarUint8Array(encoder, toUint8Array(this.parentInfoEncoder));
      writeVarUint8Array(encoder, this.typeRefEncoder.toUint8Array());
      writeVarUint8Array(encoder, this.lenEncoder.toUint8Array());
      writeUint8Array(encoder, toUint8Array(this.restEncoder));
      return toUint8Array(encoder);
    }
    /**
     * @param {ID} id
     */
    writeLeftID(id2) {
      this.clientEncoder.write(id2.client);
      this.leftClockEncoder.write(id2.clock);
    }
    /**
     * @param {ID} id
     */
    writeRightID(id2) {
      this.clientEncoder.write(id2.client);
      this.rightClockEncoder.write(id2.clock);
    }
    /**
     * @param {number} client
     */
    writeClient(client) {
      this.clientEncoder.write(client);
    }
    /**
     * @param {number} info An unsigned 8-bit integer
     */
    writeInfo(info) {
      this.infoEncoder.write(info);
    }
    /**
     * @param {string} s
     */
    writeString(s) {
      this.stringEncoder.write(s);
    }
    /**
     * @param {boolean} isYKey
     */
    writeParentInfo(isYKey) {
      this.parentInfoEncoder.write(isYKey ? 1 : 0);
    }
    /**
     * @param {number} info An unsigned 8-bit integer
     */
    writeTypeRef(info) {
      this.typeRefEncoder.write(info);
    }
    /**
     * Write len of a struct - well suited for Opt RLE encoder.
     *
     * @param {number} len
     */
    writeLen(len) {
      this.lenEncoder.write(len);
    }
    /**
     * @param {any} any
     */
    writeAny(any2) {
      writeAny(this.restEncoder, any2);
    }
    /**
     * @param {Uint8Array} buf
     */
    writeBuf(buf) {
      writeVarUint8Array(this.restEncoder, buf);
    }
    /**
     * This is mainly here for legacy purposes.
     *
     * Initial we incoded objects using JSON. Now we use the much faster lib0/any-encoder. This method mainly exists for legacy purposes for the v1 encoder.
     *
     * @param {any} embed
     */
    writeJSON(embed) {
      writeAny(this.restEncoder, embed);
    }
    /**
     * Property keys are often reused. For example, in y-prosemirror the key `bold` might
     * occur very often. For a 3d application, the key `position` might occur very often.
     *
     * We cache these keys in a Map and refer to them via a unique number.
     *
     * @param {string} key
     */
    writeKey(key) {
      const clock = this.keyMap.get(key);
      if (clock === void 0) {
        this.keyClockEncoder.write(this.keyClock++);
        this.stringEncoder.write(key);
      } else {
        this.keyClockEncoder.write(clock);
      }
    }
  };
  var writeStructs = (encoder, structs, client, clock) => {
    clock = max(clock, structs[0].id.clock);
    const startNewStructs = findIndexSS(structs, clock);
    writeVarUint(encoder.restEncoder, structs.length - startNewStructs);
    encoder.writeClient(client);
    writeVarUint(encoder.restEncoder, clock);
    const firstStruct = structs[startNewStructs];
    firstStruct.write(encoder, clock - firstStruct.id.clock);
    for (let i = startNewStructs + 1; i < structs.length; i++) {
      structs[i].write(encoder, 0);
    }
  };
  var writeClientsStructs = (encoder, store, _sm) => {
    const sm = /* @__PURE__ */ new Map();
    _sm.forEach((clock, client) => {
      if (getState(store, client) > clock) {
        sm.set(client, clock);
      }
    });
    getStateVector(store).forEach((_clock, client) => {
      if (!_sm.has(client)) {
        sm.set(client, 0);
      }
    });
    writeVarUint(encoder.restEncoder, sm.size);
    from(sm.entries()).sort((a, b) => b[0] - a[0]).forEach(([client, clock]) => {
      writeStructs(
        encoder,
        /** @type {Array<GC|Item>} */
        store.clients.get(client),
        client,
        clock
      );
    });
  };
  var readClientsStructRefs = (decoder, doc2) => {
    const clientRefs = create();
    const numOfStateUpdates = readVarUint(decoder.restDecoder);
    for (let i = 0; i < numOfStateUpdates; i++) {
      const numberOfStructs = readVarUint(decoder.restDecoder);
      const refs = new Array(numberOfStructs);
      const client = decoder.readClient();
      let clock = readVarUint(decoder.restDecoder);
      clientRefs.set(client, { i: 0, refs });
      for (let i2 = 0; i2 < numberOfStructs; i2++) {
        const info = decoder.readInfo();
        switch (BITS5 & info) {
          case 0: {
            const len = decoder.readLen();
            refs[i2] = new GC(createID(client, clock), len);
            clock += len;
            break;
          }
          case 10: {
            const len = readVarUint(decoder.restDecoder);
            refs[i2] = new Skip(createID(client, clock), len);
            clock += len;
            break;
          }
          default: {
            const cantCopyParentInfo = (info & (BIT7 | BIT8)) === 0;
            const struct = new Item(
              createID(client, clock),
              null,
              // left
              (info & BIT8) === BIT8 ? decoder.readLeftID() : null,
              // origin
              null,
              // right
              (info & BIT7) === BIT7 ? decoder.readRightID() : null,
              // right origin
              cantCopyParentInfo ? decoder.readParentInfo() ? doc2.get(decoder.readString()) : decoder.readLeftID() : null,
              // parent
              cantCopyParentInfo && (info & BIT6) === BIT6 ? decoder.readString() : null,
              // parentSub
              readItemContent(decoder, info)
              // item content
            );
            refs[i2] = struct;
            clock += struct.length;
          }
        }
      }
    }
    return clientRefs;
  };
  var integrateStructs = (transaction, store, clientsStructRefs) => {
    const stack = [];
    let clientsStructRefsIds = from(clientsStructRefs.keys()).sort((a, b) => a - b);
    if (clientsStructRefsIds.length === 0) {
      return null;
    }
    const getNextStructTarget = () => {
      if (clientsStructRefsIds.length === 0) {
        return null;
      }
      let nextStructsTarget = (
        /** @type {{i:number,refs:Array<GC|Item>}} */
        clientsStructRefs.get(clientsStructRefsIds[clientsStructRefsIds.length - 1])
      );
      while (nextStructsTarget.refs.length === nextStructsTarget.i) {
        clientsStructRefsIds.pop();
        if (clientsStructRefsIds.length > 0) {
          nextStructsTarget = /** @type {{i:number,refs:Array<GC|Item>}} */
          clientsStructRefs.get(clientsStructRefsIds[clientsStructRefsIds.length - 1]);
        } else {
          return null;
        }
      }
      return nextStructsTarget;
    };
    let curStructsTarget = getNextStructTarget();
    if (curStructsTarget === null) {
      return null;
    }
    const restStructs = new StructStore();
    const missingSV = /* @__PURE__ */ new Map();
    const updateMissingSv = (client, clock) => {
      const mclock = missingSV.get(client);
      if (mclock == null || mclock > clock) {
        missingSV.set(client, clock);
      }
    };
    let stackHead = (
      /** @type {any} */
      curStructsTarget.refs[
        /** @type {any} */
        curStructsTarget.i++
      ]
    );
    const state = /* @__PURE__ */ new Map();
    const addStackToRestSS = () => {
      for (const item of stack) {
        const client = item.id.client;
        const inapplicableItems = clientsStructRefs.get(client);
        if (inapplicableItems) {
          inapplicableItems.i--;
          restStructs.clients.set(client, inapplicableItems.refs.slice(inapplicableItems.i));
          clientsStructRefs.delete(client);
          inapplicableItems.i = 0;
          inapplicableItems.refs = [];
        } else {
          restStructs.clients.set(client, [item]);
        }
        clientsStructRefsIds = clientsStructRefsIds.filter((c) => c !== client);
      }
      stack.length = 0;
    };
    while (true) {
      if (stackHead.constructor !== Skip) {
        const localClock = setIfUndefined(state, stackHead.id.client, () => getState(store, stackHead.id.client));
        const offset = localClock - stackHead.id.clock;
        if (offset < 0) {
          stack.push(stackHead);
          updateMissingSv(stackHead.id.client, stackHead.id.clock - 1);
          addStackToRestSS();
        } else {
          const missing = stackHead.getMissing(transaction, store);
          if (missing !== null) {
            stack.push(stackHead);
            const structRefs = clientsStructRefs.get(
              /** @type {number} */
              missing
            ) || { refs: [], i: 0 };
            if (structRefs.refs.length === structRefs.i) {
              updateMissingSv(
                /** @type {number} */
                missing,
                getState(store, missing)
              );
              addStackToRestSS();
            } else {
              stackHead = structRefs.refs[structRefs.i++];
              continue;
            }
          } else if (offset === 0 || offset < stackHead.length) {
            stackHead.integrate(transaction, offset);
            state.set(stackHead.id.client, stackHead.id.clock + stackHead.length);
          }
        }
      }
      if (stack.length > 0) {
        stackHead = /** @type {GC|Item} */
        stack.pop();
      } else if (curStructsTarget !== null && curStructsTarget.i < curStructsTarget.refs.length) {
        stackHead = /** @type {GC|Item} */
        curStructsTarget.refs[curStructsTarget.i++];
      } else {
        curStructsTarget = getNextStructTarget();
        if (curStructsTarget === null) {
          break;
        } else {
          stackHead = /** @type {GC|Item} */
          curStructsTarget.refs[curStructsTarget.i++];
        }
      }
    }
    if (restStructs.clients.size > 0) {
      const encoder = new UpdateEncoderV2();
      writeClientsStructs(encoder, restStructs, /* @__PURE__ */ new Map());
      writeVarUint(encoder.restEncoder, 0);
      return { missing: missingSV, update: encoder.toUint8Array() };
    }
    return null;
  };
  var writeStructsFromTransaction = (encoder, transaction) => writeClientsStructs(encoder, transaction.doc.store, transaction.beforeState);
  var readUpdateV2 = (decoder, ydoc, transactionOrigin, structDecoder = new UpdateDecoderV2(decoder)) => transact(ydoc, (transaction) => {
    transaction.local = false;
    let retry = false;
    const doc2 = transaction.doc;
    const store = doc2.store;
    const ss = readClientsStructRefs(structDecoder, doc2);
    const restStructs = integrateStructs(transaction, store, ss);
    const pending = store.pendingStructs;
    if (pending) {
      for (const [client, clock] of pending.missing) {
        if (clock < getState(store, client)) {
          retry = true;
          break;
        }
      }
      if (restStructs) {
        for (const [client, clock] of restStructs.missing) {
          const mclock = pending.missing.get(client);
          if (mclock == null || mclock > clock) {
            pending.missing.set(client, clock);
          }
        }
        pending.update = mergeUpdatesV2([pending.update, restStructs.update]);
      }
    } else {
      store.pendingStructs = restStructs;
    }
    const dsRest = readAndApplyDeleteSet(structDecoder, transaction, store);
    if (store.pendingDs) {
      const pendingDSUpdate = new UpdateDecoderV2(createDecoder(store.pendingDs));
      readVarUint(pendingDSUpdate.restDecoder);
      const dsRest2 = readAndApplyDeleteSet(pendingDSUpdate, transaction, store);
      if (dsRest && dsRest2) {
        store.pendingDs = mergeUpdatesV2([dsRest, dsRest2]);
      } else {
        store.pendingDs = dsRest || dsRest2;
      }
    } else {
      store.pendingDs = dsRest;
    }
    if (retry) {
      const update = (
        /** @type {{update: Uint8Array}} */
        store.pendingStructs.update
      );
      store.pendingStructs = null;
      applyUpdateV2(transaction.doc, update);
    }
  }, transactionOrigin, false);
  var readUpdate = (decoder, ydoc, transactionOrigin) => readUpdateV2(decoder, ydoc, transactionOrigin, new UpdateDecoderV1(decoder));
  var applyUpdateV2 = (ydoc, update, transactionOrigin, YDecoder = UpdateDecoderV2) => {
    const decoder = createDecoder(update);
    readUpdateV2(decoder, ydoc, transactionOrigin, new YDecoder(decoder));
  };
  var applyUpdate = (ydoc, update, transactionOrigin) => applyUpdateV2(ydoc, update, transactionOrigin, UpdateDecoderV1);
  var writeStateAsUpdate = (encoder, doc2, targetStateVector = /* @__PURE__ */ new Map()) => {
    writeClientsStructs(encoder, doc2.store, targetStateVector);
    writeDeleteSet(encoder, createDeleteSetFromStructStore(doc2.store));
  };
  var encodeStateAsUpdateV2 = (doc2, encodedTargetStateVector = new Uint8Array([0]), encoder = new UpdateEncoderV2()) => {
    const targetStateVector = decodeStateVector(encodedTargetStateVector);
    writeStateAsUpdate(encoder, doc2, targetStateVector);
    const updates = [encoder.toUint8Array()];
    if (doc2.store.pendingDs) {
      updates.push(doc2.store.pendingDs);
    }
    if (doc2.store.pendingStructs) {
      updates.push(diffUpdateV2(doc2.store.pendingStructs.update, encodedTargetStateVector));
    }
    if (updates.length > 1) {
      if (encoder.constructor === UpdateEncoderV1) {
        return mergeUpdates(updates.map((update, i) => i === 0 ? update : convertUpdateFormatV2ToV1(update)));
      } else if (encoder.constructor === UpdateEncoderV2) {
        return mergeUpdatesV2(updates);
      }
    }
    return updates[0];
  };
  var encodeStateAsUpdate = (doc2, encodedTargetStateVector) => encodeStateAsUpdateV2(doc2, encodedTargetStateVector, new UpdateEncoderV1());
  var readStateVector = (decoder) => {
    const ss = /* @__PURE__ */ new Map();
    const ssLength = readVarUint(decoder.restDecoder);
    for (let i = 0; i < ssLength; i++) {
      const client = readVarUint(decoder.restDecoder);
      const clock = readVarUint(decoder.restDecoder);
      ss.set(client, clock);
    }
    return ss;
  };
  var decodeStateVector = (decodedState) => readStateVector(new DSDecoderV1(createDecoder(decodedState)));
  var writeStateVector = (encoder, sv) => {
    writeVarUint(encoder.restEncoder, sv.size);
    from(sv.entries()).sort((a, b) => b[0] - a[0]).forEach(([client, clock]) => {
      writeVarUint(encoder.restEncoder, client);
      writeVarUint(encoder.restEncoder, clock);
    });
    return encoder;
  };
  var writeDocumentStateVector = (encoder, doc2) => writeStateVector(encoder, getStateVector(doc2.store));
  var encodeStateVectorV2 = (doc2, encoder = new DSEncoderV2()) => {
    if (doc2 instanceof Map) {
      writeStateVector(encoder, doc2);
    } else {
      writeDocumentStateVector(encoder, doc2);
    }
    return encoder.toUint8Array();
  };
  var encodeStateVector = (doc2) => encodeStateVectorV2(doc2, new DSEncoderV1());
  var EventHandler = class {
    constructor() {
      this.l = [];
    }
  };
  var createEventHandler = () => new EventHandler();
  var addEventHandlerListener = (eventHandler, f) => eventHandler.l.push(f);
  var removeEventHandlerListener = (eventHandler, f) => {
    const l = eventHandler.l;
    const len = l.length;
    eventHandler.l = l.filter((g) => f !== g);
    if (len === eventHandler.l.length) {
      console.error("[yjs] Tried to remove event handler that doesn't exist.");
    }
  };
  var callEventHandlerListeners = (eventHandler, arg0, arg1) => callAll(eventHandler.l, [arg0, arg1]);
  var ID = class {
    /**
     * @param {number} client client id
     * @param {number} clock unique per client id, continuous number
     */
    constructor(client, clock) {
      this.client = client;
      this.clock = clock;
    }
  };
  var compareIDs = (a, b) => a === b || a !== null && b !== null && a.client === b.client && a.clock === b.clock;
  var createID = (client, clock) => new ID(client, clock);
  var writeID = (encoder, id2) => {
    writeVarUint(encoder, id2.client);
    writeVarUint(encoder, id2.clock);
  };
  var readID = (decoder) => createID(readVarUint(decoder), readVarUint(decoder));
  var findRootTypeKey = (type) => {
    for (const [key, value] of type.doc.share.entries()) {
      if (value === type) {
        return key;
      }
    }
    throw unexpectedCase();
  };
  var isParentOf = (parent, child) => {
    while (child !== null) {
      if (child.parent === parent) {
        return true;
      }
      child = /** @type {AbstractType<any>} */
      child.parent._item;
    }
    return false;
  };
  var logType = (type) => {
    const res = [];
    let n = type._start;
    while (n) {
      res.push(n);
      n = n.right;
    }
    console.log("Children: ", res);
    console.log("Children content: ", res.filter((m) => !m.deleted).map((m) => m.content));
  };
  var PermanentUserData = class {
    /**
     * @param {Doc} doc
     * @param {YMap<any>} [storeType]
     */
    constructor(doc2, storeType = doc2.getMap("users")) {
      const dss = /* @__PURE__ */ new Map();
      this.yusers = storeType;
      this.doc = doc2;
      this.clients = /* @__PURE__ */ new Map();
      this.dss = dss;
      const initUser = (user, userDescription) => {
        const ds = user.get("ds");
        const ids = user.get("ids");
        const addClientId = (
          /** @param {number} clientid */
          (clientid) => this.clients.set(clientid, userDescription)
        );
        ds.observe(
          /** @param {YArrayEvent<any>} event */
          (event) => {
            event.changes.added.forEach((item) => {
              item.content.getContent().forEach((encodedDs) => {
                if (encodedDs instanceof Uint8Array) {
                  this.dss.set(userDescription, mergeDeleteSets([this.dss.get(userDescription) || createDeleteSet(), readDeleteSet(new DSDecoderV1(createDecoder(encodedDs)))]));
                }
              });
            });
          }
        );
        this.dss.set(userDescription, mergeDeleteSets(ds.map((encodedDs) => readDeleteSet(new DSDecoderV1(createDecoder(encodedDs))))));
        ids.observe(
          /** @param {YArrayEvent<any>} event */
          (event) => event.changes.added.forEach((item) => item.content.getContent().forEach(addClientId))
        );
        ids.forEach(addClientId);
      };
      storeType.observe((event) => {
        event.keysChanged.forEach(
          (userDescription) => initUser(storeType.get(userDescription), userDescription)
        );
      });
      storeType.forEach(initUser);
    }
    /**
     * @param {Doc} doc
     * @param {number} clientid
     * @param {string} userDescription
     * @param {Object} conf
     * @param {function(Transaction, DeleteSet):boolean} [conf.filter]
     */
    setUserMapping(doc2, clientid, userDescription, { filter = () => true } = {}) {
      const users = this.yusers;
      let user = users.get(userDescription);
      if (!user) {
        user = new YMap();
        user.set("ids", new YArray());
        user.set("ds", new YArray());
        users.set(userDescription, user);
      }
      user.get("ids").push([clientid]);
      users.observe((_event) => {
        setTimeout(() => {
          const userOverwrite = users.get(userDescription);
          if (userOverwrite !== user) {
            user = userOverwrite;
            this.clients.forEach((_userDescription, clientid2) => {
              if (userDescription === _userDescription) {
                user.get("ids").push([clientid2]);
              }
            });
            const encoder = new DSEncoderV1();
            const ds = this.dss.get(userDescription);
            if (ds) {
              writeDeleteSet(encoder, ds);
              user.get("ds").push([encoder.toUint8Array()]);
            }
          }
        }, 0);
      });
      doc2.on(
        "afterTransaction",
        /** @param {Transaction} transaction */
        (transaction) => {
          setTimeout(() => {
            const yds = user.get("ds");
            const ds = transaction.deleteSet;
            if (transaction.local && ds.clients.size > 0 && filter(transaction, ds)) {
              const encoder = new DSEncoderV1();
              writeDeleteSet(encoder, ds);
              yds.push([encoder.toUint8Array()]);
            }
          });
        }
      );
    }
    /**
     * @param {number} clientid
     * @return {any}
     */
    getUserByClientId(clientid) {
      return this.clients.get(clientid) || null;
    }
    /**
     * @param {ID} id
     * @return {string | null}
     */
    getUserByDeletedId(id2) {
      for (const [userDescription, ds] of this.dss.entries()) {
        if (isDeleted(ds, id2)) {
          return userDescription;
        }
      }
      return null;
    }
  };
  var RelativePosition = class {
    /**
     * @param {ID|null} type
     * @param {string|null} tname
     * @param {ID|null} item
     * @param {number} assoc
     */
    constructor(type, tname, item, assoc = 0) {
      this.type = type;
      this.tname = tname;
      this.item = item;
      this.assoc = assoc;
    }
  };
  var relativePositionToJSON = (rpos) => {
    const json = {};
    if (rpos.type) {
      json.type = rpos.type;
    }
    if (rpos.tname) {
      json.tname = rpos.tname;
    }
    if (rpos.item) {
      json.item = rpos.item;
    }
    if (rpos.assoc != null) {
      json.assoc = rpos.assoc;
    }
    return json;
  };
  var createRelativePositionFromJSON = (json) => new RelativePosition(json.type == null ? null : createID(json.type.client, json.type.clock), json.tname ?? null, json.item == null ? null : createID(json.item.client, json.item.clock), json.assoc == null ? 0 : json.assoc);
  var AbsolutePosition = class {
    /**
     * @param {AbstractType<any>} type
     * @param {number} index
     * @param {number} [assoc]
     */
    constructor(type, index, assoc = 0) {
      this.type = type;
      this.index = index;
      this.assoc = assoc;
    }
  };
  var createAbsolutePosition = (type, index, assoc = 0) => new AbsolutePosition(type, index, assoc);
  var createRelativePosition = (type, item, assoc) => {
    let typeid = null;
    let tname = null;
    if (type._item === null) {
      tname = findRootTypeKey(type);
    } else {
      typeid = createID(type._item.id.client, type._item.id.clock);
    }
    return new RelativePosition(typeid, tname, item, assoc);
  };
  var createRelativePositionFromTypeIndex = (type, index, assoc = 0) => {
    let t = type._start;
    if (assoc < 0) {
      if (index === 0) {
        return createRelativePosition(type, null, assoc);
      }
      index--;
    }
    while (t !== null) {
      if (!t.deleted && t.countable) {
        if (t.length > index) {
          return createRelativePosition(type, createID(t.id.client, t.id.clock + index), assoc);
        }
        index -= t.length;
      }
      if (t.right === null && assoc < 0) {
        return createRelativePosition(type, t.lastId, assoc);
      }
      t = t.right;
    }
    return createRelativePosition(type, null, assoc);
  };
  var writeRelativePosition = (encoder, rpos) => {
    const { type, tname, item, assoc } = rpos;
    if (item !== null) {
      writeVarUint(encoder, 0);
      writeID(encoder, item);
    } else if (tname !== null) {
      writeUint8(encoder, 1);
      writeVarString(encoder, tname);
    } else if (type !== null) {
      writeUint8(encoder, 2);
      writeID(encoder, type);
    } else {
      throw unexpectedCase();
    }
    writeVarInt(encoder, assoc);
    return encoder;
  };
  var encodeRelativePosition = (rpos) => {
    const encoder = createEncoder();
    writeRelativePosition(encoder, rpos);
    return toUint8Array(encoder);
  };
  var readRelativePosition = (decoder) => {
    let type = null;
    let tname = null;
    let itemID = null;
    switch (readVarUint(decoder)) {
      case 0:
        itemID = readID(decoder);
        break;
      case 1:
        tname = readVarString(decoder);
        break;
      case 2: {
        type = readID(decoder);
      }
    }
    const assoc = hasContent(decoder) ? readVarInt(decoder) : 0;
    return new RelativePosition(type, tname, itemID, assoc);
  };
  var decodeRelativePosition = (uint8Array) => readRelativePosition(createDecoder(uint8Array));
  var getItemWithOffset = (store, id2) => {
    const item = getItem(store, id2);
    const diff = id2.clock - item.id.clock;
    return {
      item,
      diff
    };
  };
  var createAbsolutePositionFromRelativePosition = (rpos, doc2, followUndoneDeletions = true) => {
    const store = doc2.store;
    const rightID = rpos.item;
    const typeID = rpos.type;
    const tname = rpos.tname;
    const assoc = rpos.assoc;
    let type = null;
    let index = 0;
    if (rightID !== null) {
      if (getState(store, rightID.client) <= rightID.clock) {
        return null;
      }
      const res = followUndoneDeletions ? followRedone(store, rightID) : getItemWithOffset(store, rightID);
      const right = res.item;
      if (!(right instanceof Item)) {
        return null;
      }
      type = /** @type {AbstractType<any>} */
      right.parent;
      if (type._item === null || !type._item.deleted) {
        index = right.deleted || !right.countable ? 0 : res.diff + (assoc >= 0 ? 0 : 1);
        let n = right.left;
        while (n !== null) {
          if (!n.deleted && n.countable) {
            index += n.length;
          }
          n = n.left;
        }
      }
    } else {
      if (tname !== null) {
        type = doc2.get(tname);
      } else if (typeID !== null) {
        if (getState(store, typeID.client) <= typeID.clock) {
          return null;
        }
        const { item } = followUndoneDeletions ? followRedone(store, typeID) : { item: getItem(store, typeID) };
        if (item instanceof Item && item.content instanceof ContentType) {
          type = item.content.type;
        } else {
          return null;
        }
      } else {
        throw unexpectedCase();
      }
      if (assoc >= 0) {
        index = type._length;
      } else {
        index = 0;
      }
    }
    return createAbsolutePosition(type, index, rpos.assoc);
  };
  var compareRelativePositions = (a, b) => a === b || a !== null && b !== null && a.tname === b.tname && compareIDs(a.item, b.item) && compareIDs(a.type, b.type) && a.assoc === b.assoc;
  var Snapshot = class {
    /**
     * @param {DeleteSet} ds
     * @param {Map<number,number>} sv state map
     */
    constructor(ds, sv) {
      this.ds = ds;
      this.sv = sv;
    }
  };
  var equalSnapshots = (snap1, snap2) => {
    const ds1 = snap1.ds.clients;
    const ds2 = snap2.ds.clients;
    const sv1 = snap1.sv;
    const sv2 = snap2.sv;
    if (sv1.size !== sv2.size || ds1.size !== ds2.size) {
      return false;
    }
    for (const [key, value] of sv1.entries()) {
      if (sv2.get(key) !== value) {
        return false;
      }
    }
    for (const [client, dsitems1] of ds1.entries()) {
      const dsitems2 = ds2.get(client) || [];
      if (dsitems1.length !== dsitems2.length) {
        return false;
      }
      for (let i = 0; i < dsitems1.length; i++) {
        const dsitem1 = dsitems1[i];
        const dsitem2 = dsitems2[i];
        if (dsitem1.clock !== dsitem2.clock || dsitem1.len !== dsitem2.len) {
          return false;
        }
      }
    }
    return true;
  };
  var encodeSnapshotV2 = (snapshot2, encoder = new DSEncoderV2()) => {
    writeDeleteSet(encoder, snapshot2.ds);
    writeStateVector(encoder, snapshot2.sv);
    return encoder.toUint8Array();
  };
  var encodeSnapshot = (snapshot2) => encodeSnapshotV2(snapshot2, new DSEncoderV1());
  var decodeSnapshotV2 = (buf, decoder = new DSDecoderV2(createDecoder(buf))) => {
    return new Snapshot(readDeleteSet(decoder), readStateVector(decoder));
  };
  var decodeSnapshot = (buf) => decodeSnapshotV2(buf, new DSDecoderV1(createDecoder(buf)));
  var createSnapshot = (ds, sm) => new Snapshot(ds, sm);
  var emptySnapshot = createSnapshot(createDeleteSet(), /* @__PURE__ */ new Map());
  var snapshot = (doc2) => createSnapshot(createDeleteSetFromStructStore(doc2.store), getStateVector(doc2.store));
  var isVisible = (item, snapshot2) => snapshot2 === void 0 ? !item.deleted : snapshot2.sv.has(item.id.client) && (snapshot2.sv.get(item.id.client) || 0) > item.id.clock && !isDeleted(snapshot2.ds, item.id);
  var splitSnapshotAffectedStructs = (transaction, snapshot2) => {
    const meta = setIfUndefined(transaction.meta, splitSnapshotAffectedStructs, create2);
    const store = transaction.doc.store;
    if (!meta.has(snapshot2)) {
      snapshot2.sv.forEach((clock, client) => {
        if (clock < getState(store, client)) {
          getItemCleanStart(transaction, createID(client, clock));
        }
      });
      iterateDeletedStructs(transaction, snapshot2.ds, (_item) => {
      });
      meta.add(snapshot2);
    }
  };
  var createDocFromSnapshot = (originDoc, snapshot2, newDoc = new Doc()) => {
    if (originDoc.gc) {
      throw new Error("Garbage-collection must be disabled in `originDoc`!");
    }
    const { sv, ds } = snapshot2;
    const encoder = new UpdateEncoderV2();
    originDoc.transact((transaction) => {
      let size2 = 0;
      sv.forEach((clock) => {
        if (clock > 0) {
          size2++;
        }
      });
      writeVarUint(encoder.restEncoder, size2);
      for (const [client, clock] of sv) {
        if (clock === 0) {
          continue;
        }
        if (clock < getState(originDoc.store, client)) {
          getItemCleanStart(transaction, createID(client, clock));
        }
        const structs = originDoc.store.clients.get(client) || [];
        const lastStructIndex = findIndexSS(structs, clock - 1);
        writeVarUint(encoder.restEncoder, lastStructIndex + 1);
        encoder.writeClient(client);
        writeVarUint(encoder.restEncoder, 0);
        for (let i = 0; i <= lastStructIndex; i++) {
          structs[i].write(encoder, 0);
        }
      }
      writeDeleteSet(encoder, ds);
    });
    applyUpdateV2(newDoc, encoder.toUint8Array(), "snapshot");
    return newDoc;
  };
  var snapshotContainsUpdateV2 = (snapshot2, update, YDecoder = UpdateDecoderV2) => {
    const updateDecoder = new YDecoder(createDecoder(update));
    const lazyDecoder = new LazyStructReader(updateDecoder, false);
    for (let curr = lazyDecoder.curr; curr !== null; curr = lazyDecoder.next()) {
      if ((snapshot2.sv.get(curr.id.client) || 0) < curr.id.clock + curr.length) {
        return false;
      }
    }
    const mergedDS = mergeDeleteSets([snapshot2.ds, readDeleteSet(updateDecoder)]);
    return equalDeleteSets(snapshot2.ds, mergedDS);
  };
  var snapshotContainsUpdate = (snapshot2, update) => snapshotContainsUpdateV2(snapshot2, update, UpdateDecoderV1);
  var StructStore = class {
    constructor() {
      this.clients = /* @__PURE__ */ new Map();
      this.pendingStructs = null;
      this.pendingDs = null;
    }
  };
  var getStateVector = (store) => {
    const sm = /* @__PURE__ */ new Map();
    store.clients.forEach((structs, client) => {
      const struct = structs[structs.length - 1];
      sm.set(client, struct.id.clock + struct.length);
    });
    return sm;
  };
  var getState = (store, client) => {
    const structs = store.clients.get(client);
    if (structs === void 0) {
      return 0;
    }
    const lastStruct = structs[structs.length - 1];
    return lastStruct.id.clock + lastStruct.length;
  };
  var addStruct = (store, struct) => {
    let structs = store.clients.get(struct.id.client);
    if (structs === void 0) {
      structs = [];
      store.clients.set(struct.id.client, structs);
    } else {
      const lastStruct = structs[structs.length - 1];
      if (lastStruct.id.clock + lastStruct.length !== struct.id.clock) {
        throw unexpectedCase();
      }
    }
    structs.push(struct);
  };
  var findIndexSS = (structs, clock) => {
    let left = 0;
    let right = structs.length - 1;
    let mid = structs[right];
    let midclock = mid.id.clock;
    if (midclock === clock) {
      return right;
    }
    let midindex = floor(clock / (midclock + mid.length - 1) * right);
    while (left <= right) {
      mid = structs[midindex];
      midclock = mid.id.clock;
      if (midclock <= clock) {
        if (clock < midclock + mid.length) {
          return midindex;
        }
        left = midindex + 1;
      } else {
        right = midindex - 1;
      }
      midindex = floor((left + right) / 2);
    }
    throw unexpectedCase();
  };
  var find = (store, id2) => {
    const structs = store.clients.get(id2.client);
    return structs[findIndexSS(structs, id2.clock)];
  };
  var getItem = (
    /** @type {function(StructStore,ID):Item} */
    find
  );
  var findIndexCleanStart = (transaction, structs, clock) => {
    const index = findIndexSS(structs, clock);
    const struct = structs[index];
    if (struct.id.clock < clock && struct instanceof Item) {
      structs.splice(index + 1, 0, splitItem(transaction, struct, clock - struct.id.clock));
      return index + 1;
    }
    return index;
  };
  var getItemCleanStart = (transaction, id2) => {
    const structs = (
      /** @type {Array<Item>} */
      transaction.doc.store.clients.get(id2.client)
    );
    return structs[findIndexCleanStart(transaction, structs, id2.clock)];
  };
  var getItemCleanEnd = (transaction, store, id2) => {
    const structs = store.clients.get(id2.client);
    const index = findIndexSS(structs, id2.clock);
    const struct = structs[index];
    if (id2.clock !== struct.id.clock + struct.length - 1 && struct.constructor !== GC) {
      structs.splice(index + 1, 0, splitItem(transaction, struct, id2.clock - struct.id.clock + 1));
    }
    return struct;
  };
  var replaceStruct = (store, struct, newStruct) => {
    const structs = (
      /** @type {Array<GC|Item>} */
      store.clients.get(struct.id.client)
    );
    structs[findIndexSS(structs, struct.id.clock)] = newStruct;
  };
  var iterateStructs = (transaction, structs, clockStart, len, f) => {
    if (len === 0) {
      return;
    }
    const clockEnd = clockStart + len;
    let index = findIndexCleanStart(transaction, structs, clockStart);
    let struct;
    do {
      struct = structs[index++];
      if (clockEnd < struct.id.clock + struct.length) {
        findIndexCleanStart(transaction, structs, clockEnd);
      }
      f(struct);
    } while (index < structs.length && structs[index].id.clock < clockEnd);
  };
  var Transaction = class {
    /**
     * @param {Doc} doc
     * @param {any} origin
     * @param {boolean} local
     */
    constructor(doc2, origin2, local) {
      this.doc = doc2;
      this.deleteSet = new DeleteSet();
      this.beforeState = getStateVector(doc2.store);
      this.afterState = /* @__PURE__ */ new Map();
      this.changed = /* @__PURE__ */ new Map();
      this.changedParentTypes = /* @__PURE__ */ new Map();
      this._mergeStructs = [];
      this.origin = origin2;
      this.meta = /* @__PURE__ */ new Map();
      this.local = local;
      this.subdocsAdded = /* @__PURE__ */ new Set();
      this.subdocsRemoved = /* @__PURE__ */ new Set();
      this.subdocsLoaded = /* @__PURE__ */ new Set();
      this._needFormattingCleanup = false;
    }
  };
  var writeUpdateMessageFromTransaction = (encoder, transaction) => {
    if (transaction.deleteSet.clients.size === 0 && !any(transaction.afterState, (clock, client) => transaction.beforeState.get(client) !== clock)) {
      return false;
    }
    sortAndMergeDeleteSet(transaction.deleteSet);
    writeStructsFromTransaction(encoder, transaction);
    writeDeleteSet(encoder, transaction.deleteSet);
    return true;
  };
  var addChangedTypeToTransaction = (transaction, type, parentSub) => {
    const item = type._item;
    if (item === null || item.id.clock < (transaction.beforeState.get(item.id.client) || 0) && !item.deleted) {
      setIfUndefined(transaction.changed, type, create2).add(parentSub);
    }
  };
  var tryToMergeWithLefts = (structs, pos) => {
    let right = structs[pos];
    let left = structs[pos - 1];
    let i = pos;
    for (; i > 0; right = left, left = structs[--i - 1]) {
      if (left.deleted === right.deleted && left.constructor === right.constructor) {
        if (left.mergeWith(right)) {
          if (right instanceof Item && right.parentSub !== null && /** @type {AbstractType<any>} */
          right.parent._map.get(right.parentSub) === right) {
            right.parent._map.set(
              right.parentSub,
              /** @type {Item} */
              left
            );
          }
          continue;
        }
      }
      break;
    }
    const merged = pos - i;
    if (merged) {
      structs.splice(pos + 1 - merged, merged);
    }
    return merged;
  };
  var tryGcDeleteSet = (ds, store, gcFilter) => {
    for (const [client, deleteItems] of ds.clients.entries()) {
      const structs = (
        /** @type {Array<GC|Item>} */
        store.clients.get(client)
      );
      for (let di = deleteItems.length - 1; di >= 0; di--) {
        const deleteItem = deleteItems[di];
        const endDeleteItemClock = deleteItem.clock + deleteItem.len;
        for (let si = findIndexSS(structs, deleteItem.clock), struct = structs[si]; si < structs.length && struct.id.clock < endDeleteItemClock; struct = structs[++si]) {
          const struct2 = structs[si];
          if (deleteItem.clock + deleteItem.len <= struct2.id.clock) {
            break;
          }
          if (struct2 instanceof Item && struct2.deleted && !struct2.keep && gcFilter(struct2)) {
            struct2.gc(store, false);
          }
        }
      }
    }
  };
  var tryMergeDeleteSet = (ds, store) => {
    ds.clients.forEach((deleteItems, client) => {
      const structs = (
        /** @type {Array<GC|Item>} */
        store.clients.get(client)
      );
      for (let di = deleteItems.length - 1; di >= 0; di--) {
        const deleteItem = deleteItems[di];
        const mostRightIndexToCheck = min(structs.length - 1, 1 + findIndexSS(structs, deleteItem.clock + deleteItem.len - 1));
        for (let si = mostRightIndexToCheck, struct = structs[si]; si > 0 && struct.id.clock >= deleteItem.clock; struct = structs[si]) {
          si -= 1 + tryToMergeWithLefts(structs, si);
        }
      }
    });
  };
  var tryGc = (ds, store, gcFilter) => {
    tryGcDeleteSet(ds, store, gcFilter);
    tryMergeDeleteSet(ds, store);
  };
  var cleanupTransactions = (transactionCleanups, i) => {
    if (i < transactionCleanups.length) {
      const transaction = transactionCleanups[i];
      const doc2 = transaction.doc;
      const store = doc2.store;
      const ds = transaction.deleteSet;
      const mergeStructs = transaction._mergeStructs;
      try {
        sortAndMergeDeleteSet(ds);
        transaction.afterState = getStateVector(transaction.doc.store);
        doc2.emit("beforeObserverCalls", [transaction, doc2]);
        const fs = [];
        transaction.changed.forEach(
          (subs, itemtype) => fs.push(() => {
            if (itemtype._item === null || !itemtype._item.deleted) {
              itemtype._callObserver(transaction, subs);
            }
          })
        );
        fs.push(() => {
          transaction.changedParentTypes.forEach((events, type) => {
            if (type._dEH.l.length > 0 && (type._item === null || !type._item.deleted)) {
              events = events.filter(
                (event) => event.target._item === null || !event.target._item.deleted
              );
              events.forEach((event) => {
                event.currentTarget = type;
                event._path = null;
              });
              events.sort((event1, event2) => event1.path.length - event2.path.length);
              fs.push(() => {
                callEventHandlerListeners(type._dEH, events, transaction);
              });
            }
          });
          fs.push(() => doc2.emit("afterTransaction", [transaction, doc2]));
          fs.push(() => {
            if (transaction._needFormattingCleanup) {
              cleanupYTextAfterTransaction(transaction);
            }
          });
        });
        callAll(fs, []);
      } finally {
        if (doc2.gc) {
          tryGcDeleteSet(ds, store, doc2.gcFilter);
        }
        tryMergeDeleteSet(ds, store);
        transaction.afterState.forEach((clock, client) => {
          const beforeClock = transaction.beforeState.get(client) || 0;
          if (beforeClock !== clock) {
            const structs = (
              /** @type {Array<GC|Item>} */
              store.clients.get(client)
            );
            const firstChangePos = max(findIndexSS(structs, beforeClock), 1);
            for (let i2 = structs.length - 1; i2 >= firstChangePos; ) {
              i2 -= 1 + tryToMergeWithLefts(structs, i2);
            }
          }
        });
        for (let i2 = mergeStructs.length - 1; i2 >= 0; i2--) {
          const { client, clock } = mergeStructs[i2].id;
          const structs = (
            /** @type {Array<GC|Item>} */
            store.clients.get(client)
          );
          const replacedStructPos = findIndexSS(structs, clock);
          if (replacedStructPos + 1 < structs.length) {
            if (tryToMergeWithLefts(structs, replacedStructPos + 1) > 1) {
              continue;
            }
          }
          if (replacedStructPos > 0) {
            tryToMergeWithLefts(structs, replacedStructPos);
          }
        }
        if (!transaction.local && transaction.afterState.get(doc2.clientID) !== transaction.beforeState.get(doc2.clientID)) {
          print(ORANGE, BOLD, "[yjs] ", UNBOLD, RED, "Changed the client-id because another client seems to be using it.");
          doc2.clientID = generateNewClientId();
        }
        doc2.emit("afterTransactionCleanup", [transaction, doc2]);
        if (doc2._observers.has("update")) {
          const encoder = new UpdateEncoderV1();
          const hasContent2 = writeUpdateMessageFromTransaction(encoder, transaction);
          if (hasContent2) {
            doc2.emit("update", [encoder.toUint8Array(), transaction.origin, doc2, transaction]);
          }
        }
        if (doc2._observers.has("updateV2")) {
          const encoder = new UpdateEncoderV2();
          const hasContent2 = writeUpdateMessageFromTransaction(encoder, transaction);
          if (hasContent2) {
            doc2.emit("updateV2", [encoder.toUint8Array(), transaction.origin, doc2, transaction]);
          }
        }
        const { subdocsAdded, subdocsLoaded, subdocsRemoved } = transaction;
        if (subdocsAdded.size > 0 || subdocsRemoved.size > 0 || subdocsLoaded.size > 0) {
          subdocsAdded.forEach((subdoc) => {
            subdoc.clientID = doc2.clientID;
            if (subdoc.collectionid == null) {
              subdoc.collectionid = doc2.collectionid;
            }
            doc2.subdocs.add(subdoc);
          });
          subdocsRemoved.forEach((subdoc) => doc2.subdocs.delete(subdoc));
          doc2.emit("subdocs", [{ loaded: subdocsLoaded, added: subdocsAdded, removed: subdocsRemoved }, doc2, transaction]);
          subdocsRemoved.forEach((subdoc) => subdoc.destroy());
        }
        if (transactionCleanups.length <= i + 1) {
          doc2._transactionCleanups = [];
          doc2.emit("afterAllTransactions", [doc2, transactionCleanups]);
        } else {
          cleanupTransactions(transactionCleanups, i + 1);
        }
      }
    }
  };
  var transact = (doc2, f, origin2 = null, local = true) => {
    const transactionCleanups = doc2._transactionCleanups;
    let initialCall = false;
    let result = null;
    if (doc2._transaction === null) {
      initialCall = true;
      doc2._transaction = new Transaction(doc2, origin2, local);
      transactionCleanups.push(doc2._transaction);
      if (transactionCleanups.length === 1) {
        doc2.emit("beforeAllTransactions", [doc2]);
      }
      doc2.emit("beforeTransaction", [doc2._transaction, doc2]);
    }
    try {
      result = f(doc2._transaction);
    } finally {
      if (initialCall) {
        const finishCleanup = doc2._transaction === transactionCleanups[0];
        doc2._transaction = null;
        if (finishCleanup) {
          cleanupTransactions(transactionCleanups, 0);
        }
      }
    }
    return result;
  };
  var StackItem = class {
    /**
     * @param {DeleteSet} deletions
     * @param {DeleteSet} insertions
     */
    constructor(deletions, insertions) {
      this.insertions = insertions;
      this.deletions = deletions;
      this.meta = /* @__PURE__ */ new Map();
    }
  };
  var clearUndoManagerStackItem = (tr, um, stackItem) => {
    iterateDeletedStructs(tr, stackItem.deletions, (item) => {
      if (item instanceof Item && um.scope.some((type) => type === tr.doc || isParentOf(
        /** @type {AbstractType<any>} */
        type,
        item
      ))) {
        keepItem(item, false);
      }
    });
  };
  var popStackItem = (undoManager, stack, eventType) => {
    let _tr = null;
    const doc2 = undoManager.doc;
    const scope = undoManager.scope;
    transact(doc2, (transaction) => {
      while (stack.length > 0 && undoManager.currStackItem === null) {
        const store = doc2.store;
        const stackItem = (
          /** @type {StackItem} */
          stack.pop()
        );
        const itemsToRedo = /* @__PURE__ */ new Set();
        const itemsToDelete = [];
        let performedChange = false;
        iterateDeletedStructs(transaction, stackItem.insertions, (struct) => {
          if (struct instanceof Item) {
            if (struct.redone !== null) {
              let { item, diff } = followRedone(store, struct.id);
              if (diff > 0) {
                item = getItemCleanStart(transaction, createID(item.id.client, item.id.clock + diff));
              }
              struct = item;
            }
            if (!struct.deleted && scope.some((type) => type === transaction.doc || isParentOf(
              /** @type {AbstractType<any>} */
              type,
              /** @type {Item} */
              struct
            ))) {
              itemsToDelete.push(struct);
            }
          }
        });
        iterateDeletedStructs(transaction, stackItem.deletions, (struct) => {
          if (struct instanceof Item && scope.some((type) => type === transaction.doc || isParentOf(
            /** @type {AbstractType<any>} */
            type,
            struct
          )) && // Never redo structs in stackItem.insertions because they were created and deleted in the same capture interval.
          !isDeleted(stackItem.insertions, struct.id)) {
            itemsToRedo.add(struct);
          }
        });
        itemsToRedo.forEach((struct) => {
          performedChange = redoItem(transaction, struct, itemsToRedo, stackItem.insertions, undoManager.ignoreRemoteMapChanges, undoManager) !== null || performedChange;
        });
        for (let i = itemsToDelete.length - 1; i >= 0; i--) {
          const item = itemsToDelete[i];
          if (undoManager.deleteFilter(item)) {
            item.delete(transaction);
            performedChange = true;
          }
        }
        undoManager.currStackItem = performedChange ? stackItem : null;
      }
      transaction.changed.forEach((subProps, type) => {
        if (subProps.has(null) && type._searchMarker) {
          type._searchMarker.length = 0;
        }
      });
      _tr = transaction;
    }, undoManager);
    const res = undoManager.currStackItem;
    if (res != null) {
      const changedParentTypes = _tr.changedParentTypes;
      undoManager.emit("stack-item-popped", [{ stackItem: res, type: eventType, changedParentTypes, origin: undoManager }, undoManager]);
      undoManager.currStackItem = null;
    }
    return res;
  };
  var UndoManager = class extends ObservableV2 {
    /**
     * @param {Doc|AbstractType<any>|Array<AbstractType<any>>} typeScope Limits the scope of the UndoManager. If this is set to a ydoc instance, all changes on that ydoc will be undone. If set to a specific type, only changes on that type or its children will be undone. Also accepts an array of types.
     * @param {UndoManagerOptions} options
     */
    constructor(typeScope, {
      captureTimeout = 500,
      captureTransaction = (_tr) => true,
      deleteFilter = () => true,
      trackedOrigins = /* @__PURE__ */ new Set([null]),
      ignoreRemoteMapChanges = false,
      doc: doc2 = (
        /** @type {Doc} */
        isArray(typeScope) ? typeScope[0].doc : typeScope instanceof Doc ? typeScope : typeScope.doc
      )
    } = {}) {
      super();
      this.scope = [];
      this.doc = doc2;
      this.addToScope(typeScope);
      this.deleteFilter = deleteFilter;
      trackedOrigins.add(this);
      this.trackedOrigins = trackedOrigins;
      this.captureTransaction = captureTransaction;
      this.undoStack = [];
      this.redoStack = [];
      this.undoing = false;
      this.redoing = false;
      this.currStackItem = null;
      this.lastChange = 0;
      this.ignoreRemoteMapChanges = ignoreRemoteMapChanges;
      this.captureTimeout = captureTimeout;
      this.afterTransactionHandler = (transaction) => {
        if (!this.captureTransaction(transaction) || !this.scope.some((type) => transaction.changedParentTypes.has(
          /** @type {AbstractType<any>} */
          type
        ) || type === this.doc) || !this.trackedOrigins.has(transaction.origin) && (!transaction.origin || !this.trackedOrigins.has(transaction.origin.constructor))) {
          return;
        }
        const undoing = this.undoing;
        const redoing = this.redoing;
        const stack = undoing ? this.redoStack : this.undoStack;
        if (undoing) {
          this.stopCapturing();
        } else if (!redoing) {
          this.clear(false, true);
        }
        const insertions = new DeleteSet();
        transaction.afterState.forEach((endClock, client) => {
          const startClock = transaction.beforeState.get(client) || 0;
          const len = endClock - startClock;
          if (len > 0) {
            addToDeleteSet(insertions, client, startClock, len);
          }
        });
        const now = getUnixTime();
        let didAdd = false;
        if (this.lastChange > 0 && now - this.lastChange < this.captureTimeout && stack.length > 0 && !undoing && !redoing) {
          const lastOp = stack[stack.length - 1];
          lastOp.deletions = mergeDeleteSets([lastOp.deletions, transaction.deleteSet]);
          lastOp.insertions = mergeDeleteSets([lastOp.insertions, insertions]);
        } else {
          stack.push(new StackItem(transaction.deleteSet, insertions));
          didAdd = true;
        }
        if (!undoing && !redoing) {
          this.lastChange = now;
        }
        iterateDeletedStructs(
          transaction,
          transaction.deleteSet,
          /** @param {Item|GC} item */
          (item) => {
            if (item instanceof Item && this.scope.some((type) => type === transaction.doc || isParentOf(
              /** @type {AbstractType<any>} */
              type,
              item
            ))) {
              keepItem(item, true);
            }
          }
        );
        const changeEvent = [{ stackItem: stack[stack.length - 1], origin: transaction.origin, type: undoing ? "redo" : "undo", changedParentTypes: transaction.changedParentTypes }, this];
        if (didAdd) {
          this.emit("stack-item-added", changeEvent);
        } else {
          this.emit("stack-item-updated", changeEvent);
        }
      };
      this.doc.on("afterTransaction", this.afterTransactionHandler);
      this.doc.on("destroy", () => {
        this.destroy();
      });
    }
    /**
     * Extend the scope.
     *
     * @param {Array<AbstractType<any> | Doc> | AbstractType<any> | Doc} ytypes
     */
    addToScope(ytypes) {
      const tmpSet = new Set(this.scope);
      ytypes = isArray(ytypes) ? ytypes : [ytypes];
      ytypes.forEach((ytype) => {
        if (!tmpSet.has(ytype)) {
          tmpSet.add(ytype);
          if (ytype instanceof AbstractType ? ytype.doc !== this.doc : ytype !== this.doc) warn("[yjs#509] Not same Y.Doc");
          this.scope.push(ytype);
        }
      });
    }
    /**
     * @param {any} origin
     */
    addTrackedOrigin(origin2) {
      this.trackedOrigins.add(origin2);
    }
    /**
     * @param {any} origin
     */
    removeTrackedOrigin(origin2) {
      this.trackedOrigins.delete(origin2);
    }
    clear(clearUndoStack = true, clearRedoStack = true) {
      if (clearUndoStack && this.canUndo() || clearRedoStack && this.canRedo()) {
        this.doc.transact((tr) => {
          if (clearUndoStack) {
            this.undoStack.forEach((item) => clearUndoManagerStackItem(tr, this, item));
            this.undoStack = [];
          }
          if (clearRedoStack) {
            this.redoStack.forEach((item) => clearUndoManagerStackItem(tr, this, item));
            this.redoStack = [];
          }
          this.emit("stack-cleared", [{ undoStackCleared: clearUndoStack, redoStackCleared: clearRedoStack }]);
        });
      }
    }
    /**
     * UndoManager merges Undo-StackItem if they are created within time-gap
     * smaller than `options.captureTimeout`. Call `um.stopCapturing()` so that the next
     * StackItem won't be merged.
     *
     *
     * @example
     *     // without stopCapturing
     *     ytext.insert(0, 'a')
     *     ytext.insert(1, 'b')
     *     um.undo()
     *     ytext.toString() // => '' (note that 'ab' was removed)
     *     // with stopCapturing
     *     ytext.insert(0, 'a')
     *     um.stopCapturing()
     *     ytext.insert(0, 'b')
     *     um.undo()
     *     ytext.toString() // => 'a' (note that only 'b' was removed)
     *
     */
    stopCapturing() {
      this.lastChange = 0;
    }
    /**
     * Undo last changes on type.
     *
     * @return {StackItem?} Returns StackItem if a change was applied
     */
    undo() {
      this.undoing = true;
      let res;
      try {
        res = popStackItem(this, this.undoStack, "undo");
      } finally {
        this.undoing = false;
      }
      return res;
    }
    /**
     * Redo last undo operation.
     *
     * @return {StackItem?} Returns StackItem if a change was applied
     */
    redo() {
      this.redoing = true;
      let res;
      try {
        res = popStackItem(this, this.redoStack, "redo");
      } finally {
        this.redoing = false;
      }
      return res;
    }
    /**
     * Are undo steps available?
     *
     * @return {boolean} `true` if undo is possible
     */
    canUndo() {
      return this.undoStack.length > 0;
    }
    /**
     * Are redo steps available?
     *
     * @return {boolean} `true` if redo is possible
     */
    canRedo() {
      return this.redoStack.length > 0;
    }
    destroy() {
      this.trackedOrigins.delete(this);
      this.doc.off("afterTransaction", this.afterTransactionHandler);
      super.destroy();
    }
  };
  function* lazyStructReaderGenerator(decoder) {
    const numOfStateUpdates = readVarUint(decoder.restDecoder);
    for (let i = 0; i < numOfStateUpdates; i++) {
      const numberOfStructs = readVarUint(decoder.restDecoder);
      const client = decoder.readClient();
      let clock = readVarUint(decoder.restDecoder);
      for (let i2 = 0; i2 < numberOfStructs; i2++) {
        const info = decoder.readInfo();
        if (info === 10) {
          const len = readVarUint(decoder.restDecoder);
          yield new Skip(createID(client, clock), len);
          clock += len;
        } else if ((BITS5 & info) !== 0) {
          const cantCopyParentInfo = (info & (BIT7 | BIT8)) === 0;
          const struct = new Item(
            createID(client, clock),
            null,
            // left
            (info & BIT8) === BIT8 ? decoder.readLeftID() : null,
            // origin
            null,
            // right
            (info & BIT7) === BIT7 ? decoder.readRightID() : null,
            // right origin
            // @ts-ignore Force writing a string here.
            cantCopyParentInfo ? decoder.readParentInfo() ? decoder.readString() : decoder.readLeftID() : null,
            // parent
            cantCopyParentInfo && (info & BIT6) === BIT6 ? decoder.readString() : null,
            // parentSub
            readItemContent(decoder, info)
            // item content
          );
          yield struct;
          clock += struct.length;
        } else {
          const len = decoder.readLen();
          yield new GC(createID(client, clock), len);
          clock += len;
        }
      }
    }
  }
  var LazyStructReader = class {
    /**
     * @param {UpdateDecoderV1 | UpdateDecoderV2} decoder
     * @param {boolean} filterSkips
     */
    constructor(decoder, filterSkips) {
      this.gen = lazyStructReaderGenerator(decoder);
      this.curr = null;
      this.done = false;
      this.filterSkips = filterSkips;
      this.next();
    }
    /**
     * @return {Item | GC | Skip |null}
     */
    next() {
      do {
        this.curr = this.gen.next().value || null;
      } while (this.filterSkips && this.curr !== null && this.curr.constructor === Skip);
      return this.curr;
    }
  };
  var logUpdate = (update) => logUpdateV2(update, UpdateDecoderV1);
  var logUpdateV2 = (update, YDecoder = UpdateDecoderV2) => {
    const structs = [];
    const updateDecoder = new YDecoder(createDecoder(update));
    const lazyDecoder = new LazyStructReader(updateDecoder, false);
    for (let curr = lazyDecoder.curr; curr !== null; curr = lazyDecoder.next()) {
      structs.push(curr);
    }
    print("Structs: ", structs);
    const ds = readDeleteSet(updateDecoder);
    print("DeleteSet: ", ds);
  };
  var decodeUpdate = (update) => decodeUpdateV2(update, UpdateDecoderV1);
  var decodeUpdateV2 = (update, YDecoder = UpdateDecoderV2) => {
    const structs = [];
    const updateDecoder = new YDecoder(createDecoder(update));
    const lazyDecoder = new LazyStructReader(updateDecoder, false);
    for (let curr = lazyDecoder.curr; curr !== null; curr = lazyDecoder.next()) {
      structs.push(curr);
    }
    return {
      structs,
      ds: readDeleteSet(updateDecoder)
    };
  };
  var LazyStructWriter = class {
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     */
    constructor(encoder) {
      this.currClient = 0;
      this.startClock = 0;
      this.written = 0;
      this.encoder = encoder;
      this.clientStructs = [];
    }
  };
  var mergeUpdates = (updates) => mergeUpdatesV2(updates, UpdateDecoderV1, UpdateEncoderV1);
  var encodeStateVectorFromUpdateV2 = (update, YEncoder = DSEncoderV2, YDecoder = UpdateDecoderV2) => {
    const encoder = new YEncoder();
    const updateDecoder = new LazyStructReader(new YDecoder(createDecoder(update)), false);
    let curr = updateDecoder.curr;
    if (curr !== null) {
      let size2 = 0;
      let currClient = curr.id.client;
      let stopCounting = curr.id.clock !== 0;
      let currClock = stopCounting ? 0 : curr.id.clock + curr.length;
      for (; curr !== null; curr = updateDecoder.next()) {
        if (currClient !== curr.id.client) {
          if (currClock !== 0) {
            size2++;
            writeVarUint(encoder.restEncoder, currClient);
            writeVarUint(encoder.restEncoder, currClock);
          }
          currClient = curr.id.client;
          currClock = 0;
          stopCounting = curr.id.clock !== 0;
        }
        if (curr.constructor === Skip) {
          stopCounting = true;
        }
        if (!stopCounting) {
          currClock = curr.id.clock + curr.length;
        }
      }
      if (currClock !== 0) {
        size2++;
        writeVarUint(encoder.restEncoder, currClient);
        writeVarUint(encoder.restEncoder, currClock);
      }
      const enc = createEncoder();
      writeVarUint(enc, size2);
      writeBinaryEncoder(enc, encoder.restEncoder);
      encoder.restEncoder = enc;
      return encoder.toUint8Array();
    } else {
      writeVarUint(encoder.restEncoder, 0);
      return encoder.toUint8Array();
    }
  };
  var encodeStateVectorFromUpdate = (update) => encodeStateVectorFromUpdateV2(update, DSEncoderV1, UpdateDecoderV1);
  var parseUpdateMetaV2 = (update, YDecoder = UpdateDecoderV2) => {
    const from2 = /* @__PURE__ */ new Map();
    const to = /* @__PURE__ */ new Map();
    const updateDecoder = new LazyStructReader(new YDecoder(createDecoder(update)), false);
    let curr = updateDecoder.curr;
    if (curr !== null) {
      let currClient = curr.id.client;
      let currClock = curr.id.clock;
      from2.set(currClient, currClock);
      for (; curr !== null; curr = updateDecoder.next()) {
        if (currClient !== curr.id.client) {
          to.set(currClient, currClock);
          from2.set(curr.id.client, curr.id.clock);
          currClient = curr.id.client;
        }
        currClock = curr.id.clock + curr.length;
      }
      to.set(currClient, currClock);
    }
    return { from: from2, to };
  };
  var parseUpdateMeta = (update) => parseUpdateMetaV2(update, UpdateDecoderV1);
  var sliceStruct = (left, diff) => {
    if (left.constructor === GC) {
      const { client, clock } = left.id;
      return new GC(createID(client, clock + diff), left.length - diff);
    } else if (left.constructor === Skip) {
      const { client, clock } = left.id;
      return new Skip(createID(client, clock + diff), left.length - diff);
    } else {
      const leftItem = (
        /** @type {Item} */
        left
      );
      const { client, clock } = leftItem.id;
      return new Item(
        createID(client, clock + diff),
        null,
        createID(client, clock + diff - 1),
        null,
        leftItem.rightOrigin,
        leftItem.parent,
        leftItem.parentSub,
        leftItem.content.splice(diff)
      );
    }
  };
  var mergeUpdatesV2 = (updates, YDecoder = UpdateDecoderV2, YEncoder = UpdateEncoderV2) => {
    if (updates.length === 1) {
      return updates[0];
    }
    const updateDecoders = updates.map((update) => new YDecoder(createDecoder(update)));
    let lazyStructDecoders = updateDecoders.map((decoder) => new LazyStructReader(decoder, true));
    let currWrite = null;
    const updateEncoder = new YEncoder();
    const lazyStructEncoder = new LazyStructWriter(updateEncoder);
    while (true) {
      lazyStructDecoders = lazyStructDecoders.filter((dec) => dec.curr !== null);
      lazyStructDecoders.sort(
        /** @type {function(any,any):number} */
        (dec1, dec2) => {
          if (dec1.curr.id.client === dec2.curr.id.client) {
            const clockDiff = dec1.curr.id.clock - dec2.curr.id.clock;
            if (clockDiff === 0) {
              return dec1.curr.constructor === dec2.curr.constructor ? 0 : dec1.curr.constructor === Skip ? 1 : -1;
            } else {
              return clockDiff;
            }
          } else {
            return dec2.curr.id.client - dec1.curr.id.client;
          }
        }
      );
      if (lazyStructDecoders.length === 0) {
        break;
      }
      const currDecoder = lazyStructDecoders[0];
      const firstClient = (
        /** @type {Item | GC} */
        currDecoder.curr.id.client
      );
      if (currWrite !== null) {
        let curr = (
          /** @type {Item | GC | null} */
          currDecoder.curr
        );
        let iterated = false;
        while (curr !== null && curr.id.clock + curr.length <= currWrite.struct.id.clock + currWrite.struct.length && curr.id.client >= currWrite.struct.id.client) {
          curr = currDecoder.next();
          iterated = true;
        }
        if (curr === null || // current decoder is empty
        curr.id.client !== firstClient || // check whether there is another decoder that has has updates from `firstClient`
        iterated && curr.id.clock > currWrite.struct.id.clock + currWrite.struct.length) {
          continue;
        }
        if (firstClient !== currWrite.struct.id.client) {
          writeStructToLazyStructWriter(lazyStructEncoder, currWrite.struct, currWrite.offset);
          currWrite = { struct: curr, offset: 0 };
          currDecoder.next();
        } else {
          if (currWrite.struct.id.clock + currWrite.struct.length < curr.id.clock) {
            if (currWrite.struct.constructor === Skip) {
              currWrite.struct.length = curr.id.clock + curr.length - currWrite.struct.id.clock;
            } else {
              writeStructToLazyStructWriter(lazyStructEncoder, currWrite.struct, currWrite.offset);
              const diff = curr.id.clock - currWrite.struct.id.clock - currWrite.struct.length;
              const struct = new Skip(createID(firstClient, currWrite.struct.id.clock + currWrite.struct.length), diff);
              currWrite = { struct, offset: 0 };
            }
          } else {
            const diff = currWrite.struct.id.clock + currWrite.struct.length - curr.id.clock;
            if (diff > 0) {
              if (currWrite.struct.constructor === Skip) {
                currWrite.struct.length -= diff;
              } else {
                curr = sliceStruct(curr, diff);
              }
            }
            if (!currWrite.struct.mergeWith(
              /** @type {any} */
              curr
            )) {
              writeStructToLazyStructWriter(lazyStructEncoder, currWrite.struct, currWrite.offset);
              currWrite = { struct: curr, offset: 0 };
              currDecoder.next();
            }
          }
        }
      } else {
        currWrite = { struct: (
          /** @type {Item | GC} */
          currDecoder.curr
        ), offset: 0 };
        currDecoder.next();
      }
      for (let next = currDecoder.curr; next !== null && next.id.client === firstClient && next.id.clock === currWrite.struct.id.clock + currWrite.struct.length && next.constructor !== Skip; next = currDecoder.next()) {
        writeStructToLazyStructWriter(lazyStructEncoder, currWrite.struct, currWrite.offset);
        currWrite = { struct: next, offset: 0 };
      }
    }
    if (currWrite !== null) {
      writeStructToLazyStructWriter(lazyStructEncoder, currWrite.struct, currWrite.offset);
      currWrite = null;
    }
    finishLazyStructWriting(lazyStructEncoder);
    const dss = updateDecoders.map((decoder) => readDeleteSet(decoder));
    const ds = mergeDeleteSets(dss);
    writeDeleteSet(updateEncoder, ds);
    return updateEncoder.toUint8Array();
  };
  var diffUpdateV2 = (update, sv, YDecoder = UpdateDecoderV2, YEncoder = UpdateEncoderV2) => {
    const state = decodeStateVector(sv);
    const encoder = new YEncoder();
    const lazyStructWriter = new LazyStructWriter(encoder);
    const decoder = new YDecoder(createDecoder(update));
    const reader = new LazyStructReader(decoder, false);
    while (reader.curr) {
      const curr = reader.curr;
      const currClient = curr.id.client;
      const svClock = state.get(currClient) || 0;
      if (reader.curr.constructor === Skip) {
        reader.next();
        continue;
      }
      if (curr.id.clock + curr.length > svClock) {
        writeStructToLazyStructWriter(lazyStructWriter, curr, max(svClock - curr.id.clock, 0));
        reader.next();
        while (reader.curr && reader.curr.id.client === currClient) {
          writeStructToLazyStructWriter(lazyStructWriter, reader.curr, 0);
          reader.next();
        }
      } else {
        while (reader.curr && reader.curr.id.client === currClient && reader.curr.id.clock + reader.curr.length <= svClock) {
          reader.next();
        }
      }
    }
    finishLazyStructWriting(lazyStructWriter);
    const ds = readDeleteSet(decoder);
    writeDeleteSet(encoder, ds);
    return encoder.toUint8Array();
  };
  var diffUpdate = (update, sv) => diffUpdateV2(update, sv, UpdateDecoderV1, UpdateEncoderV1);
  var flushLazyStructWriter = (lazyWriter) => {
    if (lazyWriter.written > 0) {
      lazyWriter.clientStructs.push({ written: lazyWriter.written, restEncoder: toUint8Array(lazyWriter.encoder.restEncoder) });
      lazyWriter.encoder.restEncoder = createEncoder();
      lazyWriter.written = 0;
    }
  };
  var writeStructToLazyStructWriter = (lazyWriter, struct, offset) => {
    if (lazyWriter.written > 0 && lazyWriter.currClient !== struct.id.client) {
      flushLazyStructWriter(lazyWriter);
    }
    if (lazyWriter.written === 0) {
      lazyWriter.currClient = struct.id.client;
      lazyWriter.encoder.writeClient(struct.id.client);
      writeVarUint(lazyWriter.encoder.restEncoder, struct.id.clock + offset);
    }
    struct.write(lazyWriter.encoder, offset);
    lazyWriter.written++;
  };
  var finishLazyStructWriting = (lazyWriter) => {
    flushLazyStructWriter(lazyWriter);
    const restEncoder = lazyWriter.encoder.restEncoder;
    writeVarUint(restEncoder, lazyWriter.clientStructs.length);
    for (let i = 0; i < lazyWriter.clientStructs.length; i++) {
      const partStructs = lazyWriter.clientStructs[i];
      writeVarUint(restEncoder, partStructs.written);
      writeUint8Array(restEncoder, partStructs.restEncoder);
    }
  };
  var convertUpdateFormat = (update, blockTransformer, YDecoder, YEncoder) => {
    const updateDecoder = new YDecoder(createDecoder(update));
    const lazyDecoder = new LazyStructReader(updateDecoder, false);
    const updateEncoder = new YEncoder();
    const lazyWriter = new LazyStructWriter(updateEncoder);
    for (let curr = lazyDecoder.curr; curr !== null; curr = lazyDecoder.next()) {
      writeStructToLazyStructWriter(lazyWriter, blockTransformer(curr), 0);
    }
    finishLazyStructWriting(lazyWriter);
    const ds = readDeleteSet(updateDecoder);
    writeDeleteSet(updateEncoder, ds);
    return updateEncoder.toUint8Array();
  };
  var createObfuscator = ({ formatting = true, subdocs = true, yxml = true } = {}) => {
    let i = 0;
    const mapKeyCache = create();
    const nodeNameCache = create();
    const formattingKeyCache = create();
    const formattingValueCache = create();
    formattingValueCache.set(null, null);
    return (block) => {
      switch (block.constructor) {
        case GC:
        case Skip:
          return block;
        case Item: {
          const item = (
            /** @type {Item} */
            block
          );
          const content = item.content;
          switch (content.constructor) {
            case ContentDeleted:
              break;
            case ContentType: {
              if (yxml) {
                const type = (
                  /** @type {ContentType} */
                  content.type
                );
                if (type instanceof YXmlElement) {
                  type.nodeName = setIfUndefined(nodeNameCache, type.nodeName, () => "node-" + i);
                }
                if (type instanceof YXmlHook) {
                  type.hookName = setIfUndefined(nodeNameCache, type.hookName, () => "hook-" + i);
                }
              }
              break;
            }
            case ContentAny: {
              const c = (
                /** @type {ContentAny} */
                content
              );
              c.arr = c.arr.map(() => i);
              break;
            }
            case ContentBinary: {
              const c = (
                /** @type {ContentBinary} */
                content
              );
              c.content = new Uint8Array([i]);
              break;
            }
            case ContentDoc: {
              const c = (
                /** @type {ContentDoc} */
                content
              );
              if (subdocs) {
                c.opts = {};
                c.doc.guid = i + "";
              }
              break;
            }
            case ContentEmbed: {
              const c = (
                /** @type {ContentEmbed} */
                content
              );
              c.embed = {};
              break;
            }
            case ContentFormat: {
              const c = (
                /** @type {ContentFormat} */
                content
              );
              if (formatting) {
                c.key = setIfUndefined(formattingKeyCache, c.key, () => i + "");
                c.value = setIfUndefined(formattingValueCache, c.value, () => ({ i }));
              }
              break;
            }
            case ContentJSON: {
              const c = (
                /** @type {ContentJSON} */
                content
              );
              c.arr = c.arr.map(() => i);
              break;
            }
            case ContentString: {
              const c = (
                /** @type {ContentString} */
                content
              );
              c.str = repeat(i % 10 + "", c.str.length);
              break;
            }
            default:
              unexpectedCase();
          }
          if (item.parentSub) {
            item.parentSub = setIfUndefined(mapKeyCache, item.parentSub, () => i + "");
          }
          i++;
          return block;
        }
        default:
          unexpectedCase();
      }
    };
  };
  var obfuscateUpdate = (update, opts) => convertUpdateFormat(update, createObfuscator(opts), UpdateDecoderV1, UpdateEncoderV1);
  var obfuscateUpdateV2 = (update, opts) => convertUpdateFormat(update, createObfuscator(opts), UpdateDecoderV2, UpdateEncoderV2);
  var convertUpdateFormatV1ToV2 = (update) => convertUpdateFormat(update, id, UpdateDecoderV1, UpdateEncoderV2);
  var convertUpdateFormatV2ToV1 = (update) => convertUpdateFormat(update, id, UpdateDecoderV2, UpdateEncoderV1);
  var errorComputeChanges = "You must not compute changes after the event-handler fired.";
  var YEvent = class {
    /**
     * @param {T} target The changed type.
     * @param {Transaction} transaction
     */
    constructor(target, transaction) {
      this.target = target;
      this.currentTarget = target;
      this.transaction = transaction;
      this._changes = null;
      this._keys = null;
      this._delta = null;
      this._path = null;
    }
    /**
     * Computes the path from `y` to the changed type.
     *
     * @todo v14 should standardize on path: Array<{parent, index}> because that is easier to work with.
     *
     * The following property holds:
     * @example
     *   let type = y
     *   event.path.forEach(dir => {
     *     type = type.get(dir)
     *   })
     *   type === event.target // => true
     */
    get path() {
      return this._path || (this._path = getPathTo(this.currentTarget, this.target));
    }
    /**
     * Check if a struct is deleted by this event.
     *
     * In contrast to change.deleted, this method also returns true if the struct was added and then deleted.
     *
     * @param {AbstractStruct} struct
     * @return {boolean}
     */
    deletes(struct) {
      return isDeleted(this.transaction.deleteSet, struct.id);
    }
    /**
     * @type {Map<string, { action: 'add' | 'update' | 'delete', oldValue: any }>}
     */
    get keys() {
      if (this._keys === null) {
        if (this.transaction.doc._transactionCleanups.length === 0) {
          throw create3(errorComputeChanges);
        }
        const keys2 = /* @__PURE__ */ new Map();
        const target = this.target;
        const changed = (
          /** @type Set<string|null> */
          this.transaction.changed.get(target)
        );
        changed.forEach((key) => {
          if (key !== null) {
            const item = (
              /** @type {Item} */
              target._map.get(key)
            );
            let action;
            let oldValue;
            if (this.adds(item)) {
              let prev = item.left;
              while (prev !== null && this.adds(prev)) {
                prev = prev.left;
              }
              if (this.deletes(item)) {
                if (prev !== null && this.deletes(prev)) {
                  action = "delete";
                  oldValue = last(prev.content.getContent());
                } else {
                  return;
                }
              } else {
                if (prev !== null && this.deletes(prev)) {
                  action = "update";
                  oldValue = last(prev.content.getContent());
                } else {
                  action = "add";
                  oldValue = void 0;
                }
              }
            } else {
              if (this.deletes(item)) {
                action = "delete";
                oldValue = last(
                  /** @type {Item} */
                  item.content.getContent()
                );
              } else {
                return;
              }
            }
            keys2.set(key, { action, oldValue });
          }
        });
        this._keys = keys2;
      }
      return this._keys;
    }
    /**
     * This is a computed property. Note that this can only be safely computed during the
     * event call. Computing this property after other changes happened might result in
     * unexpected behavior (incorrect computation of deltas). A safe way to collect changes
     * is to store the `changes` or the `delta` object. Avoid storing the `transaction` object.
     *
     * @type {Array<{insert?: string | Array<any> | object | AbstractType<any>, retain?: number, delete?: number, attributes?: Object<string, any>}>}
     */
    get delta() {
      return this.changes.delta;
    }
    /**
     * Check if a struct is added by this event.
     *
     * In contrast to change.deleted, this method also returns true if the struct was added and then deleted.
     *
     * @param {AbstractStruct} struct
     * @return {boolean}
     */
    adds(struct) {
      return struct.id.clock >= (this.transaction.beforeState.get(struct.id.client) || 0);
    }
    /**
     * This is a computed property. Note that this can only be safely computed during the
     * event call. Computing this property after other changes happened might result in
     * unexpected behavior (incorrect computation of deltas). A safe way to collect changes
     * is to store the `changes` or the `delta` object. Avoid storing the `transaction` object.
     *
     * @type {{added:Set<Item>,deleted:Set<Item>,keys:Map<string,{action:'add'|'update'|'delete',oldValue:any}>,delta:Array<{insert?:Array<any>|string, delete?:number, retain?:number}>}}
     */
    get changes() {
      let changes = this._changes;
      if (changes === null) {
        if (this.transaction.doc._transactionCleanups.length === 0) {
          throw create3(errorComputeChanges);
        }
        const target = this.target;
        const added = create2();
        const deleted = create2();
        const delta = [];
        changes = {
          added,
          deleted,
          delta,
          keys: this.keys
        };
        const changed = (
          /** @type Set<string|null> */
          this.transaction.changed.get(target)
        );
        if (changed.has(null)) {
          let lastOp = null;
          const packOp = () => {
            if (lastOp) {
              delta.push(lastOp);
            }
          };
          for (let item = target._start; item !== null; item = item.right) {
            if (item.deleted) {
              if (this.deletes(item) && !this.adds(item)) {
                if (lastOp === null || lastOp.delete === void 0) {
                  packOp();
                  lastOp = { delete: 0 };
                }
                lastOp.delete += item.length;
                deleted.add(item);
              }
            } else {
              if (this.adds(item)) {
                if (lastOp === null || lastOp.insert === void 0) {
                  packOp();
                  lastOp = { insert: [] };
                }
                lastOp.insert = lastOp.insert.concat(item.content.getContent());
                added.add(item);
              } else {
                if (lastOp === null || lastOp.retain === void 0) {
                  packOp();
                  lastOp = { retain: 0 };
                }
                lastOp.retain += item.length;
              }
            }
          }
          if (lastOp !== null && lastOp.retain === void 0) {
            packOp();
          }
        }
        this._changes = changes;
      }
      return (
        /** @type {any} */
        changes
      );
    }
  };
  var getPathTo = (parent, child) => {
    const path = [];
    while (child._item !== null && child !== parent) {
      if (child._item.parentSub !== null) {
        path.unshift(child._item.parentSub);
      } else {
        let i = 0;
        let c = (
          /** @type {AbstractType<any>} */
          child._item.parent._start
        );
        while (c !== child._item && c !== null) {
          if (!c.deleted && c.countable) {
            i += c.length;
          }
          c = c.right;
        }
        path.unshift(i);
      }
      child = /** @type {AbstractType<any>} */
      child._item.parent;
    }
    return path;
  };
  var warnPrematureAccess = () => {
    warn("Invalid access: Add Yjs type to a document before reading data.");
  };
  var maxSearchMarker = 80;
  var globalSearchMarkerTimestamp = 0;
  var ArraySearchMarker = class {
    /**
     * @param {Item} p
     * @param {number} index
     */
    constructor(p, index) {
      p.marker = true;
      this.p = p;
      this.index = index;
      this.timestamp = globalSearchMarkerTimestamp++;
    }
  };
  var refreshMarkerTimestamp = (marker) => {
    marker.timestamp = globalSearchMarkerTimestamp++;
  };
  var overwriteMarker = (marker, p, index) => {
    marker.p.marker = false;
    marker.p = p;
    p.marker = true;
    marker.index = index;
    marker.timestamp = globalSearchMarkerTimestamp++;
  };
  var markPosition = (searchMarker, p, index) => {
    if (searchMarker.length >= maxSearchMarker) {
      const marker = searchMarker.reduce((a, b) => a.timestamp < b.timestamp ? a : b);
      overwriteMarker(marker, p, index);
      return marker;
    } else {
      const pm = new ArraySearchMarker(p, index);
      searchMarker.push(pm);
      return pm;
    }
  };
  var findMarker = (yarray, index) => {
    if (yarray._start === null || index === 0 || yarray._searchMarker === null) {
      return null;
    }
    const marker = yarray._searchMarker.length === 0 ? null : yarray._searchMarker.reduce((a, b) => abs(index - a.index) < abs(index - b.index) ? a : b);
    let p = yarray._start;
    let pindex = 0;
    if (marker !== null) {
      p = marker.p;
      pindex = marker.index;
      refreshMarkerTimestamp(marker);
    }
    while (p.right !== null && pindex < index) {
      if (!p.deleted && p.countable) {
        if (index < pindex + p.length) {
          break;
        }
        pindex += p.length;
      }
      p = p.right;
    }
    while (p.left !== null && pindex > index) {
      p = p.left;
      if (!p.deleted && p.countable) {
        pindex -= p.length;
      }
    }
    while (p.left !== null && p.left.id.client === p.id.client && p.left.id.clock + p.left.length === p.id.clock) {
      p = p.left;
      if (!p.deleted && p.countable) {
        pindex -= p.length;
      }
    }
    if (marker !== null && abs(marker.index - pindex) < /** @type {YText|YArray<any>} */
    p.parent.length / maxSearchMarker) {
      overwriteMarker(marker, p, pindex);
      return marker;
    } else {
      return markPosition(yarray._searchMarker, p, pindex);
    }
  };
  var updateMarkerChanges = (searchMarker, index, len) => {
    for (let i = searchMarker.length - 1; i >= 0; i--) {
      const m = searchMarker[i];
      if (len > 0) {
        let p = m.p;
        p.marker = false;
        while (p && (p.deleted || !p.countable)) {
          p = p.left;
          if (p && !p.deleted && p.countable) {
            m.index -= p.length;
          }
        }
        if (p === null || p.marker === true) {
          searchMarker.splice(i, 1);
          continue;
        }
        m.p = p;
        p.marker = true;
      }
      if (index < m.index || len > 0 && index === m.index) {
        m.index = max(index, m.index + len);
      }
    }
  };
  var getTypeChildren = (t) => {
    t.doc ?? warnPrematureAccess();
    let s = t._start;
    const arr = [];
    while (s) {
      arr.push(s);
      s = s.right;
    }
    return arr;
  };
  var callTypeObservers = (type, transaction, event) => {
    const changedType = type;
    const changedParentTypes = transaction.changedParentTypes;
    while (true) {
      setIfUndefined(changedParentTypes, type, () => []).push(event);
      if (type._item === null) {
        break;
      }
      type = /** @type {AbstractType<any>} */
      type._item.parent;
    }
    callEventHandlerListeners(changedType._eH, event, transaction);
  };
  var AbstractType = class {
    constructor() {
      this._item = null;
      this._map = /* @__PURE__ */ new Map();
      this._start = null;
      this.doc = null;
      this._length = 0;
      this._eH = createEventHandler();
      this._dEH = createEventHandler();
      this._searchMarker = null;
    }
    /**
     * @return {AbstractType<any>|null}
     */
    get parent() {
      return this._item ? (
        /** @type {AbstractType<any>} */
        this._item.parent
      ) : null;
    }
    /**
     * Integrate this type into the Yjs instance.
     *
     * * Save this struct in the os
     * * This type is sent to other client
     * * Observer functions are fired
     *
     * @param {Doc} y The Yjs instance
     * @param {Item|null} item
     */
    _integrate(y, item) {
      this.doc = y;
      this._item = item;
    }
    /**
     * @return {AbstractType<EventType>}
     */
    _copy() {
      throw methodUnimplemented();
    }
    /**
     * Makes a copy of this data type that can be included somewhere else.
     *
     * Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
     *
     * @return {AbstractType<EventType>}
     */
    clone() {
      throw methodUnimplemented();
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} _encoder
     */
    _write(_encoder) {
    }
    /**
     * The first non-deleted item
     */
    get _first() {
      let n = this._start;
      while (n !== null && n.deleted) {
        n = n.right;
      }
      return n;
    }
    /**
     * Creates YEvent and calls all type observers.
     * Must be implemented by each type.
     *
     * @param {Transaction} transaction
     * @param {Set<null|string>} _parentSubs Keys changed on this type. `null` if list was modified.
     */
    _callObserver(transaction, _parentSubs) {
      if (!transaction.local && this._searchMarker) {
        this._searchMarker.length = 0;
      }
    }
    /**
     * Observe all events that are created on this type.
     *
     * @param {function(EventType, Transaction):void} f Observer function
     */
    observe(f) {
      addEventHandlerListener(this._eH, f);
    }
    /**
     * Observe all events that are created by this type and its children.
     *
     * @param {function(Array<YEvent<any>>,Transaction):void} f Observer function
     */
    observeDeep(f) {
      addEventHandlerListener(this._dEH, f);
    }
    /**
     * Unregister an observer function.
     *
     * @param {function(EventType,Transaction):void} f Observer function
     */
    unobserve(f) {
      removeEventHandlerListener(this._eH, f);
    }
    /**
     * Unregister an observer function.
     *
     * @param {function(Array<YEvent<any>>,Transaction):void} f Observer function
     */
    unobserveDeep(f) {
      removeEventHandlerListener(this._dEH, f);
    }
    /**
     * @abstract
     * @return {any}
     */
    toJSON() {
    }
  };
  var typeListSlice = (type, start, end) => {
    type.doc ?? warnPrematureAccess();
    if (start < 0) {
      start = type._length + start;
    }
    if (end < 0) {
      end = type._length + end;
    }
    let len = end - start;
    const cs = [];
    let n = type._start;
    while (n !== null && len > 0) {
      if (n.countable && !n.deleted) {
        const c = n.content.getContent();
        if (c.length <= start) {
          start -= c.length;
        } else {
          for (let i = start; i < c.length && len > 0; i++) {
            cs.push(c[i]);
            len--;
          }
          start = 0;
        }
      }
      n = n.right;
    }
    return cs;
  };
  var typeListToArray = (type) => {
    type.doc ?? warnPrematureAccess();
    const cs = [];
    let n = type._start;
    while (n !== null) {
      if (n.countable && !n.deleted) {
        const c = n.content.getContent();
        for (let i = 0; i < c.length; i++) {
          cs.push(c[i]);
        }
      }
      n = n.right;
    }
    return cs;
  };
  var typeListToArraySnapshot = (type, snapshot2) => {
    const cs = [];
    let n = type._start;
    while (n !== null) {
      if (n.countable && isVisible(n, snapshot2)) {
        const c = n.content.getContent();
        for (let i = 0; i < c.length; i++) {
          cs.push(c[i]);
        }
      }
      n = n.right;
    }
    return cs;
  };
  var typeListForEach = (type, f) => {
    let index = 0;
    let n = type._start;
    type.doc ?? warnPrematureAccess();
    while (n !== null) {
      if (n.countable && !n.deleted) {
        const c = n.content.getContent();
        for (let i = 0; i < c.length; i++) {
          f(c[i], index++, type);
        }
      }
      n = n.right;
    }
  };
  var typeListMap = (type, f) => {
    const result = [];
    typeListForEach(type, (c, i) => {
      result.push(f(c, i, type));
    });
    return result;
  };
  var typeListCreateIterator = (type) => {
    let n = type._start;
    let currentContent = null;
    let currentContentIndex = 0;
    return {
      [Symbol.iterator]() {
        return this;
      },
      next: () => {
        if (currentContent === null) {
          while (n !== null && n.deleted) {
            n = n.right;
          }
          if (n === null) {
            return {
              done: true,
              value: void 0
            };
          }
          currentContent = n.content.getContent();
          currentContentIndex = 0;
          n = n.right;
        }
        const value = currentContent[currentContentIndex++];
        if (currentContent.length <= currentContentIndex) {
          currentContent = null;
        }
        return {
          done: false,
          value
        };
      }
    };
  };
  var typeListGet = (type, index) => {
    type.doc ?? warnPrematureAccess();
    const marker = findMarker(type, index);
    let n = type._start;
    if (marker !== null) {
      n = marker.p;
      index -= marker.index;
    }
    for (; n !== null; n = n.right) {
      if (!n.deleted && n.countable) {
        if (index < n.length) {
          return n.content.getContent()[index];
        }
        index -= n.length;
      }
    }
  };
  var typeListInsertGenericsAfter = (transaction, parent, referenceItem, content) => {
    let left = referenceItem;
    const doc2 = transaction.doc;
    const ownClientId = doc2.clientID;
    const store = doc2.store;
    const right = referenceItem === null ? parent._start : referenceItem.right;
    let jsonContent = [];
    const packJsonContent = () => {
      if (jsonContent.length > 0) {
        left = new Item(createID(ownClientId, getState(store, ownClientId)), left, left && left.lastId, right, right && right.id, parent, null, new ContentAny(jsonContent));
        left.integrate(transaction, 0);
        jsonContent = [];
      }
    };
    content.forEach((c) => {
      if (c === null) {
        jsonContent.push(c);
      } else {
        switch (c.constructor) {
          case Number:
          case Object:
          case Boolean:
          case Array:
          case String:
            jsonContent.push(c);
            break;
          default:
            packJsonContent();
            switch (c.constructor) {
              case Uint8Array:
              case ArrayBuffer:
                left = new Item(createID(ownClientId, getState(store, ownClientId)), left, left && left.lastId, right, right && right.id, parent, null, new ContentBinary(new Uint8Array(
                  /** @type {Uint8Array} */
                  c
                )));
                left.integrate(transaction, 0);
                break;
              case Doc:
                left = new Item(createID(ownClientId, getState(store, ownClientId)), left, left && left.lastId, right, right && right.id, parent, null, new ContentDoc(
                  /** @type {Doc} */
                  c
                ));
                left.integrate(transaction, 0);
                break;
              default:
                if (c instanceof AbstractType) {
                  left = new Item(createID(ownClientId, getState(store, ownClientId)), left, left && left.lastId, right, right && right.id, parent, null, new ContentType(c));
                  left.integrate(transaction, 0);
                } else {
                  throw new Error("Unexpected content type in insert operation");
                }
            }
        }
      }
    });
    packJsonContent();
  };
  var lengthExceeded = () => create3("Length exceeded!");
  var typeListInsertGenerics = (transaction, parent, index, content) => {
    if (index > parent._length) {
      throw lengthExceeded();
    }
    if (index === 0) {
      if (parent._searchMarker) {
        updateMarkerChanges(parent._searchMarker, index, content.length);
      }
      return typeListInsertGenericsAfter(transaction, parent, null, content);
    }
    const startIndex = index;
    const marker = findMarker(parent, index);
    let n = parent._start;
    if (marker !== null) {
      n = marker.p;
      index -= marker.index;
      if (index === 0) {
        n = n.prev;
        index += n && n.countable && !n.deleted ? n.length : 0;
      }
    }
    for (; n !== null; n = n.right) {
      if (!n.deleted && n.countable) {
        if (index <= n.length) {
          if (index < n.length) {
            getItemCleanStart(transaction, createID(n.id.client, n.id.clock + index));
          }
          break;
        }
        index -= n.length;
      }
    }
    if (parent._searchMarker) {
      updateMarkerChanges(parent._searchMarker, startIndex, content.length);
    }
    return typeListInsertGenericsAfter(transaction, parent, n, content);
  };
  var typeListPushGenerics = (transaction, parent, content) => {
    const marker = (parent._searchMarker || []).reduce((maxMarker, currMarker) => currMarker.index > maxMarker.index ? currMarker : maxMarker, { index: 0, p: parent._start });
    let n = marker.p;
    if (n) {
      while (n.right) {
        n = n.right;
      }
    }
    return typeListInsertGenericsAfter(transaction, parent, n, content);
  };
  var typeListDelete = (transaction, parent, index, length3) => {
    if (length3 === 0) {
      return;
    }
    const startIndex = index;
    const startLength = length3;
    const marker = findMarker(parent, index);
    let n = parent._start;
    if (marker !== null) {
      n = marker.p;
      index -= marker.index;
    }
    for (; n !== null && index > 0; n = n.right) {
      if (!n.deleted && n.countable) {
        if (index < n.length) {
          getItemCleanStart(transaction, createID(n.id.client, n.id.clock + index));
        }
        index -= n.length;
      }
    }
    while (length3 > 0 && n !== null) {
      if (!n.deleted) {
        if (length3 < n.length) {
          getItemCleanStart(transaction, createID(n.id.client, n.id.clock + length3));
        }
        n.delete(transaction);
        length3 -= n.length;
      }
      n = n.right;
    }
    if (length3 > 0) {
      throw lengthExceeded();
    }
    if (parent._searchMarker) {
      updateMarkerChanges(
        parent._searchMarker,
        startIndex,
        -startLength + length3
        /* in case we remove the above exception */
      );
    }
  };
  var typeMapDelete = (transaction, parent, key) => {
    const c = parent._map.get(key);
    if (c !== void 0) {
      c.delete(transaction);
    }
  };
  var typeMapSet = (transaction, parent, key, value) => {
    const left = parent._map.get(key) || null;
    const doc2 = transaction.doc;
    const ownClientId = doc2.clientID;
    let content;
    if (value == null) {
      content = new ContentAny([value]);
    } else {
      switch (value.constructor) {
        case Number:
        case Object:
        case Boolean:
        case Array:
        case String:
        case Date:
        case BigInt:
          content = new ContentAny([value]);
          break;
        case Uint8Array:
          content = new ContentBinary(
            /** @type {Uint8Array} */
            value
          );
          break;
        case Doc:
          content = new ContentDoc(
            /** @type {Doc} */
            value
          );
          break;
        default:
          if (value instanceof AbstractType) {
            content = new ContentType(value);
          } else {
            throw new Error("Unexpected content type");
          }
      }
    }
    new Item(createID(ownClientId, getState(doc2.store, ownClientId)), left, left && left.lastId, null, null, parent, key, content).integrate(transaction, 0);
  };
  var typeMapGet = (parent, key) => {
    parent.doc ?? warnPrematureAccess();
    const val = parent._map.get(key);
    return val !== void 0 && !val.deleted ? val.content.getContent()[val.length - 1] : void 0;
  };
  var typeMapGetAll = (parent) => {
    const res = {};
    parent.doc ?? warnPrematureAccess();
    parent._map.forEach((value, key) => {
      if (!value.deleted) {
        res[key] = value.content.getContent()[value.length - 1];
      }
    });
    return res;
  };
  var typeMapHas = (parent, key) => {
    parent.doc ?? warnPrematureAccess();
    const val = parent._map.get(key);
    return val !== void 0 && !val.deleted;
  };
  var typeMapGetSnapshot = (parent, key, snapshot2) => {
    let v = parent._map.get(key) || null;
    while (v !== null && (!snapshot2.sv.has(v.id.client) || v.id.clock >= (snapshot2.sv.get(v.id.client) || 0))) {
      v = v.left;
    }
    return v !== null && isVisible(v, snapshot2) ? v.content.getContent()[v.length - 1] : void 0;
  };
  var typeMapGetAllSnapshot = (parent, snapshot2) => {
    const res = {};
    parent._map.forEach((value, key) => {
      let v = value;
      while (v !== null && (!snapshot2.sv.has(v.id.client) || v.id.clock >= (snapshot2.sv.get(v.id.client) || 0))) {
        v = v.left;
      }
      if (v !== null && isVisible(v, snapshot2)) {
        res[key] = v.content.getContent()[v.length - 1];
      }
    });
    return res;
  };
  var createMapIterator = (type) => {
    type.doc ?? warnPrematureAccess();
    return iteratorFilter(
      type._map.entries(),
      /** @param {any} entry */
      (entry) => !entry[1].deleted
    );
  };
  var YArrayEvent = class extends YEvent {
  };
  var YArray = class _YArray extends AbstractType {
    constructor() {
      super();
      this._prelimContent = [];
      this._searchMarker = [];
    }
    /**
     * Construct a new YArray containing the specified items.
     * @template {Object<string,any>|Array<any>|number|null|string|Uint8Array} T
     * @param {Array<T>} items
     * @return {YArray<T>}
     */
    static from(items) {
      const a = new _YArray();
      a.push(items);
      return a;
    }
    /**
     * Integrate this type into the Yjs instance.
     *
     * * Save this struct in the os
     * * This type is sent to other client
     * * Observer functions are fired
     *
     * @param {Doc} y The Yjs instance
     * @param {Item} item
     */
    _integrate(y, item) {
      super._integrate(y, item);
      this.insert(
        0,
        /** @type {Array<any>} */
        this._prelimContent
      );
      this._prelimContent = null;
    }
    /**
     * @return {YArray<T>}
     */
    _copy() {
      return new _YArray();
    }
    /**
     * Makes a copy of this data type that can be included somewhere else.
     *
     * Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
     *
     * @return {YArray<T>}
     */
    clone() {
      const arr = new _YArray();
      arr.insert(0, this.toArray().map(
        (el) => el instanceof AbstractType ? (
          /** @type {typeof el} */
          el.clone()
        ) : el
      ));
      return arr;
    }
    get length() {
      this.doc ?? warnPrematureAccess();
      return this._length;
    }
    /**
     * Creates YArrayEvent and calls observers.
     *
     * @param {Transaction} transaction
     * @param {Set<null|string>} parentSubs Keys changed on this type. `null` if list was modified.
     */
    _callObserver(transaction, parentSubs) {
      super._callObserver(transaction, parentSubs);
      callTypeObservers(this, transaction, new YArrayEvent(this, transaction));
    }
    /**
     * Inserts new content at an index.
     *
     * Important: This function expects an array of content. Not just a content
     * object. The reason for this "weirdness" is that inserting several elements
     * is very efficient when it is done as a single operation.
     *
     * @example
     *  // Insert character 'a' at position 0
     *  yarray.insert(0, ['a'])
     *  // Insert numbers 1, 2 at position 1
     *  yarray.insert(1, [1, 2])
     *
     * @param {number} index The index to insert content at.
     * @param {Array<T>} content The array of content
     */
    insert(index, content) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          typeListInsertGenerics(
            transaction,
            this,
            index,
            /** @type {any} */
            content
          );
        });
      } else {
        this._prelimContent.splice(index, 0, ...content);
      }
    }
    /**
     * Appends content to this YArray.
     *
     * @param {Array<T>} content Array of content to append.
     *
     * @todo Use the following implementation in all types.
     */
    push(content) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          typeListPushGenerics(
            transaction,
            this,
            /** @type {any} */
            content
          );
        });
      } else {
        this._prelimContent.push(...content);
      }
    }
    /**
     * Prepends content to this YArray.
     *
     * @param {Array<T>} content Array of content to prepend.
     */
    unshift(content) {
      this.insert(0, content);
    }
    /**
     * Deletes elements starting from an index.
     *
     * @param {number} index Index at which to start deleting elements
     * @param {number} length The number of elements to remove. Defaults to 1.
     */
    delete(index, length3 = 1) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          typeListDelete(transaction, this, index, length3);
        });
      } else {
        this._prelimContent.splice(index, length3);
      }
    }
    /**
     * Returns the i-th element from a YArray.
     *
     * @param {number} index The index of the element to return from the YArray
     * @return {T}
     */
    get(index) {
      return typeListGet(this, index);
    }
    /**
     * Transforms this YArray to a JavaScript Array.
     *
     * @return {Array<T>}
     */
    toArray() {
      return typeListToArray(this);
    }
    /**
     * Returns a portion of this YArray into a JavaScript Array selected
     * from start to end (end not included).
     *
     * @param {number} [start]
     * @param {number} [end]
     * @return {Array<T>}
     */
    slice(start = 0, end = this.length) {
      return typeListSlice(this, start, end);
    }
    /**
     * Transforms this Shared Type to a JSON object.
     *
     * @return {Array<any>}
     */
    toJSON() {
      return this.map((c) => c instanceof AbstractType ? c.toJSON() : c);
    }
    /**
     * Returns an Array with the result of calling a provided function on every
     * element of this YArray.
     *
     * @template M
     * @param {function(T,number,YArray<T>):M} f Function that produces an element of the new Array
     * @return {Array<M>} A new array with each element being the result of the
     *                 callback function
     */
    map(f) {
      return typeListMap(
        this,
        /** @type {any} */
        f
      );
    }
    /**
     * Executes a provided function once on every element of this YArray.
     *
     * @param {function(T,number,YArray<T>):void} f A function to execute on every element of this YArray.
     */
    forEach(f) {
      typeListForEach(this, f);
    }
    /**
     * @return {IterableIterator<T>}
     */
    [Symbol.iterator]() {
      return typeListCreateIterator(this);
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     */
    _write(encoder) {
      encoder.writeTypeRef(YArrayRefID);
    }
  };
  var readYArray = (_decoder) => new YArray();
  var YMapEvent = class extends YEvent {
    /**
     * @param {YMap<T>} ymap The YArray that changed.
     * @param {Transaction} transaction
     * @param {Set<any>} subs The keys that changed.
     */
    constructor(ymap, transaction, subs) {
      super(ymap, transaction);
      this.keysChanged = subs;
    }
  };
  var YMap = class _YMap extends AbstractType {
    /**
     *
     * @param {Iterable<readonly [string, any]>=} entries - an optional iterable to initialize the YMap
     */
    constructor(entries) {
      super();
      this._prelimContent = null;
      if (entries === void 0) {
        this._prelimContent = /* @__PURE__ */ new Map();
      } else {
        this._prelimContent = new Map(entries);
      }
    }
    /**
     * Integrate this type into the Yjs instance.
     *
     * * Save this struct in the os
     * * This type is sent to other client
     * * Observer functions are fired
     *
     * @param {Doc} y The Yjs instance
     * @param {Item} item
     */
    _integrate(y, item) {
      super._integrate(y, item);
      this._prelimContent.forEach((value, key) => {
        this.set(key, value);
      });
      this._prelimContent = null;
    }
    /**
     * @return {YMap<MapType>}
     */
    _copy() {
      return new _YMap();
    }
    /**
     * Makes a copy of this data type that can be included somewhere else.
     *
     * Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
     *
     * @return {YMap<MapType>}
     */
    clone() {
      const map2 = new _YMap();
      this.forEach((value, key) => {
        map2.set(key, value instanceof AbstractType ? (
          /** @type {typeof value} */
          value.clone()
        ) : value);
      });
      return map2;
    }
    /**
     * Creates YMapEvent and calls observers.
     *
     * @param {Transaction} transaction
     * @param {Set<null|string>} parentSubs Keys changed on this type. `null` if list was modified.
     */
    _callObserver(transaction, parentSubs) {
      callTypeObservers(this, transaction, new YMapEvent(this, transaction, parentSubs));
    }
    /**
     * Transforms this Shared Type to a JSON object.
     *
     * @return {Object<string,any>}
     */
    toJSON() {
      this.doc ?? warnPrematureAccess();
      const map2 = {};
      this._map.forEach((item, key) => {
        if (!item.deleted) {
          const v = item.content.getContent()[item.length - 1];
          map2[key] = v instanceof AbstractType ? v.toJSON() : v;
        }
      });
      return map2;
    }
    /**
     * Returns the size of the YMap (count of key/value pairs)
     *
     * @return {number}
     */
    get size() {
      return [...createMapIterator(this)].length;
    }
    /**
     * Returns the keys for each element in the YMap Type.
     *
     * @return {IterableIterator<string>}
     */
    keys() {
      return iteratorMap(
        createMapIterator(this),
        /** @param {any} v */
        (v) => v[0]
      );
    }
    /**
     * Returns the values for each element in the YMap Type.
     *
     * @return {IterableIterator<MapType>}
     */
    values() {
      return iteratorMap(
        createMapIterator(this),
        /** @param {any} v */
        (v) => v[1].content.getContent()[v[1].length - 1]
      );
    }
    /**
     * Returns an Iterator of [key, value] pairs
     *
     * @return {IterableIterator<[string, MapType]>}
     */
    entries() {
      return iteratorMap(
        createMapIterator(this),
        /** @param {any} v */
        (v) => (
          /** @type {any} */
          [v[0], v[1].content.getContent()[v[1].length - 1]]
        )
      );
    }
    /**
     * Executes a provided function on once on every key-value pair.
     *
     * @param {function(MapType,string,YMap<MapType>):void} f A function to execute on every element of this YArray.
     */
    forEach(f) {
      this.doc ?? warnPrematureAccess();
      this._map.forEach((item, key) => {
        if (!item.deleted) {
          f(item.content.getContent()[item.length - 1], key, this);
        }
      });
    }
    /**
     * Returns an Iterator of [key, value] pairs
     *
     * @return {IterableIterator<[string, MapType]>}
     */
    [Symbol.iterator]() {
      return this.entries();
    }
    /**
     * Remove a specified element from this YMap.
     *
     * @param {string} key The key of the element to remove.
     */
    delete(key) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          typeMapDelete(transaction, this, key);
        });
      } else {
        this._prelimContent.delete(key);
      }
    }
    /**
     * Adds or updates an element with a specified key and value.
     * @template {MapType} VAL
     *
     * @param {string} key The key of the element to add to this YMap
     * @param {VAL} value The value of the element to add
     * @return {VAL}
     */
    set(key, value) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          typeMapSet(
            transaction,
            this,
            key,
            /** @type {any} */
            value
          );
        });
      } else {
        this._prelimContent.set(key, value);
      }
      return value;
    }
    /**
     * Returns a specified element from this YMap.
     *
     * @param {string} key
     * @return {MapType|undefined}
     */
    get(key) {
      return (
        /** @type {any} */
        typeMapGet(this, key)
      );
    }
    /**
     * Returns a boolean indicating whether the specified key exists or not.
     *
     * @param {string} key The key to test.
     * @return {boolean}
     */
    has(key) {
      return typeMapHas(this, key);
    }
    /**
     * Removes all elements from this YMap.
     */
    clear() {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          this.forEach(function(_value, key, map2) {
            typeMapDelete(transaction, map2, key);
          });
        });
      } else {
        this._prelimContent.clear();
      }
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     */
    _write(encoder) {
      encoder.writeTypeRef(YMapRefID);
    }
  };
  var readYMap = (_decoder) => new YMap();
  var equalAttrs = (a, b) => a === b || typeof a === "object" && typeof b === "object" && a && b && equalFlat(a, b);
  var ItemTextListPosition = class {
    /**
     * @param {Item|null} left
     * @param {Item|null} right
     * @param {number} index
     * @param {Map<string,any>} currentAttributes
     */
    constructor(left, right, index, currentAttributes) {
      this.left = left;
      this.right = right;
      this.index = index;
      this.currentAttributes = currentAttributes;
    }
    /**
     * Only call this if you know that this.right is defined
     */
    forward() {
      if (this.right === null) {
        unexpectedCase();
      }
      switch (this.right.content.constructor) {
        case ContentFormat:
          if (!this.right.deleted) {
            updateCurrentAttributes(
              this.currentAttributes,
              /** @type {ContentFormat} */
              this.right.content
            );
          }
          break;
        default:
          if (!this.right.deleted) {
            this.index += this.right.length;
          }
          break;
      }
      this.left = this.right;
      this.right = this.right.right;
    }
  };
  var findNextPosition = (transaction, pos, count) => {
    while (pos.right !== null && count > 0) {
      switch (pos.right.content.constructor) {
        case ContentFormat:
          if (!pos.right.deleted) {
            updateCurrentAttributes(
              pos.currentAttributes,
              /** @type {ContentFormat} */
              pos.right.content
            );
          }
          break;
        default:
          if (!pos.right.deleted) {
            if (count < pos.right.length) {
              getItemCleanStart(transaction, createID(pos.right.id.client, pos.right.id.clock + count));
            }
            pos.index += pos.right.length;
            count -= pos.right.length;
          }
          break;
      }
      pos.left = pos.right;
      pos.right = pos.right.right;
    }
    return pos;
  };
  var findPosition = (transaction, parent, index, useSearchMarker) => {
    const currentAttributes = /* @__PURE__ */ new Map();
    const marker = useSearchMarker ? findMarker(parent, index) : null;
    if (marker) {
      const pos = new ItemTextListPosition(marker.p.left, marker.p, marker.index, currentAttributes);
      return findNextPosition(transaction, pos, index - marker.index);
    } else {
      const pos = new ItemTextListPosition(null, parent._start, 0, currentAttributes);
      return findNextPosition(transaction, pos, index);
    }
  };
  var insertNegatedAttributes = (transaction, parent, currPos, negatedAttributes) => {
    while (currPos.right !== null && (currPos.right.deleted === true || currPos.right.content.constructor === ContentFormat && equalAttrs(
      negatedAttributes.get(
        /** @type {ContentFormat} */
        currPos.right.content.key
      ),
      /** @type {ContentFormat} */
      currPos.right.content.value
    ))) {
      if (!currPos.right.deleted) {
        negatedAttributes.delete(
          /** @type {ContentFormat} */
          currPos.right.content.key
        );
      }
      currPos.forward();
    }
    const doc2 = transaction.doc;
    const ownClientId = doc2.clientID;
    negatedAttributes.forEach((val, key) => {
      const left = currPos.left;
      const right = currPos.right;
      const nextFormat = new Item(createID(ownClientId, getState(doc2.store, ownClientId)), left, left && left.lastId, right, right && right.id, parent, null, new ContentFormat(key, val));
      nextFormat.integrate(transaction, 0);
      currPos.right = nextFormat;
      currPos.forward();
    });
  };
  var updateCurrentAttributes = (currentAttributes, format) => {
    const { key, value } = format;
    if (value === null) {
      currentAttributes.delete(key);
    } else {
      currentAttributes.set(key, value);
    }
  };
  var minimizeAttributeChanges = (currPos, attributes) => {
    while (true) {
      if (currPos.right === null) {
        break;
      } else if (currPos.right.deleted || currPos.right.content.constructor === ContentFormat && equalAttrs(
        attributes[
          /** @type {ContentFormat} */
          currPos.right.content.key
        ] ?? null,
        /** @type {ContentFormat} */
        currPos.right.content.value
      )) ;
      else {
        break;
      }
      currPos.forward();
    }
  };
  var insertAttributes = (transaction, parent, currPos, attributes) => {
    const doc2 = transaction.doc;
    const ownClientId = doc2.clientID;
    const negatedAttributes = /* @__PURE__ */ new Map();
    for (const key in attributes) {
      const val = attributes[key];
      const currentVal = currPos.currentAttributes.get(key) ?? null;
      if (!equalAttrs(currentVal, val)) {
        negatedAttributes.set(key, currentVal);
        const { left, right } = currPos;
        currPos.right = new Item(createID(ownClientId, getState(doc2.store, ownClientId)), left, left && left.lastId, right, right && right.id, parent, null, new ContentFormat(key, val));
        currPos.right.integrate(transaction, 0);
        currPos.forward();
      }
    }
    return negatedAttributes;
  };
  var insertText = (transaction, parent, currPos, text2, attributes) => {
    currPos.currentAttributes.forEach((_val, key) => {
      if (attributes[key] === void 0) {
        attributes[key] = null;
      }
    });
    const doc2 = transaction.doc;
    const ownClientId = doc2.clientID;
    minimizeAttributeChanges(currPos, attributes);
    const negatedAttributes = insertAttributes(transaction, parent, currPos, attributes);
    const content = text2.constructor === String ? new ContentString(
      /** @type {string} */
      text2
    ) : text2 instanceof AbstractType ? new ContentType(text2) : new ContentEmbed(text2);
    let { left, right, index } = currPos;
    if (parent._searchMarker) {
      updateMarkerChanges(parent._searchMarker, currPos.index, content.getLength());
    }
    right = new Item(createID(ownClientId, getState(doc2.store, ownClientId)), left, left && left.lastId, right, right && right.id, parent, null, content);
    right.integrate(transaction, 0);
    currPos.right = right;
    currPos.index = index;
    currPos.forward();
    insertNegatedAttributes(transaction, parent, currPos, negatedAttributes);
  };
  var formatText = (transaction, parent, currPos, length3, attributes) => {
    const doc2 = transaction.doc;
    const ownClientId = doc2.clientID;
    minimizeAttributeChanges(currPos, attributes);
    const negatedAttributes = insertAttributes(transaction, parent, currPos, attributes);
    iterationLoop: while (currPos.right !== null && (length3 > 0 || negatedAttributes.size > 0 && (currPos.right.deleted || currPos.right.content.constructor === ContentFormat))) {
      if (!currPos.right.deleted) {
        switch (currPos.right.content.constructor) {
          case ContentFormat: {
            const { key, value } = (
              /** @type {ContentFormat} */
              currPos.right.content
            );
            const attr = attributes[key];
            if (attr !== void 0) {
              if (equalAttrs(attr, value)) {
                negatedAttributes.delete(key);
              } else {
                if (length3 === 0) {
                  break iterationLoop;
                }
                negatedAttributes.set(key, value);
              }
              currPos.right.delete(transaction);
            } else {
              currPos.currentAttributes.set(key, value);
            }
            break;
          }
          default:
            if (length3 < currPos.right.length) {
              getItemCleanStart(transaction, createID(currPos.right.id.client, currPos.right.id.clock + length3));
            }
            length3 -= currPos.right.length;
            break;
        }
      }
      currPos.forward();
    }
    if (length3 > 0) {
      let newlines = "";
      for (; length3 > 0; length3--) {
        newlines += "\n";
      }
      currPos.right = new Item(createID(ownClientId, getState(doc2.store, ownClientId)), currPos.left, currPos.left && currPos.left.lastId, currPos.right, currPos.right && currPos.right.id, parent, null, new ContentString(newlines));
      currPos.right.integrate(transaction, 0);
      currPos.forward();
    }
    insertNegatedAttributes(transaction, parent, currPos, negatedAttributes);
  };
  var cleanupFormattingGap = (transaction, start, curr, startAttributes, currAttributes) => {
    let end = start;
    const endFormats = create();
    while (end && (!end.countable || end.deleted)) {
      if (!end.deleted && end.content.constructor === ContentFormat) {
        const cf = (
          /** @type {ContentFormat} */
          end.content
        );
        endFormats.set(cf.key, cf);
      }
      end = end.right;
    }
    let cleanups = 0;
    let reachedCurr = false;
    while (start !== end) {
      if (curr === start) {
        reachedCurr = true;
      }
      if (!start.deleted) {
        const content = start.content;
        switch (content.constructor) {
          case ContentFormat: {
            const { key, value } = (
              /** @type {ContentFormat} */
              content
            );
            const startAttrValue = startAttributes.get(key) ?? null;
            if (endFormats.get(key) !== content || startAttrValue === value) {
              start.delete(transaction);
              cleanups++;
              if (!reachedCurr && (currAttributes.get(key) ?? null) === value && startAttrValue !== value) {
                if (startAttrValue === null) {
                  currAttributes.delete(key);
                } else {
                  currAttributes.set(key, startAttrValue);
                }
              }
            }
            if (!reachedCurr && !start.deleted) {
              updateCurrentAttributes(
                currAttributes,
                /** @type {ContentFormat} */
                content
              );
            }
            break;
          }
        }
      }
      start = /** @type {Item} */
      start.right;
    }
    return cleanups;
  };
  var cleanupContextlessFormattingGap = (transaction, item) => {
    while (item && item.right && (item.right.deleted || !item.right.countable)) {
      item = item.right;
    }
    const attrs = /* @__PURE__ */ new Set();
    while (item && (item.deleted || !item.countable)) {
      if (!item.deleted && item.content.constructor === ContentFormat) {
        const key = (
          /** @type {ContentFormat} */
          item.content.key
        );
        if (attrs.has(key)) {
          item.delete(transaction);
        } else {
          attrs.add(key);
        }
      }
      item = item.left;
    }
  };
  var cleanupYTextFormatting = (type) => {
    let res = 0;
    transact(
      /** @type {Doc} */
      type.doc,
      (transaction) => {
        let start = (
          /** @type {Item} */
          type._start
        );
        let end = type._start;
        let startAttributes = create();
        const currentAttributes = copy(startAttributes);
        while (end) {
          if (end.deleted === false) {
            switch (end.content.constructor) {
              case ContentFormat:
                updateCurrentAttributes(
                  currentAttributes,
                  /** @type {ContentFormat} */
                  end.content
                );
                break;
              default:
                res += cleanupFormattingGap(transaction, start, end, startAttributes, currentAttributes);
                startAttributes = copy(currentAttributes);
                start = end;
                break;
            }
          }
          end = end.right;
        }
      }
    );
    return res;
  };
  var cleanupYTextAfterTransaction = (transaction) => {
    const needFullCleanup = /* @__PURE__ */ new Set();
    const doc2 = transaction.doc;
    for (const [client, afterClock] of transaction.afterState.entries()) {
      const clock = transaction.beforeState.get(client) || 0;
      if (afterClock === clock) {
        continue;
      }
      iterateStructs(
        transaction,
        /** @type {Array<Item|GC>} */
        doc2.store.clients.get(client),
        clock,
        afterClock,
        (item) => {
          if (!item.deleted && /** @type {Item} */
          item.content.constructor === ContentFormat && item.constructor !== GC) {
            needFullCleanup.add(
              /** @type {any} */
              item.parent
            );
          }
        }
      );
    }
    transact(doc2, (t) => {
      iterateDeletedStructs(transaction, transaction.deleteSet, (item) => {
        if (item instanceof GC || !/** @type {YText} */
        item.parent._hasFormatting || needFullCleanup.has(
          /** @type {YText} */
          item.parent
        )) {
          return;
        }
        const parent = (
          /** @type {YText} */
          item.parent
        );
        if (item.content.constructor === ContentFormat) {
          needFullCleanup.add(parent);
        } else {
          cleanupContextlessFormattingGap(t, item);
        }
      });
      for (const yText of needFullCleanup) {
        cleanupYTextFormatting(yText);
      }
    });
  };
  var deleteText = (transaction, currPos, length3) => {
    const startLength = length3;
    const startAttrs = copy(currPos.currentAttributes);
    const start = currPos.right;
    while (length3 > 0 && currPos.right !== null) {
      if (currPos.right.deleted === false) {
        switch (currPos.right.content.constructor) {
          case ContentType:
          case ContentEmbed:
          case ContentString:
            if (length3 < currPos.right.length) {
              getItemCleanStart(transaction, createID(currPos.right.id.client, currPos.right.id.clock + length3));
            }
            length3 -= currPos.right.length;
            currPos.right.delete(transaction);
            break;
        }
      }
      currPos.forward();
    }
    if (start) {
      cleanupFormattingGap(transaction, start, currPos.right, startAttrs, currPos.currentAttributes);
    }
    const parent = (
      /** @type {AbstractType<any>} */
      /** @type {Item} */
      (currPos.left || currPos.right).parent
    );
    if (parent._searchMarker) {
      updateMarkerChanges(parent._searchMarker, currPos.index, -startLength + length3);
    }
    return currPos;
  };
  var YTextEvent = class extends YEvent {
    /**
     * @param {YText} ytext
     * @param {Transaction} transaction
     * @param {Set<any>} subs The keys that changed
     */
    constructor(ytext, transaction, subs) {
      super(ytext, transaction);
      this.childListChanged = false;
      this.keysChanged = /* @__PURE__ */ new Set();
      subs.forEach((sub) => {
        if (sub === null) {
          this.childListChanged = true;
        } else {
          this.keysChanged.add(sub);
        }
      });
    }
    /**
     * @type {{added:Set<Item>,deleted:Set<Item>,keys:Map<string,{action:'add'|'update'|'delete',oldValue:any}>,delta:Array<{insert?:Array<any>|string, delete?:number, retain?:number}>}}
     */
    get changes() {
      if (this._changes === null) {
        const changes = {
          keys: this.keys,
          delta: this.delta,
          added: /* @__PURE__ */ new Set(),
          deleted: /* @__PURE__ */ new Set()
        };
        this._changes = changes;
      }
      return (
        /** @type {any} */
        this._changes
      );
    }
    /**
     * Compute the changes in the delta format.
     * A {@link https://quilljs.com/docs/delta/|Quill Delta}) that represents the changes on the document.
     *
     * @type {Array<{insert?:string|object|AbstractType<any>, delete?:number, retain?:number, attributes?: Object<string,any>}>}
     *
     * @public
     */
    get delta() {
      if (this._delta === null) {
        const y = (
          /** @type {Doc} */
          this.target.doc
        );
        const delta = [];
        transact(y, (transaction) => {
          const currentAttributes = /* @__PURE__ */ new Map();
          const oldAttributes = /* @__PURE__ */ new Map();
          let item = this.target._start;
          let action = null;
          const attributes = {};
          let insert = "";
          let retain = 0;
          let deleteLen = 0;
          const addOp = () => {
            if (action !== null) {
              let op = null;
              switch (action) {
                case "delete":
                  if (deleteLen > 0) {
                    op = { delete: deleteLen };
                  }
                  deleteLen = 0;
                  break;
                case "insert":
                  if (typeof insert === "object" || insert.length > 0) {
                    op = { insert };
                    if (currentAttributes.size > 0) {
                      op.attributes = {};
                      currentAttributes.forEach((value, key) => {
                        if (value !== null) {
                          op.attributes[key] = value;
                        }
                      });
                    }
                  }
                  insert = "";
                  break;
                case "retain":
                  if (retain > 0) {
                    op = { retain };
                    if (!isEmpty(attributes)) {
                      op.attributes = assign({}, attributes);
                    }
                  }
                  retain = 0;
                  break;
              }
              if (op) delta.push(op);
              action = null;
            }
          };
          while (item !== null) {
            switch (item.content.constructor) {
              case ContentType:
              case ContentEmbed:
                if (this.adds(item)) {
                  if (!this.deletes(item)) {
                    addOp();
                    action = "insert";
                    insert = item.content.getContent()[0];
                    addOp();
                  }
                } else if (this.deletes(item)) {
                  if (action !== "delete") {
                    addOp();
                    action = "delete";
                  }
                  deleteLen += 1;
                } else if (!item.deleted) {
                  if (action !== "retain") {
                    addOp();
                    action = "retain";
                  }
                  retain += 1;
                }
                break;
              case ContentString:
                if (this.adds(item)) {
                  if (!this.deletes(item)) {
                    if (action !== "insert") {
                      addOp();
                      action = "insert";
                    }
                    insert += /** @type {ContentString} */
                    item.content.str;
                  }
                } else if (this.deletes(item)) {
                  if (action !== "delete") {
                    addOp();
                    action = "delete";
                  }
                  deleteLen += item.length;
                } else if (!item.deleted) {
                  if (action !== "retain") {
                    addOp();
                    action = "retain";
                  }
                  retain += item.length;
                }
                break;
              case ContentFormat: {
                const { key, value } = (
                  /** @type {ContentFormat} */
                  item.content
                );
                if (this.adds(item)) {
                  if (!this.deletes(item)) {
                    const curVal = currentAttributes.get(key) ?? null;
                    if (!equalAttrs(curVal, value)) {
                      if (action === "retain") {
                        addOp();
                      }
                      if (equalAttrs(value, oldAttributes.get(key) ?? null)) {
                        delete attributes[key];
                      } else {
                        attributes[key] = value;
                      }
                    } else if (value !== null) {
                      item.delete(transaction);
                    }
                  }
                } else if (this.deletes(item)) {
                  oldAttributes.set(key, value);
                  const curVal = currentAttributes.get(key) ?? null;
                  if (!equalAttrs(curVal, value)) {
                    if (action === "retain") {
                      addOp();
                    }
                    attributes[key] = curVal;
                  }
                } else if (!item.deleted) {
                  oldAttributes.set(key, value);
                  const attr = attributes[key];
                  if (attr !== void 0) {
                    if (!equalAttrs(attr, value)) {
                      if (action === "retain") {
                        addOp();
                      }
                      if (value === null) {
                        delete attributes[key];
                      } else {
                        attributes[key] = value;
                      }
                    } else if (attr !== null) {
                      item.delete(transaction);
                    }
                  }
                }
                if (!item.deleted) {
                  if (action === "insert") {
                    addOp();
                  }
                  updateCurrentAttributes(
                    currentAttributes,
                    /** @type {ContentFormat} */
                    item.content
                  );
                }
                break;
              }
            }
            item = item.right;
          }
          addOp();
          while (delta.length > 0) {
            const lastOp = delta[delta.length - 1];
            if (lastOp.retain !== void 0 && lastOp.attributes === void 0) {
              delta.pop();
            } else {
              break;
            }
          }
        });
        this._delta = delta;
      }
      return (
        /** @type {any} */
        this._delta
      );
    }
  };
  var YText = class _YText extends AbstractType {
    /**
     * @param {String} [string] The initial value of the YText.
     */
    constructor(string) {
      super();
      this._pending = string !== void 0 ? [() => this.insert(0, string)] : [];
      this._searchMarker = [];
      this._hasFormatting = false;
    }
    /**
     * Number of characters of this text type.
     *
     * @type {number}
     */
    get length() {
      this.doc ?? warnPrematureAccess();
      return this._length;
    }
    /**
     * @param {Doc} y
     * @param {Item} item
     */
    _integrate(y, item) {
      super._integrate(y, item);
      try {
        this._pending.forEach((f) => f());
      } catch (e) {
        console.error(e);
      }
      this._pending = null;
    }
    _copy() {
      return new _YText();
    }
    /**
     * Makes a copy of this data type that can be included somewhere else.
     *
     * Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
     *
     * @return {YText}
     */
    clone() {
      const text2 = new _YText();
      text2.applyDelta(this.toDelta());
      return text2;
    }
    /**
     * Creates YTextEvent and calls observers.
     *
     * @param {Transaction} transaction
     * @param {Set<null|string>} parentSubs Keys changed on this type. `null` if list was modified.
     */
    _callObserver(transaction, parentSubs) {
      super._callObserver(transaction, parentSubs);
      const event = new YTextEvent(this, transaction, parentSubs);
      callTypeObservers(this, transaction, event);
      if (!transaction.local && this._hasFormatting) {
        transaction._needFormattingCleanup = true;
      }
    }
    /**
     * Returns the unformatted string representation of this YText type.
     *
     * @public
     */
    toString() {
      this.doc ?? warnPrematureAccess();
      let str = "";
      let n = this._start;
      while (n !== null) {
        if (!n.deleted && n.countable && n.content.constructor === ContentString) {
          str += /** @type {ContentString} */
          n.content.str;
        }
        n = n.right;
      }
      return str;
    }
    /**
     * Returns the unformatted string representation of this YText type.
     *
     * @return {string}
     * @public
     */
    toJSON() {
      return this.toString();
    }
    /**
     * Apply a {@link Delta} on this shared YText type.
     *
     * @param {Array<any>} delta The changes to apply on this element.
     * @param {object}  opts
     * @param {boolean} [opts.sanitize] Sanitize input delta. Removes ending newlines if set to true.
     *
     *
     * @public
     */
    applyDelta(delta, { sanitize = true } = {}) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          const currPos = new ItemTextListPosition(null, this._start, 0, /* @__PURE__ */ new Map());
          for (let i = 0; i < delta.length; i++) {
            const op = delta[i];
            if (op.insert !== void 0) {
              const ins = !sanitize && typeof op.insert === "string" && i === delta.length - 1 && currPos.right === null && op.insert.slice(-1) === "\n" ? op.insert.slice(0, -1) : op.insert;
              if (typeof ins !== "string" || ins.length > 0) {
                insertText(transaction, this, currPos, ins, op.attributes || {});
              }
            } else if (op.retain !== void 0) {
              formatText(transaction, this, currPos, op.retain, op.attributes || {});
            } else if (op.delete !== void 0) {
              deleteText(transaction, currPos, op.delete);
            }
          }
        });
      } else {
        this._pending.push(() => this.applyDelta(delta));
      }
    }
    /**
     * Returns the Delta representation of this YText type.
     *
     * @param {Snapshot} [snapshot]
     * @param {Snapshot} [prevSnapshot]
     * @param {function('removed' | 'added', ID):any} [computeYChange]
     * @return {any} The Delta representation of this type.
     *
     * @public
     */
    toDelta(snapshot2, prevSnapshot, computeYChange) {
      this.doc ?? warnPrematureAccess();
      const ops = [];
      const currentAttributes = /* @__PURE__ */ new Map();
      const doc2 = (
        /** @type {Doc} */
        this.doc
      );
      let str = "";
      let n = this._start;
      function packStr() {
        if (str.length > 0) {
          const attributes = {};
          let addAttributes = false;
          currentAttributes.forEach((value, key) => {
            addAttributes = true;
            attributes[key] = value;
          });
          const op = { insert: str };
          if (addAttributes) {
            op.attributes = attributes;
          }
          ops.push(op);
          str = "";
        }
      }
      const computeDelta = () => {
        while (n !== null) {
          if (isVisible(n, snapshot2) || prevSnapshot !== void 0 && isVisible(n, prevSnapshot)) {
            switch (n.content.constructor) {
              case ContentString: {
                const cur = currentAttributes.get("ychange");
                if (snapshot2 !== void 0 && !isVisible(n, snapshot2)) {
                  if (cur === void 0 || cur.user !== n.id.client || cur.type !== "removed") {
                    packStr();
                    currentAttributes.set("ychange", computeYChange ? computeYChange("removed", n.id) : { type: "removed" });
                  }
                } else if (prevSnapshot !== void 0 && !isVisible(n, prevSnapshot)) {
                  if (cur === void 0 || cur.user !== n.id.client || cur.type !== "added") {
                    packStr();
                    currentAttributes.set("ychange", computeYChange ? computeYChange("added", n.id) : { type: "added" });
                  }
                } else if (cur !== void 0) {
                  packStr();
                  currentAttributes.delete("ychange");
                }
                str += /** @type {ContentString} */
                n.content.str;
                break;
              }
              case ContentType:
              case ContentEmbed: {
                packStr();
                const op = {
                  insert: n.content.getContent()[0]
                };
                if (currentAttributes.size > 0) {
                  const attrs = (
                    /** @type {Object<string,any>} */
                    {}
                  );
                  op.attributes = attrs;
                  currentAttributes.forEach((value, key) => {
                    attrs[key] = value;
                  });
                }
                ops.push(op);
                break;
              }
              case ContentFormat:
                if (isVisible(n, snapshot2)) {
                  packStr();
                  updateCurrentAttributes(
                    currentAttributes,
                    /** @type {ContentFormat} */
                    n.content
                  );
                }
                break;
            }
          }
          n = n.right;
        }
        packStr();
      };
      if (snapshot2 || prevSnapshot) {
        transact(doc2, (transaction) => {
          if (snapshot2) {
            splitSnapshotAffectedStructs(transaction, snapshot2);
          }
          if (prevSnapshot) {
            splitSnapshotAffectedStructs(transaction, prevSnapshot);
          }
          computeDelta();
        }, "cleanup");
      } else {
        computeDelta();
      }
      return ops;
    }
    /**
     * Insert text at a given index.
     *
     * @param {number} index The index at which to start inserting.
     * @param {String} text The text to insert at the specified position.
     * @param {TextAttributes} [attributes] Optionally define some formatting
     *                                    information to apply on the inserted
     *                                    Text.
     * @public
     */
    insert(index, text2, attributes) {
      if (text2.length <= 0) {
        return;
      }
      const y = this.doc;
      if (y !== null) {
        transact(y, (transaction) => {
          const pos = findPosition(transaction, this, index, !attributes);
          if (!attributes) {
            attributes = {};
            pos.currentAttributes.forEach((v, k) => {
              attributes[k] = v;
            });
          }
          insertText(transaction, this, pos, text2, attributes);
        });
      } else {
        this._pending.push(() => this.insert(index, text2, attributes));
      }
    }
    /**
     * Inserts an embed at a index.
     *
     * @param {number} index The index to insert the embed at.
     * @param {Object | AbstractType<any>} embed The Object that represents the embed.
     * @param {TextAttributes} [attributes] Attribute information to apply on the
     *                                    embed
     *
     * @public
     */
    insertEmbed(index, embed, attributes) {
      const y = this.doc;
      if (y !== null) {
        transact(y, (transaction) => {
          const pos = findPosition(transaction, this, index, !attributes);
          insertText(transaction, this, pos, embed, attributes || {});
        });
      } else {
        this._pending.push(() => this.insertEmbed(index, embed, attributes || {}));
      }
    }
    /**
     * Deletes text starting from an index.
     *
     * @param {number} index Index at which to start deleting.
     * @param {number} length The number of characters to remove. Defaults to 1.
     *
     * @public
     */
    delete(index, length3) {
      if (length3 === 0) {
        return;
      }
      const y = this.doc;
      if (y !== null) {
        transact(y, (transaction) => {
          deleteText(transaction, findPosition(transaction, this, index, true), length3);
        });
      } else {
        this._pending.push(() => this.delete(index, length3));
      }
    }
    /**
     * Assigns properties to a range of text.
     *
     * @param {number} index The position where to start formatting.
     * @param {number} length The amount of characters to assign properties to.
     * @param {TextAttributes} attributes Attribute information to apply on the
     *                                    text.
     *
     * @public
     */
    format(index, length3, attributes) {
      if (length3 === 0) {
        return;
      }
      const y = this.doc;
      if (y !== null) {
        transact(y, (transaction) => {
          const pos = findPosition(transaction, this, index, false);
          if (pos.right === null) {
            return;
          }
          formatText(transaction, this, pos, length3, attributes);
        });
      } else {
        this._pending.push(() => this.format(index, length3, attributes));
      }
    }
    /**
     * Removes an attribute.
     *
     * @note Xml-Text nodes don't have attributes. You can use this feature to assign properties to complete text-blocks.
     *
     * @param {String} attributeName The attribute name that is to be removed.
     *
     * @public
     */
    removeAttribute(attributeName) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          typeMapDelete(transaction, this, attributeName);
        });
      } else {
        this._pending.push(() => this.removeAttribute(attributeName));
      }
    }
    /**
     * Sets or updates an attribute.
     *
     * @note Xml-Text nodes don't have attributes. You can use this feature to assign properties to complete text-blocks.
     *
     * @param {String} attributeName The attribute name that is to be set.
     * @param {any} attributeValue The attribute value that is to be set.
     *
     * @public
     */
    setAttribute(attributeName, attributeValue) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          typeMapSet(transaction, this, attributeName, attributeValue);
        });
      } else {
        this._pending.push(() => this.setAttribute(attributeName, attributeValue));
      }
    }
    /**
     * Returns an attribute value that belongs to the attribute name.
     *
     * @note Xml-Text nodes don't have attributes. You can use this feature to assign properties to complete text-blocks.
     *
     * @param {String} attributeName The attribute name that identifies the
     *                               queried value.
     * @return {any} The queried attribute value.
     *
     * @public
     */
    getAttribute(attributeName) {
      return (
        /** @type {any} */
        typeMapGet(this, attributeName)
      );
    }
    /**
     * Returns all attribute name/value pairs in a JSON Object.
     *
     * @note Xml-Text nodes don't have attributes. You can use this feature to assign properties to complete text-blocks.
     *
     * @return {Object<string, any>} A JSON Object that describes the attributes.
     *
     * @public
     */
    getAttributes() {
      return typeMapGetAll(this);
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     */
    _write(encoder) {
      encoder.writeTypeRef(YTextRefID);
    }
  };
  var readYText = (_decoder) => new YText();
  var YXmlTreeWalker = class {
    /**
     * @param {YXmlFragment | YXmlElement} root
     * @param {function(AbstractType<any>):boolean} [f]
     */
    constructor(root, f = () => true) {
      this._filter = f;
      this._root = root;
      this._currentNode = /** @type {Item} */
      root._start;
      this._firstCall = true;
      root.doc ?? warnPrematureAccess();
    }
    [Symbol.iterator]() {
      return this;
    }
    /**
     * Get the next node.
     *
     * @return {IteratorResult<YXmlElement|YXmlText|YXmlHook>} The next node.
     *
     * @public
     */
    next() {
      let n = this._currentNode;
      let type = n && n.content && /** @type {any} */
      n.content.type;
      if (n !== null && (!this._firstCall || n.deleted || !this._filter(type))) {
        do {
          type = /** @type {any} */
          n.content.type;
          if (!n.deleted && (type.constructor === YXmlElement || type.constructor === YXmlFragment) && type._start !== null) {
            n = type._start;
          } else {
            while (n !== null) {
              const nxt = n.next;
              if (nxt !== null) {
                n = nxt;
                break;
              } else if (n.parent === this._root) {
                n = null;
              } else {
                n = /** @type {AbstractType<any>} */
                n.parent._item;
              }
            }
          }
        } while (n !== null && (n.deleted || !this._filter(
          /** @type {ContentType} */
          n.content.type
        )));
      }
      this._firstCall = false;
      if (n === null) {
        return { value: void 0, done: true };
      }
      this._currentNode = n;
      return { value: (
        /** @type {any} */
        n.content.type
      ), done: false };
    }
  };
  var YXmlFragment = class _YXmlFragment extends AbstractType {
    constructor() {
      super();
      this._prelimContent = [];
    }
    /**
     * @type {YXmlElement|YXmlText|null}
     */
    get firstChild() {
      const first = this._first;
      return first ? first.content.getContent()[0] : null;
    }
    /**
     * Integrate this type into the Yjs instance.
     *
     * * Save this struct in the os
     * * This type is sent to other client
     * * Observer functions are fired
     *
     * @param {Doc} y The Yjs instance
     * @param {Item} item
     */
    _integrate(y, item) {
      super._integrate(y, item);
      this.insert(
        0,
        /** @type {Array<any>} */
        this._prelimContent
      );
      this._prelimContent = null;
    }
    _copy() {
      return new _YXmlFragment();
    }
    /**
     * Makes a copy of this data type that can be included somewhere else.
     *
     * Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
     *
     * @return {YXmlFragment}
     */
    clone() {
      const el = new _YXmlFragment();
      el.insert(0, this.toArray().map((item) => item instanceof AbstractType ? item.clone() : item));
      return el;
    }
    get length() {
      this.doc ?? warnPrematureAccess();
      return this._prelimContent === null ? this._length : this._prelimContent.length;
    }
    /**
     * Create a subtree of childNodes.
     *
     * @example
     * const walker = elem.createTreeWalker(dom => dom.nodeName === 'div')
     * for (let node in walker) {
     *   // `node` is a div node
     *   nop(node)
     * }
     *
     * @param {function(AbstractType<any>):boolean} filter Function that is called on each child element and
     *                          returns a Boolean indicating whether the child
     *                          is to be included in the subtree.
     * @return {YXmlTreeWalker} A subtree and a position within it.
     *
     * @public
     */
    createTreeWalker(filter) {
      return new YXmlTreeWalker(this, filter);
    }
    /**
     * Returns the first YXmlElement that matches the query.
     * Similar to DOM's {@link querySelector}.
     *
     * Query support:
     *   - tagname
     * TODO:
     *   - id
     *   - attribute
     *
     * @param {CSS_Selector} query The query on the children.
     * @return {YXmlElement|YXmlText|YXmlHook|null} The first element that matches the query or null.
     *
     * @public
     */
    querySelector(query) {
      query = query.toUpperCase();
      const iterator = new YXmlTreeWalker(this, (element2) => element2.nodeName && element2.nodeName.toUpperCase() === query);
      const next = iterator.next();
      if (next.done) {
        return null;
      } else {
        return next.value;
      }
    }
    /**
     * Returns all YXmlElements that match the query.
     * Similar to Dom's {@link querySelectorAll}.
     *
     * @todo Does not yet support all queries. Currently only query by tagName.
     *
     * @param {CSS_Selector} query The query on the children
     * @return {Array<YXmlElement|YXmlText|YXmlHook|null>} The elements that match this query.
     *
     * @public
     */
    querySelectorAll(query) {
      query = query.toUpperCase();
      return from(new YXmlTreeWalker(this, (element2) => element2.nodeName && element2.nodeName.toUpperCase() === query));
    }
    /**
     * Creates YXmlEvent and calls observers.
     *
     * @param {Transaction} transaction
     * @param {Set<null|string>} parentSubs Keys changed on this type. `null` if list was modified.
     */
    _callObserver(transaction, parentSubs) {
      callTypeObservers(this, transaction, new YXmlEvent(this, parentSubs, transaction));
    }
    /**
     * Get the string representation of all the children of this YXmlFragment.
     *
     * @return {string} The string representation of all children.
     */
    toString() {
      return typeListMap(this, (xml) => xml.toString()).join("");
    }
    /**
     * @return {string}
     */
    toJSON() {
      return this.toString();
    }
    /**
     * Creates a Dom Element that mirrors this YXmlElement.
     *
     * @param {Document} [_document=document] The document object (you must define
     *                                        this when calling this method in
     *                                        nodejs)
     * @param {Object<string, any>} [hooks={}] Optional property to customize how hooks
     *                                             are presented in the DOM
     * @param {any} [binding] You should not set this property. This is
     *                               used if DomBinding wants to create a
     *                               association to the created DOM type.
     * @return {Node} The {@link https://developer.mozilla.org/en-US/docs/Web/API/Element|Dom Element}
     *
     * @public
     */
    toDOM(_document = document, hooks = {}, binding) {
      const fragment = _document.createDocumentFragment();
      if (binding !== void 0) {
        binding._createAssociation(fragment, this);
      }
      typeListForEach(this, (xmlType) => {
        fragment.insertBefore(xmlType.toDOM(_document, hooks, binding), null);
      });
      return fragment;
    }
    /**
     * Inserts new content at an index.
     *
     * @example
     *  // Insert character 'a' at position 0
     *  xml.insert(0, [new Y.XmlText('text')])
     *
     * @param {number} index The index to insert content at
     * @param {Array<YXmlElement|YXmlText>} content The array of content
     */
    insert(index, content) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          typeListInsertGenerics(transaction, this, index, content);
        });
      } else {
        this._prelimContent.splice(index, 0, ...content);
      }
    }
    /**
     * Inserts new content at an index.
     *
     * @example
     *  // Insert character 'a' at position 0
     *  xml.insert(0, [new Y.XmlText('text')])
     *
     * @param {null|Item|YXmlElement|YXmlText} ref The index to insert content at
     * @param {Array<YXmlElement|YXmlText>} content The array of content
     */
    insertAfter(ref, content) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          const refItem = ref && ref instanceof AbstractType ? ref._item : ref;
          typeListInsertGenericsAfter(transaction, this, refItem, content);
        });
      } else {
        const pc = (
          /** @type {Array<any>} */
          this._prelimContent
        );
        const index = ref === null ? 0 : pc.findIndex((el) => el === ref) + 1;
        if (index === 0 && ref !== null) {
          throw create3("Reference item not found");
        }
        pc.splice(index, 0, ...content);
      }
    }
    /**
     * Deletes elements starting from an index.
     *
     * @param {number} index Index at which to start deleting elements
     * @param {number} [length=1] The number of elements to remove. Defaults to 1.
     */
    delete(index, length3 = 1) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          typeListDelete(transaction, this, index, length3);
        });
      } else {
        this._prelimContent.splice(index, length3);
      }
    }
    /**
     * Transforms this YArray to a JavaScript Array.
     *
     * @return {Array<YXmlElement|YXmlText|YXmlHook>}
     */
    toArray() {
      return typeListToArray(this);
    }
    /**
     * Appends content to this YArray.
     *
     * @param {Array<YXmlElement|YXmlText>} content Array of content to append.
     */
    push(content) {
      this.insert(this.length, content);
    }
    /**
     * Prepends content to this YArray.
     *
     * @param {Array<YXmlElement|YXmlText>} content Array of content to prepend.
     */
    unshift(content) {
      this.insert(0, content);
    }
    /**
     * Returns the i-th element from a YArray.
     *
     * @param {number} index The index of the element to return from the YArray
     * @return {YXmlElement|YXmlText}
     */
    get(index) {
      return typeListGet(this, index);
    }
    /**
     * Returns a portion of this YXmlFragment into a JavaScript Array selected
     * from start to end (end not included).
     *
     * @param {number} [start]
     * @param {number} [end]
     * @return {Array<YXmlElement|YXmlText>}
     */
    slice(start = 0, end = this.length) {
      return typeListSlice(this, start, end);
    }
    /**
     * Executes a provided function on once on every child element.
     *
     * @param {function(YXmlElement|YXmlText,number, typeof self):void} f A function to execute on every element of this YArray.
     */
    forEach(f) {
      typeListForEach(this, f);
    }
    /**
     * Transform the properties of this type to binary and write it to an
     * BinaryEncoder.
     *
     * This is called when this Item is sent to a remote peer.
     *
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder The encoder to write data to.
     */
    _write(encoder) {
      encoder.writeTypeRef(YXmlFragmentRefID);
    }
  };
  var readYXmlFragment = (_decoder) => new YXmlFragment();
  var YXmlElement = class _YXmlElement extends YXmlFragment {
    constructor(nodeName = "UNDEFINED") {
      super();
      this.nodeName = nodeName;
      this._prelimAttrs = /* @__PURE__ */ new Map();
    }
    /**
     * @type {YXmlElement|YXmlText|null}
     */
    get nextSibling() {
      const n = this._item ? this._item.next : null;
      return n ? (
        /** @type {YXmlElement|YXmlText} */
        /** @type {ContentType} */
        n.content.type
      ) : null;
    }
    /**
     * @type {YXmlElement|YXmlText|null}
     */
    get prevSibling() {
      const n = this._item ? this._item.prev : null;
      return n ? (
        /** @type {YXmlElement|YXmlText} */
        /** @type {ContentType} */
        n.content.type
      ) : null;
    }
    /**
     * Integrate this type into the Yjs instance.
     *
     * * Save this struct in the os
     * * This type is sent to other client
     * * Observer functions are fired
     *
     * @param {Doc} y The Yjs instance
     * @param {Item} item
     */
    _integrate(y, item) {
      super._integrate(y, item);
      /** @type {Map<string, any>} */
      this._prelimAttrs.forEach((value, key) => {
        this.setAttribute(key, value);
      });
      this._prelimAttrs = null;
    }
    /**
     * Creates an Item with the same effect as this Item (without position effect)
     *
     * @return {YXmlElement}
     */
    _copy() {
      return new _YXmlElement(this.nodeName);
    }
    /**
     * Makes a copy of this data type that can be included somewhere else.
     *
     * Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
     *
     * @return {YXmlElement<KV>}
     */
    clone() {
      const el = new _YXmlElement(this.nodeName);
      const attrs = this.getAttributes();
      forEach(attrs, (value, key) => {
        el.setAttribute(
          key,
          /** @type {any} */
          value
        );
      });
      el.insert(0, this.toArray().map((v) => v instanceof AbstractType ? v.clone() : v));
      return el;
    }
    /**
     * Returns the XML serialization of this YXmlElement.
     * The attributes are ordered by attribute-name, so you can easily use this
     * method to compare YXmlElements
     *
     * @return {string} The string representation of this type.
     *
     * @public
     */
    toString() {
      const attrs = this.getAttributes();
      const stringBuilder = [];
      const keys2 = [];
      for (const key in attrs) {
        keys2.push(key);
      }
      keys2.sort();
      const keysLen = keys2.length;
      for (let i = 0; i < keysLen; i++) {
        const key = keys2[i];
        stringBuilder.push(key + '="' + attrs[key] + '"');
      }
      const nodeName = this.nodeName.toLocaleLowerCase();
      const attrsString = stringBuilder.length > 0 ? " " + stringBuilder.join(" ") : "";
      return `<${nodeName}${attrsString}>${super.toString()}</${nodeName}>`;
    }
    /**
     * Removes an attribute from this YXmlElement.
     *
     * @param {string} attributeName The attribute name that is to be removed.
     *
     * @public
     */
    removeAttribute(attributeName) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          typeMapDelete(transaction, this, attributeName);
        });
      } else {
        this._prelimAttrs.delete(attributeName);
      }
    }
    /**
     * Sets or updates an attribute.
     *
     * @template {keyof KV & string} KEY
     *
     * @param {KEY} attributeName The attribute name that is to be set.
     * @param {KV[KEY]} attributeValue The attribute value that is to be set.
     *
     * @public
     */
    setAttribute(attributeName, attributeValue) {
      if (this.doc !== null) {
        transact(this.doc, (transaction) => {
          typeMapSet(transaction, this, attributeName, attributeValue);
        });
      } else {
        this._prelimAttrs.set(attributeName, attributeValue);
      }
    }
    /**
     * Returns an attribute value that belongs to the attribute name.
     *
     * @template {keyof KV & string} KEY
     *
     * @param {KEY} attributeName The attribute name that identifies the
     *                               queried value.
     * @return {KV[KEY]|undefined} The queried attribute value.
     *
     * @public
     */
    getAttribute(attributeName) {
      return (
        /** @type {any} */
        typeMapGet(this, attributeName)
      );
    }
    /**
     * Returns whether an attribute exists
     *
     * @param {string} attributeName The attribute name to check for existence.
     * @return {boolean} whether the attribute exists.
     *
     * @public
     */
    hasAttribute(attributeName) {
      return (
        /** @type {any} */
        typeMapHas(this, attributeName)
      );
    }
    /**
     * Returns all attribute name/value pairs in a JSON Object.
     *
     * @param {Snapshot} [snapshot]
     * @return {{ [Key in Extract<keyof KV,string>]?: KV[Key]}} A JSON Object that describes the attributes.
     *
     * @public
     */
    getAttributes(snapshot2) {
      return (
        /** @type {any} */
        snapshot2 ? typeMapGetAllSnapshot(this, snapshot2) : typeMapGetAll(this)
      );
    }
    /**
     * Creates a Dom Element that mirrors this YXmlElement.
     *
     * @param {Document} [_document=document] The document object (you must define
     *                                        this when calling this method in
     *                                        nodejs)
     * @param {Object<string, any>} [hooks={}] Optional property to customize how hooks
     *                                             are presented in the DOM
     * @param {any} [binding] You should not set this property. This is
     *                               used if DomBinding wants to create a
     *                               association to the created DOM type.
     * @return {Node} The {@link https://developer.mozilla.org/en-US/docs/Web/API/Element|Dom Element}
     *
     * @public
     */
    toDOM(_document = document, hooks = {}, binding) {
      const dom = _document.createElement(this.nodeName);
      const attrs = this.getAttributes();
      for (const key in attrs) {
        const value = attrs[key];
        if (typeof value === "string") {
          dom.setAttribute(key, value);
        }
      }
      typeListForEach(this, (yxml) => {
        dom.appendChild(yxml.toDOM(_document, hooks, binding));
      });
      if (binding !== void 0) {
        binding._createAssociation(dom, this);
      }
      return dom;
    }
    /**
     * Transform the properties of this type to binary and write it to an
     * BinaryEncoder.
     *
     * This is called when this Item is sent to a remote peer.
     *
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder The encoder to write data to.
     */
    _write(encoder) {
      encoder.writeTypeRef(YXmlElementRefID);
      encoder.writeKey(this.nodeName);
    }
  };
  var readYXmlElement = (decoder) => new YXmlElement(decoder.readKey());
  var YXmlEvent = class extends YEvent {
    /**
     * @param {YXmlElement|YXmlText|YXmlFragment} target The target on which the event is created.
     * @param {Set<string|null>} subs The set of changed attributes. `null` is included if the
     *                   child list changed.
     * @param {Transaction} transaction The transaction instance with which the
     *                                  change was created.
     */
    constructor(target, subs, transaction) {
      super(target, transaction);
      this.childListChanged = false;
      this.attributesChanged = /* @__PURE__ */ new Set();
      subs.forEach((sub) => {
        if (sub === null) {
          this.childListChanged = true;
        } else {
          this.attributesChanged.add(sub);
        }
      });
    }
  };
  var YXmlHook = class _YXmlHook extends YMap {
    /**
     * @param {string} hookName nodeName of the Dom Node.
     */
    constructor(hookName) {
      super();
      this.hookName = hookName;
    }
    /**
     * Creates an Item with the same effect as this Item (without position effect)
     */
    _copy() {
      return new _YXmlHook(this.hookName);
    }
    /**
     * Makes a copy of this data type that can be included somewhere else.
     *
     * Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
     *
     * @return {YXmlHook}
     */
    clone() {
      const el = new _YXmlHook(this.hookName);
      this.forEach((value, key) => {
        el.set(key, value);
      });
      return el;
    }
    /**
     * Creates a Dom Element that mirrors this YXmlElement.
     *
     * @param {Document} [_document=document] The document object (you must define
     *                                        this when calling this method in
     *                                        nodejs)
     * @param {Object.<string, any>} [hooks] Optional property to customize how hooks
     *                                             are presented in the DOM
     * @param {any} [binding] You should not set this property. This is
     *                               used if DomBinding wants to create a
     *                               association to the created DOM type
     * @return {Element} The {@link https://developer.mozilla.org/en-US/docs/Web/API/Element|Dom Element}
     *
     * @public
     */
    toDOM(_document = document, hooks = {}, binding) {
      const hook = hooks[this.hookName];
      let dom;
      if (hook !== void 0) {
        dom = hook.createDom(this);
      } else {
        dom = document.createElement(this.hookName);
      }
      dom.setAttribute("data-yjs-hook", this.hookName);
      if (binding !== void 0) {
        binding._createAssociation(dom, this);
      }
      return dom;
    }
    /**
     * Transform the properties of this type to binary and write it to an
     * BinaryEncoder.
     *
     * This is called when this Item is sent to a remote peer.
     *
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder The encoder to write data to.
     */
    _write(encoder) {
      encoder.writeTypeRef(YXmlHookRefID);
      encoder.writeKey(this.hookName);
    }
  };
  var readYXmlHook = (decoder) => new YXmlHook(decoder.readKey());
  var YXmlText = class _YXmlText extends YText {
    /**
     * @type {YXmlElement|YXmlText|null}
     */
    get nextSibling() {
      const n = this._item ? this._item.next : null;
      return n ? (
        /** @type {YXmlElement|YXmlText} */
        /** @type {ContentType} */
        n.content.type
      ) : null;
    }
    /**
     * @type {YXmlElement|YXmlText|null}
     */
    get prevSibling() {
      const n = this._item ? this._item.prev : null;
      return n ? (
        /** @type {YXmlElement|YXmlText} */
        /** @type {ContentType} */
        n.content.type
      ) : null;
    }
    _copy() {
      return new _YXmlText();
    }
    /**
     * Makes a copy of this data type that can be included somewhere else.
     *
     * Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
     *
     * @return {YXmlText}
     */
    clone() {
      const text2 = new _YXmlText();
      text2.applyDelta(this.toDelta());
      return text2;
    }
    /**
     * Creates a Dom Element that mirrors this YXmlText.
     *
     * @param {Document} [_document=document] The document object (you must define
     *                                        this when calling this method in
     *                                        nodejs)
     * @param {Object<string, any>} [hooks] Optional property to customize how hooks
     *                                             are presented in the DOM
     * @param {any} [binding] You should not set this property. This is
     *                               used if DomBinding wants to create a
     *                               association to the created DOM type.
     * @return {Text} The {@link https://developer.mozilla.org/en-US/docs/Web/API/Element|Dom Element}
     *
     * @public
     */
    toDOM(_document = document, hooks, binding) {
      const dom = _document.createTextNode(this.toString());
      if (binding !== void 0) {
        binding._createAssociation(dom, this);
      }
      return dom;
    }
    toString() {
      return this.toDelta().map((delta) => {
        const nestedNodes = [];
        for (const nodeName in delta.attributes) {
          const attrs = [];
          for (const key in delta.attributes[nodeName]) {
            attrs.push({ key, value: delta.attributes[nodeName][key] });
          }
          attrs.sort((a, b) => a.key < b.key ? -1 : 1);
          nestedNodes.push({ nodeName, attrs });
        }
        nestedNodes.sort((a, b) => a.nodeName < b.nodeName ? -1 : 1);
        let str = "";
        for (let i = 0; i < nestedNodes.length; i++) {
          const node = nestedNodes[i];
          str += `<${node.nodeName}`;
          for (let j = 0; j < node.attrs.length; j++) {
            const attr = node.attrs[j];
            str += ` ${attr.key}="${attr.value}"`;
          }
          str += ">";
        }
        str += delta.insert;
        for (let i = nestedNodes.length - 1; i >= 0; i--) {
          str += `</${nestedNodes[i].nodeName}>`;
        }
        return str;
      }).join("");
    }
    /**
     * @return {string}
     */
    toJSON() {
      return this.toString();
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     */
    _write(encoder) {
      encoder.writeTypeRef(YXmlTextRefID);
    }
  };
  var readYXmlText = (decoder) => new YXmlText();
  var AbstractStruct = class {
    /**
     * @param {ID} id
     * @param {number} length
     */
    constructor(id2, length3) {
      this.id = id2;
      this.length = length3;
    }
    /**
     * @type {boolean}
     */
    get deleted() {
      throw methodUnimplemented();
    }
    /**
     * Merge this struct with the item to the right.
     * This method is already assuming that `this.id.clock + this.length === this.id.clock`.
     * Also this method does *not* remove right from StructStore!
     * @param {AbstractStruct} right
     * @return {boolean} whether this merged with right
     */
    mergeWith(right) {
      return false;
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder The encoder to write data to.
     * @param {number} offset
     * @param {number} encodingRef
     */
    write(encoder, offset, encodingRef) {
      throw methodUnimplemented();
    }
    /**
     * @param {Transaction} transaction
     * @param {number} offset
     */
    integrate(transaction, offset) {
      throw methodUnimplemented();
    }
  };
  var structGCRefNumber = 0;
  var GC = class extends AbstractStruct {
    get deleted() {
      return true;
    }
    delete() {
    }
    /**
     * @param {GC} right
     * @return {boolean}
     */
    mergeWith(right) {
      if (this.constructor !== right.constructor) {
        return false;
      }
      this.length += right.length;
      return true;
    }
    /**
     * @param {Transaction} transaction
     * @param {number} offset
     */
    integrate(transaction, offset) {
      if (offset > 0) {
        this.id.clock += offset;
        this.length -= offset;
      }
      addStruct(transaction.doc.store, this);
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     * @param {number} offset
     */
    write(encoder, offset) {
      encoder.writeInfo(structGCRefNumber);
      encoder.writeLen(this.length - offset);
    }
    /**
     * @param {Transaction} transaction
     * @param {StructStore} store
     * @return {null | number}
     */
    getMissing(transaction, store) {
      return null;
    }
  };
  var ContentBinary = class _ContentBinary {
    /**
     * @param {Uint8Array} content
     */
    constructor(content) {
      this.content = content;
    }
    /**
     * @return {number}
     */
    getLength() {
      return 1;
    }
    /**
     * @return {Array<any>}
     */
    getContent() {
      return [this.content];
    }
    /**
     * @return {boolean}
     */
    isCountable() {
      return true;
    }
    /**
     * @return {ContentBinary}
     */
    copy() {
      return new _ContentBinary(this.content);
    }
    /**
     * @param {number} offset
     * @return {ContentBinary}
     */
    splice(offset) {
      throw methodUnimplemented();
    }
    /**
     * @param {ContentBinary} right
     * @return {boolean}
     */
    mergeWith(right) {
      return false;
    }
    /**
     * @param {Transaction} transaction
     * @param {Item} item
     */
    integrate(transaction, item) {
    }
    /**
     * @param {Transaction} transaction
     */
    delete(transaction) {
    }
    /**
     * @param {StructStore} store
     */
    gc(store) {
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     * @param {number} offset
     */
    write(encoder, offset) {
      encoder.writeBuf(this.content);
    }
    /**
     * @return {number}
     */
    getRef() {
      return 3;
    }
  };
  var readContentBinary = (decoder) => new ContentBinary(decoder.readBuf());
  var ContentDeleted = class _ContentDeleted {
    /**
     * @param {number} len
     */
    constructor(len) {
      this.len = len;
    }
    /**
     * @return {number}
     */
    getLength() {
      return this.len;
    }
    /**
     * @return {Array<any>}
     */
    getContent() {
      return [];
    }
    /**
     * @return {boolean}
     */
    isCountable() {
      return false;
    }
    /**
     * @return {ContentDeleted}
     */
    copy() {
      return new _ContentDeleted(this.len);
    }
    /**
     * @param {number} offset
     * @return {ContentDeleted}
     */
    splice(offset) {
      const right = new _ContentDeleted(this.len - offset);
      this.len = offset;
      return right;
    }
    /**
     * @param {ContentDeleted} right
     * @return {boolean}
     */
    mergeWith(right) {
      this.len += right.len;
      return true;
    }
    /**
     * @param {Transaction} transaction
     * @param {Item} item
     */
    integrate(transaction, item) {
      addToDeleteSet(transaction.deleteSet, item.id.client, item.id.clock, this.len);
      item.markDeleted();
    }
    /**
     * @param {Transaction} transaction
     */
    delete(transaction) {
    }
    /**
     * @param {StructStore} store
     */
    gc(store) {
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     * @param {number} offset
     */
    write(encoder, offset) {
      encoder.writeLen(this.len - offset);
    }
    /**
     * @return {number}
     */
    getRef() {
      return 1;
    }
  };
  var readContentDeleted = (decoder) => new ContentDeleted(decoder.readLen());
  var createDocFromOpts = (guid, opts) => new Doc({ guid, ...opts, shouldLoad: opts.shouldLoad || opts.autoLoad || false });
  var ContentDoc = class _ContentDoc {
    /**
     * @param {Doc} doc
     */
    constructor(doc2) {
      if (doc2._item) {
        console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid.");
      }
      this.doc = doc2;
      const opts = {};
      this.opts = opts;
      if (!doc2.gc) {
        opts.gc = false;
      }
      if (doc2.autoLoad) {
        opts.autoLoad = true;
      }
      if (doc2.meta !== null) {
        opts.meta = doc2.meta;
      }
    }
    /**
     * @return {number}
     */
    getLength() {
      return 1;
    }
    /**
     * @return {Array<any>}
     */
    getContent() {
      return [this.doc];
    }
    /**
     * @return {boolean}
     */
    isCountable() {
      return true;
    }
    /**
     * @return {ContentDoc}
     */
    copy() {
      return new _ContentDoc(createDocFromOpts(this.doc.guid, this.opts));
    }
    /**
     * @param {number} offset
     * @return {ContentDoc}
     */
    splice(offset) {
      throw methodUnimplemented();
    }
    /**
     * @param {ContentDoc} right
     * @return {boolean}
     */
    mergeWith(right) {
      return false;
    }
    /**
     * @param {Transaction} transaction
     * @param {Item} item
     */
    integrate(transaction, item) {
      this.doc._item = item;
      transaction.subdocsAdded.add(this.doc);
      if (this.doc.shouldLoad) {
        transaction.subdocsLoaded.add(this.doc);
      }
    }
    /**
     * @param {Transaction} transaction
     */
    delete(transaction) {
      if (transaction.subdocsAdded.has(this.doc)) {
        transaction.subdocsAdded.delete(this.doc);
      } else {
        transaction.subdocsRemoved.add(this.doc);
      }
    }
    /**
     * @param {StructStore} store
     */
    gc(store) {
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     * @param {number} offset
     */
    write(encoder, offset) {
      encoder.writeString(this.doc.guid);
      encoder.writeAny(this.opts);
    }
    /**
     * @return {number}
     */
    getRef() {
      return 9;
    }
  };
  var readContentDoc = (decoder) => new ContentDoc(createDocFromOpts(decoder.readString(), decoder.readAny()));
  var ContentEmbed = class _ContentEmbed {
    /**
     * @param {Object} embed
     */
    constructor(embed) {
      this.embed = embed;
    }
    /**
     * @return {number}
     */
    getLength() {
      return 1;
    }
    /**
     * @return {Array<any>}
     */
    getContent() {
      return [this.embed];
    }
    /**
     * @return {boolean}
     */
    isCountable() {
      return true;
    }
    /**
     * @return {ContentEmbed}
     */
    copy() {
      return new _ContentEmbed(this.embed);
    }
    /**
     * @param {number} offset
     * @return {ContentEmbed}
     */
    splice(offset) {
      throw methodUnimplemented();
    }
    /**
     * @param {ContentEmbed} right
     * @return {boolean}
     */
    mergeWith(right) {
      return false;
    }
    /**
     * @param {Transaction} transaction
     * @param {Item} item
     */
    integrate(transaction, item) {
    }
    /**
     * @param {Transaction} transaction
     */
    delete(transaction) {
    }
    /**
     * @param {StructStore} store
     */
    gc(store) {
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     * @param {number} offset
     */
    write(encoder, offset) {
      encoder.writeJSON(this.embed);
    }
    /**
     * @return {number}
     */
    getRef() {
      return 5;
    }
  };
  var readContentEmbed = (decoder) => new ContentEmbed(decoder.readJSON());
  var ContentFormat = class _ContentFormat {
    /**
     * @param {string} key
     * @param {Object} value
     */
    constructor(key, value) {
      this.key = key;
      this.value = value;
    }
    /**
     * @return {number}
     */
    getLength() {
      return 1;
    }
    /**
     * @return {Array<any>}
     */
    getContent() {
      return [];
    }
    /**
     * @return {boolean}
     */
    isCountable() {
      return false;
    }
    /**
     * @return {ContentFormat}
     */
    copy() {
      return new _ContentFormat(this.key, this.value);
    }
    /**
     * @param {number} _offset
     * @return {ContentFormat}
     */
    splice(_offset) {
      throw methodUnimplemented();
    }
    /**
     * @param {ContentFormat} _right
     * @return {boolean}
     */
    mergeWith(_right) {
      return false;
    }
    /**
     * @param {Transaction} _transaction
     * @param {Item} item
     */
    integrate(_transaction, item) {
      const p = (
        /** @type {YText} */
        item.parent
      );
      p._searchMarker = null;
      p._hasFormatting = true;
    }
    /**
     * @param {Transaction} transaction
     */
    delete(transaction) {
    }
    /**
     * @param {StructStore} store
     */
    gc(store) {
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     * @param {number} offset
     */
    write(encoder, offset) {
      encoder.writeKey(this.key);
      encoder.writeJSON(this.value);
    }
    /**
     * @return {number}
     */
    getRef() {
      return 6;
    }
  };
  var readContentFormat = (decoder) => new ContentFormat(decoder.readKey(), decoder.readJSON());
  var ContentJSON = class _ContentJSON {
    /**
     * @param {Array<any>} arr
     */
    constructor(arr) {
      this.arr = arr;
    }
    /**
     * @return {number}
     */
    getLength() {
      return this.arr.length;
    }
    /**
     * @return {Array<any>}
     */
    getContent() {
      return this.arr;
    }
    /**
     * @return {boolean}
     */
    isCountable() {
      return true;
    }
    /**
     * @return {ContentJSON}
     */
    copy() {
      return new _ContentJSON(this.arr);
    }
    /**
     * @param {number} offset
     * @return {ContentJSON}
     */
    splice(offset) {
      const right = new _ContentJSON(this.arr.slice(offset));
      this.arr = this.arr.slice(0, offset);
      return right;
    }
    /**
     * @param {ContentJSON} right
     * @return {boolean}
     */
    mergeWith(right) {
      this.arr = this.arr.concat(right.arr);
      return true;
    }
    /**
     * @param {Transaction} transaction
     * @param {Item} item
     */
    integrate(transaction, item) {
    }
    /**
     * @param {Transaction} transaction
     */
    delete(transaction) {
    }
    /**
     * @param {StructStore} store
     */
    gc(store) {
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     * @param {number} offset
     */
    write(encoder, offset) {
      const len = this.arr.length;
      encoder.writeLen(len - offset);
      for (let i = offset; i < len; i++) {
        const c = this.arr[i];
        encoder.writeString(c === void 0 ? "undefined" : JSON.stringify(c));
      }
    }
    /**
     * @return {number}
     */
    getRef() {
      return 2;
    }
  };
  var readContentJSON = (decoder) => {
    const len = decoder.readLen();
    const cs = [];
    for (let i = 0; i < len; i++) {
      const c = decoder.readString();
      if (c === "undefined") {
        cs.push(void 0);
      } else {
        cs.push(JSON.parse(c));
      }
    }
    return new ContentJSON(cs);
  };
  var isDevMode = getVariable("node_env") === "development";
  var ContentAny = class _ContentAny {
    /**
     * @param {Array<any>} arr
     */
    constructor(arr) {
      this.arr = arr;
      isDevMode && deepFreeze(arr);
    }
    /**
     * @return {number}
     */
    getLength() {
      return this.arr.length;
    }
    /**
     * @return {Array<any>}
     */
    getContent() {
      return this.arr;
    }
    /**
     * @return {boolean}
     */
    isCountable() {
      return true;
    }
    /**
     * @return {ContentAny}
     */
    copy() {
      return new _ContentAny(this.arr);
    }
    /**
     * @param {number} offset
     * @return {ContentAny}
     */
    splice(offset) {
      const right = new _ContentAny(this.arr.slice(offset));
      this.arr = this.arr.slice(0, offset);
      return right;
    }
    /**
     * @param {ContentAny} right
     * @return {boolean}
     */
    mergeWith(right) {
      this.arr = this.arr.concat(right.arr);
      return true;
    }
    /**
     * @param {Transaction} transaction
     * @param {Item} item
     */
    integrate(transaction, item) {
    }
    /**
     * @param {Transaction} transaction
     */
    delete(transaction) {
    }
    /**
     * @param {StructStore} store
     */
    gc(store) {
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     * @param {number} offset
     */
    write(encoder, offset) {
      const len = this.arr.length;
      encoder.writeLen(len - offset);
      for (let i = offset; i < len; i++) {
        const c = this.arr[i];
        encoder.writeAny(c);
      }
    }
    /**
     * @return {number}
     */
    getRef() {
      return 8;
    }
  };
  var readContentAny = (decoder) => {
    const len = decoder.readLen();
    const cs = [];
    for (let i = 0; i < len; i++) {
      cs.push(decoder.readAny());
    }
    return new ContentAny(cs);
  };
  var ContentString = class _ContentString {
    /**
     * @param {string} str
     */
    constructor(str) {
      this.str = str;
    }
    /**
     * @return {number}
     */
    getLength() {
      return this.str.length;
    }
    /**
     * @return {Array<any>}
     */
    getContent() {
      return this.str.split("");
    }
    /**
     * @return {boolean}
     */
    isCountable() {
      return true;
    }
    /**
     * @return {ContentString}
     */
    copy() {
      return new _ContentString(this.str);
    }
    /**
     * @param {number} offset
     * @return {ContentString}
     */
    splice(offset) {
      const right = new _ContentString(this.str.slice(offset));
      this.str = this.str.slice(0, offset);
      const firstCharCode = this.str.charCodeAt(offset - 1);
      if (firstCharCode >= 55296 && firstCharCode <= 56319) {
        this.str = this.str.slice(0, offset - 1) + "\uFFFD";
        right.str = "\uFFFD" + right.str.slice(1);
      }
      return right;
    }
    /**
     * @param {ContentString} right
     * @return {boolean}
     */
    mergeWith(right) {
      this.str += right.str;
      return true;
    }
    /**
     * @param {Transaction} transaction
     * @param {Item} item
     */
    integrate(transaction, item) {
    }
    /**
     * @param {Transaction} transaction
     */
    delete(transaction) {
    }
    /**
     * @param {StructStore} store
     */
    gc(store) {
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     * @param {number} offset
     */
    write(encoder, offset) {
      encoder.writeString(offset === 0 ? this.str : this.str.slice(offset));
    }
    /**
     * @return {number}
     */
    getRef() {
      return 4;
    }
  };
  var readContentString = (decoder) => new ContentString(decoder.readString());
  var typeRefs = [
    readYArray,
    readYMap,
    readYText,
    readYXmlElement,
    readYXmlFragment,
    readYXmlHook,
    readYXmlText
  ];
  var YArrayRefID = 0;
  var YMapRefID = 1;
  var YTextRefID = 2;
  var YXmlElementRefID = 3;
  var YXmlFragmentRefID = 4;
  var YXmlHookRefID = 5;
  var YXmlTextRefID = 6;
  var ContentType = class _ContentType {
    /**
     * @param {AbstractType<any>} type
     */
    constructor(type) {
      this.type = type;
    }
    /**
     * @return {number}
     */
    getLength() {
      return 1;
    }
    /**
     * @return {Array<any>}
     */
    getContent() {
      return [this.type];
    }
    /**
     * @return {boolean}
     */
    isCountable() {
      return true;
    }
    /**
     * @return {ContentType}
     */
    copy() {
      return new _ContentType(this.type._copy());
    }
    /**
     * @param {number} offset
     * @return {ContentType}
     */
    splice(offset) {
      throw methodUnimplemented();
    }
    /**
     * @param {ContentType} right
     * @return {boolean}
     */
    mergeWith(right) {
      return false;
    }
    /**
     * @param {Transaction} transaction
     * @param {Item} item
     */
    integrate(transaction, item) {
      this.type._integrate(transaction.doc, item);
    }
    /**
     * @param {Transaction} transaction
     */
    delete(transaction) {
      let item = this.type._start;
      while (item !== null) {
        if (!item.deleted) {
          item.delete(transaction);
        } else if (item.id.clock < (transaction.beforeState.get(item.id.client) || 0)) {
          transaction._mergeStructs.push(item);
        }
        item = item.right;
      }
      this.type._map.forEach((item2) => {
        if (!item2.deleted) {
          item2.delete(transaction);
        } else if (item2.id.clock < (transaction.beforeState.get(item2.id.client) || 0)) {
          transaction._mergeStructs.push(item2);
        }
      });
      transaction.changed.delete(this.type);
    }
    /**
     * @param {StructStore} store
     */
    gc(store) {
      let item = this.type._start;
      while (item !== null) {
        item.gc(store, true);
        item = item.right;
      }
      this.type._start = null;
      this.type._map.forEach(
        /** @param {Item | null} item */
        (item2) => {
          while (item2 !== null) {
            item2.gc(store, true);
            item2 = item2.left;
          }
        }
      );
      this.type._map = /* @__PURE__ */ new Map();
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     * @param {number} offset
     */
    write(encoder, offset) {
      this.type._write(encoder);
    }
    /**
     * @return {number}
     */
    getRef() {
      return 7;
    }
  };
  var readContentType = (decoder) => new ContentType(typeRefs[decoder.readTypeRef()](decoder));
  var followRedone = (store, id2) => {
    let nextID = id2;
    let diff = 0;
    let item;
    do {
      if (diff > 0) {
        nextID = createID(nextID.client, nextID.clock + diff);
      }
      item = getItem(store, nextID);
      diff = nextID.clock - item.id.clock;
      nextID = item.redone;
    } while (nextID !== null && item instanceof Item);
    return {
      item,
      diff
    };
  };
  var keepItem = (item, keep) => {
    while (item !== null && item.keep !== keep) {
      item.keep = keep;
      item = /** @type {AbstractType<any>} */
      item.parent._item;
    }
  };
  var splitItem = (transaction, leftItem, diff) => {
    const { client, clock } = leftItem.id;
    const rightItem = new Item(
      createID(client, clock + diff),
      leftItem,
      createID(client, clock + diff - 1),
      leftItem.right,
      leftItem.rightOrigin,
      leftItem.parent,
      leftItem.parentSub,
      leftItem.content.splice(diff)
    );
    if (leftItem.deleted) {
      rightItem.markDeleted();
    }
    if (leftItem.keep) {
      rightItem.keep = true;
    }
    if (leftItem.redone !== null) {
      rightItem.redone = createID(leftItem.redone.client, leftItem.redone.clock + diff);
    }
    leftItem.right = rightItem;
    if (rightItem.right !== null) {
      rightItem.right.left = rightItem;
    }
    transaction._mergeStructs.push(rightItem);
    if (rightItem.parentSub !== null && rightItem.right === null) {
      rightItem.parent._map.set(rightItem.parentSub, rightItem);
    }
    leftItem.length = diff;
    return rightItem;
  };
  var isDeletedByUndoStack = (stack, id2) => some(
    stack,
    /** @param {StackItem} s */
    (s) => isDeleted(s.deletions, id2)
  );
  var redoItem = (transaction, item, redoitems, itemsToDelete, ignoreRemoteMapChanges, um) => {
    const doc2 = transaction.doc;
    const store = doc2.store;
    const ownClientID = doc2.clientID;
    const redone = item.redone;
    if (redone !== null) {
      return getItemCleanStart(transaction, redone);
    }
    let parentItem = (
      /** @type {AbstractType<any>} */
      item.parent._item
    );
    let left = null;
    let right;
    if (parentItem !== null && parentItem.deleted === true) {
      if (parentItem.redone === null && (!redoitems.has(parentItem) || redoItem(transaction, parentItem, redoitems, itemsToDelete, ignoreRemoteMapChanges, um) === null)) {
        return null;
      }
      while (parentItem.redone !== null) {
        parentItem = getItemCleanStart(transaction, parentItem.redone);
      }
    }
    const parentType = parentItem === null ? (
      /** @type {AbstractType<any>} */
      item.parent
    ) : (
      /** @type {ContentType} */
      parentItem.content.type
    );
    if (item.parentSub === null) {
      left = item.left;
      right = item;
      while (left !== null) {
        let leftTrace = left;
        while (leftTrace !== null && /** @type {AbstractType<any>} */
        leftTrace.parent._item !== parentItem) {
          leftTrace = leftTrace.redone === null ? null : getItemCleanStart(transaction, leftTrace.redone);
        }
        if (leftTrace !== null && /** @type {AbstractType<any>} */
        leftTrace.parent._item === parentItem) {
          left = leftTrace;
          break;
        }
        left = left.left;
      }
      while (right !== null) {
        let rightTrace = right;
        while (rightTrace !== null && /** @type {AbstractType<any>} */
        rightTrace.parent._item !== parentItem) {
          rightTrace = rightTrace.redone === null ? null : getItemCleanStart(transaction, rightTrace.redone);
        }
        if (rightTrace !== null && /** @type {AbstractType<any>} */
        rightTrace.parent._item === parentItem) {
          right = rightTrace;
          break;
        }
        right = right.right;
      }
    } else {
      right = null;
      if (item.right && !ignoreRemoteMapChanges) {
        left = item;
        while (left !== null && left.right !== null && (left.right.redone || isDeleted(itemsToDelete, left.right.id) || isDeletedByUndoStack(um.undoStack, left.right.id) || isDeletedByUndoStack(um.redoStack, left.right.id))) {
          left = left.right;
          while (left.redone) left = getItemCleanStart(transaction, left.redone);
        }
        if (left && left.right !== null) {
          return null;
        }
      } else {
        left = parentType._map.get(item.parentSub) || null;
      }
    }
    const nextClock = getState(store, ownClientID);
    const nextId = createID(ownClientID, nextClock);
    const redoneItem = new Item(
      nextId,
      left,
      left && left.lastId,
      right,
      right && right.id,
      parentType,
      item.parentSub,
      item.content.copy()
    );
    item.redone = nextId;
    keepItem(redoneItem, true);
    redoneItem.integrate(transaction, 0);
    return redoneItem;
  };
  var Item = class _Item extends AbstractStruct {
    /**
     * @param {ID} id
     * @param {Item | null} left
     * @param {ID | null} origin
     * @param {Item | null} right
     * @param {ID | null} rightOrigin
     * @param {AbstractType<any>|ID|null} parent Is a type if integrated, is null if it is possible to copy parent from left or right, is ID before integration to search for it.
     * @param {string | null} parentSub
     * @param {AbstractContent} content
     */
    constructor(id2, left, origin2, right, rightOrigin, parent, parentSub, content) {
      super(id2, content.getLength());
      this.origin = origin2;
      this.left = left;
      this.right = right;
      this.rightOrigin = rightOrigin;
      this.parent = parent;
      this.parentSub = parentSub;
      this.redone = null;
      this.content = content;
      this.info = this.content.isCountable() ? BIT2 : 0;
    }
    /**
     * This is used to mark the item as an indexed fast-search marker
     *
     * @type {boolean}
     */
    set marker(isMarked) {
      if ((this.info & BIT4) > 0 !== isMarked) {
        this.info ^= BIT4;
      }
    }
    get marker() {
      return (this.info & BIT4) > 0;
    }
    /**
     * If true, do not garbage collect this Item.
     */
    get keep() {
      return (this.info & BIT1) > 0;
    }
    set keep(doKeep) {
      if (this.keep !== doKeep) {
        this.info ^= BIT1;
      }
    }
    get countable() {
      return (this.info & BIT2) > 0;
    }
    /**
     * Whether this item was deleted or not.
     * @type {Boolean}
     */
    get deleted() {
      return (this.info & BIT3) > 0;
    }
    set deleted(doDelete) {
      if (this.deleted !== doDelete) {
        this.info ^= BIT3;
      }
    }
    markDeleted() {
      this.info |= BIT3;
    }
    /**
     * Return the creator clientID of the missing op or define missing items and return null.
     *
     * @param {Transaction} transaction
     * @param {StructStore} store
     * @return {null | number}
     */
    getMissing(transaction, store) {
      if (this.origin && this.origin.client !== this.id.client && this.origin.clock >= getState(store, this.origin.client)) {
        return this.origin.client;
      }
      if (this.rightOrigin && this.rightOrigin.client !== this.id.client && this.rightOrigin.clock >= getState(store, this.rightOrigin.client)) {
        return this.rightOrigin.client;
      }
      if (this.parent && this.parent.constructor === ID && this.id.client !== this.parent.client && this.parent.clock >= getState(store, this.parent.client)) {
        return this.parent.client;
      }
      if (this.origin) {
        this.left = getItemCleanEnd(transaction, store, this.origin);
        this.origin = this.left.lastId;
      }
      if (this.rightOrigin) {
        this.right = getItemCleanStart(transaction, this.rightOrigin);
        this.rightOrigin = this.right.id;
      }
      if (this.left && this.left.constructor === GC || this.right && this.right.constructor === GC) {
        this.parent = null;
      } else if (!this.parent) {
        if (this.left && this.left.constructor === _Item) {
          this.parent = this.left.parent;
          this.parentSub = this.left.parentSub;
        } else if (this.right && this.right.constructor === _Item) {
          this.parent = this.right.parent;
          this.parentSub = this.right.parentSub;
        }
      } else if (this.parent.constructor === ID) {
        const parentItem = getItem(store, this.parent);
        if (parentItem.constructor === GC) {
          this.parent = null;
        } else {
          this.parent = /** @type {ContentType} */
          parentItem.content.type;
        }
      }
      return null;
    }
    /**
     * @param {Transaction} transaction
     * @param {number} offset
     */
    integrate(transaction, offset) {
      if (offset > 0) {
        this.id.clock += offset;
        this.left = getItemCleanEnd(transaction, transaction.doc.store, createID(this.id.client, this.id.clock - 1));
        this.origin = this.left.lastId;
        this.content = this.content.splice(offset);
        this.length -= offset;
      }
      if (this.parent) {
        if (!this.left && (!this.right || this.right.left !== null) || this.left && this.left.right !== this.right) {
          let left = this.left;
          let o;
          if (left !== null) {
            o = left.right;
          } else if (this.parentSub !== null) {
            o = /** @type {AbstractType<any>} */
            this.parent._map.get(this.parentSub) || null;
            while (o !== null && o.left !== null) {
              o = o.left;
            }
          } else {
            o = /** @type {AbstractType<any>} */
            this.parent._start;
          }
          const conflictingItems = /* @__PURE__ */ new Set();
          const itemsBeforeOrigin = /* @__PURE__ */ new Set();
          while (o !== null && o !== this.right) {
            itemsBeforeOrigin.add(o);
            conflictingItems.add(o);
            if (compareIDs(this.origin, o.origin)) {
              if (o.id.client < this.id.client) {
                left = o;
                conflictingItems.clear();
              } else if (compareIDs(this.rightOrigin, o.rightOrigin)) {
                break;
              }
            } else if (o.origin !== null && itemsBeforeOrigin.has(getItem(transaction.doc.store, o.origin))) {
              if (!conflictingItems.has(getItem(transaction.doc.store, o.origin))) {
                left = o;
                conflictingItems.clear();
              }
            } else {
              break;
            }
            o = o.right;
          }
          this.left = left;
        }
        if (this.left !== null) {
          const right = this.left.right;
          this.right = right;
          this.left.right = this;
        } else {
          let r;
          if (this.parentSub !== null) {
            r = /** @type {AbstractType<any>} */
            this.parent._map.get(this.parentSub) || null;
            while (r !== null && r.left !== null) {
              r = r.left;
            }
          } else {
            r = /** @type {AbstractType<any>} */
            this.parent._start;
            this.parent._start = this;
          }
          this.right = r;
        }
        if (this.right !== null) {
          this.right.left = this;
        } else if (this.parentSub !== null) {
          this.parent._map.set(this.parentSub, this);
          if (this.left !== null) {
            this.left.delete(transaction);
          }
        }
        if (this.parentSub === null && this.countable && !this.deleted) {
          this.parent._length += this.length;
        }
        addStruct(transaction.doc.store, this);
        this.content.integrate(transaction, this);
        addChangedTypeToTransaction(
          transaction,
          /** @type {AbstractType<any>} */
          this.parent,
          this.parentSub
        );
        if (
          /** @type {AbstractType<any>} */
          this.parent._item !== null && /** @type {AbstractType<any>} */
          this.parent._item.deleted || this.parentSub !== null && this.right !== null
        ) {
          this.delete(transaction);
        }
      } else {
        new GC(this.id, this.length).integrate(transaction, 0);
      }
    }
    /**
     * Returns the next non-deleted item
     */
    get next() {
      let n = this.right;
      while (n !== null && n.deleted) {
        n = n.right;
      }
      return n;
    }
    /**
     * Returns the previous non-deleted item
     */
    get prev() {
      let n = this.left;
      while (n !== null && n.deleted) {
        n = n.left;
      }
      return n;
    }
    /**
     * Computes the last content address of this Item.
     */
    get lastId() {
      return this.length === 1 ? this.id : createID(this.id.client, this.id.clock + this.length - 1);
    }
    /**
     * Try to merge two items
     *
     * @param {Item} right
     * @return {boolean}
     */
    mergeWith(right) {
      if (this.constructor === right.constructor && compareIDs(right.origin, this.lastId) && this.right === right && compareIDs(this.rightOrigin, right.rightOrigin) && this.id.client === right.id.client && this.id.clock + this.length === right.id.clock && this.deleted === right.deleted && this.redone === null && right.redone === null && this.content.constructor === right.content.constructor && this.content.mergeWith(right.content)) {
        const searchMarker = (
          /** @type {AbstractType<any>} */
          this.parent._searchMarker
        );
        if (searchMarker) {
          searchMarker.forEach((marker) => {
            if (marker.p === right) {
              marker.p = this;
              if (!this.deleted && this.countable) {
                marker.index -= this.length;
              }
            }
          });
        }
        if (right.keep) {
          this.keep = true;
        }
        this.right = right.right;
        if (this.right !== null) {
          this.right.left = this;
        }
        this.length += right.length;
        return true;
      }
      return false;
    }
    /**
     * Mark this Item as deleted.
     *
     * @param {Transaction} transaction
     */
    delete(transaction) {
      if (!this.deleted) {
        const parent = (
          /** @type {AbstractType<any>} */
          this.parent
        );
        if (this.countable && this.parentSub === null) {
          parent._length -= this.length;
        }
        this.markDeleted();
        addToDeleteSet(transaction.deleteSet, this.id.client, this.id.clock, this.length);
        addChangedTypeToTransaction(transaction, parent, this.parentSub);
        this.content.delete(transaction);
      }
    }
    /**
     * @param {StructStore} store
     * @param {boolean} parentGCd
     */
    gc(store, parentGCd) {
      if (!this.deleted) {
        throw unexpectedCase();
      }
      this.content.gc(store);
      if (parentGCd) {
        replaceStruct(store, this, new GC(this.id, this.length));
      } else {
        this.content = new ContentDeleted(this.length);
      }
    }
    /**
     * Transform the properties of this type to binary and write it to an
     * BinaryEncoder.
     *
     * This is called when this Item is sent to a remote peer.
     *
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder The encoder to write data to.
     * @param {number} offset
     */
    write(encoder, offset) {
      const origin2 = offset > 0 ? createID(this.id.client, this.id.clock + offset - 1) : this.origin;
      const rightOrigin = this.rightOrigin;
      const parentSub = this.parentSub;
      const info = this.content.getRef() & BITS5 | (origin2 === null ? 0 : BIT8) | // origin is defined
      (rightOrigin === null ? 0 : BIT7) | // right origin is defined
      (parentSub === null ? 0 : BIT6);
      encoder.writeInfo(info);
      if (origin2 !== null) {
        encoder.writeLeftID(origin2);
      }
      if (rightOrigin !== null) {
        encoder.writeRightID(rightOrigin);
      }
      if (origin2 === null && rightOrigin === null) {
        const parent = (
          /** @type {AbstractType<any>} */
          this.parent
        );
        if (parent._item !== void 0) {
          const parentItem = parent._item;
          if (parentItem === null) {
            const ykey = findRootTypeKey(parent);
            encoder.writeParentInfo(true);
            encoder.writeString(ykey);
          } else {
            encoder.writeParentInfo(false);
            encoder.writeLeftID(parentItem.id);
          }
        } else if (parent.constructor === String) {
          encoder.writeParentInfo(true);
          encoder.writeString(parent);
        } else if (parent.constructor === ID) {
          encoder.writeParentInfo(false);
          encoder.writeLeftID(parent);
        } else {
          unexpectedCase();
        }
        if (parentSub !== null) {
          encoder.writeString(parentSub);
        }
      }
      this.content.write(encoder, offset);
    }
  };
  var readItemContent = (decoder, info) => contentRefs[info & BITS5](decoder);
  var contentRefs = [
    () => {
      unexpectedCase();
    },
    // GC is not ItemContent
    readContentDeleted,
    // 1
    readContentJSON,
    // 2
    readContentBinary,
    // 3
    readContentString,
    // 4
    readContentEmbed,
    // 5
    readContentFormat,
    // 6
    readContentType,
    // 7
    readContentAny,
    // 8
    readContentDoc,
    // 9
    () => {
      unexpectedCase();
    }
    // 10 - Skip is not ItemContent
  ];
  var structSkipRefNumber = 10;
  var Skip = class extends AbstractStruct {
    get deleted() {
      return true;
    }
    delete() {
    }
    /**
     * @param {Skip} right
     * @return {boolean}
     */
    mergeWith(right) {
      if (this.constructor !== right.constructor) {
        return false;
      }
      this.length += right.length;
      return true;
    }
    /**
     * @param {Transaction} transaction
     * @param {number} offset
     */
    integrate(transaction, offset) {
      unexpectedCase();
    }
    /**
     * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
     * @param {number} offset
     */
    write(encoder, offset) {
      encoder.writeInfo(structSkipRefNumber);
      writeVarUint(encoder.restEncoder, this.length - offset);
    }
    /**
     * @param {Transaction} transaction
     * @param {StructStore} store
     * @return {null | number}
     */
    getMissing(transaction, store) {
      return null;
    }
  };
  var glo = (
    /** @type {any} */
    typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}
  );
  var importIdentifier = "__ $YJS$ __";
  if (glo[importIdentifier] === true) {
    console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");
  }
  glo[importIdentifier] = true;

  // packages/sync/node_modules/y-protocols/awareness.js
  var outdatedTimeout = 3e4;
  var Awareness = class extends Observable {
    /**
     * @param {Y.Doc} doc
     */
    constructor(doc2) {
      super();
      this.doc = doc2;
      this.clientID = doc2.clientID;
      this.states = /* @__PURE__ */ new Map();
      this.meta = /* @__PURE__ */ new Map();
      this._checkInterval = /** @type {any} */
      setInterval(() => {
        const now = getUnixTime();
        if (this.getLocalState() !== null && outdatedTimeout / 2 <= now - /** @type {{lastUpdated:number}} */
        this.meta.get(this.clientID).lastUpdated) {
          this.setLocalState(this.getLocalState());
        }
        const remove = [];
        this.meta.forEach((meta, clientid) => {
          if (clientid !== this.clientID && outdatedTimeout <= now - meta.lastUpdated && this.states.has(clientid)) {
            remove.push(clientid);
          }
        });
        if (remove.length > 0) {
          removeAwarenessStates(this, remove, "timeout");
        }
      }, floor(outdatedTimeout / 10));
      doc2.on("destroy", () => {
        this.destroy();
      });
      this.setLocalState({});
    }
    destroy() {
      this.emit("destroy", [this]);
      this.setLocalState(null);
      super.destroy();
      clearInterval(this._checkInterval);
    }
    /**
     * @return {Object<string,any>|null}
     */
    getLocalState() {
      return this.states.get(this.clientID) || null;
    }
    /**
     * @param {Object<string,any>|null} state
     */
    setLocalState(state) {
      const clientID = this.clientID;
      const currLocalMeta = this.meta.get(clientID);
      const clock = currLocalMeta === void 0 ? 0 : currLocalMeta.clock + 1;
      const prevState = this.states.get(clientID);
      if (state === null) {
        this.states.delete(clientID);
      } else {
        this.states.set(clientID, state);
      }
      this.meta.set(clientID, {
        clock,
        lastUpdated: getUnixTime()
      });
      const added = [];
      const updated = [];
      const filteredUpdated = [];
      const removed = [];
      if (state === null) {
        removed.push(clientID);
      } else if (prevState == null) {
        if (state != null) {
          added.push(clientID);
        }
      } else {
        updated.push(clientID);
        if (!equalityDeep(prevState, state)) {
          filteredUpdated.push(clientID);
        }
      }
      if (added.length > 0 || filteredUpdated.length > 0 || removed.length > 0) {
        this.emit("change", [{ added, updated: filteredUpdated, removed }, "local"]);
      }
      this.emit("update", [{ added, updated, removed }, "local"]);
    }
    /**
     * @param {string} field
     * @param {any} value
     */
    setLocalStateField(field, value) {
      const state = this.getLocalState();
      if (state !== null) {
        this.setLocalState({
          ...state,
          [field]: value
        });
      }
    }
    /**
     * @return {Map<number,Object<string,any>>}
     */
    getStates() {
      return this.states;
    }
  };
  var removeAwarenessStates = (awareness, clients, origin2) => {
    const removed = [];
    for (let i = 0; i < clients.length; i++) {
      const clientID = clients[i];
      if (awareness.states.has(clientID)) {
        awareness.states.delete(clientID);
        if (clientID === awareness.clientID) {
          const curMeta = (
            /** @type {MetaClientState} */
            awareness.meta.get(clientID)
          );
          awareness.meta.set(clientID, {
            clock: curMeta.clock + 1,
            lastUpdated: getUnixTime()
          });
        }
        removed.push(clientID);
      }
    }
    if (removed.length > 0) {
      awareness.emit("change", [{ added: [], updated: [], removed }, origin2]);
      awareness.emit("update", [{ added: [], updated: [], removed }, origin2]);
    }
  };

  // packages/sync/build-module/config.mjs
  var CRDT_DOC_VERSION = 1;
  var CRDT_DOC_META_PERSISTENCE_KEY = "fromPersistence";
  var CRDT_RECORD_MAP_KEY = "document";
  var CRDT_STATE_MAP_KEY = "state";
  var CRDT_STATE_MAP_SAVED_AT_KEY = "savedAt";
  var CRDT_STATE_MAP_SAVED_BY_KEY = "savedBy";
  var CRDT_STATE_MAP_VERSION_KEY = "version";
  var LOCAL_EDITOR_ORIGIN = "gutenberg";
  var LOCAL_SYNC_MANAGER_ORIGIN = "syncManager";
  var LOCAL_UNDO_IGNORED_ORIGIN = "gutenberg-undo-ignored";

  // packages/sync/build-module/errors.mjs
  var ConnectionErrorCode = /* @__PURE__ */ ((ConnectionErrorCode2) => {
    ConnectionErrorCode2["AUTHENTICATION_FAILED"] = "authentication-failed";
    ConnectionErrorCode2["CONNECTION_EXPIRED"] = "connection-expired";
    ConnectionErrorCode2["CONNECTION_LIMIT_EXCEEDED"] = "connection-limit-exceeded";
    ConnectionErrorCode2["DOCUMENT_SIZE_LIMIT_EXCEEDED"] = "document-size-limit-exceeded";
    ConnectionErrorCode2["UNKNOWN_ERROR"] = "unknown-error";
    return ConnectionErrorCode2;
  })(ConnectionErrorCode || {});
  var ConnectionError = class extends Error {
    constructor(code = "unknown-error", message) {
      super(message);
      this.code = code;
      this.name = "ConnectionError";
    }
  };

  // packages/sync/build-module/lock-unlock.mjs
  var import_private_apis = __toESM(require_private_apis(), 1);
  var { lock, unlock } = (0, import_private_apis.__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/sync"
  );

  // packages/sync/build-module/performance.mjs
  function logPerformanceTiming(fn) {
    return function(...args2) {
      const start = performance.now();
      const result = fn.apply(this, args2);
      const end = performance.now();
      console.log(
        `[SyncManager][performance]: ${fn.name} took ${(end - start).toFixed(2)} ms`
      );
      return result;
    };
  }
  function passThru(fn) {
    return ((...args2) => fn(...args2));
  }
  function yieldToEventLoop(fn) {
    return function(...args2) {
      setTimeout(() => {
        fn.apply(this, args2);
      }, 0);
    };
  }

  // packages/sync/build-module/providers/index.mjs
  var import_hooks3 = __toESM(require_hooks(), 1);

  // packages/sync/build-module/providers/http-polling/polling-manager.mjs
  var import_hooks2 = __toESM(require_hooks(), 1);

  // packages/sync/node_modules/y-protocols/sync.js
  var messageYjsSyncStep1 = 0;
  var messageYjsSyncStep2 = 1;
  var messageYjsUpdate = 2;
  var writeSyncStep1 = (encoder, doc2) => {
    writeVarUint(encoder, messageYjsSyncStep1);
    const sv = encodeStateVector(doc2);
    writeVarUint8Array(encoder, sv);
  };
  var writeSyncStep2 = (encoder, doc2, encodedStateVector) => {
    writeVarUint(encoder, messageYjsSyncStep2);
    writeVarUint8Array(encoder, encodeStateAsUpdate(doc2, encodedStateVector));
  };
  var readSyncStep1 = (decoder, encoder, doc2) => writeSyncStep2(encoder, doc2, readVarUint8Array(decoder));
  var readSyncStep2 = (decoder, doc2, transactionOrigin, errorHandler) => {
    try {
      applyUpdate(doc2, readVarUint8Array(decoder), transactionOrigin);
    } catch (error) {
      if (errorHandler != null) errorHandler(
        /** @type {Error} */
        error
      );
      console.error("Caught error while handling a Yjs update", error);
    }
  };
  var readUpdate2 = readSyncStep2;
  var readSyncMessage = (decoder, encoder, doc2, transactionOrigin, errorHandler) => {
    const messageType = readVarUint(decoder);
    switch (messageType) {
      case messageYjsSyncStep1:
        readSyncStep1(decoder, encoder, doc2);
        break;
      case messageYjsSyncStep2:
        readSyncStep2(decoder, doc2, transactionOrigin, errorHandler);
        break;
      case messageYjsUpdate:
        readUpdate2(decoder, doc2, transactionOrigin, errorHandler);
        break;
      default:
        throw new Error("Unknown message type");
    }
    return messageType;
  };

  // packages/sync/build-module/providers/http-polling/config.mjs
  var import_hooks = __toESM(require_hooks(), 1);
  var DEFAULT_CLIENT_LIMIT_PER_ROOM = 3;
  var MAX_ERROR_BACKOFF_IN_MS = 30 * 1e3;
  var MAX_UPDATE_SIZE_IN_BYTES = 1 * 1024 * 1024;
  var POLLING_INTERVAL_IN_MS = (0, import_hooks.applyFilters)(
    "sync.pollingManager.pollingInterval",
    4e3
    // 4 seconds
  );
  var POLLING_INTERVAL_WITH_COLLABORATORS_IN_MS = (0, import_hooks.applyFilters)(
    "sync.pollingManager.pollingIntervalWithCollaborators",
    1e3
    // 1 second
  );
  var POLLING_INTERVAL_BACKGROUND_TAB_IN_MS = 25 * 1e3;

  // packages/sync/build-module/providers/http-polling/types.mjs
  var SyncUpdateType = /* @__PURE__ */ ((SyncUpdateType2) => {
    SyncUpdateType2["COMPACTION"] = "compaction";
    SyncUpdateType2["SYNC_STEP_1"] = "sync_step1";
    SyncUpdateType2["SYNC_STEP_2"] = "sync_step2";
    SyncUpdateType2["UPDATE"] = "update";
    return SyncUpdateType2;
  })(SyncUpdateType || {});

  // packages/sync/build-module/providers/http-polling/utils.mjs
  var import_api_fetch = __toESM(require_api_fetch(), 1);
  var SYNC_API_PATH = "/wp-sync/v1/updates";
  function uint8ArrayToBase64(data) {
    let binary = "";
    const len = data.byteLength;
    for (let i = 0; i < len; i++) {
      binary += String.fromCharCode(data[i]);
    }
    return globalThis.btoa(binary);
  }
  function base64ToUint8Array(base64) {
    const binaryString = globalThis.atob(base64);
    const len = binaryString.length;
    const bytes = new Uint8Array(len);
    for (let i = 0; i < len; i++) {
      bytes[i] = binaryString.charCodeAt(i);
    }
    return bytes;
  }
  function createSyncUpdate(data, type) {
    return {
      data: uint8ArrayToBase64(data),
      type
    };
  }
  function createUpdateQueue(initial = [], paused = true) {
    let isPaused = paused;
    const updates = [...initial];
    return {
      add(update) {
        updates.push(update);
      },
      addBulk(bulkUpdates) {
        if (0 === bulkUpdates.length) {
          return;
        }
        updates.push(...bulkUpdates);
      },
      clear() {
        updates.splice(0, updates.length);
      },
      get() {
        if (isPaused) {
          return [];
        }
        return updates.splice(0, updates.length);
      },
      pause() {
        isPaused = true;
      },
      restore(restoredUpdates) {
        const filtered = restoredUpdates.filter(
          (u) => u.type !== SyncUpdateType.COMPACTION
        );
        if (0 === filtered.length) {
          return;
        }
        updates.unshift(...filtered);
      },
      resume() {
        isPaused = false;
      },
      size() {
        return updates.length;
      }
    };
  }
  async function postSyncUpdate(payload) {
    const response = await (0, import_api_fetch.default)({
      body: JSON.stringify(payload),
      headers: {
        "Content-Type": "application/json"
      },
      method: "POST",
      parse: false,
      path: SYNC_API_PATH
    });
    if (!response.ok) {
      throw new Error(
        `Sync update failed with status ${response.status}`
      );
    }
    return await response.json();
  }
  function postSyncUpdateNonBlocking(payload) {
    if (payload.rooms.length === 0) {
      return;
    }
    (0, import_api_fetch.default)({
      body: JSON.stringify(payload),
      headers: { "Content-Type": "application/json" },
      keepalive: true,
      method: "POST",
      parse: false,
      path: SYNC_API_PATH
    }).catch(() => {
    });
  }
  function intValueOrDefault(value, defaultValue) {
    const intValue = parseInt(String(value), 10);
    return isNaN(intValue) ? defaultValue : intValue;
  }

  // packages/sync/build-module/providers/http-polling/polling-manager.mjs
  var POLLING_MANAGER_ORIGIN = "polling-manager";
  var roomStates = /* @__PURE__ */ new Map();
  function createDeprecatedCompactionUpdate(updates) {
    const mergeable = updates.filter(
      (u) => [SyncUpdateType.COMPACTION, SyncUpdateType.UPDATE].includes(
        u.type
      )
    ).map((u) => base64ToUint8Array(u.data));
    return createSyncUpdate(
      mergeUpdatesV2(mergeable),
      SyncUpdateType.COMPACTION
    );
  }
  function createSyncStep1Update(doc2) {
    const encoder = createEncoder();
    writeSyncStep1(encoder, doc2);
    return createSyncUpdate(
      toUint8Array(encoder),
      SyncUpdateType.SYNC_STEP_1
    );
  }
  function createSyncStep2Update(doc2, step1) {
    const decoder = createDecoder(step1);
    const encoder = createEncoder();
    readSyncMessage(
      decoder,
      encoder,
      doc2,
      POLLING_MANAGER_ORIGIN
    );
    return createSyncUpdate(
      toUint8Array(encoder),
      SyncUpdateType.SYNC_STEP_2
    );
  }
  function processAwarenessUpdate(state, awareness) {
    const currentStates = awareness.getStates();
    const added = /* @__PURE__ */ new Set();
    const updated = /* @__PURE__ */ new Set();
    const removed = new Set(
      Array.from(currentStates.keys()).filter(
        (clientId) => !state[clientId]
      )
    );
    Object.entries(state).forEach(([clientIdString, awarenessState]) => {
      const clientId = Number(clientIdString);
      if (clientId === awareness.clientID) {
        return;
      }
      if (null === awarenessState) {
        currentStates.delete(clientId);
        removed.add(clientId);
        return;
      }
      if (!currentStates.has(clientId)) {
        currentStates.set(clientId, awarenessState);
        added.add(clientId);
        return;
      }
      const currentState = currentStates.get(clientId);
      if (JSON.stringify(currentState) !== JSON.stringify(awarenessState)) {
        currentStates.set(clientId, awarenessState);
        updated.add(clientId);
      }
    });
    if (added.size + updated.size > 0) {
      awareness.emit("change", [
        {
          added: Array.from(added),
          updated: Array.from(updated),
          // Left blank on purpose, as the removal of clients is handled in the if condition below.
          removed: []
        }
      ]);
    }
    if (removed.size > 0) {
      removeAwarenessStates(
        awareness,
        Array.from(removed),
        POLLING_MANAGER_ORIGIN
      );
    }
  }
  function processDocUpdate(update, doc2, onSync) {
    const data = base64ToUint8Array(update.data);
    switch (update.type) {
      case SyncUpdateType.SYNC_STEP_1: {
        return createSyncStep2Update(doc2, data);
      }
      case SyncUpdateType.SYNC_STEP_2: {
        const decoder = createDecoder(data);
        const encoder = createEncoder();
        readSyncMessage(
          decoder,
          encoder,
          doc2,
          POLLING_MANAGER_ORIGIN
        );
        onSync();
        return;
      }
      case SyncUpdateType.COMPACTION:
      case SyncUpdateType.UPDATE: {
        applyUpdateV2(doc2, data, POLLING_MANAGER_ORIGIN);
      }
    }
  }
  function checkConnectionLimit(awareness, roomState) {
    if (!roomState.isPrimaryRoom || hasCheckedConnectionLimit) {
      return false;
    }
    hasCheckedConnectionLimit = true;
    const maxClientsPerRoom = (0, import_hooks2.applyFilters)(
      "sync.pollingProvider.maxClientsPerRoom",
      DEFAULT_CLIENT_LIMIT_PER_ROOM,
      roomState.room
    );
    const clientCount = Object.keys(awareness).length;
    const validatedLimit = intValueOrDefault(
      maxClientsPerRoom,
      DEFAULT_CLIENT_LIMIT_PER_ROOM
    );
    if (clientCount > validatedLimit) {
      roomState.log("Connection limit exceeded", {
        clientCount,
        maxClientsPerRoom: validatedLimit,
        room: roomState.room
      });
      return true;
    }
    return false;
  }
  var areListenersRegistered = false;
  var hasCheckedConnectionLimit = false;
  var hasCollaborators = false;
  var isActiveBrowser = "visible" === document.visibilityState;
  var isPolling = false;
  var isUnloadPending = false;
  var pollInterval = POLLING_INTERVAL_IN_MS;
  var pollingTimeoutId = null;
  function handleBeforeUnload() {
    isUnloadPending = true;
  }
  function handlePageHide() {
    const rooms = Array.from(roomStates.entries()).map(
      ([room, state]) => ({
        after: 0,
        awareness: null,
        client_id: state.clientId,
        room,
        updates: []
      })
    );
    postSyncUpdateNonBlocking({ rooms });
  }
  function handleVisibilityChange() {
    const wasActive = isActiveBrowser;
    isActiveBrowser = document.visibilityState === "visible";
    if (isActiveBrowser && !wasActive) {
      if (pollingTimeoutId) {
        clearTimeout(pollingTimeoutId);
        pollingTimeoutId = null;
        poll();
      }
    }
  }
  function poll() {
    isPolling = true;
    pollingTimeoutId = null;
    async function start() {
      if (0 === roomStates.size) {
        isPolling = false;
        return;
      }
      isUnloadPending = false;
      roomStates.forEach((state) => {
        state.onStatusChange({ status: "connecting" });
      });
      const payload = {
        rooms: Array.from(roomStates.entries()).map(
          ([room, state]) => ({
            after: state.endCursor ?? 0,
            awareness: state.localAwarenessState,
            client_id: state.clientId,
            room,
            updates: state.updateQueue.get()
          })
        )
      };
      try {
        const { rooms } = await postSyncUpdate(payload);
        roomStates.forEach((state) => {
          state.onStatusChange({ status: "connected" });
        });
        hasCollaborators = false;
        rooms.forEach((room) => {
          if (!roomStates.has(room.room)) {
            return;
          }
          const roomState = roomStates.get(room.room);
          roomState.endCursor = room.end_cursor;
          if (checkConnectionLimit(room.awareness, roomState)) {
            roomState.onStatusChange({
              status: "disconnected",
              error: new ConnectionError(
                ConnectionErrorCode.CONNECTION_LIMIT_EXCEEDED,
                "Connection limit exceeded"
              )
            });
            unregisterRoom(room.room);
            return;
          }
          roomState.processAwarenessUpdate(room.awareness);
          if (roomState.isPrimaryRoom && Object.keys(room.awareness).length > 1) {
            hasCollaborators = true;
            roomStates.forEach((state) => {
              state.updateQueue.resume();
            });
          }
          const responseUpdates = [];
          for (const update of room.updates) {
            try {
              const response = roomState.processDocUpdate(update);
              if (response) {
                responseUpdates.push(response);
              }
            } catch (error) {
              roomState.log(
                "Failed to apply sync update",
                { error, update },
                "error",
                true
                // force
              );
            }
          }
          roomState.updateQueue.addBulk(responseUpdates);
          if (room.should_compact) {
            roomState.log("Server requested compaction update");
            roomState.updateQueue.clear();
            roomState.updateQueue.add(
              roomState.createCompactionUpdate()
            );
          } else if (room.compaction_request) {
            roomState.log("Server requested (old) compaction update");
            roomState.updateQueue.add(
              createDeprecatedCompactionUpdate(
                room.compaction_request
              )
            );
          }
        });
        if (isActiveBrowser && hasCollaborators) {
          pollInterval = POLLING_INTERVAL_WITH_COLLABORATORS_IN_MS;
        } else if (isActiveBrowser) {
          pollInterval = POLLING_INTERVAL_IN_MS;
        } else {
          pollInterval = POLLING_INTERVAL_BACKGROUND_TAB_IN_MS;
        }
      } catch (error) {
        pollInterval = Math.min(
          pollInterval * 2,
          MAX_ERROR_BACKOFF_IN_MS
        );
        for (const room of payload.rooms) {
          if (!roomStates.has(room.room)) {
            continue;
          }
          const state = roomStates.get(room.room);
          if (room.updates.length > 0 && state.endCursor > 0) {
            state.updateQueue.clear();
            state.updateQueue.add(state.createCompactionUpdate());
          } else if (room.updates.length > 0) {
            state.updateQueue.restore(room.updates);
          }
          state.log(
            "Error posting sync update, will retry with backoff",
            { error, nextPoll: pollInterval },
            "error",
            true
            // force
          );
        }
        if (!isUnloadPending) {
          roomStates.forEach((state) => {
            state.onStatusChange({
              status: "disconnected",
              canManuallyRetry: true,
              willAutoRetryInMs: pollInterval
            });
          });
        }
      }
      pollingTimeoutId = setTimeout(poll, pollInterval);
    }
    void start();
  }
  function registerRoom({
    room,
    doc: doc2,
    awareness,
    log,
    onSync,
    onStatusChange
  }) {
    if (roomStates.has(room)) {
      return;
    }
    const updateQueue = createUpdateQueue([createSyncStep1Update(doc2)]);
    const isPrimaryRoom = 0 === roomStates.size;
    function onAwarenessUpdate() {
      roomState.localAwarenessState = awareness.getLocalState() ?? {};
    }
    function onDocUpdate(update, origin2) {
      if (POLLING_MANAGER_ORIGIN === origin2) {
        return;
      }
      if (update.byteLength > MAX_UPDATE_SIZE_IN_BYTES) {
        const state = roomStates.get(room);
        if (!state) {
          return;
        }
        state.log("Document size limit exceeded", {
          maxUpdateSizeInBytes: MAX_UPDATE_SIZE_IN_BYTES,
          updateSizeInBytes: update.byteLength
        });
        state.onStatusChange({
          status: "disconnected",
          error: new ConnectionError(
            ConnectionErrorCode.DOCUMENT_SIZE_LIMIT_EXCEEDED,
            "Document size limit exceeded"
          )
        });
        unregisterRoom(room);
      }
      updateQueue.add(createSyncUpdate(update, SyncUpdateType.UPDATE));
    }
    function unregister() {
      doc2.off("updateV2", onDocUpdate);
      awareness.off("change", onAwarenessUpdate);
      updateQueue.clear();
    }
    const roomState = {
      clientId: doc2.clientID,
      createCompactionUpdate: () => createSyncUpdate(
        encodeStateAsUpdateV2(doc2),
        SyncUpdateType.COMPACTION
      ),
      endCursor: 0,
      isPrimaryRoom,
      localAwarenessState: awareness.getLocalState() ?? {},
      log,
      onStatusChange,
      processAwarenessUpdate: (state) => processAwarenessUpdate(state, awareness),
      processDocUpdate: (update) => processDocUpdate(update, doc2, onSync),
      room,
      unregister,
      updateQueue
    };
    doc2.on("updateV2", onDocUpdate);
    awareness.on("change", onAwarenessUpdate);
    roomStates.set(room, roomState);
    if (!areListenersRegistered) {
      window.addEventListener("beforeunload", handleBeforeUnload);
      window.addEventListener("pagehide", handlePageHide);
      document.addEventListener("visibilitychange", handleVisibilityChange);
      areListenersRegistered = true;
    }
    if (!isPolling) {
      poll();
    }
  }
  function unregisterRoom(room) {
    const state = roomStates.get(room);
    if (state) {
      const rooms = [
        {
          after: 0,
          awareness: null,
          client_id: state.clientId,
          room,
          updates: []
        }
      ];
      postSyncUpdateNonBlocking({ rooms });
      state.unregister();
      roomStates.delete(room);
    }
    if (0 === roomStates.size && areListenersRegistered) {
      window.removeEventListener("beforeunload", handleBeforeUnload);
      window.removeEventListener("pagehide", handlePageHide);
      document.removeEventListener(
        "visibilitychange",
        handleVisibilityChange
      );
      areListenersRegistered = false;
      hasCheckedConnectionLimit = false;
    }
  }
  function retryNow() {
    pollInterval = POLLING_INTERVAL_IN_MS * 2;
    if (pollingTimeoutId) {
      clearTimeout(pollingTimeoutId);
      pollingTimeoutId = null;
      poll();
    }
  }
  var pollingManager = {
    registerRoom,
    retryNow,
    unregisterRoom
  };

  // packages/sync/build-module/providers/http-polling/http-polling-provider.mjs
  var HttpPollingProvider = class extends ObservableV2 {
    constructor(options) {
      super();
      this.options = options;
      this.log("Initializing", { room: options.room });
      this.awareness = options.awareness ?? new Awareness(options.ydoc);
      this.connect();
    }
    awareness;
    status = "disconnected";
    synced = false;
    /**
     * Connect to the endpoint and initialize sync.
     */
    connect() {
      this.log("Connecting");
      pollingManager.registerRoom({
        room: this.options.room,
        doc: this.options.ydoc,
        awareness: this.awareness,
        log: this.log,
        onStatusChange: this.emitStatus,
        onSync: this.onSync
      });
    }
    /**
     * Destroy the provider and cleanup resources.
     */
    destroy() {
      this.disconnect();
      super.destroy();
    }
    /**
     * Disconnect the provider and allow reconnection later.
     */
    disconnect() {
      this.log("Disconnecting");
      pollingManager.unregisterRoom(this.options.room);
      this.emitStatus({ status: "disconnected" });
    }
    /**
     * Emit connection status, passing the full object through so that
     * additional fields (e.g. `willAutoRetryInMs`) are preserved for consumers.
     *
     * @param connectionStatus The connection status object
     */
    emitStatus = (connectionStatus) => {
      const { status } = connectionStatus;
      const error = status === "disconnected" ? connectionStatus.error : void 0;
      if (this.status === status && !error) {
        return;
      }
      if (status === "connecting" && this.status !== "disconnected") {
        return;
      }
      this.log("Status change", { status, error });
      this.status = status;
      this.emit("status", [connectionStatus]);
    };
    /**
     * Log debug messages if debugging is enabled.
     *
     * @param message    The debug message
     * @param debug      Additional debug information
     * @param errorLevel The console method to use for logging
     * @param force      Whether to force logging regardless of debug setting
     */
    log = (message, debug = {}, errorLevel = "log", force = false) => {
      if (!this.options.debug && !force) {
        return;
      }
      const logFn = console[errorLevel] || console.log;
      logFn(`[${this.constructor.name}]: ${message}`, {
        room: this.options.room,
        ...debug
      });
    };
    /**
     * Handle synchronization events from the polling manager.
     */
    onSync = () => {
      if (!this.synced) {
        this.synced = true;
        this.log("Synced");
      }
    };
  };
  function createHttpPollingProvider() {
    return async ({
      awareness,
      objectType,
      objectId,
      ydoc
    }) => {
      const room = objectId ? `${objectType}:${objectId}` : objectType;
      const provider = new HttpPollingProvider({
        awareness,
        // debug: true,
        room,
        ydoc
      });
      return {
        destroy: () => provider.destroy(),
        // Adapter: ObservableV2.on is compatible with ProviderOn
        // The callback receives data as the first parameter
        on: (event, callback) => {
          provider.on(event, callback);
        }
      };
    };
  }

  // packages/sync/build-module/providers/index.mjs
  var providerCreators = null;
  function getDefaultProviderCreators() {
    return [createHttpPollingProvider()];
  }
  function isProviderCreator(creator) {
    return "function" === typeof creator;
  }
  function getProviderCreators() {
    if (providerCreators) {
      return providerCreators;
    }
    if (!window._wpCollaborationEnabled) {
      return [];
    }
    const filteredProviderCreators = (0, import_hooks3.applyFilters)(
      "sync.providers",
      getDefaultProviderCreators()
    );
    if (!Array.isArray(filteredProviderCreators)) {
      providerCreators = [];
      return providerCreators;
    }
    providerCreators = filteredProviderCreators.filter(isProviderCreator);
    return providerCreators;
  }

  // packages/sync/build-module/y-utilities/y-multidoc-undomanager.mjs
  var popStackItem2 = (mum, type) => {
    const stack = type === "undo" ? mum.undoStack : mum.redoStack;
    while (stack.length > 0) {
      const um = (
        /** @type {Y.UndoManager} */
        stack.pop()
      );
      const prevUmStack = type === "undo" ? um.undoStack : um.redoStack;
      const stackItem = (
        /** @type {any} */
        prevUmStack.pop()
      );
      let actionPerformed = false;
      if (type === "undo") {
        um.undoStack = [stackItem];
        actionPerformed = um.undo() !== null;
        um.undoStack = prevUmStack;
      } else {
        um.redoStack = [stackItem];
        actionPerformed = um.redo() !== null;
        um.redoStack = prevUmStack;
      }
      if (actionPerformed) {
        return stackItem;
      }
    }
    return null;
  };
  var YMultiDocUndoManager = class extends Observable {
    /**
     * @param {Y.AbstractType<any>|Array<Y.AbstractType<any>>} typeScope Accepts either a single type, or an array of types
     * @param {ConstructorParameters<typeof Y.UndoManager>[1]} opts
     */
    constructor(typeScope = [], opts = {}) {
      super();
      this.docs = /* @__PURE__ */ new Map();
      this.trackedOrigins = opts.trackedOrigins || /* @__PURE__ */ new Set([null]);
      opts.trackedOrigins = this.trackedOrigins;
      this._defaultOpts = opts;
      this.undoStack = [];
      this.redoStack = [];
      this.addToScope(typeScope);
    }
    /**
     * @param {Array<Y.AbstractType<any>> | Y.AbstractType<any>} ytypes
     */
    addToScope(ytypes) {
      ytypes = isArray(ytypes) ? ytypes : [ytypes];
      ytypes.forEach((ytype) => {
        const ydoc = (
          /** @type {Y.Doc} */
          ytype.doc
        );
        const um = setIfUndefined(this.docs, ydoc, () => {
          const um2 = new UndoManager([ytype], this._defaultOpts);
          um2.on(
            "stack-cleared",
            /** @param {any} opts */
            ({
              undoStackCleared,
              redoStackCleared
            }) => {
              this.clear(undoStackCleared, redoStackCleared);
            }
          );
          ydoc.on("destroy", () => {
            this.docs.delete(ydoc);
            this.undoStack = this.undoStack.filter(
              (um3) => um3.doc !== ydoc
            );
            this.redoStack = this.redoStack.filter(
              (um3) => um3.doc !== ydoc
            );
          });
          um2.on(
            "stack-item-added",
            /** @param {any} change */
            (change) => {
              const stack = change.type === "undo" ? this.undoStack : this.redoStack;
              stack.push(um2);
              this.emit("stack-item-added", [
                { ...change, ydoc },
                this
              ]);
            }
          );
          um2.on(
            "stack-item-updated",
            /** @param {any} change */
            (change) => {
              this.emit("stack-item-updated", [
                { ...change, ydoc },
                this
              ]);
            }
          );
          um2.on(
            "stack-item-popped",
            /** @param {any} change */
            (change) => {
              this.emit("stack-item-popped", [
                { ...change, ydoc },
                this
              ]);
            }
          );
          return um2;
        });
        if (um.scope.every((yt) => yt !== ytype)) {
          um.scope.push(ytype);
        }
      });
    }
    /**
     * @param {any} origin
     */
    /* c8 ignore next 3 */
    addTrackedOrigin(origin2) {
      this.trackedOrigins.add(origin2);
    }
    /**
     * @param {any} origin
     */
    /* c8 ignore next 3 */
    removeTrackedOrigin(origin2) {
      this.trackedOrigins.delete(origin2);
    }
    /**
     * Undo last changes on type.
     *
     * @return {any?} Returns StackItem if a change was applied
     */
    undo() {
      return popStackItem2(this, "undo");
    }
    /**
     * Redo last undo operation.
     *
     * @return {any?} Returns StackItem if a change was applied
     */
    redo() {
      return popStackItem2(this, "redo");
    }
    clear(clearUndoStack = true, clearRedoStack = true) {
      if (clearUndoStack && this.canUndo() || clearRedoStack && this.canRedo()) {
        this.docs.forEach((um) => {
          clearUndoStack && (this.undoStack = []);
          clearRedoStack && (this.redoStack = []);
          um.clear(clearUndoStack, clearRedoStack);
        });
        this.emit("stack-cleared", [
          {
            undoStackCleared: clearUndoStack,
            redoStackCleared: clearRedoStack
          }
        ]);
      }
    }
    /* c8 ignore next 5 */
    stopCapturing() {
      this.docs.forEach((um) => {
        um.stopCapturing();
      });
    }
    /**
     * Are undo steps available?
     *
     * @return {boolean} `true` if undo is possible
     */
    canUndo() {
      return this.undoStack.length > 0;
    }
    /**
     * Are redo steps available?
     *
     * @return {boolean} `true` if redo is possible
     */
    canRedo() {
      return this.redoStack.length > 0;
    }
    destroy() {
      this.docs.forEach((um) => um.destroy());
      super.destroy();
    }
  };

  // packages/sync/build-module/undo-manager.mjs
  function createUndoManager() {
    const yUndoManager = new YMultiDocUndoManager([], {
      // Throttle undo/redo captures after 500ms of inactivity.
      // 500 was selected from subjective local UX testing, shorter timeouts
      // may cause mid-word undo stack items.
      captureTimeout: 500,
      // Ensure that we only scope the undo/redo to the current editor.
      // The yjs document's clientID is added once it's available.
      trackedOrigins: /* @__PURE__ */ new Set([LOCAL_EDITOR_ORIGIN])
    });
    return {
      /**
       * Record changes into the history.
       * Since Yjs automatically tracks changes, this method translates the WordPress
       * HistoryRecord format into Yjs operations.
       *
       * @param _record   A record of changes to record.
       * @param _isStaged Whether to immediately create an undo point or not.
       */
      addRecord(_record, _isStaged = false) {
      },
      /**
       * Add a Yjs map to the scope of the undo manager.
       *
       * @param {Y.Map< any >} ymap                     The Yjs map to add to the scope.
       * @param                handlers
       * @param                handlers.addUndoMeta
       * @param                handlers.restoreUndoMeta
       */
      addToScope(ymap, handlers) {
        if (ymap.doc === null) {
          return;
        }
        const ydoc = ymap.doc;
        yUndoManager.addToScope(ymap);
        const { addUndoMeta, restoreUndoMeta } = handlers;
        yUndoManager.on("stack-item-added", (event) => {
          addUndoMeta(ydoc, event.stackItem.meta);
        });
        yUndoManager.on("stack-item-popped", (event) => {
          restoreUndoMeta(ydoc, event.stackItem.meta);
        });
      },
      /**
       * Undo the last recorded changes.
       *
       */
      undo() {
        if (!yUndoManager.canUndo()) {
          return;
        }
        yUndoManager.undo();
        return [];
      },
      /**
       * Redo the last undone changes.
       */
      redo() {
        if (!yUndoManager.canRedo()) {
          return;
        }
        yUndoManager.redo();
        return [];
      },
      /**
       * Check if there are changes that can be undone.
       *
       * @return {boolean} Whether there are changes to undo.
       */
      hasUndo() {
        return yUndoManager.canUndo();
      },
      /**
       * Check if there are changes that can be redone.
       *
       * @return {boolean} Whether there are changes to redo.
       */
      hasRedo() {
        return yUndoManager.canRedo();
      },
      /**
       * Stop capturing changes into the current undo item.
       * The next change will create a new undo item.
       */
      stopCapturing() {
        yUndoManager.stopCapturing();
      }
    };
  }

  // packages/sync/build-module/utils.mjs
  function createYjsDoc(documentMeta = {}) {
    const metaMap = new Map(
      Object.entries(documentMeta)
    );
    return new Doc({ meta: metaMap });
  }
  function initializeYjsDoc(ydoc) {
    const stateMap = ydoc.getMap(CRDT_STATE_MAP_KEY);
    stateMap.set(CRDT_STATE_MAP_VERSION_KEY, CRDT_DOC_VERSION);
  }
  function markEntityAsSaved(ydoc) {
    const recordMeta = ydoc.getMap(CRDT_STATE_MAP_KEY);
    recordMeta.set(CRDT_STATE_MAP_SAVED_AT_KEY, Date.now());
    recordMeta.set(CRDT_STATE_MAP_SAVED_BY_KEY, ydoc.clientID);
  }
  function pseudoRandomID() {
    return Math.floor(Math.random() * 1e9);
  }
  function serializeCrdtDoc(crdtDoc) {
    return JSON.stringify({
      document: toBase64(encodeStateAsUpdateV2(crdtDoc)),
      updateId: pseudoRandomID()
      // helps with debugging
    });
  }
  function deserializeCrdtDoc(serializedCrdtDoc) {
    try {
      const { document: document2 } = JSON.parse(serializedCrdtDoc);
      const docMeta = {
        [CRDT_DOC_META_PERSISTENCE_KEY]: true
      };
      const ydoc = createYjsDoc(docMeta);
      const yupdate = fromBase64(document2);
      applyUpdateV2(ydoc, yupdate);
      ydoc.clientID = pseudoRandomID();
      return ydoc;
    } catch (e) {
      return null;
    }
  }

  // packages/sync/build-module/manager.mjs
  function getEntityId(objectType, objectId) {
    return `${objectType}_${objectId}`;
  }
  function createSyncManager(debug = false) {
    const debugWrap = debug ? logPerformanceTiming : passThru;
    const collectionStates = /* @__PURE__ */ new Map();
    const entityStates = /* @__PURE__ */ new Map();
    let undoManager;
    function log(component, message, entityId, context = {}) {
      if (!debug) {
        return;
      }
      console.log(`[SyncManager][${component}]: ${message}`, {
        ...context,
        entityId
      });
    }
    async function loadEntity(syncConfig, objectType, objectId, record, handlers) {
      const providerCreators2 = getProviderCreators();
      const entityId = getEntityId(objectType, objectId);
      if (0 === providerCreators2.length) {
        log("loadEntity", "no providers, skipping", entityId);
        return;
      }
      if (entityStates.has(entityId)) {
        log("loadEntity", "already loaded", entityId);
        return;
      }
      log("loadEntity", "loading", entityId);
      handlers = {
        addUndoMeta: debugWrap(handlers.addUndoMeta),
        editRecord: debugWrap(handlers.editRecord),
        getEditedRecord: debugWrap(handlers.getEditedRecord),
        onStatusChange: debugWrap(handlers.onStatusChange),
        persistCRDTDoc: debugWrap(handlers.persistCRDTDoc),
        refetchRecord: debugWrap(handlers.refetchRecord),
        restoreUndoMeta: debugWrap(handlers.restoreUndoMeta)
      };
      const ydoc = createYjsDoc({ objectType });
      const recordMap = ydoc.getMap(CRDT_RECORD_MAP_KEY);
      const stateMap = ydoc.getMap(CRDT_STATE_MAP_KEY);
      const now = Date.now();
      const unload = () => {
        log("loadEntity", "unloading", entityId);
        providerResults.forEach((result) => result.destroy());
        handlers.onStatusChange(null);
        recordMap.unobserveDeep(onRecordUpdate);
        stateMap.unobserve(onStateMapUpdate);
        ydoc.destroy();
        entityStates.delete(entityId);
      };
      const awareness = syncConfig.createAwareness?.(ydoc, objectId);
      const onRecordUpdate = (_events, transaction) => {
        if (transaction.local && !(transaction.origin instanceof UndoManager)) {
          return;
        }
        void internal.updateEntityRecord(objectType, objectId);
      };
      const onStateMapUpdate = (event, transaction) => {
        if (transaction.local) {
          return;
        }
        event.keysChanged.forEach((key) => {
          switch (key) {
            case CRDT_STATE_MAP_SAVED_AT_KEY:
              const newValue = stateMap.get(CRDT_STATE_MAP_SAVED_AT_KEY);
              if ("number" === typeof newValue && newValue > now) {
                log("loadEntity", "refetching record", entityId);
                void handlers.refetchRecord().catch(() => {
                });
              }
              break;
          }
        });
      };
      if (!undoManager) {
        undoManager = createUndoManager();
      }
      const { addUndoMeta, restoreUndoMeta } = handlers;
      undoManager.addToScope(recordMap, {
        addUndoMeta,
        restoreUndoMeta
      });
      const entityState = {
        awareness,
        handlers,
        objectId,
        objectType,
        syncConfig,
        unload,
        ydoc
      };
      entityStates.set(entityId, entityState);
      log("loadEntity", "connecting", entityId);
      const providerResults = await Promise.all(
        providerCreators2.map(async (create7) => {
          const provider = await create7({
            objectType,
            objectId,
            ydoc,
            awareness
          });
          provider.on("status", handlers.onStatusChange);
          return provider;
        })
      );
      recordMap.observeDeep(onRecordUpdate);
      stateMap.observe(onStateMapUpdate);
      initializeYjsDoc(ydoc);
      internal.applyPersistedCrdtDoc(objectType, objectId, record);
    }
    async function loadCollection(syncConfig, objectType, handlers) {
      const providerCreators2 = getProviderCreators();
      const entityId = getEntityId(objectType, null);
      if (0 === providerCreators2.length) {
        log("loadCollection", "no providers, skipping", entityId);
        return;
      }
      if (collectionStates.has(objectType)) {
        log("loadCollection", "already loaded", entityId);
        return;
      }
      log("loadCollection", "loading", entityId);
      const ydoc = createYjsDoc({ collection: true, objectType });
      const stateMap = ydoc.getMap(CRDT_STATE_MAP_KEY);
      const now = Date.now();
      const unload = () => {
        log("loadCollection", "unloading", entityId);
        providerResults.forEach((result) => result.destroy());
        handlers.onStatusChange(null);
        stateMap.unobserve(onStateMapUpdate);
        ydoc.destroy();
        collectionStates.delete(objectType);
      };
      const onStateMapUpdate = (event, transaction) => {
        if (transaction.local) {
          return;
        }
        event.keysChanged.forEach((key) => {
          switch (key) {
            case CRDT_STATE_MAP_SAVED_AT_KEY:
              const newValue = stateMap.get(CRDT_STATE_MAP_SAVED_AT_KEY);
              if ("number" === typeof newValue && newValue > now) {
                void handlers.refetchRecords().catch(() => {
                });
              }
              break;
          }
        });
      };
      const awareness = syncConfig.createAwareness?.(ydoc);
      const collectionState = {
        awareness,
        handlers,
        syncConfig,
        unload,
        ydoc
      };
      collectionStates.set(objectType, collectionState);
      log("loadCollection", "connecting", entityId);
      const providerResults = await Promise.all(
        providerCreators2.map(async (create7) => {
          const provider = await create7({
            awareness,
            objectType,
            objectId: null,
            ydoc
          });
          provider.on("status", handlers.onStatusChange);
          return provider;
        })
      );
      stateMap.observe(onStateMapUpdate);
      initializeYjsDoc(ydoc);
    }
    function unloadEntity(objectType, objectId) {
      const entityId = getEntityId(objectType, objectId);
      log("unloadEntity", "unloading", entityId);
      entityStates.get(entityId)?.unload();
      updateCRDTDoc(objectType, null, {}, origin, { isSave: true });
    }
    function getAwareness(objectType, objectId) {
      const entityId = getEntityId(objectType, objectId);
      const entityState = entityStates.get(entityId);
      if (!entityState || !entityState.awareness) {
        return void 0;
      }
      return entityState.awareness;
    }
    function _applyPersistedCrdtDoc(objectType, objectId, record) {
      const entityId = getEntityId(objectType, objectId);
      const entityState = entityStates.get(entityId);
      if (!entityState) {
        log("applyPersistedCrdtDoc", "no entity state", entityId);
        return;
      }
      const {
        handlers,
        syncConfig: {
          applyChangesToCRDTDoc,
          getChangesFromCRDTDoc,
          getPersistedCRDTDoc
        },
        ydoc: targetDoc
      } = entityState;
      const serialized = getPersistedCRDTDoc?.(record);
      const tempDoc = serialized ? deserializeCrdtDoc(serialized) : null;
      if (!tempDoc) {
        log("applyPersistedCrdtDoc", "no persisted doc", entityId);
        targetDoc.transact(() => {
          applyChangesToCRDTDoc(targetDoc, record);
          handlers.persistCRDTDoc();
        }, LOCAL_SYNC_MANAGER_ORIGIN);
        return;
      }
      const update = encodeStateAsUpdateV2(tempDoc);
      applyUpdateV2(targetDoc, update);
      const invalidations = getChangesFromCRDTDoc(tempDoc, record);
      const invalidatedKeys = Object.keys(invalidations);
      tempDoc.destroy();
      if (0 === invalidatedKeys.length) {
        log("applyPersistedCrdtDoc", "valid persisted doc", entityId);
        return;
      }
      log("applyPersistedCrdtDoc", "invalidated keys", entityId, {
        invalidatedKeys
      });
      const changes = invalidatedKeys.reduce(
        (acc, key) => Object.assign(acc, {
          [key]: record[key]
        }),
        {}
      );
      targetDoc.transact(() => {
        applyChangesToCRDTDoc(targetDoc, changes);
        handlers.persistCRDTDoc();
      }, LOCAL_SYNC_MANAGER_ORIGIN);
    }
    function updateCRDTDoc(objectType, objectId, changes, origin2, options = {}) {
      const { isSave = false, isNewUndoLevel = false } = options;
      const entityId = getEntityId(objectType, objectId);
      const entityState = entityStates.get(entityId);
      const collectionState = collectionStates.get(objectType);
      if (entityState) {
        const { syncConfig, ydoc } = entityState;
        if (isNewUndoLevel && undoManager) {
          undoManager.stopCapturing?.();
        }
        ydoc.transact(() => {
          log("updateCRDTDoc", "applying changes", entityId, {
            changedKeys: Object.keys(changes)
          });
          syncConfig.applyChangesToCRDTDoc(ydoc, changes);
          if (isSave) {
            markEntityAsSaved(ydoc);
          }
        }, origin2);
      }
      if (collectionState && isSave) {
        collectionState.ydoc.transact(() => {
          markEntityAsSaved(collectionState.ydoc);
        }, origin2);
      }
    }
    async function _updateEntityRecord(objectType, objectId) {
      const entityId = getEntityId(objectType, objectId);
      const entityState = entityStates.get(entityId);
      if (!entityState) {
        log("updateEntityRecord", "no entity state", entityId);
        return;
      }
      const { handlers, syncConfig, ydoc } = entityState;
      const changes = syncConfig.getChangesFromCRDTDoc(
        ydoc,
        await handlers.getEditedRecord()
      );
      const changedKeys = Object.keys(changes);
      if (0 === changedKeys.length) {
        return;
      }
      log("updateEntityRecord", "changes", entityId, {
        changedKeys
      });
      handlers.editRecord(changes);
    }
    async function createPersistedCRDTDoc(objectType, objectId) {
      const entityId = getEntityId(objectType, objectId);
      const entityState = entityStates.get(entityId);
      if (!entityState?.ydoc) {
        return null;
      }
      await new Promise((resolve) => setTimeout(resolve, 0));
      return serializeCrdtDoc(entityState.ydoc);
    }
    const internal = {
      applyPersistedCrdtDoc: debugWrap(_applyPersistedCrdtDoc),
      updateEntityRecord: debugWrap(_updateEntityRecord)
    };
    return {
      createPersistedCRDTDoc: debugWrap(createPersistedCRDTDoc),
      getAwareness,
      load: debugWrap(loadEntity),
      loadCollection: debugWrap(loadCollection),
      // Use getter to ensure we always return the current value of `undoManager`.
      get undoManager() {
        return undoManager;
      },
      unload: debugWrap(unloadEntity),
      update: debugWrap(yieldToEventLoop(updateCRDTDoc))
    };
  }

  // packages/sync/node_modules/diff/libesm/diff/base.js
  var Diff = class {
    diff(oldStr, newStr, options = {}) {
      let callback;
      if (typeof options === "function") {
        callback = options;
        options = {};
      } else if ("callback" in options) {
        callback = options.callback;
      }
      const oldString = this.castInput(oldStr, options);
      const newString = this.castInput(newStr, options);
      const oldTokens = this.removeEmpty(this.tokenize(oldString, options));
      const newTokens = this.removeEmpty(this.tokenize(newString, options));
      return this.diffWithOptionsObj(oldTokens, newTokens, options, callback);
    }
    diffWithOptionsObj(oldTokens, newTokens, options, callback) {
      var _a;
      const done = (value) => {
        value = this.postProcess(value, options);
        if (callback) {
          setTimeout(function() {
            callback(value);
          }, 0);
          return void 0;
        } else {
          return value;
        }
      };
      const newLen = newTokens.length, oldLen = oldTokens.length;
      let editLength = 1;
      let maxEditLength = newLen + oldLen;
      if (options.maxEditLength != null) {
        maxEditLength = Math.min(maxEditLength, options.maxEditLength);
      }
      const maxExecutionTime = (_a = options.timeout) !== null && _a !== void 0 ? _a : Infinity;
      const abortAfterTimestamp = Date.now() + maxExecutionTime;
      const bestPath = [{ oldPos: -1, lastComponent: void 0 }];
      let newPos = this.extractCommon(bestPath[0], newTokens, oldTokens, 0, options);
      if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) {
        return done(this.buildValues(bestPath[0].lastComponent, newTokens, oldTokens));
      }
      let minDiagonalToConsider = -Infinity, maxDiagonalToConsider = Infinity;
      const execEditLength = () => {
        for (let diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) {
          let basePath;
          const removePath = bestPath[diagonalPath - 1], addPath = bestPath[diagonalPath + 1];
          if (removePath) {
            bestPath[diagonalPath - 1] = void 0;
          }
          let canAdd = false;
          if (addPath) {
            const addPathNewPos = addPath.oldPos - diagonalPath;
            canAdd = addPath && 0 <= addPathNewPos && addPathNewPos < newLen;
          }
          const canRemove = removePath && removePath.oldPos + 1 < oldLen;
          if (!canAdd && !canRemove) {
            bestPath[diagonalPath] = void 0;
            continue;
          }
          if (!canRemove || canAdd && removePath.oldPos < addPath.oldPos) {
            basePath = this.addToPath(addPath, true, false, 0, options);
          } else {
            basePath = this.addToPath(removePath, false, true, 1, options);
          }
          newPos = this.extractCommon(basePath, newTokens, oldTokens, diagonalPath, options);
          if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) {
            return done(this.buildValues(basePath.lastComponent, newTokens, oldTokens)) || true;
          } else {
            bestPath[diagonalPath] = basePath;
            if (basePath.oldPos + 1 >= oldLen) {
              maxDiagonalToConsider = Math.min(maxDiagonalToConsider, diagonalPath - 1);
            }
            if (newPos + 1 >= newLen) {
              minDiagonalToConsider = Math.max(minDiagonalToConsider, diagonalPath + 1);
            }
          }
        }
        editLength++;
      };
      if (callback) {
        (function exec() {
          setTimeout(function() {
            if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) {
              return callback(void 0);
            }
            if (!execEditLength()) {
              exec();
            }
          }, 0);
        })();
      } else {
        while (editLength <= maxEditLength && Date.now() <= abortAfterTimestamp) {
          const ret = execEditLength();
          if (ret) {
            return ret;
          }
        }
      }
    }
    addToPath(path, added, removed, oldPosInc, options) {
      const last2 = path.lastComponent;
      if (last2 && !options.oneChangePerToken && last2.added === added && last2.removed === removed) {
        return {
          oldPos: path.oldPos + oldPosInc,
          lastComponent: { count: last2.count + 1, added, removed, previousComponent: last2.previousComponent }
        };
      } else {
        return {
          oldPos: path.oldPos + oldPosInc,
          lastComponent: { count: 1, added, removed, previousComponent: last2 }
        };
      }
    }
    extractCommon(basePath, newTokens, oldTokens, diagonalPath, options) {
      const newLen = newTokens.length, oldLen = oldTokens.length;
      let oldPos = basePath.oldPos, newPos = oldPos - diagonalPath, commonCount = 0;
      while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(oldTokens[oldPos + 1], newTokens[newPos + 1], options)) {
        newPos++;
        oldPos++;
        commonCount++;
        if (options.oneChangePerToken) {
          basePath.lastComponent = { count: 1, previousComponent: basePath.lastComponent, added: false, removed: false };
        }
      }
      if (commonCount && !options.oneChangePerToken) {
        basePath.lastComponent = { count: commonCount, previousComponent: basePath.lastComponent, added: false, removed: false };
      }
      basePath.oldPos = oldPos;
      return newPos;
    }
    equals(left, right, options) {
      if (options.comparator) {
        return options.comparator(left, right);
      } else {
        return left === right || !!options.ignoreCase && left.toLowerCase() === right.toLowerCase();
      }
    }
    removeEmpty(array) {
      const ret = [];
      for (let i = 0; i < array.length; i++) {
        if (array[i]) {
          ret.push(array[i]);
        }
      }
      return ret;
    }
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
    castInput(value, options) {
      return value;
    }
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
    tokenize(value, options) {
      return Array.from(value);
    }
    join(chars) {
      return chars.join("");
    }
    postProcess(changeObjects, options) {
      return changeObjects;
    }
    get useLongestToken() {
      return false;
    }
    buildValues(lastComponent, newTokens, oldTokens) {
      const components = [];
      let nextComponent;
      while (lastComponent) {
        components.push(lastComponent);
        nextComponent = lastComponent.previousComponent;
        delete lastComponent.previousComponent;
        lastComponent = nextComponent;
      }
      components.reverse();
      const componentLen = components.length;
      let componentPos = 0, newPos = 0, oldPos = 0;
      for (; componentPos < componentLen; componentPos++) {
        const component = components[componentPos];
        if (!component.removed) {
          if (!component.added && this.useLongestToken) {
            let value = newTokens.slice(newPos, newPos + component.count);
            value = value.map(function(value2, i) {
              const oldValue = oldTokens[oldPos + i];
              return oldValue.length > value2.length ? oldValue : value2;
            });
            component.value = this.join(value);
          } else {
            component.value = this.join(newTokens.slice(newPos, newPos + component.count));
          }
          newPos += component.count;
          if (!component.added) {
            oldPos += component.count;
          }
        } else {
          component.value = this.join(oldTokens.slice(oldPos, oldPos + component.count));
          oldPos += component.count;
        }
      }
      return components;
    }
  };

  // packages/sync/node_modules/diff/libesm/diff/character.js
  var CharacterDiff = class extends Diff {
  };
  var characterDiff = new CharacterDiff();
  function diffChars(oldStr, newStr, options) {
    return characterDiff.diff(oldStr, newStr, options);
  }

  // packages/sync/node_modules/diff/libesm/diff/line.js
  var LineDiff = class extends Diff {
    constructor() {
      super(...arguments);
      this.tokenize = tokenize;
    }
    equals(left, right, options) {
      if (options.ignoreWhitespace) {
        if (!options.newlineIsToken || !left.includes("\n")) {
          left = left.trim();
        }
        if (!options.newlineIsToken || !right.includes("\n")) {
          right = right.trim();
        }
      } else if (options.ignoreNewlineAtEof && !options.newlineIsToken) {
        if (left.endsWith("\n")) {
          left = left.slice(0, -1);
        }
        if (right.endsWith("\n")) {
          right = right.slice(0, -1);
        }
      }
      return super.equals(left, right, options);
    }
  };
  var lineDiff = new LineDiff();
  function diffLines(oldStr, newStr, options) {
    return lineDiff.diff(oldStr, newStr, options);
  }
  function tokenize(value, options) {
    if (options.stripTrailingCr) {
      value = value.replace(/\r\n/g, "\n");
    }
    const retLines = [], linesAndNewlines = value.split(/(\n|\r\n)/);
    if (!linesAndNewlines[linesAndNewlines.length - 1]) {
      linesAndNewlines.pop();
    }
    for (let i = 0; i < linesAndNewlines.length; i++) {
      const line = linesAndNewlines[i];
      if (i % 2 && !options.newlineIsToken) {
        retLines[retLines.length - 1] += line;
      } else {
        retLines.push(line);
      }
    }
    return retLines;
  }

  // packages/sync/build-module/quill-delta/Delta.mjs
  var import_es62 = __toESM(require_es6(), 1);

  // packages/sync/build-module/quill-delta/AttributeMap.mjs
  var import_es6 = __toESM(require_es6(), 1);
  function cloneDeep(value) {
    return JSON.parse(JSON.stringify(value));
  }
  var AttributeMap;
  ((AttributeMap2) => {
    function compose(a = {}, b = {}, keepNull = false) {
      if (typeof a !== "object") {
        a = {};
      }
      if (typeof b !== "object") {
        b = {};
      }
      let attributes = cloneDeep(b);
      if (!keepNull) {
        attributes = Object.keys(attributes).reduce(
          (copy2, key) => {
            if (attributes[key] !== null || attributes[key] !== void 0) {
              copy2[key] = attributes[key];
            }
            return copy2;
          },
          {}
        );
      }
      for (const key in a) {
        if (a[key] !== void 0 && b[key] === void 0) {
          attributes[key] = a[key];
        }
      }
      return Object.keys(attributes).length > 0 ? attributes : void 0;
    }
    AttributeMap2.compose = compose;
    function diff(a = {}, b = {}) {
      if (typeof a !== "object") {
        a = {};
      }
      if (typeof b !== "object") {
        b = {};
      }
      const attributes = Object.keys(a).concat(Object.keys(b)).reduce((attrs, key) => {
        if (!(0, import_es6.default)(a[key], b[key])) {
          attrs[key] = b[key] === void 0 ? null : b[key];
        }
        return attrs;
      }, {});
      return Object.keys(attributes).length > 0 ? attributes : void 0;
    }
    AttributeMap2.diff = diff;
    function invert(attr = {}, base = {}) {
      attr = attr || {};
      const baseInverted = Object.keys(base).reduce(
        (memo, key) => {
          if (base[key] !== attr[key] && attr[key] !== void 0) {
            memo[key] = base[key];
          }
          return memo;
        },
        {}
      );
      return Object.keys(attr).reduce((memo, key) => {
        if (attr[key] !== base[key] && base[key] === void 0) {
          memo[key] = null;
        }
        return memo;
      }, baseInverted);
    }
    AttributeMap2.invert = invert;
    function transform(a, b, priority = false) {
      if (typeof a !== "object") {
        return b;
      }
      if (typeof b !== "object") {
        return void 0;
      }
      if (!priority) {
        return b;
      }
      const attributes = Object.keys(b).reduce(
        (attrs, key) => {
          if (a[key] === void 0) {
            attrs[key] = b[key];
          }
          return attrs;
        },
        {}
      );
      return Object.keys(attributes).length > 0 ? attributes : void 0;
    }
    AttributeMap2.transform = transform;
  })(AttributeMap || (AttributeMap = {}));
  var AttributeMap_default = AttributeMap;

  // packages/sync/build-module/quill-delta/Op.mjs
  var Op;
  ((Op2) => {
    function length3(op) {
      if (typeof op.delete === "number") {
        return op.delete;
      } else if (typeof op.retain === "number") {
        return op.retain;
      } else if (typeof op.retain === "object" && op.retain !== null) {
        return 1;
      }
      return typeof op.insert === "string" ? op.insert.length : 1;
    }
    Op2.length = length3;
  })(Op || (Op = {}));
  var Op_default = Op;

  // packages/sync/build-module/quill-delta/OpIterator.mjs
  var Iterator = class {
    ops;
    index;
    offset;
    constructor(ops) {
      this.ops = ops;
      this.index = 0;
      this.offset = 0;
    }
    hasNext() {
      return this.peekLength() < Infinity;
    }
    next(length3) {
      if (!length3) {
        length3 = Infinity;
      }
      const nextOp = this.ops[this.index];
      if (nextOp) {
        const offset = this.offset;
        const opLength = Op_default.length(nextOp);
        if (length3 >= opLength - offset) {
          length3 = opLength - offset;
          this.index += 1;
          this.offset = 0;
        } else {
          this.offset += length3;
        }
        if (typeof nextOp.delete === "number") {
          return { delete: length3 };
        }
        const retOp = {};
        if (nextOp.attributes) {
          retOp.attributes = nextOp.attributes;
        }
        if (typeof nextOp.retain === "number") {
          retOp.retain = length3;
        } else if (typeof nextOp.retain === "object" && nextOp.retain !== null) {
          retOp.retain = nextOp.retain;
        } else if (typeof nextOp.insert === "string") {
          retOp.insert = nextOp.insert.substr(offset, length3);
        } else {
          retOp.insert = nextOp.insert;
        }
        return retOp;
      }
      return { retain: Infinity };
    }
    peek() {
      return this.ops[this.index];
    }
    peekLength() {
      if (this.ops[this.index]) {
        return Op_default.length(this.ops[this.index]) - this.offset;
      }
      return Infinity;
    }
    peekType() {
      const op = this.ops[this.index];
      if (op) {
        if (typeof op.delete === "number") {
          return "delete";
        } else if (typeof op.retain === "number" || typeof op.retain === "object" && op.retain !== null) {
          return "retain";
        }
        return "insert";
      }
      return "retain";
    }
    rest() {
      if (!this.hasNext()) {
        return [];
      } else if (this.offset === 0) {
        return this.ops.slice(this.index);
      }
      const offset = this.offset;
      const index = this.index;
      const next = this.next();
      const rest = this.ops.slice(this.index);
      this.offset = offset;
      this.index = index;
      return [next].concat(rest);
    }
  };

  // packages/sync/build-module/quill-delta/Delta.mjs
  function cloneDeep2(value) {
    return JSON.parse(JSON.stringify(value));
  }
  var NULL_CHARACTER = String.fromCharCode(0);
  var STRING_TOO_LARGE_THRESHOLD = 1e4;
  function normalizeChangeCounts(changes) {
    return changes.map((change) => ({
      ...change,
      count: change.value.length
    }));
  }
  var getEmbedTypeAndData = (a, b) => {
    if (typeof a !== "object" || a === null) {
      throw new Error(`cannot retain a ${typeof a}`);
    }
    if (typeof b !== "object" || b === null) {
      throw new Error(`cannot retain a ${typeof b}`);
    }
    const embedType = Object.keys(a)[0];
    if (!embedType || embedType !== Object.keys(b)[0]) {
      throw new Error(
        `embed types not matched: ${embedType} != ${Object.keys(b)[0]}`
      );
    }
    return [embedType, a[embedType], b[embedType]];
  };
  var Delta = class _Delta {
    static Op = Op_default;
    static OpIterator = Iterator;
    static AttributeMap = AttributeMap_default;
    static handlers = {};
    static registerEmbed(embedType, handler) {
      this.handlers[embedType] = handler;
    }
    static unregisterEmbed(embedType) {
      delete this.handlers[embedType];
    }
    static getHandler(embedType) {
      const handler = this.handlers[embedType];
      if (!handler) {
        throw new Error(`no handlers for embed type "${embedType}"`);
      }
      return handler;
    }
    ops;
    constructor(ops) {
      if (Array.isArray(ops)) {
        this.ops = ops;
      } else if (ops !== null && ops !== void 0 && Array.isArray(ops.ops)) {
        this.ops = ops.ops;
      } else {
        this.ops = [];
      }
    }
    insert(arg, attributes) {
      const newOp = {};
      if (typeof arg === "string" && arg.length === 0) {
        return this;
      }
      newOp.insert = arg;
      if (attributes !== null && attributes !== void 0 && typeof attributes === "object" && Object.keys(attributes).length > 0) {
        newOp.attributes = attributes;
      }
      return this.push(newOp);
    }
    delete(length3) {
      if (length3 <= 0) {
        return this;
      }
      return this.push({ delete: length3 });
    }
    retain(length3, attributes) {
      if (typeof length3 === "number" && length3 <= 0) {
        return this;
      }
      const newOp = { retain: length3 };
      if (attributes !== null && attributes !== void 0 && typeof attributes === "object" && Object.keys(attributes).length > 0) {
        newOp.attributes = attributes;
      }
      return this.push(newOp);
    }
    push(newOp) {
      let index = this.ops.length;
      let lastOp = this.ops[index - 1];
      newOp = cloneDeep2(newOp);
      if (typeof lastOp === "object") {
        if (typeof newOp.delete === "number" && typeof lastOp.delete === "number") {
          this.ops[index - 1] = {
            delete: lastOp.delete + newOp.delete
          };
          return this;
        }
        if (typeof lastOp.delete === "number" && newOp.insert !== null && newOp.insert !== void 0) {
          index -= 1;
          lastOp = this.ops[index - 1];
          if (typeof lastOp !== "object") {
            this.ops.unshift(newOp);
            return this;
          }
        }
        if ((0, import_es62.default)(newOp.attributes, lastOp.attributes)) {
          if (typeof newOp.insert === "string" && typeof lastOp.insert === "string") {
            this.ops[index - 1] = {
              insert: lastOp.insert + newOp.insert
            };
            if (typeof newOp.attributes === "object") {
              this.ops[index - 1].attributes = newOp.attributes;
            }
            return this;
          } else if (typeof newOp.retain === "number" && typeof lastOp.retain === "number") {
            this.ops[index - 1] = {
              retain: lastOp.retain + newOp.retain
            };
            if (typeof newOp.attributes === "object") {
              this.ops[index - 1].attributes = newOp.attributes;
            }
            return this;
          }
        }
      }
      if (index === this.ops.length) {
        this.ops.push(newOp);
      } else {
        this.ops.splice(index, 0, newOp);
      }
      return this;
    }
    chop() {
      const lastOp = this.ops[this.ops.length - 1];
      if (lastOp && typeof lastOp.retain === "number" && !lastOp.attributes) {
        this.ops.pop();
      }
      return this;
    }
    filter(predicate) {
      return this.ops.filter(predicate);
    }
    forEach(predicate) {
      this.ops.forEach(predicate);
    }
    map(predicate) {
      return this.ops.map(predicate);
    }
    partition(predicate) {
      const passed = [];
      const failed = [];
      this.forEach((op) => {
        const target = predicate(op) ? passed : failed;
        target.push(op);
      });
      return [passed, failed];
    }
    reduce(predicate, initialValue) {
      return this.ops.reduce(predicate, initialValue);
    }
    changeLength() {
      return this.reduce((length3, elem) => {
        if (elem.insert) {
          return length3 + Op_default.length(elem);
        } else if (elem.delete) {
          return length3 - elem.delete;
        }
        return length3;
      }, 0);
    }
    length() {
      return this.reduce((length3, elem) => {
        return length3 + Op_default.length(elem);
      }, 0);
    }
    slice(start = 0, end = Infinity) {
      const ops = [];
      const iter = new Iterator(this.ops);
      let index = 0;
      while (index < end && iter.hasNext()) {
        let nextOp;
        if (index < start) {
          nextOp = iter.next(start - index);
        } else {
          nextOp = iter.next(end - index);
          ops.push(nextOp);
        }
        index += Op_default.length(nextOp);
      }
      return new _Delta(ops);
    }
    compose(other) {
      const thisIter = new Iterator(this.ops);
      const otherIter = new Iterator(other.ops);
      const ops = [];
      const firstOther = otherIter.peek();
      if (firstOther !== null && firstOther !== void 0 && typeof firstOther.retain === "number" && (firstOther.attributes === null || firstOther.attributes === void 0)) {
        let firstLeft = firstOther.retain;
        while (thisIter.peekType() === "insert" && thisIter.peekLength() <= firstLeft) {
          firstLeft -= thisIter.peekLength();
          ops.push(thisIter.next());
        }
        if (firstOther.retain - firstLeft > 0) {
          otherIter.next(firstOther.retain - firstLeft);
        }
      }
      const delta = new _Delta(ops);
      while (thisIter.hasNext() || otherIter.hasNext()) {
        if (otherIter.peekType() === "insert") {
          delta.push(otherIter.next());
        } else if (thisIter.peekType() === "delete") {
          delta.push(thisIter.next());
        } else {
          const length3 = Math.min(
            thisIter.peekLength(),
            otherIter.peekLength()
          );
          const thisOp = thisIter.next(length3);
          const otherOp = otherIter.next(length3);
          if (otherOp.retain) {
            const newOp = {};
            if (typeof thisOp.retain === "number") {
              newOp.retain = typeof otherOp.retain === "number" ? length3 : otherOp.retain;
            } else if (typeof otherOp.retain === "number") {
              if (thisOp.retain === null || thisOp.retain === void 0) {
                newOp.insert = thisOp.insert;
              } else {
                newOp.retain = thisOp.retain;
              }
            } else {
              const action = thisOp.retain === null || thisOp.retain === void 0 ? "insert" : "retain";
              const [embedType, thisData, otherData] = getEmbedTypeAndData(
                thisOp[action],
                otherOp.retain
              );
              const handler = _Delta.getHandler(embedType);
              newOp[action] = {
                [embedType]: handler.compose(
                  thisData,
                  otherData,
                  action === "retain"
                )
              };
            }
            const attributes = AttributeMap_default.compose(
              thisOp.attributes,
              otherOp.attributes,
              typeof thisOp.retain === "number"
            );
            if (attributes) {
              newOp.attributes = attributes;
            }
            delta.push(newOp);
            if (!otherIter.hasNext() && (0, import_es62.default)(delta.ops[delta.ops.length - 1], newOp)) {
              const rest = new _Delta(thisIter.rest());
              return delta.concat(rest).chop();
            }
          } else if (typeof otherOp.delete === "number" && (typeof thisOp.retain === "number" || typeof thisOp.retain === "object" && thisOp.retain !== null)) {
            delta.push(otherOp);
          }
        }
      }
      return delta.chop();
    }
    concat(other) {
      const delta = new _Delta(this.ops.slice());
      if (other.ops.length > 0) {
        delta.push(other.ops[0]);
        delta.ops = delta.ops.concat(other.ops.slice(1));
      }
      return delta;
    }
    diff(other) {
      if (this.ops === other.ops) {
        return new _Delta();
      }
      const strings = this.deltasToStrings(other);
      const diffResult = normalizeChangeCounts(
        diffChars(strings[0], strings[1])
      );
      const thisIter = new Iterator(this.ops);
      const otherIter = new Iterator(other.ops);
      const retDelta = this.convertChangesToDelta(
        diffResult,
        thisIter,
        otherIter
      );
      return retDelta.chop();
    }
    eachLine(predicate, newline = "\n") {
      const iter = new Iterator(this.ops);
      let line = new _Delta();
      let i = 0;
      while (iter.hasNext()) {
        if (iter.peekType() !== "insert") {
          return;
        }
        const thisOp = iter.peek();
        const start = Op_default.length(thisOp) - iter.peekLength();
        const index = typeof thisOp.insert === "string" ? thisOp.insert.indexOf(newline, start) - start : -1;
        if (index < 0) {
          line.push(iter.next());
        } else if (index > 0) {
          line.push(iter.next(index));
        } else {
          if (predicate(line, iter.next(1).attributes || {}, i) === false) {
            return;
          }
          i += 1;
          line = new _Delta();
        }
      }
      if (line.length() > 0) {
        predicate(line, {}, i);
      }
    }
    invert(base) {
      const inverted = new _Delta();
      this.reduce((baseIndex, op) => {
        if (op.insert) {
          inverted.delete(Op_default.length(op));
        } else if (typeof op.retain === "number" && (op.attributes === null || op.attributes === void 0)) {
          inverted.retain(op.retain);
          return baseIndex + op.retain;
        } else if (op.delete || typeof op.retain === "number") {
          const length3 = op.delete || op.retain;
          const slice = base.slice(baseIndex, baseIndex + length3);
          slice.forEach((baseOp) => {
            if (op.delete) {
              inverted.push(baseOp);
            } else if (op.retain && op.attributes) {
              inverted.retain(
                Op_default.length(baseOp),
                AttributeMap_default.invert(
                  op.attributes,
                  baseOp.attributes
                )
              );
            }
          });
          return baseIndex + length3;
        } else if (typeof op.retain === "object" && op.retain !== null) {
          const slice = base.slice(baseIndex, baseIndex + 1);
          const baseOp = new Iterator(slice.ops).next();
          const [embedType, opData, baseOpData] = getEmbedTypeAndData(
            op.retain,
            baseOp.insert
          );
          const handler = _Delta.getHandler(embedType);
          inverted.retain(
            { [embedType]: handler.invert(opData, baseOpData) },
            AttributeMap_default.invert(op.attributes, baseOp.attributes)
          );
          return baseIndex + 1;
        }
        return baseIndex;
      }, 0);
      return inverted.chop();
    }
    transform(arg, priority = false) {
      priority = !!priority;
      if (typeof arg === "number") {
        return this.transformPosition(arg, priority);
      }
      const other = arg;
      const thisIter = new Iterator(this.ops);
      const otherIter = new Iterator(other.ops);
      const delta = new _Delta();
      while (thisIter.hasNext() || otherIter.hasNext()) {
        if (thisIter.peekType() === "insert" && (priority || otherIter.peekType() !== "insert")) {
          delta.retain(Op_default.length(thisIter.next()));
        } else if (otherIter.peekType() === "insert") {
          delta.push(otherIter.next());
        } else {
          const length3 = Math.min(
            thisIter.peekLength(),
            otherIter.peekLength()
          );
          const thisOp = thisIter.next(length3);
          const otherOp = otherIter.next(length3);
          if (thisOp.delete) {
            continue;
          } else if (otherOp.delete) {
            delta.push(otherOp);
          } else {
            const thisData = thisOp.retain;
            const otherData = otherOp.retain;
            let transformedData = typeof otherData === "object" && otherData !== null ? otherData : length3;
            if (typeof thisData === "object" && thisData !== null && typeof otherData === "object" && otherData !== null) {
              const embedType = Object.keys(thisData)[0];
              if (embedType === Object.keys(otherData)[0]) {
                const handler = _Delta.getHandler(embedType);
                if (handler) {
                  transformedData = {
                    [embedType]: handler.transform(
                      thisData[embedType],
                      otherData[embedType],
                      priority
                    )
                  };
                }
              }
            }
            delta.retain(
              transformedData,
              AttributeMap_default.transform(
                thisOp.attributes,
                otherOp.attributes,
                priority
              )
            );
          }
        }
      }
      return delta.chop();
    }
    transformPosition(index, priority = false) {
      priority = !!priority;
      const thisIter = new Iterator(this.ops);
      let offset = 0;
      while (thisIter.hasNext() && offset <= index) {
        const length3 = thisIter.peekLength();
        const nextType = thisIter.peekType();
        thisIter.next();
        if (nextType === "delete") {
          index -= Math.min(length3, index - offset);
          continue;
        } else if (nextType === "insert" && (offset < index || !priority)) {
          index += length3;
        }
        offset += length3;
      }
      return index;
    }
    /**
     * Given a Delta and a cursor position, do a diff and attempt to adjust
     * the diff to place insertions or deletions at the cursor position.
     *
     * @param other             - The other Delta to diff against.
     * @param cursorAfterChange - The cursor position index after the change.
     * @return A Delta that attempts to place insertions or deletions at the cursor position.
     */
    diffWithCursor(other, cursorAfterChange) {
      if (this.ops === other.ops) {
        return new _Delta();
      }
      const strings = this.deltasToStrings(other);
      const maxStringLength = Math.max(
        ...strings.map((str) => str.length)
      );
      if (maxStringLength > STRING_TOO_LARGE_THRESHOLD) {
        const diffResult = normalizeChangeCounts(
          diffLines(strings[0], strings[1])
        );
        const thisIterLarge = new Iterator(this.ops);
        const otherIterLarge = new Iterator(other.ops);
        return this.convertChangesToDelta(
          diffResult,
          thisIterLarge,
          otherIterLarge
        ).chop();
      } else if (cursorAfterChange === null) {
        return this.diff(other);
      }
      let diffs = normalizeChangeCounts(
        diffChars(strings[0], strings[1])
      );
      let lastDiffPosition = 0;
      const adjustedDiffs = [];
      for (let i = 0; i < diffs.length; i++) {
        const diff = diffs[i];
        const segmentStart = lastDiffPosition;
        const segmentEnd = lastDiffPosition + (diff.count ?? 0);
        const isCursorInSegment = cursorAfterChange > segmentStart && cursorAfterChange <= segmentEnd;
        const isUnchangedSegment = !diff.added && !diff.removed;
        const isRemovalSegment = diff.removed && !diff.added;
        const nextDiff = diffs[i + 1];
        const isNextDiffAnInsert = nextDiff && nextDiff.added && !nextDiff.removed;
        if (isUnchangedSegment && isCursorInSegment && isNextDiffAnInsert) {
          const movedSegments = this.tryMoveInsertionToCursor(
            diff,
            nextDiff,
            cursorAfterChange,
            segmentStart
          );
          if (movedSegments) {
            adjustedDiffs.push(...movedSegments);
            i++;
            lastDiffPosition = segmentEnd;
            continue;
          }
        }
        if (isRemovalSegment) {
          const movedSegments = this.tryMoveDeletionToCursor(
            diff,
            adjustedDiffs,
            cursorAfterChange,
            lastDiffPosition
          );
          if (movedSegments) {
            adjustedDiffs.pop();
            adjustedDiffs.push(...movedSegments);
            lastDiffPosition += diff.count ?? 0;
            continue;
          }
        }
        adjustedDiffs.push(diff);
        if (!diff.added) {
          lastDiffPosition += diff.count ?? 0;
        }
      }
      diffs = adjustedDiffs;
      const thisIter = new Iterator(this.ops);
      const otherIter = new Iterator(other.ops);
      const retDelta = this.convertChangesToDelta(
        diffs,
        thisIter,
        otherIter
      );
      return retDelta.chop();
    }
    /**
     * Try to move an insertion operation from after an unchanged segment to the cursor position within it.
     * This is a "look-ahead" strategy.
     *
     * @param diff              - The current unchanged diff segment.
     * @param nextDiff          - The next diff segment (expected to be an insertion).
     * @param cursorAfterChange - The cursor position after the change.
     * @param segmentStart      - The start position of the current segment.
     * @return An array of adjusted diff segments if the insertion was successfully moved, null otherwise.
     */
    tryMoveInsertionToCursor(diff, nextDiff, cursorAfterChange, segmentStart) {
      const nextDiffInsert = nextDiff.value;
      const insertLength = nextDiffInsert.length;
      const insertOffset = cursorAfterChange - segmentStart - insertLength;
      const textAtCursor = diff.value.substring(
        insertOffset,
        insertOffset + nextDiffInsert.length
      );
      const isInsertMoveable = textAtCursor === nextDiffInsert;
      if (!isInsertMoveable) {
        return null;
      }
      const beforeCursor = diff.value.substring(0, insertOffset);
      const afterCursor = diff.value.substring(insertOffset);
      const result = [];
      if (beforeCursor.length > 0) {
        result.push({
          value: beforeCursor,
          count: beforeCursor.length,
          added: false,
          removed: false
        });
      }
      result.push(nextDiff);
      if (afterCursor.length > 0) {
        result.push({
          value: afterCursor,
          count: afterCursor.length,
          added: false,
          removed: false
        });
      }
      return result;
    }
    /**
     * Try to move a deletion operation to the cursor position by looking back at the previous unchanged segment.
     * This is a "look-back" strategy.
     *
     * @param diff              - The current deletion diff segment.
     * @param adjustedDiffs     - The array of previously processed diff segments.
     * @param cursorAfterChange - The cursor position after the change.
     * @param lastDiffPosition  - The position in the document up to (but not including) the current diff.
     * @return An array of adjusted diff segments if the deletion was successfully moved, null otherwise.
     */
    tryMoveDeletionToCursor(diff, adjustedDiffs, cursorAfterChange, lastDiffPosition) {
      const prevDiff = adjustedDiffs[adjustedDiffs.length - 1];
      if (!prevDiff || prevDiff.added || prevDiff.removed) {
        return null;
      }
      const prevSegmentStart = lastDiffPosition - (prevDiff.count ?? 0);
      const prevSegmentEnd = lastDiffPosition;
      if (cursorAfterChange < prevSegmentStart || cursorAfterChange >= prevSegmentEnd) {
        return null;
      }
      const deletedChars = diff.value;
      const deleteOffset = cursorAfterChange - prevSegmentStart;
      const textAtCursor = prevDiff.value.substring(
        deleteOffset,
        deleteOffset + deletedChars.length
      );
      const canBePlacedHere = textAtCursor === deletedChars;
      if (!canBePlacedHere) {
        return null;
      }
      const beforeCursor = prevDiff.value.substring(0, deleteOffset);
      const atAndAfterCursor = prevDiff.value.substring(deleteOffset);
      const deletionLength = diff.count ?? 0;
      const afterDeletion = atAndAfterCursor.substring(deletionLength);
      const result = [];
      if (beforeCursor.length > 0) {
        result.push({
          value: beforeCursor,
          count: beforeCursor.length,
          added: false,
          removed: false
        });
      }
      result.push(diff);
      if (afterDeletion.length > 0) {
        result.push({
          value: afterDeletion,
          count: afterDeletion.length,
          added: false,
          removed: false
        });
      }
      return result;
    }
    /**
     * Convert two Deltas to string representations for diffing.
     *
     * @param other - The other Delta to convert.
     * @return A tuple of [thisString, otherString].
     */
    deltasToStrings(other) {
      return [this, other].map((delta) => {
        return delta.map((op) => {
          if (op.insert !== null || op.insert !== void 0) {
            return typeof op.insert === "string" ? op.insert : NULL_CHARACTER;
          }
          const prep = delta === other ? "on" : "with";
          throw new Error(
            "diff() called " + prep + " non-document"
          );
        }).join("");
      });
    }
    /**
     * Process diff changes and convert them to Delta operations.
     *
     * @param changes   - The array of changes from the diff algorithm.
     * @param thisIter  - Iterator for this Delta's operations.
     * @param otherIter - Iterator for the other Delta's operations.
     * @return A Delta containing the processed diff operations.
     */
    convertChangesToDelta(changes, thisIter, otherIter) {
      const retDelta = new _Delta();
      changes.forEach((component) => {
        let length3 = component.count ?? 0;
        while (length3 > 0) {
          let opLength = 0;
          if (component.added) {
            opLength = Math.min(otherIter.peekLength(), length3);
            retDelta.push(otherIter.next(opLength));
          } else if (component.removed) {
            opLength = Math.min(length3, thisIter.peekLength());
            thisIter.next(opLength);
            retDelta.delete(opLength);
          } else {
            opLength = Math.min(
              thisIter.peekLength(),
              otherIter.peekLength(),
              length3
            );
            const thisOp = thisIter.next(opLength);
            const otherOp = otherIter.next(opLength);
            if ((0, import_es62.default)(thisOp.insert, otherOp.insert)) {
              retDelta.retain(
                opLength,
                AttributeMap_default.diff(
                  thisOp.attributes,
                  otherOp.attributes
                )
              );
            } else {
              retDelta.push(otherOp).delete(opLength);
            }
          }
          length3 -= opLength;
        }
      });
      return retDelta;
    }
  };
  var Delta_default = Delta;

  // packages/sync/build-module/private-apis.mjs
  var privateApis = {};
  lock(privateApis, {
    ConnectionErrorCode,
    createSyncManager,
    Delta: Delta_default,
    CRDT_DOC_META_PERSISTENCE_KEY,
    CRDT_RECORD_MAP_KEY,
    LOCAL_EDITOR_ORIGIN,
    LOCAL_UNDO_IGNORED_ORIGIN,
    retrySyncConnection: () => pollingManager.retryNow()
  });

  // packages/sync/build-module/index.mjs
  var YJS_VERSION = "13";
  return __toCommonJS(index_exports);
})();
                                                                                                     dist/theme.min.js                                                                                   0000644                 00000160126 15212564037 0007744 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;(wp||={}).theme=(()=>{var ao=Object.create;var Le=Object.defineProperty;var no=Object.getOwnPropertyDescriptor;var so=Object.getOwnPropertyNames;var io=Object.getPrototypeOf,lo=Object.prototype.hasOwnProperty;var Ve=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),fo=(t,e)=>{for(var r in e)Le(t,r,{get:e[r],enumerable:!0})},Nt=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of so(e))!lo.call(t,a)&&a!==r&&Le(t,a,{get:()=>e[a],enumerable:!(o=no(e,a))||o.enumerable});return t};var de=(t,e,r)=>(r=t!=null?ao(io(t)):{},Nt(e||!t||!t.__esModule?Le(r,"default",{value:t,enumerable:!0}):r,t)),co=t=>Nt(Le({},"__esModule",{value:!0}),t);var Pt=Ve((ya,Bt)=>{Bt.exports=window.wp.privateApis});var Re=Ve((va,Ft)=>{Ft.exports=window.wp.element});var Ur=Ve((Mf,Kr)=>{Kr.exports=window.ReactJSXRuntime});var wa={};fo(wa,{privateApis:()=>At});var Ht=de(Pt(),1),{lock:$t,unlock:Sa}=(0,Ht.__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/theme");var Ue=de(Re(),1);var jt=de(Re(),1),Ie=(0,jt.createContext)({resolvedSettings:{color:{}}});function et(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function M(t,e,r=[0,0,0]){let o=et(t,e[0]),a=et(t,e[1]),s=et(t,e[2]);return r[0]=o,r[1]=a,r[2]=s,r}function Ae(t){return ee(t)==="string"}function ee(t){return(Object.prototype.toString.call(t).match(/^\[object\s+(.*?)\]$/)[1]||"").toLowerCase()}function Oe(t,{precision:e=16,unit:r}){return L(t)?"none":(t=+tt(t,e),t+(r??""))}function L(t){return t===null}function tt(t,e){if(t===0)return 0;let r=~~t,o=0;r&&e&&(o=~~Math.log10(Math.abs(r))+1);let a=10**(e-o);return Math.floor(t*a+.5)/a}function rt(t,e,r){return isNaN(t)?e:isNaN(e)?t:t+(e-t)*r}function uo(t,e,r){return(r-t)/(e-t)}function ot(t,e,r){return!t||!e||t===e||t[0]===e[0]&&t[1]===e[1]||isNaN(r)||r===null?r:rt(e[0],e[1],uo(t[0],t[1],r))}function Te(t,e,r){return Math.max(Math.min(r,e),t)}function Ee(t,e){return Math.sign(t)===Math.sign(e)?t:-t}function O(t,e){return Ee(Math.abs(t)**e,t)}function at(t,e){return e===0?0:t/e}function Gt(t,e,r=0,o=t.length){for(;r<o;){let a=r+o>>1;t[a]<e?r=a+1:o=a}return r}function ie(t,e){if(t instanceof e)return!0;let r=e.name;for(;t;){let o=Object.getPrototypeOf(t),a=o?.constructor?.name;if(a===r)return!0;if(!a||a==="Object")return!1;t=o}return!1}var le=class{type;coordMeta;coordRange;range;constructor(e,r){if(typeof e=="object"&&(this.coordMeta=e),r&&(this.coordMeta=r,this.coordRange=r.range??r.refRange),typeof e=="string"){let o=e.trim().match(/^(?<type><[a-z]+>)(\[(?<min>-?[.\d]+),\s*(?<max>-?[.\d]+)\])?$/);if(!o)throw new TypeError(`Cannot parse ${e} as a type definition.`);this.type=o.groups.type;let{min:a,max:s}=o.groups;(a||s)&&(this.range=[+a,+s])}}get computedRange(){return this.range?this.range:this.type==="<percentage>"?this.percentageRange():this.type==="<angle>"?[0,360]:null}get unit(){return this.type==="<percentage>"?"%":this.type==="<angle>"?"deg":""}resolve(e){if(this.type==="<angle>")return e;let r=this.computedRange,o=this.coordRange;return this.type==="<percentage>"&&(o??=this.percentageRange()),ot(r,o,e)}serialize(e,r){let o=this.type==="<percentage>"?this.percentageRange(100):this.computedRange,a=this.unit;return e=ot(this.coordRange,o,e),Oe(e,{unit:a,precision:r})}toString(){let e=this.type;if(this.range){let[r="",o=""]=this.range;e+=`[${r},${o}]`}return e}percentageRange(e=1){let r;return this.coordMeta&&this.coordMeta.range||this.coordRange&&this.coordRange[0]>=0?r=[0,1]:r=[-1,1],[r[0]*e,r[1]*e]}static get(e,r){return ie(e,this)?e:new this(e,r)}};var nt=Symbol("instance"),fe=class t{type;name;spaceCoords;coords;id;alpha;constructor(e,r=e.space){e[nt]=this,this.type="function",this.name="color",Object.assign(this,e),this.space=r,this.type!=="custom"&&(this.spaceCoords=Object.values(r.coords),this.coords||(this.coords=this.spaceCoords.map(o=>{let a=["<number>","<percentage>"];return o.type==="angle"&&a.push("<angle>"),a})),this.coords=this.coords.map((o,a)=>{let s=this.spaceCoords[a];return typeof o=="string"&&(o=o.trim().split(/\s*\|\s*/)),o.map(n=>le.get(n,s))}))}serializeCoords(e,r,o){return o=e.map((a,s)=>le.get(o?.[s]??this.coords[s][0],this.spaceCoords[s])),e.map((a,s)=>o[s].serialize(a,r))}coerceCoords(e,r){return Object.entries(this.space.coords).map(([o,a],s)=>{let n=e[s];if(L(n)||isNaN(n))return n;let i=r[s],l=this.coords[s].find(f=>f.type==i);if(!l){let f=a.name||o;throw new TypeError(`${i??n?.raw??n} not allowed for ${f} in ${this.name}()`)}return n=l.resolve(n),l.range&&(r[s]=l.toString()),n})}canSerialize(){return this.type==="function"||this.serialize}parse(e){return null}static get(e,...r){return!e||ie(e,this)?e:e[nt]?e[nt]:new t(e,...r)}};var st=class{add(e,r,o){if(typeof arguments[0]!="string"){for(var e in arguments[0])this.add(e,arguments[0][e],arguments[1]);return}(Array.isArray(e)?e:[e]).forEach(function(a){this[a]=this[a]||[],r&&this[a][o?"unshift":"push"](r)},this)}run(e,r){this[e]=this[e]||[],this[e].forEach(function(o){o.call(r&&r.context?r.context:r,r)})}},mo=new st,te=mo;var N={D50:[.3457/.3585,1,(1-.3457-.3585)/.3585],D65:[.3127/.329,1,(1-.3127-.329)/.329]};function _e(t){return Array.isArray(t)?t:N[t]}function re(t,e,r,o={}){if(t=_e(t),e=_e(e),!t||!e)throw new TypeError(`Missing white point to convert ${t?"":"from"}${!t&&!e?"/":""}${e?"":"to"}`);if(t===e)return r;let a={W1:t,W2:e,XYZ:r,options:o};if(te.run("chromatic-adaptation-start",a),a.M||(a.W1===N.D65&&a.W2===N.D50?a.M=[[1.0479297925449969,.022946870601609652,-.05019226628920524],[.02962780877005599,.9904344267538799,-.017073799063418826],[-.009243040646204504,.015055191490298152,.7518742814281371]]:a.W1===N.D50&&a.W2===N.D65&&(a.M=[[.955473421488075,-.02309845494876471,.06325924320057072],[-.0283697093338637,1.0099953980813041,.021041441191917323],[.012314014864481998,-.020507649298898964,1.330365926242124]])),te.run("chromatic-adaptation-end",a),a.M)return M(a.XYZ,a.M);throw new TypeError("Only Bradford CAT with white points D50 and D65 supported for now.")}var X={gamut_mapping:"css",precision:5,deltaE:"76",verbose:globalThis?.process?.env?.NODE_ENV?.toLowerCase()!=="test",warn:function(e){this.verbose&&globalThis?.console?.warn?.(e)}};function it(t,e){let r={str:String(t)?.trim(),options:e};if(te.run("parse-start",r),r.color)return r.color;r.parsed=go(r.str);let o,a=r.options?r.options.parseMeta??r.options.meta:null;if(r.parsed){let s=r.parsed.name,n,i,l=r.parsed.args,f=l.map((c,b)=>r.parsed.argMeta[b]?.type);if(s==="color"){let c=l.shift();f.shift();let b=c.startsWith("--")?c.substring(2):`--${c}`,d=[c,b];if(n=m.findFormat({name:s,id:d,type:"function"}),!n){let g,h=c in m.registry?c:b;if(h in m.registry){let w=m.registry[h].formats?.color?.id;w&&(g=`Did you mean ${t.replace("color("+c,"color("+w)}?`)}throw new TypeError(`Cannot parse ${r.str}. `+(g??"Missing a plugin?"))}i=n.space,n.id.startsWith("--")&&!c.startsWith("--")&&X.warn(`${i.name} is a non-standard space and not currently supported in the CSS spec. Use prefixed color(${n.id}) instead of color(${c}).`),c.startsWith("--")&&!n.id.startsWith("--")&&X.warn(`${i.name} is a standard space and supported in the CSS spec. Use color(${n.id}) instead of prefixed color(${c}).`)}else n=m.findFormat({name:s,type:"function"}),i=n.space;a&&Object.assign(a,{format:n,formatId:n.name,types:f,commas:r.parsed.commas});let p=1;r.parsed.lastAlpha&&(p=r.parsed.args.pop(),a&&(a.alphaType=f.pop()));let u=n.coords.length;if(l.length!==u)throw new TypeError(`Expected ${u} coordinates for ${i.id} in ${r.str}), got ${l.length}`);l=n.coerceCoords(l,f),o={spaceId:i.id,coords:l,alpha:p}}else e:for(let s of m.all)for(let n in s.formats){let i=s.formats[n];if(i.type!=="custom"||i.test&&!i.test(r.str))continue;let l=s.getFormat(i),f=l.parse(r.str);if(f){a&&Object.assign(a,{format:l,formatId:n}),o=f;break e}}if(!o)throw new TypeError(`Could not parse ${t} as a color. Missing a plugin?`);return o.alpha=L(o.alpha)?o.alpha:o.alpha===void 0?1:Te(0,o.alpha,1),o}var Wt={"%":.01,deg:1,grad:.9,rad:180/Math.PI,turn:360},De={function:/^([a-z]+)\(((?:calc\(NaN\)|.)+?)\)$/i,number:/^([-+]?(?:[0-9]*\.)?[0-9]+(e[-+]?[0-9]+)?)$/i,unitValue:RegExp(`(${Object.keys(Wt).join("|")})$`),singleArgument:/\/?\s*(none|NaN|calc\(NaN\)|[-+\w.]+(?:%|deg|g?rad|turn)?)/g};function po(t){let e={},r=t.match(De.unitValue)?.[0],o=e.raw=t;return r?(e.type=r==="%"?"<percentage>":"<angle>",e.unit=r,e.unitless=Number(o.slice(0,-r.length)),o=e.unitless*Wt[r]):De.number.test(o)?(o=Number(o),e.type="<number>"):o==="none"?o=null:o==="NaN"||o==="calc(NaN)"?(o=NaN,e.type="<number>"):e.type="<ident>",{value:o,meta:e}}function go(t){if(!t)return;t=t.trim();let e=t.match(De.function);if(e){let r=[],o=[],a=!1,s=e[1].toLowerCase(),n=e[2].replace(De.singleArgument,(i,l)=>{let{value:f,meta:p}=po(l);return(i.startsWith("/")||s!=="color"&&r.length===3)&&(a=!0),r.push(f),o.push(p),""});return{name:s,args:r,argMeta:o,lastAlpha:a,commas:n.includes(","),rawName:e[1],rawArgs:e[2]}}}function x(t,e){if(Array.isArray(t))return t.map(o=>x(o,e));if(!t)throw new TypeError("Empty color reference");Ae(t)&&(t=it(t,e));let r=t.space||t.spaceId;return typeof r=="string"&&(t.space=m.get(r)),t.alpha===void 0&&(t.alpha=1),t}var ho=75e-6,m=class t{constructor(e){this.id=e.id,this.name=e.name,this.base=e.base?t.get(e.base):null,this.aliases=e.aliases,this.base&&(this.fromBase=e.fromBase,this.toBase=e.toBase);let r=e.coords??this.base.coords;for(let a in r)"name"in r[a]||(r[a].name=a);this.coords=r;let o=e.white??this.base.white??"D65";this.white=_e(o),this.formats=e.formats??{};for(let a in this.formats){let s=this.formats[a];s.type||="function",s.name||=a}this.formats.color?.id||(this.formats.color={...this.formats.color??{},id:e.cssId||this.id}),e.gamutSpace?this.gamutSpace=e.gamutSpace==="self"?this:t.get(e.gamutSpace):this.isPolar?this.gamutSpace=this.base:this.gamutSpace=this,this.gamutSpace.isUnbounded&&(this.inGamut=(a,s)=>!0),this.referred=e.referred,Object.defineProperty(this,"path",{value:bo(this).reverse(),writable:!1,enumerable:!0,configurable:!0}),te.run("colorspace-init-end",this)}inGamut(e,{epsilon:r=ho}={}){if(!this.equals(this.gamutSpace))return e=this.to(this.gamutSpace,e),this.gamutSpace.inGamut(e,{epsilon:r});let o=Object.values(this.coords);return e.every((a,s)=>{let n=o[s];if(n.type!=="angle"&&n.range){if(L(a))return!0;let[i,l]=n.range;return(i===void 0||a>=i-r)&&(l===void 0||a<=l+r)}return!0})}get isUnbounded(){return Object.values(this.coords).every(e=>!("range"in e))}get cssId(){return this.formats?.color?.id||this.id}get isPolar(){for(let e in this.coords)if(this.coords[e].type==="angle")return!0;return!1}getFormat(e){if(!e)return null;e==="default"?e=Object.values(this.formats)[0]:typeof e=="string"&&(e=this.formats[e]);let r=fe.get(e,this);return r!==e&&e.name in this.formats&&(this.formats[e.name]=r),r}equals(e){return e?this===e||this.id===e||this.id===e.id:!1}to(e,r){if(arguments.length===1){let i=x(e);[e,r]=[i.space,i.coords]}if(e=t.get(e),this.equals(e))return r;r=r.map(i=>L(i)?0:i);let o=this.path,a=e.path,s,n;for(let i=0;i<o.length&&o[i].equals(a[i]);i++)s=o[i],n=i;if(!s)throw new Error(`Cannot convert between color spaces ${this} and ${e}: no connection space was found`);for(let i=o.length-1;i>n;i--)r=o[i].toBase(r);for(let i=n+1;i<a.length;i++)r=a[i].fromBase(r);return r}from(e,r){if(arguments.length===1){let o=x(e);[e,r]=[o.space,o.coords]}return e=t.get(e),e.to(this,r)}toString(){return`${this.name} (${this.id})`}getMinCoords(){let e=[];for(let r in this.coords){let o=this.coords[r],a=o.range||o.refRange;e.push(a?.min??0)}return e}static registry={};static get all(){return[...new Set(Object.values(t.registry))]}static register(e,r){if(arguments.length===1&&(r=arguments[0],e=r.id),r=this.get(r),this.registry[e]&&this.registry[e]!==r)throw new Error(`Duplicate color space registration: '${e}'`);if(this.registry[e]=r,arguments.length===1&&r.aliases)for(let o of r.aliases)this.register(o,r);return r}static get(e,...r){if(!e||ie(e,this))return e;if(ee(e)==="string"){let a=t.registry[e.toLowerCase()];if(!a)throw new TypeError(`No color space found with id = "${e}"`);return a}if(r.length)return t.get(...r);throw new TypeError(`${e} is not a valid color space`)}static findFormat(e,r=t.all){if(!e)return null;typeof e=="string"&&(e={name:e});for(let o of r)for(let[a,s]of Object.entries(o.formats)){s.name??=a,s.type??="function";let n=(!e.name||s.name===e.name)&&(!e.type||s.type===e.type);if(e.id){let i=s.ids||[s.id],l=Array.isArray(e.id)?e.id:[e.id];n&&=l.some(f=>i.includes(f))}if(n){let i=fe.get(s,o);return i!==s&&(o.formats[s.name]=i),i}}return null}static resolveCoord(e,r){let o=ee(e),a,s;if(o==="string"?e.includes(".")?[a,s]=e.split("."):[a,s]=[,e]:Array.isArray(e)?[a,s]=e:(a=e.space,s=e.coordId),a=t.get(a),a||(a=r),!a)throw new TypeError(`Cannot resolve coordinate reference ${e}: No color space specified and relative references are not allowed here`);if(o=ee(s),o==="number"||o==="string"&&s>=0){let l=Object.entries(a.coords)[s];if(l)return{space:a,id:l[0],index:s,...l[1]}}a=t.get(a);let n=s.toLowerCase(),i=0;for(let l in a.coords){let f=a.coords[l];if(l.toLowerCase()===n||f.name?.toLowerCase()===n)return{space:a,id:l,index:i,...f};i++}throw new TypeError(`No "${s}" coordinate found in ${a.name}. Its coordinates are: ${Object.keys(a.coords).join(", ")}`)}static DEFAULT_FORMAT={type:"functions",name:"color"}};function bo(t){let e=[t];for(let r=t;r=r.base;)e.push(r);return e}var E=new m({id:"xyz-d65",name:"XYZ D65",coords:{x:{refRange:[0,1],name:"X"},y:{refRange:[0,1],name:"Y"},z:{refRange:[0,1],name:"Z"}},white:"D65",formats:{color:{ids:["xyz-d65","xyz"]}},aliases:["xyz"]});var F=class extends m{constructor(e){e.coords||(e.coords={r:{range:[0,1],name:"Red"},g:{range:[0,1],name:"Green"},b:{range:[0,1],name:"Blue"}}),e.base||(e.base=E),e.toXYZ_M&&e.fromXYZ_M&&(e.toBase??=r=>{let o=M(r,e.toXYZ_M);return this.white!==this.base.white&&(o=re(this.white,this.base.white,o)),o},e.fromBase??=r=>(r=re(this.base.white,this.white,r),M(r,e.fromXYZ_M))),e.referred??="display",super(e)}};function ge(t,e){t=x(t);let r=m.get(e,e?.space),o=e?.precision,a;return!r||t.space.equals(r)?a=t.coords.slice():a=r.from(t),o===void 0?a:a.map(s=>tt(s,o))}function v(t,e){if(t=x(t),e==="alpha")return t.alpha??1;let{space:r,index:o}=m.resolveCoord(e,t.space);return ge(t,r)[o]}function ze(t,e,r,o){return t=x(t),Array.isArray(e)&&([e,r,o]=[t.space,e,r]),e=m.get(e),t.coords=e===t.space?r.slice():e.to(t.space,r),o!==void 0&&(t.alpha=o),t}ze.returns="color";function j(t,e,r){if(t=x(t),arguments.length===2&&ee(arguments[1])==="object"){let o=arguments[1];for(let a in o)j(t,a,o[a])}else if(typeof r=="function"&&(r=r(v(t,e))),e==="alpha")t.alpha=r;else{let{space:o,index:a}=m.resolveCoord(e,t.space),s=ge(t,o);s[a]=r,ze(t,o,s)}return t}j.returns="color";var Xt=new m({id:"xyz-d50",name:"XYZ D50",white:"D50",base:E,fromBase:t=>re(E.white,"D50",t),toBase:t=>re("D50",E.white,t)});var Co=216/24389,Yt=24/116,Ne=24389/27,lt=N.D50,P=new m({id:"lab",name:"Lab",coords:{l:{refRange:[0,100],name:"Lightness"},a:{refRange:[-125,125]},b:{refRange:[-125,125]}},white:lt,base:Xt,fromBase(t){let r=t.map((n,i)=>n/lt[i]).map(n=>n>Co?Math.cbrt(n):(Ne*n+16)/116),o=116*r[1]-16,a=500*(r[0]-r[1]),s=200*(r[1]-r[2]);return[o,a,s]},toBase(t){let[e,r,o]=t,a=[];return a[1]=(e+16)/116,a[0]=r/500+a[1],a[2]=a[1]-o/200,[a[0]>Yt?Math.pow(a[0],3):(116*a[0]-16)/Ne,t[0]>8?Math.pow((t[0]+16)/116,3):t[0]/Ne,a[2]>Yt?Math.pow(a[2],3):(116*a[2]-16)/Ne].map((n,i)=>n*lt[i])},formats:{lab:{coords:["<percentage> | <number>","<number> | <percentage>","<number> | <percentage>"]}}});function Y(t){return typeof t!="number"?t:(t%360+360)%360}var H=new m({id:"lch",name:"LCH",coords:{l:{refRange:[0,100],name:"Lightness"},c:{refRange:[0,150],name:"Chroma"},h:{refRange:[0,360],type:"angle",name:"Hue"}},base:P,fromBase(t){if(this.\u03B5===void 0){let i=Object.values(this.base.coords)[1].refRange,l=i[1]-i[0];this.\u03B5=l/1e5}let[e,r,o]=t,a=Math.abs(r)<this.\u03B5&&Math.abs(o)<this.\u03B5,s=a?null:Y(Math.atan2(o,r)*180/Math.PI),n=a?0:Math.sqrt(r**2+o**2);return[e,n,s]},toBase(t){let[e,r,o]=t,a=null,s=null;return L(o)||(r=r<0?0:r,a=r*Math.cos(o*Math.PI/180),s=r*Math.sin(o*Math.PI/180)),[e,a,s]},formats:{lch:{coords:["<percentage> | <number>","<number> | <percentage>","<number> | <angle>"]}}});var Jt=25**7,Be=Math.PI,Zt=180/Be,ce=Be/180;function Kt(t){let e=t*t;return e*e*e*t}function Pe(t,e,{kL:r=1,kC:o=1,kH:a=1}={}){[t,e]=x([t,e]);let[s,n,i]=P.from(t),l=H.from(P,[s,n,i])[1],[f,p,u]=P.from(e),c=H.from(P,[f,p,u])[1];l<0&&(l=0),c<0&&(c=0);let b=(l+c)/2,d=Kt(b),g=.5*(1-Math.sqrt(d/(d+Jt))),h=(1+g)*n,w=(1+g)*p,C=Math.sqrt(h**2+i**2),y=Math.sqrt(w**2+u**2),I=h===0&&i===0?0:Math.atan2(i,h),z=w===0&&u===0?0:Math.atan2(u,w);I<0&&(I+=2*Be),z<0&&(z+=2*Be),I*=Zt,z*=Zt;let _=f-s,A=y-C,R=z-I,K=I+z,Ot=Math.abs(R),me;C*y===0?me=0:Ot<=180?me=R:R>180?me=R-360:R<-180?me=R+360:X.warn("the unthinkable has happened");let Tt=2*Math.sqrt(y*C)*Math.sin(me*ce/2),Vr=(s+f)/2,Qe=(C+y)/2,Et=Kt(Qe),W;C*y===0?W=K:Ot<=180?W=K/2:K<360?W=(K+360)/2:W=(K-360)/2;let _t=(Vr-50)**2,eo=1+.015*_t/Math.sqrt(20+_t),Dt=1+.045*Qe,pe=1;pe-=.17*Math.cos((W-30)*ce),pe+=.24*Math.cos(2*W*ce),pe+=.32*Math.cos((3*W+6)*ce),pe-=.2*Math.cos((4*W-63)*ce);let zt=1+.015*Qe*pe,to=30*Math.exp(-1*((W-275)/25)**2),ro=2*Math.sqrt(Et/(Et+Jt)),oo=-1*Math.sin(2*to*ce)*ro,ke=(_/(r*eo))**2;return ke+=(A/(o*Dt))**2,ke+=(Tt/(a*zt))**2,ke+=oo*(A/(o*Dt))*(Tt/(a*zt)),Math.sqrt(ke)}var wo=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],xo=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],yo=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],So=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],G=new m({id:"oklab",name:"Oklab",coords:{l:{refRange:[0,1],name:"Lightness"},a:{refRange:[-.4,.4]},b:{refRange:[-.4,.4]}},white:"D65",base:E,fromBase(t){let e=M(t,wo);return e[0]=Math.cbrt(e[0]),e[1]=Math.cbrt(e[1]),e[2]=Math.cbrt(e[2]),M(e,yo,e)},toBase(t){let e=M(t,So);return e[0]=e[0]**3,e[1]=e[1]**3,e[2]=e[2]**3,M(e,xo,e)},formats:{oklab:{coords:["<percentage> | <number>","<number> | <percentage>","<number> | <percentage>"]}}});function he(t,e){[t,e]=x([t,e]);let[r,o,a]=G.from(t),[s,n,i]=G.from(e),l=r-s,f=o-n,p=a-i;return Math.sqrt(l**2+f**2+p**2)}var Mo=75e-6;function J(t,e,{epsilon:r=Mo}={}){t=x(t),e||(e=t.space),e=m.get(e);let o=t.coords;return e!==t.space&&(o=e.from(t)),e.inGamut(o,{epsilon:r})}function $(t){return{space:t.space,coords:t.coords.slice(),alpha:t.alpha}}function ft(t,e,r="lab"){r=m.get(r);let o=r.from(t),a=r.from(e);return Math.sqrt(o.reduce((s,n,i)=>{let l=a[i];return L(n)||L(l)?s:s+(l-n)**2},0))}function ct(t,e){return ft(t,e,"lab")}var vo=Math.PI,Ut=vo/180;function Qt(t,e,{l:r=2,c:o=1}={}){[t,e]=x([t,e]);let[a,s,n]=P.from(t),[,i,l]=H.from(P,[a,s,n]),[f,p,u]=P.from(e),c=H.from(P,[f,p,u])[1];i<0&&(i=0),c<0&&(c=0);let b=a-f,d=i-c,g=s-p,h=n-u,w=g**2+h**2-d**2,C=.511;a>=16&&(C=.040975*a/(1+.01765*a));let y=.0638*i/(1+.0131*i)+.638,I;L(l)&&(l=0),l>=164&&l<=345?I=.56+Math.abs(.2*Math.cos((l+168)*Ut)):I=.36+Math.abs(.4*Math.cos((l+35)*Ut));let z=Math.pow(i,4),_=Math.sqrt(z/(z+1900)),A=y*(_*I+1-_),R=(b/(r*C))**2;return R+=(d/(o*y))**2,R+=w/A**2,Math.sqrt(R)}var Vt=203,He=new m({id:"xyz-abs-d65",cssId:"--xyz-abs-d65",name:"Absolute XYZ D65",coords:{x:{refRange:[0,9504.7],name:"Xa"},y:{refRange:[0,1e4],name:"Ya"},z:{refRange:[0,10888.3],name:"Za"}},base:E,fromBase(t){return t.map(e=>e*Vt)},toBase(t){return t.map(e=>e/Vt)}});var $e=1.15,Fe=.66,er=2610/2**14,ko=2**14/2610,tr=3424/2**12,rr=2413/2**7,or=2392/2**7,Lo=1.7*2523/2**5,ar=2**5/(1.7*2523),je=-.56,ut=16295499532821565e-27,Ro=[[.41478972,.579999,.014648],[-.20151,1.120649,.0531008],[-.0166008,.2648,.6684799]],Io=[[1.9242264357876067,-1.0047923125953657,.037651404030618],[.35031676209499907,.7264811939316552,-.06538442294808501],[-.09098281098284752,-.3127282905230739,1.5227665613052603]],Ao=[[.5,.5,0],[3.524,-4.066708,.542708],[.199076,1.096799,-1.295875]],Oo=[[1,.13860504327153927,.05804731615611883],[1,-.1386050432715393,-.058047316156118904],[1,-.09601924202631895,-.811891896056039]],nr=new m({id:"jzazbz",name:"Jzazbz",coords:{jz:{refRange:[0,1],name:"Jz"},az:{refRange:[-.21,.21]},bz:{refRange:[-.21,.21]}},base:He,fromBase(t){let[e,r,o]=t,a=$e*e-($e-1)*o,s=Fe*r-(Fe-1)*e,i=M([a,s,o],Ro).map(function(c){let b=tr+rr*O(c/1e4,er),d=1+or*O(c/1e4,er);return O(b/d,Lo)}),[l,f,p]=M(i,Ao);return[(1+je)*l/(1+je*l)-ut,f,p]},toBase(t){let[e,r,o]=t,a=(e+ut)/(1+je-je*(e+ut)),n=M([a,r,o],Oo).map(function(c){let b=tr-O(c,ar),d=or*O(c,ar)-rr;return 1e4*O(b/d,ko)}),[i,l,f]=M(n,Io),p=(i+($e-1)*f)/$e,u=(l+(Fe-1)*p)/Fe;return[p,u,f]},formats:{jzazbz:{coords:["<percentage> | <number>","<number> | <percentage>","<number> | <percentage>"]}}});var mt=new m({id:"jzczhz",name:"JzCzHz",coords:{jz:{refRange:[0,1],name:"Jz"},cz:{refRange:[0,.26],name:"Chroma"},hz:{refRange:[0,360],type:"angle",name:"Hue"}},base:nr,fromBase:H.fromBase,toBase:H.toBase,formats:{jzczhz:{coords:["<percentage> | <number>","<number> | <percentage>","<number> | <angle>"]}}});function sr(t,e){[t,e]=x([t,e]);let[r,o,a]=mt.from(t),[s,n,i]=mt.from(e),l=r-s,f=o-n;L(a)&&L(i)?(a=0,i=0):L(a)?a=i:L(i)&&(i=a);let p=a-i,u=2*Math.sqrt(o*n)*Math.sin(p/2*(Math.PI/180));return Math.sqrt(l**2+f**2+u**2)}var fr=3424/4096,cr=2413/128,ur=2392/128,ir=2610/16384,To=2523/32,Eo=16384/2610,lr=32/2523,_o=[[.3592832590121217,.6976051147779502,-.035891593232029],[-.1920808463704993,1.100476797037432,.0753748658519118],[.0070797844607479,.0748396662186362,.8433265453898765]],Do=[[2048/4096,2048/4096,0],[6610/4096,-13613/4096,7003/4096],[17933/4096,-17390/4096,-543/4096]],zo=[[.9999999999999998,.0086090370379328,.111029625003026],[.9999999999999998,-.0086090370379328,-.1110296250030259],[.9999999999999998,.5600313357106791,-.3206271749873188]],No=[[2.0701522183894223,-1.3263473389671563,.2066510476294053],[.3647385209748072,.6805660249472273,-.0453045459220347],[-.0497472075358123,-.0492609666966131,1.1880659249923042]],pt=new m({id:"ictcp",name:"ICTCP",coords:{i:{refRange:[0,1],name:"I"},ct:{refRange:[-.5,.5],name:"CT"},cp:{refRange:[-.5,.5],name:"CP"}},base:He,fromBase(t){let e=M(t,_o);return Bo(e)},toBase(t){let e=Po(t);return M(e,No)},formats:{ictcp:{coords:["<percentage> | <number>","<number> | <percentage>","<number> | <percentage>"]}}});function Bo(t){let e=t.map(function(r){let o=fr+cr*(r/1e4)**ir,a=1+ur*(r/1e4)**ir;return(o/a)**To});return M(e,Do)}function Po(t){return M(t,zo).map(function(o){let a=Math.max(o**lr-fr,0),s=cr-ur*o**lr;return 1e4*(a/s)**Eo})}function mr(t,e){[t,e]=x([t,e]);let[r,o,a]=pt.from(t),[s,n,i]=pt.from(e);return 720*Math.sqrt((r-s)**2+.25*(o-n)**2+(a-i)**2)}function pr(t,e){[t,e]=x([t,e]);let r=2,[o,a,s]=G.from(t),[n,i,l]=G.from(e),f=o-n,p=r*(a-i),u=r*(s-l);return Math.sqrt(f**2+p**2+u**2)}var Ho=N.D65,br=.42,dr=1/br,dt=2*Math.PI,Cr=[[.401288,.650173,-.051461],[-.250268,1.204414,.045854],[-.002079,.048952,.953127]],$o=[[1.8620678550872327,-1.0112546305316843,.14918677544445175],[.38752654323613717,.6214474419314753,-.008973985167612518],[-.015841498849333856,-.03412293802851557,1.0499644368778496]],Fo=[[460,451,288],[460,-891,-261],[460,-220,-6300]],jo={dark:[.8,.525,.8],dim:[.9,.59,.9],average:[1,.69,1]},oe={h:[20.14,90,164.25,237.53,380.14],e:[.8,.7,1,1.2,.8],H:[0,100,200,300,400]},Go=180/Math.PI,gr=Math.PI/180;function wr(t,e){return t.map(o=>{let a=O(e*Math.abs(o)*.01,br);return 400*Ee(a,o)/(a+27.13)})}function qo(t,e){let r=100/e*27.13**dr;return t.map(o=>{let a=Math.abs(o);return Ee(r*O(a/(400-a),dr),o)})}function Wo(t){let e=Y(t);e<=oe.h[0]&&(e+=360);let r=Gt(oe.h,e)-1,[o,a]=oe.h.slice(r,r+2),[s,n]=oe.e.slice(r,r+2),i=oe.H[r],l=(e-o)/s;return i+100*l/(l+(a-e)/n)}function Xo(t){let e=(t%400+400)%400,r=Math.floor(.01*e);e=e%100;let[o,a]=oe.h.slice(r,r+2),[s,n]=oe.e.slice(r,r+2);return Y((e*(n*o-s*a)-100*o*n)/(e*(n-s)-100*n))}function gt(t,e,r,o,a){let s={};s.discounting=a,s.refWhite=t,s.surround=o;let n=t.map(h=>h*100);s.la=e,s.yb=r;let i=n[1],l=M(n,Cr),f=jo[s.surround],p=f[0];s.c=f[1],s.nc=f[2];let c=(1/(5*s.la+1))**4;s.fl=c*s.la+.1*(1-c)*(1-c)*Math.cbrt(5*s.la),s.flRoot=s.fl**.25,s.n=s.yb/i,s.z=1.48+Math.sqrt(s.n),s.nbb=.725*s.n**-.2,s.ncb=s.nbb;let b=a?1:Math.max(Math.min(p*(1-1/3.6*Math.exp((-s.la-42)/92)),1),0);s.dRgb=l.map(h=>rt(1,i/h,b)),s.dRgbInv=s.dRgb.map(h=>1/h);let d=l.map((h,w)=>h*s.dRgb[w]),g=wr(d,s.fl);return s.aW=s.nbb*(2*g[0]+g[1]+.05*g[2]),s}var hr=gt(Ho,64/Math.PI*.2,20,"average",!1);function Ge(t,e){if(!(t.J!==void 0^t.Q!==void 0))throw new Error("Conversion requires one and only one: 'J' or 'Q'");if(!(t.C!==void 0^t.M!==void 0^t.s!==void 0))throw new Error("Conversion requires one and only one: 'C', 'M' or 's'");if(!(t.h!==void 0^t.H!==void 0))throw new Error("Conversion requires one and only one: 'h' or 'H'");if(t.J===0||t.Q===0)return[0,0,0];let r=0;t.h!==void 0?r=Y(t.h)*gr:r=Xo(t.H)*gr;let o=Math.cos(r),a=Math.sin(r),s=0;t.J!==void 0?s=O(t.J,1/2)*.1:t.Q!==void 0&&(s=.25*e.c*t.Q/((e.aW+4)*e.flRoot));let n=0;t.C!==void 0?n=t.C/s:t.M!==void 0?n=t.M/e.flRoot/s:t.s!==void 0&&(n=4e-4*t.s**2*(e.aW+4)/e.c);let i=O(n*Math.pow(1.64-Math.pow(.29,e.n),-.73),10/9),l=.25*(Math.cos(r+2)+3.8),f=e.aW*O(s,2/e.c/e.z),p=5e4/13*e.nc*e.ncb*l,u=f/e.nbb,c=23*(u+.305)*at(i,23*p+i*(11*o+108*a)),b=c*o,d=c*a,g=qo(M([u,b,d],Fo).map(h=>h*1/1403),e.fl);return M(g.map((h,w)=>h*e.dRgbInv[w]),$o).map(h=>h/100)}function ht(t,e){let r=t.map(y=>y*100),o=wr(M(r,Cr).map((y,I)=>y*e.dRgb[I]),e.fl),a=o[0]+(-12*o[1]+o[2])/11,s=(o[0]+o[1]-2*o[2])/9,n=(Math.atan2(s,a)%dt+dt)%dt,i=.25*(Math.cos(n+2)+3.8),l=5e4/13*e.nc*e.ncb*at(i*Math.sqrt(a**2+s**2),o[0]+o[1]+1.05*o[2]+.305),f=O(l,.9)*Math.pow(1.64-Math.pow(.29,e.n),.73),p=e.nbb*(2*o[0]+o[1]+.05*o[2]),u=O(p/e.aW,.5*e.c*e.z),c=100*O(u,2),b=4/e.c*u*(e.aW+4)*e.flRoot,d=f*u,g=d*e.flRoot,h=Y(n*Go),w=Wo(h),C=50*O(e.c*f/(e.aW+4),1/2);return{J:c,C:d,h,s:C,Q:b,M:g,H:w}}var qs=new m({id:"cam16-jmh",cssId:"--cam16-jmh",name:"CAM16-JMh",coords:{j:{refRange:[0,100],name:"J"},m:{refRange:[0,105],name:"Colorfulness"},h:{refRange:[0,360],type:"angle",name:"Hue"}},base:E,fromBase(t){this.\u03B5===void 0&&(this.\u03B5=Object.values(this.coords)[1].refRange[1]/1e5);let e=ht(t,hr),r=Math.abs(e.M)<this.\u03B5;return[e.J,r?0:e.M,r?null:e.h]},toBase(t){return Ge({J:t[0],M:t[1],h:t[2]},hr)}});var Yo=N.D65,Jo=216/24389,xr=24389/27;function Zo(t){return 116*(t>Jo?Math.cbrt(t):(xr*t+16)/116)-16}function bt(t){return t>8?Math.pow((t+16)/116,3):t/xr}function Ko(t,e){let[r,o,a]=t,s=[],n=0;if(a===0)return[0,0,0];let i=bt(a);a>0?n=.00379058511492914*a**2+.608983189401032*a+.9155088574762233:n=9514440756550361e-21*a**2+.08693057439788597*a-21.928975842194614;let l=2e-12,f=15,p=0,u=1/0,c=n;for(;p<=f;){s=Ge({J:n,C:o,h:r},e);let b=Math.abs(s[1]-i);if(b<u){if(b<=l)return s;c=n,u=b}n=n-(s[1]-i)*n/(2*s[1]),p+=1}return Ge({J:n,C:o,h:r},e)}function Uo(t,e){let r=Zo(t[1]);if(r===0)return[0,0,0];let o=ht(t,be);return[Y(o.h),o.C,r]}var be=gt(Yo,200/Math.PI*bt(50),bt(50)*100,"average",!1),Ce=new m({id:"hct",name:"HCT",coords:{h:{refRange:[0,360],type:"angle",name:"Hue"},c:{refRange:[0,145],name:"Colorfulness"},t:{refRange:[0,100],name:"Tone"}},base:E,fromBase(t){this.\u03B5===void 0&&(this.\u03B5=Object.values(this.coords)[1].refRange[1]/1e5);let e=Uo(t,be);return e[1]<this.\u03B5&&(e[1]=0,e[0]=null),e},toBase(t){return Ko(t,be)},formats:{color:{id:"--hct",coords:["<number> | <angle>","<percentage> | <number>","<percentage> | <number>"]}}});var ti=180/Math.PI,Qo=Math.PI/180,yr=[1,.007,.0228];function Sr(t){t[1]<0&&(t=Ce.fromBase(Ce.toBase(t)));let e=Math.log(Math.max(1+yr[2]*t[1]*be.flRoot,1))/yr[2],r=t[0]*Qo,o=e*Math.cos(r),a=e*Math.sin(r);return[t[2],o,a]}function Mr(t,e){[t,e]=x([t,e]);let[r,o,a]=Sr(Ce.from(t)),[s,n,i]=Sr(Ce.from(e));return Math.sqrt((r-s)**2+(o-n)**2+(a-i)**2)}var Ct={deltaE76:ct,deltaECMC:Qt,deltaE2000:Pe,deltaEJz:sr,deltaEITP:mr,deltaEOK:he,deltaEOK2:pr,deltaEHCT:Mr};function Vo(t){let e=t?Math.floor(Math.log10(Math.abs(t))):0;return Math.max(parseFloat(`1e${e-2}`),1e-6)}var vr={hct:{method:"hct.c",jnd:2,deltaEMethod:"hct",blackWhiteClamp:{}},"hct-tonal":{method:"hct.c",jnd:0,deltaEMethod:"hct",blackWhiteClamp:{channel:"hct.t",min:0,max:100}}};function B(t,{method:e=X.gamut_mapping,space:r=void 0,deltaEMethod:o="",jnd:a=2,blackWhiteClamp:s=void 0}={}){if(t=x(t),Ae(arguments[1])?r=arguments[1]:r||(r=t.space),r=m.get(r),J(t,r,{epsilon:0}))return t;let n;if(e==="css")n=Lr(t,{space:r});else{if(e!=="clip"&&!J(t,r)){Object.prototype.hasOwnProperty.call(vr,e)&&({method:e,jnd:a,deltaEMethod:o,blackWhiteClamp:s}=vr[e]);let i=Pe;if(o!==""){for(let f in Ct)if("deltae"+o.toLowerCase()===f.toLowerCase()){i=Ct[f];break}}a===0&&(a=1e-16);let l=B(S(t,r),{method:"clip",space:r});if(i(t,l)>a){if(s&&Object.keys(s).length===3){let C=m.resolveCoord(s.channel),y=v(S(t,C.space),C.id);if(L(y)&&(y=0),y>=s.max)return S({space:"xyz-d65",coords:N.D65},t.space);if(y<=s.min)return S({space:"xyz-d65",coords:[0,0,0]},t.space)}let f=m.resolveCoord(e),p=f.space,u=f.id,c=S(t,p);c.coords.forEach((C,y)=>{L(C)&&(c.coords[y]=0)});let d=(f.range||f.refRange)[0],g=Vo(a),h=d,w=v(c,u);for(;w-h>g;){let C=$(c);C=B(C,{space:r,method:"clip"}),i(c,C)-a<g?h=v(c,u):w=v(c,u),j(c,u,(h+w)/2)}n=S(c,r)}else n=l}else n=S(t,r);if(e==="clip"||!J(n,r,{epsilon:0})){let i=Object.values(r.coords).map(l=>l.range||[]);n.coords=n.coords.map((l,f)=>{let[p,u]=i[f];return p!==void 0&&(l=Math.max(p,l)),u!==void 0&&(l=Math.min(l,u)),l})}}return r!==t.space&&(n=S(n,t.space)),t.coords=n.coords,t}B.returns="color";var kr={WHITE:{space:G,coords:[1,0,0],alpha:1},BLACK:{space:G,coords:[0,0,0],alpha:1}};function Lr(t,{space:e}={}){t=x(t),e||(e=t.space),e=m.get(e);let a=m.get("oklch");if(e.isUnbounded)return S(t,e);let s=S(t,a),n=s.coords[0];if(n>=1){let d=S(kr.WHITE,e);return d.alpha=t.alpha,S(d,e)}if(n<=0){let d=S(kr.BLACK,e);return d.alpha=t.alpha,S(d,e)}if(J(s,e,{epsilon:0}))return S(s,e);function i(d){let g=S(d,e),h=Object.values(e.coords);return g.coords=g.coords.map((w,C)=>{if("range"in h[C]){let[y,I]=h[C].range;return Te(y,w,I)}return w}),g}let l=0,f=s.coords[1],p=!0,u=$(s),c=i(u),b=he(c,u);if(b<.02)return c;for(;f-l>1e-4;){let d=(l+f)/2;if(u.coords[1]=d,p&&J(u,e,{epsilon:0}))l=d;else if(c=i(u),b=he(c,u),b<.02){if(.02-b<1e-4)break;p=!1,l=d}else f=d}return c}function S(t,e,{inGamut:r}={}){t=x(t),e=m.get(e);let o=e.from(t),a={space:e,coords:o,alpha:t.alpha};return r&&(a=B(a,r===!0?void 0:r)),a}S.returns="color";function we(t,e={}){let{precision:r=X.precision,format:o,inGamut:a=!0,coords:s,alpha:n,commas:i}=e,l,f=x(t),p=o,u=f.parseMeta;u&&!o&&(u.format.canSerialize()&&(o=u.format,p=u.formatId),s??=u.types,n??=u.alphaType,i??=u.commas),p&&(o=f.space.getFormat(o)??m.findFormat(p)),o||(o=f.space.getFormat("default")??m.DEFAULT_FORMAT,p=o.name),o&&o.space&&o.space!==f.space&&(f=S(f,o.space));let c=f.coords.slice();if(a||=o.toGamut,a&&!J(f)&&(c=B($(f),a===!0?void 0:a).coords),o.type==="custom")if(o.serialize)l=o.serialize(c,f.alpha,e);else throw new TypeError(`format ${p} can only be used to parse colors, not for serialization`);else{let b=o.name||"color",d=o.serializeCoords(c,r,s);if(b==="color"){let y=o.id||o.ids?.[0]||f.space.cssId||f.space.id;d.unshift(y)}let g=f.alpha;n!==void 0&&typeof n!="object"&&(n=typeof n=="string"?{type:n}:{include:n});let h=n?.type??"<number>",w=n?.include===!0||o.alpha===!0||n?.include!==!1&&o.alpha!==!1&&g<1,C="";if(i??=o.commas,w){if(r!==null){let y;h==="<percentage>"&&(y="%",g*=100),g=Oe(g,{precision:r,unit:y})}C=`${i?",":" /"} ${g}`}l=`${b}(${d.join(i?", ":" ")}${C})`}return l}var ea=[[.4865709486482162,.26566769316909306,.1982172852343625],[.2289745640697488,.6917385218365064,.079286914093745],[0,.04511338185890264,1.043944368900976]],ta=[[2.493496911941425,-.9313836179191239,-.40271078445071684],[-.8294889695615747,1.7626640603183463,.023624685841943577],[.03584583024378447,-.07617238926804182,.9568845240076872]],Rr=new F({id:"p3-linear",cssId:"display-p3-linear",name:"Linear P3",white:"D65",toXYZ_M:ea,fromXYZ_M:ta});var ra=[[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],oa=[[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]],Ir=new F({id:"srgb-linear",name:"Linear sRGB",white:"D65",toXYZ_M:ra,fromXYZ_M:oa});var wt={aliceblue:[240/255,248/255,1],antiquewhite:[250/255,235/255,215/255],aqua:[0,1,1],aquamarine:[127/255,1,212/255],azure:[240/255,1,1],beige:[245/255,245/255,220/255],bisque:[1,228/255,196/255],black:[0,0,0],blanchedalmond:[1,235/255,205/255],blue:[0,0,1],blueviolet:[138/255,43/255,226/255],brown:[165/255,42/255,42/255],burlywood:[222/255,184/255,135/255],cadetblue:[95/255,158/255,160/255],chartreuse:[127/255,1,0],chocolate:[210/255,105/255,30/255],coral:[1,127/255,80/255],cornflowerblue:[100/255,149/255,237/255],cornsilk:[1,248/255,220/255],crimson:[220/255,20/255,60/255],cyan:[0,1,1],darkblue:[0,0,139/255],darkcyan:[0,139/255,139/255],darkgoldenrod:[184/255,134/255,11/255],darkgray:[169/255,169/255,169/255],darkgreen:[0,100/255,0],darkgrey:[169/255,169/255,169/255],darkkhaki:[189/255,183/255,107/255],darkmagenta:[139/255,0,139/255],darkolivegreen:[85/255,107/255,47/255],darkorange:[1,140/255,0],darkorchid:[153/255,50/255,204/255],darkred:[139/255,0,0],darksalmon:[233/255,150/255,122/255],darkseagreen:[143/255,188/255,143/255],darkslateblue:[72/255,61/255,139/255],darkslategray:[47/255,79/255,79/255],darkslategrey:[47/255,79/255,79/255],darkturquoise:[0,206/255,209/255],darkviolet:[148/255,0,211/255],deeppink:[1,20/255,147/255],deepskyblue:[0,191/255,1],dimgray:[105/255,105/255,105/255],dimgrey:[105/255,105/255,105/255],dodgerblue:[30/255,144/255,1],firebrick:[178/255,34/255,34/255],floralwhite:[1,250/255,240/255],forestgreen:[34/255,139/255,34/255],fuchsia:[1,0,1],gainsboro:[220/255,220/255,220/255],ghostwhite:[248/255,248/255,1],gold:[1,215/255,0],goldenrod:[218/255,165/255,32/255],gray:[128/255,128/255,128/255],green:[0,128/255,0],greenyellow:[173/255,1,47/255],grey:[128/255,128/255,128/255],honeydew:[240/255,1,240/255],hotpink:[1,105/255,180/255],indianred:[205/255,92/255,92/255],indigo:[75/255,0,130/255],ivory:[1,1,240/255],khaki:[240/255,230/255,140/255],lavender:[230/255,230/255,250/255],lavenderblush:[1,240/255,245/255],lawngreen:[124/255,252/255,0],lemonchiffon:[1,250/255,205/255],lightblue:[173/255,216/255,230/255],lightcoral:[240/255,128/255,128/255],lightcyan:[224/255,1,1],lightgoldenrodyellow:[250/255,250/255,210/255],lightgray:[211/255,211/255,211/255],lightgreen:[144/255,238/255,144/255],lightgrey:[211/255,211/255,211/255],lightpink:[1,182/255,193/255],lightsalmon:[1,160/255,122/255],lightseagreen:[32/255,178/255,170/255],lightskyblue:[135/255,206/255,250/255],lightslategray:[119/255,136/255,153/255],lightslategrey:[119/255,136/255,153/255],lightsteelblue:[176/255,196/255,222/255],lightyellow:[1,1,224/255],lime:[0,1,0],limegreen:[50/255,205/255,50/255],linen:[250/255,240/255,230/255],magenta:[1,0,1],maroon:[128/255,0,0],mediumaquamarine:[102/255,205/255,170/255],mediumblue:[0,0,205/255],mediumorchid:[186/255,85/255,211/255],mediumpurple:[147/255,112/255,219/255],mediumseagreen:[60/255,179/255,113/255],mediumslateblue:[123/255,104/255,238/255],mediumspringgreen:[0,250/255,154/255],mediumturquoise:[72/255,209/255,204/255],mediumvioletred:[199/255,21/255,133/255],midnightblue:[25/255,25/255,112/255],mintcream:[245/255,1,250/255],mistyrose:[1,228/255,225/255],moccasin:[1,228/255,181/255],navajowhite:[1,222/255,173/255],navy:[0,0,128/255],oldlace:[253/255,245/255,230/255],olive:[128/255,128/255,0],olivedrab:[107/255,142/255,35/255],orange:[1,165/255,0],orangered:[1,69/255,0],orchid:[218/255,112/255,214/255],palegoldenrod:[238/255,232/255,170/255],palegreen:[152/255,251/255,152/255],paleturquoise:[175/255,238/255,238/255],palevioletred:[219/255,112/255,147/255],papayawhip:[1,239/255,213/255],peachpuff:[1,218/255,185/255],peru:[205/255,133/255,63/255],pink:[1,192/255,203/255],plum:[221/255,160/255,221/255],powderblue:[176/255,224/255,230/255],purple:[128/255,0,128/255],rebeccapurple:[102/255,51/255,153/255],red:[1,0,0],rosybrown:[188/255,143/255,143/255],royalblue:[65/255,105/255,225/255],saddlebrown:[139/255,69/255,19/255],salmon:[250/255,128/255,114/255],sandybrown:[244/255,164/255,96/255],seagreen:[46/255,139/255,87/255],seashell:[1,245/255,238/255],sienna:[160/255,82/255,45/255],silver:[192/255,192/255,192/255],skyblue:[135/255,206/255,235/255],slateblue:[106/255,90/255,205/255],slategray:[112/255,128/255,144/255],slategrey:[112/255,128/255,144/255],snow:[1,250/255,250/255],springgreen:[0,1,127/255],steelblue:[70/255,130/255,180/255],tan:[210/255,180/255,140/255],teal:[0,128/255,128/255],thistle:[216/255,191/255,216/255],tomato:[1,99/255,71/255],turquoise:[64/255,224/255,208/255],violet:[238/255,130/255,238/255],wheat:[245/255,222/255,179/255],white:[1,1,1],whitesmoke:[245/255,245/255,245/255],yellow:[1,1,0],yellowgreen:[154/255,205/255,50/255]};var Ar=Array(3).fill("<percentage> | <number>[0, 255]"),Or=Array(3).fill("<number>[0, 255]"),D=new F({id:"srgb",name:"sRGB",base:Ir,fromBase:t=>t.map(e=>{let r=e<0?-1:1,o=e*r;return o>.0031308?r*(1.055*o**(1/2.4)-.055):12.92*e}),toBase:t=>t.map(e=>{let r=e<0?-1:1,o=e*r;return o<=.04045?e/12.92:r*((o+.055)/1.055)**2.4}),formats:{rgb:{coords:Ar},rgb_number:{name:"rgb",commas:!0,coords:Or,alpha:!1},color:{},rgba:{coords:Ar,commas:!0,alpha:!0},rgba_number:{name:"rgba",commas:!0,coords:Or},hex:{type:"custom",toGamut:!0,test:t=>/^#(([a-f0-9]{2}){3,4}|[a-f0-9]{3,4})$/i.test(t),parse(t){t.length<=5&&(t=t.replace(/[a-f0-9]/gi,"$&$&"));let e=[];return t.replace(/[a-f0-9]{2}/gi,r=>{e.push(parseInt(r,16)/255)}),{spaceId:"srgb",coords:e.slice(0,3),alpha:e.slice(3)[0]}},serialize:(t,e,{collapse:r=!0,alpha:o}={})=>{(o!==!1&&e<1||o===!0)&&t.push(e),t=t.map(n=>Math.round(n*255));let a=r&&t.every(n=>n%17===0);return"#"+t.map(n=>a?(n/17).toString(16):n.toString(16).padStart(2,"0")).join("")}},keyword:{type:"custom",test:t=>/^[a-z]+$/i.test(t),parse(t){t=t.toLowerCase();let e={spaceId:"srgb",coords:null,alpha:1};if(t==="transparent"?(e.coords=wt.black,e.alpha=0):e.coords=wt[t],e.coords)return e}}}});var xt=new F({id:"p3",cssId:"display-p3",name:"P3",base:Rr,fromBase:D.fromBase,toBase:D.toBase});function yt(t){return v(t,[E,"y"])}function qe(t,e){t=x(t),e=x(e);let r=Math.max(yt(t),0),o=Math.max(yt(e),0);return o>r&&([r,o]=[o,r]),(r+.05)/(o+.05)}var ae=new m({id:"hsl",name:"HSL",coords:{h:{refRange:[0,360],type:"angle",name:"Hue"},s:{range:[0,100],name:"Saturation"},l:{range:[0,100],name:"Lightness"}},base:D,fromBase:t=>{let e=Math.max(...t),r=Math.min(...t),[o,a,s]=t,[n,i,l]=[null,0,(r+e)/2],f=e-r;if(f!==0){switch(i=l===0||l===1?0:(e-l)/Math.min(l,1-l),e){case o:n=(a-s)/f+(a<s?6:0);break;case a:n=(s-o)/f+2;break;case s:n=(o-a)/f+4}n=n*60}return i<0&&(n+=180,i=Math.abs(i)),n>=360&&(n-=360),[n,i*100,l*100]},toBase:t=>{let[e,r,o]=t;e=e%360,e<0&&(e+=360),r/=100,o/=100;function a(s){let n=(s+e/30)%12,i=r*Math.min(o,1-o);return o-i*Math.max(-1,Math.min(n-3,9-n,1))}return[a(0),a(8),a(4)]},formats:{hsl:{coords:["<number> | <angle>","<percentage> | <number>","<percentage> | <number>"]},hsla:{coords:["<number> | <angle>","<percentage> | <number>","<percentage> | <number>"],commas:!0,alpha:!0}}});var k=new m({id:"oklch",name:"OkLCh",coords:{l:{refRange:[0,1],name:"Lightness"},c:{refRange:[0,.4],name:"Chroma"},h:{refRange:[0,360],type:"angle",name:"Hue"}},white:"D65",base:G,fromBase:H.fromBase,toBase:H.toBase,formats:{oklch:{coords:["<percentage> | <number>","<number> | <percentage>","<number> | <angle>"]}}});function St(t,e){var r=0,o,a;e=e||{};function s(){var n=o,i=arguments.length,l,f;e:for(;n;){if(n.args.length!==arguments.length){n=n.next;continue}for(f=0;f<i;f++)if(n.args[f]!==arguments[f]){n=n.next;continue e}return n!==o&&(n===a&&(a=n.prev),n.prev.next=n.next,n.next&&(n.next.prev=n.prev),n.next=o,n.prev=null,o.prev=n,o=n),n.val}for(l=new Array(i),f=0;f<i;f++)l[f]=arguments[f];return n={args:l,val:t.apply(null,l)},o?(o.prev=n,n.next=o):a=n,r===e.maxSize?(a=a.prev,a.next=null):r++,o=n,n.val}return s.clear=function(){o=null,a=null,r=0},s}var ve=de(Re(),1);m.register(D);m.register(k);m.register(xt);m.register(ae);var Tr={"primary-bgFill1":["bg-interactive-brand-strong"],"primary-fgFill":["fg-interactive-brand-strong","fg-interactive-brand-strong-active"],"primary-bgFill2":["bg-interactive-brand-strong-active"],"primary-surface4":["bg-interactive-brand-weak-active"],"primary-fgSurface3":["fg-interactive-brand","fg-interactive-brand-active"],"primary-stroke3":["bg-thumb-brand","bg-thumb-brand-active","stroke-focus-brand","stroke-interactive-brand","stroke-surface-brand-strong"],"primary-stroke4":["stroke-interactive-brand-active"],"primary-stroke1":["stroke-surface-brand"],"primary-surface1":["bg-surface-brand"],"info-surface2":["bg-surface-info-weak"],"info-surface4":["bg-surface-info"],"info-fgSurface4":["fg-content-info"],"info-fgSurface3":["fg-content-info-weak"],"info-stroke3":["stroke-surface-info-strong"],"info-stroke1":["stroke-surface-info"],"success-surface2":["bg-surface-success-weak"],"success-surface4":["bg-surface-success"],"success-fgSurface4":["fg-content-success"],"success-fgSurface3":["fg-content-success-weak"],"success-stroke3":["stroke-surface-success-strong"],"success-stroke1":["stroke-surface-success"],"warning-surface2":["bg-surface-warning-weak"],"warning-surface4":["bg-surface-warning"],"warning-fgSurface4":["fg-content-warning"],"warning-fgSurface3":["fg-content-warning-weak"],"warning-stroke3":["stroke-surface-warning-strong"],"warning-stroke1":["stroke-surface-warning"],"error-bgFill1":["bg-interactive-error-strong"],"error-fgFill":["fg-interactive-error-strong","fg-interactive-error-strong-active"],"error-bgFill2":["bg-interactive-error-strong-active"],"error-surface2":["bg-interactive-error-active","bg-surface-error-weak"],"error-surface4":["bg-interactive-error-weak-active","bg-surface-error"],"error-fgSurface4":["fg-content-error"],"error-fgSurface3":["fg-content-error-weak","fg-interactive-error","fg-interactive-error-active"],"error-stroke3":["stroke-interactive-error","stroke-interactive-error-strong","stroke-surface-error-strong"],"error-stroke4":["stroke-interactive-error-active"],"error-stroke1":["stroke-surface-error"],"bg-surface2":["bg-surface-neutral"],"bg-surface5":["bg-interactive-neutral-strong-disabled"],"bg-surface4":["bg-interactive-neutral-weak-active"],"bg-surface3":["bg-surface-neutral-strong"],"bg-fgSurface4":["fg-content-neutral","fg-interactive-neutral","fg-interactive-neutral-active"],"bg-fgSurface3":["fg-content-neutral-weak","fg-interactive-neutral-weak"],"bg-fgSurface2":["fg-interactive-neutral-disabled","fg-interactive-neutral-strong-disabled","fg-interactive-neutral-weak-disabled"],"bg-stroke3":["bg-thumb-neutral-weak","stroke-interactive-neutral","stroke-surface-neutral-strong"],"bg-stroke4":["bg-thumb-neutral-weak-active","stroke-interactive-neutral-active","stroke-interactive-neutral-strong"],"bg-stroke2":["bg-thumb-neutral-disabled","bg-track-neutral","stroke-interactive-neutral-disabled","stroke-surface-neutral"],"bg-stroke1":["bg-track-neutral-weak","stroke-surface-neutral-weak"],"bg-bgFillInverted2":["bg-interactive-neutral-strong-active"],"bg-bgFillInverted1":["bg-interactive-neutral-strong"],"bg-fgFillInverted":["fg-interactive-neutral-strong","fg-interactive-neutral-strong-active"],"bg-surface1":["bg-surface-neutral-weak"],"caution-surface2":["bg-surface-caution-weak"],"caution-surface4":["bg-surface-caution"],"caution-fgSurface4":["fg-content-caution"],"caution-fgSurface3":["fg-content-caution-weak"]};function ne(t){let e=we(S(t,D));return we(e,{format:"hex"})}function Z(t,e){return qe(t,e)}function xe(t){return S(B(t,{space:D,method:"css"}),k)}var We=S("white",k),Xe=S("black",k),Er=.02,_r=3.1,Dr={lighter:{min:.2,max:.4},darker:{min:.75,max:.98}},U=.004,zr=10;var ye={bg:"#f8f8f8",primary:"#3858e9",info:"#0090ff",success:"#4ab866",caution:"#f0d149",warning:"#f0b849",error:"#cc1818"};function aa(t){let e=new Map,r=new Map;return Object.keys(t).forEach(o=>{e.set(o,[])}),r.set("seed",[]),Object.keys(t).forEach(o=>{r.set(o,[])}),Object.entries(t).forEach(([o,a])=>{let s=o,n=a.contrast.reference;e.get(s).push(n),r.get(n).push(s),a.sameAsIfPossible&&(e.get(s).push(a.sameAsIfPossible),r.get(a.sameAsIfPossible).push(s))}),{dependencies:e,dependents:r}}function Nr(t){let{dependents:e}=aa(t),r=[],o=new Set,a=new Set;function s(n){if(a.has(n))throw new Error(`Circular dependency detected involving step: ${String(n)}`);if(o.has(n))return;a.add(n),(e.get(n)||[]).forEach(l=>{s(l)}),a.delete(n),o.add(n),n!=="seed"&&r.unshift(n)}return s("seed"),r}function Br(t,e){let r=new Set;function o(a){if(a==="seed"||r.has(a))return;let s=e[a];s&&(o(s.contrast.reference),s.sameAsIfPossible&&o(s.sameAsIfPossible),r.add(a))}return o(t),Array.from(r)}function Mt(t,e){let r=Z(t,Xe),o=Z(t,We);return r>o+(e?_r:0)?{better:"darker",worse:"lighter"}:{better:"lighter",worse:"darker"}}function vt(t){return t===1?1:t+Er}function Pr(t,e){let r=Dr[e];return Math.max(r.min,Math.min(r.max,t))}function Ye(t,e,r,o,a,s){let n=r,i=o,l=!1,f=a,p=s,u=!1,c,b,d=0;for(;;){d++;let g=(n*p-f*i)/(p-i);if(c=t(g),b=e(c),Math.abs(b)<=U||d>=zr)break;b<=0?(n=g,i=b,l&&(p/=2),l=!0,u=!1):(f=g,p=b,u&&(i/=2),u=!0,l=!1)}return c}function jr(t,e,r={}){let o=r.gamut??D,a=r.alpha??.65,s=r.carry??.5,n=r.cUpperBound??.45,i=r.radiusLight??.2,l=r.radiusDark??.2,f=r.kLight??.85,p=r.kDark??.85,u=r.achromaEpsilon??.005,c=Math.max(0,v(t,[k,"c"])),b=v(t,[k,"h"]),d=c<u,g=b===null||!Number.isFinite(b);if(d||g)if(typeof r.hueFallback=="number")b=Gr(r.hueFallback);else return{space:k,coords:[se(e),0,0],alpha:1};let h=se(v(t,[k,"l"])),w=Fr(h,b,o,n),C=Fr(se(e),b,o,n),y=0,I=w>0?w:1e-6;y=se(c/I);let _=a*C*Math.pow(y,se(s)),A=na(h,e,{radiusLight:i,radiusDark:l,kLight:f,kDark:p}),R=_*A;return{l:se(e),c:R}}function se(t){return t<0?0:t>1?1:t}function Gr(t){let e=t%360;return e<0&&(e+=360),e}function Hr(t){let e=se(t);return .5-.5*Math.cos(Math.PI*e)}function na(t,e,r){let o=e-t;if(o>=0){let n=r.radiusLight>0?Math.abs(o)/r.radiusLight:1,i=Hr(n>1?1:n);return 1-(1-r.kLight)*i}let a=r.radiusDark>0?Math.abs(o)/r.radiusDark:1,s=Hr(a>1?1:a);return 1-(1-r.kDark)*s}var $r=new Map;function sa(t,e,r,o){let a=kt(t,.05),s=kt(Gr(e),10),n=kt(o,.05);return`${r}|L:${a}|H:${s}|cap:${n}`}function kt(t,e){return Math.round(t/e)*e}function Fr(t,e,r,o){let a=r.id,s=sa(t,e,a,o),n=$r.get(s);if(typeof n=="number")return n;let i=ia(t,e,r,o);return $r.set(s,i),i}function ia(t,e,r,o){let s=B({space:k,coords:[t,o,e],alpha:1},{space:r,method:"css"});return v(s,[k,"c"])}function q(t,e){return Math.log(t/e)}function qr(t,e,r,o,{lightnessConstraint:a,taperChromaOptions:s}={}){if(r<=1)return{color:t,reached:!0,achieved:1};function n(g){let h=g,w=v(e,[k,"c"]);if(s){let C=jr(e,h,s);if("l"in C&&"c"in C)h=C.l,w=C.c;else return C}return xe({spaceId:"oklch",coords:[h,w,v(e,[k,"h"])]})}let i=o==="lighter"?1:0,l=o==="lighter"?We:Xe,f=Z(t,l);if(a){let g=n(a.value),h=Z(t,g),w=q(h,r)>=-U;if(w||a.type==="force")return{color:g,reached:w,achieved:h,deficit:w?q(h,f):q(r,h)}}if(q(f,r)<=U)return{color:l,reached:q(f,r)>=-U,achieved:f,deficit:q(r,f)};let p=v(t,[k,"l"]),u=q(1,r),c=i,b=q(f,r);return{color:Ye(n,g=>q(Z(t,g),r),p,u,c,b),reached:!0,achieved:r,deficit:q(r,f)}}function Lt({seed:t,sortedSteps:e,config:r,mainDir:o,oppDir:a,pinLightness:s}){let n={},i,l=-1/0,f="lighter",p,u=new Map;u.set("seed",t);for(let c of e){let b=function(A,R){return R==="main"?o:R==="opposite"?a:R==="best"?Mt(A,d.preferLighter).better:R},{contrast:d,lightness:g,taperChromaOptions:h,sameAsIfPossible:w}=r[c],C=u.get(d.reference);if(!C)throw new Error(`Reference color for step ${c} not found: ${d.reference}`);if(w){let A=u.get(w);if(!A)throw new Error(`Same-as color for step ${c} not found: ${w}`);let R=Z(C,A),K=vt(d.target);if(R>=K){u.set(c,A),n[c]=ne(A);continue}}let y=b(C,d.followDirection),I=vt(d.target),z;s?.stepName===c?z={value:s.value,type:"force"}:g&&(z={value:g(y),type:"onlyIfSucceeds"});let _=qr(C,t,I,y,{lightnessConstraint:z,taperChromaOptions:h});!d.ignoreWhenAdjustingSeed&&_.deficit&&_.deficit>l&&(l=_.deficit,f=y,p=c),u.set(c,_.color),n[c]=ne(_.color),!_.reached&&!d.ignoreWhenAdjustingSeed&&(i??=[],i.push(c))}return{rampResults:n,warnings:i,maxDeficit:l,maxDeficitDirection:f,maxDeficitStep:p}}function Rt(t,e,{mainDirection:r,pinLightness:o,rescaleToFitContrastTargets:a=!0}={}){let s;try{s=xe(t)}catch(g){throw new Error(`Invalid seed color "${t}": ${g instanceof Error?g.message:"Unknown error"}`)}let n="lighter",i="darker";if(r)n=r,i=r==="darker"?"lighter":"darker";else{let{better:g,worse:h}=Mt(s);n=g,i=h}let l=Nr(e),{rampResults:f,warnings:p,maxDeficit:u,maxDeficitDirection:c,maxDeficitStep:b}=Lt({seed:s,sortedSteps:l,config:e,mainDir:n,oppDir:i,pinLightness:o}),d=f;if(u>U&&a){let g=function(A){return xe(j($(s),[k,"l"],A))},h=function(A){let R=Lt({seed:A,sortedSteps:w,config:e,mainDir:n,oppDir:i,pinLightness:o});return R.maxDeficitDirection===c?R.maxDeficit:-u},w=Br(b,e),C=c==="lighter"?0:1,y=-u,I=v(s,[k,"l"]),_=Ye(g,h,C,y,I,u);d=Lt({seed:_,sortedSteps:l,config:e,mainDir:n,oppDir:i,pinLightness:o}).rampResults}if(n==="darker"){let g=d.surface1;d.surface1=d.surface3,d.surface3=g}return{ramp:d,warnings:p,direction:n}}var Me=t=>t==="lighter"?.9551:.235,la=t=>t==="lighter"?.77:.56,fa=t=>t==="lighter"?.67:.45,Se={alpha:.7},Q={alpha:.6,kLight:.2,kDark:.2},Je={alpha:.6,radiusDark:.01,radiusLight:.01,kLight:.8,kDark:.8},ue={alpha:.75,radiusDark:.01,radiusLight:.01},Wr={contrast:{reference:"surface3",followDirection:"main",target:7,preferLighter:!0},lightness:Me,taperChromaOptions:Q},T={surface1:{contrast:{reference:"surface2",followDirection:"opposite",target:1.06,ignoreWhenAdjustingSeed:!0},taperChromaOptions:Se},surface2:{contrast:{reference:"seed",followDirection:"main",target:1}},surface3:{contrast:{reference:"surface2",followDirection:"main",target:1.06},taperChromaOptions:Se},surface4:{contrast:{reference:"surface2",followDirection:"main",target:1.12},taperChromaOptions:Se},surface5:{contrast:{reference:"surface2",followDirection:"main",target:1.2},taperChromaOptions:Se},surface6:{contrast:{reference:"surface2",followDirection:"main",target:1.4},taperChromaOptions:Se},bgFill1:{contrast:{reference:"surface2",followDirection:"main",target:4},lightness:fa},bgFill2:{contrast:{reference:"bgFill1",followDirection:"main",target:1.2}},bgFillInverted1:{contrast:{reference:"bgFillInverted2",followDirection:"opposite",target:1.2}},bgFillInverted2:Wr,bgFillDark:{contrast:{reference:"surface3",followDirection:"darker",target:7,ignoreWhenAdjustingSeed:!0},lightness:Me,taperChromaOptions:Q},stroke1:{contrast:{reference:"stroke3",followDirection:"opposite",target:2.6},taperChromaOptions:Je},stroke2:{contrast:{reference:"stroke3",followDirection:"opposite",target:2.4},taperChromaOptions:Je},stroke3:{contrast:{reference:"surface3",followDirection:"main",target:3},taperChromaOptions:Je},stroke4:{contrast:{reference:"stroke3",followDirection:"main",target:1.5},taperChromaOptions:Je},fgSurface1:{contrast:{reference:"surface3",followDirection:"main",target:2,preferLighter:!0},taperChromaOptions:Q},fgSurface2:{contrast:{reference:"surface3",followDirection:"main",target:3,preferLighter:!0},taperChromaOptions:Q},fgSurface3:{contrast:{reference:"surface3",followDirection:"main",target:4.5,preferLighter:!0},lightness:la,taperChromaOptions:Q},fgSurface4:Wr,fgFill:{contrast:{reference:"bgFill1",followDirection:"best",target:4.5,preferLighter:!0},lightness:Me,taperChromaOptions:Q},fgFillInverted:{contrast:{reference:"bgFillInverted1",followDirection:"best",target:4.5,preferLighter:!0},lightness:Me,taperChromaOptions:Q},fgFillDark:{contrast:{reference:"bgFillDark",followDirection:"best",target:4.5,preferLighter:!0},lightness:Me,taperChromaOptions:Q}},Xr={...T,surface1:{...T.surface1,taperChromaOptions:ue},surface2:{contrast:{reference:"bgFill1",followDirection:"opposite",target:T.bgFill1.contrast.target,ignoreWhenAdjustingSeed:!0},taperChromaOptions:ue},surface3:{...T.surface3,taperChromaOptions:ue},surface4:{...T.surface4,taperChromaOptions:ue},surface5:{...T.surface5,taperChromaOptions:ue},surface6:{...T.surface6,taperChromaOptions:ue},bgFill1:{contrast:{reference:"seed",followDirection:"main",target:1}},stroke1:{...T.stroke1},stroke2:{...T.stroke2},stroke3:{...T.stroke3,sameAsIfPossible:"fgSurface3",taperChromaOptions:void 0},stroke4:{...T.stroke4,taperChromaOptions:void 0},fgSurface1:{...T.fgSurface1,taperChromaOptions:void 0},fgSurface2:{...T.fgSurface2,taperChromaOptions:void 0},fgSurface3:{...T.fgSurface3,taperChromaOptions:void 0,sameAsIfPossible:"bgFill1"},fgSurface4:{...T.fgSurface4,taperChromaOptions:void 0}};function Jr(t){if(typeof t!="string"||t.trim()==="")throw new Error("Seed color must be a non-empty string");return Rt(t,T)}var Yr="surface2";function ca(t){return{mainDirection:t.direction,pinLightness:{stepName:Yr,value:Pr(v(t.ramp[Yr],[k,"l"]),t.direction)}}}function Zr(t,e){if(typeof t!="string"||t.trim()==="")throw new Error("Seed color must be a non-empty string");let r=e?ca(e):void 0;return Rt(t,Xr,r)}var ua=St(Jr,{maxSize:10}),ma=St(Zr,{maxSize:10}),pa=[["--wp-components-color-accent","var(--wp-admin-theme-color)"],["--wp-components-color-accent-darker-10","var(--wp-admin-theme-color-darker-10)"],["--wp-components-color-accent-darker-20","var(--wp-admin-theme-color-darker-20)"],["--wp-components-color-accent-inverted","var(--wpds-color-fg-interactive-brand-strong, #fff)"],["--wp-components-color-background","var(--wpds-color-bg-surface-neutral-strong, #ffffff)"],["--wp-components-color-foreground","var(--wpds-color-fg-content-neutral, #1e1e1e)"],["--wp-components-color-foreground-inverted","var(--wpds-color-bg-surface-neutral, #f8f8f8)"],["--wp-components-color-gray-100","var(--wpds-color-bg-surface-neutral, #f8f8f8)"],["--wp-components-color-gray-200","var(--wpds-color-stroke-surface-neutral, #d8d8d8)"],["--wp-components-color-gray-300","var(--wpds-color-stroke-surface-neutral, #d8d8d8)"],["--wp-components-color-gray-400","var(--wpds-color-stroke-interactive-neutral, #8a8a8a)"],["--wp-components-color-gray-600","var(--wpds-color-stroke-interactive-neutral, #8a8a8a)"],["--wp-components-color-gray-700","var(--wpds-color-fg-content-neutral-weak, #6d6d6d)"],["--wp-components-color-gray-800","var(--wpds-color-fg-content-neutral, #1e1e1e)"]];function It(t){return S(t,D).coords.map(r=>Math.round((r??0)*255)).join(", ")}function da(t){let e=S(t,ae),r=e.coords[2]??0,o=j($(e),[ae,"l"],Math.max(0,r-5)),a=j($(e),[ae,"l"],Math.max(0,r-10));return[["--wp-admin-theme-color",ne(e)],["--wp-admin-theme-color--rgb",It(e)],["--wp-admin-theme-color-darker-10",ne(o)],["--wp-admin-theme-color-darker-10--rgb",It(o)],["--wp-admin-theme-color-darker-20",ne(a)],["--wp-admin-theme-color-darker-20--rgb",It(a)]]}function ga(t){let e=[];for(let[r,{ramp:o}]of t)for(let[a,s]of Object.entries(o)){let n=`${r}-${a}`,i=Tr[n]??[];for(let l of i)e.push([`--wpds-color-${l}`,s])}return e}function ha({primary:t,computedColorRamps:e}){return Object.fromEntries([ga(e),da(t),pa].flat())}function Ze({color:t={}}={}){let{resolvedSettings:e}=(0,ve.useContext)(Ie),r=t.primary??e.color?.primary??ye.primary,o=t.bg??e.color?.bg??ye.bg,a=(0,ve.useMemo)(()=>({color:{primary:r,bg:o}}),[r,o]),s=(0,ve.useMemo)(()=>{let n={...ye,bg:o,primary:r},i=new Map,l=ua(n.bg);return Object.entries(n).forEach(([f,p])=>{f==="bg"?i.set(f,l):i.set(f,ma(p,l))}),ha({primary:n.primary,computedColorRamps:i})},[r,o]);return{resolvedSettings:a,themeProviderStyles:s}}var V=de(Ur(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='662a5161a8']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","662a5161a8"),t.appendChild(document.createTextNode(".dba930ea7a9438fd__root{display:contents}")),document.head.appendChild(t)}var Ke={root:"dba930ea7a9438fd__root"};function ba(t){return Object.entries(t).map(([e,r])=>`${e}: ${r};`).join("")}function Ca({instanceId:t,isRoot:e}){let r='[data-wpds-root-provider="true"]',o=`[data-wpds-theme-provider-id="${t}"]`,a=[];return e&&a.push(`:root:has(.${Ke.root}${r}${o})`),a.push(`.${Ke.root}.${Ke.root}${o}`),a.join(",")}var Qr=({children:t,color:e={},isRoot:r=!1,density:o})=>{let a=(0,Ue.useId)(),{themeProviderStyles:s,resolvedSettings:n}=Ze({color:e}),i=(0,Ue.useMemo)(()=>({resolvedSettings:n}),[n]);return(0,V.jsxs)(V.Fragment,{children:[s?(0,V.jsx)("style",{children:`${Ca({instanceId:a,isRoot:r})} {${ba(s)}}`}):null,(0,V.jsx)("div",{"data-wpds-theme-provider-id":a,"data-wpds-root-provider":r,"data-wpds-density":o,className:Ke.root,children:(0,V.jsx)(Ie.Provider,{value:i,children:t})})]})};var At={};$t(At,{ThemeProvider:Qr,useThemeProviderStyles:Ze});return co(wa);})();
                                                                                                                                                                                                                                                                                                                                                                                                                                          dist/block-serialization-spec-parser.min.js                                                         0000644                 00000024536 15212564037 0015035 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).blockSerializationSpecParser=(()=>{var Pe=(c,b)=>()=>(b||c((b={exports:{}}).exports,b),b.exports);var De=Pe((je,ce)=>{function Te(c,b){function e(){this.constructor=c}e.prototype=b.prototype,c.prototype=new e}function S(c,b,e,y){this.message=c,this.expected=b,this.found=e,this.location=y,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,S)}Te(S,Error);S.buildMessage=function(c,b){var e={literal:function(p){return'"'+P(p.text)+'"'},class:function(p){var $="",v;for(v=0;v<p.parts.length;v++)$+=p.parts[v]instanceof Array?A(p.parts[v][0])+"-"+A(p.parts[v][1]):A(p.parts[v]);return"["+(p.inverted?"^":"")+$+"]"},any:function(p){return"any character"},end:function(p){return"end of input"},other:function(p){return p.description}};function y(p){return p.charCodeAt(0).toString(16).toUpperCase()}function P(p){return p.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function($){return"\\x0"+y($)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function($){return"\\x"+y($)})}function A(p){return p.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function($){return"\\x0"+y($)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function($){return"\\x"+y($)})}function D(p){return e[p.type](p)}function I(p){var $=new Array(p.length),v,F;for(v=0;v<p.length;v++)$[v]=D(p[v]);if($.sort(),$.length>0){for(v=1,F=1;v<$.length;v++)$[v-1]!==$[v]&&($[F]=$[v],F++);$.length=F}switch($.length){case 1:return $[0];case 2:return $[0]+" or "+$[1];default:return $.slice(0,-1).join(", ")+", or "+$[$.length-1]}}function C(p){return p?'"'+P(p)+'"':"end of input"}return"Expected "+I(c)+" but "+C(b)+" found."};function Re(c,b){b=b!==void 0?b:{};var e={},y={Block_List:te},P=te,A=ke(),D=function(r,l,g){return[l,g]},I=function(r,l,g){return Fe(r,l,g)},C="<!--",p=B("<!--",!1),$="wp:",v=B("wp:",!1),F=function(r,l){return l},Q="/-->",ae=B("/-->",!1),oe=function(r,l){return{blockName:r,attrs:l||{},innerBlocks:[],innerHTML:"",innerContent:[]}},ge=function(r,l,g){var t=Le(l),a=t[0],f=t[1],n=t[2];return{blockName:r.blockName,attrs:r.attrs,innerBlocks:f,innerHTML:a,innerContent:n}},_="-->",M=B("-->",!1),ue=function(r,l){return{blockName:r,attrs:l||{}}},W="/wp:",he=B("/wp:",!1),pe=function(r){return{blockName:r}},O="/",j=B("/",!1),$e=function(r){return"core/"+r},de=/^[a-z]/,ve=X([["a","z"]],!1,!1),Y=/^[a-z0-9_\-]/,Z=X([["a","z"],["0","9"],"_","-"],!1,!1),be=le("JSON-encoded attributes embedded in a block's opening comment"),Ae="{",me=B("{",!1),J="}",U=B("}",!1),ee="",xe=function(r){return Se(r)},se=/^[ \t\r\n]/,re=X([" ","	","\r",`
`],!1,!1),s=0,m=0,z=[{line:1,column:1}],w=0,V=[],u=0,H;if("startRule"in b){if(!(b.startRule in y))throw new Error(`Can't start parsing from rule "`+b.startRule+'".');P=y[b.startRule]}function Me(){return c.substring(m,s)}function ze(){return T(m,s)}function He(r,l){throw l=l!==void 0?l:T(m,s),fe([le(r)],c.substring(m,s),l)}function Ie(r,l){throw l=l!==void 0?l:T(m,s),Ee(r,l)}function B(r,l){return{type:"literal",text:r,ignoreCase:l}}function X(r,l,g){return{type:"class",parts:r,inverted:l,ignoreCase:g}}function ke(){return{type:"any"}}function we(){return{type:"end"}}function le(r){return{type:"other",description:r}}function ie(r){var l=z[r],g;if(l)return l;for(g=r-1;!z[g];)g--;for(l=z[g],l={line:l.line,column:l.column};g<r;)c.charCodeAt(g)===10?(l.line++,l.column=1):l.column++,g++;return z[r]=l,l}function T(r,l){var g=ie(r),t=ie(l);return{start:{offset:r,line:g.line,column:g.column},end:{offset:l,line:t.line,column:t.column}}}function h(r){s<w||(s>w&&(w=s,V=[]),V.push(r))}function Ee(r,l){return new S(r,null,null,l)}function fe(r,l,g){return new S(S.buildMessage(r,l),r,l,g)}function te(){var r,l,g,t,a,f,n,i,o,d;for(r=s,l=s,g=[],t=s,a=s,u++,f=x(),u--,f===e?a=void 0:(s=a,a=e),a!==e?(c.length>s?(f=c.charAt(s),s++):(f=e,u===0&&h(A)),f!==e?(a=[a,f],t=a):(s=t,t=e)):(s=t,t=e);t!==e;)g.push(t),t=s,a=s,u++,f=x(),u--,f===e?a=void 0:(s=a,a=e),a!==e?(c.length>s?(f=c.charAt(s),s++):(f=e,u===0&&h(A)),f!==e?(a=[a,f],t=a):(s=t,t=e)):(s=t,t=e);if(g!==e?l=c.substring(l,s):l=g,l!==e){if(g=[],t=s,a=x(),a!==e){for(f=s,n=[],i=s,o=s,u++,d=x(),u--,d===e?o=void 0:(s=o,o=e),o!==e?(c.length>s?(d=c.charAt(s),s++):(d=e,u===0&&h(A)),d!==e?(o=[o,d],i=o):(s=i,i=e)):(s=i,i=e);i!==e;)n.push(i),i=s,o=s,u++,d=x(),u--,d===e?o=void 0:(s=o,o=e),o!==e?(c.length>s?(d=c.charAt(s),s++):(d=e,u===0&&h(A)),d!==e?(o=[o,d],i=o):(s=i,i=e)):(s=i,i=e);n!==e?f=c.substring(f,s):f=n,f!==e?(m=t,a=D(l,a,f),t=a):(s=t,t=e)}else s=t,t=e;for(;t!==e;)if(g.push(t),t=s,a=x(),a!==e){for(f=s,n=[],i=s,o=s,u++,d=x(),u--,d===e?o=void 0:(s=o,o=e),o!==e?(c.length>s?(d=c.charAt(s),s++):(d=e,u===0&&h(A)),d!==e?(o=[o,d],i=o):(s=i,i=e)):(s=i,i=e);i!==e;)n.push(i),i=s,o=s,u++,d=x(),u--,d===e?o=void 0:(s=o,o=e),o!==e?(c.length>s?(d=c.charAt(s),s++):(d=e,u===0&&h(A)),d!==e?(o=[o,d],i=o):(s=i,i=e)):(s=i,i=e);n!==e?f=c.substring(f,s):f=n,f!==e?(m=t,a=D(l,a,f),t=a):(s=t,t=e)}else s=t,t=e;if(g!==e){for(t=s,a=[],c.length>s?(f=c.charAt(s),s++):(f=e,u===0&&h(A));f!==e;)a.push(f),c.length>s?(f=c.charAt(s),s++):(f=e,u===0&&h(A));a!==e?t=c.substring(t,s):t=a,t!==e?(m=r,l=I(l,g,t),r=l):(s=r,r=e)}else s=r,r=e}else s=r,r=e;return r}function x(){var r;return r=ye(),r===e&&(r=Ce()),r}function ye(){var r,l,g,t,a,f,n,i,o;return r=s,c.substr(s,4)===C?(l=C,s+=4):(l=e,u===0&&h(p)),l!==e?(g=E(),g!==e?(c.substr(s,3)===$?(t=$,s+=3):(t=e,u===0&&h(v)),t!==e?(a=q(),a!==e?(f=E(),f!==e?(n=s,i=ne(),i!==e?(o=E(),o!==e?(m=n,i=F(a,i),n=i):(s=n,n=e)):(s=n,n=e),n===e&&(n=null),n!==e?(c.substr(s,4)===Q?(i=Q,s+=4):(i=e,u===0&&h(ae)),i!==e?(m=r,l=oe(a,n),r=l):(s=r,r=e)):(s=r,r=e)):(s=r,r=e)):(s=r,r=e)):(s=r,r=e)):(s=r,r=e)):(s=r,r=e),r}function Ce(){var r,l,g,t,a,f,n,i,o;if(r=s,l=_e(),l!==e){if(g=[],t=x(),t===e){if(t=s,a=[],f=s,n=s,u++,i=x(),u--,i===e?n=void 0:(s=n,n=e),n!==e?(i=s,u++,o=R(),u--,o===e?i=void 0:(s=i,i=e),i!==e?(c.length>s?(o=c.charAt(s),s++):(o=e,u===0&&h(A)),o!==e?(n=[n,i,o],f=n):(s=f,f=e)):(s=f,f=e)):(s=f,f=e),f!==e)for(;f!==e;)a.push(f),f=s,n=s,u++,i=x(),u--,i===e?n=void 0:(s=n,n=e),n!==e?(i=s,u++,o=R(),u--,o===e?i=void 0:(s=i,i=e),i!==e?(c.length>s?(o=c.charAt(s),s++):(o=e,u===0&&h(A)),o!==e?(n=[n,i,o],f=n):(s=f,f=e)):(s=f,f=e)):(s=f,f=e);else a=e;a!==e?t=c.substring(t,s):t=a}for(;t!==e;)if(g.push(t),t=x(),t===e){if(t=s,a=[],f=s,n=s,u++,i=x(),u--,i===e?n=void 0:(s=n,n=e),n!==e?(i=s,u++,o=R(),u--,o===e?i=void 0:(s=i,i=e),i!==e?(c.length>s?(o=c.charAt(s),s++):(o=e,u===0&&h(A)),o!==e?(n=[n,i,o],f=n):(s=f,f=e)):(s=f,f=e)):(s=f,f=e),f!==e)for(;f!==e;)a.push(f),f=s,n=s,u++,i=x(),u--,i===e?n=void 0:(s=n,n=e),n!==e?(i=s,u++,o=R(),u--,o===e?i=void 0:(s=i,i=e),i!==e?(c.length>s?(o=c.charAt(s),s++):(o=e,u===0&&h(A)),o!==e?(n=[n,i,o],f=n):(s=f,f=e)):(s=f,f=e)):(s=f,f=e);else a=e;a!==e?t=c.substring(t,s):t=a}g!==e?(t=R(),t!==e?(m=r,l=ge(l,g,t),r=l):(s=r,r=e)):(s=r,r=e)}else s=r,r=e;return r}function _e(){var r,l,g,t,a,f,n,i,o;return r=s,c.substr(s,4)===C?(l=C,s+=4):(l=e,u===0&&h(p)),l!==e?(g=E(),g!==e?(c.substr(s,3)===$?(t=$,s+=3):(t=e,u===0&&h(v)),t!==e?(a=q(),a!==e?(f=E(),f!==e?(n=s,i=ne(),i!==e?(o=E(),o!==e?(m=n,i=F(a,i),n=i):(s=n,n=e)):(s=n,n=e),n===e&&(n=null),n!==e?(c.substr(s,3)===_?(i=_,s+=3):(i=e,u===0&&h(M)),i!==e?(m=r,l=ue(a,n),r=l):(s=r,r=e)):(s=r,r=e)):(s=r,r=e)):(s=r,r=e)):(s=r,r=e)):(s=r,r=e)):(s=r,r=e),r}function R(){var r,l,g,t,a,f,n;return r=s,c.substr(s,4)===C?(l=C,s+=4):(l=e,u===0&&h(p)),l!==e?(g=E(),g!==e?(c.substr(s,4)===W?(t=W,s+=4):(t=e,u===0&&h(he)),t!==e?(a=q(),a!==e?(f=E(),f!==e?(c.substr(s,3)===_?(n=_,s+=3):(n=e,u===0&&h(M)),n!==e?(m=r,l=pe(a),r=l):(s=r,r=e)):(s=r,r=e)):(s=r,r=e)):(s=r,r=e)):(s=r,r=e)):(s=r,r=e),r}function q(){var r;return r=Be(),r===e&&(r=Ne()),r}function Be(){var r,l,g,t,a;return r=s,l=s,g=G(),g!==e?(c.charCodeAt(s)===47?(t=O,s++):(t=e,u===0&&h(j)),t!==e?(a=G(),a!==e?(g=[g,t,a],l=g):(s=l,l=e)):(s=l,l=e)):(s=l,l=e),l!==e?r=c.substring(r,s):r=l,r}function Ne(){var r,l,g;return r=s,l=s,g=G(),g!==e?l=c.substring(l,s):l=g,l!==e&&(m=r,l=$e(l)),r=l,r}function G(){var r,l,g,t,a;if(r=s,l=s,de.test(c.charAt(s))?(g=c.charAt(s),s++):(g=e,u===0&&h(ve)),g!==e){for(t=[],Y.test(c.charAt(s))?(a=c.charAt(s),s++):(a=e,u===0&&h(Z));a!==e;)t.push(a),Y.test(c.charAt(s))?(a=c.charAt(s),s++):(a=e,u===0&&h(Z));t!==e?(g=[g,t],l=g):(s=l,l=e)}else s=l,l=e;return l!==e?r=c.substring(r,s):r=l,r}function ne(){var r,l,g,t,a,f,n,i,o,d,L,k,N;if(u++,r=s,l=s,g=s,c.charCodeAt(s)===123?(t=Ae,s++):(t=e,u===0&&h(me)),t!==e){for(a=[],f=s,n=s,u++,i=s,c.charCodeAt(s)===125?(o=J,s++):(o=e,u===0&&h(U)),o!==e?(d=E(),d!==e?(L=ee,L!==e?(c.charCodeAt(s)===47?(k=O,s++):(k=e,u===0&&h(j)),k===e&&(k=null),k!==e?(c.substr(s,3)===_?(N=_,s+=3):(N=e,u===0&&h(M)),N!==e?(o=[o,d,L,k,N],i=o):(s=i,i=e)):(s=i,i=e)):(s=i,i=e)):(s=i,i=e)):(s=i,i=e),u--,i===e?n=void 0:(s=n,n=e),n!==e?(c.length>s?(i=c.charAt(s),s++):(i=e,u===0&&h(A)),i!==e?(n=[n,i],f=n):(s=f,f=e)):(s=f,f=e);f!==e;)a.push(f),f=s,n=s,u++,i=s,c.charCodeAt(s)===125?(o=J,s++):(o=e,u===0&&h(U)),o!==e?(d=E(),d!==e?(L=ee,L!==e?(c.charCodeAt(s)===47?(k=O,s++):(k=e,u===0&&h(j)),k===e&&(k=null),k!==e?(c.substr(s,3)===_?(N=_,s+=3):(N=e,u===0&&h(M)),N!==e?(o=[o,d,L,k,N],i=o):(s=i,i=e)):(s=i,i=e)):(s=i,i=e)):(s=i,i=e)):(s=i,i=e),u--,i===e?n=void 0:(s=n,n=e),n!==e?(c.length>s?(i=c.charAt(s),s++):(i=e,u===0&&h(A)),i!==e?(n=[n,i],f=n):(s=f,f=e)):(s=f,f=e);a!==e?(c.charCodeAt(s)===125?(f=J,s++):(f=e,u===0&&h(U)),f!==e?(t=[t,a,f],g=t):(s=g,g=e)):(s=g,g=e)}else s=g,g=e;return g!==e?l=c.substring(l,s):l=g,l!==e&&(m=r,l=xe(l)),r=l,u--,r===e&&(l=e,u===0&&h(be)),r}function E(){var r,l;if(r=[],se.test(c.charAt(s))?(l=c.charAt(s),s++):(l=e,u===0&&h(re)),l!==e)for(;l!==e;)r.push(l),se.test(c.charAt(s))?(l=c.charAt(s),s++):(l=e,u===0&&h(re));else r=e;return r}function K(r){return r.length&&{blockName:null,attrs:{},innerBlocks:[],innerHTML:r,innerContent:[r]}}function Fe(r,l,g){var t=[],a,f,n,i,o;for(r.length&&t.push(K(r)),a=0,f=l.length;a<f;a++)i=l[a],o=i[0],n=i[1],t.push(o),n.length&&t.push(K(n));return g.length&&t.push(K(g)),t}function Se(r){try{return JSON.parse(r)}catch{return null}}function Le(r){var l,g,t,a="",f=[],n=[];for(l=0,g=r.length;l<g;l++)t=r[l],typeof t=="string"?(a+=t,n.push(t)):(f.push(t),n.push(null));return[a,f,n]}if(H=P(),H!==e&&s===c.length)return H;throw H!==e&&s<c.length&&h(we()),fe(V,w<c.length?c.charAt(w):null,w<c.length?T(w,w+1):T(w,w))}ce.exports={SyntaxError:S,parse:Re}});return De();})();
                                                                                                                                                                  dist/block-serialization-spec-parser.js                                                             0000644                 00000144755 15212564037 0014261 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).blockSerializationSpecParser = (() => {
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };

  // packages/block-serialization-spec-parser/parser.js
  var require_parser = __commonJS({
    "packages/block-serialization-spec-parser/parser.js"(exports, module) {
      function peg$subclass(child, parent) {
        function ctor() {
          this.constructor = child;
        }
        ctor.prototype = parent.prototype;
        child.prototype = new ctor();
      }
      function peg$SyntaxError(message, expected, found, location) {
        this.message = message;
        this.expected = expected;
        this.found = found;
        this.location = location;
        this.name = "SyntaxError";
        if (typeof Error.captureStackTrace === "function") {
          Error.captureStackTrace(this, peg$SyntaxError);
        }
      }
      peg$subclass(peg$SyntaxError, Error);
      peg$SyntaxError.buildMessage = function(expected, found) {
        var DESCRIBE_EXPECTATION_FNS = {
          literal: function(expectation) {
            return '"' + literalEscape(expectation.text) + '"';
          },
          "class": function(expectation) {
            var escapedParts = "", i;
            for (i = 0; i < expectation.parts.length; i++) {
              escapedParts += expectation.parts[i] instanceof Array ? classEscape(expectation.parts[i][0]) + "-" + classEscape(expectation.parts[i][1]) : classEscape(expectation.parts[i]);
            }
            return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]";
          },
          any: function(expectation) {
            return "any character";
          },
          end: function(expectation) {
            return "end of input";
          },
          other: function(expectation) {
            return expectation.description;
          }
        };
        function hex(ch) {
          return ch.charCodeAt(0).toString(16).toUpperCase();
        }
        function literalEscape(s) {
          return s.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(ch) {
            return "\\x0" + hex(ch);
          }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) {
            return "\\x" + hex(ch);
          });
        }
        function classEscape(s) {
          return s.replace(/\\/g, "\\\\").replace(/\]/g, "\\]").replace(/\^/g, "\\^").replace(/-/g, "\\-").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(ch) {
            return "\\x0" + hex(ch);
          }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) {
            return "\\x" + hex(ch);
          });
        }
        function describeExpectation(expectation) {
          return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);
        }
        function describeExpected(expected2) {
          var descriptions = new Array(expected2.length), i, j;
          for (i = 0; i < expected2.length; i++) {
            descriptions[i] = describeExpectation(expected2[i]);
          }
          descriptions.sort();
          if (descriptions.length > 0) {
            for (i = 1, j = 1; i < descriptions.length; i++) {
              if (descriptions[i - 1] !== descriptions[i]) {
                descriptions[j] = descriptions[i];
                j++;
              }
            }
            descriptions.length = j;
          }
          switch (descriptions.length) {
            case 1:
              return descriptions[0];
            case 2:
              return descriptions[0] + " or " + descriptions[1];
            default:
              return descriptions.slice(0, -1).join(", ") + ", or " + descriptions[descriptions.length - 1];
          }
        }
        function describeFound(found2) {
          return found2 ? '"' + literalEscape(found2) + '"' : "end of input";
        }
        return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";
      };
      function peg$parse(input, options) {
        options = options !== void 0 ? options : {};
        var peg$FAILED = {}, peg$startRuleFunctions = { Block_List: peg$parseBlock_List }, peg$startRuleFunction = peg$parseBlock_List, peg$c0 = peg$anyExpectation(), peg$c1 = function(pre, b, html) {
          return [b, html];
        }, peg$c2 = function(pre, bs, post) {
          return joinBlocks(pre, bs, post);
        }, peg$c3 = "<!--", peg$c4 = peg$literalExpectation("<!--", false), peg$c5 = "wp:", peg$c6 = peg$literalExpectation("wp:", false), peg$c7 = function(blockName, a) {
          return a;
        }, peg$c8 = "/-->", peg$c9 = peg$literalExpectation("/-->", false), peg$c10 = function(blockName, attrs) {
          return {
            blockName,
            attrs: attrs || {},
            innerBlocks: [],
            innerHTML: "",
            innerContent: []
          };
        }, peg$c11 = function(s, children, e) {
          var innerParts = processInnerContent(children);
          var innerHTML = innerParts[0];
          var innerBlocks = innerParts[1];
          var innerContent = innerParts[2];
          return {
            blockName: s.blockName,
            attrs: s.attrs,
            innerBlocks,
            innerHTML,
            innerContent
          };
        }, peg$c12 = "-->", peg$c13 = peg$literalExpectation("-->", false), peg$c14 = function(blockName, attrs) {
          return {
            blockName,
            attrs: attrs || {}
          };
        }, peg$c15 = "/wp:", peg$c16 = peg$literalExpectation("/wp:", false), peg$c17 = function(blockName) {
          return {
            blockName
          };
        }, peg$c18 = "/", peg$c19 = peg$literalExpectation("/", false), peg$c20 = function(type) {
          return "core/" + type;
        }, peg$c21 = /^[a-z]/, peg$c22 = peg$classExpectation([["a", "z"]], false, false), peg$c23 = /^[a-z0-9_\-]/, peg$c24 = peg$classExpectation([["a", "z"], ["0", "9"], "_", "-"], false, false), peg$c25 = peg$otherExpectation("JSON-encoded attributes embedded in a block's opening comment"), peg$c26 = "{", peg$c27 = peg$literalExpectation("{", false), peg$c28 = "}", peg$c29 = peg$literalExpectation("}", false), peg$c30 = "", peg$c31 = function(attrs) {
          return maybeJSON(attrs);
        }, peg$c32 = /^[ \t\r\n]/, peg$c33 = peg$classExpectation([" ", "	", "\r", "\n"], false, false), peg$currPos = 0, peg$savedPos = 0, peg$posDetailsCache = [{ line: 1, column: 1 }], peg$maxFailPos = 0, peg$maxFailExpected = [], peg$silentFails = 0, peg$result;
        if ("startRule" in options) {
          if (!(options.startRule in peg$startRuleFunctions)) {
            throw new Error(`Can't start parsing from rule "` + options.startRule + '".');
          }
          peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
        }
        function text() {
          return input.substring(peg$savedPos, peg$currPos);
        }
        function location() {
          return peg$computeLocation(peg$savedPos, peg$currPos);
        }
        function expected(description, location2) {
          location2 = location2 !== void 0 ? location2 : peg$computeLocation(peg$savedPos, peg$currPos);
          throw peg$buildStructuredError(
            [peg$otherExpectation(description)],
            input.substring(peg$savedPos, peg$currPos),
            location2
          );
        }
        function error(message, location2) {
          location2 = location2 !== void 0 ? location2 : peg$computeLocation(peg$savedPos, peg$currPos);
          throw peg$buildSimpleError(message, location2);
        }
        function peg$literalExpectation(text2, ignoreCase) {
          return { type: "literal", text: text2, ignoreCase };
        }
        function peg$classExpectation(parts, inverted, ignoreCase) {
          return { type: "class", parts, inverted, ignoreCase };
        }
        function peg$anyExpectation() {
          return { type: "any" };
        }
        function peg$endExpectation() {
          return { type: "end" };
        }
        function peg$otherExpectation(description) {
          return { type: "other", description };
        }
        function peg$computePosDetails(pos) {
          var details = peg$posDetailsCache[pos], p;
          if (details) {
            return details;
          } else {
            p = pos - 1;
            while (!peg$posDetailsCache[p]) {
              p--;
            }
            details = peg$posDetailsCache[p];
            details = {
              line: details.line,
              column: details.column
            };
            while (p < pos) {
              if (input.charCodeAt(p) === 10) {
                details.line++;
                details.column = 1;
              } else {
                details.column++;
              }
              p++;
            }
            peg$posDetailsCache[pos] = details;
            return details;
          }
        }
        function peg$computeLocation(startPos, endPos) {
          var startPosDetails = peg$computePosDetails(startPos), endPosDetails = peg$computePosDetails(endPos);
          return {
            start: {
              offset: startPos,
              line: startPosDetails.line,
              column: startPosDetails.column
            },
            end: {
              offset: endPos,
              line: endPosDetails.line,
              column: endPosDetails.column
            }
          };
        }
        function peg$fail(expected2) {
          if (peg$currPos < peg$maxFailPos) {
            return;
          }
          if (peg$currPos > peg$maxFailPos) {
            peg$maxFailPos = peg$currPos;
            peg$maxFailExpected = [];
          }
          peg$maxFailExpected.push(expected2);
        }
        function peg$buildSimpleError(message, location2) {
          return new peg$SyntaxError(message, null, null, location2);
        }
        function peg$buildStructuredError(expected2, found, location2) {
          return new peg$SyntaxError(
            peg$SyntaxError.buildMessage(expected2, found),
            expected2,
            found,
            location2
          );
        }
        function peg$parseBlock_List() {
          var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
          s0 = peg$currPos;
          s1 = peg$currPos;
          s2 = [];
          s3 = peg$currPos;
          s4 = peg$currPos;
          peg$silentFails++;
          s5 = peg$parseBlock();
          peg$silentFails--;
          if (s5 === peg$FAILED) {
            s4 = void 0;
          } else {
            peg$currPos = s4;
            s4 = peg$FAILED;
          }
          if (s4 !== peg$FAILED) {
            if (input.length > peg$currPos) {
              s5 = input.charAt(peg$currPos);
              peg$currPos++;
            } else {
              s5 = peg$FAILED;
              if (peg$silentFails === 0) {
                peg$fail(peg$c0);
              }
            }
            if (s5 !== peg$FAILED) {
              s4 = [s4, s5];
              s3 = s4;
            } else {
              peg$currPos = s3;
              s3 = peg$FAILED;
            }
          } else {
            peg$currPos = s3;
            s3 = peg$FAILED;
          }
          while (s3 !== peg$FAILED) {
            s2.push(s3);
            s3 = peg$currPos;
            s4 = peg$currPos;
            peg$silentFails++;
            s5 = peg$parseBlock();
            peg$silentFails--;
            if (s5 === peg$FAILED) {
              s4 = void 0;
            } else {
              peg$currPos = s4;
              s4 = peg$FAILED;
            }
            if (s4 !== peg$FAILED) {
              if (input.length > peg$currPos) {
                s5 = input.charAt(peg$currPos);
                peg$currPos++;
              } else {
                s5 = peg$FAILED;
                if (peg$silentFails === 0) {
                  peg$fail(peg$c0);
                }
              }
              if (s5 !== peg$FAILED) {
                s4 = [s4, s5];
                s3 = s4;
              } else {
                peg$currPos = s3;
                s3 = peg$FAILED;
              }
            } else {
              peg$currPos = s3;
              s3 = peg$FAILED;
            }
          }
          if (s2 !== peg$FAILED) {
            s1 = input.substring(s1, peg$currPos);
          } else {
            s1 = s2;
          }
          if (s1 !== peg$FAILED) {
            s2 = [];
            s3 = peg$currPos;
            s4 = peg$parseBlock();
            if (s4 !== peg$FAILED) {
              s5 = peg$currPos;
              s6 = [];
              s7 = peg$currPos;
              s8 = peg$currPos;
              peg$silentFails++;
              s9 = peg$parseBlock();
              peg$silentFails--;
              if (s9 === peg$FAILED) {
                s8 = void 0;
              } else {
                peg$currPos = s8;
                s8 = peg$FAILED;
              }
              if (s8 !== peg$FAILED) {
                if (input.length > peg$currPos) {
                  s9 = input.charAt(peg$currPos);
                  peg$currPos++;
                } else {
                  s9 = peg$FAILED;
                  if (peg$silentFails === 0) {
                    peg$fail(peg$c0);
                  }
                }
                if (s9 !== peg$FAILED) {
                  s8 = [s8, s9];
                  s7 = s8;
                } else {
                  peg$currPos = s7;
                  s7 = peg$FAILED;
                }
              } else {
                peg$currPos = s7;
                s7 = peg$FAILED;
              }
              while (s7 !== peg$FAILED) {
                s6.push(s7);
                s7 = peg$currPos;
                s8 = peg$currPos;
                peg$silentFails++;
                s9 = peg$parseBlock();
                peg$silentFails--;
                if (s9 === peg$FAILED) {
                  s8 = void 0;
                } else {
                  peg$currPos = s8;
                  s8 = peg$FAILED;
                }
                if (s8 !== peg$FAILED) {
                  if (input.length > peg$currPos) {
                    s9 = input.charAt(peg$currPos);
                    peg$currPos++;
                  } else {
                    s9 = peg$FAILED;
                    if (peg$silentFails === 0) {
                      peg$fail(peg$c0);
                    }
                  }
                  if (s9 !== peg$FAILED) {
                    s8 = [s8, s9];
                    s7 = s8;
                  } else {
                    peg$currPos = s7;
                    s7 = peg$FAILED;
                  }
                } else {
                  peg$currPos = s7;
                  s7 = peg$FAILED;
                }
              }
              if (s6 !== peg$FAILED) {
                s5 = input.substring(s5, peg$currPos);
              } else {
                s5 = s6;
              }
              if (s5 !== peg$FAILED) {
                peg$savedPos = s3;
                s4 = peg$c1(s1, s4, s5);
                s3 = s4;
              } else {
                peg$currPos = s3;
                s3 = peg$FAILED;
              }
            } else {
              peg$currPos = s3;
              s3 = peg$FAILED;
            }
            while (s3 !== peg$FAILED) {
              s2.push(s3);
              s3 = peg$currPos;
              s4 = peg$parseBlock();
              if (s4 !== peg$FAILED) {
                s5 = peg$currPos;
                s6 = [];
                s7 = peg$currPos;
                s8 = peg$currPos;
                peg$silentFails++;
                s9 = peg$parseBlock();
                peg$silentFails--;
                if (s9 === peg$FAILED) {
                  s8 = void 0;
                } else {
                  peg$currPos = s8;
                  s8 = peg$FAILED;
                }
                if (s8 !== peg$FAILED) {
                  if (input.length > peg$currPos) {
                    s9 = input.charAt(peg$currPos);
                    peg$currPos++;
                  } else {
                    s9 = peg$FAILED;
                    if (peg$silentFails === 0) {
                      peg$fail(peg$c0);
                    }
                  }
                  if (s9 !== peg$FAILED) {
                    s8 = [s8, s9];
                    s7 = s8;
                  } else {
                    peg$currPos = s7;
                    s7 = peg$FAILED;
                  }
                } else {
                  peg$currPos = s7;
                  s7 = peg$FAILED;
                }
                while (s7 !== peg$FAILED) {
                  s6.push(s7);
                  s7 = peg$currPos;
                  s8 = peg$currPos;
                  peg$silentFails++;
                  s9 = peg$parseBlock();
                  peg$silentFails--;
                  if (s9 === peg$FAILED) {
                    s8 = void 0;
                  } else {
                    peg$currPos = s8;
                    s8 = peg$FAILED;
                  }
                  if (s8 !== peg$FAILED) {
                    if (input.length > peg$currPos) {
                      s9 = input.charAt(peg$currPos);
                      peg$currPos++;
                    } else {
                      s9 = peg$FAILED;
                      if (peg$silentFails === 0) {
                        peg$fail(peg$c0);
                      }
                    }
                    if (s9 !== peg$FAILED) {
                      s8 = [s8, s9];
                      s7 = s8;
                    } else {
                      peg$currPos = s7;
                      s7 = peg$FAILED;
                    }
                  } else {
                    peg$currPos = s7;
                    s7 = peg$FAILED;
                  }
                }
                if (s6 !== peg$FAILED) {
                  s5 = input.substring(s5, peg$currPos);
                } else {
                  s5 = s6;
                }
                if (s5 !== peg$FAILED) {
                  peg$savedPos = s3;
                  s4 = peg$c1(s1, s4, s5);
                  s3 = s4;
                } else {
                  peg$currPos = s3;
                  s3 = peg$FAILED;
                }
              } else {
                peg$currPos = s3;
                s3 = peg$FAILED;
              }
            }
            if (s2 !== peg$FAILED) {
              s3 = peg$currPos;
              s4 = [];
              if (input.length > peg$currPos) {
                s5 = input.charAt(peg$currPos);
                peg$currPos++;
              } else {
                s5 = peg$FAILED;
                if (peg$silentFails === 0) {
                  peg$fail(peg$c0);
                }
              }
              while (s5 !== peg$FAILED) {
                s4.push(s5);
                if (input.length > peg$currPos) {
                  s5 = input.charAt(peg$currPos);
                  peg$currPos++;
                } else {
                  s5 = peg$FAILED;
                  if (peg$silentFails === 0) {
                    peg$fail(peg$c0);
                  }
                }
              }
              if (s4 !== peg$FAILED) {
                s3 = input.substring(s3, peg$currPos);
              } else {
                s3 = s4;
              }
              if (s3 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c2(s1, s2, s3);
                s0 = s1;
              } else {
                peg$currPos = s0;
                s0 = peg$FAILED;
              }
            } else {
              peg$currPos = s0;
              s0 = peg$FAILED;
            }
          } else {
            peg$currPos = s0;
            s0 = peg$FAILED;
          }
          return s0;
        }
        function peg$parseBlock() {
          var s0;
          s0 = peg$parseBlock_Void();
          if (s0 === peg$FAILED) {
            s0 = peg$parseBlock_Balanced();
          }
          return s0;
        }
        function peg$parseBlock_Void() {
          var s0, s1, s2, s3, s4, s5, s6, s7, s8;
          s0 = peg$currPos;
          if (input.substr(peg$currPos, 4) === peg$c3) {
            s1 = peg$c3;
            peg$currPos += 4;
          } else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
              peg$fail(peg$c4);
            }
          }
          if (s1 !== peg$FAILED) {
            s2 = peg$parse__();
            if (s2 !== peg$FAILED) {
              if (input.substr(peg$currPos, 3) === peg$c5) {
                s3 = peg$c5;
                peg$currPos += 3;
              } else {
                s3 = peg$FAILED;
                if (peg$silentFails === 0) {
                  peg$fail(peg$c6);
                }
              }
              if (s3 !== peg$FAILED) {
                s4 = peg$parseBlock_Name();
                if (s4 !== peg$FAILED) {
                  s5 = peg$parse__();
                  if (s5 !== peg$FAILED) {
                    s6 = peg$currPos;
                    s7 = peg$parseBlock_Attributes();
                    if (s7 !== peg$FAILED) {
                      s8 = peg$parse__();
                      if (s8 !== peg$FAILED) {
                        peg$savedPos = s6;
                        s7 = peg$c7(s4, s7);
                        s6 = s7;
                      } else {
                        peg$currPos = s6;
                        s6 = peg$FAILED;
                      }
                    } else {
                      peg$currPos = s6;
                      s6 = peg$FAILED;
                    }
                    if (s6 === peg$FAILED) {
                      s6 = null;
                    }
                    if (s6 !== peg$FAILED) {
                      if (input.substr(peg$currPos, 4) === peg$c8) {
                        s7 = peg$c8;
                        peg$currPos += 4;
                      } else {
                        s7 = peg$FAILED;
                        if (peg$silentFails === 0) {
                          peg$fail(peg$c9);
                        }
                      }
                      if (s7 !== peg$FAILED) {
                        peg$savedPos = s0;
                        s1 = peg$c10(s4, s6);
                        s0 = s1;
                      } else {
                        peg$currPos = s0;
                        s0 = peg$FAILED;
                      }
                    } else {
                      peg$currPos = s0;
                      s0 = peg$FAILED;
                    }
                  } else {
                    peg$currPos = s0;
                    s0 = peg$FAILED;
                  }
                } else {
                  peg$currPos = s0;
                  s0 = peg$FAILED;
                }
              } else {
                peg$currPos = s0;
                s0 = peg$FAILED;
              }
            } else {
              peg$currPos = s0;
              s0 = peg$FAILED;
            }
          } else {
            peg$currPos = s0;
            s0 = peg$FAILED;
          }
          return s0;
        }
        function peg$parseBlock_Balanced() {
          var s0, s1, s2, s3, s4, s5, s6, s7, s8;
          s0 = peg$currPos;
          s1 = peg$parseBlock_Start();
          if (s1 !== peg$FAILED) {
            s2 = [];
            s3 = peg$parseBlock();
            if (s3 === peg$FAILED) {
              s3 = peg$currPos;
              s4 = [];
              s5 = peg$currPos;
              s6 = peg$currPos;
              peg$silentFails++;
              s7 = peg$parseBlock();
              peg$silentFails--;
              if (s7 === peg$FAILED) {
                s6 = void 0;
              } else {
                peg$currPos = s6;
                s6 = peg$FAILED;
              }
              if (s6 !== peg$FAILED) {
                s7 = peg$currPos;
                peg$silentFails++;
                s8 = peg$parseBlock_End();
                peg$silentFails--;
                if (s8 === peg$FAILED) {
                  s7 = void 0;
                } else {
                  peg$currPos = s7;
                  s7 = peg$FAILED;
                }
                if (s7 !== peg$FAILED) {
                  if (input.length > peg$currPos) {
                    s8 = input.charAt(peg$currPos);
                    peg$currPos++;
                  } else {
                    s8 = peg$FAILED;
                    if (peg$silentFails === 0) {
                      peg$fail(peg$c0);
                    }
                  }
                  if (s8 !== peg$FAILED) {
                    s6 = [s6, s7, s8];
                    s5 = s6;
                  } else {
                    peg$currPos = s5;
                    s5 = peg$FAILED;
                  }
                } else {
                  peg$currPos = s5;
                  s5 = peg$FAILED;
                }
              } else {
                peg$currPos = s5;
                s5 = peg$FAILED;
              }
              if (s5 !== peg$FAILED) {
                while (s5 !== peg$FAILED) {
                  s4.push(s5);
                  s5 = peg$currPos;
                  s6 = peg$currPos;
                  peg$silentFails++;
                  s7 = peg$parseBlock();
                  peg$silentFails--;
                  if (s7 === peg$FAILED) {
                    s6 = void 0;
                  } else {
                    peg$currPos = s6;
                    s6 = peg$FAILED;
                  }
                  if (s6 !== peg$FAILED) {
                    s7 = peg$currPos;
                    peg$silentFails++;
                    s8 = peg$parseBlock_End();
                    peg$silentFails--;
                    if (s8 === peg$FAILED) {
                      s7 = void 0;
                    } else {
                      peg$currPos = s7;
                      s7 = peg$FAILED;
                    }
                    if (s7 !== peg$FAILED) {
                      if (input.length > peg$currPos) {
                        s8 = input.charAt(peg$currPos);
                        peg$currPos++;
                      } else {
                        s8 = peg$FAILED;
                        if (peg$silentFails === 0) {
                          peg$fail(peg$c0);
                        }
                      }
                      if (s8 !== peg$FAILED) {
                        s6 = [s6, s7, s8];
                        s5 = s6;
                      } else {
                        peg$currPos = s5;
                        s5 = peg$FAILED;
                      }
                    } else {
                      peg$currPos = s5;
                      s5 = peg$FAILED;
                    }
                  } else {
                    peg$currPos = s5;
                    s5 = peg$FAILED;
                  }
                }
              } else {
                s4 = peg$FAILED;
              }
              if (s4 !== peg$FAILED) {
                s3 = input.substring(s3, peg$currPos);
              } else {
                s3 = s4;
              }
            }
            while (s3 !== peg$FAILED) {
              s2.push(s3);
              s3 = peg$parseBlock();
              if (s3 === peg$FAILED) {
                s3 = peg$currPos;
                s4 = [];
                s5 = peg$currPos;
                s6 = peg$currPos;
                peg$silentFails++;
                s7 = peg$parseBlock();
                peg$silentFails--;
                if (s7 === peg$FAILED) {
                  s6 = void 0;
                } else {
                  peg$currPos = s6;
                  s6 = peg$FAILED;
                }
                if (s6 !== peg$FAILED) {
                  s7 = peg$currPos;
                  peg$silentFails++;
                  s8 = peg$parseBlock_End();
                  peg$silentFails--;
                  if (s8 === peg$FAILED) {
                    s7 = void 0;
                  } else {
                    peg$currPos = s7;
                    s7 = peg$FAILED;
                  }
                  if (s7 !== peg$FAILED) {
                    if (input.length > peg$currPos) {
                      s8 = input.charAt(peg$currPos);
                      peg$currPos++;
                    } else {
                      s8 = peg$FAILED;
                      if (peg$silentFails === 0) {
                        peg$fail(peg$c0);
                      }
                    }
                    if (s8 !== peg$FAILED) {
                      s6 = [s6, s7, s8];
                      s5 = s6;
                    } else {
                      peg$currPos = s5;
                      s5 = peg$FAILED;
                    }
                  } else {
                    peg$currPos = s5;
                    s5 = peg$FAILED;
                  }
                } else {
                  peg$currPos = s5;
                  s5 = peg$FAILED;
                }
                if (s5 !== peg$FAILED) {
                  while (s5 !== peg$FAILED) {
                    s4.push(s5);
                    s5 = peg$currPos;
                    s6 = peg$currPos;
                    peg$silentFails++;
                    s7 = peg$parseBlock();
                    peg$silentFails--;
                    if (s7 === peg$FAILED) {
                      s6 = void 0;
                    } else {
                      peg$currPos = s6;
                      s6 = peg$FAILED;
                    }
                    if (s6 !== peg$FAILED) {
                      s7 = peg$currPos;
                      peg$silentFails++;
                      s8 = peg$parseBlock_End();
                      peg$silentFails--;
                      if (s8 === peg$FAILED) {
                        s7 = void 0;
                      } else {
                        peg$currPos = s7;
                        s7 = peg$FAILED;
                      }
                      if (s7 !== peg$FAILED) {
                        if (input.length > peg$currPos) {
                          s8 = input.charAt(peg$currPos);
                          peg$currPos++;
                        } else {
                          s8 = peg$FAILED;
                          if (peg$silentFails === 0) {
                            peg$fail(peg$c0);
                          }
                        }
                        if (s8 !== peg$FAILED) {
                          s6 = [s6, s7, s8];
                          s5 = s6;
                        } else {
                          peg$currPos = s5;
                          s5 = peg$FAILED;
                        }
                      } else {
                        peg$currPos = s5;
                        s5 = peg$FAILED;
                      }
                    } else {
                      peg$currPos = s5;
                      s5 = peg$FAILED;
                    }
                  }
                } else {
                  s4 = peg$FAILED;
                }
                if (s4 !== peg$FAILED) {
                  s3 = input.substring(s3, peg$currPos);
                } else {
                  s3 = s4;
                }
              }
            }
            if (s2 !== peg$FAILED) {
              s3 = peg$parseBlock_End();
              if (s3 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c11(s1, s2, s3);
                s0 = s1;
              } else {
                peg$currPos = s0;
                s0 = peg$FAILED;
              }
            } else {
              peg$currPos = s0;
              s0 = peg$FAILED;
            }
          } else {
            peg$currPos = s0;
            s0 = peg$FAILED;
          }
          return s0;
        }
        function peg$parseBlock_Start() {
          var s0, s1, s2, s3, s4, s5, s6, s7, s8;
          s0 = peg$currPos;
          if (input.substr(peg$currPos, 4) === peg$c3) {
            s1 = peg$c3;
            peg$currPos += 4;
          } else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
              peg$fail(peg$c4);
            }
          }
          if (s1 !== peg$FAILED) {
            s2 = peg$parse__();
            if (s2 !== peg$FAILED) {
              if (input.substr(peg$currPos, 3) === peg$c5) {
                s3 = peg$c5;
                peg$currPos += 3;
              } else {
                s3 = peg$FAILED;
                if (peg$silentFails === 0) {
                  peg$fail(peg$c6);
                }
              }
              if (s3 !== peg$FAILED) {
                s4 = peg$parseBlock_Name();
                if (s4 !== peg$FAILED) {
                  s5 = peg$parse__();
                  if (s5 !== peg$FAILED) {
                    s6 = peg$currPos;
                    s7 = peg$parseBlock_Attributes();
                    if (s7 !== peg$FAILED) {
                      s8 = peg$parse__();
                      if (s8 !== peg$FAILED) {
                        peg$savedPos = s6;
                        s7 = peg$c7(s4, s7);
                        s6 = s7;
                      } else {
                        peg$currPos = s6;
                        s6 = peg$FAILED;
                      }
                    } else {
                      peg$currPos = s6;
                      s6 = peg$FAILED;
                    }
                    if (s6 === peg$FAILED) {
                      s6 = null;
                    }
                    if (s6 !== peg$FAILED) {
                      if (input.substr(peg$currPos, 3) === peg$c12) {
                        s7 = peg$c12;
                        peg$currPos += 3;
                      } else {
                        s7 = peg$FAILED;
                        if (peg$silentFails === 0) {
                          peg$fail(peg$c13);
                        }
                      }
                      if (s7 !== peg$FAILED) {
                        peg$savedPos = s0;
                        s1 = peg$c14(s4, s6);
                        s0 = s1;
                      } else {
                        peg$currPos = s0;
                        s0 = peg$FAILED;
                      }
                    } else {
                      peg$currPos = s0;
                      s0 = peg$FAILED;
                    }
                  } else {
                    peg$currPos = s0;
                    s0 = peg$FAILED;
                  }
                } else {
                  peg$currPos = s0;
                  s0 = peg$FAILED;
                }
              } else {
                peg$currPos = s0;
                s0 = peg$FAILED;
              }
            } else {
              peg$currPos = s0;
              s0 = peg$FAILED;
            }
          } else {
            peg$currPos = s0;
            s0 = peg$FAILED;
          }
          return s0;
        }
        function peg$parseBlock_End() {
          var s0, s1, s2, s3, s4, s5, s6;
          s0 = peg$currPos;
          if (input.substr(peg$currPos, 4) === peg$c3) {
            s1 = peg$c3;
            peg$currPos += 4;
          } else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
              peg$fail(peg$c4);
            }
          }
          if (s1 !== peg$FAILED) {
            s2 = peg$parse__();
            if (s2 !== peg$FAILED) {
              if (input.substr(peg$currPos, 4) === peg$c15) {
                s3 = peg$c15;
                peg$currPos += 4;
              } else {
                s3 = peg$FAILED;
                if (peg$silentFails === 0) {
                  peg$fail(peg$c16);
                }
              }
              if (s3 !== peg$FAILED) {
                s4 = peg$parseBlock_Name();
                if (s4 !== peg$FAILED) {
                  s5 = peg$parse__();
                  if (s5 !== peg$FAILED) {
                    if (input.substr(peg$currPos, 3) === peg$c12) {
                      s6 = peg$c12;
                      peg$currPos += 3;
                    } else {
                      s6 = peg$FAILED;
                      if (peg$silentFails === 0) {
                        peg$fail(peg$c13);
                      }
                    }
                    if (s6 !== peg$FAILED) {
                      peg$savedPos = s0;
                      s1 = peg$c17(s4);
                      s0 = s1;
                    } else {
                      peg$currPos = s0;
                      s0 = peg$FAILED;
                    }
                  } else {
                    peg$currPos = s0;
                    s0 = peg$FAILED;
                  }
                } else {
                  peg$currPos = s0;
                  s0 = peg$FAILED;
                }
              } else {
                peg$currPos = s0;
                s0 = peg$FAILED;
              }
            } else {
              peg$currPos = s0;
              s0 = peg$FAILED;
            }
          } else {
            peg$currPos = s0;
            s0 = peg$FAILED;
          }
          return s0;
        }
        function peg$parseBlock_Name() {
          var s0;
          s0 = peg$parseNamespaced_Block_Name();
          if (s0 === peg$FAILED) {
            s0 = peg$parseCore_Block_Name();
          }
          return s0;
        }
        function peg$parseNamespaced_Block_Name() {
          var s0, s1, s2, s3, s4;
          s0 = peg$currPos;
          s1 = peg$currPos;
          s2 = peg$parseBlock_Name_Part();
          if (s2 !== peg$FAILED) {
            if (input.charCodeAt(peg$currPos) === 47) {
              s3 = peg$c18;
              peg$currPos++;
            } else {
              s3 = peg$FAILED;
              if (peg$silentFails === 0) {
                peg$fail(peg$c19);
              }
            }
            if (s3 !== peg$FAILED) {
              s4 = peg$parseBlock_Name_Part();
              if (s4 !== peg$FAILED) {
                s2 = [s2, s3, s4];
                s1 = s2;
              } else {
                peg$currPos = s1;
                s1 = peg$FAILED;
              }
            } else {
              peg$currPos = s1;
              s1 = peg$FAILED;
            }
          } else {
            peg$currPos = s1;
            s1 = peg$FAILED;
          }
          if (s1 !== peg$FAILED) {
            s0 = input.substring(s0, peg$currPos);
          } else {
            s0 = s1;
          }
          return s0;
        }
        function peg$parseCore_Block_Name() {
          var s0, s1, s2;
          s0 = peg$currPos;
          s1 = peg$currPos;
          s2 = peg$parseBlock_Name_Part();
          if (s2 !== peg$FAILED) {
            s1 = input.substring(s1, peg$currPos);
          } else {
            s1 = s2;
          }
          if (s1 !== peg$FAILED) {
            peg$savedPos = s0;
            s1 = peg$c20(s1);
          }
          s0 = s1;
          return s0;
        }
        function peg$parseBlock_Name_Part() {
          var s0, s1, s2, s3, s4;
          s0 = peg$currPos;
          s1 = peg$currPos;
          if (peg$c21.test(input.charAt(peg$currPos))) {
            s2 = input.charAt(peg$currPos);
            peg$currPos++;
          } else {
            s2 = peg$FAILED;
            if (peg$silentFails === 0) {
              peg$fail(peg$c22);
            }
          }
          if (s2 !== peg$FAILED) {
            s3 = [];
            if (peg$c23.test(input.charAt(peg$currPos))) {
              s4 = input.charAt(peg$currPos);
              peg$currPos++;
            } else {
              s4 = peg$FAILED;
              if (peg$silentFails === 0) {
                peg$fail(peg$c24);
              }
            }
            while (s4 !== peg$FAILED) {
              s3.push(s4);
              if (peg$c23.test(input.charAt(peg$currPos))) {
                s4 = input.charAt(peg$currPos);
                peg$currPos++;
              } else {
                s4 = peg$FAILED;
                if (peg$silentFails === 0) {
                  peg$fail(peg$c24);
                }
              }
            }
            if (s3 !== peg$FAILED) {
              s2 = [s2, s3];
              s1 = s2;
            } else {
              peg$currPos = s1;
              s1 = peg$FAILED;
            }
          } else {
            peg$currPos = s1;
            s1 = peg$FAILED;
          }
          if (s1 !== peg$FAILED) {
            s0 = input.substring(s0, peg$currPos);
          } else {
            s0 = s1;
          }
          return s0;
        }
        function peg$parseBlock_Attributes() {
          var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12;
          peg$silentFails++;
          s0 = peg$currPos;
          s1 = peg$currPos;
          s2 = peg$currPos;
          if (input.charCodeAt(peg$currPos) === 123) {
            s3 = peg$c26;
            peg$currPos++;
          } else {
            s3 = peg$FAILED;
            if (peg$silentFails === 0) {
              peg$fail(peg$c27);
            }
          }
          if (s3 !== peg$FAILED) {
            s4 = [];
            s5 = peg$currPos;
            s6 = peg$currPos;
            peg$silentFails++;
            s7 = peg$currPos;
            if (input.charCodeAt(peg$currPos) === 125) {
              s8 = peg$c28;
              peg$currPos++;
            } else {
              s8 = peg$FAILED;
              if (peg$silentFails === 0) {
                peg$fail(peg$c29);
              }
            }
            if (s8 !== peg$FAILED) {
              s9 = peg$parse__();
              if (s9 !== peg$FAILED) {
                s10 = peg$c30;
                if (s10 !== peg$FAILED) {
                  if (input.charCodeAt(peg$currPos) === 47) {
                    s11 = peg$c18;
                    peg$currPos++;
                  } else {
                    s11 = peg$FAILED;
                    if (peg$silentFails === 0) {
                      peg$fail(peg$c19);
                    }
                  }
                  if (s11 === peg$FAILED) {
                    s11 = null;
                  }
                  if (s11 !== peg$FAILED) {
                    if (input.substr(peg$currPos, 3) === peg$c12) {
                      s12 = peg$c12;
                      peg$currPos += 3;
                    } else {
                      s12 = peg$FAILED;
                      if (peg$silentFails === 0) {
                        peg$fail(peg$c13);
                      }
                    }
                    if (s12 !== peg$FAILED) {
                      s8 = [s8, s9, s10, s11, s12];
                      s7 = s8;
                    } else {
                      peg$currPos = s7;
                      s7 = peg$FAILED;
                    }
                  } else {
                    peg$currPos = s7;
                    s7 = peg$FAILED;
                  }
                } else {
                  peg$currPos = s7;
                  s7 = peg$FAILED;
                }
              } else {
                peg$currPos = s7;
                s7 = peg$FAILED;
              }
            } else {
              peg$currPos = s7;
              s7 = peg$FAILED;
            }
            peg$silentFails--;
            if (s7 === peg$FAILED) {
              s6 = void 0;
            } else {
              peg$currPos = s6;
              s6 = peg$FAILED;
            }
            if (s6 !== peg$FAILED) {
              if (input.length > peg$currPos) {
                s7 = input.charAt(peg$currPos);
                peg$currPos++;
              } else {
                s7 = peg$FAILED;
                if (peg$silentFails === 0) {
                  peg$fail(peg$c0);
                }
              }
              if (s7 !== peg$FAILED) {
                s6 = [s6, s7];
                s5 = s6;
              } else {
                peg$currPos = s5;
                s5 = peg$FAILED;
              }
            } else {
              peg$currPos = s5;
              s5 = peg$FAILED;
            }
            while (s5 !== peg$FAILED) {
              s4.push(s5);
              s5 = peg$currPos;
              s6 = peg$currPos;
              peg$silentFails++;
              s7 = peg$currPos;
              if (input.charCodeAt(peg$currPos) === 125) {
                s8 = peg$c28;
                peg$currPos++;
              } else {
                s8 = peg$FAILED;
                if (peg$silentFails === 0) {
                  peg$fail(peg$c29);
                }
              }
              if (s8 !== peg$FAILED) {
                s9 = peg$parse__();
                if (s9 !== peg$FAILED) {
                  s10 = peg$c30;
                  if (s10 !== peg$FAILED) {
                    if (input.charCodeAt(peg$currPos) === 47) {
                      s11 = peg$c18;
                      peg$currPos++;
                    } else {
                      s11 = peg$FAILED;
                      if (peg$silentFails === 0) {
                        peg$fail(peg$c19);
                      }
                    }
                    if (s11 === peg$FAILED) {
                      s11 = null;
                    }
                    if (s11 !== peg$FAILED) {
                      if (input.substr(peg$currPos, 3) === peg$c12) {
                        s12 = peg$c12;
                        peg$currPos += 3;
                      } else {
                        s12 = peg$FAILED;
                        if (peg$silentFails === 0) {
                          peg$fail(peg$c13);
                        }
                      }
                      if (s12 !== peg$FAILED) {
                        s8 = [s8, s9, s10, s11, s12];
                        s7 = s8;
                      } else {
                        peg$currPos = s7;
                        s7 = peg$FAILED;
                      }
                    } else {
                      peg$currPos = s7;
                      s7 = peg$FAILED;
                    }
                  } else {
                    peg$currPos = s7;
                    s7 = peg$FAILED;
                  }
                } else {
                  peg$currPos = s7;
                  s7 = peg$FAILED;
                }
              } else {
                peg$currPos = s7;
                s7 = peg$FAILED;
              }
              peg$silentFails--;
              if (s7 === peg$FAILED) {
                s6 = void 0;
              } else {
                peg$currPos = s6;
                s6 = peg$FAILED;
              }
              if (s6 !== peg$FAILED) {
                if (input.length > peg$currPos) {
                  s7 = input.charAt(peg$currPos);
                  peg$currPos++;
                } else {
                  s7 = peg$FAILED;
                  if (peg$silentFails === 0) {
                    peg$fail(peg$c0);
                  }
                }
                if (s7 !== peg$FAILED) {
                  s6 = [s6, s7];
                  s5 = s6;
                } else {
                  peg$currPos = s5;
                  s5 = peg$FAILED;
                }
              } else {
                peg$currPos = s5;
                s5 = peg$FAILED;
              }
            }
            if (s4 !== peg$FAILED) {
              if (input.charCodeAt(peg$currPos) === 125) {
                s5 = peg$c28;
                peg$currPos++;
              } else {
                s5 = peg$FAILED;
                if (peg$silentFails === 0) {
                  peg$fail(peg$c29);
                }
              }
              if (s5 !== peg$FAILED) {
                s3 = [s3, s4, s5];
                s2 = s3;
              } else {
                peg$currPos = s2;
                s2 = peg$FAILED;
              }
            } else {
              peg$currPos = s2;
              s2 = peg$FAILED;
            }
          } else {
            peg$currPos = s2;
            s2 = peg$FAILED;
          }
          if (s2 !== peg$FAILED) {
            s1 = input.substring(s1, peg$currPos);
          } else {
            s1 = s2;
          }
          if (s1 !== peg$FAILED) {
            peg$savedPos = s0;
            s1 = peg$c31(s1);
          }
          s0 = s1;
          peg$silentFails--;
          if (s0 === peg$FAILED) {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
              peg$fail(peg$c25);
            }
          }
          return s0;
        }
        function peg$parse__() {
          var s0, s1;
          s0 = [];
          if (peg$c32.test(input.charAt(peg$currPos))) {
            s1 = input.charAt(peg$currPos);
            peg$currPos++;
          } else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
              peg$fail(peg$c33);
            }
          }
          if (s1 !== peg$FAILED) {
            while (s1 !== peg$FAILED) {
              s0.push(s1);
              if (peg$c32.test(input.charAt(peg$currPos))) {
                s1 = input.charAt(peg$currPos);
                peg$currPos++;
              } else {
                s1 = peg$FAILED;
                if (peg$silentFails === 0) {
                  peg$fail(peg$c33);
                }
              }
            }
          } else {
            s0 = peg$FAILED;
          }
          return s0;
        }
        function freeform(s) {
          return s.length && {
            blockName: null,
            attrs: {},
            innerBlocks: [],
            innerHTML: s,
            innerContent: [s]
          };
        }
        function joinBlocks(pre, tokens, post) {
          var blocks = [], i, l, html, item, token;
          if (pre.length) {
            blocks.push(freeform(pre));
          }
          for (i = 0, l = tokens.length; i < l; i++) {
            item = tokens[i];
            token = item[0];
            html = item[1];
            blocks.push(token);
            if (html.length) {
              blocks.push(freeform(html));
            }
          }
          if (post.length) {
            blocks.push(freeform(post));
          }
          return blocks;
        }
        function maybeJSON(s) {
          try {
            return JSON.parse(s);
          } catch (e) {
            return null;
          }
        }
        function processInnerContent(list) {
          var i, l, item;
          var html = "";
          var blocks = [];
          var content = [];
          for (i = 0, l = list.length; i < l; i++) {
            item = list[i];
            if ("string" === typeof item) {
              html += item;
              content.push(item);
            } else {
              blocks.push(item);
              content.push(null);
            }
          }
          ;
          return [html, blocks, content];
        }
        peg$result = peg$startRuleFunction();
        if (peg$result !== peg$FAILED && peg$currPos === input.length) {
          return peg$result;
        } else {
          if (peg$result !== peg$FAILED && peg$currPos < input.length) {
            peg$fail(peg$endExpectation());
          }
          throw peg$buildStructuredError(
            peg$maxFailExpected,
            peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,
            peg$maxFailPos < input.length ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)
          );
        }
      }
      module.exports = {
        SyntaxError: peg$SyntaxError,
        parse: peg$parse
      };
    }
  });
  return require_parser();
})();
                   dist/sync.min.js                                                                                    0000644                 00000354164 15212564037 0007625 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).sync=(()=>{var Cc=Object.create;var Sn=Object.defineProperty;var Dc=Object.getOwnPropertyDescriptor;var Ac=Object.getOwnPropertyNames;var Uc=Object.getPrototypeOf,Ic=Object.prototype.hasOwnProperty;var xn=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),Ps=(n,t)=>{for(var e in t)Sn(n,e,{get:t[e],enumerable:!0})},js=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ac(t))!Ic.call(n,s)&&s!==e&&Sn(n,s,{get:()=>t[s],enumerable:!(r=Dc(t,s))||r.enumerable});return n};var Yt=(n,t,e)=>(e=n!=null?Cc(Uc(n)):{},js(t||!n||!n.__esModule?Sn(e,"default",{value:n,enumerable:!0}):e,n)),Tc=n=>js(Sn({},"__esModule",{value:!0}),n);var Bo=xn((lu,Vo)=>{Vo.exports=window.wp.privateApis});var tr=xn((hu,Go)=>{Go.exports=window.wp.hooks});var Zo=xn((gu,Qo)=>{Qo.exports=window.wp.apiFetch});var Ls=xn((th,Sc)=>{"use strict";Sc.exports=function n(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var r,s,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(s=r;s--!==0;)if(!n(t[s],e[s]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(s of t.entries())if(!e.has(s[0]))return!1;for(s of t.entries())if(!n(s[1],e.get(s[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(s of t.entries())if(!e.has(s[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(r=t.length,r!=e.length)return!1;for(s=r;s--!==0;)if(t[s]!==e[s])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[s]))return!1;for(s=r;s--!==0;){var o=i[s];if(!n(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}});var Ed={};Ps(Ed,{Awareness:()=>Ve,Y:()=>Bt,YJS_VERSION:()=>bd,privateApis:()=>Vs});var Bt={};Ps(Bt,{AbsolutePosition:()=>Rn,AbstractConnector:()=>Br,AbstractStruct:()=>Ne,AbstractType:()=>T,Array:()=>re,ContentAny:()=>Rt,ContentBinary:()=>ce,ContentDeleted:()=>Me,ContentDoc:()=>le,ContentEmbed:()=>_t,ContentFormat:()=>v,ContentJSON:()=>fn,ContentString:()=>lt,ContentType:()=>nt,Doc:()=>mt,GC:()=>G,ID:()=>Et,Item:()=>C,Map:()=>se,PermanentUserData:()=>jr,RelativePosition:()=>Oe,Skip:()=>P,Snapshot:()=>cn,Text:()=>Le,Transaction:()=>Bn,UndoManager:()=>te,UpdateDecoderV1:()=>X,UpdateDecoderV2:()=>J,UpdateEncoderV1:()=>wt,UpdateEncoderV2:()=>Q,XmlElement:()=>oe,XmlFragment:()=>ie,XmlHook:()=>hn,XmlText:()=>Hn,YArrayEvent:()=>Fn,YEvent:()=>ne,YMapEvent:()=>Yn,YTextEvent:()=>zn,YXmlEvent:()=>Gn,applyUpdate:()=>Qr,applyUpdateV2:()=>St,cleanupYTextFormatting:()=>Ao,compareIDs:()=>qt,compareRelativePositions:()=>$l,convertUpdateFormatV1ToV2:()=>fa,convertUpdateFormatV2ToV1:()=>ao,createAbsolutePositionFromRelativePosition:()=>Hl,createDeleteSet:()=>Jn,createDeleteSetFromStructStore:()=>qr,createDocFromSnapshot:()=>Ql,createID:()=>x,createRelativePositionFromJSON:()=>Vl,createRelativePositionFromTypeIndex:()=>Pl,createSnapshot:()=>ss,decodeRelativePosition:()=>zl,decodeSnapshot:()=>ql,decodeSnapshotV2:()=>Wi,decodeStateVector:()=>ts,decodeUpdate:()=>oa,decodeUpdateV2:()=>ro,diffUpdate:()=>da,diffUpdateV2:()=>is,emptySnapshot:()=>Wl,encodeRelativePosition:()=>Fl,encodeSnapshot:()=>Kl,encodeSnapshotV2:()=>qi,encodeStateAsUpdate:()=>Zr,encodeStateAsUpdateV2:()=>Vt,encodeStateVector:()=>ns,encodeStateVectorFromUpdate:()=>ca,encodeStateVectorFromUpdateV2:()=>io,equalDeleteSets:()=>Hi,equalSnapshots:()=>Jl,findIndexSS:()=>et,findRootTypeKey:()=>rs,getItem:()=>Wt,getItemCleanEnd:()=>zr,getItemCleanStart:()=>z,getState:()=>A,getTypeChildren:()=>wa,isDeleted:()=>ae,isParentOf:()=>on,iterateDeletedStructs:()=>Xt,logType:()=>Ml,logUpdate:()=>ia,logUpdateV2:()=>no,mergeDeleteSets:()=>Qt,mergeUpdates:()=>so,mergeUpdatesV2:()=>ee,obfuscateUpdate:()=>ua,obfuscateUpdateV2:()=>ha,parseUpdateMeta:()=>la,parseUpdateMetaV2:()=>oo,readUpdate:()=>vl,readUpdateV2:()=>Xr,relativePositionToJSON:()=>Rl,snapshot:()=>Xl,snapshotContainsUpdate:()=>ta,transact:()=>_,tryGc:()=>ra,typeListToArraySnapshot:()=>ya,typeMapGetAllSnapshot:()=>Eo,typeMapGetSnapshot:()=>ba});var U=()=>new Map,bn=n=>{let t=U();return n.forEach((e,r)=>{t.set(r,e)}),t},N=(n,t,e)=>{let r=n.get(t);return r===void 0&&n.set(t,r=e()),r},Fs=(n,t)=>{let e=[];for(let[r,s]of n)e.push(t(s,r));return e},Ys=(n,t)=>{for(let[e,r]of n)if(t(r,e))return!0;return!1};var dt=()=>new Set;var En=n=>n[n.length-1];var zs=(n,t)=>{for(let e=0;e<t.length;e++)n.push(t[e])},it=Array.from;var Gs=(n,t)=>{for(let e=0;e<n.length;e++)if(t(n[e],e,n))return!0;return!1};var Hs=(n,t)=>{let e=new Array(n);for(let r=0;r<n;r++)e[r]=t(r,e);return e};var zt=Array.isArray;var Dt=class{constructor(){this._observers=U()}on(t,e){return N(this._observers,t,dt).add(e),e}once(t,e){let r=(...s)=>{this.off(t,r),e(...s)};this.on(t,r)}off(t,e){let r=this._observers.get(t);r!==void 0&&(r.delete(e),r.size===0&&this._observers.delete(t))}emit(t,e){return it((this._observers.get(t)||U()).values()).forEach(r=>r(...e))}destroy(){this._observers=U()}},we=class{constructor(){this._observers=U()}on(t,e){N(this._observers,t,dt).add(e)}once(t,e){let r=(...s)=>{this.off(t,r),e(...s)};this.on(t,r)}off(t,e){let r=this._observers.get(t);r!==void 0&&(r.delete(e),r.size===0&&this._observers.delete(t))}emit(t,e){return it((this._observers.get(t)||U()).values()).forEach(r=>r(...e))}destroy(){this._observers=U()}};var W=Math.floor;var ye=Math.abs;var kn=(n,t)=>n<t?n:t,bt=(n,t)=>n>t?n:t,Cd=Number.isNaN;var _n=n=>n!==0?n<0:1/n<0;var lr=Number.MAX_SAFE_INTEGER,Dd=Number.MIN_SAFE_INTEGER,Ad=1<<31;var $s=Number.isInteger||(n=>typeof n=="number"&&isFinite(n)&&W(n)===n),Ud=Number.isNaN,Id=Number.parseInt;var ar=String.fromCharCode,Td=String.fromCodePoint,vd=ar(65535),vc=n=>n.toLowerCase(),Oc=/^\s*/g,Lc=n=>n.replace(Oc,""),Nc=/([A-Z])/g,dr=(n,t)=>Lc(n.replace(Nc,e=>`${t}${vc(e)}`));var Mc=n=>{let t=unescape(encodeURIComponent(n)),e=t.length,r=new Uint8Array(e);for(let s=0;s<e;s++)r[s]=t.codePointAt(s);return r},xe=typeof TextEncoder<"u"?new TextEncoder:null,Rc=n=>xe.encode(n),Ks=xe?Rc:Mc;var Se=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});Se&&Se.decode(new Uint8Array).length===1&&(Se=null);var qs=(n,t)=>Hs(t,()=>n).join("");var Gt=class{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}},ot=()=>new Gt;var Vc=n=>{let t=n.cpos;for(let e=0;e<n.bufs.length;e++)t+=n.bufs[e].length;return t};var Y=n=>{let t=new Uint8Array(Vc(n)),e=0;for(let r=0;r<n.bufs.length;r++){let s=n.bufs[r];t.set(s,e),e+=s.length}return t.set(new Uint8Array(n.cbuf.buffer,0,n.cpos),e),t},Bc=(n,t)=>{let e=n.cbuf.length;e-n.cpos<t&&(n.bufs.push(new Uint8Array(n.cbuf.buffer,0,n.cpos)),n.cbuf=new Uint8Array(bt(e,t)*2),n.cpos=0)},M=(n,t)=>{let e=n.cbuf.length;n.cpos===e&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array(e*2),n.cpos=0),n.cbuf[n.cpos++]=t};var _e=M;var S=(n,t)=>{for(;t>127;)M(n,128|127&t),t=W(t/128);M(n,127&t)},Je=(n,t)=>{let e=_n(t);for(e&&(t=-t),M(n,(t>63?128:0)|(e?64:0)|63&t),t=W(t/64);t>0;)M(n,(t>127?128:0)|127&t),t=W(t/128)},ur=new Uint8Array(3e4),Pc=ur.length/3,jc=(n,t)=>{if(t.length<Pc){let e=xe.encodeInto(t,ur).written||0;S(n,e);for(let r=0;r<e;r++)M(n,ur[r])}else V(n,Ks(t))},Fc=(n,t)=>{let e=unescape(encodeURIComponent(t)),r=e.length;S(n,r);for(let s=0;s<r;s++)M(n,e.codePointAt(s))},At=xe&&xe.encodeInto?jc:Fc;var ti=(n,t)=>Ce(n,Y(t)),Ce=(n,t)=>{let e=n.cbuf.length,r=n.cpos,s=kn(e-r,t.length),i=t.length-s;n.cbuf.set(t.subarray(0,s),r),n.cpos+=s,i>0&&(n.bufs.push(n.cbuf),n.cbuf=new Uint8Array(bt(e*2,i)),n.cbuf.set(t.subarray(s)),n.cpos=i)},V=(n,t)=>{S(n,t.byteLength),Ce(n,t)},hr=(n,t)=>{Bc(n,t);let e=new DataView(n.cbuf.buffer,n.cpos,t);return n.cpos+=t,e},Yc=(n,t)=>hr(n,4).setFloat32(0,t,!1),zc=(n,t)=>hr(n,8).setFloat64(0,t,!1),Gc=(n,t)=>hr(n,8).setBigInt64(0,t,!1);var Xs=new DataView(new ArrayBuffer(4)),Hc=n=>(Xs.setFloat32(0,n),Xs.getFloat32(0)===n),Ee=(n,t)=>{switch(typeof t){case"string":M(n,119),At(n,t);break;case"number":$s(t)&&ye(t)<=2147483647?(M(n,125),Je(n,t)):Hc(t)?(M(n,124),Yc(n,t)):(M(n,123),zc(n,t));break;case"bigint":M(n,122),Gc(n,t);break;case"object":if(t===null)M(n,126);else if(zt(t)){M(n,117),S(n,t.length);for(let e=0;e<t.length;e++)Ee(n,t[e])}else if(t instanceof Uint8Array)M(n,116),V(n,t);else{M(n,118);let e=Object.keys(t);S(n,e.length);for(let r=0;r<e.length;r++){let s=e[r];At(n,s),Ee(n,t[s])}}break;case"boolean":M(n,t?120:121);break;default:M(n,127)}},$e=class extends Gt{constructor(t){super(),this.w=t,this.s=null,this.count=0}write(t){this.s===t?this.count++:(this.count>0&&S(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}};var Qs=n=>{n.count>0&&(Je(n.encoder,n.count===1?n.s:-n.s),n.count>1&&S(n.encoder,n.count-2))},Ht=class{constructor(){this.encoder=new Gt,this.s=0,this.count=0}write(t){this.s===t?this.count++:(Qs(this),this.count=1,this.s=t)}toUint8Array(){return Qs(this),Y(this.encoder)}};var Zs=n=>{if(n.count>0){let t=n.diff*2+(n.count===1?0:1);Je(n.encoder,t),n.count>1&&S(n.encoder,n.count-2)}},ke=class{constructor(){this.encoder=new Gt,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(Zs(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return Zs(this),Y(this.encoder)}},Cn=class{constructor(){this.sarr=[],this.s="",this.lensE=new Ht}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(t.length)}toUint8Array(){let t=new Gt;return this.sarr.push(this.s),this.s="",At(t,this.sarr.join("")),Ce(t,this.lensE.toUint8Array()),Y(t)}};var ut=n=>new Error(n),ct=()=>{throw ut("Method unimplemented")},$=()=>{throw ut("Unexpected case")};var ni=ut("Unexpected end of array"),ri=ut("Integer out of Range"),De=class{constructor(t){this.arr=t,this.pos=0}},O=n=>new De(n),pr=n=>n.pos!==n.arr.length;var $c=(n,t)=>{let e=new Uint8Array(n.arr.buffer,n.pos+n.arr.byteOffset,t);return n.pos+=t,e},B=n=>$c(n,b(n));var $t=n=>n.arr[n.pos++];var b=n=>{let t=0,e=1,r=n.arr.length;for(;n.pos<r;){let s=n.arr[n.pos++];if(t=t+(s&127)*e,e*=128,s<128)return t;if(t>lr)throw ri}throw ni},qe=n=>{let t=n.arr[n.pos++],e=t&63,r=64,s=(t&64)>0?-1:1;if((t&128)===0)return s*e;let i=n.arr.length;for(;n.pos<i;){if(t=n.arr[n.pos++],e=e+(t&127)*r,r*=128,t<128)return s*e;if(e>lr)throw ri}throw ni};var Jc=n=>{let t=b(n);if(t===0)return"";{let e=String.fromCodePoint($t(n));if(--t<100)for(;t--;)e+=String.fromCodePoint($t(n));else for(;t>0;){let r=t<1e4?t:1e4,s=n.arr.subarray(n.pos,n.pos+r);n.pos+=r,e+=String.fromCodePoint.apply(null,s),t-=r}return decodeURIComponent(escape(e))}},Kc=n=>Se.decode(B(n)),It=Se?Kc:Jc;var gr=(n,t)=>{let e=new DataView(n.arr.buffer,n.arr.byteOffset+n.pos,t);return n.pos+=t,e},qc=n=>gr(n,4).getFloat32(0,!1),Wc=n=>gr(n,8).getFloat64(0,!1),Xc=n=>gr(n,8).getBigInt64(0,!1);var Qc=[n=>{},n=>null,qe,qc,Wc,Xc,n=>!1,n=>!0,It,n=>{let t=b(n),e={};for(let r=0;r<t;r++){let s=It(n);e[s]=Ae(n)}return e},n=>{let t=b(n),e=[];for(let r=0;r<t;r++)e.push(Ae(n));return e},B],Ae=n=>Qc[127-$t(n)](n),Ke=class extends De{constructor(t,e){super(t),this.reader=e,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),pr(this)?this.count=b(this)+1:this.count=-1),this.count--,this.s}};var Jt=class extends De{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=qe(this);let t=_n(this.s);this.count=1,t&&(this.s=-this.s,this.count=b(this)+2)}return this.count--,this.s}};var Ue=class extends De{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){let t=qe(this),e=t&1;this.diff=W(t/2),this.count=1,e&&(this.count=b(this)+2)}return this.s+=this.diff,this.count--,this.s}},Dn=class{constructor(t){this.decoder=new Jt(t),this.str=It(this.decoder),this.spos=0}read(){let t=this.spos+this.decoder.read(),e=this.str.slice(this.spos,t);return this.spos=t,e}};var Nd=crypto.subtle,si=crypto.getRandomValues.bind(crypto);var wr=()=>si(new Uint32Array(1))[0];var Zc="10000000-1000-4000-8000"+-1e11,ii=()=>Zc.replace(/[018]/g,n=>(n^wr()&15>>n/4).toString(16));var Tt=Date.now;var Sr=n=>new Promise(n);var Vd=Promise.all.bind(Promise);var xr=n=>n===void 0?null:n;var br=class{constructor(){this.map=new Map}setItem(t,e){this.map.set(t,e)}getItem(t){return this.map.get(t)}},oi=new br,rl=!0;try{typeof localStorage<"u"&&localStorage&&(oi=localStorage,rl=!1)}catch{}var ci=oi;var ai=Object.assign,di=Object.keys,ui=(n,t)=>{for(let e in n)t(n[e],e)};var Er=n=>di(n).length,li=n=>di(n).length;var hi=n=>{for(let t in n)return!1;return!0},il=(n,t)=>{for(let e in n)if(!t(n[e],e))return!1;return!0},kr=(n,t)=>Object.prototype.hasOwnProperty.call(n,t),_r=(n,t)=>n===t||li(n)===li(t)&&il(n,(e,r)=>(e!==void 0||kr(t,r))&&t[r]===e),ol=Object.freeze,Cr=n=>{for(let t in n){let e=n[t];(typeof e=="object"||typeof e=="function")&&Cr(n[t])}return ol(n)};var Xe=(n,t,e=0)=>{try{for(;e<n.length;e++)n[e](...t)}finally{e<n.length&&Xe(n,t,e+1)}};var Dr=n=>n,cl=(n,t)=>n===t;var We=(n,t)=>{if(n==null||t==null)return cl(n,t);if(n.constructor!==t.constructor)return!1;if(n===t)return!0;switch(n.constructor){case ArrayBuffer:n=new Uint8Array(n),t=new Uint8Array(t);case Uint8Array:{if(n.byteLength!==t.byteLength)return!1;for(let e=0;e<n.length;e++)if(n[e]!==t[e])return!1;break}case Set:{if(n.size!==t.size)return!1;for(let e of n)if(!t.has(e))return!1;break}case Map:{if(n.size!==t.size)return!1;for(let e of n.keys())if(!t.has(e)||!We(n.get(e),t.get(e)))return!1;break}case Object:if(Er(n)!==Er(t))return!1;for(let e in n)if(!kr(n,e)||!We(n[e],t[e]))return!1;break;case Array:if(n.length!==t.length)return!1;for(let e=0;e<n.length;e++)if(!We(n[e],t[e]))return!1;break;default:return!1}return!0},pi=(n,t)=>t.includes(n);var Ie=typeof process<"u"&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]",An=typeof window<"u"&&typeof document<"u"&&!Ie,Bd=typeof navigator<"u"?/Mac/.test(navigator.platform):!1,ht,ll=[],al=()=>{if(ht===void 0)if(Ie){ht=U();let n=process.argv,t=null;for(let e=0;e<n.length;e++){let r=n[e];r[0]==="-"?(t!==null&&ht.set(t,""),t=r):t!==null?(ht.set(t,r),t=null):ll.push(r)}t!==null&&ht.set(t,"")}else typeof location=="object"?(ht=U(),(location.search||"?").slice(1).split("&").forEach(n=>{if(n.length!==0){let[t,e]=n.split("=");ht.set(`--${dr(t,"-")}`,e),ht.set(`-${dr(t,"-")}`,e)}})):ht=U();return ht},Ur=n=>al().has(n);var Qe=n=>Ie?xr(process.env[n.toUpperCase().replaceAll("-","_")]):xr(ci.getItem(n));var gi=n=>Ur("--"+n)||Qe(n)!==null,Pd=gi("production"),dl=Ie&&pi(process.env.FORCE_COLOR,["true","1","2"]),mi=dl||!Ur("--no-colors")&&!gi("no-color")&&(!Ie||process.stdout.isTTY)&&(!Ie||Ur("--color")||Qe("COLORTERM")!==null||(Qe("TERM")||"").includes("color"));var wi=n=>new Uint8Array(n),ul=(n,t,e)=>new Uint8Array(n,t,e);var hl=n=>{let t="";for(let e=0;e<n.byteLength;e++)t+=ar(n[e]);return btoa(t)},fl=n=>Buffer.from(n.buffer,n.byteOffset,n.byteLength).toString("base64"),pl=n=>{let t=atob(n),e=wi(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e},gl=n=>{let t=Buffer.from(n,"base64");return ul(t.buffer,t.byteOffset,t.byteLength)},yi=An?hl:fl,Si=An?pl:gl;var xi=n=>{let t=wi(n.byteLength);return t.set(n),t};var Tr=class{constructor(t,e){this.left=t,this.right=e}},ft=(n,t)=>new Tr(n,t);var Kt=typeof document<"u"?document:{};var jd=typeof DOMParser<"u"?new DOMParser:null;var Ei=n=>Fs(n,(t,e)=>`${e}:${t};`).join("");var Fd=Kt.ELEMENT_NODE,Yd=Kt.TEXT_NODE,zd=Kt.CDATA_SECTION_NODE,Gd=Kt.COMMENT_NODE,Hd=Kt.DOCUMENT_NODE,$d=Kt.DOCUMENT_TYPE_NODE,Jd=Kt.DOCUMENT_FRAGMENT_NODE;var pt=Symbol;var Ze=pt(),tn=pt(),vr=pt(),Or=pt(),Lr=pt(),en=pt(),Nr=pt(),Te=pt(),Mr=pt(),ki=n=>{n.length===1&&n[0]?.constructor===Function&&(n=n[0]());let t=[],e=[],r=0;for(;r<n.length;r++){let s=n[r];if(s===void 0)break;if(s.constructor===String||s.constructor===Number)t.push(s);else if(s.constructor===Object)break}for(r>0&&e.push(t.join(""));r<n.length;r++){let s=n[r];s instanceof Symbol||e.push(s)}return e};var Kd=Tt();var xl={[Ze]:ft("font-weight","bold"),[tn]:ft("font-weight","normal"),[vr]:ft("color","blue"),[Lr]:ft("color","green"),[Or]:ft("color","grey"),[en]:ft("color","red"),[Nr]:ft("color","purple"),[Te]:ft("color","orange"),[Mr]:ft("color","black")},bl=n=>{n.length===1&&n[0]?.constructor===Function&&(n=n[0]());let t=[],e=[],r=U(),s=[],i=0;for(;i<n.length;i++){let o=n[i],c=xl[o];if(c!==void 0)r.set(c.left,c.right);else{if(o===void 0)break;if(o.constructor===String||o.constructor===Number){let l=Ei(r);i>0||l.length>0?(t.push("%c"+o),e.push(l)):t.push(o)}else break}}for(i>0&&(s=e,s.unshift(t.join("")));i<n.length;i++){let o=n[i];o instanceof Symbol||s.push(o)}return s},_i=mi?bl:ki,Un=(...n)=>{console.log(..._i(n)),Ci.forEach(t=>t.print(n))},Rr=(...n)=>{console.warn(..._i(n)),n.unshift(Te),Ci.forEach(t=>t.print(n))};var Ci=dt();var Di=n=>({[Symbol.iterator](){return this},next:n}),Ai=(n,t)=>Di(()=>{let e;do e=n.next();while(!e.done&&!t(e.value));return e}),In=(n,t)=>Di(()=>{let{done:e,value:r}=n.next();return{done:e,value:e?void 0:t(r)}});var Br=class extends Dt{constructor(t,e){super(),this.doc=t,this.awareness=e}},rn=class{constructor(t,e){this.clock=t,this.len=e}},Nt=class{constructor(){this.clients=new Map}},Xt=(n,t,e)=>t.clients.forEach((r,s)=>{let i=n.doc.store.clients.get(s);if(i!=null){let o=i[i.length-1],c=o.id.clock+o.length;for(let l=0,a=r[l];l<r.length&&a.clock<c;a=r[++l])Qi(n,i,a.clock,a.len,e)}}),Dl=(n,t)=>{let e=0,r=n.length-1;for(;e<=r;){let s=W((e+r)/2),i=n[s],o=i.clock;if(o<=t){if(t<o+i.len)return s;e=s+1}else r=s-1}return null},ae=(n,t)=>{let e=n.clients.get(t.client);return e!==void 0&&Dl(e,t.clock)!==null},Kr=n=>{n.clients.forEach(t=>{t.sort((s,i)=>s.clock-i.clock);let e,r;for(e=1,r=1;e<t.length;e++){let s=t[r-1],i=t[e];s.clock+s.len>=i.clock?s.len=bt(s.len,i.clock+i.len-s.clock):(r<e&&(t[r]=i),r++)}t.length=r})},Qt=n=>{let t=new Nt;for(let e=0;e<n.length;e++)n[e].clients.forEach((r,s)=>{if(!t.clients.has(s)){let i=r.slice();for(let o=e+1;o<n.length;o++)zs(i,n[o].clients.get(s)||[]);t.clients.set(s,i)}});return Kr(t),t},sn=(n,t,e,r)=>{N(n.clients,t,()=>[]).push(new rn(e,r))},Jn=()=>new Nt,qr=n=>{let t=Jn();return n.clients.forEach((e,r)=>{let s=[];for(let i=0;i<e.length;i++){let o=e[i];if(o.deleted){let c=o.id.clock,l=o.length;if(i+1<e.length)for(let a=e[i+1];i+1<e.length&&a.deleted;a=e[++i+1])l+=a.length;s.push(new rn(c,l))}}s.length>0&&t.clients.set(r,s)}),t},gt=(n,t)=>{S(n.restEncoder,t.clients.size),it(t.clients.entries()).sort((e,r)=>r[0]-e[0]).forEach(([e,r])=>{n.resetDsCurVal(),S(n.restEncoder,e);let s=r.length;S(n.restEncoder,s);for(let i=0;i<s;i++){let o=r[i];n.writeDsClock(o.clock),n.writeDsLen(o.len)}})},kt=n=>{let t=new Nt,e=b(n.restDecoder);for(let r=0;r<e;r++){n.resetDsCurVal();let s=b(n.restDecoder),i=b(n.restDecoder);if(i>0){let o=N(t.clients,s,()=>[]);for(let c=0;c<i;c++)o.push(new rn(n.readDsClock(),n.readDsLen()))}}return t},Ti=(n,t,e)=>{let r=new Nt,s=b(n.restDecoder);for(let i=0;i<s;i++){n.resetDsCurVal();let o=b(n.restDecoder),c=b(n.restDecoder),l=e.clients.get(o)||[],a=A(e,o);for(let d=0;d<c;d++){let u=n.readDsClock(),h=u+n.readDsLen();if(u<a){a<h&&sn(r,o,a,h-a);let f=et(l,u),p=l[f];for(!p.deleted&&p.id.clock<u&&(l.splice(f+1,0,$n(t,p,u-p.id.clock)),f++);f<l.length&&(p=l[f++],p.id.clock<h);)p.deleted||(h<p.id.clock+p.length&&l.splice(f,0,$n(t,p,h-p.id.clock)),p.delete(t))}else sn(r,o,u,h-u)}}if(r.clients.size>0){let i=new Q;return S(i.restEncoder,0),gt(i,r),i.toUint8Array()}return null},Hi=(n,t)=>{if(n.clients.size!==t.clients.size)return!1;for(let[e,r]of n.clients.entries()){let s=t.clients.get(e);if(s===void 0||r.length!==s.length)return!1;for(let i=0;i<r.length;i++){let o=r[i],c=s[i];if(o.clock!==c.clock||o.len!==c.len)return!1}}return!0},$i=wr,mt=class n extends Dt{constructor({guid:t=ii(),collectionid:e=null,gc:r=!0,gcFilter:s=()=>!0,meta:i=null,autoLoad:o=!1,shouldLoad:c=!0}={}){super(),this.gc=r,this.gcFilter=s,this.clientID=$i(),this.guid=t,this.collectionid=e,this.share=new Map,this.store=new Vn,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=c,this.autoLoad=o,this.meta=i,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=Sr(a=>{this.on("load",()=>{this.isLoaded=!0,a(this)})});let l=()=>Sr(a=>{let d=u=>{(u===void 0||u===!0)&&(this.off("sync",d),a())};this.on("sync",d)});this.on("sync",a=>{a===!1&&this.isSynced&&(this.whenSynced=l()),this.isSynced=a===void 0||a===!0,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=l()}load(){let t=this._item;t!==null&&!this.shouldLoad&&_(t.parent.doc,e=>{e.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(it(this.subdocs).map(t=>t.guid))}transact(t,e=null){return _(this,t,e)}get(t,e=T){let r=N(this.share,t,()=>{let i=new e;return i._integrate(this,null),i}),s=r.constructor;if(e!==T&&s!==e)if(s===T){let i=new e;i._map=r._map,r._map.forEach(o=>{for(;o!==null;o=o.left)o.parent=i}),i._start=r._start;for(let o=i._start;o!==null;o=o.right)o.parent=i;return i._length=r._length,this.share.set(t,i),i._integrate(this,null),i}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return r}getArray(t=""){return this.get(t,re)}getText(t=""){return this.get(t,Le)}getMap(t=""){return this.get(t,se)}getXmlElement(t=""){return this.get(t,oe)}getXmlFragment(t=""){return this.get(t,ie)}toJSON(){let t={};return this.share.forEach((e,r)=>{t[r]=e.toJSON()}),t}destroy(){this.isDestroyed=!0,it(this.subdocs).forEach(e=>e.destroy());let t=this._item;if(t!==null){this._item=null;let e=t.content;e.doc=new n({guid:this.guid,...e.opts,shouldLoad:!1}),e.doc._item=t,_(t.parent.doc,r=>{let s=e.doc;t.deleted||r.subdocsAdded.add(s),r.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}},Zt=class{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return b(this.restDecoder)}readDsLen(){return b(this.restDecoder)}},X=class extends Zt{readLeftID(){return x(b(this.restDecoder),b(this.restDecoder))}readRightID(){return x(b(this.restDecoder),b(this.restDecoder))}readClient(){return b(this.restDecoder)}readInfo(){return $t(this.restDecoder)}readString(){return It(this.restDecoder)}readParentInfo(){return b(this.restDecoder)===1}readTypeRef(){return b(this.restDecoder)}readLen(){return b(this.restDecoder)}readAny(){return Ae(this.restDecoder)}readBuf(){return xi(B(this.restDecoder))}readJSON(){return JSON.parse(It(this.restDecoder))}readKey(){return It(this.restDecoder)}},Mn=class{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=b(this.restDecoder),this.dsCurrVal}readDsLen(){let t=b(this.restDecoder)+1;return this.dsCurrVal+=t,t}},J=class extends Mn{constructor(t){super(t),this.keys=[],b(t),this.keyClockDecoder=new Ue(B(t)),this.clientDecoder=new Jt(B(t)),this.leftClockDecoder=new Ue(B(t)),this.rightClockDecoder=new Ue(B(t)),this.infoDecoder=new Ke(B(t),$t),this.stringDecoder=new Dn(B(t)),this.parentInfoDecoder=new Ke(B(t),$t),this.typeRefDecoder=new Jt(B(t)),this.lenDecoder=new Jt(B(t))}readLeftID(){return new Et(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new Et(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return Ae(this.restDecoder)}readBuf(){return B(this.restDecoder)}readJSON(){return Ae(this.restDecoder)}readKey(){let t=this.keyClockDecoder.read();if(t<this.keys.length)return this.keys[t];{let e=this.stringDecoder.read();return this.keys.push(e),e}}},Mt=class{constructor(){this.restEncoder=ot()}toUint8Array(){return Y(this.restEncoder)}resetDsCurVal(){}writeDsClock(t){S(this.restEncoder,t)}writeDsLen(t){S(this.restEncoder,t)}},wt=class extends Mt{writeLeftID(t){S(this.restEncoder,t.client),S(this.restEncoder,t.clock)}writeRightID(t){S(this.restEncoder,t.client),S(this.restEncoder,t.clock)}writeClient(t){S(this.restEncoder,t)}writeInfo(t){_e(this.restEncoder,t)}writeString(t){At(this.restEncoder,t)}writeParentInfo(t){S(this.restEncoder,t?1:0)}writeTypeRef(t){S(this.restEncoder,t)}writeLen(t){S(this.restEncoder,t)}writeAny(t){Ee(this.restEncoder,t)}writeBuf(t){V(this.restEncoder,t)}writeJSON(t){At(this.restEncoder,JSON.stringify(t))}writeKey(t){At(this.restEncoder,t)}},ve=class{constructor(){this.restEncoder=ot(),this.dsCurrVal=0}toUint8Array(){return Y(this.restEncoder)}resetDsCurVal(){this.dsCurrVal=0}writeDsClock(t){let e=t-this.dsCurrVal;this.dsCurrVal=t,S(this.restEncoder,e)}writeDsLen(t){t===0&&$(),S(this.restEncoder,t-1),this.dsCurrVal+=t}},Q=class extends ve{constructor(){super(),this.keyMap=new Map,this.keyClock=0,this.keyClockEncoder=new ke,this.clientEncoder=new Ht,this.leftClockEncoder=new ke,this.rightClockEncoder=new ke,this.infoEncoder=new $e(_e),this.stringEncoder=new Cn,this.parentInfoEncoder=new $e(_e),this.typeRefEncoder=new Ht,this.lenEncoder=new Ht}toUint8Array(){let t=ot();return S(t,0),V(t,this.keyClockEncoder.toUint8Array()),V(t,this.clientEncoder.toUint8Array()),V(t,this.leftClockEncoder.toUint8Array()),V(t,this.rightClockEncoder.toUint8Array()),V(t,Y(this.infoEncoder)),V(t,this.stringEncoder.toUint8Array()),V(t,Y(this.parentInfoEncoder)),V(t,this.typeRefEncoder.toUint8Array()),V(t,this.lenEncoder.toUint8Array()),Ce(t,Y(this.restEncoder)),Y(t)}writeLeftID(t){this.clientEncoder.write(t.client),this.leftClockEncoder.write(t.clock)}writeRightID(t){this.clientEncoder.write(t.client),this.rightClockEncoder.write(t.clock)}writeClient(t){this.clientEncoder.write(t)}writeInfo(t){this.infoEncoder.write(t)}writeString(t){this.stringEncoder.write(t)}writeParentInfo(t){this.parentInfoEncoder.write(t?1:0)}writeTypeRef(t){this.typeRefEncoder.write(t)}writeLen(t){this.lenEncoder.write(t)}writeAny(t){Ee(this.restEncoder,t)}writeBuf(t){V(this.restEncoder,t)}writeJSON(t){Ee(this.restEncoder,t)}writeKey(t){let e=this.keyMap.get(t);e===void 0?(this.keyClockEncoder.write(this.keyClock++),this.stringEncoder.write(t)):this.keyClockEncoder.write(e)}},Al=(n,t,e,r)=>{r=bt(r,t[0].id.clock);let s=et(t,r);S(n.restEncoder,t.length-s),n.writeClient(e),S(n.restEncoder,r);let i=t[s];i.write(n,r-i.id.clock);for(let o=s+1;o<t.length;o++)t[o].write(n,0)},Wr=(n,t,e)=>{let r=new Map;e.forEach((s,i)=>{A(t,i)>s&&r.set(i,s)}),pn(t).forEach((s,i)=>{e.has(i)||r.set(i,0)}),S(n.restEncoder,r.size),it(r.entries()).sort((s,i)=>i[0]-s[0]).forEach(([s,i])=>{Al(n,t.clients.get(s),s,i)})},Ul=(n,t)=>{let e=U(),r=b(n.restDecoder);for(let s=0;s<r;s++){let i=b(n.restDecoder),o=new Array(i),c=n.readClient(),l=b(n.restDecoder);e.set(c,{i:0,refs:o});for(let a=0;a<i;a++){let d=n.readInfo();switch(31&d){case 0:{let u=n.readLen();o[a]=new G(x(c,l),u),l+=u;break}case 10:{let u=b(n.restDecoder);o[a]=new P(x(c,l),u),l+=u;break}default:{let u=(d&192)===0,h=new C(x(c,l),null,(d&128)===128?n.readLeftID():null,null,(d&64)===64?n.readRightID():null,u?n.readParentInfo()?t.get(n.readString()):n.readLeftID():null,u&&(d&32)===32?n.readString():null,To(n,d));o[a]=h,l+=h.length}}}}return e},Il=(n,t,e)=>{let r=[],s=it(e.keys()).sort((f,p)=>f-p);if(s.length===0)return null;let i=()=>{if(s.length===0)return null;let f=e.get(s[s.length-1]);for(;f.refs.length===f.i;)if(s.pop(),s.length>0)f=e.get(s[s.length-1]);else return null;return f},o=i();if(o===null)return null;let c=new Vn,l=new Map,a=(f,p)=>{let g=l.get(f);(g==null||g>p)&&l.set(f,p)},d=o.refs[o.i++],u=new Map,h=()=>{for(let f of r){let p=f.id.client,g=e.get(p);g?(g.i--,c.clients.set(p,g.refs.slice(g.i)),e.delete(p),g.i=0,g.refs=[]):c.clients.set(p,[f]),s=s.filter(m=>m!==p)}r.length=0};for(;;){if(d.constructor!==P){let p=N(u,d.id.client,()=>A(t,d.id.client))-d.id.clock;if(p<0)r.push(d),a(d.id.client,d.id.clock-1),h();else{let g=d.getMissing(n,t);if(g!==null){r.push(d);let m=e.get(g)||{refs:[],i:0};if(m.refs.length===m.i)a(g,A(t,g)),h();else{d=m.refs[m.i++];continue}}else(p===0||p<d.length)&&(d.integrate(n,p),u.set(d.id.client,d.id.clock+d.length))}}if(r.length>0)d=r.pop();else if(o!==null&&o.i<o.refs.length)d=o.refs[o.i++];else{if(o=i(),o===null)break;d=o.refs[o.i++]}}if(c.clients.size>0){let f=new Q;return Wr(f,c,new Map),S(f.restEncoder,0),{missing:l,update:f.toUint8Array()}}return null},Tl=(n,t)=>Wr(n,t.doc.store,t.beforeState),Xr=(n,t,e,r=new J(n))=>_(t,s=>{s.local=!1;let i=!1,o=s.doc,c=o.store,l=Ul(r,o),a=Il(s,c,l),d=c.pendingStructs;if(d){for(let[h,f]of d.missing)if(f<A(c,h)){i=!0;break}if(a){for(let[h,f]of a.missing){let p=d.missing.get(h);(p==null||p>f)&&d.missing.set(h,f)}d.update=ee([d.update,a.update])}}else c.pendingStructs=a;let u=Ti(r,s,c);if(c.pendingDs){let h=new J(O(c.pendingDs));b(h.restDecoder);let f=Ti(h,s,c);u&&f?c.pendingDs=ee([u,f]):c.pendingDs=u||f}else c.pendingDs=u;if(i){let h=c.pendingStructs.update;c.pendingStructs=null,St(s.doc,h)}},e,!1),vl=(n,t,e)=>Xr(n,t,e,new X(n)),St=(n,t,e,r=J)=>{let s=O(t);Xr(s,n,e,new r(s))},Qr=(n,t,e)=>St(n,t,e,X),Ol=(n,t,e=new Map)=>{Wr(n,t.store,e),gt(n,qr(t.store))},Vt=(n,t=new Uint8Array([0]),e=new Q)=>{let r=ts(t);Ol(e,n,r);let s=[e.toUint8Array()];if(n.store.pendingDs&&s.push(n.store.pendingDs),n.store.pendingStructs&&s.push(is(n.store.pendingStructs.update,t)),s.length>1){if(e.constructor===wt)return so(s.map((i,o)=>o===0?i:ao(i)));if(e.constructor===Q)return ee(s)}return s[0]},Zr=(n,t)=>Vt(n,t,new wt),Ji=n=>{let t=new Map,e=b(n.restDecoder);for(let r=0;r<e;r++){let s=b(n.restDecoder),i=b(n.restDecoder);t.set(s,i)}return t},ts=n=>Ji(new Zt(O(n))),es=(n,t)=>(S(n.restEncoder,t.size),it(t.entries()).sort((e,r)=>r[0]-e[0]).forEach(([e,r])=>{S(n.restEncoder,e),S(n.restEncoder,r)}),n),Ll=(n,t)=>es(n,pn(t.store)),Nl=(n,t=new ve)=>(n instanceof Map?es(t,n):Ll(t,n),t.toUint8Array()),ns=n=>Nl(n,new Mt),Pr=class{constructor(){this.l=[]}},vi=()=>new Pr,Oi=(n,t)=>n.l.push(t),Li=(n,t)=>{let e=n.l,r=e.length;n.l=e.filter(s=>t!==s),r===n.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},Ki=(n,t,e)=>Xe(n.l,[t,e]),Et=class{constructor(t,e){this.client=t,this.clock=e}},qt=(n,t)=>n===t||n!==null&&t!==null&&n.client===t.client&&n.clock===t.clock,x=(n,t)=>new Et(n,t),Ni=(n,t)=>{S(n,t.client),S(n,t.clock)},Mi=n=>x(b(n),b(n)),rs=n=>{for(let[t,e]of n.doc.share.entries())if(e===n)return t;throw $()},on=(n,t)=>{for(;t!==null;){if(t.parent===n)return!0;t=t.parent._item}return!1},Ml=n=>{let t=[],e=n._start;for(;e;)t.push(e),e=e.right;console.log("Children: ",t),console.log("Children content: ",t.filter(r=>!r.deleted).map(r=>r.content))},jr=class{constructor(t,e=t.getMap("users")){let r=new Map;this.yusers=e,this.doc=t,this.clients=new Map,this.dss=r;let s=(i,o)=>{let c=i.get("ds"),l=i.get("ids"),a=d=>this.clients.set(d,o);c.observe(d=>{d.changes.added.forEach(u=>{u.content.getContent().forEach(h=>{h instanceof Uint8Array&&this.dss.set(o,Qt([this.dss.get(o)||Jn(),kt(new Zt(O(h)))]))})})}),this.dss.set(o,Qt(c.map(d=>kt(new Zt(O(d)))))),l.observe(d=>d.changes.added.forEach(u=>u.content.getContent().forEach(a))),l.forEach(a)};e.observe(i=>{i.keysChanged.forEach(o=>s(e.get(o),o))}),e.forEach(s)}setUserMapping(t,e,r,{filter:s=()=>!0}={}){let i=this.yusers,o=i.get(r);o||(o=new se,o.set("ids",new re),o.set("ds",new re),i.set(r,o)),o.get("ids").push([e]),i.observe(c=>{setTimeout(()=>{let l=i.get(r);if(l!==o){o=l,this.clients.forEach((u,h)=>{r===u&&o.get("ids").push([h])});let a=new Mt,d=this.dss.get(r);d&&(gt(a,d),o.get("ds").push([a.toUint8Array()]))}},0)}),t.on("afterTransaction",c=>{setTimeout(()=>{let l=o.get("ds"),a=c.deleteSet;if(c.local&&a.clients.size>0&&s(c,a)){let d=new Mt;gt(d,a),l.push([d.toUint8Array()])}})})}getUserByClientId(t){return this.clients.get(t)||null}getUserByDeletedId(t){for(let[e,r]of this.dss.entries())if(ae(r,t))return e;return null}},Oe=class{constructor(t,e,r,s=0){this.type=t,this.tname=e,this.item=r,this.assoc=s}},Rl=n=>{let t={};return n.type&&(t.type=n.type),n.tname&&(t.tname=n.tname),n.item&&(t.item=n.item),n.assoc!=null&&(t.assoc=n.assoc),t},Vl=n=>new Oe(n.type==null?null:x(n.type.client,n.type.clock),n.tname??null,n.item==null?null:x(n.item.client,n.item.clock),n.assoc==null?0:n.assoc),Rn=class{constructor(t,e,r=0){this.type=t,this.index=e,this.assoc=r}},Bl=(n,t,e=0)=>new Rn(n,t,e),Tn=(n,t,e)=>{let r=null,s=null;return n._item===null?s=rs(n):r=x(n._item.id.client,n._item.id.clock),new Oe(r,s,t,e)},Pl=(n,t,e=0)=>{let r=n._start;if(e<0){if(t===0)return Tn(n,null,e);t--}for(;r!==null;){if(!r.deleted&&r.countable){if(r.length>t)return Tn(n,x(r.id.client,r.id.clock+t),e);t-=r.length}if(r.right===null&&e<0)return Tn(n,r.lastId,e);r=r.right}return Tn(n,null,e)},jl=(n,t)=>{let{type:e,tname:r,item:s,assoc:i}=t;if(s!==null)S(n,0),Ni(n,s);else if(r!==null)_e(n,1),At(n,r);else if(e!==null)_e(n,2),Ni(n,e);else throw $();return Je(n,i),n},Fl=n=>{let t=ot();return jl(t,n),Y(t)},Yl=n=>{let t=null,e=null,r=null;switch(b(n)){case 0:r=Mi(n);break;case 1:e=It(n);break;case 2:t=Mi(n)}let s=pr(n)?qe(n):0;return new Oe(t,e,r,s)},zl=n=>Yl(O(n)),Gl=(n,t)=>{let e=Wt(n,t),r=t.clock-e.id.clock;return{item:e,diff:r}},Hl=(n,t,e=!0)=>{let r=t.store,s=n.item,i=n.type,o=n.tname,c=n.assoc,l=null,a=0;if(s!==null){if(A(r,s.client)<=s.clock)return null;let d=e?$r(r,s):Gl(r,s),u=d.item;if(!(u instanceof C))return null;if(l=u.parent,l._item===null||!l._item.deleted){a=u.deleted||!u.countable?0:d.diff+(c>=0?0:1);let h=u.left;for(;h!==null;)!h.deleted&&h.countable&&(a+=h.length),h=h.left}}else{if(o!==null)l=t.get(o);else if(i!==null){if(A(r,i.client)<=i.clock)return null;let{item:d}=e?$r(r,i):{item:Wt(r,i)};if(d instanceof C&&d.content instanceof nt)l=d.content.type;else return null}else throw $();c>=0?a=l._length:a=0}return Bl(l,a,n.assoc)},$l=(n,t)=>n===t||n!==null&&t!==null&&n.tname===t.tname&&qt(n.item,t.item)&&qt(n.type,t.type)&&n.assoc===t.assoc,cn=class{constructor(t,e){this.ds=t,this.sv=e}},Jl=(n,t)=>{let e=n.ds.clients,r=t.ds.clients,s=n.sv,i=t.sv;if(s.size!==i.size||e.size!==r.size)return!1;for(let[o,c]of s.entries())if(i.get(o)!==c)return!1;for(let[o,c]of e.entries()){let l=r.get(o)||[];if(c.length!==l.length)return!1;for(let a=0;a<c.length;a++){let d=c[a],u=l[a];if(d.clock!==u.clock||d.len!==u.len)return!1}}return!0},qi=(n,t=new ve)=>(gt(t,n.ds),es(t,n.sv),t.toUint8Array()),Kl=n=>qi(n,new Mt),Wi=(n,t=new Mn(O(n)))=>new cn(kt(t),Ji(t)),ql=n=>Wi(n,new Zt(O(n))),ss=(n,t)=>new cn(n,t),Wl=ss(Jn(),new Map),Xl=n=>ss(qr(n.store),pn(n.store)),vt=(n,t)=>t===void 0?!n.deleted:t.sv.has(n.id.client)&&(t.sv.get(n.id.client)||0)>n.id.clock&&!ae(t.ds,n.id),Fr=(n,t)=>{let e=N(n.meta,Fr,dt),r=n.doc.store;e.has(t)||(t.sv.forEach((s,i)=>{s<A(r,i)&&z(n,x(i,s))}),Xt(n,t.ds,s=>{}),e.add(t))},Ql=(n,t,e=new mt)=>{if(n.gc)throw new Error("Garbage-collection must be disabled in `originDoc`!");let{sv:r,ds:s}=t,i=new Q;return n.transact(o=>{let c=0;r.forEach(l=>{l>0&&c++}),S(i.restEncoder,c);for(let[l,a]of r){if(a===0)continue;a<A(n.store,l)&&z(o,x(l,a));let d=n.store.clients.get(l)||[],u=et(d,a-1);S(i.restEncoder,u+1),i.writeClient(l),S(i.restEncoder,0);for(let h=0;h<=u;h++)d[h].write(i,0)}gt(i,s)}),St(e,i.toUint8Array(),"snapshot"),e},Zl=(n,t,e=J)=>{let r=new e(O(t)),s=new yt(r,!1);for(let o=s.curr;o!==null;o=s.next())if((n.sv.get(o.id.client)||0)<o.id.clock+o.length)return!1;let i=Qt([n.ds,kt(r)]);return Hi(n.ds,i)},ta=(n,t)=>Zl(n,t,X),Vn=class{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}},pn=n=>{let t=new Map;return n.clients.forEach((e,r)=>{let s=e[e.length-1];t.set(r,s.id.clock+s.length)}),t},A=(n,t)=>{let e=n.clients.get(t);if(e===void 0)return 0;let r=e[e.length-1];return r.id.clock+r.length},Xi=(n,t)=>{let e=n.clients.get(t.id.client);if(e===void 0)e=[],n.clients.set(t.id.client,e);else{let r=e[e.length-1];if(r.id.clock+r.length!==t.id.clock)throw $()}e.push(t)},et=(n,t)=>{let e=0,r=n.length-1,s=n[r],i=s.id.clock;if(i===t)return r;let o=W(t/(i+s.length-1)*r);for(;e<=r;){if(s=n[o],i=s.id.clock,i<=t){if(t<i+s.length)return o;e=o+1}else r=o-1;o=W((e+r)/2)}throw $()},ea=(n,t)=>{let e=n.clients.get(t.client);return e[et(e,t.clock)]},Wt=ea,Yr=(n,t,e)=>{let r=et(t,e),s=t[r];return s.id.clock<e&&s instanceof C?(t.splice(r+1,0,$n(n,s,e-s.id.clock)),r+1):r},z=(n,t)=>{let e=n.doc.store.clients.get(t.client);return e[Yr(n,e,t.clock)]},zr=(n,t,e)=>{let r=t.clients.get(e.client),s=et(r,e.clock),i=r[s];return e.clock!==i.id.clock+i.length-1&&i.constructor!==G&&r.splice(s+1,0,$n(n,i,e.clock-i.id.clock+1)),i},na=(n,t,e)=>{let r=n.clients.get(t.id.client);r[et(r,t.id.clock)]=e},Qi=(n,t,e,r,s)=>{if(r===0)return;let i=e+r,o=Yr(n,t,e),c;do c=t[o++],i<c.id.clock+c.length&&Yr(n,t,i),s(c);while(o<t.length&&t[o].id.clock<i)},Bn=class{constructor(t,e,r){this.doc=t,this.deleteSet=new Nt,this.beforeState=pn(t.store),this.afterState=new Map,this.changed=new Map,this.changedParentTypes=new Map,this._mergeStructs=[],this.origin=e,this.meta=new Map,this.local=r,this.subdocsAdded=new Set,this.subdocsRemoved=new Set,this.subdocsLoaded=new Set,this._needFormattingCleanup=!1}},Ri=(n,t)=>t.deleteSet.clients.size===0&&!Ys(t.afterState,(e,r)=>t.beforeState.get(r)!==e)?!1:(Kr(t.deleteSet),Tl(n,t),gt(n,t.deleteSet),!0),Vi=(n,t,e)=>{let r=t._item;(r===null||r.id.clock<(n.beforeState.get(r.id.client)||0)&&!r.deleted)&&N(n.changed,t,dt).add(e)},Ln=(n,t)=>{let e=n[t],r=n[t-1],s=t;for(;s>0;e=r,r=n[--s-1]){if(r.deleted===e.deleted&&r.constructor===e.constructor&&r.mergeWith(e)){e instanceof C&&e.parentSub!==null&&e.parent._map.get(e.parentSub)===e&&e.parent._map.set(e.parentSub,r);continue}break}let i=t-s;return i&&n.splice(t+1-i,i),i},Zi=(n,t,e)=>{for(let[r,s]of n.clients.entries()){let i=t.clients.get(r);for(let o=s.length-1;o>=0;o--){let c=s[o],l=c.clock+c.len;for(let a=et(i,c.clock),d=i[a];a<i.length&&d.id.clock<l;d=i[++a]){let u=i[a];if(c.clock+c.len<=u.id.clock)break;u instanceof C&&u.deleted&&!u.keep&&e(u)&&u.gc(t,!1)}}}},to=(n,t)=>{n.clients.forEach((e,r)=>{let s=t.clients.get(r);for(let i=e.length-1;i>=0;i--){let o=e[i],c=kn(s.length-1,1+et(s,o.clock+o.len-1));for(let l=c,a=s[l];l>0&&a.id.clock>=o.clock;a=s[l])l-=1+Ln(s,l)}})},ra=(n,t,e)=>{Zi(n,t,e),to(n,t)},eo=(n,t)=>{if(t<n.length){let e=n[t],r=e.doc,s=r.store,i=e.deleteSet,o=e._mergeStructs;try{Kr(i),e.afterState=pn(e.doc.store),r.emit("beforeObserverCalls",[e,r]);let c=[];e.changed.forEach((l,a)=>c.push(()=>{(a._item===null||!a._item.deleted)&&a._callObserver(e,l)})),c.push(()=>{e.changedParentTypes.forEach((l,a)=>{a._dEH.l.length>0&&(a._item===null||!a._item.deleted)&&(l=l.filter(d=>d.target._item===null||!d.target._item.deleted),l.forEach(d=>{d.currentTarget=a,d._path=null}),l.sort((d,u)=>d.path.length-u.path.length),c.push(()=>{Ki(a._dEH,l,e)}))}),c.push(()=>r.emit("afterTransaction",[e,r])),c.push(()=>{e._needFormattingCleanup&&Ca(e)})}),Xe(c,[])}finally{r.gc&&Zi(i,s,r.gcFilter),to(i,s),e.afterState.forEach((d,u)=>{let h=e.beforeState.get(u)||0;if(h!==d){let f=s.clients.get(u),p=bt(et(f,h),1);for(let g=f.length-1;g>=p;)g-=1+Ln(f,g)}});for(let d=o.length-1;d>=0;d--){let{client:u,clock:h}=o[d].id,f=s.clients.get(u),p=et(f,h);p+1<f.length&&Ln(f,p+1)>1||p>0&&Ln(f,p)}if(!e.local&&e.afterState.get(r.clientID)!==e.beforeState.get(r.clientID)&&(Un(Te,Ze,"[yjs] ",tn,en,"Changed the client-id because another client seems to be using it."),r.clientID=$i()),r.emit("afterTransactionCleanup",[e,r]),r._observers.has("update")){let d=new wt;Ri(d,e)&&r.emit("update",[d.toUint8Array(),e.origin,r,e])}if(r._observers.has("updateV2")){let d=new Q;Ri(d,e)&&r.emit("updateV2",[d.toUint8Array(),e.origin,r,e])}let{subdocsAdded:c,subdocsLoaded:l,subdocsRemoved:a}=e;(c.size>0||a.size>0||l.size>0)&&(c.forEach(d=>{d.clientID=r.clientID,d.collectionid==null&&(d.collectionid=r.collectionid),r.subdocs.add(d)}),a.forEach(d=>r.subdocs.delete(d)),r.emit("subdocs",[{loaded:l,added:c,removed:a},r,e]),a.forEach(d=>d.destroy())),n.length<=t+1?(r._transactionCleanups=[],r.emit("afterAllTransactions",[r,n])):eo(n,t+1)}}},_=(n,t,e=null,r=!0)=>{let s=n._transactionCleanups,i=!1,o=null;n._transaction===null&&(i=!0,n._transaction=new Bn(n,e,r),s.push(n._transaction),s.length===1&&n.emit("beforeAllTransactions",[n]),n.emit("beforeTransaction",[n._transaction,n]));try{o=t(n._transaction)}finally{if(i){let c=n._transaction===s[0];n._transaction=null,c&&eo(s,0)}}return o},Gr=class{constructor(t,e){this.insertions=e,this.deletions=t,this.meta=new Map}},Bi=(n,t,e)=>{Xt(n,e.deletions,r=>{r instanceof C&&t.scope.some(s=>s===n.doc||on(s,r))&&ds(r,!1)})},Pi=(n,t,e)=>{let r=null,s=n.doc,i=n.scope;_(s,c=>{for(;t.length>0&&n.currStackItem===null;){let l=s.store,a=t.pop(),d=new Set,u=[],h=!1;Xt(c,a.insertions,f=>{if(f instanceof C){if(f.redone!==null){let{item:p,diff:g}=$r(l,f.id);g>0&&(p=z(c,x(p.id.client,p.id.clock+g))),f=p}!f.deleted&&i.some(p=>p===c.doc||on(p,f))&&u.push(f)}}),Xt(c,a.deletions,f=>{f instanceof C&&i.some(p=>p===c.doc||on(p,f))&&!ae(a.insertions,f.id)&&d.add(f)}),d.forEach(f=>{h=Io(c,f,d,a.insertions,n.ignoreRemoteMapChanges,n)!==null||h});for(let f=u.length-1;f>=0;f--){let p=u[f];n.deleteFilter(p)&&(p.delete(c),h=!0)}n.currStackItem=h?a:null}c.changed.forEach((l,a)=>{l.has(null)&&a._searchMarker&&(a._searchMarker.length=0)}),r=c},n);let o=n.currStackItem;if(o!=null){let c=r.changedParentTypes;n.emit("stack-item-popped",[{stackItem:o,type:e,changedParentTypes:c,origin:n},n]),n.currStackItem=null}return o},te=class extends Dt{constructor(t,{captureTimeout:e=500,captureTransaction:r=l=>!0,deleteFilter:s=()=>!0,trackedOrigins:i=new Set([null]),ignoreRemoteMapChanges:o=!1,doc:c=zt(t)?t[0].doc:t instanceof mt?t:t.doc}={}){super(),this.scope=[],this.doc=c,this.addToScope(t),this.deleteFilter=s,i.add(this),this.trackedOrigins=i,this.captureTransaction=r,this.undoStack=[],this.redoStack=[],this.undoing=!1,this.redoing=!1,this.currStackItem=null,this.lastChange=0,this.ignoreRemoteMapChanges=o,this.captureTimeout=e,this.afterTransactionHandler=l=>{if(!this.captureTransaction(l)||!this.scope.some(m=>l.changedParentTypes.has(m)||m===this.doc)||!this.trackedOrigins.has(l.origin)&&(!l.origin||!this.trackedOrigins.has(l.origin.constructor)))return;let a=this.undoing,d=this.redoing,u=a?this.redoStack:this.undoStack;a?this.stopCapturing():d||this.clear(!1,!0);let h=new Nt;l.afterState.forEach((m,w)=>{let y=l.beforeState.get(w)||0,E=m-y;E>0&&sn(h,w,y,E)});let f=Tt(),p=!1;if(this.lastChange>0&&f-this.lastChange<this.captureTimeout&&u.length>0&&!a&&!d){let m=u[u.length-1];m.deletions=Qt([m.deletions,l.deleteSet]),m.insertions=Qt([m.insertions,h])}else u.push(new Gr(l.deleteSet,h)),p=!0;!a&&!d&&(this.lastChange=f),Xt(l,l.deleteSet,m=>{m instanceof C&&this.scope.some(w=>w===l.doc||on(w,m))&&ds(m,!0)});let g=[{stackItem:u[u.length-1],origin:l.origin,type:a?"redo":"undo",changedParentTypes:l.changedParentTypes},this];p?this.emit("stack-item-added",g):this.emit("stack-item-updated",g)},this.doc.on("afterTransaction",this.afterTransactionHandler),this.doc.on("destroy",()=>{this.destroy()})}addToScope(t){let e=new Set(this.scope);t=zt(t)?t:[t],t.forEach(r=>{e.has(r)||(e.add(r),(r instanceof T?r.doc!==this.doc:r!==this.doc)&&Rr("[yjs#509] Not same Y.Doc"),this.scope.push(r))})}addTrackedOrigin(t){this.trackedOrigins.add(t)}removeTrackedOrigin(t){this.trackedOrigins.delete(t)}clear(t=!0,e=!0){(t&&this.canUndo()||e&&this.canRedo())&&this.doc.transact(r=>{t&&(this.undoStack.forEach(s=>Bi(r,this,s)),this.undoStack=[]),e&&(this.redoStack.forEach(s=>Bi(r,this,s)),this.redoStack=[]),this.emit("stack-cleared",[{undoStackCleared:t,redoStackCleared:e}])})}stopCapturing(){this.lastChange=0}undo(){this.undoing=!0;let t;try{t=Pi(this,this.undoStack,"undo")}finally{this.undoing=!1}return t}redo(){this.redoing=!0;let t;try{t=Pi(this,this.redoStack,"redo")}finally{this.redoing=!1}return t}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}destroy(){this.trackedOrigins.delete(this),this.doc.off("afterTransaction",this.afterTransactionHandler),super.destroy()}};function*sa(n){let t=b(n.restDecoder);for(let e=0;e<t;e++){let r=b(n.restDecoder),s=n.readClient(),i=b(n.restDecoder);for(let o=0;o<r;o++){let c=n.readInfo();if(c===10){let l=b(n.restDecoder);yield new P(x(s,i),l),i+=l}else if((31&c)!==0){let l=(c&192)===0,a=new C(x(s,i),null,(c&128)===128?n.readLeftID():null,null,(c&64)===64?n.readRightID():null,l?n.readParentInfo()?n.readString():n.readLeftID():null,l&&(c&32)===32?n.readString():null,To(n,c));yield a,i+=a.length}else{let l=n.readLen();yield new G(x(s,i),l),i+=l}}}}var yt=class{constructor(t,e){this.gen=sa(t),this.curr=null,this.done=!1,this.filterSkips=e,this.next()}next(){do this.curr=this.gen.next().value||null;while(this.filterSkips&&this.curr!==null&&this.curr.constructor===P);return this.curr}},ia=n=>no(n,X),no=(n,t=J)=>{let e=[],r=new t(O(n)),s=new yt(r,!1);for(let o=s.curr;o!==null;o=s.next())e.push(o);Un("Structs: ",e);let i=kt(r);Un("DeleteSet: ",i)},oa=n=>ro(n,X),ro=(n,t=J)=>{let e=[],r=new t(O(n)),s=new yt(r,!1);for(let i=s.curr;i!==null;i=s.next())e.push(i);return{structs:e,ds:kt(r)}},ln=class{constructor(t){this.currClient=0,this.startClock=0,this.written=0,this.encoder=t,this.clientStructs=[]}},so=n=>ee(n,X,wt),io=(n,t=ve,e=J)=>{let r=new t,s=new yt(new e(O(n)),!1),i=s.curr;if(i!==null){let o=0,c=i.id.client,l=i.id.clock!==0,a=l?0:i.id.clock+i.length;for(;i!==null;i=s.next())c!==i.id.client&&(a!==0&&(o++,S(r.restEncoder,c),S(r.restEncoder,a)),c=i.id.client,a=0,l=i.id.clock!==0),i.constructor===P&&(l=!0),l||(a=i.id.clock+i.length);a!==0&&(o++,S(r.restEncoder,c),S(r.restEncoder,a));let d=ot();return S(d,o),ti(d,r.restEncoder),r.restEncoder=d,r.toUint8Array()}else return S(r.restEncoder,0),r.toUint8Array()},ca=n=>io(n,Mt,X),oo=(n,t=J)=>{let e=new Map,r=new Map,s=new yt(new t(O(n)),!1),i=s.curr;if(i!==null){let o=i.id.client,c=i.id.clock;for(e.set(o,c);i!==null;i=s.next())o!==i.id.client&&(r.set(o,c),e.set(i.id.client,i.id.clock),o=i.id.client),c=i.id.clock+i.length;r.set(o,c)}return{from:e,to:r}},la=n=>oo(n,X),aa=(n,t)=>{if(n.constructor===G){let{client:e,clock:r}=n.id;return new G(x(e,r+t),n.length-t)}else if(n.constructor===P){let{client:e,clock:r}=n.id;return new P(x(e,r+t),n.length-t)}else{let e=n,{client:r,clock:s}=e.id;return new C(x(r,s+t),null,x(r,s+t-1),null,e.rightOrigin,e.parent,e.parentSub,e.content.splice(t))}},ee=(n,t=J,e=Q)=>{if(n.length===1)return n[0];let r=n.map(d=>new t(O(d))),s=r.map(d=>new yt(d,!0)),i=null,o=new e,c=new ln(o);for(;s=s.filter(h=>h.curr!==null),s.sort((h,f)=>{if(h.curr.id.client===f.curr.id.client){let p=h.curr.id.clock-f.curr.id.clock;return p===0?h.curr.constructor===f.curr.constructor?0:h.curr.constructor===P?1:-1:p}else return f.curr.id.client-h.curr.id.client}),s.length!==0;){let d=s[0],u=d.curr.id.client;if(i!==null){let h=d.curr,f=!1;for(;h!==null&&h.id.clock+h.length<=i.struct.id.clock+i.struct.length&&h.id.client>=i.struct.id.client;)h=d.next(),f=!0;if(h===null||h.id.client!==u||f&&h.id.clock>i.struct.id.clock+i.struct.length)continue;if(u!==i.struct.id.client)Ot(c,i.struct,i.offset),i={struct:h,offset:0},d.next();else if(i.struct.id.clock+i.struct.length<h.id.clock)if(i.struct.constructor===P)i.struct.length=h.id.clock+h.length-i.struct.id.clock;else{Ot(c,i.struct,i.offset);let p=h.id.clock-i.struct.id.clock-i.struct.length;i={struct:new P(x(u,i.struct.id.clock+i.struct.length),p),offset:0}}else{let p=i.struct.id.clock+i.struct.length-h.id.clock;p>0&&(i.struct.constructor===P?i.struct.length-=p:h=aa(h,p)),i.struct.mergeWith(h)||(Ot(c,i.struct,i.offset),i={struct:h,offset:0},d.next())}}else i={struct:d.curr,offset:0},d.next();for(let h=d.curr;h!==null&&h.id.client===u&&h.id.clock===i.struct.id.clock+i.struct.length&&h.constructor!==P;h=d.next())Ot(c,i.struct,i.offset),i={struct:h,offset:0}}i!==null&&(Ot(c,i.struct,i.offset),i=null),os(c);let l=r.map(d=>kt(d)),a=Qt(l);return gt(o,a),o.toUint8Array()},is=(n,t,e=J,r=Q)=>{let s=ts(t),i=new r,o=new ln(i),c=new e(O(n)),l=new yt(c,!1);for(;l.curr;){let d=l.curr,u=d.id.client,h=s.get(u)||0;if(l.curr.constructor===P){l.next();continue}if(d.id.clock+d.length>h)for(Ot(o,d,bt(h-d.id.clock,0)),l.next();l.curr&&l.curr.id.client===u;)Ot(o,l.curr,0),l.next();else for(;l.curr&&l.curr.id.client===u&&l.curr.id.clock+l.curr.length<=h;)l.next()}os(o);let a=kt(c);return gt(i,a),i.toUint8Array()},da=(n,t)=>is(n,t,X,wt),co=n=>{n.written>0&&(n.clientStructs.push({written:n.written,restEncoder:Y(n.encoder.restEncoder)}),n.encoder.restEncoder=ot(),n.written=0)},Ot=(n,t,e)=>{n.written>0&&n.currClient!==t.id.client&&co(n),n.written===0&&(n.currClient=t.id.client,n.encoder.writeClient(t.id.client),S(n.encoder.restEncoder,t.id.clock+e)),t.write(n.encoder,e),n.written++},os=n=>{co(n);let t=n.encoder.restEncoder;S(t,n.clientStructs.length);for(let e=0;e<n.clientStructs.length;e++){let r=n.clientStructs[e];S(t,r.written),Ce(t,r.restEncoder)}},Kn=(n,t,e,r)=>{let s=new e(O(n)),i=new yt(s,!1),o=new r,c=new ln(o);for(let a=i.curr;a!==null;a=i.next())Ot(c,t(a),0);os(c);let l=kt(s);return gt(o,l),o.toUint8Array()},lo=({formatting:n=!0,subdocs:t=!0,yxml:e=!0}={})=>{let r=0,s=U(),i=U(),o=U(),c=U();return c.set(null,null),l=>{switch(l.constructor){case G:case P:return l;case C:{let a=l,d=a.content;switch(d.constructor){case Me:break;case nt:{if(e){let u=d.type;u instanceof oe&&(u.nodeName=N(i,u.nodeName,()=>"node-"+r)),u instanceof hn&&(u.hookName=N(i,u.hookName,()=>"hook-"+r))}break}case Rt:{let u=d;u.arr=u.arr.map(()=>r);break}case ce:{let u=d;u.content=new Uint8Array([r]);break}case le:{let u=d;t&&(u.opts={},u.doc.guid=r+"");break}case _t:{let u=d;u.embed={};break}case v:{let u=d;n&&(u.key=N(o,u.key,()=>r+""),u.value=N(c,u.value,()=>({i:r})));break}case fn:{let u=d;u.arr=u.arr.map(()=>r);break}case lt:{let u=d;u.str=qs(r%10+"",u.str.length);break}default:$()}return a.parentSub&&(a.parentSub=N(s,a.parentSub,()=>r+"")),r++,l}default:$()}}},ua=(n,t)=>Kn(n,lo(t),X,wt),ha=(n,t)=>Kn(n,lo(t),J,Q),fa=n=>Kn(n,Dr,X,Q),ao=n=>Kn(n,Dr,J,wt),ji="You must not compute changes after the event-handler fired.",ne=class{constructor(t,e){this.target=t,this.currentTarget=t,this.transaction=e,this._changes=null,this._keys=null,this._delta=null,this._path=null}get path(){return this._path||(this._path=pa(this.currentTarget,this.target))}deletes(t){return ae(this.transaction.deleteSet,t.id)}get keys(){if(this._keys===null){if(this.transaction.doc._transactionCleanups.length===0)throw ut(ji);let t=new Map,e=this.target;this.transaction.changed.get(e).forEach(s=>{if(s!==null){let i=e._map.get(s),o,c;if(this.adds(i)){let l=i.left;for(;l!==null&&this.adds(l);)l=l.left;if(this.deletes(i))if(l!==null&&this.deletes(l))o="delete",c=En(l.content.getContent());else return;else l!==null&&this.deletes(l)?(o="update",c=En(l.content.getContent())):(o="add",c=void 0)}else if(this.deletes(i))o="delete",c=En(i.content.getContent());else return;t.set(s,{action:o,oldValue:c})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw ut(ji);let e=this.target,r=dt(),s=dt(),i=[];if(t={added:r,deleted:s,delta:i,keys:this.keys},this.transaction.changed.get(e).has(null)){let c=null,l=()=>{c&&i.push(c)};for(let a=e._start;a!==null;a=a.right)a.deleted?this.deletes(a)&&!this.adds(a)&&((c===null||c.delete===void 0)&&(l(),c={delete:0}),c.delete+=a.length,s.add(a)):this.adds(a)?((c===null||c.insert===void 0)&&(l(),c={insert:[]}),c.insert=c.insert.concat(a.content.getContent()),r.add(a)):((c===null||c.retain===void 0)&&(l(),c={retain:0}),c.retain+=a.length);c!==null&&c.retain===void 0&&l()}this._changes=t}return t}},pa=(n,t)=>{let e=[];for(;t._item!==null&&t!==n;){if(t._item.parentSub!==null)e.unshift(t._item.parentSub);else{let r=0,s=t._item.parent._start;for(;s!==t._item&&s!==null;)!s.deleted&&s.countable&&(r+=s.length),s=s.right;e.unshift(r)}t=t._item.parent}return e},j=()=>{Rr("Invalid access: Add Yjs type to a document before reading data.")},uo=80,cs=0,Hr=class{constructor(t,e){t.marker=!0,this.p=t,this.index=e,this.timestamp=cs++}},ga=n=>{n.timestamp=cs++},ho=(n,t,e)=>{n.p.marker=!1,n.p=t,t.marker=!0,n.index=e,n.timestamp=cs++},ma=(n,t,e)=>{if(n.length>=uo){let r=n.reduce((s,i)=>s.timestamp<i.timestamp?s:i);return ho(r,t,e),r}else{let r=new Hr(t,e);return n.push(r),r}},qn=(n,t)=>{if(n._start===null||t===0||n._searchMarker===null)return null;let e=n._searchMarker.length===0?null:n._searchMarker.reduce((i,o)=>ye(t-i.index)<ye(t-o.index)?i:o),r=n._start,s=0;for(e!==null&&(r=e.p,s=e.index,ga(e));r.right!==null&&s<t;){if(!r.deleted&&r.countable){if(t<s+r.length)break;s+=r.length}r=r.right}for(;r.left!==null&&s>t;)r=r.left,!r.deleted&&r.countable&&(s-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(s-=r.length);return e!==null&&ye(e.index-s)<r.parent.length/uo?(ho(e,r,s),e):ma(n._searchMarker,r,s)},an=(n,t,e)=>{for(let r=n.length-1;r>=0;r--){let s=n[r];if(e>0){let i=s.p;for(i.marker=!1;i&&(i.deleted||!i.countable);)i=i.left,i&&!i.deleted&&i.countable&&(s.index-=i.length);if(i===null||i.marker===!0){n.splice(r,1);continue}s.p=i,i.marker=!0}(t<s.index||e>0&&t===s.index)&&(s.index=bt(t,s.index+e))}},wa=n=>{n.doc??j();let t=n._start,e=[];for(;t;)e.push(t),t=t.right;return e},Wn=(n,t,e)=>{let r=n,s=t.changedParentTypes;for(;N(s,n,()=>[]).push(e),n._item!==null;)n=n._item.parent;Ki(r._eH,e,t)},T=class{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=vi(),this._dEH=vi(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,e){this.doc=t,this._item=e}_copy(){throw ct()}clone(){throw ct()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,e){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){Oi(this._eH,t)}observeDeep(t){Oi(this._dEH,t)}unobserve(t){Li(this._eH,t)}unobserveDeep(t){Li(this._dEH,t)}toJSON(){}},fo=(n,t,e)=>{n.doc??j(),t<0&&(t=n._length+t),e<0&&(e=n._length+e);let r=e-t,s=[],i=n._start;for(;i!==null&&r>0;){if(i.countable&&!i.deleted){let o=i.content.getContent();if(o.length<=t)t-=o.length;else{for(let c=t;c<o.length&&r>0;c++)s.push(o[c]),r--;t=0}}i=i.right}return s},po=n=>{n.doc??j();let t=[],e=n._start;for(;e!==null;){if(e.countable&&!e.deleted){let r=e.content.getContent();for(let s=0;s<r.length;s++)t.push(r[s])}e=e.right}return t},ya=(n,t)=>{let e=[],r=n._start;for(;r!==null;){if(r.countable&&vt(r,t)){let s=r.content.getContent();for(let i=0;i<s.length;i++)e.push(s[i])}r=r.right}return e},dn=(n,t)=>{let e=0,r=n._start;for(n.doc??j();r!==null;){if(r.countable&&!r.deleted){let s=r.content.getContent();for(let i=0;i<s.length;i++)t(s[i],e++,n)}r=r.right}},go=(n,t)=>{let e=[];return dn(n,(r,s)=>{e.push(t(r,s,n))}),e},Sa=n=>{let t=n._start,e=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(e===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};e=t.content.getContent(),r=0,t=t.right}let s=e[r++];return e.length<=r&&(e=null),{done:!1,value:s}}}},mo=(n,t)=>{n.doc??j();let e=qn(n,t),r=n._start;for(e!==null&&(r=e.p,t-=e.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t<r.length)return r.content.getContent()[t];t-=r.length}},Pn=(n,t,e,r)=>{let s=e,i=n.doc,o=i.clientID,c=i.store,l=e===null?t._start:e.right,a=[],d=()=>{a.length>0&&(s=new C(x(o,A(c,o)),s,s&&s.lastId,l,l&&l.id,t,null,new Rt(a)),s.integrate(n,0),a=[])};r.forEach(u=>{if(u===null)a.push(u);else switch(u.constructor){case Number:case Object:case Boolean:case Array:case String:a.push(u);break;default:switch(d(),u.constructor){case Uint8Array:case ArrayBuffer:s=new C(x(o,A(c,o)),s,s&&s.lastId,l,l&&l.id,t,null,new ce(new Uint8Array(u))),s.integrate(n,0);break;case mt:s=new C(x(o,A(c,o)),s,s&&s.lastId,l,l&&l.id,t,null,new le(u)),s.integrate(n,0);break;default:if(u instanceof T)s=new C(x(o,A(c,o)),s,s&&s.lastId,l,l&&l.id,t,null,new nt(u)),s.integrate(n,0);else throw new Error("Unexpected content type in insert operation")}}}),d()},wo=()=>ut("Length exceeded!"),yo=(n,t,e,r)=>{if(e>t._length)throw wo();if(e===0)return t._searchMarker&&an(t._searchMarker,e,r.length),Pn(n,t,null,r);let s=e,i=qn(t,e),o=t._start;for(i!==null&&(o=i.p,e-=i.index,e===0&&(o=o.prev,e+=o&&o.countable&&!o.deleted?o.length:0));o!==null;o=o.right)if(!o.deleted&&o.countable){if(e<=o.length){e<o.length&&z(n,x(o.id.client,o.id.clock+e));break}e-=o.length}return t._searchMarker&&an(t._searchMarker,s,r.length),Pn(n,t,o,r)},xa=(n,t,e)=>{let s=(t._searchMarker||[]).reduce((i,o)=>o.index>i.index?o:i,{index:0,p:t._start}).p;if(s)for(;s.right;)s=s.right;return Pn(n,t,s,e)},So=(n,t,e,r)=>{if(r===0)return;let s=e,i=r,o=qn(t,e),c=t._start;for(o!==null&&(c=o.p,e-=o.index);c!==null&&e>0;c=c.right)!c.deleted&&c.countable&&(e<c.length&&z(n,x(c.id.client,c.id.clock+e)),e-=c.length);for(;r>0&&c!==null;)c.deleted||(r<c.length&&z(n,x(c.id.client,c.id.clock+r)),c.delete(n),r-=c.length),c=c.right;if(r>0)throw wo();t._searchMarker&&an(t._searchMarker,s,-i+r)},jn=(n,t,e)=>{let r=t._map.get(e);r!==void 0&&r.delete(n)},ls=(n,t,e,r)=>{let s=t._map.get(e)||null,i=n.doc,o=i.clientID,c;if(r==null)c=new Rt([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:c=new Rt([r]);break;case Uint8Array:c=new ce(r);break;case mt:c=new le(r);break;default:if(r instanceof T)c=new nt(r);else throw new Error("Unexpected content type")}new C(x(o,A(i.store,o)),s,s&&s.lastId,null,null,t,e,c).integrate(n,0)},as=(n,t)=>{n.doc??j();let e=n._map.get(t);return e!==void 0&&!e.deleted?e.content.getContent()[e.length-1]:void 0},xo=n=>{let t={};return n.doc??j(),n._map.forEach((e,r)=>{e.deleted||(t[r]=e.content.getContent()[e.length-1])}),t},bo=(n,t)=>{n.doc??j();let e=n._map.get(t);return e!==void 0&&!e.deleted},ba=(n,t,e)=>{let r=n._map.get(t)||null;for(;r!==null&&(!e.sv.has(r.id.client)||r.id.clock>=(e.sv.get(r.id.client)||0));)r=r.left;return r!==null&&vt(r,e)?r.content.getContent()[r.length-1]:void 0},Eo=(n,t)=>{let e={};return n._map.forEach((r,s)=>{let i=r;for(;i!==null&&(!t.sv.has(i.id.client)||i.id.clock>=(t.sv.get(i.id.client)||0));)i=i.left;i!==null&&vt(i,t)&&(e[s]=i.content.getContent()[i.length-1])}),e},vn=n=>(n.doc??j(),Ai(n._map.entries(),t=>!t[1].deleted)),Fn=class extends ne{},re=class n extends T{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){let e=new n;return e.push(t),e}_integrate(t,e){super._integrate(t,e),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new n}clone(){let t=new n;return t.insert(0,this.toArray().map(e=>e instanceof T?e.clone():e)),t}get length(){return this.doc??j(),this._length}_callObserver(t,e){super._callObserver(t,e),Wn(this,t,new Fn(this,t))}insert(t,e){this.doc!==null?_(this.doc,r=>{yo(r,this,t,e)}):this._prelimContent.splice(t,0,...e)}push(t){this.doc!==null?_(this.doc,e=>{xa(e,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,e=1){this.doc!==null?_(this.doc,r=>{So(r,this,t,e)}):this._prelimContent.splice(t,e)}get(t){return mo(this,t)}toArray(){return po(this)}slice(t=0,e=this.length){return fo(this,t,e)}toJSON(){return this.map(t=>t instanceof T?t.toJSON():t)}map(t){return go(this,t)}forEach(t){dn(this,t)}[Symbol.iterator](){return Sa(this)}_write(t){t.writeTypeRef(Ya)}},Ea=n=>new re,Yn=class extends ne{constructor(t,e,r){super(t,e),this.keysChanged=r}},se=class n extends T{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,e){super._integrate(t,e),this._prelimContent.forEach((r,s)=>{this.set(s,r)}),this._prelimContent=null}_copy(){return new n}clone(){let t=new n;return this.forEach((e,r)=>{t.set(r,e instanceof T?e.clone():e)}),t}_callObserver(t,e){Wn(this,t,new Yn(this,t,e))}toJSON(){this.doc??j();let t={};return this._map.forEach((e,r)=>{if(!e.deleted){let s=e.content.getContent()[e.length-1];t[r]=s instanceof T?s.toJSON():s}}),t}get size(){return[...vn(this)].length}keys(){return In(vn(this),t=>t[0])}values(){return In(vn(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return In(vn(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??j(),this._map.forEach((e,r)=>{e.deleted||t(e.content.getContent()[e.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?_(this.doc,e=>{jn(e,this,t)}):this._prelimContent.delete(t)}set(t,e){return this.doc!==null?_(this.doc,r=>{ls(r,this,t,e)}):this._prelimContent.set(t,e),e}get(t){return as(this,t)}has(t){return bo(this,t)}clear(){this.doc!==null?_(this.doc,t=>{this.forEach(function(e,r,s){jn(t,s,r)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(za)}},ka=n=>new se,Lt=(n,t)=>n===t||typeof n=="object"&&typeof t=="object"&&n&&t&&_r(n,t),un=class{constructor(t,e,r,s){this.left=t,this.right=e,this.index=r,this.currentAttributes=s}forward(){this.right===null&&$(),this.right.content.constructor===v?this.right.deleted||Re(this.currentAttributes,this.right.content):this.right.deleted||(this.index+=this.right.length),this.left=this.right,this.right=this.right.right}},Fi=(n,t,e)=>{for(;t.right!==null&&e>0;)t.right.content.constructor===v?t.right.deleted||Re(t.currentAttributes,t.right.content):t.right.deleted||(e<t.right.length&&z(n,x(t.right.id.client,t.right.id.clock+e)),t.index+=t.right.length,e-=t.right.length),t.left=t.right,t.right=t.right.right;return t},On=(n,t,e,r)=>{let s=new Map,i=r?qn(t,e):null;if(i){let o=new un(i.p.left,i.p,i.index,s);return Fi(n,o,e-i.index)}else{let o=new un(null,t._start,0,s);return Fi(n,o,e)}},ko=(n,t,e,r)=>{for(;e.right!==null&&(e.right.deleted===!0||e.right.content.constructor===v&&Lt(r.get(e.right.content.key),e.right.content.value));)e.right.deleted||r.delete(e.right.content.key),e.forward();let s=n.doc,i=s.clientID;r.forEach((o,c)=>{let l=e.left,a=e.right,d=new C(x(i,A(s.store,i)),l,l&&l.lastId,a,a&&a.id,t,null,new v(c,o));d.integrate(n,0),e.right=d,e.forward()})},Re=(n,t)=>{let{key:e,value:r}=t;r===null?n.delete(e):n.set(e,r)},_o=(n,t)=>{for(;n.right!==null;){if(!(n.right.deleted||n.right.content.constructor===v&&Lt(t[n.right.content.key]??null,n.right.content.value)))break;n.forward()}},Co=(n,t,e,r)=>{let s=n.doc,i=s.clientID,o=new Map;for(let c in r){let l=r[c],a=e.currentAttributes.get(c)??null;if(!Lt(a,l)){o.set(c,a);let{left:d,right:u}=e;e.right=new C(x(i,A(s.store,i)),d,d&&d.lastId,u,u&&u.id,t,null,new v(c,l)),e.right.integrate(n,0),e.forward()}}return o},Vr=(n,t,e,r,s)=>{e.currentAttributes.forEach((h,f)=>{s[f]===void 0&&(s[f]=null)});let i=n.doc,o=i.clientID;_o(e,s);let c=Co(n,t,e,s),l=r.constructor===String?new lt(r):r instanceof T?new nt(r):new _t(r),{left:a,right:d,index:u}=e;t._searchMarker&&an(t._searchMarker,e.index,l.getLength()),d=new C(x(o,A(i.store,o)),a,a&&a.lastId,d,d&&d.id,t,null,l),d.integrate(n,0),e.right=d,e.index=u,e.forward(),ko(n,t,e,c)},Yi=(n,t,e,r,s)=>{let i=n.doc,o=i.clientID;_o(e,s);let c=Co(n,t,e,s);t:for(;e.right!==null&&(r>0||c.size>0&&(e.right.deleted||e.right.content.constructor===v));){if(!e.right.deleted)switch(e.right.content.constructor){case v:{let{key:l,value:a}=e.right.content,d=s[l];if(d!==void 0){if(Lt(d,a))c.delete(l);else{if(r===0)break t;c.set(l,a)}e.right.delete(n)}else e.currentAttributes.set(l,a);break}default:r<e.right.length&&z(n,x(e.right.id.client,e.right.id.clock+r)),r-=e.right.length;break}e.forward()}if(r>0){let l="";for(;r>0;r--)l+=`
`;e.right=new C(x(o,A(i.store,o)),e.left,e.left&&e.left.lastId,e.right,e.right&&e.right.id,t,null,new lt(l)),e.right.integrate(n,0),e.forward()}ko(n,t,e,c)},Do=(n,t,e,r,s)=>{let i=t,o=U();for(;i&&(!i.countable||i.deleted);){if(!i.deleted&&i.content.constructor===v){let a=i.content;o.set(a.key,a)}i=i.right}let c=0,l=!1;for(;t!==i;){if(e===t&&(l=!0),!t.deleted){let a=t.content;if(a.constructor===v){let{key:d,value:u}=a,h=r.get(d)??null;(o.get(d)!==a||h===u)&&(t.delete(n),c++,!l&&(s.get(d)??null)===u&&h!==u&&(h===null?s.delete(d):s.set(d,h))),!l&&!t.deleted&&Re(s,a)}}t=t.right}return c},_a=(n,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;let e=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===v){let r=t.content.key;e.has(r)?t.delete(n):e.add(r)}t=t.left}},Ao=n=>{let t=0;return _(n.doc,e=>{let r=n._start,s=n._start,i=U(),o=bn(i);for(;s;)s.deleted===!1&&(s.content.constructor===v?Re(o,s.content):(t+=Do(e,r,s,i,o),i=bn(o),r=s)),s=s.right}),t},Ca=n=>{let t=new Set,e=n.doc;for(let[r,s]of n.afterState.entries()){let i=n.beforeState.get(r)||0;s!==i&&Qi(n,e.store.clients.get(r),i,s,o=>{!o.deleted&&o.content.constructor===v&&o.constructor!==G&&t.add(o.parent)})}_(e,r=>{Xt(n,n.deleteSet,s=>{if(s instanceof G||!s.parent._hasFormatting||t.has(s.parent))return;let i=s.parent;s.content.constructor===v?t.add(i):_a(r,s)});for(let s of t)Ao(s)})},zi=(n,t,e)=>{let r=e,s=bn(t.currentAttributes),i=t.right;for(;e>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case nt:case _t:case lt:e<t.right.length&&z(n,x(t.right.id.client,t.right.id.clock+e)),e-=t.right.length,t.right.delete(n);break}t.forward()}i&&Do(n,i,t.right,s,t.currentAttributes);let o=(t.left||t.right).parent;return o._searchMarker&&an(o._searchMarker,t.index,-r+e),t},zn=class extends ne{constructor(t,e,r){super(t,e),this.childListChanged=!1,this.keysChanged=new Set,r.forEach(s=>{s===null?this.childListChanged=!0:this.keysChanged.add(s)})}get changes(){if(this._changes===null){let t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){let t=this.target.doc,e=[];_(t,r=>{let s=new Map,i=new Map,o=this.target._start,c=null,l={},a="",d=0,u=0,h=()=>{if(c!==null){let f=null;switch(c){case"delete":u>0&&(f={delete:u}),u=0;break;case"insert":(typeof a=="object"||a.length>0)&&(f={insert:a},s.size>0&&(f.attributes={},s.forEach((p,g)=>{p!==null&&(f.attributes[g]=p)}))),a="";break;case"retain":d>0&&(f={retain:d},hi(l)||(f.attributes=ai({},l))),d=0;break}f&&e.push(f),c=null}};for(;o!==null;){switch(o.content.constructor){case nt:case _t:this.adds(o)?this.deletes(o)||(h(),c="insert",a=o.content.getContent()[0],h()):this.deletes(o)?(c!=="delete"&&(h(),c="delete"),u+=1):o.deleted||(c!=="retain"&&(h(),c="retain"),d+=1);break;case lt:this.adds(o)?this.deletes(o)||(c!=="insert"&&(h(),c="insert"),a+=o.content.str):this.deletes(o)?(c!=="delete"&&(h(),c="delete"),u+=o.length):o.deleted||(c!=="retain"&&(h(),c="retain"),d+=o.length);break;case v:{let{key:f,value:p}=o.content;if(this.adds(o)){if(!this.deletes(o)){let g=s.get(f)??null;Lt(g,p)?p!==null&&o.delete(r):(c==="retain"&&h(),Lt(p,i.get(f)??null)?delete l[f]:l[f]=p)}}else if(this.deletes(o)){i.set(f,p);let g=s.get(f)??null;Lt(g,p)||(c==="retain"&&h(),l[f]=g)}else if(!o.deleted){i.set(f,p);let g=l[f];g!==void 0&&(Lt(g,p)?g!==null&&o.delete(r):(c==="retain"&&h(),p===null?delete l[f]:l[f]=p))}o.deleted||(c==="insert"&&h(),Re(s,o.content));break}}o=o.right}for(h();e.length>0;){let f=e[e.length-1];if(f.retain!==void 0&&f.attributes===void 0)e.pop();else break}}),this._delta=e}return this._delta}},Le=class n extends T{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??j(),this._length}_integrate(t,e){super._integrate(t,e);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new n}clone(){let t=new n;return t.applyDelta(this.toDelta()),t}_callObserver(t,e){super._callObserver(t,e);let r=new zn(this,t,e);Wn(this,t,r),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??j();let t="",e=this._start;for(;e!==null;)!e.deleted&&e.countable&&e.content.constructor===lt&&(t+=e.content.str),e=e.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:e=!0}={}){this.doc!==null?_(this.doc,r=>{let s=new un(null,this._start,0,new Map);for(let i=0;i<t.length;i++){let o=t[i];if(o.insert!==void 0){let c=!e&&typeof o.insert=="string"&&i===t.length-1&&s.right===null&&o.insert.slice(-1)===`
`?o.insert.slice(0,-1):o.insert;(typeof c!="string"||c.length>0)&&Vr(r,this,s,c,o.attributes||{})}else o.retain!==void 0?Yi(r,this,s,o.retain,o.attributes||{}):o.delete!==void 0&&zi(r,s,o.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,e,r){this.doc??j();let s=[],i=new Map,o=this.doc,c="",l=this._start;function a(){if(c.length>0){let u={},h=!1;i.forEach((p,g)=>{h=!0,u[g]=p});let f={insert:c};h&&(f.attributes=u),s.push(f),c=""}}let d=()=>{for(;l!==null;){if(vt(l,t)||e!==void 0&&vt(l,e))switch(l.content.constructor){case lt:{let u=i.get("ychange");t!==void 0&&!vt(l,t)?(u===void 0||u.user!==l.id.client||u.type!=="removed")&&(a(),i.set("ychange",r?r("removed",l.id):{type:"removed"})):e!==void 0&&!vt(l,e)?(u===void 0||u.user!==l.id.client||u.type!=="added")&&(a(),i.set("ychange",r?r("added",l.id):{type:"added"})):u!==void 0&&(a(),i.delete("ychange")),c+=l.content.str;break}case nt:case _t:{a();let u={insert:l.content.getContent()[0]};if(i.size>0){let h={};u.attributes=h,i.forEach((f,p)=>{h[p]=f})}s.push(u);break}case v:vt(l,t)&&(a(),Re(i,l.content));break}l=l.right}a()};return t||e?_(o,u=>{t&&Fr(u,t),e&&Fr(u,e),d()},"cleanup"):d(),s}insert(t,e,r){if(e.length<=0)return;let s=this.doc;s!==null?_(s,i=>{let o=On(i,this,t,!r);r||(r={},o.currentAttributes.forEach((c,l)=>{r[l]=c})),Vr(i,this,o,e,r)}):this._pending.push(()=>this.insert(t,e,r))}insertEmbed(t,e,r){let s=this.doc;s!==null?_(s,i=>{let o=On(i,this,t,!r);Vr(i,this,o,e,r||{})}):this._pending.push(()=>this.insertEmbed(t,e,r||{}))}delete(t,e){if(e===0)return;let r=this.doc;r!==null?_(r,s=>{zi(s,On(s,this,t,!0),e)}):this._pending.push(()=>this.delete(t,e))}format(t,e,r){if(e===0)return;let s=this.doc;s!==null?_(s,i=>{let o=On(i,this,t,!1);o.right!==null&&Yi(i,this,o,e,r)}):this._pending.push(()=>this.format(t,e,r))}removeAttribute(t){this.doc!==null?_(this.doc,e=>{jn(e,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,e){this.doc!==null?_(this.doc,r=>{ls(r,this,t,e)}):this._pending.push(()=>this.setAttribute(t,e))}getAttribute(t){return as(this,t)}getAttributes(){return xo(this)}_write(t){t.writeTypeRef(Ga)}},Da=n=>new Le,nn=class{constructor(t,e=()=>!0){this._filter=e,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??j()}[Symbol.iterator](){return this}next(){let t=this._currentNode,e=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(e)))do if(e=t.content.type,!t.deleted&&(e.constructor===oe||e.constructor===ie)&&e._start!==null)t=e._start;else for(;t!==null;){let r=t.next;if(r!==null){t=r;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}},ie=class n extends T{constructor(){super(),this._prelimContent=[]}get firstChild(){let t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,e){super._integrate(t,e),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new n}clone(){let t=new n;return t.insert(0,this.toArray().map(e=>e instanceof T?e.clone():e)),t}get length(){return this.doc??j(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new nn(this,t)}querySelector(t){t=t.toUpperCase();let r=new nn(this,s=>s.nodeName&&s.nodeName.toUpperCase()===t).next();return r.done?null:r.value}querySelectorAll(t){return t=t.toUpperCase(),it(new nn(this,e=>e.nodeName&&e.nodeName.toUpperCase()===t))}_callObserver(t,e){Wn(this,t,new Gn(this,e,t))}toString(){return go(this,t=>t.toString()).join("")}toJSON(){return this.toString()}toDOM(t=document,e={},r){let s=t.createDocumentFragment();return r!==void 0&&r._createAssociation(s,this),dn(this,i=>{s.insertBefore(i.toDOM(t,e,r),null)}),s}insert(t,e){this.doc!==null?_(this.doc,r=>{yo(r,this,t,e)}):this._prelimContent.splice(t,0,...e)}insertAfter(t,e){if(this.doc!==null)_(this.doc,r=>{let s=t&&t instanceof T?t._item:t;Pn(r,this,s,e)});else{let r=this._prelimContent,s=t===null?0:r.findIndex(i=>i===t)+1;if(s===0&&t!==null)throw ut("Reference item not found");r.splice(s,0,...e)}}delete(t,e=1){this.doc!==null?_(this.doc,r=>{So(r,this,t,e)}):this._prelimContent.splice(t,e)}toArray(){return po(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return mo(this,t)}slice(t=0,e=this.length){return fo(this,t,e)}forEach(t){dn(this,t)}_write(t){t.writeTypeRef($a)}},Aa=n=>new ie,oe=class n extends ie{constructor(t="UNDEFINED"){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){let t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){let t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,e){super._integrate(t,e),this._prelimAttrs.forEach((r,s)=>{this.setAttribute(s,r)}),this._prelimAttrs=null}_copy(){return new n(this.nodeName)}clone(){let t=new n(this.nodeName),e=this.getAttributes();return ui(e,(r,s)=>{t.setAttribute(s,r)}),t.insert(0,this.toArray().map(r=>r instanceof T?r.clone():r)),t}toString(){let t=this.getAttributes(),e=[],r=[];for(let c in t)r.push(c);r.sort();let s=r.length;for(let c=0;c<s;c++){let l=r[c];e.push(l+'="'+t[l]+'"')}let i=this.nodeName.toLocaleLowerCase(),o=e.length>0?" "+e.join(" "):"";return`<${i}${o}>${super.toString()}</${i}>`}removeAttribute(t){this.doc!==null?_(this.doc,e=>{jn(e,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,e){this.doc!==null?_(this.doc,r=>{ls(r,this,t,e)}):this._prelimAttrs.set(t,e)}getAttribute(t){return as(this,t)}hasAttribute(t){return bo(this,t)}getAttributes(t){return t?Eo(this,t):xo(this)}toDOM(t=document,e={},r){let s=t.createElement(this.nodeName),i=this.getAttributes();for(let o in i){let c=i[o];typeof c=="string"&&s.setAttribute(o,c)}return dn(this,o=>{s.appendChild(o.toDOM(t,e,r))}),r!==void 0&&r._createAssociation(s,this),s}_write(t){t.writeTypeRef(Ha),t.writeKey(this.nodeName)}},Ua=n=>new oe(n.readKey()),Gn=class extends ne{constructor(t,e,r){super(t,r),this.childListChanged=!1,this.attributesChanged=new Set,e.forEach(s=>{s===null?this.childListChanged=!0:this.attributesChanged.add(s)})}},hn=class n extends se{constructor(t){super(),this.hookName=t}_copy(){return new n(this.hookName)}clone(){let t=new n(this.hookName);return this.forEach((e,r)=>{t.set(r,e)}),t}toDOM(t=document,e={},r){let s=e[this.hookName],i;return s!==void 0?i=s.createDom(this):i=document.createElement(this.hookName),i.setAttribute("data-yjs-hook",this.hookName),r!==void 0&&r._createAssociation(i,this),i}_write(t){t.writeTypeRef(Ja),t.writeKey(this.hookName)}},Ia=n=>new hn(n.readKey()),Hn=class n extends Le{get nextSibling(){let t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){let t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new n}clone(){let t=new n;return t.applyDelta(this.toDelta()),t}toDOM(t=document,e,r){let s=t.createTextNode(this.toString());return r!==void 0&&r._createAssociation(s,this),s}toString(){return this.toDelta().map(t=>{let e=[];for(let s in t.attributes){let i=[];for(let o in t.attributes[s])i.push({key:o,value:t.attributes[s][o]});i.sort((o,c)=>o.key<c.key?-1:1),e.push({nodeName:s,attrs:i})}e.sort((s,i)=>s.nodeName<i.nodeName?-1:1);let r="";for(let s=0;s<e.length;s++){let i=e[s];r+=`<${i.nodeName}`;for(let o=0;o<i.attrs.length;o++){let c=i.attrs[o];r+=` ${c.key}="${c.value}"`}r+=">"}r+=t.insert;for(let s=e.length-1;s>=0;s--)r+=`</${e[s].nodeName}>`;return r}).join("")}toJSON(){return this.toString()}_write(t){t.writeTypeRef(Ka)}},Ta=n=>new Hn,Ne=class{constructor(t,e){this.id=t,this.length=e}get deleted(){throw ct()}mergeWith(t){return!1}write(t,e,r){throw ct()}integrate(t,e){throw ct()}},va=0,G=class extends Ne{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,e){e>0&&(this.id.clock+=e,this.length-=e),Xi(t.doc.store,this)}write(t,e){t.writeInfo(va),t.writeLen(this.length-e)}getMissing(t,e){return null}},ce=class n{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new n(this.content)}splice(t){throw ct()}mergeWith(t){return!1}integrate(t,e){}delete(t){}gc(t){}write(t,e){t.writeBuf(this.content)}getRef(){return 3}},Oa=n=>new ce(n.readBuf()),Me=class n{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new n(this.len)}splice(t){let e=new n(this.len-t);return this.len=t,e}mergeWith(t){return this.len+=t.len,!0}integrate(t,e){sn(t.deleteSet,e.id.client,e.id.clock,this.len),e.markDeleted()}delete(t){}gc(t){}write(t,e){t.writeLen(this.len-e)}getRef(){return 1}},La=n=>new Me(n.readLen()),Uo=(n,t)=>new mt({guid:n,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1}),le=class n{constructor(t){t._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=t;let e={};this.opts=e,t.gc||(e.gc=!1),t.autoLoad&&(e.autoLoad=!0),t.meta!==null&&(e.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new n(Uo(this.doc.guid,this.opts))}splice(t){throw ct()}mergeWith(t){return!1}integrate(t,e){this.doc._item=e,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,e){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}},Na=n=>new le(Uo(n.readString(),n.readAny())),_t=class n{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new n(this.embed)}splice(t){throw ct()}mergeWith(t){return!1}integrate(t,e){}delete(t){}gc(t){}write(t,e){t.writeJSON(this.embed)}getRef(){return 5}},Ma=n=>new _t(n.readJSON()),v=class n{constructor(t,e){this.key=t,this.value=e}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new n(this.key,this.value)}splice(t){throw ct()}mergeWith(t){return!1}integrate(t,e){let r=e.parent;r._searchMarker=null,r._hasFormatting=!0}delete(t){}gc(t){}write(t,e){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}},Ra=n=>new v(n.readKey(),n.readJSON()),fn=class n{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new n(this.arr)}splice(t){let e=new n(this.arr.slice(t));return this.arr=this.arr.slice(0,t),e}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,e){}delete(t){}gc(t){}write(t,e){let r=this.arr.length;t.writeLen(r-e);for(let s=e;s<r;s++){let i=this.arr[s];t.writeString(i===void 0?"undefined":JSON.stringify(i))}}getRef(){return 2}},Va=n=>{let t=n.readLen(),e=[];for(let r=0;r<t;r++){let s=n.readString();s==="undefined"?e.push(void 0):e.push(JSON.parse(s))}return new fn(e)},Ba=Qe("node_env")==="development",Rt=class n{constructor(t){this.arr=t,Ba&&Cr(t)}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new n(this.arr)}splice(t){let e=new n(this.arr.slice(t));return this.arr=this.arr.slice(0,t),e}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,e){}delete(t){}gc(t){}write(t,e){let r=this.arr.length;t.writeLen(r-e);for(let s=e;s<r;s++){let i=this.arr[s];t.writeAny(i)}}getRef(){return 8}},Pa=n=>{let t=n.readLen(),e=[];for(let r=0;r<t;r++)e.push(n.readAny());return new Rt(e)},lt=class n{constructor(t){this.str=t}getLength(){return this.str.length}getContent(){return this.str.split("")}isCountable(){return!0}copy(){return new n(this.str)}splice(t){let e=new n(this.str.slice(t));this.str=this.str.slice(0,t);let r=this.str.charCodeAt(t-1);return r>=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+"\uFFFD",e.str="\uFFFD"+e.str.slice(1)),e}mergeWith(t){return this.str+=t.str,!0}integrate(t,e){}delete(t){}gc(t){}write(t,e){t.writeString(e===0?this.str:this.str.slice(e))}getRef(){return 4}},ja=n=>new lt(n.readString()),Fa=[Ea,ka,Da,Ua,Aa,Ia,Ta],Ya=0,za=1,Ga=2,Ha=3,$a=4,Ja=5,Ka=6,nt=class n{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new n(this.type._copy())}splice(t){throw ct()}mergeWith(t){return!1}integrate(t,e){this.type._integrate(t.doc,e)}delete(t){let e=this.type._start;for(;e!==null;)e.deleted?e.id.clock<(t.beforeState.get(e.id.client)||0)&&t._mergeStructs.push(e):e.delete(t),e=e.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(t.beforeState.get(r.id.client)||0)&&t._mergeStructs.push(r):r.delete(t)}),t.changed.delete(this.type)}gc(t){let e=this.type._start;for(;e!==null;)e.gc(t,!0),e=e.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(t,!0),r=r.left}),this.type._map=new Map}write(t,e){this.type._write(t)}getRef(){return 7}},qa=n=>new nt(Fa[n.readTypeRef()](n)),$r=(n,t)=>{let e=t,r=0,s;do r>0&&(e=x(e.client,e.clock+r)),s=Wt(n,e),r=e.clock-s.id.clock,e=s.redone;while(e!==null&&s instanceof C);return{item:s,diff:r}},ds=(n,t)=>{for(;n!==null&&n.keep!==t;)n.keep=t,n=n.parent._item},$n=(n,t,e)=>{let{client:r,clock:s}=t.id,i=new C(x(r,s+e),t,x(r,s+e-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(e));return t.deleted&&i.markDeleted(),t.keep&&(i.keep=!0),t.redone!==null&&(i.redone=x(t.redone.client,t.redone.clock+e)),t.right=i,i.right!==null&&(i.right.left=i),n._mergeStructs.push(i),i.parentSub!==null&&i.right===null&&i.parent._map.set(i.parentSub,i),t.length=e,i},Gi=(n,t)=>Gs(n,e=>ae(e.deletions,t)),Io=(n,t,e,r,s,i)=>{let o=n.doc,c=o.store,l=o.clientID,a=t.redone;if(a!==null)return z(n,a);let d=t.parent._item,u=null,h;if(d!==null&&d.deleted===!0){if(d.redone===null&&(!e.has(d)||Io(n,d,e,r,s,i)===null))return null;for(;d.redone!==null;)d=z(n,d.redone)}let f=d===null?t.parent:d.content.type;if(t.parentSub===null){for(u=t.left,h=t;u!==null;){let w=u;for(;w!==null&&w.parent._item!==d;)w=w.redone===null?null:z(n,w.redone);if(w!==null&&w.parent._item===d){u=w;break}u=u.left}for(;h!==null;){let w=h;for(;w!==null&&w.parent._item!==d;)w=w.redone===null?null:z(n,w.redone);if(w!==null&&w.parent._item===d){h=w;break}h=h.right}}else if(h=null,t.right&&!s){for(u=t;u!==null&&u.right!==null&&(u.right.redone||ae(r,u.right.id)||Gi(i.undoStack,u.right.id)||Gi(i.redoStack,u.right.id));)for(u=u.right;u.redone;)u=z(n,u.redone);if(u&&u.right!==null)return null}else u=f._map.get(t.parentSub)||null;let p=A(c,l),g=x(l,p),m=new C(g,u,u&&u.lastId,h,h&&h.id,f,t.parentSub,t.content.copy());return t.redone=g,ds(m,!0),m.integrate(n,0),m},C=class n extends Ne{constructor(t,e,r,s,i,o,c,l){super(t,l.getLength()),this.origin=r,this.left=e,this.right=s,this.rightOrigin=i,this.parent=o,this.parentSub=c,this.redone=null,this.content=l,this.info=this.content.isCountable()?2:0}set marker(t){(this.info&8)>0!==t&&(this.info^=8)}get marker(){return(this.info&8)>0}get keep(){return(this.info&1)>0}set keep(t){this.keep!==t&&(this.info^=1)}get countable(){return(this.info&2)>0}get deleted(){return(this.info&4)>0}set deleted(t){this.deleted!==t&&(this.info^=4)}markDeleted(){this.info|=4}getMissing(t,e){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=A(e,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=A(e,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===Et&&this.id.client!==this.parent.client&&this.parent.clock>=A(e,this.parent.client))return this.parent.client;if(this.origin&&(this.left=zr(t,e,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=z(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===G||this.right&&this.right.constructor===G)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===n?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===n&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===Et){let r=Wt(e,this.parent);r.constructor===G?this.parent=null:this.parent=r.content.type}return null}integrate(t,e){if(e>0&&(this.id.clock+=e,this.left=zr(t,t.doc.store,x(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(e),this.length-=e),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,s;if(r!==null)s=r.right;else if(this.parentSub!==null)for(s=this.parent._map.get(this.parentSub)||null;s!==null&&s.left!==null;)s=s.left;else s=this.parent._start;let i=new Set,o=new Set;for(;s!==null&&s!==this.right;){if(o.add(s),i.add(s),qt(this.origin,s.origin)){if(s.id.client<this.id.client)r=s,i.clear();else if(qt(this.rightOrigin,s.rightOrigin))break}else if(s.origin!==null&&o.has(Wt(t.doc.store,s.origin)))i.has(Wt(t.doc.store,s.origin))||(r=s,i.clear());else break;s=s.right}this.left=r}if(this.left!==null){let r=this.left.right;this.right=r,this.left.right=this}else{let r;if(this.parentSub!==null)for(r=this.parent._map.get(this.parentSub)||null;r!==null&&r.left!==null;)r=r.left;else r=this.parent._start,this.parent._start=this;this.right=r}this.right!==null?this.right.left=this:this.parentSub!==null&&(this.parent._map.set(this.parentSub,this),this.left!==null&&this.left.delete(t)),this.parentSub===null&&this.countable&&!this.deleted&&(this.parent._length+=this.length),Xi(t.doc.store,this),this.content.integrate(t,this),Vi(t,this.parent,this.parentSub),(this.parent._item!==null&&this.parent._item.deleted||this.parentSub!==null&&this.right!==null)&&this.delete(t)}else new G(this.id,this.length).integrate(t,0)}get next(){let t=this.right;for(;t!==null&&t.deleted;)t=t.right;return t}get prev(){let t=this.left;for(;t!==null&&t.deleted;)t=t.left;return t}get lastId(){return this.length===1?this.id:x(this.id.client,this.id.clock+this.length-1)}mergeWith(t){if(this.constructor===t.constructor&&qt(t.origin,this.lastId)&&this.right===t&&qt(this.rightOrigin,t.rightOrigin)&&this.id.client===t.id.client&&this.id.clock+this.length===t.id.clock&&this.deleted===t.deleted&&this.redone===null&&t.redone===null&&this.content.constructor===t.content.constructor&&this.content.mergeWith(t.content)){let e=this.parent._searchMarker;return e&&e.forEach(r=>{r.p===t&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){let e=this.parent;this.countable&&this.parentSub===null&&(e._length-=this.length),this.markDeleted(),sn(t.deleteSet,this.id.client,this.id.clock,this.length),Vi(t,e,this.parentSub),this.content.delete(t)}}gc(t,e){if(!this.deleted)throw $();this.content.gc(t),e?na(t,this,new G(this.id,this.length)):this.content=new Me(this.length)}write(t,e){let r=e>0?x(this.id.client,this.id.clock+e-1):this.origin,s=this.rightOrigin,i=this.parentSub,o=this.content.getRef()&31|(r===null?0:128)|(s===null?0:64)|(i===null?0:32);if(t.writeInfo(o),r!==null&&t.writeLeftID(r),s!==null&&t.writeRightID(s),r===null&&s===null){let c=this.parent;if(c._item!==void 0){let l=c._item;if(l===null){let a=rs(c);t.writeParentInfo(!0),t.writeString(a)}else t.writeParentInfo(!1),t.writeLeftID(l.id)}else c.constructor===String?(t.writeParentInfo(!0),t.writeString(c)):c.constructor===Et?(t.writeParentInfo(!1),t.writeLeftID(c)):$();i!==null&&t.writeString(i)}this.content.write(t,e)}},To=(n,t)=>Wa[t&31](n),Wa=[()=>{$()},La,Va,Oa,ja,Ma,Ra,qa,Pa,Na,()=>{$()}],Xa=10,P=class extends Ne{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,e){$()}write(t,e){t.writeInfo(Xa),S(t.restEncoder,this.length-e)}getMissing(t,e){return null}},vo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{},Oo="__ $YJS$ __";vo[Oo]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");vo[Oo]=!0;var us=3e4,Ve=class extends we{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{let e=Tt();this.getLocalState()!==null&&us/2<=e-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());let r=[];this.meta.forEach((s,i)=>{i!==this.clientID&&us<=e-s.lastUpdated&&this.states.has(i)&&r.push(i)}),r.length>0&&hs(this,r,"timeout")},W(us/10)),t.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){let e=this.clientID,r=this.meta.get(e),s=r===void 0?0:r.clock+1,i=this.states.get(e);t===null?this.states.delete(e):this.states.set(e,t),this.meta.set(e,{clock:s,lastUpdated:Tt()});let o=[],c=[],l=[],a=[];t===null?a.push(e):i==null?t!=null&&o.push(e):(c.push(e),We(i,t)||l.push(e)),(o.length>0||l.length>0||a.length>0)&&this.emit("change",[{added:o,updated:l,removed:a},"local"]),this.emit("update",[{added:o,updated:c,removed:a},"local"])}setLocalStateField(t,e){let r=this.getLocalState();r!==null&&this.setLocalState({...r,[t]:e})}getStates(){return this.states}},hs=(n,t,e)=>{let r=[];for(let s=0;s<t.length;s++){let i=t[s];if(n.states.has(i)){if(n.states.delete(i),i===n.clientID){let o=n.meta.get(i);n.meta.set(i,{clock:o.clock+1,lastUpdated:Tt()})}r.push(i)}}r.length>0&&(n.emit("change",[{added:[],updated:[],removed:r},e]),n.emit("update",[{added:[],updated:[],removed:r},e]))};var Lo=1,Xn="fromPersistence",Qn="document",Be="state",de="savedAt",No="savedBy",Mo="version",Zn="gutenberg",fs="syncManager",Ro="gutenberg-undo-ignored";var Pe=(n=>(n.AUTHENTICATION_FAILED="authentication-failed",n.CONNECTION_EXPIRED="connection-expired",n.CONNECTION_LIMIT_EXCEEDED="connection-limit-exceeded",n.DOCUMENT_SIZE_LIMIT_EXCEEDED="document-size-limit-exceeded",n.UNKNOWN_ERROR="unknown-error",n))(Pe||{}),ps=class extends Error{constructor(n="unknown-error",t){super(t),this.code=n,this.name="ConnectionError"}};var Po=Yt(Bo(),1),{lock:jo,unlock:au}=(0,Po.__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/sync");function Fo(n){return function(...t){let e=performance.now(),r=n.apply(this,t),s=performance.now();return console.log(`[SyncManager][performance]: ${n.name} took ${(s-e).toFixed(2)} ms`),r}}function Yo(n){return((...t)=>n(...t))}function zo(n){return function(...t){setTimeout(()=>{n.apply(this,t)},0)}}var ac=Yt(tr(),1);var sc=Yt(tr(),1);var Ho=0,$o=1,Qa=2,Jo=(n,t)=>{S(n,Ho);let e=ns(t);V(n,e)},Za=(n,t,e)=>{S(n,$o),V(n,Zr(t,e))},td=(n,t,e)=>Za(t,e,B(n)),Ko=(n,t,e,r)=>{try{Qr(t,B(n),e)}catch(s){r?.(s),console.error("Caught error while handling a Yjs update",s)}};var ed=Ko,gs=(n,t,e,r,s)=>{let i=b(n);switch(i){case Ho:td(n,t,e);break;case $o:Ko(n,e,r,s);break;case Qa:ed(n,e,r,s);break;default:throw new Error("Unknown message type")}return i};var ms=Yt(tr(),1),ws=3,qo=30*1e3,ys=1*1024*1024,er=(0,ms.applyFilters)("sync.pollingManager.pollingInterval",4e3),Wo=(0,ms.applyFilters)("sync.pollingManager.pollingIntervalWithCollaborators",1e3),Xo=25*1e3;var K=(n=>(n.COMPACTION="compaction",n.SYNC_STEP_1="sync_step1",n.SYNC_STEP_2="sync_step2",n.UPDATE="update",n))(K||{});var Ss=Yt(Zo(),1);var tc="/wp-sync/v1/updates";function rd(n){let t="",e=n.byteLength;for(let r=0;r<e;r++)t+=String.fromCharCode(n[r]);return globalThis.btoa(t)}function xs(n){let t=globalThis.atob(n),e=t.length,r=new Uint8Array(e);for(let s=0;s<e;s++)r[s]=t.charCodeAt(s);return r}function je(n,t){return{data:rd(n),type:t}}function ec(n=[],t=!0){let e=t,r=[...n];return{add(s){r.push(s)},addBulk(s){s.length!==0&&r.push(...s)},clear(){r.splice(0,r.length)},get(){return e?[]:r.splice(0,r.length)},pause(){e=!0},restore(s){let i=s.filter(o=>o.type!==K.COMPACTION);i.length!==0&&r.unshift(...i)},resume(){e=!1},size(){return r.length}}}async function nc(n){let t=await(0,Ss.default)({body:JSON.stringify(n),headers:{"Content-Type":"application/json"},method:"POST",parse:!1,path:tc});if(!t.ok)throw new Error(`Sync update failed with status ${t.status}`);return await t.json()}function bs(n){n.rooms.length!==0&&(0,Ss.default)({body:JSON.stringify(n),headers:{"Content-Type":"application/json"},keepalive:!0,method:"POST",parse:!1,path:tc}).catch(()=>{})}function rc(n,t){let e=parseInt(String(n),10);return isNaN(e)?t:e}var mn="polling-manager",R=new Map;function sd(n){let t=n.filter(e=>[K.COMPACTION,K.UPDATE].includes(e.type)).map(e=>xs(e.data));return je(ee(t),K.COMPACTION)}function id(n){let t=ot();return Jo(t,n),je(Y(t),K.SYNC_STEP_1)}function od(n,t){let e=O(t),r=ot();return gs(e,r,n,mn),je(Y(r),K.SYNC_STEP_2)}function cd(n,t){let e=t.getStates(),r=new Set,s=new Set,i=new Set(Array.from(e.keys()).filter(o=>!n[o]));Object.entries(n).forEach(([o,c])=>{let l=Number(o);if(l===t.clientID)return;if(c===null){e.delete(l),i.add(l);return}if(!e.has(l)){e.set(l,c),r.add(l);return}let a=e.get(l);JSON.stringify(a)!==JSON.stringify(c)&&(e.set(l,c),s.add(l))}),r.size+s.size>0&&t.emit("change",[{added:Array.from(r),updated:Array.from(s),removed:[]}]),i.size>0&&hs(t,Array.from(i),mn)}function ld(n,t,e){let r=xs(n.data);switch(n.type){case K.SYNC_STEP_1:return od(t,r);case K.SYNC_STEP_2:{let s=O(r),i=ot();gs(s,i,t,mn),e();return}case K.COMPACTION:case K.UPDATE:St(t,r,mn)}}function ad(n,t){if(!t.isPrimaryRoom||ks)return!1;ks=!0;let e=(0,sc.applyFilters)("sync.pollingProvider.maxClientsPerRoom",ws,t.room),r=Object.keys(n).length,s=rc(e,ws);return r>s?(t.log("Connection limit exceeded",{clientCount:r,maxClientsPerRoom:s,room:t.room}),!0):!1}var nr=!1,ks=!1,Es=!1,gn=document.visibilityState==="visible",_s=!1,Cs=!1,Ct=er,Pt=null;function ic(){Cs=!0}function oc(){let n=Array.from(R.entries()).map(([t,e])=>({after:0,awareness:null,client_id:e.clientId,room:t,updates:[]}));bs({rooms:n})}function cc(){let n=gn;gn=document.visibilityState==="visible",gn&&!n&&Pt&&(clearTimeout(Pt),Pt=null,rr())}function rr(){_s=!0,Pt=null;async function n(){if(R.size===0){_s=!1;return}Cs=!1,R.forEach(e=>{e.onStatusChange({status:"connecting"})});let t={rooms:Array.from(R.entries()).map(([e,r])=>({after:r.endCursor??0,awareness:r.localAwarenessState,client_id:r.clientId,room:e,updates:r.updateQueue.get()}))};try{let{rooms:e}=await nc(t);R.forEach(r=>{r.onStatusChange({status:"connected"})}),Es=!1,e.forEach(r=>{if(!R.has(r.room))return;let s=R.get(r.room);if(s.endCursor=r.end_cursor,ad(r.awareness,s)){s.onStatusChange({status:"disconnected",error:new ps(Pe.CONNECTION_LIMIT_EXCEEDED,"Connection limit exceeded")}),Ds(r.room);return}s.processAwarenessUpdate(r.awareness),s.isPrimaryRoom&&Object.keys(r.awareness).length>1&&(Es=!0,R.forEach(o=>{o.updateQueue.resume()}));let i=[];for(let o of r.updates)try{let c=s.processDocUpdate(o);c&&i.push(c)}catch(c){s.log("Failed to apply sync update",{error:c,update:o},"error",!0)}s.updateQueue.addBulk(i),r.should_compact?(s.log("Server requested compaction update"),s.updateQueue.clear(),s.updateQueue.add(s.createCompactionUpdate())):r.compaction_request&&(s.log("Server requested (old) compaction update"),s.updateQueue.add(sd(r.compaction_request)))}),gn&&Es?Ct=Wo:gn?Ct=er:Ct=Xo}catch(e){Ct=Math.min(Ct*2,qo);for(let r of t.rooms){if(!R.has(r.room))continue;let s=R.get(r.room);r.updates.length>0&&s.endCursor>0?(s.updateQueue.clear(),s.updateQueue.add(s.createCompactionUpdate())):r.updates.length>0&&s.updateQueue.restore(r.updates),s.log("Error posting sync update, will retry with backoff",{error:e,nextPoll:Ct},"error",!0)}Cs||R.forEach(r=>{r.onStatusChange({status:"disconnected",canManuallyRetry:!0,willAutoRetryInMs:Ct})})}Pt=setTimeout(rr,Ct)}n()}function dd({room:n,doc:t,awareness:e,log:r,onSync:s,onStatusChange:i}){if(R.has(n))return;let o=ec([id(t)]),c=R.size===0;function l(){u.localAwarenessState=e.getLocalState()??{}}function a(h,f){if(mn!==f){if(h.byteLength>ys){let p=R.get(n);if(!p)return;p.log("Document size limit exceeded",{maxUpdateSizeInBytes:ys,updateSizeInBytes:h.byteLength}),p.onStatusChange({status:"disconnected",error:new ps(Pe.DOCUMENT_SIZE_LIMIT_EXCEEDED,"Document size limit exceeded")}),Ds(n)}o.add(je(h,K.UPDATE))}}function d(){t.off("updateV2",a),e.off("change",l),o.clear()}let u={clientId:t.clientID,createCompactionUpdate:()=>je(Vt(t),K.COMPACTION),endCursor:0,isPrimaryRoom:c,localAwarenessState:e.getLocalState()??{},log:r,onStatusChange:i,processAwarenessUpdate:h=>cd(h,e),processDocUpdate:h=>ld(h,t,s),room:n,unregister:d,updateQueue:o};t.on("updateV2",a),e.on("change",l),R.set(n,u),nr||(window.addEventListener("beforeunload",ic),window.addEventListener("pagehide",oc),document.addEventListener("visibilitychange",cc),nr=!0),_s||rr()}function Ds(n){let t=R.get(n);if(t){let e=[{after:0,awareness:null,client_id:t.clientId,room:n,updates:[]}];bs({rooms:e}),t.unregister(),R.delete(n)}R.size===0&&nr&&(window.removeEventListener("beforeunload",ic),window.removeEventListener("pagehide",oc),document.removeEventListener("visibilitychange",cc),nr=!1,ks=!1)}function ud(){Ct=er*2,Pt&&(clearTimeout(Pt),Pt=null,rr())}var wn={registerRoom:dd,retryNow:ud,unregisterRoom:Ds};var hd=class extends Dt{constructor(n){super(),this.options=n,this.log("Initializing",{room:n.room}),this.awareness=n.awareness??new Ve(n.ydoc),this.connect()}awareness;status="disconnected";synced=!1;connect(){this.log("Connecting"),wn.registerRoom({room:this.options.room,doc:this.options.ydoc,awareness:this.awareness,log:this.log,onStatusChange:this.emitStatus,onSync:this.onSync})}destroy(){this.disconnect(),super.destroy()}disconnect(){this.log("Disconnecting"),wn.unregisterRoom(this.options.room),this.emitStatus({status:"disconnected"})}emitStatus=n=>{let{status:t}=n,e=t==="disconnected"?n.error:void 0;this.status===t&&!e||t==="connecting"&&this.status!=="disconnected"||(this.log("Status change",{status:t,error:e}),this.status=t,this.emit("status",[n]))};log=(n,t={},e="log",r=!1)=>{if(!this.options.debug&&!r)return;(console[e]||console.log)(`[${this.constructor.name}]: ${n}`,{room:this.options.room,...t})};onSync=()=>{this.synced||(this.synced=!0,this.log("Synced"))}};function lc(){return async({awareness:n,objectType:t,objectId:e,ydoc:r})=>{let s=e?`${t}:${e}`:t,i=new hd({awareness:n,room:s,ydoc:r});return{destroy:()=>i.destroy(),on:(o,c)=>{i.on(o,c)}}}}var Fe=null;function fd(){return[lc()]}function pd(n){return typeof n=="function"}function As(){if(Fe)return Fe;if(!window._wpCollaborationEnabled)return[];let n=(0,ac.applyFilters)("sync.providers",fd());return Array.isArray(n)?(Fe=n.filter(pd),Fe):(Fe=[],Fe)}var dc=(n,t)=>{let e=t==="undo"?n.undoStack:n.redoStack;for(;e.length>0;){let r=e.pop(),s=t==="undo"?r.undoStack:r.redoStack,i=s.pop(),o=!1;if(t==="undo"?(r.undoStack=[i],o=r.undo()!==null,r.undoStack=s):(r.redoStack=[i],o=r.redo()!==null,r.redoStack=s),o)return i}return null},uc=class extends we{constructor(n=[],t={}){super(),this.docs=new Map,this.trackedOrigins=t.trackedOrigins||new Set([null]),t.trackedOrigins=this.trackedOrigins,this._defaultOpts=t,this.undoStack=[],this.redoStack=[],this.addToScope(n)}addToScope(n){n=zt(n)?n:[n],n.forEach(t=>{let e=t.doc,r=N(this.docs,e,()=>{let s=new te([t],this._defaultOpts);return s.on("stack-cleared",({undoStackCleared:i,redoStackCleared:o})=>{this.clear(i,o)}),e.on("destroy",()=>{this.docs.delete(e),this.undoStack=this.undoStack.filter(i=>i.doc!==e),this.redoStack=this.redoStack.filter(i=>i.doc!==e)}),s.on("stack-item-added",i=>{(i.type==="undo"?this.undoStack:this.redoStack).push(s),this.emit("stack-item-added",[{...i,ydoc:e},this])}),s.on("stack-item-updated",i=>{this.emit("stack-item-updated",[{...i,ydoc:e},this])}),s.on("stack-item-popped",i=>{this.emit("stack-item-popped",[{...i,ydoc:e},this])}),s});r.scope.every(s=>s!==t)&&r.scope.push(t)})}addTrackedOrigin(n){this.trackedOrigins.add(n)}removeTrackedOrigin(n){this.trackedOrigins.delete(n)}undo(){return dc(this,"undo")}redo(){return dc(this,"redo")}clear(n=!0,t=!0){(n&&this.canUndo()||t&&this.canRedo())&&(this.docs.forEach(e=>{n&&(this.undoStack=[]),t&&(this.redoStack=[]),e.clear(n,t)}),this.emit("stack-cleared",[{undoStackCleared:n,redoStackCleared:t}]))}stopCapturing(){this.docs.forEach(n=>{n.stopCapturing()})}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}destroy(){this.docs.forEach(n=>n.destroy()),super.destroy()}};function hc(){let n=new uc([],{captureTimeout:500,trackedOrigins:new Set([Zn])});return{addRecord(t,e=!1){},addToScope(t,e){if(t.doc===null)return;let r=t.doc;n.addToScope(t);let{addUndoMeta:s,restoreUndoMeta:i}=e;n.on("stack-item-added",o=>{s(r,o.stackItem.meta)}),n.on("stack-item-popped",o=>{i(r,o.stackItem.meta)})},undo(){if(n.canUndo())return n.undo(),[]},redo(){if(n.canRedo())return n.redo(),[]},hasUndo(){return n.canUndo()},hasRedo(){return n.canRedo()},stopCapturing(){n.stopCapturing()}}}function sr(n={}){let t=new Map(Object.entries(n));return new mt({meta:t})}function Us(n){n.getMap(Be).set(Mo,Lo)}function Is(n){let t=n.getMap(Be);t.set(de,Date.now()),t.set(No,n.clientID)}function fc(){return Math.floor(Math.random()*1e9)}function pc(n){return JSON.stringify({document:yi(Vt(n)),updateId:fc()})}function gc(n){try{let{document:t}=JSON.parse(n),e={[Xn]:!0},r=sr(e),s=Si(t);return St(r,s),r.clientID=fc(),r}catch{return null}}function jt(n,t){return`${n}_${t}`}function mc(n=!1){let t=n?Fo:Yo,e=new Map,r=new Map,s;function i(g,m,w,y={}){n&&console.log(`[SyncManager][${g}]: ${m}`,{...y,entityId:w})}async function o(g,m,w,y,E){let k=As(),D=jt(m,w);if(k.length===0){i("loadEntity","no providers, skipping",D);return}if(r.has(D)){i("loadEntity","already loaded",D);return}i("loadEntity","loading",D),E={addUndoMeta:t(E.addUndoMeta),editRecord:t(E.editRecord),getEditedRecord:t(E.getEditedRecord),onStatusChange:t(E.onStatusChange),persistCRDTDoc:t(E.persistCRDTDoc),refetchRecord:t(E.refetchRecord),restoreUndoMeta:t(E.restoreUndoMeta)};let I=sr({objectType:m}),F=I.getMap(Qn),L=I.getMap(Be),xt=Date.now(),Z=()=>{i("loadEntity","unloading",D),kc.forEach(ge=>ge.destroy()),E.onStatusChange(null),F.unobserveDeep(at),L.unobserve(st),I.destroy(),r.delete(D)},fe=g.createAwareness?.(I,w),at=(ge,Ft)=>{Ft.local&&!(Ft.origin instanceof te)||p.updateEntityRecord(m,w)},st=(ge,Ft)=>{Ft.local||ge.keysChanged.forEach(_c=>{if(_c===de){let Bs=L.get(de);typeof Bs=="number"&&Bs>xt&&(i("loadEntity","refetching record",D),E.refetchRecord().catch(()=>{}))}})};s||(s=hc());let{addUndoMeta:Ye,restoreUndoMeta:pe}=E;s.addToScope(F,{addUndoMeta:Ye,restoreUndoMeta:pe});let yn={awareness:fe,handlers:E,objectId:w,objectType:m,syncConfig:g,unload:Z,ydoc:I};r.set(D,yn),i("loadEntity","connecting",D);let kc=await Promise.all(k.map(async ge=>{let Ft=await ge({objectType:m,objectId:w,ydoc:I,awareness:fe});return Ft.on("status",E.onStatusChange),Ft}));F.observeDeep(at),L.observe(st),Us(I),p.applyPersistedCrdtDoc(m,w,y)}async function c(g,m,w){let y=As(),E=jt(m,null);if(y.length===0){i("loadCollection","no providers, skipping",E);return}if(e.has(m)){i("loadCollection","already loaded",E);return}i("loadCollection","loading",E);let k=sr({collection:!0,objectType:m}),D=k.getMap(Be),I=Date.now(),F=()=>{i("loadCollection","unloading",E),fe.forEach(at=>at.destroy()),w.onStatusChange(null),D.unobserve(L),k.destroy(),e.delete(m)},L=(at,st)=>{st.local||at.keysChanged.forEach(Ye=>{if(Ye===de){let pe=D.get(de);typeof pe=="number"&&pe>I&&w.refetchRecords().catch(()=>{})}})},xt=g.createAwareness?.(k),Z={awareness:xt,handlers:w,syncConfig:g,unload:F,ydoc:k};e.set(m,Z),i("loadCollection","connecting",E);let fe=await Promise.all(y.map(async at=>{let st=await at({awareness:xt,objectType:m,objectId:null,ydoc:k});return st.on("status",w.onStatusChange),st}));D.observe(L),Us(k)}function l(g,m){let w=jt(g,m);i("unloadEntity","unloading",w),r.get(w)?.unload(),u(g,null,{},origin,{isSave:!0})}function a(g,m){let w=jt(g,m),y=r.get(w);if(!(!y||!y.awareness))return y.awareness}function d(g,m,w){let y=jt(g,m),E=r.get(y);if(!E){i("applyPersistedCrdtDoc","no entity state",y);return}let{handlers:k,syncConfig:{applyChangesToCRDTDoc:D,getChangesFromCRDTDoc:I,getPersistedCRDTDoc:F},ydoc:L}=E,xt=F?.(w),Z=xt?gc(xt):null;if(!Z){i("applyPersistedCrdtDoc","no persisted doc",y),L.transact(()=>{D(L,w),k.persistCRDTDoc()},fs);return}let fe=Vt(Z);St(L,fe);let at=I(Z,w),st=Object.keys(at);if(Z.destroy(),st.length===0){i("applyPersistedCrdtDoc","valid persisted doc",y);return}i("applyPersistedCrdtDoc","invalidated keys",y,{invalidatedKeys:st});let Ye=st.reduce((pe,yn)=>Object.assign(pe,{[yn]:w[yn]}),{});L.transact(()=>{D(L,Ye),k.persistCRDTDoc()},fs)}function u(g,m,w,y,E={}){let{isSave:k=!1,isNewUndoLevel:D=!1}=E,I=jt(g,m),F=r.get(I),L=e.get(g);if(F){let{syncConfig:xt,ydoc:Z}=F;D&&s&&s.stopCapturing?.(),Z.transact(()=>{i("updateCRDTDoc","applying changes",I,{changedKeys:Object.keys(w)}),xt.applyChangesToCRDTDoc(Z,w),k&&Is(Z)},y)}L&&k&&L.ydoc.transact(()=>{Is(L.ydoc)},y)}async function h(g,m){let w=jt(g,m),y=r.get(w);if(!y){i("updateEntityRecord","no entity state",w);return}let{handlers:E,syncConfig:k,ydoc:D}=y,I=k.getChangesFromCRDTDoc(D,await E.getEditedRecord()),F=Object.keys(I);F.length!==0&&(i("updateEntityRecord","changes",w,{changedKeys:F}),E.editRecord(I))}async function f(g,m){let w=jt(g,m),y=r.get(w);return y?.ydoc?(await new Promise(E=>setTimeout(E,0)),pc(y.ydoc)):null}let p={applyPersistedCrdtDoc:t(d),updateEntityRecord:t(h)};return{createPersistedCRDTDoc:t(f),getAwareness:a,load:t(o),loadCollection:t(c),get undoManager(){return s},unload:t(l),update:t(zo(u))}}var ue=class{diff(t,e,r={}){let s;typeof r=="function"?(s=r,r={}):"callback"in r&&(s=r.callback);let i=this.castInput(t,r),o=this.castInput(e,r),c=this.removeEmpty(this.tokenize(i,r)),l=this.removeEmpty(this.tokenize(o,r));return this.diffWithOptionsObj(c,l,r,s)}diffWithOptionsObj(t,e,r,s){var i;let o=y=>{if(y=this.postProcess(y,r),s){setTimeout(function(){s(y)},0);return}else return y},c=e.length,l=t.length,a=1,d=c+l;r.maxEditLength!=null&&(d=Math.min(d,r.maxEditLength));let u=(i=r.timeout)!==null&&i!==void 0?i:1/0,h=Date.now()+u,f=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(f[0],e,t,0,r);if(f[0].oldPos+1>=l&&p+1>=c)return o(this.buildValues(f[0].lastComponent,e,t));let g=-1/0,m=1/0,w=()=>{for(let y=Math.max(g,-a);y<=Math.min(m,a);y+=2){let E,k=f[y-1],D=f[y+1];k&&(f[y-1]=void 0);let I=!1;if(D){let L=D.oldPos-y;I=D&&0<=L&&L<c}let F=k&&k.oldPos+1<l;if(!I&&!F){f[y]=void 0;continue}if(!F||I&&k.oldPos<D.oldPos?E=this.addToPath(D,!0,!1,0,r):E=this.addToPath(k,!1,!0,1,r),p=this.extractCommon(E,e,t,y,r),E.oldPos+1>=l&&p+1>=c)return o(this.buildValues(E.lastComponent,e,t))||!0;f[y]=E,E.oldPos+1>=l&&(m=Math.min(m,y-1)),p+1>=c&&(g=Math.max(g,y+1))}a++};if(s)(function y(){setTimeout(function(){if(a>d||Date.now()>h)return s(void 0);w()||y()},0)})();else for(;a<=d&&Date.now()<=h;){let y=w();if(y)return y}}addToPath(t,e,r,s,i){let o=t.lastComponent;return o&&!i.oneChangePerToken&&o.added===e&&o.removed===r?{oldPos:t.oldPos+s,lastComponent:{count:o.count+1,added:e,removed:r,previousComponent:o.previousComponent}}:{oldPos:t.oldPos+s,lastComponent:{count:1,added:e,removed:r,previousComponent:o}}}extractCommon(t,e,r,s,i){let o=e.length,c=r.length,l=t.oldPos,a=l-s,d=0;for(;a+1<o&&l+1<c&&this.equals(r[l+1],e[a+1],i);)a++,l++,d++,i.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return d&&!i.oneChangePerToken&&(t.lastComponent={count:d,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=l,a}equals(t,e,r){return r.comparator?r.comparator(t,e):t===e||!!r.ignoreCase&&t.toLowerCase()===e.toLowerCase()}removeEmpty(t){let e=[];for(let r=0;r<t.length;r++)t[r]&&e.push(t[r]);return e}castInput(t,e){return t}tokenize(t,e){return Array.from(t)}join(t){return t.join("")}postProcess(t,e){return t}get useLongestToken(){return!1}buildValues(t,e,r){let s=[],i;for(;t;)s.push(t),i=t.previousComponent,delete t.previousComponent,t=i;s.reverse();let o=s.length,c=0,l=0,a=0;for(;c<o;c++){let d=s[c];if(d.removed)d.value=this.join(r.slice(a,a+d.count)),a+=d.count;else{if(!d.added&&this.useLongestToken){let u=e.slice(l,l+d.count);u=u.map(function(h,f){let p=r[a+f];return p.length>h.length?p:h}),d.value=this.join(u)}else d.value=this.join(e.slice(l,l+d.count));l+=d.count,d.added||(a+=d.count)}}return s}};var Ts=class extends ue{},wc=new Ts;function ir(n,t,e){return wc.diff(n,t,e)}var vs=class extends ue{constructor(){super(...arguments),this.tokenize=gd}equals(t,e,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
`))&&(t=t.trim()),(!r.newlineIsToken||!e.includes(`
`))&&(e=e.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(`
`)&&(t=t.slice(0,-1)),e.endsWith(`
`)&&(e=e.slice(0,-1))),super.equals(t,e,r)}},yc=new vs;function Os(n,t,e){return yc.diff(n,t,e)}function gd(n,t){t.stripTrailingCr&&(n=n.replace(/\r\n/g,`
`));let e=[],r=n.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let s=0;s<r.length;s++){let i=r[s];s%2&&!t.newlineIsToken?e[e.length-1]+=i:e.push(i)}return e}var or=Yt(Ls(),1);var xc=Yt(Ls(),1);function md(n){return JSON.parse(JSON.stringify(n))}var Ns;(n=>{function t(i={},o={},c=!1){typeof i!="object"&&(i={}),typeof o!="object"&&(o={});let l=md(o);c||(l=Object.keys(l).reduce((a,d)=>((l[d]!==null||l[d]!==void 0)&&(a[d]=l[d]),a),{}));for(let a in i)i[a]!==void 0&&o[a]===void 0&&(l[a]=i[a]);return Object.keys(l).length>0?l:void 0}n.compose=t;function e(i={},o={}){typeof i!="object"&&(i={}),typeof o!="object"&&(o={});let c=Object.keys(i).concat(Object.keys(o)).reduce((l,a)=>((0,xc.default)(i[a],o[a])||(l[a]=o[a]===void 0?null:o[a]),l),{});return Object.keys(c).length>0?c:void 0}n.diff=e;function r(i={},o={}){i=i||{};let c=Object.keys(o).reduce((l,a)=>(o[a]!==i[a]&&i[a]!==void 0&&(l[a]=o[a]),l),{});return Object.keys(i).reduce((l,a)=>(i[a]!==o[a]&&o[a]===void 0&&(l[a]=null),l),c)}n.invert=r;function s(i,o,c=!1){if(typeof i!="object")return o;if(typeof o!="object")return;if(!c)return o;let l=Object.keys(o).reduce((a,d)=>(i[d]===void 0&&(a[d]=o[d]),a),{});return Object.keys(l).length>0?l:void 0}n.transform=s})(Ns||(Ns={}));var he=Ns;var Ms;(n=>{function t(e){return typeof e.delete=="number"?e.delete:typeof e.retain=="number"?e.retain:typeof e.retain=="object"&&e.retain!==null?1:typeof e.insert=="string"?e.insert.length:1}n.length=t})(Ms||(Ms={}));var rt=Ms;var H=class{ops;index;offset;constructor(n){this.ops=n,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(n){n||(n=1/0);let t=this.ops[this.index];if(t){let e=this.offset,r=rt.length(t);if(n>=r-e?(n=r-e,this.index+=1,this.offset=0):this.offset+=n,typeof t.delete=="number")return{delete:n};let s={};return t.attributes&&(s.attributes=t.attributes),typeof t.retain=="number"?s.retain=n:typeof t.retain=="object"&&t.retain!==null?s.retain=t.retain:typeof t.insert=="string"?s.insert=t.insert.substr(e,n):s.insert=t.insert,s}return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?rt.length(this.ops[this.index])-this.offset:1/0}peekType(){let n=this.ops[this.index];return n?typeof n.delete=="number"?"delete":typeof n.retain=="number"||typeof n.retain=="object"&&n.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index)}else return[];let n=this.offset,t=this.index,e=this.next(),r=this.ops.slice(this.index);return this.offset=n,this.index=t,[e].concat(r)}};function wd(n){return JSON.parse(JSON.stringify(n))}var yd="\0",Sd=1e4;function Rs(n){return n.map(t=>({...t,count:t.value.length}))}var bc=(n,t)=>{if(typeof n!="object"||n===null)throw new Error(`cannot retain a ${typeof n}`);if(typeof t!="object"||t===null)throw new Error(`cannot retain a ${typeof t}`);let e=Object.keys(n)[0];if(!e||e!==Object.keys(t)[0])throw new Error(`embed types not matched: ${e} != ${Object.keys(t)[0]}`);return[e,n[e],t[e]]},xd=class q{static Op=rt;static OpIterator=H;static AttributeMap=he;static handlers={};static registerEmbed(t,e){this.handlers[t]=e}static unregisterEmbed(t){delete this.handlers[t]}static getHandler(t){let e=this.handlers[t];if(!e)throw new Error(`no handlers for embed type "${t}"`);return e}ops;constructor(t){Array.isArray(t)?this.ops=t:t!=null&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]}insert(t,e){let r={};return typeof t=="string"&&t.length===0?this:(r.insert=t,e!=null&&typeof e=="object"&&Object.keys(e).length>0&&(r.attributes=e),this.push(r))}delete(t){return t<=0?this:this.push({delete:t})}retain(t,e){if(typeof t=="number"&&t<=0)return this;let r={retain:t};return e!=null&&typeof e=="object"&&Object.keys(e).length>0&&(r.attributes=e),this.push(r)}push(t){let e=this.ops.length,r=this.ops[e-1];if(t=wd(t),typeof r=="object"){if(typeof t.delete=="number"&&typeof r.delete=="number")return this.ops[e-1]={delete:r.delete+t.delete},this;if(typeof r.delete=="number"&&t.insert!==null&&t.insert!==void 0&&(e-=1,r=this.ops[e-1],typeof r!="object"))return this.ops.unshift(t),this;if((0,or.default)(t.attributes,r.attributes)){if(typeof t.insert=="string"&&typeof r.insert=="string")return this.ops[e-1]={insert:r.insert+t.insert},typeof t.attributes=="object"&&(this.ops[e-1].attributes=t.attributes),this;if(typeof t.retain=="number"&&typeof r.retain=="number")return this.ops[e-1]={retain:r.retain+t.retain},typeof t.attributes=="object"&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this}chop(){let t=this.ops[this.ops.length-1];return t&&typeof t.retain=="number"&&!t.attributes&&this.ops.pop(),this}filter(t){return this.ops.filter(t)}forEach(t){this.ops.forEach(t)}map(t){return this.ops.map(t)}partition(t){let e=[],r=[];return this.forEach(s=>{(t(s)?e:r).push(s)}),[e,r]}reduce(t,e){return this.ops.reduce(t,e)}changeLength(){return this.reduce((t,e)=>e.insert?t+rt.length(e):e.delete?t-e.delete:t,0)}length(){return this.reduce((t,e)=>t+rt.length(e),0)}slice(t=0,e=1/0){let r=[],s=new H(this.ops),i=0;for(;i<e&&s.hasNext();){let o;i<t?o=s.next(t-i):(o=s.next(e-i),r.push(o)),i+=rt.length(o)}return new q(r)}compose(t){let e=new H(this.ops),r=new H(t.ops),s=[],i=r.peek();if(i!=null&&typeof i.retain=="number"&&(i.attributes===null||i.attributes===void 0)){let c=i.retain;for(;e.peekType()==="insert"&&e.peekLength()<=c;)c-=e.peekLength(),s.push(e.next());i.retain-c>0&&r.next(i.retain-c)}let o=new q(s);for(;e.hasNext()||r.hasNext();)if(r.peekType()==="insert")o.push(r.next());else if(e.peekType()==="delete")o.push(e.next());else{let c=Math.min(e.peekLength(),r.peekLength()),l=e.next(c),a=r.next(c);if(a.retain){let d={};if(typeof l.retain=="number")d.retain=typeof a.retain=="number"?c:a.retain;else if(typeof a.retain=="number")l.retain===null||l.retain===void 0?d.insert=l.insert:d.retain=l.retain;else{let h=l.retain===null||l.retain===void 0?"insert":"retain",[f,p,g]=bc(l[h],a.retain),m=q.getHandler(f);d[h]={[f]:m.compose(p,g,h==="retain")}}let u=he.compose(l.attributes,a.attributes,typeof l.retain=="number");if(u&&(d.attributes=u),o.push(d),!r.hasNext()&&(0,or.default)(o.ops[o.ops.length-1],d)){let h=new q(e.rest());return o.concat(h).chop()}}else typeof a.delete=="number"&&(typeof l.retain=="number"||typeof l.retain=="object"&&l.retain!==null)&&o.push(a)}return o.chop()}concat(t){let e=new q(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e}diff(t){if(this.ops===t.ops)return new q;let e=this.deltasToStrings(t),r=Rs(ir(e[0],e[1])),s=new H(this.ops),i=new H(t.ops);return this.convertChangesToDelta(r,s,i).chop()}eachLine(t,e=`
`){let r=new H(this.ops),s=new q,i=0;for(;r.hasNext();){if(r.peekType()!=="insert")return;let o=r.peek(),c=rt.length(o)-r.peekLength(),l=typeof o.insert=="string"?o.insert.indexOf(e,c)-c:-1;if(l<0)s.push(r.next());else if(l>0)s.push(r.next(l));else{if(t(s,r.next(1).attributes||{},i)===!1)return;i+=1,s=new q}}s.length()>0&&t(s,{},i)}invert(t){let e=new q;return this.reduce((r,s)=>{if(s.insert)e.delete(rt.length(s));else{if(typeof s.retain=="number"&&(s.attributes===null||s.attributes===void 0))return e.retain(s.retain),r+s.retain;if(s.delete||typeof s.retain=="number"){let i=s.delete||s.retain;return t.slice(r,r+i).forEach(c=>{s.delete?e.push(c):s.retain&&s.attributes&&e.retain(rt.length(c),he.invert(s.attributes,c.attributes))}),r+i}else if(typeof s.retain=="object"&&s.retain!==null){let i=t.slice(r,r+1),o=new H(i.ops).next(),[c,l,a]=bc(s.retain,o.insert),d=q.getHandler(c);return e.retain({[c]:d.invert(l,a)},he.invert(s.attributes,o.attributes)),r+1}}return r},0),e.chop()}transform(t,e=!1){if(e=!!e,typeof t=="number")return this.transformPosition(t,e);let r=t,s=new H(this.ops),i=new H(r.ops),o=new q;for(;s.hasNext()||i.hasNext();)if(s.peekType()==="insert"&&(e||i.peekType()!=="insert"))o.retain(rt.length(s.next()));else if(i.peekType()==="insert")o.push(i.next());else{let c=Math.min(s.peekLength(),i.peekLength()),l=s.next(c),a=i.next(c);if(l.delete)continue;if(a.delete)o.push(a);else{let d=l.retain,u=a.retain,h=typeof u=="object"&&u!==null?u:c;if(typeof d=="object"&&d!==null&&typeof u=="object"&&u!==null){let f=Object.keys(d)[0];if(f===Object.keys(u)[0]){let p=q.getHandler(f);p&&(h={[f]:p.transform(d[f],u[f],e)})}}o.retain(h,he.transform(l.attributes,a.attributes,e))}}return o.chop()}transformPosition(t,e=!1){e=!!e;let r=new H(this.ops),s=0;for(;r.hasNext()&&s<=t;){let i=r.peekLength(),o=r.peekType();if(r.next(),o==="delete"){t-=Math.min(i,t-s);continue}else o==="insert"&&(s<t||!e)&&(t+=i);s+=i}return t}diffWithCursor(t,e){if(this.ops===t.ops)return new q;let r=this.deltasToStrings(t);if(Math.max(...r.map(u=>u.length))>Sd){let u=Rs(Os(r[0],r[1])),h=new H(this.ops),f=new H(t.ops);return this.convertChangesToDelta(u,h,f).chop()}else if(e===null)return this.diff(t);let i=Rs(ir(r[0],r[1])),o=0,c=[];for(let u=0;u<i.length;u++){let h=i[u],f=o,p=o+(h.count??0),g=e>f&&e<=p,m=!h.added&&!h.removed,w=h.removed&&!h.added,y=i[u+1],E=y&&y.added&&!y.removed;if(m&&g&&E){let k=this.tryMoveInsertionToCursor(h,y,e,f);if(k){c.push(...k),u++,o=p;continue}}if(w){let k=this.tryMoveDeletionToCursor(h,c,e,o);if(k){c.pop(),c.push(...k),o+=h.count??0;continue}}c.push(h),h.added||(o+=h.count??0)}i=c;let l=new H(this.ops),a=new H(t.ops);return this.convertChangesToDelta(i,l,a).chop()}tryMoveInsertionToCursor(t,e,r,s){let i=e.value,o=i.length,c=r-s-o;if(!(t.value.substring(c,c+i.length)===i))return null;let d=t.value.substring(0,c),u=t.value.substring(c),h=[];return d.length>0&&h.push({value:d,count:d.length,added:!1,removed:!1}),h.push(e),u.length>0&&h.push({value:u,count:u.length,added:!1,removed:!1}),h}tryMoveDeletionToCursor(t,e,r,s){let i=e[e.length-1];if(!i||i.added||i.removed)return null;let o=s-(i.count??0),c=s;if(r<o||r>=c)return null;let l=t.value,a=r-o;if(!(i.value.substring(a,a+l.length)===l))return null;let h=i.value.substring(0,a),f=i.value.substring(a),p=t.count??0,g=f.substring(p),m=[];return h.length>0&&m.push({value:h,count:h.length,added:!1,removed:!1}),m.push(t),g.length>0&&m.push({value:g,count:g.length,added:!1,removed:!1}),m}deltasToStrings(t){return[this,t].map(e=>e.map(r=>{if(r.insert!==null||r.insert!==void 0)return typeof r.insert=="string"?r.insert:yd;let s=e===t?"on":"with";throw new Error("diff() called "+s+" non-document")}).join(""))}convertChangesToDelta(t,e,r){let s=new q;return t.forEach(i=>{let o=i.count??0;for(;o>0;){let c=0;if(i.added)c=Math.min(r.peekLength(),o),s.push(r.next(c));else if(i.removed)c=Math.min(o,e.peekLength()),e.next(c),s.delete(c);else{c=Math.min(e.peekLength(),r.peekLength(),o);let l=e.next(c),a=r.next(c);(0,or.default)(l.insert,a.insert)?s.retain(c,he.diff(l.attributes,a.attributes)):s.push(a).delete(c)}o-=c}}),s}},Ec=xd;var Vs={};jo(Vs,{ConnectionErrorCode:Pe,createSyncManager:mc,Delta:Ec,CRDT_DOC_META_PERSISTENCE_KEY:Xn,CRDT_RECORD_MAP_KEY:Qn,LOCAL_EDITOR_ORIGIN:Zn,LOCAL_UNDO_IGNORED_ORIGIN:Ro,retrySyncConnection:()=>wn.retryNow()});var bd="13";return Tc(Ed);})();
                                                                                                                                                                                                                                                                                                                                                                                                            dist/upload-media.js                                                                                0000644                 00000157252 15212564037 0010427 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).uploadMedia = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
    get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
  }) : x)(function(x) {
    if (typeof require !== "undefined") return require.apply(this, arguments);
    throw Error('Dynamic require of "' + x + '" is not supported');
  });
  var __commonJS = (cb, mod) => function __require2() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/url
  var require_url = __commonJS({
    "package-external:@wordpress/url"(exports, module) {
      module.exports = window.wp.url;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // package-external:@wordpress/blob
  var require_blob = __commonJS({
    "package-external:@wordpress/blob"(exports, module) {
      module.exports = window.wp.blob;
    }
  });

  // package-external:@wordpress/private-apis
  var require_private_apis = __commonJS({
    "package-external:@wordpress/private-apis"(exports, module) {
      module.exports = window.wp.privateApis;
    }
  });

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // packages/upload-media/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    MediaUploadProvider: () => provider_default,
    UploadError: () => UploadError,
    clearFeatureDetectionCache: () => clearFeatureDetectionCache,
    detectClientSideMediaSupport: () => detectClientSideMediaSupport,
    isClientSideMediaSupported: () => isClientSideMediaSupported,
    store: () => store
  });

  // packages/upload-media/build-module/store/index.mjs
  var import_data = __toESM(require_data(), 1);

  // packages/upload-media/build-module/store/types.mjs
  var Type = /* @__PURE__ */ ((Type2) => {
    Type2["Unknown"] = "REDUX_UNKNOWN";
    Type2["Add"] = "ADD_ITEM";
    Type2["Prepare"] = "PREPARE_ITEM";
    Type2["Cancel"] = "CANCEL_ITEM";
    Type2["Remove"] = "REMOVE_ITEM";
    Type2["RetryItem"] = "RETRY_ITEM";
    Type2["PauseItem"] = "PAUSE_ITEM";
    Type2["ResumeItem"] = "RESUME_ITEM";
    Type2["PauseQueue"] = "PAUSE_QUEUE";
    Type2["ResumeQueue"] = "RESUME_QUEUE";
    Type2["OperationStart"] = "OPERATION_START";
    Type2["OperationFinish"] = "OPERATION_FINISH";
    Type2["AddOperations"] = "ADD_OPERATIONS";
    Type2["CacheBlobUrl"] = "CACHE_BLOB_URL";
    Type2["RevokeBlobUrls"] = "REVOKE_BLOB_URLS";
    Type2["UpdateProgress"] = "UPDATE_PROGRESS";
    Type2["UpdateSettings"] = "UPDATE_SETTINGS";
    return Type2;
  })(Type || {});
  var ItemStatus = /* @__PURE__ */ ((ItemStatus2) => {
    ItemStatus2["Queued"] = "QUEUED";
    ItemStatus2["Processing"] = "PROCESSING";
    ItemStatus2["Paused"] = "PAUSED";
    ItemStatus2["Uploaded"] = "UPLOADED";
    ItemStatus2["Error"] = "ERROR";
    return ItemStatus2;
  })(ItemStatus || {});
  var OperationType = /* @__PURE__ */ ((OperationType2) => {
    OperationType2["Prepare"] = "PREPARE";
    OperationType2["Upload"] = "UPLOAD";
    OperationType2["ResizeCrop"] = "RESIZE_CROP";
    OperationType2["Rotate"] = "ROTATE";
    OperationType2["TranscodeImage"] = "TRANSCODE_IMAGE";
    OperationType2["ThumbnailGeneration"] = "THUMBNAIL_GENERATION";
    OperationType2["Finalize"] = "FINALIZE";
    return OperationType2;
  })(OperationType || {});

  // packages/upload-media/build-module/store/constants.mjs
  var STORE_NAME = "core/upload-media";
  var DEFAULT_MAX_CONCURRENT_UPLOADS = 5;
  var DEFAULT_MAX_CONCURRENT_IMAGE_PROCESSING = 2;
  var CLIENT_SIDE_SUPPORTED_MIME_TYPES = [
    "image/jpeg",
    "image/png",
    "image/gif",
    "image/webp",
    "image/avif"
  ];

  // packages/upload-media/build-module/store/reducer.mjs
  var noop = () => {
  };
  var DEFAULT_STATE = {
    queue: [],
    queueStatus: "active",
    blobUrls: {},
    settings: {
      mediaUpload: noop,
      maxConcurrentUploads: DEFAULT_MAX_CONCURRENT_UPLOADS,
      maxConcurrentImageProcessing: DEFAULT_MAX_CONCURRENT_IMAGE_PROCESSING
    }
  };
  function reducer(state = DEFAULT_STATE, action = { type: Type.Unknown }) {
    switch (action.type) {
      case Type.PauseQueue: {
        return {
          ...state,
          queueStatus: "paused"
        };
      }
      case Type.ResumeQueue: {
        return {
          ...state,
          queueStatus: "active"
        };
      }
      case Type.PauseItem:
        return {
          ...state,
          queue: state.queue.map(
            (item) => item.id === action.id ? {
              ...item,
              status: ItemStatus.Paused
            } : item
          )
        };
      case Type.ResumeItem:
        return {
          ...state,
          queue: state.queue.map(
            (item) => item.id === action.id ? {
              ...item,
              status: ItemStatus.Processing
            } : item
          )
        };
      case Type.Add:
        return {
          ...state,
          queue: [...state.queue, action.item]
        };
      case Type.Cancel:
        return {
          ...state,
          queue: state.queue.map(
            (item) => item.id === action.id ? {
              ...item,
              error: action.error
            } : item
          )
        };
      case Type.RetryItem:
        return {
          ...state,
          queue: state.queue.map(
            (item) => item.id === action.id ? {
              ...item,
              status: ItemStatus.Processing,
              error: void 0,
              retryCount: (item.retryCount ?? 0) + 1
            } : item
          )
        };
      case Type.Remove:
        return {
          ...state,
          queue: state.queue.filter((item) => item.id !== action.id)
        };
      case Type.OperationStart: {
        return {
          ...state,
          queue: state.queue.map(
            (item) => item.id === action.id ? {
              ...item,
              currentOperation: action.operation
            } : item
          )
        };
      }
      case Type.AddOperations:
        return {
          ...state,
          queue: state.queue.map((item) => {
            if (item.id !== action.id) {
              return item;
            }
            return {
              ...item,
              operations: [
                ...item.operations || [],
                ...action.operations
              ]
            };
          })
        };
      case Type.OperationFinish:
        return {
          ...state,
          queue: state.queue.map((item) => {
            if (item.id !== action.id) {
              return item;
            }
            const operations = item.operations ? item.operations.slice(1) : [];
            const attachment = item.attachment || action.item.attachment ? {
              ...item.attachment,
              ...action.item.attachment
            } : void 0;
            return {
              ...item,
              currentOperation: void 0,
              operations,
              ...action.item,
              attachment,
              additionalData: {
                ...item.additionalData,
                ...action.item.additionalData
              }
            };
          })
        };
      case Type.CacheBlobUrl: {
        const blobUrls = state.blobUrls[action.id] || [];
        return {
          ...state,
          blobUrls: {
            ...state.blobUrls,
            [action.id]: [...blobUrls, action.blobUrl]
          }
        };
      }
      case Type.RevokeBlobUrls: {
        const newBlobUrls = { ...state.blobUrls };
        delete newBlobUrls[action.id];
        return {
          ...state,
          blobUrls: newBlobUrls
        };
      }
      case Type.UpdateProgress:
        return {
          ...state,
          queue: state.queue.map(
            (item) => item.id === action.id ? {
              ...item,
              progress: action.progress
            } : item
          )
        };
      case Type.UpdateSettings: {
        return {
          ...state,
          settings: {
            ...state.settings,
            ...action.settings
          }
        };
      }
    }
    return state;
  }
  var reducer_default = reducer;

  // packages/upload-media/build-module/store/selectors.mjs
  var selectors_exports = {};
  __export(selectors_exports, {
    getItems: () => getItems,
    getSettings: () => getSettings,
    isUploading: () => isUploading,
    isUploadingById: () => isUploadingById,
    isUploadingByUrl: () => isUploadingByUrl
  });
  function getItems(state) {
    return state.queue;
  }
  function isUploading(state) {
    return state.queue.length >= 1;
  }
  function isUploadingByUrl(state, url) {
    return state.queue.some(
      (item) => item.attachment?.url === url || item.sourceUrl === url
    );
  }
  function isUploadingById(state, attachmentId) {
    return state.queue.some(
      (item) => item.attachment?.id === attachmentId || item.sourceAttachmentId === attachmentId
    );
  }
  function getSettings(state) {
    return state.settings;
  }

  // packages/upload-media/build-module/store/private-selectors.mjs
  var private_selectors_exports = {};
  __export(private_selectors_exports, {
    getActiveImageProcessingCount: () => getActiveImageProcessingCount,
    getActiveUploadCount: () => getActiveUploadCount,
    getAllItems: () => getAllItems,
    getBlobUrls: () => getBlobUrls,
    getFailedItems: () => getFailedItems,
    getItem: () => getItem,
    getItemProgress: () => getItemProgress,
    getPausedUploadForPost: () => getPausedUploadForPost,
    getPendingImageProcessing: () => getPendingImageProcessing,
    getPendingUploads: () => getPendingUploads,
    hasPendingItemsByParentId: () => hasPendingItemsByParentId,
    isBatchUploaded: () => isBatchUploaded,
    isPaused: () => isPaused,
    isUploadingToPost: () => isUploadingToPost
  });
  function getAllItems(state) {
    return state.queue;
  }
  function getItem(state, id) {
    return state.queue.find((item) => item.id === id);
  }
  function isBatchUploaded(state, batchId) {
    const batchItems = state.queue.filter(
      (item) => batchId === item.batchId
    );
    return batchItems.length === 0;
  }
  function isUploadingToPost(state, postOrAttachmentId) {
    return state.queue.some(
      (item) => item.currentOperation === OperationType.Upload && item.additionalData.post === postOrAttachmentId
    );
  }
  function getPausedUploadForPost(state, postOrAttachmentId) {
    return state.queue.find(
      (item) => item.status === ItemStatus.Paused && item.additionalData.post === postOrAttachmentId
    );
  }
  function isPaused(state) {
    return state.queueStatus === "paused";
  }
  function getBlobUrls(state, id) {
    return state.blobUrls[id] || [];
  }
  function getActiveUploadCount(state) {
    return state.queue.filter(
      (item) => item.currentOperation === OperationType.Upload
    ).length;
  }
  function getPendingUploads(state) {
    return state.queue.filter((item) => {
      const nextOperation = Array.isArray(item.operations?.[0]) ? item.operations[0][0] : item.operations?.[0];
      return nextOperation === OperationType.Upload && item.currentOperation !== OperationType.Upload;
    });
  }
  function getActiveImageProcessingCount(state) {
    return state.queue.filter(
      (item) => item.currentOperation === OperationType.ResizeCrop || item.currentOperation === OperationType.Rotate
    ).length;
  }
  function getPendingImageProcessing(state) {
    return state.queue.filter((item) => {
      const nextOperation = Array.isArray(item.operations?.[0]) ? item.operations[0][0] : item.operations?.[0];
      return (nextOperation === OperationType.ResizeCrop || nextOperation === OperationType.Rotate) && item.currentOperation !== OperationType.ResizeCrop && item.currentOperation !== OperationType.Rotate;
    });
  }
  function getFailedItems(state) {
    return state.queue.filter((item) => item.error !== void 0);
  }
  function hasPendingItemsByParentId(state, parentId) {
    return state.queue.some((item) => item.parentId === parentId);
  }
  function getItemProgress(state, id) {
    const item = state.queue.find((i) => i.id === id);
    return item?.progress;
  }

  // packages/upload-media/build-module/store/actions.mjs
  var actions_exports = {};
  __export(actions_exports, {
    addItems: () => addItems,
    cancelItem: () => cancelItem,
    retryItem: () => retryItem
  });

  // node_modules/uuid/dist/esm-browser/rng.js
  var getRandomValues;
  var rnds8 = new Uint8Array(16);
  function rng() {
    if (!getRandomValues) {
      getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
      if (!getRandomValues) {
        throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
      }
    }
    return getRandomValues(rnds8);
  }

  // node_modules/uuid/dist/esm-browser/stringify.js
  var byteToHex = [];
  for (let i = 0; i < 256; ++i) {
    byteToHex.push((i + 256).toString(16).slice(1));
  }
  function unsafeStringify(arr, offset = 0) {
    return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
  }

  // node_modules/uuid/dist/esm-browser/native.js
  var randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
  var native_default = {
    randomUUID
  };

  // node_modules/uuid/dist/esm-browser/v4.js
  function v4(options, buf, offset) {
    if (native_default.randomUUID && !buf && !options) {
      return native_default.randomUUID();
    }
    options = options || {};
    const rnds = options.random || (options.rng || rng)();
    rnds[6] = rnds[6] & 15 | 64;
    rnds[8] = rnds[8] & 63 | 128;
    if (buf) {
      offset = offset || 0;
      for (let i = 0; i < 16; ++i) {
        buf[offset + i] = rnds[i];
      }
      return buf;
    }
    return unsafeStringify(rnds);
  }
  var v4_default = v4;

  // packages/upload-media/build-module/image-file.mjs
  var ImageFile = class extends File {
    width = 0;
    height = 0;
    originalWidth = 0;
    originalHeight = 0;
    get wasResized() {
      return (this.originalWidth || 0) > this.width || (this.originalHeight || 0) > this.height;
    }
    constructor(file, width, height, originalWidth, originalHeight) {
      super([file], file.name, {
        type: file.type,
        lastModified: file.lastModified
      });
      this.width = width;
      this.height = height;
      this.originalWidth = originalWidth;
      this.originalHeight = originalHeight;
    }
  };

  // packages/upload-media/build-module/utils.mjs
  var import_url = __toESM(require_url(), 1);
  var import_i18n = __toESM(require_i18n(), 1);
  function convertBlobToFile(fileOrBlob) {
    if (fileOrBlob instanceof File) {
      return fileOrBlob;
    }
    if ("name" in fileOrBlob && typeof fileOrBlob.name === "string") {
      return new File([fileOrBlob], fileOrBlob.name, {
        type: fileOrBlob.type,
        lastModified: fileOrBlob.lastModified
      });
    }
    const ext = fileOrBlob.type.split("/")[1];
    const mediaType = "application/pdf" === fileOrBlob.type ? "document" : fileOrBlob.type.split("/")[0];
    return new File([fileOrBlob], `${mediaType}.${ext}`, {
      type: fileOrBlob.type
    });
  }
  function renameFile(file, name) {
    return new File([file], name, {
      type: file.type,
      lastModified: file.lastModified
    });
  }
  function cloneFile(file) {
    return renameFile(file, file.name);
  }
  function getFileBasename(name) {
    return name.includes(".") ? name.split(".").slice(0, -1).join(".") : name;
  }

  // packages/upload-media/build-module/store/utils/index.mjs
  var vipsModulePromise;
  var vipsModule;
  function loadVipsModule() {
    if (!vipsModulePromise) {
      vipsModulePromise = import("@wordpress/vips/worker").then(
        (mod) => {
          vipsModule = mod;
          return mod;
        }
      );
    }
    return vipsModulePromise;
  }
  async function vipsConvertImageFormat(id, file, type, quality, interlaced) {
    const { vipsConvertImageFormat: convertImageFormat } = await loadVipsModule();
    const buffer = await convertImageFormat(
      id,
      await file.arrayBuffer(),
      file.type,
      type,
      quality,
      interlaced
    );
    const ext = type.split("/")[1];
    const fileName = `${getFileBasename(file.name)}.${ext}`;
    return new File([new Blob([buffer])], fileName, {
      type
    });
  }
  async function vipsHasTransparency(url) {
    const { vipsHasTransparency: hasTransparency } = await loadVipsModule();
    const response = await fetch(url);
    if (!response.ok) {
      throw new Error(`Failed to fetch image: ${response.status}`);
    }
    return hasTransparency(await response.arrayBuffer());
  }
  async function vipsResizeImage(id, file, resize, smartCrop, addSuffix, signal, scaledSuffix, quality) {
    if (signal?.aborted) {
      throw new Error("Operation aborted");
    }
    const { vipsResizeImage: resizeImage } = await loadVipsModule();
    const { buffer, width, height, originalWidth, originalHeight } = await resizeImage(
      id,
      await file.arrayBuffer(),
      file.type,
      resize,
      smartCrop,
      quality
    );
    let fileName = file.name;
    const wasResized = originalWidth > width || originalHeight > height;
    if (wasResized) {
      const basename = getFileBasename(file.name);
      if (scaledSuffix) {
        fileName = file.name.replace(basename, `${basename}-scaled`);
      } else if (addSuffix) {
        fileName = file.name.replace(
          basename,
          `${basename}-${width}x${height}`
        );
      }
    }
    const resultFile = new ImageFile(
      new File(
        [new Blob([buffer], { type: file.type })],
        fileName,
        {
          type: file.type
        }
      ),
      width,
      height,
      originalWidth,
      originalHeight
    );
    return resultFile;
  }
  async function vipsRotateImage(id, file, orientation, signal) {
    if (signal?.aborted) {
      throw new Error("Operation aborted");
    }
    if (orientation === 1) {
      return file;
    }
    const { vipsRotateImage: rotateImage } = await loadVipsModule();
    const { buffer, width, height } = await rotateImage(
      id,
      await file.arrayBuffer(),
      file.type,
      orientation
    );
    const basename = getFileBasename(file.name);
    const fileName = file.name.replace(basename, `${basename}-rotated`);
    const resultFile = new ImageFile(
      new File(
        [new Blob([buffer], { type: file.type })],
        fileName,
        {
          type: file.type
        }
      ),
      width,
      height
    );
    return resultFile;
  }
  async function vipsCancelOperations(id) {
    if (!vipsModule) {
      return false;
    }
    return vipsModule.vipsCancelOperations(id);
  }
  function terminateVipsWorker() {
    if (vipsModule) {
      vipsModule.terminateVipsWorker();
    }
  }

  // packages/upload-media/build-module/validate-mime-type.mjs
  var import_i18n2 = __toESM(require_i18n(), 1);

  // packages/upload-media/build-module/upload-error.mjs
  var UploadError = class extends Error {
    code;
    file;
    constructor({ code, message, file, cause }) {
      super(message, { cause });
      Object.setPrototypeOf(this, new.target.prototype);
      this.code = code;
      this.file = file;
    }
  };

  // packages/upload-media/build-module/validate-mime-type.mjs
  function validateMimeType(file, allowedTypes) {
    if (!allowedTypes) {
      return;
    }
    const isAllowedType = allowedTypes.some((allowedType) => {
      if (allowedType.includes("/")) {
        return allowedType === file.type;
      }
      return file.type.startsWith(`${allowedType}/`);
    });
    if (file.type && !isAllowedType) {
      throw new UploadError({
        code: "MIME_TYPE_NOT_SUPPORTED",
        message: (0, import_i18n2.sprintf)(
          // translators: %s: file name.
          (0, import_i18n2.__)("%s: Sorry, this file type is not supported here."),
          file.name
        ),
        file
      });
    }
  }

  // packages/upload-media/build-module/validate-mime-type-for-user.mjs
  var import_i18n3 = __toESM(require_i18n(), 1);

  // packages/upload-media/build-module/get-mime-types-array.mjs
  function getMimeTypesArray(wpMimeTypesObject) {
    if (!wpMimeTypesObject) {
      return null;
    }
    return Object.entries(wpMimeTypesObject).flatMap(
      ([extensionsString, mime]) => {
        const [type] = mime.split("/");
        const extensions = extensionsString.split("|");
        return [
          mime,
          ...extensions.map(
            (extension) => `${type}/${extension}`
          )
        ];
      }
    );
  }

  // packages/upload-media/build-module/validate-mime-type-for-user.mjs
  function validateMimeTypeForUser(file, wpAllowedMimeTypes) {
    const allowedMimeTypesForUser = getMimeTypesArray(wpAllowedMimeTypes);
    if (!allowedMimeTypesForUser) {
      return;
    }
    const isAllowedMimeTypeForUser = allowedMimeTypesForUser.includes(
      file.type
    );
    if (file.type && !isAllowedMimeTypeForUser) {
      throw new UploadError({
        code: "MIME_TYPE_NOT_ALLOWED_FOR_USER",
        message: (0, import_i18n3.sprintf)(
          // translators: %s: file name.
          (0, import_i18n3.__)(
            "%s: Sorry, you are not allowed to upload this file type."
          ),
          file.name
        ),
        file
      });
    }
  }

  // packages/upload-media/build-module/validate-file-size.mjs
  var import_i18n4 = __toESM(require_i18n(), 1);
  function validateFileSize(file, maxUploadFileSize) {
    if (file.size <= 0) {
      throw new UploadError({
        code: "EMPTY_FILE",
        message: (0, import_i18n4.sprintf)(
          // translators: %s: file name.
          (0, import_i18n4.__)("%s: This file is empty."),
          file.name
        ),
        file
      });
    }
    if (maxUploadFileSize && file.size > maxUploadFileSize) {
      throw new UploadError({
        code: "SIZE_ABOVE_LIMIT",
        message: (0, import_i18n4.sprintf)(
          // translators: %s: file name.
          (0, import_i18n4.__)(
            "%s: This file exceeds the maximum upload size for this site."
          ),
          file.name
        ),
        file
      });
    }
  }

  // packages/upload-media/build-module/store/actions.mjs
  function addItems({
    files,
    onChange,
    onSuccess,
    onError,
    onBatchSuccess,
    additionalData,
    allowedTypes
  }) {
    return async ({ select: select2, dispatch }) => {
      const batchId = v4_default();
      for (const file of files) {
        try {
          validateMimeType(file, allowedTypes);
          validateMimeTypeForUser(
            file,
            select2.getSettings().allowedMimeTypes
          );
        } catch (error) {
          onError?.(error);
          continue;
        }
        try {
          validateFileSize(
            file,
            select2.getSettings().maxUploadFileSize
          );
        } catch (error) {
          onError?.(error);
          continue;
        }
        dispatch.addItem({
          file,
          batchId,
          onChange,
          onSuccess,
          onBatchSuccess,
          onError,
          additionalData
        });
      }
    };
  }
  function cancelItem(id, error, silent = false) {
    return async ({ select: select2, dispatch }) => {
      const item = select2.getItem(id);
      if (!item) {
        return;
      }
      item.abortController?.abort();
      await vipsCancelOperations(id);
      if (!silent) {
        const { onError } = item;
        onError?.(error ?? new Error("Upload cancelled"));
        if (!onError && error) {
          console.error("Upload cancelled", error);
        }
      }
      dispatch({
        type: Type.Cancel,
        id,
        error
      });
      dispatch.removeItem(id);
      dispatch.revokeBlobUrls(id);
      if (item.batchId && select2.isBatchUploaded(item.batchId)) {
        item.onBatchSuccess?.();
      }
    };
  }
  function retryItem(id) {
    return async ({ select: select2, dispatch }) => {
      const item = select2.getItem(id);
      if (!item) {
        return;
      }
      if (!item.error) {
        return;
      }
      dispatch({
        type: Type.RetryItem,
        id
      });
      dispatch.processItem(id);
    };
  }

  // packages/upload-media/build-module/store/private-actions.mjs
  var private_actions_exports = {};
  __export(private_actions_exports, {
    addItem: () => addItem,
    addSideloadItem: () => addSideloadItem,
    finalizeItem: () => finalizeItem,
    finishOperation: () => finishOperation,
    generateThumbnails: () => generateThumbnails,
    getTranscodeImageOperation: () => getTranscodeImageOperation,
    pauseItem: () => pauseItem,
    pauseQueue: () => pauseQueue,
    prepareItem: () => prepareItem,
    processItem: () => processItem,
    removeItem: () => removeItem,
    resizeCropItem: () => resizeCropItem,
    resumeItemByPostId: () => resumeItemByPostId,
    resumeQueue: () => resumeQueue,
    revokeBlobUrls: () => revokeBlobUrls,
    rotateItem: () => rotateItem,
    sideloadItem: () => sideloadItem,
    transcodeImageItem: () => transcodeImageItem,
    updateItemProgress: () => updateItemProgress,
    updateSettings: () => updateSettings,
    uploadItem: () => uploadItem
  });
  var import_blob = __toESM(require_blob(), 1);

  // packages/upload-media/build-module/stub-file.mjs
  var StubFile = class extends File {
    constructor(fileName = "stub-file") {
      super([], fileName);
    }
  };

  // packages/upload-media/build-module/store/private-actions.mjs
  var DEFAULT_OUTPUT_QUALITY = 0.82;
  function shouldPauseForSideload(item, operation, select2) {
    if (operation !== OperationType.Upload || !item.parentId || !item.additionalData.post) {
      return false;
    }
    return select2.isUploadingToPost(item.additionalData.post);
  }
  function addItem({
    file: fileOrBlob,
    batchId,
    onChange,
    onSuccess,
    onBatchSuccess,
    onError,
    additionalData = {},
    sourceUrl,
    sourceAttachmentId,
    abortController,
    operations
  }) {
    return async ({ dispatch }) => {
      const itemId = v4_default();
      const file = convertBlobToFile(fileOrBlob);
      let blobUrl;
      if (!(file instanceof StubFile)) {
        blobUrl = (0, import_blob.createBlobURL)(file);
        dispatch({
          type: Type.CacheBlobUrl,
          id: itemId,
          blobUrl
        });
      }
      dispatch({
        type: Type.Add,
        item: {
          id: itemId,
          batchId,
          status: ItemStatus.Processing,
          sourceFile: cloneFile(file),
          file,
          attachment: {
            url: blobUrl
          },
          additionalData: {
            convert_format: false,
            generate_sub_sizes: false,
            ...additionalData
          },
          onChange,
          onSuccess,
          onBatchSuccess,
          onError,
          sourceUrl,
          sourceAttachmentId,
          abortController: abortController || new AbortController(),
          operations: Array.isArray(operations) ? operations : [OperationType.Prepare]
        }
      });
      dispatch.processItem(itemId);
    };
  }
  function addSideloadItem({
    file,
    onChange,
    additionalData,
    operations,
    batchId,
    parentId
  }) {
    return ({ dispatch }) => {
      const itemId = v4_default();
      dispatch({
        type: Type.Add,
        item: {
          id: itemId,
          batchId,
          status: ItemStatus.Processing,
          sourceFile: cloneFile(file),
          file,
          onChange,
          additionalData: {
            ...additionalData
          },
          parentId,
          operations: Array.isArray(operations) ? operations : [OperationType.Prepare],
          abortController: new AbortController()
        }
      });
      dispatch.processItem(itemId);
    };
  }
  function processItem(id) {
    return async ({ select: select2, dispatch }) => {
      if (select2.isPaused()) {
        return;
      }
      const item = select2.getItem(id);
      if (!item) {
        return;
      }
      const {
        attachment,
        onChange,
        onSuccess,
        onBatchSuccess,
        batchId,
        parentId
      } = item;
      const operation = Array.isArray(item.operations?.[0]) ? item.operations[0][0] : item.operations?.[0];
      const operationArgs = Array.isArray(item.operations?.[0]) ? item.operations[0][1] : void 0;
      if (shouldPauseForSideload(item, operation, select2)) {
        dispatch({
          type: Type.PauseItem,
          id
        });
        return;
      }
      if (operation === OperationType.Upload) {
        const settings = select2.getSettings();
        const activeCount = select2.getActiveUploadCount();
        if (activeCount >= settings.maxConcurrentUploads) {
          return;
        }
      }
      if (operation === OperationType.ResizeCrop || operation === OperationType.Rotate) {
        const settings = select2.getSettings();
        const activeCount = select2.getActiveImageProcessingCount();
        if (activeCount >= settings.maxConcurrentImageProcessing) {
          return;
        }
      }
      if (attachment) {
        onChange?.([attachment]);
      }
      if (!operation) {
        if (parentId || !parentId && !select2.hasPendingItemsByParentId(id)) {
          if (attachment) {
            onSuccess?.([attachment]);
          }
          dispatch.removeItem(id);
          dispatch.revokeBlobUrls(id);
          if (batchId && select2.isBatchUploaded(batchId)) {
            onBatchSuccess?.();
          }
        }
        if (parentId && batchId && select2.isBatchUploaded(batchId)) {
          const parentItem = select2.getItem(parentId);
          if (!parentItem) {
            return;
          }
          if (parentItem.operations && parentItem.operations.length > 0) {
            dispatch.processItem(parentId);
            return;
          }
          if (attachment) {
            parentItem.onSuccess?.([attachment]);
          }
          dispatch.removeItem(parentId);
          dispatch.revokeBlobUrls(parentId);
          if (parentItem.batchId && select2.isBatchUploaded(parentItem.batchId)) {
            parentItem.onBatchSuccess?.();
          }
        }
        return;
      }
      if (operation === OperationType.Finalize && select2.hasPendingItemsByParentId(id)) {
        return;
      }
      dispatch({
        type: Type.OperationStart,
        id,
        operation
      });
      switch (operation) {
        case OperationType.Prepare:
          dispatch.prepareItem(item.id);
          break;
        case OperationType.ResizeCrop:
          dispatch.resizeCropItem(
            item.id,
            operationArgs
          );
          break;
        case OperationType.Rotate:
          dispatch.rotateItem(
            item.id,
            operationArgs
          );
          break;
        case OperationType.TranscodeImage:
          dispatch.transcodeImageItem(
            item.id,
            operationArgs
          );
          break;
        case OperationType.Upload:
          if (item.parentId) {
            dispatch.sideloadItem(id);
          } else {
            dispatch.uploadItem(id);
          }
          break;
        case OperationType.ThumbnailGeneration:
          dispatch.generateThumbnails(id);
          break;
        case OperationType.Finalize:
          dispatch.finalizeItem(id);
          break;
      }
    };
  }
  function pauseQueue() {
    return {
      type: Type.PauseQueue
    };
  }
  function resumeQueue() {
    return async ({ select: select2, dispatch }) => {
      dispatch({
        type: Type.ResumeQueue
      });
      for (const item of select2.getAllItems()) {
        dispatch.processItem(item.id);
      }
    };
  }
  function pauseItem(id) {
    return async ({ dispatch }) => {
      dispatch({
        type: Type.PauseItem,
        id
      });
    };
  }
  function resumeItemByPostId(postOrAttachmentId) {
    return async ({ select: select2, dispatch }) => {
      const item = select2.getPausedUploadForPost(postOrAttachmentId);
      if (item) {
        dispatch({
          type: Type.ResumeItem,
          id: item.id
        });
        dispatch.processItem(item.id);
      }
    };
  }
  function removeItem(id) {
    return async ({ select: select2, dispatch }) => {
      const item = select2.getItem(id);
      if (!item) {
        return;
      }
      dispatch({
        type: Type.Remove,
        id
      });
      if (select2.getAllItems().length === 0) {
        terminateVipsWorker();
      }
    };
  }
  function finishOperation(id, updates) {
    return async ({ select: select2, dispatch }) => {
      const item = select2.getItem(id);
      const previousOperation = item?.currentOperation;
      dispatch({
        type: Type.OperationFinish,
        id,
        item: updates
      });
      dispatch.processItem(id);
      if (previousOperation === OperationType.Upload) {
        const pendingUploads = select2.getPendingUploads();
        for (const pendingItem of pendingUploads) {
          dispatch.processItem(pendingItem.id);
        }
      }
      if (previousOperation === OperationType.ResizeCrop || previousOperation === OperationType.Rotate) {
        const pendingItems = select2.getPendingImageProcessing();
        for (const pendingItem of pendingItems) {
          dispatch.processItem(pendingItem.id);
        }
      }
    };
  }
  var VALID_IMAGE_FORMATS = ["jpeg", "webp", "avif", "png", "gif"];
  function isValidImageFormat(format) {
    return VALID_IMAGE_FORMATS.includes(format);
  }
  function getInterlacedSetting(outputMimeType, settings) {
    switch (outputMimeType) {
      case "image/jpeg":
        return settings.jpegInterlaced ?? false;
      case "image/png":
        return settings.pngInterlaced ?? false;
      case "image/gif":
        return settings.gifInterlaced ?? false;
      default:
        return false;
    }
  }
  async function getTranscodeImageOperation(file, outputMimeType, settings) {
    if (file.type === "image/png" && outputMimeType === "image/jpeg") {
      const blobUrl = (0, import_blob.createBlobURL)(file);
      try {
        const hasAlpha = await vipsHasTransparency(blobUrl);
        if (hasAlpha) {
          return null;
        }
      } catch {
        return null;
      } finally {
        (0, import_blob.revokeBlobURL)(blobUrl);
      }
    }
    const formatPart = outputMimeType.split("/")[1];
    if (!isValidImageFormat(formatPart)) {
      return null;
    }
    return [
      OperationType.TranscodeImage,
      {
        outputFormat: formatPart,
        outputQuality: DEFAULT_OUTPUT_QUALITY,
        interlaced: getInterlacedSetting(outputMimeType, settings)
      }
    ];
  }
  function prepareItem(id) {
    return async ({ select: select2, dispatch }) => {
      const item = select2.getItem(id);
      if (!item) {
        return;
      }
      const { file } = item;
      const operations = [];
      const settings = select2.getSettings();
      const isImage = file.type.startsWith("image/");
      const isVipsSupported = CLIENT_SIDE_SUPPORTED_MIME_TYPES.includes(
        file.type
      );
      if (isImage && isVipsSupported) {
        const { imageOutputFormats } = settings;
        const outputMimeType = imageOutputFormats?.[file.type];
        if (outputMimeType && outputMimeType !== file.type) {
          const transcodeOperation = await getTranscodeImageOperation(
            file,
            outputMimeType,
            settings
          );
          if (transcodeOperation) {
            operations.push(transcodeOperation);
          }
        }
        operations.push(
          OperationType.Upload,
          OperationType.ThumbnailGeneration,
          OperationType.Finalize
        );
      } else {
        operations.push(OperationType.Upload);
      }
      dispatch({
        type: Type.AddOperations,
        id,
        operations
      });
      const updates = !isVipsSupported || !isImage ? {
        additionalData: {
          ...item.additionalData,
          generate_sub_sizes: true,
          convert_format: true
        }
      } : {};
      dispatch.finishOperation(id, updates);
    };
  }
  function uploadItem(id) {
    return async ({ select: select2, dispatch }) => {
      const item = select2.getItem(id);
      if (!item) {
        return;
      }
      select2.getSettings().mediaUpload({
        filesList: [item.file],
        additionalData: item.additionalData,
        signal: item.abortController?.signal,
        onFileChange: ([attachment]) => {
          if (attachment && !(0, import_blob.isBlobURL)(attachment.url)) {
            dispatch.finishOperation(id, {
              attachment
            });
          }
        },
        onSuccess: ([attachment]) => {
          dispatch.finishOperation(id, {
            attachment
          });
        },
        onError: (error) => {
          dispatch.cancelItem(id, error);
        }
      });
    };
  }
  function sideloadItem(id) {
    return async ({ select: select2, dispatch }) => {
      const item = select2.getItem(id);
      if (!item) {
        return;
      }
      const { post, ...additionalData } = item.additionalData;
      const mediaSideload = select2.getSettings().mediaSideload;
      if (!mediaSideload) {
        dispatch.finishOperation(id, {});
        return;
      }
      mediaSideload({
        file: item.file,
        attachmentId: post,
        additionalData,
        signal: item.abortController?.signal,
        onFileChange: ([attachment]) => {
          dispatch.finishOperation(id, { attachment });
          dispatch.resumeItemByPostId(post);
        },
        onError: (error) => {
          dispatch.cancelItem(id, error);
          dispatch.resumeItemByPostId(post);
        }
      });
    };
  }
  function resizeCropItem(id, args) {
    return async ({ select: select2, dispatch }) => {
      const item = select2.getItem(id);
      if (!item) {
        return;
      }
      if (!args?.resize) {
        dispatch.finishOperation(id, {
          file: item.file
        });
        return;
      }
      const addSuffix = Boolean(item.parentId);
      const scaledSuffix = Boolean(args.isThresholdResize);
      try {
        const file = await vipsResizeImage(
          item.id,
          item.file,
          args.resize,
          false,
          // smartCrop
          addSuffix,
          item.abortController?.signal,
          scaledSuffix
        );
        const blobUrl = (0, import_blob.createBlobURL)(file);
        dispatch({
          type: Type.CacheBlobUrl,
          id,
          blobUrl
        });
        dispatch.finishOperation(id, {
          file,
          attachment: {
            url: blobUrl
          }
        });
      } catch (error) {
        dispatch.cancelItem(
          id,
          new UploadError({
            code: "IMAGE_TRANSCODING_ERROR",
            message: "File could not be uploaded",
            file: item.file,
            cause: error instanceof Error ? error : void 0
          })
        );
      }
    };
  }
  function rotateItem(id, args) {
    return async ({ select: select2, dispatch }) => {
      const item = select2.getItem(id);
      if (!item) {
        return;
      }
      if (!args?.orientation || args.orientation === 1) {
        dispatch.finishOperation(id, {
          file: item.file
        });
        return;
      }
      try {
        const file = await vipsRotateImage(
          item.id,
          item.file,
          args.orientation,
          item.abortController?.signal
        );
        const blobUrl = (0, import_blob.createBlobURL)(file);
        dispatch({
          type: Type.CacheBlobUrl,
          id,
          blobUrl
        });
        dispatch.finishOperation(id, {
          file,
          attachment: {
            url: blobUrl
          }
        });
      } catch (error) {
        dispatch.cancelItem(
          id,
          new UploadError({
            code: "IMAGE_ROTATION_ERROR",
            message: "Image could not be rotated",
            file: item.file,
            cause: error instanceof Error ? error : void 0
          })
        );
      }
    };
  }
  function transcodeImageItem(id, args) {
    return async ({ select: select2, dispatch }) => {
      const item = select2.getItem(id);
      if (!item) {
        return;
      }
      if (!args?.outputFormat) {
        dispatch.finishOperation(id, {
          file: item.file
        });
        return;
      }
      const outputMimeType = `image/${args.outputFormat}`;
      const quality = args.outputQuality ?? DEFAULT_OUTPUT_QUALITY;
      const interlaced = args.interlaced ?? false;
      try {
        const file = await vipsConvertImageFormat(
          item.id,
          item.file,
          outputMimeType,
          quality,
          interlaced
        );
        const blobUrl = (0, import_blob.createBlobURL)(file);
        dispatch({
          type: Type.CacheBlobUrl,
          id,
          blobUrl
        });
        dispatch.finishOperation(id, {
          file,
          attachment: {
            url: blobUrl
          }
        });
      } catch (error) {
        dispatch.cancelItem(
          id,
          new UploadError({
            code: "MEDIA_TRANSCODING_ERROR",
            message: "Image could not be transcoded to the target format",
            file: item.file,
            cause: error instanceof Error ? error : void 0
          })
        );
      }
    };
  }
  function generateThumbnails(id) {
    return async ({ select: select2, dispatch }) => {
      const item = select2.getItem(id);
      if (!item) {
        return;
      }
      if (!item.attachment) {
        dispatch.finishOperation(id, {});
        return;
      }
      const attachment = item.attachment;
      const needsRotation = attachment.exif_orientation && attachment.exif_orientation !== 1 && !item.file.name.includes("-scaled");
      if (needsRotation && attachment.id) {
        try {
          const rotatedFile = await vipsRotateImage(
            item.id,
            item.sourceFile,
            attachment.exif_orientation,
            item.abortController?.signal
          );
          dispatch.addSideloadItem({
            file: rotatedFile,
            batchId: v4_default(),
            parentId: item.id,
            additionalData: {
              post: attachment.id,
              image_size: "original",
              convert_format: false
            },
            operations: [OperationType.Upload]
          });
        } catch {
          console.warn(
            "Failed to rotate image, continuing with thumbnails"
          );
        }
      }
      if (!item.parentId && attachment.missing_image_sizes && attachment.missing_image_sizes.length > 0) {
        const settings = select2.getSettings();
        const allImageSizes = settings.allImageSizes || {};
        const sizesToGenerate = attachment.missing_image_sizes;
        const file = attachment.filename ? renameFile(item.sourceFile, attachment.filename) : item.sourceFile;
        const batchId = v4_default();
        const { imageOutputFormats } = settings;
        const sourceType = item.sourceFile.type;
        const outputMimeType = imageOutputFormats?.[sourceType];
        let thumbnailTranscodeOperation = null;
        if (outputMimeType && outputMimeType !== sourceType) {
          thumbnailTranscodeOperation = await getTranscodeImageOperation(
            item.sourceFile,
            outputMimeType,
            settings
          );
        }
        for (const name of sizesToGenerate) {
          const imageSize = allImageSizes[name];
          if (!imageSize) {
            console.warn(
              `Image size "${name}" not found in configuration`
            );
            continue;
          }
          const thumbnailOperations = [
            [OperationType.ResizeCrop, { resize: imageSize }]
          ];
          if (thumbnailTranscodeOperation) {
            thumbnailOperations.push(thumbnailTranscodeOperation);
          }
          thumbnailOperations.push(OperationType.Upload);
          dispatch.addSideloadItem({
            file,
            onChange: ([updatedAttachment]) => {
              if ((0, import_blob.isBlobURL)(updatedAttachment.url)) {
                return;
              }
              item.onChange?.([updatedAttachment]);
            },
            batchId,
            parentId: item.id,
            additionalData: {
              // Sideloading does not use the parent post ID but the
              // attachment ID as the image sizes need to be added to it.
              post: attachment.id,
              image_size: name,
              convert_format: false
            },
            operations: thumbnailOperations
          });
        }
        const { bigImageSizeThreshold } = settings;
        if (bigImageSizeThreshold && attachment.id) {
          const bitmap = await createImageBitmap(item.sourceFile);
          const needsScaling = bitmap.width > bigImageSizeThreshold || bitmap.height > bigImageSizeThreshold;
          bitmap.close();
          if (needsScaling) {
            const sourceForScaled = attachment.filename ? renameFile(item.sourceFile, attachment.filename) : item.sourceFile;
            const scaledOperations = [
              [
                OperationType.ResizeCrop,
                {
                  resize: {
                    width: bigImageSizeThreshold,
                    height: bigImageSizeThreshold
                  },
                  isThresholdResize: true
                }
              ]
            ];
            if (thumbnailTranscodeOperation) {
              scaledOperations.push(thumbnailTranscodeOperation);
            }
            scaledOperations.push(OperationType.Upload);
            dispatch.addSideloadItem({
              file: sourceForScaled,
              onChange: ([updatedAttachment]) => {
                if ((0, import_blob.isBlobURL)(updatedAttachment.url)) {
                  return;
                }
                item.onChange?.([updatedAttachment]);
              },
              batchId,
              parentId: item.id,
              additionalData: {
                post: attachment.id,
                image_size: "scaled",
                convert_format: false
              },
              operations: scaledOperations
            });
          }
        }
      }
      dispatch.finishOperation(id, {});
    };
  }
  function finalizeItem(id) {
    return async ({ select: select2, dispatch }) => {
      const item = select2.getItem(id);
      if (!item) {
        return;
      }
      const attachment = item.attachment;
      const { mediaFinalize } = select2.getSettings();
      if (attachment?.id && mediaFinalize) {
        try {
          await mediaFinalize(attachment.id);
        } catch (error) {
          console.warn("Media finalization failed:", error);
        }
      }
      dispatch.finishOperation(id, {});
    };
  }
  function revokeBlobUrls(id) {
    return async ({ select: select2, dispatch }) => {
      const blobUrls = select2.getBlobUrls(id);
      for (const blobUrl of blobUrls) {
        (0, import_blob.revokeBlobURL)(blobUrl);
      }
      dispatch({
        type: Type.RevokeBlobUrls,
        id
      });
    };
  }
  function updateItemProgress(id, progress) {
    return async ({ dispatch }) => {
      dispatch({
        type: Type.UpdateProgress,
        id,
        progress
      });
    };
  }
  function updateSettings(settings) {
    return {
      type: Type.UpdateSettings,
      settings
    };
  }

  // packages/upload-media/build-module/lock-unlock.mjs
  var import_private_apis = __toESM(require_private_apis(), 1);
  var { lock, unlock } = (0, import_private_apis.__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/upload-media"
  );

  // packages/upload-media/build-module/store/index.mjs
  var storeConfig = {
    reducer: reducer_default,
    selectors: selectors_exports,
    actions: actions_exports
  };
  var store = (0, import_data.createReduxStore)(STORE_NAME, {
    reducer: reducer_default,
    selectors: selectors_exports,
    actions: actions_exports
  });
  if (!(0, import_data.select)(store)) {
    (0, import_data.register)(store);
  }
  unlock(store).registerPrivateActions(private_actions_exports);
  unlock(store).registerPrivateSelectors(private_selectors_exports);

  // packages/upload-media/build-module/components/provider/index.mjs
  var import_element2 = __toESM(require_element(), 1);
  var import_data3 = __toESM(require_data(), 1);

  // packages/upload-media/build-module/components/provider/with-registry-provider.mjs
  var import_element = __toESM(require_element(), 1);
  var import_data2 = __toESM(require_data(), 1);
  var import_compose = __toESM(require_compose(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  function getSubRegistry(subRegistries, registry, useSubRegistry) {
    if (!useSubRegistry) {
      return registry;
    }
    let subRegistry = subRegistries.get(registry);
    if (!subRegistry) {
      subRegistry = (0, import_data2.createRegistry)({}, registry);
      subRegistry.registerStore(STORE_NAME, storeConfig);
      subRegistries.set(registry, subRegistry);
    }
    return subRegistry;
  }
  var withRegistryProvider = (0, import_compose.createHigherOrderComponent)(
    (WrappedComponent) => ({ useSubRegistry = true, ...props }) => {
      const registry = (0, import_data2.useRegistry)();
      const [subRegistries] = (0, import_element.useState)(() => /* @__PURE__ */ new WeakMap());
      const subRegistry = getSubRegistry(
        subRegistries,
        registry,
        useSubRegistry
      );
      if (subRegistry === registry) {
        return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(WrappedComponent, { registry, ...props });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_data2.RegistryProvider, { value: subRegistry, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(WrappedComponent, { registry: subRegistry, ...props }) });
    },
    "withRegistryProvider"
  );
  var with_registry_provider_default = withRegistryProvider;

  // packages/upload-media/build-module/components/provider/index.mjs
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  var MediaUploadProvider = with_registry_provider_default((props) => {
    const { children, settings } = props;
    const { updateSettings: updateSettings2 } = unlock((0, import_data3.useDispatch)(store));
    (0, import_element2.useEffect)(() => {
      updateSettings2(settings);
    }, [settings, updateSettings2]);
    return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children });
  });
  var provider_default = MediaUploadProvider;

  // packages/upload-media/build-module/feature-detection.mjs
  var cachedResult = null;
  function detectClientSideMediaSupport() {
    if (cachedResult !== null) {
      return cachedResult;
    }
    if (typeof WebAssembly === "undefined") {
      cachedResult = {
        supported: false,
        reason: "WebAssembly is not supported in this browser."
      };
      return cachedResult;
    }
    if (typeof SharedArrayBuffer === "undefined") {
      cachedResult = {
        supported: false,
        reason: "SharedArrayBuffer is not available. This may be due to missing cross-origin isolation headers."
      };
      return cachedResult;
    }
    if (typeof Worker === "undefined") {
      cachedResult = {
        supported: false,
        reason: "Web Workers are not supported in this browser."
      };
      return cachedResult;
    }
    if (typeof navigator !== "undefined" && "deviceMemory" in navigator && navigator.deviceMemory <= 2) {
      cachedResult = {
        supported: false,
        reason: "Device has insufficient memory for client-side media processing."
      };
      return cachedResult;
    }
    if (typeof navigator !== "undefined" && "hardwareConcurrency" in navigator && navigator.hardwareConcurrency < 2) {
      cachedResult = {
        supported: false,
        reason: "Device has insufficient CPU cores for client-side media processing."
      };
      return cachedResult;
    }
    if (typeof navigator !== "undefined") {
      const connection = navigator.connection;
      if (connection) {
        if (connection.saveData) {
          cachedResult = {
            supported: false,
            reason: "Data saver mode is enabled."
          };
          return cachedResult;
        }
        if (connection.effectiveType === "slow-2g" || connection.effectiveType === "2g") {
          cachedResult = {
            supported: false,
            reason: "Network connection is too slow for client-side media processing."
          };
          return cachedResult;
        }
      }
    }
    if (typeof window !== "undefined") {
      try {
        const testBlob = new Blob([""], {
          type: "application/javascript"
        });
        const testUrl = URL.createObjectURL(testBlob);
        try {
          const testWorker = new Worker(testUrl);
          testWorker.terminate();
        } finally {
          URL.revokeObjectURL(testUrl);
        }
      } catch {
        cachedResult = {
          supported: false,
          reason: "The site's Content Security Policy (CSP) does not allow blob: workers. The worker-src directive must include blob: to enable client-side media processing."
        };
        return cachedResult;
      }
    }
    cachedResult = { supported: true };
    return cachedResult;
  }
  function isClientSideMediaSupported() {
    return detectClientSideMediaSupport().supported;
  }
  function clearFeatureDetectionCache() {
    cachedResult = null;
  }
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                                                      dist/theme.js                                                                                       0000644                 00000377227 15212564037 0007176 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var wp;
(wp ||= {}).theme = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to2, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to2, key) && key !== except)
          __defProp(to2, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to2;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/private-apis
  var require_private_apis = __commonJS({
    "package-external:@wordpress/private-apis"(exports, module) {
      module.exports = window.wp.privateApis;
    }
  });

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // packages/theme/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    privateApis: () => privateApis
  });

  // packages/theme/build-module/lock-unlock.mjs
  var import_private_apis = __toESM(require_private_apis(), 1);
  var { lock, unlock } = (0, import_private_apis.__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/theme"
  );

  // packages/theme/build-module/theme-provider.mjs
  var import_element3 = __toESM(require_element(), 1);

  // packages/theme/build-module/context.mjs
  var import_element = __toESM(require_element(), 1);
  var ThemeContext = (0, import_element.createContext)({
    resolvedSettings: {
      color: {}
    }
  });

  // packages/theme/node_modules/colorjs.io/src/multiply-matrices.js
  function dot3(a, b2) {
    return a[0] * b2[0] + a[1] * b2[1] + a[2] * b2[2];
  }
  function multiply_v3_m3x3(input, matrix, out = [0, 0, 0]) {
    const x = dot3(input, matrix[0]);
    const y = dot3(input, matrix[1]);
    const z = dot3(input, matrix[2]);
    out[0] = x;
    out[1] = y;
    out[2] = z;
    return out;
  }

  // packages/theme/node_modules/colorjs.io/src/util.js
  function isString(str) {
    return type(str) === "string";
  }
  function type(o) {
    let str = Object.prototype.toString.call(o);
    return (str.match(/^\[object\s+(.*?)\]$/)[1] || "").toLowerCase();
  }
  function serializeNumber(n2, { precision = 16, unit }) {
    if (isNone(n2)) {
      return "none";
    }
    n2 = +toPrecision(n2, precision);
    return n2 + (unit ?? "");
  }
  function isNone(n2) {
    return n2 === null;
  }
  function toPrecision(n2, precision) {
    if (n2 === 0) {
      return 0;
    }
    let integer = ~~n2;
    let digits = 0;
    if (integer && precision) {
      digits = ~~Math.log10(Math.abs(integer)) + 1;
    }
    const multiplier = 10 ** (precision - digits);
    return Math.floor(n2 * multiplier + 0.5) / multiplier;
  }
  function interpolate(start, end, p2) {
    if (isNaN(start)) {
      return end;
    }
    if (isNaN(end)) {
      return start;
    }
    return start + (end - start) * p2;
  }
  function interpolateInv(start, end, value) {
    return (value - start) / (end - start);
  }
  function mapRange(from, to2, value) {
    if (!from || !to2 || from === to2 || from[0] === to2[0] && from[1] === to2[1] || isNaN(value) || value === null) {
      return value;
    }
    return interpolate(to2[0], to2[1], interpolateInv(from[0], from[1], value));
  }
  function clamp(min, val, max) {
    return Math.max(Math.min(max, val), min);
  }
  function copySign(to2, from) {
    return Math.sign(to2) === Math.sign(from) ? to2 : -to2;
  }
  function spow(base, exp) {
    return copySign(Math.abs(base) ** exp, base);
  }
  function zdiv(n2, d2) {
    return d2 === 0 ? 0 : n2 / d2;
  }
  function bisectLeft(arr, value, lo = 0, hi = arr.length) {
    while (lo < hi) {
      const mid = lo + hi >> 1;
      if (arr[mid] < value) {
        lo = mid + 1;
      } else {
        hi = mid;
      }
    }
    return lo;
  }
  function isInstance(arg, constructor) {
    if (arg instanceof constructor) {
      return true;
    }
    const targetName = constructor.name;
    while (arg) {
      const proto = Object.getPrototypeOf(arg);
      const constructorName = proto?.constructor?.name;
      if (constructorName === targetName) {
        return true;
      }
      if (!constructorName || constructorName === "Object") {
        return false;
      }
      arg = proto;
    }
    return false;
  }

  // packages/theme/node_modules/colorjs.io/src/Type.js
  var Type = class {
    // Class properties - declared here so that type inference works
    type;
    coordMeta;
    coordRange;
    /** @type {[number, number]} */
    range;
    /**
     * @param {any} type
     * @param {import("./types.js").CoordMeta} coordMeta
     */
    constructor(type2, coordMeta) {
      if (typeof type2 === "object") {
        this.coordMeta = type2;
      }
      if (coordMeta) {
        this.coordMeta = coordMeta;
        this.coordRange = coordMeta.range ?? coordMeta.refRange;
      }
      if (typeof type2 === "string") {
        let params = type2.trim().match(/^(?<type><[a-z]+>)(\[(?<min>-?[.\d]+),\s*(?<max>-?[.\d]+)\])?$/);
        if (!params) {
          throw new TypeError(`Cannot parse ${type2} as a type definition.`);
        }
        this.type = params.groups.type;
        let { min, max } = params.groups;
        if (min || max) {
          this.range = [+min, +max];
        }
      }
    }
    /** @returns {[number, number]} */
    get computedRange() {
      if (this.range) {
        return this.range;
      }
      if (this.type === "<percentage>") {
        return this.percentageRange();
      } else if (this.type === "<angle>") {
        return [0, 360];
      }
      return null;
    }
    get unit() {
      if (this.type === "<percentage>") {
        return "%";
      } else if (this.type === "<angle>") {
        return "deg";
      }
      return "";
    }
    /**
     * Map a number to the internal representation
     * @param {number} number
     */
    resolve(number) {
      if (this.type === "<angle>") {
        return number;
      }
      let fromRange = this.computedRange;
      let toRange = this.coordRange;
      if (this.type === "<percentage>") {
        toRange ??= this.percentageRange();
      }
      return mapRange(fromRange, toRange, number);
    }
    /**
     * Serialize a number from the internal representation to a string
     * @param {number} number
     * @param {number} [precision]
     */
    serialize(number, precision) {
      let toRange = this.type === "<percentage>" ? this.percentageRange(100) : this.computedRange;
      let unit = this.unit;
      number = mapRange(this.coordRange, toRange, number);
      return serializeNumber(number, { unit, precision });
    }
    toString() {
      let ret = this.type;
      if (this.range) {
        let [min = "", max = ""] = this.range;
        ret += `[${min},${max}]`;
      }
      return ret;
    }
    /**
     * Returns a percentage range for values of this type
     * @param {number} scale
     * @returns {[number, number]}
     */
    percentageRange(scale = 1) {
      let range;
      if (this.coordMeta && this.coordMeta.range || this.coordRange && this.coordRange[0] >= 0) {
        range = [0, 1];
      } else {
        range = [-1, 1];
      }
      return [range[0] * scale, range[1] * scale];
    }
    static get(type2, coordMeta) {
      if (isInstance(type2, this)) {
        return type2;
      }
      return new this(type2, coordMeta);
    }
  };

  // packages/theme/node_modules/colorjs.io/src/Format.js
  var instance = /* @__PURE__ */ Symbol("instance");
  var Format = class _Format {
    // Class properties - declared here so that type inference works
    type;
    name;
    spaceCoords;
    /** @type {Type[][]} */
    coords;
    /** @type {string | undefined} */
    id;
    /** @type {boolean | undefined} */
    alpha;
    /**
     * @param {FormatInterface} format
     * @param {ColorSpace} space
     */
    constructor(format, space = format.space) {
      format[instance] = this;
      this.type = "function";
      this.name = "color";
      Object.assign(this, format);
      this.space = space;
      if (this.type === "custom") {
        return;
      }
      this.spaceCoords = Object.values(space.coords);
      if (!this.coords) {
        this.coords = this.spaceCoords.map((coordMeta) => {
          let ret = ["<number>", "<percentage>"];
          if (coordMeta.type === "angle") {
            ret.push("<angle>");
          }
          return ret;
        });
      }
      this.coords = this.coords.map(
        /** @param {string | string[] | Type[]} types */
        (types, i) => {
          let coordMeta = this.spaceCoords[i];
          if (typeof types === "string") {
            types = types.trim().split(/\s*\|\s*/);
          }
          return types.map((type2) => Type.get(type2, coordMeta));
        }
      );
    }
    /**
     * @param {Coords} coords
     * @param {number} precision
     * @param {Type[]} types
     */
    serializeCoords(coords, precision, types) {
      types = coords.map((_, i) => Type.get(types?.[i] ?? this.coords[i][0], this.spaceCoords[i]));
      return coords.map((c, i) => types[i].serialize(c, precision));
    }
    /**
     * Validates the coordinates of a color against a format's coord grammar and
     * maps the coordinates to the range or refRange of the coordinates.
     * @param {Coords} coords
     * @param {[string, string, string]} types
     */
    coerceCoords(coords, types) {
      return Object.entries(this.space.coords).map(([id, coordMeta], i) => {
        let arg = coords[i];
        if (isNone(arg) || isNaN(arg)) {
          return arg;
        }
        let providedType = types[i];
        let type2 = this.coords[i].find((c) => c.type == providedType);
        if (!type2) {
          let coordName = coordMeta.name || id;
          throw new TypeError(
            `${providedType ?? /** @type {any} */
            arg?.raw ?? arg} not allowed for ${coordName} in ${this.name}()`
          );
        }
        arg = type2.resolve(arg);
        if (type2.range) {
          types[i] = type2.toString();
        }
        return arg;
      });
    }
    /**
     * @returns {boolean | Required<FormatInterface>["serialize"]}
     */
    canSerialize() {
      return this.type === "function" || /** @type {any} */
      this.serialize;
    }
    /**
     * @param {string} str
     * @returns {(import("./types.js").ColorConstructor) | undefined | null}
     */
    parse(str) {
      return null;
    }
    /**
     * @param {Format | FormatInterface} format
     * @param {RemoveFirstElement<ConstructorParameters<typeof Format>>} args
     * @returns {Format}
     */
    static get(format, ...args) {
      if (!format || isInstance(format, this)) {
        return (
          /** @type {Format} */
          format
        );
      }
      if (format[instance]) {
        return format[instance];
      }
      return new _Format(format, ...args);
    }
  };

  // packages/theme/node_modules/colorjs.io/src/hooks.js
  var Hooks = class {
    add(name, callback, first) {
      if (typeof arguments[0] != "string") {
        for (var name in arguments[0]) {
          this.add(name, arguments[0][name], arguments[1]);
        }
        return;
      }
      (Array.isArray(name) ? name : [name]).forEach(function(name2) {
        this[name2] = this[name2] || [];
        if (callback) {
          this[name2][first ? "unshift" : "push"](callback);
        }
      }, this);
    }
    run(name, env) {
      this[name] = this[name] || [];
      this[name].forEach(function(callback) {
        callback.call(env && env.context ? env.context : env, env);
      });
    }
  };
  var hooks = new Hooks();
  var hooks_default = hooks;

  // packages/theme/node_modules/colorjs.io/src/adapt.js
  var WHITES = {
    // for compatibility, the four-digit chromaticity-derived ones everyone else uses
    D50: [0.3457 / 0.3585, 1, (1 - 0.3457 - 0.3585) / 0.3585],
    D65: [0.3127 / 0.329, 1, (1 - 0.3127 - 0.329) / 0.329]
  };
  function getWhite(name) {
    if (Array.isArray(name)) {
      return name;
    }
    return WHITES[name];
  }
  function adapt(W1, W2, XYZ, options = {}) {
    W1 = getWhite(W1);
    W2 = getWhite(W2);
    if (!W1 || !W2) {
      throw new TypeError(
        `Missing white point to convert ${!W1 ? "from" : ""}${!W1 && !W2 ? "/" : ""}${!W2 ? "to" : ""}`
      );
    }
    if (W1 === W2) {
      return XYZ;
    }
    let env = { W1, W2, XYZ, options };
    hooks_default.run("chromatic-adaptation-start", env);
    if (!env.M) {
      if (env.W1 === WHITES.D65 && env.W2 === WHITES.D50) {
        env.M = [
          [1.0479297925449969, 0.022946870601609652, -0.05019226628920524],
          [0.02962780877005599, 0.9904344267538799, -0.017073799063418826],
          [-0.009243040646204504, 0.015055191490298152, 0.7518742814281371]
        ];
      } else if (env.W1 === WHITES.D50 && env.W2 === WHITES.D65) {
        env.M = [
          [0.955473421488075, -0.02309845494876471, 0.06325924320057072],
          [-0.0283697093338637, 1.0099953980813041, 0.021041441191917323],
          [0.012314014864481998, -0.020507649298898964, 1.330365926242124]
        ];
      }
    }
    hooks_default.run("chromatic-adaptation-end", env);
    if (env.M) {
      return multiply_v3_m3x3(env.XYZ, env.M);
    } else {
      throw new TypeError("Only Bradford CAT with white points D50 and D65 supported for now.");
    }
  }

  // packages/theme/node_modules/colorjs.io/src/defaults.js
  var defaults_default = {
    gamut_mapping: "css",
    precision: 5,
    deltaE: "76",
    // Default deltaE method
    verbose: globalThis?.process?.env?.NODE_ENV?.toLowerCase() !== "test",
    warn: function warn(msg) {
      if (this.verbose) {
        globalThis?.console?.warn?.(msg);
      }
    }
  };

  // packages/theme/node_modules/colorjs.io/src/parse.js
  function parse(str, options) {
    let env = {
      str: String(str)?.trim(),
      options
    };
    hooks_default.run("parse-start", env);
    if (env.color) {
      return env.color;
    }
    env.parsed = parseFunction(env.str);
    let ret;
    let meta = env.options ? env.options.parseMeta ?? env.options.meta : null;
    if (env.parsed) {
      let name = env.parsed.name;
      let format;
      let space;
      let coords = env.parsed.args;
      let types = coords.map((c, i) => env.parsed.argMeta[i]?.type);
      if (name === "color") {
        let id = coords.shift();
        types.shift();
        let alternateId = id.startsWith("--") ? id.substring(2) : `--${id}`;
        let ids = [id, alternateId];
        format = ColorSpace.findFormat({ name, id: ids, type: "function" });
        if (!format) {
          let didYouMean;
          let registryId = id in ColorSpace.registry ? id : alternateId;
          if (registryId in ColorSpace.registry) {
            let cssId = ColorSpace.registry[registryId].formats?.color?.id;
            if (cssId) {
              let altColor = str.replace("color(" + id, "color(" + cssId);
              didYouMean = `Did you mean ${altColor}?`;
            }
          }
          throw new TypeError(
            `Cannot parse ${env.str}. ` + (didYouMean ?? "Missing a plugin?")
          );
        }
        space = format.space;
        if (format.id.startsWith("--") && !id.startsWith("--")) {
          defaults_default.warn(
            `${space.name} is a non-standard space and not currently supported in the CSS spec. Use prefixed color(${format.id}) instead of color(${id}).`
          );
        }
        if (id.startsWith("--") && !format.id.startsWith("--")) {
          defaults_default.warn(
            `${space.name} is a standard space and supported in the CSS spec. Use color(${format.id}) instead of prefixed color(${id}).`
          );
        }
      } else {
        format = ColorSpace.findFormat({ name, type: "function" });
        space = format.space;
      }
      if (meta) {
        Object.assign(meta, {
          format,
          formatId: format.name,
          types,
          commas: env.parsed.commas
        });
      }
      let alpha = 1;
      if (env.parsed.lastAlpha) {
        alpha = env.parsed.args.pop();
        if (meta) {
          meta.alphaType = types.pop();
        }
      }
      let coordCount = format.coords.length;
      if (coords.length !== coordCount) {
        throw new TypeError(
          `Expected ${coordCount} coordinates for ${space.id} in ${env.str}), got ${coords.length}`
        );
      }
      coords = format.coerceCoords(coords, types);
      ret = { spaceId: space.id, coords, alpha };
    } else {
      spaceloop: for (let space of ColorSpace.all) {
        for (let formatId in space.formats) {
          let format = space.formats[formatId];
          if (format.type !== "custom") {
            continue;
          }
          if (format.test && !format.test(env.str)) {
            continue;
          }
          let formatObject = space.getFormat(format);
          let color = formatObject.parse(env.str);
          if (color) {
            if (meta) {
              Object.assign(meta, { format: formatObject, formatId });
            }
            ret = color;
            break spaceloop;
          }
        }
      }
    }
    if (!ret) {
      throw new TypeError(`Could not parse ${str} as a color. Missing a plugin?`);
    }
    ret.alpha = isNone(ret.alpha) ? ret.alpha : ret.alpha === void 0 ? 1 : clamp(0, ret.alpha, 1);
    return ret;
  }
  var units = {
    "%": 0.01,
    deg: 1,
    grad: 0.9,
    rad: 180 / Math.PI,
    turn: 360
  };
  var regex = {
    // Need to list calc(NaN) explicitly as otherwise its ending paren would terminate the function call
    function: /^([a-z]+)\(((?:calc\(NaN\)|.)+?)\)$/i,
    number: /^([-+]?(?:[0-9]*\.)?[0-9]+(e[-+]?[0-9]+)?)$/i,
    unitValue: RegExp(`(${Object.keys(units).join("|")})$`),
    // NOTE The -+ are not just for prefix, but also for idents, and e+N notation!
    singleArgument: /\/?\s*(none|NaN|calc\(NaN\)|[-+\w.]+(?:%|deg|g?rad|turn)?)/g
  };
  function parseArgument(rawArg) {
    let meta = {};
    let unit = rawArg.match(regex.unitValue)?.[0];
    let value = meta.raw = rawArg;
    if (unit) {
      meta.type = unit === "%" ? "<percentage>" : "<angle>";
      meta.unit = unit;
      meta.unitless = Number(value.slice(0, -unit.length));
      value = meta.unitless * units[unit];
    } else if (regex.number.test(value)) {
      value = Number(value);
      meta.type = "<number>";
    } else if (value === "none") {
      value = null;
    } else if (value === "NaN" || value === "calc(NaN)") {
      value = NaN;
      meta.type = "<number>";
    } else {
      meta.type = "<ident>";
    }
    return { value: (
      /** @type {number} */
      value
    ), meta: (
      /** @type {ArgumentMeta} */
      meta
    ) };
  }
  function parseFunction(str) {
    if (!str) {
      return;
    }
    str = str.trim();
    let parts = str.match(regex.function);
    if (parts) {
      let args = [];
      let argMeta = [];
      let lastAlpha = false;
      let name = parts[1].toLowerCase();
      let separators = parts[2].replace(regex.singleArgument, ($0, rawArg) => {
        let { value, meta } = parseArgument(rawArg);
        if (
          // If there's a slash here, it's modern syntax
          $0.startsWith("/") || // If there's still elements to process after there's already 3 in `args` (and the we're not dealing with "color()"), it's likely to be a legacy color like "hsl(0, 0%, 0%, 0.5)"
          name !== "color" && args.length === 3
        ) {
          lastAlpha = true;
        }
        args.push(value);
        argMeta.push(meta);
        return "";
      });
      return {
        name,
        args,
        argMeta,
        lastAlpha,
        commas: separators.includes(","),
        rawName: parts[1],
        rawArgs: parts[2]
      };
    }
  }

  // packages/theme/node_modules/colorjs.io/src/getColor.js
  function getColor(color, options) {
    if (Array.isArray(color)) {
      return color.map((c) => getColor(c, options));
    }
    if (!color) {
      throw new TypeError("Empty color reference");
    }
    if (isString(color)) {
      color = parse(color, options);
    }
    let space = color.space || color.spaceId;
    if (typeof space === "string") {
      color.space = ColorSpace.get(space);
    }
    if (color.alpha === void 0) {
      color.alpha = 1;
    }
    return color;
  }

  // packages/theme/node_modules/colorjs.io/src/ColorSpace.js
  var \u03B5 = 75e-6;
  var ColorSpace = class _ColorSpace {
    constructor(options) {
      this.id = options.id;
      this.name = options.name;
      this.base = options.base ? _ColorSpace.get(options.base) : null;
      this.aliases = options.aliases;
      if (this.base) {
        this.fromBase = options.fromBase;
        this.toBase = options.toBase;
      }
      let coords = options.coords ?? this.base.coords;
      for (let name in coords) {
        if (!("name" in coords[name])) {
          coords[name].name = name;
        }
      }
      this.coords = coords;
      let white4 = options.white ?? this.base.white ?? "D65";
      this.white = getWhite(white4);
      this.formats = options.formats ?? {};
      for (let name in this.formats) {
        let format = this.formats[name];
        format.type ||= "function";
        format.name ||= name;
      }
      if (!this.formats.color?.id) {
        this.formats.color = {
          ...this.formats.color ?? {},
          id: options.cssId || this.id
        };
      }
      if (options.gamutSpace) {
        this.gamutSpace = options.gamutSpace === "self" ? this : _ColorSpace.get(options.gamutSpace);
      } else {
        if (this.isPolar) {
          this.gamutSpace = this.base;
        } else {
          this.gamutSpace = this;
        }
      }
      if (this.gamutSpace.isUnbounded) {
        this.inGamut = (coords2, options2) => {
          return true;
        };
      }
      this.referred = options.referred;
      Object.defineProperty(this, "path", {
        value: getPath(this).reverse(),
        writable: false,
        enumerable: true,
        configurable: true
      });
      hooks_default.run("colorspace-init-end", this);
    }
    inGamut(coords, { epsilon = \u03B5 } = {}) {
      if (!this.equals(this.gamutSpace)) {
        coords = this.to(this.gamutSpace, coords);
        return this.gamutSpace.inGamut(coords, { epsilon });
      }
      let coordMeta = Object.values(this.coords);
      return coords.every((c, i) => {
        let meta = coordMeta[i];
        if (meta.type !== "angle" && meta.range) {
          if (isNone(c)) {
            return true;
          }
          let [min, max] = meta.range;
          return (min === void 0 || c >= min - epsilon) && (max === void 0 || c <= max + epsilon);
        }
        return true;
      });
    }
    get isUnbounded() {
      return Object.values(this.coords).every((coord) => !("range" in coord));
    }
    get cssId() {
      return this.formats?.color?.id || this.id;
    }
    get isPolar() {
      for (let id in this.coords) {
        if (this.coords[id].type === "angle") {
          return true;
        }
      }
      return false;
    }
    /**
     * Lookup a format in this color space
     * @param {string | object | Format} format - Format id if string. If object, it's converted to a `Format` object and returned.
     * @returns {Format}
     */
    getFormat(format) {
      if (!format) {
        return null;
      }
      if (format === "default") {
        format = Object.values(this.formats)[0];
      } else if (typeof format === "string") {
        format = this.formats[format];
      }
      let ret = Format.get(format, this);
      if (ret !== format && format.name in this.formats) {
        this.formats[format.name] = ret;
      }
      return ret;
    }
    /**
     * Check if this color space is the same as another color space reference.
     * Allows proxying color space objects and comparing color spaces with ids.
     * @param {string | ColorSpace} space ColorSpace object or id to compare to
     * @returns {boolean}
     */
    equals(space) {
      if (!space) {
        return false;
      }
      return this === space || this.id === space || this.id === space.id;
    }
    to(space, coords) {
      if (arguments.length === 1) {
        const color = getColor(space);
        [space, coords] = [color.space, color.coords];
      }
      space = _ColorSpace.get(space);
      if (this.equals(space)) {
        return coords;
      }
      coords = coords.map((c) => isNone(c) ? 0 : c);
      let myPath = this.path;
      let otherPath = space.path;
      let connectionSpace, connectionSpaceIndex;
      for (let i = 0; i < myPath.length; i++) {
        if (myPath[i].equals(otherPath[i])) {
          connectionSpace = myPath[i];
          connectionSpaceIndex = i;
        } else {
          break;
        }
      }
      if (!connectionSpace) {
        throw new Error(
          `Cannot convert between color spaces ${this} and ${space}: no connection space was found`
        );
      }
      for (let i = myPath.length - 1; i > connectionSpaceIndex; i--) {
        coords = myPath[i].toBase(coords);
      }
      for (let i = connectionSpaceIndex + 1; i < otherPath.length; i++) {
        coords = otherPath[i].fromBase(coords);
      }
      return coords;
    }
    from(space, coords) {
      if (arguments.length === 1) {
        const color = getColor(space);
        [space, coords] = [color.space, color.coords];
      }
      space = _ColorSpace.get(space);
      return space.to(this, coords);
    }
    toString() {
      return `${this.name} (${this.id})`;
    }
    getMinCoords() {
      let ret = [];
      for (let id in this.coords) {
        let meta = this.coords[id];
        let range = meta.range || meta.refRange;
        ret.push(range?.min ?? 0);
      }
      return ret;
    }
    static registry = {};
    // Returns array of unique color spaces
    static get all() {
      return [...new Set(Object.values(_ColorSpace.registry))];
    }
    static register(id, space) {
      if (arguments.length === 1) {
        space = arguments[0];
        id = space.id;
      }
      space = this.get(space);
      if (this.registry[id] && this.registry[id] !== space) {
        throw new Error(`Duplicate color space registration: '${id}'`);
      }
      this.registry[id] = space;
      if (arguments.length === 1 && space.aliases) {
        for (let alias of space.aliases) {
          this.register(alias, space);
        }
      }
      return space;
    }
    /**
     * Lookup ColorSpace object by name
     * @param {ColorSpace | string} name
     */
    static get(space, ...alternatives) {
      if (!space || isInstance(space, this)) {
        return space;
      }
      let argType = type(space);
      if (argType === "string") {
        let ret = _ColorSpace.registry[space.toLowerCase()];
        if (!ret) {
          throw new TypeError(`No color space found with id = "${space}"`);
        }
        return ret;
      }
      if (alternatives.length) {
        return _ColorSpace.get(...alternatives);
      }
      throw new TypeError(`${space} is not a valid color space`);
    }
    /**
     * Look up all color spaces for a format that matches certain criteria
     * @param {object | string} filters
     * @param {Array<ColorSpace>} [spaces=ColorSpace.all]
     * @returns {Format | null}
     */
    static findFormat(filters, spaces = _ColorSpace.all) {
      if (!filters) {
        return null;
      }
      if (typeof filters === "string") {
        filters = { name: filters };
      }
      for (let space of spaces) {
        for (let [name, format] of Object.entries(space.formats)) {
          format.name ??= name;
          format.type ??= "function";
          let matches = (!filters.name || format.name === filters.name) && (!filters.type || format.type === filters.type);
          if (filters.id) {
            let ids = format.ids || [format.id];
            let filterIds = Array.isArray(filters.id) ? filters.id : [filters.id];
            matches &&= filterIds.some((id) => ids.includes(id));
          }
          if (matches) {
            let ret = Format.get(format, space);
            if (ret !== format) {
              space.formats[format.name] = ret;
            }
            return ret;
          }
        }
      }
      return null;
    }
    /**
     * Get metadata about a coordinate of a color space
     *
     * @static
     * @param {Array | string} ref
     * @param {ColorSpace | string} [workingSpace]
     * @return {Object}
     */
    static resolveCoord(ref, workingSpace) {
      let coordType = type(ref);
      let space, coord;
      if (coordType === "string") {
        if (ref.includes(".")) {
          [space, coord] = ref.split(".");
        } else {
          [space, coord] = [, ref];
        }
      } else if (Array.isArray(ref)) {
        [space, coord] = ref;
      } else {
        space = ref.space;
        coord = ref.coordId;
      }
      space = _ColorSpace.get(space);
      if (!space) {
        space = workingSpace;
      }
      if (!space) {
        throw new TypeError(
          `Cannot resolve coordinate reference ${ref}: No color space specified and relative references are not allowed here`
        );
      }
      coordType = type(coord);
      if (coordType === "number" || coordType === "string" && coord >= 0) {
        let meta = Object.entries(space.coords)[coord];
        if (meta) {
          return { space, id: meta[0], index: coord, ...meta[1] };
        }
      }
      space = _ColorSpace.get(space);
      let normalizedCoord = coord.toLowerCase();
      let i = 0;
      for (let id in space.coords) {
        let meta = space.coords[id];
        if (id.toLowerCase() === normalizedCoord || meta.name?.toLowerCase() === normalizedCoord) {
          return { space, id, index: i, ...meta };
        }
        i++;
      }
      throw new TypeError(
        `No "${coord}" coordinate found in ${space.name}. Its coordinates are: ${Object.keys(space.coords).join(", ")}`
      );
    }
    static DEFAULT_FORMAT = {
      type: "functions",
      name: "color"
    };
  };
  function getPath(space) {
    let ret = [space];
    for (let s = space; s = s.base; ) {
      ret.push(s);
    }
    return ret;
  }

  // packages/theme/node_modules/colorjs.io/src/spaces/xyz-d65.js
  var xyz_d65_default = new ColorSpace({
    id: "xyz-d65",
    name: "XYZ D65",
    coords: {
      x: {
        refRange: [0, 1],
        name: "X"
      },
      y: {
        refRange: [0, 1],
        name: "Y"
      },
      z: {
        refRange: [0, 1],
        name: "Z"
      }
    },
    white: "D65",
    formats: {
      color: {
        ids: ["xyz-d65", "xyz"]
      }
    },
    aliases: ["xyz"]
  });

  // packages/theme/node_modules/colorjs.io/src/RGBColorSpace.js
  var RGBColorSpace = class extends ColorSpace {
    /**
     * Creates a new RGB ColorSpace.
     * If coords are not specified, they will use the default RGB coords.
     * Instead of `fromBase()` and `toBase()` functions,
     * you can specify to/from XYZ matrices and have `toBase()` and `fromBase()` automatically generated.
     * @param {RGBOptions} options
     */
    constructor(options) {
      if (!options.coords) {
        options.coords = {
          r: {
            range: [0, 1],
            name: "Red"
          },
          g: {
            range: [0, 1],
            name: "Green"
          },
          b: {
            range: [0, 1],
            name: "Blue"
          }
        };
      }
      if (!options.base) {
        options.base = xyz_d65_default;
      }
      if (options.toXYZ_M && options.fromXYZ_M) {
        options.toBase ??= (rgb) => {
          let xyz = multiply_v3_m3x3(rgb, options.toXYZ_M);
          if (this.white !== this.base.white) {
            xyz = adapt(this.white, this.base.white, xyz);
          }
          return xyz;
        };
        options.fromBase ??= (xyz) => {
          xyz = adapt(this.base.white, this.white, xyz);
          return multiply_v3_m3x3(xyz, options.fromXYZ_M);
        };
      }
      options.referred ??= "display";
      super(options);
    }
  };

  // packages/theme/node_modules/colorjs.io/src/getAll.js
  function getAll(color, options) {
    color = getColor(color);
    let space = ColorSpace.get(options, options?.space);
    let precision = options?.precision;
    let coords;
    if (!space || color.space.equals(space)) {
      coords = color.coords.slice();
    } else {
      coords = space.from(color);
    }
    return precision === void 0 ? coords : coords.map((coord) => toPrecision(coord, precision));
  }

  // packages/theme/node_modules/colorjs.io/src/get.js
  function get(color, prop) {
    color = getColor(color);
    if (prop === "alpha") {
      return color.alpha ?? 1;
    }
    let { space, index } = ColorSpace.resolveCoord(prop, color.space);
    let coords = getAll(color, space);
    return coords[index];
  }

  // packages/theme/node_modules/colorjs.io/src/setAll.js
  function setAll(color, space, coords, alpha) {
    color = getColor(color);
    if (Array.isArray(space)) {
      [space, coords, alpha] = [color.space, space, coords];
    }
    space = ColorSpace.get(space);
    color.coords = space === color.space ? coords.slice() : space.to(color.space, coords);
    if (alpha !== void 0) {
      color.alpha = alpha;
    }
    return color;
  }
  setAll.returns = "color";

  // packages/theme/node_modules/colorjs.io/src/set.js
  function set(color, prop, value) {
    color = getColor(color);
    if (arguments.length === 2 && type(arguments[1]) === "object") {
      let object = arguments[1];
      for (let p2 in object) {
        set(color, p2, object[p2]);
      }
    } else {
      if (typeof value === "function") {
        value = value(get(color, prop));
      }
      if (prop === "alpha") {
        color.alpha = value;
      } else {
        let { space, index } = ColorSpace.resolveCoord(prop, color.space);
        let coords = getAll(color, space);
        coords[index] = value;
        setAll(color, space, coords);
      }
    }
    return color;
  }
  set.returns = "color";

  // packages/theme/node_modules/colorjs.io/src/spaces/xyz-d50.js
  var xyz_d50_default = new ColorSpace({
    id: "xyz-d50",
    name: "XYZ D50",
    white: "D50",
    base: xyz_d65_default,
    fromBase: (coords) => adapt(xyz_d65_default.white, "D50", coords),
    toBase: (coords) => adapt("D50", xyz_d65_default.white, coords)
  });

  // packages/theme/node_modules/colorjs.io/src/spaces/lab.js
  var \u03B52 = 216 / 24389;
  var \u03B53 = 24 / 116;
  var \u03BA = 24389 / 27;
  var white = WHITES.D50;
  var lab_default = new ColorSpace({
    id: "lab",
    name: "Lab",
    coords: {
      l: {
        refRange: [0, 100],
        name: "Lightness"
      },
      a: {
        refRange: [-125, 125]
      },
      b: {
        refRange: [-125, 125]
      }
    },
    // Assuming XYZ is relative to D50, convert to CIE Lab
    // from CIE standard, which now defines these as a rational fraction
    white,
    base: xyz_d50_default,
    // Convert D50-adapted XYX to Lab
    // CIE 15.3:2004 section 8.2.1.1
    fromBase(XYZ) {
      let xyz = XYZ.map((value, i) => value / white[i]);
      let f = xyz.map((value) => value > \u03B52 ? Math.cbrt(value) : (\u03BA * value + 16) / 116);
      let L = 116 * f[1] - 16;
      let a = 500 * (f[0] - f[1]);
      let b2 = 200 * (f[1] - f[2]);
      return [L, a, b2];
    },
    // Convert Lab to D50-adapted XYZ
    // Same result as CIE 15.3:2004 Appendix D although the derivation is different
    // http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
    toBase(Lab) {
      let [L, a, b2] = Lab;
      let f = [];
      f[1] = (L + 16) / 116;
      f[0] = a / 500 + f[1];
      f[2] = f[1] - b2 / 200;
      let xyz = [
        f[0] > \u03B53 ? Math.pow(f[0], 3) : (116 * f[0] - 16) / \u03BA,
        Lab[0] > 8 ? Math.pow((Lab[0] + 16) / 116, 3) : Lab[0] / \u03BA,
        f[2] > \u03B53 ? Math.pow(f[2], 3) : (116 * f[2] - 16) / \u03BA
      ];
      return xyz.map((value, i) => value * white[i]);
    },
    formats: {
      lab: {
        coords: [
          "<percentage> | <number>",
          "<number> | <percentage>",
          "<number> | <percentage>"
        ]
      }
    }
  });

  // packages/theme/node_modules/colorjs.io/src/angles.js
  function constrain(angle) {
    if (typeof angle !== "number") {
      return angle;
    }
    return (angle % 360 + 360) % 360;
  }

  // packages/theme/node_modules/colorjs.io/src/spaces/lch.js
  var lch_default = new ColorSpace({
    id: "lch",
    name: "LCH",
    coords: {
      l: {
        refRange: [0, 100],
        name: "Lightness"
      },
      c: {
        refRange: [0, 150],
        name: "Chroma"
      },
      h: {
        refRange: [0, 360],
        type: "angle",
        name: "Hue"
      }
    },
    base: lab_default,
    fromBase(Lab) {
      if (this.\u03B5 === void 0) {
        let range = Object.values(this.base.coords)[1].refRange;
        let extent = range[1] - range[0];
        this.\u03B5 = extent / 1e5;
      }
      let [L, a, b2] = Lab;
      let isAchromatic = Math.abs(a) < this.\u03B5 && Math.abs(b2) < this.\u03B5;
      let h = isAchromatic ? null : constrain(Math.atan2(b2, a) * 180 / Math.PI);
      let C = isAchromatic ? 0 : Math.sqrt(a ** 2 + b2 ** 2);
      return [L, C, h];
    },
    toBase(lch) {
      let [L, C, h] = lch;
      let a = null, b2 = null;
      if (!isNone(h)) {
        C = C < 0 ? 0 : C;
        a = C * Math.cos(h * Math.PI / 180);
        b2 = C * Math.sin(h * Math.PI / 180);
      }
      return [L, a, b2];
    },
    formats: {
      lch: {
        coords: ["<percentage> | <number>", "<number> | <percentage>", "<number> | <angle>"]
      }
    }
  });

  // packages/theme/node_modules/colorjs.io/src/deltaE/deltaE2000.js
  var Gfactor = 25 ** 7;
  var \u03C0 = Math.PI;
  var r2d = 180 / \u03C0;
  var d2r = \u03C0 / 180;
  function pow7(x) {
    const x2 = x * x;
    const x7 = x2 * x2 * x2 * x;
    return x7;
  }
  function deltaE2000_default(color, sample, { kL = 1, kC = 1, kH = 1 } = {}) {
    [color, sample] = getColor([color, sample]);
    let [L1, a1, b1] = lab_default.from(color);
    let C1 = lch_default.from(lab_default, [L1, a1, b1])[1];
    let [L2, a2, b2] = lab_default.from(sample);
    let C2 = lch_default.from(lab_default, [L2, a2, b2])[1];
    if (C1 < 0) {
      C1 = 0;
    }
    if (C2 < 0) {
      C2 = 0;
    }
    let Cbar = (C1 + C2) / 2;
    let C7 = pow7(Cbar);
    let G = 0.5 * (1 - Math.sqrt(C7 / (C7 + Gfactor)));
    let adash1 = (1 + G) * a1;
    let adash2 = (1 + G) * a2;
    let Cdash1 = Math.sqrt(adash1 ** 2 + b1 ** 2);
    let Cdash2 = Math.sqrt(adash2 ** 2 + b2 ** 2);
    let h1 = adash1 === 0 && b1 === 0 ? 0 : Math.atan2(b1, adash1);
    let h2 = adash2 === 0 && b2 === 0 ? 0 : Math.atan2(b2, adash2);
    if (h1 < 0) {
      h1 += 2 * \u03C0;
    }
    if (h2 < 0) {
      h2 += 2 * \u03C0;
    }
    h1 *= r2d;
    h2 *= r2d;
    let \u0394L = L2 - L1;
    let \u0394C = Cdash2 - Cdash1;
    let hdiff = h2 - h1;
    let hsum = h1 + h2;
    let habs = Math.abs(hdiff);
    let \u0394h;
    if (Cdash1 * Cdash2 === 0) {
      \u0394h = 0;
    } else if (habs <= 180) {
      \u0394h = hdiff;
    } else if (hdiff > 180) {
      \u0394h = hdiff - 360;
    } else if (hdiff < -180) {
      \u0394h = hdiff + 360;
    } else {
      defaults_default.warn("the unthinkable has happened");
    }
    let \u0394H = 2 * Math.sqrt(Cdash2 * Cdash1) * Math.sin(\u0394h * d2r / 2);
    let Ldash = (L1 + L2) / 2;
    let Cdash = (Cdash1 + Cdash2) / 2;
    let Cdash7 = pow7(Cdash);
    let hdash;
    if (Cdash1 * Cdash2 === 0) {
      hdash = hsum;
    } else if (habs <= 180) {
      hdash = hsum / 2;
    } else if (hsum < 360) {
      hdash = (hsum + 360) / 2;
    } else {
      hdash = (hsum - 360) / 2;
    }
    let lsq = (Ldash - 50) ** 2;
    let SL = 1 + 0.015 * lsq / Math.sqrt(20 + lsq);
    let SC = 1 + 0.045 * Cdash;
    let T = 1;
    T -= 0.17 * Math.cos((hdash - 30) * d2r);
    T += 0.24 * Math.cos(2 * hdash * d2r);
    T += 0.32 * Math.cos((3 * hdash + 6) * d2r);
    T -= 0.2 * Math.cos((4 * hdash - 63) * d2r);
    let SH = 1 + 0.015 * Cdash * T;
    let \u0394\u03B8 = 30 * Math.exp(-1 * ((hdash - 275) / 25) ** 2);
    let RC = 2 * Math.sqrt(Cdash7 / (Cdash7 + Gfactor));
    let RT = -1 * Math.sin(2 * \u0394\u03B8 * d2r) * RC;
    let dE = (\u0394L / (kL * SL)) ** 2;
    dE += (\u0394C / (kC * SC)) ** 2;
    dE += (\u0394H / (kH * SH)) ** 2;
    dE += RT * (\u0394C / (kC * SC)) * (\u0394H / (kH * SH));
    return Math.sqrt(dE);
  }

  // packages/theme/node_modules/colorjs.io/src/spaces/oklab.js
  var XYZtoLMS_M = [
    [0.819022437996703, 0.3619062600528904, -0.1288737815209879],
    [0.0329836539323885, 0.9292868615863434, 0.0361446663506424],
    [0.0481771893596242, 0.2642395317527308, 0.6335478284694309]
  ];
  var LMStoXYZ_M = [
    [1.2268798758459243, -0.5578149944602171, 0.2813910456659647],
    [-0.0405757452148008, 1.112286803280317, -0.0717110580655164],
    [-0.0763729366746601, -0.4214933324022432, 1.5869240198367816]
  ];
  var LMStoLab_M = [
    [0.210454268309314, 0.7936177747023054, -0.0040720430116193],
    [1.9779985324311684, -2.42859224204858, 0.450593709617411],
    [0.0259040424655478, 0.7827717124575296, -0.8086757549230774]
  ];
  var LabtoLMS_M = [
    [1, 0.3963377773761749, 0.2158037573099136],
    [1, -0.1055613458156586, -0.0638541728258133],
    [1, -0.0894841775298119, -1.2914855480194092]
  ];
  var oklab_default = new ColorSpace({
    id: "oklab",
    name: "Oklab",
    coords: {
      l: {
        refRange: [0, 1],
        name: "Lightness"
      },
      a: {
        refRange: [-0.4, 0.4]
      },
      b: {
        refRange: [-0.4, 0.4]
      }
    },
    // Note that XYZ is relative to D65
    white: "D65",
    base: xyz_d65_default,
    fromBase(XYZ) {
      let LMS = multiply_v3_m3x3(XYZ, XYZtoLMS_M);
      LMS[0] = Math.cbrt(LMS[0]);
      LMS[1] = Math.cbrt(LMS[1]);
      LMS[2] = Math.cbrt(LMS[2]);
      return multiply_v3_m3x3(LMS, LMStoLab_M, LMS);
    },
    toBase(OKLab) {
      let LMSg = multiply_v3_m3x3(OKLab, LabtoLMS_M);
      LMSg[0] = LMSg[0] ** 3;
      LMSg[1] = LMSg[1] ** 3;
      LMSg[2] = LMSg[2] ** 3;
      return multiply_v3_m3x3(LMSg, LMStoXYZ_M, LMSg);
    },
    formats: {
      oklab: {
        coords: [
          "<percentage> | <number>",
          "<number> | <percentage>",
          "<number> | <percentage>"
        ]
      }
    }
  });

  // packages/theme/node_modules/colorjs.io/src/deltaE/deltaEOK.js
  function deltaEOK_default(color, sample) {
    [color, sample] = getColor([color, sample]);
    let [L1, a1, b1] = oklab_default.from(color);
    let [L2, a2, b2] = oklab_default.from(sample);
    let \u0394L = L1 - L2;
    let \u0394a = a1 - a2;
    let \u0394b = b1 - b2;
    return Math.sqrt(\u0394L ** 2 + \u0394a ** 2 + \u0394b ** 2);
  }

  // packages/theme/node_modules/colorjs.io/src/inGamut.js
  var \u03B54 = 75e-6;
  function inGamut(color, space, { epsilon = \u03B54 } = {}) {
    color = getColor(color);
    if (!space) {
      space = color.space;
    }
    space = ColorSpace.get(space);
    let coords = color.coords;
    if (space !== color.space) {
      coords = space.from(color);
    }
    return space.inGamut(coords, { epsilon });
  }

  // packages/theme/node_modules/colorjs.io/src/clone.js
  function clone(color) {
    return {
      space: color.space,
      coords: (
        /** @type {Coords} */
        color.coords.slice()
      ),
      alpha: color.alpha
    };
  }

  // packages/theme/node_modules/colorjs.io/src/distance.js
  function distance(color1, color2, space = "lab") {
    space = ColorSpace.get(space);
    let coords1 = space.from(color1);
    let coords2 = space.from(color2);
    return Math.sqrt(
      coords1.reduce((acc, c13, i) => {
        let c23 = coords2[i];
        if (isNone(c13) || isNone(c23)) {
          return acc;
        }
        return acc + (c23 - c13) ** 2;
      }, 0)
    );
  }

  // packages/theme/node_modules/colorjs.io/src/deltaE/deltaE76.js
  function deltaE76(color, sample) {
    return distance(color, sample, "lab");
  }

  // packages/theme/node_modules/colorjs.io/src/deltaE/deltaECMC.js
  var \u03C02 = Math.PI;
  var d2r2 = \u03C02 / 180;
  function deltaECMC_default(color, sample, { l = 2, c = 1 } = {}) {
    [color, sample] = getColor([color, sample]);
    let [L1, a1, b1] = lab_default.from(color);
    let [, C1, H1] = lch_default.from(lab_default, [L1, a1, b1]);
    let [L2, a2, b2] = lab_default.from(sample);
    let C2 = lch_default.from(lab_default, [L2, a2, b2])[1];
    if (C1 < 0) {
      C1 = 0;
    }
    if (C2 < 0) {
      C2 = 0;
    }
    let \u0394L = L1 - L2;
    let \u0394C = C1 - C2;
    let \u0394a = a1 - a2;
    let \u0394b = b1 - b2;
    let H2 = \u0394a ** 2 + \u0394b ** 2 - \u0394C ** 2;
    let SL = 0.511;
    if (L1 >= 16) {
      SL = 0.040975 * L1 / (1 + 0.01765 * L1);
    }
    let SC = 0.0638 * C1 / (1 + 0.0131 * C1) + 0.638;
    let T;
    if (isNone(H1)) {
      H1 = 0;
    }
    if (H1 >= 164 && H1 <= 345) {
      T = 0.56 + Math.abs(0.2 * Math.cos((H1 + 168) * d2r2));
    } else {
      T = 0.36 + Math.abs(0.4 * Math.cos((H1 + 35) * d2r2));
    }
    let C4 = Math.pow(C1, 4);
    let F = Math.sqrt(C4 / (C4 + 1900));
    let SH = SC * (F * T + 1 - F);
    let dE = (\u0394L / (l * SL)) ** 2;
    dE += (\u0394C / (c * SC)) ** 2;
    dE += H2 / SH ** 2;
    return Math.sqrt(dE);
  }

  // packages/theme/node_modules/colorjs.io/src/spaces/xyz-abs-d65.js
  var Yw = 203;
  var xyz_abs_d65_default = new ColorSpace({
    // Absolute CIE XYZ, with a D65 whitepoint,
    // as used in most HDR colorspaces as a starting point.
    // SDR spaces are converted per BT.2048
    // so that diffuse, media white is 203 cd/mÂ²
    id: "xyz-abs-d65",
    cssId: "--xyz-abs-d65",
    name: "Absolute XYZ D65",
    coords: {
      x: {
        refRange: [0, 9504.7],
        name: "Xa"
      },
      y: {
        refRange: [0, 1e4],
        name: "Ya"
      },
      z: {
        refRange: [0, 10888.3],
        name: "Za"
      }
    },
    base: xyz_d65_default,
    fromBase(XYZ) {
      return XYZ.map((v) => v * Yw);
    },
    toBase(AbsXYZ) {
      return AbsXYZ.map((v) => v / Yw);
    }
  });

  // packages/theme/node_modules/colorjs.io/src/spaces/jzazbz.js
  var b = 1.15;
  var g = 0.66;
  var n = 2610 / 2 ** 14;
  var ninv = 2 ** 14 / 2610;
  var c1 = 3424 / 2 ** 12;
  var c2 = 2413 / 2 ** 7;
  var c3 = 2392 / 2 ** 7;
  var p = 1.7 * 2523 / 2 ** 5;
  var pinv = 2 ** 5 / (1.7 * 2523);
  var d = -0.56;
  var d0 = 16295499532821565e-27;
  var XYZtoCone_M = [
    [0.41478972, 0.579999, 0.014648],
    [-0.20151, 1.120649, 0.0531008],
    [-0.0166008, 0.2648, 0.6684799]
  ];
  var ConetoXYZ_M = [
    [1.9242264357876067, -1.0047923125953657, 0.037651404030618],
    [0.35031676209499907, 0.7264811939316552, -0.06538442294808501],
    [-0.09098281098284752, -0.3127282905230739, 1.5227665613052603]
  ];
  var ConetoIab_M = [
    [0.5, 0.5, 0],
    [3.524, -4.066708, 0.542708],
    [0.199076, 1.096799, -1.295875]
  ];
  var IabtoCone_M = [
    [1, 0.13860504327153927, 0.05804731615611883],
    [1, -0.1386050432715393, -0.058047316156118904],
    [1, -0.09601924202631895, -0.811891896056039]
  ];
  var jzazbz_default = new ColorSpace({
    id: "jzazbz",
    name: "Jzazbz",
    coords: {
      jz: {
        refRange: [0, 1],
        name: "Jz"
      },
      az: {
        refRange: [-0.21, 0.21]
      },
      bz: {
        refRange: [-0.21, 0.21]
      }
    },
    base: xyz_abs_d65_default,
    fromBase(XYZ) {
      let [Xa, Ya, Za] = XYZ;
      let Xm = b * Xa - (b - 1) * Za;
      let Ym = g * Ya - (g - 1) * Xa;
      let LMS = multiply_v3_m3x3([Xm, Ym, Za], XYZtoCone_M);
      let PQLMS = (
        /** @type {Vector3} } */
        LMS.map(function(val) {
          let num = c1 + c2 * spow(val / 1e4, n);
          let denom = 1 + c3 * spow(val / 1e4, n);
          return spow(num / denom, p);
        })
      );
      let [Iz, az, bz] = multiply_v3_m3x3(PQLMS, ConetoIab_M);
      let Jz = (1 + d) * Iz / (1 + d * Iz) - d0;
      return [Jz, az, bz];
    },
    toBase(Jzazbz) {
      let [Jz, az, bz] = Jzazbz;
      let Iz = (Jz + d0) / (1 + d - d * (Jz + d0));
      let PQLMS = multiply_v3_m3x3([Iz, az, bz], IabtoCone_M);
      let LMS = (
        /** @type {Vector3} } */
        PQLMS.map(function(val) {
          let num = c1 - spow(val, pinv);
          let denom = c3 * spow(val, pinv) - c2;
          let x = 1e4 * spow(num / denom, ninv);
          return x;
        })
      );
      let [Xm, Ym, Za] = multiply_v3_m3x3(LMS, ConetoXYZ_M);
      let Xa = (Xm + (b - 1) * Za) / b;
      let Ya = (Ym + (g - 1) * Xa) / g;
      return [Xa, Ya, Za];
    },
    formats: {
      // https://drafts.csswg.org/css-color-hdr/#Jzazbz
      jzazbz: {
        coords: [
          "<percentage> | <number>",
          "<number> | <percentage>",
          "<number> | <percentage>"
        ]
      }
    }
  });

  // packages/theme/node_modules/colorjs.io/src/spaces/jzczhz.js
  var jzczhz_default = new ColorSpace({
    id: "jzczhz",
    name: "JzCzHz",
    coords: {
      jz: {
        refRange: [0, 1],
        name: "Jz"
      },
      cz: {
        refRange: [0, 0.26],
        name: "Chroma"
      },
      hz: {
        refRange: [0, 360],
        type: "angle",
        name: "Hue"
      }
    },
    base: jzazbz_default,
    fromBase: lch_default.fromBase,
    toBase: lch_default.toBase,
    formats: {
      // https://drafts.csswg.org/css-color-hdr/#JzCzhz
      jzczhz: {
        coords: ["<percentage> | <number>", "<number> | <percentage>", "<number> | <angle>"]
      }
    }
  });

  // packages/theme/node_modules/colorjs.io/src/deltaE/deltaEJz.js
  function deltaEJz_default(color, sample) {
    [color, sample] = getColor([color, sample]);
    let [Jz1, Cz1, Hz1] = jzczhz_default.from(color);
    let [Jz2, Cz2, Hz2] = jzczhz_default.from(sample);
    let \u0394J = Jz1 - Jz2;
    let \u0394C = Cz1 - Cz2;
    if (isNone(Hz1) && isNone(Hz2)) {
      Hz1 = 0;
      Hz2 = 0;
    } else if (isNone(Hz1)) {
      Hz1 = Hz2;
    } else if (isNone(Hz2)) {
      Hz2 = Hz1;
    }
    let \u0394h = Hz1 - Hz2;
    let \u0394H = 2 * Math.sqrt(Cz1 * Cz2) * Math.sin(\u0394h / 2 * (Math.PI / 180));
    return Math.sqrt(\u0394J ** 2 + \u0394C ** 2 + \u0394H ** 2);
  }

  // packages/theme/node_modules/colorjs.io/src/spaces/ictcp.js
  var c12 = 3424 / 4096;
  var c22 = 2413 / 128;
  var c32 = 2392 / 128;
  var m1 = 2610 / 16384;
  var m2 = 2523 / 32;
  var im1 = 16384 / 2610;
  var im2 = 32 / 2523;
  var XYZtoLMS_M2 = [
    [0.3592832590121217, 0.6976051147779502, -0.035891593232029],
    [-0.1920808463704993, 1.100476797037432, 0.0753748658519118],
    [0.0070797844607479, 0.0748396662186362, 0.8433265453898765]
  ];
  var LMStoIPT_M = [
    [2048 / 4096, 2048 / 4096, 0],
    [6610 / 4096, -13613 / 4096, 7003 / 4096],
    [17933 / 4096, -17390 / 4096, -543 / 4096]
  ];
  var IPTtoLMS_M = [
    [0.9999999999999998, 0.0086090370379328, 0.111029625003026],
    [0.9999999999999998, -0.0086090370379328, -0.1110296250030259],
    [0.9999999999999998, 0.5600313357106791, -0.3206271749873188]
  ];
  var LMStoXYZ_M2 = [
    [2.0701522183894223, -1.3263473389671563, 0.2066510476294053],
    [0.3647385209748072, 0.6805660249472273, -0.0453045459220347],
    [-0.0497472075358123, -0.0492609666966131, 1.1880659249923042]
  ];
  var ictcp_default = new ColorSpace({
    id: "ictcp",
    name: "ICTCP",
    // From BT.2100-2 page 7:
    // During production, signal values are expected to exceed the
    // range Eâ€² = [0.0 : 1.0]. This provides processing headroom and avoids
    // signal degradation during cascaded processing. Such values of Eâ€²,
    // below 0.0 or exceeding 1.0, should not be clipped during production
    // and exchange.
    // Values below 0.0 should not be clipped in reference displays (even
    // though they represent â€œnegativeâ€ light) to allow the black level of
    // the signal (LB) to be properly set using test signals known as â€œPLUGEâ€
    coords: {
      i: {
        refRange: [0, 1],
        // Constant luminance,
        name: "I"
      },
      ct: {
        refRange: [-0.5, 0.5],
        // Full BT.2020 gamut in range [-0.5, 0.5]
        name: "CT"
      },
      cp: {
        refRange: [-0.5, 0.5],
        name: "CP"
      }
    },
    base: xyz_abs_d65_default,
    fromBase(XYZ) {
      let LMS = multiply_v3_m3x3(XYZ, XYZtoLMS_M2);
      return LMStoICtCp(LMS);
    },
    toBase(ICtCp) {
      let LMS = ICtCptoLMS(ICtCp);
      return multiply_v3_m3x3(LMS, LMStoXYZ_M2);
    },
    formats: {
      ictcp: {
        coords: [
          "<percentage> | <number>",
          "<number> | <percentage>",
          "<number> | <percentage>"
        ]
      }
    }
  });
  function LMStoICtCp(LMS) {
    let PQLMS = (
      /** @type {Vector3} */
      LMS.map(function(val) {
        let num = c12 + c22 * (val / 1e4) ** m1;
        let denom = 1 + c32 * (val / 1e4) ** m1;
        return (num / denom) ** m2;
      })
    );
    return multiply_v3_m3x3(PQLMS, LMStoIPT_M);
  }
  function ICtCptoLMS(ICtCp) {
    let PQLMS = multiply_v3_m3x3(ICtCp, IPTtoLMS_M);
    let LMS = (
      /** @type {Vector3} */
      PQLMS.map(function(val) {
        let num = Math.max(val ** im2 - c12, 0);
        let denom = c22 - c32 * val ** im2;
        return 1e4 * (num / denom) ** im1;
      })
    );
    return LMS;
  }

  // packages/theme/node_modules/colorjs.io/src/deltaE/deltaEITP.js
  function deltaEITP_default(color, sample) {
    [color, sample] = getColor([color, sample]);
    let [I1, T1, P1] = ictcp_default.from(color);
    let [I2, T2, P2] = ictcp_default.from(sample);
    return 720 * Math.sqrt((I1 - I2) ** 2 + 0.25 * (T1 - T2) ** 2 + (P1 - P2) ** 2);
  }

  // packages/theme/node_modules/colorjs.io/src/deltaE/deltaEOK2.js
  function deltaEOK2_default(color, sample) {
    [color, sample] = getColor([color, sample]);
    let abscale = 2;
    let [L1, a1, b1] = oklab_default.from(color);
    let [L2, a2, b2] = oklab_default.from(sample);
    let \u0394L = L1 - L2;
    let \u0394a = abscale * (a1 - a2);
    let \u0394b = abscale * (b1 - b2);
    return Math.sqrt(\u0394L ** 2 + \u0394a ** 2 + \u0394b ** 2);
  }

  // packages/theme/node_modules/colorjs.io/src/spaces/cam16.js
  var white2 = WHITES.D65;
  var adaptedCoef = 0.42;
  var adaptedCoefInv = 1 / adaptedCoef;
  var tau = 2 * Math.PI;
  var cat16 = [
    [0.401288, 0.650173, -0.051461],
    [-0.250268, 1.204414, 0.045854],
    [-2079e-6, 0.048952, 0.953127]
  ];
  var cat16Inv = [
    [1.8620678550872327, -1.0112546305316843, 0.14918677544445175],
    [0.38752654323613717, 0.6214474419314753, -0.008973985167612518],
    [-0.015841498849333856, -0.03412293802851557, 1.0499644368778496]
  ];
  var m12 = [
    [460, 451, 288],
    [460, -891, -261],
    [460, -220, -6300]
  ];
  var surroundMap = {
    dark: [0.8, 0.525, 0.8],
    dim: [0.9, 0.59, 0.9],
    average: [1, 0.69, 1]
  };
  var hueQuadMap = {
    // Red, Yellow, Green, Blue, Red
    h: [20.14, 90, 164.25, 237.53, 380.14],
    e: [0.8, 0.7, 1, 1.2, 0.8],
    H: [0, 100, 200, 300, 400]
  };
  var rad2deg = 180 / Math.PI;
  var deg2rad = Math.PI / 180;
  function adapt2(coords, fl) {
    const temp = (
      /** @type {[number, number, number]} */
      coords.map((c) => {
        const x = spow(fl * Math.abs(c) * 0.01, adaptedCoef);
        return 400 * copySign(x, c) / (x + 27.13);
      })
    );
    return temp;
  }
  function unadapt(adapted, fl) {
    const constant = 100 / fl * 27.13 ** adaptedCoefInv;
    return (
      /** @type {[number, number, number]} */
      adapted.map((c) => {
        const cabs = Math.abs(c);
        return copySign(constant * spow(cabs / (400 - cabs), adaptedCoefInv), c);
      })
    );
  }
  function hueQuadrature(h) {
    let hp = constrain(h);
    if (hp <= hueQuadMap.h[0]) {
      hp += 360;
    }
    const i = bisectLeft(hueQuadMap.h, hp) - 1;
    const [hi, hii] = hueQuadMap.h.slice(i, i + 2);
    const [ei, eii] = hueQuadMap.e.slice(i, i + 2);
    const Hi = hueQuadMap.H[i];
    const t = (hp - hi) / ei;
    return Hi + 100 * t / (t + (hii - hp) / eii);
  }
  function invHueQuadrature(H) {
    let Hp = (H % 400 + 400) % 400;
    const i = Math.floor(0.01 * Hp);
    Hp = Hp % 100;
    const [hi, hii] = hueQuadMap.h.slice(i, i + 2);
    const [ei, eii] = hueQuadMap.e.slice(i, i + 2);
    return constrain((Hp * (eii * hi - ei * hii) - 100 * hi * eii) / (Hp * (eii - ei) - 100 * eii));
  }
  function environment(refWhite, adaptingLuminance, backgroundLuminance, surround, discounting) {
    const env = {};
    env.discounting = discounting;
    env.refWhite = refWhite;
    env.surround = surround;
    const xyzW = (
      /** @type {Vector3} */
      refWhite.map((c) => {
        return c * 100;
      })
    );
    env.la = adaptingLuminance;
    env.yb = backgroundLuminance;
    const yw = xyzW[1];
    const rgbW = multiply_v3_m3x3(xyzW, cat16);
    let values = surroundMap[env.surround];
    const f = values[0];
    env.c = values[1];
    env.nc = values[2];
    const k = 1 / (5 * env.la + 1);
    const k4 = k ** 4;
    env.fl = k4 * env.la + 0.1 * (1 - k4) * (1 - k4) * Math.cbrt(5 * env.la);
    env.flRoot = env.fl ** 0.25;
    env.n = env.yb / yw;
    env.z = 1.48 + Math.sqrt(env.n);
    env.nbb = 0.725 * env.n ** -0.2;
    env.ncb = env.nbb;
    const d2 = discounting ? 1 : Math.max(Math.min(f * (1 - 1 / 3.6 * Math.exp((-env.la - 42) / 92)), 1), 0);
    env.dRgb = /** @type {[number, number, number]} */
    rgbW.map((c) => {
      return interpolate(1, yw / c, d2);
    });
    env.dRgbInv = /** @type {[number, number, number]} */
    env.dRgb.map((c) => {
      return 1 / c;
    });
    const rgbCW = (
      /** @type {[number, number, number]} */
      rgbW.map((c, i) => {
        return c * env.dRgb[i];
      })
    );
    const rgbAW = adapt2(rgbCW, env.fl);
    env.aW = env.nbb * (2 * rgbAW[0] + rgbAW[1] + 0.05 * rgbAW[2]);
    return env;
  }
  var viewingConditions = environment(white2, 64 / Math.PI * 0.2, 20, "average", false);
  function fromCam16(cam16, env) {
    if (!(cam16.J !== void 0 ^ cam16.Q !== void 0)) {
      throw new Error("Conversion requires one and only one: 'J' or 'Q'");
    }
    if (!(cam16.C !== void 0 ^ cam16.M !== void 0 ^ cam16.s !== void 0)) {
      throw new Error("Conversion requires one and only one: 'C', 'M' or 's'");
    }
    if (!(cam16.h !== void 0 ^ cam16.H !== void 0)) {
      throw new Error("Conversion requires one and only one: 'h' or 'H'");
    }
    if (cam16.J === 0 || cam16.Q === 0) {
      return [0, 0, 0];
    }
    let hRad = 0;
    if (cam16.h !== void 0) {
      hRad = constrain(cam16.h) * deg2rad;
    } else {
      hRad = invHueQuadrature(cam16.H) * deg2rad;
    }
    const cosh = Math.cos(hRad);
    const sinh = Math.sin(hRad);
    let Jroot = 0;
    if (cam16.J !== void 0) {
      Jroot = spow(cam16.J, 1 / 2) * 0.1;
    } else if (cam16.Q !== void 0) {
      Jroot = 0.25 * env.c * cam16.Q / ((env.aW + 4) * env.flRoot);
    }
    let alpha = 0;
    if (cam16.C !== void 0) {
      alpha = cam16.C / Jroot;
    } else if (cam16.M !== void 0) {
      alpha = cam16.M / env.flRoot / Jroot;
    } else if (cam16.s !== void 0) {
      alpha = 4e-4 * cam16.s ** 2 * (env.aW + 4) / env.c;
    }
    const t = spow(alpha * Math.pow(1.64 - Math.pow(0.29, env.n), -0.73), 10 / 9);
    const et = 0.25 * (Math.cos(hRad + 2) + 3.8);
    const A = env.aW * spow(Jroot, 2 / env.c / env.z);
    const p1 = 5e4 / 13 * env.nc * env.ncb * et;
    const p2 = A / env.nbb;
    const r = 23 * (p2 + 0.305) * zdiv(t, 23 * p1 + t * (11 * cosh + 108 * sinh));
    const a = r * cosh;
    const b2 = r * sinh;
    const rgb_c = unadapt(
      /** @type {Vector3} */
      multiply_v3_m3x3([p2, a, b2], m12).map((c) => {
        return c * 1 / 1403;
      }),
      env.fl
    );
    return (
      /** @type {Vector3} */
      multiply_v3_m3x3(
        /** @type {Vector3} */
        rgb_c.map((c, i) => {
          return c * env.dRgbInv[i];
        }),
        cat16Inv
      ).map((c) => {
        return c / 100;
      })
    );
  }
  function toCam16(xyzd65, env) {
    const xyz100 = (
      /** @type {Vector3} */
      xyzd65.map((c) => {
        return c * 100;
      })
    );
    const rgbA = adapt2(
      /** @type {[number, number, number]} */
      multiply_v3_m3x3(xyz100, cat16).map((c, i) => {
        return c * env.dRgb[i];
      }),
      env.fl
    );
    const a = rgbA[0] + (-12 * rgbA[1] + rgbA[2]) / 11;
    const b2 = (rgbA[0] + rgbA[1] - 2 * rgbA[2]) / 9;
    const hRad = (Math.atan2(b2, a) % tau + tau) % tau;
    const et = 0.25 * (Math.cos(hRad + 2) + 3.8);
    const t = 5e4 / 13 * env.nc * env.ncb * zdiv(et * Math.sqrt(a ** 2 + b2 ** 2), rgbA[0] + rgbA[1] + 1.05 * rgbA[2] + 0.305);
    const alpha = spow(t, 0.9) * Math.pow(1.64 - Math.pow(0.29, env.n), 0.73);
    const A = env.nbb * (2 * rgbA[0] + rgbA[1] + 0.05 * rgbA[2]);
    const Jroot = spow(A / env.aW, 0.5 * env.c * env.z);
    const J = 100 * spow(Jroot, 2);
    const Q = 4 / env.c * Jroot * (env.aW + 4) * env.flRoot;
    const C = alpha * Jroot;
    const M = C * env.flRoot;
    const h = constrain(hRad * rad2deg);
    const H = hueQuadrature(h);
    const s = 50 * spow(env.c * alpha / (env.aW + 4), 1 / 2);
    return { J, C, h, s, Q, M, H };
  }
  var cam16_default = new ColorSpace({
    id: "cam16-jmh",
    cssId: "--cam16-jmh",
    name: "CAM16-JMh",
    coords: {
      j: {
        refRange: [0, 100],
        name: "J"
      },
      m: {
        refRange: [0, 105],
        name: "Colorfulness"
      },
      h: {
        refRange: [0, 360],
        type: "angle",
        name: "Hue"
      }
    },
    base: xyz_d65_default,
    fromBase(xyz) {
      if (this.\u03B5 === void 0) {
        this.\u03B5 = Object.values(this.coords)[1].refRange[1] / 1e5;
      }
      const cam16 = toCam16(xyz, viewingConditions);
      const isAchromatic = Math.abs(cam16.M) < this.\u03B5;
      return [cam16.J, isAchromatic ? 0 : cam16.M, isAchromatic ? null : cam16.h];
    },
    toBase(cam16) {
      return fromCam16({ J: cam16[0], M: cam16[1], h: cam16[2] }, viewingConditions);
    }
  });

  // packages/theme/node_modules/colorjs.io/src/spaces/hct.js
  var white3 = WHITES.D65;
  var \u03B55 = 216 / 24389;
  var \u03BA2 = 24389 / 27;
  function toLstar(y) {
    const fy = y > \u03B55 ? Math.cbrt(y) : (\u03BA2 * y + 16) / 116;
    return 116 * fy - 16;
  }
  function fromLstar(lstar) {
    return lstar > 8 ? Math.pow((lstar + 16) / 116, 3) : lstar / \u03BA2;
  }
  function fromHct(coords, env) {
    let [h, c, t] = coords;
    let xyz = [];
    let j = 0;
    if (t === 0) {
      return [0, 0, 0];
    }
    let y = fromLstar(t);
    if (t > 0) {
      j = 0.00379058511492914 * t ** 2 + 0.608983189401032 * t + 0.9155088574762233;
    } else {
      j = 9514440756550361e-21 * t ** 2 + 0.08693057439788597 * t - 21.928975842194614;
    }
    const threshold = 2e-12;
    const max_attempts = 15;
    let attempt = 0;
    let last = Infinity;
    let best = j;
    while (attempt <= max_attempts) {
      xyz = fromCam16({ J: j, C: c, h }, env);
      const delta = Math.abs(xyz[1] - y);
      if (delta < last) {
        if (delta <= threshold) {
          return xyz;
        }
        best = j;
        last = delta;
      }
      j = j - (xyz[1] - y) * j / (2 * xyz[1]);
      attempt += 1;
    }
    return fromCam16({ J: j, C: c, h }, env);
  }
  function toHct(xyz, env) {
    const t = toLstar(xyz[1]);
    if (t === 0) {
      return [0, 0, 0];
    }
    const cam16 = toCam16(xyz, viewingConditions2);
    return [constrain(cam16.h), cam16.C, t];
  }
  var viewingConditions2 = environment(
    white3,
    200 / Math.PI * fromLstar(50),
    fromLstar(50) * 100,
    "average",
    false
  );
  var hct_default = new ColorSpace({
    id: "hct",
    name: "HCT",
    coords: {
      h: {
        refRange: [0, 360],
        type: "angle",
        name: "Hue"
      },
      c: {
        refRange: [0, 145],
        name: "Colorfulness"
      },
      t: {
        refRange: [0, 100],
        name: "Tone"
      }
    },
    base: xyz_d65_default,
    fromBase(xyz) {
      if (this.\u03B5 === void 0) {
        this.\u03B5 = Object.values(this.coords)[1].refRange[1] / 1e5;
      }
      let hct = toHct(xyz, viewingConditions2);
      if (hct[1] < this.\u03B5) {
        hct[1] = 0;
        hct[0] = null;
      }
      return hct;
    },
    toBase(hct) {
      return fromHct(hct, viewingConditions2);
    },
    formats: {
      color: {
        id: "--hct",
        coords: ["<number> | <angle>", "<percentage> | <number>", "<percentage> | <number>"]
      }
    }
  });

  // packages/theme/node_modules/colorjs.io/src/deltaE/deltaEHCT.js
  var rad2deg2 = 180 / Math.PI;
  var deg2rad2 = Math.PI / 180;
  var ucsCoeff = [1, 7e-3, 0.0228];
  function convertUcsAb(coords) {
    if (coords[1] < 0) {
      coords = hct_default.fromBase(hct_default.toBase(coords));
    }
    const M = Math.log(Math.max(1 + ucsCoeff[2] * coords[1] * viewingConditions2.flRoot, 1)) / ucsCoeff[2];
    const hrad = coords[0] * deg2rad2;
    const a = M * Math.cos(hrad);
    const b2 = M * Math.sin(hrad);
    return [coords[2], a, b2];
  }
  function deltaEHCT_default(color, sample) {
    [color, sample] = getColor([color, sample]);
    let [t1, a1, b1] = convertUcsAb(hct_default.from(color));
    let [t2, a2, b2] = convertUcsAb(hct_default.from(sample));
    return Math.sqrt((t1 - t2) ** 2 + (a1 - a2) ** 2 + (b1 - b2) ** 2);
  }

  // packages/theme/node_modules/colorjs.io/src/deltaE/index.js
  var deltaE_default = {
    deltaE76,
    deltaECMC: deltaECMC_default,
    deltaE2000: deltaE2000_default,
    deltaEJz: deltaEJz_default,
    deltaEITP: deltaEITP_default,
    deltaEOK: deltaEOK_default,
    deltaEOK2: deltaEOK2_default,
    deltaEHCT: deltaEHCT_default
  };

  // packages/theme/node_modules/colorjs.io/src/toGamut.js
  function calcEpsilon(jnd) {
    const order = !jnd ? 0 : Math.floor(Math.log10(Math.abs(jnd)));
    return Math.max(parseFloat(`1e${order - 2}`), 1e-6);
  }
  var GMAPPRESET = {
    hct: {
      method: "hct.c",
      jnd: 2,
      deltaEMethod: "hct",
      blackWhiteClamp: {}
    },
    "hct-tonal": {
      method: "hct.c",
      jnd: 0,
      deltaEMethod: "hct",
      blackWhiteClamp: { channel: "hct.t", min: 0, max: 100 }
    }
  };
  function toGamut(color, {
    method = defaults_default.gamut_mapping,
    space = void 0,
    deltaEMethod = "",
    jnd = 2,
    blackWhiteClamp = void 0
  } = {}) {
    color = getColor(color);
    if (isString(arguments[1])) {
      space = arguments[1];
    } else if (!space) {
      space = color.space;
    }
    space = ColorSpace.get(space);
    if (inGamut(color, space, { epsilon: 0 })) {
      return (
        /** @type {PlainColorObject} */
        color
      );
    }
    let spaceColor;
    if (method === "css") {
      spaceColor = toGamutCSS(color, { space });
    } else {
      if (method !== "clip" && !inGamut(color, space)) {
        if (Object.prototype.hasOwnProperty.call(GMAPPRESET, method)) {
          ({ method, jnd, deltaEMethod, blackWhiteClamp } = GMAPPRESET[method]);
        }
        let de = deltaE2000_default;
        if (deltaEMethod !== "") {
          for (let m in deltaE_default) {
            if ("deltae" + deltaEMethod.toLowerCase() === m.toLowerCase()) {
              de = deltaE_default[m];
              break;
            }
          }
        }
        if (jnd === 0) {
          jnd = 1e-16;
        }
        let clipped = toGamut(to(color, space), { method: "clip", space });
        if (de(color, clipped) > jnd) {
          if (blackWhiteClamp && Object.keys(blackWhiteClamp).length === 3) {
            let channelMeta = ColorSpace.resolveCoord(blackWhiteClamp.channel);
            let channel = get(to(color, channelMeta.space), channelMeta.id);
            if (isNone(channel)) {
              channel = 0;
            }
            if (channel >= blackWhiteClamp.max) {
              return to({ space: "xyz-d65", coords: WHITES["D65"] }, color.space);
            } else if (channel <= blackWhiteClamp.min) {
              return to({ space: "xyz-d65", coords: [0, 0, 0] }, color.space);
            }
          }
          let coordMeta = ColorSpace.resolveCoord(method);
          let mapSpace = coordMeta.space;
          let coordId = coordMeta.id;
          let mappedColor = to(color, mapSpace);
          mappedColor.coords.forEach((c, i) => {
            if (isNone(c)) {
              mappedColor.coords[i] = 0;
            }
          });
          let bounds = coordMeta.range || coordMeta.refRange;
          let min = bounds[0];
          let \u03B56 = calcEpsilon(jnd);
          let low = min;
          let high = get(mappedColor, coordId);
          while (high - low > \u03B56) {
            let clipped2 = clone(mappedColor);
            clipped2 = toGamut(clipped2, { space, method: "clip" });
            let deltaE = de(mappedColor, clipped2);
            if (deltaE - jnd < \u03B56) {
              low = get(mappedColor, coordId);
            } else {
              high = get(mappedColor, coordId);
            }
            set(mappedColor, coordId, (low + high) / 2);
          }
          spaceColor = to(mappedColor, space);
        } else {
          spaceColor = clipped;
        }
      } else {
        spaceColor = to(color, space);
      }
      if (method === "clip" || // Dumb coord clipping
      // finish off smarter gamut mapping with clip to get rid of Îµ, see #17
      !inGamut(spaceColor, space, { epsilon: 0 })) {
        let bounds = Object.values(space.coords).map((c) => c.range || []);
        spaceColor.coords = /** @type {[number, number, number]} */
        spaceColor.coords.map((c, i) => {
          let [min, max] = bounds[i];
          if (min !== void 0) {
            c = Math.max(min, c);
          }
          if (max !== void 0) {
            c = Math.min(c, max);
          }
          return c;
        });
      }
    }
    if (space !== color.space) {
      spaceColor = to(spaceColor, color.space);
    }
    color.coords = spaceColor.coords;
    return (
      /** @type {PlainColorObject} */
      color
    );
  }
  toGamut.returns = "color";
  var COLORS = {
    WHITE: { space: oklab_default, coords: [1, 0, 0], alpha: 1 },
    BLACK: { space: oklab_default, coords: [0, 0, 0], alpha: 1 }
  };
  function toGamutCSS(origin, { space } = {}) {
    const JND = 0.02;
    const \u03B56 = 1e-4;
    origin = getColor(origin);
    if (!space) {
      space = origin.space;
    }
    space = ColorSpace.get(space);
    const oklchSpace = ColorSpace.get("oklch");
    if (space.isUnbounded) {
      return to(origin, space);
    }
    const origin_OKLCH = to(origin, oklchSpace);
    let L = origin_OKLCH.coords[0];
    if (L >= 1) {
      const white4 = to(COLORS.WHITE, space);
      white4.alpha = origin.alpha;
      return to(white4, space);
    }
    if (L <= 0) {
      const black = to(COLORS.BLACK, space);
      black.alpha = origin.alpha;
      return to(black, space);
    }
    if (inGamut(origin_OKLCH, space, { epsilon: 0 })) {
      return to(origin_OKLCH, space);
    }
    function clip(_color) {
      const destColor = to(_color, space);
      const spaceCoords = Object.values(
        /** @type {ColorSpace} */
        space.coords
      );
      destColor.coords = /** @type {[number, number, number]} */
      destColor.coords.map((coord, index) => {
        if ("range" in spaceCoords[index]) {
          const [min2, max2] = spaceCoords[index].range;
          return clamp(min2, coord, max2);
        }
        return coord;
      });
      return destColor;
    }
    let min = 0;
    let max = origin_OKLCH.coords[1];
    let min_inGamut = true;
    let current = clone(origin_OKLCH);
    let clipped = clip(current);
    let E = deltaEOK_default(clipped, current);
    if (E < JND) {
      return clipped;
    }
    while (max - min > \u03B56) {
      const chroma = (min + max) / 2;
      current.coords[1] = chroma;
      if (min_inGamut && inGamut(current, space, { epsilon: 0 })) {
        min = chroma;
      } else {
        clipped = clip(current);
        E = deltaEOK_default(clipped, current);
        if (E < JND) {
          if (JND - E < \u03B56) {
            break;
          } else {
            min_inGamut = false;
            min = chroma;
          }
        } else {
          max = chroma;
        }
      }
    }
    return clipped;
  }

  // packages/theme/node_modules/colorjs.io/src/to.js
  function to(color, space, { inGamut: inGamut2 } = {}) {
    color = getColor(color);
    space = ColorSpace.get(space);
    let coords = space.from(color);
    let ret = { space, coords, alpha: color.alpha };
    if (inGamut2) {
      ret = toGamut(ret, inGamut2 === true ? void 0 : inGamut2);
    }
    return ret;
  }
  to.returns = "color";

  // packages/theme/node_modules/colorjs.io/src/serialize.js
  function serialize(color, options = {}) {
    let {
      precision = defaults_default.precision,
      format,
      inGamut: inGamut2 = true,
      coords: coordFormat,
      alpha: alphaFormat,
      commas
    } = options;
    let ret;
    let colorWithMeta = (
      /** @type {PlainColorObject & ParseOptions} */
      getColor(color)
    );
    let formatId = format;
    let parseMeta = colorWithMeta.parseMeta;
    if (parseMeta && !format) {
      if (parseMeta.format.canSerialize()) {
        format = parseMeta.format;
        formatId = parseMeta.formatId;
      }
      coordFormat ??= parseMeta.types;
      alphaFormat ??= parseMeta.alphaType;
      commas ??= parseMeta.commas;
    }
    if (formatId) {
      format = colorWithMeta.space.getFormat(format) ?? ColorSpace.findFormat(formatId);
    }
    if (!format) {
      format = colorWithMeta.space.getFormat("default") ?? ColorSpace.DEFAULT_FORMAT;
      formatId = format.name;
    }
    if (format && format.space && format.space !== colorWithMeta.space) {
      colorWithMeta = to(colorWithMeta, format.space);
    }
    let coords = colorWithMeta.coords.slice();
    inGamut2 ||= format.toGamut;
    if (inGamut2 && !inGamut(colorWithMeta)) {
      coords = toGamut(clone(colorWithMeta), inGamut2 === true ? void 0 : inGamut2).coords;
    }
    if (format.type === "custom") {
      if (format.serialize) {
        ret = format.serialize(coords, colorWithMeta.alpha, options);
      } else {
        throw new TypeError(
          `format ${formatId} can only be used to parse colors, not for serialization`
        );
      }
    } else {
      let name = format.name || "color";
      let args = format.serializeCoords(coords, precision, coordFormat);
      if (name === "color") {
        let cssId = format.id || format.ids?.[0] || colorWithMeta.space.cssId || colorWithMeta.space.id;
        args.unshift(cssId);
      }
      let alpha = colorWithMeta.alpha;
      if (alphaFormat !== void 0 && !(typeof alphaFormat === "object")) {
        alphaFormat = typeof alphaFormat === "string" ? { type: alphaFormat } : { include: alphaFormat };
      }
      let alphaType = alphaFormat?.type ?? "<number>";
      let serializeAlpha = alphaFormat?.include === true || format.alpha === true || alphaFormat?.include !== false && format.alpha !== false && alpha < 1;
      let strAlpha = "";
      commas ??= format.commas;
      if (serializeAlpha) {
        if (precision !== null) {
          let unit;
          if (alphaType === "<percentage>") {
            unit = "%";
            alpha *= 100;
          }
          alpha = serializeNumber(alpha, { precision, unit });
        }
        strAlpha = `${commas ? "," : " /"} ${alpha}`;
      }
      ret = `${name}(${args.join(commas ? ", " : " ")}${strAlpha})`;
    }
    return ret;
  }

  // packages/theme/node_modules/colorjs.io/src/spaces/p3-linear.js
  var toXYZ_M = [
    [0.4865709486482162, 0.26566769316909306, 0.1982172852343625],
    [0.2289745640697488, 0.6917385218365064, 0.079286914093745],
    [0, 0.04511338185890264, 1.043944368900976]
  ];
  var fromXYZ_M = [
    [2.493496911941425, -0.9313836179191239, -0.40271078445071684],
    [-0.8294889695615747, 1.7626640603183463, 0.023624685841943577],
    [0.03584583024378447, -0.07617238926804182, 0.9568845240076872]
  ];
  var p3_linear_default = new RGBColorSpace({
    id: "p3-linear",
    cssId: "display-p3-linear",
    name: "Linear P3",
    white: "D65",
    toXYZ_M,
    fromXYZ_M
  });

  // packages/theme/node_modules/colorjs.io/src/spaces/srgb-linear.js
  var toXYZ_M2 = [
    [0.41239079926595934, 0.357584339383878, 0.1804807884018343],
    [0.21263900587151027, 0.715168678767756, 0.07219231536073371],
    [0.01933081871559182, 0.11919477979462598, 0.9505321522496607]
  ];
  var fromXYZ_M2 = [
    [3.2409699419045226, -1.537383177570094, -0.4986107602930034],
    [-0.9692436362808796, 1.8759675015077202, 0.04155505740717559],
    [0.05563007969699366, -0.20397695888897652, 1.0569715142428786]
  ];
  var srgb_linear_default = new RGBColorSpace({
    id: "srgb-linear",
    name: "Linear sRGB",
    white: "D65",
    toXYZ_M: toXYZ_M2,
    fromXYZ_M: fromXYZ_M2
  });

  // packages/theme/node_modules/colorjs.io/src/keywords.js
  var keywords_default = {
    aliceblue: [240 / 255, 248 / 255, 1],
    antiquewhite: [250 / 255, 235 / 255, 215 / 255],
    aqua: [0, 1, 1],
    aquamarine: [127 / 255, 1, 212 / 255],
    azure: [240 / 255, 1, 1],
    beige: [245 / 255, 245 / 255, 220 / 255],
    bisque: [1, 228 / 255, 196 / 255],
    black: [0, 0, 0],
    blanchedalmond: [1, 235 / 255, 205 / 255],
    blue: [0, 0, 1],
    blueviolet: [138 / 255, 43 / 255, 226 / 255],
    brown: [165 / 255, 42 / 255, 42 / 255],
    burlywood: [222 / 255, 184 / 255, 135 / 255],
    cadetblue: [95 / 255, 158 / 255, 160 / 255],
    chartreuse: [127 / 255, 1, 0],
    chocolate: [210 / 255, 105 / 255, 30 / 255],
    coral: [1, 127 / 255, 80 / 255],
    cornflowerblue: [100 / 255, 149 / 255, 237 / 255],
    cornsilk: [1, 248 / 255, 220 / 255],
    crimson: [220 / 255, 20 / 255, 60 / 255],
    cyan: [0, 1, 1],
    darkblue: [0, 0, 139 / 255],
    darkcyan: [0, 139 / 255, 139 / 255],
    darkgoldenrod: [184 / 255, 134 / 255, 11 / 255],
    darkgray: [169 / 255, 169 / 255, 169 / 255],
    darkgreen: [0, 100 / 255, 0],
    darkgrey: [169 / 255, 169 / 255, 169 / 255],
    darkkhaki: [189 / 255, 183 / 255, 107 / 255],
    darkmagenta: [139 / 255, 0, 139 / 255],
    darkolivegreen: [85 / 255, 107 / 255, 47 / 255],
    darkorange: [1, 140 / 255, 0],
    darkorchid: [153 / 255, 50 / 255, 204 / 255],
    darkred: [139 / 255, 0, 0],
    darksalmon: [233 / 255, 150 / 255, 122 / 255],
    darkseagreen: [143 / 255, 188 / 255, 143 / 255],
    darkslateblue: [72 / 255, 61 / 255, 139 / 255],
    darkslategray: [47 / 255, 79 / 255, 79 / 255],
    darkslategrey: [47 / 255, 79 / 255, 79 / 255],
    darkturquoise: [0, 206 / 255, 209 / 255],
    darkviolet: [148 / 255, 0, 211 / 255],
    deeppink: [1, 20 / 255, 147 / 255],
    deepskyblue: [0, 191 / 255, 1],
    dimgray: [105 / 255, 105 / 255, 105 / 255],
    dimgrey: [105 / 255, 105 / 255, 105 / 255],
    dodgerblue: [30 / 255, 144 / 255, 1],
    firebrick: [178 / 255, 34 / 255, 34 / 255],
    floralwhite: [1, 250 / 255, 240 / 255],
    forestgreen: [34 / 255, 139 / 255, 34 / 255],
    fuchsia: [1, 0, 1],
    gainsboro: [220 / 255, 220 / 255, 220 / 255],
    ghostwhite: [248 / 255, 248 / 255, 1],
    gold: [1, 215 / 255, 0],
    goldenrod: [218 / 255, 165 / 255, 32 / 255],
    gray: [128 / 255, 128 / 255, 128 / 255],
    green: [0, 128 / 255, 0],
    greenyellow: [173 / 255, 1, 47 / 255],
    grey: [128 / 255, 128 / 255, 128 / 255],
    honeydew: [240 / 255, 1, 240 / 255],
    hotpink: [1, 105 / 255, 180 / 255],
    indianred: [205 / 255, 92 / 255, 92 / 255],
    indigo: [75 / 255, 0, 130 / 255],
    ivory: [1, 1, 240 / 255],
    khaki: [240 / 255, 230 / 255, 140 / 255],
    lavender: [230 / 255, 230 / 255, 250 / 255],
    lavenderblush: [1, 240 / 255, 245 / 255],
    lawngreen: [124 / 255, 252 / 255, 0],
    lemonchiffon: [1, 250 / 255, 205 / 255],
    lightblue: [173 / 255, 216 / 255, 230 / 255],
    lightcoral: [240 / 255, 128 / 255, 128 / 255],
    lightcyan: [224 / 255, 1, 1],
    lightgoldenrodyellow: [250 / 255, 250 / 255, 210 / 255],
    lightgray: [211 / 255, 211 / 255, 211 / 255],
    lightgreen: [144 / 255, 238 / 255, 144 / 255],
    lightgrey: [211 / 255, 211 / 255, 211 / 255],
    lightpink: [1, 182 / 255, 193 / 255],
    lightsalmon: [1, 160 / 255, 122 / 255],
    lightseagreen: [32 / 255, 178 / 255, 170 / 255],
    lightskyblue: [135 / 255, 206 / 255, 250 / 255],
    lightslategray: [119 / 255, 136 / 255, 153 / 255],
    lightslategrey: [119 / 255, 136 / 255, 153 / 255],
    lightsteelblue: [176 / 255, 196 / 255, 222 / 255],
    lightyellow: [1, 1, 224 / 255],
    lime: [0, 1, 0],
    limegreen: [50 / 255, 205 / 255, 50 / 255],
    linen: [250 / 255, 240 / 255, 230 / 255],
    magenta: [1, 0, 1],
    maroon: [128 / 255, 0, 0],
    mediumaquamarine: [102 / 255, 205 / 255, 170 / 255],
    mediumblue: [0, 0, 205 / 255],
    mediumorchid: [186 / 255, 85 / 255, 211 / 255],
    mediumpurple: [147 / 255, 112 / 255, 219 / 255],
    mediumseagreen: [60 / 255, 179 / 255, 113 / 255],
    mediumslateblue: [123 / 255, 104 / 255, 238 / 255],
    mediumspringgreen: [0, 250 / 255, 154 / 255],
    mediumturquoise: [72 / 255, 209 / 255, 204 / 255],
    mediumvioletred: [199 / 255, 21 / 255, 133 / 255],
    midnightblue: [25 / 255, 25 / 255, 112 / 255],
    mintcream: [245 / 255, 1, 250 / 255],
    mistyrose: [1, 228 / 255, 225 / 255],
    moccasin: [1, 228 / 255, 181 / 255],
    navajowhite: [1, 222 / 255, 173 / 255],
    navy: [0, 0, 128 / 255],
    oldlace: [253 / 255, 245 / 255, 230 / 255],
    olive: [128 / 255, 128 / 255, 0],
    olivedrab: [107 / 255, 142 / 255, 35 / 255],
    orange: [1, 165 / 255, 0],
    orangered: [1, 69 / 255, 0],
    orchid: [218 / 255, 112 / 255, 214 / 255],
    palegoldenrod: [238 / 255, 232 / 255, 170 / 255],
    palegreen: [152 / 255, 251 / 255, 152 / 255],
    paleturquoise: [175 / 255, 238 / 255, 238 / 255],
    palevioletred: [219 / 255, 112 / 255, 147 / 255],
    papayawhip: [1, 239 / 255, 213 / 255],
    peachpuff: [1, 218 / 255, 185 / 255],
    peru: [205 / 255, 133 / 255, 63 / 255],
    pink: [1, 192 / 255, 203 / 255],
    plum: [221 / 255, 160 / 255, 221 / 255],
    powderblue: [176 / 255, 224 / 255, 230 / 255],
    purple: [128 / 255, 0, 128 / 255],
    rebeccapurple: [102 / 255, 51 / 255, 153 / 255],
    red: [1, 0, 0],
    rosybrown: [188 / 255, 143 / 255, 143 / 255],
    royalblue: [65 / 255, 105 / 255, 225 / 255],
    saddlebrown: [139 / 255, 69 / 255, 19 / 255],
    salmon: [250 / 255, 128 / 255, 114 / 255],
    sandybrown: [244 / 255, 164 / 255, 96 / 255],
    seagreen: [46 / 255, 139 / 255, 87 / 255],
    seashell: [1, 245 / 255, 238 / 255],
    sienna: [160 / 255, 82 / 255, 45 / 255],
    silver: [192 / 255, 192 / 255, 192 / 255],
    skyblue: [135 / 255, 206 / 255, 235 / 255],
    slateblue: [106 / 255, 90 / 255, 205 / 255],
    slategray: [112 / 255, 128 / 255, 144 / 255],
    slategrey: [112 / 255, 128 / 255, 144 / 255],
    snow: [1, 250 / 255, 250 / 255],
    springgreen: [0, 1, 127 / 255],
    steelblue: [70 / 255, 130 / 255, 180 / 255],
    tan: [210 / 255, 180 / 255, 140 / 255],
    teal: [0, 128 / 255, 128 / 255],
    thistle: [216 / 255, 191 / 255, 216 / 255],
    tomato: [1, 99 / 255, 71 / 255],
    turquoise: [64 / 255, 224 / 255, 208 / 255],
    violet: [238 / 255, 130 / 255, 238 / 255],
    wheat: [245 / 255, 222 / 255, 179 / 255],
    white: [1, 1, 1],
    whitesmoke: [245 / 255, 245 / 255, 245 / 255],
    yellow: [1, 1, 0],
    yellowgreen: [154 / 255, 205 / 255, 50 / 255]
  };

  // packages/theme/node_modules/colorjs.io/src/spaces/srgb.js
  var coordGrammar = Array(3).fill("<percentage> | <number>[0, 255]");
  var coordGrammarNumber = Array(3).fill("<number>[0, 255]");
  var srgb_default = new RGBColorSpace({
    id: "srgb",
    name: "sRGB",
    base: srgb_linear_default,
    fromBase: (rgb) => {
      return rgb.map((val) => {
        let sign = val < 0 ? -1 : 1;
        let abs = val * sign;
        if (abs > 31308e-7) {
          return sign * (1.055 * abs ** (1 / 2.4) - 0.055);
        }
        return 12.92 * val;
      });
    },
    toBase: (rgb) => {
      return rgb.map((val) => {
        let sign = val < 0 ? -1 : 1;
        let abs = val * sign;
        if (abs <= 0.04045) {
          return val / 12.92;
        }
        return sign * ((abs + 0.055) / 1.055) ** 2.4;
      });
    },
    formats: {
      rgb: {
        coords: coordGrammar
      },
      rgb_number: {
        name: "rgb",
        commas: true,
        coords: coordGrammarNumber,
        alpha: false
      },
      color: {
        /* use defaults */
      },
      rgba: {
        coords: coordGrammar,
        commas: true,
        alpha: true
      },
      rgba_number: {
        name: "rgba",
        commas: true,
        coords: coordGrammarNumber
      },
      hex: {
        type: "custom",
        toGamut: true,
        test: (str) => /^#(([a-f0-9]{2}){3,4}|[a-f0-9]{3,4})$/i.test(str),
        parse(str) {
          if (str.length <= 5) {
            str = str.replace(/[a-f0-9]/gi, "$&$&");
          }
          let rgba = [];
          str.replace(/[a-f0-9]{2}/gi, (component) => {
            rgba.push(parseInt(component, 16) / 255);
          });
          return {
            spaceId: "srgb",
            coords: (
              /** @type {Coords} */
              rgba.slice(0, 3)
            ),
            alpha: (
              /** @type {number} */
              rgba.slice(3)[0]
            )
          };
        },
        serialize: (coords, alpha, {
          collapse = true,
          // collapse to 3-4 digit hex when possible?
          alpha: alphaFormat
        } = {}) => {
          if (alphaFormat !== false && alpha < 1 || alphaFormat === true) {
            coords.push(alpha);
          }
          coords = /** @type {[number, number, number]} */
          coords.map((c) => Math.round(c * 255));
          let collapsible = collapse && coords.every((c) => c % 17 === 0);
          let hex = coords.map((c) => {
            if (collapsible) {
              return (c / 17).toString(16);
            }
            return c.toString(16).padStart(2, "0");
          }).join("");
          return "#" + hex;
        }
      },
      keyword: {
        type: "custom",
        test: (str) => /^[a-z]+$/i.test(str),
        parse(str) {
          str = str.toLowerCase();
          let ret = { spaceId: "srgb", coords: null, alpha: 1 };
          if (str === "transparent") {
            ret.coords = keywords_default.black;
            ret.alpha = 0;
          } else {
            ret.coords = keywords_default[str];
          }
          if (ret.coords) {
            return ret;
          }
        }
      }
    }
  });

  // packages/theme/node_modules/colorjs.io/src/spaces/p3.js
  var p3_default = new RGBColorSpace({
    id: "p3",
    cssId: "display-p3",
    name: "P3",
    base: p3_linear_default,
    // Gamma encoding/decoding is the same as sRGB
    fromBase: srgb_default.fromBase,
    toBase: srgb_default.toBase
  });

  // packages/theme/node_modules/colorjs.io/src/luminance.js
  function getLuminance(color) {
    return get(color, [xyz_d65_default, "y"]);
  }

  // packages/theme/node_modules/colorjs.io/src/contrast/WCAG21.js
  function contrastWCAG21(color1, color2) {
    color1 = getColor(color1);
    color2 = getColor(color2);
    let Y1 = Math.max(getLuminance(color1), 0);
    let Y2 = Math.max(getLuminance(color2), 0);
    if (Y2 > Y1) {
      [Y1, Y2] = [Y2, Y1];
    }
    return (Y1 + 0.05) / (Y2 + 0.05);
  }

  // packages/theme/node_modules/colorjs.io/src/spaces/hsl.js
  var hsl_default = new ColorSpace({
    id: "hsl",
    name: "HSL",
    coords: {
      h: {
        refRange: [0, 360],
        type: "angle",
        name: "Hue"
      },
      s: {
        range: [0, 100],
        name: "Saturation"
      },
      l: {
        range: [0, 100],
        name: "Lightness"
      }
    },
    base: srgb_default,
    // Adapted from https://drafts.csswg.org/css-color-4/better-rgbToHsl.js
    fromBase: (rgb) => {
      let max = Math.max(...rgb);
      let min = Math.min(...rgb);
      let [r, g2, b2] = rgb;
      let [h, s, l] = [null, 0, (min + max) / 2];
      let d2 = max - min;
      if (d2 !== 0) {
        s = l === 0 || l === 1 ? 0 : (max - l) / Math.min(l, 1 - l);
        switch (max) {
          case r:
            h = (g2 - b2) / d2 + (g2 < b2 ? 6 : 0);
            break;
          case g2:
            h = (b2 - r) / d2 + 2;
            break;
          case b2:
            h = (r - g2) / d2 + 4;
        }
        h = h * 60;
      }
      if (s < 0) {
        h += 180;
        s = Math.abs(s);
      }
      if (h >= 360) {
        h -= 360;
      }
      return [h, s * 100, l * 100];
    },
    // Adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#HSL_to_RGB_alternative
    toBase: (hsl) => {
      let [h, s, l] = hsl;
      h = h % 360;
      if (h < 0) {
        h += 360;
      }
      s /= 100;
      l /= 100;
      function f(n2) {
        let k = (n2 + h / 30) % 12;
        let a = s * Math.min(l, 1 - l);
        return l - a * Math.max(-1, Math.min(k - 3, 9 - k, 1));
      }
      return [f(0), f(8), f(4)];
    },
    formats: {
      hsl: {
        coords: ["<number> | <angle>", "<percentage> | <number>", "<percentage> | <number>"]
      },
      hsla: {
        coords: ["<number> | <angle>", "<percentage> | <number>", "<percentage> | <number>"],
        commas: true,
        alpha: true
      }
    }
  });

  // packages/theme/node_modules/colorjs.io/src/spaces/oklch.js
  var oklch_default = new ColorSpace({
    id: "oklch",
    name: "OkLCh",
    coords: {
      l: {
        refRange: [0, 1],
        name: "Lightness"
      },
      c: {
        refRange: [0, 0.4],
        name: "Chroma"
      },
      h: {
        refRange: [0, 360],
        type: "angle",
        name: "Hue"
      }
    },
    white: "D65",
    base: oklab_default,
    fromBase: lch_default.fromBase,
    toBase: lch_default.toBase,
    formats: {
      oklch: {
        coords: ["<percentage> | <number>", "<number> | <percentage>", "<number> | <angle>"]
      }
    }
  });

  // node_modules/memize/dist/index.js
  function memize(fn, options) {
    var size = 0;
    var head;
    var tail;
    options = options || {};
    function memoized() {
      var node = head, len = arguments.length, args, i;
      searchCache: while (node) {
        if (node.args.length !== arguments.length) {
          node = node.next;
          continue;
        }
        for (i = 0; i < len; i++) {
          if (node.args[i] !== arguments[i]) {
            node = node.next;
            continue searchCache;
          }
        }
        if (node !== head) {
          if (node === tail) {
            tail = node.prev;
          }
          node.prev.next = node.next;
          if (node.next) {
            node.next.prev = node.prev;
          }
          node.next = head;
          node.prev = null;
          head.prev = node;
          head = node;
        }
        return node.val;
      }
      args = new Array(len);
      for (i = 0; i < len; i++) {
        args[i] = arguments[i];
      }
      node = {
        args,
        // Generate the result from original function
        val: fn.apply(null, args)
      };
      if (head) {
        head.prev = node;
        node.next = head;
      } else {
        tail = node;
      }
      if (size === /** @type {MemizeOptions} */
      options.maxSize) {
        tail = /** @type {MemizeCacheNode} */
        tail.prev;
        tail.next = null;
      } else {
        size++;
      }
      head = node;
      return node.val;
    }
    memoized.clear = function() {
      head = null;
      tail = null;
      size = 0;
    };
    return memoized;
  }

  // packages/theme/build-module/use-theme-provider-styles.mjs
  var import_element2 = __toESM(require_element(), 1);

  // packages/theme/build-module/color-ramps/lib/register-color-spaces.mjs
  ColorSpace.register(srgb_default);
  ColorSpace.register(oklch_default);
  ColorSpace.register(p3_default);
  ColorSpace.register(hsl_default);

  // packages/theme/build-module/prebuilt/ts/color-tokens.mjs
  var color_tokens_default = {
    "primary-bgFill1": ["bg-interactive-brand-strong"],
    "primary-fgFill": [
      "fg-interactive-brand-strong",
      "fg-interactive-brand-strong-active"
    ],
    "primary-bgFill2": ["bg-interactive-brand-strong-active"],
    "primary-surface4": ["bg-interactive-brand-weak-active"],
    "primary-fgSurface3": [
      "fg-interactive-brand",
      "fg-interactive-brand-active"
    ],
    "primary-stroke3": [
      "bg-thumb-brand",
      "bg-thumb-brand-active",
      "stroke-focus-brand",
      "stroke-interactive-brand",
      "stroke-surface-brand-strong"
    ],
    "primary-stroke4": ["stroke-interactive-brand-active"],
    "primary-stroke1": ["stroke-surface-brand"],
    "primary-surface1": ["bg-surface-brand"],
    "info-surface2": ["bg-surface-info-weak"],
    "info-surface4": ["bg-surface-info"],
    "info-fgSurface4": ["fg-content-info"],
    "info-fgSurface3": ["fg-content-info-weak"],
    "info-stroke3": ["stroke-surface-info-strong"],
    "info-stroke1": ["stroke-surface-info"],
    "success-surface2": ["bg-surface-success-weak"],
    "success-surface4": ["bg-surface-success"],
    "success-fgSurface4": ["fg-content-success"],
    "success-fgSurface3": ["fg-content-success-weak"],
    "success-stroke3": ["stroke-surface-success-strong"],
    "success-stroke1": ["stroke-surface-success"],
    "warning-surface2": ["bg-surface-warning-weak"],
    "warning-surface4": ["bg-surface-warning"],
    "warning-fgSurface4": ["fg-content-warning"],
    "warning-fgSurface3": ["fg-content-warning-weak"],
    "warning-stroke3": ["stroke-surface-warning-strong"],
    "warning-stroke1": ["stroke-surface-warning"],
    "error-bgFill1": ["bg-interactive-error-strong"],
    "error-fgFill": [
      "fg-interactive-error-strong",
      "fg-interactive-error-strong-active"
    ],
    "error-bgFill2": ["bg-interactive-error-strong-active"],
    "error-surface2": [
      "bg-interactive-error-active",
      "bg-surface-error-weak"
    ],
    "error-surface4": [
      "bg-interactive-error-weak-active",
      "bg-surface-error"
    ],
    "error-fgSurface4": ["fg-content-error"],
    "error-fgSurface3": [
      "fg-content-error-weak",
      "fg-interactive-error",
      "fg-interactive-error-active"
    ],
    "error-stroke3": [
      "stroke-interactive-error",
      "stroke-interactive-error-strong",
      "stroke-surface-error-strong"
    ],
    "error-stroke4": ["stroke-interactive-error-active"],
    "error-stroke1": ["stroke-surface-error"],
    "bg-surface2": ["bg-surface-neutral"],
    "bg-surface5": ["bg-interactive-neutral-strong-disabled"],
    "bg-surface4": ["bg-interactive-neutral-weak-active"],
    "bg-surface3": ["bg-surface-neutral-strong"],
    "bg-fgSurface4": [
      "fg-content-neutral",
      "fg-interactive-neutral",
      "fg-interactive-neutral-active"
    ],
    "bg-fgSurface3": [
      "fg-content-neutral-weak",
      "fg-interactive-neutral-weak"
    ],
    "bg-fgSurface2": [
      "fg-interactive-neutral-disabled",
      "fg-interactive-neutral-strong-disabled",
      "fg-interactive-neutral-weak-disabled"
    ],
    "bg-stroke3": [
      "bg-thumb-neutral-weak",
      "stroke-interactive-neutral",
      "stroke-surface-neutral-strong"
    ],
    "bg-stroke4": [
      "bg-thumb-neutral-weak-active",
      "stroke-interactive-neutral-active",
      "stroke-interactive-neutral-strong"
    ],
    "bg-stroke2": [
      "bg-thumb-neutral-disabled",
      "bg-track-neutral",
      "stroke-interactive-neutral-disabled",
      "stroke-surface-neutral"
    ],
    "bg-stroke1": ["bg-track-neutral-weak", "stroke-surface-neutral-weak"],
    "bg-bgFillInverted2": ["bg-interactive-neutral-strong-active"],
    "bg-bgFillInverted1": ["bg-interactive-neutral-strong"],
    "bg-fgFillInverted": [
      "fg-interactive-neutral-strong",
      "fg-interactive-neutral-strong-active"
    ],
    "bg-surface1": ["bg-surface-neutral-weak"],
    "caution-surface2": ["bg-surface-caution-weak"],
    "caution-surface4": ["bg-surface-caution"],
    "caution-fgSurface4": ["fg-content-caution"],
    "caution-fgSurface3": ["fg-content-caution-weak"]
  };

  // packages/theme/build-module/color-ramps/lib/color-utils.mjs
  function getColorString(color) {
    const rgbRounded = serialize(to(color, srgb_default));
    return serialize(rgbRounded, { format: "hex" });
  }
  function getContrast(colorA, colorB) {
    return contrastWCAG21(colorA, colorB);
  }
  function clampToGamut(c) {
    return to(toGamut(c, { space: srgb_default, method: "css" }), oklch_default);
  }

  // packages/theme/build-module/color-ramps/lib/constants.mjs
  var WHITE = to("white", oklch_default);
  var BLACK = to("black", oklch_default);
  var UNIVERSAL_CONTRAST_TOPUP = 0.02;
  var WHITE_TEXT_CONTRAST_MARGIN = 3.1;
  var ACCENT_SCALE_BASE_LIGHTNESS_THRESHOLDS = {
    lighter: { min: 0.2, max: 0.4 },
    darker: { min: 0.75, max: 0.98 }
  };
  var CONTRAST_EPSILON = 4e-3;
  var MAX_BISECTION_ITERATIONS = 10;
  var DEFAULT_SEED_COLORS = {
    bg: "#f8f8f8",
    primary: "#3858e9",
    info: "#0090ff",
    success: "#4ab866",
    caution: "#f0d149",
    warning: "#f0b849",
    error: "#cc1818"
  };

  // packages/theme/build-module/color-ramps/lib/utils.mjs
  function buildDependencyGraph(config) {
    const dependencies = /* @__PURE__ */ new Map();
    const dependents = /* @__PURE__ */ new Map();
    Object.keys(config).forEach((step) => {
      dependencies.set(step, []);
    });
    dependents.set("seed", []);
    Object.keys(config).forEach((step) => {
      dependents.set(step, []);
    });
    Object.entries(config).forEach(([stepName, stepConfig]) => {
      const step = stepName;
      const reference = stepConfig.contrast.reference;
      dependencies.get(step).push(reference);
      dependents.get(reference).push(step);
      if (stepConfig.sameAsIfPossible) {
        dependencies.get(step).push(stepConfig.sameAsIfPossible);
        dependents.get(stepConfig.sameAsIfPossible).push(step);
      }
    });
    return { dependencies, dependents };
  }
  function sortByDependency(config) {
    const { dependents } = buildDependencyGraph(config);
    const result = [];
    const visited = /* @__PURE__ */ new Set();
    const visiting = /* @__PURE__ */ new Set();
    function visit(node) {
      if (visiting.has(node)) {
        throw new Error(
          `Circular dependency detected involving step: ${String(
            node
          )}`
        );
      }
      if (visited.has(node)) {
        return;
      }
      visiting.add(node);
      const nodeDependents = dependents.get(node) || [];
      nodeDependents.forEach((dependent) => {
        visit(dependent);
      });
      visiting.delete(node);
      visited.add(node);
      if (node !== "seed") {
        result.unshift(node);
      }
    }
    visit("seed");
    return result;
  }
  function stepsForStep(stepName, config) {
    const result = /* @__PURE__ */ new Set();
    function visit(step) {
      if (step === "seed" || result.has(step)) {
        return;
      }
      const stepConfig = config[step];
      if (!stepConfig) {
        return;
      }
      visit(stepConfig.contrast.reference);
      if (stepConfig.sameAsIfPossible) {
        visit(stepConfig.sameAsIfPossible);
      }
      result.add(step);
    }
    visit(stepName);
    return Array.from(result);
  }
  function computeBetterFgColorDirection(seed, preferLighter) {
    const contrastAgainstBlack = getContrast(seed, BLACK);
    const contrastAgainstWhite = getContrast(seed, WHITE);
    return contrastAgainstBlack > contrastAgainstWhite + (preferLighter ? WHITE_TEXT_CONTRAST_MARGIN : 0) ? { better: "darker", worse: "lighter" } : { better: "lighter", worse: "darker" };
  }
  function adjustContrastTarget(target) {
    if (target === 1) {
      return 1;
    }
    return target + UNIVERSAL_CONTRAST_TOPUP;
  }
  function clampAccentScaleReferenceLightness(rawLightness, direction) {
    const thresholds = ACCENT_SCALE_BASE_LIGHTNESS_THRESHOLDS[direction];
    return Math.max(thresholds.min, Math.min(thresholds.max, rawLightness));
  }
  function solveWithBisect(calculateC, calculateValue, initLowerL, initLowerValue, initUpperL, initUpperValue) {
    let lowerL = initLowerL;
    let lowerValue = initLowerValue;
    let lowerReplaced = false;
    let upperL = initUpperL;
    let upperValue = initUpperValue;
    let upperReplaced = false;
    let bestC;
    let bestValue;
    let iterations = 0;
    while (true) {
      iterations++;
      const newL = (lowerL * upperValue - upperL * lowerValue) / (upperValue - lowerValue);
      bestC = calculateC(newL);
      bestValue = calculateValue(bestC);
      if (Math.abs(bestValue) <= CONTRAST_EPSILON || iterations >= MAX_BISECTION_ITERATIONS) {
        break;
      }
      if (bestValue <= 0) {
        lowerL = newL;
        lowerValue = bestValue;
        if (lowerReplaced) {
          upperValue /= 2;
        }
        lowerReplaced = true;
        upperReplaced = false;
      } else {
        upperL = newL;
        upperValue = bestValue;
        if (upperReplaced) {
          lowerValue /= 2;
        }
        upperReplaced = true;
        lowerReplaced = false;
      }
    }
    return bestC;
  }

  // packages/theme/build-module/color-ramps/lib/taper-chroma.mjs
  function taperChroma(seed, lTarget, options = {}) {
    const gamut = options.gamut ?? srgb_default;
    const alpha = options.alpha ?? 0.65;
    const carry = options.carry ?? 0.5;
    const cUpperBound = options.cUpperBound ?? 0.45;
    const radiusLight = options.radiusLight ?? 0.2;
    const radiusDark = options.radiusDark ?? 0.2;
    const kLight = options.kLight ?? 0.85;
    const kDark = options.kDark ?? 0.85;
    const achromaEpsilon = options.achromaEpsilon ?? 5e-3;
    const cSeed = Math.max(0, get(seed, [oklch_default, "c"]));
    let hSeed = get(seed, [oklch_default, "h"]);
    const chromaIsTiny = cSeed < achromaEpsilon;
    const hueIsInvalid = hSeed === null || !Number.isFinite(hSeed);
    if (chromaIsTiny || hueIsInvalid) {
      if (typeof options.hueFallback === "number") {
        hSeed = normalizeHue(options.hueFallback);
      } else {
        return {
          space: oklch_default,
          coords: [clamp01(lTarget), 0, 0],
          alpha: 1
        };
      }
    }
    const lSeed = clamp01(get(seed, [oklch_default, "l"]));
    const cmaxSeed = getCachedMaxChromaAtLH(lSeed, hSeed, gamut, cUpperBound);
    const cmaxTarget = getCachedMaxChromaAtLH(
      clamp01(lTarget),
      hSeed,
      gamut,
      cUpperBound
    );
    let seedRelative = 0;
    const denom = cmaxSeed > 0 ? cmaxSeed : 1e-6;
    seedRelative = clamp01(cSeed / denom);
    const cIntendedBase = alpha * cmaxTarget;
    const cWithCarry = cIntendedBase * Math.pow(seedRelative, clamp01(carry));
    const t = continuousTaper(lSeed, lTarget, {
      radiusLight,
      radiusDark,
      kLight,
      kDark
    });
    const cPlanned = cWithCarry * t;
    const lOut = clamp01(lTarget);
    return { l: lOut, c: cPlanned };
  }
  function clamp01(x) {
    if (x < 0) {
      return 0;
    }
    if (x > 1) {
      return 1;
    }
    return x;
  }
  function normalizeHue(h) {
    let hue = h % 360;
    if (hue < 0) {
      hue += 360;
    }
    return hue;
  }
  function raisedCosine(u) {
    const x = clamp01(u);
    return 0.5 - 0.5 * Math.cos(Math.PI * x);
  }
  function continuousTaper(seedL, targetL, opts) {
    const d2 = targetL - seedL;
    if (d2 >= 0) {
      const u2 = opts.radiusLight > 0 ? Math.abs(d2) / opts.radiusLight : 1;
      const w2 = raisedCosine(u2 > 1 ? 1 : u2);
      return 1 - (1 - opts.kLight) * w2;
    }
    const u = opts.radiusDark > 0 ? Math.abs(d2) / opts.radiusDark : 1;
    const w = raisedCosine(u > 1 ? 1 : u);
    return 1 - (1 - opts.kDark) * w;
  }
  var maxChromaCache = /* @__PURE__ */ new Map();
  function keyMax(l, h, gamut, cap) {
    const lq = quantize(l, 0.05);
    const hq = quantize(normalizeHue(h), 10);
    const cq = quantize(cap, 0.05);
    return `${gamut}|L:${lq}|H:${hq}|cap:${cq}`;
  }
  function quantize(x, step) {
    const k = Math.round(x / step);
    return k * step;
  }
  function getCachedMaxChromaAtLH(l, h, gamutSpace, cap) {
    const gamut = gamutSpace.id;
    const key = keyMax(l, h, gamut, cap);
    const hit = maxChromaCache.get(key);
    if (typeof hit === "number") {
      return hit;
    }
    const computed = maxInGamutChromaAtLH(l, h, gamutSpace, cap);
    maxChromaCache.set(key, computed);
    return computed;
  }
  function maxInGamutChromaAtLH(l, h, gamutSpace, cap) {
    const probe = {
      space: oklch_default,
      coords: [l, cap, h],
      alpha: 1
    };
    const clamped = toGamut(probe, { space: gamutSpace, method: "css" });
    return get(clamped, [oklch_default, "c"]);
  }

  // packages/theme/build-module/color-ramps/lib/find-color-with-constraints.mjs
  function cdiff(c13, c23) {
    return Math.log(c13 / c23);
  }
  function findColorMeetingRequirements(reference, seed, target, direction, {
    lightnessConstraint,
    taperChromaOptions
  } = {}) {
    if (target <= 1) {
      return {
        color: reference,
        reached: true,
        achieved: 1
      };
    }
    function getColorForL(l) {
      let newL = l;
      let newC = get(seed, [oklch_default, "c"]);
      if (taperChromaOptions) {
        const tapered = taperChroma(seed, newL, taperChromaOptions);
        if ("l" in tapered && "c" in tapered) {
          newL = tapered.l;
          newC = tapered.c;
        } else {
          return tapered;
        }
      }
      return clampToGamut({
        spaceId: "oklch",
        coords: [newL, newC, get(seed, [oklch_default, "h"])]
      });
    }
    const mostContrastingL = direction === "lighter" ? 1 : 0;
    const mostContrastingColor = direction === "lighter" ? WHITE : BLACK;
    const highestContrast = getContrast(reference, mostContrastingColor);
    if (lightnessConstraint) {
      const colorWithExactL = getColorForL(lightnessConstraint.value);
      const exactLContrast = getContrast(reference, colorWithExactL);
      const exactLContrastMeetsTarget = cdiff(exactLContrast, target) >= -CONTRAST_EPSILON;
      if (exactLContrastMeetsTarget || lightnessConstraint.type === "force") {
        return {
          color: colorWithExactL,
          reached: exactLContrastMeetsTarget,
          achieved: exactLContrast,
          deficit: exactLContrastMeetsTarget ? cdiff(exactLContrast, highestContrast) : cdiff(target, exactLContrast)
        };
      }
    }
    if (cdiff(highestContrast, target) <= CONTRAST_EPSILON) {
      return {
        color: mostContrastingColor,
        reached: cdiff(highestContrast, target) >= -CONTRAST_EPSILON,
        achieved: highestContrast,
        deficit: cdiff(target, highestContrast)
      };
    }
    const lowerL = get(reference, [oklch_default, "l"]);
    const lowerContrast = cdiff(1, target);
    const upperL = mostContrastingL;
    const upperContrast = cdiff(highestContrast, target);
    const bestColor = solveWithBisect(
      getColorForL,
      (c) => cdiff(getContrast(reference, c), target),
      lowerL,
      lowerContrast,
      upperL,
      upperContrast
    );
    return {
      color: bestColor,
      reached: true,
      achieved: target,
      // Negative number that specifies how much room we have.
      deficit: cdiff(target, highestContrast)
    };
  }

  // packages/theme/build-module/color-ramps/lib/index.mjs
  function calculateRamp({
    seed,
    sortedSteps,
    config,
    mainDir,
    oppDir,
    pinLightness
  }) {
    const rampResults = {};
    let warnings;
    let maxDeficit = -Infinity;
    let maxDeficitDirection = "lighter";
    let maxDeficitStep;
    const calculatedColors = /* @__PURE__ */ new Map();
    calculatedColors.set("seed", seed);
    for (const stepName of sortedSteps) {
      let computeDirection = function(color, followDirection) {
        if (followDirection === "main") {
          return mainDir;
        }
        if (followDirection === "opposite") {
          return oppDir;
        }
        if (followDirection === "best") {
          return computeBetterFgColorDirection(
            color,
            contrast.preferLighter
          ).better;
        }
        return followDirection;
      };
      const {
        contrast,
        lightness: stepLightnessConstraint,
        taperChromaOptions,
        sameAsIfPossible
      } = config[stepName];
      const referenceColor = calculatedColors.get(contrast.reference);
      if (!referenceColor) {
        throw new Error(
          `Reference color for step ${stepName} not found: ${contrast.reference}`
        );
      }
      if (sameAsIfPossible) {
        const candidateColor = calculatedColors.get(sameAsIfPossible);
        if (!candidateColor) {
          throw new Error(
            `Same-as color for step ${stepName} not found: ${sameAsIfPossible}`
          );
        }
        const candidateContrast = getContrast(
          referenceColor,
          candidateColor
        );
        const adjustedTarget2 = adjustContrastTarget(contrast.target);
        if (candidateContrast >= adjustedTarget2) {
          calculatedColors.set(stepName, candidateColor);
          rampResults[stepName] = getColorString(candidateColor);
          continue;
        }
      }
      const computedDir = computeDirection(
        referenceColor,
        contrast.followDirection
      );
      const adjustedTarget = adjustContrastTarget(contrast.target);
      let lightnessConstraint;
      if (pinLightness?.stepName === stepName) {
        lightnessConstraint = {
          value: pinLightness.value,
          type: "force"
        };
      } else if (stepLightnessConstraint) {
        lightnessConstraint = {
          value: stepLightnessConstraint(computedDir),
          type: "onlyIfSucceeds"
        };
      }
      const searchResults = findColorMeetingRequirements(
        referenceColor,
        seed,
        adjustedTarget,
        computedDir,
        {
          lightnessConstraint,
          taperChromaOptions
        }
      );
      if (!contrast.ignoreWhenAdjustingSeed && searchResults.deficit && searchResults.deficit > maxDeficit) {
        maxDeficit = searchResults.deficit;
        maxDeficitDirection = computedDir;
        maxDeficitStep = stepName;
      }
      calculatedColors.set(stepName, searchResults.color);
      rampResults[stepName] = getColorString(searchResults.color);
      if (!searchResults.reached && !contrast.ignoreWhenAdjustingSeed) {
        warnings ??= [];
        warnings.push(stepName);
      }
    }
    return {
      rampResults,
      warnings,
      maxDeficit,
      maxDeficitDirection,
      maxDeficitStep
    };
  }
  function buildRamp(seedArg, config, {
    mainDirection,
    pinLightness,
    rescaleToFitContrastTargets = true
  } = {}) {
    let seed;
    try {
      seed = clampToGamut(seedArg);
    } catch (error) {
      throw new Error(
        `Invalid seed color "${seedArg}": ${error instanceof Error ? error.message : "Unknown error"}`
      );
    }
    let mainDir = "lighter";
    let oppDir = "darker";
    if (mainDirection) {
      mainDir = mainDirection;
      oppDir = mainDirection === "darker" ? "lighter" : "darker";
    } else {
      const { better, worse } = computeBetterFgColorDirection(seed);
      mainDir = better;
      oppDir = worse;
    }
    const sortedSteps = sortByDependency(config);
    const {
      rampResults,
      warnings,
      maxDeficit,
      maxDeficitDirection,
      maxDeficitStep
    } = calculateRamp({
      seed,
      sortedSteps,
      config,
      mainDir,
      oppDir,
      pinLightness
    });
    let bestRamp = rampResults;
    if (maxDeficit > CONTRAST_EPSILON && rescaleToFitContrastTargets) {
      let getSeedForL = function(l) {
        return clampToGamut(set(clone(seed), [oklch_default, "l"], l));
      }, getDeficitForSeed = function(s) {
        const iterationResults = calculateRamp({
          seed: s,
          sortedSteps: iterSteps,
          config,
          mainDir,
          oppDir,
          pinLightness
        });
        return iterationResults.maxDeficitDirection === maxDeficitDirection ? iterationResults.maxDeficit : -maxDeficit;
      };
      const iterSteps = stepsForStep(maxDeficitStep, config);
      const lowerSeedL = maxDeficitDirection === "lighter" ? 0 : 1;
      const lowerDeficit = -maxDeficit;
      const upperSeedL = get(seed, [oklch_default, "l"]);
      const upperDeficit = maxDeficit;
      const bestSeed = solveWithBisect(
        getSeedForL,
        getDeficitForSeed,
        lowerSeedL,
        lowerDeficit,
        upperSeedL,
        upperDeficit
      );
      bestRamp = calculateRamp({
        seed: bestSeed,
        sortedSteps,
        config,
        mainDir,
        oppDir,
        pinLightness
      }).rampResults;
    }
    if (mainDir === "darker") {
      const tmpSurface1 = bestRamp.surface1;
      bestRamp.surface1 = bestRamp.surface3;
      bestRamp.surface3 = tmpSurface1;
    }
    return {
      ramp: bestRamp,
      warnings,
      direction: mainDir
    };
  }

  // packages/theme/build-module/color-ramps/lib/ramp-configs.mjs
  var lightnessConstraintForegroundHighContrast = (direction) => direction === "lighter" ? 0.9551 : 0.235;
  var lightnessConstraintForegroundMediumContrast = (direction) => direction === "lighter" ? 0.77 : 0.56;
  var lightnessConstraintBgFill = (direction) => direction === "lighter" ? 0.67 : 0.45;
  var BG_SURFACE_TAPER_CHROMA = {
    alpha: 0.7
  };
  var FG_TAPER_CHROMA = {
    alpha: 0.6,
    kLight: 0.2,
    kDark: 0.2
  };
  var STROKE_TAPER_CHROMA = {
    alpha: 0.6,
    radiusDark: 0.01,
    radiusLight: 0.01,
    kLight: 0.8,
    kDark: 0.8
  };
  var ACCENT_SURFACE_TAPER_CHROMA = {
    alpha: 0.75,
    radiusDark: 0.01,
    radiusLight: 0.01
  };
  var fgSurface4Config = {
    contrast: {
      reference: "surface3",
      followDirection: "main",
      target: 7,
      preferLighter: true
    },
    lightness: lightnessConstraintForegroundHighContrast,
    taperChromaOptions: FG_TAPER_CHROMA
  };
  var BG_RAMP_CONFIG = {
    // Surface
    surface1: {
      contrast: {
        reference: "surface2",
        followDirection: "opposite",
        target: 1.06,
        ignoreWhenAdjustingSeed: true
      },
      taperChromaOptions: BG_SURFACE_TAPER_CHROMA
    },
    surface2: {
      contrast: {
        reference: "seed",
        followDirection: "main",
        target: 1
      }
    },
    surface3: {
      contrast: {
        reference: "surface2",
        followDirection: "main",
        target: 1.06
      },
      taperChromaOptions: BG_SURFACE_TAPER_CHROMA
    },
    surface4: {
      contrast: {
        reference: "surface2",
        followDirection: "main",
        target: 1.12
      },
      taperChromaOptions: BG_SURFACE_TAPER_CHROMA
    },
    surface5: {
      contrast: {
        reference: "surface2",
        followDirection: "main",
        target: 1.2
      },
      taperChromaOptions: BG_SURFACE_TAPER_CHROMA
    },
    surface6: {
      contrast: {
        reference: "surface2",
        followDirection: "main",
        target: 1.4
      },
      taperChromaOptions: BG_SURFACE_TAPER_CHROMA
    },
    // Bg fill
    bgFill1: {
      contrast: {
        reference: "surface2",
        followDirection: "main",
        target: 4
      },
      lightness: lightnessConstraintBgFill
    },
    bgFill2: {
      contrast: {
        reference: "bgFill1",
        followDirection: "main",
        target: 1.2
      }
    },
    bgFillInverted1: {
      contrast: {
        reference: "bgFillInverted2",
        followDirection: "opposite",
        target: 1.2
      }
    },
    bgFillInverted2: fgSurface4Config,
    bgFillDark: {
      contrast: {
        reference: "surface3",
        followDirection: "darker",
        // This is what causes the token to be always dark
        target: 7,
        ignoreWhenAdjustingSeed: true
      },
      lightness: lightnessConstraintForegroundHighContrast,
      taperChromaOptions: FG_TAPER_CHROMA
    },
    // Stroke
    stroke1: {
      contrast: {
        reference: "stroke3",
        followDirection: "opposite",
        target: 2.6
      },
      taperChromaOptions: STROKE_TAPER_CHROMA
    },
    stroke2: {
      contrast: {
        reference: "stroke3",
        followDirection: "opposite",
        target: 2.4
      },
      taperChromaOptions: STROKE_TAPER_CHROMA
    },
    stroke3: {
      contrast: {
        reference: "surface3",
        followDirection: "main",
        target: 3
      },
      taperChromaOptions: STROKE_TAPER_CHROMA
    },
    stroke4: {
      contrast: {
        reference: "stroke3",
        followDirection: "main",
        target: 1.5
      },
      taperChromaOptions: STROKE_TAPER_CHROMA
    },
    // fgSurface
    fgSurface1: {
      contrast: {
        reference: "surface3",
        followDirection: "main",
        target: 2,
        preferLighter: true
      },
      taperChromaOptions: FG_TAPER_CHROMA
    },
    fgSurface2: {
      contrast: {
        reference: "surface3",
        followDirection: "main",
        target: 3,
        preferLighter: true
      },
      taperChromaOptions: FG_TAPER_CHROMA
    },
    fgSurface3: {
      contrast: {
        reference: "surface3",
        followDirection: "main",
        target: 4.5,
        preferLighter: true
      },
      lightness: lightnessConstraintForegroundMediumContrast,
      taperChromaOptions: FG_TAPER_CHROMA
    },
    fgSurface4: fgSurface4Config,
    // fgFill
    fgFill: {
      contrast: {
        reference: "bgFill1",
        followDirection: "best",
        target: 4.5,
        preferLighter: true
      },
      lightness: lightnessConstraintForegroundHighContrast,
      taperChromaOptions: FG_TAPER_CHROMA
    },
    fgFillInverted: {
      contrast: {
        reference: "bgFillInverted1",
        followDirection: "best",
        target: 4.5,
        preferLighter: true
      },
      lightness: lightnessConstraintForegroundHighContrast,
      taperChromaOptions: FG_TAPER_CHROMA
    },
    fgFillDark: {
      contrast: {
        reference: "bgFillDark",
        followDirection: "best",
        target: 4.5,
        preferLighter: true
      },
      lightness: lightnessConstraintForegroundHighContrast,
      taperChromaOptions: FG_TAPER_CHROMA
    }
  };
  var ACCENT_RAMP_CONFIG = {
    ...BG_RAMP_CONFIG,
    surface1: {
      ...BG_RAMP_CONFIG.surface1,
      taperChromaOptions: ACCENT_SURFACE_TAPER_CHROMA
    },
    surface2: {
      contrast: {
        reference: "bgFill1",
        followDirection: "opposite",
        target: BG_RAMP_CONFIG.bgFill1.contrast.target,
        ignoreWhenAdjustingSeed: true
      },
      taperChromaOptions: ACCENT_SURFACE_TAPER_CHROMA
    },
    surface3: {
      ...BG_RAMP_CONFIG.surface3,
      taperChromaOptions: ACCENT_SURFACE_TAPER_CHROMA
    },
    surface4: {
      ...BG_RAMP_CONFIG.surface4,
      taperChromaOptions: ACCENT_SURFACE_TAPER_CHROMA
    },
    surface5: {
      ...BG_RAMP_CONFIG.surface5,
      taperChromaOptions: ACCENT_SURFACE_TAPER_CHROMA
    },
    surface6: {
      ...BG_RAMP_CONFIG.surface6,
      taperChromaOptions: ACCENT_SURFACE_TAPER_CHROMA
    },
    bgFill1: {
      contrast: {
        reference: "seed",
        followDirection: "main",
        target: 1
      }
    },
    stroke1: {
      ...BG_RAMP_CONFIG.stroke1
    },
    stroke2: {
      ...BG_RAMP_CONFIG.stroke2
    },
    stroke3: {
      ...BG_RAMP_CONFIG.stroke3,
      sameAsIfPossible: "fgSurface3",
      taperChromaOptions: void 0
    },
    stroke4: {
      ...BG_RAMP_CONFIG.stroke4,
      taperChromaOptions: void 0
    },
    // fgSurface: do not de-saturate
    fgSurface1: {
      ...BG_RAMP_CONFIG.fgSurface1,
      taperChromaOptions: void 0
    },
    fgSurface2: {
      ...BG_RAMP_CONFIG.fgSurface2,
      taperChromaOptions: void 0
    },
    fgSurface3: {
      ...BG_RAMP_CONFIG.fgSurface3,
      taperChromaOptions: void 0,
      sameAsIfPossible: "bgFill1"
    },
    fgSurface4: {
      ...BG_RAMP_CONFIG.fgSurface4,
      taperChromaOptions: void 0
    }
  };

  // packages/theme/build-module/color-ramps/index.mjs
  function buildBgRamp(seed) {
    if (typeof seed !== "string" || seed.trim() === "") {
      throw new Error("Seed color must be a non-empty string");
    }
    return buildRamp(seed, BG_RAMP_CONFIG);
  }
  var STEP_TO_PIN = "surface2";
  function getBgRampInfo(ramp) {
    return {
      mainDirection: ramp.direction,
      pinLightness: {
        stepName: STEP_TO_PIN,
        value: clampAccentScaleReferenceLightness(
          get(ramp.ramp[STEP_TO_PIN], [oklch_default, "l"]),
          ramp.direction
        )
      }
    };
  }
  function buildAccentRamp(seed, bgRamp) {
    if (typeof seed !== "string" || seed.trim() === "") {
      throw new Error("Seed color must be a non-empty string");
    }
    const bgRampInfo = bgRamp ? getBgRampInfo(bgRamp) : void 0;
    return buildRamp(seed, ACCENT_RAMP_CONFIG, bgRampInfo);
  }

  // packages/theme/build-module/use-theme-provider-styles.mjs
  var getCachedBgRamp = memize(buildBgRamp, { maxSize: 10 });
  var getCachedAccentRamp = memize(buildAccentRamp, { maxSize: 10 });
  var legacyWpComponentsOverridesCSS = [
    ["--wp-components-color-accent", "var(--wp-admin-theme-color)"],
    [
      "--wp-components-color-accent-darker-10",
      "var(--wp-admin-theme-color-darker-10)"
    ],
    [
      "--wp-components-color-accent-darker-20",
      "var(--wp-admin-theme-color-darker-20)"
    ],
    [
      "--wp-components-color-accent-inverted",
      "var(--wpds-color-fg-interactive-brand-strong, #fff)"
    ],
    [
      "--wp-components-color-background",
      "var(--wpds-color-bg-surface-neutral-strong, #ffffff)"
    ],
    [
      "--wp-components-color-foreground",
      "var(--wpds-color-fg-content-neutral, #1e1e1e)"
    ],
    [
      "--wp-components-color-foreground-inverted",
      "var(--wpds-color-bg-surface-neutral, #f8f8f8)"
    ],
    [
      "--wp-components-color-gray-100",
      "var(--wpds-color-bg-surface-neutral, #f8f8f8)"
    ],
    [
      "--wp-components-color-gray-200",
      "var(--wpds-color-stroke-surface-neutral, #d8d8d8)"
    ],
    [
      "--wp-components-color-gray-300",
      "var(--wpds-color-stroke-surface-neutral, #d8d8d8)"
    ],
    [
      "--wp-components-color-gray-400",
      "var(--wpds-color-stroke-interactive-neutral, #8a8a8a)"
    ],
    [
      "--wp-components-color-gray-600",
      "var(--wpds-color-stroke-interactive-neutral, #8a8a8a)"
    ],
    [
      "--wp-components-color-gray-700",
      "var(--wpds-color-fg-content-neutral-weak, #6d6d6d)"
    ],
    [
      "--wp-components-color-gray-800",
      "var(--wpds-color-fg-content-neutral, #1e1e1e)"
    ]
  ];
  function customRgbFormat(color) {
    const rgb = to(color, srgb_default);
    return rgb.coords.map((n2) => Math.round((n2 ?? 0) * 255)).join(", ");
  }
  function legacyWpAdminThemeOverridesCSS(accent) {
    const parsedAccent = to(accent, hsl_default);
    const parsedL = parsedAccent.coords[2] ?? 0;
    const darker10 = set(
      clone(parsedAccent),
      [hsl_default, "l"],
      Math.max(0, parsedL - 5)
      // L reduced by 5%
    );
    const darker20 = set(
      clone(parsedAccent),
      [hsl_default, "l"],
      Math.max(0, parsedL - 10)
      // L reduced by 10%
    );
    return [
      ["--wp-admin-theme-color", getColorString(parsedAccent)],
      ["--wp-admin-theme-color--rgb", customRgbFormat(parsedAccent)],
      ["--wp-admin-theme-color-darker-10", getColorString(darker10)],
      [
        "--wp-admin-theme-color-darker-10--rgb",
        customRgbFormat(darker10)
      ],
      ["--wp-admin-theme-color-darker-20", getColorString(darker20)],
      [
        "--wp-admin-theme-color-darker-20--rgb",
        customRgbFormat(darker20)
      ]
    ];
  }
  function colorTokensCSS(computedColorRamps) {
    const entries = [];
    for (const [rampName, { ramp }] of computedColorRamps) {
      for (const [tokenName, tokenValue] of Object.entries(ramp)) {
        const key = `${rampName}-${tokenName}`;
        const aliasedBy = color_tokens_default[key] ?? [];
        for (const aliasedId of aliasedBy) {
          entries.push([`--wpds-color-${aliasedId}`, tokenValue]);
        }
      }
    }
    return entries;
  }
  function generateStyles({
    primary,
    computedColorRamps
  }) {
    return Object.fromEntries(
      [
        // Semantic color tokens
        colorTokensCSS(computedColorRamps),
        // Legacy overrides
        legacyWpAdminThemeOverridesCSS(primary),
        legacyWpComponentsOverridesCSS
      ].flat()
    );
  }
  function useThemeProviderStyles({
    color = {}
  } = {}) {
    const { resolvedSettings: inheritedSettings } = (0, import_element2.useContext)(ThemeContext);
    const primary = color.primary ?? inheritedSettings.color?.primary ?? DEFAULT_SEED_COLORS.primary;
    const bg = color.bg ?? inheritedSettings.color?.bg ?? DEFAULT_SEED_COLORS.bg;
    const resolvedSettings = (0, import_element2.useMemo)(
      () => ({
        color: {
          primary,
          bg
        }
      }),
      [primary, bg]
    );
    const themeProviderStyles = (0, import_element2.useMemo)(() => {
      const seeds = {
        ...DEFAULT_SEED_COLORS,
        bg,
        primary
      };
      const computedColorRamps = /* @__PURE__ */ new Map();
      const bgRamp = getCachedBgRamp(seeds.bg);
      Object.entries(seeds).forEach(([rampName, seed]) => {
        if (rampName === "bg") {
          computedColorRamps.set(rampName, bgRamp);
        } else {
          computedColorRamps.set(
            rampName,
            getCachedAccentRamp(seed, bgRamp)
          );
        }
      });
      return generateStyles({
        primary: seeds.primary,
        computedColorRamps
      });
    }, [primary, bg]);
    return {
      resolvedSettings,
      themeProviderStyles
    };
  }

  // packages/theme/build-module/theme-provider.mjs
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='662a5161a8']")) {
    const style = document.createElement("style");
    style.setAttribute("data-wp-hash", "662a5161a8");
    style.appendChild(document.createTextNode(".dba930ea7a9438fd__root{display:contents}"));
    document.head.appendChild(style);
  }
  var style_default = { "root": "dba930ea7a9438fd__root" };
  function cssObjectToText(values) {
    return Object.entries(values).map(([key, value]) => `${key}: ${value};`).join("");
  }
  function generateCSSSelector({
    instanceId,
    isRoot
  }) {
    const rootSel = `[data-wpds-root-provider="true"]`;
    const instanceIdSel = `[data-wpds-theme-provider-id="${instanceId}"]`;
    const selectors = [];
    if (isRoot) {
      selectors.push(
        `:root:has(.${style_default.root}${rootSel}${instanceIdSel})`
      );
    }
    selectors.push(`.${style_default.root}.${style_default.root}${instanceIdSel}`);
    return selectors.join(",");
  }
  var ThemeProvider = ({
    children,
    color = {},
    isRoot = false,
    density
  }) => {
    const instanceId = (0, import_element3.useId)();
    const { themeProviderStyles, resolvedSettings } = useThemeProviderStyles({
      color
    });
    const contextValue = (0, import_element3.useMemo)(
      () => ({
        resolvedSettings
      }),
      [resolvedSettings]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
      themeProviderStyles ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", { children: `${generateCSSSelector({
        instanceId,
        isRoot
      })} {${cssObjectToText(themeProviderStyles)}}` }) : null,
      /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
        "div",
        {
          "data-wpds-theme-provider-id": instanceId,
          "data-wpds-root-provider": isRoot,
          "data-wpds-density": density,
          className: style_default.root,
          children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThemeContext.Provider, { value: contextValue, children })
        }
      )
    ] });
  };

  // packages/theme/build-module/private-apis.mjs
  var privateApis = {};
  lock(privateApis, {
    ThemeProvider,
    useThemeProviderStyles
  });
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                                                                                                                                                                         dist/undo-manager.js                                                                                0000644                 00000012456 15212564037 0010437 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";
var wp;
(wp ||= {}).undoManager = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/is-shallow-equal
  var require_is_shallow_equal = __commonJS({
    "package-external:@wordpress/is-shallow-equal"(exports, module) {
      module.exports = window.wp.isShallowEqual;
    }
  });

  // packages/undo-manager/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    createUndoManager: () => createUndoManager
  });
  var import_is_shallow_equal = __toESM(require_is_shallow_equal(), 1);
  function mergeHistoryChanges(changes1, changes2) {
    const newChanges = { ...changes1 };
    Object.entries(changes2).forEach(([key, value]) => {
      if (newChanges[key]) {
        newChanges[key] = { ...newChanges[key], to: value.to };
      } else {
        newChanges[key] = value;
      }
    });
    return newChanges;
  }
  var addHistoryChangesIntoRecord = (record, changes) => {
    const existingChangesIndex = record?.findIndex(
      ({ id: recordIdentifier }) => {
        return typeof recordIdentifier === "string" ? recordIdentifier === changes.id : (0, import_is_shallow_equal.isShallowEqual)(recordIdentifier, changes.id);
      }
    );
    const nextRecord = [...record];
    if (existingChangesIndex !== -1) {
      nextRecord[existingChangesIndex] = {
        id: changes.id,
        changes: mergeHistoryChanges(
          nextRecord[existingChangesIndex].changes,
          changes.changes
        )
      };
    } else {
      nextRecord.push(changes);
    }
    return nextRecord;
  };
  function createUndoManager() {
    let history = [];
    let stagedRecord = [];
    let offset = 0;
    const dropPendingRedos = () => {
      history = history.slice(0, offset || void 0);
      offset = 0;
    };
    const appendStagedRecordToLatestHistoryRecord = () => {
      const index = history.length === 0 ? 0 : history.length - 1;
      let latestRecord = history[index] ?? [];
      stagedRecord.forEach((changes) => {
        latestRecord = addHistoryChangesIntoRecord(latestRecord, changes);
      });
      stagedRecord = [];
      history[index] = latestRecord;
    };
    const isRecordEmpty = (record) => {
      const filteredRecord = record.filter(({ changes }) => {
        return Object.values(changes).some(
          ({ from, to }) => typeof from !== "function" && typeof to !== "function" && !(0, import_is_shallow_equal.isShallowEqual)(from, to)
        );
      });
      return !filteredRecord.length;
    };
    return {
      addRecord(record, isStaged = false) {
        const isEmpty = !record || isRecordEmpty(record);
        if (isStaged) {
          if (isEmpty) {
            return;
          }
          record.forEach((changes) => {
            stagedRecord = addHistoryChangesIntoRecord(
              stagedRecord,
              changes
            );
          });
        } else {
          dropPendingRedos();
          if (stagedRecord.length) {
            appendStagedRecordToLatestHistoryRecord();
          }
          if (isEmpty) {
            return;
          }
          history.push(record);
        }
      },
      undo() {
        if (stagedRecord.length) {
          dropPendingRedos();
          appendStagedRecordToLatestHistoryRecord();
        }
        const undoRecord = history[history.length - 1 + offset];
        if (!undoRecord) {
          return;
        }
        offset -= 1;
        return undoRecord;
      },
      redo() {
        const redoRecord = history[history.length + offset];
        if (!redoRecord) {
          return;
        }
        offset += 1;
        return redoRecord;
      },
      hasUndo() {
        return !!history[history.length - 1 + offset];
      },
      hasRedo() {
        return !!history[history.length + offset];
      }
    };
  }
  return __toCommonJS(index_exports);
})();
                                                                                                                                                                                                                  dist/undo-manager.min.js                                                                            0000644                 00000003250 15212564040 0011203 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).undoManager=(()=>{var x=Object.create;var c=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty;var C=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),H=(e,t)=>{for(var n in t)c(e,n,{get:t[n],enumerable:!0})},u=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of w(t))!m.call(e,r)&&r!==n&&c(e,r,{get:()=>t[r],enumerable:!(o=E(t,r))||o.enumerable});return e};var S=(e,t,n)=>(n=e!=null?x(y(e)):{},u(t||!e||!e.__esModule?c(n,"default",{value:e,enumerable:!0}):n,e)),b=e=>u(c({},"__esModule",{value:!0}),e);var g=C((U,h)=>{h.exports=window.wp.isShallowEqual});var v={};H(v,{createUndoManager:()=>q});var a=S(g(),1);function j(e,t){let n={...e};return Object.entries(t).forEach(([o,r])=>{n[o]?n[o]={...n[o],to:r.to}:n[o]=r}),n}var p=(e,t)=>{let n=e?.findIndex(({id:r})=>typeof r=="string"?r===t.id:(0,a.isShallowEqual)(r,t.id)),o=[...e];return n!==-1?o[n]={id:t.id,changes:j(o[n].changes,t.changes)}:o.push(t),o};function q(){let e=[],t=[],n=0,o=()=>{e=e.slice(0,n||void 0),n=0},r=()=>{let s=e.length===0?0:e.length-1,i=e[s]??[];t.forEach(d=>{i=p(i,d)}),t=[],e[s]=i},R=s=>!s.filter(({changes:d})=>Object.values(d).some(({from:l,to:f})=>typeof l!="function"&&typeof f!="function"&&!(0,a.isShallowEqual)(l,f))).length;return{addRecord(s,i=!1){let d=!s||R(s);if(i){if(d)return;s.forEach(l=>{t=p(t,l)})}else{if(o(),t.length&&r(),d)return;e.push(s)}},undo(){t.length&&(o(),r());let s=e[e.length-1+n];if(s)return n-=1,s},redo(){let s=e[e.length+n];if(s)return n+=1,s},hasUndo(){return!!e[e.length-1+n]},hasRedo(){return!!e[e.length+n]}}}return b(v);})();
                                                                                                                                                                                                                                                                                                                                                        dist/upload-media.min.js                                                                            0000644                 00000056023 15212564040 0011175 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).uploadMedia=(()=>{var Xe=Object.create;var N=Object.defineProperty;var Ze=Object.getOwnPropertyDescriptor;var Ke=Object.getOwnPropertyNames;var Je=Object.getPrototypeOf,et=Object.prototype.hasOwnProperty;var tt=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var S=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),M=(e,t)=>{for(var r in t)N(e,r,{get:t[r],enumerable:!0})},pe=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Ke(t))!et.call(e,n)&&n!==r&&N(e,n,{get:()=>t[n],enumerable:!(o=Ze(t,n))||o.enumerable});return e};var y=(e,t,r)=>(r=e!=null?Xe(Je(e)):{},pe(t||!e||!e.__esModule?N(r,"default",{value:e,enumerable:!0}):r,e)),rt=e=>pe(N({},"__esModule",{value:!0}),e);var q=S((ur,me)=>{me.exports=window.wp.data});var he=S((_r,ye)=>{ye.exports=window.wp.url});var D=S((Pr,Ue)=>{Ue.exports=window.wp.i18n});var Oe=S((Hr,Fe)=>{Fe.exports=window.wp.blob});var De=S((no,Me)=>{Me.exports=window.wp.privateApis});var se=S((po,Ne)=>{Ne.exports=window.wp.element});var ke=S((mo,qe)=>{qe.exports=window.wp.compose});var ue=S((fo,Le)=>{Le.exports=window.ReactJSXRuntime});var ar={};M(ar,{MediaUploadProvider:()=>je,UploadError:()=>v,clearFeatureDetectionCache:()=>Ye,detectClientSideMediaSupport:()=>ce,isClientSideMediaSupported:()=>He,store:()=>P});var O=y(q(),1);var s=(e=>(e.Unknown="REDUX_UNKNOWN",e.Add="ADD_ITEM",e.Prepare="PREPARE_ITEM",e.Cancel="CANCEL_ITEM",e.Remove="REMOVE_ITEM",e.RetryItem="RETRY_ITEM",e.PauseItem="PAUSE_ITEM",e.ResumeItem="RESUME_ITEM",e.PauseQueue="PAUSE_QUEUE",e.ResumeQueue="RESUME_QUEUE",e.OperationStart="OPERATION_START",e.OperationFinish="OPERATION_FINISH",e.AddOperations="ADD_OPERATIONS",e.CacheBlobUrl="CACHE_BLOB_URL",e.RevokeBlobUrls="REVOKE_BLOB_URLS",e.UpdateProgress="UPDATE_PROGRESS",e.UpdateSettings="UPDATE_SETTINGS",e))(s||{}),w=(e=>(e.Queued="QUEUED",e.Processing="PROCESSING",e.Paused="PAUSED",e.Uploaded="UPLOADED",e.Error="ERROR",e))(w||{}),u=(e=>(e.Prepare="PREPARE",e.Upload="UPLOAD",e.ResizeCrop="RESIZE_CROP",e.Rotate="ROTATE",e.TranscodeImage="TRANSCODE_IMAGE",e.ThumbnailGeneration="THUMBNAIL_GENERATION",e.Finalize="FINALIZE",e))(u||{});var k="core/upload-media",de=5,fe=2,ge=["image/jpeg","image/png","image/gif","image/webp","image/avif"];var ot=()=>{},nt={queue:[],queueStatus:"active",blobUrls:{},settings:{mediaUpload:ot,maxConcurrentUploads:de,maxConcurrentImageProcessing:fe}};function it(e=nt,t={type:s.Unknown}){switch(t.type){case s.PauseQueue:return{...e,queueStatus:"paused"};case s.ResumeQueue:return{...e,queueStatus:"active"};case s.PauseItem:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,status:w.Paused}:r)};case s.ResumeItem:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,status:w.Processing}:r)};case s.Add:return{...e,queue:[...e.queue,t.item]};case s.Cancel:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,error:t.error}:r)};case s.RetryItem:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,status:w.Processing,error:void 0,retryCount:(r.retryCount??0)+1}:r)};case s.Remove:return{...e,queue:e.queue.filter(r=>r.id!==t.id)};case s.OperationStart:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,currentOperation:t.operation}:r)};case s.AddOperations:return{...e,queue:e.queue.map(r=>r.id!==t.id?r:{...r,operations:[...r.operations||[],...t.operations]})};case s.OperationFinish:return{...e,queue:e.queue.map(r=>{if(r.id!==t.id)return r;let o=r.operations?r.operations.slice(1):[],n=r.attachment||t.item.attachment?{...r.attachment,...t.item.attachment}:void 0;return{...r,currentOperation:void 0,operations:o,...t.item,attachment:n,additionalData:{...r.additionalData,...t.item.additionalData}}})};case s.CacheBlobUrl:{let r=e.blobUrls[t.id]||[];return{...e,blobUrls:{...e.blobUrls,[t.id]:[...r,t.blobUrl]}}}case s.RevokeBlobUrls:{let r={...e.blobUrls};return delete r[t.id],{...e,blobUrls:r}}case s.UpdateProgress:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,progress:t.progress}:r)};case s.UpdateSettings:return{...e,settings:{...e.settings,...t.settings}}}return e}var Z=it;var L={};M(L,{getItems:()=>at,getSettings:()=>lt,isUploading:()=>st,isUploadingById:()=>ct,isUploadingByUrl:()=>ut});function at(e){return e.queue}function st(e){return e.queue.length>=1}function ut(e,t){return e.queue.some(r=>r.attachment?.url===t||r.sourceUrl===t)}function ct(e,t){return e.queue.some(r=>r.attachment?.id===t||r.sourceAttachmentId===t)}function lt(e){return e.settings}var K={};M(K,{getActiveImageProcessingCount:()=>vt,getActiveUploadCount:()=>ht,getAllItems:()=>pt,getBlobUrls:()=>yt,getFailedItems:()=>wt,getItem:()=>mt,getItemProgress:()=>Et,getPausedUploadForPost:()=>gt,getPendingImageProcessing:()=>bt,getPendingUploads:()=>Ut,hasPendingItemsByParentId:()=>Rt,isBatchUploaded:()=>dt,isPaused:()=>It,isUploadingToPost:()=>ft});function pt(e){return e.queue}function mt(e,t){return e.queue.find(r=>r.id===t)}function dt(e,t){return e.queue.filter(o=>t===o.batchId).length===0}function ft(e,t){return e.queue.some(r=>r.currentOperation===u.Upload&&r.additionalData.post===t)}function gt(e,t){return e.queue.find(r=>r.status===w.Paused&&r.additionalData.post===t)}function It(e){return e.queueStatus==="paused"}function yt(e,t){return e.blobUrls[t]||[]}function ht(e){return e.queue.filter(t=>t.currentOperation===u.Upload).length}function Ut(e){return e.queue.filter(t=>(Array.isArray(t.operations?.[0])?t.operations[0][0]:t.operations?.[0])===u.Upload&&t.currentOperation!==u.Upload)}function vt(e){return e.queue.filter(t=>t.currentOperation===u.ResizeCrop||t.currentOperation===u.Rotate).length}function bt(e){return e.queue.filter(t=>{let r=Array.isArray(t.operations?.[0])?t.operations[0][0]:t.operations?.[0];return(r===u.ResizeCrop||r===u.Rotate)&&t.currentOperation!==u.ResizeCrop&&t.currentOperation!==u.Rotate})}function wt(e){return e.queue.filter(t=>t.error!==void 0)}function Rt(e,t){return e.queue.some(r=>r.parentId===t)}function Et(e,t){return e.queue.find(o=>o.id===t)?.progress}var H={};M(H,{addItems:()=>Ft,cancelItem:()=>Ot,retryItem:()=>Tt});var W,St=new Uint8Array(16);function J(){if(!W&&(W=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!W))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return W(St)}var I=[];for(let e=0;e<256;++e)I.push((e+256).toString(16).slice(1));function Ie(e,t=0){return I[e[t+0]]+I[e[t+1]]+I[e[t+2]]+I[e[t+3]]+"-"+I[e[t+4]]+I[e[t+5]]+"-"+I[e[t+6]]+I[e[t+7]]+"-"+I[e[t+8]]+I[e[t+9]]+"-"+I[e[t+10]]+I[e[t+11]]+I[e[t+12]]+I[e[t+13]]+I[e[t+14]]+I[e[t+15]]}var _t=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ee={randomUUID:_t};function Pt(e,t,r){if(ee.randomUUID&&!t&&!e)return ee.randomUUID();e=e||{};let o=e.random||(e.rng||J)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){r=r||0;for(let n=0;n<16;++n)t[r+n]=o[n];return t}return Ie(o)}var _=Pt;var te=class extends File{width=0;height=0;originalWidth=0;originalHeight=0;get wasResized(){return(this.originalWidth||0)>this.width||(this.originalHeight||0)>this.height}constructor(e,t,r,o,n){super([e],e.name,{type:e.type,lastModified:e.lastModified}),this.width=t,this.height=r,this.originalWidth=o,this.originalHeight=n}};var At=y(he(),1),Ct=y(D(),1);function ve(e){if(e instanceof File)return e;if("name"in e&&typeof e.name=="string")return new File([e],e.name,{type:e.type,lastModified:e.lastModified});let t=e.type.split("/")[1],r=e.type==="application/pdf"?"document":e.type.split("/")[0];return new File([e],`${r}.${t}`,{type:e.type})}function G(e,t){return new File([e],t,{type:e.type,lastModified:e.lastModified})}function re(e){return G(e,e.name)}function Q(e){return e.includes(".")?e.split(".").slice(0,-1).join("."):e}var oe,z;function $(){return oe||(oe=import("@wordpress/vips/worker").then(e=>(z=e,e))),oe}async function be(e,t,r,o,n){let{vipsConvertImageFormat:i}=await $(),a=await i(e,await t.arrayBuffer(),t.type,r,o,n),c=r.split("/")[1],l=`${Q(t.name)}.${c}`;return new File([new Blob([a])],l,{type:r})}async function we(e){let{vipsHasTransparency:t}=await $(),r=await fetch(e);if(!r.ok)throw new Error(`Failed to fetch image: ${r.status}`);return t(await r.arrayBuffer())}async function Re(e,t,r,o,n,i,a,c){if(i?.aborted)throw new Error("Operation aborted");let{vipsResizeImage:l}=await $(),{buffer:d,width:p,height:f,originalWidth:m,originalHeight:h}=await l(e,await t.arrayBuffer(),t.type,r,o,c),U=t.name;if(m>p||h>f){let R=Q(t.name);a?U=t.name.replace(R,`${R}-scaled`):n&&(U=t.name.replace(R,`${R}-${p}x${f}`))}return new te(new File([new Blob([d],{type:t.type})],U,{type:t.type}),p,f,m,h)}async function ne(e,t,r,o){if(o?.aborted)throw new Error("Operation aborted");if(r===1)return t;let{vipsRotateImage:n}=await $(),{buffer:i,width:a,height:c}=await n(e,await t.arrayBuffer(),t.type,r),l=Q(t.name),d=t.name.replace(l,`${l}-rotated`);return new te(new File([new Blob([i],{type:t.type})],d,{type:t.type}),a,c)}async function Ee(e){return z?z.vipsCancelOperations(e):!1}function Se(){z&&z.terminateVipsWorker()}var V=y(D(),1);var v=class extends Error{code;file;constructor({code:e,message:t,file:r,cause:o}){super(t,{cause:o}),Object.setPrototypeOf(this,new.target.prototype),this.code=e,this.file=r}};function _e(e,t){if(!t)return;let r=t.some(o=>o.includes("/")?o===e.type:e.type.startsWith(`${o}/`));if(e.type&&!r)throw new v({code:"MIME_TYPE_NOT_SUPPORTED",message:(0,V.sprintf)((0,V.__)("%s: Sorry, this file type is not supported here."),e.name),file:e})}var j=y(D(),1);function Pe(e){return e?Object.entries(e).flatMap(([t,r])=>{let[o]=r.split("/"),n=t.split("|");return[r,...n.map(i=>`${o}/${i}`)]}):null}function Ae(e,t){let r=Pe(t);if(!r)return;let o=r.includes(e.type);if(e.type&&!o)throw new v({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:(0,j.sprintf)((0,j.__)("%s: Sorry, you are not allowed to upload this file type."),e.name),file:e})}var F=y(D(),1);function Ce(e,t){if(e.size<=0)throw new v({code:"EMPTY_FILE",message:(0,F.sprintf)((0,F.__)("%s: This file is empty."),e.name),file:e});if(t&&e.size>t)throw new v({code:"SIZE_ABOVE_LIMIT",message:(0,F.sprintf)((0,F.__)("%s: This file exceeds the maximum upload size for this site."),e.name),file:e})}function Ft({files:e,onChange:t,onSuccess:r,onError:o,onBatchSuccess:n,additionalData:i,allowedTypes:a}){return async({select:c,dispatch:l})=>{let d=_();for(let p of e){try{_e(p,a),Ae(p,c.getSettings().allowedMimeTypes)}catch(f){o?.(f);continue}try{Ce(p,c.getSettings().maxUploadFileSize)}catch(f){o?.(f);continue}l.addItem({file:p,batchId:d,onChange:t,onSuccess:r,onBatchSuccess:n,onError:o,additionalData:i})}}}function Ot(e,t,r=!1){return async({select:o,dispatch:n})=>{let i=o.getItem(e);if(i){if(i.abortController?.abort(),await Ee(e),!r){let{onError:a}=i;a?.(t??new Error("Upload cancelled")),!a&&t&&console.error("Upload cancelled",t)}n({type:s.Cancel,id:e,error:t}),n.removeItem(e),n.revokeBlobUrls(e),i.batchId&&o.isBatchUploaded(i.batchId)&&i.onBatchSuccess?.()}}}function Tt(e){return async({select:t,dispatch:r})=>{let o=t.getItem(e);o&&o.error&&(r({type:s.RetryItem,id:e}),r.processItem(e))}}var ae={};M(ae,{addItem:()=>Mt,addSideloadItem:()=>Dt,finalizeItem:()=>Jt,finishOperation:()=>Wt,generateThumbnails:()=>Kt,getTranscodeImageOperation:()=>ie,pauseItem:()=>qt,pauseQueue:()=>Bt,prepareItem:()=>Vt,processItem:()=>zt,removeItem:()=>Lt,resizeCropItem:()=>Yt,resumeItemByPostId:()=>kt,resumeQueue:()=>Nt,revokeBlobUrls:()=>er,rotateItem:()=>Xt,sideloadItem:()=>Ht,transcodeImageItem:()=>Zt,updateItemProgress:()=>tr,updateSettings:()=>rr,uploadItem:()=>jt});var b=y(Oe(),1);var Te=class extends File{constructor(e="stub-file"){super([],e)}};var xe=.82;function xt(e,t,r){return t!==u.Upload||!e.parentId||!e.additionalData.post?!1:r.isUploadingToPost(e.additionalData.post)}function Mt({file:e,batchId:t,onChange:r,onSuccess:o,onBatchSuccess:n,onError:i,additionalData:a={},sourceUrl:c,sourceAttachmentId:l,abortController:d,operations:p}){return async({dispatch:f})=>{let m=_(),h=ve(e),U;h instanceof Te||(U=(0,b.createBlobURL)(h),f({type:s.CacheBlobUrl,id:m,blobUrl:U})),f({type:s.Add,item:{id:m,batchId:t,status:w.Processing,sourceFile:re(h),file:h,attachment:{url:U},additionalData:{convert_format:!1,generate_sub_sizes:!1,...a},onChange:r,onSuccess:o,onBatchSuccess:n,onError:i,sourceUrl:c,sourceAttachmentId:l,abortController:d||new AbortController,operations:Array.isArray(p)?p:[u.Prepare]}}),f.processItem(m)}}function Dt({file:e,onChange:t,additionalData:r,operations:o,batchId:n,parentId:i}){return({dispatch:a})=>{let c=_();a({type:s.Add,item:{id:c,batchId:n,status:w.Processing,sourceFile:re(e),file:e,onChange:t,additionalData:{...r},parentId:i,operations:Array.isArray(o)?o:[u.Prepare],abortController:new AbortController}}),a.processItem(c)}}function zt(e){return async({select:t,dispatch:r})=>{if(t.isPaused())return;let o=t.getItem(e);if(!o)return;let{attachment:n,onChange:i,onSuccess:a,onBatchSuccess:c,batchId:l,parentId:d}=o,p=Array.isArray(o.operations?.[0])?o.operations[0][0]:o.operations?.[0],f=Array.isArray(o.operations?.[0])?o.operations[0][1]:void 0;if(xt(o,p,t)){r({type:s.PauseItem,id:e});return}if(p===u.Upload){let m=t.getSettings();if(t.getActiveUploadCount()>=m.maxConcurrentUploads)return}if(p===u.ResizeCrop||p===u.Rotate){let m=t.getSettings();if(t.getActiveImageProcessingCount()>=m.maxConcurrentImageProcessing)return}if(n&&i?.([n]),!p){if((d||!d&&!t.hasPendingItemsByParentId(e))&&(n&&a?.([n]),r.removeItem(e),r.revokeBlobUrls(e),l&&t.isBatchUploaded(l)&&c?.()),d&&l&&t.isBatchUploaded(l)){let m=t.getItem(d);if(!m)return;if(m.operations&&m.operations.length>0){r.processItem(d);return}n&&m.onSuccess?.([n]),r.removeItem(d),r.revokeBlobUrls(d),m.batchId&&t.isBatchUploaded(m.batchId)&&m.onBatchSuccess?.()}return}if(!(p===u.Finalize&&t.hasPendingItemsByParentId(e)))switch(r({type:s.OperationStart,id:e,operation:p}),p){case u.Prepare:r.prepareItem(o.id);break;case u.ResizeCrop:r.resizeCropItem(o.id,f);break;case u.Rotate:r.rotateItem(o.id,f);break;case u.TranscodeImage:r.transcodeImageItem(o.id,f);break;case u.Upload:o.parentId?r.sideloadItem(e):r.uploadItem(e);break;case u.ThumbnailGeneration:r.generateThumbnails(e);break;case u.Finalize:r.finalizeItem(e);break}}}function Bt(){return{type:s.PauseQueue}}function Nt(){return async({select:e,dispatch:t})=>{t({type:s.ResumeQueue});for(let r of e.getAllItems())t.processItem(r.id)}}function qt(e){return async({dispatch:t})=>{t({type:s.PauseItem,id:e})}}function kt(e){return async({select:t,dispatch:r})=>{let o=t.getPausedUploadForPost(e);o&&(r({type:s.ResumeItem,id:o.id}),r.processItem(o.id))}}function Lt(e){return async({select:t,dispatch:r})=>{t.getItem(e)&&(r({type:s.Remove,id:e}),t.getAllItems().length===0&&Se())}}function Wt(e,t){return async({select:r,dispatch:o})=>{let i=r.getItem(e)?.currentOperation;if(o({type:s.OperationFinish,id:e,item:t}),o.processItem(e),i===u.Upload){let a=r.getPendingUploads();for(let c of a)o.processItem(c.id)}if(i===u.ResizeCrop||i===u.Rotate){let a=r.getPendingImageProcessing();for(let c of a)o.processItem(c.id)}}}var Gt=["jpeg","webp","avif","png","gif"];function Qt(e){return Gt.includes(e)}function $t(e,t){switch(e){case"image/jpeg":return t.jpegInterlaced??!1;case"image/png":return t.pngInterlaced??!1;case"image/gif":return t.gifInterlaced??!1;default:return!1}}async function ie(e,t,r){if(e.type==="image/png"&&t==="image/jpeg"){let n=(0,b.createBlobURL)(e);try{if(await we(n))return null}catch{return null}finally{(0,b.revokeBlobURL)(n)}}let o=t.split("/")[1];return Qt(o)?[u.TranscodeImage,{outputFormat:o,outputQuality:xe,interlaced:$t(t,r)}]:null}function Vt(e){return async({select:t,dispatch:r})=>{let o=t.getItem(e);if(!o)return;let{file:n}=o,i=[],a=t.getSettings(),c=n.type.startsWith("image/"),l=ge.includes(n.type);if(c&&l){let{imageOutputFormats:p}=a,f=p?.[n.type];if(f&&f!==n.type){let m=await ie(n,f,a);m&&i.push(m)}i.push(u.Upload,u.ThumbnailGeneration,u.Finalize)}else i.push(u.Upload);r({type:s.AddOperations,id:e,operations:i});let d=!l||!c?{additionalData:{...o.additionalData,generate_sub_sizes:!0,convert_format:!0}}:{};r.finishOperation(e,d)}}function jt(e){return async({select:t,dispatch:r})=>{let o=t.getItem(e);o&&t.getSettings().mediaUpload({filesList:[o.file],additionalData:o.additionalData,signal:o.abortController?.signal,onFileChange:([n])=>{n&&!(0,b.isBlobURL)(n.url)&&r.finishOperation(e,{attachment:n})},onSuccess:([n])=>{r.finishOperation(e,{attachment:n})},onError:n=>{r.cancelItem(e,n)}})}}function Ht(e){return async({select:t,dispatch:r})=>{let o=t.getItem(e);if(!o)return;let{post:n,...i}=o.additionalData,a=t.getSettings().mediaSideload;if(!a){r.finishOperation(e,{});return}a({file:o.file,attachmentId:n,additionalData:i,signal:o.abortController?.signal,onFileChange:([c])=>{r.finishOperation(e,{attachment:c}),r.resumeItemByPostId(n)},onError:c=>{r.cancelItem(e,c),r.resumeItemByPostId(n)}})}}function Yt(e,t){return async({select:r,dispatch:o})=>{let n=r.getItem(e);if(!n)return;if(!t?.resize){o.finishOperation(e,{file:n.file});return}let i=!!n.parentId,a=!!t.isThresholdResize;try{let c=await Re(n.id,n.file,t.resize,!1,i,n.abortController?.signal,a),l=(0,b.createBlobURL)(c);o({type:s.CacheBlobUrl,id:e,blobUrl:l}),o.finishOperation(e,{file:c,attachment:{url:l}})}catch(c){o.cancelItem(e,new v({code:"IMAGE_TRANSCODING_ERROR",message:"File could not be uploaded",file:n.file,cause:c instanceof Error?c:void 0}))}}}function Xt(e,t){return async({select:r,dispatch:o})=>{let n=r.getItem(e);if(n){if(!t?.orientation||t.orientation===1){o.finishOperation(e,{file:n.file});return}try{let i=await ne(n.id,n.file,t.orientation,n.abortController?.signal),a=(0,b.createBlobURL)(i);o({type:s.CacheBlobUrl,id:e,blobUrl:a}),o.finishOperation(e,{file:i,attachment:{url:a}})}catch(i){o.cancelItem(e,new v({code:"IMAGE_ROTATION_ERROR",message:"Image could not be rotated",file:n.file,cause:i instanceof Error?i:void 0}))}}}}function Zt(e,t){return async({select:r,dispatch:o})=>{let n=r.getItem(e);if(!n)return;if(!t?.outputFormat){o.finishOperation(e,{file:n.file});return}let i=`image/${t.outputFormat}`,a=t.outputQuality??xe,c=t.interlaced??!1;try{let l=await be(n.id,n.file,i,a,c),d=(0,b.createBlobURL)(l);o({type:s.CacheBlobUrl,id:e,blobUrl:d}),o.finishOperation(e,{file:l,attachment:{url:d}})}catch(l){o.cancelItem(e,new v({code:"MEDIA_TRANSCODING_ERROR",message:"Image could not be transcoded to the target format",file:n.file,cause:l instanceof Error?l:void 0}))}}}function Kt(e){return async({select:t,dispatch:r})=>{let o=t.getItem(e);if(!o)return;if(!o.attachment){r.finishOperation(e,{});return}let n=o.attachment;if(n.exif_orientation&&n.exif_orientation!==1&&!o.file.name.includes("-scaled")&&n.id)try{let a=await ne(o.id,o.sourceFile,n.exif_orientation,o.abortController?.signal);r.addSideloadItem({file:a,batchId:_(),parentId:o.id,additionalData:{post:n.id,image_size:"original",convert_format:!1},operations:[u.Upload]})}catch{console.warn("Failed to rotate image, continuing with thumbnails")}if(!o.parentId&&n.missing_image_sizes&&n.missing_image_sizes.length>0){let a=t.getSettings(),c=a.allImageSizes||{},l=n.missing_image_sizes,d=n.filename?G(o.sourceFile,n.filename):o.sourceFile,p=_(),{imageOutputFormats:f}=a,m=o.sourceFile.type,h=f?.[m],U=null;h&&h!==m&&(U=await ie(o.sourceFile,h,a));for(let E of l){let R=c[E];if(!R){console.warn(`Image size "${E}" not found in configuration`);continue}let x=[[u.ResizeCrop,{resize:R}]];U&&x.push(U),x.push(u.Upload),r.addSideloadItem({file:d,onChange:([C])=>{(0,b.isBlobURL)(C.url)||o.onChange?.([C])},batchId:p,parentId:o.id,additionalData:{post:n.id,image_size:E,convert_format:!1},operations:x})}let{bigImageSizeThreshold:A}=a;if(A&&n.id){let E=await createImageBitmap(o.sourceFile),R=E.width>A||E.height>A;if(E.close(),R){let x=n.filename?G(o.sourceFile,n.filename):o.sourceFile,C=[[u.ResizeCrop,{resize:{width:A,height:A},isThresholdResize:!0}]];U&&C.push(U),C.push(u.Upload),r.addSideloadItem({file:x,onChange:([le])=>{(0,b.isBlobURL)(le.url)||o.onChange?.([le])},batchId:p,parentId:o.id,additionalData:{post:n.id,image_size:"scaled",convert_format:!1},operations:C})}}}r.finishOperation(e,{})}}function Jt(e){return async({select:t,dispatch:r})=>{let o=t.getItem(e);if(!o)return;let n=o.attachment,{mediaFinalize:i}=t.getSettings();if(n?.id&&i)try{await i(n.id)}catch(a){console.warn("Media finalization failed:",a)}r.finishOperation(e,{})}}function er(e){return async({select:t,dispatch:r})=>{let o=t.getBlobUrls(e);for(let n of o)(0,b.revokeBlobURL)(n);r({type:s.RevokeBlobUrls,id:e})}}function tr(e,t){return async({dispatch:r})=>{r({type:s.UpdateProgress,id:e,progress:t})}}function rr(e){return{type:s.UpdateSettings,settings:e}}var ze=y(De(),1),{lock:io,unlock:B}=(0,ze.__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/upload-media");var Be={reducer:Z,selectors:L,actions:H},P=(0,O.createReduxStore)(k,{reducer:Z,selectors:L,actions:H});(0,O.select)(P)||(0,O.register)(P);B(P).registerPrivateActions(ae);B(P).registerPrivateSelectors(K);var $e=y(se(),1),Ve=y(q(),1);var We=y(se(),1),T=y(q(),1),Ge=y(ke(),1);var Y=y(ue(),1);function or(e,t,r){if(!r)return t;let o=e.get(t);return o||(o=(0,T.createRegistry)({},t),o.registerStore(k,Be),e.set(t,o)),o}var nr=(0,Ge.createHigherOrderComponent)(e=>({useSubRegistry:t=!0,...r})=>{let o=(0,T.useRegistry)(),[n]=(0,We.useState)(()=>new WeakMap),i=or(n,o,t);return i===o?(0,Y.jsx)(e,{registry:o,...r}):(0,Y.jsx)(T.RegistryProvider,{value:i,children:(0,Y.jsx)(e,{registry:i,...r})})},"withRegistryProvider"),Qe=nr;var X=y(ue(),1),ir=Qe(e=>{let{children:t,settings:r}=e,{updateSettings:o}=B((0,Ve.useDispatch)(P));return(0,$e.useEffect)(()=>{o(r)},[r,o]),(0,X.jsx)(X.Fragment,{children:t})}),je=ir;var g=null;function ce(){if(g!==null)return g;if(typeof WebAssembly>"u")return g={supported:!1,reason:"WebAssembly is not supported in this browser."},g;if(typeof SharedArrayBuffer>"u")return g={supported:!1,reason:"SharedArrayBuffer is not available. This may be due to missing cross-origin isolation headers."},g;if(typeof Worker>"u")return g={supported:!1,reason:"Web Workers are not supported in this browser."},g;if(typeof navigator<"u"&&"deviceMemory"in navigator&&navigator.deviceMemory<=2)return g={supported:!1,reason:"Device has insufficient memory for client-side media processing."},g;if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency<2)return g={supported:!1,reason:"Device has insufficient CPU cores for client-side media processing."},g;if(typeof navigator<"u"){let e=navigator.connection;if(e){if(e.saveData)return g={supported:!1,reason:"Data saver mode is enabled."},g;if(e.effectiveType==="slow-2g"||e.effectiveType==="2g")return g={supported:!1,reason:"Network connection is too slow for client-side media processing."},g}}if(typeof window<"u")try{let e=new Blob([""],{type:"application/javascript"}),t=URL.createObjectURL(e);try{new Worker(t).terminate()}finally{URL.revokeObjectURL(t)}}catch{return g={supported:!1,reason:"The site's Content Security Policy (CSP) does not allow blob: workers. The worker-src directive must include blob: to enable client-side media processing."},g}return g={supported:!0},g}function He(){return ce().supported}function Ye(){g=null}return rt(ar);})();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             dist/react-i18n.min.js                                                                              0000644                 00000002767 15212564040 0010515 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       "use strict";var wp;(wp||={}).reactI18n=(()=>{var I=Object.create;var a=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var T=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var i=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),P=(e,n)=>{for(var t in n)a(e,t,{get:n[t],enumerable:!0})},p=(e,n,t,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of N(n))!y.call(e,r)&&r!==t&&a(e,r,{get:()=>n[r],enumerable:!(s=R(n,r))||s.enumerable});return e};var d=(e,n,t)=>(t=e!=null?I(T(e)):{},p(n||!e||!e.__esModule?a(t,"default",{value:e,enumerable:!0}):t,e)),E=e=>p(a({},"__esModule",{value:!0}),e);var f=i((M,x)=>{x.exports=window.wp.element});var _=i((S,l)=>{l.exports=window.wp.i18n});var b=i((U,w)=>{w.exports=window.ReactJSXRuntime});var k={};P(k,{I18nProvider:()=>L,useI18n:()=>C,withI18n:()=>j});var o=d(f(),1),u=d(_(),1),c=d(b(),1);function h(e){return{__:e.__.bind(e),_x:e._x.bind(e),_n:e._n.bind(e),_nx:e._nx.bind(e),isRTL:e.isRTL.bind(e),hasTranslation:e.hasTranslation.bind(e)}}var m=(0,o.createContext)(h(u.defaultI18n));m.displayName="I18nContext";function L(e){let{children:n,i18n:t=u.defaultI18n}=e,[s,r]=(0,o.useReducer)(()=>[],[]);(0,o.useEffect)(()=>t.subscribe(r),[t]);let v=(0,o.useMemo)(()=>h(t),[t,s]);return(0,c.jsx)(m.Provider,{value:v,children:n})}var C=()=>(0,o.useContext)(m);function j(e){let n=s=>{let r=C();return(0,c.jsx)(e,{...s,...r})},t=e.displayName||e.name||"Component";return n.displayName=`WithI18n(${t})`,n}return E(k);})();
         heartbeat.js                                                                                        0000644                 00000056764 15212564040 0007062 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * Heartbeat API
 *
 * Heartbeat is a simple server polling API that sends XHR requests to
 * the server every 15 - 60 seconds and triggers events (or callbacks) upon
 * receiving data. Currently these 'ticks' handle transports for post locking,
 * login-expiration warnings, autosave, and related tasks while a user is logged in.
 *
 * Available PHP filters (in ajax-actions.php):
 * - heartbeat_received
 * - heartbeat_send
 * - heartbeat_tick
 * - heartbeat_nopriv_received
 * - heartbeat_nopriv_send
 * - heartbeat_nopriv_tick
 * @see wp_ajax_nopriv_heartbeat(), wp_ajax_heartbeat()
 *
 * Custom jQuery events:
 * - heartbeat-send
 * - heartbeat-tick
 * - heartbeat-error
 * - heartbeat-connection-lost
 * - heartbeat-connection-restored
 * - heartbeat-nonces-expired
 *
 * @since 3.6.0
 * @output wp-includes/js/heartbeat.js
 */

( function( $, window, undefined ) {

	/**
	 * Constructs the Heartbeat API.
	 *
	 * @since 3.6.0
	 *
	 * @return {Object} An instance of the Heartbeat class.
	 * @constructor
	 */
	var Heartbeat = function() {
		var $document = $(document),
			settings = {
				// Suspend/resume.
				suspend: false,

				// Whether suspending is enabled.
				suspendEnabled: true,

				// Current screen id, defaults to the JS global 'pagenow' when present
				// (in the admin) or 'front'.
				screenId: '',

				// XHR request URL, defaults to the JS global 'ajaxurl' when present.
				url: '',

				// Timestamp, start of the last connection request.
				lastTick: 0,

				// Container for the enqueued items.
				queue: {},

				// Connect interval (in seconds).
				mainInterval: 60,

				// Used when the interval is set to 5 seconds temporarily.
				tempInterval: 0,

				// Used when the interval is reset.
				originalInterval: 0,

				// Used to limit the number of Ajax requests.
				minimalInterval: 0,

				// Used together with tempInterval.
				countdown: 0,

				// Whether a connection is currently in progress.
				connecting: false,

				// Whether a connection error occurred.
				connectionError: false,

				// Used to track non-critical errors.
				errorcount: 0,

				// Whether at least one connection has been completed successfully.
				hasConnected: false,

				// Whether the current browser window is in focus and the user is active.
				hasFocus: true,

				// Timestamp, last time the user was active. Checked every 30 seconds.
				userActivity: 0,

				// Flag whether events tracking user activity were set.
				userActivityEvents: false,

				// Timer that keeps track of how long a user has focus.
				checkFocusTimer: 0,

				// Timer that keeps track of how long needs to be waited before connecting to
				// the server again.
				beatTimer: 0
			};

		/**
		 * Sets local variables and events, then starts the heartbeat.
		 *
		 * @since 3.8.0
		 * @access private
		 *
		 * @return {void}
		 */
		function initialize() {
			var options, hidden, visibilityState, visibilitychange;

			if ( typeof window.pagenow === 'string' ) {
				settings.screenId = window.pagenow;
			}

			if ( typeof window.ajaxurl === 'string' ) {
				settings.url = window.ajaxurl;
			}

			// Pull in options passed from PHP.
			if ( typeof window.heartbeatSettings === 'object' ) {
				options = window.heartbeatSettings;

				// The XHR URL can be passed as option when window.ajaxurl is not set.
				if ( ! settings.url && options.ajaxurl ) {
					settings.url = options.ajaxurl;
				}

				/*
				 * Logic check: the interval can be from 1 to 3600 seconds and can be set temporarily
				 * to 5 seconds. It can be set in the initial options or changed later from JS
				 * or from PHP through the AJAX responses.
				 */
				if ( options.interval ) {
					settings.mainInterval = options.interval;

					if ( settings.mainInterval < 1 ) {
						settings.mainInterval = 1;
					} else if ( settings.mainInterval > 3600 ) {
						settings.mainInterval = 3600;
					}
				}

				/*
				 * Used to limit the number of Ajax requests. Overrides all other intervals
				 * if they are shorter. Needed for some hosts that cannot handle frequent requests
				 * and the user may exceed the allocated server CPU time, etc. The minimal interval
				 * can be up to 600 seconds, however setting it to longer than 120 seconds
				 * will limit or disable some of the functionality (like post locks).
				 * Once set at initialization, minimalInterval cannot be changed/overridden.
				 */
				if ( options.minimalInterval ) {
					options.minimalInterval = parseInt( options.minimalInterval, 10 );
					settings.minimalInterval = options.minimalInterval > 0 && options.minimalInterval <= 600 ? options.minimalInterval : 0;
				}

				if ( settings.minimalInterval && settings.mainInterval < settings.minimalInterval ) {
					settings.mainInterval = settings.minimalInterval;
				}

				// 'screenId' can be added from settings on the front end where the JS global
				// 'pagenow' is not set.
				if ( ! settings.screenId ) {
					settings.screenId = options.screenId || 'front';
				}

				if ( options.suspension === 'disable' ) {
					settings.suspendEnabled = false;
				}
			}

			// Convert to milliseconds.
			settings.mainInterval = settings.mainInterval * 1000;
			settings.originalInterval = settings.mainInterval;
			if ( settings.minimalInterval ) {
				settings.minimalInterval = settings.minimalInterval * 1000;
			}

			/*
			 * Switch the interval to 120 seconds by using the Page Visibility API.
			 * If the browser doesn't support it (Safari < 7, Android < 4.4, IE < 10), the
			 * interval will be increased to 120 seconds after 5 minutes of mouse and keyboard
			 * inactivity.
			 */
			if ( typeof document.hidden !== 'undefined' ) {
				hidden = 'hidden';
				visibilitychange = 'visibilitychange';
				visibilityState = 'visibilityState';
			} else if ( typeof document.msHidden !== 'undefined' ) { // IE10.
				hidden = 'msHidden';
				visibilitychange = 'msvisibilitychange';
				visibilityState = 'msVisibilityState';
			} else if ( typeof document.webkitHidden !== 'undefined' ) { // Android.
				hidden = 'webkitHidden';
				visibilitychange = 'webkitvisibilitychange';
				visibilityState = 'webkitVisibilityState';
			}

			if ( hidden ) {
				if ( document[hidden] ) {
					settings.hasFocus = false;
				}

				$document.on( visibilitychange + '.wp-heartbeat', function() {
					if ( document[visibilityState] === 'hidden' ) {
						blurred();
						window.clearInterval( settings.checkFocusTimer );
					} else {
						focused();
						if ( document.hasFocus ) {
							settings.checkFocusTimer = window.setInterval( checkFocus, 10000 );
						}
					}
				});
			}

			// Use document.hasFocus() if available.
			if ( document.hasFocus ) {
				settings.checkFocusTimer = window.setInterval( checkFocus, 10000 );
			}

			$(window).on( 'pagehide.wp-heartbeat', function() {
				// Don't connect anymore.
				suspend();

				// Abort the last request if not completed.
				if ( settings.xhr && settings.xhr.readyState !== 4 ) {
					settings.xhr.abort();
				}
			});

			$(window).on(
				'pageshow.wp-heartbeat',
				/**
				 * Handles pageshow event, specifically when page navigation is restored from back/forward cache.
				 *
				 * @param {jQuery.Event} event
				 * @param {PageTransitionEvent} event.originalEvent
				 */
				function ( event ) {
					if ( event.originalEvent.persisted ) {
						/*
						 * When page navigation is stored via bfcache (Back/Forward Cache), consider this the same as
						 * if the user had just switched to the tab since the behavior is similar.
						 */
						focused();
					}
				}
			);

			// Check for user activity every 30 seconds.
			window.setInterval( checkUserActivity, 30000 );

			// Start one tick after DOM ready.
			$( function() {
				settings.lastTick = time();
				scheduleNextTick();
			});
		}

		/**
		 * Returns the current time according to the browser.
		 *
		 * @since 3.6.0
		 * @access private
		 *
		 * @return {number} Returns the current time.
		 */
		function time() {
			return (new Date()).getTime();
		}

		/**
		 * Checks if the iframe is from the same origin.
		 *
		 * @since 3.6.0
		 * @access private
		 *
		 * @return {boolean} Returns whether or not the iframe is from the same origin.
		 */
		function isLocalFrame( frame ) {
			var origin, src = frame.src;

			/*
			 * Need to compare strings as WebKit doesn't throw JS errors when iframes have
			 * different origin. It throws uncatchable exceptions.
			 */
			if ( src && /^https?:\/\//.test( src ) ) {
				origin = window.location.origin ? window.location.origin : window.location.protocol + '//' + window.location.host;

				if ( src.indexOf( origin ) !== 0 ) {
					return false;
				}
			}

			try {
				if ( frame.contentWindow.document ) {
					return true;
				}
			} catch(e) {}

			return false;
		}

		/**
		 * Checks if the document's focus has changed.
		 *
		 * @since 4.1.0
		 * @access private
		 *
		 * @return {void}
		 */
		function checkFocus() {
			if ( settings.hasFocus && ! document.hasFocus() ) {
				blurred();
			} else if ( ! settings.hasFocus && document.hasFocus() ) {
				focused();
			}
		}

		/**
		 * Sets error state and fires an event on XHR errors or timeout.
		 *
		 * @since 3.8.0
		 * @access private
		 *
		 * @param {string} error  The error type passed from the XHR.
		 * @param {number} status The HTTP status code passed from jqXHR
		 *                        (200, 404, 500, etc.).
		 *
		 * @return {void}
		 */
		function setErrorState( error, status ) {
			var trigger;

			if ( error ) {
				switch ( error ) {
					case 'abort':
						// Do nothing.
						break;
					case 'timeout':
						// No response for 30 seconds.
						trigger = true;
						break;
					case 'error':
						if ( 503 === status && settings.hasConnected ) {
							trigger = true;
							break;
						}
						/* falls through */
					case 'parsererror':
					case 'empty':
					case 'unknown':
						settings.errorcount++;

						if ( settings.errorcount > 2 && settings.hasConnected ) {
							trigger = true;
						}

						break;
				}

				if ( trigger && ! hasConnectionError() ) {
					settings.connectionError = true;
					$document.trigger( 'heartbeat-connection-lost', [error, status] );
					wp.hooks.doAction( 'heartbeat.connection-lost', error, status );
				}
			}
		}

		/**
		 * Clears the error state and fires an event if there is a connection error.
		 *
		 * @since 3.8.0
		 * @access private
		 *
		 * @return {void}
		 */
		function clearErrorState() {
			// Has connected successfully.
			settings.hasConnected = true;

			if ( hasConnectionError() ) {
				settings.errorcount = 0;
				settings.connectionError = false;
				$document.trigger( 'heartbeat-connection-restored' );
				wp.hooks.doAction( 'heartbeat.connection-restored' );
			}
		}

		/**
		 * Gathers the data and connects to the server.
		 *
		 * @since 3.6.0
		 * @access private
		 *
		 * @return {void}
		 */
		function connect() {
			var ajaxData, heartbeatData;

			// If the connection to the server is slower than the interval,
			// heartbeat connects as soon as the previous connection's response is received.
			if ( settings.connecting || settings.suspend ) {
				return;
			}

			settings.lastTick = time();

			heartbeatData = $.extend( {}, settings.queue );
			// Clear the data queue. Anything added after this point will be sent on the next tick.
			settings.queue = {};

			$document.trigger( 'heartbeat-send', [ heartbeatData ] );
			wp.hooks.doAction( 'heartbeat.send', heartbeatData );

			ajaxData = {
				data: heartbeatData,
				interval: settings.tempInterval ? settings.tempInterval / 1000 : settings.mainInterval / 1000,
				_nonce: typeof window.heartbeatSettings === 'object' ? window.heartbeatSettings.nonce : '',
				action: 'heartbeat',
				screen_id: settings.screenId,
				has_focus: settings.hasFocus
			};

			if ( 'customize' === settings.screenId  ) {
				ajaxData.wp_customize = 'on';
			}

			settings.connecting = true;
			settings.xhr = $.ajax({
				url: settings.url,
				type: 'post',
				timeout: 30000, // Throw an error if not completed after 30 seconds.
				data: ajaxData,
				dataType: 'json'
			}).always( function() {
				settings.connecting = false;
				scheduleNextTick();
			}).done( function( response, textStatus, jqXHR ) {
				var newInterval;

				if ( ! response ) {
					setErrorState( 'empty' );
					return;
				}

				clearErrorState();

				if ( response.nonces_expired ) {
					$document.trigger( 'heartbeat-nonces-expired' );
					wp.hooks.doAction( 'heartbeat.nonces-expired' );
				}

				// Change the interval from PHP.
				if ( response.heartbeat_interval ) {
					newInterval = response.heartbeat_interval;
					delete response.heartbeat_interval;
				}

				// Update the heartbeat nonce if set.
				if ( response.heartbeat_nonce && typeof window.heartbeatSettings === 'object' ) {
					window.heartbeatSettings.nonce = response.heartbeat_nonce;
					delete response.heartbeat_nonce;
				}

				// Update the Rest API nonce if set and wp-api loaded.
				if ( response.rest_nonce && typeof window.wpApiSettings === 'object' ) {
					window.wpApiSettings.nonce = response.rest_nonce;
					// This nonce is required for api-fetch through heartbeat.tick.
					// delete response.rest_nonce;
				}

				$document.trigger( 'heartbeat-tick', [response, textStatus, jqXHR] );
				wp.hooks.doAction( 'heartbeat.tick', response, textStatus, jqXHR );

				// Do this last. Can trigger the next XHR if connection time > 5 seconds and newInterval == 'fast'.
				if ( newInterval ) {
					interval( newInterval );
				}
			}).fail( function( jqXHR, textStatus, error ) {
				setErrorState( textStatus || 'unknown', jqXHR.status );
				$document.trigger( 'heartbeat-error', [jqXHR, textStatus, error] );
				wp.hooks.doAction( 'heartbeat.error', jqXHR, textStatus, error );
			});
		}

		/**
		 * Schedules the next connection.
		 *
		 * Fires immediately if the connection time is longer than the interval.
		 *
		 * @since 3.8.0
		 * @access private
		 *
		 * @return {void}
		 */
		function scheduleNextTick() {
			var delta = time() - settings.lastTick,
				interval = settings.mainInterval;

			if ( settings.suspend ) {
				return;
			}

			if ( ! settings.hasFocus ) {
				interval = 120000; // 120 seconds. Post locks expire after 150 seconds.
			} else if ( settings.countdown > 0 && settings.tempInterval ) {
				interval = settings.tempInterval;
				settings.countdown--;

				if ( settings.countdown < 1 ) {
					settings.tempInterval = 0;
				}
			}

			if ( settings.minimalInterval && interval < settings.minimalInterval ) {
				interval = settings.minimalInterval;
			}

			window.clearTimeout( settings.beatTimer );

			if ( delta < interval ) {
				settings.beatTimer = window.setTimeout(
					function() {
						connect();
					},
					interval - delta
				);
			} else {
				connect();
			}
		}

		/**
		 * Sets the internal state when the browser window becomes hidden or loses focus.
		 *
		 * @since 3.6.0
		 * @access private
		 *
		 * @return {void}
		 */
		function blurred() {
			settings.hasFocus = false;
		}

		/**
		 * Sets the internal state when the browser window becomes visible or is in focus.
		 *
		 * @since 3.6.0
		 * @access private
		 *
		 * @return {void}
		 */
		function focused() {
			settings.userActivity = time();

			// Resume if suspended.
			resume();

			if ( ! settings.hasFocus ) {
				settings.hasFocus = true;
				scheduleNextTick();
			}
		}

		/**
		 * Suspends connecting.
		 */
		function suspend() {
			settings.suspend = true;
		}

		/**
		 * Resumes connecting.
		 */
		function resume() {
			settings.suspend = false;
		}

		/**
		 * Runs when the user becomes active after a period of inactivity.
		 *
		 * @since 3.6.0
		 * @access private
		 *
		 * @return {void}
		 */
		function userIsActive() {
			settings.userActivityEvents = false;
			$document.off( '.wp-heartbeat-active' );

			$('iframe').each( function( i, frame ) {
				if ( isLocalFrame( frame ) ) {
					$( frame.contentWindow ).off( '.wp-heartbeat-active' );
				}
			});

			focused();
		}

		/**
		 * Checks for user activity.
		 *
		 * Runs every 30 seconds. Sets 'hasFocus = true' if user is active and the window
		 * is in the background. Sets 'hasFocus = false' if the user has been inactive
		 * (no mouse or keyboard activity) for 5 minutes even when the window has focus.
		 *
		 * @since 3.8.0
		 * @access private
		 *
		 * @return {void}
		 */
		function checkUserActivity() {
			var lastActive = settings.userActivity ? time() - settings.userActivity : 0;

			// Throttle down when no mouse or keyboard activity for 5 minutes.
			if ( lastActive > 300000 && settings.hasFocus ) {
				blurred();
			}

			// Suspend after 10 minutes of inactivity when suspending is enabled.
			// Always suspend after 60 minutes of inactivity. This will release the post lock, etc.
			if ( ( settings.suspendEnabled && lastActive > 600000 ) || lastActive > 3600000 ) {
				suspend();
			}

			if ( ! settings.userActivityEvents ) {
				$document.on( 'mouseover.wp-heartbeat-active keyup.wp-heartbeat-active touchend.wp-heartbeat-active', function() {
					userIsActive();
				});

				$('iframe').each( function( i, frame ) {
					if ( isLocalFrame( frame ) ) {
						$( frame.contentWindow ).on( 'mouseover.wp-heartbeat-active keyup.wp-heartbeat-active touchend.wp-heartbeat-active', function() {
							userIsActive();
						});
					}
				});

				settings.userActivityEvents = true;
			}
		}

		// Public methods.

		/**
		 * Checks whether the window (or any local iframe in it) has focus, or the user
		 * is active.
		 *
		 * @since 3.6.0
		 * @memberOf wp.heartbeat.prototype
		 *
		 * @return {boolean} True if the window or the user is active.
		 */
		function hasFocus() {
			return settings.hasFocus;
		}

		/**
		 * Checks whether there is a connection error.
		 *
		 * @since 3.6.0
		 *
		 * @memberOf wp.heartbeat.prototype
		 *
		 * @return {boolean} True if a connection error was found.
		 */
		function hasConnectionError() {
			return settings.connectionError;
		}

		/**
		 * Connects as soon as possible regardless of 'hasFocus' state.
		 *
		 * Will not open two concurrent connections. If a connection is in progress,
		 * will connect again immediately after the current connection completes.
		 *
		 * @since 3.8.0
		 *
		 * @memberOf wp.heartbeat.prototype
		 *
		 * @return {void}
		 */
		function connectNow() {
			settings.lastTick = 0;
			scheduleNextTick();
		}

		/**
		 * Disables suspending.
		 *
		 * Should be used only when Heartbeat is performing critical tasks like
		 * autosave, post-locking, etc. Using this on many screens may overload
		 * the user's hosting account if several browser windows/tabs are left open
		 * for a long time.
		 *
		 * @since 3.8.0
		 *
		 * @memberOf wp.heartbeat.prototype
		 *
		 * @return {void}
		 */
		function disableSuspend() {
			settings.suspendEnabled = false;
		}

		/**
		 * Gets/Sets the interval.
		 *
		 * When setting to 'fast' or 5, the interval is 5 seconds for the next 30 ticks
		 * (for 2 minutes and 30 seconds) by default. In this case the number of 'ticks'
		 * can be passed as second argument. If the window doesn't have focus,
		 * the interval slows down to 2 minutes.
		 *
		 * @since 3.6.0
		 *
		 * @memberOf wp.heartbeat.prototype
		 *
		 * @param {string|number} speed Interval: 'fast' or integer between 1 and 3600 (seconds).
		 *                              Fast equals 5.
		 * @param {number}        ticks Tells how many ticks before the interval reverts back.
		 *                              Value must be between 1 and 30. Used with speed = 'fast' or 5.
		 *
		 * @return {number} Current interval in seconds.
		 */
		function interval( speed, ticks ) {
			var newInterval,
				oldInterval = settings.tempInterval ? settings.tempInterval : settings.mainInterval;

			if ( speed ) {
				if ( 'fast' === speed ) {
					// Special case, see below.
					newInterval = 5000;
				} else if ( 'long-polling' === speed ) {
					// Allow long polling (experimental).
					settings.mainInterval = 0;
					return 0;
				} else {
					speed = parseInt( speed, 10 );

					if ( speed >= 1 && speed <= 3600 ) {
						newInterval = speed * 1000;
					} else {
						newInterval = settings.originalInterval;
					}
				}

				if ( settings.minimalInterval && newInterval < settings.minimalInterval ) {
					newInterval = settings.minimalInterval;
				}

				// Special case, runs for a number of ticks then reverts to the previous interval.
				if ( 5000 === newInterval ) {
					ticks = parseInt( ticks, 10 ) || 30;
					ticks = ticks < 1 || ticks > 30 ? 30 : ticks;

					settings.countdown = ticks;
					settings.tempInterval = newInterval;
				} else {
					settings.countdown = 0;
					settings.tempInterval = 0;
					settings.mainInterval = newInterval;
				}

				/*
				 * Change the next connection time if new interval has been set.
				 * Will connect immediately if the time since the last connection
				 * is greater than the new interval.
				 */
				if ( newInterval !== oldInterval ) {
					scheduleNextTick();
				}
			}

			return settings.tempInterval ? settings.tempInterval / 1000 : settings.mainInterval / 1000;
		}

		/**
		 * Enqueues data to send with the next XHR.
		 *
		 * As the data is send asynchronously, this function doesn't return the XHR
		 * response. To see the response, use the custom jQuery event 'heartbeat-tick'
		 * on the document, example:
		 *		$(document).on( 'heartbeat-tick.myname', function( event, data, textStatus, jqXHR ) {
		 *			// code
		 *		});
		 * If the same 'handle' is used more than once, the data is not overwritten when
		 * the third argument is 'true'. Use `wp.heartbeat.isQueued('handle')` to see if
		 * any data is already queued for that handle.
		 *
		 * @since 3.6.0
		 *
		 * @memberOf wp.heartbeat.prototype
		 *
		 * @param {string}  handle      Unique handle for the data, used in PHP to
		 *                              receive the data.
		 * @param {*}       data        The data to send.
		 * @param {boolean} noOverwrite Whether to overwrite existing data in the queue.
		 *
		 * @return {boolean} True if the data was queued.
		 */
		function enqueue( handle, data, noOverwrite ) {
			if ( handle ) {
				if ( noOverwrite && this.isQueued( handle ) ) {
					return false;
				}

				settings.queue[handle] = data;
				return true;
			}
			return false;
		}

		/**
		 * Checks if data with a particular handle is queued.
		 *
		 * @since 3.6.0
		 *
		 * @param {string} handle The handle for the data.
		 *
		 * @return {boolean} True if the data is queued with this handle.
		 */
		function isQueued( handle ) {
			if ( handle ) {
				return settings.queue.hasOwnProperty( handle );
			}
		}

		/**
		 * Removes data with a particular handle from the queue.
		 *
		 * @since 3.7.0
		 *
		 * @memberOf wp.heartbeat.prototype
		 *
		 * @param {string} handle The handle for the data.
		 *
		 * @return {void}
		 */
		function dequeue( handle ) {
			if ( handle ) {
				delete settings.queue[handle];
			}
		}

		/**
		 * Gets data that was enqueued with a particular handle.
		 *
		 * @since 3.7.0
		 *
		 * @memberOf wp.heartbeat.prototype
		 *
		 * @param {string} handle The handle for the data.
		 *
		 * @return {*} The data or undefined.
		 */
		function getQueuedItem( handle ) {
			if ( handle ) {
				return this.isQueued( handle ) ? settings.queue[handle] : undefined;
			}
		}

		initialize();

		// Expose public methods.
		return {
			hasFocus: hasFocus,
			connectNow: connectNow,
			disableSuspend: disableSuspend,
			interval: interval,
			hasConnectionError: hasConnectionError,
			enqueue: enqueue,
			dequeue: dequeue,
			isQueued: isQueued,
			getQueuedItem: getQueuedItem
		};
	};

	/**
	 * Ensure the global `wp` object exists.
	 *
	 * @namespace wp
	 */
	window.wp = window.wp || {};

	/**
	 * Contains the Heartbeat API.
	 *
	 * @namespace wp.heartbeat
	 * @type {Heartbeat}
	 */
	window.wp.heartbeat = new Heartbeat();

}( jQuery, window ));
            heartbeat.min.js                                                                                    0000644                 00000013473 15212564040 0007632 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(w,g){g.wp=g.wp||{},g.wp.heartbeat=new function(){var e,t,n,a,i=w(document),r={suspend:!1,suspendEnabled:!0,screenId:"",url:"",lastTick:0,queue:{},mainInterval:60,tempInterval:0,originalInterval:0,minimalInterval:0,countdown:0,connecting:!1,connectionError:!1,errorcount:0,hasConnected:!1,hasFocus:!0,userActivity:0,userActivityEvents:!1,checkFocusTimer:0,beatTimer:0};function o(){return(new Date).getTime()}function c(e){var t,n=e.src;if(!n||!/^https?:\/\//.test(n)||(t=g.location.origin||g.location.protocol+"//"+g.location.host,0===n.indexOf(t)))try{if(e.contentWindow.document)return 1}catch(e){}}function s(){r.hasFocus&&!document.hasFocus()?v():!r.hasFocus&&document.hasFocus()&&d()}function u(e,t){var n;if(e){switch(e){case"abort":break;case"timeout":n=!0;break;case"error":if(503===t&&r.hasConnected){n=!0;break}case"parsererror":case"empty":case"unknown":r.errorcount++,2<r.errorcount&&r.hasConnected&&(n=!0)}n&&!b()&&(r.connectionError=!0,i.trigger("heartbeat-connection-lost",[e,t]),wp.hooks.doAction("heartbeat.connection-lost",e,t))}}function l(){var e;r.connecting||r.suspend||(r.lastTick=o(),e=w.extend({},r.queue),r.queue={},i.trigger("heartbeat-send",[e]),wp.hooks.doAction("heartbeat.send",e),e={data:e,interval:r.tempInterval?r.tempInterval/1e3:r.mainInterval/1e3,_nonce:"object"==typeof g.heartbeatSettings?g.heartbeatSettings.nonce:"",action:"heartbeat",screen_id:r.screenId,has_focus:r.hasFocus},"customize"===r.screenId&&(e.wp_customize="on"),r.connecting=!0,r.xhr=w.ajax({url:r.url,type:"post",timeout:3e4,data:e,dataType:"json"}).always(function(){r.connecting=!1,m()}).done(function(e,t,n){var a;e?(r.hasConnected=!0,b()&&(r.errorcount=0,r.connectionError=!1,i.trigger("heartbeat-connection-restored"),wp.hooks.doAction("heartbeat.connection-restored")),e.nonces_expired&&(i.trigger("heartbeat-nonces-expired"),wp.hooks.doAction("heartbeat.nonces-expired")),e.heartbeat_interval&&(a=e.heartbeat_interval,delete e.heartbeat_interval),e.heartbeat_nonce&&"object"==typeof g.heartbeatSettings&&(g.heartbeatSettings.nonce=e.heartbeat_nonce,delete e.heartbeat_nonce),e.rest_nonce&&"object"==typeof g.wpApiSettings&&(g.wpApiSettings.nonce=e.rest_nonce),i.trigger("heartbeat-tick",[e,t,n]),wp.hooks.doAction("heartbeat.tick",e,t,n),a&&f(a)):u("empty")}).fail(function(e,t,n){u(t||"unknown",e.status),i.trigger("heartbeat-error",[e,t,n]),wp.hooks.doAction("heartbeat.error",e,t,n)}))}function m(){var e=o()-r.lastTick,t=r.mainInterval;r.suspend||(r.hasFocus?0<r.countdown&&r.tempInterval&&(t=r.tempInterval,r.countdown--,r.countdown<1)&&(r.tempInterval=0):t=12e4,r.minimalInterval&&t<r.minimalInterval&&(t=r.minimalInterval),g.clearTimeout(r.beatTimer),e<t?r.beatTimer=g.setTimeout(function(){l()},t-e):l())}function v(){r.hasFocus=!1}function d(){r.userActivity=o(),r.suspend=!1,r.hasFocus||(r.hasFocus=!0,m())}function h(){r.suspend=!0}function p(){r.userActivityEvents=!1,i.off(".wp-heartbeat-active"),w("iframe").each(function(e,t){c(t)&&w(t.contentWindow).off(".wp-heartbeat-active")}),d()}function I(){var e=r.userActivity?o()-r.userActivity:0;3e5<e&&r.hasFocus&&v(),(r.suspendEnabled&&6e5<e||36e5<e)&&h(),r.userActivityEvents||(i.on("mouseover.wp-heartbeat-active keyup.wp-heartbeat-active touchend.wp-heartbeat-active",function(){p()}),w("iframe").each(function(e,t){c(t)&&w(t.contentWindow).on("mouseover.wp-heartbeat-active keyup.wp-heartbeat-active touchend.wp-heartbeat-active",function(){p()})}),r.userActivityEvents=!0)}function b(){return r.connectionError}function f(e,t){var n,a=r.tempInterval||r.mainInterval;if(e){if("fast"===e)n=5e3;else{if("long-polling"===e)return r.mainInterval=0;n=1<=(e=parseInt(e,10))&&e<=3600?1e3*e:r.originalInterval}5e3===(n=r.minimalInterval&&n<r.minimalInterval?r.minimalInterval:n)?(t=parseInt(t,10)||30,r.countdown=t=t<1||30<t?30:t,r.tempInterval=n):(r.countdown=0,r.tempInterval=0,r.mainInterval=n),n!==a&&m()}return r.tempInterval?r.tempInterval/1e3:r.mainInterval/1e3}return"string"==typeof g.pagenow&&(r.screenId=g.pagenow),"string"==typeof g.ajaxurl&&(r.url=g.ajaxurl),"object"==typeof g.heartbeatSettings&&(e=g.heartbeatSettings,!r.url&&e.ajaxurl&&(r.url=e.ajaxurl),e.interval&&(r.mainInterval=e.interval,r.mainInterval<1?r.mainInterval=1:3600<r.mainInterval&&(r.mainInterval=3600)),e.minimalInterval&&(e.minimalInterval=parseInt(e.minimalInterval,10),r.minimalInterval=0<e.minimalInterval&&e.minimalInterval<=600?e.minimalInterval:0),r.minimalInterval&&r.mainInterval<r.minimalInterval&&(r.mainInterval=r.minimalInterval),r.screenId||(r.screenId=e.screenId||"front"),"disable"===e.suspension)&&(r.suspendEnabled=!1),r.mainInterval=1e3*r.mainInterval,r.originalInterval=r.mainInterval,r.minimalInterval&&(r.minimalInterval=1e3*r.minimalInterval),void 0!==document.hidden?(t="hidden",a="visibilitychange",n="visibilityState"):void 0!==document.msHidden?(t="msHidden",a="msvisibilitychange",n="msVisibilityState"):void 0!==document.webkitHidden&&(t="webkitHidden",a="webkitvisibilitychange",n="webkitVisibilityState"),t&&(document[t]&&(r.hasFocus=!1),i.on(a+".wp-heartbeat",function(){"hidden"===document[n]?(v(),g.clearInterval(r.checkFocusTimer)):(d(),document.hasFocus&&(r.checkFocusTimer=g.setInterval(s,1e4)))})),document.hasFocus&&(r.checkFocusTimer=g.setInterval(s,1e4)),w(g).on("pagehide.wp-heartbeat",function(){h(),r.xhr&&4!==r.xhr.readyState&&r.xhr.abort()}),w(g).on("pageshow.wp-heartbeat",function(e){e.originalEvent.persisted&&d()}),g.setInterval(I,3e4),w(function(){r.lastTick=o(),m()}),{hasFocus:function(){return r.hasFocus},connectNow:function(){r.lastTick=0,m()},disableSuspend:function(){r.suspendEnabled=!1},interval:f,hasConnectionError:b,enqueue:function(e,t,n){return!!e&&!(n&&this.isQueued(e)||(r.queue[e]=t,0))},dequeue:function(e){e&&delete r.queue[e]},isQueued:function(e){if(e)return r.queue.hasOwnProperty(e)},getQueuedItem:function(e){return e&&this.isQueued(e)?r.queue[e]:void 0}}}}(jQuery,window);                                                                                                                                                                                                     hoverIntent.js                                                                                      0000644                 00000016071 15212564040 0007413 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * hoverIntent v1.10.2 // 2020.04.28 // jQuery v1.7.0+
 * http://briancherne.github.io/jquery-hoverIntent/
 *
 * You may use hoverIntent under the terms of the MIT license. Basically that
 * means you are free to use hoverIntent as long as this header is left intact.
 * Copyright 2007-2019 Brian Cherne
 */

/**
 * hoverIntent is similar to jQuery's built-in "hover" method except that
 * instead of firing the handlerIn function immediately, hoverIntent checks
 * to see if the user's mouse has slowed down (beneath the sensitivity
 * threshold) before firing the event. The handlerOut function is only
 * called after a matching handlerIn.
 *
 * // basic usage ... just like .hover()
 * .hoverIntent( handlerIn, handlerOut )
 * .hoverIntent( handlerInOut )
 *
 * // basic usage ... with event delegation!
 * .hoverIntent( handlerIn, handlerOut, selector )
 * .hoverIntent( handlerInOut, selector )
 *
 * // using a basic configuration object
 * .hoverIntent( config )
 *
 * @param  handlerIn   function OR configuration object
 * @param  handlerOut  function OR selector for delegation OR undefined
 * @param  selector    selector OR undefined
 * @author Brian Cherne <brian(at)cherne(dot)net>
 */

;(function(factory) {
    'use strict';
    if (typeof define === 'function' && define.amd) {
        define(['jquery'], factory);
    } else if (typeof module === 'object' && module.exports) {
        module.exports = factory(require('jquery'));
    } else if (jQuery && !jQuery.fn.hoverIntent) {
        factory(jQuery);
    }
})(function($) {
    'use strict';

    // default configuration values
    var _cfg = {
        interval: 100,
        sensitivity: 6,
        timeout: 0
    };

    // counter used to generate an ID for each instance
    var INSTANCE_COUNT = 0;

    // current X and Y position of mouse, updated during mousemove tracking (shared across instances)
    var cX, cY;

    // saves the current pointer position coordinates based on the given mousemove event
    var track = function(ev) {
        cX = ev.pageX;
        cY = ev.pageY;
    };

    // compares current and previous mouse positions
    var compare = function(ev,$el,s,cfg) {
        // compare mouse positions to see if pointer has slowed enough to trigger `over` function
        if ( Math.sqrt( (s.pX-cX)*(s.pX-cX) + (s.pY-cY)*(s.pY-cY) ) < cfg.sensitivity ) {
            $el.off(s.event,track);
            delete s.timeoutId;
            // set hoverIntent state as active for this element (permits `out` handler to trigger)
            s.isActive = true;
            // overwrite old mouseenter event coordinates with most recent pointer position
            ev.pageX = cX; ev.pageY = cY;
            // clear coordinate data from state object
            delete s.pX; delete s.pY;
            return cfg.over.apply($el[0],[ev]);
        } else {
            // set previous coordinates for next comparison
            s.pX = cX; s.pY = cY;
            // use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs)
            s.timeoutId = setTimeout( function(){compare(ev, $el, s, cfg);} , cfg.interval );
        }
    };

    // triggers given `out` function at configured `timeout` after a mouseleave and clears state
    var delay = function(ev,$el,s,out) {
        var data = $el.data('hoverIntent');
        if (data) {
            delete data[s.id];
        }
        return out.apply($el[0],[ev]);
    };

    // checks if `value` is a function
    var isFunction = function(value) {
        return typeof value === 'function';
    };

    $.fn.hoverIntent = function(handlerIn,handlerOut,selector) {
        // instance ID, used as a key to store and retrieve state information on an element
        var instanceId = INSTANCE_COUNT++;

        // extend the default configuration and parse parameters
        var cfg = $.extend({}, _cfg);
        if ( $.isPlainObject(handlerIn) ) {
            cfg = $.extend(cfg, handlerIn);
            if ( !isFunction(cfg.out) ) {
                cfg.out = cfg.over;
            }
        } else if ( isFunction(handlerOut) ) {
            cfg = $.extend(cfg, { over: handlerIn, out: handlerOut, selector: selector } );
        } else {
            cfg = $.extend(cfg, { over: handlerIn, out: handlerIn, selector: handlerOut } );
        }

        // A private function for handling mouse 'hovering'
        var handleHover = function(e) {
            // cloned event to pass to handlers (copy required for event object to be passed in IE)
            var ev = $.extend({},e);

            // the current target of the mouse event, wrapped in a jQuery object
            var $el = $(this);

            // read hoverIntent data from element (or initialize if not present)
            var hoverIntentData = $el.data('hoverIntent');
            if (!hoverIntentData) { $el.data('hoverIntent', (hoverIntentData = {})); }

            // read per-instance state from element (or initialize if not present)
            var state = hoverIntentData[instanceId];
            if (!state) { hoverIntentData[instanceId] = state = { id: instanceId }; }

            // state properties:
            // id = instance ID, used to clean up data
            // timeoutId = timeout ID, reused for tracking mouse position and delaying "out" handler
            // isActive = plugin state, true after `over` is called just until `out` is called
            // pX, pY = previously-measured pointer coordinates, updated at each polling interval
            // event = string representing the namespaced event used for mouse tracking

            // clear any existing timeout
            if (state.timeoutId) { state.timeoutId = clearTimeout(state.timeoutId); }

            // namespaced event used to register and unregister mousemove tracking
            var mousemove = state.event = 'mousemove.hoverIntent.hoverIntent'+instanceId;

            // handle the event, based on its type
            if (e.type === 'mouseenter') {
                // do nothing if already active
                if (state.isActive) { return; }
                // set "previous" X and Y position based on initial entry point
                state.pX = ev.pageX; state.pY = ev.pageY;
                // update "current" X and Y position based on mousemove
                $el.off(mousemove,track).on(mousemove,track);
                // start polling interval (self-calling timeout) to compare mouse coordinates over time
                state.timeoutId = setTimeout( function(){compare(ev,$el,state,cfg);} , cfg.interval );
            } else { // "mouseleave"
                // do nothing if not already active
                if (!state.isActive) { return; }
                // unbind expensive mousemove event
                $el.off(mousemove,track);
                // if hoverIntent state is true, then call the mouseOut function after the specified delay
                state.timeoutId = setTimeout( function(){delay(ev,$el,state,cfg.out);} , cfg.timeout );
            }
        };

        // listen for mouseenter and mouseleave
        return this.on({'mouseenter.hoverIntent':handleHover,'mouseleave.hoverIntent':handleHover}, cfg.selector);
    };
});
                                                                                                                                                                                                                                                                                                                                                                                                                                                                       hoverIntent.min.js                                                                                  0000644                 00000002733 15212564040 0010175 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=e(require("jquery")):jQuery&&!jQuery.fn.hoverIntent&&e(jQuery)}(function(f){"use strict";function u(e){return"function"==typeof e}var i,r,v={interval:100,sensitivity:6,timeout:0},s=0,a=function(e){i=e.pageX,r=e.pageY},p=function(e,t,n,o){if(Math.sqrt((n.pX-i)*(n.pX-i)+(n.pY-r)*(n.pY-r))<o.sensitivity)return t.off(n.event,a),delete n.timeoutId,n.isActive=!0,e.pageX=i,e.pageY=r,delete n.pX,delete n.pY,o.over.apply(t[0],[e]);n.pX=i,n.pY=r,n.timeoutId=setTimeout(function(){p(e,t,n,o)},o.interval)};f.fn.hoverIntent=function(e,t,n){function o(e){var u=f.extend({},e),r=f(this),v=((t=r.data("hoverIntent"))||r.data("hoverIntent",t={}),t[i]),t=(v||(t[i]=v={id:i}),v.timeoutId&&(v.timeoutId=clearTimeout(v.timeoutId)),v.event="mousemove.hoverIntent.hoverIntent"+i);"mouseenter"===e.type?v.isActive||(v.pX=u.pageX,v.pY=u.pageY,r.off(t,a).on(t,a),v.timeoutId=setTimeout(function(){p(u,r,v,d)},d.interval)):v.isActive&&(r.off(t,a),v.timeoutId=setTimeout(function(){var e,t,n,o,i;e=u,t=r,n=v,o=d.out,(i=t.data("hoverIntent"))&&delete i[n.id],o.apply(t[0],[e])},d.timeout))}var i=s++,d=f.extend({},v);f.isPlainObject(e)?(d=f.extend(d,e),u(d.out)||(d.out=d.over)):d=u(t)?f.extend(d,{over:e,out:t,selector:n}):f.extend(d,{over:e,out:e,selector:t});return this.on({"mouseenter.hoverIntent":o,"mouseleave.hoverIntent":o},d.selector)}});                                     hoverintent-js.min.js                                                                               0000644                 00000003266 15212564040 0010651 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(e,t){if("function"==typeof define&&define.amd)define("hoverintent",["module"],t);else if("undefined"!=typeof exports)t(module);else{var n={exports:{}};t(n),e.hoverintent=n.exports}}(this,function(e){"use strict";var t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e};e.exports=function(e,n,o){function i(e,t){return y&&(y=clearTimeout(y)),b=0,p?void 0:o.call(e,t)}function r(e){m=e.clientX,d=e.clientY}function u(e,t){if(y&&(y=clearTimeout(y)),Math.abs(h-m)+Math.abs(E-d)<x.sensitivity)return b=1,p?void 0:n.call(e,t);h=m,E=d,y=setTimeout(function(){u(e,t)},x.interval)}function s(t){return L=!0,y&&(y=clearTimeout(y)),e.removeEventListener("mousemove",r,!1),1!==b&&(h=t.clientX,E=t.clientY,e.addEventListener("mousemove",r,!1),y=setTimeout(function(){u(e,t)},x.interval)),this}function c(t){return L=!1,y&&(y=clearTimeout(y)),e.removeEventListener("mousemove",r,!1),1===b&&(y=setTimeout(function(){i(e,t)},x.timeout)),this}function v(t){L||(p=!0,n.call(e,t))}function a(t){!L&&p&&(p=!1,o.call(e,t))}function f(){e.addEventListener("focus",v,!1),e.addEventListener("blur",a,!1)}function l(){e.removeEventListener("focus",v,!1),e.removeEventListener("blur",a,!1)}var m,d,h,E,L=!1,p=!1,T={},b=0,y=0,x={sensitivity:7,interval:100,timeout:0,handleFocus:!1};return T.options=function(e){var n=e.handleFocus!==x.handleFocus;return x=t({},x,e),n&&(x.handleFocus?f():l()),T},T.remove=function(){e&&(e.removeEventListener("mouseover",s,!1),e.removeEventListener("mouseout",c,!1),l())},e&&(e.addEventListener("mouseover",s,!1),e.addEventListener("mouseout",c,!1)),T}});
                                                                                                                                                                                                                                                                                                                                          imagesloaded.min.js                                                                                 0000644                 00000012620 15212564040 0010302 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
/*!
 * imagesLoaded PACKAGED v5.0.0
 * JavaScript is all like "You images are done yet or what?"
 * MIT License
 */
!function(t,e){"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}let e=t.prototype;return e.on=function(t,e){if(!t||!e)return this;let i=this._events=this._events||{},s=i[t]=i[t]||[];return s.includes(e)||s.push(e),this},e.once=function(t,e){if(!t||!e)return this;this.on(t,e);let i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this},e.off=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;let s=i.indexOf(e);return-1!=s&&i.splice(s,1),this},e.emitEvent=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;i=i.slice(0),e=e||[];let s=this._onceEvents&&this._onceEvents[t];for(let n of i){s&&s[n]&&(this.off(t,n),delete s[n]),n.apply(this,e)}return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})),
/*!
 * imagesLoaded v5.0.0
 * JavaScript is all like "You images are done yet or what?"
 * MIT License
 */
function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,(function(t,e){let i=t.jQuery,s=t.console;function n(t,e,o){if(!(this instanceof n))return new n(t,e,o);let r=t;var h;("string"==typeof t&&(r=document.querySelectorAll(t)),r)?(this.elements=(h=r,Array.isArray(h)?h:"object"==typeof h&&"number"==typeof h.length?[...h]:[h]),this.options={},"function"==typeof e?o=e:Object.assign(this.options,e),o&&this.on("always",o),this.getImages(),i&&(this.jqDeferred=new i.Deferred),setTimeout(this.check.bind(this))):s.error(`Bad element for imagesLoaded ${r||t}`)}n.prototype=Object.create(e.prototype),n.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const o=[1,9,11];n.prototype.addElementImages=function(t){"IMG"===t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);let{nodeType:e}=t;if(!e||!o.includes(e))return;let i=t.querySelectorAll("img");for(let t of i)this.addImage(t);if("string"==typeof this.options.background){let e=t.querySelectorAll(this.options.background);for(let t of e)this.addElementBackgroundImages(t)}};const r=/url\((['"])?(.*?)\1\)/gi;function h(t){this.img=t}function d(t,e){this.url=t,this.element=e,this.img=new Image}return n.prototype.addElementBackgroundImages=function(t){let e=getComputedStyle(t);if(!e)return;let i=r.exec(e.backgroundImage);for(;null!==i;){let s=i&&i[2];s&&this.addBackground(s,t),i=r.exec(e.backgroundImage)}},n.prototype.addImage=function(t){let e=new h(t);this.images.push(e)},n.prototype.addBackground=function(t,e){let i=new d(t,e);this.images.push(i)},n.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();let t=(t,e,i)=>{setTimeout((()=>{this.progress(t,e,i)}))};this.images.forEach((function(e){e.once("progress",t),e.check()}))},n.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&s&&s.log(`progress: ${i}`,t,e)},n.prototype.complete=function(){let t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){let t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},h.prototype=Object.create(e.prototype),h.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},h.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},h.prototype.confirm=function(t,e){this.isLoaded=t;let{parentNode:i}=this.img,s="PICTURE"===i.nodeName?i:this.img;this.emitEvent("progress",[this,s,e])},h.prototype.handleEvent=function(t){let e="on"+t.type;this[e]&&this[e](t)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype=Object.create(h.prototype),d.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},d.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},n.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&(i=e,i.fn.imagesLoaded=function(t,e){return new n(this,t,e).jqDeferred.promise(i(this))})},n.makeJQueryPlugin(),n}));                                                                                                                imgareaselect/border-anim-h.gif                                                                     0000644                 00000000262 15212564040 0012463 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       GIF89a  ð  ÿÿÿ666!ÿNETSCAPE2.0   !ù
 ÿ ,      @Q !ù
  ,      ^ !ù
  ,      ^ !ù
  ,       D^ !ù
  ,      D^ !ù
  ,      D^ ;                                                                                                                                                                                                                                                                                                                                              imgareaselect/border-anim-v.gif                                                                     0000644                 00000000262 15212564040 0012501 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       GIF89a  ð  ÿÿÿ666!ÿNETSCAPE2.0   !ù
 ÿ ,      @L€Q !ù
  ,      ^ !ù
  ,      ^ !ù
  ,       D^ !ù
  ,      D^ !ù
  ,      D^ ;                                                                                                                                                                                                                                                                                                                                              imgareaselect/imgareaselect.css                                                                     0000644                 00000001426 15212564040 0012672 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*
 * imgAreaSelect animated border style
 */

.imgareaselect-border1 {
	background: url(border-anim-v.gif) repeat-y left top;
}

.imgareaselect-border2 {
    background: url(border-anim-h.gif) repeat-x left top;
}

.imgareaselect-border3 {
    background: url(border-anim-v.gif) repeat-y right top;
}

.imgareaselect-border4 {
    background: url(border-anim-h.gif) repeat-x left bottom;
}

.imgareaselect-border1, .imgareaselect-border2,
.imgareaselect-border3, .imgareaselect-border4 {
    filter: alpha(opacity=50);
	opacity: 0.5;
}

.imgareaselect-handle {
    background-color: #fff;
	border: solid 1px #000;
    filter: alpha(opacity=50);
	opacity: 0.5;
}

.imgareaselect-outer {
	background-color: #000;
    filter: alpha(opacity=50);
	opacity: 0.5;
}

.imgareaselect-selection {
}
                                                                                                                                                                                                                                          imgareaselect/jquery.imgareaselect.js                                                               0000644                 00000113355 15212564040 0014041 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*
 * imgAreaSelect jQuery plugin
 * version 0.9.10-wp-6.2
 *
 * Copyright (c) 2008-2013 Michal Wojciechowski (odyniec.net)
 *
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * https://github.com/odyniec/imgareaselect
 *
 */

(function($) {

/*
 * Math functions will be used extensively, so it's convenient to make a few
 * shortcuts
 */
var abs = Math.abs,
    max = Math.max,
    min = Math.min,
    floor = Math.floor;

/**
 * Create a new HTML div element
 *
 * @return A jQuery object representing the new element
 */
function div() {
    return $('<div/>');
}

/**
 * imgAreaSelect initialization
 *
 * @param img
 *            A HTML image element to attach the plugin to
 * @param options
 *            An options object
 */
$.imgAreaSelect = function (img, options) {
    var
        /* jQuery object representing the image */
        $img = $(img),

        /* Has the image finished loading? */
        imgLoaded,

        /* Plugin elements */

        /* Container box */
        $box = div(),
        /* Selection area */
        $area = div(),
        /* Border (four divs) */
        $border = div().add(div()).add(div()).add(div()),
        /* Outer area (four divs) */
        $outer = div().add(div()).add(div()).add(div()),
        /* Handles (empty by default, initialized in setOptions()) */
        $handles = $([]),

        /*
         * Additional element to work around a cursor problem in Opera
         * (explained later)
         */
        $areaOpera,

        /* Image position (relative to viewport) */
        left, top,

        /* Image offset (as returned by .offset()) */
        imgOfs = { left: 0, top: 0 },

        /* Image dimensions (as returned by .width() and .height()) */
        imgWidth, imgHeight,

        /*
         * jQuery object representing the parent element that the plugin
         * elements are appended to
         */
        $parent,

        /* Parent element offset (as returned by .offset()) */
        parOfs = { left: 0, top: 0 },

        /* Base z-index for plugin elements */
        zIndex = 0,

        /* Plugin elements position */
        position = 'absolute',

        /* X/Y coordinates of the starting point for move/resize operations */
        startX, startY,

        /* Horizontal and vertical scaling factors */
        scaleX, scaleY,

        /* Current resize mode ("nw", "se", etc.) */
        resize,

        /* Selection area constraints */
        minWidth, minHeight, maxWidth, maxHeight,

        /* Aspect ratio to maintain (floating point number) */
        aspectRatio,

        /* Are the plugin elements currently displayed? */
        shown,

        /* Current selection (relative to parent element) */
        x1, y1, x2, y2,

        /* Current selection (relative to scaled image) */
        selection = { x1: 0, y1: 0, x2: 0, y2: 0, width: 0, height: 0 },

        /* Document element */
        docElem = document.documentElement,

        /* User agent */
        ua = navigator.userAgent,

        /* Various helper variables used throughout the code */
        $p, d, i, o, w, h, adjusted;

    /*
     * Translate selection coordinates (relative to scaled image) to viewport
     * coordinates (relative to parent element)
     */

    /**
     * Translate selection X to viewport X
     *
     * @param x
     *            Selection X
     * @return Viewport X
     */
    function viewX(x) {
        return x + imgOfs.left - parOfs.left;
    }

    /**
     * Translate selection Y to viewport Y
     *
     * @param y
     *            Selection Y
     * @return Viewport Y
     */
    function viewY(y) {
        return y + imgOfs.top - parOfs.top;
    }

    /*
     * Translate viewport coordinates to selection coordinates
     */

    /**
     * Translate viewport X to selection X
     *
     * @param x
     *            Viewport X
     * @return Selection X
     */
    function selX(x) {
        return x - imgOfs.left + parOfs.left;
    }

    /**
     * Translate viewport Y to selection Y
     *
     * @param y
     *            Viewport Y
     * @return Selection Y
     */
    function selY(y) {
        return y - imgOfs.top + parOfs.top;
    }

    /*
     * Translate event coordinates (relative to document) to viewport
     * coordinates
     */

    /**
     * Get event X and translate it to viewport X
     *
     * @param event
     *            The event object
     * @return Viewport X
     */
    function evX(event) {
        return max(event.pageX || 0, touchCoords(event).x) - parOfs.left;
    }

    /**
     * Get event Y and translate it to viewport Y
     *
     * @param event
     *            The event object
     * @return Viewport Y
     */
    function evY(event) {
        return max(event.pageY || 0, touchCoords(event).y) - parOfs.top;
    }

    /**
     * Get X and Y coordinates of a touch event
     *
     * @param event
     *            The event object
     * @return Coordinates object
     */
    function touchCoords(event) {
        var oev = event.originalEvent || {};

        if (oev.touches && oev.touches.length)
            return { x: oev.touches[0].pageX, y: oev.touches[0].pageY };
        else
            return { x: 0, y: 0 };
    }

    /**
     * Get the current selection
     *
     * @param noScale
     *            If set to <code>true</code>, scaling is not applied to the
     *            returned selection
     * @return Selection object
     */
    function getSelection(noScale) {
        var sx = noScale || scaleX, sy = noScale || scaleY;

        return { x1: floor(selection.x1 * sx),
            y1: floor(selection.y1 * sy),
            x2: floor(selection.x2 * sx),
            y2: floor(selection.y2 * sy),
            width: floor(selection.x2 * sx) - floor(selection.x1 * sx),
            height: floor(selection.y2 * sy) - floor(selection.y1 * sy) };
    }

    /**
     * Set the current selection
     *
     * @param x1
     *            X coordinate of the upper left corner of the selection area
     * @param y1
     *            Y coordinate of the upper left corner of the selection area
     * @param x2
     *            X coordinate of the lower right corner of the selection area
     * @param y2
     *            Y coordinate of the lower right corner of the selection area
     * @param noScale
     *            If set to <code>true</code>, scaling is not applied to the
     *            new selection
     */
    function setSelection(x1, y1, x2, y2, noScale) {
        var sx = noScale || scaleX, sy = noScale || scaleY;

        selection = {
            x1: floor(x1 / sx || 0),
            y1: floor(y1 / sy || 0),
            x2: floor(x2 / sx || 0),
            y2: floor(y2 / sy || 0)
        };

        selection.width = selection.x2 - selection.x1;
        selection.height = selection.y2 - selection.y1;
    }

    /**
     * Recalculate image and parent offsets
     */
    function adjust() {
        /*
         * Do not adjust if image has not yet loaded or if width is not a
         * positive number. The latter might happen when imgAreaSelect is put
         * on a parent element which is then hidden.
         */
        if (!imgLoaded || !$img.width())
            return;

        /*
         * Get image offset. The .offset() method returns float values, so they
         * need to be rounded.
         */
        imgOfs = { left: floor($img.offset().left), top: floor($img.offset().top) };

        /* Get image dimensions */
        imgWidth = $img.innerWidth();
        imgHeight = $img.innerHeight();

        imgOfs.top += ($img.outerHeight() - imgHeight) >> 1;
        imgOfs.left += ($img.outerWidth() - imgWidth) >> 1;

        /* Set minimum and maximum selection area dimensions */
        minWidth = floor(options.minWidth / scaleX) || 0;
        minHeight = floor(options.minHeight / scaleY) || 0;
        maxWidth = floor(min(options.maxWidth / scaleX || 1<<24, imgWidth));
        maxHeight = floor(min(options.maxHeight / scaleY || 1<<24, imgHeight));

        /*
         * Workaround for jQuery 1.3.2 incorrect offset calculation, originally
         * observed in Safari 3. Firefox 2 is also affected.
         */
        if ($().jquery == '1.3.2' && position == 'fixed' &&
            !docElem['getBoundingClientRect'])
        {
            imgOfs.top += max(document.body.scrollTop, docElem.scrollTop);
            imgOfs.left += max(document.body.scrollLeft, docElem.scrollLeft);
        }

        /* Determine parent element offset */
        parOfs = /absolute|relative/.test($parent.css('position')) ?
            { left: floor($parent.offset().left) - $parent.scrollLeft(),
                top: floor($parent.offset().top) - $parent.scrollTop() } :
            position == 'fixed' ?
                { left: $(document).scrollLeft(), top: $(document).scrollTop() } :
                { left: 0, top: 0 };

        left = viewX(0);
        top = viewY(0);

        /*
         * Check if selection area is within image boundaries, adjust if
         * necessary
         */
        if (selection.x2 > imgWidth || selection.y2 > imgHeight)
            doResize();
    }

    /**
     * Update plugin elements
     *
     * @param resetKeyPress
     *            If set to <code>false</code>, this instance's keypress
     *            event handler is not activated
     */
    function update(resetKeyPress) {
        /* If plugin elements are hidden, do nothing */
        if (!shown) return;

        /*
         * Set the position and size of the container box and the selection area
         * inside it
         */
        $box.css({ left: viewX(selection.x1), top: viewY(selection.y1) })
            .add($area).width(w = selection.width).height(h = selection.height);

        /*
         * Reset the position of selection area, borders, and handles (IE6/IE7
         * position them incorrectly if we don't do this)
         */
        $area.add($border).add($handles).css({ left: 0, top: 0 });

        /* Set border dimensions */
        $border
            .width(max(w - $border.outerWidth() + $border.innerWidth(), 0))
            .height(max(h - $border.outerHeight() + $border.innerHeight(), 0));

        /* Arrange the outer area elements */
        $($outer[0]).css({ left: left, top: top,
            width: selection.x1, height: imgHeight });
        $($outer[1]).css({ left: left + selection.x1, top: top,
            width: w, height: selection.y1 });
        $($outer[2]).css({ left: left + selection.x2, top: top,
            width: imgWidth - selection.x2, height: imgHeight });
        $($outer[3]).css({ left: left + selection.x1, top: top + selection.y2,
            width: w, height: imgHeight - selection.y2 });

        w -= $handles.outerWidth();
        h -= $handles.outerHeight();

        /* Arrange handles */
        switch ($handles.length) {
        case 8:
            $($handles[4]).css({ left: w >> 1 });
            $($handles[5]).css({ left: w, top: h >> 1 });
            $($handles[6]).css({ left: w >> 1, top: h });
            $($handles[7]).css({ top: h >> 1 });
        case 4:
            $handles.slice(1,3).css({ left: w });
            $handles.slice(2,4).css({ top: h });
        }

        if (resetKeyPress !== false) {
            /*
             * Need to reset the document keypress event handler -- unbind the
             * current handler
             */
            if ($.imgAreaSelect.onKeyPress != docKeyPress)
                $(document).off($.imgAreaSelect.keyPress,
                    $.imgAreaSelect.onKeyPress);

            if (options.keys)
                /*
                 * Set the document keypress event handler to this instance's
                 * docKeyPress() function
                 */
                $(document).on( $.imgAreaSelect.keyPress, function() {
                    $.imgAreaSelect.onKeyPress = docKeyPress;
                });
        }

        /*
         * Internet Explorer displays 1px-wide dashed borders incorrectly by
         * filling the spaces between dashes with white. Toggling the margin
         * property between 0 and "auto" fixes this in IE6 and IE7 (IE8 is still
         * broken). This workaround is not perfect, as it requires setTimeout()
         * and thus causes the border to flicker a bit, but I haven't found a
         * better solution.
         *
         * Note: This only happens with CSS borders, set with the borderWidth,
         * borderOpacity, borderColor1, and borderColor2 options (which are now
         * deprecated). Borders created with GIF background images are fine.
         */
        if (msie && $border.outerWidth() - $border.innerWidth() == 2) {
            $border.css('margin', 0);
            setTimeout(function () { $border.css('margin', 'auto'); }, 0);
        }
    }

    /**
     * Do the complete update sequence: recalculate offsets, update the
     * elements, and set the correct values of x1, y1, x2, and y2.
     *
     * @param resetKeyPress
     *            If set to <code>false</code>, this instance's keypress
     *            event handler is not activated
     */
    function doUpdate(resetKeyPress) {
        adjust();
        update(resetKeyPress);
        updateSelectionRelativeToParentElement();
    }

    /**
     * Set the correct values of x1, y1, x2, and y2.
     */
    function updateSelectionRelativeToParentElement() {
        x1 = viewX(selection.x1); y1 = viewY(selection.y1);
        x2 = viewX(selection.x2); y2 = viewY(selection.y2);
    }

    /**
     * Hide or fade out an element (or multiple elements)
     *
     * @param $elem
     *            A jQuery object containing the element(s) to hide/fade out
     * @param fn
     *            Callback function to be called when fadeOut() completes
     */
    function hide($elem, fn) {
        options.fadeSpeed ? $elem.fadeOut(options.fadeSpeed, fn) : $elem.hide();
    }

    /**
     * Selection area mousemove event handler
     *
     * @param event
     *            The event object
     */
    function areaMouseMove(event) {
        var x = selX(evX(event)) - selection.x1,
            y = selY(evY(event)) - selection.y1;

        if (!adjusted) {
            adjust();
            adjusted = true;

            $box.one('mouseout', function () { adjusted = false; });
        }

        /* Clear the resize mode */
        resize = '';

        if (options.resizable) {
            /*
             * Check if the mouse pointer is over the resize margin area and set
             * the resize mode accordingly
             */
            if (y <= options.resizeMargin)
                resize = 'n';
            else if (y >= selection.height - options.resizeMargin)
                resize = 's';
            if (x <= options.resizeMargin)
                resize += 'w';
            else if (x >= selection.width - options.resizeMargin)
                resize += 'e';
        }

        $box.css('cursor', resize ? resize + '-resize' :
            options.movable ? 'move' : '');
        if ($areaOpera)
            $areaOpera.toggle();
    }

    /**
     * Document mouseup event handler
     *
     * @param event
     *            The event object
     */
    function docMouseUp(event) {
        /* Set back the default cursor */
        $('body').css('cursor', '');
        /*
         * If autoHide is enabled, or if the selection has zero width/height,
         * hide the selection and the outer area
         */
        if (options.autoHide || selection.width * selection.height == 0)
            hide($box.add($outer), function () { $(this).hide(); });

        $(document).off('mousemove touchmove', selectingMouseMove);
        $box.on('mousemove touchmove', areaMouseMove);

        options.onSelectEnd(img, getSelection());
    }

    /**
     * Selection area mousedown event handler
     *
     * @param event
     *            The event object
     * @return false
     */
    function areaMouseDown(event) {
        if (event.type == 'mousedown' && event.which != 1) return false;

    	/*
    	 * With mobile browsers, there is no "moving the pointer over" action,
    	 * so we need to simulate one mousemove event happening prior to
    	 * mousedown/touchstart.
    	 */
    	areaMouseMove(event);

        adjust();

        if (resize) {
            /* Resize mode is in effect */
            $('body').css('cursor', resize + '-resize');

            x1 = viewX(selection[/w/.test(resize) ? 'x2' : 'x1']);
            y1 = viewY(selection[/n/.test(resize) ? 'y2' : 'y1']);

            $(document).on('mousemove touchmove', selectingMouseMove)
                .one('mouseup touchend', docMouseUp);
            $box.off('mousemove touchmove', areaMouseMove);
        }
        else if (options.movable) {
            startX = left + selection.x1 - evX(event);
            startY = top + selection.y1 - evY(event);

            $box.off('mousemove touchmove', areaMouseMove);

            $(document).on('mousemove touchmove', movingMouseMove)
                .one('mouseup touchend', function () {
                    options.onSelectEnd(img, getSelection());

                    $(document).off('mousemove touchmove', movingMouseMove);
                    $box.on('mousemove touchmove', areaMouseMove);
                });
        }
        else
            $img.mousedown(event);

        return false;
    }

    /**
     * Adjust the x2/y2 coordinates to maintain aspect ratio (if defined)
     *
     * @param xFirst
     *            If set to <code>true</code>, calculate x2 first. Otherwise,
     *            calculate y2 first.
     */
    function fixAspectRatio(xFirst) {
        if (aspectRatio)
            if (xFirst) {
                x2 = max(left, min(left + imgWidth,
                    x1 + abs(y2 - y1) * aspectRatio * (x2 > x1 || -1)));
                y2 = floor(max(top, min(top + imgHeight,
                    y1 + abs(x2 - x1) / aspectRatio * (y2 > y1 || -1))));
                x2 = floor(x2);
            }
            else {
                y2 = max(top, min(top + imgHeight,
                    y1 + abs(x2 - x1) / aspectRatio * (y2 > y1 || -1)));
                x2 = floor(max(left, min(left + imgWidth,
                    x1 + abs(y2 - y1) * aspectRatio * (x2 > x1 || -1))));
                y2 = floor(y2);
            }
    }

    /**
     * Resize the selection area respecting the minimum/maximum dimensions and
     * aspect ratio
     */
    function doResize() {
        /*
         * Make sure x1, x2, y1, y2 are initialized to avoid the following calculation
         * getting incorrect results.
         */
        if ( x1 == null || x2 == null || y1 == null || y2 == null ) {
            updateSelectionRelativeToParentElement();
        }

        /*
         * Make sure the top left corner of the selection area stays within
         * image boundaries (it might not if the image source was dynamically
         * changed).
         */
        x1 = min(x1, left + imgWidth);
        y1 = min(y1, top + imgHeight);

        if (abs(x2 - x1) < minWidth) {
            /* Selection width is smaller than minWidth */
            x2 = x1 - minWidth * (x2 < x1 || -1);

            if (x2 < left)
                x1 = left + minWidth;
            else if (x2 > left + imgWidth)
                x1 = left + imgWidth - minWidth;
        }

        if (abs(y2 - y1) < minHeight) {
            /* Selection height is smaller than minHeight */
            y2 = y1 - minHeight * (y2 < y1 || -1);

            if (y2 < top)
                y1 = top + minHeight;
            else if (y2 > top + imgHeight)
                y1 = top + imgHeight - minHeight;
        }

        x2 = max(left, min(x2, left + imgWidth));
        y2 = max(top, min(y2, top + imgHeight));

        fixAspectRatio(abs(x2 - x1) < abs(y2 - y1) * aspectRatio);

        if (abs(x2 - x1) > maxWidth) {
            /* Selection width is greater than maxWidth */
            x2 = x1 - maxWidth * (x2 < x1 || -1);
            fixAspectRatio();
        }

        if (abs(y2 - y1) > maxHeight) {
            /* Selection height is greater than maxHeight */
            y2 = y1 - maxHeight * (y2 < y1 || -1);
            fixAspectRatio(true);
        }

        selection = { x1: selX(min(x1, x2)), x2: selX(max(x1, x2)),
            y1: selY(min(y1, y2)), y2: selY(max(y1, y2)),
            width: abs(x2 - x1), height: abs(y2 - y1) };

        update();

        options.onSelectChange(img, getSelection());
    }

    /**
     * Mousemove event handler triggered when the user is selecting an area
     *
     * @param event
     *            The event object
     * @return false
     */
    function selectingMouseMove(event) {
        x2 = /w|e|^$/.test(resize) || aspectRatio ? evX(event) : viewX(selection.x2);
        y2 = /n|s|^$/.test(resize) || aspectRatio ? evY(event) : viewY(selection.y2);

        doResize();

        return false;
    }

    /**
     * Move the selection area
     *
     * @param newX1
     *            New viewport X1
     * @param newY1
     *            New viewport Y1
     */
    function doMove(newX1, newY1) {
        x2 = (x1 = newX1) + selection.width;
        y2 = (y1 = newY1) + selection.height;

        $.extend(selection, { x1: selX(x1), y1: selY(y1), x2: selX(x2),
            y2: selY(y2) });

        update();

        options.onSelectChange(img, getSelection());
    }

    /**
     * Mousemove event handler triggered when the selection area is being moved
     *
     * @param event
     *            The event object
     * @return false
     */
    function movingMouseMove(event) {
        x1 = max(left, min(startX + evX(event), left + imgWidth - selection.width));
        y1 = max(top, min(startY + evY(event), top + imgHeight - selection.height));

        doMove(x1, y1);

        event.preventDefault();
        return false;
    }

    /**
     * Start selection
     */
    function startSelection() {
        $(document).off('mousemove touchmove', startSelection);
        adjust();

        x2 = x1;
        y2 = y1;
        doResize();

        resize = '';

        if (!$outer.is(':visible'))
            /* Show the plugin elements */
            $box.add($outer).hide().fadeIn(options.fadeSpeed||0);

        shown = true;

        $(document).off('mouseup touchend', cancelSelection)
            .on('mousemove touchmove', selectingMouseMove)
            .one('mouseup touchend', docMouseUp);
        $box.off('mousemove touchmove', areaMouseMove);

        options.onSelectStart(img, getSelection());
    }

    /**
     * Cancel selection
     */
    function cancelSelection() {
        $(document).off('mousemove touchmove', startSelection)
            .off('mouseup touchend', cancelSelection);
        hide($box.add($outer));

        setSelection(selX(x1), selY(y1), selX(x1), selY(y1));

        /* If this is an API call, callback functions should not be triggered */
        if (!(this instanceof $.imgAreaSelect)) {
            options.onSelectChange(img, getSelection());
            options.onSelectEnd(img, getSelection());
        }
    }

    /**
     * Image mousedown event handler
     *
     * @param event
     *            The event object
     * @return false
     */
    function imgMouseDown(event) {
        /* Ignore the event if animation is in progress */
        if (event.which > 1 || $outer.is(':animated')) return false;

        adjust();
        startX = x1 = evX(event);
        startY = y1 = evY(event);

        /* Selection will start when the mouse is moved */
        $(document).on({ 'mousemove touchmove': startSelection,
            'mouseup touchend': cancelSelection });

        return false;
    }

    /**
     * Window resize event handler
     */
    function windowResize() {
        doUpdate(false);
    }

    /**
     * Image load event handler. This is the final part of the initialization
     * process.
     */
    function imgLoad() {
        imgLoaded = true;

        /* Set options */
        setOptions(options = $.extend({
            classPrefix: 'imgareaselect',
            movable: true,
            parent: 'body',
            resizable: true,
            resizeMargin: 10,
            onInit: function () {},
            onSelectStart: function () {},
            onSelectChange: function () {},
            onSelectEnd: function () {}
        }, options));

        $box.add($outer).css({ visibility: '' });

        if (options.show) {
            shown = true;
            adjust();
            update();
            $box.add($outer).hide().fadeIn(options.fadeSpeed||0);
        }

        /*
         * Call the onInit callback. The setTimeout() call is used to ensure
         * that the plugin has been fully initialized and the object instance is
         * available (so that it can be obtained in the callback).
         */
        setTimeout(function () { options.onInit(img, getSelection()); }, 0);
    }

    /**
     * Document keypress event handler
     *
     * @param event
     *            The event object
     * @return false
     */
    var docKeyPress = function(event) {
        var k = options.keys, d, t, key = event.keyCode;

        d = !isNaN(k.alt) && (event.altKey || event.originalEvent.altKey) ? k.alt :
            !isNaN(k.ctrl) && event.ctrlKey ? k.ctrl :
            !isNaN(k.shift) && event.shiftKey ? k.shift :
            !isNaN(k.arrows) ? k.arrows : 10;

        if (k.arrows == 'resize' || (k.shift == 'resize' && event.shiftKey) ||
            (k.ctrl == 'resize' && event.ctrlKey) ||
            (k.alt == 'resize' && (event.altKey || event.originalEvent.altKey)))
        {
            /* Resize selection */

            switch (key) {
            case 37:
                /* Left */
                d = -d;
            case 39:
                /* Right */
                t = max(x1, x2);
                x1 = min(x1, x2);
                x2 = max(t + d, x1);
                fixAspectRatio();
                break;
            case 38:
                /* Up */
                d = -d;
            case 40:
                /* Down */
                t = max(y1, y2);
                y1 = min(y1, y2);
                y2 = max(t + d, y1);
                fixAspectRatio(true);
                break;
            default:
                return;
            }

            doResize();
        }
        else {
            /* Move selection */

            x1 = min(x1, x2);
            y1 = min(y1, y2);

            switch (key) {
            case 37:
                /* Left */
                doMove(max(x1 - d, left), y1);
                break;
            case 38:
                /* Up */
                doMove(x1, max(y1 - d, top));
                break;
            case 39:
                /* Right */
                doMove(x1 + min(d, imgWidth - selX(x2)), y1);
                break;
            case 40:
                /* Down */
                doMove(x1, y1 + min(d, imgHeight - selY(y2)));
                break;
            default:
                return;
            }
        }

        return false;
    };

    /**
     * Apply style options to plugin element (or multiple elements)
     *
     * @param $elem
     *            A jQuery object representing the element(s) to style
     * @param props
     *            An object that maps option names to corresponding CSS
     *            properties
     */
    function styleOptions($elem, props) {
        for (var option in props)
            if (options[option] !== undefined)
                $elem.css(props[option], options[option]);
    }

    /**
     * Set plugin options
     *
     * @param newOptions
     *            The new options object
     */
    function setOptions(newOptions) {
        if (newOptions.parent)
            ($parent = $(newOptions.parent)).append($box.add($outer));

        /* Merge the new options with the existing ones */
        $.extend(options, newOptions);

        adjust();

        if (newOptions.handles != null) {
            /* Recreate selection area handles */
            $handles.remove();
            $handles = $([]);

            i = newOptions.handles ? newOptions.handles == 'corners' ? 4 : 8 : 0;

            while (i--)
                $handles = $handles.add(div());

            /* Add a class to handles and set the CSS properties */
            $handles.addClass(options.classPrefix + '-handle').css({
                position: 'absolute',
                /*
                 * The font-size property needs to be set to zero, otherwise
                 * Internet Explorer makes the handles too large
                 */
                fontSize: '0',
                zIndex: zIndex + 1 || 1
            });

            /*
             * If handle width/height has not been set with CSS rules, set the
             * default 5px
             */
            if (!parseInt($handles.css('width')) >= 0)
                $handles.width(10).height(10);

            /*
             * If the borderWidth option is in use, add a solid border to
             * handles
             */
            if (o = options.borderWidth)
                $handles.css({ borderWidth: o, borderStyle: 'solid' });

            /* Apply other style options */
            styleOptions($handles, { borderColor1: 'border-color',
                borderColor2: 'background-color',
                borderOpacity: 'opacity' });
        }

        /* Calculate scale factors */
        scaleX = options.imageWidth / imgWidth || 1;
        scaleY = options.imageHeight / imgHeight || 1;

        /* Set selection */
        if (newOptions.x1 != null) {
            setSelection(newOptions.x1, newOptions.y1, newOptions.x2,
                newOptions.y2);
            newOptions.show = !newOptions.hide;
        }

        if (newOptions.keys)
            /* Enable keyboard support */
            options.keys = $.extend({ shift: 1, ctrl: 'resize' },
                newOptions.keys);

        /* Add classes to plugin elements */
        $outer.addClass(options.classPrefix + '-outer');
        $area.addClass(options.classPrefix + '-selection');
        for (i = 0; i++ < 4;)
            $($border[i-1]).addClass(options.classPrefix + '-border' + i);

        /* Apply style options */
        styleOptions($area, { selectionColor: 'background-color',
            selectionOpacity: 'opacity' });
        styleOptions($border, { borderOpacity: 'opacity',
            borderWidth: 'border-width' });
        styleOptions($outer, { outerColor: 'background-color',
            outerOpacity: 'opacity' });
        if (o = options.borderColor1)
            $($border[0]).css({ borderStyle: 'solid', borderColor: o });
        if (o = options.borderColor2)
            $($border[1]).css({ borderStyle: 'dashed', borderColor: o });

        /* Append all the selection area elements to the container box */
        $box.append($area.add($border).add($areaOpera)).append($handles);

        if (msie) {
            if (o = ($outer.css('filter')||'').match(/opacity=(\d+)/))
                $outer.css('opacity', o[1]/100);
            if (o = ($border.css('filter')||'').match(/opacity=(\d+)/))
                $border.css('opacity', o[1]/100);
        }

        if (newOptions.hide)
            hide($box.add($outer));
        else if (newOptions.show && imgLoaded) {
            shown = true;
            $box.add($outer).fadeIn(options.fadeSpeed||0);
            doUpdate();
        }

        /* Calculate the aspect ratio factor */
        aspectRatio = (d = (options.aspectRatio || '').split(/:/))[0] / d[1];

        $img.add($outer).off('mousedown', imgMouseDown);

        if (options.disable || options.enable === false) {
            /* Disable the plugin */
            $box.off({ 'mousemove touchmove': areaMouseMove,
                'mousedown touchstart': areaMouseDown });
            $(window).off('resize', windowResize);
        }
        else {
            if (options.enable || options.disable === false) {
                /* Enable the plugin */
                if (options.resizable || options.movable)
                    $box.on({ 'mousemove touchmove': areaMouseMove,
                        'mousedown touchstart': areaMouseDown });

                $(window).on( 'resize', windowResize);
            }

            if (!options.persistent)
                $img.add($outer).on('mousedown touchstart', imgMouseDown);
        }

        options.enable = options.disable = undefined;
    }

    /**
     * Remove plugin completely
     */
    this.remove = function () {
        /*
         * Call setOptions with { disable: true } to unbind the event handlers
         */
        setOptions({ disable: true });
        $box.add($outer).remove();
    };

    /*
     * Public API
     */

    /**
     * Get current options
     *
     * @return An object containing the set of options currently in use
     */
    this.getOptions = function () { return options; };

    /**
     * Set plugin options
     *
     * @param newOptions
     *            The new options object
     */
    this.setOptions = setOptions;

    /**
     * Get the current selection
     *
     * @param noScale
     *            If set to <code>true</code>, scaling is not applied to the
     *            returned selection
     * @return Selection object
     */
    this.getSelection = getSelection;

    /**
     * Set the current selection
     *
     * @param x1
     *            X coordinate of the upper left corner of the selection area
     * @param y1
     *            Y coordinate of the upper left corner of the selection area
     * @param x2
     *            X coordinate of the lower right corner of the selection area
     * @param y2
     *            Y coordinate of the lower right corner of the selection area
     * @param noScale
     *            If set to <code>true</code>, scaling is not applied to the
     *            new selection
     */
    this.setSelection = setSelection;

    /**
     * Cancel selection
     */
    this.cancelSelection = cancelSelection;

    /**
     * Update plugin elements
     *
     * @param resetKeyPress
     *            If set to <code>false</code>, this instance's keypress
     *            event handler is not activated
     */
    this.update = doUpdate;

    /* Do the dreaded browser detection */
    var msie = (/msie ([\w.]+)/i.exec(ua)||[])[1],
        opera = /opera/i.test(ua),
        safari = /webkit/i.test(ua) && !/chrome/i.test(ua);

    /*
     * Traverse the image's parent elements (up to <body>) and find the
     * highest z-index
     */
    $p = $img;

    while ($p.length) {
        zIndex = max(zIndex,
            !isNaN($p.css('z-index')) ? $p.css('z-index') : zIndex);
        /* Also check if any of the ancestor elements has fixed position */
        if ($p.css('position') == 'fixed')
            position = 'fixed';

        $p = $p.parent(':not(body)');
    }

    /*
     * If z-index is given as an option, it overrides the one found by the
     * above loop
     */
    zIndex = options.zIndex || zIndex;

    if (msie)
        $img.attr('unselectable', 'on');

    /*
     * In MSIE and WebKit, we need to use the keydown event instead of keypress
     */
    $.imgAreaSelect.keyPress = msie || safari ? 'keydown' : 'keypress';

    /*
     * There is a bug affecting the CSS cursor property in Opera (observed in
     * versions up to 10.00) that prevents the cursor from being updated unless
     * the mouse leaves and enters the element again. To trigger the mouseover
     * event, we're adding an additional div to $box and we're going to toggle
     * it when mouse moves inside the selection area.
     */
    if (opera)
        $areaOpera = div().css({ width: '100%', height: '100%',
            position: 'absolute', zIndex: zIndex + 2 || 2 });

    /*
     * We initially set visibility to "hidden" as a workaround for a weird
     * behaviour observed in Google Chrome 1.0.154.53 (on Windows XP). Normally
     * we would just set display to "none", but, for some reason, if we do so
     * then Chrome refuses to later display the element with .show() or
     * .fadeIn().
     */
    $box.add($outer).css({ visibility: 'hidden', position: position,
        overflow: 'hidden', zIndex: zIndex || '0' });
    $box.css({ zIndex: zIndex + 2 || 2 });
    $area.add($border).css({ position: 'absolute', fontSize: '0' });

    /*
     * If the image has been fully loaded, or if it is not really an image (eg.
     * a div), call imgLoad() immediately; otherwise, bind it to be called once
     * on image load event.
     */
    img.complete || img.readyState == 'complete' || !$img.is('img') ?
        imgLoad() : $img.one('load', imgLoad);

    /*
     * MSIE 9.0 doesn't always fire the image load event -- resetting the src
     * attribute seems to trigger it. The check is for version 7 and above to
     * accommodate for MSIE 9 running in compatibility mode.
     */
    if (!imgLoaded && msie && msie >= 7)
        img.src = img.src;
};

/**
 * Invoke imgAreaSelect on a jQuery object containing the image(s)
 *
 * @param options
 *            Options object
 * @return The jQuery object or a reference to imgAreaSelect instance (if the
 *         <code>instance</code> option was specified)
 */
$.fn.imgAreaSelect = function (options) {
    options = options || {};

    this.each(function () {
        /* Is there already an imgAreaSelect instance bound to this element? */
        if ($(this).data('imgAreaSelect')) {
            /* Yes there is -- is it supposed to be removed? */
            if (options.remove) {
                /* Remove the plugin */
                $(this).data('imgAreaSelect').remove();
                $(this).removeData('imgAreaSelect');
            }
            else
                /* Reset options */
                $(this).data('imgAreaSelect').setOptions(options);
        }
        else if (!options.remove) {
            /* No exising instance -- create a new one */

            /*
             * If neither the "enable" nor the "disable" option is present, add
             * "enable" as the default
             */
            if (options.enable === undefined && options.disable === undefined)
                options.enable = true;

            $(this).data('imgAreaSelect', new $.imgAreaSelect(this, options));
        }
    });

    if (options.instance)
        /*
         * Return the imgAreaSelect instance bound to the first element in the
         * set
         */
        return $(this).data('imgAreaSelect');

    return this;
};

})(jQuery);
                                                                                                                                                                                                                                                                                   imgareaselect/jquery.imgareaselect.min.js                                                           0000644                 00000023052 15212564040 0014615 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(Se){var ze=Math.abs,ke=Math.max,Ce=Math.min,Ae=Math.floor;function We(){return Se("<div/>")}Se.imgAreaSelect=function(o,s){var T,L,r,c,d,a,t,j,D,R,X,i,Y,$,q,B,n,Q,u,l,h,f,F,m,p,y,g,G,v=Se(o),b=We(),x=We(),w=We().add(We()).add(We()).add(We()),S=We().add(We()).add(We()).add(We()),z=Se([]),k={left:0,top:0},C={left:0,top:0},A=0,J="absolute",W={x1:0,y1:0,x2:0,y2:0,width:0,height:0},U=document.documentElement,V=navigator.userAgent;function I(e){return e+k.left-C.left}function K(e){return e+k.top-C.top}function P(e){return e-k.left+C.left}function N(e){return e-k.top+C.top}function Z(e){return ke(e.pageX||0,ee(e).x)-C.left}function _(e){return ke(e.pageY||0,ee(e).y)-C.top}function ee(e){e=e.originalEvent||{};return e.touches&&e.touches.length?{x:e.touches[0].pageX,y:e.touches[0].pageY}:{x:0,y:0}}function H(e){var t=e||R,e=e||X;return{x1:Ae(W.x1*t),y1:Ae(W.y1*e),x2:Ae(W.x2*t),y2:Ae(W.y2*e),width:Ae(W.x2*t)-Ae(W.x1*t),height:Ae(W.y2*e)-Ae(W.y1*e)}}function te(e,t,o,i,n){var s=n||R,n=n||X;(W={x1:Ae(e/s||0),y1:Ae(t/n||0),x2:Ae(o/s||0),y2:Ae(i/n||0)}).width=W.x2-W.x1,W.height=W.y2-W.y1}function M(){T&&v.width()&&(k={left:Ae(v.offset().left),top:Ae(v.offset().top)},d=v.innerWidth(),a=v.innerHeight(),k.top+=v.outerHeight()-a>>1,k.left+=v.outerWidth()-d>>1,Y=Ae(s.minWidth/R)||0,$=Ae(s.minHeight/X)||0,q=Ae(Ce(s.maxWidth/R||1<<24,d)),B=Ae(Ce(s.maxHeight/X||1<<24,a)),"1.3.2"!=Se().jquery||"fixed"!=J||U.getBoundingClientRect||(k.top+=ke(document.body.scrollTop,U.scrollTop),k.left+=ke(document.body.scrollLeft,U.scrollLeft)),C=/absolute|relative/.test(t.css("position"))?{left:Ae(t.offset().left)-t.scrollLeft(),top:Ae(t.offset().top)-t.scrollTop()}:"fixed"==J?{left:Se(document).scrollLeft(),top:Se(document).scrollTop()}:{left:0,top:0},r=I(0),c=K(0),W.x2>d||W.y2>a)&&ae()}function oe(e){if(Q){switch(b.css({left:I(W.x1),top:K(W.y1)}).add(x).width(y=W.width).height(g=W.height),x.add(w).add(z).css({left:0,top:0}),w.width(ke(y-w.outerWidth()+w.innerWidth(),0)).height(ke(g-w.outerHeight()+w.innerHeight(),0)),Se(S[0]).css({left:r,top:c,width:W.x1,height:a}),Se(S[1]).css({left:r+W.x1,top:c,width:y,height:W.y1}),Se(S[2]).css({left:r+W.x2,top:c,width:d-W.x2,height:a}),Se(S[3]).css({left:r+W.x1,top:c+W.y2,width:y,height:a-W.y2}),y-=z.outerWidth(),g-=z.outerHeight(),z.length){case 8:Se(z[4]).css({left:y>>1}),Se(z[5]).css({left:y,top:g>>1}),Se(z[6]).css({left:y>>1,top:g}),Se(z[7]).css({top:g>>1});case 4:z.slice(1,3).css({left:y}),z.slice(2,4).css({top:g})}!1!==e&&(Se.imgAreaSelect.onKeyPress!=ve&&Se(document).off(Se.imgAreaSelect.keyPress,Se.imgAreaSelect.onKeyPress),s.keys)&&Se(document).on(Se.imgAreaSelect.keyPress,function(){Se.imgAreaSelect.onKeyPress=ve}),O&&w.outerWidth()-w.innerWidth()==2&&(w.css("margin",0),setTimeout(function(){w.css("margin","auto")},0))}}function ie(e){M(),oe(e),ne()}function ne(){u=I(W.x1),l=K(W.y1),h=I(W.x2),f=K(W.y2)}function se(e,t){s.fadeSpeed?e.fadeOut(s.fadeSpeed,t):e.hide()}function E(e){var t=P(Z(e))-W.x1,e=N(_(e))-W.y1;G||(M(),G=!0,b.one("mouseout",function(){G=!1})),i="",s.resizable&&(e<=s.resizeMargin?i="n":e>=W.height-s.resizeMargin&&(i="s"),t<=s.resizeMargin?i+="w":t>=W.width-s.resizeMargin&&(i+="e")),b.css("cursor",i?i+"-resize":s.movable?"move":""),L&&L.toggle()}function re(e){Se("body").css("cursor",""),!s.autoHide&&W.width*W.height!=0||se(b.add(S),function(){Se(this).hide()}),Se(document).off("mousemove touchmove",ue),b.on("mousemove touchmove",E),s.onSelectEnd(o,H())}function ce(e){return"mousedown"==e.type&&1!=e.which||(E(e),M(),i?(Se("body").css("cursor",i+"-resize"),u=I(W[/w/.test(i)?"x2":"x1"]),l=K(W[/n/.test(i)?"y2":"y1"]),Se(document).on("mousemove touchmove",ue).one("mouseup touchend",re),b.off("mousemove touchmove",E)):s.movable?(j=r+W.x1-Z(e),D=c+W.y1-_(e),b.off("mousemove touchmove",E),Se(document).on("mousemove touchmove",he).one("mouseup touchend",function(){s.onSelectEnd(o,H()),Se(document).off("mousemove touchmove",he),b.on("mousemove touchmove",E)})):v.mousedown(e)),!1}function de(e){n&&(e?(h=ke(r,Ce(r+d,u+ze(f-l)*n*(u<h||-1))),f=Ae(ke(c,Ce(c+a,l+ze(h-u)/n*(l<f||-1)))),h=Ae(h)):(f=ke(c,Ce(c+a,l+ze(h-u)/n*(l<f||-1))),h=Ae(ke(r,Ce(r+d,u+ze(f-l)*n*(u<h||-1)))),f=Ae(f)))}function ae(){null!=u&&null!=h&&null!=l&&null!=f||ne(),u=Ce(u,r+d),l=Ce(l,c+a),ze(h-u)<Y&&((h=u-Y*(h<u||-1))<r?u=r+Y:r+d<h&&(u=r+d-Y)),ze(f-l)<$&&((f=l-$*(f<l||-1))<c?l=c+$:c+a<f&&(l=c+a-$)),h=ke(r,Ce(h,r+d)),f=ke(c,Ce(f,c+a)),de(ze(h-u)<ze(f-l)*n),ze(h-u)>q&&(h=u-q*(h<u||-1),de()),ze(f-l)>B&&(f=l-B*(f<l||-1),de(!0)),W={x1:P(Ce(u,h)),x2:P(ke(u,h)),y1:N(Ce(l,f)),y2:N(ke(l,f)),width:ze(h-u),height:ze(f-l)},oe(),s.onSelectChange(o,H())}function ue(e){return h=/w|e|^$/.test(i)||n?Z(e):I(W.x2),f=/n|s|^$/.test(i)||n?_(e):K(W.y2),ae(),!1}function le(e,t){h=(u=e)+W.width,f=(l=t)+W.height,Se.extend(W,{x1:P(u),y1:N(l),x2:P(h),y2:N(f)}),oe(),s.onSelectChange(o,H())}function he(e){return u=ke(r,Ce(j+Z(e),r+d-W.width)),l=ke(c,Ce(D+_(e),c+a-W.height)),le(u,l),e.preventDefault(),!1}function fe(){Se(document).off("mousemove touchmove",fe),M(),h=u,f=l,ae(),i="",S.is(":visible")||b.add(S).hide().fadeIn(s.fadeSpeed||0),Q=!0,Se(document).off("mouseup touchend",me).on("mousemove touchmove",ue).one("mouseup touchend",re),b.off("mousemove touchmove",E),s.onSelectStart(o,H())}function me(){Se(document).off("mousemove touchmove",fe).off("mouseup touchend",me),se(b.add(S)),te(P(u),N(l),P(u),N(l)),this instanceof Se.imgAreaSelect||(s.onSelectChange(o,H()),s.onSelectEnd(o,H()))}function pe(e){return 1<e.which||S.is(":animated")||(M(),j=u=Z(e),D=l=_(e),Se(document).on({"mousemove touchmove":fe,"mouseup touchend":me})),!1}function ye(){ie(!1)}function ge(){T=!0,xe(s=Se.extend({classPrefix:"imgareaselect",movable:!0,parent:"body",resizable:!0,resizeMargin:10,onInit:function(){},onSelectStart:function(){},onSelectChange:function(){},onSelectEnd:function(){}},s)),b.add(S).css({visibility:""}),s.show&&(Q=!0,M(),oe(),b.add(S).hide().fadeIn(s.fadeSpeed||0)),setTimeout(function(){s.onInit(o,H())},0)}var ve=function(e){var t,o=s.keys,i=e.keyCode,n=isNaN(o.alt)||!e.altKey&&!e.originalEvent.altKey?!isNaN(o.ctrl)&&e.ctrlKey?o.ctrl:!isNaN(o.shift)&&e.shiftKey?o.shift:isNaN(o.arrows)?10:o.arrows:o.alt;if("resize"==o.arrows||"resize"==o.shift&&e.shiftKey||"resize"==o.ctrl&&e.ctrlKey||"resize"==o.alt&&(e.altKey||e.originalEvent.altKey)){switch(i){case 37:n=-n;case 39:t=ke(u,h),u=Ce(u,h),h=ke(t+n,u),de();break;case 38:n=-n;case 40:t=ke(l,f),l=Ce(l,f),f=ke(t+n,l),de(!0);break;default:return}ae()}else switch(u=Ce(u,h),l=Ce(l,f),i){case 37:le(ke(u-n,r),l);break;case 38:le(u,ke(l-n,c));break;case 39:le(u+Ce(n,d-P(h)),l);break;case 40:le(u,l+Ce(n,a-N(f)));break;default:return}return!1};function be(e,t){for(var o in t)void 0!==s[o]&&e.css(t[o],s[o])}function xe(e){if(e.parent&&(t=Se(e.parent)).append(b.add(S)),Se.extend(s,e),M(),null!=e.handles){for(z.remove(),z=Se([]),m=e.handles?"corners"==e.handles?4:8:0;m--;)z=z.add(We());z.addClass(s.classPrefix+"-handle").css({position:"absolute",fontSize:"0",zIndex:A+1||1}),0<=!parseInt(z.css("width"))&&z.width(10).height(10),(p=s.borderWidth)&&z.css({borderWidth:p,borderStyle:"solid"}),be(z,{borderColor1:"border-color",borderColor2:"background-color",borderOpacity:"opacity"})}for(R=s.imageWidth/d||1,X=s.imageHeight/a||1,null!=e.x1&&(te(e.x1,e.y1,e.x2,e.y2),e.show=!e.hide),e.keys&&(s.keys=Se.extend({shift:1,ctrl:"resize"},e.keys)),S.addClass(s.classPrefix+"-outer"),x.addClass(s.classPrefix+"-selection"),m=0;m++<4;)Se(w[m-1]).addClass(s.classPrefix+"-border"+m);be(x,{selectionColor:"background-color",selectionOpacity:"opacity"}),be(w,{borderOpacity:"opacity",borderWidth:"border-width"}),be(S,{outerColor:"background-color",outerOpacity:"opacity"}),(p=s.borderColor1)&&Se(w[0]).css({borderStyle:"solid",borderColor:p}),(p=s.borderColor2)&&Se(w[1]).css({borderStyle:"dashed",borderColor:p}),b.append(x.add(w).add(L)).append(z),O&&((p=(S.css("filter")||"").match(/opacity=(\d+)/))&&S.css("opacity",p[1]/100),p=(w.css("filter")||"").match(/opacity=(\d+)/))&&w.css("opacity",p[1]/100),e.hide?se(b.add(S)):e.show&&T&&(Q=!0,b.add(S).fadeIn(s.fadeSpeed||0),ie()),n=(F=(s.aspectRatio||"").split(/:/))[0]/F[1],v.add(S).off("mousedown",pe),s.disable||!1===s.enable?(b.off({"mousemove touchmove":E,"mousedown touchstart":ce}),Se(window).off("resize",ye)):(!s.enable&&!1!==s.disable||((s.resizable||s.movable)&&b.on({"mousemove touchmove":E,"mousedown touchstart":ce}),Se(window).on("resize",ye)),s.persistent||v.add(S).on("mousedown touchstart",pe)),s.enable=s.disable=void 0}this.remove=function(){xe({disable:!0}),b.add(S).remove()},this.getOptions=function(){return s},this.setOptions=xe,this.getSelection=H,this.setSelection=te,this.cancelSelection=me,this.update=ie;for(var O=(/msie ([\w.]+)/i.exec(V)||[])[1],we=/opera/i.test(V),V=/webkit/i.test(V)&&!/chrome/i.test(V),e=v;e.length;)A=ke(A,isNaN(e.css("z-index"))?A:e.css("z-index")),"fixed"==e.css("position")&&(J="fixed"),e=e.parent(":not(body)");A=s.zIndex||A,O&&v.attr("unselectable","on"),Se.imgAreaSelect.keyPress=O||V?"keydown":"keypress",we&&(L=We().css({width:"100%",height:"100%",position:"absolute",zIndex:A+2||2})),b.add(S).css({visibility:"hidden",position:J,overflow:"hidden",zIndex:A||"0"}),b.css({zIndex:A+2||2}),x.add(w).css({position:"absolute",fontSize:"0"}),o.complete||"complete"==o.readyState||!v.is("img")?ge():v.one("load",ge),!T&&O&&7<=O&&(o.src=o.src)},Se.fn.imgAreaSelect=function(e){return e=e||{},this.each(function(){Se(this).data("imgAreaSelect")?e.remove?(Se(this).data("imgAreaSelect").remove(),Se(this).removeData("imgAreaSelect")):Se(this).data("imgAreaSelect").setOptions(e):e.remove||(void 0===e.enable&&void 0===e.disable&&(e.enable=!0),Se(this).data("imgAreaSelect",new Se.imgAreaSelect(this,e)))}),e.instance?Se(this).data("imgAreaSelect"):this}}(jQuery);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      jcrop/Jcrop.gif                                                                                     0000644                 00000000503 15212564040 0007422 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       GIF89a  ð    ªªª!ÿNETSCAPE2.0   !ù	
  ,      @„©y·Æ\ñÁx›* !ù	
  ,       ¡˜jç^[Ð¡Èì¥µ  !ù	
  ,       L€`—›êÐbÐ´Xi}¡  !ù	
  ,       Œ`‘z¹ÚbhÂX±{¨  !ù	
  ,       Œ	§kÍTLÑYå, !ù	
  ,       D ˜jç^[Ð¡Èì¥µ  !ù	
  ,       ‚a—›êÐbÐ´Xi}   !ù
  ,       „ƒaz¹ÚbhÂX±{¨  ;                                                                                                                                                                                             jcrop/jquery.Jcrop.min.css                                                                          0000644                 00000004024 15212564040 0011547 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /* jquery.Jcrop.min.css v0.9.15 (build:20180819) */
.jcrop-holder{direction:ltr;text-align:left;-ms-touch-action:none}.jcrop-hline,.jcrop-vline{background:#fff url(Jcrop.gif);font-size:0;position:absolute}.jcrop-vline{height:100%;width:1px!important}.jcrop-vline.right{right:0}.jcrop-hline{height:1px!important;width:100%}.jcrop-hline.bottom{bottom:0}.jcrop-tracker{height:100%;width:100%;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none}.jcrop-handle{background-color:#333;border:1px #eee solid;width:7px;height:7px;font-size:1px}.jcrop-handle.ord-n{left:50%;margin-left:-4px;margin-top:-4px;top:0}.jcrop-handle.ord-s{bottom:0;left:50%;margin-bottom:-4px;margin-left:-4px}.jcrop-handle.ord-e{margin-right:-4px;margin-top:-4px;right:0;top:50%}.jcrop-handle.ord-w{left:0;margin-left:-4px;margin-top:-4px;top:50%}.jcrop-handle.ord-nw{left:0;margin-left:-4px;margin-top:-4px;top:0}.jcrop-handle.ord-ne{margin-right:-4px;margin-top:-4px;right:0;top:0}.jcrop-handle.ord-se{bottom:0;margin-bottom:-4px;margin-right:-4px;right:0}.jcrop-handle.ord-sw{bottom:0;left:0;margin-bottom:-4px;margin-left:-4px}.jcrop-dragbar.ord-n,.jcrop-dragbar.ord-s{height:7px;width:100%}.jcrop-dragbar.ord-e,.jcrop-dragbar.ord-w{height:100%;width:7px}.jcrop-dragbar.ord-n{margin-top:-4px}.jcrop-dragbar.ord-s{bottom:0;margin-bottom:-4px}.jcrop-dragbar.ord-e{margin-right:-4px;right:0}.jcrop-dragbar.ord-w{margin-left:-4px}.jcrop-light .jcrop-hline,.jcrop-light .jcrop-vline{background:#fff;filter:alpha(opacity=70)!important;opacity:.7!important}.jcrop-light .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#000;border-color:#fff;border-radius:3px}.jcrop-dark .jcrop-hline,.jcrop-dark .jcrop-vline{background:#000;filter:alpha(opacity=70)!important;opacity:.7!important}.jcrop-dark .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#fff;border-color:#000;border-radius:3px}.solid-line .jcrop-hline,.solid-line .jcrop-vline{background:#fff}.jcrop-holder img,img.jcrop-preview{max-width:none}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            jcrop/jquery.Jcrop.min.js                                                                           0000644                 00000054071 15212564040 0011402 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * jquery.Jcrop.min.js v0.9.15 (build:20180819)
 * jQuery Image Cropping Plugin - released under MIT License
 * Copyright (c) 2008-2018 Tapmodo Interactive LLC
 * https://github.com/tapmodo/Jcrop
 */
 !function($){$.Jcrop=function(obj,opt){function px(n){return Math.round(n)+"px"}function cssClass(cl){return options.baseClass+"-"+cl}function supportsColorFade(){return $.fx.step.hasOwnProperty("backgroundColor")}function getPos(obj){var pos=$(obj).offset();return[pos.left,pos.top]}function mouseAbs(e){return[e.pageX-docOffset[0],e.pageY-docOffset[1]]}function setOptions(opt){"object"!=typeof opt&&(opt={}),options=$.extend(options,opt),$.each(["onChange","onSelect","onRelease","onDblClick"],function(i,e){"function"!=typeof options[e]&&(options[e]=function(){})})}function startDragMode(mode,pos,touch){if(docOffset=getPos($img),Tracker.setCursor("move"===mode?mode:mode+"-resize"),"move"===mode)return Tracker.activateHandlers(createMover(pos),doneSelect,touch);var fc=Coords.getFixed(),opp=oppLockCorner(mode),opc=Coords.getCorner(oppLockCorner(opp));Coords.setPressed(Coords.getCorner(opp)),Coords.setCurrent(opc),Tracker.activateHandlers(dragmodeHandler(mode,fc),doneSelect,touch)}function dragmodeHandler(mode,f){return function(pos){if(options.aspectRatio)switch(mode){case"e":pos[1]=f.y+1;break;case"w":pos[1]=f.y+1;break;case"n":pos[0]=f.x+1;break;case"s":pos[0]=f.x+1}else switch(mode){case"e":pos[1]=f.y2;break;case"w":pos[1]=f.y2;break;case"n":pos[0]=f.x2;break;case"s":pos[0]=f.x2}Coords.setCurrent(pos),Selection.update()}}function createMover(pos){var lloc=pos;return KeyManager.watchKeys(),function(pos){Coords.moveOffset([pos[0]-lloc[0],pos[1]-lloc[1]]),lloc=pos,Selection.update()}}function oppLockCorner(ord){switch(ord){case"n":return"sw";case"s":return"nw";case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function createDragger(ord){return function(e){return options.disabled?!1:"move"!==ord||options.allowMove?(docOffset=getPos($img),btndown=!0,startDragMode(ord,mouseAbs(e)),e.stopPropagation(),e.preventDefault(),!1):!1}}function presize($obj,w,h){var nw=$obj.width(),nh=$obj.height();nw>w&&w>0&&(nw=w,nh=w/$obj.width()*$obj.height()),nh>h&&h>0&&(nh=h,nw=h/$obj.height()*$obj.width()),xscale=$obj.width()/nw,yscale=$obj.height()/nh,$obj.width(nw).height(nh)}function unscale(c){return{x:c.x*xscale,y:c.y*yscale,x2:c.x2*xscale,y2:c.y2*yscale,w:c.w*xscale,h:c.h*yscale}}function doneSelect(){var c=Coords.getFixed();c.w>options.minSelect[0]&&c.h>options.minSelect[1]?(Selection.enableHandles(),Selection.done()):Selection.release(),Tracker.setCursor(options.allowSelect?"crosshair":"default")}function newSelection(e){if(!options.disabled&&options.allowSelect){btndown=!0,docOffset=getPos($img),Selection.disableHandles(),Tracker.setCursor("crosshair");var pos=mouseAbs(e);return Coords.setPressed(pos),Selection.update(),Tracker.activateHandlers(selectDrag,doneSelect,"touch"===e.type.substring(0,5)),KeyManager.watchKeys(),e.stopPropagation(),e.preventDefault(),!1}}function selectDrag(pos){Coords.setCurrent(pos),Selection.update()}function newTracker(){var trk=$("<div></div>").addClass(cssClass("tracker"));return is_msie&&trk.css({opacity:0,backgroundColor:"white"}),trk}function setClass(cname){$div.removeClass().addClass(cssClass("holder")).addClass(cname)}function animateTo(a,callback){function queueAnimator(){window.setTimeout(animator,interv)}var x1=a[0]/xscale,y1=a[1]/yscale,x2=a[2]/xscale,y2=a[3]/yscale;if(!animating){var animto=Coords.flipCoords(x1,y1,x2,y2),c=Coords.getFixed(),initcr=[c.x,c.y,c.x2,c.y2],animat=initcr,interv=options.animationDelay,ix1=animto[0]-initcr[0],iy1=animto[1]-initcr[1],ix2=animto[2]-initcr[2],iy2=animto[3]-initcr[3],pcent=0,velocity=options.swingSpeed;x1=animat[0],y1=animat[1],x2=animat[2],y2=animat[3],Selection.animMode(!0);var animator=function(){return function(){pcent+=(100-pcent)/velocity,animat[0]=Math.round(x1+pcent/100*ix1),animat[1]=Math.round(y1+pcent/100*iy1),animat[2]=Math.round(x2+pcent/100*ix2),animat[3]=Math.round(y2+pcent/100*iy2),pcent>=99.8&&(pcent=100),100>pcent?(setSelectRaw(animat),queueAnimator()):(Selection.done(),Selection.animMode(!1),"function"==typeof callback&&callback.call(api))}}();queueAnimator()}}function setSelect(rect){setSelectRaw([rect[0]/xscale,rect[1]/yscale,rect[2]/xscale,rect[3]/yscale]),options.onSelect.call(api,unscale(Coords.getFixed())),Selection.enableHandles()}function setSelectRaw(l){Coords.setPressed([l[0],l[1]]),Coords.setCurrent([l[2],l[3]]),Selection.update()}function tellSelect(){return unscale(Coords.getFixed())}function tellScaled(){return Coords.getFixed()}function setOptionsNew(opt){setOptions(opt),interfaceUpdate()}function disableCrop(){options.disabled=!0,Selection.disableHandles(),Selection.setCursor("default"),Tracker.setCursor("default")}function enableCrop(){options.disabled=!1,interfaceUpdate()}function cancelCrop(){Selection.done(),Tracker.activateHandlers(null,null)}function destroy(){$div.remove(),$origimg.show(),$origimg.css("visibility","visible"),$(obj).removeData("Jcrop")}function setImage(src,callback){Selection.release(),disableCrop();var img=new Image;img.onload=function(){var iw=img.width,ih=img.height,bw=options.boxWidth,bh=options.boxHeight;$img.width(iw).height(ih),$img.attr("src",src),$img2.attr("src",src),presize($img,bw,bh),boundx=$img.width(),boundy=$img.height(),$img2.width(boundx).height(boundy),$trk.width(boundx+2*bound).height(boundy+2*bound),$div.width(boundx).height(boundy),Shade.resize(boundx,boundy),enableCrop(),"function"==typeof callback&&callback.call(api)},img.src=src}function colorChangeMacro($obj,color,now){var mycolor=color||options.bgColor;options.bgFade&&supportsColorFade()&&options.fadeTime&&!now?$obj.animate({backgroundColor:mycolor},{queue:!1,duration:options.fadeTime}):$obj.css("backgroundColor",mycolor)}function interfaceUpdate(alt){options.allowResize?alt?Selection.enableOnly():Selection.enableHandles():Selection.disableHandles(),Tracker.setCursor(options.allowSelect?"crosshair":"default"),Selection.setCursor(options.allowMove?"move":"default"),options.hasOwnProperty("trueSize")&&(xscale=options.trueSize[0]/boundx,yscale=options.trueSize[1]/boundy),options.hasOwnProperty("setSelect")&&(setSelect(options.setSelect),Selection.done(),delete options.setSelect),Shade.refresh(),options.bgColor!=bgcolor&&(colorChangeMacro(options.shade?Shade.getShades():$div,options.shade?options.shadeColor||options.bgColor:options.bgColor),bgcolor=options.bgColor),bgopacity!=options.bgOpacity&&(bgopacity=options.bgOpacity,options.shade?Shade.refresh():Selection.setBgOpacity(bgopacity)),xlimit=options.maxSize[0]||0,ylimit=options.maxSize[1]||0,xmin=options.minSize[0]||0,ymin=options.minSize[1]||0,options.hasOwnProperty("outerImage")&&($img.attr("src",options.outerImage),delete options.outerImage),Selection.refresh()}var docOffset,options=$.extend({},$.Jcrop.defaults),_ua=navigator.userAgent.toLowerCase(),is_msie=/msie/.test(_ua),ie6mode=/msie [1-6]\./.test(_ua);"object"!=typeof obj&&(obj=$(obj)[0]),"object"!=typeof opt&&(opt={}),setOptions(opt);var img_css={border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0},$origimg=$(obj),img_mode=!0;if("IMG"==obj.tagName){if(0!=$origimg[0].width&&0!=$origimg[0].height)$origimg.width($origimg[0].width),$origimg.height($origimg[0].height);else{var tempImage=new Image;tempImage.src=$origimg[0].src,$origimg.width(tempImage.width),$origimg.height(tempImage.height)}var $img=$origimg.clone().removeAttr("id").css(img_css).show();$img.width($origimg.width()),$img.height($origimg.height()),$origimg.after($img).hide()}else $img=$origimg.css(img_css).show(),img_mode=!1,null===options.shade&&(options.shade=!0);presize($img,options.boxWidth,options.boxHeight);var boundx=$img.width(),boundy=$img.height(),$div=$("<div />").width(boundx).height(boundy).addClass(cssClass("holder")).css({position:"relative",backgroundColor:options.bgColor}).insertAfter($origimg).append($img);options.addClass&&$div.addClass(options.addClass);var $img2=$("<div />"),$img_holder=$("<div />").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),$hdl_holder=$("<div />").width("100%").height("100%").css("zIndex",320),$sel=$("<div />").css({position:"absolute",zIndex:600}).dblclick(function(){var c=Coords.getFixed();options.onDblClick.call(api,c)}).insertBefore($img).append($img_holder,$hdl_holder);img_mode&&($img2=$("<img />").attr("src",$img.attr("src")).css(img_css).width(boundx).height(boundy),$img_holder.append($img2)),ie6mode&&$sel.css({overflowY:"hidden"});var xlimit,ylimit,xmin,ymin,xscale,yscale,btndown,animating,shift_down,bound=options.boundary,$trk=newTracker().width(boundx+2*bound).height(boundy+2*bound).css({position:"absolute",top:px(-bound),left:px(-bound),zIndex:290}).mousedown(newSelection),bgcolor=options.bgColor,bgopacity=options.bgOpacity;docOffset=getPos($img);var Touch=function(){function hasTouchSupport(){var i,support={},events=["touchstart","touchmove","touchend"],el=document.createElement("div");try{for(i=0;i<events.length;i++){var eventName=events[i];eventName="on"+eventName;var isSupported=eventName in el;isSupported||(el.setAttribute(eventName,"return;"),isSupported="function"==typeof el[eventName]),support[events[i]]=isSupported}return support.touchstart&&support.touchend&&support.touchmove}catch(err){return!1}}function detectSupport(){return options.touchSupport===!0||options.touchSupport===!1?options.touchSupport:hasTouchSupport()}return{createDragger:function(ord){return function(e){return options.disabled?!1:"move"!==ord||options.allowMove?(docOffset=getPos($img),btndown=!0,startDragMode(ord,mouseAbs(Touch.cfilter(e)),!0),e.stopPropagation(),e.preventDefault(),!1):!1}},newSelection:function(e){return newSelection(Touch.cfilter(e))},cfilter:function(e){return e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e},isSupported:hasTouchSupport,support:detectSupport()}}(),Coords=function(){function setPressed(pos){pos=rebound(pos),x2=x1=pos[0],y2=y1=pos[1]}function setCurrent(pos){pos=rebound(pos),ox=pos[0]-x2,oy=pos[1]-y2,x2=pos[0],y2=pos[1]}function getOffset(){return[ox,oy]}function moveOffset(offset){var ox=offset[0],oy=offset[1];0>x1+ox&&(ox-=ox+x1),0>y1+oy&&(oy-=oy+y1),y2+oy>boundy&&(oy+=boundy-(y2+oy)),x2+ox>boundx&&(ox+=boundx-(x2+ox)),x1+=ox,x2+=ox,y1+=oy,y2+=oy}function getCorner(ord){var c=getFixed();switch(ord){case"ne":return[c.x2,c.y];case"nw":return[c.x,c.y];case"se":return[c.x2,c.y2];case"sw":return[c.x,c.y2]}}function getFixed(){if(!options.aspectRatio)return getRect();var xx,yy,w,h,aspect=options.aspectRatio,min_x=options.minSize[0]/xscale,max_x=options.maxSize[0]/xscale,max_y=options.maxSize[1]/yscale,rw=x2-x1,rh=y2-y1,rwa=Math.abs(rw),rha=Math.abs(rh),real_ratio=rwa/rha;return 0===max_x&&(max_x=10*boundx),0===max_y&&(max_y=10*boundy),aspect>real_ratio?(yy=y2,w=rha*aspect,xx=0>rw?x1-w:w+x1,0>xx?(xx=0,h=Math.abs((xx-x1)/aspect),yy=0>rh?y1-h:h+y1):xx>boundx&&(xx=boundx,h=Math.abs((xx-x1)/aspect),yy=0>rh?y1-h:h+y1)):(xx=x2,h=rwa/aspect,yy=0>rh?y1-h:y1+h,0>yy?(yy=0,w=Math.abs((yy-y1)*aspect),xx=0>rw?x1-w:w+x1):yy>boundy&&(yy=boundy,w=Math.abs(yy-y1)*aspect,xx=0>rw?x1-w:w+x1)),xx>x1?(min_x>xx-x1?xx=x1+min_x:xx-x1>max_x&&(xx=x1+max_x),yy=yy>y1?y1+(xx-x1)/aspect:y1-(xx-x1)/aspect):x1>xx&&(min_x>x1-xx?xx=x1-min_x:x1-xx>max_x&&(xx=x1-max_x),yy=yy>y1?y1+(x1-xx)/aspect:y1-(x1-xx)/aspect),0>xx?(x1-=xx,xx=0):xx>boundx&&(x1-=xx-boundx,xx=boundx),0>yy?(y1-=yy,yy=0):yy>boundy&&(y1-=yy-boundy,yy=boundy),makeObj(flipCoords(x1,y1,xx,yy))}function rebound(p){return p[0]<0&&(p[0]=0),p[1]<0&&(p[1]=0),p[0]>boundx&&(p[0]=boundx),p[1]>boundy&&(p[1]=boundy),[Math.round(p[0]),Math.round(p[1])]}function flipCoords(x1,y1,x2,y2){var xa=x1,xb=x2,ya=y1,yb=y2;return x1>x2&&(xa=x2,xb=x1),y1>y2&&(ya=y2,yb=y1),[xa,ya,xb,yb]}function getRect(){var delta,xsize=x2-x1,ysize=y2-y1;return xlimit&&Math.abs(xsize)>xlimit&&(x2=xsize>0?x1+xlimit:x1-xlimit),ylimit&&Math.abs(ysize)>ylimit&&(y2=ysize>0?y1+ylimit:y1-ylimit),ymin/yscale&&Math.abs(ysize)<ymin/yscale&&(y2=ysize>0?y1+ymin/yscale:y1-ymin/yscale),xmin/xscale&&Math.abs(xsize)<xmin/xscale&&(x2=xsize>0?x1+xmin/xscale:x1-xmin/xscale),0>x1&&(x2-=x1,x1-=x1),0>y1&&(y2-=y1,y1-=y1),0>x2&&(x1-=x2,x2-=x2),0>y2&&(y1-=y2,y2-=y2),x2>boundx&&(delta=x2-boundx,x1-=delta,x2-=delta),y2>boundy&&(delta=y2-boundy,y1-=delta,y2-=delta),x1>boundx&&(delta=x1-boundy,y2-=delta,y1-=delta),y1>boundy&&(delta=y1-boundy,y2-=delta,y1-=delta),makeObj(flipCoords(x1,y1,x2,y2))}function makeObj(a){return{x:a[0],y:a[1],x2:a[2],y2:a[3],w:a[2]-a[0],h:a[3]-a[1]}}var ox,oy,x1=0,y1=0,x2=0,y2=0;return{flipCoords:flipCoords,setPressed:setPressed,setCurrent:setCurrent,getOffset:getOffset,moveOffset:moveOffset,getCorner:getCorner,getFixed:getFixed}}(),Shade=function(){function resizeShades(w,h){shades.left.css({height:px(h)}),shades.right.css({height:px(h)})}function updateAuto(){return updateShade(Coords.getFixed())}function updateShade(c){shades.top.css({left:px(c.x),width:px(c.w),height:px(c.y)}),shades.bottom.css({top:px(c.y2),left:px(c.x),width:px(c.w),height:px(boundy-c.y2)}),shades.right.css({left:px(c.x2),width:px(boundx-c.x2)}),shades.left.css({width:px(c.x)})}function createShade(){return $("<div />").css({position:"absolute",backgroundColor:options.shadeColor||options.bgColor}).appendTo(holder)}function enableShade(){enabled||(enabled=!0,holder.insertBefore($img),updateAuto(),Selection.setBgOpacity(1,0,1),$img2.hide(),setBgColor(options.shadeColor||options.bgColor,1),Selection.isAwake()?setOpacity(options.bgOpacity,1):setOpacity(1,1))}function setBgColor(color,now){colorChangeMacro(getShades(),color,now)}function disableShade(){enabled&&(holder.remove(),$img2.show(),enabled=!1,Selection.isAwake()?Selection.setBgOpacity(options.bgOpacity,1,1):(Selection.setBgOpacity(1,1,1),Selection.disableHandles()),colorChangeMacro($div,0,1))}function setOpacity(opacity,now){enabled&&(options.bgFade&&!now?holder.animate({opacity:1-opacity},{queue:!1,duration:options.fadeTime}):holder.css({opacity:1-opacity}))}function refreshAll(){options.shade?enableShade():disableShade(),Selection.isAwake()&&setOpacity(options.bgOpacity)}function getShades(){return holder.children()}var enabled=!1,holder=$("<div />").css({position:"absolute",zIndex:240,opacity:0}),shades={top:createShade(),left:createShade().height(boundy),right:createShade().height(boundy),bottom:createShade()};return{update:updateAuto,updateRaw:updateShade,getShades:getShades,setBgColor:setBgColor,enable:enableShade,disable:disableShade,resize:resizeShades,refresh:refreshAll,opacity:setOpacity}}(),Selection=function(){function insertBorder(type){var jq=$("<div />").css({position:"absolute",opacity:options.borderOpacity}).addClass(cssClass(type));return $img_holder.append(jq),jq}function dragDiv(ord,zi){var jq=$("<div />").mousedown(createDragger(ord)).css({cursor:ord+"-resize",position:"absolute",zIndex:zi}).addClass("ord-"+ord);return Touch.support&&jq.bind("touchstart.jcrop",Touch.createDragger(ord)),$hdl_holder.append(jq),jq}function insertHandle(ord){var hs=options.handleSize,div=dragDiv(ord,hdep++).css({opacity:options.handleOpacity}).addClass(cssClass("handle"));return hs&&div.width(hs).height(hs),div}function insertDragbar(ord){return dragDiv(ord,hdep++).addClass("jcrop-dragbar")}function createDragbars(li){var i;for(i=0;i<li.length;i++)dragbar[li[i]]=insertDragbar(li[i])}function createBorders(li){var cl,i;for(i=0;i<li.length;i++){switch(li[i]){case"n":cl="hline";break;case"s":cl="hline bottom";break;case"e":cl="vline right";break;case"w":cl="vline"}borders[li[i]]=insertBorder(cl)}}function createHandles(li){var i;for(i=0;i<li.length;i++)handle[li[i]]=insertHandle(li[i])}function moveto(x,y){options.shade||$img2.css({top:px(-y),left:px(-x)}),$sel.css({top:px(y),left:px(x)})}function resize(w,h){$sel.width(Math.round(w)).height(Math.round(h))}function refresh(){var c=Coords.getFixed();Coords.setPressed([c.x,c.y]),Coords.setCurrent([c.x2,c.y2]),updateVisible()}function updateVisible(select){return awake?update(select):void 0}function update(select){var c=Coords.getFixed();resize(c.w,c.h),moveto(c.x,c.y),options.shade&&Shade.updateRaw(c),awake||show(),select?options.onSelect.call(api,unscale(c)):options.onChange.call(api,unscale(c))}function setBgOpacity(opacity,force,now){(awake||force)&&(options.bgFade&&!now?$img.animate({opacity:opacity},{queue:!1,duration:options.fadeTime}):$img.css("opacity",opacity))}function show(){$sel.show(),options.shade?Shade.opacity(bgopacity):setBgOpacity(bgopacity,!0),awake=!0}function release(){disableHandles(),$sel.hide(),options.shade?Shade.opacity(1):setBgOpacity(1),awake=!1,options.onRelease.call(api)}function showHandles(){seehandles&&$hdl_holder.show()}function enableHandles(){return seehandles=!0,options.allowResize?($hdl_holder.show(),!0):void 0}function disableHandles(){seehandles=!1,$hdl_holder.hide()}function animMode(v){v?(animating=!0,disableHandles()):(animating=!1,enableHandles())}function done(){animMode(!1),refresh()}var awake,hdep=370,borders={},handle={},dragbar={},seehandles=!1;options.dragEdges&&$.isArray(options.createDragbars)&&createDragbars(options.createDragbars),$.isArray(options.createHandles)&&createHandles(options.createHandles),options.drawBorders&&$.isArray(options.createBorders)&&createBorders(options.createBorders),$(document).bind("touchstart.jcrop-ios",function(e){$(e.currentTarget).hasClass("jcrop-tracker")&&e.stopPropagation()});var $track=newTracker().mousedown(createDragger("move")).css({cursor:"move",position:"absolute",zIndex:360});return Touch.support&&$track.bind("touchstart.jcrop",Touch.createDragger("move")),$img_holder.append($track),disableHandles(),{updateVisible:updateVisible,update:update,release:release,refresh:refresh,isAwake:function(){return awake},setCursor:function(cursor){$track.css("cursor",cursor)},enableHandles:enableHandles,enableOnly:function(){seehandles=!0},showHandles:showHandles,disableHandles:disableHandles,animMode:animMode,setBgOpacity:setBgOpacity,done:done}}(),Tracker=function(){function toFront(touch){$trk.css({zIndex:450}),touch?$(document).bind("touchmove.jcrop",trackTouchMove).bind("touchend.jcrop",trackTouchEnd):trackDoc&&$(document).bind("mousemove.jcrop",trackMove).bind("mouseup.jcrop",trackUp)}function toBack(){$trk.css({zIndex:290}),$(document).unbind(".jcrop")}function trackMove(e){return onMove(mouseAbs(e)),!1}function trackUp(e){return e.preventDefault(),e.stopPropagation(),btndown&&(btndown=!1,onDone(mouseAbs(e)),Selection.isAwake()&&options.onSelect.call(api,unscale(Coords.getFixed())),toBack(),onMove=function(){},onDone=function(){}),!1}function activateHandlers(move,done,touch){return btndown=!0,onMove=move,onDone=done,toFront(touch),!1}function trackTouchMove(e){return onMove(mouseAbs(Touch.cfilter(e))),!1}function trackTouchEnd(e){return trackUp(Touch.cfilter(e))}function setCursor(t){$trk.css("cursor",t)}var onMove=function(){},onDone=function(){},trackDoc=options.trackDocument;return trackDoc||$trk.mousemove(trackMove).mouseup(trackUp).mouseout(trackUp),$img.before($trk),{activateHandlers:activateHandlers,setCursor:setCursor}}(),KeyManager=function(){function watchKeys(){options.keySupport&&($keymgr.show(),$keymgr.focus())}function onBlur(){$keymgr.hide()}function doNudge(e,x,y){options.allowMove&&(Coords.moveOffset([x,y]),Selection.updateVisible(!0)),e.preventDefault(),e.stopPropagation()}function parseKey(e){if(e.ctrlKey||e.metaKey)return!0;shift_down=e.shiftKey?!0:!1;var nudge=shift_down?10:1;switch(e.keyCode){case 37:doNudge(e,-nudge,0);break;case 39:doNudge(e,nudge,0);break;case 38:doNudge(e,0,-nudge);break;case 40:doNudge(e,0,nudge);break;case 27:options.allowSelect&&Selection.release();break;case 9:return!0}return!1}var $keymgr=$('<input type="radio" />').css({position:"fixed",left:"-120px",width:"12px"}).addClass("jcrop-keymgr"),$keywrap=$("<div />").css({position:"absolute",overflow:"hidden"}).append($keymgr);return options.keySupport&&($keymgr.keydown(parseKey).blur(onBlur),ie6mode||!options.fixedSupport?($keymgr.css({position:"absolute",left:"-20px"}),$keywrap.append($keymgr).insertBefore($img)):$keymgr.insertBefore($img)),{watchKeys:watchKeys}}();Touch.support&&$trk.bind("touchstart.jcrop",Touch.newSelection),$hdl_holder.hide(),interfaceUpdate(!0);var api={setImage:setImage,animateTo:animateTo,setSelect:setSelect,setOptions:setOptionsNew,tellSelect:tellSelect,tellScaled:tellScaled,setClass:setClass,disable:disableCrop,enable:enableCrop,cancel:cancelCrop,release:Selection.release,destroy:destroy,focus:KeyManager.watchKeys,getBounds:function(){return[boundx*xscale,boundy*yscale]},getWidgetSize:function(){return[boundx,boundy]},getScaleFactor:function(){return[xscale,yscale]},getOptions:function(){return options},ui:{holder:$div,selection:$sel}};return is_msie&&$div.bind("selectstart",function(){return!1}),$origimg.data("Jcrop",api),api},$.fn.Jcrop=function(options,callback){var api;return this.each(function(){if($(this).data("Jcrop")){if("api"===options)return $(this).data("Jcrop");$(this).data("Jcrop").setOptions(options)}else"IMG"==this.tagName?$.Jcrop.Loader(this,function(){$(this).css({display:"block",visibility:"hidden"}),api=$.Jcrop(this,options),$.isFunction(callback)&&callback.call(api)}):($(this).css({display:"block",visibility:"hidden"}),api=$.Jcrop(this,options),$.isFunction(callback)&&callback.call(api))}),this},$.Jcrop.Loader=function(imgobj,success,error){function completeCheck(){img.complete?($img.unbind(".jcloader"),$.isFunction(success)&&success.call(img)):window.setTimeout(completeCheck,50)}var $img=$(imgobj),img=$img[0];$img.bind("load.jcloader",completeCheck).bind("error.jcloader",function(){$img.unbind(".jcloader"),$.isFunction(error)&&error.call(img)}),img.complete&&$.isFunction(success)&&($img.unbind(".jcloader"),success.call(img))},$.Jcrop.defaults={allowSelect:!0,allowMove:!0,allowResize:!0,trackDocument:!0,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:.6,bgFade:!1,borderOpacity:.4,handleOpacity:.5,handleSize:null,aspectRatio:0,keySupport:!0,createHandles:["n","s","e","w","nw","ne","se","sw"],createDragbars:["n","s","e","w"],createBorders:["n","s","e","w"],drawBorders:!0,dragEdges:!0,fixedSupport:!0,touchSupport:null,shade:null,boxWidth:0,boxHeight:0,boundary:2,fadeTime:400,animationDelay:20,swingSpeed:3,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){},onDblClick:function(){},onRelease:function(){}}}(jQuery);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                       jquery/jquery-migrate.js                                                                            0000644                 00000076352 15212564040 0011402 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery Migrate - v3.4.1 - 2023-02-23T15:31Z
 * Copyright OpenJS Foundation and other contributors
 */
( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [ "jquery" ], function( jQuery ) {
			return factory( jQuery, window );
		} );
	} else if ( typeof module === "object" && module.exports ) {

		// Node/CommonJS
		// eslint-disable-next-line no-undef
		module.exports = factory( require( "jquery" ), window );
	} else {

		// Browser globals
		factory( jQuery, window );
	}
} )( function( jQuery, window ) {
"use strict";

jQuery.migrateVersion = "3.4.1";

// Returns 0 if v1 == v2, -1 if v1 < v2, 1 if v1 > v2
function compareVersions( v1, v2 ) {
	var i,
		rVersionParts = /^(\d+)\.(\d+)\.(\d+)/,
		v1p = rVersionParts.exec( v1 ) || [ ],
		v2p = rVersionParts.exec( v2 ) || [ ];

	for ( i = 1; i <= 3; i++ ) {
		if ( +v1p[ i ] > +v2p[ i ] ) {
			return 1;
		}
		if ( +v1p[ i ] < +v2p[ i ] ) {
			return -1;
		}
	}
	return 0;
}

function jQueryVersionSince( version ) {
	return compareVersions( jQuery.fn.jquery, version ) >= 0;
}

// A map from disabled patch codes to `true`. This should really
// be a `Set` but those are unsupported in IE.
var disabledPatches = Object.create( null );

// Don't apply patches for specified codes. Helpful for code bases
// where some Migrate warnings have been addressed and it's desirable
// to avoid needless patches or false positives.
jQuery.migrateDisablePatches = function() {
	var i;
	for ( i = 0; i < arguments.length; i++ ) {
		disabledPatches[ arguments[ i ] ] = true;
	}
};

// Allow enabling patches disabled via `jQuery.migrateDisablePatches`.
// Helpful if you want to disable a patch only for some code that won't
// be updated soon to be able to focus on other warnings - and enable it
// immediately after such a call:
// ```js
// jQuery.migrateDisablePatches( "workaroundA" );
// elem.pluginViolatingWarningA( "pluginMethod" );
// jQuery.migrateEnablePatches( "workaroundA" );
// ```
jQuery.migrateEnablePatches = function() {
	var i;
	for ( i = 0; i < arguments.length; i++ ) {
		delete disabledPatches[ arguments[ i ] ];
	}
};

jQuery.migrateIsPatchEnabled = function( patchCode ) {
	return !disabledPatches[ patchCode ];
};

( function() {

	// Support: IE9 only
	// IE9 only creates console object when dev tools are first opened
	// IE9 console is a host object, callable but doesn't have .apply()
	if ( !window.console || !window.console.log ) {
		return;
	}

	// Need jQuery 3.x-4.x and no older Migrate loaded
	if ( !jQuery || !jQueryVersionSince( "3.0.0" ) ||
			jQueryVersionSince( "5.0.0" ) ) {
		window.console.log( "JQMIGRATE: jQuery 3.x-4.x REQUIRED" );
	}
	if ( jQuery.migrateWarnings ) {
		window.console.log( "JQMIGRATE: Migrate plugin loaded multiple times" );
	}

	// Show a message on the console so devs know we're active
	window.console.log( "JQMIGRATE: Migrate is installed" +
		( jQuery.migrateMute ? "" : " with logging active" ) +
		", version " + jQuery.migrateVersion );

} )();

var warnedAbout = {};

// By default each warning is only reported once.
jQuery.migrateDeduplicateWarnings = true;

// List of warnings already given; public read only
jQuery.migrateWarnings = [];

// Set to false to disable traces that appear with warnings
if ( jQuery.migrateTrace === undefined ) {
	jQuery.migrateTrace = true;
}

// Forget any warnings we've already given; public
jQuery.migrateReset = function() {
	warnedAbout = {};
	jQuery.migrateWarnings.length = 0;
};

function migrateWarn( code, msg ) {
	var console = window.console;
	if ( jQuery.migrateIsPatchEnabled( code ) &&
		( !jQuery.migrateDeduplicateWarnings || !warnedAbout[ msg ] ) ) {
		warnedAbout[ msg ] = true;
		jQuery.migrateWarnings.push( msg + " [" + code + "]" );
		if ( console && console.warn && !jQuery.migrateMute ) {
			console.warn( "JQMIGRATE: " + msg );
			if ( jQuery.migrateTrace && console.trace ) {
				console.trace();
			}
		}
	}
}

function migrateWarnProp( obj, prop, value, code, msg ) {
	Object.defineProperty( obj, prop, {
		configurable: true,
		enumerable: true,
		get: function() {
			migrateWarn( code, msg );
			return value;
		},
		set: function( newValue ) {
			migrateWarn( code, msg );
			value = newValue;
		}
	} );
}

function migrateWarnFuncInternal( obj, prop, newFunc, code, msg ) {
	var finalFunc,
		origFunc = obj[ prop ];

	obj[ prop ] = function() {

		// If `msg` not provided, do not warn; more sophisticated warnings
		// logic is most likely embedded in `newFunc`, in that case here
		// we just care about the logic choosing the proper implementation
		// based on whether the patch is disabled or not.
		if ( msg ) {
			migrateWarn( code, msg );
		}

		// Since patches can be disabled & enabled dynamically, we
		// need to decide which implementation to run on each invocation.
		finalFunc = jQuery.migrateIsPatchEnabled( code ) ?
			newFunc :

			// The function may not have existed originally so we need a fallback.
			( origFunc || jQuery.noop );

		return finalFunc.apply( this, arguments );
	};
}

function migratePatchAndWarnFunc( obj, prop, newFunc, code, msg ) {
	if ( !msg ) {
		throw new Error( "No warning message provided" );
	}
	return migrateWarnFuncInternal( obj, prop, newFunc, code, msg );
}

function migratePatchFunc( obj, prop, newFunc, code ) {
	return migrateWarnFuncInternal( obj, prop, newFunc, code );
}

if ( window.document.compatMode === "BackCompat" ) {

	// jQuery has never supported or tested Quirks Mode
	migrateWarn( "quirks", "jQuery is not compatible with Quirks Mode" );
}

var findProp,
	class2type = {},
	oldInit = jQuery.fn.init,
	oldFind = jQuery.find,

	rattrHashTest = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,
	rattrHashGlob = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,

	// Require that the "whitespace run" starts from a non-whitespace
	// to avoid O(N^2) behavior when the engine would try matching "\s+$" at each space position.
	rtrim = /^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;

migratePatchFunc( jQuery.fn, "init", function( arg1 ) {
	var args = Array.prototype.slice.call( arguments );

	if ( jQuery.migrateIsPatchEnabled( "selector-empty-id" ) &&
		typeof arg1 === "string" && arg1 === "#" ) {

		// JQuery( "#" ) is a bogus ID selector, but it returned an empty set
		// before jQuery 3.0
		migrateWarn( "selector-empty-id", "jQuery( '#' ) is not a valid selector" );
		args[ 0 ] = [];
	}

	return oldInit.apply( this, args );
}, "selector-empty-id" );

// This is already done in Core but the above patch will lose this assignment
// so we need to redo it. It doesn't matter whether the patch is enabled or not
// as the method is always going to be a Migrate-created wrapper.
jQuery.fn.init.prototype = jQuery.fn;

migratePatchFunc( jQuery, "find", function( selector ) {
	var args = Array.prototype.slice.call( arguments );

	// Support: PhantomJS 1.x
	// String#match fails to match when used with a //g RegExp, only on some strings
	if ( typeof selector === "string" && rattrHashTest.test( selector ) ) {

		// The nonstandard and undocumented unquoted-hash was removed in jQuery 1.12.0
		// First see if qS thinks it's a valid selector, if so avoid a false positive
		try {
			window.document.querySelector( selector );
		} catch ( err1 ) {

			// Didn't *look* valid to qSA, warn and try quoting what we think is the value
			selector = selector.replace( rattrHashGlob, function( _, attr, op, value ) {
				return "[" + attr + op + "\"" + value + "\"]";
			} );

			// If the regexp *may* have created an invalid selector, don't update it
			// Note that there may be false alarms if selector uses jQuery extensions
			try {
				window.document.querySelector( selector );
				migrateWarn( "selector-hash",
					"Attribute selector with '#' must be quoted: " + args[ 0 ] );
				args[ 0 ] = selector;
			} catch ( err2 ) {
				migrateWarn( "selector-hash",
					"Attribute selector with '#' was not fixed: " + args[ 0 ] );
			}
		}
	}

	return oldFind.apply( this, args );
}, "selector-hash" );

// Copy properties attached to original jQuery.find method (e.g. .attr, .isXML)
for ( findProp in oldFind ) {
	if ( Object.prototype.hasOwnProperty.call( oldFind, findProp ) ) {
		jQuery.find[ findProp ] = oldFind[ findProp ];
	}
}

// The number of elements contained in the matched element set
migratePatchAndWarnFunc( jQuery.fn, "size", function() {
	return this.length;
}, "size",
"jQuery.fn.size() is deprecated and removed; use the .length property" );

migratePatchAndWarnFunc( jQuery, "parseJSON", function() {
	return JSON.parse.apply( null, arguments );
}, "parseJSON",
"jQuery.parseJSON is deprecated; use JSON.parse" );

migratePatchAndWarnFunc( jQuery, "holdReady", jQuery.holdReady,
	"holdReady", "jQuery.holdReady is deprecated" );

migratePatchAndWarnFunc( jQuery, "unique", jQuery.uniqueSort,
	"unique", "jQuery.unique is deprecated; use jQuery.uniqueSort" );

// Now jQuery.expr.pseudos is the standard incantation
migrateWarnProp( jQuery.expr, "filters", jQuery.expr.pseudos, "expr-pre-pseudos",
	"jQuery.expr.filters is deprecated; use jQuery.expr.pseudos" );
migrateWarnProp( jQuery.expr, ":", jQuery.expr.pseudos, "expr-pre-pseudos",
	"jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos" );

// Prior to jQuery 3.1.1 there were internal refs so we don't warn there
if ( jQueryVersionSince( "3.1.1" ) ) {
	migratePatchAndWarnFunc( jQuery, "trim", function( text ) {
		return text == null ?
			"" :
			( text + "" ).replace( rtrim, "$1" );
	}, "trim",
	"jQuery.trim is deprecated; use String.prototype.trim" );
}

// Prior to jQuery 3.2 there were internal refs so we don't warn there
if ( jQueryVersionSince( "3.2.0" ) ) {
	migratePatchAndWarnFunc( jQuery, "nodeName", function( elem, name ) {
		return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
	}, "nodeName",
	"jQuery.nodeName is deprecated" );

	migratePatchAndWarnFunc( jQuery, "isArray", Array.isArray, "isArray",
		"jQuery.isArray is deprecated; use Array.isArray"
	);
}

if ( jQueryVersionSince( "3.3.0" ) ) {

	migratePatchAndWarnFunc( jQuery, "isNumeric", function( obj ) {

			// As of jQuery 3.0, isNumeric is limited to
			// strings and numbers (primitives or objects)
			// that can be coerced to finite numbers (gh-2662)
			var type = typeof obj;
			return ( type === "number" || type === "string" ) &&

				// parseFloat NaNs numeric-cast false positives ("")
				// ...but misinterprets leading-number strings, e.g. hex literals ("0x...")
				// subtraction forces infinities to NaN
				!isNaN( obj - parseFloat( obj ) );
		}, "isNumeric",
		"jQuery.isNumeric() is deprecated"
	);

	// Populate the class2type map
	jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".
		split( " " ),
	function( _, name ) {
		class2type[ "[object " + name + "]" ] = name.toLowerCase();
	} );

	migratePatchAndWarnFunc( jQuery, "type", function( obj ) {
		if ( obj == null ) {
			return obj + "";
		}

		// Support: Android <=2.3 only (functionish RegExp)
		return typeof obj === "object" || typeof obj === "function" ?
			class2type[ Object.prototype.toString.call( obj ) ] || "object" :
			typeof obj;
	}, "type",
	"jQuery.type is deprecated" );

	migratePatchAndWarnFunc( jQuery, "isFunction",
		function( obj ) {
			return typeof obj === "function";
		}, "isFunction",
		"jQuery.isFunction() is deprecated" );

	migratePatchAndWarnFunc( jQuery, "isWindow",
		function( obj ) {
			return obj != null && obj === obj.window;
		}, "isWindow",
		"jQuery.isWindow() is deprecated"
	);
}

// Support jQuery slim which excludes the ajax module
if ( jQuery.ajax ) {

var oldAjax = jQuery.ajax,
	rjsonp = /(=)\?(?=&|$)|\?\?/;

migratePatchFunc( jQuery, "ajax", function() {
	var jQXHR = oldAjax.apply( this, arguments );

	// Be sure we got a jQXHR (e.g., not sync)
	if ( jQXHR.promise ) {
		migratePatchAndWarnFunc( jQXHR, "success", jQXHR.done, "jqXHR-methods",
			"jQXHR.success is deprecated and removed" );
		migratePatchAndWarnFunc( jQXHR, "error", jQXHR.fail, "jqXHR-methods",
			"jQXHR.error is deprecated and removed" );
		migratePatchAndWarnFunc( jQXHR, "complete", jQXHR.always, "jqXHR-methods",
			"jQXHR.complete is deprecated and removed" );
	}

	return jQXHR;
}, "jqXHR-methods" );

// Only trigger the logic in jQuery <4 as the JSON-to-JSONP auto-promotion
// behavior is gone in jQuery 4.0 and as it has security implications, we don't
// want to restore the legacy behavior.
if ( !jQueryVersionSince( "4.0.0" ) ) {

	// Register this prefilter before the jQuery one. Otherwise, a promoted
	// request is transformed into one with the script dataType and we can't
	// catch it anymore.
	jQuery.ajaxPrefilter( "+json", function( s ) {

		// Warn if JSON-to-JSONP auto-promotion happens.
		if ( s.jsonp !== false && ( rjsonp.test( s.url ) ||
				typeof s.data === "string" &&
				( s.contentType || "" )
					.indexOf( "application/x-www-form-urlencoded" ) === 0 &&
				rjsonp.test( s.data )
		) ) {
			migrateWarn( "jsonp-promotion", "JSON-to-JSONP auto-promotion is deprecated" );
		}
	} );
}

}

var oldRemoveAttr = jQuery.fn.removeAttr,
	oldToggleClass = jQuery.fn.toggleClass,
	rmatchNonSpace = /\S+/g;

migratePatchFunc( jQuery.fn, "removeAttr", function( name ) {
	var self = this,
		patchNeeded = false;

	jQuery.each( name.match( rmatchNonSpace ), function( _i, attr ) {
		if ( jQuery.expr.match.bool.test( attr ) ) {

			// Only warn if at least a single node had the property set to
			// something else than `false`. Otherwise, this Migrate patch
			// doesn't influence the behavior and there's no need to set or warn.
			self.each( function() {
				if ( jQuery( this ).prop( attr ) !== false ) {
					patchNeeded = true;
					return false;
				}
			} );
		}

		if ( patchNeeded ) {
			migrateWarn( "removeAttr-bool",
				"jQuery.fn.removeAttr no longer sets boolean properties: " + attr );
			self.prop( attr, false );
		}
	} );

	return oldRemoveAttr.apply( this, arguments );
}, "removeAttr-bool" );

migratePatchFunc( jQuery.fn, "toggleClass", function( state ) {

	// Only deprecating no-args or single boolean arg
	if ( state !== undefined && typeof state !== "boolean" ) {

		return oldToggleClass.apply( this, arguments );
	}

	migrateWarn( "toggleClass-bool", "jQuery.fn.toggleClass( boolean ) is deprecated" );

	// Toggle entire class name of each element
	return this.each( function() {
		var className = this.getAttribute && this.getAttribute( "class" ) || "";

		if ( className ) {
			jQuery.data( this, "__className__", className );
		}

		// If the element has a class name or if we're passed `false`,
		// then remove the whole classname (if there was one, the above saved it).
		// Otherwise bring back whatever was previously saved (if anything),
		// falling back to the empty string if nothing was stored.
		if ( this.setAttribute ) {
			this.setAttribute( "class",
				className || state === false ?
				"" :
				jQuery.data( this, "__className__" ) || ""
			);
		}
	} );
}, "toggleClass-bool" );

function camelCase( string ) {
	return string.replace( /-([a-z])/g, function( _, letter ) {
		return letter.toUpperCase();
	} );
}

var origFnCss, internalCssNumber,
	internalSwapCall = false,
	ralphaStart = /^[a-z]/,

	// The regex visualized:
	//
	//                         /----------\
	//                        |            |    /-------\
	//                        |  / Top  \  |   |         |
	//         /--- Border ---+-| Right  |-+---+- Width -+---\
	//        |                 | Bottom |                    |
	//        |                  \ Left /                     |
	//        |                                               |
	//        |                              /----------\     |
	//        |          /-------------\    |            |    |- END
	//        |         |               |   |  / Top  \  |    |
	//        |         |  / Margin  \  |   | | Right  | |    |
	//        |---------+-|           |-+---+-| Bottom |-+----|
	//        |            \ Padding /         \ Left /       |
	// BEGIN -|                                               |
	//        |                /---------\                    |
	//        |               |           |                   |
	//        |               |  / Min \  |    / Width  \     |
	//         \--------------+-|       |-+---|          |---/
	//                           \ Max /       \ Height /
	rautoPx = /^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;

// If this version of jQuery has .swap(), don't false-alarm on internal uses
if ( jQuery.swap ) {
	jQuery.each( [ "height", "width", "reliableMarginRight" ], function( _, name ) {
		var oldHook = jQuery.cssHooks[ name ] && jQuery.cssHooks[ name ].get;

		if ( oldHook ) {
			jQuery.cssHooks[ name ].get = function() {
				var ret;

				internalSwapCall = true;
				ret = oldHook.apply( this, arguments );
				internalSwapCall = false;
				return ret;
			};
		}
	} );
}

migratePatchFunc( jQuery, "swap", function( elem, options, callback, args ) {
	var ret, name,
		old = {};

	if ( !internalSwapCall ) {
		migrateWarn( "swap", "jQuery.swap() is undocumented and deprecated" );
	}

	// Remember the old values, and insert the new ones
	for ( name in options ) {
		old[ name ] = elem.style[ name ];
		elem.style[ name ] = options[ name ];
	}

	ret = callback.apply( elem, args || [] );

	// Revert the old values
	for ( name in options ) {
		elem.style[ name ] = old[ name ];
	}

	return ret;
}, "swap" );

if ( jQueryVersionSince( "3.4.0" ) && typeof Proxy !== "undefined" ) {
	jQuery.cssProps = new Proxy( jQuery.cssProps || {}, {
		set: function() {
			migrateWarn( "cssProps", "jQuery.cssProps is deprecated" );
			return Reflect.set.apply( this, arguments );
		}
	} );
}

// In jQuery >=4 where jQuery.cssNumber is missing fill it with the latest 3.x version:
// https://github.com/jquery/jquery/blob/3.6.0/src/css.js#L212-L233
// This way, number values for the CSS properties below won't start triggering
// Migrate warnings when jQuery gets updated to >=4.0.0 (gh-438).
if ( jQueryVersionSince( "4.0.0" ) ) {

	// We need to keep this as a local variable as we need it internally
	// in a `jQuery.fn.css` patch and this usage shouldn't warn.
	internalCssNumber = {
		animationIterationCount: true,
		columnCount: true,
		fillOpacity: true,
		flexGrow: true,
		flexShrink: true,
		fontWeight: true,
		gridArea: true,
		gridColumn: true,
		gridColumnEnd: true,
		gridColumnStart: true,
		gridRow: true,
		gridRowEnd: true,
		gridRowStart: true,
		lineHeight: true,
		opacity: true,
		order: true,
		orphans: true,
		widows: true,
		zIndex: true,
		zoom: true
	};

	if ( typeof Proxy !== "undefined" ) {
		jQuery.cssNumber = new Proxy( internalCssNumber, {
			get: function() {
				migrateWarn( "css-number", "jQuery.cssNumber is deprecated" );
				return Reflect.get.apply( this, arguments );
			},
			set: function() {
				migrateWarn( "css-number", "jQuery.cssNumber is deprecated" );
				return Reflect.set.apply( this, arguments );
			}
		} );
	} else {

		// Support: IE 9-11+
		// IE doesn't support proxies, but we still want to restore the legacy
		// jQuery.cssNumber there.
		jQuery.cssNumber = internalCssNumber;
	}
} else {

	// Make `internalCssNumber` defined for jQuery <4 as well as it's needed
	// in the `jQuery.fn.css` patch below.
	internalCssNumber = jQuery.cssNumber;
}

function isAutoPx( prop ) {

	// The first test is used to ensure that:
	// 1. The prop starts with a lowercase letter (as we uppercase it for the second regex).
	// 2. The prop is not empty.
	return ralphaStart.test( prop ) &&
		rautoPx.test( prop[ 0 ].toUpperCase() + prop.slice( 1 ) );
}

origFnCss = jQuery.fn.css;

migratePatchFunc( jQuery.fn, "css", function( name, value ) {
	var camelName,
		origThis = this;

	if ( name && typeof name === "object" && !Array.isArray( name ) ) {
		jQuery.each( name, function( n, v ) {
			jQuery.fn.css.call( origThis, n, v );
		} );
		return this;
	}

	if ( typeof value === "number" ) {
		camelName = camelCase( name );

		// Use `internalCssNumber` to avoid triggering our warnings in this
		// internal check.
		if ( !isAutoPx( camelName ) && !internalCssNumber[ camelName ] ) {
			migrateWarn( "css-number",
				"Number-typed values are deprecated for jQuery.fn.css( \"" +
				name + "\", value )" );
		}
	}

	return origFnCss.apply( this, arguments );
}, "css-number" );

var origData = jQuery.data;

migratePatchFunc( jQuery, "data", function( elem, name, value ) {
	var curData, sameKeys, key;

	// Name can be an object, and each entry in the object is meant to be set as data
	if ( name && typeof name === "object" && arguments.length === 2 ) {

		curData = jQuery.hasData( elem ) && origData.call( this, elem );
		sameKeys = {};
		for ( key in name ) {
			if ( key !== camelCase( key ) ) {
				migrateWarn( "data-camelCase",
					"jQuery.data() always sets/gets camelCased names: " + key );
				curData[ key ] = name[ key ];
			} else {
				sameKeys[ key ] = name[ key ];
			}
		}

		origData.call( this, elem, sameKeys );

		return name;
	}

	// If the name is transformed, look for the un-transformed name in the data object
	if ( name && typeof name === "string" && name !== camelCase( name ) ) {

		curData = jQuery.hasData( elem ) && origData.call( this, elem );
		if ( curData && name in curData ) {
			migrateWarn( "data-camelCase",
				"jQuery.data() always sets/gets camelCased names: " + name );
			if ( arguments.length > 2 ) {
				curData[ name ] = value;
			}
			return curData[ name ];
		}
	}

	return origData.apply( this, arguments );
}, "data-camelCase" );

// Support jQuery slim which excludes the effects module
if ( jQuery.fx ) {

var intervalValue, intervalMsg,
	oldTweenRun = jQuery.Tween.prototype.run,
	linearEasing = function( pct ) {
		return pct;
	};

migratePatchFunc( jQuery.Tween.prototype, "run", function( ) {
	if ( jQuery.easing[ this.easing ].length > 1 ) {
		migrateWarn(
			"easing-one-arg",
			"'jQuery.easing." + this.easing.toString() + "' should use only one argument"
		);

		jQuery.easing[ this.easing ] = linearEasing;
	}

	oldTweenRun.apply( this, arguments );
}, "easing-one-arg" );

intervalValue = jQuery.fx.interval;
intervalMsg = "jQuery.fx.interval is deprecated";

// Support: IE9, Android <=4.4
// Avoid false positives on browsers that lack rAF
// Don't warn if document is hidden, jQuery uses setTimeout (#292)
if ( window.requestAnimationFrame ) {
	Object.defineProperty( jQuery.fx, "interval", {
		configurable: true,
		enumerable: true,
		get: function() {
			if ( !window.document.hidden ) {
				migrateWarn( "fx-interval", intervalMsg );
			}

			// Only fallback to the default if patch is enabled
			if ( !jQuery.migrateIsPatchEnabled( "fx-interval" ) ) {
				return intervalValue;
			}
			return intervalValue === undefined ? 13 : intervalValue;
		},
		set: function( newValue ) {
			migrateWarn( "fx-interval", intervalMsg );
			intervalValue = newValue;
		}
	} );
}

}

var oldLoad = jQuery.fn.load,
	oldEventAdd = jQuery.event.add,
	originalFix = jQuery.event.fix;

jQuery.event.props = [];
jQuery.event.fixHooks = {};

migrateWarnProp( jQuery.event.props, "concat", jQuery.event.props.concat,
	"event-old-patch",
	"jQuery.event.props.concat() is deprecated and removed" );

migratePatchFunc( jQuery.event, "fix", function( originalEvent ) {
	var event,
		type = originalEvent.type,
		fixHook = this.fixHooks[ type ],
		props = jQuery.event.props;

	if ( props.length ) {
		migrateWarn( "event-old-patch",
			"jQuery.event.props are deprecated and removed: " + props.join() );
		while ( props.length ) {
			jQuery.event.addProp( props.pop() );
		}
	}

	if ( fixHook && !fixHook._migrated_ ) {
		fixHook._migrated_ = true;
		migrateWarn( "event-old-patch",
			"jQuery.event.fixHooks are deprecated and removed: " + type );
		if ( ( props = fixHook.props ) && props.length ) {
			while ( props.length ) {
				jQuery.event.addProp( props.pop() );
			}
		}
	}

	event = originalFix.call( this, originalEvent );

	return fixHook && fixHook.filter ?
		fixHook.filter( event, originalEvent ) :
		event;
}, "event-old-patch" );

migratePatchFunc( jQuery.event, "add", function( elem, types ) {

	// This misses the multiple-types case but that seems awfully rare
	if ( elem === window && types === "load" && window.document.readyState === "complete" ) {
		migrateWarn( "load-after-event",
			"jQuery(window).on('load'...) called after load event occurred" );
	}
	return oldEventAdd.apply( this, arguments );
}, "load-after-event" );

jQuery.each( [ "load", "unload", "error" ], function( _, name ) {

	migratePatchFunc( jQuery.fn, name, function() {
		var args = Array.prototype.slice.call( arguments, 0 );

		// If this is an ajax load() the first arg should be the string URL;
		// technically this could also be the "Anything" arg of the event .load()
		// which just goes to show why this dumb signature has been deprecated!
		// jQuery custom builds that exclude the Ajax module justifiably die here.
		if ( name === "load" && typeof args[ 0 ] === "string" ) {
			return oldLoad.apply( this, args );
		}

		migrateWarn( "shorthand-removed-v3",
			"jQuery.fn." + name + "() is deprecated" );

		args.splice( 0, 0, name );
		if ( arguments.length ) {
			return this.on.apply( this, args );
		}

		// Use .triggerHandler here because:
		// - load and unload events don't need to bubble, only applied to window or image
		// - error event should not bubble to window, although it does pre-1.7
		// See http://bugs.jquery.com/ticket/11820
		this.triggerHandler.apply( this, args );
		return this;
	}, "shorthand-removed-v3" );

} );

jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
	"change select submit keydown keypress keyup contextmenu" ).split( " " ),
	function( _i, name ) {

	// Handle event binding
	migratePatchAndWarnFunc( jQuery.fn, name, function( data, fn ) {
		return arguments.length > 0 ?
			this.on( name, null, data, fn ) :
			this.trigger( name );
		},
		"shorthand-deprecated-v3",
		"jQuery.fn." + name + "() event shorthand is deprecated" );
} );

// Trigger "ready" event only once, on document ready
jQuery( function() {
	jQuery( window.document ).triggerHandler( "ready" );
} );

jQuery.event.special.ready = {
	setup: function() {
		if ( this === window.document ) {
			migrateWarn( "ready-event", "'ready' event is deprecated" );
		}
	}
};

migratePatchAndWarnFunc( jQuery.fn, "bind", function( types, data, fn ) {
	return this.on( types, null, data, fn );
}, "pre-on-methods", "jQuery.fn.bind() is deprecated" );
migratePatchAndWarnFunc( jQuery.fn, "unbind", function( types, fn ) {
	return this.off( types, null, fn );
}, "pre-on-methods", "jQuery.fn.unbind() is deprecated" );
migratePatchAndWarnFunc( jQuery.fn, "delegate", function( selector, types, data, fn ) {
	return this.on( types, selector, data, fn );
}, "pre-on-methods", "jQuery.fn.delegate() is deprecated" );
migratePatchAndWarnFunc( jQuery.fn, "undelegate", function( selector, types, fn ) {
	return arguments.length === 1 ?
		this.off( selector, "**" ) :
		this.off( types, selector || "**", fn );
}, "pre-on-methods", "jQuery.fn.undelegate() is deprecated" );
migratePatchAndWarnFunc( jQuery.fn, "hover", function( fnOver, fnOut ) {
	return this.on( "mouseenter", fnOver ).on( "mouseleave", fnOut || fnOver );
}, "pre-on-methods", "jQuery.fn.hover() is deprecated" );

var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,
	makeMarkup = function( html ) {
		var doc = window.document.implementation.createHTMLDocument( "" );
		doc.body.innerHTML = html;
		return doc.body && doc.body.innerHTML;
	},
	warnIfChanged = function( html ) {
		var changed = html.replace( rxhtmlTag, "<$1></$2>" );
		if ( changed !== html && makeMarkup( html ) !== makeMarkup( changed ) ) {
			migrateWarn( "self-closed-tags",
				"HTML tags must be properly nested and closed: " + html );
		}
	};

/**
 * Deprecated, please use `jQuery.migrateDisablePatches( "self-closed-tags" )` instead.
 * @deprecated
 */
jQuery.UNSAFE_restoreLegacyHtmlPrefilter = function() {
	jQuery.migrateEnablePatches( "self-closed-tags" );
};

migratePatchFunc( jQuery, "htmlPrefilter", function( html ) {
	warnIfChanged( html );
	return html.replace( rxhtmlTag, "<$1></$2>" );
}, "self-closed-tags" );

// This patch needs to be disabled by default as it re-introduces
// security issues (CVE-2020-11022, CVE-2020-11023).
jQuery.migrateDisablePatches( "self-closed-tags" );

var origOffset = jQuery.fn.offset;

migratePatchFunc( jQuery.fn, "offset", function() {
	var elem = this[ 0 ];

	if ( elem && ( !elem.nodeType || !elem.getBoundingClientRect ) ) {
		migrateWarn( "offset-valid-elem", "jQuery.fn.offset() requires a valid DOM element" );
		return arguments.length ? this : undefined;
	}

	return origOffset.apply( this, arguments );
}, "offset-valid-elem" );

// Support jQuery slim which excludes the ajax module
// The jQuery.param patch is about respecting `jQuery.ajaxSettings.traditional`
// so it doesn't make sense for the slim build.
if ( jQuery.ajax ) {

var origParam = jQuery.param;

migratePatchFunc( jQuery, "param", function( data, traditional ) {
	var ajaxTraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;

	if ( traditional === undefined && ajaxTraditional ) {

		migrateWarn( "param-ajax-traditional",
			"jQuery.param() no longer uses jQuery.ajaxSettings.traditional" );
		traditional = ajaxTraditional;
	}

	return origParam.call( this, data, traditional );
}, "param-ajax-traditional" );

}

migratePatchAndWarnFunc( jQuery.fn, "andSelf", jQuery.fn.addBack, "andSelf",
	"jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()" );

// Support jQuery slim which excludes the deferred module in jQuery 4.0+
if ( jQuery.Deferred ) {

var oldDeferred = jQuery.Deferred,
	tuples = [

		// Action, add listener, callbacks, .then handlers, final state
		[ "resolve", "done", jQuery.Callbacks( "once memory" ),
			jQuery.Callbacks( "once memory" ), "resolved" ],
		[ "reject", "fail", jQuery.Callbacks( "once memory" ),
			jQuery.Callbacks( "once memory" ), "rejected" ],
		[ "notify", "progress", jQuery.Callbacks( "memory" ),
			jQuery.Callbacks( "memory" ) ]
	];

migratePatchFunc( jQuery, "Deferred", function( func ) {
	var deferred = oldDeferred(),
		promise = deferred.promise();

	function newDeferredPipe( /* fnDone, fnFail, fnProgress */ ) {
		var fns = arguments;

		return jQuery.Deferred( function( newDefer ) {
			jQuery.each( tuples, function( i, tuple ) {
				var fn = typeof fns[ i ] === "function" && fns[ i ];

				// Deferred.done(function() { bind to newDefer or newDefer.resolve })
				// deferred.fail(function() { bind to newDefer or newDefer.reject })
				// deferred.progress(function() { bind to newDefer or newDefer.notify })
				deferred[ tuple[ 1 ] ]( function() {
					var returned = fn && fn.apply( this, arguments );
					if ( returned && typeof returned.promise === "function" ) {
						returned.promise()
							.done( newDefer.resolve )
							.fail( newDefer.reject )
							.progress( newDefer.notify );
					} else {
						newDefer[ tuple[ 0 ] + "With" ](
							this === promise ? newDefer.promise() : this,
							fn ? [ returned ] : arguments
						);
					}
				} );
			} );
			fns = null;
		} ).promise();
	}

	migratePatchAndWarnFunc( deferred, "pipe", newDeferredPipe, "deferred-pipe",
		"deferred.pipe() is deprecated" );
	migratePatchAndWarnFunc( promise, "pipe", newDeferredPipe, "deferred-pipe",
		"deferred.pipe() is deprecated" );

	if ( func ) {
		func.call( deferred, deferred );
	}

	return deferred;
}, "deferred-pipe" );

// Preserve handler of uncaught exceptions in promise chains
jQuery.Deferred.exceptionHook = oldDeferred.exceptionHook;

}

return jQuery;
} );
                                                                                                                                                                                                                                                                                      jquery/jquery-migrate.min.js                                                                        0000644                 00000032411 15212564040 0012150 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! jQuery Migrate v3.4.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */
"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window):t(jQuery,window)}(function(s,n){"use strict";function e(e){return 0<=function(e,t){for(var r=/^(\d+)\.(\d+)\.(\d+)/,n=r.exec(e)||[],o=r.exec(t)||[],a=1;a<=3;a++){if(+o[a]<+n[a])return 1;if(+n[a]<+o[a])return-1}return 0}(s.fn.jquery,e)}s.migrateVersion="3.4.1";var t=Object.create(null);s.migrateDisablePatches=function(){for(var e=0;e<arguments.length;e++)t[arguments[e]]=!0},s.migrateEnablePatches=function(){for(var e=0;e<arguments.length;e++)delete t[arguments[e]]},s.migrateIsPatchEnabled=function(e){return!t[e]},n.console&&n.console.log&&(s&&e("3.0.0")&&!e("5.0.0")||n.console.log("JQMIGRATE: jQuery 3.x-4.x REQUIRED"),s.migrateWarnings&&n.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),n.console.log("JQMIGRATE: Migrate is installed"+(s.migrateMute?"":" with logging active")+", version "+s.migrateVersion));var o={};function u(e,t){var r=n.console;!s.migrateIsPatchEnabled(e)||s.migrateDeduplicateWarnings&&o[t]||(o[t]=!0,s.migrateWarnings.push(t+" ["+e+"]"),r&&r.warn&&!s.migrateMute&&(r.warn("JQMIGRATE: "+t),s.migrateTrace&&r.trace&&r.trace()))}function r(e,t,r,n,o){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return u(n,o),r},set:function(e){u(n,o),r=e}})}function a(e,t,r,n,o){var a=e[t];e[t]=function(){return o&&u(n,o),(s.migrateIsPatchEnabled(n)?r:a||s.noop).apply(this,arguments)}}function c(e,t,r,n,o){if(!o)throw new Error("No warning message provided");return a(e,t,r,n,o),0}function i(e,t,r,n){return a(e,t,r,n),0}s.migrateDeduplicateWarnings=!0,s.migrateWarnings=[],void 0===s.migrateTrace&&(s.migrateTrace=!0),s.migrateReset=function(){o={},s.migrateWarnings.length=0},"BackCompat"===n.document.compatMode&&u("quirks","jQuery is not compatible with Quirks Mode");var d,l,p,f={},m=s.fn.init,y=s.find,h=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,g=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,v=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;for(d in i(s.fn,"init",function(e){var t=Array.prototype.slice.call(arguments);return s.migrateIsPatchEnabled("selector-empty-id")&&"string"==typeof e&&"#"===e&&(u("selector-empty-id","jQuery( '#' ) is not a valid selector"),t[0]=[]),m.apply(this,t)},"selector-empty-id"),s.fn.init.prototype=s.fn,i(s,"find",function(t){var r=Array.prototype.slice.call(arguments);if("string"==typeof t&&h.test(t))try{n.document.querySelector(t)}catch(e){t=t.replace(g,function(e,t,r,n){return"["+t+r+'"'+n+'"]'});try{n.document.querySelector(t),u("selector-hash","Attribute selector with '#' must be quoted: "+r[0]),r[0]=t}catch(e){u("selector-hash","Attribute selector with '#' was not fixed: "+r[0])}}return y.apply(this,r)},"selector-hash"),y)Object.prototype.hasOwnProperty.call(y,d)&&(s.find[d]=y[d]);c(s.fn,"size",function(){return this.length},"size","jQuery.fn.size() is deprecated and removed; use the .length property"),c(s,"parseJSON",function(){return JSON.parse.apply(null,arguments)},"parseJSON","jQuery.parseJSON is deprecated; use JSON.parse"),c(s,"holdReady",s.holdReady,"holdReady","jQuery.holdReady is deprecated"),c(s,"unique",s.uniqueSort,"unique","jQuery.unique is deprecated; use jQuery.uniqueSort"),r(s.expr,"filters",s.expr.pseudos,"expr-pre-pseudos","jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),r(s.expr,":",s.expr.pseudos,"expr-pre-pseudos","jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"),e("3.1.1")&&c(s,"trim",function(e){return null==e?"":(e+"").replace(v,"$1")},"trim","jQuery.trim is deprecated; use String.prototype.trim"),e("3.2.0")&&(c(s,"nodeName",function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},"nodeName","jQuery.nodeName is deprecated"),c(s,"isArray",Array.isArray,"isArray","jQuery.isArray is deprecated; use Array.isArray")),e("3.3.0")&&(c(s,"isNumeric",function(e){var t=typeof e;return("number"==t||"string"==t)&&!isNaN(e-parseFloat(e))},"isNumeric","jQuery.isNumeric() is deprecated"),s.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){f["[object "+t+"]"]=t.toLowerCase()}),c(s,"type",function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?f[Object.prototype.toString.call(e)]||"object":typeof e},"type","jQuery.type is deprecated"),c(s,"isFunction",function(e){return"function"==typeof e},"isFunction","jQuery.isFunction() is deprecated"),c(s,"isWindow",function(e){return null!=e&&e===e.window},"isWindow","jQuery.isWindow() is deprecated")),s.ajax&&(l=s.ajax,p=/(=)\?(?=&|$)|\?\?/,i(s,"ajax",function(){var e=l.apply(this,arguments);return e.promise&&(c(e,"success",e.done,"jqXHR-methods","jQXHR.success is deprecated and removed"),c(e,"error",e.fail,"jqXHR-methods","jQXHR.error is deprecated and removed"),c(e,"complete",e.always,"jqXHR-methods","jQXHR.complete is deprecated and removed")),e},"jqXHR-methods"),e("4.0.0")||s.ajaxPrefilter("+json",function(e){!1!==e.jsonp&&(p.test(e.url)||"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&p.test(e.data))&&u("jsonp-promotion","JSON-to-JSONP auto-promotion is deprecated")}));var j=s.fn.removeAttr,b=s.fn.toggleClass,w=/\S+/g;function x(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}i(s.fn,"removeAttr",function(e){var r=this,n=!1;return s.each(e.match(w),function(e,t){s.expr.match.bool.test(t)&&r.each(function(){if(!1!==s(this).prop(t))return!(n=!0)}),n&&(u("removeAttr-bool","jQuery.fn.removeAttr no longer sets boolean properties: "+t),r.prop(t,!1))}),j.apply(this,arguments)},"removeAttr-bool"),i(s.fn,"toggleClass",function(t){return void 0!==t&&"boolean"!=typeof t?b.apply(this,arguments):(u("toggleClass-bool","jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var e=this.getAttribute&&this.getAttribute("class")||"";e&&s.data(this,"__className__",e),this.setAttribute&&this.setAttribute("class",!e&&!1!==t&&s.data(this,"__className__")||"")}))},"toggleClass-bool");var Q,A,R=!1,C=/^[a-z]/,N=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;s.swap&&s.each(["height","width","reliableMarginRight"],function(e,t){var r=s.cssHooks[t]&&s.cssHooks[t].get;r&&(s.cssHooks[t].get=function(){var e;return R=!0,e=r.apply(this,arguments),R=!1,e})}),i(s,"swap",function(e,t,r,n){var o,a,i={};for(a in R||u("swap","jQuery.swap() is undocumented and deprecated"),t)i[a]=e.style[a],e.style[a]=t[a];for(a in o=r.apply(e,n||[]),t)e.style[a]=i[a];return o},"swap"),e("3.4.0")&&"undefined"!=typeof Proxy&&(s.cssProps=new Proxy(s.cssProps||{},{set:function(){return u("cssProps","jQuery.cssProps is deprecated"),Reflect.set.apply(this,arguments)}})),e("4.0.0")?(A={animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},"undefined"!=typeof Proxy?s.cssNumber=new Proxy(A,{get:function(){return u("css-number","jQuery.cssNumber is deprecated"),Reflect.get.apply(this,arguments)},set:function(){return u("css-number","jQuery.cssNumber is deprecated"),Reflect.set.apply(this,arguments)}}):s.cssNumber=A):A=s.cssNumber,Q=s.fn.css,i(s.fn,"css",function(e,t){var r,n,o=this;return e&&"object"==typeof e&&!Array.isArray(e)?(s.each(e,function(e,t){s.fn.css.call(o,e,t)}),this):("number"==typeof t&&(r=x(e),n=r,C.test(n)&&N.test(n[0].toUpperCase()+n.slice(1))||A[r]||u("css-number",'Number-typed values are deprecated for jQuery.fn.css( "'+e+'", value )')),Q.apply(this,arguments))},"css-number");var S,P,k,H,E=s.data;i(s,"data",function(e,t,r){var n,o,a;if(t&&"object"==typeof t&&2===arguments.length){for(a in n=s.hasData(e)&&E.call(this,e),o={},t)a!==x(a)?(u("data-camelCase","jQuery.data() always sets/gets camelCased names: "+a),n[a]=t[a]):o[a]=t[a];return E.call(this,e,o),t}return t&&"string"==typeof t&&t!==x(t)&&(n=s.hasData(e)&&E.call(this,e))&&t in n?(u("data-camelCase","jQuery.data() always sets/gets camelCased names: "+t),2<arguments.length&&(n[t]=r),n[t]):E.apply(this,arguments)},"data-camelCase"),s.fx&&(k=s.Tween.prototype.run,H=function(e){return e},i(s.Tween.prototype,"run",function(){1<s.easing[this.easing].length&&(u("easing-one-arg","'jQuery.easing."+this.easing.toString()+"' should use only one argument"),s.easing[this.easing]=H),k.apply(this,arguments)},"easing-one-arg"),S=s.fx.interval,P="jQuery.fx.interval is deprecated",n.requestAnimationFrame&&Object.defineProperty(s.fx,"interval",{configurable:!0,enumerable:!0,get:function(){return n.document.hidden||u("fx-interval",P),s.migrateIsPatchEnabled("fx-interval")&&void 0===S?13:S},set:function(e){u("fx-interval",P),S=e}}));var M=s.fn.load,q=s.event.add,O=s.event.fix;s.event.props=[],s.event.fixHooks={},r(s.event.props,"concat",s.event.props.concat,"event-old-patch","jQuery.event.props.concat() is deprecated and removed"),i(s.event,"fix",function(e){var t,r=e.type,n=this.fixHooks[r],o=s.event.props;if(o.length){u("event-old-patch","jQuery.event.props are deprecated and removed: "+o.join());while(o.length)s.event.addProp(o.pop())}if(n&&!n._migrated_&&(n._migrated_=!0,u("event-old-patch","jQuery.event.fixHooks are deprecated and removed: "+r),(o=n.props)&&o.length))while(o.length)s.event.addProp(o.pop());return t=O.call(this,e),n&&n.filter?n.filter(t,e):t},"event-old-patch"),i(s.event,"add",function(e,t){return e===n&&"load"===t&&"complete"===n.document.readyState&&u("load-after-event","jQuery(window).on('load'...) called after load event occurred"),q.apply(this,arguments)},"load-after-event"),s.each(["load","unload","error"],function(e,t){i(s.fn,t,function(){var e=Array.prototype.slice.call(arguments,0);return"load"===t&&"string"==typeof e[0]?M.apply(this,e):(u("shorthand-removed-v3","jQuery.fn."+t+"() is deprecated"),e.splice(0,0,t),arguments.length?this.on.apply(this,e):(this.triggerHandler.apply(this,e),this))},"shorthand-removed-v3")}),s.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,r){c(s.fn,r,function(e,t){return 0<arguments.length?this.on(r,null,e,t):this.trigger(r)},"shorthand-deprecated-v3","jQuery.fn."+r+"() event shorthand is deprecated")}),s(function(){s(n.document).triggerHandler("ready")}),s.event.special.ready={setup:function(){this===n.document&&u("ready-event","'ready' event is deprecated")}},c(s.fn,"bind",function(e,t,r){return this.on(e,null,t,r)},"pre-on-methods","jQuery.fn.bind() is deprecated"),c(s.fn,"unbind",function(e,t){return this.off(e,null,t)},"pre-on-methods","jQuery.fn.unbind() is deprecated"),c(s.fn,"delegate",function(e,t,r,n){return this.on(t,e,r,n)},"pre-on-methods","jQuery.fn.delegate() is deprecated"),c(s.fn,"undelegate",function(e,t,r){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",r)},"pre-on-methods","jQuery.fn.undelegate() is deprecated"),c(s.fn,"hover",function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)},"pre-on-methods","jQuery.fn.hover() is deprecated");function T(e){var t=n.document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body&&t.body.innerHTML}var F=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.migrateEnablePatches("self-closed-tags")},i(s,"htmlPrefilter",function(e){var t,r;return(r=(t=e).replace(F,"<$1></$2>"))!==t&&T(t)!==T(r)&&u("self-closed-tags","HTML tags must be properly nested and closed: "+t),e.replace(F,"<$1></$2>")},"self-closed-tags"),s.migrateDisablePatches("self-closed-tags");var D,W,_,I=s.fn.offset;return i(s.fn,"offset",function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?I.apply(this,arguments):(u("offset-valid-elem","jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},"offset-valid-elem"),s.ajax&&(D=s.param,i(s,"param",function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("param-ajax-traditional","jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),D.call(this,e,t)},"param-ajax-traditional")),c(s.fn,"andSelf",s.fn.addBack,"andSelf","jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),s.Deferred&&(W=s.Deferred,_=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],i(s,"Deferred",function(e){var a=W(),i=a.promise();function t(){var o=arguments;return s.Deferred(function(n){s.each(_,function(e,t){var r="function"==typeof o[e]&&o[e];a[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===i?n.promise():this,r?[e]:arguments)})}),o=null}).promise()}return c(a,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),c(i,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),e&&e.call(a,a),a},"deferred-pipe"),s.Deferred.exceptionHook=W.exceptionHook),s});
                                                                                                                                                                                                                                                       jquery/jquery.color.min.js                                                                          0000644                 00000014765 15212564040 0011653 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! jQuery Color v3.0.0 https://github.com/jquery/jquery-color | jquery.org/license */
!function(r,t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t(require("jquery")):t(r.jQuery)}(this,function(s,l){"use strict";var u,n={},t=n.toString,c=/^([\-+])=\s*(\d+\.?\d*)/,r=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(r){return[r[1],r[2],r[3],r[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(r){return[2.55*r[1],2.55*r[2],2.55*r[3],r[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,parse:function(r){return[parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16),r[4]?(parseInt(r[4],16)/255).toFixed(2):1]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,parse:function(r){return[parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16),r[4]?(parseInt(r[4]+r[4],16)/255).toFixed(2):1]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(r){return[r[1],r[2]/100,r[3]/100,r[4]]}}],f=s.Color=function(r,t,n,e){return new s.Color.fn.parse(r,t,n,e)},p={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},d={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},h=s.each;function b(r){return null==r?r+"":"object"==typeof r?n[t.call(r)]||"object":typeof r}function g(r,t,n){var e=d[t.type]||{};return null==r?n||!t.def?null:t.def:(r=e.floor?~~r:parseFloat(r),e.mod?(r+e.mod)%e.mod:Math.min(e.max,Math.max(0,r)))}function m(e){var o=f(),a=o._rgba=[];return e=e.toLowerCase(),h(r,function(r,t){var n=t.re.exec(e),n=n&&t.parse(n),t=t.space||"rgba";if(n)return n=o[t](n),o[p[t].cache]=n[p[t].cache],a=o._rgba=n._rgba,!1}),a.length?("0,0,0,0"===a.join()&&s.extend(a,u.transparent),o):u[e]}function o(r,t,n){return 6*(n=(n+1)%1)<1?r+(t-r)*n*6:2*n<1?t:3*n<2?r+(t-r)*(2/3-n)*6:r}h(p,function(r,t){t.cache="_"+r,t.props.alpha={idx:3,type:"percent",def:1}}),s.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(r,t){n["[object "+t+"]"]=t.toLowerCase()}),(f.fn=s.extend(f.prototype,{parse:function(o,r,t,n){if(o===l)return this._rgba=[null,null,null,null],this;(o.jquery||o.nodeType)&&(o=s(o).css(r),r=l);var a=this,e=b(o),i=this._rgba=[];return r!==l&&(o=[o,r,t,n],e="array"),"string"===e?this.parse(m(o)||u._default):"array"===e?(h(p.rgba.props,function(r,t){i[t.idx]=g(o[t.idx],t)}),this):"object"===e?(o instanceof f?h(p,function(r,t){o[t.cache]&&(a[t.cache]=o[t.cache].slice())}):h(p,function(r,n){var e=n.cache;h(n.props,function(r,t){if(!a[e]&&n.to){if("alpha"===r||null==o[r])return;a[e]=n.to(a._rgba)}a[e][t.idx]=g(o[r],t,!0)}),a[e]&&s.inArray(null,a[e].slice(0,3))<0&&(null==a[e][3]&&(a[e][3]=1),n.from)&&(a._rgba=n.from(a[e]))}),this):void 0},is:function(r){var o=f(r),a=!0,i=this;return h(p,function(r,t){var n,e=o[t.cache];return e&&(n=i[t.cache]||t.to&&t.to(i._rgba)||[],h(t.props,function(r,t){if(null!=e[t.idx])return a=e[t.idx]===n[t.idx]})),a}),a},_space:function(){var n=[],e=this;return h(p,function(r,t){e[t.cache]&&n.push(r)}),n.pop()},transition:function(r,i){var r=(l=f(r))._space(),t=p[r],n=0===this.alpha()?f("transparent"):this,s=n[t.cache]||t.to(n._rgba),u=s.slice(),l=l[t.cache];return h(t.props,function(r,t){var n=t.idx,e=s[n],o=l[n],a=d[t.type]||{};null!==o&&(null===e?u[n]=o:(a.mod&&(o-e>a.mod/2?e+=a.mod:e-o>a.mod/2&&(e-=a.mod)),u[n]=g((o-e)*i+e,t)))}),this[r](u)},blend:function(r){var t,n,e;return 1===this._rgba[3]?this:(t=this._rgba.slice(),n=t.pop(),e=f(r)._rgba,f(s.map(t,function(r,t){return(1-n)*e[t]+n*r})))},toRgbaString:function(){var r="rgba(",t=s.map(this._rgba,function(r,t){return null!=r?r:2<t?1:0});return 1===t[3]&&(t.pop(),r="rgb("),r+t.join(", ")+")"},toHslaString:function(){var r="hsla(",t=s.map(this.hsla(),function(r,t){return null==r&&(r=2<t?1:0),r=t&&t<3?Math.round(100*r)+"%":r});return 1===t[3]&&(t.pop(),r="hsl("),r+t.join(", ")+")"},toHexString:function(r){var t=this._rgba.slice(),n=t.pop();return r&&t.push(~~(255*n)),"#"+s.map(t,function(r){return("0"+(r||0).toString(16)).substr(-2)}).join("")},toString:function(){return this.toRgbaString()}})).parse.prototype=f.fn,p.hsla.to=function(r){var t,n,e,o,a,i,s,u;return null==r[0]||null==r[1]||null==r[2]?[null,null,null,r[3]]:(t=r[0]/255,n=r[1]/255,e=r[2]/255,r=r[3],o=(u=Math.max(t,n,e))-(s=Math.min(t,n,e)),i=.5*(a=u+s),s=s===u?0:t===u?60*(n-e)/o+360:n===u?60*(e-t)/o+120:60*(t-n)/o+240,u=0==o?0:i<=.5?o/a:o/(2-a),[Math.round(s)%360,u,i,null==r?1:r])},p.hsla.from=function(r){var t,n,e;return null==r[0]||null==r[1]||null==r[2]?[null,null,null,r[3]]:(t=r[0]/360,e=r[1],n=r[2],r=r[3],e=2*n-(n=n<=.5?n*(1+e):n+e-n*e),[Math.round(255*o(e,n,t+1/3)),Math.round(255*o(e,n,t)),Math.round(255*o(e,n,t-1/3)),r])},h(p,function(s,r){var t=r.props,a=r.cache,i=r.to,u=r.from;f.fn[s]=function(r){var n,e,o;return i&&!this[a]&&(this[a]=i(this._rgba)),r===l?this[a].slice():(n=b(r),e="array"===n||"object"===n?r:arguments,o=this[a].slice(),h(t,function(r,t){r=e["object"===n?r:t.idx];null==r&&(r=o[t.idx]),o[t.idx]=g(r,t)}),u?((r=f(u(o)))[a]=o,r):f(o))},h(t,function(a,i){f.fn[a]||(f.fn[a]=function(r){var t=b(r),n="alpha"===a?this._hsla?"hsla":"rgba":s,e=this[n](),o=e[i.idx];return"undefined"===t?o:("function"===t&&(t=b(r=r.call(this,o))),null==r&&i.empty?this:("string"===t&&(t=c.exec(r))&&(r=o+parseFloat(t[2])*("+"===t[1]?1:-1)),e[i.idx]=r,this[n](e)))})})}),(f.hook=function(r){r=r.split(" ");h(r,function(r,e){s.cssHooks[e]={set:function(r,t){var n;"transparent"===t||"string"===b(t)&&!(n=m(t))||(t=(t=f(n||t)).toRgbaString()),r.style[e]=t}},s.fx.step[e]=function(r){r.colorInit||(r.start=f(r.elem,e),r.end=f(r.end),r.colorInit=!0),s.cssHooks[e].set(r.elem,r.start.transition(r.end,r.pos))}})})("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),s.cssHooks.borderColor={expand:function(n){var e={};return h(["Top","Right","Bottom","Left"],function(r,t){e["border"+t+"Color"]=n}),e}},u=s.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}});           jquery/jquery.form.js                                                                               0000644                 00000121667 15212564040 0010716 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery Form Plugin
 * version: 4.3.0
 * Requires jQuery v1.7.2 or later
 * Project repository: https://github.com/jquery-form/form

 * Copyright 2017 Kevin Morris
 * Copyright 2006 M. Alsup

 * Dual licensed under the LGPL-2.1+ or MIT licenses
 * https://github.com/jquery-form/form#license

 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 */
/* global ActiveXObject */

/* eslint-disable */
(function (factory) {
	if (typeof define === 'function' && define.amd) {
		// AMD. Register as an anonymous module.
		define(['jquery'], factory);
	} else if (typeof module === 'object' && module.exports) {
		// Node/CommonJS
		module.exports = function( root, jQuery ) {
			if (typeof jQuery === 'undefined') {
				// require('jQuery') returns a factory that requires window to build a jQuery instance, we normalize how we use modules
				// that require this pattern but the window provided is a noop if it's defined (how jquery works)
				if (typeof window !== 'undefined') {
					jQuery = require('jquery');
				}
				else {
					jQuery = require('jquery')(root);
				}
			}
			factory(jQuery);
			return jQuery;
		};
	} else {
		// Browser globals
		factory(jQuery);
	}

}(function ($) {
/* eslint-enable */
	'use strict';

	/*
		Usage Note:
		-----------
		Do not use both ajaxSubmit and ajaxForm on the same form. These
		functions are mutually exclusive. Use ajaxSubmit if you want
		to bind your own submit handler to the form. For example,

		$(document).ready(function() {
			$('#myForm').on('submit', function(e) {
				e.preventDefault(); // <-- important
				$(this).ajaxSubmit({
					target: '#output'
				});
			});
		});

		Use ajaxForm when you want the plugin to manage all the event binding
		for you. For example,

		$(document).ready(function() {
			$('#myForm').ajaxForm({
				target: '#output'
			});
		});

		You can also use ajaxForm with delegation (requires jQuery v1.7+), so the
		form does not have to exist when you invoke ajaxForm:

		$('#myForm').ajaxForm({
			delegation: true,
			target: '#output'
		});

		When using ajaxForm, the ajaxSubmit function will be invoked for you
		at the appropriate time.
	*/

	var rCRLF = /\r?\n/g;

	/**
	 * Feature detection
	 */
	var feature = {};

	feature.fileapi = $('<input type="file">').get(0).files !== undefined;
	feature.formdata = (typeof window.FormData !== 'undefined');

	var hasProp = !!$.fn.prop;

	// attr2 uses prop when it can but checks the return type for
	// an expected string. This accounts for the case where a form
	// contains inputs with names like "action" or "method"; in those
	// cases "prop" returns the element
	$.fn.attr2 = function() {
		if (!hasProp) {
			return this.attr.apply(this, arguments);
		}

		var val = this.prop.apply(this, arguments);

		if ((val && val.jquery) || typeof val === 'string') {
			return val;
		}

		return this.attr.apply(this, arguments);
	};

	/**
	 * ajaxSubmit() provides a mechanism for immediately submitting
	 * an HTML form using AJAX.
	 *
	 * @param	{object|string}	options		jquery.form.js parameters or custom url for submission
	 * @param	{object}		data		extraData
	 * @param	{string}		dataType	ajax dataType
	 * @param	{function}		onSuccess	ajax success callback function
	 */
	$.fn.ajaxSubmit = function(options, data, dataType, onSuccess) {
		// fast fail if nothing selected (http://dev.jquery.com/ticket/2752)
		if (!this.length) {
			log('ajaxSubmit: skipping submit process - no element selected');

			return this;
		}

		/* eslint consistent-this: ["error", "$form"] */
		var method, action, url, isMsie, iframeSrc, $form = this;

		if (typeof options === 'function') {
			options = {success: options};

		} else if (typeof options === 'string' || (options === false && arguments.length > 0)) {
			options = {
				'url'      : options,
				'data'     : data,
				'dataType' : dataType
			};

			if (typeof onSuccess === 'function') {
				options.success = onSuccess;
			}

		} else if (typeof options === 'undefined') {
			options = {};
		}

		method = options.method || options.type || this.attr2('method');
		action = options.url || this.attr2('action');

		url = (typeof action === 'string') ? $.trim(action) : '';
		url = url || window.location.href || '';
		if (url) {
			// clean url (don't include hash vaue)
			url = (url.match(/^([^#]+)/) || [])[1];
		}
		// IE requires javascript:false in https, but this breaks chrome >83 and goes against spec.
		// Instead of using javascript:false always, let's only apply it for IE.
		isMsie = /(MSIE|Trident)/.test(navigator.userAgent || '');
		iframeSrc = (isMsie && /^https/i.test(window.location.href || '')) ? 'javascript:false' : 'about:blank'; // eslint-disable-line no-script-url

		options = $.extend(true, {
			url       : url,
			success   : $.ajaxSettings.success,
			type      : method || $.ajaxSettings.type,
			iframeSrc : iframeSrc
		}, options);

		// hook for manipulating the form data before it is extracted;
		// convenient for use with rich editors like tinyMCE or FCKEditor
		var veto = {};

		this.trigger('form-pre-serialize', [this, options, veto]);

		if (veto.veto) {
			log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');

			return this;
		}

		// provide opportunity to alter form data before it is serialized
		if (options.beforeSerialize && options.beforeSerialize(this, options) === false) {
			log('ajaxSubmit: submit aborted via beforeSerialize callback');

			return this;
		}

		var traditional = options.traditional;

		if (typeof traditional === 'undefined') {
			traditional = $.ajaxSettings.traditional;
		}

		var elements = [];
		var qx, a = this.formToArray(options.semantic, elements, options.filtering);

		if (options.data) {
			var optionsData = $.isFunction(options.data) ? options.data(a) : options.data;

			options.extraData = optionsData;
			qx = $.param(optionsData, traditional);
		}

		// give pre-submit callback an opportunity to abort the submit
		if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) {
			log('ajaxSubmit: submit aborted via beforeSubmit callback');

			return this;
		}

		// fire vetoable 'validate' event
		this.trigger('form-submit-validate', [a, this, options, veto]);
		if (veto.veto) {
			log('ajaxSubmit: submit vetoed via form-submit-validate trigger');

			return this;
		}

		var q = $.param(a, traditional);

		if (qx) {
			q = (q ? (q + '&' + qx) : qx);
		}

		if (options.type.toUpperCase() === 'GET') {
			options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
			options.data = null;	// data is null for 'get'
		} else {
			options.data = q;		// data is the query string for 'post'
		}

		var callbacks = [];

		if (options.resetForm) {
			callbacks.push(function() {
				$form.resetForm();
			});
		}

		if (options.clearForm) {
			callbacks.push(function() {
				$form.clearForm(options.includeHidden);
			});
		}

		// perform a load on the target only if dataType is not provided
		if (!options.dataType && options.target) {
			var oldSuccess = options.success || function(){};

			callbacks.push(function(data, textStatus, jqXHR) {
				var successArguments = arguments,
					fn = options.replaceTarget ? 'replaceWith' : 'html';

				$(options.target)[fn](data).each(function(){
					oldSuccess.apply(this, successArguments);
				});
			});

		} else if (options.success) {
			if ($.isArray(options.success)) {
				$.merge(callbacks, options.success);
			} else {
				callbacks.push(options.success);
			}
		}

		options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg
			var context = options.context || this;		// jQuery 1.4+ supports scope context

			for (var i = 0, max = callbacks.length; i < max; i++) {
				callbacks[i].apply(context, [data, status, xhr || $form, $form]);
			}
		};

		if (options.error) {
			var oldError = options.error;

			options.error = function(xhr, status, error) {
				var context = options.context || this;

				oldError.apply(context, [xhr, status, error, $form]);
			};
		}

		if (options.complete) {
			var oldComplete = options.complete;

			options.complete = function(xhr, status) {
				var context = options.context || this;

				oldComplete.apply(context, [xhr, status, $form]);
			};
		}

		// are there files to upload?

		// [value] (issue #113), also see comment:
		// https://github.com/malsup/form/commit/588306aedba1de01388032d5f42a60159eea9228#commitcomment-2180219
		var fileInputs = $('input[type=file]:enabled', this).filter(function() {
			return $(this).val() !== '';
		});
		var hasFileInputs = fileInputs.length > 0;
		var mp = 'multipart/form-data';
		var multipart = ($form.attr('enctype') === mp || $form.attr('encoding') === mp);
		var fileAPI = feature.fileapi && feature.formdata;

		log('fileAPI :' + fileAPI);

		var shouldUseFrame = (hasFileInputs || multipart) && !fileAPI;
		var jqxhr;

		// options.iframe allows user to force iframe mode
		// 06-NOV-09: now defaulting to iframe mode if file input is detected
		if (options.iframe !== false && (options.iframe || shouldUseFrame)) {
			// hack to fix Safari hang (thanks to Tim Molendijk for this)
			// see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d
			if (options.closeKeepAlive) {
				$.get(options.closeKeepAlive, function() {
					jqxhr = fileUploadIframe(a);
				});

			} else {
				jqxhr = fileUploadIframe(a);
			}

		} else if ((hasFileInputs || multipart) && fileAPI) {
			jqxhr = fileUploadXhr(a);

		} else {
			jqxhr = $.ajax(options);
		}

		$form.removeData('jqxhr').data('jqxhr', jqxhr);

		// clear element array
		for (var k = 0; k < elements.length; k++) {
			elements[k] = null;
		}

		// fire 'notify' event
		this.trigger('form-submit-notify', [this, options]);

		return this;

		// utility fn for deep serialization
		function deepSerialize(extraData) {
			var serialized = $.param(extraData, options.traditional).split('&');
			var len = serialized.length;
			var result = [];
			var i, part;

			for (i = 0; i < len; i++) {
				// #252; undo param space replacement
				serialized[i] = serialized[i].replace(/\+/g, ' ');
				part = serialized[i].split('=');
				// #278; use array instead of object storage, favoring array serializations
				result.push([decodeURIComponent(part[0]), decodeURIComponent(part[1])]);
			}

			return result;
		}

		// XMLHttpRequest Level 2 file uploads (big hat tip to francois2metz)
		function fileUploadXhr(a) {
			var formdata = new FormData();

			for (var i = 0; i < a.length; i++) {
				formdata.append(a[i].name, a[i].value);
			}

			if (options.extraData) {
				var serializedData = deepSerialize(options.extraData);

				for (i = 0; i < serializedData.length; i++) {
					if (serializedData[i]) {
						formdata.append(serializedData[i][0], serializedData[i][1]);
					}
				}
			}

			options.data = null;

			var s = $.extend(true, {}, $.ajaxSettings, options, {
				contentType : false,
				processData : false,
				cache       : false,
				type        : method || 'POST'
			});

			if (options.uploadProgress) {
				// workaround because jqXHR does not expose upload property
				s.xhr = function() {
					var xhr = $.ajaxSettings.xhr();

					if (xhr.upload) {
						xhr.upload.addEventListener('progress', function(event) {
							var percent = 0;
							var position = event.loaded || event.position;			/* event.position is deprecated */
							var total = event.total;

							if (event.lengthComputable) {
								percent = Math.ceil(position / total * 100);
							}

							options.uploadProgress(event, position, total, percent);
						}, false);
					}

					return xhr;
				};
			}

			s.data = null;

			var beforeSend = s.beforeSend;

			s.beforeSend = function(xhr, o) {
				// Send FormData() provided by user
				if (options.formData) {
					o.data = options.formData;
				} else {
					o.data = formdata;
				}

				if (beforeSend) {
					beforeSend.call(this, xhr, o);
				}
			};

			return $.ajax(s);
		}

		// private function for handling file uploads (hat tip to YAHOO!)
		function fileUploadIframe(a) {
			var form = $form[0], el, i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle;
			var deferred = $.Deferred();

			// #341
			deferred.abort = function(status) {
				xhr.abort(status);
			};

			if (a) {
				// ensure that every serialized input is still enabled
				for (i = 0; i < elements.length; i++) {
					el = $(elements[i]);
					if (hasProp) {
						el.prop('disabled', false);
					} else {
						el.removeAttr('disabled');
					}
				}
			}

			s = $.extend(true, {}, $.ajaxSettings, options);
			s.context = s.context || s;
			id = 'jqFormIO' + new Date().getTime();
			var ownerDocument = form.ownerDocument;
			var $body = $form.closest('body');

			if (s.iframeTarget) {
				$io = $(s.iframeTarget, ownerDocument);
				n = $io.attr2('name');
				if (!n) {
					$io.attr2('name', id);
				} else {
					id = n;
				}

			} else {
				$io = $('<iframe name="' + id + '" src="' + s.iframeSrc + '" />', ownerDocument);
				$io.css({position: 'absolute', top: '-1000px', left: '-1000px'});
			}
			io = $io[0];


			xhr = { // mock object
				aborted               : 0,
				responseText          : null,
				responseXML           : null,
				status                : 0,
				statusText            : 'n/a',
				getAllResponseHeaders : function() {},
				getResponseHeader     : function() {},
				setRequestHeader      : function() {},
				abort                 : function(status) {
					var e = (status === 'timeout' ? 'timeout' : 'aborted');

					log('aborting upload... ' + e);
					this.aborted = 1;

					try { // #214, #257
						if (io.contentWindow.document.execCommand) {
							io.contentWindow.document.execCommand('Stop');
						}
					} catch (ignore) {}

					$io.attr('src', s.iframeSrc); // abort op in progress
					xhr.error = e;
					if (s.error) {
						s.error.call(s.context, xhr, e, status);
					}

					if (g) {
						$.event.trigger('ajaxError', [xhr, s, e]);
					}

					if (s.complete) {
						s.complete.call(s.context, xhr, e);
					}
				}
			};

			g = s.global;
			// trigger ajax global events so that activity/block indicators work like normal
			if (g && $.active++ === 0) {
				$.event.trigger('ajaxStart');
			}
			if (g) {
				$.event.trigger('ajaxSend', [xhr, s]);
			}

			if (s.beforeSend && s.beforeSend.call(s.context, xhr, s) === false) {
				if (s.global) {
					$.active--;
				}
				deferred.reject();

				return deferred;
			}

			if (xhr.aborted) {
				deferred.reject();

				return deferred;
			}

			// add submitting element to data if we know it
			sub = form.clk;
			if (sub) {
				n = sub.name;
				if (n && !sub.disabled) {
					s.extraData = s.extraData || {};
					s.extraData[n] = sub.value;
					if (sub.type === 'image') {
						s.extraData[n + '.x'] = form.clk_x;
						s.extraData[n + '.y'] = form.clk_y;
					}
				}
			}

			var CLIENT_TIMEOUT_ABORT = 1;
			var SERVER_ABORT = 2;

			function getDoc(frame) {
				/* it looks like contentWindow or contentDocument do not
				 * carry the protocol property in ie8, when running under ssl
				 * frame.document is the only valid response document, since
				 * the protocol is know but not on the other two objects. strange?
				 * "Same origin policy" http://en.wikipedia.org/wiki/Same_origin_policy
				 */

				var doc = null;

				// IE8 cascading access check
				try {
					if (frame.contentWindow) {
						doc = frame.contentWindow.document;
					}
				} catch (err) {
					// IE8 access denied under ssl & missing protocol
					log('cannot get iframe.contentWindow document: ' + err);
				}

				if (doc) { // successful getting content
					return doc;
				}

				try { // simply checking may throw in ie8 under ssl or mismatched protocol
					doc = frame.contentDocument ? frame.contentDocument : frame.document;
				} catch (err) {
					// last attempt
					log('cannot get iframe.contentDocument: ' + err);
					doc = frame.document;
				}

				return doc;
			}

			// Rails CSRF hack (thanks to Yvan Barthelemy)
			var csrf_token = $('meta[name=csrf-token]').attr('content');
			var csrf_param = $('meta[name=csrf-param]').attr('content');

			if (csrf_param && csrf_token) {
				s.extraData = s.extraData || {};
				s.extraData[csrf_param] = csrf_token;
			}

			// take a breath so that pending repaints get some cpu time before the upload starts
			function doSubmit() {
				// make sure form attrs are set
				var t = $form.attr2('target'),
					a = $form.attr2('action'),
					mp = 'multipart/form-data',
					et = $form.attr('enctype') || $form.attr('encoding') || mp;

				// update form attrs in IE friendly way
				form.setAttribute('target', id);
				if (!method || /post/i.test(method)) {
					form.setAttribute('method', 'POST');
				}
				if (a !== s.url) {
					form.setAttribute('action', s.url);
				}

				// ie borks in some cases when setting encoding
				if (!s.skipEncodingOverride && (!method || /post/i.test(method))) {
					$form.attr({
						encoding : 'multipart/form-data',
						enctype  : 'multipart/form-data'
					});
				}

				// support timout
				if (s.timeout) {
					timeoutHandle = setTimeout(function() {
						timedOut = true; cb(CLIENT_TIMEOUT_ABORT);
					}, s.timeout);
				}

				// look for server aborts
				function checkState() {
					try {
						var state = getDoc(io).readyState;

						log('state = ' + state);
						if (state && state.toLowerCase() === 'uninitialized') {
							setTimeout(checkState, 50);
						}

					} catch (e) {
						log('Server abort: ', e, ' (', e.name, ')');
						cb(SERVER_ABORT);				// eslint-disable-line callback-return
						if (timeoutHandle) {
							clearTimeout(timeoutHandle);
						}
						timeoutHandle = undefined;
					}
				}

				// add "extra" data to form if provided in options
				var extraInputs = [];

				try {
					if (s.extraData) {
						for (var n in s.extraData) {
							if (s.extraData.hasOwnProperty(n)) {
								// if using the $.param format that allows for multiple values with the same name
								if ($.isPlainObject(s.extraData[n]) && s.extraData[n].hasOwnProperty('name') && s.extraData[n].hasOwnProperty('value')) {
									extraInputs.push(
										$('<input type="hidden" name="' + s.extraData[n].name + '">', ownerDocument).val(s.extraData[n].value)
											.appendTo(form)[0]);
								} else {
									extraInputs.push(
										$('<input type="hidden" name="' + n + '">', ownerDocument).val(s.extraData[n])
											.appendTo(form)[0]);
								}
							}
						}
					}

					if (!s.iframeTarget) {
						// add iframe to doc and submit the form
						$io.appendTo($body);
					}

					if (io.attachEvent) {
						io.attachEvent('onload', cb);
					} else {
						io.addEventListener('load', cb, false);
					}

					setTimeout(checkState, 15);

					try {
						form.submit();

					} catch (err) {
						// just in case form has element with name/id of 'submit'
						var submitFn = document.createElement('form').submit;

						submitFn.apply(form);
					}

				} finally {
					// reset attrs and remove "extra" input elements
					form.setAttribute('action', a);
					form.setAttribute('enctype', et); // #380
					if (t) {
						form.setAttribute('target', t);
					} else {
						$form.removeAttr('target');
					}
					$(extraInputs).remove();
				}
			}

			if (s.forceSync) {
				doSubmit();
			} else {
				setTimeout(doSubmit, 10); // this lets dom updates render
			}

			var data, doc, domCheckCount = 50, callbackProcessed;

			function cb(e) {
				if (xhr.aborted || callbackProcessed) {
					return;
				}

				doc = getDoc(io);
				if (!doc) {
					log('cannot access response document');
					e = SERVER_ABORT;
				}
				if (e === CLIENT_TIMEOUT_ABORT && xhr) {
					xhr.abort('timeout');
					deferred.reject(xhr, 'timeout');

					return;

				}
				if (e === SERVER_ABORT && xhr) {
					xhr.abort('server abort');
					deferred.reject(xhr, 'error', 'server abort');

					return;
				}

				if (!doc || doc.location.href === s.iframeSrc) {
					// response not received yet
					if (!timedOut) {
						return;
					}
				}

				if (io.detachEvent) {
					io.detachEvent('onload', cb);
				} else {
					io.removeEventListener('load', cb, false);
				}

				var status = 'success', errMsg;

				try {
					if (timedOut) {
						throw 'timeout';
					}

					var isXml = s.dataType === 'xml' || doc.XMLDocument || $.isXMLDoc(doc);

					log('isXml=' + isXml);

					if (!isXml && window.opera && (doc.body === null || !doc.body.innerHTML)) {
						if (--domCheckCount) {
							// in some browsers (Opera) the iframe DOM is not always traversable when
							// the onload callback fires, so we loop a bit to accommodate
							log('requeing onLoad callback, DOM not available');
							setTimeout(cb, 250);

							return;
						}
						// let this fall through because server response could be an empty document
						// log('Could not access iframe DOM after mutiple tries.');
						// throw 'DOMException: not available';
					}

					// log('response detected');
					var docRoot = doc.body ? doc.body : doc.documentElement;

					xhr.responseText = docRoot ? docRoot.innerHTML : null;
					xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;
					if (isXml) {
						s.dataType = 'xml';
					}
					xhr.getResponseHeader = function(header){
						var headers = {'content-type': s.dataType};

						return headers[header.toLowerCase()];
					};
					// support for XHR 'status' & 'statusText' emulation :
					if (docRoot) {
						xhr.status = Number(docRoot.getAttribute('status')) || xhr.status;
						xhr.statusText = docRoot.getAttribute('statusText') || xhr.statusText;
					}

					var dt = (s.dataType || '').toLowerCase();
					var scr = /(json|script|text)/.test(dt);

					if (scr || s.textarea) {
						// see if user embedded response in textarea
						var ta = doc.getElementsByTagName('textarea')[0];

						if (ta) {
							xhr.responseText = ta.value;
							// support for XHR 'status' & 'statusText' emulation :
							xhr.status = Number(ta.getAttribute('status')) || xhr.status;
							xhr.statusText = ta.getAttribute('statusText') || xhr.statusText;

						} else if (scr) {
							// account for browsers injecting pre around json response
							var pre = doc.getElementsByTagName('pre')[0];
							var b = doc.getElementsByTagName('body')[0];

							if (pre) {
								xhr.responseText = pre.textContent ? pre.textContent : pre.innerText;
							} else if (b) {
								xhr.responseText = b.textContent ? b.textContent : b.innerText;
							}
						}

					} else if (dt === 'xml' && !xhr.responseXML && xhr.responseText) {
						xhr.responseXML = toXml(xhr.responseText);			// eslint-disable-line no-use-before-define
					}

					try {
						data = httpData(xhr, dt, s);						// eslint-disable-line no-use-before-define

					} catch (err) {
						status = 'parsererror';
						xhr.error = errMsg = (err || status);
					}

				} catch (err) {
					log('error caught: ', err);
					status = 'error';
					xhr.error = errMsg = (err || status);
				}

				if (xhr.aborted) {
					log('upload aborted');
					status = null;
				}

				if (xhr.status) { // we've set xhr.status
					status = ((xhr.status >= 200 && xhr.status < 300) || xhr.status === 304) ? 'success' : 'error';
				}

				// ordering of these callbacks/triggers is odd, but that's how $.ajax does it
				if (status === 'success') {
					if (s.success) {
						s.success.call(s.context, data, 'success', xhr);
					}

					deferred.resolve(xhr.responseText, 'success', xhr);

					if (g) {
						$.event.trigger('ajaxSuccess', [xhr, s]);
					}

				} else if (status) {
					if (typeof errMsg === 'undefined') {
						errMsg = xhr.statusText;
					}
					if (s.error) {
						s.error.call(s.context, xhr, status, errMsg);
					}
					deferred.reject(xhr, 'error', errMsg);
					if (g) {
						$.event.trigger('ajaxError', [xhr, s, errMsg]);
					}
				}

				if (g) {
					$.event.trigger('ajaxComplete', [xhr, s]);
				}

				if (g && !--$.active) {
					$.event.trigger('ajaxStop');
				}

				if (s.complete) {
					s.complete.call(s.context, xhr, status);
				}

				callbackProcessed = true;
				if (s.timeout) {
					clearTimeout(timeoutHandle);
				}

				// clean up
				setTimeout(function() {
					if (!s.iframeTarget) {
						$io.remove();
					} else { // adding else to clean up existing iframe response.
						$io.attr('src', s.iframeSrc);
					}
					xhr.responseXML = null;
				}, 100);
			}

			var toXml = $.parseXML || function(s, doc) { // use parseXML if available (jQuery 1.5+)
				if (window.ActiveXObject) {
					doc = new ActiveXObject('Microsoft.XMLDOM');
					doc.async = 'false';
					doc.loadXML(s);

				} else {
					doc = (new DOMParser()).parseFromString(s, 'text/xml');
				}

				return (doc && doc.documentElement && doc.documentElement.nodeName !== 'parsererror') ? doc : null;
			};
			var parseJSON = $.parseJSON || function(s) {
				/* jslint evil:true */
				return window['eval']('(' + s + ')');			// eslint-disable-line dot-notation
			};

			var httpData = function(xhr, type, s) { // mostly lifted from jq1.4.4

				var ct = xhr.getResponseHeader('content-type') || '',
					xml = ((type === 'xml' || !type) && ct.indexOf('xml') >= 0),
					data = xml ? xhr.responseXML : xhr.responseText;

				if (xml && data.documentElement.nodeName === 'parsererror') {
					if ($.error) {
						$.error('parsererror');
					}
				}
				if (s && s.dataFilter) {
					data = s.dataFilter(data, type);
				}
				if (typeof data === 'string') {
					if ((type === 'json' || !type) && ct.indexOf('json') >= 0) {
						data = parseJSON(data);
					} else if ((type === 'script' || !type) && ct.indexOf('javascript') >= 0) {
						$.globalEval(data);
					}
				}

				return data;
			};

			return deferred;
		}
	};

	/**
	 * ajaxForm() provides a mechanism for fully automating form submission.
	 *
	 * The advantages of using this method instead of ajaxSubmit() are:
	 *
	 * 1: This method will include coordinates for <input type="image"> elements (if the element
	 *	is used to submit the form).
	 * 2. This method will include the submit element's name/value data (for the element that was
	 *	used to submit the form).
	 * 3. This method binds the submit() method to the form for you.
	 *
	 * The options argument for ajaxForm works exactly as it does for ajaxSubmit. ajaxForm merely
	 * passes the options argument along after properly binding events for submit elements and
	 * the form itself.
	 */
	$.fn.ajaxForm = function(options, data, dataType, onSuccess) {
		if (typeof options === 'string' || (options === false && arguments.length > 0)) {
			options = {
				'url'      : options,
				'data'     : data,
				'dataType' : dataType
			};

			if (typeof onSuccess === 'function') {
				options.success = onSuccess;
			}
		}

		options = options || {};
		options.delegation = options.delegation && $.isFunction($.fn.on);

		// in jQuery 1.3+ we can fix mistakes with the ready state
		if (!options.delegation && this.length === 0) {
			var o = {s: this.selector, c: this.context};

			if (!$.isReady && o.s) {
				log('DOM not ready, queuing ajaxForm');
				$(function() {
					$(o.s, o.c).ajaxForm(options);
				});

				return this;
			}

			// is your DOM ready?  http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
			log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));

			return this;
		}

		if (options.delegation) {
			$(document)
				.off('submit.form-plugin', this.selector, doAjaxSubmit)
				.off('click.form-plugin', this.selector, captureSubmittingElement)
				.on('submit.form-plugin', this.selector, options, doAjaxSubmit)
				.on('click.form-plugin', this.selector, options, captureSubmittingElement);

			return this;
		}

		if (options.beforeFormUnbind) {
			options.beforeFormUnbind(this, options);
		}

		return this.ajaxFormUnbind()
			.on('submit.form-plugin', options, doAjaxSubmit)
			.on('click.form-plugin', options, captureSubmittingElement);
	};

	// private event handlers
	function doAjaxSubmit(e) {
		/* jshint validthis:true */
		var options = e.data;

		if (!e.isDefaultPrevented()) { // if event has been canceled, don't proceed
			e.preventDefault();
			$(e.target).closest('form').ajaxSubmit(options); // #365
		}
	}

	function captureSubmittingElement(e) {
		/* jshint validthis:true */
		var target = e.target;
		var $el = $(target);

		if (!$el.is('[type=submit],[type=image]')) {
			// is this a child element of the submit el?  (ex: a span within a button)
			var t = $el.closest('[type=submit]');

			if (t.length === 0) {
				return;
			}
			target = t[0];
		}

		var form = target.form;

		form.clk = target;

		if (target.type === 'image') {
			if (typeof e.offsetX !== 'undefined') {
				form.clk_x = e.offsetX;
				form.clk_y = e.offsetY;

			} else if (typeof $.fn.offset === 'function') {
				var offset = $el.offset();

				form.clk_x = e.pageX - offset.left;
				form.clk_y = e.pageY - offset.top;

			} else {
				form.clk_x = e.pageX - target.offsetLeft;
				form.clk_y = e.pageY - target.offsetTop;
			}
		}
		// clear form vars
		setTimeout(function() {
			form.clk = form.clk_x = form.clk_y = null;
		}, 100);
	}


	// ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm
	$.fn.ajaxFormUnbind = function() {
		return this.off('submit.form-plugin click.form-plugin');
	};

	/**
	 * formToArray() gathers form element data into an array of objects that can
	 * be passed to any of the following ajax functions: $.get, $.post, or load.
	 * Each object in the array has both a 'name' and 'value' property. An example of
	 * an array for a simple login form might be:
	 *
	 * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
	 *
	 * It is this array that is passed to pre-submit callback functions provided to the
	 * ajaxSubmit() and ajaxForm() methods.
	 */
	$.fn.formToArray = function(semantic, elements, filtering) {
		var a = [];

		if (this.length === 0) {
			return a;
		}

		var form = this[0];
		var formId = this.attr('id');
		var els = (semantic || typeof form.elements === 'undefined') ? form.getElementsByTagName('*') : form.elements;
		var els2;

		if (els) {
			els = $.makeArray(els); // convert to standard array
		}

		// #386; account for inputs outside the form which use the 'form' attribute
		// FinesseRus: in non-IE browsers outside fields are already included in form.elements.
		if (formId && (semantic || /(Edge|Trident)\//.test(navigator.userAgent))) {
			els2 = $(':input[form="' + formId + '"]').get(); // hat tip @thet
			if (els2.length) {
				els = (els || []).concat(els2);
			}
		}

		if (!els || !els.length) {
			return a;
		}

		if ($.isFunction(filtering)) {
			els = $.map(els, filtering);
		}

		var i, j, n, v, el, max, jmax;

		for (i = 0, max = els.length; i < max; i++) {
			el = els[i];
			n = el.name;
			if (!n || el.disabled) {
				continue;
			}

			if (semantic && form.clk && el.type === 'image') {
				// handle image inputs on the fly when semantic == true
				if (form.clk === el) {
					a.push({name: n, value: $(el).val(), type: el.type});
					a.push({name: n + '.x', value: form.clk_x}, {name: n + '.y', value: form.clk_y});
				}
				continue;
			}

			v = $.fieldValue(el, true);
			if (v && v.constructor === Array) {
				if (elements) {
					elements.push(el);
				}
				for (j = 0, jmax = v.length; j < jmax; j++) {
					a.push({name: n, value: v[j]});
				}

			} else if (feature.fileapi && el.type === 'file') {
				if (elements) {
					elements.push(el);
				}

				var files = el.files;

				if (files.length) {
					for (j = 0; j < files.length; j++) {
						a.push({name: n, value: files[j], type: el.type});
					}
				} else {
					// #180
					a.push({name: n, value: '', type: el.type});
				}

			} else if (v !== null && typeof v !== 'undefined') {
				if (elements) {
					elements.push(el);
				}
				a.push({name: n, value: v, type: el.type, required: el.required});
			}
		}

		if (!semantic && form.clk) {
			// input type=='image' are not found in elements array! handle it here
			var $input = $(form.clk), input = $input[0];

			n = input.name;

			if (n && !input.disabled && input.type === 'image') {
				a.push({name: n, value: $input.val()});
				a.push({name: n + '.x', value: form.clk_x}, {name: n + '.y', value: form.clk_y});
			}
		}

		return a;
	};

	/**
	 * Serializes form data into a 'submittable' string. This method will return a string
	 * in the format: name1=value1&amp;name2=value2
	 */
	$.fn.formSerialize = function(semantic) {
		// hand off to jQuery.param for proper encoding
		return $.param(this.formToArray(semantic));
	};

	/**
	 * Serializes all field elements in the jQuery object into a query string.
	 * This method will return a string in the format: name1=value1&amp;name2=value2
	 */
	$.fn.fieldSerialize = function(successful) {
		var a = [];

		this.each(function() {
			var n = this.name;

			if (!n) {
				return;
			}

			var v = $.fieldValue(this, successful);

			if (v && v.constructor === Array) {
				for (var i = 0, max = v.length; i < max; i++) {
					a.push({name: n, value: v[i]});
				}

			} else if (v !== null && typeof v !== 'undefined') {
				a.push({name: this.name, value: v});
			}
		});

		// hand off to jQuery.param for proper encoding
		return $.param(a);
	};

	/**
	 * Returns the value(s) of the element in the matched set. For example, consider the following form:
	 *
	 *	<form><fieldset>
	 *		<input name="A" type="text">
	 *		<input name="A" type="text">
	 *		<input name="B" type="checkbox" value="B1">
	 *		<input name="B" type="checkbox" value="B2">
	 *		<input name="C" type="radio" value="C1">
	 *		<input name="C" type="radio" value="C2">
	 *	</fieldset></form>
	 *
	 *	var v = $('input[type=text]').fieldValue();
	 *	// if no values are entered into the text inputs
	 *	v === ['','']
	 *	// if values entered into the text inputs are 'foo' and 'bar'
	 *	v === ['foo','bar']
	 *
	 *	var v = $('input[type=checkbox]').fieldValue();
	 *	// if neither checkbox is checked
	 *	v === undefined
	 *	// if both checkboxes are checked
	 *	v === ['B1', 'B2']
	 *
	 *	var v = $('input[type=radio]').fieldValue();
	 *	// if neither radio is checked
	 *	v === undefined
	 *	// if first radio is checked
	 *	v === ['C1']
	 *
	 * The successful argument controls whether or not the field element must be 'successful'
	 * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
	 * The default value of the successful argument is true. If this value is false the value(s)
	 * for each element is returned.
	 *
	 * Note: This method *always* returns an array. If no valid value can be determined the
	 *	array will be empty, otherwise it will contain one or more values.
	 */
	$.fn.fieldValue = function(successful) {
		for (var val = [], i = 0, max = this.length; i < max; i++) {
			var el = this[i];
			var v = $.fieldValue(el, successful);

			if (v === null || typeof v === 'undefined' || (v.constructor === Array && !v.length)) {
				continue;
			}

			if (v.constructor === Array) {
				$.merge(val, v);
			} else {
				val.push(v);
			}
		}

		return val;
	};

	/**
	 * Returns the value of the field element.
	 */
	$.fieldValue = function(el, successful) {
		var n = el.name, t = el.type, tag = el.tagName.toLowerCase();

		if (typeof successful === 'undefined') {
			successful = true;
		}

		/* eslint-disable no-mixed-operators */
		if (successful && (!n || el.disabled || t === 'reset' || t === 'button' ||
			(t === 'checkbox' || t === 'radio') && !el.checked ||
			(t === 'submit' || t === 'image') && el.form && el.form.clk !== el ||
			tag === 'select' && el.selectedIndex === -1)) {
		/* eslint-enable no-mixed-operators */
			return null;
		}

		if (tag === 'select') {
			var index = el.selectedIndex;

			if (index < 0) {
				return null;
			}

			var a = [], ops = el.options;
			var one = (t === 'select-one');
			var max = (one ? index + 1 : ops.length);

			for (var i = (one ? index : 0); i < max; i++) {
				var op = ops[i];

				if (op.selected && !op.disabled) {
					var v = op.value;

					if (!v) { // extra pain for IE...
						v = (op.attributes && op.attributes.value && !(op.attributes.value.specified)) ? op.text : op.value;
					}

					if (one) {
						return v;
					}

					a.push(v);
				}
			}

			return a;
		}

		return $(el).val().replace(rCRLF, '\r\n');
	};

	/**
	 * Clears the form data. Takes the following actions on the form's input fields:
	 *  - input text fields will have their 'value' property set to the empty string
	 *  - select elements will have their 'selectedIndex' property set to -1
	 *  - checkbox and radio inputs will have their 'checked' property set to false
	 *  - inputs of type submit, button, reset, and hidden will *not* be effected
	 *  - button elements will *not* be effected
	 */
	$.fn.clearForm = function(includeHidden) {
		return this.each(function() {
			$('input,select,textarea', this).clearFields(includeHidden);
		});
	};

	/**
	 * Clears the selected form elements.
	 */
	$.fn.clearFields = $.fn.clearInputs = function(includeHidden) {
		var re = /^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i; // 'hidden' is not in this list

		return this.each(function() {
			var t = this.type, tag = this.tagName.toLowerCase();

			if (re.test(t) || tag === 'textarea') {
				this.value = '';

			} else if (t === 'checkbox' || t === 'radio') {
				this.checked = false;

			} else if (tag === 'select') {
				this.selectedIndex = -1;

			} else if (t === 'file') {
				if (/MSIE/.test(navigator.userAgent)) {
					$(this).replaceWith($(this).clone(true));
				} else {
					$(this).val('');
				}

			} else if (includeHidden) {
				// includeHidden can be the value true, or it can be a selector string
				// indicating a special test; for example:
				// $('#myForm').clearForm('.special:hidden')
				// the above would clean hidden inputs that have the class of 'special'
				if ((includeHidden === true && /hidden/.test(t)) ||
					(typeof includeHidden === 'string' && $(this).is(includeHidden))) {
					this.value = '';
				}
			}
		});
	};


	/**
	 * Resets the form data or individual elements. Takes the following actions
	 * on the selected tags:
	 * - all fields within form elements will be reset to their original value
	 * - input / textarea / select fields will be reset to their original value
	 * - option / optgroup fields (for multi-selects) will defaulted individually
	 * - non-multiple options will find the right select to default
	 * - label elements will be searched against its 'for' attribute
	 * - all others will be searched for appropriate children to default
	 */
	$.fn.resetForm = function() {
		return this.each(function() {
			var el = $(this);
			var tag = this.tagName.toLowerCase();

			switch (tag) {
			case 'input':
				this.checked = this.defaultChecked;
				// fall through

			case 'textarea':
				this.value = this.defaultValue;

				return true;

			case 'option':
			case 'optgroup':
				var select = el.parents('select');

				if (select.length && select[0].multiple) {
					if (tag === 'option') {
						this.selected = this.defaultSelected;
					} else {
						el.find('option').resetForm();
					}
				} else {
					select.resetForm();
				}

				return true;

			case 'select':
				el.find('option').each(function(i) {				// eslint-disable-line consistent-return
					this.selected = this.defaultSelected;
					if (this.defaultSelected && !el[0].multiple) {
						el[0].selectedIndex = i;

						return false;
					}
				});

				return true;

			case 'label':
				var forEl = $(el.attr('for'));
				var list = el.find('input,select,textarea');

				if (forEl[0]) {
					list.unshift(forEl[0]);
				}

				list.resetForm();

				return true;

			case 'form':
				// guard against an input with the name of 'reset'
				// note that IE reports the reset function as an 'object'
				if (typeof this.reset === 'function' || (typeof this.reset === 'object' && !this.reset.nodeType)) {
					this.reset();
				}

				return true;

			default:
				el.find('form,input,label,select,textarea').resetForm();

				return true;
			}
		});
	};

	/**
	 * Enables or disables any matching elements.
	 */
	$.fn.enable = function(b) {
		if (typeof b === 'undefined') {
			b = true;
		}

		return this.each(function() {
			this.disabled = !b;
		});
	};

	/**
	 * Checks/unchecks any matching checkboxes or radio buttons and
	 * selects/deselects and matching option elements.
	 */
	$.fn.selected = function(select) {
		if (typeof select === 'undefined') {
			select = true;
		}

		return this.each(function() {
			var t = this.type;

			if (t === 'checkbox' || t === 'radio') {
				this.checked = select;

			} else if (this.tagName.toLowerCase() === 'option') {
				var $sel = $(this).parent('select');

				if (select && $sel[0] && $sel[0].type === 'select-one') {
					// deselect all other options
					$sel.find('option').selected(false);
				}

				this.selected = select;
			}
		});
	};

	// expose debug var
	$.fn.ajaxSubmit.debug = false;

	// helper fn for console logging
	function log() {
		if (!$.fn.ajaxSubmit.debug) {
			return;
		}

		var msg = '[jquery.form] ' + Array.prototype.join.call(arguments, '');

		if (window.console && window.console.log) {
			window.console.log(msg);

		} else if (window.opera && window.opera.postError) {
			window.opera.postError(msg);
		}
	}
}));
                                                                         jquery/jquery.form.min.js                                                                           0000644                 00000037151 15212564040 0011472 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),a(t),t}:a(jQuery)}(function(O){"use strict";var d=/\r?\n/g,h={},X=(h.fileapi=void 0!==O('<input type="file">').get(0).files,h.formdata=void 0!==window.FormData,!!O.fn.prop);function o(e){var t=e.data;e.isDefaultPrevented()||(e.preventDefault(),O(e.target).closest("form").ajaxSubmit(t))}function i(e){var t=e.target,a=O(t);if(!a.is("[type=submit],[type=image]")){var r=a.closest("[type=submit]");if(0===r.length)return;t=r[0]}var n=t.form;"image"===(n.clk=t).type&&(void 0!==e.offsetX?(n.clk_x=e.offsetX,n.clk_y=e.offsetY):"function"==typeof O.fn.offset?(r=a.offset(),n.clk_x=e.pageX-r.left,n.clk_y=e.pageY-r.top):(n.clk_x=e.pageX-t.offsetLeft,n.clk_y=e.pageY-t.offsetTop)),setTimeout(function(){n.clk=n.clk_x=n.clk_y=null},100)}function C(){var e;O.fn.ajaxSubmit.debug&&(e="[jquery.form] "+Array.prototype.join.call(arguments,""),window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e))}O.fn.attr2=function(){var e;return X&&((e=this.prop.apply(this,arguments))&&e.jquery||"string"==typeof e)?e:this.attr.apply(this,arguments)},O.fn.ajaxSubmit=function(F,e,t,a){if(this.length){var E,L=this,e=("function"==typeof F?F={success:F}:"string"==typeof F||!1===F&&0<arguments.length?(F={url:F,data:e,dataType:t},"function"==typeof a&&(F.success=a)):void 0===F&&(F={}),E=F.method||F.type||this.attr2("method"),t=(t=(t="string"==typeof(e=F.url||this.attr2("action"))?O.trim(e):"")||window.location.href||"")&&(t.match(/^([^#]+)/)||[])[1],a=/(MSIE|Trident)/.test(navigator.userAgent||"")&&/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",F=O.extend(!0,{url:t,success:O.ajaxSettings.success,type:E||O.ajaxSettings.type,iframeSrc:a},F),{});if(this.trigger("form-pre-serialize",[this,F,e]),e.veto)C("ajaxSubmit: submit vetoed via form-pre-serialize trigger");else if(F.beforeSerialize&&!1===F.beforeSerialize(this,F))C("ajaxSubmit: submit aborted via beforeSerialize callback");else{var t=F.traditional,M=(void 0===t&&(t=O.ajaxSettings.traditional),[]),r=this.formToArray(F.semantic,M,F.filtering);if(F.data&&(a=O.isFunction(F.data)?F.data(r):F.data,F.extraData=a,l=O.param(a,t)),F.beforeSubmit&&!1===F.beforeSubmit(r,this,F))C("ajaxSubmit: submit aborted via beforeSubmit callback");else if(this.trigger("form-submit-validate",[r,this,F,e]),e.veto)C("ajaxSubmit: submit vetoed via form-submit-validate trigger");else{var o,n,i,a=O.param(r,t),s=(l&&(a=a?a+"&"+l:l),"GET"===F.type.toUpperCase()?(F.url+=(0<=F.url.indexOf("?")?"&":"?")+a,F.data=null):F.data=a,[]);F.resetForm&&s.push(function(){L.resetForm()}),F.clearForm&&s.push(function(){L.clearForm(F.includeHidden)}),!F.dataType&&F.target?(o=F.success||function(){},s.push(function(e,t,a){var r=arguments,n=F.replaceTarget?"replaceWith":"html";O(F.target)[n](e).each(function(){o.apply(this,r)})})):F.success&&(O.isArray(F.success)?O.merge(s,F.success):s.push(F.success)),F.success=function(e,t,a){for(var r=F.context||this,n=0,o=s.length;n<o;n++)s[n].apply(r,[e,t,a||L,L])},F.error&&(n=F.error,F.error=function(e,t,a){var r=F.context||this;n.apply(r,[e,t,a,L])}),F.complete&&(i=F.complete,F.complete=function(e,t){var a=F.context||this;i.apply(a,[e,t,L])});var c,e=0<O("input[type=file]:enabled",this).filter(function(){return""!==O(this).val()}).length,t="multipart/form-data",l=L.attr("enctype")===t||L.attr("encoding")===t,a=h.fileapi&&h.formdata;C("fileAPI :"+a),!1!==F.iframe&&(F.iframe||(e||l)&&!a)?F.closeKeepAlive?O.get(F.closeKeepAlive,function(){c=f(r)}):c=f(r):c=(e||l)&&a?function(e){for(var a=new FormData,t=0;t<e.length;t++)a.append(e[t].name,e[t].value);if(F.extraData){var r=function(e){var t,a,r=O.param(e,F.traditional).split("&"),n=r.length,o=[];for(t=0;t<n;t++)r[t]=r[t].replace(/\+/g," "),a=r[t].split("="),o.push([decodeURIComponent(a[0]),decodeURIComponent(a[1])]);return o}(F.extraData);for(t=0;t<r.length;t++)r[t]&&a.append(r[t][0],r[t][1])}F.data=null;var n=O.extend(!0,{},O.ajaxSettings,F,{contentType:!1,processData:!1,cache:!1,type:E||"POST"});F.uploadProgress&&(n.xhr=function(){var e=O.ajaxSettings.xhr();return e.upload&&e.upload.addEventListener("progress",function(e){var t=0,a=e.loaded||e.position,r=e.total;e.lengthComputable&&(t=Math.ceil(a/r*100)),F.uploadProgress(e,a,r,t)},!1),e});n.data=null;var o=n.beforeSend;return n.beforeSend=function(e,t){F.formData?t.data=F.formData:t.data=a,o&&o.call(this,e,t)},O.ajax(n)}(r):O.ajax(F),L.removeData("jqxhr").data("jqxhr",c);for(var u=0;u<M.length;u++)M[u]=null;this.trigger("form-submit-notify",[this,F])}}}else C("ajaxSubmit: skipping submit process - no element selected");return this;function f(e){var t,a,l,u,f,d,m,p,h,o=L[0],g=O.Deferred();if(g.abort=function(e){m.abort(e)},e)for(a=0;a<M.length;a++)t=O(M[a]),X?t.prop("disabled",!1):t.removeAttr("disabled");(l=O.extend(!0,{},O.ajaxSettings,F)).context=l.context||l;var v,x,r,y,b,T,j,w,i,S,s="jqFormIO"+(new Date).getTime(),c=o.ownerDocument,k=L.closest("body");return l.iframeTarget?(r=(f=O(l.iframeTarget,c)).attr2("name"))?s=r:f.attr2("name",s):(f=O('<iframe name="'+s+'" src="'+l.iframeSrc+'" />',c)).css({position:"absolute",top:"-1000px",left:"-1000px"}),d=f[0],m={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var t="timeout"===e?"timeout":"aborted";C("aborting upload... "+t),this.aborted=1;try{d.contentWindow.document.execCommand&&d.contentWindow.document.execCommand("Stop")}catch(e){}f.attr("src",l.iframeSrc),m.error=t,l.error&&l.error.call(l.context,m,t,e),u&&O.event.trigger("ajaxError",[m,l,t]),l.complete&&l.complete.call(l.context,m,t)}},(u=l.global)&&0==O.active++&&O.event.trigger("ajaxStart"),u&&O.event.trigger("ajaxSend",[m,l]),l.beforeSend&&!1===l.beforeSend.call(l.context,m,l)?(l.global&&O.active--,g.reject()):m.aborted?g.reject():((e=o.clk)&&(r=e.name)&&!e.disabled&&(l.extraData=l.extraData||{},l.extraData[r]=e.value,"image"===e.type)&&(l.extraData[r+".x"]=o.clk_x,l.extraData[r+".y"]=o.clk_y),v=1,x=2,e=O("meta[name=csrf-token]").attr("content"),(r=O("meta[name=csrf-param]").attr("content"))&&e&&(l.extraData=l.extraData||{},l.extraData[r]=e),l.forceSync?n():setTimeout(n,10),T=50,w=O.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!==t.documentElement.nodeName?t:null},i=O.parseJSON||function(e){return window.eval("("+e+")")},S=function(e,t,a){var r=e.getResponseHeader("content-type")||"",n=("xml"===t||!t)&&0<=r.indexOf("xml"),e=n?e.responseXML:e.responseText;return n&&"parsererror"===e.documentElement.nodeName&&O.error&&O.error("parsererror"),"string"==typeof(e=a&&a.dataFilter?a.dataFilter(e,t):e)&&(("json"===t||!t)&&0<=r.indexOf("json")?e=i(e):("script"===t||!t)&&0<=r.indexOf("javascript")&&O.globalEval(e)),e}),g;function D(t){var a=null;try{t.contentWindow&&(a=t.contentWindow.document)}catch(e){C("cannot get iframe.contentWindow document: "+e)}if(!a)try{a=t.contentDocument||t.document}catch(e){C("cannot get iframe.contentDocument: "+e),a=t.document}return a}function n(){var e=L.attr2("target"),t=L.attr2("action"),a=L.attr("enctype")||L.attr("encoding")||"multipart/form-data";o.setAttribute("target",s),E&&!/post/i.test(E)||o.setAttribute("method","POST"),t!==l.url&&o.setAttribute("action",l.url),l.skipEncodingOverride||E&&!/post/i.test(E)||L.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),l.timeout&&(h=setTimeout(function(){p=!0,A(v)},l.timeout));var r=[];try{if(l.extraData)for(var n in l.extraData)l.extraData.hasOwnProperty(n)&&(O.isPlainObject(l.extraData[n])&&l.extraData[n].hasOwnProperty("name")&&l.extraData[n].hasOwnProperty("value")?r.push(O('<input type="hidden" name="'+l.extraData[n].name+'">',c).val(l.extraData[n].value).appendTo(o)[0]):r.push(O('<input type="hidden" name="'+n+'">',c).val(l.extraData[n]).appendTo(o)[0]));l.iframeTarget||f.appendTo(k),d.attachEvent?d.attachEvent("onload",A):d.addEventListener("load",A,!1),setTimeout(function e(){try{var t=D(d).readyState;C("state = "+t),t&&"uninitialized"===t.toLowerCase()&&setTimeout(e,50)}catch(e){C("Server abort: ",e," (",e.name,")"),A(x),h&&clearTimeout(h),h=void 0}},15);try{o.submit()}catch(e){document.createElement("form").submit.apply(o)}}finally{o.setAttribute("action",t),o.setAttribute("enctype",a),e?o.setAttribute("target",e):L.removeAttr("target"),O(r).remove()}}function A(t){if(!m.aborted&&!j)if((b=D(d))||(C("cannot access response document"),t=x),t===v&&m)m.abort("timeout"),g.reject(m,"timeout");else if(t===x&&m)m.abort("server abort"),g.reject(m,"error","server abort");else if(b&&b.location.href!==l.iframeSrc||p){d.detachEvent?d.detachEvent("onload",A):d.removeEventListener("load",A,!1);var a,t="success";try{if(p)throw"timeout";var e="xml"===l.dataType||b.XMLDocument||O.isXMLDoc(b);if(C("isXml="+e),!e&&window.opera&&(null===b.body||!b.body.innerHTML)&&--T)return C("requeing onLoad callback, DOM not available"),void setTimeout(A,250);var r,n,o,i=b.body||b.documentElement,s=(m.responseText=i?i.innerHTML:null,m.responseXML=b.XMLDocument||b,e&&(l.dataType="xml"),m.getResponseHeader=function(e){return{"content-type":l.dataType}[e.toLowerCase()]},i&&(m.status=Number(i.getAttribute("status"))||m.status,m.statusText=i.getAttribute("statusText")||m.statusText),(l.dataType||"").toLowerCase()),c=/(json|script|text)/.test(s);c||l.textarea?(r=b.getElementsByTagName("textarea")[0])?(m.responseText=r.value,m.status=Number(r.getAttribute("status"))||m.status,m.statusText=r.getAttribute("statusText")||m.statusText):c&&(n=b.getElementsByTagName("pre")[0],o=b.getElementsByTagName("body")[0],n?m.responseText=n.textContent||n.innerText:o&&(m.responseText=o.textContent||o.innerText)):"xml"===s&&!m.responseXML&&m.responseText&&(m.responseXML=w(m.responseText));try{y=S(m,s,l)}catch(e){t="parsererror",m.error=a=e||t}}catch(e){C("error caught: ",e),t="error",m.error=a=e||t}m.aborted&&(C("upload aborted"),t=null),"success"===(t=m.status?200<=m.status&&m.status<300||304===m.status?"success":"error":t)?(l.success&&l.success.call(l.context,y,"success",m),g.resolve(m.responseText,"success",m),u&&O.event.trigger("ajaxSuccess",[m,l])):t&&(void 0===a&&(a=m.statusText),l.error&&l.error.call(l.context,m,t,a),g.reject(m,"error",a),u)&&O.event.trigger("ajaxError",[m,l,a]),u&&O.event.trigger("ajaxComplete",[m,l]),u&&!--O.active&&O.event.trigger("ajaxStop"),l.complete&&l.complete.call(l.context,m,t),j=!0,l.timeout&&clearTimeout(h),setTimeout(function(){l.iframeTarget?f.attr("src",l.iframeSrc):f.remove(),m.responseXML=null},100)}}}},O.fn.ajaxForm=function(e,t,a,r){var n;return("string"==typeof e||!1===e&&0<arguments.length)&&(e={url:e,data:t,dataType:a},"function"==typeof r)&&(e.success=r),(e=e||{}).delegation=e.delegation&&O.isFunction(O.fn.on),e.delegation||0!==this.length?e.delegation?(O(document).off("submit.form-plugin",this.selector,o).off("click.form-plugin",this.selector,i).on("submit.form-plugin",this.selector,e,o).on("click.form-plugin",this.selector,e,i),this):(e.beforeFormUnbind&&e.beforeFormUnbind(this,e),this.ajaxFormUnbind().on("submit.form-plugin",e,o).on("click.form-plugin",e,i)):(n={s:this.selector,c:this.context},!O.isReady&&n.s?(C("DOM not ready, queuing ajaxForm"),O(function(){O(n.s,n.c).ajaxForm(e)})):C("terminating; zero elements found by selector"+(O.isReady?"":" (DOM not ready)")),this)},O.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},O.fn.formToArray=function(e,t,a){var r=[];if(0!==this.length){var n=this[0],o=this.attr("id"),i=(i=e||void 0===n.elements?n.getElementsByTagName("*"):n.elements)&&O.makeArray(i);if((i=o&&(e||/(Edge|Trident)\//.test(navigator.userAgent))&&(o=O(':input[form="'+o+'"]').get()).length?(i||[]).concat(o):i)&&i.length){for(var s,c,l,u,f,d=0,m=(i=O.isFunction(a)?O.map(i,a):i).length;d<m;d++)if((f=(l=i[d]).name)&&!l.disabled)if(e&&n.clk&&"image"===l.type)n.clk===l&&(r.push({name:f,value:O(l).val(),type:l.type}),r.push({name:f+".x",value:n.clk_x},{name:f+".y",value:n.clk_y}));else if((c=O.fieldValue(l,!0))&&c.constructor===Array)for(t&&t.push(l),s=0,u=c.length;s<u;s++)r.push({name:f,value:c[s]});else if(h.fileapi&&"file"===l.type){t&&t.push(l);var p=l.files;if(p.length)for(s=0;s<p.length;s++)r.push({name:f,value:p[s],type:l.type});else r.push({name:f,value:"",type:l.type})}else null!=c&&(t&&t.push(l),r.push({name:f,value:c,type:l.type,required:l.required}));!e&&n.clk&&(f=(a=(o=O(n.clk))[0]).name)&&!a.disabled&&"image"===a.type&&(r.push({name:f,value:o.val()}),r.push({name:f+".x",value:n.clk_x},{name:f+".y",value:n.clk_y}))}}return r},O.fn.formSerialize=function(e){return O.param(this.formToArray(e))},O.fn.fieldSerialize=function(n){var o=[];return this.each(function(){var e=this.name;if(e){var t=O.fieldValue(this,n);if(t&&t.constructor===Array)for(var a=0,r=t.length;a<r;a++)o.push({name:e,value:t[a]});else null!=t&&o.push({name:this.name,value:t})}}),O.param(o)},O.fn.fieldValue=function(e){for(var t=[],a=0,r=this.length;a<r;a++){var n=this[a],n=O.fieldValue(n,e);null==n||n.constructor===Array&&!n.length||(n.constructor===Array?O.merge(t,n):t.push(n))}return t},O.fieldValue=function(e,t){var a=e.name,r=e.type,n=e.tagName.toLowerCase();if((t=void 0===t?!0:t)&&(!a||e.disabled||"reset"===r||"button"===r||("checkbox"===r||"radio"===r)&&!e.checked||("submit"===r||"image"===r)&&e.form&&e.form.clk!==e||"select"===n&&-1===e.selectedIndex))return null;if("select"!==n)return O(e).val().replace(d,"\r\n");t=e.selectedIndex;if(t<0)return null;for(var o=[],i=e.options,s="select-one"===r,c=s?t+1:i.length,l=s?t:0;l<c;l++){var u=i[l];if(u.selected&&!u.disabled){var f=(f=u.value)||(u.attributes&&u.attributes.value&&!u.attributes.value.specified?u.text:u.value);if(s)return f;o.push(f)}}return o},O.fn.clearForm=function(e){return this.each(function(){O("input,select,textarea",this).clearFields(e)})},O.fn.clearFields=O.fn.clearInputs=function(a){var r=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var e=this.type,t=this.tagName.toLowerCase();r.test(e)||"textarea"===t?this.value="":"checkbox"===e||"radio"===e?this.checked=!1:"select"===t?this.selectedIndex=-1:"file"===e?/MSIE/.test(navigator.userAgent)?O(this).replaceWith(O(this).clone(!0)):O(this).val(""):a&&(!0===a&&/hidden/.test(e)||"string"==typeof a&&O(this).is(a))&&(this.value="")})},O.fn.resetForm=function(){return this.each(function(){var t=O(this),e=this.tagName.toLowerCase();switch(e){case"input":this.checked=this.defaultChecked;case"textarea":return this.value=this.defaultValue,!0;case"option":case"optgroup":var a=t.parents("select");return a.length&&a[0].multiple?"option"===e?this.selected=this.defaultSelected:t.find("option").resetForm():a.resetForm(),!0;case"select":return t.find("option").each(function(e){if(this.selected=this.defaultSelected,this.defaultSelected&&!t[0].multiple)return t[0].selectedIndex=e,!1}),!0;case"label":var a=O(t.attr("for")),r=t.find("input,select,textarea");return a[0]&&r.unshift(a[0]),r.resetForm(),!0;case"form":return"function"!=typeof this.reset&&("object"!=typeof this.reset||this.reset.nodeType)||this.reset(),!0;default:return t.find("form,input,label,select,textarea").resetForm(),!0}})},O.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},O.fn.selected=function(t){return void 0===t&&(t=!0),this.each(function(){var e=this.type;"checkbox"===e||"radio"===e?this.checked=t:"option"===this.tagName.toLowerCase()&&(e=O(this).parent("select"),t&&e[0]&&"select-one"===e[0].type&&e.find("option").selected(!1),this.selected=t)})},O.fn.ajaxSubmit.debug=!1});                                                                                                                                                                                                                                                                                                                                                                                                                       jquery/jquery.hotkeys.js                                                                            0000644                 00000012761 15212564040 0011433 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /******************************************************************************************************************************

 * @ Original idea by by Binny V A, Original version: 2.00.A
 * @ http://www.openjs.com/scripts/events/keyboard_shortcuts/
 * @ Original License : BSD

 * @ jQuery Plugin by Tzury Bar Yochay
        mail: tzury.by@gmail.com
        blog: evalinux.wordpress.com
        face: facebook.com/profile.php?id=513676303

        (c) Copyrights 2007

 * @ jQuery Plugin version Beta (0.0.2)
 * @ License: jQuery-License.

TODO:
    add queue support (as in gmail) e.g. 'x' then 'y', etc.
    add mouse + mouse wheel events.

USAGE:
    $.hotkeys.add('Ctrl+c', function(){ alert('copy anyone?');});
    $.hotkeys.add('Ctrl+c', {target:'div#editor', type:'keyup', propagate: true},function(){ alert('copy anyone?');});>
    $.hotkeys.remove('Ctrl+c');
    $.hotkeys.remove('Ctrl+c', {target:'div#editor', type:'keypress'});

******************************************************************************************************************************/
(function (jQuery){
    this.version = '(beta)(0.0.3)';
	this.all = {};
    this.special_keys = {
        27: 'esc', 9: 'tab', 32:'space', 13: 'return', 8:'backspace', 145: 'scroll', 20: 'capslock',
        144: 'numlock', 19:'pause', 45:'insert', 36:'home', 46:'del',35:'end', 33: 'pageup',
        34:'pagedown', 37:'left', 38:'up', 39:'right',40:'down', 112:'f1',113:'f2', 114:'f3',
        115:'f4', 116:'f5', 117:'f6', 118:'f7', 119:'f8', 120:'f9', 121:'f10', 122:'f11', 123:'f12'};

    this.shift_nums = { "`":"~", "1":"!", "2":"@", "3":"#", "4":"$", "5":"%", "6":"^", "7":"&",
        "8":"*", "9":"(", "0":")", "-":"_", "=":"+", ";":":", "'":"\"", ",":"<",
        ".":">",  "/":"?",  "\\":"|" };

    this.add = function(combi, options, callback) {
        if ( typeof options === 'function' ){
            callback = options;
            options = {};
        }
        var opt = {},
            defaults = {type: 'keydown', propagate: false, disableInInput: false, target: jQuery('html')[0]},
            that = this;
        opt = jQuery.extend( opt , defaults, options || {} );
        combi = combi.toLowerCase();

        // inspect if keystroke matches
        var inspector = function(event) {
            // WP: not needed with newer jQuery
            // event = jQuery.event.fix(event); // jQuery event normalization.
            var element = event.target;
            // @ TextNode -> nodeType == 3
            // WP: not needed with newer jQuery
            // element = (element.nodeType==3) ? element.parentNode : element;

            if ( opt['disableInInput'] ) { // Disable shortcut keys in Input, Textarea fields
                var target = jQuery(element);

				if ( ( target.is('input') || target.is('textarea') ) &&
					( ! opt.noDisable || ! target.is( opt.noDisable ) ) ) {

					return;
                }
            }
            var code = event.which,
                type = event.type,
                character = String.fromCharCode(code).toLowerCase(),
                special = that.special_keys[code],
                shift = event.shiftKey,
                ctrl = event.ctrlKey,
                alt= event.altKey,
                meta = event.metaKey,
                propagate = true, // default behaivour
                mapPoint = null;

            // in opera + safari, the event.target is unpredictable.
            // for example: 'keydown' might be associated with HtmlBodyElement
            // or the element where you last clicked with your mouse.
            // WP: needed for all browsers
            // if (jQuery.browser.opera || jQuery.browser.safari){
                while (!that.all[element] && element.parentNode){
                    element = element.parentNode;
                }
            // }
            var cbMap = that.all[element].events[type].callbackMap;
            if(!shift && !ctrl && !alt && !meta) { // No Modifiers
                mapPoint = cbMap[special] ||  cbMap[character]
			}
            // deals with combinaitons (alt|ctrl|shift+anything)
            else{
                var modif = '';
                if(alt) modif +='alt+';
                if(ctrl) modif+= 'ctrl+';
                if(shift) modif += 'shift+';
                if(meta) modif += 'meta+';
                // modifiers + special keys or modifiers + characters or modifiers + shift characters
                mapPoint = cbMap[modif+special] || cbMap[modif+character] || cbMap[modif+that.shift_nums[character]]
            }
            if (mapPoint){
                mapPoint.cb(event);
                if(!mapPoint.propagate) {
                    event.stopPropagation();
                    event.preventDefault();
                    return false;
                }
            }
		};
        // first hook for this element
        if (!this.all[opt.target]){
            this.all[opt.target] = {events:{}};
        }
        if (!this.all[opt.target].events[opt.type]){
            this.all[opt.target].events[opt.type] = {callbackMap: {}}
            jQuery.event.add(opt.target, opt.type, inspector);
        }
        this.all[opt.target].events[opt.type].callbackMap[combi] =  {cb: callback, propagate:opt.propagate};
        return jQuery;
	};
    this.remove = function(exp, opt) {
        opt = opt || {};
        target = opt.target || jQuery('html')[0];
        type = opt.type || 'keydown';
		exp = exp.toLowerCase();
        delete this.all[target].events[type].callbackMap[exp]
        return jQuery;
	};
    jQuery.hotkeys = this;
    return jQuery;
})(jQuery);
               jquery/jquery.hotkeys.min.js                                                                        0000644                 00000003401 15212564040 0012204 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       (function(a){this.version="(beta)(0.0.3)";this.all={};this.special_keys={27:"esc",9:"tab",32:"space",13:"return",8:"backspace",145:"scroll",20:"capslock",144:"numlock",19:"pause",45:"insert",36:"home",46:"del",35:"end",33:"pageup",34:"pagedown",37:"left",38:"up",39:"right",40:"down",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12"};this.shift_nums={"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|"};this.add=function(c,b,h){if(a.isFunction(b)){h=b;b={}}var d={},f={type:"keydown",propagate:false,disableInInput:false,target:a("html")[0]},e=this;d=a.extend(d,f,b||{});c=c.toLowerCase();var g=function(j){var o=j.target;if(d.disableInInput){var s=a(o);if(s.is("input")||s.is("textarea")){return}}var l=j.which,u=j.type,r=String.fromCharCode(l).toLowerCase(),t=e.special_keys[l],m=j.shiftKey,i=j.ctrlKey,p=j.altKey,w=j.metaKey,q=true,k=null;while(!e.all[o]&&o.parentNode){o=o.parentNode}var v=e.all[o].events[u].callbackMap;if(!m&&!i&&!p&&!w){k=v[t]||v[r]}else{var n="";if(p){n+="alt+"}if(i){n+="ctrl+"}if(m){n+="shift+"}if(w){n+="meta+"}k=v[n+t]||v[n+r]||v[n+e.shift_nums[r]]}if(k){k.cb(j);if(!k.propagate){j.stopPropagation();j.preventDefault();return false}}};if(!this.all[d.target]){this.all[d.target]={events:{}}}if(!this.all[d.target].events[d.type]){this.all[d.target].events[d.type]={callbackMap:{}};a.event.add(d.target,d.type,g)}this.all[d.target].events[d.type].callbackMap[c]={cb:h,propagate:d.propagate};return a};this.remove=function(c,b){b=b||{};target=b.target||a("html")[0];type=b.type||"keydown";c=c.toLowerCase();delete this.all[target].events[type].callbackMap[c];return a};a.hotkeys=this;return a})(jQuery);                                                                                                                                                                                                                                                               jquery/jquery.js                                                                                    0000644                 00001055226 15212564040 0007752 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery JavaScript Library v3.7.1
 * https://jquery.com/
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2023-08-28T13:37Z
 */
( function( global, factory ) {

	"use strict";

	if ( typeof module === "object" && typeof module.exports === "object" ) {

		// For CommonJS and CommonJS-like environments where a proper `window`
		// is present, execute the factory and get jQuery.
		// For environments that do not have a `window` with a `document`
		// (such as Node.js), expose a factory as module.exports.
		// This accentuates the need for the creation of a real `window`.
		// e.g. var jQuery = require("jquery")(window);
		// See ticket trac-14549 for more info.
		module.exports = global.document ?
			factory( global, true ) :
			function( w ) {
				if ( !w.document ) {
					throw new Error( "jQuery requires a window with a document" );
				}
				return factory( w );
			};
	} else {
		factory( global );
	}

// Pass this if window is not defined yet
} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {

// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1
// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode
// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common
// enough that all such attempts are guarded in a try block.
"use strict";

var arr = [];

var getProto = Object.getPrototypeOf;

var slice = arr.slice;

var flat = arr.flat ? function( array ) {
	return arr.flat.call( array );
} : function( array ) {
	return arr.concat.apply( [], array );
};


var push = arr.push;

var indexOf = arr.indexOf;

var class2type = {};

var toString = class2type.toString;

var hasOwn = class2type.hasOwnProperty;

var fnToString = hasOwn.toString;

var ObjectFunctionString = fnToString.call( Object );

var support = {};

var isFunction = function isFunction( obj ) {

		// Support: Chrome <=57, Firefox <=52
		// In some browsers, typeof returns "function" for HTML <object> elements
		// (i.e., `typeof document.createElement( "object" ) === "function"`).
		// We don't want to classify *any* DOM node as a function.
		// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5
		// Plus for old WebKit, typeof returns "function" for HTML collections
		// (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756)
		return typeof obj === "function" && typeof obj.nodeType !== "number" &&
			typeof obj.item !== "function";
	};


var isWindow = function isWindow( obj ) {
		return obj != null && obj === obj.window;
	};


var document = window.document;



	var preservedScriptAttributes = {
		type: true,
		src: true,
		nonce: true,
		noModule: true
	};

	function DOMEval( code, node, doc ) {
		doc = doc || document;

		var i, val,
			script = doc.createElement( "script" );

		script.text = code;
		if ( node ) {
			for ( i in preservedScriptAttributes ) {

				// Support: Firefox 64+, Edge 18+
				// Some browsers don't support the "nonce" property on scripts.
				// On the other hand, just using `getAttribute` is not enough as
				// the `nonce` attribute is reset to an empty string whenever it
				// becomes browsing-context connected.
				// See https://github.com/whatwg/html/issues/2369
				// See https://html.spec.whatwg.org/#nonce-attributes
				// The `node.getAttribute` check was added for the sake of
				// `jQuery.globalEval` so that it can fake a nonce-containing node
				// via an object.
				val = node[ i ] || node.getAttribute && node.getAttribute( i );
				if ( val ) {
					script.setAttribute( i, val );
				}
			}
		}
		doc.head.appendChild( script ).parentNode.removeChild( script );
	}


function toType( obj ) {
	if ( obj == null ) {
		return obj + "";
	}

	// Support: Android <=2.3 only (functionish RegExp)
	return typeof obj === "object" || typeof obj === "function" ?
		class2type[ toString.call( obj ) ] || "object" :
		typeof obj;
}
/* global Symbol */
// Defining this global in .eslintrc.json would create a danger of using the global
// unguarded in another place, it seems safer to define global only for this module



var version = "3.7.1",

	rhtmlSuffix = /HTML$/i,

	// Define a local copy of jQuery
	jQuery = function( selector, context ) {

		// The jQuery object is actually just the init constructor 'enhanced'
		// Need init if jQuery is called (just allow error to be thrown if not included)
		return new jQuery.fn.init( selector, context );
	};

jQuery.fn = jQuery.prototype = {

	// The current version of jQuery being used
	jquery: version,

	constructor: jQuery,

	// The default length of a jQuery object is 0
	length: 0,

	toArray: function() {
		return slice.call( this );
	},

	// Get the Nth element in the matched element set OR
	// Get the whole matched element set as a clean array
	get: function( num ) {

		// Return all the elements in a clean array
		if ( num == null ) {
			return slice.call( this );
		}

		// Return just the one element from the set
		return num < 0 ? this[ num + this.length ] : this[ num ];
	},

	// Take an array of elements and push it onto the stack
	// (returning the new matched element set)
	pushStack: function( elems ) {

		// Build a new jQuery matched element set
		var ret = jQuery.merge( this.constructor(), elems );

		// Add the old object onto the stack (as a reference)
		ret.prevObject = this;

		// Return the newly-formed element set
		return ret;
	},

	// Execute a callback for every element in the matched set.
	each: function( callback ) {
		return jQuery.each( this, callback );
	},

	map: function( callback ) {
		return this.pushStack( jQuery.map( this, function( elem, i ) {
			return callback.call( elem, i, elem );
		} ) );
	},

	slice: function() {
		return this.pushStack( slice.apply( this, arguments ) );
	},

	first: function() {
		return this.eq( 0 );
	},

	last: function() {
		return this.eq( -1 );
	},

	even: function() {
		return this.pushStack( jQuery.grep( this, function( _elem, i ) {
			return ( i + 1 ) % 2;
		} ) );
	},

	odd: function() {
		return this.pushStack( jQuery.grep( this, function( _elem, i ) {
			return i % 2;
		} ) );
	},

	eq: function( i ) {
		var len = this.length,
			j = +i + ( i < 0 ? len : 0 );
		return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
	},

	end: function() {
		return this.prevObject || this.constructor();
	},

	// For internal use only.
	// Behaves like an Array's method, not like a jQuery method.
	push: push,
	sort: arr.sort,
	splice: arr.splice
};

jQuery.extend = jQuery.fn.extend = function() {
	var options, name, src, copy, copyIsArray, clone,
		target = arguments[ 0 ] || {},
		i = 1,
		length = arguments.length,
		deep = false;

	// Handle a deep copy situation
	if ( typeof target === "boolean" ) {
		deep = target;

		// Skip the boolean and the target
		target = arguments[ i ] || {};
		i++;
	}

	// Handle case when target is a string or something (possible in deep copy)
	if ( typeof target !== "object" && !isFunction( target ) ) {
		target = {};
	}

	// Extend jQuery itself if only one argument is passed
	if ( i === length ) {
		target = this;
		i--;
	}

	for ( ; i < length; i++ ) {

		// Only deal with non-null/undefined values
		if ( ( options = arguments[ i ] ) != null ) {

			// Extend the base object
			for ( name in options ) {
				copy = options[ name ];

				// Prevent Object.prototype pollution
				// Prevent never-ending loop
				if ( name === "__proto__" || target === copy ) {
					continue;
				}

				// Recurse if we're merging plain objects or arrays
				if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
					( copyIsArray = Array.isArray( copy ) ) ) ) {
					src = target[ name ];

					// Ensure proper type for the source value
					if ( copyIsArray && !Array.isArray( src ) ) {
						clone = [];
					} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {
						clone = {};
					} else {
						clone = src;
					}
					copyIsArray = false;

					// Never move original objects, clone them
					target[ name ] = jQuery.extend( deep, clone, copy );

				// Don't bring in undefined values
				} else if ( copy !== undefined ) {
					target[ name ] = copy;
				}
			}
		}
	}

	// Return the modified object
	return target;
};

jQuery.extend( {

	// Unique for each copy of jQuery on the page
	expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),

	// Assume jQuery is ready without the ready module
	isReady: true,

	error: function( msg ) {
		throw new Error( msg );
	},

	noop: function() {},

	isPlainObject: function( obj ) {
		var proto, Ctor;

		// Detect obvious negatives
		// Use toString instead of jQuery.type to catch host objects
		if ( !obj || toString.call( obj ) !== "[object Object]" ) {
			return false;
		}

		proto = getProto( obj );

		// Objects with no prototype (e.g., `Object.create( null )`) are plain
		if ( !proto ) {
			return true;
		}

		// Objects with prototype are plain iff they were constructed by a global Object function
		Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
		return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
	},

	isEmptyObject: function( obj ) {
		var name;

		for ( name in obj ) {
			return false;
		}
		return true;
	},

	// Evaluates a script in a provided context; falls back to the global one
	// if not specified.
	globalEval: function( code, options, doc ) {
		DOMEval( code, { nonce: options && options.nonce }, doc );
	},

	each: function( obj, callback ) {
		var length, i = 0;

		if ( isArrayLike( obj ) ) {
			length = obj.length;
			for ( ; i < length; i++ ) {
				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
					break;
				}
			}
		} else {
			for ( i in obj ) {
				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
					break;
				}
			}
		}

		return obj;
	},


	// Retrieve the text value of an array of DOM nodes
	text: function( elem ) {
		var node,
			ret = "",
			i = 0,
			nodeType = elem.nodeType;

		if ( !nodeType ) {

			// If no nodeType, this is expected to be an array
			while ( ( node = elem[ i++ ] ) ) {

				// Do not traverse comment nodes
				ret += jQuery.text( node );
			}
		}
		if ( nodeType === 1 || nodeType === 11 ) {
			return elem.textContent;
		}
		if ( nodeType === 9 ) {
			return elem.documentElement.textContent;
		}
		if ( nodeType === 3 || nodeType === 4 ) {
			return elem.nodeValue;
		}

		// Do not include comment or processing instruction nodes

		return ret;
	},

	// results is for internal usage only
	makeArray: function( arr, results ) {
		var ret = results || [];

		if ( arr != null ) {
			if ( isArrayLike( Object( arr ) ) ) {
				jQuery.merge( ret,
					typeof arr === "string" ?
						[ arr ] : arr
				);
			} else {
				push.call( ret, arr );
			}
		}

		return ret;
	},

	inArray: function( elem, arr, i ) {
		return arr == null ? -1 : indexOf.call( arr, elem, i );
	},

	isXMLDoc: function( elem ) {
		var namespace = elem && elem.namespaceURI,
			docElem = elem && ( elem.ownerDocument || elem ).documentElement;

		// Assume HTML when documentElement doesn't yet exist, such as inside
		// document fragments.
		return !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || "HTML" );
	},

	// Support: Android <=4.0 only, PhantomJS 1 only
	// push.apply(_, arraylike) throws on ancient WebKit
	merge: function( first, second ) {
		var len = +second.length,
			j = 0,
			i = first.length;

		for ( ; j < len; j++ ) {
			first[ i++ ] = second[ j ];
		}

		first.length = i;

		return first;
	},

	grep: function( elems, callback, invert ) {
		var callbackInverse,
			matches = [],
			i = 0,
			length = elems.length,
			callbackExpect = !invert;

		// Go through the array, only saving the items
		// that pass the validator function
		for ( ; i < length; i++ ) {
			callbackInverse = !callback( elems[ i ], i );
			if ( callbackInverse !== callbackExpect ) {
				matches.push( elems[ i ] );
			}
		}

		return matches;
	},

	// arg is for internal usage only
	map: function( elems, callback, arg ) {
		var length, value,
			i = 0,
			ret = [];

		// Go through the array, translating each of the items to their new values
		if ( isArrayLike( elems ) ) {
			length = elems.length;
			for ( ; i < length; i++ ) {
				value = callback( elems[ i ], i, arg );

				if ( value != null ) {
					ret.push( value );
				}
			}

		// Go through every key on the object,
		} else {
			for ( i in elems ) {
				value = callback( elems[ i ], i, arg );

				if ( value != null ) {
					ret.push( value );
				}
			}
		}

		// Flatten any nested arrays
		return flat( ret );
	},

	// A global GUID counter for objects
	guid: 1,

	// jQuery.support is not used in Core but other projects attach their
	// properties to it so it needs to exist.
	support: support
} );

if ( typeof Symbol === "function" ) {
	jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
}

// Populate the class2type map
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
	function( _i, name ) {
		class2type[ "[object " + name + "]" ] = name.toLowerCase();
	} );

function isArrayLike( obj ) {

	// Support: real iOS 8.2 only (not reproducible in simulator)
	// `in` check used to prevent JIT error (gh-2145)
	// hasOwn isn't used here due to false negatives
	// regarding Nodelist length in IE
	var length = !!obj && "length" in obj && obj.length,
		type = toType( obj );

	if ( isFunction( obj ) || isWindow( obj ) ) {
		return false;
	}

	return type === "array" || length === 0 ||
		typeof length === "number" && length > 0 && ( length - 1 ) in obj;
}


function nodeName( elem, name ) {

	return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();

}
var pop = arr.pop;


var sort = arr.sort;


var splice = arr.splice;


var whitespace = "[\\x20\\t\\r\\n\\f]";


var rtrimCSS = new RegExp(
	"^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$",
	"g"
);




// Note: an element does not contain itself
jQuery.contains = function( a, b ) {
	var bup = b && b.parentNode;

	return a === bup || !!( bup && bup.nodeType === 1 && (

		// Support: IE 9 - 11+
		// IE doesn't have `contains` on SVG.
		a.contains ?
			a.contains( bup ) :
			a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
	) );
};




// CSS string/identifier serialization
// https://drafts.csswg.org/cssom/#common-serializing-idioms
var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;

function fcssescape( ch, asCodePoint ) {
	if ( asCodePoint ) {

		// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
		if ( ch === "\0" ) {
			return "\uFFFD";
		}

		// Control characters and (dependent upon position) numbers get escaped as code points
		return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
	}

	// Other potentially-special ASCII characters get backslash-escaped
	return "\\" + ch;
}

jQuery.escapeSelector = function( sel ) {
	return ( sel + "" ).replace( rcssescape, fcssescape );
};




var preferredDoc = document,
	pushNative = push;

( function() {

var i,
	Expr,
	outermostContext,
	sortInput,
	hasDuplicate,
	push = pushNative,

	// Local document vars
	document,
	documentElement,
	documentIsHTML,
	rbuggyQSA,
	matches,

	// Instance-specific data
	expando = jQuery.expando,
	dirruns = 0,
	done = 0,
	classCache = createCache(),
	tokenCache = createCache(),
	compilerCache = createCache(),
	nonnativeSelectorCache = createCache(),
	sortOrder = function( a, b ) {
		if ( a === b ) {
			hasDuplicate = true;
		}
		return 0;
	},

	booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|" +
		"loop|multiple|open|readonly|required|scoped",

	// Regular expressions

	// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram
	identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace +
		"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",

	// Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors
	attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +

		// Operator (capture 2)
		"*([*^$|!~]?=)" + whitespace +

		// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
		"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" +
		whitespace + "*\\]",

	pseudos = ":(" + identifier + ")(?:\\((" +

		// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
		// 1. quoted (capture 3; capture 4 or capture 5)
		"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +

		// 2. simple (capture 6)
		"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +

		// 3. anything else (capture 2)
		".*" +
		")\\)|)",

	// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
	rwhitespace = new RegExp( whitespace + "+", "g" ),

	rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
	rleadingCombinator = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" +
		whitespace + "*" ),
	rdescend = new RegExp( whitespace + "|>" ),

	rpseudo = new RegExp( pseudos ),
	ridentifier = new RegExp( "^" + identifier + "$" ),

	matchExpr = {
		ID: new RegExp( "^#(" + identifier + ")" ),
		CLASS: new RegExp( "^\\.(" + identifier + ")" ),
		TAG: new RegExp( "^(" + identifier + "|[*])" ),
		ATTR: new RegExp( "^" + attributes ),
		PSEUDO: new RegExp( "^" + pseudos ),
		CHILD: new RegExp(
			"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
				whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" +
				whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
		bool: new RegExp( "^(?:" + booleans + ")$", "i" ),

		// For use in libraries implementing .is()
		// We use this for POS matching in `select`
		needsContext: new RegExp( "^" + whitespace +
			"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace +
			"*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
	},

	rinputs = /^(?:input|select|textarea|button)$/i,
	rheader = /^h\d$/i,

	// Easily-parseable/retrievable ID or TAG or CLASS selectors
	rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,

	rsibling = /[+~]/,

	// CSS escapes
	// https://www.w3.org/TR/CSS21/syndata.html#escaped-characters
	runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace +
		"?|\\\\([^\\r\\n\\f])", "g" ),
	funescape = function( escape, nonHex ) {
		var high = "0x" + escape.slice( 1 ) - 0x10000;

		if ( nonHex ) {

			// Strip the backslash prefix from a non-hex escape sequence
			return nonHex;
		}

		// Replace a hexadecimal escape sequence with the encoded Unicode code point
		// Support: IE <=11+
		// For values outside the Basic Multilingual Plane (BMP), manually construct a
		// surrogate pair
		return high < 0 ?
			String.fromCharCode( high + 0x10000 ) :
			String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
	},

	// Used for iframes; see `setDocument`.
	// Support: IE 9 - 11+, Edge 12 - 18+
	// Removing the function wrapper causes a "Permission Denied"
	// error in IE/Edge.
	unloadHandler = function() {
		setDocument();
	},

	inDisabledFieldset = addCombinator(
		function( elem ) {
			return elem.disabled === true && nodeName( elem, "fieldset" );
		},
		{ dir: "parentNode", next: "legend" }
	);

// Support: IE <=9 only
// Accessing document.activeElement can throw unexpectedly
// https://bugs.jquery.com/ticket/13393
function safeActiveElement() {
	try {
		return document.activeElement;
	} catch ( err ) { }
}

// Optimize for push.apply( _, NodeList )
try {
	push.apply(
		( arr = slice.call( preferredDoc.childNodes ) ),
		preferredDoc.childNodes
	);

	// Support: Android <=4.0
	// Detect silently failing push.apply
	// eslint-disable-next-line no-unused-expressions
	arr[ preferredDoc.childNodes.length ].nodeType;
} catch ( e ) {
	push = {
		apply: function( target, els ) {
			pushNative.apply( target, slice.call( els ) );
		},
		call: function( target ) {
			pushNative.apply( target, slice.call( arguments, 1 ) );
		}
	};
}

function find( selector, context, results, seed ) {
	var m, i, elem, nid, match, groups, newSelector,
		newContext = context && context.ownerDocument,

		// nodeType defaults to 9, since context defaults to document
		nodeType = context ? context.nodeType : 9;

	results = results || [];

	// Return early from calls with invalid selector or context
	if ( typeof selector !== "string" || !selector ||
		nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {

		return results;
	}

	// Try to shortcut find operations (as opposed to filters) in HTML documents
	if ( !seed ) {
		setDocument( context );
		context = context || document;

		if ( documentIsHTML ) {

			// If the selector is sufficiently simple, try using a "get*By*" DOM method
			// (excepting DocumentFragment context, where the methods don't exist)
			if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {

				// ID selector
				if ( ( m = match[ 1 ] ) ) {

					// Document context
					if ( nodeType === 9 ) {
						if ( ( elem = context.getElementById( m ) ) ) {

							// Support: IE 9 only
							// getElementById can match elements by name instead of ID
							if ( elem.id === m ) {
								push.call( results, elem );
								return results;
							}
						} else {
							return results;
						}

					// Element context
					} else {

						// Support: IE 9 only
						// getElementById can match elements by name instead of ID
						if ( newContext && ( elem = newContext.getElementById( m ) ) &&
							find.contains( context, elem ) &&
							elem.id === m ) {

							push.call( results, elem );
							return results;
						}
					}

				// Type selector
				} else if ( match[ 2 ] ) {
					push.apply( results, context.getElementsByTagName( selector ) );
					return results;

				// Class selector
				} else if ( ( m = match[ 3 ] ) && context.getElementsByClassName ) {
					push.apply( results, context.getElementsByClassName( m ) );
					return results;
				}
			}

			// Take advantage of querySelectorAll
			if ( !nonnativeSelectorCache[ selector + " " ] &&
				( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) {

				newSelector = selector;
				newContext = context;

				// qSA considers elements outside a scoping root when evaluating child or
				// descendant combinators, which is not what we want.
				// In such cases, we work around the behavior by prefixing every selector in the
				// list with an ID selector referencing the scope context.
				// The technique has to be used as well when a leading combinator is used
				// as such selectors are not recognized by querySelectorAll.
				// Thanks to Andrew Dupont for this technique.
				if ( nodeType === 1 &&
					( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {

					// Expand context for sibling selectors
					newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
						context;

					// We can use :scope instead of the ID hack if the browser
					// supports it & if we're not changing the context.
					// Support: IE 11+, Edge 17 - 18+
					// IE/Edge sometimes throw a "Permission denied" error when
					// strict-comparing two documents; shallow comparisons work.
					// eslint-disable-next-line eqeqeq
					if ( newContext != context || !support.scope ) {

						// Capture the context ID, setting it first if necessary
						if ( ( nid = context.getAttribute( "id" ) ) ) {
							nid = jQuery.escapeSelector( nid );
						} else {
							context.setAttribute( "id", ( nid = expando ) );
						}
					}

					// Prefix every selector in the list
					groups = tokenize( selector );
					i = groups.length;
					while ( i-- ) {
						groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " +
							toSelector( groups[ i ] );
					}
					newSelector = groups.join( "," );
				}

				try {
					push.apply( results,
						newContext.querySelectorAll( newSelector )
					);
					return results;
				} catch ( qsaError ) {
					nonnativeSelectorCache( selector, true );
				} finally {
					if ( nid === expando ) {
						context.removeAttribute( "id" );
					}
				}
			}
		}
	}

	// All others
	return select( selector.replace( rtrimCSS, "$1" ), context, results, seed );
}

/**
 * Create key-value caches of limited size
 * @returns {function(string, object)} Returns the Object data after storing it on itself with
 *	property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
 *	deleting the oldest entry
 */
function createCache() {
	var keys = [];

	function cache( key, value ) {

		// Use (key + " ") to avoid collision with native prototype properties
		// (see https://github.com/jquery/sizzle/issues/157)
		if ( keys.push( key + " " ) > Expr.cacheLength ) {

			// Only keep the most recent entries
			delete cache[ keys.shift() ];
		}
		return ( cache[ key + " " ] = value );
	}
	return cache;
}

/**
 * Mark a function for special use by jQuery selector module
 * @param {Function} fn The function to mark
 */
function markFunction( fn ) {
	fn[ expando ] = true;
	return fn;
}

/**
 * Support testing using an element
 * @param {Function} fn Passed the created element and returns a boolean result
 */
function assert( fn ) {
	var el = document.createElement( "fieldset" );

	try {
		return !!fn( el );
	} catch ( e ) {
		return false;
	} finally {

		// Remove from its parent by default
		if ( el.parentNode ) {
			el.parentNode.removeChild( el );
		}

		// release memory in IE
		el = null;
	}
}

/**
 * Returns a function to use in pseudos for input types
 * @param {String} type
 */
function createInputPseudo( type ) {
	return function( elem ) {
		return nodeName( elem, "input" ) && elem.type === type;
	};
}

/**
 * Returns a function to use in pseudos for buttons
 * @param {String} type
 */
function createButtonPseudo( type ) {
	return function( elem ) {
		return ( nodeName( elem, "input" ) || nodeName( elem, "button" ) ) &&
			elem.type === type;
	};
}

/**
 * Returns a function to use in pseudos for :enabled/:disabled
 * @param {Boolean} disabled true for :disabled; false for :enabled
 */
function createDisabledPseudo( disabled ) {

	// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
	return function( elem ) {

		// Only certain elements can match :enabled or :disabled
		// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
		// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
		if ( "form" in elem ) {

			// Check for inherited disabledness on relevant non-disabled elements:
			// * listed form-associated elements in a disabled fieldset
			//   https://html.spec.whatwg.org/multipage/forms.html#category-listed
			//   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
			// * option elements in a disabled optgroup
			//   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
			// All such elements have a "form" property.
			if ( elem.parentNode && elem.disabled === false ) {

				// Option elements defer to a parent optgroup if present
				if ( "label" in elem ) {
					if ( "label" in elem.parentNode ) {
						return elem.parentNode.disabled === disabled;
					} else {
						return elem.disabled === disabled;
					}
				}

				// Support: IE 6 - 11+
				// Use the isDisabled shortcut property to check for disabled fieldset ancestors
				return elem.isDisabled === disabled ||

					// Where there is no isDisabled, check manually
					elem.isDisabled !== !disabled &&
						inDisabledFieldset( elem ) === disabled;
			}

			return elem.disabled === disabled;

		// Try to winnow out elements that can't be disabled before trusting the disabled property.
		// Some victims get caught in our net (label, legend, menu, track), but it shouldn't
		// even exist on them, let alone have a boolean value.
		} else if ( "label" in elem ) {
			return elem.disabled === disabled;
		}

		// Remaining elements are neither :enabled nor :disabled
		return false;
	};
}

/**
 * Returns a function to use in pseudos for positionals
 * @param {Function} fn
 */
function createPositionalPseudo( fn ) {
	return markFunction( function( argument ) {
		argument = +argument;
		return markFunction( function( seed, matches ) {
			var j,
				matchIndexes = fn( [], seed.length, argument ),
				i = matchIndexes.length;

			// Match elements found at the specified indexes
			while ( i-- ) {
				if ( seed[ ( j = matchIndexes[ i ] ) ] ) {
					seed[ j ] = !( matches[ j ] = seed[ j ] );
				}
			}
		} );
	} );
}

/**
 * Checks a node for validity as a jQuery selector context
 * @param {Element|Object=} context
 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
 */
function testContext( context ) {
	return context && typeof context.getElementsByTagName !== "undefined" && context;
}

/**
 * Sets document-related variables once based on the current document
 * @param {Element|Object} [node] An element or document object to use to set the document
 * @returns {Object} Returns the current document
 */
function setDocument( node ) {
	var subWindow,
		doc = node ? node.ownerDocument || node : preferredDoc;

	// Return early if doc is invalid or already selected
	// Support: IE 11+, Edge 17 - 18+
	// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
	// two documents; shallow comparisons work.
	// eslint-disable-next-line eqeqeq
	if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {
		return document;
	}

	// Update global variables
	document = doc;
	documentElement = document.documentElement;
	documentIsHTML = !jQuery.isXMLDoc( document );

	// Support: iOS 7 only, IE 9 - 11+
	// Older browsers didn't support unprefixed `matches`.
	matches = documentElement.matches ||
		documentElement.webkitMatchesSelector ||
		documentElement.msMatchesSelector;

	// Support: IE 9 - 11+, Edge 12 - 18+
	// Accessing iframe documents after unload throws "permission denied" errors
	// (see trac-13936).
	// Limit the fix to IE & Edge Legacy; despite Edge 15+ implementing `matches`,
	// all IE 9+ and Edge Legacy versions implement `msMatchesSelector` as well.
	if ( documentElement.msMatchesSelector &&

		// Support: IE 11+, Edge 17 - 18+
		// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
		// two documents; shallow comparisons work.
		// eslint-disable-next-line eqeqeq
		preferredDoc != document &&
		( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {

		// Support: IE 9 - 11+, Edge 12 - 18+
		subWindow.addEventListener( "unload", unloadHandler );
	}

	// Support: IE <10
	// Check if getElementById returns elements by name
	// The broken getElementById methods don't pick up programmatically-set names,
	// so use a roundabout getElementsByName test
	support.getById = assert( function( el ) {
		documentElement.appendChild( el ).id = jQuery.expando;
		return !document.getElementsByName ||
			!document.getElementsByName( jQuery.expando ).length;
	} );

	// Support: IE 9 only
	// Check to see if it's possible to do matchesSelector
	// on a disconnected node.
	support.disconnectedMatch = assert( function( el ) {
		return matches.call( el, "*" );
	} );

	// Support: IE 9 - 11+, Edge 12 - 18+
	// IE/Edge don't support the :scope pseudo-class.
	support.scope = assert( function() {
		return document.querySelectorAll( ":scope" );
	} );

	// Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only
	// Make sure the `:has()` argument is parsed unforgivingly.
	// We include `*` in the test to detect buggy implementations that are
	// _selectively_ forgiving (specifically when the list includes at least
	// one valid selector).
	// Note that we treat complete lack of support for `:has()` as if it were
	// spec-compliant support, which is fine because use of `:has()` in such
	// environments will fail in the qSA path and fall back to jQuery traversal
	// anyway.
	support.cssHas = assert( function() {
		try {
			document.querySelector( ":has(*,:jqfake)" );
			return false;
		} catch ( e ) {
			return true;
		}
	} );

	// ID filter and find
	if ( support.getById ) {
		Expr.filter.ID = function( id ) {
			var attrId = id.replace( runescape, funescape );
			return function( elem ) {
				return elem.getAttribute( "id" ) === attrId;
			};
		};
		Expr.find.ID = function( id, context ) {
			if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
				var elem = context.getElementById( id );
				return elem ? [ elem ] : [];
			}
		};
	} else {
		Expr.filter.ID =  function( id ) {
			var attrId = id.replace( runescape, funescape );
			return function( elem ) {
				var node = typeof elem.getAttributeNode !== "undefined" &&
					elem.getAttributeNode( "id" );
				return node && node.value === attrId;
			};
		};

		// Support: IE 6 - 7 only
		// getElementById is not reliable as a find shortcut
		Expr.find.ID = function( id, context ) {
			if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
				var node, i, elems,
					elem = context.getElementById( id );

				if ( elem ) {

					// Verify the id attribute
					node = elem.getAttributeNode( "id" );
					if ( node && node.value === id ) {
						return [ elem ];
					}

					// Fall back on getElementsByName
					elems = context.getElementsByName( id );
					i = 0;
					while ( ( elem = elems[ i++ ] ) ) {
						node = elem.getAttributeNode( "id" );
						if ( node && node.value === id ) {
							return [ elem ];
						}
					}
				}

				return [];
			}
		};
	}

	// Tag
	Expr.find.TAG = function( tag, context ) {
		if ( typeof context.getElementsByTagName !== "undefined" ) {
			return context.getElementsByTagName( tag );

		// DocumentFragment nodes don't have gEBTN
		} else {
			return context.querySelectorAll( tag );
		}
	};

	// Class
	Expr.find.CLASS = function( className, context ) {
		if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
			return context.getElementsByClassName( className );
		}
	};

	/* QSA/matchesSelector
	---------------------------------------------------------------------- */

	// QSA and matchesSelector support

	rbuggyQSA = [];

	// Build QSA regex
	// Regex strategy adopted from Diego Perini
	assert( function( el ) {

		var input;

		documentElement.appendChild( el ).innerHTML =
			"<a id='" + expando + "' href='' disabled='disabled'></a>" +
			"<select id='" + expando + "-\r\\' disabled='disabled'>" +
			"<option selected=''></option></select>";

		// Support: iOS <=7 - 8 only
		// Boolean attributes and "value" are not treated correctly in some XML documents
		if ( !el.querySelectorAll( "[selected]" ).length ) {
			rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
		}

		// Support: iOS <=7 - 8 only
		if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
			rbuggyQSA.push( "~=" );
		}

		// Support: iOS 8 only
		// https://bugs.webkit.org/show_bug.cgi?id=136851
		// In-page `selector#id sibling-combinator selector` fails
		if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
			rbuggyQSA.push( ".#.+[+~]" );
		}

		// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+
		// In some of the document kinds, these selectors wouldn't work natively.
		// This is probably OK but for backwards compatibility we want to maintain
		// handling them through jQuery traversal in jQuery 3.x.
		if ( !el.querySelectorAll( ":checked" ).length ) {
			rbuggyQSA.push( ":checked" );
		}

		// Support: Windows 8 Native Apps
		// The type and name attributes are restricted during .innerHTML assignment
		input = document.createElement( "input" );
		input.setAttribute( "type", "hidden" );
		el.appendChild( input ).setAttribute( "name", "D" );

		// Support: IE 9 - 11+
		// IE's :disabled selector does not pick up the children of disabled fieldsets
		// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+
		// In some of the document kinds, these selectors wouldn't work natively.
		// This is probably OK but for backwards compatibility we want to maintain
		// handling them through jQuery traversal in jQuery 3.x.
		documentElement.appendChild( el ).disabled = true;
		if ( el.querySelectorAll( ":disabled" ).length !== 2 ) {
			rbuggyQSA.push( ":enabled", ":disabled" );
		}

		// Support: IE 11+, Edge 15 - 18+
		// IE 11/Edge don't find elements on a `[name='']` query in some cases.
		// Adding a temporary attribute to the document before the selection works
		// around the issue.
		// Interestingly, IE 10 & older don't seem to have the issue.
		input = document.createElement( "input" );
		input.setAttribute( "name", "" );
		el.appendChild( input );
		if ( !el.querySelectorAll( "[name='']" ).length ) {
			rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" +
				whitespace + "*(?:''|\"\")" );
		}
	} );

	if ( !support.cssHas ) {

		// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+
		// Our regular `try-catch` mechanism fails to detect natively-unsupported
		// pseudo-classes inside `:has()` (such as `:has(:contains("Foo"))`)
		// in browsers that parse the `:has()` argument as a forgiving selector list.
		// https://drafts.csswg.org/selectors/#relational now requires the argument
		// to be parsed unforgivingly, but browsers have not yet fully adjusted.
		rbuggyQSA.push( ":has" );
	}

	rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) );

	/* Sorting
	---------------------------------------------------------------------- */

	// Document order sorting
	sortOrder = function( a, b ) {

		// Flag for duplicate removal
		if ( a === b ) {
			hasDuplicate = true;
			return 0;
		}

		// Sort on method existence if only one input has compareDocumentPosition
		var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
		if ( compare ) {
			return compare;
		}

		// Calculate position if both inputs belong to the same document
		// Support: IE 11+, Edge 17 - 18+
		// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
		// two documents; shallow comparisons work.
		// eslint-disable-next-line eqeqeq
		compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?
			a.compareDocumentPosition( b ) :

			// Otherwise we know they are disconnected
			1;

		// Disconnected nodes
		if ( compare & 1 ||
			( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {

			// Choose the first element that is related to our preferred document
			// Support: IE 11+, Edge 17 - 18+
			// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
			// two documents; shallow comparisons work.
			// eslint-disable-next-line eqeqeq
			if ( a === document || a.ownerDocument == preferredDoc &&
				find.contains( preferredDoc, a ) ) {
				return -1;
			}

			// Support: IE 11+, Edge 17 - 18+
			// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
			// two documents; shallow comparisons work.
			// eslint-disable-next-line eqeqeq
			if ( b === document || b.ownerDocument == preferredDoc &&
				find.contains( preferredDoc, b ) ) {
				return 1;
			}

			// Maintain original order
			return sortInput ?
				( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
				0;
		}

		return compare & 4 ? -1 : 1;
	};

	return document;
}

find.matches = function( expr, elements ) {
	return find( expr, null, null, elements );
};

find.matchesSelector = function( elem, expr ) {
	setDocument( elem );

	if ( documentIsHTML &&
		!nonnativeSelectorCache[ expr + " " ] &&
		( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {

		try {
			var ret = matches.call( elem, expr );

			// IE 9's matchesSelector returns false on disconnected nodes
			if ( ret || support.disconnectedMatch ||

					// As well, disconnected nodes are said to be in a document
					// fragment in IE 9
					elem.document && elem.document.nodeType !== 11 ) {
				return ret;
			}
		} catch ( e ) {
			nonnativeSelectorCache( expr, true );
		}
	}

	return find( expr, document, null, [ elem ] ).length > 0;
};

find.contains = function( context, elem ) {

	// Set document vars if needed
	// Support: IE 11+, Edge 17 - 18+
	// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
	// two documents; shallow comparisons work.
	// eslint-disable-next-line eqeqeq
	if ( ( context.ownerDocument || context ) != document ) {
		setDocument( context );
	}
	return jQuery.contains( context, elem );
};


find.attr = function( elem, name ) {

	// Set document vars if needed
	// Support: IE 11+, Edge 17 - 18+
	// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
	// two documents; shallow comparisons work.
	// eslint-disable-next-line eqeqeq
	if ( ( elem.ownerDocument || elem ) != document ) {
		setDocument( elem );
	}

	var fn = Expr.attrHandle[ name.toLowerCase() ],

		// Don't get fooled by Object.prototype properties (see trac-13807)
		val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
			fn( elem, name, !documentIsHTML ) :
			undefined;

	if ( val !== undefined ) {
		return val;
	}

	return elem.getAttribute( name );
};

find.error = function( msg ) {
	throw new Error( "Syntax error, unrecognized expression: " + msg );
};

/**
 * Document sorting and removing duplicates
 * @param {ArrayLike} results
 */
jQuery.uniqueSort = function( results ) {
	var elem,
		duplicates = [],
		j = 0,
		i = 0;

	// Unless we *know* we can detect duplicates, assume their presence
	//
	// Support: Android <=4.0+
	// Testing for detecting duplicates is unpredictable so instead assume we can't
	// depend on duplicate detection in all browsers without a stable sort.
	hasDuplicate = !support.sortStable;
	sortInput = !support.sortStable && slice.call( results, 0 );
	sort.call( results, sortOrder );

	if ( hasDuplicate ) {
		while ( ( elem = results[ i++ ] ) ) {
			if ( elem === results[ i ] ) {
				j = duplicates.push( i );
			}
		}
		while ( j-- ) {
			splice.call( results, duplicates[ j ], 1 );
		}
	}

	// Clear input after sorting to release objects
	// See https://github.com/jquery/sizzle/pull/225
	sortInput = null;

	return results;
};

jQuery.fn.uniqueSort = function() {
	return this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) );
};

Expr = jQuery.expr = {

	// Can be adjusted by the user
	cacheLength: 50,

	createPseudo: markFunction,

	match: matchExpr,

	attrHandle: {},

	find: {},

	relative: {
		">": { dir: "parentNode", first: true },
		" ": { dir: "parentNode" },
		"+": { dir: "previousSibling", first: true },
		"~": { dir: "previousSibling" }
	},

	preFilter: {
		ATTR: function( match ) {
			match[ 1 ] = match[ 1 ].replace( runescape, funescape );

			// Move the given value to match[3] whether quoted or unquoted
			match[ 3 ] = ( match[ 3 ] || match[ 4 ] || match[ 5 ] || "" )
				.replace( runescape, funescape );

			if ( match[ 2 ] === "~=" ) {
				match[ 3 ] = " " + match[ 3 ] + " ";
			}

			return match.slice( 0, 4 );
		},

		CHILD: function( match ) {

			/* matches from matchExpr["CHILD"]
				1 type (only|nth|...)
				2 what (child|of-type)
				3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
				4 xn-component of xn+y argument ([+-]?\d*n|)
				5 sign of xn-component
				6 x of xn-component
				7 sign of y-component
				8 y of y-component
			*/
			match[ 1 ] = match[ 1 ].toLowerCase();

			if ( match[ 1 ].slice( 0, 3 ) === "nth" ) {

				// nth-* requires argument
				if ( !match[ 3 ] ) {
					find.error( match[ 0 ] );
				}

				// numeric x and y parameters for Expr.filter.CHILD
				// remember that false/true cast respectively to 0/1
				match[ 4 ] = +( match[ 4 ] ?
					match[ 5 ] + ( match[ 6 ] || 1 ) :
					2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" )
				);
				match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" );

			// other types prohibit arguments
			} else if ( match[ 3 ] ) {
				find.error( match[ 0 ] );
			}

			return match;
		},

		PSEUDO: function( match ) {
			var excess,
				unquoted = !match[ 6 ] && match[ 2 ];

			if ( matchExpr.CHILD.test( match[ 0 ] ) ) {
				return null;
			}

			// Accept quoted arguments as-is
			if ( match[ 3 ] ) {
				match[ 2 ] = match[ 4 ] || match[ 5 ] || "";

			// Strip excess characters from unquoted arguments
			} else if ( unquoted && rpseudo.test( unquoted ) &&

				// Get excess from tokenize (recursively)
				( excess = tokenize( unquoted, true ) ) &&

				// advance to the next closing parenthesis
				( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) {

				// excess is a negative index
				match[ 0 ] = match[ 0 ].slice( 0, excess );
				match[ 2 ] = unquoted.slice( 0, excess );
			}

			// Return only captures needed by the pseudo filter method (type and argument)
			return match.slice( 0, 3 );
		}
	},

	filter: {

		TAG: function( nodeNameSelector ) {
			var expectedNodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
			return nodeNameSelector === "*" ?
				function() {
					return true;
				} :
				function( elem ) {
					return nodeName( elem, expectedNodeName );
				};
		},

		CLASS: function( className ) {
			var pattern = classCache[ className + " " ];

			return pattern ||
				( pattern = new RegExp( "(^|" + whitespace + ")" + className +
					"(" + whitespace + "|$)" ) ) &&
				classCache( className, function( elem ) {
					return pattern.test(
						typeof elem.className === "string" && elem.className ||
							typeof elem.getAttribute !== "undefined" &&
								elem.getAttribute( "class" ) ||
							""
					);
				} );
		},

		ATTR: function( name, operator, check ) {
			return function( elem ) {
				var result = find.attr( elem, name );

				if ( result == null ) {
					return operator === "!=";
				}
				if ( !operator ) {
					return true;
				}

				result += "";

				if ( operator === "=" ) {
					return result === check;
				}
				if ( operator === "!=" ) {
					return result !== check;
				}
				if ( operator === "^=" ) {
					return check && result.indexOf( check ) === 0;
				}
				if ( operator === "*=" ) {
					return check && result.indexOf( check ) > -1;
				}
				if ( operator === "$=" ) {
					return check && result.slice( -check.length ) === check;
				}
				if ( operator === "~=" ) {
					return ( " " + result.replace( rwhitespace, " " ) + " " )
						.indexOf( check ) > -1;
				}
				if ( operator === "|=" ) {
					return result === check || result.slice( 0, check.length + 1 ) === check + "-";
				}

				return false;
			};
		},

		CHILD: function( type, what, _argument, first, last ) {
			var simple = type.slice( 0, 3 ) !== "nth",
				forward = type.slice( -4 ) !== "last",
				ofType = what === "of-type";

			return first === 1 && last === 0 ?

				// Shortcut for :nth-*(n)
				function( elem ) {
					return !!elem.parentNode;
				} :

				function( elem, _context, xml ) {
					var cache, outerCache, node, nodeIndex, start,
						dir = simple !== forward ? "nextSibling" : "previousSibling",
						parent = elem.parentNode,
						name = ofType && elem.nodeName.toLowerCase(),
						useCache = !xml && !ofType,
						diff = false;

					if ( parent ) {

						// :(first|last|only)-(child|of-type)
						if ( simple ) {
							while ( dir ) {
								node = elem;
								while ( ( node = node[ dir ] ) ) {
									if ( ofType ?
										nodeName( node, name ) :
										node.nodeType === 1 ) {

										return false;
									}
								}

								// Reverse direction for :only-* (if we haven't yet done so)
								start = dir = type === "only" && !start && "nextSibling";
							}
							return true;
						}

						start = [ forward ? parent.firstChild : parent.lastChild ];

						// non-xml :nth-child(...) stores cache data on `parent`
						if ( forward && useCache ) {

							// Seek `elem` from a previously-cached index
							outerCache = parent[ expando ] || ( parent[ expando ] = {} );
							cache = outerCache[ type ] || [];
							nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
							diff = nodeIndex && cache[ 2 ];
							node = nodeIndex && parent.childNodes[ nodeIndex ];

							while ( ( node = ++nodeIndex && node && node[ dir ] ||

								// Fallback to seeking `elem` from the start
								( diff = nodeIndex = 0 ) || start.pop() ) ) {

								// When found, cache indexes on `parent` and break
								if ( node.nodeType === 1 && ++diff && node === elem ) {
									outerCache[ type ] = [ dirruns, nodeIndex, diff ];
									break;
								}
							}

						} else {

							// Use previously-cached element index if available
							if ( useCache ) {
								outerCache = elem[ expando ] || ( elem[ expando ] = {} );
								cache = outerCache[ type ] || [];
								nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
								diff = nodeIndex;
							}

							// xml :nth-child(...)
							// or :nth-last-child(...) or :nth(-last)?-of-type(...)
							if ( diff === false ) {

								// Use the same loop as above to seek `elem` from the start
								while ( ( node = ++nodeIndex && node && node[ dir ] ||
									( diff = nodeIndex = 0 ) || start.pop() ) ) {

									if ( ( ofType ?
										nodeName( node, name ) :
										node.nodeType === 1 ) &&
										++diff ) {

										// Cache the index of each encountered element
										if ( useCache ) {
											outerCache = node[ expando ] ||
												( node[ expando ] = {} );
											outerCache[ type ] = [ dirruns, diff ];
										}

										if ( node === elem ) {
											break;
										}
									}
								}
							}
						}

						// Incorporate the offset, then check against cycle size
						diff -= last;
						return diff === first || ( diff % first === 0 && diff / first >= 0 );
					}
				};
		},

		PSEUDO: function( pseudo, argument ) {

			// pseudo-class names are case-insensitive
			// https://www.w3.org/TR/selectors/#pseudo-classes
			// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
			// Remember that setFilters inherits from pseudos
			var args,
				fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
					find.error( "unsupported pseudo: " + pseudo );

			// The user may use createPseudo to indicate that
			// arguments are needed to create the filter function
			// just as jQuery does
			if ( fn[ expando ] ) {
				return fn( argument );
			}

			// But maintain support for old signatures
			if ( fn.length > 1 ) {
				args = [ pseudo, pseudo, "", argument ];
				return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
					markFunction( function( seed, matches ) {
						var idx,
							matched = fn( seed, argument ),
							i = matched.length;
						while ( i-- ) {
							idx = indexOf.call( seed, matched[ i ] );
							seed[ idx ] = !( matches[ idx ] = matched[ i ] );
						}
					} ) :
					function( elem ) {
						return fn( elem, 0, args );
					};
			}

			return fn;
		}
	},

	pseudos: {

		// Potentially complex pseudos
		not: markFunction( function( selector ) {

			// Trim the selector passed to compile
			// to avoid treating leading and trailing
			// spaces as combinators
			var input = [],
				results = [],
				matcher = compile( selector.replace( rtrimCSS, "$1" ) );

			return matcher[ expando ] ?
				markFunction( function( seed, matches, _context, xml ) {
					var elem,
						unmatched = matcher( seed, null, xml, [] ),
						i = seed.length;

					// Match elements unmatched by `matcher`
					while ( i-- ) {
						if ( ( elem = unmatched[ i ] ) ) {
							seed[ i ] = !( matches[ i ] = elem );
						}
					}
				} ) :
				function( elem, _context, xml ) {
					input[ 0 ] = elem;
					matcher( input, null, xml, results );

					// Don't keep the element
					// (see https://github.com/jquery/sizzle/issues/299)
					input[ 0 ] = null;
					return !results.pop();
				};
		} ),

		has: markFunction( function( selector ) {
			return function( elem ) {
				return find( selector, elem ).length > 0;
			};
		} ),

		contains: markFunction( function( text ) {
			text = text.replace( runescape, funescape );
			return function( elem ) {
				return ( elem.textContent || jQuery.text( elem ) ).indexOf( text ) > -1;
			};
		} ),

		// "Whether an element is represented by a :lang() selector
		// is based solely on the element's language value
		// being equal to the identifier C,
		// or beginning with the identifier C immediately followed by "-".
		// The matching of C against the element's language value is performed case-insensitively.
		// The identifier C does not have to be a valid language name."
		// https://www.w3.org/TR/selectors/#lang-pseudo
		lang: markFunction( function( lang ) {

			// lang value must be a valid identifier
			if ( !ridentifier.test( lang || "" ) ) {
				find.error( "unsupported lang: " + lang );
			}
			lang = lang.replace( runescape, funescape ).toLowerCase();
			return function( elem ) {
				var elemLang;
				do {
					if ( ( elemLang = documentIsHTML ?
						elem.lang :
						elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) {

						elemLang = elemLang.toLowerCase();
						return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
					}
				} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );
				return false;
			};
		} ),

		// Miscellaneous
		target: function( elem ) {
			var hash = window.location && window.location.hash;
			return hash && hash.slice( 1 ) === elem.id;
		},

		root: function( elem ) {
			return elem === documentElement;
		},

		focus: function( elem ) {
			return elem === safeActiveElement() &&
				document.hasFocus() &&
				!!( elem.type || elem.href || ~elem.tabIndex );
		},

		// Boolean properties
		enabled: createDisabledPseudo( false ),
		disabled: createDisabledPseudo( true ),

		checked: function( elem ) {

			// In CSS3, :checked should return both checked and selected elements
			// https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
			return ( nodeName( elem, "input" ) && !!elem.checked ) ||
				( nodeName( elem, "option" ) && !!elem.selected );
		},

		selected: function( elem ) {

			// Support: IE <=11+
			// Accessing the selectedIndex property
			// forces the browser to treat the default option as
			// selected when in an optgroup.
			if ( elem.parentNode ) {
				// eslint-disable-next-line no-unused-expressions
				elem.parentNode.selectedIndex;
			}

			return elem.selected === true;
		},

		// Contents
		empty: function( elem ) {

			// https://www.w3.org/TR/selectors/#empty-pseudo
			// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
			//   but not by others (comment: 8; processing instruction: 7; etc.)
			// nodeType < 6 works because attributes (2) do not appear as children
			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
				if ( elem.nodeType < 6 ) {
					return false;
				}
			}
			return true;
		},

		parent: function( elem ) {
			return !Expr.pseudos.empty( elem );
		},

		// Element/input types
		header: function( elem ) {
			return rheader.test( elem.nodeName );
		},

		input: function( elem ) {
			return rinputs.test( elem.nodeName );
		},

		button: function( elem ) {
			return nodeName( elem, "input" ) && elem.type === "button" ||
				nodeName( elem, "button" );
		},

		text: function( elem ) {
			var attr;
			return nodeName( elem, "input" ) && elem.type === "text" &&

				// Support: IE <10 only
				// New HTML5 attribute values (e.g., "search") appear
				// with elem.type === "text"
				( ( attr = elem.getAttribute( "type" ) ) == null ||
					attr.toLowerCase() === "text" );
		},

		// Position-in-collection
		first: createPositionalPseudo( function() {
			return [ 0 ];
		} ),

		last: createPositionalPseudo( function( _matchIndexes, length ) {
			return [ length - 1 ];
		} ),

		eq: createPositionalPseudo( function( _matchIndexes, length, argument ) {
			return [ argument < 0 ? argument + length : argument ];
		} ),

		even: createPositionalPseudo( function( matchIndexes, length ) {
			var i = 0;
			for ( ; i < length; i += 2 ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		} ),

		odd: createPositionalPseudo( function( matchIndexes, length ) {
			var i = 1;
			for ( ; i < length; i += 2 ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		} ),

		lt: createPositionalPseudo( function( matchIndexes, length, argument ) {
			var i;

			if ( argument < 0 ) {
				i = argument + length;
			} else if ( argument > length ) {
				i = length;
			} else {
				i = argument;
			}

			for ( ; --i >= 0; ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		} ),

		gt: createPositionalPseudo( function( matchIndexes, length, argument ) {
			var i = argument < 0 ? argument + length : argument;
			for ( ; ++i < length; ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		} )
	}
};

Expr.pseudos.nth = Expr.pseudos.eq;

// Add button/input type pseudos
for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
	Expr.pseudos[ i ] = createInputPseudo( i );
}
for ( i in { submit: true, reset: true } ) {
	Expr.pseudos[ i ] = createButtonPseudo( i );
}

// Easy API for creating new setFilters
function setFilters() {}
setFilters.prototype = Expr.filters = Expr.pseudos;
Expr.setFilters = new setFilters();

function tokenize( selector, parseOnly ) {
	var matched, match, tokens, type,
		soFar, groups, preFilters,
		cached = tokenCache[ selector + " " ];

	if ( cached ) {
		return parseOnly ? 0 : cached.slice( 0 );
	}

	soFar = selector;
	groups = [];
	preFilters = Expr.preFilter;

	while ( soFar ) {

		// Comma and first run
		if ( !matched || ( match = rcomma.exec( soFar ) ) ) {
			if ( match ) {

				// Don't consume trailing commas as valid
				soFar = soFar.slice( match[ 0 ].length ) || soFar;
			}
			groups.push( ( tokens = [] ) );
		}

		matched = false;

		// Combinators
		if ( ( match = rleadingCombinator.exec( soFar ) ) ) {
			matched = match.shift();
			tokens.push( {
				value: matched,

				// Cast descendant combinators to space
				type: match[ 0 ].replace( rtrimCSS, " " )
			} );
			soFar = soFar.slice( matched.length );
		}

		// Filters
		for ( type in Expr.filter ) {
			if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||
				( match = preFilters[ type ]( match ) ) ) ) {
				matched = match.shift();
				tokens.push( {
					value: matched,
					type: type,
					matches: match
				} );
				soFar = soFar.slice( matched.length );
			}
		}

		if ( !matched ) {
			break;
		}
	}

	// Return the length of the invalid excess
	// if we're just parsing
	// Otherwise, throw an error or return tokens
	if ( parseOnly ) {
		return soFar.length;
	}

	return soFar ?
		find.error( selector ) :

		// Cache the tokens
		tokenCache( selector, groups ).slice( 0 );
}

function toSelector( tokens ) {
	var i = 0,
		len = tokens.length,
		selector = "";
	for ( ; i < len; i++ ) {
		selector += tokens[ i ].value;
	}
	return selector;
}

function addCombinator( matcher, combinator, base ) {
	var dir = combinator.dir,
		skip = combinator.next,
		key = skip || dir,
		checkNonElements = base && key === "parentNode",
		doneName = done++;

	return combinator.first ?

		// Check against closest ancestor/preceding element
		function( elem, context, xml ) {
			while ( ( elem = elem[ dir ] ) ) {
				if ( elem.nodeType === 1 || checkNonElements ) {
					return matcher( elem, context, xml );
				}
			}
			return false;
		} :

		// Check against all ancestor/preceding elements
		function( elem, context, xml ) {
			var oldCache, outerCache,
				newCache = [ dirruns, doneName ];

			// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
			if ( xml ) {
				while ( ( elem = elem[ dir ] ) ) {
					if ( elem.nodeType === 1 || checkNonElements ) {
						if ( matcher( elem, context, xml ) ) {
							return true;
						}
					}
				}
			} else {
				while ( ( elem = elem[ dir ] ) ) {
					if ( elem.nodeType === 1 || checkNonElements ) {
						outerCache = elem[ expando ] || ( elem[ expando ] = {} );

						if ( skip && nodeName( elem, skip ) ) {
							elem = elem[ dir ] || elem;
						} else if ( ( oldCache = outerCache[ key ] ) &&
							oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {

							// Assign to newCache so results back-propagate to previous elements
							return ( newCache[ 2 ] = oldCache[ 2 ] );
						} else {

							// Reuse newcache so results back-propagate to previous elements
							outerCache[ key ] = newCache;

							// A match means we're done; a fail means we have to keep checking
							if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {
								return true;
							}
						}
					}
				}
			}
			return false;
		};
}

function elementMatcher( matchers ) {
	return matchers.length > 1 ?
		function( elem, context, xml ) {
			var i = matchers.length;
			while ( i-- ) {
				if ( !matchers[ i ]( elem, context, xml ) ) {
					return false;
				}
			}
			return true;
		} :
		matchers[ 0 ];
}

function multipleContexts( selector, contexts, results ) {
	var i = 0,
		len = contexts.length;
	for ( ; i < len; i++ ) {
		find( selector, contexts[ i ], results );
	}
	return results;
}

function condense( unmatched, map, filter, context, xml ) {
	var elem,
		newUnmatched = [],
		i = 0,
		len = unmatched.length,
		mapped = map != null;

	for ( ; i < len; i++ ) {
		if ( ( elem = unmatched[ i ] ) ) {
			if ( !filter || filter( elem, context, xml ) ) {
				newUnmatched.push( elem );
				if ( mapped ) {
					map.push( i );
				}
			}
		}
	}

	return newUnmatched;
}

function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
	if ( postFilter && !postFilter[ expando ] ) {
		postFilter = setMatcher( postFilter );
	}
	if ( postFinder && !postFinder[ expando ] ) {
		postFinder = setMatcher( postFinder, postSelector );
	}
	return markFunction( function( seed, results, context, xml ) {
		var temp, i, elem, matcherOut,
			preMap = [],
			postMap = [],
			preexisting = results.length,

			// Get initial elements from seed or context
			elems = seed ||
				multipleContexts( selector || "*",
					context.nodeType ? [ context ] : context, [] ),

			// Prefilter to get matcher input, preserving a map for seed-results synchronization
			matcherIn = preFilter && ( seed || !selector ) ?
				condense( elems, preMap, preFilter, context, xml ) :
				elems;

		if ( matcher ) {

			// If we have a postFinder, or filtered seed, or non-seed postFilter
			// or preexisting results,
			matcherOut = postFinder || ( seed ? preFilter : preexisting || postFilter ) ?

				// ...intermediate processing is necessary
				[] :

				// ...otherwise use results directly
				results;

			// Find primary matches
			matcher( matcherIn, matcherOut, context, xml );
		} else {
			matcherOut = matcherIn;
		}

		// Apply postFilter
		if ( postFilter ) {
			temp = condense( matcherOut, postMap );
			postFilter( temp, [], context, xml );

			// Un-match failing elements by moving them back to matcherIn
			i = temp.length;
			while ( i-- ) {
				if ( ( elem = temp[ i ] ) ) {
					matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );
				}
			}
		}

		if ( seed ) {
			if ( postFinder || preFilter ) {
				if ( postFinder ) {

					// Get the final matcherOut by condensing this intermediate into postFinder contexts
					temp = [];
					i = matcherOut.length;
					while ( i-- ) {
						if ( ( elem = matcherOut[ i ] ) ) {

							// Restore matcherIn since elem is not yet a final match
							temp.push( ( matcherIn[ i ] = elem ) );
						}
					}
					postFinder( null, ( matcherOut = [] ), temp, xml );
				}

				// Move matched elements from seed to results to keep them synchronized
				i = matcherOut.length;
				while ( i-- ) {
					if ( ( elem = matcherOut[ i ] ) &&
						( temp = postFinder ? indexOf.call( seed, elem ) : preMap[ i ] ) > -1 ) {

						seed[ temp ] = !( results[ temp ] = elem );
					}
				}
			}

		// Add elements to results, through postFinder if defined
		} else {
			matcherOut = condense(
				matcherOut === results ?
					matcherOut.splice( preexisting, matcherOut.length ) :
					matcherOut
			);
			if ( postFinder ) {
				postFinder( null, results, matcherOut, xml );
			} else {
				push.apply( results, matcherOut );
			}
		}
	} );
}

function matcherFromTokens( tokens ) {
	var checkContext, matcher, j,
		len = tokens.length,
		leadingRelative = Expr.relative[ tokens[ 0 ].type ],
		implicitRelative = leadingRelative || Expr.relative[ " " ],
		i = leadingRelative ? 1 : 0,

		// The foundational matcher ensures that elements are reachable from top-level context(s)
		matchContext = addCombinator( function( elem ) {
			return elem === checkContext;
		}, implicitRelative, true ),
		matchAnyContext = addCombinator( function( elem ) {
			return indexOf.call( checkContext, elem ) > -1;
		}, implicitRelative, true ),
		matchers = [ function( elem, context, xml ) {

			// Support: IE 11+, Edge 17 - 18+
			// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
			// two documents; shallow comparisons work.
			// eslint-disable-next-line eqeqeq
			var ret = ( !leadingRelative && ( xml || context != outermostContext ) ) || (
				( checkContext = context ).nodeType ?
					matchContext( elem, context, xml ) :
					matchAnyContext( elem, context, xml ) );

			// Avoid hanging onto element
			// (see https://github.com/jquery/sizzle/issues/299)
			checkContext = null;
			return ret;
		} ];

	for ( ; i < len; i++ ) {
		if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {
			matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];
		} else {
			matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );

			// Return special upon seeing a positional matcher
			if ( matcher[ expando ] ) {

				// Find the next relative operator (if any) for proper handling
				j = ++i;
				for ( ; j < len; j++ ) {
					if ( Expr.relative[ tokens[ j ].type ] ) {
						break;
					}
				}
				return setMatcher(
					i > 1 && elementMatcher( matchers ),
					i > 1 && toSelector(

						// If the preceding token was a descendant combinator, insert an implicit any-element `*`
						tokens.slice( 0, i - 1 )
							.concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } )
					).replace( rtrimCSS, "$1" ),
					matcher,
					i < j && matcherFromTokens( tokens.slice( i, j ) ),
					j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),
					j < len && toSelector( tokens )
				);
			}
			matchers.push( matcher );
		}
	}

	return elementMatcher( matchers );
}

function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
	var bySet = setMatchers.length > 0,
		byElement = elementMatchers.length > 0,
		superMatcher = function( seed, context, xml, results, outermost ) {
			var elem, j, matcher,
				matchedCount = 0,
				i = "0",
				unmatched = seed && [],
				setMatched = [],
				contextBackup = outermostContext,

				// We must always have either seed elements or outermost context
				elems = seed || byElement && Expr.find.TAG( "*", outermost ),

				// Use integer dirruns iff this is the outermost matcher
				dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),
				len = elems.length;

			if ( outermost ) {

				// Support: IE 11+, Edge 17 - 18+
				// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
				// two documents; shallow comparisons work.
				// eslint-disable-next-line eqeqeq
				outermostContext = context == document || context || outermost;
			}

			// Add elements passing elementMatchers directly to results
			// Support: iOS <=7 - 9 only
			// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching
			// elements by id. (see trac-14142)
			for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {
				if ( byElement && elem ) {
					j = 0;

					// Support: IE 11+, Edge 17 - 18+
					// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
					// two documents; shallow comparisons work.
					// eslint-disable-next-line eqeqeq
					if ( !context && elem.ownerDocument != document ) {
						setDocument( elem );
						xml = !documentIsHTML;
					}
					while ( ( matcher = elementMatchers[ j++ ] ) ) {
						if ( matcher( elem, context || document, xml ) ) {
							push.call( results, elem );
							break;
						}
					}
					if ( outermost ) {
						dirruns = dirrunsUnique;
					}
				}

				// Track unmatched elements for set filters
				if ( bySet ) {

					// They will have gone through all possible matchers
					if ( ( elem = !matcher && elem ) ) {
						matchedCount--;
					}

					// Lengthen the array for every element, matched or not
					if ( seed ) {
						unmatched.push( elem );
					}
				}
			}

			// `i` is now the count of elements visited above, and adding it to `matchedCount`
			// makes the latter nonnegative.
			matchedCount += i;

			// Apply set filters to unmatched elements
			// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
			// equals `i`), unless we didn't visit _any_ elements in the above loop because we have
			// no element matchers and no seed.
			// Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
			// case, which will result in a "00" `matchedCount` that differs from `i` but is also
			// numerically zero.
			if ( bySet && i !== matchedCount ) {
				j = 0;
				while ( ( matcher = setMatchers[ j++ ] ) ) {
					matcher( unmatched, setMatched, context, xml );
				}

				if ( seed ) {

					// Reintegrate element matches to eliminate the need for sorting
					if ( matchedCount > 0 ) {
						while ( i-- ) {
							if ( !( unmatched[ i ] || setMatched[ i ] ) ) {
								setMatched[ i ] = pop.call( results );
							}
						}
					}

					// Discard index placeholder values to get only actual matches
					setMatched = condense( setMatched );
				}

				// Add matches to results
				push.apply( results, setMatched );

				// Seedless set matches succeeding multiple successful matchers stipulate sorting
				if ( outermost && !seed && setMatched.length > 0 &&
					( matchedCount + setMatchers.length ) > 1 ) {

					jQuery.uniqueSort( results );
				}
			}

			// Override manipulation of globals by nested matchers
			if ( outermost ) {
				dirruns = dirrunsUnique;
				outermostContext = contextBackup;
			}

			return unmatched;
		};

	return bySet ?
		markFunction( superMatcher ) :
		superMatcher;
}

function compile( selector, match /* Internal Use Only */ ) {
	var i,
		setMatchers = [],
		elementMatchers = [],
		cached = compilerCache[ selector + " " ];

	if ( !cached ) {

		// Generate a function of recursive functions that can be used to check each element
		if ( !match ) {
			match = tokenize( selector );
		}
		i = match.length;
		while ( i-- ) {
			cached = matcherFromTokens( match[ i ] );
			if ( cached[ expando ] ) {
				setMatchers.push( cached );
			} else {
				elementMatchers.push( cached );
			}
		}

		// Cache the compiled function
		cached = compilerCache( selector,
			matcherFromGroupMatchers( elementMatchers, setMatchers ) );

		// Save selector and tokenization
		cached.selector = selector;
	}
	return cached;
}

/**
 * A low-level selection function that works with jQuery's compiled
 *  selector functions
 * @param {String|Function} selector A selector or a pre-compiled
 *  selector function built with jQuery selector compile
 * @param {Element} context
 * @param {Array} [results]
 * @param {Array} [seed] A set of elements to match against
 */
function select( selector, context, results, seed ) {
	var i, tokens, token, type, find,
		compiled = typeof selector === "function" && selector,
		match = !seed && tokenize( ( selector = compiled.selector || selector ) );

	results = results || [];

	// Try to minimize operations if there is only one selector in the list and no seed
	// (the latter of which guarantees us context)
	if ( match.length === 1 ) {

		// Reduce context if the leading compound selector is an ID
		tokens = match[ 0 ] = match[ 0 ].slice( 0 );
		if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" &&
				context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {

			context = ( Expr.find.ID(
				token.matches[ 0 ].replace( runescape, funescape ),
				context
			) || [] )[ 0 ];
			if ( !context ) {
				return results;

			// Precompiled matchers will still verify ancestry, so step up a level
			} else if ( compiled ) {
				context = context.parentNode;
			}

			selector = selector.slice( tokens.shift().value.length );
		}

		// Fetch a seed set for right-to-left matching
		i = matchExpr.needsContext.test( selector ) ? 0 : tokens.length;
		while ( i-- ) {
			token = tokens[ i ];

			// Abort if we hit a combinator
			if ( Expr.relative[ ( type = token.type ) ] ) {
				break;
			}
			if ( ( find = Expr.find[ type ] ) ) {

				// Search, expanding context for leading sibling combinators
				if ( ( seed = find(
					token.matches[ 0 ].replace( runescape, funescape ),
					rsibling.test( tokens[ 0 ].type ) &&
						testContext( context.parentNode ) || context
				) ) ) {

					// If seed is empty or no tokens remain, we can return early
					tokens.splice( i, 1 );
					selector = seed.length && toSelector( tokens );
					if ( !selector ) {
						push.apply( results, seed );
						return results;
					}

					break;
				}
			}
		}
	}

	// Compile and execute a filtering function if one is not provided
	// Provide `match` to avoid retokenization if we modified the selector above
	( compiled || compile( selector, match ) )(
		seed,
		context,
		!documentIsHTML,
		results,
		!context || rsibling.test( selector ) && testContext( context.parentNode ) || context
	);
	return results;
}

// One-time assignments

// Support: Android <=4.0 - 4.1+
// Sort stability
support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando;

// Initialize against the default document
setDocument();

// Support: Android <=4.0 - 4.1+
// Detached nodes confoundingly follow *each other*
support.sortDetached = assert( function( el ) {

	// Should return 1, but returns 4 (following)
	return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1;
} );

jQuery.find = find;

// Deprecated
jQuery.expr[ ":" ] = jQuery.expr.pseudos;
jQuery.unique = jQuery.uniqueSort;

// These have always been private, but they used to be documented as part of
// Sizzle so let's maintain them for now for backwards compatibility purposes.
find.compile = compile;
find.select = select;
find.setDocument = setDocument;
find.tokenize = tokenize;

find.escape = jQuery.escapeSelector;
find.getText = jQuery.text;
find.isXML = jQuery.isXMLDoc;
find.selectors = jQuery.expr;
find.support = jQuery.support;
find.uniqueSort = jQuery.uniqueSort;

	/* eslint-enable */

} )();


var dir = function( elem, dir, until ) {
	var matched = [],
		truncate = until !== undefined;

	while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
		if ( elem.nodeType === 1 ) {
			if ( truncate && jQuery( elem ).is( until ) ) {
				break;
			}
			matched.push( elem );
		}
	}
	return matched;
};


var siblings = function( n, elem ) {
	var matched = [];

	for ( ; n; n = n.nextSibling ) {
		if ( n.nodeType === 1 && n !== elem ) {
			matched.push( n );
		}
	}

	return matched;
};


var rneedsContext = jQuery.expr.match.needsContext;

var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );



// Implement the identical functionality for filter and not
function winnow( elements, qualifier, not ) {
	if ( isFunction( qualifier ) ) {
		return jQuery.grep( elements, function( elem, i ) {
			return !!qualifier.call( elem, i, elem ) !== not;
		} );
	}

	// Single element
	if ( qualifier.nodeType ) {
		return jQuery.grep( elements, function( elem ) {
			return ( elem === qualifier ) !== not;
		} );
	}

	// Arraylike of elements (jQuery, arguments, Array)
	if ( typeof qualifier !== "string" ) {
		return jQuery.grep( elements, function( elem ) {
			return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
		} );
	}

	// Filtered directly for both simple and complex selectors
	return jQuery.filter( qualifier, elements, not );
}

jQuery.filter = function( expr, elems, not ) {
	var elem = elems[ 0 ];

	if ( not ) {
		expr = ":not(" + expr + ")";
	}

	if ( elems.length === 1 && elem.nodeType === 1 ) {
		return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];
	}

	return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
		return elem.nodeType === 1;
	} ) );
};

jQuery.fn.extend( {
	find: function( selector ) {
		var i, ret,
			len = this.length,
			self = this;

		if ( typeof selector !== "string" ) {
			return this.pushStack( jQuery( selector ).filter( function() {
				for ( i = 0; i < len; i++ ) {
					if ( jQuery.contains( self[ i ], this ) ) {
						return true;
					}
				}
			} ) );
		}

		ret = this.pushStack( [] );

		for ( i = 0; i < len; i++ ) {
			jQuery.find( selector, self[ i ], ret );
		}

		return len > 1 ? jQuery.uniqueSort( ret ) : ret;
	},
	filter: function( selector ) {
		return this.pushStack( winnow( this, selector || [], false ) );
	},
	not: function( selector ) {
		return this.pushStack( winnow( this, selector || [], true ) );
	},
	is: function( selector ) {
		return !!winnow(
			this,

			// If this is a positional/relative selector, check membership in the returned set
			// so $("p:first").is("p:last") won't return true for a doc with two "p".
			typeof selector === "string" && rneedsContext.test( selector ) ?
				jQuery( selector ) :
				selector || [],
			false
		).length;
	}
} );


// Initialize a jQuery object


// A central reference to the root jQuery(document)
var rootjQuery,

	// A simple way to check for HTML strings
	// Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521)
	// Strict HTML recognition (trac-11290: must start with <)
	// Shortcut simple #id case for speed
	rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,

	init = jQuery.fn.init = function( selector, context, root ) {
		var match, elem;

		// HANDLE: $(""), $(null), $(undefined), $(false)
		if ( !selector ) {
			return this;
		}

		// Method init() accepts an alternate rootjQuery
		// so migrate can support jQuery.sub (gh-2101)
		root = root || rootjQuery;

		// Handle HTML strings
		if ( typeof selector === "string" ) {
			if ( selector[ 0 ] === "<" &&
				selector[ selector.length - 1 ] === ">" &&
				selector.length >= 3 ) {

				// Assume that strings that start and end with <> are HTML and skip the regex check
				match = [ null, selector, null ];

			} else {
				match = rquickExpr.exec( selector );
			}

			// Match html or make sure no context is specified for #id
			if ( match && ( match[ 1 ] || !context ) ) {

				// HANDLE: $(html) -> $(array)
				if ( match[ 1 ] ) {
					context = context instanceof jQuery ? context[ 0 ] : context;

					// Option to run scripts is true for back-compat
					// Intentionally let the error be thrown if parseHTML is not present
					jQuery.merge( this, jQuery.parseHTML(
						match[ 1 ],
						context && context.nodeType ? context.ownerDocument || context : document,
						true
					) );

					// HANDLE: $(html, props)
					if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
						for ( match in context ) {

							// Properties of context are called as methods if possible
							if ( isFunction( this[ match ] ) ) {
								this[ match ]( context[ match ] );

							// ...and otherwise set as attributes
							} else {
								this.attr( match, context[ match ] );
							}
						}
					}

					return this;

				// HANDLE: $(#id)
				} else {
					elem = document.getElementById( match[ 2 ] );

					if ( elem ) {

						// Inject the element directly into the jQuery object
						this[ 0 ] = elem;
						this.length = 1;
					}
					return this;
				}

			// HANDLE: $(expr, $(...))
			} else if ( !context || context.jquery ) {
				return ( context || root ).find( selector );

			// HANDLE: $(expr, context)
			// (which is just equivalent to: $(context).find(expr)
			} else {
				return this.constructor( context ).find( selector );
			}

		// HANDLE: $(DOMElement)
		} else if ( selector.nodeType ) {
			this[ 0 ] = selector;
			this.length = 1;
			return this;

		// HANDLE: $(function)
		// Shortcut for document ready
		} else if ( isFunction( selector ) ) {
			return root.ready !== undefined ?
				root.ready( selector ) :

				// Execute immediately if ready is not present
				selector( jQuery );
		}

		return jQuery.makeArray( selector, this );
	};

// Give the init function the jQuery prototype for later instantiation
init.prototype = jQuery.fn;

// Initialize central reference
rootjQuery = jQuery( document );


var rparentsprev = /^(?:parents|prev(?:Until|All))/,

	// Methods guaranteed to produce a unique set when starting from a unique set
	guaranteedUnique = {
		children: true,
		contents: true,
		next: true,
		prev: true
	};

jQuery.fn.extend( {
	has: function( target ) {
		var targets = jQuery( target, this ),
			l = targets.length;

		return this.filter( function() {
			var i = 0;
			for ( ; i < l; i++ ) {
				if ( jQuery.contains( this, targets[ i ] ) ) {
					return true;
				}
			}
		} );
	},

	closest: function( selectors, context ) {
		var cur,
			i = 0,
			l = this.length,
			matched = [],
			targets = typeof selectors !== "string" && jQuery( selectors );

		// Positional selectors never match, since there's no _selection_ context
		if ( !rneedsContext.test( selectors ) ) {
			for ( ; i < l; i++ ) {
				for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {

					// Always skip document fragments
					if ( cur.nodeType < 11 && ( targets ?
						targets.index( cur ) > -1 :

						// Don't pass non-elements to jQuery#find
						cur.nodeType === 1 &&
							jQuery.find.matchesSelector( cur, selectors ) ) ) {

						matched.push( cur );
						break;
					}
				}
			}
		}

		return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
	},

	// Determine the position of an element within the set
	index: function( elem ) {

		// No argument, return index in parent
		if ( !elem ) {
			return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
		}

		// Index in selector
		if ( typeof elem === "string" ) {
			return indexOf.call( jQuery( elem ), this[ 0 ] );
		}

		// Locate the position of the desired element
		return indexOf.call( this,

			// If it receives a jQuery object, the first element is used
			elem.jquery ? elem[ 0 ] : elem
		);
	},

	add: function( selector, context ) {
		return this.pushStack(
			jQuery.uniqueSort(
				jQuery.merge( this.get(), jQuery( selector, context ) )
			)
		);
	},

	addBack: function( selector ) {
		return this.add( selector == null ?
			this.prevObject : this.prevObject.filter( selector )
		);
	}
} );

function sibling( cur, dir ) {
	while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
	return cur;
}

jQuery.each( {
	parent: function( elem ) {
		var parent = elem.parentNode;
		return parent && parent.nodeType !== 11 ? parent : null;
	},
	parents: function( elem ) {
		return dir( elem, "parentNode" );
	},
	parentsUntil: function( elem, _i, until ) {
		return dir( elem, "parentNode", until );
	},
	next: function( elem ) {
		return sibling( elem, "nextSibling" );
	},
	prev: function( elem ) {
		return sibling( elem, "previousSibling" );
	},
	nextAll: function( elem ) {
		return dir( elem, "nextSibling" );
	},
	prevAll: function( elem ) {
		return dir( elem, "previousSibling" );
	},
	nextUntil: function( elem, _i, until ) {
		return dir( elem, "nextSibling", until );
	},
	prevUntil: function( elem, _i, until ) {
		return dir( elem, "previousSibling", until );
	},
	siblings: function( elem ) {
		return siblings( ( elem.parentNode || {} ).firstChild, elem );
	},
	children: function( elem ) {
		return siblings( elem.firstChild );
	},
	contents: function( elem ) {
		if ( elem.contentDocument != null &&

			// Support: IE 11+
			// <object> elements with no `data` attribute has an object
			// `contentDocument` with a `null` prototype.
			getProto( elem.contentDocument ) ) {

			return elem.contentDocument;
		}

		// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only
		// Treat the template element as a regular one in browsers that
		// don't support it.
		if ( nodeName( elem, "template" ) ) {
			elem = elem.content || elem;
		}

		return jQuery.merge( [], elem.childNodes );
	}
}, function( name, fn ) {
	jQuery.fn[ name ] = function( until, selector ) {
		var matched = jQuery.map( this, fn, until );

		if ( name.slice( -5 ) !== "Until" ) {
			selector = until;
		}

		if ( selector && typeof selector === "string" ) {
			matched = jQuery.filter( selector, matched );
		}

		if ( this.length > 1 ) {

			// Remove duplicates
			if ( !guaranteedUnique[ name ] ) {
				jQuery.uniqueSort( matched );
			}

			// Reverse order for parents* and prev-derivatives
			if ( rparentsprev.test( name ) ) {
				matched.reverse();
			}
		}

		return this.pushStack( matched );
	};
} );
var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g );



// Convert String-formatted options into Object-formatted ones
function createOptions( options ) {
	var object = {};
	jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {
		object[ flag ] = true;
	} );
	return object;
}

/*
 * Create a callback list using the following parameters:
 *
 *	options: an optional list of space-separated options that will change how
 *			the callback list behaves or a more traditional option object
 *
 * By default a callback list will act like an event callback list and can be
 * "fired" multiple times.
 *
 * Possible options:
 *
 *	once:			will ensure the callback list can only be fired once (like a Deferred)
 *
 *	memory:			will keep track of previous values and will call any callback added
 *					after the list has been fired right away with the latest "memorized"
 *					values (like a Deferred)
 *
 *	unique:			will ensure a callback can only be added once (no duplicate in the list)
 *
 *	stopOnFalse:	interrupt callings when a callback returns false
 *
 */
jQuery.Callbacks = function( options ) {

	// Convert options from String-formatted to Object-formatted if needed
	// (we check in cache first)
	options = typeof options === "string" ?
		createOptions( options ) :
		jQuery.extend( {}, options );

	var // Flag to know if list is currently firing
		firing,

		// Last fire value for non-forgettable lists
		memory,

		// Flag to know if list was already fired
		fired,

		// Flag to prevent firing
		locked,

		// Actual callback list
		list = [],

		// Queue of execution data for repeatable lists
		queue = [],

		// Index of currently firing callback (modified by add/remove as needed)
		firingIndex = -1,

		// Fire callbacks
		fire = function() {

			// Enforce single-firing
			locked = locked || options.once;

			// Execute callbacks for all pending executions,
			// respecting firingIndex overrides and runtime changes
			fired = firing = true;
			for ( ; queue.length; firingIndex = -1 ) {
				memory = queue.shift();
				while ( ++firingIndex < list.length ) {

					// Run callback and check for early termination
					if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
						options.stopOnFalse ) {

						// Jump to end and forget the data so .add doesn't re-fire
						firingIndex = list.length;
						memory = false;
					}
				}
			}

			// Forget the data if we're done with it
			if ( !options.memory ) {
				memory = false;
			}

			firing = false;

			// Clean up if we're done firing for good
			if ( locked ) {

				// Keep an empty list if we have data for future add calls
				if ( memory ) {
					list = [];

				// Otherwise, this object is spent
				} else {
					list = "";
				}
			}
		},

		// Actual Callbacks object
		self = {

			// Add a callback or a collection of callbacks to the list
			add: function() {
				if ( list ) {

					// If we have memory from a past run, we should fire after adding
					if ( memory && !firing ) {
						firingIndex = list.length - 1;
						queue.push( memory );
					}

					( function add( args ) {
						jQuery.each( args, function( _, arg ) {
							if ( isFunction( arg ) ) {
								if ( !options.unique || !self.has( arg ) ) {
									list.push( arg );
								}
							} else if ( arg && arg.length && toType( arg ) !== "string" ) {

								// Inspect recursively
								add( arg );
							}
						} );
					} )( arguments );

					if ( memory && !firing ) {
						fire();
					}
				}
				return this;
			},

			// Remove a callback from the list
			remove: function() {
				jQuery.each( arguments, function( _, arg ) {
					var index;
					while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
						list.splice( index, 1 );

						// Handle firing indexes
						if ( index <= firingIndex ) {
							firingIndex--;
						}
					}
				} );
				return this;
			},

			// Check if a given callback is in the list.
			// If no argument is given, return whether or not list has callbacks attached.
			has: function( fn ) {
				return fn ?
					jQuery.inArray( fn, list ) > -1 :
					list.length > 0;
			},

			// Remove all callbacks from the list
			empty: function() {
				if ( list ) {
					list = [];
				}
				return this;
			},

			// Disable .fire and .add
			// Abort any current/pending executions
			// Clear all callbacks and values
			disable: function() {
				locked = queue = [];
				list = memory = "";
				return this;
			},
			disabled: function() {
				return !list;
			},

			// Disable .fire
			// Also disable .add unless we have memory (since it would have no effect)
			// Abort any pending executions
			lock: function() {
				locked = queue = [];
				if ( !memory && !firing ) {
					list = memory = "";
				}
				return this;
			},
			locked: function() {
				return !!locked;
			},

			// Call all callbacks with the given context and arguments
			fireWith: function( context, args ) {
				if ( !locked ) {
					args = args || [];
					args = [ context, args.slice ? args.slice() : args ];
					queue.push( args );
					if ( !firing ) {
						fire();
					}
				}
				return this;
			},

			// Call all the callbacks with the given arguments
			fire: function() {
				self.fireWith( this, arguments );
				return this;
			},

			// To know if the callbacks have already been called at least once
			fired: function() {
				return !!fired;
			}
		};

	return self;
};


function Identity( v ) {
	return v;
}
function Thrower( ex ) {
	throw ex;
}

function adoptValue( value, resolve, reject, noValue ) {
	var method;

	try {

		// Check for promise aspect first to privilege synchronous behavior
		if ( value && isFunction( ( method = value.promise ) ) ) {
			method.call( value ).done( resolve ).fail( reject );

		// Other thenables
		} else if ( value && isFunction( ( method = value.then ) ) ) {
			method.call( value, resolve, reject );

		// Other non-thenables
		} else {

			// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:
			// * false: [ value ].slice( 0 ) => resolve( value )
			// * true: [ value ].slice( 1 ) => resolve()
			resolve.apply( undefined, [ value ].slice( noValue ) );
		}

	// For Promises/A+, convert exceptions into rejections
	// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in
	// Deferred#then to conditionally suppress rejection.
	} catch ( value ) {

		// Support: Android 4.0 only
		// Strict mode functions invoked without .call/.apply get global-object context
		reject.apply( undefined, [ value ] );
	}
}

jQuery.extend( {

	Deferred: function( func ) {
		var tuples = [

				// action, add listener, callbacks,
				// ... .then handlers, argument index, [final state]
				[ "notify", "progress", jQuery.Callbacks( "memory" ),
					jQuery.Callbacks( "memory" ), 2 ],
				[ "resolve", "done", jQuery.Callbacks( "once memory" ),
					jQuery.Callbacks( "once memory" ), 0, "resolved" ],
				[ "reject", "fail", jQuery.Callbacks( "once memory" ),
					jQuery.Callbacks( "once memory" ), 1, "rejected" ]
			],
			state = "pending",
			promise = {
				state: function() {
					return state;
				},
				always: function() {
					deferred.done( arguments ).fail( arguments );
					return this;
				},
				"catch": function( fn ) {
					return promise.then( null, fn );
				},

				// Keep pipe for back-compat
				pipe: function( /* fnDone, fnFail, fnProgress */ ) {
					var fns = arguments;

					return jQuery.Deferred( function( newDefer ) {
						jQuery.each( tuples, function( _i, tuple ) {

							// Map tuples (progress, done, fail) to arguments (done, fail, progress)
							var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];

							// deferred.progress(function() { bind to newDefer or newDefer.notify })
							// deferred.done(function() { bind to newDefer or newDefer.resolve })
							// deferred.fail(function() { bind to newDefer or newDefer.reject })
							deferred[ tuple[ 1 ] ]( function() {
								var returned = fn && fn.apply( this, arguments );
								if ( returned && isFunction( returned.promise ) ) {
									returned.promise()
										.progress( newDefer.notify )
										.done( newDefer.resolve )
										.fail( newDefer.reject );
								} else {
									newDefer[ tuple[ 0 ] + "With" ](
										this,
										fn ? [ returned ] : arguments
									);
								}
							} );
						} );
						fns = null;
					} ).promise();
				},
				then: function( onFulfilled, onRejected, onProgress ) {
					var maxDepth = 0;
					function resolve( depth, deferred, handler, special ) {
						return function() {
							var that = this,
								args = arguments,
								mightThrow = function() {
									var returned, then;

									// Support: Promises/A+ section 2.3.3.3.3
									// https://promisesaplus.com/#point-59
									// Ignore double-resolution attempts
									if ( depth < maxDepth ) {
										return;
									}

									returned = handler.apply( that, args );

									// Support: Promises/A+ section 2.3.1
									// https://promisesaplus.com/#point-48
									if ( returned === deferred.promise() ) {
										throw new TypeError( "Thenable self-resolution" );
									}

									// Support: Promises/A+ sections 2.3.3.1, 3.5
									// https://promisesaplus.com/#point-54
									// https://promisesaplus.com/#point-75
									// Retrieve `then` only once
									then = returned &&

										// Support: Promises/A+ section 2.3.4
										// https://promisesaplus.com/#point-64
										// Only check objects and functions for thenability
										( typeof returned === "object" ||
											typeof returned === "function" ) &&
										returned.then;

									// Handle a returned thenable
									if ( isFunction( then ) ) {

										// Special processors (notify) just wait for resolution
										if ( special ) {
											then.call(
												returned,
												resolve( maxDepth, deferred, Identity, special ),
												resolve( maxDepth, deferred, Thrower, special )
											);

										// Normal processors (resolve) also hook into progress
										} else {

											// ...and disregard older resolution values
											maxDepth++;

											then.call(
												returned,
												resolve( maxDepth, deferred, Identity, special ),
												resolve( maxDepth, deferred, Thrower, special ),
												resolve( maxDepth, deferred, Identity,
													deferred.notifyWith )
											);
										}

									// Handle all other returned values
									} else {

										// Only substitute handlers pass on context
										// and multiple values (non-spec behavior)
										if ( handler !== Identity ) {
											that = undefined;
											args = [ returned ];
										}

										// Process the value(s)
										// Default process is resolve
										( special || deferred.resolveWith )( that, args );
									}
								},

								// Only normal processors (resolve) catch and reject exceptions
								process = special ?
									mightThrow :
									function() {
										try {
											mightThrow();
										} catch ( e ) {

											if ( jQuery.Deferred.exceptionHook ) {
												jQuery.Deferred.exceptionHook( e,
													process.error );
											}

											// Support: Promises/A+ section 2.3.3.3.4.1
											// https://promisesaplus.com/#point-61
											// Ignore post-resolution exceptions
											if ( depth + 1 >= maxDepth ) {

												// Only substitute handlers pass on context
												// and multiple values (non-spec behavior)
												if ( handler !== Thrower ) {
													that = undefined;
													args = [ e ];
												}

												deferred.rejectWith( that, args );
											}
										}
									};

							// Support: Promises/A+ section 2.3.3.3.1
							// https://promisesaplus.com/#point-57
							// Re-resolve promises immediately to dodge false rejection from
							// subsequent errors
							if ( depth ) {
								process();
							} else {

								// Call an optional hook to record the error, in case of exception
								// since it's otherwise lost when execution goes async
								if ( jQuery.Deferred.getErrorHook ) {
									process.error = jQuery.Deferred.getErrorHook();

								// The deprecated alias of the above. While the name suggests
								// returning the stack, not an error instance, jQuery just passes
								// it directly to `console.warn` so both will work; an instance
								// just better cooperates with source maps.
								} else if ( jQuery.Deferred.getStackHook ) {
									process.error = jQuery.Deferred.getStackHook();
								}
								window.setTimeout( process );
							}
						};
					}

					return jQuery.Deferred( function( newDefer ) {

						// progress_handlers.add( ... )
						tuples[ 0 ][ 3 ].add(
							resolve(
								0,
								newDefer,
								isFunction( onProgress ) ?
									onProgress :
									Identity,
								newDefer.notifyWith
							)
						);

						// fulfilled_handlers.add( ... )
						tuples[ 1 ][ 3 ].add(
							resolve(
								0,
								newDefer,
								isFunction( onFulfilled ) ?
									onFulfilled :
									Identity
							)
						);

						// rejected_handlers.add( ... )
						tuples[ 2 ][ 3 ].add(
							resolve(
								0,
								newDefer,
								isFunction( onRejected ) ?
									onRejected :
									Thrower
							)
						);
					} ).promise();
				},

				// Get a promise for this deferred
				// If obj is provided, the promise aspect is added to the object
				promise: function( obj ) {
					return obj != null ? jQuery.extend( obj, promise ) : promise;
				}
			},
			deferred = {};

		// Add list-specific methods
		jQuery.each( tuples, function( i, tuple ) {
			var list = tuple[ 2 ],
				stateString = tuple[ 5 ];

			// promise.progress = list.add
			// promise.done = list.add
			// promise.fail = list.add
			promise[ tuple[ 1 ] ] = list.add;

			// Handle state
			if ( stateString ) {
				list.add(
					function() {

						// state = "resolved" (i.e., fulfilled)
						// state = "rejected"
						state = stateString;
					},

					// rejected_callbacks.disable
					// fulfilled_callbacks.disable
					tuples[ 3 - i ][ 2 ].disable,

					// rejected_handlers.disable
					// fulfilled_handlers.disable
					tuples[ 3 - i ][ 3 ].disable,

					// progress_callbacks.lock
					tuples[ 0 ][ 2 ].lock,

					// progress_handlers.lock
					tuples[ 0 ][ 3 ].lock
				);
			}

			// progress_handlers.fire
			// fulfilled_handlers.fire
			// rejected_handlers.fire
			list.add( tuple[ 3 ].fire );

			// deferred.notify = function() { deferred.notifyWith(...) }
			// deferred.resolve = function() { deferred.resolveWith(...) }
			// deferred.reject = function() { deferred.rejectWith(...) }
			deferred[ tuple[ 0 ] ] = function() {
				deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments );
				return this;
			};

			// deferred.notifyWith = list.fireWith
			// deferred.resolveWith = list.fireWith
			// deferred.rejectWith = list.fireWith
			deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
		} );

		// Make the deferred a promise
		promise.promise( deferred );

		// Call given func if any
		if ( func ) {
			func.call( deferred, deferred );
		}

		// All done!
		return deferred;
	},

	// Deferred helper
	when: function( singleValue ) {
		var

			// count of uncompleted subordinates
			remaining = arguments.length,

			// count of unprocessed arguments
			i = remaining,

			// subordinate fulfillment data
			resolveContexts = Array( i ),
			resolveValues = slice.call( arguments ),

			// the primary Deferred
			primary = jQuery.Deferred(),

			// subordinate callback factory
			updateFunc = function( i ) {
				return function( value ) {
					resolveContexts[ i ] = this;
					resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
					if ( !( --remaining ) ) {
						primary.resolveWith( resolveContexts, resolveValues );
					}
				};
			};

		// Single- and empty arguments are adopted like Promise.resolve
		if ( remaining <= 1 ) {
			adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,
				!remaining );

			// Use .then() to unwrap secondary thenables (cf. gh-3000)
			if ( primary.state() === "pending" ||
				isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {

				return primary.then();
			}
		}

		// Multiple arguments are aggregated like Promise.all array elements
		while ( i-- ) {
			adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );
		}

		return primary.promise();
	}
} );


// These usually indicate a programmer mistake during development,
// warn about them ASAP rather than swallowing them by default.
var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;

// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error
// captured before the async barrier to get the original error cause
// which may otherwise be hidden.
jQuery.Deferred.exceptionHook = function( error, asyncError ) {

	// Support: IE 8 - 9 only
	// Console exists when dev tools are open, which can happen at any time
	if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
		window.console.warn( "jQuery.Deferred exception: " + error.message,
			error.stack, asyncError );
	}
};




jQuery.readyException = function( error ) {
	window.setTimeout( function() {
		throw error;
	} );
};




// The deferred used on DOM ready
var readyList = jQuery.Deferred();

jQuery.fn.ready = function( fn ) {

	readyList
		.then( fn )

		// Wrap jQuery.readyException in a function so that the lookup
		// happens at the time of error handling instead of callback
		// registration.
		.catch( function( error ) {
			jQuery.readyException( error );
		} );

	return this;
};

jQuery.extend( {

	// Is the DOM ready to be used? Set to true once it occurs.
	isReady: false,

	// A counter to track how many items to wait for before
	// the ready event fires. See trac-6781
	readyWait: 1,

	// Handle when the DOM is ready
	ready: function( wait ) {

		// Abort if there are pending holds or we're already ready
		if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
			return;
		}

		// Remember that the DOM is ready
		jQuery.isReady = true;

		// If a normal DOM Ready event fired, decrement, and wait if need be
		if ( wait !== true && --jQuery.readyWait > 0 ) {
			return;
		}

		// If there are functions bound, to execute
		readyList.resolveWith( document, [ jQuery ] );
	}
} );

jQuery.ready.then = readyList.then;

// The ready event handler and self cleanup method
function completed() {
	document.removeEventListener( "DOMContentLoaded", completed );
	window.removeEventListener( "load", completed );
	jQuery.ready();
}

// Catch cases where $(document).ready() is called
// after the browser event has already occurred.
// Support: IE <=9 - 10 only
// Older IE sometimes signals "interactive" too soon
if ( document.readyState === "complete" ||
	( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {

	// Handle it asynchronously to allow scripts the opportunity to delay ready
	window.setTimeout( jQuery.ready );

} else {

	// Use the handy event callback
	document.addEventListener( "DOMContentLoaded", completed );

	// A fallback to window.onload, that will always work
	window.addEventListener( "load", completed );
}




// Multifunctional method to get and set values of a collection
// The value/s can optionally be executed if it's a function
var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
	var i = 0,
		len = elems.length,
		bulk = key == null;

	// Sets many values
	if ( toType( key ) === "object" ) {
		chainable = true;
		for ( i in key ) {
			access( elems, fn, i, key[ i ], true, emptyGet, raw );
		}

	// Sets one value
	} else if ( value !== undefined ) {
		chainable = true;

		if ( !isFunction( value ) ) {
			raw = true;
		}

		if ( bulk ) {

			// Bulk operations run against the entire set
			if ( raw ) {
				fn.call( elems, value );
				fn = null;

			// ...except when executing function values
			} else {
				bulk = fn;
				fn = function( elem, _key, value ) {
					return bulk.call( jQuery( elem ), value );
				};
			}
		}

		if ( fn ) {
			for ( ; i < len; i++ ) {
				fn(
					elems[ i ], key, raw ?
						value :
						value.call( elems[ i ], i, fn( elems[ i ], key ) )
				);
			}
		}
	}

	if ( chainable ) {
		return elems;
	}

	// Gets
	if ( bulk ) {
		return fn.call( elems );
	}

	return len ? fn( elems[ 0 ], key ) : emptyGet;
};


// Matches dashed string for camelizing
var rmsPrefix = /^-ms-/,
	rdashAlpha = /-([a-z])/g;

// Used by camelCase as callback to replace()
function fcamelCase( _all, letter ) {
	return letter.toUpperCase();
}

// Convert dashed to camelCase; used by the css and data modules
// Support: IE <=9 - 11, Edge 12 - 15
// Microsoft forgot to hump their vendor prefix (trac-9572)
function camelCase( string ) {
	return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
}
var acceptData = function( owner ) {

	// Accepts only:
	//  - Node
	//    - Node.ELEMENT_NODE
	//    - Node.DOCUMENT_NODE
	//  - Object
	//    - Any
	return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
};




function Data() {
	this.expando = jQuery.expando + Data.uid++;
}

Data.uid = 1;

Data.prototype = {

	cache: function( owner ) {

		// Check if the owner object already has a cache
		var value = owner[ this.expando ];

		// If not, create one
		if ( !value ) {
			value = {};

			// We can accept data for non-element nodes in modern browsers,
			// but we should not, see trac-8335.
			// Always return an empty object.
			if ( acceptData( owner ) ) {

				// If it is a node unlikely to be stringify-ed or looped over
				// use plain assignment
				if ( owner.nodeType ) {
					owner[ this.expando ] = value;

				// Otherwise secure it in a non-enumerable property
				// configurable must be true to allow the property to be
				// deleted when data is removed
				} else {
					Object.defineProperty( owner, this.expando, {
						value: value,
						configurable: true
					} );
				}
			}
		}

		return value;
	},
	set: function( owner, data, value ) {
		var prop,
			cache = this.cache( owner );

		// Handle: [ owner, key, value ] args
		// Always use camelCase key (gh-2257)
		if ( typeof data === "string" ) {
			cache[ camelCase( data ) ] = value;

		// Handle: [ owner, { properties } ] args
		} else {

			// Copy the properties one-by-one to the cache object
			for ( prop in data ) {
				cache[ camelCase( prop ) ] = data[ prop ];
			}
		}
		return cache;
	},
	get: function( owner, key ) {
		return key === undefined ?
			this.cache( owner ) :

			// Always use camelCase key (gh-2257)
			owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];
	},
	access: function( owner, key, value ) {

		// In cases where either:
		//
		//   1. No key was specified
		//   2. A string key was specified, but no value provided
		//
		// Take the "read" path and allow the get method to determine
		// which value to return, respectively either:
		//
		//   1. The entire cache object
		//   2. The data stored at the key
		//
		if ( key === undefined ||
				( ( key && typeof key === "string" ) && value === undefined ) ) {

			return this.get( owner, key );
		}

		// When the key is not a string, or both a key and value
		// are specified, set or extend (existing objects) with either:
		//
		//   1. An object of properties
		//   2. A key and value
		//
		this.set( owner, key, value );

		// Since the "set" path can have two possible entry points
		// return the expected data based on which path was taken[*]
		return value !== undefined ? value : key;
	},
	remove: function( owner, key ) {
		var i,
			cache = owner[ this.expando ];

		if ( cache === undefined ) {
			return;
		}

		if ( key !== undefined ) {

			// Support array or space separated string of keys
			if ( Array.isArray( key ) ) {

				// If key is an array of keys...
				// We always set camelCase keys, so remove that.
				key = key.map( camelCase );
			} else {
				key = camelCase( key );

				// If a key with the spaces exists, use it.
				// Otherwise, create an array by matching non-whitespace
				key = key in cache ?
					[ key ] :
					( key.match( rnothtmlwhite ) || [] );
			}

			i = key.length;

			while ( i-- ) {
				delete cache[ key[ i ] ];
			}
		}

		// Remove the expando if there's no more data
		if ( key === undefined || jQuery.isEmptyObject( cache ) ) {

			// Support: Chrome <=35 - 45
			// Webkit & Blink performance suffers when deleting properties
			// from DOM nodes, so set to undefined instead
			// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)
			if ( owner.nodeType ) {
				owner[ this.expando ] = undefined;
			} else {
				delete owner[ this.expando ];
			}
		}
	},
	hasData: function( owner ) {
		var cache = owner[ this.expando ];
		return cache !== undefined && !jQuery.isEmptyObject( cache );
	}
};
var dataPriv = new Data();

var dataUser = new Data();



//	Implementation Summary
//
//	1. Enforce API surface and semantic compatibility with 1.9.x branch
//	2. Improve the module's maintainability by reducing the storage
//		paths to a single mechanism.
//	3. Use the same single mechanism to support "private" and "user" data.
//	4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
//	5. Avoid exposing implementation details on user objects (eg. expando properties)
//	6. Provide a clear path for implementation upgrade to WeakMap in 2014

var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
	rmultiDash = /[A-Z]/g;

function getData( data ) {
	if ( data === "true" ) {
		return true;
	}

	if ( data === "false" ) {
		return false;
	}

	if ( data === "null" ) {
		return null;
	}

	// Only convert to a number if it doesn't change the string
	if ( data === +data + "" ) {
		return +data;
	}

	if ( rbrace.test( data ) ) {
		return JSON.parse( data );
	}

	return data;
}

function dataAttr( elem, key, data ) {
	var name;

	// If nothing was found internally, try to fetch any
	// data from the HTML5 data-* attribute
	if ( data === undefined && elem.nodeType === 1 ) {
		name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
		data = elem.getAttribute( name );

		if ( typeof data === "string" ) {
			try {
				data = getData( data );
			} catch ( e ) {}

			// Make sure we set the data so it isn't changed later
			dataUser.set( elem, key, data );
		} else {
			data = undefined;
		}
	}
	return data;
}

jQuery.extend( {
	hasData: function( elem ) {
		return dataUser.hasData( elem ) || dataPriv.hasData( elem );
	},

	data: function( elem, name, data ) {
		return dataUser.access( elem, name, data );
	},

	removeData: function( elem, name ) {
		dataUser.remove( elem, name );
	},

	// TODO: Now that all calls to _data and _removeData have been replaced
	// with direct calls to dataPriv methods, these can be deprecated.
	_data: function( elem, name, data ) {
		return dataPriv.access( elem, name, data );
	},

	_removeData: function( elem, name ) {
		dataPriv.remove( elem, name );
	}
} );

jQuery.fn.extend( {
	data: function( key, value ) {
		var i, name, data,
			elem = this[ 0 ],
			attrs = elem && elem.attributes;

		// Gets all values
		if ( key === undefined ) {
			if ( this.length ) {
				data = dataUser.get( elem );

				if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
					i = attrs.length;
					while ( i-- ) {

						// Support: IE 11 only
						// The attrs elements can be null (trac-14894)
						if ( attrs[ i ] ) {
							name = attrs[ i ].name;
							if ( name.indexOf( "data-" ) === 0 ) {
								name = camelCase( name.slice( 5 ) );
								dataAttr( elem, name, data[ name ] );
							}
						}
					}
					dataPriv.set( elem, "hasDataAttrs", true );
				}
			}

			return data;
		}

		// Sets multiple values
		if ( typeof key === "object" ) {
			return this.each( function() {
				dataUser.set( this, key );
			} );
		}

		return access( this, function( value ) {
			var data;

			// The calling jQuery object (element matches) is not empty
			// (and therefore has an element appears at this[ 0 ]) and the
			// `value` parameter was not undefined. An empty jQuery object
			// will result in `undefined` for elem = this[ 0 ] which will
			// throw an exception if an attempt to read a data cache is made.
			if ( elem && value === undefined ) {

				// Attempt to get data from the cache
				// The key will always be camelCased in Data
				data = dataUser.get( elem, key );
				if ( data !== undefined ) {
					return data;
				}

				// Attempt to "discover" the data in
				// HTML5 custom data-* attrs
				data = dataAttr( elem, key );
				if ( data !== undefined ) {
					return data;
				}

				// We tried really hard, but the data doesn't exist.
				return;
			}

			// Set the data...
			this.each( function() {

				// We always store the camelCased key
				dataUser.set( this, key, value );
			} );
		}, null, value, arguments.length > 1, null, true );
	},

	removeData: function( key ) {
		return this.each( function() {
			dataUser.remove( this, key );
		} );
	}
} );


jQuery.extend( {
	queue: function( elem, type, data ) {
		var queue;

		if ( elem ) {
			type = ( type || "fx" ) + "queue";
			queue = dataPriv.get( elem, type );

			// Speed up dequeue by getting out quickly if this is just a lookup
			if ( data ) {
				if ( !queue || Array.isArray( data ) ) {
					queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
				} else {
					queue.push( data );
				}
			}
			return queue || [];
		}
	},

	dequeue: function( elem, type ) {
		type = type || "fx";

		var queue = jQuery.queue( elem, type ),
			startLength = queue.length,
			fn = queue.shift(),
			hooks = jQuery._queueHooks( elem, type ),
			next = function() {
				jQuery.dequeue( elem, type );
			};

		// If the fx queue is dequeued, always remove the progress sentinel
		if ( fn === "inprogress" ) {
			fn = queue.shift();
			startLength--;
		}

		if ( fn ) {

			// Add a progress sentinel to prevent the fx queue from being
			// automatically dequeued
			if ( type === "fx" ) {
				queue.unshift( "inprogress" );
			}

			// Clear up the last queue stop function
			delete hooks.stop;
			fn.call( elem, next, hooks );
		}

		if ( !startLength && hooks ) {
			hooks.empty.fire();
		}
	},

	// Not public - generate a queueHooks object, or return the current one
	_queueHooks: function( elem, type ) {
		var key = type + "queueHooks";
		return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
			empty: jQuery.Callbacks( "once memory" ).add( function() {
				dataPriv.remove( elem, [ type + "queue", key ] );
			} )
		} );
	}
} );

jQuery.fn.extend( {
	queue: function( type, data ) {
		var setter = 2;

		if ( typeof type !== "string" ) {
			data = type;
			type = "fx";
			setter--;
		}

		if ( arguments.length < setter ) {
			return jQuery.queue( this[ 0 ], type );
		}

		return data === undefined ?
			this :
			this.each( function() {
				var queue = jQuery.queue( this, type, data );

				// Ensure a hooks for this queue
				jQuery._queueHooks( this, type );

				if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
					jQuery.dequeue( this, type );
				}
			} );
	},
	dequeue: function( type ) {
		return this.each( function() {
			jQuery.dequeue( this, type );
		} );
	},
	clearQueue: function( type ) {
		return this.queue( type || "fx", [] );
	},

	// Get a promise resolved when queues of a certain type
	// are emptied (fx is the type by default)
	promise: function( type, obj ) {
		var tmp,
			count = 1,
			defer = jQuery.Deferred(),
			elements = this,
			i = this.length,
			resolve = function() {
				if ( !( --count ) ) {
					defer.resolveWith( elements, [ elements ] );
				}
			};

		if ( typeof type !== "string" ) {
			obj = type;
			type = undefined;
		}
		type = type || "fx";

		while ( i-- ) {
			tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
			if ( tmp && tmp.empty ) {
				count++;
				tmp.empty.add( resolve );
			}
		}
		resolve();
		return defer.promise( obj );
	}
} );
var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;

var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );


var cssExpand = [ "Top", "Right", "Bottom", "Left" ];

var documentElement = document.documentElement;



	var isAttached = function( elem ) {
			return jQuery.contains( elem.ownerDocument, elem );
		},
		composed = { composed: true };

	// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only
	// Check attachment across shadow DOM boundaries when possible (gh-3504)
	// Support: iOS 10.0-10.2 only
	// Early iOS 10 versions support `attachShadow` but not `getRootNode`,
	// leading to errors. We need to check for `getRootNode`.
	if ( documentElement.getRootNode ) {
		isAttached = function( elem ) {
			return jQuery.contains( elem.ownerDocument, elem ) ||
				elem.getRootNode( composed ) === elem.ownerDocument;
		};
	}
var isHiddenWithinTree = function( elem, el ) {

		// isHiddenWithinTree might be called from jQuery#filter function;
		// in that case, element will be second argument
		elem = el || elem;

		// Inline style trumps all
		return elem.style.display === "none" ||
			elem.style.display === "" &&

			// Otherwise, check computed style
			// Support: Firefox <=43 - 45
			// Disconnected elements can have computed display: none, so first confirm that elem is
			// in the document.
			isAttached( elem ) &&

			jQuery.css( elem, "display" ) === "none";
	};



function adjustCSS( elem, prop, valueParts, tween ) {
	var adjusted, scale,
		maxIterations = 20,
		currentValue = tween ?
			function() {
				return tween.cur();
			} :
			function() {
				return jQuery.css( elem, prop, "" );
			},
		initial = currentValue(),
		unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),

		// Starting value computation is required for potential unit mismatches
		initialInUnit = elem.nodeType &&
			( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
			rcssNum.exec( jQuery.css( elem, prop ) );

	if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {

		// Support: Firefox <=54
		// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)
		initial = initial / 2;

		// Trust units reported by jQuery.css
		unit = unit || initialInUnit[ 3 ];

		// Iteratively approximate from a nonzero starting point
		initialInUnit = +initial || 1;

		while ( maxIterations-- ) {

			// Evaluate and update our best guess (doubling guesses that zero out).
			// Finish if the scale equals or crosses 1 (making the old*new product non-positive).
			jQuery.style( elem, prop, initialInUnit + unit );
			if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {
				maxIterations = 0;
			}
			initialInUnit = initialInUnit / scale;

		}

		initialInUnit = initialInUnit * 2;
		jQuery.style( elem, prop, initialInUnit + unit );

		// Make sure we update the tween properties later on
		valueParts = valueParts || [];
	}

	if ( valueParts ) {
		initialInUnit = +initialInUnit || +initial || 0;

		// Apply relative offset (+=/-=) if specified
		adjusted = valueParts[ 1 ] ?
			initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
			+valueParts[ 2 ];
		if ( tween ) {
			tween.unit = unit;
			tween.start = initialInUnit;
			tween.end = adjusted;
		}
	}
	return adjusted;
}


var defaultDisplayMap = {};

function getDefaultDisplay( elem ) {
	var temp,
		doc = elem.ownerDocument,
		nodeName = elem.nodeName,
		display = defaultDisplayMap[ nodeName ];

	if ( display ) {
		return display;
	}

	temp = doc.body.appendChild( doc.createElement( nodeName ) );
	display = jQuery.css( temp, "display" );

	temp.parentNode.removeChild( temp );

	if ( display === "none" ) {
		display = "block";
	}
	defaultDisplayMap[ nodeName ] = display;

	return display;
}

function showHide( elements, show ) {
	var display, elem,
		values = [],
		index = 0,
		length = elements.length;

	// Determine new display value for elements that need to change
	for ( ; index < length; index++ ) {
		elem = elements[ index ];
		if ( !elem.style ) {
			continue;
		}

		display = elem.style.display;
		if ( show ) {

			// Since we force visibility upon cascade-hidden elements, an immediate (and slow)
			// check is required in this first loop unless we have a nonempty display value (either
			// inline or about-to-be-restored)
			if ( display === "none" ) {
				values[ index ] = dataPriv.get( elem, "display" ) || null;
				if ( !values[ index ] ) {
					elem.style.display = "";
				}
			}
			if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {
				values[ index ] = getDefaultDisplay( elem );
			}
		} else {
			if ( display !== "none" ) {
				values[ index ] = "none";

				// Remember what we're overwriting
				dataPriv.set( elem, "display", display );
			}
		}
	}

	// Set the display of the elements in a second loop to avoid constant reflow
	for ( index = 0; index < length; index++ ) {
		if ( values[ index ] != null ) {
			elements[ index ].style.display = values[ index ];
		}
	}

	return elements;
}

jQuery.fn.extend( {
	show: function() {
		return showHide( this, true );
	},
	hide: function() {
		return showHide( this );
	},
	toggle: function( state ) {
		if ( typeof state === "boolean" ) {
			return state ? this.show() : this.hide();
		}

		return this.each( function() {
			if ( isHiddenWithinTree( this ) ) {
				jQuery( this ).show();
			} else {
				jQuery( this ).hide();
			}
		} );
	}
} );
var rcheckableType = ( /^(?:checkbox|radio)$/i );

var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i );

var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i );



( function() {
	var fragment = document.createDocumentFragment(),
		div = fragment.appendChild( document.createElement( "div" ) ),
		input = document.createElement( "input" );

	// Support: Android 4.0 - 4.3 only
	// Check state lost if the name is set (trac-11217)
	// Support: Windows Web Apps (WWA)
	// `name` and `type` must use .setAttribute for WWA (trac-14901)
	input.setAttribute( "type", "radio" );
	input.setAttribute( "checked", "checked" );
	input.setAttribute( "name", "t" );

	div.appendChild( input );

	// Support: Android <=4.1 only
	// Older WebKit doesn't clone checked state correctly in fragments
	support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;

	// Support: IE <=11 only
	// Make sure textarea (and checkbox) defaultValue is properly cloned
	div.innerHTML = "<textarea>x</textarea>";
	support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;

	// Support: IE <=9 only
	// IE <=9 replaces <option> tags with their contents when inserted outside of
	// the select element.
	div.innerHTML = "<option></option>";
	support.option = !!div.lastChild;
} )();


// We have to close these tags to support XHTML (trac-13200)
var wrapMap = {

	// XHTML parsers do not magically insert elements in the
	// same way that tag soup parsers do. So we cannot shorten
	// this by omitting <tbody> or other required elements.
	thead: [ 1, "<table>", "</table>" ],
	col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
	tr: [ 2, "<table><tbody>", "</tbody></table>" ],
	td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],

	_default: [ 0, "", "" ]
};

wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
wrapMap.th = wrapMap.td;

// Support: IE <=9 only
if ( !support.option ) {
	wrapMap.optgroup = wrapMap.option = [ 1, "<select multiple='multiple'>", "</select>" ];
}


function getAll( context, tag ) {

	// Support: IE <=9 - 11 only
	// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)
	var ret;

	if ( typeof context.getElementsByTagName !== "undefined" ) {
		ret = context.getElementsByTagName( tag || "*" );

	} else if ( typeof context.querySelectorAll !== "undefined" ) {
		ret = context.querySelectorAll( tag || "*" );

	} else {
		ret = [];
	}

	if ( tag === undefined || tag && nodeName( context, tag ) ) {
		return jQuery.merge( [ context ], ret );
	}

	return ret;
}


// Mark scripts as having already been evaluated
function setGlobalEval( elems, refElements ) {
	var i = 0,
		l = elems.length;

	for ( ; i < l; i++ ) {
		dataPriv.set(
			elems[ i ],
			"globalEval",
			!refElements || dataPriv.get( refElements[ i ], "globalEval" )
		);
	}
}


var rhtml = /<|&#?\w+;/;

function buildFragment( elems, context, scripts, selection, ignored ) {
	var elem, tmp, tag, wrap, attached, j,
		fragment = context.createDocumentFragment(),
		nodes = [],
		i = 0,
		l = elems.length;

	for ( ; i < l; i++ ) {
		elem = elems[ i ];

		if ( elem || elem === 0 ) {

			// Add nodes directly
			if ( toType( elem ) === "object" ) {

				// Support: Android <=4.0 only, PhantomJS 1 only
				// push.apply(_, arraylike) throws on ancient WebKit
				jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );

			// Convert non-html into a text node
			} else if ( !rhtml.test( elem ) ) {
				nodes.push( context.createTextNode( elem ) );

			// Convert html into DOM nodes
			} else {
				tmp = tmp || fragment.appendChild( context.createElement( "div" ) );

				// Deserialize a standard representation
				tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
				wrap = wrapMap[ tag ] || wrapMap._default;
				tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];

				// Descend through wrappers to the right content
				j = wrap[ 0 ];
				while ( j-- ) {
					tmp = tmp.lastChild;
				}

				// Support: Android <=4.0 only, PhantomJS 1 only
				// push.apply(_, arraylike) throws on ancient WebKit
				jQuery.merge( nodes, tmp.childNodes );

				// Remember the top-level container
				tmp = fragment.firstChild;

				// Ensure the created nodes are orphaned (trac-12392)
				tmp.textContent = "";
			}
		}
	}

	// Remove wrapper from fragment
	fragment.textContent = "";

	i = 0;
	while ( ( elem = nodes[ i++ ] ) ) {

		// Skip elements already in the context collection (trac-4087)
		if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
			if ( ignored ) {
				ignored.push( elem );
			}
			continue;
		}

		attached = isAttached( elem );

		// Append to fragment
		tmp = getAll( fragment.appendChild( elem ), "script" );

		// Preserve script evaluation history
		if ( attached ) {
			setGlobalEval( tmp );
		}

		// Capture executables
		if ( scripts ) {
			j = 0;
			while ( ( elem = tmp[ j++ ] ) ) {
				if ( rscriptType.test( elem.type || "" ) ) {
					scripts.push( elem );
				}
			}
		}
	}

	return fragment;
}


var rtypenamespace = /^([^.]*)(?:\.(.+)|)/;

function returnTrue() {
	return true;
}

function returnFalse() {
	return false;
}

function on( elem, types, selector, data, fn, one ) {
	var origFn, type;

	// Types can be a map of types/handlers
	if ( typeof types === "object" ) {

		// ( types-Object, selector, data )
		if ( typeof selector !== "string" ) {

			// ( types-Object, data )
			data = data || selector;
			selector = undefined;
		}
		for ( type in types ) {
			on( elem, type, selector, data, types[ type ], one );
		}
		return elem;
	}

	if ( data == null && fn == null ) {

		// ( types, fn )
		fn = selector;
		data = selector = undefined;
	} else if ( fn == null ) {
		if ( typeof selector === "string" ) {

			// ( types, selector, fn )
			fn = data;
			data = undefined;
		} else {

			// ( types, data, fn )
			fn = data;
			data = selector;
			selector = undefined;
		}
	}
	if ( fn === false ) {
		fn = returnFalse;
	} else if ( !fn ) {
		return elem;
	}

	if ( one === 1 ) {
		origFn = fn;
		fn = function( event ) {

			// Can use an empty set, since event contains the info
			jQuery().off( event );
			return origFn.apply( this, arguments );
		};

		// Use same guid so caller can remove using origFn
		fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
	}
	return elem.each( function() {
		jQuery.event.add( this, types, fn, data, selector );
	} );
}

/*
 * Helper functions for managing events -- not part of the public interface.
 * Props to Dean Edwards' addEvent library for many of the ideas.
 */
jQuery.event = {

	global: {},

	add: function( elem, types, handler, data, selector ) {

		var handleObjIn, eventHandle, tmp,
			events, t, handleObj,
			special, handlers, type, namespaces, origType,
			elemData = dataPriv.get( elem );

		// Only attach events to objects that accept data
		if ( !acceptData( elem ) ) {
			return;
		}

		// Caller can pass in an object of custom data in lieu of the handler
		if ( handler.handler ) {
			handleObjIn = handler;
			handler = handleObjIn.handler;
			selector = handleObjIn.selector;
		}

		// Ensure that invalid selectors throw exceptions at attach time
		// Evaluate against documentElement in case elem is a non-element node (e.g., document)
		if ( selector ) {
			jQuery.find.matchesSelector( documentElement, selector );
		}

		// Make sure that the handler has a unique ID, used to find/remove it later
		if ( !handler.guid ) {
			handler.guid = jQuery.guid++;
		}

		// Init the element's event structure and main handler, if this is the first
		if ( !( events = elemData.events ) ) {
			events = elemData.events = Object.create( null );
		}
		if ( !( eventHandle = elemData.handle ) ) {
			eventHandle = elemData.handle = function( e ) {

				// Discard the second event of a jQuery.event.trigger() and
				// when an event is called after a page has unloaded
				return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
					jQuery.event.dispatch.apply( elem, arguments ) : undefined;
			};
		}

		// Handle multiple events separated by a space
		types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
		t = types.length;
		while ( t-- ) {
			tmp = rtypenamespace.exec( types[ t ] ) || [];
			type = origType = tmp[ 1 ];
			namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();

			// There *must* be a type, no attaching namespace-only handlers
			if ( !type ) {
				continue;
			}

			// If event changes its type, use the special event handlers for the changed type
			special = jQuery.event.special[ type ] || {};

			// If selector defined, determine special event api type, otherwise given type
			type = ( selector ? special.delegateType : special.bindType ) || type;

			// Update special based on newly reset type
			special = jQuery.event.special[ type ] || {};

			// handleObj is passed to all event handlers
			handleObj = jQuery.extend( {
				type: type,
				origType: origType,
				data: data,
				handler: handler,
				guid: handler.guid,
				selector: selector,
				needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
				namespace: namespaces.join( "." )
			}, handleObjIn );

			// Init the event handler queue if we're the first
			if ( !( handlers = events[ type ] ) ) {
				handlers = events[ type ] = [];
				handlers.delegateCount = 0;

				// Only use addEventListener if the special events handler returns false
				if ( !special.setup ||
					special.setup.call( elem, data, namespaces, eventHandle ) === false ) {

					if ( elem.addEventListener ) {
						elem.addEventListener( type, eventHandle );
					}
				}
			}

			if ( special.add ) {
				special.add.call( elem, handleObj );

				if ( !handleObj.handler.guid ) {
					handleObj.handler.guid = handler.guid;
				}
			}

			// Add to the element's handler list, delegates in front
			if ( selector ) {
				handlers.splice( handlers.delegateCount++, 0, handleObj );
			} else {
				handlers.push( handleObj );
			}

			// Keep track of which events have ever been used, for event optimization
			jQuery.event.global[ type ] = true;
		}

	},

	// Detach an event or set of events from an element
	remove: function( elem, types, handler, selector, mappedTypes ) {

		var j, origCount, tmp,
			events, t, handleObj,
			special, handlers, type, namespaces, origType,
			elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );

		if ( !elemData || !( events = elemData.events ) ) {
			return;
		}

		// Once for each type.namespace in types; type may be omitted
		types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
		t = types.length;
		while ( t-- ) {
			tmp = rtypenamespace.exec( types[ t ] ) || [];
			type = origType = tmp[ 1 ];
			namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();

			// Unbind all events (on this namespace, if provided) for the element
			if ( !type ) {
				for ( type in events ) {
					jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
				}
				continue;
			}

			special = jQuery.event.special[ type ] || {};
			type = ( selector ? special.delegateType : special.bindType ) || type;
			handlers = events[ type ] || [];
			tmp = tmp[ 2 ] &&
				new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );

			// Remove matching events
			origCount = j = handlers.length;
			while ( j-- ) {
				handleObj = handlers[ j ];

				if ( ( mappedTypes || origType === handleObj.origType ) &&
					( !handler || handler.guid === handleObj.guid ) &&
					( !tmp || tmp.test( handleObj.namespace ) ) &&
					( !selector || selector === handleObj.selector ||
						selector === "**" && handleObj.selector ) ) {
					handlers.splice( j, 1 );

					if ( handleObj.selector ) {
						handlers.delegateCount--;
					}
					if ( special.remove ) {
						special.remove.call( elem, handleObj );
					}
				}
			}

			// Remove generic event handler if we removed something and no more handlers exist
			// (avoids potential for endless recursion during removal of special event handlers)
			if ( origCount && !handlers.length ) {
				if ( !special.teardown ||
					special.teardown.call( elem, namespaces, elemData.handle ) === false ) {

					jQuery.removeEvent( elem, type, elemData.handle );
				}

				delete events[ type ];
			}
		}

		// Remove data and the expando if it's no longer used
		if ( jQuery.isEmptyObject( events ) ) {
			dataPriv.remove( elem, "handle events" );
		}
	},

	dispatch: function( nativeEvent ) {

		var i, j, ret, matched, handleObj, handlerQueue,
			args = new Array( arguments.length ),

			// Make a writable jQuery.Event from the native event object
			event = jQuery.event.fix( nativeEvent ),

			handlers = (
				dataPriv.get( this, "events" ) || Object.create( null )
			)[ event.type ] || [],
			special = jQuery.event.special[ event.type ] || {};

		// Use the fix-ed jQuery.Event rather than the (read-only) native event
		args[ 0 ] = event;

		for ( i = 1; i < arguments.length; i++ ) {
			args[ i ] = arguments[ i ];
		}

		event.delegateTarget = this;

		// Call the preDispatch hook for the mapped type, and let it bail if desired
		if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
			return;
		}

		// Determine handlers
		handlerQueue = jQuery.event.handlers.call( this, event, handlers );

		// Run delegates first; they may want to stop propagation beneath us
		i = 0;
		while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
			event.currentTarget = matched.elem;

			j = 0;
			while ( ( handleObj = matched.handlers[ j++ ] ) &&
				!event.isImmediatePropagationStopped() ) {

				// If the event is namespaced, then each handler is only invoked if it is
				// specially universal or its namespaces are a superset of the event's.
				if ( !event.rnamespace || handleObj.namespace === false ||
					event.rnamespace.test( handleObj.namespace ) ) {

					event.handleObj = handleObj;
					event.data = handleObj.data;

					ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
						handleObj.handler ).apply( matched.elem, args );

					if ( ret !== undefined ) {
						if ( ( event.result = ret ) === false ) {
							event.preventDefault();
							event.stopPropagation();
						}
					}
				}
			}
		}

		// Call the postDispatch hook for the mapped type
		if ( special.postDispatch ) {
			special.postDispatch.call( this, event );
		}

		return event.result;
	},

	handlers: function( event, handlers ) {
		var i, handleObj, sel, matchedHandlers, matchedSelectors,
			handlerQueue = [],
			delegateCount = handlers.delegateCount,
			cur = event.target;

		// Find delegate handlers
		if ( delegateCount &&

			// Support: IE <=9
			// Black-hole SVG <use> instance trees (trac-13180)
			cur.nodeType &&

			// Support: Firefox <=42
			// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
			// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
			// Support: IE 11 only
			// ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
			!( event.type === "click" && event.button >= 1 ) ) {

			for ( ; cur !== this; cur = cur.parentNode || this ) {

				// Don't check non-elements (trac-13208)
				// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)
				if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {
					matchedHandlers = [];
					matchedSelectors = {};
					for ( i = 0; i < delegateCount; i++ ) {
						handleObj = handlers[ i ];

						// Don't conflict with Object.prototype properties (trac-13203)
						sel = handleObj.selector + " ";

						if ( matchedSelectors[ sel ] === undefined ) {
							matchedSelectors[ sel ] = handleObj.needsContext ?
								jQuery( sel, this ).index( cur ) > -1 :
								jQuery.find( sel, this, null, [ cur ] ).length;
						}
						if ( matchedSelectors[ sel ] ) {
							matchedHandlers.push( handleObj );
						}
					}
					if ( matchedHandlers.length ) {
						handlerQueue.push( { elem: cur, handlers: matchedHandlers } );
					}
				}
			}
		}

		// Add the remaining (directly-bound) handlers
		cur = this;
		if ( delegateCount < handlers.length ) {
			handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );
		}

		return handlerQueue;
	},

	addProp: function( name, hook ) {
		Object.defineProperty( jQuery.Event.prototype, name, {
			enumerable: true,
			configurable: true,

			get: isFunction( hook ) ?
				function() {
					if ( this.originalEvent ) {
						return hook( this.originalEvent );
					}
				} :
				function() {
					if ( this.originalEvent ) {
						return this.originalEvent[ name ];
					}
				},

			set: function( value ) {
				Object.defineProperty( this, name, {
					enumerable: true,
					configurable: true,
					writable: true,
					value: value
				} );
			}
		} );
	},

	fix: function( originalEvent ) {
		return originalEvent[ jQuery.expando ] ?
			originalEvent :
			new jQuery.Event( originalEvent );
	},

	special: {
		load: {

			// Prevent triggered image.load events from bubbling to window.load
			noBubble: true
		},
		click: {

			// Utilize native event to ensure correct state for checkable inputs
			setup: function( data ) {

				// For mutual compressibility with _default, replace `this` access with a local var.
				// `|| data` is dead code meant only to preserve the variable through minification.
				var el = this || data;

				// Claim the first handler
				if ( rcheckableType.test( el.type ) &&
					el.click && nodeName( el, "input" ) ) {

					// dataPriv.set( el, "click", ... )
					leverageNative( el, "click", true );
				}

				// Return false to allow normal processing in the caller
				return false;
			},
			trigger: function( data ) {

				// For mutual compressibility with _default, replace `this` access with a local var.
				// `|| data` is dead code meant only to preserve the variable through minification.
				var el = this || data;

				// Force setup before triggering a click
				if ( rcheckableType.test( el.type ) &&
					el.click && nodeName( el, "input" ) ) {

					leverageNative( el, "click" );
				}

				// Return non-false to allow normal event-path propagation
				return true;
			},

			// For cross-browser consistency, suppress native .click() on links
			// Also prevent it if we're currently inside a leveraged native-event stack
			_default: function( event ) {
				var target = event.target;
				return rcheckableType.test( target.type ) &&
					target.click && nodeName( target, "input" ) &&
					dataPriv.get( target, "click" ) ||
					nodeName( target, "a" );
			}
		},

		beforeunload: {
			postDispatch: function( event ) {

				// Support: Firefox 20+
				// Firefox doesn't alert if the returnValue field is not set.
				if ( event.result !== undefined && event.originalEvent ) {
					event.originalEvent.returnValue = event.result;
				}
			}
		}
	}
};

// Ensure the presence of an event listener that handles manually-triggered
// synthetic events by interrupting progress until reinvoked in response to
// *native* events that it fires directly, ensuring that state changes have
// already occurred before other listeners are invoked.
function leverageNative( el, type, isSetup ) {

	// Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add
	if ( !isSetup ) {
		if ( dataPriv.get( el, type ) === undefined ) {
			jQuery.event.add( el, type, returnTrue );
		}
		return;
	}

	// Register the controller as a special universal handler for all event namespaces
	dataPriv.set( el, type, false );
	jQuery.event.add( el, type, {
		namespace: false,
		handler: function( event ) {
			var result,
				saved = dataPriv.get( this, type );

			if ( ( event.isTrigger & 1 ) && this[ type ] ) {

				// Interrupt processing of the outer synthetic .trigger()ed event
				if ( !saved ) {

					// Store arguments for use when handling the inner native event
					// There will always be at least one argument (an event object), so this array
					// will not be confused with a leftover capture object.
					saved = slice.call( arguments );
					dataPriv.set( this, type, saved );

					// Trigger the native event and capture its result
					this[ type ]();
					result = dataPriv.get( this, type );
					dataPriv.set( this, type, false );

					if ( saved !== result ) {

						// Cancel the outer synthetic event
						event.stopImmediatePropagation();
						event.preventDefault();

						return result;
					}

				// If this is an inner synthetic event for an event with a bubbling surrogate
				// (focus or blur), assume that the surrogate already propagated from triggering
				// the native event and prevent that from happening again here.
				// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the
				// bubbling surrogate propagates *after* the non-bubbling base), but that seems
				// less bad than duplication.
				} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {
					event.stopPropagation();
				}

			// If this is a native event triggered above, everything is now in order
			// Fire an inner synthetic event with the original arguments
			} else if ( saved ) {

				// ...and capture the result
				dataPriv.set( this, type, jQuery.event.trigger(
					saved[ 0 ],
					saved.slice( 1 ),
					this
				) );

				// Abort handling of the native event by all jQuery handlers while allowing
				// native handlers on the same element to run. On target, this is achieved
				// by stopping immediate propagation just on the jQuery event. However,
				// the native event is re-wrapped by a jQuery one on each level of the
				// propagation so the only way to stop it for jQuery is to stop it for
				// everyone via native `stopPropagation()`. This is not a problem for
				// focus/blur which don't bubble, but it does also stop click on checkboxes
				// and radios. We accept this limitation.
				event.stopPropagation();
				event.isImmediatePropagationStopped = returnTrue;
			}
		}
	} );
}

jQuery.removeEvent = function( elem, type, handle ) {

	// This "if" is needed for plain objects
	if ( elem.removeEventListener ) {
		elem.removeEventListener( type, handle );
	}
};

jQuery.Event = function( src, props ) {

	// Allow instantiation without the 'new' keyword
	if ( !( this instanceof jQuery.Event ) ) {
		return new jQuery.Event( src, props );
	}

	// Event object
	if ( src && src.type ) {
		this.originalEvent = src;
		this.type = src.type;

		// Events bubbling up the document may have been marked as prevented
		// by a handler lower down the tree; reflect the correct value.
		this.isDefaultPrevented = src.defaultPrevented ||
				src.defaultPrevented === undefined &&

				// Support: Android <=2.3 only
				src.returnValue === false ?
			returnTrue :
			returnFalse;

		// Create target properties
		// Support: Safari <=6 - 7 only
		// Target should not be a text node (trac-504, trac-13143)
		this.target = ( src.target && src.target.nodeType === 3 ) ?
			src.target.parentNode :
			src.target;

		this.currentTarget = src.currentTarget;
		this.relatedTarget = src.relatedTarget;

	// Event type
	} else {
		this.type = src;
	}

	// Put explicitly provided properties onto the event object
	if ( props ) {
		jQuery.extend( this, props );
	}

	// Create a timestamp if incoming event doesn't have one
	this.timeStamp = src && src.timeStamp || Date.now();

	// Mark it as fixed
	this[ jQuery.expando ] = true;
};

// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
jQuery.Event.prototype = {
	constructor: jQuery.Event,
	isDefaultPrevented: returnFalse,
	isPropagationStopped: returnFalse,
	isImmediatePropagationStopped: returnFalse,
	isSimulated: false,

	preventDefault: function() {
		var e = this.originalEvent;

		this.isDefaultPrevented = returnTrue;

		if ( e && !this.isSimulated ) {
			e.preventDefault();
		}
	},
	stopPropagation: function() {
		var e = this.originalEvent;

		this.isPropagationStopped = returnTrue;

		if ( e && !this.isSimulated ) {
			e.stopPropagation();
		}
	},
	stopImmediatePropagation: function() {
		var e = this.originalEvent;

		this.isImmediatePropagationStopped = returnTrue;

		if ( e && !this.isSimulated ) {
			e.stopImmediatePropagation();
		}

		this.stopPropagation();
	}
};

// Includes all common event props including KeyEvent and MouseEvent specific props
jQuery.each( {
	altKey: true,
	bubbles: true,
	cancelable: true,
	changedTouches: true,
	ctrlKey: true,
	detail: true,
	eventPhase: true,
	metaKey: true,
	pageX: true,
	pageY: true,
	shiftKey: true,
	view: true,
	"char": true,
	code: true,
	charCode: true,
	key: true,
	keyCode: true,
	button: true,
	buttons: true,
	clientX: true,
	clientY: true,
	offsetX: true,
	offsetY: true,
	pointerId: true,
	pointerType: true,
	screenX: true,
	screenY: true,
	targetTouches: true,
	toElement: true,
	touches: true,
	which: true
}, jQuery.event.addProp );

jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {

	function focusMappedHandler( nativeEvent ) {
		if ( document.documentMode ) {

			// Support: IE 11+
			// Attach a single focusin/focusout handler on the document while someone wants
			// focus/blur. This is because the former are synchronous in IE while the latter
			// are async. In other browsers, all those handlers are invoked synchronously.

			// `handle` from private data would already wrap the event, but we need
			// to change the `type` here.
			var handle = dataPriv.get( this, "handle" ),
				event = jQuery.event.fix( nativeEvent );
			event.type = nativeEvent.type === "focusin" ? "focus" : "blur";
			event.isSimulated = true;

			// First, handle focusin/focusout
			handle( nativeEvent );

			// ...then, handle focus/blur
			//
			// focus/blur don't bubble while focusin/focusout do; simulate the former by only
			// invoking the handler at the lower level.
			if ( event.target === event.currentTarget ) {

				// The setup part calls `leverageNative`, which, in turn, calls
				// `jQuery.event.add`, so event handle will already have been set
				// by this point.
				handle( event );
			}
		} else {

			// For non-IE browsers, attach a single capturing handler on the document
			// while someone wants focusin/focusout.
			jQuery.event.simulate( delegateType, nativeEvent.target,
				jQuery.event.fix( nativeEvent ) );
		}
	}

	jQuery.event.special[ type ] = {

		// Utilize native event if possible so blur/focus sequence is correct
		setup: function() {

			var attaches;

			// Claim the first handler
			// dataPriv.set( this, "focus", ... )
			// dataPriv.set( this, "blur", ... )
			leverageNative( this, type, true );

			if ( document.documentMode ) {

				// Support: IE 9 - 11+
				// We use the same native handler for focusin & focus (and focusout & blur)
				// so we need to coordinate setup & teardown parts between those events.
				// Use `delegateType` as the key as `type` is already used by `leverageNative`.
				attaches = dataPriv.get( this, delegateType );
				if ( !attaches ) {
					this.addEventListener( delegateType, focusMappedHandler );
				}
				dataPriv.set( this, delegateType, ( attaches || 0 ) + 1 );
			} else {

				// Return false to allow normal processing in the caller
				return false;
			}
		},
		trigger: function() {

			// Force setup before trigger
			leverageNative( this, type );

			// Return non-false to allow normal event-path propagation
			return true;
		},

		teardown: function() {
			var attaches;

			if ( document.documentMode ) {
				attaches = dataPriv.get( this, delegateType ) - 1;
				if ( !attaches ) {
					this.removeEventListener( delegateType, focusMappedHandler );
					dataPriv.remove( this, delegateType );
				} else {
					dataPriv.set( this, delegateType, attaches );
				}
			} else {

				// Return false to indicate standard teardown should be applied
				return false;
			}
		},

		// Suppress native focus or blur if we're currently inside
		// a leveraged native-event stack
		_default: function( event ) {
			return dataPriv.get( event.target, type );
		},

		delegateType: delegateType
	};

	// Support: Firefox <=44
	// Firefox doesn't have focus(in | out) events
	// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
	//
	// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
	// focus(in | out) events fire after focus & blur events,
	// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
	// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
	//
	// Support: IE 9 - 11+
	// To preserve relative focusin/focus & focusout/blur event order guaranteed on the 3.x branch,
	// attach a single handler for both events in IE.
	jQuery.event.special[ delegateType ] = {
		setup: function() {

			// Handle: regular nodes (via `this.ownerDocument`), window
			// (via `this.document`) & document (via `this`).
			var doc = this.ownerDocument || this.document || this,
				dataHolder = document.documentMode ? this : doc,
				attaches = dataPriv.get( dataHolder, delegateType );

			// Support: IE 9 - 11+
			// We use the same native handler for focusin & focus (and focusout & blur)
			// so we need to coordinate setup & teardown parts between those events.
			// Use `delegateType` as the key as `type` is already used by `leverageNative`.
			if ( !attaches ) {
				if ( document.documentMode ) {
					this.addEventListener( delegateType, focusMappedHandler );
				} else {
					doc.addEventListener( type, focusMappedHandler, true );
				}
			}
			dataPriv.set( dataHolder, delegateType, ( attaches || 0 ) + 1 );
		},
		teardown: function() {
			var doc = this.ownerDocument || this.document || this,
				dataHolder = document.documentMode ? this : doc,
				attaches = dataPriv.get( dataHolder, delegateType ) - 1;

			if ( !attaches ) {
				if ( document.documentMode ) {
					this.removeEventListener( delegateType, focusMappedHandler );
				} else {
					doc.removeEventListener( type, focusMappedHandler, true );
				}
				dataPriv.remove( dataHolder, delegateType );
			} else {
				dataPriv.set( dataHolder, delegateType, attaches );
			}
		}
	};
} );

// Create mouseenter/leave events using mouseover/out and event-time checks
// so that event delegation works in jQuery.
// Do the same for pointerenter/pointerleave and pointerover/pointerout
//
// Support: Safari 7 only
// Safari sends mouseenter too often; see:
// https://bugs.chromium.org/p/chromium/issues/detail?id=470258
// for the description of the bug (it existed in older Chrome versions as well).
jQuery.each( {
	mouseenter: "mouseover",
	mouseleave: "mouseout",
	pointerenter: "pointerover",
	pointerleave: "pointerout"
}, function( orig, fix ) {
	jQuery.event.special[ orig ] = {
		delegateType: fix,
		bindType: fix,

		handle: function( event ) {
			var ret,
				target = this,
				related = event.relatedTarget,
				handleObj = event.handleObj;

			// For mouseenter/leave call the handler if related is outside the target.
			// NB: No relatedTarget if the mouse left/entered the browser window
			if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
				event.type = handleObj.origType;
				ret = handleObj.handler.apply( this, arguments );
				event.type = fix;
			}
			return ret;
		}
	};
} );

jQuery.fn.extend( {

	on: function( types, selector, data, fn ) {
		return on( this, types, selector, data, fn );
	},
	one: function( types, selector, data, fn ) {
		return on( this, types, selector, data, fn, 1 );
	},
	off: function( types, selector, fn ) {
		var handleObj, type;
		if ( types && types.preventDefault && types.handleObj ) {

			// ( event )  dispatched jQuery.Event
			handleObj = types.handleObj;
			jQuery( types.delegateTarget ).off(
				handleObj.namespace ?
					handleObj.origType + "." + handleObj.namespace :
					handleObj.origType,
				handleObj.selector,
				handleObj.handler
			);
			return this;
		}
		if ( typeof types === "object" ) {

			// ( types-object [, selector] )
			for ( type in types ) {
				this.off( type, selector, types[ type ] );
			}
			return this;
		}
		if ( selector === false || typeof selector === "function" ) {

			// ( types [, fn] )
			fn = selector;
			selector = undefined;
		}
		if ( fn === false ) {
			fn = returnFalse;
		}
		return this.each( function() {
			jQuery.event.remove( this, types, fn, selector );
		} );
	}
} );


var

	// Support: IE <=10 - 11, Edge 12 - 13 only
	// In IE/Edge using regex groups here causes severe slowdowns.
	// See https://connect.microsoft.com/IE/feedback/details/1736512/
	rnoInnerhtml = /<script|<style|<link/i,

	// checked="checked" or checked
	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,

	rcleanScript = /^\s*<!\[CDATA\[|\]\]>\s*$/g;

// Prefer a tbody over its parent table for containing new rows
function manipulationTarget( elem, content ) {
	if ( nodeName( elem, "table" ) &&
		nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {

		return jQuery( elem ).children( "tbody" )[ 0 ] || elem;
	}

	return elem;
}

// Replace/restore the type attribute of script elements for safe DOM manipulation
function disableScript( elem ) {
	elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
	return elem;
}
function restoreScript( elem ) {
	if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) {
		elem.type = elem.type.slice( 5 );
	} else {
		elem.removeAttribute( "type" );
	}

	return elem;
}

function cloneCopyEvent( src, dest ) {
	var i, l, type, pdataOld, udataOld, udataCur, events;

	if ( dest.nodeType !== 1 ) {
		return;
	}

	// 1. Copy private data: events, handlers, etc.
	if ( dataPriv.hasData( src ) ) {
		pdataOld = dataPriv.get( src );
		events = pdataOld.events;

		if ( events ) {
			dataPriv.remove( dest, "handle events" );

			for ( type in events ) {
				for ( i = 0, l = events[ type ].length; i < l; i++ ) {
					jQuery.event.add( dest, type, events[ type ][ i ] );
				}
			}
		}
	}

	// 2. Copy user data
	if ( dataUser.hasData( src ) ) {
		udataOld = dataUser.access( src );
		udataCur = jQuery.extend( {}, udataOld );

		dataUser.set( dest, udataCur );
	}
}

// Fix IE bugs, see support tests
function fixInput( src, dest ) {
	var nodeName = dest.nodeName.toLowerCase();

	// Fails to persist the checked state of a cloned checkbox or radio button.
	if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
		dest.checked = src.checked;

	// Fails to return the selected option to the default selected state when cloning options
	} else if ( nodeName === "input" || nodeName === "textarea" ) {
		dest.defaultValue = src.defaultValue;
	}
}

function domManip( collection, args, callback, ignored ) {

	// Flatten any nested arrays
	args = flat( args );

	var fragment, first, scripts, hasScripts, node, doc,
		i = 0,
		l = collection.length,
		iNoClone = l - 1,
		value = args[ 0 ],
		valueIsFunction = isFunction( value );

	// We can't cloneNode fragments that contain checked, in WebKit
	if ( valueIsFunction ||
			( l > 1 && typeof value === "string" &&
				!support.checkClone && rchecked.test( value ) ) ) {
		return collection.each( function( index ) {
			var self = collection.eq( index );
			if ( valueIsFunction ) {
				args[ 0 ] = value.call( this, index, self.html() );
			}
			domManip( self, args, callback, ignored );
		} );
	}

	if ( l ) {
		fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
		first = fragment.firstChild;

		if ( fragment.childNodes.length === 1 ) {
			fragment = first;
		}

		// Require either new content or an interest in ignored elements to invoke the callback
		if ( first || ignored ) {
			scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
			hasScripts = scripts.length;

			// Use the original fragment for the last item
			// instead of the first because it can end up
			// being emptied incorrectly in certain situations (trac-8070).
			for ( ; i < l; i++ ) {
				node = fragment;

				if ( i !== iNoClone ) {
					node = jQuery.clone( node, true, true );

					// Keep references to cloned scripts for later restoration
					if ( hasScripts ) {

						// Support: Android <=4.0 only, PhantomJS 1 only
						// push.apply(_, arraylike) throws on ancient WebKit
						jQuery.merge( scripts, getAll( node, "script" ) );
					}
				}

				callback.call( collection[ i ], node, i );
			}

			if ( hasScripts ) {
				doc = scripts[ scripts.length - 1 ].ownerDocument;

				// Re-enable scripts
				jQuery.map( scripts, restoreScript );

				// Evaluate executable scripts on first document insertion
				for ( i = 0; i < hasScripts; i++ ) {
					node = scripts[ i ];
					if ( rscriptType.test( node.type || "" ) &&
						!dataPriv.access( node, "globalEval" ) &&
						jQuery.contains( doc, node ) ) {

						if ( node.src && ( node.type || "" ).toLowerCase()  !== "module" ) {

							// Optional AJAX dependency, but won't run scripts if not present
							if ( jQuery._evalUrl && !node.noModule ) {
								jQuery._evalUrl( node.src, {
									nonce: node.nonce || node.getAttribute( "nonce" )
								}, doc );
							}
						} else {

							// Unwrap a CDATA section containing script contents. This shouldn't be
							// needed as in XML documents they're already not visible when
							// inspecting element contents and in HTML documents they have no
							// meaning but we're preserving that logic for backwards compatibility.
							// This will be removed completely in 4.0. See gh-4904.
							DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc );
						}
					}
				}
			}
		}
	}

	return collection;
}

function remove( elem, selector, keepData ) {
	var node,
		nodes = selector ? jQuery.filter( selector, elem ) : elem,
		i = 0;

	for ( ; ( node = nodes[ i ] ) != null; i++ ) {
		if ( !keepData && node.nodeType === 1 ) {
			jQuery.cleanData( getAll( node ) );
		}

		if ( node.parentNode ) {
			if ( keepData && isAttached( node ) ) {
				setGlobalEval( getAll( node, "script" ) );
			}
			node.parentNode.removeChild( node );
		}
	}

	return elem;
}

jQuery.extend( {
	htmlPrefilter: function( html ) {
		return html;
	},

	clone: function( elem, dataAndEvents, deepDataAndEvents ) {
		var i, l, srcElements, destElements,
			clone = elem.cloneNode( true ),
			inPage = isAttached( elem );

		// Fix IE cloning issues
		if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
				!jQuery.isXMLDoc( elem ) ) {

			// We eschew jQuery#find here for performance reasons:
			// https://jsperf.com/getall-vs-sizzle/2
			destElements = getAll( clone );
			srcElements = getAll( elem );

			for ( i = 0, l = srcElements.length; i < l; i++ ) {
				fixInput( srcElements[ i ], destElements[ i ] );
			}
		}

		// Copy the events from the original to the clone
		if ( dataAndEvents ) {
			if ( deepDataAndEvents ) {
				srcElements = srcElements || getAll( elem );
				destElements = destElements || getAll( clone );

				for ( i = 0, l = srcElements.length; i < l; i++ ) {
					cloneCopyEvent( srcElements[ i ], destElements[ i ] );
				}
			} else {
				cloneCopyEvent( elem, clone );
			}
		}

		// Preserve script evaluation history
		destElements = getAll( clone, "script" );
		if ( destElements.length > 0 ) {
			setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
		}

		// Return the cloned set
		return clone;
	},

	cleanData: function( elems ) {
		var data, elem, type,
			special = jQuery.event.special,
			i = 0;

		for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {
			if ( acceptData( elem ) ) {
				if ( ( data = elem[ dataPriv.expando ] ) ) {
					if ( data.events ) {
						for ( type in data.events ) {
							if ( special[ type ] ) {
								jQuery.event.remove( elem, type );

							// This is a shortcut to avoid jQuery.event.remove's overhead
							} else {
								jQuery.removeEvent( elem, type, data.handle );
							}
						}
					}

					// Support: Chrome <=35 - 45+
					// Assign undefined instead of using delete, see Data#remove
					elem[ dataPriv.expando ] = undefined;
				}
				if ( elem[ dataUser.expando ] ) {

					// Support: Chrome <=35 - 45+
					// Assign undefined instead of using delete, see Data#remove
					elem[ dataUser.expando ] = undefined;
				}
			}
		}
	}
} );

jQuery.fn.extend( {
	detach: function( selector ) {
		return remove( this, selector, true );
	},

	remove: function( selector ) {
		return remove( this, selector );
	},

	text: function( value ) {
		return access( this, function( value ) {
			return value === undefined ?
				jQuery.text( this ) :
				this.empty().each( function() {
					if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
						this.textContent = value;
					}
				} );
		}, null, value, arguments.length );
	},

	append: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
				var target = manipulationTarget( this, elem );
				target.appendChild( elem );
			}
		} );
	},

	prepend: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
				var target = manipulationTarget( this, elem );
				target.insertBefore( elem, target.firstChild );
			}
		} );
	},

	before: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.parentNode ) {
				this.parentNode.insertBefore( elem, this );
			}
		} );
	},

	after: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.parentNode ) {
				this.parentNode.insertBefore( elem, this.nextSibling );
			}
		} );
	},

	empty: function() {
		var elem,
			i = 0;

		for ( ; ( elem = this[ i ] ) != null; i++ ) {
			if ( elem.nodeType === 1 ) {

				// Prevent memory leaks
				jQuery.cleanData( getAll( elem, false ) );

				// Remove any remaining nodes
				elem.textContent = "";
			}
		}

		return this;
	},

	clone: function( dataAndEvents, deepDataAndEvents ) {
		dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
		deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;

		return this.map( function() {
			return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
		} );
	},

	html: function( value ) {
		return access( this, function( value ) {
			var elem = this[ 0 ] || {},
				i = 0,
				l = this.length;

			if ( value === undefined && elem.nodeType === 1 ) {
				return elem.innerHTML;
			}

			// See if we can take a shortcut and just use innerHTML
			if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
				!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {

				value = jQuery.htmlPrefilter( value );

				try {
					for ( ; i < l; i++ ) {
						elem = this[ i ] || {};

						// Remove element nodes and prevent memory leaks
						if ( elem.nodeType === 1 ) {
							jQuery.cleanData( getAll( elem, false ) );
							elem.innerHTML = value;
						}
					}

					elem = 0;

				// If using innerHTML throws an exception, use the fallback method
				} catch ( e ) {}
			}

			if ( elem ) {
				this.empty().append( value );
			}
		}, null, value, arguments.length );
	},

	replaceWith: function() {
		var ignored = [];

		// Make the changes, replacing each non-ignored context element with the new content
		return domManip( this, arguments, function( elem ) {
			var parent = this.parentNode;

			if ( jQuery.inArray( this, ignored ) < 0 ) {
				jQuery.cleanData( getAll( this ) );
				if ( parent ) {
					parent.replaceChild( elem, this );
				}
			}

		// Force callback invocation
		}, ignored );
	}
} );

jQuery.each( {
	appendTo: "append",
	prependTo: "prepend",
	insertBefore: "before",
	insertAfter: "after",
	replaceAll: "replaceWith"
}, function( name, original ) {
	jQuery.fn[ name ] = function( selector ) {
		var elems,
			ret = [],
			insert = jQuery( selector ),
			last = insert.length - 1,
			i = 0;

		for ( ; i <= last; i++ ) {
			elems = i === last ? this : this.clone( true );
			jQuery( insert[ i ] )[ original ]( elems );

			// Support: Android <=4.0 only, PhantomJS 1 only
			// .get() because push.apply(_, arraylike) throws on ancient WebKit
			push.apply( ret, elems.get() );
		}

		return this.pushStack( ret );
	};
} );
var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );

var rcustomProp = /^--/;


var getStyles = function( elem ) {

		// Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150)
		// IE throws on elements created in popups
		// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
		var view = elem.ownerDocument.defaultView;

		if ( !view || !view.opener ) {
			view = window;
		}

		return view.getComputedStyle( elem );
	};

var swap = function( elem, options, callback ) {
	var ret, name,
		old = {};

	// Remember the old values, and insert the new ones
	for ( name in options ) {
		old[ name ] = elem.style[ name ];
		elem.style[ name ] = options[ name ];
	}

	ret = callback.call( elem );

	// Revert the old values
	for ( name in options ) {
		elem.style[ name ] = old[ name ];
	}

	return ret;
};


var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );



( function() {

	// Executing both pixelPosition & boxSizingReliable tests require only one layout
	// so they're executed at the same time to save the second computation.
	function computeStyleTests() {

		// This is a singleton, we need to execute it only once
		if ( !div ) {
			return;
		}

		container.style.cssText = "position:absolute;left:-11111px;width:60px;" +
			"margin-top:1px;padding:0;border:0";
		div.style.cssText =
			"position:relative;display:block;box-sizing:border-box;overflow:scroll;" +
			"margin:auto;border:1px;padding:1px;" +
			"width:60%;top:1%";
		documentElement.appendChild( container ).appendChild( div );

		var divStyle = window.getComputedStyle( div );
		pixelPositionVal = divStyle.top !== "1%";

		// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44
		reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;

		// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3
		// Some styles come back with percentage values, even though they shouldn't
		div.style.right = "60%";
		pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;

		// Support: IE 9 - 11 only
		// Detect misreporting of content dimensions for box-sizing:border-box elements
		boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;

		// Support: IE 9 only
		// Detect overflow:scroll screwiness (gh-3699)
		// Support: Chrome <=64
		// Don't get tricked when zoom affects offsetWidth (gh-4029)
		div.style.position = "absolute";
		scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;

		documentElement.removeChild( container );

		// Nullify the div so it wouldn't be stored in the memory and
		// it will also be a sign that checks already performed
		div = null;
	}

	function roundPixelMeasures( measure ) {
		return Math.round( parseFloat( measure ) );
	}

	var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,
		reliableTrDimensionsVal, reliableMarginLeftVal,
		container = document.createElement( "div" ),
		div = document.createElement( "div" );

	// Finish early in limited (non-browser) environments
	if ( !div.style ) {
		return;
	}

	// Support: IE <=9 - 11 only
	// Style of cloned element affects source element cloned (trac-8908)
	div.style.backgroundClip = "content-box";
	div.cloneNode( true ).style.backgroundClip = "";
	support.clearCloneStyle = div.style.backgroundClip === "content-box";

	jQuery.extend( support, {
		boxSizingReliable: function() {
			computeStyleTests();
			return boxSizingReliableVal;
		},
		pixelBoxStyles: function() {
			computeStyleTests();
			return pixelBoxStylesVal;
		},
		pixelPosition: function() {
			computeStyleTests();
			return pixelPositionVal;
		},
		reliableMarginLeft: function() {
			computeStyleTests();
			return reliableMarginLeftVal;
		},
		scrollboxSize: function() {
			computeStyleTests();
			return scrollboxSizeVal;
		},

		// Support: IE 9 - 11+, Edge 15 - 18+
		// IE/Edge misreport `getComputedStyle` of table rows with width/height
		// set in CSS while `offset*` properties report correct values.
		// Behavior in IE 9 is more subtle than in newer versions & it passes
		// some versions of this test; make sure not to make it pass there!
		//
		// Support: Firefox 70+
		// Only Firefox includes border widths
		// in computed dimensions. (gh-4529)
		reliableTrDimensions: function() {
			var table, tr, trChild, trStyle;
			if ( reliableTrDimensionsVal == null ) {
				table = document.createElement( "table" );
				tr = document.createElement( "tr" );
				trChild = document.createElement( "div" );

				table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate";
				tr.style.cssText = "box-sizing:content-box;border:1px solid";

				// Support: Chrome 86+
				// Height set through cssText does not get applied.
				// Computed height then comes back as 0.
				tr.style.height = "1px";
				trChild.style.height = "9px";

				// Support: Android 8 Chrome 86+
				// In our bodyBackground.html iframe,
				// display for all div elements is set to "inline",
				// which causes a problem only in Android 8 Chrome 86.
				// Ensuring the div is `display: block`
				// gets around this issue.
				trChild.style.display = "block";

				documentElement
					.appendChild( table )
					.appendChild( tr )
					.appendChild( trChild );

				trStyle = window.getComputedStyle( tr );
				reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +
					parseInt( trStyle.borderTopWidth, 10 ) +
					parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;

				documentElement.removeChild( table );
			}
			return reliableTrDimensionsVal;
		}
	} );
} )();


function curCSS( elem, name, computed ) {
	var width, minWidth, maxWidth, ret,
		isCustomProp = rcustomProp.test( name ),

		// Support: Firefox 51+
		// Retrieving style before computed somehow
		// fixes an issue with getting wrong values
		// on detached elements
		style = elem.style;

	computed = computed || getStyles( elem );

	// getPropertyValue is needed for:
	//   .css('filter') (IE 9 only, trac-12537)
	//   .css('--customProperty) (gh-3144)
	if ( computed ) {

		// Support: IE <=9 - 11+
		// IE only supports `"float"` in `getPropertyValue`; in computed styles
		// it's only available as `"cssFloat"`. We no longer modify properties
		// sent to `.css()` apart from camelCasing, so we need to check both.
		// Normally, this would create difference in behavior: if
		// `getPropertyValue` returns an empty string, the value returned
		// by `.css()` would be `undefined`. This is usually the case for
		// disconnected elements. However, in IE even disconnected elements
		// with no styles return `"none"` for `getPropertyValue( "float" )`
		ret = computed.getPropertyValue( name ) || computed[ name ];

		if ( isCustomProp && ret ) {

			// Support: Firefox 105+, Chrome <=105+
			// Spec requires trimming whitespace for custom properties (gh-4926).
			// Firefox only trims leading whitespace. Chrome just collapses
			// both leading & trailing whitespace to a single space.
			//
			// Fall back to `undefined` if empty string returned.
			// This collapses a missing definition with property defined
			// and set to an empty string but there's no standard API
			// allowing us to differentiate them without a performance penalty
			// and returning `undefined` aligns with older jQuery.
			//
			// rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED
			// as whitespace while CSS does not, but this is not a problem
			// because CSS preprocessing replaces them with U+000A LINE FEED
			// (which *is* CSS whitespace)
			// https://www.w3.org/TR/css-syntax-3/#input-preprocessing
			ret = ret.replace( rtrimCSS, "$1" ) || undefined;
		}

		if ( ret === "" && !isAttached( elem ) ) {
			ret = jQuery.style( elem, name );
		}

		// A tribute to the "awesome hack by Dean Edwards"
		// Android Browser returns percentage for some values,
		// but width seems to be reliably pixels.
		// This is against the CSSOM draft spec:
		// https://drafts.csswg.org/cssom/#resolved-values
		if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {

			// Remember the original values
			width = style.width;
			minWidth = style.minWidth;
			maxWidth = style.maxWidth;

			// Put in the new values to get a computed value out
			style.minWidth = style.maxWidth = style.width = ret;
			ret = computed.width;

			// Revert the changed values
			style.width = width;
			style.minWidth = minWidth;
			style.maxWidth = maxWidth;
		}
	}

	return ret !== undefined ?

		// Support: IE <=9 - 11 only
		// IE returns zIndex value as an integer.
		ret + "" :
		ret;
}


function addGetHookIf( conditionFn, hookFn ) {

	// Define the hook, we'll check on the first run if it's really needed.
	return {
		get: function() {
			if ( conditionFn() ) {

				// Hook not needed (or it's not possible to use it due
				// to missing dependency), remove it.
				delete this.get;
				return;
			}

			// Hook needed; redefine it so that the support test is not executed again.
			return ( this.get = hookFn ).apply( this, arguments );
		}
	};
}


var cssPrefixes = [ "Webkit", "Moz", "ms" ],
	emptyStyle = document.createElement( "div" ).style,
	vendorProps = {};

// Return a vendor-prefixed property or undefined
function vendorPropName( name ) {

	// Check for vendor prefixed names
	var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
		i = cssPrefixes.length;

	while ( i-- ) {
		name = cssPrefixes[ i ] + capName;
		if ( name in emptyStyle ) {
			return name;
		}
	}
}

// Return a potentially-mapped jQuery.cssProps or vendor prefixed property
function finalPropName( name ) {
	var final = jQuery.cssProps[ name ] || vendorProps[ name ];

	if ( final ) {
		return final;
	}
	if ( name in emptyStyle ) {
		return name;
	}
	return vendorProps[ name ] = vendorPropName( name ) || name;
}


var

	// Swappable if display is none or starts with table
	// except "table", "table-cell", or "table-caption"
	// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
	rdisplayswap = /^(none|table(?!-c[ea]).+)/,
	cssShow = { position: "absolute", visibility: "hidden", display: "block" },
	cssNormalTransform = {
		letterSpacing: "0",
		fontWeight: "400"
	};

function setPositiveNumber( _elem, value, subtract ) {

	// Any relative (+/-) values have already been
	// normalized at this point
	var matches = rcssNum.exec( value );
	return matches ?

		// Guard against undefined "subtract", e.g., when used as in cssHooks
		Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
		value;
}

function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
	var i = dimension === "width" ? 1 : 0,
		extra = 0,
		delta = 0,
		marginDelta = 0;

	// Adjustment may not be necessary
	if ( box === ( isBorderBox ? "border" : "content" ) ) {
		return 0;
	}

	for ( ; i < 4; i += 2 ) {

		// Both box models exclude margin
		// Count margin delta separately to only add it after scroll gutter adjustment.
		// This is needed to make negative margins work with `outerHeight( true )` (gh-3982).
		if ( box === "margin" ) {
			marginDelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );
		}

		// If we get here with a content-box, we're seeking "padding" or "border" or "margin"
		if ( !isBorderBox ) {

			// Add padding
			delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );

			// For "border" or "margin", add border
			if ( box !== "padding" ) {
				delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );

			// But still keep track of it otherwise
			} else {
				extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
			}

		// If we get here with a border-box (content + padding + border), we're seeking "content" or
		// "padding" or "margin"
		} else {

			// For "content", subtract padding
			if ( box === "content" ) {
				delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
			}

			// For "content" or "padding", subtract border
			if ( box !== "margin" ) {
				delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
			}
		}
	}

	// Account for positive content-box scroll gutter when requested by providing computedVal
	if ( !isBorderBox && computedVal >= 0 ) {

		// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border
		// Assuming integer scroll gutter, subtract the rest and round down
		delta += Math.max( 0, Math.ceil(
			elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
			computedVal -
			delta -
			extra -
			0.5

		// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter
		// Use an explicit zero to avoid NaN (gh-3964)
		) ) || 0;
	}

	return delta + marginDelta;
}

function getWidthOrHeight( elem, dimension, extra ) {

	// Start with computed style
	var styles = getStyles( elem ),

		// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).
		// Fake content-box until we know it's needed to know the true value.
		boxSizingNeeded = !support.boxSizingReliable() || extra,
		isBorderBox = boxSizingNeeded &&
			jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
		valueIsBorderBox = isBorderBox,

		val = curCSS( elem, dimension, styles ),
		offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );

	// Support: Firefox <=54
	// Return a confounding non-pixel value or feign ignorance, as appropriate.
	if ( rnumnonpx.test( val ) ) {
		if ( !extra ) {
			return val;
		}
		val = "auto";
	}


	// Support: IE 9 - 11 only
	// Use offsetWidth/offsetHeight for when box sizing is unreliable.
	// In those cases, the computed value can be trusted to be border-box.
	if ( ( !support.boxSizingReliable() && isBorderBox ||

		// Support: IE 10 - 11+, Edge 15 - 18+
		// IE/Edge misreport `getComputedStyle` of table rows with width/height
		// set in CSS while `offset*` properties report correct values.
		// Interestingly, in some cases IE 9 doesn't suffer from this issue.
		!support.reliableTrDimensions() && nodeName( elem, "tr" ) ||

		// Fall back to offsetWidth/offsetHeight when value is "auto"
		// This happens for inline elements with no explicit setting (gh-3571)
		val === "auto" ||

		// Support: Android <=4.1 - 4.3 only
		// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
		!parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) &&

		// Make sure the element is visible & connected
		elem.getClientRects().length ) {

		isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";

		// Where available, offsetWidth/offsetHeight approximate border box dimensions.
		// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the
		// retrieved value as a content box dimension.
		valueIsBorderBox = offsetProp in elem;
		if ( valueIsBorderBox ) {
			val = elem[ offsetProp ];
		}
	}

	// Normalize "" and auto
	val = parseFloat( val ) || 0;

	// Adjust for the element's box model
	return ( val +
		boxModelAdjustment(
			elem,
			dimension,
			extra || ( isBorderBox ? "border" : "content" ),
			valueIsBorderBox,
			styles,

			// Provide the current computed size to request scroll gutter calculation (gh-3589)
			val
		)
	) + "px";
}

jQuery.extend( {

	// Add in style property hooks for overriding the default
	// behavior of getting and setting a style property
	cssHooks: {
		opacity: {
			get: function( elem, computed ) {
				if ( computed ) {

					// We should always get a number back from opacity
					var ret = curCSS( elem, "opacity" );
					return ret === "" ? "1" : ret;
				}
			}
		}
	},

	// Don't automatically add "px" to these possibly-unitless properties
	cssNumber: {
		animationIterationCount: true,
		aspectRatio: true,
		borderImageSlice: true,
		columnCount: true,
		flexGrow: true,
		flexShrink: true,
		fontWeight: true,
		gridArea: true,
		gridColumn: true,
		gridColumnEnd: true,
		gridColumnStart: true,
		gridRow: true,
		gridRowEnd: true,
		gridRowStart: true,
		lineHeight: true,
		opacity: true,
		order: true,
		orphans: true,
		scale: true,
		widows: true,
		zIndex: true,
		zoom: true,

		// SVG-related
		fillOpacity: true,
		floodOpacity: true,
		stopOpacity: true,
		strokeMiterlimit: true,
		strokeOpacity: true
	},

	// Add in properties whose names you wish to fix before
	// setting or getting the value
	cssProps: {},

	// Get and set the style property on a DOM Node
	style: function( elem, name, value, extra ) {

		// Don't set styles on text and comment nodes
		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
			return;
		}

		// Make sure that we're working with the right name
		var ret, type, hooks,
			origName = camelCase( name ),
			isCustomProp = rcustomProp.test( name ),
			style = elem.style;

		// Make sure that we're working with the right name. We don't
		// want to query the value if it is a CSS custom property
		// since they are user-defined.
		if ( !isCustomProp ) {
			name = finalPropName( origName );
		}

		// Gets hook for the prefixed version, then unprefixed version
		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];

		// Check if we're setting a value
		if ( value !== undefined ) {
			type = typeof value;

			// Convert "+=" or "-=" to relative numbers (trac-7345)
			if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
				value = adjustCSS( elem, name, ret );

				// Fixes bug trac-9237
				type = "number";
			}

			// Make sure that null and NaN values aren't set (trac-7116)
			if ( value == null || value !== value ) {
				return;
			}

			// If a number was passed in, add the unit (except for certain CSS properties)
			// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append
			// "px" to a few hardcoded values.
			if ( type === "number" && !isCustomProp ) {
				value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
			}

			// background-* props affect original clone's values
			if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
				style[ name ] = "inherit";
			}

			// If a hook was provided, use that value, otherwise just set the specified value
			if ( !hooks || !( "set" in hooks ) ||
				( value = hooks.set( elem, value, extra ) ) !== undefined ) {

				if ( isCustomProp ) {
					style.setProperty( name, value );
				} else {
					style[ name ] = value;
				}
			}

		} else {

			// If a hook was provided get the non-computed value from there
			if ( hooks && "get" in hooks &&
				( ret = hooks.get( elem, false, extra ) ) !== undefined ) {

				return ret;
			}

			// Otherwise just get the value from the style object
			return style[ name ];
		}
	},

	css: function( elem, name, extra, styles ) {
		var val, num, hooks,
			origName = camelCase( name ),
			isCustomProp = rcustomProp.test( name );

		// Make sure that we're working with the right name. We don't
		// want to modify the value if it is a CSS custom property
		// since they are user-defined.
		if ( !isCustomProp ) {
			name = finalPropName( origName );
		}

		// Try prefixed name followed by the unprefixed name
		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];

		// If a hook was provided get the computed value from there
		if ( hooks && "get" in hooks ) {
			val = hooks.get( elem, true, extra );
		}

		// Otherwise, if a way to get the computed value exists, use that
		if ( val === undefined ) {
			val = curCSS( elem, name, styles );
		}

		// Convert "normal" to computed value
		if ( val === "normal" && name in cssNormalTransform ) {
			val = cssNormalTransform[ name ];
		}

		// Make numeric if forced or a qualifier was provided and val looks numeric
		if ( extra === "" || extra ) {
			num = parseFloat( val );
			return extra === true || isFinite( num ) ? num || 0 : val;
		}

		return val;
	}
} );

jQuery.each( [ "height", "width" ], function( _i, dimension ) {
	jQuery.cssHooks[ dimension ] = {
		get: function( elem, computed, extra ) {
			if ( computed ) {

				// Certain elements can have dimension info if we invisibly show them
				// but it must have a current display style that would benefit
				return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&

					// Support: Safari 8+
					// Table columns in Safari have non-zero offsetWidth & zero
					// getBoundingClientRect().width unless display is changed.
					// Support: IE <=11 only
					// Running getBoundingClientRect on a disconnected node
					// in IE throws an error.
					( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?
					swap( elem, cssShow, function() {
						return getWidthOrHeight( elem, dimension, extra );
					} ) :
					getWidthOrHeight( elem, dimension, extra );
			}
		},

		set: function( elem, value, extra ) {
			var matches,
				styles = getStyles( elem ),

				// Only read styles.position if the test has a chance to fail
				// to avoid forcing a reflow.
				scrollboxSizeBuggy = !support.scrollboxSize() &&
					styles.position === "absolute",

				// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)
				boxSizingNeeded = scrollboxSizeBuggy || extra,
				isBorderBox = boxSizingNeeded &&
					jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
				subtract = extra ?
					boxModelAdjustment(
						elem,
						dimension,
						extra,
						isBorderBox,
						styles
					) :
					0;

			// Account for unreliable border-box dimensions by comparing offset* to computed and
			// faking a content-box to get border and padding (gh-3699)
			if ( isBorderBox && scrollboxSizeBuggy ) {
				subtract -= Math.ceil(
					elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
					parseFloat( styles[ dimension ] ) -
					boxModelAdjustment( elem, dimension, "border", false, styles ) -
					0.5
				);
			}

			// Convert to pixels if value adjustment is needed
			if ( subtract && ( matches = rcssNum.exec( value ) ) &&
				( matches[ 3 ] || "px" ) !== "px" ) {

				elem.style[ dimension ] = value;
				value = jQuery.css( elem, dimension );
			}

			return setPositiveNumber( elem, value, subtract );
		}
	};
} );

jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
	function( elem, computed ) {
		if ( computed ) {
			return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
				elem.getBoundingClientRect().left -
					swap( elem, { marginLeft: 0 }, function() {
						return elem.getBoundingClientRect().left;
					} )
			) + "px";
		}
	}
);

// These hooks are used by animate to expand properties
jQuery.each( {
	margin: "",
	padding: "",
	border: "Width"
}, function( prefix, suffix ) {
	jQuery.cssHooks[ prefix + suffix ] = {
		expand: function( value ) {
			var i = 0,
				expanded = {},

				// Assumes a single number if not a string
				parts = typeof value === "string" ? value.split( " " ) : [ value ];

			for ( ; i < 4; i++ ) {
				expanded[ prefix + cssExpand[ i ] + suffix ] =
					parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
			}

			return expanded;
		}
	};

	if ( prefix !== "margin" ) {
		jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
	}
} );

jQuery.fn.extend( {
	css: function( name, value ) {
		return access( this, function( elem, name, value ) {
			var styles, len,
				map = {},
				i = 0;

			if ( Array.isArray( name ) ) {
				styles = getStyles( elem );
				len = name.length;

				for ( ; i < len; i++ ) {
					map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
				}

				return map;
			}

			return value !== undefined ?
				jQuery.style( elem, name, value ) :
				jQuery.css( elem, name );
		}, name, value, arguments.length > 1 );
	}
} );


function Tween( elem, options, prop, end, easing ) {
	return new Tween.prototype.init( elem, options, prop, end, easing );
}
jQuery.Tween = Tween;

Tween.prototype = {
	constructor: Tween,
	init: function( elem, options, prop, end, easing, unit ) {
		this.elem = elem;
		this.prop = prop;
		this.easing = easing || jQuery.easing._default;
		this.options = options;
		this.start = this.now = this.cur();
		this.end = end;
		this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
	},
	cur: function() {
		var hooks = Tween.propHooks[ this.prop ];

		return hooks && hooks.get ?
			hooks.get( this ) :
			Tween.propHooks._default.get( this );
	},
	run: function( percent ) {
		var eased,
			hooks = Tween.propHooks[ this.prop ];

		if ( this.options.duration ) {
			this.pos = eased = jQuery.easing[ this.easing ](
				percent, this.options.duration * percent, 0, 1, this.options.duration
			);
		} else {
			this.pos = eased = percent;
		}
		this.now = ( this.end - this.start ) * eased + this.start;

		if ( this.options.step ) {
			this.options.step.call( this.elem, this.now, this );
		}

		if ( hooks && hooks.set ) {
			hooks.set( this );
		} else {
			Tween.propHooks._default.set( this );
		}
		return this;
	}
};

Tween.prototype.init.prototype = Tween.prototype;

Tween.propHooks = {
	_default: {
		get: function( tween ) {
			var result;

			// Use a property on the element directly when it is not a DOM element,
			// or when there is no matching style property that exists.
			if ( tween.elem.nodeType !== 1 ||
				tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
				return tween.elem[ tween.prop ];
			}

			// Passing an empty string as a 3rd parameter to .css will automatically
			// attempt a parseFloat and fallback to a string if the parse fails.
			// Simple values such as "10px" are parsed to Float;
			// complex values such as "rotate(1rad)" are returned as-is.
			result = jQuery.css( tween.elem, tween.prop, "" );

			// Empty strings, null, undefined and "auto" are converted to 0.
			return !result || result === "auto" ? 0 : result;
		},
		set: function( tween ) {

			// Use step hook for back compat.
			// Use cssHook if its there.
			// Use .style if available and use plain properties where available.
			if ( jQuery.fx.step[ tween.prop ] ) {
				jQuery.fx.step[ tween.prop ]( tween );
			} else if ( tween.elem.nodeType === 1 && (
				jQuery.cssHooks[ tween.prop ] ||
					tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {
				jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
			} else {
				tween.elem[ tween.prop ] = tween.now;
			}
		}
	}
};

// Support: IE <=9 only
// Panic based approach to setting things on disconnected nodes
Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
	set: function( tween ) {
		if ( tween.elem.nodeType && tween.elem.parentNode ) {
			tween.elem[ tween.prop ] = tween.now;
		}
	}
};

jQuery.easing = {
	linear: function( p ) {
		return p;
	},
	swing: function( p ) {
		return 0.5 - Math.cos( p * Math.PI ) / 2;
	},
	_default: "swing"
};

jQuery.fx = Tween.prototype.init;

// Back compat <1.8 extension point
jQuery.fx.step = {};




var
	fxNow, inProgress,
	rfxtypes = /^(?:toggle|show|hide)$/,
	rrun = /queueHooks$/;

function schedule() {
	if ( inProgress ) {
		if ( document.hidden === false && window.requestAnimationFrame ) {
			window.requestAnimationFrame( schedule );
		} else {
			window.setTimeout( schedule, jQuery.fx.interval );
		}

		jQuery.fx.tick();
	}
}

// Animations created synchronously will run synchronously
function createFxNow() {
	window.setTimeout( function() {
		fxNow = undefined;
	} );
	return ( fxNow = Date.now() );
}

// Generate parameters to create a standard animation
function genFx( type, includeWidth ) {
	var which,
		i = 0,
		attrs = { height: type };

	// If we include width, step value is 1 to do all cssExpand values,
	// otherwise step value is 2 to skip over Left and Right
	includeWidth = includeWidth ? 1 : 0;
	for ( ; i < 4; i += 2 - includeWidth ) {
		which = cssExpand[ i ];
		attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
	}

	if ( includeWidth ) {
		attrs.opacity = attrs.width = type;
	}

	return attrs;
}

function createTween( value, prop, animation ) {
	var tween,
		collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),
		index = 0,
		length = collection.length;
	for ( ; index < length; index++ ) {
		if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {

			// We're done with this property
			return tween;
		}
	}
}

function defaultPrefilter( elem, props, opts ) {
	var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
		isBox = "width" in props || "height" in props,
		anim = this,
		orig = {},
		style = elem.style,
		hidden = elem.nodeType && isHiddenWithinTree( elem ),
		dataShow = dataPriv.get( elem, "fxshow" );

	// Queue-skipping animations hijack the fx hooks
	if ( !opts.queue ) {
		hooks = jQuery._queueHooks( elem, "fx" );
		if ( hooks.unqueued == null ) {
			hooks.unqueued = 0;
			oldfire = hooks.empty.fire;
			hooks.empty.fire = function() {
				if ( !hooks.unqueued ) {
					oldfire();
				}
			};
		}
		hooks.unqueued++;

		anim.always( function() {

			// Ensure the complete handler is called before this completes
			anim.always( function() {
				hooks.unqueued--;
				if ( !jQuery.queue( elem, "fx" ).length ) {
					hooks.empty.fire();
				}
			} );
		} );
	}

	// Detect show/hide animations
	for ( prop in props ) {
		value = props[ prop ];
		if ( rfxtypes.test( value ) ) {
			delete props[ prop ];
			toggle = toggle || value === "toggle";
			if ( value === ( hidden ? "hide" : "show" ) ) {

				// Pretend to be hidden if this is a "show" and
				// there is still data from a stopped show/hide
				if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
					hidden = true;

				// Ignore all other no-op show/hide data
				} else {
					continue;
				}
			}
			orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
		}
	}

	// Bail out if this is a no-op like .hide().hide()
	propTween = !jQuery.isEmptyObject( props );
	if ( !propTween && jQuery.isEmptyObject( orig ) ) {
		return;
	}

	// Restrict "overflow" and "display" styles during box animations
	if ( isBox && elem.nodeType === 1 ) {

		// Support: IE <=9 - 11, Edge 12 - 15
		// Record all 3 overflow attributes because IE does not infer the shorthand
		// from identically-valued overflowX and overflowY and Edge just mirrors
		// the overflowX value there.
		opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];

		// Identify a display type, preferring old show/hide data over the CSS cascade
		restoreDisplay = dataShow && dataShow.display;
		if ( restoreDisplay == null ) {
			restoreDisplay = dataPriv.get( elem, "display" );
		}
		display = jQuery.css( elem, "display" );
		if ( display === "none" ) {
			if ( restoreDisplay ) {
				display = restoreDisplay;
			} else {

				// Get nonempty value(s) by temporarily forcing visibility
				showHide( [ elem ], true );
				restoreDisplay = elem.style.display || restoreDisplay;
				display = jQuery.css( elem, "display" );
				showHide( [ elem ] );
			}
		}

		// Animate inline elements as inline-block
		if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) {
			if ( jQuery.css( elem, "float" ) === "none" ) {

				// Restore the original display value at the end of pure show/hide animations
				if ( !propTween ) {
					anim.done( function() {
						style.display = restoreDisplay;
					} );
					if ( restoreDisplay == null ) {
						display = style.display;
						restoreDisplay = display === "none" ? "" : display;
					}
				}
				style.display = "inline-block";
			}
		}
	}

	if ( opts.overflow ) {
		style.overflow = "hidden";
		anim.always( function() {
			style.overflow = opts.overflow[ 0 ];
			style.overflowX = opts.overflow[ 1 ];
			style.overflowY = opts.overflow[ 2 ];
		} );
	}

	// Implement show/hide animations
	propTween = false;
	for ( prop in orig ) {

		// General show/hide setup for this element animation
		if ( !propTween ) {
			if ( dataShow ) {
				if ( "hidden" in dataShow ) {
					hidden = dataShow.hidden;
				}
			} else {
				dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } );
			}

			// Store hidden/visible for toggle so `.stop().toggle()` "reverses"
			if ( toggle ) {
				dataShow.hidden = !hidden;
			}

			// Show elements before animating them
			if ( hidden ) {
				showHide( [ elem ], true );
			}

			/* eslint-disable no-loop-func */

			anim.done( function() {

				/* eslint-enable no-loop-func */

				// The final step of a "hide" animation is actually hiding the element
				if ( !hidden ) {
					showHide( [ elem ] );
				}
				dataPriv.remove( elem, "fxshow" );
				for ( prop in orig ) {
					jQuery.style( elem, prop, orig[ prop ] );
				}
			} );
		}

		// Per-property setup
		propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
		if ( !( prop in dataShow ) ) {
			dataShow[ prop ] = propTween.start;
			if ( hidden ) {
				propTween.end = propTween.start;
				propTween.start = 0;
			}
		}
	}
}

function propFilter( props, specialEasing ) {
	var index, name, easing, value, hooks;

	// camelCase, specialEasing and expand cssHook pass
	for ( index in props ) {
		name = camelCase( index );
		easing = specialEasing[ name ];
		value = props[ index ];
		if ( Array.isArray( value ) ) {
			easing = value[ 1 ];
			value = props[ index ] = value[ 0 ];
		}

		if ( index !== name ) {
			props[ name ] = value;
			delete props[ index ];
		}

		hooks = jQuery.cssHooks[ name ];
		if ( hooks && "expand" in hooks ) {
			value = hooks.expand( value );
			delete props[ name ];

			// Not quite $.extend, this won't overwrite existing keys.
			// Reusing 'index' because we have the correct "name"
			for ( index in value ) {
				if ( !( index in props ) ) {
					props[ index ] = value[ index ];
					specialEasing[ index ] = easing;
				}
			}
		} else {
			specialEasing[ name ] = easing;
		}
	}
}

function Animation( elem, properties, options ) {
	var result,
		stopped,
		index = 0,
		length = Animation.prefilters.length,
		deferred = jQuery.Deferred().always( function() {

			// Don't match elem in the :animated selector
			delete tick.elem;
		} ),
		tick = function() {
			if ( stopped ) {
				return false;
			}
			var currentTime = fxNow || createFxNow(),
				remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),

				// Support: Android 2.3 only
				// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497)
				temp = remaining / animation.duration || 0,
				percent = 1 - temp,
				index = 0,
				length = animation.tweens.length;

			for ( ; index < length; index++ ) {
				animation.tweens[ index ].run( percent );
			}

			deferred.notifyWith( elem, [ animation, percent, remaining ] );

			// If there's more to do, yield
			if ( percent < 1 && length ) {
				return remaining;
			}

			// If this was an empty animation, synthesize a final progress notification
			if ( !length ) {
				deferred.notifyWith( elem, [ animation, 1, 0 ] );
			}

			// Resolve the animation and report its conclusion
			deferred.resolveWith( elem, [ animation ] );
			return false;
		},
		animation = deferred.promise( {
			elem: elem,
			props: jQuery.extend( {}, properties ),
			opts: jQuery.extend( true, {
				specialEasing: {},
				easing: jQuery.easing._default
			}, options ),
			originalProperties: properties,
			originalOptions: options,
			startTime: fxNow || createFxNow(),
			duration: options.duration,
			tweens: [],
			createTween: function( prop, end ) {
				var tween = jQuery.Tween( elem, animation.opts, prop, end,
					animation.opts.specialEasing[ prop ] || animation.opts.easing );
				animation.tweens.push( tween );
				return tween;
			},
			stop: function( gotoEnd ) {
				var index = 0,

					// If we are going to the end, we want to run all the tweens
					// otherwise we skip this part
					length = gotoEnd ? animation.tweens.length : 0;
				if ( stopped ) {
					return this;
				}
				stopped = true;
				for ( ; index < length; index++ ) {
					animation.tweens[ index ].run( 1 );
				}

				// Resolve when we played the last frame; otherwise, reject
				if ( gotoEnd ) {
					deferred.notifyWith( elem, [ animation, 1, 0 ] );
					deferred.resolveWith( elem, [ animation, gotoEnd ] );
				} else {
					deferred.rejectWith( elem, [ animation, gotoEnd ] );
				}
				return this;
			}
		} ),
		props = animation.props;

	propFilter( props, animation.opts.specialEasing );

	for ( ; index < length; index++ ) {
		result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
		if ( result ) {
			if ( isFunction( result.stop ) ) {
				jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =
					result.stop.bind( result );
			}
			return result;
		}
	}

	jQuery.map( props, createTween, animation );

	if ( isFunction( animation.opts.start ) ) {
		animation.opts.start.call( elem, animation );
	}

	// Attach callbacks from options
	animation
		.progress( animation.opts.progress )
		.done( animation.opts.done, animation.opts.complete )
		.fail( animation.opts.fail )
		.always( animation.opts.always );

	jQuery.fx.timer(
		jQuery.extend( tick, {
			elem: elem,
			anim: animation,
			queue: animation.opts.queue
		} )
	);

	return animation;
}

jQuery.Animation = jQuery.extend( Animation, {

	tweeners: {
		"*": [ function( prop, value ) {
			var tween = this.createTween( prop, value );
			adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );
			return tween;
		} ]
	},

	tweener: function( props, callback ) {
		if ( isFunction( props ) ) {
			callback = props;
			props = [ "*" ];
		} else {
			props = props.match( rnothtmlwhite );
		}

		var prop,
			index = 0,
			length = props.length;

		for ( ; index < length; index++ ) {
			prop = props[ index ];
			Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
			Animation.tweeners[ prop ].unshift( callback );
		}
	},

	prefilters: [ defaultPrefilter ],

	prefilter: function( callback, prepend ) {
		if ( prepend ) {
			Animation.prefilters.unshift( callback );
		} else {
			Animation.prefilters.push( callback );
		}
	}
} );

jQuery.speed = function( speed, easing, fn ) {
	var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
		complete: fn || !fn && easing ||
			isFunction( speed ) && speed,
		duration: speed,
		easing: fn && easing || easing && !isFunction( easing ) && easing
	};

	// Go to the end state if fx are off
	if ( jQuery.fx.off ) {
		opt.duration = 0;

	} else {
		if ( typeof opt.duration !== "number" ) {
			if ( opt.duration in jQuery.fx.speeds ) {
				opt.duration = jQuery.fx.speeds[ opt.duration ];

			} else {
				opt.duration = jQuery.fx.speeds._default;
			}
		}
	}

	// Normalize opt.queue - true/undefined/null -> "fx"
	if ( opt.queue == null || opt.queue === true ) {
		opt.queue = "fx";
	}

	// Queueing
	opt.old = opt.complete;

	opt.complete = function() {
		if ( isFunction( opt.old ) ) {
			opt.old.call( this );
		}

		if ( opt.queue ) {
			jQuery.dequeue( this, opt.queue );
		}
	};

	return opt;
};

jQuery.fn.extend( {
	fadeTo: function( speed, to, easing, callback ) {

		// Show any hidden elements after setting opacity to 0
		return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show()

			// Animate to the value specified
			.end().animate( { opacity: to }, speed, easing, callback );
	},
	animate: function( prop, speed, easing, callback ) {
		var empty = jQuery.isEmptyObject( prop ),
			optall = jQuery.speed( speed, easing, callback ),
			doAnimation = function() {

				// Operate on a copy of prop so per-property easing won't be lost
				var anim = Animation( this, jQuery.extend( {}, prop ), optall );

				// Empty animations, or finishing resolves immediately
				if ( empty || dataPriv.get( this, "finish" ) ) {
					anim.stop( true );
				}
			};

		doAnimation.finish = doAnimation;

		return empty || optall.queue === false ?
			this.each( doAnimation ) :
			this.queue( optall.queue, doAnimation );
	},
	stop: function( type, clearQueue, gotoEnd ) {
		var stopQueue = function( hooks ) {
			var stop = hooks.stop;
			delete hooks.stop;
			stop( gotoEnd );
		};

		if ( typeof type !== "string" ) {
			gotoEnd = clearQueue;
			clearQueue = type;
			type = undefined;
		}
		if ( clearQueue ) {
			this.queue( type || "fx", [] );
		}

		return this.each( function() {
			var dequeue = true,
				index = type != null && type + "queueHooks",
				timers = jQuery.timers,
				data = dataPriv.get( this );

			if ( index ) {
				if ( data[ index ] && data[ index ].stop ) {
					stopQueue( data[ index ] );
				}
			} else {
				for ( index in data ) {
					if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
						stopQueue( data[ index ] );
					}
				}
			}

			for ( index = timers.length; index--; ) {
				if ( timers[ index ].elem === this &&
					( type == null || timers[ index ].queue === type ) ) {

					timers[ index ].anim.stop( gotoEnd );
					dequeue = false;
					timers.splice( index, 1 );
				}
			}

			// Start the next in the queue if the last step wasn't forced.
			// Timers currently will call their complete callbacks, which
			// will dequeue but only if they were gotoEnd.
			if ( dequeue || !gotoEnd ) {
				jQuery.dequeue( this, type );
			}
		} );
	},
	finish: function( type ) {
		if ( type !== false ) {
			type = type || "fx";
		}
		return this.each( function() {
			var index,
				data = dataPriv.get( this ),
				queue = data[ type + "queue" ],
				hooks = data[ type + "queueHooks" ],
				timers = jQuery.timers,
				length = queue ? queue.length : 0;

			// Enable finishing flag on private data
			data.finish = true;

			// Empty the queue first
			jQuery.queue( this, type, [] );

			if ( hooks && hooks.stop ) {
				hooks.stop.call( this, true );
			}

			// Look for any active animations, and finish them
			for ( index = timers.length; index--; ) {
				if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
					timers[ index ].anim.stop( true );
					timers.splice( index, 1 );
				}
			}

			// Look for any animations in the old queue and finish them
			for ( index = 0; index < length; index++ ) {
				if ( queue[ index ] && queue[ index ].finish ) {
					queue[ index ].finish.call( this );
				}
			}

			// Turn off finishing flag
			delete data.finish;
		} );
	}
} );

jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) {
	var cssFn = jQuery.fn[ name ];
	jQuery.fn[ name ] = function( speed, easing, callback ) {
		return speed == null || typeof speed === "boolean" ?
			cssFn.apply( this, arguments ) :
			this.animate( genFx( name, true ), speed, easing, callback );
	};
} );

// Generate shortcuts for custom animations
jQuery.each( {
	slideDown: genFx( "show" ),
	slideUp: genFx( "hide" ),
	slideToggle: genFx( "toggle" ),
	fadeIn: { opacity: "show" },
	fadeOut: { opacity: "hide" },
	fadeToggle: { opacity: "toggle" }
}, function( name, props ) {
	jQuery.fn[ name ] = function( speed, easing, callback ) {
		return this.animate( props, speed, easing, callback );
	};
} );

jQuery.timers = [];
jQuery.fx.tick = function() {
	var timer,
		i = 0,
		timers = jQuery.timers;

	fxNow = Date.now();

	for ( ; i < timers.length; i++ ) {
		timer = timers[ i ];

		// Run the timer and safely remove it when done (allowing for external removal)
		if ( !timer() && timers[ i ] === timer ) {
			timers.splice( i--, 1 );
		}
	}

	if ( !timers.length ) {
		jQuery.fx.stop();
	}
	fxNow = undefined;
};

jQuery.fx.timer = function( timer ) {
	jQuery.timers.push( timer );
	jQuery.fx.start();
};

jQuery.fx.interval = 13;
jQuery.fx.start = function() {
	if ( inProgress ) {
		return;
	}

	inProgress = true;
	schedule();
};

jQuery.fx.stop = function() {
	inProgress = null;
};

jQuery.fx.speeds = {
	slow: 600,
	fast: 200,

	// Default speed
	_default: 400
};


// Based off of the plugin by Clint Helfers, with permission.
jQuery.fn.delay = function( time, type ) {
	time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
	type = type || "fx";

	return this.queue( type, function( next, hooks ) {
		var timeout = window.setTimeout( next, time );
		hooks.stop = function() {
			window.clearTimeout( timeout );
		};
	} );
};


( function() {
	var input = document.createElement( "input" ),
		select = document.createElement( "select" ),
		opt = select.appendChild( document.createElement( "option" ) );

	input.type = "checkbox";

	// Support: Android <=4.3 only
	// Default value for a checkbox should be "on"
	support.checkOn = input.value !== "";

	// Support: IE <=11 only
	// Must access selectedIndex to make default options select
	support.optSelected = opt.selected;

	// Support: IE <=11 only
	// An input loses its value after becoming a radio
	input = document.createElement( "input" );
	input.value = "t";
	input.type = "radio";
	support.radioValue = input.value === "t";
} )();


var boolHook,
	attrHandle = jQuery.expr.attrHandle;

jQuery.fn.extend( {
	attr: function( name, value ) {
		return access( this, jQuery.attr, name, value, arguments.length > 1 );
	},

	removeAttr: function( name ) {
		return this.each( function() {
			jQuery.removeAttr( this, name );
		} );
	}
} );

jQuery.extend( {
	attr: function( elem, name, value ) {
		var ret, hooks,
			nType = elem.nodeType;

		// Don't get/set attributes on text, comment and attribute nodes
		if ( nType === 3 || nType === 8 || nType === 2 ) {
			return;
		}

		// Fallback to prop when attributes are not supported
		if ( typeof elem.getAttribute === "undefined" ) {
			return jQuery.prop( elem, name, value );
		}

		// Attribute hooks are determined by the lowercase version
		// Grab necessary hook if one is defined
		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
			hooks = jQuery.attrHooks[ name.toLowerCase() ] ||
				( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
		}

		if ( value !== undefined ) {
			if ( value === null ) {
				jQuery.removeAttr( elem, name );
				return;
			}

			if ( hooks && "set" in hooks &&
				( ret = hooks.set( elem, value, name ) ) !== undefined ) {
				return ret;
			}

			elem.setAttribute( name, value + "" );
			return value;
		}

		if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
			return ret;
		}

		ret = jQuery.find.attr( elem, name );

		// Non-existent attributes return null, we normalize to undefined
		return ret == null ? undefined : ret;
	},

	attrHooks: {
		type: {
			set: function( elem, value ) {
				if ( !support.radioValue && value === "radio" &&
					nodeName( elem, "input" ) ) {
					var val = elem.value;
					elem.setAttribute( "type", value );
					if ( val ) {
						elem.value = val;
					}
					return value;
				}
			}
		}
	},

	removeAttr: function( elem, value ) {
		var name,
			i = 0,

			// Attribute names can contain non-HTML whitespace characters
			// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
			attrNames = value && value.match( rnothtmlwhite );

		if ( attrNames && elem.nodeType === 1 ) {
			while ( ( name = attrNames[ i++ ] ) ) {
				elem.removeAttribute( name );
			}
		}
	}
} );

// Hooks for boolean attributes
boolHook = {
	set: function( elem, value, name ) {
		if ( value === false ) {

			// Remove boolean attributes when set to false
			jQuery.removeAttr( elem, name );
		} else {
			elem.setAttribute( name, name );
		}
		return name;
	}
};

jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) {
	var getter = attrHandle[ name ] || jQuery.find.attr;

	attrHandle[ name ] = function( elem, name, isXML ) {
		var ret, handle,
			lowercaseName = name.toLowerCase();

		if ( !isXML ) {

			// Avoid an infinite loop by temporarily removing this function from the getter
			handle = attrHandle[ lowercaseName ];
			attrHandle[ lowercaseName ] = ret;
			ret = getter( elem, name, isXML ) != null ?
				lowercaseName :
				null;
			attrHandle[ lowercaseName ] = handle;
		}
		return ret;
	};
} );




var rfocusable = /^(?:input|select|textarea|button)$/i,
	rclickable = /^(?:a|area)$/i;

jQuery.fn.extend( {
	prop: function( name, value ) {
		return access( this, jQuery.prop, name, value, arguments.length > 1 );
	},

	removeProp: function( name ) {
		return this.each( function() {
			delete this[ jQuery.propFix[ name ] || name ];
		} );
	}
} );

jQuery.extend( {
	prop: function( elem, name, value ) {
		var ret, hooks,
			nType = elem.nodeType;

		// Don't get/set properties on text, comment and attribute nodes
		if ( nType === 3 || nType === 8 || nType === 2 ) {
			return;
		}

		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {

			// Fix name and attach hooks
			name = jQuery.propFix[ name ] || name;
			hooks = jQuery.propHooks[ name ];
		}

		if ( value !== undefined ) {
			if ( hooks && "set" in hooks &&
				( ret = hooks.set( elem, value, name ) ) !== undefined ) {
				return ret;
			}

			return ( elem[ name ] = value );
		}

		if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
			return ret;
		}

		return elem[ name ];
	},

	propHooks: {
		tabIndex: {
			get: function( elem ) {

				// Support: IE <=9 - 11 only
				// elem.tabIndex doesn't always return the
				// correct value when it hasn't been explicitly set
				// Use proper attribute retrieval (trac-12072)
				var tabindex = jQuery.find.attr( elem, "tabindex" );

				if ( tabindex ) {
					return parseInt( tabindex, 10 );
				}

				if (
					rfocusable.test( elem.nodeName ) ||
					rclickable.test( elem.nodeName ) &&
					elem.href
				) {
					return 0;
				}

				return -1;
			}
		}
	},

	propFix: {
		"for": "htmlFor",
		"class": "className"
	}
} );

// Support: IE <=11 only
// Accessing the selectedIndex property
// forces the browser to respect setting selected
// on the option
// The getter ensures a default option is selected
// when in an optgroup
// eslint rule "no-unused-expressions" is disabled for this code
// since it considers such accessions noop
if ( !support.optSelected ) {
	jQuery.propHooks.selected = {
		get: function( elem ) {

			/* eslint no-unused-expressions: "off" */

			var parent = elem.parentNode;
			if ( parent && parent.parentNode ) {
				parent.parentNode.selectedIndex;
			}
			return null;
		},
		set: function( elem ) {

			/* eslint no-unused-expressions: "off" */

			var parent = elem.parentNode;
			if ( parent ) {
				parent.selectedIndex;

				if ( parent.parentNode ) {
					parent.parentNode.selectedIndex;
				}
			}
		}
	};
}

jQuery.each( [
	"tabIndex",
	"readOnly",
	"maxLength",
	"cellSpacing",
	"cellPadding",
	"rowSpan",
	"colSpan",
	"useMap",
	"frameBorder",
	"contentEditable"
], function() {
	jQuery.propFix[ this.toLowerCase() ] = this;
} );




	// Strip and collapse whitespace according to HTML spec
	// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace
	function stripAndCollapse( value ) {
		var tokens = value.match( rnothtmlwhite ) || [];
		return tokens.join( " " );
	}


function getClass( elem ) {
	return elem.getAttribute && elem.getAttribute( "class" ) || "";
}

function classesToArray( value ) {
	if ( Array.isArray( value ) ) {
		return value;
	}
	if ( typeof value === "string" ) {
		return value.match( rnothtmlwhite ) || [];
	}
	return [];
}

jQuery.fn.extend( {
	addClass: function( value ) {
		var classNames, cur, curValue, className, i, finalValue;

		if ( isFunction( value ) ) {
			return this.each( function( j ) {
				jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
			} );
		}

		classNames = classesToArray( value );

		if ( classNames.length ) {
			return this.each( function() {
				curValue = getClass( this );
				cur = this.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );

				if ( cur ) {
					for ( i = 0; i < classNames.length; i++ ) {
						className = classNames[ i ];
						if ( cur.indexOf( " " + className + " " ) < 0 ) {
							cur += className + " ";
						}
					}

					// Only assign if different to avoid unneeded rendering.
					finalValue = stripAndCollapse( cur );
					if ( curValue !== finalValue ) {
						this.setAttribute( "class", finalValue );
					}
				}
			} );
		}

		return this;
	},

	removeClass: function( value ) {
		var classNames, cur, curValue, className, i, finalValue;

		if ( isFunction( value ) ) {
			return this.each( function( j ) {
				jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
			} );
		}

		if ( !arguments.length ) {
			return this.attr( "class", "" );
		}

		classNames = classesToArray( value );

		if ( classNames.length ) {
			return this.each( function() {
				curValue = getClass( this );

				// This expression is here for better compressibility (see addClass)
				cur = this.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );

				if ( cur ) {
					for ( i = 0; i < classNames.length; i++ ) {
						className = classNames[ i ];

						// Remove *all* instances
						while ( cur.indexOf( " " + className + " " ) > -1 ) {
							cur = cur.replace( " " + className + " ", " " );
						}
					}

					// Only assign if different to avoid unneeded rendering.
					finalValue = stripAndCollapse( cur );
					if ( curValue !== finalValue ) {
						this.setAttribute( "class", finalValue );
					}
				}
			} );
		}

		return this;
	},

	toggleClass: function( value, stateVal ) {
		var classNames, className, i, self,
			type = typeof value,
			isValidValue = type === "string" || Array.isArray( value );

		if ( isFunction( value ) ) {
			return this.each( function( i ) {
				jQuery( this ).toggleClass(
					value.call( this, i, getClass( this ), stateVal ),
					stateVal
				);
			} );
		}

		if ( typeof stateVal === "boolean" && isValidValue ) {
			return stateVal ? this.addClass( value ) : this.removeClass( value );
		}

		classNames = classesToArray( value );

		return this.each( function() {
			if ( isValidValue ) {

				// Toggle individual class names
				self = jQuery( this );

				for ( i = 0; i < classNames.length; i++ ) {
					className = classNames[ i ];

					// Check each className given, space separated list
					if ( self.hasClass( className ) ) {
						self.removeClass( className );
					} else {
						self.addClass( className );
					}
				}

			// Toggle whole class name
			} else if ( value === undefined || type === "boolean" ) {
				className = getClass( this );
				if ( className ) {

					// Store className if set
					dataPriv.set( this, "__className__", className );
				}

				// If the element has a class name or if we're passed `false`,
				// then remove the whole classname (if there was one, the above saved it).
				// Otherwise bring back whatever was previously saved (if anything),
				// falling back to the empty string if nothing was stored.
				if ( this.setAttribute ) {
					this.setAttribute( "class",
						className || value === false ?
							"" :
							dataPriv.get( this, "__className__" ) || ""
					);
				}
			}
		} );
	},

	hasClass: function( selector ) {
		var className, elem,
			i = 0;

		className = " " + selector + " ";
		while ( ( elem = this[ i++ ] ) ) {
			if ( elem.nodeType === 1 &&
				( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
				return true;
			}
		}

		return false;
	}
} );




var rreturn = /\r/g;

jQuery.fn.extend( {
	val: function( value ) {
		var hooks, ret, valueIsFunction,
			elem = this[ 0 ];

		if ( !arguments.length ) {
			if ( elem ) {
				hooks = jQuery.valHooks[ elem.type ] ||
					jQuery.valHooks[ elem.nodeName.toLowerCase() ];

				if ( hooks &&
					"get" in hooks &&
					( ret = hooks.get( elem, "value" ) ) !== undefined
				) {
					return ret;
				}

				ret = elem.value;

				// Handle most common string cases
				if ( typeof ret === "string" ) {
					return ret.replace( rreturn, "" );
				}

				// Handle cases where value is null/undef or number
				return ret == null ? "" : ret;
			}

			return;
		}

		valueIsFunction = isFunction( value );

		return this.each( function( i ) {
			var val;

			if ( this.nodeType !== 1 ) {
				return;
			}

			if ( valueIsFunction ) {
				val = value.call( this, i, jQuery( this ).val() );
			} else {
				val = value;
			}

			// Treat null/undefined as ""; convert numbers to string
			if ( val == null ) {
				val = "";

			} else if ( typeof val === "number" ) {
				val += "";

			} else if ( Array.isArray( val ) ) {
				val = jQuery.map( val, function( value ) {
					return value == null ? "" : value + "";
				} );
			}

			hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];

			// If set returns undefined, fall back to normal setting
			if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
				this.value = val;
			}
		} );
	}
} );

jQuery.extend( {
	valHooks: {
		option: {
			get: function( elem ) {

				var val = jQuery.find.attr( elem, "value" );
				return val != null ?
					val :

					// Support: IE <=10 - 11 only
					// option.text throws exceptions (trac-14686, trac-14858)
					// Strip and collapse whitespace
					// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
					stripAndCollapse( jQuery.text( elem ) );
			}
		},
		select: {
			get: function( elem ) {
				var value, option, i,
					options = elem.options,
					index = elem.selectedIndex,
					one = elem.type === "select-one",
					values = one ? null : [],
					max = one ? index + 1 : options.length;

				if ( index < 0 ) {
					i = max;

				} else {
					i = one ? index : 0;
				}

				// Loop through all the selected options
				for ( ; i < max; i++ ) {
					option = options[ i ];

					// Support: IE <=9 only
					// IE8-9 doesn't update selected after form reset (trac-2551)
					if ( ( option.selected || i === index ) &&

							// Don't return options that are disabled or in a disabled optgroup
							!option.disabled &&
							( !option.parentNode.disabled ||
								!nodeName( option.parentNode, "optgroup" ) ) ) {

						// Get the specific value for the option
						value = jQuery( option ).val();

						// We don't need an array for one selects
						if ( one ) {
							return value;
						}

						// Multi-Selects return an array
						values.push( value );
					}
				}

				return values;
			},

			set: function( elem, value ) {
				var optionSet, option,
					options = elem.options,
					values = jQuery.makeArray( value ),
					i = options.length;

				while ( i-- ) {
					option = options[ i ];

					/* eslint-disable no-cond-assign */

					if ( option.selected =
						jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
					) {
						optionSet = true;
					}

					/* eslint-enable no-cond-assign */
				}

				// Force browsers to behave consistently when non-matching value is set
				if ( !optionSet ) {
					elem.selectedIndex = -1;
				}
				return values;
			}
		}
	}
} );

// Radios and checkboxes getter/setter
jQuery.each( [ "radio", "checkbox" ], function() {
	jQuery.valHooks[ this ] = {
		set: function( elem, value ) {
			if ( Array.isArray( value ) ) {
				return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
			}
		}
	};
	if ( !support.checkOn ) {
		jQuery.valHooks[ this ].get = function( elem ) {
			return elem.getAttribute( "value" ) === null ? "on" : elem.value;
		};
	}
} );




// Return jQuery for attributes-only inclusion
var location = window.location;

var nonce = { guid: Date.now() };

var rquery = ( /\?/ );



// Cross-browser xml parsing
jQuery.parseXML = function( data ) {
	var xml, parserErrorElem;
	if ( !data || typeof data !== "string" ) {
		return null;
	}

	// Support: IE 9 - 11 only
	// IE throws on parseFromString with invalid input.
	try {
		xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
	} catch ( e ) {}

	parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ];
	if ( !xml || parserErrorElem ) {
		jQuery.error( "Invalid XML: " + (
			parserErrorElem ?
				jQuery.map( parserErrorElem.childNodes, function( el ) {
					return el.textContent;
				} ).join( "\n" ) :
				data
		) );
	}
	return xml;
};


var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
	stopPropagationCallback = function( e ) {
		e.stopPropagation();
	};

jQuery.extend( jQuery.event, {

	trigger: function( event, data, elem, onlyHandlers ) {

		var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
			eventPath = [ elem || document ],
			type = hasOwn.call( event, "type" ) ? event.type : event,
			namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];

		cur = lastElement = tmp = elem = elem || document;

		// Don't do events on text and comment nodes
		if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
			return;
		}

		// focus/blur morphs to focusin/out; ensure we're not firing them right now
		if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
			return;
		}

		if ( type.indexOf( "." ) > -1 ) {

			// Namespaced trigger; create a regexp to match event type in handle()
			namespaces = type.split( "." );
			type = namespaces.shift();
			namespaces.sort();
		}
		ontype = type.indexOf( ":" ) < 0 && "on" + type;

		// Caller can pass in a jQuery.Event object, Object, or just an event type string
		event = event[ jQuery.expando ] ?
			event :
			new jQuery.Event( type, typeof event === "object" && event );

		// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
		event.isTrigger = onlyHandlers ? 2 : 3;
		event.namespace = namespaces.join( "." );
		event.rnamespace = event.namespace ?
			new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
			null;

		// Clean up the event in case it is being reused
		event.result = undefined;
		if ( !event.target ) {
			event.target = elem;
		}

		// Clone any incoming data and prepend the event, creating the handler arg list
		data = data == null ?
			[ event ] :
			jQuery.makeArray( data, [ event ] );

		// Allow special events to draw outside the lines
		special = jQuery.event.special[ type ] || {};
		if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
			return;
		}

		// Determine event propagation path in advance, per W3C events spec (trac-9951)
		// Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)
		if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {

			bubbleType = special.delegateType || type;
			if ( !rfocusMorph.test( bubbleType + type ) ) {
				cur = cur.parentNode;
			}
			for ( ; cur; cur = cur.parentNode ) {
				eventPath.push( cur );
				tmp = cur;
			}

			// Only add window if we got to document (e.g., not plain obj or detached DOM)
			if ( tmp === ( elem.ownerDocument || document ) ) {
				eventPath.push( tmp.defaultView || tmp.parentWindow || window );
			}
		}

		// Fire handlers on the event path
		i = 0;
		while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
			lastElement = cur;
			event.type = i > 1 ?
				bubbleType :
				special.bindType || type;

			// jQuery handler
			handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] &&
				dataPriv.get( cur, "handle" );
			if ( handle ) {
				handle.apply( cur, data );
			}

			// Native handler
			handle = ontype && cur[ ontype ];
			if ( handle && handle.apply && acceptData( cur ) ) {
				event.result = handle.apply( cur, data );
				if ( event.result === false ) {
					event.preventDefault();
				}
			}
		}
		event.type = type;

		// If nobody prevented the default action, do it now
		if ( !onlyHandlers && !event.isDefaultPrevented() ) {

			if ( ( !special._default ||
				special._default.apply( eventPath.pop(), data ) === false ) &&
				acceptData( elem ) ) {

				// Call a native DOM method on the target with the same name as the event.
				// Don't do default actions on window, that's where global variables be (trac-6170)
				if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {

					// Don't re-trigger an onFOO event when we call its FOO() method
					tmp = elem[ ontype ];

					if ( tmp ) {
						elem[ ontype ] = null;
					}

					// Prevent re-triggering of the same event, since we already bubbled it above
					jQuery.event.triggered = type;

					if ( event.isPropagationStopped() ) {
						lastElement.addEventListener( type, stopPropagationCallback );
					}

					elem[ type ]();

					if ( event.isPropagationStopped() ) {
						lastElement.removeEventListener( type, stopPropagationCallback );
					}

					jQuery.event.triggered = undefined;

					if ( tmp ) {
						elem[ ontype ] = tmp;
					}
				}
			}
		}

		return event.result;
	},

	// Piggyback on a donor event to simulate a different one
	// Used only for `focus(in | out)` events
	simulate: function( type, elem, event ) {
		var e = jQuery.extend(
			new jQuery.Event(),
			event,
			{
				type: type,
				isSimulated: true
			}
		);

		jQuery.event.trigger( e, null, elem );
	}

} );

jQuery.fn.extend( {

	trigger: function( type, data ) {
		return this.each( function() {
			jQuery.event.trigger( type, data, this );
		} );
	},
	triggerHandler: function( type, data ) {
		var elem = this[ 0 ];
		if ( elem ) {
			return jQuery.event.trigger( type, data, elem, true );
		}
	}
} );


var
	rbracket = /\[\]$/,
	rCRLF = /\r?\n/g,
	rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
	rsubmittable = /^(?:input|select|textarea|keygen)/i;

function buildParams( prefix, obj, traditional, add ) {
	var name;

	if ( Array.isArray( obj ) ) {

		// Serialize array item.
		jQuery.each( obj, function( i, v ) {
			if ( traditional || rbracket.test( prefix ) ) {

				// Treat each array item as a scalar.
				add( prefix, v );

			} else {

				// Item is non-scalar (array or object), encode its numeric index.
				buildParams(
					prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
					v,
					traditional,
					add
				);
			}
		} );

	} else if ( !traditional && toType( obj ) === "object" ) {

		// Serialize object item.
		for ( name in obj ) {
			buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
		}

	} else {

		// Serialize scalar item.
		add( prefix, obj );
	}
}

// Serialize an array of form elements or a set of
// key/values into a query string
jQuery.param = function( a, traditional ) {
	var prefix,
		s = [],
		add = function( key, valueOrFunction ) {

			// If value is a function, invoke it and use its return value
			var value = isFunction( valueOrFunction ) ?
				valueOrFunction() :
				valueOrFunction;

			s[ s.length ] = encodeURIComponent( key ) + "=" +
				encodeURIComponent( value == null ? "" : value );
		};

	if ( a == null ) {
		return "";
	}

	// If an array was passed in, assume that it is an array of form elements.
	if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {

		// Serialize the form elements
		jQuery.each( a, function() {
			add( this.name, this.value );
		} );

	} else {

		// If traditional, encode the "old" way (the way 1.3.2 or older
		// did it), otherwise encode params recursively.
		for ( prefix in a ) {
			buildParams( prefix, a[ prefix ], traditional, add );
		}
	}

	// Return the resulting serialization
	return s.join( "&" );
};

jQuery.fn.extend( {
	serialize: function() {
		return jQuery.param( this.serializeArray() );
	},
	serializeArray: function() {
		return this.map( function() {

			// Can add propHook for "elements" to filter or add form elements
			var elements = jQuery.prop( this, "elements" );
			return elements ? jQuery.makeArray( elements ) : this;
		} ).filter( function() {
			var type = this.type;

			// Use .is( ":disabled" ) so that fieldset[disabled] works
			return this.name && !jQuery( this ).is( ":disabled" ) &&
				rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
				( this.checked || !rcheckableType.test( type ) );
		} ).map( function( _i, elem ) {
			var val = jQuery( this ).val();

			if ( val == null ) {
				return null;
			}

			if ( Array.isArray( val ) ) {
				return jQuery.map( val, function( val ) {
					return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
				} );
			}

			return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
		} ).get();
	}
} );


var
	r20 = /%20/g,
	rhash = /#.*$/,
	rantiCache = /([?&])_=[^&]*/,
	rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,

	// trac-7653, trac-8125, trac-8152: local protocol detection
	rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
	rnoContent = /^(?:GET|HEAD)$/,
	rprotocol = /^\/\//,

	/* Prefilters
	 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
	 * 2) These are called:
	 *    - BEFORE asking for a transport
	 *    - AFTER param serialization (s.data is a string if s.processData is true)
	 * 3) key is the dataType
	 * 4) the catchall symbol "*" can be used
	 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
	 */
	prefilters = {},

	/* Transports bindings
	 * 1) key is the dataType
	 * 2) the catchall symbol "*" can be used
	 * 3) selection will start with transport dataType and THEN go to "*" if needed
	 */
	transports = {},

	// Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression
	allTypes = "*/".concat( "*" ),

	// Anchor tag for parsing the document origin
	originAnchor = document.createElement( "a" );

originAnchor.href = location.href;

// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
function addToPrefiltersOrTransports( structure ) {

	// dataTypeExpression is optional and defaults to "*"
	return function( dataTypeExpression, func ) {

		if ( typeof dataTypeExpression !== "string" ) {
			func = dataTypeExpression;
			dataTypeExpression = "*";
		}

		var dataType,
			i = 0,
			dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];

		if ( isFunction( func ) ) {

			// For each dataType in the dataTypeExpression
			while ( ( dataType = dataTypes[ i++ ] ) ) {

				// Prepend if requested
				if ( dataType[ 0 ] === "+" ) {
					dataType = dataType.slice( 1 ) || "*";
					( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );

				// Otherwise append
				} else {
					( structure[ dataType ] = structure[ dataType ] || [] ).push( func );
				}
			}
		}
	};
}

// Base inspection function for prefilters and transports
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {

	var inspected = {},
		seekingTransport = ( structure === transports );

	function inspect( dataType ) {
		var selected;
		inspected[ dataType ] = true;
		jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
			var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
			if ( typeof dataTypeOrTransport === "string" &&
				!seekingTransport && !inspected[ dataTypeOrTransport ] ) {

				options.dataTypes.unshift( dataTypeOrTransport );
				inspect( dataTypeOrTransport );
				return false;
			} else if ( seekingTransport ) {
				return !( selected = dataTypeOrTransport );
			}
		} );
		return selected;
	}

	return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
}

// A special extend for ajax options
// that takes "flat" options (not to be deep extended)
// Fixes trac-9887
function ajaxExtend( target, src ) {
	var key, deep,
		flatOptions = jQuery.ajaxSettings.flatOptions || {};

	for ( key in src ) {
		if ( src[ key ] !== undefined ) {
			( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
		}
	}
	if ( deep ) {
		jQuery.extend( true, target, deep );
	}

	return target;
}

/* Handles responses to an ajax request:
 * - finds the right dataType (mediates between content-type and expected dataType)
 * - returns the corresponding response
 */
function ajaxHandleResponses( s, jqXHR, responses ) {

	var ct, type, finalDataType, firstDataType,
		contents = s.contents,
		dataTypes = s.dataTypes;

	// Remove auto dataType and get content-type in the process
	while ( dataTypes[ 0 ] === "*" ) {
		dataTypes.shift();
		if ( ct === undefined ) {
			ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );
		}
	}

	// Check if we're dealing with a known content-type
	if ( ct ) {
		for ( type in contents ) {
			if ( contents[ type ] && contents[ type ].test( ct ) ) {
				dataTypes.unshift( type );
				break;
			}
		}
	}

	// Check to see if we have a response for the expected dataType
	if ( dataTypes[ 0 ] in responses ) {
		finalDataType = dataTypes[ 0 ];
	} else {

		// Try convertible dataTypes
		for ( type in responses ) {
			if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
				finalDataType = type;
				break;
			}
			if ( !firstDataType ) {
				firstDataType = type;
			}
		}

		// Or just use first one
		finalDataType = finalDataType || firstDataType;
	}

	// If we found a dataType
	// We add the dataType to the list if needed
	// and return the corresponding response
	if ( finalDataType ) {
		if ( finalDataType !== dataTypes[ 0 ] ) {
			dataTypes.unshift( finalDataType );
		}
		return responses[ finalDataType ];
	}
}

/* Chain conversions given the request and the original response
 * Also sets the responseXXX fields on the jqXHR instance
 */
function ajaxConvert( s, response, jqXHR, isSuccess ) {
	var conv2, current, conv, tmp, prev,
		converters = {},

		// Work with a copy of dataTypes in case we need to modify it for conversion
		dataTypes = s.dataTypes.slice();

	// Create converters map with lowercased keys
	if ( dataTypes[ 1 ] ) {
		for ( conv in s.converters ) {
			converters[ conv.toLowerCase() ] = s.converters[ conv ];
		}
	}

	current = dataTypes.shift();

	// Convert to each sequential dataType
	while ( current ) {

		if ( s.responseFields[ current ] ) {
			jqXHR[ s.responseFields[ current ] ] = response;
		}

		// Apply the dataFilter if provided
		if ( !prev && isSuccess && s.dataFilter ) {
			response = s.dataFilter( response, s.dataType );
		}

		prev = current;
		current = dataTypes.shift();

		if ( current ) {

			// There's only work to do if current dataType is non-auto
			if ( current === "*" ) {

				current = prev;

			// Convert response if prev dataType is non-auto and differs from current
			} else if ( prev !== "*" && prev !== current ) {

				// Seek a direct converter
				conv = converters[ prev + " " + current ] || converters[ "* " + current ];

				// If none found, seek a pair
				if ( !conv ) {
					for ( conv2 in converters ) {

						// If conv2 outputs current
						tmp = conv2.split( " " );
						if ( tmp[ 1 ] === current ) {

							// If prev can be converted to accepted input
							conv = converters[ prev + " " + tmp[ 0 ] ] ||
								converters[ "* " + tmp[ 0 ] ];
							if ( conv ) {

								// Condense equivalence converters
								if ( conv === true ) {
									conv = converters[ conv2 ];

								// Otherwise, insert the intermediate dataType
								} else if ( converters[ conv2 ] !== true ) {
									current = tmp[ 0 ];
									dataTypes.unshift( tmp[ 1 ] );
								}
								break;
							}
						}
					}
				}

				// Apply converter (if not an equivalence)
				if ( conv !== true ) {

					// Unless errors are allowed to bubble, catch and return them
					if ( conv && s.throws ) {
						response = conv( response );
					} else {
						try {
							response = conv( response );
						} catch ( e ) {
							return {
								state: "parsererror",
								error: conv ? e : "No conversion from " + prev + " to " + current
							};
						}
					}
				}
			}
		}
	}

	return { state: "success", data: response };
}

jQuery.extend( {

	// Counter for holding the number of active queries
	active: 0,

	// Last-Modified header cache for next request
	lastModified: {},
	etag: {},

	ajaxSettings: {
		url: location.href,
		type: "GET",
		isLocal: rlocalProtocol.test( location.protocol ),
		global: true,
		processData: true,
		async: true,
		contentType: "application/x-www-form-urlencoded; charset=UTF-8",

		/*
		timeout: 0,
		data: null,
		dataType: null,
		username: null,
		password: null,
		cache: null,
		throws: false,
		traditional: false,
		headers: {},
		*/

		accepts: {
			"*": allTypes,
			text: "text/plain",
			html: "text/html",
			xml: "application/xml, text/xml",
			json: "application/json, text/javascript"
		},

		contents: {
			xml: /\bxml\b/,
			html: /\bhtml/,
			json: /\bjson\b/
		},

		responseFields: {
			xml: "responseXML",
			text: "responseText",
			json: "responseJSON"
		},

		// Data converters
		// Keys separate source (or catchall "*") and destination types with a single space
		converters: {

			// Convert anything to text
			"* text": String,

			// Text to html (true = no transformation)
			"text html": true,

			// Evaluate text as a json expression
			"text json": JSON.parse,

			// Parse text as xml
			"text xml": jQuery.parseXML
		},

		// For options that shouldn't be deep extended:
		// you can add your own custom options here if
		// and when you create one that shouldn't be
		// deep extended (see ajaxExtend)
		flatOptions: {
			url: true,
			context: true
		}
	},

	// Creates a full fledged settings object into target
	// with both ajaxSettings and settings fields.
	// If target is omitted, writes into ajaxSettings.
	ajaxSetup: function( target, settings ) {
		return settings ?

			// Building a settings object
			ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :

			// Extending ajaxSettings
			ajaxExtend( jQuery.ajaxSettings, target );
	},

	ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
	ajaxTransport: addToPrefiltersOrTransports( transports ),

	// Main method
	ajax: function( url, options ) {

		// If url is an object, simulate pre-1.5 signature
		if ( typeof url === "object" ) {
			options = url;
			url = undefined;
		}

		// Force options to be an object
		options = options || {};

		var transport,

			// URL without anti-cache param
			cacheURL,

			// Response headers
			responseHeadersString,
			responseHeaders,

			// timeout handle
			timeoutTimer,

			// Url cleanup var
			urlAnchor,

			// Request state (becomes false upon send and true upon completion)
			completed,

			// To know if global events are to be dispatched
			fireGlobals,

			// Loop variable
			i,

			// uncached part of the url
			uncached,

			// Create the final options object
			s = jQuery.ajaxSetup( {}, options ),

			// Callbacks context
			callbackContext = s.context || s,

			// Context for global events is callbackContext if it is a DOM node or jQuery collection
			globalEventContext = s.context &&
				( callbackContext.nodeType || callbackContext.jquery ) ?
				jQuery( callbackContext ) :
				jQuery.event,

			// Deferreds
			deferred = jQuery.Deferred(),
			completeDeferred = jQuery.Callbacks( "once memory" ),

			// Status-dependent callbacks
			statusCode = s.statusCode || {},

			// Headers (they are sent all at once)
			requestHeaders = {},
			requestHeadersNames = {},

			// Default abort message
			strAbort = "canceled",

			// Fake xhr
			jqXHR = {
				readyState: 0,

				// Builds headers hashtable if needed
				getResponseHeader: function( key ) {
					var match;
					if ( completed ) {
						if ( !responseHeaders ) {
							responseHeaders = {};
							while ( ( match = rheaders.exec( responseHeadersString ) ) ) {
								responseHeaders[ match[ 1 ].toLowerCase() + " " ] =
									( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] )
										.concat( match[ 2 ] );
							}
						}
						match = responseHeaders[ key.toLowerCase() + " " ];
					}
					return match == null ? null : match.join( ", " );
				},

				// Raw string
				getAllResponseHeaders: function() {
					return completed ? responseHeadersString : null;
				},

				// Caches the header
				setRequestHeader: function( name, value ) {
					if ( completed == null ) {
						name = requestHeadersNames[ name.toLowerCase() ] =
							requestHeadersNames[ name.toLowerCase() ] || name;
						requestHeaders[ name ] = value;
					}
					return this;
				},

				// Overrides response content-type header
				overrideMimeType: function( type ) {
					if ( completed == null ) {
						s.mimeType = type;
					}
					return this;
				},

				// Status-dependent callbacks
				statusCode: function( map ) {
					var code;
					if ( map ) {
						if ( completed ) {

							// Execute the appropriate callbacks
							jqXHR.always( map[ jqXHR.status ] );
						} else {

							// Lazy-add the new callbacks in a way that preserves old ones
							for ( code in map ) {
								statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
							}
						}
					}
					return this;
				},

				// Cancel the request
				abort: function( statusText ) {
					var finalText = statusText || strAbort;
					if ( transport ) {
						transport.abort( finalText );
					}
					done( 0, finalText );
					return this;
				}
			};

		// Attach deferreds
		deferred.promise( jqXHR );

		// Add protocol if not provided (prefilters might expect it)
		// Handle falsy url in the settings object (trac-10093: consistency with old signature)
		// We also use the url parameter if available
		s.url = ( ( url || s.url || location.href ) + "" )
			.replace( rprotocol, location.protocol + "//" );

		// Alias method option to type as per ticket trac-12004
		s.type = options.method || options.type || s.method || s.type;

		// Extract dataTypes list
		s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ];

		// A cross-domain request is in order when the origin doesn't match the current origin.
		if ( s.crossDomain == null ) {
			urlAnchor = document.createElement( "a" );

			// Support: IE <=8 - 11, Edge 12 - 15
			// IE throws exception on accessing the href property if url is malformed,
			// e.g. http://example.com:80x/
			try {
				urlAnchor.href = s.url;

				// Support: IE <=8 - 11 only
				// Anchor's host property isn't correctly set when s.url is relative
				urlAnchor.href = urlAnchor.href;
				s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
					urlAnchor.protocol + "//" + urlAnchor.host;
			} catch ( e ) {

				// If there is an error parsing the URL, assume it is crossDomain,
				// it can be rejected by the transport if it is invalid
				s.crossDomain = true;
			}
		}

		// Convert data if not already a string
		if ( s.data && s.processData && typeof s.data !== "string" ) {
			s.data = jQuery.param( s.data, s.traditional );
		}

		// Apply prefilters
		inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );

		// If request was aborted inside a prefilter, stop there
		if ( completed ) {
			return jqXHR;
		}

		// We can fire global events as of now if asked to
		// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118)
		fireGlobals = jQuery.event && s.global;

		// Watch for a new set of requests
		if ( fireGlobals && jQuery.active++ === 0 ) {
			jQuery.event.trigger( "ajaxStart" );
		}

		// Uppercase the type
		s.type = s.type.toUpperCase();

		// Determine if request has content
		s.hasContent = !rnoContent.test( s.type );

		// Save the URL in case we're toying with the If-Modified-Since
		// and/or If-None-Match header later on
		// Remove hash to simplify url manipulation
		cacheURL = s.url.replace( rhash, "" );

		// More options handling for requests with no content
		if ( !s.hasContent ) {

			// Remember the hash so we can put it back
			uncached = s.url.slice( cacheURL.length );

			// If data is available and should be processed, append data to url
			if ( s.data && ( s.processData || typeof s.data === "string" ) ) {
				cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data;

				// trac-9682: remove data so that it's not used in an eventual retry
				delete s.data;
			}

			// Add or update anti-cache param if needed
			if ( s.cache === false ) {
				cacheURL = cacheURL.replace( rantiCache, "$1" );
				uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) +
					uncached;
			}

			// Put hash and anti-cache on the URL that will be requested (gh-1732)
			s.url = cacheURL + uncached;

		// Change '%20' to '+' if this is encoded form body content (gh-2658)
		} else if ( s.data && s.processData &&
			( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) {
			s.data = s.data.replace( r20, "+" );
		}

		// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
		if ( s.ifModified ) {
			if ( jQuery.lastModified[ cacheURL ] ) {
				jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
			}
			if ( jQuery.etag[ cacheURL ] ) {
				jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
			}
		}

		// Set the correct header, if data is being sent
		if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
			jqXHR.setRequestHeader( "Content-Type", s.contentType );
		}

		// Set the Accepts header for the server, depending on the dataType
		jqXHR.setRequestHeader(
			"Accept",
			s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
				s.accepts[ s.dataTypes[ 0 ] ] +
					( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
				s.accepts[ "*" ]
		);

		// Check for headers option
		for ( i in s.headers ) {
			jqXHR.setRequestHeader( i, s.headers[ i ] );
		}

		// Allow custom headers/mimetypes and early abort
		if ( s.beforeSend &&
			( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {

			// Abort if not done already and return
			return jqXHR.abort();
		}

		// Aborting is no longer a cancellation
		strAbort = "abort";

		// Install callbacks on deferreds
		completeDeferred.add( s.complete );
		jqXHR.done( s.success );
		jqXHR.fail( s.error );

		// Get transport
		transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );

		// If no transport, we auto-abort
		if ( !transport ) {
			done( -1, "No Transport" );
		} else {
			jqXHR.readyState = 1;

			// Send global event
			if ( fireGlobals ) {
				globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
			}

			// If request was aborted inside ajaxSend, stop there
			if ( completed ) {
				return jqXHR;
			}

			// Timeout
			if ( s.async && s.timeout > 0 ) {
				timeoutTimer = window.setTimeout( function() {
					jqXHR.abort( "timeout" );
				}, s.timeout );
			}

			try {
				completed = false;
				transport.send( requestHeaders, done );
			} catch ( e ) {

				// Rethrow post-completion exceptions
				if ( completed ) {
					throw e;
				}

				// Propagate others as results
				done( -1, e );
			}
		}

		// Callback for when everything is done
		function done( status, nativeStatusText, responses, headers ) {
			var isSuccess, success, error, response, modified,
				statusText = nativeStatusText;

			// Ignore repeat invocations
			if ( completed ) {
				return;
			}

			completed = true;

			// Clear timeout if it exists
			if ( timeoutTimer ) {
				window.clearTimeout( timeoutTimer );
			}

			// Dereference transport for early garbage collection
			// (no matter how long the jqXHR object will be used)
			transport = undefined;

			// Cache response headers
			responseHeadersString = headers || "";

			// Set readyState
			jqXHR.readyState = status > 0 ? 4 : 0;

			// Determine if successful
			isSuccess = status >= 200 && status < 300 || status === 304;

			// Get response data
			if ( responses ) {
				response = ajaxHandleResponses( s, jqXHR, responses );
			}

			// Use a noop converter for missing script but not if jsonp
			if ( !isSuccess &&
				jQuery.inArray( "script", s.dataTypes ) > -1 &&
				jQuery.inArray( "json", s.dataTypes ) < 0 ) {
				s.converters[ "text script" ] = function() {};
			}

			// Convert no matter what (that way responseXXX fields are always set)
			response = ajaxConvert( s, response, jqXHR, isSuccess );

			// If successful, handle type chaining
			if ( isSuccess ) {

				// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
				if ( s.ifModified ) {
					modified = jqXHR.getResponseHeader( "Last-Modified" );
					if ( modified ) {
						jQuery.lastModified[ cacheURL ] = modified;
					}
					modified = jqXHR.getResponseHeader( "etag" );
					if ( modified ) {
						jQuery.etag[ cacheURL ] = modified;
					}
				}

				// if no content
				if ( status === 204 || s.type === "HEAD" ) {
					statusText = "nocontent";

				// if not modified
				} else if ( status === 304 ) {
					statusText = "notmodified";

				// If we have data, let's convert it
				} else {
					statusText = response.state;
					success = response.data;
					error = response.error;
					isSuccess = !error;
				}
			} else {

				// Extract error from statusText and normalize for non-aborts
				error = statusText;
				if ( status || !statusText ) {
					statusText = "error";
					if ( status < 0 ) {
						status = 0;
					}
				}
			}

			// Set data for the fake xhr object
			jqXHR.status = status;
			jqXHR.statusText = ( nativeStatusText || statusText ) + "";

			// Success/Error
			if ( isSuccess ) {
				deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
			} else {
				deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
			}

			// Status-dependent callbacks
			jqXHR.statusCode( statusCode );
			statusCode = undefined;

			if ( fireGlobals ) {
				globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
					[ jqXHR, s, isSuccess ? success : error ] );
			}

			// Complete
			completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );

			if ( fireGlobals ) {
				globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );

				// Handle the global AJAX counter
				if ( !( --jQuery.active ) ) {
					jQuery.event.trigger( "ajaxStop" );
				}
			}
		}

		return jqXHR;
	},

	getJSON: function( url, data, callback ) {
		return jQuery.get( url, data, callback, "json" );
	},

	getScript: function( url, callback ) {
		return jQuery.get( url, undefined, callback, "script" );
	}
} );

jQuery.each( [ "get", "post" ], function( _i, method ) {
	jQuery[ method ] = function( url, data, callback, type ) {

		// Shift arguments if data argument was omitted
		if ( isFunction( data ) ) {
			type = type || callback;
			callback = data;
			data = undefined;
		}

		// The url can be an options object (which then must have .url)
		return jQuery.ajax( jQuery.extend( {
			url: url,
			type: method,
			dataType: type,
			data: data,
			success: callback
		}, jQuery.isPlainObject( url ) && url ) );
	};
} );

jQuery.ajaxPrefilter( function( s ) {
	var i;
	for ( i in s.headers ) {
		if ( i.toLowerCase() === "content-type" ) {
			s.contentType = s.headers[ i ] || "";
		}
	}
} );


jQuery._evalUrl = function( url, options, doc ) {
	return jQuery.ajax( {
		url: url,

		// Make this explicit, since user can override this through ajaxSetup (trac-11264)
		type: "GET",
		dataType: "script",
		cache: true,
		async: false,
		global: false,

		// Only evaluate the response if it is successful (gh-4126)
		// dataFilter is not invoked for failure responses, so using it instead
		// of the default converter is kludgy but it works.
		converters: {
			"text script": function() {}
		},
		dataFilter: function( response ) {
			jQuery.globalEval( response, options, doc );
		}
	} );
};


jQuery.fn.extend( {
	wrapAll: function( html ) {
		var wrap;

		if ( this[ 0 ] ) {
			if ( isFunction( html ) ) {
				html = html.call( this[ 0 ] );
			}

			// The elements to wrap the target around
			wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );

			if ( this[ 0 ].parentNode ) {
				wrap.insertBefore( this[ 0 ] );
			}

			wrap.map( function() {
				var elem = this;

				while ( elem.firstElementChild ) {
					elem = elem.firstElementChild;
				}

				return elem;
			} ).append( this );
		}

		return this;
	},

	wrapInner: function( html ) {
		if ( isFunction( html ) ) {
			return this.each( function( i ) {
				jQuery( this ).wrapInner( html.call( this, i ) );
			} );
		}

		return this.each( function() {
			var self = jQuery( this ),
				contents = self.contents();

			if ( contents.length ) {
				contents.wrapAll( html );

			} else {
				self.append( html );
			}
		} );
	},

	wrap: function( html ) {
		var htmlIsFunction = isFunction( html );

		return this.each( function( i ) {
			jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );
		} );
	},

	unwrap: function( selector ) {
		this.parent( selector ).not( "body" ).each( function() {
			jQuery( this ).replaceWith( this.childNodes );
		} );
		return this;
	}
} );


jQuery.expr.pseudos.hidden = function( elem ) {
	return !jQuery.expr.pseudos.visible( elem );
};
jQuery.expr.pseudos.visible = function( elem ) {
	return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
};




jQuery.ajaxSettings.xhr = function() {
	try {
		return new window.XMLHttpRequest();
	} catch ( e ) {}
};

var xhrSuccessStatus = {

		// File protocol always yields status code 0, assume 200
		0: 200,

		// Support: IE <=9 only
		// trac-1450: sometimes IE returns 1223 when it should be 204
		1223: 204
	},
	xhrSupported = jQuery.ajaxSettings.xhr();

support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
support.ajax = xhrSupported = !!xhrSupported;

jQuery.ajaxTransport( function( options ) {
	var callback, errorCallback;

	// Cross domain only allowed if supported through XMLHttpRequest
	if ( support.cors || xhrSupported && !options.crossDomain ) {
		return {
			send: function( headers, complete ) {
				var i,
					xhr = options.xhr();

				xhr.open(
					options.type,
					options.url,
					options.async,
					options.username,
					options.password
				);

				// Apply custom fields if provided
				if ( options.xhrFields ) {
					for ( i in options.xhrFields ) {
						xhr[ i ] = options.xhrFields[ i ];
					}
				}

				// Override mime type if needed
				if ( options.mimeType && xhr.overrideMimeType ) {
					xhr.overrideMimeType( options.mimeType );
				}

				// X-Requested-With header
				// For cross-domain requests, seeing as conditions for a preflight are
				// akin to a jigsaw puzzle, we simply never set it to be sure.
				// (it can always be set on a per-request basis or even using ajaxSetup)
				// For same-domain requests, won't change header if already provided.
				if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {
					headers[ "X-Requested-With" ] = "XMLHttpRequest";
				}

				// Set headers
				for ( i in headers ) {
					xhr.setRequestHeader( i, headers[ i ] );
				}

				// Callback
				callback = function( type ) {
					return function() {
						if ( callback ) {
							callback = errorCallback = xhr.onload =
								xhr.onerror = xhr.onabort = xhr.ontimeout =
									xhr.onreadystatechange = null;

							if ( type === "abort" ) {
								xhr.abort();
							} else if ( type === "error" ) {

								// Support: IE <=9 only
								// On a manual native abort, IE9 throws
								// errors on any property access that is not readyState
								if ( typeof xhr.status !== "number" ) {
									complete( 0, "error" );
								} else {
									complete(

										// File: protocol always yields status 0; see trac-8605, trac-14207
										xhr.status,
										xhr.statusText
									);
								}
							} else {
								complete(
									xhrSuccessStatus[ xhr.status ] || xhr.status,
									xhr.statusText,

									// Support: IE <=9 only
									// IE9 has no XHR2 but throws on binary (trac-11426)
									// For XHR2 non-text, let the caller handle it (gh-2498)
									( xhr.responseType || "text" ) !== "text"  ||
									typeof xhr.responseText !== "string" ?
										{ binary: xhr.response } :
										{ text: xhr.responseText },
									xhr.getAllResponseHeaders()
								);
							}
						}
					};
				};

				// Listen to events
				xhr.onload = callback();
				errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" );

				// Support: IE 9 only
				// Use onreadystatechange to replace onabort
				// to handle uncaught aborts
				if ( xhr.onabort !== undefined ) {
					xhr.onabort = errorCallback;
				} else {
					xhr.onreadystatechange = function() {

						// Check readyState before timeout as it changes
						if ( xhr.readyState === 4 ) {

							// Allow onerror to be called first,
							// but that will not handle a native abort
							// Also, save errorCallback to a variable
							// as xhr.onerror cannot be accessed
							window.setTimeout( function() {
								if ( callback ) {
									errorCallback();
								}
							} );
						}
					};
				}

				// Create the abort callback
				callback = callback( "abort" );

				try {

					// Do send the request (this may raise an exception)
					xhr.send( options.hasContent && options.data || null );
				} catch ( e ) {

					// trac-14683: Only rethrow if this hasn't been notified as an error yet
					if ( callback ) {
						throw e;
					}
				}
			},

			abort: function() {
				if ( callback ) {
					callback();
				}
			}
		};
	}
} );




// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
jQuery.ajaxPrefilter( function( s ) {
	if ( s.crossDomain ) {
		s.contents.script = false;
	}
} );

// Install script dataType
jQuery.ajaxSetup( {
	accepts: {
		script: "text/javascript, application/javascript, " +
			"application/ecmascript, application/x-ecmascript"
	},
	contents: {
		script: /\b(?:java|ecma)script\b/
	},
	converters: {
		"text script": function( text ) {
			jQuery.globalEval( text );
			return text;
		}
	}
} );

// Handle cache's special case and crossDomain
jQuery.ajaxPrefilter( "script", function( s ) {
	if ( s.cache === undefined ) {
		s.cache = false;
	}
	if ( s.crossDomain ) {
		s.type = "GET";
	}
} );

// Bind script tag hack transport
jQuery.ajaxTransport( "script", function( s ) {

	// This transport only deals with cross domain or forced-by-attrs requests
	if ( s.crossDomain || s.scriptAttrs ) {
		var script, callback;
		return {
			send: function( _, complete ) {
				script = jQuery( "<script>" )
					.attr( s.scriptAttrs || {} )
					.prop( { charset: s.scriptCharset, src: s.url } )
					.on( "load error", callback = function( evt ) {
						script.remove();
						callback = null;
						if ( evt ) {
							complete( evt.type === "error" ? 404 : 200, evt.type );
						}
					} );

				// Use native DOM manipulation to avoid our domManip AJAX trickery
				document.head.appendChild( script[ 0 ] );
			},
			abort: function() {
				if ( callback ) {
					callback();
				}
			}
		};
	}
} );




var oldCallbacks = [],
	rjsonp = /(=)\?(?=&|$)|\?\?/;

// Default jsonp settings
jQuery.ajaxSetup( {
	jsonp: "callback",
	jsonpCallback: function() {
		var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce.guid++ ) );
		this[ callback ] = true;
		return callback;
	}
} );

// Detect, normalize options and install callbacks for jsonp requests
jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {

	var callbackName, overwritten, responseContainer,
		jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
			"url" :
			typeof s.data === "string" &&
				( s.contentType || "" )
					.indexOf( "application/x-www-form-urlencoded" ) === 0 &&
				rjsonp.test( s.data ) && "data"
		);

	// Handle iff the expected data type is "jsonp" or we have a parameter to set
	if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {

		// Get callback name, remembering preexisting value associated with it
		callbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?
			s.jsonpCallback() :
			s.jsonpCallback;

		// Insert callback into url or form data
		if ( jsonProp ) {
			s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
		} else if ( s.jsonp !== false ) {
			s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
		}

		// Use data converter to retrieve json after script execution
		s.converters[ "script json" ] = function() {
			if ( !responseContainer ) {
				jQuery.error( callbackName + " was not called" );
			}
			return responseContainer[ 0 ];
		};

		// Force json dataType
		s.dataTypes[ 0 ] = "json";

		// Install callback
		overwritten = window[ callbackName ];
		window[ callbackName ] = function() {
			responseContainer = arguments;
		};

		// Clean-up function (fires after converters)
		jqXHR.always( function() {

			// If previous value didn't exist - remove it
			if ( overwritten === undefined ) {
				jQuery( window ).removeProp( callbackName );

			// Otherwise restore preexisting value
			} else {
				window[ callbackName ] = overwritten;
			}

			// Save back as free
			if ( s[ callbackName ] ) {

				// Make sure that re-using the options doesn't screw things around
				s.jsonpCallback = originalSettings.jsonpCallback;

				// Save the callback name for future use
				oldCallbacks.push( callbackName );
			}

			// Call if it was a function and we have a response
			if ( responseContainer && isFunction( overwritten ) ) {
				overwritten( responseContainer[ 0 ] );
			}

			responseContainer = overwritten = undefined;
		} );

		// Delegate to script
		return "script";
	}
} );




// Support: Safari 8 only
// In Safari 8 documents created via document.implementation.createHTMLDocument
// collapse sibling forms: the second one becomes a child of the first one.
// Because of that, this security measure has to be disabled in Safari 8.
// https://bugs.webkit.org/show_bug.cgi?id=137337
support.createHTMLDocument = ( function() {
	var body = document.implementation.createHTMLDocument( "" ).body;
	body.innerHTML = "<form></form><form></form>";
	return body.childNodes.length === 2;
} )();


// Argument "data" should be string of html
// context (optional): If specified, the fragment will be created in this context,
// defaults to document
// keepScripts (optional): If true, will include scripts passed in the html string
jQuery.parseHTML = function( data, context, keepScripts ) {
	if ( typeof data !== "string" ) {
		return [];
	}
	if ( typeof context === "boolean" ) {
		keepScripts = context;
		context = false;
	}

	var base, parsed, scripts;

	if ( !context ) {

		// Stop scripts or inline event handlers from being executed immediately
		// by using document.implementation
		if ( support.createHTMLDocument ) {
			context = document.implementation.createHTMLDocument( "" );

			// Set the base href for the created document
			// so any parsed elements with URLs
			// are based on the document's URL (gh-2965)
			base = context.createElement( "base" );
			base.href = document.location.href;
			context.head.appendChild( base );
		} else {
			context = document;
		}
	}

	parsed = rsingleTag.exec( data );
	scripts = !keepScripts && [];

	// Single tag
	if ( parsed ) {
		return [ context.createElement( parsed[ 1 ] ) ];
	}

	parsed = buildFragment( [ data ], context, scripts );

	if ( scripts && scripts.length ) {
		jQuery( scripts ).remove();
	}

	return jQuery.merge( [], parsed.childNodes );
};


/**
 * Load a url into a page
 */
jQuery.fn.load = function( url, params, callback ) {
	var selector, type, response,
		self = this,
		off = url.indexOf( " " );

	if ( off > -1 ) {
		selector = stripAndCollapse( url.slice( off ) );
		url = url.slice( 0, off );
	}

	// If it's a function
	if ( isFunction( params ) ) {

		// We assume that it's the callback
		callback = params;
		params = undefined;

	// Otherwise, build a param string
	} else if ( params && typeof params === "object" ) {
		type = "POST";
	}

	// If we have elements to modify, make the request
	if ( self.length > 0 ) {
		jQuery.ajax( {
			url: url,

			// If "type" variable is undefined, then "GET" method will be used.
			// Make value of this field explicit since
			// user can override it through ajaxSetup method
			type: type || "GET",
			dataType: "html",
			data: params
		} ).done( function( responseText ) {

			// Save response for use in complete callback
			response = arguments;

			self.html( selector ?

				// If a selector was specified, locate the right elements in a dummy div
				// Exclude scripts to avoid IE 'Permission Denied' errors
				jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :

				// Otherwise use the full result
				responseText );

		// If the request succeeds, this function gets "data", "status", "jqXHR"
		// but they are ignored because response was set above.
		// If it fails, this function gets "jqXHR", "status", "error"
		} ).always( callback && function( jqXHR, status ) {
			self.each( function() {
				callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );
			} );
		} );
	}

	return this;
};




jQuery.expr.pseudos.animated = function( elem ) {
	return jQuery.grep( jQuery.timers, function( fn ) {
		return elem === fn.elem;
	} ).length;
};




jQuery.offset = {
	setOffset: function( elem, options, i ) {
		var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
			position = jQuery.css( elem, "position" ),
			curElem = jQuery( elem ),
			props = {};

		// Set position first, in-case top/left are set even on static elem
		if ( position === "static" ) {
			elem.style.position = "relative";
		}

		curOffset = curElem.offset();
		curCSSTop = jQuery.css( elem, "top" );
		curCSSLeft = jQuery.css( elem, "left" );
		calculatePosition = ( position === "absolute" || position === "fixed" ) &&
			( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;

		// Need to be able to calculate position if either
		// top or left is auto and position is either absolute or fixed
		if ( calculatePosition ) {
			curPosition = curElem.position();
			curTop = curPosition.top;
			curLeft = curPosition.left;

		} else {
			curTop = parseFloat( curCSSTop ) || 0;
			curLeft = parseFloat( curCSSLeft ) || 0;
		}

		if ( isFunction( options ) ) {

			// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
			options = options.call( elem, i, jQuery.extend( {}, curOffset ) );
		}

		if ( options.top != null ) {
			props.top = ( options.top - curOffset.top ) + curTop;
		}
		if ( options.left != null ) {
			props.left = ( options.left - curOffset.left ) + curLeft;
		}

		if ( "using" in options ) {
			options.using.call( elem, props );

		} else {
			curElem.css( props );
		}
	}
};

jQuery.fn.extend( {

	// offset() relates an element's border box to the document origin
	offset: function( options ) {

		// Preserve chaining for setter
		if ( arguments.length ) {
			return options === undefined ?
				this :
				this.each( function( i ) {
					jQuery.offset.setOffset( this, options, i );
				} );
		}

		var rect, win,
			elem = this[ 0 ];

		if ( !elem ) {
			return;
		}

		// Return zeros for disconnected and hidden (display: none) elements (gh-2310)
		// Support: IE <=11 only
		// Running getBoundingClientRect on a
		// disconnected node in IE throws an error
		if ( !elem.getClientRects().length ) {
			return { top: 0, left: 0 };
		}

		// Get document-relative position by adding viewport scroll to viewport-relative gBCR
		rect = elem.getBoundingClientRect();
		win = elem.ownerDocument.defaultView;
		return {
			top: rect.top + win.pageYOffset,
			left: rect.left + win.pageXOffset
		};
	},

	// position() relates an element's margin box to its offset parent's padding box
	// This corresponds to the behavior of CSS absolute positioning
	position: function() {
		if ( !this[ 0 ] ) {
			return;
		}

		var offsetParent, offset, doc,
			elem = this[ 0 ],
			parentOffset = { top: 0, left: 0 };

		// position:fixed elements are offset from the viewport, which itself always has zero offset
		if ( jQuery.css( elem, "position" ) === "fixed" ) {

			// Assume position:fixed implies availability of getBoundingClientRect
			offset = elem.getBoundingClientRect();

		} else {
			offset = this.offset();

			// Account for the *real* offset parent, which can be the document or its root element
			// when a statically positioned element is identified
			doc = elem.ownerDocument;
			offsetParent = elem.offsetParent || doc.documentElement;
			while ( offsetParent &&
				( offsetParent === doc.body || offsetParent === doc.documentElement ) &&
				jQuery.css( offsetParent, "position" ) === "static" ) {

				offsetParent = offsetParent.parentNode;
			}
			if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {

				// Incorporate borders into its offset, since they are outside its content origin
				parentOffset = jQuery( offsetParent ).offset();
				parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true );
				parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true );
			}
		}

		// Subtract parent offsets and element margins
		return {
			top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
			left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
		};
	},

	// This method will return documentElement in the following cases:
	// 1) For the element inside the iframe without offsetParent, this method will return
	//    documentElement of the parent window
	// 2) For the hidden or detached element
	// 3) For body or html element, i.e. in case of the html node - it will return itself
	//
	// but those exceptions were never presented as a real life use-cases
	// and might be considered as more preferable results.
	//
	// This logic, however, is not guaranteed and can change at any point in the future
	offsetParent: function() {
		return this.map( function() {
			var offsetParent = this.offsetParent;

			while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {
				offsetParent = offsetParent.offsetParent;
			}

			return offsetParent || documentElement;
		} );
	}
} );

// Create scrollLeft and scrollTop methods
jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
	var top = "pageYOffset" === prop;

	jQuery.fn[ method ] = function( val ) {
		return access( this, function( elem, method, val ) {

			// Coalesce documents and windows
			var win;
			if ( isWindow( elem ) ) {
				win = elem;
			} else if ( elem.nodeType === 9 ) {
				win = elem.defaultView;
			}

			if ( val === undefined ) {
				return win ? win[ prop ] : elem[ method ];
			}

			if ( win ) {
				win.scrollTo(
					!top ? val : win.pageXOffset,
					top ? val : win.pageYOffset
				);

			} else {
				elem[ method ] = val;
			}
		}, method, val, arguments.length );
	};
} );

// Support: Safari <=7 - 9.1, Chrome <=37 - 49
// Add the top/left cssHooks using jQuery.fn.position
// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347
// getComputedStyle returns percent when specified for top/left/bottom/right;
// rather than make the css module depend on the offset module, just check for it here
jQuery.each( [ "top", "left" ], function( _i, prop ) {
	jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
		function( elem, computed ) {
			if ( computed ) {
				computed = curCSS( elem, prop );

				// If curCSS returns percentage, fallback to offset
				return rnumnonpx.test( computed ) ?
					jQuery( elem ).position()[ prop ] + "px" :
					computed;
			}
		}
	);
} );


// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
	jQuery.each( {
		padding: "inner" + name,
		content: type,
		"": "outer" + name
	}, function( defaultExtra, funcName ) {

		// Margin is only for outerHeight, outerWidth
		jQuery.fn[ funcName ] = function( margin, value ) {
			var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
				extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );

			return access( this, function( elem, type, value ) {
				var doc;

				if ( isWindow( elem ) ) {

					// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)
					return funcName.indexOf( "outer" ) === 0 ?
						elem[ "inner" + name ] :
						elem.document.documentElement[ "client" + name ];
				}

				// Get document width or height
				if ( elem.nodeType === 9 ) {
					doc = elem.documentElement;

					// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
					// whichever is greatest
					return Math.max(
						elem.body[ "scroll" + name ], doc[ "scroll" + name ],
						elem.body[ "offset" + name ], doc[ "offset" + name ],
						doc[ "client" + name ]
					);
				}

				return value === undefined ?

					// Get width or height on the element, requesting but not forcing parseFloat
					jQuery.css( elem, type, extra ) :

					// Set width or height on the element
					jQuery.style( elem, type, value, extra );
			}, type, chainable ? margin : undefined, chainable );
		};
	} );
} );


jQuery.each( [
	"ajaxStart",
	"ajaxStop",
	"ajaxComplete",
	"ajaxError",
	"ajaxSuccess",
	"ajaxSend"
], function( _i, type ) {
	jQuery.fn[ type ] = function( fn ) {
		return this.on( type, fn );
	};
} );




jQuery.fn.extend( {

	bind: function( types, data, fn ) {
		return this.on( types, null, data, fn );
	},
	unbind: function( types, fn ) {
		return this.off( types, null, fn );
	},

	delegate: function( selector, types, data, fn ) {
		return this.on( types, selector, data, fn );
	},
	undelegate: function( selector, types, fn ) {

		// ( namespace ) or ( selector, types [, fn] )
		return arguments.length === 1 ?
			this.off( selector, "**" ) :
			this.off( types, selector || "**", fn );
	},

	hover: function( fnOver, fnOut ) {
		return this
			.on( "mouseenter", fnOver )
			.on( "mouseleave", fnOut || fnOver );
	}
} );

jQuery.each(
	( "blur focus focusin focusout resize scroll click dblclick " +
	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
	"change select submit keydown keypress keyup contextmenu" ).split( " " ),
	function( _i, name ) {

		// Handle event binding
		jQuery.fn[ name ] = function( data, fn ) {
			return arguments.length > 0 ?
				this.on( name, null, data, fn ) :
				this.trigger( name );
		};
	}
);




// Support: Android <=4.0 only
// Make sure we trim BOM and NBSP
// Require that the "whitespace run" starts from a non-whitespace
// to avoid O(N^2) behavior when the engine would try matching "\s+$" at each space position.
var rtrim = /^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;

// Bind a function to a context, optionally partially applying any
// arguments.
// jQuery.proxy is deprecated to promote standards (specifically Function#bind)
// However, it is not slated for removal any time soon
jQuery.proxy = function( fn, context ) {
	var tmp, args, proxy;

	if ( typeof context === "string" ) {
		tmp = fn[ context ];
		context = fn;
		fn = tmp;
	}

	// Quick check to determine if target is callable, in the spec
	// this throws a TypeError, but we will just return undefined.
	if ( !isFunction( fn ) ) {
		return undefined;
	}

	// Simulated bind
	args = slice.call( arguments, 2 );
	proxy = function() {
		return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
	};

	// Set the guid of unique handler to the same of original handler, so it can be removed
	proxy.guid = fn.guid = fn.guid || jQuery.guid++;

	return proxy;
};

jQuery.holdReady = function( hold ) {
	if ( hold ) {
		jQuery.readyWait++;
	} else {
		jQuery.ready( true );
	}
};
jQuery.isArray = Array.isArray;
jQuery.parseJSON = JSON.parse;
jQuery.nodeName = nodeName;
jQuery.isFunction = isFunction;
jQuery.isWindow = isWindow;
jQuery.camelCase = camelCase;
jQuery.type = toType;

jQuery.now = Date.now;

jQuery.isNumeric = function( obj ) {

	// As of jQuery 3.0, isNumeric is limited to
	// strings and numbers (primitives or objects)
	// that can be coerced to finite numbers (gh-2662)
	var type = jQuery.type( obj );
	return ( type === "number" || type === "string" ) &&

		// parseFloat NaNs numeric-cast false positives ("")
		// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
		// subtraction forces infinities to NaN
		!isNaN( obj - parseFloat( obj ) );
};

jQuery.trim = function( text ) {
	return text == null ?
		"" :
		( text + "" ).replace( rtrim, "$1" );
};



// Register as a named AMD module, since jQuery can be concatenated with other
// files that may use define, but not via a proper concatenation script that
// understands anonymous AMD modules. A named AMD is safest and most robust
// way to register. Lowercase jquery is used because AMD module names are
// derived from file names, and jQuery is normally delivered in a lowercase
// file name. Do this after creating the global so that if an AMD module wants
// to call noConflict to hide this version of jQuery, it will work.

// Note that for maximum portability, libraries that are not jQuery should
// declare themselves as anonymous modules, and avoid setting a global if an
// AMD loader is present. jQuery is a special case. For more information, see
// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon

if ( typeof define === "function" && define.amd ) {
	define( "jquery", [], function() {
		return jQuery;
	} );
}




var

	// Map over jQuery in case of overwrite
	_jQuery = window.jQuery,

	// Map over the $ in case of overwrite
	_$ = window.$;

jQuery.noConflict = function( deep ) {
	if ( window.$ === jQuery ) {
		window.$ = _$;
	}

	if ( deep && window.jQuery === jQuery ) {
		window.jQuery = _jQuery;
	}

	return jQuery;
};

// Expose jQuery and $ identifiers, even in AMD
// (trac-7102#comment:10, https://github.com/jquery/jquery/pull/557)
// and CommonJS for browser emulators (trac-13566)
if ( typeof noGlobal === "undefined" ) {
	window.jQuery = window.$ = jQuery;
}




return jQuery;
} );
jQuery.noConflict();                                                                                                                                                                                                                                                                                                                                                                          jquery/jquery.masonry.min.js                                                                        0000644                 00000003433 15212564040 0012213 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * Masonry v2 shim
 * to maintain backwards compatibility
 * as of Masonry v3.1.2
 *
 * Cascading grid layout library
 * http://masonry.desandro.com
 * MIT License
 * by David DeSandro
 */
!function(a){"use strict";var b=a.Masonry;b.prototype._remapV2Options=function(){this._remapOption("gutterWidth","gutter"),this._remapOption("isResizable","isResizeBound"),this._remapOption("isRTL","isOriginLeft",function(a){return!a});var a=this.options.isAnimated;if(void 0!==a&&(this.options.transitionDuration=a?this.options.transitionDuration:0),void 0===a||a){var b=this.options.animationOptions,c=b&&b.duration;c&&(this.options.transitionDuration="string"==typeof c?c:c+"ms")}},b.prototype._remapOption=function(a,b,c){var d=this.options[a];void 0!==d&&(this.options[b]=c?c(d):d)};var c=b.prototype._create;b.prototype._create=function(){var a=this;this._remapV2Options(),c.apply(this,arguments),setTimeout(function(){jQuery(a.element).addClass("masonry")},0)};var d=b.prototype.layout;b.prototype.layout=function(){this._remapV2Options(),d.apply(this,arguments)};var e=b.prototype.option;b.prototype.option=function(){e.apply(this,arguments),this._remapV2Options()};var f=b.prototype._itemize;b.prototype._itemize=function(a){var b=f.apply(this,arguments);return jQuery(a).addClass("masonry-brick"),b};var g=b.prototype.measureColumns;b.prototype.measureColumns=function(){var a=this.options.columnWidth;a&&"function"==typeof a&&(this.getContainerWidth(),this.columnWidth=a(this.containerWidth)),g.apply(this,arguments)},b.prototype.reload=function(){this.reloadItems.apply(this,arguments),this.layout.apply(this)};var h=b.prototype.destroy;b.prototype.destroy=function(){var a=this.getItemElements();jQuery(this.element).removeClass("masonry"),jQuery(a).removeClass("masonry-brick"),h.apply(this,arguments)}}(window);                                                                                                                                                                                                                                     jquery/jquery.min.js                                                                                0000644                 00000253001 15212564040 0010522 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.1",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}function fe(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}ce.fn=ce.prototype={jquery:t,constructor:ce,length:0,toArray:function(){return ae.call(this)},get:function(e){return null==e?ae.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=ce.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return ce.each(this,e)},map:function(n){return this.pushStack(ce.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(ae.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(ce.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(ce.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:oe.sort,splice:oe.splice},ce.extend=ce.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||v(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(ce.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||ce.isPlainObject(n)?n:{},i=!1,a[t]=ce.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},ce.extend({expando:"jQuery"+(t+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==i.call(e))&&(!(t=r(e))||"function"==typeof(n=ue.call(t,"constructor")&&t.constructor)&&o.call(n)===a)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){m(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(c(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},text:function(e){var t,n="",r=0,i=e.nodeType;if(!i)while(t=e[r++])n+=ce.text(t);return 1===i||11===i?e.textContent:9===i?e.documentElement.textContent:3===i||4===i?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(c(Object(e))?ce.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:se.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!l.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(c(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:le}),"function"==typeof Symbol&&(ce.fn[Symbol.iterator]=oe[Symbol.iterator]),ce.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var pe=oe.pop,de=oe.sort,he=oe.splice,ge="[\\x20\\t\\r\\n\\f]",ve=new RegExp("^"+ge+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ge+"+$","g");ce.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var f=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function p(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}ce.escapeSelector=function(e){return(e+"").replace(f,p)};var ye=C,me=s;!function(){var e,b,w,o,a,T,r,C,d,i,k=me,S=ce.expando,E=0,n=0,s=W(),c=W(),u=W(),h=W(),l=function(e,t){return e===t&&(a=!0),0},f="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",t="(?:\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",p="\\["+ge+"*("+t+")(?:"+ge+"*([*^$|!~]?=)"+ge+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+t+"))|)"+ge+"*\\]",g=":("+t+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+p+")*)|.*)\\)|)",v=new RegExp(ge+"+","g"),y=new RegExp("^"+ge+"*,"+ge+"*"),m=new RegExp("^"+ge+"*([>+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="<a id='"+S+"' href='' disabled='disabled'></a><select id='"+S+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0<I(t,T,null,[e]).length},I.contains=function(e,t){return(e.ownerDocument||e)!=T&&V(e),ce.contains(e,t)},I.attr=function(e,t){(e.ownerDocument||e)!=T&&V(e);var n=b.attrHandle[t.toLowerCase()],r=n&&ue.call(b.attrHandle,t.toLowerCase())?n(e,t,!C):void 0;return void 0!==r?r:e.getAttribute(t)},I.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ce.uniqueSort=function(e){var t,n=[],r=0,i=0;if(a=!le.sortStable,o=!le.sortStable&&ae.call(e,0),de.call(e,l),a){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)he.call(e,n[r],1)}return o=null,e},ce.fn.uniqueSort=function(){return this.pushStack(ce.uniqueSort(ae.apply(this)))},(b=ce.expr={cacheLength:50,createPseudo:F,match:D,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(v," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(d,e,t,h,g){var v="nth"!==d.slice(0,3),y="last"!==d.slice(-4),m="of-type"===e;return 1===h&&0===g?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u=v!==y?"nextSibling":"previousSibling",l=e.parentNode,c=m&&e.nodeName.toLowerCase(),f=!n&&!m,p=!1;if(l){if(v){while(u){o=e;while(o=o[u])if(m?fe(o,c):1===o.nodeType)return!1;s=u="only"===d&&!s&&"nextSibling"}return!0}if(s=[y?l.firstChild:l.lastChild],y&&f){p=(a=(r=(i=l[S]||(l[S]={}))[d]||[])[0]===E&&r[1])&&r[2],o=a&&l.childNodes[a];while(o=++a&&o&&o[u]||(p=a=0)||s.pop())if(1===o.nodeType&&++p&&o===e){i[d]=[E,a,p];break}}else if(f&&(p=a=(r=(i=e[S]||(e[S]={}))[d]||[])[0]===E&&r[1]),!1===p)while(o=++a&&o&&o[u]||(p=a=0)||s.pop())if((m?fe(o,c):1===o.nodeType)&&++p&&(f&&((i=o[S]||(o[S]={}))[d]=[E,p]),o===e))break;return(p-=g)===h||p%h==0&&0<=p/h}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||I.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?F(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=se.call(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:F(function(e){var r=[],i=[],s=ne(e.replace(ve,"$1"));return s[S]?F(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:F(function(t){return function(e){return 0<I(t,e).length}}),contains:F(function(t){return t=t.replace(O,P),function(e){return-1<(e.textContent||ce.text(e)).indexOf(t)}}),lang:F(function(n){return A.test(n||"")||I.error("unsupported lang: "+n),n=n.replace(O,P).toLowerCase(),function(e){var t;do{if(t=C?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=ie.location&&ie.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===r},focus:function(e){return e===function(){try{return T.activeElement}catch(e){}}()&&T.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:z(!1),disabled:z(!0),checked:function(e){return fe(e,"input")&&!!e.checked||fe(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return q.test(e.nodeName)},input:function(e){return N.test(e.nodeName)},button:function(e){return fe(e,"input")&&"button"===e.type||fe(e,"button")},text:function(e){var t;return fe(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:X(function(){return[0]}),last:X(function(e,t){return[t-1]}),eq:X(function(e,t,n){return[n<0?n+t:n]}),even:X(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:X(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:X(function(e,t,n){var r;for(r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:X(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=B(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=_(e);function G(){}function Y(e,t){var n,r,i,o,a,s,u,l=c[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=y.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=m.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(ve," ")}),a=a.slice(n.length)),b.filter)!(r=D[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?I.error(e):c(e,s).slice(0)}function Q(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function J(a,e,t){var s=e.dir,u=e.next,l=u||s,c=t&&"parentNode"===l,f=n++;return e.first?function(e,t,n){while(e=e[s])if(1===e.nodeType||c)return a(e,t,n);return!1}:function(e,t,n){var r,i,o=[E,f];if(n){while(e=e[s])if((1===e.nodeType||c)&&a(e,t,n))return!0}else while(e=e[s])if(1===e.nodeType||c)if(i=e[S]||(e[S]={}),u&&fe(e,u))e=e[s]||e;else{if((r=i[l])&&r[0]===E&&r[1]===f)return o[2]=r[2];if((i[l]=o)[2]=a(e,t,n))return!0}return!1}}function K(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Z(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function ee(d,h,g,v,y,e){return v&&!v[S]&&(v=ee(v)),y&&!y[S]&&(y=ee(y,e)),F(function(e,t,n,r){var i,o,a,s,u=[],l=[],c=t.length,f=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)I(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),p=!d||!e&&h?f:Z(f,u,d,n,r);if(g?g(p,s=y||(e?d:c||v)?[]:t,n,r):s=p,v){i=Z(s,l),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(s[l[o]]=!(p[l[o]]=a))}if(e){if(y||d){if(y){i=[],o=s.length;while(o--)(a=s[o])&&i.push(p[o]=a);y(null,s=[],i,r)}o=s.length;while(o--)(a=s[o])&&-1<(i=y?se.call(e,a):u[o])&&(e[i]=!(t[i]=a))}}else s=Z(s===t?s.splice(c,s.length):s),y?y(null,t,s,r):k.apply(t,s)})}function te(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=J(function(e){return e===i},a,!0),l=J(function(e){return-1<se.call(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!=w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[J(K(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return ee(1<s&&K(c),1<s&&Q(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ve,"$1"),t,s<n&&te(e.slice(s,n)),n<r&&te(e=e.slice(n)),n<r&&Q(e))}c.push(t)}return K(c)}function ne(e,t){var n,v,y,m,x,r,i=[],o=[],a=u[e+" "];if(!a){t||(t=Y(e)),n=t.length;while(n--)(a=te(t[n]))[S]?i.push(a):o.push(a);(a=u(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=E+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==T||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==T||(V(o),n=!C);while(s=v[a++])if(s(o,t||T,n)){k.call(r,o);break}i&&(E=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=pe.call(r));f=Z(f)}k.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&ce.uniqueSort(r)}return i&&(E=h,w=p),c},m?F(r):r))).selector=e}return a}function re(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&Y(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&C&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(O,P),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=D.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(O,P),H.test(o[0].type)&&U(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&Q(o)))return k.apply(n,r),n;break}}}return(l||ne(e,c))(r,t,!C,n,!t||H.test(e)&&U(t.parentNode)||t),n}G.prototype=b.filters=b.pseudos,b.setFilters=new G,le.sortStable=S.split("").sort(l).join("")===S,V(),le.sortDetached=$(function(e){return 1&e.compareDocumentPosition(T.createElement("fieldset"))}),ce.find=I,ce.expr[":"]=ce.expr.pseudos,ce.unique=ce.uniqueSort,I.compile=ne,I.select=re,I.setDocument=V,I.tokenize=Y,I.escape=ce.escapeSelector,I.getText=ce.text,I.isXML=ce.isXMLDoc,I.selectors=ce.expr,I.support=ce.support,I.uniqueSort=ce.uniqueSort}();var d=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&ce(e).is(n))break;r.push(e)}return r},h=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},b=ce.expr.match.needsContext,w=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1<se.call(n,e)!==r}):ce.filter(n,e,r)}ce.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ce.find.matchesSelector(r,e)?[r]:[]:ce.find.matches(e,ce.grep(t,function(e){return 1===e.nodeType}))},ce.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(ce(e).filter(function(){for(t=0;t<r;t++)if(ce.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)ce.find(e,i[t],n);return 1<r?ce.uniqueSort(n):n},filter:function(e){return this.pushStack(T(this,e||[],!1))},not:function(e){return this.pushStack(T(this,e||[],!0))},is:function(e){return!!T(this,"string"==typeof e&&b.test(e)?ce(e):e||[],!1).length}});var k,S=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(ce.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&ce(e);if(!b.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&ce.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?ce.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?se.call(ce(e),this[0]):se.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ce.uniqueSort(ce.merge(this.get(),ce(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ce.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return d(e,"parentNode")},parentsUntil:function(e,t,n){return d(e,"parentNode",n)},next:function(e){return A(e,"nextSibling")},prev:function(e){return A(e,"previousSibling")},nextAll:function(e){return d(e,"nextSibling")},prevAll:function(e){return d(e,"previousSibling")},nextUntil:function(e,t,n){return d(e,"nextSibling",n)},prevUntil:function(e,t,n){return d(e,"previousSibling",n)},siblings:function(e){return h((e.parentNode||{}).firstChild,e)},children:function(e){return h(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(fe(e,"template")&&(e=e.content||e),ce.merge([],e.childNodes))}},function(r,i){ce.fn[r]=function(e,t){var n=ce.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=ce.filter(t,n)),1<this.length&&(j[r]||ce.uniqueSort(n),E.test(r)&&n.reverse()),this.pushStack(n)}});var D=/[^\x20\t\r\n\f]+/g;function N(e){return e}function q(e){throw e}function L(e,t,n,r){var i;try{e&&v(i=e.promise)?i.call(e).done(t).fail(n):e&&v(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}ce.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},ce.each(e.match(D)||[],function(e,t){n[t]=!0}),n):ce.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){ce.each(e,function(e,t){v(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==x(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return ce.each(arguments,function(e,t){var n;while(-1<(n=ce.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<ce.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},ce.extend({Deferred:function(e){var o=[["notify","progress",ce.Callbacks("memory"),ce.Callbacks("memory"),2],["resolve","done",ce.Callbacks("once memory"),ce.Callbacks("once memory"),0,"resolved"],["reject","fail",ce.Callbacks("once memory"),ce.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return ce.Deferred(function(r){ce.each(o,function(e,t){var n=v(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&v(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,v(t)?s?t.call(e,l(u,o,N,s),l(u,o,q,s)):(u++,t.call(e,l(u,o,N,s),l(u,o,q,s),l(u,o,N,o.notifyWith))):(a!==N&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){ce.Deferred.exceptionHook&&ce.Deferred.exceptionHook(e,t.error),u<=i+1&&(a!==q&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(ce.Deferred.getErrorHook?t.error=ce.Deferred.getErrorHook():ce.Deferred.getStackHook&&(t.error=ce.Deferred.getStackHook()),ie.setTimeout(t))}}return ce.Deferred(function(e){o[0][3].add(l(0,e,v(r)?r:N,e.notifyWith)),o[1][3].add(l(0,e,v(t)?t:N)),o[2][3].add(l(0,e,v(n)?n:q))}).promise()},promise:function(e){return null!=e?ce.extend(e,a):a}},s={};return ce.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=ae.call(arguments),o=ce.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?ae.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(L(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||v(i[t]&&i[t].then)))return o.then();while(t--)L(i[t],a(t),o.reject);return o.promise()}});var H=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;ce.Deferred.exceptionHook=function(e,t){ie.console&&ie.console.warn&&e&&H.test(e.name)&&ie.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},ce.readyException=function(e){ie.setTimeout(function(){throw e})};var O=ce.Deferred();function P(){C.removeEventListener("DOMContentLoaded",P),ie.removeEventListener("load",P),ce.ready()}ce.fn.ready=function(e){return O.then(e)["catch"](function(e){ce.readyException(e)}),this},ce.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--ce.readyWait:ce.isReady)||(ce.isReady=!0)!==e&&0<--ce.readyWait||O.resolveWith(C,[ce])}}),ce.ready.then=O.then,"complete"===C.readyState||"loading"!==C.readyState&&!C.documentElement.doScroll?ie.setTimeout(ce.ready):(C.addEventListener("DOMContentLoaded",P),ie.addEventListener("load",P));var M=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n))for(s in i=!0,n)M(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,v(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(ce(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},R=/^-ms-/,I=/-([a-z])/g;function W(e,t){return t.toUpperCase()}function F(e){return e.replace(R,"ms-").replace(I,W)}var $=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function B(){this.expando=ce.expando+B.uid++}B.uid=1,B.prototype={cache:function(e){var t=e[this.expando];return t||(t={},$(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[F(t)]=n;else for(r in t)i[F(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][F(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(F):(t=F(t))in r?[t]:t.match(D)||[]).length;while(n--)delete r[t[n]]}(void 0===t||ce.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!ce.isEmptyObject(t)}};var _=new B,z=new B,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,U=/[A-Z]/g;function V(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(U,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:X.test(i)?JSON.parse(i):i)}catch(e){}z.set(e,t,n)}else n=void 0;return n}ce.extend({hasData:function(e){return z.hasData(e)||_.hasData(e)},data:function(e,t,n){return z.access(e,t,n)},removeData:function(e,t){z.remove(e,t)},_data:function(e,t,n){return _.access(e,t,n)},_removeData:function(e,t){_.remove(e,t)}}),ce.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=z.get(o),1===o.nodeType&&!_.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=F(r.slice(5)),V(o,r,i[r]));_.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){z.set(this,n)}):M(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=z.get(o,n))?t:void 0!==(t=V(o,n))?t:void 0;this.each(function(){z.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){z.remove(this,e)})}}),ce.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=_.get(e,t),n&&(!r||Array.isArray(n)?r=_.access(e,t,ce.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=ce.queue(e,t),r=n.length,i=n.shift(),o=ce._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){ce.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return _.get(e,n)||_.access(e,n,{empty:ce.Callbacks("once memory").add(function(){_.remove(e,[t+"queue",n])})})}}),ce.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?ce.queue(this[0],t):void 0===n?this:this.each(function(){var e=ce.queue(this,t,n);ce._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&ce.dequeue(this,t)})},dequeue:function(e){return this.each(function(){ce.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=ce.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=_.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var G=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Y=new RegExp("^(?:([+-])=|)("+G+")([a-z%]*)$","i"),Q=["Top","Right","Bottom","Left"],J=C.documentElement,K=function(e){return ce.contains(e.ownerDocument,e)},Z={composed:!0};J.getRootNode&&(K=function(e){return ce.contains(e.ownerDocument,e)||e.getRootNode(Z)===e.ownerDocument});var ee=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&K(e)&&"none"===ce.css(e,"display")};function te(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return ce.css(e,t,"")},u=s(),l=n&&n[3]||(ce.cssNumber[t]?"":"px"),c=e.nodeType&&(ce.cssNumber[t]||"px"!==l&&+u)&&Y.exec(ce.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)ce.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,ce.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ne={};function re(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=_.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ee(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ne[s])||(o=a.body.appendChild(a.createElement(s)),u=ce.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ne[s]=u)))):"none"!==n&&(l[c]="none",_.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}ce.fn.extend({show:function(){return re(this,!0)},hide:function(){return re(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ee(this)?ce(this).show():ce(this).hide()})}});var xe,be,we=/^(?:checkbox|radio)$/i,Te=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="<textarea>x</textarea>",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="<option></option>",le.option=!!xe.lastChild;var ke={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n<r;n++)_.set(e[n],"globalEval",!t||_.get(t[n],"globalEval"))}ke.tbody=ke.tfoot=ke.colgroup=ke.caption=ke.thead,ke.th=ke.td,le.option||(ke.optgroup=ke.option=[1,"<select multiple='multiple'>","</select>"]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===x(o))ce.merge(p,o.nodeType?[o]:o);else if(je.test(o)){a=a||f.appendChild(t.createElement("div")),s=(Te.exec(o)||["",""])[1].toLowerCase(),u=ke[s]||ke._default,a.innerHTML=u[1]+ce.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;ce.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<ce.inArray(o,r))i&&i.push(o);else if(l=K(o),a=Se(f.appendChild(o),"script"),l&&Ee(a),n){c=0;while(o=a[c++])Ce.test(o.type||"")&&n.push(o)}return f}var De=/^([^.]*)(?:\.(.+)|)/;function Ne(){return!0}function qe(){return!1}function Le(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Le(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=qe;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return ce().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=ce.guid++)),e.each(function(){ce.event.add(this,t,i,r,n)})}function He(e,r,t){t?(_.set(e,r,!1),ce.event.add(e,r,{namespace:!1,handler:function(e){var t,n=_.get(this,r);if(1&e.isTrigger&&this[r]){if(n)(ce.event.special[r]||{}).delegateType&&e.stopPropagation();else if(n=ae.call(arguments),_.set(this,r,n),this[r](),t=_.get(this,r),_.set(this,r,!1),n!==t)return e.stopImmediatePropagation(),e.preventDefault(),t}else n&&(_.set(this,r,ce.event.trigger(n[0],n.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Ne)}})):void 0===_.get(e,r)&&ce.event.add(e,r,Ne)}ce.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=_.get(t);if($(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&ce.find.matchesSelector(J,i),n.guid||(n.guid=ce.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof ce&&ce.event.triggered!==e.type?ce.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(D)||[""]).length;while(l--)d=g=(s=De.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=ce.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=ce.event.special[d]||{},c=ce.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&ce.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),ce.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=_.hasData(e)&&_.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(D)||[""]).length;while(l--)if(d=g=(s=De.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=ce.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||ce.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)ce.event.remove(e,d+t[l],n,r,!0);ce.isEmptyObject(u)&&_.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=ce.event.fix(e),l=(_.get(this,"events")||Object.create(null))[u.type]||[],c=ce.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=ce.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((ce.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<ce(i,this).index(l):ce.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(ce.Event.prototype,t,{enumerable:!0,configurable:!0,get:v(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[ce.expando]?e:new ce.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return we.test(t.type)&&t.click&&fe(t,"input")&&He(t,"click",!0),!1},trigger:function(e){var t=this||e;return we.test(t.type)&&t.click&&fe(t,"input")&&He(t,"click"),!0},_default:function(e){var t=e.target;return we.test(t.type)&&t.click&&fe(t,"input")&&_.get(t,"click")||fe(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},ce.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},ce.Event=function(e,t){if(!(this instanceof ce.Event))return new ce.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ne:qe,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&ce.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[ce.expando]=!0},ce.Event.prototype={constructor:ce.Event,isDefaultPrevented:qe,isPropagationStopped:qe,isImmediatePropagationStopped:qe,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ne,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ne,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ne,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},ce.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},ce.event.addProp),ce.each({focus:"focusin",blur:"focusout"},function(r,i){function o(e){if(C.documentMode){var t=_.get(this,"handle"),n=ce.event.fix(e);n.type="focusin"===e.type?"focus":"blur",n.isSimulated=!0,t(e),n.target===n.currentTarget&&t(n)}else ce.event.simulate(i,e.target,ce.event.fix(e))}ce.event.special[r]={setup:function(){var e;if(He(this,r,!0),!C.documentMode)return!1;(e=_.get(this,i))||this.addEventListener(i,o),_.set(this,i,(e||0)+1)},trigger:function(){return He(this,r),!0},teardown:function(){var e;if(!C.documentMode)return!1;(e=_.get(this,i)-1)?_.set(this,i,e):(this.removeEventListener(i,o),_.remove(this,i))},_default:function(e){return _.get(e.target,r)},delegateType:i},ce.event.special[i]={setup:function(){var e=this.ownerDocument||this.document||this,t=C.documentMode?this:e,n=_.get(t,i);n||(C.documentMode?this.addEventListener(i,o):e.addEventListener(r,o,!0)),_.set(t,i,(n||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=C.documentMode?this:e,n=_.get(t,i)-1;n?_.set(t,i,n):(C.documentMode?this.removeEventListener(i,o):e.removeEventListener(r,o,!0),_.remove(t,i))}}}),ce.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){ce.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||ce.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),ce.fn.extend({on:function(e,t,n,r){return Le(this,e,t,n,r)},one:function(e,t,n,r){return Le(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,ce(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=qe),this.each(function(){ce.event.remove(this,e,n,t)})}});var Oe=/<script|<style|<link/i,Pe=/checked\s*(?:[^=]|=\s*.checked.)/i,Me=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)ce.event.add(t,i,s[i][n]);z.hasData(e)&&(o=z.access(e),a=ce.extend({},o),z.set(t,a))}}function $e(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=v(d);if(h||1<f&&"string"==typeof d&&!le.checkClone&&Pe.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),$e(t,r,i,o)});if(f&&(t=(e=Ae(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=ce.map(Se(e,"script"),Ie)).length;c<f;c++)u=e,c!==p&&(u=ce.clone(u,!0,!0),s&&ce.merge(a,Se(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,ce.map(a,We),c=0;c<s;c++)u=a[c],Ce.test(u.type||"")&&!_.access(u,"globalEval")&&ce.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?ce._evalUrl&&!u.noModule&&ce._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):m(u.textContent.replace(Me,""),u,l))}return n}function Be(e,t,n){for(var r,i=t?ce.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||ce.cleanData(Se(r)),r.parentNode&&(n&&K(r)&&Ee(Se(r,"script")),r.parentNode.removeChild(r));return e}ce.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=K(e);if(!(le.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ce.isXMLDoc(e)))for(a=Se(c),r=0,i=(o=Se(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&we.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||Se(e),a=a||Se(c),r=0,i=o.length;r<i;r++)Fe(o[r],a[r]);else Fe(e,c);return 0<(a=Se(c,"script")).length&&Ee(a,!f&&Se(e,"script")),c},cleanData:function(e){for(var t,n,r,i=ce.event.special,o=0;void 0!==(n=e[o]);o++)if($(n)){if(t=n[_.expando]){if(t.events)for(r in t.events)i[r]?ce.event.remove(n,r):ce.removeEvent(n,r,t.handle);n[_.expando]=void 0}n[z.expando]&&(n[z.expando]=void 0)}}}),ce.fn.extend({detach:function(e){return Be(this,e,!0)},remove:function(e){return Be(this,e)},text:function(e){return M(this,function(e){return void 0===e?ce.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return $e(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Re(this,e).appendChild(e)})},prepend:function(){return $e(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Re(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return $e(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return $e(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(ce.cleanData(Se(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ce.clone(this,e,t)})},html:function(e){return M(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Oe.test(e)&&!ke[(Te.exec(e)||["",""])[1].toLowerCase()]){e=ce.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(ce.cleanData(Se(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return $e(this,arguments,function(e){var t=this.parentNode;ce.inArray(this,n)<0&&(ce.cleanData(Se(this)),t&&t.replaceChild(e,this))},n)}}),ce.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){ce.fn[e]=function(e){for(var t,n=[],r=ce(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),ce(r[o])[a](t),s.apply(n,t.get());return this.pushStack(n)}});var _e=new RegExp("^("+G+")(?!px)[a-z%]+$","i"),ze=/^--/,Xe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=ie),t.getComputedStyle(e)},Ue=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Ve=new RegExp(Q.join("|"),"i");function Ge(e,t,n){var r,i,o,a,s=ze.test(t),u=e.style;return(n=n||Xe(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace(ve,"$1")||void 0),""!==a||K(e)||(a=ce.style(e,t)),!le.pixelBoxStyles()&&_e.test(a)&&Ve.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==a?a+"":a}function Ye(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",J.appendChild(u).appendChild(l);var e=ie.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),J.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=C.createElement("div"),l=C.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",le.clearCloneStyle="content-box"===l.style.backgroundClip,ce.extend(le,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=C.createElement("table"),t=C.createElement("tr"),n=C.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="box-sizing:content-box;border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",J.appendChild(e).appendChild(t).appendChild(n),r=ie.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,J.removeChild(e)),a}}))}();var Qe=["Webkit","Moz","ms"],Je=C.createElement("div").style,Ke={};function Ze(e){var t=ce.cssProps[e]||Ke[e];return t||(e in Je?e:Ke[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Qe.length;while(n--)if((e=Qe[n]+t)in Je)return e}(e)||e)}var et=/^(none|table(?!-c[ea]).+)/,tt={position:"absolute",visibility:"hidden",display:"block"},nt={letterSpacing:"0",fontWeight:"400"};function rt(e,t,n){var r=Y.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function it(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0,l=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=ce.css(e,n+Q[a],!0,i)),r?("content"===n&&(u-=ce.css(e,"padding"+Q[a],!0,i)),"margin"!==n&&(u-=ce.css(e,"border"+Q[a]+"Width",!0,i))):(u+=ce.css(e,"padding"+Q[a],!0,i),"padding"!==n?u+=ce.css(e,"border"+Q[a]+"Width",!0,i):s+=ce.css(e,"border"+Q[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u+l}function ot(e,t,n){var r=Xe(e),i=(!le.boxSizingReliable()||n)&&"border-box"===ce.css(e,"boxSizing",!1,r),o=i,a=Ge(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(_e.test(a)){if(!n)return a;a="auto"}return(!le.boxSizingReliable()&&i||!le.reliableTrDimensions()&&fe(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===ce.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===ce.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+it(e,t,n||(i?"border":"content"),o,r,a)+"px"}function at(e,t,n,r,i){return new at.prototype.init(e,t,n,r,i)}ce.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ge(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=F(t),u=ze.test(t),l=e.style;if(u||(t=Ze(s)),a=ce.cssHooks[t]||ce.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=Y.exec(n))&&i[1]&&(n=te(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(ce.cssNumber[s]?"":"px")),le.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=F(t);return ze.test(t)||(t=Ze(s)),(a=ce.cssHooks[t]||ce.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ge(e,t,r)),"normal"===i&&t in nt&&(i=nt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),ce.each(["height","width"],function(e,u){ce.cssHooks[u]={get:function(e,t,n){if(t)return!et.test(ce.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ot(e,u,n):Ue(e,tt,function(){return ot(e,u,n)})},set:function(e,t,n){var r,i=Xe(e),o=!le.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===ce.css(e,"boxSizing",!1,i),s=n?it(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-it(e,u,"border",!1,i)-.5)),s&&(r=Y.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=ce.css(e,u)),rt(0,t,s)}}}),ce.cssHooks.marginLeft=Ye(le.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ge(e,"marginLeft"))||e.getBoundingClientRect().left-Ue(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),ce.each({margin:"",padding:"",border:"Width"},function(i,o){ce.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+Q[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(ce.cssHooks[i+o].set=rt)}),ce.fn.extend({css:function(e,t){return M(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Xe(e),i=t.length;a<i;a++)o[t[a]]=ce.css(e,t[a],!1,r);return o}return void 0!==n?ce.style(e,t,n):ce.css(e,t)},e,t,1<arguments.length)}}),((ce.Tween=at).prototype={constructor:at,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||ce.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(ce.cssNumber[n]?"":"px")},cur:function(){var e=at.propHooks[this.prop];return e&&e.get?e.get(this):at.propHooks._default.get(this)},run:function(e){var t,n=at.propHooks[this.prop];return this.options.duration?this.pos=t=ce.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):at.propHooks._default.set(this),this}}).init.prototype=at.prototype,(at.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=ce.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){ce.fx.step[e.prop]?ce.fx.step[e.prop](e):1!==e.elem.nodeType||!ce.cssHooks[e.prop]&&null==e.elem.style[Ze(e.prop)]?e.elem[e.prop]=e.now:ce.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=at.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ce.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},ce.fx=at.prototype.init,ce.fx.step={};var st,ut,lt,ct,ft=/^(?:toggle|show|hide)$/,pt=/queueHooks$/;function dt(){ut&&(!1===C.hidden&&ie.requestAnimationFrame?ie.requestAnimationFrame(dt):ie.setTimeout(dt,ce.fx.interval),ce.fx.tick())}function ht(){return ie.setTimeout(function(){st=void 0}),st=Date.now()}function gt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=Q[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function vt(e,t,n){for(var r,i=(yt.tweeners[t]||[]).concat(yt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function yt(o,e,t){var n,a,r=0,i=yt.prefilters.length,s=ce.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=st||ht(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:ce.extend({},e),opts:ce.extend(!0,{specialEasing:{},easing:ce.easing._default},t),originalProperties:e,originalOptions:t,startTime:st||ht(),duration:t.duration,tweens:[],createTween:function(e,t){var n=ce.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=F(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=ce.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=yt.prefilters[r].call(l,o,c,l.opts))return v(n.stop)&&(ce._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return ce.map(c,vt,l),v(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),ce.fx.timer(ce.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}ce.Animation=ce.extend(yt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return te(n.elem,e,Y.exec(t),n),n}]},tweener:function(e,t){v(e)?(t=e,e=["*"]):e=e.match(D);for(var n,r=0,i=e.length;r<i;r++)n=e[r],yt.tweeners[n]=yt.tweeners[n]||[],yt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ee(e),v=_.get(e,"fxshow");for(r in n.queue||(null==(a=ce._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,ce.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ft.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||ce.style(e,r)}if((u=!ce.isEmptyObject(t))||!ce.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=_.get(e,"display")),"none"===(c=ce.css(e,"display"))&&(l?c=l:(re([e],!0),l=e.style.display||l,c=ce.css(e,"display"),re([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===ce.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=_.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&re([e],!0),p.done(function(){for(r in g||re([e]),_.remove(e,"fxshow"),d)ce.style(e,r,d[r])})),u=vt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?yt.prefilters.unshift(e):yt.prefilters.push(e)}}),ce.speed=function(e,t,n){var r=e&&"object"==typeof e?ce.extend({},e):{complete:n||!n&&t||v(e)&&e,duration:e,easing:n&&t||t&&!v(t)&&t};return ce.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in ce.fx.speeds?r.duration=ce.fx.speeds[r.duration]:r.duration=ce.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){v(r.old)&&r.old.call(this),r.queue&&ce.dequeue(this,r.queue)},r},ce.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ee).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=ce.isEmptyObject(t),o=ce.speed(e,n,r),a=function(){var e=yt(this,ce.extend({},t),o);(i||_.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=ce.timers,r=_.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&pt.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||ce.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=_.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=ce.timers,o=n?n.length:0;for(t.finish=!0,ce.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),ce.each(["toggle","show","hide"],function(e,r){var i=ce.fn[r];ce.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(gt(r,!0),e,t,n)}}),ce.each({slideDown:gt("show"),slideUp:gt("hide"),slideToggle:gt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){ce.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),ce.timers=[],ce.fx.tick=function(){var e,t=0,n=ce.timers;for(st=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||ce.fx.stop(),st=void 0},ce.fx.timer=function(e){ce.timers.push(e),ce.fx.start()},ce.fx.interval=13,ce.fx.start=function(){ut||(ut=!0,dt())},ce.fx.stop=function(){ut=null},ce.fx.speeds={slow:600,fast:200,_default:400},ce.fn.delay=function(r,e){return r=ce.fx&&ce.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=ie.setTimeout(e,r);t.stop=function(){ie.clearTimeout(n)}})},lt=C.createElement("input"),ct=C.createElement("select").appendChild(C.createElement("option")),lt.type="checkbox",le.checkOn=""!==lt.value,le.optSelected=ct.selected,(lt=C.createElement("input")).value="t",lt.type="radio",le.radioValue="t"===lt.value;var mt,xt=ce.expr.attrHandle;ce.fn.extend({attr:function(e,t){return M(this,ce.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){ce.removeAttr(this,e)})}}),ce.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?ce.prop(e,t,n):(1===o&&ce.isXMLDoc(e)||(i=ce.attrHooks[t.toLowerCase()]||(ce.expr.match.bool.test(t)?mt:void 0)),void 0!==n?null===n?void ce.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=ce.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!le.radioValue&&"radio"===t&&fe(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(D);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),mt={set:function(e,t,n){return!1===t?ce.removeAttr(e,n):e.setAttribute(n,n),n}},ce.each(ce.expr.match.bool.source.match(/\w+/g),function(e,t){var a=xt[t]||ce.find.attr;xt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=xt[o],xt[o]=r,r=null!=a(e,t,n)?o:null,xt[o]=i),r}});var bt=/^(?:input|select|textarea|button)$/i,wt=/^(?:a|area)$/i;function Tt(e){return(e.match(D)||[]).join(" ")}function Ct(e){return e.getAttribute&&e.getAttribute("class")||""}function kt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(D)||[]}ce.fn.extend({prop:function(e,t){return M(this,ce.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[ce.propFix[e]||e]})}}),ce.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&ce.isXMLDoc(e)||(t=ce.propFix[t]||t,i=ce.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=ce.find.attr(e,"tabindex");return t?parseInt(t,10):bt.test(e.nodeName)||wt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),le.optSelected||(ce.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),ce.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ce.propFix[this.toLowerCase()]=this}),ce.fn.extend({addClass:function(t){var e,n,r,i,o,a;return v(t)?this.each(function(e){ce(this).addClass(t.call(this,e,Ct(this)))}):(e=kt(t)).length?this.each(function(){if(r=Ct(this),n=1===this.nodeType&&" "+Tt(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=Tt(n),r!==a&&this.setAttribute("class",a)}}):this},removeClass:function(t){var e,n,r,i,o,a;return v(t)?this.each(function(e){ce(this).removeClass(t.call(this,e,Ct(this)))}):arguments.length?(e=kt(t)).length?this.each(function(){if(r=Ct(this),n=1===this.nodeType&&" "+Tt(r)+" "){for(o=0;o<e.length;o++){i=e[o];while(-1<n.indexOf(" "+i+" "))n=n.replace(" "+i+" "," ")}a=Tt(n),r!==a&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(t,n){var e,r,i,o,a=typeof t,s="string"===a||Array.isArray(t);return v(t)?this.each(function(e){ce(this).toggleClass(t.call(this,e,Ct(this),n),n)}):"boolean"==typeof n&&s?n?this.addClass(t):this.removeClass(t):(e=kt(t),this.each(function(){if(s)for(o=ce(this),i=0;i<e.length;i++)r=e[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==t&&"boolean"!==a||((r=Ct(this))&&_.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":_.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+Tt(Ct(n))+" ").indexOf(t))return!0;return!1}});var St=/\r/g;ce.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=v(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,ce(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=ce.map(t,function(e){return null==e?"":e+""})),(r=ce.valHooks[this.type]||ce.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=ce.valHooks[t.type]||ce.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(St,""):null==e?"":e:void 0}}),ce.extend({valHooks:{option:{get:function(e){var t=ce.find.attr(e,"value");return null!=t?t:Tt(ce.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!fe(n.parentNode,"optgroup"))){if(t=ce(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=ce.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<ce.inArray(ce.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),ce.each(["radio","checkbox"],function(){ce.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<ce.inArray(ce(e).val(),t)}},le.checkOn||(ce.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Et=ie.location,jt={guid:Date.now()},At=/\?/;ce.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new ie.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||ce.error("Invalid XML: "+(n?ce.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Dt=/^(?:focusinfocus|focusoutblur)$/,Nt=function(e){e.stopPropagation()};ce.extend(ce.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||C],d=ue.call(e,"type")?e.type:e,h=ue.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||C,3!==n.nodeType&&8!==n.nodeType&&!Dt.test(d+ce.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[ce.expando]?e:new ce.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:ce.makeArray(t,[e]),c=ce.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!y(n)){for(s=c.delegateType||d,Dt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||C)&&p.push(a.defaultView||a.parentWindow||ie)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(_.get(o,"events")||Object.create(null))[e.type]&&_.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&$(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!$(n)||u&&v(n[d])&&!y(n)&&((a=n[u])&&(n[u]=null),ce.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,Nt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,Nt),ce.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=ce.extend(new ce.Event,n,{type:e,isSimulated:!0});ce.event.trigger(r,null,t)}}),ce.fn.extend({trigger:function(e,t){return this.each(function(){ce.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return ce.event.trigger(e,t,n,!0)}});var qt=/\[\]$/,Lt=/\r?\n/g,Ht=/^(?:submit|button|image|reset|file)$/i,Ot=/^(?:input|select|textarea|keygen)/i;function Pt(n,e,r,i){var t;if(Array.isArray(e))ce.each(e,function(e,t){r||qt.test(n)?i(n,t):Pt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==x(e))i(n,e);else for(t in e)Pt(n+"["+t+"]",e[t],r,i)}ce.param=function(e,t){var n,r=[],i=function(e,t){var n=v(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!ce.isPlainObject(e))ce.each(e,function(){i(this.name,this.value)});else for(n in e)Pt(n,e[n],t,i);return r.join("&")},ce.fn.extend({serialize:function(){return ce.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ce.prop(this,"elements");return e?ce.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ce(this).is(":disabled")&&Ot.test(this.nodeName)&&!Ht.test(e)&&(this.checked||!we.test(e))}).map(function(e,t){var n=ce(this).val();return null==n?null:Array.isArray(n)?ce.map(n,function(e){return{name:t.name,value:e.replace(Lt,"\r\n")}}):{name:t.name,value:n.replace(Lt,"\r\n")}}).get()}});var Mt=/%20/g,Rt=/#.*$/,It=/([?&])_=[^&]*/,Wt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ft=/^(?:GET|HEAD)$/,$t=/^\/\//,Bt={},_t={},zt="*/".concat("*"),Xt=C.createElement("a");function Ut(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(D)||[];if(v(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Vt(t,i,o,a){var s={},u=t===_t;function l(e){var r;return s[e]=!0,ce.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Gt(e,t){var n,r,i=ce.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&ce.extend(!0,e,r),e}Xt.href=Et.href,ce.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Et.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Et.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":ce.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Gt(Gt(e,ce.ajaxSettings),t):Gt(ce.ajaxSettings,e)},ajaxPrefilter:Ut(Bt),ajaxTransport:Ut(_t),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=ce.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?ce(y):ce.event,x=ce.Deferred(),b=ce.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Wt.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||Et.href)+"").replace($t,Et.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(D)||[""],null==v.crossDomain){r=C.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Xt.protocol+"//"+Xt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=ce.param(v.data,v.traditional)),Vt(Bt,v,t,T),h)return T;for(i in(g=ce.event&&v.global)&&0==ce.active++&&ce.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ft.test(v.type),f=v.url.replace(Rt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Mt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(At.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(It,"$1"),o=(At.test(f)?"&":"?")+"_="+jt.guid+++o),v.url=f+o),v.ifModified&&(ce.lastModified[f]&&T.setRequestHeader("If-Modified-Since",ce.lastModified[f]),ce.etag[f]&&T.setRequestHeader("If-None-Match",ce.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+zt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Vt(_t,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=ie.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&ie.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<ce.inArray("script",v.dataTypes)&&ce.inArray("json",v.dataTypes)<0&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(ce.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(ce.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--ce.active||ce.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return ce.get(e,t,n,"json")},getScript:function(e,t){return ce.get(e,void 0,t,"script")}}),ce.each(["get","post"],function(e,i){ce[i]=function(e,t,n,r){return v(t)&&(r=r||n,n=t,t=void 0),ce.ajax(ce.extend({url:e,type:i,dataType:r,data:t,success:n},ce.isPlainObject(e)&&e))}}),ce.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),ce._evalUrl=function(e,t,n){return ce.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){ce.globalEval(e,t,n)}})},ce.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=ce(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return v(n)?this.each(function(e){ce(this).wrapInner(n.call(this,e))}):this.each(function(){var e=ce(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=v(t);return this.each(function(e){ce(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){ce(this).replaceWith(this.childNodes)}),this}}),ce.expr.pseudos.hidden=function(e){return!ce.expr.pseudos.visible(e)},ce.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},ce.ajaxSettings.xhr=function(){try{return new ie.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},Qt=ce.ajaxSettings.xhr();le.cors=!!Qt&&"withCredentials"in Qt,le.ajax=Qt=!!Qt,ce.ajaxTransport(function(i){var o,a;if(le.cors||Qt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Yt[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&ie.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),ce.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),ce.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return ce.globalEval(e),e}}}),ce.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),ce.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=ce("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=Tt(e.slice(s)),e=e.slice(0,s)),v(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&ce.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?ce("<div>").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var en=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;ce.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),v(e))return r=ae.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(ae.call(arguments)))}).guid=e.guid=e.guid||ce.guid++,i},ce.holdReady=function(e){e?ce.readyWait++:ce.ready(!0)},ce.isArray=Array.isArray,ce.parseJSON=JSON.parse,ce.nodeName=fe,ce.isFunction=v,ce.isWindow=y,ce.camelCase=F,ce.type=x,ce.now=Date.now,ce.isNumeric=function(e){var t=ce.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},ce.trim=function(e){return null==e?"":(e+"").replace(en,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return ce});var tn=ie.jQuery,nn=ie.$;return ce.noConflict=function(e){return ie.$===ce&&(ie.$=nn),e&&ie.jQuery===ce&&(ie.jQuery=tn),ce},"undefined"==typeof e&&(ie.jQuery=ie.$=ce),ce});
jQuery.noConflict();                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               jquery/jquery.query.js                                                                              0000644                 00000007156 15212564040 0011114 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * jQuery.query - Query String Modification and Creation for jQuery
 * Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com)
 * Licensed under the WTFPL (http://sam.zoy.org/wtfpl/).
 * Date: 2009/8/13
 *
 * @author Blair Mitchelmore
 * @version 2.2.3
 *
 **/
!function(e){var t=e.separator||"&",l=!1!==e.spaces,n=(e.suffix,!1!==e.prefix?!0===e.hash?"#":"?":""),i=!1!==e.numbers;jQuery.query=new function(){function c(e,t){return null!=e&&null!==e&&(!t||e.constructor==t)}function u(e){for(var t,n=/\[([^[]*)\]/g,r=/^([^[]+)(\[.*\])?$/.exec(e),e=r[1],u=[];t=n.exec(r[2]);)u.push(t[1]);return[e,u]}function o(e,t,n){var r=t.shift();if("object"!=typeof e&&(e=null),""===r)if(c(e=e||[],Array))e.push(0==t.length?n:o(null,t.slice(0),n));else if(c(e,Object)){for(var u=0;null!=e[u++];);e[--u]=0==t.length?n:o(e[u],t.slice(0),n)}else(e=[]).push(0==t.length?n:o(null,t.slice(0),n));else if(r&&r.match(/^\s*[0-9]+\s*$/))(e=e||[])[i=parseInt(r,10)]=0==t.length?n:o(e[i],t.slice(0),n);else{if(!r)return n;var i=r.replace(/^\s*|\s*$/g,"");if(c(e=e||{},Array)){for(var s={},u=0;u<e.length;++u)s[u]=e[u];e=s}e[i]=0==t.length?n:o(e[i],t.slice(0),n)}return e}function r(e){var n=this;return n.keys={},e.queryObject?jQuery.each(e.get(),function(e,t){n.SET(e,t)}):n.parseNew.apply(n,arguments),n}return r.prototype={queryObject:!0,parseNew:function(){var n=this;return n.keys={},jQuery.each(arguments,function(){var e=""+this;e=(e=e.replace(/^[?#]/,"")).replace(/[;&]$/,""),l&&(e=e.replace(/[+]/g," ")),jQuery.each(e.split(/[&;]/),function(){var e=decodeURIComponent(this.split("=")[0]||""),t=decodeURIComponent(this.split("=")[1]||"");e&&(i&&(/^[+-]?[0-9]+\.[0-9]*$/.test(t)?t=parseFloat(t):/^[+-]?[1-9][0-9]*$/.test(t)&&(t=parseInt(t,10))),n.SET(e,t=!t&&0!==t||t))})}),n},has:function(e,t){e=this.get(e);return c(e,t)},GET:function(e){if(!c(e))return this.keys;for(var e=u(e),t=e[0],n=e[1],r=this.keys[t];null!=r&&0!=n.length;)r=r[n.shift()];return"number"==typeof r?r:r||""},get:function(e){e=this.GET(e);return c(e,Object)?jQuery.extend(!0,{},e):c(e,Array)?e.slice(0):e},SET:function(e,t){var n,r;return e.includes("__proto__")||e.includes("constructor")||e.includes("prototype")||(t=c(t)?t:null,n=(e=u(e))[0],e=e[1],r=this.keys[n],this.keys[n]=o(r,e.slice(0),t)),this},set:function(e,t){return this.copy().SET(e,t)},REMOVE:function(e,t){if(t){var n=this.GET(e);if(c(n,Array)){for(tval in n)n[tval]=n[tval].toString();var r=$.inArray(t,n);if(!(0<=r))return;e=(e=n.splice(r,1))[r]}else if(t!=n)return}return this.SET(e,null).COMPACT()},remove:function(e,t){return this.copy().REMOVE(e,t)},EMPTY:function(){var n=this;return jQuery.each(n.keys,function(e,t){delete n.keys[e]}),n},load:function(e){var t=e.replace(/^.*?[#](.+?)(?:\?.+)?$/,"$1"),n=e.replace(/^.*?[?](.+?)(?:#.+)?$/,"$1");return new r(e.length==n.length?"":n,e.length==t.length?"":t)},empty:function(){return this.copy().EMPTY()},copy:function(){return new r(this)},COMPACT:function(){return this.keys=function r(e){var u="object"==typeof e?c(e,Array)?[]:{}:e;return"object"==typeof e&&jQuery.each(e,function(e,t){if(!c(t))return!0;var n;n=u,t=r(t),c(n,Array)?n.push(t):n[e]=t}),u}(this.keys),this},compact:function(){return this.copy().COMPACT()},toString:function(){function u(e,t){function r(e){return(t&&""!=t?[t,"[",e,"]"]:[e]).join("")}jQuery.each(e,function(e,t){var n;"object"==typeof t?u(t,r(e)):(n=i,e=r(e),c(t=t)&&!1!==t&&(e=[s(e)],!0!==t&&(e.push("="),e.push(s(t))),n.push(e.join(""))))})}var e=[],i=[],s=function(e){return e+="",e=encodeURIComponent(e),e=l?e.replace(/%20/g,"+"):e};return u(this.keys),0<i.length&&e.push(n),e.push(i.join(t)),e.join("")}},new r(location.search,location.hash)}}(jQuery.query||{});
                                                                                                                                                                                                                                                                                                                                                                                                                  jquery/jquery.schedule.js                                                                           0000644                 00000006601 15212564040 0011535 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       
(function($){$.scheduler=function(){this.bucket={};return;};$.scheduler.prototype={schedule:function(){var ctx={"id":null,"time":1000,"repeat":false,"protect":false,"obj":null,"func":function(){},"args":[]};function _isfn(fn){return(!!fn&&typeof fn!="string"&&typeof fn[0]=="undefined"&&RegExp("function","i").test(fn+""));};var i=0;var override=false;if(typeof arguments[i]=="object"&&arguments.length>1){override=true;i++;}
if(typeof arguments[i]=="object"){for(var option in arguments[i])
if(typeof ctx[option]!="undefined")
ctx[option]=arguments[i][option];i++;}
if(typeof arguments[i]=="number"||(typeof arguments[i]=="string"&&arguments[i].match(RegExp("^[0-9]+[smhdw]$"))))
ctx["time"]=arguments[i++];if(typeof arguments[i]=="boolean")
ctx["repeat"]=arguments[i++];if(typeof arguments[i]=="boolean")
ctx["protect"]=arguments[i++];if(typeof arguments[i]=="object"&&typeof arguments[i+1]=="string"&&_isfn(arguments[i][arguments[i+1]])){ctx["obj"]=arguments[i++];ctx["func"]=arguments[i++];}
else if(typeof arguments[i]!="undefined"&&(_isfn(arguments[i])||typeof arguments[i]=="string"))
ctx["func"]=arguments[i++];while(typeof arguments[i]!="undefined")
ctx["args"].push(arguments[i++]);if(override){if(typeof arguments[1]=="object"){for(var option in arguments[0])
if(typeof ctx[option]!="undefined"&&typeof arguments[1][option]=="undefined")
ctx[option]=arguments[0][option];}
else{for(var option in arguments[0])
if(typeof ctx[option]!="undefined")
ctx[option]=arguments[0][option];}
i++;}
ctx["_scheduler"]=this;ctx["_handle"]=null;var match=String(ctx["time"]).match(RegExp("^([0-9]+)([smhdw])$"));if(match&&match[0]!="undefined"&&match[1]!="undefined")
ctx["time"]=String(parseInt(match[1])*{s:1000,m:1000*60,h:1000*60*60,d:1000*60*60*24,w:1000*60*60*24*7}[match[2]]);if(ctx["id"]==null)
ctx["id"]=(String(ctx["repeat"])+":"
+String(ctx["protect"])+":"
+String(ctx["time"])+":"
+String(ctx["obj"])+":"
+String(ctx["func"])+":"
+String(ctx["args"]));if(ctx["protect"])
if(typeof this.bucket[ctx["id"]]!="undefined")
return this.bucket[ctx["id"]];if(!_isfn(ctx["func"])){if(ctx["obj"]!=null&&typeof ctx["obj"]=="object"&&typeof ctx["func"]=="string"&&_isfn(ctx["obj"][ctx["func"]]))
ctx["func"]=ctx["obj"][ctx["func"]];else
ctx["func"]=eval("function () { "+ctx["func"]+" }");}
ctx["_handle"]=this._schedule(ctx);this.bucket[ctx["id"]]=ctx;return ctx;},reschedule:function(ctx){if(typeof ctx=="string")
ctx=this.bucket[ctx];ctx["_handle"]=this._schedule(ctx);return ctx;},_schedule:function(ctx){var trampoline=function(){var obj=(ctx["obj"]!=null?ctx["obj"]:ctx);(ctx["func"]).apply(obj,ctx["args"]);if(typeof(ctx["_scheduler"]).bucket[ctx["id"]]!="undefined"&&ctx["repeat"])
(ctx["_scheduler"])._schedule(ctx);else
delete(ctx["_scheduler"]).bucket[ctx["id"]];};return setTimeout(trampoline,ctx["time"]);},cancel:function(ctx){if(typeof ctx=="string")
ctx=this.bucket[ctx];if(typeof ctx=="object"){clearTimeout(ctx["_handle"]);delete this.bucket[ctx["id"]];}}};$.extend({scheduler$:new $.scheduler(),schedule:function(){return $.scheduler$.schedule.apply($.scheduler$,arguments)},reschedule:function(){return $.scheduler$.reschedule.apply($.scheduler$,arguments)},cancel:function(){return $.scheduler$.cancel.apply($.scheduler$,arguments)}});$.fn.extend({schedule:function(){var a=[{}];for(var i=0;i<arguments.length;i++)
a.push(arguments[i]);return this.each(function(){a[0]={"id":this,"obj":this};return $.schedule.apply($,a);});}});})(jQuery);                                                                                                                               jquery/jquery.serialize-object.js                                                                   0000644                 00000001401 15212564040 0013165 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery serializeObject - v0.2-wp - 1/20/2010
 * http://benalman.com/projects/jquery-misc-plugins/
 *
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * http://benalman.com/about/license/
 */

// Whereas .serializeArray() serializes a form into an array, .serializeObject()
// serializes a form into an (arguably more useful) object.

(function($,undefined){
  '$:nomunge'; // Used by YUI compressor.

  $.fn.serializeObject = function(){
    var obj = {};

    $.each( this.serializeArray(), function(i,o){
      var n = o.name,
        v = o.value;

        obj[n] = obj[n] === undefined ? v
          : Array.isArray( obj[n] ) ? obj[n].concat( v )
          : [ obj[n], v ];
    });

    return obj;
  };

})(jQuery);
                                                                                                                                                                                                                                                               jquery/jquery.table-hotkeys.js                                                                      0000644                 00000007250 15212564040 0012515 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       (function($){
	$.fn.filter_visible = function(depth) {
		depth = depth || 3;
		var is_visible = function() {
			var p = $(this), i;
			for(i=0; i<depth-1; ++i) {
				if (!p.is(':visible')) return false;
				p = p.parent();
			}
			return true;
		};
		return this.filter(is_visible);
	};
	$.table_hotkeys = function(table, keys, opts) {
		opts = $.extend($.table_hotkeys.defaults, opts);
		var selected_class, destructive_class, set_current_row, adjacent_row_callback, get_adjacent_row, adjacent_row, prev_row, next_row, check, get_first_row, get_last_row, make_key_callback, first_row;

		selected_class = opts.class_prefix + opts.selected_suffix;
		destructive_class = opts.class_prefix + opts.destructive_suffix;
		set_current_row = function (tr) {
			if ($.table_hotkeys.current_row) $.table_hotkeys.current_row.removeClass(selected_class);
			tr.addClass(selected_class);
			tr[0].scrollIntoView(false);
			$.table_hotkeys.current_row = tr;
		};
		adjacent_row_callback = function(which) {
			if (!adjacent_row(which) && typeof opts[which+'_page_link_cb'] === 'function' ) {
				opts[which+'_page_link_cb']();
			}
		};
		get_adjacent_row = function(which) {
			var first_row, method;

			if (!$.table_hotkeys.current_row) {
				first_row = get_first_row();
				$.table_hotkeys.current_row = first_row;
				return first_row[0];
			}
			method = 'prev' == which? $.fn.prevAll : $.fn.nextAll;
			return method.call($.table_hotkeys.current_row, opts.cycle_expr).filter_visible()[0];
		};
		adjacent_row = function(which) {
			var adj = get_adjacent_row(which);
			if (!adj) return false;
			set_current_row($(adj));
			return true;
		};
		prev_row = function() { return adjacent_row('prev'); };
		next_row = function() { return adjacent_row('next'); };
		check = function() {
			$(opts.checkbox_expr, $.table_hotkeys.current_row).each(function() {
				this.checked = !this.checked;
			});
		};
		get_first_row = function() {
			return $(opts.cycle_expr, table).filter_visible().eq(opts.start_row_index);
		};
		get_last_row = function() {
			var rows = $(opts.cycle_expr, table).filter_visible();
			return rows.eq(rows.length-1);
		};
		make_key_callback = function(expr) {
			return function() {
				if ( null == $.table_hotkeys.current_row ) return false;
				var clickable = $(expr, $.table_hotkeys.current_row);
				if (!clickable.length) return false;
				if (clickable.is('.'+destructive_class)) next_row() || prev_row();
				clickable.trigger( 'click' );
			};
		};
		first_row = get_first_row();
		if (!first_row.length) return;
		if (opts.highlight_first)
			set_current_row(first_row);
		else if (opts.highlight_last)
			set_current_row(get_last_row());
		$.hotkeys.add(opts.prev_key, opts.hotkeys_opts, function() {return adjacent_row_callback('prev');});
		$.hotkeys.add(opts.next_key, opts.hotkeys_opts, function() {return adjacent_row_callback('next');});
		$.hotkeys.add(opts.mark_key, opts.hotkeys_opts, check);
		$.each(keys, function() {
			var callback, key;

			if ( typeof this[1] === 'function' ) {
				callback = this[1];
				key = this[0];
				$.hotkeys.add(key, opts.hotkeys_opts, function(event) { return callback(event, $.table_hotkeys.current_row); });
			} else {
				key = this;
				$.hotkeys.add(key, opts.hotkeys_opts, make_key_callback('.'+opts.class_prefix+key));
			}
		});

	};
	$.table_hotkeys.current_row = null;
	$.table_hotkeys.defaults = {cycle_expr: 'tr', class_prefix: 'vim-', selected_suffix: 'current',
		destructive_suffix: 'destructive', hotkeys_opts: {disableInInput: true, type: 'keypress'},
		checkbox_expr: ':checkbox', next_key: 'j', prev_key: 'k', mark_key: 'x',
		start_row_index: 2, highlight_first: false, highlight_last: false, next_page_link_cb: false, prev_page_link_cb: false};
})(jQuery);
                                                                                                                                                                                                                                                                                                                                                        jquery/jquery.table-hotkeys.min.js                                                                  0000644                 00000004367 15212564040 0013305 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       (function(a){a.fn.filter_visible=function(c){c=c||3;var b=function(){var e=a(this),d;for(d=0;d<c-1;++d){if(!e.is(":visible")){return false}e=e.parent()}return true};return this.filter(b)};a.table_hotkeys=function(p,q,b){b=a.extend(a.table_hotkeys.defaults,b);var i,l,e,f,m,d,k,o,c,h,g,n,j;i=b.class_prefix+b.selected_suffix;l=b.class_prefix+b.destructive_suffix;e=function(r){if(a.table_hotkeys.current_row){a.table_hotkeys.current_row.removeClass(i)}r.addClass(i);r[0].scrollIntoView(false);a.table_hotkeys.current_row=r};f=function(r){if(!d(r)&&a.isFunction(b[r+"_page_link_cb"])){b[r+"_page_link_cb"]()}};m=function(s){var r,t;if(!a.table_hotkeys.current_row){r=h();a.table_hotkeys.current_row=r;return r[0]}t="prev"==s?a.fn.prevAll:a.fn.nextAll;return t.call(a.table_hotkeys.current_row,b.cycle_expr).filter_visible()[0]};d=function(s){var r=m(s);if(!r){return false}e(a(r));return true};k=function(){return d("prev")};o=function(){return d("next")};c=function(){a(b.checkbox_expr,a.table_hotkeys.current_row).each(function(){this.checked=!this.checked})};h=function(){return a(b.cycle_expr,p).filter_visible().eq(b.start_row_index)};g=function(){var r=a(b.cycle_expr,p).filter_visible();return r.eq(r.length-1)};n=function(r){return function(){if(null==a.table_hotkeys.current_row){return false}var s=a(r,a.table_hotkeys.current_row);if(!s.length){return false}if(s.is("."+l)){o()||k()}s.click()}};j=h();if(!j.length){return}if(b.highlight_first){e(j)}else{if(b.highlight_last){e(g())}}a.hotkeys.add(b.prev_key,b.hotkeys_opts,function(){return f("prev")});a.hotkeys.add(b.next_key,b.hotkeys_opts,function(){return f("next")});a.hotkeys.add(b.mark_key,b.hotkeys_opts,c);a.each(q,function(){var s,r;if(a.isFunction(this[1])){s=this[1];r=this[0];a.hotkeys.add(r,b.hotkeys_opts,function(t){return s(t,a.table_hotkeys.current_row)})}else{r=this;a.hotkeys.add(r,b.hotkeys_opts,n("."+b.class_prefix+r))}})};a.table_hotkeys.current_row=null;a.table_hotkeys.defaults={cycle_expr:"tr",class_prefix:"vim-",selected_suffix:"current",destructive_suffix:"destructive",hotkeys_opts:{disableInInput:true,type:"keypress"},checkbox_expr:":checkbox",next_key:"j",prev_key:"k",mark_key:"x",start_row_index:2,highlight_first:false,highlight_last:false,next_page_link_cb:false,prev_page_link_cb:false}})(jQuery);                                                                                                                                                                                                                                                                         jquery/jquery.ui.touch-punch.js                                                                     0000644                 00000002233 15212564040 0012607 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Touch Punch 0.2.2
 *
 * Copyright 2011, Dave Furfero
 * Dual licensed under the MIT or GPL Version 2 licenses.
 *
 * Depends:
 *  jquery.ui.widget.js
 *  jquery.ui.mouse.js
 */
(function(b){b.support.touch="ontouchend" in document;if(!b.support.touch){return}var c=b.ui.mouse.prototype,e=c._mouseInit,a;function d(g,h){if(g.originalEvent.touches.length>1){return}g.preventDefault();var i=g.originalEvent.changedTouches[0],f=document.createEvent("MouseEvents");f.initMouseEvent(h,true,true,window,1,i.screenX,i.screenY,i.clientX,i.clientY,false,false,false,false,0,null);g.target.dispatchEvent(f)}c._touchStart=function(g){var f=this;if(a||!f._mouseCapture(g.originalEvent.changedTouches[0])){return}a=true;f._touchMoved=false;d(g,"mouseover");d(g,"mousemove");d(g,"mousedown")};c._touchMove=function(f){if(!a){return}this._touchMoved=true;d(f,"mousemove")};c._touchEnd=function(f){if(!a){return}d(f,"mouseup");d(f,"mouseout");if(!this._touchMoved){d(f,"click")}a=false};c._mouseInit=function(){var f=this;f.element.bind("touchstart",b.proxy(f,"_touchStart")).bind("touchmove",b.proxy(f,"_touchMove")).bind("touchend",b.proxy(f,"_touchEnd"));e.call(f)}})(jQuery);                                                                                                                                                                                                                                                                                                                                                                     jquery/suggest.js                                                                                   0000644                 00000015517 15212564040 0010112 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*
 *	jquery.suggest 1.1b - 2007-08-06
 * Patched by Mark Jaquith with Alexander Dick's "multiple items" patch to allow for auto-suggesting of more than one tag before submitting
 * See: http://www.vulgarisoip.com/2007/06/29/jquerysuggest-an-alternative-jquery-based-autocomplete-library/#comment-7228
 *
 *	Uses code and techniques from following libraries:
 *	1. http://www.dyve.net/jquery/?autocomplete
 *	2. http://dev.jquery.com/browser/trunk/plugins/interface/iautocompleter.js
 *
 *	All the new stuff written by Peter Vulgaris (www.vulgarisoip.com)
 *	Feel free to do whatever you want with this file
 *
 */

(function($) {

	$.suggest = function(input, options) {
		var $input, $results, timeout, prevLength, cache, cacheSize;

		$input = $(input).attr("autocomplete", "off");
		$results = $("<ul/>");

		timeout = false;		// hold timeout ID for suggestion results to appear
		prevLength = 0;			// last recorded length of $input.val()
		cache = [];				// cache MRU list
		cacheSize = 0;			// size of cache in chars (bytes?)

		$results.addClass(options.resultsClass).appendTo('body');


		resetPosition();
		$(window)
			.on( 'load', resetPosition ) // just in case user is changing size of page while loading
			.on( 'resize', resetPosition );

		$input.blur(function() {
			setTimeout(function() { $results.hide() }, 200);
		});

		$input.keydown(processKey);

		function resetPosition() {
			// requires jquery.dimension plugin
			var offset = $input.offset();
			$results.css({
				top: (offset.top + input.offsetHeight) + 'px',
				left: offset.left + 'px'
			});
		}


		function processKey(e) {

			// handling up/down/escape requires results to be visible
			// handling enter/tab requires that AND a result to be selected
			if ((/27$|38$|40$/.test(e.keyCode) && $results.is(':visible')) ||
				(/^13$|^9$/.test(e.keyCode) && getCurrentResult())) {

				if (e.preventDefault)
					e.preventDefault();
				if (e.stopPropagation)
					e.stopPropagation();

				e.cancelBubble = true;
				e.returnValue = false;

				switch(e.keyCode) {

					case 38: // up
						prevResult();
						break;

					case 40: // down
						nextResult();
						break;

					case 9:  // tab
					case 13: // return
						selectCurrentResult();
						break;

					case 27: //	escape
						$results.hide();
						break;

				}

			} else if ($input.val().length != prevLength) {

				if (timeout)
					clearTimeout(timeout);
				timeout = setTimeout(suggest, options.delay);
				prevLength = $input.val().length;

			}


		}


		function suggest() {

			var q = $.trim($input.val()), multipleSepPos, items;

			if ( options.multiple ) {
				multipleSepPos = q.lastIndexOf(options.multipleSep);
				if ( multipleSepPos != -1 ) {
					q = $.trim(q.substr(multipleSepPos + options.multipleSep.length));
				}
			}
			if (q.length >= options.minchars) {

				cached = checkCache(q);

				if (cached) {

					displayItems(cached['items']);

				} else {

					$.get(options.source, {q: q}, function(txt) {

						$results.hide();

						items = parseTxt(txt, q);

						displayItems(items);
						addToCache(q, items, txt.length);

					});

				}

			} else {

				$results.hide();

			}

		}


		function checkCache(q) {
			var i;
			for (i = 0; i < cache.length; i++)
				if (cache[i]['q'] == q) {
					cache.unshift(cache.splice(i, 1)[0]);
					return cache[0];
				}

			return false;

		}

		function addToCache(q, items, size) {
			var cached;
			while (cache.length && (cacheSize + size > options.maxCacheSize)) {
				cached = cache.pop();
				cacheSize -= cached['size'];
			}

			cache.push({
				q: q,
				size: size,
				items: items
				});

			cacheSize += size;

		}

		function displayItems(items) {
			var html = '', i;
			if (!items)
				return;

			if (!items.length) {
				$results.hide();
				return;
			}

			resetPosition(); // when the form moves after the page has loaded

			for (i = 0; i < items.length; i++)
				html += '<li>' + items[i] + '</li>';

			$results.html(html).show();

			$results
				.children('li')
				.mouseover(function() {
					$results.children('li').removeClass(options.selectClass);
					$(this).addClass(options.selectClass);
				})
				.click(function(e) {
					e.preventDefault();
					e.stopPropagation();
					selectCurrentResult();
				});

		}

		function parseTxt(txt, q) {

			var items = [], tokens = txt.split(options.delimiter), i, token;

			// parse returned data for non-empty items
			for (i = 0; i < tokens.length; i++) {
				token = $.trim(tokens[i]);
				if (token) {
					token = token.replace(
						new RegExp(q, 'ig'),
						function(q) { return '<span class="' + options.matchClass + '">' + q + '</span>' }
						);
					items[items.length] = token;
				}
			}

			return items;
		}

		function getCurrentResult() {
			var $currentResult;
			if (!$results.is(':visible'))
				return false;

			$currentResult = $results.children('li.' + options.selectClass);

			if (!$currentResult.length)
				$currentResult = false;

			return $currentResult;

		}

		function selectCurrentResult() {

			$currentResult = getCurrentResult();

			if ($currentResult) {
				if ( options.multiple ) {
					if ( $input.val().indexOf(options.multipleSep) != -1 ) {
						$currentVal = $input.val().substr( 0, ( $input.val().lastIndexOf(options.multipleSep) + options.multipleSep.length ) ) + ' ';
					} else {
						$currentVal = "";
					}
					$input.val( $currentVal + $currentResult.text() + options.multipleSep + ' ' );
					$input.focus();
				} else {
					$input.val($currentResult.text());
				}
				$results.hide();
				$input.trigger('change');

				if (options.onSelect)
					options.onSelect.apply($input[0]);

			}

		}

		function nextResult() {

			$currentResult = getCurrentResult();

			if ($currentResult)
				$currentResult
					.removeClass(options.selectClass)
					.next()
						.addClass(options.selectClass);
			else
				$results.children('li:first-child').addClass(options.selectClass);

		}

		function prevResult() {
			var $currentResult = getCurrentResult();

			if ($currentResult)
				$currentResult
					.removeClass(options.selectClass)
					.prev()
						.addClass(options.selectClass);
			else
				$results.children('li:last-child').addClass(options.selectClass);

		}
	}

	$.fn.suggest = function(source, options) {

		if (!source)
			return;

		options = options || {};
		options.multiple = options.multiple || false;
		options.multipleSep = options.multipleSep || ",";
		options.source = source;
		options.delay = options.delay || 100;
		options.resultsClass = options.resultsClass || 'ac_results';
		options.selectClass = options.selectClass || 'ac_over';
		options.matchClass = options.matchClass || 'ac_match';
		options.minchars = options.minchars || 2;
		options.delimiter = options.delimiter || '\n';
		options.onSelect = options.onSelect || false;
		options.maxCacheSize = options.maxCacheSize || 65536;

		this.each(function() {
			new $.suggest(this, options);
		});

		return this;

	};

})(jQuery);
                                                                                                                                                                                 jquery/suggest.min.js                                                                               0000644                 00000005661 15212564040 0010673 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(a){a.suggest=function(b,c){function d(){var a=o.offset();p.css({top:a.top+b.offsetHeight+"px",left:a.left+"px"})}function e(a){if(/27$|38$|40$/.test(a.keyCode)&&p.is(":visible")||/^13$|^9$/.test(a.keyCode)&&k())switch(a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0,a.returnValue=!1,a.keyCode){case 38:n();break;case 40:m();break;case 9:case 13:l();break;case 27:p.hide()}else o.val().length!=r&&(q&&clearTimeout(q),q=setTimeout(f,c.delay),r=o.val().length)}function f(){var b,d,e=a.trim(o.val());c.multiple&&(b=e.lastIndexOf(c.multipleSep),-1!=b&&(e=a.trim(e.substr(b+c.multipleSep.length)))),e.length>=c.minchars?(cached=g(e),cached?i(cached.items):a.get(c.source,{q:e},function(a){p.hide(),d=j(a,e),i(d),h(e,d,a.length)})):p.hide()}function g(a){var b;for(b=0;b<s.length;b++)if(s[b].q==a)return s.unshift(s.splice(b,1)[0]),s[0];return!1}function h(a,b,d){for(var e;s.length&&t+d>c.maxCacheSize;)e=s.pop(),t-=e.size;s.push({q:a,size:d,items:b}),t+=d}function i(b){var e,f="";if(b){if(!b.length)return void p.hide();for(d(),e=0;e<b.length;e++)f+="<li>"+b[e]+"</li>";p.html(f).show(),p.children("li").mouseover(function(){p.children("li").removeClass(c.selectClass),a(this).addClass(c.selectClass)}).click(function(a){a.preventDefault(),a.stopPropagation(),l()})}}function j(b,d){var e,f,g=[],h=b.split(c.delimiter);for(e=0;e<h.length;e++)f=a.trim(h[e]),f&&(f=f.replace(new RegExp(d,"ig"),function(a){return'<span class="'+c.matchClass+'">'+a+"</span>"}),g[g.length]=f);return g}function k(){var a;return p.is(":visible")?(a=p.children("li."+c.selectClass),a.length||(a=!1),a):!1}function l(){$currentResult=k(),$currentResult&&(c.multiple?(-1!=o.val().indexOf(c.multipleSep)?$currentVal=o.val().substr(0,o.val().lastIndexOf(c.multipleSep)+c.multipleSep.length)+" ":$currentVal="",o.val($currentVal+$currentResult.text()+c.multipleSep+" "),o.focus()):o.val($currentResult.text()),p.hide(),o.trigger("change"),c.onSelect&&c.onSelect.apply(o[0]))}function m(){$currentResult=k(),$currentResult?$currentResult.removeClass(c.selectClass).next().addClass(c.selectClass):p.children("li:first-child").addClass(c.selectClass)}function n(){var a=k();a?a.removeClass(c.selectClass).prev().addClass(c.selectClass):p.children("li:last-child").addClass(c.selectClass)}var o,p,q,r,s,t;o=a(b).attr("autocomplete","off"),p=a("<ul/>"),q=!1,r=0,s=[],t=0,p.addClass(c.resultsClass).appendTo("body"),d(),a(window).on("load",d).on("resize",d),o.blur(function(){setTimeout(function(){p.hide()},200)}),o.keydown(e)},a.fn.suggest=function(b,c){return b?(c=c||{},c.multiple=c.multiple||!1,c.multipleSep=c.multipleSep||",",c.source=b,c.delay=c.delay||100,c.resultsClass=c.resultsClass||"ac_results",c.selectClass=c.selectClass||"ac_over",c.matchClass=c.matchClass||"ac_match",c.minchars=c.minchars||2,c.delimiter=c.delimiter||"\n",c.onSelect=c.onSelect||!1,c.maxCacheSize=c.maxCacheSize||65536,this.each(function(){new a.suggest(this,c)}),this):void 0}}(jQuery);
                                                                               jquery/ui/accordion.js                                                                              0000644                 00000037412 15212564040 0011005 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Accordion 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Accordion
//>>group: Widgets
/* eslint-disable max-len */
//>>description: Displays collapsible content panels for presenting information in a limited amount of space.
/* eslint-enable max-len */
//>>docs: https://api.jqueryui.com/accordion/
//>>demos: https://jqueryui.com/accordion/
//>>css.structure: ../../themes/base/core.css
//>>css.structure: ../../themes/base/accordion.css
//>>css.theme: ../../themes/base/theme.css

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../version",
			"../keycode",
			"../unique-id",
			"../widget"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.widget( "ui.accordion", {
	version: "1.13.3",
	options: {
		active: 0,
		animate: {},
		classes: {
			"ui-accordion-header": "ui-corner-top",
			"ui-accordion-header-collapsed": "ui-corner-all",
			"ui-accordion-content": "ui-corner-bottom"
		},
		collapsible: false,
		event: "click",
		header: function( elem ) {
			return elem.find( "> li > :first-child" ).add( elem.find( "> :not(li)" ).even() );
		},
		heightStyle: "auto",
		icons: {
			activeHeader: "ui-icon-triangle-1-s",
			header: "ui-icon-triangle-1-e"
		},

		// Callbacks
		activate: null,
		beforeActivate: null
	},

	hideProps: {
		borderTopWidth: "hide",
		borderBottomWidth: "hide",
		paddingTop: "hide",
		paddingBottom: "hide",
		height: "hide"
	},

	showProps: {
		borderTopWidth: "show",
		borderBottomWidth: "show",
		paddingTop: "show",
		paddingBottom: "show",
		height: "show"
	},

	_create: function() {
		var options = this.options;

		this.prevShow = this.prevHide = $();
		this._addClass( "ui-accordion", "ui-widget ui-helper-reset" );
		this.element.attr( "role", "tablist" );

		// Don't allow collapsible: false and active: false / null
		if ( !options.collapsible && ( options.active === false || options.active == null ) ) {
			options.active = 0;
		}

		this._processPanels();

		// handle negative values
		if ( options.active < 0 ) {
			options.active += this.headers.length;
		}
		this._refresh();
	},

	_getCreateEventData: function() {
		return {
			header: this.active,
			panel: !this.active.length ? $() : this.active.next()
		};
	},

	_createIcons: function() {
		var icon, children,
			icons = this.options.icons;

		if ( icons ) {
			icon = $( "<span>" );
			this._addClass( icon, "ui-accordion-header-icon", "ui-icon " + icons.header );
			icon.prependTo( this.headers );
			children = this.active.children( ".ui-accordion-header-icon" );
			this._removeClass( children, icons.header )
				._addClass( children, null, icons.activeHeader )
				._addClass( this.headers, "ui-accordion-icons" );
		}
	},

	_destroyIcons: function() {
		this._removeClass( this.headers, "ui-accordion-icons" );
		this.headers.children( ".ui-accordion-header-icon" ).remove();
	},

	_destroy: function() {
		var contents;

		// Clean up main element
		this.element.removeAttr( "role" );

		// Clean up headers
		this.headers
			.removeAttr( "role aria-expanded aria-selected aria-controls tabIndex" )
			.removeUniqueId();

		this._destroyIcons();

		// Clean up content panels
		contents = this.headers.next()
			.css( "display", "" )
			.removeAttr( "role aria-hidden aria-labelledby" )
			.removeUniqueId();

		if ( this.options.heightStyle !== "content" ) {
			contents.css( "height", "" );
		}
	},

	_setOption: function( key, value ) {
		if ( key === "active" ) {

			// _activate() will handle invalid values and update this.options
			this._activate( value );
			return;
		}

		if ( key === "event" ) {
			if ( this.options.event ) {
				this._off( this.headers, this.options.event );
			}
			this._setupEvents( value );
		}

		this._super( key, value );

		// Setting collapsible: false while collapsed; open first panel
		if ( key === "collapsible" && !value && this.options.active === false ) {
			this._activate( 0 );
		}

		if ( key === "icons" ) {
			this._destroyIcons();
			if ( value ) {
				this._createIcons();
			}
		}
	},

	_setOptionDisabled: function( value ) {
		this._super( value );

		this.element.attr( "aria-disabled", value );

		// Support: IE8 Only
		// #5332 / #6059 - opacity doesn't cascade to positioned elements in IE
		// so we need to add the disabled class to the headers and panels
		this._toggleClass( null, "ui-state-disabled", !!value );
		this._toggleClass( this.headers.add( this.headers.next() ), null, "ui-state-disabled",
			!!value );
	},

	_keydown: function( event ) {
		if ( event.altKey || event.ctrlKey ) {
			return;
		}

		var keyCode = $.ui.keyCode,
			length = this.headers.length,
			currentIndex = this.headers.index( event.target ),
			toFocus = false;

		switch ( event.keyCode ) {
		case keyCode.RIGHT:
		case keyCode.DOWN:
			toFocus = this.headers[ ( currentIndex + 1 ) % length ];
			break;
		case keyCode.LEFT:
		case keyCode.UP:
			toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
			break;
		case keyCode.SPACE:
		case keyCode.ENTER:
			this._eventHandler( event );
			break;
		case keyCode.HOME:
			toFocus = this.headers[ 0 ];
			break;
		case keyCode.END:
			toFocus = this.headers[ length - 1 ];
			break;
		}

		if ( toFocus ) {
			$( event.target ).attr( "tabIndex", -1 );
			$( toFocus ).attr( "tabIndex", 0 );
			$( toFocus ).trigger( "focus" );
			event.preventDefault();
		}
	},

	_panelKeyDown: function( event ) {
		if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
			$( event.currentTarget ).prev().trigger( "focus" );
		}
	},

	refresh: function() {
		var options = this.options;
		this._processPanels();

		// Was collapsed or no panel
		if ( ( options.active === false && options.collapsible === true ) ||
				!this.headers.length ) {
			options.active = false;
			this.active = $();

		// active false only when collapsible is true
		} else if ( options.active === false ) {
			this._activate( 0 );

		// was active, but active panel is gone
		} else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {

			// all remaining panel are disabled
			if ( this.headers.length === this.headers.find( ".ui-state-disabled" ).length ) {
				options.active = false;
				this.active = $();

			// activate previous panel
			} else {
				this._activate( Math.max( 0, options.active - 1 ) );
			}

		// was active, active panel still exists
		} else {

			// make sure active index is correct
			options.active = this.headers.index( this.active );
		}

		this._destroyIcons();

		this._refresh();
	},

	_processPanels: function() {
		var prevHeaders = this.headers,
			prevPanels = this.panels;

		if ( typeof this.options.header === "function" ) {
			this.headers = this.options.header( this.element );
		} else {
			this.headers = this.element.find( this.options.header );
		}
		this._addClass( this.headers, "ui-accordion-header ui-accordion-header-collapsed",
			"ui-state-default" );

		this.panels = this.headers.next().filter( ":not(.ui-accordion-content-active)" ).hide();
		this._addClass( this.panels, "ui-accordion-content", "ui-helper-reset ui-widget-content" );

		// Avoid memory leaks (#10056)
		if ( prevPanels ) {
			this._off( prevHeaders.not( this.headers ) );
			this._off( prevPanels.not( this.panels ) );
		}
	},

	_refresh: function() {
		var maxHeight,
			options = this.options,
			heightStyle = options.heightStyle,
			parent = this.element.parent();

		this.active = this._findActive( options.active );
		this._addClass( this.active, "ui-accordion-header-active", "ui-state-active" )
			._removeClass( this.active, "ui-accordion-header-collapsed" );
		this._addClass( this.active.next(), "ui-accordion-content-active" );
		this.active.next().show();

		this.headers
			.attr( "role", "tab" )
			.each( function() {
				var header = $( this ),
					headerId = header.uniqueId().attr( "id" ),
					panel = header.next(),
					panelId = panel.uniqueId().attr( "id" );
				header.attr( "aria-controls", panelId );
				panel.attr( "aria-labelledby", headerId );
			} )
			.next()
				.attr( "role", "tabpanel" );

		this.headers
			.not( this.active )
				.attr( {
					"aria-selected": "false",
					"aria-expanded": "false",
					tabIndex: -1
				} )
				.next()
					.attr( {
						"aria-hidden": "true"
					} )
					.hide();

		// Make sure at least one header is in the tab order
		if ( !this.active.length ) {
			this.headers.eq( 0 ).attr( "tabIndex", 0 );
		} else {
			this.active.attr( {
				"aria-selected": "true",
				"aria-expanded": "true",
				tabIndex: 0
			} )
				.next()
					.attr( {
						"aria-hidden": "false"
					} );
		}

		this._createIcons();

		this._setupEvents( options.event );

		if ( heightStyle === "fill" ) {
			maxHeight = parent.height();
			this.element.siblings( ":visible" ).each( function() {
				var elem = $( this ),
					position = elem.css( "position" );

				if ( position === "absolute" || position === "fixed" ) {
					return;
				}
				maxHeight -= elem.outerHeight( true );
			} );

			this.headers.each( function() {
				maxHeight -= $( this ).outerHeight( true );
			} );

			this.headers.next()
				.each( function() {
					$( this ).height( Math.max( 0, maxHeight -
						$( this ).innerHeight() + $( this ).height() ) );
				} )
				.css( "overflow", "auto" );
		} else if ( heightStyle === "auto" ) {
			maxHeight = 0;
			this.headers.next()
				.each( function() {
					var isVisible = $( this ).is( ":visible" );
					if ( !isVisible ) {
						$( this ).show();
					}
					maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );
					if ( !isVisible ) {
						$( this ).hide();
					}
				} )
				.height( maxHeight );
		}
	},

	_activate: function( index ) {
		var active = this._findActive( index )[ 0 ];

		// Trying to activate the already active panel
		if ( active === this.active[ 0 ] ) {
			return;
		}

		// Trying to collapse, simulate a click on the currently active header
		active = active || this.active[ 0 ];

		this._eventHandler( {
			target: active,
			currentTarget: active,
			preventDefault: $.noop
		} );
	},

	_findActive: function( selector ) {
		return typeof selector === "number" ? this.headers.eq( selector ) : $();
	},

	_setupEvents: function( event ) {
		var events = {
			keydown: "_keydown"
		};
		if ( event ) {
			$.each( event.split( " " ), function( index, eventName ) {
				events[ eventName ] = "_eventHandler";
			} );
		}

		this._off( this.headers.add( this.headers.next() ) );
		this._on( this.headers, events );
		this._on( this.headers.next(), { keydown: "_panelKeyDown" } );
		this._hoverable( this.headers );
		this._focusable( this.headers );
	},

	_eventHandler: function( event ) {
		var activeChildren, clickedChildren,
			options = this.options,
			active = this.active,
			clicked = $( event.currentTarget ),
			clickedIsActive = clicked[ 0 ] === active[ 0 ],
			collapsing = clickedIsActive && options.collapsible,
			toShow = collapsing ? $() : clicked.next(),
			toHide = active.next(),
			eventData = {
				oldHeader: active,
				oldPanel: toHide,
				newHeader: collapsing ? $() : clicked,
				newPanel: toShow
			};

		event.preventDefault();

		if (

				// click on active header, but not collapsible
				( clickedIsActive && !options.collapsible ) ||

				// allow canceling activation
				( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
			return;
		}

		options.active = collapsing ? false : this.headers.index( clicked );

		// When the call to ._toggle() comes after the class changes
		// it causes a very odd bug in IE 8 (see #6720)
		this.active = clickedIsActive ? $() : clicked;
		this._toggle( eventData );

		// Switch classes
		// corner classes on the previously active header stay after the animation
		this._removeClass( active, "ui-accordion-header-active", "ui-state-active" );
		if ( options.icons ) {
			activeChildren = active.children( ".ui-accordion-header-icon" );
			this._removeClass( activeChildren, null, options.icons.activeHeader )
				._addClass( activeChildren, null, options.icons.header );
		}

		if ( !clickedIsActive ) {
			this._removeClass( clicked, "ui-accordion-header-collapsed" )
				._addClass( clicked, "ui-accordion-header-active", "ui-state-active" );
			if ( options.icons ) {
				clickedChildren = clicked.children( ".ui-accordion-header-icon" );
				this._removeClass( clickedChildren, null, options.icons.header )
					._addClass( clickedChildren, null, options.icons.activeHeader );
			}

			this._addClass( clicked.next(), "ui-accordion-content-active" );
		}
	},

	_toggle: function( data ) {
		var toShow = data.newPanel,
			toHide = this.prevShow.length ? this.prevShow : data.oldPanel;

		// Handle activating a panel during the animation for another activation
		this.prevShow.add( this.prevHide ).stop( true, true );
		this.prevShow = toShow;
		this.prevHide = toHide;

		if ( this.options.animate ) {
			this._animate( toShow, toHide, data );
		} else {
			toHide.hide();
			toShow.show();
			this._toggleComplete( data );
		}

		toHide.attr( {
			"aria-hidden": "true"
		} );
		toHide.prev().attr( {
			"aria-selected": "false",
			"aria-expanded": "false"
		} );

		// if we're switching panels, remove the old header from the tab order
		// if we're opening from collapsed state, remove the previous header from the tab order
		// if we're collapsing, then keep the collapsing header in the tab order
		if ( toShow.length && toHide.length ) {
			toHide.prev().attr( {
				"tabIndex": -1,
				"aria-expanded": "false"
			} );
		} else if ( toShow.length ) {
			this.headers.filter( function() {
				return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0;
			} )
				.attr( "tabIndex", -1 );
		}

		toShow
			.attr( "aria-hidden", "false" )
			.prev()
				.attr( {
					"aria-selected": "true",
					"aria-expanded": "true",
					tabIndex: 0
				} );
	},

	_animate: function( toShow, toHide, data ) {
		var total, easing, duration,
			that = this,
			adjust = 0,
			boxSizing = toShow.css( "box-sizing" ),
			down = toShow.length &&
				( !toHide.length || ( toShow.index() < toHide.index() ) ),
			animate = this.options.animate || {},
			options = down && animate.down || animate,
			complete = function() {
				that._toggleComplete( data );
			};

		if ( typeof options === "number" ) {
			duration = options;
		}
		if ( typeof options === "string" ) {
			easing = options;
		}

		// fall back from options to animation in case of partial down settings
		easing = easing || options.easing || animate.easing;
		duration = duration || options.duration || animate.duration;

		if ( !toHide.length ) {
			return toShow.animate( this.showProps, duration, easing, complete );
		}
		if ( !toShow.length ) {
			return toHide.animate( this.hideProps, duration, easing, complete );
		}

		total = toShow.show().outerHeight();
		toHide.animate( this.hideProps, {
			duration: duration,
			easing: easing,
			step: function( now, fx ) {
				fx.now = Math.round( now );
			}
		} );
		toShow
			.hide()
			.animate( this.showProps, {
				duration: duration,
				easing: easing,
				complete: complete,
				step: function( now, fx ) {
					fx.now = Math.round( now );
					if ( fx.prop !== "height" ) {
						if ( boxSizing === "content-box" ) {
							adjust += fx.now;
						}
					} else if ( that.options.heightStyle !== "content" ) {
						fx.now = Math.round( total - toHide.outerHeight() - adjust );
						adjust = 0;
					}
				}
			} );
	},

	_toggleComplete: function( data ) {
		var toHide = data.oldPanel,
			prev = toHide.prev();

		this._removeClass( toHide, "ui-accordion-content-active" );
		this._removeClass( prev, "ui-accordion-header-active" )
			._addClass( prev, "ui-accordion-header-collapsed" );

		// Work around for rendering bug in IE (#5421)
		if ( toHide.length ) {
			toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className;
		}
		this._trigger( "activate", null, data );
	}
} );

} );
                                                                                                                                                                                                                                                      jquery/ui/accordion.min.js                                                                          0000644                 00000021234 15212564040 0011562 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Accordion 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../keycode","../unique-id","../widget"],e):e(jQuery)}(function(o){"use strict";return o.widget("ui.accordion",{version:"1.13.3",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:function(e){return e.find("> li > :first-child").add(e.find("> :not(li)").even())},heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=o(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||!1!==e.active&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():o()}},_createIcons:function(){var e,t=this.options.icons;t&&(e=o("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+t.header),e.prependTo(this.headers),e=this.active.children(".ui-accordion-header-icon"),this._removeClass(e,t.header)._addClass(e,null,t.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){"active"===e?this._activate(t):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||!1!==this.options.active||this._activate(0),"icons"===e&&(this._destroyIcons(),t)&&this._createIcons())},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",e),this._toggleClass(null,"ui-state-disabled",!!e),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!e)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var t=o.ui.keyCode,i=this.headers.length,a=this.headers.index(e.target),s=!1;switch(e.keyCode){case t.RIGHT:case t.DOWN:s=this.headers[(a+1)%i];break;case t.LEFT:case t.UP:s=this.headers[(a-1+i)%i];break;case t.SPACE:case t.ENTER:this._eventHandler(e);break;case t.HOME:s=this.headers[0];break;case t.END:s=this.headers[i-1]}s&&(o(e.target).attr("tabIndex",-1),o(s).attr("tabIndex",0),o(s).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===o.ui.keyCode.UP&&e.ctrlKey&&o(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),!1===e.active&&!0===e.collapsible||!this.headers.length?(e.active=!1,this.active=o()):!1===e.active?this._activate(0):this.active.length&&!o.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=o()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;"function"==typeof this.options.header?this.headers=this.options.header(this.element):this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var i,e=this.options,t=e.heightStyle,a=this.element.parent();this.active=this._findActive(e.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=o(this),t=e.uniqueId().attr("id"),i=e.next(),a=i.uniqueId().attr("id");e.attr("aria-controls",a),i.attr("aria-labelledby",t)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(e.event),"fill"===t?(i=a.height(),this.element.siblings(":visible").each(function(){var e=o(this),t=e.css("position");"absolute"!==t&&"fixed"!==t&&(i-=e.outerHeight(!0))}),this.headers.each(function(){i-=o(this).outerHeight(!0)}),this.headers.next().each(function(){o(this).height(Math.max(0,i-o(this).innerHeight()+o(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.headers.next().each(function(){var e=o(this).is(":visible");e||o(this).show(),i=Math.max(i,o(this).css("height","").height()),e||o(this).hide()}).height(i))},_activate:function(e){e=this._findActive(e)[0];e!==this.active[0]&&(e=e||this.active[0],this._eventHandler({target:e,currentTarget:e,preventDefault:o.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):o()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&o.each(e.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var t=this.options,i=this.active,a=o(e.currentTarget),s=a[0]===i[0],n=s&&t.collapsible,h=n?o():a.next(),r=i.next(),r={oldHeader:i,oldPanel:r,newHeader:n?o():a,newPanel:h};e.preventDefault(),s&&!t.collapsible||!1===this._trigger("beforeActivate",e,r)||(t.active=!n&&this.headers.index(a),this.active=s?o():a,this._toggle(r),this._removeClass(i,"ui-accordion-header-active","ui-state-active"),t.icons&&(h=i.children(".ui-accordion-header-icon"),this._removeClass(h,null,t.icons.activeHeader)._addClass(h,null,t.icons.header)),s)||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),t.icons&&(e=a.children(".ui-accordion-header-icon"),this._removeClass(e,null,t.icons.header)._addClass(e,null,t.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active"))},_toggle:function(e){var t=e.newPanel,i=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=t,this.prevHide=i,this.options.animate?this._animate(t,i,e):(i.hide(),t.show(),this._toggleComplete(e)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),t.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):t.length&&this.headers.filter(function(){return 0===parseInt(o(this).attr("tabIndex"),10)}).attr("tabIndex",-1),t.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,i,t){function a(){n._toggleComplete(t)}var s,n=this,h=0,r=e.css("box-sizing"),o=e.length&&(!i.length||e.index()<i.index()),d=this.options.animate||{},o=o&&d.down||d,c=(c="string"==typeof o?o:c)||o.easing||d.easing,l=(l="number"==typeof o?o:l)||o.duration||d.duration;return i.length?e.length?(s=e.show().outerHeight(),i.animate(this.hideProps,{duration:l,easing:c,step:function(e,t){t.now=Math.round(e)}}),void e.hide().animate(this.showProps,{duration:l,easing:c,complete:a,step:function(e,t){t.now=Math.round(e),"height"!==t.prop?"content-box"===r&&(h+=t.now):"content"!==n.options.heightStyle&&(t.now=Math.round(s-i.outerHeight()-h),h=0)}})):i.animate(this.hideProps,l,c,a):e.animate(this.showProps,l,c,a)},_toggleComplete:function(e){var t=e.oldPanel,i=t.prev();this._removeClass(t,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}})});                                                                                                                                                                                                                                                                                                                                                                    jquery/ui/autocomplete.js                                                                           0000644                 00000042172 15212564040 0011544 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Autocomplete 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Autocomplete
//>>group: Widgets
//>>description: Lists suggested words as the user is typing.
//>>docs: https://api.jqueryui.com/autocomplete/
//>>demos: https://jqueryui.com/autocomplete/
//>>css.structure: ../../themes/base/core.css
//>>css.structure: ../../themes/base/autocomplete.css
//>>css.theme: ../../themes/base/theme.css

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"./menu",
			"../keycode",
			"../position",
			"../safe-active-element",
			"../version",
			"../widget"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

$.widget( "ui.autocomplete", {
	version: "1.13.3",
	defaultElement: "<input>",
	options: {
		appendTo: null,
		autoFocus: false,
		delay: 300,
		minLength: 1,
		position: {
			my: "left top",
			at: "left bottom",
			collision: "none"
		},
		source: null,

		// Callbacks
		change: null,
		close: null,
		focus: null,
		open: null,
		response: null,
		search: null,
		select: null
	},

	requestIndex: 0,
	pending: 0,
	liveRegionTimer: null,

	_create: function() {

		// Some browsers only repeat keydown events, not keypress events,
		// so we use the suppressKeyPress flag to determine if we've already
		// handled the keydown event. #7269
		// Unfortunately the code for & in keypress is the same as the up arrow,
		// so we use the suppressKeyPressRepeat flag to avoid handling keypress
		// events when we know the keydown event was used to modify the
		// search term. #7799
		var suppressKeyPress, suppressKeyPressRepeat, suppressInput,
			nodeName = this.element[ 0 ].nodeName.toLowerCase(),
			isTextarea = nodeName === "textarea",
			isInput = nodeName === "input";

		// Textareas are always multi-line
		// Inputs are always single-line, even if inside a contentEditable element
		// IE also treats inputs as contentEditable
		// All other element types are determined by whether or not they're contentEditable
		this.isMultiLine = isTextarea || !isInput && this._isContentEditable( this.element );

		this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
		this.isNewMenu = true;

		this._addClass( "ui-autocomplete-input" );
		this.element.attr( "autocomplete", "off" );

		this._on( this.element, {
			keydown: function( event ) {
				if ( this.element.prop( "readOnly" ) ) {
					suppressKeyPress = true;
					suppressInput = true;
					suppressKeyPressRepeat = true;
					return;
				}

				suppressKeyPress = false;
				suppressInput = false;
				suppressKeyPressRepeat = false;
				var keyCode = $.ui.keyCode;
				switch ( event.keyCode ) {
				case keyCode.PAGE_UP:
					suppressKeyPress = true;
					this._move( "previousPage", event );
					break;
				case keyCode.PAGE_DOWN:
					suppressKeyPress = true;
					this._move( "nextPage", event );
					break;
				case keyCode.UP:
					suppressKeyPress = true;
					this._keyEvent( "previous", event );
					break;
				case keyCode.DOWN:
					suppressKeyPress = true;
					this._keyEvent( "next", event );
					break;
				case keyCode.ENTER:

					// when menu is open and has focus
					if ( this.menu.active ) {

						// #6055 - Opera still allows the keypress to occur
						// which causes forms to submit
						suppressKeyPress = true;
						event.preventDefault();
						this.menu.select( event );
					}
					break;
				case keyCode.TAB:
					if ( this.menu.active ) {
						this.menu.select( event );
					}
					break;
				case keyCode.ESCAPE:
					if ( this.menu.element.is( ":visible" ) ) {
						if ( !this.isMultiLine ) {
							this._value( this.term );
						}
						this.close( event );

						// Different browsers have different default behavior for escape
						// Single press can mean undo or clear
						// Double press in IE means clear the whole form
						event.preventDefault();
					}
					break;
				default:
					suppressKeyPressRepeat = true;

					// search timeout should be triggered before the input value is changed
					this._searchTimeout( event );
					break;
				}
			},
			keypress: function( event ) {
				if ( suppressKeyPress ) {
					suppressKeyPress = false;
					if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
						event.preventDefault();
					}
					return;
				}
				if ( suppressKeyPressRepeat ) {
					return;
				}

				// Replicate some key handlers to allow them to repeat in Firefox and Opera
				var keyCode = $.ui.keyCode;
				switch ( event.keyCode ) {
				case keyCode.PAGE_UP:
					this._move( "previousPage", event );
					break;
				case keyCode.PAGE_DOWN:
					this._move( "nextPage", event );
					break;
				case keyCode.UP:
					this._keyEvent( "previous", event );
					break;
				case keyCode.DOWN:
					this._keyEvent( "next", event );
					break;
				}
			},
			input: function( event ) {
				if ( suppressInput ) {
					suppressInput = false;
					event.preventDefault();
					return;
				}
				this._searchTimeout( event );
			},
			focus: function() {
				this.selectedItem = null;
				this.previous = this._value();
			},
			blur: function( event ) {
				clearTimeout( this.searching );
				this.close( event );
				this._change( event );
			}
		} );

		this._initSource();
		this.menu = $( "<ul>" )
			.appendTo( this._appendTo() )
			.menu( {

				// disable ARIA support, the live region takes care of that
				role: null
			} )
			.hide()

			// Support: IE 11 only, Edge <= 14
			// For other browsers, we preventDefault() on the mousedown event
			// to keep the dropdown from taking focus from the input. This doesn't
			// work for IE/Edge, causing problems with selection and scrolling (#9638)
			// Happily, IE and Edge support an "unselectable" attribute that
			// prevents an element from receiving focus, exactly what we want here.
			.attr( {
				"unselectable": "on"
			} )
			.menu( "instance" );

		this._addClass( this.menu.element, "ui-autocomplete", "ui-front" );
		this._on( this.menu.element, {
			mousedown: function( event ) {

				// Prevent moving focus out of the text field
				event.preventDefault();
			},
			menufocus: function( event, ui ) {
				var label, item;

				// support: Firefox
				// Prevent accidental activation of menu items in Firefox (#7024 #9118)
				if ( this.isNewMenu ) {
					this.isNewMenu = false;
					if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
						this.menu.blur();

						this.document.one( "mousemove", function() {
							$( event.target ).trigger( event.originalEvent );
						} );

						return;
					}
				}

				item = ui.item.data( "ui-autocomplete-item" );
				if ( false !== this._trigger( "focus", event, { item: item } ) ) {

					// use value to match what will end up in the input, if it was a key event
					if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
						this._value( item.value );
					}
				}

				// Announce the value in the liveRegion
				label = ui.item.attr( "aria-label" ) || item.value;
				if ( label && String.prototype.trim.call( label ).length ) {
					clearTimeout( this.liveRegionTimer );
					this.liveRegionTimer = this._delay( function() {
						this.liveRegion.html( $( "<div>" ).text( label ) );
					}, 100 );
				}
			},
			menuselect: function( event, ui ) {
				var item = ui.item.data( "ui-autocomplete-item" ),
					previous = this.previous;

				// Only trigger when focus was lost (click on menu)
				if ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) {
					this.element.trigger( "focus" );
					this.previous = previous;

					// #6109 - IE triggers two focus events and the second
					// is asynchronous, so we need to reset the previous
					// term synchronously and asynchronously :-(
					this._delay( function() {
						this.previous = previous;
						this.selectedItem = item;
					} );
				}

				if ( false !== this._trigger( "select", event, { item: item } ) ) {
					this._value( item.value );
				}

				// reset the term after the select event
				// this allows custom select handling to work properly
				this.term = this._value();

				this.close( event );
				this.selectedItem = item;
			}
		} );

		this.liveRegion = $( "<div>", {
			role: "status",
			"aria-live": "assertive",
			"aria-relevant": "additions"
		} )
			.appendTo( this.document[ 0 ].body );

		this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" );

		// Turning off autocomplete prevents the browser from remembering the
		// value when navigating through history, so we re-enable autocomplete
		// if the page is unloaded before the widget is destroyed. #7790
		this._on( this.window, {
			beforeunload: function() {
				this.element.removeAttr( "autocomplete" );
			}
		} );
	},

	_destroy: function() {
		clearTimeout( this.searching );
		this.element.removeAttr( "autocomplete" );
		this.menu.element.remove();
		this.liveRegion.remove();
	},

	_setOption: function( key, value ) {
		this._super( key, value );
		if ( key === "source" ) {
			this._initSource();
		}
		if ( key === "appendTo" ) {
			this.menu.element.appendTo( this._appendTo() );
		}
		if ( key === "disabled" && value && this.xhr ) {
			this.xhr.abort();
		}
	},

	_isEventTargetInWidget: function( event ) {
		var menuElement = this.menu.element[ 0 ];

		return event.target === this.element[ 0 ] ||
			event.target === menuElement ||
			$.contains( menuElement, event.target );
	},

	_closeOnClickOutside: function( event ) {
		if ( !this._isEventTargetInWidget( event ) ) {
			this.close();
		}
	},

	_appendTo: function() {
		var element = this.options.appendTo;

		if ( element ) {
			element = element.jquery || element.nodeType ?
				$( element ) :
				this.document.find( element ).eq( 0 );
		}

		if ( !element || !element[ 0 ] ) {
			element = this.element.closest( ".ui-front, dialog" );
		}

		if ( !element.length ) {
			element = this.document[ 0 ].body;
		}

		return element;
	},

	_initSource: function() {
		var array, url,
			that = this;
		if ( Array.isArray( this.options.source ) ) {
			array = this.options.source;
			this.source = function( request, response ) {
				response( $.ui.autocomplete.filter( array, request.term ) );
			};
		} else if ( typeof this.options.source === "string" ) {
			url = this.options.source;
			this.source = function( request, response ) {
				if ( that.xhr ) {
					that.xhr.abort();
				}
				that.xhr = $.ajax( {
					url: url,
					data: request,
					dataType: "json",
					success: function( data ) {
						response( data );
					},
					error: function() {
						response( [] );
					}
				} );
			};
		} else {
			this.source = this.options.source;
		}
	},

	_searchTimeout: function( event ) {
		clearTimeout( this.searching );
		this.searching = this._delay( function() {

			// Search if the value has changed, or if the user retypes the same value (see #7434)
			var equalValues = this.term === this._value(),
				menuVisible = this.menu.element.is( ":visible" ),
				modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;

			if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) {
				this.selectedItem = null;
				this.search( null, event );
			}
		}, this.options.delay );
	},

	search: function( value, event ) {
		value = value != null ? value : this._value();

		// Always save the actual value, not the one passed as an argument
		this.term = this._value();

		if ( value.length < this.options.minLength ) {
			return this.close( event );
		}

		if ( this._trigger( "search", event ) === false ) {
			return;
		}

		return this._search( value );
	},

	_search: function( value ) {
		this.pending++;
		this._addClass( "ui-autocomplete-loading" );
		this.cancelSearch = false;

		this.source( { term: value }, this._response() );
	},

	_response: function() {
		var index = ++this.requestIndex;

		return function( content ) {
			if ( index === this.requestIndex ) {
				this.__response( content );
			}

			this.pending--;
			if ( !this.pending ) {
				this._removeClass( "ui-autocomplete-loading" );
			}
		}.bind( this );
	},

	__response: function( content ) {
		if ( content ) {
			content = this._normalize( content );
		}
		this._trigger( "response", null, { content: content } );
		if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
			this._suggest( content );
			this._trigger( "open" );
		} else {

			// use ._close() instead of .close() so we don't cancel future searches
			this._close();
		}
	},

	close: function( event ) {
		this.cancelSearch = true;
		this._close( event );
	},

	_close: function( event ) {

		// Remove the handler that closes the menu on outside clicks
		this._off( this.document, "mousedown" );

		if ( this.menu.element.is( ":visible" ) ) {
			this.menu.element.hide();
			this.menu.blur();
			this.isNewMenu = true;
			this._trigger( "close", event );
		}
	},

	_change: function( event ) {
		if ( this.previous !== this._value() ) {
			this._trigger( "change", event, { item: this.selectedItem } );
		}
	},

	_normalize: function( items ) {

		// assume all items have the right format when the first item is complete
		if ( items.length && items[ 0 ].label && items[ 0 ].value ) {
			return items;
		}
		return $.map( items, function( item ) {
			if ( typeof item === "string" ) {
				return {
					label: item,
					value: item
				};
			}
			return $.extend( {}, item, {
				label: item.label || item.value,
				value: item.value || item.label
			} );
		} );
	},

	_suggest: function( items ) {
		var ul = this.menu.element.empty();
		this._renderMenu( ul, items );
		this.isNewMenu = true;
		this.menu.refresh();

		// Size and position menu
		ul.show();
		this._resizeMenu();
		ul.position( $.extend( {
			of: this.element
		}, this.options.position ) );

		if ( this.options.autoFocus ) {
			this.menu.next();
		}

		// Listen for interactions outside of the widget (#6642)
		this._on( this.document, {
			mousedown: "_closeOnClickOutside"
		} );
	},

	_resizeMenu: function() {
		var ul = this.menu.element;
		ul.outerWidth( Math.max(

			// Firefox wraps long text (possibly a rounding bug)
			// so we add 1px to avoid the wrapping (#7513)
			ul.width( "" ).outerWidth() + 1,
			this.element.outerWidth()
		) );
	},

	_renderMenu: function( ul, items ) {
		var that = this;
		$.each( items, function( index, item ) {
			that._renderItemData( ul, item );
		} );
	},

	_renderItemData: function( ul, item ) {
		return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
	},

	_renderItem: function( ul, item ) {
		return $( "<li>" )
			.append( $( "<div>" ).text( item.label ) )
			.appendTo( ul );
	},

	_move: function( direction, event ) {
		if ( !this.menu.element.is( ":visible" ) ) {
			this.search( null, event );
			return;
		}
		if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
				this.menu.isLastItem() && /^next/.test( direction ) ) {

			if ( !this.isMultiLine ) {
				this._value( this.term );
			}

			this.menu.blur();
			return;
		}
		this.menu[ direction ]( event );
	},

	widget: function() {
		return this.menu.element;
	},

	_value: function() {
		return this.valueMethod.apply( this.element, arguments );
	},

	_keyEvent: function( keyEvent, event ) {
		if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
			this._move( keyEvent, event );

			// Prevents moving cursor to beginning/end of the text field in some browsers
			event.preventDefault();
		}
	},

	// Support: Chrome <=50
	// We should be able to just use this.element.prop( "isContentEditable" )
	// but hidden elements always report false in Chrome.
	// https://code.google.com/p/chromium/issues/detail?id=313082
	_isContentEditable: function( element ) {
		if ( !element.length ) {
			return false;
		}

		var editable = element.prop( "contentEditable" );

		if ( editable === "inherit" ) {
			return this._isContentEditable( element.parent() );
		}

		return editable === "true";
	}
} );

$.extend( $.ui.autocomplete, {
	escapeRegex: function( value ) {
		return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
	},
	filter: function( array, term ) {
		var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" );
		return $.grep( array, function( value ) {
			return matcher.test( value.label || value.value || value );
		} );
	}
} );

// Live region extension, adding a `messages` option
// NOTE: This is an experimental API. We are still investigating
// a full solution for string manipulation and internationalization.
$.widget( "ui.autocomplete", $.ui.autocomplete, {
	options: {
		messages: {
			noResults: "No search results.",
			results: function( amount ) {
				return amount + ( amount > 1 ? " results are" : " result is" ) +
					" available, use up and down arrow keys to navigate.";
			}
		}
	},

	__response: function( content ) {
		var message;
		this._superApply( arguments );
		if ( this.options.disabled || this.cancelSearch ) {
			return;
		}
		if ( content && content.length ) {
			message = this.options.messages.results( content.length );
		} else {
			message = this.options.messages.noResults;
		}
		clearTimeout( this.liveRegionTimer );
		this.liveRegionTimer = this._delay( function() {
			this.liveRegion.html( $( "<div>" ).text( message ) );
		}, 100 );
	}
} );

return $.ui.autocomplete;

} );
                                                                                                                                                                                                                                                                                                                                                                                                      jquery/ui/autocomplete.min.js                                                                       0000644                 00000020530 15212564040 0012320 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Autocomplete 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./menu","../keycode","../position","../safe-active-element","../version","../widget"],e):e(jQuery)}(function(o){"use strict";return o.widget("ui.autocomplete",{version:"1.13.3",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var i,s,n,e=this.element[0].nodeName.toLowerCase(),t="textarea"===e,e="input"===e;this.isMultiLine=t||!e&&this._isContentEditable(this.element),this.valueMethod=this.element[t||e?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(e){if(this.element.prop("readOnly"))s=n=i=!0;else{s=n=i=!1;var t=o.ui.keyCode;switch(e.keyCode){case t.PAGE_UP:i=!0,this._move("previousPage",e);break;case t.PAGE_DOWN:i=!0,this._move("nextPage",e);break;case t.UP:i=!0,this._keyEvent("previous",e);break;case t.DOWN:i=!0,this._keyEvent("next",e);break;case t.ENTER:this.menu.active&&(i=!0,e.preventDefault(),this.menu.select(e));break;case t.TAB:this.menu.active&&this.menu.select(e);break;case t.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(e),e.preventDefault());break;default:s=!0,this._searchTimeout(e)}}},keypress:function(e){if(i)i=!1,this.isMultiLine&&!this.menu.element.is(":visible")||e.preventDefault();else if(!s){var t=o.ui.keyCode;switch(e.keyCode){case t.PAGE_UP:this._move("previousPage",e);break;case t.PAGE_DOWN:this._move("nextPage",e);break;case t.UP:this._keyEvent("previous",e);break;case t.DOWN:this._keyEvent("next",e)}}},input:function(e){n?(n=!1,e.preventDefault()):this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){clearTimeout(this.searching),this.close(e),this._change(e)}}),this._initSource(),this.menu=o("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().attr({unselectable:"on"}).menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault()},menufocus:function(e,t){var i,s;this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent)&&/^mouse/.test(e.originalEvent.type)?(this.menu.blur(),this.document.one("mousemove",function(){o(e.target).trigger(e.originalEvent)})):(s=t.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:s})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value),(i=t.item.attr("aria-label")||s.value)&&String.prototype.trim.call(i).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(o("<div>").text(i))},100)))},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==o.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=o("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var t=this.menu.element[0];return e.target===this.element[0]||e.target===t||o.contains(t,e.target)},_closeOnClickOutside:function(e){this._isEventTargetInWidget(e)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e=(e=(e=e&&(e.jquery||e.nodeType?o(e):this.document.find(e).eq(0)))&&e[0]?e:this.element.closest(".ui-front, dialog")).length?e:this.document[0].body},_initSource:function(){var i,s,n=this;Array.isArray(this.options.source)?(i=this.options.source,this.source=function(e,t){t(o.ui.autocomplete.filter(i,e.term))}):"string"==typeof this.options.source?(s=this.options.source,this.source=function(e,t){n.xhr&&n.xhr.abort(),n.xhr=o.ajax({url:s,data:e,dataType:"json",success:function(e){t(e)},error:function(){t([])}})}):this.source=this.options.source},_searchTimeout:function(s){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),t=this.menu.element.is(":visible"),i=s.altKey||s.ctrlKey||s.metaKey||s.shiftKey;e&&(t||i)||(this.selectedItem=null,this.search(null,s))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):!1!==this._trigger("search",t)?this._search(e):void 0},_search:function(e){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")}.bind(this)},__response:function(e){e=e&&this._normalize(e),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:o.map(e,function(e){return"string"==typeof e?{label:e,value:e}:o.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var t=this.menu.element.empty();this._renderMenu(t,e),this.isNewMenu=!0,this.menu.refresh(),t.show(),this._resizeMenu(),t.position(o.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(i,e){var s=this;o.each(e,function(e,t){s._renderItemData(i,t)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(e,t){return o("<li>").append(o("<div>").text(t.label)).appendTo(e)},_move:function(e,t){this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),this.menu.blur()):this.menu[e](t):this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(e,t),t.preventDefault())},_isContentEditable:function(e){var t;return!!e.length&&("inherit"===(t=e.prop("contentEditable"))?this._isContentEditable(e.parent()):"true"===t)}}),o.extend(o.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,t){var i=new RegExp(o.ui.autocomplete.escapeRegex(t),"i");return o.grep(e,function(e){return i.test(e.label||e.value||e)})}}),o.widget("ui.autocomplete",o.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(1<e?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(o("<div>").text(t))},100))}}),o.ui.autocomplete});                                                                                                                                                                        jquery/ui/button.js                                                                                 0000644                 00000026672 15212564040 0010365 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Button 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Button
//>>group: Widgets
//>>description: Enhances a form with themeable buttons.
//>>docs: https://api.jqueryui.com/button/
//>>demos: https://jqueryui.com/button/
//>>css.structure: ../../themes/base/core.css
//>>css.structure: ../../themes/base/button.css
//>>css.theme: ../../themes/base/theme.css

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",

			// These are only for backcompat
			// TODO: Remove after 1.12
			"./controlgroup",
			"./checkboxradio",

			"../keycode",
			"../widget"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

$.widget( "ui.button", {
	version: "1.13.3",
	defaultElement: "<button>",
	options: {
		classes: {
			"ui-button": "ui-corner-all"
		},
		disabled: null,
		icon: null,
		iconPosition: "beginning",
		label: null,
		showLabel: true
	},

	_getCreateOptions: function() {
		var disabled,

			// This is to support cases like in jQuery Mobile where the base widget does have
			// an implementation of _getCreateOptions
			options = this._super() || {};

		this.isInput = this.element.is( "input" );

		disabled = this.element[ 0 ].disabled;
		if ( disabled != null ) {
			options.disabled = disabled;
		}

		this.originalLabel = this.isInput ? this.element.val() : this.element.html();
		if ( this.originalLabel ) {
			options.label = this.originalLabel;
		}

		return options;
	},

	_create: function() {
		if ( !this.option.showLabel & !this.options.icon ) {
			this.options.showLabel = true;
		}

		// We have to check the option again here even though we did in _getCreateOptions,
		// because null may have been passed on init which would override what was set in
		// _getCreateOptions
		if ( this.options.disabled == null ) {
			this.options.disabled = this.element[ 0 ].disabled || false;
		}

		this.hasTitle = !!this.element.attr( "title" );

		// Check to see if the label needs to be set or if its already correct
		if ( this.options.label && this.options.label !== this.originalLabel ) {
			if ( this.isInput ) {
				this.element.val( this.options.label );
			} else {
				this.element.html( this.options.label );
			}
		}
		this._addClass( "ui-button", "ui-widget" );
		this._setOption( "disabled", this.options.disabled );
		this._enhance();

		if ( this.element.is( "a" ) ) {
			this._on( {
				"keyup": function( event ) {
					if ( event.keyCode === $.ui.keyCode.SPACE ) {
						event.preventDefault();

						// Support: PhantomJS <= 1.9, IE 8 Only
						// If a native click is available use it so we actually cause navigation
						// otherwise just trigger a click event
						if ( this.element[ 0 ].click ) {
							this.element[ 0 ].click();
						} else {
							this.element.trigger( "click" );
						}
					}
				}
			} );
		}
	},

	_enhance: function() {
		if ( !this.element.is( "button" ) ) {
			this.element.attr( "role", "button" );
		}

		if ( this.options.icon ) {
			this._updateIcon( "icon", this.options.icon );
			this._updateTooltip();
		}
	},

	_updateTooltip: function() {
		this.title = this.element.attr( "title" );

		if ( !this.options.showLabel && !this.title ) {
			this.element.attr( "title", this.options.label );
		}
	},

	_updateIcon: function( option, value ) {
		var icon = option !== "iconPosition",
			position = icon ? this.options.iconPosition : value,
			displayBlock = position === "top" || position === "bottom";

		// Create icon
		if ( !this.icon ) {
			this.icon = $( "<span>" );

			this._addClass( this.icon, "ui-button-icon", "ui-icon" );

			if ( !this.options.showLabel ) {
				this._addClass( "ui-button-icon-only" );
			}
		} else if ( icon ) {

			// If we are updating the icon remove the old icon class
			this._removeClass( this.icon, null, this.options.icon );
		}

		// If we are updating the icon add the new icon class
		if ( icon ) {
			this._addClass( this.icon, null, value );
		}

		this._attachIcon( position );

		// If the icon is on top or bottom we need to add the ui-widget-icon-block class and remove
		// the iconSpace if there is one.
		if ( displayBlock ) {
			this._addClass( this.icon, null, "ui-widget-icon-block" );
			if ( this.iconSpace ) {
				this.iconSpace.remove();
			}
		} else {

			// Position is beginning or end so remove the ui-widget-icon-block class and add the
			// space if it does not exist
			if ( !this.iconSpace ) {
				this.iconSpace = $( "<span> </span>" );
				this._addClass( this.iconSpace, "ui-button-icon-space" );
			}
			this._removeClass( this.icon, null, "ui-wiget-icon-block" );
			this._attachIconSpace( position );
		}
	},

	_destroy: function() {
		this.element.removeAttr( "role" );

		if ( this.icon ) {
			this.icon.remove();
		}
		if ( this.iconSpace ) {
			this.iconSpace.remove();
		}
		if ( !this.hasTitle ) {
			this.element.removeAttr( "title" );
		}
	},

	_attachIconSpace: function( iconPosition ) {
		this.icon[ /^(?:end|bottom)/.test( iconPosition ) ? "before" : "after" ]( this.iconSpace );
	},

	_attachIcon: function( iconPosition ) {
		this.element[ /^(?:end|bottom)/.test( iconPosition ) ? "append" : "prepend" ]( this.icon );
	},

	_setOptions: function( options ) {
		var newShowLabel = options.showLabel === undefined ?
				this.options.showLabel :
				options.showLabel,
			newIcon = options.icon === undefined ? this.options.icon : options.icon;

		if ( !newShowLabel && !newIcon ) {
			options.showLabel = true;
		}
		this._super( options );
	},

	_setOption: function( key, value ) {
		if ( key === "icon" ) {
			if ( value ) {
				this._updateIcon( key, value );
			} else if ( this.icon ) {
				this.icon.remove();
				if ( this.iconSpace ) {
					this.iconSpace.remove();
				}
			}
		}

		if ( key === "iconPosition" ) {
			this._updateIcon( key, value );
		}

		// Make sure we can't end up with a button that has neither text nor icon
		if ( key === "showLabel" ) {
				this._toggleClass( "ui-button-icon-only", null, !value );
				this._updateTooltip();
		}

		if ( key === "label" ) {
			if ( this.isInput ) {
				this.element.val( value );
			} else {

				// If there is an icon, append it, else nothing then append the value
				// this avoids removal of the icon when setting label text
				this.element.html( value );
				if ( this.icon ) {
					this._attachIcon( this.options.iconPosition );
					this._attachIconSpace( this.options.iconPosition );
				}
			}
		}

		this._super( key, value );

		if ( key === "disabled" ) {
			this._toggleClass( null, "ui-state-disabled", value );
			this.element[ 0 ].disabled = value;
			if ( value ) {
				this.element.trigger( "blur" );
			}
		}
	},

	refresh: function() {

		// Make sure to only check disabled if its an element that supports this otherwise
		// check for the disabled class to determine state
		var isDisabled = this.element.is( "input, button" ) ?
			this.element[ 0 ].disabled : this.element.hasClass( "ui-button-disabled" );

		if ( isDisabled !== this.options.disabled ) {
			this._setOptions( { disabled: isDisabled } );
		}

		this._updateTooltip();
	}
} );

// DEPRECATED
if ( $.uiBackCompat !== false ) {

	// Text and Icons options
	$.widget( "ui.button", $.ui.button, {
		options: {
			text: true,
			icons: {
				primary: null,
				secondary: null
			}
		},

		_create: function() {
			if ( this.options.showLabel && !this.options.text ) {
				this.options.showLabel = this.options.text;
			}
			if ( !this.options.showLabel && this.options.text ) {
				this.options.text = this.options.showLabel;
			}
			if ( !this.options.icon && ( this.options.icons.primary ||
					this.options.icons.secondary ) ) {
				if ( this.options.icons.primary ) {
					this.options.icon = this.options.icons.primary;
				} else {
					this.options.icon = this.options.icons.secondary;
					this.options.iconPosition = "end";
				}
			} else if ( this.options.icon ) {
				this.options.icons.primary = this.options.icon;
			}
			this._super();
		},

		_setOption: function( key, value ) {
			if ( key === "text" ) {
				this._super( "showLabel", value );
				return;
			}
			if ( key === "showLabel" ) {
				this.options.text = value;
			}
			if ( key === "icon" ) {
				this.options.icons.primary = value;
			}
			if ( key === "icons" ) {
				if ( value.primary ) {
					this._super( "icon", value.primary );
					this._super( "iconPosition", "beginning" );
				} else if ( value.secondary ) {
					this._super( "icon", value.secondary );
					this._super( "iconPosition", "end" );
				}
			}
			this._superApply( arguments );
		}
	} );

	$.fn.button = ( function( orig ) {
		return function( options ) {
			var isMethodCall = typeof options === "string";
			var args = Array.prototype.slice.call( arguments, 1 );
			var returnValue = this;

			if ( isMethodCall ) {

				// If this is an empty collection, we need to have the instance method
				// return undefined instead of the jQuery instance
				if ( !this.length && options === "instance" ) {
					returnValue = undefined;
				} else {
					this.each( function() {
						var methodValue;
						var type = $( this ).attr( "type" );
						var name = type !== "checkbox" && type !== "radio" ?
							"button" :
							"checkboxradio";
						var instance = $.data( this, "ui-" + name );

						if ( options === "instance" ) {
							returnValue = instance;
							return false;
						}

						if ( !instance ) {
							return $.error( "cannot call methods on button" +
								" prior to initialization; " +
								"attempted to call method '" + options + "'" );
						}

						if ( typeof instance[ options ] !== "function" ||
							options.charAt( 0 ) === "_" ) {
							return $.error( "no such method '" + options + "' for button" +
								" widget instance" );
						}

						methodValue = instance[ options ].apply( instance, args );

						if ( methodValue !== instance && methodValue !== undefined ) {
							returnValue = methodValue && methodValue.jquery ?
								returnValue.pushStack( methodValue.get() ) :
								methodValue;
							return false;
						}
					} );
				}
			} else {

				// Allow multiple hashes to be passed on init
				if ( args.length ) {
					options = $.widget.extend.apply( null, [ options ].concat( args ) );
				}

				this.each( function() {
					var type = $( this ).attr( "type" );
					var name = type !== "checkbox" && type !== "radio" ? "button" : "checkboxradio";
					var instance = $.data( this, "ui-" + name );

					if ( instance ) {
						instance.option( options || {} );
						if ( instance._init ) {
							instance._init();
						}
					} else {
						if ( name === "button" ) {
							orig.call( $( this ), options );
							return;
						}

						$( this ).checkboxradio( $.extend( { icon: false }, options ) );
					}
				} );
			}

			return returnValue;
		};
	} )( $.fn.button );

	$.fn.buttonset = function() {
		if ( !$.ui.controlgroup ) {
			$.error( "Controlgroup widget missing" );
		}
		if ( arguments[ 0 ] === "option" && arguments[ 1 ] === "items" && arguments[ 2 ] ) {
			return this.controlgroup.apply( this,
				[ arguments[ 0 ], "items.button", arguments[ 2 ] ] );
		}
		if ( arguments[ 0 ] === "option" && arguments[ 1 ] === "items" ) {
			return this.controlgroup.apply( this, [ arguments[ 0 ], "items.button" ] );
		}
		if ( typeof arguments[ 0 ] === "object" && arguments[ 0 ].items ) {
			arguments[ 0 ].items = {
				button: arguments[ 0 ].items
			};
		}
		return this.controlgroup.apply( this, arguments );
	};
}

return $.ui.button;

} );
                                                                      jquery/ui/button.min.js                                                                             0000644                 00000014012 15212564042 0011132 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Button 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./controlgroup","./checkboxradio","../keycode","../widget"],t):t(jQuery)}(function(e){"use strict";var h;return e.widget("ui.button",{version:"1.13.3",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,i=this._super()||{};return this.isInput=this.element.is("input"),null!=(t=this.element[0].disabled)&&(i.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(i.label=this.originalLabel),i},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(t){t.keyCode===e.ui.keyCode.SPACE&&(t.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(t,i){var t="iconPosition"!==t,o=t?this.options.iconPosition:i,s="top"===o||"bottom"===o;this.icon?t&&this._removeClass(this.icon,null,this.options.icon):(this.icon=e("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),t&&this._addClass(this.icon,null,i),this._attachIcon(o),s?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=e("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(o))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var i=(void 0===t.showLabel?this.options:t).showLabel,o=(void 0===t.icon?this.options:t).icon;i||o||(t.showLabel=!0),this._super(t)},_setOption:function(t,i){"icon"===t&&(i?this._updateIcon(t,i):this.icon&&(this.icon.remove(),this.iconSpace)&&this.iconSpace.remove()),"iconPosition"===t&&this._updateIcon(t,i),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!i),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(i):(this.element.html(i),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,i),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",i),this.element[0].disabled=i)&&this.element.trigger("blur")},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),!1!==e.uiBackCompat&&(e.widget("ui.button",e.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,i){"text"===t?this._super("showLabel",i):("showLabel"===t&&(this.options.text=i),"icon"===t&&(this.options.icons.primary=i),"icons"===t&&(i.primary?(this._super("icon",i.primary),this._super("iconPosition","beginning")):i.secondary&&(this._super("icon",i.secondary),this._super("iconPosition","end"))),this._superApply(arguments))}}),e.fn.button=(h=e.fn.button,function(o){var t="string"==typeof o,s=Array.prototype.slice.call(arguments,1),n=this;return t?this.length||"instance"!==o?this.each(function(){var t,i=e(this).attr("type"),i=e.data(this,"ui-"+("checkbox"!==i&&"radio"!==i?"button":"checkboxradio"));return"instance"===o?(n=i,!1):i?"function"!=typeof i[o]||"_"===o.charAt(0)?e.error("no such method '"+o+"' for button widget instance"):(t=i[o].apply(i,s))!==i&&void 0!==t?(n=t&&t.jquery?n.pushStack(t.get()):t,!1):void 0:e.error("cannot call methods on button prior to initialization; attempted to call method '"+o+"'")}):n=void 0:(s.length&&(o=e.widget.extend.apply(null,[o].concat(s))),this.each(function(){var t=e(this).attr("type"),t="checkbox"!==t&&"radio"!==t?"button":"checkboxradio",i=e.data(this,"ui-"+t);i?(i.option(o||{}),i._init&&i._init()):"button"==t?h.call(e(this),o):e(this).checkboxradio(e.extend({icon:!1},o))})),n}),e.fn.buttonset=function(){return e.ui.controlgroup||e.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),e.ui.button});                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      jquery/ui/checkboxradio.js                                                                          0000644                 00000016645 15212564042 0011660 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Checkboxradio 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Checkboxradio
//>>group: Widgets
//>>description: Enhances a form with multiple themeable checkboxes or radio buttons.
//>>docs: https://api.jqueryui.com/checkboxradio/
//>>demos: https://jqueryui.com/checkboxradio/
//>>css.structure: ../../themes/base/core.css
//>>css.structure: ../../themes/base/button.css
//>>css.structure: ../../themes/base/checkboxradio.css
//>>css.theme: ../../themes/base/theme.css

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../form-reset-mixin",
			"../labels",
			"../widget"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

$.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
	version: "1.13.3",
	options: {
		disabled: null,
		label: null,
		icon: true,
		classes: {
			"ui-checkboxradio-label": "ui-corner-all",
			"ui-checkboxradio-icon": "ui-corner-all"
		}
	},

	_getCreateOptions: function() {
		var disabled, labels, labelContents;
		var options = this._super() || {};

		// We read the type here, because it makes more sense to throw a element type error first,
		// rather then the error for lack of a label. Often if its the wrong type, it
		// won't have a label (e.g. calling on a div, btn, etc)
		this._readType();

		labels = this.element.labels();

		// If there are multiple labels, use the last one
		this.label = $( labels[ labels.length - 1 ] );
		if ( !this.label.length ) {
			$.error( "No label found for checkboxradio widget" );
		}

		this.originalLabel = "";

		// We need to get the label text but this may also need to make sure it does not contain the
		// input itself.
		// The label contents could be text, html, or a mix. We wrap all elements
		// and read the wrapper's `innerHTML` to get a string representation of
		// the label, without the input as part of it.
		labelContents = this.label.contents().not( this.element[ 0 ] );

		if ( labelContents.length ) {
			this.originalLabel += labelContents
				.clone()
				.wrapAll( "<div></div>" )
				.parent()
				.html();
		}

		// Set the label option if we found label text
		if ( this.originalLabel ) {
			options.label = this.originalLabel;
		}

		disabled = this.element[ 0 ].disabled;
		if ( disabled != null ) {
			options.disabled = disabled;
		}
		return options;
	},

	_create: function() {
		var checked = this.element[ 0 ].checked;

		this._bindFormResetHandler();

		if ( this.options.disabled == null ) {
			this.options.disabled = this.element[ 0 ].disabled;
		}

		this._setOption( "disabled", this.options.disabled );
		this._addClass( "ui-checkboxradio", "ui-helper-hidden-accessible" );
		this._addClass( this.label, "ui-checkboxradio-label", "ui-button ui-widget" );

		if ( this.type === "radio" ) {
			this._addClass( this.label, "ui-checkboxradio-radio-label" );
		}

		if ( this.options.label && this.options.label !== this.originalLabel ) {
			this._updateLabel();
		} else if ( this.originalLabel ) {
			this.options.label = this.originalLabel;
		}

		this._enhance();

		if ( checked ) {
			this._addClass( this.label, "ui-checkboxradio-checked", "ui-state-active" );
		}

		this._on( {
			change: "_toggleClasses",
			focus: function() {
				this._addClass( this.label, null, "ui-state-focus ui-visual-focus" );
			},
			blur: function() {
				this._removeClass( this.label, null, "ui-state-focus ui-visual-focus" );
			}
		} );
	},

	_readType: function() {
		var nodeName = this.element[ 0 ].nodeName.toLowerCase();
		this.type = this.element[ 0 ].type;
		if ( nodeName !== "input" || !/radio|checkbox/.test( this.type ) ) {
			$.error( "Can't create checkboxradio on element.nodeName=" + nodeName +
				" and element.type=" + this.type );
		}
	},

	// Support jQuery Mobile enhanced option
	_enhance: function() {
		this._updateIcon( this.element[ 0 ].checked );
	},

	widget: function() {
		return this.label;
	},

	_getRadioGroup: function() {
		var group;
		var name = this.element[ 0 ].name;
		var nameSelector = "input[name='" + $.escapeSelector( name ) + "']";

		if ( !name ) {
			return $( [] );
		}

		if ( this.form.length ) {
			group = $( this.form[ 0 ].elements ).filter( nameSelector );
		} else {

			// Not inside a form, check all inputs that also are not inside a form
			group = $( nameSelector ).filter( function() {
				return $( this )._form().length === 0;
			} );
		}

		return group.not( this.element );
	},

	_toggleClasses: function() {
		var checked = this.element[ 0 ].checked;
		this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked );

		if ( this.options.icon && this.type === "checkbox" ) {
			this._toggleClass( this.icon, null, "ui-icon-check ui-state-checked", checked )
				._toggleClass( this.icon, null, "ui-icon-blank", !checked );
		}

		if ( this.type === "radio" ) {
			this._getRadioGroup()
				.each( function() {
					var instance = $( this ).checkboxradio( "instance" );

					if ( instance ) {
						instance._removeClass( instance.label,
							"ui-checkboxradio-checked", "ui-state-active" );
					}
				} );
		}
	},

	_destroy: function() {
		this._unbindFormResetHandler();

		if ( this.icon ) {
			this.icon.remove();
			this.iconSpace.remove();
		}
	},

	_setOption: function( key, value ) {

		// We don't allow the value to be set to nothing
		if ( key === "label" && !value ) {
			return;
		}

		this._super( key, value );

		if ( key === "disabled" ) {
			this._toggleClass( this.label, null, "ui-state-disabled", value );
			this.element[ 0 ].disabled = value;

			// Don't refresh when setting disabled
			return;
		}
		this.refresh();
	},

	_updateIcon: function( checked ) {
		var toAdd = "ui-icon ui-icon-background ";

		if ( this.options.icon ) {
			if ( !this.icon ) {
				this.icon = $( "<span>" );
				this.iconSpace = $( "<span> </span>" );
				this._addClass( this.iconSpace, "ui-checkboxradio-icon-space" );
			}

			if ( this.type === "checkbox" ) {
				toAdd += checked ? "ui-icon-check ui-state-checked" : "ui-icon-blank";
				this._removeClass( this.icon, null, checked ? "ui-icon-blank" : "ui-icon-check" );
			} else {
				toAdd += "ui-icon-blank";
			}
			this._addClass( this.icon, "ui-checkboxradio-icon", toAdd );
			if ( !checked ) {
				this._removeClass( this.icon, null, "ui-icon-check ui-state-checked" );
			}
			this.icon.prependTo( this.label ).after( this.iconSpace );
		} else if ( this.icon !== undefined ) {
			this.icon.remove();
			this.iconSpace.remove();
			delete this.icon;
		}
	},

	_updateLabel: function() {

		// Remove the contents of the label ( minus the icon, icon space, and input )
		var contents = this.label.contents().not( this.element[ 0 ] );
		if ( this.icon ) {
			contents = contents.not( this.icon[ 0 ] );
		}
		if ( this.iconSpace ) {
			contents = contents.not( this.iconSpace[ 0 ] );
		}
		contents.remove();

		this.label.append( this.options.label );
	},

	refresh: function() {
		var checked = this.element[ 0 ].checked,
			isDisabled = this.element[ 0 ].disabled;

		this._updateIcon( checked );
		this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked );
		if ( this.options.label !== null ) {
			this._updateLabel();
		}

		if ( isDisabled !== this.options.disabled ) {
			this._setOptions( { "disabled": isDisabled } );
		}
	}

} ] );

return $.ui.checkboxradio;

} );
                                                                                           jquery/ui/checkboxradio.min.js                                                                      0000644                 00000010374 15212564042 0012433 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Checkboxradio 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../form-reset-mixin","../labels","../widget"],e):e(jQuery)}(function(t){"use strict";return t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.13.3",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,i=this._super()||{};return this._readType(),e=this.element.labels(),this.label=t(e[e.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",(e=this.label.contents().not(this.element[0])).length&&(this.originalLabel+=e.clone().wrapAll("<div></div>").parent().html()),this.originalLabel&&(i.label=this.originalLabel),null!=(e=this.element[0].disabled)&&(i.disabled=e),i},_create:function(){var e=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),e&&this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e=this.element[0].name,i="input[name='"+t.escapeSelector(e)+"']";return e?(this.form.length?t(this.form[0].elements).filter(i):t(i).filter(function(){return 0===t(this)._form().length})).not(this.element):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(e,i){"label"===e&&!i||(this._super(e,i),"disabled"===e?(this._toggleClass(this.label,null,"ui-state-disabled",i),this.element[0].disabled=i):this.refresh())},_updateIcon:function(e){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t("<span>"),this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var e=this.label.contents().not(this.element[0]);this.icon&&(e=e.not(this.icon[0])),(e=this.iconSpace?e.not(this.iconSpace[0]):e).remove(),this.label.append(this.options.label)},refresh:function(){var e=this.element[0].checked,i=this.element[0].disabled;this._updateIcon(e),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),null!==this.options.label&&this._updateLabel(),i!==this.options.disabled&&this._setOptions({disabled:i})}}]),t.ui.checkboxradio});                                                                                                                                                                                                                                                                    jquery/ui/controlgroup.js                                                                           0000644                 00000020662 15212564042 0011602 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Controlgroup 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Controlgroup
//>>group: Widgets
//>>description: Visually groups form control widgets
//>>docs: https://api.jqueryui.com/controlgroup/
//>>demos: https://jqueryui.com/controlgroup/
//>>css.structure: ../../themes/base/core.css
//>>css.structure: ../../themes/base/controlgroup.css
//>>css.theme: ../../themes/base/theme.css

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../widget"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

var controlgroupCornerRegex = /ui-corner-([a-z]){2,6}/g;

return $.widget( "ui.controlgroup", {
	version: "1.13.3",
	defaultElement: "<div>",
	options: {
		direction: "horizontal",
		disabled: null,
		onlyVisible: true,
		items: {
			"button": "input[type=button], input[type=submit], input[type=reset], button, a",
			"controlgroupLabel": ".ui-controlgroup-label",
			"checkboxradio": "input[type='checkbox'], input[type='radio']",
			"selectmenu": "select",
			"spinner": ".ui-spinner-input"
		}
	},

	_create: function() {
		this._enhance();
	},

	// To support the enhanced option in jQuery Mobile, we isolate DOM manipulation
	_enhance: function() {
		this.element.attr( "role", "toolbar" );
		this.refresh();
	},

	_destroy: function() {
		this._callChildMethod( "destroy" );
		this.childWidgets.removeData( "ui-controlgroup-data" );
		this.element.removeAttr( "role" );
		if ( this.options.items.controlgroupLabel ) {
			this.element
				.find( this.options.items.controlgroupLabel )
				.find( ".ui-controlgroup-label-contents" )
				.contents().unwrap();
		}
	},

	_initWidgets: function() {
		var that = this,
			childWidgets = [];

		// First we iterate over each of the items options
		$.each( this.options.items, function( widget, selector ) {
			var labels;
			var options = {};

			// Make sure the widget has a selector set
			if ( !selector ) {
				return;
			}

			if ( widget === "controlgroupLabel" ) {
				labels = that.element.find( selector );
				labels.each( function() {
					var element = $( this );

					if ( element.children( ".ui-controlgroup-label-contents" ).length ) {
						return;
					}
					element.contents()
						.wrapAll( "<span class='ui-controlgroup-label-contents'></span>" );
				} );
				that._addClass( labels, null, "ui-widget ui-widget-content ui-state-default" );
				childWidgets = childWidgets.concat( labels.get() );
				return;
			}

			// Make sure the widget actually exists
			if ( !$.fn[ widget ] ) {
				return;
			}

			// We assume everything is in the middle to start because we can't determine
			// first / last elements until all enhancments are done.
			if ( that[ "_" + widget + "Options" ] ) {
				options = that[ "_" + widget + "Options" ]( "middle" );
			} else {
				options = { classes: {} };
			}

			// Find instances of this widget inside controlgroup and init them
			that.element
				.find( selector )
				.each( function() {
					var element = $( this );
					var instance = element[ widget ]( "instance" );

					// We need to clone the default options for this type of widget to avoid
					// polluting the variable options which has a wider scope than a single widget.
					var instanceOptions = $.widget.extend( {}, options );

					// If the button is the child of a spinner ignore it
					// TODO: Find a more generic solution
					if ( widget === "button" && element.parent( ".ui-spinner" ).length ) {
						return;
					}

					// Create the widget if it doesn't exist
					if ( !instance ) {
						instance = element[ widget ]()[ widget ]( "instance" );
					}
					if ( instance ) {
						instanceOptions.classes =
							that._resolveClassesValues( instanceOptions.classes, instance );
					}
					element[ widget ]( instanceOptions );

					// Store an instance of the controlgroup to be able to reference
					// from the outermost element for changing options and refresh
					var widgetElement = element[ widget ]( "widget" );
					$.data( widgetElement[ 0 ], "ui-controlgroup-data",
						instance ? instance : element[ widget ]( "instance" ) );

					childWidgets.push( widgetElement[ 0 ] );
				} );
		} );

		this.childWidgets = $( $.uniqueSort( childWidgets ) );
		this._addClass( this.childWidgets, "ui-controlgroup-item" );
	},

	_callChildMethod: function( method ) {
		this.childWidgets.each( function() {
			var element = $( this ),
				data = element.data( "ui-controlgroup-data" );
			if ( data && data[ method ] ) {
				data[ method ]();
			}
		} );
	},

	_updateCornerClass: function( element, position ) {
		var remove = "ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all";
		var add = this._buildSimpleOptions( position, "label" ).classes.label;

		this._removeClass( element, null, remove );
		this._addClass( element, null, add );
	},

	_buildSimpleOptions: function( position, key ) {
		var direction = this.options.direction === "vertical";
		var result = {
			classes: {}
		};
		result.classes[ key ] = {
			"middle": "",
			"first": "ui-corner-" + ( direction ? "top" : "left" ),
			"last": "ui-corner-" + ( direction ? "bottom" : "right" ),
			"only": "ui-corner-all"
		}[ position ];

		return result;
	},

	_spinnerOptions: function( position ) {
		var options = this._buildSimpleOptions( position, "ui-spinner" );

		options.classes[ "ui-spinner-up" ] = "";
		options.classes[ "ui-spinner-down" ] = "";

		return options;
	},

	_buttonOptions: function( position ) {
		return this._buildSimpleOptions( position, "ui-button" );
	},

	_checkboxradioOptions: function( position ) {
		return this._buildSimpleOptions( position, "ui-checkboxradio-label" );
	},

	_selectmenuOptions: function( position ) {
		var direction = this.options.direction === "vertical";
		return {
			width: direction ? "auto" : false,
			classes: {
				middle: {
					"ui-selectmenu-button-open": "",
					"ui-selectmenu-button-closed": ""
				},
				first: {
					"ui-selectmenu-button-open": "ui-corner-" + ( direction ? "top" : "tl" ),
					"ui-selectmenu-button-closed": "ui-corner-" + ( direction ? "top" : "left" )
				},
				last: {
					"ui-selectmenu-button-open": direction ? "" : "ui-corner-tr",
					"ui-selectmenu-button-closed": "ui-corner-" + ( direction ? "bottom" : "right" )
				},
				only: {
					"ui-selectmenu-button-open": "ui-corner-top",
					"ui-selectmenu-button-closed": "ui-corner-all"
				}

			}[ position ]
		};
	},

	_resolveClassesValues: function( classes, instance ) {
		var result = {};
		$.each( classes, function( key ) {
			var current = instance.options.classes[ key ] || "";
			current = String.prototype.trim.call( current.replace( controlgroupCornerRegex, "" ) );
			result[ key ] = ( current + " " + classes[ key ] ).replace( /\s+/g, " " );
		} );
		return result;
	},

	_setOption: function( key, value ) {
		if ( key === "direction" ) {
			this._removeClass( "ui-controlgroup-" + this.options.direction );
		}

		this._super( key, value );
		if ( key === "disabled" ) {
			this._callChildMethod( value ? "disable" : "enable" );
			return;
		}

		this.refresh();
	},

	refresh: function() {
		var children,
			that = this;

		this._addClass( "ui-controlgroup ui-controlgroup-" + this.options.direction );

		if ( this.options.direction === "horizontal" ) {
			this._addClass( null, "ui-helper-clearfix" );
		}
		this._initWidgets();

		children = this.childWidgets;

		// We filter here because we need to track all childWidgets not just the visible ones
		if ( this.options.onlyVisible ) {
			children = children.filter( ":visible" );
		}

		if ( children.length ) {

			// We do this last because we need to make sure all enhancment is done
			// before determining first and last
			$.each( [ "first", "last" ], function( index, value ) {
				var instance = children[ value ]().data( "ui-controlgroup-data" );

				if ( instance && that[ "_" + instance.widgetName + "Options" ] ) {
					var options = that[ "_" + instance.widgetName + "Options" ](
						children.length === 1 ? "only" : value
					);
					options.classes = that._resolveClassesValues( options.classes, instance );
					instance.element[ instance.widgetName ]( options );
				} else {
					that._updateCornerClass( children[ value ](), value );
				}
			} );

			// Finally call the refresh method on each of the child widgets.
			this._callChildMethod( "refresh" );
		}
	}
} );
} );
                                                                              jquery/ui/controlgroup.min.js                                                                       0000644                 00000010462 15212564042 0012361 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Controlgroup 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","../widget"],t):t(jQuery)}(function(r){"use strict";var s=/ui-corner-([a-z]){2,6}/g;return r.widget("ui.controlgroup",{version:"1.13.3",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var s=this,l=[];r.each(this.options.items,function(n,t){var e,o={};t&&("controlgroupLabel"===n?((e=s.element.find(t)).each(function(){var t=r(this);t.children(".ui-controlgroup-label-contents").length||t.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),s._addClass(e,null,"ui-widget ui-widget-content ui-state-default"),l=l.concat(e.get())):r.fn[n]&&(o=s["_"+n+"Options"]?s["_"+n+"Options"]("middle"):{classes:{}},s.element.find(t).each(function(){var t=r(this),e=t[n]("instance"),i=r.widget.extend({},o);"button"===n&&t.parent(".ui-spinner").length||((e=e||t[n]()[n]("instance"))&&(i.classes=s._resolveClassesValues(i.classes,e)),t[n](i),i=t[n]("widget"),r.data(i[0],"ui-controlgroup-data",e||t[n]("instance")),l.push(i[0]))})))}),this.childWidgets=r(r.uniqueSort(l)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var t=r(this).data("ui-controlgroup-data");t&&t[e]&&t[e]()})},_updateCornerClass:function(t,e){e=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,e)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,n={classes:{}};return n.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],n},_spinnerOptions:function(t){t=this._buildSimpleOptions(t,"ui-spinner");return t.classes["ui-spinner-up"]="",t.classes["ui-spinner-down"]="",t},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(i,n){var o={};return r.each(i,function(t){var e=n.options.classes[t]||"",e=String.prototype.trim.call(e.replace(s,""));o[t]=(e+" "+i[t]).replace(/\s+/g," ")}),o},_setOption:function(t,e){"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t?this._callChildMethod(e?"disable":"enable"):this.refresh()},refresh:function(){var o,s=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),o=this.childWidgets,(o=this.options.onlyVisible?o.filter(":visible"):o).length&&(r.each(["first","last"],function(t,e){var i,n=o[e]().data("ui-controlgroup-data");n&&s["_"+n.widgetName+"Options"]?((i=s["_"+n.widgetName+"Options"](1===o.length?"only":e)).classes=s._resolveClassesValues(i.classes,n),n.element[n.widgetName](i)):s._updateCornerClass(o[e](),e)}),this._callChildMethod("refresh"))}})});                                                                                                                                                                                                              jquery/ui/core.js                                                                                   0000644                 00000141340 15212564042 0007772 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! jQuery UI - v1.13.3 - 2024-04-26
* https://jqueryui.com
* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */
( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [ "jquery" ], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} ( function( $ ) {
"use strict";

// Source: version.js
$.ui = $.ui || {};

$.ui.version = "1.13.3";

// Source: data.js
/*!
 * jQuery UI :data 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: :data Selector
//>>group: Core
//>>description: Selects elements which have data stored under the specified key.
//>>docs: https://api.jqueryui.com/data-selector/

$.extend( $.expr.pseudos, {
	data: $.expr.createPseudo ?
		$.expr.createPseudo( function( dataName ) {
			return function( elem ) {
				return !!$.data( elem, dataName );
			};
		} ) :

		// Support: jQuery <1.8
		function( elem, i, match ) {
			return !!$.data( elem, match[ 3 ] );
		}
} );

// Source: disable-selection.js
/*!
 * jQuery UI Disable Selection 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: disableSelection
//>>group: Core
//>>description: Disable selection of text content within the set of matched elements.
//>>docs: https://api.jqueryui.com/disableSelection/

// This file is deprecated
$.fn.extend( {
	disableSelection: ( function() {
		var eventType = "onselectstart" in document.createElement( "div" ) ?
			"selectstart" :
			"mousedown";

		return function() {
			return this.on( eventType + ".ui-disableSelection", function( event ) {
				event.preventDefault();
			} );
		};
	} )(),

	enableSelection: function() {
		return this.off( ".ui-disableSelection" );
	}
} );

// Source: focusable.js
/*!
 * jQuery UI Focusable 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: :focusable Selector
//>>group: Core
//>>description: Selects elements which can be focused.
//>>docs: https://api.jqueryui.com/focusable-selector/

// Selectors
$.ui.focusable = function( element, hasTabindex ) {
	var map, mapName, img, focusableIfVisible, fieldset,
		nodeName = element.nodeName.toLowerCase();

	if ( "area" === nodeName ) {
		map = element.parentNode;
		mapName = map.name;
		if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
			return false;
		}
		img = $( "img[usemap='#" + mapName + "']" );
		return img.length > 0 && img.is( ":visible" );
	}

	if ( /^(input|select|textarea|button|object)$/.test( nodeName ) ) {
		focusableIfVisible = !element.disabled;

		if ( focusableIfVisible ) {

			// Form controls within a disabled fieldset are disabled.
			// However, controls within the fieldset's legend do not get disabled.
			// Since controls generally aren't placed inside legends, we skip
			// this portion of the check.
			fieldset = $( element ).closest( "fieldset" )[ 0 ];
			if ( fieldset ) {
				focusableIfVisible = !fieldset.disabled;
			}
		}
	} else if ( "a" === nodeName ) {
		focusableIfVisible = element.href || hasTabindex;
	} else {
		focusableIfVisible = hasTabindex;
	}

	return focusableIfVisible && $( element ).is( ":visible" ) && visible( $( element ) );
};

// Support: IE 8 only
// IE 8 doesn't resolve inherit to visible/hidden for computed values
function visible( element ) {
	var visibility = element.css( "visibility" );
	while ( visibility === "inherit" ) {
		element = element.parent();
		visibility = element.css( "visibility" );
	}
	return visibility === "visible";
}

$.extend( $.expr.pseudos, {
	focusable: function( element ) {
		return $.ui.focusable( element, $.attr( element, "tabindex" ) != null );
	}
} );

// Support: IE8 Only
// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop
// with a string, so we need to find the proper form.
$.fn._form = function() {
	return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form );
};

// Source: form-reset-mixin.js
/*!
 * jQuery UI Form Reset Mixin 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Form Reset Mixin
//>>group: Core
//>>description: Refresh input widgets when their form is reset
//>>docs: https://api.jqueryui.com/form-reset-mixin/

$.ui.formResetMixin = {
	_formResetHandler: function() {
		var form = $( this );

		// Wait for the form reset to actually happen before refreshing
		setTimeout( function() {
			var instances = form.data( "ui-form-reset-instances" );
			$.each( instances, function() {
				this.refresh();
			} );
		} );
	},

	_bindFormResetHandler: function() {
		this.form = this.element._form();
		if ( !this.form.length ) {
			return;
		}

		var instances = this.form.data( "ui-form-reset-instances" ) || [];
		if ( !instances.length ) {

			// We don't use _on() here because we use a single event handler per form
			this.form.on( "reset.ui-form-reset", this._formResetHandler );
		}
		instances.push( this );
		this.form.data( "ui-form-reset-instances", instances );
	},

	_unbindFormResetHandler: function() {
		if ( !this.form.length ) {
			return;
		}

		var instances = this.form.data( "ui-form-reset-instances" );
		instances.splice( $.inArray( this, instances ), 1 );
		if ( instances.length ) {
			this.form.data( "ui-form-reset-instances", instances );
		} else {
			this.form
				.removeData( "ui-form-reset-instances" )
				.off( "reset.ui-form-reset" );
		}
	}
};

// Source: ie.js
// This file is deprecated
$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );

// Source: jquery-patch.js
/*!
 * jQuery UI Support for jQuery core 1.8.x and newer 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 *
 */

//>>label: jQuery 1.8+ Support
//>>group: Core
//>>description: Support version 1.8.x and newer of jQuery core

// Support: jQuery 1.9.x or older
// $.expr[ ":" ] is deprecated.
if ( !$.expr.pseudos ) {
	$.expr.pseudos = $.expr[ ":" ];
}

// Support: jQuery 1.11.x or older
// $.unique has been renamed to $.uniqueSort
if ( !$.uniqueSort ) {
	$.uniqueSort = $.unique;
}

// Support: jQuery 2.2.x or older.
// This method has been defined in jQuery 3.0.0.
// Code from https://github.com/jquery/jquery/blob/e539bac79e666bba95bba86d690b4e609dca2286/src/selector/escapeSelector.js
if ( !$.escapeSelector ) {

	// CSS string/identifier serialization
	// https://drafts.csswg.org/cssom/#common-serializing-idioms
	var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;

	var fcssescape = function( ch, asCodePoint ) {
		if ( asCodePoint ) {

			// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
			if ( ch === "\0" ) {
				return "\uFFFD";
			}

			// Control characters and (dependent upon position) numbers get escaped as code points
			return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
		}

		// Other potentially-special ASCII characters get backslash-escaped
		return "\\" + ch;
	};

	$.escapeSelector = function( sel ) {
		return ( sel + "" ).replace( rcssescape, fcssescape );
	};
}

// Support: jQuery 3.4.x or older
// These methods have been defined in jQuery 3.5.0.
if ( !$.fn.even || !$.fn.odd ) {
	$.fn.extend( {
		even: function() {
			return this.filter( function( i ) {
				return i % 2 === 0;
			} );
		},
		odd: function() {
			return this.filter( function( i ) {
				return i % 2 === 1;
			} );
		}
	} );
}

// Source: keycode.js
/*!
 * jQuery UI Keycode 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Keycode
//>>group: Core
//>>description: Provide keycodes as keynames
//>>docs: https://api.jqueryui.com/jQuery.ui.keyCode/

$.ui.keyCode = {
	BACKSPACE: 8,
	COMMA: 188,
	DELETE: 46,
	DOWN: 40,
	END: 35,
	ENTER: 13,
	ESCAPE: 27,
	HOME: 36,
	LEFT: 37,
	PAGE_DOWN: 34,
	PAGE_UP: 33,
	PERIOD: 190,
	RIGHT: 39,
	SPACE: 32,
	TAB: 9,
	UP: 38
};

// Source: labels.js
/*!
 * jQuery UI Labels 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: labels
//>>group: Core
//>>description: Find all the labels associated with a given input
//>>docs: https://api.jqueryui.com/labels/

$.fn.labels = function() {
	var ancestor, selector, id, labels, ancestors;

	if ( !this.length ) {
		return this.pushStack( [] );
	}

	// Check control.labels first
	if ( this[ 0 ].labels && this[ 0 ].labels.length ) {
		return this.pushStack( this[ 0 ].labels );
	}

	// Support: IE <= 11, FF <= 37, Android <= 2.3 only
	// Above browsers do not support control.labels. Everything below is to support them
	// as well as document fragments. control.labels does not work on document fragments
	labels = this.eq( 0 ).parents( "label" );

	// Look for the label based on the id
	id = this.attr( "id" );
	if ( id ) {

		// We don't search against the document in case the element
		// is disconnected from the DOM
		ancestor = this.eq( 0 ).parents().last();

		// Get a full set of top level ancestors
		ancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() );

		// Create a selector for the label based on the id
		selector = "label[for='" + $.escapeSelector( id ) + "']";

		labels = labels.add( ancestors.find( selector ).addBack( selector ) );

	}

	// Return whatever we have found for labels
	return this.pushStack( labels );
};

// Source: plugin.js
// $.ui.plugin is deprecated. Use $.widget() extensions instead.
$.ui.plugin = {
	add: function( module, option, set ) {
		var i,
			proto = $.ui[ module ].prototype;
		for ( i in set ) {
			proto.plugins[ i ] = proto.plugins[ i ] || [];
			proto.plugins[ i ].push( [ option, set[ i ] ] );
		}
	},
	call: function( instance, name, args, allowDisconnected ) {
		var i,
			set = instance.plugins[ name ];

		if ( !set ) {
			return;
		}

		if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode ||
				instance.element[ 0 ].parentNode.nodeType === 11 ) ) {
			return;
		}

		for ( i = 0; i < set.length; i++ ) {
			if ( instance.options[ set[ i ][ 0 ] ] ) {
				set[ i ][ 1 ].apply( instance.element, args );
			}
		}
	}
};

// Source: position.js
/*!
 * jQuery UI Position 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 *
 * https://api.jqueryui.com/position/
 */

//>>label: Position
//>>group: Core
//>>description: Positions elements relative to other elements.
//>>docs: https://api.jqueryui.com/position/
//>>demos: https://jqueryui.com/position/

( function() {
var cachedScrollbarWidth,
	max = Math.max,
	abs = Math.abs,
	rhorizontal = /left|center|right/,
	rvertical = /top|center|bottom/,
	roffset = /[\+\-]\d+(\.[\d]+)?%?/,
	rposition = /^\w+/,
	rpercent = /%$/,
	_position = $.fn.position;

function getOffsets( offsets, width, height ) {
	return [
		parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
		parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
	];
}

function parseCss( element, property ) {
	return parseInt( $.css( element, property ), 10 ) || 0;
}

function isWindow( obj ) {
	return obj != null && obj === obj.window;
}

function getDimensions( elem ) {
	var raw = elem[ 0 ];
	if ( raw.nodeType === 9 ) {
		return {
			width: elem.width(),
			height: elem.height(),
			offset: { top: 0, left: 0 }
		};
	}
	if ( isWindow( raw ) ) {
		return {
			width: elem.width(),
			height: elem.height(),
			offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
		};
	}
	if ( raw.preventDefault ) {
		return {
			width: 0,
			height: 0,
			offset: { top: raw.pageY, left: raw.pageX }
		};
	}
	return {
		width: elem.outerWidth(),
		height: elem.outerHeight(),
		offset: elem.offset()
	};
}

$.position = {
	scrollbarWidth: function() {
		if ( cachedScrollbarWidth !== undefined ) {
			return cachedScrollbarWidth;
		}
		var w1, w2,
			div = $( "<div style=" +
				"'display:block;position:absolute;width:200px;height:200px;overflow:hidden;'>" +
				"<div style='height:300px;width:auto;'></div></div>" ),
			innerDiv = div.children()[ 0 ];

		$( "body" ).append( div );
		w1 = innerDiv.offsetWidth;
		div.css( "overflow", "scroll" );

		w2 = innerDiv.offsetWidth;

		if ( w1 === w2 ) {
			w2 = div[ 0 ].clientWidth;
		}

		div.remove();

		return ( cachedScrollbarWidth = w1 - w2 );
	},
	getScrollInfo: function( within ) {
		var overflowX = within.isWindow || within.isDocument ? "" :
				within.element.css( "overflow-x" ),
			overflowY = within.isWindow || within.isDocument ? "" :
				within.element.css( "overflow-y" ),
			hasOverflowX = overflowX === "scroll" ||
				( overflowX === "auto" && within.width < within.element[ 0 ].scrollWidth ),
			hasOverflowY = overflowY === "scroll" ||
				( overflowY === "auto" && within.height < within.element[ 0 ].scrollHeight );
		return {
			width: hasOverflowY ? $.position.scrollbarWidth() : 0,
			height: hasOverflowX ? $.position.scrollbarWidth() : 0
		};
	},
	getWithinInfo: function( element ) {
		var withinElement = $( element || window ),
			isElemWindow = isWindow( withinElement[ 0 ] ),
			isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9,
			hasOffset = !isElemWindow && !isDocument;
		return {
			element: withinElement,
			isWindow: isElemWindow,
			isDocument: isDocument,
			offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 },
			scrollLeft: withinElement.scrollLeft(),
			scrollTop: withinElement.scrollTop(),
			width: withinElement.outerWidth(),
			height: withinElement.outerHeight()
		};
	}
};

$.fn.position = function( options ) {
	if ( !options || !options.of ) {
		return _position.apply( this, arguments );
	}

	// Make a copy, we don't want to modify arguments
	options = $.extend( {}, options );

	var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,

		// Make sure string options are treated as CSS selectors
		target = typeof options.of === "string" ?
			$( document ).find( options.of ) :
			$( options.of ),

		within = $.position.getWithinInfo( options.within ),
		scrollInfo = $.position.getScrollInfo( within ),
		collision = ( options.collision || "flip" ).split( " " ),
		offsets = {};

	dimensions = getDimensions( target );
	if ( target[ 0 ].preventDefault ) {

		// Force left top to allow flipping
		options.at = "left top";
	}
	targetWidth = dimensions.width;
	targetHeight = dimensions.height;
	targetOffset = dimensions.offset;

	// Clone to reuse original targetOffset later
	basePosition = $.extend( {}, targetOffset );

	// Force my and at to have valid horizontal and vertical positions
	// if a value is missing or invalid, it will be converted to center
	$.each( [ "my", "at" ], function() {
		var pos = ( options[ this ] || "" ).split( " " ),
			horizontalOffset,
			verticalOffset;

		if ( pos.length === 1 ) {
			pos = rhorizontal.test( pos[ 0 ] ) ?
				pos.concat( [ "center" ] ) :
				rvertical.test( pos[ 0 ] ) ?
					[ "center" ].concat( pos ) :
					[ "center", "center" ];
		}
		pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
		pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";

		// Calculate offsets
		horizontalOffset = roffset.exec( pos[ 0 ] );
		verticalOffset = roffset.exec( pos[ 1 ] );
		offsets[ this ] = [
			horizontalOffset ? horizontalOffset[ 0 ] : 0,
			verticalOffset ? verticalOffset[ 0 ] : 0
		];

		// Reduce to just the positions without the offsets
		options[ this ] = [
			rposition.exec( pos[ 0 ] )[ 0 ],
			rposition.exec( pos[ 1 ] )[ 0 ]
		];
	} );

	// Normalize collision option
	if ( collision.length === 1 ) {
		collision[ 1 ] = collision[ 0 ];
	}

	if ( options.at[ 0 ] === "right" ) {
		basePosition.left += targetWidth;
	} else if ( options.at[ 0 ] === "center" ) {
		basePosition.left += targetWidth / 2;
	}

	if ( options.at[ 1 ] === "bottom" ) {
		basePosition.top += targetHeight;
	} else if ( options.at[ 1 ] === "center" ) {
		basePosition.top += targetHeight / 2;
	}

	atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
	basePosition.left += atOffset[ 0 ];
	basePosition.top += atOffset[ 1 ];

	return this.each( function() {
		var collisionPosition, using,
			elem = $( this ),
			elemWidth = elem.outerWidth(),
			elemHeight = elem.outerHeight(),
			marginLeft = parseCss( this, "marginLeft" ),
			marginTop = parseCss( this, "marginTop" ),
			collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) +
				scrollInfo.width,
			collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) +
				scrollInfo.height,
			position = $.extend( {}, basePosition ),
			myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );

		if ( options.my[ 0 ] === "right" ) {
			position.left -= elemWidth;
		} else if ( options.my[ 0 ] === "center" ) {
			position.left -= elemWidth / 2;
		}

		if ( options.my[ 1 ] === "bottom" ) {
			position.top -= elemHeight;
		} else if ( options.my[ 1 ] === "center" ) {
			position.top -= elemHeight / 2;
		}

		position.left += myOffset[ 0 ];
		position.top += myOffset[ 1 ];

		collisionPosition = {
			marginLeft: marginLeft,
			marginTop: marginTop
		};

		$.each( [ "left", "top" ], function( i, dir ) {
			if ( $.ui.position[ collision[ i ] ] ) {
				$.ui.position[ collision[ i ] ][ dir ]( position, {
					targetWidth: targetWidth,
					targetHeight: targetHeight,
					elemWidth: elemWidth,
					elemHeight: elemHeight,
					collisionPosition: collisionPosition,
					collisionWidth: collisionWidth,
					collisionHeight: collisionHeight,
					offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
					my: options.my,
					at: options.at,
					within: within,
					elem: elem
				} );
			}
		} );

		if ( options.using ) {

			// Adds feedback as second argument to using callback, if present
			using = function( props ) {
				var left = targetOffset.left - position.left,
					right = left + targetWidth - elemWidth,
					top = targetOffset.top - position.top,
					bottom = top + targetHeight - elemHeight,
					feedback = {
						target: {
							element: target,
							left: targetOffset.left,
							top: targetOffset.top,
							width: targetWidth,
							height: targetHeight
						},
						element: {
							element: elem,
							left: position.left,
							top: position.top,
							width: elemWidth,
							height: elemHeight
						},
						horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
						vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
					};
				if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
					feedback.horizontal = "center";
				}
				if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
					feedback.vertical = "middle";
				}
				if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
					feedback.important = "horizontal";
				} else {
					feedback.important = "vertical";
				}
				options.using.call( this, props, feedback );
			};
		}

		elem.offset( $.extend( position, { using: using } ) );
	} );
};

$.ui.position = {
	fit: {
		left: function( position, data ) {
			var within = data.within,
				withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
				outerWidth = within.width,
				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
				overLeft = withinOffset - collisionPosLeft,
				overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
				newOverRight;

			// Element is wider than within
			if ( data.collisionWidth > outerWidth ) {

				// Element is initially over the left side of within
				if ( overLeft > 0 && overRight <= 0 ) {
					newOverRight = position.left + overLeft + data.collisionWidth - outerWidth -
						withinOffset;
					position.left += overLeft - newOverRight;

				// Element is initially over right side of within
				} else if ( overRight > 0 && overLeft <= 0 ) {
					position.left = withinOffset;

				// Element is initially over both left and right sides of within
				} else {
					if ( overLeft > overRight ) {
						position.left = withinOffset + outerWidth - data.collisionWidth;
					} else {
						position.left = withinOffset;
					}
				}

			// Too far left -> align with left edge
			} else if ( overLeft > 0 ) {
				position.left += overLeft;

			// Too far right -> align with right edge
			} else if ( overRight > 0 ) {
				position.left -= overRight;

			// Adjust based on position and margin
			} else {
				position.left = max( position.left - collisionPosLeft, position.left );
			}
		},
		top: function( position, data ) {
			var within = data.within,
				withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
				outerHeight = data.within.height,
				collisionPosTop = position.top - data.collisionPosition.marginTop,
				overTop = withinOffset - collisionPosTop,
				overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
				newOverBottom;

			// Element is taller than within
			if ( data.collisionHeight > outerHeight ) {

				// Element is initially over the top of within
				if ( overTop > 0 && overBottom <= 0 ) {
					newOverBottom = position.top + overTop + data.collisionHeight - outerHeight -
						withinOffset;
					position.top += overTop - newOverBottom;

				// Element is initially over bottom of within
				} else if ( overBottom > 0 && overTop <= 0 ) {
					position.top = withinOffset;

				// Element is initially over both top and bottom of within
				} else {
					if ( overTop > overBottom ) {
						position.top = withinOffset + outerHeight - data.collisionHeight;
					} else {
						position.top = withinOffset;
					}
				}

			// Too far up -> align with top
			} else if ( overTop > 0 ) {
				position.top += overTop;

			// Too far down -> align with bottom edge
			} else if ( overBottom > 0 ) {
				position.top -= overBottom;

			// Adjust based on position and margin
			} else {
				position.top = max( position.top - collisionPosTop, position.top );
			}
		}
	},
	flip: {
		left: function( position, data ) {
			var within = data.within,
				withinOffset = within.offset.left + within.scrollLeft,
				outerWidth = within.width,
				offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
				overLeft = collisionPosLeft - offsetLeft,
				overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
				myOffset = data.my[ 0 ] === "left" ?
					-data.elemWidth :
					data.my[ 0 ] === "right" ?
						data.elemWidth :
						0,
				atOffset = data.at[ 0 ] === "left" ?
					data.targetWidth :
					data.at[ 0 ] === "right" ?
						-data.targetWidth :
						0,
				offset = -2 * data.offset[ 0 ],
				newOverRight,
				newOverLeft;

			if ( overLeft < 0 ) {
				newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth -
					outerWidth - withinOffset;
				if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
					position.left += myOffset + atOffset + offset;
				}
			} else if ( overRight > 0 ) {
				newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset +
					atOffset + offset - offsetLeft;
				if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
					position.left += myOffset + atOffset + offset;
				}
			}
		},
		top: function( position, data ) {
			var within = data.within,
				withinOffset = within.offset.top + within.scrollTop,
				outerHeight = within.height,
				offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
				collisionPosTop = position.top - data.collisionPosition.marginTop,
				overTop = collisionPosTop - offsetTop,
				overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
				top = data.my[ 1 ] === "top",
				myOffset = top ?
					-data.elemHeight :
					data.my[ 1 ] === "bottom" ?
						data.elemHeight :
						0,
				atOffset = data.at[ 1 ] === "top" ?
					data.targetHeight :
					data.at[ 1 ] === "bottom" ?
						-data.targetHeight :
						0,
				offset = -2 * data.offset[ 1 ],
				newOverTop,
				newOverBottom;
			if ( overTop < 0 ) {
				newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight -
					outerHeight - withinOffset;
				if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {
					position.top += myOffset + atOffset + offset;
				}
			} else if ( overBottom > 0 ) {
				newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset +
					offset - offsetTop;
				if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {
					position.top += myOffset + atOffset + offset;
				}
			}
		}
	},
	flipfit: {
		left: function() {
			$.ui.position.flip.left.apply( this, arguments );
			$.ui.position.fit.left.apply( this, arguments );
		},
		top: function() {
			$.ui.position.flip.top.apply( this, arguments );
			$.ui.position.fit.top.apply( this, arguments );
		}
	}
};

} )();

// Source: safe-active-element.js
$.ui.safeActiveElement = function( document ) {
	var activeElement;

	// Support: IE 9 only
	// IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe>
	try {
		activeElement = document.activeElement;
	} catch ( error ) {
		activeElement = document.body;
	}

	// Support: IE 9 - 11 only
	// IE may return null instead of an element
	// Interestingly, this only seems to occur when NOT in an iframe
	if ( !activeElement ) {
		activeElement = document.body;
	}

	// Support: IE 11 only
	// IE11 returns a seemingly empty object in some cases when accessing
	// document.activeElement from an <iframe>
	if ( !activeElement.nodeName ) {
		activeElement = document.body;
	}

	return activeElement;
};

// Source: safe-blur.js
$.ui.safeBlur = function( element ) {

	// Support: IE9 - 10 only
	// If the <body> is blurred, IE will switch windows, see #9420
	if ( element && element.nodeName.toLowerCase() !== "body" ) {
		$( element ).trigger( "blur" );
	}
};

// Source: scroll-parent.js
/*!
 * jQuery UI Scroll Parent 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: scrollParent
//>>group: Core
//>>description: Get the closest ancestor element that is scrollable.
//>>docs: https://api.jqueryui.com/scrollParent/

$.fn.scrollParent = function( includeHidden ) {
	var position = this.css( "position" ),
		excludeStaticParent = position === "absolute",
		overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
		scrollParent = this.parents().filter( function() {
			var parent = $( this );
			if ( excludeStaticParent && parent.css( "position" ) === "static" ) {
				return false;
			}
			return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) +
				parent.css( "overflow-x" ) );
		} ).eq( 0 );

	return position === "fixed" || !scrollParent.length ?
		$( this[ 0 ].ownerDocument || document ) :
		scrollParent;
};

// Source: tabbable.js
/*!
 * jQuery UI Tabbable 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: :tabbable Selector
//>>group: Core
//>>description: Selects elements which can be tabbed to.
//>>docs: https://api.jqueryui.com/tabbable-selector/

$.extend( $.expr.pseudos, {
	tabbable: function( element ) {
		var tabIndex = $.attr( element, "tabindex" ),
			hasTabindex = tabIndex != null;
		return ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex );
	}
} );

// Source: unique-id.js
/*!
 * jQuery UI Unique ID 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: uniqueId
//>>group: Core
//>>description: Functions to generate and remove uniqueId's
//>>docs: https://api.jqueryui.com/uniqueId/

$.fn.extend( {
	uniqueId: ( function() {
		var uuid = 0;

		return function() {
			return this.each( function() {
				if ( !this.id ) {
					this.id = "ui-id-" + ( ++uuid );
				}
			} );
		};
	} )(),

	removeUniqueId: function() {
		return this.each( function() {
			if ( /^ui-id-\d+$/.test( this.id ) ) {
				$( this ).removeAttr( "id" );
			}
		} );
	}
} );

// Source: widget.js
/*!
 * jQuery UI Widget 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Widget
//>>group: Core
//>>description: Provides a factory for creating stateful widgets with a common API.
//>>docs: https://api.jqueryui.com/jQuery.widget/
//>>demos: https://jqueryui.com/widget/

var widgetUuid = 0;
var widgetHasOwnProperty = Array.prototype.hasOwnProperty;
var widgetSlice = Array.prototype.slice;

$.cleanData = ( function( orig ) {
	return function( elems ) {
		var events, elem, i;
		for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {

			// Only trigger remove when necessary to save time
			events = $._data( elem, "events" );
			if ( events && events.remove ) {
				$( elem ).triggerHandler( "remove" );
			}
		}
		orig( elems );
	};
} )( $.cleanData );

$.widget = function( name, base, prototype ) {
	var existingConstructor, constructor, basePrototype;

	// ProxiedPrototype allows the provided prototype to remain unmodified
	// so that it can be used as a mixin for multiple widgets (#8876)
	var proxiedPrototype = {};

	var namespace = name.split( "." )[ 0 ];
	name = name.split( "." )[ 1 ];
	var fullName = namespace + "-" + name;

	if ( !prototype ) {
		prototype = base;
		base = $.Widget;
	}

	if ( Array.isArray( prototype ) ) {
		prototype = $.extend.apply( null, [ {} ].concat( prototype ) );
	}

	// Create selector for plugin
	$.expr.pseudos[ fullName.toLowerCase() ] = function( elem ) {
		return !!$.data( elem, fullName );
	};

	$[ namespace ] = $[ namespace ] || {};
	existingConstructor = $[ namespace ][ name ];
	constructor = $[ namespace ][ name ] = function( options, element ) {

		// Allow instantiation without "new" keyword
		if ( !this || !this._createWidget ) {
			return new constructor( options, element );
		}

		// Allow instantiation without initializing for simple inheritance
		// must use "new" keyword (the code above always passes args)
		if ( arguments.length ) {
			this._createWidget( options, element );
		}
	};

	// Extend with the existing constructor to carry over any static properties
	$.extend( constructor, existingConstructor, {
		version: prototype.version,

		// Copy the object used to create the prototype in case we need to
		// redefine the widget later
		_proto: $.extend( {}, prototype ),

		// Track widgets that inherit from this widget in case this widget is
		// redefined after a widget inherits from it
		_childConstructors: []
	} );

	basePrototype = new base();

	// We need to make the options hash a property directly on the new instance
	// otherwise we'll modify the options hash on the prototype that we're
	// inheriting from
	basePrototype.options = $.widget.extend( {}, basePrototype.options );
	$.each( prototype, function( prop, value ) {
		if ( typeof value !== "function" ) {
			proxiedPrototype[ prop ] = value;
			return;
		}
		proxiedPrototype[ prop ] = ( function() {
			function _super() {
				return base.prototype[ prop ].apply( this, arguments );
			}

			function _superApply( args ) {
				return base.prototype[ prop ].apply( this, args );
			}

			return function() {
				var __super = this._super;
				var __superApply = this._superApply;
				var returnValue;

				this._super = _super;
				this._superApply = _superApply;

				returnValue = value.apply( this, arguments );

				this._super = __super;
				this._superApply = __superApply;

				return returnValue;
			};
		} )();
	} );
	constructor.prototype = $.widget.extend( basePrototype, {

		// TODO: remove support for widgetEventPrefix
		// always use the name + a colon as the prefix, e.g., draggable:start
		// don't prefix for widgets that aren't DOM-based
		widgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name
	}, proxiedPrototype, {
		constructor: constructor,
		namespace: namespace,
		widgetName: name,
		widgetFullName: fullName
	} );

	// If this widget is being redefined then we need to find all widgets that
	// are inheriting from it and redefine all of them so that they inherit from
	// the new version of this widget. We're essentially trying to replace one
	// level in the prototype chain.
	if ( existingConstructor ) {
		$.each( existingConstructor._childConstructors, function( i, child ) {
			var childPrototype = child.prototype;

			// Redefine the child widget using the same prototype that was
			// originally used, but inherit from the new version of the base
			$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor,
				child._proto );
		} );

		// Remove the list of existing child constructors from the old constructor
		// so the old child constructors can be garbage collected
		delete existingConstructor._childConstructors;
	} else {
		base._childConstructors.push( constructor );
	}

	$.widget.bridge( name, constructor );

	return constructor;
};

$.widget.extend = function( target ) {
	var input = widgetSlice.call( arguments, 1 );
	var inputIndex = 0;
	var inputLength = input.length;
	var key;
	var value;

	for ( ; inputIndex < inputLength; inputIndex++ ) {
		for ( key in input[ inputIndex ] ) {
			value = input[ inputIndex ][ key ];
			if ( widgetHasOwnProperty.call( input[ inputIndex ], key ) && value !== undefined ) {

				// Clone objects
				if ( $.isPlainObject( value ) ) {
					target[ key ] = $.isPlainObject( target[ key ] ) ?
						$.widget.extend( {}, target[ key ], value ) :

						// Don't extend strings, arrays, etc. with objects
						$.widget.extend( {}, value );

				// Copy everything else by reference
				} else {
					target[ key ] = value;
				}
			}
		}
	}
	return target;
};

$.widget.bridge = function( name, object ) {
	var fullName = object.prototype.widgetFullName || name;
	$.fn[ name ] = function( options ) {
		var isMethodCall = typeof options === "string";
		var args = widgetSlice.call( arguments, 1 );
		var returnValue = this;

		if ( isMethodCall ) {

			// If this is an empty collection, we need to have the instance method
			// return undefined instead of the jQuery instance
			if ( !this.length && options === "instance" ) {
				returnValue = undefined;
			} else {
				this.each( function() {
					var methodValue;
					var instance = $.data( this, fullName );

					if ( options === "instance" ) {
						returnValue = instance;
						return false;
					}

					if ( !instance ) {
						return $.error( "cannot call methods on " + name +
							" prior to initialization; " +
							"attempted to call method '" + options + "'" );
					}

					if ( typeof instance[ options ] !== "function" ||
						options.charAt( 0 ) === "_" ) {
						return $.error( "no such method '" + options + "' for " + name +
							" widget instance" );
					}

					methodValue = instance[ options ].apply( instance, args );

					if ( methodValue !== instance && methodValue !== undefined ) {
						returnValue = methodValue && methodValue.jquery ?
							returnValue.pushStack( methodValue.get() ) :
							methodValue;
						return false;
					}
				} );
			}
		} else {

			// Allow multiple hashes to be passed on init
			if ( args.length ) {
				options = $.widget.extend.apply( null, [ options ].concat( args ) );
			}

			this.each( function() {
				var instance = $.data( this, fullName );
				if ( instance ) {
					instance.option( options || {} );
					if ( instance._init ) {
						instance._init();
					}
				} else {
					$.data( this, fullName, new object( options, this ) );
				}
			} );
		}

		return returnValue;
	};
};

$.Widget = function( /* options, element */ ) {};
$.Widget._childConstructors = [];

$.Widget.prototype = {
	widgetName: "widget",
	widgetEventPrefix: "",
	defaultElement: "<div>",

	options: {
		classes: {},
		disabled: false,

		// Callbacks
		create: null
	},

	_createWidget: function( options, element ) {
		element = $( element || this.defaultElement || this )[ 0 ];
		this.element = $( element );
		this.uuid = widgetUuid++;
		this.eventNamespace = "." + this.widgetName + this.uuid;

		this.bindings = $();
		this.hoverable = $();
		this.focusable = $();
		this.classesElementLookup = {};

		if ( element !== this ) {
			$.data( element, this.widgetFullName, this );
			this._on( true, this.element, {
				remove: function( event ) {
					if ( event.target === element ) {
						this.destroy();
					}
				}
			} );
			this.document = $( element.style ?

				// Element within the document
				element.ownerDocument :

				// Element is window or document
				element.document || element );
			this.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow );
		}

		this.options = $.widget.extend( {},
			this.options,
			this._getCreateOptions(),
			options );

		this._create();

		if ( this.options.disabled ) {
			this._setOptionDisabled( this.options.disabled );
		}

		this._trigger( "create", null, this._getCreateEventData() );
		this._init();
	},

	_getCreateOptions: function() {
		return {};
	},

	_getCreateEventData: $.noop,

	_create: $.noop,

	_init: $.noop,

	destroy: function() {
		var that = this;

		this._destroy();
		$.each( this.classesElementLookup, function( key, value ) {
			that._removeClass( value, key );
		} );

		// We can probably remove the unbind calls in 2.0
		// all event bindings should go through this._on()
		this.element
			.off( this.eventNamespace )
			.removeData( this.widgetFullName );
		this.widget()
			.off( this.eventNamespace )
			.removeAttr( "aria-disabled" );

		// Clean up events and states
		this.bindings.off( this.eventNamespace );
	},

	_destroy: $.noop,

	widget: function() {
		return this.element;
	},

	option: function( key, value ) {
		var options = key;
		var parts;
		var curOption;
		var i;

		if ( arguments.length === 0 ) {

			// Don't return a reference to the internal hash
			return $.widget.extend( {}, this.options );
		}

		if ( typeof key === "string" ) {

			// Handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
			options = {};
			parts = key.split( "." );
			key = parts.shift();
			if ( parts.length ) {
				curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
				for ( i = 0; i < parts.length - 1; i++ ) {
					curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
					curOption = curOption[ parts[ i ] ];
				}
				key = parts.pop();
				if ( arguments.length === 1 ) {
					return curOption[ key ] === undefined ? null : curOption[ key ];
				}
				curOption[ key ] = value;
			} else {
				if ( arguments.length === 1 ) {
					return this.options[ key ] === undefined ? null : this.options[ key ];
				}
				options[ key ] = value;
			}
		}

		this._setOptions( options );

		return this;
	},

	_setOptions: function( options ) {
		var key;

		for ( key in options ) {
			this._setOption( key, options[ key ] );
		}

		return this;
	},

	_setOption: function( key, value ) {
		if ( key === "classes" ) {
			this._setOptionClasses( value );
		}

		this.options[ key ] = value;

		if ( key === "disabled" ) {
			this._setOptionDisabled( value );
		}

		return this;
	},

	_setOptionClasses: function( value ) {
		var classKey, elements, currentElements;

		for ( classKey in value ) {
			currentElements = this.classesElementLookup[ classKey ];
			if ( value[ classKey ] === this.options.classes[ classKey ] ||
					!currentElements ||
					!currentElements.length ) {
				continue;
			}

			// We are doing this to create a new jQuery object because the _removeClass() call
			// on the next line is going to destroy the reference to the current elements being
			// tracked. We need to save a copy of this collection so that we can add the new classes
			// below.
			elements = $( currentElements.get() );
			this._removeClass( currentElements, classKey );

			// We don't use _addClass() here, because that uses this.options.classes
			// for generating the string of classes. We want to use the value passed in from
			// _setOption(), this is the new value of the classes option which was passed to
			// _setOption(). We pass this value directly to _classes().
			elements.addClass( this._classes( {
				element: elements,
				keys: classKey,
				classes: value,
				add: true
			} ) );
		}
	},

	_setOptionDisabled: function( value ) {
		this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, !!value );

		// If the widget is becoming disabled, then nothing is interactive
		if ( value ) {
			this._removeClass( this.hoverable, null, "ui-state-hover" );
			this._removeClass( this.focusable, null, "ui-state-focus" );
		}
	},

	enable: function() {
		return this._setOptions( { disabled: false } );
	},

	disable: function() {
		return this._setOptions( { disabled: true } );
	},

	_classes: function( options ) {
		var full = [];
		var that = this;

		options = $.extend( {
			element: this.element,
			classes: this.options.classes || {}
		}, options );

		function bindRemoveEvent() {
			var nodesToBind = [];

			options.element.each( function( _, element ) {
				var isTracked = $.map( that.classesElementLookup, function( elements ) {
					return elements;
				} )
					.some( function( elements ) {
						return elements.is( element );
					} );

				if ( !isTracked ) {
					nodesToBind.push( element );
				}
			} );

			that._on( $( nodesToBind ), {
				remove: "_untrackClassesElement"
			} );
		}

		function processClassString( classes, checkOption ) {
			var current, i;
			for ( i = 0; i < classes.length; i++ ) {
				current = that.classesElementLookup[ classes[ i ] ] || $();
				if ( options.add ) {
					bindRemoveEvent();
					current = $( $.uniqueSort( current.get().concat( options.element.get() ) ) );
				} else {
					current = $( current.not( options.element ).get() );
				}
				that.classesElementLookup[ classes[ i ] ] = current;
				full.push( classes[ i ] );
				if ( checkOption && options.classes[ classes[ i ] ] ) {
					full.push( options.classes[ classes[ i ] ] );
				}
			}
		}

		if ( options.keys ) {
			processClassString( options.keys.match( /\S+/g ) || [], true );
		}
		if ( options.extra ) {
			processClassString( options.extra.match( /\S+/g ) || [] );
		}

		return full.join( " " );
	},

	_untrackClassesElement: function( event ) {
		var that = this;
		$.each( that.classesElementLookup, function( key, value ) {
			if ( $.inArray( event.target, value ) !== -1 ) {
				that.classesElementLookup[ key ] = $( value.not( event.target ).get() );
			}
		} );

		this._off( $( event.target ) );
	},

	_removeClass: function( element, keys, extra ) {
		return this._toggleClass( element, keys, extra, false );
	},

	_addClass: function( element, keys, extra ) {
		return this._toggleClass( element, keys, extra, true );
	},

	_toggleClass: function( element, keys, extra, add ) {
		add = ( typeof add === "boolean" ) ? add : extra;
		var shift = ( typeof element === "string" || element === null ),
			options = {
				extra: shift ? keys : extra,
				keys: shift ? element : keys,
				element: shift ? this.element : element,
				add: add
			};
		options.element.toggleClass( this._classes( options ), add );
		return this;
	},

	_on: function( suppressDisabledCheck, element, handlers ) {
		var delegateElement;
		var instance = this;

		// No suppressDisabledCheck flag, shuffle arguments
		if ( typeof suppressDisabledCheck !== "boolean" ) {
			handlers = element;
			element = suppressDisabledCheck;
			suppressDisabledCheck = false;
		}

		// No element argument, shuffle and use this.element
		if ( !handlers ) {
			handlers = element;
			element = this.element;
			delegateElement = this.widget();
		} else {
			element = delegateElement = $( element );
			this.bindings = this.bindings.add( element );
		}

		$.each( handlers, function( event, handler ) {
			function handlerProxy() {

				// Allow widgets to customize the disabled handling
				// - disabled as an array instead of boolean
				// - disabled class as method for disabling individual parts
				if ( !suppressDisabledCheck &&
						( instance.options.disabled === true ||
						$( this ).hasClass( "ui-state-disabled" ) ) ) {
					return;
				}
				return ( typeof handler === "string" ? instance[ handler ] : handler )
					.apply( instance, arguments );
			}

			// Copy the guid so direct unbinding works
			if ( typeof handler !== "string" ) {
				handlerProxy.guid = handler.guid =
					handler.guid || handlerProxy.guid || $.guid++;
			}

			var match = event.match( /^([\w:-]*)\s*(.*)$/ );
			var eventName = match[ 1 ] + instance.eventNamespace;
			var selector = match[ 2 ];

			if ( selector ) {
				delegateElement.on( eventName, selector, handlerProxy );
			} else {
				element.on( eventName, handlerProxy );
			}
		} );
	},

	_off: function( element, eventName ) {
		eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) +
			this.eventNamespace;
		element.off( eventName );

		// Clear the stack to avoid memory leaks (#10056)
		this.bindings = $( this.bindings.not( element ).get() );
		this.focusable = $( this.focusable.not( element ).get() );
		this.hoverable = $( this.hoverable.not( element ).get() );
	},

	_delay: function( handler, delay ) {
		function handlerProxy() {
			return ( typeof handler === "string" ? instance[ handler ] : handler )
				.apply( instance, arguments );
		}
		var instance = this;
		return setTimeout( handlerProxy, delay || 0 );
	},

	_hoverable: function( element ) {
		this.hoverable = this.hoverable.add( element );
		this._on( element, {
			mouseenter: function( event ) {
				this._addClass( $( event.currentTarget ), null, "ui-state-hover" );
			},
			mouseleave: function( event ) {
				this._removeClass( $( event.currentTarget ), null, "ui-state-hover" );
			}
		} );
	},

	_focusable: function( element ) {
		this.focusable = this.focusable.add( element );
		this._on( element, {
			focusin: function( event ) {
				this._addClass( $( event.currentTarget ), null, "ui-state-focus" );
			},
			focusout: function( event ) {
				this._removeClass( $( event.currentTarget ), null, "ui-state-focus" );
			}
		} );
	},

	_trigger: function( type, event, data ) {
		var prop, orig;
		var callback = this.options[ type ];

		data = data || {};
		event = $.Event( event );
		event.type = ( type === this.widgetEventPrefix ?
			type :
			this.widgetEventPrefix + type ).toLowerCase();

		// The original event may come from any element
		// so we need to reset the target on the new event
		event.target = this.element[ 0 ];

		// Copy original event properties over to the new event
		orig = event.originalEvent;
		if ( orig ) {
			for ( prop in orig ) {
				if ( !( prop in event ) ) {
					event[ prop ] = orig[ prop ];
				}
			}
		}

		this.element.trigger( event, data );
		return !( typeof callback === "function" &&
			callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false ||
			event.isDefaultPrevented() );
	}
};

$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
	$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
		if ( typeof options === "string" ) {
			options = { effect: options };
		}

		var hasOptions;
		var effectName = !options ?
			method :
			options === true || typeof options === "number" ?
				defaultEffect :
				options.effect || defaultEffect;

		options = options || {};
		if ( typeof options === "number" ) {
			options = { duration: options };
		} else if ( options === true ) {
			options = {};
		}

		hasOptions = !$.isEmptyObject( options );
		options.complete = callback;

		if ( options.delay ) {
			element.delay( options.delay );
		}

		if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
			element[ method ]( options );
		} else if ( effectName !== method && element[ effectName ] ) {
			element[ effectName ]( options.duration, options.easing, callback );
		} else {
			element.queue( function( next ) {
				$( this )[ method ]();
				if ( callback ) {
					callback.call( element[ 0 ] );
				}
				next();
			} );
		}
	};
} );


} ) );
                                                                                                                                                                                                                                                                                                jquery/ui/core.min.js                                                                               0000644                 00000051730 15212564042 0010557 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! jQuery UI - v1.13.3 - 2024-04-26
* https://jqueryui.com
* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(x){"use strict";var t,e,i,n,W,C,o,s,r,l,a,h,u;function E(t,e,i){return[parseFloat(t[0])*(a.test(t[0])?e/100:1),parseFloat(t[1])*(a.test(t[1])?i/100:1)]}function L(t,e){return parseInt(x.css(t,e),10)||0}function N(t){return null!=t&&t===t.window}x.ui=x.ui||{},x.ui.version="1.13.3",
/*!
 * jQuery UI :data 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
x.extend(x.expr.pseudos,{data:x.expr.createPseudo?x.expr.createPseudo(function(e){return function(t){return!!x.data(t,e)}}):function(t,e,i){return!!x.data(t,i[3])}}),
/*!
 * jQuery UI Disable Selection 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
x.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}}),
/*!
 * jQuery UI Focusable 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
x.ui.focusable=function(t,e){var i,n,o,s=t.nodeName.toLowerCase();return"area"===s?(o=(i=t.parentNode).name,!(!t.href||!o||"map"!==i.nodeName.toLowerCase())&&0<(i=x("img[usemap='#"+o+"']")).length&&i.is(":visible")):(/^(input|select|textarea|button|object)$/.test(s)?(n=!t.disabled)&&(o=x(t).closest("fieldset")[0])&&(n=!o.disabled):n="a"===s&&t.href||e,n&&x(t).is(":visible")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)t=t.parent(),e=t.css("visibility");return"visible"===e}(x(t)))},x.extend(x.expr.pseudos,{focusable:function(t){return x.ui.focusable(t,null!=x.attr(t,"tabindex"))}}),x.fn._form=function(){return"string"==typeof this[0].form?this.closest("form"):x(this[0].form)},
/*!
 * jQuery UI Form Reset Mixin 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
x.ui.formResetMixin={_formResetHandler:function(){var e=x(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");x.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=this.element._form(),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(x.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}},x.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),
/*!
 * jQuery UI Support for jQuery core 1.8.x and newer 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 *
 */
x.expr.pseudos||(x.expr.pseudos=x.expr[":"]),x.uniqueSort||(x.uniqueSort=x.unique),x.escapeSelector||(e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,i=function(t,e){return e?"\0"===t?"ï¿½":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},x.escapeSelector=function(t){return(t+"").replace(e,i)}),x.fn.even&&x.fn.odd||x.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}}),
/*!
 * jQuery UI Keycode 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
x.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},
/*!
 * jQuery UI Labels 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
x.fn.labels=function(){var t,e,i;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),(t=this.attr("id"))&&(i=(i=this.eq(0).parents().last()).add((i.length?i:this).siblings()),t="label[for='"+x.escapeSelector(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},x.ui.plugin={add:function(t,e,i){var n,o=x.ui[t].prototype;for(n in i)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([e,i[n]])},call:function(t,e,i,n){var o,s=t.plugins[e];if(s&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<s.length;o++)t.options[s[o][0]]&&s[o][1].apply(t.element,i)}},
/*!
 * jQuery UI Position 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 *
 * https://api.jqueryui.com/position/
 */
W=Math.max,C=Math.abs,o=/left|center|right/,s=/top|center|bottom/,r=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,a=/%$/,h=x.fn.position,x.position={scrollbarWidth:function(){var t,e,i;return void 0!==n?n:(i=(e=x("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>")).children()[0],x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),n=t-i)},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?x.position.scrollbarWidth():0,height:e?x.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=x(t||window),i=N(e[0]),n=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:n,offset:!i&&!n?x(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},x.fn.position=function(f){var c,d,p,g,m,v,y,w,b,_,t,e;return f&&f.of?(v="string"==typeof(f=x.extend({},f)).of?x(document).find(f.of):x(f.of),y=x.position.getWithinInfo(f.within),w=x.position.getScrollInfo(y),b=(f.collision||"flip").split(" "),_={},e=9===(e=(t=v)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:N(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()},v[0].preventDefault&&(f.at="left top"),d=e.width,p=e.height,m=x.extend({},g=e.offset),x.each(["my","at"],function(){var t,e,i=(f[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):s.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=s.test(i[1])?i[1]:"center",t=r.exec(i[0]),e=r.exec(i[1]),_[this]=[t?t[0]:0,e?e[0]:0],f[this]=[l.exec(i[0])[0],l.exec(i[1])[0]]}),1===b.length&&(b[1]=b[0]),"right"===f.at[0]?m.left+=d:"center"===f.at[0]&&(m.left+=d/2),"bottom"===f.at[1]?m.top+=p:"center"===f.at[1]&&(m.top+=p/2),c=E(_.at,d,p),m.left+=c[0],m.top+=c[1],this.each(function(){var i,t,r=x(this),l=r.outerWidth(),a=r.outerHeight(),e=L(this,"marginLeft"),n=L(this,"marginTop"),o=l+e+L(this,"marginRight")+w.width,s=a+n+L(this,"marginBottom")+w.height,h=x.extend({},m),u=E(_.my,r.outerWidth(),r.outerHeight());"right"===f.my[0]?h.left-=l:"center"===f.my[0]&&(h.left-=l/2),"bottom"===f.my[1]?h.top-=a:"center"===f.my[1]&&(h.top-=a/2),h.left+=u[0],h.top+=u[1],i={marginLeft:e,marginTop:n},x.each(["left","top"],function(t,e){x.ui.position[b[t]]&&x.ui.position[b[t]][e](h,{targetWidth:d,targetHeight:p,elemWidth:l,elemHeight:a,collisionPosition:i,collisionWidth:o,collisionHeight:s,offset:[c[0]+u[0],c[1]+u[1]],my:f.my,at:f.at,within:y,elem:r})}),f.using&&(t=function(t){var e=g.left-h.left,i=e+d-l,n=g.top-h.top,o=n+p-a,s={target:{element:v,left:g.left,top:g.top,width:d,height:p},element:{element:r,left:h.left,top:h.top,width:l,height:a},horizontal:i<0?"left":0<e?"right":"center",vertical:o<0?"top":0<n?"bottom":"middle"};d<l&&C(e+i)<d&&(s.horizontal="center"),p<a&&C(n+o)<p&&(s.vertical="middle"),W(C(e),C(i))>W(C(n),C(o))?s.important="horizontal":s.important="vertical",f.using.call(this,t,s)}),r.offset(x.extend(h,{using:t}))})):h.apply(this,arguments)},x.ui.position={fit:{left:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollLeft:n.offset.left,n=n.width,s=t.left-e.collisionPosition.marginLeft,r=o-s,l=s+e.collisionWidth-n-o;n<e.collisionWidth?0<r&&l<=0?(i=t.left+r+e.collisionWidth-n-o,t.left+=r-i):t.left=!(0<l&&r<=0)&&l<r?o+n-e.collisionWidth:o:0<r?t.left+=r:0<l?t.left-=l:t.left=W(t.left-s,t.left)},top:function(t,e){var i,n=e.within,n=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,s=t.top-e.collisionPosition.marginTop,r=n-s,l=s+e.collisionHeight-o-n;o<e.collisionHeight?0<r&&l<=0?(i=t.top+r+e.collisionHeight-o-n,t.top+=r-i):t.top=!(0<l&&r<=0)&&l<r?n+o-e.collisionHeight:n:0<r?t.top+=r:0<l?t.top-=l:t.top=W(t.top-s,t.top)}},flip:{left:function(t,e){var i=e.within,n=i.offset.left+i.scrollLeft,o=i.width,i=i.isWindow?i.scrollLeft:i.offset.left,s=t.left-e.collisionPosition.marginLeft,r=s-i,s=s+e.collisionWidth-o-i,l="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,a="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,h=-2*e.offset[0];r<0?((o=t.left+l+a+h+e.collisionWidth-o-n)<0||o<C(r))&&(t.left+=l+a+h):0<s&&(0<(n=t.left-e.collisionPosition.marginLeft+l+a+h-i)||C(n)<s)&&(t.left+=l+a+h)},top:function(t,e){var i=e.within,n=i.offset.top+i.scrollTop,o=i.height,i=i.isWindow?i.scrollTop:i.offset.top,s=t.top-e.collisionPosition.marginTop,r=s-i,s=s+e.collisionHeight-o-i,l="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,a="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,h=-2*e.offset[1];r<0?((o=t.top+l+a+h+e.collisionHeight-o-n)<0||o<C(r))&&(t.top+=l+a+h):0<s&&(0<(n=t.top-e.collisionPosition.marginTop+l+a+h-i)||C(n)<s)&&(t.top+=l+a+h)}},flipfit:{left:function(){x.ui.position.flip.left.apply(this,arguments),x.ui.position.fit.left.apply(this,arguments)},top:function(){x.ui.position.flip.top.apply(this,arguments),x.ui.position.fit.top.apply(this,arguments)}}},x.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return i=(i=i||e.body).nodeName?i:e.body},x.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&x(t).trigger("blur")},
/*!
 * jQuery UI Scroll Parent 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
x.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=x(this);return(!i||"static"!==t.css("position"))&&n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:x(this[0].ownerDocument||document)},
/*!
 * jQuery UI Tabbable 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
x.extend(x.expr.pseudos,{tabbable:function(t){var e=x.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&x.ui.focusable(t,i)}}),
/*!
 * jQuery UI Unique ID 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
x.fn.extend({uniqueId:(u=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++u)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&x(this).removeAttr("id")})}});
/*!
 * jQuery UI Widget 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
var f,c=0,d=Array.prototype.hasOwnProperty,p=Array.prototype.slice;x.cleanData=(f=x.cleanData,function(t){for(var e,i,n=0;null!=(i=t[n]);n++)(e=x._data(i,"events"))&&e.remove&&x(i).triggerHandler("remove");f(t)}),x.widget=function(t,i,e){var n,o,s,r={},l=t.split(".")[0],a=l+"-"+(t=t.split(".")[1]);return e||(e=i,i=x.Widget),Array.isArray(e)&&(e=x.extend.apply(null,[{}].concat(e))),x.expr.pseudos[a.toLowerCase()]=function(t){return!!x.data(t,a)},x[l]=x[l]||{},n=x[l][t],o=x[l][t]=function(t,e){if(!this||!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},x.extend(o,n,{version:e.version,_proto:x.extend({},e),_childConstructors:[]}),(s=new i).options=x.widget.extend({},s.options),x.each(e,function(e,n){function o(){return i.prototype[e].apply(this,arguments)}function s(t){return i.prototype[e].apply(this,t)}r[e]="function"!=typeof n?n:function(){var t,e=this._super,i=this._superApply;return this._super=o,this._superApply=s,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}}),o.prototype=x.widget.extend(s,{widgetEventPrefix:n&&s.widgetEventPrefix||t},r,{constructor:o,namespace:l,widgetName:t,widgetFullName:a}),n?(x.each(n._childConstructors,function(t,e){var i=e.prototype;x.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete n._childConstructors):i._childConstructors.push(o),x.widget.bridge(t,o),o},x.widget.extend=function(t){for(var e,i,n=p.call(arguments,1),o=0,s=n.length;o<s;o++)for(e in n[o])i=n[o][e],d.call(n[o],e)&&void 0!==i&&(x.isPlainObject(i)?t[e]=x.isPlainObject(t[e])?x.widget.extend({},t[e],i):x.widget.extend({},i):t[e]=i);return t},x.widget.bridge=function(s,e){var r=e.prototype.widgetFullName||s;x.fn[s]=function(i){var t="string"==typeof i,n=p.call(arguments,1),o=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=x.data(this,r);return"instance"===i?(o=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?x.error("no such method '"+i+"' for "+s+" widget instance"):(t=e[i].apply(e,n))!==e&&void 0!==t?(o=t&&t.jquery?o.pushStack(t.get()):t,!1):void 0:x.error("cannot call methods on "+s+" prior to initialization; attempted to call method '"+i+"'")}):o=void 0:(n.length&&(i=x.widget.extend.apply(null,[i].concat(n))),this.each(function(){var t=x.data(this,r);t?(t.option(i||{}),t._init&&t._init()):x.data(this,r,new e(i,this))})),o}},x.Widget=function(){},x.Widget._childConstructors=[],x.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,n,o,s=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(s={},t=(i=t.split(".")).shift(),i.length){for(n=s[t]=x.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)n[i[o]]=n[i[o]]||{},n=n[i[o]];if(t=i.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];s[t]=e}return this._setOptions(s),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,n;for(e in t)n=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&n&&n.length&&(i=x(n.get()),this._removeClass(n,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(o){var s=[],r=this;function t(t,e){for(var i,n=0;n<t.length;n++)i=r.classesElementLookup[t[n]]||x(),i=o.add?(function(){var i=[];o.element.each(function(t,e){x.map(r.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),r._on(x(i),{remove:"_untrackClassesElement"})}(),x(x.uniqueSort(i.get().concat(o.element.get())))):x(i.not(o.element).get()),r.classesElementLookup[t[n]]=i,s.push(t[n]),e&&o.classes[t[n]]&&s.push(o.classes[t[n]])}return(o=x.extend({element:this.element,classes:this.options.classes||{}},o)).keys&&t(o.keys.match(/\S+/g)||[],!0),o.extra&&t(o.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(i){var n=this;x.each(n.classesElementLookup,function(t,e){-1!==x.inArray(i.target,e)&&(n.classesElementLookup[t]=x(e.not(i.target).get()))}),this._off(x(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,n){var o="string"==typeof t||null===t,e={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:n="boolean"==typeof n?n:i};return e.element.toggleClass(this._classes(e),n),this},_on:function(o,s,t){var r,l=this;"boolean"!=typeof o&&(t=s,s=o,o=!1),t?(s=r=x(s),this.bindings=this.bindings.add(s)):(t=s,s=this.element,r=this.widget()),x.each(t,function(t,e){function i(){if(o||!0!==l.options.disabled&&!x(this).hasClass("ui-state-disabled"))return("string"==typeof e?l[e]:e).apply(l,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||x.guid++);var t=t.match(/^([\w:-]*)\s*(.*)$/),n=t[1]+l.eventNamespace,t=t[2];t?r.on(n,t,i):s.on(n,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=x(this.bindings.not(t).get()),this.focusable=x(this.focusable.not(t).get()),this.hoverable=x(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(x(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(x(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var n,o,s=this.options[t];if(i=i||{},(e=x.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],o=e.originalEvent)for(n in o)n in e||(e[n]=o[n]);return this.element.trigger(e,i),!("function"==typeof s&&!1===s.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},x.each({show:"fadeIn",hide:"fadeOut"},function(s,r){x.Widget.prototype["_"+s]=function(e,t,i){var n,o=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||r:s;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),n=!x.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),n&&x.effects&&x.effects.effect[o]?e[s](t):o!==s&&e[o]?e[o](t.duration,t.easing,i):e.queue(function(t){x(this)[s](),i&&i.call(e[0]),t()})}})});                                        jquery/ui/datepicker.js                                                                             0000644                 00000241133 15212564042 0011156 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /* eslint-disable max-len, camelcase */
/*!
 * jQuery UI Datepicker 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Datepicker
//>>group: Widgets
//>>description: Displays a calendar from an input or inline for selecting dates.
//>>docs: https://api.jqueryui.com/datepicker/
//>>demos: https://jqueryui.com/datepicker/
//>>css.structure: ../../themes/base/core.css
//>>css.structure: ../../themes/base/datepicker.css
//>>css.theme: ../../themes/base/theme.css

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../version",
			"../keycode"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

$.extend( $.ui, { datepicker: { version: "1.13.3" } } );

var datepicker_instActive;

function datepicker_getZindex( elem ) {
	var position, value;
	while ( elem.length && elem[ 0 ] !== document ) {

		// Ignore z-index if position is set to a value where z-index is ignored by the browser
		// This makes behavior of this function consistent across browsers
		// WebKit always returns auto if the element is positioned
		position = elem.css( "position" );
		if ( position === "absolute" || position === "relative" || position === "fixed" ) {

			// IE returns 0 when zIndex is not specified
			// other browsers return a string
			// we ignore the case of nested elements with an explicit value of 0
			// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
			value = parseInt( elem.css( "zIndex" ), 10 );
			if ( !isNaN( value ) && value !== 0 ) {
				return value;
			}
		}
		elem = elem.parent();
	}

	return 0;
}

/* Date picker manager.
   Use the singleton instance of this class, $.datepicker, to interact with the date picker.
   Settings for (groups of) date pickers are maintained in an instance object,
   allowing multiple different settings on the same page. */

function Datepicker() {
	this._curInst = null; // The current instance in use
	this._keyEvent = false; // If the last event was a key event
	this._disabledInputs = []; // List of date picker inputs that have been disabled
	this._datepickerShowing = false; // True if the popup picker is showing , false if not
	this._inDialog = false; // True if showing within a "dialog", false if not
	this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division
	this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class
	this._appendClass = "ui-datepicker-append"; // The name of the append marker class
	this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class
	this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class
	this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class
	this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class
	this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class
	this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class
	this.regional = []; // Available regional settings, indexed by language code
	this.regional[ "" ] = { // Default regional settings
		closeText: "Done", // Display text for close link
		prevText: "Prev", // Display text for previous month link
		nextText: "Next", // Display text for next month link
		currentText: "Today", // Display text for current month link
		monthNames: [ "January", "February", "March", "April", "May", "June",
			"July", "August", "September", "October", "November", "December" ], // Names of months for drop-down and formatting
		monthNamesShort: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], // For formatting
		dayNames: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], // For formatting
		dayNamesShort: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], // For formatting
		dayNamesMin: [ "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" ], // Column headings for days starting at Sunday
		weekHeader: "Wk", // Column header for week of the year
		dateFormat: "mm/dd/yy", // See format options on parseDate
		firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
		isRTL: false, // True if right-to-left language, false if left-to-right
		showMonthAfterYear: false, // True if the year select precedes month, false for month then year
		yearSuffix: "", // Additional text to append to the year in the month headers,
		selectMonthLabel: "Select month", // Invisible label for month selector
		selectYearLabel: "Select year" // Invisible label for year selector
	};
	this._defaults = { // Global defaults for all the date picker instances
		showOn: "focus", // "focus" for popup on focus,
			// "button" for trigger button, or "both" for either
		showAnim: "fadeIn", // Name of jQuery animation for popup
		showOptions: {}, // Options for enhanced animations
		defaultDate: null, // Used when field is blank: actual date,
			// +/-number for offset from today, null for today
		appendText: "", // Display text following the input box, e.g. showing the format
		buttonText: "...", // Text for trigger button
		buttonImage: "", // URL for trigger button image
		buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
		hideIfNoPrevNext: false, // True to hide next/previous month links
			// if not applicable, false to just disable them
		navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
		gotoCurrent: false, // True if today link goes back to current selection instead
		changeMonth: false, // True if month can be selected directly, false if only prev/next
		changeYear: false, // True if year can be selected directly, false if only prev/next
		yearRange: "c-10:c+10", // Range of years to display in drop-down,
			// either relative to today's year (-nn:+nn), relative to currently displayed year
			// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
		showOtherMonths: false, // True to show dates in other months, false to leave blank
		selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
		showWeek: false, // True to show week of the year, false to not show it
		calculateWeek: this.iso8601Week, // How to calculate the week of the year,
			// takes a Date and returns the number of the week for it
		shortYearCutoff: "+10", // Short year values < this are in the current century,
			// > this are in the previous century,
			// string value starting with "+" for current year + value
		minDate: null, // The earliest selectable date, or null for no limit
		maxDate: null, // The latest selectable date, or null for no limit
		duration: "fast", // Duration of display/closure
		beforeShowDay: null, // Function that takes a date and returns an array with
			// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or "",
			// [2] = cell title (optional), e.g. $.datepicker.noWeekends
		beforeShow: null, // Function that takes an input field and
			// returns a set of custom settings for the date picker
		onSelect: null, // Define a callback function when a date is selected
		onChangeMonthYear: null, // Define a callback function when the month or year is changed
		onClose: null, // Define a callback function when the datepicker is closed
		onUpdateDatepicker: null, // Define a callback function when the datepicker is updated
		numberOfMonths: 1, // Number of months to show at a time
		showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
		stepMonths: 1, // Number of months to step back/forward
		stepBigMonths: 12, // Number of months to step back/forward for the big links
		altField: "", // Selector for an alternate field to store selected dates into
		altFormat: "", // The date format to use for the alternate field
		constrainInput: true, // The input is constrained by the current date format
		showButtonPanel: false, // True to show button panel, false to not show it
		autoSize: false, // True to size the input for the date format, false to leave as is
		disabled: false // The initial disabled state
	};
	$.extend( this._defaults, this.regional[ "" ] );
	this.regional.en = $.extend( true, {}, this.regional[ "" ] );
	this.regional[ "en-US" ] = $.extend( true, {}, this.regional.en );
	this.dpDiv = datepicker_bindHover( $( "<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>" ) );
}

$.extend( Datepicker.prototype, {

	/* Class name added to elements to indicate already configured with a date picker. */
	markerClassName: "hasDatepicker",

	//Keep track of the maximum number of rows displayed (see #7043)
	maxRows: 4,

	// TODO rename to "widget" when switching to widget factory
	_widgetDatepicker: function() {
		return this.dpDiv;
	},

	/* Override the default settings for all instances of the date picker.
	 * @param  settings  object - the new settings to use as defaults (anonymous object)
	 * @return the manager object
	 */
	setDefaults: function( settings ) {
		datepicker_extendRemove( this._defaults, settings || {} );
		return this;
	},

	/* Attach the date picker to a jQuery selection.
	 * @param  target	element - the target input field or division or span
	 * @param  settings  object - the new settings to use for this date picker instance (anonymous)
	 */
	_attachDatepicker: function( target, settings ) {
		var nodeName, inline, inst;
		nodeName = target.nodeName.toLowerCase();
		inline = ( nodeName === "div" || nodeName === "span" );
		if ( !target.id ) {
			this.uuid += 1;
			target.id = "dp" + this.uuid;
		}
		inst = this._newInst( $( target ), inline );
		inst.settings = $.extend( {}, settings || {} );
		if ( nodeName === "input" ) {
			this._connectDatepicker( target, inst );
		} else if ( inline ) {
			this._inlineDatepicker( target, inst );
		}
	},

	/* Create a new instance object. */
	_newInst: function( target, inline ) {
		var id = target[ 0 ].id.replace( /([^A-Za-z0-9_\-])/g, "\\\\$1" ); // escape jQuery meta chars
		return { id: id, input: target, // associated target
			selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
			drawMonth: 0, drawYear: 0, // month being drawn
			inline: inline, // is datepicker inline or not
			dpDiv: ( !inline ? this.dpDiv : // presentation div
			datepicker_bindHover( $( "<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>" ) ) ) };
	},

	/* Attach the date picker to an input field. */
	_connectDatepicker: function( target, inst ) {
		var input = $( target );
		inst.append = $( [] );
		inst.trigger = $( [] );
		if ( input.hasClass( this.markerClassName ) ) {
			return;
		}
		this._attachments( input, inst );
		input.addClass( this.markerClassName ).on( "keydown", this._doKeyDown ).
			on( "keypress", this._doKeyPress ).on( "keyup", this._doKeyUp );
		this._autoSize( inst );
		$.data( target, "datepicker", inst );

		//If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)
		if ( inst.settings.disabled ) {
			this._disableDatepicker( target );
		}
	},

	/* Make attachments based on settings. */
	_attachments: function( input, inst ) {
		var showOn, buttonText, buttonImage,
			appendText = this._get( inst, "appendText" ),
			isRTL = this._get( inst, "isRTL" );

		if ( inst.append ) {
			inst.append.remove();
		}
		if ( appendText ) {
			inst.append = $( "<span>" )
				.addClass( this._appendClass )
				.text( appendText );
			input[ isRTL ? "before" : "after" ]( inst.append );
		}

		input.off( "focus", this._showDatepicker );

		if ( inst.trigger ) {
			inst.trigger.remove();
		}

		showOn = this._get( inst, "showOn" );
		if ( showOn === "focus" || showOn === "both" ) { // pop-up date picker when in the marked field
			input.on( "focus", this._showDatepicker );
		}
		if ( showOn === "button" || showOn === "both" ) { // pop-up date picker when button clicked
			buttonText = this._get( inst, "buttonText" );
			buttonImage = this._get( inst, "buttonImage" );

			if ( this._get( inst, "buttonImageOnly" ) ) {
				inst.trigger = $( "<img>" )
					.addClass( this._triggerClass )
					.attr( {
						src: buttonImage,
						alt: buttonText,
						title: buttonText
					} );
			} else {
				inst.trigger = $( "<button type='button'>" )
					.addClass( this._triggerClass );
				if ( buttonImage ) {
					inst.trigger.html(
						$( "<img>" )
							.attr( {
								src: buttonImage,
								alt: buttonText,
								title: buttonText
							} )
					);
				} else {
					inst.trigger.text( buttonText );
				}
			}

			input[ isRTL ? "before" : "after" ]( inst.trigger );
			inst.trigger.on( "click", function() {
				if ( $.datepicker._datepickerShowing && $.datepicker._lastInput === input[ 0 ] ) {
					$.datepicker._hideDatepicker();
				} else if ( $.datepicker._datepickerShowing && $.datepicker._lastInput !== input[ 0 ] ) {
					$.datepicker._hideDatepicker();
					$.datepicker._showDatepicker( input[ 0 ] );
				} else {
					$.datepicker._showDatepicker( input[ 0 ] );
				}
				return false;
			} );
		}
	},

	/* Apply the maximum length for the date format. */
	_autoSize: function( inst ) {
		if ( this._get( inst, "autoSize" ) && !inst.inline ) {
			var findMax, max, maxI, i,
				date = new Date( 2009, 12 - 1, 20 ), // Ensure double digits
				dateFormat = this._get( inst, "dateFormat" );

			if ( dateFormat.match( /[DM]/ ) ) {
				findMax = function( names ) {
					max = 0;
					maxI = 0;
					for ( i = 0; i < names.length; i++ ) {
						if ( names[ i ].length > max ) {
							max = names[ i ].length;
							maxI = i;
						}
					}
					return maxI;
				};
				date.setMonth( findMax( this._get( inst, ( dateFormat.match( /MM/ ) ?
					"monthNames" : "monthNamesShort" ) ) ) );
				date.setDate( findMax( this._get( inst, ( dateFormat.match( /DD/ ) ?
					"dayNames" : "dayNamesShort" ) ) ) + 20 - date.getDay() );
			}
			inst.input.attr( "size", this._formatDate( inst, date ).length );
		}
	},

	/* Attach an inline date picker to a div. */
	_inlineDatepicker: function( target, inst ) {
		var divSpan = $( target );
		if ( divSpan.hasClass( this.markerClassName ) ) {
			return;
		}
		divSpan.addClass( this.markerClassName ).append( inst.dpDiv );
		$.data( target, "datepicker", inst );
		this._setDate( inst, this._getDefaultDate( inst ), true );
		this._updateDatepicker( inst );
		this._updateAlternate( inst );

		//If disabled option is true, disable the datepicker before showing it (see ticket #5665)
		if ( inst.settings.disabled ) {
			this._disableDatepicker( target );
		}

		// Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements
		// https://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
		inst.dpDiv.css( "display", "block" );
	},

	/* Pop-up the date picker in a "dialog" box.
	 * @param  input element - ignored
	 * @param  date	string or Date - the initial date to display
	 * @param  onSelect  function - the function to call when a date is selected
	 * @param  settings  object - update the dialog date picker instance's settings (anonymous object)
	 * @param  pos int[2] - coordinates for the dialog's position within the screen or
	 *					event - with x/y coordinates or
	 *					leave empty for default (screen centre)
	 * @return the manager object
	 */
	_dialogDatepicker: function( input, date, onSelect, settings, pos ) {
		var id, browserWidth, browserHeight, scrollX, scrollY,
			inst = this._dialogInst; // internal instance

		if ( !inst ) {
			this.uuid += 1;
			id = "dp" + this.uuid;
			this._dialogInput = $( "<input type='text' id='" + id +
				"' style='position: absolute; top: -100px; width: 0px;'/>" );
			this._dialogInput.on( "keydown", this._doKeyDown );
			$( "body" ).append( this._dialogInput );
			inst = this._dialogInst = this._newInst( this._dialogInput, false );
			inst.settings = {};
			$.data( this._dialogInput[ 0 ], "datepicker", inst );
		}
		datepicker_extendRemove( inst.settings, settings || {} );
		date = ( date && date.constructor === Date ? this._formatDate( inst, date ) : date );
		this._dialogInput.val( date );

		this._pos = ( pos ? ( pos.length ? pos : [ pos.pageX, pos.pageY ] ) : null );
		if ( !this._pos ) {
			browserWidth = document.documentElement.clientWidth;
			browserHeight = document.documentElement.clientHeight;
			scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
			scrollY = document.documentElement.scrollTop || document.body.scrollTop;
			this._pos = // should use actual width/height below
				[ ( browserWidth / 2 ) - 100 + scrollX, ( browserHeight / 2 ) - 150 + scrollY ];
		}

		// Move input on screen for focus, but hidden behind dialog
		this._dialogInput.css( "left", ( this._pos[ 0 ] + 20 ) + "px" ).css( "top", this._pos[ 1 ] + "px" );
		inst.settings.onSelect = onSelect;
		this._inDialog = true;
		this.dpDiv.addClass( this._dialogClass );
		this._showDatepicker( this._dialogInput[ 0 ] );
		if ( $.blockUI ) {
			$.blockUI( this.dpDiv );
		}
		$.data( this._dialogInput[ 0 ], "datepicker", inst );
		return this;
	},

	/* Detach a datepicker from its control.
	 * @param  target	element - the target input field or division or span
	 */
	_destroyDatepicker: function( target ) {
		var nodeName,
			$target = $( target ),
			inst = $.data( target, "datepicker" );

		if ( !$target.hasClass( this.markerClassName ) ) {
			return;
		}

		nodeName = target.nodeName.toLowerCase();
		$.removeData( target, "datepicker" );
		if ( nodeName === "input" ) {
			inst.append.remove();
			inst.trigger.remove();
			$target.removeClass( this.markerClassName ).
				off( "focus", this._showDatepicker ).
				off( "keydown", this._doKeyDown ).
				off( "keypress", this._doKeyPress ).
				off( "keyup", this._doKeyUp );
		} else if ( nodeName === "div" || nodeName === "span" ) {
			$target.removeClass( this.markerClassName ).empty();
		}

		if ( datepicker_instActive === inst ) {
			datepicker_instActive = null;
			this._curInst = null;
		}
	},

	/* Enable the date picker to a jQuery selection.
	 * @param  target	element - the target input field or division or span
	 */
	_enableDatepicker: function( target ) {
		var nodeName, inline,
			$target = $( target ),
			inst = $.data( target, "datepicker" );

		if ( !$target.hasClass( this.markerClassName ) ) {
			return;
		}

		nodeName = target.nodeName.toLowerCase();
		if ( nodeName === "input" ) {
			target.disabled = false;
			inst.trigger.filter( "button" ).
				each( function() {
					this.disabled = false;
				} ).end().
				filter( "img" ).css( { opacity: "1.0", cursor: "" } );
		} else if ( nodeName === "div" || nodeName === "span" ) {
			inline = $target.children( "." + this._inlineClass );
			inline.children().removeClass( "ui-state-disabled" );
			inline.find( "select.ui-datepicker-month, select.ui-datepicker-year" ).
				prop( "disabled", false );
		}
		this._disabledInputs = $.map( this._disabledInputs,

			// Delete entry
			function( value ) {
				return ( value === target ? null : value );
			} );
	},

	/* Disable the date picker to a jQuery selection.
	 * @param  target	element - the target input field or division or span
	 */
	_disableDatepicker: function( target ) {
		var nodeName, inline,
			$target = $( target ),
			inst = $.data( target, "datepicker" );

		if ( !$target.hasClass( this.markerClassName ) ) {
			return;
		}

		nodeName = target.nodeName.toLowerCase();
		if ( nodeName === "input" ) {
			target.disabled = true;
			inst.trigger.filter( "button" ).
				each( function() {
					this.disabled = true;
				} ).end().
				filter( "img" ).css( { opacity: "0.5", cursor: "default" } );
		} else if ( nodeName === "div" || nodeName === "span" ) {
			inline = $target.children( "." + this._inlineClass );
			inline.children().addClass( "ui-state-disabled" );
			inline.find( "select.ui-datepicker-month, select.ui-datepicker-year" ).
				prop( "disabled", true );
		}
		this._disabledInputs = $.map( this._disabledInputs,

			// Delete entry
			function( value ) {
				return ( value === target ? null : value );
			} );
		this._disabledInputs[ this._disabledInputs.length ] = target;
	},

	/* Is the first field in a jQuery collection disabled as a datepicker?
	 * @param  target	element - the target input field or division or span
	 * @return boolean - true if disabled, false if enabled
	 */
	_isDisabledDatepicker: function( target ) {
		if ( !target ) {
			return false;
		}
		for ( var i = 0; i < this._disabledInputs.length; i++ ) {
			if ( this._disabledInputs[ i ] === target ) {
				return true;
			}
		}
		return false;
	},

	/* Retrieve the instance data for the target control.
	 * @param  target  element - the target input field or division or span
	 * @return  object - the associated instance data
	 * @throws  error if a jQuery problem getting data
	 */
	_getInst: function( target ) {
		try {
			return $.data( target, "datepicker" );
		} catch ( err ) {
			throw "Missing instance data for this datepicker";
		}
	},

	/* Update or retrieve the settings for a date picker attached to an input field or division.
	 * @param  target  element - the target input field or division or span
	 * @param  name	object - the new settings to update or
	 *				string - the name of the setting to change or retrieve,
	 *				when retrieving also "all" for all instance settings or
	 *				"defaults" for all global defaults
	 * @param  value   any - the new value for the setting
	 *				(omit if above is an object or to retrieve a value)
	 */
	_optionDatepicker: function( target, name, value ) {
		var settings, date, minDate, maxDate,
			inst = this._getInst( target );

		if ( arguments.length === 2 && typeof name === "string" ) {
			return ( name === "defaults" ? $.extend( {}, $.datepicker._defaults ) :
				( inst ? ( name === "all" ? $.extend( {}, inst.settings ) :
				this._get( inst, name ) ) : null ) );
		}

		settings = name || {};
		if ( typeof name === "string" ) {
			settings = {};
			settings[ name ] = value;
		}

		if ( inst ) {
			if ( this._curInst === inst ) {
				this._hideDatepicker();
			}

			date = this._getDateDatepicker( target, true );
			minDate = this._getMinMaxDate( inst, "min" );
			maxDate = this._getMinMaxDate( inst, "max" );
			datepicker_extendRemove( inst.settings, settings );

			// reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
			if ( minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined ) {
				inst.settings.minDate = this._formatDate( inst, minDate );
			}
			if ( maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined ) {
				inst.settings.maxDate = this._formatDate( inst, maxDate );
			}
			if ( "disabled" in settings ) {
				if ( settings.disabled ) {
					this._disableDatepicker( target );
				} else {
					this._enableDatepicker( target );
				}
			}
			this._attachments( $( target ), inst );
			this._autoSize( inst );
			this._setDate( inst, date );
			this._updateAlternate( inst );
			this._updateDatepicker( inst );
		}
	},

	// Change method deprecated
	_changeDatepicker: function( target, name, value ) {
		this._optionDatepicker( target, name, value );
	},

	/* Redraw the date picker attached to an input field or division.
	 * @param  target  element - the target input field or division or span
	 */
	_refreshDatepicker: function( target ) {
		var inst = this._getInst( target );
		if ( inst ) {
			this._updateDatepicker( inst );
		}
	},

	/* Set the dates for a jQuery selection.
	 * @param  target element - the target input field or division or span
	 * @param  date	Date - the new date
	 */
	_setDateDatepicker: function( target, date ) {
		var inst = this._getInst( target );
		if ( inst ) {
			this._setDate( inst, date );
			this._updateDatepicker( inst );
			this._updateAlternate( inst );
		}
	},

	/* Get the date(s) for the first entry in a jQuery selection.
	 * @param  target element - the target input field or division or span
	 * @param  noDefault boolean - true if no default date is to be used
	 * @return Date - the current date
	 */
	_getDateDatepicker: function( target, noDefault ) {
		var inst = this._getInst( target );
		if ( inst && !inst.inline ) {
			this._setDateFromField( inst, noDefault );
		}
		return ( inst ? this._getDate( inst ) : null );
	},

	/* Handle keystrokes. */
	_doKeyDown: function( event ) {
		var onSelect, dateStr, sel,
			inst = $.datepicker._getInst( event.target ),
			handled = true,
			isRTL = inst.dpDiv.is( ".ui-datepicker-rtl" );

		inst._keyEvent = true;
		if ( $.datepicker._datepickerShowing ) {
			switch ( event.keyCode ) {
				case 9: $.datepicker._hideDatepicker();
						handled = false;
						break; // hide on tab out
				case 13: sel = $( "td." + $.datepicker._dayOverClass + ":not(." +
									$.datepicker._currentClass + ")", inst.dpDiv );
						if ( sel[ 0 ] ) {
							$.datepicker._selectDay( event.target, inst.selectedMonth, inst.selectedYear, sel[ 0 ] );
						}

						onSelect = $.datepicker._get( inst, "onSelect" );
						if ( onSelect ) {
							dateStr = $.datepicker._formatDate( inst );

							// Trigger custom callback
							onSelect.apply( ( inst.input ? inst.input[ 0 ] : null ), [ dateStr, inst ] );
						} else {
							$.datepicker._hideDatepicker();
						}

						return false; // don't submit the form
				case 27: $.datepicker._hideDatepicker();
						break; // hide on escape
				case 33: $.datepicker._adjustDate( event.target, ( event.ctrlKey ?
							-$.datepicker._get( inst, "stepBigMonths" ) :
							-$.datepicker._get( inst, "stepMonths" ) ), "M" );
						break; // previous month/year on page up/+ ctrl
				case 34: $.datepicker._adjustDate( event.target, ( event.ctrlKey ?
							+$.datepicker._get( inst, "stepBigMonths" ) :
							+$.datepicker._get( inst, "stepMonths" ) ), "M" );
						break; // next month/year on page down/+ ctrl
				case 35: if ( event.ctrlKey || event.metaKey ) {
							$.datepicker._clearDate( event.target );
						}
						handled = event.ctrlKey || event.metaKey;
						break; // clear on ctrl or command +end
				case 36: if ( event.ctrlKey || event.metaKey ) {
							$.datepicker._gotoToday( event.target );
						}
						handled = event.ctrlKey || event.metaKey;
						break; // current on ctrl or command +home
				case 37: if ( event.ctrlKey || event.metaKey ) {
							$.datepicker._adjustDate( event.target, ( isRTL ? +1 : -1 ), "D" );
						}
						handled = event.ctrlKey || event.metaKey;

						// -1 day on ctrl or command +left
						if ( event.originalEvent.altKey ) {
							$.datepicker._adjustDate( event.target, ( event.ctrlKey ?
								-$.datepicker._get( inst, "stepBigMonths" ) :
								-$.datepicker._get( inst, "stepMonths" ) ), "M" );
						}

						// next month/year on alt +left on Mac
						break;
				case 38: if ( event.ctrlKey || event.metaKey ) {
							$.datepicker._adjustDate( event.target, -7, "D" );
						}
						handled = event.ctrlKey || event.metaKey;
						break; // -1 week on ctrl or command +up
				case 39: if ( event.ctrlKey || event.metaKey ) {
							$.datepicker._adjustDate( event.target, ( isRTL ? -1 : +1 ), "D" );
						}
						handled = event.ctrlKey || event.metaKey;

						// +1 day on ctrl or command +right
						if ( event.originalEvent.altKey ) {
							$.datepicker._adjustDate( event.target, ( event.ctrlKey ?
								+$.datepicker._get( inst, "stepBigMonths" ) :
								+$.datepicker._get( inst, "stepMonths" ) ), "M" );
						}

						// next month/year on alt +right
						break;
				case 40: if ( event.ctrlKey || event.metaKey ) {
							$.datepicker._adjustDate( event.target, +7, "D" );
						}
						handled = event.ctrlKey || event.metaKey;
						break; // +1 week on ctrl or command +down
				default: handled = false;
			}
		} else if ( event.keyCode === 36 && event.ctrlKey ) { // display the date picker on ctrl+home
			$.datepicker._showDatepicker( this );
		} else {
			handled = false;
		}

		if ( handled ) {
			event.preventDefault();
			event.stopPropagation();
		}
	},

	/* Filter entered characters - based on date format. */
	_doKeyPress: function( event ) {
		var chars, chr,
			inst = $.datepicker._getInst( event.target );

		if ( $.datepicker._get( inst, "constrainInput" ) ) {
			chars = $.datepicker._possibleChars( $.datepicker._get( inst, "dateFormat" ) );
			chr = String.fromCharCode( event.charCode == null ? event.keyCode : event.charCode );
			return event.ctrlKey || event.metaKey || ( chr < " " || !chars || chars.indexOf( chr ) > -1 );
		}
	},

	/* Synchronise manual entry and field/alternate field. */
	_doKeyUp: function( event ) {
		var date,
			inst = $.datepicker._getInst( event.target );

		if ( inst.input.val() !== inst.lastVal ) {
			try {
				date = $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ),
					( inst.input ? inst.input.val() : null ),
					$.datepicker._getFormatConfig( inst ) );

				if ( date ) { // only if valid
					$.datepicker._setDateFromField( inst );
					$.datepicker._updateAlternate( inst );
					$.datepicker._updateDatepicker( inst );
				}
			} catch ( err ) {
			}
		}
		return true;
	},

	/* Pop-up the date picker for a given input field.
	 * If false returned from beforeShow event handler do not show.
	 * @param  input  element - the input field attached to the date picker or
	 *					event - if triggered by focus
	 */
	_showDatepicker: function( input ) {
		input = input.target || input;
		if ( input.nodeName.toLowerCase() !== "input" ) { // find from button/image trigger
			input = $( "input", input.parentNode )[ 0 ];
		}

		if ( $.datepicker._isDisabledDatepicker( input ) || $.datepicker._lastInput === input ) { // already here
			return;
		}

		var inst, beforeShow, beforeShowSettings, isFixed,
			offset, showAnim, duration;

		inst = $.datepicker._getInst( input );
		if ( $.datepicker._curInst && $.datepicker._curInst !== inst ) {
			$.datepicker._curInst.dpDiv.stop( true, true );
			if ( inst && $.datepicker._datepickerShowing ) {
				$.datepicker._hideDatepicker( $.datepicker._curInst.input[ 0 ] );
			}
		}

		beforeShow = $.datepicker._get( inst, "beforeShow" );
		beforeShowSettings = beforeShow ? beforeShow.apply( input, [ input, inst ] ) : {};
		if ( beforeShowSettings === false ) {
			return;
		}
		datepicker_extendRemove( inst.settings, beforeShowSettings );

		inst.lastVal = null;
		$.datepicker._lastInput = input;
		$.datepicker._setDateFromField( inst );

		if ( $.datepicker._inDialog ) { // hide cursor
			input.value = "";
		}
		if ( !$.datepicker._pos ) { // position below input
			$.datepicker._pos = $.datepicker._findPos( input );
			$.datepicker._pos[ 1 ] += input.offsetHeight; // add the height
		}

		isFixed = false;
		$( input ).parents().each( function() {
			isFixed |= $( this ).css( "position" ) === "fixed";
			return !isFixed;
		} );

		offset = { left: $.datepicker._pos[ 0 ], top: $.datepicker._pos[ 1 ] };
		$.datepicker._pos = null;

		//to avoid flashes on Firefox
		inst.dpDiv.empty();

		// determine sizing offscreen
		inst.dpDiv.css( { position: "absolute", display: "block", top: "-1000px" } );
		$.datepicker._updateDatepicker( inst );

		// fix width for dynamic number of date pickers
		// and adjust position before showing
		offset = $.datepicker._checkOffset( inst, offset, isFixed );
		inst.dpDiv.css( { position: ( $.datepicker._inDialog && $.blockUI ?
			"static" : ( isFixed ? "fixed" : "absolute" ) ), display: "none",
			left: offset.left + "px", top: offset.top + "px" } );

		if ( !inst.inline ) {
			showAnim = $.datepicker._get( inst, "showAnim" );
			duration = $.datepicker._get( inst, "duration" );
			inst.dpDiv.css( "z-index", datepicker_getZindex( $( input ) ) + 1 );
			$.datepicker._datepickerShowing = true;

			if ( $.effects && $.effects.effect[ showAnim ] ) {
				inst.dpDiv.show( showAnim, $.datepicker._get( inst, "showOptions" ), duration );
			} else {
				inst.dpDiv[ showAnim || "show" ]( showAnim ? duration : null );
			}

			if ( $.datepicker._shouldFocusInput( inst ) ) {
				inst.input.trigger( "focus" );
			}

			$.datepicker._curInst = inst;
		}
	},

	/* Generate the date picker content. */
	_updateDatepicker: function( inst ) {
		this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
		datepicker_instActive = inst; // for delegate hover events
		inst.dpDiv.empty().append( this._generateHTML( inst ) );
		this._attachHandlers( inst );

		var origyearshtml,
			numMonths = this._getNumberOfMonths( inst ),
			cols = numMonths[ 1 ],
			width = 17,
			activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" ),
			onUpdateDatepicker = $.datepicker._get( inst, "onUpdateDatepicker" );

		if ( activeCell.length > 0 ) {
			datepicker_handleMouseover.apply( activeCell.get( 0 ) );
		}

		inst.dpDiv.removeClass( "ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4" ).width( "" );
		if ( cols > 1 ) {
			inst.dpDiv.addClass( "ui-datepicker-multi-" + cols ).css( "width", ( width * cols ) + "em" );
		}
		inst.dpDiv[ ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ? "add" : "remove" ) +
			"Class" ]( "ui-datepicker-multi" );
		inst.dpDiv[ ( this._get( inst, "isRTL" ) ? "add" : "remove" ) +
			"Class" ]( "ui-datepicker-rtl" );

		if ( inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) {
			inst.input.trigger( "focus" );
		}

		// Deffered render of the years select (to avoid flashes on Firefox)
		if ( inst.yearshtml ) {
			origyearshtml = inst.yearshtml;
			setTimeout( function() {

				//assure that inst.yearshtml didn't change.
				if ( origyearshtml === inst.yearshtml && inst.yearshtml ) {
					inst.dpDiv.find( "select.ui-datepicker-year" ).first().replaceWith( inst.yearshtml );
				}
				origyearshtml = inst.yearshtml = null;
			}, 0 );
		}

		if ( onUpdateDatepicker ) {
			onUpdateDatepicker.apply( ( inst.input ? inst.input[ 0 ] : null ), [ inst ] );
		}
	},

	// #6694 - don't focus the input if it's already focused
	// this breaks the change event in IE
	// Support: IE and jQuery <1.9
	_shouldFocusInput: function( inst ) {
		return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" );
	},

	/* Check positioning to remain on screen. */
	_checkOffset: function( inst, offset, isFixed ) {
		var dpWidth = inst.dpDiv.outerWidth(),
			dpHeight = inst.dpDiv.outerHeight(),
			inputWidth = inst.input ? inst.input.outerWidth() : 0,
			inputHeight = inst.input ? inst.input.outerHeight() : 0,
			viewWidth = document.documentElement.clientWidth + ( isFixed ? 0 : $( document ).scrollLeft() ),
			viewHeight = document.documentElement.clientHeight + ( isFixed ? 0 : $( document ).scrollTop() );

		offset.left -= ( this._get( inst, "isRTL" ) ? ( dpWidth - inputWidth ) : 0 );
		offset.left -= ( isFixed && offset.left === inst.input.offset().left ) ? $( document ).scrollLeft() : 0;
		offset.top -= ( isFixed && offset.top === ( inst.input.offset().top + inputHeight ) ) ? $( document ).scrollTop() : 0;

		// Now check if datepicker is showing outside window viewport - move to a better place if so.
		offset.left -= Math.min( offset.left, ( offset.left + dpWidth > viewWidth && viewWidth > dpWidth ) ?
			Math.abs( offset.left + dpWidth - viewWidth ) : 0 );
		offset.top -= Math.min( offset.top, ( offset.top + dpHeight > viewHeight && viewHeight > dpHeight ) ?
			Math.abs( dpHeight + inputHeight ) : 0 );

		return offset;
	},

	/* Find an object's position on the screen. */
	_findPos: function( obj ) {
		var position,
			inst = this._getInst( obj ),
			isRTL = this._get( inst, "isRTL" );

		while ( obj && ( obj.type === "hidden" || obj.nodeType !== 1 || $.expr.pseudos.hidden( obj ) ) ) {
			obj = obj[ isRTL ? "previousSibling" : "nextSibling" ];
		}

		position = $( obj ).offset();
		return [ position.left, position.top ];
	},

	/* Hide the date picker from view.
	 * @param  input  element - the input field attached to the date picker
	 */
	_hideDatepicker: function( input ) {
		var showAnim, duration, postProcess, onClose,
			inst = this._curInst;

		if ( !inst || ( input && inst !== $.data( input, "datepicker" ) ) ) {
			return;
		}

		if ( this._datepickerShowing ) {
			showAnim = this._get( inst, "showAnim" );
			duration = this._get( inst, "duration" );
			postProcess = function() {
				$.datepicker._tidyDialog( inst );
			};

			// DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
			if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) {
				inst.dpDiv.hide( showAnim, $.datepicker._get( inst, "showOptions" ), duration, postProcess );
			} else {
				inst.dpDiv[ ( showAnim === "slideDown" ? "slideUp" :
					( showAnim === "fadeIn" ? "fadeOut" : "hide" ) ) ]( ( showAnim ? duration : null ), postProcess );
			}

			if ( !showAnim ) {
				postProcess();
			}
			this._datepickerShowing = false;

			onClose = this._get( inst, "onClose" );
			if ( onClose ) {
				onClose.apply( ( inst.input ? inst.input[ 0 ] : null ), [ ( inst.input ? inst.input.val() : "" ), inst ] );
			}

			this._lastInput = null;
			if ( this._inDialog ) {
				this._dialogInput.css( { position: "absolute", left: "0", top: "-100px" } );
				if ( $.blockUI ) {
					$.unblockUI();
					$( "body" ).append( this.dpDiv );
				}
			}
			this._inDialog = false;
		}
	},

	/* Tidy up after a dialog display. */
	_tidyDialog: function( inst ) {
		inst.dpDiv.removeClass( this._dialogClass ).off( ".ui-datepicker-calendar" );
	},

	/* Close date picker if clicked elsewhere. */
	_checkExternalClick: function( event ) {
		if ( !$.datepicker._curInst ) {
			return;
		}

		var $target = $( event.target ),
			inst = $.datepicker._getInst( $target[ 0 ] );

		if ( ( ( $target[ 0 ].id !== $.datepicker._mainDivId &&
				$target.parents( "#" + $.datepicker._mainDivId ).length === 0 &&
				!$target.hasClass( $.datepicker.markerClassName ) &&
				!$target.closest( "." + $.datepicker._triggerClass ).length &&
				$.datepicker._datepickerShowing && !( $.datepicker._inDialog && $.blockUI ) ) ) ||
			( $target.hasClass( $.datepicker.markerClassName ) && $.datepicker._curInst !== inst ) ) {
				$.datepicker._hideDatepicker();
		}
	},

	/* Adjust one of the date sub-fields. */
	_adjustDate: function( id, offset, period ) {
		var target = $( id ),
			inst = this._getInst( target[ 0 ] );

		if ( this._isDisabledDatepicker( target[ 0 ] ) ) {
			return;
		}
		this._adjustInstDate( inst, offset, period );
		this._updateDatepicker( inst );
	},

	/* Action for current link. */
	_gotoToday: function( id ) {
		var date,
			target = $( id ),
			inst = this._getInst( target[ 0 ] );

		if ( this._get( inst, "gotoCurrent" ) && inst.currentDay ) {
			inst.selectedDay = inst.currentDay;
			inst.drawMonth = inst.selectedMonth = inst.currentMonth;
			inst.drawYear = inst.selectedYear = inst.currentYear;
		} else {
			date = new Date();
			inst.selectedDay = date.getDate();
			inst.drawMonth = inst.selectedMonth = date.getMonth();
			inst.drawYear = inst.selectedYear = date.getFullYear();
		}
		this._notifyChange( inst );
		this._adjustDate( target );
	},

	/* Action for selecting a new month/year. */
	_selectMonthYear: function( id, select, period ) {
		var target = $( id ),
			inst = this._getInst( target[ 0 ] );

		inst[ "selected" + ( period === "M" ? "Month" : "Year" ) ] =
		inst[ "draw" + ( period === "M" ? "Month" : "Year" ) ] =
			parseInt( select.options[ select.selectedIndex ].value, 10 );

		this._notifyChange( inst );
		this._adjustDate( target );
	},

	/* Action for selecting a day. */
	_selectDay: function( id, month, year, td ) {
		var inst,
			target = $( id );

		if ( $( td ).hasClass( this._unselectableClass ) || this._isDisabledDatepicker( target[ 0 ] ) ) {
			return;
		}

		inst = this._getInst( target[ 0 ] );
		inst.selectedDay = inst.currentDay = parseInt( $( "a", td ).attr( "data-date" ) );
		inst.selectedMonth = inst.currentMonth = month;
		inst.selectedYear = inst.currentYear = year;
		this._selectDate( id, this._formatDate( inst,
			inst.currentDay, inst.currentMonth, inst.currentYear ) );
	},

	/* Erase the input field and hide the date picker. */
	_clearDate: function( id ) {
		var target = $( id );
		this._selectDate( target, "" );
	},

	/* Update the input field with the selected date. */
	_selectDate: function( id, dateStr ) {
		var onSelect,
			target = $( id ),
			inst = this._getInst( target[ 0 ] );

		dateStr = ( dateStr != null ? dateStr : this._formatDate( inst ) );
		if ( inst.input ) {
			inst.input.val( dateStr );
		}
		this._updateAlternate( inst );

		onSelect = this._get( inst, "onSelect" );
		if ( onSelect ) {
			onSelect.apply( ( inst.input ? inst.input[ 0 ] : null ), [ dateStr, inst ] );  // trigger custom callback
		} else if ( inst.input ) {
			inst.input.trigger( "change" ); // fire the change event
		}

		if ( inst.inline ) {
			this._updateDatepicker( inst );
		} else {
			this._hideDatepicker();
			this._lastInput = inst.input[ 0 ];
			if ( typeof( inst.input[ 0 ] ) !== "object" ) {
				inst.input.trigger( "focus" ); // restore focus
			}
			this._lastInput = null;
		}
	},

	/* Update any alternate field to synchronise with the main field. */
	_updateAlternate: function( inst ) {
		var altFormat, date, dateStr,
			altField = this._get( inst, "altField" );

		if ( altField ) { // update alternate field too
			altFormat = this._get( inst, "altFormat" ) || this._get( inst, "dateFormat" );
			date = this._getDate( inst );
			dateStr = this.formatDate( altFormat, date, this._getFormatConfig( inst ) );
			$( document ).find( altField ).val( dateStr );
		}
	},

	/* Set as beforeShowDay function to prevent selection of weekends.
	 * @param  date  Date - the date to customise
	 * @return [boolean, string] - is this date selectable?, what is its CSS class?
	 */
	noWeekends: function( date ) {
		var day = date.getDay();
		return [ ( day > 0 && day < 6 ), "" ];
	},

	/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
	 * @param  date  Date - the date to get the week for
	 * @return  number - the number of the week within the year that contains this date
	 */
	iso8601Week: function( date ) {
		var time,
			checkDate = new Date( date.getTime() );

		// Find Thursday of this week starting on Monday
		checkDate.setDate( checkDate.getDate() + 4 - ( checkDate.getDay() || 7 ) );

		time = checkDate.getTime();
		checkDate.setMonth( 0 ); // Compare with Jan 1
		checkDate.setDate( 1 );
		return Math.floor( Math.round( ( time - checkDate ) / 86400000 ) / 7 ) + 1;
	},

	/* Parse a string value into a date object.
	 * See formatDate below for the possible formats.
	 *
	 * @param  format string - the expected format of the date
	 * @param  value string - the date in the above format
	 * @param  settings Object - attributes include:
	 *					shortYearCutoff  number - the cutoff year for determining the century (optional)
	 *					dayNamesShort	string[7] - abbreviated names of the days from Sunday (optional)
	 *					dayNames		string[7] - names of the days from Sunday (optional)
	 *					monthNamesShort string[12] - abbreviated names of the months (optional)
	 *					monthNames		string[12] - names of the months (optional)
	 * @return  Date - the extracted date value or null if value is blank
	 */
	parseDate: function( format, value, settings ) {
		if ( format == null || value == null ) {
			throw "Invalid arguments";
		}

		value = ( typeof value === "object" ? value.toString() : value + "" );
		if ( value === "" ) {
			return null;
		}

		var iFormat, dim, extra,
			iValue = 0,
			shortYearCutoffTemp = ( settings ? settings.shortYearCutoff : null ) || this._defaults.shortYearCutoff,
			shortYearCutoff = ( typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp :
				new Date().getFullYear() % 100 + parseInt( shortYearCutoffTemp, 10 ) ),
			dayNamesShort = ( settings ? settings.dayNamesShort : null ) || this._defaults.dayNamesShort,
			dayNames = ( settings ? settings.dayNames : null ) || this._defaults.dayNames,
			monthNamesShort = ( settings ? settings.monthNamesShort : null ) || this._defaults.monthNamesShort,
			monthNames = ( settings ? settings.monthNames : null ) || this._defaults.monthNames,
			year = -1,
			month = -1,
			day = -1,
			doy = -1,
			literal = false,
			date,

			// Check whether a format character is doubled
			lookAhead = function( match ) {
				var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );
				if ( matches ) {
					iFormat++;
				}
				return matches;
			},

			// Extract a number from the string value
			getNumber = function( match ) {
				var isDoubled = lookAhead( match ),
					size = ( match === "@" ? 14 : ( match === "!" ? 20 :
					( match === "y" && isDoubled ? 4 : ( match === "o" ? 3 : 2 ) ) ) ),
					minSize = ( match === "y" ? size : 1 ),
					digits = new RegExp( "^\\d{" + minSize + "," + size + "}" ),
					num = value.substring( iValue ).match( digits );
				if ( !num ) {
					throw "Missing number at position " + iValue;
				}
				iValue += num[ 0 ].length;
				return parseInt( num[ 0 ], 10 );
			},

			// Extract a name from the string value and convert to an index
			getName = function( match, shortNames, longNames ) {
				var index = -1,
					names = $.map( lookAhead( match ) ? longNames : shortNames, function( v, k ) {
						return [ [ k, v ] ];
					} ).sort( function( a, b ) {
						return -( a[ 1 ].length - b[ 1 ].length );
					} );

				$.each( names, function( i, pair ) {
					var name = pair[ 1 ];
					if ( value.substr( iValue, name.length ).toLowerCase() === name.toLowerCase() ) {
						index = pair[ 0 ];
						iValue += name.length;
						return false;
					}
				} );
				if ( index !== -1 ) {
					return index + 1;
				} else {
					throw "Unknown name at position " + iValue;
				}
			},

			// Confirm that a literal character matches the string value
			checkLiteral = function() {
				if ( value.charAt( iValue ) !== format.charAt( iFormat ) ) {
					throw "Unexpected literal at position " + iValue;
				}
				iValue++;
			};

		for ( iFormat = 0; iFormat < format.length; iFormat++ ) {
			if ( literal ) {
				if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) {
					literal = false;
				} else {
					checkLiteral();
				}
			} else {
				switch ( format.charAt( iFormat ) ) {
					case "d":
						day = getNumber( "d" );
						break;
					case "D":
						getName( "D", dayNamesShort, dayNames );
						break;
					case "o":
						doy = getNumber( "o" );
						break;
					case "m":
						month = getNumber( "m" );
						break;
					case "M":
						month = getName( "M", monthNamesShort, monthNames );
						break;
					case "y":
						year = getNumber( "y" );
						break;
					case "@":
						date = new Date( getNumber( "@" ) );
						year = date.getFullYear();
						month = date.getMonth() + 1;
						day = date.getDate();
						break;
					case "!":
						date = new Date( ( getNumber( "!" ) - this._ticksTo1970 ) / 10000 );
						year = date.getFullYear();
						month = date.getMonth() + 1;
						day = date.getDate();
						break;
					case "'":
						if ( lookAhead( "'" ) ) {
							checkLiteral();
						} else {
							literal = true;
						}
						break;
					default:
						checkLiteral();
				}
			}
		}

		if ( iValue < value.length ) {
			extra = value.substr( iValue );
			if ( !/^\s+/.test( extra ) ) {
				throw "Extra/unparsed characters found in date: " + extra;
			}
		}

		if ( year === -1 ) {
			year = new Date().getFullYear();
		} else if ( year < 100 ) {
			year += new Date().getFullYear() - new Date().getFullYear() % 100 +
				( year <= shortYearCutoff ? 0 : -100 );
		}

		if ( doy > -1 ) {
			month = 1;
			day = doy;
			do {
				dim = this._getDaysInMonth( year, month - 1 );
				if ( day <= dim ) {
					break;
				}
				month++;
				day -= dim;
			} while ( true );
		}

		date = this._daylightSavingAdjust( new Date( year, month - 1, day ) );
		if ( date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day ) {
			throw "Invalid date"; // E.g. 31/02/00
		}
		return date;
	},

	/* Standard date formats. */
	ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601)
	COOKIE: "D, dd M yy",
	ISO_8601: "yy-mm-dd",
	RFC_822: "D, d M y",
	RFC_850: "DD, dd-M-y",
	RFC_1036: "D, d M y",
	RFC_1123: "D, d M yy",
	RFC_2822: "D, d M yy",
	RSS: "D, d M y", // RFC 822
	TICKS: "!",
	TIMESTAMP: "@",
	W3C: "yy-mm-dd", // ISO 8601

	_ticksTo1970: ( ( ( 1970 - 1 ) * 365 + Math.floor( 1970 / 4 ) - Math.floor( 1970 / 100 ) +
		Math.floor( 1970 / 400 ) ) * 24 * 60 * 60 * 10000000 ),

	/* Format a date object into a string value.
	 * The format can be combinations of the following:
	 * d  - day of month (no leading zero)
	 * dd - day of month (two digit)
	 * o  - day of year (no leading zeros)
	 * oo - day of year (three digit)
	 * D  - day name short
	 * DD - day name long
	 * m  - month of year (no leading zero)
	 * mm - month of year (two digit)
	 * M  - month name short
	 * MM - month name long
	 * y  - year (two digit)
	 * yy - year (four digit)
	 * @ - Unix timestamp (ms since 01/01/1970)
	 * ! - Windows ticks (100ns since 01/01/0001)
	 * "..." - literal text
	 * '' - single quote
	 *
	 * @param  format string - the desired format of the date
	 * @param  date Date - the date value to format
	 * @param  settings Object - attributes include:
	 *					dayNamesShort	string[7] - abbreviated names of the days from Sunday (optional)
	 *					dayNames		string[7] - names of the days from Sunday (optional)
	 *					monthNamesShort string[12] - abbreviated names of the months (optional)
	 *					monthNames		string[12] - names of the months (optional)
	 * @return  string - the date in the above format
	 */
	formatDate: function( format, date, settings ) {
		if ( !date ) {
			return "";
		}

		var iFormat,
			dayNamesShort = ( settings ? settings.dayNamesShort : null ) || this._defaults.dayNamesShort,
			dayNames = ( settings ? settings.dayNames : null ) || this._defaults.dayNames,
			monthNamesShort = ( settings ? settings.monthNamesShort : null ) || this._defaults.monthNamesShort,
			monthNames = ( settings ? settings.monthNames : null ) || this._defaults.monthNames,

			// Check whether a format character is doubled
			lookAhead = function( match ) {
				var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );
				if ( matches ) {
					iFormat++;
				}
				return matches;
			},

			// Format a number, with leading zero if necessary
			formatNumber = function( match, value, len ) {
				var num = "" + value;
				if ( lookAhead( match ) ) {
					while ( num.length < len ) {
						num = "0" + num;
					}
				}
				return num;
			},

			// Format a name, short or long as requested
			formatName = function( match, value, shortNames, longNames ) {
				return ( lookAhead( match ) ? longNames[ value ] : shortNames[ value ] );
			},
			output = "",
			literal = false;

		if ( date ) {
			for ( iFormat = 0; iFormat < format.length; iFormat++ ) {
				if ( literal ) {
					if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) {
						literal = false;
					} else {
						output += format.charAt( iFormat );
					}
				} else {
					switch ( format.charAt( iFormat ) ) {
						case "d":
							output += formatNumber( "d", date.getDate(), 2 );
							break;
						case "D":
							output += formatName( "D", date.getDay(), dayNamesShort, dayNames );
							break;
						case "o":
							output += formatNumber( "o",
								Math.round( ( new Date( date.getFullYear(), date.getMonth(), date.getDate() ).getTime() - new Date( date.getFullYear(), 0, 0 ).getTime() ) / 86400000 ), 3 );
							break;
						case "m":
							output += formatNumber( "m", date.getMonth() + 1, 2 );
							break;
						case "M":
							output += formatName( "M", date.getMonth(), monthNamesShort, monthNames );
							break;
						case "y":
							output += ( lookAhead( "y" ) ? date.getFullYear() :
								( date.getFullYear() % 100 < 10 ? "0" : "" ) + date.getFullYear() % 100 );
							break;
						case "@":
							output += date.getTime();
							break;
						case "!":
							output += date.getTime() * 10000 + this._ticksTo1970;
							break;
						case "'":
							if ( lookAhead( "'" ) ) {
								output += "'";
							} else {
								literal = true;
							}
							break;
						default:
							output += format.charAt( iFormat );
					}
				}
			}
		}
		return output;
	},

	/* Extract all possible characters from the date format. */
	_possibleChars: function( format ) {
		var iFormat,
			chars = "",
			literal = false,

			// Check whether a format character is doubled
			lookAhead = function( match ) {
				var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );
				if ( matches ) {
					iFormat++;
				}
				return matches;
			};

		for ( iFormat = 0; iFormat < format.length; iFormat++ ) {
			if ( literal ) {
				if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) {
					literal = false;
				} else {
					chars += format.charAt( iFormat );
				}
			} else {
				switch ( format.charAt( iFormat ) ) {
					case "d": case "m": case "y": case "@":
						chars += "0123456789";
						break;
					case "D": case "M":
						return null; // Accept anything
					case "'":
						if ( lookAhead( "'" ) ) {
							chars += "'";
						} else {
							literal = true;
						}
						break;
					default:
						chars += format.charAt( iFormat );
				}
			}
		}
		return chars;
	},

	/* Get a setting value, defaulting if necessary. */
	_get: function( inst, name ) {
		return inst.settings[ name ] !== undefined ?
			inst.settings[ name ] : this._defaults[ name ];
	},

	/* Parse existing date and initialise date picker. */
	_setDateFromField: function( inst, noDefault ) {
		if ( inst.input.val() === inst.lastVal ) {
			return;
		}

		var dateFormat = this._get( inst, "dateFormat" ),
			dates = inst.lastVal = inst.input ? inst.input.val() : null,
			defaultDate = this._getDefaultDate( inst ),
			date = defaultDate,
			settings = this._getFormatConfig( inst );

		try {
			date = this.parseDate( dateFormat, dates, settings ) || defaultDate;
		} catch ( event ) {
			dates = ( noDefault ? "" : dates );
		}
		inst.selectedDay = date.getDate();
		inst.drawMonth = inst.selectedMonth = date.getMonth();
		inst.drawYear = inst.selectedYear = date.getFullYear();
		inst.currentDay = ( dates ? date.getDate() : 0 );
		inst.currentMonth = ( dates ? date.getMonth() : 0 );
		inst.currentYear = ( dates ? date.getFullYear() : 0 );
		this._adjustInstDate( inst );
	},

	/* Retrieve the default date shown on opening. */
	_getDefaultDate: function( inst ) {
		return this._restrictMinMax( inst,
			this._determineDate( inst, this._get( inst, "defaultDate" ), new Date() ) );
	},

	/* A date may be specified as an exact value or a relative one. */
	_determineDate: function( inst, date, defaultDate ) {
		var offsetNumeric = function( offset ) {
				var date = new Date();
				date.setDate( date.getDate() + offset );
				return date;
			},
			offsetString = function( offset ) {
				try {
					return $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ),
						offset, $.datepicker._getFormatConfig( inst ) );
				} catch ( e ) {

					// Ignore
				}

				var date = ( offset.toLowerCase().match( /^c/ ) ?
					$.datepicker._getDate( inst ) : null ) || new Date(),
					year = date.getFullYear(),
					month = date.getMonth(),
					day = date.getDate(),
					pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
					matches = pattern.exec( offset );

				while ( matches ) {
					switch ( matches[ 2 ] || "d" ) {
						case "d" : case "D" :
							day += parseInt( matches[ 1 ], 10 ); break;
						case "w" : case "W" :
							day += parseInt( matches[ 1 ], 10 ) * 7; break;
						case "m" : case "M" :
							month += parseInt( matches[ 1 ], 10 );
							day = Math.min( day, $.datepicker._getDaysInMonth( year, month ) );
							break;
						case "y": case "Y" :
							year += parseInt( matches[ 1 ], 10 );
							day = Math.min( day, $.datepicker._getDaysInMonth( year, month ) );
							break;
					}
					matches = pattern.exec( offset );
				}
				return new Date( year, month, day );
			},
			newDate = ( date == null || date === "" ? defaultDate : ( typeof date === "string" ? offsetString( date ) :
				( typeof date === "number" ? ( isNaN( date ) ? defaultDate : offsetNumeric( date ) ) : new Date( date.getTime() ) ) ) );

		newDate = ( newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate );
		if ( newDate ) {
			newDate.setHours( 0 );
			newDate.setMinutes( 0 );
			newDate.setSeconds( 0 );
			newDate.setMilliseconds( 0 );
		}
		return this._daylightSavingAdjust( newDate );
	},

	/* Handle switch to/from daylight saving.
	 * Hours may be non-zero on daylight saving cut-over:
	 * > 12 when midnight changeover, but then cannot generate
	 * midnight datetime, so jump to 1AM, otherwise reset.
	 * @param  date  (Date) the date to check
	 * @return  (Date) the corrected date
	 */
	_daylightSavingAdjust: function( date ) {
		if ( !date ) {
			return null;
		}
		date.setHours( date.getHours() > 12 ? date.getHours() + 2 : 0 );
		return date;
	},

	/* Set the date(s) directly. */
	_setDate: function( inst, date, noChange ) {
		var clear = !date,
			origMonth = inst.selectedMonth,
			origYear = inst.selectedYear,
			newDate = this._restrictMinMax( inst, this._determineDate( inst, date, new Date() ) );

		inst.selectedDay = inst.currentDay = newDate.getDate();
		inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
		inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
		if ( ( origMonth !== inst.selectedMonth || origYear !== inst.selectedYear ) && !noChange ) {
			this._notifyChange( inst );
		}
		this._adjustInstDate( inst );
		if ( inst.input ) {
			inst.input.val( clear ? "" : this._formatDate( inst ) );
		}
	},

	/* Retrieve the date(s) directly. */
	_getDate: function( inst ) {
		var startDate = ( !inst.currentYear || ( inst.input && inst.input.val() === "" ) ? null :
			this._daylightSavingAdjust( new Date(
			inst.currentYear, inst.currentMonth, inst.currentDay ) ) );
			return startDate;
	},

	/* Attach the onxxx handlers.  These are declared statically so
	 * they work with static code transformers like Caja.
	 */
	_attachHandlers: function( inst ) {
		var stepMonths = this._get( inst, "stepMonths" ),
			id = "#" + inst.id.replace( /\\\\/g, "\\" );
		inst.dpDiv.find( "[data-handler]" ).map( function() {
			var handler = {
				prev: function() {
					$.datepicker._adjustDate( id, -stepMonths, "M" );
				},
				next: function() {
					$.datepicker._adjustDate( id, +stepMonths, "M" );
				},
				hide: function() {
					$.datepicker._hideDatepicker();
				},
				today: function() {
					$.datepicker._gotoToday( id );
				},
				selectDay: function() {
					$.datepicker._selectDay( id, +this.getAttribute( "data-month" ), +this.getAttribute( "data-year" ), this );
					return false;
				},
				selectMonth: function() {
					$.datepicker._selectMonthYear( id, this, "M" );
					return false;
				},
				selectYear: function() {
					$.datepicker._selectMonthYear( id, this, "Y" );
					return false;
				}
			};
			$( this ).on( this.getAttribute( "data-event" ), handler[ this.getAttribute( "data-handler" ) ] );
		} );
	},

	/* Generate the HTML for the current state of the date picker. */
	_generateHTML: function( inst ) {
		var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
			controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
			monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
			selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
			cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows,
			printDate, dRow, tbody, daySettings, otherMonth, unselectable,
			tempDate = new Date(),
			today = this._daylightSavingAdjust(
				new Date( tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate() ) ), // clear time
			isRTL = this._get( inst, "isRTL" ),
			showButtonPanel = this._get( inst, "showButtonPanel" ),
			hideIfNoPrevNext = this._get( inst, "hideIfNoPrevNext" ),
			navigationAsDateFormat = this._get( inst, "navigationAsDateFormat" ),
			numMonths = this._getNumberOfMonths( inst ),
			showCurrentAtPos = this._get( inst, "showCurrentAtPos" ),
			stepMonths = this._get( inst, "stepMonths" ),
			isMultiMonth = ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ),
			currentDate = this._daylightSavingAdjust( ( !inst.currentDay ? new Date( 9999, 9, 9 ) :
				new Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) ),
			minDate = this._getMinMaxDate( inst, "min" ),
			maxDate = this._getMinMaxDate( inst, "max" ),
			drawMonth = inst.drawMonth - showCurrentAtPos,
			drawYear = inst.drawYear;

		if ( drawMonth < 0 ) {
			drawMonth += 12;
			drawYear--;
		}
		if ( maxDate ) {
			maxDraw = this._daylightSavingAdjust( new Date( maxDate.getFullYear(),
				maxDate.getMonth() - ( numMonths[ 0 ] * numMonths[ 1 ] ) + 1, maxDate.getDate() ) );
			maxDraw = ( minDate && maxDraw < minDate ? minDate : maxDraw );
			while ( this._daylightSavingAdjust( new Date( drawYear, drawMonth, 1 ) ) > maxDraw ) {
				drawMonth--;
				if ( drawMonth < 0 ) {
					drawMonth = 11;
					drawYear--;
				}
			}
		}
		inst.drawMonth = drawMonth;
		inst.drawYear = drawYear;

		prevText = this._get( inst, "prevText" );
		prevText = ( !navigationAsDateFormat ? prevText : this.formatDate( prevText,
			this._daylightSavingAdjust( new Date( drawYear, drawMonth - stepMonths, 1 ) ),
			this._getFormatConfig( inst ) ) );

		if ( this._canAdjustMonth( inst, -1, drawYear, drawMonth ) ) {
			prev = $( "<a>" )
				.attr( {
					"class": "ui-datepicker-prev ui-corner-all",
					"data-handler": "prev",
					"data-event": "click",
					title: prevText
				} )
				.append(
					$( "<span>" )
						.addClass( "ui-icon ui-icon-circle-triangle-" +
							( isRTL ? "e" : "w" ) )
						.text( prevText )
				)[ 0 ].outerHTML;
		} else if ( hideIfNoPrevNext ) {
			prev = "";
		} else {
			prev = $( "<a>" )
				.attr( {
					"class": "ui-datepicker-prev ui-corner-all ui-state-disabled",
					title: prevText
				} )
				.append(
					$( "<span>" )
						.addClass( "ui-icon ui-icon-circle-triangle-" +
							( isRTL ? "e" : "w" ) )
						.text( prevText )
				)[ 0 ].outerHTML;
		}

		nextText = this._get( inst, "nextText" );
		nextText = ( !navigationAsDateFormat ? nextText : this.formatDate( nextText,
			this._daylightSavingAdjust( new Date( drawYear, drawMonth + stepMonths, 1 ) ),
			this._getFormatConfig( inst ) ) );

		if ( this._canAdjustMonth( inst, +1, drawYear, drawMonth ) ) {
			next = $( "<a>" )
				.attr( {
					"class": "ui-datepicker-next ui-corner-all",
					"data-handler": "next",
					"data-event": "click",
					title: nextText
				} )
				.append(
					$( "<span>" )
						.addClass( "ui-icon ui-icon-circle-triangle-" +
							( isRTL ? "w" : "e" ) )
						.text( nextText )
				)[ 0 ].outerHTML;
		} else if ( hideIfNoPrevNext ) {
			next = "";
		} else {
			next = $( "<a>" )
				.attr( {
					"class": "ui-datepicker-next ui-corner-all ui-state-disabled",
					title: nextText
				} )
				.append(
					$( "<span>" )
						.attr( "class", "ui-icon ui-icon-circle-triangle-" +
							( isRTL ? "w" : "e" ) )
						.text( nextText )
				)[ 0 ].outerHTML;
		}

		currentText = this._get( inst, "currentText" );
		gotoDate = ( this._get( inst, "gotoCurrent" ) && inst.currentDay ? currentDate : today );
		currentText = ( !navigationAsDateFormat ? currentText :
			this.formatDate( currentText, gotoDate, this._getFormatConfig( inst ) ) );

		controls = "";
		if ( !inst.inline ) {
			controls = $( "<button>" )
				.attr( {
					type: "button",
					"class": "ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all",
					"data-handler": "hide",
					"data-event": "click"
				} )
				.text( this._get( inst, "closeText" ) )[ 0 ].outerHTML;
		}

		buttonPanel = "";
		if ( showButtonPanel ) {
			buttonPanel = $( "<div class='ui-datepicker-buttonpane ui-widget-content'>" )
				.append( isRTL ? controls : "" )
				.append( this._isInRange( inst, gotoDate ) ?
					$( "<button>" )
						.attr( {
							type: "button",
							"class": "ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all",
							"data-handler": "today",
							"data-event": "click"
						} )
						.text( currentText ) :
					"" )
				.append( isRTL ? "" : controls )[ 0 ].outerHTML;
		}

		firstDay = parseInt( this._get( inst, "firstDay" ), 10 );
		firstDay = ( isNaN( firstDay ) ? 0 : firstDay );

		showWeek = this._get( inst, "showWeek" );
		dayNames = this._get( inst, "dayNames" );
		dayNamesMin = this._get( inst, "dayNamesMin" );
		monthNames = this._get( inst, "monthNames" );
		monthNamesShort = this._get( inst, "monthNamesShort" );
		beforeShowDay = this._get( inst, "beforeShowDay" );
		showOtherMonths = this._get( inst, "showOtherMonths" );
		selectOtherMonths = this._get( inst, "selectOtherMonths" );
		defaultDate = this._getDefaultDate( inst );
		html = "";

		for ( row = 0; row < numMonths[ 0 ]; row++ ) {
			group = "";
			this.maxRows = 4;
			for ( col = 0; col < numMonths[ 1 ]; col++ ) {
				selectedDate = this._daylightSavingAdjust( new Date( drawYear, drawMonth, inst.selectedDay ) );
				cornerClass = " ui-corner-all";
				calender = "";
				if ( isMultiMonth ) {
					calender += "<div class='ui-datepicker-group";
					if ( numMonths[ 1 ] > 1 ) {
						switch ( col ) {
							case 0: calender += " ui-datepicker-group-first";
								cornerClass = " ui-corner-" + ( isRTL ? "right" : "left" ); break;
							case numMonths[ 1 ] - 1: calender += " ui-datepicker-group-last";
								cornerClass = " ui-corner-" + ( isRTL ? "left" : "right" ); break;
							default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break;
						}
					}
					calender += "'>";
				}
				calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" +
					( /all|left/.test( cornerClass ) && row === 0 ? ( isRTL ? next : prev ) : "" ) +
					( /all|right/.test( cornerClass ) && row === 0 ? ( isRTL ? prev : next ) : "" ) +
					this._generateMonthYearHeader( inst, drawMonth, drawYear, minDate, maxDate,
					row > 0 || col > 0, monthNames, monthNamesShort ) + // draw month headers
					"</div><table class='ui-datepicker-calendar'><thead>" +
					"<tr>";
				thead = ( showWeek ? "<th class='ui-datepicker-week-col'>" + this._get( inst, "weekHeader" ) + "</th>" : "" );
				for ( dow = 0; dow < 7; dow++ ) { // days of the week
					day = ( dow + firstDay ) % 7;
					thead += "<th scope='col'" + ( ( dow + firstDay + 6 ) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "" ) + ">" +
						"<span title='" + dayNames[ day ] + "'>" + dayNamesMin[ day ] + "</span></th>";
				}
				calender += thead + "</tr></thead><tbody>";
				daysInMonth = this._getDaysInMonth( drawYear, drawMonth );
				if ( drawYear === inst.selectedYear && drawMonth === inst.selectedMonth ) {
					inst.selectedDay = Math.min( inst.selectedDay, daysInMonth );
				}
				leadDays = ( this._getFirstDayOfMonth( drawYear, drawMonth ) - firstDay + 7 ) % 7;
				curRows = Math.ceil( ( leadDays + daysInMonth ) / 7 ); // calculate the number of rows to generate
				numRows = ( isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows ); //If multiple months, use the higher number of rows (see #7043)
				this.maxRows = numRows;
				printDate = this._daylightSavingAdjust( new Date( drawYear, drawMonth, 1 - leadDays ) );
				for ( dRow = 0; dRow < numRows; dRow++ ) { // create date picker rows
					calender += "<tr>";
					tbody = ( !showWeek ? "" : "<td class='ui-datepicker-week-col'>" +
						this._get( inst, "calculateWeek" )( printDate ) + "</td>" );
					for ( dow = 0; dow < 7; dow++ ) { // create date picker days
						daySettings = ( beforeShowDay ?
							beforeShowDay.apply( ( inst.input ? inst.input[ 0 ] : null ), [ printDate ] ) : [ true, "" ] );
						otherMonth = ( printDate.getMonth() !== drawMonth );
						unselectable = ( otherMonth && !selectOtherMonths ) || !daySettings[ 0 ] ||
							( minDate && printDate < minDate ) || ( maxDate && printDate > maxDate );
						tbody += "<td class='" +
							( ( dow + firstDay + 6 ) % 7 >= 5 ? " ui-datepicker-week-end" : "" ) + // highlight weekends
							( otherMonth ? " ui-datepicker-other-month" : "" ) + // highlight days from other months
							( ( printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent ) || // user pressed key
							( defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime() ) ?

							// or defaultDate is current printedDate and defaultDate is selectedDate
							" " + this._dayOverClass : "" ) + // highlight selected day
							( unselectable ? " " + this._unselectableClass + " ui-state-disabled" : "" ) +  // highlight unselectable days
							( otherMonth && !showOtherMonths ? "" : " " + daySettings[ 1 ] + // highlight custom dates
							( printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "" ) + // highlight selected day
							( printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "" ) ) + "'" + // highlight today (if different)
							( ( !otherMonth || showOtherMonths ) && daySettings[ 2 ] ? " title='" + daySettings[ 2 ].replace( /'/g, "&#39;" ) + "'" : "" ) + // cell title
							( unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'" ) + ">" + // actions
							( otherMonth && !showOtherMonths ? "&#xa0;" : // display for other months
							( unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" +
							( printDate.getTime() === today.getTime() ? " ui-state-highlight" : "" ) +
							( printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "" ) + // highlight selected day
							( otherMonth ? " ui-priority-secondary" : "" ) + // distinguish dates from other months
							"' href='#' aria-current='" + ( printDate.getTime() === currentDate.getTime() ? "true" : "false" ) + // mark date as selected for screen reader
							"' data-date='" + printDate.getDate() + // store date as data
							"'>" + printDate.getDate() + "</a>" ) ) + "</td>"; // display selectable date
						printDate.setDate( printDate.getDate() + 1 );
						printDate = this._daylightSavingAdjust( printDate );
					}
					calender += tbody + "</tr>";
				}
				drawMonth++;
				if ( drawMonth > 11 ) {
					drawMonth = 0;
					drawYear++;
				}
				calender += "</tbody></table>" + ( isMultiMonth ? "</div>" +
							( ( numMonths[ 0 ] > 0 && col === numMonths[ 1 ] - 1 ) ? "<div class='ui-datepicker-row-break'></div>" : "" ) : "" );
				group += calender;
			}
			html += group;
		}
		html += buttonPanel;
		inst._keyEvent = false;
		return html;
	},

	/* Generate the month and year header. */
	_generateMonthYearHeader: function( inst, drawMonth, drawYear, minDate, maxDate,
			secondary, monthNames, monthNamesShort ) {

		var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear,
			changeMonth = this._get( inst, "changeMonth" ),
			changeYear = this._get( inst, "changeYear" ),
			showMonthAfterYear = this._get( inst, "showMonthAfterYear" ),
			selectMonthLabel = this._get( inst, "selectMonthLabel" ),
			selectYearLabel = this._get( inst, "selectYearLabel" ),
			html = "<div class='ui-datepicker-title'>",
			monthHtml = "";

		// Month selection
		if ( secondary || !changeMonth ) {
			monthHtml += "<span class='ui-datepicker-month'>" + monthNames[ drawMonth ] + "</span>";
		} else {
			inMinYear = ( minDate && minDate.getFullYear() === drawYear );
			inMaxYear = ( maxDate && maxDate.getFullYear() === drawYear );
			monthHtml += "<select class='ui-datepicker-month' aria-label='" + selectMonthLabel + "' data-handler='selectMonth' data-event='change'>";
			for ( month = 0; month < 12; month++ ) {
				if ( ( !inMinYear || month >= minDate.getMonth() ) && ( !inMaxYear || month <= maxDate.getMonth() ) ) {
					monthHtml += "<option value='" + month + "'" +
						( month === drawMonth ? " selected='selected'" : "" ) +
						">" + monthNamesShort[ month ] + "</option>";
				}
			}
			monthHtml += "</select>";
		}

		if ( !showMonthAfterYear ) {
			html += monthHtml + ( secondary || !( changeMonth && changeYear ) ? "&#xa0;" : "" );
		}

		// Year selection
		if ( !inst.yearshtml ) {
			inst.yearshtml = "";
			if ( secondary || !changeYear ) {
				html += "<span class='ui-datepicker-year'>" + drawYear + "</span>";
			} else {

				// determine range of years to display
				years = this._get( inst, "yearRange" ).split( ":" );
				thisYear = new Date().getFullYear();
				determineYear = function( value ) {
					var year = ( value.match( /c[+\-].*/ ) ? drawYear + parseInt( value.substring( 1 ), 10 ) :
						( value.match( /[+\-].*/ ) ? thisYear + parseInt( value, 10 ) :
						parseInt( value, 10 ) ) );
					return ( isNaN( year ) ? thisYear : year );
				};
				year = determineYear( years[ 0 ] );
				endYear = Math.max( year, determineYear( years[ 1 ] || "" ) );
				year = ( minDate ? Math.max( year, minDate.getFullYear() ) : year );
				endYear = ( maxDate ? Math.min( endYear, maxDate.getFullYear() ) : endYear );
				inst.yearshtml += "<select class='ui-datepicker-year' aria-label='" + selectYearLabel + "' data-handler='selectYear' data-event='change'>";
				for ( ; year <= endYear; year++ ) {
					inst.yearshtml += "<option value='" + year + "'" +
						( year === drawYear ? " selected='selected'" : "" ) +
						">" + year + "</option>";
				}
				inst.yearshtml += "</select>";

				html += inst.yearshtml;
				inst.yearshtml = null;
			}
		}

		html += this._get( inst, "yearSuffix" );
		if ( showMonthAfterYear ) {
			html += ( secondary || !( changeMonth && changeYear ) ? "&#xa0;" : "" ) + monthHtml;
		}
		html += "</div>"; // Close datepicker_header
		return html;
	},

	/* Adjust one of the date sub-fields. */
	_adjustInstDate: function( inst, offset, period ) {
		var year = inst.selectedYear + ( period === "Y" ? offset : 0 ),
			month = inst.selectedMonth + ( period === "M" ? offset : 0 ),
			day = Math.min( inst.selectedDay, this._getDaysInMonth( year, month ) ) + ( period === "D" ? offset : 0 ),
			date = this._restrictMinMax( inst, this._daylightSavingAdjust( new Date( year, month, day ) ) );

		inst.selectedDay = date.getDate();
		inst.drawMonth = inst.selectedMonth = date.getMonth();
		inst.drawYear = inst.selectedYear = date.getFullYear();
		if ( period === "M" || period === "Y" ) {
			this._notifyChange( inst );
		}
	},

	/* Ensure a date is within any min/max bounds. */
	_restrictMinMax: function( inst, date ) {
		var minDate = this._getMinMaxDate( inst, "min" ),
			maxDate = this._getMinMaxDate( inst, "max" ),
			newDate = ( minDate && date < minDate ? minDate : date );
		return ( maxDate && newDate > maxDate ? maxDate : newDate );
	},

	/* Notify change of month/year. */
	_notifyChange: function( inst ) {
		var onChange = this._get( inst, "onChangeMonthYear" );
		if ( onChange ) {
			onChange.apply( ( inst.input ? inst.input[ 0 ] : null ),
				[ inst.selectedYear, inst.selectedMonth + 1, inst ] );
		}
	},

	/* Determine the number of months to show. */
	_getNumberOfMonths: function( inst ) {
		var numMonths = this._get( inst, "numberOfMonths" );
		return ( numMonths == null ? [ 1, 1 ] : ( typeof numMonths === "number" ? [ 1, numMonths ] : numMonths ) );
	},

	/* Determine the current maximum date - ensure no time components are set. */
	_getMinMaxDate: function( inst, minMax ) {
		return this._determineDate( inst, this._get( inst, minMax + "Date" ), null );
	},

	/* Find the number of days in a given month. */
	_getDaysInMonth: function( year, month ) {
		return 32 - this._daylightSavingAdjust( new Date( year, month, 32 ) ).getDate();
	},

	/* Find the day of the week of the first of a month. */
	_getFirstDayOfMonth: function( year, month ) {
		return new Date( year, month, 1 ).getDay();
	},

	/* Determines if we should allow a "next/prev" month display change. */
	_canAdjustMonth: function( inst, offset, curYear, curMonth ) {
		var numMonths = this._getNumberOfMonths( inst ),
			date = this._daylightSavingAdjust( new Date( curYear,
			curMonth + ( offset < 0 ? offset : numMonths[ 0 ] * numMonths[ 1 ] ), 1 ) );

		if ( offset < 0 ) {
			date.setDate( this._getDaysInMonth( date.getFullYear(), date.getMonth() ) );
		}
		return this._isInRange( inst, date );
	},

	/* Is the given date in the accepted range? */
	_isInRange: function( inst, date ) {
		var yearSplit, currentYear,
			minDate = this._getMinMaxDate( inst, "min" ),
			maxDate = this._getMinMaxDate( inst, "max" ),
			minYear = null,
			maxYear = null,
			years = this._get( inst, "yearRange" );
			if ( years ) {
				yearSplit = years.split( ":" );
				currentYear = new Date().getFullYear();
				minYear = parseInt( yearSplit[ 0 ], 10 );
				maxYear = parseInt( yearSplit[ 1 ], 10 );
				if ( yearSplit[ 0 ].match( /[+\-].*/ ) ) {
					minYear += currentYear;
				}
				if ( yearSplit[ 1 ].match( /[+\-].*/ ) ) {
					maxYear += currentYear;
				}
			}

		return ( ( !minDate || date.getTime() >= minDate.getTime() ) &&
			( !maxDate || date.getTime() <= maxDate.getTime() ) &&
			( !minYear || date.getFullYear() >= minYear ) &&
			( !maxYear || date.getFullYear() <= maxYear ) );
	},

	/* Provide the configuration settings for formatting/parsing. */
	_getFormatConfig: function( inst ) {
		var shortYearCutoff = this._get( inst, "shortYearCutoff" );
		shortYearCutoff = ( typeof shortYearCutoff !== "string" ? shortYearCutoff :
			new Date().getFullYear() % 100 + parseInt( shortYearCutoff, 10 ) );
		return { shortYearCutoff: shortYearCutoff,
			dayNamesShort: this._get( inst, "dayNamesShort" ), dayNames: this._get( inst, "dayNames" ),
			monthNamesShort: this._get( inst, "monthNamesShort" ), monthNames: this._get( inst, "monthNames" ) };
	},

	/* Format the given date for display. */
	_formatDate: function( inst, day, month, year ) {
		if ( !day ) {
			inst.currentDay = inst.selectedDay;
			inst.currentMonth = inst.selectedMonth;
			inst.currentYear = inst.selectedYear;
		}
		var date = ( day ? ( typeof day === "object" ? day :
			this._daylightSavingAdjust( new Date( year, month, day ) ) ) :
			this._daylightSavingAdjust( new Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) );
		return this.formatDate( this._get( inst, "dateFormat" ), date, this._getFormatConfig( inst ) );
	}
} );

/*
 * Bind hover events for datepicker elements.
 * Done via delegate so the binding only occurs once in the lifetime of the parent div.
 * Global datepicker_instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
 */
function datepicker_bindHover( dpDiv ) {
	var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
	return dpDiv.on( "mouseout", selector, function() {
			$( this ).removeClass( "ui-state-hover" );
			if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) {
				$( this ).removeClass( "ui-datepicker-prev-hover" );
			}
			if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) {
				$( this ).removeClass( "ui-datepicker-next-hover" );
			}
		} )
		.on( "mouseover", selector, datepicker_handleMouseover );
}

function datepicker_handleMouseover() {
	if ( !$.datepicker._isDisabledDatepicker( datepicker_instActive.inline ? datepicker_instActive.dpDiv.parent()[ 0 ] : datepicker_instActive.input[ 0 ] ) ) {
		$( this ).parents( ".ui-datepicker-calendar" ).find( "a" ).removeClass( "ui-state-hover" );
		$( this ).addClass( "ui-state-hover" );
		if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) {
			$( this ).addClass( "ui-datepicker-prev-hover" );
		}
		if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) {
			$( this ).addClass( "ui-datepicker-next-hover" );
		}
	}
}

/* jQuery extend now ignores nulls! */
function datepicker_extendRemove( target, props ) {
	$.extend( target, props );
	for ( var name in props ) {
		if ( props[ name ] == null ) {
			target[ name ] = props[ name ];
		}
	}
	return target;
}

/* Invoke the datepicker functionality.
   @param  options  string - a command, optionally followed by additional parameters or
					Object - settings for attaching new datepicker functionality
   @return  jQuery object */
$.fn.datepicker = function( options ) {

	/* Verify an empty collection wasn't passed - Fixes #6976 */
	if ( !this.length ) {
		return this;
	}

	/* Initialise the date picker. */
	if ( !$.datepicker.initialized ) {
		$( document ).on( "mousedown", $.datepicker._checkExternalClick );
		$.datepicker.initialized = true;
	}

	/* Append datepicker main container to body if not exist. */
	if ( $( "#" + $.datepicker._mainDivId ).length === 0 ) {
		$( "body" ).append( $.datepicker.dpDiv );
	}

	var otherArgs = Array.prototype.slice.call( arguments, 1 );
	if ( typeof options === "string" && ( options === "isDisabled" || options === "getDate" || options === "widget" ) ) {
		return $.datepicker[ "_" + options + "Datepicker" ].
			apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) );
	}
	if ( options === "option" && arguments.length === 2 && typeof arguments[ 1 ] === "string" ) {
		return $.datepicker[ "_" + options + "Datepicker" ].
			apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) );
	}
	return this.each( function() {
		if ( typeof options === "string" ) {
			$.datepicker[ "_" + options + "Datepicker" ]
				.apply( $.datepicker, [ this ].concat( otherArgs ) );
		} else {
			$.datepicker._attachDatepicker( this, options );
		}
	} );
};

$.datepicker = new Datepicker(); // singleton instance
$.datepicker.initialized = false;
$.datepicker.uuid = new Date().getTime();
$.datepicker.version = "1.13.3";

return $.datepicker;

} );
                                                                                                                                                                                                                                                                                                                                                                                                                                     jquery/ui/datepicker.min.js                                                                         0000644                 00000107614 15212564042 0011745 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Datepicker 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../keycode"],e):e(jQuery)}(function(V){"use strict";var n;function e(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:"",selectMonthLabel:"Select month",selectYearLabel:"Select year"},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,onUpdateDatepicker:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},V.extend(this._defaults,this.regional[""]),this.regional.en=V.extend(!0,{},this.regional[""]),this.regional["en-US"]=V.extend(!0,{},this.regional.en),this.dpDiv=a(V("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function a(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",t,function(){V(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&V(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&V(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",t,d)}function d(){V.datepicker._isDisabledDatepicker((n.inline?n.dpDiv.parent():n.input)[0])||(V(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),V(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&V(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&V(this).addClass("ui-datepicker-next-hover"))}function c(e,t){for(var a in V.extend(e,t),t)null==t[a]&&(e[a]=t[a])}return V.extend(V.ui,{datepicker:{version:"1.13.3"}}),V.extend(e.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return c(this._defaults,e||{}),this},_attachDatepicker:function(e,t){var a,i=e.nodeName.toLowerCase(),s="div"===i||"span"===i;e.id||(this.uuid+=1,e.id="dp"+this.uuid),(a=this._newInst(V(e),s)).settings=V.extend({},t||{}),"input"===i?this._connectDatepicker(e,a):s&&this._inlineDatepicker(e,a)},_newInst:function(e,t){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:t,dpDiv:t?a(V("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,t){var a=V(e);t.append=V([]),t.trigger=V([]),a.hasClass(this.markerClassName)||(this._attachments(a,t),a.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(t),V.data(e,"datepicker",t),t.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,t){var a,i=this._get(t,"appendText"),s=this._get(t,"isRTL");t.append&&t.append.remove(),i&&(t.append=V("<span>").addClass(this._appendClass).text(i),e[s?"before":"after"](t.append)),e.off("focus",this._showDatepicker),t.trigger&&t.trigger.remove(),"focus"!==(i=this._get(t,"showOn"))&&"both"!==i||e.on("focus",this._showDatepicker),"button"!==i&&"both"!==i||(i=this._get(t,"buttonText"),a=this._get(t,"buttonImage"),this._get(t,"buttonImageOnly")?t.trigger=V("<img>").addClass(this._triggerClass).attr({src:a,alt:i,title:i}):(t.trigger=V("<button type='button'>").addClass(this._triggerClass),a?t.trigger.html(V("<img>").attr({src:a,alt:i,title:i})):t.trigger.text(i)),e[s?"before":"after"](t.trigger),t.trigger.on("click",function(){return V.datepicker._datepickerShowing&&V.datepicker._lastInput===e[0]?V.datepicker._hideDatepicker():(V.datepicker._datepickerShowing&&V.datepicker._lastInput!==e[0]&&V.datepicker._hideDatepicker(),V.datepicker._showDatepicker(e[0])),!1}))},_autoSize:function(e){var t,a,i,s,r,n;this._get(e,"autoSize")&&!e.inline&&(r=new Date(2009,11,20),(n=this._get(e,"dateFormat")).match(/[DM]/)&&(r.setMonth((t=function(e){for(s=i=a=0;s<e.length;s++)e[s].length>a&&(a=e[s].length,i=s);return i})(this._get(e,n.match(/MM/)?"monthNames":"monthNamesShort"))),r.setDate(t(this._get(e,n.match(/DD/)?"dayNames":"dayNamesShort"))+20-r.getDay())),e.input.attr("size",this._formatDate(e,r).length))},_inlineDatepicker:function(e,t){var a=V(e);a.hasClass(this.markerClassName)||(a.addClass(this.markerClassName).append(t.dpDiv),V.data(e,"datepicker",t),this._setDate(t,this._getDefaultDate(t),!0),this._updateDatepicker(t),this._updateAlternate(t),t.settings.disabled&&this._disableDatepicker(e),t.dpDiv.css("display","block"))},_dialogDatepicker:function(e,t,a,i,s){var r,n=this._dialogInst;return n||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=V("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),V("body").append(this._dialogInput),(n=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},V.data(this._dialogInput[0],"datepicker",n)),c(n.settings,i||{}),t=t&&t.constructor===Date?this._formatDate(n,t):t,this._dialogInput.val(t),this._pos=s?s.length?s:[s.pageX,s.pageY]:null,this._pos||(r=document.documentElement.clientWidth,i=document.documentElement.clientHeight,t=document.documentElement.scrollLeft||document.body.scrollLeft,s=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[r/2-100+t,i/2-150+s]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),n.settings.onSelect=a,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),V.blockUI&&V.blockUI(this.dpDiv),V.data(this._dialogInput[0],"datepicker",n),this},_destroyDatepicker:function(e){var t,a=V(e),i=V.data(e,"datepicker");a.hasClass(this.markerClassName)&&(t=e.nodeName.toLowerCase(),V.removeData(e,"datepicker"),"input"===t?(i.append.remove(),i.trigger.remove(),a.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==t&&"span"!==t||a.removeClass(this.markerClassName).empty(),n===i)&&(n=null,this._curInst=null)},_enableDatepicker:function(t){var e,a=V(t),i=V.data(t,"datepicker");a.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!1,i.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==e&&"span"!==e||((i=a.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=V.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var e,a=V(t),i=V.data(t,"datepicker");a.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!0,i.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==e&&"span"!==e||((i=a.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=V.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(e)for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(e){try{return V.data(e,"datepicker")}catch(e){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,t,a){var i,s,r=this._getInst(e);if(2===arguments.length&&"string"==typeof t)return"defaults"===t?V.extend({},V.datepicker._defaults):r?"all"===t?V.extend({},r.settings):this._get(r,t):null;i=t||{},"string"==typeof t&&((i={})[t]=a),r&&(this._curInst===r&&this._hideDatepicker(),t=this._getDateDatepicker(e,!0),a=this._getMinMaxDate(r,"min"),s=this._getMinMaxDate(r,"max"),c(r.settings,i),null!==a&&void 0!==i.dateFormat&&void 0===i.minDate&&(r.settings.minDate=this._formatDate(r,a)),null!==s&&void 0!==i.dateFormat&&void 0===i.maxDate&&(r.settings.maxDate=this._formatDate(r,s)),"disabled"in i&&(i.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(V(e),r),this._autoSize(r),this._setDate(r,t),this._updateAlternate(r),this._updateDatepicker(r))},_changeDatepicker:function(e,t,a){this._optionDatepicker(e,t,a)},_refreshDatepicker:function(e){e=this._getInst(e);e&&this._updateDatepicker(e)},_setDateDatepicker:function(e,t){e=this._getInst(e);e&&(this._setDate(e,t),this._updateDatepicker(e),this._updateAlternate(e))},_getDateDatepicker:function(e,t){e=this._getInst(e);return e&&!e.inline&&this._setDateFromField(e,t),e?this._getDate(e):null},_doKeyDown:function(e){var t,a,i=V.datepicker._getInst(e.target),s=!0,r=i.dpDiv.is(".ui-datepicker-rtl");if(i._keyEvent=!0,V.datepicker._datepickerShowing)switch(e.keyCode){case 9:V.datepicker._hideDatepicker(),s=!1;break;case 13:return(a=V("td."+V.datepicker._dayOverClass+":not(."+V.datepicker._currentClass+")",i.dpDiv))[0]&&V.datepicker._selectDay(e.target,i.selectedMonth,i.selectedYear,a[0]),(a=V.datepicker._get(i,"onSelect"))?(t=V.datepicker._formatDate(i),a.apply(i.input?i.input[0]:null,[t,i])):V.datepicker._hideDatepicker(),!1;case 27:V.datepicker._hideDatepicker();break;case 33:V.datepicker._adjustDate(e.target,e.ctrlKey?-V.datepicker._get(i,"stepBigMonths"):-V.datepicker._get(i,"stepMonths"),"M");break;case 34:V.datepicker._adjustDate(e.target,e.ctrlKey?+V.datepicker._get(i,"stepBigMonths"):+V.datepicker._get(i,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&V.datepicker._clearDate(e.target),s=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&V.datepicker._gotoToday(e.target),s=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&V.datepicker._adjustDate(e.target,r?1:-1,"D"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&V.datepicker._adjustDate(e.target,e.ctrlKey?-V.datepicker._get(i,"stepBigMonths"):-V.datepicker._get(i,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&V.datepicker._adjustDate(e.target,-7,"D"),s=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&V.datepicker._adjustDate(e.target,r?-1:1,"D"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&V.datepicker._adjustDate(e.target,e.ctrlKey?+V.datepicker._get(i,"stepBigMonths"):+V.datepicker._get(i,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&V.datepicker._adjustDate(e.target,7,"D"),s=e.ctrlKey||e.metaKey;break;default:s=!1}else 36===e.keyCode&&e.ctrlKey?V.datepicker._showDatepicker(this):s=!1;s&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var t,a=V.datepicker._getInst(e.target);if(V.datepicker._get(a,"constrainInput"))return a=V.datepicker._possibleChars(V.datepicker._get(a,"dateFormat")),t=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||t<" "||!a||-1<a.indexOf(t)},_doKeyUp:function(e){e=V.datepicker._getInst(e.target);if(e.input.val()!==e.lastVal)try{V.datepicker.parseDate(V.datepicker._get(e,"dateFormat"),e.input?e.input.val():null,V.datepicker._getFormatConfig(e))&&(V.datepicker._setDateFromField(e),V.datepicker._updateAlternate(e),V.datepicker._updateDatepicker(e))}catch(e){}return!0},_showDatepicker:function(e){var t,a,i,s;"input"!==(e=e.target||e).nodeName.toLowerCase()&&(e=V("input",e.parentNode)[0]),V.datepicker._isDisabledDatepicker(e)||V.datepicker._lastInput===e||(s=V.datepicker._getInst(e),V.datepicker._curInst&&V.datepicker._curInst!==s&&(V.datepicker._curInst.dpDiv.stop(!0,!0),s)&&V.datepicker._datepickerShowing&&V.datepicker._hideDatepicker(V.datepicker._curInst.input[0]),!1===(a=(a=V.datepicker._get(s,"beforeShow"))?a.apply(e,[e,s]):{}))||(c(s.settings,a),s.lastVal=null,V.datepicker._lastInput=e,V.datepicker._setDateFromField(s),V.datepicker._inDialog&&(e.value=""),V.datepicker._pos||(V.datepicker._pos=V.datepicker._findPos(e),V.datepicker._pos[1]+=e.offsetHeight),t=!1,V(e).parents().each(function(){return!(t|="fixed"===V(this).css("position"))}),a={left:V.datepicker._pos[0],top:V.datepicker._pos[1]},V.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),V.datepicker._updateDatepicker(s),a=V.datepicker._checkOffset(s,a,t),s.dpDiv.css({position:V.datepicker._inDialog&&V.blockUI?"static":t?"fixed":"absolute",display:"none",left:a.left+"px",top:a.top+"px"}),s.inline)||(a=V.datepicker._get(s,"showAnim"),i=V.datepicker._get(s,"duration"),s.dpDiv.css("z-index",function(e){for(var t;e.length&&e[0]!==document;){if(("absolute"===(t=e.css("position"))||"relative"===t||"fixed"===t)&&(t=parseInt(e.css("zIndex"),10),!isNaN(t))&&0!==t)return t;e=e.parent()}return 0}(V(e))+1),V.datepicker._datepickerShowing=!0,V.effects&&V.effects.effect[a]?s.dpDiv.show(a,V.datepicker._get(s,"showOptions"),i):s.dpDiv[a||"show"](a?i:null),V.datepicker._shouldFocusInput(s)&&s.input.trigger("focus"),V.datepicker._curInst=s)},_updateDatepicker:function(e){this.maxRows=4,(n=e).dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var t,a=this._getNumberOfMonths(e),i=a[1],s=e.dpDiv.find("."+this._dayOverClass+" a"),r=V.datepicker._get(e,"onUpdateDatepicker");0<s.length&&d.apply(s.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),1<i&&e.dpDiv.addClass("ui-datepicker-multi-"+i).css("width",17*i+"em"),e.dpDiv[(1!==a[0]||1!==a[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===V.datepicker._curInst&&V.datepicker._datepickerShowing&&V.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(t=e.yearshtml,setTimeout(function(){t===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year").first().replaceWith(e.yearshtml),t=e.yearshtml=null},0)),r&&r.apply(e.input?e.input[0]:null,[e])},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(e,t,a){var i=e.dpDiv.outerWidth(),s=e.dpDiv.outerHeight(),r=e.input?e.input.outerWidth():0,n=e.input?e.input.outerHeight():0,d=document.documentElement.clientWidth+(a?0:V(document).scrollLeft()),c=document.documentElement.clientHeight+(a?0:V(document).scrollTop());return t.left-=this._get(e,"isRTL")?i-r:0,t.left-=a&&t.left===e.input.offset().left?V(document).scrollLeft():0,t.top-=a&&t.top===e.input.offset().top+n?V(document).scrollTop():0,t.left-=Math.min(t.left,d<t.left+i&&i<d?Math.abs(t.left+i-d):0),t.top-=Math.min(t.top,c<t.top+s&&s<c?Math.abs(s+n):0),t},_findPos:function(e){for(var t=this._getInst(e),a=this._get(t,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||V.expr.pseudos.hidden(e));)e=e[a?"previousSibling":"nextSibling"];return[(t=V(e).offset()).left,t.top]},_hideDatepicker:function(e){var t,a,i=this._curInst;!i||e&&i!==V.data(e,"datepicker")||this._datepickerShowing&&(e=this._get(i,"showAnim"),a=this._get(i,"duration"),t=function(){V.datepicker._tidyDialog(i)},V.effects&&(V.effects.effect[e]||V.effects[e])?i.dpDiv.hide(e,V.datepicker._get(i,"showOptions"),a,t):i.dpDiv["slideDown"===e?"slideUp":"fadeIn"===e?"fadeOut":"hide"](e?a:null,t),e||t(),this._datepickerShowing=!1,(a=this._get(i,"onClose"))&&a.apply(i.input?i.input[0]:null,[i.input?i.input.val():"",i]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),V.blockUI)&&(V.unblockUI(),V("body").append(this.dpDiv)),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){var t;V.datepicker._curInst&&(e=V(e.target),t=V.datepicker._getInst(e[0]),!(e[0].id===V.datepicker._mainDivId||0!==e.parents("#"+V.datepicker._mainDivId).length||e.hasClass(V.datepicker.markerClassName)||e.closest("."+V.datepicker._triggerClass).length||!V.datepicker._datepickerShowing||V.datepicker._inDialog&&V.blockUI)||e.hasClass(V.datepicker.markerClassName)&&V.datepicker._curInst!==t)&&V.datepicker._hideDatepicker()},_adjustDate:function(e,t,a){var e=V(e),i=this._getInst(e[0]);this._isDisabledDatepicker(e[0])||(this._adjustInstDate(i,t,a),this._updateDatepicker(i))},_gotoToday:function(e){var t,e=V(e),a=this._getInst(e[0]);this._get(a,"gotoCurrent")&&a.currentDay?(a.selectedDay=a.currentDay,a.drawMonth=a.selectedMonth=a.currentMonth,a.drawYear=a.selectedYear=a.currentYear):(t=new Date,a.selectedDay=t.getDate(),a.drawMonth=a.selectedMonth=t.getMonth(),a.drawYear=a.selectedYear=t.getFullYear()),this._notifyChange(a),this._adjustDate(e)},_selectMonthYear:function(e,t,a){var e=V(e),i=this._getInst(e[0]);i["selected"+("M"===a?"Month":"Year")]=i["draw"+("M"===a?"Month":"Year")]=parseInt(t.options[t.selectedIndex].value,10),this._notifyChange(i),this._adjustDate(e)},_selectDay:function(e,t,a,i){var s=V(e);V(i).hasClass(this._unselectableClass)||this._isDisabledDatepicker(s[0])||((s=this._getInst(s[0])).selectedDay=s.currentDay=parseInt(V("a",i).attr("data-date")),s.selectedMonth=s.currentMonth=t,s.selectedYear=s.currentYear=a,this._selectDate(e,this._formatDate(s,s.currentDay,s.currentMonth,s.currentYear)))},_clearDate:function(e){e=V(e);this._selectDate(e,"")},_selectDate:function(e,t){var a,e=V(e),e=this._getInst(e[0]);t=null!=t?t:this._formatDate(e),e.input&&e.input.val(t),this._updateAlternate(e),(a=this._get(e,"onSelect"))?a.apply(e.input?e.input[0]:null,[t,e]):e.input&&e.input.trigger("change"),e.inline?this._updateDatepicker(e):(this._hideDatepicker(),this._lastInput=e.input[0],"object"!=typeof e.input[0]&&e.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var t,a,i=this._get(e,"altField");i&&(a=this._get(e,"altFormat")||this._get(e,"dateFormat"),t=this._getDate(e),a=this.formatDate(a,t,this._getFormatConfig(e)),V(document).find(i).val(a))},noWeekends:function(e){e=e.getDay();return[0<e&&e<6,""]},iso8601Week:function(e){var t,e=new Date(e.getTime());return e.setDate(e.getDate()+4-(e.getDay()||7)),t=e.getTime(),e.setMonth(0),e.setDate(1),Math.floor(Math.round((t-e)/864e5)/7)+1},parseDate:function(t,s,e){if(null==t||null==s)throw"Invalid arguments";if(""===(s="object"==typeof s?s.toString():s+""))return null;for(var a,i,r=0,n=(e?e.shortYearCutoff:null)||this._defaults.shortYearCutoff,n="string"!=typeof n?n:(new Date).getFullYear()%100+parseInt(n,10),d=(e?e.dayNamesShort:null)||this._defaults.dayNamesShort,c=(e?e.dayNames:null)||this._defaults.dayNames,o=(e?e.monthNamesShort:null)||this._defaults.monthNamesShort,l=(e?e.monthNames:null)||this._defaults.monthNames,h=-1,u=-1,p=-1,g=-1,_=!1,f=function(e){e=y+1<t.length&&t.charAt(y+1)===e;return e&&y++,e},k=function(e){var t=f(e),t="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,e=new RegExp("^\\d{"+("y"===e?t:1)+","+t+"}"),t=s.substring(r).match(e);if(t)return r+=t[0].length,parseInt(t[0],10);throw"Missing number at position "+r},D=function(e,t,a){var i=-1,e=V.map(f(e)?a:t,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(V.each(e,function(e,t){var a=t[1];if(s.substr(r,a.length).toLowerCase()===a.toLowerCase())return i=t[0],r+=a.length,!1}),-1!==i)return i+1;throw"Unknown name at position "+r},m=function(){if(s.charAt(r)!==t.charAt(y))throw"Unexpected literal at position "+r;r++},y=0;y<t.length;y++)if(_)"'"!==t.charAt(y)||f("'")?m():_=!1;else switch(t.charAt(y)){case"d":p=k("d");break;case"D":D("D",d,c);break;case"o":g=k("o");break;case"m":u=k("m");break;case"M":u=D("M",o,l);break;case"y":h=k("y");break;case"@":h=(i=new Date(k("@"))).getFullYear(),u=i.getMonth()+1,p=i.getDate();break;case"!":h=(i=new Date((k("!")-this._ticksTo1970)/1e4)).getFullYear(),u=i.getMonth()+1,p=i.getDate();break;case"'":f("'")?m():_=!0;break;default:m()}if(r<s.length&&(e=s.substr(r),!/^\s+/.test(e)))throw"Extra/unparsed characters found in date: "+e;if(-1===h?h=(new Date).getFullYear():h<100&&(h+=(new Date).getFullYear()-(new Date).getFullYear()%100+(h<=n?0:-100)),-1<g)for(u=1,p=g;;){if(p<=(a=this._getDaysInMonth(h,u-1)))break;u++,p-=a}if((i=this._daylightSavingAdjust(new Date(h,u-1,p))).getFullYear()!==h||i.getMonth()+1!==u||i.getDate()!==p)throw"Invalid date";return i},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,a){if(!e)return"";function i(e,t,a){var i=""+t;if(l(e))for(;i.length<a;)i="0"+i;return i}function s(e,t,a,i){return(l(e)?i:a)[t]}var r,n=(a?a.dayNamesShort:null)||this._defaults.dayNamesShort,d=(a?a.dayNames:null)||this._defaults.dayNames,c=(a?a.monthNamesShort:null)||this._defaults.monthNamesShort,o=(a?a.monthNames:null)||this._defaults.monthNames,l=function(e){e=r+1<t.length&&t.charAt(r+1)===e;return e&&r++,e},h="",u=!1;if(e)for(r=0;r<t.length;r++)if(u)"'"!==t.charAt(r)||l("'")?h+=t.charAt(r):u=!1;else switch(t.charAt(r)){case"d":h+=i("d",e.getDate(),2);break;case"D":h+=s("D",e.getDay(),n,d);break;case"o":h+=i("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":h+=i("m",e.getMonth()+1,2);break;case"M":h+=s("M",e.getMonth(),c,o);break;case"y":h+=l("y")?e.getFullYear():(e.getFullYear()%100<10?"0":"")+e.getFullYear()%100;break;case"@":h+=e.getTime();break;case"!":h+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?h+="'":u=!0;break;default:h+=t.charAt(r)}return h},_possibleChars:function(t){for(var e="",a=!1,i=function(e){e=s+1<t.length&&t.charAt(s+1)===e;return e&&s++,e},s=0;s<t.length;s++)if(a)"'"!==t.charAt(s)||i("'")?e+=t.charAt(s):a=!1;else switch(t.charAt(s)){case"d":case"m":case"y":case"@":e+="0123456789";break;case"D":case"M":return null;case"'":i("'")?e+="'":a=!0;break;default:e+=t.charAt(s)}return e},_get:function(e,t){return(void 0!==e.settings[t]?e.settings:this._defaults)[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var a=this._get(e,"dateFormat"),i=e.lastVal=e.input?e.input.val():null,s=this._getDefaultDate(e),r=s,n=this._getFormatConfig(e);try{r=this.parseDate(a,i,n)||s}catch(e){i=t?"":i}e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),e.currentDay=i?r.getDate():0,e.currentMonth=i?r.getMonth():0,e.currentYear=i?r.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(d,e,t){var a,i=null==e||""===e?t:"string"==typeof e?function(e){try{return V.datepicker.parseDate(V.datepicker._get(d,"dateFormat"),e,V.datepicker._getFormatConfig(d))}catch(e){}for(var t=(e.toLowerCase().match(/^c/)?V.datepicker._getDate(d):null)||new Date,a=t.getFullYear(),i=t.getMonth(),s=t.getDate(),r=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,n=r.exec(e);n;){switch(n[2]||"d"){case"d":case"D":s+=parseInt(n[1],10);break;case"w":case"W":s+=7*parseInt(n[1],10);break;case"m":case"M":i+=parseInt(n[1],10),s=Math.min(s,V.datepicker._getDaysInMonth(a,i));break;case"y":case"Y":a+=parseInt(n[1],10),s=Math.min(s,V.datepicker._getDaysInMonth(a,i))}n=r.exec(e)}return new Date(a,i,s)}(e):"number"==typeof e?isNaN(e)?t:(i=e,(a=new Date).setDate(a.getDate()+i),a):new Date(e.getTime());return(i=i&&"Invalid Date"===i.toString()?t:i)&&(i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0)),this._daylightSavingAdjust(i)},_daylightSavingAdjust:function(e){return e?(e.setHours(12<e.getHours()?e.getHours()+2:0),e):null},_setDate:function(e,t,a){var i=!t,s=e.selectedMonth,r=e.selectedYear,t=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=t.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=t.getMonth(),e.drawYear=e.selectedYear=e.currentYear=t.getFullYear(),s===e.selectedMonth&&r===e.selectedYear||a||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(i?"":this._formatDate(e))},_getDate:function(e){return!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay))},_attachHandlers:function(e){var t=this._get(e,"stepMonths"),a="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){V.datepicker._adjustDate(a,-t,"M")},next:function(){V.datepicker._adjustDate(a,+t,"M")},hide:function(){V.datepicker._hideDatepicker()},today:function(){V.datepicker._gotoToday(a)},selectDay:function(){return V.datepicker._selectDay(a,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return V.datepicker._selectMonthYear(a,this,"M"),!1},selectYear:function(){return V.datepicker._selectMonthYear(a,this,"Y"),!1}};V(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,a,i,s,r,O,L,R,H,n,d,W,c,o,l,h,u,p,g,_,f,k,E,D,m,U,y,P,z,v,M,b,w=new Date,B=this._daylightSavingAdjust(new Date(w.getFullYear(),w.getMonth(),w.getDate())),C=this._get(e,"isRTL"),w=this._get(e,"showButtonPanel"),I=this._get(e,"hideIfNoPrevNext"),x=this._get(e,"navigationAsDateFormat"),Y=this._getNumberOfMonths(e),S=this._get(e,"showCurrentAtPos"),F=this._get(e,"stepMonths"),J=1!==Y[0]||1!==Y[1],N=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),T=this._getMinMaxDate(e,"min"),A=this._getMinMaxDate(e,"max"),K=e.drawMonth-S,j=e.drawYear;if(K<0&&(K+=12,j--),A)for(t=this._daylightSavingAdjust(new Date(A.getFullYear(),A.getMonth()-Y[0]*Y[1]+1,A.getDate())),t=T&&t<T?T:t;this._daylightSavingAdjust(new Date(j,K,1))>t;)--K<0&&(K=11,j--);for(e.drawMonth=K,e.drawYear=j,S=this._get(e,"prevText"),S=x?this.formatDate(S,this._daylightSavingAdjust(new Date(j,K-F,1)),this._getFormatConfig(e)):S,a=this._canAdjustMonth(e,-1,j,K)?V("<a>").attr({class:"ui-datepicker-prev ui-corner-all","data-handler":"prev","data-event":"click",title:S}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(C?"e":"w")).text(S))[0].outerHTML:I?"":V("<a>").attr({class:"ui-datepicker-prev ui-corner-all ui-state-disabled",title:S}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(C?"e":"w")).text(S))[0].outerHTML,S=this._get(e,"nextText"),S=x?this.formatDate(S,this._daylightSavingAdjust(new Date(j,K+F,1)),this._getFormatConfig(e)):S,i=this._canAdjustMonth(e,1,j,K)?V("<a>").attr({class:"ui-datepicker-next ui-corner-all","data-handler":"next","data-event":"click",title:S}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(C?"w":"e")).text(S))[0].outerHTML:I?"":V("<a>").attr({class:"ui-datepicker-next ui-corner-all ui-state-disabled",title:S}).append(V("<span>").attr("class","ui-icon ui-icon-circle-triangle-"+(C?"w":"e")).text(S))[0].outerHTML,F=this._get(e,"currentText"),I=this._get(e,"gotoCurrent")&&e.currentDay?N:B,F=x?this.formatDate(F,I,this._getFormatConfig(e)):F,S="",e.inline||(S=V("<button>").attr({type:"button",class:"ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all","data-handler":"hide","data-event":"click"}).text(this._get(e,"closeText"))[0].outerHTML),x="",w&&(x=V("<div class='ui-datepicker-buttonpane ui-widget-content'>").append(C?S:"").append(this._isInRange(e,I)?V("<button>").attr({type:"button",class:"ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all","data-handler":"today","data-event":"click"}).text(F):"").append(C?"":S)[0].outerHTML),s=parseInt(this._get(e,"firstDay"),10),s=isNaN(s)?0:s,r=this._get(e,"showWeek"),O=this._get(e,"dayNames"),L=this._get(e,"dayNamesMin"),R=this._get(e,"monthNames"),H=this._get(e,"monthNamesShort"),n=this._get(e,"beforeShowDay"),d=this._get(e,"showOtherMonths"),W=this._get(e,"selectOtherMonths"),c=this._getDefaultDate(e),o="",h=0;h<Y[0];h++){for(u="",this.maxRows=4,p=0;p<Y[1];p++){if(g=this._daylightSavingAdjust(new Date(j,K,e.selectedDay)),_=" ui-corner-all",f="",J){if(f+="<div class='ui-datepicker-group",1<Y[1])switch(p){case 0:f+=" ui-datepicker-group-first",_=" ui-corner-"+(C?"right":"left");break;case Y[1]-1:f+=" ui-datepicker-group-last",_=" ui-corner-"+(C?"left":"right");break;default:f+=" ui-datepicker-group-middle",_=""}f+="'>"}for(f+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+_+"'>"+(/all|left/.test(_)&&0===h?C?i:a:"")+(/all|right/.test(_)&&0===h?C?a:i:"")+this._generateMonthYearHeader(e,K,j,T,A,0<h||0<p,R,H)+"</div><table class='ui-datepicker-calendar'><thead><tr>",k=r?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",l=0;l<7;l++)k+="<th scope='col'"+(5<=(l+s+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+O[E=(l+s)%7]+"'>"+L[E]+"</span></th>";for(f+=k+"</tr></thead><tbody>",m=this._getDaysInMonth(j,K),j===e.selectedYear&&K===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,m)),D=(this._getFirstDayOfMonth(j,K)-s+7)%7,m=Math.ceil((D+m)/7),U=J&&this.maxRows>m?this.maxRows:m,this.maxRows=U,y=this._daylightSavingAdjust(new Date(j,K,1-D)),P=0;P<U;P++){for(f+="<tr>",z=r?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(y)+"</td>":"",l=0;l<7;l++)v=n?n.apply(e.input?e.input[0]:null,[y]):[!0,""],b=(M=y.getMonth()!==K)&&!W||!v[0]||T&&y<T||A&&A<y,z+="<td class='"+(5<=(l+s+6)%7?" ui-datepicker-week-end":"")+(M?" ui-datepicker-other-month":"")+(y.getTime()===g.getTime()&&K===e.selectedMonth&&e._keyEvent||c.getTime()===y.getTime()&&c.getTime()===g.getTime()?" "+this._dayOverClass:"")+(b?" "+this._unselectableClass+" ui-state-disabled":"")+(M&&!d?"":" "+v[1]+(y.getTime()===N.getTime()?" "+this._currentClass:"")+(y.getTime()===B.getTime()?" ui-datepicker-today":""))+"'"+(M&&!d||!v[2]?"":" title='"+v[2].replace(/'/g,"&#39;")+"'")+(b?"":" data-handler='selectDay' data-event='click' data-month='"+y.getMonth()+"' data-year='"+y.getFullYear()+"'")+">"+(M&&!d?"&#xa0;":b?"<span class='ui-state-default'>"+y.getDate()+"</span>":"<a class='ui-state-default"+(y.getTime()===B.getTime()?" ui-state-highlight":"")+(y.getTime()===N.getTime()?" ui-state-active":"")+(M?" ui-priority-secondary":"")+"' href='#' aria-current='"+(y.getTime()===N.getTime()?"true":"false")+"' data-date='"+y.getDate()+"'>"+y.getDate()+"</a>")+"</td>",y.setDate(y.getDate()+1),y=this._daylightSavingAdjust(y);f+=z+"</tr>"}11<++K&&(K=0,j++),u+=f+="</tbody></table>"+(J?"</div>"+(0<Y[0]&&p===Y[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}o+=u}return o+=x,e._keyEvent=!1,o},_generateMonthYearHeader:function(e,t,a,i,s,r,n,d){var c,o,l,h,u,p,g=this._get(e,"changeMonth"),_=this._get(e,"changeYear"),f=this._get(e,"showMonthAfterYear"),k=this._get(e,"selectMonthLabel"),D=this._get(e,"selectYearLabel"),m="<div class='ui-datepicker-title'>",y="";if(r||!g)y+="<span class='ui-datepicker-month'>"+n[t]+"</span>";else{for(c=i&&i.getFullYear()===a,o=s&&s.getFullYear()===a,y+="<select class='ui-datepicker-month' aria-label='"+k+"' data-handler='selectMonth' data-event='change'>",l=0;l<12;l++)(!c||l>=i.getMonth())&&(!o||l<=s.getMonth())&&(y+="<option value='"+l+"'"+(l===t?" selected='selected'":"")+">"+d[l]+"</option>");y+="</select>"}if(f||(m+=y+(!r&&g&&_?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",r||!_)m+="<span class='ui-datepicker-year'>"+a+"</span>";else{for(n=this._get(e,"yearRange").split(":"),h=(new Date).getFullYear(),u=(k=function(e){e=e.match(/c[+\-].*/)?a+parseInt(e.substring(1),10):e.match(/[+\-].*/)?h+parseInt(e,10):parseInt(e,10);return isNaN(e)?h:e})(n[0]),p=Math.max(u,k(n[1]||"")),u=i?Math.max(u,i.getFullYear()):u,p=s?Math.min(p,s.getFullYear()):p,e.yearshtml+="<select class='ui-datepicker-year' aria-label='"+D+"' data-handler='selectYear' data-event='change'>";u<=p;u++)e.yearshtml+="<option value='"+u+"'"+(u===a?" selected='selected'":"")+">"+u+"</option>";e.yearshtml+="</select>",m+=e.yearshtml,e.yearshtml=null}return m+=this._get(e,"yearSuffix"),f&&(m+=(!r&&g&&_?"":"&#xa0;")+y),m+="</div>"},_adjustInstDate:function(e,t,a){var i=e.selectedYear+("Y"===a?t:0),s=e.selectedMonth+("M"===a?t:0),t=Math.min(e.selectedDay,this._getDaysInMonth(i,s))+("D"===a?t:0),i=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(i,s,t)));e.selectedDay=i.getDate(),e.drawMonth=e.selectedMonth=i.getMonth(),e.drawYear=e.selectedYear=i.getFullYear(),"M"!==a&&"Y"!==a||this._notifyChange(e)},_restrictMinMax:function(e,t){var a=this._getMinMaxDate(e,"min"),e=this._getMinMaxDate(e,"max"),a=a&&t<a?a:t;return e&&e<a?e:a},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){e=this._get(e,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,a,i){var s=this._getNumberOfMonths(e),a=this._daylightSavingAdjust(new Date(a,i+(t<0?t:s[0]*s[1]),1));return t<0&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(e,a)},_isInRange:function(e,t){var a,i=this._getMinMaxDate(e,"min"),s=this._getMinMaxDate(e,"max"),r=null,n=null,e=this._get(e,"yearRange");return e&&(e=e.split(":"),a=(new Date).getFullYear(),r=parseInt(e[0],10),n=parseInt(e[1],10),e[0].match(/[+\-].*/)&&(r+=a),e[1].match(/[+\-].*/))&&(n+=a),(!i||t.getTime()>=i.getTime())&&(!s||t.getTime()<=s.getTime())&&(!r||t.getFullYear()>=r)&&(!n||t.getFullYear()<=n)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return{shortYearCutoff:"string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,a,i){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);i=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(i,a,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),i,this._getFormatConfig(e))}}),V.fn.datepicker=function(e){if(!this.length)return this;V.datepicker.initialized||(V(document).on("mousedown",V.datepicker._checkExternalClick),V.datepicker.initialized=!0),0===V("#"+V.datepicker._mainDivId).length&&V("body").append(V.datepicker.dpDiv);var t=Array.prototype.slice.call(arguments,1);return"string"==typeof e&&("isDisabled"===e||"getDate"===e||"widget"===e)||"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?V.datepicker["_"+e+"Datepicker"].apply(V.datepicker,[this[0]].concat(t)):this.each(function(){"string"==typeof e?V.datepicker["_"+e+"Datepicker"].apply(V.datepicker,[this].concat(t)):V.datepicker._attachDatepicker(this,e)})},V.datepicker=new e,V.datepicker.initialized=!1,V.datepicker.uuid=(new Date).getTime(),V.datepicker.version="1.13.3",V.datepicker});                                                                                                                    jquery/ui/dialog.js                                                                                 0000644                 00000056530 15212564042 0010307 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Dialog 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Dialog
//>>group: Widgets
//>>description: Displays customizable dialog windows.
//>>docs: https://api.jqueryui.com/dialog/
//>>demos: https://jqueryui.com/dialog/
//>>css.structure: ../../themes/base/core.css
//>>css.structure: ../../themes/base/dialog.css
//>>css.theme: ../../themes/base/theme.css

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"./button",
			"./draggable",
			"./mouse",
			"./resizable",
			"../focusable",
			"../keycode",
			"../position",
			"../safe-active-element",
			"../safe-blur",
			"../tabbable",
			"../unique-id",
			"../version",
			"../widget"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

$.widget( "ui.dialog", {
	version: "1.13.3",
	options: {
		appendTo: "body",
		autoOpen: true,
		buttons: [],
		classes: {
			"ui-dialog": "ui-corner-all",
			"ui-dialog-titlebar": "ui-corner-all"
		},
		closeOnEscape: true,
		closeText: "Close",
		draggable: true,
		hide: null,
		height: "auto",
		maxHeight: null,
		maxWidth: null,
		minHeight: 150,
		minWidth: 150,
		modal: false,
		position: {
			my: "center",
			at: "center",
			of: window,
			collision: "fit",

			// Ensure the titlebar is always visible
			using: function( pos ) {
				var topOffset = $( this ).css( pos ).offset().top;
				if ( topOffset < 0 ) {
					$( this ).css( "top", pos.top - topOffset );
				}
			}
		},
		resizable: true,
		show: null,
		title: null,
		width: 300,

		// Callbacks
		beforeClose: null,
		close: null,
		drag: null,
		dragStart: null,
		dragStop: null,
		focus: null,
		open: null,
		resize: null,
		resizeStart: null,
		resizeStop: null
	},

	sizeRelatedOptions: {
		buttons: true,
		height: true,
		maxHeight: true,
		maxWidth: true,
		minHeight: true,
		minWidth: true,
		width: true
	},

	resizableRelatedOptions: {
		maxHeight: true,
		maxWidth: true,
		minHeight: true,
		minWidth: true
	},

	_create: function() {
		this.originalCss = {
			display: this.element[ 0 ].style.display,
			width: this.element[ 0 ].style.width,
			minHeight: this.element[ 0 ].style.minHeight,
			maxHeight: this.element[ 0 ].style.maxHeight,
			height: this.element[ 0 ].style.height
		};
		this.originalPosition = {
			parent: this.element.parent(),
			index: this.element.parent().children().index( this.element )
		};
		this.originalTitle = this.element.attr( "title" );
		if ( this.options.title == null && this.originalTitle != null ) {
			this.options.title = this.originalTitle;
		}

		// Dialogs can't be disabled
		if ( this.options.disabled ) {
			this.options.disabled = false;
		}

		this._createWrapper();

		this.element
			.show()
			.removeAttr( "title" )
			.appendTo( this.uiDialog );

		this._addClass( "ui-dialog-content", "ui-widget-content" );

		this._createTitlebar();
		this._createButtonPane();

		if ( this.options.draggable && $.fn.draggable ) {
			this._makeDraggable();
		}
		if ( this.options.resizable && $.fn.resizable ) {
			this._makeResizable();
		}

		this._isOpen = false;

		this._trackFocus();
	},

	_init: function() {
		if ( this.options.autoOpen ) {
			this.open();
		}
	},

	_appendTo: function() {
		var element = this.options.appendTo;
		if ( element && ( element.jquery || element.nodeType ) ) {
			return $( element );
		}
		return this.document.find( element || "body" ).eq( 0 );
	},

	_destroy: function() {
		var next,
			originalPosition = this.originalPosition;

		this._untrackInstance();
		this._destroyOverlay();

		this.element
			.removeUniqueId()
			.css( this.originalCss )

			// Without detaching first, the following becomes really slow
			.detach();

		this.uiDialog.remove();

		if ( this.originalTitle ) {
			this.element.attr( "title", this.originalTitle );
		}

		next = originalPosition.parent.children().eq( originalPosition.index );

		// Don't try to place the dialog next to itself (#8613)
		if ( next.length && next[ 0 ] !== this.element[ 0 ] ) {
			next.before( this.element );
		} else {
			originalPosition.parent.append( this.element );
		}
	},

	widget: function() {
		return this.uiDialog;
	},

	disable: $.noop,
	enable: $.noop,

	close: function( event ) {
		var that = this;

		if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) {
			return;
		}

		this._isOpen = false;
		this._focusedElement = null;
		this._destroyOverlay();
		this._untrackInstance();

		if ( !this.opener.filter( ":focusable" ).trigger( "focus" ).length ) {

			// Hiding a focused element doesn't trigger blur in WebKit
			// so in case we have nothing to focus on, explicitly blur the active element
			// https://bugs.webkit.org/show_bug.cgi?id=47182
			$.ui.safeBlur( $.ui.safeActiveElement( this.document[ 0 ] ) );
		}

		this._hide( this.uiDialog, this.options.hide, function() {
			that._trigger( "close", event );
		} );
	},

	isOpen: function() {
		return this._isOpen;
	},

	moveToTop: function() {
		this._moveToTop();
	},

	_moveToTop: function( event, silent ) {
		var moved = false,
			zIndices = this.uiDialog.siblings( ".ui-front:visible" ).map( function() {
				return +$( this ).css( "z-index" );
			} ).get(),
			zIndexMax = Math.max.apply( null, zIndices );

		if ( zIndexMax >= +this.uiDialog.css( "z-index" ) ) {
			this.uiDialog.css( "z-index", zIndexMax + 1 );
			moved = true;
		}

		if ( moved && !silent ) {
			this._trigger( "focus", event );
		}
		return moved;
	},

	open: function() {
		var that = this;
		if ( this._isOpen ) {
			if ( this._moveToTop() ) {
				this._focusTabbable();
			}
			return;
		}

		this._isOpen = true;
		this.opener = $( $.ui.safeActiveElement( this.document[ 0 ] ) );

		this._size();
		this._position();
		this._createOverlay();
		this._moveToTop( null, true );

		// Ensure the overlay is moved to the top with the dialog, but only when
		// opening. The overlay shouldn't move after the dialog is open so that
		// modeless dialogs opened after the modal dialog stack properly.
		if ( this.overlay ) {
			this.overlay.css( "z-index", this.uiDialog.css( "z-index" ) - 1 );
		}

		this._show( this.uiDialog, this.options.show, function() {
			that._focusTabbable();
			that._trigger( "focus" );
		} );

		// Track the dialog immediately upon opening in case a focus event
		// somehow occurs outside of the dialog before an element inside the
		// dialog is focused (#10152)
		this._makeFocusTarget();

		this._trigger( "open" );
	},

	_focusTabbable: function() {

		// Set focus to the first match:
		// 1. An element that was focused previously
		// 2. First element inside the dialog matching [autofocus]
		// 3. Tabbable element inside the content element
		// 4. Tabbable element inside the buttonpane
		// 5. The close button
		// 6. The dialog itself
		var hasFocus = this._focusedElement;
		if ( !hasFocus ) {
			hasFocus = this.element.find( "[autofocus]" );
		}
		if ( !hasFocus.length ) {
			hasFocus = this.element.find( ":tabbable" );
		}
		if ( !hasFocus.length ) {
			hasFocus = this.uiDialogButtonPane.find( ":tabbable" );
		}
		if ( !hasFocus.length ) {
			hasFocus = this.uiDialogTitlebarClose.filter( ":tabbable" );
		}
		if ( !hasFocus.length ) {
			hasFocus = this.uiDialog;
		}
		hasFocus.eq( 0 ).trigger( "focus" );
	},

	_restoreTabbableFocus: function() {
		var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),
			isActive = this.uiDialog[ 0 ] === activeElement ||
				$.contains( this.uiDialog[ 0 ], activeElement );
		if ( !isActive ) {
			this._focusTabbable();
		}
	},

	_keepFocus: function( event ) {
		event.preventDefault();
		this._restoreTabbableFocus();

		// support: IE
		// IE <= 8 doesn't prevent moving focus even with event.preventDefault()
		// so we check again later
		this._delay( this._restoreTabbableFocus );
	},

	_createWrapper: function() {
		this.uiDialog = $( "<div>" )
			.hide()
			.attr( {

				// Setting tabIndex makes the div focusable
				tabIndex: -1,
				role: "dialog"
			} )
			.appendTo( this._appendTo() );

		this._addClass( this.uiDialog, "ui-dialog", "ui-widget ui-widget-content ui-front" );
		this._on( this.uiDialog, {
			keydown: function( event ) {
				if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
						event.keyCode === $.ui.keyCode.ESCAPE ) {
					event.preventDefault();
					this.close( event );
					return;
				}

				// Prevent tabbing out of dialogs
				if ( event.keyCode !== $.ui.keyCode.TAB || event.isDefaultPrevented() ) {
					return;
				}
				var tabbables = this.uiDialog.find( ":tabbable" ),
					first = tabbables.first(),
					last = tabbables.last();

				if ( ( event.target === last[ 0 ] || event.target === this.uiDialog[ 0 ] ) &&
						!event.shiftKey ) {
					this._delay( function() {
						first.trigger( "focus" );
					} );
					event.preventDefault();
				} else if ( ( event.target === first[ 0 ] ||
						event.target === this.uiDialog[ 0 ] ) && event.shiftKey ) {
					this._delay( function() {
						last.trigger( "focus" );
					} );
					event.preventDefault();
				}
			},
			mousedown: function( event ) {
				if ( this._moveToTop( event ) ) {
					this._focusTabbable();
				}
			}
		} );

		// We assume that any existing aria-describedby attribute means
		// that the dialog content is marked up properly
		// otherwise we brute force the content as the description
		if ( !this.element.find( "[aria-describedby]" ).length ) {
			this.uiDialog.attr( {
				"aria-describedby": this.element.uniqueId().attr( "id" )
			} );
		}
	},

	_createTitlebar: function() {
		var uiDialogTitle;

		this.uiDialogTitlebar = $( "<div>" );
		this._addClass( this.uiDialogTitlebar,
			"ui-dialog-titlebar", "ui-widget-header ui-helper-clearfix" );
		this._on( this.uiDialogTitlebar, {
			mousedown: function( event ) {

				// Don't prevent click on close button (#8838)
				// Focusing a dialog that is partially scrolled out of view
				// causes the browser to scroll it into view, preventing the click event
				if ( !$( event.target ).closest( ".ui-dialog-titlebar-close" ) ) {

					// Dialog isn't getting focus when dragging (#8063)
					this.uiDialog.trigger( "focus" );
				}
			}
		} );

		// Support: IE
		// Use type="button" to prevent enter keypresses in textboxes from closing the
		// dialog in IE (#9312)
		this.uiDialogTitlebarClose = $( "<button type='button'></button>" )
			.button( {
				label: $( "<a>" ).text( this.options.closeText ).html(),
				icon: "ui-icon-closethick",
				showLabel: false
			} )
			.appendTo( this.uiDialogTitlebar );

		this._addClass( this.uiDialogTitlebarClose, "ui-dialog-titlebar-close" );
		this._on( this.uiDialogTitlebarClose, {
			click: function( event ) {
				event.preventDefault();
				this.close( event );
			}
		} );

		uiDialogTitle = $( "<span>" ).uniqueId().prependTo( this.uiDialogTitlebar );
		this._addClass( uiDialogTitle, "ui-dialog-title" );
		this._title( uiDialogTitle );

		this.uiDialogTitlebar.prependTo( this.uiDialog );

		this.uiDialog.attr( {
			"aria-labelledby": uiDialogTitle.attr( "id" )
		} );
	},

	_title: function( title ) {
		if ( this.options.title ) {
			title.text( this.options.title );
		} else {
			title.html( "&#160;" );
		}
	},

	_createButtonPane: function() {
		this.uiDialogButtonPane = $( "<div>" );
		this._addClass( this.uiDialogButtonPane, "ui-dialog-buttonpane",
			"ui-widget-content ui-helper-clearfix" );

		this.uiButtonSet = $( "<div>" )
			.appendTo( this.uiDialogButtonPane );
		this._addClass( this.uiButtonSet, "ui-dialog-buttonset" );

		this._createButtons();
	},

	_createButtons: function() {
		var that = this,
			buttons = this.options.buttons;

		// If we already have a button pane, remove it
		this.uiDialogButtonPane.remove();
		this.uiButtonSet.empty();

		if ( $.isEmptyObject( buttons ) || ( Array.isArray( buttons ) && !buttons.length ) ) {
			this._removeClass( this.uiDialog, "ui-dialog-buttons" );
			return;
		}

		$.each( buttons, function( name, props ) {
			var click, buttonOptions;
			props = typeof props === "function" ?
				{ click: props, text: name } :
				props;

			// Default to a non-submitting button
			props = $.extend( { type: "button" }, props );

			// Change the context for the click callback to be the main element
			click = props.click;
			buttonOptions = {
				icon: props.icon,
				iconPosition: props.iconPosition,
				showLabel: props.showLabel,

				// Deprecated options
				icons: props.icons,
				text: props.text
			};

			delete props.click;
			delete props.icon;
			delete props.iconPosition;
			delete props.showLabel;

			// Deprecated options
			delete props.icons;
			if ( typeof props.text === "boolean" ) {
				delete props.text;
			}

			$( "<button></button>", props )
				.button( buttonOptions )
				.appendTo( that.uiButtonSet )
				.on( "click", function() {
					click.apply( that.element[ 0 ], arguments );
				} );
		} );
		this._addClass( this.uiDialog, "ui-dialog-buttons" );
		this.uiDialogButtonPane.appendTo( this.uiDialog );
	},

	_makeDraggable: function() {
		var that = this,
			options = this.options;

		function filteredUi( ui ) {
			return {
				position: ui.position,
				offset: ui.offset
			};
		}

		this.uiDialog.draggable( {
			cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
			handle: ".ui-dialog-titlebar",
			containment: "document",
			start: function( event, ui ) {
				that._addClass( $( this ), "ui-dialog-dragging" );
				that._blockFrames();
				that._trigger( "dragStart", event, filteredUi( ui ) );
			},
			drag: function( event, ui ) {
				that._trigger( "drag", event, filteredUi( ui ) );
			},
			stop: function( event, ui ) {
				var left = ui.offset.left - that.document.scrollLeft(),
					top = ui.offset.top - that.document.scrollTop();

				options.position = {
					my: "left top",
					at: "left" + ( left >= 0 ? "+" : "" ) + left + " " +
						"top" + ( top >= 0 ? "+" : "" ) + top,
					of: that.window
				};
				that._removeClass( $( this ), "ui-dialog-dragging" );
				that._unblockFrames();
				that._trigger( "dragStop", event, filteredUi( ui ) );
			}
		} );
	},

	_makeResizable: function() {
		var that = this,
			options = this.options,
			handles = options.resizable,

			// .ui-resizable has position: relative defined in the stylesheet
			// but dialogs have to use absolute or fixed positioning
			position = this.uiDialog.css( "position" ),
			resizeHandles = typeof handles === "string" ?
				handles :
				"n,e,s,w,se,sw,ne,nw";

		function filteredUi( ui ) {
			return {
				originalPosition: ui.originalPosition,
				originalSize: ui.originalSize,
				position: ui.position,
				size: ui.size
			};
		}

		this.uiDialog.resizable( {
			cancel: ".ui-dialog-content",
			containment: "document",
			alsoResize: this.element,
			maxWidth: options.maxWidth,
			maxHeight: options.maxHeight,
			minWidth: options.minWidth,
			minHeight: this._minHeight(),
			handles: resizeHandles,
			start: function( event, ui ) {
				that._addClass( $( this ), "ui-dialog-resizing" );
				that._blockFrames();
				that._trigger( "resizeStart", event, filteredUi( ui ) );
			},
			resize: function( event, ui ) {
				that._trigger( "resize", event, filteredUi( ui ) );
			},
			stop: function( event, ui ) {
				var offset = that.uiDialog.offset(),
					left = offset.left - that.document.scrollLeft(),
					top = offset.top - that.document.scrollTop();

				options.height = that.uiDialog.height();
				options.width = that.uiDialog.width();
				options.position = {
					my: "left top",
					at: "left" + ( left >= 0 ? "+" : "" ) + left + " " +
						"top" + ( top >= 0 ? "+" : "" ) + top,
					of: that.window
				};
				that._removeClass( $( this ), "ui-dialog-resizing" );
				that._unblockFrames();
				that._trigger( "resizeStop", event, filteredUi( ui ) );
			}
		} )
			.css( "position", position );
	},

	_trackFocus: function() {
		this._on( this.widget(), {
			focusin: function( event ) {
				this._makeFocusTarget();
				this._focusedElement = $( event.target );
			}
		} );
	},

	_makeFocusTarget: function() {
		this._untrackInstance();
		this._trackingInstances().unshift( this );
	},

	_untrackInstance: function() {
		var instances = this._trackingInstances(),
			exists = $.inArray( this, instances );
		if ( exists !== -1 ) {
			instances.splice( exists, 1 );
		}
	},

	_trackingInstances: function() {
		var instances = this.document.data( "ui-dialog-instances" );
		if ( !instances ) {
			instances = [];
			this.document.data( "ui-dialog-instances", instances );
		}
		return instances;
	},

	_minHeight: function() {
		var options = this.options;

		return options.height === "auto" ?
			options.minHeight :
			Math.min( options.minHeight, options.height );
	},

	_position: function() {

		// Need to show the dialog to get the actual offset in the position plugin
		var isVisible = this.uiDialog.is( ":visible" );
		if ( !isVisible ) {
			this.uiDialog.show();
		}
		this.uiDialog.position( this.options.position );
		if ( !isVisible ) {
			this.uiDialog.hide();
		}
	},

	_setOptions: function( options ) {
		var that = this,
			resize = false,
			resizableOptions = {};

		$.each( options, function( key, value ) {
			that._setOption( key, value );

			if ( key in that.sizeRelatedOptions ) {
				resize = true;
			}
			if ( key in that.resizableRelatedOptions ) {
				resizableOptions[ key ] = value;
			}
		} );

		if ( resize ) {
			this._size();
			this._position();
		}
		if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
			this.uiDialog.resizable( "option", resizableOptions );
		}
	},

	_setOption: function( key, value ) {
		var isDraggable, isResizable,
			uiDialog = this.uiDialog;

		if ( key === "disabled" ) {
			return;
		}

		this._super( key, value );

		if ( key === "appendTo" ) {
			this.uiDialog.appendTo( this._appendTo() );
		}

		if ( key === "buttons" ) {
			this._createButtons();
		}

		if ( key === "closeText" ) {
			this.uiDialogTitlebarClose.button( {

				// Ensure that we always pass a string
				label: $( "<a>" ).text( "" + this.options.closeText ).html()
			} );
		}

		if ( key === "draggable" ) {
			isDraggable = uiDialog.is( ":data(ui-draggable)" );
			if ( isDraggable && !value ) {
				uiDialog.draggable( "destroy" );
			}

			if ( !isDraggable && value ) {
				this._makeDraggable();
			}
		}

		if ( key === "position" ) {
			this._position();
		}

		if ( key === "resizable" ) {

			// currently resizable, becoming non-resizable
			isResizable = uiDialog.is( ":data(ui-resizable)" );
			if ( isResizable && !value ) {
				uiDialog.resizable( "destroy" );
			}

			// Currently resizable, changing handles
			if ( isResizable && typeof value === "string" ) {
				uiDialog.resizable( "option", "handles", value );
			}

			// Currently non-resizable, becoming resizable
			if ( !isResizable && value !== false ) {
				this._makeResizable();
			}
		}

		if ( key === "title" ) {
			this._title( this.uiDialogTitlebar.find( ".ui-dialog-title" ) );
		}
	},

	_size: function() {

		// If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
		// divs will both have width and height set, so we need to reset them
		var nonContentHeight, minContentHeight, maxContentHeight,
			options = this.options;

		// Reset content sizing
		this.element.show().css( {
			width: "auto",
			minHeight: 0,
			maxHeight: "none",
			height: 0
		} );

		if ( options.minWidth > options.width ) {
			options.width = options.minWidth;
		}

		// Reset wrapper sizing
		// determine the height of all the non-content elements
		nonContentHeight = this.uiDialog.css( {
			height: "auto",
			width: options.width
		} )
			.outerHeight();
		minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
		maxContentHeight = typeof options.maxHeight === "number" ?
			Math.max( 0, options.maxHeight - nonContentHeight ) :
			"none";

		if ( options.height === "auto" ) {
			this.element.css( {
				minHeight: minContentHeight,
				maxHeight: maxContentHeight,
				height: "auto"
			} );
		} else {
			this.element.height( Math.max( 0, options.height - nonContentHeight ) );
		}

		if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
			this.uiDialog.resizable( "option", "minHeight", this._minHeight() );
		}
	},

	_blockFrames: function() {
		this.iframeBlocks = this.document.find( "iframe" ).map( function() {
			var iframe = $( this );

			return $( "<div>" )
				.css( {
					position: "absolute",
					width: iframe.outerWidth(),
					height: iframe.outerHeight()
				} )
				.appendTo( iframe.parent() )
				.offset( iframe.offset() )[ 0 ];
		} );
	},

	_unblockFrames: function() {
		if ( this.iframeBlocks ) {
			this.iframeBlocks.remove();
			delete this.iframeBlocks;
		}
	},

	_allowInteraction: function( event ) {
		if ( $( event.target ).closest( ".ui-dialog" ).length ) {
			return true;
		}

		// TODO: Remove hack when datepicker implements
		// the .ui-front logic (#8989)
		return !!$( event.target ).closest( ".ui-datepicker" ).length;
	},

	_createOverlay: function() {
		if ( !this.options.modal ) {
			return;
		}

		var jqMinor = $.fn.jquery.substring( 0, 4 );

		// We use a delay in case the overlay is created from an
		// event that we're going to be cancelling (#2804)
		var isOpening = true;
		this._delay( function() {
			isOpening = false;
		} );

		if ( !this.document.data( "ui-dialog-overlays" ) ) {

			// Prevent use of anchors and inputs
			// This doesn't use `_on()` because it is a shared event handler
			// across all open modal dialogs.
			this.document.on( "focusin.ui-dialog", function( event ) {
				if ( isOpening ) {
					return;
				}

				var instance = this._trackingInstances()[ 0 ];
				if ( !instance._allowInteraction( event ) ) {
					event.preventDefault();
					instance._focusTabbable();

					// Support: jQuery >=3.4 <3.7 only
					// In jQuery 3.4-3.6, there are multiple issues with focus/blur
					// trigger chains or when triggering is done on a hidden element
					// at least once.
					// Trigger focus in a delay in addition if needed to avoid the issues.
					// See https://github.com/jquery/jquery/issues/4382
					// See https://github.com/jquery/jquery/issues/4856
					// See https://github.com/jquery/jquery/issues/4950
					if ( jqMinor === "3.4." || jqMinor === "3.5." || jqMinor === "3.6." ) {
						instance._delay( instance._restoreTabbableFocus );
					}
				}
			}.bind( this ) );
		}

		this.overlay = $( "<div>" )
			.appendTo( this._appendTo() );

		this._addClass( this.overlay, null, "ui-widget-overlay ui-front" );
		this._on( this.overlay, {
			mousedown: "_keepFocus"
		} );
		this.document.data( "ui-dialog-overlays",
			( this.document.data( "ui-dialog-overlays" ) || 0 ) + 1 );
	},

	_destroyOverlay: function() {
		if ( !this.options.modal ) {
			return;
		}

		if ( this.overlay ) {
			var overlays = this.document.data( "ui-dialog-overlays" ) - 1;

			if ( !overlays ) {
				this.document.off( "focusin.ui-dialog" );
				this.document.removeData( "ui-dialog-overlays" );
			} else {
				this.document.data( "ui-dialog-overlays", overlays );
			}

			this.overlay.remove();
			this.overlay = null;
		}
	}
} );

// DEPRECATED
// TODO: switch return back to widget declaration at top of file when this is removed
if ( $.uiBackCompat !== false ) {

	// Backcompat for dialogClass option
	$.widget( "ui.dialog", $.ui.dialog, {
		options: {
			dialogClass: ""
		},
		_createWrapper: function() {
			this._super();
			this.uiDialog.addClass( this.options.dialogClass );
		},
		_setOption: function( key, value ) {
			if ( key === "dialogClass" ) {
				this.uiDialog
					.removeClass( this.options.dialogClass )
					.addClass( value );
			}
			this._superApply( arguments );
		}
	} );
}

return $.ui.dialog;

} );
                                                                                                                                                                        jquery/ui/dialog.min.js                                                                             0000644                 00000031452 15212564042 0011065 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Dialog 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery","./button","./draggable","./mouse","./resizable","../focusable","../keycode","../position","../safe-active-element","../safe-blur","../tabbable","../unique-id","../version","../widget"],i):i(jQuery)}(function(l){"use strict";return l.widget("ui.dialog",{version:"1.13.3",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(i){var t=l(this).css(i).offset().top;t<0&&l(this).css("top",i.top-t)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&l.fn.draggable&&this._makeDraggable(),this.options.resizable&&l.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var i=this.options.appendTo;return i&&(i.jquery||i.nodeType)?l(i):this.document.find(i||"body").eq(0)},_destroy:function(){var i,t=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(i=t.parent.children().eq(t.index)).length&&i[0]!==this.element[0]?i.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:l.noop,enable:l.noop,close:function(i){var t=this;this._isOpen&&!1!==this._trigger("beforeClose",i)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||l.ui.safeBlur(l.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){t._trigger("close",i)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(i,t){var e=!1,o=this.uiDialog.siblings(".ui-front:visible").map(function(){return+l(this).css("z-index")}).get(),o=Math.max.apply(null,o);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),e=!0),e&&!t&&this._trigger("focus",i),e},open:function(){var i=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=l(l.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){i._focusTabbable(),i._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var i=this._focusedElement;(i=(i=(i=(i=(i=i||this.element.find("[autofocus]")).length?i:this.element.find(":tabbable")).length?i:this.uiDialogButtonPane.find(":tabbable")).length?i:this.uiDialogTitlebarClose.filter(":tabbable")).length?i:this.uiDialog).eq(0).trigger("focus")},_restoreTabbableFocus:function(){var i=l.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===i||l.contains(this.uiDialog[0],i)||this._focusTabbable()},_keepFocus:function(i){i.preventDefault(),this._restoreTabbableFocus(),this._delay(this._restoreTabbableFocus)},_createWrapper:function(){this.uiDialog=l("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(i){var t,e,o;this.options.closeOnEscape&&!i.isDefaultPrevented()&&i.keyCode&&i.keyCode===l.ui.keyCode.ESCAPE?(i.preventDefault(),this.close(i)):i.keyCode!==l.ui.keyCode.TAB||i.isDefaultPrevented()||(t=this.uiDialog.find(":tabbable"),e=t.first(),o=t.last(),i.target!==o[0]&&i.target!==this.uiDialog[0]||i.shiftKey?i.target!==e[0]&&i.target!==this.uiDialog[0]||!i.shiftKey||(this._delay(function(){o.trigger("focus")}),i.preventDefault()):(this._delay(function(){e.trigger("focus")}),i.preventDefault()))},mousedown:function(i){this._moveToTop(i)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var i;this.uiDialogTitlebar=l("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(i){l(i.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=l("<button type='button'></button>").button({label:l("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(i){i.preventDefault(),this.close(i)}}),i=l("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(i,"ui-dialog-title"),this._title(i),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":i.attr("id")})},_title:function(i){this.options.title?i.text(this.options.title):i.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=l("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=l("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var o=this,i=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),l.isEmptyObject(i)||Array.isArray(i)&&!i.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):(l.each(i,function(i,t){var e;t=l.extend({type:"button"},t="function"==typeof t?{click:t,text:i}:t),e=t.click,i={icon:t.icon,iconPosition:t.iconPosition,showLabel:t.showLabel,icons:t.icons,text:t.text},delete t.click,delete t.icon,delete t.iconPosition,delete t.showLabel,delete t.icons,"boolean"==typeof t.text&&delete t.text,l("<button></button>",t).button(i).appendTo(o.uiButtonSet).on("click",function(){e.apply(o.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var s=this,n=this.options;function a(i){return{position:i.position,offset:i.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(i,t){s._addClass(l(this),"ui-dialog-dragging"),s._blockFrames(),s._trigger("dragStart",i,a(t))},drag:function(i,t){s._trigger("drag",i,a(t))},stop:function(i,t){var e=t.offset.left-s.document.scrollLeft(),o=t.offset.top-s.document.scrollTop();n.position={my:"left top",at:"left"+(0<=e?"+":"")+e+" top"+(0<=o?"+":"")+o,of:s.window},s._removeClass(l(this),"ui-dialog-dragging"),s._unblockFrames(),s._trigger("dragStop",i,a(t))}})},_makeResizable:function(){var s=this,n=this.options,i=n.resizable,t=this.uiDialog.css("position"),i="string"==typeof i?i:"n,e,s,w,se,sw,ne,nw";function a(i){return{originalPosition:i.originalPosition,originalSize:i.originalSize,position:i.position,size:i.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:n.maxWidth,maxHeight:n.maxHeight,minWidth:n.minWidth,minHeight:this._minHeight(),handles:i,start:function(i,t){s._addClass(l(this),"ui-dialog-resizing"),s._blockFrames(),s._trigger("resizeStart",i,a(t))},resize:function(i,t){s._trigger("resize",i,a(t))},stop:function(i,t){var e=s.uiDialog.offset(),o=e.left-s.document.scrollLeft(),e=e.top-s.document.scrollTop();n.height=s.uiDialog.height(),n.width=s.uiDialog.width(),n.position={my:"left top",at:"left"+(0<=o?"+":"")+o+" top"+(0<=e?"+":"")+e,of:s.window},s._removeClass(l(this),"ui-dialog-resizing"),s._unblockFrames(),s._trigger("resizeStop",i,a(t))}}).css("position",t)},_trackFocus:function(){this._on(this.widget(),{focusin:function(i){this._makeFocusTarget(),this._focusedElement=l(i.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var i=this._trackingInstances(),t=l.inArray(this,i);-1!==t&&i.splice(t,1)},_trackingInstances:function(){var i=this.document.data("ui-dialog-instances");return i||this.document.data("ui-dialog-instances",i=[]),i},_minHeight:function(){var i=this.options;return"auto"===i.height?i.minHeight:Math.min(i.minHeight,i.height)},_position:function(){var i=this.uiDialog.is(":visible");i||this.uiDialog.show(),this.uiDialog.position(this.options.position),i||this.uiDialog.hide()},_setOptions:function(i){var e=this,o=!1,s={};l.each(i,function(i,t){e._setOption(i,t),i in e.sizeRelatedOptions&&(o=!0),i in e.resizableRelatedOptions&&(s[i]=t)}),o&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",s)},_setOption:function(i,t){var e,o=this.uiDialog;"disabled"!==i&&(this._super(i,t),"appendTo"===i&&this.uiDialog.appendTo(this._appendTo()),"buttons"===i&&this._createButtons(),"closeText"===i&&this.uiDialogTitlebarClose.button({label:l("<a>").text(""+this.options.closeText).html()}),"draggable"===i&&((e=o.is(":data(ui-draggable)"))&&!t&&o.draggable("destroy"),!e)&&t&&this._makeDraggable(),"position"===i&&this._position(),"resizable"===i&&((e=o.is(":data(ui-resizable)"))&&!t&&o.resizable("destroy"),e&&"string"==typeof t&&o.resizable("option","handles",t),e||!1===t||this._makeResizable()),"title"===i)&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title"))},_size:function(){var i,t,e,o=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),o.minWidth>o.width&&(o.width=o.minWidth),i=this.uiDialog.css({height:"auto",width:o.width}).outerHeight(),t=Math.max(0,o.minHeight-i),e="number"==typeof o.maxHeight?Math.max(0,o.maxHeight-i):"none","auto"===o.height?this.element.css({minHeight:t,maxHeight:e,height:"auto"}):this.element.height(Math.max(0,o.height-i)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var i=l(this);return l("<div>").css({position:"absolute",width:i.outerWidth(),height:i.outerHeight()}).appendTo(i.parent()).offset(i.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(i){return!!l(i.target).closest(".ui-dialog").length||!!l(i.target).closest(".ui-datepicker").length},_createOverlay:function(){var e,o;this.options.modal&&(e=l.fn.jquery.substring(0,4),o=!0,this._delay(function(){o=!1}),this.document.data("ui-dialog-overlays")||this.document.on("focusin.ui-dialog",function(i){var t;o||(t=this._trackingInstances()[0])._allowInteraction(i)||(i.preventDefault(),t._focusTabbable(),"3.4."!==e&&"3.5."!==e&&"3.6."!==e)||t._delay(t._restoreTabbableFocus)}.bind(this)),this.overlay=l("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1))},_destroyOverlay:function(){var i;this.options.modal&&this.overlay&&((i=this.document.data("ui-dialog-overlays")-1)?this.document.data("ui-dialog-overlays",i):(this.document.off("focusin.ui-dialog"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null)}}),!1!==l.uiBackCompat&&l.widget("ui.dialog",l.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(i,t){"dialogClass"===i&&this.uiDialog.removeClass(this.options.dialogClass).addClass(t),this._superApply(arguments)}}),l.ui.dialog});                                                                                                                                                                                                                      jquery/ui/draggable.js                                                                              0000644                 00000105332 15212564042 0010753 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Draggable 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Draggable
//>>group: Interactions
//>>description: Enables dragging functionality for any element.
//>>docs: https://api.jqueryui.com/draggable/
//>>demos: https://jqueryui.com/draggable/
//>>css.structure: ../../themes/base/draggable.css

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"./mouse",
			"../data",
			"../plugin",
			"../safe-active-element",
			"../safe-blur",
			"../scroll-parent",
			"../version",
			"../widget"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

$.widget( "ui.draggable", $.ui.mouse, {
	version: "1.13.3",
	widgetEventPrefix: "drag",
	options: {
		addClasses: true,
		appendTo: "parent",
		axis: false,
		connectToSortable: false,
		containment: false,
		cursor: "auto",
		cursorAt: false,
		grid: false,
		handle: false,
		helper: "original",
		iframeFix: false,
		opacity: false,
		refreshPositions: false,
		revert: false,
		revertDuration: 500,
		scope: "default",
		scroll: true,
		scrollSensitivity: 20,
		scrollSpeed: 20,
		snap: false,
		snapMode: "both",
		snapTolerance: 20,
		stack: false,
		zIndex: false,

		// Callbacks
		drag: null,
		start: null,
		stop: null
	},
	_create: function() {

		if ( this.options.helper === "original" ) {
			this._setPositionRelative();
		}
		if ( this.options.addClasses ) {
			this._addClass( "ui-draggable" );
		}
		this._setHandleClassName();

		this._mouseInit();
	},

	_setOption: function( key, value ) {
		this._super( key, value );
		if ( key === "handle" ) {
			this._removeHandleClassName();
			this._setHandleClassName();
		}
	},

	_destroy: function() {
		if ( ( this.helper || this.element ).is( ".ui-draggable-dragging" ) ) {
			this.destroyOnClear = true;
			return;
		}
		this._removeHandleClassName();
		this._mouseDestroy();
	},

	_mouseCapture: function( event ) {
		var o = this.options;

		// Among others, prevent a drag on a resizable-handle
		if ( this.helper || o.disabled ||
				$( event.target ).closest( ".ui-resizable-handle" ).length > 0 ) {
			return false;
		}

		//Quit if we're not on a valid handle
		this.handle = this._getHandle( event );
		if ( !this.handle ) {
			return false;
		}

		this._blurActiveElement( event );

		this._blockFrames( o.iframeFix === true ? "iframe" : o.iframeFix );

		return true;

	},

	_blockFrames: function( selector ) {
		this.iframeBlocks = this.document.find( selector ).map( function() {
			var iframe = $( this );

			return $( "<div>" )
				.css( "position", "absolute" )
				.appendTo( iframe.parent() )
				.outerWidth( iframe.outerWidth() )
				.outerHeight( iframe.outerHeight() )
				.offset( iframe.offset() )[ 0 ];
		} );
	},

	_unblockFrames: function() {
		if ( this.iframeBlocks ) {
			this.iframeBlocks.remove();
			delete this.iframeBlocks;
		}
	},

	_blurActiveElement: function( event ) {
		var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),
			target = $( event.target );

		// Don't blur if the event occurred on an element that is within
		// the currently focused element
		// See #10527, #12472
		if ( target.closest( activeElement ).length ) {
			return;
		}

		// Blur any element that currently has focus, see #4261
		$.ui.safeBlur( activeElement );
	},

	_mouseStart: function( event ) {

		var o = this.options;

		//Create and append the visible helper
		this.helper = this._createHelper( event );

		this._addClass( this.helper, "ui-draggable-dragging" );

		//Cache the helper size
		this._cacheHelperProportions();

		//If ddmanager is used for droppables, set the global draggable
		if ( $.ui.ddmanager ) {
			$.ui.ddmanager.current = this;
		}

		/*
		 * - Position generation -
		 * This block generates everything position related - it's the core of draggables.
		 */

		//Cache the margins of the original element
		this._cacheMargins();

		//Store the helper's css position
		this.cssPosition = this.helper.css( "position" );
		this.scrollParent = this.helper.scrollParent( true );
		this.offsetParent = this.helper.offsetParent();
		this.hasFixedAncestor = this.helper.parents().filter( function() {
				return $( this ).css( "position" ) === "fixed";
			} ).length > 0;

		//The element's absolute position on the page minus margins
		this.positionAbs = this.element.offset();
		this._refreshOffsets( event );

		//Generate the original position
		this.originalPosition = this.position = this._generatePosition( event, false );
		this.originalPageX = event.pageX;
		this.originalPageY = event.pageY;

		//Adjust the mouse offset relative to the helper if "cursorAt" is supplied
		if ( o.cursorAt ) {
			this._adjustOffsetFromHelper( o.cursorAt );
		}

		//Set a containment if given in the options
		this._setContainment();

		//Trigger event + callbacks
		if ( this._trigger( "start", event ) === false ) {
			this._clear();
			return false;
		}

		//Recache the helper size
		this._cacheHelperProportions();

		//Prepare the droppable offsets
		if ( $.ui.ddmanager && !o.dropBehaviour ) {
			$.ui.ddmanager.prepareOffsets( this, event );
		}

		// Execute the drag once - this causes the helper not to be visible before getting its
		// correct position
		this._mouseDrag( event, true );

		// If the ddmanager is used for droppables, inform the manager that dragging has started
		// (see #5003)
		if ( $.ui.ddmanager ) {
			$.ui.ddmanager.dragStart( this, event );
		}

		return true;
	},

	_refreshOffsets: function( event ) {
		this.offset = {
			top: this.positionAbs.top - this.margins.top,
			left: this.positionAbs.left - this.margins.left,
			scroll: false,
			parent: this._getParentOffset(),
			relative: this._getRelativeOffset()
		};

		this.offset.click = {
			left: event.pageX - this.offset.left,
			top: event.pageY - this.offset.top
		};
	},

	_mouseDrag: function( event, noPropagation ) {

		// reset any necessary cached properties (see #5009)
		if ( this.hasFixedAncestor ) {
			this.offset.parent = this._getParentOffset();
		}

		//Compute the helpers position
		this.position = this._generatePosition( event, true );
		this.positionAbs = this._convertPositionTo( "absolute" );

		//Call plugins and callbacks and use the resulting position if something is returned
		if ( !noPropagation ) {
			var ui = this._uiHash();
			if ( this._trigger( "drag", event, ui ) === false ) {
				this._mouseUp( new $.Event( "mouseup", event ) );
				return false;
			}
			this.position = ui.position;
		}

		this.helper[ 0 ].style.left = this.position.left + "px";
		this.helper[ 0 ].style.top = this.position.top + "px";

		if ( $.ui.ddmanager ) {
			$.ui.ddmanager.drag( this, event );
		}

		return false;
	},

	_mouseStop: function( event ) {

		//If we are using droppables, inform the manager about the drop
		var that = this,
			dropped = false;
		if ( $.ui.ddmanager && !this.options.dropBehaviour ) {
			dropped = $.ui.ddmanager.drop( this, event );
		}

		//if a drop comes from outside (a sortable)
		if ( this.dropped ) {
			dropped = this.dropped;
			this.dropped = false;
		}

		if ( ( this.options.revert === "invalid" && !dropped ) ||
				( this.options.revert === "valid" && dropped ) ||
				this.options.revert === true || ( typeof this.options.revert === "function" &&
				this.options.revert.call( this.element, dropped ) )
		) {
			$( this.helper ).animate(
				this.originalPosition,
				parseInt( this.options.revertDuration, 10 ),
				function() {
					if ( that._trigger( "stop", event ) !== false ) {
						that._clear();
					}
				}
			);
		} else {
			if ( this._trigger( "stop", event ) !== false ) {
				this._clear();
			}
		}

		return false;
	},

	_mouseUp: function( event ) {
		this._unblockFrames();

		// If the ddmanager is used for droppables, inform the manager that dragging has stopped
		// (see #5003)
		if ( $.ui.ddmanager ) {
			$.ui.ddmanager.dragStop( this, event );
		}

		// Only need to focus if the event occurred on the draggable itself, see #10527
		if ( this.handleElement.is( event.target ) ) {

			// The interaction is over; whether or not the click resulted in a drag,
			// focus the element
			this.element.trigger( "focus" );
		}

		return $.ui.mouse.prototype._mouseUp.call( this, event );
	},

	cancel: function() {

		if ( this.helper.is( ".ui-draggable-dragging" ) ) {
			this._mouseUp( new $.Event( "mouseup", { target: this.element[ 0 ] } ) );
		} else {
			this._clear();
		}

		return this;

	},

	_getHandle: function( event ) {
		return this.options.handle ?
			!!$( event.target ).closest( this.element.find( this.options.handle ) ).length :
			true;
	},

	_setHandleClassName: function() {
		this.handleElement = this.options.handle ?
			this.element.find( this.options.handle ) : this.element;
		this._addClass( this.handleElement, "ui-draggable-handle" );
	},

	_removeHandleClassName: function() {
		this._removeClass( this.handleElement, "ui-draggable-handle" );
	},

	_createHelper: function( event ) {

		var o = this.options,
			helperIsFunction = typeof o.helper === "function",
			helper = helperIsFunction ?
				$( o.helper.apply( this.element[ 0 ], [ event ] ) ) :
				( o.helper === "clone" ?
					this.element.clone().removeAttr( "id" ) :
					this.element );

		if ( !helper.parents( "body" ).length ) {
			helper.appendTo( ( o.appendTo === "parent" ?
				this.element[ 0 ].parentNode :
				o.appendTo ) );
		}

		// https://bugs.jqueryui.com/ticket/9446
		// a helper function can return the original element
		// which wouldn't have been set to relative in _create
		if ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) {
			this._setPositionRelative();
		}

		if ( helper[ 0 ] !== this.element[ 0 ] &&
				!( /(fixed|absolute)/ ).test( helper.css( "position" ) ) ) {
			helper.css( "position", "absolute" );
		}

		return helper;

	},

	_setPositionRelative: function() {
		if ( !( /^(?:r|a|f)/ ).test( this.element.css( "position" ) ) ) {
			this.element[ 0 ].style.position = "relative";
		}
	},

	_adjustOffsetFromHelper: function( obj ) {
		if ( typeof obj === "string" ) {
			obj = obj.split( " " );
		}
		if ( Array.isArray( obj ) ) {
			obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };
		}
		if ( "left" in obj ) {
			this.offset.click.left = obj.left + this.margins.left;
		}
		if ( "right" in obj ) {
			this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
		}
		if ( "top" in obj ) {
			this.offset.click.top = obj.top + this.margins.top;
		}
		if ( "bottom" in obj ) {
			this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
		}
	},

	_isRootNode: function( element ) {
		return ( /(html|body)/i ).test( element.tagName ) || element === this.document[ 0 ];
	},

	_getParentOffset: function() {

		//Get the offsetParent and cache its position
		var po = this.offsetParent.offset(),
			document = this.document[ 0 ];

		// This is a special case where we need to modify a offset calculated on start, since the
		// following happened:
		// 1. The position of the helper is absolute, so it's position is calculated based on the
		// next positioned parent
		// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't
		// the document, which means that the scroll is included in the initial calculation of the
		// offset of the parent, and never recalculated upon drag
		if ( this.cssPosition === "absolute" && this.scrollParent[ 0 ] !== document &&
				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {
			po.left += this.scrollParent.scrollLeft();
			po.top += this.scrollParent.scrollTop();
		}

		if ( this._isRootNode( this.offsetParent[ 0 ] ) ) {
			po = { top: 0, left: 0 };
		}

		return {
			top: po.top + ( parseInt( this.offsetParent.css( "borderTopWidth" ), 10 ) || 0 ),
			left: po.left + ( parseInt( this.offsetParent.css( "borderLeftWidth" ), 10 ) || 0 )
		};

	},

	_getRelativeOffset: function() {
		if ( this.cssPosition !== "relative" ) {
			return { top: 0, left: 0 };
		}

		var p = this.element.position(),
			scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );

		return {
			top: p.top - ( parseInt( this.helper.css( "top" ), 10 ) || 0 ) +
				( !scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ),
			left: p.left - ( parseInt( this.helper.css( "left" ), 10 ) || 0 ) +
				( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 )
		};

	},

	_cacheMargins: function() {
		this.margins = {
			left: ( parseInt( this.element.css( "marginLeft" ), 10 ) || 0 ),
			top: ( parseInt( this.element.css( "marginTop" ), 10 ) || 0 ),
			right: ( parseInt( this.element.css( "marginRight" ), 10 ) || 0 ),
			bottom: ( parseInt( this.element.css( "marginBottom" ), 10 ) || 0 )
		};
	},

	_cacheHelperProportions: function() {
		this.helperProportions = {
			width: this.helper.outerWidth(),
			height: this.helper.outerHeight()
		};
	},

	_setContainment: function() {

		var isUserScrollable, c, ce,
			o = this.options,
			document = this.document[ 0 ];

		this.relativeContainer = null;

		if ( !o.containment ) {
			this.containment = null;
			return;
		}

		if ( o.containment === "window" ) {
			this.containment = [
				$( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
				$( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,
				$( window ).scrollLeft() + $( window ).width() -
					this.helperProportions.width - this.margins.left,
				$( window ).scrollTop() +
					( $( window ).height() || document.body.parentNode.scrollHeight ) -
					this.helperProportions.height - this.margins.top
			];
			return;
		}

		if ( o.containment === "document" ) {
			this.containment = [
				0,
				0,
				$( document ).width() - this.helperProportions.width - this.margins.left,
				( $( document ).height() || document.body.parentNode.scrollHeight ) -
					this.helperProportions.height - this.margins.top
			];
			return;
		}

		if ( o.containment.constructor === Array ) {
			this.containment = o.containment;
			return;
		}

		if ( o.containment === "parent" ) {
			o.containment = this.helper[ 0 ].parentNode;
		}

		c = $( o.containment );
		ce = c[ 0 ];

		if ( !ce ) {
			return;
		}

		isUserScrollable = /(scroll|auto)/.test( c.css( "overflow" ) );

		this.containment = [
			( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) +
				( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ),
			( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) +
				( parseInt( c.css( "paddingTop" ), 10 ) || 0 ),
			( isUserScrollable ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -
				( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) -
				( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) -
				this.helperProportions.width -
				this.margins.left -
				this.margins.right,
			( isUserScrollable ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -
				( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) -
				( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) -
				this.helperProportions.height -
				this.margins.top -
				this.margins.bottom
		];
		this.relativeContainer = c;
	},

	_convertPositionTo: function( d, pos ) {

		if ( !pos ) {
			pos = this.position;
		}

		var mod = d === "absolute" ? 1 : -1,
			scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );

		return {
			top: (

				// The absolute mouse position
				pos.top	+

				// Only for relative positioned nodes: Relative offset from element to offset parent
				this.offset.relative.top * mod +

				// The offsetParent's offset without borders (offset + border)
				this.offset.parent.top * mod -
				( ( this.cssPosition === "fixed" ?
					-this.offset.scroll.top :
					( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * mod )
			),
			left: (

				// The absolute mouse position
				pos.left +

				// Only for relative positioned nodes: Relative offset from element to offset parent
				this.offset.relative.left * mod +

				// The offsetParent's offset without borders (offset + border)
				this.offset.parent.left * mod	-
				( ( this.cssPosition === "fixed" ?
					-this.offset.scroll.left :
					( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod )
			)
		};

	},

	_generatePosition: function( event, constrainPosition ) {

		var containment, co, top, left,
			o = this.options,
			scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ),
			pageX = event.pageX,
			pageY = event.pageY;

		// Cache the scroll
		if ( !scrollIsRootNode || !this.offset.scroll ) {
			this.offset.scroll = {
				top: this.scrollParent.scrollTop(),
				left: this.scrollParent.scrollLeft()
			};
		}

		/*
		 * - Position constraining -
		 * Constrain the position to a mix of grid, containment.
		 */

		// If we are not dragging yet, we won't check for options
		if ( constrainPosition ) {
			if ( this.containment ) {
				if ( this.relativeContainer ) {
					co = this.relativeContainer.offset();
					containment = [
						this.containment[ 0 ] + co.left,
						this.containment[ 1 ] + co.top,
						this.containment[ 2 ] + co.left,
						this.containment[ 3 ] + co.top
					];
				} else {
					containment = this.containment;
				}

				if ( event.pageX - this.offset.click.left < containment[ 0 ] ) {
					pageX = containment[ 0 ] + this.offset.click.left;
				}
				if ( event.pageY - this.offset.click.top < containment[ 1 ] ) {
					pageY = containment[ 1 ] + this.offset.click.top;
				}
				if ( event.pageX - this.offset.click.left > containment[ 2 ] ) {
					pageX = containment[ 2 ] + this.offset.click.left;
				}
				if ( event.pageY - this.offset.click.top > containment[ 3 ] ) {
					pageY = containment[ 3 ] + this.offset.click.top;
				}
			}

			if ( o.grid ) {

				//Check for grid elements set to 0 to prevent divide by 0 error causing invalid
				// argument errors in IE (see ticket #6950)
				top = o.grid[ 1 ] ? this.originalPageY + Math.round( ( pageY -
					this.originalPageY ) / o.grid[ 1 ] ) * o.grid[ 1 ] : this.originalPageY;
				pageY = containment ? ( ( top - this.offset.click.top >= containment[ 1 ] ||
					top - this.offset.click.top > containment[ 3 ] ) ?
						top :
						( ( top - this.offset.click.top >= containment[ 1 ] ) ?
							top - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) : top;

				left = o.grid[ 0 ] ? this.originalPageX +
					Math.round( ( pageX - this.originalPageX ) / o.grid[ 0 ] ) * o.grid[ 0 ] :
					this.originalPageX;
				pageX = containment ? ( ( left - this.offset.click.left >= containment[ 0 ] ||
					left - this.offset.click.left > containment[ 2 ] ) ?
						left :
						( ( left - this.offset.click.left >= containment[ 0 ] ) ?
							left - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) : left;
			}

			if ( o.axis === "y" ) {
				pageX = this.originalPageX;
			}

			if ( o.axis === "x" ) {
				pageY = this.originalPageY;
			}
		}

		return {
			top: (

				// The absolute mouse position
				pageY -

				// Click offset (relative to the element)
				this.offset.click.top -

				// Only for relative positioned nodes: Relative offset from element to offset parent
				this.offset.relative.top -

				// The offsetParent's offset without borders (offset + border)
				this.offset.parent.top +
				( this.cssPosition === "fixed" ?
					-this.offset.scroll.top :
					( scrollIsRootNode ? 0 : this.offset.scroll.top ) )
			),
			left: (

				// The absolute mouse position
				pageX -

				// Click offset (relative to the element)
				this.offset.click.left -

				// Only for relative positioned nodes: Relative offset from element to offset parent
				this.offset.relative.left -

				// The offsetParent's offset without borders (offset + border)
				this.offset.parent.left +
				( this.cssPosition === "fixed" ?
					-this.offset.scroll.left :
					( scrollIsRootNode ? 0 : this.offset.scroll.left ) )
			)
		};

	},

	_clear: function() {
		this._removeClass( this.helper, "ui-draggable-dragging" );
		if ( this.helper[ 0 ] !== this.element[ 0 ] && !this.cancelHelperRemoval ) {
			this.helper.remove();
		}
		this.helper = null;
		this.cancelHelperRemoval = false;
		if ( this.destroyOnClear ) {
			this.destroy();
		}
	},

	// From now on bulk stuff - mainly helpers

	_trigger: function( type, event, ui ) {
		ui = ui || this._uiHash();
		$.ui.plugin.call( this, type, [ event, ui, this ], true );

		// Absolute position and offset (see #6884 ) have to be recalculated after plugins
		if ( /^(drag|start|stop)/.test( type ) ) {
			this.positionAbs = this._convertPositionTo( "absolute" );
			ui.offset = this.positionAbs;
		}
		return $.Widget.prototype._trigger.call( this, type, event, ui );
	},

	plugins: {},

	_uiHash: function() {
		return {
			helper: this.helper,
			position: this.position,
			originalPosition: this.originalPosition,
			offset: this.positionAbs
		};
	}

} );

$.ui.plugin.add( "draggable", "connectToSortable", {
	start: function( event, ui, draggable ) {
		var uiSortable = $.extend( {}, ui, {
			item: draggable.element
		} );

		draggable.sortables = [];
		$( draggable.options.connectToSortable ).each( function() {
			var sortable = $( this ).sortable( "instance" );

			if ( sortable && !sortable.options.disabled ) {
				draggable.sortables.push( sortable );

				// RefreshPositions is called at drag start to refresh the containerCache
				// which is used in drag. This ensures it's initialized and synchronized
				// with any changes that might have happened on the page since initialization.
				sortable.refreshPositions();
				sortable._trigger( "activate", event, uiSortable );
			}
		} );
	},
	stop: function( event, ui, draggable ) {
		var uiSortable = $.extend( {}, ui, {
			item: draggable.element
		} );

		draggable.cancelHelperRemoval = false;

		$.each( draggable.sortables, function() {
			var sortable = this;

			if ( sortable.isOver ) {
				sortable.isOver = 0;

				// Allow this sortable to handle removing the helper
				draggable.cancelHelperRemoval = true;
				sortable.cancelHelperRemoval = false;

				// Use _storedCSS To restore properties in the sortable,
				// as this also handles revert (#9675) since the draggable
				// may have modified them in unexpected ways (#8809)
				sortable._storedCSS = {
					position: sortable.placeholder.css( "position" ),
					top: sortable.placeholder.css( "top" ),
					left: sortable.placeholder.css( "left" )
				};

				sortable._mouseStop( event );

				// Once drag has ended, the sortable should return to using
				// its original helper, not the shared helper from draggable
				sortable.options.helper = sortable.options._helper;
			} else {

				// Prevent this Sortable from removing the helper.
				// However, don't set the draggable to remove the helper
				// either as another connected Sortable may yet handle the removal.
				sortable.cancelHelperRemoval = true;

				sortable._trigger( "deactivate", event, uiSortable );
			}
		} );
	},
	drag: function( event, ui, draggable ) {
		$.each( draggable.sortables, function() {
			var innermostIntersecting = false,
				sortable = this;

			// Copy over variables that sortable's _intersectsWith uses
			sortable.positionAbs = draggable.positionAbs;
			sortable.helperProportions = draggable.helperProportions;
			sortable.offset.click = draggable.offset.click;

			if ( sortable._intersectsWith( sortable.containerCache ) ) {
				innermostIntersecting = true;

				$.each( draggable.sortables, function() {

					// Copy over variables that sortable's _intersectsWith uses
					this.positionAbs = draggable.positionAbs;
					this.helperProportions = draggable.helperProportions;
					this.offset.click = draggable.offset.click;

					if ( this !== sortable &&
							this._intersectsWith( this.containerCache ) &&
							$.contains( sortable.element[ 0 ], this.element[ 0 ] ) ) {
						innermostIntersecting = false;
					}

					return innermostIntersecting;
				} );
			}

			if ( innermostIntersecting ) {

				// If it intersects, we use a little isOver variable and set it once,
				// so that the move-in stuff gets fired only once.
				if ( !sortable.isOver ) {
					sortable.isOver = 1;

					// Store draggable's parent in case we need to reappend to it later.
					draggable._parent = ui.helper.parent();

					sortable.currentItem = ui.helper
						.appendTo( sortable.element )
						.data( "ui-sortable-item", true );

					// Store helper option to later restore it
					sortable.options._helper = sortable.options.helper;

					sortable.options.helper = function() {
						return ui.helper[ 0 ];
					};

					// Fire the start events of the sortable with our passed browser event,
					// and our own helper (so it doesn't create a new one)
					event.target = sortable.currentItem[ 0 ];
					sortable._mouseCapture( event, true );
					sortable._mouseStart( event, true, true );

					// Because the browser event is way off the new appended portlet,
					// modify necessary variables to reflect the changes
					sortable.offset.click.top = draggable.offset.click.top;
					sortable.offset.click.left = draggable.offset.click.left;
					sortable.offset.parent.left -= draggable.offset.parent.left -
						sortable.offset.parent.left;
					sortable.offset.parent.top -= draggable.offset.parent.top -
						sortable.offset.parent.top;

					draggable._trigger( "toSortable", event );

					// Inform draggable that the helper is in a valid drop zone,
					// used solely in the revert option to handle "valid/invalid".
					draggable.dropped = sortable.element;

					// Need to refreshPositions of all sortables in the case that
					// adding to one sortable changes the location of the other sortables (#9675)
					$.each( draggable.sortables, function() {
						this.refreshPositions();
					} );

					// Hack so receive/update callbacks work (mostly)
					draggable.currentItem = draggable.element;
					sortable.fromOutside = draggable;
				}

				if ( sortable.currentItem ) {
					sortable._mouseDrag( event );

					// Copy the sortable's position because the draggable's can potentially reflect
					// a relative position, while sortable is always absolute, which the dragged
					// element has now become. (#8809)
					ui.position = sortable.position;
				}
			} else {

				// If it doesn't intersect with the sortable, and it intersected before,
				// we fake the drag stop of the sortable, but make sure it doesn't remove
				// the helper by using cancelHelperRemoval.
				if ( sortable.isOver ) {

					sortable.isOver = 0;
					sortable.cancelHelperRemoval = true;

					// Calling sortable's mouseStop would trigger a revert,
					// so revert must be temporarily false until after mouseStop is called.
					sortable.options._revert = sortable.options.revert;
					sortable.options.revert = false;

					sortable._trigger( "out", event, sortable._uiHash( sortable ) );
					sortable._mouseStop( event, true );

					// Restore sortable behaviors that were modfied
					// when the draggable entered the sortable area (#9481)
					sortable.options.revert = sortable.options._revert;
					sortable.options.helper = sortable.options._helper;

					if ( sortable.placeholder ) {
						sortable.placeholder.remove();
					}

					// Restore and recalculate the draggable's offset considering the sortable
					// may have modified them in unexpected ways. (#8809, #10669)
					ui.helper.appendTo( draggable._parent );
					draggable._refreshOffsets( event );
					ui.position = draggable._generatePosition( event, true );

					draggable._trigger( "fromSortable", event );

					// Inform draggable that the helper is no longer in a valid drop zone
					draggable.dropped = false;

					// Need to refreshPositions of all sortables just in case removing
					// from one sortable changes the location of other sortables (#9675)
					$.each( draggable.sortables, function() {
						this.refreshPositions();
					} );
				}
			}
		} );
	}
} );

$.ui.plugin.add( "draggable", "cursor", {
	start: function( event, ui, instance ) {
		var t = $( "body" ),
			o = instance.options;

		if ( t.css( "cursor" ) ) {
			o._cursor = t.css( "cursor" );
		}
		t.css( "cursor", o.cursor );
	},
	stop: function( event, ui, instance ) {
		var o = instance.options;
		if ( o._cursor ) {
			$( "body" ).css( "cursor", o._cursor );
		}
	}
} );

$.ui.plugin.add( "draggable", "opacity", {
	start: function( event, ui, instance ) {
		var t = $( ui.helper ),
			o = instance.options;
		if ( t.css( "opacity" ) ) {
			o._opacity = t.css( "opacity" );
		}
		t.css( "opacity", o.opacity );
	},
	stop: function( event, ui, instance ) {
		var o = instance.options;
		if ( o._opacity ) {
			$( ui.helper ).css( "opacity", o._opacity );
		}
	}
} );

$.ui.plugin.add( "draggable", "scroll", {
	start: function( event, ui, i ) {
		if ( !i.scrollParentNotHidden ) {
			i.scrollParentNotHidden = i.helper.scrollParent( false );
		}

		if ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] &&
				i.scrollParentNotHidden[ 0 ].tagName !== "HTML" ) {
			i.overflowOffset = i.scrollParentNotHidden.offset();
		}
	},
	drag: function( event, ui, i  ) {

		var o = i.options,
			scrolled = false,
			scrollParent = i.scrollParentNotHidden[ 0 ],
			document = i.document[ 0 ];

		if ( scrollParent !== document && scrollParent.tagName !== "HTML" ) {
			if ( !o.axis || o.axis !== "x" ) {
				if ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY <
						o.scrollSensitivity ) {
					scrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed;
				} else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) {
					scrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed;
				}
			}

			if ( !o.axis || o.axis !== "y" ) {
				if ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX <
						o.scrollSensitivity ) {
					scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed;
				} else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) {
					scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed;
				}
			}

		} else {

			if ( !o.axis || o.axis !== "x" ) {
				if ( event.pageY - $( document ).scrollTop() < o.scrollSensitivity ) {
					scrolled = $( document ).scrollTop( $( document ).scrollTop() - o.scrollSpeed );
				} else if ( $( window ).height() - ( event.pageY - $( document ).scrollTop() ) <
						o.scrollSensitivity ) {
					scrolled = $( document ).scrollTop( $( document ).scrollTop() + o.scrollSpeed );
				}
			}

			if ( !o.axis || o.axis !== "y" ) {
				if ( event.pageX - $( document ).scrollLeft() < o.scrollSensitivity ) {
					scrolled = $( document ).scrollLeft(
						$( document ).scrollLeft() - o.scrollSpeed
					);
				} else if ( $( window ).width() - ( event.pageX - $( document ).scrollLeft() ) <
						o.scrollSensitivity ) {
					scrolled = $( document ).scrollLeft(
						$( document ).scrollLeft() + o.scrollSpeed
					);
				}
			}

		}

		if ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) {
			$.ui.ddmanager.prepareOffsets( i, event );
		}

	}
} );

$.ui.plugin.add( "draggable", "snap", {
	start: function( event, ui, i ) {

		var o = i.options;

		i.snapElements = [];

		$( o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap )
			.each( function() {
				var $t = $( this ),
					$o = $t.offset();
				if ( this !== i.element[ 0 ] ) {
					i.snapElements.push( {
						item: this,
						width: $t.outerWidth(), height: $t.outerHeight(),
						top: $o.top, left: $o.left
					} );
				}
			} );

	},
	drag: function( event, ui, inst ) {

		var ts, bs, ls, rs, l, r, t, b, i, first,
			o = inst.options,
			d = o.snapTolerance,
			x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
			y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;

		for ( i = inst.snapElements.length - 1; i >= 0; i-- ) {

			l = inst.snapElements[ i ].left - inst.margins.left;
			r = l + inst.snapElements[ i ].width;
			t = inst.snapElements[ i ].top - inst.margins.top;
			b = t + inst.snapElements[ i ].height;

			if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d ||
					!$.contains( inst.snapElements[ i ].item.ownerDocument,
					inst.snapElements[ i ].item ) ) {
				if ( inst.snapElements[ i ].snapping ) {
					if ( inst.options.snap.release ) {
						inst.options.snap.release.call(
							inst.element,
							event,
							$.extend( inst._uiHash(), { snapItem: inst.snapElements[ i ].item } )
						);
					}
				}
				inst.snapElements[ i ].snapping = false;
				continue;
			}

			if ( o.snapMode !== "inner" ) {
				ts = Math.abs( t - y2 ) <= d;
				bs = Math.abs( b - y1 ) <= d;
				ls = Math.abs( l - x2 ) <= d;
				rs = Math.abs( r - x1 ) <= d;
				if ( ts ) {
					ui.position.top = inst._convertPositionTo( "relative", {
						top: t - inst.helperProportions.height,
						left: 0
					} ).top;
				}
				if ( bs ) {
					ui.position.top = inst._convertPositionTo( "relative", {
						top: b,
						left: 0
					} ).top;
				}
				if ( ls ) {
					ui.position.left = inst._convertPositionTo( "relative", {
						top: 0,
						left: l - inst.helperProportions.width
					} ).left;
				}
				if ( rs ) {
					ui.position.left = inst._convertPositionTo( "relative", {
						top: 0,
						left: r
					} ).left;
				}
			}

			first = ( ts || bs || ls || rs );

			if ( o.snapMode !== "outer" ) {
				ts = Math.abs( t - y1 ) <= d;
				bs = Math.abs( b - y2 ) <= d;
				ls = Math.abs( l - x1 ) <= d;
				rs = Math.abs( r - x2 ) <= d;
				if ( ts ) {
					ui.position.top = inst._convertPositionTo( "relative", {
						top: t,
						left: 0
					} ).top;
				}
				if ( bs ) {
					ui.position.top = inst._convertPositionTo( "relative", {
						top: b - inst.helperProportions.height,
						left: 0
					} ).top;
				}
				if ( ls ) {
					ui.position.left = inst._convertPositionTo( "relative", {
						top: 0,
						left: l
					} ).left;
				}
				if ( rs ) {
					ui.position.left = inst._convertPositionTo( "relative", {
						top: 0,
						left: r - inst.helperProportions.width
					} ).left;
				}
			}

			if ( !inst.snapElements[ i ].snapping && ( ts || bs || ls || rs || first ) ) {
				if ( inst.options.snap.snap ) {
					inst.options.snap.snap.call(
						inst.element,
						event,
						$.extend( inst._uiHash(), {
							snapItem: inst.snapElements[ i ].item
						} ) );
				}
			}
			inst.snapElements[ i ].snapping = ( ts || bs || ls || rs || first );

		}

	}
} );

$.ui.plugin.add( "draggable", "stack", {
	start: function( event, ui, instance ) {
		var min,
			o = instance.options,
			group = $.makeArray( $( o.stack ) ).sort( function( a, b ) {
				return ( parseInt( $( a ).css( "zIndex" ), 10 ) || 0 ) -
					( parseInt( $( b ).css( "zIndex" ), 10 ) || 0 );
			} );

		if ( !group.length ) {
			return;
		}

		min = parseInt( $( group[ 0 ] ).css( "zIndex" ), 10 ) || 0;
		$( group ).each( function( i ) {
			$( this ).css( "zIndex", min + i );
		} );
		this.css( "zIndex", ( min + group.length ) );
	}
} );

$.ui.plugin.add( "draggable", "zIndex", {
	start: function( event, ui, instance ) {
		var t = $( ui.helper ),
			o = instance.options;

		if ( t.css( "zIndex" ) ) {
			o._zIndex = t.css( "zIndex" );
		}
		t.css( "zIndex", o.zIndex );
	},
	stop: function( event, ui, instance ) {
		var o = instance.options;

		if ( o._zIndex ) {
			$( ui.helper ).css( "zIndex", o._zIndex );
		}
	}
} );

return $.ui.draggable;

} );
                                                                                                                                                                                                                                                                                                      jquery/ui/draggable.min.js                                                                          0000644                 00000043764 15212564042 0011547 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Draggable 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./mouse","../data","../plugin","../safe-active-element","../safe-blur","../scroll-parent","../version","../widget"],t):t(jQuery)}(function(P){"use strict";return P.widget("ui.draggable",P.ui.mouse,{version:"1.13.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var e=this.options;return!(this.helper||e.disabled||0<P(t.target).closest(".ui-resizable-handle").length||(this.handle=this._getHandle(t),!this.handle)||(this._blurActiveElement(t),this._blockFrames(!0===e.iframeFix?"iframe":e.iframeFix),0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=P(this);return P("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var e=P.ui.safeActiveElement(this.document[0]);P(t.target).closest(e).length||P.ui.safeBlur(e)},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),P.ui.ddmanager&&(P.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===P(this).css("position")}).length,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),P.ui.ddmanager&&!e.dropBehaviour&&P.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),P.ui.ddmanager&&P.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(t,e){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!e){e=this._uiHash();if(!1===this._trigger("drag",t,e))return this._mouseUp(new P.Event("mouseup",t)),!1;this.position=e.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",P.ui.ddmanager&&P.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var e=this,s=!1;return P.ui.ddmanager&&!this.options.dropBehaviour&&(s=P.ui.ddmanager.drop(this,t)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||!0===this.options.revert||"function"==typeof this.options.revert&&this.options.revert.call(this.element,s)?P(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==e._trigger("stop",t)&&e._clear()}):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),P.ui.ddmanager&&P.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),P.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new P.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!P(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var e=this.options,s="function"==typeof e.helper,t=s?P(e.helper.apply(this.element[0],[t])):"clone"===e.helper?this.element.clone().removeAttr("id"):this.element;return t.parents("body").length||t.appendTo("parent"===e.appendTo?this.element[0].parentNode:e.appendTo),s&&t[0]===this.element[0]&&this._setPositionRelative(),t[0]===this.element[0]||/(fixed|absolute)/.test(t.css("position"))||t.css("position","absolute"),t},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),"left"in(t=Array.isArray(t)?{left:+t[0],top:+t[1]||0}:t)&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),e=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==e&&P.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),{top:(t=this._isRootNode(this.offsetParent[0])?{top:0,left:0}:t).top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){var t,e;return"relative"!==this.cssPosition?{top:0,left:0}:(t=this.element.position(),e=this._isRootNode(this.scrollParent[0]),{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())})},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e=this.options,s=this.document[0];this.relativeContainer=null,e.containment?"window"===e.containment?this.containment=[P(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,P(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,P(window).scrollLeft()+P(window).width()-this.helperProportions.width-this.margins.left,P(window).scrollTop()+(P(window).height()||s.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:"document"===e.containment?this.containment=[0,0,P(s).width()-this.helperProportions.width-this.margins.left,(P(s).height()||s.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:e.containment.constructor===Array?this.containment=e.containment:("parent"===e.containment&&(e.containment=this.helper[0].parentNode),(e=(s=P(e.containment))[0])&&(t=/(scroll|auto)/.test(s.css("overflow")),this.containment=[(parseInt(s.css("borderLeftWidth"),10)||0)+(parseInt(s.css("paddingLeft"),10)||0),(parseInt(s.css("borderTopWidth"),10)||0)+(parseInt(s.css("paddingTop"),10)||0),(t?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(s.css("borderRightWidth"),10)||0)-(parseInt(s.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(s.css("borderBottomWidth"),10)||0)-(parseInt(s.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=s)):this.containment=null},_convertPositionTo:function(t,e){e=e||this.position;var t="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*t+this.offset.parent.top*t-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*t,left:e.left+this.offset.relative.left*t+this.offset.parent.left*t-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*t}},_generatePosition:function(t,e){var s,i=this.options,o=this._isRootNode(this.scrollParent[0]),n=t.pageX,r=t.pageY;return o&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),{top:(r=e&&(this.containment&&(s=this.relativeContainer?(e=this.relativeContainer.offset(),[this.containment[0]+e.left,this.containment[1]+e.top,this.containment[2]+e.left,this.containment[3]+e.top]):this.containment,t.pageX-this.offset.click.left<s[0]&&(n=s[0]+this.offset.click.left),t.pageY-this.offset.click.top<s[1]&&(r=s[1]+this.offset.click.top),t.pageX-this.offset.click.left>s[2]&&(n=s[2]+this.offset.click.left),t.pageY-this.offset.click.top>s[3])&&(r=s[3]+this.offset.click.top),i.grid&&(e=i.grid[1]?this.originalPageY+Math.round((r-this.originalPageY)/i.grid[1])*i.grid[1]:this.originalPageY,r=!s||e-this.offset.click.top>=s[1]||e-this.offset.click.top>s[3]?e:e-this.offset.click.top>=s[1]?e-i.grid[1]:e+i.grid[1],t=i.grid[0]?this.originalPageX+Math.round((n-this.originalPageX)/i.grid[0])*i.grid[0]:this.originalPageX,n=!s||t-this.offset.click.left>=s[0]||t-this.offset.click.left>s[2]?t:t-this.offset.click.left>=s[0]?t-i.grid[0]:t+i.grid[0]),"y"===i.axis&&(n=this.originalPageX),"x"===i.axis)?this.originalPageY:r)-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:o?0:this.offset.scroll.top),left:n-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:o?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,e,s){return s=s||this._uiHash(),P.ui.plugin.call(this,t,[e,s,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),P.Widget.prototype._trigger.call(this,t,e,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),P.ui.plugin.add("draggable","connectToSortable",{start:function(e,t,s){var i=P.extend({},t,{item:s.element});s.sortables=[],P(s.options.connectToSortable).each(function(){var t=P(this).sortable("instance");t&&!t.options.disabled&&(s.sortables.push(t),t.refreshPositions(),t._trigger("activate",e,i))})},stop:function(e,t,s){var i=P.extend({},t,{item:s.element});s.cancelHelperRemoval=!1,P.each(s.sortables,function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,i))})},drag:function(s,i,o){P.each(o.sortables,function(){var t=!1,e=this;e.positionAbs=o.positionAbs,e.helperProportions=o.helperProportions,e.offset.click=o.offset.click,e._intersectsWith(e.containerCache)&&(t=!0,P.each(o.sortables,function(){return this.positionAbs=o.positionAbs,this.helperProportions=o.helperProportions,this.offset.click=o.offset.click,t=this!==e&&this._intersectsWith(this.containerCache)&&P.contains(e.element[0],this.element[0])?!1:t})),t?(e.isOver||(e.isOver=1,o._parent=i.helper.parent(),e.currentItem=i.helper.appendTo(e.element).data("ui-sortable-item",!0),e.options._helper=e.options.helper,e.options.helper=function(){return i.helper[0]},s.target=e.currentItem[0],e._mouseCapture(s,!0),e._mouseStart(s,!0,!0),e.offset.click.top=o.offset.click.top,e.offset.click.left=o.offset.click.left,e.offset.parent.left-=o.offset.parent.left-e.offset.parent.left,e.offset.parent.top-=o.offset.parent.top-e.offset.parent.top,o._trigger("toSortable",s),o.dropped=e.element,P.each(o.sortables,function(){this.refreshPositions()}),o.currentItem=o.element,e.fromOutside=o),e.currentItem&&(e._mouseDrag(s),i.position=e.position)):e.isOver&&(e.isOver=0,e.cancelHelperRemoval=!0,e.options._revert=e.options.revert,e.options.revert=!1,e._trigger("out",s,e._uiHash(e)),e._mouseStop(s,!0),e.options.revert=e.options._revert,e.options.helper=e.options._helper,e.placeholder&&e.placeholder.remove(),i.helper.appendTo(o._parent),o._refreshOffsets(s),i.position=o._generatePosition(s,!0),o._trigger("fromSortable",s),o.dropped=!1,P.each(o.sortables,function(){this.refreshPositions()}))})}}),P.ui.plugin.add("draggable","cursor",{start:function(t,e,s){var i=P("body"),s=s.options;i.css("cursor")&&(s._cursor=i.css("cursor")),i.css("cursor",s.cursor)},stop:function(t,e,s){s=s.options;s._cursor&&P("body").css("cursor",s._cursor)}}),P.ui.plugin.add("draggable","opacity",{start:function(t,e,s){e=P(e.helper),s=s.options;e.css("opacity")&&(s._opacity=e.css("opacity")),e.css("opacity",s.opacity)},stop:function(t,e,s){s=s.options;s._opacity&&P(e.helper).css("opacity",s._opacity)}}),P.ui.plugin.add("draggable","scroll",{start:function(t,e,s){s.scrollParentNotHidden||(s.scrollParentNotHidden=s.helper.scrollParent(!1)),s.scrollParentNotHidden[0]!==s.document[0]&&"HTML"!==s.scrollParentNotHidden[0].tagName&&(s.overflowOffset=s.scrollParentNotHidden.offset())},drag:function(t,e,s){var i=s.options,o=!1,n=s.scrollParentNotHidden[0],r=s.document[0];n!==r&&"HTML"!==n.tagName?(i.axis&&"x"===i.axis||(s.overflowOffset.top+n.offsetHeight-t.pageY<i.scrollSensitivity?n.scrollTop=o=n.scrollTop+i.scrollSpeed:t.pageY-s.overflowOffset.top<i.scrollSensitivity&&(n.scrollTop=o=n.scrollTop-i.scrollSpeed)),i.axis&&"y"===i.axis||(s.overflowOffset.left+n.offsetWidth-t.pageX<i.scrollSensitivity?n.scrollLeft=o=n.scrollLeft+i.scrollSpeed:t.pageX-s.overflowOffset.left<i.scrollSensitivity&&(n.scrollLeft=o=n.scrollLeft-i.scrollSpeed))):(i.axis&&"x"===i.axis||(t.pageY-P(r).scrollTop()<i.scrollSensitivity?o=P(r).scrollTop(P(r).scrollTop()-i.scrollSpeed):P(window).height()-(t.pageY-P(r).scrollTop())<i.scrollSensitivity&&(o=P(r).scrollTop(P(r).scrollTop()+i.scrollSpeed))),i.axis&&"y"===i.axis||(t.pageX-P(r).scrollLeft()<i.scrollSensitivity?o=P(r).scrollLeft(P(r).scrollLeft()-i.scrollSpeed):P(window).width()-(t.pageX-P(r).scrollLeft())<i.scrollSensitivity&&(o=P(r).scrollLeft(P(r).scrollLeft()+i.scrollSpeed)))),!1!==o&&P.ui.ddmanager&&!i.dropBehaviour&&P.ui.ddmanager.prepareOffsets(s,t)}}),P.ui.plugin.add("draggable","snap",{start:function(t,e,s){var i=s.options;s.snapElements=[],P(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var t=P(this),e=t.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:e.top,left:e.left})})},drag:function(t,e,s){for(var i,o,n,r,l,a,h,p,c,f=s.options,d=f.snapTolerance,g=e.offset.left,u=g+s.helperProportions.width,m=e.offset.top,v=m+s.helperProportions.height,_=s.snapElements.length-1;0<=_;_--)a=(l=s.snapElements[_].left-s.margins.left)+s.snapElements[_].width,p=(h=s.snapElements[_].top-s.margins.top)+s.snapElements[_].height,u<l-d||a+d<g||v<h-d||p+d<m||!P.contains(s.snapElements[_].item.ownerDocument,s.snapElements[_].item)?(s.snapElements[_].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,t,P.extend(s._uiHash(),{snapItem:s.snapElements[_].item})),s.snapElements[_].snapping=!1):("inner"!==f.snapMode&&(i=Math.abs(h-v)<=d,o=Math.abs(p-m)<=d,n=Math.abs(l-u)<=d,r=Math.abs(a-g)<=d,i&&(e.position.top=s._convertPositionTo("relative",{top:h-s.helperProportions.height,left:0}).top),o&&(e.position.top=s._convertPositionTo("relative",{top:p,left:0}).top),n&&(e.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left),r)&&(e.position.left=s._convertPositionTo("relative",{top:0,left:a}).left),c=i||o||n||r,"outer"!==f.snapMode&&(i=Math.abs(h-m)<=d,o=Math.abs(p-v)<=d,n=Math.abs(l-g)<=d,r=Math.abs(a-u)<=d,i&&(e.position.top=s._convertPositionTo("relative",{top:h,left:0}).top),o&&(e.position.top=s._convertPositionTo("relative",{top:p-s.helperProportions.height,left:0}).top),n&&(e.position.left=s._convertPositionTo("relative",{top:0,left:l}).left),r)&&(e.position.left=s._convertPositionTo("relative",{top:0,left:a-s.helperProportions.width}).left),!s.snapElements[_].snapping&&(i||o||n||r||c)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,t,P.extend(s._uiHash(),{snapItem:s.snapElements[_].item})),s.snapElements[_].snapping=i||o||n||r||c)}}),P.ui.plugin.add("draggable","stack",{start:function(t,e,s){var i,s=s.options,s=P.makeArray(P(s.stack)).sort(function(t,e){return(parseInt(P(t).css("zIndex"),10)||0)-(parseInt(P(e).css("zIndex"),10)||0)});s.length&&(i=parseInt(P(s[0]).css("zIndex"),10)||0,P(s).each(function(t){P(this).css("zIndex",i+t)}),this.css("zIndex",i+s.length))}}),P.ui.plugin.add("draggable","zIndex",{start:function(t,e,s){e=P(e.helper),s=s.options;e.css("zIndex")&&(s._zIndex=e.css("zIndex")),e.css("zIndex",s.zIndex)},stop:function(t,e,s){s=s.options;s._zIndex&&P(e.helper).css("zIndex",s._zIndex)}}),P.ui.draggable});            jquery/ui/droppable.js                                                                              0000644                 00000031143 15212564042 0011011 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Droppable 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Droppable
//>>group: Interactions
//>>description: Enables drop targets for draggable elements.
//>>docs: https://api.jqueryui.com/droppable/
//>>demos: https://jqueryui.com/droppable/

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"./draggable",
			"./mouse",
			"../version",
			"../widget"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

$.widget( "ui.droppable", {
	version: "1.13.3",
	widgetEventPrefix: "drop",
	options: {
		accept: "*",
		addClasses: true,
		greedy: false,
		scope: "default",
		tolerance: "intersect",

		// Callbacks
		activate: null,
		deactivate: null,
		drop: null,
		out: null,
		over: null
	},
	_create: function() {

		var proportions,
			o = this.options,
			accept = o.accept;

		this.isover = false;
		this.isout = true;

		this.accept = typeof accept === "function" ? accept : function( d ) {
			return d.is( accept );
		};

		this.proportions = function( /* valueToWrite */ ) {
			if ( arguments.length ) {

				// Store the droppable's proportions
				proportions = arguments[ 0 ];
			} else {

				// Retrieve or derive the droppable's proportions
				return proportions ?
					proportions :
					proportions = {
						width: this.element[ 0 ].offsetWidth,
						height: this.element[ 0 ].offsetHeight
					};
			}
		};

		this._addToManager( o.scope );

		if ( o.addClasses ) {
			this._addClass( "ui-droppable" );
		}

	},

	_addToManager: function( scope ) {

		// Add the reference and positions to the manager
		$.ui.ddmanager.droppables[ scope ] = $.ui.ddmanager.droppables[ scope ] || [];
		$.ui.ddmanager.droppables[ scope ].push( this );
	},

	_splice: function( drop ) {
		var i = 0;
		for ( ; i < drop.length; i++ ) {
			if ( drop[ i ] === this ) {
				drop.splice( i, 1 );
			}
		}
	},

	_destroy: function() {
		var drop = $.ui.ddmanager.droppables[ this.options.scope ];

		this._splice( drop );
	},

	_setOption: function( key, value ) {

		if ( key === "accept" ) {
			this.accept = typeof value === "function" ? value : function( d ) {
				return d.is( value );
			};
		} else if ( key === "scope" ) {
			var drop = $.ui.ddmanager.droppables[ this.options.scope ];

			this._splice( drop );
			this._addToManager( value );
		}

		this._super( key, value );
	},

	_activate: function( event ) {
		var draggable = $.ui.ddmanager.current;

		this._addActiveClass();
		if ( draggable ) {
			this._trigger( "activate", event, this.ui( draggable ) );
		}
	},

	_deactivate: function( event ) {
		var draggable = $.ui.ddmanager.current;

		this._removeActiveClass();
		if ( draggable ) {
			this._trigger( "deactivate", event, this.ui( draggable ) );
		}
	},

	_over: function( event ) {

		var draggable = $.ui.ddmanager.current;

		// Bail if draggable and droppable are same element
		if ( !draggable || ( draggable.currentItem ||
				draggable.element )[ 0 ] === this.element[ 0 ] ) {
			return;
		}

		if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem ||
				draggable.element ) ) ) {
			this._addHoverClass();
			this._trigger( "over", event, this.ui( draggable ) );
		}

	},

	_out: function( event ) {

		var draggable = $.ui.ddmanager.current;

		// Bail if draggable and droppable are same element
		if ( !draggable || ( draggable.currentItem ||
				draggable.element )[ 0 ] === this.element[ 0 ] ) {
			return;
		}

		if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem ||
				draggable.element ) ) ) {
			this._removeHoverClass();
			this._trigger( "out", event, this.ui( draggable ) );
		}

	},

	_drop: function( event, custom ) {

		var draggable = custom || $.ui.ddmanager.current,
			childrenIntersection = false;

		// Bail if draggable and droppable are same element
		if ( !draggable || ( draggable.currentItem ||
				draggable.element )[ 0 ] === this.element[ 0 ] ) {
			return false;
		}

		this.element
			.find( ":data(ui-droppable)" )
			.not( ".ui-draggable-dragging" )
			.each( function() {
				var inst = $( this ).droppable( "instance" );
				if (
					inst.options.greedy &&
					!inst.options.disabled &&
					inst.options.scope === draggable.options.scope &&
					inst.accept.call(
						inst.element[ 0 ], ( draggable.currentItem || draggable.element )
					) &&
					$.ui.intersect(
						draggable,
						$.extend( inst, { offset: inst.element.offset() } ),
						inst.options.tolerance, event
					)
				) {
					childrenIntersection = true;
					return false;
				}
			} );
		if ( childrenIntersection ) {
			return false;
		}

		if ( this.accept.call( this.element[ 0 ],
				( draggable.currentItem || draggable.element ) ) ) {
			this._removeActiveClass();
			this._removeHoverClass();

			this._trigger( "drop", event, this.ui( draggable ) );
			return this.element;
		}

		return false;

	},

	ui: function( c ) {
		return {
			draggable: ( c.currentItem || c.element ),
			helper: c.helper,
			position: c.position,
			offset: c.positionAbs
		};
	},

	// Extension points just to make backcompat sane and avoid duplicating logic
	// TODO: Remove in 1.14 along with call to it below
	_addHoverClass: function() {
		this._addClass( "ui-droppable-hover" );
	},

	_removeHoverClass: function() {
		this._removeClass( "ui-droppable-hover" );
	},

	_addActiveClass: function() {
		this._addClass( "ui-droppable-active" );
	},

	_removeActiveClass: function() {
		this._removeClass( "ui-droppable-active" );
	}
} );

$.ui.intersect = ( function() {
	function isOverAxis( x, reference, size ) {
		return ( x >= reference ) && ( x < ( reference + size ) );
	}

	return function( draggable, droppable, toleranceMode, event ) {

		if ( !droppable.offset ) {
			return false;
		}

		var x1 = ( draggable.positionAbs ||
				draggable.position.absolute ).left + draggable.margins.left,
			y1 = ( draggable.positionAbs ||
				draggable.position.absolute ).top + draggable.margins.top,
			x2 = x1 + draggable.helperProportions.width,
			y2 = y1 + draggable.helperProportions.height,
			l = droppable.offset.left,
			t = droppable.offset.top,
			r = l + droppable.proportions().width,
			b = t + droppable.proportions().height;

		switch ( toleranceMode ) {
		case "fit":
			return ( l <= x1 && x2 <= r && t <= y1 && y2 <= b );
		case "intersect":
			return ( l < x1 + ( draggable.helperProportions.width / 2 ) && // Right Half
				x2 - ( draggable.helperProportions.width / 2 ) < r && // Left Half
				t < y1 + ( draggable.helperProportions.height / 2 ) && // Bottom Half
				y2 - ( draggable.helperProportions.height / 2 ) < b ); // Top Half
		case "pointer":
			return isOverAxis( event.pageY, t, droppable.proportions().height ) &&
				isOverAxis( event.pageX, l, droppable.proportions().width );
		case "touch":
			return (
				( y1 >= t && y1 <= b ) || // Top edge touching
				( y2 >= t && y2 <= b ) || // Bottom edge touching
				( y1 < t && y2 > b ) // Surrounded vertically
			) && (
				( x1 >= l && x1 <= r ) || // Left edge touching
				( x2 >= l && x2 <= r ) || // Right edge touching
				( x1 < l && x2 > r ) // Surrounded horizontally
			);
		default:
			return false;
		}
	};
} )();

/*
	This manager tracks offsets of draggables and droppables
*/
$.ui.ddmanager = {
	current: null,
	droppables: { "default": [] },
	prepareOffsets: function( t, event ) {

		var i, j,
			m = $.ui.ddmanager.droppables[ t.options.scope ] || [],
			type = event ? event.type : null, // workaround for #2317
			list = ( t.currentItem || t.element ).find( ":data(ui-droppable)" ).addBack();

		droppablesLoop: for ( i = 0; i < m.length; i++ ) {

			// No disabled and non-accepted
			if ( m[ i ].options.disabled || ( t && !m[ i ].accept.call( m[ i ].element[ 0 ],
					( t.currentItem || t.element ) ) ) ) {
				continue;
			}

			// Filter out elements in the current dragged item
			for ( j = 0; j < list.length; j++ ) {
				if ( list[ j ] === m[ i ].element[ 0 ] ) {
					m[ i ].proportions().height = 0;
					continue droppablesLoop;
				}
			}

			m[ i ].visible = m[ i ].element.css( "display" ) !== "none";
			if ( !m[ i ].visible ) {
				continue;
			}

			// Activate the droppable if used directly from draggables
			if ( type === "mousedown" ) {
				m[ i ]._activate.call( m[ i ], event );
			}

			m[ i ].offset = m[ i ].element.offset();
			m[ i ].proportions( {
				width: m[ i ].element[ 0 ].offsetWidth,
				height: m[ i ].element[ 0 ].offsetHeight
			} );

		}

	},
	drop: function( draggable, event ) {

		var dropped = false;

		// Create a copy of the droppables in case the list changes during the drop (#9116)
		$.each( ( $.ui.ddmanager.droppables[ draggable.options.scope ] || [] ).slice(), function() {

			if ( !this.options ) {
				return;
			}
			if ( !this.options.disabled && this.visible &&
					$.ui.intersect( draggable, this, this.options.tolerance, event ) ) {
				dropped = this._drop.call( this, event ) || dropped;
			}

			if ( !this.options.disabled && this.visible && this.accept.call( this.element[ 0 ],
					( draggable.currentItem || draggable.element ) ) ) {
				this.isout = true;
				this.isover = false;
				this._deactivate.call( this, event );
			}

		} );
		return dropped;

	},
	dragStart: function( draggable, event ) {

		// Listen for scrolling so that if the dragging causes scrolling the position of the
		// droppables can be recalculated (see #5003)
		draggable.element.parentsUntil( "body" ).on( "scroll.droppable", function() {
			if ( !draggable.options.refreshPositions ) {
				$.ui.ddmanager.prepareOffsets( draggable, event );
			}
		} );
	},
	drag: function( draggable, event ) {

		// If you have a highly dynamic page, you might try this option. It renders positions
		// every time you move the mouse.
		if ( draggable.options.refreshPositions ) {
			$.ui.ddmanager.prepareOffsets( draggable, event );
		}

		// Run through all droppables and check their positions based on specific tolerance options
		$.each( $.ui.ddmanager.droppables[ draggable.options.scope ] || [], function() {

			if ( this.options.disabled || this.greedyChild || !this.visible ) {
				return;
			}

			var parentInstance, scope, parent,
				intersects = $.ui.intersect( draggable, this, this.options.tolerance, event ),
				c = !intersects && this.isover ?
					"isout" :
					( intersects && !this.isover ? "isover" : null );
			if ( !c ) {
				return;
			}

			if ( this.options.greedy ) {

				// find droppable parents with same scope
				scope = this.options.scope;
				parent = this.element.parents( ":data(ui-droppable)" ).filter( function() {
					return $( this ).droppable( "instance" ).options.scope === scope;
				} );

				if ( parent.length ) {
					parentInstance = $( parent[ 0 ] ).droppable( "instance" );
					parentInstance.greedyChild = ( c === "isover" );
				}
			}

			// We just moved into a greedy child
			if ( parentInstance && c === "isover" ) {
				parentInstance.isover = false;
				parentInstance.isout = true;
				parentInstance._out.call( parentInstance, event );
			}

			this[ c ] = true;
			this[ c === "isout" ? "isover" : "isout" ] = false;
			this[ c === "isover" ? "_over" : "_out" ].call( this, event );

			// We just moved out of a greedy child
			if ( parentInstance && c === "isout" ) {
				parentInstance.isout = false;
				parentInstance.isover = true;
				parentInstance._over.call( parentInstance, event );
			}
		} );

	},
	dragStop: function( draggable, event ) {
		draggable.element.parentsUntil( "body" ).off( "scroll.droppable" );

		// Call prepareOffsets one final time since IE does not fire return scroll events when
		// overflow was caused by drag (see #5003)
		if ( !draggable.options.refreshPositions ) {
			$.ui.ddmanager.prepareOffsets( draggable, event );
		}
	}
};

// DEPRECATED
// TODO: switch return back to widget declaration at top of file when this is removed
if ( $.uiBackCompat !== false ) {

	// Backcompat for activeClass and hoverClass options
	$.widget( "ui.droppable", $.ui.droppable, {
		options: {
			hoverClass: false,
			activeClass: false
		},
		_addActiveClass: function() {
			this._super();
			if ( this.options.activeClass ) {
				this.element.addClass( this.options.activeClass );
			}
		},
		_removeActiveClass: function() {
			this._super();
			if ( this.options.activeClass ) {
				this.element.removeClass( this.options.activeClass );
			}
		},
		_addHoverClass: function() {
			this._super();
			if ( this.options.hoverClass ) {
				this.element.addClass( this.options.hoverClass );
			}
		},
		_removeHoverClass: function() {
			this._super();
			if ( this.options.hoverClass ) {
				this.element.removeClass( this.options.hoverClass );
			}
		}
	} );
}

return $.ui.droppable;

} );
                                                                                                                                                                                                                                                                                                                                                                                                                             jquery/ui/droppable.min.js                                                                          0000644                 00000015011 15212564042 0011567 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Droppable 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./draggable","./mouse","../version","../widget"],e):e(jQuery)}(function(a){"use strict";function h(e,t,i){return t<=e&&e<t+i}return a.widget("ui.droppable",{version:"1.13.3",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,t=this.options,i=t.accept;this.isover=!1,this.isout=!0,this.accept="function"==typeof i?i:function(e){return e.is(i)},this.proportions=function(){if(!arguments.length)return e=e||{width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};e=arguments[0]},this._addToManager(t.scope),t.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){a.ui.ddmanager.droppables[e]=a.ui.ddmanager.droppables[e]||[],a.ui.ddmanager.droppables[e].push(this)},_splice:function(e){for(var t=0;t<e.length;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var e=a.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,t){var i;"accept"===e?this.accept="function"==typeof t?t:function(e){return e.is(t)}:"scope"===e&&(i=a.ui.ddmanager.droppables[this.options.scope],this._splice(i),this._addToManager(t)),this._super(e,t)},_activate:function(e){var t=a.ui.ddmanager.current;this._addActiveClass(),t&&this._trigger("activate",e,this.ui(t))},_deactivate:function(e){var t=a.ui.ddmanager.current;this._removeActiveClass(),t&&this._trigger("deactivate",e,this.ui(t))},_over:function(e){var t=a.ui.ddmanager.current;t&&(t.currentItem||t.element)[0]!==this.element[0]&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(t)))},_out:function(e){var t=a.ui.ddmanager.current;t&&(t.currentItem||t.element)[0]!==this.element[0]&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(t)))},_drop:function(t,e){var i=e||a.ui.ddmanager.current,s=!1;return!(!i||(i.currentItem||i.element)[0]===this.element[0]||(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=a(this).droppable("instance");if(e.options.greedy&&!e.options.disabled&&e.options.scope===i.options.scope&&e.accept.call(e.element[0],i.currentItem||i.element)&&a.ui.intersect(i,a.extend(e,{offset:e.element.offset()}),e.options.tolerance,t))return!(s=!0)}),s)||!this.accept.call(this.element[0],i.currentItem||i.element))&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",t,this.ui(i)),this.element)},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}}),a.ui.intersect=function(e,t,i,s){if(!t.offset)return!1;var o=(e.positionAbs||e.position.absolute).left+e.margins.left,r=(e.positionAbs||e.position.absolute).top+e.margins.top,n=o+e.helperProportions.width,a=r+e.helperProportions.height,l=t.offset.left,p=t.offset.top,c=l+t.proportions().width,d=p+t.proportions().height;switch(i){case"fit":return l<=o&&n<=c&&p<=r&&a<=d;case"intersect":return l<o+e.helperProportions.width/2&&n-e.helperProportions.width/2<c&&p<r+e.helperProportions.height/2&&a-e.helperProportions.height/2<d;case"pointer":return h(s.pageY,p,t.proportions().height)&&h(s.pageX,l,t.proportions().width);case"touch":return(p<=r&&r<=d||p<=a&&a<=d||r<p&&d<a)&&(l<=o&&o<=c||l<=n&&n<=c||o<l&&c<n);default:return!1}},!(a.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(e,t){var i,s,o=a.ui.ddmanager.droppables[e.options.scope]||[],r=t?t.type:null,n=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();e:for(i=0;i<o.length;i++)if(!(o[i].options.disabled||e&&!o[i].accept.call(o[i].element[0],e.currentItem||e.element))){for(s=0;s<n.length;s++)if(n[s]===o[i].element[0]){o[i].proportions().height=0;continue e}o[i].visible="none"!==o[i].element.css("display"),o[i].visible&&("mousedown"===r&&o[i]._activate.call(o[i],t),o[i].offset=o[i].element.offset(),o[i].proportions({width:o[i].element[0].offsetWidth,height:o[i].element[0].offsetHeight}))}},drop:function(e,t){var i=!1;return a.each((a.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&a.ui.intersect(e,this,this.options.tolerance,t)&&(i=this._drop.call(this,t)||i),!this.options.disabled)&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,t))}),i},dragStart:function(e,t){e.element.parentsUntil("body").on("scroll.droppable",function(){e.options.refreshPositions||a.ui.ddmanager.prepareOffsets(e,t)})},drag:function(o,r){o.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(o,r),a.each(a.ui.ddmanager.droppables[o.options.scope]||[],function(){var e,t,i,s;this.options.disabled||this.greedyChild||!this.visible||(s=!(s=a.ui.intersect(o,this,this.options.tolerance,r))&&this.isover?"isout":s&&!this.isover?"isover":null)&&(this.options.greedy&&(t=this.options.scope,(i=this.element.parents(":data(ui-droppable)").filter(function(){return a(this).droppable("instance").options.scope===t})).length)&&((e=a(i[0]).droppable("instance")).greedyChild="isover"===s),e&&"isover"===s&&(e.isover=!1,e.isout=!0,e._out.call(e,r)),this[s]=!0,this["isout"===s?"isover":"isout"]=!1,this["isover"===s?"_over":"_out"].call(this,r),e)&&"isout"===s&&(e.isout=!1,e.isover=!0,e._over.call(e,r))})},dragStop:function(e,t){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||a.ui.ddmanager.prepareOffsets(e,t)}})!==a.uiBackCompat&&a.widget("ui.droppable",a.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),a.ui.droppable});                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       jquery/ui/effect-blind.js                                                                           0000644                 00000003154 15212564042 0011364 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Blind 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Blind Effect
//>>group: Effects
//>>description: Blinds the element.
//>>docs: https://api.jqueryui.com/blind-effect/
//>>demos: https://jqueryui.com/effect/

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../version",
			"../effect"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.effects.define( "blind", "hide", function( options, done ) {
	var map = {
			up: [ "bottom", "top" ],
			vertical: [ "bottom", "top" ],
			down: [ "top", "bottom" ],
			left: [ "right", "left" ],
			horizontal: [ "right", "left" ],
			right: [ "left", "right" ]
		},
		element = $( this ),
		direction = options.direction || "up",
		start = element.cssClip(),
		animate = { clip: $.extend( {}, start ) },
		placeholder = $.effects.createPlaceholder( element );

	animate.clip[ map[ direction ][ 0 ] ] = animate.clip[ map[ direction ][ 1 ] ];

	if ( options.mode === "show" ) {
		element.cssClip( animate.clip );
		if ( placeholder ) {
			placeholder.css( $.effects.clipToBox( animate ) );
		}

		animate.clip = start;
	}

	if ( placeholder ) {
		placeholder.animate( $.effects.clipToBox( animate ), options.duration, options.easing );
	}

	element.animate( animate, {
		queue: false,
		duration: options.duration,
		easing: options.easing,
		complete: done
	} );
} );

} );
                                                                                                                                                                                                                                                                                                                                                                                                                    jquery/ui/effect-blind.min.js                                                                       0000644                 00000001560 15212564042 0012145 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Blind 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(s){"use strict";return s.effects.define("blind","hide",function(e,t){var i={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},o=s(this),n=e.direction||"up",c=o.cssClip(),f={clip:s.extend({},c)},r=s.effects.createPlaceholder(o);f.clip[i[n][0]]=f.clip[i[n][1]],"show"===e.mode&&(o.cssClip(f.clip),r&&r.css(s.effects.clipToBox(f)),f.clip=c),r&&r.animate(s.effects.clipToBox(f),e.duration,e.easing),o.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:t})})});                                                                                                                                                jquery/ui/effect-bounce.js                                                                          0000644                 00000005144 15212564042 0011550 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Bounce 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Bounce Effect
//>>group: Effects
//>>description: Bounces an element horizontally or vertically n times.
//>>docs: https://api.jqueryui.com/bounce-effect/
//>>demos: https://jqueryui.com/effect/

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../version",
			"../effect"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.effects.define( "bounce", function( options, done ) {
	var upAnim, downAnim, refValue,
		element = $( this ),

		// Defaults:
		mode = options.mode,
		hide = mode === "hide",
		show = mode === "show",
		direction = options.direction || "up",
		distance = options.distance,
		times = options.times || 5,

		// Number of internal animations
		anims = times * 2 + ( show || hide ? 1 : 0 ),
		speed = options.duration / anims,
		easing = options.easing,

		// Utility:
		ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
		motion = ( direction === "up" || direction === "left" ),
		i = 0,

		queuelen = element.queue().length;

	$.effects.createPlaceholder( element );

	refValue = element.css( ref );

	// Default distance for the BIGGEST bounce is the outer Distance / 3
	if ( !distance ) {
		distance = element[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3;
	}

	if ( show ) {
		downAnim = { opacity: 1 };
		downAnim[ ref ] = refValue;

		// If we are showing, force opacity 0 and set the initial position
		// then do the "first" animation
		element
			.css( "opacity", 0 )
			.css( ref, motion ? -distance * 2 : distance * 2 )
			.animate( downAnim, speed, easing );
	}

	// Start at the smallest distance if we are hiding
	if ( hide ) {
		distance = distance / Math.pow( 2, times - 1 );
	}

	downAnim = {};
	downAnim[ ref ] = refValue;

	// Bounces up/down/left/right then back to 0 -- times * 2 animations happen here
	for ( ; i < times; i++ ) {
		upAnim = {};
		upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;

		element
			.animate( upAnim, speed, easing )
			.animate( downAnim, speed, easing );

		distance = hide ? distance * 2 : distance / 2;
	}

	// Last Bounce when Hiding
	if ( hide ) {
		upAnim = { opacity: 0 };
		upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;

		element.animate( upAnim, speed, easing );
	}

	element.queue( done );

	$.effects.unshift( element, queuelen, anims + 1 );
} );

} );
                                                                                                                                                                                                                                                                                                                                                                                                                            jquery/ui/effect-bounce.min.js                                                                      0000644                 00000001737 15212564042 0012336 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Bounce 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(l){"use strict";return l.effects.define("bounce",function(e,t){var i,n,o=l(this),c=e.mode,f="hide"===c,c="show"===c,u=e.direction||"up",s=e.distance,a=e.times||5,r=2*a+(c||f?1:0),d=e.duration/r,p=e.easing,h="up"===u||"down"===u?"top":"left",m="up"===u||"left"===u,y=0,e=o.queue().length;for(l.effects.createPlaceholder(o),u=o.css(h),s=s||o["top"==h?"outerHeight":"outerWidth"]()/3,c&&((n={opacity:1})[h]=u,o.css("opacity",0).css(h,m?2*-s:2*s).animate(n,d,p)),f&&(s/=Math.pow(2,a-1)),(n={})[h]=u;y<a;y++)(i={})[h]=(m?"-=":"+=")+s,o.animate(i,d,p).animate(n,d,p),s=f?2*s:s/2;f&&((i={opacity:0})[h]=(m?"-=":"+=")+s,o.animate(i,d,p)),o.queue(t),l.effects.unshift(o,e,1+r)})});                                 jquery/ui/effect-clip.js                                                                            0000644                 00000003051 15212564042 0011217 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Clip 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Clip Effect
//>>group: Effects
//>>description: Clips the element on and off like an old TV.
//>>docs: https://api.jqueryui.com/clip-effect/
//>>demos: https://jqueryui.com/effect/

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../version",
			"../effect"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.effects.define( "clip", "hide", function( options, done ) {
	var start,
		animate = {},
		element = $( this ),
		direction = options.direction || "vertical",
		both = direction === "both",
		horizontal = both || direction === "horizontal",
		vertical = both || direction === "vertical";

	start = element.cssClip();
	animate.clip = {
		top: vertical ? ( start.bottom - start.top ) / 2 : start.top,
		right: horizontal ? ( start.right - start.left ) / 2 : start.right,
		bottom: vertical ? ( start.bottom - start.top ) / 2 : start.bottom,
		left: horizontal ? ( start.right - start.left ) / 2 : start.left
	};

	$.effects.createPlaceholder( element );

	if ( options.mode === "show" ) {
		element.cssClip( animate.clip );
		animate.clip = start;
	}

	element.animate( animate, {
		queue: false,
		duration: options.duration,
		easing: options.easing,
		complete: done
	} );

} );

} );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       jquery/ui/effect-clip.min.js                                                                        0000644                 00000001434 15212564042 0012004 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Clip 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],t):t(jQuery)}(function(f){"use strict";return f.effects.define("clip","hide",function(t,e){var i={},o=f(this),c=t.direction||"vertical",n="both"===c,r=n||"horizontal"===c,n=n||"vertical"===c,c=o.cssClip();i.clip={top:n?(c.bottom-c.top)/2:c.top,right:r?(c.right-c.left)/2:c.right,bottom:n?(c.bottom-c.top)/2:c.bottom,left:r?(c.right-c.left)/2:c.left},f.effects.createPlaceholder(o),"show"===t.mode&&(o.cssClip(i.clip),i.clip=c),o.animate(i,{queue:!1,duration:t.duration,easing:t.easing,complete:e})})});                                                                                                                                                                                                                                    jquery/ui/effect-drop.js                                                                            0000644                 00000003073 15212564042 0011240 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Drop 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Drop Effect
//>>group: Effects
//>>description: Moves an element in one direction and hides it at the same time.
//>>docs: https://api.jqueryui.com/drop-effect/
//>>demos: https://jqueryui.com/effect/

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../version",
			"../effect"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.effects.define( "drop", "hide", function( options, done ) {

	var distance,
		element = $( this ),
		mode = options.mode,
		show = mode === "show",
		direction = options.direction || "left",
		ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
		motion = ( direction === "up" || direction === "left" ) ? "-=" : "+=",
		oppositeMotion = ( motion === "+=" ) ? "-=" : "+=",
		animation = {
			opacity: 0
		};

	$.effects.createPlaceholder( element );

	distance = options.distance ||
		element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2;

	animation[ ref ] = motion + distance;

	if ( show ) {
		element.css( animation );

		animation[ ref ] = oppositeMotion + distance;
		animation.opacity = 1;
	}

	// Animate
	element.animate( animation, {
		queue: false,
		duration: options.duration,
		easing: options.easing,
		complete: done
	} );
} );

} );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                     jquery/ui/effect-drop.min.js                                                                        0000644                 00000001361 15212564042 0012020 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Drop 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(d){"use strict";return d.effects.define("drop","hide",function(e,t){var i,n=d(this),o="show"===e.mode,f=e.direction||"left",c="up"===f||"down"===f?"top":"left",f="up"===f||"left"===f?"-=":"+=",u="+="==f?"-=":"+=",r={opacity:0};d.effects.createPlaceholder(n),i=e.distance||n["top"==c?"outerHeight":"outerWidth"](!0)/2,r[c]=f+i,o&&(n.css(r),r[c]=u+i,r.opacity=1),n.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:t})})});                                                                                                                                                                                                                                                                               jquery/ui/effect-explode.js                                                                         0000644                 00000005554 15212564042 0011742 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Explode 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Explode Effect
//>>group: Effects
/* eslint-disable max-len */
//>>description: Explodes an element in all directions into n pieces. Implodes an element to its original wholeness.
/* eslint-enable max-len */
//>>docs: https://api.jqueryui.com/explode-effect/
//>>demos: https://jqueryui.com/effect/

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../version",
			"../effect"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.effects.define( "explode", "hide", function( options, done ) {

	var i, j, left, top, mx, my,
		rows = options.pieces ? Math.round( Math.sqrt( options.pieces ) ) : 3,
		cells = rows,
		element = $( this ),
		mode = options.mode,
		show = mode === "show",

		// Show and then visibility:hidden the element before calculating offset
		offset = element.show().css( "visibility", "hidden" ).offset(),

		// Width and height of a piece
		width = Math.ceil( element.outerWidth() / cells ),
		height = Math.ceil( element.outerHeight() / rows ),
		pieces = [];

	// Children animate complete:
	function childComplete() {
		pieces.push( this );
		if ( pieces.length === rows * cells ) {
			animComplete();
		}
	}

	// Clone the element for each row and cell.
	for ( i = 0; i < rows; i++ ) { // ===>
		top = offset.top + i * height;
		my = i - ( rows - 1 ) / 2;

		for ( j = 0; j < cells; j++ ) { // |||
			left = offset.left + j * width;
			mx = j - ( cells - 1 ) / 2;

			// Create a clone of the now hidden main element that will be absolute positioned
			// within a wrapper div off the -left and -top equal to size of our pieces
			element
				.clone()
				.appendTo( "body" )
				.wrap( "<div></div>" )
				.css( {
					position: "absolute",
					visibility: "visible",
					left: -j * width,
					top: -i * height
				} )

				// Select the wrapper - make it overflow: hidden and absolute positioned based on
				// where the original was located +left and +top equal to the size of pieces
				.parent()
					.addClass( "ui-effects-explode" )
					.css( {
						position: "absolute",
						overflow: "hidden",
						width: width,
						height: height,
						left: left + ( show ? mx * width : 0 ),
						top: top + ( show ? my * height : 0 ),
						opacity: show ? 0 : 1
					} )
					.animate( {
						left: left + ( show ? 0 : mx * width ),
						top: top + ( show ? 0 : my * height ),
						opacity: show ? 1 : 0
					}, options.duration || 500, options.easing, childComplete );
		}
	}

	function animComplete() {
		element.css( {
			visibility: "visible"
		} );
		$( pieces ).remove();
		done();
	}
} );

} );
                                                                                                                                                    jquery/ui/effect-explode.min.js                                                                     0000644                 00000002142 15212564042 0012512 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Explode 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(b){"use strict";return b.effects.define("explode","hide",function(e,i){var t,o,s,n,f,d,c=e.pieces?Math.round(Math.sqrt(e.pieces)):3,a=c,l=b(this),r="show"===e.mode,h=l.show().css("visibility","hidden").offset(),p=Math.ceil(l.outerWidth()/a),u=Math.ceil(l.outerHeight()/c),v=[];function y(){v.push(this),v.length===c*a&&(l.css({visibility:"visible"}),b(v).remove(),i())}for(t=0;t<c;t++)for(n=h.top+t*u,d=t-(c-1)/2,o=0;o<a;o++)s=h.left+o*p,f=o-(a-1)/2,l.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-o*p,top:-t*u}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:p,height:u,left:s+(r?f*p:0),top:n+(r?d*u:0),opacity:r?0:1}).animate({left:s+(r?0:f*p),top:n+(r?0:d*u),opacity:r?1:0},e.duration||500,e.easing,y)})});                                                                                                                                                                                                                                                                                                                                                                                                                              jquery/ui/effect-fade.js                                                                            0000644                 00000001710 15212564042 0011167 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Fade 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Fade Effect
//>>group: Effects
//>>description: Fades the element.
//>>docs: https://api.jqueryui.com/fade-effect/
//>>demos: https://jqueryui.com/effect/

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../version",
			"../effect"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.effects.define( "fade", "toggle", function( options, done ) {
	var show = options.mode === "show";

	$( this )
		.css( "opacity", show ? 0 : 1 )
		.animate( {
			opacity: show ? 1 : 0
		}, {
			queue: false,
			duration: options.duration,
			easing: options.easing,
			complete: done
		} );
} );

} );
                                                        jquery/ui/effect-fade.min.js                                                                        0000644                 00000001015 15212564042 0011747 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Fade 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(n){"use strict";return n.effects.define("fade","toggle",function(e,t){var i="show"===e.mode;n(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:t})})});                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   jquery/ui/effect-fold.js                                                                            0000644                 00000004211 15212564042 0011213 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Fold 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Fold Effect
//>>group: Effects
//>>description: Folds an element first horizontally and then vertically.
//>>docs: https://api.jqueryui.com/fold-effect/
//>>demos: https://jqueryui.com/effect/

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../version",
			"../effect"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.effects.define( "fold", "hide", function( options, done ) {

	// Create element
	var element = $( this ),
		mode = options.mode,
		show = mode === "show",
		hide = mode === "hide",
		size = options.size || 15,
		percent = /([0-9]+)%/.exec( size ),
		horizFirst = !!options.horizFirst,
		ref = horizFirst ? [ "right", "bottom" ] : [ "bottom", "right" ],
		duration = options.duration / 2,

		placeholder = $.effects.createPlaceholder( element ),

		start = element.cssClip(),
		animation1 = { clip: $.extend( {}, start ) },
		animation2 = { clip: $.extend( {}, start ) },

		distance = [ start[ ref[ 0 ] ], start[ ref[ 1 ] ] ],

		queuelen = element.queue().length;

	if ( percent ) {
		size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];
	}
	animation1.clip[ ref[ 0 ] ] = size;
	animation2.clip[ ref[ 0 ] ] = size;
	animation2.clip[ ref[ 1 ] ] = 0;

	if ( show ) {
		element.cssClip( animation2.clip );
		if ( placeholder ) {
			placeholder.css( $.effects.clipToBox( animation2 ) );
		}

		animation2.clip = start;
	}

	// Animate
	element
		.queue( function( next ) {
			if ( placeholder ) {
				placeholder
					.animate( $.effects.clipToBox( animation1 ), duration, options.easing )
					.animate( $.effects.clipToBox( animation2 ), duration, options.easing );
			}

			next();
		} )
		.animate( animation1, duration, options.easing )
		.animate( animation2, duration, options.easing )
		.queue( done );

	$.effects.unshift( element, queuelen, 4 );
} );

} );
                                                                                                                                                                                                                                                                                                                                                                                       jquery/ui/effect-fold.min.js                                                                        0000644                 00000001774 15212564042 0012010 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Fold 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(m){"use strict";return m.effects.define("fold","hide",function(i,e){var t=m(this),c=i.mode,n="show"===c,c="hide"===c,s=i.size||15,f=/([0-9]+)%/.exec(s),o=!!i.horizFirst?["right","bottom"]:["bottom","right"],a=i.duration/2,u=m.effects.createPlaceholder(t),l=t.cssClip(),r={clip:m.extend({},l)},p={clip:m.extend({},l)},d=[l[o[0]],l[o[1]]],h=t.queue().length;f&&(s=parseInt(f[1],10)/100*d[c?0:1]),r.clip[o[0]]=s,p.clip[o[0]]=s,p.clip[o[1]]=0,n&&(t.cssClip(p.clip),u&&u.css(m.effects.clipToBox(p)),p.clip=l),t.queue(function(e){u&&u.animate(m.effects.clipToBox(r),a,i.easing).animate(m.effects.clipToBox(p),a,i.easing),e()}).animate(r,a,i.easing).animate(p,a,i.easing).queue(e),m.effects.unshift(t,h,4)})});    jquery/ui/effect-highlight.js                                                                       0000644                 00000002333 15212564042 0012241 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Highlight 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Highlight Effect
//>>group: Effects
//>>description: Highlights the background of an element in a defined color for a custom duration.
//>>docs: https://api.jqueryui.com/highlight-effect/
//>>demos: https://jqueryui.com/effect/

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../version",
			"../effect"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.effects.define( "highlight", "show", function( options, done ) {
	var element = $( this ),
		animation = {
			backgroundColor: element.css( "backgroundColor" )
		};

	if ( options.mode === "hide" ) {
		animation.opacity = 0;
	}

	$.effects.saveStyle( element );

	element
		.css( {
			backgroundImage: "none",
			backgroundColor: options.color || "#ffff99"
		} )
		.animate( animation, {
			queue: false,
			duration: options.duration,
			easing: options.easing,
			complete: done
		} );
} );

} );
                                                                                                                                                                                                                                                                                                     jquery/ui/effect-highlight.min.js                                                                   0000644                 00000001210 15212564042 0013014 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Highlight 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(t){"use strict";return t.effects.define("highlight","show",function(e,n){var o=t(this),i={backgroundColor:o.css("backgroundColor")};"hide"===e.mode&&(i.opacity=0),t.effects.saveStyle(o),o.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(i,{queue:!1,duration:e.duration,easing:e.easing,complete:n})})});                                                                                                                                                                                                                                                                                                                                                                                        jquery/ui/effect-puff.js                                                                            0000644                 00000001743 15212564042 0011236 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Puff 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Puff Effect
//>>group: Effects
//>>description: Creates a puff effect by scaling the element up and hiding it at the same time.
//>>docs: https://api.jqueryui.com/puff-effect/
//>>demos: https://jqueryui.com/effect/

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../version",
			"../effect",
			"./effect-scale"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.effects.define( "puff", "hide", function( options, done ) {
	var newOptions = $.extend( true, {}, options, {
		fade: true,
		percent: parseInt( options.percent, 10 ) || 150
	} );

	$.effects.effect.scale.call( this, newOptions, done );
} );

} );
                             jquery/ui/effect-puff.min.js                                                                        0000644                 00000000776 15212564042 0012025 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Puff 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect","./effect-scale"],e):e(jQuery)}(function(t){"use strict";return t.effects.define("puff","hide",function(e,f){e=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,e,f)})});  jquery/ui/effect-pulsate.js                                                                         0000644                 00000003037 15212564042 0011751 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Pulsate 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Pulsate Effect
//>>group: Effects
//>>description: Pulsates an element n times by changing the opacity to zero and back.
//>>docs: https://api.jqueryui.com/pulsate-effect/
//>>demos: https://jqueryui.com/effect/

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../version",
			"../effect"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.effects.define( "pulsate", "show", function( options, done ) {
	var element = $( this ),
		mode = options.mode,
		show = mode === "show",
		hide = mode === "hide",
		showhide = show || hide,

		// Showing or hiding leaves off the "last" animation
		anims = ( ( options.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
		duration = options.duration / anims,
		animateTo = 0,
		i = 1,
		queuelen = element.queue().length;

	if ( show || !element.is( ":visible" ) ) {
		element.css( "opacity", 0 ).show();
		animateTo = 1;
	}

	// Anims - 1 opacity "toggles"
	for ( ; i < anims; i++ ) {
		element.animate( { opacity: animateTo }, duration, options.easing );
		animateTo = 1 - animateTo;
	}

	element.animate( { opacity: animateTo }, duration, options.easing );

	element.queue( done );

	$.effects.unshift( element, queuelen, anims + 1 );
} );

} );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 jquery/ui/effect-pulsate.min.js                                                                     0000644                 00000001260 15212564042 0012527 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Pulsate 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(c){"use strict";return c.effects.define("pulsate","show",function(e,i){var t=c(this),n=e.mode,s="show"===n,f=2*(e.times||5)+(s||"hide"===n?1:0),u=e.duration/f,o=0,a=1,n=t.queue().length;for(!s&&t.is(":visible")||(t.css("opacity",0).show(),o=1);a<f;a++)t.animate({opacity:o},u,e.easing),o=1-o;t.animate({opacity:o},u,e.easing),t.queue(i),c.effects.unshift(t,n,1+f)})});                                                                                                                                                                                                                                                                                                                                                jquery/ui/effect-scale.js                                                                           0000644                 00000002535 15212564042 0011365 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Scale 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Scale Effect
//>>group: Effects
//>>description: Grows or shrinks an element and its content.
//>>docs: https://api.jqueryui.com/scale-effect/
//>>demos: https://jqueryui.com/effect/

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../version",
			"../effect",
			"./effect-size"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.effects.define( "scale", function( options, done ) {

	// Create element
	var el = $( this ),
		mode = options.mode,
		percent = parseInt( options.percent, 10 ) ||
			( parseInt( options.percent, 10 ) === 0 ? 0 : ( mode !== "effect" ? 0 : 100 ) ),

		newOptions = $.extend( true, {
			from: $.effects.scaledDimensions( el ),
			to: $.effects.scaledDimensions( el, percent, options.direction || "both" ),
			origin: options.origin || [ "middle", "center" ]
		}, options );

	// Fade option to support puff
	if ( options.fade ) {
		newOptions.from.opacity = 1;
		newOptions.to.opacity = 0;
	}

	$.effects.effect.size.call( this, newOptions, done );
} );

} );
                                                                                                                                                                   jquery/ui/effect-scale.min.js                                                                       0000644                 00000001323 15212564042 0012141 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Scale 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect","./effect-size"],e):e(jQuery)}(function(n){"use strict";return n.effects.define("scale",function(e,t){var f=n(this),i=e.mode,i=parseInt(e.percent,10)||(0===parseInt(e.percent,10)||"effect"!==i?0:100),f=n.extend(!0,{from:n.effects.scaledDimensions(f),to:n.effects.scaledDimensions(f,i,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(f.from.opacity=1,f.to.opacity=0),n.effects.effect.size.call(this,f,t)})});                                                                                                                                                                                                                                                                                                             jquery/ui/effect-shake.js                                                                           0000644                 00000003534 15212564042 0011371 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Shake 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Shake Effect
//>>group: Effects
//>>description: Shakes an element horizontally or vertically n times.
//>>docs: https://api.jqueryui.com/shake-effect/
//>>demos: https://jqueryui.com/effect/

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../version",
			"../effect"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.effects.define( "shake", function( options, done ) {

	var i = 1,
		element = $( this ),
		direction = options.direction || "left",
		distance = options.distance || 20,
		times = options.times || 3,
		anims = times * 2 + 1,
		speed = Math.round( options.duration / anims ),
		ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
		positiveMotion = ( direction === "up" || direction === "left" ),
		animation = {},
		animation1 = {},
		animation2 = {},

		queuelen = element.queue().length;

	$.effects.createPlaceholder( element );

	// Animation
	animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance;
	animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2;
	animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2;

	// Animate
	element.animate( animation, speed, options.easing );

	// Shakes
	for ( ; i < times; i++ ) {
		element
			.animate( animation1, speed, options.easing )
			.animate( animation2, speed, options.easing );
	}

	element
		.animate( animation1, speed, options.easing )
		.animate( animation, speed / 2, options.easing )
		.queue( done );

	$.effects.unshift( element, queuelen, anims + 1 );
} );

} );
                                                                                                                                                                    jquery/ui/effect-shake.min.js                                                                       0000644                 00000001516 15212564042 0012151 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Shake 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(h){"use strict";return h.effects.define("shake",function(e,t){var n=1,i=h(this),a=e.direction||"left",f=e.distance||20,s=e.times||3,u=2*s+1,c=Math.round(e.duration/u),r="up"===a||"down"===a?"top":"left",a="up"===a||"left"===a,o={},d={},m={},g=i.queue().length;for(h.effects.createPlaceholder(i),o[r]=(a?"-=":"+=")+f,d[r]=(a?"+=":"-=")+2*f,m[r]=(a?"-=":"+=")+2*f,i.animate(o,c,e.easing);n<s;n++)i.animate(d,c,e.easing).animate(m,c,e.easing);i.animate(d,c,e.easing).animate(o,c/2,e.easing).queue(t),h.effects.unshift(i,g,1+u)})});                                                                                                                                                                                  jquery/ui/effect-size.js                                                                            0000644                 00000012452 15212564042 0011247 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Size 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Size Effect
//>>group: Effects
//>>description: Resize an element to a specified width and height.
//>>docs: https://api.jqueryui.com/size-effect/
//>>demos: https://jqueryui.com/effect/

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../version",
			"../effect"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.effects.define( "size", function( options, done ) {

	// Create element
	var baseline, factor, temp,
		element = $( this ),

		// Copy for children
		cProps = [ "fontSize" ],
		vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ],
		hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ],

		// Set options
		mode = options.mode,
		restore = mode !== "effect",
		scale = options.scale || "both",
		origin = options.origin || [ "middle", "center" ],
		position = element.css( "position" ),
		pos = element.position(),
		original = $.effects.scaledDimensions( element ),
		from = options.from || original,
		to = options.to || $.effects.scaledDimensions( element, 0 );

	$.effects.createPlaceholder( element );

	if ( mode === "show" ) {
		temp = from;
		from = to;
		to = temp;
	}

	// Set scaling factor
	factor = {
		from: {
			y: from.height / original.height,
			x: from.width / original.width
		},
		to: {
			y: to.height / original.height,
			x: to.width / original.width
		}
	};

	// Scale the css box
	if ( scale === "box" || scale === "both" ) {

		// Vertical props scaling
		if ( factor.from.y !== factor.to.y ) {
			from = $.effects.setTransition( element, vProps, factor.from.y, from );
			to = $.effects.setTransition( element, vProps, factor.to.y, to );
		}

		// Horizontal props scaling
		if ( factor.from.x !== factor.to.x ) {
			from = $.effects.setTransition( element, hProps, factor.from.x, from );
			to = $.effects.setTransition( element, hProps, factor.to.x, to );
		}
	}

	// Scale the content
	if ( scale === "content" || scale === "both" ) {

		// Vertical props scaling
		if ( factor.from.y !== factor.to.y ) {
			from = $.effects.setTransition( element, cProps, factor.from.y, from );
			to = $.effects.setTransition( element, cProps, factor.to.y, to );
		}
	}

	// Adjust the position properties based on the provided origin points
	if ( origin ) {
		baseline = $.effects.getBaseline( origin, original );
		from.top = ( original.outerHeight - from.outerHeight ) * baseline.y + pos.top;
		from.left = ( original.outerWidth - from.outerWidth ) * baseline.x + pos.left;
		to.top = ( original.outerHeight - to.outerHeight ) * baseline.y + pos.top;
		to.left = ( original.outerWidth - to.outerWidth ) * baseline.x + pos.left;
	}
	delete from.outerHeight;
	delete from.outerWidth;
	element.css( from );

	// Animate the children if desired
	if ( scale === "content" || scale === "both" ) {

		vProps = vProps.concat( [ "marginTop", "marginBottom" ] ).concat( cProps );
		hProps = hProps.concat( [ "marginLeft", "marginRight" ] );

		// Only animate children with width attributes specified
		// TODO: is this right? should we include anything with css width specified as well
		element.find( "*[width]" ).each( function() {
			var child = $( this ),
				childOriginal = $.effects.scaledDimensions( child ),
				childFrom = {
					height: childOriginal.height * factor.from.y,
					width: childOriginal.width * factor.from.x,
					outerHeight: childOriginal.outerHeight * factor.from.y,
					outerWidth: childOriginal.outerWidth * factor.from.x
				},
				childTo = {
					height: childOriginal.height * factor.to.y,
					width: childOriginal.width * factor.to.x,
					outerHeight: childOriginal.height * factor.to.y,
					outerWidth: childOriginal.width * factor.to.x
				};

			// Vertical props scaling
			if ( factor.from.y !== factor.to.y ) {
				childFrom = $.effects.setTransition( child, vProps, factor.from.y, childFrom );
				childTo = $.effects.setTransition( child, vProps, factor.to.y, childTo );
			}

			// Horizontal props scaling
			if ( factor.from.x !== factor.to.x ) {
				childFrom = $.effects.setTransition( child, hProps, factor.from.x, childFrom );
				childTo = $.effects.setTransition( child, hProps, factor.to.x, childTo );
			}

			if ( restore ) {
				$.effects.saveStyle( child );
			}

			// Animate children
			child.css( childFrom );
			child.animate( childTo, options.duration, options.easing, function() {

				// Restore children
				if ( restore ) {
					$.effects.restoreStyle( child );
				}
			} );
		} );
	}

	// Animate
	element.animate( to, {
		queue: false,
		duration: options.duration,
		easing: options.easing,
		complete: function() {

			var offset = element.offset();

			if ( to.opacity === 0 ) {
				element.css( "opacity", from.opacity );
			}

			if ( !restore ) {
				element
					.css( "position", position === "static" ? "relative" : position )
					.offset( offset );

				// Need to save style here so that automatic style restoration
				// doesn't restore to the original styles from before the animation.
				$.effects.saveStyle( element );
			}

			done();
		}
	} );

} );

} );
                                                                                                                                                                                                                      jquery/ui/effect-size.min.js                                                                        0000644                 00000004673 15212564042 0012037 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Size 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],t):t(jQuery)}(function(l){"use strict";return l.effects.define("size",function(o,e){var f,i=l(this),t=["fontSize"],s=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],n=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],r=o.mode,h="effect"!==r,c=o.scale||"both",d=o.origin||["middle","center"],a=i.css("position"),g=i.position(),u=l.effects.scaledDimensions(i),m=o.from||u,y=o.to||l.effects.scaledDimensions(i,0);l.effects.createPlaceholder(i),"show"===r&&(r=m,m=y,y=r),f={from:{y:m.height/u.height,x:m.width/u.width},to:{y:y.height/u.height,x:y.width/u.width}},"box"!==c&&"both"!==c||(f.from.y!==f.to.y&&(m=l.effects.setTransition(i,s,f.from.y,m),y=l.effects.setTransition(i,s,f.to.y,y)),f.from.x!==f.to.x&&(m=l.effects.setTransition(i,n,f.from.x,m),y=l.effects.setTransition(i,n,f.to.x,y))),"content"!==c&&"both"!==c||f.from.y!==f.to.y&&(m=l.effects.setTransition(i,t,f.from.y,m),y=l.effects.setTransition(i,t,f.to.y,y)),d&&(r=l.effects.getBaseline(d,u),m.top=(u.outerHeight-m.outerHeight)*r.y+g.top,m.left=(u.outerWidth-m.outerWidth)*r.x+g.left,y.top=(u.outerHeight-y.outerHeight)*r.y+g.top,y.left=(u.outerWidth-y.outerWidth)*r.x+g.left),delete m.outerHeight,delete m.outerWidth,i.css(m),"content"!==c&&"both"!==c||(s=s.concat(["marginTop","marginBottom"]).concat(t),n=n.concat(["marginLeft","marginRight"]),i.find("*[width]").each(function(){var t=l(this),e=l.effects.scaledDimensions(t),i={height:e.height*f.from.y,width:e.width*f.from.x,outerHeight:e.outerHeight*f.from.y,outerWidth:e.outerWidth*f.from.x},e={height:e.height*f.to.y,width:e.width*f.to.x,outerHeight:e.height*f.to.y,outerWidth:e.width*f.to.x};f.from.y!==f.to.y&&(i=l.effects.setTransition(t,s,f.from.y,i),e=l.effects.setTransition(t,s,f.to.y,e)),f.from.x!==f.to.x&&(i=l.effects.setTransition(t,n,f.from.x,i),e=l.effects.setTransition(t,n,f.to.x,e)),h&&l.effects.saveStyle(t),t.css(i),t.animate(e,o.duration,o.easing,function(){h&&l.effects.restoreStyle(t)})})),i.animate(y,{queue:!1,duration:o.duration,easing:o.easing,complete:function(){var t=i.offset();0===y.opacity&&i.css("opacity",m.opacity),h||(i.css("position","static"===a?"relative":a).offset(t),l.effects.saveStyle(i)),e()}})})});                                                                     jquery/ui/effect-slide.js                                                                           0000644                 00000003657 15212564042 0011404 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Slide 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Slide Effect
//>>group: Effects
//>>description: Slides an element in and out of the viewport.
//>>docs: https://api.jqueryui.com/slide-effect/
//>>demos: https://jqueryui.com/effect/

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../version",
			"../effect"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.effects.define( "slide", "show", function( options, done ) {
	var startClip, startRef,
		element = $( this ),
		map = {
			up: [ "bottom", "top" ],
			down: [ "top", "bottom" ],
			left: [ "right", "left" ],
			right: [ "left", "right" ]
		},
		mode = options.mode,
		direction = options.direction || "left",
		ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
		positiveMotion = ( direction === "up" || direction === "left" ),
		distance = options.distance ||
			element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ),
		animation = {};

	$.effects.createPlaceholder( element );

	startClip = element.cssClip();
	startRef = element.position()[ ref ];

	// Define hide animation
	animation[ ref ] = ( positiveMotion ? -1 : 1 ) * distance + startRef;
	animation.clip = element.cssClip();
	animation.clip[ map[ direction ][ 1 ] ] = animation.clip[ map[ direction ][ 0 ] ];

	// Reverse the animation if we're showing
	if ( mode === "show" ) {
		element.cssClip( animation.clip );
		element.css( ref, animation[ ref ] );
		animation.clip = startClip;
		animation[ ref ] = startRef;
	}

	// Actually animate
	element.animate( animation, {
		queue: false,
		duration: options.duration,
		easing: options.easing,
		complete: done
	} );
} );

} );
                                                                                 jquery/ui/effect-slide.min.js                                                                       0000644                 00000001625 15212564043 0012160 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Slide 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(d){"use strict";return d.effects.define("slide","show",function(e,t){var i,o,n=d(this),c={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},s=e.mode,f=e.direction||"left",l="up"===f||"down"===f?"top":"left",p="up"===f||"left"===f,r=e.distance||n["top"==l?"outerHeight":"outerWidth"](!0),u={};d.effects.createPlaceholder(n),i=n.cssClip(),o=n.position()[l],u[l]=(p?-1:1)*r+o,u.clip=n.cssClip(),u.clip[c[f][1]]=u.clip[c[f][0]],"show"===s&&(n.cssClip(u.clip),n.css(l,u[l]),u.clip=i,u[l]=o),n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:t})})});                                                                                                           jquery/ui/effect-transfer.js                                                                        0000644                 00000001570 15212564043 0012121 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Transfer 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Transfer Effect
//>>group: Effects
//>>description: Displays a transfer effect from one element to another.
//>>docs: https://api.jqueryui.com/transfer-effect/
//>>demos: https://jqueryui.com/effect/

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../version",
			"../effect"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

var effect;
if ( $.uiBackCompat !== false ) {
	effect = $.effects.define( "transfer", function( options, done ) {
		$( this ).transfer( options, done );
	} );
}
return effect;

} );
                                                                                                                                        jquery/ui/effect-transfer.min.js                                                                    0000644                 00000000672 15212564043 0012705 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects Transfer 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],e):e(jQuery)}(function(t){"use strict";var e;return e=!1!==t.uiBackCompat?t.effects.define("transfer",function(e,n){t(this).transfer(e,n)}):e});                                                                      jquery/ui/effect.js                                                                                 0000644                 00000060045 15212564043 0010301 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Effects Core
//>>group: Effects
/* eslint-disable max-len */
//>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects.
/* eslint-enable max-len */
//>>docs: https://api.jqueryui.com/category/effects-core/
//>>demos: https://jqueryui.com/effect/

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"./jquery-var-for-color",
			"./vendor/jquery-color/jquery.color",
			"./version"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

var dataSpace = "ui-effects-",
	dataSpaceStyle = "ui-effects-style",
	dataSpaceAnimated = "ui-effects-animated";

$.effects = {
	effect: {}
};

/******************************************************************************/
/****************************** CLASS ANIMATIONS ******************************/
/******************************************************************************/
( function() {

var classAnimationActions = [ "add", "remove", "toggle" ],
	shorthandStyles = {
		border: 1,
		borderBottom: 1,
		borderColor: 1,
		borderLeft: 1,
		borderRight: 1,
		borderTop: 1,
		borderWidth: 1,
		margin: 1,
		padding: 1
	};

$.each(
	[ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ],
	function( _, prop ) {
		$.fx.step[ prop ] = function( fx ) {
			if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
				jQuery.style( fx.elem, prop, fx.end );
				fx.setAttr = true;
			}
		};
	}
);

function camelCase( string ) {
	return string.replace( /-([\da-z])/gi, function( all, letter ) {
		return letter.toUpperCase();
	} );
}

function getElementStyles( elem ) {
	var key, len,
		style = elem.ownerDocument.defaultView ?
			elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
			elem.currentStyle,
		styles = {};

	if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
		len = style.length;
		while ( len-- ) {
			key = style[ len ];
			if ( typeof style[ key ] === "string" ) {
				styles[ camelCase( key ) ] = style[ key ];
			}
		}

	// Support: Opera, IE <9
	} else {
		for ( key in style ) {
			if ( typeof style[ key ] === "string" ) {
				styles[ key ] = style[ key ];
			}
		}
	}

	return styles;
}

function styleDifference( oldStyle, newStyle ) {
	var diff = {},
		name, value;

	for ( name in newStyle ) {
		value = newStyle[ name ];
		if ( oldStyle[ name ] !== value ) {
			if ( !shorthandStyles[ name ] ) {
				if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
					diff[ name ] = value;
				}
			}
		}
	}

	return diff;
}

// Support: jQuery <1.8
if ( !$.fn.addBack ) {
	$.fn.addBack = function( selector ) {
		return this.add( selector == null ?
			this.prevObject : this.prevObject.filter( selector )
		);
	};
}

$.effects.animateClass = function( value, duration, easing, callback ) {
	var o = $.speed( duration, easing, callback );

	return this.queue( function() {
		var animated = $( this ),
			baseClass = animated.attr( "class" ) || "",
			applyClassChange,
			allAnimations = o.children ? animated.find( "*" ).addBack() : animated;

		// Map the animated objects to store the original styles.
		allAnimations = allAnimations.map( function() {
			var el = $( this );
			return {
				el: el,
				start: getElementStyles( this )
			};
		} );

		// Apply class change
		applyClassChange = function() {
			$.each( classAnimationActions, function( i, action ) {
				if ( value[ action ] ) {
					animated[ action + "Class" ]( value[ action ] );
				}
			} );
		};
		applyClassChange();

		// Map all animated objects again - calculate new styles and diff
		allAnimations = allAnimations.map( function() {
			this.end = getElementStyles( this.el[ 0 ] );
			this.diff = styleDifference( this.start, this.end );
			return this;
		} );

		// Apply original class
		animated.attr( "class", baseClass );

		// Map all animated objects again - this time collecting a promise
		allAnimations = allAnimations.map( function() {
			var styleInfo = this,
				dfd = $.Deferred(),
				opts = $.extend( {}, o, {
					queue: false,
					complete: function() {
						dfd.resolve( styleInfo );
					}
				} );

			this.el.animate( this.diff, opts );
			return dfd.promise();
		} );

		// Once all animations have completed:
		$.when.apply( $, allAnimations.get() ).done( function() {

			// Set the final class
			applyClassChange();

			// For each animated element,
			// clear all css properties that were animated
			$.each( arguments, function() {
				var el = this.el;
				$.each( this.diff, function( key ) {
					el.css( key, "" );
				} );
			} );

			// This is guarnteed to be there if you use jQuery.speed()
			// it also handles dequeuing the next anim...
			o.complete.call( animated[ 0 ] );
		} );
	} );
};

$.fn.extend( {
	addClass: ( function( orig ) {
		return function( classNames, speed, easing, callback ) {
			return speed ?
				$.effects.animateClass.call( this,
					{ add: classNames }, speed, easing, callback ) :
				orig.apply( this, arguments );
		};
	} )( $.fn.addClass ),

	removeClass: ( function( orig ) {
		return function( classNames, speed, easing, callback ) {
			return arguments.length > 1 ?
				$.effects.animateClass.call( this,
					{ remove: classNames }, speed, easing, callback ) :
				orig.apply( this, arguments );
		};
	} )( $.fn.removeClass ),

	toggleClass: ( function( orig ) {
		return function( classNames, force, speed, easing, callback ) {
			if ( typeof force === "boolean" || force === undefined ) {
				if ( !speed ) {

					// Without speed parameter
					return orig.apply( this, arguments );
				} else {
					return $.effects.animateClass.call( this,
						( force ? { add: classNames } : { remove: classNames } ),
						speed, easing, callback );
				}
			} else {

				// Without force parameter
				return $.effects.animateClass.call( this,
					{ toggle: classNames }, force, speed, easing );
			}
		};
	} )( $.fn.toggleClass ),

	switchClass: function( remove, add, speed, easing, callback ) {
		return $.effects.animateClass.call( this, {
			add: add,
			remove: remove
		}, speed, easing, callback );
	}
} );

} )();

/******************************************************************************/
/*********************************** EFFECTS **********************************/
/******************************************************************************/

( function() {

if ( $.expr && $.expr.pseudos && $.expr.pseudos.animated ) {
	$.expr.pseudos.animated = ( function( orig ) {
		return function( elem ) {
			return !!$( elem ).data( dataSpaceAnimated ) || orig( elem );
		};
	} )( $.expr.pseudos.animated );
}

if ( $.uiBackCompat !== false ) {
	$.extend( $.effects, {

		// Saves a set of properties in a data storage
		save: function( element, set ) {
			var i = 0, length = set.length;
			for ( ; i < length; i++ ) {
				if ( set[ i ] !== null ) {
					element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
				}
			}
		},

		// Restores a set of previously saved properties from a data storage
		restore: function( element, set ) {
			var val, i = 0, length = set.length;
			for ( ; i < length; i++ ) {
				if ( set[ i ] !== null ) {
					val = element.data( dataSpace + set[ i ] );
					element.css( set[ i ], val );
				}
			}
		},

		setMode: function( el, mode ) {
			if ( mode === "toggle" ) {
				mode = el.is( ":hidden" ) ? "show" : "hide";
			}
			return mode;
		},

		// Wraps the element around a wrapper that copies position properties
		createWrapper: function( element ) {

			// If the element is already wrapped, return it
			if ( element.parent().is( ".ui-effects-wrapper" ) ) {
				return element.parent();
			}

			// Wrap the element
			var props = {
					width: element.outerWidth( true ),
					height: element.outerHeight( true ),
					"float": element.css( "float" )
				},
				wrapper = $( "<div></div>" )
					.addClass( "ui-effects-wrapper" )
					.css( {
						fontSize: "100%",
						background: "transparent",
						border: "none",
						margin: 0,
						padding: 0
					} ),

				// Store the size in case width/height are defined in % - Fixes #5245
				size = {
					width: element.width(),
					height: element.height()
				},
				active = document.activeElement;

			// Support: Firefox
			// Firefox incorrectly exposes anonymous content
			// https://bugzilla.mozilla.org/show_bug.cgi?id=561664
			try {
				// eslint-disable-next-line no-unused-expressions
				active.id;
			} catch ( e ) {
				active = document.body;
			}

			element.wrap( wrapper );

			// Fixes #7595 - Elements lose focus when wrapped.
			if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
				$( active ).trigger( "focus" );
			}

			// Hotfix for jQuery 1.4 since some change in wrap() seems to actually
			// lose the reference to the wrapped element
			wrapper = element.parent();

			// Transfer positioning properties to the wrapper
			if ( element.css( "position" ) === "static" ) {
				wrapper.css( { position: "relative" } );
				element.css( { position: "relative" } );
			} else {
				$.extend( props, {
					position: element.css( "position" ),
					zIndex: element.css( "z-index" )
				} );
				$.each( [ "top", "left", "bottom", "right" ], function( i, pos ) {
					props[ pos ] = element.css( pos );
					if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
						props[ pos ] = "auto";
					}
				} );
				element.css( {
					position: "relative",
					top: 0,
					left: 0,
					right: "auto",
					bottom: "auto"
				} );
			}
			element.css( size );

			return wrapper.css( props ).show();
		},

		removeWrapper: function( element ) {
			var active = document.activeElement;

			if ( element.parent().is( ".ui-effects-wrapper" ) ) {
				element.parent().replaceWith( element );

				// Fixes #7595 - Elements lose focus when wrapped.
				if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
					$( active ).trigger( "focus" );
				}
			}

			return element;
		}
	} );
}

$.extend( $.effects, {
	version: "1.13.3",

	define: function( name, mode, effect ) {
		if ( !effect ) {
			effect = mode;
			mode = "effect";
		}

		$.effects.effect[ name ] = effect;
		$.effects.effect[ name ].mode = mode;

		return effect;
	},

	scaledDimensions: function( element, percent, direction ) {
		if ( percent === 0 ) {
			return {
				height: 0,
				width: 0,
				outerHeight: 0,
				outerWidth: 0
			};
		}

		var x = direction !== "horizontal" ? ( ( percent || 100 ) / 100 ) : 1,
			y = direction !== "vertical" ? ( ( percent || 100 ) / 100 ) : 1;

		return {
			height: element.height() * y,
			width: element.width() * x,
			outerHeight: element.outerHeight() * y,
			outerWidth: element.outerWidth() * x
		};

	},

	clipToBox: function( animation ) {
		return {
			width: animation.clip.right - animation.clip.left,
			height: animation.clip.bottom - animation.clip.top,
			left: animation.clip.left,
			top: animation.clip.top
		};
	},

	// Injects recently queued functions to be first in line (after "inprogress")
	unshift: function( element, queueLength, count ) {
		var queue = element.queue();

		if ( queueLength > 1 ) {
			queue.splice.apply( queue,
				[ 1, 0 ].concat( queue.splice( queueLength, count ) ) );
		}
		element.dequeue();
	},

	saveStyle: function( element ) {
		element.data( dataSpaceStyle, element[ 0 ].style.cssText );
	},

	restoreStyle: function( element ) {
		element[ 0 ].style.cssText = element.data( dataSpaceStyle ) || "";
		element.removeData( dataSpaceStyle );
	},

	mode: function( element, mode ) {
		var hidden = element.is( ":hidden" );

		if ( mode === "toggle" ) {
			mode = hidden ? "show" : "hide";
		}
		if ( hidden ? mode === "hide" : mode === "show" ) {
			mode = "none";
		}
		return mode;
	},

	// Translates a [top,left] array into a baseline value
	getBaseline: function( origin, original ) {
		var y, x;

		switch ( origin[ 0 ] ) {
		case "top":
			y = 0;
			break;
		case "middle":
			y = 0.5;
			break;
		case "bottom":
			y = 1;
			break;
		default:
			y = origin[ 0 ] / original.height;
		}

		switch ( origin[ 1 ] ) {
		case "left":
			x = 0;
			break;
		case "center":
			x = 0.5;
			break;
		case "right":
			x = 1;
			break;
		default:
			x = origin[ 1 ] / original.width;
		}

		return {
			x: x,
			y: y
		};
	},

	// Creates a placeholder element so that the original element can be made absolute
	createPlaceholder: function( element ) {
		var placeholder,
			cssPosition = element.css( "position" ),
			position = element.position();

		// Lock in margins first to account for form elements, which
		// will change margin if you explicitly set height
		// see: https://jsfiddle.net/JZSMt/3/ https://bugs.webkit.org/show_bug.cgi?id=107380
		// Support: Safari
		element.css( {
			marginTop: element.css( "marginTop" ),
			marginBottom: element.css( "marginBottom" ),
			marginLeft: element.css( "marginLeft" ),
			marginRight: element.css( "marginRight" )
		} )
		.outerWidth( element.outerWidth() )
		.outerHeight( element.outerHeight() );

		if ( /^(static|relative)/.test( cssPosition ) ) {
			cssPosition = "absolute";

			placeholder = $( "<" + element[ 0 ].nodeName + ">" ).insertAfter( element ).css( {

				// Convert inline to inline block to account for inline elements
				// that turn to inline block based on content (like img)
				display: /^(inline|ruby)/.test( element.css( "display" ) ) ?
					"inline-block" :
					"block",
				visibility: "hidden",

				// Margins need to be set to account for margin collapse
				marginTop: element.css( "marginTop" ),
				marginBottom: element.css( "marginBottom" ),
				marginLeft: element.css( "marginLeft" ),
				marginRight: element.css( "marginRight" ),
				"float": element.css( "float" )
			} )
			.outerWidth( element.outerWidth() )
			.outerHeight( element.outerHeight() )
			.addClass( "ui-effects-placeholder" );

			element.data( dataSpace + "placeholder", placeholder );
		}

		element.css( {
			position: cssPosition,
			left: position.left,
			top: position.top
		} );

		return placeholder;
	},

	removePlaceholder: function( element ) {
		var dataKey = dataSpace + "placeholder",
				placeholder = element.data( dataKey );

		if ( placeholder ) {
			placeholder.remove();
			element.removeData( dataKey );
		}
	},

	// Removes a placeholder if it exists and restores
	// properties that were modified during placeholder creation
	cleanUp: function( element ) {
		$.effects.restoreStyle( element );
		$.effects.removePlaceholder( element );
	},

	setTransition: function( element, list, factor, value ) {
		value = value || {};
		$.each( list, function( i, x ) {
			var unit = element.cssUnit( x );
			if ( unit[ 0 ] > 0 ) {
				value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
			}
		} );
		return value;
	}
} );

// Return an effect options object for the given parameters:
function _normalizeArguments( effect, options, speed, callback ) {

	// Allow passing all options as the first parameter
	if ( $.isPlainObject( effect ) ) {
		options = effect;
		effect = effect.effect;
	}

	// Convert to an object
	effect = { effect: effect };

	// Catch (effect, null, ...)
	if ( options == null ) {
		options = {};
	}

	// Catch (effect, callback)
	if ( typeof options === "function" ) {
		callback = options;
		speed = null;
		options = {};
	}

	// Catch (effect, speed, ?)
	if ( typeof options === "number" || $.fx.speeds[ options ] ) {
		callback = speed;
		speed = options;
		options = {};
	}

	// Catch (effect, options, callback)
	if ( typeof speed === "function" ) {
		callback = speed;
		speed = null;
	}

	// Add options to effect
	if ( options ) {
		$.extend( effect, options );
	}

	speed = speed || options.duration;
	effect.duration = $.fx.off ? 0 :
		typeof speed === "number" ? speed :
		speed in $.fx.speeds ? $.fx.speeds[ speed ] :
		$.fx.speeds._default;

	effect.complete = callback || options.complete;

	return effect;
}

function standardAnimationOption( option ) {

	// Valid standard speeds (nothing, number, named speed)
	if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) {
		return true;
	}

	// Invalid strings - treat as "normal" speed
	if ( typeof option === "string" && !$.effects.effect[ option ] ) {
		return true;
	}

	// Complete callback
	if ( typeof option === "function" ) {
		return true;
	}

	// Options hash (but not naming an effect)
	if ( typeof option === "object" && !option.effect ) {
		return true;
	}

	// Didn't match any standard API
	return false;
}

$.fn.extend( {
	effect: function( /* effect, options, speed, callback */ ) {
		var args = _normalizeArguments.apply( this, arguments ),
			effectMethod = $.effects.effect[ args.effect ],
			defaultMode = effectMethod.mode,
			queue = args.queue,
			queueName = queue || "fx",
			complete = args.complete,
			mode = args.mode,
			modes = [],
			prefilter = function( next ) {
				var el = $( this ),
					normalizedMode = $.effects.mode( el, mode ) || defaultMode;

				// Sentinel for duck-punching the :animated pseudo-selector
				el.data( dataSpaceAnimated, true );

				// Save effect mode for later use,
				// we can't just call $.effects.mode again later,
				// as the .show() below destroys the initial state
				modes.push( normalizedMode );

				// See $.uiBackCompat inside of run() for removal of defaultMode in 1.14
				if ( defaultMode && ( normalizedMode === "show" ||
						( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) {
					el.show();
				}

				if ( !defaultMode || normalizedMode !== "none" ) {
					$.effects.saveStyle( el );
				}

				if ( typeof next === "function" ) {
					next();
				}
			};

		if ( $.fx.off || !effectMethod ) {

			// Delegate to the original method (e.g., .show()) if possible
			if ( mode ) {
				return this[ mode ]( args.duration, complete );
			} else {
				return this.each( function() {
					if ( complete ) {
						complete.call( this );
					}
				} );
			}
		}

		function run( next ) {
			var elem = $( this );

			function cleanup() {
				elem.removeData( dataSpaceAnimated );

				$.effects.cleanUp( elem );

				if ( args.mode === "hide" ) {
					elem.hide();
				}

				done();
			}

			function done() {
				if ( typeof complete === "function" ) {
					complete.call( elem[ 0 ] );
				}

				if ( typeof next === "function" ) {
					next();
				}
			}

			// Override mode option on a per element basis,
			// as toggle can be either show or hide depending on element state
			args.mode = modes.shift();

			if ( $.uiBackCompat !== false && !defaultMode ) {
				if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {

					// Call the core method to track "olddisplay" properly
					elem[ mode ]();
					done();
				} else {
					effectMethod.call( elem[ 0 ], args, done );
				}
			} else {
				if ( args.mode === "none" ) {

					// Call the core method to track "olddisplay" properly
					elem[ mode ]();
					done();
				} else {
					effectMethod.call( elem[ 0 ], args, cleanup );
				}
			}
		}

		// Run prefilter on all elements first to ensure that
		// any showing or hiding happens before placeholder creation,
		// which ensures that any layout changes are correctly captured.
		return queue === false ?
			this.each( prefilter ).each( run ) :
			this.queue( queueName, prefilter ).queue( queueName, run );
	},

	show: ( function( orig ) {
		return function( option ) {
			if ( standardAnimationOption( option ) ) {
				return orig.apply( this, arguments );
			} else {
				var args = _normalizeArguments.apply( this, arguments );
				args.mode = "show";
				return this.effect.call( this, args );
			}
		};
	} )( $.fn.show ),

	hide: ( function( orig ) {
		return function( option ) {
			if ( standardAnimationOption( option ) ) {
				return orig.apply( this, arguments );
			} else {
				var args = _normalizeArguments.apply( this, arguments );
				args.mode = "hide";
				return this.effect.call( this, args );
			}
		};
	} )( $.fn.hide ),

	toggle: ( function( orig ) {
		return function( option ) {
			if ( standardAnimationOption( option ) || typeof option === "boolean" ) {
				return orig.apply( this, arguments );
			} else {
				var args = _normalizeArguments.apply( this, arguments );
				args.mode = "toggle";
				return this.effect.call( this, args );
			}
		};
	} )( $.fn.toggle ),

	cssUnit: function( key ) {
		var style = this.css( key ),
			val = [];

		$.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
			if ( style.indexOf( unit ) > 0 ) {
				val = [ parseFloat( style ), unit ];
			}
		} );
		return val;
	},

	cssClip: function( clipObj ) {
		if ( clipObj ) {
			return this.css( "clip", "rect(" + clipObj.top + "px " + clipObj.right + "px " +
				clipObj.bottom + "px " + clipObj.left + "px)" );
		}
		return parseClip( this.css( "clip" ), this );
	},

	transfer: function( options, done ) {
		var element = $( this ),
			target = $( options.to ),
			targetFixed = target.css( "position" ) === "fixed",
			body = $( "body" ),
			fixTop = targetFixed ? body.scrollTop() : 0,
			fixLeft = targetFixed ? body.scrollLeft() : 0,
			endPosition = target.offset(),
			animation = {
				top: endPosition.top - fixTop,
				left: endPosition.left - fixLeft,
				height: target.innerHeight(),
				width: target.innerWidth()
			},
			startPosition = element.offset(),
			transfer = $( "<div class='ui-effects-transfer'></div>" );

		transfer
			.appendTo( "body" )
			.addClass( options.className )
			.css( {
				top: startPosition.top - fixTop,
				left: startPosition.left - fixLeft,
				height: element.innerHeight(),
				width: element.innerWidth(),
				position: targetFixed ? "fixed" : "absolute"
			} )
			.animate( animation, options.duration, options.easing, function() {
				transfer.remove();
				if ( typeof done === "function" ) {
					done();
				}
			} );
	}
} );

function parseClip( str, element ) {
		var outerWidth = element.outerWidth(),
			outerHeight = element.outerHeight(),
			clipRegex = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,
			values = clipRegex.exec( str ) || [ "", 0, outerWidth, outerHeight, 0 ];

		return {
			top: parseFloat( values[ 1 ] ) || 0,
			right: values[ 2 ] === "auto" ? outerWidth : parseFloat( values[ 2 ] ),
			bottom: values[ 3 ] === "auto" ? outerHeight : parseFloat( values[ 3 ] ),
			left: parseFloat( values[ 4 ] ) || 0
		};
}

$.fx.step.clip = function( fx ) {
	if ( !fx.clipInit ) {
		fx.start = $( fx.elem ).cssClip();
		if ( typeof fx.end === "string" ) {
			fx.end = parseClip( fx.end, fx.elem );
		}
		fx.clipInit = true;
	}

	$( fx.elem ).cssClip( {
		top: fx.pos * ( fx.end.top - fx.start.top ) + fx.start.top,
		right: fx.pos * ( fx.end.right - fx.start.right ) + fx.start.right,
		bottom: fx.pos * ( fx.end.bottom - fx.start.bottom ) + fx.start.bottom,
		left: fx.pos * ( fx.end.left - fx.start.left ) + fx.start.left
	} );
};

} )();

/******************************************************************************/
/*********************************** EASING ***********************************/
/******************************************************************************/

( function() {

// Based on easing equations from Robert Penner (http://robertpenner.com/easing)

var baseEasings = {};

$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
	baseEasings[ name ] = function( p ) {
		return Math.pow( p, i + 2 );
	};
} );

$.extend( baseEasings, {
	Sine: function( p ) {
		return 1 - Math.cos( p * Math.PI / 2 );
	},
	Circ: function( p ) {
		return 1 - Math.sqrt( 1 - p * p );
	},
	Elastic: function( p ) {
		return p === 0 || p === 1 ? p :
			-Math.pow( 2, 8 * ( p - 1 ) ) * Math.sin( ( ( p - 1 ) * 80 - 7.5 ) * Math.PI / 15 );
	},
	Back: function( p ) {
		return p * p * ( 3 * p - 2 );
	},
	Bounce: function( p ) {
		var pow2,
			bounce = 4;

		while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
		return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
	}
} );

$.each( baseEasings, function( name, easeIn ) {
	$.easing[ "easeIn" + name ] = easeIn;
	$.easing[ "easeOut" + name ] = function( p ) {
		return 1 - easeIn( 1 - p );
	};
	$.easing[ "easeInOut" + name ] = function( p ) {
		return p < 0.5 ?
			easeIn( p * 2 ) / 2 :
			1 - easeIn( p * -2 + 2 ) / 2;
	};
} );

} )();

return $.effects;

} );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           jquery/ui/effect.min.js                                                                             0000644                 00000024134 15212564043 0011062 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Effects 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./jquery-var-for-color","./vendor/jquery-color/jquery.color","./version"],t):t(jQuery)}(function(u){"use strict";var s,o,r,a,c,e,n,i,f,l,d="ui-effects-",h="ui-effects-style",p="ui-effects-animated";function m(t){var e,n,i=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,o={};if(i&&i.length&&i[0]&&i[i[0]])for(n=i.length;n--;)"string"==typeof i[e=i[n]]&&(o[e.replace(/-([\da-z])/gi,function(t,e){return e.toUpperCase()})]=i[e]);else for(e in i)"string"==typeof i[e]&&(o[e]=i[e]);return o}function g(t,e,n,i){return t={effect:t=u.isPlainObject(t)?(e=t).effect:t},"function"==typeof(e=null==e?{}:e)&&(i=e,n=null,e={}),"number"!=typeof e&&!u.fx.speeds[e]||(i=n,n=e,e={}),"function"==typeof n&&(i=n,n=null),e&&u.extend(t,e),n=n||e.duration,t.duration=u.fx.off?0:"number"==typeof n?n:n in u.fx.speeds?u.fx.speeds[n]:u.fx.speeds._default,t.complete=i||e.complete,t}function v(t){return!t||"number"==typeof t||u.fx.speeds[t]||"string"==typeof t&&!u.effects.effect[t]||"function"==typeof t||"object"==typeof t&&!t.effect}function y(t,e){var n=e.outerWidth(),e=e.outerHeight(),t=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,n,e,0];return{top:parseFloat(t[1])||0,right:"auto"===t[2]?n:parseFloat(t[2]),bottom:"auto"===t[3]?e:parseFloat(t[3]),left:parseFloat(t[4])||0}}return u.effects={effect:{}},a=["add","remove","toggle"],c={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1},u.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,e){u.fx.step[e]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,e,t.end),t.setAttr=!0)}}),u.fn.addBack||(u.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),u.effects.animateClass=function(o,t,e,n){var s=u.speed(t,e,n);return this.queue(function(){var n=u(this),t=n.attr("class")||"",e=(e=s.children?n.find("*").addBack():n).map(function(){return{el:u(this),start:m(this)}}),i=function(){u.each(a,function(t,e){o[e]&&n[e+"Class"](o[e])})};i(),e=e.map(function(){return this.end=m(this.el[0]),this.diff=function(t,e){var n,i,o={};for(n in e)i=e[n],t[n]===i||c[n]||!u.fx.step[n]&&isNaN(parseFloat(i))||(o[n]=i);return o}(this.start,this.end),this}),n.attr("class",t),e=e.map(function(){var t=this,e=u.Deferred(),n=u.extend({},s,{queue:!1,complete:function(){e.resolve(t)}});return this.el.animate(this.diff,n),e.promise()}),u.when.apply(u,e.get()).done(function(){i(),u.each(arguments,function(){var e=this.el;u.each(this.diff,function(t){e.css(t,"")})}),s.complete.call(n[0])})})},u.fn.extend({addClass:(r=u.fn.addClass,function(t,e,n,i){return e?u.effects.animateClass.call(this,{add:t},e,n,i):r.apply(this,arguments)}),removeClass:(o=u.fn.removeClass,function(t,e,n,i){return 1<arguments.length?u.effects.animateClass.call(this,{remove:t},e,n,i):o.apply(this,arguments)}),toggleClass:(s=u.fn.toggleClass,function(t,e,n,i,o){return"boolean"==typeof e||void 0===e?n?u.effects.animateClass.call(this,e?{add:t}:{remove:t},n,i,o):s.apply(this,arguments):u.effects.animateClass.call(this,{toggle:t},e,n,i)}),switchClass:function(t,e,n,i,o){return u.effects.animateClass.call(this,{add:e,remove:t},n,i,o)}}),u.expr&&u.expr.pseudos&&u.expr.pseudos.animated&&(u.expr.pseudos.animated=(e=u.expr.pseudos.animated,function(t){return!!u(t).data(p)||e(t)})),!1!==u.uiBackCompat&&u.extend(u.effects,{save:function(t,e){for(var n=0,i=e.length;n<i;n++)null!==e[n]&&t.data(d+e[n],t[0].style[e[n]])},restore:function(t,e){for(var n,i=0,o=e.length;i<o;i++)null!==e[i]&&(n=t.data(d+e[i]),t.css(e[i],n))},setMode:function(t,e){return e="toggle"===e?t.is(":hidden")?"show":"hide":e},createWrapper:function(n){if(n.parent().is(".ui-effects-wrapper"))return n.parent();var i={width:n.outerWidth(!0),height:n.outerHeight(!0),float:n.css("float")},t=u("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:n.width(),height:n.height()},o=document.activeElement;try{o.id}catch(t){o=document.body}return n.wrap(t),n[0]!==o&&!u.contains(n[0],o)||u(o).trigger("focus"),t=n.parent(),"static"===n.css("position")?(t.css({position:"relative"}),n.css({position:"relative"})):(u.extend(i,{position:n.css("position"),zIndex:n.css("z-index")}),u.each(["top","left","bottom","right"],function(t,e){i[e]=n.css(e),isNaN(parseInt(i[e],10))&&(i[e]="auto")}),n.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),n.css(e),t.css(i).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),t[0]!==e&&!u.contains(t[0],e)||u(e).trigger("focus")),t}}),u.extend(u.effects,{version:"1.13.3",define:function(t,e,n){return n||(n=e,e="effect"),u.effects.effect[t]=n,u.effects.effect[t].mode=e,n},scaledDimensions:function(t,e,n){var i;return 0===e?{height:0,width:0,outerHeight:0,outerWidth:0}:(i="horizontal"!==n?(e||100)/100:1,n="vertical"!==n?(e||100)/100:1,{height:t.height()*n,width:t.width()*i,outerHeight:t.outerHeight()*n,outerWidth:t.outerWidth()*i})},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,n){var i=t.queue();1<e&&i.splice.apply(i,[1,0].concat(i.splice(e,n))),t.dequeue()},saveStyle:function(t){t.data(h,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(h)||"",t.removeData(h)},mode:function(t,e){t=t.is(":hidden");return"toggle"===e&&(e=t?"show":"hide"),e=(t?"hide"===e:"show"===e)?"none":e},getBaseline:function(t,e){var n,i;switch(t[0]){case"top":n=0;break;case"middle":n=.5;break;case"bottom":n=1;break;default:n=t[0]/e.height}switch(t[1]){case"left":i=0;break;case"center":i=.5;break;case"right":i=1;break;default:i=t[1]/e.width}return{x:i,y:n}},createPlaceholder:function(t){var e,n=t.css("position"),i=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(n)&&(n="absolute",e=u("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(d+"placeholder",e)),t.css({position:n,left:i.left,top:i.top}),e},removePlaceholder:function(t){var e=d+"placeholder",n=t.data(e);n&&(n.remove(),t.removeData(e))},cleanUp:function(t){u.effects.restoreStyle(t),u.effects.removePlaceholder(t)},setTransition:function(i,t,o,s){return s=s||{},u.each(t,function(t,e){var n=i.cssUnit(e);0<n[0]&&(s[e]=n[0]*o+n[1])}),s}}),u.fn.extend({effect:function(){function t(t){var e=u(this),n=u.effects.mode(e,a)||s;e.data(p,!0),c.push(n),s&&("show"===n||n===s&&"hide"===n)&&e.show(),s&&"none"===n||u.effects.saveStyle(e),"function"==typeof t&&t()}var i=g.apply(this,arguments),o=u.effects.effect[i.effect],s=o.mode,e=i.queue,n=e||"fx",r=i.complete,a=i.mode,c=[];return u.fx.off||!o?a?this[a](i.duration,r):this.each(function(){r&&r.call(this)}):!1===e?this.each(t).each(f):this.queue(n,t).queue(n,f);function f(t){var e=u(this);function n(){"function"==typeof r&&r.call(e[0]),"function"==typeof t&&t()}i.mode=c.shift(),!1===u.uiBackCompat||s?"none"===i.mode?(e[a](),n()):o.call(e[0],i,function(){e.removeData(p),u.effects.cleanUp(e),"hide"===i.mode&&e.hide(),n()}):(e.is(":hidden")?"hide"===a:"show"===a)?(e[a](),n()):o.call(e[0],i,n)}},show:(f=u.fn.show,function(t){return v(t)?f.apply(this,arguments):((t=g.apply(this,arguments)).mode="show",this.effect.call(this,t))}),hide:(i=u.fn.hide,function(t){return v(t)?i.apply(this,arguments):((t=g.apply(this,arguments)).mode="hide",this.effect.call(this,t))}),toggle:(n=u.fn.toggle,function(t){return v(t)||"boolean"==typeof t?n.apply(this,arguments):((t=g.apply(this,arguments)).mode="toggle",this.effect.call(this,t))}),cssUnit:function(t){var n=this.css(t),i=[];return u.each(["em","px","%","pt"],function(t,e){0<n.indexOf(e)&&(i=[parseFloat(n),e])}),i},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):y(this.css("clip"),this)},transfer:function(t,e){var n=u(this),i=u(t.to),o="fixed"===i.css("position"),s=u("body"),r=o?s.scrollTop():0,s=o?s.scrollLeft():0,a=i.offset(),a={top:a.top-r,left:a.left-s,height:i.innerHeight(),width:i.innerWidth()},i=n.offset(),c=u("<div class='ui-effects-transfer'></div>");c.appendTo("body").addClass(t.className).css({top:i.top-r,left:i.left-s,height:n.innerHeight(),width:n.innerWidth(),position:o?"fixed":"absolute"}).animate(a,t.duration,t.easing,function(){c.remove(),"function"==typeof e&&e()})}}),u.fx.step.clip=function(t){t.clipInit||(t.start=u(t.elem).cssClip(),"string"==typeof t.end&&(t.end=y(t.end,t.elem)),t.clipInit=!0),u(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})},l={},u.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,t){l[t]=function(t){return Math.pow(t,e+2)}}),u.extend(l,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)}}),u.each(l,function(t,e){u.easing["easeIn"+t]=e,u.easing["easeOut"+t]=function(t){return 1-e(1-t)},u.easing["easeInOut"+t]=function(t){return t<.5?e(2*t)/2:1-e(-2*t+2)/2}}),u.effects});                                                                                                                                                                                                                                                                                                                                                                                                                                    jquery/ui/menu.js                                                                                   0000644                 00000045020 15212564043 0010005 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Menu 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Menu
//>>group: Widgets
//>>description: Creates nestable menus.
//>>docs: https://api.jqueryui.com/menu/
//>>demos: https://jqueryui.com/menu/
//>>css.structure: ../../themes/base/core.css
//>>css.structure: ../../themes/base/menu.css
//>>css.theme: ../../themes/base/theme.css

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../keycode",
			"../position",
			"../safe-active-element",
			"../unique-id",
			"../version",
			"../widget"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.widget( "ui.menu", {
	version: "1.13.3",
	defaultElement: "<ul>",
	delay: 300,
	options: {
		icons: {
			submenu: "ui-icon-caret-1-e"
		},
		items: "> *",
		menus: "ul",
		position: {
			my: "left top",
			at: "right top"
		},
		role: "menu",

		// Callbacks
		blur: null,
		focus: null,
		select: null
	},

	_create: function() {
		this.activeMenu = this.element;

		// Flag used to prevent firing of the click handler
		// as the event bubbles up through nested menus
		this.mouseHandled = false;
		this.lastMousePosition = { x: null, y: null };
		this.element
			.uniqueId()
			.attr( {
				role: this.options.role,
				tabIndex: 0
			} );

		this._addClass( "ui-menu", "ui-widget ui-widget-content" );
		this._on( {

			// Prevent focus from sticking to links inside menu after clicking
			// them (focus should always stay on UL during navigation).
			"mousedown .ui-menu-item": function( event ) {
				event.preventDefault();

				this._activateItem( event );
			},
			"click .ui-menu-item": function( event ) {
				var target = $( event.target );
				var active = $( $.ui.safeActiveElement( this.document[ 0 ] ) );
				if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
					this.select( event );

					// Only set the mouseHandled flag if the event will bubble, see #9469.
					if ( !event.isPropagationStopped() ) {
						this.mouseHandled = true;
					}

					// Open submenu on click
					if ( target.has( ".ui-menu" ).length ) {
						this.expand( event );
					} else if ( !this.element.is( ":focus" ) &&
							active.closest( ".ui-menu" ).length ) {

						// Redirect focus to the menu
						this.element.trigger( "focus", [ true ] );

						// If the active item is on the top level, let it stay active.
						// Otherwise, blur the active item since it is no longer visible.
						if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
							clearTimeout( this.timer );
						}
					}
				}
			},
			"mouseenter .ui-menu-item": "_activateItem",
			"mousemove .ui-menu-item": "_activateItem",
			mouseleave: "collapseAll",
			"mouseleave .ui-menu": "collapseAll",
			focus: function( event, keepActiveItem ) {

				// If there's already an active item, keep it active
				// If not, activate the first item
				var item = this.active || this._menuItems().first();

				if ( !keepActiveItem ) {
					this.focus( event, item );
				}
			},
			blur: function( event ) {
				this._delay( function() {
					var notContained = !$.contains(
						this.element[ 0 ],
						$.ui.safeActiveElement( this.document[ 0 ] )
					);
					if ( notContained ) {
						this.collapseAll( event );
					}
				} );
			},
			keydown: "_keydown"
		} );

		this.refresh();

		// Clicks outside of a menu collapse any open menus
		this._on( this.document, {
			click: function( event ) {
				if ( this._closeOnDocumentClick( event ) ) {
					this.collapseAll( event, true );
				}

				// Reset the mouseHandled flag
				this.mouseHandled = false;
			}
		} );
	},

	_activateItem: function( event ) {

		// Ignore mouse events while typeahead is active, see #10458.
		// Prevents focusing the wrong item when typeahead causes a scroll while the mouse
		// is over an item in the menu
		if ( this.previousFilter ) {
			return;
		}

		// If the mouse didn't actually move, but the page was scrolled, ignore the event (#9356)
		if ( event.clientX === this.lastMousePosition.x &&
				event.clientY === this.lastMousePosition.y ) {
			return;
		}

		this.lastMousePosition = {
			x: event.clientX,
			y: event.clientY
		};

		var actualTarget = $( event.target ).closest( ".ui-menu-item" ),
			target = $( event.currentTarget );

		// Ignore bubbled events on parent items, see #11641
		if ( actualTarget[ 0 ] !== target[ 0 ] ) {
			return;
		}

		// If the item is already active, there's nothing to do
		if ( target.is( ".ui-state-active" ) ) {
			return;
		}

		// Remove ui-state-active class from siblings of the newly focused menu item
		// to avoid a jump caused by adjacent elements both having a class with a border
		this._removeClass( target.siblings().children( ".ui-state-active" ),
			null, "ui-state-active" );
		this.focus( event, target );
	},

	_destroy: function() {
		var items = this.element.find( ".ui-menu-item" )
				.removeAttr( "role aria-disabled" ),
			submenus = items.children( ".ui-menu-item-wrapper" )
				.removeUniqueId()
				.removeAttr( "tabIndex role aria-haspopup" );

		// Destroy (sub)menus
		this.element
			.removeAttr( "aria-activedescendant" )
			.find( ".ui-menu" ).addBack()
				.removeAttr( "role aria-labelledby aria-expanded aria-hidden aria-disabled " +
					"tabIndex" )
				.removeUniqueId()
				.show();

		submenus.children().each( function() {
			var elem = $( this );
			if ( elem.data( "ui-menu-submenu-caret" ) ) {
				elem.remove();
			}
		} );
	},

	_keydown: function( event ) {
		var match, prev, character, skip,
			preventDefault = true;

		switch ( event.keyCode ) {
		case $.ui.keyCode.PAGE_UP:
			this.previousPage( event );
			break;
		case $.ui.keyCode.PAGE_DOWN:
			this.nextPage( event );
			break;
		case $.ui.keyCode.HOME:
			this._move( "first", "first", event );
			break;
		case $.ui.keyCode.END:
			this._move( "last", "last", event );
			break;
		case $.ui.keyCode.UP:
			this.previous( event );
			break;
		case $.ui.keyCode.DOWN:
			this.next( event );
			break;
		case $.ui.keyCode.LEFT:
			this.collapse( event );
			break;
		case $.ui.keyCode.RIGHT:
			if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
				this.expand( event );
			}
			break;
		case $.ui.keyCode.ENTER:
		case $.ui.keyCode.SPACE:
			this._activate( event );
			break;
		case $.ui.keyCode.ESCAPE:
			this.collapse( event );
			break;
		default:
			preventDefault = false;
			prev = this.previousFilter || "";
			skip = false;

			// Support number pad values
			character = event.keyCode >= 96 && event.keyCode <= 105 ?
				( event.keyCode - 96 ).toString() : String.fromCharCode( event.keyCode );

			clearTimeout( this.filterTimer );

			if ( character === prev ) {
				skip = true;
			} else {
				character = prev + character;
			}

			match = this._filterMenuItems( character );
			match = skip && match.index( this.active.next() ) !== -1 ?
				this.active.nextAll( ".ui-menu-item" ) :
				match;

			// If no matches on the current filter, reset to the last character pressed
			// to move down the menu to the first item that starts with that character
			if ( !match.length ) {
				character = String.fromCharCode( event.keyCode );
				match = this._filterMenuItems( character );
			}

			if ( match.length ) {
				this.focus( event, match );
				this.previousFilter = character;
				this.filterTimer = this._delay( function() {
					delete this.previousFilter;
				}, 1000 );
			} else {
				delete this.previousFilter;
			}
		}

		if ( preventDefault ) {
			event.preventDefault();
		}
	},

	_activate: function( event ) {
		if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
			if ( this.active.children( "[aria-haspopup='true']" ).length ) {
				this.expand( event );
			} else {
				this.select( event );
			}
		}
	},

	refresh: function() {
		var menus, items, newSubmenus, newItems, newWrappers,
			that = this,
			icon = this.options.icons.submenu,
			submenus = this.element.find( this.options.menus );

		this._toggleClass( "ui-menu-icons", null, !!this.element.find( ".ui-icon" ).length );

		// Initialize nested menus
		newSubmenus = submenus.filter( ":not(.ui-menu)" )
			.hide()
			.attr( {
				role: this.options.role,
				"aria-hidden": "true",
				"aria-expanded": "false"
			} )
			.each( function() {
				var menu = $( this ),
					item = menu.prev(),
					submenuCaret = $( "<span>" ).data( "ui-menu-submenu-caret", true );

				that._addClass( submenuCaret, "ui-menu-icon", "ui-icon " + icon );
				item
					.attr( "aria-haspopup", "true" )
					.prepend( submenuCaret );
				menu.attr( "aria-labelledby", item.attr( "id" ) );
			} );

		this._addClass( newSubmenus, "ui-menu", "ui-widget ui-widget-content ui-front" );

		menus = submenus.add( this.element );
		items = menus.find( this.options.items );

		// Initialize menu-items containing spaces and/or dashes only as dividers
		items.not( ".ui-menu-item" ).each( function() {
			var item = $( this );
			if ( that._isDivider( item ) ) {
				that._addClass( item, "ui-menu-divider", "ui-widget-content" );
			}
		} );

		// Don't refresh list items that are already adapted
		newItems = items.not( ".ui-menu-item, .ui-menu-divider" );
		newWrappers = newItems.children()
			.not( ".ui-menu" )
				.uniqueId()
				.attr( {
					tabIndex: -1,
					role: this._itemRole()
				} );
		this._addClass( newItems, "ui-menu-item" )
			._addClass( newWrappers, "ui-menu-item-wrapper" );

		// Add aria-disabled attribute to any disabled menu item
		items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" );

		// If the active item has been removed, blur the menu
		if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
			this.blur();
		}
	},

	_itemRole: function() {
		return {
			menu: "menuitem",
			listbox: "option"
		}[ this.options.role ];
	},

	_setOption: function( key, value ) {
		if ( key === "icons" ) {
			var icons = this.element.find( ".ui-menu-icon" );
			this._removeClass( icons, null, this.options.icons.submenu )
				._addClass( icons, null, value.submenu );
		}
		this._super( key, value );
	},

	_setOptionDisabled: function( value ) {
		this._super( value );

		this.element.attr( "aria-disabled", String( value ) );
		this._toggleClass( null, "ui-state-disabled", !!value );
	},

	focus: function( event, item ) {
		var nested, focused, activeParent;
		this.blur( event, event && event.type === "focus" );

		this._scrollIntoView( item );

		this.active = item.first();

		focused = this.active.children( ".ui-menu-item-wrapper" );
		this._addClass( focused, null, "ui-state-active" );

		// Only update aria-activedescendant if there's a role
		// otherwise we assume focus is managed elsewhere
		if ( this.options.role ) {
			this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
		}

		// Highlight active parent menu item, if any
		activeParent = this.active
			.parent()
				.closest( ".ui-menu-item" )
					.children( ".ui-menu-item-wrapper" );
		this._addClass( activeParent, null, "ui-state-active" );

		if ( event && event.type === "keydown" ) {
			this._close();
		} else {
			this.timer = this._delay( function() {
				this._close();
			}, this.delay );
		}

		nested = item.children( ".ui-menu" );
		if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
			this._startOpening( nested );
		}
		this.activeMenu = item.parent();

		this._trigger( "focus", event, { item: item } );
	},

	_scrollIntoView: function( item ) {
		var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
		if ( this._hasScroll() ) {
			borderTop = parseFloat( $.css( this.activeMenu[ 0 ], "borderTopWidth" ) ) || 0;
			paddingTop = parseFloat( $.css( this.activeMenu[ 0 ], "paddingTop" ) ) || 0;
			offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
			scroll = this.activeMenu.scrollTop();
			elementHeight = this.activeMenu.height();
			itemHeight = item.outerHeight();

			if ( offset < 0 ) {
				this.activeMenu.scrollTop( scroll + offset );
			} else if ( offset + itemHeight > elementHeight ) {
				this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
			}
		}
	},

	blur: function( event, fromFocus ) {
		if ( !fromFocus ) {
			clearTimeout( this.timer );
		}

		if ( !this.active ) {
			return;
		}

		this._removeClass( this.active.children( ".ui-menu-item-wrapper" ),
			null, "ui-state-active" );

		this._trigger( "blur", event, { item: this.active } );
		this.active = null;
	},

	_startOpening: function( submenu ) {
		clearTimeout( this.timer );

		// Don't open if already open fixes a Firefox bug that caused a .5 pixel
		// shift in the submenu position when mousing over the caret icon
		if ( submenu.attr( "aria-hidden" ) !== "true" ) {
			return;
		}

		this.timer = this._delay( function() {
			this._close();
			this._open( submenu );
		}, this.delay );
	},

	_open: function( submenu ) {
		var position = $.extend( {
			of: this.active
		}, this.options.position );

		clearTimeout( this.timer );
		this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
			.hide()
			.attr( "aria-hidden", "true" );

		submenu
			.show()
			.removeAttr( "aria-hidden" )
			.attr( "aria-expanded", "true" )
			.position( position );
	},

	collapseAll: function( event, all ) {
		clearTimeout( this.timer );
		this.timer = this._delay( function() {

			// If we were passed an event, look for the submenu that contains the event
			var currentMenu = all ? this.element :
				$( event && event.target ).closest( this.element.find( ".ui-menu" ) );

			// If we found no valid submenu ancestor, use the main menu to close all
			// sub menus anyway
			if ( !currentMenu.length ) {
				currentMenu = this.element;
			}

			this._close( currentMenu );

			this.blur( event );

			// Work around active item staying active after menu is blurred
			this._removeClass( currentMenu.find( ".ui-state-active" ), null, "ui-state-active" );

			this.activeMenu = currentMenu;
		}, all ? 0 : this.delay );
	},

	// With no arguments, closes the currently active menu - if nothing is active
	// it closes all menus.  If passed an argument, it will search for menus BELOW
	_close: function( startMenu ) {
		if ( !startMenu ) {
			startMenu = this.active ? this.active.parent() : this.element;
		}

		startMenu.find( ".ui-menu" )
			.hide()
			.attr( "aria-hidden", "true" )
			.attr( "aria-expanded", "false" );
	},

	_closeOnDocumentClick: function( event ) {
		return !$( event.target ).closest( ".ui-menu" ).length;
	},

	_isDivider: function( item ) {

		// Match hyphen, em dash, en dash
		return !/[^\-\u2014\u2013\s]/.test( item.text() );
	},

	collapse: function( event ) {
		var newItem = this.active &&
			this.active.parent().closest( ".ui-menu-item", this.element );
		if ( newItem && newItem.length ) {
			this._close();
			this.focus( event, newItem );
		}
	},

	expand: function( event ) {
		var newItem = this.active && this._menuItems( this.active.children( ".ui-menu" ) ).first();

		if ( newItem && newItem.length ) {
			this._open( newItem.parent() );

			// Delay so Firefox will not hide activedescendant change in expanding submenu from AT
			this._delay( function() {
				this.focus( event, newItem );
			} );
		}
	},

	next: function( event ) {
		this._move( "next", "first", event );
	},

	previous: function( event ) {
		this._move( "prev", "last", event );
	},

	isFirstItem: function() {
		return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
	},

	isLastItem: function() {
		return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
	},

	_menuItems: function( menu ) {
		return ( menu || this.element )
			.find( this.options.items )
			.filter( ".ui-menu-item" );
	},

	_move: function( direction, filter, event ) {
		var next;
		if ( this.active ) {
			if ( direction === "first" || direction === "last" ) {
				next = this.active
					[ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
					.last();
			} else {
				next = this.active
					[ direction + "All" ]( ".ui-menu-item" )
					.first();
			}
		}
		if ( !next || !next.length || !this.active ) {
			next = this._menuItems( this.activeMenu )[ filter ]();
		}

		this.focus( event, next );
	},

	nextPage: function( event ) {
		var item, base, height;

		if ( !this.active ) {
			this.next( event );
			return;
		}
		if ( this.isLastItem() ) {
			return;
		}
		if ( this._hasScroll() ) {
			base = this.active.offset().top;
			height = this.element.innerHeight();

			// jQuery 3.2 doesn't include scrollbars in innerHeight, add it back.
			if ( $.fn.jquery.indexOf( "3.2." ) === 0 ) {
				height += this.element[ 0 ].offsetHeight - this.element.outerHeight();
			}

			this.active.nextAll( ".ui-menu-item" ).each( function() {
				item = $( this );
				return item.offset().top - base - height < 0;
			} );

			this.focus( event, item );
		} else {
			this.focus( event, this._menuItems( this.activeMenu )
				[ !this.active ? "first" : "last" ]() );
		}
	},

	previousPage: function( event ) {
		var item, base, height;
		if ( !this.active ) {
			this.next( event );
			return;
		}
		if ( this.isFirstItem() ) {
			return;
		}
		if ( this._hasScroll() ) {
			base = this.active.offset().top;
			height = this.element.innerHeight();

			// jQuery 3.2 doesn't include scrollbars in innerHeight, add it back.
			if ( $.fn.jquery.indexOf( "3.2." ) === 0 ) {
				height += this.element[ 0 ].offsetHeight - this.element.outerHeight();
			}

			this.active.prevAll( ".ui-menu-item" ).each( function() {
				item = $( this );
				return item.offset().top - base + height > 0;
			} );

			this.focus( event, item );
		} else {
			this.focus( event, this._menuItems( this.activeMenu ).first() );
		}
	},

	_hasScroll: function() {
		return this.element.outerHeight() < this.element.prop( "scrollHeight" );
	},

	select: function( event ) {

		// TODO: It should never be possible to not have an active item at this
		// point, but the tests don't trigger mouseenter before click.
		this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
		var ui = { item: this.active };
		if ( !this.active.has( ".ui-menu" ).length ) {
			this.collapseAll( event, true );
		}
		this._trigger( "select", event, ui );
	},

	_filterMenuItems: function( character ) {
		var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ),
			regex = new RegExp( "^" + escapedCharacter, "i" );

		return this.activeMenu
			.find( this.options.items )

				// Only match on items, not dividers or other content (#10571)
				.filter( ".ui-menu-item" )
					.filter( function() {
						return regex.test(
							String.prototype.trim.call(
								$( this ).children( ".ui-menu-item-wrapper" ).text() ) );
					} );
	}
} );

} );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                jquery/ui/menu.min.js                                                                               0000644                 00000023727 15212564043 0010601 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Menu 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../keycode","../position","../safe-active-element","../unique-id","../version","../widget"],e):e(jQuery)}(function(a){"use strict";return a.widget("ui.menu",{version:"1.13.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault(),this._activateItem(e)},"click .ui-menu-item":function(e){var t=a(e.target),i=a(a.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&t.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),t.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active)&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this._menuItems().first();t||this.focus(e,i)},blur:function(e){this._delay(function(){a.contains(this.element[0],a.ui.safeActiveElement(this.document[0]))||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e,!0),this.mouseHandled=!1}})},_activateItem:function(e){var t,i;this.previousFilter||e.clientX===this.lastMousePosition.x&&e.clientY===this.lastMousePosition.y||(this.lastMousePosition={x:e.clientX,y:e.clientY},t=a(e.target).closest(".ui-menu-item"),i=a(e.currentTarget),t[0]!==i[0])||i.is(".ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,i))},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),e.children().each(function(){var e=a(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var t,i,s,n=!0;switch(e.keyCode){case a.ui.keyCode.PAGE_UP:this.previousPage(e);break;case a.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case a.ui.keyCode.HOME:this._move("first","first",e);break;case a.ui.keyCode.END:this._move("last","last",e);break;case a.ui.keyCode.UP:this.previous(e);break;case a.ui.keyCode.DOWN:this.next(e);break;case a.ui.keyCode.LEFT:this.collapse(e);break;case a.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case a.ui.keyCode.ENTER:case a.ui.keyCode.SPACE:this._activate(e);break;case a.ui.keyCode.ESCAPE:this.collapse(e);break;default:t=this.previousFilter||"",s=n=!1,i=96<=e.keyCode&&e.keyCode<=105?(e.keyCode-96).toString():String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),i===t?s=!0:i=t+i,t=this._filterMenuItems(i),(t=s&&-1!==t.index(this.active.next())?this.active.nextAll(".ui-menu-item"):t).length||(i=String.fromCharCode(e.keyCode),t=this._filterMenuItems(i)),t.length?(this.focus(e,t),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}n&&e.preventDefault()},_activate:function(e){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var e,t,s=this,n=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=a(this),t=e.prev(),i=a("<span>").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+n),t.attr("aria-haspopup","true").prepend(i),e.attr("aria-labelledby",t.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(e=i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var e=a(this);s._isDivider(e)&&s._addClass(e,"ui-menu-divider","ui-widget-content")}),t=(i=e.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(i,"ui-menu-item")._addClass(t,"ui-menu-item-wrapper"),e.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!a.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){var i;"icons"===e&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,t.submenu)),this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",String(e)),this._toggleClass(null,"ui-state-disabled",!!e)},focus:function(e,t){var i;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=t.children(".ui-menu")).length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(e){var t,i,s;this._hasScroll()&&(t=parseFloat(a.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(a.css(this.activeMenu[0],"paddingTop"))||0,t=e.offset().top-this.activeMenu.offset().top-t-i,i=this.activeMenu.scrollTop(),s=this.activeMenu.height(),e=e.outerHeight(),t<0?this.activeMenu.scrollTop(i+t):s<t+e&&this.activeMenu.scrollTop(i+t-s+e))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",e,{item:this.active}),this.active=null)},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(e){var t=a.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(t)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var e=i?this.element:a(t&&t.target).closest(this.element.find(".ui-menu"));e.length||(e=this.element),this._close(e),this.blur(t),this._removeClass(e.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=e},i?0:this.delay)},_close:function(e){(e=e||(this.active?this.active.parent():this.element)).find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!a(e.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this._menuItems(this.active.children(".ui-menu")).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_menuItems:function(e){return(e||this.element).find(this.options.items).filter(".ui-menu-item")},_move:function(e,t,i){var s;(s=this.active?"first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").last():this.active[e+"All"](".ui-menu-item").first():s)&&s.length&&this.active||(s=this._menuItems(this.activeMenu)[t]()),this.focus(i,s)},nextPage:function(e){var t,i,s;this.active?this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.innerHeight(),0===a.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.nextAll(".ui-menu-item").each(function(){return(t=a(this)).offset().top-i-s<0}),this.focus(e,t)):this.focus(e,this._menuItems(this.activeMenu)[this.active?"last":"first"]())):this.next(e)},previousPage:function(e){var t,i,s;this.active?this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.innerHeight(),0===a.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.prevAll(".ui-menu-item").each(function(){return 0<(t=a(this)).offset().top-i+s}),this.focus(e,t)):this.focus(e,this._menuItems(this.activeMenu).first())):this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||a(e.target).closest(".ui-menu-item");var t={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,t)},_filterMenuItems:function(e){var e=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),t=new RegExp("^"+e,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return t.test(String.prototype.trim.call(a(this).children(".ui-menu-item-wrapper").text()))})}})});                                         jquery/ui/mouse.js                                                                                  0000644                 00000014123 15212564043 0010171 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Mouse 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Mouse
//>>group: Widgets
//>>description: Abstracts mouse-based interactions to assist in creating certain widgets.
//>>docs: https://api.jqueryui.com/mouse/

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../ie",
			"../version",
			"../widget"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

var mouseHandled = false;
$( document ).on( "mouseup", function() {
	mouseHandled = false;
} );

return $.widget( "ui.mouse", {
	version: "1.13.3",
	options: {
		cancel: "input, textarea, button, select, option",
		distance: 1,
		delay: 0
	},
	_mouseInit: function() {
		var that = this;

		this.element
			.on( "mousedown." + this.widgetName, function( event ) {
				return that._mouseDown( event );
			} )
			.on( "click." + this.widgetName, function( event ) {
				if ( true === $.data( event.target, that.widgetName + ".preventClickEvent" ) ) {
					$.removeData( event.target, that.widgetName + ".preventClickEvent" );
					event.stopImmediatePropagation();
					return false;
				}
			} );

		this.started = false;
	},

	// TODO: make sure destroying one instance of mouse doesn't mess with
	// other instances of mouse
	_mouseDestroy: function() {
		this.element.off( "." + this.widgetName );
		if ( this._mouseMoveDelegate ) {
			this.document
				.off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
				.off( "mouseup." + this.widgetName, this._mouseUpDelegate );
		}
	},

	_mouseDown: function( event ) {

		// don't let more than one widget handle mouseStart
		if ( mouseHandled ) {
			return;
		}

		this._mouseMoved = false;

		// We may have missed mouseup (out of window)
		if ( this._mouseStarted ) {
			this._mouseUp( event );
		}

		this._mouseDownEvent = event;

		var that = this,
			btnIsLeft = ( event.which === 1 ),

			// event.target.nodeName works around a bug in IE 8 with
			// disabled inputs (#7620)
			elIsCancel = ( typeof this.options.cancel === "string" && event.target.nodeName ?
				$( event.target ).closest( this.options.cancel ).length : false );
		if ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) {
			return true;
		}

		this.mouseDelayMet = !this.options.delay;
		if ( !this.mouseDelayMet ) {
			this._mouseDelayTimer = setTimeout( function() {
				that.mouseDelayMet = true;
			}, this.options.delay );
		}

		if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {
			this._mouseStarted = ( this._mouseStart( event ) !== false );
			if ( !this._mouseStarted ) {
				event.preventDefault();
				return true;
			}
		}

		// Click event may never have fired (Gecko & Opera)
		if ( true === $.data( event.target, this.widgetName + ".preventClickEvent" ) ) {
			$.removeData( event.target, this.widgetName + ".preventClickEvent" );
		}

		// These delegates are required to keep context
		this._mouseMoveDelegate = function( event ) {
			return that._mouseMove( event );
		};
		this._mouseUpDelegate = function( event ) {
			return that._mouseUp( event );
		};

		this.document
			.on( "mousemove." + this.widgetName, this._mouseMoveDelegate )
			.on( "mouseup." + this.widgetName, this._mouseUpDelegate );

		event.preventDefault();

		mouseHandled = true;
		return true;
	},

	_mouseMove: function( event ) {

		// Only check for mouseups outside the document if you've moved inside the document
		// at least once. This prevents the firing of mouseup in the case of IE<9, which will
		// fire a mousemove event if content is placed under the cursor. See #7778
		// Support: IE <9
		if ( this._mouseMoved ) {

			// IE mouseup check - mouseup happened when mouse was out of window
			if ( $.ui.ie && ( !document.documentMode || document.documentMode < 9 ) &&
					!event.button ) {
				return this._mouseUp( event );

			// Iframe mouseup check - mouseup occurred in another document
			} else if ( !event.which ) {

				// Support: Safari <=8 - 9
				// Safari sets which to 0 if you press any of the following keys
				// during a drag (#14461)
				if ( event.originalEvent.altKey || event.originalEvent.ctrlKey ||
						event.originalEvent.metaKey || event.originalEvent.shiftKey ) {
					this.ignoreMissingWhich = true;
				} else if ( !this.ignoreMissingWhich ) {
					return this._mouseUp( event );
				}
			}
		}

		if ( event.which || event.button ) {
			this._mouseMoved = true;
		}

		if ( this._mouseStarted ) {
			this._mouseDrag( event );
			return event.preventDefault();
		}

		if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {
			this._mouseStarted =
				( this._mouseStart( this._mouseDownEvent, event ) !== false );
			if ( this._mouseStarted ) {
				this._mouseDrag( event );
			} else {
				this._mouseUp( event );
			}
		}

		return !this._mouseStarted;
	},

	_mouseUp: function( event ) {
		this.document
			.off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
			.off( "mouseup." + this.widgetName, this._mouseUpDelegate );

		if ( this._mouseStarted ) {
			this._mouseStarted = false;

			if ( event.target === this._mouseDownEvent.target ) {
				$.data( event.target, this.widgetName + ".preventClickEvent", true );
			}

			this._mouseStop( event );
		}

		if ( this._mouseDelayTimer ) {
			clearTimeout( this._mouseDelayTimer );
			delete this._mouseDelayTimer;
		}

		this.ignoreMissingWhich = false;
		mouseHandled = false;
		event.preventDefault();
	},

	_mouseDistanceMet: function( event ) {
		return ( Math.max(
				Math.abs( this._mouseDownEvent.pageX - event.pageX ),
				Math.abs( this._mouseDownEvent.pageY - event.pageY )
			) >= this.options.distance
		);
	},

	_mouseDelayMet: function( /* event */ ) {
		return this.mouseDelayMet;
	},

	// These are placeholder methods, to be overriden by extending plugin
	_mouseStart: function( /* event */ ) {},
	_mouseDrag: function( /* event */ ) {},
	_mouseStop: function( /* event */ ) {},
	_mouseCapture: function( /* event */ ) {
		return true;
	}
} );

} );
                                                                                                                                                                                                                                                                                                                                                                                                                                             jquery/ui/mouse.min.js                                                                              0000644                 00000006544 15212564043 0010763 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Mouse 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../ie","../version","../widget"],e):e(jQuery)}(function(o){"use strict";var n=!1;return o(document).on("mouseup",function(){n=!1}),o.widget("ui.mouse",{version:"1.13.3",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).on("click."+this.widgetName,function(e){if(!0===o.data(e.target,t.widgetName+".preventClickEvent"))return o.removeData(e.target,t.widgetName+".preventClickEvent"),e.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){var t,i,s;if(!n)return this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),i=1===(this._mouseDownEvent=e).which,s=!("string"!=typeof(t=this).options.cancel||!e.target.nodeName)&&o(e.target).closest(this.options.cancel).length,i&&!s&&this._mouseCapture(e)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){t.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?e.preventDefault():(!0===o.data(e.target,this.widgetName+".preventClickEvent")&&o.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return t._mouseMove(e)},this._mouseUpDelegate=function(e){return t._mouseUp(e)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),n=!0)),!0},_mouseMove:function(e){if(this._mouseMoved){if(o.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&o.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,n=!1,e.preventDefault()},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})});                                                                                                                                                            jquery/ui/progressbar.js                                                                            0000644                 00000010217 15212564043 0011372 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Progressbar 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Progressbar
//>>group: Widgets
/* eslint-disable max-len */
//>>description: Displays a status indicator for loading state, standard percentage, and other progress indicators.
/* eslint-enable max-len */
//>>docs: https://api.jqueryui.com/progressbar/
//>>demos: https://jqueryui.com/progressbar/
//>>css.structure: ../../themes/base/core.css
//>>css.structure: ../../themes/base/progressbar.css
//>>css.theme: ../../themes/base/theme.css

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../version",
			"../widget"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.widget( "ui.progressbar", {
	version: "1.13.3",
	options: {
		classes: {
			"ui-progressbar": "ui-corner-all",
			"ui-progressbar-value": "ui-corner-left",
			"ui-progressbar-complete": "ui-corner-right"
		},
		max: 100,
		value: 0,

		change: null,
		complete: null
	},

	min: 0,

	_create: function() {

		// Constrain initial value
		this.oldValue = this.options.value = this._constrainedValue();

		this.element.attr( {

			// Only set static values; aria-valuenow and aria-valuemax are
			// set inside _refreshValue()
			role: "progressbar",
			"aria-valuemin": this.min
		} );
		this._addClass( "ui-progressbar", "ui-widget ui-widget-content" );

		this.valueDiv = $( "<div>" ).appendTo( this.element );
		this._addClass( this.valueDiv, "ui-progressbar-value", "ui-widget-header" );
		this._refreshValue();
	},

	_destroy: function() {
		this.element.removeAttr( "role aria-valuemin aria-valuemax aria-valuenow" );

		this.valueDiv.remove();
	},

	value: function( newValue ) {
		if ( newValue === undefined ) {
			return this.options.value;
		}

		this.options.value = this._constrainedValue( newValue );
		this._refreshValue();
	},

	_constrainedValue: function( newValue ) {
		if ( newValue === undefined ) {
			newValue = this.options.value;
		}

		this.indeterminate = newValue === false;

		// Sanitize value
		if ( typeof newValue !== "number" ) {
			newValue = 0;
		}

		return this.indeterminate ? false :
			Math.min( this.options.max, Math.max( this.min, newValue ) );
	},

	_setOptions: function( options ) {

		// Ensure "value" option is set after other values (like max)
		var value = options.value;
		delete options.value;

		this._super( options );

		this.options.value = this._constrainedValue( value );
		this._refreshValue();
	},

	_setOption: function( key, value ) {
		if ( key === "max" ) {

			// Don't allow a max less than min
			value = Math.max( this.min, value );
		}
		this._super( key, value );
	},

	_setOptionDisabled: function( value ) {
		this._super( value );

		this.element.attr( "aria-disabled", value );
		this._toggleClass( null, "ui-state-disabled", !!value );
	},

	_percentage: function() {
		return this.indeterminate ?
			100 :
			100 * ( this.options.value - this.min ) / ( this.options.max - this.min );
	},

	_refreshValue: function() {
		var value = this.options.value,
			percentage = this._percentage();

		this.valueDiv
			.toggle( this.indeterminate || value > this.min )
			.width( percentage.toFixed( 0 ) + "%" );

		this
			._toggleClass( this.valueDiv, "ui-progressbar-complete", null,
				value === this.options.max )
			._toggleClass( "ui-progressbar-indeterminate", null, this.indeterminate );

		if ( this.indeterminate ) {
			this.element.removeAttr( "aria-valuenow" );
			if ( !this.overlayDiv ) {
				this.overlayDiv = $( "<div>" ).appendTo( this.valueDiv );
				this._addClass( this.overlayDiv, "ui-progressbar-overlay" );
			}
		} else {
			this.element.attr( {
				"aria-valuemax": this.options.max,
				"aria-valuenow": value
			} );
			if ( this.overlayDiv ) {
				this.overlayDiv.remove();
				this.overlayDiv = null;
			}
		}

		if ( this.oldValue !== value ) {
			this.oldValue = value;
			this._trigger( "change" );
		}
		if ( value === this.options.max ) {
			this._trigger( "complete" );
		}
	}
} );

} );
                                                                                                                                                                                                                                                                                                                                                                                 jquery/ui/progressbar.min.js                                                                        0000644                 00000004776 15212564043 0012171 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Progressbar 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../widget"],e):e(jQuery)}(function(t){"use strict";return t.widget("ui.progressbar",{version:"1.13.3",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=t("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(e){if(void 0===e)return this.options.value;this.options.value=this._constrainedValue(e),this._refreshValue()},_constrainedValue:function(e){return void 0===e&&(e=this.options.value),this.indeterminate=!1===e,"number"!=typeof e&&(e=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var i=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(i),this._refreshValue()},_setOption:function(e,i){"max"===e&&(i=Math.max(this.min,i)),this._super(e,i)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",e),this._toggleClass(null,"ui-state-disabled",!!e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).width(i.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,e===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})});  jquery/ui/resizable.js                                                                              0000644                 00000073432 15212564043 0011031 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Resizable 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Resizable
//>>group: Interactions
//>>description: Enables resize functionality for any element.
//>>docs: https://api.jqueryui.com/resizable/
//>>demos: https://jqueryui.com/resizable/
//>>css.structure: ../../themes/base/core.css
//>>css.structure: ../../themes/base/resizable.css
//>>css.theme: ../../themes/base/theme.css

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"./mouse",
			"../disable-selection",
			"../plugin",
			"../version",
			"../widget"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

$.widget( "ui.resizable", $.ui.mouse, {
	version: "1.13.3",
	widgetEventPrefix: "resize",
	options: {
		alsoResize: false,
		animate: false,
		animateDuration: "slow",
		animateEasing: "swing",
		aspectRatio: false,
		autoHide: false,
		classes: {
			"ui-resizable-se": "ui-icon ui-icon-gripsmall-diagonal-se"
		},
		containment: false,
		ghost: false,
		grid: false,
		handles: "e,s,se",
		helper: false,
		maxHeight: null,
		maxWidth: null,
		minHeight: 10,
		minWidth: 10,

		// See #7960
		zIndex: 90,

		// Callbacks
		resize: null,
		start: null,
		stop: null
	},

	_num: function( value ) {
		return parseFloat( value ) || 0;
	},

	_isNumber: function( value ) {
		return !isNaN( parseFloat( value ) );
	},

	_hasScroll: function( el, a ) {

		if ( $( el ).css( "overflow" ) === "hidden" ) {
			return false;
		}

		var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
			has = false;

		if ( el[ scroll ] > 0 ) {
			return true;
		}

		// TODO: determine which cases actually cause this to happen
		// if the element doesn't have the scroll set, see if it's possible to
		// set the scroll
		try {
			el[ scroll ] = 1;
			has = ( el[ scroll ] > 0 );
			el[ scroll ] = 0;
		} catch ( e ) {

			// `el` might be a string, then setting `scroll` will throw
			// an error in strict mode; ignore it.
		}
		return has;
	},

	_create: function() {

		var margins,
			o = this.options,
			that = this;
		this._addClass( "ui-resizable" );

		$.extend( this, {
			_aspectRatio: !!( o.aspectRatio ),
			aspectRatio: o.aspectRatio,
			originalElement: this.element,
			_proportionallyResizeElements: [],
			_helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null
		} );

		// Wrap the element if it cannot hold child nodes
		if ( this.element[ 0 ].nodeName.match( /^(canvas|textarea|input|select|button|img)$/i ) ) {

			this.element.wrap(
				$( "<div class='ui-wrapper'></div>" ).css( {
					overflow: "hidden",
					position: this.element.css( "position" ),
					width: this.element.outerWidth(),
					height: this.element.outerHeight(),
					top: this.element.css( "top" ),
					left: this.element.css( "left" )
				} )
			);

			this.element = this.element.parent().data(
				"ui-resizable", this.element.resizable( "instance" )
			);

			this.elementIsWrapper = true;

			margins = {
				marginTop: this.originalElement.css( "marginTop" ),
				marginRight: this.originalElement.css( "marginRight" ),
				marginBottom: this.originalElement.css( "marginBottom" ),
				marginLeft: this.originalElement.css( "marginLeft" )
			};

			this.element.css( margins );
			this.originalElement.css( "margin", 0 );

			// support: Safari
			// Prevent Safari textarea resize
			this.originalResizeStyle = this.originalElement.css( "resize" );
			this.originalElement.css( "resize", "none" );

			this._proportionallyResizeElements.push( this.originalElement.css( {
				position: "static",
				zoom: 1,
				display: "block"
			} ) );

			// Support: IE9
			// avoid IE jump (hard set the margin)
			this.originalElement.css( margins );

			this._proportionallyResize();
		}

		this._setupHandles();

		if ( o.autoHide ) {
			$( this.element )
				.on( "mouseenter", function() {
					if ( o.disabled ) {
						return;
					}
					that._removeClass( "ui-resizable-autohide" );
					that._handles.show();
				} )
				.on( "mouseleave", function() {
					if ( o.disabled ) {
						return;
					}
					if ( !that.resizing ) {
						that._addClass( "ui-resizable-autohide" );
						that._handles.hide();
					}
				} );
		}

		this._mouseInit();
	},

	_destroy: function() {

		this._mouseDestroy();
		this._addedHandles.remove();

		var wrapper,
			_destroy = function( exp ) {
				$( exp )
					.removeData( "resizable" )
					.removeData( "ui-resizable" )
					.off( ".resizable" );
			};

		// TODO: Unwrap at same DOM position
		if ( this.elementIsWrapper ) {
			_destroy( this.element );
			wrapper = this.element;
			this.originalElement.css( {
				position: wrapper.css( "position" ),
				width: wrapper.outerWidth(),
				height: wrapper.outerHeight(),
				top: wrapper.css( "top" ),
				left: wrapper.css( "left" )
			} ).insertAfter( wrapper );
			wrapper.remove();
		}

		this.originalElement.css( "resize", this.originalResizeStyle );
		_destroy( this.originalElement );

		return this;
	},

	_setOption: function( key, value ) {
		this._super( key, value );

		switch ( key ) {
		case "handles":
			this._removeHandles();
			this._setupHandles();
			break;
		case "aspectRatio":
			this._aspectRatio = !!value;
			break;
		default:
			break;
		}
	},

	_setupHandles: function() {
		var o = this.options, handle, i, n, hname, axis, that = this;
		this.handles = o.handles ||
			( !$( ".ui-resizable-handle", this.element ).length ?
				"e,s,se" : {
					n: ".ui-resizable-n",
					e: ".ui-resizable-e",
					s: ".ui-resizable-s",
					w: ".ui-resizable-w",
					se: ".ui-resizable-se",
					sw: ".ui-resizable-sw",
					ne: ".ui-resizable-ne",
					nw: ".ui-resizable-nw"
				} );

		this._handles = $();
		this._addedHandles = $();
		if ( this.handles.constructor === String ) {

			if ( this.handles === "all" ) {
				this.handles = "n,e,s,w,se,sw,ne,nw";
			}

			n = this.handles.split( "," );
			this.handles = {};

			for ( i = 0; i < n.length; i++ ) {

				handle = String.prototype.trim.call( n[ i ] );
				hname = "ui-resizable-" + handle;
				axis = $( "<div>" );
				this._addClass( axis, "ui-resizable-handle " + hname );

				axis.css( { zIndex: o.zIndex } );

				this.handles[ handle ] = ".ui-resizable-" + handle;
				if ( !this.element.children( this.handles[ handle ] ).length ) {
					this.element.append( axis );
					this._addedHandles = this._addedHandles.add( axis );
				}
			}

		}

		this._renderAxis = function( target ) {

			var i, axis, padPos, padWrapper;

			target = target || this.element;

			for ( i in this.handles ) {

				if ( this.handles[ i ].constructor === String ) {
					this.handles[ i ] = this.element.children( this.handles[ i ] ).first().show();
				} else if ( this.handles[ i ].jquery || this.handles[ i ].nodeType ) {
					this.handles[ i ] = $( this.handles[ i ] );
					this._on( this.handles[ i ], { "mousedown": that._mouseDown } );
				}

				if ( this.elementIsWrapper &&
						this.originalElement[ 0 ]
							.nodeName
							.match( /^(textarea|input|select|button)$/i ) ) {
					axis = $( this.handles[ i ], this.element );

					padWrapper = /sw|ne|nw|se|n|s/.test( i ) ?
						axis.outerHeight() :
						axis.outerWidth();

					padPos = [ "padding",
						/ne|nw|n/.test( i ) ? "Top" :
						/se|sw|s/.test( i ) ? "Bottom" :
						/^e$/.test( i ) ? "Right" : "Left" ].join( "" );

					target.css( padPos, padWrapper );

					this._proportionallyResize();
				}

				this._handles = this._handles.add( this.handles[ i ] );
			}
		};

		// TODO: make renderAxis a prototype function
		this._renderAxis( this.element );

		this._handles = this._handles.add( this.element.find( ".ui-resizable-handle" ) );
		this._handles.disableSelection();

		this._handles.on( "mouseover", function() {
			if ( !that.resizing ) {
				if ( this.className ) {
					axis = this.className.match( /ui-resizable-(se|sw|ne|nw|n|e|s|w)/i );
				}
				that.axis = axis && axis[ 1 ] ? axis[ 1 ] : "se";
			}
		} );

		if ( o.autoHide ) {
			this._handles.hide();
			this._addClass( "ui-resizable-autohide" );
		}
	},

	_removeHandles: function() {
		this._addedHandles.remove();
	},

	_mouseCapture: function( event ) {
		var i, handle,
			capture = false;

		for ( i in this.handles ) {
			handle = $( this.handles[ i ] )[ 0 ];
			if ( handle === event.target || $.contains( handle, event.target ) ) {
				capture = true;
			}
		}

		return !this.options.disabled && capture;
	},

	_mouseStart: function( event ) {

		var curleft, curtop, cursor,
			o = this.options,
			el = this.element;

		this.resizing = true;

		this._renderProxy();

		curleft = this._num( this.helper.css( "left" ) );
		curtop = this._num( this.helper.css( "top" ) );

		if ( o.containment ) {
			curleft += $( o.containment ).scrollLeft() || 0;
			curtop += $( o.containment ).scrollTop() || 0;
		}

		this.offset = this.helper.offset();
		this.position = { left: curleft, top: curtop };

		this.size = this._helper ? {
				width: this.helper.width(),
				height: this.helper.height()
			} : {
				width: el.width(),
				height: el.height()
			};

		this.originalSize = this._helper ? {
				width: el.outerWidth(),
				height: el.outerHeight()
			} : {
				width: el.width(),
				height: el.height()
			};

		this.sizeDiff = {
			width: el.outerWidth() - el.width(),
			height: el.outerHeight() - el.height()
		};

		this.originalPosition = { left: curleft, top: curtop };
		this.originalMousePosition = { left: event.pageX, top: event.pageY };

		this.aspectRatio = ( typeof o.aspectRatio === "number" ) ?
			o.aspectRatio :
			( ( this.originalSize.width / this.originalSize.height ) || 1 );

		cursor = $( ".ui-resizable-" + this.axis ).css( "cursor" );
		$( "body" ).css( "cursor", cursor === "auto" ? this.axis + "-resize" : cursor );

		this._addClass( "ui-resizable-resizing" );
		this._propagate( "start", event );
		return true;
	},

	_mouseDrag: function( event ) {

		var data, props,
			smp = this.originalMousePosition,
			a = this.axis,
			dx = ( event.pageX - smp.left ) || 0,
			dy = ( event.pageY - smp.top ) || 0,
			trigger = this._change[ a ];

		this._updatePrevProperties();

		if ( !trigger ) {
			return false;
		}

		data = trigger.apply( this, [ event, dx, dy ] );

		this._updateVirtualBoundaries( event.shiftKey );
		if ( this._aspectRatio || event.shiftKey ) {
			data = this._updateRatio( data, event );
		}

		data = this._respectSize( data, event );

		this._updateCache( data );

		this._propagate( "resize", event );

		props = this._applyChanges();

		if ( !this._helper && this._proportionallyResizeElements.length ) {
			this._proportionallyResize();
		}

		if ( !$.isEmptyObject( props ) ) {
			this._updatePrevProperties();
			this._trigger( "resize", event, this.ui() );
			this._applyChanges();
		}

		return false;
	},

	_mouseStop: function( event ) {

		this.resizing = false;
		var pr, ista, soffseth, soffsetw, s, left, top,
			o = this.options, that = this;

		if ( this._helper ) {

			pr = this._proportionallyResizeElements;
			ista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName );
			soffseth = ista && this._hasScroll( pr[ 0 ], "left" ) ? 0 : that.sizeDiff.height;
			soffsetw = ista ? 0 : that.sizeDiff.width;

			s = {
				width: ( that.helper.width()  - soffsetw ),
				height: ( that.helper.height() - soffseth )
			};
			left = ( parseFloat( that.element.css( "left" ) ) +
				( that.position.left - that.originalPosition.left ) ) || null;
			top = ( parseFloat( that.element.css( "top" ) ) +
				( that.position.top - that.originalPosition.top ) ) || null;

			if ( !o.animate ) {
				this.element.css( $.extend( s, { top: top, left: left } ) );
			}

			that.helper.height( that.size.height );
			that.helper.width( that.size.width );

			if ( this._helper && !o.animate ) {
				this._proportionallyResize();
			}
		}

		$( "body" ).css( "cursor", "auto" );

		this._removeClass( "ui-resizable-resizing" );

		this._propagate( "stop", event );

		if ( this._helper ) {
			this.helper.remove();
		}

		return false;

	},

	_updatePrevProperties: function() {
		this.prevPosition = {
			top: this.position.top,
			left: this.position.left
		};
		this.prevSize = {
			width: this.size.width,
			height: this.size.height
		};
	},

	_applyChanges: function() {
		var props = {};

		if ( this.position.top !== this.prevPosition.top ) {
			props.top = this.position.top + "px";
		}
		if ( this.position.left !== this.prevPosition.left ) {
			props.left = this.position.left + "px";
		}

		this.helper.css( props );

		if ( this.size.width !== this.prevSize.width ) {
			props.width = this.size.width + "px";
			this.helper.width( props.width );
		}
		if ( this.size.height !== this.prevSize.height ) {
			props.height = this.size.height + "px";
			this.helper.height( props.height );
		}

		return props;
	},

	_updateVirtualBoundaries: function( forceAspectRatio ) {
		var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
			o = this.options;

		b = {
			minWidth: this._isNumber( o.minWidth ) ? o.minWidth : 0,
			maxWidth: this._isNumber( o.maxWidth ) ? o.maxWidth : Infinity,
			minHeight: this._isNumber( o.minHeight ) ? o.minHeight : 0,
			maxHeight: this._isNumber( o.maxHeight ) ? o.maxHeight : Infinity
		};

		if ( this._aspectRatio || forceAspectRatio ) {
			pMinWidth = b.minHeight * this.aspectRatio;
			pMinHeight = b.minWidth / this.aspectRatio;
			pMaxWidth = b.maxHeight * this.aspectRatio;
			pMaxHeight = b.maxWidth / this.aspectRatio;

			if ( pMinWidth > b.minWidth ) {
				b.minWidth = pMinWidth;
			}
			if ( pMinHeight > b.minHeight ) {
				b.minHeight = pMinHeight;
			}
			if ( pMaxWidth < b.maxWidth ) {
				b.maxWidth = pMaxWidth;
			}
			if ( pMaxHeight < b.maxHeight ) {
				b.maxHeight = pMaxHeight;
			}
		}
		this._vBoundaries = b;
	},

	_updateCache: function( data ) {
		this.offset = this.helper.offset();
		if ( this._isNumber( data.left ) ) {
			this.position.left = data.left;
		}
		if ( this._isNumber( data.top ) ) {
			this.position.top = data.top;
		}
		if ( this._isNumber( data.height ) ) {
			this.size.height = data.height;
		}
		if ( this._isNumber( data.width ) ) {
			this.size.width = data.width;
		}
	},

	_updateRatio: function( data ) {

		var cpos = this.position,
			csize = this.size,
			a = this.axis;

		if ( this._isNumber( data.height ) ) {
			data.width = ( data.height * this.aspectRatio );
		} else if ( this._isNumber( data.width ) ) {
			data.height = ( data.width / this.aspectRatio );
		}

		if ( a === "sw" ) {
			data.left = cpos.left + ( csize.width - data.width );
			data.top = null;
		}
		if ( a === "nw" ) {
			data.top = cpos.top + ( csize.height - data.height );
			data.left = cpos.left + ( csize.width - data.width );
		}

		return data;
	},

	_respectSize: function( data ) {

		var o = this._vBoundaries,
			a = this.axis,
			ismaxw = this._isNumber( data.width ) && o.maxWidth && ( o.maxWidth < data.width ),
			ismaxh = this._isNumber( data.height ) && o.maxHeight && ( o.maxHeight < data.height ),
			isminw = this._isNumber( data.width ) && o.minWidth && ( o.minWidth > data.width ),
			isminh = this._isNumber( data.height ) && o.minHeight && ( o.minHeight > data.height ),
			dw = this.originalPosition.left + this.originalSize.width,
			dh = this.originalPosition.top + this.originalSize.height,
			cw = /sw|nw|w/.test( a ), ch = /nw|ne|n/.test( a );
		if ( isminw ) {
			data.width = o.minWidth;
		}
		if ( isminh ) {
			data.height = o.minHeight;
		}
		if ( ismaxw ) {
			data.width = o.maxWidth;
		}
		if ( ismaxh ) {
			data.height = o.maxHeight;
		}

		if ( isminw && cw ) {
			data.left = dw - o.minWidth;
		}
		if ( ismaxw && cw ) {
			data.left = dw - o.maxWidth;
		}
		if ( isminh && ch ) {
			data.top = dh - o.minHeight;
		}
		if ( ismaxh && ch ) {
			data.top = dh - o.maxHeight;
		}

		// Fixing jump error on top/left - bug #2330
		if ( !data.width && !data.height && !data.left && data.top ) {
			data.top = null;
		} else if ( !data.width && !data.height && !data.top && data.left ) {
			data.left = null;
		}

		return data;
	},

	_getPaddingPlusBorderDimensions: function( element ) {
		var i = 0,
			widths = [],
			borders = [
				element.css( "borderTopWidth" ),
				element.css( "borderRightWidth" ),
				element.css( "borderBottomWidth" ),
				element.css( "borderLeftWidth" )
			],
			paddings = [
				element.css( "paddingTop" ),
				element.css( "paddingRight" ),
				element.css( "paddingBottom" ),
				element.css( "paddingLeft" )
			];

		for ( ; i < 4; i++ ) {
			widths[ i ] = ( parseFloat( borders[ i ] ) || 0 );
			widths[ i ] += ( parseFloat( paddings[ i ] ) || 0 );
		}

		return {
			height: widths[ 0 ] + widths[ 2 ],
			width: widths[ 1 ] + widths[ 3 ]
		};
	},

	_proportionallyResize: function() {

		if ( !this._proportionallyResizeElements.length ) {
			return;
		}

		var prel,
			i = 0,
			element = this.helper || this.element;

		for ( ; i < this._proportionallyResizeElements.length; i++ ) {

			prel = this._proportionallyResizeElements[ i ];

			// TODO: Seems like a bug to cache this.outerDimensions
			// considering that we are in a loop.
			if ( !this.outerDimensions ) {
				this.outerDimensions = this._getPaddingPlusBorderDimensions( prel );
			}

			prel.css( {
				height: ( element.height() - this.outerDimensions.height ) || 0,
				width: ( element.width() - this.outerDimensions.width ) || 0
			} );

		}

	},

	_renderProxy: function() {

		var el = this.element, o = this.options;
		this.elementOffset = el.offset();

		if ( this._helper ) {

			this.helper = this.helper || $( "<div></div>" ).css( { overflow: "hidden" } );

			this._addClass( this.helper, this._helper );
			this.helper.css( {
				width: this.element.outerWidth(),
				height: this.element.outerHeight(),
				position: "absolute",
				left: this.elementOffset.left + "px",
				top: this.elementOffset.top + "px",
				zIndex: ++o.zIndex //TODO: Don't modify option
			} );

			this.helper
				.appendTo( "body" )
				.disableSelection();

		} else {
			this.helper = this.element;
		}

	},

	_change: {
		e: function( event, dx ) {
			return { width: this.originalSize.width + dx };
		},
		w: function( event, dx ) {
			var cs = this.originalSize, sp = this.originalPosition;
			return { left: sp.left + dx, width: cs.width - dx };
		},
		n: function( event, dx, dy ) {
			var cs = this.originalSize, sp = this.originalPosition;
			return { top: sp.top + dy, height: cs.height - dy };
		},
		s: function( event, dx, dy ) {
			return { height: this.originalSize.height + dy };
		},
		se: function( event, dx, dy ) {
			return $.extend( this._change.s.apply( this, arguments ),
				this._change.e.apply( this, [ event, dx, dy ] ) );
		},
		sw: function( event, dx, dy ) {
			return $.extend( this._change.s.apply( this, arguments ),
				this._change.w.apply( this, [ event, dx, dy ] ) );
		},
		ne: function( event, dx, dy ) {
			return $.extend( this._change.n.apply( this, arguments ),
				this._change.e.apply( this, [ event, dx, dy ] ) );
		},
		nw: function( event, dx, dy ) {
			return $.extend( this._change.n.apply( this, arguments ),
				this._change.w.apply( this, [ event, dx, dy ] ) );
		}
	},

	_propagate: function( n, event ) {
		$.ui.plugin.call( this, n, [ event, this.ui() ] );
		if ( n !== "resize" ) {
			this._trigger( n, event, this.ui() );
		}
	},

	plugins: {},

	ui: function() {
		return {
			originalElement: this.originalElement,
			element: this.element,
			helper: this.helper,
			position: this.position,
			size: this.size,
			originalSize: this.originalSize,
			originalPosition: this.originalPosition
		};
	}

} );

/*
 * Resizable Extensions
 */

$.ui.plugin.add( "resizable", "animate", {

	stop: function( event ) {
		var that = $( this ).resizable( "instance" ),
			o = that.options,
			pr = that._proportionallyResizeElements,
			ista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName ),
			soffseth = ista && that._hasScroll( pr[ 0 ], "left" ) ? 0 : that.sizeDiff.height,
			soffsetw = ista ? 0 : that.sizeDiff.width,
			style = {
				width: ( that.size.width - soffsetw ),
				height: ( that.size.height - soffseth )
			},
			left = ( parseFloat( that.element.css( "left" ) ) +
				( that.position.left - that.originalPosition.left ) ) || null,
			top = ( parseFloat( that.element.css( "top" ) ) +
				( that.position.top - that.originalPosition.top ) ) || null;

		that.element.animate(
			$.extend( style, top && left ? { top: top, left: left } : {} ), {
				duration: o.animateDuration,
				easing: o.animateEasing,
				step: function() {

					var data = {
						width: parseFloat( that.element.css( "width" ) ),
						height: parseFloat( that.element.css( "height" ) ),
						top: parseFloat( that.element.css( "top" ) ),
						left: parseFloat( that.element.css( "left" ) )
					};

					if ( pr && pr.length ) {
						$( pr[ 0 ] ).css( { width: data.width, height: data.height } );
					}

					// Propagating resize, and updating values for each animation step
					that._updateCache( data );
					that._propagate( "resize", event );

				}
			}
		);
	}

} );

$.ui.plugin.add( "resizable", "containment", {

	start: function() {
		var element, p, co, ch, cw, width, height,
			that = $( this ).resizable( "instance" ),
			o = that.options,
			el = that.element,
			oc = o.containment,
			ce = ( oc instanceof $ ) ?
				oc.get( 0 ) :
				( /parent/.test( oc ) ) ? el.parent().get( 0 ) : oc;

		if ( !ce ) {
			return;
		}

		that.containerElement = $( ce );

		if ( /document/.test( oc ) || oc === document ) {
			that.containerOffset = {
				left: 0,
				top: 0
			};
			that.containerPosition = {
				left: 0,
				top: 0
			};

			that.parentData = {
				element: $( document ),
				left: 0,
				top: 0,
				width: $( document ).width(),
				height: $( document ).height() || document.body.parentNode.scrollHeight
			};
		} else {
			element = $( ce );
			p = [];
			$( [ "Top", "Right", "Left", "Bottom" ] ).each( function( i, name ) {
				p[ i ] = that._num( element.css( "padding" + name ) );
			} );

			that.containerOffset = element.offset();
			that.containerPosition = element.position();
			that.containerSize = {
				height: ( element.innerHeight() - p[ 3 ] ),
				width: ( element.innerWidth() - p[ 1 ] )
			};

			co = that.containerOffset;
			ch = that.containerSize.height;
			cw = that.containerSize.width;
			width = ( that._hasScroll( ce, "left" ) ? ce.scrollWidth : cw );
			height = ( that._hasScroll( ce ) ? ce.scrollHeight : ch );

			that.parentData = {
				element: ce,
				left: co.left,
				top: co.top,
				width: width,
				height: height
			};
		}
	},

	resize: function( event ) {
		var woset, hoset, isParent, isOffsetRelative,
			that = $( this ).resizable( "instance" ),
			o = that.options,
			co = that.containerOffset,
			cp = that.position,
			pRatio = that._aspectRatio || event.shiftKey,
			cop = {
				top: 0,
				left: 0
			},
			ce = that.containerElement,
			continueResize = true;

		if ( ce[ 0 ] !== document && ( /static/ ).test( ce.css( "position" ) ) ) {
			cop = co;
		}

		if ( cp.left < ( that._helper ? co.left : 0 ) ) {
			that.size.width = that.size.width +
				( that._helper ?
					( that.position.left - co.left ) :
					( that.position.left - cop.left ) );

			if ( pRatio ) {
				that.size.height = that.size.width / that.aspectRatio;
				continueResize = false;
			}
			that.position.left = o.helper ? co.left : 0;
		}

		if ( cp.top < ( that._helper ? co.top : 0 ) ) {
			that.size.height = that.size.height +
				( that._helper ?
					( that.position.top - co.top ) :
					that.position.top );

			if ( pRatio ) {
				that.size.width = that.size.height * that.aspectRatio;
				continueResize = false;
			}
			that.position.top = that._helper ? co.top : 0;
		}

		isParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 );
		isOffsetRelative = /relative|absolute/.test( that.containerElement.css( "position" ) );

		if ( isParent && isOffsetRelative ) {
			that.offset.left = that.parentData.left + that.position.left;
			that.offset.top = that.parentData.top + that.position.top;
		} else {
			that.offset.left = that.element.offset().left;
			that.offset.top = that.element.offset().top;
		}

		woset = Math.abs( that.sizeDiff.width +
			( that._helper ?
				that.offset.left - cop.left :
				( that.offset.left - co.left ) ) );

		hoset = Math.abs( that.sizeDiff.height +
			( that._helper ?
				that.offset.top - cop.top :
				( that.offset.top - co.top ) ) );

		if ( woset + that.size.width >= that.parentData.width ) {
			that.size.width = that.parentData.width - woset;
			if ( pRatio ) {
				that.size.height = that.size.width / that.aspectRatio;
				continueResize = false;
			}
		}

		if ( hoset + that.size.height >= that.parentData.height ) {
			that.size.height = that.parentData.height - hoset;
			if ( pRatio ) {
				that.size.width = that.size.height * that.aspectRatio;
				continueResize = false;
			}
		}

		if ( !continueResize ) {
			that.position.left = that.prevPosition.left;
			that.position.top = that.prevPosition.top;
			that.size.width = that.prevSize.width;
			that.size.height = that.prevSize.height;
		}
	},

	stop: function() {
		var that = $( this ).resizable( "instance" ),
			o = that.options,
			co = that.containerOffset,
			cop = that.containerPosition,
			ce = that.containerElement,
			helper = $( that.helper ),
			ho = helper.offset(),
			w = helper.outerWidth() - that.sizeDiff.width,
			h = helper.outerHeight() - that.sizeDiff.height;

		if ( that._helper && !o.animate && ( /relative/ ).test( ce.css( "position" ) ) ) {
			$( this ).css( {
				left: ho.left - cop.left - co.left,
				width: w,
				height: h
			} );
		}

		if ( that._helper && !o.animate && ( /static/ ).test( ce.css( "position" ) ) ) {
			$( this ).css( {
				left: ho.left - cop.left - co.left,
				width: w,
				height: h
			} );
		}
	}
} );

$.ui.plugin.add( "resizable", "alsoResize", {

	start: function() {
		var that = $( this ).resizable( "instance" ),
			o = that.options;

		$( o.alsoResize ).each( function() {
			var el = $( this );
			el.data( "ui-resizable-alsoresize", {
				width: parseFloat( el.css( "width" ) ), height: parseFloat( el.css( "height" ) ),
				left: parseFloat( el.css( "left" ) ), top: parseFloat( el.css( "top" ) )
			} );
		} );
	},

	resize: function( event, ui ) {
		var that = $( this ).resizable( "instance" ),
			o = that.options,
			os = that.originalSize,
			op = that.originalPosition,
			delta = {
				height: ( that.size.height - os.height ) || 0,
				width: ( that.size.width - os.width ) || 0,
				top: ( that.position.top - op.top ) || 0,
				left: ( that.position.left - op.left ) || 0
			};

			$( o.alsoResize ).each( function() {
				var el = $( this ), start = $( this ).data( "ui-resizable-alsoresize" ), style = {},
					css = el.parents( ui.originalElement[ 0 ] ).length ?
							[ "width", "height" ] :
							[ "width", "height", "top", "left" ];

				$.each( css, function( i, prop ) {
					var sum = ( start[ prop ] || 0 ) + ( delta[ prop ] || 0 );
					if ( sum && sum >= 0 ) {
						style[ prop ] = sum || null;
					}
				} );

				el.css( style );
			} );
	},

	stop: function() {
		$( this ).removeData( "ui-resizable-alsoresize" );
	}
} );

$.ui.plugin.add( "resizable", "ghost", {

	start: function() {

		var that = $( this ).resizable( "instance" ), cs = that.size;

		that.ghost = that.originalElement.clone();
		that.ghost.css( {
			opacity: 0.25,
			display: "block",
			position: "relative",
			height: cs.height,
			width: cs.width,
			margin: 0,
			left: 0,
			top: 0
		} );

		that._addClass( that.ghost, "ui-resizable-ghost" );

		// DEPRECATED
		// TODO: remove after 1.12
		if ( $.uiBackCompat !== false && typeof that.options.ghost === "string" ) {

			// Ghost option
			that.ghost.addClass( this.options.ghost );
		}

		that.ghost.appendTo( that.helper );

	},

	resize: function() {
		var that = $( this ).resizable( "instance" );
		if ( that.ghost ) {
			that.ghost.css( {
				position: "relative",
				height: that.size.height,
				width: that.size.width
			} );
		}
	},

	stop: function() {
		var that = $( this ).resizable( "instance" );
		if ( that.ghost && that.helper ) {
			that.helper.get( 0 ).removeChild( that.ghost.get( 0 ) );
		}
	}

} );

$.ui.plugin.add( "resizable", "grid", {

	resize: function() {
		var outerDimensions,
			that = $( this ).resizable( "instance" ),
			o = that.options,
			cs = that.size,
			os = that.originalSize,
			op = that.originalPosition,
			a = that.axis,
			grid = typeof o.grid === "number" ? [ o.grid, o.grid ] : o.grid,
			gridX = ( grid[ 0 ] || 1 ),
			gridY = ( grid[ 1 ] || 1 ),
			ox = Math.round( ( cs.width - os.width ) / gridX ) * gridX,
			oy = Math.round( ( cs.height - os.height ) / gridY ) * gridY,
			newWidth = os.width + ox,
			newHeight = os.height + oy,
			isMaxWidth = o.maxWidth && ( o.maxWidth < newWidth ),
			isMaxHeight = o.maxHeight && ( o.maxHeight < newHeight ),
			isMinWidth = o.minWidth && ( o.minWidth > newWidth ),
			isMinHeight = o.minHeight && ( o.minHeight > newHeight );

		o.grid = grid;

		if ( isMinWidth ) {
			newWidth += gridX;
		}
		if ( isMinHeight ) {
			newHeight += gridY;
		}
		if ( isMaxWidth ) {
			newWidth -= gridX;
		}
		if ( isMaxHeight ) {
			newHeight -= gridY;
		}

		if ( /^(se|s|e)$/.test( a ) ) {
			that.size.width = newWidth;
			that.size.height = newHeight;
		} else if ( /^(ne)$/.test( a ) ) {
			that.size.width = newWidth;
			that.size.height = newHeight;
			that.position.top = op.top - oy;
		} else if ( /^(sw)$/.test( a ) ) {
			that.size.width = newWidth;
			that.size.height = newHeight;
			that.position.left = op.left - ox;
		} else {
			if ( newHeight - gridY <= 0 || newWidth - gridX <= 0 ) {
				outerDimensions = that._getPaddingPlusBorderDimensions( this );
			}

			if ( newHeight - gridY > 0 ) {
				that.size.height = newHeight;
				that.position.top = op.top - oy;
			} else {
				newHeight = gridY - outerDimensions.height;
				that.size.height = newHeight;
				that.position.top = op.top + os.height - newHeight;
			}
			if ( newWidth - gridX > 0 ) {
				that.size.width = newWidth;
				that.position.left = op.left - ox;
			} else {
				newWidth = gridX - outerDimensions.width;
				that.size.width = newWidth;
				that.position.left = op.left + os.width - newWidth;
			}
		}
	}

} );

return $.ui.resizable;

} );
                                                                                                                                                                                                                                      jquery/ui/resizable.min.js                                                                          0000644                 00000044610 15212564043 0011607 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Resizable 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./mouse","../disable-selection","../plugin","../version","../widget"],t):t(jQuery)}(function(z){"use strict";return z.widget("ui.resizable",z.ui.mouse,{version:"1.13.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(t,i){if("hidden"===z(t).css("overflow"))return!1;var i=i&&"left"===i?"scrollLeft":"scrollTop",e=!1;if(0<t[i])return!0;try{t[i]=1,e=0<t[i],t[i]=0}catch(t){}return e},_create:function(){var t,i=this.options,e=this;this._addClass("ui-resizable"),z.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(z("<div class='ui-wrapper'></div>").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),i.autoHide&&z(this.element).on("mouseenter",function(){i.disabled||(e._removeClass("ui-resizable-autohide"),e._handles.show())}).on("mouseleave",function(){i.disabled||e.resizing||(e._addClass("ui-resizable-autohide"),e._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){z(t).removeData("resizable").removeData("ui-resizable").off(".resizable")}var i;return this.elementIsWrapper&&(t(this.element),i=this.element,this.originalElement.css({position:i.css("position"),width:i.outerWidth(),height:i.outerHeight(),top:i.css("top"),left:i.css("left")}).insertAfter(i),i.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,i){switch(this._super(t,i),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!i}},_setupHandles:function(){var t,i,e,s,h,n=this.options,o=this;if(this.handles=n.handles||(z(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=z(),this._addedHandles=z(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;i<e.length;i++)s="ui-resizable-"+(t=String.prototype.trim.call(e[i])),h=z("<div>"),this._addClass(h,"ui-resizable-handle "+s),h.css({zIndex:n.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(h),this._addedHandles=this._addedHandles.add(h));this._renderAxis=function(t){var i,e,s;for(i in t=t||this.element,this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=z(this.handles[i]),this._on(this.handles[i],{mousedown:o._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=z(this.handles[i],this.element),s=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),e=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(e,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){o.resizing||(this.className&&(h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=h&&h[1]?h[1]:"se")}),n.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var i,e,s=!1;for(i in this.handles)(e=z(this.handles[i])[0])!==t.target&&!z.contains(e,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var i,e,s=this.options,h=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),e=this._num(this.helper.css("top")),s.containment&&(i+=z(s.containment).scrollLeft()||0,e+=z(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:e},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalPosition={left:i,top:e},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,h=z(".ui-resizable-"+this.axis).css("cursor"),z("body").css("cursor","auto"===h?this.axis+"-resize":h),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var i=this.originalMousePosition,e=this.axis,s=t.pageX-i.left||0,i=t.pageY-i.top||0,e=this._change[e];return this._updatePrevProperties(),e&&(e=e.apply(this,[t,s,i]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),z.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var i,e,s,h=this.options,n=this;return this._helper&&(e=(i=(e=this._proportionallyResizeElements).length&&/textarea/i.test(e[0].nodeName))&&this._hasScroll(e[0],"left")?0:n.sizeDiff.height,i=i?0:n.sizeDiff.width,i={width:n.helper.width()-i,height:n.helper.height()-e},e=parseFloat(n.element.css("left"))+(n.position.left-n.originalPosition.left)||null,s=parseFloat(n.element.css("top"))+(n.position.top-n.originalPosition.top)||null,h.animate||this.element.css(z.extend(i,{top:s,left:e})),n.helper.height(n.size.height),n.helper.width(n.size.width),this._helper)&&!h.animate&&this._proportionallyResize(),z("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.helper.css(t),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px",this.helper.width(t.width)),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px",this.helper.height(t.height)),t},_updateVirtualBoundaries:function(t){var i,e,s,h=this.options,h={minWidth:this._isNumber(h.minWidth)?h.minWidth:0,maxWidth:this._isNumber(h.maxWidth)?h.maxWidth:1/0,minHeight:this._isNumber(h.minHeight)?h.minHeight:0,maxHeight:this._isNumber(h.maxHeight)?h.maxHeight:1/0};(this._aspectRatio||t)&&(t=h.minHeight*this.aspectRatio,e=h.minWidth/this.aspectRatio,i=h.maxHeight*this.aspectRatio,s=h.maxWidth/this.aspectRatio,h.minWidth<t&&(h.minWidth=t),h.minHeight<e&&(h.minHeight=e),i<h.maxWidth&&(h.maxWidth=i),s<h.maxHeight)&&(h.maxHeight=s),this._vBoundaries=h},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var i=this.position,e=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=i.left+(e.width-t.width),t.top=null),"nw"===s&&(t.top=i.top+(e.height-t.height),t.left=i.left+(e.width-t.width)),t},_respectSize:function(t){var i=this._vBoundaries,e=this.axis,s=this._isNumber(t.width)&&i.maxWidth&&i.maxWidth<t.width,h=this._isNumber(t.height)&&i.maxHeight&&i.maxHeight<t.height,n=this._isNumber(t.width)&&i.minWidth&&i.minWidth>t.width,o=this._isNumber(t.height)&&i.minHeight&&i.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,r=/sw|nw|w/.test(e),e=/nw|ne|n/.test(e);return n&&(t.width=i.minWidth),o&&(t.height=i.minHeight),s&&(t.width=i.maxWidth),h&&(t.height=i.maxHeight),n&&r&&(t.left=a-i.minWidth),s&&r&&(t.left=a-i.maxWidth),o&&e&&(t.top=l-i.minHeight),h&&e&&(t.top=l-i.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var i=0,e=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],h=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];i<4;i++)e[i]=parseFloat(s[i])||0,e[i]+=parseFloat(h[i])||0;return{height:e[0]+e[2],width:e[1]+e[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,i=0,e=this.helper||this.element;i<this._proportionallyResizeElements.length;i++)t=this._proportionallyResizeElements[i],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:e.height()-this.outerDimensions.height||0,width:e.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||z("<div></div>").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,i){return{width:this.originalSize.width+i}},w:function(t,i){var e=this.originalSize;return{left:this.originalPosition.left+i,width:e.width-i}},n:function(t,i,e){var s=this.originalSize;return{top:this.originalPosition.top+e,height:s.height-e}},s:function(t,i,e){return{height:this.originalSize.height+e}},se:function(t,i,e){return z.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,e]))},sw:function(t,i,e){return z.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,e]))},ne:function(t,i,e){return z.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,e]))},nw:function(t,i,e){return z.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,e]))}},_propagate:function(t,i){z.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),z.ui.plugin.add("resizable","animate",{stop:function(i){var e=z(this).resizable("instance"),t=e.options,s=e._proportionallyResizeElements,h=s.length&&/textarea/i.test(s[0].nodeName),n=h&&e._hasScroll(s[0],"left")?0:e.sizeDiff.height,h=h?0:e.sizeDiff.width,h={width:e.size.width-h,height:e.size.height-n},n=parseFloat(e.element.css("left"))+(e.position.left-e.originalPosition.left)||null,o=parseFloat(e.element.css("top"))+(e.position.top-e.originalPosition.top)||null;e.element.animate(z.extend(h,o&&n?{top:o,left:n}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(e.element.css("width")),height:parseFloat(e.element.css("height")),top:parseFloat(e.element.css("top")),left:parseFloat(e.element.css("left"))};s&&s.length&&z(s[0]).css({width:t.width,height:t.height}),e._updateCache(t),e._propagate("resize",i)}})}}),z.ui.plugin.add("resizable","containment",{start:function(){var e,s,t,i,h=z(this).resizable("instance"),n=h.options,o=h.element,n=n.containment,o=n instanceof z?n.get(0):/parent/.test(n)?o.parent().get(0):n;o&&(h.containerElement=z(o),/document/.test(n)||n===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:z(document),left:0,top:0,width:z(document).width(),height:z(document).height()||document.body.parentNode.scrollHeight}):(e=z(o),s=[],z(["Top","Right","Left","Bottom"]).each(function(t,i){s[t]=h._num(e.css("padding"+i))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-s[3],width:e.innerWidth()-s[1]},n=h.containerOffset,i=h.containerSize.height,t=h.containerSize.width,t=h._hasScroll(o,"left")?o.scrollWidth:t,i=h._hasScroll(o)?o.scrollHeight:i,h.parentData={element:o,left:n.left,top:n.top,width:t,height:i}))},resize:function(t){var i=z(this).resizable("instance"),e=i.options,s=i.containerOffset,h=i.position,t=i._aspectRatio||t.shiftKey,n={top:0,left:0},o=i.containerElement,a=!0;o[0]!==document&&/static/.test(o.css("position"))&&(n=s),h.left<(i._helper?s.left:0)&&(i.size.width=i.size.width+(i._helper?i.position.left-s.left:i.position.left-n.left),t&&(i.size.height=i.size.width/i.aspectRatio,a=!1),i.position.left=e.helper?s.left:0),h.top<(i._helper?s.top:0)&&(i.size.height=i.size.height+(i._helper?i.position.top-s.top:i.position.top),t&&(i.size.width=i.size.height*i.aspectRatio,a=!1),i.position.top=i._helper?s.top:0),o=i.containerElement.get(0)===i.element.parent().get(0),e=/relative|absolute/.test(i.containerElement.css("position")),o&&e?(i.offset.left=i.parentData.left+i.position.left,i.offset.top=i.parentData.top+i.position.top):(i.offset.left=i.element.offset().left,i.offset.top=i.element.offset().top),h=Math.abs(i.sizeDiff.width+(i._helper?i.offset.left-n.left:i.offset.left-s.left)),o=Math.abs(i.sizeDiff.height+(i._helper?i.offset.top-n.top:i.offset.top-s.top)),h+i.size.width>=i.parentData.width&&(i.size.width=i.parentData.width-h,t)&&(i.size.height=i.size.width/i.aspectRatio,a=!1),o+i.size.height>=i.parentData.height&&(i.size.height=i.parentData.height-o,t)&&(i.size.width=i.size.height*i.aspectRatio,a=!1),a||(i.position.left=i.prevPosition.left,i.position.top=i.prevPosition.top,i.size.width=i.prevSize.width,i.size.height=i.prevSize.height)},stop:function(){var t=z(this).resizable("instance"),i=t.options,e=t.containerOffset,s=t.containerPosition,h=t.containerElement,n=z(t.helper),o=n.offset(),a=n.outerWidth()-t.sizeDiff.width,n=n.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(h.css("position"))&&z(this).css({left:o.left-s.left-e.left,width:a,height:n}),t._helper&&!i.animate&&/static/.test(h.css("position"))&&z(this).css({left:o.left-s.left-e.left,width:a,height:n})}}),z.ui.plugin.add("resizable","alsoResize",{start:function(){var t=z(this).resizable("instance").options;z(t.alsoResize).each(function(){var t=z(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.css("width")),height:parseFloat(t.css("height")),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,e){var i=z(this).resizable("instance"),s=i.options,h=i.originalSize,n=i.originalPosition,o={height:i.size.height-h.height||0,width:i.size.width-h.width||0,top:i.position.top-n.top||0,left:i.position.left-n.left||0};z(s.alsoResize).each(function(){var t=z(this),s=z(this).data("ui-resizable-alsoresize"),h={},i=t.parents(e.originalElement[0]).length?["width","height"]:["width","height","top","left"];z.each(i,function(t,i){var e=(s[i]||0)+(o[i]||0);e&&0<=e&&(h[i]=e||null)}),t.css(h)})},stop:function(){z(this).removeData("ui-resizable-alsoresize")}}),z.ui.plugin.add("resizable","ghost",{start:function(){var t=z(this).resizable("instance"),i=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==z.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=z(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=z(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),z.ui.plugin.add("resizable","grid",{resize:function(){var t,i=z(this).resizable("instance"),e=i.options,s=i.size,h=i.originalSize,n=i.originalPosition,o=i.axis,a="number"==typeof e.grid?[e.grid,e.grid]:e.grid,l=a[0]||1,r=a[1]||1,p=Math.round((s.width-h.width)/l)*l,s=Math.round((s.height-h.height)/r)*r,d=h.width+p,g=h.height+s,u=e.maxWidth&&e.maxWidth<d,c=e.maxHeight&&e.maxHeight<g,f=e.minWidth&&e.minWidth>d,m=e.minHeight&&e.minHeight>g;e.grid=a,f&&(d+=l),m&&(g+=r),u&&(d-=l),c&&(g-=r),/^(se|s|e)$/.test(o)?(i.size.width=d,i.size.height=g):/^(ne)$/.test(o)?(i.size.width=d,i.size.height=g,i.position.top=n.top-s):/^(sw)$/.test(o)?(i.size.width=d,i.size.height=g,i.position.left=n.left-p):((g-r<=0||d-l<=0)&&(t=i._getPaddingPlusBorderDimensions(this)),0<g-r?(i.size.height=g,i.position.top=n.top-s):(g=r-t.height,i.size.height=g,i.position.top=n.top+h.height-g),0<d-l?(i.size.width=d,i.position.left=n.left-p):(d=l-t.width,i.size.width=d,i.position.left=n.left+h.width-d))}}),z.ui.resizable});                                                                                                                        jquery/ui/selectable.js                                                                             0000644                 00000017701 15212564043 0011151 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Selectable 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Selectable
//>>group: Interactions
//>>description: Allows groups of elements to be selected with the mouse.
//>>docs: https://api.jqueryui.com/selectable/
//>>demos: https://jqueryui.com/selectable/
//>>css.structure: ../../themes/base/selectable.css

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"./mouse",
			"../version",
			"../widget"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.widget( "ui.selectable", $.ui.mouse, {
	version: "1.13.3",
	options: {
		appendTo: "body",
		autoRefresh: true,
		distance: 0,
		filter: "*",
		tolerance: "touch",

		// Callbacks
		selected: null,
		selecting: null,
		start: null,
		stop: null,
		unselected: null,
		unselecting: null
	},
	_create: function() {
		var that = this;

		this._addClass( "ui-selectable" );

		this.dragged = false;

		// Cache selectee children based on filter
		this.refresh = function() {
			that.elementPos = $( that.element[ 0 ] ).offset();
			that.selectees = $( that.options.filter, that.element[ 0 ] );
			that._addClass( that.selectees, "ui-selectee" );
			that.selectees.each( function() {
				var $this = $( this ),
					selecteeOffset = $this.offset(),
					pos = {
						left: selecteeOffset.left - that.elementPos.left,
						top: selecteeOffset.top - that.elementPos.top
					};
				$.data( this, "selectable-item", {
					element: this,
					$element: $this,
					left: pos.left,
					top: pos.top,
					right: pos.left + $this.outerWidth(),
					bottom: pos.top + $this.outerHeight(),
					startselected: false,
					selected: $this.hasClass( "ui-selected" ),
					selecting: $this.hasClass( "ui-selecting" ),
					unselecting: $this.hasClass( "ui-unselecting" )
				} );
			} );
		};
		this.refresh();

		this._mouseInit();

		this.helper = $( "<div>" );
		this._addClass( this.helper, "ui-selectable-helper" );
	},

	_destroy: function() {
		this.selectees.removeData( "selectable-item" );
		this._mouseDestroy();
	},

	_mouseStart: function( event ) {
		var that = this,
			options = this.options;

		this.opos = [ event.pageX, event.pageY ];
		this.elementPos = $( this.element[ 0 ] ).offset();

		if ( this.options.disabled ) {
			return;
		}

		this.selectees = $( options.filter, this.element[ 0 ] );

		this._trigger( "start", event );

		$( options.appendTo ).append( this.helper );

		// position helper (lasso)
		this.helper.css( {
			"left": event.pageX,
			"top": event.pageY,
			"width": 0,
			"height": 0
		} );

		if ( options.autoRefresh ) {
			this.refresh();
		}

		this.selectees.filter( ".ui-selected" ).each( function() {
			var selectee = $.data( this, "selectable-item" );
			selectee.startselected = true;
			if ( !event.metaKey && !event.ctrlKey ) {
				that._removeClass( selectee.$element, "ui-selected" );
				selectee.selected = false;
				that._addClass( selectee.$element, "ui-unselecting" );
				selectee.unselecting = true;

				// selectable UNSELECTING callback
				that._trigger( "unselecting", event, {
					unselecting: selectee.element
				} );
			}
		} );

		$( event.target ).parents().addBack().each( function() {
			var doSelect,
				selectee = $.data( this, "selectable-item" );
			if ( selectee ) {
				doSelect = ( !event.metaKey && !event.ctrlKey ) ||
					!selectee.$element.hasClass( "ui-selected" );
				that._removeClass( selectee.$element, doSelect ? "ui-unselecting" : "ui-selected" )
					._addClass( selectee.$element, doSelect ? "ui-selecting" : "ui-unselecting" );
				selectee.unselecting = !doSelect;
				selectee.selecting = doSelect;
				selectee.selected = doSelect;

				// selectable (UN)SELECTING callback
				if ( doSelect ) {
					that._trigger( "selecting", event, {
						selecting: selectee.element
					} );
				} else {
					that._trigger( "unselecting", event, {
						unselecting: selectee.element
					} );
				}
				return false;
			}
		} );

	},

	_mouseDrag: function( event ) {

		this.dragged = true;

		if ( this.options.disabled ) {
			return;
		}

		var tmp,
			that = this,
			options = this.options,
			x1 = this.opos[ 0 ],
			y1 = this.opos[ 1 ],
			x2 = event.pageX,
			y2 = event.pageY;

		if ( x1 > x2 ) {
			tmp = x2; x2 = x1; x1 = tmp;
		}
		if ( y1 > y2 ) {
			tmp = y2; y2 = y1; y1 = tmp;
		}
		this.helper.css( { left: x1, top: y1, width: x2 - x1, height: y2 - y1 } );

		this.selectees.each( function() {
			var selectee = $.data( this, "selectable-item" ),
				hit = false,
				offset = {};

			//prevent helper from being selected if appendTo: selectable
			if ( !selectee || selectee.element === that.element[ 0 ] ) {
				return;
			}

			offset.left   = selectee.left   + that.elementPos.left;
			offset.right  = selectee.right  + that.elementPos.left;
			offset.top    = selectee.top    + that.elementPos.top;
			offset.bottom = selectee.bottom + that.elementPos.top;

			if ( options.tolerance === "touch" ) {
				hit = ( !( offset.left > x2 || offset.right < x1 || offset.top > y2 ||
                    offset.bottom < y1 ) );
			} else if ( options.tolerance === "fit" ) {
				hit = ( offset.left > x1 && offset.right < x2 && offset.top > y1 &&
                    offset.bottom < y2 );
			}

			if ( hit ) {

				// SELECT
				if ( selectee.selected ) {
					that._removeClass( selectee.$element, "ui-selected" );
					selectee.selected = false;
				}
				if ( selectee.unselecting ) {
					that._removeClass( selectee.$element, "ui-unselecting" );
					selectee.unselecting = false;
				}
				if ( !selectee.selecting ) {
					that._addClass( selectee.$element, "ui-selecting" );
					selectee.selecting = true;

					// selectable SELECTING callback
					that._trigger( "selecting", event, {
						selecting: selectee.element
					} );
				}
			} else {

				// UNSELECT
				if ( selectee.selecting ) {
					if ( ( event.metaKey || event.ctrlKey ) && selectee.startselected ) {
						that._removeClass( selectee.$element, "ui-selecting" );
						selectee.selecting = false;
						that._addClass( selectee.$element, "ui-selected" );
						selectee.selected = true;
					} else {
						that._removeClass( selectee.$element, "ui-selecting" );
						selectee.selecting = false;
						if ( selectee.startselected ) {
							that._addClass( selectee.$element, "ui-unselecting" );
							selectee.unselecting = true;
						}

						// selectable UNSELECTING callback
						that._trigger( "unselecting", event, {
							unselecting: selectee.element
						} );
					}
				}
				if ( selectee.selected ) {
					if ( !event.metaKey && !event.ctrlKey && !selectee.startselected ) {
						that._removeClass( selectee.$element, "ui-selected" );
						selectee.selected = false;

						that._addClass( selectee.$element, "ui-unselecting" );
						selectee.unselecting = true;

						// selectable UNSELECTING callback
						that._trigger( "unselecting", event, {
							unselecting: selectee.element
						} );
					}
				}
			}
		} );

		return false;
	},

	_mouseStop: function( event ) {
		var that = this;

		this.dragged = false;

		$( ".ui-unselecting", this.element[ 0 ] ).each( function() {
			var selectee = $.data( this, "selectable-item" );
			that._removeClass( selectee.$element, "ui-unselecting" );
			selectee.unselecting = false;
			selectee.startselected = false;
			that._trigger( "unselected", event, {
				unselected: selectee.element
			} );
		} );
		$( ".ui-selecting", this.element[ 0 ] ).each( function() {
			var selectee = $.data( this, "selectable-item" );
			that._removeClass( selectee.$element, "ui-selecting" )
				._addClass( selectee.$element, "ui-selected" );
			selectee.selecting = false;
			selectee.selected = true;
			selectee.startselected = true;
			that._trigger( "selected", event, {
				selected: selectee.element
			} );
		} );
		this._trigger( "stop", event );

		this.helper.remove();

		return false;
	}

} );

} );
                                                               jquery/ui/selectable.min.js                                                                         0000644                 00000010632 15212564043 0011727 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Selectable 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./mouse","../version","../widget"],e):e(jQuery)}(function(u){"use strict";return u.widget("ui.selectable",u.ui.mouse,{version:"1.13.3",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var s=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){s.elementPos=u(s.element[0]).offset(),s.selectees=u(s.options.filter,s.element[0]),s._addClass(s.selectees,"ui-selectee"),s.selectees.each(function(){var e=u(this),t=e.offset(),t={left:t.left-s.elementPos.left,top:t.top-s.elementPos.top};u.data(this,"selectable-item",{element:this,$element:e,left:t.left,top:t.top,right:t.left+e.outerWidth(),bottom:t.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=u("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(s){var l=this,e=this.options;this.opos=[s.pageX,s.pageY],this.elementPos=u(this.element[0]).offset(),this.options.disabled||(this.selectees=u(e.filter,this.element[0]),this._trigger("start",s),u(e.appendTo).append(this.helper),this.helper.css({left:s.pageX,top:s.pageY,width:0,height:0}),e.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var e=u.data(this,"selectable-item");e.startselected=!0,s.metaKey||s.ctrlKey||(l._removeClass(e.$element,"ui-selected"),e.selected=!1,l._addClass(e.$element,"ui-unselecting"),e.unselecting=!0,l._trigger("unselecting",s,{unselecting:e.element}))}),u(s.target).parents().addBack().each(function(){var e,t=u.data(this,"selectable-item");if(t)return e=!s.metaKey&&!s.ctrlKey||!t.$element.hasClass("ui-selected"),l._removeClass(t.$element,e?"ui-unselecting":"ui-selected")._addClass(t.$element,e?"ui-selecting":"ui-unselecting"),t.unselecting=!e,t.selecting=e,(t.selected=e)?l._trigger("selecting",s,{selecting:t.element}):l._trigger("unselecting",s,{unselecting:t.element}),!1}))},_mouseDrag:function(l){var e,i,n,c,a,r,o;if(this.dragged=!0,!this.options.disabled)return n=(i=this).options,c=this.opos[0],a=this.opos[1],(r=l.pageX)<c&&(e=r,r=c,c=e),(o=l.pageY)<a&&(e=o,o=a,a=e),this.helper.css({left:c,top:a,width:r-c,height:o-a}),this.selectees.each(function(){var e=u.data(this,"selectable-item"),t=!1,s={};e&&e.element!==i.element[0]&&(s.left=e.left+i.elementPos.left,s.right=e.right+i.elementPos.left,s.top=e.top+i.elementPos.top,s.bottom=e.bottom+i.elementPos.top,"touch"===n.tolerance?t=!(r<s.left||s.right<c||o<s.top||s.bottom<a):"fit"===n.tolerance&&(t=c<s.left&&s.right<r&&a<s.top&&s.bottom<o),t?(e.selected&&(i._removeClass(e.$element,"ui-selected"),e.selected=!1),e.unselecting&&(i._removeClass(e.$element,"ui-unselecting"),e.unselecting=!1),e.selecting||(i._addClass(e.$element,"ui-selecting"),e.selecting=!0,i._trigger("selecting",l,{selecting:e.element}))):(e.selecting&&((l.metaKey||l.ctrlKey)&&e.startselected?(i._removeClass(e.$element,"ui-selecting"),e.selecting=!1,i._addClass(e.$element,"ui-selected"),e.selected=!0):(i._removeClass(e.$element,"ui-selecting"),e.selecting=!1,e.startselected&&(i._addClass(e.$element,"ui-unselecting"),e.unselecting=!0),i._trigger("unselecting",l,{unselecting:e.element}))),!e.selected||l.metaKey||l.ctrlKey||e.startselected||(i._removeClass(e.$element,"ui-selected"),e.selected=!1,i._addClass(e.$element,"ui-unselecting"),e.unselecting=!0,i._trigger("unselecting",l,{unselecting:e.element}))))}),!1},_mouseStop:function(t){var s=this;return this.dragged=!1,u(".ui-unselecting",this.element[0]).each(function(){var e=u.data(this,"selectable-item");s._removeClass(e.$element,"ui-unselecting"),e.unselecting=!1,e.startselected=!1,s._trigger("unselected",t,{unselected:e.element})}),u(".ui-selecting",this.element[0]).each(function(){var e=u.data(this,"selectable-item");s._removeClass(e.$element,"ui-selecting")._addClass(e.$element,"ui-selected"),e.selecting=!1,e.selected=!0,e.startselected=!0,s._trigger("selected",t,{selected:e.element})}),this._trigger("stop",t),this.helper.remove(),!1}})});                                                                                                      jquery/ui/selectmenu.js                                                                             0000644                 00000037732 15212564043 0011220 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Selectmenu 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Selectmenu
//>>group: Widgets
/* eslint-disable max-len */
//>>description: Duplicates and extends the functionality of a native HTML select element, allowing it to be customizable in behavior and appearance far beyond the limitations of a native select.
/* eslint-enable max-len */
//>>docs: https://api.jqueryui.com/selectmenu/
//>>demos: https://jqueryui.com/selectmenu/
//>>css.structure: ../../themes/base/core.css
//>>css.structure: ../../themes/base/selectmenu.css, ../../themes/base/button.css
//>>css.theme: ../../themes/base/theme.css

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"./menu",
			"../form-reset-mixin",
			"../keycode",
			"../labels",
			"../position",
			"../unique-id",
			"../version",
			"../widget"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.widget( "ui.selectmenu", [ $.ui.formResetMixin, {
	version: "1.13.3",
	defaultElement: "<select>",
	options: {
		appendTo: null,
		classes: {
			"ui-selectmenu-button-open": "ui-corner-top",
			"ui-selectmenu-button-closed": "ui-corner-all"
		},
		disabled: null,
		icons: {
			button: "ui-icon-triangle-1-s"
		},
		position: {
			my: "left top",
			at: "left bottom",
			collision: "none"
		},
		width: false,

		// Callbacks
		change: null,
		close: null,
		focus: null,
		open: null,
		select: null
	},

	_create: function() {
		var selectmenuId = this.element.uniqueId().attr( "id" );
		this.ids = {
			element: selectmenuId,
			button: selectmenuId + "-button",
			menu: selectmenuId + "-menu"
		};

		this._drawButton();
		this._drawMenu();
		this._bindFormResetHandler();

		this._rendered = false;
		this.menuItems = $();
	},

	_drawButton: function() {
		var icon,
			that = this,
			item = this._parseOption(
				this.element.find( "option:selected" ),
				this.element[ 0 ].selectedIndex
			);

		// Associate existing label with the new button
		this.labels = this.element.labels().attr( "for", this.ids.button );
		this._on( this.labels, {
			click: function( event ) {
				this.button.trigger( "focus" );
				event.preventDefault();
			}
		} );

		// Hide original select element
		this.element.hide();

		// Create button
		this.button = $( "<span>", {
			tabindex: this.options.disabled ? -1 : 0,
			id: this.ids.button,
			role: "combobox",
			"aria-expanded": "false",
			"aria-autocomplete": "list",
			"aria-owns": this.ids.menu,
			"aria-haspopup": "true",
			title: this.element.attr( "title" )
		} )
			.insertAfter( this.element );

		this._addClass( this.button, "ui-selectmenu-button ui-selectmenu-button-closed",
			"ui-button ui-widget" );

		icon = $( "<span>" ).appendTo( this.button );
		this._addClass( icon, "ui-selectmenu-icon", "ui-icon " + this.options.icons.button );
		this.buttonItem = this._renderButtonItem( item )
			.appendTo( this.button );

		if ( this.options.width !== false ) {
			this._resizeButton();
		}

		this._on( this.button, this._buttonEvents );
		this.button.one( "focusin", function() {

			// Delay rendering the menu items until the button receives focus.
			// The menu may have already been rendered via a programmatic open.
			if ( !that._rendered ) {
				that._refreshMenu();
			}
		} );
	},

	_drawMenu: function() {
		var that = this;

		// Create menu
		this.menu = $( "<ul>", {
			"aria-hidden": "true",
			"aria-labelledby": this.ids.button,
			id: this.ids.menu
		} );

		// Wrap menu
		this.menuWrap = $( "<div>" ).append( this.menu );
		this._addClass( this.menuWrap, "ui-selectmenu-menu", "ui-front" );
		this.menuWrap.appendTo( this._appendTo() );

		// Initialize menu widget
		this.menuInstance = this.menu
			.menu( {
				classes: {
					"ui-menu": "ui-corner-bottom"
				},
				role: "listbox",
				select: function( event, ui ) {
					event.preventDefault();

					// Support: IE8
					// If the item was selected via a click, the text selection
					// will be destroyed in IE
					that._setSelection();

					that._select( ui.item.data( "ui-selectmenu-item" ), event );
				},
				focus: function( event, ui ) {
					var item = ui.item.data( "ui-selectmenu-item" );

					// Prevent inital focus from firing and check if its a newly focused item
					if ( that.focusIndex != null && item.index !== that.focusIndex ) {
						that._trigger( "focus", event, { item: item } );
						if ( !that.isOpen ) {
							that._select( item, event );
						}
					}
					that.focusIndex = item.index;

					that.button.attr( "aria-activedescendant",
						that.menuItems.eq( item.index ).attr( "id" ) );
				}
			} )
			.menu( "instance" );

		// Don't close the menu on mouseleave
		this.menuInstance._off( this.menu, "mouseleave" );

		// Cancel the menu's collapseAll on document click
		this.menuInstance._closeOnDocumentClick = function() {
			return false;
		};

		// Selects often contain empty items, but never contain dividers
		this.menuInstance._isDivider = function() {
			return false;
		};
	},

	refresh: function() {
		this._refreshMenu();
		this.buttonItem.replaceWith(
			this.buttonItem = this._renderButtonItem(

				// Fall back to an empty object in case there are no options
				this._getSelectedItem().data( "ui-selectmenu-item" ) || {}
			)
		);
		if ( this.options.width === null ) {
			this._resizeButton();
		}
	},

	_refreshMenu: function() {
		var item,
			options = this.element.find( "option" );

		this.menu.empty();

		this._parseOptions( options );
		this._renderMenu( this.menu, this.items );

		this.menuInstance.refresh();
		this.menuItems = this.menu.find( "li" )
			.not( ".ui-selectmenu-optgroup" )
				.find( ".ui-menu-item-wrapper" );

		this._rendered = true;

		if ( !options.length ) {
			return;
		}

		item = this._getSelectedItem();

		// Update the menu to have the correct item focused
		this.menuInstance.focus( null, item );
		this._setAria( item.data( "ui-selectmenu-item" ) );

		// Set disabled state
		this._setOption( "disabled", this.element.prop( "disabled" ) );
	},

	open: function( event ) {
		if ( this.options.disabled ) {
			return;
		}

		// If this is the first time the menu is being opened, render the items
		if ( !this._rendered ) {
			this._refreshMenu();
		} else {

			// Menu clears focus on close, reset focus to selected item
			this._removeClass( this.menu.find( ".ui-state-active" ), null, "ui-state-active" );
			this.menuInstance.focus( null, this._getSelectedItem() );
		}

		// If there are no options, don't open the menu
		if ( !this.menuItems.length ) {
			return;
		}

		this.isOpen = true;
		this._toggleAttr();
		this._resizeMenu();
		this._position();

		this._on( this.document, this._documentClick );

		this._trigger( "open", event );
	},

	_position: function() {
		this.menuWrap.position( $.extend( { of: this.button }, this.options.position ) );
	},

	close: function( event ) {
		if ( !this.isOpen ) {
			return;
		}

		this.isOpen = false;
		this._toggleAttr();

		this.range = null;
		this._off( this.document );

		this._trigger( "close", event );
	},

	widget: function() {
		return this.button;
	},

	menuWidget: function() {
		return this.menu;
	},

	_renderButtonItem: function( item ) {
		var buttonItem = $( "<span>" );

		this._setText( buttonItem, item.label );
		this._addClass( buttonItem, "ui-selectmenu-text" );

		return buttonItem;
	},

	_renderMenu: function( ul, items ) {
		var that = this,
			currentOptgroup = "";

		$.each( items, function( index, item ) {
			var li;

			if ( item.optgroup !== currentOptgroup ) {
				li = $( "<li>", {
					text: item.optgroup
				} );
				that._addClass( li, "ui-selectmenu-optgroup", "ui-menu-divider" +
					( item.element.parent( "optgroup" ).prop( "disabled" ) ?
						" ui-state-disabled" :
						"" ) );

				li.appendTo( ul );

				currentOptgroup = item.optgroup;
			}

			that._renderItemData( ul, item );
		} );
	},

	_renderItemData: function( ul, item ) {
		return this._renderItem( ul, item ).data( "ui-selectmenu-item", item );
	},

	_renderItem: function( ul, item ) {
		var li = $( "<li>" ),
			wrapper = $( "<div>", {
				title: item.element.attr( "title" )
			} );

		if ( item.disabled ) {
			this._addClass( li, null, "ui-state-disabled" );
		}

		if ( item.hidden ) {
			li.prop( "hidden", true );
		} else {
			this._setText( wrapper, item.label );
		}

		return li.append( wrapper ).appendTo( ul );
	},

	_setText: function( element, value ) {
		if ( value ) {
			element.text( value );
		} else {
			element.html( "&#160;" );
		}
	},

	_move: function( direction, event ) {
		var item, next,
			filter = ".ui-menu-item";

		if ( this.isOpen ) {
			item = this.menuItems.eq( this.focusIndex ).parent( "li" );
		} else {
			item = this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" );
			filter += ":not(.ui-state-disabled)";
		}

		if ( direction === "first" || direction === "last" ) {
			next = item[ direction === "first" ? "prevAll" : "nextAll" ]( filter ).eq( -1 );
		} else {
			next = item[ direction + "All" ]( filter ).eq( 0 );
		}

		if ( next.length ) {
			this.menuInstance.focus( event, next );
		}
	},

	_getSelectedItem: function() {
		return this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" );
	},

	_toggle: function( event ) {
		this[ this.isOpen ? "close" : "open" ]( event );
	},

	_setSelection: function() {
		var selection;

		if ( !this.range ) {
			return;
		}

		if ( window.getSelection ) {
			selection = window.getSelection();
			selection.removeAllRanges();
			selection.addRange( this.range );

		// Support: IE8
		} else {
			this.range.select();
		}

		// Support: IE
		// Setting the text selection kills the button focus in IE, but
		// restoring the focus doesn't kill the selection.
		this.button.trigger( "focus" );
	},

	_documentClick: {
		mousedown: function( event ) {
			if ( !this.isOpen ) {
				return;
			}

			if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" +
				$.escapeSelector( this.ids.button ) ).length ) {
				this.close( event );
			}
		}
	},

	_buttonEvents: {

		// Prevent text selection from being reset when interacting with the selectmenu (#10144)
		mousedown: function() {
			var selection;

			if ( window.getSelection ) {
				selection = window.getSelection();
				if ( selection.rangeCount ) {
					this.range = selection.getRangeAt( 0 );
				}

			// Support: IE8
			} else {
				this.range = document.selection.createRange();
			}
		},

		click: function( event ) {
			this._setSelection();
			this._toggle( event );
		},

		keydown: function( event ) {
			var preventDefault = true;
			switch ( event.keyCode ) {
			case $.ui.keyCode.TAB:
			case $.ui.keyCode.ESCAPE:
				this.close( event );
				preventDefault = false;
				break;
			case $.ui.keyCode.ENTER:
				if ( this.isOpen ) {
					this._selectFocusedItem( event );
				}
				break;
			case $.ui.keyCode.UP:
				if ( event.altKey ) {
					this._toggle( event );
				} else {
					this._move( "prev", event );
				}
				break;
			case $.ui.keyCode.DOWN:
				if ( event.altKey ) {
					this._toggle( event );
				} else {
					this._move( "next", event );
				}
				break;
			case $.ui.keyCode.SPACE:
				if ( this.isOpen ) {
					this._selectFocusedItem( event );
				} else {
					this._toggle( event );
				}
				break;
			case $.ui.keyCode.LEFT:
				this._move( "prev", event );
				break;
			case $.ui.keyCode.RIGHT:
				this._move( "next", event );
				break;
			case $.ui.keyCode.HOME:
			case $.ui.keyCode.PAGE_UP:
				this._move( "first", event );
				break;
			case $.ui.keyCode.END:
			case $.ui.keyCode.PAGE_DOWN:
				this._move( "last", event );
				break;
			default:
				this.menu.trigger( event );
				preventDefault = false;
			}

			if ( preventDefault ) {
				event.preventDefault();
			}
		}
	},

	_selectFocusedItem: function( event ) {
		var item = this.menuItems.eq( this.focusIndex ).parent( "li" );
		if ( !item.hasClass( "ui-state-disabled" ) ) {
			this._select( item.data( "ui-selectmenu-item" ), event );
		}
	},

	_select: function( item, event ) {
		var oldIndex = this.element[ 0 ].selectedIndex;

		// Change native select element
		this.element[ 0 ].selectedIndex = item.index;
		this.buttonItem.replaceWith( this.buttonItem = this._renderButtonItem( item ) );
		this._setAria( item );
		this._trigger( "select", event, { item: item } );

		if ( item.index !== oldIndex ) {
			this._trigger( "change", event, { item: item } );
		}

		this.close( event );
	},

	_setAria: function( item ) {
		var id = this.menuItems.eq( item.index ).attr( "id" );

		this.button.attr( {
			"aria-labelledby": id,
			"aria-activedescendant": id
		} );
		this.menu.attr( "aria-activedescendant", id );
	},

	_setOption: function( key, value ) {
		if ( key === "icons" ) {
			var icon = this.button.find( "span.ui-icon" );
			this._removeClass( icon, null, this.options.icons.button )
				._addClass( icon, null, value.button );
		}

		this._super( key, value );

		if ( key === "appendTo" ) {
			this.menuWrap.appendTo( this._appendTo() );
		}

		if ( key === "width" ) {
			this._resizeButton();
		}
	},

	_setOptionDisabled: function( value ) {
		this._super( value );

		this.menuInstance.option( "disabled", value );
		this.button.attr( "aria-disabled", value );
		this._toggleClass( this.button, null, "ui-state-disabled", value );

		this.element.prop( "disabled", value );
		if ( value ) {
			this.button.attr( "tabindex", -1 );
			this.close();
		} else {
			this.button.attr( "tabindex", 0 );
		}
	},

	_appendTo: function() {
		var element = this.options.appendTo;

		if ( element ) {
			element = element.jquery || element.nodeType ?
				$( element ) :
				this.document.find( element ).eq( 0 );
		}

		if ( !element || !element[ 0 ] ) {
			element = this.element.closest( ".ui-front, dialog" );
		}

		if ( !element.length ) {
			element = this.document[ 0 ].body;
		}

		return element;
	},

	_toggleAttr: function() {
		this.button.attr( "aria-expanded", this.isOpen );

		// We can't use two _toggleClass() calls here, because we need to make sure
		// we always remove classes first and add them second, otherwise if both classes have the
		// same theme class, it will be removed after we add it.
		this._removeClass( this.button, "ui-selectmenu-button-" +
			( this.isOpen ? "closed" : "open" ) )
			._addClass( this.button, "ui-selectmenu-button-" +
				( this.isOpen ? "open" : "closed" ) )
			._toggleClass( this.menuWrap, "ui-selectmenu-open", null, this.isOpen );

		this.menu.attr( "aria-hidden", !this.isOpen );
	},

	_resizeButton: function() {
		var width = this.options.width;

		// For `width: false`, just remove inline style and stop
		if ( width === false ) {
			this.button.css( "width", "" );
			return;
		}

		// For `width: null`, match the width of the original element
		if ( width === null ) {
			width = this.element.show().outerWidth();
			this.element.hide();
		}

		this.button.outerWidth( width );
	},

	_resizeMenu: function() {
		this.menu.outerWidth( Math.max(
			this.button.outerWidth(),

			// Support: IE10
			// IE10 wraps long text (possibly a rounding bug)
			// so we add 1px to avoid the wrapping
			this.menu.width( "" ).outerWidth() + 1
		) );
	},

	_getCreateOptions: function() {
		var options = this._super();

		options.disabled = this.element.prop( "disabled" );

		return options;
	},

	_parseOptions: function( options ) {
		var that = this,
			data = [];
		options.each( function( index, item ) {
			data.push( that._parseOption( $( item ), index ) );
		} );
		this.items = data;
	},

	_parseOption: function( option, index ) {
		var optgroup = option.parent( "optgroup" );

		return {
			element: option,
			index: index,
			value: option.val(),
			label: option.text(),
			hidden: optgroup.prop( "hidden" ) || option.prop( "hidden" ),
			optgroup: optgroup.attr( "label" ) || "",
			disabled: optgroup.prop( "disabled" ) || option.prop( "disabled" )
		};
	},

	_destroy: function() {
		this._unbindFormResetHandler();
		this.menuWrap.remove();
		this.button.remove();
		this.element.show();
		this.element.removeUniqueId();
		this.labels.attr( "for", this.ids.element );
	}
} ] );

} );
                                      jquery/ui/selectmenu.min.js                                                                         0000644                 00000022436 15212564043 0011775 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Selectmenu 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./menu","../form-reset-mixin","../keycode","../labels","../position","../unique-id","../version","../widget"],e):e(jQuery)}(function(u){"use strict";return u.widget("ui.selectmenu",[u.ui.formResetMixin,{version:"1.13.3",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=u()},_drawButton:function(){var e,t=this,i=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(e){this.button.trigger("focus"),e.preventDefault()}}),this.element.hide(),this.button=u("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=u("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(i).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){t._rendered||t._refreshMenu()})},_drawMenu:function(){var i=this;this.menu=u("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=u("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(e,t){e.preventDefault(),i._setSelection(),i._select(t.item.data("ui-selectmenu-item"),e)},focus:function(e,t){t=t.item.data("ui-selectmenu-item");null!=i.focusIndex&&t.index!==i.focusIndex&&(i._trigger("focus",e,{item:t}),i.isOpen||i._select(t,e)),i.focusIndex=t.index,i.button.attr("aria-activedescendant",i.menuItems.eq(t.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(e=this._getSelectedItem(),this.menuInstance.focus(null,e),this._setAria(e.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(e){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",e)))},_position:function(){this.menuWrap.position(u.extend({of:this.button},this.options.position))},close:function(e){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",e))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(e){var t=u("<span>");return this._setText(t,e.label),this._addClass(t,"ui-selectmenu-text"),t},_renderMenu:function(n,e){var s=this,o="";u.each(e,function(e,t){var i;t.optgroup!==o&&(i=u("<li>",{text:t.optgroup}),s._addClass(i,"ui-selectmenu-optgroup","ui-menu-divider"+(t.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),i.appendTo(n),o=t.optgroup),s._renderItemData(n,t)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-selectmenu-item",t)},_renderItem:function(e,t){var i=u("<li>"),n=u("<div>",{title:t.element.attr("title")});return t.disabled&&this._addClass(i,null,"ui-state-disabled"),t.hidden?i.prop("hidden",!0):this._setText(n,t.label),i.append(n).appendTo(e)},_setText:function(e,t){t?e.text(t):e.html("&#160;")},_move:function(e,t){var i,n=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),n+=":not(.ui-state-disabled)"),(i="first"===e||"last"===e?i["first"===e?"prevAll":"nextAll"](n).eq(-1):i[e+"All"](n).eq(0)).length&&this.menuInstance.focus(t,i)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(e){this[this.isOpen?"close":"open"](e)},_setSelection:function(){var e;this.range&&(window.getSelection?((e=window.getSelection()).removeAllRanges(),e.addRange(this.range)):this.range.select(),this.button.trigger("focus"))},_documentClick:{mousedown:function(e){!this.isOpen||u(e.target).closest(".ui-selectmenu-menu, #"+u.escapeSelector(this.ids.button)).length||this.close(e)}},_buttonEvents:{mousedown:function(){var e;window.getSelection?(e=window.getSelection()).rangeCount&&(this.range=e.getRangeAt(0)):this.range=document.selection.createRange()},click:function(e){this._setSelection(),this._toggle(e)},keydown:function(e){var t=!0;switch(e.keyCode){case u.ui.keyCode.TAB:case u.ui.keyCode.ESCAPE:this.close(e),t=!1;break;case u.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case u.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case u.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case u.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case u.ui.keyCode.LEFT:this._move("prev",e);break;case u.ui.keyCode.RIGHT:this._move("next",e);break;case u.ui.keyCode.HOME:case u.ui.keyCode.PAGE_UP:this._move("first",e);break;case u.ui.keyCode.END:case u.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),t=!1}t&&e.preventDefault()}},_selectFocusedItem:function(e){var t=this.menuItems.eq(this.focusIndex).parent("li");t.hasClass("ui-state-disabled")||this._select(t.data("ui-selectmenu-item"),e)},_select:function(e,t){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=e.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(e)),this._setAria(e),this._trigger("select",t,{item:e}),e.index!==i&&this._trigger("change",t,{item:e}),this.close(t)},_setAria:function(e){e=this.menuItems.eq(e.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(e,t){var i;"icons"===e&&(i=this.button.find("span.ui-icon"),this._removeClass(i,null,this.options.icons.button)._addClass(i,null,t.button)),this._super(e,t),"appendTo"===e&&this.menuWrap.appendTo(this._appendTo()),"width"===e&&this._resizeButton()},_setOptionDisabled:function(e){this._super(e),this.menuInstance.option("disabled",e),this.button.attr("aria-disabled",e),this._toggleClass(this.button,null,"ui-state-disabled",e),this.element.prop("disabled",e),e?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var e=this.options.appendTo;return e=(e=(e=e&&(e.jquery||e.nodeType?u(e):this.document.find(e).eq(0)))&&e[0]?e:this.element.closest(".ui-front, dialog")).length?e:this.document[0].body},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var e=this.options.width;!1===e?this.button.css("width",""):(null===e&&(e=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(e))},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var e=this._super();return e.disabled=this.element.prop("disabled"),e},_parseOptions:function(e){var i=this,n=[];e.each(function(e,t){n.push(i._parseOption(u(t),e))}),this.items=n},_parseOption:function(e,t){var i=e.parent("optgroup");return{element:e,index:t,value:e.val(),label:e.text(),hidden:i.prop("hidden")||e.prop("hidden"),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||e.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}])});                                                                                                                                                                                                                                  jquery/ui/slider.js                                                                                 0000644                 00000046217 15212564043 0010334 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Slider 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Slider
//>>group: Widgets
//>>description: Displays a flexible slider with ranges and accessibility via keyboard.
//>>docs: https://api.jqueryui.com/slider/
//>>demos: https://jqueryui.com/slider/
//>>css.structure: ../../themes/base/core.css
//>>css.structure: ../../themes/base/slider.css
//>>css.theme: ../../themes/base/theme.css

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"./mouse",
			"../keycode",
			"../version",
			"../widget"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.widget( "ui.slider", $.ui.mouse, {
	version: "1.13.3",
	widgetEventPrefix: "slide",

	options: {
		animate: false,
		classes: {
			"ui-slider": "ui-corner-all",
			"ui-slider-handle": "ui-corner-all",

			// Note: ui-widget-header isn't the most fittingly semantic framework class for this
			// element, but worked best visually with a variety of themes
			"ui-slider-range": "ui-corner-all ui-widget-header"
		},
		distance: 0,
		max: 100,
		min: 0,
		orientation: "horizontal",
		range: false,
		step: 1,
		value: 0,
		values: null,

		// Callbacks
		change: null,
		slide: null,
		start: null,
		stop: null
	},

	// Number of pages in a slider
	// (how many times can you page up/down to go through the whole range)
	numPages: 5,

	_create: function() {
		this._keySliding = false;
		this._mouseSliding = false;
		this._animateOff = true;
		this._handleIndex = null;
		this._detectOrientation();
		this._mouseInit();
		this._calculateNewMax();

		this._addClass( "ui-slider ui-slider-" + this.orientation,
			"ui-widget ui-widget-content" );

		this._refresh();

		this._animateOff = false;
	},

	_refresh: function() {
		this._createRange();
		this._createHandles();
		this._setupEvents();
		this._refreshValue();
	},

	_createHandles: function() {
		var i, handleCount,
			options = this.options,
			existingHandles = this.element.find( ".ui-slider-handle" ),
			handle = "<span tabindex='0'></span>",
			handles = [];

		handleCount = ( options.values && options.values.length ) || 1;

		if ( existingHandles.length > handleCount ) {
			existingHandles.slice( handleCount ).remove();
			existingHandles = existingHandles.slice( 0, handleCount );
		}

		for ( i = existingHandles.length; i < handleCount; i++ ) {
			handles.push( handle );
		}

		this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) );

		this._addClass( this.handles, "ui-slider-handle", "ui-state-default" );

		this.handle = this.handles.eq( 0 );

		this.handles.each( function( i ) {
			$( this )
				.data( "ui-slider-handle-index", i )
				.attr( "tabIndex", 0 );
		} );
	},

	_createRange: function() {
		var options = this.options;

		if ( options.range ) {
			if ( options.range === true ) {
				if ( !options.values ) {
					options.values = [ this._valueMin(), this._valueMin() ];
				} else if ( options.values.length && options.values.length !== 2 ) {
					options.values = [ options.values[ 0 ], options.values[ 0 ] ];
				} else if ( Array.isArray( options.values ) ) {
					options.values = options.values.slice( 0 );
				}
			}

			if ( !this.range || !this.range.length ) {
				this.range = $( "<div>" )
					.appendTo( this.element );

				this._addClass( this.range, "ui-slider-range" );
			} else {
				this._removeClass( this.range, "ui-slider-range-min ui-slider-range-max" );

				// Handle range switching from true to min/max
				this.range.css( {
					"left": "",
					"bottom": ""
				} );
			}
			if ( options.range === "min" || options.range === "max" ) {
				this._addClass( this.range, "ui-slider-range-" + options.range );
			}
		} else {
			if ( this.range ) {
				this.range.remove();
			}
			this.range = null;
		}
	},

	_setupEvents: function() {
		this._off( this.handles );
		this._on( this.handles, this._handleEvents );
		this._hoverable( this.handles );
		this._focusable( this.handles );
	},

	_destroy: function() {
		this.handles.remove();
		if ( this.range ) {
			this.range.remove();
		}

		this._mouseDestroy();
	},

	_mouseCapture: function( event ) {
		var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,
			that = this,
			o = this.options;

		if ( o.disabled ) {
			return false;
		}

		this.elementSize = {
			width: this.element.outerWidth(),
			height: this.element.outerHeight()
		};
		this.elementOffset = this.element.offset();

		position = { x: event.pageX, y: event.pageY };
		normValue = this._normValueFromMouse( position );
		distance = this._valueMax() - this._valueMin() + 1;
		this.handles.each( function( i ) {
			var thisDistance = Math.abs( normValue - that.values( i ) );
			if ( ( distance > thisDistance ) ||
				( distance === thisDistance &&
					( i === that._lastChangedValue || that.values( i ) === o.min ) ) ) {
				distance = thisDistance;
				closestHandle = $( this );
				index = i;
			}
		} );

		allowed = this._start( event, index );
		if ( allowed === false ) {
			return false;
		}
		this._mouseSliding = true;

		this._handleIndex = index;

		this._addClass( closestHandle, null, "ui-state-active" );
		closestHandle.trigger( "focus" );

		offset = closestHandle.offset();
		mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" );
		this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
			left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
			top: event.pageY - offset.top -
				( closestHandle.height() / 2 ) -
				( parseInt( closestHandle.css( "borderTopWidth" ), 10 ) || 0 ) -
				( parseInt( closestHandle.css( "borderBottomWidth" ), 10 ) || 0 ) +
				( parseInt( closestHandle.css( "marginTop" ), 10 ) || 0 )
		};

		if ( !this.handles.hasClass( "ui-state-hover" ) ) {
			this._slide( event, index, normValue );
		}
		this._animateOff = true;
		return true;
	},

	_mouseStart: function() {
		return true;
	},

	_mouseDrag: function( event ) {
		var position = { x: event.pageX, y: event.pageY },
			normValue = this._normValueFromMouse( position );

		this._slide( event, this._handleIndex, normValue );

		return false;
	},

	_mouseStop: function( event ) {
		this._removeClass( this.handles, null, "ui-state-active" );
		this._mouseSliding = false;

		this._stop( event, this._handleIndex );
		this._change( event, this._handleIndex );

		this._handleIndex = null;
		this._clickOffset = null;
		this._animateOff = false;

		return false;
	},

	_detectOrientation: function() {
		this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal";
	},

	_normValueFromMouse: function( position ) {
		var pixelTotal,
			pixelMouse,
			percentMouse,
			valueTotal,
			valueMouse;

		if ( this.orientation === "horizontal" ) {
			pixelTotal = this.elementSize.width;
			pixelMouse = position.x - this.elementOffset.left -
				( this._clickOffset ? this._clickOffset.left : 0 );
		} else {
			pixelTotal = this.elementSize.height;
			pixelMouse = position.y - this.elementOffset.top -
				( this._clickOffset ? this._clickOffset.top : 0 );
		}

		percentMouse = ( pixelMouse / pixelTotal );
		if ( percentMouse > 1 ) {
			percentMouse = 1;
		}
		if ( percentMouse < 0 ) {
			percentMouse = 0;
		}
		if ( this.orientation === "vertical" ) {
			percentMouse = 1 - percentMouse;
		}

		valueTotal = this._valueMax() - this._valueMin();
		valueMouse = this._valueMin() + percentMouse * valueTotal;

		return this._trimAlignValue( valueMouse );
	},

	_uiHash: function( index, value, values ) {
		var uiHash = {
			handle: this.handles[ index ],
			handleIndex: index,
			value: value !== undefined ? value : this.value()
		};

		if ( this._hasMultipleValues() ) {
			uiHash.value = value !== undefined ? value : this.values( index );
			uiHash.values = values || this.values();
		}

		return uiHash;
	},

	_hasMultipleValues: function() {
		return this.options.values && this.options.values.length;
	},

	_start: function( event, index ) {
		return this._trigger( "start", event, this._uiHash( index ) );
	},

	_slide: function( event, index, newVal ) {
		var allowed, otherVal,
			currentValue = this.value(),
			newValues = this.values();

		if ( this._hasMultipleValues() ) {
			otherVal = this.values( index ? 0 : 1 );
			currentValue = this.values( index );

			if ( this.options.values.length === 2 && this.options.range === true ) {
				newVal =  index === 0 ? Math.min( otherVal, newVal ) : Math.max( otherVal, newVal );
			}

			newValues[ index ] = newVal;
		}

		if ( newVal === currentValue ) {
			return;
		}

		allowed = this._trigger( "slide", event, this._uiHash( index, newVal, newValues ) );

		// A slide can be canceled by returning false from the slide callback
		if ( allowed === false ) {
			return;
		}

		if ( this._hasMultipleValues() ) {
			this.values( index, newVal );
		} else {
			this.value( newVal );
		}
	},

	_stop: function( event, index ) {
		this._trigger( "stop", event, this._uiHash( index ) );
	},

	_change: function( event, index ) {
		if ( !this._keySliding && !this._mouseSliding ) {

			//store the last changed value index for reference when handles overlap
			this._lastChangedValue = index;
			this._trigger( "change", event, this._uiHash( index ) );
		}
	},

	value: function( newValue ) {
		if ( arguments.length ) {
			this.options.value = this._trimAlignValue( newValue );
			this._refreshValue();
			this._change( null, 0 );
			return;
		}

		return this._value();
	},

	values: function( index, newValue ) {
		var vals,
			newValues,
			i;

		if ( arguments.length > 1 ) {
			this.options.values[ index ] = this._trimAlignValue( newValue );
			this._refreshValue();
			this._change( null, index );
			return;
		}

		if ( arguments.length ) {
			if ( Array.isArray( arguments[ 0 ] ) ) {
				vals = this.options.values;
				newValues = arguments[ 0 ];
				for ( i = 0; i < vals.length; i += 1 ) {
					vals[ i ] = this._trimAlignValue( newValues[ i ] );
					this._change( null, i );
				}
				this._refreshValue();
			} else {
				if ( this._hasMultipleValues() ) {
					return this._values( index );
				} else {
					return this.value();
				}
			}
		} else {
			return this._values();
		}
	},

	_setOption: function( key, value ) {
		var i,
			valsLength = 0;

		if ( key === "range" && this.options.range === true ) {
			if ( value === "min" ) {
				this.options.value = this._values( 0 );
				this.options.values = null;
			} else if ( value === "max" ) {
				this.options.value = this._values( this.options.values.length - 1 );
				this.options.values = null;
			}
		}

		if ( Array.isArray( this.options.values ) ) {
			valsLength = this.options.values.length;
		}

		this._super( key, value );

		switch ( key ) {
			case "orientation":
				this._detectOrientation();
				this._removeClass( "ui-slider-horizontal ui-slider-vertical" )
					._addClass( "ui-slider-" + this.orientation );
				this._refreshValue();
				if ( this.options.range ) {
					this._refreshRange( value );
				}

				// Reset positioning from previous orientation
				this.handles.css( value === "horizontal" ? "bottom" : "left", "" );
				break;
			case "value":
				this._animateOff = true;
				this._refreshValue();
				this._change( null, 0 );
				this._animateOff = false;
				break;
			case "values":
				this._animateOff = true;
				this._refreshValue();

				// Start from the last handle to prevent unreachable handles (#9046)
				for ( i = valsLength - 1; i >= 0; i-- ) {
					this._change( null, i );
				}
				this._animateOff = false;
				break;
			case "step":
			case "min":
			case "max":
				this._animateOff = true;
				this._calculateNewMax();
				this._refreshValue();
				this._animateOff = false;
				break;
			case "range":
				this._animateOff = true;
				this._refresh();
				this._animateOff = false;
				break;
		}
	},

	_setOptionDisabled: function( value ) {
		this._super( value );

		this._toggleClass( null, "ui-state-disabled", !!value );
	},

	//internal value getter
	// _value() returns value trimmed by min and max, aligned by step
	_value: function() {
		var val = this.options.value;
		val = this._trimAlignValue( val );

		return val;
	},

	//internal values getter
	// _values() returns array of values trimmed by min and max, aligned by step
	// _values( index ) returns single value trimmed by min and max, aligned by step
	_values: function( index ) {
		var val,
			vals,
			i;

		if ( arguments.length ) {
			val = this.options.values[ index ];
			val = this._trimAlignValue( val );

			return val;
		} else if ( this._hasMultipleValues() ) {

			// .slice() creates a copy of the array
			// this copy gets trimmed by min and max and then returned
			vals = this.options.values.slice();
			for ( i = 0; i < vals.length; i += 1 ) {
				vals[ i ] = this._trimAlignValue( vals[ i ] );
			}

			return vals;
		} else {
			return [];
		}
	},

	// Returns the step-aligned value that val is closest to, between (inclusive) min and max
	_trimAlignValue: function( val ) {
		if ( val <= this._valueMin() ) {
			return this._valueMin();
		}
		if ( val >= this._valueMax() ) {
			return this._valueMax();
		}
		var step = ( this.options.step > 0 ) ? this.options.step : 1,
			valModStep = ( val - this._valueMin() ) % step,
			alignValue = val - valModStep;

		if ( Math.abs( valModStep ) * 2 >= step ) {
			alignValue += ( valModStep > 0 ) ? step : ( -step );
		}

		// Since JavaScript has problems with large floats, round
		// the final value to 5 digits after the decimal point (see #4124)
		return parseFloat( alignValue.toFixed( 5 ) );
	},

	_calculateNewMax: function() {
		var max = this.options.max,
			min = this._valueMin(),
			step = this.options.step,
			aboveMin = Math.round( ( max - min ) / step ) * step;
		max = aboveMin + min;
		if ( max > this.options.max ) {

			//If max is not divisible by step, rounding off may increase its value
			max -= step;
		}
		this.max = parseFloat( max.toFixed( this._precision() ) );
	},

	_precision: function() {
		var precision = this._precisionOf( this.options.step );
		if ( this.options.min !== null ) {
			precision = Math.max( precision, this._precisionOf( this.options.min ) );
		}
		return precision;
	},

	_precisionOf: function( num ) {
		var str = num.toString(),
			decimal = str.indexOf( "." );
		return decimal === -1 ? 0 : str.length - decimal - 1;
	},

	_valueMin: function() {
		return this.options.min;
	},

	_valueMax: function() {
		return this.max;
	},

	_refreshRange: function( orientation ) {
		if ( orientation === "vertical" ) {
			this.range.css( { "width": "", "left": "" } );
		}
		if ( orientation === "horizontal" ) {
			this.range.css( { "height": "", "bottom": "" } );
		}
	},

	_refreshValue: function() {
		var lastValPercent, valPercent, value, valueMin, valueMax,
			oRange = this.options.range,
			o = this.options,
			that = this,
			animate = ( !this._animateOff ) ? o.animate : false,
			_set = {};

		if ( this._hasMultipleValues() ) {
			this.handles.each( function( i ) {
				valPercent = ( that.values( i ) - that._valueMin() ) / ( that._valueMax() -
					that._valueMin() ) * 100;
				_set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
				$( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
				if ( that.options.range === true ) {
					if ( that.orientation === "horizontal" ) {
						if ( i === 0 ) {
							that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
								left: valPercent + "%"
							}, o.animate );
						}
						if ( i === 1 ) {
							that.range[ animate ? "animate" : "css" ]( {
								width: ( valPercent - lastValPercent ) + "%"
							}, {
								queue: false,
								duration: o.animate
							} );
						}
					} else {
						if ( i === 0 ) {
							that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
								bottom: ( valPercent ) + "%"
							}, o.animate );
						}
						if ( i === 1 ) {
							that.range[ animate ? "animate" : "css" ]( {
								height: ( valPercent - lastValPercent ) + "%"
							}, {
								queue: false,
								duration: o.animate
							} );
						}
					}
				}
				lastValPercent = valPercent;
			} );
		} else {
			value = this.value();
			valueMin = this._valueMin();
			valueMax = this._valueMax();
			valPercent = ( valueMax !== valueMin ) ?
					( value - valueMin ) / ( valueMax - valueMin ) * 100 :
					0;
			_set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
			this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );

			if ( oRange === "min" && this.orientation === "horizontal" ) {
				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
					width: valPercent + "%"
				}, o.animate );
			}
			if ( oRange === "max" && this.orientation === "horizontal" ) {
				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
					width: ( 100 - valPercent ) + "%"
				}, o.animate );
			}
			if ( oRange === "min" && this.orientation === "vertical" ) {
				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
					height: valPercent + "%"
				}, o.animate );
			}
			if ( oRange === "max" && this.orientation === "vertical" ) {
				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
					height: ( 100 - valPercent ) + "%"
				}, o.animate );
			}
		}
	},

	_handleEvents: {
		keydown: function( event ) {
			var allowed, curVal, newVal, step,
				index = $( event.target ).data( "ui-slider-handle-index" );

			switch ( event.keyCode ) {
				case $.ui.keyCode.HOME:
				case $.ui.keyCode.END:
				case $.ui.keyCode.PAGE_UP:
				case $.ui.keyCode.PAGE_DOWN:
				case $.ui.keyCode.UP:
				case $.ui.keyCode.RIGHT:
				case $.ui.keyCode.DOWN:
				case $.ui.keyCode.LEFT:
					event.preventDefault();
					if ( !this._keySliding ) {
						this._keySliding = true;
						this._addClass( $( event.target ), null, "ui-state-active" );
						allowed = this._start( event, index );
						if ( allowed === false ) {
							return;
						}
					}
					break;
			}

			step = this.options.step;
			if ( this._hasMultipleValues() ) {
				curVal = newVal = this.values( index );
			} else {
				curVal = newVal = this.value();
			}

			switch ( event.keyCode ) {
				case $.ui.keyCode.HOME:
					newVal = this._valueMin();
					break;
				case $.ui.keyCode.END:
					newVal = this._valueMax();
					break;
				case $.ui.keyCode.PAGE_UP:
					newVal = this._trimAlignValue(
						curVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages )
					);
					break;
				case $.ui.keyCode.PAGE_DOWN:
					newVal = this._trimAlignValue(
						curVal - ( ( this._valueMax() - this._valueMin() ) / this.numPages ) );
					break;
				case $.ui.keyCode.UP:
				case $.ui.keyCode.RIGHT:
					if ( curVal === this._valueMax() ) {
						return;
					}
					newVal = this._trimAlignValue( curVal + step );
					break;
				case $.ui.keyCode.DOWN:
				case $.ui.keyCode.LEFT:
					if ( curVal === this._valueMin() ) {
						return;
					}
					newVal = this._trimAlignValue( curVal - step );
					break;
			}

			this._slide( event, index, newVal );
		},
		keyup: function( event ) {
			var index = $( event.target ).data( "ui-slider-handle-index" );

			if ( this._keySliding ) {
				this._keySliding = false;
				this._stop( event, index );
				this._change( event, index );
				this._removeClass( $( event.target ), null, "ui-state-active" );
			}
		}
	}
} );

} );
                                                                                                                                                                                                                                                                                                                                                                                 jquery/ui/slider.min.js                                                                             0000644                 00000025007 15212564043 0011110 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Slider 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./mouse","../keycode","../version","../widget"],e):e(jQuery)}(function(o){"use strict";return o.widget("ui.slider",o.ui.mouse,{version:"1.13.3",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,t=this.options,i=this.element.find(".ui-slider-handle"),s=[],a=t.values&&t.values.length||1;for(i.length>a&&(i.slice(a).remove(),i=i.slice(0,a)),e=i.length;e<a;e++)s.push("<span tabindex='0'></span>");this.handles=i.add(o(s.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){o(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:Array.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=o("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==e.range&&"max"!==e.range||this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,a,n,t,h,l=this,u=this.options;return!u.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var t=Math.abs(i-l.values(e));(t<s||s===t&&(e===l._lastChangedValue||l.values(e)===u.min))&&(s=t,a=o(this),n=e)}),!1!==this._start(e,n))&&(this._mouseSliding=!0,this._handleIndex=n,this._addClass(a,null,"ui-state-active"),a.trigger("focus"),t=a.offset(),h=!o(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-t.left-a.width()/2,top:e.pageY-t.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,n,i),this._animateOff=!0)},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},t=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,t),!1},_mouseStop:function(e){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,e="horizontal"===this.orientation?(t=this.elementSize.width,e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),e=e/t;return(e=1<e?1:e)<0&&(e=0),"vertical"===this.orientation&&(e=1-e),t=this._valueMax()-this._valueMin(),e=this._valueMin()+e*t,this._trimAlignValue(e)},_uiHash:function(e,t,i){var s={handle:this.handles[e],handleIndex:e,value:void 0!==t?t:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==t?t:this.values(e),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(e,t){return this._trigger("start",e,this._uiHash(t))},_slide:function(e,t,i){var s,a=this.value(),n=this.values();this._hasMultipleValues()&&(s=this.values(t?0:1),a=this.values(t),2===this.options.values.length&&!0===this.options.range&&(i=0===t?Math.min(s,i):Math.max(s,i)),n[t]=i),i!==a&&!1!==this._trigger("slide",e,this._uiHash(t,i,n))&&(this._hasMultipleValues()?this.values(t,i):this.value(i))},_stop:function(e,t){this._trigger("stop",e,this._uiHash(t))},_change:function(e,t){this._keySliding||this._mouseSliding||(this._lastChangedValue=t,this._trigger("change",e,this._uiHash(t)))},value:function(e){if(!arguments.length)return this._value();this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0)},values:function(e,t){var i,s,a;if(1<arguments.length)this.options.values[e]=this._trimAlignValue(t),this._refreshValue(),this._change(null,e);else{if(!arguments.length)return this._values();if(!Array.isArray(e))return this._hasMultipleValues()?this._values(e):this.value();for(i=this.options.values,s=e,a=0;a<i.length;a+=1)i[a]=this._trimAlignValue(s[a]),this._change(null,a);this._refreshValue()}},_setOption:function(e,t){var i,s=0;switch("range"===e&&!0===this.options.range&&("min"===t?(this.options.value=this._values(0),this.options.values=null):"max"===t&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),Array.isArray(this.options.values)&&(s=this.options.values.length),this._super(e,t),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(t),this.handles.css("horizontal"===t?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=s-1;0<=i;i--)this._change(null,i);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(e){this._super(e),this._toggleClass(null,"ui-state-disabled",!!e)},_value:function(){var e=this.options.value;return this._trimAlignValue(e)},_values:function(e){var t,i;if(arguments.length)return e=this.options.values[e],this._trimAlignValue(e);if(this._hasMultipleValues()){for(t=this.options.values.slice(),i=0;i<t.length;i+=1)t[i]=this._trimAlignValue(t[i]);return t}return[]},_trimAlignValue:function(e){var t,i;return e<=this._valueMin()?this._valueMin():e>=this._valueMax()?this._valueMax():(t=0<this.options.step?this.options.step:1,i=e-(e=(e-this._valueMin())%t),2*Math.abs(e)>=t&&(i+=0<e?t:-t),parseFloat(i.toFixed(5)))},_calculateNewMax:function(){var e=this.options.max,t=this._valueMin(),i=this.options.step;(e=Math.round((e-t)/i)*i+t)>this.options.max&&(e-=i),this.max=parseFloat(e.toFixed(this._precision()))},_precision:function(){var e=this._precisionOf(this.options.step);return e=null!==this.options.min?Math.max(e,this._precisionOf(this.options.min)):e},_precisionOf:function(e){var e=e.toString(),t=e.indexOf(".");return-1===t?0:e.length-t-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(e){"vertical"===e&&this.range.css({width:"",left:""}),"horizontal"===e&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var t,i,e,s,a,n=this.options.range,h=this.options,l=this,u=!this._animateOff&&h.animate,r={};this._hasMultipleValues()?this.handles.each(function(e){i=(l.values(e)-l._valueMin())/(l._valueMax()-l._valueMin())*100,r["horizontal"===l.orientation?"left":"bottom"]=i+"%",o(this).stop(1,1)[u?"animate":"css"](r,h.animate),!0===l.options.range&&("horizontal"===l.orientation?(0===e&&l.range.stop(1,1)[u?"animate":"css"]({left:i+"%"},h.animate),1===e&&l.range[u?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:h.animate})):(0===e&&l.range.stop(1,1)[u?"animate":"css"]({bottom:i+"%"},h.animate),1===e&&l.range[u?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:h.animate}))),t=i}):(e=this.value(),s=this._valueMin(),a=this._valueMax(),i=a!==s?(e-s)/(a-s)*100:0,r["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[u?"animate":"css"](r,h.animate),"min"===n&&"horizontal"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({width:i+"%"},h.animate),"max"===n&&"horizontal"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({width:100-i+"%"},h.animate),"min"===n&&"vertical"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({height:i+"%"},h.animate),"max"===n&&"vertical"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({height:100-i+"%"},h.animate))},_handleEvents:{keydown:function(e){var t,i,s,a=o(e.target).data("ui-slider-handle-index");switch(e.keyCode){case o.ui.keyCode.HOME:case o.ui.keyCode.END:case o.ui.keyCode.PAGE_UP:case o.ui.keyCode.PAGE_DOWN:case o.ui.keyCode.UP:case o.ui.keyCode.RIGHT:case o.ui.keyCode.DOWN:case o.ui.keyCode.LEFT:if(e.preventDefault(),this._keySliding||(this._keySliding=!0,this._addClass(o(e.target),null,"ui-state-active"),!1!==this._start(e,a)))break;return}switch(s=this.options.step,t=i=this._hasMultipleValues()?this.values(a):this.value(),e.keyCode){case o.ui.keyCode.HOME:i=this._valueMin();break;case o.ui.keyCode.END:i=this._valueMax();break;case o.ui.keyCode.PAGE_UP:i=this._trimAlignValue(t+(this._valueMax()-this._valueMin())/this.numPages);break;case o.ui.keyCode.PAGE_DOWN:i=this._trimAlignValue(t-(this._valueMax()-this._valueMin())/this.numPages);break;case o.ui.keyCode.UP:case o.ui.keyCode.RIGHT:if(t===this._valueMax())return;i=this._trimAlignValue(t+s);break;case o.ui.keyCode.DOWN:case o.ui.keyCode.LEFT:if(t===this._valueMin())return;i=this._trimAlignValue(t-s)}this._slide(e,a,i)},keyup:function(e){var t=o(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,t),this._change(e,t),this._removeClass(o(e.target),null,"ui-state-active"))}}})});                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         jquery/ui/sortable.js                                                                               0000644                 00000135031 15212564043 0010656 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Sortable 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Sortable
//>>group: Interactions
//>>description: Enables items in a list to be sorted using the mouse.
//>>docs: https://api.jqueryui.com/sortable/
//>>demos: https://jqueryui.com/sortable/
//>>css.structure: ../../themes/base/sortable.css

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"./mouse",
			"../data",
			"../ie",
			"../scroll-parent",
			"../version",
			"../widget"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.widget( "ui.sortable", $.ui.mouse, {
	version: "1.13.3",
	widgetEventPrefix: "sort",
	ready: false,
	options: {
		appendTo: "parent",
		axis: false,
		connectWith: false,
		containment: false,
		cursor: "auto",
		cursorAt: false,
		dropOnEmpty: true,
		forcePlaceholderSize: false,
		forceHelperSize: false,
		grid: false,
		handle: false,
		helper: "original",
		items: "> *",
		opacity: false,
		placeholder: false,
		revert: false,
		scroll: true,
		scrollSensitivity: 20,
		scrollSpeed: 20,
		scope: "default",
		tolerance: "intersect",
		zIndex: 1000,

		// Callbacks
		activate: null,
		beforeStop: null,
		change: null,
		deactivate: null,
		out: null,
		over: null,
		receive: null,
		remove: null,
		sort: null,
		start: null,
		stop: null,
		update: null
	},

	_isOverAxis: function( x, reference, size ) {
		return ( x >= reference ) && ( x < ( reference + size ) );
	},

	_isFloating: function( item ) {
		return ( /left|right/ ).test( item.css( "float" ) ) ||
			( /inline|table-cell/ ).test( item.css( "display" ) );
	},

	_create: function() {
		this.containerCache = {};
		this._addClass( "ui-sortable" );

		//Get the items
		this.refresh();

		//Let's determine the parent's offset
		this.offset = this.element.offset();

		//Initialize mouse events for interaction
		this._mouseInit();

		this._setHandleClassName();

		//We're ready to go
		this.ready = true;

	},

	_setOption: function( key, value ) {
		this._super( key, value );

		if ( key === "handle" ) {
			this._setHandleClassName();
		}
	},

	_setHandleClassName: function() {
		var that = this;
		this._removeClass( this.element.find( ".ui-sortable-handle" ), "ui-sortable-handle" );
		$.each( this.items, function() {
			that._addClass(
				this.instance.options.handle ?
					this.item.find( this.instance.options.handle ) :
					this.item,
				"ui-sortable-handle"
			);
		} );
	},

	_destroy: function() {
		this._mouseDestroy();

		for ( var i = this.items.length - 1; i >= 0; i-- ) {
			this.items[ i ].item.removeData( this.widgetName + "-item" );
		}

		return this;
	},

	_mouseCapture: function( event, overrideHandle ) {
		var currentItem = null,
			validHandle = false,
			that = this;

		if ( this.reverting ) {
			return false;
		}

		if ( this.options.disabled || this.options.type === "static" ) {
			return false;
		}

		//We have to refresh the items data once first
		this._refreshItems( event );

		//Find out if the clicked node (or one of its parents) is a actual item in this.items
		$( event.target ).parents().each( function() {
			if ( $.data( this, that.widgetName + "-item" ) === that ) {
				currentItem = $( this );
				return false;
			}
		} );
		if ( $.data( event.target, that.widgetName + "-item" ) === that ) {
			currentItem = $( event.target );
		}

		if ( !currentItem ) {
			return false;
		}
		if ( this.options.handle && !overrideHandle ) {
			$( this.options.handle, currentItem ).find( "*" ).addBack().each( function() {
				if ( this === event.target ) {
					validHandle = true;
				}
			} );
			if ( !validHandle ) {
				return false;
			}
		}

		this.currentItem = currentItem;
		this._removeCurrentsFromItems();
		return true;

	},

	_mouseStart: function( event, overrideHandle, noActivation ) {

		var i, body,
			o = this.options;

		this.currentContainer = this;

		//We only need to call refreshPositions, because the refreshItems call has been moved to
		// mouseCapture
		this.refreshPositions();

		//Prepare the dragged items parent
		this.appendTo = $( o.appendTo !== "parent" ?
				o.appendTo :
				this.currentItem.parent() );

		//Create and append the visible helper
		this.helper = this._createHelper( event );

		//Cache the helper size
		this._cacheHelperProportions();

		/*
		 * - Position generation -
		 * This block generates everything position related - it's the core of draggables.
		 */

		//Cache the margins of the original element
		this._cacheMargins();

		//The element's absolute position on the page minus margins
		this.offset = this.currentItem.offset();
		this.offset = {
			top: this.offset.top - this.margins.top,
			left: this.offset.left - this.margins.left
		};

		$.extend( this.offset, {
			click: { //Where the click happened, relative to the element
				left: event.pageX - this.offset.left,
				top: event.pageY - this.offset.top
			},

			// This is a relative to absolute position minus the actual position calculation -
			// only used for relative positioned helper
			relative: this._getRelativeOffset()
		} );

		// After we get the helper offset, but before we get the parent offset we can
		// change the helper's position to absolute
		// TODO: Still need to figure out a way to make relative sorting possible
		this.helper.css( "position", "absolute" );
		this.cssPosition = this.helper.css( "position" );

		//Adjust the mouse offset relative to the helper if "cursorAt" is supplied
		if ( o.cursorAt ) {
			this._adjustOffsetFromHelper( o.cursorAt );
		}

		//Cache the former DOM position
		this.domPosition = {
			prev: this.currentItem.prev()[ 0 ],
			parent: this.currentItem.parent()[ 0 ]
		};

		// If the helper is not the original, hide the original so it's not playing any role during
		// the drag, won't cause anything bad this way
		if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {
			this.currentItem.hide();
		}

		//Create the placeholder
		this._createPlaceholder();

		//Get the next scrolling parent
		this.scrollParent = this.placeholder.scrollParent();

		$.extend( this.offset, {
			parent: this._getParentOffset()
		} );

		//Set a containment if given in the options
		if ( o.containment ) {
			this._setContainment();
		}

		if ( o.cursor && o.cursor !== "auto" ) { // cursor option
			body = this.document.find( "body" );

			// Support: IE
			this.storedCursor = body.css( "cursor" );
			body.css( "cursor", o.cursor );

			this.storedStylesheet =
				$( "<style>*{ cursor: " + o.cursor + " !important; }</style>" ).appendTo( body );
		}

		// We need to make sure to grab the zIndex before setting the
		// opacity, because setting the opacity to anything lower than 1
		// causes the zIndex to change from "auto" to 0.
		if ( o.zIndex ) { // zIndex option
			if ( this.helper.css( "zIndex" ) ) {
				this._storedZIndex = this.helper.css( "zIndex" );
			}
			this.helper.css( "zIndex", o.zIndex );
		}

		if ( o.opacity ) { // opacity option
			if ( this.helper.css( "opacity" ) ) {
				this._storedOpacity = this.helper.css( "opacity" );
			}
			this.helper.css( "opacity", o.opacity );
		}

		//Prepare scrolling
		if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
				this.scrollParent[ 0 ].tagName !== "HTML" ) {
			this.overflowOffset = this.scrollParent.offset();
		}

		//Call callbacks
		this._trigger( "start", event, this._uiHash() );

		//Recache the helper size
		if ( !this._preserveHelperProportions ) {
			this._cacheHelperProportions();
		}

		//Post "activate" events to possible containers
		if ( !noActivation ) {
			for ( i = this.containers.length - 1; i >= 0; i-- ) {
				this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) );
			}
		}

		//Prepare possible droppables
		if ( $.ui.ddmanager ) {
			$.ui.ddmanager.current = this;
		}

		if ( $.ui.ddmanager && !o.dropBehaviour ) {
			$.ui.ddmanager.prepareOffsets( this, event );
		}

		this.dragging = true;

		this._addClass( this.helper, "ui-sortable-helper" );

		//Move the helper, if needed
		if ( !this.helper.parent().is( this.appendTo ) ) {
			this.helper.detach().appendTo( this.appendTo );

			//Update position
			this.offset.parent = this._getParentOffset();
		}

		//Generate the original position
		this.position = this.originalPosition = this._generatePosition( event );
		this.originalPageX = event.pageX;
		this.originalPageY = event.pageY;
		this.lastPositionAbs = this.positionAbs = this._convertPositionTo( "absolute" );

		this._mouseDrag( event );

		return true;

	},

	_scroll: function( event ) {
		var o = this.options,
			scrolled = false;

		if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
				this.scrollParent[ 0 ].tagName !== "HTML" ) {

			if ( ( this.overflowOffset.top + this.scrollParent[ 0 ].offsetHeight ) -
					event.pageY < o.scrollSensitivity ) {
				this.scrollParent[ 0 ].scrollTop =
					scrolled = this.scrollParent[ 0 ].scrollTop + o.scrollSpeed;
			} else if ( event.pageY - this.overflowOffset.top < o.scrollSensitivity ) {
				this.scrollParent[ 0 ].scrollTop =
					scrolled = this.scrollParent[ 0 ].scrollTop - o.scrollSpeed;
			}

			if ( ( this.overflowOffset.left + this.scrollParent[ 0 ].offsetWidth ) -
					event.pageX < o.scrollSensitivity ) {
				this.scrollParent[ 0 ].scrollLeft = scrolled =
					this.scrollParent[ 0 ].scrollLeft + o.scrollSpeed;
			} else if ( event.pageX - this.overflowOffset.left < o.scrollSensitivity ) {
				this.scrollParent[ 0 ].scrollLeft = scrolled =
					this.scrollParent[ 0 ].scrollLeft - o.scrollSpeed;
			}

		} else {

			if ( event.pageY - this.document.scrollTop() < o.scrollSensitivity ) {
				scrolled = this.document.scrollTop( this.document.scrollTop() - o.scrollSpeed );
			} else if ( this.window.height() - ( event.pageY - this.document.scrollTop() ) <
					o.scrollSensitivity ) {
				scrolled = this.document.scrollTop( this.document.scrollTop() + o.scrollSpeed );
			}

			if ( event.pageX - this.document.scrollLeft() < o.scrollSensitivity ) {
				scrolled = this.document.scrollLeft(
					this.document.scrollLeft() - o.scrollSpeed
				);
			} else if ( this.window.width() - ( event.pageX - this.document.scrollLeft() ) <
					o.scrollSensitivity ) {
				scrolled = this.document.scrollLeft(
					this.document.scrollLeft() + o.scrollSpeed
				);
			}

		}

		return scrolled;
	},

	_mouseDrag: function( event ) {
		var i, item, itemElement, intersection,
			o = this.options;

		//Compute the helpers position
		this.position = this._generatePosition( event );
		this.positionAbs = this._convertPositionTo( "absolute" );

		//Set the helper position
		if ( !this.options.axis || this.options.axis !== "y" ) {
			this.helper[ 0 ].style.left = this.position.left + "px";
		}
		if ( !this.options.axis || this.options.axis !== "x" ) {
			this.helper[ 0 ].style.top = this.position.top + "px";
		}

		//Do scrolling
		if ( o.scroll ) {
			if ( this._scroll( event ) !== false ) {

				//Update item positions used in position checks
				this._refreshItemPositions( true );

				if ( $.ui.ddmanager && !o.dropBehaviour ) {
					$.ui.ddmanager.prepareOffsets( this, event );
				}
			}
		}

		this.dragDirection = {
			vertical: this._getDragVerticalDirection(),
			horizontal: this._getDragHorizontalDirection()
		};

		//Rearrange
		for ( i = this.items.length - 1; i >= 0; i-- ) {

			//Cache variables and intersection, continue if no intersection
			item = this.items[ i ];
			itemElement = item.item[ 0 ];
			intersection = this._intersectsWithPointer( item );
			if ( !intersection ) {
				continue;
			}

			// Only put the placeholder inside the current Container, skip all
			// items from other containers. This works because when moving
			// an item from one container to another the
			// currentContainer is switched before the placeholder is moved.
			//
			// Without this, moving items in "sub-sortables" can cause
			// the placeholder to jitter between the outer and inner container.
			if ( item.instance !== this.currentContainer ) {
				continue;
			}

			// Cannot intersect with itself
			// no useless actions that have been done before
			// no action if the item moved is the parent of the item checked
			if ( itemElement !== this.currentItem[ 0 ] &&
				this.placeholder[ intersection === 1 ?
				"next" : "prev" ]()[ 0 ] !== itemElement &&
				!$.contains( this.placeholder[ 0 ], itemElement ) &&
				( this.options.type === "semi-dynamic" ?
					!$.contains( this.element[ 0 ], itemElement ) :
					true
				)
			) {

				this.direction = intersection === 1 ? "down" : "up";

				if ( this.options.tolerance === "pointer" ||
						this._intersectsWithSides( item ) ) {
					this._rearrange( event, item );
				} else {
					break;
				}

				this._trigger( "change", event, this._uiHash() );
				break;
			}
		}

		//Post events to containers
		this._contactContainers( event );

		//Interconnect with droppables
		if ( $.ui.ddmanager ) {
			$.ui.ddmanager.drag( this, event );
		}

		//Call callbacks
		this._trigger( "sort", event, this._uiHash() );

		this.lastPositionAbs = this.positionAbs;
		return false;

	},

	_mouseStop: function( event, noPropagation ) {

		if ( !event ) {
			return;
		}

		//If we are using droppables, inform the manager about the drop
		if ( $.ui.ddmanager && !this.options.dropBehaviour ) {
			$.ui.ddmanager.drop( this, event );
		}

		if ( this.options.revert ) {
			var that = this,
				cur = this.placeholder.offset(),
				axis = this.options.axis,
				animation = {};

			if ( !axis || axis === "x" ) {
				animation.left = cur.left - this.offset.parent.left - this.margins.left +
					( this.offsetParent[ 0 ] === this.document[ 0 ].body ?
						0 :
						this.offsetParent[ 0 ].scrollLeft
					);
			}
			if ( !axis || axis === "y" ) {
				animation.top = cur.top - this.offset.parent.top - this.margins.top +
					( this.offsetParent[ 0 ] === this.document[ 0 ].body ?
						0 :
						this.offsetParent[ 0 ].scrollTop
					);
			}
			this.reverting = true;
			$( this.helper ).animate(
				animation,
				parseInt( this.options.revert, 10 ) || 500,
				function() {
					that._clear( event );
				}
			);
		} else {
			this._clear( event, noPropagation );
		}

		return false;

	},

	cancel: function() {

		if ( this.dragging ) {

			this._mouseUp( new $.Event( "mouseup", { target: null } ) );

			if ( this.options.helper === "original" ) {
				this.currentItem.css( this._storedCSS );
				this._removeClass( this.currentItem, "ui-sortable-helper" );
			} else {
				this.currentItem.show();
			}

			//Post deactivating events to containers
			for ( var i = this.containers.length - 1; i >= 0; i-- ) {
				this.containers[ i ]._trigger( "deactivate", null, this._uiHash( this ) );
				if ( this.containers[ i ].containerCache.over ) {
					this.containers[ i ]._trigger( "out", null, this._uiHash( this ) );
					this.containers[ i ].containerCache.over = 0;
				}
			}

		}

		if ( this.placeholder ) {

			//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,
			// it unbinds ALL events from the original node!
			if ( this.placeholder[ 0 ].parentNode ) {
				this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );
			}
			if ( this.options.helper !== "original" && this.helper &&
					this.helper[ 0 ].parentNode ) {
				this.helper.remove();
			}

			$.extend( this, {
				helper: null,
				dragging: false,
				reverting: false,
				_noFinalSort: null
			} );

			if ( this.domPosition.prev ) {
				$( this.domPosition.prev ).after( this.currentItem );
			} else {
				$( this.domPosition.parent ).prepend( this.currentItem );
			}
		}

		return this;

	},

	serialize: function( o ) {

		var items = this._getItemsAsjQuery( o && o.connected ),
			str = [];
		o = o || {};

		$( items ).each( function() {
			var res = ( $( o.item || this ).attr( o.attribute || "id" ) || "" )
				.match( o.expression || ( /(.+)[\-=_](.+)/ ) );
			if ( res ) {
				str.push(
					( o.key || res[ 1 ] + "[]" ) +
					"=" + ( o.key && o.expression ? res[ 1 ] : res[ 2 ] ) );
			}
		} );

		if ( !str.length && o.key ) {
			str.push( o.key + "=" );
		}

		return str.join( "&" );

	},

	toArray: function( o ) {

		var items = this._getItemsAsjQuery( o && o.connected ),
			ret = [];

		o = o || {};

		items.each( function() {
			ret.push( $( o.item || this ).attr( o.attribute || "id" ) || "" );
		} );
		return ret;

	},

	/* Be careful with the following core functions */
	_intersectsWith: function( item ) {

		var x1 = this.positionAbs.left,
			x2 = x1 + this.helperProportions.width,
			y1 = this.positionAbs.top,
			y2 = y1 + this.helperProportions.height,
			l = item.left,
			r = l + item.width,
			t = item.top,
			b = t + item.height,
			dyClick = this.offset.click.top,
			dxClick = this.offset.click.left,
			isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t &&
				( y1 + dyClick ) < b ),
			isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l &&
				( x1 + dxClick ) < r ),
			isOverElement = isOverElementHeight && isOverElementWidth;

		if ( this.options.tolerance === "pointer" ||
			this.options.forcePointerForContainers ||
			( this.options.tolerance !== "pointer" &&
				this.helperProportions[ this.floating ? "width" : "height" ] >
				item[ this.floating ? "width" : "height" ] )
		) {
			return isOverElement;
		} else {

			return ( l < x1 + ( this.helperProportions.width / 2 ) && // Right Half
				x2 - ( this.helperProportions.width / 2 ) < r && // Left Half
				t < y1 + ( this.helperProportions.height / 2 ) && // Bottom Half
				y2 - ( this.helperProportions.height / 2 ) < b ); // Top Half

		}
	},

	_intersectsWithPointer: function( item ) {
		var verticalDirection, horizontalDirection,
			isOverElementHeight = ( this.options.axis === "x" ) ||
				this._isOverAxis(
					this.positionAbs.top + this.offset.click.top, item.top, item.height ),
			isOverElementWidth = ( this.options.axis === "y" ) ||
				this._isOverAxis(
					this.positionAbs.left + this.offset.click.left, item.left, item.width ),
			isOverElement = isOverElementHeight && isOverElementWidth;

		if ( !isOverElement ) {
			return false;
		}

		verticalDirection = this.dragDirection.vertical;
		horizontalDirection = this.dragDirection.horizontal;

		return this.floating ?
			( ( horizontalDirection === "right" || verticalDirection === "down" ) ? 2 : 1 ) :
			( verticalDirection && ( verticalDirection === "down" ? 2 : 1 ) );

	},

	_intersectsWithSides: function( item ) {

		var isOverBottomHalf = this._isOverAxis( this.positionAbs.top +
				this.offset.click.top, item.top + ( item.height / 2 ), item.height ),
			isOverRightHalf = this._isOverAxis( this.positionAbs.left +
				this.offset.click.left, item.left + ( item.width / 2 ), item.width ),
			verticalDirection = this.dragDirection.vertical,
			horizontalDirection = this.dragDirection.horizontal;

		if ( this.floating && horizontalDirection ) {
			return ( ( horizontalDirection === "right" && isOverRightHalf ) ||
				( horizontalDirection === "left" && !isOverRightHalf ) );
		} else {
			return verticalDirection && ( ( verticalDirection === "down" && isOverBottomHalf ) ||
				( verticalDirection === "up" && !isOverBottomHalf ) );
		}

	},

	_getDragVerticalDirection: function() {
		var delta = this.positionAbs.top - this.lastPositionAbs.top;
		return delta !== 0 && ( delta > 0 ? "down" : "up" );
	},

	_getDragHorizontalDirection: function() {
		var delta = this.positionAbs.left - this.lastPositionAbs.left;
		return delta !== 0 && ( delta > 0 ? "right" : "left" );
	},

	refresh: function( event ) {
		this._refreshItems( event );
		this._setHandleClassName();
		this.refreshPositions();
		return this;
	},

	_connectWith: function() {
		var options = this.options;
		return options.connectWith.constructor === String ?
			[ options.connectWith ] :
			options.connectWith;
	},

	_getItemsAsjQuery: function( connected ) {

		var i, j, cur, inst,
			items = [],
			queries = [],
			connectWith = this._connectWith();

		if ( connectWith && connected ) {
			for ( i = connectWith.length - 1; i >= 0; i-- ) {
				cur = $( connectWith[ i ], this.document[ 0 ] );
				for ( j = cur.length - 1; j >= 0; j-- ) {
					inst = $.data( cur[ j ], this.widgetFullName );
					if ( inst && inst !== this && !inst.options.disabled ) {
						queries.push( [ typeof inst.options.items === "function" ?
							inst.options.items.call( inst.element ) :
							$( inst.options.items, inst.element )
								.not( ".ui-sortable-helper" )
								.not( ".ui-sortable-placeholder" ), inst ] );
					}
				}
			}
		}

		queries.push( [ typeof this.options.items === "function" ?
			this.options.items
				.call( this.element, null, { options: this.options, item: this.currentItem } ) :
			$( this.options.items, this.element )
				.not( ".ui-sortable-helper" )
				.not( ".ui-sortable-placeholder" ), this ] );

		function addItems() {
			items.push( this );
		}
		for ( i = queries.length - 1; i >= 0; i-- ) {
			queries[ i ][ 0 ].each( addItems );
		}

		return $( items );

	},

	_removeCurrentsFromItems: function() {

		var list = this.currentItem.find( ":data(" + this.widgetName + "-item)" );

		this.items = $.grep( this.items, function( item ) {
			for ( var j = 0; j < list.length; j++ ) {
				if ( list[ j ] === item.item[ 0 ] ) {
					return false;
				}
			}
			return true;
		} );

	},

	_refreshItems: function( event ) {

		this.items = [];
		this.containers = [ this ];

		var i, j, cur, inst, targetData, _queries, item, queriesLength,
			items = this.items,
			queries = [ [ typeof this.options.items === "function" ?
				this.options.items.call( this.element[ 0 ], event, { item: this.currentItem } ) :
				$( this.options.items, this.element ), this ] ],
			connectWith = this._connectWith();

		//Shouldn't be run the first time through due to massive slow-down
		if ( connectWith && this.ready ) {
			for ( i = connectWith.length - 1; i >= 0; i-- ) {
				cur = $( connectWith[ i ], this.document[ 0 ] );
				for ( j = cur.length - 1; j >= 0; j-- ) {
					inst = $.data( cur[ j ], this.widgetFullName );
					if ( inst && inst !== this && !inst.options.disabled ) {
						queries.push( [ typeof inst.options.items === "function" ?
							inst.options.items
								.call( inst.element[ 0 ], event, { item: this.currentItem } ) :
							$( inst.options.items, inst.element ), inst ] );
						this.containers.push( inst );
					}
				}
			}
		}

		for ( i = queries.length - 1; i >= 0; i-- ) {
			targetData = queries[ i ][ 1 ];
			_queries = queries[ i ][ 0 ];

			for ( j = 0, queriesLength = _queries.length; j < queriesLength; j++ ) {
				item = $( _queries[ j ] );

				// Data for target checking (mouse manager)
				item.data( this.widgetName + "-item", targetData );

				items.push( {
					item: item,
					instance: targetData,
					width: 0, height: 0,
					left: 0, top: 0
				} );
			}
		}

	},

	_refreshItemPositions: function( fast ) {
		var i, item, t, p;

		for ( i = this.items.length - 1; i >= 0; i-- ) {
			item = this.items[ i ];

			//We ignore calculating positions of all connected containers when we're not over them
			if ( this.currentContainer && item.instance !== this.currentContainer &&
					item.item[ 0 ] !== this.currentItem[ 0 ] ) {
				continue;
			}

			t = this.options.toleranceElement ?
				$( this.options.toleranceElement, item.item ) :
				item.item;

			if ( !fast ) {
				item.width = t.outerWidth();
				item.height = t.outerHeight();
			}

			p = t.offset();
			item.left = p.left;
			item.top = p.top;
		}
	},

	refreshPositions: function( fast ) {

		// Determine whether items are being displayed horizontally
		this.floating = this.items.length ?
			this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) :
			false;

		// This has to be redone because due to the item being moved out/into the offsetParent,
		// the offsetParent's position will change
		if ( this.offsetParent && this.helper ) {
			this.offset.parent = this._getParentOffset();
		}

		this._refreshItemPositions( fast );

		var i, p;

		if ( this.options.custom && this.options.custom.refreshContainers ) {
			this.options.custom.refreshContainers.call( this );
		} else {
			for ( i = this.containers.length - 1; i >= 0; i-- ) {
				p = this.containers[ i ].element.offset();
				this.containers[ i ].containerCache.left = p.left;
				this.containers[ i ].containerCache.top = p.top;
				this.containers[ i ].containerCache.width =
					this.containers[ i ].element.outerWidth();
				this.containers[ i ].containerCache.height =
					this.containers[ i ].element.outerHeight();
			}
		}

		return this;
	},

	_createPlaceholder: function( that ) {
		that = that || this;
		var className, nodeName,
			o = that.options;

		if ( !o.placeholder || o.placeholder.constructor === String ) {
			className = o.placeholder;
			nodeName = that.currentItem[ 0 ].nodeName.toLowerCase();
			o.placeholder = {
				element: function() {

					var element = $( "<" + nodeName + ">", that.document[ 0 ] );

					that._addClass( element, "ui-sortable-placeholder",
							className || that.currentItem[ 0 ].className )
						._removeClass( element, "ui-sortable-helper" );

					if ( nodeName === "tbody" ) {
						that._createTrPlaceholder(
							that.currentItem.find( "tr" ).eq( 0 ),
							$( "<tr>", that.document[ 0 ] ).appendTo( element )
						);
					} else if ( nodeName === "tr" ) {
						that._createTrPlaceholder( that.currentItem, element );
					} else if ( nodeName === "img" ) {
						element.attr( "src", that.currentItem.attr( "src" ) );
					}

					if ( !className ) {
						element.css( "visibility", "hidden" );
					}

					return element;
				},
				update: function( container, p ) {

					// 1. If a className is set as 'placeholder option, we don't force sizes -
					// the class is responsible for that
					// 2. The option 'forcePlaceholderSize can be enabled to force it even if a
					// class name is specified
					if ( className && !o.forcePlaceholderSize ) {
						return;
					}

					// If the element doesn't have a actual height or width by itself (without
					// styles coming from a stylesheet), it receives the inline height and width
					// from the dragged item. Or, if it's a tbody or tr, it's going to have a height
					// anyway since we're populating them with <td>s above, but they're unlikely to
					// be the correct height on their own if the row heights are dynamic, so we'll
					// always assign the height of the dragged item given forcePlaceholderSize
					// is true.
					if ( !p.height() || ( o.forcePlaceholderSize &&
							( nodeName === "tbody" || nodeName === "tr" ) ) ) {
						p.height(
							that.currentItem.innerHeight() -
							parseInt( that.currentItem.css( "paddingTop" ) || 0, 10 ) -
							parseInt( that.currentItem.css( "paddingBottom" ) || 0, 10 ) );
					}
					if ( !p.width() ) {
						p.width(
							that.currentItem.innerWidth() -
							parseInt( that.currentItem.css( "paddingLeft" ) || 0, 10 ) -
							parseInt( that.currentItem.css( "paddingRight" ) || 0, 10 ) );
					}
				}
			};
		}

		//Create the placeholder
		that.placeholder = $( o.placeholder.element.call( that.element, that.currentItem ) );

		//Append it after the actual current item
		that.currentItem.after( that.placeholder );

		//Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
		o.placeholder.update( that, that.placeholder );

	},

	_createTrPlaceholder: function( sourceTr, targetTr ) {
		var that = this;

		sourceTr.children().each( function() {
			$( "<td>&#160;</td>", that.document[ 0 ] )
				.attr( "colspan", $( this ).attr( "colspan" ) || 1 )
				.appendTo( targetTr );
		} );
	},

	_contactContainers: function( event ) {
		var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom,
			floating, axis,
			innermostContainer = null,
			innermostIndex = null;

		// Get innermost container that intersects with item
		for ( i = this.containers.length - 1; i >= 0; i-- ) {

			// Never consider a container that's located within the item itself
			if ( $.contains( this.currentItem[ 0 ], this.containers[ i ].element[ 0 ] ) ) {
				continue;
			}

			if ( this._intersectsWith( this.containers[ i ].containerCache ) ) {

				// If we've already found a container and it's more "inner" than this, then continue
				if ( innermostContainer &&
						$.contains(
							this.containers[ i ].element[ 0 ],
							innermostContainer.element[ 0 ] ) ) {
					continue;
				}

				innermostContainer = this.containers[ i ];
				innermostIndex = i;

			} else {

				// container doesn't intersect. trigger "out" event if necessary
				if ( this.containers[ i ].containerCache.over ) {
					this.containers[ i ]._trigger( "out", event, this._uiHash( this ) );
					this.containers[ i ].containerCache.over = 0;
				}
			}

		}

		// If no intersecting containers found, return
		if ( !innermostContainer ) {
			return;
		}

		// Move the item into the container if it's not there already
		if ( this.containers.length === 1 ) {
			if ( !this.containers[ innermostIndex ].containerCache.over ) {
				this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) );
				this.containers[ innermostIndex ].containerCache.over = 1;
			}
		} else {

			// When entering a new container, we will find the item with the least distance and
			// append our item near it
			dist = 10000;
			itemWithLeastDistance = null;
			floating = innermostContainer.floating || this._isFloating( this.currentItem );
			posProperty = floating ? "left" : "top";
			sizeProperty = floating ? "width" : "height";
			axis = floating ? "pageX" : "pageY";

			for ( j = this.items.length - 1; j >= 0; j-- ) {
				if ( !$.contains(
						this.containers[ innermostIndex ].element[ 0 ], this.items[ j ].item[ 0 ] )
				) {
					continue;
				}
				if ( this.items[ j ].item[ 0 ] === this.currentItem[ 0 ] ) {
					continue;
				}

				cur = this.items[ j ].item.offset()[ posProperty ];
				nearBottom = false;
				if ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) {
					nearBottom = true;
				}

				if ( Math.abs( event[ axis ] - cur ) < dist ) {
					dist = Math.abs( event[ axis ] - cur );
					itemWithLeastDistance = this.items[ j ];
					this.direction = nearBottom ? "up" : "down";
				}
			}

			//Check if dropOnEmpty is enabled
			if ( !itemWithLeastDistance && !this.options.dropOnEmpty ) {
				return;
			}

			if ( this.currentContainer === this.containers[ innermostIndex ] ) {
				if ( !this.currentContainer.containerCache.over ) {
					this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash() );
					this.currentContainer.containerCache.over = 1;
				}
				return;
			}

			if ( itemWithLeastDistance ) {
				this._rearrange( event, itemWithLeastDistance, null, true );
			} else {
				this._rearrange( event, null, this.containers[ innermostIndex ].element, true );
			}
			this._trigger( "change", event, this._uiHash() );
			this.containers[ innermostIndex ]._trigger( "change", event, this._uiHash( this ) );
			this.currentContainer = this.containers[ innermostIndex ];

			//Update the placeholder
			this.options.placeholder.update( this.currentContainer, this.placeholder );

			//Update scrollParent
			this.scrollParent = this.placeholder.scrollParent();

			//Update overflowOffset
			if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
					this.scrollParent[ 0 ].tagName !== "HTML" ) {
				this.overflowOffset = this.scrollParent.offset();
			}

			this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) );
			this.containers[ innermostIndex ].containerCache.over = 1;
		}

	},

	_createHelper: function( event ) {

		var o = this.options,
			helper = typeof o.helper === "function" ?
				$( o.helper.apply( this.element[ 0 ], [ event, this.currentItem ] ) ) :
				( o.helper === "clone" ? this.currentItem.clone() : this.currentItem );

		//Add the helper to the DOM if that didn't happen already
		if ( !helper.parents( "body" ).length ) {
			this.appendTo[ 0 ].appendChild( helper[ 0 ] );
		}

		if ( helper[ 0 ] === this.currentItem[ 0 ] ) {
			this._storedCSS = {
				width: this.currentItem[ 0 ].style.width,
				height: this.currentItem[ 0 ].style.height,
				position: this.currentItem.css( "position" ),
				top: this.currentItem.css( "top" ),
				left: this.currentItem.css( "left" )
			};
		}

		if ( !helper[ 0 ].style.width || o.forceHelperSize ) {
			helper.width( this.currentItem.width() );
		}
		if ( !helper[ 0 ].style.height || o.forceHelperSize ) {
			helper.height( this.currentItem.height() );
		}

		return helper;

	},

	_adjustOffsetFromHelper: function( obj ) {
		if ( typeof obj === "string" ) {
			obj = obj.split( " " );
		}
		if ( Array.isArray( obj ) ) {
			obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };
		}
		if ( "left" in obj ) {
			this.offset.click.left = obj.left + this.margins.left;
		}
		if ( "right" in obj ) {
			this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
		}
		if ( "top" in obj ) {
			this.offset.click.top = obj.top + this.margins.top;
		}
		if ( "bottom" in obj ) {
			this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
		}
	},

	_getParentOffset: function() {

		//Get the offsetParent and cache its position
		this.offsetParent = this.helper.offsetParent();
		var po = this.offsetParent.offset();

		// This is a special case where we need to modify a offset calculated on start, since the
		// following happened:
		// 1. The position of the helper is absolute, so it's position is calculated based on the
		// next positioned parent
		// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't
		// the document, which means that the scroll is included in the initial calculation of the
		// offset of the parent, and never recalculated upon drag
		if ( this.cssPosition === "absolute" && this.scrollParent[ 0 ] !== this.document[ 0 ] &&
				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {
			po.left += this.scrollParent.scrollLeft();
			po.top += this.scrollParent.scrollTop();
		}

		// This needs to be actually done for all browsers, since pageX/pageY includes this
		// information with an ugly IE fix
		if ( this.offsetParent[ 0 ] === this.document[ 0 ].body ||
				( this.offsetParent[ 0 ].tagName &&
				this.offsetParent[ 0 ].tagName.toLowerCase() === "html" && $.ui.ie ) ) {
			po = { top: 0, left: 0 };
		}

		return {
			top: po.top + ( parseInt( this.offsetParent.css( "borderTopWidth" ), 10 ) || 0 ),
			left: po.left + ( parseInt( this.offsetParent.css( "borderLeftWidth" ), 10 ) || 0 )
		};

	},

	_getRelativeOffset: function() {

		if ( this.cssPosition === "relative" ) {
			var p = this.currentItem.position();
			return {
				top: p.top - ( parseInt( this.helper.css( "top" ), 10 ) || 0 ) +
					this.scrollParent.scrollTop(),
				left: p.left - ( parseInt( this.helper.css( "left" ), 10 ) || 0 ) +
					this.scrollParent.scrollLeft()
			};
		} else {
			return { top: 0, left: 0 };
		}

	},

	_cacheMargins: function() {
		this.margins = {
			left: ( parseInt( this.currentItem.css( "marginLeft" ), 10 ) || 0 ),
			top: ( parseInt( this.currentItem.css( "marginTop" ), 10 ) || 0 )
		};
	},

	_cacheHelperProportions: function() {
		this.helperProportions = {
			width: this.helper.outerWidth(),
			height: this.helper.outerHeight()
		};
	},

	_setContainment: function() {

		var ce, co, over,
			o = this.options;
		if ( o.containment === "parent" ) {
			o.containment = this.helper[ 0 ].parentNode;
		}
		if ( o.containment === "document" || o.containment === "window" ) {
			this.containment = [
				0 - this.offset.relative.left - this.offset.parent.left,
				0 - this.offset.relative.top - this.offset.parent.top,
				o.containment === "document" ?
					this.document.width() :
					this.window.width() - this.helperProportions.width - this.margins.left,
				( o.containment === "document" ?
					( this.document.height() || document.body.parentNode.scrollHeight ) :
					this.window.height() || this.document[ 0 ].body.parentNode.scrollHeight
				) - this.helperProportions.height - this.margins.top
			];
		}

		if ( !( /^(document|window|parent)$/ ).test( o.containment ) ) {
			ce = $( o.containment )[ 0 ];
			co = $( o.containment ).offset();
			over = ( $( ce ).css( "overflow" ) !== "hidden" );

			this.containment = [
				co.left + ( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) +
					( parseInt( $( ce ).css( "paddingLeft" ), 10 ) || 0 ) - this.margins.left,
				co.top + ( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) +
					( parseInt( $( ce ).css( "paddingTop" ), 10 ) || 0 ) - this.margins.top,
				co.left + ( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -
					( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) -
					( parseInt( $( ce ).css( "paddingRight" ), 10 ) || 0 ) -
					this.helperProportions.width - this.margins.left,
				co.top + ( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -
					( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) -
					( parseInt( $( ce ).css( "paddingBottom" ), 10 ) || 0 ) -
					this.helperProportions.height - this.margins.top
			];
		}

	},

	_convertPositionTo: function( d, pos ) {

		if ( !pos ) {
			pos = this.position;
		}
		var mod = d === "absolute" ? 1 : -1,
			scroll = this.cssPosition === "absolute" &&
				!( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?
					this.offsetParent :
					this.scrollParent,
			scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );

		return {
			top: (

				// The absolute mouse position
				pos.top	+

				// Only for relative positioned nodes: Relative offset from element to offset parent
				this.offset.relative.top * mod +

				// The offsetParent's offset without borders (offset + border)
				this.offset.parent.top * mod -
				( ( this.cssPosition === "fixed" ?
					-this.scrollParent.scrollTop() :
					( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod )
			),
			left: (

				// The absolute mouse position
				pos.left +

				// Only for relative positioned nodes: Relative offset from element to offset parent
				this.offset.relative.left * mod +

				// The offsetParent's offset without borders (offset + border)
				this.offset.parent.left * mod	-
				( ( this.cssPosition === "fixed" ?
					-this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 :
					scroll.scrollLeft() ) * mod )
			)
		};

	},

	_generatePosition: function( event ) {

		var top, left,
			o = this.options,
			pageX = event.pageX,
			pageY = event.pageY,
			scroll = this.cssPosition === "absolute" &&
				!( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?
					this.offsetParent :
					this.scrollParent,
				scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );

		// This is another very weird special case that only happens for relative elements:
		// 1. If the css position is relative
		// 2. and the scroll parent is the document or similar to the offset parent
		// we have to refresh the relative offset during the scroll so there are no jumps
		if ( this.cssPosition === "relative" && !( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
				this.scrollParent[ 0 ] !== this.offsetParent[ 0 ] ) ) {
			this.offset.relative = this._getRelativeOffset();
		}

		/*
		 * - Position constraining -
		 * Constrain the position to a mix of grid, containment.
		 */

		if ( this.originalPosition ) { //If we are not dragging yet, we won't check for options

			if ( this.containment ) {
				if ( event.pageX - this.offset.click.left < this.containment[ 0 ] ) {
					pageX = this.containment[ 0 ] + this.offset.click.left;
				}
				if ( event.pageY - this.offset.click.top < this.containment[ 1 ] ) {
					pageY = this.containment[ 1 ] + this.offset.click.top;
				}
				if ( event.pageX - this.offset.click.left > this.containment[ 2 ] ) {
					pageX = this.containment[ 2 ] + this.offset.click.left;
				}
				if ( event.pageY - this.offset.click.top > this.containment[ 3 ] ) {
					pageY = this.containment[ 3 ] + this.offset.click.top;
				}
			}

			if ( o.grid ) {
				top = this.originalPageY + Math.round( ( pageY - this.originalPageY ) /
					o.grid[ 1 ] ) * o.grid[ 1 ];
				pageY = this.containment ?
					( ( top - this.offset.click.top >= this.containment[ 1 ] &&
						top - this.offset.click.top <= this.containment[ 3 ] ) ?
							top :
							( ( top - this.offset.click.top >= this.containment[ 1 ] ) ?
								top - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) :
								top;

				left = this.originalPageX + Math.round( ( pageX - this.originalPageX ) /
					o.grid[ 0 ] ) * o.grid[ 0 ];
				pageX = this.containment ?
					( ( left - this.offset.click.left >= this.containment[ 0 ] &&
						left - this.offset.click.left <= this.containment[ 2 ] ) ?
							left :
							( ( left - this.offset.click.left >= this.containment[ 0 ] ) ?
								left - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) :
								left;
			}

		}

		return {
			top: (

				// The absolute mouse position
				pageY -

				// Click offset (relative to the element)
				this.offset.click.top -

				// Only for relative positioned nodes: Relative offset from element to offset parent
				this.offset.relative.top -

				// The offsetParent's offset without borders (offset + border)
				this.offset.parent.top +
				( ( this.cssPosition === "fixed" ?
					-this.scrollParent.scrollTop() :
					( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) )
			),
			left: (

				// The absolute mouse position
				pageX -

				// Click offset (relative to the element)
				this.offset.click.left -

				// Only for relative positioned nodes: Relative offset from element to offset parent
				this.offset.relative.left -

				// The offsetParent's offset without borders (offset + border)
				this.offset.parent.left +
				( ( this.cssPosition === "fixed" ?
					-this.scrollParent.scrollLeft() :
					scrollIsRootNode ? 0 : scroll.scrollLeft() ) )
			)
		};

	},

	_rearrange: function( event, i, a, hardRefresh ) {

		if ( a ) {
			a[ 0 ].appendChild( this.placeholder[ 0 ] );
		} else {
			i.item[ 0 ].parentNode.insertBefore( this.placeholder[ 0 ],
				( this.direction === "down" ? i.item[ 0 ] : i.item[ 0 ].nextSibling ) );
		}

		//Various things done here to improve the performance:
		// 1. we create a setTimeout, that calls refreshPositions
		// 2. on the instance, we have a counter variable, that get's higher after every append
		// 3. on the local scope, we copy the counter variable, and check in the timeout,
		// if it's still the same
		// 4. this lets only the last addition to the timeout stack through
		this.counter = this.counter ? ++this.counter : 1;
		var counter = this.counter;

		this._delay( function() {
			if ( counter === this.counter ) {

				//Precompute after each DOM insertion, NOT on mousemove
				this.refreshPositions( !hardRefresh );
			}
		} );

	},

	_clear: function( event, noPropagation ) {

		this.reverting = false;

		// We delay all events that have to be triggered to after the point where the placeholder
		// has been removed and everything else normalized again
		var i,
			delayedTriggers = [];

		// We first have to update the dom position of the actual currentItem
		// Note: don't do it if the current item is already removed (by a user), or it gets
		// reappended (see #4088)
		if ( !this._noFinalSort && this.currentItem.parent().length ) {
			this.placeholder.before( this.currentItem );
		}
		this._noFinalSort = null;

		if ( this.helper[ 0 ] === this.currentItem[ 0 ] ) {
			for ( i in this._storedCSS ) {
				if ( this._storedCSS[ i ] === "auto" || this._storedCSS[ i ] === "static" ) {
					this._storedCSS[ i ] = "";
				}
			}
			this.currentItem.css( this._storedCSS );
			this._removeClass( this.currentItem, "ui-sortable-helper" );
		} else {
			this.currentItem.show();
		}

		if ( this.fromOutside && !noPropagation ) {
			delayedTriggers.push( function( event ) {
				this._trigger( "receive", event, this._uiHash( this.fromOutside ) );
			} );
		}
		if ( ( this.fromOutside ||
				this.domPosition.prev !==
				this.currentItem.prev().not( ".ui-sortable-helper" )[ 0 ] ||
				this.domPosition.parent !== this.currentItem.parent()[ 0 ] ) && !noPropagation ) {

			// Trigger update callback if the DOM position has changed
			delayedTriggers.push( function( event ) {
				this._trigger( "update", event, this._uiHash() );
			} );
		}

		// Check if the items Container has Changed and trigger appropriate
		// events.
		if ( this !== this.currentContainer ) {
			if ( !noPropagation ) {
				delayedTriggers.push( function( event ) {
					this._trigger( "remove", event, this._uiHash() );
				} );
				delayedTriggers.push( ( function( c ) {
					return function( event ) {
						c._trigger( "receive", event, this._uiHash( this ) );
					};
				} ).call( this, this.currentContainer ) );
				delayedTriggers.push( ( function( c ) {
					return function( event ) {
						c._trigger( "update", event, this._uiHash( this ) );
					};
				} ).call( this, this.currentContainer ) );
			}
		}

		//Post events to containers
		function delayEvent( type, instance, container ) {
			return function( event ) {
				container._trigger( type, event, instance._uiHash( instance ) );
			};
		}
		for ( i = this.containers.length - 1; i >= 0; i-- ) {
			if ( !noPropagation ) {
				delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) );
			}
			if ( this.containers[ i ].containerCache.over ) {
				delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) );
				this.containers[ i ].containerCache.over = 0;
			}
		}

		//Do what was originally in plugins
		if ( this.storedCursor ) {
			this.document.find( "body" ).css( "cursor", this.storedCursor );
			this.storedStylesheet.remove();
		}
		if ( this._storedOpacity ) {
			this.helper.css( "opacity", this._storedOpacity );
		}
		if ( this._storedZIndex ) {
			this.helper.css( "zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex );
		}

		this.dragging = false;

		if ( !noPropagation ) {
			this._trigger( "beforeStop", event, this._uiHash() );
		}

		//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,
		// it unbinds ALL events from the original node!
		this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );

		if ( !this.cancelHelperRemoval ) {
			if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {
				this.helper.remove();
			}
			this.helper = null;
		}

		if ( !noPropagation ) {
			for ( i = 0; i < delayedTriggers.length; i++ ) {

				// Trigger all delayed events
				delayedTriggers[ i ].call( this, event );
			}
			this._trigger( "stop", event, this._uiHash() );
		}

		this.fromOutside = false;
		return !this.cancelHelperRemoval;

	},

	_trigger: function() {
		if ( $.Widget.prototype._trigger.apply( this, arguments ) === false ) {
			this.cancel();
		}
	},

	_uiHash: function( _inst ) {
		var inst = _inst || this;
		return {
			helper: inst.helper,
			placeholder: inst.placeholder || $( [] ),
			position: inst.position,
			originalPosition: inst.originalPosition,
			offset: inst.positionAbs,
			item: inst.currentItem,
			sender: _inst ? _inst.element : null
		};
	}

} );

} );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       jquery/ui/sortable.min.js                                                                           0000644                 00000061640 15212564043 0011444 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Sortable 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./mouse","../data","../ie","../scroll-parent","../version","../widget"],t):t(jQuery)}(function(u){"use strict";return u.widget("ui.sortable",u.ui.mouse,{version:"1.13.3",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return e<=t&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var t=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),u.each(this.items,function(){t._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;0<=t;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,e){var i=null,s=!1,o=this;return!(this.reverting||this.options.disabled||"static"===this.options.type||(this._refreshItems(t),u(t.target).parents().each(function(){if(u.data(this,o.widgetName+"-item")===o)return i=u(this),!1}),!(i=u.data(t.target,o.widgetName+"-item")===o?u(t.target):i))||(this.options.handle&&!e&&(u(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(s=!0)}),!s)||(this.currentItem=i,this._removeCurrentsFromItems(),0)))},_mouseStart:function(t,e,i){var s,o,r=this.options;if((this.currentContainer=this).refreshPositions(),this.appendTo=u("parent"!==r.appendTo?r.appendTo:this.currentItem.parent()),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},u.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),r.cursorAt&&this._adjustOffsetFromHelper(r.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),this.scrollParent=this.placeholder.scrollParent(),u.extend(this.offset,{parent:this._getParentOffset()}),r.containment&&this._setContainment(),r.cursor&&"auto"!==r.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",r.cursor),this.storedStylesheet=u("<style>*{ cursor: "+r.cursor+" !important; }</style>").appendTo(o)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(s=this.containers.length-1;0<=s;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return u.ui.ddmanager&&(u.ui.ddmanager.current=this),u.ui.ddmanager&&!r.dropBehaviour&&u.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this.helper.parent().is(this.appendTo)||(this.helper.detach().appendTo(this.appendTo),this.offset.parent=this._getParentOffset()),this.position=this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,this.lastPositionAbs=this.positionAbs=this._convertPositionTo("absolute"),this._mouseDrag(t),!0},_scroll:function(t){var e=this.options,i=!1;return this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<e.scrollSensitivity?this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop+e.scrollSpeed:t.pageY-this.overflowOffset.top<e.scrollSensitivity&&(this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop-e.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<e.scrollSensitivity?this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft+e.scrollSpeed:t.pageX-this.overflowOffset.left<e.scrollSensitivity&&(this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft-e.scrollSpeed)):(t.pageY-this.document.scrollTop()<e.scrollSensitivity?i=this.document.scrollTop(this.document.scrollTop()-e.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<e.scrollSensitivity&&(i=this.document.scrollTop(this.document.scrollTop()+e.scrollSpeed)),t.pageX-this.document.scrollLeft()<e.scrollSensitivity?i=this.document.scrollLeft(this.document.scrollLeft()-e.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<e.scrollSensitivity&&(i=this.document.scrollLeft(this.document.scrollLeft()+e.scrollSpeed))),i},_mouseDrag:function(t){var e,i,s,o,r=this.options;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),r.scroll&&!1!==this._scroll(t)&&(this._refreshItemPositions(!0),u.ui.ddmanager)&&!r.dropBehaviour&&u.ui.ddmanager.prepareOffsets(this,t),this.dragDirection={vertical:this._getDragVerticalDirection(),horizontal:this._getDragHorizontalDirection()},e=this.items.length-1;0<=e;e--)if(s=(i=this.items[e]).item[0],(o=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(s===this.currentItem[0]||this.placeholder[1===o?"next":"prev"]()[0]===s||u.contains(this.placeholder[0],s)||"semi-dynamic"===this.options.type&&u.contains(this.element[0],s))){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),u.ui.ddmanager&&u.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,e){var i,s,o,r;if(t)return u.ui.ddmanager&&!this.options.dropBehaviour&&u.ui.ddmanager.drop(this,t),this.options.revert?(s=(i=this).placeholder.offset(),r={},(o=this.options.axis)&&"x"!==o||(r.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(r.top=s.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,u(this.helper).animate(r,parseInt(this.options.revert,10)||500,function(){i._clear(t)})):this._clear(t,e),!1},cancel:function(){if(this.dragging){this._mouseUp(new u.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;0<=t;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),u.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?u(this.domPosition.prev).after(this.currentItem):u(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var t=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},u(t).each(function(){var t=(u(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);t&&i.push((e.key||t[1]+"[]")+"="+(e.key&&e.expression?t[1]:t[2]))}),!i.length&&e.key&&i.push(e.key+"="),i.join("&")},toArray:function(t){var e=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e.each(function(){i.push(u(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,o=s+this.helperProportions.height,r=t.left,n=r+t.width,h=t.top,a=h+t.height,l=this.offset.click.top,c=this.offset.click.left,l="x"===this.options.axis||h<s+l&&s+l<a,c="y"===this.options.axis||r<e+c&&e+c<n;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?l&&c:r<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<n&&h<s+this.helperProportions.height/2&&o-this.helperProportions.height/2<a},_intersectsWithPointer:function(t){var e="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),t="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!e||!t)&&(e=this.dragDirection.vertical,t=this.dragDirection.horizontal,this.floating?"right"===t||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),t=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),i=this.dragDirection.vertical,s=this.dragDirection.horizontal;return this.floating&&s?"right"===s&&t||"left"===s&&!t:i&&("down"===i&&e||"up"===i&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!=t&&(0<t?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!=t&&(0<t?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(t){var e,i,s,o,r=[],n=[],h=this._connectWith();if(h&&t)for(e=h.length-1;0<=e;e--)for(i=(s=u(h[e],this.document[0])).length-1;0<=i;i--)(o=u.data(s[i],this.widgetFullName))&&o!==this&&!o.options.disabled&&n.push(["function"==typeof o.options.items?o.options.items.call(o.element):u(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);function a(){r.push(this)}for(n.push(["function"==typeof this.options.items?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):u(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),e=n.length-1;0<=e;e--)n[e][0].each(a);return u(r)},_removeCurrentsFromItems:function(){var i=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=u.grep(this.items,function(t){for(var e=0;e<i.length;e++)if(i[e]===t.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var e,i,s,o,r,n,h,a,l=this.items,c=[["function"==typeof this.options.items?this.options.items.call(this.element[0],t,{item:this.currentItem}):u(this.options.items,this.element),this]],p=this._connectWith();if(p&&this.ready)for(e=p.length-1;0<=e;e--)for(i=(s=u(p[e],this.document[0])).length-1;0<=i;i--)(o=u.data(s[i],this.widgetFullName))&&o!==this&&!o.options.disabled&&(c.push(["function"==typeof o.options.items?o.options.items.call(o.element[0],t,{item:this.currentItem}):u(o.options.items,o.element),o]),this.containers.push(o));for(e=c.length-1;0<=e;e--)for(r=c[e][1],a=(n=c[e][i=0]).length;i<a;i++)(h=u(n[i])).data(this.widgetName+"-item",r),l.push({item:h,instance:r,width:0,height:0,left:0,top:0})},_refreshItemPositions:function(t){for(var e,i,s=this.items.length-1;0<=s;s--)e=this.items[s],this.currentContainer&&e.instance!==this.currentContainer&&e.item[0]!==this.currentItem[0]||(i=this.options.toleranceElement?u(this.options.toleranceElement,e.item):e.item,t||(e.width=i.outerWidth(),e.height=i.outerHeight()),i=i.offset(),e.left=i.left,e.top=i.top)},refreshPositions:function(t){var e,i;if(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),this._refreshItemPositions(t),this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(e=this.containers.length-1;0<=e;e--)i=this.containers[e].element.offset(),this.containers[e].containerCache.left=i.left,this.containers[e].containerCache.top=i.top,this.containers[e].containerCache.width=this.containers[e].element.outerWidth(),this.containers[e].containerCache.height=this.containers[e].element.outerHeight();return this},_createPlaceholder:function(i){var s,o,r=(i=i||this).options;r.placeholder&&r.placeholder.constructor!==String||(s=r.placeholder,o=i.currentItem[0].nodeName.toLowerCase(),r.placeholder={element:function(){var t=u("<"+o+">",i.document[0]);return i._addClass(t,"ui-sortable-placeholder",s||i.currentItem[0].className)._removeClass(t,"ui-sortable-helper"),"tbody"===o?i._createTrPlaceholder(i.currentItem.find("tr").eq(0),u("<tr>",i.document[0]).appendTo(t)):"tr"===o?i._createTrPlaceholder(i.currentItem,t):"img"===o&&t.attr("src",i.currentItem.attr("src")),s||t.css("visibility","hidden"),t},update:function(t,e){s&&!r.forcePlaceholderSize||(e.height()&&(!r.forcePlaceholderSize||"tbody"!==o&&"tr"!==o)||e.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),e.width())||e.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10))}}),i.placeholder=u(r.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),r.placeholder.update(i,i.placeholder)},_createTrPlaceholder:function(t,e){var i=this;t.children().each(function(){u("<td>&#160;</td>",i.document[0]).attr("colspan",u(this).attr("colspan")||1).appendTo(e)})},_contactContainers:function(t){for(var e,i,s,o,r,n,h,a,l,c=null,p=null,f=this.containers.length-1;0<=f;f--)u.contains(this.currentItem[0],this.containers[f].element[0])||(this._intersectsWith(this.containers[f].containerCache)?c&&u.contains(this.containers[f].element[0],c.element[0])||(c=this.containers[f],p=f):this.containers[f].containerCache.over&&(this.containers[f]._trigger("out",t,this._uiHash(this)),this.containers[f].containerCache.over=0));if(c)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(i=1e4,s=null,o=(a=c.floating||this._isFloating(this.currentItem))?"left":"top",r=a?"width":"height",l=a?"pageX":"pageY",e=this.items.length-1;0<=e;e--)u.contains(this.containers[p].element[0],this.items[e].item[0])&&this.items[e].item[0]!==this.currentItem[0]&&(n=this.items[e].item.offset()[o],h=!1,t[l]-n>this.items[e][r]/2&&(h=!0),Math.abs(t[l]-n)<i)&&(i=Math.abs(t[l]-n),s=this.items[e],this.direction=h?"up":"down");(s||this.options.dropOnEmpty)&&(this.currentContainer===this.containers[p]?this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1):(s?this._rearrange(t,s,null,!0):this._rearrange(t,null,this.containers[p].element,!0),this._trigger("change",t,this._uiHash()),this.containers[p]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.scrollParent=this.placeholder.scrollParent(),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1))}},_createHelper:function(t){var e=this.options,t="function"==typeof e.helper?u(e.helper.apply(this.element[0],[t,this.currentItem])):"clone"===e.helper?this.currentItem.clone():this.currentItem;return t.parents("body").length||this.appendTo[0].appendChild(t[0]),t[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),t[0].style.width&&!e.forceHelperSize||t.width(this.currentItem.width()),t[0].style.height&&!e.forceHelperSize||t.height(this.currentItem.height()),t},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),"left"in(t=Array.isArray(t)?{left:+t[0],top:+t[1]||0}:t)&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&u.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),{top:(t=this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&u.ui.ie?{top:0,left:0}:t).top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){var t;return"relative"===this.cssPosition?{top:(t=this.currentItem.position()).top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}:{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i=this.options;"parent"===i.containment&&(i.containment=this.helper[0].parentNode),"document"!==i.containment&&"window"!==i.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===i.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===i.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(i.containment)||(t=u(i.containment)[0],i=u(i.containment).offset(),e="hidden"!==u(t).css("overflow"),this.containment=[i.left+(parseInt(u(t).css("borderLeftWidth"),10)||0)+(parseInt(u(t).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(u(t).css("borderTopWidth"),10)||0)+(parseInt(u(t).css("paddingTop"),10)||0)-this.margins.top,i.left+(e?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(u(t).css("borderLeftWidth"),10)||0)-(parseInt(u(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(e?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(u(t).css("borderTopWidth"),10)||0)-(parseInt(u(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,e){e=e||this.position;var t="absolute"===t?1:-1,i="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&u.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,s=/(html|body)/i.test(i[0].tagName);return{top:e.top+this.offset.relative.top*t+this.offset.parent.top*t-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():s?0:i.scrollTop())*t,left:e.left+this.offset.relative.left*t+this.offset.parent.left*t-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():s?0:i.scrollLeft())*t}},_generatePosition:function(t){var e=this.options,i=t.pageX,s=t.pageY,o="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&u.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,r=/(html|body)/i.test(o[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(i=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(i=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3])&&(s=this.containment[3]+this.offset.click.top),e.grid)&&(t=this.originalPageY+Math.round((s-this.originalPageY)/e.grid[1])*e.grid[1],s=!this.containment||t-this.offset.click.top>=this.containment[1]&&t-this.offset.click.top<=this.containment[3]?t:t-this.offset.click.top>=this.containment[1]?t-e.grid[1]:t+e.grid[1],t=this.originalPageX+Math.round((i-this.originalPageX)/e.grid[0])*e.grid[0],i=!this.containment||t-this.offset.click.left>=this.containment[0]&&t-this.offset.click.left<=this.containment[2]?t:t-this.offset.click.left>=this.containment[0]?t-e.grid[0]:t+e.grid[0]),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():r?0:o.scrollTop()),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():r?0:o.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay(function(){o===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function o(e,i,s){return function(t){s._trigger(e,t,i._uiHash(i))}}for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this===this.currentContainer||e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer))),i=this.containers.length-1;0<=i;i--)e||s.push(o("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(o("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i<s.length;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===u.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var e=t||this;return{helper:e.helper,placeholder:e.placeholder||u([]),position:e.position,originalPosition:e.originalPosition,offset:e.positionAbs,item:e.currentItem,sender:t?t.element:null}}})});                                                                                                jquery/ui/spinner.js                                                                                0000644                 00000034142 15212564043 0010522 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Spinner 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Spinner
//>>group: Widgets
//>>description: Displays buttons to easily input numbers via the keyboard or mouse.
//>>docs: https://api.jqueryui.com/spinner/
//>>demos: https://jqueryui.com/spinner/
//>>css.structure: ../../themes/base/core.css
//>>css.structure: ../../themes/base/spinner.css
//>>css.theme: ../../themes/base/theme.css

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"./button",
			"../version",
			"../keycode",
			"../safe-active-element",
			"../widget"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

function spinnerModifier( fn ) {
	return function() {
		var previous = this.element.val();
		fn.apply( this, arguments );
		this._refresh();
		if ( previous !== this.element.val() ) {
			this._trigger( "change" );
		}
	};
}

$.widget( "ui.spinner", {
	version: "1.13.3",
	defaultElement: "<input>",
	widgetEventPrefix: "spin",
	options: {
		classes: {
			"ui-spinner": "ui-corner-all",
			"ui-spinner-down": "ui-corner-br",
			"ui-spinner-up": "ui-corner-tr"
		},
		culture: null,
		icons: {
			down: "ui-icon-triangle-1-s",
			up: "ui-icon-triangle-1-n"
		},
		incremental: true,
		max: null,
		min: null,
		numberFormat: null,
		page: 10,
		step: 1,

		change: null,
		spin: null,
		start: null,
		stop: null
	},

	_create: function() {

		// handle string values that need to be parsed
		this._setOption( "max", this.options.max );
		this._setOption( "min", this.options.min );
		this._setOption( "step", this.options.step );

		// Only format if there is a value, prevents the field from being marked
		// as invalid in Firefox, see #9573.
		if ( this.value() !== "" ) {

			// Format the value, but don't constrain.
			this._value( this.element.val(), true );
		}

		this._draw();
		this._on( this._events );
		this._refresh();

		// Turning off autocomplete prevents the browser from remembering the
		// value when navigating through history, so we re-enable autocomplete
		// if the page is unloaded before the widget is destroyed. #7790
		this._on( this.window, {
			beforeunload: function() {
				this.element.removeAttr( "autocomplete" );
			}
		} );
	},

	_getCreateOptions: function() {
		var options = this._super();
		var element = this.element;

		$.each( [ "min", "max", "step" ], function( i, option ) {
			var value = element.attr( option );
			if ( value != null && value.length ) {
				options[ option ] = value;
			}
		} );

		return options;
	},

	_events: {
		keydown: function( event ) {
			if ( this._start( event ) && this._keydown( event ) ) {
				event.preventDefault();
			}
		},
		keyup: "_stop",
		focus: function() {
			this.previous = this.element.val();
		},
		blur: function( event ) {
			if ( this.cancelBlur ) {
				delete this.cancelBlur;
				return;
			}

			this._stop();
			this._refresh();
			if ( this.previous !== this.element.val() ) {
				this._trigger( "change", event );
			}
		},
		mousewheel: function( event, delta ) {
			var activeElement = $.ui.safeActiveElement( this.document[ 0 ] );
			var isActive = this.element[ 0 ] === activeElement;

			if ( !isActive || !delta ) {
				return;
			}

			if ( !this.spinning && !this._start( event ) ) {
				return false;
			}

			this._spin( ( delta > 0 ? 1 : -1 ) * this.options.step, event );
			clearTimeout( this.mousewheelTimer );
			this.mousewheelTimer = this._delay( function() {
				if ( this.spinning ) {
					this._stop( event );
				}
			}, 100 );
			event.preventDefault();
		},
		"mousedown .ui-spinner-button": function( event ) {
			var previous;

			// We never want the buttons to have focus; whenever the user is
			// interacting with the spinner, the focus should be on the input.
			// If the input is focused then this.previous is properly set from
			// when the input first received focus. If the input is not focused
			// then we need to set this.previous based on the value before spinning.
			previous = this.element[ 0 ] === $.ui.safeActiveElement( this.document[ 0 ] ) ?
				this.previous : this.element.val();
			function checkFocus() {
				var isActive = this.element[ 0 ] === $.ui.safeActiveElement( this.document[ 0 ] );
				if ( !isActive ) {
					this.element.trigger( "focus" );
					this.previous = previous;

					// support: IE
					// IE sets focus asynchronously, so we need to check if focus
					// moved off of the input because the user clicked on the button.
					this._delay( function() {
						this.previous = previous;
					} );
				}
			}

			// Ensure focus is on (or stays on) the text field
			event.preventDefault();
			checkFocus.call( this );

			// Support: IE
			// IE doesn't prevent moving focus even with event.preventDefault()
			// so we set a flag to know when we should ignore the blur event
			// and check (again) if focus moved off of the input.
			this.cancelBlur = true;
			this._delay( function() {
				delete this.cancelBlur;
				checkFocus.call( this );
			} );

			if ( this._start( event ) === false ) {
				return;
			}

			this._repeat( null, $( event.currentTarget )
				.hasClass( "ui-spinner-up" ) ? 1 : -1, event );
		},
		"mouseup .ui-spinner-button": "_stop",
		"mouseenter .ui-spinner-button": function( event ) {

			// button will add ui-state-active if mouse was down while mouseleave and kept down
			if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) {
				return;
			}

			if ( this._start( event ) === false ) {
				return false;
			}
			this._repeat( null, $( event.currentTarget )
				.hasClass( "ui-spinner-up" ) ? 1 : -1, event );
		},

		// TODO: do we really want to consider this a stop?
		// shouldn't we just stop the repeater and wait until mouseup before
		// we trigger the stop event?
		"mouseleave .ui-spinner-button": "_stop"
	},

	// Support mobile enhanced option and make backcompat more sane
	_enhance: function() {
		this.uiSpinner = this.element
			.attr( "autocomplete", "off" )
			.wrap( "<span>" )
			.parent()

				// Add buttons
				.append(
					"<a></a><a></a>"
				);
	},

	_draw: function() {
		this._enhance();

		this._addClass( this.uiSpinner, "ui-spinner", "ui-widget ui-widget-content" );
		this._addClass( "ui-spinner-input" );

		this.element.attr( "role", "spinbutton" );

		// Button bindings
		this.buttons = this.uiSpinner.children( "a" )
			.attr( "tabIndex", -1 )
			.attr( "aria-hidden", true )
			.button( {
				classes: {
					"ui-button": ""
				}
			} );

		// TODO: Right now button does not support classes this is already updated in button PR
		this._removeClass( this.buttons, "ui-corner-all" );

		this._addClass( this.buttons.first(), "ui-spinner-button ui-spinner-up" );
		this._addClass( this.buttons.last(), "ui-spinner-button ui-spinner-down" );
		this.buttons.first().button( {
			"icon": this.options.icons.up,
			"showLabel": false
		} );
		this.buttons.last().button( {
			"icon": this.options.icons.down,
			"showLabel": false
		} );

		// IE 6 doesn't understand height: 50% for the buttons
		// unless the wrapper has an explicit height
		if ( this.buttons.height() > Math.ceil( this.uiSpinner.height() * 0.5 ) &&
				this.uiSpinner.height() > 0 ) {
			this.uiSpinner.height( this.uiSpinner.height() );
		}
	},

	_keydown: function( event ) {
		var options = this.options,
			keyCode = $.ui.keyCode;

		switch ( event.keyCode ) {
		case keyCode.UP:
			this._repeat( null, 1, event );
			return true;
		case keyCode.DOWN:
			this._repeat( null, -1, event );
			return true;
		case keyCode.PAGE_UP:
			this._repeat( null, options.page, event );
			return true;
		case keyCode.PAGE_DOWN:
			this._repeat( null, -options.page, event );
			return true;
		}

		return false;
	},

	_start: function( event ) {
		if ( !this.spinning && this._trigger( "start", event ) === false ) {
			return false;
		}

		if ( !this.counter ) {
			this.counter = 1;
		}
		this.spinning = true;
		return true;
	},

	_repeat: function( i, steps, event ) {
		i = i || 500;

		clearTimeout( this.timer );
		this.timer = this._delay( function() {
			this._repeat( 40, steps, event );
		}, i );

		this._spin( steps * this.options.step, event );
	},

	_spin: function( step, event ) {
		var value = this.value() || 0;

		if ( !this.counter ) {
			this.counter = 1;
		}

		value = this._adjustValue( value + step * this._increment( this.counter ) );

		if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false ) {
			this._value( value );
			this.counter++;
		}
	},

	_increment: function( i ) {
		var incremental = this.options.incremental;

		if ( incremental ) {
			return typeof incremental === "function" ?
				incremental( i ) :
				Math.floor( i * i * i / 50000 - i * i / 500 + 17 * i / 200 + 1 );
		}

		return 1;
	},

	_precision: function() {
		var precision = this._precisionOf( this.options.step );
		if ( this.options.min !== null ) {
			precision = Math.max( precision, this._precisionOf( this.options.min ) );
		}
		return precision;
	},

	_precisionOf: function( num ) {
		var str = num.toString(),
			decimal = str.indexOf( "." );
		return decimal === -1 ? 0 : str.length - decimal - 1;
	},

	_adjustValue: function( value ) {
		var base, aboveMin,
			options = this.options;

		// Make sure we're at a valid step
		// - find out where we are relative to the base (min or 0)
		base = options.min !== null ? options.min : 0;
		aboveMin = value - base;

		// - round to the nearest step
		aboveMin = Math.round( aboveMin / options.step ) * options.step;

		// - rounding is based on 0, so adjust back to our base
		value = base + aboveMin;

		// Fix precision from bad JS floating point math
		value = parseFloat( value.toFixed( this._precision() ) );

		// Clamp the value
		if ( options.max !== null && value > options.max ) {
			return options.max;
		}
		if ( options.min !== null && value < options.min ) {
			return options.min;
		}

		return value;
	},

	_stop: function( event ) {
		if ( !this.spinning ) {
			return;
		}

		clearTimeout( this.timer );
		clearTimeout( this.mousewheelTimer );
		this.counter = 0;
		this.spinning = false;
		this._trigger( "stop", event );
	},

	_setOption: function( key, value ) {
		var prevValue, first, last;

		if ( key === "culture" || key === "numberFormat" ) {
			prevValue = this._parse( this.element.val() );
			this.options[ key ] = value;
			this.element.val( this._format( prevValue ) );
			return;
		}

		if ( key === "max" || key === "min" || key === "step" ) {
			if ( typeof value === "string" ) {
				value = this._parse( value );
			}
		}
		if ( key === "icons" ) {
			first = this.buttons.first().find( ".ui-icon" );
			this._removeClass( first, null, this.options.icons.up );
			this._addClass( first, null, value.up );
			last = this.buttons.last().find( ".ui-icon" );
			this._removeClass( last, null, this.options.icons.down );
			this._addClass( last, null, value.down );
		}

		this._super( key, value );
	},

	_setOptionDisabled: function( value ) {
		this._super( value );

		this._toggleClass( this.uiSpinner, null, "ui-state-disabled", !!value );
		this.element.prop( "disabled", !!value );
		this.buttons.button( value ? "disable" : "enable" );
	},

	_setOptions: spinnerModifier( function( options ) {
		this._super( options );
	} ),

	_parse: function( val ) {
		if ( typeof val === "string" && val !== "" ) {
			val = window.Globalize && this.options.numberFormat ?
				Globalize.parseFloat( val, 10, this.options.culture ) : +val;
		}
		return val === "" || isNaN( val ) ? null : val;
	},

	_format: function( value ) {
		if ( value === "" ) {
			return "";
		}
		return window.Globalize && this.options.numberFormat ?
			Globalize.format( value, this.options.numberFormat, this.options.culture ) :
			value;
	},

	_refresh: function() {
		this.element.attr( {
			"aria-valuemin": this.options.min,
			"aria-valuemax": this.options.max,

			// TODO: what should we do with values that can't be parsed?
			"aria-valuenow": this._parse( this.element.val() )
		} );
	},

	isValid: function() {
		var value = this.value();

		// Null is invalid
		if ( value === null ) {
			return false;
		}

		// If value gets adjusted, it's invalid
		return value === this._adjustValue( value );
	},

	// Update the value without triggering change
	_value: function( value, allowAny ) {
		var parsed;
		if ( value !== "" ) {
			parsed = this._parse( value );
			if ( parsed !== null ) {
				if ( !allowAny ) {
					parsed = this._adjustValue( parsed );
				}
				value = this._format( parsed );
			}
		}
		this.element.val( value );
		this._refresh();
	},

	_destroy: function() {
		this.element
			.prop( "disabled", false )
			.removeAttr( "autocomplete role aria-valuemin aria-valuemax aria-valuenow" );

		this.uiSpinner.replaceWith( this.element );
	},

	stepUp: spinnerModifier( function( steps ) {
		this._stepUp( steps );
	} ),
	_stepUp: function( steps ) {
		if ( this._start() ) {
			this._spin( ( steps || 1 ) * this.options.step );
			this._stop();
		}
	},

	stepDown: spinnerModifier( function( steps ) {
		this._stepDown( steps );
	} ),
	_stepDown: function( steps ) {
		if ( this._start() ) {
			this._spin( ( steps || 1 ) * -this.options.step );
			this._stop();
		}
	},

	pageUp: spinnerModifier( function( pages ) {
		this._stepUp( ( pages || 1 ) * this.options.page );
	} ),

	pageDown: spinnerModifier( function( pages ) {
		this._stepDown( ( pages || 1 ) * this.options.page );
	} ),

	value: function( newVal ) {
		if ( !arguments.length ) {
			return this._parse( this.element.val() );
		}
		spinnerModifier( this._value ).call( this, newVal );
	},

	widget: function() {
		return this.uiSpinner;
	}
} );

// DEPRECATED
// TODO: switch return back to widget declaration at top of file when this is removed
if ( $.uiBackCompat !== false ) {

	// Backcompat for spinner html extension points
	$.widget( "ui.spinner", $.ui.spinner, {
		_enhance: function() {
			this.uiSpinner = this.element
				.attr( "autocomplete", "off" )
				.wrap( this._uiSpinnerHtml() )
				.parent()

					// Add buttons
					.append( this._buttonHtml() );
		},
		_uiSpinnerHtml: function() {
			return "<span>";
		},

		_buttonHtml: function() {
			return "<a></a><a></a>";
		}
	} );
}

return $.ui.spinner;

} );
                                                                                                                                                                                                                                                                                                                                                                                                                              jquery/ui/spinner.min.js                                                                            0000644                 00000016774 15212564043 0011317 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Spinner 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./button","../version","../keycode","../safe-active-element","../widget"],t):t(jQuery)}(function(o){"use strict";function i(i){return function(){var t=this.element.val();i.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}return o.widget("ui.spinner",{version:"1.13.3",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e=this._super(),s=this.element;return o.each(["min","max","step"],function(t,i){var n=s.attr(i);null!=n&&n.length&&(e[i]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t))},mousewheel:function(t,i){var n=o.ui.safeActiveElement(this.document[0]);if(this.element[0]===n&&i){if(!this.spinning&&!this._start(t))return!1;this._spin((0<i?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(t){var i;function n(){this.element[0]!==o.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=i,this._delay(function(){this.previous=i}))}i=this.element[0]===o.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),t.preventDefault(),n.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,n.call(this)}),!1!==this._start(t)&&this._repeat(null,o(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(o(t.currentTarget).hasClass("ui-state-active"))return!1!==this._start(t)&&void this._repeat(null,o(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&0<this.uiSpinner.height()&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(t){var i=this.options,n=o.ui.keyCode;switch(t.keyCode){case n.UP:return this._repeat(null,1,t),!0;case n.DOWN:return this._repeat(null,-1,t),!0;case n.PAGE_UP:return this._repeat(null,i.page,t),!0;case n.PAGE_DOWN:return this._repeat(null,-i.page,t),!0}return!1},_start:function(t){return!(!this.spinning&&!1===this._trigger("start",t))&&(this.counter||(this.counter=1),this.spinning=!0)},_repeat:function(t,i,n){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,i,n)},t),this._spin(i*this.options.step,n)},_spin:function(t,i){var n=this.value()||0;this.counter||(this.counter=1),n=this._adjustValue(n+t*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",i,{value:n})||(this._value(n),this.counter++)},_increment:function(t){var i=this.options.incremental;return i?"function"==typeof i?i(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return t=null!==this.options.min?Math.max(t,this._precisionOf(this.options.min)):t},_precisionOf:function(t){var t=t.toString(),i=t.indexOf(".");return-1===i?0:t.length-i-1},_adjustValue:function(t){var i=this.options,n=null!==i.min?i.min:0,e=t-n;return t=n+Math.round(e/i.step)*i.step,t=parseFloat(t.toFixed(this._precision())),null!==i.max&&t>i.max?i.max:null!==i.min&&t<i.min?i.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,i){var n;"culture"===t||"numberFormat"===t?(n=this._parse(this.element.val()),this.options[t]=i,this.element.val(this._format(n))):("max"!==t&&"min"!==t&&"step"!==t||"string"==typeof i&&(i=this._parse(i)),"icons"===t&&(n=this.buttons.first().find(".ui-icon"),this._removeClass(n,null,this.options.icons.up),this._addClass(n,null,i.up),n=this.buttons.last().find(".ui-icon"),this._removeClass(n,null,this.options.icons.down),this._addClass(n,null,i.down)),this._super(t,i))},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:i(function(t){this._super(t)}),_parse:function(t){return""===(t="string"==typeof t&&""!==t?window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t:t)||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null!==t&&t===this._adjustValue(t)},_value:function(t,i){var n;""!==t&&null!==(n=this._parse(t))&&(i||(n=this._adjustValue(n)),t=this._format(n)),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:i(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:i(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:i(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:i(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){if(!arguments.length)return this._parse(this.element.val());i(this._value).call(this,t)},widget:function(){return this.uiSpinner}}),!1!==o.uiBackCompat&&o.widget("ui.spinner",o.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}}),o.ui.spinner});    jquery/ui/tabs.js                                                                                   0000644                 00000056160 15212564043 0010001 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Tabs 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Tabs
//>>group: Widgets
//>>description: Transforms a set of container elements into a tab structure.
//>>docs: https://api.jqueryui.com/tabs/
//>>demos: https://jqueryui.com/tabs/
//>>css.structure: ../../themes/base/core.css
//>>css.structure: ../../themes/base/tabs.css
//>>css.theme: ../../themes/base/theme.css

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../keycode",
			"../safe-active-element",
			"../unique-id",
			"../version",
			"../widget"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

$.widget( "ui.tabs", {
	version: "1.13.3",
	delay: 300,
	options: {
		active: null,
		classes: {
			"ui-tabs": "ui-corner-all",
			"ui-tabs-nav": "ui-corner-all",
			"ui-tabs-panel": "ui-corner-bottom",
			"ui-tabs-tab": "ui-corner-top"
		},
		collapsible: false,
		event: "click",
		heightStyle: "content",
		hide: null,
		show: null,

		// Callbacks
		activate: null,
		beforeActivate: null,
		beforeLoad: null,
		load: null
	},

	_isLocal: ( function() {
		var rhash = /#.*$/;

		return function( anchor ) {
			var anchorUrl, locationUrl;

			anchorUrl = anchor.href.replace( rhash, "" );
			locationUrl = location.href.replace( rhash, "" );

			// Decoding may throw an error if the URL isn't UTF-8 (#9518)
			try {
				anchorUrl = decodeURIComponent( anchorUrl );
			} catch ( error ) {}
			try {
				locationUrl = decodeURIComponent( locationUrl );
			} catch ( error ) {}

			return anchor.hash.length > 1 && anchorUrl === locationUrl;
		};
	} )(),

	_create: function() {
		var that = this,
			options = this.options;

		this.running = false;

		this._addClass( "ui-tabs", "ui-widget ui-widget-content" );
		this._toggleClass( "ui-tabs-collapsible", null, options.collapsible );

		this._processTabs();
		options.active = this._initialActive();

		// Take disabling tabs via class attribute from HTML
		// into account and update option properly.
		if ( Array.isArray( options.disabled ) ) {
			options.disabled = $.uniqueSort( options.disabled.concat(
				$.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {
					return that.tabs.index( li );
				} )
			) ).sort();
		}

		// Check for length avoids error when initializing empty list
		if ( this.options.active !== false && this.anchors.length ) {
			this.active = this._findActive( options.active );
		} else {
			this.active = $();
		}

		this._refresh();

		if ( this.active.length ) {
			this.load( options.active );
		}
	},

	_initialActive: function() {
		var active = this.options.active,
			collapsible = this.options.collapsible,
			locationHash = location.hash.substring( 1 );

		if ( active === null ) {

			// check the fragment identifier in the URL
			if ( locationHash ) {
				this.tabs.each( function( i, tab ) {
					if ( $( tab ).attr( "aria-controls" ) === locationHash ) {
						active = i;
						return false;
					}
				} );
			}

			// Check for a tab marked active via a class
			if ( active === null ) {
				active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );
			}

			// No active tab, set to false
			if ( active === null || active === -1 ) {
				active = this.tabs.length ? 0 : false;
			}
		}

		// Handle numbers: negative, out of range
		if ( active !== false ) {
			active = this.tabs.index( this.tabs.eq( active ) );
			if ( active === -1 ) {
				active = collapsible ? false : 0;
			}
		}

		// Don't allow collapsible: false and active: false
		if ( !collapsible && active === false && this.anchors.length ) {
			active = 0;
		}

		return active;
	},

	_getCreateEventData: function() {
		return {
			tab: this.active,
			panel: !this.active.length ? $() : this._getPanelForTab( this.active )
		};
	},

	_tabKeydown: function( event ) {
		var focusedTab = $( $.ui.safeActiveElement( this.document[ 0 ] ) ).closest( "li" ),
			selectedIndex = this.tabs.index( focusedTab ),
			goingForward = true;

		if ( this._handlePageNav( event ) ) {
			return;
		}

		switch ( event.keyCode ) {
		case $.ui.keyCode.RIGHT:
		case $.ui.keyCode.DOWN:
			selectedIndex++;
			break;
		case $.ui.keyCode.UP:
		case $.ui.keyCode.LEFT:
			goingForward = false;
			selectedIndex--;
			break;
		case $.ui.keyCode.END:
			selectedIndex = this.anchors.length - 1;
			break;
		case $.ui.keyCode.HOME:
			selectedIndex = 0;
			break;
		case $.ui.keyCode.SPACE:

			// Activate only, no collapsing
			event.preventDefault();
			clearTimeout( this.activating );
			this._activate( selectedIndex );
			return;
		case $.ui.keyCode.ENTER:

			// Toggle (cancel delayed activation, allow collapsing)
			event.preventDefault();
			clearTimeout( this.activating );

			// Determine if we should collapse or activate
			this._activate( selectedIndex === this.options.active ? false : selectedIndex );
			return;
		default:
			return;
		}

		// Focus the appropriate tab, based on which key was pressed
		event.preventDefault();
		clearTimeout( this.activating );
		selectedIndex = this._focusNextTab( selectedIndex, goingForward );

		// Navigating with control/command key will prevent automatic activation
		if ( !event.ctrlKey && !event.metaKey ) {

			// Update aria-selected immediately so that AT think the tab is already selected.
			// Otherwise AT may confuse the user by stating that they need to activate the tab,
			// but the tab will already be activated by the time the announcement finishes.
			focusedTab.attr( "aria-selected", "false" );
			this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );

			this.activating = this._delay( function() {
				this.option( "active", selectedIndex );
			}, this.delay );
		}
	},

	_panelKeydown: function( event ) {
		if ( this._handlePageNav( event ) ) {
			return;
		}

		// Ctrl+up moves focus to the current tab
		if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {
			event.preventDefault();
			this.active.trigger( "focus" );
		}
	},

	// Alt+page up/down moves focus to the previous/next tab (and activates)
	_handlePageNav: function( event ) {
		if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {
			this._activate( this._focusNextTab( this.options.active - 1, false ) );
			return true;
		}
		if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {
			this._activate( this._focusNextTab( this.options.active + 1, true ) );
			return true;
		}
	},

	_findNextTab: function( index, goingForward ) {
		var lastTabIndex = this.tabs.length - 1;

		function constrain() {
			if ( index > lastTabIndex ) {
				index = 0;
			}
			if ( index < 0 ) {
				index = lastTabIndex;
			}
			return index;
		}

		while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {
			index = goingForward ? index + 1 : index - 1;
		}

		return index;
	},

	_focusNextTab: function( index, goingForward ) {
		index = this._findNextTab( index, goingForward );
		this.tabs.eq( index ).trigger( "focus" );
		return index;
	},

	_setOption: function( key, value ) {
		if ( key === "active" ) {

			// _activate() will handle invalid values and update this.options
			this._activate( value );
			return;
		}

		this._super( key, value );

		if ( key === "collapsible" ) {
			this._toggleClass( "ui-tabs-collapsible", null, value );

			// Setting collapsible: false while collapsed; open first panel
			if ( !value && this.options.active === false ) {
				this._activate( 0 );
			}
		}

		if ( key === "event" ) {
			this._setupEvents( value );
		}

		if ( key === "heightStyle" ) {
			this._setupHeightStyle( value );
		}
	},

	_sanitizeSelector: function( hash ) {
		return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : "";
	},

	refresh: function() {
		var options = this.options,
			lis = this.tablist.children( ":has(a[href])" );

		// Get disabled tabs from class attribute from HTML
		// this will get converted to a boolean if needed in _refresh()
		options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) {
			return lis.index( tab );
		} );

		this._processTabs();

		// Was collapsed or no tabs
		if ( options.active === false || !this.anchors.length ) {
			options.active = false;
			this.active = $();

		// was active, but active tab is gone
		} else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {

			// all remaining tabs are disabled
			if ( this.tabs.length === options.disabled.length ) {
				options.active = false;
				this.active = $();

			// activate previous tab
			} else {
				this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );
			}

		// was active, active tab still exists
		} else {

			// make sure active index is correct
			options.active = this.tabs.index( this.active );
		}

		this._refresh();
	},

	_refresh: function() {
		this._setOptionDisabled( this.options.disabled );
		this._setupEvents( this.options.event );
		this._setupHeightStyle( this.options.heightStyle );

		this.tabs.not( this.active ).attr( {
			"aria-selected": "false",
			"aria-expanded": "false",
			tabIndex: -1
		} );
		this.panels.not( this._getPanelForTab( this.active ) )
			.hide()
			.attr( {
				"aria-hidden": "true"
			} );

		// Make sure one tab is in the tab order
		if ( !this.active.length ) {
			this.tabs.eq( 0 ).attr( "tabIndex", 0 );
		} else {
			this.active
				.attr( {
					"aria-selected": "true",
					"aria-expanded": "true",
					tabIndex: 0
				} );
			this._addClass( this.active, "ui-tabs-active", "ui-state-active" );
			this._getPanelForTab( this.active )
				.show()
				.attr( {
					"aria-hidden": "false"
				} );
		}
	},

	_processTabs: function() {
		var that = this,
			prevTabs = this.tabs,
			prevAnchors = this.anchors,
			prevPanels = this.panels;

		this.tablist = this._getList().attr( "role", "tablist" );
		this._addClass( this.tablist, "ui-tabs-nav",
			"ui-helper-reset ui-helper-clearfix ui-widget-header" );

		// Prevent users from focusing disabled tabs via click
		this.tablist
			.on( "mousedown" + this.eventNamespace, "> li", function( event ) {
				if ( $( this ).is( ".ui-state-disabled" ) ) {
					event.preventDefault();
				}
			} )

			// Support: IE <9
			// Preventing the default action in mousedown doesn't prevent IE
			// from focusing the element, so if the anchor gets focused, blur.
			// We don't have to worry about focusing the previously focused
			// element since clicking on a non-focusable element should focus
			// the body anyway.
			.on( "focus" + this.eventNamespace, ".ui-tabs-anchor", function() {
				if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) {
					this.blur();
				}
			} );

		this.tabs = this.tablist.find( "> li:has(a[href])" )
			.attr( {
				role: "tab",
				tabIndex: -1
			} );
		this._addClass( this.tabs, "ui-tabs-tab", "ui-state-default" );

		this.anchors = this.tabs.map( function() {
			return $( "a", this )[ 0 ];
		} )
			.attr( {
				tabIndex: -1
			} );
		this._addClass( this.anchors, "ui-tabs-anchor" );

		this.panels = $();

		this.anchors.each( function( i, anchor ) {
			var selector, panel, panelId,
				anchorId = $( anchor ).uniqueId().attr( "id" ),
				tab = $( anchor ).closest( "li" ),
				originalAriaControls = tab.attr( "aria-controls" );

			// Inline tab
			if ( that._isLocal( anchor ) ) {
				selector = anchor.hash;
				panelId = selector.substring( 1 );
				panel = that.element.find( that._sanitizeSelector( selector ) );

			// remote tab
			} else {

				// If the tab doesn't already have aria-controls,
				// generate an id by using a throw-away element
				panelId = tab.attr( "aria-controls" ) || $( {} ).uniqueId()[ 0 ].id;
				selector = "#" + panelId;
				panel = that.element.find( selector );
				if ( !panel.length ) {
					panel = that._createPanel( panelId );
					panel.insertAfter( that.panels[ i - 1 ] || that.tablist );
				}
				panel.attr( "aria-live", "polite" );
			}

			if ( panel.length ) {
				that.panels = that.panels.add( panel );
			}
			if ( originalAriaControls ) {
				tab.data( "ui-tabs-aria-controls", originalAriaControls );
			}
			tab.attr( {
				"aria-controls": panelId,
				"aria-labelledby": anchorId
			} );
			panel.attr( "aria-labelledby", anchorId );
		} );

		this.panels.attr( "role", "tabpanel" );
		this._addClass( this.panels, "ui-tabs-panel", "ui-widget-content" );

		// Avoid memory leaks (#10056)
		if ( prevTabs ) {
			this._off( prevTabs.not( this.tabs ) );
			this._off( prevAnchors.not( this.anchors ) );
			this._off( prevPanels.not( this.panels ) );
		}
	},

	// Allow overriding how to find the list for rare usage scenarios (#7715)
	_getList: function() {
		return this.tablist || this.element.find( "ol, ul" ).eq( 0 );
	},

	_createPanel: function( id ) {
		return $( "<div>" )
			.attr( "id", id )
			.data( "ui-tabs-destroy", true );
	},

	_setOptionDisabled: function( disabled ) {
		var currentItem, li, i;

		if ( Array.isArray( disabled ) ) {
			if ( !disabled.length ) {
				disabled = false;
			} else if ( disabled.length === this.anchors.length ) {
				disabled = true;
			}
		}

		// Disable tabs
		for ( i = 0; ( li = this.tabs[ i ] ); i++ ) {
			currentItem = $( li );
			if ( disabled === true || $.inArray( i, disabled ) !== -1 ) {
				currentItem.attr( "aria-disabled", "true" );
				this._addClass( currentItem, null, "ui-state-disabled" );
			} else {
				currentItem.removeAttr( "aria-disabled" );
				this._removeClass( currentItem, null, "ui-state-disabled" );
			}
		}

		this.options.disabled = disabled;

		this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null,
			disabled === true );
	},

	_setupEvents: function( event ) {
		var events = {};
		if ( event ) {
			$.each( event.split( " " ), function( index, eventName ) {
				events[ eventName ] = "_eventHandler";
			} );
		}

		this._off( this.anchors.add( this.tabs ).add( this.panels ) );

		// Always prevent the default action, even when disabled
		this._on( true, this.anchors, {
			click: function( event ) {
				event.preventDefault();
			}
		} );
		this._on( this.anchors, events );
		this._on( this.tabs, { keydown: "_tabKeydown" } );
		this._on( this.panels, { keydown: "_panelKeydown" } );

		this._focusable( this.tabs );
		this._hoverable( this.tabs );
	},

	_setupHeightStyle: function( heightStyle ) {
		var maxHeight,
			parent = this.element.parent();

		if ( heightStyle === "fill" ) {
			maxHeight = parent.height();
			maxHeight -= this.element.outerHeight() - this.element.height();

			this.element.siblings( ":visible" ).each( function() {
				var elem = $( this ),
					position = elem.css( "position" );

				if ( position === "absolute" || position === "fixed" ) {
					return;
				}
				maxHeight -= elem.outerHeight( true );
			} );

			this.element.children().not( this.panels ).each( function() {
				maxHeight -= $( this ).outerHeight( true );
			} );

			this.panels.each( function() {
				$( this ).height( Math.max( 0, maxHeight -
					$( this ).innerHeight() + $( this ).height() ) );
			} )
				.css( "overflow", "auto" );
		} else if ( heightStyle === "auto" ) {
			maxHeight = 0;
			this.panels.each( function() {
				maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );
			} ).height( maxHeight );
		}
	},

	_eventHandler: function( event ) {
		var options = this.options,
			active = this.active,
			anchor = $( event.currentTarget ),
			tab = anchor.closest( "li" ),
			clickedIsActive = tab[ 0 ] === active[ 0 ],
			collapsing = clickedIsActive && options.collapsible,
			toShow = collapsing ? $() : this._getPanelForTab( tab ),
			toHide = !active.length ? $() : this._getPanelForTab( active ),
			eventData = {
				oldTab: active,
				oldPanel: toHide,
				newTab: collapsing ? $() : tab,
				newPanel: toShow
			};

		event.preventDefault();

		if ( tab.hasClass( "ui-state-disabled" ) ||

				// tab is already loading
				tab.hasClass( "ui-tabs-loading" ) ||

				// can't switch durning an animation
				this.running ||

				// click on active header, but not collapsible
				( clickedIsActive && !options.collapsible ) ||

				// allow canceling activation
				( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
			return;
		}

		options.active = collapsing ? false : this.tabs.index( tab );

		this.active = clickedIsActive ? $() : tab;
		if ( this.xhr ) {
			this.xhr.abort();
		}

		if ( !toHide.length && !toShow.length ) {
			$.error( "jQuery UI Tabs: Mismatching fragment identifier." );
		}

		if ( toShow.length ) {
			this.load( this.tabs.index( tab ), event );
		}
		this._toggle( event, eventData );
	},

	// Handles show/hide for selecting tabs
	_toggle: function( event, eventData ) {
		var that = this,
			toShow = eventData.newPanel,
			toHide = eventData.oldPanel;

		this.running = true;

		function complete() {
			that.running = false;
			that._trigger( "activate", event, eventData );
		}

		function show() {
			that._addClass( eventData.newTab.closest( "li" ), "ui-tabs-active", "ui-state-active" );

			if ( toShow.length && that.options.show ) {
				that._show( toShow, that.options.show, complete );
			} else {
				toShow.show();
				complete();
			}
		}

		// Start out by hiding, then showing, then completing
		if ( toHide.length && this.options.hide ) {
			this._hide( toHide, this.options.hide, function() {
				that._removeClass( eventData.oldTab.closest( "li" ),
					"ui-tabs-active", "ui-state-active" );
				show();
			} );
		} else {
			this._removeClass( eventData.oldTab.closest( "li" ),
				"ui-tabs-active", "ui-state-active" );
			toHide.hide();
			show();
		}

		toHide.attr( "aria-hidden", "true" );
		eventData.oldTab.attr( {
			"aria-selected": "false",
			"aria-expanded": "false"
		} );

		// If we're switching tabs, remove the old tab from the tab order.
		// If we're opening from collapsed state, remove the previous tab from the tab order.
		// If we're collapsing, then keep the collapsing tab in the tab order.
		if ( toShow.length && toHide.length ) {
			eventData.oldTab.attr( "tabIndex", -1 );
		} else if ( toShow.length ) {
			this.tabs.filter( function() {
				return $( this ).attr( "tabIndex" ) === 0;
			} )
				.attr( "tabIndex", -1 );
		}

		toShow.attr( "aria-hidden", "false" );
		eventData.newTab.attr( {
			"aria-selected": "true",
			"aria-expanded": "true",
			tabIndex: 0
		} );
	},

	_activate: function( index ) {
		var anchor,
			active = this._findActive( index );

		// Trying to activate the already active panel
		if ( active[ 0 ] === this.active[ 0 ] ) {
			return;
		}

		// Trying to collapse, simulate a click on the current active header
		if ( !active.length ) {
			active = this.active;
		}

		anchor = active.find( ".ui-tabs-anchor" )[ 0 ];
		this._eventHandler( {
			target: anchor,
			currentTarget: anchor,
			preventDefault: $.noop
		} );
	},

	_findActive: function( index ) {
		return index === false ? $() : this.tabs.eq( index );
	},

	_getIndex: function( index ) {

		// meta-function to give users option to provide a href string instead of a numerical index.
		if ( typeof index === "string" ) {
			index = this.anchors.index( this.anchors.filter( "[href$='" +
				$.escapeSelector( index ) + "']" ) );
		}

		return index;
	},

	_destroy: function() {
		if ( this.xhr ) {
			this.xhr.abort();
		}

		this.tablist
			.removeAttr( "role" )
			.off( this.eventNamespace );

		this.anchors
			.removeAttr( "role tabIndex" )
			.removeUniqueId();

		this.tabs.add( this.panels ).each( function() {
			if ( $.data( this, "ui-tabs-destroy" ) ) {
				$( this ).remove();
			} else {
				$( this ).removeAttr( "role tabIndex " +
					"aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded" );
			}
		} );

		this.tabs.each( function() {
			var li = $( this ),
				prev = li.data( "ui-tabs-aria-controls" );
			if ( prev ) {
				li
					.attr( "aria-controls", prev )
					.removeData( "ui-tabs-aria-controls" );
			} else {
				li.removeAttr( "aria-controls" );
			}
		} );

		this.panels.show();

		if ( this.options.heightStyle !== "content" ) {
			this.panels.css( "height", "" );
		}
	},

	enable: function( index ) {
		var disabled = this.options.disabled;
		if ( disabled === false ) {
			return;
		}

		if ( index === undefined ) {
			disabled = false;
		} else {
			index = this._getIndex( index );
			if ( Array.isArray( disabled ) ) {
				disabled = $.map( disabled, function( num ) {
					return num !== index ? num : null;
				} );
			} else {
				disabled = $.map( this.tabs, function( li, num ) {
					return num !== index ? num : null;
				} );
			}
		}
		this._setOptionDisabled( disabled );
	},

	disable: function( index ) {
		var disabled = this.options.disabled;
		if ( disabled === true ) {
			return;
		}

		if ( index === undefined ) {
			disabled = true;
		} else {
			index = this._getIndex( index );
			if ( $.inArray( index, disabled ) !== -1 ) {
				return;
			}
			if ( Array.isArray( disabled ) ) {
				disabled = $.merge( [ index ], disabled ).sort();
			} else {
				disabled = [ index ];
			}
		}
		this._setOptionDisabled( disabled );
	},

	load: function( index, event ) {
		index = this._getIndex( index );
		var that = this,
			tab = this.tabs.eq( index ),
			anchor = tab.find( ".ui-tabs-anchor" ),
			panel = this._getPanelForTab( tab ),
			eventData = {
				tab: tab,
				panel: panel
			},
			complete = function( jqXHR, status ) {
				if ( status === "abort" ) {
					that.panels.stop( false, true );
				}

				that._removeClass( tab, "ui-tabs-loading" );
				panel.removeAttr( "aria-busy" );

				if ( jqXHR === that.xhr ) {
					delete that.xhr;
				}
			};

		// Not remote
		if ( this._isLocal( anchor[ 0 ] ) ) {
			return;
		}

		this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );

		// Support: jQuery <1.8
		// jQuery <1.8 returns false if the request is canceled in beforeSend,
		// but as of 1.8, $.ajax() always returns a jqXHR object.
		if ( this.xhr && this.xhr.statusText !== "canceled" ) {
			this._addClass( tab, "ui-tabs-loading" );
			panel.attr( "aria-busy", "true" );

			this.xhr
				.done( function( response, status, jqXHR ) {

					// support: jQuery <1.8
					// https://bugs.jquery.com/ticket/11778
					setTimeout( function() {
						panel.html( response );
						that._trigger( "load", event, eventData );

						complete( jqXHR, status );
					}, 1 );
				} )
				.fail( function( jqXHR, status ) {

					// support: jQuery <1.8
					// https://bugs.jquery.com/ticket/11778
					setTimeout( function() {
						complete( jqXHR, status );
					}, 1 );
				} );
		}
	},

	_ajaxSettings: function( anchor, event, eventData ) {
		var that = this;
		return {

			// Support: IE <11 only
			// Strip any hash that exists to prevent errors with the Ajax request
			url: anchor.attr( "href" ).replace( /#.*$/, "" ),
			beforeSend: function( jqXHR, settings ) {
				return that._trigger( "beforeLoad", event,
					$.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) );
			}
		};
	},

	_getPanelForTab: function( tab ) {
		var id = $( tab ).attr( "aria-controls" );
		return this.element.find( this._sanitizeSelector( "#" + id ) );
	}
} );

// DEPRECATED
// TODO: Switch return back to widget declaration at top of file when this is removed
if ( $.uiBackCompat !== false ) {

	// Backcompat for ui-tab class (now ui-tabs-tab)
	$.widget( "ui.tabs", $.ui.tabs, {
		_processTabs: function() {
			this._superApply( arguments );
			this._addClass( this.tabs, "ui-tab" );
		}
	} );
}

return $.ui.tabs;

} );
                                                                                                                                                                                                                                                                                                                                                                                                                jquery/ui/tabs.min.js                                                                               0000644                 00000027350 15212564043 0010562 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Tabs 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","../keycode","../safe-active-element","../unique-id","../version","../widget"],t):t(jQuery)}(function(l){"use strict";var a;return l.widget("ui.tabs",{version:"1.13.3",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(a=/#.*$/,function(t){var e=t.href.replace(a,""),i=location.href.replace(a,"");try{e=decodeURIComponent(e)}catch(t){}try{i=decodeURIComponent(i)}catch(t){}return 1<t.hash.length&&e===i}),_create:function(){var e=this,t=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,t.collapsible),this._processTabs(),t.active=this._initialActive(),Array.isArray(t.disabled)&&(t.disabled=l.uniqueSort(t.disabled.concat(l.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(t.active):this.active=l(),this._refresh(),this.active.length&&this.load(t.active)},_initialActive:function(){var i=this.options.active,t=this.options.collapsible,a=location.hash.substring(1);return null===i&&(a&&this.tabs.each(function(t,e){if(l(e).attr("aria-controls")===a)return i=t,!1}),null!==(i=null===i?this.tabs.index(this.tabs.filter(".ui-tabs-active")):i)&&-1!==i||(i=!!this.tabs.length&&0)),!1!==i&&-1===(i=this.tabs.index(this.tabs.eq(i)))&&(i=!t&&0),i=!t&&!1===i&&this.anchors.length?0:i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):l()}},_tabKeydown:function(t){var e=l(l.ui.safeActiveElement(this.document[0])).closest("li"),i=this.tabs.index(e),a=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case l.ui.keyCode.RIGHT:case l.ui.keyCode.DOWN:i++;break;case l.ui.keyCode.UP:case l.ui.keyCode.LEFT:a=!1,i--;break;case l.ui.keyCode.END:i=this.anchors.length-1;break;case l.ui.keyCode.HOME:i=0;break;case l.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i);case l.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i!==this.options.active&&i);default:return}t.preventDefault(),clearTimeout(this.activating),i=this._focusNextTab(i,a),t.ctrlKey||t.metaKey||(e.attr("aria-selected","false"),this.tabs.eq(i).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",i)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===l.ui.keyCode.UP&&(t.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(t){return t.altKey&&t.keyCode===l.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===l.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,e){var i=this.tabs.length-1;for(;-1!==l.inArray(t=(t=i<t?0:t)<0?i:t,this.options.disabled);)t=e?t+1:t-1;return t},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){"active"===t?this._activate(e):(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||!1!==this.options.active||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e))},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,e=this.tablist.children(":has(a[href])");t.disabled=l.map(e.filter(".ui-state-disabled"),function(t){return e.index(t)}),this._processTabs(),!1!==t.active&&this.anchors.length?this.active.length&&!l.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=l()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=l()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var o=this,t=this.tabs,e=this.anchors,i=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(t){l(this).is(".ui-state-disabled")&&t.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){l(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return l("a",this)[0]}).attr({tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=l(),this.anchors.each(function(t,e){var i,a,s,n=l(e).uniqueId().attr("id"),h=l(e).closest("li"),r=h.attr("aria-controls");o._isLocal(e)?(s=(i=e.hash).substring(1),a=o.element.find(o._sanitizeSelector(i))):(s=h.attr("aria-controls")||l({}).uniqueId()[0].id,(a=o.element.find(i="#"+s)).length||(a=o._createPanel(s)).insertAfter(o.panels[t-1]||o.tablist),a.attr("aria-live","polite")),a.length&&(o.panels=o.panels.add(a)),r&&h.data("ui-tabs-aria-controls",r),h.attr({"aria-controls":s,"aria-labelledby":n}),a.attr("aria-labelledby",n)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),t&&(this._off(t.not(this.tabs)),this._off(e.not(this.anchors)),this._off(i.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(t){return l("<div>").attr("id",t).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(t){var e,i;for(Array.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1),i=0;e=this.tabs[i];i++)e=l(e),!0===t||-1!==l.inArray(i,t)?(e.attr("aria-disabled","true"),this._addClass(e,null,"ui-state-disabled")):(e.removeAttr("aria-disabled"),this._removeClass(e,null,"ui-state-disabled"));this.options.disabled=t,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===t)},_setupEvents:function(t){var i={};t&&l.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,e=this.element.parent();"fill"===t?(i=e.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=l(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=l(this).outerHeight(!0)}),this.panels.each(function(){l(this).height(Math.max(0,i-l(this).innerHeight()+l(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,l(this).height("").height())}).height(i))},_eventHandler:function(t){var e=this.options,i=this.active,a=l(t.currentTarget).closest("li"),s=a[0]===i[0],n=s&&e.collapsible,h=n?l():this._getPanelForTab(a),r=i.length?this._getPanelForTab(i):l(),i={oldTab:i,oldPanel:r,newTab:n?l():a,newPanel:h};t.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||s&&!e.collapsible||!1===this._trigger("beforeActivate",t,i)||(e.active=!n&&this.tabs.index(a),this.active=s?l():a,this.xhr&&this.xhr.abort(),r.length||h.length||l.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),t),this._toggle(t,i))},_toggle:function(t,e){var i=this,a=e.newPanel,s=e.oldPanel;function n(){i.running=!1,i._trigger("activate",t,e)}function h(){i._addClass(e.newTab.closest("li"),"ui-tabs-active","ui-state-active"),a.length&&i.options.show?i._show(a,i.options.show,n):(a.show(),n())}this.running=!0,s.length&&this.options.hide?this._hide(s,this.options.hide,function(){i._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),h()}):(this._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),s.hide(),h()),s.attr("aria-hidden","true"),e.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),a.length&&s.length?e.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===l(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr("aria-hidden","false"),e.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var t=this._findActive(t);t[0]!==this.active[0]&&(t=(t=t.length?t:this.active).find(".ui-tabs-anchor")[0],this._eventHandler({target:t,currentTarget:t,preventDefault:l.noop}))},_findActive:function(t){return!1===t?l():this.tabs.eq(t)},_getIndex:function(t){return t="string"==typeof t?this.anchors.index(this.anchors.filter("[href$='"+l.escapeSelector(t)+"']")):t},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){l.data(this,"ui-tabs-destroy")?l(this).remove():l(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var t=l(this),e=t.data("ui-tabs-aria-controls");e?t.attr("aria-controls",e).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var t=this.options.disabled;!1!==t&&(t=void 0!==i&&(i=this._getIndex(i),Array.isArray(t)?l.map(t,function(t){return t!==i?t:null}):l.map(this.tabs,function(t,e){return e!==i?e:null})),this._setOptionDisabled(t))},disable:function(t){var e=this.options.disabled;if(!0!==e){if(void 0===t)e=!0;else{if(t=this._getIndex(t),-1!==l.inArray(t,e))return;e=Array.isArray(e)?l.merge([t],e).sort():[t]}this._setOptionDisabled(e)}},load:function(t,a){t=this._getIndex(t);function s(t,e){"abort"===e&&n.panels.stop(!1,!0),n._removeClass(i,"ui-tabs-loading"),h.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr}var n=this,i=this.tabs.eq(t),t=i.find(".ui-tabs-anchor"),h=this._getPanelForTab(i),r={tab:i,panel:h};this._isLocal(t[0])||(this.xhr=l.ajax(this._ajaxSettings(t,a,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(i,"ui-tabs-loading"),h.attr("aria-busy","true"),this.xhr.done(function(t,e,i){setTimeout(function(){h.html(t),n._trigger("load",a,r),s(i,e)},1)}).fail(function(t,e){setTimeout(function(){s(t,e)},1)})))},_ajaxSettings:function(t,i,a){var s=this;return{url:t.attr("href").replace(/#.*$/,""),beforeSend:function(t,e){return s._trigger("beforeLoad",i,l.extend({jqXHR:t,ajaxSettings:e},a))}}},_getPanelForTab:function(t){t=l(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+t))}}),!1!==l.uiBackCompat&&l.widget("ui.tabs",l.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),l.ui.tabs});                                                                                                                                                                                                                                                                                        jquery/ui/tooltip.js                                                                                0000644                 00000034214 15212564043 0010536 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Tooltip 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */

//>>label: Tooltip
//>>group: Widgets
//>>description: Shows additional information for any element on hover or focus.
//>>docs: https://api.jqueryui.com/tooltip/
//>>demos: https://jqueryui.com/tooltip/
//>>css.structure: ../../themes/base/core.css
//>>css.structure: ../../themes/base/tooltip.css
//>>css.theme: ../../themes/base/theme.css

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../keycode",
			"../position",
			"../unique-id",
			"../version",
			"../widget"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

$.widget( "ui.tooltip", {
	version: "1.13.3",
	options: {
		classes: {
			"ui-tooltip": "ui-corner-all ui-widget-shadow"
		},
		content: function() {
			var title = $( this ).attr( "title" );

			// Escape title, since we're going from an attribute to raw HTML
			return $( "<a>" ).text( title ).html();
		},
		hide: true,

		// Disabled elements have inconsistent behavior across browsers (#8661)
		items: "[title]:not([disabled])",
		position: {
			my: "left top+15",
			at: "left bottom",
			collision: "flipfit flip"
		},
		show: true,
		track: false,

		// Callbacks
		close: null,
		open: null
	},

	_addDescribedBy: function( elem, id ) {
		var describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ );
		describedby.push( id );
		elem
			.data( "ui-tooltip-id", id )
			.attr( "aria-describedby", String.prototype.trim.call( describedby.join( " " ) ) );
	},

	_removeDescribedBy: function( elem ) {
		var id = elem.data( "ui-tooltip-id" ),
			describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ ),
			index = $.inArray( id, describedby );

		if ( index !== -1 ) {
			describedby.splice( index, 1 );
		}

		elem.removeData( "ui-tooltip-id" );
		describedby = String.prototype.trim.call( describedby.join( " " ) );
		if ( describedby ) {
			elem.attr( "aria-describedby", describedby );
		} else {
			elem.removeAttr( "aria-describedby" );
		}
	},

	_create: function() {
		this._on( {
			mouseover: "open",
			focusin: "open"
		} );

		// IDs of generated tooltips, needed for destroy
		this.tooltips = {};

		// IDs of parent tooltips where we removed the title attribute
		this.parents = {};

		// Append the aria-live region so tooltips announce correctly
		this.liveRegion = $( "<div>" )
			.attr( {
				role: "log",
				"aria-live": "assertive",
				"aria-relevant": "additions"
			} )
			.appendTo( this.document[ 0 ].body );
		this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" );

		this.disabledTitles = $( [] );
	},

	_setOption: function( key, value ) {
		var that = this;

		this._super( key, value );

		if ( key === "content" ) {
			$.each( this.tooltips, function( id, tooltipData ) {
				that._updateContent( tooltipData.element );
			} );
		}
	},

	_setOptionDisabled: function( value ) {
		this[ value ? "_disable" : "_enable" ]();
	},

	_disable: function() {
		var that = this;

		// Close open tooltips
		$.each( this.tooltips, function( id, tooltipData ) {
			var event = $.Event( "blur" );
			event.target = event.currentTarget = tooltipData.element[ 0 ];
			that.close( event, true );
		} );

		// Remove title attributes to prevent native tooltips
		this.disabledTitles = this.disabledTitles.add(
			this.element.find( this.options.items ).addBack()
				.filter( function() {
					var element = $( this );
					if ( element.is( "[title]" ) ) {
						return element
							.data( "ui-tooltip-title", element.attr( "title" ) )
							.removeAttr( "title" );
					}
				} )
		);
	},

	_enable: function() {

		// restore title attributes
		this.disabledTitles.each( function() {
			var element = $( this );
			if ( element.data( "ui-tooltip-title" ) ) {
				element.attr( "title", element.data( "ui-tooltip-title" ) );
			}
		} );
		this.disabledTitles = $( [] );
	},

	open: function( event ) {
		var that = this,
			target = $( event ? event.target : this.element )

				// we need closest here due to mouseover bubbling,
				// but always pointing at the same event target
				.closest( this.options.items );

		// No element to show a tooltip for or the tooltip is already open
		if ( !target.length || target.data( "ui-tooltip-id" ) ) {
			return;
		}

		if ( target.attr( "title" ) ) {
			target.data( "ui-tooltip-title", target.attr( "title" ) );
		}

		target.data( "ui-tooltip-open", true );

		// Kill parent tooltips, custom or native, for hover
		if ( event && event.type === "mouseover" ) {
			target.parents().each( function() {
				var parent = $( this ),
					blurEvent;
				if ( parent.data( "ui-tooltip-open" ) ) {
					blurEvent = $.Event( "blur" );
					blurEvent.target = blurEvent.currentTarget = this;
					that.close( blurEvent, true );
				}
				if ( parent.attr( "title" ) ) {
					parent.uniqueId();
					that.parents[ this.id ] = {
						element: this,
						title: parent.attr( "title" )
					};
					parent.attr( "title", "" );
				}
			} );
		}

		this._registerCloseHandlers( event, target );
		this._updateContent( target, event );
	},

	_updateContent: function( target, event ) {
		var content,
			contentOption = this.options.content,
			that = this,
			eventType = event ? event.type : null;

		if ( typeof contentOption === "string" || contentOption.nodeType ||
				contentOption.jquery ) {
			return this._open( event, target, contentOption );
		}

		content = contentOption.call( target[ 0 ], function( response ) {

			// IE may instantly serve a cached response for ajax requests
			// delay this call to _open so the other call to _open runs first
			that._delay( function() {

				// Ignore async response if tooltip was closed already
				if ( !target.data( "ui-tooltip-open" ) ) {
					return;
				}

				// JQuery creates a special event for focusin when it doesn't
				// exist natively. To improve performance, the native event
				// object is reused and the type is changed. Therefore, we can't
				// rely on the type being correct after the event finished
				// bubbling, so we set it back to the previous value. (#8740)
				if ( event ) {
					event.type = eventType;
				}
				this._open( event, target, response );
			} );
		} );
		if ( content ) {
			this._open( event, target, content );
		}
	},

	_open: function( event, target, content ) {
		var tooltipData, tooltip, delayedShow, a11yContent,
			positionOption = $.extend( {}, this.options.position );

		if ( !content ) {
			return;
		}

		// Content can be updated multiple times. If the tooltip already
		// exists, then just update the content and bail.
		tooltipData = this._find( target );
		if ( tooltipData ) {
			tooltipData.tooltip.find( ".ui-tooltip-content" ).html( content );
			return;
		}

		// If we have a title, clear it to prevent the native tooltip
		// we have to check first to avoid defining a title if none exists
		// (we don't want to cause an element to start matching [title])
		//
		// We use removeAttr only for key events, to allow IE to export the correct
		// accessible attributes. For mouse events, set to empty string to avoid
		// native tooltip showing up (happens only when removing inside mouseover).
		if ( target.is( "[title]" ) ) {
			if ( event && event.type === "mouseover" ) {
				target.attr( "title", "" );
			} else {
				target.removeAttr( "title" );
			}
		}

		tooltipData = this._tooltip( target );
		tooltip = tooltipData.tooltip;
		this._addDescribedBy( target, tooltip.attr( "id" ) );
		tooltip.find( ".ui-tooltip-content" ).html( content );

		// Support: Voiceover on OS X, JAWS on IE <= 9
		// JAWS announces deletions even when aria-relevant="additions"
		// Voiceover will sometimes re-read the entire log region's contents from the beginning
		this.liveRegion.children().hide();
		a11yContent = $( "<div>" ).html( tooltip.find( ".ui-tooltip-content" ).html() );
		a11yContent.removeAttr( "name" ).find( "[name]" ).removeAttr( "name" );
		a11yContent.removeAttr( "id" ).find( "[id]" ).removeAttr( "id" );
		a11yContent.appendTo( this.liveRegion );

		function position( event ) {
			positionOption.of = event;
			if ( tooltip.is( ":hidden" ) ) {
				return;
			}
			tooltip.position( positionOption );
		}
		if ( this.options.track && event && /^mouse/.test( event.type ) ) {
			this._on( this.document, {
				mousemove: position
			} );

			// trigger once to override element-relative positioning
			position( event );
		} else {
			tooltip.position( $.extend( {
				of: target
			}, this.options.position ) );
		}

		tooltip.hide();

		this._show( tooltip, this.options.show );

		// Handle tracking tooltips that are shown with a delay (#8644). As soon
		// as the tooltip is visible, position the tooltip using the most recent
		// event.
		// Adds the check to add the timers only when both delay and track options are set (#14682)
		if ( this.options.track && this.options.show && this.options.show.delay ) {
			delayedShow = this.delayedShow = setInterval( function() {
				if ( tooltip.is( ":visible" ) ) {
					position( positionOption.of );
					clearInterval( delayedShow );
				}
			}, 13 );
		}

		this._trigger( "open", event, { tooltip: tooltip } );
	},

	_registerCloseHandlers: function( event, target ) {
		var events = {
			keyup: function( event ) {
				if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
					var fakeEvent = $.Event( event );
					fakeEvent.currentTarget = target[ 0 ];
					this.close( fakeEvent, true );
				}
			}
		};

		// Only bind remove handler for delegated targets. Non-delegated
		// tooltips will handle this in destroy.
		if ( target[ 0 ] !== this.element[ 0 ] ) {
			events.remove = function() {
				var targetElement = this._find( target );
				if ( targetElement ) {
					this._removeTooltip( targetElement.tooltip );
				}
			};
		}

		if ( !event || event.type === "mouseover" ) {
			events.mouseleave = "close";
		}
		if ( !event || event.type === "focusin" ) {
			events.focusout = "close";
		}
		this._on( true, target, events );
	},

	close: function( event ) {
		var tooltip,
			that = this,
			target = $( event ? event.currentTarget : this.element ),
			tooltipData = this._find( target );

		// The tooltip may already be closed
		if ( !tooltipData ) {

			// We set ui-tooltip-open immediately upon open (in open()), but only set the
			// additional data once there's actually content to show (in _open()). So even if the
			// tooltip doesn't have full data, we always remove ui-tooltip-open in case we're in
			// the period between open() and _open().
			target.removeData( "ui-tooltip-open" );
			return;
		}

		tooltip = tooltipData.tooltip;

		// Disabling closes the tooltip, so we need to track when we're closing
		// to avoid an infinite loop in case the tooltip becomes disabled on close
		if ( tooltipData.closing ) {
			return;
		}

		// Clear the interval for delayed tracking tooltips
		clearInterval( this.delayedShow );

		// Only set title if we had one before (see comment in _open())
		// If the title attribute has changed since open(), don't restore
		if ( target.data( "ui-tooltip-title" ) && !target.attr( "title" ) ) {
			target.attr( "title", target.data( "ui-tooltip-title" ) );
		}

		this._removeDescribedBy( target );

		tooltipData.hiding = true;
		tooltip.stop( true );
		this._hide( tooltip, this.options.hide, function() {
			that._removeTooltip( $( this ) );
		} );

		target.removeData( "ui-tooltip-open" );
		this._off( target, "mouseleave focusout keyup" );

		// Remove 'remove' binding only on delegated targets
		if ( target[ 0 ] !== this.element[ 0 ] ) {
			this._off( target, "remove" );
		}
		this._off( this.document, "mousemove" );

		if ( event && event.type === "mouseleave" ) {
			$.each( this.parents, function( id, parent ) {
				$( parent.element ).attr( "title", parent.title );
				delete that.parents[ id ];
			} );
		}

		tooltipData.closing = true;
		this._trigger( "close", event, { tooltip: tooltip } );
		if ( !tooltipData.hiding ) {
			tooltipData.closing = false;
		}
	},

	_tooltip: function( element ) {
		var tooltip = $( "<div>" ).attr( "role", "tooltip" ),
			content = $( "<div>" ).appendTo( tooltip ),
			id = tooltip.uniqueId().attr( "id" );

		this._addClass( content, "ui-tooltip-content" );
		this._addClass( tooltip, "ui-tooltip", "ui-widget ui-widget-content" );

		tooltip.appendTo( this._appendTo( element ) );

		return this.tooltips[ id ] = {
			element: element,
			tooltip: tooltip
		};
	},

	_find: function( target ) {
		var id = target.data( "ui-tooltip-id" );
		return id ? this.tooltips[ id ] : null;
	},

	_removeTooltip: function( tooltip ) {

		// Clear the interval for delayed tracking tooltips
		clearInterval( this.delayedShow );

		tooltip.remove();
		delete this.tooltips[ tooltip.attr( "id" ) ];
	},

	_appendTo: function( target ) {
		var element = target.closest( ".ui-front, dialog" );

		if ( !element.length ) {
			element = this.document[ 0 ].body;
		}

		return element;
	},

	_destroy: function() {
		var that = this;

		// Close open tooltips
		$.each( this.tooltips, function( id, tooltipData ) {

			// Delegate to close method to handle common cleanup
			var event = $.Event( "blur" ),
				element = tooltipData.element;
			event.target = event.currentTarget = element[ 0 ];
			that.close( event, true );

			// Remove immediately; destroying an open tooltip doesn't use the
			// hide animation
			$( "#" + id ).remove();

			// Restore the title
			if ( element.data( "ui-tooltip-title" ) ) {

				// If the title attribute has changed since open(), don't restore
				if ( !element.attr( "title" ) ) {
					element.attr( "title", element.data( "ui-tooltip-title" ) );
				}
				element.removeData( "ui-tooltip-title" );
			}
		} );
		this.liveRegion.remove();
	}
} );

// DEPRECATED
// TODO: Switch return back to widget declaration at top of file when this is removed
if ( $.uiBackCompat !== false ) {

	// Backcompat for tooltipClass option
	$.widget( "ui.tooltip", $.ui.tooltip, {
		options: {
			tooltipClass: null
		},
		_tooltip: function() {
			var tooltipData = this._superApply( arguments );
			if ( this.options.tooltipClass ) {
				tooltipData.tooltip.addClass( this.options.tooltipClass );
			}
			return tooltipData;
		}
	} );
}

return $.ui.tooltip;

} );
                                                                                                                                                                                                                                                                                                                                                                                    jquery/ui/tooltip.min.js                                                                            0000644                 00000014144 15212564043 0011320 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * jQuery UI Tooltip 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","../keycode","../position","../unique-id","../version","../widget"],t):t(jQuery)}(function(r){"use strict";return r.widget("ui.tooltip",{version:"1.13.3",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var t=r(this).attr("title");return r("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(t,i){var e=(t.attr("aria-describedby")||"").split(/\s+/);e.push(i),t.data("ui-tooltip-id",i).attr("aria-describedby",String.prototype.trim.call(e.join(" ")))},_removeDescribedBy:function(t){var i=t.data("ui-tooltip-id"),e=(t.attr("aria-describedby")||"").split(/\s+/),i=r.inArray(i,e);-1!==i&&e.splice(i,1),t.removeData("ui-tooltip-id"),(e=String.prototype.trim.call(e.join(" ")))?t.attr("aria-describedby",e):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=r("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=r([])},_setOption:function(t,i){var e=this;this._super(t,i),"content"===t&&r.each(this.tooltips,function(t,i){e._updateContent(i.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var o=this;r.each(this.tooltips,function(t,i){var e=r.Event("blur");e.target=e.currentTarget=i.element[0],o.close(e,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var t=r(this);if(t.is("[title]"))return t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var t=r(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))}),this.disabledTitles=r([])},open:function(t){var e=this,i=r(t?t.target:this.element).closest(this.options.items);i.length&&!i.data("ui-tooltip-id")&&(i.attr("title")&&i.data("ui-tooltip-title",i.attr("title")),i.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&i.parents().each(function(){var t,i=r(this);i.data("ui-tooltip-open")&&((t=r.Event("blur")).target=t.currentTarget=this,e.close(t,!0)),i.attr("title")&&(i.uniqueId(),e.parents[this.id]={element:this,title:i.attr("title")},i.attr("title",""))}),this._registerCloseHandlers(t,i),this._updateContent(i,t))},_updateContent:function(i,e){var t=this.options.content,o=this,n=e?e.type:null;if("string"==typeof t||t.nodeType||t.jquery)return this._open(e,i,t);(t=t.call(i[0],function(t){o._delay(function(){i.data("ui-tooltip-open")&&(e&&(e.type=n),this._open(e,i,t))})}))&&this._open(e,i,t)},_open:function(t,i,e){var o,n,s,l=r.extend({},this.options.position);function a(t){l.of=t,o.is(":hidden")||o.position(l)}e&&((s=this._find(i))?s.tooltip.find(".ui-tooltip-content").html(e):(i.is("[title]")&&(t&&"mouseover"===t.type?i.attr("title",""):i.removeAttr("title")),s=this._tooltip(i),o=s.tooltip,this._addDescribedBy(i,o.attr("id")),o.find(".ui-tooltip-content").html(e),this.liveRegion.children().hide(),(s=r("<div>").html(o.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),s.removeAttr("id").find("[id]").removeAttr("id"),s.appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:a}),a(t)):o.position(r.extend({of:i},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(n=this.delayedShow=setInterval(function(){o.is(":visible")&&(a(l.of),clearInterval(n))},13)),this._trigger("open",t,{tooltip:o})))},_registerCloseHandlers:function(t,i){var e={keyup:function(t){t.keyCode===r.ui.keyCode.ESCAPE&&((t=r.Event(t)).currentTarget=i[0],this.close(t,!0))}};i[0]!==this.element[0]&&(e.remove=function(){var t=this._find(i);t&&this._removeTooltip(t.tooltip)}),t&&"mouseover"!==t.type||(e.mouseleave="close"),t&&"focusin"!==t.type||(e.focusout="close"),this._on(!0,i,e)},close:function(t){var i,e=this,o=r(t?t.currentTarget:this.element),n=this._find(o);n?(i=n.tooltip,n.closing||(clearInterval(this.delayedShow),o.data("ui-tooltip-title")&&!o.attr("title")&&o.attr("title",o.data("ui-tooltip-title")),this._removeDescribedBy(o),n.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){e._removeTooltip(r(this))}),o.removeData("ui-tooltip-open"),this._off(o,"mouseleave focusout keyup"),o[0]!==this.element[0]&&this._off(o,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&r.each(this.parents,function(t,i){r(i.element).attr("title",i.title),delete e.parents[t]}),n.closing=!0,this._trigger("close",t,{tooltip:i}),n.hiding)||(n.closing=!1)):o.removeData("ui-tooltip-open")},_tooltip:function(t){var i=r("<div>").attr("role","tooltip"),e=r("<div>").appendTo(i),o=i.uniqueId().attr("id");return this._addClass(e,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(t)),this.tooltips[o]={element:t,tooltip:i}},_find:function(t){t=t.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(t){clearInterval(this.delayedShow),t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){t=t.closest(".ui-front, dialog");return t=t.length?t:this.document[0].body},_destroy:function(){var o=this;r.each(this.tooltips,function(t,i){var e=r.Event("blur"),i=i.element;e.target=e.currentTarget=i[0],o.close(e,!0),r("#"+t).remove(),i.data("ui-tooltip-title")&&(i.attr("title")||i.attr("title",i.data("ui-tooltip-title")),i.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!1!==r.uiBackCompat&&r.widget("ui.tooltip",r.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),r.ui.tooltip});                                                                                                                                                                                                                                                                                                                                                                                                                            json2.js                                                                                            0000644                 00000000037 15212564043 0006137 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       // Deprecated in WordPress 6.9.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 json2.min.js                                                                                        0000644                 00000000043 15212564043 0006716 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             masonry.min.js                                                                                      0000644                 00000057112 15212564043 0007364 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
/*!
 * Masonry PACKAGED v4.2.2
 * Cascading grid layout library
 * https://masonry.desandro.com
 * MIT License
 * by David DeSandro
 */

!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,r,a){function h(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var d=u[e];if(!d||"_"==e.charAt(0))return void s(r+" is not a valid method");var l=d.apply(u,n);o=void 0===o?l:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return h(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(t,r),delete n[r]),r.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=-1==t.indexOf("%")&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;u>e;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);s=200==Math.round(t(o.width)),r.isBoxSizeOuter=s,i.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==r.boxSizing,l=0;u>l;l++){var c=h[l],f=r[c],m=parseFloat(f);a[c]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,E=d&&s,b=t(r.width);b!==!1&&(a.width=b+(E?0:p+_));var x=t(r.height);return x!==!1&&(a.height=x+(E?0:g+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(g+z),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,d=!1;return r}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i],o=n+"MatchesSelector";if(t[o])return o}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e};var n=Array.prototype.slice;i.makeArray=function(t){if(Array.isArray(t))return t;if(null===t||void 0===t)return[];var e="object"==typeof t&&"number"==typeof t.length;return e?n.call(t):[t]},i.removeFrom=function(t,e){var i=t.indexOf(e);-1!=i&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,n){t=i.makeArray(t);var o=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!n)return void o.push(t);e(t,n)&&o.push(t);for(var i=t.querySelectorAll(n),r=0;r<i.length;r++)o.push(i[r])}}),o},i.debounceMethod=function(t,e,i){i=i||100;var n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];clearTimeout(t);var e=arguments,r=this;this[o]=setTimeout(function(){n.apply(r,e),delete r[o]},i)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var o=t.console;return i.htmlInit=function(e,n){i.docReady(function(){var r=i.toDashed(n),s="data-"+r,a=document.querySelectorAll("["+s+"]"),h=document.querySelectorAll(".js-"+r),u=i.makeArray(a).concat(i.makeArray(h)),d=s+"-options",l=t.jQuery;u.forEach(function(t){var i,r=t.getAttribute(s)||t.getAttribute(d);try{i=r&&JSON.parse(r)}catch(a){return void(o&&o.error("Error parsing "+s+" on "+t.className+": "+a))}var h=new e(t,i);l&&l.data(t,n,h)})})},i}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize))}(window,function(t,e){"use strict";function i(t){for(var e in t)return!1;return e=null,!0}function n(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function o(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var r=document.documentElement.style,s="string"==typeof r.transition?"transition":"WebkitTransition",a="string"==typeof r.transform?"transform":"WebkitTransform",h={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[s],u={transform:a,transition:s,transitionDuration:s+"Duration",transitionProperty:s+"Property",transitionDelay:s+"Delay"},d=n.prototype=Object.create(t.prototype);d.constructor=n,d._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},d.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},d.getSize=function(){this.size=e(this.element)},d.css=function(t){var e=this.element.style;for(var i in t){var n=u[i]||i;e[n]=t[i]}},d.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),n=t[e?"left":"right"],o=t[i?"top":"bottom"],r=parseFloat(n),s=parseFloat(o),a=this.layout.size;-1!=n.indexOf("%")&&(r=r/100*a.width),-1!=o.indexOf("%")&&(s=s/100*a.height),r=isNaN(r)?0:r,s=isNaN(s)?0:s,r-=e?a.paddingLeft:a.paddingRight,s-=i?a.paddingTop:a.paddingBottom,this.position.x=r,this.position.y=s},d.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),o=i?"paddingLeft":"paddingRight",r=i?"left":"right",s=i?"right":"left",a=this.position.x+t[o];e[r]=this.getXValue(a),e[s]="";var h=n?"paddingTop":"paddingBottom",u=n?"top":"bottom",d=n?"bottom":"top",l=this.position.y+t[h];e[u]=this.getYValue(l),e[d]="",this.css(e),this.emitEvent("layout",[this])},d.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},d.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},d._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),o&&!this.isTransitioning)return void this.layoutPosition();var r=t-i,s=e-n,a={};a.transform=this.getTranslate(r,s),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},d.getTranslate=function(t,e){var i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop");return t=i?t:-t,e=n?e:-e,"translate3d("+t+"px, "+e+"px, 0)"},d.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},d.moveTo=d._transitionTo,d.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},d._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},d.transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var n=this.element.offsetHeight;n=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var l="opacity,"+o(a);d.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:l,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(h,this,!1)}},d.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},d.onotransitionend=function(t){this.ontransitionend(t)};var c={"-webkit-transform":"transform"};d.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,n=c[t.propertyName]||t.propertyName;if(delete e.ingProperties[n],i(e.ingProperties)&&this.disableTransition(),n in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[n]),n in e.onEnd){var o=e.onEnd[n];o.call(this),delete e.onEnd[n]}this.emitEvent("transitionEnd",[this])}},d.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(h,this,!1),this.isTransitioning=!1},d._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var f={transitionProperty:"",transitionDuration:"",transitionDelay:""};return d.removeTransitionStyles=function(){this.css(f)},d.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},d.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},d.remove=function(){return s&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},d.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("visibleStyle");e[i]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},d.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},d.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},d.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");e[i]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},d.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},d.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},n}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,n,o,r){return e(t,i,n,o,r)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,n,o){"use strict";function r(t,e){var i=n.getQueryElement(t);if(!i)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,u&&(this.$element=u(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e);var o=++l;this.element.outlayerGUID=o,c[o]=this,this._create();var r=this._getOption("initLayout");r&&this.layout()}function s(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}function a(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],n=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var o=m[n]||1;return i*o}var h=t.console,u=t.jQuery,d=function(){},l=0,c={};r.namespace="outlayer",r.Item=o,r.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var f=r.prototype;n.extend(f,e.prototype),f.option=function(t){n.extend(this.options,t)},f._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},r.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},f._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},f.reloadItems=function(){this.items=this._itemize(this.element.children)},f._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0;o<e.length;o++){var r=e[o],s=new i(r,this);n.push(s)}return n},f._filterFindItemElements=function(t){return n.filterFindElements(t,this.options.itemSelector)},f.getItemElements=function(){return this.items.map(function(t){return t.element})},f.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},f._init=f.layout,f._resetLayout=function(){this.getSize()},f.getSize=function(){this.size=i(this.element)},f._getMeasurement=function(t,e){var n,o=this.options[t];o?("string"==typeof o?n=this.element.querySelector(o):o instanceof HTMLElement&&(n=o),this[t]=n?i(n)[e]:o):this[t]=0},f.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},f._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},f._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var n=this._getItemLayoutPosition(t);n.item=t,n.isInstant=e||t.isLayoutInstant,i.push(n)},this),this._processLayoutQueue(i)}},f._getItemLayoutPosition=function(){return{x:0,y:0}},f._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},f.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},f._positionItem=function(t,e,i,n,o){n?t.goTo(e,i):(t.stagger(o*this.stagger),t.moveTo(e,i))},f._postLayout=function(){this.resizeContainer()},f.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},f._getContainerSize=d,f._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},f._emitCompleteOnItems=function(t,e){function i(){o.dispatchEvent(t+"Complete",null,[e])}function n(){s++,s==r&&i()}var o=this,r=e.length;if(!e||!r)return void i();var s=0;e.forEach(function(e){e.once(t,n)})},f.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),u)if(this.$element=this.$element||u(this.element),e){var o=u.Event(e);o.type=t,this.$element.trigger(o,i)}else this.$element.trigger(t,i)},f.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},f.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},f.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},f.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){n.removeFrom(this.stamps,t),this.unignore(t)},this)},f._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n.makeArray(t)):void 0},f._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},f._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},f._manageStamp=d,f._getElementOffset=function(t){var e=t.getBoundingClientRect(),n=this._boundingRect,o=i(t),r={left:e.left-n.left-o.marginLeft,top:e.top-n.top-o.marginTop,right:n.right-e.right-o.marginRight,bottom:n.bottom-e.bottom-o.marginBottom};return r},f.handleEvent=n.handleEvent,f.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},f.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},f.onresize=function(){this.resize()},n.debounceMethod(r,"onresize",100),f.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},f.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},f.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},f.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},f.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},f.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},f.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},f.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},f.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},f.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},f.getItems=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},f.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),n.removeFrom(this.items,t)},this)},f.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete c[e],delete this.element.outlayerGUID,u&&u.removeData(this.element,this.constructor.namespace)},r.data=function(t){t=n.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&c[e]},r.create=function(t,e){var i=s(r);return i.defaults=n.extend({},r.defaults),n.extend(i.defaults,e),i.compatOptions=n.extend({},r.compatOptions),i.namespace=t,i.data=r.data,i.Item=s(o),n.htmlInit(i,t),u&&u.bridget&&u.bridget(t,i),i};var m={ms:1,s:1e3};return r.Item=o,r}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,e){var i=t.create("masonry");i.compatOptions.fitWidth="isFitWidth";var n=i.prototype;return n._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},n.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var n=this.columnWidth+=this.gutter,o=this.containerWidth+this.gutter,r=o/n,s=n-o%n,a=s&&1>s?"round":"floor";r=Math[a](r),this.cols=Math.max(r,1)},n.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},n._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",r=this[o](n,t),s={x:this.columnWidth*r.col,y:r.y},a=r.y+t.size.outerHeight,h=n+r.col,u=r.col;h>u;u++)this.colYs[u]=a;return s},n._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},n._getTopColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++)e[n]=this._getColGroupY(n,t);return e},n._getColGroupY=function(t,e){if(2>e)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},n._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,n=t>1&&i+t>this.cols;i=n?0:i;var o=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=o?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},n._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft"),r=o?n.left:n.right,s=r+i.outerWidth,a=Math.floor(r/this.columnWidth);a=Math.max(0,a);var h=Math.floor(s/this.columnWidth);h-=s%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var u=this._getOption("originTop"),d=(u?n.top:n.bottom)+i.outerHeight,l=a;h>=l;l++)this.colYs[l]=Math.max(d,this.colYs[l])},n._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},n._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i});                                                                                                                                                                                                                                                                                                                                                                                                                                                      mce-view.js                                                                                         0000644                 00000062371 15212564043 0006631 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/mce-view.js
 */

/* global tinymce */

/*
 * The TinyMCE view API.
 *
 * Note: this API is "experimental" meaning that it will probably change
 * in the next few releases based on feedback from 3.9.0.
 * If you decide to use it, please follow the development closely.
 *
 * Diagram
 *
 * |- registered view constructor (type)
 * |  |- view instance (unique text)
 * |  |  |- editor 1
 * |  |  |  |- view node
 * |  |  |  |- view node
 * |  |  |  |- ...
 * |  |  |- editor 2
 * |  |  |  |- ...
 * |  |- view instance
 * |  |  |- ...
 * |- registered view
 * |  |- ...
 */
( function( window, wp, shortcode, $ ) {
	'use strict';

	var views = {},
		instances = {};

	wp.mce = wp.mce || {};

	/**
	 * wp.mce.views
	 *
	 * A set of utilities that simplifies adding custom UI within a TinyMCE editor.
	 * At its core, it serves as a series of converters, transforming text to a
	 * custom UI, and back again.
	 */
	wp.mce.views = {

		/**
		 * Registers a new view type.
		 *
		 * @param {string} type   The view type.
		 * @param {Object} extend An object to extend wp.mce.View.prototype with.
		 */
		register: function( type, extend ) {
			views[ type ] = wp.mce.View.extend( _.extend( extend, { type: type } ) );
		},

		/**
		 * Unregisters a view type.
		 *
		 * @param {string} type The view type.
		 */
		unregister: function( type ) {
			delete views[ type ];
		},

		/**
		 * Returns the settings of a view type.
		 *
		 * @param {string} type The view type.
		 *
		 * @return {Function} The view constructor.
		 */
		get: function( type ) {
			return views[ type ];
		},

		/**
		 * Unbinds all view nodes.
		 * Runs before removing all view nodes from the DOM.
		 */
		unbind: function() {
			_.each( instances, function( instance ) {
				instance.unbind();
			} );
		},

		/**
		 * Scans a given string for each view's pattern,
		 * replacing any matches with markers,
		 * and creates a new instance for every match.
		 *
		 * @param {string} content The string to scan.
		 * @param {tinymce.Editor} editor The editor.
		 *
		 * @return {string} The string with markers.
		 */
		setMarkers: function( content, editor ) {
			var pieces = [ { content: content } ],
				self = this,
				instance, current;

			_.each( views, function( view, type ) {
				current = pieces.slice();
				pieces  = [];

				_.each( current, function( piece ) {
					var remaining = piece.content,
						result, text;

					// Ignore processed pieces, but retain their location.
					if ( piece.processed ) {
						pieces.push( piece );
						return;
					}

					// Iterate through the string progressively matching views
					// and slicing the string as we go.
					while ( remaining && ( result = view.prototype.match( remaining ) ) ) {
						// Any text before the match becomes an unprocessed piece.
						if ( result.index ) {
							pieces.push( { content: remaining.substring( 0, result.index ) } );
						}

						result.options.editor = editor;
						instance = self.createInstance( type, result.content, result.options );
						text = instance.loader ? '.' : instance.text;

						// Add the processed piece for the match.
						pieces.push( {
							content: instance.ignore ? text : '<p data-wpview-marker="' + instance.encodedText + '">' + text + '</p>',
							processed: true
						} );

						// Update the remaining content.
						remaining = remaining.slice( result.index + result.content.length );
					}

					// There are no additional matches.
					// If any content remains, add it as an unprocessed piece.
					if ( remaining ) {
						pieces.push( { content: remaining } );
					}
				} );
			} );

			content = _.pluck( pieces, 'content' ).join( '' );
			return content.replace( /<p>\s*<p data-wpview-marker=/g, '<p data-wpview-marker=' ).replace( /<\/p>\s*<\/p>/g, '</p>' );
		},

		/**
		 * Create a view instance.
		 *
		 * @param {string}  type    The view type.
		 * @param {string}  text    The textual representation of the view.
		 * @param {Object}  options Options.
		 * @param {boolean} force   Recreate the instance. Optional.
		 *
		 * @return {wp.mce.View} The view instance.
		 */
		createInstance: function( type, text, options, force ) {
			var View = this.get( type ),
				encodedText,
				instance;

			if ( text.indexOf( '[' ) !== -1 && text.indexOf( ']' ) !== -1 ) {
				// Looks like a shortcode? Remove any line breaks from inside of shortcodes
				// or autop will replace them with <p> and <br> later and the string won't match.
				text = text.replace( /\[[^\]]+\]/g, function( match ) {
					return match.replace( /[\r\n]/g, '' );
				});
			}

			if ( ! force ) {
				instance = this.getInstance( text );

				if ( instance ) {
					return instance;
				}
			}

			encodedText = encodeURIComponent( text );

			options = _.extend( options || {}, {
				text: text,
				encodedText: encodedText
			} );

			return instances[ encodedText ] = new View( options );
		},

		/**
		 * Get a view instance.
		 *
		 * @param {(string|HTMLElement)} object The textual representation of the view or the view node.
		 *
		 * @return {wp.mce.View} The view instance or undefined.
		 */
		getInstance: function( object ) {
			if ( typeof object === 'string' ) {
				return instances[ encodeURIComponent( object ) ];
			}

			return instances[ $( object ).attr( 'data-wpview-text' ) ];
		},

		/**
		 * Given a view node, get the view's text.
		 *
		 * @param {HTMLElement} node The view node.
		 *
		 * @return {string} The textual representation of the view.
		 */
		getText: function( node ) {
			return decodeURIComponent( $( node ).attr( 'data-wpview-text' ) || '' );
		},

		/**
		 * Renders all view nodes that are not yet rendered.
		 *
		 * @param {boolean} force Rerender all view nodes.
		 */
		render: function( force ) {
			_.each( instances, function( instance ) {
				instance.render( null, force );
			} );
		},

		/**
		 * Update the text of a given view node.
		 *
		 * @param {string}         text   The new text.
		 * @param {tinymce.Editor} editor The TinyMCE editor instance the view node is in.
		 * @param {HTMLElement}    node   The view node to update.
		 * @param {boolean}        force  Recreate the instance. Optional.
		 */
		update: function( text, editor, node, force ) {
			var instance = this.getInstance( node );

			if ( instance ) {
				instance.update( text, editor, node, force );
			}
		},

		/**
		 * Renders any editing interface based on the view type.
		 *
		 * @param {tinymce.Editor} editor The TinyMCE editor instance the view node is in.
		 * @param {HTMLElement}    node   The view node to edit.
		 */
		edit: function( editor, node ) {
			var instance = this.getInstance( node );

			if ( instance && instance.edit ) {
				instance.edit( instance.text, function( text, force ) {
					instance.update( text, editor, node, force );
				} );
			}
		},

		/**
		 * Remove a given view node from the DOM.
		 *
		 * @param {tinymce.Editor} editor The TinyMCE editor instance the view node is in.
		 * @param {HTMLElement}    node   The view node to remove.
		 */
		remove: function( editor, node ) {
			var instance = this.getInstance( node );

			if ( instance ) {
				instance.remove( editor, node );
			}
		}
	};

	/**
	 * A Backbone-like View constructor intended for use when rendering a TinyMCE View.
	 * The main difference is that the TinyMCE View is not tied to a particular DOM node.
	 *
	 * @param {Object} options Options.
	 */
	wp.mce.View = function( options ) {
		_.extend( this, options );
		this.initialize();
	};

	wp.mce.View.extend = Backbone.View.extend;

	_.extend( wp.mce.View.prototype, /** @lends wp.mce.View.prototype */{

		/**
		 * The content.
		 *
		 * @type {*}
		 */
		content: null,

		/**
		 * Whether or not to display a loader.
		 *
		 * @type {Boolean}
		 */
		loader: true,

		/**
		 * Runs after the view instance is created.
		 */
		initialize: function() {},

		/**
		 * Returns the content to render in the view node.
		 *
		 * @return {*}
		 */
		getContent: function() {
			return this.content;
		},

		/**
		 * Renders all view nodes tied to this view instance that are not yet rendered.
		 *
		 * @param {string}  content The content to render. Optional.
		 * @param {boolean} force   Rerender all view nodes tied to this view instance. Optional.
		 */
		render: function( content, force ) {
			if ( content != null ) {
				this.content = content;
			}

			content = this.getContent();

			// If there's nothing to render an no loader needs to be shown, stop.
			if ( ! this.loader && ! content ) {
				return;
			}

			// We're about to rerender all views of this instance, so unbind rendered views.
			force && this.unbind();

			// Replace any left over markers.
			this.replaceMarkers();

			if ( content ) {
				this.setContent( content, function( editor, node ) {
					$( node ).data( 'rendered', true );
					this.bindNode.call( this, editor, node );
				}, force ? null : false );
			} else {
				this.setLoader();
			}
		},

		/**
		 * Binds a given node after its content is added to the DOM.
		 */
		bindNode: function() {},

		/**
		 * Unbinds a given node before its content is removed from the DOM.
		 */
		unbindNode: function() {},

		/**
		 * Unbinds all view nodes tied to this view instance.
		 * Runs before their content is removed from the DOM.
		 */
		unbind: function() {
			this.getNodes( function( editor, node ) {
				this.unbindNode.call( this, editor, node );
			}, true );
		},

		/**
		 * Gets all the TinyMCE editor instances that support views.
		 *
		 * @param {Function} callback A callback.
		 */
		getEditors: function( callback ) {
			_.each( tinymce.editors, function( editor ) {
				if ( editor.plugins.wpview ) {
					callback.call( this, editor );
				}
			}, this );
		},

		/**
		 * Gets all view nodes tied to this view instance.
		 *
		 * @param {Function} callback A callback.
		 * @param {boolean}  rendered Get (un)rendered view nodes. Optional.
		 */
		getNodes: function( callback, rendered ) {
			this.getEditors( function( editor ) {
				var self = this;

				$( editor.getBody() )
					.find( '[data-wpview-text="' + self.encodedText + '"]' )
					.filter( function() {
						var data;

						if ( rendered == null ) {
							return true;
						}

						data = $( this ).data( 'rendered' ) === true;

						return rendered ? data : ! data;
					} )
					.each( function() {
						callback.call( self, editor, this, this /* back compat */ );
					} );
			} );
		},

		/**
		 * Gets all marker nodes tied to this view instance.
		 *
		 * @param {Function} callback A callback.
		 */
		getMarkers: function( callback ) {
			this.getEditors( function( editor ) {
				var self = this;

				$( editor.getBody() )
					.find( '[data-wpview-marker="' + this.encodedText + '"]' )
					.each( function() {
						callback.call( self, editor, this );
					} );
			} );
		},

		/**
		 * Replaces all marker nodes tied to this view instance.
		 */
		replaceMarkers: function() {
			this.getMarkers( function( editor, node ) {
				var selected = node === editor.selection.getNode();
				var $viewNode;

				if ( ! this.loader && $( node ).text() !== tinymce.DOM.decode( this.text ) ) {
					editor.dom.setAttrib( node, 'data-wpview-marker', null );
					return;
				}

				$viewNode = editor.$(
					'<div class="wpview wpview-wrap" data-wpview-text="' + this.encodedText + '" data-wpview-type="' + this.type + '" contenteditable="false"></div>'
				);

				editor.undoManager.ignore( function() {
					editor.$( node ).replaceWith( $viewNode );
				} );

				if ( selected ) {
					setTimeout( function() {
						editor.undoManager.ignore( function() {
							editor.selection.select( $viewNode[0] );
							editor.selection.collapse();
						} );
					} );
				}
			} );
		},

		/**
		 * Removes all marker nodes tied to this view instance.
		 */
		removeMarkers: function() {
			this.getMarkers( function( editor, node ) {
				editor.dom.setAttrib( node, 'data-wpview-marker', null );
			} );
		},

		/**
		 * Sets the content for all view nodes tied to this view instance.
		 *
		 * @param {*}        content  The content to set.
		 * @param {Function} callback A callback. Optional.
		 * @param {boolean}  rendered Only set for (un)rendered nodes. Optional.
		 */
		setContent: function( content, callback, rendered ) {
			if ( _.isObject( content ) && ( content.sandbox || content.head || content.body.indexOf( '<script' ) !== -1 ) ) {
				this.setIframes( content.head || '', content.body, callback, rendered );
			} else if ( _.isString( content ) && content.indexOf( '<script' ) !== -1 ) {
				this.setIframes( '', content, callback, rendered );
			} else {
				this.getNodes( function( editor, node ) {
					content = content.body || content;

					if ( content.indexOf( '<iframe' ) !== -1 ) {
						content += '<span class="mce-shim"></span>';
					}

					editor.undoManager.transact( function() {
						node.innerHTML = '';
						node.appendChild( _.isString( content ) ? editor.dom.createFragment( content ) : content );
						editor.dom.add( node, 'span', { 'class': 'wpview-end' } );
					} );

					callback && callback.call( this, editor, node );
				}, rendered );
			}
		},

		/**
		 * Sets the content in an iframe for all view nodes tied to this view instance.
		 *
		 * @param {string}   head     HTML string to be added to the head of the document.
		 * @param {string}   body     HTML string to be added to the body of the document.
		 * @param {Function} callback A callback. Optional.
		 * @param {boolean}  rendered Only set for (un)rendered nodes. Optional.
		 */
		setIframes: function( head, body, callback, rendered ) {
			var self = this;

			if ( body.indexOf( '[' ) !== -1 && body.indexOf( ']' ) !== -1 ) {
				var shortcodesRegExp = new RegExp( '\\[\\/?(?:' + window.mceViewL10n.shortcodes.join( '|' ) + ')[^\\]]*?\\]', 'g' );
				// Escape tags inside shortcode previews.
				body = body.replace( shortcodesRegExp, function( match ) {
					return match.replace( /</g, '&lt;' ).replace( />/g, '&gt;' );
				} );
			}

			this.getNodes( function( editor, node ) {
				var dom = editor.dom,
					styles = '',
					bodyClasses = editor.getBody().className || '',
					editorHead = editor.getDoc().getElementsByTagName( 'head' )[0],
					iframe, iframeWin, iframeDoc, MutationObserver, observer, i, block;

				tinymce.each( dom.$( 'link[rel="stylesheet"]', editorHead ), function( link ) {
					if ( link.href && link.href.indexOf( 'skins/lightgray/content.min.css' ) === -1 &&
						link.href.indexOf( 'skins/wordpress/wp-content.css' ) === -1 ) {

						styles += dom.getOuterHTML( link );
					}
				} );

				if ( self.iframeHeight ) {
					dom.add( node, 'span', {
						'data-mce-bogus': 1,
						style: {
							display: 'block',
							width: '100%',
							height: self.iframeHeight
						}
					}, '\u200B' );
				}

				editor.undoManager.transact( function() {
					node.innerHTML = '';

					iframe = dom.add( node, 'iframe', {
						/* jshint scripturl: true */
						src: tinymce.Env.ie ? 'javascript:""' : '',
						frameBorder: '0',
						allowTransparency: 'true',
						scrolling: 'no',
						'class': 'wpview-sandbox',
						style: {
							width: '100%',
							display: 'block'
						},
						height: self.iframeHeight
					} );

					dom.add( node, 'span', { 'class': 'mce-shim' } );
					dom.add( node, 'span', { 'class': 'wpview-end' } );
				} );

				/*
				 * Bail if the iframe node is not attached to the DOM.
				 * Happens when the view is dragged in the editor.
				 * There is a browser restriction when iframes are moved in the DOM. They get emptied.
				 * The iframe will be rerendered after dropping the view node at the new location.
				 */
				if ( ! iframe.contentWindow ) {
					return;
				}

				iframeWin = iframe.contentWindow;
				iframeDoc = iframeWin.document;
				iframeDoc.open();

				iframeDoc.write(
					'<!DOCTYPE html>' +
					'<html>' +
						'<head>' +
							'<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />' +
							head +
							styles +
							'<style>' +
								'html {' +
									'background: transparent;' +
									'padding: 0;' +
									'margin: 0;' +
								'}' +
								'body#wpview-iframe-sandbox {' +
									'background: transparent;' +
									'padding: 1px 0 !important;' +
									'margin: -1px 0 0 !important;' +
								'}' +
								'body#wpview-iframe-sandbox:before,' +
								'body#wpview-iframe-sandbox:after {' +
									'display: none;' +
									'content: "";' +
								'}' +
								'iframe {' +
									'max-width: 100%;' +
								'}' +
							'</style>' +
						'</head>' +
						'<body id="wpview-iframe-sandbox" class="' + bodyClasses + '">' +
							body +
						'</body>' +
					'</html>'
				);

				iframeDoc.close();

				function resize() {
					var $iframe;

					if ( block ) {
						return;
					}

					// Make sure the iframe still exists.
					if ( iframe.contentWindow ) {
						$iframe = $( iframe );
						self.iframeHeight = $( iframeDoc.body ).height();

						if ( $iframe.height() !== self.iframeHeight ) {
							$iframe.height( self.iframeHeight );
							editor.nodeChanged();
						}
					}
				}

				if ( self.iframeHeight ) {
					block = true;

					setTimeout( function() {
						block = false;
						resize();
					}, 3000 );
				}

				function addObserver() {
					observer = new MutationObserver( _.debounce( resize, 100 ) );

					observer.observe( iframeDoc.body, {
						attributes: true,
						childList: true,
						subtree: true
					} );
				}

				$( iframeWin ).on( 'load', resize );

				MutationObserver = iframeWin.MutationObserver || iframeWin.WebKitMutationObserver || iframeWin.MozMutationObserver;

				if ( MutationObserver ) {
					if ( ! iframeDoc.body ) {
						iframeDoc.addEventListener( 'DOMContentLoaded', addObserver, false );
					} else {
						addObserver();
					}
				} else {
					for ( i = 1; i < 6; i++ ) {
						setTimeout( resize, i * 700 );
					}
				}

				callback && callback.call( self, editor, node );
			}, rendered );
		},

		/**
		 * Sets a loader for all view nodes tied to this view instance.
		 */
		setLoader: function( dashicon ) {
			this.setContent(
				'<div class="loading-placeholder">' +
					'<div class="dashicons dashicons-' + ( dashicon || 'admin-media' ) + '"></div>' +
					'<div class="wpview-loading"><ins></ins></div>' +
				'</div>'
			);
		},

		/**
		 * Sets an error for all view nodes tied to this view instance.
		 *
		 * @param {string} message  The error message to set.
		 * @param {string} dashicon A dashicon ID. Optional. {@link https://developer.wordpress.org/resource/dashicons/}
		 */
		setError: function( message, dashicon ) {
			this.setContent(
				'<div class="wpview-error">' +
					'<div class="dashicons dashicons-' + ( dashicon || 'no' ) + '"></div>' +
					'<p>' + message + '</p>' +
				'</div>'
			);
		},

		/**
		 * Tries to find a text match in a given string.
		 *
		 * @param {string} content The string to scan.
		 *
		 * @return {Object}
		 */
		match: function( content ) {
			var match = shortcode.next( this.type, content );

			if ( match ) {
				return {
					index: match.index,
					content: match.content,
					options: {
						shortcode: match.shortcode
					}
				};
			}
		},

		/**
		 * Update the text of a given view node.
		 *
		 * @param {string}         text   The new text.
		 * @param {tinymce.Editor} editor The TinyMCE editor instance the view node is in.
		 * @param {HTMLElement}    node   The view node to update.
		 * @param {boolean}        force  Recreate the instance. Optional.
		 */
		update: function( text, editor, node, force ) {
			_.find( views, function( view, type ) {
				var match = view.prototype.match( text );

				if ( match ) {
					$( node ).data( 'rendered', false );
					editor.dom.setAttrib( node, 'data-wpview-text', encodeURIComponent( text ) );
					wp.mce.views.createInstance( type, text, match.options, force ).render();

					editor.selection.select( node );
					editor.nodeChanged();
					editor.focus();

					return true;
				}
			} );
		},

		/**
		 * Remove a given view node from the DOM.
		 *
		 * @param {tinymce.Editor} editor The TinyMCE editor instance the view node is in.
		 * @param {HTMLElement}    node   The view node to remove.
		 */
		remove: function( editor, node ) {
			this.unbindNode.call( this, editor, node );
			editor.dom.remove( node );
			editor.focus();
		}
	} );
} )( window, window.wp, window.wp.shortcode, window.jQuery );

/*
 * The WordPress core TinyMCE views.
 * Views for the gallery, audio, video, playlist and embed shortcodes,
 * and a view for embeddable URLs.
 */
( function( window, views, media, $ ) {
	var base, gallery, av, embed,
		schema, parser, serializer;

	function verifyHTML( string ) {
		var settings = {};

		if ( ! window.tinymce ) {
			return string.replace( /<[^>]+>/g, '' );
		}

		if ( ! string || ( string.indexOf( '<' ) === -1 && string.indexOf( '>' ) === -1 ) ) {
			return string;
		}

		schema = schema || new window.tinymce.html.Schema( settings );
		parser = parser || new window.tinymce.html.DomParser( settings, schema );
		serializer = serializer || new window.tinymce.html.Serializer( settings, schema );

		return serializer.serialize( parser.parse( string, { forced_root_block: false } ) );
	}

	base = {
		state: [],

		edit: function( text, update ) {
			var type = this.type,
				frame = media[ type ].edit( text );

			this.pausePlayers && this.pausePlayers();

			_.each( this.state, function( state ) {
				frame.state( state ).on( 'update', function( selection ) {
					update( media[ type ].shortcode( selection ).string(), type === 'gallery' );
				} );
			} );

			frame.on( 'close', function() {
				frame.detach();
			} );

			frame.open();
		}
	};

	gallery = _.extend( {}, base, {
		state: [ 'gallery-edit' ],
		template: media.template( 'editor-gallery' ),

		initialize: function() {
			var attachments = media.gallery.attachments( this.shortcode, media.view.settings.post.id ),
				attrs = this.shortcode.attrs.named,
				self = this;

			attachments.more()
			.done( function() {
				attachments = attachments.toJSON();

				_.each( attachments, function( attachment ) {
					if ( attachment.sizes ) {
						if ( attrs.size && attachment.sizes[ attrs.size ] ) {
							attachment.thumbnail = attachment.sizes[ attrs.size ];
						} else if ( attachment.sizes.thumbnail ) {
							attachment.thumbnail = attachment.sizes.thumbnail;
						} else if ( attachment.sizes.full ) {
							attachment.thumbnail = attachment.sizes.full;
						}
					}
				} );

				self.render( self.template( {
					verifyHTML: verifyHTML,
					attachments: attachments,
					columns: attrs.columns ? parseInt( attrs.columns, 10 ) : media.galleryDefaults.columns
				} ) );
			} )
			.fail( function( jqXHR, textStatus ) {
				self.setError( textStatus );
			} );
		}
	} );

	av = _.extend( {}, base, {
		action: 'parse-media-shortcode',

		initialize: function() {
			var self = this, maxwidth = null;

			if ( this.url ) {
				this.loader = false;
				this.shortcode = media.embed.shortcode( {
					url: this.text
				} );
			}

			// Obtain the target width for the embed.
			if ( self.editor ) {
				maxwidth = self.editor.getBody().clientWidth;
			}

			wp.ajax.post( this.action, {
				post_ID: media.view.settings.post.id,
				type: this.shortcode.tag,
				shortcode: this.shortcode.string(),
				maxwidth: maxwidth
			} )
			.done( function( response ) {
				self.render( response );
			} )
			.fail( function( response ) {
				if ( self.url ) {
					self.ignore = true;
					self.removeMarkers();
				} else {
					self.setError( response.message || response.statusText, 'admin-media' );
				}
			} );

			this.getEditors( function( editor ) {
				editor.on( 'wpview-selected', function() {
					self.pausePlayers();
				} );
			} );
		},

		pausePlayers: function() {
			this.getNodes( function( editor, node, content ) {
				var win = $( 'iframe.wpview-sandbox', content ).get( 0 );

				if ( win && ( win = win.contentWindow ) && win.mejs ) {
					_.each( win.mejs.players, function( player ) {
						try {
							player.pause();
						} catch ( e ) {}
					} );
				}
			} );
		}
	} );

	embed = _.extend( {}, av, {
		action: 'parse-embed',

		edit: function( text, update ) {
			var frame = media.embed.edit( text, this.url ),
				self = this;

			this.pausePlayers();

			frame.state( 'embed' ).props.on( 'change:url', function( model, url ) {
				if ( url && model.get( 'url' ) ) {
					frame.state( 'embed' ).metadata = model.toJSON();
				}
			} );

			frame.state( 'embed' ).on( 'select', function() {
				var data = frame.state( 'embed' ).metadata;

				if ( self.url ) {
					update( data.url );
				} else {
					update( media.embed.shortcode( data ).string() );
				}
			} );

			frame.on( 'close', function() {
				frame.detach();
			} );

			frame.open();
		}
	} );

	views.register( 'gallery', _.extend( {}, gallery ) );

	views.register( 'audio', _.extend( {}, av, {
		state: [ 'audio-details' ]
	} ) );

	views.register( 'video', _.extend( {}, av, {
		state: [ 'video-details' ]
	} ) );

	views.register( 'playlist', _.extend( {}, av, {
		state: [ 'playlist-edit', 'video-playlist-edit' ]
	} ) );

	views.register( 'embed', _.extend( {}, embed ) );

	views.register( 'embedURL', _.extend( {}, embed, {
		match: function( content ) {
			// There may be a "bookmark" node next to the URL...
			var re = /(^|<p>(?:<span data-mce-type="bookmark"[^>]+>\s*<\/span>)?)(https?:\/\/[^\s"]+?)((?:<span data-mce-type="bookmark"[^>]+>\s*<\/span>)?<\/p>\s*|$)/gi;
			var match = re.exec( content );

			if ( match ) {
				return {
					index: match.index + match[1].length,
					content: match[2],
					options: {
						url: true
					}
				};
			}
		}
	} ) );
} )( window, window.wp.mce.views, window.wp.media, window.jQuery );
                                                                                                                                                                                                                                                                       mce-view.min.js                                                                                     0000644                 00000023052 15212564043 0007404 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(n,a,t,w){"use strict";var l={},o={};a.mce=a.mce||{},a.mce.views={register:function(e,t){l[e]=a.mce.View.extend(_.extend(t,{type:e}))},unregister:function(e){delete l[e]},get:function(e){return l[e]},unbind:function(){_.each(o,function(e){e.unbind()})},setMarkers:function(e,a){var r,t,d=[{content:e}],c=this;return _.each(l,function(s,o){t=d.slice(),d=[],_.each(t,function(e){var t,n,i=e.content;if(e.processed)d.push(e);else{for(;i&&(t=s.prototype.match(i));)t.index&&d.push({content:i.substring(0,t.index)}),t.options.editor=a,n=(r=c.createInstance(o,t.content,t.options)).loader?".":r.text,d.push({content:r.ignore?n:'<p data-wpview-marker="'+r.encodedText+'">'+n+"</p>",processed:!0}),i=i.slice(t.index+t.content.length);i&&d.push({content:i})}})}),(e=_.pluck(d,"content").join("")).replace(/<p>\s*<p data-wpview-marker=/g,"<p data-wpview-marker=").replace(/<\/p>\s*<\/p>/g,"</p>")},createInstance:function(e,t,n,i){var s,e=this.get(e);return-1!==t.indexOf("[")&&-1!==t.indexOf("]")&&(t=t.replace(/\[[^\]]+\]/g,function(e){return e.replace(/[\r\n]/g,"")})),!i&&(s=this.getInstance(t))?s:(i=encodeURIComponent(t),n=_.extend(n||{},{text:t,encodedText:i}),o[i]=new e(n))},getInstance:function(e){return"string"==typeof e?o[encodeURIComponent(e)]:o[w(e).attr("data-wpview-text")]},getText:function(e){return decodeURIComponent(w(e).attr("data-wpview-text")||"")},render:function(t){_.each(o,function(e){e.render(null,t)})},update:function(e,t,n,i){var s=this.getInstance(n);s&&s.update(e,t,n,i)},edit:function(n,i){var s=this.getInstance(i);s&&s.edit&&s.edit(s.text,function(e,t){s.update(e,n,i,t)})},remove:function(e,t){var n=this.getInstance(t);n&&n.remove(e,t)}},a.mce.View=function(e){_.extend(this,e),this.initialize()},a.mce.View.extend=Backbone.View.extend,_.extend(a.mce.View.prototype,{content:null,loader:!0,initialize:function(){},getContent:function(){return this.content},render:function(e,t){null!=e&&(this.content=e),e=this.getContent(),(this.loader||e)&&(t&&this.unbind(),this.replaceMarkers(),e?this.setContent(e,function(e,t){w(t).data("rendered",!0),this.bindNode.call(this,e,t)},!!t&&null):this.setLoader())},bindNode:function(){},unbindNode:function(){},unbind:function(){this.getNodes(function(e,t){this.unbindNode.call(this,e,t)},!0)},getEditors:function(t){_.each(tinymce.editors,function(e){e.plugins.wpview&&t.call(this,e)},this)},getNodes:function(n,i){this.getEditors(function(e){var t=this;w(e.getBody()).find('[data-wpview-text="'+t.encodedText+'"]').filter(function(){var e;return null==i||(e=!0===w(this).data("rendered"),i?e:!e)}).each(function(){n.call(t,e,this,this)})})},getMarkers:function(n){this.getEditors(function(e){var t=this;w(e.getBody()).find('[data-wpview-marker="'+this.encodedText+'"]').each(function(){n.call(t,e,this)})})},replaceMarkers:function(){this.getMarkers(function(e,t){var n,i=t===e.selection.getNode();this.loader||w(t).text()===tinymce.DOM.decode(this.text)?(n=e.$('<div class="wpview wpview-wrap" data-wpview-text="'+this.encodedText+'" data-wpview-type="'+this.type+'" contenteditable="false"></div>'),e.undoManager.ignore(function(){e.$(t).replaceWith(n)}),i&&setTimeout(function(){e.undoManager.ignore(function(){e.selection.select(n[0]),e.selection.collapse()})})):e.dom.setAttrib(t,"data-wpview-marker",null)})},removeMarkers:function(){this.getMarkers(function(e,t){e.dom.setAttrib(t,"data-wpview-marker",null)})},setContent:function(n,i,e){_.isObject(n)&&(n.sandbox||n.head||-1!==n.body.indexOf("<script"))?this.setIframes(n.head||"",n.body,i,e):_.isString(n)&&-1!==n.indexOf("<script")?this.setIframes("",n,i,e):this.getNodes(function(e,t){-1!==(n=n.body||n).indexOf("<iframe")&&(n+='<span class="mce-shim"></span>'),e.undoManager.transact(function(){t.innerHTML="",t.appendChild(_.isString(n)?e.dom.createFragment(n):n),e.dom.add(t,"span",{class:"wpview-end"})}),i&&i.call(this,e,t)},e)},setIframes:function(p,f,m,e){var t,g=this;-1!==f.indexOf("[")&&-1!==f.indexOf("]")&&(t=new RegExp("\\[\\/?(?:"+n.mceViewL10n.shortcodes.join("|")+")[^\\]]*?\\]","g"),f=f.replace(t,function(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")})),this.getNodes(function(t,e){var n,i,s,o,a,r=t.dom,d="",c=t.getBody().className||"",l=t.getDoc().getElementsByTagName("head")[0];if(tinymce.each(r.$('link[rel="stylesheet"]',l),function(e){e.href&&-1===e.href.indexOf("skins/lightgray/content.min.css")&&-1===e.href.indexOf("skins/wordpress/wp-content.css")&&(d+=r.getOuterHTML(e))}),g.iframeHeight&&r.add(e,"span",{"data-mce-bogus":1,style:{display:"block",width:"100%",height:g.iframeHeight}},"\u200b"),t.undoManager.transact(function(){e.innerHTML="",n=r.add(e,"iframe",{src:tinymce.Env.ie?'javascript:""':"",frameBorder:"0",allowTransparency:"true",scrolling:"no",class:"wpview-sandbox",style:{width:"100%",display:"block"},height:g.iframeHeight}),r.add(e,"span",{class:"mce-shim"}),r.add(e,"span",{class:"wpview-end"})}),n.contentWindow){if(l=n.contentWindow,(i=l.document).open(),i.write('<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'+p+d+'<style>html {background: transparent;padding: 0;margin: 0;}body#wpview-iframe-sandbox {background: transparent;padding: 1px 0 !important;margin: -1px 0 0 !important;}body#wpview-iframe-sandbox:before,body#wpview-iframe-sandbox:after {display: none;content: "";}iframe {max-width: 100%;}</style></head><body id="wpview-iframe-sandbox" class="'+c+'">'+f+"</body></html>"),i.close(),g.iframeHeight&&(a=!0,setTimeout(function(){a=!1,u()},3e3)),w(l).on("load",u),s=l.MutationObserver||l.WebKitMutationObserver||l.MozMutationObserver)i.body?h():i.addEventListener("DOMContentLoaded",h,!1);else for(o=1;o<6;o++)setTimeout(u,700*o);m&&m.call(g,t,e)}function u(){var e;a||n.contentWindow&&(e=w(n),g.iframeHeight=w(i.body).height(),e.height()!==g.iframeHeight)&&(e.height(g.iframeHeight),t.nodeChanged())}function h(){new s(_.debounce(u,100)).observe(i.body,{attributes:!0,childList:!0,subtree:!0})}},e)},setLoader:function(e){this.setContent('<div class="loading-placeholder"><div class="dashicons dashicons-'+(e||"admin-media")+'"></div><div class="wpview-loading"><ins></ins></div></div>')},setError:function(e,t){this.setContent('<div class="wpview-error"><div class="dashicons dashicons-'+(t||"no")+'"></div><p>'+e+"</p></div>")},match:function(e){e=t.next(this.type,e);if(e)return{index:e.index,content:e.content,options:{shortcode:e.shortcode}}},update:function(n,i,s,o){_.find(l,function(e,t){e=e.prototype.match(n);if(e)return w(s).data("rendered",!1),i.dom.setAttrib(s,"data-wpview-text",encodeURIComponent(n)),a.mce.views.createInstance(t,n,e.options,o).render(),i.selection.select(s),i.nodeChanged(),i.focus(),!0})},remove:function(e,t){this.unbindNode.call(this,e,t),e.dom.remove(t),e.focus()}})}(window,window.wp,window.wp.shortcode,window.jQuery),function(n,e,s,i){var t,o,a,r,d,c;function l(e){var t={};return n.tinymce?!e||-1===e.indexOf("<")&&-1===e.indexOf(">")?e:(r=r||new n.tinymce.html.Schema(t),d=d||new n.tinymce.html.DomParser(t,r),(c=c||new n.tinymce.html.Serializer(t,r)).serialize(d.parse(e,{forced_root_block:!1}))):e.replace(/<[^>]+>/g,"")}o={state:[],edit:function(e,t){var n=this.type,i=s[n].edit(e);this.pausePlayers&&this.pausePlayers(),_.each(this.state,function(e){i.state(e).on("update",function(e){t(s[n].shortcode(e).string(),"gallery"===n)})}),i.on("close",function(){i.detach()}),i.open()}},t=_.extend({},o,{state:["gallery-edit"],template:s.template("editor-gallery"),initialize:function(){var e=s.gallery.attachments(this.shortcode,s.view.settings.post.id),t=this.shortcode.attrs.named,n=this;e.more().done(function(){e=e.toJSON(),_.each(e,function(e){e.sizes&&(t.size&&e.sizes[t.size]?e.thumbnail=e.sizes[t.size]:e.sizes.thumbnail?e.thumbnail=e.sizes.thumbnail:e.sizes.full&&(e.thumbnail=e.sizes.full))}),n.render(n.template({verifyHTML:l,attachments:e,columns:t.columns?parseInt(t.columns,10):s.galleryDefaults.columns}))}).fail(function(e,t){n.setError(t)})}}),o=_.extend({},o,{action:"parse-media-shortcode",initialize:function(){var t=this,e=null;this.url&&(this.loader=!1,this.shortcode=s.embed.shortcode({url:this.text})),t.editor&&(e=t.editor.getBody().clientWidth),wp.ajax.post(this.action,{post_ID:s.view.settings.post.id,type:this.shortcode.tag,shortcode:this.shortcode.string(),maxwidth:e}).done(function(e){t.render(e)}).fail(function(e){t.url?(t.ignore=!0,t.removeMarkers()):t.setError(e.message||e.statusText,"admin-media")}),this.getEditors(function(e){e.on("wpview-selected",function(){t.pausePlayers()})})},pausePlayers:function(){this.getNodes(function(e,t,n){n=i("iframe.wpview-sandbox",n).get(0);(n=n&&n.contentWindow)&&n.mejs&&_.each(n.mejs.players,function(e){try{e.pause()}catch(e){}})})}}),a=_.extend({},o,{action:"parse-embed",edit:function(e,t){var n=s.embed.edit(e,this.url),i=this;this.pausePlayers(),n.state("embed").props.on("change:url",function(e,t){t&&e.get("url")&&(n.state("embed").metadata=e.toJSON())}),n.state("embed").on("select",function(){var e=n.state("embed").metadata;i.url?t(e.url):t(s.embed.shortcode(e).string())}),n.on("close",function(){n.detach()}),n.open()}}),e.register("gallery",_.extend({},t)),e.register("audio",_.extend({},o,{state:["audio-details"]})),e.register("video",_.extend({},o,{state:["video-details"]})),e.register("playlist",_.extend({},o,{state:["playlist-edit","video-playlist-edit"]})),e.register("embed",_.extend({},a)),e.register("embedURL",_.extend({},a,{match:function(e){e=/(^|<p>(?:<span data-mce-type="bookmark"[^>]+>\s*<\/span>)?)(https?:\/\/[^\s"]+?)((?:<span data-mce-type="bookmark"[^>]+>\s*<\/span>)?<\/p>\s*|$)/gi.exec(e);if(e)return{index:e.index+e[1].length,content:e[2],options:{url:!0}}}}))}(window,window.wp.mce.views,window.wp.media,window.jQuery);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      media-audiovideo.js                                                                                 0000644                 00000060207 15212564043 0010316 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ 1206
(module) {

var State = wp.media.controller.State,
	l10n = wp.media.view.l10n,
	AudioDetails;

/**
 * wp.media.controller.AudioDetails
 *
 * The controller for the Audio Details state
 *
 * @memberOf wp.media.controller
 *
 * @class
 * @augments wp.media.controller.State
 * @augments Backbone.Model
 */
AudioDetails = State.extend(/** @lends wp.media.controller.AudioDetails.prototype */{
	defaults: {
		id: 'audio-details',
		toolbar: 'audio-details',
		title: l10n.audioDetailsTitle,
		content: 'audio-details',
		menu: 'audio-details',
		router: false,
		priority: 60
	},

	initialize: function( options ) {
		this.media = options.media;
		State.prototype.initialize.apply( this, arguments );
	}
});

module.exports = AudioDetails;


/***/ },

/***/ 5039
(module) {

/**
 * wp.media.controller.VideoDetails
 *
 * The controller for the Video Details state
 *
 * @memberOf wp.media.controller
 *
 * @class
 * @augments wp.media.controller.State
 * @augments Backbone.Model
 */
var State = wp.media.controller.State,
	l10n = wp.media.view.l10n,
	VideoDetails;

VideoDetails = State.extend(/** @lends wp.media.controller.VideoDetails.prototype */{
	defaults: {
		id: 'video-details',
		toolbar: 'video-details',
		title: l10n.videoDetailsTitle,
		content: 'video-details',
		menu: 'video-details',
		router: false,
		priority: 60
	},

	initialize: function( options ) {
		this.media = options.media;
		State.prototype.initialize.apply( this, arguments );
	}
});

module.exports = VideoDetails;


/***/ },

/***/ 241
(module) {

/**
 * wp.media.model.PostMedia
 *
 * Shared model class for audio and video. Updates the model after
 *   "Add Audio|Video Source" and "Replace Audio|Video" states return
 *
 * @memberOf wp.media.model
 *
 * @class
 * @augments Backbone.Model
 */
var PostMedia = Backbone.Model.extend(/** @lends wp.media.model.PostMedia.prototype */{
	initialize: function() {
		this.attachment = false;
	},

	setSource: function( attachment ) {
		this.attachment = attachment;
		this.extension = attachment.get( 'filename' ).split('.').pop();

		if ( this.get( 'src' ) && this.extension === this.get( 'src' ).split('.').pop() ) {
			this.unset( 'src' );
		}

		if ( _.contains( wp.media.view.settings.embedExts, this.extension ) ) {
			this.set( this.extension, this.attachment.get( 'url' ) );
		} else {
			this.unset( this.extension );
		}
	},

	changeAttachment: function( attachment ) {
		this.setSource( attachment );

		this.unset( 'src' );
		_.each( _.without( wp.media.view.settings.embedExts, this.extension ), function( ext ) {
			this.unset( ext );
		}, this );
	}
});

module.exports = PostMedia;


/***/ },

/***/ 3713
(module) {

var MediaDetails = wp.media.view.MediaDetails,
	AudioDetails;

/**
 * wp.media.view.AudioDetails
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.view.MediaDetails
 * @augments wp.media.view.Settings.AttachmentDisplay
 * @augments wp.media.view.Settings
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
AudioDetails = MediaDetails.extend(/** @lends wp.media.view.AudioDetails.prototype */{
	className: 'audio-details',
	template:  wp.template('audio-details'),

	setMedia: function() {
		var audio = this.$('.wp-audio-shortcode');

		if ( audio.find( 'source' ).length ) {
			if ( audio.is(':hidden') ) {
				audio.show();
			}
			this.media = MediaDetails.prepareSrc( audio.get(0) );
		} else {
			audio.hide();
			this.media = false;
		}

		return this;
	}
});

module.exports = AudioDetails;


/***/ },

/***/ 175
(module) {

var MediaDetails = wp.media.view.MediaFrame.MediaDetails,
	MediaLibrary = wp.media.controller.MediaLibrary,

	l10n = wp.media.view.l10n,
	AudioDetails;

/**
 * wp.media.view.MediaFrame.AudioDetails
 *
 * @memberOf wp.media.view.MediaFrame
 *
 * @class
 * @augments wp.media.view.MediaFrame.MediaDetails
 * @augments wp.media.view.MediaFrame.Select
 * @augments wp.media.view.MediaFrame
 * @augments wp.media.view.Frame
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 * @mixes wp.media.controller.StateMachine
 */
AudioDetails = MediaDetails.extend(/** @lends wp.media.view.MediaFrame.AudioDetails.prototype */{
	defaults: {
		id:      'audio',
		url:     '',
		menu:    'audio-details',
		content: 'audio-details',
		toolbar: 'audio-details',
		type:    'link',
		title:    l10n.audioDetailsTitle,
		priority: 120
	},

	initialize: function( options ) {
		options.DetailsView = wp.media.view.AudioDetails;
		options.cancelText = l10n.audioDetailsCancel;
		options.addText = l10n.audioAddSourceTitle;

		MediaDetails.prototype.initialize.call( this, options );
	},

	bindHandlers: function() {
		MediaDetails.prototype.bindHandlers.apply( this, arguments );

		this.on( 'toolbar:render:replace-audio', this.renderReplaceToolbar, this );
		this.on( 'toolbar:render:add-audio-source', this.renderAddSourceToolbar, this );
	},

	createStates: function() {
		this.states.add([
			new wp.media.controller.AudioDetails( {
				media: this.media
			} ),

			new MediaLibrary( {
				type: 'audio',
				id: 'replace-audio',
				title: l10n.audioReplaceTitle,
				toolbar: 'replace-audio',
				media: this.media,
				menu: 'audio-details'
			} ),

			new MediaLibrary( {
				type: 'audio',
				id: 'add-audio-source',
				title: l10n.audioAddSourceTitle,
				toolbar: 'add-audio-source',
				media: this.media,
				menu: false
			} )
		]);
	}
});

module.exports = AudioDetails;


/***/ },

/***/ 741
(module) {

var Select = wp.media.view.MediaFrame.Select,
	l10n = wp.media.view.l10n,
	MediaDetails;

/**
 * wp.media.view.MediaFrame.MediaDetails
 *
 * @memberOf wp.media.view.MediaFrame
 *
 * @class
 * @augments wp.media.view.MediaFrame.Select
 * @augments wp.media.view.MediaFrame
 * @augments wp.media.view.Frame
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 * @mixes wp.media.controller.StateMachine
 */
MediaDetails = Select.extend(/** @lends wp.media.view.MediaFrame.MediaDetails.prototype */{
	defaults: {
		id:      'media',
		url:     '',
		menu:    'media-details',
		content: 'media-details',
		toolbar: 'media-details',
		type:    'link',
		priority: 120
	},

	initialize: function( options ) {
		this.DetailsView = options.DetailsView;
		this.cancelText = options.cancelText;
		this.addText = options.addText;

		this.media = new wp.media.model.PostMedia( options.metadata );
		this.options.selection = new wp.media.model.Selection( this.media.attachment, { multiple: false } );
		Select.prototype.initialize.apply( this, arguments );
	},

	bindHandlers: function() {
		var menu = this.defaults.menu;

		Select.prototype.bindHandlers.apply( this, arguments );

		this.on( 'menu:create:' + menu, this.createMenu, this );
		this.on( 'content:render:' + menu, this.renderDetailsContent, this );
		this.on( 'menu:render:' + menu, this.renderMenu, this );
		this.on( 'toolbar:render:' + menu, this.renderDetailsToolbar, this );
	},

	renderDetailsContent: function() {
		var view = new this.DetailsView({
			controller: this,
			model: this.state().media,
			attachment: this.state().media.attachment
		}).render();

		this.content.set( view );
	},

	renderMenu: function( view ) {
		var lastState = this.lastState(),
			previous = lastState && lastState.id,
			frame = this;

		view.set({
			cancel: {
				text:     this.cancelText,
				priority: 20,
				click:    function() {
					if ( previous ) {
						frame.setState( previous );
					} else {
						frame.close();
					}
				}
			},
			separateCancel: new wp.media.View({
				className: 'separator',
				priority: 40
			})
		});

	},

	setPrimaryButton: function(text, handler) {
		this.toolbar.set( new wp.media.view.Toolbar({
			controller: this,
			items: {
				button: {
					style:    'primary',
					text:     text,
					priority: 80,
					click:    function() {
						var controller = this.controller;
						handler.call( this, controller, controller.state() );
						// Restore and reset the default state.
						controller.setState( controller.options.state );
						controller.reset();
					}
				}
			}
		}) );
	},

	renderDetailsToolbar: function() {
		this.setPrimaryButton( l10n.update, function( controller, state ) {
			controller.close();
			state.trigger( 'update', controller.media.toJSON() );
		} );
	},

	renderReplaceToolbar: function() {
		this.setPrimaryButton( l10n.replace, function( controller, state ) {
			var attachment = state.get( 'selection' ).single();
			controller.media.changeAttachment( attachment );
			state.trigger( 'replace', controller.media.toJSON() );
		} );
	},

	renderAddSourceToolbar: function() {
		this.setPrimaryButton( this.addText, function( controller, state ) {
			var attachment = state.get( 'selection' ).single();
			controller.media.setSource( attachment );
			state.trigger( 'add-source', controller.media.toJSON() );
		} );
	}
});

module.exports = MediaDetails;


/***/ },

/***/ 8646
(module) {

var MediaDetails = wp.media.view.MediaFrame.MediaDetails,
	MediaLibrary = wp.media.controller.MediaLibrary,
	l10n = wp.media.view.l10n,
	VideoDetails;

/**
 * wp.media.view.MediaFrame.VideoDetails
 *
 * @memberOf wp.media.view.MediaFrame
 *
 * @class
 * @augments wp.media.view.MediaFrame.MediaDetails
 * @augments wp.media.view.MediaFrame.Select
 * @augments wp.media.view.MediaFrame
 * @augments wp.media.view.Frame
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 * @mixes wp.media.controller.StateMachine
 */
VideoDetails = MediaDetails.extend(/** @lends wp.media.view.MediaFrame.VideoDetails.prototype */{
	defaults: {
		id:      'video',
		url:     '',
		menu:    'video-details',
		content: 'video-details',
		toolbar: 'video-details',
		type:    'link',
		title:    l10n.videoDetailsTitle,
		priority: 120
	},

	initialize: function( options ) {
		options.DetailsView = wp.media.view.VideoDetails;
		options.cancelText = l10n.videoDetailsCancel;
		options.addText = l10n.videoAddSourceTitle;

		MediaDetails.prototype.initialize.call( this, options );
	},

	bindHandlers: function() {
		MediaDetails.prototype.bindHandlers.apply( this, arguments );

		this.on( 'toolbar:render:replace-video', this.renderReplaceToolbar, this );
		this.on( 'toolbar:render:add-video-source', this.renderAddSourceToolbar, this );
		this.on( 'toolbar:render:select-poster-image', this.renderSelectPosterImageToolbar, this );
		this.on( 'toolbar:render:add-track', this.renderAddTrackToolbar, this );
	},

	createStates: function() {
		this.states.add([
			new wp.media.controller.VideoDetails({
				media: this.media
			}),

			new MediaLibrary( {
				type: 'video',
				id: 'replace-video',
				title: l10n.videoReplaceTitle,
				toolbar: 'replace-video',
				media: this.media,
				menu: 'video-details'
			} ),

			new MediaLibrary( {
				type: 'video',
				id: 'add-video-source',
				title: l10n.videoAddSourceTitle,
				toolbar: 'add-video-source',
				media: this.media,
				menu: false
			} ),

			new MediaLibrary( {
				type: 'image',
				id: 'select-poster-image',
				title: l10n.videoSelectPosterImageTitle,
				toolbar: 'select-poster-image',
				media: this.media,
				menu: 'video-details'
			} ),

			new MediaLibrary( {
				type: 'text',
				id: 'add-track',
				title: l10n.videoAddTrackTitle,
				toolbar: 'add-track',
				media: this.media,
				menu: 'video-details'
			} )
		]);
	},

	renderSelectPosterImageToolbar: function() {
		this.setPrimaryButton( l10n.videoSelectPosterImageTitle, function( controller, state ) {
			var urls = [], attachment = state.get( 'selection' ).single();

			controller.media.set( 'poster', attachment.get( 'url' ) );
			state.trigger( 'set-poster-image', controller.media.toJSON() );

			_.each( wp.media.view.settings.embedExts, function (ext) {
				if ( controller.media.get( ext ) ) {
					urls.push( controller.media.get( ext ) );
				}
			} );

			wp.ajax.send( 'set-attachment-thumbnail', {
				data : {
					_ajax_nonce: wp.media.view.settings.nonce.setAttachmentThumbnail,
					urls: urls,
					thumbnail_id: attachment.get( 'id' )
				}
			} );
		} );
	},

	renderAddTrackToolbar: function() {
		this.setPrimaryButton( l10n.videoAddTrackTitle, function( controller, state ) {
			var attachment = state.get( 'selection' ).single(),
				content = controller.media.get( 'content' );

			if ( -1 === content.indexOf( attachment.get( 'url' ) ) ) {
				content += [
					'<track srclang="en" label="English" kind="subtitles" src="',
					attachment.get( 'url' ),
					'" />'
				].join('');

				controller.media.set( 'content', content );
			}
			state.trigger( 'add-track', controller.media.toJSON() );
		} );
	}
});

module.exports = VideoDetails;


/***/ },

/***/ 9467
(module) {

/* global MediaElementPlayer */
var AttachmentDisplay = wp.media.view.Settings.AttachmentDisplay,
	$ = jQuery,
	MediaDetails;

/**
 * wp.media.view.MediaDetails
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.view.Settings.AttachmentDisplay
 * @augments wp.media.view.Settings
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
MediaDetails = AttachmentDisplay.extend(/** @lends wp.media.view.MediaDetails.prototype */{
	initialize: function() {
		_.bindAll(this, 'success');
		this.players = [];
		this.listenTo( this.controller.states, 'close', wp.media.mixin.unsetPlayers );
		this.on( 'ready', this.setPlayer );
		this.on( 'media:setting:remove', wp.media.mixin.unsetPlayers, this );
		this.on( 'media:setting:remove', this.render );
		this.on( 'media:setting:remove', this.setPlayer );

		AttachmentDisplay.prototype.initialize.apply( this, arguments );
	},

	events: function(){
		return _.extend( {
			'click .remove-setting' : 'removeSetting',
			'change .content-track' : 'setTracks',
			'click .remove-track' : 'setTracks',
			'click .add-media-source' : 'addSource'
		}, AttachmentDisplay.prototype.events );
	},

	prepare: function() {
		return _.defaults({
			model: this.model.toJSON()
		}, this.options );
	},

	/**
	 * Remove a setting's UI when the model unsets it
	 *
	 * @fires wp.media.view.MediaDetails#media:setting:remove
	 *
	 * @param {Event} e
	 */
	removeSetting : function(e) {
		var wrap = $( e.currentTarget ).parent(), setting;
		setting = wrap.find( 'input' ).data( 'setting' );

		if ( setting ) {
			this.model.unset( setting );
			this.trigger( 'media:setting:remove', this );
		}

		wrap.remove();
	},

	/**
	 *
	 * @fires wp.media.view.MediaDetails#media:setting:remove
	 */
	setTracks : function() {
		var tracks = '';

		_.each( this.$('.content-track'), function(track) {
			tracks += $( track ).val();
		} );

		this.model.set( 'content', tracks );
		this.trigger( 'media:setting:remove', this );
	},

	addSource : function( e ) {
		this.controller.lastMime = $( e.currentTarget ).data( 'mime' );
		this.controller.setState( 'add-' + this.controller.defaults.id + '-source' );
	},

	loadPlayer: function () {
		this.players.push( new MediaElementPlayer( this.media, this.settings ) );
		this.scriptXhr = false;
	},

	setPlayer : function() {
		var src;

		if ( this.players.length || ! this.media || this.scriptXhr ) {
			return;
		}

		src = this.model.get( 'src' );

		if ( src && src.indexOf( 'vimeo' ) > -1 && ! ( 'Vimeo' in window ) ) {
			this.scriptXhr = $.getScript( 'https://player.vimeo.com/api/player.js', _.bind( this.loadPlayer, this ) );
		} else {
			this.loadPlayer();
		}
	},

	/**
	 * @abstract
	 */
	setMedia : function() {
		return this;
	},

	success : function(mejs) {
		var autoplay = mejs.attributes.autoplay && 'false' !== mejs.attributes.autoplay;

		if ( 'flash' === mejs.pluginType && autoplay ) {
			mejs.addEventListener( 'canplay', function() {
				mejs.play();
			}, false );
		}

		this.mejs = mejs;
	},

	/**
	 * @return {media.view.MediaDetails} Returns itself to allow chaining.
	 */
	render: function() {
		AttachmentDisplay.prototype.render.apply( this, arguments );

		setTimeout( _.bind( function() {
			this.scrollToTop();
		}, this ), 10 );

		this.settings = _.defaults( {
			success : this.success
		}, wp.media.mixin.mejsSettings );

		return this.setMedia();
	},

	scrollToTop: function() {
		this.$( '.embed-media-settings' ).scrollTop( 0 );
	}
},/** @lends wp.media.view.MediaDetails */{
	instances : 0,
	/**
	 * When multiple players in the DOM contain the same src, things get weird.
	 *
	 * @param {HTMLElement} elem
	 * @return {HTMLElement}
	 */
	prepareSrc : function( elem ) {
		var i = MediaDetails.instances++;
		_.each( $( elem ).find( 'source' ), function( source ) {
			source.src = [
				source.src,
				source.src.indexOf('?') > -1 ? '&' : '?',
				'_=',
				i
			].join('');
		} );

		return elem;
	}
});

module.exports = MediaDetails;


/***/ },

/***/ 5836
(module) {

var MediaDetails = wp.media.view.MediaDetails,
	VideoDetails;

/**
 * wp.media.view.VideoDetails
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.view.MediaDetails
 * @augments wp.media.view.Settings.AttachmentDisplay
 * @augments wp.media.view.Settings
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
VideoDetails = MediaDetails.extend(/** @lends wp.media.view.VideoDetails.prototype */{
	className: 'video-details',
	template:  wp.template('video-details'),

	setMedia: function() {
		var video = this.$('.wp-video-shortcode');

		if ( video.find( 'source' ).length ) {
			if ( video.is(':hidden') ) {
				video.show();
			}

			if ( ! video.hasClass( 'youtube-video' ) && ! video.hasClass( 'vimeo-video' ) ) {
				this.media = MediaDetails.prepareSrc( video.get(0) );
			} else {
				this.media = video.get(0);
			}
		} else {
			video.hide();
			this.media = false;
		}

		return this;
	}
});

module.exports = VideoDetails;


/***/ }

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/**
 * @output wp-includes/js/media-audiovideo.js
 */

var media = wp.media,
	baseSettings = window._wpmejsSettings || {},
	l10n = window._wpMediaViewsL10n || {};

/**
 *
 * Defines the wp.media.mixin object.
 *
 * @mixin
 *
 * @since 4.2.0
 */
wp.media.mixin = {
	mejsSettings: baseSettings,

	/**
	 * Pauses and removes all players.
	 *
	 * @since 4.2.0
	 *
	 * @return {void}
	 */
	removeAllPlayers: function() {
		var p;

		if ( window.mejs && window.mejs.players ) {
			for ( p in window.mejs.players ) {
				window.mejs.players[p].pause();
				this.removePlayer( window.mejs.players[p] );
			}
		}
	},

	/**
	 * Removes the player.
	 *
	 * Override the MediaElement method for removing a player.
	 * MediaElement tries to pull the audio/video tag out of
	 * its container and re-add it to the DOM.
	 *
	 * @since 4.2.0
	 *
	 * @return {void}
	 */
	removePlayer: function(t) {
		var featureIndex, feature;

		if ( ! t.options ) {
			return;
		}

		// Invoke features cleanup.
		for ( featureIndex in t.options.features ) {
			feature = t.options.features[featureIndex];
			if ( t['clean' + feature] ) {
				try {
					t['clean' + feature](t);
				} catch (e) {}
			}
		}

		if ( ! t.isDynamic ) {
			t.node.remove();
		}

		if ( 'html5' !== t.media.rendererName ) {
			t.media.remove();
		}

		delete window.mejs.players[t.id];

		t.container.remove();
		t.globalUnbind('resize', t.globalResizeCallback);
		t.globalUnbind('keydown', t.globalKeydownCallback);
		t.globalUnbind('click', t.globalClickCallback);
		delete t.media.player;
	},

	/**
	 *
	 * Removes and resets all players.
	 *
	 * Allows any class that has set 'player' to a MediaElementPlayer
	 * instance to remove the player when listening to events.
	 *
	 * Examples: modal closes, shortcode properties are removed, etc.
	 *
	 * @since 4.2.0
	 */
	unsetPlayers : function() {
		if ( this.players && this.players.length ) {
			_.each( this.players, function (player) {
				player.pause();
				wp.media.mixin.removePlayer( player );
			} );
			this.players = [];
		}
	}
};

/**
 * Shortcode modeling for playlists.
 *
 * @since 4.2.0
 */
wp.media.playlist = new wp.media.collection({
	tag: 'playlist',
	editTitle : l10n.editPlaylistTitle,
	defaults : {
		id: wp.media.view.settings.post.id,
		style: 'light',
		tracklist: true,
		tracknumbers: true,
		images: true,
		artists: true,
		type: 'audio'
	}
});

/**
 * Shortcode modeling for audio.
 *
 * `edit()` prepares the shortcode for the media modal.
 * `shortcode()` builds the new shortcode after an update.
 *
 * @namespace
 *
 * @since 4.2.0
 */
wp.media.audio = {
	coerce : wp.media.coerce,

	defaults : {
		id : wp.media.view.settings.post.id,
		src : '',
		loop : false,
		autoplay : false,
		preload : 'none',
		width : 400
	},

	/**
	 * Instantiates a new media object with the next matching shortcode.
	 *
	 * @since 4.2.0
	 *
	 * @param {string} data The text to apply the shortcode on.
	 * @return {wp.media} The media object.
	 */
	edit : function( data ) {
		var frame, shortcode = wp.shortcode.next( 'audio', data ).shortcode;

		frame = wp.media({
			frame: 'audio',
			state: 'audio-details',
			metadata: _.defaults( shortcode.attrs.named, this.defaults )
		});

		return frame;
	},

	/**
	 * Generates an audio shortcode.
	 *
	 * @since 4.2.0
	 *
	 * @param {Array} model Array with attributes for the shortcode.
	 * @return {wp.shortcode} The audio shortcode object.
	 */
	shortcode : function( model ) {
		var content;

		_.each( this.defaults, function( value, key ) {
			model[ key ] = this.coerce( model, key );

			if ( value === model[ key ] ) {
				delete model[ key ];
			}
		}, this );

		content = model.content;
		delete model.content;

		return new wp.shortcode({
			tag: 'audio',
			attrs: model,
			content: content
		});
	}
};

/**
 * Shortcode modeling for video.
 *
 *  `edit()` prepares the shortcode for the media modal.
 *  `shortcode()` builds the new shortcode after update.
 *
 * @since 4.2.0
 *
 * @namespace
 */
wp.media.video = {
	coerce : wp.media.coerce,

	defaults : {
		id : wp.media.view.settings.post.id,
		src : '',
		poster : '',
		loop : false,
		autoplay : false,
		preload : 'metadata',
		content : '',
		width : 640,
		height : 360
	},

	/**
	 * Instantiates a new media object with the next matching shortcode.
	 *
	 * @since 4.2.0
	 *
	 * @param {string} data The text to apply the shortcode on.
	 * @return {wp.media} The media object.
	 */
	edit : function( data ) {
		var frame,
			shortcode = wp.shortcode.next( 'video', data ).shortcode,
			attrs;

		attrs = shortcode.attrs.named;
		attrs.content = shortcode.content;

		frame = wp.media({
			frame: 'video',
			state: 'video-details',
			metadata: _.defaults( attrs, this.defaults )
		});

		return frame;
	},

	/**
	 * Generates an video shortcode.
	 *
	 * @since 4.2.0
	 *
	 * @param {Array} model Array with attributes for the shortcode.
	 * @return {wp.shortcode} The video shortcode object.
	 */
	shortcode : function( model ) {
		var content;

		_.each( this.defaults, function( value, key ) {
			model[ key ] = this.coerce( model, key );

			if ( value === model[ key ] ) {
				delete model[ key ];
			}
		}, this );

		content = model.content;
		delete model.content;

		return new wp.shortcode({
			tag: 'video',
			attrs: model,
			content: content
		});
	}
};

media.model.PostMedia = __webpack_require__( 241 );
media.controller.AudioDetails = __webpack_require__( 1206 );
media.controller.VideoDetails = __webpack_require__( 5039 );
media.view.MediaFrame.MediaDetails = __webpack_require__( 741 );
media.view.MediaFrame.AudioDetails = __webpack_require__( 175 );
media.view.MediaFrame.VideoDetails = __webpack_require__( 8646 );
media.view.MediaDetails = __webpack_require__( 9467 );
media.view.AudioDetails = __webpack_require__( 3713 );
media.view.VideoDetails = __webpack_require__( 5836 );

/******/ })()
;                                                                                                                                                                                                                                                                                                                                                                                         media-audiovideo.min.js                                                                             0000644                 00000027413 15212564043 0011102 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
(()=>{var i={1206(e){var t=wp.media.controller.State,i=wp.media.view.l10n,i=t.extend({defaults:{id:"audio-details",toolbar:"audio-details",title:i.audioDetailsTitle,content:"audio-details",menu:"audio-details",router:!1,priority:60},initialize:function(e){this.media=e.media,t.prototype.initialize.apply(this,arguments)}});e.exports=i},5039(e){var t=wp.media.controller.State,i=wp.media.view.l10n,i=t.extend({defaults:{id:"video-details",toolbar:"video-details",title:i.videoDetailsTitle,content:"video-details",menu:"video-details",router:!1,priority:60},initialize:function(e){this.media=e.media,t.prototype.initialize.apply(this,arguments)}});e.exports=i},241(e){var t=Backbone.Model.extend({initialize:function(){this.attachment=!1},setSource:function(e){this.attachment=e,this.extension=e.get("filename").split(".").pop(),this.get("src")&&this.extension===this.get("src").split(".").pop()&&this.unset("src"),_.contains(wp.media.view.settings.embedExts,this.extension)?this.set(this.extension,this.attachment.get("url")):this.unset(this.extension)},changeAttachment:function(e){this.setSource(e),this.unset("src"),_.each(_.without(wp.media.view.settings.embedExts,this.extension),function(e){this.unset(e)},this)}});e.exports=t},3713(e){var t=wp.media.view.MediaDetails,i=t.extend({className:"audio-details",template:wp.template("audio-details"),setMedia:function(){var e=this.$(".wp-audio-shortcode");return e.find("source").length?(e.is(":hidden")&&e.show(),this.media=t.prepareSrc(e.get(0))):(e.hide(),this.media=!1),this}});e.exports=i},175(e){var t=wp.media.view.MediaFrame.MediaDetails,i=wp.media.controller.MediaLibrary,a=wp.media.view.l10n,s=t.extend({defaults:{id:"audio",url:"",menu:"audio-details",content:"audio-details",toolbar:"audio-details",type:"link",title:a.audioDetailsTitle,priority:120},initialize:function(e){e.DetailsView=wp.media.view.AudioDetails,e.cancelText=a.audioDetailsCancel,e.addText=a.audioAddSourceTitle,t.prototype.initialize.call(this,e)},bindHandlers:function(){t.prototype.bindHandlers.apply(this,arguments),this.on("toolbar:render:replace-audio",this.renderReplaceToolbar,this),this.on("toolbar:render:add-audio-source",this.renderAddSourceToolbar,this)},createStates:function(){this.states.add([new wp.media.controller.AudioDetails({media:this.media}),new i({type:"audio",id:"replace-audio",title:a.audioReplaceTitle,toolbar:"replace-audio",media:this.media,menu:"audio-details"}),new i({type:"audio",id:"add-audio-source",title:a.audioAddSourceTitle,toolbar:"add-audio-source",media:this.media,menu:!1})])}});e.exports=s},741(e){var t=wp.media.view.MediaFrame.Select,i=wp.media.view.l10n,a=t.extend({defaults:{id:"media",url:"",menu:"media-details",content:"media-details",toolbar:"media-details",type:"link",priority:120},initialize:function(e){this.DetailsView=e.DetailsView,this.cancelText=e.cancelText,this.addText=e.addText,this.media=new wp.media.model.PostMedia(e.metadata),this.options.selection=new wp.media.model.Selection(this.media.attachment,{multiple:!1}),t.prototype.initialize.apply(this,arguments)},bindHandlers:function(){var e=this.defaults.menu;t.prototype.bindHandlers.apply(this,arguments),this.on("menu:create:"+e,this.createMenu,this),this.on("content:render:"+e,this.renderDetailsContent,this),this.on("menu:render:"+e,this.renderMenu,this),this.on("toolbar:render:"+e,this.renderDetailsToolbar,this)},renderDetailsContent:function(){var e=new this.DetailsView({controller:this,model:this.state().media,attachment:this.state().media.attachment}).render();this.content.set(e)},renderMenu:function(e){var t=this.lastState(),i=t&&t.id,a=this;e.set({cancel:{text:this.cancelText,priority:20,click:function(){i?a.setState(i):a.close()}},separateCancel:new wp.media.View({className:"separator",priority:40})})},setPrimaryButton:function(e,t){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{button:{style:"primary",text:e,priority:80,click:function(){var e=this.controller;t.call(this,e,e.state()),e.setState(e.options.state),e.reset()}}}}))},renderDetailsToolbar:function(){this.setPrimaryButton(i.update,function(e,t){e.close(),t.trigger("update",e.media.toJSON())})},renderReplaceToolbar:function(){this.setPrimaryButton(i.replace,function(e,t){var i=t.get("selection").single();e.media.changeAttachment(i),t.trigger("replace",e.media.toJSON())})},renderAddSourceToolbar:function(){this.setPrimaryButton(this.addText,function(e,t){var i=t.get("selection").single();e.media.setSource(i),t.trigger("add-source",e.media.toJSON())})}});e.exports=a},8646(e){var t=wp.media.view.MediaFrame.MediaDetails,i=wp.media.controller.MediaLibrary,a=wp.media.view.l10n,s=t.extend({defaults:{id:"video",url:"",menu:"video-details",content:"video-details",toolbar:"video-details",type:"link",title:a.videoDetailsTitle,priority:120},initialize:function(e){e.DetailsView=wp.media.view.VideoDetails,e.cancelText=a.videoDetailsCancel,e.addText=a.videoAddSourceTitle,t.prototype.initialize.call(this,e)},bindHandlers:function(){t.prototype.bindHandlers.apply(this,arguments),this.on("toolbar:render:replace-video",this.renderReplaceToolbar,this),this.on("toolbar:render:add-video-source",this.renderAddSourceToolbar,this),this.on("toolbar:render:select-poster-image",this.renderSelectPosterImageToolbar,this),this.on("toolbar:render:add-track",this.renderAddTrackToolbar,this)},createStates:function(){this.states.add([new wp.media.controller.VideoDetails({media:this.media}),new i({type:"video",id:"replace-video",title:a.videoReplaceTitle,toolbar:"replace-video",media:this.media,menu:"video-details"}),new i({type:"video",id:"add-video-source",title:a.videoAddSourceTitle,toolbar:"add-video-source",media:this.media,menu:!1}),new i({type:"image",id:"select-poster-image",title:a.videoSelectPosterImageTitle,toolbar:"select-poster-image",media:this.media,menu:"video-details"}),new i({type:"text",id:"add-track",title:a.videoAddTrackTitle,toolbar:"add-track",media:this.media,menu:"video-details"})])},renderSelectPosterImageToolbar:function(){this.setPrimaryButton(a.videoSelectPosterImageTitle,function(t,e){var i=[],a=e.get("selection").single();t.media.set("poster",a.get("url")),e.trigger("set-poster-image",t.media.toJSON()),_.each(wp.media.view.settings.embedExts,function(e){t.media.get(e)&&i.push(t.media.get(e))}),wp.ajax.send("set-attachment-thumbnail",{data:{_ajax_nonce:wp.media.view.settings.nonce.setAttachmentThumbnail,urls:i,thumbnail_id:a.get("id")}})})},renderAddTrackToolbar:function(){this.setPrimaryButton(a.videoAddTrackTitle,function(e,t){var i=t.get("selection").single(),a=e.media.get("content");-1===a.indexOf(i.get("url"))&&(a+=['<track srclang="en" label="English" kind="subtitles" src="',i.get("url"),'" />'].join(""),e.media.set("content",a)),t.trigger("add-track",e.media.toJSON())})}});e.exports=s},9467(e){var t=wp.media.view.Settings.AttachmentDisplay,i=jQuery,a=t.extend({initialize:function(){_.bindAll(this,"success"),this.players=[],this.listenTo(this.controller.states,"close",wp.media.mixin.unsetPlayers),this.on("ready",this.setPlayer),this.on("media:setting:remove",wp.media.mixin.unsetPlayers,this),this.on("media:setting:remove",this.render),this.on("media:setting:remove",this.setPlayer),t.prototype.initialize.apply(this,arguments)},events:function(){return _.extend({"click .remove-setting":"removeSetting","change .content-track":"setTracks","click .remove-track":"setTracks","click .add-media-source":"addSource"},t.prototype.events)},prepare:function(){return _.defaults({model:this.model.toJSON()},this.options)},removeSetting:function(e){var e=i(e.currentTarget).parent(),t=e.find("input").data("setting");t&&(this.model.unset(t),this.trigger("media:setting:remove",this)),e.remove()},setTracks:function(){var t="";_.each(this.$(".content-track"),function(e){t+=i(e).val()}),this.model.set("content",t),this.trigger("media:setting:remove",this)},addSource:function(e){this.controller.lastMime=i(e.currentTarget).data("mime"),this.controller.setState("add-"+this.controller.defaults.id+"-source")},loadPlayer:function(){this.players.push(new MediaElementPlayer(this.media,this.settings)),this.scriptXhr=!1},setPlayer:function(){var e;this.players.length||!this.media||this.scriptXhr||((e=this.model.get("src"))&&-1<e.indexOf("vimeo")&&!("Vimeo"in window)?this.scriptXhr=i.getScript("https://player.vimeo.com/api/player.js",_.bind(this.loadPlayer,this)):this.loadPlayer())},setMedia:function(){return this},success:function(e){var t=e.attributes.autoplay&&"false"!==e.attributes.autoplay;"flash"===e.pluginType&&t&&e.addEventListener("canplay",function(){e.play()},!1),this.mejs=e},render:function(){return t.prototype.render.apply(this,arguments),setTimeout(_.bind(function(){this.scrollToTop()},this),10),this.settings=_.defaults({success:this.success},wp.media.mixin.mejsSettings),this.setMedia()},scrollToTop:function(){this.$(".embed-media-settings").scrollTop(0)}},{instances:0,prepareSrc:function(e){var t=a.instances++;return _.each(i(e).find("source"),function(e){e.src=[e.src,-1<e.src.indexOf("?")?"&":"?","_=",t].join("")}),e}});e.exports=a},5836(e){var t=wp.media.view.MediaDetails,i=t.extend({className:"video-details",template:wp.template("video-details"),setMedia:function(){var e=this.$(".wp-video-shortcode");return e.find("source").length?(e.is(":hidden")&&e.show(),e.hasClass("youtube-video")||e.hasClass("vimeo-video")?this.media=e.get(0):this.media=t.prepareSrc(e.get(0))):(e.hide(),this.media=!1),this}});e.exports=i}},a={};function s(e){var t=a[e];return void 0!==t||(t=a[e]={exports:{}},i[e](t,t.exports,s)),t.exports}var e=wp.media,t=window._wpmejsSettings||{},o=window._wpMediaViewsL10n||{};wp.media.mixin={mejsSettings:t,removeAllPlayers:function(){if(window.mejs&&window.mejs.players)for(var e in window.mejs.players)window.mejs.players[e].pause(),this.removePlayer(window.mejs.players[e])},removePlayer:function(e){var t,i;if(e.options){for(t in e.options.features)if(e["clean"+(i=e.options.features[t])])try{e["clean"+i](e)}catch(e){}e.isDynamic||e.node.remove(),"html5"!==e.media.rendererName&&e.media.remove(),delete window.mejs.players[e.id],e.container.remove(),e.globalUnbind("resize",e.globalResizeCallback),e.globalUnbind("keydown",e.globalKeydownCallback),e.globalUnbind("click",e.globalClickCallback),delete e.media.player}},unsetPlayers:function(){this.players&&this.players.length&&(_.each(this.players,function(e){e.pause(),wp.media.mixin.removePlayer(e)}),this.players=[])}},wp.media.playlist=new wp.media.collection({tag:"playlist",editTitle:o.editPlaylistTitle,defaults:{id:wp.media.view.settings.post.id,style:"light",tracklist:!0,tracknumbers:!0,images:!0,artists:!0,type:"audio"}}),wp.media.audio={coerce:wp.media.coerce,defaults:{id:wp.media.view.settings.post.id,src:"",loop:!1,autoplay:!1,preload:"none",width:400},edit:function(e){e=wp.shortcode.next("audio",e).shortcode;return wp.media({frame:"audio",state:"audio-details",metadata:_.defaults(e.attrs.named,this.defaults)})},shortcode:function(i){var e;return _.each(this.defaults,function(e,t){i[t]=this.coerce(i,t),e===i[t]&&delete i[t]},this),e=i.content,delete i.content,new wp.shortcode({tag:"audio",attrs:i,content:e})}},wp.media.video={coerce:wp.media.coerce,defaults:{id:wp.media.view.settings.post.id,src:"",poster:"",loop:!1,autoplay:!1,preload:"metadata",content:"",width:640,height:360},edit:function(e){var e=wp.shortcode.next("video",e).shortcode,t=e.attrs.named;return t.content=e.content,wp.media({frame:"video",state:"video-details",metadata:_.defaults(t,this.defaults)})},shortcode:function(i){var e;return _.each(this.defaults,function(e,t){i[t]=this.coerce(i,t),e===i[t]&&delete i[t]},this),e=i.content,delete i.content,new wp.shortcode({tag:"video",attrs:i,content:e})}},e.model.PostMedia=s(241),e.controller.AudioDetails=s(1206),e.controller.VideoDetails=s(5039),e.view.MediaFrame.MediaDetails=s(741),e.view.MediaFrame.AudioDetails=s(175),e.view.MediaFrame.VideoDetails=s(8646),e.view.MediaDetails=s(9467),e.view.AudioDetails=s(3713),e.view.VideoDetails=s(5836)})();                                                                                                                                                                                                                                                     media-editor.js                                                                                     0000644                 00000071424 15212564043 0007457 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/media-editor.js
 */

/* global getUserSetting, tinymce, QTags */

// WordPress, TinyMCE, and Media
// -----------------------------
(function($, _){
	/**
	 * Stores the editors' `wp.media.controller.Frame` instances.
	 *
	 * @static
	 */
	var workflows = {};

	/**
	 * A helper mixin function to avoid truthy and falsey values being
	 *   passed as an input that expects booleans. If key is undefined in the map,
	 *   but has a default value, set it.
	 *
	 * @param {Object} attrs Map of props from a shortcode or settings.
	 * @param {string} key The key within the passed map to check for a value.
	 * @return {mixed|undefined} The original or coerced value of key within attrs.
	 */
	wp.media.coerce = function ( attrs, key ) {
		if ( _.isUndefined( attrs[ key ] ) && ! _.isUndefined( this.defaults[ key ] ) ) {
			attrs[ key ] = this.defaults[ key ];
		} else if ( 'true' === attrs[ key ] ) {
			attrs[ key ] = true;
		} else if ( 'false' === attrs[ key ] ) {
			attrs[ key ] = false;
		}
		return attrs[ key ];
	};

	/** @namespace wp.media.string */
	wp.media.string = {
		/**
		 * Joins the `props` and `attachment` objects,
		 * outputting the proper object format based on the
		 * attachment's type.
		 *
		 * @param {Object} [props={}] Attachment details (align, link, size, etc).
		 * @param {Object} attachment The attachment object, media version of Post.
		 * @return {Object} Joined props
		 */
		props: function( props, attachment ) {
			var link, linkUrl, size, sizes,
				defaultProps = wp.media.view.settings.defaultProps;

			props = props ? _.clone( props ) : {};

			if ( attachment && attachment.type ) {
				props.type = attachment.type;
			}

			if ( 'image' === props.type ) {
				props = _.defaults( props || {}, {
					align:   defaultProps.align || getUserSetting( 'align', 'none' ),
					size:    defaultProps.size  || getUserSetting( 'imgsize', 'medium' ),
					url:     '',
					classes: []
				});
			}

			// All attachment-specific settings follow.
			if ( ! attachment ) {
				return props;
			}

			props.title = props.title || attachment.title;

			link = props.link || defaultProps.link || getUserSetting( 'urlbutton', 'file' );
			if ( 'file' === link || 'embed' === link ) {
				linkUrl = attachment.url;
			} else if ( 'post' === link ) {
				linkUrl = attachment.link;
			} else if ( 'custom' === link ) {
				linkUrl = props.linkUrl;
			}
			props.linkUrl = linkUrl || '';

			// Format properties for images.
			if ( 'image' === attachment.type ) {
				props.classes.push( 'wp-image-' + attachment.id );

				sizes = attachment.sizes;
				size = sizes && sizes[ props.size ] ? sizes[ props.size ] : attachment;

				_.extend( props, _.pick( attachment, 'align', 'caption', 'alt' ), {
					width:     size.width,
					height:    size.height,
					src:       size.url,
					captionId: 'attachment_' + attachment.id
				});
			} else if ( 'video' === attachment.type || 'audio' === attachment.type ) {
				_.extend( props, _.pick( attachment, 'title', 'type', 'icon', 'mime' ) );
			// Format properties for non-images.
			} else {
				props.title = props.title || attachment.filename;
				props.rel = props.rel || 'attachment wp-att-' + attachment.id;
			}

			return props;
		},
		/**
		 * Create link markup that is suitable for passing to the editor
		 *
		 * @param {Object} props Attachment details (align, link, size, etc).
		 * @param {Object} attachment The attachment object, media version of Post.
		 * @return {string} The link markup
		 */
		link: function( props, attachment ) {
			var options;

			props = wp.media.string.props( props, attachment );

			options = {
				tag:     'a',
				content: props.title,
				attrs:   {
					href: props.linkUrl
				}
			};

			if ( props.rel ) {
				options.attrs.rel = props.rel;
			}

			return wp.html.string( options );
		},
		/**
		 * Create an Audio shortcode string that is suitable for passing to the editor
		 *
		 * @param {Object} props Attachment details (align, link, size, etc).
		 * @param {Object} attachment The attachment object, media version of Post.
		 * @return {string} The audio shortcode
		 */
		audio: function( props, attachment ) {
			return wp.media.string._audioVideo( 'audio', props, attachment );
		},
		/**
		 * Create a Video shortcode string that is suitable for passing to the editor
		 *
		 * @param {Object} props Attachment details (align, link, size, etc).
		 * @param {Object} attachment The attachment object, media version of Post.
		 * @return {string} The video shortcode
		 */
		video: function( props, attachment ) {
			return wp.media.string._audioVideo( 'video', props, attachment );
		},
		/**
		 * Helper function to create a media shortcode string
		 *
		 * @access private
		 *
		 * @param {string} type The shortcode tag name: 'audio' or 'video'.
		 * @param {Object} props Attachment details (align, link, size, etc).
		 * @param {Object} attachment The attachment object, media version of Post.
		 * @return {string} The media shortcode
		 */
		_audioVideo: function( type, props, attachment ) {
			var shortcode, html, extension;

			props = wp.media.string.props( props, attachment );
			if ( props.link !== 'embed' ) {
				return wp.media.string.link( props );
			}

			shortcode = {};

			if ( 'video' === type ) {
				if ( attachment.image && -1 === attachment.image.src.indexOf( attachment.icon ) ) {
					shortcode.poster = attachment.image.src;
				}

				if ( attachment.width ) {
					shortcode.width = attachment.width;
				}

				if ( attachment.height ) {
					shortcode.height = attachment.height;
				}
			}

			extension = attachment.filename.split('.').pop();

			if ( _.contains( wp.media.view.settings.embedExts, extension ) ) {
				shortcode[extension] = attachment.url;
			} else {
				// Render unsupported audio and video files as links.
				return wp.media.string.link( props );
			}

			html = wp.shortcode.string({
				tag:     type,
				attrs:   shortcode
			});

			return html;
		},
		/**
		 * Create image markup, optionally with a link and/or wrapped in a caption shortcode,
		 *  that is suitable for passing to the editor
		 *
		 * @param {Object} props Attachment details (align, link, size, etc).
		 * @param {Object} attachment The attachment object, media version of Post.
		 * @return {string}
		 */
		image: function( props, attachment ) {
			var img = {},
				options, classes, shortcode, html;

			props.type = 'image';
			props = wp.media.string.props( props, attachment );
			classes = props.classes || [];

			img.src = ! _.isUndefined( attachment ) ? attachment.url : props.url;
			_.extend( img, _.pick( props, 'width', 'height', 'alt' ) );

			// Only assign the align class to the image if we're not printing
			// a caption, since the alignment is sent to the shortcode.
			if ( props.align && ! props.caption ) {
				classes.push( 'align' + props.align );
			}

			if ( props.size ) {
				classes.push( 'size-' + props.size );
			}

			img['class'] = _.compact( classes ).join(' ');

			// Generate `img` tag options.
			options = {
				tag:    'img',
				attrs:  img,
				single: true
			};

			// Generate the `a` element options, if they exist.
			if ( props.linkUrl ) {
				options = {
					tag:   'a',
					attrs: {
						href: props.linkUrl
					},
					content: options
				};
			}

			html = wp.html.string( options );

			// Generate the caption shortcode.
			if ( props.caption ) {
				shortcode = {};

				if ( img.width ) {
					shortcode.width = img.width;
				}

				if ( props.captionId ) {
					shortcode.id = props.captionId;
				}

				if ( props.align ) {
					shortcode.align = 'align' + props.align;
				}

				html = wp.shortcode.string({
					tag:     'caption',
					attrs:   shortcode,
					content: html + ' ' + props.caption
				});
			}

			return html;
		}
	};

	wp.media.embed = {
		coerce : wp.media.coerce,

		defaults : {
			url : '',
			width: '',
			height: ''
		},

		edit : function( data, isURL ) {
			var frame, props = {}, shortcode;

			if ( isURL ) {
				props.url = data.replace(/<[^>]+>/g, '');
			} else {
				shortcode = wp.shortcode.next( 'embed', data ).shortcode;

				props = _.defaults( shortcode.attrs.named, this.defaults );
				if ( shortcode.content ) {
					props.url = shortcode.content;
				}
			}

			frame = wp.media({
				frame: 'post',
				state: 'embed',
				metadata: props
			});

			return frame;
		},

		shortcode : function( model ) {
			var self = this, content;

			_.each( this.defaults, function( value, key ) {
				model[ key ] = self.coerce( model, key );

				if ( value === model[ key ] ) {
					delete model[ key ];
				}
			});

			content = model.url;
			delete model.url;

			return new wp.shortcode({
				tag: 'embed',
				attrs: model,
				content: content
			});
		}
	};

	/**
	 * @class wp.media.collection
	 *
	 * @param {Object} attributes
	 */
	wp.media.collection = function(attributes) {
		var collections = {};

		return _.extend(/** @lends wp.media.collection.prototype */{
			coerce : wp.media.coerce,
			/**
			 * Retrieve attachments based on the properties of the passed shortcode
			 *
			 * @param {wp.shortcode} shortcode An instance of wp.shortcode().
			 * @return {wp.media.model.Attachments} A Backbone.Collection containing
			 *                                      the media items belonging to a collection.
			 *                                      The query[ this.tag ] property is a Backbone.Model
			 *                                      containing the 'props' for the collection.
			 */
			attachments: function( shortcode ) {
				var shortcodeString = shortcode.string(),
					result = collections[ shortcodeString ],
					attrs, args, query, others, self = this;

				delete collections[ shortcodeString ];
				if ( result ) {
					return result;
				}
				// Fill the default shortcode attributes.
				attrs = _.defaults( shortcode.attrs.named, this.defaults );
				args  = _.pick( attrs, 'orderby', 'order' );

				args.type    = this.type;
				args.perPage = -1;

				// Mark the `orderby` override attribute.
				if ( undefined !== attrs.orderby ) {
					attrs._orderByField = attrs.orderby;
				}

				if ( 'rand' === attrs.orderby ) {
					attrs._orderbyRandom = true;
				}

				// Map the `orderby` attribute to the corresponding model property.
				if ( ! attrs.orderby || /^menu_order(?: ID)?$/i.test( attrs.orderby ) ) {
					args.orderby = 'menuOrder';
				}

				// Map the `ids` param to the correct query args.
				if ( attrs.ids ) {
					args.post__in = attrs.ids.split(',');
					args.orderby  = 'post__in';
				} else if ( attrs.include ) {
					args.post__in = attrs.include.split(',');
				}

				if ( attrs.exclude ) {
					args.post__not_in = attrs.exclude.split(',');
				}

				if ( ! args.post__in ) {
					args.uploadedTo = attrs.id;
				}

				// Collect the attributes that were not included in `args`.
				others = _.omit( attrs, 'id', 'ids', 'include', 'exclude', 'orderby', 'order' );

				_.each( this.defaults, function( value, key ) {
					others[ key ] = self.coerce( others, key );
				});

				query = wp.media.query( args );
				query[ this.tag ] = new Backbone.Model( others );
				return query;
			},
			/**
			 * Triggered when clicking 'Insert {label}' or 'Update {label}'
			 *
			 * @param {wp.media.model.Attachments} attachments A Backbone.Collection containing
			 *      the media items belonging to a collection.
			 *      The query[ this.tag ] property is a Backbone.Model
			 *          containing the 'props' for the collection.
			 * @return {wp.shortcode}
			 */
			shortcode: function( attachments ) {
				var props = attachments.props.toJSON(),
					attrs = _.pick( props, 'orderby', 'order' ),
					shortcode, clone;

				if ( attachments.type ) {
					attrs.type = attachments.type;
					delete attachments.type;
				}

				if ( attachments[this.tag] ) {
					_.extend( attrs, attachments[this.tag].toJSON() );
				}

				/*
				 * Convert all gallery shortcodes to use the `ids` property.
				 * Ignore `post__in` and `post__not_in`; the attachments in
				 * the collection will already reflect those properties.
				 */
				attrs.ids = attachments.pluck('id');

				// Copy the `uploadedTo` post ID.
				if ( props.uploadedTo ) {
					attrs.id = props.uploadedTo;
				}
				// Check if the gallery is randomly ordered.
				delete attrs.orderby;

				if ( attrs._orderbyRandom ) {
					attrs.orderby = 'rand';
				} else if ( attrs._orderByField && 'rand' !== attrs._orderByField ) {
					attrs.orderby = attrs._orderByField;
				}

				delete attrs._orderbyRandom;
				delete attrs._orderByField;

				// If the `ids` attribute is set and `orderby` attribute
				// is the default value, clear it for cleaner output.
				if ( attrs.ids && 'post__in' === attrs.orderby ) {
					delete attrs.orderby;
				}

				attrs = this.setDefaults( attrs );

				shortcode = new wp.shortcode({
					tag:    this.tag,
					attrs:  attrs,
					type:   'single'
				});

				// Use a cloned version of the gallery.
				clone = new wp.media.model.Attachments( attachments.models, {
					props: props
				});
				clone[ this.tag ] = attachments[ this.tag ];
				collections[ shortcode.string() ] = clone;

				return shortcode;
			},
			/**
			 * Triggered when double-clicking a collection shortcode placeholder
			 *   in the editor
			 *
			 * @param {string} content Content that is searched for possible
			 *    shortcode markup matching the passed tag name,
			 *
			 * @this wp.media.{prop}
			 *
			 * @return {wp.media.view.MediaFrame.Select} A media workflow.
			 */
			edit: function( content ) {
				var shortcode = wp.shortcode.next( this.tag, content ),
					defaultPostId = this.defaults.id,
					attachments, selection, state;

				// Bail if we didn't match the shortcode or all of the content.
				if ( ! shortcode || shortcode.content !== content ) {
					return;
				}

				// Ignore the rest of the match object.
				shortcode = shortcode.shortcode;

				if ( _.isUndefined( shortcode.get('id') ) && ! _.isUndefined( defaultPostId ) ) {
					shortcode.set( 'id', defaultPostId );
				}

				attachments = this.attachments( shortcode );

				selection = new wp.media.model.Selection( attachments.models, {
					props:    attachments.props.toJSON(),
					multiple: true
				});

				selection[ this.tag ] = attachments[ this.tag ];

				// Fetch the query's attachments, and then break ties from the
				// query to allow for sorting.
				selection.more().done( function() {
					// Break ties with the query.
					selection.props.set({ query: false });
					selection.unmirror();
					selection.props.unset('orderby');
				});

				// Destroy the previous gallery frame.
				if ( this.frame ) {
					this.frame.dispose();
				}

				if ( shortcode.attrs.named.type && 'video' === shortcode.attrs.named.type ) {
					state = 'video-' + this.tag + '-edit';
				} else {
					state = this.tag + '-edit';
				}

				// Store the current frame.
				this.frame = wp.media({
					frame:     'post',
					state:     state,
					title:     this.editTitle,
					editing:   true,
					multiple:  true,
					selection: selection
				}).open();

				return this.frame;
			},

			setDefaults: function( attrs ) {
				var self = this;
				// Remove default attributes from the shortcode.
				_.each( this.defaults, function( value, key ) {
					attrs[ key ] = self.coerce( attrs, key );
					if ( value === attrs[ key ] ) {
						delete attrs[ key ];
					}
				});

				return attrs;
			}
		}, attributes );
	};

	wp.media._galleryDefaults = {
		itemtag: 'dl',
		icontag: 'dt',
		captiontag: 'dd',
		columns: '3',
		link: 'post',
		size: 'thumbnail',
		order: 'ASC',
		id: wp.media.view.settings.post && wp.media.view.settings.post.id,
		orderby : 'menu_order ID'
	};

	if ( wp.media.view.settings.galleryDefaults ) {
		wp.media.galleryDefaults = _.extend( {}, wp.media._galleryDefaults, wp.media.view.settings.galleryDefaults );
	} else {
		wp.media.galleryDefaults = wp.media._galleryDefaults;
	}

	wp.media.gallery = new wp.media.collection({
		tag: 'gallery',
		type : 'image',
		editTitle : wp.media.view.l10n.editGalleryTitle,
		defaults : wp.media.galleryDefaults,

		setDefaults: function( attrs ) {
			var self = this, changed = ! _.isEqual( wp.media.galleryDefaults, wp.media._galleryDefaults );
			_.each( this.defaults, function( value, key ) {
				attrs[ key ] = self.coerce( attrs, key );
				if ( value === attrs[ key ] && ( ! changed || value === wp.media._galleryDefaults[ key ] ) ) {
					delete attrs[ key ];
				}
			} );
			return attrs;
		}
	});

	/**
	 * @namespace wp.media.featuredImage
	 * @memberOf wp.media
	 */
	wp.media.featuredImage = {
		/**
		 * Get the featured image post ID
		 *
		 * @return {wp.media.view.settings.post.featuredImageId|number}
		 */
		get: function() {
			return wp.media.view.settings.post.featuredImageId;
		},
		/**
		 * Sets the featured image ID property and sets the HTML in the post meta box to the new featured image.
		 *
		 * @param {number} id The post ID of the featured image, or -1 to unset it.
		 */
		set: function( id ) {
			var settings = wp.media.view.settings;

			settings.post.featuredImageId = id;

			wp.media.post( 'get-post-thumbnail-html', {
				post_id:      settings.post.id,
				thumbnail_id: settings.post.featuredImageId,
				_wpnonce:     settings.post.nonce
			}).done( function( html ) {
				if ( '0' === html ) {
					window.alert( wp.i18n.__( 'Could not set that as the thumbnail image. Try a different attachment.' ) );
					return;
				}
				$( '.inside', '#postimagediv' ).html( html );
			});
		},
		/**
		 * Remove the featured image id, save the post thumbnail data and
		 * set the HTML in the post meta box to no featured image.
		 */
		remove: function() {
			wp.media.featuredImage.set( -1 );
		},
		/**
		 * The Featured Image workflow
		 *
		 * @this wp.media.featuredImage
		 *
		 * @return {wp.media.view.MediaFrame.Select} A media workflow.
		 */
		frame: function() {
			if ( this._frame ) {
				wp.media.frame = this._frame;
				return this._frame;
			}

			this._frame = wp.media({
				state: 'featured-image',
				states: [ new wp.media.controller.FeaturedImage() , new wp.media.controller.EditImage() ]
			});

			this._frame.on( 'toolbar:create:featured-image', function( toolbar ) {
				/**
				 * @this wp.media.view.MediaFrame.Select
				 */
				this.createSelectToolbar( toolbar, {
					text: wp.media.view.l10n.setFeaturedImage
				});
			}, this._frame );

			this._frame.on( 'content:render:edit-image', function() {
				var selection = this.state('featured-image').get('selection'),
					view = new wp.media.view.EditImage( { model: selection.single(), controller: this } ).render();

				this.content.set( view );

				// After bringing in the frame, load the actual editor via an Ajax call.
				view.loadEditor();

			}, this._frame );

			this._frame.state('featured-image').on( 'select', this.select );
			return this._frame;
		},
		/**
		 * 'select' callback for Featured Image workflow, triggered when
		 *  the 'Set Featured Image' button is clicked in the media modal.
		 *
		 * @this wp.media.controller.FeaturedImage
		 */
		select: function() {
			var selection = this.get('selection').single();

			if ( ! wp.media.view.settings.post.featuredImageId ) {
				return;
			}

			wp.media.featuredImage.set( selection ? selection.id : -1 );
		},
		/**
		 * Open the content media manager to the 'featured image' tab when
		 * the post thumbnail is clicked.
		 *
		 * Update the featured image id when the 'remove' link is clicked.
		 */
		init: function() {
			$('#postimagediv').on( 'click keyup keydown', '#set-post-thumbnail', function( event ) {
				if ( ( event.type === 'keyup' && event.key === ' ' ) || ( event.type === 'keydown' && event.key === 'Enter' ) || event.type === 'click' ) {
					event.preventDefault();
					// Stop propagation to prevent thickbox from activating.
					event.stopPropagation();

					wp.media.featuredImage.frame().open();
				}
			}).on( 'click keyup keydown', '#remove-post-thumbnail', function( event ) {
				if ( ( event.type === 'keyup' && event.key === ' ' ) || ( event.type === 'keydown' && event.key === 'Enter' ) || event.type === 'click' ) {
					wp.media.featuredImage.remove();
					return false;
				}
			});
		}
	};

	$( wp.media.featuredImage.init );

	/** @namespace wp.media.editor */
	wp.media.editor = {
		/**
		 * Send content to the editor
		 *
		 * @param {string} html Content to send to the editor
		 */
		insert: function( html ) {
			var editor, wpActiveEditor,
				hasTinymce = ! _.isUndefined( window.tinymce ),
				hasQuicktags = ! _.isUndefined( window.QTags );

			if ( this.activeEditor ) {
				wpActiveEditor = window.wpActiveEditor = this.activeEditor;
			} else {
				wpActiveEditor = window.wpActiveEditor;
			}

			/*
			 * Delegate to the global `send_to_editor` if it exists.
			 * This attempts to play nice with any themes/plugins
			 * that have overridden the insert functionality.
			 */
			if ( window.send_to_editor ) {
				return window.send_to_editor.apply( this, arguments );
			}

			if ( ! wpActiveEditor ) {
				if ( hasTinymce && tinymce.activeEditor ) {
					editor = tinymce.activeEditor;
					wpActiveEditor = window.wpActiveEditor = editor.id;
				} else if ( ! hasQuicktags ) {
					return false;
				}
			} else if ( hasTinymce ) {
				editor = tinymce.get( wpActiveEditor );
			}

			if ( editor && ! editor.isHidden() ) {
				editor.execCommand( 'mceInsertContent', false, html );
			} else if ( hasQuicktags ) {
				QTags.insertContent( html );
			} else {
				document.getElementById( wpActiveEditor ).value += html;
			}

			// If the old thickbox remove function exists, call it in case
			// a theme/plugin overloaded it.
			if ( window.tb_remove ) {
				try { window.tb_remove(); } catch( e ) {}
			}
		},

		/**
		 * Setup 'workflow' and add to the 'workflows' cache. 'open' can
		 *  subsequently be called upon it.
		 *
		 * @param {string} id A slug used to identify the workflow.
		 * @param {Object} [options={}]
		 *
		 * @this wp.media.editor
		 *
		 * @return {wp.media.view.MediaFrame.Select} A media workflow.
		 */
		add: function( id, options ) {
			var workflow = this.get( id );

			// Only add once: if exists return existing.
			if ( workflow ) {
				return workflow;
			}

			workflow = workflows[ id ] = wp.media( _.defaults( options || {}, {
				frame:    'post',
				state:    'insert',
				title:    wp.media.view.l10n.addMedia,
				multiple: true
			} ) );

			workflow.on( 'insert', function( selection ) {
				var state = workflow.state();

				selection = selection || state.get('selection');

				if ( ! selection ) {
					return;
				}

				$.when.apply( $, selection.map( function( attachment ) {
					var display = state.display( attachment ).toJSON();
					/**
					 * @this wp.media.editor
					 */
					return this.send.attachment( display, attachment.toJSON() );
				}, this ) ).done( function() {
					wp.media.editor.insert( _.toArray( arguments ).join('\n\n') );
				});
			}, this );

			workflow.state('gallery-edit').on( 'update', function( selection ) {
				/**
				 * @this wp.media.editor
				 */
				this.insert( wp.media.gallery.shortcode( selection ).string() );
			}, this );

			workflow.state('playlist-edit').on( 'update', function( selection ) {
				/**
				 * @this wp.media.editor
				 */
				this.insert( wp.media.playlist.shortcode( selection ).string() );
			}, this );

			workflow.state('video-playlist-edit').on( 'update', function( selection ) {
				/**
				 * @this wp.media.editor
				 */
				this.insert( wp.media.playlist.shortcode( selection ).string() );
			}, this );

			workflow.state('embed').on( 'select', function() {
				/**
				 * @this wp.media.editor
				 */
				var state = workflow.state(),
					type = state.get('type'),
					embed = state.props.toJSON();

				embed.url = embed.url || '';

				if ( 'link' === type ) {
					_.defaults( embed, {
						linkText: embed.url,
						linkUrl: embed.url
					});

					this.send.link( embed ).done( function( resp ) {
						wp.media.editor.insert( resp );
					});

				} else if ( 'image' === type ) {
					_.defaults( embed, {
						title:   embed.url,
						linkUrl: '',
						align:   'none',
						link:    'none'
					});

					if ( 'none' === embed.link ) {
						embed.linkUrl = '';
					} else if ( 'file' === embed.link ) {
						embed.linkUrl = embed.url;
					}

					this.insert( wp.media.string.image( embed ) );
				}
			}, this );

			workflow.state('featured-image').on( 'select', wp.media.featuredImage.select );
			workflow.setState( workflow.options.state );
			return workflow;
		},
		/**
		 * Determines the proper current workflow id
		 *
		 * @param {string} [id=''] A slug used to identify the workflow.
		 *
		 * @return {wpActiveEditor|string|tinymce.activeEditor.id}
		 */
		id: function( id ) {
			if ( id ) {
				return id;
			}

			// If an empty `id` is provided, default to `wpActiveEditor`.
			id = window.wpActiveEditor;

			// If that doesn't work, fall back to `tinymce.activeEditor.id`.
			if ( ! id && ! _.isUndefined( window.tinymce ) && tinymce.activeEditor ) {
				id = tinymce.activeEditor.id;
			}

			// Last but not least, fall back to the empty string.
			id = id || '';
			return id;
		},
		/**
		 * Return the workflow specified by id
		 *
		 * @param {string} id A slug used to identify the workflow.
		 *
		 * @this wp.media.editor
		 *
		 * @return {wp.media.view.MediaFrame} A media workflow.
		 */
		get: function( id ) {
			id = this.id( id );
			return workflows[ id ];
		},
		/**
		 * Remove the workflow represented by id from the workflow cache
		 *
		 * @param {string} id A slug used to identify the workflow.
		 *
		 * @this wp.media.editor
		 */
		remove: function( id ) {
			id = this.id( id );
			delete workflows[ id ];
		},
		/** @namespace wp.media.editor.send */
		send: {
			/**
			 * Called when sending an attachment to the editor
			 *   from the medial modal.
			 *
			 * @param {Object} props Attachment details (align, link, size, etc).
			 * @param {Object} attachment The attachment object, media version of Post.
			 * @return {Promise}
			 */
			attachment: function( props, attachment ) {
				var caption = attachment.caption,
					options, html;

				// If captions are disabled, clear the caption.
				if ( ! wp.media.view.settings.captions ) {
					delete attachment.caption;
				}

				props = wp.media.string.props( props, attachment );

				options = {
					id:           attachment.id,
					post_content: attachment.description,
					post_excerpt: caption
				};

				if ( props.linkUrl ) {
					options.url = props.linkUrl;
				}

				if ( 'image' === attachment.type ) {
					html = wp.media.string.image( props );

					_.each({
						align: 'align',
						size:  'image-size',
						alt:   'image_alt'
					}, function( option, prop ) {
						if ( props[ prop ] ) {
							options[ option ] = props[ prop ];
						}
					});
				} else if ( 'video' === attachment.type ) {
					html = wp.media.string.video( props, attachment );
				} else if ( 'audio' === attachment.type ) {
					html = wp.media.string.audio( props, attachment );
				} else {
					html = wp.media.string.link( props );
					options.post_title = props.title;
				}

				return wp.media.post( 'send-attachment-to-editor', {
					nonce:      wp.media.view.settings.nonce.sendToEditor,
					attachment: options,
					html:       html,
					post_id:    wp.media.view.settings.post.id
				});
			},
			/**
			 * Called when 'Insert From URL' source is not an image. Example: YouTube url.
			 *
			 * @param {Object} embed
			 * @return {Promise}
			 */
			link: function( embed ) {
				return wp.media.post( 'send-link-to-editor', {
					nonce:     wp.media.view.settings.nonce.sendToEditor,
					src:       embed.linkUrl,
					link_text: embed.linkText,
					html:      wp.media.string.link( embed ),
					post_id:   wp.media.view.settings.post.id
				});
			}
		},
		/**
		 * Open a workflow
		 *
		 * @param {string} [id=undefined] Optional. A slug used to identify the workflow.
		 * @param {Object} [options={}]
		 *
		 * @this wp.media.editor
		 *
		 * @return {wp.media.view.MediaFrame}
		 */
		open: function( id, options ) {
			var workflow;

			options = options || {};

			id = this.id( id );
			this.activeEditor = id;

			workflow = this.get( id );

			// Redo workflow if state has changed.
			if ( ! workflow || ( workflow.options && options.state !== workflow.options.state ) ) {
				workflow = this.add( id, options );
			}

			wp.media.frame = workflow;

			return workflow.open();
		},

		/**
		 * Bind click event for .insert-media using event delegation
		 */
		init: function() {
			$(document.body)
				.on( 'click.add-media-button', '.insert-media', function( event ) {
					var elem = $( event.currentTarget ),
						editor = elem.data('editor'),
						options = {
							frame:    'post',
							state:    'insert',
							title:    wp.media.view.l10n.addMedia,
							multiple: true
						};

					event.preventDefault();

					if ( elem.hasClass( 'gallery' ) ) {
						options.state = 'gallery';
						options.title = wp.media.view.l10n.createGalleryTitle;
					}

					wp.media.editor.open( editor, options );
				});

			// Initialize and render the Editor drag-and-drop uploader.
			new wp.media.view.EditorUploader().render();
		}
	};

	_.bindAll( wp.media.editor, 'open' );
	$( wp.media.editor.init );
}(jQuery, _));
                                                                                                                                                                                                                                            media-editor.min.js                                                                                 0000644                 00000025524 15212564043 0010241 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(a,r){var i={};wp.media.coerce=function(e,t){return r.isUndefined(e[t])&&!r.isUndefined(this.defaults[t])?e[t]=this.defaults[t]:"true"===e[t]?e[t]=!0:"false"===e[t]&&(e[t]=!1),e[t]},wp.media.string={props:function(e,t){var i,n=wp.media.view.settings.defaultProps;return e=e?r.clone(e):{},t&&t.type&&(e.type=t.type),"image"===e.type&&(e=r.defaults(e||{},{align:n.align||getUserSetting("align","none"),size:n.size||getUserSetting("imgsize","medium"),url:"",classes:[]})),t&&(e.title=e.title||t.title,"file"===(n=e.link||n.link||getUserSetting("urlbutton","file"))||"embed"===n?i=t.url:"post"===n?i=t.link:"custom"===n&&(i=e.linkUrl),e.linkUrl=i||"","image"===t.type?(e.classes.push("wp-image-"+t.id),i=(n=t.sizes)&&n[e.size]?n[e.size]:t,r.extend(e,r.pick(t,"align","caption","alt"),{width:i.width,height:i.height,src:i.url,captionId:"attachment_"+t.id})):"video"===t.type||"audio"===t.type?r.extend(e,r.pick(t,"title","type","icon","mime")):(e.title=e.title||t.filename,e.rel=e.rel||"attachment wp-att-"+t.id)),e},link:function(e,t){t={tag:"a",content:(e=wp.media.string.props(e,t)).title,attrs:{href:e.linkUrl}};return e.rel&&(t.attrs.rel=e.rel),wp.html.string(t)},audio:function(e,t){return wp.media.string._audioVideo("audio",e,t)},video:function(e,t){return wp.media.string._audioVideo("video",e,t)},_audioVideo:function(e,t,i){var n,a;return"embed"===(t=wp.media.string.props(t,i)).link&&(n={},"video"===e&&(i.image&&-1===i.image.src.indexOf(i.icon)&&(n.poster=i.image.src),i.width&&(n.width=i.width),i.height)&&(n.height=i.height),a=i.filename.split(".").pop(),r.contains(wp.media.view.settings.embedExts,a))?(n[a]=i.url,wp.shortcode.string({tag:e,attrs:n})):wp.media.string.link(t)},image:function(e,t){var i,n={};return e.type="image",i=(e=wp.media.string.props(e,t)).classes||[],n.src=(r.isUndefined(t)?e:t).url,r.extend(n,r.pick(e,"width","height","alt")),e.align&&!e.caption&&i.push("align"+e.align),e.size&&i.push("size-"+e.size),n.class=r.compact(i).join(" "),t={tag:"img",attrs:n,single:!0},e.linkUrl&&(t={tag:"a",attrs:{href:e.linkUrl},content:t}),i=wp.html.string(t),e.caption&&(t={},n.width&&(t.width=n.width),e.captionId&&(t.id=e.captionId),e.align&&(t.align="align"+e.align),i=wp.shortcode.string({tag:"caption",attrs:t,content:i+" "+e.caption})),i}},wp.media.embed={coerce:wp.media.coerce,defaults:{url:"",width:"",height:""},edit:function(e,t){var i={};return t?i.url=e.replace(/<[^>]+>/g,""):(t=wp.shortcode.next("embed",e).shortcode,i=r.defaults(t.attrs.named,this.defaults),t.content&&(i.url=t.content)),wp.media({frame:"post",state:"embed",metadata:i})},shortcode:function(i){var e,n=this;return r.each(this.defaults,function(e,t){i[t]=n.coerce(i,t),e===i[t]&&delete i[t]}),e=i.url,delete i.url,new wp.shortcode({tag:"embed",attrs:i,content:e})}},wp.media.collection=function(e){var d={};return r.extend({coerce:wp.media.coerce,attachments:function(e){var i,t=e.string(),n=d[t],a=this;return delete d[t],n||(t=r.defaults(e.attrs.named,this.defaults),(n=r.pick(t,"orderby","order")).type=this.type,n.perPage=-1,void 0!==t.orderby&&(t._orderByField=t.orderby),"rand"===t.orderby&&(t._orderbyRandom=!0),t.orderby&&!/^menu_order(?: ID)?$/i.test(t.orderby)||(n.orderby="menuOrder"),t.ids?(n.post__in=t.ids.split(","),n.orderby="post__in"):t.include&&(n.post__in=t.include.split(",")),t.exclude&&(n.post__not_in=t.exclude.split(",")),n.post__in||(n.uploadedTo=t.id),i=r.omit(t,"id","ids","include","exclude","orderby","order"),r.each(this.defaults,function(e,t){i[t]=a.coerce(i,t)}),(e=wp.media.query(n))[this.tag]=new Backbone.Model(i),e)},shortcode:function(e){var t=e.props.toJSON(),i=r.pick(t,"orderby","order");return e.type&&(i.type=e.type,delete e.type),e[this.tag]&&r.extend(i,e[this.tag].toJSON()),i.ids=e.pluck("id"),t.uploadedTo&&(i.id=t.uploadedTo),delete i.orderby,i._orderbyRandom?i.orderby="rand":i._orderByField&&"rand"!==i._orderByField&&(i.orderby=i._orderByField),delete i._orderbyRandom,delete i._orderByField,i.ids&&"post__in"===i.orderby&&delete i.orderby,i=this.setDefaults(i),i=new wp.shortcode({tag:this.tag,attrs:i,type:"single"}),(t=new wp.media.model.Attachments(e.models,{props:t}))[this.tag]=e[this.tag],d[i.string()]=t,i},edit:function(e){var t,i=wp.shortcode.next(this.tag,e),n=this.defaults.id;if(i&&i.content===e)return i=i.shortcode,r.isUndefined(i.get("id"))&&!r.isUndefined(n)&&i.set("id",n),e=this.attachments(i),(t=new wp.media.model.Selection(e.models,{props:e.props.toJSON(),multiple:!0}))[this.tag]=e[this.tag],t.more().done(function(){t.props.set({query:!1}),t.unmirror(),t.props.unset("orderby")}),this.frame&&this.frame.dispose(),n=i.attrs.named.type&&"video"===i.attrs.named.type?"video-"+this.tag+"-edit":this.tag+"-edit",this.frame=wp.media({frame:"post",state:n,title:this.editTitle,editing:!0,multiple:!0,selection:t}).open(),this.frame},setDefaults:function(i){var n=this;return r.each(this.defaults,function(e,t){i[t]=n.coerce(i,t),e===i[t]&&delete i[t]}),i}},e)},wp.media._galleryDefaults={itemtag:"dl",icontag:"dt",captiontag:"dd",columns:"3",link:"post",size:"thumbnail",order:"ASC",id:wp.media.view.settings.post&&wp.media.view.settings.post.id,orderby:"menu_order ID"},wp.media.view.settings.galleryDefaults?wp.media.galleryDefaults=r.extend({},wp.media._galleryDefaults,wp.media.view.settings.galleryDefaults):wp.media.galleryDefaults=wp.media._galleryDefaults,wp.media.gallery=new wp.media.collection({tag:"gallery",type:"image",editTitle:wp.media.view.l10n.editGalleryTitle,defaults:wp.media.galleryDefaults,setDefaults:function(i){var n=this,a=!r.isEqual(wp.media.galleryDefaults,wp.media._galleryDefaults);return r.each(this.defaults,function(e,t){i[t]=n.coerce(i,t),e!==i[t]||a&&e!==wp.media._galleryDefaults[t]||delete i[t]}),i}}),wp.media.featuredImage={get:function(){return wp.media.view.settings.post.featuredImageId},set:function(e){var t=wp.media.view.settings;t.post.featuredImageId=e,wp.media.post("get-post-thumbnail-html",{post_id:t.post.id,thumbnail_id:t.post.featuredImageId,_wpnonce:t.post.nonce}).done(function(e){"0"===e?window.alert(wp.i18n.__("Could not set that as the thumbnail image. Try a different attachment.")):a(".inside","#postimagediv").html(e)})},remove:function(){wp.media.featuredImage.set(-1)},frame:function(){return this._frame?wp.media.frame=this._frame:(this._frame=wp.media({state:"featured-image",states:[new wp.media.controller.FeaturedImage,new wp.media.controller.EditImage]}),this._frame.on("toolbar:create:featured-image",function(e){this.createSelectToolbar(e,{text:wp.media.view.l10n.setFeaturedImage})},this._frame),this._frame.on("content:render:edit-image",function(){var e=this.state("featured-image").get("selection"),e=new wp.media.view.EditImage({model:e.single(),controller:this}).render();this.content.set(e),e.loadEditor()},this._frame),this._frame.state("featured-image").on("select",this.select)),this._frame},select:function(){var e=this.get("selection").single();wp.media.view.settings.post.featuredImageId&&wp.media.featuredImage.set(e?e.id:-1)},init:function(){a("#postimagediv").on("click keyup keydown","#set-post-thumbnail",function(e){("keyup"===e.type&&" "===e.key||"keydown"===e.type&&"Enter"===e.key||"click"===e.type)&&(e.preventDefault(),e.stopPropagation(),wp.media.featuredImage.frame().open())}).on("click keyup keydown","#remove-post-thumbnail",function(e){if("keyup"===e.type&&" "===e.key||"keydown"===e.type&&"Enter"===e.key||"click"===e.type)return wp.media.featuredImage.remove(),!1})}},a(wp.media.featuredImage.init),wp.media.editor={insert:function(e){var t,i=!r.isUndefined(window.tinymce),n=!r.isUndefined(window.QTags),a=this.activeEditor?window.wpActiveEditor=this.activeEditor:window.wpActiveEditor;if(window.send_to_editor)return window.send_to_editor.apply(this,arguments);if(a)i&&(t=tinymce.get(a));else if(i&&tinymce.activeEditor)t=tinymce.activeEditor,a=window.wpActiveEditor=t.id;else if(!n)return!1;if(t&&!t.isHidden()?t.execCommand("mceInsertContent",!1,e):n?QTags.insertContent(e):document.getElementById(a).value+=e,window.tb_remove)try{window.tb_remove()}catch(e){}},add:function(e,t){var n=this.get(e);return n||((n=i[e]=wp.media(r.defaults(t||{},{frame:"post",state:"insert",title:wp.media.view.l10n.addMedia,multiple:!0}))).on("insert",function(e){var i=n.state();(e=e||i.get("selection"))&&a.when.apply(a,e.map(function(e){var t=i.display(e).toJSON();return this.send.attachment(t,e.toJSON())},this)).done(function(){wp.media.editor.insert(r.toArray(arguments).join("\n\n"))})},this),n.state("gallery-edit").on("update",function(e){this.insert(wp.media.gallery.shortcode(e).string())},this),n.state("playlist-edit").on("update",function(e){this.insert(wp.media.playlist.shortcode(e).string())},this),n.state("video-playlist-edit").on("update",function(e){this.insert(wp.media.playlist.shortcode(e).string())},this),n.state("embed").on("select",function(){var e=n.state(),t=e.get("type"),e=e.props.toJSON();e.url=e.url||"","link"===t?(r.defaults(e,{linkText:e.url,linkUrl:e.url}),this.send.link(e).done(function(e){wp.media.editor.insert(e)})):"image"===t&&(r.defaults(e,{title:e.url,linkUrl:"",align:"none",link:"none"}),"none"===e.link?e.linkUrl="":"file"===e.link&&(e.linkUrl=e.url),this.insert(wp.media.string.image(e)))},this),n.state("featured-image").on("select",wp.media.featuredImage.select),n.setState(n.options.state)),n},id:function(e){return e=e||((e=(e=window.wpActiveEditor)||r.isUndefined(window.tinymce)||!tinymce.activeEditor?e:tinymce.activeEditor.id)||"")},get:function(e){return e=this.id(e),i[e]},remove:function(e){e=this.id(e),delete i[e]},send:{attachment:function(i,e){var n,t,a=e.caption;return wp.media.view.settings.captions||delete e.caption,i=wp.media.string.props(i,e),n={id:e.id,post_content:e.description,post_excerpt:a},i.linkUrl&&(n.url=i.linkUrl),"image"===e.type?(t=wp.media.string.image(i),r.each({align:"align",size:"image-size",alt:"image_alt"},function(e,t){i[t]&&(n[e]=i[t])})):"video"===e.type?t=wp.media.string.video(i,e):"audio"===e.type?t=wp.media.string.audio(i,e):(t=wp.media.string.link(i),n.post_title=i.title),wp.media.post("send-attachment-to-editor",{nonce:wp.media.view.settings.nonce.sendToEditor,attachment:n,html:t,post_id:wp.media.view.settings.post.id})},link:function(e){return wp.media.post("send-link-to-editor",{nonce:wp.media.view.settings.nonce.sendToEditor,src:e.linkUrl,link_text:e.linkText,html:wp.media.string.link(e),post_id:wp.media.view.settings.post.id})}},open:function(e,t){var i;return t=t||{},e=this.id(e),this.activeEditor=e,(!(i=this.get(e))||i.options&&t.state!==i.options.state)&&(i=this.add(e,t)),(wp.media.frame=i).open()},init:function(){a(document.body).on("click.add-media-button",".insert-media",function(e){var t=a(e.currentTarget),i=t.data("editor"),n={frame:"post",state:"insert",title:wp.media.view.l10n.addMedia,multiple:!0};e.preventDefault(),t.hasClass("gallery")&&(n.state="gallery",n.title=wp.media.view.l10n.createGalleryTitle),wp.media.editor.open(i,n)}),(new wp.media.view.EditorUploader).render()}},r.bindAll(wp.media.editor,"open"),a(wp.media.editor.init)}(jQuery,_);                                                                                                                                                                            media-grid.js                                                                                       0000644                 00000064061 15212564043 0007115 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ 659
(module) {

var l10n = wp.media.view.l10n,
	EditAttachmentMetadata;

/**
 * wp.media.controller.EditAttachmentMetadata
 *
 * A state for editing an attachment's metadata.
 *
 * @memberOf wp.media.controller
 *
 * @class
 * @augments wp.media.controller.State
 * @augments Backbone.Model
 */
EditAttachmentMetadata = wp.media.controller.State.extend(/** @lends wp.media.controller.EditAttachmentMetadata.prototype */{
	defaults: {
		id:      'edit-attachment',
		// Title string passed to the frame's title region view.
		title:   l10n.attachmentDetails,
		// Region mode defaults.
		content: 'edit-metadata',
		menu:    false,
		toolbar: false,
		router:  false
	}
});

module.exports = EditAttachmentMetadata;


/***/ },

/***/ 2429
(module) {

/**
 * wp.media.view.MediaFrame.Manage.Router
 *
 * A router for handling the browser history and application state.
 *
 * @memberOf wp.media.view.MediaFrame.Manage
 *
 * @class
 * @augments Backbone.Router
 */
var Router = Backbone.Router.extend(/** @lends wp.media.view.MediaFrame.Manage.Router.prototype */{
	routes: {
		'upload.php?item=:slug&mode=edit': 'editItem',
		'upload.php?item=:slug':           'showItem',
		'upload.php?search=:query':        'search',
		'upload.php':                      'reset'
	},

	// Map routes against the page URL.
	baseUrl: function( url ) {
		return 'upload.php' + url;
	},

	reset: function() {
		var frame = wp.media.frames.edit;

		if ( frame ) {
			frame.close();
		}
	},

	// Respond to the search route by filling the search field and triggering the input event.
	search: function( query ) {
		jQuery( '#media-search-input' ).val( query ).trigger( 'input' );
	},

	// Show the modal with a specific item.
	showItem: function( query ) {
		var media = wp.media,
			frame = media.frames.browse,
			library = frame.state().get('library'),
			item;

		// Trigger the media frame to open the correct item.
		item = library.findWhere( { id: parseInt( query, 10 ) } );

		if ( item ) {
			item.set( 'skipHistory', true );
			frame.trigger( 'edit:attachment', item );
		} else {
			item = media.attachment( query );
			frame.listenTo( item, 'change', function( model ) {
				frame.stopListening( item );
				frame.trigger( 'edit:attachment', model );
			} );
			item.fetch();
		}
	},

	// Show the modal in edit mode with a specific item.
	editItem: function( query ) {
		this.showItem( query );
		wp.media.frames.edit.content.mode( 'edit-details' );
	}
});

module.exports = Router;


/***/ },

/***/ 1312
(module) {

var Details = wp.media.view.Attachment.Details,
	TwoColumn;

/**
 * wp.media.view.Attachment.Details.TwoColumn
 *
 * A similar view to media.view.Attachment.Details
 * for use in the Edit Attachment modal.
 *
 * @memberOf wp.media.view.Attachment.Details
 *
 * @class
 * @augments wp.media.view.Attachment.Details
 * @augments wp.media.view.Attachment
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
TwoColumn = Details.extend(/** @lends wp.media.view.Attachment.Details.TwoColumn.prototype */{
	template: wp.template( 'attachment-details-two-column' ),

	initialize: function() {
		this.controller.on( 'content:activate:edit-details', _.bind( this.editAttachment, this ) );

		Details.prototype.initialize.apply( this, arguments );
	},

	editAttachment: function( event ) {
		if ( event ) {
			event.preventDefault();
		}
		this.controller.content.mode( 'edit-image' );
	},

	/**
	 * Noop this from parent class, doesn't apply here.
	 */
	toggleSelectionHandler: function() {}

});

module.exports = TwoColumn;


/***/ },

/***/ 5806
(module) {

var Button = wp.media.view.Button,
	DeleteSelected = wp.media.view.DeleteSelectedButton,
	DeleteSelectedPermanently;

/**
 * wp.media.view.DeleteSelectedPermanentlyButton
 *
 * When MEDIA_TRASH is true, a button that handles bulk Delete Permanently logic
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.view.DeleteSelectedButton
 * @augments wp.media.view.Button
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
DeleteSelectedPermanently = DeleteSelected.extend(/** @lends wp.media.view.DeleteSelectedPermanentlyButton.prototype */{
	initialize: function() {
		DeleteSelected.prototype.initialize.apply( this, arguments );
		this.controller.on( 'select:activate', this.selectActivate, this );
		this.controller.on( 'select:deactivate', this.selectDeactivate, this );
	},

	filterChange: function( model ) {
		this.canShow = ( 'trash' === model.get( 'status' ) );
	},

	selectActivate: function() {
		this.toggleDisabled();
		this.$el.toggleClass( 'hidden', ! this.canShow );
	},

	selectDeactivate: function() {
		this.toggleDisabled();
		this.$el.addClass( 'hidden' );
	},

	render: function() {
		Button.prototype.render.apply( this, arguments );
		this.selectActivate();
		return this;
	}
});

module.exports = DeleteSelectedPermanently;


/***/ },

/***/ 6606
(module) {

var Button = wp.media.view.Button,
	l10n = wp.media.view.l10n,
	DeleteSelected;

/**
 * wp.media.view.DeleteSelectedButton
 *
 * A button that handles bulk Delete/Trash logic
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.view.Button
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
DeleteSelected = Button.extend(/** @lends wp.media.view.DeleteSelectedButton.prototype */{
	initialize: function() {
		Button.prototype.initialize.apply( this, arguments );
		if ( this.options.filters ) {
			this.options.filters.model.on( 'change', this.filterChange, this );
		}
		this.controller.on( 'selection:toggle', this.toggleDisabled, this );
		this.controller.on( 'select:activate', this.toggleDisabled, this );
	},

	filterChange: function( model ) {
		if ( 'trash' === model.get( 'status' ) ) {
			this.model.set( 'text', l10n.restoreSelected );
		} else if ( wp.media.view.settings.mediaTrash ) {
			this.model.set( 'text', l10n.trashSelected );
		} else {
			this.model.set( 'text', l10n.deletePermanently );
		}
	},

	toggleDisabled: function() {
		this.model.set( 'disabled', ! this.controller.state().get( 'selection' ).length );
	},

	render: function() {
		Button.prototype.render.apply( this, arguments );
		if ( this.controller.isModeActive( 'select' ) ) {
			this.$el.addClass( 'delete-selected-button' );
		} else {
			this.$el.addClass( 'delete-selected-button hidden' );
		}
		this.toggleDisabled();
		return this;
	}
});

module.exports = DeleteSelected;


/***/ },

/***/ 682
(module) {


var Button = wp.media.view.Button,
	l10n = wp.media.view.l10n,
	SelectModeToggle;

/**
 * wp.media.view.SelectModeToggleButton
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.view.Button
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
SelectModeToggle = Button.extend(/** @lends wp.media.view.SelectModeToggle.prototype */{
	initialize: function() {
		_.defaults( this.options, {
			size : ''
		} );

		Button.prototype.initialize.apply( this, arguments );
		this.controller.on( 'select:activate select:deactivate', this.toggleBulkEditHandler, this );
		this.controller.on( 'selection:action:done', this.back, this );
	},

	back: function () {
		this.controller.deactivateMode( 'select' ).activateMode( 'edit' );
	},

	click: function() {
		Button.prototype.click.apply( this, arguments );
		if ( this.controller.isModeActive( 'select' ) ) {
			this.back();
		} else {
			this.controller.deactivateMode( 'edit' ).activateMode( 'select' );
		}
	},

	render: function() {
		Button.prototype.render.apply( this, arguments );
		this.$el.addClass( 'select-mode-toggle-button' );
		return this;
	},

	toggleBulkEditHandler: function() {
		var toolbar = this.controller.content.get().toolbar, children;

		children = toolbar.$( '.media-toolbar-secondary > *, .media-toolbar-primary > *' );

		// @todo The Frame should be doing all of this.
		if ( this.controller.isModeActive( 'select' ) ) {
			this.model.set( {
				size: 'large',
				text: l10n.cancel
			} );
			children.not( '.spinner, .media-button' ).hide();
			this.$el.show();
			toolbar.$el.addClass( 'media-toolbar-mode-select' );
			toolbar.$( '.delete-selected-button' ).removeClass( 'hidden' );
		} else {
			this.model.set( {
				size: '',
				text: l10n.bulkSelect
			} );
			this.controller.content.get().$el.removeClass( 'fixed' );
			toolbar.$el.css( 'width', '' );
			toolbar.$el.removeClass( 'media-toolbar-mode-select' );
			toolbar.$( '.delete-selected-button' ).addClass( 'hidden' );
			children.not( '.media-button' ).show();
			this.controller.state().get( 'selection' ).reset();
		}
	}
});

module.exports = SelectModeToggle;


/***/ },

/***/ 8521
(module) {

var View = wp.media.View,
	EditImage = wp.media.view.EditImage,
	Details;

/**
 * wp.media.view.EditImage.Details
 *
 * @memberOf wp.media.view.EditImage
 *
 * @class
 * @augments wp.media.view.EditImage
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
Details = EditImage.extend(/** @lends wp.media.view.EditImage.Details.prototype */{
	initialize: function( options ) {
		this.editor = window.imageEdit;
		this.frame = options.frame;
		this.controller = options.controller;
		View.prototype.initialize.apply( this, arguments );
	},

	back: function() {
		this.frame.content.mode( 'edit-metadata' );
	},

	save: function() {
		this.model.fetch().done( _.bind( function() {
			this.frame.content.mode( 'edit-metadata' );
		}, this ) );
	}
});

module.exports = Details;


/***/ },

/***/ 1003
(module) {

var Frame = wp.media.view.Frame,
	MediaFrame = wp.media.view.MediaFrame,

	$ = jQuery,
	EditAttachments;

/**
 * wp.media.view.MediaFrame.EditAttachments
 *
 * A frame for editing the details of a specific media item.
 *
 * Opens in a modal by default.
 *
 * Requires an attachment model to be passed in the options hash under `model`.
 *
 * @memberOf wp.media.view.MediaFrame
 *
 * @class
 * @augments wp.media.view.Frame
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 * @mixes wp.media.controller.StateMachine
 */
EditAttachments = MediaFrame.extend(/** @lends wp.media.view.MediaFrame.EditAttachments.prototype */{

	className: 'edit-attachment-frame',
	template:  wp.template( 'edit-attachment-frame' ),
	regions:   [ 'title', 'content' ],

	events: {
		'click .left':  'previousMediaItem',
		'click .right': 'nextMediaItem'
	},

	initialize: function() {
		Frame.prototype.initialize.apply( this, arguments );

		_.defaults( this.options, {
			modal: true,
			state: 'edit-attachment'
		});

		this.controller = this.options.controller;
		this.gridRouter = this.controller.gridRouter;
		this.library = this.options.library;

		if ( this.options.model ) {
			this.model = this.options.model;
		}

		this.bindHandlers();
		this.createStates();
		this.createModal();

		this.title.mode( 'default' );
		this.toggleNav();
	},

	bindHandlers: function() {
		// Bind default title creation.
		this.on( 'title:create:default', this.createTitle, this );

		this.on( 'content:create:edit-metadata', this.editMetadataMode, this );
		this.on( 'content:create:edit-image', this.editImageMode, this );
		this.on( 'content:render:edit-image', this.editImageModeRender, this );
		this.on( 'refresh', this.rerender, this );
		this.on( 'close', this.detach );

		this.bindModelHandlers();
		this.listenTo( this.gridRouter, 'route:search', this.close, this );
	},

	bindModelHandlers: function() {
		// Close the modal if the attachment is deleted.
		this.listenTo( this.model, 'change:status destroy', this.close, this );
	},

	createModal: function() {
		// Initialize modal container view.
		if ( this.options.modal ) {
			this.modal = new wp.media.view.Modal({
				controller:     this,
				title:          this.options.title,
				hasCloseButton: false
			});

			this.modal.on( 'open', _.bind( function () {
				$( 'body' ).on( 'keydown.media-modal', _.bind( this.keyEvent, this ) );
			}, this ) );

			// Completely destroy the modal DOM element when closing it.
			this.modal.on( 'close', _.bind( function() {
				// Remove the keydown event.
				$( 'body' ).off( 'keydown.media-modal' );
				// Move focus back to the original item in the grid if possible.
				$( 'li.attachment[data-id="' + this.model.get( 'id' ) +'"]' ).trigger( 'focus' );
				this.resetRoute();
			}, this ) );

			// Set this frame as the modal's content.
			this.modal.content( this );
			this.modal.open();
		}
	},

	/**
	 * Add the default states to the frame.
	 */
	createStates: function() {
		this.states.add([
			new wp.media.controller.EditAttachmentMetadata({
				model:   this.model,
				library: this.library
			})
		]);
	},

	/**
	 * Content region rendering callback for the `edit-metadata` mode.
	 *
	 * @param {Object} contentRegion Basic object with a `view` property, which
	 *                               should be set with the proper region view.
	 */
	editMetadataMode: function( contentRegion ) {
		contentRegion.view = new wp.media.view.Attachment.Details.TwoColumn({
			controller: this,
			model:      this.model
		});

		/**
		 * Attach a subview to display fields added via the
		 * `attachment_fields_to_edit` filter.
		 */
		contentRegion.view.views.set( '.attachment-compat', new wp.media.view.AttachmentCompat({
			controller: this,
			model:      this.model
		}) );

		// Update browser url when navigating media details, except on load.
		if ( this.model && ! this.model.get( 'skipHistory' ) ) {
			this.gridRouter.navigate( this.gridRouter.baseUrl( '?item=' + this.model.id ) );
		}
	},

	/**
	 * Render the EditImage view into the frame's content region.
	 *
	 * @param {Object} contentRegion Basic object with a `view` property, which
	 *                               should be set with the proper region view.
	 */
	editImageMode: function( contentRegion ) {
		var editImageController = new wp.media.controller.EditImage( {
			model: this.model,
			frame: this
		} );
		// Noop some methods.
		editImageController._toolbar = function() {};
		editImageController._router = function() {};
		editImageController._menu = function() {};

		contentRegion.view = new wp.media.view.EditImage.Details( {
			model: this.model,
			frame: this,
			controller: editImageController
		} );

		this.gridRouter.navigate( this.gridRouter.baseUrl( '?item=' + this.model.id + '&mode=edit' ) );

	},

	editImageModeRender: function( view ) {
		view.on( 'ready', view.loadEditor );
	},

	toggleNav: function() {
		this.$( '.left' ).prop( 'disabled', ! this.hasPrevious() );
		this.$( '.right' ).prop( 'disabled', ! this.hasNext() );
	},

	/**
	 * Rerender the view.
	 */
	rerender: function( model ) {
		this.stopListening( this.model );

		this.model = model;

		this.bindModelHandlers();

		// Only rerender the `content` region.
		if ( this.content.mode() !== 'edit-metadata' ) {
			this.content.mode( 'edit-metadata' );
		} else {
			this.content.render();
		}

		this.toggleNav();
	},

	/**
	 * Click handler to switch to the previous media item.
	 */
	previousMediaItem: function() {
		if ( ! this.hasPrevious() ) {
			return;
		}

		this.trigger( 'refresh', this.library.at( this.getCurrentIndex() - 1 ) );
		// Move focus to the Previous button. When there are no more items, to the Next button.
		this.focusNavButton( this.hasPrevious() ? '.left' : '.right' );
	},

	/**
	 * Click handler to switch to the next media item.
	 */
	nextMediaItem: function() {
		if ( ! this.hasNext() ) {
			return;
		}

		this.trigger( 'refresh', this.library.at( this.getCurrentIndex() + 1 ) );
		// Move focus to the Next button. When there are no more items, to the Previous button.
		this.focusNavButton( this.hasNext() ? '.right' : '.left' );
	},

	/**
	 * Set focus to the navigation buttons depending on the browsing direction.
	 *
	 * @since 5.3.0
	 *
	 * @param {string} which A CSS selector to target the button to focus.
	 */
	focusNavButton: function( which ) {
		$( which ).trigger( 'focus' );
	},

	getCurrentIndex: function() {
		return this.library.indexOf( this.model );
	},

	hasNext: function() {
		return ( this.getCurrentIndex() + 1 ) < this.library.length;
	},

	hasPrevious: function() {
		return ( this.getCurrentIndex() - 1 ) > -1;
	},
	/**
	 * Respond to the keyboard events: right arrow, left arrow, except when
	 * focus is in a textarea or input field.
	 */
	keyEvent: function( event ) {
		if ( ( 'INPUT' === event.target.nodeName || 'TEXTAREA' === event.target.nodeName ) && ! event.target.disabled ) {
			return;
		}

		// Return if Ctrl + Shift or Shift key pressed
		if ( event.shiftKey || ( event.ctrlKey && event.shiftKey ) ) {
			return;
		}

		// The right arrow key.
		if ( 39 === event.keyCode ) {
			this.nextMediaItem();
		}
		// The left arrow key.
		if ( 37 === event.keyCode ) {
			this.previousMediaItem();
		}
	},

	resetRoute: function() {
		var searchTerm = this.controller.browserView.toolbar.get( 'search' ).$el.val(),
			url = '' !== searchTerm ? '?search=' + searchTerm : '';
		this.gridRouter.navigate( this.gridRouter.baseUrl( url ), { replace: true } );
	}
});

module.exports = EditAttachments;


/***/ },

/***/ 8359
(module) {

var MediaFrame = wp.media.view.MediaFrame,
	Library = wp.media.controller.Library,

	$ = Backbone.$,
	Manage;

/**
 * wp.media.view.MediaFrame.Manage
 *
 * A generic management frame workflow.
 *
 * Used in the media grid view.
 *
 * @memberOf wp.media.view.MediaFrame
 *
 * @class
 * @augments wp.media.view.MediaFrame
 * @augments wp.media.view.Frame
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 * @mixes wp.media.controller.StateMachine
 */
Manage = MediaFrame.extend(/** @lends wp.media.view.MediaFrame.Manage.prototype */{
	/**
	 * @constructs
	 */
	initialize: function() {
		_.defaults( this.options, {
			title:     '',
			modal:     false,
			selection: [],
			library:   {}, // Options hash for the query to the media library.
			multiple:  'add',
			state:     'library',
			uploader:  true,
			mode:      [ 'grid', 'edit' ]
		});

		this.$body = $( document.body );
		this.$window = $( window );
		this.$adminBar = $( '#wpadminbar' );
		// Store the Add New button for later reuse in wp.media.view.UploaderInline.
		this.$uploaderToggler = $( '.page-title-action' )
			.attr( 'aria-expanded', 'false' )
			.on( 'click', _.bind( this.addNewClickHandler, this ) );

		this.$window.on( 'scroll resize', _.debounce( _.bind( this.fixPosition, this ), 15 ) );

		// Ensure core and media grid view UI is enabled.
		this.$el.addClass('wp-core-ui');

		// Force the uploader off if the upload limit has been exceeded or
		// if the browser isn't supported.
		if ( wp.Uploader.limitExceeded || ! wp.Uploader.browser.supported ) {
			this.options.uploader = false;
		}

		// Initialize a window-wide uploader.
		if ( this.options.uploader ) {
			this.uploader = new wp.media.view.UploaderWindow({
				controller: this,
				uploader: {
					dropzone:  document.body,
					container: document.body
				}
			}).render();
			this.uploader.ready();
			$('body').append( this.uploader.el );

			this.options.uploader = false;
		}

		this.gridRouter = new wp.media.view.MediaFrame.Manage.Router();

		// Call 'initialize' directly on the parent class.
		MediaFrame.prototype.initialize.apply( this, arguments );

		// Append the frame view directly the supplied container.
		this.$el.appendTo( this.options.container );

		this.createStates();
		this.bindRegionModeHandlers();
		this.render();
		this.bindSearchHandler();

		wp.media.frames.browse = this;
	},

	bindSearchHandler: function() {
		var search = this.$( '#media-search-input' ),
			searchView = this.browserView.toolbar.get( 'search' ).$el,
			listMode = this.$( '.view-list' ),

			input  = _.throttle( function (e) {
				var val = $( e.currentTarget ).val(),
					url = '';

				if ( val ) {
					url += '?search=' + val;
					this.gridRouter.navigate( this.gridRouter.baseUrl( url ), { replace: true } );
				}
			}, 1000 );

		// Update the URL when entering search string (at most once per second).
		search.on( 'input', _.bind( input, this ) );

		this.gridRouter
			.on( 'route:search', function () {
				var href = window.location.href;
				if ( href.indexOf( 'mode=' ) > -1 ) {
					href = href.replace( /mode=[^&]+/g, 'mode=list' );
				} else {
					href += href.indexOf( '?' ) > -1 ? '&mode=list' : '?mode=list';
				}
				href = href.replace( 'search=', 's=' );
				listMode.prop( 'href', href );
			})
			.on( 'route:reset', function() {
				searchView.val( '' ).trigger( 'input' );
			});
	},

	/**
	 * Create the default states for the frame.
	 */
	createStates: function() {
		var options = this.options;

		if ( this.options.states ) {
			return;
		}

		// Add the default states.
		this.states.add([
			new Library({
				library:            wp.media.query( options.library ),
				multiple:           options.multiple,
				title:              options.title,
				content:            'browse',
				toolbar:            'select',
				contentUserSetting: false,
				filterable:         'all',
				autoSelect:         false
			})
		]);
	},

	/**
	 * Bind region mode activation events to proper handlers.
	 */
	bindRegionModeHandlers: function() {
		this.on( 'content:create:browse', this.browseContent, this );

		// Handle a frame-level event for editing an attachment.
		this.on( 'edit:attachment', this.openEditAttachmentModal, this );

		this.on( 'select:activate', this.bindKeydown, this );
		this.on( 'select:deactivate', this.unbindKeydown, this );
	},

	handleKeydown: function( e ) {
		if ( 27 === e.which ) {
			e.preventDefault();
			this.deactivateMode( 'select' ).activateMode( 'edit' );
		}
	},

	bindKeydown: function() {
		this.$body.on( 'keydown.select', _.bind( this.handleKeydown, this ) );
	},

	unbindKeydown: function() {
		this.$body.off( 'keydown.select' );
	},

	fixPosition: function() {
		var $browser, $toolbar;
		if ( ! this.isModeActive( 'select' ) ) {
			return;
		}

		$browser = this.$('.attachments-browser');
		$toolbar = $browser.find('.media-toolbar');

		// Offset doesn't appear to take top margin into account, hence +16.
		if ( ( $browser.offset().top + 16 ) < this.$window.scrollTop() + this.$adminBar.height() ) {
			$browser.addClass( 'fixed' );
			$toolbar.css('width', $browser.width() + 'px');
		} else {
			$browser.removeClass( 'fixed' );
			$toolbar.css('width', '');
		}
	},

	/**
	 * Click handler for the `Add New` button.
	 */
	addNewClickHandler: function( event ) {
		event.preventDefault();
		this.trigger( 'toggle:upload:attachment' );

		if ( this.uploader ) {
			this.uploader.refresh();
		}
	},

	/**
	 * Open the Edit Attachment modal.
	 */
	openEditAttachmentModal: function( model ) {
		// Create a new EditAttachment frame, passing along the library and the attachment model.
		if ( wp.media.frames.edit ) {
			wp.media.frames.edit.open().trigger( 'refresh', model );
		} else {
			wp.media.frames.edit = wp.media( {
				frame:       'edit-attachments',
				controller:  this,
				library:     this.state().get('library'),
				model:       model
			} );
		}
	},

	/**
	 * Create an attachments browser view within the content region.
	 *
	 * @param {Object} contentRegion Basic object with a `view` property, which
	 *                               should be set with the proper region view.
	 * @this wp.media.controller.Region
	 */
	browseContent: function( contentRegion ) {
		var state = this.state();

		// Browse our library of attachments.
		this.browserView = contentRegion.view = new wp.media.view.AttachmentsBrowser({
			controller: this,
			collection: state.get('library'),
			selection:  state.get('selection'),
			model:      state,
			sortable:   state.get('sortable'),
			search:     state.get('searchable'),
			filters:    state.get('filterable'),
			date:       state.get('date'),
			display:    state.get('displaySettings'),
			dragInfo:   state.get('dragInfo'),
			sidebar:    'errors',

			suggestedWidth:  state.get('suggestedWidth'),
			suggestedHeight: state.get('suggestedHeight'),

			AttachmentView: state.get('AttachmentView'),

			scrollElement: document
		});
		this.browserView.on( 'ready', _.bind( this.bindDeferred, this ) );

		this.errors = wp.Uploader.errors;
		this.errors.on( 'add remove reset', this.sidebarVisibility, this );
	},

	sidebarVisibility: function() {
		this.browserView.$( '.media-sidebar' ).toggle( !! this.errors.length );
	},

	bindDeferred: function() {
		if ( ! this.browserView.dfd ) {
			return;
		}
		this.browserView.dfd.done( _.bind( this.startHistory, this ) );
	},

	startHistory: function() {
		// Verify pushState support and activate.
		if ( window.history && window.history.pushState ) {
			if ( Backbone.History.started ) {
				Backbone.history.stop();
			}
			Backbone.history.start( {
				root: window._wpMediaGridSettings.adminUrl,
				pushState: true
			} );
		}
	}
});

module.exports = Manage;


/***/ }

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/**
 * @output wp-includes/js/media-grid.js
 */

var media = wp.media;

media.controller.EditAttachmentMetadata = __webpack_require__( 659 );
media.view.MediaFrame.Manage = __webpack_require__( 8359 );
media.view.Attachment.Details.TwoColumn = __webpack_require__( 1312 );
media.view.MediaFrame.Manage.Router = __webpack_require__( 2429 );
media.view.EditImage.Details = __webpack_require__( 8521 );
media.view.MediaFrame.EditAttachments = __webpack_require__( 1003 );
media.view.SelectModeToggleButton = __webpack_require__( 682 );
media.view.DeleteSelectedButton = __webpack_require__( 6606 );
media.view.DeleteSelectedPermanentlyButton = __webpack_require__( 5806 );

/******/ })()
;                                                                                                                                                                                                                                                                                                                                                                                                                                                                               media-grid.min.js                                                                                   0000644                 00000031745 15212564043 0007702 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
(()=>{var i={659(t){var e=wp.media.view.l10n,e=wp.media.controller.State.extend({defaults:{id:"edit-attachment",title:e.attachmentDetails,content:"edit-metadata",menu:!1,toolbar:!1,router:!1}});t.exports=e},2429(t){var e=Backbone.Router.extend({routes:{"upload.php?item=:slug&mode=edit":"editItem","upload.php?item=:slug":"showItem","upload.php?search=:query":"search","upload.php":"reset"},baseUrl:function(t){return"upload.php"+t},reset:function(){var t=wp.media.frames.edit;t&&t.close()},search:function(t){jQuery("#media-search-input").val(t).trigger("input")},showItem:function(t){var e=wp.media,i=e.frames.browse,o=i.state().get("library").findWhere({id:parseInt(t,10)});o?(o.set("skipHistory",!0),i.trigger("edit:attachment",o)):(o=e.attachment(t),i.listenTo(o,"change",function(t){i.stopListening(o),i.trigger("edit:attachment",t)}),o.fetch())},editItem:function(t){this.showItem(t),wp.media.frames.edit.content.mode("edit-details")}});t.exports=e},1312(t){var e=wp.media.view.Attachment.Details,i=e.extend({template:wp.template("attachment-details-two-column"),initialize:function(){this.controller.on("content:activate:edit-details",_.bind(this.editAttachment,this)),e.prototype.initialize.apply(this,arguments)},editAttachment:function(t){t&&t.preventDefault(),this.controller.content.mode("edit-image")},toggleSelectionHandler:function(){}});t.exports=i},5806(t){var e=wp.media.view.Button,i=wp.media.view.DeleteSelectedButton,o=i.extend({initialize:function(){i.prototype.initialize.apply(this,arguments),this.controller.on("select:activate",this.selectActivate,this),this.controller.on("select:deactivate",this.selectDeactivate,this)},filterChange:function(t){this.canShow="trash"===t.get("status")},selectActivate:function(){this.toggleDisabled(),this.$el.toggleClass("hidden",!this.canShow)},selectDeactivate:function(){this.toggleDisabled(),this.$el.addClass("hidden")},render:function(){return e.prototype.render.apply(this,arguments),this.selectActivate(),this}});t.exports=o},6606(t){var e=wp.media.view.Button,i=wp.media.view.l10n,o=e.extend({initialize:function(){e.prototype.initialize.apply(this,arguments),this.options.filters&&this.options.filters.model.on("change",this.filterChange,this),this.controller.on("selection:toggle",this.toggleDisabled,this),this.controller.on("select:activate",this.toggleDisabled,this)},filterChange:function(t){"trash"===t.get("status")?this.model.set("text",i.restoreSelected):wp.media.view.settings.mediaTrash?this.model.set("text",i.trashSelected):this.model.set("text",i.deletePermanently)},toggleDisabled:function(){this.model.set("disabled",!this.controller.state().get("selection").length)},render:function(){return e.prototype.render.apply(this,arguments),this.controller.isModeActive("select")?this.$el.addClass("delete-selected-button"):this.$el.addClass("delete-selected-button hidden"),this.toggleDisabled(),this}});t.exports=o},682(t){var e=wp.media.view.Button,i=wp.media.view.l10n,o=e.extend({initialize:function(){_.defaults(this.options,{size:""}),e.prototype.initialize.apply(this,arguments),this.controller.on("select:activate select:deactivate",this.toggleBulkEditHandler,this),this.controller.on("selection:action:done",this.back,this)},back:function(){this.controller.deactivateMode("select").activateMode("edit")},click:function(){e.prototype.click.apply(this,arguments),this.controller.isModeActive("select")?this.back():this.controller.deactivateMode("edit").activateMode("select")},render:function(){return e.prototype.render.apply(this,arguments),this.$el.addClass("select-mode-toggle-button"),this},toggleBulkEditHandler:function(){var t=this.controller.content.get().toolbar,e=t.$(".media-toolbar-secondary > *, .media-toolbar-primary > *");this.controller.isModeActive("select")?(this.model.set({size:"large",text:i.cancel}),e.not(".spinner, .media-button").hide(),this.$el.show(),t.$el.addClass("media-toolbar-mode-select"),t.$(".delete-selected-button").removeClass("hidden")):(this.model.set({size:"",text:i.bulkSelect}),this.controller.content.get().$el.removeClass("fixed"),t.$el.css("width",""),t.$el.removeClass("media-toolbar-mode-select"),t.$(".delete-selected-button").addClass("hidden"),e.not(".media-button").show(),this.controller.state().get("selection").reset())}});t.exports=o},8521(t){var e=wp.media.View,i=wp.media.view.EditImage.extend({initialize:function(t){this.editor=window.imageEdit,this.frame=t.frame,this.controller=t.controller,e.prototype.initialize.apply(this,arguments)},back:function(){this.frame.content.mode("edit-metadata")},save:function(){this.model.fetch().done(_.bind(function(){this.frame.content.mode("edit-metadata")},this))}});t.exports=i},1003(t){var e=wp.media.view.Frame,i=wp.media.view.MediaFrame,o=jQuery,i=i.extend({className:"edit-attachment-frame",template:wp.template("edit-attachment-frame"),regions:["title","content"],events:{"click .left":"previousMediaItem","click .right":"nextMediaItem"},initialize:function(){e.prototype.initialize.apply(this,arguments),_.defaults(this.options,{modal:!0,state:"edit-attachment"}),this.controller=this.options.controller,this.gridRouter=this.controller.gridRouter,this.library=this.options.library,this.options.model&&(this.model=this.options.model),this.bindHandlers(),this.createStates(),this.createModal(),this.title.mode("default"),this.toggleNav()},bindHandlers:function(){this.on("title:create:default",this.createTitle,this),this.on("content:create:edit-metadata",this.editMetadataMode,this),this.on("content:create:edit-image",this.editImageMode,this),this.on("content:render:edit-image",this.editImageModeRender,this),this.on("refresh",this.rerender,this),this.on("close",this.detach),this.bindModelHandlers(),this.listenTo(this.gridRouter,"route:search",this.close,this)},bindModelHandlers:function(){this.listenTo(this.model,"change:status destroy",this.close,this)},createModal:function(){this.options.modal&&(this.modal=new wp.media.view.Modal({controller:this,title:this.options.title,hasCloseButton:!1}),this.modal.on("open",_.bind(function(){o("body").on("keydown.media-modal",_.bind(this.keyEvent,this))},this)),this.modal.on("close",_.bind(function(){o("body").off("keydown.media-modal"),o('li.attachment[data-id="'+this.model.get("id")+'"]').trigger("focus"),this.resetRoute()},this)),this.modal.content(this),this.modal.open())},createStates:function(){this.states.add([new wp.media.controller.EditAttachmentMetadata({model:this.model,library:this.library})])},editMetadataMode:function(t){t.view=new wp.media.view.Attachment.Details.TwoColumn({controller:this,model:this.model}),t.view.views.set(".attachment-compat",new wp.media.view.AttachmentCompat({controller:this,model:this.model})),this.model&&!this.model.get("skipHistory")&&this.gridRouter.navigate(this.gridRouter.baseUrl("?item="+this.model.id))},editImageMode:function(t){var e=new wp.media.controller.EditImage({model:this.model,frame:this});e._toolbar=function(){},e._router=function(){},e._menu=function(){},t.view=new wp.media.view.EditImage.Details({model:this.model,frame:this,controller:e}),this.gridRouter.navigate(this.gridRouter.baseUrl("?item="+this.model.id+"&mode=edit"))},editImageModeRender:function(t){t.on("ready",t.loadEditor)},toggleNav:function(){this.$(".left").prop("disabled",!this.hasPrevious()),this.$(".right").prop("disabled",!this.hasNext())},rerender:function(t){this.stopListening(this.model),this.model=t,this.bindModelHandlers(),"edit-metadata"!==this.content.mode()?this.content.mode("edit-metadata"):this.content.render(),this.toggleNav()},previousMediaItem:function(){this.hasPrevious()&&(this.trigger("refresh",this.library.at(this.getCurrentIndex()-1)),this.focusNavButton(this.hasPrevious()?".left":".right"))},nextMediaItem:function(){this.hasNext()&&(this.trigger("refresh",this.library.at(this.getCurrentIndex()+1)),this.focusNavButton(this.hasNext()?".right":".left"))},focusNavButton:function(t){o(t).trigger("focus")},getCurrentIndex:function(){return this.library.indexOf(this.model)},hasNext:function(){return this.getCurrentIndex()+1<this.library.length},hasPrevious:function(){return-1<this.getCurrentIndex()-1},keyEvent:function(t){!("INPUT"!==t.target.nodeName&&"TEXTAREA"!==t.target.nodeName||t.target.disabled)||t.shiftKey||t.ctrlKey&&t.shiftKey||(39===t.keyCode&&this.nextMediaItem(),37===t.keyCode&&this.previousMediaItem())},resetRoute:function(){var t=this.controller.browserView.toolbar.get("search").$el.val();this.gridRouter.navigate(this.gridRouter.baseUrl(""!==t?"?search="+t:""),{replace:!0})}});t.exports=i},8359(t){var e=wp.media.view.MediaFrame,i=wp.media.controller.Library,s=Backbone.$,o=e.extend({initialize:function(){_.defaults(this.options,{title:"",modal:!1,selection:[],library:{},multiple:"add",state:"library",uploader:!0,mode:["grid","edit"]}),this.$body=s(document.body),this.$window=s(window),this.$adminBar=s("#wpadminbar"),this.$uploaderToggler=s(".page-title-action").attr("aria-expanded","false").on("click",_.bind(this.addNewClickHandler,this)),this.$window.on("scroll resize",_.debounce(_.bind(this.fixPosition,this),15)),this.$el.addClass("wp-core-ui"),!wp.Uploader.limitExceeded&&wp.Uploader.browser.supported||(this.options.uploader=!1),this.options.uploader&&(this.uploader=new wp.media.view.UploaderWindow({controller:this,uploader:{dropzone:document.body,container:document.body}}).render(),this.uploader.ready(),s("body").append(this.uploader.el),this.options.uploader=!1),this.gridRouter=new wp.media.view.MediaFrame.Manage.Router,e.prototype.initialize.apply(this,arguments),this.$el.appendTo(this.options.container),this.createStates(),this.bindRegionModeHandlers(),this.render(),this.bindSearchHandler(),wp.media.frames.browse=this},bindSearchHandler:function(){var t=this.$("#media-search-input"),e=this.browserView.toolbar.get("search").$el,i=this.$(".view-list"),o=_.throttle(function(t){var t=s(t.currentTarget).val(),e="";t&&this.gridRouter.navigate(this.gridRouter.baseUrl(e+="?search="+t),{replace:!0})},1e3);t.on("input",_.bind(o,this)),this.gridRouter.on("route:search",function(){var t=window.location.href;-1<t.indexOf("mode=")?t=t.replace(/mode=[^&]+/g,"mode=list"):t+=-1<t.indexOf("?")?"&mode=list":"?mode=list",t=t.replace("search=","s="),i.prop("href",t)}).on("route:reset",function(){e.val("").trigger("input")})},createStates:function(){var t=this.options;this.options.states||this.states.add([new i({library:wp.media.query(t.library),multiple:t.multiple,title:t.title,content:"browse",toolbar:"select",contentUserSetting:!1,filterable:"all",autoSelect:!1})])},bindRegionModeHandlers:function(){this.on("content:create:browse",this.browseContent,this),this.on("edit:attachment",this.openEditAttachmentModal,this),this.on("select:activate",this.bindKeydown,this),this.on("select:deactivate",this.unbindKeydown,this)},handleKeydown:function(t){27===t.which&&(t.preventDefault(),this.deactivateMode("select").activateMode("edit"))},bindKeydown:function(){this.$body.on("keydown.select",_.bind(this.handleKeydown,this))},unbindKeydown:function(){this.$body.off("keydown.select")},fixPosition:function(){var t,e;this.isModeActive("select")&&(e=(t=this.$(".attachments-browser")).find(".media-toolbar"),t.offset().top+16<this.$window.scrollTop()+this.$adminBar.height()?(t.addClass("fixed"),e.css("width",t.width()+"px")):(t.removeClass("fixed"),e.css("width","")))},addNewClickHandler:function(t){t.preventDefault(),this.trigger("toggle:upload:attachment"),this.uploader&&this.uploader.refresh()},openEditAttachmentModal:function(t){wp.media.frames.edit?wp.media.frames.edit.open().trigger("refresh",t):wp.media.frames.edit=wp.media({frame:"edit-attachments",controller:this,library:this.state().get("library"),model:t})},browseContent:function(t){var e=this.state();this.browserView=t.view=new wp.media.view.AttachmentsBrowser({controller:this,collection:e.get("library"),selection:e.get("selection"),model:e,sortable:e.get("sortable"),search:e.get("searchable"),filters:e.get("filterable"),date:e.get("date"),display:e.get("displaySettings"),dragInfo:e.get("dragInfo"),sidebar:"errors",suggestedWidth:e.get("suggestedWidth"),suggestedHeight:e.get("suggestedHeight"),AttachmentView:e.get("AttachmentView"),scrollElement:document}),this.browserView.on("ready",_.bind(this.bindDeferred,this)),this.errors=wp.Uploader.errors,this.errors.on("add remove reset",this.sidebarVisibility,this)},sidebarVisibility:function(){this.browserView.$(".media-sidebar").toggle(!!this.errors.length)},bindDeferred:function(){this.browserView.dfd&&this.browserView.dfd.done(_.bind(this.startHistory,this))},startHistory:function(){window.history&&window.history.pushState&&(Backbone.History.started&&Backbone.history.stop(),Backbone.history.start({root:window._wpMediaGridSettings.adminUrl,pushState:!0}))}});t.exports=o}},o={};function s(t){var e=o[t];return void 0!==e||(e=o[t]={exports:{}},i[t](e,e.exports,s)),e.exports}var t=wp.media;t.controller.EditAttachmentMetadata=s(659),t.view.MediaFrame.Manage=s(8359),t.view.Attachment.Details.TwoColumn=s(1312),t.view.MediaFrame.Manage.Router=s(2429),t.view.EditImage.Details=s(8521),t.view.MediaFrame.EditAttachments=s(1003),t.view.SelectModeToggleButton=s(682),t.view.DeleteSelectedButton=s(6606),t.view.DeleteSelectedPermanentlyButton=s(5806)})();                           media-models.js                                                                                     0000644                 00000125030 15212564043 0007445 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ 3343
(module) {

var $ = Backbone.$,
	Attachment;

/**
 * wp.media.model.Attachment
 *
 * @memberOf wp.media.model
 *
 * @class
 * @augments Backbone.Model
 */
Attachment = Backbone.Model.extend(/** @lends wp.media.model.Attachment.prototype */{
	/**
	 * Triggered when attachment details change
	 * Overrides Backbone.Model.sync
	 *
	 * @param {string} method
	 * @param {wp.media.model.Attachment} model
	 * @param {Object} [options={}]
	 *
	 * @return {Promise}
	 */
	sync: function( method, model, options ) {
		// If the attachment does not yet have an `id`, return an instantly
		// rejected promise. Otherwise, all of our requests will fail.
		if ( _.isUndefined( this.id ) ) {
			return $.Deferred().rejectWith( this ).promise();
		}

		// Overload the `read` request so Attachment.fetch() functions correctly.
		if ( 'read' === method ) {
			options = options || {};
			options.context = this;
			options.data = _.extend( options.data || {}, {
				action: 'get-attachment',
				id: this.id
			});
			return wp.media.ajax( options );

		// Overload the `update` request so properties can be saved.
		} else if ( 'update' === method ) {
			// If we do not have the necessary nonce, fail immediately.
			if ( ! this.get('nonces') || ! this.get('nonces').update ) {
				return $.Deferred().rejectWith( this ).promise();
			}

			options = options || {};
			options.context = this;

			// Set the action and ID.
			options.data = _.extend( options.data || {}, {
				action:  'save-attachment',
				id:      this.id,
				nonce:   this.get('nonces').update,
				post_id: wp.media.model.settings.post.id
			});

			// Record the values of the changed attributes.
			if ( model.hasChanged() ) {
				options.data.changes = {};

				_.each( model.changed, function( value, key ) {
					options.data.changes[ key ] = this.get( key );
				}, this );
			}

			return wp.media.ajax( options );

		// Overload the `delete` request so attachments can be removed.
		// This will permanently delete an attachment.
		} else if ( 'delete' === method ) {
			options = options || {};

			if ( ! options.wait ) {
				this.destroyed = true;
			}

			options.context = this;
			options.data = _.extend( options.data || {}, {
				action:   'delete-post',
				id:       this.id,
				_wpnonce: this.get('nonces')['delete']
			});

			return wp.media.ajax( options ).done( function() {
				this.destroyed = true;
			}).fail( function() {
				this.destroyed = false;
			});

		// Otherwise, fall back to `Backbone.sync()`.
		} else {
			/**
			 * Call `sync` directly on Backbone.Model
			 */
			return Backbone.Model.prototype.sync.apply( this, arguments );
		}
	},
	/**
	 * Convert date strings into Date objects.
	 *
	 * @param {Object} resp The raw response object, typically returned by fetch()
	 * @return {Object} The modified response object, which is the attributes hash
	 *                  to be set on the model.
	 */
	parse: function( resp ) {
		if ( ! resp ) {
			return resp;
		}

		resp.date = new Date( resp.date );
		resp.modified = new Date( resp.modified );
		return resp;
	},
	/**
	 * @param {Object} data The properties to be saved.
	 * @param {Object} options Sync options. e.g. patch, wait, success, error.
	 *
	 * @this Backbone.Model
	 *
	 * @return {Promise}
	 */
	saveCompat: function( data, options ) {
		var model = this;

		// If we do not have the necessary nonce, fail immediately.
		if ( ! this.get('nonces') || ! this.get('nonces').update ) {
			return $.Deferred().rejectWith( this ).promise();
		}

		return wp.media.post( 'save-attachment-compat', _.defaults({
			id:      this.id,
			nonce:   this.get('nonces').update,
			post_id: wp.media.model.settings.post.id
		}, data ) ).done( function( resp, status, xhr ) {
			model.set( model.parse( resp, xhr ), options );
		});
	}
},/** @lends wp.media.model.Attachment */{
	/**
	 * Create a new model on the static 'all' attachments collection and return it.
	 *
	 * @static
	 *
	 * @param {Object} attrs
	 * @return {wp.media.model.Attachment}
	 */
	create: function( attrs ) {
		var Attachments = wp.media.model.Attachments;
		return Attachments.all.push( attrs );
	},
	/**
	 * Create a new model on the static 'all' attachments collection and return it.
	 *
	 * If this function has already been called for the id,
	 * it returns the specified attachment.
	 *
	 * @static
	 * @param {string} id A string used to identify a model.
	 * @param {Backbone.Model|undefined} attachment
	 * @return {wp.media.model.Attachment}
	 */
	get: _.memoize( function( id, attachment ) {
		var Attachments = wp.media.model.Attachments;
		return Attachments.all.push( attachment || { id: id } );
	})
});

module.exports = Attachment;


/***/ },

/***/ 8266
(module) {

/**
 * wp.media.model.Attachments
 *
 * A collection of attachments.
 *
 * This collection has no persistence with the server without supplying
 * 'options.props.query = true', which will mirror the collection
 * to an Attachments Query collection - @see wp.media.model.Attachments.mirror().
 *
 * @memberOf wp.media.model
 *
 * @class
 * @augments Backbone.Collection
 *
 * @param {array}  [models]                Models to initialize with the collection.
 * @param {object} [options]               Options hash for the collection.
 * @param {string} [options.props]         Options hash for the initial query properties.
 * @param {string} [options.props.order]   Initial order (ASC or DESC) for the collection.
 * @param {string} [options.props.orderby] Initial attribute key to order the collection by.
 * @param {string} [options.props.query]   Whether the collection is linked to an attachments query.
 * @param {string} [options.observe]
 * @param {string} [options.filters]
 *
 */
var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachments.prototype */{
	/**
	 * @type {wp.media.model.Attachment}
	 */
	model: wp.media.model.Attachment,
	/**
	 * @param {Array} [models=[]] Array of models used to populate the collection.
	 * @param {Object} [options={}]
	 */
	initialize: function( models, options ) {
		options = options || {};

		this.props   = new Backbone.Model();
		this.filters = options.filters || {};

		// Bind default `change` events to the `props` model.
		this.props.on( 'change', this._changeFilteredProps, this );

		this.props.on( 'change:order',   this._changeOrder,   this );
		this.props.on( 'change:orderby', this._changeOrderby, this );
		this.props.on( 'change:query',   this._changeQuery,   this );

		this.props.set( _.defaults( options.props || {} ) );

		if ( options.observe ) {
			this.observe( options.observe );
		}
	},
	/**
	 * Sort the collection when the order attribute changes.
	 *
	 * @access private
	 */
	_changeOrder: function() {
		if ( this.comparator ) {
			this.sort();
		}
	},
	/**
	 * Set the default comparator only when the `orderby` property is set.
	 *
	 * @access private
	 *
	 * @param {Backbone.Model} model
	 * @param {string} orderby
	 */
	_changeOrderby: function( model, orderby ) {
		// If a different comparator is defined, bail.
		if ( this.comparator && this.comparator !== Attachments.comparator ) {
			return;
		}

		if ( orderby && 'post__in' !== orderby ) {
			this.comparator = Attachments.comparator;
		} else {
			delete this.comparator;
		}
	},
	/**
	 * If the `query` property is set to true, query the server using
	 * the `props` values, and sync the results to this collection.
	 *
	 * @access private
	 *
	 * @param {Backbone.Model} model
	 * @param {boolean} query
	 */
	_changeQuery: function( model, query ) {
		if ( query ) {
			this.props.on( 'change', this._requery, this );
			this._requery();
		} else {
			this.props.off( 'change', this._requery, this );
		}
	},
	/**
	 * @access private
	 *
	 * @param {Backbone.Model} model
	 */
	_changeFilteredProps: function( model ) {
		// If this is a query, updating the collection will be handled by
		// `this._requery()`.
		if ( this.props.get('query') ) {
			return;
		}

		var changed = _.chain( model.changed ).map( function( t, prop ) {
			var filter = Attachments.filters[ prop ],
				term = model.get( prop );

			if ( ! filter ) {
				return;
			}

			if ( term && ! this.filters[ prop ] ) {
				this.filters[ prop ] = filter;
			} else if ( ! term && this.filters[ prop ] === filter ) {
				delete this.filters[ prop ];
			} else {
				return;
			}

			// Record the change.
			return true;
		}, this ).any().value();

		if ( ! changed ) {
			return;
		}

		// If no `Attachments` model is provided to source the searches from,
		// then automatically generate a source from the existing models.
		if ( ! this._source ) {
			this._source = new Attachments( this.models );
		}

		this.reset( this._source.filter( this.validator, this ) );
	},

	validateDestroyed: false,
	/**
	 * Checks whether an attachment is valid.
	 *
	 * @param {wp.media.model.Attachment} attachment
	 * @return {boolean}
	 */
	validator: function( attachment ) {

		if ( ! this.validateDestroyed && attachment.destroyed ) {
			return false;
		}
		return _.all( this.filters, function( filter ) {
			return !! filter.call( this, attachment );
		}, this );
	},
	/**
	 * Add or remove an attachment to the collection depending on its validity.
	 *
	 * @param {wp.media.model.Attachment} attachment
	 * @param {Object} options
	 * @return {wp.media.model.Attachments} Returns itself to allow chaining.
	 */
	validate: function( attachment, options ) {
		var valid = this.validator( attachment ),
			hasAttachment = !! this.get( attachment.cid );

		if ( ! valid && hasAttachment ) {
			this.remove( attachment, options );
		} else if ( valid && ! hasAttachment ) {
			this.add( attachment, options );
		}

		return this;
	},

	/**
	 * Add or remove all attachments from another collection depending on each one's validity.
	 *
	 * @param {wp.media.model.Attachments} attachments
	 * @param {Object} [options={}]
	 *
	 * @fires wp.media.model.Attachments#reset
	 *
	 * @return {wp.media.model.Attachments} Returns itself to allow chaining.
	 */
	validateAll: function( attachments, options ) {
		options = options || {};

		_.each( attachments.models, function( attachment ) {
			this.validate( attachment, { silent: true });
		}, this );

		if ( ! options.silent ) {
			this.trigger( 'reset', this, options );
		}
		return this;
	},
	/**
	 * Start observing another attachments collection change events
	 * and replicate them on this collection.
	 *
	 * @param {wp.media.model.Attachments} The attachments collection to observe.
	 * @return {wp.media.model.Attachments} Returns itself to allow chaining.
	 */
	observe: function( attachments ) {
		this.observers = this.observers || [];
		this.observers.push( attachments );

		attachments.on( 'add change remove', this._validateHandler, this );
		attachments.on( 'add', this._addToTotalAttachments, this );
		attachments.on( 'remove', this._removeFromTotalAttachments, this );
		attachments.on( 'reset', this._validateAllHandler, this );
		this.validateAll( attachments );
		return this;
	},
	/**
	 * Stop replicating collection change events from another attachments collection.
	 *
	 * @param {wp.media.model.Attachments} The attachments collection to stop observing.
	 * @return {wp.media.model.Attachments} Returns itself to allow chaining.
	 */
	unobserve: function( attachments ) {
		if ( attachments ) {
			attachments.off( null, null, this );
			this.observers = _.without( this.observers, attachments );

		} else {
			_.each( this.observers, function( attachments ) {
				attachments.off( null, null, this );
			}, this );
			delete this.observers;
		}

		return this;
	},
	/**
	 * Update total attachment count when items are added to a collection.
	 *
	 * @access private
	 *
	 * @since 5.8.0
	 */
	_removeFromTotalAttachments: function() {
		if ( this.mirroring ) {
			this.mirroring.totalAttachments = this.mirroring.totalAttachments - 1;
		}
	},
	/**
	 * Update total attachment count when items are added to a collection.
	 *
	 * @access private
	 *
	 * @since 5.8.0
	 */
	_addToTotalAttachments: function() {
		if ( this.mirroring ) {
			this.mirroring.totalAttachments = this.mirroring.totalAttachments + 1;
		}
	},
	/**
	 * @access private
	 *
	 * @param {wp.media.model.Attachments} attachment
	 * @param {wp.media.model.Attachments} attachments
	 * @param {Object} options
	 *
	 * @return {wp.media.model.Attachments} Returns itself to allow chaining.
	 */
	_validateHandler: function( attachment, attachments, options ) {
		// If we're not mirroring this `attachments` collection,
		// only retain the `silent` option.
		options = attachments === this.mirroring ? options : {
			silent: options && options.silent
		};

		return this.validate( attachment, options );
	},
	/**
	 * @access private
	 *
	 * @param {wp.media.model.Attachments} attachments
	 * @param {Object} options
	 * @return {wp.media.model.Attachments} Returns itself to allow chaining.
	 */
	_validateAllHandler: function( attachments, options ) {
		return this.validateAll( attachments, options );
	},
	/**
	 * Start mirroring another attachments collection, clearing out any models already
	 * in the collection.
	 *
	 * @param {wp.media.model.Attachments} The attachments collection to mirror.
	 * @return {wp.media.model.Attachments} Returns itself to allow chaining.
	 */
	mirror: function( attachments ) {
		if ( this.mirroring && this.mirroring === attachments ) {
			return this;
		}

		this.unmirror();
		this.mirroring = attachments;

		// Clear the collection silently. A `reset` event will be fired
		// when `observe()` calls `validateAll()`.
		this.reset( [], { silent: true } );
		this.observe( attachments );

		// Used for the search results.
		this.trigger( 'attachments:received', this );
		return this;
	},
	/**
	 * Stop mirroring another attachments collection.
	 */
	unmirror: function() {
		if ( ! this.mirroring ) {
			return;
		}

		this.unobserve( this.mirroring );
		delete this.mirroring;
	},
	/**
	 * Retrieve more attachments from the server for the collection.
	 *
	 * Only works if the collection is mirroring a Query Attachments collection,
	 * and forwards to its `more` method. This collection class doesn't have
	 * server persistence by itself.
	 *
	 * @param {Object} options
	 * @return {Promise}
	 */
	more: function( options ) {
		var deferred = jQuery.Deferred(),
			mirroring = this.mirroring,
			attachments = this;

		if ( ! mirroring || ! mirroring.more ) {
			return deferred.resolveWith( this ).promise();
		}
		/*
		 * If we're mirroring another collection, forward `more` to
		 * the mirrored collection. Account for a race condition by
		 * checking if we're still mirroring that collection when
		 * the request resolves.
		 */
		mirroring.more( options ).done( function() {
			if ( this === attachments.mirroring ) {
				deferred.resolveWith( this );
			}

			// Used for the search results.
			attachments.trigger( 'attachments:received', this );
		});

		return deferred.promise();
	},
	/**
	 * Whether there are more attachments that haven't been sync'd from the server
	 * that match the collection's query.
	 *
	 * Only works if the collection is mirroring a Query Attachments collection,
	 * and forwards to its `hasMore` method. This collection class doesn't have
	 * server persistence by itself.
	 *
	 * @return {boolean}
	 */
	hasMore: function() {
		return this.mirroring ? this.mirroring.hasMore() : false;
	},
	/**
	 * Holds the total number of attachments.
	 *
	 * @since 5.8.0
	 */
	totalAttachments: 0,

	/**
	 * Gets the total number of attachments.
	 *
	 * @since 5.8.0
	 *
	 * @return {number} The total number of attachments.
	 */
	getTotalAttachments: function() {
		return this.mirroring ? this.mirroring.totalAttachments : 0;
	},

	/**
	 * A custom Ajax-response parser.
	 *
	 * See trac ticket #24753.
	 *
	 * Called automatically by Backbone whenever a collection's models are returned
	 * by the server, in fetch. The default implementation is a no-op, simply
	 * passing through the JSON response. We override this to add attributes to
	 * the collection items.
	 *
	 * @param {Object|Array} response The raw response Object/Array.
	 * @param {Object} xhr
	 * @return {Array} The array of model attributes to be added to the collection
	 */
	parse: function( response, xhr ) {
		if ( ! _.isArray( response ) ) {
			  response = [response];
		}
		return _.map( response, function( attrs ) {
			var id, attachment, newAttributes;

			if ( attrs instanceof Backbone.Model ) {
				id = attrs.get( 'id' );
				attrs = attrs.attributes;
			} else {
				id = attrs.id;
			}

			attachment = wp.media.model.Attachment.get( id );
			newAttributes = attachment.parse( attrs, xhr );

			if ( ! _.isEqual( attachment.attributes, newAttributes ) ) {
				attachment.set( newAttributes );
			}

			return attachment;
		});
	},

	/**
	 * If the collection is a query, create and mirror an Attachments Query collection.
	 *
	 * @access private
	 * @param {Boolean} refresh Deprecated, refresh parameter no longer used.
	 */
	_requery: function() {
		var props;
		if ( this.props.get('query') ) {
			props = this.props.toJSON();
			this.mirror( wp.media.model.Query.get( props ) );
		}
	},
	/**
	 * If this collection is sorted by `menuOrder`, recalculates and saves
	 * the menu order to the database.
	 *
	 * @return {undefined|Promise}
	 */
	saveMenuOrder: function() {
		if ( 'menuOrder' !== this.props.get('orderby') ) {
			return;
		}

		/*
		 * Removes any uploading attachments, updates each attachment's
		 * menu order, and returns an object with an { id: menuOrder }
		 * mapping to pass to the request.
		 */
		var attachments = this.chain().filter( function( attachment ) {
			return ! _.isUndefined( attachment.id );
		}).map( function( attachment, index ) {
			// Indices start at 1.
			index = index + 1;
			attachment.set( 'menuOrder', index );
			return [ attachment.id, index ];
		}).object().value();

		if ( _.isEmpty( attachments ) ) {
			return;
		}

		return wp.media.post( 'save-attachment-order', {
			nonce:       wp.media.model.settings.post.nonce,
			post_id:     wp.media.model.settings.post.id,
			attachments: attachments
		});
	}
},/** @lends wp.media.model.Attachments */{
	/**
	 * A function to compare two attachment models in an attachments collection.
	 *
	 * Used as the default comparator for instances of wp.media.model.Attachments
	 * and its subclasses. @see wp.media.model.Attachments._changeOrderby().
	 *
	 * @param {Backbone.Model} a
	 * @param {Backbone.Model} b
	 * @param {Object} options
	 * @return {number} -1 if the first model should come before the second,
	 *                   0 if they are of the same rank and
	 *                   1 if the first model should come after.
	 */
	comparator: function( a, b, options ) {
		var key   = this.props.get('orderby'),
			order = this.props.get('order') || 'DESC',
			ac    = a.cid,
			bc    = b.cid;

		a = a.get( key );
		b = b.get( key );

		if ( 'date' === key || 'modified' === key ) {
			a = a || new Date();
			b = b || new Date();
		}

		// If `options.ties` is set, don't enforce the `cid` tiebreaker.
		if ( options && options.ties ) {
			ac = bc = null;
		}

		return ( 'DESC' === order ) ? wp.media.compare( a, b, ac, bc ) : wp.media.compare( b, a, bc, ac );
	},
	/** @namespace wp.media.model.Attachments.filters */
	filters: {
		/**
		 * @static
		 * Note that this client-side searching is *not* equivalent
		 * to our server-side searching.
		 *
		 * @param {wp.media.model.Attachment} attachment
		 *
		 * @this wp.media.model.Attachments
		 *
		 * @return {Boolean}
		 */
		search: function( attachment ) {
			if ( ! this.props.get('search') ) {
				return true;
			}

			return _.any(['title','filename','description','caption','name'], function( key ) {
				var value = attachment.get( key );
				return value && -1 !== value.search( this.props.get('search') );
			}, this );
		},
		/**
		 * @static
		 * @param {wp.media.model.Attachment} attachment
		 *
		 * @this wp.media.model.Attachments
		 *
		 * @return {boolean}
		 */
		type: function( attachment ) {
			var type = this.props.get('type'), atts = attachment.toJSON(), mime, found;

			if ( ! type || ( _.isArray( type ) && ! type.length ) ) {
				return true;
			}

			mime = atts.mime || ( atts.file && atts.file.type ) || '';

			if ( _.isArray( type ) ) {
				found = _.find( type, function (t) {
					return -1 !== mime.indexOf( t );
				} );
			} else {
				found = -1 !== mime.indexOf( type );
			}

			return found;
		},
		/**
		 * @static
		 * @param {wp.media.model.Attachment} attachment
		 *
		 * @this wp.media.model.Attachments
		 *
		 * @return {boolean}
		 */
		uploadedTo: function( attachment ) {
			var uploadedTo = this.props.get('uploadedTo');
			if ( _.isUndefined( uploadedTo ) ) {
				return true;
			}

			return uploadedTo === attachment.get('uploadedTo');
		},
		/**
		 * @static
		 * @param {wp.media.model.Attachment} attachment
		 *
		 * @this wp.media.model.Attachments
		 *
		 * @return {boolean}
		 */
		status: function( attachment ) {
			var status = this.props.get('status');
			if ( _.isUndefined( status ) ) {
				return true;
			}

			return status === attachment.get('status');
		}
	}
});

module.exports = Attachments;


/***/ },

/***/ 9104
(module) {

/**
 * wp.media.model.PostImage
 *
 * An instance of an image that's been embedded into a post.
 *
 * Used in the embedded image attachment display settings modal - @see wp.media.view.MediaFrame.ImageDetails.
 *
 * @memberOf wp.media.model
 *
 * @class
 * @augments Backbone.Model
 *
 * @param {int} [attributes]               Initial model attributes.
 * @param {int} [attributes.attachment_id] ID of the attachment.
 **/
var PostImage = Backbone.Model.extend(/** @lends wp.media.model.PostImage.prototype */{

	initialize: function( attributes ) {
		var Attachment = wp.media.model.Attachment;
		this.attachment = false;

		if ( attributes.attachment_id ) {
			this.attachment = Attachment.get( attributes.attachment_id );
			if ( this.attachment.get( 'url' ) ) {
				this.dfd = jQuery.Deferred();
				this.dfd.resolve();
			} else {
				this.dfd = this.attachment.fetch();
			}
			this.bindAttachmentListeners();
		}

		// Keep URL in sync with changes to the type of link.
		this.on( 'change:link', this.updateLinkUrl, this );
		this.on( 'change:size', this.updateSize, this );

		this.setLinkTypeFromUrl();
		this.setAspectRatio();

		this.set( 'originalUrl', attributes.url );
	},

	bindAttachmentListeners: function() {
		this.listenTo( this.attachment, 'sync', this.setLinkTypeFromUrl );
		this.listenTo( this.attachment, 'sync', this.setAspectRatio );
		this.listenTo( this.attachment, 'change', this.updateSize );
	},

	changeAttachment: function( attachment, props ) {
		this.stopListening( this.attachment );
		this.attachment = attachment;
		this.bindAttachmentListeners();

		this.set( 'attachment_id', this.attachment.get( 'id' ) );
		this.set( 'caption', this.attachment.get( 'caption' ) );
		this.set( 'alt', this.attachment.get( 'alt' ) );
		this.set( 'size', props.get( 'size' ) );
		this.set( 'align', props.get( 'align' ) );
		this.set( 'link', props.get( 'link' ) );
		this.updateLinkUrl();
		this.updateSize();
	},

	setLinkTypeFromUrl: function() {
		var linkUrl = this.get( 'linkUrl' ),
			type;

		if ( ! linkUrl ) {
			this.set( 'link', 'none' );
			return;
		}

		// Default to custom if there is a linkUrl.
		type = 'custom';

		if ( this.attachment ) {
			if ( this.attachment.get( 'url' ) === linkUrl ) {
				type = 'file';
			} else if ( this.attachment.get( 'link' ) === linkUrl ) {
				type = 'post';
			}
		} else {
			if ( this.get( 'url' ) === linkUrl ) {
				type = 'file';
			}
		}

		this.set( 'link', type );
	},

	updateLinkUrl: function() {
		var link = this.get( 'link' ),
			url;

		switch( link ) {
			case 'file':
				if ( this.attachment ) {
					url = this.attachment.get( 'url' );
				} else {
					url = this.get( 'url' );
				}
				this.set( 'linkUrl', url );
				break;
			case 'post':
				this.set( 'linkUrl', this.attachment.get( 'link' ) );
				break;
			case 'none':
				this.set( 'linkUrl', '' );
				break;
		}
	},

	updateSize: function() {
		var size;

		if ( ! this.attachment ) {
			return;
		}

		if ( this.get( 'size' ) === 'custom' ) {
			this.set( 'width', this.get( 'customWidth' ) );
			this.set( 'height', this.get( 'customHeight' ) );
			this.set( 'url', this.get( 'originalUrl' ) );
			return;
		}

		size = this.attachment.get( 'sizes' )[ this.get( 'size' ) ];

		if ( ! size ) {
			return;
		}

		this.set( 'url', size.url );
		this.set( 'width', size.width );
		this.set( 'height', size.height );
	},

	setAspectRatio: function() {
		var full;

		if ( this.attachment && this.attachment.get( 'sizes' ) ) {
			full = this.attachment.get( 'sizes' ).full;

			if ( full ) {
				this.set( 'aspectRatio', full.width / full.height );
				return;
			}
		}

		this.set( 'aspectRatio', this.get( 'customWidth' ) / this.get( 'customHeight' ) );
	}
});

module.exports = PostImage;


/***/ },

/***/ 1288
(module) {

var Attachments = wp.media.model.Attachments,
	Query;

/**
 * wp.media.model.Query
 *
 * A collection of attachments that match the supplied query arguments.
 *
 * Note: Do NOT change this.args after the query has been initialized.
 *       Things will break.
 *
 * @memberOf wp.media.model
 *
 * @class
 * @augments wp.media.model.Attachments
 * @augments Backbone.Collection
 *
 * @param {array}  [models]                      Models to initialize with the collection.
 * @param {object} [options]                     Options hash.
 * @param {object} [options.args]                Attachments query arguments.
 * @param {object} [options.args.posts_per_page]
 */
Query = Attachments.extend(/** @lends wp.media.model.Query.prototype */{
	/**
	 * @param {Array}  [models=[]]  Array of initial models to populate the collection.
	 * @param {Object} [options={}]
	 */
	initialize: function( models, options ) {
		var allowed;

		options = options || {};
		Attachments.prototype.initialize.apply( this, arguments );

		this.args     = options.args;
		this._hasMore = true;
		this.created  = new Date();

		this.filters.order = function( attachment ) {
			var orderby = this.props.get('orderby'),
				order = this.props.get('order');

			if ( ! this.comparator ) {
				return true;
			}

			/*
			 * We want any items that can be placed before the last
			 * item in the set. If we add any items after the last
			 * item, then we can't guarantee the set is complete.
			 */
			if ( this.length ) {
				return 1 !== this.comparator( attachment, this.last(), { ties: true });

			/*
			 * Handle the case where there are no items yet and
			 * we're sorting for recent items. In that case, we want
			 * changes that occurred after we created the query.
			 */
			} else if ( 'DESC' === order && ( 'date' === orderby || 'modified' === orderby ) ) {
				return attachment.get( orderby ) >= this.created;

			// If we're sorting by menu order and we have no items,
			// accept any items that have the default menu order (0).
			} else if ( 'ASC' === order && 'menuOrder' === orderby ) {
				return attachment.get( orderby ) === 0;
			}

			// Otherwise, we don't want any items yet.
			return false;
		};

		/*
		 * Observe the central `wp.Uploader.queue` collection to watch for
		 * new matches for the query.
		 *
		 * Only observe when a limited number of query args are set. There
		 * are no filters for other properties, so observing will result in
		 * false positives in those queries.
		 */
		allowed = [ 's', 'order', 'orderby', 'posts_per_page', 'post_mime_type', 'post_parent', 'author' ];
		if ( wp.Uploader && _( this.args ).chain().keys().difference( allowed ).isEmpty().value() ) {
			this.observe( wp.Uploader.queue );
		}
	},
	/**
	 * Whether there are more attachments that haven't been sync'd from the server
	 * that match the collection's query.
	 *
	 * @return {boolean}
	 */
	hasMore: function() {
		return this._hasMore;
	},
	/**
	 * Fetch more attachments from the server for the collection.
	 *
	 * @param {Object} [options={}]
	 * @return {Promise}
	 */
	more: function( options ) {
		var query = this;

		// If there is already a request pending, return early with the Deferred object.
		if ( this._more && 'pending' === this._more.state() ) {
			return this._more;
		}

		if ( ! this.hasMore() ) {
			return jQuery.Deferred().resolveWith( this ).promise();
		}

		options = options || {};
		options.remove = false;

		return this._more = this.fetch( options ).done( function( response ) {
			if ( _.isEmpty( response ) || -1 === query.args.posts_per_page || response.length < query.args.posts_per_page ) {
				query._hasMore = false;
			}
		});
	},
	/**
	 * Overrides Backbone.Collection.sync
	 * Overrides wp.media.model.Attachments.sync
	 *
	 * @param {string} method
	 * @param {Backbone.Model} model
	 * @param {Object} [options={}]
	 * @return {Promise}
	 */
	sync: function( method, model, options ) {
		var args, fallback;

		// Overload the read method so Attachment.fetch() functions correctly.
		if ( 'read' === method ) {
			options = options || {};
			options.context = this;
			options.data = _.extend( options.data || {}, {
				action:  'query-attachments',
				post_id: wp.media.model.settings.post.id
			});

			// Clone the args so manipulation is non-destructive.
			args = _.clone( this.args );

			// Determine which page to query.
			if ( -1 !== args.posts_per_page ) {
				args.paged = Math.round( this.length / args.posts_per_page ) + 1;
			}

			options.data.query = args;
			return wp.media.ajax( options );

		// Otherwise, fall back to `Backbone.sync()`.
		} else {
			/**
			 * Call wp.media.model.Attachments.sync or Backbone.sync
			 */
			fallback = Attachments.prototype.sync ? Attachments.prototype : Backbone;
			return fallback.sync.apply( this, arguments );
		}
	}
}, /** @lends wp.media.model.Query */{
	/**
	 * @readonly
	 */
	defaultProps: {
		orderby: 'date',
		order:   'DESC'
	},
	/**
	 * @readonly
	 */
	defaultArgs: {
		posts_per_page: 80
	},
	/**
	 * @readonly
	 */
	orderby: {
		allowed:  [ 'name', 'author', 'date', 'title', 'modified', 'uploadedTo', 'id', 'post__in', 'menuOrder' ],
		/**
		 * A map of JavaScript orderby values to their WP_Query equivalents.
		 * @type {Object}
		 */
		valuemap: {
			'id':         'ID',
			'uploadedTo': 'parent',
			'menuOrder':  'menu_order ID'
		}
	},
	/**
	 * A map of JavaScript query properties to their WP_Query equivalents.
	 *
	 * @readonly
	 */
	propmap: {
		'search':		's',
		'type':			'post_mime_type',
		'perPage':		'posts_per_page',
		'menuOrder':	'menu_order',
		'uploadedTo':	'post_parent',
		'status':		'post_status',
		'include':		'post__in',
		'exclude':		'post__not_in',
		'author':		'author'
	},
	/**
	 * Creates and returns an Attachments Query collection given the properties.
	 *
	 * Caches query objects and reuses where possible.
	 *
	 * @static
	 * @method
	 *
	 * @param {object} [props]
	 * @param {Object} [props.order]
	 * @param {Object} [props.orderby]
	 * @param {Object} [props.include]
	 * @param {Object} [props.exclude]
	 * @param {Object} [props.s]
	 * @param {Object} [props.post_mime_type]
	 * @param {Object} [props.posts_per_page]
	 * @param {Object} [props.menu_order]
	 * @param {Object} [props.post_parent]
	 * @param {Object} [props.post_status]
	 * @param {Object} [props.author]
	 * @param {Object} [options]
	 *
	 * @return {wp.media.model.Query} A new Attachments Query collection.
	 */
	get: (function(){
		/**
		 * @static
		 * @type Array
		 */
		var queries = [];

		/**
		 * @return {Query}
		 */
		return function( props, options ) {
			var args     = {},
				orderby  = Query.orderby,
				defaults = Query.defaultProps,
				query;

			// Remove the `query` property. This isn't linked to a query,
			// this *is* the query.
			delete props.query;

			// Fill default args.
			_.defaults( props, defaults );

			// Normalize the order.
			props.order = props.order.toUpperCase();
			if ( 'DESC' !== props.order && 'ASC' !== props.order ) {
				props.order = defaults.order.toUpperCase();
			}

			// Ensure we have a valid orderby value.
			if ( ! _.contains( orderby.allowed, props.orderby ) ) {
				props.orderby = defaults.orderby;
			}

			_.each( [ 'include', 'exclude' ], function( prop ) {
				if ( props[ prop ] && ! _.isArray( props[ prop ] ) ) {
					props[ prop ] = [ props[ prop ] ];
				}
			} );

			// Generate the query `args` object.
			// Correct any differing property names.
			_.each( props, function( value, prop ) {
				if ( _.isNull( value ) ) {
					return;
				}

				args[ Query.propmap[ prop ] || prop ] = value;
			});

			// Fill any other default query args.
			_.defaults( args, Query.defaultArgs );

			// `props.orderby` does not always map directly to `args.orderby`.
			// Substitute exceptions specified in orderby.keymap.
			args.orderby = orderby.valuemap[ props.orderby ] || props.orderby;

			queries = [];

			// Otherwise, create a new query and add it to the cache.
			if ( ! query ) {
				query = new Query( [], _.extend( options || {}, {
					props: props,
					args:  args
				} ) );
				queries.push( query );
			}

			return query;
		};
	}())
});

module.exports = Query;


/***/ },

/***/ 4134
(module) {

var Attachments = wp.media.model.Attachments,
	Selection;

/**
 * wp.media.model.Selection
 *
 * A selection of attachments.
 *
 * @memberOf wp.media.model
 *
 * @class
 * @augments wp.media.model.Attachments
 * @augments Backbone.Collection
 */
Selection = Attachments.extend(/** @lends wp.media.model.Selection.prototype */{
	/**
	 * Refresh the `single` model whenever the selection changes.
	 * Binds `single` instead of using the context argument to ensure
	 * it receives no parameters.
	 *
	 * @param {Array} [models=[]] Array of models used to populate the collection.
	 * @param {Object} [options={}]
	 */
	initialize: function( models, options ) {
		/**
		 * call 'initialize' directly on the parent class
		 */
		Attachments.prototype.initialize.apply( this, arguments );
		this.multiple = options && options.multiple;

		this.on( 'add remove reset', _.bind( this.single, this, false ) );
	},

	/**
	 * If the workflow does not support multi-select, clear out the selection
	 * before adding a new attachment to it.
	 *
	 * @param {Array} models
	 * @param {Object} options
	 * @return {wp.media.model.Attachment[]}
	 */
	add: function( models, options ) {
		if ( ! this.multiple ) {
			this.remove( this.models );
		}
		/**
		 * call 'add' directly on the parent class
		 */
		return Attachments.prototype.add.call( this, models, options );
	},

	/**
	 * Fired when toggling (clicking on) an attachment in the modal.
	 *
	 * @param {undefined|boolean|wp.media.model.Attachment} model
	 *
	 * @fires wp.media.model.Selection#selection:single
	 * @fires wp.media.model.Selection#selection:unsingle
	 *
	 * @return {Backbone.Model}
	 */
	single: function( model ) {
		var previous = this._single;

		// If a `model` is provided, use it as the single model.
		if ( model ) {
			this._single = model;
		}
		// If the single model isn't in the selection, remove it.
		if ( this._single && ! this.get( this._single.cid ) ) {
			delete this._single;
		}

		this._single = this._single || this.last();

		// If single has changed, fire an event.
		if ( this._single !== previous ) {
			if ( previous ) {
				previous.trigger( 'selection:unsingle', previous, this );

				// If the model was already removed, trigger the collection
				// event manually.
				if ( ! this.get( previous.cid ) ) {
					this.trigger( 'selection:unsingle', previous, this );
				}
			}
			if ( this._single ) {
				this._single.trigger( 'selection:single', this._single, this );
			}
		}

		// Return the single model, or the last model as a fallback.
		return this._single;
	}
});

module.exports = Selection;


/***/ }

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/**
 * @output wp-includes/js/media-models.js
 */

var Attachment, Attachments, l10n, media;

/** @namespace wp */
window.wp = window.wp || {};

/**
 * Create and return a media frame.
 *
 * Handles the default media experience.
 *
 * @alias wp.media
 * @memberOf wp
 * @namespace
 *
 * @param {Object} attributes The properties passed to the main media controller.
 * @return {wp.media.view.MediaFrame} A media workflow.
 */
media = wp.media = function( attributes ) {
	var MediaFrame = media.view.MediaFrame,
		frame;

	if ( ! MediaFrame ) {
		return;
	}

	attributes = _.defaults( attributes || {}, {
		frame: 'select'
	});

	if ( 'select' === attributes.frame && MediaFrame.Select ) {
		frame = new MediaFrame.Select( attributes );
	} else if ( 'post' === attributes.frame && MediaFrame.Post ) {
		frame = new MediaFrame.Post( attributes );
	} else if ( 'manage' === attributes.frame && MediaFrame.Manage ) {
		frame = new MediaFrame.Manage( attributes );
	} else if ( 'image' === attributes.frame && MediaFrame.ImageDetails ) {
		frame = new MediaFrame.ImageDetails( attributes );
	} else if ( 'audio' === attributes.frame && MediaFrame.AudioDetails ) {
		frame = new MediaFrame.AudioDetails( attributes );
	} else if ( 'video' === attributes.frame && MediaFrame.VideoDetails ) {
		frame = new MediaFrame.VideoDetails( attributes );
	} else if ( 'edit-attachments' === attributes.frame && MediaFrame.EditAttachments ) {
		frame = new MediaFrame.EditAttachments( attributes );
	}

	delete attributes.frame;

	media.frame = frame;

	return frame;
};

/** @namespace wp.media.model */
/** @namespace wp.media.view */
/** @namespace wp.media.controller */
/** @namespace wp.media.frames */
_.extend( media, { model: {}, view: {}, controller: {}, frames: {} });

// Link any localized strings.
l10n = media.model.l10n = window._wpMediaModelsL10n || {};

// Link any settings.
media.model.settings = l10n.settings || {};
delete l10n.settings;

Attachment = media.model.Attachment = __webpack_require__( 3343 );
Attachments = media.model.Attachments = __webpack_require__( 8266 );

media.model.Query = __webpack_require__( 1288 );
media.model.PostImage = __webpack_require__( 9104 );
media.model.Selection = __webpack_require__( 4134 );

/**
 * ========================================================================
 * UTILITIES
 * ========================================================================
 */

/**
 * A basic equality comparator for Backbone models.
 *
 * Used to order models within a collection - @see wp.media.model.Attachments.comparator().
 *
 * @param {mixed}  a  The primary parameter to compare.
 * @param {mixed}  b  The primary parameter to compare.
 * @param {string} ac The fallback parameter to compare, a's cid.
 * @param {string} bc The fallback parameter to compare, b's cid.
 * @return {number} -1: a should come before b.
 *                   0: a and b are of the same rank.
 *                   1: b should come before a.
 */
media.compare = function( a, b, ac, bc ) {
	if ( _.isEqual( a, b ) ) {
		return ac === bc ? 0 : (ac > bc ? -1 : 1);
	} else {
		return a > b ? -1 : 1;
	}
};

_.extend( media, /** @lends wp.media */{
	/**
	 * media.template( id )
	 *
	 * Fetch a JavaScript template for an id, and return a templating function for it.
	 *
	 * See wp.template() in `wp-includes/js/wp-util.js`.
	 *
	 * @borrows wp.template as template
	 */
	template: wp.template,

	/**
	 * media.post( [action], [data] )
	 *
	 * Sends a POST request to WordPress.
	 * See wp.ajax.post() in `wp-includes/js/wp-util.js`.
	 *
	 * @borrows wp.ajax.post as post
	 */
	post: wp.ajax.post,

	/**
	 * media.ajax( [action], [options] )
	 *
	 * Sends an XHR request to WordPress.
	 * See wp.ajax.send() in `wp-includes/js/wp-util.js`.
	 *
	 * @borrows wp.ajax.send as ajax
	 */
	ajax: wp.ajax.send,

	/**
	 * Scales a set of dimensions to fit within bounding dimensions.
	 *
	 * @param {Object} dimensions
	 * @return {Object}
	 */
	fit: function( dimensions ) {
		var width     = dimensions.width,
			height    = dimensions.height,
			maxWidth  = dimensions.maxWidth,
			maxHeight = dimensions.maxHeight,
			constraint;

		/*
		 * Compare ratios between the two values to determine
		 * which max to constrain by. If a max value doesn't exist,
		 * then the opposite side is the constraint.
		 */
		if ( ! _.isUndefined( maxWidth ) && ! _.isUndefined( maxHeight ) ) {
			constraint = ( width / height > maxWidth / maxHeight ) ? 'width' : 'height';
		} else if ( _.isUndefined( maxHeight ) ) {
			constraint = 'width';
		} else if (  _.isUndefined( maxWidth ) && height > maxHeight ) {
			constraint = 'height';
		}

		// If the value of the constrained side is larger than the max,
		// then scale the values. Otherwise return the originals; they fit.
		if ( 'width' === constraint && width > maxWidth ) {
			return {
				width : maxWidth,
				height: Math.round( maxWidth * height / width )
			};
		} else if ( 'height' === constraint && height > maxHeight ) {
			return {
				width : Math.round( maxHeight * width / height ),
				height: maxHeight
			};
		} else {
			return {
				width : width,
				height: height
			};
		}
	},
	/**
	 * Truncates a string by injecting an ellipsis into the middle.
	 * Useful for filenames.
	 *
	 * @param {string} string
	 * @param {number} [length=30]
	 * @param {string} [replacement=&hellip;]
	 * @return {string} The string, unless length is greater than string.length.
	 */
	truncate: function( string, length, replacement ) {
		length = length || 30;
		replacement = replacement || '&hellip;';

		if ( string.length <= length ) {
			return string;
		}

		return string.substr( 0, length / 2 ) + replacement + string.substr( -1 * length / 2 );
	}
});

/**
 * ========================================================================
 * MODELS
 * ========================================================================
 */
/**
 * wp.media.attachment
 *
 * @static
 * @param {string} id A string used to identify a model.
 * @return {wp.media.model.Attachment}
 */
media.attachment = function( id ) {
	return Attachment.get( id );
};

/**
 * A collection of all attachments that have been fetched from the server.
 *
 * @static
 * @member {wp.media.model.Attachments}
 */
Attachments.all = new Attachments();

/**
 * wp.media.query
 *
 * Shorthand for creating a new Attachments Query.
 *
 * @param {Object} [props]
 * @return {wp.media.model.Attachments}
 */
media.query = function( props ) {
	return new Attachments( null, {
		props: _.extend( _.defaults( props || {}, { orderby: 'date' } ), { query: true } )
	});
};

/******/ })()
;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        media-models.min.js                                                                                 0000644                 00000031737 15212564043 0010241 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
(()=>{var e,i,t,s,r={3343(t){var n=Backbone.$,e=Backbone.Model.extend({sync:function(t,e,i){return _.isUndefined(this.id)?n.Deferred().rejectWith(this).promise():"read"===t?((i=i||{}).context=this,i.data=_.extend(i.data||{},{action:"get-attachment",id:this.id}),wp.media.ajax(i)):"update"===t?this.get("nonces")&&this.get("nonces").update?((i=i||{}).context=this,i.data=_.extend(i.data||{},{action:"save-attachment",id:this.id,nonce:this.get("nonces").update,post_id:wp.media.model.settings.post.id}),e.hasChanged()&&(i.data.changes={},_.each(e.changed,function(t,e){i.data.changes[e]=this.get(e)},this)),wp.media.ajax(i)):n.Deferred().rejectWith(this).promise():"delete"===t?((i=i||{}).wait||(this.destroyed=!0),i.context=this,i.data=_.extend(i.data||{},{action:"delete-post",id:this.id,_wpnonce:this.get("nonces").delete}),wp.media.ajax(i).done(function(){this.destroyed=!0}).fail(function(){this.destroyed=!1})):Backbone.Model.prototype.sync.apply(this,arguments)},parse:function(t){return t&&(t.date=new Date(t.date),t.modified=new Date(t.modified)),t},saveCompat:function(t,s){var r=this;return this.get("nonces")&&this.get("nonces").update?wp.media.post("save-attachment-compat",_.defaults({id:this.id,nonce:this.get("nonces").update,post_id:wp.media.model.settings.post.id},t)).done(function(t,e,i){r.set(r.parse(t,i),s)}):n.Deferred().rejectWith(this).promise()}},{create:function(t){return wp.media.model.Attachments.all.push(t)},get:_.memoize(function(t,e){return wp.media.model.Attachments.all.push(e||{id:t})})});t.exports=e},8266(t){var n=Backbone.Collection.extend({model:wp.media.model.Attachment,initialize:function(t,e){e=e||{},this.props=new Backbone.Model,this.filters=e.filters||{},this.props.on("change",this._changeFilteredProps,this),this.props.on("change:order",this._changeOrder,this),this.props.on("change:orderby",this._changeOrderby,this),this.props.on("change:query",this._changeQuery,this),this.props.set(_.defaults(e.props||{})),e.observe&&this.observe(e.observe)},_changeOrder:function(){this.comparator&&this.sort()},_changeOrderby:function(t,e){this.comparator&&this.comparator!==n.comparator||(e&&"post__in"!==e?this.comparator=n.comparator:delete this.comparator)},_changeQuery:function(t,e){e?(this.props.on("change",this._requery,this),this._requery()):this.props.off("change",this._requery,this)},_changeFilteredProps:function(r){this.props.get("query")||_.chain(r.changed).map(function(t,e){var i=n.filters[e],s=r.get(e);if(i){if(s&&!this.filters[e])this.filters[e]=i;else{if(s||this.filters[e]!==i)return;delete this.filters[e]}return!0}},this).any().value()&&(this._source||(this._source=new n(this.models)),this.reset(this._source.filter(this.validator,this)))},validateDestroyed:!1,validator:function(e){return!(!this.validateDestroyed&&e.destroyed)&&_.all(this.filters,function(t){return!!t.call(this,e)},this)},validate:function(t,e){var i=this.validator(t),s=!!this.get(t.cid);return!i&&s?this.remove(t,e):i&&!s&&this.add(t,e),this},validateAll:function(t,e){return e=e||{},_.each(t.models,function(t){this.validate(t,{silent:!0})},this),e.silent||this.trigger("reset",this,e),this},observe:function(t){return this.observers=this.observers||[],this.observers.push(t),t.on("add change remove",this._validateHandler,this),t.on("add",this._addToTotalAttachments,this),t.on("remove",this._removeFromTotalAttachments,this),t.on("reset",this._validateAllHandler,this),this.validateAll(t),this},unobserve:function(t){return t?(t.off(null,null,this),this.observers=_.without(this.observers,t)):(_.each(this.observers,function(t){t.off(null,null,this)},this),delete this.observers),this},_removeFromTotalAttachments:function(){this.mirroring&&(this.mirroring.totalAttachments=this.mirroring.totalAttachments-1)},_addToTotalAttachments:function(){this.mirroring&&(this.mirroring.totalAttachments=this.mirroring.totalAttachments+1)},_validateHandler:function(t,e,i){return i=e===this.mirroring?i:{silent:i&&i.silent},this.validate(t,i)},_validateAllHandler:function(t,e){return this.validateAll(t,e)},mirror:function(t){return this.mirroring&&this.mirroring===t||(this.unmirror(),this.mirroring=t,this.reset([],{silent:!0}),this.observe(t),this.trigger("attachments:received",this)),this},unmirror:function(){this.mirroring&&(this.unobserve(this.mirroring),delete this.mirroring)},more:function(t){var e=jQuery.Deferred(),i=this.mirroring,s=this;return(i&&i.more?(i.more(t).done(function(){this===s.mirroring&&e.resolveWith(this),s.trigger("attachments:received",this)}),e):e.resolveWith(this)).promise()},hasMore:function(){return!!this.mirroring&&this.mirroring.hasMore()},totalAttachments:0,getTotalAttachments:function(){return this.mirroring?this.mirroring.totalAttachments:0},parse:function(t,i){return _.isArray(t)||(t=[t]),_.map(t,function(t){var e;return t instanceof Backbone.Model?(e=t.get("id"),t=t.attributes):e=t.id,t=(e=wp.media.model.Attachment.get(e)).parse(t,i),_.isEqual(e.attributes,t)||e.set(t),e})},_requery:function(){var t;this.props.get("query")&&(t=this.props.toJSON(),this.mirror(wp.media.model.Query.get(t)))},saveMenuOrder:function(){if("menuOrder"===this.props.get("orderby")){var t=this.chain().filter(function(t){return!_.isUndefined(t.id)}).map(function(t,e){return t.set("menuOrder",e+=1),[t.id,e]}).object().value();if(!_.isEmpty(t))return wp.media.post("save-attachment-order",{nonce:wp.media.model.settings.post.nonce,post_id:wp.media.model.settings.post.id,attachments:t})}}},{comparator:function(t,e,i){var s=this.props.get("orderby"),r=this.props.get("order")||"DESC",n=t.cid,a=e.cid;return t=t.get(s),e=e.get(s),"date"!==s&&"modified"!==s||(t=t||new Date,e=e||new Date),i&&i.ties&&(n=a=null),"DESC"===r?wp.media.compare(t,e,n,a):wp.media.compare(e,t,a,n)},filters:{search:function(e){return!this.props.get("search")||_.any(["title","filename","description","caption","name"],function(t){t=e.get(t);return t&&-1!==t.search(this.props.get("search"))},this)},type:function(t){var e,i=this.props.get("type"),t=t.toJSON();return!(i&&(!_.isArray(i)||i.length))||(e=t.mime||t.file&&t.file.type||"",_.isArray(i)?_.find(i,function(t){return-1!==e.indexOf(t)}):-1!==e.indexOf(i))},uploadedTo:function(t){var e=this.props.get("uploadedTo");return!!_.isUndefined(e)||e===t.get("uploadedTo")},status:function(t){var e=this.props.get("status");return!!_.isUndefined(e)||e===t.get("status")}}});t.exports=n},9104(t){var e=Backbone.Model.extend({initialize:function(t){var e=wp.media.model.Attachment;this.attachment=!1,t.attachment_id&&(this.attachment=e.get(t.attachment_id),this.attachment.get("url")?(this.dfd=jQuery.Deferred(),this.dfd.resolve()):this.dfd=this.attachment.fetch(),this.bindAttachmentListeners()),this.on("change:link",this.updateLinkUrl,this),this.on("change:size",this.updateSize,this),this.setLinkTypeFromUrl(),this.setAspectRatio(),this.set("originalUrl",t.url)},bindAttachmentListeners:function(){this.listenTo(this.attachment,"sync",this.setLinkTypeFromUrl),this.listenTo(this.attachment,"sync",this.setAspectRatio),this.listenTo(this.attachment,"change",this.updateSize)},changeAttachment:function(t,e){this.stopListening(this.attachment),this.attachment=t,this.bindAttachmentListeners(),this.set("attachment_id",this.attachment.get("id")),this.set("caption",this.attachment.get("caption")),this.set("alt",this.attachment.get("alt")),this.set("size",e.get("size")),this.set("align",e.get("align")),this.set("link",e.get("link")),this.updateLinkUrl(),this.updateSize()},setLinkTypeFromUrl:function(){var t,e=this.get("linkUrl");e?(t="custom",this.attachment?this.attachment.get("url")===e?t="file":this.attachment.get("link")===e&&(t="post"):this.get("url")===e&&(t="file"),this.set("link",t)):this.set("link","none")},updateLinkUrl:function(){var t;switch(this.get("link")){case"file":t=(this.attachment||this).get("url"),this.set("linkUrl",t);break;case"post":this.set("linkUrl",this.attachment.get("link"));break;case"none":this.set("linkUrl","")}},updateSize:function(){var t;this.attachment&&("custom"===this.get("size")?(this.set("width",this.get("customWidth")),this.set("height",this.get("customHeight")),this.set("url",this.get("originalUrl"))):(t=this.attachment.get("sizes")[this.get("size")])&&(this.set("url",t.url),this.set("width",t.width),this.set("height",t.height)))},setAspectRatio:function(){var t;this.attachment&&this.attachment.get("sizes")&&(t=this.attachment.get("sizes").full)?this.set("aspectRatio",t.width/t.height):this.set("aspectRatio",this.get("customWidth")/this.get("customHeight"))}});t.exports=e},1288(t){var a,r=wp.media.model.Attachments,o=r.extend({initialize:function(t,e){var i;e=e||{},r.prototype.initialize.apply(this,arguments),this.args=e.args,this._hasMore=!0,this.created=new Date,this.filters.order=function(t){var e=this.props.get("orderby"),i=this.props.get("order");return!this.comparator||(this.length?1!==this.comparator(t,this.last(),{ties:!0}):"DESC"!==i||"date"!==e&&"modified"!==e?"ASC"===i&&"menuOrder"===e&&0===t.get(e):t.get(e)>=this.created)},i=["s","order","orderby","posts_per_page","post_mime_type","post_parent","author"],wp.Uploader&&_(this.args).chain().keys().difference(i).isEmpty().value()&&this.observe(wp.Uploader.queue)},hasMore:function(){return this._hasMore},more:function(t){var e=this;return this._more&&"pending"===this._more.state()?this._more:this.hasMore()?((t=t||{}).remove=!1,this._more=this.fetch(t).done(function(t){(_.isEmpty(t)||-1===e.args.posts_per_page||t.length<e.args.posts_per_page)&&(e._hasMore=!1)})):jQuery.Deferred().resolveWith(this).promise()},sync:function(t,e,i){var s;return"read"===t?((i=i||{}).context=this,i.data=_.extend(i.data||{},{action:"query-attachments",post_id:wp.media.model.settings.post.id}),-1!==(s=_.clone(this.args)).posts_per_page&&(s.paged=Math.round(this.length/s.posts_per_page)+1),i.data.query=s,wp.media.ajax(i)):(r.prototype.sync?r.prototype:Backbone).sync.apply(this,arguments)}},{defaultProps:{orderby:"date",order:"DESC"},defaultArgs:{posts_per_page:80},orderby:{allowed:["name","author","date","title","modified","uploadedTo","id","post__in","menuOrder"],valuemap:{id:"ID",uploadedTo:"parent",menuOrder:"menu_order ID"}},propmap:{search:"s",type:"post_mime_type",perPage:"posts_per_page",menuOrder:"menu_order",uploadedTo:"post_parent",status:"post_status",include:"post__in",exclude:"post__not_in",author:"author"},get:(a=[],function(e,t){var i,s={},r=o.orderby,n=o.defaultProps;return delete e.query,_.defaults(e,n),e.order=e.order.toUpperCase(),"DESC"!==e.order&&"ASC"!==e.order&&(e.order=n.order.toUpperCase()),_.contains(r.allowed,e.orderby)||(e.orderby=n.orderby),_.each(["include","exclude"],function(t){e[t]&&!_.isArray(e[t])&&(e[t]=[e[t]])}),_.each(e,function(t,e){_.isNull(t)||(s[o.propmap[e]||e]=t)}),_.defaults(s,o.defaultArgs),s.orderby=r.valuemap[e.orderby]||e.orderby,a=[],i||(i=new o([],_.extend(t||{},{props:e,args:s})),a.push(i)),i})});t.exports=o},4134(t){var i=wp.media.model.Attachments,e=i.extend({initialize:function(t,e){i.prototype.initialize.apply(this,arguments),this.multiple=e&&e.multiple,this.on("add remove reset",_.bind(this.single,this,!1))},add:function(t,e){return this.multiple||this.remove(this.models),i.prototype.add.call(this,t,e)},single:function(t){var e=this._single;return t&&(this._single=t),this._single&&!this.get(this._single.cid)&&delete this._single,this._single=this._single||this.last(),this._single!==e&&(e&&(e.trigger("selection:unsingle",e,this),this.get(e.cid)||this.trigger("selection:unsingle",e,this)),this._single)&&this._single.trigger("selection:single",this._single,this),this._single}});t.exports=e}},n={};function a(t){var e=n[t];return void 0!==e||(e=n[t]={exports:{}},r[t](e,e.exports,a)),e.exports}window.wp=window.wp||{},s=wp.media=function(t){var e,i=s.view.MediaFrame;if(i)return"select"===(t=_.defaults(t||{},{frame:"select"})).frame&&i.Select?e=new i.Select(t):"post"===t.frame&&i.Post?e=new i.Post(t):"manage"===t.frame&&i.Manage?e=new i.Manage(t):"image"===t.frame&&i.ImageDetails?e=new i.ImageDetails(t):"audio"===t.frame&&i.AudioDetails?e=new i.AudioDetails(t):"video"===t.frame&&i.VideoDetails?e=new i.VideoDetails(t):"edit-attachments"===t.frame&&i.EditAttachments&&(e=new i.EditAttachments(t)),delete t.frame,s.frame=e},_.extend(s,{model:{},view:{},controller:{},frames:{}}),t=s.model.l10n=window._wpMediaModelsL10n||{},s.model.settings=t.settings||{},delete t.settings,e=s.model.Attachment=a(3343),i=s.model.Attachments=a(8266),s.model.Query=a(1288),s.model.PostImage=a(9104),s.model.Selection=a(4134),s.compare=function(t,e,i,s){return _.isEqual(t,e)?i===s?0:s<i?-1:1:e<t?-1:1},_.extend(s,{template:wp.template,post:wp.ajax.post,ajax:wp.ajax.send,fit:function(t){var e,i=t.width,s=t.height,r=t.maxWidth,t=t.maxHeight;return _.isUndefined(r)||_.isUndefined(t)?_.isUndefined(t)?e="width":_.isUndefined(r)&&t<s&&(e="height"):e=r/t<i/s?"width":"height","width"===e&&r<i?{width:r,height:Math.round(r*s/i)}:"height"===e&&t<s?{width:Math.round(t*i/s),height:t}:{width:i,height:s}},truncate:function(t,e,i){return i=i||"&hellip;",t.length<=(e=e||30)?t:t.substr(0,e/2)+i+t.substr(-1*e/2)}}),s.attachment=function(t){return e.get(t)},i.all=new i,s.query=function(t){return new i(null,{props:_.extend(_.defaults(t||{},{orderby:"date"}),{query:!0})})}})();                                 media-views.js                                                                                      0000644                 00001024770 15212564043 0007331 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ 7145
(module) {

var Selection = wp.media.model.Selection,
	Library = wp.media.controller.Library,
	CollectionAdd;

/**
 * wp.media.controller.CollectionAdd
 *
 * A state for adding attachments to a collection (e.g. video playlist).
 *
 * @memberOf wp.media.controller
 *
 * @class
 * @augments wp.media.controller.Library
 * @augments wp.media.controller.State
 * @augments Backbone.Model
 *
 * @param {object}                     [attributes]                         The attributes hash passed to the state.
 * @param {string}                     [attributes.id=library]              Unique identifier.
 * @param {string}                     attributes.title                     Title for the state. Displays in the frame's title region.
 * @param {boolean|string}             [attributes.multiple=add]            Whether multi-select is enabled. Accepts 'add' or true.
 *                                                                          When set to true, requires Shift or Cmd/Ctrl to select multiple items.
 *                                                                          When set to 'add', allows selecting multiple items by clicking thumbnails.
 * @param {wp.media.model.Attachments} [attributes.library]                 The attachments collection to browse.
 *                                                                          If one is not supplied, a collection of attachments of the specified type will be created.
 * @param {boolean|string}             [attributes.filterable=uploaded]     Whether the library is filterable, and if so what filters should be shown.
 *                                                                          Accepts 'all', 'uploaded', or 'unattached'.
 * @param {string}                     [attributes.menu=gallery]            Initial mode for the menu region.
 * @param {string}                     [attributes.content=upload]          Initial mode for the content region.
 *                                                                          Overridden by persistent user setting if 'contentUserSetting' is true.
 * @param {string}                     [attributes.router=browse]           Initial mode for the router region.
 * @param {string}                     [attributes.toolbar=gallery-add]     Initial mode for the toolbar region.
 * @param {boolean}                    [attributes.searchable=true]         Whether the library is searchable.
 * @param {boolean}                    [attributes.sortable=true]           Whether the Attachments should be sortable. Depends on the orderby property being set to menuOrder on the attachments collection.
 * @param {boolean}                    [attributes.autoSelect=true]         Whether an uploaded attachment should be automatically added to the selection.
 * @param {boolean}                    [attributes.contentUserSetting=true] Whether the content region's mode should be set and persisted per user.
 * @param {int}                        [attributes.priority=100]            The priority for the state link in the media menu.
 * @param {boolean}                    [attributes.syncSelection=false]     Whether the Attachments selection should be persisted from the last state.
 *                                                                          Defaults to false because for this state, because the library of the Edit Gallery state is the selection.
 * @param {string}                     attributes.type                      The collection's media type. (e.g. 'video').
 * @param {string}                     attributes.collectionType            The collection type. (e.g. 'playlist').
 */
CollectionAdd = Library.extend(/** @lends wp.media.controller.CollectionAdd.prototype */{
	defaults: _.defaults( {
		// Selection defaults. @see media.model.Selection
		multiple:      'add',
		// Attachments browser defaults. @see media.view.AttachmentsBrowser
		filterable:    'uploaded',

		priority:      100,
		syncSelection: false
	}, Library.prototype.defaults ),

	/**
	 * @since 3.9.0
	 */
	initialize: function() {
		var collectionType = this.get('collectionType');

		if ( 'video' === this.get( 'type' ) ) {
			collectionType = 'video-' + collectionType;
		}

		this.set( 'id', collectionType + '-library' );
		this.set( 'toolbar', collectionType + '-add' );
		this.set( 'menu', collectionType );

		// If we haven't been provided a `library`, create a `Selection`.
		if ( ! this.get('library') ) {
			this.set( 'library', wp.media.query({ type: this.get('type') }) );
		}
		Library.prototype.initialize.apply( this, arguments );
	},

	/**
	 * @since 3.9.0
	 */
	activate: function() {
		var library = this.get('library'),
			editLibrary = this.get('editLibrary'),
			edit = this.frame.state( this.get('collectionType') + '-edit' ).get('library');

		if ( editLibrary && editLibrary !== edit ) {
			library.unobserve( editLibrary );
		}

		// Accepts attachments that exist in the original library and
		// that do not exist in gallery's library.
		library.validator = function( attachment ) {
			return !! this.mirroring.get( attachment.cid ) && ! edit.get( attachment.cid ) && Selection.prototype.validator.apply( this, arguments );
		};

		/*
		 * Reset the library to ensure that all attachments are re-added
		 * to the collection. Do so silently, as calling `observe` will
		 * trigger the `reset` event.
		 */
		library.reset( library.mirroring.models, { silent: true });
		library.observe( edit );
		this.set('editLibrary', edit);

		Library.prototype.activate.apply( this, arguments );
	}
});

module.exports = CollectionAdd;


/***/ },

/***/ 8612
(module) {

var Library = wp.media.controller.Library,
	l10n = wp.media.view.l10n,
	$ = jQuery,
	CollectionEdit;

/**
 * wp.media.controller.CollectionEdit
 *
 * A state for editing a collection, which is used by audio and video playlists,
 * and can be used for other collections.
 *
 * @memberOf wp.media.controller
 *
 * @class
 * @augments wp.media.controller.Library
 * @augments wp.media.controller.State
 * @augments Backbone.Model
 *
 * @param {object}                     [attributes]                      The attributes hash passed to the state.
 * @param {string}                     attributes.title                  Title for the state. Displays in the media menu and the frame's title region.
 * @param {wp.media.model.Attachments} [attributes.library]              The attachments collection to edit.
 *                                                                       If one is not supplied, an empty media.model.Selection collection is created.
 * @param {boolean}                    [attributes.multiple=false]       Whether multi-select is enabled.
 * @param {string}                     [attributes.content=browse]       Initial mode for the content region.
 * @param {string}                     attributes.menu                   Initial mode for the menu region. @todo this needs a better explanation.
 * @param {boolean}                    [attributes.searchable=false]     Whether the library is searchable.
 * @param {boolean}                    [attributes.sortable=true]        Whether the Attachments should be sortable. Depends on the orderby property being set to menuOrder on the attachments collection.
 * @param {boolean}                    [attributes.date=true]            Whether to show the date filter in the browser's toolbar.
 * @param {boolean}                    [attributes.describe=true]        Whether to offer UI to describe the attachments - e.g. captioning images in a gallery.
 * @param {boolean}                    [attributes.dragInfo=true]        Whether to show instructional text about the attachments being sortable.
 * @param {boolean}                    [attributes.dragInfoText]         Instructional text about the attachments being sortable.
 * @param {int}                        [attributes.idealColumnWidth=170] The ideal column width in pixels for attachments.
 * @param {boolean}                    [attributes.editing=false]        Whether the gallery is being created, or editing an existing instance.
 * @param {int}                        [attributes.priority=60]          The priority for the state link in the media menu.
 * @param {boolean}                    [attributes.syncSelection=false]  Whether the Attachments selection should be persisted from the last state.
 *                                                                       Defaults to false for this state, because the library passed in  *is* the selection.
 * @param {view}                       [attributes.SettingsView]         The view to edit the collection instance settings (e.g. Playlist settings with "Show tracklist" checkbox).
 * @param {view}                       [attributes.AttachmentView]       The single `Attachment` view to be used in the `Attachments`.
 *                                                                       If none supplied, defaults to wp.media.view.Attachment.EditLibrary.
 * @param {string}                     attributes.type                   The collection's media type. (e.g. 'video').
 * @param {string}                     attributes.collectionType         The collection type. (e.g. 'playlist').
 */
CollectionEdit = Library.extend(/** @lends wp.media.controller.CollectionEdit.prototype */{
	defaults: {
		multiple:         false,
		sortable:         true,
		date:             false,
		searchable:       false,
		content:          'browse',
		describe:         true,
		dragInfo:         true,
		idealColumnWidth: 170,
		editing:          false,
		priority:         60,
		SettingsView:     false,
		syncSelection:    false
	},

	/**
	 * @since 3.9.0
	 */
	initialize: function() {
		var collectionType = this.get('collectionType');

		if ( 'video' === this.get( 'type' ) ) {
			collectionType = 'video-' + collectionType;
		}

		this.set( 'id', collectionType + '-edit' );
		this.set( 'toolbar', collectionType + '-edit' );

		// If we haven't been provided a `library`, create a `Selection`.
		if ( ! this.get('library') ) {
			this.set( 'library', new wp.media.model.Selection() );
		}
		// The single `Attachment` view to be used in the `Attachments` view.
		if ( ! this.get('AttachmentView') ) {
			this.set( 'AttachmentView', wp.media.view.Attachment.EditLibrary );
		}
		Library.prototype.initialize.apply( this, arguments );
	},

	/**
	 * @since 3.9.0
	 */
	activate: function() {
		var library = this.get('library');

		// Limit the library to images only.
		library.props.set( 'type', this.get( 'type' ) );

		// Watch for uploaded attachments.
		this.get('library').observe( wp.Uploader.queue );

		this.frame.on( 'content:render:browse', this.renderSettings, this );

		Library.prototype.activate.apply( this, arguments );
	},

	/**
	 * @since 3.9.0
	 */
	deactivate: function() {
		// Stop watching for uploaded attachments.
		this.get('library').unobserve( wp.Uploader.queue );

		this.frame.off( 'content:render:browse', this.renderSettings, this );

		Library.prototype.deactivate.apply( this, arguments );
	},

	/**
	 * Render the collection embed settings view in the browser sidebar.
	 *
	 * @todo This is against the pattern elsewhere in media. Typically the frame
	 *       is responsible for adding region mode callbacks. Explain.
	 *
	 * @since 3.9.0
	 *
	 * @param {wp.media.view.attachmentsBrowser} The attachments browser view.
	 */
	renderSettings: function( attachmentsBrowserView ) {
		var library = this.get('library'),
			collectionType = this.get('collectionType'),
			dragInfoText = this.get('dragInfoText'),
			SettingsView = this.get('SettingsView'),
			obj = {};

		if ( ! library || ! attachmentsBrowserView ) {
			return;
		}

		library[ collectionType ] = library[ collectionType ] || new Backbone.Model();

		obj[ collectionType ] = new SettingsView({
			controller: this,
			model:      library[ collectionType ],
			priority:   40
		});

		attachmentsBrowserView.sidebar.set( obj );

		if ( dragInfoText ) {
			attachmentsBrowserView.toolbar.set( 'dragInfo', new wp.media.View({
				el: $( '<div class="instructions">' + dragInfoText + '</div>' )[0],
				priority: -40
			}) );
		}

		// Add the 'Reverse order' button to the toolbar.
		attachmentsBrowserView.toolbar.set( 'reverse', {
			text:     l10n.reverseOrder,
			priority: 80,

			click: function() {
				library.reset( library.toArray().reverse() );
			}
		});
	}
});

module.exports = CollectionEdit;


/***/ },

/***/ 5422
(module) {

var l10n = wp.media.view.l10n,
	Cropper;

/**
 * wp.media.controller.Cropper
 *
 * A class for cropping an image when called from the header media customization panel.
 *
 * @memberOf wp.media.controller
 *
 * @class
 * @augments wp.media.controller.State
 * @augments Backbone.Model
 */
Cropper = wp.media.controller.State.extend(/** @lends wp.media.controller.Cropper.prototype */{
	defaults: {
		id:          'cropper',
		title:       l10n.cropImage,
		// Region mode defaults.
		toolbar:     'crop',
		content:     'crop',
		router:      false,
		canSkipCrop: false,

		// Default doCrop Ajax arguments to allow the Customizer (for example) to inject state.
		doCropArgs: {}
	},

	/**
	 * Shows the crop image window when called from the Add new image button.
	 *
	 * @since 4.2.0
	 *
	 * @return {void}
	 */
	activate: function() {
		this.frame.on( 'content:create:crop', this.createCropContent, this );
		this.frame.on( 'close', this.removeCropper, this );
		this.set('selection', new Backbone.Collection(this.frame._selection.single));
	},

	/**
	 * Changes the state of the toolbar window to browse mode.
	 *
	 * @since 4.2.0
	 *
	 * @return {void}
	 */
	deactivate: function() {
		this.frame.toolbar.mode('browse');
	},

	/**
	 * Creates the crop image window.
	 *
	 * Initialized when clicking on the Select and Crop button.
	 *
	 * @since 4.2.0
	 *
	 * @fires crop window
	 *
	 * @return {void}
	 */
	createCropContent: function() {
		this.cropperView = new wp.media.view.Cropper({
			controller: this,
			attachment: this.get('selection').first()
		});
		this.cropperView.on('image-loaded', this.createCropToolbar, this);
		this.frame.content.set(this.cropperView);

	},

	/**
	 * Removes the image selection and closes the cropping window.
	 *
	 * @since 4.2.0
	 *
	 * @return {void}
	 */
	removeCropper: function() {
		this.imgSelect.cancelSelection();
		this.imgSelect.setOptions({remove: true});
		this.imgSelect.update();
		this.cropperView.remove();
	},

	/**
	 * Checks if cropping can be skipped and creates crop toolbar accordingly.
	 *
	 * @since 4.2.0
	 *
	 * @return {void}
	 */
	createCropToolbar: function() {
		var canSkipCrop, hasRequiredAspectRatio, suggestedCropSize, toolbarOptions;

		suggestedCropSize      = this.get( 'suggestedCropSize' );
		hasRequiredAspectRatio = this.get( 'hasRequiredAspectRatio' );
		canSkipCrop            = this.get( 'canSkipCrop' ) || false;

		toolbarOptions = {
			controller: this.frame,
			items: {
				insert: {
					style:    'primary',
					text:     l10n.cropImage,
					priority: 80,
					requires: { library: false, selection: false },

					click: function() {
						var controller = this.controller,
							selection;

						selection = controller.state().get('selection').first();
						selection.set({cropDetails: controller.state().imgSelect.getSelection()});

						this.$el.text(l10n.cropping);
						this.$el.attr('disabled', true);

						controller.state().doCrop( selection ).done( function( croppedImage ) {
							controller.trigger('cropped', croppedImage );
							controller.close();
						}).fail( function() {
							controller.trigger('content:error:crop');
						});
					}
				}
			}
		};

		if ( canSkipCrop || hasRequiredAspectRatio ) {
			_.extend( toolbarOptions.items, {
				skip: {
					style:      'secondary',
					text:       l10n.skipCropping,
					priority:   70,
					requires:   { library: false, selection: false },
					click:      function() {
						var controller = this.controller,
							selection = controller.state().get( 'selection' ).first();

						controller.state().cropperView.remove();

						// Apply the suggested crop size.
						if ( hasRequiredAspectRatio && !canSkipCrop ) {
							selection.set({cropDetails: suggestedCropSize});
							controller.state().doCrop( selection ).done( function( croppedImage ) {
								controller.trigger( 'cropped', croppedImage );
								controller.close();
							}).fail( function() {
								controller.trigger( 'content:error:crop' );
							});
							return;
						}

						// Skip the cropping process.
						controller.trigger( 'skippedcrop', selection );
						controller.close();
					}
				}
			});
		}

		this.frame.toolbar.set( new wp.media.view.Toolbar(toolbarOptions) );
	},

	/**
	 * Creates an object with the image attachment and crop properties.
	 *
	 * @since 4.2.0
	 *
	 * @return {$.promise} A jQuery promise with the custom header crop details.
	 */
	doCrop: function( attachment ) {
		return wp.ajax.post( 'custom-header-crop', _.extend(
			{},
			this.defaults.doCropArgs,
			{
				nonce: attachment.get( 'nonces' ).edit,
				id: attachment.get( 'id' ),
				cropDetails: attachment.get( 'cropDetails' )
			}
		) );
	}
});

module.exports = Cropper;


/***/ },

/***/ 9660
(module) {

var Controller = wp.media.controller,
	CustomizeImageCropper;

/**
 * A state for cropping an image in the customizer.
 *
 * @since 4.3.0
 *
 * @constructs wp.media.controller.CustomizeImageCropper
 * @memberOf wp.media.controller
 * @augments wp.media.controller.CustomizeImageCropper.Cropper
 * @inheritDoc
 */
CustomizeImageCropper = Controller.Cropper.extend(/** @lends wp.media.controller.CustomizeImageCropper.prototype */{
	/**
	 * Posts the crop details to the admin.
	 *
	 * Uses crop measurements when flexible in both directions.
	 * Constrains flexible side based on image ratio and size of the fixed side.
	 *
	 * @since 4.3.0
	 *
	 * @param {Object} attachment The attachment to crop.
	 *
	 * @return {$.promise} A jQuery promise that represents the crop image request.
	 */
	doCrop: function( attachment ) {
		var cropDetails = attachment.get( 'cropDetails' ),
			control = this.get( 'control' ),
			ratio = cropDetails.width / cropDetails.height;

		// Use crop measurements when flexible in both directions.
		if ( control.params.flex_width && control.params.flex_height ) {
			cropDetails.dst_width  = cropDetails.width;
			cropDetails.dst_height = cropDetails.height;

		// Constrain flexible side based on image ratio and size of the fixed side.
		} else {
			cropDetails.dst_width  = control.params.flex_width  ? control.params.height * ratio : control.params.width;
			cropDetails.dst_height = control.params.flex_height ? control.params.width  / ratio : control.params.height;
		}

		return wp.ajax.post( 'crop-image', {
			wp_customize: 'on',
			nonce: attachment.get( 'nonces' ).edit,
			id: attachment.get( 'id' ),
			context: control.id,
			cropDetails: cropDetails
		} );
	}
});

module.exports = CustomizeImageCropper;


/***/ },

/***/ 5663
(module) {

var l10n = wp.media.view.l10n,
	EditImage;

/**
 * wp.media.controller.EditImage
 *
 * A state for editing (cropping, etc.) an image.
 *
 * @memberOf wp.media.controller
 *
 * @class
 * @augments wp.media.controller.State
 * @augments Backbone.Model
 *
 * @param {object}                    attributes                      The attributes hash passed to the state.
 * @param {wp.media.model.Attachment} attributes.model                The attachment.
 * @param {string}                    [attributes.id=edit-image]      Unique identifier.
 * @param {string}                    [attributes.title=Edit Image]   Title for the state. Displays in the media menu and the frame's title region.
 * @param {string}                    [attributes.content=edit-image] Initial mode for the content region.
 * @param {string}                    [attributes.toolbar=edit-image] Initial mode for the toolbar region.
 * @param {string}                    [attributes.menu=false]         Initial mode for the menu region.
 * @param {string}                    [attributes.url]                Unused. @todo Consider removal.
 */
EditImage = wp.media.controller.State.extend(/** @lends wp.media.controller.EditImage.prototype */{
	defaults: {
		id:      'edit-image',
		title:   l10n.editImage,
		menu:    false,
		toolbar: 'edit-image',
		content: 'edit-image',
		url:     ''
	},

	/**
	 * Activates a frame for editing a featured image.
	 *
	 * @since 3.9.0
	 *
	 * @return {void}
	 */
	activate: function() {
		this.frame.on( 'toolbar:render:edit-image', _.bind( this.toolbar, this ) );
	},

	/**
	 * Deactivates a frame for editing a featured image.
	 *
	 * @since 3.9.0
	 *
	 * @return {void}
	 */
	deactivate: function() {
		this.frame.off( 'toolbar:render:edit-image' );
	},

	/**
	 * Adds a toolbar with a back button.
	 *
	 * When the back button is pressed it checks whether there is a previous state.
	 * In case there is a previous state it sets that previous state otherwise it
	 * closes the frame.
	 *
	 * @since 3.9.0
	 *
	 * @return {void}
	 */
	toolbar: function() {
		var frame = this.frame,
			lastState = frame.lastState(),
			previous = lastState && lastState.id;

		frame.toolbar.set( new wp.media.view.Toolbar({
			controller: frame,
			items: {
				back: {
					style: 'primary',
					text:     l10n.back,
					priority: 20,
					click:    function() {
						if ( previous ) {
							frame.setState( previous );
						} else {
							frame.close();
						}
					}
				}
			}
		}) );
	}
});

module.exports = EditImage;


/***/ },

/***/ 4910
(module) {

var l10n = wp.media.view.l10n,
	$ = Backbone.$,
	Embed;

/**
 * wp.media.controller.Embed
 *
 * A state for embedding media from a URL.
 *
 * @memberOf wp.media.controller
 *
 * @class
 * @augments wp.media.controller.State
 * @augments Backbone.Model
 *
 * @param {object} attributes                         The attributes hash passed to the state.
 * @param {string} [attributes.id=embed]              Unique identifier.
 * @param {string} [attributes.title=Insert From URL] Title for the state. Displays in the media menu and the frame's title region.
 * @param {string} [attributes.content=embed]         Initial mode for the content region.
 * @param {string} [attributes.menu=default]          Initial mode for the menu region.
 * @param {string} [attributes.toolbar=main-embed]    Initial mode for the toolbar region.
 * @param {string} [attributes.menu=false]            Initial mode for the menu region.
 * @param {int}    [attributes.priority=120]          The priority for the state link in the media menu.
 * @param {string} [attributes.type=link]             The type of embed. Currently only link is supported.
 * @param {string} [attributes.url]                   The embed URL.
 * @param {object} [attributes.metadata={}]           Properties of the embed, which will override attributes.url if set.
 */
Embed = wp.media.controller.State.extend(/** @lends wp.media.controller.Embed.prototype */{
	defaults: {
		id:       'embed',
		title:    l10n.insertFromUrlTitle,
		content:  'embed',
		menu:     'default',
		toolbar:  'main-embed',
		priority: 120,
		type:     'link',
		url:      '',
		metadata: {}
	},

	// The amount of time used when debouncing the scan.
	sensitivity: 400,

	initialize: function(options) {
		this.metadata = options.metadata;
		this.debouncedScan = _.debounce( _.bind( this.scan, this ), this.sensitivity );
		this.props = new Backbone.Model( this.metadata || { url: '' });
		this.props.on( 'change:url', this.debouncedScan, this );
		this.props.on( 'change:url', this.refresh, this );
		this.on( 'scan', this.scanImage, this );
	},

	/**
	 * Trigger a scan of the embedded URL's content for metadata required to embed.
	 *
	 * @fires wp.media.controller.Embed#scan
	 */
	scan: function() {
		var scanners,
			embed = this,
			attributes = {
				type: 'link',
				scanners: []
			};

		/*
		 * Scan is triggered with the list of `attributes` to set on the
		 * state, useful for the 'type' attribute and 'scanners' attribute,
		 * an array of promise objects for asynchronous scan operations.
		 */
		if ( this.props.get('url') ) {
			this.trigger( 'scan', attributes );
		}

		if ( attributes.scanners.length ) {
			scanners = attributes.scanners = $.when.apply( $, attributes.scanners );
			scanners.always( function() {
				if ( embed.get('scanners') === scanners ) {
					embed.set( 'loading', false );
				}
			});
		} else {
			attributes.scanners = null;
		}

		attributes.loading = !! attributes.scanners;
		this.set( attributes );
	},
	/**
	 * Try scanning the embed as an image to discover its dimensions.
	 *
	 * @param {Object} attributes
	 */
	scanImage: function( attributes ) {
		var frame = this.frame,
			state = this,
			url = this.props.get('url'),
			image = new Image(),
			deferred = $.Deferred();

		attributes.scanners.push( deferred.promise() );

		// Try to load the image and find its width/height.
		image.onload = function() {
			deferred.resolve();

			if ( state !== frame.state() || url !== state.props.get('url') ) {
				return;
			}

			state.set({
				type: 'image'
			});

			state.props.set({
				width:  image.width,
				height: image.height
			});
		};

		image.onerror = deferred.reject;
		image.src = url;
	},

	refresh: function() {
		this.frame.toolbar.get().refresh();
	},

	reset: function() {
		this.props.clear().set({ url: '' });

		if ( this.active ) {
			this.refresh();
		}
	}
});

module.exports = Embed;


/***/ },

/***/ 1169
(module) {

var Attachment = wp.media.model.Attachment,
	Library = wp.media.controller.Library,
	l10n = wp.media.view.l10n,
	FeaturedImage;

/**
 * wp.media.controller.FeaturedImage
 *
 * A state for selecting a featured image for a post.
 *
 * @memberOf wp.media.controller
 *
 * @class
 * @augments wp.media.controller.Library
 * @augments wp.media.controller.State
 * @augments Backbone.Model
 *
 * @param {object}                     [attributes]                          The attributes hash passed to the state.
 * @param {string}                     [attributes.id=featured-image]        Unique identifier.
 * @param {string}                     [attributes.title=Set Featured Image] Title for the state. Displays in the media menu and the frame's title region.
 * @param {wp.media.model.Attachments} [attributes.library]                  The attachments collection to browse.
 *                                                                           If one is not supplied, a collection of all images will be created.
 * @param {boolean}                    [attributes.multiple=false]           Whether multi-select is enabled.
 * @param {string}                     [attributes.content=upload]           Initial mode for the content region.
 *                                                                           Overridden by persistent user setting if 'contentUserSetting' is true.
 * @param {string}                     [attributes.menu=default]             Initial mode for the menu region.
 * @param {string}                     [attributes.router=browse]            Initial mode for the router region.
 * @param {string}                     [attributes.toolbar=featured-image]   Initial mode for the toolbar region.
 * @param {int}                        [attributes.priority=60]              The priority for the state link in the media menu.
 * @param {boolean}                    [attributes.searchable=true]          Whether the library is searchable.
 * @param {boolean|string}             [attributes.filterable=false]         Whether the library is filterable, and if so what filters should be shown.
 *                                                                           Accepts 'all', 'uploaded', or 'unattached'.
 * @param {boolean}                    [attributes.sortable=true]            Whether the Attachments should be sortable. Depends on the orderby property being set to menuOrder on the attachments collection.
 * @param {boolean}                    [attributes.autoSelect=true]          Whether an uploaded attachment should be automatically added to the selection.
 * @param {boolean}                    [attributes.describe=false]           Whether to offer UI to describe attachments - e.g. captioning images in a gallery.
 * @param {boolean}                    [attributes.contentUserSetting=true]  Whether the content region's mode should be set and persisted per user.
 * @param {boolean}                    [attributes.syncSelection=true]       Whether the Attachments selection should be persisted from the last state.
 */
FeaturedImage = Library.extend(/** @lends wp.media.controller.FeaturedImage.prototype */{
	defaults: _.defaults({
		id:            'featured-image',
		title:         l10n.setFeaturedImageTitle,
		multiple:      false,
		filterable:    'uploaded',
		toolbar:       'featured-image',
		priority:      60,
		syncSelection: true
	}, Library.prototype.defaults ),

	/**
	 * @since 3.5.0
	 */
	initialize: function() {
		var library, comparator;

		// If we haven't been provided a `library`, create a `Selection`.
		if ( ! this.get('library') ) {
			this.set( 'library', wp.media.query({ type: 'image' }) );
		}

		Library.prototype.initialize.apply( this, arguments );

		library    = this.get('library');
		comparator = library.comparator;

		// Overload the library's comparator to push items that are not in
		// the mirrored query to the front of the aggregate collection.
		library.comparator = function( a, b ) {
			var aInQuery = !! this.mirroring.get( a.cid ),
				bInQuery = !! this.mirroring.get( b.cid );

			if ( ! aInQuery && bInQuery ) {
				return -1;
			} else if ( aInQuery && ! bInQuery ) {
				return 1;
			} else {
				return comparator.apply( this, arguments );
			}
		};

		// Add all items in the selection to the library, so any featured
		// images that are not initially loaded still appear.
		library.observe( this.get('selection') );
	},

	/**
	 * @since 3.5.0
	 */
	activate: function() {
		this.frame.on( 'open', this.updateSelection, this );

		Library.prototype.activate.apply( this, arguments );
	},

	/**
	 * @since 3.5.0
	 */
	deactivate: function() {
		this.frame.off( 'open', this.updateSelection, this );

		Library.prototype.deactivate.apply( this, arguments );
	},

	/**
	 * @since 3.5.0
	 */
	updateSelection: function() {
		var selection = this.get('selection'),
			id = wp.media.view.settings.post.featuredImageId,
			attachment;

		if ( '' !== id && -1 !== id ) {
			attachment = Attachment.get( id );
			attachment.fetch();
		}

		selection.reset( attachment ? [ attachment ] : [] );
	}
});

module.exports = FeaturedImage;


/***/ },

/***/ 7127
(module) {

var Selection = wp.media.model.Selection,
	Library = wp.media.controller.Library,
	l10n = wp.media.view.l10n,
	GalleryAdd;

/**
 * wp.media.controller.GalleryAdd
 *
 * A state for selecting more images to add to a gallery.
 *
 * @since 3.5.0
 *
 * @class
 * @augments wp.media.controller.Library
 * @augments wp.media.controller.State
 * @augments Backbone.Model
 *
 * @memberof wp.media.controller
 *
 * @param {Object}                     [attributes]                         The attributes hash passed to the state.
 * @param {string}                     [attributes.id=gallery-library]      Unique identifier.
 * @param {string}                     [attributes.title=Add to Gallery]    Title for the state. Displays in the frame's title region.
 * @param {boolean|string}             [attributes.multiple=add]            Whether multi-select is enabled. Accepts 'add' or true.
 *                                                                          When set to true, requires Shift or Cmd/Ctrl to select multiple items.
 *                                                                          When set to 'add', allows selecting multiple items by clicking thumbnails.
 * @param {wp.media.model.Attachments} [attributes.library]                 The attachments collection to browse.
 *                                                                          If one is not supplied, a collection of all images will be created.
 * @param {boolean|string}             [attributes.filterable=uploaded]     Whether the library is filterable, and if so what filters should be shown.
 *                                                                          Accepts 'all', 'uploaded', or 'unattached'.
 * @param {string}                     [attributes.menu=gallery]            Initial mode for the menu region.
 * @param {string}                     [attributes.content=upload]          Initial mode for the content region.
 *                                                                          Overridden by persistent user setting if 'contentUserSetting' is true.
 * @param {string}                     [attributes.router=browse]           Initial mode for the router region.
 * @param {string}                     [attributes.toolbar=gallery-add]     Initial mode for the toolbar region.
 * @param {boolean}                    [attributes.searchable=true]         Whether the library is searchable.
 * @param {boolean}                    [attributes.sortable=true]           Whether the Attachments should be sortable. Depends on the orderby property being set to menuOrder on the attachments collection.
 * @param {boolean}                    [attributes.autoSelect=true]         Whether an uploaded attachment should be automatically added to the selection.
 * @param {boolean}                    [attributes.contentUserSetting=true] Whether the content region's mode should be set and persisted per user.
 * @param {number}                     [attributes.priority=100]            The priority for the state link in the media menu.
 * @param {boolean}                    [attributes.syncSelection=false]     Whether the Attachments selection should be persisted from the last state.
 *                                                                          Defaults to false because for this state, because the library of the Edit Gallery state is the selection.
 */
GalleryAdd = Library.extend(/** @lends wp.media.controller.GalleryAdd.prototype */{
	defaults: _.defaults({
		id:            'gallery-library',
		title:         l10n.addToGalleryTitle,
		multiple:      'add',
		filterable:    'uploaded',
		menu:          'gallery',
		toolbar:       'gallery-add',
		priority:      100,
		syncSelection: false
	}, Library.prototype.defaults ),

	/**
	 * Initializes the library. Creates a library of images if a library isn't supplied.
	 *
	 * @since 3.5.0
	 *
	 * @return {void}
	 */
	initialize: function() {
		if ( ! this.get('library') ) {
			this.set( 'library', wp.media.query({ type: 'image' }) );
		}

		Library.prototype.initialize.apply( this, arguments );
	},

	/**
	 * Activates the library.
	 *
	 * Removes all event listeners if in edit mode. Creates a validator to check an attachment.
	 * Resets library and re-enables event listeners. Activates edit mode. Calls the parent's activate method.
	 *
	 * @since 3.5.0
	 *
	 * @return {void}
	 */
	activate: function() {
		var library = this.get('library'),
			edit    = this.frame.state('gallery-edit').get('library');

		if ( this.editLibrary && this.editLibrary !== edit ) {
			library.unobserve( this.editLibrary );
		}

		/*
		 * Accept attachments that exist in the original library but
		 * that do not exist in gallery's library yet.
		 */
		library.validator = function( attachment ) {
			return !! this.mirroring.get( attachment.cid ) && ! edit.get( attachment.cid ) && Selection.prototype.validator.apply( this, arguments );
		};

		/*
		 * Reset the library to ensure that all attachments are re-added
		 * to the collection. Do so silently, as calling `observe` will
		 * trigger the `reset` event.
		 */
		library.reset( library.mirroring.models, { silent: true });
		library.observe( edit );
		this.editLibrary = edit;

		Library.prototype.activate.apply( this, arguments );
	}
});

module.exports = GalleryAdd;


/***/ },

/***/ 2038
(module) {

var Library = wp.media.controller.Library,
	l10n = wp.media.view.l10n,
	GalleryEdit;

/**
 * wp.media.controller.GalleryEdit
 *
 * A state for editing a gallery's images and settings.
 *
 * @since 3.5.0
 *
 * @class
 * @augments wp.media.controller.Library
 * @augments wp.media.controller.State
 * @augments Backbone.Model
 *
 * @memberOf wp.media.controller
 *
 * @param {Object}                     [attributes]                       The attributes hash passed to the state.
 * @param {string}                     [attributes.id=gallery-edit]       Unique identifier.
 * @param {string}                     [attributes.title=Edit Gallery]    Title for the state. Displays in the frame's title region.
 * @param {wp.media.model.Attachments} [attributes.library]               The collection of attachments in the gallery.
 *                                                                        If one is not supplied, an empty media.model.Selection collection is created.
 * @param {boolean}                    [attributes.multiple=false]        Whether multi-select is enabled.
 * @param {boolean}                    [attributes.searchable=false]      Whether the library is searchable.
 * @param {boolean}                    [attributes.sortable=true]         Whether the Attachments should be sortable. Depends on the orderby property being set to menuOrder on the attachments collection.
 * @param {boolean}                    [attributes.date=true]             Whether to show the date filter in the browser's toolbar.
 * @param {string|false}               [attributes.content=browse]        Initial mode for the content region.
 * @param {string|false}               [attributes.toolbar=image-details] Initial mode for the toolbar region.
 * @param {boolean}                    [attributes.describe=true]         Whether to offer UI to describe attachments - e.g. captioning images in a gallery.
 * @param {boolean}                    [attributes.displaySettings=true]  Whether to show the attachment display settings interface.
 * @param {boolean}                    [attributes.dragInfo=true]         Whether to show instructional text about the attachments being sortable.
 * @param {number}                     [attributes.idealColumnWidth=170]  The ideal column width in pixels for attachments.
 * @param {boolean}                    [attributes.editing=false]         Whether the gallery is being created, or editing an existing instance.
 * @param {number}                     [attributes.priority=60]           The priority for the state link in the media menu.
 * @param {boolean}                    [attributes.syncSelection=false]   Whether the Attachments selection should be persisted from the last state.
 *                                                                        Defaults to false for this state, because the library passed in  *is* the selection.
 * @param {view}                       [attributes.AttachmentView]        The single `Attachment` view to be used in the `Attachments`.
 *                                                                        If none supplied, defaults to wp.media.view.Attachment.EditLibrary.
 */
GalleryEdit = Library.extend(/** @lends wp.media.controller.GalleryEdit.prototype */{
	defaults: {
		id:               'gallery-edit',
		title:            l10n.editGalleryTitle,
		multiple:         false,
		searchable:       false,
		sortable:         true,
		date:             false,
		display:          false,
		content:          'browse',
		toolbar:          'gallery-edit',
		describe:         true,
		displaySettings:  true,
		dragInfo:         true,
		idealColumnWidth: 170,
		editing:          false,
		priority:         60,
		syncSelection:    false
	},

	/**
	 * Initializes the library.
	 *
	 * Creates a selection if a library isn't supplied and creates an attachment
	 * view if no attachment view is supplied.
	 *
	 * @since 3.5.0
	 *
	 * @return {void}
	 */
	initialize: function() {
		// If we haven't been provided a `library`, create a `Selection`.
		if ( ! this.get('library') ) {
			this.set( 'library', new wp.media.model.Selection() );
		}

		// The single `Attachment` view to be used in the `Attachments` view.
		if ( ! this.get('AttachmentView') ) {
			this.set( 'AttachmentView', wp.media.view.Attachment.EditLibrary );
		}

		Library.prototype.initialize.apply( this, arguments );
	},

	/**
	 * Activates the library.
	 *
	 * Limits the library to images, watches for uploaded attachments. Watches for
	 * the browse event on the frame and binds it to gallerySettings.
	 *
	 * @since 3.5.0
	 *
	 * @return {void}
	 */
	activate: function() {
		var library = this.get('library');

		// Limit the library to images only.
		library.props.set( 'type', 'image' );

		// Watch for uploaded attachments.
		this.get('library').observe( wp.Uploader.queue );

		this.frame.on( 'content:render:browse', this.gallerySettings, this );

		Library.prototype.activate.apply( this, arguments );
	},

	/**
	 * Deactivates the library.
	 *
	 * Stops watching for uploaded attachments and browse events.
	 *
	 * @since 3.5.0
	 *
	 * @return {void}
	 */
	deactivate: function() {
		// Stop watching for uploaded attachments.
		this.get('library').unobserve( wp.Uploader.queue );

		this.frame.off( 'content:render:browse', this.gallerySettings, this );

		Library.prototype.deactivate.apply( this, arguments );
	},

	/**
	 * Adds the gallery settings to the sidebar and adds a reverse button to the
	 * toolbar.
	 *
	 * @since 3.5.0
	 *
	 * @param {wp.media.view.Frame} browser The file browser.
	 *
	 * @return {void}
	 */
	gallerySettings: function( browser ) {
		if ( ! this.get('displaySettings') ) {
			return;
		}

		var library = this.get('library');

		if ( ! library || ! browser ) {
			return;
		}

		library.gallery = library.gallery || new Backbone.Model();

		browser.sidebar.set({
			gallery: new wp.media.view.Settings.Gallery({
				controller: this,
				model:      library.gallery,
				priority:   40
			})
		});

		browser.toolbar.set( 'reverse', {
			text:     l10n.reverseOrder,
			priority: 80,

			click: function() {
				library.reset( library.toArray().reverse() );
			}
		});
	}
});

module.exports = GalleryEdit;


/***/ },

/***/ 705
(module) {

var State = wp.media.controller.State,
	Library = wp.media.controller.Library,
	l10n = wp.media.view.l10n,
	ImageDetails;

/**
 * wp.media.controller.ImageDetails
 *
 * A state for editing the attachment display settings of an image that's been
 * inserted into the editor.
 *
 * @memberOf wp.media.controller
 *
 * @class
 * @augments wp.media.controller.State
 * @augments Backbone.Model
 *
 * @param {object}                    [attributes]                       The attributes hash passed to the state.
 * @param {string}                    [attributes.id=image-details]      Unique identifier.
 * @param {string}                    [attributes.title=Image Details]   Title for the state. Displays in the frame's title region.
 * @param {wp.media.model.Attachment} attributes.image                   The image's model.
 * @param {string|false}              [attributes.content=image-details] Initial mode for the content region.
 * @param {string|false}              [attributes.menu=false]            Initial mode for the menu region.
 * @param {string|false}              [attributes.router=false]          Initial mode for the router region.
 * @param {string|false}              [attributes.toolbar=image-details] Initial mode for the toolbar region.
 * @param {boolean}                   [attributes.editing=false]         Unused.
 * @param {int}                       [attributes.priority=60]           Unused.
 *
 * @todo This state inherits some defaults from media.controller.Library.prototype.defaults,
 *       however this may not do anything.
 */
ImageDetails = State.extend(/** @lends wp.media.controller.ImageDetails.prototype */{
	defaults: _.defaults({
		id:       'image-details',
		title:    l10n.imageDetailsTitle,
		content:  'image-details',
		menu:     false,
		router:   false,
		toolbar:  'image-details',
		editing:  false,
		priority: 60
	}, Library.prototype.defaults ),

	/**
	 * @since 3.9.0
	 *
	 * @param options Attributes
	 */
	initialize: function( options ) {
		this.image = options.image;
		State.prototype.initialize.apply( this, arguments );
	},

	/**
	 * @since 3.9.0
	 */
	activate: function() {
		this.frame.modal.$el.addClass('image-details');
	}
});

module.exports = ImageDetails;


/***/ },

/***/ 472
(module) {

var l10n = wp.media.view.l10n,
	getUserSetting = window.getUserSetting,
	setUserSetting = window.setUserSetting,
	Library;

/**
 * wp.media.controller.Library
 *
 * A state for choosing an attachment or group of attachments from the media library.
 *
 * @memberOf wp.media.controller
 *
 * @class
 * @augments wp.media.controller.State
 * @augments Backbone.Model
 * @mixes media.selectionSync
 *
 * @param {object}                          [attributes]                         The attributes hash passed to the state.
 * @param {string}                          [attributes.id=library]              Unique identifier.
 * @param {string}                          [attributes.title=Media library]     Title for the state. Displays in the media menu and the frame's title region.
 * @param {wp.media.model.Attachments}      [attributes.library]                 The attachments collection to browse.
 *                                                                               If one is not supplied, a collection of all attachments will be created.
 * @param {wp.media.model.Selection|object} [attributes.selection]               A collection to contain attachment selections within the state.
 *                                                                               If the 'selection' attribute is a plain JS object,
 *                                                                               a Selection will be created using its values as the selection instance's `props` model.
 *                                                                               Otherwise, it will copy the library's `props` model.
 * @param {boolean}                         [attributes.multiple=false]          Whether multi-select is enabled.
 * @param {string}                          [attributes.content=upload]          Initial mode for the content region.
 *                                                                               Overridden by persistent user setting if 'contentUserSetting' is true.
 * @param {string}                          [attributes.menu=default]            Initial mode for the menu region.
 * @param {string}                          [attributes.router=browse]           Initial mode for the router region.
 * @param {string}                          [attributes.toolbar=select]          Initial mode for the toolbar region.
 * @param {boolean}                         [attributes.searchable=true]         Whether the library is searchable.
 * @param {boolean|string}                  [attributes.filterable=false]        Whether the library is filterable, and if so what filters should be shown.
 *                                                                               Accepts 'all', 'uploaded', or 'unattached'.
 * @param {boolean}                         [attributes.sortable=true]           Whether the Attachments should be sortable. Depends on the orderby property being set to menuOrder on the attachments collection.
 * @param {boolean}                         [attributes.autoSelect=true]         Whether an uploaded attachment should be automatically added to the selection.
 * @param {boolean}                         [attributes.describe=false]          Whether to offer UI to describe attachments - e.g. captioning images in a gallery.
 * @param {boolean}                         [attributes.contentUserSetting=true] Whether the content region's mode should be set and persisted per user.
 * @param {boolean}                         [attributes.syncSelection=true]      Whether the Attachments selection should be persisted from the last state.
 */
Library = wp.media.controller.State.extend(/** @lends wp.media.controller.Library.prototype */{
	defaults: {
		id:                 'library',
		title:              l10n.mediaLibraryTitle,
		multiple:           false,
		content:            'upload',
		menu:               'default',
		router:             'browse',
		toolbar:            'select',
		searchable:         true,
		filterable:         false,
		sortable:           true,
		autoSelect:         true,
		describe:           false,
		contentUserSetting: true,
		syncSelection:      true
	},

	/**
	 * If a library isn't provided, query all media items.
	 * If a selection instance isn't provided, create one.
	 *
	 * @since 3.5.0
	 */
	initialize: function() {
		var selection = this.get('selection'),
			props;

		if ( ! this.get('library') ) {
			this.set( 'library', wp.media.query() );
		}

		if ( ! ( selection instanceof wp.media.model.Selection ) ) {
			props = selection;

			if ( ! props ) {
				props = this.get('library').props.toJSON();
				props = _.omit( props, 'orderby', 'query' );
			}

			this.set( 'selection', new wp.media.model.Selection( null, {
				multiple: this.get('multiple'),
				props: props
			}) );
		}

		this.resetDisplays();
	},

	/**
	 * @since 3.5.0
	 */
	activate: function() {
		this.syncSelection();

		wp.Uploader.queue.on( 'add', this.uploading, this );

		this.get('selection').on( 'add remove reset', this.refreshContent, this );

		if ( this.get( 'router' ) && this.get('contentUserSetting') ) {
			this.frame.on( 'content:activate', this.saveContentMode, this );
			this.set( 'content', getUserSetting( 'libraryContent', this.get('content') ) );
		}
	},

	/**
	 * @since 3.5.0
	 */
	deactivate: function() {
		this.recordSelection();

		this.frame.off( 'content:activate', this.saveContentMode, this );

		// Unbind all event handlers that use this state as the context
		// from the selection.
		this.get('selection').off( null, null, this );

		wp.Uploader.queue.off( null, null, this );
	},

	/**
	 * Reset the library to its initial state.
	 *
	 * @since 3.5.0
	 */
	reset: function() {
		this.get('selection').reset();
		this.resetDisplays();
		this.refreshContent();
	},

	/**
	 * Reset the attachment display settings defaults to the site options.
	 *
	 * If site options don't define them, fall back to a persistent user setting.
	 *
	 * @since 3.5.0
	 */
	resetDisplays: function() {
		var defaultProps = wp.media.view.settings.defaultProps;
		this._displays = [];
		this._defaultDisplaySettings = {
			align: getUserSetting( 'align', defaultProps.align ) || 'none',
			size:  getUserSetting( 'imgsize', defaultProps.size ) || 'medium',
			link:  getUserSetting( 'urlbutton', defaultProps.link ) || 'none'
		};
	},

	/**
	 * Create a model to represent display settings (alignment, etc.) for an attachment.
	 *
	 * @since 3.5.0
	 *
	 * @param {wp.media.model.Attachment} attachment
	 * @return {Backbone.Model}
	 */
	display: function( attachment ) {
		var displays = this._displays;

		if ( ! displays[ attachment.cid ] ) {
			displays[ attachment.cid ] = new Backbone.Model( this.defaultDisplaySettings( attachment ) );
		}
		return displays[ attachment.cid ];
	},

	/**
	 * Given an attachment, create attachment display settings properties.
	 *
	 * @since 3.6.0
	 *
	 * @param {wp.media.model.Attachment} attachment
	 * @return {Object}
	 */
	defaultDisplaySettings: function( attachment ) {
		var settings = _.clone( this._defaultDisplaySettings );

		settings.canEmbed = this.canEmbed( attachment );
		if ( settings.canEmbed ) {
			settings.link = 'embed';
		} else if ( ! this.isImageAttachment( attachment ) && settings.link === 'none' ) {
			settings.link = 'file';
		}

		return settings;
	},

	/**
	 * Whether an attachment is image.
	 *
	 * @since 4.4.1
	 *
	 * @param {wp.media.model.Attachment} attachment
	 * @return {boolean}
	 */
	isImageAttachment: function( attachment ) {
		// If uploading, we know the filename but not the mime type.
		if ( attachment.get('uploading') ) {
			return /\.(jpe?g|png|gif|webp|avif|heic|heif)$/i.test( attachment.get('filename') );
		}

		return attachment.get('type') === 'image';
	},

	/**
	 * Whether an attachment can be embedded (audio or video).
	 *
	 * @since 3.6.0
	 *
	 * @param {wp.media.model.Attachment} attachment
	 * @return {boolean}
	 */
	canEmbed: function( attachment ) {
		// If uploading, we know the filename but not the mime type.
		if ( ! attachment.get('uploading') ) {
			var type = attachment.get('type');
			if ( type !== 'audio' && type !== 'video' ) {
				return false;
			}
		}

		return _.contains( wp.media.view.settings.embedExts, attachment.get('filename').split('.').pop() );
	},


	/**
	 * If the state is active, no items are selected, and the current
	 * content mode is not an option in the state's router (provided
	 * the state has a router), reset the content mode to the default.
	 *
	 * @since 3.5.0
	 */
	refreshContent: function() {
		var selection = this.get('selection'),
			frame = this.frame,
			router = frame.router.get(),
			mode = frame.content.mode();

		if ( this.active && ! selection.length && router && ! router.get( mode ) ) {
			this.frame.content.render( this.get('content') );
		}
	},

	/**
	 * Callback handler when an attachment is uploaded.
	 *
	 * Switch to the Media Library if uploaded from the 'Upload Files' tab.
	 *
	 * Adds any uploading attachments to the selection.
	 *
	 * If the state only supports one attachment to be selected and multiple
	 * attachments are uploaded, the last attachment in the upload queue will
	 * be selected.
	 *
	 * @since 3.5.0
	 *
	 * @param {wp.media.model.Attachment} attachment
	 */
	uploading: function( attachment ) {
		var content = this.frame.content;

		if ( 'upload' === content.mode() ) {
			this.frame.content.mode('browse');
		}

		if ( this.get( 'autoSelect' ) ) {
			this.get('selection').add( attachment );
			this.frame.trigger( 'library:selection:add' );
		}
	},

	/**
	 * Persist the mode of the content region as a user setting.
	 *
	 * @since 3.5.0
	 */
	saveContentMode: function() {
		if ( 'browse' !== this.get('router') ) {
			return;
		}

		var mode = this.frame.content.mode(),
			view = this.frame.router.get();

		if ( view && view.get( mode ) ) {
			setUserSetting( 'libraryContent', mode );
		}
	}

});

// Make selectionSync available on any Media Library state.
_.extend( Library.prototype, wp.media.selectionSync );

module.exports = Library;


/***/ },

/***/ 8065
(module) {

/**
 * wp.media.controller.MediaLibrary
 *
 * @memberOf wp.media.controller
 *
 * @class
 * @augments wp.media.controller.Library
 * @augments wp.media.controller.State
 * @augments Backbone.Model
 */
var Library = wp.media.controller.Library,
	MediaLibrary;

MediaLibrary = Library.extend(/** @lends wp.media.controller.MediaLibrary.prototype */{
	defaults: _.defaults({
		// Attachments browser defaults. @see media.view.AttachmentsBrowser
		filterable:      'uploaded',

		displaySettings: false,
		priority:        80,
		syncSelection:   false
	}, Library.prototype.defaults ),

	/**
	 * @since 3.9.0
	 *
	 * @param options
	 */
	initialize: function( options ) {
		this.media = options.media;
		this.type = options.type;
		this.set( 'library', wp.media.query({ type: this.type }) );

		Library.prototype.initialize.apply( this, arguments );
	},

	/**
	 * @since 3.9.0
	 */
	activate: function() {
		// @todo this should use this.frame.
		if ( wp.media.frame.lastMime ) {
			this.set( 'library', wp.media.query({ type: wp.media.frame.lastMime }) );
			delete wp.media.frame.lastMime;
		}
		Library.prototype.activate.apply( this, arguments );
	}
});

module.exports = MediaLibrary;


/***/ },

/***/ 9875
(module) {

/**
 * wp.media.controller.Region
 *
 * A region is a persistent application layout area.
 *
 * A region assumes one mode at any time, and can be switched to another.
 *
 * When mode changes, events are triggered on the region's parent view.
 * The parent view will listen to specific events and fill the region with an
 * appropriate view depending on mode. For example, a frame listens for the
 * 'browse' mode t be activated on the 'content' view and then fills the region
 * with an AttachmentsBrowser view.
 *
 * @memberOf wp.media.controller
 *
 * @class
 *
 * @param {Object}        options          Options hash for the region.
 * @param {string}        options.id       Unique identifier for the region.
 * @param {Backbone.View} options.view     A parent view the region exists within.
 * @param {string}        options.selector jQuery selector for the region within the parent view.
 */
var Region = function( options ) {
	_.extend( this, _.pick( options || {}, 'id', 'view', 'selector' ) );
};

// Use Backbone's self-propagating `extend` inheritance method.
Region.extend = Backbone.Model.extend;

_.extend( Region.prototype,/** @lends wp.media.controller.Region.prototype */{
	/**
	 * Activate a mode.
	 *
	 * @since 3.5.0
	 *
	 * @param {string} mode
	 *
	 * @fires Region#activate
	 * @fires Region#deactivate
	 *
	 * @return {wp.media.controller.Region} Returns itself to allow chaining.
	 */
	mode: function( mode ) {
		if ( ! mode ) {
			return this._mode;
		}
		// Bail if we're trying to change to the current mode.
		if ( mode === this._mode ) {
			return this;
		}

		/**
		 * Region mode deactivation event.
		 *
		 * @event wp.media.controller.Region#deactivate
		 */
		this.trigger('deactivate');

		this._mode = mode;
		this.render( mode );

		/**
		 * Region mode activation event.
		 *
		 * @event wp.media.controller.Region#activate
		 */
		this.trigger('activate');
		return this;
	},
	/**
	 * Render a mode.
	 *
	 * @since 3.5.0
	 *
	 * @param {string} mode
	 *
	 * @fires Region#create
	 * @fires Region#render
	 *
	 * @return {wp.media.controller.Region} Returns itself to allow chaining.
	 */
	render: function( mode ) {
		// If the mode isn't active, activate it.
		if ( mode && mode !== this._mode ) {
			return this.mode( mode );
		}

		var set = { view: null },
			view;

		/**
		 * Create region view event.
		 *
		 * Region view creation takes place in an event callback on the frame.
		 *
		 * @event wp.media.controller.Region#create
		 * @type {object}
		 * @property {object} view
		 */
		this.trigger( 'create', set );
		view = set.view;

		/**
		 * Render region view event.
		 *
		 * Region view creation takes place in an event callback on the frame.
		 *
		 * @event wp.media.controller.Region#render
		 * @type {object}
		 */
		this.trigger( 'render', view );
		if ( view ) {
			this.set( view );
		}
		return this;
	},

	/**
	 * Get the region's view.
	 *
	 * @since 3.5.0
	 *
	 * @return {wp.media.View}
	 */
	get: function() {
		return this.view.views.first( this.selector );
	},

	/**
	 * Set the region's view as a subview of the frame.
	 *
	 * @since 3.5.0
	 *
	 * @param {Array|Object} views
	 * @param {Object} [options={}]
	 * @return {wp.Backbone.Subviews} Subviews is returned to allow chaining.
	 */
	set: function( views, options ) {
		if ( options ) {
			options.add = false;
		}
		return this.view.views.set( this.selector, views, options );
	},

	/**
	 * Trigger regional view events on the frame.
	 *
	 * @since 3.5.0
	 *
	 * @param {string} event
	 * @return {undefined|wp.media.controller.Region} Returns itself to allow chaining.
	 */
	trigger: function( event ) {
		var base, args;

		if ( ! this._mode ) {
			return;
		}

		args = _.toArray( arguments );
		base = this.id + ':' + event;

		// Trigger `{this.id}:{event}:{this._mode}` event on the frame.
		args[0] = base + ':' + this._mode;
		this.view.trigger.apply( this.view, args );

		// Trigger `{this.id}:{event}` event on the frame.
		args[0] = base;
		this.view.trigger.apply( this.view, args );
		return this;
	}
});

module.exports = Region;


/***/ },

/***/ 2275
(module) {

var Library = wp.media.controller.Library,
	l10n = wp.media.view.l10n,
	ReplaceImage;

/**
 * wp.media.controller.ReplaceImage
 *
 * A state for replacing an image.
 *
 * @memberOf wp.media.controller
 *
 * @class
 * @augments wp.media.controller.Library
 * @augments wp.media.controller.State
 * @augments Backbone.Model
 *
 * @param {object}                     [attributes]                         The attributes hash passed to the state.
 * @param {string}                     [attributes.id=replace-image]        Unique identifier.
 * @param {string}                     [attributes.title=Replace Image]     Title for the state. Displays in the media menu and the frame's title region.
 * @param {wp.media.model.Attachments} [attributes.library]                 The attachments collection to browse.
 *                                                                          If one is not supplied, a collection of all images will be created.
 * @param {boolean}                    [attributes.multiple=false]          Whether multi-select is enabled.
 * @param {string}                     [attributes.content=upload]          Initial mode for the content region.
 *                                                                          Overridden by persistent user setting if 'contentUserSetting' is true.
 * @param {string}                     [attributes.menu=default]            Initial mode for the menu region.
 * @param {string}                     [attributes.router=browse]           Initial mode for the router region.
 * @param {string}                     [attributes.toolbar=replace]         Initial mode for the toolbar region.
 * @param {int}                        [attributes.priority=60]             The priority for the state link in the media menu.
 * @param {boolean}                    [attributes.searchable=true]         Whether the library is searchable.
 * @param {boolean|string}             [attributes.filterable=uploaded]     Whether the library is filterable, and if so what filters should be shown.
 *                                                                          Accepts 'all', 'uploaded', or 'unattached'.
 * @param {boolean}                    [attributes.sortable=true]           Whether the Attachments should be sortable. Depends on the orderby property being set to menuOrder on the attachments collection.
 * @param {boolean}                    [attributes.autoSelect=true]         Whether an uploaded attachment should be automatically added to the selection.
 * @param {boolean}                    [attributes.describe=false]          Whether to offer UI to describe attachments - e.g. captioning images in a gallery.
 * @param {boolean}                    [attributes.contentUserSetting=true] Whether the content region's mode should be set and persisted per user.
 * @param {boolean}                    [attributes.syncSelection=true]      Whether the Attachments selection should be persisted from the last state.
 */
ReplaceImage = Library.extend(/** @lends wp.media.controller.ReplaceImage.prototype */{
	defaults: _.defaults({
		id:            'replace-image',
		title:         l10n.replaceImageTitle,
		multiple:      false,
		filterable:    'uploaded',
		toolbar:       'replace',
		menu:          false,
		priority:      60,
		syncSelection: true
	}, Library.prototype.defaults ),

	/**
	 * @since 3.9.0
	 *
	 * @param options
	 */
	initialize: function( options ) {
		var library, comparator;

		this.image = options.image;
		// If we haven't been provided a `library`, create a `Selection`.
		if ( ! this.get('library') ) {
			this.set( 'library', wp.media.query({ type: 'image' }) );
		}

		Library.prototype.initialize.apply( this, arguments );

		library    = this.get('library');
		comparator = library.comparator;

		// Overload the library's comparator to push items that are not in
		// the mirrored query to the front of the aggregate collection.
		library.comparator = function( a, b ) {
			var aInQuery = !! this.mirroring.get( a.cid ),
				bInQuery = !! this.mirroring.get( b.cid );

			if ( ! aInQuery && bInQuery ) {
				return -1;
			} else if ( aInQuery && ! bInQuery ) {
				return 1;
			} else {
				return comparator.apply( this, arguments );
			}
		};

		// Add all items in the selection to the library, so any featured
		// images that are not initially loaded still appear.
		library.observe( this.get('selection') );
	},

	/**
	 * @since 3.9.0
	 */
	activate: function() {
		this.frame.on( 'content:render:browse', this.updateSelection, this );

		Library.prototype.activate.apply( this, arguments );
	},

	/**
	 * @since 5.9.0
	 */
	deactivate: function() {
		this.frame.off( 'content:render:browse', this.updateSelection, this );

		Library.prototype.deactivate.apply( this, arguments );
	},

	/**
	 * @since 3.9.0
	 */
	updateSelection: function() {
		var selection = this.get('selection'),
			attachment = this.image.attachment;

		selection.reset( attachment ? [ attachment ] : [] );
	}
});

module.exports = ReplaceImage;


/***/ },

/***/ 6172
(module) {

var Controller = wp.media.controller,
	SiteIconCropper;

/**
 * wp.media.controller.SiteIconCropper
 *
 * A state for cropping a Site Icon.
 *
 * @memberOf wp.media.controller
 *
 * @class
 * @augments wp.media.controller.Cropper
 * @augments wp.media.controller.State
 * @augments Backbone.Model
 */
SiteIconCropper = Controller.Cropper.extend(/** @lends wp.media.controller.SiteIconCropper.prototype */{
	activate: function() {
		this.frame.on( 'content:create:crop', this.createCropContent, this );
		this.frame.on( 'close', this.removeCropper, this );
		this.set('selection', new Backbone.Collection(this.frame._selection.single));
	},

	createCropContent: function() {
		this.cropperView = new wp.media.view.SiteIconCropper({
			controller: this,
			attachment: this.get('selection').first()
		});
		this.cropperView.on('image-loaded', this.createCropToolbar, this);
		this.frame.content.set(this.cropperView);

	},

	doCrop: function( attachment ) {
		var cropDetails = attachment.get( 'cropDetails' ),
			control = this.get( 'control' );

		cropDetails.dst_width  = control.params.width;
		cropDetails.dst_height = control.params.height;

		return wp.ajax.post( 'crop-image', {
			nonce: attachment.get( 'nonces' ).edit,
			id: attachment.get( 'id' ),
			context: 'site-icon',
			cropDetails: cropDetails
		} );
	}
});

module.exports = SiteIconCropper;


/***/ },

/***/ 6150
(module) {

/**
 * wp.media.controller.StateMachine
 *
 * A state machine keeps track of state. It is in one state at a time,
 * and can change from one state to another.
 *
 * States are stored as models in a Backbone collection.
 *
 * @memberOf wp.media.controller
 *
 * @since 3.5.0
 *
 * @class
 * @augments Backbone.Model
 * @mixin
 * @mixes Backbone.Events
 */
var StateMachine = function() {
	return {
		// Use Backbone's self-propagating `extend` inheritance method.
		extend: Backbone.Model.extend
	};
};

_.extend( StateMachine.prototype, Backbone.Events,/** @lends wp.media.controller.StateMachine.prototype */{
	/**
	 * Fetch a state.
	 *
	 * If no `id` is provided, returns the active state.
	 *
	 * Implicitly creates states.
	 *
	 * Ensure that the `states` collection exists so the `StateMachine`
	 * can be used as a mixin.
	 *
	 * @since 3.5.0
	 *
	 * @param {string} id
	 * @return {wp.media.controller.State} Returns a State model from
	 *                                     the StateMachine collection.
	 */
	state: function( id ) {
		this.states = this.states || new Backbone.Collection();

		// Default to the active state.
		id = id || this._state;

		if ( id && ! this.states.get( id ) ) {
			this.states.add({ id: id });
		}
		return this.states.get( id );
	},

	/**
	 * Sets the active state.
	 *
	 * Bail if we're trying to select the current state, if we haven't
	 * created the `states` collection, or are trying to select a state
	 * that does not exist.
	 *
	 * @since 3.5.0
	 *
	 * @param {string} id
	 *
	 * @fires wp.media.controller.State#deactivate
	 * @fires wp.media.controller.State#activate
	 *
	 * @return {wp.media.controller.StateMachine} Returns itself to allow chaining.
	 */
	setState: function( id ) {
		var previous = this.state();

		if ( ( previous && id === previous.id ) || ! this.states || ! this.states.get( id ) ) {
			return this;
		}

		if ( previous ) {
			previous.trigger('deactivate');
			this._lastState = previous.id;
		}

		this._state = id;
		this.state().trigger('activate');

		return this;
	},

	/**
	 * Returns the previous active state.
	 *
	 * Call the `state()` method with no parameters to retrieve the current
	 * active state.
	 *
	 * @since 3.5.0
	 *
	 * @return {wp.media.controller.State} Returns a State model from
	 *                                     the StateMachine collection.
	 */
	lastState: function() {
		if ( this._lastState ) {
			return this.state( this._lastState );
		}
	}
});

// Map all event binding and triggering on a StateMachine to its `states` collection.
_.each([ 'on', 'off', 'trigger' ], function( method ) {
	/**
	 * @function on
	 * @memberOf wp.media.controller.StateMachine
	 * @instance
	 * @return {wp.media.controller.StateMachine} Returns itself to allow chaining.
	 */
	/**
	 * @function off
	 * @memberOf wp.media.controller.StateMachine
	 * @instance
	 * @return {wp.media.controller.StateMachine} Returns itself to allow chaining.
	 */
	/**
	 * @function trigger
	 * @memberOf wp.media.controller.StateMachine
	 * @instance
	 * @return {wp.media.controller.StateMachine} Returns itself to allow chaining.
	 */
	StateMachine.prototype[ method ] = function() {
		// Ensure that the `states` collection exists so the `StateMachine`
		// can be used as a mixin.
		this.states = this.states || new Backbone.Collection();
		// Forward the method to the `states` collection.
		this.states[ method ].apply( this.states, arguments );
		return this;
	};
});

module.exports = StateMachine;


/***/ },

/***/ 5694
(module) {

/**
 * wp.media.controller.State
 *
 * A state is a step in a workflow that when set will trigger the controllers
 * for the regions to be updated as specified in the frame.
 *
 * A state has an event-driven lifecycle:
 *
 *     'ready'      triggers when a state is added to a state machine's collection.
 *     'activate'   triggers when a state is activated by a state machine.
 *     'deactivate' triggers when a state is deactivated by a state machine.
 *     'reset'      is not triggered automatically. It should be invoked by the
 *                  proper controller to reset the state to its default.
 *
 * @memberOf wp.media.controller
 *
 * @class
 * @augments Backbone.Model
 */
var State = Backbone.Model.extend(/** @lends wp.media.controller.State.prototype */{
	/**
	 * Constructor.
	 *
	 * @since 3.5.0
	 */
	constructor: function() {
		this.on( 'activate', this._preActivate, this );
		this.on( 'activate', this.activate, this );
		this.on( 'activate', this._postActivate, this );
		this.on( 'deactivate', this._deactivate, this );
		this.on( 'deactivate', this.deactivate, this );
		this.on( 'reset', this.reset, this );
		this.on( 'ready', this._ready, this );
		this.on( 'ready', this.ready, this );
		/**
		 * Call parent constructor with passed arguments
		 */
		Backbone.Model.apply( this, arguments );
		this.on( 'change:menu', this._updateMenu, this );
	},
	/**
	 * Ready event callback.
	 *
	 * @abstract
	 * @since 3.5.0
	 */
	ready: function() {},

	/**
	 * Activate event callback.
	 *
	 * @abstract
	 * @since 3.5.0
	 */
	activate: function() {},

	/**
	 * Deactivate event callback.
	 *
	 * @abstract
	 * @since 3.5.0
	 */
	deactivate: function() {},

	/**
	 * Reset event callback.
	 *
	 * @abstract
	 * @since 3.5.0
	 */
	reset: function() {},

	/**
	 * @since 3.5.0
	 * @access private
	 */
	_ready: function() {
		this._updateMenu();
	},

	/**
	 * @since 3.5.0
	 * @access private
	*/
	_preActivate: function() {
		this.active = true;
	},

	/**
	 * @since 3.5.0
	 * @access private
	 */
	_postActivate: function() {
		this.on( 'change:menu', this._menu, this );
		this.on( 'change:titleMode', this._title, this );
		this.on( 'change:content', this._content, this );
		this.on( 'change:toolbar', this._toolbar, this );

		this.frame.on( 'title:render:default', this._renderTitle, this );

		this._title();
		this._menu();
		this._toolbar();
		this._content();
		this._router();
	},

	/**
	 * @since 3.5.0
	 * @access private
	 */
	_deactivate: function() {
		this.active = false;

		this.frame.off( 'title:render:default', this._renderTitle, this );

		this.off( 'change:menu', this._menu, this );
		this.off( 'change:titleMode', this._title, this );
		this.off( 'change:content', this._content, this );
		this.off( 'change:toolbar', this._toolbar, this );
	},

	/**
	 * @since 3.5.0
	 * @access private
	 */
	_title: function() {
		this.frame.title.render( this.get('titleMode') || 'default' );
	},

	/**
	 * @since 3.5.0
	 * @access private
	 */
	_renderTitle: function( view ) {
		view.$el.text( this.get('title') || '' );
	},

	/**
	 * @since 3.5.0
	 * @access private
	 */
	_router: function() {
		var router = this.frame.router,
			mode = this.get('router'),
			view;

		this.frame.$el.toggleClass( 'hide-router', ! mode );
		if ( ! mode ) {
			return;
		}

		this.frame.router.render( mode );

		view = router.get();
		if ( view && view.select ) {
			view.select( this.frame.content.mode() );
		}
	},

	/**
	 * @since 3.5.0
	 * @access private
	 */
	_menu: function() {
		var menu = this.frame.menu,
			mode = this.get('menu'),
			actionMenuItems,
			actionMenuLength,
			view;

		if ( this.frame.menu ) {
			actionMenuItems = this.frame.menu.get('views'),
			actionMenuLength = actionMenuItems ? actionMenuItems.views.get().length : 0,
			// Show action menu only if it is active and has more than one default element.
			this.frame.$el.toggleClass( 'hide-menu', ! mode || actionMenuLength < 2 );
		}
		if ( ! mode ) {
			return;
		}

		menu.mode( mode );

		view = menu.get();
		if ( view && view.select ) {
			view.select( this.id );
		}
	},

	/**
	 * @since 3.5.0
	 * @access private
	 */
	_updateMenu: function() {
		var previous = this.previous('menu'),
			menu = this.get('menu');

		if ( previous ) {
			this.frame.off( 'menu:render:' + previous, this._renderMenu, this );
		}

		if ( menu ) {
			this.frame.on( 'menu:render:' + menu, this._renderMenu, this );
		}
	},

	/**
	 * Create a view in the media menu for the state.
	 *
	 * @since 3.5.0
	 * @access private
	 *
	 * @param {media.view.Menu} view The menu view.
	 */
	_renderMenu: function( view ) {
		var menuItem = this.get('menuItem'),
			title = this.get('title'),
			priority = this.get('priority');

		if ( ! menuItem && title ) {
			menuItem = { text: title };

			if ( priority ) {
				menuItem.priority = priority;
			}
		}

		if ( ! menuItem ) {
			return;
		}

		view.set( this.id, menuItem );
	}
});

_.each(['toolbar','content'], function( region ) {
	/**
	 * @access private
	 */
	State.prototype[ '_' + region ] = function() {
		var mode = this.get( region );
		if ( mode ) {
			this.frame[ region ].render( mode );
		}
	};
});

module.exports = State;


/***/ },

/***/ 4181
(module) {

/**
 * wp.media.selectionSync
 *
 * Sync an attachments selection in a state with another state.
 *
 * Allows for selecting multiple images in the Add Media workflow, and then
 * switching to the Insert Gallery workflow while preserving the attachments selection.
 *
 * @memberOf wp.media
 *
 * @mixin
 */
var selectionSync = {
	/**
	 * @since 3.5.0
	 */
	syncSelection: function() {
		var selection = this.get('selection'),
			manager = this.frame._selection;

		if ( ! this.get('syncSelection') || ! manager || ! selection ) {
			return;
		}

		/*
		 * If the selection supports multiple items, validate the stored
		 * attachments based on the new selection's conditions. Record
		 * the attachments that are not included; we'll maintain a
		 * reference to those. Other attachments are considered in flux.
		 */
		if ( selection.multiple ) {
			selection.reset( [], { silent: true });
			selection.validateAll( manager.attachments );
			manager.difference = _.difference( manager.attachments.models, selection.models );
		}

		// Sync the selection's single item with the master.
		selection.single( manager.single );
	},

	/**
	 * Record the currently active attachments, which is a combination
	 * of the selection's attachments and the set of selected
	 * attachments that this specific selection considered invalid.
	 * Reset the difference and record the single attachment.
	 *
	 * @since 3.5.0
	 */
	recordSelection: function() {
		var selection = this.get('selection'),
			manager = this.frame._selection;

		if ( ! this.get('syncSelection') || ! manager || ! selection ) {
			return;
		}

		if ( selection.multiple ) {
			manager.attachments.reset( selection.toArray().concat( manager.difference ) );
			manager.difference = [];
		} else {
			manager.attachments.add( selection.toArray() );
		}

		manager.single = selection._single;
	}
};

module.exports = selectionSync;


/***/ },

/***/ 2982
(module) {

var View = wp.media.View,
	AttachmentCompat;

/**
 * wp.media.view.AttachmentCompat
 *
 * A view to display fields added via the `attachment_fields_to_edit` filter.
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
AttachmentCompat = View.extend(/** @lends wp.media.view.AttachmentCompat.prototype */{
	tagName:   'form',
	className: 'compat-item',

	events: {
		'submit':          'preventDefault',
		'change input':    'save',
		'change select':   'save',
		'change textarea': 'save'
	},

	initialize: function() {
		// Render the view when a new item is added.
		this.listenTo( this.model, 'add', this.render );
	},

	/**
	 * @return {wp.media.view.AttachmentCompat} Returns itself to allow chaining.
	 */
	dispose: function() {
		if ( this.$(':focus').length ) {
			this.save();
		}
		/**
		 * call 'dispose' directly on the parent class
		 */
		return View.prototype.dispose.apply( this, arguments );
	},
	/**
	 * @return {wp.media.view.AttachmentCompat} Returns itself to allow chaining.
	 */
	render: function() {
		var compat = this.model.get('compat');
		if ( ! compat || ! compat.item ) {
			return;
		}

		this.views.detach();
		this.$el.html( compat.item );
		this.views.render();
		return this;
	},
	/**
	 * @param {Object} event
	 */
	preventDefault: function( event ) {
		event.preventDefault();
	},
	/**
	 * @param {Object} event
	 */
	save: function( event ) {
		var data = {};

		if ( event ) {
			event.preventDefault();
		}

		_.each( this.$el.serializeArray(), function( pair ) {
			data[ pair.name ] = pair.value;
		});

		this.controller.trigger( 'attachment:compat:waiting', ['waiting'] );
		this.model.saveCompat( data ).always( _.bind( this.postSave, this ) );
	},

	postSave: function() {
		this.controller.trigger( 'attachment:compat:ready', ['ready'] );
	}
});

module.exports = AttachmentCompat;


/***/ },

/***/ 7709
(module) {

var $ = jQuery,
	AttachmentFilters;

/**
 * wp.media.view.AttachmentFilters
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
AttachmentFilters = wp.media.View.extend(/** @lends wp.media.view.AttachmentFilters.prototype */{
	tagName:   'select',
	className: 'attachment-filters',
	id:        'media-attachment-filters',

	events: {
		change: 'change'
	},

	keys: [],

	initialize: function() {
		this.createFilters();
		_.extend( this.filters, this.options.filters );

		// Build `<option>` elements.
		this.$el.html( _.chain( this.filters ).map( function( filter, value ) {
			return {
				el: $( '<option></option>' ).val( value ).html( filter.text )[0],
				priority: filter.priority || 50
			};
		}, this ).sortBy('priority').pluck('el').value() );

		this.listenTo( this.model, 'change', this.select );
		this.select();
	},

	/**
	 * @abstract
	 */
	createFilters: function() {
		this.filters = {};
	},

	/**
	 * When the selected filter changes, update the Attachment Query properties to match.
	 */
	change: function() {
		var filter = this.filters[ this.el.value ];
		if ( filter ) {
			this.model.set( filter.props );
		}
	},

	select: function() {
		var model = this.model,
			value = 'all',
			props = model.toJSON();

		_.find( this.filters, function( filter, id ) {
			var equal = _.all( filter.props, function( prop, key ) {
				return prop === ( _.isUndefined( props[ key ] ) ? null : props[ key ] );
			});

			if ( equal ) {
				return value = id;
			}
		});

		this.$el.val( value );
	}
});

module.exports = AttachmentFilters;


/***/ },

/***/ 7349
(module) {

var l10n = wp.media.view.l10n,
	All;

/**
 * wp.media.view.AttachmentFilters.All
 *
 * @memberOf wp.media.view.AttachmentFilters
 *
 * @class
 * @augments wp.media.view.AttachmentFilters
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
All = wp.media.view.AttachmentFilters.extend(/** @lends wp.media.view.AttachmentFilters.All.prototype */{
	createFilters: function() {
		var filters = {},
			uid = window.userSettings ? parseInt( window.userSettings.uid, 10 ) : 0;

		_.each( wp.media.view.settings.mimeTypes || {}, function( text, key ) {
			filters[ key ] = {
				text: text,
				props: {
					status:  null,
					type:    key,
					uploadedTo: null,
					orderby: 'date',
					order:   'DESC',
					author:  null
				}
			};
		});

		filters.all = {
			text:  l10n.allMediaItems,
			props: {
				status:  null,
				type:    null,
				uploadedTo: null,
				orderby: 'date',
				order:   'DESC',
				author:  null
			},
			priority: 10
		};

		if ( wp.media.view.settings.post.id ) {
			filters.uploaded = {
				text:  l10n.uploadedToThisPost,
				props: {
					status:  null,
					type:    null,
					uploadedTo: wp.media.view.settings.post.id,
					orderby: 'menuOrder',
					order:   'ASC',
					author:  null
				},
				priority: 20
			};
		}

		filters.unattached = {
			text:  l10n.unattached,
			props: {
				status:     null,
				uploadedTo: 0,
				type:       null,
				orderby:    'menuOrder',
				order:      'ASC',
				author:     null
			},
			priority: 50
		};

		if ( uid ) {
			filters.mine = {
				text:  l10n.mine,
				props: {
					status:		null,
					type:		null,
					uploadedTo:	null,
					orderby:	'date',
					order:		'DESC',
					author:		uid
				},
				priority: 50
			};
		}

		if ( wp.media.view.settings.mediaTrash &&
			this.controller.isModeActive( 'grid' ) ) {

			filters.trash = {
				text:  l10n.trash,
				props: {
					uploadedTo: null,
					status:     'trash',
					type:       null,
					orderby:    'date',
					order:      'DESC',
					author:     null
				},
				priority: 50
			};
		}

		this.filters = filters;
	}
});

module.exports = All;


/***/ },

/***/ 6472
(module) {

var l10n = wp.media.view.l10n,
	DateFilter;

/**
 * A filter dropdown for month/dates.
 *
 * @memberOf wp.media.view.AttachmentFilters
 *
 * @class
 * @augments wp.media.view.AttachmentFilters
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
DateFilter = wp.media.view.AttachmentFilters.extend(/** @lends wp.media.view.AttachmentFilters.Date.prototype */{
	id: 'media-attachment-date-filters',

	createFilters: function() {
		var filters = {};
		_.each( wp.media.view.settings.months || {}, function( value, index ) {
			filters[ index ] = {
				text: value.text,
				props: {
					year: value.year,
					monthnum: value.month
				}
			};
		});
		filters.all = {
			text:  l10n.allDates,
			props: {
				monthnum: false,
				year:  false
			},
			priority: 10
		};
		this.filters = filters;
	}
});

module.exports = DateFilter;


/***/ },

/***/ 1368
(module) {

var l10n = wp.media.view.l10n,
	Uploaded;

/**
 * wp.media.view.AttachmentFilters.Uploaded
 *
 * @memberOf wp.media.view.AttachmentFilters
 *
 * @class
 * @augments wp.media.view.AttachmentFilters
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
Uploaded = wp.media.view.AttachmentFilters.extend(/** @lends wp.media.view.AttachmentFilters.Uploaded.prototype */{
	createFilters: function() {
		var type = this.model.get('type'),
			types = wp.media.view.settings.mimeTypes,
			uid = window.userSettings ? parseInt( window.userSettings.uid, 10 ) : 0,
			text;

		if ( types && type ) {
			text = types[ type ];
		}

		this.filters = {
			all: {
				text:  text || l10n.allMediaItems,
				props: {
					uploadedTo: null,
					orderby: 'date',
					order:   'DESC',
					author:	 null
				},
				priority: 10
			},

			uploaded: {
				text:  l10n.uploadedToThisPost,
				props: {
					uploadedTo: wp.media.view.settings.post.id,
					orderby: 'menuOrder',
					order:   'ASC',
					author:	 null
				},
				priority: 20
			},

			unattached: {
				text:  l10n.unattached,
				props: {
					uploadedTo: 0,
					orderby: 'menuOrder',
					order:   'ASC',
					author:	 null
				},
				priority: 50
			}
		};

		if ( uid ) {
			this.filters.mine = {
				text:  l10n.mine,
				props: {
					orderby: 'date',
					order:   'DESC',
					author:  uid
				},
				priority: 50
			};
		}
	}
});

module.exports = Uploaded;


/***/ },

/***/ 4075
(module) {

var View = wp.media.View,
	$ = jQuery,
	Attachment;

/**
 * wp.media.view.Attachment
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
Attachment = View.extend(/** @lends wp.media.view.Attachment.prototype */{
	tagName:   'li',
	className: 'attachment',
	template:  wp.template('attachment'),

	attributes: function() {
		return {
			'tabIndex':     0,
			'role':         'checkbox',
			'aria-label':   this.model.get( 'title' ) || wp.i18n.__( 'uploadingâ€¦' ),
			'aria-checked': false,
			'data-id':      this.model.get( 'id' )
		};
	},

	events: {
		'click':                          'toggleSelectionHandler',
		'change [data-setting]':          'updateSetting',
		'change [data-setting] input':    'updateSetting',
		'change [data-setting] select':   'updateSetting',
		'change [data-setting] textarea': 'updateSetting',
		'click .attachment-close':        'removeFromLibrary',
		'click .check':                   'checkClickHandler',
		'keydown':                        'toggleSelectionHandler'
	},

	buttons: {},

	initialize: function() {
		var selection = this.options.selection,
			options = _.defaults( this.options, {
				rerenderOnModelChange: true
			} );

		if ( options.rerenderOnModelChange ) {
			this.listenTo( this.model, 'change', this.render );
		} else {
			this.listenTo( this.model, 'change:percent', this.progress );
		}
		this.listenTo( this.model, 'change:title', this._syncTitle );
		this.listenTo( this.model, 'change:caption', this._syncCaption );
		this.listenTo( this.model, 'change:artist', this._syncArtist );
		this.listenTo( this.model, 'change:album', this._syncAlbum );

		// Update the selection.
		this.listenTo( this.model, 'add', this.select );
		this.listenTo( this.model, 'remove', this.deselect );
		if ( selection ) {
			selection.on( 'reset', this.updateSelect, this );
			// Update the model's details view.
			this.listenTo( this.model, 'selection:single selection:unsingle', this.details );
			this.details( this.model, this.controller.state().get('selection') );
		}

		this.listenTo( this.controller.states, 'attachment:compat:waiting attachment:compat:ready', this.updateSave );
	},
	/**
	 * @return {wp.media.view.Attachment} Returns itself to allow chaining.
	 */
	dispose: function() {
		var selection = this.options.selection;

		// Make sure all settings are saved before removing the view.
		this.updateAll();

		if ( selection ) {
			selection.off( null, null, this );
		}
		/**
		 * call 'dispose' directly on the parent class
		 */
		View.prototype.dispose.apply( this, arguments );
		return this;
	},
	/**
	 * @return {wp.media.view.Attachment} Returns itself to allow chaining.
	 */
	render: function() {
		var options = _.defaults( this.model.toJSON(), {
				orientation:   'landscape',
				uploading:     false,
				type:          '',
				subtype:       '',
				icon:          '',
				filename:      '',
				caption:       '',
				title:         '',
				dateFormatted: '',
				width:         '',
				height:        '',
				compat:        false,
				alt:           '',
				description:   ''
			}, this.options );

		options.buttons  = this.buttons;
		options.describe = this.controller.state().get('describe');

		if ( 'image' === options.type ) {
			options.size = this.imageSize();
		}

		options.can = {};
		if ( options.nonces ) {
			options.can.remove = !! options.nonces['delete'];
			options.can.save = !! options.nonces.update;
		}

		if ( this.controller.state().get('allowLocalEdits') && ! options.uploading ) {
			options.allowLocalEdits = true;
		}

		if ( options.uploading && ! options.percent ) {
			options.percent = 0;
		}

		this.views.detach();
		this.$el.html( this.template( options ) );

		this.$el.toggleClass( 'uploading', options.uploading );

		if ( options.uploading ) {
			this.$bar = this.$('.media-progress-bar div');
		} else {
			delete this.$bar;
		}

		// Check if the model is selected.
		this.updateSelect();

		// Update the save status.
		this.updateSave();

		this.views.render();

		return this;
	},

	progress: function() {
		if ( this.$bar && this.$bar.length ) {
			this.$bar.width( this.model.get('percent') + '%' );
		}
	},

	/**
	 * @param {Object} event
	 */
	toggleSelectionHandler: function( event ) {
		var method;

		// Don't do anything inside inputs and on the attachment check and remove buttons.
		if ( 'INPUT' === event.target.nodeName || 'BUTTON' === event.target.nodeName ) {
			return;
		}

		// Catch arrow events.
		if ( 37 === event.keyCode || 38 === event.keyCode || 39 === event.keyCode || 40 === event.keyCode ) {
			this.controller.trigger( 'attachment:keydown:arrow', event );
			return;
		}

		// Catch enter and space events.
		if ( 'keydown' === event.type && 13 !== event.keyCode && 32 !== event.keyCode ) {
			return;
		}

		event.preventDefault();

		// In the grid view, bubble up an edit:attachment event to the controller.
		if ( this.controller.isModeActive( 'grid' ) ) {
			if ( this.controller.isModeActive( 'edit' ) ) {
				// Pass the current target to restore focus when closing.
				this.controller.trigger( 'edit:attachment', this.model, event.currentTarget );
				return;
			}

			if ( this.controller.isModeActive( 'select' ) ) {
				method = 'toggle';
			}
		}

		if ( event.shiftKey ) {
			method = 'between';
		} else if ( event.ctrlKey || event.metaKey ) {
			method = 'toggle';
		}

		// Avoid toggles when the command or control key is pressed with the enter key to prevent deselecting the last selected attachment.
		if ( ( event.metaKey || event.ctrlKey ) && ( 13 === event.keyCode || 10 === event.keyCode ) ) {
			return;
		}

		this.toggleSelection({
			method: method
		});

		this.controller.trigger( 'selection:toggle' );
	},
	/**
	 * @param {Object} options
	 */
	toggleSelection: function( options ) {
		var collection = this.collection,
			selection = this.options.selection,
			model = this.model,
			method = options && options.method,
			single, models, singleIndex, modelIndex;

		if ( ! selection ) {
			return;
		}

		single = selection.single();
		method = _.isUndefined( method ) ? selection.multiple : method;

		// If the `method` is set to `between`, select all models that
		// exist between the current and the selected model.
		if ( 'between' === method && single && selection.multiple ) {
			// If the models are the same, short-circuit.
			if ( single === model ) {
				return;
			}

			singleIndex = collection.indexOf( single );
			modelIndex  = collection.indexOf( this.model );

			if ( singleIndex < modelIndex ) {
				models = collection.models.slice( singleIndex, modelIndex + 1 );
			} else {
				models = collection.models.slice( modelIndex, singleIndex + 1 );
			}

			selection.add( models );
			selection.single( model );
			return;

		// If the `method` is set to `toggle`, just flip the selection
		// status, regardless of whether the model is the single model.
		} else if ( 'toggle' === method ) {
			selection[ this.selected() ? 'remove' : 'add' ]( model );
			selection.single( model );
			return;
		} else if ( 'add' === method ) {
			selection.add( model );
			selection.single( model );
			return;
		}

		// Fixes bug that loses focus when selecting a featured image.
		if ( ! method ) {
			method = 'add';
		}

		if ( method !== 'add' ) {
			method = 'reset';
		}

		if ( this.selected() ) {
			/*
			 * If the model is the single model, remove it.
			 * If it is not the same as the single model,
			 * it now becomes the single model.
			 */
			selection[ single === model ? 'remove' : 'single' ]( model );
		} else {
			/*
			 * If the model is not selected, run the `method` on the
			 * selection. By default, we `reset` the selection, but the
			 * `method` can be set to `add` the model to the selection.
			 */
			selection[ method ]( model );
			selection.single( model );
		}
	},

	updateSelect: function() {
		this[ this.selected() ? 'select' : 'deselect' ]();
	},
	/**
	 * @return {unresolved|boolean}
	 */
	selected: function() {
		var selection = this.options.selection;
		if ( selection ) {
			return !! selection.get( this.model.cid );
		}
	},
	/**
	 * @param {Backbone.Model} model
	 * @param {Backbone.Collection} collection
	 */
	select: function( model, collection ) {
		var selection = this.options.selection,
			controller = this.controller;

		/*
		 * Check if a selection exists and if it's the collection provided.
		 * If they're not the same collection, bail; we're in another
		 * selection's event loop.
		 */
		if ( ! selection || ( collection && collection !== selection ) ) {
			return;
		}

		// Bail if the model is already selected.
		if ( this.$el.hasClass( 'selected' ) ) {
			return;
		}

		// Add 'selected' class to model, set aria-checked to true.
		this.$el.addClass( 'selected' ).attr( 'aria-checked', true );
		//  Make the checkbox tabable, except in media grid (bulk select mode).
		if ( ! ( controller.isModeActive( 'grid' ) && controller.isModeActive( 'select' ) ) ) {
			this.$( '.check' ).attr( 'tabindex', '0' );
		}
	},
	/**
	 * @param {Backbone.Model} model
	 * @param {Backbone.Collection} collection
	 */
	deselect: function( model, collection ) {
		var selection = this.options.selection;

		/*
		 * Check if a selection exists and if it's the collection provided.
		 * If they're not the same collection, bail; we're in another
		 * selection's event loop.
		 */
		if ( ! selection || ( collection && collection !== selection ) ) {
			return;
		}
		this.$el.removeClass( 'selected' ).attr( 'aria-checked', false )
			.find( '.check' ).attr( 'tabindex', '-1' );
	},
	/**
	 * @param {Backbone.Model} model
	 * @param {Backbone.Collection} collection
	 */
	details: function( model, collection ) {
		var selection = this.options.selection,
			details;

		if ( selection !== collection ) {
			return;
		}

		details = selection.single();
		this.$el.toggleClass( 'details', details === this.model );
	},
	/**
	 * @param {string} size
	 * @return {Object}
	 */
	imageSize: function( size ) {
		var sizes = this.model.get('sizes'), matched = false;

		size = size || 'medium';

		// Use the provided image size if possible.
		if ( sizes ) {
			if ( sizes[ size ] ) {
				matched = sizes[ size ];
			} else if ( sizes.large ) {
				matched = sizes.large;
			} else if ( sizes.thumbnail ) {
				matched = sizes.thumbnail;
			} else if ( sizes.full ) {
				matched = sizes.full;
			}

			if ( matched ) {
				return _.clone( matched );
			}
		}

		return {
			url:         this.model.get('url'),
			width:       this.model.get('width'),
			height:      this.model.get('height'),
			orientation: this.model.get('orientation')
		};
	},
	/**
	 * @param {Object} event
	 */
	updateSetting: function( event ) {
		var $setting = $( event.target ).closest('[data-setting]'),
			setting, value;

		if ( ! $setting.length ) {
			return;
		}

		setting = $setting.data('setting');
		value   = event.target.value;

		if ( this.model.get( setting ) !== value ) {
			this.save( setting, value );
		}
	},

	/**
	 * Pass all the arguments to the model's save method.
	 *
	 * Records the aggregate status of all save requests and updates the
	 * view's classes accordingly.
	 */
	save: function() {
		var view = this,
			save = this._save = this._save || { status: 'ready' },
			request = this.model.save.apply( this.model, arguments ),
			requests = save.requests ? $.when( request, save.requests ) : request;

		// If we're waiting to remove 'Saved.', stop.
		if ( save.savedTimer ) {
			clearTimeout( save.savedTimer );
		}

		this.updateSave('waiting');
		save.requests = requests;
		requests.always( function() {
			// If we've performed another request since this one, bail.
			if ( save.requests !== requests ) {
				return;
			}

			view.updateSave( requests.state() === 'resolved' ? 'complete' : 'error' );
			save.savedTimer = setTimeout( function() {
				view.updateSave('ready');
				delete save.savedTimer;
			}, 2000 );
		});
	},
	/**
	 * @param {string} status
	 * @return {wp.media.view.Attachment} Returns itself to allow chaining.
	 */
	updateSave: function( status ) {
		var save = this._save = this._save || { status: 'ready' };

		if ( status && status !== save.status ) {
			this.$el.removeClass( 'save-' + save.status );
			save.status = status;
		}

		this.$el.addClass( 'save-' + save.status );
		return this;
	},

	updateAll: function() {
		var $settings = this.$('[data-setting]'),
			model = this.model,
			changed;

		changed = _.chain( $settings ).map( function( el ) {
			var $input = $('input, textarea, select, [value]', el ),
				setting, value;

			if ( ! $input.length ) {
				return;
			}

			setting = $(el).data('setting');
			value = $input.val();

			// Record the value if it changed.
			if ( model.get( setting ) !== value ) {
				return [ setting, value ];
			}
		}).compact().object().value();

		if ( ! _.isEmpty( changed ) ) {
			model.save( changed );
		}
	},
	/**
	 * @param {Object} event
	 */
	removeFromLibrary: function( event ) {
		// Catch enter and space events.
		if ( 'keydown' === event.type && 13 !== event.keyCode && 32 !== event.keyCode ) {
			return;
		}

		// Stop propagation so the model isn't selected.
		event.stopPropagation();

		this.collection.remove( this.model );
	},

	/**
	 * Add the model if it isn't in the selection, if it is in the selection,
	 * remove it.
	 *
	 * @param {[type]} event [description]
	 * @return {[type]} [description]
	 */
	checkClickHandler: function ( event ) {
		var selection = this.options.selection;
		if ( ! selection ) {
			return;
		}
		event.stopPropagation();
		if ( selection.where( { id: this.model.get( 'id' ) } ).length ) {
			selection.remove( this.model );
			// Move focus back to the attachment tile (from the check).
			this.$el.focus();
		} else {
			selection.add( this.model );
		}

		// Trigger an action button update.
		this.controller.trigger( 'selection:toggle' );
	}
});

// Ensure settings remain in sync between attachment views.
_.each({
	caption: '_syncCaption',
	title:   '_syncTitle',
	artist:  '_syncArtist',
	album:   '_syncAlbum'
}, function( method, setting ) {
	/**
	 * @function _syncCaption
	 * @memberOf wp.media.view.Attachment
	 * @instance
	 *
	 * @param {Backbone.Model} model
	 * @param {string} value
	 * @return {wp.media.view.Attachment} Returns itself to allow chaining.
	 */
	/**
	 * @function _syncTitle
	 * @memberOf wp.media.view.Attachment
	 * @instance
	 *
	 * @param {Backbone.Model} model
	 * @param {string} value
	 * @return {wp.media.view.Attachment} Returns itself to allow chaining.
	 */
	/**
	 * @function _syncArtist
	 * @memberOf wp.media.view.Attachment
	 * @instance
	 *
	 * @param {Backbone.Model} model
	 * @param {string} value
	 * @return {wp.media.view.Attachment} Returns itself to allow chaining.
	 */
	/**
	 * @function _syncAlbum
	 * @memberOf wp.media.view.Attachment
	 * @instance
	 *
	 * @param {Backbone.Model} model
	 * @param {string} value
	 * @return {wp.media.view.Attachment} Returns itself to allow chaining.
	 */
	Attachment.prototype[ method ] = function( model, value ) {
		var $setting = this.$('[data-setting="' + setting + '"]');

		if ( ! $setting.length ) {
			return this;
		}

		/*
		 * If the updated value is in sync with the value in the DOM, there
		 * is no need to re-render. If we're currently editing the value,
		 * it will automatically be in sync, suppressing the re-render for
		 * the view we're editing, while updating any others.
		 */
		if ( value === $setting.find('input, textarea, select, [value]').val() ) {
			return this;
		}

		return this.render();
	};
});

module.exports = Attachment;


/***/ },

/***/ 6090
(module) {

/* global ClipboardJS */
var Attachment = wp.media.view.Attachment,
	l10n = wp.media.view.l10n,
	$ = jQuery,
	Details,
	__ = wp.i18n.__;

Details = Attachment.extend(/** @lends wp.media.view.Attachment.Details.prototype */{
	tagName:   'div',
	className: 'attachment-details',
	template:  wp.template('attachment-details'),

	/*
	 * Reset all the attributes inherited from Attachment including role=checkbox,
	 * tabindex, etc., as they are inappropriate for this view. See #47458 and [30483] / #30390.
	 */
	attributes: {},

	events: {
		'change [data-setting]':          'updateSetting',
		'change [data-setting] input':    'updateSetting',
		'change [data-setting] select':   'updateSetting',
		'change [data-setting] textarea': 'updateSetting',
		'click .delete-attachment':       'deleteAttachment',
		'click .trash-attachment':        'trashAttachment',
		'click .untrash-attachment':      'untrashAttachment',
		'click .edit-attachment':         'editAttachment',
		'keydown':                        'toggleSelectionHandler'
	},

	/**
	 * Copies the attachment URL to the clipboard.
	 *
	 * @since 5.5.0
	 *
	 * @param {MouseEvent} event A click event.
	 *
	 * @return {void}
	 */
	 copyAttachmentDetailsURLClipboard: function() {
		var clipboard = new ClipboardJS( '.copy-attachment-url' ),
			successTimeout;

		clipboard.on( 'success', function( event ) {
			var triggerElement = $( event.trigger ),
				successElement = $( '.success', triggerElement.closest( '.copy-to-clipboard-container' ) );

			// Clear the selection and move focus back to the trigger.
			event.clearSelection();

			// Show success visual feedback.
			clearTimeout( successTimeout );
			successElement.removeClass( 'hidden' );

			// Hide success visual feedback after 3 seconds since last success.
			successTimeout = setTimeout( function() {
				successElement.addClass( 'hidden' );
			}, 3000 );

			// Handle success audible feedback.
			wp.a11y.speak( __( 'The file URL has been copied to your clipboard' ) );
		} );
	 },

	/**
	 * Shows the details of an attachment.
	 *
	 * @since 3.5.0
	 *
	 * @constructs wp.media.view.Attachment.Details
	 * @augments wp.media.view.Attachment
	 *
	 * @return {void}
	 */
	initialize: function() {
		this.options = _.defaults( this.options, {
			rerenderOnModelChange: false
		});

		// Call 'initialize' directly on the parent class.
		Attachment.prototype.initialize.apply( this, arguments );

		this.copyAttachmentDetailsURLClipboard();
	},

	/**
	 * Gets the focusable elements to move focus to.
	 *
	 * @since 5.3.0
	 */
	getFocusableElements: function() {
		var editedAttachment = $( 'li[data-id="' + this.model.id + '"]' );

		this.previousAttachment = editedAttachment.prev();
		this.nextAttachment = editedAttachment.next();
	},

	/**
	 * Moves focus to the previous or next attachment in the grid.
	 * Fallbacks to the upload button or media frame when there are no attachments.
	 *
	 * @since 5.3.0
	 */
	moveFocus: function() {
		if ( this.previousAttachment.length ) {
			this.previousAttachment.trigger( 'focus' );
			return;
		}

		if ( this.nextAttachment.length ) {
			this.nextAttachment.trigger( 'focus' );
			return;
		}

		// Fallback: move focus to the "Select Files" button in the media modal.
		if ( this.controller.uploader && this.controller.uploader.$browser ) {
			this.controller.uploader.$browser.trigger( 'focus' );
			return;
		}

		// Last fallback.
		this.moveFocusToLastFallback();
	},

	/**
	 * Moves focus to the media frame as last fallback.
	 *
	 * @since 5.3.0
	 */
	moveFocusToLastFallback: function() {
		// Last fallback: make the frame focusable and move focus to it.
		$( '.media-frame' )
			.attr( 'tabindex', '-1' )
			.trigger( 'focus' );
	},

	/**
	 * Deletes an attachment.
	 *
	 * Deletes an attachment after asking for confirmation. After deletion,
	 * keeps focus in the modal.
	 *
	 * @since 3.5.0
	 *
	 * @param {MouseEvent} event A click event.
	 *
	 * @return {void}
	 */
	deleteAttachment: function( event ) {
		event.preventDefault();

		this.getFocusableElements();

		if ( window.confirm( l10n.warnDelete ) ) {
			this.model.destroy( {
				wait: true,
				error: function() {
					window.alert( l10n.errorDeleting );
				}
			} );

			this.moveFocus();
		}
	},

	/**
	 * Sets the Trash state on an attachment, or destroys the model itself.
	 *
	 * If the mediaTrash setting is set to true, trashes the attachment.
	 * Otherwise, the model itself is destroyed.
	 *
	 * @since 3.9.0
	 *
	 * @param {MouseEvent} event A click event.
	 *
	 * @return {void}
	 */
	trashAttachment: function( event ) {
		var library = this.controller.library,
			self = this;
		event.preventDefault();

		this.getFocusableElements();

		// When in the Media Library and the Media Trash is enabled.
		if ( wp.media.view.settings.mediaTrash &&
			'edit-metadata' === this.controller.content.mode() ) {

			this.model.set( 'status', 'trash' );
			this.model.save().done( function() {
				library._requery( true );
				/*
				 * @todo We need to move focus back to the previous, next, or first
				 * attachment but the library gets re-queried and refreshed.
				 * Thus, the references to the previous attachments are lost.
				 * We need an alternate method.
				 */
				self.moveFocusToLastFallback();
			} );
		} else {
			this.model.destroy();
			this.moveFocus();
		}
	},

	/**
	 * Untrashes an attachment.
	 *
	 * @since 4.0.0
	 *
	 * @param {MouseEvent} event A click event.
	 *
	 * @return {void}
	 */
	untrashAttachment: function( event ) {
		var library = this.controller.library;
		event.preventDefault();

		this.model.set( 'status', 'inherit' );
		this.model.save().done( function() {
			library._requery( true );
		} );
	},

	/**
	 * Opens the edit page for a specific attachment.
	 *
	 * @since 3.5.0
	 *
	 * @param {MouseEvent} event A click event.
	 *
	 * @return {void}
	 */
	editAttachment: function( event ) {
		var editState = this.controller.states.get( 'edit-image' );
		if ( window.imageEdit && editState ) {
			event.preventDefault();

			editState.set( 'image', this.model );
			this.controller.setState( 'edit-image' );
		} else {
			this.$el.addClass('needs-refresh');
		}
	},

	/**
	 * Triggers an event on the controller when reverse tabbing (shift+tab).
	 *
	 * This event can be used to make sure to move the focus correctly.
	 *
	 * @since 4.0.0
	 *
	 * @fires wp.media.controller.MediaLibrary#attachment:details:shift-tab
	 * @fires wp.media.controller.MediaLibrary#attachment:keydown:arrow
	 *
	 * @param {KeyboardEvent} event A keyboard event.
	 *
	 * @return {boolean|void} Returns false or undefined.
	 */
	toggleSelectionHandler: function( event ) {
		if ( 'keydown' === event.type && 9 === event.keyCode && event.shiftKey && event.target === this.$( ':tabbable' ).get( 0 ) ) {
			this.controller.trigger( 'attachment:details:shift-tab', event );
			return false;
		}
	},

	render: function() {
		Attachment.prototype.render.apply( this, arguments );

		wp.media.mixin.removeAllPlayers();
		this.$( 'audio, video' ).each( function (i, elem) {
			var el = wp.media.view.MediaDetails.prepareSrc( elem );
			new window.MediaElementPlayer( el, wp.media.mixin.mejsSettings );
		} );
	}
});

module.exports = Details;


/***/ },

/***/ 5232
(module) {

/**
 * wp.media.view.Attachment.EditLibrary
 *
 * @memberOf wp.media.view.Attachment
 *
 * @class
 * @augments wp.media.view.Attachment
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
var EditLibrary = wp.media.view.Attachment.extend(/** @lends wp.media.view.Attachment.EditLibrary.prototype */{
	buttons: {
		close: true
	}
});

module.exports = EditLibrary;


/***/ },

/***/ 4593
(module) {

/**
 * wp.media.view.Attachment.EditSelection
 *
 * @memberOf wp.media.view.Attachment
 *
 * @class
 * @augments wp.media.view.Attachment.Selection
 * @augments wp.media.view.Attachment
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
var EditSelection = wp.media.view.Attachment.Selection.extend(/** @lends wp.media.view.Attachment.EditSelection.prototype */{
	buttons: {
		close: true
	}
});

module.exports = EditSelection;


/***/ },

/***/ 3443
(module) {

/**
 * wp.media.view.Attachment.Library
 *
 * @memberOf wp.media.view.Attachment
 *
 * @class
 * @augments wp.media.view.Attachment
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
var Library = wp.media.view.Attachment.extend(/** @lends wp.media.view.Attachment.Library.prototype */{
	buttons: {
		check: true
	}
});

module.exports = Library;


/***/ },

/***/ 3962
(module) {

/**
 * wp.media.view.Attachment.Selection
 *
 * @memberOf wp.media.view.Attachment
 *
 * @class
 * @augments wp.media.view.Attachment
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
var Selection = wp.media.view.Attachment.extend(/** @lends wp.media.view.Attachment.Selection.prototype */{
	className: 'attachment selection',

	// On click, just select the model, instead of removing the model from
	// the selection.
	toggleSelection: function() {
		this.options.selection.single( this.model );
	}
});

module.exports = Selection;


/***/ },

/***/ 8142
(module) {

var View = wp.media.View,
	$ = jQuery,
	Attachments,
	infiniteScrolling = wp.media.view.settings.infiniteScrolling;

Attachments = View.extend(/** @lends wp.media.view.Attachments.prototype */{
	tagName:   'ul',
	className: 'attachments',

	attributes: {
		tabIndex: -1
	},

	/**
	 * Represents the overview of attachments in the Media Library.
	 *
	 * The constructor binds events to the collection this view represents when
	 * adding or removing attachments or resetting the entire collection.
	 *
	 * @since 3.5.0
	 *
	 * @constructs
	 * @memberof wp.media.view
	 *
	 * @augments wp.media.View
	 *
	 * @listens collection:add
	 * @listens collection:remove
	 * @listens collection:reset
	 * @listens controller:library:selection:add
	 * @listens scrollElement:scroll
	 * @listens this:ready
	 * @listens controller:open
	 */
	initialize: function() {
		this.el.id = _.uniqueId('__attachments-view-');

		/**
		 * @since 5.8.0 Added the `infiniteScrolling` parameter.
		 *
		 * @param infiniteScrolling  Whether to enable infinite scrolling or use
		 *                           the default "load more" button.
		 * @param refreshSensitivity The time in milliseconds to throttle the scroll
		 *                           handler.
		 * @param refreshThreshold   The amount of pixels that should be scrolled before
		 *                           loading more attachments from the server.
		 * @param AttachmentView     The view class to be used for models in the
		 *                           collection.
		 * @param sortable           A jQuery sortable options object
		 *                           ( http://api.jqueryui.com/sortable/ ).
		 * @param resize             A boolean indicating whether or not to listen to
		 *                           resize events.
		 * @param idealColumnWidth   The width in pixels which a column should have when
		 *                           calculating the total number of columns.
		 */
		_.defaults( this.options, {
			infiniteScrolling:  infiniteScrolling || false,
			refreshSensitivity: wp.media.isTouchDevice ? 300 : 200,
			refreshThreshold:   3,
			AttachmentView:     wp.media.view.Attachment,
			sortable:           false,
			resize:             true,
			idealColumnWidth:   $( window ).width() < 640 ? 135 : 150
		});

		this._viewsByCid = {};
		this.$window = $( window );
		this.resizeEvent = 'resize.media-modal-columns';

		this.collection.on( 'add', function( attachment ) {
			this.views.add( this.createAttachmentView( attachment ), {
				at: this.collection.indexOf( attachment )
			});
		}, this );

		/*
		 * Find the view to be removed, delete it and call the remove function to clear
		 * any set event handlers.
		 */
		this.collection.on( 'remove', function( attachment ) {
			var view = this._viewsByCid[ attachment.cid ];
			delete this._viewsByCid[ attachment.cid ];

			if ( view ) {
				view.remove();
			}
		}, this );

		this.collection.on( 'reset', this.render, this );

		this.controller.on( 'library:selection:add', this.attachmentFocus, this );

		if ( this.options.infiniteScrolling ) {
			// Throttle the scroll handler and bind this.
			this.scroll = _.chain( this.scroll ).bind( this ).throttle( this.options.refreshSensitivity ).value();

			this.options.scrollElement = this.options.scrollElement || this.el;
			$( this.options.scrollElement ).on( 'scroll', this.scroll );
		}

		this.initSortable();

		_.bindAll( this, 'setColumns' );

		if ( this.options.resize ) {
			this.on( 'ready', this.bindEvents );
			this.controller.on( 'open', this.setColumns );

			/*
			 * Call this.setColumns() after this view has been rendered in the
			 * DOM so attachments get proper width applied.
			 */
			_.defer( this.setColumns, this );
		}
	},

	/**
	 * Listens to the resizeEvent on the window.
	 *
	 * Adjusts the amount of columns accordingly. First removes any existing event
	 * handlers to prevent duplicate listeners.
	 *
	 * @since 4.0.0
	 *
	 * @listens window:resize
	 *
	 * @return {void}
	 */
	bindEvents: function() {
		this.$window.off( this.resizeEvent ).on( this.resizeEvent, _.debounce( this.setColumns, 50 ) );
	},

	/**
	 * Focuses the first item in the collection.
	 *
	 * @since 4.0.0
	 *
	 * @return {void}
	 */
	attachmentFocus: function() {
		/*
		 * @todo When uploading new attachments, this tries to move focus to
		 * the attachments grid. Actually, a progress bar gets initially displayed
		 * and then updated when uploading completes, so focus is lost.
		 * Additionally: this view is used for both the attachments list and
		 * the list of selected attachments in the bottom media toolbar. Thus, when
		 * uploading attachments, it is called twice and returns two different `this`.
		 * `this.columns` is truthy within the modal.
		 */
		if ( this.columns ) {
			// Move focus to the grid list within the modal.
			this.$el.focus();
		}
	},

	/**
	 * Restores focus to the selected item in the collection.
	 *
	 * Moves focus back to the first selected attachment in the grid. Used when
	 * tabbing backwards from the attachment details sidebar.
	 * See media.view.AttachmentsBrowser.
	 *
	 * @since 4.0.0
	 *
	 * @return {void}
	 */
	restoreFocus: function() {
		this.$( 'li.selected:first' ).focus();
	},

	/**
	 * Handles events for arrow key presses.
	 *
	 * Focuses the attachment in the direction of the used arrow key if it exists.
	 *
	 * @since 4.0.0
	 *
	 * @param {KeyboardEvent} event The keyboard event that triggered this function.
	 *
	 * @return {void}
	 */
	arrowEvent: function( event ) {
		var attachments = this.$el.children( 'li' ),
			perRow = this.columns,
			index = attachments.filter( ':focus' ).index(),
			row = ( index + 1 ) <= perRow ? 1 : Math.ceil( ( index + 1 ) / perRow );

		if ( index === -1 ) {
			return;
		}

		// Left arrow = 37.
		if ( 37 === event.keyCode ) {
			if ( 0 === index ) {
				return;
			}
			attachments.eq( index - 1 ).focus();
		}

		// Up arrow = 38.
		if ( 38 === event.keyCode ) {
			if ( 1 === row ) {
				return;
			}
			attachments.eq( index - perRow ).focus();
		}

		// Right arrow = 39.
		if ( 39 === event.keyCode ) {
			if ( attachments.length === index ) {
				return;
			}
			attachments.eq( index + 1 ).focus();
		}

		// Down arrow = 40.
		if ( 40 === event.keyCode ) {
			if ( Math.ceil( attachments.length / perRow ) === row ) {
				return;
			}
			attachments.eq( index + perRow ).focus();
		}
	},

	/**
	 * Clears any set event handlers.
	 *
	 * @since 3.5.0
	 *
	 * @return {void}
	 */
	dispose: function() {
		this.collection.props.off( null, null, this );
		if ( this.options.resize ) {
			this.$window.off( this.resizeEvent );
		}

		// Call 'dispose' directly on the parent class.
		View.prototype.dispose.apply( this, arguments );
	},

	/**
	 * Calculates the amount of columns.
	 *
	 * Calculates the amount of columns and sets it on the data-columns attribute
	 * of .media-frame-content.
	 *
	 * @since 4.0.0
	 *
	 * @return {void}
	 */
	setColumns: function() {
		var prev = this.columns,
			width = this.$el.width();

		if ( width ) {
			this.columns = Math.min( Math.round( width / this.options.idealColumnWidth ), 12 ) || 1;

			if ( ! prev || prev !== this.columns ) {
				this.$el.closest( '.media-frame-content' ).attr( 'data-columns', this.columns );
			}
		}
	},

	/**
	 * Initializes jQuery sortable on the attachment list.
	 *
	 * Fails gracefully if jQuery sortable doesn't exist or isn't passed
	 * in the options.
	 *
	 * @since 3.5.0
	 *
	 * @fires collection:reset
	 *
	 * @return {void}
	 */
	initSortable: function() {
		var collection = this.collection;

		if ( ! this.options.sortable || ! $.fn.sortable ) {
			return;
		}

		this.$el.sortable( _.extend({
			// If the `collection` has a `comparator`, disable sorting.
			disabled: !! collection.comparator,

			/*
			 * Change the position of the attachment as soon as the mouse pointer
			 * overlaps a thumbnail.
			 */
			tolerance: 'pointer',

			// Record the initial `index` of the dragged model.
			start: function( event, ui ) {
				ui.item.data('sortableIndexStart', ui.item.index());
			},

			/*
			 * Update the model's index in the collection. Do so silently, as the view
			 * is already accurate.
			 */
			update: function( event, ui ) {
				var model = collection.at( ui.item.data('sortableIndexStart') ),
					comparator = collection.comparator;

				// Temporarily disable the comparator to prevent `add`
				// from re-sorting.
				delete collection.comparator;

				// Silently shift the model to its new index.
				collection.remove( model, {
					silent: true
				});
				collection.add( model, {
					silent: true,
					at:     ui.item.index()
				});

				// Restore the comparator.
				collection.comparator = comparator;

				// Fire the `reset` event to ensure other collections sync.
				collection.trigger( 'reset', collection );

				// If the collection is sorted by menu order, update the menu order.
				collection.saveMenuOrder();
			}
		}, this.options.sortable ) );

		/*
		 * If the `orderby` property is changed on the `collection`,
		 * check to see if we have a `comparator`. If so, disable sorting.
		 */
		collection.props.on( 'change:orderby', function() {
			this.$el.sortable( 'option', 'disabled', !! collection.comparator );
		}, this );

		this.collection.props.on( 'change:orderby', this.refreshSortable, this );
		this.refreshSortable();
	},

	/**
	 * Disables jQuery sortable if collection has a comparator or collection.orderby
	 * equals menuOrder.
	 *
	 * @since 3.5.0
	 *
	 * @return {void}
	 */
	refreshSortable: function() {
		if ( ! this.options.sortable || ! $.fn.sortable ) {
			return;
		}

		var collection = this.collection,
			orderby = collection.props.get('orderby'),
			enabled = 'menuOrder' === orderby || ! collection.comparator;

		this.$el.sortable( 'option', 'disabled', ! enabled );
	},

	/**
	 * Creates a new view for an attachment and adds it to _viewsByCid.
	 *
	 * @since 3.5.0
	 *
	 * @param {wp.media.model.Attachment} attachment
	 *
	 * @return {wp.media.View} The created view.
	 */
	createAttachmentView: function( attachment ) {
		var view = new this.options.AttachmentView({
			controller:           this.controller,
			model:                attachment,
			collection:           this.collection,
			selection:            this.options.selection
		});

		return this._viewsByCid[ attachment.cid ] = view;
	},

	/**
	 * Prepares view for display.
	 *
	 * Creates views for every attachment in collection if the collection is not
	 * empty, otherwise clears all views and loads more attachments.
	 *
	 * @since 3.5.0
	 *
	 * @return {void}
	 */
	prepare: function() {
		if ( this.collection.length ) {
			this.views.set( this.collection.map( this.createAttachmentView, this ) );
		} else {
			this.views.unset();
			if ( this.options.infiniteScrolling ) {
				this.collection.more().done( this.scroll );
			}
		}
	},

	/**
	 * Triggers the scroll function to check if we should query for additional
	 * attachments right away.
	 *
	 * @since 3.5.0
	 *
	 * @return {void}
	 */
	ready: function() {
		if ( this.options.infiniteScrolling ) {
			this.scroll();
		}
	},

	/**
	 * Handles scroll events.
	 *
	 * Shows the spinner if we're close to the bottom. Loads more attachments from
	 * server if we're {refreshThreshold} times away from the bottom.
	 *
	 * @since 3.5.0
	 *
	 * @return {void}
	 */
	scroll: function() {
		var view = this,
			el = this.options.scrollElement,
			scrollTop = el.scrollTop,
			toolbar;

		/*
		 * The scroll event occurs on the document, but the element that should be
		 * checked is the document body.
		 */
		if ( el === document ) {
			el = document.body;
			scrollTop = $(document).scrollTop();
		}

		if ( ! $(el).is(':visible') || ! this.collection.hasMore() ) {
			return;
		}

		toolbar = this.views.parent.toolbar;

		// Show the spinner only if we are close to the bottom.
		if ( el.scrollHeight - ( scrollTop + el.clientHeight ) < el.clientHeight / 3 ) {
			toolbar.get('spinner').show();
		}

		if ( el.scrollHeight < scrollTop + ( el.clientHeight * this.options.refreshThreshold ) ) {
			this.collection.more().done(function() {
				view.scroll();
				toolbar.get('spinner').hide();
			});
		}
	}
});

module.exports = Attachments;


/***/ },

/***/ 6829
(module) {

var View = wp.media.View,
	mediaTrash = wp.media.view.settings.mediaTrash,
	l10n = wp.media.view.l10n,
	$ = jQuery,
	AttachmentsBrowser,
	infiniteScrolling = wp.media.view.settings.infiniteScrolling,
	__ = wp.i18n.__,
	sprintf = wp.i18n.sprintf;

/**
 * wp.media.view.AttachmentsBrowser
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 *
 * @param {object}         [options]               The options hash passed to the view.
 * @param {boolean|string} [options.filters=false] Which filters to show in the browser's toolbar.
 *                                                 Accepts 'uploaded' and 'all'.
 * @param {boolean}        [options.search=true]   Whether to show the search interface in the
 *                                                 browser's toolbar.
 * @param {boolean}        [options.date=true]     Whether to show the date filter in the
 *                                                 browser's toolbar.
 * @param {boolean}        [options.display=false] Whether to show the attachments display settings
 *                                                 view in the sidebar.
 * @param {boolean|string} [options.sidebar=true]  Whether to create a sidebar for the browser.
 *                                                 Accepts true, false, and 'errors'.
 */
AttachmentsBrowser = View.extend(/** @lends wp.media.view.AttachmentsBrowser.prototype */{
	tagName:   'div',
	className: 'attachments-browser',

	initialize: function() {
		_.defaults( this.options, {
			filters: false,
			search:  true,
			date:    true,
			display: false,
			sidebar: true,
			AttachmentView: wp.media.view.Attachment.Library
		});

		this.controller.on( 'toggle:upload:attachment', this.toggleUploader, this );
		this.controller.on( 'edit:selection', this.editSelection );

		// In the Media Library, the sidebar is used to display errors before the attachments grid.
		if ( this.options.sidebar && 'errors' === this.options.sidebar ) {
			this.createSidebar();
		}

		/*
		 * In the grid mode (the Media Library), place the Inline Uploader before
		 * other sections so that the visual order and the DOM order match. This way,
		 * the Inline Uploader in the Media Library is right after the "Add New"
		 * button, see ticket #37188.
		 */
		if ( this.controller.isModeActive( 'grid' ) ) {
			this.createUploader();

			/*
			 * Create a multi-purpose toolbar. Used as main toolbar in the Media Library
			 * and also for other things, for example the "Drag and drop to reorder" and
			 * "Suggested dimensions" info in the media modal.
			 */
			this.createToolbar();
		} else {
			this.createToolbar();
			this.createUploader();
		}

		// Add a heading before the attachments list.
		this.createAttachmentsHeading();

		// Create the attachments wrapper view.
		this.createAttachmentsWrapperView();

		if ( ! infiniteScrolling ) {
			this.$el.addClass( 'has-load-more' );
			this.createLoadMoreView();
		}

		// For accessibility reasons, place the normal sidebar after the attachments, see ticket #36909.
		if ( this.options.sidebar && 'errors' !== this.options.sidebar ) {
			this.createSidebar();
		}

		this.updateContent();

		if ( ! infiniteScrolling ) {
			this.updateLoadMoreView();
		}

		if ( ! this.options.sidebar || 'errors' === this.options.sidebar ) {
			this.$el.addClass( 'hide-sidebar' );

			if ( 'errors' === this.options.sidebar ) {
				this.$el.addClass( 'sidebar-for-errors' );
			}
		}

		this.collection.on( 'add remove reset', this.updateContent, this );

		if ( ! infiniteScrolling ) {
			this.collection.on( 'add remove reset', this.updateLoadMoreView, this );
		}

		// The non-cached or cached attachments query has completed.
		this.collection.on( 'attachments:received', this.announceSearchResults, this );
	},

	/**
	 * Updates the `wp.a11y.speak()` ARIA live region with a message to communicate
	 * the number of search results to screen reader users. This function is
	 * debounced because the collection updates multiple times.
	 *
	 * @since 5.3.0
	 *
	 * @return {void}
	 */
	announceSearchResults: _.debounce( function() {
		var count,
			/* translators: Accessibility text. %d: Number of attachments found in a search. */
			mediaFoundHasMoreResultsMessage = __( 'Number of media items displayed: %d. Click load more for more results.' );

		if ( infiniteScrolling ) {
			/* translators: Accessibility text. %d: Number of attachments found in a search. */
			mediaFoundHasMoreResultsMessage = __( 'Number of media items displayed: %d. Scroll the page for more results.' );
		}

		if ( this.collection.mirroring && this.collection.mirroring.args.s ) {
			count = this.collection.length;

			if ( 0 === count ) {
				wp.a11y.speak( l10n.noMediaTryNewSearch );
				return;
			}

			if ( this.collection.hasMore() ) {
				wp.a11y.speak( mediaFoundHasMoreResultsMessage.replace( '%d', count ) );
				return;
			}

			wp.a11y.speak( l10n.mediaFound.replace( '%d', count ) );
		}
	}, 200 ),

	editSelection: function( modal ) {
		// When editing a selection, move focus to the "Go to library" button.
		modal.$( '.media-button-backToLibrary' ).focus();
	},

	/**
	 * @return {wp.media.view.AttachmentsBrowser} Returns itself to allow chaining.
	 */
	dispose: function() {
		this.options.selection.off( null, null, this );
		View.prototype.dispose.apply( this, arguments );
		return this;
	},

	createToolbar: function() {
		var LibraryViewSwitcher, Filters, toolbarOptions,
			showFilterByType = -1 !== $.inArray( this.options.filters, [ 'uploaded', 'all' ] );

		toolbarOptions = {
			controller: this.controller
		};

		if ( this.controller.isModeActive( 'grid' ) ) {
			toolbarOptions.className = 'media-toolbar wp-filter';
		}

		/**
		* @member {wp.media.view.Toolbar}
		*/
		this.toolbar = new wp.media.view.Toolbar( toolbarOptions );

		this.views.add( this.toolbar );

		this.toolbar.set( 'spinner', new wp.media.view.Spinner({
			priority: -20
		}) );

		if ( showFilterByType || this.options.date ) {
			/*
			 * Create a h2 heading before the select elements that filter attachments.
			 * This heading is visible in the modal and visually hidden in the grid.
			 */
			this.toolbar.set( 'filters-heading', new wp.media.view.Heading( {
				priority:   -100,
				text:       l10n.filterAttachments,
				level:      'h2',
				className:  'media-attachments-filter-heading screen-reader-text'
			}).render() );
		}

		if ( showFilterByType ) {
			// "Filters" is a <select>, a label element needs to be rendered before.
			this.toolbar.set( 'filtersLabel', new wp.media.view.Label({
				value: l10n.filterByType,
				attributes: {
					'for':  'media-attachment-filters'
				},
				priority:   -80
			}).render() );

			if ( 'uploaded' === this.options.filters ) {
				this.toolbar.set( 'filters', new wp.media.view.AttachmentFilters.Uploaded({
					controller: this.controller,
					model:      this.collection.props,
					priority:   -80
				}).render() );
			} else {
				Filters = new wp.media.view.AttachmentFilters.All({
					controller: this.controller,
					model:      this.collection.props,
					priority:   -80
				});

				this.toolbar.set( 'filters', Filters.render() );
			}
		}
		
		/*
		 * Feels odd to bring the global media library switcher into the Attachment browser view.
		 * Is this a use case for doAction( 'add:toolbar-items:attachments-browser', this.toolbar );
		 * which the controller can tap into and add this view?
		 */
		if ( this.controller.isModeActive( 'grid' ) ) {
			LibraryViewSwitcher = View.extend({
				className: 'view-switch media-grid-view-switch',
				template: wp.template( 'media-library-view-switcher')
			});

			this.toolbar.set( 'libraryViewSwitcher', new LibraryViewSwitcher({
				controller: this.controller,
				priority: -90
			}).render() );

			// DateFilter is a <select>, a label element needs to be rendered before.
			this.toolbar.set( 'dateFilter', new wp.media.view.Label({
				value: l10n.filterByDate,
				attributes: {
					'for': 'media-attachment-date-filters'
				},
				priority: -75
			}).render() );
			this.toolbar.set( 'dateFilter', new wp.media.view.DateFilter({
				controller: this.controller,
				model:      this.collection.props,
				priority:   -75,
			}).render() );

			// BulkSelection is a <div> with subviews, including screen reader text.
			this.toolbar.set( 'selectModeToggleButton', new wp.media.view.SelectModeToggleButton({
				text: l10n.bulkSelect,
				controller: this.controller,
				priority: -70
			}).render() );

			this.toolbar.set( 'deleteSelectedButton', new wp.media.view.DeleteSelectedButton({
				filters: Filters,
				style: 'primary',
				disabled: true,
				text: mediaTrash ? l10n.trashSelected : l10n.deletePermanently,
				controller: this.controller,
				priority: -80,
				click: function() {
					var changed = [], removed = [],
						selection = this.controller.state().get( 'selection' ),
						library = this.controller.state().get( 'library' );

					if ( ! selection.length ) {
						return;
					}

					if ( ! mediaTrash && ! window.confirm( l10n.warnBulkDelete ) ) {
						return;
					}

					if ( mediaTrash &&
						'trash' !== selection.at( 0 ).get( 'status' ) &&
						! window.confirm( l10n.warnBulkTrash ) ) {

						return;
					}

					selection.each( function( model ) {
						if ( ! model.get( 'nonces' )['delete'] ) {
							removed.push( model );
							return;
						}

						if ( mediaTrash && 'trash' === model.get( 'status' ) ) {
							model.set( 'status', 'inherit' );
							changed.push( model.save() );
							removed.push( model );
						} else if ( mediaTrash ) {
							model.set( 'status', 'trash' );
							changed.push( model.save() );
							removed.push( model );
						} else {
							model.destroy({wait: true});
						}
					} );

					if ( changed.length ) {
						selection.remove( removed );

						$.when.apply( null, changed ).then( _.bind( function() {
							library._requery( true );
							this.controller.trigger( 'selection:action:done' );
						}, this ) );
					} else {
						this.controller.trigger( 'selection:action:done' );
					}
				}
			}).render() );

			if ( mediaTrash ) {
				this.toolbar.set( 'deleteSelectedPermanentlyButton', new wp.media.view.DeleteSelectedPermanentlyButton({
					filters: Filters,
					style: 'link button-link-delete',
					disabled: true,
					text: l10n.deletePermanently,
					controller: this.controller,
					priority: -55,
					click: function() {
						var removed = [],
							destroy = [],
							selection = this.controller.state().get( 'selection' );

						if ( ! selection.length || ! window.confirm( l10n.warnBulkDelete ) ) {
							return;
						}

						selection.each( function( model ) {
							if ( ! model.get( 'nonces' )['delete'] ) {
								removed.push( model );
								return;
							}

							destroy.push( model );
						} );

						if ( removed.length ) {
							selection.remove( removed );
						}

						if ( destroy.length ) {
							$.when.apply( null, destroy.map( function (item) {
								return item.destroy();
							} ) ).then( _.bind( function() {
								this.controller.trigger( 'selection:action:done' );
							}, this ) );
						}
					}
				}).render() );
			}

		} else if ( this.options.date ) {
			// DateFilter is a <select>, a label element needs to be rendered before.
			this.toolbar.set( 'dateFilterLabel', new wp.media.view.Label({
				value: l10n.filterByDate,
				attributes: {
					'for': 'media-attachment-date-filters'
				},
				priority: -75
			}).render() );
			this.toolbar.set( 'dateFilter', new wp.media.view.DateFilter({
				controller: this.controller,
				model:      this.collection.props,
				priority:   -75
			}).render() );
		}

		if ( this.options.search ) {
			// Search is an input, a label element needs to be rendered before.
			this.toolbar.set( 'searchLabel', new wp.media.view.Label({
				value: l10n.searchLabel,
				className: 'media-search-input-label',
				attributes: {
					'for': 'media-search-input'
				},
				priority:   60
			}).render() );
			this.toolbar.set( 'search', new wp.media.view.Search({
				controller: this.controller,
				model:      this.collection.props,
				priority:   60
			}).render() );
		}

		if ( this.options.dragInfo ) {
			this.toolbar.set( 'dragInfo', new View({
				el: $( '<div class="instructions">' + l10n.dragInfo + '</div>' )[0],
				priority: -40
			}) );
		}

		if ( this.options.suggestedWidth && this.options.suggestedHeight ) {
			this.toolbar.set( 'suggestedDimensions', new View({
				el: $( '<div class="instructions">' + l10n.suggestedDimensions.replace( '%1$s', this.options.suggestedWidth ).replace( '%2$s', this.options.suggestedHeight ) + '</div>' )[0],
				priority: -40
			}) );
		}
	},

	updateContent: function() {
		var view = this,
			noItemsView;

		if ( this.controller.isModeActive( 'grid' ) ) {
			// Usually the media library.
			noItemsView = view.attachmentsNoResults;
		} else {
			// Usually the media modal.
			noItemsView = view.uploader;
		}

		if ( ! this.collection.length ) {
			this.toolbar.get( 'spinner' ).show();
			this.toolbar.$( '.media-bg-overlay' ).show();
			this.dfd = this.collection.more().done( function() {
				if ( ! view.collection.length ) {
					noItemsView.$el.removeClass( 'hidden' );
				} else {
					noItemsView.$el.addClass( 'hidden' );
				}
				view.toolbar.get( 'spinner' ).hide();
				view.toolbar.$( '.media-bg-overlay' ).hide();
			} );
		} else {
			noItemsView.$el.addClass( 'hidden' );
			view.toolbar.get( 'spinner' ).hide();
			this.toolbar.$( '.media-bg-overlay' ).hide();
		}
	},

	createUploader: function() {
		this.uploader = new wp.media.view.UploaderInline({
			controller: this.controller,
			status:     false,
			message:    this.controller.isModeActive( 'grid' ) ? '' : l10n.noItemsFound,
			canClose:   this.controller.isModeActive( 'grid' )
		});

		this.uploader.$el.addClass( 'hidden' );
		this.views.add( this.uploader );
	},

	toggleUploader: function() {
		if ( this.uploader.$el.hasClass( 'hidden' ) ) {
			this.uploader.show();
		} else {
			this.uploader.hide();
		}
	},

	/**
	 * Creates the Attachments wrapper view.
	 *
	 * @since 5.8.0
	 *
	 * @return {void}
	 */
	createAttachmentsWrapperView: function() {
		this.attachmentsWrapper = new wp.media.View( {
			className: 'attachments-wrapper'
		} );

		// Create the list of attachments.
		this.views.add( this.attachmentsWrapper );
		this.createAttachments();
	},

	createAttachments: function() {
		this.attachments = new wp.media.view.Attachments({
			controller:           this.controller,
			collection:           this.collection,
			selection:            this.options.selection,
			model:                this.model,
			sortable:             this.options.sortable,
			scrollElement:        this.options.scrollElement,
			idealColumnWidth:     this.options.idealColumnWidth,

			// The single `Attachment` view to be used in the `Attachments` view.
			AttachmentView: this.options.AttachmentView
		});

		// Add keydown listener to the instance of the Attachments view.
		this.controller.on( 'attachment:keydown:arrow',     _.bind( this.attachments.arrowEvent, this.attachments ) );
		this.controller.on( 'attachment:details:shift-tab', _.bind( this.attachments.restoreFocus, this.attachments ) );

		this.views.add( '.attachments-wrapper', this.attachments );

		if ( this.controller.isModeActive( 'grid' ) ) {
			this.attachmentsNoResults = new View({
				controller: this.controller,
				tagName: 'p'
			});

			this.attachmentsNoResults.$el.addClass( 'hidden no-media' );
			this.attachmentsNoResults.$el.html( l10n.noMedia );

			this.views.add( this.attachmentsNoResults );
		}
	},

	/**
	 * Creates the load more button and attachments counter view.
	 *
	 * @since 5.8.0
	 *
	 * @return {void}
	 */
	createLoadMoreView: function() {
		var view = this;

		this.loadMoreWrapper = new View( {
			controller: this.controller,
			className: 'load-more-wrapper'
		} );

		this.loadMoreCount = new View( {
			controller: this.controller,
			tagName: 'p',
			className: 'load-more-count hidden'
		} );

		this.loadMoreButton = new wp.media.view.Button( {
			text: __( 'Load more' ),
			className: 'load-more hidden',
			style: 'primary',
			size: '',
			click: function() {
				view.loadMoreAttachments();
			}
		} );

		this.loadMoreSpinner = new wp.media.view.Spinner();

		this.loadMoreJumpToFirst = new wp.media.view.Button( {
			text: __( 'Jump to first loaded item' ),
			className: 'load-more-jump hidden',
			size: '',
			click: function() {
				view.jumpToFirstAddedItem();
			}
		} );

		this.views.add( '.attachments-wrapper', this.loadMoreWrapper );
		this.views.add( '.load-more-wrapper', this.loadMoreSpinner );
		this.views.add( '.load-more-wrapper', this.loadMoreCount );
		this.views.add( '.load-more-wrapper', this.loadMoreButton );
		this.views.add( '.load-more-wrapper', this.loadMoreJumpToFirst );
	},

	/**
	 * Updates the Load More view. This function is debounced because the
	 * collection updates multiple times at the add, remove, and reset events.
	 * We need it to run only once, after all attachments are added or removed.
	 *
	 * @since 5.8.0
	 *
	 * @return {void}
	 */
	updateLoadMoreView: _.debounce( function() {
		// Ensure the load more view elements are initially hidden at each update.
		this.loadMoreButton.$el.addClass( 'hidden' );
		this.loadMoreCount.$el.addClass( 'hidden' );
		this.loadMoreJumpToFirst.$el.addClass( 'hidden' ).prop( 'disabled', true );

		if ( ! this.collection.getTotalAttachments() ) {
			return;
		}

		if ( this.collection.length ) {
			this.loadMoreCount.$el.text(
				/* translators: 1: Number of displayed attachments, 2: Number of total attachments. */
				sprintf(
					__( 'Showing %1$s of %2$s media items' ),
					this.collection.length,
					this.collection.getTotalAttachments()
				)
			);

			this.loadMoreCount.$el.removeClass( 'hidden' );
		}

		/*
		 * Notice that while the collection updates multiple times hasMore() may
		 * return true when it's actually not true.
		 */
		if ( this.collection.hasMore() ) {
			this.loadMoreButton.$el.removeClass( 'hidden' );
		}

		// Find the media item to move focus to. The jQuery `eq()` index is zero-based.
		this.firstAddedMediaItem = this.$el.find( '.attachment' ).eq( this.firstAddedMediaItemIndex );

		// If there's a media item to move focus to, make the "Jump to" button available.
		if ( this.firstAddedMediaItem.length ) {
			this.firstAddedMediaItem.addClass( 'new-media' );
			this.loadMoreJumpToFirst.$el.removeClass( 'hidden' ).prop( 'disabled', false );
		}

		// If there are new items added, but no more to be added, move focus to Jump button.
		if ( this.firstAddedMediaItem.length && ! this.collection.hasMore() ) {
			this.loadMoreJumpToFirst.$el.trigger( 'focus' );
		}
	}, 10 ),

	/**
	 * Loads more attachments.
	 *
	 * @since 5.8.0
	 *
	 * @return {void}
	 */
	loadMoreAttachments: function() {
		var view = this;

		if ( ! this.collection.hasMore() ) {
			return;
		}

		/*
		 * The collection index is zero-based while the length counts the actual
		 * amount of items. Thus the length is equivalent to the position of the
		 * first added item.
		 */
		this.firstAddedMediaItemIndex = this.collection.length;

		this.$el.addClass( 'more-loaded' );
		this.collection.each( function( attachment ) {
			var attach_id = attachment.attributes.id;
			$( '[data-id="' + attach_id + '"]' ).addClass( 'found-media' );
		});

		view.loadMoreSpinner.show();
		this.collection.once( 'attachments:received', function() {
			view.loadMoreSpinner.hide();
		} );
		this.collection.more();
	},

	/**
	 * Moves focus to the first new added item.	.
	 *
	 * @since 5.8.0
	 *
	 * @return {void}
	 */
	jumpToFirstAddedItem: function() {
		// Set focus on first added item.
		this.firstAddedMediaItem.focus();
	},

	createAttachmentsHeading: function() {
		this.attachmentsHeading = new wp.media.view.Heading( {
			text: l10n.attachmentsList,
			level: 'h2',
			className: 'media-views-heading screen-reader-text'
		} );
		this.views.add( this.attachmentsHeading );
	},

	createSidebar: function() {
		var options = this.options,
			selection = options.selection,
			sidebar = this.sidebar = new wp.media.view.Sidebar({
				controller: this.controller
			});

		this.views.add( sidebar );

		if ( this.controller.uploader ) {
			sidebar.set( 'uploads', new wp.media.view.UploaderStatus({
				controller: this.controller,
				priority:   40
			}) );
		}

		selection.on( 'selection:single', this.createSingle, this );
		selection.on( 'selection:unsingle', this.disposeSingle, this );

		if ( selection.single() ) {
			this.createSingle();
		}
	},

	createSingle: function() {
		var sidebar = this.sidebar,
			single = this.options.selection.single();

		sidebar.set( 'details', new wp.media.view.Attachment.Details({
			controller: this.controller,
			model:      single,
			priority:   80
		}) );

		sidebar.set( 'compat', new wp.media.view.AttachmentCompat({
			controller: this.controller,
			model:      single,
			priority:   120
		}) );

		if ( this.options.display ) {
			sidebar.set( 'display', new wp.media.view.Settings.AttachmentDisplay({
				controller:   this.controller,
				model:        this.model.display( single ),
				attachment:   single,
				priority:     160,
				userSettings: this.model.get('displayUserSettings')
			}) );
		}

		// Show the sidebar on mobile.
		if ( this.model.id === 'insert' ) {
			sidebar.$el.addClass( 'visible' );
		}
	},

	disposeSingle: function() {
		var sidebar = this.sidebar;
		sidebar.unset('details');
		sidebar.unset('compat');
		sidebar.unset('display');
		// Hide the sidebar on mobile.
		sidebar.$el.removeClass( 'visible' );
	}
});

module.exports = AttachmentsBrowser;


/***/ },

/***/ 3479
(module) {

var Attachments = wp.media.view.Attachments,
	Selection;

/**
 * wp.media.view.Attachments.Selection
 *
 * @memberOf wp.media.view.Attachments
 *
 * @class
 * @augments wp.media.view.Attachments
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
Selection = Attachments.extend(/** @lends wp.media.view.Attachments.Selection.prototype */{
	events: {},
	initialize: function() {
		_.defaults( this.options, {
			sortable:   false,
			resize:     false,

			// The single `Attachment` view to be used in the `Attachments` view.
			AttachmentView: wp.media.view.Attachment.Selection
		});
		// Call 'initialize' directly on the parent class.
		return Attachments.prototype.initialize.apply( this, arguments );
	}
});

module.exports = Selection;


/***/ },

/***/ 168
(module) {

var $ = Backbone.$,
	ButtonGroup;

/**
 * wp.media.view.ButtonGroup
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
ButtonGroup = wp.media.View.extend(/** @lends wp.media.view.ButtonGroup.prototype */{
	tagName:   'div',
	className: 'button-group button-large media-button-group',

	initialize: function() {
		/**
		 * @member {wp.media.view.Button[]}
		 */
		this.buttons = _.map( this.options.buttons || [], function( button ) {
			if ( button instanceof Backbone.View ) {
				return button;
			} else {
				return new wp.media.view.Button( button ).render();
			}
		});

		delete this.options.buttons;

		if ( this.options.classes ) {
			this.$el.addClass( this.options.classes );
		}
	},

	/**
	 * @return {wp.media.view.ButtonGroup}
	 */
	render: function() {
		this.$el.html( $( _.pluck( this.buttons, 'el' ) ).detach() );
		return this;
	}
});

module.exports = ButtonGroup;


/***/ },

/***/ 846
(module) {

/**
 * wp.media.view.Button
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
var Button = wp.media.View.extend(/** @lends wp.media.view.Button.prototype */{
	tagName:    'button',
	className:  'media-button',
	attributes: { type: 'button' },

	events: {
		'click': 'click'
	},

	defaults: {
		text:     '',
		style:    '',
		size:     'large',
		disabled: false
	},

	initialize: function() {
		/**
		 * Create a model with the provided `defaults`.
		 *
		 * @member {Backbone.Model}
		 */
		this.model = new Backbone.Model( this.defaults );

		// If any of the `options` have a key from `defaults`, apply its
		// value to the `model` and remove it from the `options` object.
		_.each( this.defaults, function( def, key ) {
			var value = this.options[ key ];
			if ( _.isUndefined( value ) ) {
				return;
			}

			this.model.set( key, value );
			delete this.options[ key ];
		}, this );

		this.listenTo( this.model, 'change', this.render );
	},
	/**
	 * @return {wp.media.view.Button} Returns itself to allow chaining.
	 */
	render: function() {
		var classes = [ 'button', this.className ],
			model = this.model.toJSON();

		if ( model.style ) {
			classes.push( 'button-' + model.style );
		}

		if ( model.size ) {
			classes.push( 'button-' + model.size );
		}

		classes = _.uniq( classes.concat( this.options.classes ) );
		this.el.className = classes.join(' ');

		this.$el.attr( 'disabled', model.disabled );
		this.$el.text( this.model.get('text') );

		return this;
	},
	/**
	 * @param {Object} event
	 */
	click: function( event ) {
		if ( '#' === this.attributes.href ) {
			event.preventDefault();
		}

		if ( this.options.click && ! this.model.get('disabled') ) {
			this.options.click.apply( this, arguments );
		}
	}
});

module.exports = Button;


/***/ },

/***/ 7637
(module) {

var View = wp.media.View,
	UploaderStatus = wp.media.view.UploaderStatus,
	l10n = wp.media.view.l10n,
	$ = jQuery,
	Cropper;

/**
 * wp.media.view.Cropper
 *
 * Uses the imgAreaSelect plugin to allow a user to crop an image.
 *
 * Takes imgAreaSelect options from
 * wp.customize.HeaderControl.calculateImageSelectOptions via
 * wp.customize.HeaderControl.openMM.
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
Cropper = View.extend(/** @lends wp.media.view.Cropper.prototype */{
	className: 'crop-content',
	template: wp.template('crop-content'),
	initialize: function() {
		_.bindAll(this, 'onImageLoad');
	},
	ready: function() {
		this.controller.frame.on('content:error:crop', this.onError, this);
		this.$image = this.$el.find('.crop-image');
		this.$image.on('load', this.onImageLoad);
		$(window).on('resize.cropper', _.debounce(this.onImageLoad, 250));
	},
	remove: function() {
		$(window).off('resize.cropper');
		this.$el.remove();
		this.$el.off();
		View.prototype.remove.apply(this, arguments);
	},
	prepare: function() {
		return {
			title: l10n.cropYourImage,
			url: this.options.attachment.get('url')
		};
	},
	onImageLoad: function() {
		var imgOptions = this.controller.get('imgSelectOptions'),
			imgSelect;

		if (typeof imgOptions === 'function') {
			imgOptions = imgOptions(this.options.attachment, this.controller);
		}

		imgOptions = _.extend(imgOptions, {
			parent: this.$el,
			onInit: function() {

				// Store the set ratio.
				var setRatio = imgSelect.getOptions().aspectRatio;

				// On mousedown, if no ratio is set and the Shift key is down, use a 1:1 ratio.
				this.parent.children().on( 'mousedown touchstart', function( e ) {

					// If no ratio is set and the shift key is down, use a 1:1 ratio.
					if ( ! setRatio && e.shiftKey ) {
						imgSelect.setOptions( {
							aspectRatio: '1:1'
						} );
					}
				} );

				this.parent.children().on( 'mouseup touchend', function() {

					// Restore the set ratio.
					imgSelect.setOptions( {
						aspectRatio: setRatio ? setRatio : false
					} );
				} );
			}
		} );
		this.trigger('image-loaded');
		imgSelect = this.controller.imgSelect = this.$image.imgAreaSelect(imgOptions);
	},
	onError: function() {
		var filename = this.options.attachment.get('filename');

		this.views.add( '.upload-errors', new wp.media.view.UploaderStatusError({
			filename: UploaderStatus.prototype.filename(filename),
			message: window._wpMediaViewsL10n.cropError
		}), { at: 0 });
	}
});

module.exports = Cropper;


/***/ },

/***/ 6126
(module) {

var View = wp.media.View,
	EditImage;

/**
 * wp.media.view.EditImage
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
EditImage = View.extend(/** @lends wp.media.view.EditImage.prototype */{
	className: 'image-editor',
	template: wp.template('image-editor'),

	initialize: function( options ) {
		this.editor = window.imageEdit;
		this.controller = options.controller;
		View.prototype.initialize.apply( this, arguments );
	},

	prepare: function() {
		return this.model.toJSON();
	},

	loadEditor: function() {
		this.editor.open( this.model.get( 'id' ), this.model.get( 'nonces' ).edit, this );
	},

	back: function() {
		var lastState = this.controller.lastState();
		this.controller.setState( lastState );
	},

	refresh: function() {
		this.model.fetch();
	},

	save: function() {
		var lastState = this.controller.lastState();

		this.model.fetch().done( _.bind( function() {
			this.controller.setState( lastState );
		}, this ) );
	}

});

module.exports = EditImage;


/***/ },

/***/ 5741
(module) {

/**
 * wp.media.view.Embed
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
var Embed = wp.media.View.extend(/** @lends wp.media.view.Ember.prototype */{
	className: 'media-embed',

	initialize: function() {
		/**
		 * @member {wp.media.view.EmbedUrl}
		 */
		this.url = new wp.media.view.EmbedUrl({
			controller: this.controller,
			model:      this.model.props
		}).render();

		this.views.set([ this.url ]);
		this.refresh();
		this.listenTo( this.model, 'change:type', this.refresh );
		this.listenTo( this.model, 'change:loading', this.loading );
	},

	/**
	 * @param {Object} view
	 */
	settings: function( view ) {
		if ( this._settings ) {
			this._settings.remove();
		}
		this._settings = view;
		this.views.add( view );
	},

	refresh: function() {
		var type = this.model.get('type'),
			constructor;

		if ( 'image' === type ) {
			constructor = wp.media.view.EmbedImage;
		} else if ( 'link' === type ) {
			constructor = wp.media.view.EmbedLink;
		} else {
			return;
		}

		this.settings( new constructor({
			controller: this.controller,
			model:      this.model.props,
			priority:   40
		}) );
	},

	loading: function() {
		this.$el.toggleClass( 'embed-loading', this.model.get('loading') );
	}
});

module.exports = Embed;


/***/ },

/***/ 2395
(module) {

var AttachmentDisplay = wp.media.view.Settings.AttachmentDisplay,
	EmbedImage;

/**
 * wp.media.view.EmbedImage
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.view.Settings.AttachmentDisplay
 * @augments wp.media.view.Settings
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
EmbedImage = AttachmentDisplay.extend(/** @lends wp.media.view.EmbedImage.prototype */{
	className: 'embed-media-settings',
	template:  wp.template('embed-image-settings'),

	initialize: function() {
		/**
		 * Call `initialize` directly on parent class with passed arguments
		 */
		AttachmentDisplay.prototype.initialize.apply( this, arguments );
		this.listenTo( this.model, 'change:url', this.updateImage );
	},

	updateImage: function() {
		this.$('img').attr( 'src', this.model.get('url') );
	}
});

module.exports = EmbedImage;


/***/ },

/***/ 8232
(module) {

var $ = jQuery,
	EmbedLink;

/**
 * wp.media.view.EmbedLink
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.view.Settings
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
EmbedLink = wp.media.view.Settings.extend(/** @lends wp.media.view.EmbedLink.prototype */{
	className: 'embed-link-settings',
	template:  wp.template('embed-link-settings'),

	initialize: function() {
		this.listenTo( this.model, 'change:url', this.updateoEmbed );
	},

	updateoEmbed: _.debounce( function() {
		var url = this.model.get( 'url' );

		// Clear out previous results.
		this.$('.embed-container').hide().find('.embed-preview').empty();
		this.$( '.setting' ).hide();

		// Only proceed with embed if the field contains more than 11 characters.
		// Example: http://a.io is 11 chars
		if ( url && ( url.length < 11 || ! url.match(/^http(s)?:\/\//) ) ) {
			return;
		}

		this.fetch();
	}, wp.media.controller.Embed.sensitivity ),

	fetch: function() {
		var url = this.model.get( 'url' ), re, youTubeEmbedMatch;

		// Check if they haven't typed in 500 ms.
		if ( $('#embed-url-field').val() !== url ) {
			return;
		}

		if ( this.dfd && 'pending' === this.dfd.state() ) {
			this.dfd.abort();
		}

		// Support YouTube embed urls, since they work once in the editor.
		re = /https?:\/\/www\.youtube\.com\/embed\/([^/]+)/;
		youTubeEmbedMatch = re.exec( url );
		if ( youTubeEmbedMatch ) {
			url = 'https://www.youtube.com/watch?v=' + youTubeEmbedMatch[ 1 ];
		}

		this.dfd = wp.apiRequest({
			url: wp.media.view.settings.oEmbedProxyUrl,
			data: {
				url: url,
				maxwidth: this.model.get( 'width' ),
				maxheight: this.model.get( 'height' )
			},
			type: 'GET',
			dataType: 'json',
			context: this
		})
			.done( function( response ) {
				this.renderoEmbed( {
					data: {
						body: response.html || ''
					}
				} );
			} )
			.fail( this.renderFail );
	},

	renderFail: function ( response, status ) {
		if ( 'abort' === status ) {
			return;
		}
		this.$( '.link-text' ).show();
	},

	renderoEmbed: function( response ) {
		var html = ( response && response.data && response.data.body ) || '';

		if ( html ) {
			this.$('.embed-container').show().find('.embed-preview').html( html );
		} else {
			this.renderFail();
		}
	}
});

module.exports = EmbedLink;


/***/ },

/***/ 7327
(module) {

var View = wp.media.View,
	$ = jQuery,
	l10n = wp.media.view.l10n,
	EmbedUrl;

/**
 * wp.media.view.EmbedUrl
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
EmbedUrl = View.extend(/** @lends wp.media.view.EmbedUrl.prototype */{
	tagName:   'span',
	className: 'embed-url',

	events: {
		'input': 'url'
	},

	initialize: function() {
		this.$input = $( '<input id="embed-url-field" type="url" />' )
			.attr( 'aria-label', l10n.insertFromUrlTitle )
			.val( this.model.get('url') );
		this.input = this.$input[0];

		this.spinner = $('<span class="spinner" />')[0];
		this.$el.append([ this.input, this.spinner ]);

		this.listenTo( this.model, 'change:url', this.render );

		if ( this.model.get( 'url' ) ) {
			_.delay( _.bind( function () {
				this.model.trigger( 'change:url' );
			}, this ), 500 );
		}
	},
	/**
	 * @return {wp.media.view.EmbedUrl} Returns itself to allow chaining.
	 */
	render: function() {
		var $input = this.$input;

		if ( $input.is(':focus') ) {
			return;
		}

		if ( this.model.get( 'url' ) ) {
			this.input.value = this.model.get('url');
		} else {
			this.input.setAttribute( 'placeholder', 'https://' );
		}

		/**
		 * Call `render` directly on parent class with passed arguments
		 */
		View.prototype.render.apply( this, arguments );
		return this;
	},

	url: function( event ) {
		var url = event.target.value || '';
		this.model.set( 'url', url.trim() );
	}
});

module.exports = EmbedUrl;


/***/ },

/***/ 718
(module) {

var $ = jQuery;

/**
 * wp.media.view.FocusManager
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
var FocusManager = wp.media.View.extend(/** @lends wp.media.view.FocusManager.prototype */{

	events: {
		'keydown': 'focusManagementMode'
	},

	/**
	 * Initializes the Focus Manager.
	 *
	 * @param {Object} options The Focus Manager options.
	 *
	 * @since 5.3.0
	 *
	 * @return {void}
	 */
	initialize: function( options ) {
		this.mode                    = options.mode || 'constrainTabbing';
		this.tabsAutomaticActivation = options.tabsAutomaticActivation || false;
	},

 	/**
	 * Determines which focus management mode to use.
	 *
	 * @since 5.3.0
	 *
	 * @param {Object} event jQuery event object.
	 *
	 * @return {void}
	 */
	focusManagementMode: function( event ) {
		if ( this.mode === 'constrainTabbing' ) {
			this.constrainTabbing( event );
		}

		if ( this.mode === 'tabsNavigation' ) {
			this.tabsNavigation( event );
		}
	},

	/**
	 * Gets all the tabbable elements.
	 *
	 * @since 5.3.0
	 *
	 * @return {Object} A jQuery collection of tabbable elements.
	 */
	getTabbables: function() {
		// Skip the file input added by Plupload.
		return this.$( ':tabbable' ).not( '.moxie-shim input[type="file"]' );
	},

	/**
	 * Moves focus to the modal dialog.
	 *
	 * @since 3.5.0
	 *
	 * @return {void}
	 */
	focus: function() {
		this.$( '.media-modal' ).trigger( 'focus' );
	},

	/**
	 * Constrains navigation with the Tab key within the media view element.
	 *
	 * @since 4.0.0
	 *
	 * @param {Object} event A keydown jQuery event.
	 *
	 * @return {void}
	 */
	constrainTabbing: function( event ) {
		var tabbables;

		// Look for the tab key.
		if ( 9 !== event.keyCode ) {
			return;
		}

		tabbables = this.getTabbables();

		// Keep tab focus within media modal while it's open.
		if ( tabbables.last()[0] === event.target && ! event.shiftKey ) {
			tabbables.first().focus();
			return false;
		} else if ( tabbables.first()[0] === event.target && event.shiftKey ) {
			tabbables.last().focus();
			return false;
		}
	},

	/**
	 * Hides from assistive technologies all the body children.
	 *
	 * Sets an `aria-hidden="true"` attribute on all the body children except
	 * the provided element and other elements that should not be hidden.
	 *
	 * The reason why we use `aria-hidden` is that `aria-modal="true"` is buggy
	 * in Safari 11.1 and support is spotty in other browsers. Also, `aria-modal="true"`
	 * prevents the `wp.a11y.speak()` ARIA live regions to work as they're outside
	 * of the modal dialog and get hidden from assistive technologies.
	 *
	 * @since 5.2.3
	 *
	 * @param {Object} visibleElement The jQuery object representing the element that should not be hidden.
	 *
	 * @return {void}
	 */
	setAriaHiddenOnBodyChildren: function( visibleElement ) {
		var bodyChildren,
			self = this;

		if ( this.isBodyAriaHidden ) {
			return;
		}

		// Get all the body children.
		bodyChildren = document.body.children;

		// Loop through the body children and hide the ones that should be hidden.
		_.each( bodyChildren, function( element ) {
			// Don't hide the modal element.
			if ( element === visibleElement[0] ) {
				return;
			}

			// Determine the body children to hide.
			if ( self.elementShouldBeHidden( element ) ) {
				element.setAttribute( 'aria-hidden', 'true' );
				// Store the hidden elements.
				self.ariaHiddenElements.push( element );
			}
		} );

		this.isBodyAriaHidden = true;
	},

	/**
	 * Unhides from assistive technologies all the body children.
	 *
	 * Makes visible again to assistive technologies all the body children
	 * previously hidden and stored in this.ariaHiddenElements.
	 *
	 * @since 5.2.3
	 *
	 * @return {void}
	 */
	removeAriaHiddenFromBodyChildren: function() {
		_.each( this.ariaHiddenElements, function( element ) {
			element.removeAttribute( 'aria-hidden' );
		} );

		this.ariaHiddenElements = [];
		this.isBodyAriaHidden   = false;
	},

	/**
	 * Determines if the passed element should not be hidden from assistive technologies.
	 *
	 * @since 5.2.3
	 *
	 * @param {Object} element The DOM element that should be checked.
	 *
	 * @return {boolean} Whether the element should not be hidden from assistive technologies.
	 */
	elementShouldBeHidden: function( element ) {
		var role = element.getAttribute( 'role' ),
			liveRegionsRoles = [ 'alert', 'status', 'log', 'marquee', 'timer' ];

		/*
		 * Don't hide scripts, elements that already have `aria-hidden`, and
		 * ARIA live regions.
		 */
		return ! (
			element.tagName === 'SCRIPT' ||
			element.hasAttribute( 'aria-hidden' ) ||
			element.hasAttribute( 'aria-live' ) ||
			liveRegionsRoles.indexOf( role ) !== -1
		);
	},

	/**
	 * Whether the body children are hidden from assistive technologies.
	 *
	 * @since 5.2.3
	 */
	isBodyAriaHidden: false,

	/**
	 * Stores an array of DOM elements that should be hidden from assistive
	 * technologies, for example when the media modal dialog opens.
	 *
	 * @since 5.2.3
	 */
	ariaHiddenElements: [],

	/**
	 * Holds the jQuery collection of ARIA tabs.
	 *
	 * @since 5.3.0
	 */
	tabs: $(),

	/**
	 * Sets up tabs in an ARIA tabbed interface.
	 *
	 * @since 5.3.0
	 *
	 * @param {Object} event jQuery event object.
	 *
	 * @return {void}
	 */
	setupAriaTabs: function() {
		this.tabs = this.$( '[role="tab"]' );

		// Set up initial attributes.
		this.tabs.attr( {
			'aria-selected': 'false',
			tabIndex: '-1'
		} );

		// Set up attributes on the initially active tab.
		this.tabs.filter( '.active' )
			.removeAttr( 'tabindex' )
			.attr( 'aria-selected', 'true' );
	},

	/**
	 * Enables arrows navigation within the ARIA tabbed interface.
	 *
	 * @since 5.3.0
	 *
	 * @param {Object} event jQuery event object.
	 *
	 * @return {void}
	 */
	tabsNavigation: function( event ) {
		var orientation = 'horizontal',
			keys = [ 32, 35, 36, 37, 38, 39, 40 ];

		// Return if not Spacebar, End, Home, or Arrow keys.
		if ( keys.indexOf( event.which ) === -1 ) {
			return;
		}

		// Determine navigation direction.
		if ( this.$el.attr( 'aria-orientation' ) === 'vertical' ) {
			orientation = 'vertical';
		}

		// Make Up and Down arrow keys do nothing with horizontal tabs.
		if ( orientation === 'horizontal' && [ 38, 40 ].indexOf( event.which ) !== -1 ) {
			return;
		}

		// Make Left and Right arrow keys do nothing with vertical tabs.
		if ( orientation === 'vertical' && [ 37, 39 ].indexOf( event.which ) !== -1 ) {
			return;
		}

		this.switchTabs( event, this.tabs );
	},

	/**
	 * Switches tabs in the ARIA tabbed interface.
	 *
	 * @since 5.3.0
	 *
	 * @param {Object} event jQuery event object.
	 *
	 * @return {void}
	 */
	switchTabs: function( event ) {
		var key   = event.which,
			index = this.tabs.index( $( event.target ) ),
			newIndex;

		switch ( key ) {
			// Space bar: Activate current targeted tab.
			case 32: {
				this.activateTab( this.tabs[ index ] );
				break;
			}
			// End key: Activate last tab.
			case 35: {
				event.preventDefault();
				this.activateTab( this.tabs[ this.tabs.length - 1 ] );
				break;
			}
			// Home key: Activate first tab.
			case 36: {
				event.preventDefault();
				this.activateTab( this.tabs[ 0 ] );
				break;
			}
			// Left and up keys: Activate previous tab.
			case 37:
			case 38: {
				event.preventDefault();
				newIndex = ( index - 1 ) < 0 ? this.tabs.length - 1 : index - 1;
				this.activateTab( this.tabs[ newIndex ] );
				break;
			}
			// Right and down keys: Activate next tab.
			case 39:
			case 40: {
				event.preventDefault();
				newIndex = ( index + 1 ) === this.tabs.length ? 0 : index + 1;
				this.activateTab( this.tabs[ newIndex ] );
				break;
			}
		}
	},

	/**
	 * Sets a single tab to be focusable and semantically selected.
	 *
	 * @since 5.3.0
	 *
	 * @param {Object} tab The tab DOM element.
	 *
	 * @return {void}
	 */
	activateTab: function( tab ) {
		if ( ! tab ) {
			return;
		}

		// The tab is a DOM element: no need for jQuery methods.
		tab.focus();

		// Handle automatic activation.
		if ( this.tabsAutomaticActivation ) {
			tab.removeAttribute( 'tabindex' );
			tab.setAttribute( 'aria-selected', 'true' );
			tab.click();

			return;
		}

		// Handle manual activation.
		$( tab ).on( 'click', function() {
			tab.removeAttribute( 'tabindex' );
			tab.setAttribute( 'aria-selected', 'true' );
		} );
 	}
});

module.exports = FocusManager;


/***/ },

/***/ 1061
(module) {

/**
 * wp.media.view.Frame
 *
 * A frame is a composite view consisting of one or more regions and one or more
 * states.
 *
 * @memberOf wp.media.view
 *
 * @see wp.media.controller.State
 * @see wp.media.controller.Region
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 * @mixes wp.media.controller.StateMachine
 */
var Frame = wp.media.View.extend(/** @lends wp.media.view.Frame.prototype */{
	initialize: function() {
		_.defaults( this.options, {
			mode: [ 'select' ]
		});
		this._createRegions();
		this._createStates();
		this._createModes();
	},

	_createRegions: function() {
		// Clone the regions array.
		this.regions = this.regions ? this.regions.slice() : [];

		// Initialize regions.
		_.each( this.regions, function( region ) {
			this[ region ] = new wp.media.controller.Region({
				view:     this,
				id:       region,
				selector: '.media-frame-' + region
			});
		}, this );
	},
	/**
	 * Create the frame's states.
	 *
	 * @see wp.media.controller.State
	 * @see wp.media.controller.StateMachine
	 *
	 * @fires wp.media.controller.State#ready
	 */
	_createStates: function() {
		// Create the default `states` collection.
		this.states = new Backbone.Collection( null, {
			model: wp.media.controller.State
		});

		// Ensure states have a reference to the frame.
		this.states.on( 'add', function( model ) {
			model.frame = this;
			model.trigger('ready');
		}, this );

		if ( this.options.states ) {
			this.states.add( this.options.states );
		}
	},

	/**
	 * A frame can be in a mode or multiple modes at one time.
	 *
	 * For example, the manage media frame can be in the `Bulk Select` or `Edit` mode.
	 */
	_createModes: function() {
		// Store active "modes" that the frame is in. Unrelated to region modes.
		this.activeModes = new Backbone.Collection();
		this.activeModes.on( 'add remove reset', _.bind( this.triggerModeEvents, this ) );

		_.each( this.options.mode, function( mode ) {
			this.activateMode( mode );
		}, this );
	},
	/**
	 * Reset all states on the frame to their defaults.
	 *
	 * @return {wp.media.view.Frame} Returns itself to allow chaining.
	 */
	reset: function() {
		this.states.invoke( 'trigger', 'reset' );
		return this;
	},
	/**
	 * Map activeMode collection events to the frame.
	 */
	triggerModeEvents: function( model, collection, options ) {
		var collectionEvent,
			modeEventMap = {
				add: 'activate',
				remove: 'deactivate'
			},
			eventToTrigger;
		// Probably a better way to do this.
		_.each( options, function( value, key ) {
			if ( value ) {
				collectionEvent = key;
			}
		} );

		if ( ! _.has( modeEventMap, collectionEvent ) ) {
			return;
		}

		eventToTrigger = model.get('id') + ':' + modeEventMap[collectionEvent];
		this.trigger( eventToTrigger );
	},
	/**
	 * Activate a mode on the frame.
	 *
	 * @param string mode Mode ID.
	 * @return {this} Returns itself to allow chaining.
	 */
	activateMode: function( mode ) {
		// Bail if the mode is already active.
		if ( this.isModeActive( mode ) ) {
			return;
		}
		this.activeModes.add( [ { id: mode } ] );
		// Add a CSS class to the frame so elements can be styled for the mode.
		this.$el.addClass( 'mode-' + mode );

		return this;
	},
	/**
	 * Deactivate a mode on the frame.
	 *
	 * @param string mode Mode ID.
	 * @return {this} Returns itself to allow chaining.
	 */
	deactivateMode: function( mode ) {
		// Bail if the mode isn't active.
		if ( ! this.isModeActive( mode ) ) {
			return this;
		}
		this.activeModes.remove( this.activeModes.where( { id: mode } ) );
		this.$el.removeClass( 'mode-' + mode );
		/**
		 * Frame mode deactivation event.
		 *
		 * @event wp.media.view.Frame#{mode}:deactivate
		 */
		this.trigger( mode + ':deactivate' );

		return this;
	},
	/**
	 * Check if a mode is enabled on the frame.
	 *
	 * @param string mode Mode ID.
	 * @return bool
	 */
	isModeActive: function( mode ) {
		return Boolean( this.activeModes.where( { id: mode } ).length );
	}
});

// Make the `Frame` a `StateMachine`.
_.extend( Frame.prototype, wp.media.controller.StateMachine.prototype );

module.exports = Frame;


/***/ },

/***/ 5424
(module) {

var Select = wp.media.view.MediaFrame.Select,
	l10n = wp.media.view.l10n,
	ImageDetails;

/**
 * wp.media.view.MediaFrame.ImageDetails
 *
 * A media frame for manipulating an image that's already been inserted
 * into a post.
 *
 * @memberOf wp.media.view.MediaFrame
 *
 * @class
 * @augments wp.media.view.MediaFrame.Select
 * @augments wp.media.view.MediaFrame
 * @augments wp.media.view.Frame
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 * @mixes wp.media.controller.StateMachine
 */
ImageDetails = Select.extend(/** @lends wp.media.view.MediaFrame.ImageDetails.prototype */{
	defaults: {
		id:      'image',
		url:     '',
		menu:    'image-details',
		content: 'image-details',
		toolbar: 'image-details',
		type:    'link',
		title:    l10n.imageDetailsTitle,
		priority: 120
	},

	initialize: function( options ) {
		this.image = new wp.media.model.PostImage( options.metadata );
		this.options.selection = new wp.media.model.Selection( this.image.attachment, { multiple: false } );
		Select.prototype.initialize.apply( this, arguments );
	},

	bindHandlers: function() {
		Select.prototype.bindHandlers.apply( this, arguments );
		this.on( 'menu:create:image-details', this.createMenu, this );
		this.on( 'content:create:image-details', this.imageDetailsContent, this );
		this.on( 'content:render:edit-image', this.editImageContent, this );
		this.on( 'toolbar:render:image-details', this.renderImageDetailsToolbar, this );
		// Override the select toolbar.
		this.on( 'toolbar:render:replace', this.renderReplaceImageToolbar, this );
	},

	createStates: function() {
		this.states.add([
			new wp.media.controller.ImageDetails({
				image: this.image,
				editable: false
			}),
			new wp.media.controller.ReplaceImage({
				id: 'replace-image',
				library: wp.media.query( { type: 'image' } ),
				image: this.image,
				multiple:  false,
				title:     l10n.imageReplaceTitle,
				toolbar: 'replace',
				priority:  80,
				displaySettings: true
			}),
			new wp.media.controller.EditImage( {
				image: this.image,
				selection: this.options.selection
			} )
		]);
	},

	imageDetailsContent: function( options ) {
		options.view = new wp.media.view.ImageDetails({
			controller: this,
			model: this.state().image,
			attachment: this.state().image.attachment
		});
	},

	editImageContent: function() {
		var state = this.state(),
			model = state.get('image'),
			view;

		if ( ! model ) {
			return;
		}

		view = new wp.media.view.EditImage( { model: model, controller: this } ).render();

		this.content.set( view );

		// After bringing in the frame, load the actual editor via an Ajax call.
		view.loadEditor();

	},

	renderImageDetailsToolbar: function() {
		this.toolbar.set( new wp.media.view.Toolbar({
			controller: this,
			items: {
				select: {
					style:    'primary',
					text:     l10n.update,
					priority: 80,

					click: function() {
						var controller = this.controller,
							state = controller.state();

						controller.close();

						// Not sure if we want to use wp.media.string.image which will create a shortcode or
						// perhaps wp.html.string to at least to build the <img />.
						state.trigger( 'update', controller.image.toJSON() );

						// Restore and reset the default state.
						controller.setState( controller.options.state );
						controller.reset();
					}
				}
			}
		}) );
	},

	renderReplaceImageToolbar: function() {
		var frame = this,
			lastState = frame.lastState(),
			previous = lastState && lastState.id;

		this.toolbar.set( new wp.media.view.Toolbar({
			controller: this,
			items: {
				back: {
					text:     l10n.back,
					priority: 80,
					click:    function() {
						if ( previous ) {
							frame.setState( previous );
						} else {
							frame.close();
						}
					}
				},

				replace: {
					style:    'primary',
					text:     l10n.replace,
					priority: 20,
					requires: { selection: true },

					click: function() {
						var controller = this.controller,
							state = controller.state(),
							selection = state.get( 'selection' ),
							attachment = selection.single();

						controller.close();

						controller.image.changeAttachment( attachment, state.display( attachment ) );

						// Not sure if we want to use wp.media.string.image which will create a shortcode or
						// perhaps wp.html.string to at least to build the <img />.
						state.trigger( 'replace', controller.image.toJSON() );

						// Restore and reset the default state.
						controller.setState( controller.options.state );
						controller.reset();
					}
				}
			}
		}) );
	}

});

module.exports = ImageDetails;


/***/ },

/***/ 4274
(module) {

var Select = wp.media.view.MediaFrame.Select,
	Library = wp.media.controller.Library,
	l10n = wp.media.view.l10n,
	Post;

/**
 * wp.media.view.MediaFrame.Post
 *
 * The frame for manipulating media on the Edit Post page.
 *
 * @memberOf wp.media.view.MediaFrame
 *
 * @class
 * @augments wp.media.view.MediaFrame.Select
 * @augments wp.media.view.MediaFrame
 * @augments wp.media.view.Frame
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 * @mixes wp.media.controller.StateMachine
 */
Post = Select.extend(/** @lends wp.media.view.MediaFrame.Post.prototype */{
	initialize: function() {
		this.counts = {
			audio: {
				count: wp.media.view.settings.attachmentCounts.audio,
				state: 'playlist'
			},
			video: {
				count: wp.media.view.settings.attachmentCounts.video,
				state: 'video-playlist'
			}
		};

		_.defaults( this.options, {
			multiple:  true,
			editing:   false,
			state:    'insert',
			metadata:  {}
		});

		// Call 'initialize' directly on the parent class.
		Select.prototype.initialize.apply( this, arguments );
		this.createIframeStates();

	},

	/**
	 * Create the default states.
	 */
	createStates: function() {
		var options = this.options;

		this.states.add([
			// Main states.
			new Library({
				id:         'insert',
				title:      l10n.insertMediaTitle,
				priority:   20,
				toolbar:    'main-insert',
				filterable: 'all',
				library:    wp.media.query( options.library ),
				multiple:   options.multiple ? 'reset' : false,
				editable:   true,

				// If the user isn't allowed to edit fields,
				// can they still edit it locally?
				allowLocalEdits: true,

				// Show the attachment display settings.
				displaySettings: true,
				// Update user settings when users adjust the
				// attachment display settings.
				displayUserSettings: true
			}),

			new Library({
				id:         'gallery',
				title:      l10n.createGalleryTitle,
				priority:   40,
				toolbar:    'main-gallery',
				filterable: 'uploaded',
				multiple:   'add',
				editable:   false,

				library:  wp.media.query( _.defaults({
					type: 'image'
				}, options.library ) )
			}),

			// Embed states.
			new wp.media.controller.Embed( { metadata: options.metadata } ),

			new wp.media.controller.EditImage( { model: options.editImage } ),

			// Gallery states.
			new wp.media.controller.GalleryEdit({
				library: options.selection,
				editing: options.editing,
				menu:    'gallery'
			}),

			new wp.media.controller.GalleryAdd(),

			new Library({
				id:         'playlist',
				title:      l10n.createPlaylistTitle,
				priority:   60,
				toolbar:    'main-playlist',
				filterable: 'uploaded',
				multiple:   'add',
				editable:   false,

				library:  wp.media.query( _.defaults({
					type: 'audio'
				}, options.library ) )
			}),

			// Playlist states.
			new wp.media.controller.CollectionEdit({
				type: 'audio',
				collectionType: 'playlist',
				title:          l10n.editPlaylistTitle,
				SettingsView:   wp.media.view.Settings.Playlist,
				library:        options.selection,
				editing:        options.editing,
				menu:           'playlist',
				dragInfoText:   l10n.playlistDragInfo,
				dragInfo:       false
			}),

			new wp.media.controller.CollectionAdd({
				type: 'audio',
				collectionType: 'playlist',
				title: l10n.addToPlaylistTitle
			}),

			new Library({
				id:         'video-playlist',
				title:      l10n.createVideoPlaylistTitle,
				priority:   60,
				toolbar:    'main-video-playlist',
				filterable: 'uploaded',
				multiple:   'add',
				editable:   false,

				library:  wp.media.query( _.defaults({
					type: 'video'
				}, options.library ) )
			}),

			new wp.media.controller.CollectionEdit({
				type: 'video',
				collectionType: 'playlist',
				title:          l10n.editVideoPlaylistTitle,
				SettingsView:   wp.media.view.Settings.Playlist,
				library:        options.selection,
				editing:        options.editing,
				menu:           'video-playlist',
				dragInfoText:   l10n.videoPlaylistDragInfo,
				dragInfo:       false
			}),

			new wp.media.controller.CollectionAdd({
				type: 'video',
				collectionType: 'playlist',
				title: l10n.addToVideoPlaylistTitle
			})
		]);

		if ( wp.media.view.settings.post.featuredImageId ) {
			this.states.add( new wp.media.controller.FeaturedImage() );
		}
	},

	bindHandlers: function() {
		var handlers, checkCounts;

		Select.prototype.bindHandlers.apply( this, arguments );

		this.on( 'activate', this.activate, this );

		// Only bother checking media type counts if one of the counts is zero.
		checkCounts = _.find( this.counts, function( type ) {
			return type.count === 0;
		} );

		if ( typeof checkCounts !== 'undefined' ) {
			this.listenTo( wp.media.model.Attachments.all, 'change:type', this.mediaTypeCounts );
		}

		this.on( 'menu:create:gallery', this.createMenu, this );
		this.on( 'menu:create:playlist', this.createMenu, this );
		this.on( 'menu:create:video-playlist', this.createMenu, this );
		this.on( 'toolbar:create:main-insert', this.createToolbar, this );
		this.on( 'toolbar:create:main-gallery', this.createToolbar, this );
		this.on( 'toolbar:create:main-playlist', this.createToolbar, this );
		this.on( 'toolbar:create:main-video-playlist', this.createToolbar, this );
		this.on( 'toolbar:create:featured-image', this.featuredImageToolbar, this );
		this.on( 'toolbar:create:main-embed', this.mainEmbedToolbar, this );

		handlers = {
			menu: {
				'default': 'mainMenu',
				'gallery': 'galleryMenu',
				'playlist': 'playlistMenu',
				'video-playlist': 'videoPlaylistMenu'
			},

			content: {
				'embed':          'embedContent',
				'edit-image':     'editImageContent',
				'edit-selection': 'editSelectionContent'
			},

			toolbar: {
				'main-insert':      'mainInsertToolbar',
				'main-gallery':     'mainGalleryToolbar',
				'gallery-edit':     'galleryEditToolbar',
				'gallery-add':      'galleryAddToolbar',
				'main-playlist':	'mainPlaylistToolbar',
				'playlist-edit':	'playlistEditToolbar',
				'playlist-add':		'playlistAddToolbar',
				'main-video-playlist': 'mainVideoPlaylistToolbar',
				'video-playlist-edit': 'videoPlaylistEditToolbar',
				'video-playlist-add': 'videoPlaylistAddToolbar'
			}
		};

		_.each( handlers, function( regionHandlers, region ) {
			_.each( regionHandlers, function( callback, handler ) {
				this.on( region + ':render:' + handler, this[ callback ], this );
			}, this );
		}, this );
	},

	activate: function() {
		// Hide menu items for states tied to particular media types if there are no items.
		_.each( this.counts, function( type ) {
			if ( type.count < 1 ) {
				this.menuItemVisibility( type.state, 'hide' );
			}
		}, this );
	},

	mediaTypeCounts: function( model, attr ) {
		if ( typeof this.counts[ attr ] !== 'undefined' && this.counts[ attr ].count < 1 ) {
			this.counts[ attr ].count++;
			this.menuItemVisibility( this.counts[ attr ].state, 'show' );
		}
	},

	// Menus.
	/**
	 * @param {wp.Backbone.View} view
	 */
	mainMenu: function( view ) {
		view.set({
			'library-separator': new wp.media.View({
				className:  'separator',
				priority:   100,
				attributes: {
					role: 'presentation'
				}
			})
		});
	},

	menuItemVisibility: function( state, visibility ) {
		var menu = this.menu.get();
		if ( visibility === 'hide' ) {
			menu.hide( state );
		} else if ( visibility === 'show' ) {
			menu.show( state );
		}
	},
	/**
	 * @param {wp.Backbone.View} view
	 */
	galleryMenu: function( view ) {
		var lastState = this.lastState(),
			previous = lastState && lastState.id,
			frame = this;

		view.set({
			cancel: {
				text:     l10n.cancelGalleryTitle,
				priority: 20,
				click:    function() {
					if ( previous ) {
						frame.setState( previous );
					} else {
						frame.close();
					}

					// Move focus to the modal after canceling a Gallery.
					this.controller.modal.focusManager.focus();
				}
			},
			separateCancel: new wp.media.View({
				className: 'separator',
				priority: 40
			})
		});
	},

	playlistMenu: function( view ) {
		var lastState = this.lastState(),
			previous = lastState && lastState.id,
			frame = this;

		view.set({
			cancel: {
				text:     l10n.cancelPlaylistTitle,
				priority: 20,
				click:    function() {
					if ( previous ) {
						frame.setState( previous );
					} else {
						frame.close();
					}

					// Move focus to the modal after canceling an Audio Playlist.
					this.controller.modal.focusManager.focus();
				}
			},
			separateCancel: new wp.media.View({
				className: 'separator',
				priority: 40
			})
		});
	},

	videoPlaylistMenu: function( view ) {
		var lastState = this.lastState(),
			previous = lastState && lastState.id,
			frame = this;

		view.set({
			cancel: {
				text:     l10n.cancelVideoPlaylistTitle,
				priority: 20,
				click:    function() {
					if ( previous ) {
						frame.setState( previous );
					} else {
						frame.close();
					}

					// Move focus to the modal after canceling a Video Playlist.
					this.controller.modal.focusManager.focus();
				}
			},
			separateCancel: new wp.media.View({
				className: 'separator',
				priority: 40
			})
		});
	},

	// Content.
	embedContent: function() {
		var view = new wp.media.view.Embed({
			controller: this,
			model:      this.state()
		}).render();

		this.content.set( view );
	},

	editSelectionContent: function() {
		var state = this.state(),
			selection = state.get('selection'),
			view;

		view = new wp.media.view.AttachmentsBrowser({
			controller: this,
			collection: selection,
			selection:  selection,
			model:      state,
			sortable:   true,
			search:     false,
			date:       false,
			dragInfo:   true,

			AttachmentView: wp.media.view.Attachments.EditSelection
		}).render();

		view.toolbar.set( 'backToLibrary', {
			text:     l10n.returnToLibrary,
			priority: -100,

			click: function() {
				this.controller.content.mode('browse');
				// Move focus to the modal when jumping back from Edit Selection to Add Media view.
				this.controller.modal.focusManager.focus();
			}
		});

		// Browse our library of attachments.
		this.content.set( view );

		// Trigger the controller to set focus.
		this.trigger( 'edit:selection', this );
	},

	editImageContent: function() {
		var image = this.state().get('image'),
			view = new wp.media.view.EditImage( { model: image, controller: this } ).render();

		this.content.set( view );

		// After creating the wrapper view, load the actual editor via an Ajax call.
		view.loadEditor();

	},

	// Toolbars.

	/**
	 * @param {wp.Backbone.View} view
	 */
	selectionStatusToolbar: function( view ) {
		var editable = this.state().get('editable');

		view.set( 'selection', new wp.media.view.Selection({
			controller: this,
			collection: this.state().get('selection'),
			priority:   -40,

			// If the selection is editable, pass the callback to
			// switch the content mode.
			editable: editable && function() {
				this.controller.content.mode('edit-selection');
			}
		}).render() );
	},

	/**
	 * @param {wp.Backbone.View} view
	 */
	mainInsertToolbar: function( view ) {
		var controller = this;

		this.selectionStatusToolbar( view );

		view.set( 'insert', {
			style:    'primary',
			priority: 80,
			text:     l10n.insertIntoPost,
			requires: { selection: true },

			/**
			 * @ignore
			 *
			 * @fires wp.media.controller.State#insert
			 */
			click: function() {
				var state = controller.state(),
					selection = state.get('selection');

				controller.close();
				state.trigger( 'insert', selection ).reset();
			}
		});
	},

	/**
	 * @param {wp.Backbone.View} view
	 */
	mainGalleryToolbar: function( view ) {
		var controller = this;

		this.selectionStatusToolbar( view );

		view.set( 'gallery', {
			style:    'primary',
			text:     l10n.createNewGallery,
			priority: 60,
			requires: { selection: true },

			click: function() {
				var selection = controller.state().get('selection'),
					edit = controller.state('gallery-edit'),
					models = selection.where({ type: 'image' });

				edit.set( 'library', new wp.media.model.Selection( models, {
					props:    selection.props.toJSON(),
					multiple: true
				}) );

				// Jump to Edit Gallery view.
				this.controller.setState( 'gallery-edit' );

				// Move focus to the modal after jumping to Edit Gallery view.
				this.controller.modal.focusManager.focus();
			}
		});
	},

	mainPlaylistToolbar: function( view ) {
		var controller = this;

		this.selectionStatusToolbar( view );

		view.set( 'playlist', {
			style:    'primary',
			text:     l10n.createNewPlaylist,
			priority: 100,
			requires: { selection: true },

			click: function() {
				var selection = controller.state().get('selection'),
					edit = controller.state('playlist-edit'),
					models = selection.where({ type: 'audio' });

				edit.set( 'library', new wp.media.model.Selection( models, {
					props:    selection.props.toJSON(),
					multiple: true
				}) );

				// Jump to Edit Audio Playlist view.
				this.controller.setState( 'playlist-edit' );

				// Move focus to the modal after jumping to Edit Audio Playlist view.
				this.controller.modal.focusManager.focus();
			}
		});
	},

	mainVideoPlaylistToolbar: function( view ) {
		var controller = this;

		this.selectionStatusToolbar( view );

		view.set( 'video-playlist', {
			style:    'primary',
			text:     l10n.createNewVideoPlaylist,
			priority: 100,
			requires: { selection: true },

			click: function() {
				var selection = controller.state().get('selection'),
					edit = controller.state('video-playlist-edit'),
					models = selection.where({ type: 'video' });

				edit.set( 'library', new wp.media.model.Selection( models, {
					props:    selection.props.toJSON(),
					multiple: true
				}) );

				// Jump to Edit Video Playlist view.
				this.controller.setState( 'video-playlist-edit' );

				// Move focus to the modal after jumping to Edit Video Playlist view.
				this.controller.modal.focusManager.focus();
			}
		});
	},

	featuredImageToolbar: function( toolbar ) {
		this.createSelectToolbar( toolbar, {
			text:  l10n.setFeaturedImage,
			state: this.options.state
		});
	},

	mainEmbedToolbar: function( toolbar ) {
		toolbar.view = new wp.media.view.Toolbar.Embed({
			controller: this
		});
	},

	galleryEditToolbar: function() {
		var editing = this.state().get('editing');
		this.toolbar.set( new wp.media.view.Toolbar({
			controller: this,
			items: {
				insert: {
					style:    'primary',
					text:     editing ? l10n.updateGallery : l10n.insertGallery,
					priority: 80,
					requires: { library: true, uploadingComplete: true },

					/**
					 * @fires wp.media.controller.State#update
					 */
					click: function() {
						var controller = this.controller,
							state = controller.state();

						controller.close();
						state.trigger( 'update', state.get('library') );

						// Restore and reset the default state.
						controller.setState( controller.options.state );
						controller.reset();
					}
				}
			}
		}) );
	},

	galleryAddToolbar: function() {
		this.toolbar.set( new wp.media.view.Toolbar({
			controller: this,
			items: {
				insert: {
					style:    'primary',
					text:     l10n.addToGallery,
					priority: 80,
					requires: { selection: true },

					/**
					 * @fires wp.media.controller.State#reset
					 */
					click: function() {
						var controller = this.controller,
							state = controller.state(),
							edit = controller.state('gallery-edit');

						edit.get('library').add( state.get('selection').models );
						state.trigger('reset');
						controller.setState('gallery-edit');
						// Move focus to the modal when jumping back from Add to Gallery to Edit Gallery view.
						this.controller.modal.focusManager.focus();
					}
				}
			}
		}) );
	},

	playlistEditToolbar: function() {
		var editing = this.state().get('editing');
		this.toolbar.set( new wp.media.view.Toolbar({
			controller: this,
			items: {
				insert: {
					style:    'primary',
					text:     editing ? l10n.updatePlaylist : l10n.insertPlaylist,
					priority: 80,
					requires: { library: true },

					/**
					 * @fires wp.media.controller.State#update
					 */
					click: function() {
						var controller = this.controller,
							state = controller.state();

						controller.close();
						state.trigger( 'update', state.get('library') );

						// Restore and reset the default state.
						controller.setState( controller.options.state );
						controller.reset();
					}
				}
			}
		}) );
	},

	playlistAddToolbar: function() {
		this.toolbar.set( new wp.media.view.Toolbar({
			controller: this,
			items: {
				insert: {
					style:    'primary',
					text:     l10n.addToPlaylist,
					priority: 80,
					requires: { selection: true },

					/**
					 * @fires wp.media.controller.State#reset
					 */
					click: function() {
						var controller = this.controller,
							state = controller.state(),
							edit = controller.state('playlist-edit');

						edit.get('library').add( state.get('selection').models );
						state.trigger('reset');
						controller.setState('playlist-edit');
						// Move focus to the modal when jumping back from Add to Audio Playlist to Edit Audio Playlist view.
						this.controller.modal.focusManager.focus();
					}
				}
			}
		}) );
	},

	videoPlaylistEditToolbar: function() {
		var editing = this.state().get('editing');
		this.toolbar.set( new wp.media.view.Toolbar({
			controller: this,
			items: {
				insert: {
					style:    'primary',
					text:     editing ? l10n.updateVideoPlaylist : l10n.insertVideoPlaylist,
					priority: 140,
					requires: { library: true },

					click: function() {
						var controller = this.controller,
							state = controller.state(),
							library = state.get('library');

						library.type = 'video';

						controller.close();
						state.trigger( 'update', library );

						// Restore and reset the default state.
						controller.setState( controller.options.state );
						controller.reset();
					}
				}
			}
		}) );
	},

	videoPlaylistAddToolbar: function() {
		this.toolbar.set( new wp.media.view.Toolbar({
			controller: this,
			items: {
				insert: {
					style:    'primary',
					text:     l10n.addToVideoPlaylist,
					priority: 140,
					requires: { selection: true },

					click: function() {
						var controller = this.controller,
							state = controller.state(),
							edit = controller.state('video-playlist-edit');

						edit.get('library').add( state.get('selection').models );
						state.trigger('reset');
						controller.setState('video-playlist-edit');
						// Move focus to the modal when jumping back from Add to Video Playlist to Edit Video Playlist view.
						this.controller.modal.focusManager.focus();
					}
				}
			}
		}) );
	}
});

module.exports = Post;


/***/ },

/***/ 455
(module) {

var MediaFrame = wp.media.view.MediaFrame,
	l10n = wp.media.view.l10n,
	Select;

/**
 * wp.media.view.MediaFrame.Select
 *
 * A frame for selecting an item or items from the media library.
 *
 * @memberOf wp.media.view.MediaFrame
 *
 * @class
 * @augments wp.media.view.MediaFrame
 * @augments wp.media.view.Frame
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 * @mixes wp.media.controller.StateMachine
 */
Select = MediaFrame.extend(/** @lends wp.media.view.MediaFrame.Select.prototype */{
	initialize: function() {
		// Call 'initialize' directly on the parent class.
		MediaFrame.prototype.initialize.apply( this, arguments );

		_.defaults( this.options, {
			selection: [],
			library:   {},
			multiple:  false,
			state:    'library'
		});

		this.createSelection();
		this.createStates();
		this.bindHandlers();
	},

	/**
	 * Attach a selection collection to the frame.
	 *
	 * A selection is a collection of attachments used for a specific purpose
	 * by a media frame. e.g. Selecting an attachment (or many) to insert into
	 * post content.
	 *
	 * @see media.model.Selection
	 */
	createSelection: function() {
		var selection = this.options.selection;

		if ( ! (selection instanceof wp.media.model.Selection) ) {
			this.options.selection = new wp.media.model.Selection( selection, {
				multiple: this.options.multiple
			});
		}

		this._selection = {
			attachments: new wp.media.model.Attachments(),
			difference: []
		};
	},

	editImageContent: function() {
		var image = this.state().get('image'),
			view = new wp.media.view.EditImage( { model: image, controller: this } ).render();

		this.content.set( view );

		// After creating the wrapper view, load the actual editor via an Ajax call.
		view.loadEditor();
	},

	/**
	 * Create the default states on the frame.
	 */
	createStates: function() {
		var options = this.options;

		if ( this.options.states ) {
			return;
		}

		// Add the default states.
		this.states.add([
			// Main states.
			new wp.media.controller.Library({
				library:   wp.media.query( options.library ),
				multiple:  options.multiple,
				title:     options.title,
				priority:  20
			}),
			new wp.media.controller.EditImage( { model: options.editImage } )
		]);
	},

	/**
	 * Bind region mode event callbacks.
	 *
	 * @see media.controller.Region.render
	 */
	bindHandlers: function() {
		this.on( 'router:create:browse', this.createRouter, this );
		this.on( 'router:render:browse', this.browseRouter, this );
		this.on( 'content:create:browse', this.browseContent, this );
		this.on( 'content:render:upload', this.uploadContent, this );
		this.on( 'toolbar:create:select', this.createSelectToolbar, this );
		this.on( 'content:render:edit-image', this.editImageContent, this );
	},

	/**
	 * Render callback for the router region in the `browse` mode.
	 *
	 * @param {wp.media.view.Router} routerView
	 */
	browseRouter: function( routerView ) {
		routerView.set({
			upload: {
				text:     l10n.uploadFilesTitle,
				priority: 20
			},
			browse: {
				text:     l10n.mediaLibraryTitle,
				priority: 40
			}
		});
	},

	/**
	 * Render callback for the content region in the `browse` mode.
	 *
	 * @param {wp.media.controller.Region} contentRegion
	 */
	browseContent: function( contentRegion ) {
		var state = this.state();

		this.$el.removeClass('hide-toolbar');

		// Browse our library of attachments.
		contentRegion.view = new wp.media.view.AttachmentsBrowser({
			controller: this,
			collection: state.get('library'),
			selection:  state.get('selection'),
			model:      state,
			sortable:   state.get('sortable'),
			search:     state.get('searchable'),
			filters:    state.get('filterable'),
			date:       state.get('date'),
			display:    state.has('display') ? state.get('display') : state.get('displaySettings'),
			dragInfo:   state.get('dragInfo'),

			idealColumnWidth: state.get('idealColumnWidth'),
			suggestedWidth:   state.get('suggestedWidth'),
			suggestedHeight:  state.get('suggestedHeight'),

			AttachmentView: state.get('AttachmentView')
		});
	},

	/**
	 * Render callback for the content region in the `upload` mode.
	 */
	uploadContent: function() {
		this.$el.removeClass( 'hide-toolbar' );
		this.content.set( new wp.media.view.UploaderInline({
			controller: this
		}) );
	},

	/**
	 * Toolbars
	 *
	 * @param {Object} toolbar
	 * @param {Object} [options={}]
	 * @this wp.media.controller.Region
	 */
	createSelectToolbar: function( toolbar, options ) {
		options = options || this.options.button || {};
		options.controller = this;

		toolbar.view = new wp.media.view.Toolbar.Select( options );
	}
});

module.exports = Select;


/***/ },

/***/ 170
(module) {

/**
 * wp.media.view.Heading
 *
 * A reusable heading component for the media library
 *
 * Used to add accessibility friendly headers in the media library/modal.
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
var Heading = wp.media.View.extend( {
	tagName: function() {
		return this.options.level || 'h1';
	},
	className: 'media-views-heading',

	initialize: function() {

		if ( this.options.className ) {
			this.$el.addClass( this.options.className );
		}

		this.text = this.options.text;
	},

	render: function() {
		this.$el.html( this.text );
		return this;
	}
} );

module.exports = Heading;


/***/ },

/***/ 1982
(module) {

/**
 * wp.media.view.Iframe
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
var Iframe = wp.media.View.extend(/** @lends wp.media.view.Iframe.prototype */{
	className: 'media-iframe',
	/**
	 * @return {wp.media.view.Iframe} Returns itself to allow chaining.
	 */
	render: function() {
		this.views.detach();
		this.$el.html( '<iframe src="' + this.controller.state().get('src') + '" />' );
		this.views.render();
		return this;
	}
});

module.exports = Iframe;


/***/ },

/***/ 2650
(module) {

var AttachmentDisplay = wp.media.view.Settings.AttachmentDisplay,
	$ = jQuery,
	ImageDetails;

/**
 * wp.media.view.ImageDetails
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.view.Settings.AttachmentDisplay
 * @augments wp.media.view.Settings
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
ImageDetails = AttachmentDisplay.extend(/** @lends wp.media.view.ImageDetails.prototype */{
	className: 'image-details',
	template:  wp.template('image-details'),
	events: _.defaults( AttachmentDisplay.prototype.events, {
		'click .edit-attachment': 'editAttachment',
		'click .replace-attachment': 'replaceAttachment',
		'click .advanced-toggle': 'onToggleAdvanced',
		'change [data-setting="customWidth"]': 'onCustomSize',
		'change [data-setting="customHeight"]': 'onCustomSize',
		'keyup [data-setting="customWidth"]': 'onCustomSize',
		'keyup [data-setting="customHeight"]': 'onCustomSize'
	} ),
	initialize: function() {
		// Used in AttachmentDisplay.prototype.updateLinkTo.
		this.options.attachment = this.model.attachment;
		this.listenTo( this.model, 'change:url', this.updateUrl );
		this.listenTo( this.model, 'change:link', this.toggleLinkSettings );
		this.listenTo( this.model, 'change:size', this.toggleCustomSize );

		AttachmentDisplay.prototype.initialize.apply( this, arguments );
	},

	prepare: function() {
		var attachment = false;

		if ( this.model.attachment ) {
			attachment = this.model.attachment.toJSON();
		}
		return _.defaults({
			model: this.model.toJSON(),
			attachment: attachment
		}, this.options );
	},

	render: function() {
		var args = arguments;

		if ( this.model.attachment && 'pending' === this.model.dfd.state() ) {
			this.model.dfd
				.done( _.bind( function() {
					AttachmentDisplay.prototype.render.apply( this, args );
					this.postRender();
				}, this ) )
				.fail( _.bind( function() {
					this.model.attachment = false;
					AttachmentDisplay.prototype.render.apply( this, args );
					this.postRender();
				}, this ) );
		} else {
			AttachmentDisplay.prototype.render.apply( this, arguments );
			this.postRender();
		}

		return this;
	},

	postRender: function() {
		setTimeout( _.bind( this.scrollToTop, this ), 10 );
		this.toggleLinkSettings();
		if ( window.getUserSetting( 'advImgDetails' ) === 'show' ) {
			this.toggleAdvanced( true );
		}
		this.trigger( 'post-render' );
	},

	scrollToTop: function() {
		this.$( '.embed-media-settings' ).scrollTop( 0 );
	},

	updateUrl: function() {
		this.$( '.image img' ).attr( 'src', this.model.get( 'url' ) );
		this.$( '.url' ).val( this.model.get( 'url' ) );
	},

	toggleLinkSettings: function() {
		if ( this.model.get( 'link' ) === 'none' ) {
			this.$( '.link-settings' ).addClass('hidden');
		} else {
			this.$( '.link-settings' ).removeClass('hidden');
		}
	},

	toggleCustomSize: function() {
		if ( this.model.get( 'size' ) !== 'custom' ) {
			this.$( '.custom-size' ).addClass('hidden');
		} else {
			this.$( '.custom-size' ).removeClass('hidden');
		}
	},

	onCustomSize: function( event ) {
		var dimension = $( event.target ).data('setting'),
			num = $( event.target ).val(),
			value;

		// Ignore bogus input.
		if ( ! /^\d+/.test( num ) || parseInt( num, 10 ) < 1 ) {
			event.preventDefault();
			return;
		}

		if ( dimension === 'customWidth' ) {
			value = Math.round( 1 / this.model.get( 'aspectRatio' ) * num );
			this.model.set( 'customHeight', value, { silent: true } );
			this.$( '[data-setting="customHeight"]' ).val( value );
		} else {
			value = Math.round( this.model.get( 'aspectRatio' ) * num );
			this.model.set( 'customWidth', value, { silent: true  } );
			this.$( '[data-setting="customWidth"]' ).val( value );
		}
	},

	onToggleAdvanced: function( event ) {
		event.preventDefault();
		this.toggleAdvanced();
	},

	toggleAdvanced: function( show ) {
		var $advanced = this.$el.find( '.advanced-section' ),
			mode;

		if ( $advanced.hasClass('advanced-visible') || show === false ) {
			$advanced.removeClass('advanced-visible');
			$advanced.find('.advanced-settings').addClass('hidden');
			mode = 'hide';
		} else {
			$advanced.addClass('advanced-visible');
			$advanced.find('.advanced-settings').removeClass('hidden');
			mode = 'show';
		}

		window.setUserSetting( 'advImgDetails', mode );
	},

	editAttachment: function( event ) {
		var editState = this.controller.states.get( 'edit-image' );

		if ( window.imageEdit && editState ) {
			event.preventDefault();
			editState.set( 'image', this.model.attachment );
			this.controller.setState( 'edit-image' );
		}
	},

	replaceAttachment: function( event ) {
		event.preventDefault();
		this.controller.setState( 'replace-image' );
	}
});

module.exports = ImageDetails;


/***/ },

/***/ 4338
(module) {

/**
 * wp.media.view.Label
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
var Label = wp.media.View.extend(/** @lends wp.media.view.Label.prototype */{
	tagName: 'label',

	initialize: function() {
		this.value = this.options.value;
	},

	render: function() {
		this.$el.html( this.value );

		return this;
	}
});

module.exports = Label;


/***/ },

/***/ 2836
(module) {

var Frame = wp.media.view.Frame,
	l10n = wp.media.view.l10n,
	$ = jQuery,
	MediaFrame;

/**
 * wp.media.view.MediaFrame
 *
 * The frame used to create the media modal.
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.view.Frame
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 * @mixes wp.media.controller.StateMachine
 */
MediaFrame = Frame.extend(/** @lends wp.media.view.MediaFrame.prototype */{
	className: 'media-frame',
	template:  wp.template('media-frame'),
	regions:   ['menu','title','content','toolbar','router'],

	events: {
		'click .media-frame-menu-toggle': 'toggleMenu'
	},

	/**
	 * @constructs
	 */
	initialize: function() {
		Frame.prototype.initialize.apply( this, arguments );

		_.defaults( this.options, {
			title:    l10n.mediaFrameDefaultTitle,
			modal:    true,
			uploader: true
		});

		// Ensure core UI is enabled.
		this.$el.addClass('wp-core-ui');

		// Initialize modal container view.
		if ( this.options.modal ) {
			this.modal = new wp.media.view.Modal({
				controller: this,
				title:      this.options.title
			});

			this.modal.content( this );
		}

		// Force the uploader off if the upload limit has been exceeded or
		// if the browser isn't supported.
		if ( wp.Uploader.limitExceeded || ! wp.Uploader.browser.supported ) {
			this.options.uploader = false;
		}

		// Initialize window-wide uploader.
		if ( this.options.uploader ) {
			this.uploader = new wp.media.view.UploaderWindow({
				controller: this,
				uploader: {
					dropzone:  this.modal ? this.modal.$el : this.$el,
					container: this.$el
				}
			});
			this.views.set( '.media-frame-uploader', this.uploader );
		}

		this.on( 'attach', _.bind( this.views.ready, this.views ), this );

		// Bind default title creation.
		this.on( 'title:create:default', this.createTitle, this );
		this.title.mode('default');

		// Bind default menu.
		this.on( 'menu:create:default', this.createMenu, this );

		// Set the menu ARIA tab panel attributes when the modal opens.
		this.on( 'open', this.setMenuTabPanelAriaAttributes, this );
		// Set the router ARIA tab panel attributes when the modal opens.
		this.on( 'open', this.setRouterTabPanelAriaAttributes, this );

		// Update the menu ARIA tab panel attributes when the content updates.
		this.on( 'content:render', this.setMenuTabPanelAriaAttributes, this );
		// Update the router ARIA tab panel attributes when the content updates.
		this.on( 'content:render', this.setRouterTabPanelAriaAttributes, this );
	},

	/**
	 * Sets the attributes to be used on the menu ARIA tab panel.
	 *
	 * @since 5.3.0
	 *
	 * @return {void}
	 */
	setMenuTabPanelAriaAttributes: function() {
		var stateId = this.state().get( 'id' ),
			tabPanelEl = this.$el.find( '.media-frame-tab-panel' ),
			ariaLabelledby;

		tabPanelEl.removeAttr( 'role aria-labelledby' );

		if ( this.state().get( 'menu' ) && this.menuView && this.menuView.isVisible ) {
			ariaLabelledby = 'menu-item-' + stateId;

			// Set the tab panel attributes only if the tabs are visible.
			tabPanelEl
				.attr( {
					role: 'tabpanel',
					'aria-labelledby': ariaLabelledby,
				} );
		}
	},

	/**
	 * Sets the attributes to be used on the router ARIA tab panel.
	 *
	 * @since 5.3.0
	 *
	 * @return {void}
	 */
	setRouterTabPanelAriaAttributes: function() {
		var tabPanelEl = this.$el.find( '.media-frame-content' ),
			ariaLabelledby;

		tabPanelEl.removeAttr( 'role aria-labelledby' );

		// Set the tab panel attributes only if the tabs are visible.
		if ( this.state().get( 'router' ) && this.routerView && this.routerView.isVisible && this.content._mode ) {
			ariaLabelledby = 'menu-item-' + this.content._mode;

			tabPanelEl
				.attr( {
					role: 'tabpanel',
					'aria-labelledby': ariaLabelledby,
				} );
		}
	},

	/**
	 * @return {wp.media.view.MediaFrame} Returns itself to allow chaining.
	 */
	render: function() {
		// Activate the default state if no active state exists.
		if ( ! this.state() && this.options.state ) {
			this.setState( this.options.state );
		}
		/**
		 * call 'render' directly on the parent class
		 */
		return Frame.prototype.render.apply( this, arguments );
	},
	/**
	 * @param {Object} title
	 * @this wp.media.controller.Region
	 */
	createTitle: function( title ) {
		title.view = new wp.media.View({
			controller: this,
			tagName: 'h1'
		});
	},
	/**
	 * @param {Object} menu
	 * @this wp.media.controller.Region
	 */
	createMenu: function( menu ) {
		menu.view = new wp.media.view.Menu({
			controller: this,

			attributes: {
				role:               'tablist',
				'aria-orientation': 'vertical'
			}
		});

		this.menuView = menu.view;
	},

	toggleMenu: function( event ) {
		var menu = this.$el.find( '.media-menu' );

		menu.toggleClass( 'visible' );
		$( event.target ).attr( 'aria-expanded', menu.hasClass( 'visible' ) );
	},

	/**
	 * @param {Object} toolbar
	 * @this wp.media.controller.Region
	 */
	createToolbar: function( toolbar ) {
		toolbar.view = new wp.media.view.Toolbar({
			controller: this
		});
	},
	/**
	 * @param {Object} router
	 * @this wp.media.controller.Region
	 */
	createRouter: function( router ) {
		router.view = new wp.media.view.Router({
			controller: this,

			attributes: {
				role:               'tablist',
				'aria-orientation': 'horizontal'
			}
		});

		this.routerView = router.view;
	},
	/**
	 * @param {Object} options
	 */
	createIframeStates: function( options ) {
		var settings = wp.media.view.settings,
			tabs = settings.tabs,
			tabUrl = settings.tabUrl,
			$postId;

		if ( ! tabs || ! tabUrl ) {
			return;
		}

		// Add the post ID to the tab URL if it exists.
		$postId = $('#post_ID');
		if ( $postId.length ) {
			tabUrl += '&post_id=' + $postId.val();
		}

		// Generate the tab states.
		_.each( tabs, function( title, id ) {
			this.state( 'iframe:' + id ).set( _.defaults({
				tab:     id,
				src:     tabUrl + '&tab=' + id,
				title:   title,
				content: 'iframe',
				menu:    'default'
			}, options ) );
		}, this );

		this.on( 'content:create:iframe', this.iframeContent, this );
		this.on( 'content:deactivate:iframe', this.iframeContentCleanup, this );
		this.on( 'menu:render:default', this.iframeMenu, this );
		this.on( 'open', this.hijackThickbox, this );
		this.on( 'close', this.restoreThickbox, this );
	},

	/**
	 * @param {Object} content
	 * @this wp.media.controller.Region
	 */
	iframeContent: function( content ) {
		this.$el.addClass('hide-toolbar');
		content.view = new wp.media.view.Iframe({
			controller: this
		});
	},

	iframeContentCleanup: function() {
		this.$el.removeClass('hide-toolbar');
	},

	iframeMenu: function( view ) {
		var views = {};

		if ( ! view ) {
			return;
		}

		_.each( wp.media.view.settings.tabs, function( title, id ) {
			views[ 'iframe:' + id ] = {
				text: this.state( 'iframe:' + id ).get('title'),
				priority: 200
			};
		}, this );

		view.set( views );
	},

	hijackThickbox: function() {
		var frame = this;

		if ( ! window.tb_remove || this._tb_remove ) {
			return;
		}

		this._tb_remove = window.tb_remove;
		window.tb_remove = function() {
			frame.close();
			frame.reset();
			frame.setState( frame.options.state );
			frame._tb_remove.call( window );
		};
	},

	restoreThickbox: function() {
		if ( ! this._tb_remove ) {
			return;
		}

		window.tb_remove = this._tb_remove;
		delete this._tb_remove;
	}
});

// Map some of the modal's methods to the frame.
_.each(['open','close','attach','detach','escape'], function( method ) {
	/**
	 * @function open
	 * @memberOf wp.media.view.MediaFrame
	 * @instance
	 *
	 * @return {wp.media.view.MediaFrame} Returns itself to allow chaining.
	 */
	/**
	 * @function close
	 * @memberOf wp.media.view.MediaFrame
	 * @instance
	 *
	 * @return {wp.media.view.MediaFrame} Returns itself to allow chaining.
	 */
	/**
	 * @function attach
	 * @memberOf wp.media.view.MediaFrame
	 * @instance
	 *
	 * @return {wp.media.view.MediaFrame} Returns itself to allow chaining.
	 */
	/**
	 * @function detach
	 * @memberOf wp.media.view.MediaFrame
	 * @instance
	 *
	 * @return {wp.media.view.MediaFrame} Returns itself to allow chaining.
	 */
	/**
	 * @function escape
	 * @memberOf wp.media.view.MediaFrame
	 * @instance
	 *
	 * @return {wp.media.view.MediaFrame} Returns itself to allow chaining.
	 */
	MediaFrame.prototype[ method ] = function() {
		if ( this.modal ) {
			this.modal[ method ].apply( this.modal, arguments );
		}
		return this;
	};
});

module.exports = MediaFrame;


/***/ },

/***/ 9013
(module) {

var MenuItem;

/**
 * wp.media.view.MenuItem
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
MenuItem = wp.media.View.extend(/** @lends wp.media.view.MenuItem.prototype */{
	tagName:   'button',
	className: 'media-menu-item',

	attributes: {
		type: 'button',
		role: 'tab'
	},

	events: {
		'click': '_click'
	},

	/**
	 * Allows to override the click event.
	 */
	_click: function() {
		var clickOverride = this.options.click;

		if ( clickOverride ) {
			clickOverride.call( this );
		} else {
			this.click();
		}
	},

	click: function() {
		var state = this.options.state;

		if ( state ) {
			this.controller.setState( state );
			// Toggle the menu visibility in the responsive view.
			this.views.parent.$el.removeClass( 'visible' ); // @todo Or hide on any click, see below.
		}
	},

	/**
	 * @return {wp.media.view.MenuItem} returns itself to allow chaining.
	 */
	render: function() {
		var options = this.options,
			menuProperty = options.state || options.contentMode;

		if ( options.text ) {
			this.$el.text( options.text );
		} else if ( options.html ) {
			this.$el.html( options.html );
		}

		// Set the menu item ID based on the frame state associated to the menu item.
		this.$el.attr( 'id', 'menu-item-' + menuProperty );

		return this;
	}
});

module.exports = MenuItem;


/***/ },

/***/ 1
(module) {

var MenuItem = wp.media.view.MenuItem,
	PriorityList = wp.media.view.PriorityList,
	Menu;

/**
 * wp.media.view.Menu
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.view.PriorityList
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
Menu = PriorityList.extend(/** @lends wp.media.view.Menu.prototype */{
	tagName:   'div',
	className: 'media-menu',
	property:  'state',
	ItemView:  MenuItem,
	region:    'menu',

	attributes: {
		role:               'tablist',
		'aria-orientation': 'horizontal'
	},

	initialize: function() {
		this._views = {};

		this.set( _.extend( {}, this._views, this.options.views ), { silent: true });
		delete this.options.views;

		if ( ! this.options.silent ) {
			this.render();
		}

		// Initialize the Focus Manager.
		this.focusManager = new wp.media.view.FocusManager( {
			el:   this.el,
			mode: 'tabsNavigation'
		} );

		// The menu is always rendered and can be visible or hidden on some frames.
		this.isVisible = true;
	},

	/**
	 * @param {Object} options
	 * @param {string} id
	 * @return {wp.media.View}
	 */
	toView: function( options, id ) {
		options = options || {};
		options[ this.property ] = options[ this.property ] || id;
		return new this.ItemView( options ).render();
	},

	ready: function() {
		/**
		 * call 'ready' directly on the parent class
		 */
		PriorityList.prototype.ready.apply( this, arguments );
		this.visibility();

		// Set up aria tabs initial attributes.
		this.focusManager.setupAriaTabs();
	},

	set: function() {
		/**
		 * call 'set' directly on the parent class
		 */
		PriorityList.prototype.set.apply( this, arguments );
		this.visibility();
	},

	unset: function() {
		/**
		 * call 'unset' directly on the parent class
		 */
		PriorityList.prototype.unset.apply( this, arguments );
		this.visibility();
	},

	visibility: function() {
		var region = this.region,
			view = this.controller[ region ].get(),
			views = this.views.get(),
			hide = ! views || views.length < 2;

		if ( this === view ) {
			// Flag this menu as hidden or visible.
			this.isVisible = ! hide;
			// Set or remove a CSS class to hide the menu.
			this.controller.$el.toggleClass( 'hide-' + region, hide );
		}
	},
	/**
	 * @param {string} id
	 */
	select: function( id ) {
		var view = this.get( id );

		if ( ! view ) {
			return;
		}

		this.deselect();
		view.$el.addClass('active');

		// Set up again the aria tabs initial attributes after the menu updates.
		this.focusManager.setupAriaTabs();
	},

	deselect: function() {
		this.$el.children().removeClass('active');
	},

	hide: function( id ) {
		var view = this.get( id );

		if ( ! view ) {
			return;
		}

		view.$el.addClass('hidden');
	},

	show: function( id ) {
		var view = this.get( id );

		if ( ! view ) {
			return;
		}

		view.$el.removeClass('hidden');
	}
});

module.exports = Menu;


/***/ },

/***/ 2621
(module) {

var $ = jQuery,
	Modal;

/**
 * wp.media.view.Modal
 *
 * A modal view, which the media modal uses as its default container.
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{
	tagName:  'div',
	template: wp.template('media-modal'),

	events: {
		'click .media-modal-backdrop, .media-modal-close': 'escapeHandler',
		'keydown': 'keydown'
	},

	clickedOpenerEl: null,

	initialize: function() {
		_.defaults( this.options, {
			container:      document.body,
			title:          '',
			propagate:      true,
			hasCloseButton: true
		});

		this.focusManager = new wp.media.view.FocusManager({
			el: this.el
		});
	},
	/**
	 * @return {Object}
	 */
	prepare: function() {
		return {
			title:          this.options.title,
			hasCloseButton: this.options.hasCloseButton
		};
	},

	/**
	 * @return {wp.media.view.Modal} Returns itself to allow chaining.
	 */
	attach: function() {
		if ( this.views.attached ) {
			return this;
		}

		if ( ! this.views.rendered ) {
			this.render();
		}

		this.$el.appendTo( this.options.container );

		// Manually mark the view as attached and trigger ready.
		this.views.attached = true;
		this.views.ready();

		return this.propagate('attach');
	},

	/**
	 * @return {wp.media.view.Modal} Returns itself to allow chaining.
	 */
	detach: function() {
		if ( this.$el.is(':visible') ) {
			this.close();
		}

		this.$el.detach();
		this.views.attached = false;
		return this.propagate('detach');
	},

	/**
	 * @return {wp.media.view.Modal} Returns itself to allow chaining.
	 */
	open: function() {
		var $el = this.$el,
			mceEditor;

		if ( $el.is(':visible') ) {
			return this;
		}

		this.clickedOpenerEl = document.activeElement;

		if ( ! this.views.attached ) {
			this.attach();
		}

		// Disable page scrolling.
		$( 'body' ).addClass( 'modal-open' );

		$el.show();

		// Try to close the onscreen keyboard.
		if ( 'ontouchend' in document ) {
			if ( ( mceEditor = window.tinymce && window.tinymce.activeEditor ) && ! mceEditor.isHidden() && mceEditor.iframeElement ) {
				mceEditor.iframeElement.focus();
				mceEditor.iframeElement.blur();

				setTimeout( function() {
					mceEditor.iframeElement.blur();
				}, 100 );
			}
		}

		// Set initial focus on the content instead of this view element, to avoid page scrolling.
		this.$( '.media-modal' ).trigger( 'focus' );

		// Hide the page content from assistive technologies.
		this.focusManager.setAriaHiddenOnBodyChildren( $el );

		return this.propagate('open');
	},

	/**
	 * @param {Object} options
	 * @return {wp.media.view.Modal} Returns itself to allow chaining.
	 */
	close: function( options ) {
		if ( ! this.views.attached || ! this.$el.is(':visible') ) {
			return this;
		}

		// Pause current audio/video even after closing the modal.
		$( '.mejs-pause button' ).trigger( 'click' );

		// Enable page scrolling.
		$( 'body' ).removeClass( 'modal-open' );

		// Hide the modal element by adding display:none.
		this.$el.hide();

		/*
		 * Make visible again to assistive technologies all body children that
		 * have been made hidden when the modal opened.
		 */
		this.focusManager.removeAriaHiddenFromBodyChildren();

		// Move focus back in useful location once modal is closed.
		if ( null !== this.clickedOpenerEl ) {
			// Move focus back to the element that opened the modal.
			this.clickedOpenerEl.focus();
		} else {
			// Fallback to the admin page main element.
			$( '#wpbody-content' )
				.attr( 'tabindex', '-1' )
				.trigger( 'focus' );
		}

		this.propagate('close');

		if ( options && options.escape ) {
			this.propagate('escape');
		}

		return this;
	},
	/**
	 * @return {wp.media.view.Modal} Returns itself to allow chaining.
	 */
	escape: function() {
		return this.close({ escape: true });
	},
	/**
	 * @param {Object} event
	 */
	escapeHandler: function( event ) {
		event.preventDefault();
		this.escape();
	},

	/**
	 * Handles the selection of attachments when the command or control key is pressed with the enter key.
	 *
	 * @since 6.7
	 *
	 * @param {Object} event The keydown event object.
	 */
	selectHandler: function( event ) {
		var selection = this.controller.state().get( 'selection' );

		if ( selection.length <= 0 ) {
			return;
		}

		if ( 'insert' === this.controller.options.state ) {
			this.controller.trigger( 'insert', selection );
		} else {
			this.controller.trigger( 'select', selection );
			event.preventDefault();
			this.escape();
		}
	},

	/**
	 * @param {Array|Object} content Views to register to '.media-modal-content'
	 * @return {wp.media.view.Modal} Returns itself to allow chaining.
	 */
	content: function( content ) {
		this.views.set( '.media-modal-content', content );
		return this;
	},

	/**
	 * Triggers a modal event and if the `propagate` option is set,
	 * forwards events to the modal's controller.
	 *
	 * @param {string} id
	 * @return {wp.media.view.Modal} Returns itself to allow chaining.
	 */
	propagate: function( id ) {
		this.trigger( id );

		if ( this.options.propagate ) {
			this.controller.trigger( id );
		}

		return this;
	},
	/**
	 * @param {Object} event
	 */
	keydown: function( event ) {
		// Close the modal when escape is pressed.
		if ( 27 === event.which && this.$el.is(':visible') ) {
			this.escape();
			event.stopImmediatePropagation();
		}

		// Select the attachment when command or control and enter are pressed.
		if ( ( 13 === event.which || 10 === event.which ) && ( event.metaKey || event.ctrlKey ) ) {
			this.selectHandler( event );
			event.stopImmediatePropagation();
		}

	}
});

module.exports = Modal;


/***/ },

/***/ 8815
(module) {

/**
 * wp.media.view.PriorityList
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
var PriorityList = wp.media.View.extend(/** @lends wp.media.view.PriorityList.prototype */{
	tagName:   'div',

	initialize: function() {
		this._views = {};

		this.set( _.extend( {}, this._views, this.options.views ), { silent: true });
		delete this.options.views;

		if ( ! this.options.silent ) {
			this.render();
		}
	},
	/**
	 * @param {string} id
	 * @param {wp.media.View|Object} view
	 * @param {Object} options
	 * @return {wp.media.view.PriorityList} Returns itself to allow chaining.
	 */
	set: function( id, view, options ) {
		var priority, views, index;

		options = options || {};

		// Accept an object with an `id` : `view` mapping.
		if ( _.isObject( id ) ) {
			_.each( id, function( view, id ) {
				this.set( id, view );
			}, this );
			return this;
		}

		if ( ! (view instanceof Backbone.View) ) {
			view = this.toView( view, id, options );
		}
		view.controller = view.controller || this.controller;

		this.unset( id );

		priority = view.options.priority || 10;
		views = this.views.get() || [];

		_.find( views, function( existing, i ) {
			if ( existing.options.priority > priority ) {
				index = i;
				return true;
			}
		});

		this._views[ id ] = view;
		this.views.add( view, {
			at: _.isNumber( index ) ? index : views.length || 0
		});

		return this;
	},
	/**
	 * @param {string} id
	 * @return {wp.media.View}
	 */
	get: function( id ) {
		return this._views[ id ];
	},
	/**
	 * @param {string} id
	 * @return {wp.media.view.PriorityList}
	 */
	unset: function( id ) {
		var view = this.get( id );

		if ( view ) {
			view.remove();
		}

		delete this._views[ id ];
		return this;
	},
	/**
	 * @param {Object} options
	 * @return {wp.media.View}
	 */
	toView: function( options ) {
		return new wp.media.View( options );
	}
});

module.exports = PriorityList;


/***/ },

/***/ 6327
(module) {

/**
 * wp.media.view.RouterItem
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.view.MenuItem
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
var RouterItem = wp.media.view.MenuItem.extend(/** @lends wp.media.view.RouterItem.prototype */{
	/**
	 * On click handler to activate the content region's corresponding mode.
	 */
	click: function() {
		var contentMode = this.options.contentMode;
		if ( contentMode ) {
			this.controller.content.mode( contentMode );
		}
	}
});

module.exports = RouterItem;


/***/ },

/***/ 4783
(module) {

var Menu = wp.media.view.Menu,
	Router;

/**
 * wp.media.view.Router
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.view.Menu
 * @augments wp.media.view.PriorityList
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
Router = Menu.extend(/** @lends wp.media.view.Router.prototype */{
	tagName:   'div',
	className: 'media-router',
	property:  'contentMode',
	ItemView:  wp.media.view.RouterItem,
	region:    'router',

	attributes: {
		role:               'tablist',
		'aria-orientation': 'horizontal'
	},

	initialize: function() {
		this.controller.on( 'content:render', this.update, this );
		// Call 'initialize' directly on the parent class.
		Menu.prototype.initialize.apply( this, arguments );
	},

	update: function() {
		var mode = this.controller.content.mode();
		if ( mode ) {
			this.select( mode );
		}
	}
});

module.exports = Router;


/***/ },

/***/ 2102
(module) {

var Search;

/**
 * wp.media.view.Search
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
Search = wp.media.View.extend(/** @lends wp.media.view.Search.prototype */{
	tagName:   'input',
	className: 'search',
	id:        'media-search-input',

	attributes: {
		type: 'search'
	},

	events: {
		'input': 'search'
	},

	/**
	 * @return {wp.media.view.Search} Returns itself to allow chaining.
	 */
	render: function() {
		this.el.value = this.model.escape('search');
		return this;
	},

	search: _.debounce( function( event ) {
		var searchTerm = event.target.value.trim();

		// Trigger the search only after 2 ASCII characters.
		if ( searchTerm && searchTerm.length > 1 ) {
			this.model.set( 'search', searchTerm );
		} else {
			this.model.unset( 'search' );
		}
	}, 500 )
});

module.exports = Search;


/***/ },

/***/ 8282
(module) {

var _n = wp.i18n._n,
	sprintf = wp.i18n.sprintf,
	Selection;

/**
 * wp.media.view.Selection
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
Selection = wp.media.View.extend(/** @lends wp.media.view.Selection.prototype */{
	tagName:   'div',
	className: 'media-selection',
	template:  wp.template('media-selection'),

	events: {
		'click .edit-selection':  'edit',
		'click .clear-selection': 'clear'
	},

	initialize: function() {
		_.defaults( this.options, {
			editable:  false,
			clearable: true
		});

		/**
		 * @member {wp.media.view.Attachments.Selection}
		 */
		this.attachments = new wp.media.view.Attachments.Selection({
			controller: this.controller,
			collection: this.collection,
			selection:  this.collection,
			model:      new Backbone.Model()
		});

		this.views.set( '.selection-view', this.attachments );
		this.collection.on( 'add remove reset', this.refresh, this );
		this.controller.on( 'content:activate', this.refresh, this );
	},

	ready: function() {
		this.refresh();
	},

	refresh: function() {
		// If the selection hasn't been rendered, bail.
		if ( ! this.$el.children().length ) {
			return;
		}

		var collection = this.collection,
			editing = 'edit-selection' === this.controller.content.mode();

		// If nothing is selected, display nothing.
		this.$el.toggleClass( 'empty', ! collection.length );
		this.$el.toggleClass( 'one', 1 === collection.length );
		this.$el.toggleClass( 'editing', editing );

		this.$( '.count' ).text(
			/* translators: %s: Number of selected media attachments. */
			sprintf( _n( '%s item selected', '%s items selected', collection.length ), collection.length )
		);
	},

	edit: function( event ) {
		event.preventDefault();
		if ( this.options.editable ) {
			this.options.editable.call( this, this.collection );
		}
	},

	clear: function( event ) {
		event.preventDefault();
		this.collection.reset();

		// Move focus to the modal.
		this.controller.modal.focusManager.focus();
	}
});

module.exports = Selection;


/***/ },

/***/ 1915
(module) {

var View = wp.media.View,
	$ = Backbone.$,
	Settings;

/**
 * wp.media.view.Settings
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
Settings = View.extend(/** @lends wp.media.view.Settings.prototype */{
	events: {
		'click button':    'updateHandler',
		'change input':    'updateHandler',
		'change select':   'updateHandler',
		'change textarea': 'updateHandler'
	},

	initialize: function() {
		this.model = this.model || new Backbone.Model();
		this.listenTo( this.model, 'change', this.updateChanges );
	},

	prepare: function() {
		return _.defaults({
			model: this.model.toJSON()
		}, this.options );
	},
	/**
	 * @return {wp.media.view.Settings} Returns itself to allow chaining.
	 */
	render: function() {
		View.prototype.render.apply( this, arguments );
		// Select the correct values.
		_( this.model.attributes ).chain().keys().each( this.update, this );
		return this;
	},
	/**
	 * @param {string} key
	 */
	update: function( key ) {
		var value = this.model.get( key ),
			$setting = this.$('[data-setting="' + key + '"]'),
			$buttons, $value;

		// Bail if we didn't find a matching setting.
		if ( ! $setting.length ) {
			return;
		}

		// Attempt to determine how the setting is rendered and update
		// the selected value.

		// Handle dropdowns.
		if ( $setting.is('select') ) {
			$value = $setting.find('[value="' + value + '"]');

			if ( $value.length ) {
				$setting.find('option').prop( 'selected', false );
				$value.prop( 'selected', true );
			} else {
				// If we can't find the desired value, record what *is* selected.
				this.model.set( key, $setting.find(':selected').val() );
			}

		// Handle button groups.
		} else if ( $setting.hasClass('button-group') ) {
			$buttons = $setting.find( 'button' )
				.removeClass( 'active' )
				.attr( 'aria-pressed', 'false' );
			$buttons.filter( '[value="' + value + '"]' )
				.addClass( 'active' )
				.attr( 'aria-pressed', 'true' );

		// Handle text inputs and textareas.
		} else if ( $setting.is('input[type="text"], textarea') ) {
			if ( ! $setting.is(':focus') ) {
				$setting.val( value );
			}
		// Handle checkboxes.
		} else if ( $setting.is('input[type="checkbox"]') ) {
			$setting.prop( 'checked', !! value && 'false' !== value );
		}
	},
	/**
	 * @param {Object} event
	 */
	updateHandler: function( event ) {
		var $setting = $( event.target ).closest('[data-setting]'),
			value = event.target.value,
			userSetting;

		event.preventDefault();

		if ( ! $setting.length ) {
			return;
		}

		// Use the correct value for checkboxes.
		if ( $setting.is('input[type="checkbox"]') ) {
			value = $setting[0].checked;
		}

		// Update the corresponding setting.
		this.model.set( $setting.data('setting'), value );

		// If the setting has a corresponding user setting,
		// update that as well.
		userSetting = $setting.data('userSetting');
		if ( userSetting ) {
			window.setUserSetting( userSetting, value );
		}
	},

	updateChanges: function( model ) {
		if ( model.hasChanged() ) {
			_( model.changed ).chain().keys().each( this.update, this );
		}
	}
});

module.exports = Settings;


/***/ },

/***/ 7656
(module) {

var Settings = wp.media.view.Settings,
	AttachmentDisplay;

/**
 * wp.media.view.Settings.AttachmentDisplay
 *
 * @memberOf wp.media.view.Settings
 *
 * @class
 * @augments wp.media.view.Settings
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
AttachmentDisplay = Settings.extend(/** @lends wp.media.view.Settings.AttachmentDisplay.prototype */{
	className: 'attachment-display-settings',
	template:  wp.template('attachment-display-settings'),

	initialize: function() {
		var attachment = this.options.attachment;

		_.defaults( this.options, {
			userSettings: false
		});
		// Call 'initialize' directly on the parent class.
		Settings.prototype.initialize.apply( this, arguments );
		this.listenTo( this.model, 'change:link', this.updateLinkTo );

		if ( attachment ) {
			attachment.on( 'change:uploading', this.render, this );
		}
	},

	dispose: function() {
		var attachment = this.options.attachment;
		if ( attachment ) {
			attachment.off( null, null, this );
		}
		/**
		 * call 'dispose' directly on the parent class
		 */
		Settings.prototype.dispose.apply( this, arguments );
	},
	/**
	 * @return {wp.media.view.AttachmentDisplay} Returns itself to allow chaining.
	 */
	render: function() {
		var attachment = this.options.attachment;
		if ( attachment ) {
			_.extend( this.options, {
				sizes: attachment.get('sizes'),
				type:  attachment.get('type')
			});
		}
		/**
		 * call 'render' directly on the parent class
		 */
		Settings.prototype.render.call( this );
		this.updateLinkTo();
		return this;
	},

	updateLinkTo: function() {
		var linkTo = this.model.get('link'),
			$input = this.$('.link-to-custom'),
			attachment = this.options.attachment;

		if ( 'none' === linkTo || 'embed' === linkTo || ( ! attachment && 'custom' !== linkTo ) ) {
			$input.closest( '.setting' ).addClass( 'hidden' );
			return;
		}

		if ( attachment ) {
			if ( 'post' === linkTo ) {
				$input.val( attachment.get('link') );
			} else if ( 'file' === linkTo ) {
				$input.val( attachment.get('url') );
			} else if ( ! this.model.get('linkUrl') ) {
				$input.val('http://');
			}

			$input.prop( 'readonly', 'custom' !== linkTo );
		}

		$input.closest( '.setting' ).removeClass( 'hidden' );
		if ( $input.length ) {
			$input[0].scrollIntoView();
		}
	}
});

module.exports = AttachmentDisplay;


/***/ },

/***/ 7266
(module) {

/**
 * wp.media.view.Settings.Gallery
 *
 * @memberOf wp.media.view.Settings
 *
 * @class
 * @augments wp.media.view.Settings
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
var Gallery = wp.media.view.Settings.extend(/** @lends wp.media.view.Settings.Gallery.prototype */{
	className: 'collection-settings gallery-settings',
	template:  wp.template('gallery-settings')
});

module.exports = Gallery;


/***/ },

/***/ 2356
(module) {

/**
 * wp.media.view.Settings.Playlist
 *
 * @memberOf wp.media.view.Settings
 *
 * @class
 * @augments wp.media.view.Settings
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
var Playlist = wp.media.view.Settings.extend(/** @lends wp.media.view.Settings.Playlist.prototype */{
	className: 'collection-settings playlist-settings',
	template:  wp.template('playlist-settings')
});

module.exports = Playlist;


/***/ },

/***/ 1992
(module) {

/**
 * wp.media.view.Sidebar
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.view.PriorityList
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
var Sidebar = wp.media.view.PriorityList.extend(/** @lends wp.media.view.Sidebar.prototype */{
	className: 'media-sidebar'
});

module.exports = Sidebar;


/***/ },

/***/ 443
(module) {

var View = wp.media.view,
	SiteIconCropper;

/**
 * wp.media.view.SiteIconCropper
 *
 * Uses the imgAreaSelect plugin to allow a user to crop a Site Icon.
 *
 * Takes imgAreaSelect options from
 * wp.customize.SiteIconControl.calculateImageSelectOptions.
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.view.Cropper
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
SiteIconCropper = View.Cropper.extend(/** @lends wp.media.view.SiteIconCropper.prototype */{
	className: 'crop-content site-icon',

	ready: function () {
		View.Cropper.prototype.ready.apply( this, arguments );

		this.$( '.crop-image' ).on( 'load', _.bind( this.addSidebar, this ) );
	},

	addSidebar: function() {
		this.sidebar = new wp.media.view.Sidebar({
			controller: this.controller
		});

		this.sidebar.set( 'preview', new wp.media.view.SiteIconPreview({
			controller: this.controller,
			attachment: this.options.attachment
		}) );

		this.controller.cropperView.views.add( this.sidebar );
	}
});

module.exports = SiteIconCropper;


/***/ },

/***/ 7810
(module) {

var View = wp.media.View,
	$ = jQuery,
	SiteIconPreview;

/**
 * wp.media.view.SiteIconPreview
 *
 * Shows a preview of the Site Icon as a favicon and app icon while cropping.
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
SiteIconPreview = View.extend(/** @lends wp.media.view.SiteIconPreview.prototype */{
	className: 'site-icon-preview-crop-modal',
	template: wp.template( 'site-icon-preview-crop' ),

	ready: function() {
		this.controller.imgSelect.setOptions({
			onInit: this.updatePreview,
			onSelectChange: this.updatePreview
		});
	},

	prepare: function() {
		return {
			url: this.options.attachment.get( 'url' )
		};
	},

	updatePreview: function( img, coords ) {
		var rx = 64 / coords.width,
			ry = 64 / coords.height,
			preview_rx = 24 / coords.width,
			preview_ry = 24 / coords.height;

		$( '#preview-app-icon' ).css({
			width: Math.round(rx * this.imageWidth ) + 'px',
			height: Math.round(ry * this.imageHeight ) + 'px',
			marginLeft: '-' + Math.round(rx * coords.x1) + 'px',
			marginTop: '-' + Math.round(ry * coords.y1) + 'px'
		});

		$( '#preview-favicon' ).css({
			width: Math.round( preview_rx * this.imageWidth ) + 'px',
			height: Math.round( preview_ry * this.imageHeight ) + 'px',
			marginLeft: '-' + Math.round( preview_rx * coords.x1 ) + 'px',
			marginTop: '-' + Math.floor( preview_ry* coords.y1 ) + 'px'
		});
	}
});

module.exports = SiteIconPreview;


/***/ },

/***/ 9141
(module) {

/**
 * wp.media.view.Spinner
 *
 * Represents a spinner in the Media Library.
 *
 * @since 3.9.0
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
var Spinner = wp.media.View.extend(/** @lends wp.media.view.Spinner.prototype */{
	tagName:   'span',
	className: 'spinner',
	spinnerTimeout: false,
	delay: 400,

	/**
	 * Shows the spinner. Delays the visibility by the configured amount.
	 *
	 * @since 3.9.0
	 *
	 * @return {wp.media.view.Spinner} The spinner.
	 */
	show: function() {
		if ( ! this.spinnerTimeout ) {
			this.spinnerTimeout = _.delay(function( $el ) {
				$el.addClass( 'is-active' );
			}, this.delay, this.$el );
		}

		return this;
	},

	/**
	 * Hides the spinner.
	 *
	 * @since 3.9.0
	 *
	 * @return {wp.media.view.Spinner} The spinner.
	 */
	hide: function() {
		this.$el.removeClass( 'is-active' );
		this.spinnerTimeout = clearTimeout( this.spinnerTimeout );

		return this;
	}
});

module.exports = Spinner;


/***/ },

/***/ 5275
(module) {

var View = wp.media.View,
	Toolbar;

/**
 * wp.media.view.Toolbar
 *
 * A toolbar which consists of a primary and a secondary section. Each sections
 * can be filled with views.
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
Toolbar = View.extend(/** @lends wp.media.view.Toolbar.prototype */{
	tagName:   'div',
	className: 'media-toolbar',

	initialize: function() {
		var state = this.controller.state(),
			selection = this.selection = state.get('selection'),
			library = this.library = state.get('library');

		this._views = {};

		// The toolbar is composed of two `PriorityList` views.
		this.primary   = new wp.media.view.PriorityList();
		this.secondary = new wp.media.view.PriorityList();
		this.tertiary  = new wp.media.view.PriorityList();
		this.primary.$el.addClass('media-toolbar-primary search-form');
		this.secondary.$el.addClass('media-toolbar-secondary');
		this.tertiary.$el.addClass('media-bg-overlay');

		this.views.set([ this.secondary, this.primary, this.tertiary ]);

		if ( this.options.items ) {
			this.set( this.options.items, { silent: true });
		}

		if ( ! this.options.silent ) {
			this.render();
		}

		if ( selection ) {
			selection.on( 'add remove reset', this.refresh, this );
		}

		if ( library ) {
			library.on( 'add remove reset', this.refresh, this );
		}
	},
	/**
	 * @return {wp.media.view.Toolbar} Returns itself to allow chaining
	 */
	dispose: function() {
		if ( this.selection ) {
			this.selection.off( null, null, this );
		}

		if ( this.library ) {
			this.library.off( null, null, this );
		}
		/**
		 * call 'dispose' directly on the parent class
		 */
		return View.prototype.dispose.apply( this, arguments );
	},

	ready: function() {
		this.refresh();
	},

	/**
	 * @param {string} id
	 * @param {Backbone.View|Object} view
	 * @param {Object} [options={}]
	 * @return {wp.media.view.Toolbar} Returns itself to allow chaining.
	 */
	set: function( id, view, options ) {
		var list;
		options = options || {};

		// Accept an object with an `id` : `view` mapping.
		if ( _.isObject( id ) ) {
			_.each( id, function( view, id ) {
				this.set( id, view, { silent: true });
			}, this );

		} else {
			if ( ! ( view instanceof Backbone.View ) ) {
				view.classes = [ 'media-button-' + id ].concat( view.classes || [] );
				view = new wp.media.view.Button( view ).render();
			}

			view.controller = view.controller || this.controller;

			this._views[ id ] = view;

			list = view.options.priority < 0 ? 'secondary' : 'primary';
			this[ list ].set( id, view, options );
		}

		if ( ! options.silent ) {
			this.refresh();
		}

		return this;
	},
	/**
	 * @param {string} id
	 * @return {wp.media.view.Button}
	 */
	get: function( id ) {
		return this._views[ id ];
	},
	/**
	 * @param {string} id
	 * @param {Object} options
	 * @return {wp.media.view.Toolbar} Returns itself to allow chaining.
	 */
	unset: function( id, options ) {
		delete this._views[ id ];
		this.primary.unset( id, options );
		this.secondary.unset( id, options );
		this.tertiary.unset( id, options );

		if ( ! options || ! options.silent ) {
			this.refresh();
		}
		return this;
	},

	refresh: function() {
		var state = this.controller.state(),
			library = state.get('library'),
			selection = state.get('selection');

		_.each( this._views, function( button ) {
			if ( ! button.model || ! button.options || ! button.options.requires ) {
				return;
			}

			var requires = button.options.requires,
				disabled = false,
				modelsUploading = library && ! _.isEmpty( library.findWhere( { 'uploading': true } ) );

			// Prevent insertion of attachments if any of them are still uploading.
			if ( selection && selection.models ) {
				disabled = _.some( selection.models, function( attachment ) {
					return attachment.get('uploading') === true;
				});
			}
			if ( requires.uploadingComplete && modelsUploading ) {
				disabled = true;
			}

			if ( requires.selection && selection && ! selection.length ) {
				disabled = true;
			} else if ( requires.library && library && ! library.length ) {
				disabled = true;
			}
			button.model.set( 'disabled', disabled );
		});
	}
});

module.exports = Toolbar;


/***/ },

/***/ 397
(module) {

var Select = wp.media.view.Toolbar.Select,
	l10n = wp.media.view.l10n,
	Embed;

/**
 * wp.media.view.Toolbar.Embed
 *
 * @memberOf wp.media.view.Toolbar
 *
 * @class
 * @augments wp.media.view.Toolbar.Select
 * @augments wp.media.view.Toolbar
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
Embed = Select.extend(/** @lends wp.media.view.Toolbar.Embed.prototype */{
	initialize: function() {
		_.defaults( this.options, {
			text: l10n.insertIntoPost,
			requires: false
		});
		// Call 'initialize' directly on the parent class.
		Select.prototype.initialize.apply( this, arguments );
	},

	refresh: function() {
		var url = this.controller.state().props.get('url');
		this.get('select').model.set( 'disabled', ! url || url === 'http://' );
		/**
		 * call 'refresh' directly on the parent class
		 */
		Select.prototype.refresh.apply( this, arguments );
	}
});

module.exports = Embed;


/***/ },

/***/ 9458
(module) {

var Toolbar = wp.media.view.Toolbar,
	l10n = wp.media.view.l10n,
	Select;

/**
 * wp.media.view.Toolbar.Select
 *
 * @memberOf wp.media.view.Toolbar
 *
 * @class
 * @augments wp.media.view.Toolbar
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
Select = Toolbar.extend(/** @lends wp.media.view.Toolbar.Select.prototype */{
	initialize: function() {
		var options = this.options;

		_.bindAll( this, 'clickSelect' );

		_.defaults( options, {
			event: 'select',
			state: false,
			reset: true,
			close: true,
			text:  l10n.select,

			// Does the button rely on the selection?
			requires: {
				selection: true
			}
		});

		options.items = _.defaults( options.items || {}, {
			select: {
				style:    'primary',
				text:     options.text,
				priority: 80,
				click:    this.clickSelect,
				requires: options.requires
			}
		});
		// Call 'initialize' directly on the parent class.
		Toolbar.prototype.initialize.apply( this, arguments );
	},

	clickSelect: function() {
		var options = this.options,
			controller = this.controller;

		if ( options.close ) {
			controller.close();
		}

		if ( options.event ) {
			controller.state().trigger( options.event );
		}

		if ( options.state ) {
			controller.setState( options.state );
		}

		if ( options.reset ) {
			controller.reset();
		}
	}
});

module.exports = Select;


/***/ },

/***/ 3674
(module) {

var View = wp.media.View,
	l10n = wp.media.view.l10n,
	$ = jQuery,
	EditorUploader;

/**
 * Creates a dropzone on WP editor instances (elements with .wp-editor-wrap)
 * and relays drag'n'dropped files to a media workflow.
 *
 * wp.media.view.EditorUploader
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
EditorUploader = View.extend(/** @lends wp.media.view.EditorUploader.prototype */{
	tagName:   'div',
	className: 'uploader-editor',
	template:  wp.template( 'uploader-editor' ),

	localDrag: false,
	overContainer: false,
	overDropzone: false,
	draggingFile: null,

	/**
	 * Bind drag'n'drop events to callbacks.
	 */
	initialize: function() {
		this.initialized = false;

		// Bail if not enabled or UA does not support drag'n'drop or File API.
		if ( ! window.tinyMCEPreInit || ! window.tinyMCEPreInit.dragDropUpload || ! this.browserSupport() ) {
			return this;
		}

		this.$document = $(document);
		this.dropzones = [];
		this.files = [];

		this.$document.on( 'drop', '.uploader-editor', _.bind( this.drop, this ) );
		this.$document.on( 'dragover', '.uploader-editor', _.bind( this.dropzoneDragover, this ) );
		this.$document.on( 'dragleave', '.uploader-editor', _.bind( this.dropzoneDragleave, this ) );
		this.$document.on( 'click', '.uploader-editor', _.bind( this.click, this ) );

		this.$document.on( 'dragover', _.bind( this.containerDragover, this ) );
		this.$document.on( 'dragleave', _.bind( this.containerDragleave, this ) );

		this.$document.on( 'dragstart dragend drop', _.bind( function( event ) {
			this.localDrag = event.type === 'dragstart';

			if ( event.type === 'drop' ) {
				this.containerDragleave();
			}
		}, this ) );

		this.initialized = true;
		return this;
	},

	/**
	 * Check browser support for drag'n'drop.
	 *
	 * @return {boolean}
	 */
	browserSupport: function() {
		var supports = false, div = document.createElement('div');

		supports = ( 'draggable' in div ) || ( 'ondragstart' in div && 'ondrop' in div );
		supports = supports && !! ( window.File && window.FileList && window.FileReader );
		return supports;
	},

	isDraggingFile: function( event ) {
		if ( this.draggingFile !== null ) {
			return this.draggingFile;
		}

		if ( _.isUndefined( event.originalEvent ) || _.isUndefined( event.originalEvent.dataTransfer ) ) {
			return false;
		}

		this.draggingFile = _.indexOf( event.originalEvent.dataTransfer.types, 'Files' ) > -1 &&
			_.indexOf( event.originalEvent.dataTransfer.types, 'text/plain' ) === -1;

		return this.draggingFile;
	},

	refresh: function( e ) {
		var dropzone_id;
		for ( dropzone_id in this.dropzones ) {
			// Hide the dropzones only if dragging has left the screen.
			this.dropzones[ dropzone_id ].toggle( this.overContainer || this.overDropzone );
		}

		if ( ! _.isUndefined( e ) ) {
			$( e.target ).closest( '.uploader-editor' ).toggleClass( 'droppable', this.overDropzone );
		}

		if ( ! this.overContainer && ! this.overDropzone ) {
			this.draggingFile = null;
		}

		return this;
	},

	render: function() {
		if ( ! this.initialized ) {
			return this;
		}

		View.prototype.render.apply( this, arguments );
		$( '.wp-editor-wrap' ).each( _.bind( this.attach, this ) );
		return this;
	},

	attach: function( index, editor ) {
		// Attach a dropzone to an editor.
		var dropzone = this.$el.clone();
		this.dropzones.push( dropzone );
		$( editor ).append( dropzone );
		return this;
	},

	/**
	 * When a file is dropped on the editor uploader, open up an editor media workflow
	 * and upload the file immediately.
	 *
	 * @param {jQuery.Event} event The 'drop' event.
	 */
	drop: function( event ) {
		var $wrap, uploadView;

		this.containerDragleave( event );
		this.dropzoneDragleave( event );

		this.files = event.originalEvent.dataTransfer.files;
		if ( this.files.length < 1 ) {
			return;
		}

		// Set the active editor to the drop target.
		$wrap = $( event.target ).parents( '.wp-editor-wrap' );
		if ( $wrap.length > 0 && $wrap[0].id ) {
			window.wpActiveEditor = $wrap[0].id.slice( 3, -5 );
		}

		if ( ! this.workflow ) {
			this.workflow = wp.media.editor.open( window.wpActiveEditor, {
				frame:    'post',
				state:    'insert',
				title:    l10n.addMedia,
				multiple: true
			});

			uploadView = this.workflow.uploader;

			if ( uploadView.uploader && uploadView.uploader.ready ) {
				this.addFiles.apply( this );
			} else {
				this.workflow.on( 'uploader:ready', this.addFiles, this );
			}
		} else {
			this.workflow.state().reset();
			this.addFiles.apply( this );
			this.workflow.open();
		}

		return false;
	},

	/**
	 * Add the files to the uploader.
	 */
	addFiles: function() {
		if ( this.files.length ) {
			this.workflow.uploader.uploader.uploader.addFile( _.toArray( this.files ) );
			this.files = [];
		}
		return this;
	},

	containerDragover: function( event ) {
		if ( this.localDrag || ! this.isDraggingFile( event ) ) {
			return;
		}

		this.overContainer = true;
		this.refresh();
	},

	containerDragleave: function() {
		this.overContainer = false;

		// Throttle dragleave because it's called when bouncing from some elements to others.
		_.delay( _.bind( this.refresh, this ), 50 );
	},

	dropzoneDragover: function( event ) {
		if ( this.localDrag || ! this.isDraggingFile( event ) ) {
			return;
		}

		this.overDropzone = true;
		this.refresh( event );
		return false;
	},

	dropzoneDragleave: function( e ) {
		this.overDropzone = false;
		_.delay( _.bind( this.refresh, this, e ), 50 );
	},

	click: function( e ) {
		// In the rare case where the dropzone gets stuck, hide it on click.
		this.containerDragleave( e );
		this.dropzoneDragleave( e );
		this.localDrag = false;
	}
});

module.exports = EditorUploader;


/***/ },

/***/ 1753
(module) {

var View = wp.media.View,
	UploaderInline;

/**
 * wp.media.view.UploaderInline
 *
 * The inline uploader that shows up in the 'Upload Files' tab.
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
UploaderInline = View.extend(/** @lends wp.media.view.UploaderInline.prototype */{
	tagName:   'div',
	className: 'uploader-inline',
	template:  wp.template('uploader-inline'),

	events: {
		'click .close': 'hide'
	},

	initialize: function() {
		_.defaults( this.options, {
			message: '',
			status:  true,
			canClose: false
		});

		if ( ! this.options.$browser && this.controller.uploader ) {
			this.options.$browser = this.controller.uploader.$browser;
		}

		if ( _.isUndefined( this.options.postId ) ) {
			this.options.postId = wp.media.view.settings.post.id;
		}

		if ( this.options.status ) {
			this.views.set( '.upload-inline-status', new wp.media.view.UploaderStatus({
				controller: this.controller
			}) );
		}
	},

	prepare: function() {
		var suggestedWidth = this.controller.state().get('suggestedWidth'),
			suggestedHeight = this.controller.state().get('suggestedHeight'),
			data = {};

		data.message = this.options.message;
		data.canClose = this.options.canClose;

		if ( suggestedWidth && suggestedHeight ) {
			data.suggestedWidth = suggestedWidth;
			data.suggestedHeight = suggestedHeight;
		}

		return data;
	},
	/**
	 * @return {wp.media.view.UploaderInline} Returns itself to allow chaining.
	 */
	dispose: function() {
		if ( this.disposing ) {
			/**
			 * call 'dispose' directly on the parent class
			 */
			return View.prototype.dispose.apply( this, arguments );
		}

		/*
		 * Run remove on `dispose`, so we can be sure to refresh the
		 * uploader with a view-less DOM. Track whether we're disposing
		 * so we don't trigger an infinite loop.
		 */
		this.disposing = true;
		return this.remove();
	},
	/**
	 * @return {wp.media.view.UploaderInline} Returns itself to allow chaining.
	 */
	remove: function() {
		/**
		 * call 'remove' directly on the parent class
		 */
		var result = View.prototype.remove.apply( this, arguments );

		_.defer( _.bind( this.refresh, this ) );
		return result;
	},

	refresh: function() {
		var uploader = this.controller.uploader;

		if ( uploader ) {
			uploader.refresh();
		}
	},
	/**
	 * @return {wp.media.view.UploaderInline}
	 */
	ready: function() {
		var $browser = this.options.$browser,
			$placeholder;

		if ( this.controller.uploader ) {
			$placeholder = this.$('.browser');

			// Check if we've already replaced the placeholder.
			if ( $placeholder[0] === $browser[0] ) {
				return;
			}

			$browser.detach().text( $placeholder.text() );
			$browser[0].className = $placeholder[0].className;
			$browser[0].setAttribute( 'aria-describedby', $placeholder[0].getAttribute('aria-describedby') );
			$placeholder.replaceWith( $browser.show() );
		}

		this.refresh();
		return this;
	},
	show: function() {
		this.$el.removeClass( 'hidden' );
		if ( this.controller.$uploaderToggler && this.controller.$uploaderToggler.length ) {
			this.controller.$uploaderToggler.attr( 'aria-expanded', 'true' );
		}
	},
	hide: function() {
		this.$el.addClass( 'hidden' );
		if ( this.controller.$uploaderToggler && this.controller.$uploaderToggler.length ) {
			this.controller.$uploaderToggler
				.attr( 'aria-expanded', 'false' )
				// Move focus back to the toggle button when closing the uploader.
				.trigger( 'focus' );
		}
	}

});

module.exports = UploaderInline;


/***/ },

/***/ 6442
(module) {

/**
 * wp.media.view.UploaderStatusError
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
var UploaderStatusError = wp.media.View.extend(/** @lends wp.media.view.UploaderStatusError.prototype */{
	className: 'upload-error',
	template:  wp.template('uploader-status-error')
});

module.exports = UploaderStatusError;


/***/ },

/***/ 8197
(module) {

var View = wp.media.View,
	UploaderStatus;

/**
 * wp.media.view.UploaderStatus
 *
 * An uploader status for on-going uploads.
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
UploaderStatus = View.extend(/** @lends wp.media.view.UploaderStatus.prototype */{
	className: 'media-uploader-status',
	template:  wp.template('uploader-status'),

	events: {
		'click .upload-dismiss-errors': 'dismiss'
	},

	initialize: function() {
		this.queue = wp.Uploader.queue;
		this.queue.on( 'add remove reset', this.visibility, this );
		this.queue.on( 'add remove reset change:percent', this.progress, this );
		this.queue.on( 'add remove reset change:uploading', this.info, this );

		this.errors = wp.Uploader.errors;
		this.errors.reset();
		this.errors.on( 'add remove reset', this.visibility, this );
		this.errors.on( 'add', this.error, this );
	},
	/**
	 * @return {wp.media.view.UploaderStatus}
	 */
	dispose: function() {
		wp.Uploader.queue.off( null, null, this );
		/**
		 * call 'dispose' directly on the parent class
		 */
		View.prototype.dispose.apply( this, arguments );
		return this;
	},

	visibility: function() {
		this.$el.toggleClass( 'uploading', !! this.queue.length );
		this.$el.toggleClass( 'errors', !! this.errors.length );
		this.$el.toggle( !! this.queue.length || !! this.errors.length );
	},

	ready: function() {
		_.each({
			'$bar':      '.media-progress-bar div',
			'$index':    '.upload-index',
			'$total':    '.upload-total',
			'$filename': '.upload-filename'
		}, function( selector, key ) {
			this[ key ] = this.$( selector );
		}, this );

		this.visibility();
		this.progress();
		this.info();
	},

	progress: function() {
		var queue = this.queue,
			$bar = this.$bar;

		if ( ! $bar || ! queue.length ) {
			return;
		}

		$bar.width( ( queue.reduce( function( memo, attachment ) {
			if ( ! attachment.get('uploading') ) {
				return memo + 100;
			}

			var percent = attachment.get('percent');
			return memo + ( _.isNumber( percent ) ? percent : 100 );
		}, 0 ) / queue.length ) + '%' );
	},

	info: function() {
		var queue = this.queue,
			index = 0, active;

		if ( ! queue.length ) {
			return;
		}

		active = this.queue.find( function( attachment, i ) {
			index = i;
			return attachment.get('uploading');
		});

		if ( this.$index && this.$total && this.$filename ) {
			this.$index.text( index + 1 );
			this.$total.text( queue.length );
			this.$filename.html( active ? this.filename( active.get('filename') ) : '' );
		}
	},
	/**
	 * @param {string} filename
	 * @return {string}
	 */
	filename: function( filename ) {
		return _.escape( filename );
	},
	/**
	 * @param {Backbone.Model} error
	 */
	error: function( error ) {
		var statusError = new wp.media.view.UploaderStatusError( {
			filename: this.filename( error.get( 'file' ).name ),
			message:  error.get( 'message' )
		} );

		var buttonClose = this.$el.find( 'button' );

		// Can show additional info here while retrying to create image sub-sizes.
		this.views.add( '.upload-errors', statusError, { at: 0 } );
		_.delay( function() {
			buttonClose.trigger( 'focus' );
		}, 1000 );

		_.delay( function() {
			wp.a11y.speak( error.get( 'message' ) );
		}, 1500 );
	},

	dismiss: function() {
		var errors = this.views.get('.upload-errors');

		if ( errors ) {
			_.invoke( errors, 'remove' );
		}
		wp.Uploader.errors.reset();
		wp.a11y.speak( wp.i18n.__( 'Error dismissed.' ) );
		// Move focus to the modal after the dismiss button gets removed from the DOM.
		if ( this.controller.modal ) {
			this.controller.modal.focusManager.focus();
		}
	}
});

module.exports = UploaderStatus;


/***/ },

/***/ 8291
(module) {

var $ = jQuery,
	UploaderWindow;

/**
 * wp.media.view.UploaderWindow
 *
 * An uploader window that allows for dragging and dropping media.
 *
 * @memberOf wp.media.view
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 *
 * @param {object} [options]                   Options hash passed to the view.
 * @param {object} [options.uploader]          Uploader properties.
 * @param {jQuery} [options.uploader.browser]
 * @param {jQuery} [options.uploader.dropzone] jQuery collection of the dropzone.
 * @param {object} [options.uploader.params]
 */
UploaderWindow = wp.media.View.extend(/** @lends wp.media.view.UploaderWindow.prototype */{
	tagName:   'div',
	className: 'uploader-window',
	template:  wp.template('uploader-window'),

	initialize: function() {
		var uploader;

		this.$browser = $( '<button type="button" class="browser" />' ).hide().appendTo( 'body' );

		uploader = this.options.uploader = _.defaults( this.options.uploader || {}, {
			dropzone:  this.$el,
			browser:   this.$browser,
			params:    {}
		});

		// Ensure the dropzone is a jQuery collection.
		if ( uploader.dropzone && ! (uploader.dropzone instanceof $) ) {
			uploader.dropzone = $( uploader.dropzone );
		}

		this.controller.on( 'activate', this.refresh, this );

		this.controller.on( 'detach', function() {
			this.$browser.remove();
		}, this );
	},

	refresh: function() {
		if ( this.uploader ) {
			this.uploader.refresh();
		}
	},

	ready: function() {
		var postId = wp.media.view.settings.post.id,
			dropzone;

		// If the uploader already exists, bail.
		if ( this.uploader ) {
			return;
		}

		if ( postId ) {
			this.options.uploader.params.post_id = postId;
		}
		this.uploader = new wp.Uploader( this.options.uploader );

		dropzone = this.uploader.dropzone;
		dropzone.on( 'dropzone:enter', _.bind( this.show, this ) );
		dropzone.on( 'dropzone:leave', _.bind( this.hide, this ) );

		$( this.uploader ).on( 'uploader:ready', _.bind( this._ready, this ) );
	},

	_ready: function() {
		this.controller.trigger( 'uploader:ready' );
	},

	show: function() {
		var $el = this.$el.show();

		// Ensure that the animation is triggered by waiting until
		// the transparent element is painted into the DOM.
		_.defer( function() {
			$el.css({ opacity: 1 });
		});
	},

	hide: function() {
		var $el = this.$el.css({ opacity: 0 });

		wp.media.transition( $el ).done( function() {
			// Transition end events are subject to race conditions.
			// Make sure that the value is set as intended.
			if ( '0' === $el.css('opacity') ) {
				$el.hide();
			}
		});

		// https://core.trac.wordpress.org/ticket/27341
		_.delay( function() {
			if ( '0' === $el.css('opacity') && $el.is(':visible') ) {
				$el.hide();
			}
		}, 500 );
	}
});

module.exports = UploaderWindow;


/***/ },

/***/ 4747
(module) {

/**
 * wp.media.View
 *
 * The base view class for media.
 *
 * Undelegating events, removing events from the model, and
 * removing events from the controller mirror the code for
 * `Backbone.View.dispose` in Backbone 0.9.8 development.
 *
 * This behavior has since been removed, and should not be used
 * outside of the media manager.
 *
 * @memberOf wp.media
 *
 * @class
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
var View = wp.Backbone.View.extend(/** @lends wp.media.View.prototype */{
	constructor: function( options ) {
		if ( options && options.controller ) {
			this.controller = options.controller;
		}
		wp.Backbone.View.apply( this, arguments );
	},
	/**
	 * @todo The internal comment mentions this might have been a stop-gap
	 *       before Backbone 0.9.8 came out. Figure out if Backbone core takes
	 *       care of this in Backbone.View now.
	 *
	 * @return {wp.media.View} Returns itself to allow chaining.
	 */
	dispose: function() {
		/*
		 * Undelegating events, removing events from the model, and
		 * removing events from the controller mirror the code for
		 * `Backbone.View.dispose` in Backbone 0.9.8 development.
		 */
		this.undelegateEvents();

		if ( this.model && this.model.off ) {
			this.model.off( null, null, this );
		}

		if ( this.collection && this.collection.off ) {
			this.collection.off( null, null, this );
		}

		// Unbind controller events.
		if ( this.controller && this.controller.off ) {
			this.controller.off( null, null, this );
		}

		return this;
	},
	/**
	 * @return {wp.media.View} Returns itself to allow chaining.
	 */
	remove: function() {
		this.dispose();
		/**
		 * call 'remove' directly on the parent class
		 */
		return wp.Backbone.View.prototype.remove.apply( this, arguments );
	}
});

module.exports = View;


/***/ }

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/**
 * @output wp-includes/js/media-views.js
 */

var media = wp.media,
	$ = jQuery,
	l10n;

media.isTouchDevice = ( 'ontouchend' in document );

// Link any localized strings.
l10n = media.view.l10n = window._wpMediaViewsL10n || {};

// Link any settings.
media.view.settings = l10n.settings || {};
delete l10n.settings;

// Copy the `post` setting over to the model settings.
media.model.settings.post = media.view.settings.post;

// Check if the browser supports CSS 3.0 transitions.
$.support.transition = (function(){
	var style = document.documentElement.style,
		transitions = {
			WebkitTransition: 'webkitTransitionEnd',
			MozTransition:    'transitionend',
			OTransition:      'oTransitionEnd otransitionend',
			transition:       'transitionend'
		}, transition;

	transition = _.find( _.keys( transitions ), function( transition ) {
		return ! _.isUndefined( style[ transition ] );
	});

	return transition && {
		end: transitions[ transition ]
	};
}());

/**
 * A shared event bus used to provide events into
 * the media workflows that 3rd-party devs can use to hook
 * in.
 */
media.events = _.extend( {}, Backbone.Events );

/**
 * Makes it easier to bind events using transitions.
 *
 * @param {string} selector
 * @param {number} sensitivity
 * @return {Promise}
 */
media.transition = function( selector, sensitivity ) {
	var deferred = $.Deferred();

	sensitivity = sensitivity || 2000;

	if ( $.support.transition ) {
		if ( ! (selector instanceof $) ) {
			selector = $( selector );
		}

		// Resolve the deferred when the first element finishes animating.
		selector.first().one( $.support.transition.end, deferred.resolve );

		// Just in case the event doesn't trigger, fire a callback.
		_.delay( deferred.resolve, sensitivity );

	// Otherwise, execute on the spot.
	} else {
		deferred.resolve();
	}

	return deferred.promise();
};

media.controller.Region = __webpack_require__( 9875 );
media.controller.StateMachine = __webpack_require__( 6150 );
media.controller.State = __webpack_require__( 5694 );

media.selectionSync = __webpack_require__( 4181 );
media.controller.Library = __webpack_require__( 472 );
media.controller.ImageDetails = __webpack_require__( 705 );
media.controller.GalleryEdit = __webpack_require__( 2038 );
media.controller.GalleryAdd = __webpack_require__( 7127 );
media.controller.CollectionEdit = __webpack_require__( 8612 );
media.controller.CollectionAdd = __webpack_require__( 7145 );
media.controller.FeaturedImage = __webpack_require__( 1169 );
media.controller.ReplaceImage = __webpack_require__( 2275 );
media.controller.EditImage = __webpack_require__( 5663 );
media.controller.MediaLibrary = __webpack_require__( 8065 );
media.controller.Embed = __webpack_require__( 4910 );
media.controller.Cropper = __webpack_require__( 5422 );
media.controller.CustomizeImageCropper = __webpack_require__( 9660 );
media.controller.SiteIconCropper = __webpack_require__( 6172 );

media.View = __webpack_require__( 4747 );
media.view.Frame = __webpack_require__( 1061 );
media.view.MediaFrame = __webpack_require__( 2836 );
media.view.MediaFrame.Select = __webpack_require__( 455 );
media.view.MediaFrame.Post = __webpack_require__( 4274 );
media.view.MediaFrame.ImageDetails = __webpack_require__( 5424 );
media.view.Modal = __webpack_require__( 2621 );
media.view.FocusManager = __webpack_require__( 718 );
media.view.UploaderWindow = __webpack_require__( 8291 );
media.view.EditorUploader = __webpack_require__( 3674 );
media.view.UploaderInline = __webpack_require__( 1753 );
media.view.UploaderStatus = __webpack_require__( 8197 );
media.view.UploaderStatusError = __webpack_require__( 6442 );
media.view.Toolbar = __webpack_require__( 5275 );
media.view.Toolbar.Select = __webpack_require__( 9458 );
media.view.Toolbar.Embed = __webpack_require__( 397 );
media.view.Button = __webpack_require__( 846 );
media.view.ButtonGroup = __webpack_require__( 168 );
media.view.PriorityList = __webpack_require__( 8815 );
media.view.MenuItem = __webpack_require__( 9013 );
media.view.Menu = __webpack_require__( 1 );
media.view.RouterItem = __webpack_require__( 6327 );
media.view.Router = __webpack_require__( 4783 );
media.view.Sidebar = __webpack_require__( 1992 );
media.view.Attachment = __webpack_require__( 4075 );
media.view.Attachment.Library = __webpack_require__( 3443 );
media.view.Attachment.EditLibrary = __webpack_require__( 5232 );
media.view.Attachments = __webpack_require__( 8142 );
media.view.Search = __webpack_require__( 2102 );
media.view.AttachmentFilters = __webpack_require__( 7709 );
media.view.DateFilter = __webpack_require__( 6472 );
media.view.AttachmentFilters.Uploaded = __webpack_require__( 1368 );
media.view.AttachmentFilters.All = __webpack_require__( 7349 );
media.view.AttachmentsBrowser = __webpack_require__( 6829 );
media.view.Selection = __webpack_require__( 8282 );
media.view.Attachment.Selection = __webpack_require__( 3962 );
media.view.Attachments.Selection = __webpack_require__( 3479 );
media.view.Attachment.EditSelection = __webpack_require__( 4593 );
media.view.Settings = __webpack_require__( 1915 );
media.view.Settings.AttachmentDisplay = __webpack_require__( 7656 );
media.view.Settings.Gallery = __webpack_require__( 7266 );
media.view.Settings.Playlist = __webpack_require__( 2356 );
media.view.Attachment.Details = __webpack_require__( 6090 );
media.view.AttachmentCompat = __webpack_require__( 2982 );
media.view.Iframe = __webpack_require__( 1982 );
media.view.Embed = __webpack_require__( 5741 );
media.view.Label = __webpack_require__( 4338 );
media.view.EmbedUrl = __webpack_require__( 7327 );
media.view.EmbedLink = __webpack_require__( 8232 );
media.view.EmbedImage = __webpack_require__( 2395 );
media.view.ImageDetails = __webpack_require__( 2650 );
media.view.Cropper = __webpack_require__( 7637 );
media.view.SiteIconCropper = __webpack_require__( 443 );
media.view.SiteIconPreview = __webpack_require__( 7810 );
media.view.EditImage = __webpack_require__( 6126 );
media.view.Spinner = __webpack_require__( 9141 );
media.view.Heading = __webpack_require__( 170 );

/******/ })()
;        media-views.min.js                                                                                  0000644                 00000330101 15212564044 0010077 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
(()=>{var i={7145(e){var s=wp.media.model.Selection,o=wp.media.controller.Library,t=o.extend({defaults:_.defaults({multiple:"add",filterable:"uploaded",priority:100,syncSelection:!1},o.prototype.defaults),initialize:function(){var e=this.get("collectionType");"video"===this.get("type")&&(e="video-"+e),this.set("id",e+"-library"),this.set("toolbar",e+"-add"),this.set("menu",e),this.get("library")||this.set("library",wp.media.query({type:this.get("type")})),o.prototype.initialize.apply(this,arguments)},activate:function(){var e=this.get("library"),t=this.get("editLibrary"),i=this.frame.state(this.get("collectionType")+"-edit").get("library");t&&t!==i&&e.unobserve(t),e.validator=function(e){return!!this.mirroring.get(e.cid)&&!i.get(e.cid)&&s.prototype.validator.apply(this,arguments)},e.reset(e.mirroring.models,{silent:!0}),e.observe(i),this.set("editLibrary",i),o.prototype.activate.apply(this,arguments)}});e.exports=t},8612(e){var t=wp.media.controller.Library,n=wp.media.view.l10n,r=jQuery,i=t.extend({defaults:{multiple:!1,sortable:!0,date:!1,searchable:!1,content:"browse",describe:!0,dragInfo:!0,idealColumnWidth:170,editing:!1,priority:60,SettingsView:!1,syncSelection:!1},initialize:function(){var e=this.get("collectionType");"video"===this.get("type")&&(e="video-"+e),this.set("id",e+"-edit"),this.set("toolbar",e+"-edit"),this.get("library")||this.set("library",new wp.media.model.Selection),this.get("AttachmentView")||this.set("AttachmentView",wp.media.view.Attachment.EditLibrary),t.prototype.initialize.apply(this,arguments)},activate:function(){this.get("library").props.set("type",this.get("type")),this.get("library").observe(wp.Uploader.queue),this.frame.on("content:render:browse",this.renderSettings,this),t.prototype.activate.apply(this,arguments)},deactivate:function(){this.get("library").unobserve(wp.Uploader.queue),this.frame.off("content:render:browse",this.renderSettings,this),t.prototype.deactivate.apply(this,arguments)},renderSettings:function(e){var t=this.get("library"),i=this.get("collectionType"),s=this.get("dragInfoText"),o=this.get("SettingsView"),a={};t&&e&&(t[i]=t[i]||new Backbone.Model,a[i]=new o({controller:this,model:t[i],priority:40}),e.sidebar.set(a),s&&e.toolbar.set("dragInfo",new wp.media.View({el:r('<div class="instructions">'+s+"</div>")[0],priority:-40})),e.toolbar.set("reverse",{text:n.reverseOrder,priority:80,click:function(){t.reset(t.toArray().reverse())}}))}});e.exports=i},5422(e){var a=wp.media.view.l10n,t=wp.media.controller.State.extend({defaults:{id:"cropper",title:a.cropImage,toolbar:"crop",content:"crop",router:!1,canSkipCrop:!1,doCropArgs:{}},activate:function(){this.frame.on("content:create:crop",this.createCropContent,this),this.frame.on("close",this.removeCropper,this),this.set("selection",new Backbone.Collection(this.frame._selection.single))},deactivate:function(){this.frame.toolbar.mode("browse")},createCropContent:function(){this.cropperView=new wp.media.view.Cropper({controller:this,attachment:this.get("selection").first()}),this.cropperView.on("image-loaded",this.createCropToolbar,this),this.frame.content.set(this.cropperView)},removeCropper:function(){this.imgSelect.cancelSelection(),this.imgSelect.setOptions({remove:!0}),this.imgSelect.update(),this.cropperView.remove()},createCropToolbar:function(){var i=this.get("suggestedCropSize"),s=this.get("hasRequiredAspectRatio"),o=this.get("canSkipCrop")||!1,e={controller:this.frame,items:{insert:{style:"primary",text:a.cropImage,priority:80,requires:{library:!1,selection:!1},click:function(){var t=this.controller,e=t.state().get("selection").first();e.set({cropDetails:t.state().imgSelect.getSelection()}),this.$el.text(a.cropping),this.$el.attr("disabled",!0),t.state().doCrop(e).done(function(e){t.trigger("cropped",e),t.close()}).fail(function(){t.trigger("content:error:crop")})}}}};(o||s)&&_.extend(e.items,{skip:{style:"secondary",text:a.skipCropping,priority:70,requires:{library:!1,selection:!1},click:function(){var t=this.controller,e=t.state().get("selection").first();t.state().cropperView.remove(),s&&!o?(e.set({cropDetails:i}),t.state().doCrop(e).done(function(e){t.trigger("cropped",e),t.close()}).fail(function(){t.trigger("content:error:crop")})):(t.trigger("skippedcrop",e),t.close())}}}),this.frame.toolbar.set(new wp.media.view.Toolbar(e))},doCrop:function(e){return wp.ajax.post("custom-header-crop",_.extend({},this.defaults.doCropArgs,{nonce:e.get("nonces").edit,id:e.get("id"),cropDetails:e.get("cropDetails")}))}});e.exports=t},9660(e){var t=wp.media.controller.Cropper.extend({doCrop:function(e){var t=e.get("cropDetails"),i=this.get("control"),s=t.width/t.height;return i.params.flex_width&&i.params.flex_height?(t.dst_width=t.width,t.dst_height=t.height):(t.dst_width=i.params.flex_width?i.params.height*s:i.params.width,t.dst_height=i.params.flex_height?i.params.width/s:i.params.height),wp.ajax.post("crop-image",{wp_customize:"on",nonce:e.get("nonces").edit,id:e.get("id"),context:i.id,cropDetails:t})}});e.exports=t},5663(e){var s=wp.media.view.l10n,t=wp.media.controller.State.extend({defaults:{id:"edit-image",title:s.editImage,menu:!1,toolbar:"edit-image",content:"edit-image",url:""},activate:function(){this.frame.on("toolbar:render:edit-image",_.bind(this.toolbar,this))},deactivate:function(){this.frame.off("toolbar:render:edit-image")},toolbar:function(){var e=this.frame,t=e.lastState(),i=t&&t.id;e.toolbar.set(new wp.media.view.Toolbar({controller:e,items:{back:{style:"primary",text:s.back,priority:20,click:function(){i?e.setState(i):e.close()}}}}))}});e.exports=t},4910(e){var t=wp.media.view.l10n,n=Backbone.$,t=wp.media.controller.State.extend({defaults:{id:"embed",title:t.insertFromUrlTitle,content:"embed",menu:"default",toolbar:"main-embed",priority:120,type:"link",url:"",metadata:{}},sensitivity:400,initialize:function(e){this.metadata=e.metadata,this.debouncedScan=_.debounce(_.bind(this.scan,this),this.sensitivity),this.props=new Backbone.Model(this.metadata||{url:""}),this.props.on("change:url",this.debouncedScan,this),this.props.on("change:url",this.refresh,this),this.on("scan",this.scanImage,this)},scan:function(){var e,t=this,i={type:"link",scanners:[]};this.props.get("url")&&this.trigger("scan",i),i.scanners.length?(e=i.scanners=n.when.apply(n,i.scanners)).always(function(){t.get("scanners")===e&&t.set("loading",!1)}):i.scanners=null,i.loading=!!i.scanners,this.set(i)},scanImage:function(e){var t=this.frame,i=this,s=this.props.get("url"),o=new Image,a=n.Deferred();e.scanners.push(a.promise()),o.onload=function(){a.resolve(),i===t.state()&&s===i.props.get("url")&&(i.set({type:"image"}),i.props.set({width:o.width,height:o.height}))},o.onerror=a.reject,o.src=s},refresh:function(){this.frame.toolbar.get().refresh()},reset:function(){this.props.clear().set({url:""}),this.active&&this.refresh()}});e.exports=t},1169(e){var s=wp.media.model.Attachment,t=wp.media.controller.Library,i=wp.media.view.l10n,i=t.extend({defaults:_.defaults({id:"featured-image",title:i.setFeaturedImageTitle,multiple:!1,filterable:"uploaded",toolbar:"featured-image",priority:60,syncSelection:!0},t.prototype.defaults),initialize:function(){var e,o;this.get("library")||this.set("library",wp.media.query({type:"image"})),t.prototype.initialize.apply(this,arguments),e=this.get("library"),o=e.comparator,e.comparator=function(e,t){var i=!!this.mirroring.get(e.cid),s=!!this.mirroring.get(t.cid);return!i&&s?-1:i&&!s?1:o.apply(this,arguments)},e.observe(this.get("selection"))},activate:function(){this.frame.on("open",this.updateSelection,this),t.prototype.activate.apply(this,arguments)},deactivate:function(){this.frame.off("open",this.updateSelection,this),t.prototype.deactivate.apply(this,arguments)},updateSelection:function(){var e,t=this.get("selection"),i=wp.media.view.settings.post.featuredImageId;""!==i&&-1!==i&&(e=s.get(i)).fetch(),t.reset(e?[e]:[])}});e.exports=i},7127(e){var i=wp.media.model.Selection,s=wp.media.controller.Library,t=wp.media.view.l10n,t=s.extend({defaults:_.defaults({id:"gallery-library",title:t.addToGalleryTitle,multiple:"add",filterable:"uploaded",menu:"gallery",toolbar:"gallery-add",priority:100,syncSelection:!1},s.prototype.defaults),initialize:function(){this.get("library")||this.set("library",wp.media.query({type:"image"})),s.prototype.initialize.apply(this,arguments)},activate:function(){var e=this.get("library"),t=this.frame.state("gallery-edit").get("library");this.editLibrary&&this.editLibrary!==t&&e.unobserve(this.editLibrary),e.validator=function(e){return!!this.mirroring.get(e.cid)&&!t.get(e.cid)&&i.prototype.validator.apply(this,arguments)},e.reset(e.mirroring.models,{silent:!0}),e.observe(t),this.editLibrary=t,s.prototype.activate.apply(this,arguments)}});e.exports=t},2038(e){var t=wp.media.controller.Library,i=wp.media.view.l10n,s=t.extend({defaults:{id:"gallery-edit",title:i.editGalleryTitle,multiple:!1,searchable:!1,sortable:!0,date:!1,display:!1,content:"browse",toolbar:"gallery-edit",describe:!0,displaySettings:!0,dragInfo:!0,idealColumnWidth:170,editing:!1,priority:60,syncSelection:!1},initialize:function(){this.get("library")||this.set("library",new wp.media.model.Selection),this.get("AttachmentView")||this.set("AttachmentView",wp.media.view.Attachment.EditLibrary),t.prototype.initialize.apply(this,arguments)},activate:function(){this.get("library").props.set("type","image"),this.get("library").observe(wp.Uploader.queue),this.frame.on("content:render:browse",this.gallerySettings,this),t.prototype.activate.apply(this,arguments)},deactivate:function(){this.get("library").unobserve(wp.Uploader.queue),this.frame.off("content:render:browse",this.gallerySettings,this),t.prototype.deactivate.apply(this,arguments)},gallerySettings:function(e){var t;this.get("displaySettings")&&(t=this.get("library"))&&e&&(t.gallery=t.gallery||new Backbone.Model,e.sidebar.set({gallery:new wp.media.view.Settings.Gallery({controller:this,model:t.gallery,priority:40})}),e.toolbar.set("reverse",{text:i.reverseOrder,priority:80,click:function(){t.reset(t.toArray().reverse())}}))}});e.exports=s},705(e){var t=wp.media.controller.State,i=wp.media.controller.Library,s=wp.media.view.l10n,s=t.extend({defaults:_.defaults({id:"image-details",title:s.imageDetailsTitle,content:"image-details",menu:!1,router:!1,toolbar:"image-details",editing:!1,priority:60},i.prototype.defaults),initialize:function(e){this.image=e.image,t.prototype.initialize.apply(this,arguments)},activate:function(){this.frame.modal.$el.addClass("image-details")}});e.exports=s},472(e){var t=wp.media.view.l10n,i=window.getUserSetting,s=window.setUserSetting,t=wp.media.controller.State.extend({defaults:{id:"library",title:t.mediaLibraryTitle,multiple:!1,content:"upload",menu:"default",router:"browse",toolbar:"select",searchable:!0,filterable:!1,sortable:!0,autoSelect:!0,describe:!1,contentUserSetting:!0,syncSelection:!0},initialize:function(){var e=this.get("selection");this.get("library")||this.set("library",wp.media.query()),e instanceof wp.media.model.Selection||((e=e)||(e=this.get("library").props.toJSON(),e=_.omit(e,"orderby","query")),this.set("selection",new wp.media.model.Selection(null,{multiple:this.get("multiple"),props:e}))),this.resetDisplays()},activate:function(){this.syncSelection(),wp.Uploader.queue.on("add",this.uploading,this),this.get("selection").on("add remove reset",this.refreshContent,this),this.get("router")&&this.get("contentUserSetting")&&(this.frame.on("content:activate",this.saveContentMode,this),this.set("content",i("libraryContent",this.get("content"))))},deactivate:function(){this.recordSelection(),this.frame.off("content:activate",this.saveContentMode,this),this.get("selection").off(null,null,this),wp.Uploader.queue.off(null,null,this)},reset:function(){this.get("selection").reset(),this.resetDisplays(),this.refreshContent()},resetDisplays:function(){var e=wp.media.view.settings.defaultProps;this._displays=[],this._defaultDisplaySettings={align:i("align",e.align)||"none",size:i("imgsize",e.size)||"medium",link:i("urlbutton",e.link)||"none"}},display:function(e){var t=this._displays;return t[e.cid]||(t[e.cid]=new Backbone.Model(this.defaultDisplaySettings(e))),t[e.cid]},defaultDisplaySettings:function(e){var t=_.clone(this._defaultDisplaySettings);return t.canEmbed=this.canEmbed(e),t.canEmbed?t.link="embed":this.isImageAttachment(e)||"none"!==t.link||(t.link="file"),t},isImageAttachment:function(e){return e.get("uploading")?/\.(jpe?g|png|gif|webp|avif|heic|heif)$/i.test(e.get("filename")):"image"===e.get("type")},canEmbed:function(e){if(!e.get("uploading")){var t=e.get("type");if("audio"!==t&&"video"!==t)return!1}return _.contains(wp.media.view.settings.embedExts,e.get("filename").split(".").pop())},refreshContent:function(){var e=this.get("selection"),t=this.frame,i=t.router.get(),t=t.content.mode();this.active&&!e.length&&i&&!i.get(t)&&this.frame.content.render(this.get("content"))},uploading:function(e){"upload"===this.frame.content.mode()&&this.frame.content.mode("browse"),this.get("autoSelect")&&(this.get("selection").add(e),this.frame.trigger("library:selection:add"))},saveContentMode:function(){var e,t;"browse"===this.get("router")&&(e=this.frame.content.mode(),t=this.frame.router.get())&&t.get(e)&&s("libraryContent",e)}});_.extend(t.prototype,wp.media.selectionSync),e.exports=t},8065(e){var t=wp.media.controller.Library,i=t.extend({defaults:_.defaults({filterable:"uploaded",displaySettings:!1,priority:80,syncSelection:!1},t.prototype.defaults),initialize:function(e){this.media=e.media,this.type=e.type,this.set("library",wp.media.query({type:this.type})),t.prototype.initialize.apply(this,arguments)},activate:function(){wp.media.frame.lastMime&&(this.set("library",wp.media.query({type:wp.media.frame.lastMime})),delete wp.media.frame.lastMime),t.prototype.activate.apply(this,arguments)}});e.exports=i},9875(e){function t(e){_.extend(this,_.pick(e||{},"id","view","selector"))}t.extend=Backbone.Model.extend,_.extend(t.prototype,{mode:function(e){return e?(e!==this._mode&&(this.trigger("deactivate"),this._mode=e,this.render(e),this.trigger("activate")),this):this._mode},render:function(e){return e&&e!==this._mode?this.mode(e):(this.trigger("create",e={view:null}),this.trigger("render",e=e.view),e&&this.set(e),this)},get:function(){return this.view.views.first(this.selector)},set:function(e,t){return t&&(t.add=!1),this.view.views.set(this.selector,e,t)},trigger:function(e){var t,i;if(this._mode)return i=_.toArray(arguments),t=this.id+":"+e,i[0]=t+":"+this._mode,this.view.trigger.apply(this.view,i),i[0]=t,this.view.trigger.apply(this.view,i),this}}),e.exports=t},2275(e){var i=wp.media.controller.Library,t=wp.media.view.l10n,t=i.extend({defaults:_.defaults({id:"replace-image",title:t.replaceImageTitle,multiple:!1,filterable:"uploaded",toolbar:"replace",menu:!1,priority:60,syncSelection:!0},i.prototype.defaults),initialize:function(e){var t,o;this.image=e.image,this.get("library")||this.set("library",wp.media.query({type:"image"})),i.prototype.initialize.apply(this,arguments),t=this.get("library"),o=t.comparator,t.comparator=function(e,t){var i=!!this.mirroring.get(e.cid),s=!!this.mirroring.get(t.cid);return!i&&s?-1:i&&!s?1:o.apply(this,arguments)},t.observe(this.get("selection"))},activate:function(){this.frame.on("content:render:browse",this.updateSelection,this),i.prototype.activate.apply(this,arguments)},deactivate:function(){this.frame.off("content:render:browse",this.updateSelection,this),i.prototype.deactivate.apply(this,arguments)},updateSelection:function(){var e=this.get("selection"),t=this.image.attachment;e.reset(t?[t]:[])}});e.exports=t},6172(e){var t=wp.media.controller.Cropper.extend({activate:function(){this.frame.on("content:create:crop",this.createCropContent,this),this.frame.on("close",this.removeCropper,this),this.set("selection",new Backbone.Collection(this.frame._selection.single))},createCropContent:function(){this.cropperView=new wp.media.view.SiteIconCropper({controller:this,attachment:this.get("selection").first()}),this.cropperView.on("image-loaded",this.createCropToolbar,this),this.frame.content.set(this.cropperView)},doCrop:function(e){var t=e.get("cropDetails"),i=this.get("control");return t.dst_width=i.params.width,t.dst_height=i.params.height,wp.ajax.post("crop-image",{nonce:e.get("nonces").edit,id:e.get("id"),context:"site-icon",cropDetails:t})}});e.exports=t},6150(e){function t(){return{extend:Backbone.Model.extend}}_.extend(t.prototype,Backbone.Events,{state:function(e){return this.states=this.states||new Backbone.Collection,(e=e||this._state)&&!this.states.get(e)&&this.states.add({id:e}),this.states.get(e)},setState:function(e){var t=this.state();return t&&e===t.id||!this.states||!this.states.get(e)||(t&&(t.trigger("deactivate"),this._lastState=t.id),this._state=e,this.state().trigger("activate")),this},lastState:function(){if(this._lastState)return this.state(this._lastState)}}),_.each(["on","off","trigger"],function(e){t.prototype[e]=function(){return this.states=this.states||new Backbone.Collection,this.states[e].apply(this.states,arguments),this}}),e.exports=t},5694(e){var i=Backbone.Model.extend({constructor:function(){this.on("activate",this._preActivate,this),this.on("activate",this.activate,this),this.on("activate",this._postActivate,this),this.on("deactivate",this._deactivate,this),this.on("deactivate",this.deactivate,this),this.on("reset",this.reset,this),this.on("ready",this._ready,this),this.on("ready",this.ready,this),Backbone.Model.apply(this,arguments),this.on("change:menu",this._updateMenu,this)},ready:function(){},activate:function(){},deactivate:function(){},reset:function(){},_ready:function(){this._updateMenu()},_preActivate:function(){this.active=!0},_postActivate:function(){this.on("change:menu",this._menu,this),this.on("change:titleMode",this._title,this),this.on("change:content",this._content,this),this.on("change:toolbar",this._toolbar,this),this.frame.on("title:render:default",this._renderTitle,this),this._title(),this._menu(),this._toolbar(),this._content(),this._router()},_deactivate:function(){this.active=!1,this.frame.off("title:render:default",this._renderTitle,this),this.off("change:menu",this._menu,this),this.off("change:titleMode",this._title,this),this.off("change:content",this._content,this),this.off("change:toolbar",this._toolbar,this)},_title:function(){this.frame.title.render(this.get("titleMode")||"default")},_renderTitle:function(e){e.$el.text(this.get("title")||"")},_router:function(){var e=this.frame.router,t=this.get("router");this.frame.$el.toggleClass("hide-router",!t),t&&(this.frame.router.render(t),t=e.get())&&t.select&&t.select(this.frame.content.mode())},_menu:function(){var e,t=this.frame.menu,i=this.get("menu");this.frame.menu&&(e=(e=this.frame.menu.get("views"))?e.views.get().length:0,this.frame.$el.toggleClass("hide-menu",!i||e<2)),i&&(t.mode(i),e=t.get())&&e.select&&e.select(this.id)},_updateMenu:function(){var e=this.previous("menu"),t=this.get("menu");e&&this.frame.off("menu:render:"+e,this._renderMenu,this),t&&this.frame.on("menu:render:"+t,this._renderMenu,this)},_renderMenu:function(e){var t=this.get("menuItem"),i=this.get("title"),s=this.get("priority");!t&&i&&(t={text:i},s)&&(t.priority=s),t&&e.set(this.id,t)}});_.each(["toolbar","content"],function(t){i.prototype["_"+t]=function(){var e=this.get(t);e&&this.frame[t].render(e)}}),e.exports=i},4181(e){e.exports={syncSelection:function(){var e=this.get("selection"),t=this.frame._selection;this.get("syncSelection")&&t&&e&&(e.multiple&&(e.reset([],{silent:!0}),e.validateAll(t.attachments),t.difference=_.difference(t.attachments.models,e.models)),e.single(t.single))},recordSelection:function(){var e=this.get("selection"),t=this.frame._selection;this.get("syncSelection")&&t&&e&&(e.multiple?(t.attachments.reset(e.toArray().concat(t.difference)),t.difference=[]):t.attachments.add(e.toArray()),t.single=e._single)}}},2982(e){var t=wp.media.View,i=t.extend({tagName:"form",className:"compat-item",events:{submit:"preventDefault","change input":"save","change select":"save","change textarea":"save"},initialize:function(){this.listenTo(this.model,"add",this.render)},dispose:function(){return this.$(":focus").length&&this.save(),t.prototype.dispose.apply(this,arguments)},render:function(){var e=this.model.get("compat");if(e&&e.item)return this.views.detach(),this.$el.html(e.item),this.views.render(),this},preventDefault:function(e){e.preventDefault()},save:function(e){var t={};e&&e.preventDefault(),_.each(this.$el.serializeArray(),function(e){t[e.name]=e.value}),this.controller.trigger("attachment:compat:waiting",["waiting"]),this.model.saveCompat(t).always(_.bind(this.postSave,this))},postSave:function(){this.controller.trigger("attachment:compat:ready",["ready"])}});e.exports=i},7709(e){var i=jQuery,t=wp.media.View.extend({tagName:"select",className:"attachment-filters",id:"media-attachment-filters",events:{change:"change"},keys:[],initialize:function(){this.createFilters(),_.extend(this.filters,this.options.filters),this.$el.html(_.chain(this.filters).map(function(e,t){return{el:i("<option></option>").val(t).html(e.text)[0],priority:e.priority||50}},this).sortBy("priority").pluck("el").value()),this.listenTo(this.model,"change",this.select),this.select()},createFilters:function(){this.filters={}},change:function(){var e=this.filters[this.el.value];e&&this.model.set(e.props)},select:function(){var e=this.model,i="all",s=e.toJSON();_.find(this.filters,function(e,t){if(_.all(e.props,function(e,t){return e===(_.isUndefined(s[t])?null:s[t])}))return i=t}),this.$el.val(i)}});e.exports=t},7349(e){var t=wp.media.view.l10n,i=wp.media.view.AttachmentFilters.extend({createFilters:function(){var i={},e=window.userSettings?parseInt(window.userSettings.uid,10):0;_.each(wp.media.view.settings.mimeTypes||{},function(e,t){i[t]={text:e,props:{status:null,type:t,uploadedTo:null,orderby:"date",order:"DESC",author:null}}}),i.all={text:t.allMediaItems,props:{status:null,type:null,uploadedTo:null,orderby:"date",order:"DESC",author:null},priority:10},wp.media.view.settings.post.id&&(i.uploaded={text:t.uploadedToThisPost,props:{status:null,type:null,uploadedTo:wp.media.view.settings.post.id,orderby:"menuOrder",order:"ASC",author:null},priority:20}),i.unattached={text:t.unattached,props:{status:null,uploadedTo:0,type:null,orderby:"menuOrder",order:"ASC",author:null},priority:50},e&&(i.mine={text:t.mine,props:{status:null,type:null,uploadedTo:null,orderby:"date",order:"DESC",author:e},priority:50}),wp.media.view.settings.mediaTrash&&this.controller.isModeActive("grid")&&(i.trash={text:t.trash,props:{uploadedTo:null,status:"trash",type:null,orderby:"date",order:"DESC",author:null},priority:50}),this.filters=i}});e.exports=i},6472(e){var t=wp.media.view.l10n,i=wp.media.view.AttachmentFilters.extend({id:"media-attachment-date-filters",createFilters:function(){var i={};_.each(wp.media.view.settings.months||{},function(e,t){i[t]={text:e.text,props:{year:e.year,monthnum:e.month}}}),i.all={text:t.allDates,props:{monthnum:!1,year:!1},priority:10},this.filters=i}});e.exports=i},1368(e){var o=wp.media.view.l10n,t=wp.media.view.AttachmentFilters.extend({createFilters:function(){var e,t=this.model.get("type"),i=wp.media.view.settings.mimeTypes,s=window.userSettings?parseInt(window.userSettings.uid,10):0;i&&t&&(e=i[t]),this.filters={all:{text:e||o.allMediaItems,props:{uploadedTo:null,orderby:"date",order:"DESC",author:null},priority:10},uploaded:{text:o.uploadedToThisPost,props:{uploadedTo:wp.media.view.settings.post.id,orderby:"menuOrder",order:"ASC",author:null},priority:20},unattached:{text:o.unattached,props:{uploadedTo:0,orderby:"menuOrder",order:"ASC",author:null},priority:50}},s&&(this.filters.mine={text:o.mine,props:{orderby:"date",order:"DESC",author:s},priority:50})}});e.exports=t},4075(e){var t=wp.media.View,o=jQuery,i=t.extend({tagName:"li",className:"attachment",template:wp.template("attachment"),attributes:function(){return{tabIndex:0,role:"checkbox","aria-label":this.model.get("title")||wp.i18n.__("uploading\u2026"),"aria-checked":!1,"data-id":this.model.get("id")}},events:{click:"toggleSelectionHandler","change [data-setting]":"updateSetting","change [data-setting] input":"updateSetting","change [data-setting] select":"updateSetting","change [data-setting] textarea":"updateSetting","click .attachment-close":"removeFromLibrary","click .check":"checkClickHandler",keydown:"toggleSelectionHandler"},buttons:{},initialize:function(){var e=this.options.selection;_.defaults(this.options,{rerenderOnModelChange:!0}).rerenderOnModelChange?this.listenTo(this.model,"change",this.render):this.listenTo(this.model,"change:percent",this.progress),this.listenTo(this.model,"change:title",this._syncTitle),this.listenTo(this.model,"change:caption",this._syncCaption),this.listenTo(this.model,"change:artist",this._syncArtist),this.listenTo(this.model,"change:album",this._syncAlbum),this.listenTo(this.model,"add",this.select),this.listenTo(this.model,"remove",this.deselect),e&&(e.on("reset",this.updateSelect,this),this.listenTo(this.model,"selection:single selection:unsingle",this.details),this.details(this.model,this.controller.state().get("selection"))),this.listenTo(this.controller.states,"attachment:compat:waiting attachment:compat:ready",this.updateSave)},dispose:function(){var e=this.options.selection;return this.updateAll(),e&&e.off(null,null,this),t.prototype.dispose.apply(this,arguments),this},render:function(){var e=_.defaults(this.model.toJSON(),{orientation:"landscape",uploading:!1,type:"",subtype:"",icon:"",filename:"",caption:"",title:"",dateFormatted:"",width:"",height:"",compat:!1,alt:"",description:""},this.options);return e.buttons=this.buttons,e.describe=this.controller.state().get("describe"),"image"===e.type&&(e.size=this.imageSize()),e.can={},e.nonces&&(e.can.remove=!!e.nonces.delete,e.can.save=!!e.nonces.update),this.controller.state().get("allowLocalEdits")&&!e.uploading&&(e.allowLocalEdits=!0),e.uploading&&!e.percent&&(e.percent=0),this.views.detach(),this.$el.html(this.template(e)),this.$el.toggleClass("uploading",e.uploading),e.uploading?this.$bar=this.$(".media-progress-bar div"):delete this.$bar,this.updateSelect(),this.updateSave(),this.views.render(),this},progress:function(){this.$bar&&this.$bar.length&&this.$bar.width(this.model.get("percent")+"%")},toggleSelectionHandler:function(e){var t;if("INPUT"!==e.target.nodeName&&"BUTTON"!==e.target.nodeName)if(37===e.keyCode||38===e.keyCode||39===e.keyCode||40===e.keyCode)this.controller.trigger("attachment:keydown:arrow",e);else if("keydown"!==e.type||13===e.keyCode||32===e.keyCode){if(e.preventDefault(),this.controller.isModeActive("grid")){if(this.controller.isModeActive("edit"))return void this.controller.trigger("edit:attachment",this.model,e.currentTarget);this.controller.isModeActive("select")&&(t="toggle")}e.shiftKey?t="between":(e.ctrlKey||e.metaKey)&&(t="toggle"),(!e.metaKey&&!e.ctrlKey||13!==e.keyCode&&10!==e.keyCode)&&(this.toggleSelection({method:t}),this.controller.trigger("selection:toggle"))}},toggleSelection:function(e){var t,i,s,o=this.collection,a=this.options.selection,n=this.model,e=e&&e.method;if(a){if(t=a.single(),"between"===(e=_.isUndefined(e)?a.multiple:e)&&t&&a.multiple)return t===n?void 0:(o=(i=o.indexOf(t))<(s=o.indexOf(this.model))?o.models.slice(i,s+1):o.models.slice(s,i+1),a.add(o),void a.single(n));"toggle"===e?(a[this.selected()?"remove":"add"](n),a.single(n)):"add"===e?(a.add(n),a.single(n)):("add"!==(e=e||"add")&&(e="reset"),this.selected()?a[t===n?"remove":"single"](n):(a[e](n),a.single(n)))}},updateSelect:function(){this[this.selected()?"select":"deselect"]()},selected:function(){var e=this.options.selection;if(e)return!!e.get(this.model.cid)},select:function(e,t){var i=this.options.selection,s=this.controller;!i||t&&t!==i||this.$el.hasClass("selected")||(this.$el.addClass("selected").attr("aria-checked",!0),s.isModeActive("grid")&&s.isModeActive("select"))||this.$(".check").attr("tabindex","0")},deselect:function(e,t){var i=this.options.selection;!i||t&&t!==i||this.$el.removeClass("selected").attr("aria-checked",!1).find(".check").attr("tabindex","-1")},details:function(e,t){var i=this.options.selection;i===t&&(t=i.single(),this.$el.toggleClass("details",t===this.model))},imageSize:function(e){var t=this.model.get("sizes"),i=!1;return e=e||"medium",t&&(t[e]?i=t[e]:t.large?i=t.large:t.thumbnail?i=t.thumbnail:t.full&&(i=t.full),i)?_.clone(i):{url:this.model.get("url"),width:this.model.get("width"),height:this.model.get("height"),orientation:this.model.get("orientation")}},updateSetting:function(e){var t=o(e.target).closest("[data-setting]");t.length&&(t=t.data("setting"),e=e.target.value,this.model.get(t)!==e)&&this.save(t,e)},save:function(){var e=this,t=this._save=this._save||{status:"ready"},i=this.model.save.apply(this.model,arguments),s=t.requests?o.when(i,t.requests):i;t.savedTimer&&clearTimeout(t.savedTimer),this.updateSave("waiting"),(t.requests=s).always(function(){t.requests===s&&(e.updateSave("resolved"===s.state()?"complete":"error"),t.savedTimer=setTimeout(function(){e.updateSave("ready"),delete t.savedTimer},2e3))})},updateSave:function(e){var t=this._save=this._save||{status:"ready"};return e&&e!==t.status&&(this.$el.removeClass("save-"+t.status),t.status=e),this.$el.addClass("save-"+t.status),this},updateAll:function(){var e=this.$("[data-setting]"),i=this.model,e=_.chain(e).map(function(e){var t=o("input, textarea, select, [value]",e);if(t.length)return e=o(e).data("setting"),t=t.val(),i.get(e)!==t?[e,t]:void 0}).compact().object().value();_.isEmpty(e)||i.save(e)},removeFromLibrary:function(e){"keydown"===e.type&&13!==e.keyCode&&32!==e.keyCode||(e.stopPropagation(),this.collection.remove(this.model))},checkClickHandler:function(e){var t=this.options.selection;t&&(e.stopPropagation(),t.where({id:this.model.get("id")}).length?(t.remove(this.model),this.$el.focus()):t.add(this.model),this.controller.trigger("selection:toggle"))}});_.each({caption:"_syncCaption",title:"_syncTitle",artist:"_syncArtist",album:"_syncAlbum"},function(e,s){i.prototype[e]=function(e,t){var i=this.$('[data-setting="'+s+'"]');return!i.length||t===i.find("input, textarea, select, [value]").val()?this:this.render()}}),e.exports=i},6090(e){var t=wp.media.view.Attachment,i=wp.media.view.l10n,o=jQuery,a=wp.i18n.__,s=t.extend({tagName:"div",className:"attachment-details",template:wp.template("attachment-details"),attributes:{},events:{"change [data-setting]":"updateSetting","change [data-setting] input":"updateSetting","change [data-setting] select":"updateSetting","change [data-setting] textarea":"updateSetting","click .delete-attachment":"deleteAttachment","click .trash-attachment":"trashAttachment","click .untrash-attachment":"untrashAttachment","click .edit-attachment":"editAttachment",keydown:"toggleSelectionHandler"},copyAttachmentDetailsURLClipboard:function(){var s;new ClipboardJS(".copy-attachment-url").on("success",function(e){var t=o(e.trigger),i=o(".success",t.closest(".copy-to-clipboard-container"));e.clearSelection(),clearTimeout(s),i.removeClass("hidden"),s=setTimeout(function(){i.addClass("hidden")},3e3),wp.a11y.speak(a("The file URL has been copied to your clipboard"))})},initialize:function(){this.options=_.defaults(this.options,{rerenderOnModelChange:!1}),t.prototype.initialize.apply(this,arguments),this.copyAttachmentDetailsURLClipboard()},getFocusableElements:function(){var e=o('li[data-id="'+this.model.id+'"]');this.previousAttachment=e.prev(),this.nextAttachment=e.next()},moveFocus:function(){this.previousAttachment.length?this.previousAttachment.trigger("focus"):this.nextAttachment.length?this.nextAttachment.trigger("focus"):this.controller.uploader&&this.controller.uploader.$browser?this.controller.uploader.$browser.trigger("focus"):this.moveFocusToLastFallback()},moveFocusToLastFallback:function(){o(".media-frame").attr("tabindex","-1").trigger("focus")},deleteAttachment:function(e){e.preventDefault(),this.getFocusableElements(),window.confirm(i.warnDelete)&&(this.model.destroy({wait:!0,error:function(){window.alert(i.errorDeleting)}}),this.moveFocus())},trashAttachment:function(e){var t=this.controller.library,i=this;e.preventDefault(),this.getFocusableElements(),wp.media.view.settings.mediaTrash&&"edit-metadata"===this.controller.content.mode()?(this.model.set("status","trash"),this.model.save().done(function(){t._requery(!0),i.moveFocusToLastFallback()})):(this.model.destroy(),this.moveFocus())},untrashAttachment:function(e){var t=this.controller.library;e.preventDefault(),this.model.set("status","inherit"),this.model.save().done(function(){t._requery(!0)})},editAttachment:function(e){var t=this.controller.states.get("edit-image");window.imageEdit&&t?(e.preventDefault(),t.set("image",this.model),this.controller.setState("edit-image")):this.$el.addClass("needs-refresh")},toggleSelectionHandler:function(e){if("keydown"===e.type&&9===e.keyCode&&e.shiftKey&&e.target===this.$(":tabbable").get(0))return this.controller.trigger("attachment:details:shift-tab",e),!1},render:function(){t.prototype.render.apply(this,arguments),wp.media.mixin.removeAllPlayers(),this.$("audio, video").each(function(e,t){t=wp.media.view.MediaDetails.prepareSrc(t);new window.MediaElementPlayer(t,wp.media.mixin.mejsSettings)})}});e.exports=s},5232(e){var t=wp.media.view.Attachment.extend({buttons:{close:!0}});e.exports=t},4593(e){var t=wp.media.view.Attachment.Selection.extend({buttons:{close:!0}});e.exports=t},3443(e){var t=wp.media.view.Attachment.extend({buttons:{check:!0}});e.exports=t},3962(e){var t=wp.media.view.Attachment.extend({className:"attachment selection",toggleSelection:function(){this.options.selection.single(this.model)}});e.exports=t},8142(e){var t=wp.media.View,a=jQuery,i=wp.media.view.settings.infiniteScrolling,s=t.extend({tagName:"ul",className:"attachments",attributes:{tabIndex:-1},initialize:function(){this.el.id=_.uniqueId("__attachments-view-"),_.defaults(this.options,{infiniteScrolling:i||!1,refreshSensitivity:wp.media.isTouchDevice?300:200,refreshThreshold:3,AttachmentView:wp.media.view.Attachment,sortable:!1,resize:!0,idealColumnWidth:a(window).width()<640?135:150}),this._viewsByCid={},this.$window=a(window),this.resizeEvent="resize.media-modal-columns",this.collection.on("add",function(e){this.views.add(this.createAttachmentView(e),{at:this.collection.indexOf(e)})},this),this.collection.on("remove",function(e){var t=this._viewsByCid[e.cid];delete this._viewsByCid[e.cid],t&&t.remove()},this),this.collection.on("reset",this.render,this),this.controller.on("library:selection:add",this.attachmentFocus,this),this.options.infiniteScrolling&&(this.scroll=_.chain(this.scroll).bind(this).throttle(this.options.refreshSensitivity).value(),this.options.scrollElement=this.options.scrollElement||this.el,a(this.options.scrollElement).on("scroll",this.scroll)),this.initSortable(),_.bindAll(this,"setColumns"),this.options.resize&&(this.on("ready",this.bindEvents),this.controller.on("open",this.setColumns),_.defer(this.setColumns,this))},bindEvents:function(){this.$window.off(this.resizeEvent).on(this.resizeEvent,_.debounce(this.setColumns,50))},attachmentFocus:function(){this.columns&&this.$el.focus()},restoreFocus:function(){this.$("li.selected:first").focus()},arrowEvent:function(e){var t=this.$el.children("li"),i=this.columns,s=t.filter(":focus").index(),o=s+1<=i?1:Math.ceil((s+1)/i);if(-1!==s){if(37===e.keyCode){if(0===s)return;t.eq(s-1).focus()}if(38===e.keyCode){if(1===o)return;t.eq(s-i).focus()}if(39===e.keyCode){if(t.length===s)return;t.eq(s+1).focus()}40===e.keyCode&&Math.ceil(t.length/i)!==o&&t.eq(s+i).focus()}},dispose:function(){this.collection.props.off(null,null,this),this.options.resize&&this.$window.off(this.resizeEvent),t.prototype.dispose.apply(this,arguments)},setColumns:function(){var e=this.columns,t=this.$el.width();t&&(this.columns=Math.min(Math.round(t/this.options.idealColumnWidth),12)||1,e&&e===this.columns||this.$el.closest(".media-frame-content").attr("data-columns",this.columns))},initSortable:function(){var o=this.collection;this.options.sortable&&a.fn.sortable&&(this.$el.sortable(_.extend({disabled:!!o.comparator,tolerance:"pointer",start:function(e,t){t.item.data("sortableIndexStart",t.item.index())},update:function(e,t){var i=o.at(t.item.data("sortableIndexStart")),s=o.comparator;delete o.comparator,o.remove(i,{silent:!0}),o.add(i,{silent:!0,at:t.item.index()}),o.comparator=s,o.trigger("reset",o),o.saveMenuOrder()}},this.options.sortable)),o.props.on("change:orderby",function(){this.$el.sortable("option","disabled",!!o.comparator)},this),this.collection.props.on("change:orderby",this.refreshSortable,this),this.refreshSortable())},refreshSortable:function(){var e;this.options.sortable&&a.fn.sortable&&(e="menuOrder"===(e=this.collection).props.get("orderby")||!e.comparator,this.$el.sortable("option","disabled",!e))},createAttachmentView:function(e){var t=new this.options.AttachmentView({controller:this.controller,model:e,collection:this.collection,selection:this.options.selection});return this._viewsByCid[e.cid]=t},prepare:function(){this.collection.length?this.views.set(this.collection.map(this.createAttachmentView,this)):(this.views.unset(),this.options.infiniteScrolling&&this.collection.more().done(this.scroll))},ready:function(){this.options.infiniteScrolling&&this.scroll()},scroll:function(){var e,t=this,i=this.options.scrollElement,s=i.scrollTop;i===document&&(i=document.body,s=a(document).scrollTop()),a(i).is(":visible")&&this.collection.hasMore()&&(e=this.views.parent.toolbar,i.scrollHeight-(s+i.clientHeight)<i.clientHeight/3&&e.get("spinner").show(),i.scrollHeight<s+i.clientHeight*this.options.refreshThreshold)&&this.collection.more().done(function(){t.scroll(),e.get("spinner").hide()})}});e.exports=s},6829(e){var s=wp.media.View,o=wp.media.view.settings.mediaTrash,a=wp.media.view.l10n,n=jQuery,i=wp.media.view.settings.infiniteScrolling,r=wp.i18n.__,t=wp.i18n.sprintf,l=s.extend({tagName:"div",className:"attachments-browser",initialize:function(){_.defaults(this.options,{filters:!1,search:!0,date:!0,display:!1,sidebar:!0,AttachmentView:wp.media.view.Attachment.Library}),this.controller.on("toggle:upload:attachment",this.toggleUploader,this),this.controller.on("edit:selection",this.editSelection),this.options.sidebar&&"errors"===this.options.sidebar&&this.createSidebar(),this.controller.isModeActive("grid")?(this.createUploader(),this.createToolbar()):(this.createToolbar(),this.createUploader()),this.createAttachmentsHeading(),this.createAttachmentsWrapperView(),i||(this.$el.addClass("has-load-more"),this.createLoadMoreView()),this.options.sidebar&&"errors"!==this.options.sidebar&&this.createSidebar(),this.updateContent(),i||this.updateLoadMoreView(),this.options.sidebar&&"errors"!==this.options.sidebar||(this.$el.addClass("hide-sidebar"),"errors"===this.options.sidebar&&this.$el.addClass("sidebar-for-errors")),this.collection.on("add remove reset",this.updateContent,this),i||this.collection.on("add remove reset",this.updateLoadMoreView,this),this.collection.on("attachments:received",this.announceSearchResults,this)},announceSearchResults:_.debounce(function(){var e,t=r("Number of media items displayed: %d. Click load more for more results.");i&&(t=r("Number of media items displayed: %d. Scroll the page for more results.")),this.collection.mirroring&&this.collection.mirroring.args.s&&(0===(e=this.collection.length)?wp.a11y.speak(a.noMediaTryNewSearch):this.collection.hasMore()?wp.a11y.speak(t.replace("%d",e)):wp.a11y.speak(a.mediaFound.replace("%d",e)))},200),editSelection:function(e){e.$(".media-button-backToLibrary").focus()},dispose:function(){return this.options.selection.off(null,null,this),s.prototype.dispose.apply(this,arguments),this},createToolbar:function(){var e,t=-1!==n.inArray(this.options.filters,["uploaded","all"]),i={controller:this.controller};this.controller.isModeActive("grid")&&(i.className="media-toolbar wp-filter"),this.toolbar=new wp.media.view.Toolbar(i),this.views.add(this.toolbar),this.toolbar.set("spinner",new wp.media.view.Spinner({priority:-20})),(t||this.options.date)&&this.toolbar.set("filters-heading",new wp.media.view.Heading({priority:-100,text:a.filterAttachments,level:"h2",className:"media-attachments-filter-heading screen-reader-text"}).render()),t&&(this.toolbar.set("filtersLabel",new wp.media.view.Label({value:a.filterByType,attributes:{for:"media-attachment-filters"},priority:-80}).render()),"uploaded"===this.options.filters?this.toolbar.set("filters",new wp.media.view.AttachmentFilters.Uploaded({controller:this.controller,model:this.collection.props,priority:-80}).render()):(e=new wp.media.view.AttachmentFilters.All({controller:this.controller,model:this.collection.props,priority:-80}),this.toolbar.set("filters",e.render()))),this.controller.isModeActive("grid")?(i=s.extend({className:"view-switch media-grid-view-switch",template:wp.template("media-library-view-switcher")}),this.toolbar.set("libraryViewSwitcher",new i({controller:this.controller,priority:-90}).render()),this.toolbar.set("dateFilter",new wp.media.view.Label({value:a.filterByDate,attributes:{for:"media-attachment-date-filters"},priority:-75}).render()),this.toolbar.set("dateFilter",new wp.media.view.DateFilter({controller:this.controller,model:this.collection.props,priority:-75}).render()),this.toolbar.set("selectModeToggleButton",new wp.media.view.SelectModeToggleButton({text:a.bulkSelect,controller:this.controller,priority:-70}).render()),this.toolbar.set("deleteSelectedButton",new wp.media.view.DeleteSelectedButton({filters:e,style:"primary",disabled:!0,text:o?a.trashSelected:a.deletePermanently,controller:this.controller,priority:-80,click:function(){var t=[],i=[],e=this.controller.state().get("selection"),s=this.controller.state().get("library");!e.length||!o&&!window.confirm(a.warnBulkDelete)||o&&"trash"!==e.at(0).get("status")&&!window.confirm(a.warnBulkTrash)||(e.each(function(e){e.get("nonces").delete?o&&"trash"===e.get("status")?(e.set("status","inherit"),t.push(e.save()),i.push(e)):o?(e.set("status","trash"),t.push(e.save()),i.push(e)):e.destroy({wait:!0}):i.push(e)}),t.length?(e.remove(i),n.when.apply(null,t).then(_.bind(function(){s._requery(!0),this.controller.trigger("selection:action:done")},this))):this.controller.trigger("selection:action:done"))}}).render()),o&&this.toolbar.set("deleteSelectedPermanentlyButton",new wp.media.view.DeleteSelectedPermanentlyButton({filters:e,style:"link button-link-delete",disabled:!0,text:a.deletePermanently,controller:this.controller,priority:-55,click:function(){var t=[],i=[],e=this.controller.state().get("selection");e.length&&window.confirm(a.warnBulkDelete)&&(e.each(function(e){(e.get("nonces").delete?i:t).push(e)}),t.length&&e.remove(t),i.length)&&n.when.apply(null,i.map(function(e){return e.destroy()})).then(_.bind(function(){this.controller.trigger("selection:action:done")},this))}}).render())):this.options.date&&(this.toolbar.set("dateFilterLabel",new wp.media.view.Label({value:a.filterByDate,attributes:{for:"media-attachment-date-filters"},priority:-75}).render()),this.toolbar.set("dateFilter",new wp.media.view.DateFilter({controller:this.controller,model:this.collection.props,priority:-75}).render())),this.options.search&&(this.toolbar.set("searchLabel",new wp.media.view.Label({value:a.searchLabel,className:"media-search-input-label",attributes:{for:"media-search-input"},priority:60}).render()),this.toolbar.set("search",new wp.media.view.Search({controller:this.controller,model:this.collection.props,priority:60}).render())),this.options.dragInfo&&this.toolbar.set("dragInfo",new s({el:n('<div class="instructions">'+a.dragInfo+"</div>")[0],priority:-40})),this.options.suggestedWidth&&this.options.suggestedHeight&&this.toolbar.set("suggestedDimensions",new s({el:n('<div class="instructions">'+a.suggestedDimensions.replace("%1$s",this.options.suggestedWidth).replace("%2$s",this.options.suggestedHeight)+"</div>")[0],priority:-40}))},updateContent:function(){var e=this,t=this.controller.isModeActive("grid")?e.attachmentsNoResults:e.uploader;this.collection.length?(t.$el.addClass("hidden"),e.toolbar.get("spinner").hide(),this.toolbar.$(".media-bg-overlay").hide()):(this.toolbar.get("spinner").show(),this.toolbar.$(".media-bg-overlay").show(),this.dfd=this.collection.more().done(function(){e.collection.length?t.$el.addClass("hidden"):t.$el.removeClass("hidden"),e.toolbar.get("spinner").hide(),e.toolbar.$(".media-bg-overlay").hide()}))},createUploader:function(){this.uploader=new wp.media.view.UploaderInline({controller:this.controller,status:!1,message:this.controller.isModeActive("grid")?"":a.noItemsFound,canClose:this.controller.isModeActive("grid")}),this.uploader.$el.addClass("hidden"),this.views.add(this.uploader)},toggleUploader:function(){this.uploader.$el.hasClass("hidden")?this.uploader.show():this.uploader.hide()},createAttachmentsWrapperView:function(){this.attachmentsWrapper=new wp.media.View({className:"attachments-wrapper"}),this.views.add(this.attachmentsWrapper),this.createAttachments()},createAttachments:function(){this.attachments=new wp.media.view.Attachments({controller:this.controller,collection:this.collection,selection:this.options.selection,model:this.model,sortable:this.options.sortable,scrollElement:this.options.scrollElement,idealColumnWidth:this.options.idealColumnWidth,AttachmentView:this.options.AttachmentView}),this.controller.on("attachment:keydown:arrow",_.bind(this.attachments.arrowEvent,this.attachments)),this.controller.on("attachment:details:shift-tab",_.bind(this.attachments.restoreFocus,this.attachments)),this.views.add(".attachments-wrapper",this.attachments),this.controller.isModeActive("grid")&&(this.attachmentsNoResults=new s({controller:this.controller,tagName:"p"}),this.attachmentsNoResults.$el.addClass("hidden no-media"),this.attachmentsNoResults.$el.html(a.noMedia),this.views.add(this.attachmentsNoResults))},createLoadMoreView:function(){var e=this;this.loadMoreWrapper=new s({controller:this.controller,className:"load-more-wrapper"}),this.loadMoreCount=new s({controller:this.controller,tagName:"p",className:"load-more-count hidden"}),this.loadMoreButton=new wp.media.view.Button({text:r("Load more"),className:"load-more hidden",style:"primary",size:"",click:function(){e.loadMoreAttachments()}}),this.loadMoreSpinner=new wp.media.view.Spinner,this.loadMoreJumpToFirst=new wp.media.view.Button({text:r("Jump to first loaded item"),className:"load-more-jump hidden",size:"",click:function(){e.jumpToFirstAddedItem()}}),this.views.add(".attachments-wrapper",this.loadMoreWrapper),this.views.add(".load-more-wrapper",this.loadMoreSpinner),this.views.add(".load-more-wrapper",this.loadMoreCount),this.views.add(".load-more-wrapper",this.loadMoreButton),this.views.add(".load-more-wrapper",this.loadMoreJumpToFirst)},updateLoadMoreView:_.debounce(function(){this.loadMoreButton.$el.addClass("hidden"),this.loadMoreCount.$el.addClass("hidden"),this.loadMoreJumpToFirst.$el.addClass("hidden").prop("disabled",!0),this.collection.getTotalAttachments()&&(this.collection.length&&(this.loadMoreCount.$el.text(t(r("Showing %1$s of %2$s media items"),this.collection.length,this.collection.getTotalAttachments())),this.loadMoreCount.$el.removeClass("hidden")),this.collection.hasMore()&&this.loadMoreButton.$el.removeClass("hidden"),this.firstAddedMediaItem=this.$el.find(".attachment").eq(this.firstAddedMediaItemIndex),this.firstAddedMediaItem.length&&(this.firstAddedMediaItem.addClass("new-media"),this.loadMoreJumpToFirst.$el.removeClass("hidden").prop("disabled",!1)),this.firstAddedMediaItem.length)&&!this.collection.hasMore()&&this.loadMoreJumpToFirst.$el.trigger("focus")},10),loadMoreAttachments:function(){var e=this;this.collection.hasMore()&&(this.firstAddedMediaItemIndex=this.collection.length,this.$el.addClass("more-loaded"),this.collection.each(function(e){e=e.attributes.id;n('[data-id="'+e+'"]').addClass("found-media")}),e.loadMoreSpinner.show(),this.collection.once("attachments:received",function(){e.loadMoreSpinner.hide()}),this.collection.more())},jumpToFirstAddedItem:function(){this.firstAddedMediaItem.focus()},createAttachmentsHeading:function(){this.attachmentsHeading=new wp.media.view.Heading({text:a.attachmentsList,level:"h2",className:"media-views-heading screen-reader-text"}),this.views.add(this.attachmentsHeading)},createSidebar:function(){var e=this.options.selection,t=this.sidebar=new wp.media.view.Sidebar({controller:this.controller});this.views.add(t),this.controller.uploader&&t.set("uploads",new wp.media.view.UploaderStatus({controller:this.controller,priority:40})),e.on("selection:single",this.createSingle,this),e.on("selection:unsingle",this.disposeSingle,this),e.single()&&this.createSingle()},createSingle:function(){var e=this.sidebar,t=this.options.selection.single();e.set("details",new wp.media.view.Attachment.Details({controller:this.controller,model:t,priority:80})),e.set("compat",new wp.media.view.AttachmentCompat({controller:this.controller,model:t,priority:120})),this.options.display&&e.set("display",new wp.media.view.Settings.AttachmentDisplay({controller:this.controller,model:this.model.display(t),attachment:t,priority:160,userSettings:this.model.get("displayUserSettings")})),"insert"===this.model.id&&e.$el.addClass("visible")},disposeSingle:function(){var e=this.sidebar;e.unset("details"),e.unset("compat"),e.unset("display"),e.$el.removeClass("visible")}});e.exports=l},3479(e){var t=wp.media.view.Attachments,i=t.extend({events:{},initialize:function(){return _.defaults(this.options,{sortable:!1,resize:!1,AttachmentView:wp.media.view.Attachment.Selection}),t.prototype.initialize.apply(this,arguments)}});e.exports=i},168(e){var t=Backbone.$,i=wp.media.View.extend({tagName:"div",className:"button-group button-large media-button-group",initialize:function(){this.buttons=_.map(this.options.buttons||[],function(e){return e instanceof Backbone.View?e:new wp.media.view.Button(e).render()}),delete this.options.buttons,this.options.classes&&this.$el.addClass(this.options.classes)},render:function(){return this.$el.html(t(_.pluck(this.buttons,"el")).detach()),this}});e.exports=i},846(e){var t=wp.media.View.extend({tagName:"button",className:"media-button",attributes:{type:"button"},events:{click:"click"},defaults:{text:"",style:"",size:"large",disabled:!1},initialize:function(){this.model=new Backbone.Model(this.defaults),_.each(this.defaults,function(e,t){var i=this.options[t];_.isUndefined(i)||(this.model.set(t,i),delete this.options[t])},this),this.listenTo(this.model,"change",this.render)},render:function(){var e=["button",this.className],t=this.model.toJSON();return t.style&&e.push("button-"+t.style),t.size&&e.push("button-"+t.size),e=_.uniq(e.concat(this.options.classes)),this.el.className=e.join(" "),this.$el.attr("disabled",t.disabled),this.$el.text(this.model.get("text")),this},click:function(e){"#"===this.attributes.href&&e.preventDefault(),this.options.click&&!this.model.get("disabled")&&this.options.click.apply(this,arguments)}});e.exports=t},7637(e){var t=wp.media.View,i=wp.media.view.UploaderStatus,s=wp.media.view.l10n,o=jQuery,a=t.extend({className:"crop-content",template:wp.template("crop-content"),initialize:function(){_.bindAll(this,"onImageLoad")},ready:function(){this.controller.frame.on("content:error:crop",this.onError,this),this.$image=this.$el.find(".crop-image"),this.$image.on("load",this.onImageLoad),o(window).on("resize.cropper",_.debounce(this.onImageLoad,250))},remove:function(){o(window).off("resize.cropper"),this.$el.remove(),this.$el.off(),t.prototype.remove.apply(this,arguments)},prepare:function(){return{title:s.cropYourImage,url:this.options.attachment.get("url")}},onImageLoad:function(){var i,e=this.controller.get("imgSelectOptions");"function"==typeof e&&(e=e(this.options.attachment,this.controller)),e=_.extend(e,{parent:this.$el,onInit:function(){var t=i.getOptions().aspectRatio;this.parent.children().on("mousedown touchstart",function(e){!t&&e.shiftKey&&i.setOptions({aspectRatio:"1:1"})}),this.parent.children().on("mouseup touchend",function(){i.setOptions({aspectRatio:t||!1})})}}),this.trigger("image-loaded"),i=this.controller.imgSelect=this.$image.imgAreaSelect(e)},onError:function(){var e=this.options.attachment.get("filename");this.views.add(".upload-errors",new wp.media.view.UploaderStatusError({filename:i.prototype.filename(e),message:window._wpMediaViewsL10n.cropError}),{at:0})}});e.exports=a},6126(e){var t=wp.media.View,i=t.extend({className:"image-editor",template:wp.template("image-editor"),initialize:function(e){this.editor=window.imageEdit,this.controller=e.controller,t.prototype.initialize.apply(this,arguments)},prepare:function(){return this.model.toJSON()},loadEditor:function(){this.editor.open(this.model.get("id"),this.model.get("nonces").edit,this)},back:function(){var e=this.controller.lastState();this.controller.setState(e)},refresh:function(){this.model.fetch()},save:function(){var e=this.controller.lastState();this.model.fetch().done(_.bind(function(){this.controller.setState(e)},this))}});e.exports=i},5741(e){var t=wp.media.View.extend({className:"media-embed",initialize:function(){this.url=new wp.media.view.EmbedUrl({controller:this.controller,model:this.model.props}).render(),this.views.set([this.url]),this.refresh(),this.listenTo(this.model,"change:type",this.refresh),this.listenTo(this.model,"change:loading",this.loading)},settings:function(e){this._settings&&this._settings.remove(),this._settings=e,this.views.add(e)},refresh:function(){var e,t=this.model.get("type");if("image"===t)e=wp.media.view.EmbedImage;else{if("link"!==t)return;e=wp.media.view.EmbedLink}this.settings(new e({controller:this.controller,model:this.model.props,priority:40}))},loading:function(){this.$el.toggleClass("embed-loading",this.model.get("loading"))}});e.exports=t},2395(e){var t=wp.media.view.Settings.AttachmentDisplay,i=t.extend({className:"embed-media-settings",template:wp.template("embed-image-settings"),initialize:function(){t.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:url",this.updateImage)},updateImage:function(){this.$("img").attr("src",this.model.get("url"))}});e.exports=i},8232(e){var i=jQuery,t=wp.media.view.Settings.extend({className:"embed-link-settings",template:wp.template("embed-link-settings"),initialize:function(){this.listenTo(this.model,"change:url",this.updateoEmbed)},updateoEmbed:_.debounce(function(){var e=this.model.get("url");this.$(".embed-container").hide().find(".embed-preview").empty(),this.$(".setting").hide(),e&&(e.length<11||!e.match(/^http(s)?:\/\//))||this.fetch()},wp.media.controller.Embed.sensitivity),fetch:function(){var e,t=this.model.get("url");i("#embed-url-field").val()===t&&(this.dfd&&"pending"===this.dfd.state()&&this.dfd.abort(),(e=/https?:\/\/www\.youtube\.com\/embed\/([^/]+)/.exec(t))&&(t="https://www.youtube.com/watch?v="+e[1]),this.dfd=wp.apiRequest({url:wp.media.view.settings.oEmbedProxyUrl,data:{url:t,maxwidth:this.model.get("width"),maxheight:this.model.get("height")},type:"GET",dataType:"json",context:this}).done(function(e){this.renderoEmbed({data:{body:e.html||""}})}).fail(this.renderFail))},renderFail:function(e,t){"abort"!==t&&this.$(".link-text").show()},renderoEmbed:function(e){e=e&&e.data&&e.data.body||"";e?this.$(".embed-container").show().find(".embed-preview").html(e):this.renderFail()}});e.exports=t},7327(e){var t=wp.media.View,i=jQuery,s=wp.media.view.l10n,o=t.extend({tagName:"span",className:"embed-url",events:{input:"url"},initialize:function(){this.$input=i('<input id="embed-url-field" type="url" />').attr("aria-label",s.insertFromUrlTitle).val(this.model.get("url")),this.input=this.$input[0],this.spinner=i('<span class="spinner" />')[0],this.$el.append([this.input,this.spinner]),this.listenTo(this.model,"change:url",this.render),this.model.get("url")&&_.delay(_.bind(function(){this.model.trigger("change:url")},this),500)},render:function(){var e=this.$input;if(!e.is(":focus"))return this.model.get("url")?this.input.value=this.model.get("url"):this.input.setAttribute("placeholder","https://"),t.prototype.render.apply(this,arguments),this},url:function(e){e=e.target.value||"";this.model.set("url",e.trim())}});e.exports=o},718(e){var o=jQuery,t=wp.media.View.extend({events:{keydown:"focusManagementMode"},initialize:function(e){this.mode=e.mode||"constrainTabbing",this.tabsAutomaticActivation=e.tabsAutomaticActivation||!1},focusManagementMode:function(e){"constrainTabbing"===this.mode&&this.constrainTabbing(e),"tabsNavigation"===this.mode&&this.tabsNavigation(e)},getTabbables:function(){return this.$(":tabbable").not('.moxie-shim input[type="file"]')},focus:function(){this.$(".media-modal").trigger("focus")},constrainTabbing:function(e){var t;if(9===e.keyCode)return(t=this.getTabbables()).last()[0]!==e.target||e.shiftKey?t.first()[0]===e.target&&e.shiftKey?(t.last().focus(),!1):void 0:(t.first().focus(),!1)},setAriaHiddenOnBodyChildren:function(t){var e,i=this;this.isBodyAriaHidden||(e=document.body.children,_.each(e,function(e){e!==t[0]&&i.elementShouldBeHidden(e)&&(e.setAttribute("aria-hidden","true"),i.ariaHiddenElements.push(e))}),this.isBodyAriaHidden=!0)},removeAriaHiddenFromBodyChildren:function(){_.each(this.ariaHiddenElements,function(e){e.removeAttribute("aria-hidden")}),this.ariaHiddenElements=[],this.isBodyAriaHidden=!1},elementShouldBeHidden:function(e){var t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||-1!==["alert","status","log","marquee","timer"].indexOf(t))},isBodyAriaHidden:!1,ariaHiddenElements:[],tabs:o(),setupAriaTabs:function(){this.tabs=this.$('[role="tab"]'),this.tabs.attr({"aria-selected":"false",tabIndex:"-1"}),this.tabs.filter(".active").removeAttr("tabindex").attr("aria-selected","true")},tabsNavigation:function(e){var t="horizontal";-1===[32,35,36,37,38,39,40].indexOf(e.which)||"horizontal"===(t="vertical"===this.$el.attr("aria-orientation")?"vertical":t)&&-1!==[38,40].indexOf(e.which)||"vertical"===t&&-1!==[37,39].indexOf(e.which)||this.switchTabs(e,this.tabs)},switchTabs:function(e){var t,i=e.which,s=this.tabs.index(o(e.target));switch(i){case 32:this.activateTab(this.tabs[s]);break;case 35:e.preventDefault(),this.activateTab(this.tabs[this.tabs.length-1]);break;case 36:e.preventDefault(),this.activateTab(this.tabs[0]);break;case 37:case 38:e.preventDefault(),t=s-1<0?this.tabs.length-1:s-1,this.activateTab(this.tabs[t]);break;case 39:case 40:e.preventDefault(),t=s+1===this.tabs.length?0:s+1,this.activateTab(this.tabs[t])}},activateTab:function(e){e&&(e.focus(),this.tabsAutomaticActivation?(e.removeAttribute("tabindex"),e.setAttribute("aria-selected","true"),e.click()):o(e).on("click",function(){e.removeAttribute("tabindex"),e.setAttribute("aria-selected","true")}))}});e.exports=t},1061(e){var t=wp.media.View.extend({initialize:function(){_.defaults(this.options,{mode:["select"]}),this._createRegions(),this._createStates(),this._createModes()},_createRegions:function(){this.regions=this.regions?this.regions.slice():[],_.each(this.regions,function(e){this[e]=new wp.media.controller.Region({view:this,id:e,selector:".media-frame-"+e})},this)},_createStates:function(){this.states=new Backbone.Collection(null,{model:wp.media.controller.State}),this.states.on("add",function(e){e.frame=this,e.trigger("ready")},this),this.options.states&&this.states.add(this.options.states)},_createModes:function(){this.activeModes=new Backbone.Collection,this.activeModes.on("add remove reset",_.bind(this.triggerModeEvents,this)),_.each(this.options.mode,function(e){this.activateMode(e)},this)},reset:function(){return this.states.invoke("trigger","reset"),this},triggerModeEvents:function(e,t,i){var s,o={add:"activate",remove:"deactivate"};_.each(i,function(e,t){e&&(s=t)}),_.has(o,s)&&(i=e.get("id")+":"+o[s],this.trigger(i))},activateMode:function(e){if(!this.isModeActive(e))return this.activeModes.add([{id:e}]),this.$el.addClass("mode-"+e),this},deactivateMode:function(e){return this.isModeActive(e)&&(this.activeModes.remove(this.activeModes.where({id:e})),this.$el.removeClass("mode-"+e),this.trigger(e+":deactivate")),this},isModeActive:function(e){return Boolean(this.activeModes.where({id:e}).length)}});_.extend(t.prototype,wp.media.controller.StateMachine.prototype),e.exports=t},5424(e){var t=wp.media.view.MediaFrame.Select,s=wp.media.view.l10n,i=t.extend({defaults:{id:"image",url:"",menu:"image-details",content:"image-details",toolbar:"image-details",type:"link",title:s.imageDetailsTitle,priority:120},initialize:function(e){this.image=new wp.media.model.PostImage(e.metadata),this.options.selection=new wp.media.model.Selection(this.image.attachment,{multiple:!1}),t.prototype.initialize.apply(this,arguments)},bindHandlers:function(){t.prototype.bindHandlers.apply(this,arguments),this.on("menu:create:image-details",this.createMenu,this),this.on("content:create:image-details",this.imageDetailsContent,this),this.on("content:render:edit-image",this.editImageContent,this),this.on("toolbar:render:image-details",this.renderImageDetailsToolbar,this),this.on("toolbar:render:replace",this.renderReplaceImageToolbar,this)},createStates:function(){this.states.add([new wp.media.controller.ImageDetails({image:this.image,editable:!1}),new wp.media.controller.ReplaceImage({id:"replace-image",library:wp.media.query({type:"image"}),image:this.image,multiple:!1,title:s.imageReplaceTitle,toolbar:"replace",priority:80,displaySettings:!0}),new wp.media.controller.EditImage({image:this.image,selection:this.options.selection})])},imageDetailsContent:function(e){e.view=new wp.media.view.ImageDetails({controller:this,model:this.state().image,attachment:this.state().image.attachment})},editImageContent:function(){var e=this.state().get("image");e&&(e=new wp.media.view.EditImage({model:e,controller:this}).render(),this.content.set(e),e.loadEditor())},renderImageDetailsToolbar:function(){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{select:{style:"primary",text:s.update,priority:80,click:function(){var e=this.controller,t=e.state();e.close(),t.trigger("update",e.image.toJSON()),e.setState(e.options.state),e.reset()}}}}))},renderReplaceImageToolbar:function(){var e=this,t=e.lastState(),i=t&&t.id;this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{back:{text:s.back,priority:80,click:function(){i?e.setState(i):e.close()}},replace:{style:"primary",text:s.replace,priority:20,requires:{selection:!0},click:function(){var e=this.controller,t=e.state(),i=t.get("selection").single();e.close(),e.image.changeAttachment(i,t.display(i)),t.trigger("replace",e.image.toJSON()),e.setState(e.options.state),e.reset()}}}}))}});e.exports=i},4274(e){var t=wp.media.view.MediaFrame.Select,i=wp.media.controller.Library,o=wp.media.view.l10n,s=t.extend({initialize:function(){this.counts={audio:{count:wp.media.view.settings.attachmentCounts.audio,state:"playlist"},video:{count:wp.media.view.settings.attachmentCounts.video,state:"video-playlist"}},_.defaults(this.options,{multiple:!0,editing:!1,state:"insert",metadata:{}}),t.prototype.initialize.apply(this,arguments),this.createIframeStates()},createStates:function(){var e=this.options;this.states.add([new i({id:"insert",title:o.insertMediaTitle,priority:20,toolbar:"main-insert",filterable:"all",library:wp.media.query(e.library),multiple:!!e.multiple&&"reset",editable:!0,allowLocalEdits:!0,displaySettings:!0,displayUserSettings:!0}),new i({id:"gallery",title:o.createGalleryTitle,priority:40,toolbar:"main-gallery",filterable:"uploaded",multiple:"add",editable:!1,library:wp.media.query(_.defaults({type:"image"},e.library))}),new wp.media.controller.Embed({metadata:e.metadata}),new wp.media.controller.EditImage({model:e.editImage}),new wp.media.controller.GalleryEdit({library:e.selection,editing:e.editing,menu:"gallery"}),new wp.media.controller.GalleryAdd,new i({id:"playlist",title:o.createPlaylistTitle,priority:60,toolbar:"main-playlist",filterable:"uploaded",multiple:"add",editable:!1,library:wp.media.query(_.defaults({type:"audio"},e.library))}),new wp.media.controller.CollectionEdit({type:"audio",collectionType:"playlist",title:o.editPlaylistTitle,SettingsView:wp.media.view.Settings.Playlist,library:e.selection,editing:e.editing,menu:"playlist",dragInfoText:o.playlistDragInfo,dragInfo:!1}),new wp.media.controller.CollectionAdd({type:"audio",collectionType:"playlist",title:o.addToPlaylistTitle}),new i({id:"video-playlist",title:o.createVideoPlaylistTitle,priority:60,toolbar:"main-video-playlist",filterable:"uploaded",multiple:"add",editable:!1,library:wp.media.query(_.defaults({type:"video"},e.library))}),new wp.media.controller.CollectionEdit({type:"video",collectionType:"playlist",title:o.editVideoPlaylistTitle,SettingsView:wp.media.view.Settings.Playlist,library:e.selection,editing:e.editing,menu:"video-playlist",dragInfoText:o.videoPlaylistDragInfo,dragInfo:!1}),new wp.media.controller.CollectionAdd({type:"video",collectionType:"playlist",title:o.addToVideoPlaylistTitle})]),wp.media.view.settings.post.featuredImageId&&this.states.add(new wp.media.controller.FeaturedImage)},bindHandlers:function(){t.prototype.bindHandlers.apply(this,arguments),this.on("activate",this.activate,this),void 0!==_.find(this.counts,function(e){return 0===e.count})&&this.listenTo(wp.media.model.Attachments.all,"change:type",this.mediaTypeCounts),this.on("menu:create:gallery",this.createMenu,this),this.on("menu:create:playlist",this.createMenu,this),this.on("menu:create:video-playlist",this.createMenu,this),this.on("toolbar:create:main-insert",this.createToolbar,this),this.on("toolbar:create:main-gallery",this.createToolbar,this),this.on("toolbar:create:main-playlist",this.createToolbar,this),this.on("toolbar:create:main-video-playlist",this.createToolbar,this),this.on("toolbar:create:featured-image",this.featuredImageToolbar,this),this.on("toolbar:create:main-embed",this.mainEmbedToolbar,this),_.each({menu:{default:"mainMenu",gallery:"galleryMenu",playlist:"playlistMenu","video-playlist":"videoPlaylistMenu"},content:{embed:"embedContent","edit-image":"editImageContent","edit-selection":"editSelectionContent"},toolbar:{"main-insert":"mainInsertToolbar","main-gallery":"mainGalleryToolbar","gallery-edit":"galleryEditToolbar","gallery-add":"galleryAddToolbar","main-playlist":"mainPlaylistToolbar","playlist-edit":"playlistEditToolbar","playlist-add":"playlistAddToolbar","main-video-playlist":"mainVideoPlaylistToolbar","video-playlist-edit":"videoPlaylistEditToolbar","video-playlist-add":"videoPlaylistAddToolbar"}},function(e,i){_.each(e,function(e,t){this.on(i+":render:"+t,this[e],this)},this)},this)},activate:function(){_.each(this.counts,function(e){e.count<1&&this.menuItemVisibility(e.state,"hide")},this)},mediaTypeCounts:function(e,t){void 0!==this.counts[t]&&this.counts[t].count<1&&(this.counts[t].count++,this.menuItemVisibility(this.counts[t].state,"show"))},mainMenu:function(e){e.set({"library-separator":new wp.media.View({className:"separator",priority:100,attributes:{role:"presentation"}})})},menuItemVisibility:function(e,t){var i=this.menu.get();"hide"===t?i.hide(e):"show"===t&&i.show(e)},galleryMenu:function(e){var t=this.lastState(),i=t&&t.id,s=this;e.set({cancel:{text:o.cancelGalleryTitle,priority:20,click:function(){i?s.setState(i):s.close(),this.controller.modal.focusManager.focus()}},separateCancel:new wp.media.View({className:"separator",priority:40})})},playlistMenu:function(e){var t=this.lastState(),i=t&&t.id,s=this;e.set({cancel:{text:o.cancelPlaylistTitle,priority:20,click:function(){i?s.setState(i):s.close(),this.controller.modal.focusManager.focus()}},separateCancel:new wp.media.View({className:"separator",priority:40})})},videoPlaylistMenu:function(e){var t=this.lastState(),i=t&&t.id,s=this;e.set({cancel:{text:o.cancelVideoPlaylistTitle,priority:20,click:function(){i?s.setState(i):s.close(),this.controller.modal.focusManager.focus()}},separateCancel:new wp.media.View({className:"separator",priority:40})})},embedContent:function(){var e=new wp.media.view.Embed({controller:this,model:this.state()}).render();this.content.set(e)},editSelectionContent:function(){var e=this.state(),t=e.get("selection"),t=new wp.media.view.AttachmentsBrowser({controller:this,collection:t,selection:t,model:e,sortable:!0,search:!1,date:!1,dragInfo:!0,AttachmentView:wp.media.view.Attachments.EditSelection}).render();t.toolbar.set("backToLibrary",{text:o.returnToLibrary,priority:-100,click:function(){this.controller.content.mode("browse"),this.controller.modal.focusManager.focus()}}),this.content.set(t),this.trigger("edit:selection",this)},editImageContent:function(){var e=this.state().get("image"),e=new wp.media.view.EditImage({model:e,controller:this}).render();this.content.set(e),e.loadEditor()},selectionStatusToolbar:function(e){var t=this.state().get("editable");e.set("selection",new wp.media.view.Selection({controller:this,collection:this.state().get("selection"),priority:-40,editable:t&&function(){this.controller.content.mode("edit-selection")}}).render())},mainInsertToolbar:function(e){var i=this;this.selectionStatusToolbar(e),e.set("insert",{style:"primary",priority:80,text:o.insertIntoPost,requires:{selection:!0},click:function(){var e=i.state(),t=e.get("selection");i.close(),e.trigger("insert",t).reset()}})},mainGalleryToolbar:function(e){var s=this;this.selectionStatusToolbar(e),e.set("gallery",{style:"primary",text:o.createNewGallery,priority:60,requires:{selection:!0},click:function(){var e=s.state().get("selection"),t=s.state("gallery-edit"),i=e.where({type:"image"});t.set("library",new wp.media.model.Selection(i,{props:e.props.toJSON(),multiple:!0})),this.controller.setState("gallery-edit"),this.controller.modal.focusManager.focus()}})},mainPlaylistToolbar:function(e){var s=this;this.selectionStatusToolbar(e),e.set("playlist",{style:"primary",text:o.createNewPlaylist,priority:100,requires:{selection:!0},click:function(){var e=s.state().get("selection"),t=s.state("playlist-edit"),i=e.where({type:"audio"});t.set("library",new wp.media.model.Selection(i,{props:e.props.toJSON(),multiple:!0})),this.controller.setState("playlist-edit"),this.controller.modal.focusManager.focus()}})},mainVideoPlaylistToolbar:function(e){var s=this;this.selectionStatusToolbar(e),e.set("video-playlist",{style:"primary",text:o.createNewVideoPlaylist,priority:100,requires:{selection:!0},click:function(){var e=s.state().get("selection"),t=s.state("video-playlist-edit"),i=e.where({type:"video"});t.set("library",new wp.media.model.Selection(i,{props:e.props.toJSON(),multiple:!0})),this.controller.setState("video-playlist-edit"),this.controller.modal.focusManager.focus()}})},featuredImageToolbar:function(e){this.createSelectToolbar(e,{text:o.setFeaturedImage,state:this.options.state})},mainEmbedToolbar:function(e){e.view=new wp.media.view.Toolbar.Embed({controller:this})},galleryEditToolbar:function(){var e=this.state().get("editing");this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:e?o.updateGallery:o.insertGallery,priority:80,requires:{library:!0,uploadingComplete:!0},click:function(){var e=this.controller,t=e.state();e.close(),t.trigger("update",t.get("library")),e.setState(e.options.state),e.reset()}}}}))},galleryAddToolbar:function(){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:o.addToGallery,priority:80,requires:{selection:!0},click:function(){var e=this.controller,t=e.state();e.state("gallery-edit").get("library").add(t.get("selection").models),t.trigger("reset"),e.setState("gallery-edit"),this.controller.modal.focusManager.focus()}}}}))},playlistEditToolbar:function(){var e=this.state().get("editing");this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:e?o.updatePlaylist:o.insertPlaylist,priority:80,requires:{library:!0},click:function(){var e=this.controller,t=e.state();e.close(),t.trigger("update",t.get("library")),e.setState(e.options.state),e.reset()}}}}))},playlistAddToolbar:function(){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:o.addToPlaylist,priority:80,requires:{selection:!0},click:function(){var e=this.controller,t=e.state();e.state("playlist-edit").get("library").add(t.get("selection").models),t.trigger("reset"),e.setState("playlist-edit"),this.controller.modal.focusManager.focus()}}}}))},videoPlaylistEditToolbar:function(){var e=this.state().get("editing");this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:e?o.updateVideoPlaylist:o.insertVideoPlaylist,priority:140,requires:{library:!0},click:function(){var e=this.controller,t=e.state(),i=t.get("library");i.type="video",e.close(),t.trigger("update",i),e.setState(e.options.state),e.reset()}}}}))},videoPlaylistAddToolbar:function(){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:o.addToVideoPlaylist,priority:140,requires:{selection:!0},click:function(){var e=this.controller,t=e.state();e.state("video-playlist-edit").get("library").add(t.get("selection").models),t.trigger("reset"),e.setState("video-playlist-edit"),this.controller.modal.focusManager.focus()}}}}))}});e.exports=s},455(e){var t=wp.media.view.MediaFrame,i=wp.media.view.l10n,s=t.extend({initialize:function(){t.prototype.initialize.apply(this,arguments),_.defaults(this.options,{selection:[],library:{},multiple:!1,state:"library"}),this.createSelection(),this.createStates(),this.bindHandlers()},createSelection:function(){var e=this.options.selection;e instanceof wp.media.model.Selection||(this.options.selection=new wp.media.model.Selection(e,{multiple:this.options.multiple})),this._selection={attachments:new wp.media.model.Attachments,difference:[]}},editImageContent:function(){var e=this.state().get("image"),e=new wp.media.view.EditImage({model:e,controller:this}).render();this.content.set(e),e.loadEditor()},createStates:function(){var e=this.options;this.options.states||this.states.add([new wp.media.controller.Library({library:wp.media.query(e.library),multiple:e.multiple,title:e.title,priority:20}),new wp.media.controller.EditImage({model:e.editImage})])},bindHandlers:function(){this.on("router:create:browse",this.createRouter,this),this.on("router:render:browse",this.browseRouter,this),this.on("content:create:browse",this.browseContent,this),this.on("content:render:upload",this.uploadContent,this),this.on("toolbar:create:select",this.createSelectToolbar,this),this.on("content:render:edit-image",this.editImageContent,this)},browseRouter:function(e){e.set({upload:{text:i.uploadFilesTitle,priority:20},browse:{text:i.mediaLibraryTitle,priority:40}})},browseContent:function(e){var t=this.state();this.$el.removeClass("hide-toolbar"),e.view=new wp.media.view.AttachmentsBrowser({controller:this,collection:t.get("library"),selection:t.get("selection"),model:t,sortable:t.get("sortable"),search:t.get("searchable"),filters:t.get("filterable"),date:t.get("date"),display:t.has("display")?t.get("display"):t.get("displaySettings"),dragInfo:t.get("dragInfo"),idealColumnWidth:t.get("idealColumnWidth"),suggestedWidth:t.get("suggestedWidth"),suggestedHeight:t.get("suggestedHeight"),AttachmentView:t.get("AttachmentView")})},uploadContent:function(){this.$el.removeClass("hide-toolbar"),this.content.set(new wp.media.view.UploaderInline({controller:this}))},createSelectToolbar:function(e,t){(t=t||this.options.button||{}).controller=this,e.view=new wp.media.view.Toolbar.Select(t)}});e.exports=s},170(e){var t=wp.media.View.extend({tagName:function(){return this.options.level||"h1"},className:"media-views-heading",initialize:function(){this.options.className&&this.$el.addClass(this.options.className),this.text=this.options.text},render:function(){return this.$el.html(this.text),this}});e.exports=t},1982(e){var t=wp.media.View.extend({className:"media-iframe",render:function(){return this.views.detach(),this.$el.html('<iframe src="'+this.controller.state().get("src")+'" />'),this.views.render(),this}});e.exports=t},2650(e){var t=wp.media.view.Settings.AttachmentDisplay,o=jQuery,i=t.extend({className:"image-details",template:wp.template("image-details"),events:_.defaults(t.prototype.events,{"click .edit-attachment":"editAttachment","click .replace-attachment":"replaceAttachment","click .advanced-toggle":"onToggleAdvanced",'change [data-setting="customWidth"]':"onCustomSize",'change [data-setting="customHeight"]':"onCustomSize",'keyup [data-setting="customWidth"]':"onCustomSize",'keyup [data-setting="customHeight"]':"onCustomSize"}),initialize:function(){this.options.attachment=this.model.attachment,this.listenTo(this.model,"change:url",this.updateUrl),this.listenTo(this.model,"change:link",this.toggleLinkSettings),this.listenTo(this.model,"change:size",this.toggleCustomSize),t.prototype.initialize.apply(this,arguments)},prepare:function(){var e=!1;return this.model.attachment&&(e=this.model.attachment.toJSON()),_.defaults({model:this.model.toJSON(),attachment:e},this.options)},render:function(){var e=arguments;return this.model.attachment&&"pending"===this.model.dfd.state()?this.model.dfd.done(_.bind(function(){t.prototype.render.apply(this,e),this.postRender()},this)).fail(_.bind(function(){this.model.attachment=!1,t.prototype.render.apply(this,e),this.postRender()},this)):(t.prototype.render.apply(this,arguments),this.postRender()),this},postRender:function(){setTimeout(_.bind(this.scrollToTop,this),10),this.toggleLinkSettings(),"show"===window.getUserSetting("advImgDetails")&&this.toggleAdvanced(!0),this.trigger("post-render")},scrollToTop:function(){this.$(".embed-media-settings").scrollTop(0)},updateUrl:function(){this.$(".image img").attr("src",this.model.get("url")),this.$(".url").val(this.model.get("url"))},toggleLinkSettings:function(){"none"===this.model.get("link")?this.$(".link-settings").addClass("hidden"):this.$(".link-settings").removeClass("hidden")},toggleCustomSize:function(){"custom"!==this.model.get("size")?this.$(".custom-size").addClass("hidden"):this.$(".custom-size").removeClass("hidden")},onCustomSize:function(e){var t,i=o(e.target).data("setting"),s=o(e.target).val();!/^\d+/.test(s)||parseInt(s,10)<1?e.preventDefault():("customWidth"===i?(t=Math.round(1/this.model.get("aspectRatio")*s),this.model.set("customHeight",t,{silent:!0}),this.$('[data-setting="customHeight"]')):(t=Math.round(this.model.get("aspectRatio")*s),this.model.set("customWidth",t,{silent:!0}),this.$('[data-setting="customWidth"]'))).val(t)},onToggleAdvanced:function(e){e.preventDefault(),this.toggleAdvanced()},toggleAdvanced:function(e){var t=this.$el.find(".advanced-section"),e=t.hasClass("advanced-visible")||!1===e?(t.removeClass("advanced-visible"),t.find(".advanced-settings").addClass("hidden"),"hide"):(t.addClass("advanced-visible"),t.find(".advanced-settings").removeClass("hidden"),"show");window.setUserSetting("advImgDetails",e)},editAttachment:function(e){var t=this.controller.states.get("edit-image");window.imageEdit&&t&&(e.preventDefault(),t.set("image",this.model.attachment),this.controller.setState("edit-image"))},replaceAttachment:function(e){e.preventDefault(),this.controller.setState("replace-image")}});e.exports=i},4338(e){var t=wp.media.View.extend({tagName:"label",initialize:function(){this.value=this.options.value},render:function(){return this.$el.html(this.value),this}});e.exports=t},2836(e){var t=wp.media.view.Frame,i=wp.media.view.l10n,o=jQuery,s=t.extend({className:"media-frame",template:wp.template("media-frame"),regions:["menu","title","content","toolbar","router"],events:{"click .media-frame-menu-toggle":"toggleMenu"},initialize:function(){t.prototype.initialize.apply(this,arguments),_.defaults(this.options,{title:i.mediaFrameDefaultTitle,modal:!0,uploader:!0}),this.$el.addClass("wp-core-ui"),this.options.modal&&(this.modal=new wp.media.view.Modal({controller:this,title:this.options.title}),this.modal.content(this)),!wp.Uploader.limitExceeded&&wp.Uploader.browser.supported||(this.options.uploader=!1),this.options.uploader&&(this.uploader=new wp.media.view.UploaderWindow({controller:this,uploader:{dropzone:(this.modal||this).$el,container:this.$el}}),this.views.set(".media-frame-uploader",this.uploader)),this.on("attach",_.bind(this.views.ready,this.views),this),this.on("title:create:default",this.createTitle,this),this.title.mode("default"),this.on("menu:create:default",this.createMenu,this),this.on("open",this.setMenuTabPanelAriaAttributes,this),this.on("open",this.setRouterTabPanelAriaAttributes,this),this.on("content:render",this.setMenuTabPanelAriaAttributes,this),this.on("content:render",this.setRouterTabPanelAriaAttributes,this)},setMenuTabPanelAriaAttributes:function(){var e=this.state().get("id"),t=this.$el.find(".media-frame-tab-panel");t.removeAttr("role aria-labelledby"),this.state().get("menu")&&this.menuView&&this.menuView.isVisible&&t.attr({role:"tabpanel","aria-labelledby":"menu-item-"+e})},setRouterTabPanelAriaAttributes:function(){var e,t=this.$el.find(".media-frame-content");t.removeAttr("role aria-labelledby"),this.state().get("router")&&this.routerView&&this.routerView.isVisible&&this.content._mode&&(e="menu-item-"+this.content._mode,t.attr({role:"tabpanel","aria-labelledby":e}))},render:function(){return!this.state()&&this.options.state&&this.setState(this.options.state),t.prototype.render.apply(this,arguments)},createTitle:function(e){e.view=new wp.media.View({controller:this,tagName:"h1"})},createMenu:function(e){e.view=new wp.media.view.Menu({controller:this,attributes:{role:"tablist","aria-orientation":"vertical"}}),this.menuView=e.view},toggleMenu:function(e){var t=this.$el.find(".media-menu");t.toggleClass("visible"),o(e.target).attr("aria-expanded",t.hasClass("visible"))},createToolbar:function(e){e.view=new wp.media.view.Toolbar({controller:this})},createRouter:function(e){e.view=new wp.media.view.Router({controller:this,attributes:{role:"tablist","aria-orientation":"horizontal"}}),this.routerView=e.view},createIframeStates:function(i){var e=wp.media.view.settings,t=e.tabs,s=e.tabUrl;t&&s&&((e=o("#post_ID")).length&&(s+="&post_id="+e.val()),_.each(t,function(e,t){this.state("iframe:"+t).set(_.defaults({tab:t,src:s+"&tab="+t,title:e,content:"iframe",menu:"default"},i))},this),this.on("content:create:iframe",this.iframeContent,this),this.on("content:deactivate:iframe",this.iframeContentCleanup,this),this.on("menu:render:default",this.iframeMenu,this),this.on("open",this.hijackThickbox,this),this.on("close",this.restoreThickbox,this))},iframeContent:function(e){this.$el.addClass("hide-toolbar"),e.view=new wp.media.view.Iframe({controller:this})},iframeContentCleanup:function(){this.$el.removeClass("hide-toolbar")},iframeMenu:function(e){var i={};e&&(_.each(wp.media.view.settings.tabs,function(e,t){i["iframe:"+t]={text:this.state("iframe:"+t).get("title"),priority:200}},this),e.set(i))},hijackThickbox:function(){var e=this;window.tb_remove&&!this._tb_remove&&(this._tb_remove=window.tb_remove,window.tb_remove=function(){e.close(),e.reset(),e.setState(e.options.state),e._tb_remove.call(window)})},restoreThickbox:function(){this._tb_remove&&(window.tb_remove=this._tb_remove,delete this._tb_remove)}});_.each(["open","close","attach","detach","escape"],function(e){s.prototype[e]=function(){return this.modal&&this.modal[e].apply(this.modal,arguments),this}}),e.exports=s},9013(e){var t=wp.media.View.extend({tagName:"button",className:"media-menu-item",attributes:{type:"button",role:"tab"},events:{click:"_click"},_click:function(){var e=this.options.click;e?e.call(this):this.click()},click:function(){var e=this.options.state;e&&(this.controller.setState(e),this.views.parent.$el.removeClass("visible"))},render:function(){var e=this.options,t=e.state||e.contentMode;return e.text?this.$el.text(e.text):e.html&&this.$el.html(e.html),this.$el.attr("id","menu-item-"+t),this}});e.exports=t},1(e){var t=wp.media.view.MenuItem,i=wp.media.view.PriorityList,t=i.extend({tagName:"div",className:"media-menu",property:"state",ItemView:t,region:"menu",attributes:{role:"tablist","aria-orientation":"horizontal"},initialize:function(){this._views={},this.set(_.extend({},this._views,this.options.views),{silent:!0}),delete this.options.views,this.options.silent||this.render(),this.focusManager=new wp.media.view.FocusManager({el:this.el,mode:"tabsNavigation"}),this.isVisible=!0},toView:function(e,t){return(e=e||{})[this.property]=e[this.property]||t,new this.ItemView(e).render()},ready:function(){i.prototype.ready.apply(this,arguments),this.visibility(),this.focusManager.setupAriaTabs()},set:function(){i.prototype.set.apply(this,arguments),this.visibility()},unset:function(){i.prototype.unset.apply(this,arguments),this.visibility()},visibility:function(){var e=this.region,t=this.controller[e].get(),i=this.views.get(),i=!i||i.length<2;this===t&&(this.isVisible=!i,this.controller.$el.toggleClass("hide-"+e,i))},select:function(e){e=this.get(e);e&&(this.deselect(),e.$el.addClass("active"),this.focusManager.setupAriaTabs())},deselect:function(){this.$el.children().removeClass("active")},hide:function(e){e=this.get(e);e&&e.$el.addClass("hidden")},show:function(e){e=this.get(e);e&&e.$el.removeClass("hidden")}});e.exports=t},2621(e){var i=jQuery,t=wp.media.View.extend({tagName:"div",template:wp.template("media-modal"),events:{"click .media-modal-backdrop, .media-modal-close":"escapeHandler",keydown:"keydown"},clickedOpenerEl:null,initialize:function(){_.defaults(this.options,{container:document.body,title:"",propagate:!0,hasCloseButton:!0}),this.focusManager=new wp.media.view.FocusManager({el:this.el})},prepare:function(){return{title:this.options.title,hasCloseButton:this.options.hasCloseButton}},attach:function(){return this.views.attached?this:(this.views.rendered||this.render(),this.$el.appendTo(this.options.container),this.views.attached=!0,this.views.ready(),this.propagate("attach"))},detach:function(){return this.$el.is(":visible")&&this.close(),this.$el.detach(),this.views.attached=!1,this.propagate("detach")},open:function(){var e,t=this.$el;return t.is(":visible")?this:(this.clickedOpenerEl=document.activeElement,this.views.attached||this.attach(),i("body").addClass("modal-open"),t.show(),"ontouchend"in document&&(e=window.tinymce&&window.tinymce.activeEditor)&&!e.isHidden()&&e.iframeElement&&(e.iframeElement.focus(),e.iframeElement.blur(),setTimeout(function(){e.iframeElement.blur()},100)),this.$(".media-modal").trigger("focus"),this.focusManager.setAriaHiddenOnBodyChildren(t),this.propagate("open"))},close:function(e){return this.views.attached&&this.$el.is(":visible")&&(i(".mejs-pause button").trigger("click"),i("body").removeClass("modal-open"),this.$el.hide(),this.focusManager.removeAriaHiddenFromBodyChildren(),null!==this.clickedOpenerEl?this.clickedOpenerEl.focus():i("#wpbody-content").attr("tabindex","-1").trigger("focus"),this.propagate("close"),e)&&e.escape&&this.propagate("escape"),this},escape:function(){return this.close({escape:!0})},escapeHandler:function(e){e.preventDefault(),this.escape()},selectHandler:function(e){var t=this.controller.state().get("selection");t.length<=0||("insert"===this.controller.options.state?this.controller.trigger("insert",t):(this.controller.trigger("select",t),e.preventDefault(),this.escape()))},content:function(e){return this.views.set(".media-modal-content",e),this},propagate:function(e){return this.trigger(e),this.options.propagate&&this.controller.trigger(e),this},keydown:function(e){27===e.which&&this.$el.is(":visible")&&(this.escape(),e.stopImmediatePropagation()),13!==e.which&&10!==e.which||!e.metaKey&&!e.ctrlKey||(this.selectHandler(e),e.stopImmediatePropagation())}});e.exports=t},8815(e){var t=wp.media.View.extend({tagName:"div",initialize:function(){this._views={},this.set(_.extend({},this._views,this.options.views),{silent:!0}),delete this.options.views,this.options.silent||this.render()},set:function(e,t,i){var s,o;return i=i||{},_.isObject(e)?_.each(e,function(e,t){this.set(t,e)},this):((t=t instanceof Backbone.View?t:this.toView(t,e,i)).controller=t.controller||this.controller,this.unset(e),s=t.options.priority||10,i=this.views.get()||[],_.find(i,function(e,t){if(e.options.priority>s)return o=t,!0}),this._views[e]=t,this.views.add(t,{at:_.isNumber(o)?o:i.length||0})),this},get:function(e){return this._views[e]},unset:function(e){var t=this.get(e);return t&&t.remove(),delete this._views[e],this},toView:function(e){return new wp.media.View(e)}});e.exports=t},6327(e){var t=wp.media.view.MenuItem.extend({click:function(){var e=this.options.contentMode;e&&this.controller.content.mode(e)}});e.exports=t},4783(e){var t=wp.media.view.Menu,i=t.extend({tagName:"div",className:"media-router",property:"contentMode",ItemView:wp.media.view.RouterItem,region:"router",attributes:{role:"tablist","aria-orientation":"horizontal"},initialize:function(){this.controller.on("content:render",this.update,this),t.prototype.initialize.apply(this,arguments)},update:function(){var e=this.controller.content.mode();e&&this.select(e)}});e.exports=i},2102(e){var t=wp.media.View.extend({tagName:"input",className:"search",id:"media-search-input",attributes:{type:"search"},events:{input:"search"},render:function(){return this.el.value=this.model.escape("search"),this},search:_.debounce(function(e){e=e.target.value.trim();e&&1<e.length?this.model.set("search",e):this.model.unset("search")},500)});e.exports=t},8282(e){var i=wp.i18n._n,s=wp.i18n.sprintf,t=wp.media.View.extend({tagName:"div",className:"media-selection",template:wp.template("media-selection"),events:{"click .edit-selection":"edit","click .clear-selection":"clear"},initialize:function(){_.defaults(this.options,{editable:!1,clearable:!0}),this.attachments=new wp.media.view.Attachments.Selection({controller:this.controller,collection:this.collection,selection:this.collection,model:new Backbone.Model}),this.views.set(".selection-view",this.attachments),this.collection.on("add remove reset",this.refresh,this),this.controller.on("content:activate",this.refresh,this)},ready:function(){this.refresh()},refresh:function(){var e,t;this.$el.children().length&&(e=this.collection,t="edit-selection"===this.controller.content.mode(),this.$el.toggleClass("empty",!e.length),this.$el.toggleClass("one",1===e.length),this.$el.toggleClass("editing",t),this.$(".count").text(s(i("%s item selected","%s items selected",e.length),e.length)))},edit:function(e){e.preventDefault(),this.options.editable&&this.options.editable.call(this,this.collection)},clear:function(e){e.preventDefault(),this.collection.reset(),this.controller.modal.focusManager.focus()}});e.exports=t},1915(e){var t=wp.media.View,s=Backbone.$,i=t.extend({events:{"click button":"updateHandler","change input":"updateHandler","change select":"updateHandler","change textarea":"updateHandler"},initialize:function(){this.model=this.model||new Backbone.Model,this.listenTo(this.model,"change",this.updateChanges)},prepare:function(){return _.defaults({model:this.model.toJSON()},this.options)},render:function(){return t.prototype.render.apply(this,arguments),_(this.model.attributes).chain().keys().each(this.update,this),this},update:function(e){var t,i=this.model.get(e),s=this.$('[data-setting="'+e+'"]');s.length&&(s.is("select")?(t=s.find('[value="'+i+'"]')).length?(s.find("option").prop("selected",!1),t.prop("selected",!0)):this.model.set(e,s.find(":selected").val()):s.hasClass("button-group")?s.find("button").removeClass("active").attr("aria-pressed","false").filter('[value="'+i+'"]').addClass("active").attr("aria-pressed","true"):s.is('input[type="text"], textarea')?s.is(":focus")||s.val(i):s.is('input[type="checkbox"]')&&s.prop("checked",!!i&&"false"!==i))},updateHandler:function(e){var t=s(e.target).closest("[data-setting]"),i=e.target.value;e.preventDefault(),t.length&&(t.is('input[type="checkbox"]')&&(i=t[0].checked),this.model.set(t.data("setting"),i),e=t.data("userSetting"))&&window.setUserSetting(e,i)},updateChanges:function(e){e.hasChanged()&&_(e.changed).chain().keys().each(this.update,this)}});e.exports=i},7656(e){var t=wp.media.view.Settings,i=t.extend({className:"attachment-display-settings",template:wp.template("attachment-display-settings"),initialize:function(){var e=this.options.attachment;_.defaults(this.options,{userSettings:!1}),t.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:link",this.updateLinkTo),e&&e.on("change:uploading",this.render,this)},dispose:function(){var e=this.options.attachment;e&&e.off(null,null,this),t.prototype.dispose.apply(this,arguments)},render:function(){var e=this.options.attachment;return e&&_.extend(this.options,{sizes:e.get("sizes"),type:e.get("type")}),t.prototype.render.call(this),this.updateLinkTo(),this},updateLinkTo:function(){var e=this.model.get("link"),t=this.$(".link-to-custom"),i=this.options.attachment;"none"===e||"embed"===e||!i&&"custom"!==e?t.closest(".setting").addClass("hidden"):(i&&("post"===e?t.val(i.get("link")):"file"===e?t.val(i.get("url")):this.model.get("linkUrl")||t.val("http://"),t.prop("readonly","custom"!==e)),t.closest(".setting").removeClass("hidden"),t.length&&t[0].scrollIntoView())}});e.exports=i},7266(e){var t=wp.media.view.Settings.extend({className:"collection-settings gallery-settings",template:wp.template("gallery-settings")});e.exports=t},2356(e){var t=wp.media.view.Settings.extend({className:"collection-settings playlist-settings",template:wp.template("playlist-settings")});e.exports=t},1992(e){var t=wp.media.view.PriorityList.extend({className:"media-sidebar"});e.exports=t},443(e){var t=wp.media.view,i=t.Cropper.extend({className:"crop-content site-icon",ready:function(){t.Cropper.prototype.ready.apply(this,arguments),this.$(".crop-image").on("load",_.bind(this.addSidebar,this))},addSidebar:function(){this.sidebar=new wp.media.view.Sidebar({controller:this.controller}),this.sidebar.set("preview",new wp.media.view.SiteIconPreview({controller:this.controller,attachment:this.options.attachment})),this.controller.cropperView.views.add(this.sidebar)}});e.exports=i},7810(e){var t=wp.media.View,n=jQuery,t=t.extend({className:"site-icon-preview-crop-modal",template:wp.template("site-icon-preview-crop"),ready:function(){this.controller.imgSelect.setOptions({onInit:this.updatePreview,onSelectChange:this.updatePreview})},prepare:function(){return{url:this.options.attachment.get("url")}},updatePreview:function(e,t){var i=64/t.width,s=64/t.height,o=24/t.width,a=24/t.height;n("#preview-app-icon").css({width:Math.round(i*this.imageWidth)+"px",height:Math.round(s*this.imageHeight)+"px",marginLeft:"-"+Math.round(i*t.x1)+"px",marginTop:"-"+Math.round(s*t.y1)+"px"}),n("#preview-favicon").css({width:Math.round(o*this.imageWidth)+"px",height:Math.round(a*this.imageHeight)+"px",marginLeft:"-"+Math.round(o*t.x1)+"px",marginTop:"-"+Math.floor(a*t.y1)+"px"})}});e.exports=t},9141(e){var t=wp.media.View.extend({tagName:"span",className:"spinner",spinnerTimeout:!1,delay:400,show:function(){return this.spinnerTimeout||(this.spinnerTimeout=_.delay(function(e){e.addClass("is-active")},this.delay,this.$el)),this},hide:function(){return this.$el.removeClass("is-active"),this.spinnerTimeout=clearTimeout(this.spinnerTimeout),this}});e.exports=t},5275(e){var t=wp.media.View,i=t.extend({tagName:"div",className:"media-toolbar",initialize:function(){var e=this.controller.state(),t=this.selection=e.get("selection"),e=this.library=e.get("library");this._views={},this.primary=new wp.media.view.PriorityList,this.secondary=new wp.media.view.PriorityList,this.tertiary=new wp.media.view.PriorityList,this.primary.$el.addClass("media-toolbar-primary search-form"),this.secondary.$el.addClass("media-toolbar-secondary"),this.tertiary.$el.addClass("media-bg-overlay"),this.views.set([this.secondary,this.primary,this.tertiary]),this.options.items&&this.set(this.options.items,{silent:!0}),this.options.silent||this.render(),t&&t.on("add remove reset",this.refresh,this),e&&e.on("add remove reset",this.refresh,this)},dispose:function(){return this.selection&&this.selection.off(null,null,this),this.library&&this.library.off(null,null,this),t.prototype.dispose.apply(this,arguments)},ready:function(){this.refresh()},set:function(e,t,i){return i=i||{},_.isObject(e)?_.each(e,function(e,t){this.set(t,e,{silent:!0})},this):(t instanceof Backbone.View||(t.classes=["media-button-"+e].concat(t.classes||[]),t=new wp.media.view.Button(t).render()),t.controller=t.controller||this.controller,this._views[e]=t,this[t.options.priority<0?"secondary":"primary"].set(e,t,i)),i.silent||this.refresh(),this},get:function(e){return this._views[e]},unset:function(e,t){return delete this._views[e],this.primary.unset(e,t),this.secondary.unset(e,t),this.tertiary.unset(e,t),t&&t.silent||this.refresh(),this},refresh:function(){var e=this.controller.state(),o=e.get("library"),a=e.get("selection");_.each(this._views,function(e){var t,i,s;e.model&&e.options&&e.options.requires&&(t=e.options.requires,i=!1,s=o&&!_.isEmpty(o.findWhere({uploading:!0})),a&&a.models&&(i=_.some(a.models,function(e){return!0===e.get("uploading")})),t.uploadingComplete&&s&&(i=!0),(t.selection&&a&&!a.length||t.library&&o&&!o.length)&&(i=!0),e.model.set("disabled",i))})}});e.exports=i},397(e){var t=wp.media.view.Toolbar.Select,i=wp.media.view.l10n,s=t.extend({initialize:function(){_.defaults(this.options,{text:i.insertIntoPost,requires:!1}),t.prototype.initialize.apply(this,arguments)},refresh:function(){var e=this.controller.state().props.get("url");this.get("select").model.set("disabled",!e||"http://"===e),t.prototype.refresh.apply(this,arguments)}});e.exports=s},9458(e){var t=wp.media.view.Toolbar,i=wp.media.view.l10n,s=t.extend({initialize:function(){var e=this.options;_.bindAll(this,"clickSelect"),_.defaults(e,{event:"select",state:!1,reset:!0,close:!0,text:i.select,requires:{selection:!0}}),e.items=_.defaults(e.items||{},{select:{style:"primary",text:e.text,priority:80,click:this.clickSelect,requires:e.requires}}),t.prototype.initialize.apply(this,arguments)},clickSelect:function(){var e=this.options,t=this.controller;e.close&&t.close(),e.event&&t.state().trigger(e.event),e.state&&t.setState(e.state),e.reset&&t.reset()}});e.exports=s},3674(e){var t=wp.media.View,i=wp.media.view.l10n,s=jQuery,o=t.extend({tagName:"div",className:"uploader-editor",template:wp.template("uploader-editor"),localDrag:!1,overContainer:!1,overDropzone:!1,draggingFile:null,initialize:function(){return this.initialized=!1,window.tinyMCEPreInit&&window.tinyMCEPreInit.dragDropUpload&&this.browserSupport()&&(this.$document=s(document),this.dropzones=[],this.files=[],this.$document.on("drop",".uploader-editor",_.bind(this.drop,this)),this.$document.on("dragover",".uploader-editor",_.bind(this.dropzoneDragover,this)),this.$document.on("dragleave",".uploader-editor",_.bind(this.dropzoneDragleave,this)),this.$document.on("click",".uploader-editor",_.bind(this.click,this)),this.$document.on("dragover",_.bind(this.containerDragover,this)),this.$document.on("dragleave",_.bind(this.containerDragleave,this)),this.$document.on("dragstart dragend drop",_.bind(function(e){this.localDrag="dragstart"===e.type,"drop"===e.type&&this.containerDragleave()},this)),this.initialized=!0),this},browserSupport:function(){var e=document.createElement("div");return("draggable"in e||"ondragstart"in e&&"ondrop"in e)&&!!(window.File&&window.FileList&&window.FileReader)},isDraggingFile:function(e){if(null===this.draggingFile){if(_.isUndefined(e.originalEvent)||_.isUndefined(e.originalEvent.dataTransfer))return!1;this.draggingFile=-1<_.indexOf(e.originalEvent.dataTransfer.types,"Files")&&-1===_.indexOf(e.originalEvent.dataTransfer.types,"text/plain")}return this.draggingFile},refresh:function(e){for(var t in this.dropzones)this.dropzones[t].toggle(this.overContainer||this.overDropzone);return _.isUndefined(e)||s(e.target).closest(".uploader-editor").toggleClass("droppable",this.overDropzone),this.overContainer||this.overDropzone||(this.draggingFile=null),this},render:function(){return this.initialized&&(t.prototype.render.apply(this,arguments),s(".wp-editor-wrap").each(_.bind(this.attach,this))),this},attach:function(e,t){var i=this.$el.clone();return this.dropzones.push(i),s(t).append(i),this},drop:function(e){if(this.containerDragleave(e),this.dropzoneDragleave(e),this.files=e.originalEvent.dataTransfer.files,!(this.files.length<1))return 0<(e=s(e.target).parents(".wp-editor-wrap")).length&&e[0].id&&(window.wpActiveEditor=e[0].id.slice(3,-5)),this.workflow?(this.workflow.state().reset(),this.addFiles.apply(this),this.workflow.open()):(this.workflow=wp.media.editor.open(window.wpActiveEditor,{frame:"post",state:"insert",title:i.addMedia,multiple:!0}),(e=this.workflow.uploader).uploader&&e.uploader.ready?this.addFiles.apply(this):this.workflow.on("uploader:ready",this.addFiles,this)),!1},addFiles:function(){return this.files.length&&(this.workflow.uploader.uploader.uploader.addFile(_.toArray(this.files)),this.files=[]),this},containerDragover:function(e){!this.localDrag&&this.isDraggingFile(e)&&(this.overContainer=!0,this.refresh())},containerDragleave:function(){this.overContainer=!1,_.delay(_.bind(this.refresh,this),50)},dropzoneDragover:function(e){if(!this.localDrag&&this.isDraggingFile(e))return this.overDropzone=!0,this.refresh(e),!1},dropzoneDragleave:function(e){this.overDropzone=!1,_.delay(_.bind(this.refresh,this,e),50)},click:function(e){this.containerDragleave(e),this.dropzoneDragleave(e),this.localDrag=!1}});e.exports=o},1753(e){var t=wp.media.View,i=t.extend({tagName:"div",className:"uploader-inline",template:wp.template("uploader-inline"),events:{"click .close":"hide"},initialize:function(){_.defaults(this.options,{message:"",status:!0,canClose:!1}),!this.options.$browser&&this.controller.uploader&&(this.options.$browser=this.controller.uploader.$browser),_.isUndefined(this.options.postId)&&(this.options.postId=wp.media.view.settings.post.id),this.options.status&&this.views.set(".upload-inline-status",new wp.media.view.UploaderStatus({controller:this.controller}))},prepare:function(){var e=this.controller.state().get("suggestedWidth"),t=this.controller.state().get("suggestedHeight"),i={};return i.message=this.options.message,i.canClose=this.options.canClose,e&&t&&(i.suggestedWidth=e,i.suggestedHeight=t),i},dispose:function(){return this.disposing?t.prototype.dispose.apply(this,arguments):(this.disposing=!0,this.remove())},remove:function(){var e=t.prototype.remove.apply(this,arguments);return _.defer(_.bind(this.refresh,this)),e},refresh:function(){var e=this.controller.uploader;e&&e.refresh()},ready:function(){var e,t=this.options.$browser;if(this.controller.uploader){if((e=this.$(".browser"))[0]===t[0])return;t.detach().text(e.text()),t[0].className=e[0].className,t[0].setAttribute("aria-describedby",e[0].getAttribute("aria-describedby")),e.replaceWith(t.show())}return this.refresh(),this},show:function(){this.$el.removeClass("hidden"),this.controller.$uploaderToggler&&this.controller.$uploaderToggler.length&&this.controller.$uploaderToggler.attr("aria-expanded","true")},hide:function(){this.$el.addClass("hidden"),this.controller.$uploaderToggler&&this.controller.$uploaderToggler.length&&this.controller.$uploaderToggler.attr("aria-expanded","false").trigger("focus")}});e.exports=i},6442(e){var t=wp.media.View.extend({className:"upload-error",template:wp.template("uploader-status-error")});e.exports=t},8197(e){var t=wp.media.View,i=t.extend({className:"media-uploader-status",template:wp.template("uploader-status"),events:{"click .upload-dismiss-errors":"dismiss"},initialize:function(){this.queue=wp.Uploader.queue,this.queue.on("add remove reset",this.visibility,this),this.queue.on("add remove reset change:percent",this.progress,this),this.queue.on("add remove reset change:uploading",this.info,this),this.errors=wp.Uploader.errors,this.errors.reset(),this.errors.on("add remove reset",this.visibility,this),this.errors.on("add",this.error,this)},dispose:function(){return wp.Uploader.queue.off(null,null,this),t.prototype.dispose.apply(this,arguments),this},visibility:function(){this.$el.toggleClass("uploading",!!this.queue.length),this.$el.toggleClass("errors",!!this.errors.length),this.$el.toggle(!!this.queue.length||!!this.errors.length)},ready:function(){_.each({$bar:".media-progress-bar div",$index:".upload-index",$total:".upload-total",$filename:".upload-filename"},function(e,t){this[t]=this.$(e)},this),this.visibility(),this.progress(),this.info()},progress:function(){var e=this.queue,t=this.$bar;t&&e.length&&t.width(e.reduce(function(e,t){return t.get("uploading")?(t=t.get("percent"),e+(_.isNumber(t)?t:100)):e+100},0)/e.length+"%")},info:function(){var e,t=this.queue,i=0;t.length&&(e=this.queue.find(function(e,t){return i=t,e.get("uploading")}),this.$index)&&this.$total&&this.$filename&&(this.$index.text(i+1),this.$total.text(t.length),this.$filename.html(e?this.filename(e.get("filename")):""))},filename:function(e){return _.escape(e)},error:function(e){var t=new wp.media.view.UploaderStatusError({filename:this.filename(e.get("file").name),message:e.get("message")}),i=this.$el.find("button");this.views.add(".upload-errors",t,{at:0}),_.delay(function(){i.trigger("focus")},1e3),_.delay(function(){wp.a11y.speak(e.get("message"))},1500)},dismiss:function(){var e=this.views.get(".upload-errors");e&&_.invoke(e,"remove"),wp.Uploader.errors.reset(),wp.a11y.speak(wp.i18n.__("Error dismissed.")),this.controller.modal&&this.controller.modal.focusManager.focus()}});e.exports=i},8291(e){var t=jQuery,i=wp.media.View.extend({tagName:"div",className:"uploader-window",template:wp.template("uploader-window"),initialize:function(){var e;this.$browser=t('<button type="button" class="browser" />').hide().appendTo("body"),!(e=this.options.uploader=_.defaults(this.options.uploader||{},{dropzone:this.$el,browser:this.$browser,params:{}})).dropzone||e.dropzone instanceof t||(e.dropzone=t(e.dropzone)),this.controller.on("activate",this.refresh,this),this.controller.on("detach",function(){this.$browser.remove()},this)},refresh:function(){this.uploader&&this.uploader.refresh()},ready:function(){var e=wp.media.view.settings.post.id;this.uploader||(e&&(this.options.uploader.params.post_id=e),this.uploader=new wp.Uploader(this.options.uploader),(e=this.uploader.dropzone).on("dropzone:enter",_.bind(this.show,this)),e.on("dropzone:leave",_.bind(this.hide,this)),t(this.uploader).on("uploader:ready",_.bind(this._ready,this)))},_ready:function(){this.controller.trigger("uploader:ready")},show:function(){var e=this.$el.show();_.defer(function(){e.css({opacity:1})})},hide:function(){var e=this.$el.css({opacity:0});wp.media.transition(e).done(function(){"0"===e.css("opacity")&&e.hide()}),_.delay(function(){"0"===e.css("opacity")&&e.is(":visible")&&e.hide()},500)}});e.exports=i},4747(e){var t=wp.Backbone.View.extend({constructor:function(e){e&&e.controller&&(this.controller=e.controller),wp.Backbone.View.apply(this,arguments)},dispose:function(){return this.undelegateEvents(),this.model&&this.model.off&&this.model.off(null,null,this),this.collection&&this.collection.off&&this.collection.off(null,null,this),this.controller&&this.controller.off&&this.controller.off(null,null,this),this},remove:function(){return this.dispose(),wp.Backbone.View.prototype.remove.apply(this,arguments)}});e.exports=t}},s={};function o(e){var t=s[e];return void 0!==t||(t=s[e]={exports:{}},i[e](t,t.exports,o)),t.exports}var t,e,a,n=wp.media,r=jQuery;n.isTouchDevice="ontouchend"in document,e=n.view.l10n=window._wpMediaViewsL10n||{},n.view.settings=e.settings||{},delete e.settings,n.model.settings.post=n.view.settings.post,r.support.transition=(t=document.documentElement.style,e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},(a=_.find(_.keys(e),function(e){return!_.isUndefined(t[e])}))&&{end:e[a]}),n.events=_.extend({},Backbone.Events),n.transition=function(e,t){var i=r.Deferred();return t=t||2e3,r.support.transition?((e=e instanceof r?e:r(e)).first().one(r.support.transition.end,i.resolve),_.delay(i.resolve,t)):i.resolve(),i.promise()},n.controller.Region=o(9875),n.controller.StateMachine=o(6150),n.controller.State=o(5694),n.selectionSync=o(4181),n.controller.Library=o(472),n.controller.ImageDetails=o(705),n.controller.GalleryEdit=o(2038),n.controller.GalleryAdd=o(7127),n.controller.CollectionEdit=o(8612),n.controller.CollectionAdd=o(7145),n.controller.FeaturedImage=o(1169),n.controller.ReplaceImage=o(2275),n.controller.EditImage=o(5663),n.controller.MediaLibrary=o(8065),n.controller.Embed=o(4910),n.controller.Cropper=o(5422),n.controller.CustomizeImageCropper=o(9660),n.controller.SiteIconCropper=o(6172),n.View=o(4747),n.view.Frame=o(1061),n.view.MediaFrame=o(2836),n.view.MediaFrame.Select=o(455),n.view.MediaFrame.Post=o(4274),n.view.MediaFrame.ImageDetails=o(5424),n.view.Modal=o(2621),n.view.FocusManager=o(718),n.view.UploaderWindow=o(8291),n.view.EditorUploader=o(3674),n.view.UploaderInline=o(1753),n.view.UploaderStatus=o(8197),n.view.UploaderStatusError=o(6442),n.view.Toolbar=o(5275),n.view.Toolbar.Select=o(9458),n.view.Toolbar.Embed=o(397),n.view.Button=o(846),n.view.ButtonGroup=o(168),n.view.PriorityList=o(8815),n.view.MenuItem=o(9013),n.view.Menu=o(1),n.view.RouterItem=o(6327),n.view.Router=o(4783),n.view.Sidebar=o(1992),n.view.Attachment=o(4075),n.view.Attachment.Library=o(3443),n.view.Attachment.EditLibrary=o(5232),n.view.Attachments=o(8142),n.view.Search=o(2102),n.view.AttachmentFilters=o(7709),n.view.DateFilter=o(6472),n.view.AttachmentFilters.Uploaded=o(1368),n.view.AttachmentFilters.All=o(7349),n.view.AttachmentsBrowser=o(6829),n.view.Selection=o(8282),n.view.Attachment.Selection=o(3962),n.view.Attachments.Selection=o(3479),n.view.Attachment.EditSelection=o(4593),n.view.Settings=o(1915),n.view.Settings.AttachmentDisplay=o(7656),n.view.Settings.Gallery=o(7266),n.view.Settings.Playlist=o(2356),n.view.Attachment.Details=o(6090),n.view.AttachmentCompat=o(2982),n.view.Iframe=o(1982),n.view.Embed=o(5741),n.view.Label=o(4338),n.view.EmbedUrl=o(7327),n.view.EmbedLink=o(8232),n.view.EmbedImage=o(2395),n.view.ImageDetails=o(2650),n.view.Cropper=o(7637),n.view.SiteIconCropper=o(443),n.view.SiteIconPreview=o(7810),n.view.EditImage=o(6126),n.view.Spinner=o(9141),n.view.Heading=o(170)})();                                                                                                                                                                                                                                                                                                                                                                                                                                                               mediaelement/mediaelement-and-player.js                                                             0000644                 00001007143 15212564044 0014227 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * MediaElement.js
 * http://www.mediaelementjs.com/
 *
 * Wrapper that mimics native HTML5 MediaElement (audio and video)
 * using a variety of technologies (pure JavaScript, Flash, iframe)
 *
 * Copyright 2010-2017, John Dyer (http://j.hn/)
 * License: MIT
 *
 */(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(_dereq_,module,exports){

},{}],2:[function(_dereq_,module,exports){
(function (global){
var topLevel = typeof global !== 'undefined' ? global :
    typeof window !== 'undefined' ? window : {}
var minDoc = _dereq_(1);

var doccy;

if (typeof document !== 'undefined') {
    doccy = document;
} else {
    doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];

    if (!doccy) {
        doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;
    }
}

module.exports = doccy;

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"1":1}],3:[function(_dereq_,module,exports){
(function (global){
var win;

if (typeof window !== "undefined") {
    win = window;
} else if (typeof global !== "undefined") {
    win = global;
} else if (typeof self !== "undefined"){
    win = self;
} else {
    win = {};
}

module.exports = win;

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],4:[function(_dereq_,module,exports){
(function (root) {

  // Store setTimeout reference so promise-polyfill will be unaffected by
  // other code modifying setTimeout (like sinon.useFakeTimers())
  var setTimeoutFunc = setTimeout;

  function noop() {}
  
  // Polyfill for Function.prototype.bind
  function bind(fn, thisArg) {
    return function () {
      fn.apply(thisArg, arguments);
    };
  }

  function Promise(fn) {
    if (typeof this !== 'object') throw new TypeError('Promises must be constructed via new');
    if (typeof fn !== 'function') throw new TypeError('not a function');
    this._state = 0;
    this._handled = false;
    this._value = undefined;
    this._deferreds = [];

    doResolve(fn, this);
  }

  function handle(self, deferred) {
    while (self._state === 3) {
      self = self._value;
    }
    if (self._state === 0) {
      self._deferreds.push(deferred);
      return;
    }
    self._handled = true;
    Promise._immediateFn(function () {
      var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;
      if (cb === null) {
        (self._state === 1 ? resolve : reject)(deferred.promise, self._value);
        return;
      }
      var ret;
      try {
        ret = cb(self._value);
      } catch (e) {
        reject(deferred.promise, e);
        return;
      }
      resolve(deferred.promise, ret);
    });
  }

  function resolve(self, newValue) {
    try {
      // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure
      if (newValue === self) throw new TypeError('A promise cannot be resolved with itself.');
      if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {
        var then = newValue.then;
        if (newValue instanceof Promise) {
          self._state = 3;
          self._value = newValue;
          finale(self);
          return;
        } else if (typeof then === 'function') {
          doResolve(bind(then, newValue), self);
          return;
        }
      }
      self._state = 1;
      self._value = newValue;
      finale(self);
    } catch (e) {
      reject(self, e);
    }
  }

  function reject(self, newValue) {
    self._state = 2;
    self._value = newValue;
    finale(self);
  }

  function finale(self) {
    if (self._state === 2 && self._deferreds.length === 0) {
      Promise._immediateFn(function() {
        if (!self._handled) {
          Promise._unhandledRejectionFn(self._value);
        }
      });
    }

    for (var i = 0, len = self._deferreds.length; i < len; i++) {
      handle(self, self._deferreds[i]);
    }
    self._deferreds = null;
  }

  function Handler(onFulfilled, onRejected, promise) {
    this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
    this.onRejected = typeof onRejected === 'function' ? onRejected : null;
    this.promise = promise;
  }

  /**
   * Take a potentially misbehaving resolver function and make sure
   * onFulfilled and onRejected are only called once.
   *
   * Makes no guarantees about asynchrony.
   */
  function doResolve(fn, self) {
    var done = false;
    try {
      fn(function (value) {
        if (done) return;
        done = true;
        resolve(self, value);
      }, function (reason) {
        if (done) return;
        done = true;
        reject(self, reason);
      });
    } catch (ex) {
      if (done) return;
      done = true;
      reject(self, ex);
    }
  }

  Promise.prototype['catch'] = function (onRejected) {
    return this.then(null, onRejected);
  };

  Promise.prototype.then = function (onFulfilled, onRejected) {
    var prom = new (this.constructor)(noop);

    handle(this, new Handler(onFulfilled, onRejected, prom));
    return prom;
  };

  Promise.all = function (arr) {
    var args = Array.prototype.slice.call(arr);

    return new Promise(function (resolve, reject) {
      if (args.length === 0) return resolve([]);
      var remaining = args.length;

      function res(i, val) {
        try {
          if (val && (typeof val === 'object' || typeof val === 'function')) {
            var then = val.then;
            if (typeof then === 'function') {
              then.call(val, function (val) {
                res(i, val);
              }, reject);
              return;
            }
          }
          args[i] = val;
          if (--remaining === 0) {
            resolve(args);
          }
        } catch (ex) {
          reject(ex);
        }
      }

      for (var i = 0; i < args.length; i++) {
        res(i, args[i]);
      }
    });
  };

  Promise.resolve = function (value) {
    if (value && typeof value === 'object' && value.constructor === Promise) {
      return value;
    }

    return new Promise(function (resolve) {
      resolve(value);
    });
  };

  Promise.reject = function (value) {
    return new Promise(function (resolve, reject) {
      reject(value);
    });
  };

  Promise.race = function (values) {
    return new Promise(function (resolve, reject) {
      for (var i = 0, len = values.length; i < len; i++) {
        values[i].then(resolve, reject);
      }
    });
  };

  // Use polyfill for setImmediate for performance gains
  Promise._immediateFn = (typeof setImmediate === 'function' && function (fn) { setImmediate(fn); }) ||
    function (fn) {
      setTimeoutFunc(fn, 0);
    };

  Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {
    if (typeof console !== 'undefined' && console) {
      console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console
    }
  };

  /**
   * Set the immediate function to execute callbacks
   * @param fn {function} Function to execute
   * @deprecated
   */
  Promise._setImmediateFn = function _setImmediateFn(fn) {
    Promise._immediateFn = fn;
  };

  /**
   * Change the function to execute on unhandled rejection
   * @param {function} fn Function to execute on unhandled rejection
   * @deprecated
   */
  Promise._setUnhandledRejectionFn = function _setUnhandledRejectionFn(fn) {
    Promise._unhandledRejectionFn = fn;
  };
  
  if (typeof module !== 'undefined' && module.exports) {
    module.exports = Promise;
  } else if (!root.Promise) {
    root.Promise = Promise;
  }

})(this);

},{}],5:[function(_dereq_,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

var _en = _dereq_(15);

var _general = _dereq_(27);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var i18n = { lang: 'en', en: _en.EN };

i18n.language = function () {
	for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
		args[_key] = arguments[_key];
	}

	if (args !== null && args !== undefined && args.length) {

		if (typeof args[0] !== 'string') {
			throw new TypeError('Language code must be a string value');
		}

		if (!/^[a-z]{2,3}((\-|_)[a-z]{2})?$/i.test(args[0])) {
			throw new TypeError('Language code must have format 2-3 letters and. optionally, hyphen, underscore followed by 2 more letters');
		}

		i18n.lang = args[0];

		if (i18n[args[0]] === undefined) {
			args[1] = args[1] !== null && args[1] !== undefined && _typeof(args[1]) === 'object' ? args[1] : {};
			i18n[args[0]] = !(0, _general.isObjectEmpty)(args[1]) ? args[1] : _en.EN;
		} else if (args[1] !== null && args[1] !== undefined && _typeof(args[1]) === 'object') {
			i18n[args[0]] = args[1];
		}
	}

	return i18n.lang;
};

i18n.t = function (message) {
	var pluralParam = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;


	if (typeof message === 'string' && message.length) {

		var str = void 0,
		    pluralForm = void 0;

		var language = i18n.language();

		var _plural = function _plural(input, number, form) {

			if ((typeof input === 'undefined' ? 'undefined' : _typeof(input)) !== 'object' || typeof number !== 'number' || typeof form !== 'number') {
				return input;
			}

			var _pluralForms = function () {
				return [function () {
					return arguments.length <= 1 ? undefined : arguments[1];
				}, function () {
					return (arguments.length <= 0 ? undefined : arguments[0]) === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
				}, function () {
					return (arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) !== 0) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else {
						return arguments.length <= 3 ? undefined : arguments[3];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) === 1 || (arguments.length <= 0 ? undefined : arguments[0]) === 11) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2 || (arguments.length <= 0 ? undefined : arguments[0]) === 12) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) > 2 && (arguments.length <= 0 ? undefined : arguments[0]) < 20) {
						return arguments.length <= 3 ? undefined : arguments[3];
					} else {
						return arguments.length <= 4 ? undefined : arguments[4];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 > 0 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 20) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else {
						return arguments.length <= 3 ? undefined : arguments[3];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else {
						return [3];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else {
						return arguments.length <= 3 ? undefined : arguments[3];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) <= 4) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else {
						return arguments.length <= 3 ? undefined : arguments[3];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else {
						return arguments.length <= 3 ? undefined : arguments[3];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 1) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 2) {
						return arguments.length <= 3 ? undefined : arguments[3];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 3 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 === 4) {
						return arguments.length <= 4 ? undefined : arguments[4];
					} else {
						return arguments.length <= 1 ? undefined : arguments[1];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) > 2 && (arguments.length <= 0 ? undefined : arguments[0]) < 7) {
						return arguments.length <= 3 ? undefined : arguments[3];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) > 6 && (arguments.length <= 0 ? undefined : arguments[0]) < 11) {
						return arguments.length <= 4 ? undefined : arguments[4];
					} else {
						return arguments.length <= 5 ? undefined : arguments[5];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) === 0) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {
						return arguments.length <= 3 ? undefined : arguments[3];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 3 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 <= 10) {
						return arguments.length <= 4 ? undefined : arguments[4];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 11) {
						return arguments.length <= 5 ? undefined : arguments[5];
					} else {
						return arguments.length <= 6 ? undefined : arguments[6];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 > 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 11) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 > 10 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 20) {
						return arguments.length <= 3 ? undefined : arguments[3];
					} else {
						return arguments.length <= 4 ? undefined : arguments[4];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 2) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else {
						return arguments.length <= 3 ? undefined : arguments[3];
					}
				}, function () {
					return (arguments.length <= 0 ? undefined : arguments[0]) !== 11 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else {
						return arguments.length <= 3 ? undefined : arguments[3];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) !== 8 && (arguments.length <= 0 ? undefined : arguments[0]) !== 11) {
						return arguments.length <= 3 ? undefined : arguments[3];
					} else {
						return arguments.length <= 4 ? undefined : arguments[4];
					}
				}, function () {
					return (arguments.length <= 0 ? undefined : arguments[0]) === 0 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 3) {
						return arguments.length <= 3 ? undefined : arguments[3];
					} else {
						return arguments.length <= 4 ? undefined : arguments[4];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) === 0) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else {
						return arguments.length <= 3 ? undefined : arguments[3];
					}
				}];
			}();

			return _pluralForms[form].apply(null, [number].concat(input));
		};

		if (i18n[language] !== undefined) {
			str = i18n[language][message];
			if (pluralParam !== null && typeof pluralParam === 'number') {
				pluralForm = i18n[language]['mejs.plural-form'];
				str = _plural.apply(null, [str, pluralParam, pluralForm]);
			}
		}

		if (!str && i18n.en) {
			str = i18n.en[message];
			if (pluralParam !== null && typeof pluralParam === 'number') {
				pluralForm = i18n.en['mejs.plural-form'];
				str = _plural.apply(null, [str, pluralParam, pluralForm]);
			}
		}

		str = str || message;

		if (pluralParam !== null && typeof pluralParam === 'number') {
			str = str.replace('%1', pluralParam);
		}

		return (0, _general.escapeHTML)(str);
	}

	return message;
};

_mejs2.default.i18n = i18n;

if (typeof mejsL10n !== 'undefined') {
	_mejs2.default.i18n.language(mejsL10n.language, mejsL10n.strings);
}

exports.default = i18n;

},{"15":15,"27":27,"7":7}],6:[function(_dereq_,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _window = _dereq_(3);

var _window2 = _interopRequireDefault(_window);

var _document = _dereq_(2);

var _document2 = _interopRequireDefault(_document);

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

var _general = _dereq_(27);

var _media2 = _dereq_(28);

var _renderer = _dereq_(8);

var _constants = _dereq_(25);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var MediaElement = function MediaElement(idOrNode, options, sources) {
	var _this = this;

	_classCallCheck(this, MediaElement);

	var t = this;

	sources = Array.isArray(sources) ? sources : null;

	t.defaults = {
		renderers: [],

		fakeNodeName: 'mediaelementwrapper',

		pluginPath: 'build/',

		shimScriptAccess: 'sameDomain'
	};

	options = Object.assign(t.defaults, options);

	t.mediaElement = _document2.default.createElement(options.fakeNodeName);

	var id = idOrNode,
	    error = false;

	if (typeof idOrNode === 'string') {
		t.mediaElement.originalNode = _document2.default.getElementById(idOrNode);
	} else {
		t.mediaElement.originalNode = idOrNode;
		id = idOrNode.id;
	}

	if (t.mediaElement.originalNode === undefined || t.mediaElement.originalNode === null) {
		return null;
	}

	t.mediaElement.options = options;
	id = id || 'mejs_' + Math.random().toString().slice(2);

	t.mediaElement.originalNode.setAttribute('id', id + '_from_mejs');

	var tagName = t.mediaElement.originalNode.tagName.toLowerCase();
	if (['video', 'audio'].indexOf(tagName) > -1 && !t.mediaElement.originalNode.getAttribute('preload')) {
		t.mediaElement.originalNode.setAttribute('preload', 'none');
	}

	t.mediaElement.originalNode.parentNode.insertBefore(t.mediaElement, t.mediaElement.originalNode);

	t.mediaElement.appendChild(t.mediaElement.originalNode);

	var processURL = function processURL(url, type) {
		if (_window2.default.location.protocol === 'https:' && url.indexOf('http:') === 0 && _constants.IS_IOS && _mejs2.default.html5media.mediaTypes.indexOf(type) > -1) {
			var xhr = new XMLHttpRequest();
			xhr.onreadystatechange = function () {
				if (this.readyState === 4 && this.status === 200) {
					var _url = _window2.default.URL || _window2.default.webkitURL,
					    blobUrl = _url.createObjectURL(this.response);
					t.mediaElement.originalNode.setAttribute('src', blobUrl);
					return blobUrl;
				}
				return url;
			};
			xhr.open('GET', url);
			xhr.responseType = 'blob';
			xhr.send();
		}

		return url;
	};

	var mediaFiles = void 0;

	if (sources !== null) {
		mediaFiles = sources;
	} else if (t.mediaElement.originalNode !== null) {

		mediaFiles = [];

		switch (t.mediaElement.originalNode.nodeName.toLowerCase()) {
			case 'iframe':
				mediaFiles.push({
					type: '',
					src: t.mediaElement.originalNode.getAttribute('src')
				});
				break;
			case 'audio':
			case 'video':
				var _sources = t.mediaElement.originalNode.children.length,
				    nodeSource = t.mediaElement.originalNode.getAttribute('src');

				if (nodeSource) {
					var node = t.mediaElement.originalNode,
					    type = (0, _media2.formatType)(nodeSource, node.getAttribute('type'));
					mediaFiles.push({
						type: type,
						src: processURL(nodeSource, type)
					});
				}

				for (var i = 0; i < _sources; i++) {
					var n = t.mediaElement.originalNode.children[i];
					if (n.tagName.toLowerCase() === 'source') {
						var src = n.getAttribute('src'),
						    _type = (0, _media2.formatType)(src, n.getAttribute('type'));
						mediaFiles.push({ type: _type, src: processURL(src, _type) });
					}
				}
				break;
		}
	}

	t.mediaElement.id = id;
	t.mediaElement.renderers = {};
	t.mediaElement.events = {};
	t.mediaElement.promises = [];
	t.mediaElement.renderer = null;
	t.mediaElement.rendererName = null;

	t.mediaElement.changeRenderer = function (rendererName, mediaFiles) {

		var t = _this,
		    media = Object.keys(mediaFiles[0]).length > 2 ? mediaFiles[0] : mediaFiles[0].src;

		if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && t.mediaElement.renderer.name === rendererName) {
			t.mediaElement.renderer.pause();
			if (t.mediaElement.renderer.stop) {
				t.mediaElement.renderer.stop();
			}
			t.mediaElement.renderer.show();
			t.mediaElement.renderer.setSrc(media);
			return true;
		}

		if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null) {
			t.mediaElement.renderer.pause();
			if (t.mediaElement.renderer.stop) {
				t.mediaElement.renderer.stop();
			}
			t.mediaElement.renderer.hide();
		}

		var newRenderer = t.mediaElement.renderers[rendererName],
		    newRendererType = null;

		if (newRenderer !== undefined && newRenderer !== null) {
			newRenderer.show();
			newRenderer.setSrc(media);
			t.mediaElement.renderer = newRenderer;
			t.mediaElement.rendererName = rendererName;
			return true;
		}

		var rendererArray = t.mediaElement.options.renderers.length ? t.mediaElement.options.renderers : _renderer.renderer.order;

		for (var _i = 0, total = rendererArray.length; _i < total; _i++) {
			var index = rendererArray[_i];

			if (index === rendererName) {
				var rendererList = _renderer.renderer.renderers;
				newRendererType = rendererList[index];

				var renderOptions = Object.assign(newRendererType.options, t.mediaElement.options);
				newRenderer = newRendererType.create(t.mediaElement, renderOptions, mediaFiles);
				newRenderer.name = rendererName;

				t.mediaElement.renderers[newRendererType.name] = newRenderer;
				t.mediaElement.renderer = newRenderer;
				t.mediaElement.rendererName = rendererName;
				newRenderer.show();
				return true;
			}
		}

		return false;
	};

	t.mediaElement.setSize = function (width, height) {
		if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null) {
			t.mediaElement.renderer.setSize(width, height);
		}
	};

	t.mediaElement.generateError = function (message, urlList) {
		message = message || '';
		urlList = Array.isArray(urlList) ? urlList : [];
		var event = (0, _general.createEvent)('error', t.mediaElement);
		event.message = message;
		event.urls = urlList;
		t.mediaElement.dispatchEvent(event);
		error = true;
	};

	var props = _mejs2.default.html5media.properties,
	    methods = _mejs2.default.html5media.methods,
	    addProperty = function addProperty(obj, name, onGet, onSet) {
		var oldValue = obj[name];
		var getFn = function getFn() {
			return onGet.apply(obj, [oldValue]);
		},
		    setFn = function setFn(newValue) {
			oldValue = onSet.apply(obj, [newValue]);
			return oldValue;
		};

		Object.defineProperty(obj, name, {
			get: getFn,
			set: setFn
		});
	},
	    assignGettersSetters = function assignGettersSetters(propName) {
		if (propName !== 'src') {

			var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1),
			    getFn = function getFn() {
				return t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer['get' + capName] === 'function' ? t.mediaElement.renderer['get' + capName]() : null;
			},
			    setFn = function setFn(value) {
				if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer['set' + capName] === 'function') {
					t.mediaElement.renderer['set' + capName](value);
				}
			};

			addProperty(t.mediaElement, propName, getFn, setFn);
			t.mediaElement['get' + capName] = getFn;
			t.mediaElement['set' + capName] = setFn;
		}
	},
	    getSrc = function getSrc() {
		return t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null ? t.mediaElement.renderer.getSrc() : null;
	},
	    setSrc = function setSrc(value) {
		var mediaFiles = [];

		if (typeof value === 'string') {
			mediaFiles.push({
				src: value,
				type: value ? (0, _media2.getTypeFromFile)(value) : ''
			});
		} else if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src !== undefined) {
			var _src = (0, _media2.absolutizeUrl)(value.src),
			    _type2 = value.type,
			    media = Object.assign(value, {
				src: _src,
				type: (_type2 === '' || _type2 === null || _type2 === undefined) && _src ? (0, _media2.getTypeFromFile)(_src) : _type2
			});
			mediaFiles.push(media);
		} else if (Array.isArray(value)) {
			for (var _i2 = 0, total = value.length; _i2 < total; _i2++) {

				var _src2 = (0, _media2.absolutizeUrl)(value[_i2].src),
				    _type3 = value[_i2].type,
				    _media = Object.assign(value[_i2], {
					src: _src2,
					type: (_type3 === '' || _type3 === null || _type3 === undefined) && _src2 ? (0, _media2.getTypeFromFile)(_src2) : _type3
				});

				mediaFiles.push(_media);
			}
		}

		var renderInfo = _renderer.renderer.select(mediaFiles, t.mediaElement.options.renderers.length ? t.mediaElement.options.renderers : []),
		    event = void 0;

		if (!t.mediaElement.paused && !(t.mediaElement.src == null || t.mediaElement.src === '')) {
			t.mediaElement.pause();
			event = (0, _general.createEvent)('pause', t.mediaElement);
			t.mediaElement.dispatchEvent(event);
		}
		t.mediaElement.originalNode.src = mediaFiles[0].src || '';

		if (renderInfo === null && mediaFiles[0].src) {
			t.mediaElement.generateError('No renderer found', mediaFiles);
			return;
		}

		var shouldChangeRenderer = !(mediaFiles[0].src == null || mediaFiles[0].src === '');
		return shouldChangeRenderer ? t.mediaElement.changeRenderer(renderInfo.rendererName, mediaFiles) : null;
	},
	    triggerAction = function triggerAction(methodName, args) {
		try {
			if (methodName === 'play' && (t.mediaElement.rendererName === 'native_dash' || t.mediaElement.rendererName === 'native_hls' || t.mediaElement.rendererName === 'vimeo_iframe')) {
				var response = t.mediaElement.renderer[methodName](args);
				if (response && typeof response.then === 'function') {
					response.catch(function () {
						if (t.mediaElement.paused) {
							setTimeout(function () {
								var tmpResponse = t.mediaElement.renderer.play();
								if (tmpResponse !== undefined) {
									tmpResponse.catch(function () {
										if (!t.mediaElement.renderer.paused) {
											t.mediaElement.renderer.pause();
										}
									});
								}
							}, 150);
						}
					});
				}
			} else {
				t.mediaElement.renderer[methodName](args);
			}
		} catch (e) {
			t.mediaElement.generateError(e, mediaFiles);
		}
	},
	    assignMethods = function assignMethods(methodName) {
		t.mediaElement[methodName] = function () {
			for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
				args[_key] = arguments[_key];
			}

			if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer[methodName] === 'function') {
				if (t.mediaElement.promises.length) {
					Promise.all(t.mediaElement.promises).then(function () {
						triggerAction(methodName, args);
					}).catch(function (e) {
						t.mediaElement.generateError(e, mediaFiles);
					});
				} else {
					triggerAction(methodName, args);
				}
			}
			return null;
		};
	};

	addProperty(t.mediaElement, 'src', getSrc, setSrc);
	t.mediaElement.getSrc = getSrc;
	t.mediaElement.setSrc = setSrc;

	for (var _i3 = 0, total = props.length; _i3 < total; _i3++) {
		assignGettersSetters(props[_i3]);
	}

	for (var _i4 = 0, _total = methods.length; _i4 < _total; _i4++) {
		assignMethods(methods[_i4]);
	}

	t.mediaElement.addEventListener = function (eventName, callback) {
		t.mediaElement.events[eventName] = t.mediaElement.events[eventName] || [];

		t.mediaElement.events[eventName].push(callback);
	};
	t.mediaElement.removeEventListener = function (eventName, callback) {
		if (!eventName) {
			t.mediaElement.events = {};
			return true;
		}

		var callbacks = t.mediaElement.events[eventName];

		if (!callbacks) {
			return true;
		}

		if (!callback) {
			t.mediaElement.events[eventName] = [];
			return true;
		}

		for (var _i5 = 0; _i5 < callbacks.length; _i5++) {
			if (callbacks[_i5] === callback) {
				t.mediaElement.events[eventName].splice(_i5, 1);
				return true;
			}
		}
		return false;
	};

	t.mediaElement.dispatchEvent = function (event) {
		var callbacks = t.mediaElement.events[event.type];
		if (callbacks) {
			for (var _i6 = 0; _i6 < callbacks.length; _i6++) {
				callbacks[_i6].apply(null, [event]);
			}
		}
	};

	t.mediaElement.destroy = function () {
		var mediaElement = t.mediaElement.originalNode.cloneNode(true);
		var wrapper = t.mediaElement.parentElement;
		mediaElement.removeAttribute('id');
		mediaElement.remove();
		t.mediaElement.remove();
		wrapper.appendChild(mediaElement);
	};

	if (mediaFiles.length) {
		t.mediaElement.src = mediaFiles;
	}

	if (t.mediaElement.promises.length) {
		Promise.all(t.mediaElement.promises).then(function () {
			if (t.mediaElement.options.success) {
				t.mediaElement.options.success(t.mediaElement, t.mediaElement.originalNode);
			}
		}).catch(function () {
			if (error && t.mediaElement.options.error) {
				t.mediaElement.options.error(t.mediaElement, t.mediaElement.originalNode);
			}
		});
	} else {
		if (t.mediaElement.options.success) {
			t.mediaElement.options.success(t.mediaElement, t.mediaElement.originalNode);
		}

		if (error && t.mediaElement.options.error) {
			t.mediaElement.options.error(t.mediaElement, t.mediaElement.originalNode);
		}
	}

	return t.mediaElement;
};

_window2.default.MediaElement = MediaElement;
_mejs2.default.MediaElement = MediaElement;

exports.default = MediaElement;

},{"2":2,"25":25,"27":27,"28":28,"3":3,"7":7,"8":8}],7:[function(_dereq_,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});

var _window = _dereq_(3);

var _window2 = _interopRequireDefault(_window);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var mejs = {};

mejs.version = '4.2.17';

mejs.html5media = {
	properties: ['volume', 'src', 'currentTime', 'muted', 'duration', 'paused', 'ended', 'buffered', 'error', 'networkState', 'readyState', 'seeking', 'seekable', 'currentSrc', 'preload', 'bufferedBytes', 'bufferedTime', 'initialTime', 'startOffsetTime', 'defaultPlaybackRate', 'playbackRate', 'played', 'autoplay', 'loop', 'controls'],
	readOnlyProperties: ['duration', 'paused', 'ended', 'buffered', 'error', 'networkState', 'readyState', 'seeking', 'seekable'],

	methods: ['load', 'play', 'pause', 'canPlayType'],

	events: ['loadstart', 'durationchange', 'loadedmetadata', 'loadeddata', 'progress', 'canplay', 'canplaythrough', 'suspend', 'abort', 'error', 'emptied', 'stalled', 'play', 'playing', 'pause', 'waiting', 'seeking', 'seeked', 'timeupdate', 'ended', 'ratechange', 'volumechange'],

	mediaTypes: ['audio/mp3', 'audio/ogg', 'audio/oga', 'audio/wav', 'audio/x-wav', 'audio/wave', 'audio/x-pn-wav', 'audio/mpeg', 'audio/mp4', 'video/mp4', 'video/webm', 'video/ogg', 'video/ogv']
};

_window2.default.mejs = mejs;

exports.default = mejs;

},{"3":3}],8:[function(_dereq_,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});
exports.renderer = undefined;

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Renderer = function () {
	function Renderer() {
		_classCallCheck(this, Renderer);

		this.renderers = {};
		this.order = [];
	}

	_createClass(Renderer, [{
		key: 'add',
		value: function add(renderer) {
			if (renderer.name === undefined) {
				throw new TypeError('renderer must contain at least `name` property');
			}

			this.renderers[renderer.name] = renderer;
			this.order.push(renderer.name);
		}
	}, {
		key: 'select',
		value: function select(mediaFiles) {
			var renderers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];

			var renderersLength = renderers.length;

			renderers = renderers.length ? renderers : this.order;

			if (!renderersLength) {
				var rendererIndicator = [/^(html5|native)/i, /^flash/i, /iframe$/i],
				    rendererRanking = function rendererRanking(renderer) {
					for (var i = 0, total = rendererIndicator.length; i < total; i++) {
						if (rendererIndicator[i].test(renderer)) {
							return i;
						}
					}
					return rendererIndicator.length;
				};

				renderers.sort(function (a, b) {
					return rendererRanking(a) - rendererRanking(b);
				});
			}

			for (var i = 0, total = renderers.length; i < total; i++) {
				var key = renderers[i],
				    _renderer = this.renderers[key];

				if (_renderer !== null && _renderer !== undefined) {
					for (var j = 0, jl = mediaFiles.length; j < jl; j++) {
						if (typeof _renderer.canPlayType === 'function' && typeof mediaFiles[j].type === 'string' && _renderer.canPlayType(mediaFiles[j].type)) {
							return {
								rendererName: _renderer.name,
								src: mediaFiles[j].src
							};
						}
					}
				}
			}

			return null;
		}
	}, {
		key: 'order',
		set: function set(order) {
			if (!Array.isArray(order)) {
				throw new TypeError('order must be an array of strings.');
			}

			this._order = order;
		},
		get: function get() {
			return this._order;
		}
	}, {
		key: 'renderers',
		set: function set(renderers) {
			if (renderers !== null && (typeof renderers === 'undefined' ? 'undefined' : _typeof(renderers)) !== 'object') {
				throw new TypeError('renderers must be an array of objects.');
			}

			this._renderers = renderers;
		},
		get: function get() {
			return this._renderers;
		}
	}]);

	return Renderer;
}();

var renderer = exports.renderer = new Renderer();

_mejs2.default.Renderers = renderer;

},{"7":7}],9:[function(_dereq_,module,exports){
'use strict';

var _window = _dereq_(3);

var _window2 = _interopRequireDefault(_window);

var _document = _dereq_(2);

var _document2 = _interopRequireDefault(_document);

var _i18n = _dereq_(5);

var _i18n2 = _interopRequireDefault(_i18n);

var _player = _dereq_(16);

var _player2 = _interopRequireDefault(_player);

var _constants = _dereq_(25);

var Features = _interopRequireWildcard(_constants);

var _general = _dereq_(27);

var _dom = _dereq_(26);

var _media = _dereq_(28);

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

Object.assign(_player.config, {
	usePluginFullScreen: true,

	fullscreenText: null,

	useFakeFullscreen: false
});

Object.assign(_player2.default.prototype, {
	isFullScreen: false,

	isNativeFullScreen: false,

	isInIframe: false,

	isPluginClickThroughCreated: false,

	fullscreenMode: '',

	containerSizeTimeout: null,

	buildfullscreen: function buildfullscreen(player) {
		if (!player.isVideo) {
			return;
		}

		player.isInIframe = _window2.default.location !== _window2.default.parent.location;

		player.detectFullscreenMode();

		var t = this,
		    fullscreenTitle = (0, _general.isString)(t.options.fullscreenText) ? t.options.fullscreenText : _i18n2.default.t('mejs.fullscreen'),
		    fullscreenBtn = _document2.default.createElement('div');

		fullscreenBtn.className = t.options.classPrefix + 'button ' + t.options.classPrefix + 'fullscreen-button';
		fullscreenBtn.innerHTML = '<button type="button" aria-controls="' + t.id + '" title="' + fullscreenTitle + '" aria-label="' + fullscreenTitle + '" tabindex="0"></button>';
		t.addControlElement(fullscreenBtn, 'fullscreen');

		fullscreenBtn.addEventListener('click', function () {
			var isFullScreen = Features.HAS_TRUE_NATIVE_FULLSCREEN && Features.IS_FULLSCREEN || player.isFullScreen;

			if (isFullScreen) {
				player.exitFullScreen();
			} else {
				player.enterFullScreen();
			}
		});

		player.fullscreenBtn = fullscreenBtn;

		t.options.keyActions.push({
			keys: [70],
			action: function action(player, media, key, event) {
				if (!event.ctrlKey) {
					if (typeof player.enterFullScreen !== 'undefined') {
						if (player.isFullScreen) {
							player.exitFullScreen();
						} else {
							player.enterFullScreen();
						}
					}
				}
			}
		});

		t.exitFullscreenCallback = function (e) {
			var key = e.which || e.keyCode || 0;
			if (t.options.enableKeyboard && key === 27 && (Features.HAS_TRUE_NATIVE_FULLSCREEN && Features.IS_FULLSCREEN || t.isFullScreen)) {
				player.exitFullScreen();
			}
		};

		t.globalBind('keydown', t.exitFullscreenCallback);

		t.normalHeight = 0;
		t.normalWidth = 0;

		if (Features.HAS_TRUE_NATIVE_FULLSCREEN) {
			var fullscreenChanged = function fullscreenChanged() {
				if (player.isFullScreen) {
					if (Features.isFullScreen()) {
						player.isNativeFullScreen = true;

						player.setControlsSize();
					} else {
						player.isNativeFullScreen = false;

						player.exitFullScreen();
					}
				}
			};

			player.globalBind(Features.FULLSCREEN_EVENT_NAME, fullscreenChanged);
		}
	},
	cleanfullscreen: function cleanfullscreen(player) {
		player.exitFullScreen();
		player.globalUnbind('keydown', player.exitFullscreenCallback);
	},
	detectFullscreenMode: function detectFullscreenMode() {
		var t = this,
		    isNative = t.media.rendererName !== null && /(native|html5)/i.test(t.media.rendererName);

		var mode = '';

		if (Features.HAS_TRUE_NATIVE_FULLSCREEN && isNative) {
			mode = 'native-native';
		} else if (Features.HAS_TRUE_NATIVE_FULLSCREEN && !isNative) {
			mode = 'plugin-native';
		} else if (t.usePluginFullScreen && Features.SUPPORT_POINTER_EVENTS) {
			mode = 'plugin-click';
		}

		t.fullscreenMode = mode;
		return mode;
	},
	enterFullScreen: function enterFullScreen() {
		var t = this,
		    isNative = t.media.rendererName !== null && /(html5|native)/i.test(t.media.rendererName),
		    containerStyles = getComputedStyle(t.getElement(t.container));

		if (!t.isVideo) {
			return;
		}

		if (t.options.useFakeFullscreen === false && (Features.IS_IOS || Features.IS_SAFARI) && Features.HAS_IOS_FULLSCREEN && typeof t.media.originalNode.webkitEnterFullscreen === 'function' && t.media.originalNode.canPlayType((0, _media.getTypeFromFile)(t.media.getSrc()))) {
			t.media.originalNode.webkitEnterFullscreen();
			return;
		}

		(0, _dom.addClass)(_document2.default.documentElement, t.options.classPrefix + 'fullscreen');
		(0, _dom.addClass)(t.getElement(t.container), t.options.classPrefix + 'container-fullscreen');

		t.normalHeight = parseFloat(containerStyles.height);
		t.normalWidth = parseFloat(containerStyles.width);

		if (t.fullscreenMode === 'native-native' || t.fullscreenMode === 'plugin-native') {
			Features.requestFullScreen(t.getElement(t.container));

			if (t.isInIframe) {
				setTimeout(function checkFullscreen() {

					if (t.isNativeFullScreen) {
						var percentErrorMargin = 0.002,
						    windowWidth = _window2.default.innerWidth || _document2.default.documentElement.clientWidth || _document2.default.body.clientWidth,
						    screenWidth = screen.width,
						    absDiff = Math.abs(screenWidth - windowWidth),
						    marginError = screenWidth * percentErrorMargin;

						if (absDiff > marginError) {
							t.exitFullScreen();
						} else {
							setTimeout(checkFullscreen, 500);
						}
					}
				}, 1000);
			}
		}

		t.getElement(t.container).style.width = '100%';
		t.getElement(t.container).style.height = '100%';

		t.containerSizeTimeout = setTimeout(function () {
			t.getElement(t.container).style.width = '100%';
			t.getElement(t.container).style.height = '100%';
			t.setControlsSize();
		}, 500);

		if (isNative) {
			t.node.style.width = '100%';
			t.node.style.height = '100%';
		} else {
			var elements = t.getElement(t.container).querySelectorAll('embed, object, video'),
			    _total = elements.length;
			for (var i = 0; i < _total; i++) {
				elements[i].style.width = '100%';
				elements[i].style.height = '100%';
			}
		}

		if (t.options.setDimensions && typeof t.media.setSize === 'function') {
			t.media.setSize(screen.width, screen.height);
		}

		var layers = t.getElement(t.layers).children,
		    total = layers.length;
		for (var _i = 0; _i < total; _i++) {
			layers[_i].style.width = '100%';
			layers[_i].style.height = '100%';
		}

		if (t.fullscreenBtn) {
			(0, _dom.removeClass)(t.fullscreenBtn, t.options.classPrefix + 'fullscreen');
			(0, _dom.addClass)(t.fullscreenBtn, t.options.classPrefix + 'unfullscreen');
		}

		t.setControlsSize();
		t.isFullScreen = true;

		var zoomFactor = Math.min(screen.width / t.width, screen.height / t.height),
		    captionText = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'captions-text');
		if (captionText) {
			captionText.style.fontSize = zoomFactor * 100 + '%';
			captionText.style.lineHeight = 'normal';
			t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'captions-position').style.bottom = (screen.height - t.normalHeight) / 2 - t.getElement(t.controls).offsetHeight / 2 + zoomFactor + 15 + 'px';
		}
		var event = (0, _general.createEvent)('enteredfullscreen', t.getElement(t.container));
		t.getElement(t.container).dispatchEvent(event);
	},
	exitFullScreen: function exitFullScreen() {
		var t = this,
		    isNative = t.media.rendererName !== null && /(native|html5)/i.test(t.media.rendererName);

		if (!t.isVideo) {
			return;
		}

		clearTimeout(t.containerSizeTimeout);

		if (Features.HAS_TRUE_NATIVE_FULLSCREEN && (Features.IS_FULLSCREEN || t.isFullScreen)) {
			Features.cancelFullScreen();
		}

		(0, _dom.removeClass)(_document2.default.documentElement, t.options.classPrefix + 'fullscreen');
		(0, _dom.removeClass)(t.getElement(t.container), t.options.classPrefix + 'container-fullscreen');

		if (t.options.setDimensions) {
			t.getElement(t.container).style.width = t.normalWidth + 'px';
			t.getElement(t.container).style.height = t.normalHeight + 'px';

			if (isNative) {
				t.node.style.width = t.normalWidth + 'px';
				t.node.style.height = t.normalHeight + 'px';
			} else {
				var elements = t.getElement(t.container).querySelectorAll('embed, object, video'),
				    _total2 = elements.length;
				for (var i = 0; i < _total2; i++) {
					elements[i].style.width = t.normalWidth + 'px';
					elements[i].style.height = t.normalHeight + 'px';
				}
			}

			if (typeof t.media.setSize === 'function') {
				t.media.setSize(t.normalWidth, t.normalHeight);
			}

			var layers = t.getElement(t.layers).children,
			    total = layers.length;
			for (var _i2 = 0; _i2 < total; _i2++) {
				layers[_i2].style.width = t.normalWidth + 'px';
				layers[_i2].style.height = t.normalHeight + 'px';
			}
		}

		if (t.fullscreenBtn) {
			(0, _dom.removeClass)(t.fullscreenBtn, t.options.classPrefix + 'unfullscreen');
			(0, _dom.addClass)(t.fullscreenBtn, t.options.classPrefix + 'fullscreen');
		}

		t.setControlsSize();
		t.isFullScreen = false;

		var captionText = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'captions-text');
		if (captionText) {
			captionText.style.fontSize = '';
			captionText.style.lineHeight = '';
			t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'captions-position').style.bottom = '';
		}
		var event = (0, _general.createEvent)('exitedfullscreen', t.getElement(t.container));
		t.getElement(t.container).dispatchEvent(event);
	}
});

},{"16":16,"2":2,"25":25,"26":26,"27":27,"28":28,"3":3,"5":5}],10:[function(_dereq_,module,exports){
'use strict';

var _document = _dereq_(2);

var _document2 = _interopRequireDefault(_document);

var _player = _dereq_(16);

var _player2 = _interopRequireDefault(_player);

var _i18n = _dereq_(5);

var _i18n2 = _interopRequireDefault(_i18n);

var _general = _dereq_(27);

var _dom = _dereq_(26);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

Object.assign(_player.config, {
	playText: null,

	pauseText: null
});

Object.assign(_player2.default.prototype, {
	buildplaypause: function buildplaypause(player, controls, layers, media) {
		var t = this,
		    op = t.options,
		    playTitle = (0, _general.isString)(op.playText) ? op.playText : _i18n2.default.t('mejs.play'),
		    pauseTitle = (0, _general.isString)(op.pauseText) ? op.pauseText : _i18n2.default.t('mejs.pause'),
		    play = _document2.default.createElement('div');

		play.className = t.options.classPrefix + 'button ' + t.options.classPrefix + 'playpause-button ' + t.options.classPrefix + 'play';
		play.innerHTML = '<button type="button" aria-controls="' + t.id + '" title="' + playTitle + '" aria-label="' + pauseTitle + '" tabindex="0"></button>';
		play.addEventListener('click', function () {
			if (t.paused) {
				t.play();
			} else {
				t.pause();
			}
		});

		var playBtn = play.querySelector('button');
		t.addControlElement(play, 'playpause');

		function togglePlayPause(which) {
			if ('play' === which) {
				(0, _dom.removeClass)(play, t.options.classPrefix + 'play');
				(0, _dom.removeClass)(play, t.options.classPrefix + 'replay');
				(0, _dom.addClass)(play, t.options.classPrefix + 'pause');
				playBtn.setAttribute('title', pauseTitle);
				playBtn.setAttribute('aria-label', pauseTitle);
			} else {

				(0, _dom.removeClass)(play, t.options.classPrefix + 'pause');
				(0, _dom.removeClass)(play, t.options.classPrefix + 'replay');
				(0, _dom.addClass)(play, t.options.classPrefix + 'play');
				playBtn.setAttribute('title', playTitle);
				playBtn.setAttribute('aria-label', playTitle);
			}
		}

		togglePlayPause('pse');

		media.addEventListener('loadedmetadata', function () {
			if (media.rendererName.indexOf('flash') === -1) {
				togglePlayPause('pse');
			}
		});
		media.addEventListener('play', function () {
			togglePlayPause('play');
		});
		media.addEventListener('playing', function () {
			togglePlayPause('play');
		});
		media.addEventListener('pause', function () {
			togglePlayPause('pse');
		});
		media.addEventListener('ended', function () {
			if (!player.options.loop) {
				(0, _dom.removeClass)(play, t.options.classPrefix + 'pause');
				(0, _dom.removeClass)(play, t.options.classPrefix + 'play');
				(0, _dom.addClass)(play, t.options.classPrefix + 'replay');
				playBtn.setAttribute('title', playTitle);
				playBtn.setAttribute('aria-label', playTitle);
			}
		});
	}
});

},{"16":16,"2":2,"26":26,"27":27,"5":5}],11:[function(_dereq_,module,exports){
'use strict';

var _document = _dereq_(2);

var _document2 = _interopRequireDefault(_document);

var _player = _dereq_(16);

var _player2 = _interopRequireDefault(_player);

var _i18n = _dereq_(5);

var _i18n2 = _interopRequireDefault(_i18n);

var _constants = _dereq_(25);

var _time = _dereq_(30);

var _dom = _dereq_(26);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

Object.assign(_player.config, {
	enableProgressTooltip: true,

	useSmoothHover: true,

	forceLive: false
});

Object.assign(_player2.default.prototype, {
	buildprogress: function buildprogress(player, controls, layers, media) {

		var lastKeyPressTime = 0,
		    mouseIsDown = false,
		    startedPaused = false;

		var t = this,
		    autoRewindInitial = player.options.autoRewind,
		    tooltip = player.options.enableProgressTooltip ? '<span class="' + t.options.classPrefix + 'time-float">' + ('<span class="' + t.options.classPrefix + 'time-float-current">00:00</span>') + ('<span class="' + t.options.classPrefix + 'time-float-corner"></span>') + '</span>' : '',
		    rail = _document2.default.createElement('div');

		rail.className = t.options.classPrefix + 'time-rail';
		rail.innerHTML = '<span class="' + t.options.classPrefix + 'time-total ' + t.options.classPrefix + 'time-slider">' + ('<span class="' + t.options.classPrefix + 'time-buffering"></span>') + ('<span class="' + t.options.classPrefix + 'time-loaded"></span>') + ('<span class="' + t.options.classPrefix + 'time-current"></span>') + ('<span class="' + t.options.classPrefix + 'time-hovered no-hover"></span>') + ('<span class="' + t.options.classPrefix + 'time-handle"><span class="' + t.options.classPrefix + 'time-handle-content"></span></span>') + ('' + tooltip) + '</span>';

		t.addControlElement(rail, 'progress');

		t.options.keyActions.push({
			keys: [37, 227],
			action: function action(player) {
				if (!isNaN(player.duration) && player.duration > 0) {
					if (player.isVideo) {
						player.showControls();
						player.startControlsTimer();
					}

					var timeSlider = player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'time-total');
					if (timeSlider) {
						timeSlider.focus();
					}

					var newTime = Math.max(player.currentTime - player.options.defaultSeekBackwardInterval(player), 0);

					if (!player.paused) {
						player.pause();
					}

					setTimeout(function () {
						player.setCurrentTime(newTime);
					}, 0);

					setTimeout(function () {
						player.play();
					}, 0);
				}
			}
		}, {
			keys: [39, 228],
			action: function action(player) {

				if (!isNaN(player.duration) && player.duration > 0) {
					if (player.isVideo) {
						player.showControls();
						player.startControlsTimer();
					}

					var timeSlider = player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'time-total');
					if (timeSlider) {
						timeSlider.focus();
					}

					var newTime = Math.min(player.currentTime + player.options.defaultSeekForwardInterval(player), player.duration);

					if (!player.paused) {
						player.pause();
					}

					setTimeout(function () {
						player.setCurrentTime(newTime);
					}, 0);

					setTimeout(function () {
						player.play();
					}, 0);
				}
			}
		});

		t.rail = controls.querySelector('.' + t.options.classPrefix + 'time-rail');
		t.total = controls.querySelector('.' + t.options.classPrefix + 'time-total');
		t.loaded = controls.querySelector('.' + t.options.classPrefix + 'time-loaded');
		t.current = controls.querySelector('.' + t.options.classPrefix + 'time-current');
		t.handle = controls.querySelector('.' + t.options.classPrefix + 'time-handle');
		t.timefloat = controls.querySelector('.' + t.options.classPrefix + 'time-float');
		t.timefloatcurrent = controls.querySelector('.' + t.options.classPrefix + 'time-float-current');
		t.slider = controls.querySelector('.' + t.options.classPrefix + 'time-slider');
		t.hovered = controls.querySelector('.' + t.options.classPrefix + 'time-hovered');
		t.buffer = controls.querySelector('.' + t.options.classPrefix + 'time-buffering');
		t.newTime = 0;
		t.forcedHandlePause = false;
		t.setTransformStyle = function (element, value) {
			element.style.transform = value;
			element.style.webkitTransform = value;
			element.style.MozTransform = value;
			element.style.msTransform = value;
			element.style.OTransform = value;
		};

		t.buffer.style.display = 'none';

		var handleMouseMove = function handleMouseMove(e) {
			var totalStyles = getComputedStyle(t.total),
			    offsetStyles = (0, _dom.offset)(t.total),
			    width = t.total.offsetWidth,
			    transform = function () {
				if (totalStyles.webkitTransform !== undefined) {
					return 'webkitTransform';
				} else if (totalStyles.mozTransform !== undefined) {
					return 'mozTransform ';
				} else if (totalStyles.oTransform !== undefined) {
					return 'oTransform';
				} else if (totalStyles.msTransform !== undefined) {
					return 'msTransform';
				} else {
					return 'transform';
				}
			}(),
			    cssMatrix = function () {
				if ('WebKitCSSMatrix' in window) {
					return 'WebKitCSSMatrix';
				} else if ('MSCSSMatrix' in window) {
					return 'MSCSSMatrix';
				} else if ('CSSMatrix' in window) {
					return 'CSSMatrix';
				}
			}();

			var percentage = 0,
			    leftPos = 0,
			    pos = 0,
			    x = void 0;

			if (e.originalEvent && e.originalEvent.changedTouches) {
				x = e.originalEvent.changedTouches[0].pageX;
			} else if (e.changedTouches) {
				x = e.changedTouches[0].pageX;
			} else {
				x = e.pageX;
			}

			if (t.getDuration()) {
				if (x < offsetStyles.left) {
					x = offsetStyles.left;
				} else if (x > width + offsetStyles.left) {
					x = width + offsetStyles.left;
				}

				pos = x - offsetStyles.left;
				percentage = pos / width;
				t.newTime = percentage * t.getDuration();

				if (mouseIsDown && t.getCurrentTime() !== null && t.newTime.toFixed(4) !== t.getCurrentTime().toFixed(4)) {
					t.setCurrentRailHandle(t.newTime);
					t.updateCurrent(t.newTime);
				}

				if (!_constants.IS_IOS && !_constants.IS_ANDROID) {
					if (pos < 0) {
						pos = 0;
					}
					if (t.options.useSmoothHover && cssMatrix !== null && typeof window[cssMatrix] !== 'undefined') {
						var matrix = new window[cssMatrix](getComputedStyle(t.handle)[transform]),
						    handleLocation = matrix.m41,
						    hoverScaleX = pos / parseFloat(getComputedStyle(t.total).width) - handleLocation / parseFloat(getComputedStyle(t.total).width);

						t.hovered.style.left = handleLocation + 'px';
						t.setTransformStyle(t.hovered, 'scaleX(' + hoverScaleX + ')');
						t.hovered.setAttribute('pos', pos);

						if (hoverScaleX >= 0) {
							(0, _dom.removeClass)(t.hovered, 'negative');
						} else {
							(0, _dom.addClass)(t.hovered, 'negative');
						}
					}

					if (t.timefloat) {
						var half = t.timefloat.offsetWidth / 2,
						    offsetContainer = mejs.Utils.offset(t.getElement(t.container)),
						    tooltipStyles = getComputedStyle(t.timefloat);

						if (x - offsetContainer.left < t.timefloat.offsetWidth) {
							leftPos = half;
						} else if (x - offsetContainer.left >= t.getElement(t.container).offsetWidth - half) {
							leftPos = t.total.offsetWidth - half;
						} else {
							leftPos = pos;
						}

						if ((0, _dom.hasClass)(t.getElement(t.container), t.options.classPrefix + 'long-video')) {
							leftPos += parseFloat(tooltipStyles.marginLeft) / 2 + t.timefloat.offsetWidth / 2;
						}

						t.timefloat.style.left = leftPos + 'px';
						t.timefloatcurrent.innerHTML = (0, _time.secondsToTimeCode)(t.newTime, player.options.alwaysShowHours, player.options.showTimecodeFrameCount, player.options.framesPerSecond, player.options.secondsDecimalLength, player.options.timeFormat);
						t.timefloat.style.display = 'block';
					}
				}
			} else if (!_constants.IS_IOS && !_constants.IS_ANDROID && t.timefloat) {
				leftPos = t.timefloat.offsetWidth + width >= t.getElement(t.container).offsetWidth ? t.timefloat.offsetWidth / 2 : 0;
				t.timefloat.style.left = leftPos + 'px';
				t.timefloat.style.left = leftPos + 'px';
				t.timefloat.style.display = 'block';
			}
		},
		    updateSlider = function updateSlider() {
			var seconds = t.getCurrentTime(),
			    timeSliderText = _i18n2.default.t('mejs.time-slider'),
			    time = (0, _time.secondsToTimeCode)(seconds, player.options.alwaysShowHours, player.options.showTimecodeFrameCount, player.options.framesPerSecond, player.options.secondsDecimalLength, player.options.timeFormat),
			    duration = t.getDuration();

			t.slider.setAttribute('role', 'slider');
			t.slider.tabIndex = 0;

			if (media.paused) {
				t.slider.setAttribute('aria-label', timeSliderText);
				t.slider.setAttribute('aria-valuemin', 0);
				t.slider.setAttribute('aria-valuemax', isNaN(duration) ? 0 : duration);
				t.slider.setAttribute('aria-valuenow', seconds);
				t.slider.setAttribute('aria-valuetext', time);
			} else {
				t.slider.removeAttribute('aria-label');
				t.slider.removeAttribute('aria-valuemin');
				t.slider.removeAttribute('aria-valuemax');
				t.slider.removeAttribute('aria-valuenow');
				t.slider.removeAttribute('aria-valuetext');
			}
		},
		    restartPlayer = function restartPlayer() {
			if (new Date() - lastKeyPressTime >= 1000) {
				t.play();
			}
		},
		    handleMouseup = function handleMouseup() {
			if (mouseIsDown && t.getCurrentTime() !== null && t.newTime.toFixed(4) !== t.getCurrentTime().toFixed(4)) {
				t.setCurrentTime(t.newTime);
				t.setCurrentRailHandle(t.newTime);
				t.updateCurrent(t.newTime);
			}
			if (t.forcedHandlePause) {
				t.slider.focus();
				t.play();
			}
			t.forcedHandlePause = false;
		};

		t.slider.addEventListener('focus', function () {
			player.options.autoRewind = false;
		});
		t.slider.addEventListener('blur', function () {
			player.options.autoRewind = autoRewindInitial;
		});
		t.slider.addEventListener('keydown', function (e) {
			if (new Date() - lastKeyPressTime >= 1000) {
				startedPaused = t.paused;
			}

			if (t.options.enableKeyboard && t.options.keyActions.length) {

				var keyCode = e.which || e.keyCode || 0,
				    duration = t.getDuration(),
				    seekForward = player.options.defaultSeekForwardInterval(media),
				    seekBackward = player.options.defaultSeekBackwardInterval(media);

				var seekTime = t.getCurrentTime();
				var volume = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'volume-slider');

				if (keyCode === 38 || keyCode === 40) {
					if (volume) {
						volume.style.display = 'block';
					}
					if (t.isVideo) {
						t.showControls();
						t.startControlsTimer();
					}

					var newVolume = keyCode === 38 ? Math.min(t.volume + 0.1, 1) : Math.max(t.volume - 0.1, 0),
					    mutePlayer = newVolume <= 0;
					t.setVolume(newVolume);
					t.setMuted(mutePlayer);
					return;
				} else {
					if (volume) {
						volume.style.display = 'none';
					}
				}

				switch (keyCode) {
					case 37:
						if (t.getDuration() !== Infinity) {
							seekTime -= seekBackward;
						}
						break;
					case 39:
						if (t.getDuration() !== Infinity) {
							seekTime += seekForward;
						}
						break;
					case 36:
						seekTime = 0;
						break;
					case 35:
						seekTime = duration;
						break;
					case 13:
					case 32:
						if (_constants.IS_FIREFOX) {
							if (t.paused) {
								t.play();
							} else {
								t.pause();
							}
						}
						return;
					default:
						return;
				}

				seekTime = seekTime < 0 || isNaN(seekTime) ? 0 : seekTime >= duration ? duration : Math.floor(seekTime);
				lastKeyPressTime = new Date();
				if (!startedPaused) {
					player.pause();
				}

				setTimeout(function () {
					t.setCurrentTime(seekTime);
				}, 0);

				if (seekTime < t.getDuration() && !startedPaused) {
					setTimeout(restartPlayer, 1100);
				}

				player.showControls();

				e.preventDefault();
				e.stopPropagation();
			}
		});

		var events = ['mousedown', 'touchstart'];

		t.slider.addEventListener('dragstart', function () {
			return false;
		});

		for (var i = 0, total = events.length; i < total; i++) {
			t.slider.addEventListener(events[i], function (e) {
				t.forcedHandlePause = false;
				if (t.getDuration() !== Infinity) {
					if (e.which === 1 || e.which === 0) {
						if (!t.paused) {
							t.pause();
							t.forcedHandlePause = true;
						}

						mouseIsDown = true;
						handleMouseMove(e);
						var endEvents = ['mouseup', 'touchend'];

						for (var j = 0, totalEvents = endEvents.length; j < totalEvents; j++) {
							t.getElement(t.container).addEventListener(endEvents[j], function (event) {
								var target = event.target;
								if (target === t.slider || target.closest('.' + t.options.classPrefix + 'time-slider')) {
									handleMouseMove(event);
								}
							});
						}
						t.globalBind('mouseup.dur touchend.dur', function () {
							handleMouseup();
							mouseIsDown = false;
							if (t.timefloat) {
								t.timefloat.style.display = 'none';
							}
						});
					}
				}
			}, _constants.SUPPORT_PASSIVE_EVENT && events[i] === 'touchstart' ? { passive: true } : false);
		}
		t.slider.addEventListener('mouseenter', function (e) {
			if (e.target === t.slider && t.getDuration() !== Infinity) {
				t.getElement(t.container).addEventListener('mousemove', function (event) {
					var target = event.target;
					if (target === t.slider || target.closest('.' + t.options.classPrefix + 'time-slider')) {
						handleMouseMove(event);
					}
				});
				if (t.timefloat && !_constants.IS_IOS && !_constants.IS_ANDROID) {
					t.timefloat.style.display = 'block';
				}
				if (t.hovered && !_constants.IS_IOS && !_constants.IS_ANDROID && t.options.useSmoothHover) {
					(0, _dom.removeClass)(t.hovered, 'no-hover');
				}
			}
		});
		t.slider.addEventListener('mouseleave', function () {
			if (t.getDuration() !== Infinity) {
				if (!mouseIsDown) {
					if (t.timefloat) {
						t.timefloat.style.display = 'none';
					}
					if (t.hovered && t.options.useSmoothHover) {
						(0, _dom.addClass)(t.hovered, 'no-hover');
					}
				}
			}
		});

		t.broadcastCallback = function (e) {
			var broadcast = controls.querySelector('.' + t.options.classPrefix + 'broadcast');
			if (!t.options.forceLive && t.getDuration() !== Infinity) {
				if (broadcast) {
					t.slider.style.display = '';
					broadcast.remove();
				}

				player.setProgressRail(e);
				if (!t.forcedHandlePause) {
					player.setCurrentRail(e);
				}
				updateSlider();
			} else if (!broadcast && t.options.forceLive) {
				var label = _document2.default.createElement('span');
				label.className = t.options.classPrefix + 'broadcast';
				label.innerText = _i18n2.default.t('mejs.live-broadcast');
				t.slider.style.display = 'none';
				t.rail.appendChild(label);
			}
		};

		media.addEventListener('progress', t.broadcastCallback);
		media.addEventListener('timeupdate', t.broadcastCallback);
		media.addEventListener('play', function () {
			t.buffer.style.display = 'none';
		});
		media.addEventListener('playing', function () {
			t.buffer.style.display = 'none';
		});
		media.addEventListener('seeking', function () {
			t.buffer.style.display = '';
		});
		media.addEventListener('seeked', function () {
			t.buffer.style.display = 'none';
		});
		media.addEventListener('pause', function () {
			t.buffer.style.display = 'none';
		});
		media.addEventListener('waiting', function () {
			t.buffer.style.display = '';
		});
		media.addEventListener('loadeddata', function () {
			t.buffer.style.display = '';
		});
		media.addEventListener('canplay', function () {
			t.buffer.style.display = 'none';
		});
		media.addEventListener('error', function () {
			t.buffer.style.display = 'none';
		});

		t.getElement(t.container).addEventListener('controlsresize', function (e) {
			if (t.getDuration() !== Infinity) {
				player.setProgressRail(e);
				if (!t.forcedHandlePause) {
					player.setCurrentRail(e);
				}
			}
		});
	},
	cleanprogress: function cleanprogress(player, controls, layers, media) {
		media.removeEventListener('progress', player.broadcastCallback);
		media.removeEventListener('timeupdate', player.broadcastCallback);
		if (player.rail) {
			player.rail.remove();
		}
	},
	setProgressRail: function setProgressRail(e) {
		var t = this,
		    target = e !== undefined ? e.detail.target || e.target : t.media;

		var percent = null;

		if (target && target.buffered && target.buffered.length > 0 && target.buffered.end && t.getDuration()) {
			percent = target.buffered.end(target.buffered.length - 1) / t.getDuration();
		} else if (target && target.bytesTotal !== undefined && target.bytesTotal > 0 && target.bufferedBytes !== undefined) {
				percent = target.bufferedBytes / target.bytesTotal;
			} else if (e && e.lengthComputable && e.total !== 0) {
					percent = e.loaded / e.total;
				}

		if (percent !== null) {
			percent = Math.min(1, Math.max(0, percent));

			if (t.loaded) {
				t.setTransformStyle(t.loaded, 'scaleX(' + percent + ')');
			}
		}
	},
	setCurrentRailHandle: function setCurrentRailHandle(fakeTime) {
		var t = this;
		t.setCurrentRailMain(t, fakeTime);
	},
	setCurrentRail: function setCurrentRail() {
		var t = this;
		t.setCurrentRailMain(t);
	},
	setCurrentRailMain: function setCurrentRailMain(t, fakeTime) {
		if (t.getCurrentTime() !== undefined && t.getDuration()) {
			var nTime = typeof fakeTime === 'undefined' ? t.getCurrentTime() : fakeTime;

			if (t.total && t.handle) {
				var tW = parseFloat(getComputedStyle(t.total).width);

				var newWidth = Math.round(tW * nTime / t.getDuration()),
				    handlePos = newWidth - Math.round(t.handle.offsetWidth / 2);

				handlePos = handlePos < 0 ? 0 : handlePos;
				t.setTransformStyle(t.current, 'scaleX(' + newWidth / tW + ')');
				t.setTransformStyle(t.handle, 'translateX(' + handlePos + 'px)');

				if (t.options.useSmoothHover && !(0, _dom.hasClass)(t.hovered, 'no-hover')) {
					var pos = parseInt(t.hovered.getAttribute('pos'), 10);
					pos = isNaN(pos) ? 0 : pos;

					var hoverScaleX = pos / tW - handlePos / tW;

					t.hovered.style.left = handlePos + 'px';
					t.setTransformStyle(t.hovered, 'scaleX(' + hoverScaleX + ')');

					if (hoverScaleX >= 0) {
						(0, _dom.removeClass)(t.hovered, 'negative');
					} else {
						(0, _dom.addClass)(t.hovered, 'negative');
					}
				}
			}
		}
	}
});

},{"16":16,"2":2,"25":25,"26":26,"30":30,"5":5}],12:[function(_dereq_,module,exports){
'use strict';

var _document = _dereq_(2);

var _document2 = _interopRequireDefault(_document);

var _player = _dereq_(16);

var _player2 = _interopRequireDefault(_player);

var _time = _dereq_(30);

var _dom = _dereq_(26);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

Object.assign(_player.config, {
	duration: 0,

	timeAndDurationSeparator: '<span> | </span>'
});

Object.assign(_player2.default.prototype, {
	buildcurrent: function buildcurrent(player, controls, layers, media) {
		var t = this,
		    time = _document2.default.createElement('div');

		time.className = t.options.classPrefix + 'time';
		time.setAttribute('role', 'timer');
		time.setAttribute('aria-live', 'off');
		time.innerHTML = '<span class="' + t.options.classPrefix + 'currenttime">' + (0, _time.secondsToTimeCode)(0, player.options.alwaysShowHours, player.options.showTimecodeFrameCount, player.options.framesPerSecond, player.options.secondsDecimalLength, player.options.timeFormat) + '</span>';

		t.addControlElement(time, 'current');
		player.updateCurrent();
		t.updateTimeCallback = function () {
			if (t.controlsAreVisible) {
				player.updateCurrent();
			}
		};
		media.addEventListener('timeupdate', t.updateTimeCallback);
	},
	cleancurrent: function cleancurrent(player, controls, layers, media) {
		media.removeEventListener('timeupdate', player.updateTimeCallback);
	},
	buildduration: function buildduration(player, controls, layers, media) {
		var t = this,
		    currTime = controls.lastChild.querySelector('.' + t.options.classPrefix + 'currenttime');

		if (currTime) {
			controls.querySelector('.' + t.options.classPrefix + 'time').innerHTML += t.options.timeAndDurationSeparator + '<span class="' + t.options.classPrefix + 'duration">' + ((0, _time.secondsToTimeCode)(t.options.duration, t.options.alwaysShowHours, t.options.showTimecodeFrameCount, t.options.framesPerSecond, t.options.secondsDecimalLength, t.options.timeFormat) + '</span>');
		} else {
			if (controls.querySelector('.' + t.options.classPrefix + 'currenttime')) {
				(0, _dom.addClass)(controls.querySelector('.' + t.options.classPrefix + 'currenttime').parentNode, t.options.classPrefix + 'currenttime-container');
			}

			var duration = _document2.default.createElement('div');
			duration.className = t.options.classPrefix + 'time ' + t.options.classPrefix + 'duration-container';
			duration.innerHTML = '<span class="' + t.options.classPrefix + 'duration">' + ((0, _time.secondsToTimeCode)(t.options.duration, t.options.alwaysShowHours, t.options.showTimecodeFrameCount, t.options.framesPerSecond, t.options.secondsDecimalLength, t.options.timeFormat) + '</span>');

			t.addControlElement(duration, 'duration');
		}

		t.updateDurationCallback = function () {
			if (t.controlsAreVisible) {
				player.updateDuration();
			}
		};

		media.addEventListener('timeupdate', t.updateDurationCallback);
	},
	cleanduration: function cleanduration(player, controls, layers, media) {
		media.removeEventListener('timeupdate', player.updateDurationCallback);
	},
	updateCurrent: function updateCurrent() {
		var t = this;

		var currentTime = t.getCurrentTime();

		if (isNaN(currentTime)) {
			currentTime = 0;
		}

		var timecode = (0, _time.secondsToTimeCode)(currentTime, t.options.alwaysShowHours, t.options.showTimecodeFrameCount, t.options.framesPerSecond, t.options.secondsDecimalLength, t.options.timeFormat);

		if (timecode.length > 5) {
			(0, _dom.addClass)(t.getElement(t.container), t.options.classPrefix + 'long-video');
		} else {
			(0, _dom.removeClass)(t.getElement(t.container), t.options.classPrefix + 'long-video');
		}

		if (t.getElement(t.controls).querySelector('.' + t.options.classPrefix + 'currenttime')) {
			t.getElement(t.controls).querySelector('.' + t.options.classPrefix + 'currenttime').innerText = timecode;
		}
	},
	updateDuration: function updateDuration() {
		var t = this;

		var duration = t.getDuration();

		if (t.media !== undefined && (isNaN(duration) || duration === Infinity || duration < 0)) {
			t.media.duration = t.options.duration = duration = 0;
		}

		if (t.options.duration > 0) {
			duration = t.options.duration;
		}

		var timecode = (0, _time.secondsToTimeCode)(duration, t.options.alwaysShowHours, t.options.showTimecodeFrameCount, t.options.framesPerSecond, t.options.secondsDecimalLength, t.options.timeFormat);

		if (timecode.length > 5) {
			(0, _dom.addClass)(t.getElement(t.container), t.options.classPrefix + 'long-video');
		} else {
			(0, _dom.removeClass)(t.getElement(t.container), t.options.classPrefix + 'long-video');
		}

		if (t.getElement(t.controls).querySelector('.' + t.options.classPrefix + 'duration') && duration > 0) {
			t.getElement(t.controls).querySelector('.' + t.options.classPrefix + 'duration').innerHTML = timecode;
		}
	}
});

},{"16":16,"2":2,"26":26,"30":30}],13:[function(_dereq_,module,exports){
'use strict';

var _document = _dereq_(2);

var _document2 = _interopRequireDefault(_document);

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

var _i18n = _dereq_(5);

var _i18n2 = _interopRequireDefault(_i18n);

var _player = _dereq_(16);

var _player2 = _interopRequireDefault(_player);

var _time = _dereq_(30);

var _general = _dereq_(27);

var _dom = _dereq_(26);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

Object.assign(_player.config, {
	startLanguage: '',

	tracksText: null,

	chaptersText: null,

	tracksAriaLive: false,

	hideCaptionsButtonWhenEmpty: true,

	toggleCaptionsButtonWhenOnlyOne: false,

	slidesSelector: ''
});

Object.assign(_player2.default.prototype, {
	hasChapters: false,

	buildtracks: function buildtracks(player, controls, layers, media) {

		this.findTracks();

		if (!player.tracks.length && (!player.trackFiles || !player.trackFiles.length === 0)) {
			return;
		}

		var t = this,
		    attr = t.options.tracksAriaLive ? ' role="log" aria-live="assertive" aria-atomic="false"' : '',
		    tracksTitle = (0, _general.isString)(t.options.tracksText) ? t.options.tracksText : _i18n2.default.t('mejs.captions-subtitles'),
		    chaptersTitle = (0, _general.isString)(t.options.chaptersText) ? t.options.chaptersText : _i18n2.default.t('mejs.captions-chapters'),
		    total = player.trackFiles === null ? player.tracks.length : player.trackFiles.length;

		if (t.domNode.textTracks) {
			for (var i = t.domNode.textTracks.length - 1; i >= 0; i--) {
				t.domNode.textTracks[i].mode = 'hidden';
			}
		}

		t.cleartracks(player);

		player.captions = _document2.default.createElement('div');
		player.captions.className = t.options.classPrefix + 'captions-layer ' + t.options.classPrefix + 'layer';
		player.captions.innerHTML = '<div class="' + t.options.classPrefix + 'captions-position ' + t.options.classPrefix + 'captions-position-hover"' + attr + '>' + ('<span class="' + t.options.classPrefix + 'captions-text"></span>') + '</div>';
		player.captions.style.display = 'none';
		layers.insertBefore(player.captions, layers.firstChild);

		player.captionsText = player.captions.querySelector('.' + t.options.classPrefix + 'captions-text');

		player.captionsButton = _document2.default.createElement('div');
		player.captionsButton.className = t.options.classPrefix + 'button ' + t.options.classPrefix + 'captions-button';
		player.captionsButton.innerHTML = '<button type="button" aria-controls="' + t.id + '" title="' + tracksTitle + '" aria-label="' + tracksTitle + '" tabindex="0"></button>' + ('<div class="' + t.options.classPrefix + 'captions-selector ' + t.options.classPrefix + 'offscreen">') + ('<ul class="' + t.options.classPrefix + 'captions-selector-list">') + ('<li class="' + t.options.classPrefix + 'captions-selector-list-item">') + ('<input type="radio" class="' + t.options.classPrefix + 'captions-selector-input" ') + ('name="' + player.id + '_captions" id="' + player.id + '_captions_none" ') + 'value="none" checked disabled>' + ('<label class="' + t.options.classPrefix + 'captions-selector-label ') + (t.options.classPrefix + 'captions-selected" ') + ('for="' + player.id + '_captions_none">' + _i18n2.default.t('mejs.none') + '</label>') + '</li>' + '</ul>' + '</div>';

		t.addControlElement(player.captionsButton, 'tracks');

		player.captionsButton.querySelector('.' + t.options.classPrefix + 'captions-selector-input').disabled = false;

		player.chaptersButton = _document2.default.createElement('div');
		player.chaptersButton.className = t.options.classPrefix + 'button ' + t.options.classPrefix + 'chapters-button';
		player.chaptersButton.innerHTML = '<button type="button" aria-controls="' + t.id + '" title="' + chaptersTitle + '" aria-label="' + chaptersTitle + '" tabindex="0"></button>' + ('<div class="' + t.options.classPrefix + 'chapters-selector ' + t.options.classPrefix + 'offscreen">') + ('<ul class="' + t.options.classPrefix + 'chapters-selector-list"></ul>') + '</div>';

		var subtitleCount = 0;

		for (var _i = 0; _i < total; _i++) {
			var kind = player.tracks[_i].kind,
			    src = player.tracks[_i].src;
			if (src.trim()) {
				if (kind === 'subtitles' || kind === 'captions') {
					subtitleCount++;
				} else if (kind === 'chapters' && !controls.querySelector('.' + t.options.classPrefix + 'chapter-selector')) {
					player.captionsButton.parentNode.insertBefore(player.chaptersButton, player.captionsButton);
				}
			}
		}

		player.trackToLoad = -1;
		player.selectedTrack = null;
		player.isLoadingTrack = false;

		for (var _i2 = 0; _i2 < total; _i2++) {
			var _kind = player.tracks[_i2].kind;
			if (player.tracks[_i2].src.trim() && (_kind === 'subtitles' || _kind === 'captions')) {
				player.addTrackButton(player.tracks[_i2].trackId, player.tracks[_i2].srclang, player.tracks[_i2].label);
			}
		}

		player.loadNextTrack();

		var inEvents = ['mouseenter', 'focusin'],
		    outEvents = ['mouseleave', 'focusout'];

		if (t.options.toggleCaptionsButtonWhenOnlyOne && subtitleCount === 1) {
			player.captionsButton.addEventListener('click', function (e) {
				var trackId = 'none';
				if (player.selectedTrack === null) {
					trackId = player.tracks[0].trackId;
				}
				var keyboard = e.keyCode || e.which;
				player.setTrack(trackId, typeof keyboard !== 'undefined');
			});
		} else {
			var labels = player.captionsButton.querySelectorAll('.' + t.options.classPrefix + 'captions-selector-label'),
			    captions = player.captionsButton.querySelectorAll('input[type=radio]');

			for (var _i3 = 0, _total = inEvents.length; _i3 < _total; _i3++) {
				player.captionsButton.addEventListener(inEvents[_i3], function () {
					(0, _dom.removeClass)(this.querySelector('.' + t.options.classPrefix + 'captions-selector'), t.options.classPrefix + 'offscreen');
				});
			}

			for (var _i4 = 0, _total2 = outEvents.length; _i4 < _total2; _i4++) {
				player.captionsButton.addEventListener(outEvents[_i4], function () {
					(0, _dom.addClass)(this.querySelector('.' + t.options.classPrefix + 'captions-selector'), t.options.classPrefix + 'offscreen');
				});
			}

			for (var _i5 = 0, _total3 = captions.length; _i5 < _total3; _i5++) {
				captions[_i5].addEventListener('click', function (e) {
					var keyboard = e.keyCode || e.which;
					player.setTrack(this.value, typeof keyboard !== 'undefined');
				});
			}

			for (var _i6 = 0, _total4 = labels.length; _i6 < _total4; _i6++) {
				labels[_i6].addEventListener('click', function (e) {
					var radio = (0, _dom.siblings)(this, function (el) {
						return el.tagName === 'INPUT';
					})[0],
					    event = (0, _general.createEvent)('click', radio);
					radio.dispatchEvent(event);
					e.preventDefault();
				});
			}

			player.captionsButton.addEventListener('keydown', function (e) {
				e.stopPropagation();
			});
		}

		for (var _i7 = 0, _total5 = inEvents.length; _i7 < _total5; _i7++) {
			player.chaptersButton.addEventListener(inEvents[_i7], function () {
				if (this.querySelector('.' + t.options.classPrefix + 'chapters-selector-list').children.length) {
					(0, _dom.removeClass)(this.querySelector('.' + t.options.classPrefix + 'chapters-selector'), t.options.classPrefix + 'offscreen');
				}
			});
		}

		for (var _i8 = 0, _total6 = outEvents.length; _i8 < _total6; _i8++) {
			player.chaptersButton.addEventListener(outEvents[_i8], function () {
				(0, _dom.addClass)(this.querySelector('.' + t.options.classPrefix + 'chapters-selector'), t.options.classPrefix + 'offscreen');
			});
		}

		player.chaptersButton.addEventListener('keydown', function (e) {
			e.stopPropagation();
		});

		if (!player.options.alwaysShowControls) {
			player.getElement(player.container).addEventListener('controlsshown', function () {
				(0, _dom.addClass)(player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'captions-position'), t.options.classPrefix + 'captions-position-hover');
			});

			player.getElement(player.container).addEventListener('controlshidden', function () {
				if (!media.paused) {
					(0, _dom.removeClass)(player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'captions-position'), t.options.classPrefix + 'captions-position-hover');
				}
			});
		} else {
			(0, _dom.addClass)(player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'captions-position'), t.options.classPrefix + 'captions-position-hover');
		}

		media.addEventListener('timeupdate', function () {
			player.displayCaptions();
		});

		if (player.options.slidesSelector !== '') {
			player.slidesContainer = _document2.default.querySelectorAll(player.options.slidesSelector);

			media.addEventListener('timeupdate', function () {
				player.displaySlides();
			});
		}
	},
	cleartracks: function cleartracks(player) {
		if (player) {
			if (player.captions) {
				player.captions.remove();
			}
			if (player.chapters) {
				player.chapters.remove();
			}
			if (player.captionsText) {
				player.captionsText.remove();
			}
			if (player.captionsButton) {
				player.captionsButton.remove();
			}
			if (player.chaptersButton) {
				player.chaptersButton.remove();
			}
		}
	},
	rebuildtracks: function rebuildtracks() {
		var t = this;
		t.findTracks();
		t.buildtracks(t, t.getElement(t.controls), t.getElement(t.layers), t.media);
	},
	findTracks: function findTracks() {
		var t = this,
		    tracktags = t.trackFiles === null ? t.node.querySelectorAll('track') : t.trackFiles,
		    total = tracktags.length;

		t.tracks = [];
		for (var i = 0; i < total; i++) {
			var track = tracktags[i],
			    srclang = track.getAttribute('srclang').toLowerCase() || '',
			    trackId = t.id + '_track_' + i + '_' + track.getAttribute('kind') + '_' + srclang;
			t.tracks.push({
				trackId: trackId,
				srclang: srclang,
				src: track.getAttribute('src'),
				kind: track.getAttribute('kind'),
				label: track.getAttribute('label') || '',
				entries: [],
				isLoaded: false
			});
		}
	},
	setTrack: function setTrack(trackId, setByKeyboard) {

		var t = this,
		    radios = t.captionsButton.querySelectorAll('input[type="radio"]'),
		    captions = t.captionsButton.querySelectorAll('.' + t.options.classPrefix + 'captions-selected'),
		    track = t.captionsButton.querySelector('input[value="' + trackId + '"]');

		for (var i = 0, total = radios.length; i < total; i++) {
			radios[i].checked = false;
		}

		for (var _i9 = 0, _total7 = captions.length; _i9 < _total7; _i9++) {
			(0, _dom.removeClass)(captions[_i9], t.options.classPrefix + 'captions-selected');
		}

		track.checked = true;
		var labels = (0, _dom.siblings)(track, function (el) {
			return (0, _dom.hasClass)(el, t.options.classPrefix + 'captions-selector-label');
		});
		for (var _i10 = 0, _total8 = labels.length; _i10 < _total8; _i10++) {
			(0, _dom.addClass)(labels[_i10], t.options.classPrefix + 'captions-selected');
		}

		if (trackId === 'none') {
			t.selectedTrack = null;
			(0, _dom.removeClass)(t.captionsButton, t.options.classPrefix + 'captions-enabled');
		} else {
			for (var _i11 = 0, _total9 = t.tracks.length; _i11 < _total9; _i11++) {
				var _track = t.tracks[_i11];
				if (_track.trackId === trackId) {
					if (t.selectedTrack === null) {
						(0, _dom.addClass)(t.captionsButton, t.options.classPrefix + 'captions-enabled');
					}
					t.selectedTrack = _track;
					t.captions.setAttribute('lang', t.selectedTrack.srclang);
					t.displayCaptions();
					break;
				}
			}
		}

		var event = (0, _general.createEvent)('captionschange', t.media);
		event.detail.caption = t.selectedTrack;
		t.media.dispatchEvent(event);

		if (!setByKeyboard) {
			setTimeout(function () {
				t.getElement(t.container).focus();
			}, 500);
		}
	},
	loadNextTrack: function loadNextTrack() {
		var t = this;

		t.trackToLoad++;
		if (t.trackToLoad < t.tracks.length) {
			t.isLoadingTrack = true;
			t.loadTrack(t.trackToLoad);
		} else {
			t.isLoadingTrack = false;
			t.checkForTracks();
		}
	},
	loadTrack: function loadTrack(index) {
		var t = this,
		    track = t.tracks[index];

		if (track !== undefined && (track.src !== undefined || track.src !== "")) {
			(0, _dom.ajax)(track.src, 'text', function (d) {
				track.entries = typeof d === 'string' && /<tt\s+xml/ig.exec(d) ? _mejs2.default.TrackFormatParser.dfxp.parse(d) : _mejs2.default.TrackFormatParser.webvtt.parse(d);

				track.isLoaded = true;
				t.enableTrackButton(track);
				t.loadNextTrack();

				if (track.kind === 'slides') {
					t.setupSlides(track);
				} else if (track.kind === 'chapters' && !t.hasChapters) {
						t.drawChapters(track);
						t.hasChapters = true;
					}
			}, function () {
				t.removeTrackButton(track.trackId);
				t.loadNextTrack();
			});
		}
	},
	enableTrackButton: function enableTrackButton(track) {
		var t = this,
		    lang = track.srclang,
		    target = _document2.default.getElementById('' + track.trackId);

		if (!target) {
			return;
		}

		var label = track.label;

		if (label === '') {
			label = _i18n2.default.t(_mejs2.default.language.codes[lang]) || lang;
		}
		target.disabled = false;
		var targetSiblings = (0, _dom.siblings)(target, function (el) {
			return (0, _dom.hasClass)(el, t.options.classPrefix + 'captions-selector-label');
		});
		for (var i = 0, total = targetSiblings.length; i < total; i++) {
			targetSiblings[i].innerHTML = label;
		}

		if (t.options.startLanguage === lang) {
			target.checked = true;
			var event = (0, _general.createEvent)('click', target);
			target.dispatchEvent(event);
		}
	},
	removeTrackButton: function removeTrackButton(trackId) {
		var element = _document2.default.getElementById('' + trackId);
		if (element) {
			var button = element.closest('li');
			if (button) {
				button.remove();
			}
		}
	},
	addTrackButton: function addTrackButton(trackId, lang, label) {
		var t = this;
		if (label === '') {
			label = _i18n2.default.t(_mejs2.default.language.codes[lang]) || lang;
		}

		t.captionsButton.querySelector('ul').innerHTML += '<li class="' + t.options.classPrefix + 'captions-selector-list-item">' + ('<input type="radio" class="' + t.options.classPrefix + 'captions-selector-input" ') + ('name="' + t.id + '_captions" id="' + trackId + '" value="' + trackId + '" disabled>') + ('<label class="' + t.options.classPrefix + 'captions-selector-label"') + ('for="' + trackId + '">' + label + ' (loading)</label>') + '</li>';
	},
	checkForTracks: function checkForTracks() {
		var t = this;

		var hasSubtitles = false;

		if (t.options.hideCaptionsButtonWhenEmpty) {
			for (var i = 0, total = t.tracks.length; i < total; i++) {
				var kind = t.tracks[i].kind;
				if ((kind === 'subtitles' || kind === 'captions') && t.tracks[i].isLoaded) {
					hasSubtitles = true;
					break;
				}
			}

			t.captionsButton.style.display = hasSubtitles ? '' : 'none';
			t.setControlsSize();
		}
	},
	displayCaptions: function displayCaptions() {
		if (this.tracks === undefined) {
			return;
		}

		var t = this,
		    track = t.selectedTrack,
		    sanitize = function sanitize(html) {
			var div = _document2.default.createElement('div');
			div.innerHTML = html;

			var scripts = div.getElementsByTagName('script');
			var i = scripts.length;
			while (i--) {
				scripts[i].remove();
			}

			var allElements = div.getElementsByTagName('*');
			for (var _i12 = 0, n = allElements.length; _i12 < n; _i12++) {
				var attributesObj = allElements[_i12].attributes,
				    attributes = Array.prototype.slice.call(attributesObj);

				for (var j = 0, total = attributes.length; j < total; j++) {
					if (attributes[j].name.startsWith('on') || attributes[j].value.startsWith('javascript')) {
						allElements[_i12].remove();
					} else if (attributes[j].name === 'style') {
						allElements[_i12].removeAttribute(attributes[j].name);
					}
				}
			}
			return div.innerHTML;
		};

		if (track !== null && track.isLoaded) {
			var i = t.searchTrackPosition(track.entries, t.media.currentTime);
			if (i > -1) {
				var text = track.entries[i].text;
				if (typeof t.options.captionTextPreprocessor === 'function') text = t.options.captionTextPreprocessor(text);
				t.captionsText.innerHTML = sanitize(text);
				t.captionsText.className = t.options.classPrefix + 'captions-text ' + (track.entries[i].identifier || '');
				t.captions.style.display = '';
				t.captions.style.height = '0px';
				return;
			}
			t.captions.style.display = 'none';
		} else {
			t.captions.style.display = 'none';
		}
	},
	setupSlides: function setupSlides(track) {
		var t = this;
		t.slides = track;
		t.slides.entries.imgs = [t.slides.entries.length];
		t.showSlide(0);
	},
	showSlide: function showSlide(index) {
		var _this = this;

		var t = this;

		if (t.tracks === undefined || t.slidesContainer === undefined) {
			return;
		}

		var url = t.slides.entries[index].text;

		var img = t.slides.entries[index].imgs;

		if (img === undefined || img.fadeIn === undefined) {
			var image = _document2.default.createElement('img');
			image.src = url;
			image.addEventListener('load', function () {
				var self = _this,
				    visible = (0, _dom.siblings)(self, function (el) {
					return visible(el);
				});
				self.style.display = 'none';
				t.slidesContainer.innerHTML += self.innerHTML;
				(0, _dom.fadeIn)(t.slidesContainer.querySelector(image));
				for (var i = 0, total = visible.length; i < total; i++) {
					(0, _dom.fadeOut)(visible[i], 400);
				}
			});
			t.slides.entries[index].imgs = img = image;
		} else if (!(0, _dom.visible)(img)) {
			var _visible = (0, _dom.siblings)(self, function (el) {
				return _visible(el);
			});
			(0, _dom.fadeIn)(t.slidesContainer.querySelector(img));
			for (var i = 0, total = _visible.length; i < total; i++) {
				(0, _dom.fadeOut)(_visible[i]);
			}
		}
	},
	displaySlides: function displaySlides() {
		var t = this;

		if (this.slides === undefined) {
			return;
		}

		var slides = t.slides,
		    i = t.searchTrackPosition(slides.entries, t.media.currentTime);

		if (i > -1) {
			t.showSlide(i);
		}
	},
	drawChapters: function drawChapters(chapters) {
		var t = this,
		    total = chapters.entries.length;

		if (!total) {
			return;
		}

		t.chaptersButton.querySelector('ul').innerHTML = '';

		for (var i = 0; i < total; i++) {
			t.chaptersButton.querySelector('ul').innerHTML += '<li class="' + t.options.classPrefix + 'chapters-selector-list-item" ' + 'role="menuitemcheckbox" aria-live="polite" aria-disabled="false" aria-checked="false">' + ('<input type="radio" class="' + t.options.classPrefix + 'captions-selector-input" ') + ('name="' + t.id + '_chapters" id="' + t.id + '_chapters_' + i + '" value="' + chapters.entries[i].start + '" disabled>') + ('<label class="' + t.options.classPrefix + 'chapters-selector-label"') + ('for="' + t.id + '_chapters_' + i + '">' + chapters.entries[i].text + '</label>') + '</li>';
		}

		var radios = t.chaptersButton.querySelectorAll('input[type="radio"]'),
		    labels = t.chaptersButton.querySelectorAll('.' + t.options.classPrefix + 'chapters-selector-label');

		for (var _i13 = 0, _total10 = radios.length; _i13 < _total10; _i13++) {
			radios[_i13].disabled = false;
			radios[_i13].checked = false;
			radios[_i13].addEventListener('click', function (e) {
				var self = this,
				    listItems = t.chaptersButton.querySelectorAll('li'),
				    label = (0, _dom.siblings)(self, function (el) {
					return (0, _dom.hasClass)(el, t.options.classPrefix + 'chapters-selector-label');
				})[0];

				self.checked = true;
				self.parentNode.setAttribute('aria-checked', true);
				(0, _dom.addClass)(label, t.options.classPrefix + 'chapters-selected');
				(0, _dom.removeClass)(t.chaptersButton.querySelector('.' + t.options.classPrefix + 'chapters-selected'), t.options.classPrefix + 'chapters-selected');

				for (var _i14 = 0, _total11 = listItems.length; _i14 < _total11; _i14++) {
					listItems[_i14].setAttribute('aria-checked', false);
				}

				var keyboard = e.keyCode || e.which;
				if (typeof keyboard === 'undefined') {
					setTimeout(function () {
						t.getElement(t.container).focus();
					}, 500);
				}

				t.media.setCurrentTime(parseFloat(self.value));
				if (t.media.paused) {
					t.media.play();
				}
			});
		}

		for (var _i15 = 0, _total12 = labels.length; _i15 < _total12; _i15++) {
			labels[_i15].addEventListener('click', function (e) {
				var radio = (0, _dom.siblings)(this, function (el) {
					return el.tagName === 'INPUT';
				})[0],
				    event = (0, _general.createEvent)('click', radio);
				radio.dispatchEvent(event);
				e.preventDefault();
			});
		}
	},
	searchTrackPosition: function searchTrackPosition(tracks, currentTime) {
		var lo = 0,
		    hi = tracks.length - 1,
		    mid = void 0,
		    start = void 0,
		    stop = void 0;

		while (lo <= hi) {
			mid = lo + hi >> 1;
			start = tracks[mid].start;
			stop = tracks[mid].stop;

			if (currentTime >= start && currentTime < stop) {
				return mid;
			} else if (start < currentTime) {
				lo = mid + 1;
			} else if (start > currentTime) {
				hi = mid - 1;
			}
		}

		return -1;
	}
});

_mejs2.default.language = {
	codes: {
		af: 'mejs.afrikaans',
		sq: 'mejs.albanian',
		ar: 'mejs.arabic',
		be: 'mejs.belarusian',
		bg: 'mejs.bulgarian',
		ca: 'mejs.catalan',
		zh: 'mejs.chinese',
		'zh-cn': 'mejs.chinese-simplified',
		'zh-tw': 'mejs.chines-traditional',
		hr: 'mejs.croatian',
		cs: 'mejs.czech',
		da: 'mejs.danish',
		nl: 'mejs.dutch',
		en: 'mejs.english',
		et: 'mejs.estonian',
		fl: 'mejs.filipino',
		fi: 'mejs.finnish',
		fr: 'mejs.french',
		gl: 'mejs.galician',
		de: 'mejs.german',
		el: 'mejs.greek',
		ht: 'mejs.haitian-creole',
		iw: 'mejs.hebrew',
		hi: 'mejs.hindi',
		hu: 'mejs.hungarian',
		is: 'mejs.icelandic',
		id: 'mejs.indonesian',
		ga: 'mejs.irish',
		it: 'mejs.italian',
		ja: 'mejs.japanese',
		ko: 'mejs.korean',
		lv: 'mejs.latvian',
		lt: 'mejs.lithuanian',
		mk: 'mejs.macedonian',
		ms: 'mejs.malay',
		mt: 'mejs.maltese',
		no: 'mejs.norwegian',
		fa: 'mejs.persian',
		pl: 'mejs.polish',
		pt: 'mejs.portuguese',
		ro: 'mejs.romanian',
		ru: 'mejs.russian',
		sr: 'mejs.serbian',
		sk: 'mejs.slovak',
		sl: 'mejs.slovenian',
		es: 'mejs.spanish',
		sw: 'mejs.swahili',
		sv: 'mejs.swedish',
		tl: 'mejs.tagalog',
		th: 'mejs.thai',
		tr: 'mejs.turkish',
		uk: 'mejs.ukrainian',
		vi: 'mejs.vietnamese',
		cy: 'mejs.welsh',
		yi: 'mejs.yiddish'
	}
};

_mejs2.default.TrackFormatParser = {
	webvtt: {
		pattern: /^((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,

		parse: function parse(trackText) {
			var lines = trackText.split(/\r?\n/),
			    entries = [];

			var timecode = void 0,
			    text = void 0,
			    identifier = void 0;

			for (var i = 0, total = lines.length; i < total; i++) {
				timecode = this.pattern.exec(lines[i]);

				if (timecode && i < lines.length) {
					if (i - 1 >= 0 && lines[i - 1] !== '') {
						identifier = lines[i - 1];
					}
					i++;

					text = lines[i];
					i++;
					while (lines[i] !== '' && i < lines.length) {
						text = text + '\n' + lines[i];
						i++;
					}
					text = text === null ? '' : text.trim().replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "<a href='$1' target='_blank'>$1</a>");
					entries.push({
						identifier: identifier,
						start: (0, _time.convertSMPTEtoSeconds)(timecode[1]) === 0 ? 0.200 : (0, _time.convertSMPTEtoSeconds)(timecode[1]),
						stop: (0, _time.convertSMPTEtoSeconds)(timecode[3]),
						text: text,
						settings: timecode[5]
					});
				}
				identifier = '';
			}
			return entries;
		}
	},

	dfxp: {
		parse: function parse(trackText) {
			var trackElem = _document2.default.adoptNode(new DOMParser().parseFromString(trackText, 'application/xml').documentElement),
			    container = trackElem.querySelector('div'),
			    lines = container.querySelectorAll('p'),
			    styleNode = _document2.default.getElementById(container.getAttribute('style')),
			    entries = [];

			var styles = void 0;

			if (styleNode) {
				styleNode.removeAttribute('id');
				var attributes = styleNode.attributes;
				if (attributes.length) {
					styles = {};
					for (var i = 0, total = attributes.length; i < total; i++) {
						styles[attributes[i].name.split(":")[1]] = attributes[i].value;
					}
				}
			}

			for (var _i16 = 0, _total13 = lines.length; _i16 < _total13; _i16++) {
				var style = void 0,
				    _temp = {
					start: null,
					stop: null,
					style: null,
					text: null
				};

				if (lines[_i16].getAttribute('begin')) {
					_temp.start = (0, _time.convertSMPTEtoSeconds)(lines[_i16].getAttribute('begin'));
				}
				if (!_temp.start && lines[_i16 - 1].getAttribute('end')) {
					_temp.start = (0, _time.convertSMPTEtoSeconds)(lines[_i16 - 1].getAttribute('end'));
				}
				if (lines[_i16].getAttribute('end')) {
					_temp.stop = (0, _time.convertSMPTEtoSeconds)(lines[_i16].getAttribute('end'));
				}
				if (!_temp.stop && lines[_i16 + 1].getAttribute('begin')) {
					_temp.stop = (0, _time.convertSMPTEtoSeconds)(lines[_i16 + 1].getAttribute('begin'));
				}

				if (styles) {
					style = '';
					for (var _style in styles) {
						style += _style + ': ' + styles[_style] + ';';
					}
				}
				if (style) {
					_temp.style = style;
				}
				if (_temp.start === 0) {
					_temp.start = 0.200;
				}
				_temp.text = lines[_i16].innerHTML.trim().replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_| !:, .; ]*[-A-Z0-9+&@#\/%=~_|])/ig, "<a href='$1' target='_blank'>$1</a>");
				entries.push(_temp);
			}
			return entries;
		}
	}
};

},{"16":16,"2":2,"26":26,"27":27,"30":30,"5":5,"7":7}],14:[function(_dereq_,module,exports){
'use strict';

var _document = _dereq_(2);

var _document2 = _interopRequireDefault(_document);

var _player = _dereq_(16);

var _player2 = _interopRequireDefault(_player);

var _i18n = _dereq_(5);

var _i18n2 = _interopRequireDefault(_i18n);

var _constants = _dereq_(25);

var _general = _dereq_(27);

var _dom = _dereq_(26);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

Object.assign(_player.config, {
	muteText: null,

	unmuteText: null,

	allyVolumeControlText: null,

	hideVolumeOnTouchDevices: true,

	audioVolume: 'horizontal',

	videoVolume: 'vertical',

	startVolume: 0.8
});

Object.assign(_player2.default.prototype, {
	buildvolume: function buildvolume(player, controls, layers, media) {
		if ((_constants.IS_ANDROID || _constants.IS_IOS) && this.options.hideVolumeOnTouchDevices) {
			return;
		}

		var t = this,
		    mode = t.isVideo ? t.options.videoVolume : t.options.audioVolume,
		    muteText = (0, _general.isString)(t.options.muteText) ? t.options.muteText : _i18n2.default.t('mejs.mute'),
		    unmuteText = (0, _general.isString)(t.options.unmuteText) ? t.options.unmuteText : _i18n2.default.t('mejs.unmute'),
		    volumeControlText = (0, _general.isString)(t.options.allyVolumeControlText) ? t.options.allyVolumeControlText : _i18n2.default.t('mejs.volume-help-text'),
		    mute = _document2.default.createElement('div');

		mute.className = t.options.classPrefix + 'button ' + t.options.classPrefix + 'volume-button ' + t.options.classPrefix + 'mute';
		mute.innerHTML = mode === 'horizontal' ? '<button type="button" aria-controls="' + t.id + '" title="' + muteText + '" aria-label="' + muteText + '" tabindex="0"></button>' : '<button type="button" aria-controls="' + t.id + '" title="' + muteText + '" aria-label="' + muteText + '" tabindex="0"></button>' + ('<a href="javascript:void(0);" class="' + t.options.classPrefix + 'volume-slider" ') + ('aria-label="' + _i18n2.default.t('mejs.volume-slider') + '" aria-valuemin="0" aria-valuemax="100" role="slider" ') + 'aria-orientation="vertical">' + ('<span class="' + t.options.classPrefix + 'offscreen">' + volumeControlText + '</span>') + ('<div class="' + t.options.classPrefix + 'volume-total">') + ('<div class="' + t.options.classPrefix + 'volume-current"></div>') + ('<div class="' + t.options.classPrefix + 'volume-handle"></div>') + '</div>' + '</a>';

		t.addControlElement(mute, 'volume');

		t.options.keyActions.push({
			keys: [38],
			action: function action(player) {
				var volumeSlider = player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'volume-slider');
				if (volumeSlider && volumeSlider.matches(':focus')) {
					volumeSlider.style.display = 'block';
				}
				if (player.isVideo) {
					player.showControls();
					player.startControlsTimer();
				}

				var newVolume = Math.min(player.volume + 0.1, 1);
				player.setVolume(newVolume);
				if (newVolume > 0) {
					player.setMuted(false);
				}
			}
		}, {
			keys: [40],
			action: function action(player) {
				var volumeSlider = player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'volume-slider');
				if (volumeSlider) {
					volumeSlider.style.display = 'block';
				}

				if (player.isVideo) {
					player.showControls();
					player.startControlsTimer();
				}

				var newVolume = Math.max(player.volume - 0.1, 0);
				player.setVolume(newVolume);

				if (newVolume <= 0.1) {
					player.setMuted(true);
				}
			}
		}, {
			keys: [77],
			action: function action(player) {
				var volumeSlider = player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'volume-slider');
				if (volumeSlider) {
					volumeSlider.style.display = 'block';
				}

				if (player.isVideo) {
					player.showControls();
					player.startControlsTimer();
				}
				if (player.media.muted) {
					player.setMuted(false);
				} else {
					player.setMuted(true);
				}
			}
		});

		if (mode === 'horizontal') {
			var anchor = _document2.default.createElement('a');
			anchor.className = t.options.classPrefix + 'horizontal-volume-slider';
			anchor.href = 'javascript:void(0);';
			anchor.setAttribute('aria-label', _i18n2.default.t('mejs.volume-slider'));
			anchor.setAttribute('aria-valuemin', 0);
			anchor.setAttribute('aria-valuemax', 100);
			anchor.setAttribute('aria-valuenow', 100);
			anchor.setAttribute('role', 'slider');
			anchor.innerHTML += '<span class="' + t.options.classPrefix + 'offscreen">' + volumeControlText + '</span>' + ('<div class="' + t.options.classPrefix + 'horizontal-volume-total">') + ('<div class="' + t.options.classPrefix + 'horizontal-volume-current"></div>') + ('<div class="' + t.options.classPrefix + 'horizontal-volume-handle"></div>') + '</div>';
			mute.parentNode.insertBefore(anchor, mute.nextSibling);
		}

		var mouseIsDown = false,
		    mouseIsOver = false,
		    modified = false,
		    updateVolumeSlider = function updateVolumeSlider() {
			var volume = Math.floor(media.volume * 100);
			volumeSlider.setAttribute('aria-valuenow', volume);
			volumeSlider.setAttribute('aria-valuetext', volume + '%');
		};

		var volumeSlider = mode === 'vertical' ? t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'volume-slider') : t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'horizontal-volume-slider'),
		    volumeTotal = mode === 'vertical' ? t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'volume-total') : t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'horizontal-volume-total'),
		    volumeCurrent = mode === 'vertical' ? t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'volume-current') : t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'horizontal-volume-current'),
		    volumeHandle = mode === 'vertical' ? t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'volume-handle') : t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'horizontal-volume-handle'),
		    positionVolumeHandle = function positionVolumeHandle(volume) {

			if (volume === null || isNaN(volume) || volume === undefined) {
				return;
			}

			volume = Math.max(0, volume);
			volume = Math.min(volume, 1);

			if (volume === 0) {
				(0, _dom.removeClass)(mute, t.options.classPrefix + 'mute');
				(0, _dom.addClass)(mute, t.options.classPrefix + 'unmute');
				var button = mute.firstElementChild;
				button.setAttribute('title', unmuteText);
				button.setAttribute('aria-label', unmuteText);
			} else {
				(0, _dom.removeClass)(mute, t.options.classPrefix + 'unmute');
				(0, _dom.addClass)(mute, t.options.classPrefix + 'mute');
				var _button = mute.firstElementChild;
				_button.setAttribute('title', muteText);
				_button.setAttribute('aria-label', muteText);
			}

			var volumePercentage = volume * 100 + '%',
			    volumeStyles = getComputedStyle(volumeHandle);

			if (mode === 'vertical') {
				volumeCurrent.style.bottom = 0;
				volumeCurrent.style.height = volumePercentage;
				volumeHandle.style.bottom = volumePercentage;
				volumeHandle.style.marginBottom = -parseFloat(volumeStyles.height) / 2 + 'px';
			} else {
				volumeCurrent.style.left = 0;
				volumeCurrent.style.width = volumePercentage;
				volumeHandle.style.left = volumePercentage;
				volumeHandle.style.marginLeft = -parseFloat(volumeStyles.width) / 2 + 'px';
			}
		},
		    handleVolumeMove = function handleVolumeMove(e) {
			var totalOffset = (0, _dom.offset)(volumeTotal),
			    volumeStyles = getComputedStyle(volumeTotal);

			modified = true;

			var volume = null;

			if (mode === 'vertical') {
				var railHeight = parseFloat(volumeStyles.height),
				    newY = e.pageY - totalOffset.top;

				volume = (railHeight - newY) / railHeight;

				if (totalOffset.top === 0 || totalOffset.left === 0) {
					return;
				}
			} else {
				var railWidth = parseFloat(volumeStyles.width),
				    newX = e.pageX - totalOffset.left;

				volume = newX / railWidth;
			}

			volume = Math.max(0, volume);
			volume = Math.min(volume, 1);

			positionVolumeHandle(volume);

			t.setMuted(volume === 0);
			t.setVolume(volume);

			e.preventDefault();
			e.stopPropagation();
		},
		    toggleMute = function toggleMute() {
			if (t.muted) {
				positionVolumeHandle(0);
				(0, _dom.removeClass)(mute, t.options.classPrefix + 'mute');
				(0, _dom.addClass)(mute, t.options.classPrefix + 'unmute');
			} else {

				positionVolumeHandle(media.volume);
				(0, _dom.removeClass)(mute, t.options.classPrefix + 'unmute');
				(0, _dom.addClass)(mute, t.options.classPrefix + 'mute');
			}
		};

		player.getElement(player.container).addEventListener('keydown', function (e) {
			var hasFocus = !!e.target.closest('.' + t.options.classPrefix + 'container');
			if (!hasFocus && mode === 'vertical') {
				volumeSlider.style.display = 'none';
			}
		});

		mute.addEventListener('mouseenter', function (e) {
			if (e.target === mute) {
				volumeSlider.style.display = 'block';
				mouseIsOver = true;
				e.preventDefault();
				e.stopPropagation();
			}
		});
		mute.addEventListener('focusin', function () {
			volumeSlider.style.display = 'block';
			mouseIsOver = true;
		});

		mute.addEventListener('focusout', function (e) {
			if ((!e.relatedTarget || e.relatedTarget && !e.relatedTarget.matches('.' + t.options.classPrefix + 'volume-slider')) && mode === 'vertical') {
				volumeSlider.style.display = 'none';
			}
		});
		mute.addEventListener('mouseleave', function () {
			mouseIsOver = false;
			if (!mouseIsDown && mode === 'vertical') {
				volumeSlider.style.display = 'none';
			}
		});
		mute.addEventListener('focusout', function () {
			mouseIsOver = false;
		});
		mute.addEventListener('keydown', function (e) {
			if (t.options.enableKeyboard && t.options.keyActions.length) {
				var keyCode = e.which || e.keyCode || 0,
				    volume = media.volume;

				switch (keyCode) {
					case 38:
						volume = Math.min(volume + 0.1, 1);
						break;
					case 40:
						volume = Math.max(0, volume - 0.1);
						break;
					default:
						return true;
				}

				mouseIsDown = false;
				positionVolumeHandle(volume);
				media.setVolume(volume);

				e.preventDefault();
				e.stopPropagation();
			}
		});
		mute.querySelector('button').addEventListener('click', function () {
			media.setMuted(!media.muted);
			var event = (0, _general.createEvent)('volumechange', media);
			media.dispatchEvent(event);
		});

		volumeSlider.addEventListener('dragstart', function () {
			return false;
		});

		volumeSlider.addEventListener('mouseover', function () {
			mouseIsOver = true;
		});
		volumeSlider.addEventListener('focusin', function () {
			volumeSlider.style.display = 'block';
			mouseIsOver = true;
		});
		volumeSlider.addEventListener('focusout', function () {
			mouseIsOver = false;
			if (!mouseIsDown && mode === 'vertical') {
				volumeSlider.style.display = 'none';
			}
		});
		volumeSlider.addEventListener('mousedown', function (e) {
			handleVolumeMove(e);
			t.globalBind('mousemove.vol', function (event) {
				var target = event.target;
				if (mouseIsDown && (target === volumeSlider || target.closest(mode === 'vertical' ? '.' + t.options.classPrefix + 'volume-slider' : '.' + t.options.classPrefix + 'horizontal-volume-slider'))) {
					handleVolumeMove(event);
				}
			});
			t.globalBind('mouseup.vol', function () {
				mouseIsDown = false;
				if (!mouseIsOver && mode === 'vertical') {
					volumeSlider.style.display = 'none';
				}
			});
			mouseIsDown = true;
			e.preventDefault();
			e.stopPropagation();
		});

		media.addEventListener('volumechange', function (e) {
			if (!mouseIsDown) {
				toggleMute();
			}
			updateVolumeSlider(e);
		});

		var rendered = false;
		media.addEventListener('rendererready', function () {
			if (!modified) {
				setTimeout(function () {
					rendered = true;
					if (player.options.startVolume === 0 || media.originalNode.muted) {
						media.setMuted(true);
					}
					media.setVolume(player.options.startVolume);
					t.setControlsSize();
				}, 250);
			}
		});

		media.addEventListener('loadedmetadata', function () {
			setTimeout(function () {
				if (!modified && !rendered) {
					if (player.options.startVolume === 0 || media.originalNode.muted) {
						media.setMuted(true);
					}
					if (player.options.startVolume === 0) {
						player.options.startVolume = 0;
					}
					media.setVolume(player.options.startVolume);
					t.setControlsSize();
				}
				rendered = false;
			}, 250);
		});

		if (player.options.startVolume === 0 || media.originalNode.muted) {
			media.setMuted(true);
			if (player.options.startVolume === 0) {
				player.options.startVolume = 0;
			}
			toggleMute();
		}

		t.getElement(t.container).addEventListener('controlsresize', function () {
			toggleMute();
		});
	}
});

},{"16":16,"2":2,"25":25,"26":26,"27":27,"5":5}],15:[function(_dereq_,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});
var EN = exports.EN = {
	'mejs.plural-form': 1,

	'mejs.download-file': 'Download File',

	'mejs.install-flash': 'You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/',

	'mejs.fullscreen': 'Fullscreen',

	'mejs.play': 'Play',
	'mejs.pause': 'Pause',

	'mejs.time-slider': 'Time Slider',
	'mejs.time-help-text': 'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.',
	'mejs.live-broadcast': 'Live Broadcast',

	'mejs.volume-help-text': 'Use Up/Down Arrow keys to increase or decrease volume.',
	'mejs.unmute': 'Unmute',
	'mejs.mute': 'Mute',
	'mejs.volume-slider': 'Volume Slider',

	'mejs.video-player': 'Video Player',
	'mejs.audio-player': 'Audio Player',

	'mejs.captions-subtitles': 'Captions/Subtitles',
	'mejs.captions-chapters': 'Chapters',
	'mejs.none': 'None',
	'mejs.afrikaans': 'Afrikaans',
	'mejs.albanian': 'Albanian',
	'mejs.arabic': 'Arabic',
	'mejs.belarusian': 'Belarusian',
	'mejs.bulgarian': 'Bulgarian',
	'mejs.catalan': 'Catalan',
	'mejs.chinese': 'Chinese',
	'mejs.chinese-simplified': 'Chinese (Simplified)',
	'mejs.chinese-traditional': 'Chinese (Traditional)',
	'mejs.croatian': 'Croatian',
	'mejs.czech': 'Czech',
	'mejs.danish': 'Danish',
	'mejs.dutch': 'Dutch',
	'mejs.english': 'English',
	'mejs.estonian': 'Estonian',
	'mejs.filipino': 'Filipino',
	'mejs.finnish': 'Finnish',
	'mejs.french': 'French',
	'mejs.galician': 'Galician',
	'mejs.german': 'German',
	'mejs.greek': 'Greek',
	'mejs.haitian-creole': 'Haitian Creole',
	'mejs.hebrew': 'Hebrew',
	'mejs.hindi': 'Hindi',
	'mejs.hungarian': 'Hungarian',
	'mejs.icelandic': 'Icelandic',
	'mejs.indonesian': 'Indonesian',
	'mejs.irish': 'Irish',
	'mejs.italian': 'Italian',
	'mejs.japanese': 'Japanese',
	'mejs.korean': 'Korean',
	'mejs.latvian': 'Latvian',
	'mejs.lithuanian': 'Lithuanian',
	'mejs.macedonian': 'Macedonian',
	'mejs.malay': 'Malay',
	'mejs.maltese': 'Maltese',
	'mejs.norwegian': 'Norwegian',
	'mejs.persian': 'Persian',
	'mejs.polish': 'Polish',
	'mejs.portuguese': 'Portuguese',
	'mejs.romanian': 'Romanian',
	'mejs.russian': 'Russian',
	'mejs.serbian': 'Serbian',
	'mejs.slovak': 'Slovak',
	'mejs.slovenian': 'Slovenian',
	'mejs.spanish': 'Spanish',
	'mejs.swahili': 'Swahili',
	'mejs.swedish': 'Swedish',
	'mejs.tagalog': 'Tagalog',
	'mejs.thai': 'Thai',
	'mejs.turkish': 'Turkish',
	'mejs.ukrainian': 'Ukrainian',
	'mejs.vietnamese': 'Vietnamese',
	'mejs.welsh': 'Welsh',
	'mejs.yiddish': 'Yiddish'
};

},{}],16:[function(_dereq_,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});
exports.config = undefined;

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _window = _dereq_(3);

var _window2 = _interopRequireDefault(_window);

var _document = _dereq_(2);

var _document2 = _interopRequireDefault(_document);

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

var _mediaelement = _dereq_(6);

var _mediaelement2 = _interopRequireDefault(_mediaelement);

var _default = _dereq_(17);

var _default2 = _interopRequireDefault(_default);

var _i18n = _dereq_(5);

var _i18n2 = _interopRequireDefault(_i18n);

var _constants = _dereq_(25);

var _general = _dereq_(27);

var _time = _dereq_(30);

var _media = _dereq_(28);

var _dom = _dereq_(26);

var dom = _interopRequireWildcard(_dom);

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

_mejs2.default.mepIndex = 0;

_mejs2.default.players = {};

var config = exports.config = {
	poster: '',

	showPosterWhenEnded: false,

	showPosterWhenPaused: false,

	defaultVideoWidth: 480,

	defaultVideoHeight: 270,

	videoWidth: -1,

	videoHeight: -1,

	defaultAudioWidth: 400,

	defaultAudioHeight: 40,

	defaultSeekBackwardInterval: function defaultSeekBackwardInterval(media) {
		return media.getDuration() * 0.05;
	},

	defaultSeekForwardInterval: function defaultSeekForwardInterval(media) {
		return media.getDuration() * 0.05;
	},

	setDimensions: true,

	audioWidth: -1,

	audioHeight: -1,

	loop: false,

	autoRewind: true,

	enableAutosize: true,

	timeFormat: '',

	alwaysShowHours: false,

	showTimecodeFrameCount: false,

	framesPerSecond: 25,

	alwaysShowControls: false,

	hideVideoControlsOnLoad: false,

	hideVideoControlsOnPause: false,

	clickToPlayPause: true,

	controlsTimeoutDefault: 1500,

	controlsTimeoutMouseEnter: 2500,

	controlsTimeoutMouseLeave: 1000,

	iPadUseNativeControls: false,

	iPhoneUseNativeControls: false,

	AndroidUseNativeControls: false,

	features: ['playpause', 'current', 'progress', 'duration', 'tracks', 'volume', 'fullscreen'],

	useDefaultControls: false,

	isVideo: true,

	stretching: 'auto',

	classPrefix: 'mejs__',

	enableKeyboard: true,

	pauseOtherPlayers: true,

	secondsDecimalLength: 0,

	customError: null,

	keyActions: [{
		keys: [32, 179],
		action: function action(player) {

			if (!_constants.IS_FIREFOX) {
				if (player.paused || player.ended) {
					player.play();
				} else {
					player.pause();
				}
			}
		}
	}]
};

_mejs2.default.MepDefaults = config;

var MediaElementPlayer = function () {
	function MediaElementPlayer(node, o) {
		_classCallCheck(this, MediaElementPlayer);

		var t = this,
		    element = typeof node === 'string' ? _document2.default.getElementById(node) : node;

		if (!(t instanceof MediaElementPlayer)) {
			return new MediaElementPlayer(element, o);
		}

		t.node = t.media = element;

		if (!t.node) {
			return;
		}

		if (t.media.player) {
			return t.media.player;
		}

		t.hasFocus = false;

		t.controlsAreVisible = true;

		t.controlsEnabled = true;

		t.controlsTimer = null;

		t.currentMediaTime = 0;

		t.proxy = null;

		if (o === undefined) {
			var options = t.node.getAttribute('data-mejsoptions');
			o = options ? JSON.parse(options) : {};
		}

		t.options = Object.assign({}, config, o);

		if (t.options.loop && !t.media.getAttribute('loop')) {
			t.media.loop = true;
			t.node.loop = true;
		} else if (t.media.loop) {
			t.options.loop = true;
		}

		if (!t.options.timeFormat) {
			t.options.timeFormat = 'mm:ss';
			if (t.options.alwaysShowHours) {
				t.options.timeFormat = 'hh:mm:ss';
			}
			if (t.options.showTimecodeFrameCount) {
				t.options.timeFormat += ':ff';
			}
		}

		(0, _time.calculateTimeFormat)(0, t.options, t.options.framesPerSecond || 25);

		t.id = 'mep_' + _mejs2.default.mepIndex++;

		_mejs2.default.players[t.id] = t;

		t.init();

		return t;
	}

	_createClass(MediaElementPlayer, [{
		key: 'getElement',
		value: function getElement(element) {
			return element;
		}
	}, {
		key: 'init',
		value: function init() {
			var t = this,
			    playerOptions = Object.assign({}, t.options, {
				success: function success(media, domNode) {
					t._meReady(media, domNode);
				},
				error: function error(e) {
					t._handleError(e);
				}
			}),
			    tagName = t.node.tagName.toLowerCase();

			t.isDynamic = tagName !== 'audio' && tagName !== 'video' && tagName !== 'iframe';
			t.isVideo = t.isDynamic ? t.options.isVideo : tagName !== 'audio' && t.options.isVideo;
			t.mediaFiles = null;
			t.trackFiles = null;

			if (_constants.IS_IPAD && t.options.iPadUseNativeControls || _constants.IS_IPHONE && t.options.iPhoneUseNativeControls) {
				t.node.setAttribute('controls', true);

				if (_constants.IS_IPAD && t.node.getAttribute('autoplay')) {
					t.play();
				}
			} else if ((t.isVideo || !t.isVideo && (t.options.features.length || t.options.useDefaultControls)) && !(_constants.IS_ANDROID && t.options.AndroidUseNativeControls)) {
				t.node.removeAttribute('controls');
				var videoPlayerTitle = t.isVideo ? _i18n2.default.t('mejs.video-player') : _i18n2.default.t('mejs.audio-player');

				var offscreen = _document2.default.createElement('span');
				offscreen.className = t.options.classPrefix + 'offscreen';
				offscreen.innerText = videoPlayerTitle;
				t.media.parentNode.insertBefore(offscreen, t.media);

				t.container = _document2.default.createElement('div');
				t.getElement(t.container).id = t.id;
				t.getElement(t.container).className = t.options.classPrefix + 'container ' + t.options.classPrefix + 'container-keyboard-inactive ' + t.media.className;
				t.getElement(t.container).tabIndex = 0;
				t.getElement(t.container).setAttribute('role', 'application');
				t.getElement(t.container).setAttribute('aria-label', videoPlayerTitle);
				t.getElement(t.container).innerHTML = '<div class="' + t.options.classPrefix + 'inner">' + ('<div class="' + t.options.classPrefix + 'mediaelement"></div>') + ('<div class="' + t.options.classPrefix + 'layers"></div>') + ('<div class="' + t.options.classPrefix + 'controls"></div>') + '</div>';
				t.getElement(t.container).addEventListener('focus', function (e) {
					if (!t.controlsAreVisible && !t.hasFocus && t.controlsEnabled) {
						t.showControls(true);

						var btnSelector = (0, _general.isNodeAfter)(e.relatedTarget, t.getElement(t.container)) ? '.' + t.options.classPrefix + 'controls .' + t.options.classPrefix + 'button:last-child > button' : '.' + t.options.classPrefix + 'playpause-button > button',
						    button = t.getElement(t.container).querySelector(btnSelector);

						button.focus();
					}
				});
				t.node.parentNode.insertBefore(t.getElement(t.container), t.node);

				if (!t.options.features.length && !t.options.useDefaultControls) {
					t.getElement(t.container).style.background = 'transparent';
					t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'controls').style.display = 'none';
				}

				if (t.isVideo && t.options.stretching === 'fill' && !dom.hasClass(t.getElement(t.container).parentNode, t.options.classPrefix + 'fill-container')) {
					t.outerContainer = t.media.parentNode;

					var wrapper = _document2.default.createElement('div');
					wrapper.className = t.options.classPrefix + 'fill-container';
					t.getElement(t.container).parentNode.insertBefore(wrapper, t.getElement(t.container));
					wrapper.appendChild(t.getElement(t.container));
				}

				if (_constants.IS_ANDROID) {
					dom.addClass(t.getElement(t.container), t.options.classPrefix + 'android');
				}
				if (_constants.IS_IOS) {
					dom.addClass(t.getElement(t.container), t.options.classPrefix + 'ios');
				}
				if (_constants.IS_IPAD) {
					dom.addClass(t.getElement(t.container), t.options.classPrefix + 'ipad');
				}
				if (_constants.IS_IPHONE) {
					dom.addClass(t.getElement(t.container), t.options.classPrefix + 'iphone');
				}
				dom.addClass(t.getElement(t.container), t.isVideo ? t.options.classPrefix + 'video' : t.options.classPrefix + 'audio');

				t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'mediaelement').appendChild(t.node);

				t.media.player = t;

				t.controls = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'controls');
				t.layers = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'layers');

				var tagType = t.isVideo ? 'video' : 'audio',
				    capsTagName = tagType.substring(0, 1).toUpperCase() + tagType.substring(1);

				if (t.options[tagType + 'Width'] > 0 || t.options[tagType + 'Width'].toString().indexOf('%') > -1) {
					t.width = t.options[tagType + 'Width'];
				} else if (t.node.style.width !== '' && t.node.style.width !== null) {
					t.width = t.node.style.width;
				} else if (t.node.getAttribute('width')) {
					t.width = t.node.getAttribute('width');
				} else {
					t.width = t.options['default' + capsTagName + 'Width'];
				}

				if (t.options[tagType + 'Height'] > 0 || t.options[tagType + 'Height'].toString().indexOf('%') > -1) {
					t.height = t.options[tagType + 'Height'];
				} else if (t.node.style.height !== '' && t.node.style.height !== null) {
					t.height = t.node.style.height;
				} else if (t.node.getAttribute('height')) {
					t.height = t.node.getAttribute('height');
				} else {
					t.height = t.options['default' + capsTagName + 'Height'];
				}

				t.initialAspectRatio = t.height >= t.width ? t.width / t.height : t.height / t.width;

				t.setPlayerSize(t.width, t.height);

				playerOptions.pluginWidth = t.width;
				playerOptions.pluginHeight = t.height;
			} else if (!t.isVideo && !t.options.features.length && !t.options.useDefaultControls) {
					t.node.style.display = 'none';
				}

			_mejs2.default.MepDefaults = playerOptions;

			new _mediaelement2.default(t.media, playerOptions, t.mediaFiles);

			if (t.getElement(t.container) !== undefined && t.options.features.length && t.controlsAreVisible && !t.options.hideVideoControlsOnLoad) {
				var event = (0, _general.createEvent)('controlsshown', t.getElement(t.container));
				t.getElement(t.container).dispatchEvent(event);
			}
		}
	}, {
		key: 'showControls',
		value: function showControls(doAnimation) {
			var t = this;

			doAnimation = doAnimation === undefined || doAnimation;

			if (t.controlsAreVisible || !t.isVideo) {
				return;
			}

			if (doAnimation) {
				(function () {
					dom.fadeIn(t.getElement(t.controls), 200, function () {
						dom.removeClass(t.getElement(t.controls), t.options.classPrefix + 'offscreen');
						var event = (0, _general.createEvent)('controlsshown', t.getElement(t.container));
						t.getElement(t.container).dispatchEvent(event);
					});

					var controls = t.getElement(t.container).querySelectorAll('.' + t.options.classPrefix + 'control');

					var _loop = function _loop(i, total) {
						dom.fadeIn(controls[i], 200, function () {
							dom.removeClass(controls[i], t.options.classPrefix + 'offscreen');
						});
					};

					for (var i = 0, total = controls.length; i < total; i++) {
						_loop(i, total);
					}
				})();
			} else {
				dom.removeClass(t.getElement(t.controls), t.options.classPrefix + 'offscreen');
				t.getElement(t.controls).style.display = '';
				t.getElement(t.controls).style.opacity = 1;

				var controls = t.getElement(t.container).querySelectorAll('.' + t.options.classPrefix + 'control');
				for (var i = 0, total = controls.length; i < total; i++) {
					dom.removeClass(controls[i], t.options.classPrefix + 'offscreen');
					controls[i].style.display = '';
				}

				var event = (0, _general.createEvent)('controlsshown', t.getElement(t.container));
				t.getElement(t.container).dispatchEvent(event);
			}

			t.controlsAreVisible = true;
			t.setControlsSize();
		}
	}, {
		key: 'hideControls',
		value: function hideControls(doAnimation, forceHide) {
			var t = this;

			doAnimation = doAnimation === undefined || doAnimation;

			if (forceHide !== true && (!t.controlsAreVisible || t.options.alwaysShowControls || t.paused && t.readyState === 4 && (!t.options.hideVideoControlsOnLoad && t.currentTime <= 0 || !t.options.hideVideoControlsOnPause && t.currentTime > 0) || t.isVideo && !t.options.hideVideoControlsOnLoad && !t.readyState || t.ended)) {
				return;
			}

			if (doAnimation) {
				(function () {
					dom.fadeOut(t.getElement(t.controls), 200, function () {
						dom.addClass(t.getElement(t.controls), t.options.classPrefix + 'offscreen');
						t.getElement(t.controls).style.display = '';
						var event = (0, _general.createEvent)('controlshidden', t.getElement(t.container));
						t.getElement(t.container).dispatchEvent(event);
					});

					var controls = t.getElement(t.container).querySelectorAll('.' + t.options.classPrefix + 'control');

					var _loop2 = function _loop2(i, total) {
						dom.fadeOut(controls[i], 200, function () {
							dom.addClass(controls[i], t.options.classPrefix + 'offscreen');
							controls[i].style.display = '';
						});
					};

					for (var i = 0, total = controls.length; i < total; i++) {
						_loop2(i, total);
					}
				})();
			} else {
				dom.addClass(t.getElement(t.controls), t.options.classPrefix + 'offscreen');
				t.getElement(t.controls).style.display = '';
				t.getElement(t.controls).style.opacity = 0;

				var controls = t.getElement(t.container).querySelectorAll('.' + t.options.classPrefix + 'control');
				for (var i = 0, total = controls.length; i < total; i++) {
					dom.addClass(controls[i], t.options.classPrefix + 'offscreen');
					controls[i].style.display = '';
				}

				var event = (0, _general.createEvent)('controlshidden', t.getElement(t.container));
				t.getElement(t.container).dispatchEvent(event);
			}

			t.controlsAreVisible = false;
		}
	}, {
		key: 'startControlsTimer',
		value: function startControlsTimer(timeout) {
			var t = this;

			timeout = typeof timeout !== 'undefined' ? timeout : t.options.controlsTimeoutDefault;

			t.killControlsTimer('start');

			t.controlsTimer = setTimeout(function () {
				t.hideControls();
				t.killControlsTimer('hide');
			}, timeout);
		}
	}, {
		key: 'killControlsTimer',
		value: function killControlsTimer() {
			var t = this;

			if (t.controlsTimer !== null) {
				clearTimeout(t.controlsTimer);
				delete t.controlsTimer;
				t.controlsTimer = null;
			}
		}
	}, {
		key: 'disableControls',
		value: function disableControls() {
			var t = this;

			t.killControlsTimer();
			t.controlsEnabled = false;
			t.hideControls(false, true);
		}
	}, {
		key: 'enableControls',
		value: function enableControls() {
			var t = this;

			t.controlsEnabled = true;
			t.showControls(false);
		}
	}, {
		key: '_setDefaultPlayer',
		value: function _setDefaultPlayer() {
			var t = this;
			if (t.proxy) {
				t.proxy.pause();
			}
			t.proxy = new _default2.default(t);
			t.media.addEventListener('loadedmetadata', function () {
				if (t.getCurrentTime() > 0 && t.currentMediaTime > 0) {
					t.setCurrentTime(t.currentMediaTime);
					if (!_constants.IS_IOS && !_constants.IS_ANDROID) {
						t.play();
					}
				}
			});
		}
	}, {
		key: '_meReady',
		value: function _meReady(media, domNode) {
			var t = this,
			    autoplayAttr = domNode.getAttribute('autoplay'),
			    autoplay = !(autoplayAttr === undefined || autoplayAttr === null || autoplayAttr === 'false'),
			    isNative = media.rendererName !== null && /(native|html5)/i.test(media.rendererName);

			if (t.getElement(t.controls)) {
				t.enableControls();
			}

			if (t.getElement(t.container) && t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'overlay-play')) {
				t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'overlay-play').style.display = '';
			}

			if (t.created) {
				return;
			}

			t.created = true;
			t.media = media;
			t.domNode = domNode;

			if (!(_constants.IS_ANDROID && t.options.AndroidUseNativeControls) && !(_constants.IS_IPAD && t.options.iPadUseNativeControls) && !(_constants.IS_IPHONE && t.options.iPhoneUseNativeControls)) {
				if (!t.isVideo && !t.options.features.length && !t.options.useDefaultControls) {
					if (autoplay && isNative) {
						t.play();
					}

					if (t.options.success) {

						if (typeof t.options.success === 'string') {
							_window2.default[t.options.success](t.media, t.domNode, t);
						} else {
							t.options.success(t.media, t.domNode, t);
						}
					}

					return;
				}

				t.featurePosition = {};

				t._setDefaultPlayer();

				t.buildposter(t, t.getElement(t.controls), t.getElement(t.layers), t.media);
				t.buildkeyboard(t, t.getElement(t.controls), t.getElement(t.layers), t.media);
				t.buildoverlays(t, t.getElement(t.controls), t.getElement(t.layers), t.media);

				if (t.options.useDefaultControls) {
					var defaultControls = ['playpause', 'current', 'progress', 'duration', 'tracks', 'volume', 'fullscreen'];
					t.options.features = defaultControls.concat(t.options.features.filter(function (item) {
						return defaultControls.indexOf(item) === -1;
					}));
				}

				t.buildfeatures(t, t.getElement(t.controls), t.getElement(t.layers), t.media);

				var event = (0, _general.createEvent)('controlsready', t.getElement(t.container));
				t.getElement(t.container).dispatchEvent(event);

				t.setPlayerSize(t.width, t.height);
				t.setControlsSize();

				if (t.isVideo) {
					t.clickToPlayPauseCallback = function () {

						if (t.options.clickToPlayPause) {
							var button = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'overlay-button'),
							    pressed = button.getAttribute('aria-pressed');

							if (t.paused && pressed) {
								t.pause();
							} else if (t.paused) {
								t.play();
							} else {
								t.pause();
							}

							button.setAttribute('aria-pressed', !pressed);
							t.getElement(t.container).focus();
						}
					};

					t.createIframeLayer();

					t.media.addEventListener('click', t.clickToPlayPauseCallback);

					if ((_constants.IS_ANDROID || _constants.IS_IOS) && !t.options.alwaysShowControls) {
						t.node.addEventListener('touchstart', function () {
							if (t.controlsAreVisible) {
								t.hideControls(false);
							} else {
								if (t.controlsEnabled) {
									t.showControls(false);
								}
							}
						}, _constants.SUPPORT_PASSIVE_EVENT ? { passive: true } : false);
					} else {
						t.getElement(t.container).addEventListener('mouseenter', function () {
							if (t.controlsEnabled) {
								if (!t.options.alwaysShowControls) {
									t.killControlsTimer('enter');
									t.showControls();
									t.startControlsTimer(t.options.controlsTimeoutMouseEnter);
								}
							}
						});
						t.getElement(t.container).addEventListener('mousemove', function () {
							if (t.controlsEnabled) {
								if (!t.controlsAreVisible) {
									t.showControls();
								}
								if (!t.options.alwaysShowControls) {
									t.startControlsTimer(t.options.controlsTimeoutMouseEnter);
								}
							}
						});
						t.getElement(t.container).addEventListener('mouseleave', function () {
							if (t.controlsEnabled) {
								if (!t.paused && !t.options.alwaysShowControls) {
									t.startControlsTimer(t.options.controlsTimeoutMouseLeave);
								}
							}
						});
					}

					if (t.options.hideVideoControlsOnLoad) {
						t.hideControls(false);
					}

					if (t.options.enableAutosize) {
						t.media.addEventListener('loadedmetadata', function (e) {
							var target = e !== undefined ? e.detail.target || e.target : t.media;
							if (t.options.videoHeight <= 0 && !t.domNode.getAttribute('height') && !t.domNode.style.height && target !== null && !isNaN(target.videoHeight)) {
								t.setPlayerSize(target.videoWidth, target.videoHeight);
								t.setControlsSize();
								t.media.setSize(target.videoWidth, target.videoHeight);
							}
						});
					}
				}

				t.media.addEventListener('play', function () {
					t.hasFocus = true;

					for (var playerIndex in _mejs2.default.players) {
						if (_mejs2.default.players.hasOwnProperty(playerIndex)) {
							var p = _mejs2.default.players[playerIndex];

							if (p.id !== t.id && t.options.pauseOtherPlayers && !p.paused && !p.ended && p.options.ignorePauseOtherPlayersOption !== true) {
								p.pause();
								p.hasFocus = false;
							}
						}
					}

					if (!(_constants.IS_ANDROID || _constants.IS_IOS) && !t.options.alwaysShowControls && t.isVideo) {
						t.hideControls();
					}
				});

				t.media.addEventListener('ended', function () {
					if (t.options.autoRewind) {
						try {
							t.setCurrentTime(0);

							setTimeout(function () {
								var loadingElement = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'overlay-loading');
								if (loadingElement && loadingElement.parentNode) {
									loadingElement.parentNode.style.display = 'none';
								}
							}, 20);
						} catch (exp) {
							
						}
					}

					if (typeof t.media.renderer.stop === 'function') {
						t.media.renderer.stop();
					} else {
						t.pause();
					}

					if (t.setProgressRail) {
						t.setProgressRail();
					}
					if (t.setCurrentRail) {
						t.setCurrentRail();
					}

					if (t.options.loop) {
						t.play();
					} else if (!t.options.alwaysShowControls && t.controlsEnabled) {
						t.showControls();
					}
				});

				t.media.addEventListener('loadedmetadata', function () {

					(0, _time.calculateTimeFormat)(t.getDuration(), t.options, t.options.framesPerSecond || 25);

					if (t.updateDuration) {
						t.updateDuration();
					}
					if (t.updateCurrent) {
						t.updateCurrent();
					}

					if (!t.isFullScreen) {
						t.setPlayerSize(t.width, t.height);
						t.setControlsSize();
					}
				});

				var duration = null;
				t.media.addEventListener('timeupdate', function () {
					if (!isNaN(t.getDuration()) && duration !== t.getDuration()) {
						duration = t.getDuration();
						(0, _time.calculateTimeFormat)(duration, t.options, t.options.framesPerSecond || 25);

						if (t.updateDuration) {
							t.updateDuration();
						}
						if (t.updateCurrent) {
							t.updateCurrent();
						}

						t.setControlsSize();
					}
				});

				t.getElement(t.container).addEventListener('click', function (e) {
					dom.addClass(e.currentTarget, t.options.classPrefix + 'container-keyboard-inactive');
				});

				t.getElement(t.container).addEventListener('focusin', function (e) {
					dom.removeClass(e.currentTarget, t.options.classPrefix + 'container-keyboard-inactive');
					if (t.isVideo && !_constants.IS_ANDROID && !_constants.IS_IOS && t.controlsEnabled && !t.options.alwaysShowControls) {
						t.killControlsTimer('enter');
						t.showControls();
						t.startControlsTimer(t.options.controlsTimeoutMouseEnter);
					}
				});

				t.getElement(t.container).addEventListener('focusout', function (e) {
					setTimeout(function () {
						if (e.relatedTarget) {
							if (t.keyboardAction && !e.relatedTarget.closest('.' + t.options.classPrefix + 'container')) {
								t.keyboardAction = false;
								if (t.isVideo && !t.options.alwaysShowControls && !t.paused) {
									t.startControlsTimer(t.options.controlsTimeoutMouseLeave);
								}
							}
						}
					}, 0);
				});

				setTimeout(function () {
					t.setPlayerSize(t.width, t.height);
					t.setControlsSize();
				}, 0);

				t.globalResizeCallback = function () {
					if (!(t.isFullScreen || _constants.HAS_TRUE_NATIVE_FULLSCREEN && _document2.default.webkitIsFullScreen)) {
						t.setPlayerSize(t.width, t.height);
					}

					t.setControlsSize();
				};

				t.globalBind('resize', t.globalResizeCallback);
			}

			if (autoplay && isNative) {
				t.play();
			}

			if (t.options.success) {
				if (typeof t.options.success === 'string') {
					_window2.default[t.options.success](t.media, t.domNode, t);
				} else {
					t.options.success(t.media, t.domNode, t);
				}
			}
		}
	}, {
		key: '_handleError',
		value: function _handleError(e, media, node) {
			var t = this,
			    play = t.getElement(t.layers).querySelector('.' + t.options.classPrefix + 'overlay-play');

			if (play) {
				play.style.display = 'none';
			}

			if (t.options.error) {
				t.options.error(e, media, node);
			}

			if (t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'cannotplay')) {
				t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'cannotplay').remove();
			}

			var errorContainer = _document2.default.createElement('div');
			errorContainer.className = t.options.classPrefix + 'cannotplay';
			errorContainer.style.width = '100%';
			errorContainer.style.height = '100%';

			var errorContent = typeof t.options.customError === 'function' ? t.options.customError(t.media, t.media.originalNode) : t.options.customError,
			    imgError = '';

			if (!errorContent) {
				var poster = t.media.originalNode.getAttribute('poster');
				if (poster) {
					imgError = '<img src="' + poster + '" alt="' + _mejs2.default.i18n.t('mejs.download-file') + '">';
				}

				if (e.message) {
					errorContent = '<p>' + e.message + '</p>';
				}

				if (e.urls) {
					for (var i = 0, total = e.urls.length; i < total; i++) {
						var url = e.urls[i];
						errorContent += '<a href="' + url.src + '" data-type="' + url.type + '"><span>' + _mejs2.default.i18n.t('mejs.download-file') + ': ' + url.src + '</span></a>';
					}
				}
			}

			if (errorContent && t.getElement(t.layers).querySelector('.' + t.options.classPrefix + 'overlay-error')) {
				errorContainer.innerHTML = errorContent;
				t.getElement(t.layers).querySelector('.' + t.options.classPrefix + 'overlay-error').innerHTML = '' + imgError + errorContainer.outerHTML;
				t.getElement(t.layers).querySelector('.' + t.options.classPrefix + 'overlay-error').parentNode.style.display = 'block';
			}

			if (t.controlsEnabled) {
				t.disableControls();
			}
		}
	}, {
		key: 'setPlayerSize',
		value: function setPlayerSize(width, height) {
			var t = this;

			if (!t.options.setDimensions) {
				return false;
			}

			if (typeof width !== 'undefined') {
				t.width = width;
			}

			if (typeof height !== 'undefined') {
				t.height = height;
			}

			switch (t.options.stretching) {
				case 'fill':
					if (t.isVideo) {
						t.setFillMode();
					} else {
						t.setDimensions(t.width, t.height);
					}
					break;
				case 'responsive':
					t.setResponsiveMode();
					break;
				case 'none':
					t.setDimensions(t.width, t.height);
					break;

				default:
					if (t.hasFluidMode() === true) {
						t.setResponsiveMode();
					} else {
						t.setDimensions(t.width, t.height);
					}
					break;
			}
		}
	}, {
		key: 'hasFluidMode',
		value: function hasFluidMode() {
			var t = this;

			return t.height.toString().indexOf('%') !== -1 || t.node && t.node.style.maxWidth && t.node.style.maxWidth !== 'none' && t.node.style.maxWidth !== t.width || t.node && t.node.currentStyle && t.node.currentStyle.maxWidth === '100%';
		}
	}, {
		key: 'setResponsiveMode',
		value: function setResponsiveMode() {
			var t = this,
			    parent = function () {

				var parentEl = void 0,
				    el = t.getElement(t.container);

				while (el) {
					try {
						if (_constants.IS_FIREFOX && el.tagName.toLowerCase() === 'html' && _window2.default.self !== _window2.default.top && _window2.default.frameElement !== null) {
							return _window2.default.frameElement;
						} else {
							parentEl = el.parentElement;
						}
					} catch (e) {
						parentEl = el.parentElement;
					}

					if (parentEl && dom.visible(parentEl)) {
						return parentEl;
					}
					el = parentEl;
				}

				return null;
			}(),
			    parentStyles = parent ? getComputedStyle(parent, null) : getComputedStyle(_document2.default.body, null),
			    nativeWidth = function () {
				if (t.isVideo) {
					if (t.node.videoWidth && t.node.videoWidth > 0) {
						return t.node.videoWidth;
					} else if (t.node.getAttribute('width')) {
						return t.node.getAttribute('width');
					} else {
						return t.options.defaultVideoWidth;
					}
				} else {
					return t.options.defaultAudioWidth;
				}
			}(),
			    nativeHeight = function () {
				if (t.isVideo) {
					if (t.node.videoHeight && t.node.videoHeight > 0) {
						return t.node.videoHeight;
					} else if (t.node.getAttribute('height')) {
						return t.node.getAttribute('height');
					} else {
						return t.options.defaultVideoHeight;
					}
				} else {
					return t.options.defaultAudioHeight;
				}
			}(),
			    aspectRatio = function () {
				if (!t.options.enableAutosize) {
					return t.initialAspectRatio;
				}
				var ratio = 1;
				if (!t.isVideo) {
					return ratio;
				}

				if (t.node.videoWidth && t.node.videoWidth > 0 && t.node.videoHeight && t.node.videoHeight > 0) {
					ratio = t.height >= t.width ? t.node.videoWidth / t.node.videoHeight : t.node.videoHeight / t.node.videoWidth;
				} else {
					ratio = t.initialAspectRatio;
				}

				if (isNaN(ratio) || ratio < 0.01 || ratio > 100) {
					ratio = 1;
				}

				return ratio;
			}(),
			    parentHeight = parseFloat(parentStyles.height);

			var newHeight = void 0,
			    parentWidth = parseFloat(parentStyles.width);

			if (t.isVideo) {
				if (t.height === '100%') {
					newHeight = parseFloat(parentWidth * nativeHeight / nativeWidth, 10);
				} else {
					newHeight = t.height >= t.width ? parseFloat(parentWidth / aspectRatio, 10) : parseFloat(parentWidth * aspectRatio, 10);
				}
			} else {
				newHeight = nativeHeight;
			}

			if (isNaN(newHeight)) {
				newHeight = parentHeight;
			}

			if (t.getElement(t.container).parentNode.length > 0 && t.getElement(t.container).parentNode.tagName.toLowerCase() === 'body') {
				parentWidth = _window2.default.innerWidth || _document2.default.documentElement.clientWidth || _document2.default.body.clientWidth;
				newHeight = _window2.default.innerHeight || _document2.default.documentElement.clientHeight || _document2.default.body.clientHeight;
			}

			if (newHeight && parentWidth) {
				t.getElement(t.container).style.width = parentWidth + 'px';
				t.getElement(t.container).style.height = newHeight + 'px';

				t.node.style.width = '100%';
				t.node.style.height = '100%';

				if (t.isVideo && t.media.setSize) {
					t.media.setSize(parentWidth, newHeight);
				}

				var layerChildren = t.getElement(t.layers).children;
				for (var i = 0, total = layerChildren.length; i < total; i++) {
					layerChildren[i].style.width = '100%';
					layerChildren[i].style.height = '100%';
				}
			}
		}
	}, {
		key: 'setFillMode',
		value: function setFillMode() {
			var t = this;
			var isIframe = _window2.default.self !== _window2.default.top && _window2.default.frameElement !== null;
			var parent = function () {
				var parentEl = void 0,
				    el = t.getElement(t.container);

				while (el) {
					try {
						if (_constants.IS_FIREFOX && el.tagName.toLowerCase() === 'html' && _window2.default.self !== _window2.default.top && _window2.default.frameElement !== null) {
							return _window2.default.frameElement;
						} else {
							parentEl = el.parentElement;
						}
					} catch (e) {
						parentEl = el.parentElement;
					}

					if (parentEl && dom.visible(parentEl)) {
						return parentEl;
					}
					el = parentEl;
				}

				return null;
			}();
			var parentStyles = parent ? getComputedStyle(parent, null) : getComputedStyle(_document2.default.body, null);

			if (t.node.style.height !== 'none' && t.node.style.height !== t.height) {
				t.node.style.height = 'auto';
			}
			if (t.node.style.maxWidth !== 'none' && t.node.style.maxWidth !== t.width) {
				t.node.style.maxWidth = 'none';
			}

			if (t.node.style.maxHeight !== 'none' && t.node.style.maxHeight !== t.height) {
				t.node.style.maxHeight = 'none';
			}

			if (t.node.currentStyle) {
				if (t.node.currentStyle.height === '100%') {
					t.node.currentStyle.height = 'auto';
				}
				if (t.node.currentStyle.maxWidth === '100%') {
					t.node.currentStyle.maxWidth = 'none';
				}
				if (t.node.currentStyle.maxHeight === '100%') {
					t.node.currentStyle.maxHeight = 'none';
				}
			}

			if (!isIframe && !parseFloat(parentStyles.width)) {
				parent.style.width = t.media.offsetWidth + 'px';
			}

			if (!isIframe && !parseFloat(parentStyles.height)) {
				parent.style.height = t.media.offsetHeight + 'px';
			}

			parentStyles = getComputedStyle(parent);

			var parentWidth = parseFloat(parentStyles.width),
			    parentHeight = parseFloat(parentStyles.height);

			t.setDimensions('100%', '100%');

			var poster = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'poster>img');
			if (poster) {
				poster.style.display = '';
			}

			var targetElement = t.getElement(t.container).querySelectorAll('object, embed, iframe, video'),
			    initHeight = t.height,
			    initWidth = t.width,
			    scaleX1 = parentWidth,
			    scaleY1 = initHeight * parentWidth / initWidth,
			    scaleX2 = initWidth * parentHeight / initHeight,
			    scaleY2 = parentHeight,
			    bScaleOnWidth = scaleX2 > parentWidth === false,
			    finalWidth = bScaleOnWidth ? Math.floor(scaleX1) : Math.floor(scaleX2),
			    finalHeight = bScaleOnWidth ? Math.floor(scaleY1) : Math.floor(scaleY2),
			    width = bScaleOnWidth ? parentWidth + 'px' : finalWidth + 'px',
			    height = bScaleOnWidth ? finalHeight + 'px' : parentHeight + 'px';

			for (var i = 0, total = targetElement.length; i < total; i++) {
				targetElement[i].style.height = height;
				targetElement[i].style.width = width;
				if (t.media.setSize) {
					t.media.setSize(width, height);
				}

				targetElement[i].style.marginLeft = Math.floor((parentWidth - finalWidth) / 2) + 'px';
				targetElement[i].style.marginTop = 0;
			}
		}
	}, {
		key: 'setDimensions',
		value: function setDimensions(width, height) {
			var t = this;

			width = (0, _general.isString)(width) && width.indexOf('%') > -1 ? width : parseFloat(width) + 'px';
			height = (0, _general.isString)(height) && height.indexOf('%') > -1 ? height : parseFloat(height) + 'px';

			t.getElement(t.container).style.width = width;
			t.getElement(t.container).style.height = height;

			var layers = t.getElement(t.layers).children;
			for (var i = 0, total = layers.length; i < total; i++) {
				layers[i].style.width = width;
				layers[i].style.height = height;
			}
		}
	}, {
		key: 'setControlsSize',
		value: function setControlsSize() {
			var t = this;

			if (!dom.visible(t.getElement(t.container))) {
				return;
			}

			if (t.rail && dom.visible(t.rail)) {
				var totalStyles = t.total ? getComputedStyle(t.total, null) : null,
				    totalMargin = totalStyles ? parseFloat(totalStyles.marginLeft) + parseFloat(totalStyles.marginRight) : 0,
				    railStyles = getComputedStyle(t.rail),
				    railMargin = parseFloat(railStyles.marginLeft) + parseFloat(railStyles.marginRight);

				var siblingsWidth = 0;

				var siblings = dom.siblings(t.rail, function (el) {
					return el !== t.rail;
				}),
				    total = siblings.length;
				for (var i = 0; i < total; i++) {
					siblingsWidth += siblings[i].offsetWidth;
				}

				siblingsWidth += totalMargin + (totalMargin === 0 ? railMargin * 2 : railMargin) + 1;

				t.getElement(t.container).style.minWidth = siblingsWidth + 'px';

				var event = (0, _general.createEvent)('controlsresize', t.getElement(t.container));
				t.getElement(t.container).dispatchEvent(event);
			} else {
				var children = t.getElement(t.controls).children;
				var minWidth = 0;

				for (var _i = 0, _total = children.length; _i < _total; _i++) {
					minWidth += children[_i].offsetWidth;
				}

				t.getElement(t.container).style.minWidth = minWidth + 'px';
			}
		}
	}, {
		key: 'addControlElement',
		value: function addControlElement(element, key) {

			var t = this;

			if (t.featurePosition[key] !== undefined) {
				var child = t.getElement(t.controls).children[t.featurePosition[key] - 1];
				child.parentNode.insertBefore(element, child.nextSibling);
			} else {
				t.getElement(t.controls).appendChild(element);
				var children = t.getElement(t.controls).children;
				for (var i = 0, total = children.length; i < total; i++) {
					if (element === children[i]) {
						t.featurePosition[key] = i;
						break;
					}
				}
			}
		}
	}, {
		key: 'createIframeLayer',
		value: function createIframeLayer() {
			var t = this;

			if (t.isVideo && t.media.rendererName !== null && t.media.rendererName.indexOf('iframe') > -1 && !_document2.default.getElementById(t.media.id + '-iframe-overlay')) {

				var layer = _document2.default.createElement('div'),
				    target = _document2.default.getElementById(t.media.id + '_' + t.media.rendererName);

				layer.id = t.media.id + '-iframe-overlay';
				layer.className = t.options.classPrefix + 'iframe-overlay';
				layer.addEventListener('click', function (e) {
					if (t.options.clickToPlayPause) {
						if (t.paused) {
							t.play();
						} else {
							t.pause();
						}

						e.preventDefault();
						e.stopPropagation();
					}
				});

				target.parentNode.insertBefore(layer, target);
			}
		}
	}, {
		key: 'resetSize',
		value: function resetSize() {
			var t = this;

			setTimeout(function () {
				t.setPlayerSize(t.width, t.height);
				t.setControlsSize();
			}, 50);
		}
	}, {
		key: 'setPoster',
		value: function setPoster(url) {
			var t = this;

			if (t.getElement(t.container)) {
				var posterDiv = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'poster');

				if (!posterDiv) {
					posterDiv = _document2.default.createElement('div');
					posterDiv.className = t.options.classPrefix + 'poster ' + t.options.classPrefix + 'layer';
					t.getElement(t.layers).appendChild(posterDiv);
				}

				var posterImg = posterDiv.querySelector('img');

				if (!posterImg && url) {
					posterImg = _document2.default.createElement('img');
					posterImg.className = t.options.classPrefix + 'poster-img';
					posterImg.width = '100%';
					posterImg.height = '100%';
					posterDiv.style.display = '';
					posterDiv.appendChild(posterImg);
				}

				if (url) {
					posterImg.setAttribute('src', url);
					posterDiv.style.backgroundImage = 'url("' + url + '")';
					posterDiv.style.display = '';
				} else if (posterImg) {
					posterDiv.style.backgroundImage = 'none';
					posterDiv.style.display = 'none';
					posterImg.remove();
				} else {
					posterDiv.style.display = 'none';
				}
			} else if (_constants.IS_IPAD && t.options.iPadUseNativeControls || _constants.IS_IPHONE && t.options.iPhoneUseNativeControls || _constants.IS_ANDROID && t.options.AndroidUseNativeControls) {
				t.media.originalNode.poster = url;
			}
		}
	}, {
		key: 'changeSkin',
		value: function changeSkin(className) {
			var t = this;

			t.getElement(t.container).className = t.options.classPrefix + 'container ' + className;
			t.setPlayerSize(t.width, t.height);
			t.setControlsSize();
		}
	}, {
		key: 'globalBind',
		value: function globalBind(events, callback) {
			var t = this,
			    doc = t.node ? t.node.ownerDocument : _document2.default;

			events = (0, _general.splitEvents)(events, t.id);
			if (events.d) {
				var eventList = events.d.split(' ');
				for (var i = 0, total = eventList.length; i < total; i++) {
					eventList[i].split('.').reduce(function (part, e) {
						doc.addEventListener(e, callback, false);
						return e;
					}, '');
				}
			}
			if (events.w) {
				var _eventList = events.w.split(' ');
				for (var _i2 = 0, _total2 = _eventList.length; _i2 < _total2; _i2++) {
					_eventList[_i2].split('.').reduce(function (part, e) {
						_window2.default.addEventListener(e, callback, false);
						return e;
					}, '');
				}
			}
		}
	}, {
		key: 'globalUnbind',
		value: function globalUnbind(events, callback) {
			var t = this,
			    doc = t.node ? t.node.ownerDocument : _document2.default;

			events = (0, _general.splitEvents)(events, t.id);
			if (events.d) {
				var eventList = events.d.split(' ');
				for (var i = 0, total = eventList.length; i < total; i++) {
					eventList[i].split('.').reduce(function (part, e) {
						doc.removeEventListener(e, callback, false);
						return e;
					}, '');
				}
			}
			if (events.w) {
				var _eventList2 = events.w.split(' ');
				for (var _i3 = 0, _total3 = _eventList2.length; _i3 < _total3; _i3++) {
					_eventList2[_i3].split('.').reduce(function (part, e) {
						_window2.default.removeEventListener(e, callback, false);
						return e;
					}, '');
				}
			}
		}
	}, {
		key: 'buildfeatures',
		value: function buildfeatures(player, controls, layers, media) {
			var t = this;

			for (var i = 0, total = t.options.features.length; i < total; i++) {
				var feature = t.options.features[i];
				if (t['build' + feature]) {
					try {
						t['build' + feature](player, controls, layers, media);
					} catch (e) {
						console.error('error building ' + feature, e);
					}
				}
			}
		}
	}, {
		key: 'buildposter',
		value: function buildposter(player, controls, layers, media) {
			var t = this,
			    poster = _document2.default.createElement('div');

			poster.className = t.options.classPrefix + 'poster ' + t.options.classPrefix + 'layer';
			layers.appendChild(poster);

			var posterUrl = media.originalNode.getAttribute('poster');

			if (player.options.poster !== '') {
				if (posterUrl && _constants.IS_IOS) {
					media.originalNode.removeAttribute('poster');
				}
				posterUrl = player.options.poster;
			}

			if (posterUrl) {
				t.setPoster(posterUrl);
			} else if (t.media.renderer !== null && typeof t.media.renderer.getPosterUrl === 'function') {
				t.setPoster(t.media.renderer.getPosterUrl());
			} else {
				poster.style.display = 'none';
			}

			media.addEventListener('play', function () {
				poster.style.display = 'none';
			});

			media.addEventListener('playing', function () {
				poster.style.display = 'none';
			});

			if (player.options.showPosterWhenEnded && player.options.autoRewind) {
				media.addEventListener('ended', function () {
					poster.style.display = '';
				});
			}

			media.addEventListener('error', function () {
				poster.style.display = 'none';
			});

			if (player.options.showPosterWhenPaused) {
				media.addEventListener('pause', function () {
					if (!player.ended) {
						poster.style.display = '';
					}
				});
			}
		}
	}, {
		key: 'buildoverlays',
		value: function buildoverlays(player, controls, layers, media) {

			if (!player.isVideo) {
				return;
			}

			var t = this,
			    loading = _document2.default.createElement('div'),
			    error = _document2.default.createElement('div'),
			    bigPlay = _document2.default.createElement('div');

			loading.style.display = 'none';
			loading.className = t.options.classPrefix + 'overlay ' + t.options.classPrefix + 'layer';
			loading.innerHTML = '<div class="' + t.options.classPrefix + 'overlay-loading">' + ('<span class="' + t.options.classPrefix + 'overlay-loading-bg-img"></span>') + '</div>';
			layers.appendChild(loading);

			error.style.display = 'none';
			error.className = t.options.classPrefix + 'overlay ' + t.options.classPrefix + 'layer';
			error.innerHTML = '<div class="' + t.options.classPrefix + 'overlay-error"></div>';
			layers.appendChild(error);

			bigPlay.className = t.options.classPrefix + 'overlay ' + t.options.classPrefix + 'layer ' + t.options.classPrefix + 'overlay-play';
			bigPlay.innerHTML = '<div class="' + t.options.classPrefix + 'overlay-button" role="button" tabindex="0" ' + ('aria-label="' + _i18n2.default.t('mejs.play') + '" aria-pressed="false"></div>');
			bigPlay.addEventListener('click', function () {
				if (t.options.clickToPlayPause) {

					var button = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'overlay-button'),
					    pressed = button.getAttribute('aria-pressed');

					if (t.paused) {
						t.play();
					} else {
						t.pause();
					}

					button.setAttribute('aria-pressed', !!pressed);
					t.getElement(t.container).focus();
				}
			});

			bigPlay.addEventListener('keydown', function (e) {
				var keyPressed = e.keyCode || e.which || 0;

				if (keyPressed === 13 || _constants.IS_FIREFOX && keyPressed === 32) {
					var event = (0, _general.createEvent)('click', bigPlay);
					bigPlay.dispatchEvent(event);
					return false;
				}
			});

			layers.appendChild(bigPlay);

			if (t.media.rendererName !== null && (/(youtube|facebook)/i.test(t.media.rendererName) && !(t.media.originalNode.getAttribute('poster') || player.options.poster || typeof t.media.renderer.getPosterUrl === 'function' && t.media.renderer.getPosterUrl()) || _constants.IS_STOCK_ANDROID || t.media.originalNode.getAttribute('autoplay'))) {
				bigPlay.style.display = 'none';
			}

			var hasError = false;

			media.addEventListener('play', function () {
				bigPlay.style.display = 'none';
				loading.style.display = 'none';
				error.style.display = 'none';
				hasError = false;
			});
			media.addEventListener('playing', function () {
				bigPlay.style.display = 'none';
				loading.style.display = 'none';
				error.style.display = 'none';
				hasError = false;
			});
			media.addEventListener('seeking', function () {
				bigPlay.style.display = 'none';
				loading.style.display = '';
				hasError = false;
			});
			media.addEventListener('seeked', function () {
				bigPlay.style.display = t.paused && !_constants.IS_STOCK_ANDROID ? '' : 'none';
				loading.style.display = 'none';
				hasError = false;
			});
			media.addEventListener('pause', function () {
				loading.style.display = 'none';
				if (!_constants.IS_STOCK_ANDROID && !hasError) {
					bigPlay.style.display = '';
				}
				hasError = false;
			});
			media.addEventListener('waiting', function () {
				loading.style.display = '';
				hasError = false;
			});

			media.addEventListener('loadeddata', function () {
				loading.style.display = '';

				if (_constants.IS_ANDROID) {
					media.canplayTimeout = setTimeout(function () {
						if (_document2.default.createEvent) {
							var evt = _document2.default.createEvent('HTMLEvents');
							evt.initEvent('canplay', true, true);
							return media.dispatchEvent(evt);
						}
					}, 300);
				}
				hasError = false;
			});
			media.addEventListener('canplay', function () {
				loading.style.display = 'none';

				clearTimeout(media.canplayTimeout);
				hasError = false;
			});

			media.addEventListener('error', function (e) {
				t._handleError(e, t.media, t.node);
				loading.style.display = 'none';
				bigPlay.style.display = 'none';
				hasError = true;
			});

			media.addEventListener('loadedmetadata', function () {
				if (!t.controlsEnabled) {
					t.enableControls();
				}
			});

			media.addEventListener('keydown', function (e) {
				t.onkeydown(player, media, e);
				hasError = false;
			});
		}
	}, {
		key: 'buildkeyboard',
		value: function buildkeyboard(player, controls, layers, media) {

			var t = this;

			t.getElement(t.container).addEventListener('keydown', function () {
				t.keyboardAction = true;
			});

			t.globalKeydownCallback = function (event) {
				var container = _document2.default.activeElement.closest('.' + t.options.classPrefix + 'container'),
				    target = t.media.closest('.' + t.options.classPrefix + 'container');
				t.hasFocus = !!(container && target && container.id === target.id);
				return t.onkeydown(player, media, event);
			};

			t.globalClickCallback = function (event) {
				t.hasFocus = !!event.target.closest('.' + t.options.classPrefix + 'container');
			};

			t.globalBind('keydown', t.globalKeydownCallback);

			t.globalBind('click', t.globalClickCallback);
		}
	}, {
		key: 'onkeydown',
		value: function onkeydown(player, media, e) {

			if (player.hasFocus && player.options.enableKeyboard) {
				for (var i = 0, total = player.options.keyActions.length; i < total; i++) {
					var keyAction = player.options.keyActions[i];

					for (var j = 0, jl = keyAction.keys.length; j < jl; j++) {
						if (e.keyCode === keyAction.keys[j]) {
							keyAction.action(player, media, e.keyCode, e);
							e.preventDefault();
							e.stopPropagation();
							return;
						}
					}
				}
			}

			return true;
		}
	}, {
		key: 'play',
		value: function play() {
			this.proxy.play();
		}
	}, {
		key: 'pause',
		value: function pause() {
			this.proxy.pause();
		}
	}, {
		key: 'load',
		value: function load() {
			this.proxy.load();
		}
	}, {
		key: 'setCurrentTime',
		value: function setCurrentTime(time) {
			this.proxy.setCurrentTime(time);
		}
	}, {
		key: 'getCurrentTime',
		value: function getCurrentTime() {
			return this.proxy.currentTime;
		}
	}, {
		key: 'getDuration',
		value: function getDuration() {
			return this.proxy.duration;
		}
	}, {
		key: 'setVolume',
		value: function setVolume(volume) {
			this.proxy.volume = volume;
		}
	}, {
		key: 'getVolume',
		value: function getVolume() {
			return this.proxy.getVolume();
		}
	}, {
		key: 'setMuted',
		value: function setMuted(value) {
			this.proxy.setMuted(value);
		}
	}, {
		key: 'setSrc',
		value: function setSrc(src) {
			if (!this.controlsEnabled) {
				this.enableControls();
			}
			this.proxy.setSrc(src);
		}
	}, {
		key: 'getSrc',
		value: function getSrc() {
			return this.proxy.getSrc();
		}
	}, {
		key: 'canPlayType',
		value: function canPlayType(type) {
			return this.proxy.canPlayType(type);
		}
	}, {
		key: 'remove',
		value: function remove() {
			var t = this,
			    rendererName = t.media.rendererName,
			    src = t.media.originalNode.src;

			for (var featureIndex in t.options.features) {
				var feature = t.options.features[featureIndex];
				if (t['clean' + feature]) {
					try {
						t['clean' + feature](t, t.getElement(t.layers), t.getElement(t.controls), t.media);
					} catch (e) {
						console.error('error cleaning ' + feature, e);
					}
				}
			}

			var nativeWidth = t.node.getAttribute('width'),
			    nativeHeight = t.node.getAttribute('height');

			if (nativeWidth) {
				if (nativeWidth.indexOf('%') === -1) {
					nativeWidth = nativeWidth + 'px';
				}
			} else {
				nativeWidth = 'auto';
			}

			if (nativeHeight) {
				if (nativeHeight.indexOf('%') === -1) {
					nativeHeight = nativeHeight + 'px';
				}
			} else {
				nativeHeight = 'auto';
			}

			t.node.style.width = nativeWidth;
			t.node.style.height = nativeHeight;

			t.setPlayerSize(0, 0);

			if (!t.isDynamic) {
				(function () {
					t.node.setAttribute('controls', true);
					t.node.setAttribute('id', t.node.getAttribute('id').replace('_' + rendererName, '').replace('_from_mejs', ''));
					var poster = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'poster>img');
					if (poster) {
						t.node.setAttribute('poster', poster.src);
					}

					delete t.node.autoplay;

					t.node.setAttribute('src', '');
					if (t.media.canPlayType((0, _media.getTypeFromFile)(src)) !== '') {
						t.node.setAttribute('src', src);
					}

					if (rendererName && rendererName.indexOf('iframe') > -1) {
						var layer = _document2.default.getElementById(t.media.id + '-iframe-overlay');
						layer.remove();
					}

					var node = t.node.cloneNode();
					node.style.display = '';
					t.getElement(t.container).parentNode.insertBefore(node, t.getElement(t.container));
					t.node.remove();

					if (t.mediaFiles) {
						for (var i = 0, total = t.mediaFiles.length; i < total; i++) {
							var source = _document2.default.createElement('source');
							source.setAttribute('src', t.mediaFiles[i].src);
							source.setAttribute('type', t.mediaFiles[i].type);
							node.appendChild(source);
						}
					}
					if (t.trackFiles) {
						var _loop3 = function _loop3(_i4, _total4) {
							var track = t.trackFiles[_i4];
							var newTrack = _document2.default.createElement('track');
							newTrack.kind = track.kind;
							newTrack.label = track.label;
							newTrack.srclang = track.srclang;
							newTrack.src = track.src;

							node.appendChild(newTrack);
							newTrack.addEventListener('load', function () {
								this.mode = 'showing';
								node.textTracks[_i4].mode = 'showing';
							});
						};

						for (var _i4 = 0, _total4 = t.trackFiles.length; _i4 < _total4; _i4++) {
							_loop3(_i4, _total4);
						}
					}

					delete t.node;
					delete t.mediaFiles;
					delete t.trackFiles;
				})();
			} else {
				t.getElement(t.container).parentNode.insertBefore(t.node, t.getElement(t.container));
			}

			if (t.media.renderer && typeof t.media.renderer.destroy === 'function') {
				t.media.renderer.destroy();
			}

			delete _mejs2.default.players[t.id];

			if (_typeof(t.getElement(t.container)) === 'object') {
				var offscreen = t.getElement(t.container).parentNode.querySelector('.' + t.options.classPrefix + 'offscreen');
				if (offscreen) {
					offscreen.remove();
				}
				t.getElement(t.container).remove();
			}
			t.globalUnbind('resize', t.globalResizeCallback);
			t.globalUnbind('keydown', t.globalKeydownCallback);
			t.globalUnbind('click', t.globalClickCallback);

			delete t.media.player;
		}
	}, {
		key: 'paused',
		get: function get() {
			return this.proxy.paused;
		}
	}, {
		key: 'muted',
		get: function get() {
			return this.proxy.muted;
		},
		set: function set(muted) {
			this.setMuted(muted);
		}
	}, {
		key: 'ended',
		get: function get() {
			return this.proxy.ended;
		}
	}, {
		key: 'readyState',
		get: function get() {
			return this.proxy.readyState;
		}
	}, {
		key: 'currentTime',
		set: function set(time) {
			this.setCurrentTime(time);
		},
		get: function get() {
			return this.getCurrentTime();
		}
	}, {
		key: 'duration',
		get: function get() {
			return this.getDuration();
		}
	}, {
		key: 'volume',
		set: function set(volume) {
			this.setVolume(volume);
		},
		get: function get() {
			return this.getVolume();
		}
	}, {
		key: 'src',
		set: function set(src) {
			this.setSrc(src);
		},
		get: function get() {
			return this.getSrc();
		}
	}]);

	return MediaElementPlayer;
}();

_window2.default.MediaElementPlayer = MediaElementPlayer;
_mejs2.default.MediaElementPlayer = MediaElementPlayer;

exports.default = MediaElementPlayer;

},{"17":17,"2":2,"25":25,"26":26,"27":27,"28":28,"3":3,"30":30,"5":5,"6":6,"7":7}],17:[function(_dereq_,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _window = _dereq_(3);

var _window2 = _interopRequireDefault(_window);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var DefaultPlayer = function () {
	function DefaultPlayer(player) {
		_classCallCheck(this, DefaultPlayer);

		this.media = player.media;
		this.isVideo = player.isVideo;
		this.classPrefix = player.options.classPrefix;
		this.createIframeLayer = function () {
			return player.createIframeLayer();
		};
		this.setPoster = function (url) {
			return player.setPoster(url);
		};
		return this;
	}

	_createClass(DefaultPlayer, [{
		key: 'play',
		value: function play() {
			this.media.play();
		}
	}, {
		key: 'pause',
		value: function pause() {
			this.media.pause();
		}
	}, {
		key: 'load',
		value: function load() {
			var t = this;

			if (!t.isLoaded) {
				t.media.load();
			}

			t.isLoaded = true;
		}
	}, {
		key: 'setCurrentTime',
		value: function setCurrentTime(time) {
			this.media.setCurrentTime(time);
		}
	}, {
		key: 'getCurrentTime',
		value: function getCurrentTime() {
			return this.media.currentTime;
		}
	}, {
		key: 'getDuration',
		value: function getDuration() {
			var duration = this.media.getDuration();
			if (duration === Infinity && this.media.seekable && this.media.seekable.length) {
				duration = this.media.seekable.end(0);
			}
			return duration;
		}
	}, {
		key: 'setVolume',
		value: function setVolume(volume) {
			this.media.setVolume(volume);
		}
	}, {
		key: 'getVolume',
		value: function getVolume() {
			return this.media.getVolume();
		}
	}, {
		key: 'setMuted',
		value: function setMuted(value) {
			this.media.setMuted(value);
		}
	}, {
		key: 'setSrc',
		value: function setSrc(src) {
			var t = this,
			    layer = document.getElementById(t.media.id + '-iframe-overlay');

			if (layer) {
				layer.remove();
			}

			t.media.setSrc(src);
			t.createIframeLayer();
			if (t.media.renderer !== null && typeof t.media.renderer.getPosterUrl === 'function') {
				t.setPoster(t.media.renderer.getPosterUrl());
			}
		}
	}, {
		key: 'getSrc',
		value: function getSrc() {
			return this.media.getSrc();
		}
	}, {
		key: 'canPlayType',
		value: function canPlayType(type) {
			return this.media.canPlayType(type);
		}
	}, {
		key: 'paused',
		get: function get() {
			return this.media.paused;
		}
	}, {
		key: 'muted',
		set: function set(muted) {
			this.setMuted(muted);
		},
		get: function get() {
			return this.media.muted;
		}
	}, {
		key: 'ended',
		get: function get() {
			return this.media.ended;
		}
	}, {
		key: 'readyState',
		get: function get() {
			return this.media.readyState;
		}
	}, {
		key: 'currentTime',
		set: function set(time) {
			this.setCurrentTime(time);
		},
		get: function get() {
			return this.getCurrentTime();
		}
	}, {
		key: 'duration',
		get: function get() {
			return this.getDuration();
		}
	}, {
		key: 'remainingTime',
		get: function get() {
			return this.getDuration() - this.currentTime();
		}
	}, {
		key: 'volume',
		set: function set(volume) {
			this.setVolume(volume);
		},
		get: function get() {
			return this.getVolume();
		}
	}, {
		key: 'src',
		set: function set(src) {
			this.setSrc(src);
		},
		get: function get() {
			return this.getSrc();
		}
	}]);

	return DefaultPlayer;
}();

exports.default = DefaultPlayer;


_window2.default.DefaultPlayer = DefaultPlayer;

},{"3":3}],18:[function(_dereq_,module,exports){
'use strict';

var _window = _dereq_(3);

var _window2 = _interopRequireDefault(_window);

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

var _player = _dereq_(16);

var _player2 = _interopRequireDefault(_player);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

if (typeof jQuery !== 'undefined') {
	_mejs2.default.$ = jQuery;
} else if (typeof Zepto !== 'undefined') {
	_mejs2.default.$ = Zepto;
} else if (typeof ender !== 'undefined') {
	_mejs2.default.$ = ender;
}

(function ($) {
	if (typeof $ !== 'undefined') {
		$.fn.mediaelementplayer = function (options) {
			if (options === false) {
				this.each(function () {
					var player = $(this).data('mediaelementplayer');
					if (player) {
						player.remove();
					}
					$(this).removeData('mediaelementplayer');
				});
			} else {
				this.each(function () {
					$(this).data('mediaelementplayer', new _player2.default(this, options));
				});
			}
			return this;
		};

		$(document).ready(function () {
			$('.' + _mejs2.default.MepDefaults.classPrefix + 'player').mediaelementplayer();
		});
	}
})(_mejs2.default.$);

},{"16":16,"3":3,"7":7}],19:[function(_dereq_,module,exports){
'use strict';

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _window = _dereq_(3);

var _window2 = _interopRequireDefault(_window);

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

var _renderer = _dereq_(8);

var _general = _dereq_(27);

var _media = _dereq_(28);

var _constants = _dereq_(25);

var _dom = _dereq_(26);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var NativeDash = {

	promise: null,

	load: function load(settings) {
		if (typeof dashjs !== 'undefined') {
			NativeDash.promise = new Promise(function (resolve) {
				resolve();
			}).then(function () {
				NativeDash._createPlayer(settings);
			});
		} else {
			settings.options.path = typeof settings.options.path === 'string' ? settings.options.path : 'https://cdn.dashjs.org/latest/dash.all.min.js';

			NativeDash.promise = NativeDash.promise || (0, _dom.loadScript)(settings.options.path);
			NativeDash.promise.then(function () {
				NativeDash._createPlayer(settings);
			});
		}

		return NativeDash.promise;
	},

	_createPlayer: function _createPlayer(settings) {
		var player = dashjs.MediaPlayer().create();
		_window2.default['__ready__' + settings.id](player);
		return player;
	}
};

var DashNativeRenderer = {
	name: 'native_dash',
	options: {
		prefix: 'native_dash',
		dash: {
			path: 'https://cdn.dashjs.org/latest/dash.all.min.js',
			debug: false,
			drm: {},

			robustnessLevel: ''
		}
	},

	canPlayType: function canPlayType(type) {
		return _constants.HAS_MSE && ['application/dash+xml'].indexOf(type.toLowerCase()) > -1;
	},

	create: function create(mediaElement, options, mediaFiles) {

		var originalNode = mediaElement.originalNode,
		    id = mediaElement.id + '_' + options.prefix,
		    autoplay = originalNode.autoplay,
		    children = originalNode.children;

		var node = null,
		    dashPlayer = null;

		originalNode.removeAttribute('type');
		for (var i = 0, total = children.length; i < total; i++) {
			children[i].removeAttribute('type');
		}

		node = originalNode.cloneNode(true);
		options = Object.assign(options, mediaElement.options);

		var props = _mejs2.default.html5media.properties,
		    events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {
			return e !== 'error';
		}),
		    attachNativeEvents = function attachNativeEvents(e) {
			var event = (0, _general.createEvent)(e.type, mediaElement);
			mediaElement.dispatchEvent(event);
		},
		    assignGettersSetters = function assignGettersSetters(propName) {
			var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);

			node['get' + capName] = function () {
				return dashPlayer !== null ? node[propName] : null;
			};

			node['set' + capName] = function (value) {
				if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {
					if (propName === 'src') {
						var source = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src ? value.src : value;
						node[propName] = source;
						if (dashPlayer !== null) {
							dashPlayer.reset();
							for (var _i = 0, _total = events.length; _i < _total; _i++) {
								node.removeEventListener(events[_i], attachNativeEvents);
							}
							dashPlayer = NativeDash._createPlayer({
								options: options.dash,
								id: id
							});

							if (value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && _typeof(value.drm) === 'object') {
								dashPlayer.setProtectionData(value.drm);
								if ((0, _general.isString)(options.dash.robustnessLevel) && options.dash.robustnessLevel) {
									dashPlayer.getProtectionController().setRobustnessLevel(options.dash.robustnessLevel);
								}
							}
							dashPlayer.attachSource(source);
							if (autoplay) {
								dashPlayer.play();
							}
						}
					} else {
						node[propName] = value;
					}
				}
			};
		};

		for (var _i2 = 0, _total2 = props.length; _i2 < _total2; _i2++) {
			assignGettersSetters(props[_i2]);
		}

		_window2.default['__ready__' + id] = function (_dashPlayer) {
			mediaElement.dashPlayer = dashPlayer = _dashPlayer;

			var dashEvents = dashjs.MediaPlayer.events,
			    assignEvents = function assignEvents(eventName) {
				if (eventName === 'loadedmetadata') {
					dashPlayer.initialize();
					dashPlayer.attachView(node);
					dashPlayer.setAutoPlay(false);

					if (_typeof(options.dash.drm) === 'object' && !_mejs2.default.Utils.isObjectEmpty(options.dash.drm)) {
						dashPlayer.setProtectionData(options.dash.drm);
						if ((0, _general.isString)(options.dash.robustnessLevel) && options.dash.robustnessLevel) {
							dashPlayer.getProtectionController().setRobustnessLevel(options.dash.robustnessLevel);
						}
					}
					dashPlayer.attachSource(node.getSrc());
				}

				node.addEventListener(eventName, attachNativeEvents);
			};

			for (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) {
				assignEvents(events[_i3]);
			}

			var assignMdashEvents = function assignMdashEvents(e) {
				if (e.type.toLowerCase() === 'error') {
					mediaElement.generateError(e.message, node.src);
					console.error(e);
				} else {
					var _event = (0, _general.createEvent)(e.type, mediaElement);
					_event.data = e;
					mediaElement.dispatchEvent(_event);
				}
			};

			for (var eventType in dashEvents) {
				if (dashEvents.hasOwnProperty(eventType)) {
					dashPlayer.on(dashEvents[eventType], function (e) {
						return assignMdashEvents(e);
					});
				}
			}
		};

		if (mediaFiles && mediaFiles.length > 0) {
			for (var _i4 = 0, _total4 = mediaFiles.length; _i4 < _total4; _i4++) {
				if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i4].type)) {
					node.setAttribute('src', mediaFiles[_i4].src);
					if (typeof mediaFiles[_i4].drm !== 'undefined') {
						options.dash.drm = mediaFiles[_i4].drm;
					}
					break;
				}
			}
		}

		node.setAttribute('id', id);

		originalNode.parentNode.insertBefore(node, originalNode);
		originalNode.autoplay = false;
		originalNode.style.display = 'none';

		node.setSize = function (width, height) {
			node.style.width = width + 'px';
			node.style.height = height + 'px';
			return node;
		};

		node.hide = function () {
			node.pause();
			node.style.display = 'none';
			return node;
		};

		node.show = function () {
			node.style.display = '';
			return node;
		};

		node.destroy = function () {
			if (dashPlayer !== null) {
				dashPlayer.reset();
			}
		};

		var event = (0, _general.createEvent)('rendererready', node);
		mediaElement.dispatchEvent(event);

		mediaElement.promises.push(NativeDash.load({
			options: options.dash,
			id: id
		}));

		return node;
	}
};

_media.typeChecks.push(function (url) {
	return ~url.toLowerCase().indexOf('.mpd') ? 'application/dash+xml' : null;
});

_renderer.renderer.add(DashNativeRenderer);

},{"25":25,"26":26,"27":27,"28":28,"3":3,"7":7,"8":8}],20:[function(_dereq_,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});
exports.PluginDetector = undefined;

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _window = _dereq_(3);

var _window2 = _interopRequireDefault(_window);

var _document = _dereq_(2);

var _document2 = _interopRequireDefault(_document);

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

var _i18n = _dereq_(5);

var _i18n2 = _interopRequireDefault(_i18n);

var _renderer = _dereq_(8);

var _general = _dereq_(27);

var _constants = _dereq_(25);

var _media = _dereq_(28);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var PluginDetector = exports.PluginDetector = {
	plugins: [],

	hasPluginVersion: function hasPluginVersion(plugin, v) {
		var pv = PluginDetector.plugins[plugin];
		v[1] = v[1] || 0;
		v[2] = v[2] || 0;
		return pv[0] > v[0] || pv[0] === v[0] && pv[1] > v[1] || pv[0] === v[0] && pv[1] === v[1] && pv[2] >= v[2];
	},

	addPlugin: function addPlugin(p, pluginName, mimeType, activeX, axDetect) {
		PluginDetector.plugins[p] = PluginDetector.detectPlugin(pluginName, mimeType, activeX, axDetect);
	},

	detectPlugin: function detectPlugin(pluginName, mimeType, activeX, axDetect) {

		var version = [0, 0, 0],
		    description = void 0,
		    ax = void 0;

		if (_constants.NAV.plugins !== null && _constants.NAV.plugins !== undefined && _typeof(_constants.NAV.plugins[pluginName]) === 'object') {
			description = _constants.NAV.plugins[pluginName].description;
			if (description && !(typeof _constants.NAV.mimeTypes !== 'undefined' && _constants.NAV.mimeTypes[mimeType] && !_constants.NAV.mimeTypes[mimeType].enabledPlugin)) {
				version = description.replace(pluginName, '').replace(/^\s+/, '').replace(/\sr/gi, '.').split('.');
				for (var i = 0, total = version.length; i < total; i++) {
					version[i] = parseInt(version[i].match(/\d+/), 10);
				}
			}
		} else if (_window2.default.ActiveXObject !== undefined) {
			try {
				ax = new ActiveXObject(activeX);
				if (ax) {
					version = axDetect(ax);
				}
			} catch (e) {
				
			}
		}
		return version;
	}
};

PluginDetector.addPlugin('flash', 'Shockwave Flash', 'application/x-shockwave-flash', 'ShockwaveFlash.ShockwaveFlash', function (ax) {
	var version = [],
	    d = ax.GetVariable("$version");

	if (d) {
		d = d.split(" ")[1].split(",");
		version = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
	}
	return version;
});

var FlashMediaElementRenderer = {
	create: function create(mediaElement, options, mediaFiles) {

		var flash = {};
		var isActive = false;

		flash.options = options;
		flash.id = mediaElement.id + '_' + flash.options.prefix;
		flash.mediaElement = mediaElement;
		flash.flashState = {};
		flash.flashApi = null;
		flash.flashApiStack = [];

		var props = _mejs2.default.html5media.properties,
		    assignGettersSetters = function assignGettersSetters(propName) {
			flash.flashState[propName] = null;

			var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);

			flash['get' + capName] = function () {
				if (flash.flashApi !== null) {
					if (typeof flash.flashApi['get_' + propName] === 'function') {
						var value = flash.flashApi['get_' + propName]();

						if (propName === 'buffered') {
							return {
								start: function start() {
									return 0;
								},
								end: function end() {
									return value;
								},
								length: 1
							};
						}
						return value;
					} else {
						return null;
					}
				} else {
					return null;
				}
			};

			flash['set' + capName] = function (value) {
				if (propName === 'src') {
					value = (0, _media.absolutizeUrl)(value);
				}

				if (flash.flashApi !== null && flash.flashApi['set_' + propName] !== undefined) {
					try {
						flash.flashApi['set_' + propName](value);
					} catch (e) {
						
					}
				} else {
					flash.flashApiStack.push({
						type: 'set',
						propName: propName,
						value: value
					});
				}
			};
		};

		for (var i = 0, total = props.length; i < total; i++) {
			assignGettersSetters(props[i]);
		}

		var methods = _mejs2.default.html5media.methods,
		    assignMethods = function assignMethods(methodName) {
			flash[methodName] = function () {
				if (isActive) {
					if (flash.flashApi !== null) {
						if (flash.flashApi['fire_' + methodName]) {
							try {
								flash.flashApi['fire_' + methodName]();
							} catch (e) {
								
							}
						} else {
							
						}
					} else {
						flash.flashApiStack.push({
							type: 'call',
							methodName: methodName
						});
					}
				}
			};
		};
		methods.push('stop');
		for (var _i = 0, _total = methods.length; _i < _total; _i++) {
			assignMethods(methods[_i]);
		}

		var initEvents = ['rendererready'];

		for (var _i2 = 0, _total2 = initEvents.length; _i2 < _total2; _i2++) {
			var event = (0, _general.createEvent)(initEvents[_i2], flash);
			mediaElement.dispatchEvent(event);
		}

		_window2.default['__ready__' + flash.id] = function () {

			flash.flashReady = true;
			flash.flashApi = _document2.default.getElementById('__' + flash.id);

			if (flash.flashApiStack.length) {
				for (var _i3 = 0, _total3 = flash.flashApiStack.length; _i3 < _total3; _i3++) {
					var stackItem = flash.flashApiStack[_i3];

					if (stackItem.type === 'set') {
						var propName = stackItem.propName,
						    capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);

						flash['set' + capName](stackItem.value);
					} else if (stackItem.type === 'call') {
						flash[stackItem.methodName]();
					}
				}
			}
		};

		_window2.default['__event__' + flash.id] = function (eventName, message) {
			var event = (0, _general.createEvent)(eventName, flash);
			if (message) {
				try {
					event.data = JSON.parse(message);
					event.details.data = JSON.parse(message);
				} catch (e) {
					event.message = message;
				}
			}

			flash.mediaElement.dispatchEvent(event);
		};

		flash.flashWrapper = _document2.default.createElement('div');

		if (['always', 'sameDomain'].indexOf(flash.options.shimScriptAccess) === -1) {
			flash.options.shimScriptAccess = 'sameDomain';
		}

		var autoplay = mediaElement.originalNode.autoplay,
		    flashVars = ['uid=' + flash.id, 'autoplay=' + autoplay, 'allowScriptAccess=' + flash.options.shimScriptAccess, 'preload=' + (mediaElement.originalNode.getAttribute('preload') || '')],
		    isVideo = mediaElement.originalNode !== null && mediaElement.originalNode.tagName.toLowerCase() === 'video',
		    flashHeight = isVideo ? mediaElement.originalNode.height : 1,
		    flashWidth = isVideo ? mediaElement.originalNode.width : 1;

		if (mediaElement.originalNode.getAttribute('src')) {
			flashVars.push('src=' + mediaElement.originalNode.getAttribute('src'));
		}

		if (flash.options.enablePseudoStreaming === true) {
			flashVars.push('pseudostreamstart=' + flash.options.pseudoStreamingStartQueryParam);
			flashVars.push('pseudostreamtype=' + flash.options.pseudoStreamingType);
		}

		if (flash.options.streamDelimiter) {
			flashVars.push('streamdelimiter=' + encodeURIComponent(flash.options.streamDelimiter));
		}

		if (flash.options.proxyType) {
			flashVars.push('proxytype=' + flash.options.proxyType);
		}

		mediaElement.appendChild(flash.flashWrapper);
		mediaElement.originalNode.style.display = 'none';

		var settings = [];

		if (_constants.IS_IE || _constants.IS_EDGE) {
			var specialIEContainer = _document2.default.createElement('div');
			flash.flashWrapper.appendChild(specialIEContainer);

			if (_constants.IS_EDGE) {
				settings = ['type="application/x-shockwave-flash"', 'data="' + flash.options.pluginPath + flash.options.filename + '"', 'id="__' + flash.id + '"', 'width="' + flashWidth + '"', 'height="' + flashHeight + '\'"'];
			} else {
				settings = ['classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"', 'codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"', 'id="__' + flash.id + '"', 'width="' + flashWidth + '"', 'height="' + flashHeight + '"'];
			}

			if (!isVideo) {
				settings.push('style="clip: rect(0 0 0 0); position: absolute;"');
			}

			specialIEContainer.outerHTML = '<object ' + settings.join(' ') + '>' + ('<param name="movie" value="' + flash.options.pluginPath + flash.options.filename + '?x=' + new Date() + '" />') + ('<param name="flashvars" value="' + flashVars.join('&amp;') + '" />') + '<param name="quality" value="high" />' + '<param name="bgcolor" value="#000000" />' + '<param name="wmode" value="transparent" />' + ('<param name="allowScriptAccess" value="' + flash.options.shimScriptAccess + '" />') + '<param name="allowFullScreen" value="true" />' + ('<div>' + _i18n2.default.t('mejs.install-flash') + '</div>') + '</object>';
		} else {

			settings = ['id="__' + flash.id + '"', 'name="__' + flash.id + '"', 'play="true"', 'loop="false"', 'quality="high"', 'bgcolor="#000000"', 'wmode="transparent"', 'allowScriptAccess="' + flash.options.shimScriptAccess + '"', 'allowFullScreen="true"', 'type="application/x-shockwave-flash"', 'pluginspage="//www.macromedia.com/go/getflashplayer"', 'src="' + flash.options.pluginPath + flash.options.filename + '"', 'flashvars="' + flashVars.join('&') + '"'];

			if (isVideo) {
				settings.push('width="' + flashWidth + '"');
				settings.push('height="' + flashHeight + '"');
			} else {
				settings.push('style="position: fixed; left: -9999em; top: -9999em;"');
			}

			flash.flashWrapper.innerHTML = '<embed ' + settings.join(' ') + '>';
		}

		flash.flashNode = flash.flashWrapper.lastChild;

		flash.hide = function () {
			isActive = false;
			if (isVideo) {
				flash.flashNode.style.display = 'none';
			}
		};
		flash.show = function () {
			isActive = true;
			if (isVideo) {
				flash.flashNode.style.display = '';
			}
		};
		flash.setSize = function (width, height) {
			flash.flashNode.style.width = width + 'px';
			flash.flashNode.style.height = height + 'px';

			if (flash.flashApi !== null && typeof flash.flashApi.fire_setSize === 'function') {
				flash.flashApi.fire_setSize(width, height);
			}
		};

		flash.destroy = function () {
			flash.flashNode.remove();
		};

		if (mediaFiles && mediaFiles.length > 0) {
			for (var _i4 = 0, _total4 = mediaFiles.length; _i4 < _total4; _i4++) {
				if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i4].type)) {
					flash.setSrc(mediaFiles[_i4].src);
					break;
				}
			}
		}

		return flash;
	}
};

var hasFlash = PluginDetector.hasPluginVersion('flash', [10, 0, 0]);

if (hasFlash) {
	_media.typeChecks.push(function (url) {
		url = url.toLowerCase();

		if (url.startsWith('rtmp')) {
			if (~url.indexOf('.mp3')) {
				return 'audio/rtmp';
			} else {
				return 'video/rtmp';
			}
		} else if (/\.og(a|g)/i.test(url)) {
			return 'audio/ogg';
		} else if (~url.indexOf('.m3u8')) {
			return 'application/x-mpegURL';
		} else if (~url.indexOf('.mpd')) {
			return 'application/dash+xml';
		} else if (~url.indexOf('.flv')) {
			return 'video/flv';
		} else {
			return null;
		}
	});

	var FlashMediaElementVideoRenderer = {
		name: 'flash_video',
		options: {
			prefix: 'flash_video',
			filename: 'mediaelement-flash-video.swf',
			enablePseudoStreaming: false,

			pseudoStreamingStartQueryParam: 'start',

			pseudoStreamingType: 'byte',

			proxyType: '',

			streamDelimiter: ''
		},

		canPlayType: function canPlayType(type) {
			return ~['video/mp4', 'video/rtmp', 'audio/rtmp', 'rtmp/mp4', 'audio/mp4', 'video/flv', 'video/x-flv'].indexOf(type.toLowerCase());
		},

		create: FlashMediaElementRenderer.create

	};
	_renderer.renderer.add(FlashMediaElementVideoRenderer);

	var FlashMediaElementHlsVideoRenderer = {
		name: 'flash_hls',
		options: {
			prefix: 'flash_hls',
			filename: 'mediaelement-flash-video-hls.swf'
		},

		canPlayType: function canPlayType(type) {
			return ~['application/x-mpegurl', 'application/vnd.apple.mpegurl', 'audio/mpegurl', 'audio/hls', 'video/hls'].indexOf(type.toLowerCase());
		},

		create: FlashMediaElementRenderer.create
	};
	_renderer.renderer.add(FlashMediaElementHlsVideoRenderer);

	var FlashMediaElementMdashVideoRenderer = {
		name: 'flash_dash',
		options: {
			prefix: 'flash_dash',
			filename: 'mediaelement-flash-video-mdash.swf'
		},

		canPlayType: function canPlayType(type) {
			return ~['application/dash+xml'].indexOf(type.toLowerCase());
		},

		create: FlashMediaElementRenderer.create
	};
	_renderer.renderer.add(FlashMediaElementMdashVideoRenderer);

	var FlashMediaElementAudioRenderer = {
		name: 'flash_audio',
		options: {
			prefix: 'flash_audio',
			filename: 'mediaelement-flash-audio.swf'
		},

		canPlayType: function canPlayType(type) {
			return ~['audio/mp3'].indexOf(type.toLowerCase());
		},

		create: FlashMediaElementRenderer.create
	};
	_renderer.renderer.add(FlashMediaElementAudioRenderer);

	var FlashMediaElementAudioOggRenderer = {
		name: 'flash_audio_ogg',
		options: {
			prefix: 'flash_audio_ogg',
			filename: 'mediaelement-flash-audio-ogg.swf'
		},

		canPlayType: function canPlayType(type) {
			return ~['audio/ogg', 'audio/oga', 'audio/ogv'].indexOf(type.toLowerCase());
		},

		create: FlashMediaElementRenderer.create
	};
	_renderer.renderer.add(FlashMediaElementAudioOggRenderer);
}

},{"2":2,"25":25,"27":27,"28":28,"3":3,"5":5,"7":7,"8":8}],21:[function(_dereq_,module,exports){
'use strict';

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _window = _dereq_(3);

var _window2 = _interopRequireDefault(_window);

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

var _renderer = _dereq_(8);

var _general = _dereq_(27);

var _constants = _dereq_(25);

var _media = _dereq_(28);

var _dom = _dereq_(26);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var NativeFlv = {

	promise: null,

	load: function load(settings) {
		if (typeof flvjs !== 'undefined') {
			NativeFlv.promise = new Promise(function (resolve) {
				resolve();
			}).then(function () {
				NativeFlv._createPlayer(settings);
			});
		} else {
			settings.options.path = typeof settings.options.path === 'string' ? settings.options.path : 'https://cdn.jsdelivr.net/npm/flv.js@latest';

			NativeFlv.promise = NativeFlv.promise || (0, _dom.loadScript)(settings.options.path);
			NativeFlv.promise.then(function () {
				NativeFlv._createPlayer(settings);
			});
		}

		return NativeFlv.promise;
	},

	_createPlayer: function _createPlayer(settings) {
		flvjs.LoggingControl.enableDebug = settings.options.debug;
		flvjs.LoggingControl.enableVerbose = settings.options.debug;
		var player = flvjs.createPlayer(settings.options, settings.configs);
		_window2.default['__ready__' + settings.id](player);
		return player;
	}
};

var FlvNativeRenderer = {
	name: 'native_flv',
	options: {
		prefix: 'native_flv',
		flv: {
			path: 'https://cdn.jsdelivr.net/npm/flv.js@latest',

			cors: true,
			debug: false
		}
	},

	canPlayType: function canPlayType(type) {
		return _constants.HAS_MSE && ['video/x-flv', 'video/flv'].indexOf(type.toLowerCase()) > -1;
	},

	create: function create(mediaElement, options, mediaFiles) {

		var originalNode = mediaElement.originalNode,
		    id = mediaElement.id + '_' + options.prefix;

		var node = null,
		    flvPlayer = null;

		node = originalNode.cloneNode(true);
		options = Object.assign(options, mediaElement.options);

		var props = _mejs2.default.html5media.properties,
		    events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {
			return e !== 'error';
		}),
		    attachNativeEvents = function attachNativeEvents(e) {
			var event = (0, _general.createEvent)(e.type, mediaElement);
			mediaElement.dispatchEvent(event);
		},
		    assignGettersSetters = function assignGettersSetters(propName) {
			var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);

			node['get' + capName] = function () {
				return flvPlayer !== null ? node[propName] : null;
			};

			node['set' + capName] = function (value) {
				if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {
					if (propName === 'src') {
						node[propName] = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src ? value.src : value;
						if (flvPlayer !== null) {
							var _flvOptions = {};
							_flvOptions.type = 'flv';
							_flvOptions.url = value;
							_flvOptions.cors = options.flv.cors;
							_flvOptions.debug = options.flv.debug;
							_flvOptions.path = options.flv.path;
							var _flvConfigs = options.flv.configs;

							flvPlayer.destroy();
							for (var i = 0, total = events.length; i < total; i++) {
								node.removeEventListener(events[i], attachNativeEvents);
							}
							flvPlayer = NativeFlv._createPlayer({
								options: _flvOptions,
								configs: _flvConfigs,
								id: id
							});
							flvPlayer.attachMediaElement(node);
							flvPlayer.load();
						}
					} else {
						node[propName] = value;
					}
				}
			};
		};

		for (var i = 0, total = props.length; i < total; i++) {
			assignGettersSetters(props[i]);
		}

		_window2.default['__ready__' + id] = function (_flvPlayer) {
			mediaElement.flvPlayer = flvPlayer = _flvPlayer;

			var flvEvents = flvjs.Events,
			    assignEvents = function assignEvents(eventName) {
				if (eventName === 'loadedmetadata') {
					flvPlayer.unload();
					flvPlayer.detachMediaElement();
					flvPlayer.attachMediaElement(node);
					flvPlayer.load();
				}

				node.addEventListener(eventName, attachNativeEvents);
			};

			for (var _i = 0, _total = events.length; _i < _total; _i++) {
				assignEvents(events[_i]);
			}

			var assignFlvEvents = function assignFlvEvents(name, data) {
				if (name === 'error') {
					var message = data[0] + ': ' + data[1] + ' ' + data[2].msg;
					mediaElement.generateError(message, node.src);
				} else {
					var _event = (0, _general.createEvent)(name, mediaElement);
					_event.data = data;
					mediaElement.dispatchEvent(_event);
				}
			};

			var _loop = function _loop(eventType) {
				if (flvEvents.hasOwnProperty(eventType)) {
					flvPlayer.on(flvEvents[eventType], function () {
						for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
							args[_key] = arguments[_key];
						}

						return assignFlvEvents(flvEvents[eventType], args);
					});
				}
			};

			for (var eventType in flvEvents) {
				_loop(eventType);
			}
		};

		if (mediaFiles && mediaFiles.length > 0) {
			for (var _i2 = 0, _total2 = mediaFiles.length; _i2 < _total2; _i2++) {
				if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i2].type)) {
					node.setAttribute('src', mediaFiles[_i2].src);
					break;
				}
			}
		}

		node.setAttribute('id', id);

		originalNode.parentNode.insertBefore(node, originalNode);
		originalNode.autoplay = false;
		originalNode.style.display = 'none';

		var flvOptions = {};
		flvOptions.type = 'flv';
		flvOptions.url = node.src;
		flvOptions.cors = options.flv.cors;
		flvOptions.debug = options.flv.debug;
		flvOptions.path = options.flv.path;
		var flvConfigs = options.flv.configs;

		node.setSize = function (width, height) {
			node.style.width = width + 'px';
			node.style.height = height + 'px';
			return node;
		};

		node.hide = function () {
			if (flvPlayer !== null) {
				flvPlayer.pause();
			}
			node.style.display = 'none';
			return node;
		};

		node.show = function () {
			node.style.display = '';
			return node;
		};

		node.destroy = function () {
			if (flvPlayer !== null) {
				flvPlayer.destroy();
			}
		};

		var event = (0, _general.createEvent)('rendererready', node);
		mediaElement.dispatchEvent(event);

		mediaElement.promises.push(NativeFlv.load({
			options: flvOptions,
			configs: flvConfigs,
			id: id
		}));

		return node;
	}
};

_media.typeChecks.push(function (url) {
	return ~url.toLowerCase().indexOf('.flv') ? 'video/flv' : null;
});

_renderer.renderer.add(FlvNativeRenderer);

},{"25":25,"26":26,"27":27,"28":28,"3":3,"7":7,"8":8}],22:[function(_dereq_,module,exports){
'use strict';

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _window = _dereq_(3);

var _window2 = _interopRequireDefault(_window);

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

var _renderer = _dereq_(8);

var _general = _dereq_(27);

var _constants = _dereq_(25);

var _media = _dereq_(28);

var _dom = _dereq_(26);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var NativeHls = {

	promise: null,

	load: function load(settings) {
		if (typeof Hls !== 'undefined') {
			NativeHls.promise = new Promise(function (resolve) {
				resolve();
			}).then(function () {
				NativeHls._createPlayer(settings);
			});
		} else {
			settings.options.path = typeof settings.options.path === 'string' ? settings.options.path : 'https://cdn.jsdelivr.net/npm/hls.js@latest';

			NativeHls.promise = NativeHls.promise || (0, _dom.loadScript)(settings.options.path);
			NativeHls.promise.then(function () {
				NativeHls._createPlayer(settings);
			});
		}

		return NativeHls.promise;
	},

	_createPlayer: function _createPlayer(settings) {
		var player = new Hls(settings.options);
		_window2.default['__ready__' + settings.id](player);
		return player;
	}
};

var HlsNativeRenderer = {
	name: 'native_hls',
	options: {
		prefix: 'native_hls',
		hls: {
			path: 'https://cdn.jsdelivr.net/npm/hls.js@latest',

			autoStartLoad: false,
			debug: false
		}
	},

	canPlayType: function canPlayType(type) {
		return _constants.HAS_MSE && ['application/x-mpegurl', 'application/vnd.apple.mpegurl', 'audio/mpegurl', 'audio/hls', 'video/hls'].indexOf(type.toLowerCase()) > -1;
	},

	create: function create(mediaElement, options, mediaFiles) {

		var originalNode = mediaElement.originalNode,
		    id = mediaElement.id + '_' + options.prefix,
		    preload = originalNode.getAttribute('preload'),
		    autoplay = originalNode.autoplay;

		var hlsPlayer = null,
		    node = null,
		    index = 0,
		    total = mediaFiles.length;

		node = originalNode.cloneNode(true);
		options = Object.assign(options, mediaElement.options);
		options.hls.autoStartLoad = preload && preload !== 'none' || autoplay;

		var props = _mejs2.default.html5media.properties,
		    events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {
			return e !== 'error';
		}),
		    attachNativeEvents = function attachNativeEvents(e) {
			var event = (0, _general.createEvent)(e.type, mediaElement);
			mediaElement.dispatchEvent(event);
		},
		    assignGettersSetters = function assignGettersSetters(propName) {
			var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);

			node['get' + capName] = function () {
				return hlsPlayer !== null ? node[propName] : null;
			};

			node['set' + capName] = function (value) {
				if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {
					if (propName === 'src') {
						node[propName] = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src ? value.src : value;
						if (hlsPlayer !== null) {
							hlsPlayer.destroy();
							for (var i = 0, _total = events.length; i < _total; i++) {
								node.removeEventListener(events[i], attachNativeEvents);
							}
							hlsPlayer = NativeHls._createPlayer({
								options: options.hls,
								id: id
							});
							hlsPlayer.loadSource(value);
							hlsPlayer.attachMedia(node);
						}
					} else {
						node[propName] = value;
					}
				}
			};
		};

		for (var i = 0, _total2 = props.length; i < _total2; i++) {
			assignGettersSetters(props[i]);
		}

		_window2.default['__ready__' + id] = function (_hlsPlayer) {
			mediaElement.hlsPlayer = hlsPlayer = _hlsPlayer;
			var hlsEvents = Hls.Events,
			    assignEvents = function assignEvents(eventName) {
				if (eventName === 'loadedmetadata') {
					var url = mediaElement.originalNode.src;
					hlsPlayer.detachMedia();
					hlsPlayer.loadSource(url);
					hlsPlayer.attachMedia(node);
				}

				node.addEventListener(eventName, attachNativeEvents);
			};

			for (var _i = 0, _total3 = events.length; _i < _total3; _i++) {
				assignEvents(events[_i]);
			}

			var recoverDecodingErrorDate = void 0,
			    recoverSwapAudioCodecDate = void 0;
			var assignHlsEvents = function assignHlsEvents(name, data) {
				if (name === 'hlsError') {
					console.warn(data);
					data = data[1];

					if (data.fatal) {
						switch (data.type) {
							case 'mediaError':
								var now = new Date().getTime();
								if (!recoverDecodingErrorDate || now - recoverDecodingErrorDate > 3000) {
									recoverDecodingErrorDate = new Date().getTime();
									hlsPlayer.recoverMediaError();
								} else if (!recoverSwapAudioCodecDate || now - recoverSwapAudioCodecDate > 3000) {
									recoverSwapAudioCodecDate = new Date().getTime();
									console.warn('Attempting to swap Audio Codec and recover from media error');
									hlsPlayer.swapAudioCodec();
									hlsPlayer.recoverMediaError();
								} else {
									var message = 'Cannot recover, last media error recovery failed';
									mediaElement.generateError(message, node.src);
									console.error(message);
								}
								break;
							case 'networkError':
								if (data.details === 'manifestLoadError') {
									if (index < total && mediaFiles[index + 1] !== undefined) {
										node.setSrc(mediaFiles[index++].src);
										node.load();
										node.play();
									} else {
										var _message = 'Network error';
										mediaElement.generateError(_message, mediaFiles);
										console.error(_message);
									}
								} else {
									var _message2 = 'Network error';
									mediaElement.generateError(_message2, mediaFiles);
									console.error(_message2);
								}
								break;
							default:
								hlsPlayer.destroy();
								break;
						}
						return;
					}
				}
				var event = (0, _general.createEvent)(name, mediaElement);
				event.data = data;
				mediaElement.dispatchEvent(event);
			};

			var _loop = function _loop(eventType) {
				if (hlsEvents.hasOwnProperty(eventType)) {
					hlsPlayer.on(hlsEvents[eventType], function () {
						for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
							args[_key] = arguments[_key];
						}

						return assignHlsEvents(hlsEvents[eventType], args);
					});
				}
			};

			for (var eventType in hlsEvents) {
				_loop(eventType);
			}
		};

		if (total > 0) {
			for (; index < total; index++) {
				if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[index].type)) {
					node.setAttribute('src', mediaFiles[index].src);
					break;
				}
			}
		}

		if (preload !== 'auto' && !autoplay) {
			node.addEventListener('play', function () {
				if (hlsPlayer !== null) {
					hlsPlayer.startLoad();
				}
			});

			node.addEventListener('pause', function () {
				if (hlsPlayer !== null) {
					hlsPlayer.stopLoad();
				}
			});
		}

		node.setAttribute('id', id);

		originalNode.parentNode.insertBefore(node, originalNode);
		originalNode.autoplay = false;
		originalNode.style.display = 'none';

		node.setSize = function (width, height) {
			node.style.width = width + 'px';
			node.style.height = height + 'px';
			return node;
		};

		node.hide = function () {
			node.pause();
			node.style.display = 'none';
			return node;
		};

		node.show = function () {
			node.style.display = '';
			return node;
		};

		node.destroy = function () {
			if (hlsPlayer !== null) {
				hlsPlayer.stopLoad();
				hlsPlayer.destroy();
			}
		};

		var event = (0, _general.createEvent)('rendererready', node);
		mediaElement.dispatchEvent(event);

		mediaElement.promises.push(NativeHls.load({
			options: options.hls,
			id: id
		}));

		return node;
	}
};

_media.typeChecks.push(function (url) {
	return ~url.toLowerCase().indexOf('.m3u8') ? 'application/x-mpegURL' : null;
});

_renderer.renderer.add(HlsNativeRenderer);

},{"25":25,"26":26,"27":27,"28":28,"3":3,"7":7,"8":8}],23:[function(_dereq_,module,exports){
'use strict';

var _window = _dereq_(3);

var _window2 = _interopRequireDefault(_window);

var _document = _dereq_(2);

var _document2 = _interopRequireDefault(_document);

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

var _renderer = _dereq_(8);

var _general = _dereq_(27);

var _constants = _dereq_(25);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var HtmlMediaElement = {
	name: 'html5',
	options: {
		prefix: 'html5'
	},

	canPlayType: function canPlayType(type) {

		var mediaElement = _document2.default.createElement('video');

		if (_constants.IS_ANDROID && /\/mp(3|4)$/i.test(type) || ~['application/x-mpegurl', 'vnd.apple.mpegurl', 'audio/mpegurl', 'audio/hls', 'video/hls'].indexOf(type.toLowerCase()) && _constants.SUPPORTS_NATIVE_HLS) {
			return 'yes';
		} else if (mediaElement.canPlayType) {
			return mediaElement.canPlayType(type.toLowerCase()).replace(/no/, '');
		} else {
			return '';
		}
	},

	create: function create(mediaElement, options, mediaFiles) {

		var id = mediaElement.id + '_' + options.prefix;
		var isActive = false;

		var node = null;

		if (mediaElement.originalNode === undefined || mediaElement.originalNode === null) {
			node = _document2.default.createElement('audio');
			mediaElement.appendChild(node);
		} else {
			node = mediaElement.originalNode;
		}

		node.setAttribute('id', id);

		var props = _mejs2.default.html5media.properties,
		    assignGettersSetters = function assignGettersSetters(propName) {
			var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);

			node['get' + capName] = function () {
				return node[propName];
			};

			node['set' + capName] = function (value) {
				if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {
					node[propName] = value;
				}
			};
		};

		for (var i = 0, _total = props.length; i < _total; i++) {
			assignGettersSetters(props[i]);
		}

		var events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {
			return e !== 'error';
		}),
		    assignEvents = function assignEvents(eventName) {
			node.addEventListener(eventName, function (e) {
				if (isActive) {
					var _event = (0, _general.createEvent)(e.type, e.target);
					mediaElement.dispatchEvent(_event);
				}
			});
		};

		for (var _i = 0, _total2 = events.length; _i < _total2; _i++) {
			assignEvents(events[_i]);
		}

		node.setSize = function (width, height) {
			node.style.width = width + 'px';
			node.style.height = height + 'px';
			return node;
		};

		node.hide = function () {
			isActive = false;
			node.style.display = 'none';

			return node;
		};

		node.show = function () {
			isActive = true;
			node.style.display = '';

			return node;
		};

		var index = 0,
		    total = mediaFiles.length;
		if (total > 0) {
			for (; index < total; index++) {
				if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[index].type)) {
					node.setAttribute('src', mediaFiles[index].src);
					break;
				}
			}
		}

		node.addEventListener('error', function (e) {
			if (e && e.target && e.target.error && e.target.error.code === 4 && isActive) {
				if (index < total && mediaFiles[index + 1] !== undefined) {
					node.src = mediaFiles[index++].src;
					node.load();
					node.play();
				} else {
					mediaElement.generateError('Media error: Format(s) not supported or source(s) not found', mediaFiles);
				}
			}
		});

		var event = (0, _general.createEvent)('rendererready', node);
		mediaElement.dispatchEvent(event);

		return node;
	}
};

_window2.default.HtmlMediaElement = _mejs2.default.HtmlMediaElement = HtmlMediaElement;

_renderer.renderer.add(HtmlMediaElement);

},{"2":2,"25":25,"27":27,"3":3,"7":7,"8":8}],24:[function(_dereq_,module,exports){
'use strict';

var _window = _dereq_(3);

var _window2 = _interopRequireDefault(_window);

var _document = _dereq_(2);

var _document2 = _interopRequireDefault(_document);

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

var _renderer = _dereq_(8);

var _general = _dereq_(27);

var _media = _dereq_(28);

var _dom = _dereq_(26);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var YouTubeApi = {
	isIframeStarted: false,

	isIframeLoaded: false,

	iframeQueue: [],

	enqueueIframe: function enqueueIframe(settings) {
		YouTubeApi.isLoaded = typeof YT !== 'undefined' && YT.loaded;

		if (YouTubeApi.isLoaded) {
			YouTubeApi.createIframe(settings);
		} else {
			YouTubeApi.loadIframeApi();
			YouTubeApi.iframeQueue.push(settings);
		}
	},

	loadIframeApi: function loadIframeApi() {
		if (!YouTubeApi.isIframeStarted) {
			(0, _dom.loadScript)('https://www.youtube.com/player_api');
			YouTubeApi.isIframeStarted = true;
		}
	},

	iFrameReady: function iFrameReady() {

		YouTubeApi.isLoaded = true;
		YouTubeApi.isIframeLoaded = true;

		while (YouTubeApi.iframeQueue.length > 0) {
			var settings = YouTubeApi.iframeQueue.pop();
			YouTubeApi.createIframe(settings);
		}
	},

	createIframe: function createIframe(settings) {
		return new YT.Player(settings.containerId, settings);
	},

	getYouTubeId: function getYouTubeId(url) {

		var youTubeId = '';

		if (url.indexOf('?') > 0) {
			youTubeId = YouTubeApi.getYouTubeIdFromParam(url);

			if (youTubeId === '') {
				youTubeId = YouTubeApi.getYouTubeIdFromUrl(url);
			}
		} else {
			youTubeId = YouTubeApi.getYouTubeIdFromUrl(url);
		}

		var id = youTubeId.substring(youTubeId.lastIndexOf('/') + 1);
		youTubeId = id.split('?');
		return youTubeId[0];
	},

	getYouTubeIdFromParam: function getYouTubeIdFromParam(url) {

		if (url === undefined || url === null || !url.trim().length) {
			return null;
		}

		var parts = url.split('?'),
		    parameters = parts[1].split('&');

		var youTubeId = '';

		for (var i = 0, total = parameters.length; i < total; i++) {
			var paramParts = parameters[i].split('=');
			if (paramParts[0] === 'v') {
				youTubeId = paramParts[1];
				break;
			}
		}

		return youTubeId;
	},

	getYouTubeIdFromUrl: function getYouTubeIdFromUrl(url) {

		if (url === undefined || url === null || !url.trim().length) {
			return null;
		}

		var parts = url.split('?');
		url = parts[0];
		return url.substring(url.lastIndexOf('/') + 1);
	},

	getYouTubeNoCookieUrl: function getYouTubeNoCookieUrl(url) {
		if (url === undefined || url === null || !url.trim().length || url.indexOf('//www.youtube') === -1) {
			return url;
		}

		var parts = url.split('/');
		parts[2] = parts[2].replace('.com', '-nocookie.com');
		return parts.join('/');
	}
};

var YouTubeIframeRenderer = {
	name: 'youtube_iframe',

	options: {
		prefix: 'youtube_iframe',

		youtube: {
			autoplay: 0,
			controls: 0,
			disablekb: 1,
			end: 0,
			loop: 0,
			modestbranding: 0,
			playsinline: 0,
			rel: 0,
			showinfo: 0,
			start: 0,
			iv_load_policy: 3,

			nocookie: false,

			imageQuality: null
		}
	},

	canPlayType: function canPlayType(type) {
		return ~['video/youtube', 'video/x-youtube'].indexOf(type.toLowerCase());
	},

	create: function create(mediaElement, options, mediaFiles) {

		var youtube = {},
		    apiStack = [],
		    readyState = 4;

		var youTubeApi = null,
		    paused = true,
		    ended = false,
		    youTubeIframe = null,
		    volume = 1;

		youtube.options = options;
		youtube.id = mediaElement.id + '_' + options.prefix;
		youtube.mediaElement = mediaElement;

		var props = _mejs2.default.html5media.properties,
		    assignGettersSetters = function assignGettersSetters(propName) {

			var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);

			youtube['get' + capName] = function () {
				if (youTubeApi !== null) {
					var value = null;

					switch (propName) {
						case 'currentTime':
							return youTubeApi.getCurrentTime();
						case 'duration':
							return youTubeApi.getDuration();
						case 'volume':
							volume = youTubeApi.getVolume() / 100;
							return volume;
						case 'playbackRate':
							return youTubeApi.getPlaybackRate();
						case 'paused':
							return paused;
						case 'ended':
							return ended;
						case 'muted':
							return youTubeApi.isMuted();
						case 'buffered':
							var percentLoaded = youTubeApi.getVideoLoadedFraction(),
							    duration = youTubeApi.getDuration();
							return {
								start: function start() {
									return 0;
								},
								end: function end() {
									return percentLoaded * duration;
								},
								length: 1
							};
						case 'src':
							return youTubeApi.getVideoUrl();
						case 'readyState':
							return readyState;
					}

					return value;
				} else {
					return null;
				}
			};

			youtube['set' + capName] = function (value) {
				if (youTubeApi !== null) {
					switch (propName) {
						case 'src':
							var url = typeof value === 'string' ? value : value[0].src,
							    _videoId = YouTubeApi.getYouTubeId(url);

							if (mediaElement.originalNode.autoplay) {
								youTubeApi.loadVideoById(_videoId);
							} else {
								youTubeApi.cueVideoById(_videoId);
							}
							break;
						case 'currentTime':
							youTubeApi.seekTo(value);
							break;
						case 'muted':
							if (value) {
								youTubeApi.mute();
							} else {
								youTubeApi.unMute();
							}
							setTimeout(function () {
								var event = (0, _general.createEvent)('volumechange', youtube);
								mediaElement.dispatchEvent(event);
							}, 50);
							break;
						case 'volume':
							volume = value;
							youTubeApi.setVolume(value * 100);
							setTimeout(function () {
								var event = (0, _general.createEvent)('volumechange', youtube);
								mediaElement.dispatchEvent(event);
							}, 50);
							break;
						case 'playbackRate':
							youTubeApi.setPlaybackRate(value);
							setTimeout(function () {
								var event = (0, _general.createEvent)('ratechange', youtube);
								mediaElement.dispatchEvent(event);
							}, 50);
							break;
						case 'readyState':
							var event = (0, _general.createEvent)('canplay', youtube);
							mediaElement.dispatchEvent(event);
							break;
						default:
							
							break;
					}
				} else {
					apiStack.push({ type: 'set', propName: propName, value: value });
				}
			};
		};

		for (var i = 0, total = props.length; i < total; i++) {
			assignGettersSetters(props[i]);
		}

		var methods = _mejs2.default.html5media.methods,
		    assignMethods = function assignMethods(methodName) {
			youtube[methodName] = function () {
				if (youTubeApi !== null) {
					switch (methodName) {
						case 'play':
							paused = false;
							return youTubeApi.playVideo();
						case 'pause':
							paused = true;
							return youTubeApi.pauseVideo();
						case 'load':
							return null;
					}
				} else {
					apiStack.push({ type: 'call', methodName: methodName });
				}
			};
		};

		for (var _i = 0, _total = methods.length; _i < _total; _i++) {
			assignMethods(methods[_i]);
		}

		var errorHandler = function errorHandler(error) {
			var message = '';
			switch (error.data) {
				case 2:
					message = 'The request contains an invalid parameter value. Verify that video ID has 11 characters and that contains no invalid characters, such as exclamation points or asterisks.';
					break;
				case 5:
					message = 'The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.';
					break;
				case 100:
					message = 'The video requested was not found. Either video has been removed or has been marked as private.';
					break;
				case 101:
				case 105:
					message = 'The owner of the requested video does not allow it to be played in embedded players.';
					break;
				default:
					message = 'Unknown error.';
					break;
			}
			mediaElement.generateError('Code ' + error.data + ': ' + message, mediaFiles);
		};

		var youtubeContainer = _document2.default.createElement('div');
		youtubeContainer.id = youtube.id;

		if (youtube.options.youtube.nocookie) {
			mediaElement.originalNode.src = YouTubeApi.getYouTubeNoCookieUrl(mediaFiles[0].src);
		}

		mediaElement.originalNode.parentNode.insertBefore(youtubeContainer, mediaElement.originalNode);
		mediaElement.originalNode.style.display = 'none';

		var isAudio = mediaElement.originalNode.tagName.toLowerCase() === 'audio',
		    height = isAudio ? '1' : mediaElement.originalNode.height,
		    width = isAudio ? '1' : mediaElement.originalNode.width,
		    videoId = YouTubeApi.getYouTubeId(mediaFiles[0].src),
		    youtubeSettings = {
			id: youtube.id,
			containerId: youtubeContainer.id,
			videoId: videoId,
			height: height,
			width: width,
			host: youtube.options.youtube && youtube.options.youtube.nocookie ? 'https://www.youtube-nocookie.com' : undefined,
			playerVars: Object.assign({
				controls: 0,
				rel: 0,
				disablekb: 1,
				showinfo: 0,
				modestbranding: 0,
				html5: 1,
				iv_load_policy: 3
			}, youtube.options.youtube),
			origin: _window2.default.location.host,
			events: {
				onReady: function onReady(e) {
					mediaElement.youTubeApi = youTubeApi = e.target;
					mediaElement.youTubeState = {
						paused: true,
						ended: false
					};

					if (apiStack.length) {
						for (var _i2 = 0, _total2 = apiStack.length; _i2 < _total2; _i2++) {

							var stackItem = apiStack[_i2];

							if (stackItem.type === 'set') {
								var propName = stackItem.propName,
								    capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);

								youtube['set' + capName](stackItem.value);
							} else if (stackItem.type === 'call') {
								youtube[stackItem.methodName]();
							}
						}
					}

					youTubeIframe = youTubeApi.getIframe();

					if (mediaElement.originalNode.muted) {
						youTubeApi.mute();
					}

					var events = ['mouseover', 'mouseout'],
					    assignEvents = function assignEvents(e) {
						var newEvent = (0, _general.createEvent)(e.type, youtube);
						mediaElement.dispatchEvent(newEvent);
					};

					for (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) {
						youTubeIframe.addEventListener(events[_i3], assignEvents, false);
					}

					var initEvents = ['rendererready', 'loadedmetadata', 'loadeddata', 'canplay'];

					for (var _i4 = 0, _total4 = initEvents.length; _i4 < _total4; _i4++) {
						var event = (0, _general.createEvent)(initEvents[_i4], youtube);
						mediaElement.dispatchEvent(event);
					}
				},
				onStateChange: function onStateChange(e) {
					var events = [];

					switch (e.data) {
						case -1:
							events = ['loadedmetadata'];
							paused = true;
							ended = false;
							break;
						case 0:
							events = ['ended'];
							paused = false;
							ended = !youtube.options.youtube.loop;
							if (!youtube.options.youtube.loop) {
								youtube.stopInterval();
							}
							break;
						case 1:
							events = ['play', 'playing'];
							paused = false;
							ended = false;
							youtube.startInterval();
							break;
						case 2:
							events = ['pause'];
							paused = true;
							ended = false;
							youtube.stopInterval();
							break;
						case 3:
							events = ['progress'];
							ended = false;
							break;
						case 5:
							events = ['loadeddata', 'loadedmetadata', 'canplay'];
							paused = true;
							ended = false;
							break;
					}

					for (var _i5 = 0, _total5 = events.length; _i5 < _total5; _i5++) {
						var event = (0, _general.createEvent)(events[_i5], youtube);
						mediaElement.dispatchEvent(event);
					}
				},
				onError: function onError(e) {
					return errorHandler(e);
				}
			}
		};

		if (isAudio || mediaElement.originalNode.hasAttribute('playsinline')) {
			youtubeSettings.playerVars.playsinline = 1;
		}

		if (mediaElement.originalNode.controls) {
			youtubeSettings.playerVars.controls = 1;
		}
		if (mediaElement.originalNode.autoplay) {
			youtubeSettings.playerVars.autoplay = 1;
		}
		if (mediaElement.originalNode.loop) {
			youtubeSettings.playerVars.loop = 1;
		}

		if ((youtubeSettings.playerVars.loop && parseInt(youtubeSettings.playerVars.loop, 10) === 1 || mediaElement.originalNode.src.indexOf('loop=') > -1) && !youtubeSettings.playerVars.playlist && mediaElement.originalNode.src.indexOf('playlist=') === -1) {
			youtubeSettings.playerVars.playlist = YouTubeApi.getYouTubeId(mediaElement.originalNode.src);
		}

		YouTubeApi.enqueueIframe(youtubeSettings);

		youtube.onEvent = function (eventName, player, _youTubeState) {
			if (_youTubeState !== null && _youTubeState !== undefined) {
				mediaElement.youTubeState = _youTubeState;
			}
		};

		youtube.setSize = function (width, height) {
			if (youTubeApi !== null) {
				youTubeApi.setSize(width, height);
			}
		};
		youtube.hide = function () {
			youtube.stopInterval();
			youtube.pause();
			if (youTubeIframe) {
				youTubeIframe.style.display = 'none';
			}
		};
		youtube.show = function () {
			if (youTubeIframe) {
				youTubeIframe.style.display = '';
			}
		};
		youtube.destroy = function () {
			youTubeApi.destroy();
		};
		youtube.interval = null;

		youtube.startInterval = function () {
			youtube.interval = setInterval(function () {
				var event = (0, _general.createEvent)('timeupdate', youtube);
				mediaElement.dispatchEvent(event);
			}, 250);
		};
		youtube.stopInterval = function () {
			if (youtube.interval) {
				clearInterval(youtube.interval);
			}
		};
		youtube.getPosterUrl = function () {
			var quality = options.youtube.imageQuality,
			    resolutions = ['default', 'hqdefault', 'mqdefault', 'sddefault', 'maxresdefault'],
			    id = YouTubeApi.getYouTubeId(mediaElement.originalNode.src);
			return quality && resolutions.indexOf(quality) > -1 && id ? 'https://img.youtube.com/vi/' + id + '/' + quality + '.jpg' : '';
		};

		return youtube;
	}
};

_window2.default.onYouTubePlayerAPIReady = function () {
	YouTubeApi.iFrameReady();
};

_media.typeChecks.push(function (url) {
	return (/\/\/(www\.youtube|youtu\.?be)/i.test(url) ? 'video/x-youtube' : null
	);
});

_renderer.renderer.add(YouTubeIframeRenderer);

},{"2":2,"26":26,"27":27,"28":28,"3":3,"7":7,"8":8}],25:[function(_dereq_,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});
exports.cancelFullScreen = exports.requestFullScreen = exports.isFullScreen = exports.FULLSCREEN_EVENT_NAME = exports.HAS_NATIVE_FULLSCREEN_ENABLED = exports.HAS_TRUE_NATIVE_FULLSCREEN = exports.HAS_IOS_FULLSCREEN = exports.HAS_MS_NATIVE_FULLSCREEN = exports.HAS_MOZ_NATIVE_FULLSCREEN = exports.HAS_WEBKIT_NATIVE_FULLSCREEN = exports.HAS_NATIVE_FULLSCREEN = exports.SUPPORTS_NATIVE_HLS = exports.SUPPORT_PASSIVE_EVENT = exports.SUPPORT_POINTER_EVENTS = exports.HAS_MSE = exports.IS_STOCK_ANDROID = exports.IS_SAFARI = exports.IS_FIREFOX = exports.IS_CHROME = exports.IS_EDGE = exports.IS_IE = exports.IS_ANDROID = exports.IS_IOS = exports.IS_IPOD = exports.IS_IPHONE = exports.IS_IPAD = exports.UA = exports.NAV = undefined;

var _window = _dereq_(3);

var _window2 = _interopRequireDefault(_window);

var _document = _dereq_(2);

var _document2 = _interopRequireDefault(_document);

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var NAV = exports.NAV = _window2.default.navigator;
var UA = exports.UA = NAV.userAgent.toLowerCase();
var IS_IPAD = exports.IS_IPAD = /ipad/i.test(UA) && !_window2.default.MSStream;
var IS_IPHONE = exports.IS_IPHONE = /iphone/i.test(UA) && !_window2.default.MSStream;
var IS_IPOD = exports.IS_IPOD = /ipod/i.test(UA) && !_window2.default.MSStream;
var IS_IOS = exports.IS_IOS = /ipad|iphone|ipod/i.test(UA) && !_window2.default.MSStream;
var IS_ANDROID = exports.IS_ANDROID = /android/i.test(UA);
var IS_IE = exports.IS_IE = /(trident|microsoft)/i.test(NAV.appName);
var IS_EDGE = exports.IS_EDGE = 'msLaunchUri' in NAV && !('documentMode' in _document2.default);
var IS_CHROME = exports.IS_CHROME = /chrome/i.test(UA);
var IS_FIREFOX = exports.IS_FIREFOX = /firefox/i.test(UA);
var IS_SAFARI = exports.IS_SAFARI = /safari/i.test(UA) && !IS_CHROME;
var IS_STOCK_ANDROID = exports.IS_STOCK_ANDROID = /^mozilla\/\d+\.\d+\s\(linux;\su;/i.test(UA);
var HAS_MSE = exports.HAS_MSE = 'MediaSource' in _window2.default;
var SUPPORT_POINTER_EVENTS = exports.SUPPORT_POINTER_EVENTS = function () {
	var element = _document2.default.createElement('x'),
	    documentElement = _document2.default.documentElement,
	    getComputedStyle = _window2.default.getComputedStyle;

	if (!('pointerEvents' in element.style)) {
		return false;
	}

	element.style.pointerEvents = 'auto';
	element.style.pointerEvents = 'x';
	documentElement.appendChild(element);
	var supports = getComputedStyle && (getComputedStyle(element, '') || {}).pointerEvents === 'auto';
	element.remove();
	return !!supports;
}();

var SUPPORT_PASSIVE_EVENT = exports.SUPPORT_PASSIVE_EVENT = function () {
	var supportsPassive = false;
	try {
		var opts = Object.defineProperty({}, 'passive', {
			get: function get() {
				supportsPassive = true;
			}
		});
		_window2.default.addEventListener('test', null, opts);
	} catch (e) {}

	return supportsPassive;
}();

var html5Elements = ['source', 'track', 'audio', 'video'];
var video = void 0;

for (var i = 0, total = html5Elements.length; i < total; i++) {
	video = _document2.default.createElement(html5Elements[i]);
}

var SUPPORTS_NATIVE_HLS = exports.SUPPORTS_NATIVE_HLS = IS_SAFARI || IS_IE && /edge/i.test(UA);

var hasiOSFullScreen = video.webkitEnterFullscreen !== undefined;

var hasNativeFullscreen = video.requestFullscreen !== undefined;

if (hasiOSFullScreen && /mac os x 10_5/i.test(UA)) {
	hasNativeFullscreen = false;
	hasiOSFullScreen = false;
}

var hasWebkitNativeFullScreen = video.webkitRequestFullScreen !== undefined;
var hasMozNativeFullScreen = video.mozRequestFullScreen !== undefined;
var hasMsNativeFullScreen = video.msRequestFullscreen !== undefined;
var hasTrueNativeFullScreen = hasWebkitNativeFullScreen || hasMozNativeFullScreen || hasMsNativeFullScreen;
var nativeFullScreenEnabled = hasTrueNativeFullScreen;
var fullScreenEventName = '';
var isFullScreen = void 0,
    requestFullScreen = void 0,
    cancelFullScreen = void 0;

if (hasMozNativeFullScreen) {
	nativeFullScreenEnabled = _document2.default.mozFullScreenEnabled;
} else if (hasMsNativeFullScreen) {
	nativeFullScreenEnabled = _document2.default.msFullscreenEnabled;
}

if (IS_CHROME) {
	hasiOSFullScreen = false;
}

if (hasTrueNativeFullScreen) {
	if (hasWebkitNativeFullScreen) {
		fullScreenEventName = 'webkitfullscreenchange';
	} else if (hasMozNativeFullScreen) {
		fullScreenEventName = 'fullscreenchange';
	} else if (hasMsNativeFullScreen) {
		fullScreenEventName = 'MSFullscreenChange';
	}

	exports.isFullScreen = isFullScreen = function isFullScreen() {
		if (hasMozNativeFullScreen) {
			return _document2.default.mozFullScreen;
		} else if (hasWebkitNativeFullScreen) {
			return _document2.default.webkitIsFullScreen;
		} else if (hasMsNativeFullScreen) {
			return _document2.default.msFullscreenElement !== null;
		}
	};

	exports.requestFullScreen = requestFullScreen = function requestFullScreen(el) {
		if (hasWebkitNativeFullScreen) {
			el.webkitRequestFullScreen();
		} else if (hasMozNativeFullScreen) {
			el.mozRequestFullScreen();
		} else if (hasMsNativeFullScreen) {
			el.msRequestFullscreen();
		}
	};

	exports.cancelFullScreen = cancelFullScreen = function cancelFullScreen() {
		if (hasWebkitNativeFullScreen) {
			_document2.default.webkitCancelFullScreen();
		} else if (hasMozNativeFullScreen) {
			_document2.default.mozCancelFullScreen();
		} else if (hasMsNativeFullScreen) {
			_document2.default.msExitFullscreen();
		}
	};
}

var HAS_NATIVE_FULLSCREEN = exports.HAS_NATIVE_FULLSCREEN = hasNativeFullscreen;
var HAS_WEBKIT_NATIVE_FULLSCREEN = exports.HAS_WEBKIT_NATIVE_FULLSCREEN = hasWebkitNativeFullScreen;
var HAS_MOZ_NATIVE_FULLSCREEN = exports.HAS_MOZ_NATIVE_FULLSCREEN = hasMozNativeFullScreen;
var HAS_MS_NATIVE_FULLSCREEN = exports.HAS_MS_NATIVE_FULLSCREEN = hasMsNativeFullScreen;
var HAS_IOS_FULLSCREEN = exports.HAS_IOS_FULLSCREEN = hasiOSFullScreen;
var HAS_TRUE_NATIVE_FULLSCREEN = exports.HAS_TRUE_NATIVE_FULLSCREEN = hasTrueNativeFullScreen;
var HAS_NATIVE_FULLSCREEN_ENABLED = exports.HAS_NATIVE_FULLSCREEN_ENABLED = nativeFullScreenEnabled;
var FULLSCREEN_EVENT_NAME = exports.FULLSCREEN_EVENT_NAME = fullScreenEventName;
exports.isFullScreen = isFullScreen;
exports.requestFullScreen = requestFullScreen;
exports.cancelFullScreen = cancelFullScreen;


_mejs2.default.Features = _mejs2.default.Features || {};
_mejs2.default.Features.isiPad = IS_IPAD;
_mejs2.default.Features.isiPod = IS_IPOD;
_mejs2.default.Features.isiPhone = IS_IPHONE;
_mejs2.default.Features.isiOS = _mejs2.default.Features.isiPhone || _mejs2.default.Features.isiPad;
_mejs2.default.Features.isAndroid = IS_ANDROID;
_mejs2.default.Features.isIE = IS_IE;
_mejs2.default.Features.isEdge = IS_EDGE;
_mejs2.default.Features.isChrome = IS_CHROME;
_mejs2.default.Features.isFirefox = IS_FIREFOX;
_mejs2.default.Features.isSafari = IS_SAFARI;
_mejs2.default.Features.isStockAndroid = IS_STOCK_ANDROID;
_mejs2.default.Features.hasMSE = HAS_MSE;
_mejs2.default.Features.supportsNativeHLS = SUPPORTS_NATIVE_HLS;
_mejs2.default.Features.supportsPointerEvents = SUPPORT_POINTER_EVENTS;
_mejs2.default.Features.supportsPassiveEvent = SUPPORT_PASSIVE_EVENT;
_mejs2.default.Features.hasiOSFullScreen = HAS_IOS_FULLSCREEN;
_mejs2.default.Features.hasNativeFullscreen = HAS_NATIVE_FULLSCREEN;
_mejs2.default.Features.hasWebkitNativeFullScreen = HAS_WEBKIT_NATIVE_FULLSCREEN;
_mejs2.default.Features.hasMozNativeFullScreen = HAS_MOZ_NATIVE_FULLSCREEN;
_mejs2.default.Features.hasMsNativeFullScreen = HAS_MS_NATIVE_FULLSCREEN;
_mejs2.default.Features.hasTrueNativeFullScreen = HAS_TRUE_NATIVE_FULLSCREEN;
_mejs2.default.Features.nativeFullScreenEnabled = HAS_NATIVE_FULLSCREEN_ENABLED;
_mejs2.default.Features.fullScreenEventName = FULLSCREEN_EVENT_NAME;
_mejs2.default.Features.isFullScreen = isFullScreen;
_mejs2.default.Features.requestFullScreen = requestFullScreen;
_mejs2.default.Features.cancelFullScreen = cancelFullScreen;

},{"2":2,"3":3,"7":7}],26:[function(_dereq_,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});
exports.removeClass = exports.addClass = exports.hasClass = undefined;
exports.loadScript = loadScript;
exports.offset = offset;
exports.toggleClass = toggleClass;
exports.fadeOut = fadeOut;
exports.fadeIn = fadeIn;
exports.siblings = siblings;
exports.visible = visible;
exports.ajax = ajax;

var _window = _dereq_(3);

var _window2 = _interopRequireDefault(_window);

var _document = _dereq_(2);

var _document2 = _interopRequireDefault(_document);

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function loadScript(url) {
	return new Promise(function (resolve, reject) {
		var script = _document2.default.createElement('script');
		script.src = url;
		script.async = true;
		script.onload = function () {
			script.remove();
			resolve();
		};
		script.onerror = function () {
			script.remove();
			reject();
		};
		_document2.default.head.appendChild(script);
	});
}

function offset(el) {
	var rect = el.getBoundingClientRect(),
	    scrollLeft = _window2.default.pageXOffset || _document2.default.documentElement.scrollLeft,
	    scrollTop = _window2.default.pageYOffset || _document2.default.documentElement.scrollTop;
	return { top: rect.top + scrollTop, left: rect.left + scrollLeft };
}

var hasClassMethod = void 0,
    addClassMethod = void 0,
    removeClassMethod = void 0;

if ('classList' in _document2.default.documentElement) {
	hasClassMethod = function hasClassMethod(el, className) {
		return el.classList !== undefined && el.classList.contains(className);
	};
	addClassMethod = function addClassMethod(el, className) {
		return el.classList.add(className);
	};
	removeClassMethod = function removeClassMethod(el, className) {
		return el.classList.remove(className);
	};
} else {
	hasClassMethod = function hasClassMethod(el, className) {
		return new RegExp('\\b' + className + '\\b').test(el.className);
	};
	addClassMethod = function addClassMethod(el, className) {
		if (!hasClass(el, className)) {
			el.className += ' ' + className;
		}
	};
	removeClassMethod = function removeClassMethod(el, className) {
		el.className = el.className.replace(new RegExp('\\b' + className + '\\b', 'g'), '');
	};
}

var hasClass = exports.hasClass = hasClassMethod;
var addClass = exports.addClass = addClassMethod;
var removeClass = exports.removeClass = removeClassMethod;

function toggleClass(el, className) {
	hasClass(el, className) ? removeClass(el, className) : addClass(el, className);
}

function fadeOut(el) {
	var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 400;
	var callback = arguments[2];

	if (!el.style.opacity) {
		el.style.opacity = 1;
	}

	var start = null;
	_window2.default.requestAnimationFrame(function animate(timestamp) {
		start = start || timestamp;
		var progress = timestamp - start;
		var opacity = parseFloat(1 - progress / duration, 2);
		el.style.opacity = opacity < 0 ? 0 : opacity;
		if (progress > duration) {
			if (callback && typeof callback === 'function') {
				callback();
			}
		} else {
			_window2.default.requestAnimationFrame(animate);
		}
	});
}

function fadeIn(el) {
	var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 400;
	var callback = arguments[2];

	if (!el.style.opacity) {
		el.style.opacity = 0;
	}

	var start = null;
	_window2.default.requestAnimationFrame(function animate(timestamp) {
		start = start || timestamp;
		var progress = timestamp - start;
		var opacity = parseFloat(progress / duration, 2);
		el.style.opacity = opacity > 1 ? 1 : opacity;
		if (progress > duration) {
			if (callback && typeof callback === 'function') {
				callback();
			}
		} else {
			_window2.default.requestAnimationFrame(animate);
		}
	});
}

function siblings(el, filter) {
	var siblings = [];
	el = el.parentNode.firstChild;
	do {
		if (!filter || filter(el)) {
			siblings.push(el);
		}
	} while (el = el.nextSibling);
	return siblings;
}

function visible(elem) {
	if (elem.getClientRects !== undefined && elem.getClientRects === 'function') {
		return !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length);
	}
	return !!(elem.offsetWidth || elem.offsetHeight);
}

function ajax(url, dataType, success, error) {
	var xhr = _window2.default.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');

	var type = 'application/x-www-form-urlencoded; charset=UTF-8',
	    completed = false,
	    accept = '*/'.concat('*');

	switch (dataType) {
		case 'text':
			type = 'text/plain';
			break;
		case 'json':
			type = 'application/json, text/javascript';
			break;
		case 'html':
			type = 'text/html';
			break;
		case 'xml':
			type = 'application/xml, text/xml';
			break;
	}

	if (type !== 'application/x-www-form-urlencoded') {
		accept = type + ', */*; q=0.01';
	}

	if (xhr) {
		xhr.open('GET', url, true);
		xhr.setRequestHeader('Accept', accept);
		xhr.onreadystatechange = function () {
			if (completed) {
				return;
			}

			if (xhr.readyState === 4) {
				if (xhr.status === 200) {
					completed = true;
					var data = void 0;
					switch (dataType) {
						case 'json':
							data = JSON.parse(xhr.responseText);
							break;
						case 'xml':
							data = xhr.responseXML;
							break;
						default:
							data = xhr.responseText;
							break;
					}
					success(data);
				} else if (typeof error === 'function') {
					error(xhr.status);
				}
			}
		};

		xhr.send();
	}
}

_mejs2.default.Utils = _mejs2.default.Utils || {};
_mejs2.default.Utils.offset = offset;
_mejs2.default.Utils.hasClass = hasClass;
_mejs2.default.Utils.addClass = addClass;
_mejs2.default.Utils.removeClass = removeClass;
_mejs2.default.Utils.toggleClass = toggleClass;
_mejs2.default.Utils.fadeIn = fadeIn;
_mejs2.default.Utils.fadeOut = fadeOut;
_mejs2.default.Utils.siblings = siblings;
_mejs2.default.Utils.visible = visible;
_mejs2.default.Utils.ajax = ajax;
_mejs2.default.Utils.loadScript = loadScript;

},{"2":2,"3":3,"7":7}],27:[function(_dereq_,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});
exports.escapeHTML = escapeHTML;
exports.debounce = debounce;
exports.isObjectEmpty = isObjectEmpty;
exports.splitEvents = splitEvents;
exports.createEvent = createEvent;
exports.isNodeAfter = isNodeAfter;
exports.isString = isString;

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function escapeHTML(input) {

	if (typeof input !== 'string') {
		throw new Error('Argument passed must be a string');
	}

	var map = {
		'&': '&amp;',
		'<': '&lt;',
		'>': '&gt;',
		'"': '&quot;'
	};

	return input.replace(/[&<>"]/g, function (c) {
		return map[c];
	});
}

function debounce(func, wait) {
	var _this = this,
	    _arguments = arguments;

	var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;


	if (typeof func !== 'function') {
		throw new Error('First argument must be a function');
	}

	if (typeof wait !== 'number') {
		throw new Error('Second argument must be a numeric value');
	}

	var timeout = void 0;
	return function () {
		var context = _this,
		    args = _arguments;
		var later = function later() {
			timeout = null;
			if (!immediate) {
				func.apply(context, args);
			}
		};
		var callNow = immediate && !timeout;
		clearTimeout(timeout);
		timeout = setTimeout(later, wait);

		if (callNow) {
			func.apply(context, args);
		}
	};
}

function isObjectEmpty(instance) {
	return Object.getOwnPropertyNames(instance).length <= 0;
}

function splitEvents(events, id) {
	var rwindow = /^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;

	var ret = { d: [], w: [] };
	(events || '').split(' ').forEach(function (v) {
		var eventName = '' + v + (id ? '.' + id : '');

		if (eventName.startsWith('.')) {
			ret.d.push(eventName);
			ret.w.push(eventName);
		} else {
			ret[rwindow.test(v) ? 'w' : 'd'].push(eventName);
		}
	});

	ret.d = ret.d.join(' ');
	ret.w = ret.w.join(' ');
	return ret;
}

function createEvent(eventName, target) {

	if (typeof eventName !== 'string') {
		throw new Error('Event name must be a string');
	}

	var eventFrags = eventName.match(/([a-z]+\.([a-z]+))/i),
	    detail = {
		target: target
	};

	if (eventFrags !== null) {
		eventName = eventFrags[1];
		detail.namespace = eventFrags[2];
	}

	return new window.CustomEvent(eventName, {
		detail: detail
	});
}

function isNodeAfter(sourceNode, targetNode) {

	return !!(sourceNode && targetNode && sourceNode.compareDocumentPosition(targetNode) & 2);
}

function isString(value) {
	return typeof value === 'string';
}

_mejs2.default.Utils = _mejs2.default.Utils || {};
_mejs2.default.Utils.escapeHTML = escapeHTML;
_mejs2.default.Utils.debounce = debounce;
_mejs2.default.Utils.isObjectEmpty = isObjectEmpty;
_mejs2.default.Utils.splitEvents = splitEvents;
_mejs2.default.Utils.createEvent = createEvent;
_mejs2.default.Utils.isNodeAfter = isNodeAfter;
_mejs2.default.Utils.isString = isString;

},{"7":7}],28:[function(_dereq_,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});
exports.typeChecks = undefined;
exports.absolutizeUrl = absolutizeUrl;
exports.formatType = formatType;
exports.getMimeFromType = getMimeFromType;
exports.getTypeFromFile = getTypeFromFile;
exports.getExtension = getExtension;
exports.normalizeExtension = normalizeExtension;

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

var _general = _dereq_(27);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var typeChecks = exports.typeChecks = [];

function absolutizeUrl(url) {

	if (typeof url !== 'string') {
		throw new Error('`url` argument must be a string');
	}

	var el = document.createElement('div');
	el.innerHTML = '<a href="' + (0, _general.escapeHTML)(url) + '">x</a>';
	return el.firstChild.href;
}

function formatType(url) {
	var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';

	return url && !type ? getTypeFromFile(url) : type;
}

function getMimeFromType(type) {

	if (typeof type !== 'string') {
		throw new Error('`type` argument must be a string');
	}

	return type && type.indexOf(';') > -1 ? type.substr(0, type.indexOf(';')) : type;
}

function getTypeFromFile(url) {

	if (typeof url !== 'string') {
		throw new Error('`url` argument must be a string');
	}

	for (var i = 0, total = typeChecks.length; i < total; i++) {
		var type = typeChecks[i](url);

		if (type) {
			return type;
		}
	}

	var ext = getExtension(url),
	    normalizedExt = normalizeExtension(ext);

	var mime = 'video/mp4';

	if (normalizedExt) {
		if (~['mp4', 'm4v', 'ogg', 'ogv', 'webm', 'flv', 'mpeg'].indexOf(normalizedExt)) {
			mime = 'video/' + normalizedExt;
		} else if ('mov' === normalizedExt) {
			mime = 'video/quicktime';
		} else if (~['mp3', 'oga', 'wav', 'mid', 'midi'].indexOf(normalizedExt)) {
			mime = 'audio/' + normalizedExt;
		}
	}

	return mime;
}

function getExtension(url) {

	if (typeof url !== 'string') {
		throw new Error('`url` argument must be a string');
	}

	var baseUrl = url.split('?')[0],
	    baseName = baseUrl.split('\\').pop().split('/').pop();
	return ~baseName.indexOf('.') ? baseName.substring(baseName.lastIndexOf('.') + 1) : '';
}

function normalizeExtension(extension) {

	if (typeof extension !== 'string') {
		throw new Error('`extension` argument must be a string');
	}

	switch (extension) {
		case 'mp4':
		case 'm4v':
			return 'mp4';
		case 'webm':
		case 'webma':
		case 'webmv':
			return 'webm';
		case 'ogg':
		case 'oga':
		case 'ogv':
			return 'ogg';
		default:
			return extension;
	}
}

_mejs2.default.Utils = _mejs2.default.Utils || {};
_mejs2.default.Utils.typeChecks = typeChecks;
_mejs2.default.Utils.absolutizeUrl = absolutizeUrl;
_mejs2.default.Utils.formatType = formatType;
_mejs2.default.Utils.getMimeFromType = getMimeFromType;
_mejs2.default.Utils.getTypeFromFile = getTypeFromFile;
_mejs2.default.Utils.getExtension = getExtension;
_mejs2.default.Utils.normalizeExtension = normalizeExtension;

},{"27":27,"7":7}],29:[function(_dereq_,module,exports){
'use strict';

var _document = _dereq_(2);

var _document2 = _interopRequireDefault(_document);

var _promisePolyfill = _dereq_(4);

var _promisePolyfill2 = _interopRequireDefault(_promisePolyfill);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

(function (arr) {
	arr.forEach(function (item) {
		if (item.hasOwnProperty('remove')) {
			return;
		}
		Object.defineProperty(item, 'remove', {
			configurable: true,
			enumerable: true,
			writable: true,
			value: function remove() {
				this.parentNode.removeChild(this);
			}
		});
	});
})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);

(function () {

	if (typeof window.CustomEvent === 'function') {
		return false;
	}

	function CustomEvent(event, params) {
		params = params || { bubbles: false, cancelable: false, detail: undefined };
		var evt = _document2.default.createEvent('CustomEvent');
		evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
		return evt;
	}

	CustomEvent.prototype = window.Event.prototype;
	window.CustomEvent = CustomEvent;
})();

if (typeof Object.assign !== 'function') {
	Object.assign = function (target) {

		if (target === null || target === undefined) {
			throw new TypeError('Cannot convert undefined or null to object');
		}

		var to = Object(target);

		for (var index = 1, total = arguments.length; index < total; index++) {
			var nextSource = arguments[index];

			if (nextSource !== null) {
				for (var nextKey in nextSource) {
					if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
						to[nextKey] = nextSource[nextKey];
					}
				}
			}
		}
		return to;
	};
}

if (!String.prototype.startsWith) {
	String.prototype.startsWith = function (searchString, position) {
		position = position || 0;
		return this.substr(position, searchString.length) === searchString;
	};
}

if (!Element.prototype.matches) {
	Element.prototype.matches = Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector || function (s) {
		var matches = (this.document || this.ownerDocument).querySelectorAll(s),
		    i = matches.length - 1;
		while (--i >= 0 && matches.item(i) !== this) {}
		return i > -1;
	};
}

if (window.Element && !Element.prototype.closest) {
	Element.prototype.closest = function (s) {
		var matches = (this.document || this.ownerDocument).querySelectorAll(s),
		    i = void 0,
		    el = this;
		do {
			i = matches.length;
			while (--i >= 0 && matches.item(i) !== el) {}
		} while (i < 0 && (el = el.parentElement));
		return el;
	};
}

(function () {
	var lastTime = 0;
	var vendors = ['ms', 'moz', 'webkit', 'o'];
	for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
		window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
		window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
	}

	if (!window.requestAnimationFrame) window.requestAnimationFrame = function (callback) {
		var currTime = new Date().getTime();
		var timeToCall = Math.max(0, 16 - (currTime - lastTime));
		var id = window.setTimeout(function () {
			callback(currTime + timeToCall);
		}, timeToCall);
		lastTime = currTime + timeToCall;
		return id;
	};

	if (!window.cancelAnimationFrame) window.cancelAnimationFrame = function (id) {
		clearTimeout(id);
	};
})();

if (/firefox/i.test(navigator.userAgent)) {
	var getComputedStyle = window.getComputedStyle;
	window.getComputedStyle = function (el, pseudoEl) {
		var t = getComputedStyle(el, pseudoEl);
		return t === null ? { getPropertyValue: function getPropertyValue() {} } : t;
	};
}

if (!window.Promise) {
	window.Promise = _promisePolyfill2.default;
}

(function (constructor) {
	if (constructor && constructor.prototype && constructor.prototype.children === null) {
		Object.defineProperty(constructor.prototype, 'children', {
			get: function get() {
				var i = 0,
				    node = void 0,
				    nodes = this.childNodes,
				    children = [];
				while (node = nodes[i++]) {
					if (node.nodeType === 1) {
						children.push(node);
					}
				}
				return children;
			}
		});
	}
})(window.Node || window.Element);

},{"2":2,"4":4}],30:[function(_dereq_,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});
exports.isDropFrame = isDropFrame;
exports.secondsToTimeCode = secondsToTimeCode;
exports.timeCodeToSeconds = timeCodeToSeconds;
exports.calculateTimeFormat = calculateTimeFormat;
exports.convertSMPTEtoSeconds = convertSMPTEtoSeconds;

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function isDropFrame() {
	var fps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 25;

	return !(fps % 1 === 0);
}
function secondsToTimeCode(time) {
	var forceHours = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
	var showFrameCount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
	var fps = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 25;
	var secondsDecimalLength = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
	var timeFormat = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'hh:mm:ss';


	time = !time || typeof time !== 'number' || time < 0 ? 0 : time;

	var dropFrames = Math.round(fps * 0.066666),
	    timeBase = Math.round(fps),
	    framesPer24Hours = Math.round(fps * 3600) * 24,
	    framesPer10Minutes = Math.round(fps * 600),
	    frameSep = isDropFrame(fps) ? ';' : ':',
	    hours = void 0,
	    minutes = void 0,
	    seconds = void 0,
	    frames = void 0,
	    f = Math.round(time * fps);

	if (isDropFrame(fps)) {

		if (f < 0) {
			f = framesPer24Hours + f;
		}

		f = f % framesPer24Hours;

		var d = Math.floor(f / framesPer10Minutes);
		var m = f % framesPer10Minutes;
		f = f + dropFrames * 9 * d;
		if (m > dropFrames) {
			f = f + dropFrames * Math.floor((m - dropFrames) / Math.round(timeBase * 60 - dropFrames));
		}

		var timeBaseDivision = Math.floor(f / timeBase);

		hours = Math.floor(Math.floor(timeBaseDivision / 60) / 60);
		minutes = Math.floor(timeBaseDivision / 60) % 60;

		if (showFrameCount) {
			seconds = timeBaseDivision % 60;
		} else {
			seconds = Math.floor(f / timeBase % 60).toFixed(secondsDecimalLength);
		}
	} else {
		hours = Math.floor(time / 3600) % 24;
		minutes = Math.floor(time / 60) % 60;
		if (showFrameCount) {
			seconds = Math.floor(time % 60);
		} else {
			seconds = Math.floor(time % 60).toFixed(secondsDecimalLength);
		}
	}
	hours = hours <= 0 ? 0 : hours;
	minutes = minutes <= 0 ? 0 : minutes;
	seconds = seconds <= 0 ? 0 : seconds;

	seconds = seconds === 60 ? 0 : seconds;
	minutes = minutes === 60 ? 0 : minutes;

	var timeFormatFrags = timeFormat.split(':');
	var timeFormatSettings = {};
	for (var i = 0, total = timeFormatFrags.length; i < total; ++i) {
		var unique = '';
		for (var j = 0, t = timeFormatFrags[i].length; j < t; j++) {
			if (unique.indexOf(timeFormatFrags[i][j]) < 0) {
				unique += timeFormatFrags[i][j];
			}
		}
		if (~['f', 's', 'm', 'h'].indexOf(unique)) {
			timeFormatSettings[unique] = timeFormatFrags[i].length;
		}
	}

	var result = forceHours || hours > 0 ? (hours < 10 && timeFormatSettings.h > 1 ? '0' + hours : hours) + ':' : '';
	result += (minutes < 10 && timeFormatSettings.m > 1 ? '0' + minutes : minutes) + ':';
	result += '' + (seconds < 10 && timeFormatSettings.s > 1 ? '0' + seconds : seconds);

	if (showFrameCount) {
		frames = (f % timeBase).toFixed(0);
		frames = frames <= 0 ? 0 : frames;
		result += frames < 10 && timeFormatSettings.f ? frameSep + '0' + frames : '' + frameSep + frames;
	}

	return result;
}

function timeCodeToSeconds(time) {
	var fps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 25;


	if (typeof time !== 'string') {
		throw new TypeError('Time must be a string');
	}

	if (time.indexOf(';') > 0) {
		time = time.replace(';', ':');
	}

	if (!/\d{2}(\:\d{2}){0,3}/i.test(time)) {
		throw new TypeError('Time code must have the format `00:00:00`');
	}

	var parts = time.split(':');

	var output = void 0,
	    hours = 0,
	    minutes = 0,
	    seconds = 0,
	    frames = 0,
	    totalMinutes = 0,
	    dropFrames = Math.round(fps * 0.066666),
	    timeBase = Math.round(fps),
	    hFrames = timeBase * 3600,
	    mFrames = timeBase * 60;

	switch (parts.length) {
		default:
		case 1:
			seconds = parseInt(parts[0], 10);
			break;
		case 2:
			minutes = parseInt(parts[0], 10);
			seconds = parseInt(parts[1], 10);
			break;
		case 3:
			hours = parseInt(parts[0], 10);
			minutes = parseInt(parts[1], 10);
			seconds = parseInt(parts[2], 10);
			break;
		case 4:
			hours = parseInt(parts[0], 10);
			minutes = parseInt(parts[1], 10);
			seconds = parseInt(parts[2], 10);
			frames = parseInt(parts[3], 10);
			break;
	}

	if (isDropFrame(fps)) {
		totalMinutes = 60 * hours + minutes;
		output = hFrames * hours + mFrames * minutes + timeBase * seconds + frames - dropFrames * (totalMinutes - Math.floor(totalMinutes / 10));
	} else {
		output = (hFrames * hours + mFrames * minutes + fps * seconds + frames) / fps;
	}

	return parseFloat(output.toFixed(3));
}

function calculateTimeFormat(time, options) {
	var fps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 25;


	time = !time || typeof time !== 'number' || time < 0 ? 0 : time;

	var hours = Math.floor(time / 3600) % 24,
	    minutes = Math.floor(time / 60) % 60,
	    seconds = Math.floor(time % 60),
	    frames = Math.floor((time % 1 * fps).toFixed(3)),
	    lis = [[frames, 'f'], [seconds, 's'], [minutes, 'm'], [hours, 'h']];

	var format = options.timeFormat,
	    firstTwoPlaces = format[1] === format[0],
	    separatorIndex = firstTwoPlaces ? 2 : 1,
	    separator = format.length < separatorIndex ? format[separatorIndex] : ':',
	    firstChar = format[0],
	    required = false;

	for (var i = 0, len = lis.length; i < len; i++) {
		if (~format.indexOf(lis[i][1])) {
			required = true;
		} else if (required) {
			var hasNextValue = false;
			for (var j = i; j < len; j++) {
				if (lis[j][0] > 0) {
					hasNextValue = true;
					break;
				}
			}

			if (!hasNextValue) {
				break;
			}

			if (!firstTwoPlaces) {
				format = firstChar + format;
			}
			format = lis[i][1] + separator + format;
			if (firstTwoPlaces) {
				format = lis[i][1] + format;
			}
			firstChar = lis[i][1];
		}
	}

	options.timeFormat = format;
}

function convertSMPTEtoSeconds(SMPTE) {

	if (typeof SMPTE !== 'string') {
		throw new TypeError('Argument must be a string value');
	}

	SMPTE = SMPTE.replace(',', '.');

	var decimalLen = ~SMPTE.indexOf('.') ? SMPTE.split('.')[1].length : 0;

	var secs = 0,
	    multiplier = 1;

	SMPTE = SMPTE.split(':').reverse();

	for (var i = 0, total = SMPTE.length; i < total; i++) {
		multiplier = 1;
		if (i > 0) {
			multiplier = Math.pow(60, i);
		}
		secs += Number(SMPTE[i]) * multiplier;
	}
	return Number(secs.toFixed(decimalLen));
}

_mejs2.default.Utils = _mejs2.default.Utils || {};
_mejs2.default.Utils.secondsToTimeCode = secondsToTimeCode;
_mejs2.default.Utils.timeCodeToSeconds = timeCodeToSeconds;
_mejs2.default.Utils.calculateTimeFormat = calculateTimeFormat;
_mejs2.default.Utils.convertSMPTEtoSeconds = convertSMPTEtoSeconds;

},{"7":7}]},{},[29,6,5,15,23,20,19,21,22,24,16,18,17,9,10,11,12,13,14]);
                                                                                                                                                                                                                                                                                                                                                                                                                             mediaelement/mediaelement-and-player.min.js                                                         0000644                 00000464465 15212564044 0015026 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * MediaElement.js
 * http://www.mediaelementjs.com/
 *
 * Wrapper that mimics native HTML5 MediaElement (audio and video)
 * using a variety of technologies (pure JavaScript, Flash, iframe)
 *
 * Copyright 2010-2017, John Dyer (http://j.hn/)
 * License: MIT
 *
 */
!function r(a,s,l){function d(n,e){if(!s[n]){if(!a[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(u)return u(n,!0);var o=new Error("Cannot find module '"+n+"'");throw o.code="MODULE_NOT_FOUND",o}var i=s[n]={exports:{}};a[n][0].call(i.exports,function(e){var t=a[n][1][e];return d(t||e)},i,i.exports,r,a,s,l)}return s[n].exports}for(var u="function"==typeof require&&require,e=0;e<l.length;e++)d(l[e]);return d}({1:[function(e,t,n){},{}],2:[function(i,r,e){(function(e){var t,n=void 0!==e?e:"undefined"!=typeof window?window:{},o=i(1);"undefined"!=typeof document?t=document:(t=n["__GLOBAL_DOCUMENT_CACHE@4"])||(t=n["__GLOBAL_DOCUMENT_CACHE@4"]=o),r.exports=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{1:1}],3:[function(e,n,t){(function(e){var t;t="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},n.exports=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(e,n,t){!function(e){var t=setTimeout;function o(){}function r(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],d(e,this)}function i(n,o){for(;3===n._state;)n=n._value;0!==n._state?(n._handled=!0,r._immediateFn(function(){var e=1===n._state?o.onFulfilled:o.onRejected;if(null!==e){var t;try{t=e(n._value)}catch(e){return void s(o.promise,e)}a(o.promise,t)}else(1===n._state?a:s)(o.promise,n._value)})):n._deferreds.push(o)}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof r)return t._state=3,t._value=e,void l(t);if("function"==typeof n)return void d((o=n,i=e,function(){o.apply(i,arguments)}),t)}t._state=1,t._value=e,l(t)}catch(e){s(t,e)}var o,i}function s(e,t){e._state=2,e._value=t,l(e)}function l(e){2===e._state&&0===e._deferreds.length&&r._immediateFn(function(){e._handled||r._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)i(e,e._deferreds[t]);e._deferreds=null}function d(e,t){var n=!1;try{e(function(e){n||(n=!0,a(t,e))},function(e){n||(n=!0,s(t,e))})}catch(e){if(n)return;n=!0,s(t,e)}}r.prototype.catch=function(e){return this.then(null,e)},r.prototype.then=function(e,t){var n=new this.constructor(o);return i(this,new function(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}(e,t,n)),n},r.all=function(e){var s=Array.prototype.slice.call(e);return new r(function(o,i){if(0===s.length)return o([]);var r=s.length;function a(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){a(t,e)},i)}s[t]=e,0==--r&&o(s)}catch(e){i(e)}}for(var e=0;e<s.length;e++)a(e,s[e])})},r.resolve=function(t){return t&&"object"==typeof t&&t.constructor===r?t:new r(function(e){e(t)})},r.reject=function(n){return new r(function(e,t){t(n)})},r.race=function(i){return new r(function(e,t){for(var n=0,o=i.length;n<o;n++)i[n].then(e,t)})},r._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){t(e,0)},r._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},r._setImmediateFn=function(e){r._immediateFn=e},r._setUnhandledRejectionFn=function(e){r._unhandledRejectionFn=e},void 0!==n&&n.exports?n.exports=r:e.Promise||(e.Promise=r)}(this)},{}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e(7),r=(o=i)&&o.__esModule?o:{default:o},s=e(15),l=e(27);var d={lang:"en",en:s.EN,language:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(null!=t&&t.length){if("string"!=typeof t[0])throw new TypeError("Language code must be a string value");if(!/^[a-z]{2,3}((\-|_)[a-z]{2})?$/i.test(t[0]))throw new TypeError("Language code must have format 2-3 letters and. optionally, hyphen, underscore followed by 2 more letters");d.lang=t[0],void 0===d[t[0]]?(t[1]=null!==t[1]&&void 0!==t[1]&&"object"===a(t[1])?t[1]:{},d[t[0]]=(0,l.isObjectEmpty)(t[1])?s.EN:t[1]):null!==t[1]&&void 0!==t[1]&&"object"===a(t[1])&&(d[t[0]]=t[1])}return d.lang},t:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof e&&e.length){var n=void 0,o=void 0,i=d.language(),r=function(e,t,n){return"object"!==(void 0===e?"undefined":a(e))||"number"!=typeof t||"number"!=typeof n?e:[function(){return arguments.length<=1?void 0:arguments[1]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return 0===(arguments.length<=0?void 0:arguments[0])||1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1&&(arguments.length<=0?void 0:arguments[0])%100!=11?arguments.length<=1?void 0:arguments[1]:0!==(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])||11===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])||12===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:2<(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])<20?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:0===(arguments.length<=0?void 0:arguments[0])||0<(arguments.length<=0?void 0:arguments[0])%100&&(arguments.length<=0?void 0:arguments[0])%100<20?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1&&(arguments.length<=0?void 0:arguments[0])%100!=11?arguments.length<=1?void 0:arguments[1]:2<=(arguments.length<=0?void 0:arguments[0])%10&&((arguments.length<=0?void 0:arguments[0])%100<10||20<=(arguments.length<=0?void 0:arguments[0])%100)?arguments.length<=2?void 0:arguments[2]:[3]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1&&(arguments.length<=0?void 0:arguments[0])%100!=11?arguments.length<=1?void 0:arguments[1]:2<=(arguments.length<=0?void 0:arguments[0])%10&&(arguments.length<=0?void 0:arguments[0])%10<=4&&((arguments.length<=0?void 0:arguments[0])%100<10||20<=(arguments.length<=0?void 0:arguments[0])%100)?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2<=(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])<=4?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2<=(arguments.length<=0?void 0:arguments[0])%10&&(arguments.length<=0?void 0:arguments[0])%10<=4&&((arguments.length<=0?void 0:arguments[0])%100<10||20<=(arguments.length<=0?void 0:arguments[0])%100)?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return(arguments.length<=0?void 0:arguments[0])%100==1?arguments.length<=2?void 0:arguments[2]:(arguments.length<=0?void 0:arguments[0])%100==2?arguments.length<=3?void 0:arguments[3]:(arguments.length<=0?void 0:arguments[0])%100==3||(arguments.length<=0?void 0:arguments[0])%100==4?arguments.length<=4?void 0:arguments[4]:arguments.length<=1?void 0:arguments[1]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:2<(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])<7?arguments.length<=3?void 0:arguments[3]:6<(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])<11?arguments.length<=4?void 0:arguments[4]:arguments.length<=5?void 0:arguments[5]},function(){return 0===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=3?void 0:arguments[3]:3<=(arguments.length<=0?void 0:arguments[0])%100&&(arguments.length<=0?void 0:arguments[0])%100<=10?arguments.length<=4?void 0:arguments[4]:11<=(arguments.length<=0?void 0:arguments[0])%100?arguments.length<=5?void 0:arguments[5]:arguments.length<=6?void 0:arguments[6]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:0===(arguments.length<=0?void 0:arguments[0])||1<(arguments.length<=0?void 0:arguments[0])%100&&(arguments.length<=0?void 0:arguments[0])%100<11?arguments.length<=2?void 0:arguments[2]:10<(arguments.length<=0?void 0:arguments[0])%100&&(arguments.length<=0?void 0:arguments[0])%100<20?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1?arguments.length<=1?void 0:arguments[1]:(arguments.length<=0?void 0:arguments[0])%10==2?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 11!==(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])%10==1?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2<=(arguments.length<=0?void 0:arguments[0])%10&&(arguments.length<=0?void 0:arguments[0])%10<=4&&((arguments.length<=0?void 0:arguments[0])%100<10||20<=(arguments.length<=0?void 0:arguments[0])%100)?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:8!==(arguments.length<=0?void 0:arguments[0])&&11!==(arguments.length<=0?void 0:arguments[0])?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return 0===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:3===(arguments.length<=0?void 0:arguments[0])?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return 0===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]}][n].apply(null,[t].concat(e))};return void 0!==d[i]&&(n=d[i][e],null!==t&&"number"==typeof t&&(o=d[i]["mejs.plural-form"],n=r.apply(null,[n,t,o]))),!n&&d.en&&(n=d.en[e],null!==t&&"number"==typeof t&&(o=d.en["mejs.plural-form"],n=r.apply(null,[n,t,o]))),n=n||e,null!==t&&"number"==typeof t&&(n=n.replace("%1",t)),(0,l.escapeHTML)(n)}return e}};r.default.i18n=d,"undefined"!=typeof mejsL10n&&r.default.i18n.language(mejsL10n.language,mejsL10n.strings),n.default=d},{15:15,27:27,7:7}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F=o(e(3)),j=o(e(2)),I=o(e(7)),M=e(27),O=e(28),D=e(8),R=e(25);function o(e){return e&&e.__esModule?e:{default:e}}var i=function e(t,n,o){var c=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var f=this;o=Array.isArray(o)?o:null,f.defaults={renderers:[],fakeNodeName:"mediaelementwrapper",pluginPath:"build/",shimScriptAccess:"sameDomain"},n=Object.assign(f.defaults,n),f.mediaElement=j.default.createElement(n.fakeNodeName);var i=t,r=!1;if("string"==typeof t?f.mediaElement.originalNode=j.default.getElementById(t):i=(f.mediaElement.originalNode=t).id,void 0===f.mediaElement.originalNode||null===f.mediaElement.originalNode)return null;f.mediaElement.options=n,i=i||"mejs_"+Math.random().toString().slice(2),f.mediaElement.originalNode.setAttribute("id",i+"_from_mejs");var a=f.mediaElement.originalNode.tagName.toLowerCase();-1<["video","audio"].indexOf(a)&&!f.mediaElement.originalNode.getAttribute("preload")&&f.mediaElement.originalNode.setAttribute("preload","none"),f.mediaElement.originalNode.parentNode.insertBefore(f.mediaElement,f.mediaElement.originalNode),f.mediaElement.appendChild(f.mediaElement.originalNode);var s=function(t,e){if("https:"===F.default.location.protocol&&0===t.indexOf("http:")&&R.IS_IOS&&-1<I.default.html5media.mediaTypes.indexOf(e)){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===this.readyState&&200===this.status){var e=(F.default.URL||F.default.webkitURL).createObjectURL(this.response);return f.mediaElement.originalNode.setAttribute("src",e),e}return t},n.open("GET",t),n.responseType="blob",n.send()}return t},l=void 0;if(null!==o)l=o;else if(null!==f.mediaElement.originalNode)switch(l=[],f.mediaElement.originalNode.nodeName.toLowerCase()){case"iframe":l.push({type:"",src:f.mediaElement.originalNode.getAttribute("src")});break;case"audio":case"video":var d=f.mediaElement.originalNode.children.length,u=f.mediaElement.originalNode.getAttribute("src");if(u){var p=f.mediaElement.originalNode,m=(0,O.formatType)(u,p.getAttribute("type"));l.push({type:m,src:s(u,m)})}for(var h=0;h<d;h++){var v=f.mediaElement.originalNode.children[h];if("source"===v.tagName.toLowerCase()){var g=v.getAttribute("src"),y=(0,O.formatType)(g,v.getAttribute("type"));l.push({type:y,src:s(g,y)})}}}f.mediaElement.id=i,f.mediaElement.renderers={},f.mediaElement.events={},f.mediaElement.promises=[],f.mediaElement.renderer=null,f.mediaElement.rendererName=null,f.mediaElement.changeRenderer=function(e,t){var n=c,o=2<Object.keys(t[0]).length?t[0]:t[0].src;if(void 0!==n.mediaElement.renderer&&null!==n.mediaElement.renderer&&n.mediaElement.renderer.name===e)return n.mediaElement.renderer.pause(),n.mediaElement.renderer.stop&&n.mediaElement.renderer.stop(),n.mediaElement.renderer.show(),n.mediaElement.renderer.setSrc(o),!0;void 0!==n.mediaElement.renderer&&null!==n.mediaElement.renderer&&(n.mediaElement.renderer.pause(),n.mediaElement.renderer.stop&&n.mediaElement.renderer.stop(),n.mediaElement.renderer.hide());var i=n.mediaElement.renderers[e],r=null;if(null!=i)return i.show(),i.setSrc(o),n.mediaElement.renderer=i,n.mediaElement.rendererName=e,!0;for(var a=n.mediaElement.options.renderers.length?n.mediaElement.options.renderers:D.renderer.order,s=0,l=a.length;s<l;s++){var d=a[s];if(d===e){r=D.renderer.renderers[d];var u=Object.assign(r.options,n.mediaElement.options);return(i=r.create(n.mediaElement,u,t)).name=e,n.mediaElement.renderers[r.name]=i,n.mediaElement.renderer=i,n.mediaElement.rendererName=e,i.show(),!0}}return!1},f.mediaElement.setSize=function(e,t){void 0!==f.mediaElement.renderer&&null!==f.mediaElement.renderer&&f.mediaElement.renderer.setSize(e,t)},f.mediaElement.generateError=function(e,t){e=e||"",t=Array.isArray(t)?t:[];var n=(0,M.createEvent)("error",f.mediaElement);n.message=e,n.urls=t,f.mediaElement.dispatchEvent(n),r=!0};var E=I.default.html5media.properties,b=I.default.html5media.methods,S=function(t,e,n,o){var i=t[e];Object.defineProperty(t,e,{get:function(){return n.apply(t,[i])},set:function(e){return i=o.apply(t,[e])}})},x=function(e){if("src"!==e){var t=""+e.substring(0,1).toUpperCase()+e.substring(1),n=function(){return void 0!==f.mediaElement.renderer&&null!==f.mediaElement.renderer&&"function"==typeof f.mediaElement.renderer["get"+t]?f.mediaElement.renderer["get"+t]():null},o=function(e){void 0!==f.mediaElement.renderer&&null!==f.mediaElement.renderer&&"function"==typeof f.mediaElement.renderer["set"+t]&&f.mediaElement.renderer["set"+t](e)};S(f.mediaElement,e,n,o),f.mediaElement["get"+t]=n,f.mediaElement["set"+t]=o}},w=function(){return void 0!==f.mediaElement.renderer&&null!==f.mediaElement.renderer?f.mediaElement.renderer.getSrc():null},P=function(e){var t=[];if("string"==typeof e)t.push({src:e,type:e?(0,O.getTypeFromFile)(e):""});else if("object"===(void 0===e?"undefined":L(e))&&void 0!==e.src){var n=(0,O.absolutizeUrl)(e.src),o=e.type,i=Object.assign(e,{src:n,type:""!==o&&null!=o||!n?o:(0,O.getTypeFromFile)(n)});t.push(i)}else if(Array.isArray(e))for(var r=0,a=e.length;r<a;r++){var s=(0,O.absolutizeUrl)(e[r].src),l=e[r].type,d=Object.assign(e[r],{src:s,type:""!==l&&null!=l||!s?l:(0,O.getTypeFromFile)(s)});t.push(d)}var u=D.renderer.select(t,f.mediaElement.options.renderers.length?f.mediaElement.options.renderers:[]),c=void 0;if(f.mediaElement.paused||null==f.mediaElement.src||""===f.mediaElement.src||(f.mediaElement.pause(),c=(0,M.createEvent)("pause",f.mediaElement),f.mediaElement.dispatchEvent(c)),f.mediaElement.originalNode.src=t[0].src||"",null!==u||!t[0].src)return!(null==t[0].src||""===t[0].src)?f.mediaElement.changeRenderer(u.rendererName,t):null;f.mediaElement.generateError("No renderer found",t)},T=function(e,t){try{if("play"!==e||"native_dash"!==f.mediaElement.rendererName&&"native_hls"!==f.mediaElement.rendererName&&"vimeo_iframe"!==f.mediaElement.rendererName)f.mediaElement.renderer[e](t);else{var n=f.mediaElement.renderer[e](t);n&&"function"==typeof n.then&&n.catch(function(){f.mediaElement.paused&&setTimeout(function(){var e=f.mediaElement.renderer.play();void 0!==e&&e.catch(function(){f.mediaElement.renderer.paused||f.mediaElement.renderer.pause()})},150)})}}catch(e){f.mediaElement.generateError(e,l)}},C=function(o){f.mediaElement[o]=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return void 0!==f.mediaElement.renderer&&null!==f.mediaElement.renderer&&"function"==typeof f.mediaElement.renderer[o]&&(f.mediaElement.promises.length?Promise.all(f.mediaElement.promises).then(function(){T(o,t)}).catch(function(e){f.mediaElement.generateError(e,l)}):T(o,t)),null}};S(f.mediaElement,"src",w,P),f.mediaElement.getSrc=w,f.mediaElement.setSrc=P;for(var k=0,_=E.length;k<_;k++)x(E[k]);for(var N=0,A=b.length;N<A;N++)C(b[N]);return f.mediaElement.addEventListener=function(e,t){f.mediaElement.events[e]=f.mediaElement.events[e]||[],f.mediaElement.events[e].push(t)},f.mediaElement.removeEventListener=function(e,t){if(!e)return f.mediaElement.events={},!0;var n=f.mediaElement.events[e];if(!n)return!0;if(!t)return f.mediaElement.events[e]=[],!0;for(var o=0;o<n.length;o++)if(n[o]===t)return f.mediaElement.events[e].splice(o,1),!0;return!1},f.mediaElement.dispatchEvent=function(e){var t=f.mediaElement.events[e.type];if(t)for(var n=0;n<t.length;n++)t[n].apply(null,[e])},f.mediaElement.destroy=function(){var e=f.mediaElement.originalNode.cloneNode(!0),t=f.mediaElement.parentElement;e.removeAttribute("id"),e.remove(),f.mediaElement.remove(),t.appendChild(e)},l.length&&(f.mediaElement.src=l),f.mediaElement.promises.length?Promise.all(f.mediaElement.promises).then(function(){f.mediaElement.options.success&&f.mediaElement.options.success(f.mediaElement,f.mediaElement.originalNode)}).catch(function(){r&&f.mediaElement.options.error&&f.mediaElement.options.error(f.mediaElement,f.mediaElement.originalNode)}):(f.mediaElement.options.success&&f.mediaElement.options.success(f.mediaElement,f.mediaElement.originalNode),r&&f.mediaElement.options.error&&f.mediaElement.options.error(f.mediaElement,f.mediaElement.originalNode)),f.mediaElement};F.default.MediaElement=i,I.default.MediaElement=i,n.default=i},{2:2,25:25,27:27,28:28,3:3,7:7,8:8}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o,i=e(3);var r={version:"4.2.17",html5media:{properties:["volume","src","currentTime","muted","duration","paused","ended","buffered","error","networkState","readyState","seeking","seekable","currentSrc","preload","bufferedBytes","bufferedTime","initialTime","startOffsetTime","defaultPlaybackRate","playbackRate","played","autoplay","loop","controls"],readOnlyProperties:["duration","paused","ended","buffered","error","networkState","readyState","seeking","seekable"],methods:["load","play","pause","canPlayType"],events:["loadstart","durationchange","loadedmetadata","loadeddata","progress","canplay","canplaythrough","suspend","abort","error","emptied","stalled","play","playing","pause","waiting","seeking","seeked","timeupdate","ended","ratechange","volumechange"],mediaTypes:["audio/mp3","audio/ogg","audio/oga","audio/wav","audio/x-wav","audio/wave","audio/x-pn-wav","audio/mpeg","audio/mp4","video/mp4","video/webm","video/ogg","video/ogv"]}};((o=i)&&o.__esModule?o:{default:o}).default.mejs=r,n.default=r},{3:3}],8:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.renderer=void 0;var o,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}}(),a=e(7),s=(o=a)&&o.__esModule?o:{default:o};var l=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.renderers={},this.order=[]}return r(e,[{key:"add",value:function(e){if(void 0===e.name)throw new TypeError("renderer must contain at least `name` property");this.renderers[e.name]=e,this.order.push(e.name)}},{key:"select",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],n=t.length;if(t=t.length?t:this.order,!n){var o=[/^(html5|native)/i,/^flash/i,/iframe$/i],i=function(e){for(var t=0,n=o.length;t<n;t++)if(o[t].test(e))return t;return o.length};t.sort(function(e,t){return i(e)-i(t)})}for(var r=0,a=t.length;r<a;r++){var s=t[r],l=this.renderers[s];if(null!=l)for(var d=0,u=e.length;d<u;d++)if("function"==typeof l.canPlayType&&"string"==typeof e[d].type&&l.canPlayType(e[d].type))return{rendererName:l.name,src:e[d].src}}return null}},{key:"order",set:function(e){if(!Array.isArray(e))throw new TypeError("order must be an array of strings.");this._order=e},get:function(){return this._order}},{key:"renderers",set:function(e){if(null!==e&&"object"!==(void 0===e?"undefined":i(e)))throw new TypeError("renderers must be an array of objects.");this._renderers=e},get:function(){return this._renderers}}]),e}(),d=n.renderer=new l;s.default.Renderers=d},{7:7}],9:[function(e,t,n){"use strict";var f=a(e(3)),p=a(e(2)),i=a(e(5)),o=e(16),r=a(o),m=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}}(e(25)),h=e(27),v=e(26),g=e(28);function a(e){return e&&e.__esModule?e:{default:e}}Object.assign(o.config,{usePluginFullScreen:!0,fullscreenText:null,useFakeFullscreen:!1}),Object.assign(r.default.prototype,{isFullScreen:!1,isNativeFullScreen:!1,isInIframe:!1,isPluginClickThroughCreated:!1,fullscreenMode:"",containerSizeTimeout:null,buildfullscreen:function(n){if(n.isVideo){n.isInIframe=f.default.location!==f.default.parent.location,n.detectFullscreenMode();var o=this,e=(0,h.isString)(o.options.fullscreenText)?o.options.fullscreenText:i.default.t("mejs.fullscreen"),t=p.default.createElement("div");if(t.className=o.options.classPrefix+"button "+o.options.classPrefix+"fullscreen-button",t.innerHTML='<button type="button" aria-controls="'+o.id+'" title="'+e+'" aria-label="'+e+'" tabindex="0"></button>',o.addControlElement(t,"fullscreen"),t.addEventListener("click",function(){m.HAS_TRUE_NATIVE_FULLSCREEN&&m.IS_FULLSCREEN||n.isFullScreen?n.exitFullScreen():n.enterFullScreen()}),n.fullscreenBtn=t,o.options.keyActions.push({keys:[70],action:function(e,t,n,o){o.ctrlKey||void 0!==e.enterFullScreen&&(e.isFullScreen?e.exitFullScreen():e.enterFullScreen())}}),o.exitFullscreenCallback=function(e){var t=e.which||e.keyCode||0;o.options.enableKeyboard&&27===t&&(m.HAS_TRUE_NATIVE_FULLSCREEN&&m.IS_FULLSCREEN||o.isFullScreen)&&n.exitFullScreen()},o.globalBind("keydown",o.exitFullscreenCallback),o.normalHeight=0,o.normalWidth=0,m.HAS_TRUE_NATIVE_FULLSCREEN){n.globalBind(m.FULLSCREEN_EVENT_NAME,function(){n.isFullScreen&&(m.isFullScreen()?(n.isNativeFullScreen=!0,n.setControlsSize()):(n.isNativeFullScreen=!1,n.exitFullScreen()))})}}},cleanfullscreen:function(e){e.exitFullScreen(),e.globalUnbind("keydown",e.exitFullscreenCallback)},detectFullscreenMode:function(){var e=null!==this.media.rendererName&&/(native|html5)/i.test(this.media.rendererName),t="";return m.HAS_TRUE_NATIVE_FULLSCREEN&&e?t="native-native":m.HAS_TRUE_NATIVE_FULLSCREEN&&!e?t="plugin-native":this.usePluginFullScreen&&m.SUPPORT_POINTER_EVENTS&&(t="plugin-click"),this.fullscreenMode=t},enterFullScreen:function(){var o=this,e=null!==o.media.rendererName&&/(html5|native)/i.test(o.media.rendererName),t=getComputedStyle(o.getElement(o.container));if(o.isVideo)if(!1===o.options.useFakeFullscreen&&(m.IS_IOS||m.IS_SAFARI)&&m.HAS_IOS_FULLSCREEN&&"function"==typeof o.media.originalNode.webkitEnterFullscreen&&o.media.originalNode.canPlayType((0,g.getTypeFromFile)(o.media.getSrc())))o.media.originalNode.webkitEnterFullscreen();else{if((0,v.addClass)(p.default.documentElement,o.options.classPrefix+"fullscreen"),(0,v.addClass)(o.getElement(o.container),o.options.classPrefix+"container-fullscreen"),o.normalHeight=parseFloat(t.height),o.normalWidth=parseFloat(t.width),"native-native"!==o.fullscreenMode&&"plugin-native"!==o.fullscreenMode||(m.requestFullScreen(o.getElement(o.container)),o.isInIframe&&setTimeout(function e(){if(o.isNativeFullScreen){var t=f.default.innerWidth||p.default.documentElement.clientWidth||p.default.body.clientWidth,n=screen.width;.002*n<Math.abs(n-t)?o.exitFullScreen():setTimeout(e,500)}},1e3)),o.getElement(o.container).style.width="100%",o.getElement(o.container).style.height="100%",o.containerSizeTimeout=setTimeout(function(){o.getElement(o.container).style.width="100%",o.getElement(o.container).style.height="100%",o.setControlsSize()},500),e)o.node.style.width="100%",o.node.style.height="100%";else for(var n=o.getElement(o.container).querySelectorAll("embed, object, video"),i=n.length,r=0;r<i;r++)n[r].style.width="100%",n[r].style.height="100%";o.options.setDimensions&&"function"==typeof o.media.setSize&&o.media.setSize(screen.width,screen.height);for(var a=o.getElement(o.layers).children,s=a.length,l=0;l<s;l++)a[l].style.width="100%",a[l].style.height="100%";o.fullscreenBtn&&((0,v.removeClass)(o.fullscreenBtn,o.options.classPrefix+"fullscreen"),(0,v.addClass)(o.fullscreenBtn,o.options.classPrefix+"unfullscreen")),o.setControlsSize(),o.isFullScreen=!0;var d=Math.min(screen.width/o.width,screen.height/o.height),u=o.getElement(o.container).querySelector("."+o.options.classPrefix+"captions-text");u&&(u.style.fontSize=100*d+"%",u.style.lineHeight="normal",o.getElement(o.container).querySelector("."+o.options.classPrefix+"captions-position").style.bottom=(screen.height-o.normalHeight)/2-o.getElement(o.controls).offsetHeight/2+d+15+"px");var c=(0,h.createEvent)("enteredfullscreen",o.getElement(o.container));o.getElement(o.container).dispatchEvent(c)}},exitFullScreen:function(){var e=this,t=null!==e.media.rendererName&&/(native|html5)/i.test(e.media.rendererName);if(e.isVideo){if(clearTimeout(e.containerSizeTimeout),m.HAS_TRUE_NATIVE_FULLSCREEN&&(m.IS_FULLSCREEN||e.isFullScreen)&&m.cancelFullScreen(),(0,v.removeClass)(p.default.documentElement,e.options.classPrefix+"fullscreen"),(0,v.removeClass)(e.getElement(e.container),e.options.classPrefix+"container-fullscreen"),e.options.setDimensions){if(e.getElement(e.container).style.width=e.normalWidth+"px",e.getElement(e.container).style.height=e.normalHeight+"px",t)e.node.style.width=e.normalWidth+"px",e.node.style.height=e.normalHeight+"px";else for(var n=e.getElement(e.container).querySelectorAll("embed, object, video"),o=n.length,i=0;i<o;i++)n[i].style.width=e.normalWidth+"px",n[i].style.height=e.normalHeight+"px";"function"==typeof e.media.setSize&&e.media.setSize(e.normalWidth,e.normalHeight);for(var r=e.getElement(e.layers).children,a=r.length,s=0;s<a;s++)r[s].style.width=e.normalWidth+"px",r[s].style.height=e.normalHeight+"px"}e.fullscreenBtn&&((0,v.removeClass)(e.fullscreenBtn,e.options.classPrefix+"unfullscreen"),(0,v.addClass)(e.fullscreenBtn,e.options.classPrefix+"fullscreen")),e.setControlsSize(),e.isFullScreen=!1;var l=e.getElement(e.container).querySelector("."+e.options.classPrefix+"captions-text");l&&(l.style.fontSize="",l.style.lineHeight="",e.getElement(e.container).querySelector("."+e.options.classPrefix+"captions-position").style.bottom="");var d=(0,h.createEvent)("exitedfullscreen",e.getElement(e.container));e.getElement(e.container).dispatchEvent(d)}}})},{16:16,2:2,25:25,26:26,27:27,28:28,3:3,5:5}],10:[function(e,t,n){"use strict";var c=r(e(2)),o=e(16),i=r(o),f=r(e(5)),p=e(27),m=e(26);function r(e){return e&&e.__esModule?e:{default:e}}Object.assign(o.config,{playText:null,pauseText:null}),Object.assign(i.default.prototype,{buildplaypause:function(e,t,n,o){var i=this,r=i.options,a=(0,p.isString)(r.playText)?r.playText:f.default.t("mejs.play"),s=(0,p.isString)(r.pauseText)?r.pauseText:f.default.t("mejs.pause"),l=c.default.createElement("div");l.className=i.options.classPrefix+"button "+i.options.classPrefix+"playpause-button "+i.options.classPrefix+"play",l.innerHTML='<button type="button" aria-controls="'+i.id+'" title="'+a+'" aria-label="'+s+'" tabindex="0"></button>',l.addEventListener("click",function(){i.paused?i.play():i.pause()});var d=l.querySelector("button");function u(e){"play"===e?((0,m.removeClass)(l,i.options.classPrefix+"play"),(0,m.removeClass)(l,i.options.classPrefix+"replay"),(0,m.addClass)(l,i.options.classPrefix+"pause"),d.setAttribute("title",s),d.setAttribute("aria-label",s)):((0,m.removeClass)(l,i.options.classPrefix+"pause"),(0,m.removeClass)(l,i.options.classPrefix+"replay"),(0,m.addClass)(l,i.options.classPrefix+"play"),d.setAttribute("title",a),d.setAttribute("aria-label",a))}i.addControlElement(l,"playpause"),u("pse"),o.addEventListener("loadedmetadata",function(){-1===o.rendererName.indexOf("flash")&&u("pse")}),o.addEventListener("play",function(){u("play")}),o.addEventListener("playing",function(){u("play")}),o.addEventListener("pause",function(){u("pse")}),o.addEventListener("ended",function(){e.options.loop||((0,m.removeClass)(l,i.options.classPrefix+"pause"),(0,m.removeClass)(l,i.options.classPrefix+"play"),(0,m.addClass)(l,i.options.classPrefix+"replay"),d.setAttribute("title",a),d.setAttribute("aria-label",a))})}})},{16:16,2:2,26:26,27:27,5:5}],11:[function(e,t,n){"use strict";var p=r(e(2)),o=e(16),i=r(o),m=r(e(5)),y=e(25),E=e(30),b=e(26);function r(e){return e&&e.__esModule?e:{default:e}}Object.assign(o.config,{enableProgressTooltip:!0,useSmoothHover:!0,forceLive:!1}),Object.assign(i.default.prototype,{buildprogress:function(h,s,e,d){var u=0,v=!1,c=!1,g=this,t=h.options.autoRewind,n=h.options.enableProgressTooltip?'<span class="'+g.options.classPrefix+'time-float"><span class="'+g.options.classPrefix+'time-float-current">00:00</span><span class="'+g.options.classPrefix+'time-float-corner"></span></span>':"",o=p.default.createElement("div");o.className=g.options.classPrefix+"time-rail",o.innerHTML='<span class="'+g.options.classPrefix+"time-total "+g.options.classPrefix+'time-slider"><span class="'+g.options.classPrefix+'time-buffering"></span><span class="'+g.options.classPrefix+'time-loaded"></span><span class="'+g.options.classPrefix+'time-current"></span><span class="'+g.options.classPrefix+'time-hovered no-hover"></span><span class="'+g.options.classPrefix+'time-handle"><span class="'+g.options.classPrefix+'time-handle-content"></span></span>'+n+"</span>",g.addControlElement(o,"progress"),g.options.keyActions.push({keys:[37,227],action:function(e){if(!isNaN(e.duration)&&0<e.duration){e.isVideo&&(e.showControls(),e.startControlsTimer());var t=e.getElement(e.container).querySelector("."+g.options.classPrefix+"time-total");t&&t.focus();var n=Math.max(e.currentTime-e.options.defaultSeekBackwardInterval(e),0);e.paused||e.pause(),setTimeout(function(){e.setCurrentTime(n)},0),setTimeout(function(){e.play()},0)}}},{keys:[39,228],action:function(e){if(!isNaN(e.duration)&&0<e.duration){e.isVideo&&(e.showControls(),e.startControlsTimer());var t=e.getElement(e.container).querySelector("."+g.options.classPrefix+"time-total");t&&t.focus();var n=Math.min(e.currentTime+e.options.defaultSeekForwardInterval(e),e.duration);e.paused||e.pause(),setTimeout(function(){e.setCurrentTime(n)},0),setTimeout(function(){e.play()},0)}}}),g.rail=s.querySelector("."+g.options.classPrefix+"time-rail"),g.total=s.querySelector("."+g.options.classPrefix+"time-total"),g.loaded=s.querySelector("."+g.options.classPrefix+"time-loaded"),g.current=s.querySelector("."+g.options.classPrefix+"time-current"),g.handle=s.querySelector("."+g.options.classPrefix+"time-handle"),g.timefloat=s.querySelector("."+g.options.classPrefix+"time-float"),g.timefloatcurrent=s.querySelector("."+g.options.classPrefix+"time-float-current"),g.slider=s.querySelector("."+g.options.classPrefix+"time-slider"),g.hovered=s.querySelector("."+g.options.classPrefix+"time-hovered"),g.buffer=s.querySelector("."+g.options.classPrefix+"time-buffering"),g.newTime=0,g.forcedHandlePause=!1,g.setTransformStyle=function(e,t){e.style.transform=t,e.style.webkitTransform=t,e.style.MozTransform=t,e.style.msTransform=t,e.style.OTransform=t},g.buffer.style.display="none";var i=function(e){var t=getComputedStyle(g.total),n=(0,b.offset)(g.total),o=g.total.offsetWidth,i=void 0!==t.webkitTransform?"webkitTransform":void 0!==t.mozTransform?"mozTransform ":void 0!==t.oTransform?"oTransform":void 0!==t.msTransform?"msTransform":"transform",r="WebKitCSSMatrix"in window?"WebKitCSSMatrix":"MSCSSMatrix"in window?"MSCSSMatrix":"CSSMatrix"in window?"CSSMatrix":void 0,a=0,s=0,l=0,d=void 0;if(d=e.originalEvent&&e.originalEvent.changedTouches?e.originalEvent.changedTouches[0].pageX:e.changedTouches?e.changedTouches[0].pageX:e.pageX,g.getDuration()){if(d<n.left?d=n.left:d>o+n.left&&(d=o+n.left),a=(l=d-n.left)/o,g.newTime=a*g.getDuration(),v&&null!==g.getCurrentTime()&&g.newTime.toFixed(4)!==g.getCurrentTime().toFixed(4)&&(g.setCurrentRailHandle(g.newTime),g.updateCurrent(g.newTime)),!y.IS_IOS&&!y.IS_ANDROID){if(l<0&&(l=0),g.options.useSmoothHover&&null!==r&&void 0!==window[r]){var u=new window[r](getComputedStyle(g.handle)[i]).m41,c=l/parseFloat(getComputedStyle(g.total).width)-u/parseFloat(getComputedStyle(g.total).width);g.hovered.style.left=u+"px",g.setTransformStyle(g.hovered,"scaleX("+c+")"),g.hovered.setAttribute("pos",l),0<=c?(0,b.removeClass)(g.hovered,"negative"):(0,b.addClass)(g.hovered,"negative")}if(g.timefloat){var f=g.timefloat.offsetWidth/2,p=mejs.Utils.offset(g.getElement(g.container)),m=getComputedStyle(g.timefloat);s=d-p.left<g.timefloat.offsetWidth?f:d-p.left>=g.getElement(g.container).offsetWidth-f?g.total.offsetWidth-f:l,(0,b.hasClass)(g.getElement(g.container),g.options.classPrefix+"long-video")&&(s+=parseFloat(m.marginLeft)/2+g.timefloat.offsetWidth/2),g.timefloat.style.left=s+"px",g.timefloatcurrent.innerHTML=(0,E.secondsToTimeCode)(g.newTime,h.options.alwaysShowHours,h.options.showTimecodeFrameCount,h.options.framesPerSecond,h.options.secondsDecimalLength,h.options.timeFormat),g.timefloat.style.display="block"}}}else y.IS_IOS||y.IS_ANDROID||!g.timefloat||(s=g.timefloat.offsetWidth+o>=g.getElement(g.container).offsetWidth?g.timefloat.offsetWidth/2:0,g.timefloat.style.left=s+"px",g.timefloat.style.left=s+"px",g.timefloat.style.display="block")},f=function(){1e3<=new Date-u&&g.play()};g.slider.addEventListener("focus",function(){h.options.autoRewind=!1}),g.slider.addEventListener("blur",function(){h.options.autoRewind=t}),g.slider.addEventListener("keydown",function(e){if(1e3<=new Date-u&&(c=g.paused),g.options.enableKeyboard&&g.options.keyActions.length){var t=e.which||e.keyCode||0,n=g.getDuration(),o=h.options.defaultSeekForwardInterval(d),i=h.options.defaultSeekBackwardInterval(d),r=g.getCurrentTime(),a=g.getElement(g.container).querySelector("."+g.options.classPrefix+"volume-slider");if(38===t||40===t){a&&(a.style.display="block"),g.isVideo&&(g.showControls(),g.startControlsTimer());var s=38===t?Math.min(g.volume+.1,1):Math.max(g.volume-.1,0),l=s<=0;return g.setVolume(s),void g.setMuted(l)}switch(a&&(a.style.display="none"),t){case 37:g.getDuration()!==1/0&&(r-=i);break;case 39:g.getDuration()!==1/0&&(r+=o);break;case 36:r=0;break;case 35:r=n;break;case 13:case 32:return void(y.IS_FIREFOX&&(g.paused?g.play():g.pause()));default:return}r=r<0||isNaN(r)?0:n<=r?n:Math.floor(r),u=new Date,c||h.pause(),setTimeout(function(){g.setCurrentTime(r)},0),r<g.getDuration()&&!c&&setTimeout(f,1100),h.showControls(),e.preventDefault(),e.stopPropagation()}});var r=["mousedown","touchstart"];g.slider.addEventListener("dragstart",function(){return!1});for(var a=0,l=r.length;a<l;a++)g.slider.addEventListener(r[a],function(e){if(g.forcedHandlePause=!1,g.getDuration()!==1/0&&(1===e.which||0===e.which)){g.paused||(g.pause(),g.forcedHandlePause=!0),v=!0,i(e);for(var t=["mouseup","touchend"],n=0,o=t.length;n<o;n++)g.getElement(g.container).addEventListener(t[n],function(e){var t=e.target;(t===g.slider||t.closest("."+g.options.classPrefix+"time-slider"))&&i(e)});g.globalBind("mouseup.dur touchend.dur",function(){v&&null!==g.getCurrentTime()&&g.newTime.toFixed(4)!==g.getCurrentTime().toFixed(4)&&(g.setCurrentTime(g.newTime),g.setCurrentRailHandle(g.newTime),g.updateCurrent(g.newTime)),g.forcedHandlePause&&(g.slider.focus(),g.play()),g.forcedHandlePause=!1,v=!1,g.timefloat&&(g.timefloat.style.display="none")})}},!(!y.SUPPORT_PASSIVE_EVENT||"touchstart"!==r[a])&&{passive:!0});g.slider.addEventListener("mouseenter",function(e){e.target===g.slider&&g.getDuration()!==1/0&&(g.getElement(g.container).addEventListener("mousemove",function(e){var t=e.target;(t===g.slider||t.closest("."+g.options.classPrefix+"time-slider"))&&i(e)}),!g.timefloat||y.IS_IOS||y.IS_ANDROID||(g.timefloat.style.display="block"),g.hovered&&!y.IS_IOS&&!y.IS_ANDROID&&g.options.useSmoothHover&&(0,b.removeClass)(g.hovered,"no-hover"))}),g.slider.addEventListener("mouseleave",function(){g.getDuration()!==1/0&&(v||(g.timefloat&&(g.timefloat.style.display="none"),g.hovered&&g.options.useSmoothHover&&(0,b.addClass)(g.hovered,"no-hover")))}),g.broadcastCallback=function(e){var t,n,o,i,r=s.querySelector("."+g.options.classPrefix+"broadcast");if(g.options.forceLive||g.getDuration()===1/0){if(!r&&g.options.forceLive){var a=p.default.createElement("span");a.className=g.options.classPrefix+"broadcast",a.innerText=m.default.t("mejs.live-broadcast"),g.slider.style.display="none",g.rail.appendChild(a)}}else r&&(g.slider.style.display="",r.remove()),h.setProgressRail(e),g.forcedHandlePause||h.setCurrentRail(e),t=g.getCurrentTime(),n=m.default.t("mejs.time-slider"),o=(0,E.secondsToTimeCode)(t,h.options.alwaysShowHours,h.options.showTimecodeFrameCount,h.options.framesPerSecond,h.options.secondsDecimalLength,h.options.timeFormat),i=g.getDuration(),g.slider.setAttribute("role","slider"),g.slider.tabIndex=0,d.paused?(g.slider.setAttribute("aria-label",n),g.slider.setAttribute("aria-valuemin",0),g.slider.setAttribute("aria-valuemax",isNaN(i)?0:i),g.slider.setAttribute("aria-valuenow",t),g.slider.setAttribute("aria-valuetext",o)):(g.slider.removeAttribute("aria-label"),g.slider.removeAttribute("aria-valuemin"),g.slider.removeAttribute("aria-valuemax"),g.slider.removeAttribute("aria-valuenow"),g.slider.removeAttribute("aria-valuetext"))},d.addEventListener("progress",g.broadcastCallback),d.addEventListener("timeupdate",g.broadcastCallback),d.addEventListener("play",function(){g.buffer.style.display="none"}),d.addEventListener("playing",function(){g.buffer.style.display="none"}),d.addEventListener("seeking",function(){g.buffer.style.display=""}),d.addEventListener("seeked",function(){g.buffer.style.display="none"}),d.addEventListener("pause",function(){g.buffer.style.display="none"}),d.addEventListener("waiting",function(){g.buffer.style.display=""}),d.addEventListener("loadeddata",function(){g.buffer.style.display=""}),d.addEventListener("canplay",function(){g.buffer.style.display="none"}),d.addEventListener("error",function(){g.buffer.style.display="none"}),g.getElement(g.container).addEventListener("controlsresize",function(e){g.getDuration()!==1/0&&(h.setProgressRail(e),g.forcedHandlePause||h.setCurrentRail(e))})},cleanprogress:function(e,t,n,o){o.removeEventListener("progress",e.broadcastCallback),o.removeEventListener("timeupdate",e.broadcastCallback),e.rail&&e.rail.remove()},setProgressRail:function(e){var t=this,n=void 0!==e?e.detail.target||e.target:t.media,o=null;n&&n.buffered&&0<n.buffered.length&&n.buffered.end&&t.getDuration()?o=n.buffered.end(n.buffered.length-1)/t.getDuration():n&&void 0!==n.bytesTotal&&0<n.bytesTotal&&void 0!==n.bufferedBytes?o=n.bufferedBytes/n.bytesTotal:e&&e.lengthComputable&&0!==e.total&&(o=e.loaded/e.total),null!==o&&(o=Math.min(1,Math.max(0,o)),t.loaded&&t.setTransformStyle(t.loaded,"scaleX("+o+")"))},setCurrentRailHandle:function(e){this.setCurrentRailMain(this,e)},setCurrentRail:function(){this.setCurrentRailMain(this)},setCurrentRailMain:function(e,t){if(void 0!==e.getCurrentTime()&&e.getDuration()){var n=void 0===t?e.getCurrentTime():t;if(e.total&&e.handle){var o=parseFloat(getComputedStyle(e.total).width),i=Math.round(o*n/e.getDuration()),r=i-Math.round(e.handle.offsetWidth/2);if(r=r<0?0:r,e.setTransformStyle(e.current,"scaleX("+i/o+")"),e.setTransformStyle(e.handle,"translateX("+r+"px)"),e.options.useSmoothHover&&!(0,b.hasClass)(e.hovered,"no-hover")){var a=parseInt(e.hovered.getAttribute("pos"),10),s=(a=isNaN(a)?0:a)/o-r/o;e.hovered.style.left=r+"px",e.setTransformStyle(e.hovered,"scaleX("+s+")"),0<=s?(0,b.removeClass)(e.hovered,"negative"):(0,b.addClass)(e.hovered,"negative")}}}}})},{16:16,2:2,25:25,26:26,30:30,5:5}],12:[function(e,t,n){"use strict";var a=r(e(2)),o=e(16),i=r(o),s=e(30),l=e(26);function r(e){return e&&e.__esModule?e:{default:e}}Object.assign(o.config,{duration:0,timeAndDurationSeparator:"<span> | </span>"}),Object.assign(i.default.prototype,{buildcurrent:function(e,t,n,o){var i=this,r=a.default.createElement("div");r.className=i.options.classPrefix+"time",r.setAttribute("role","timer"),r.setAttribute("aria-live","off"),r.innerHTML='<span class="'+i.options.classPrefix+'currenttime">'+(0,s.secondsToTimeCode)(0,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond,e.options.secondsDecimalLength,e.options.timeFormat)+"</span>",i.addControlElement(r,"current"),e.updateCurrent(),i.updateTimeCallback=function(){i.controlsAreVisible&&e.updateCurrent()},o.addEventListener("timeupdate",i.updateTimeCallback)},cleancurrent:function(e,t,n,o){o.removeEventListener("timeupdate",e.updateTimeCallback)},buildduration:function(e,t,n,o){var i=this;if(t.lastChild.querySelector("."+i.options.classPrefix+"currenttime"))t.querySelector("."+i.options.classPrefix+"time").innerHTML+=i.options.timeAndDurationSeparator+'<span class="'+i.options.classPrefix+'duration">'+(0,s.secondsToTimeCode)(i.options.duration,i.options.alwaysShowHours,i.options.showTimecodeFrameCount,i.options.framesPerSecond,i.options.secondsDecimalLength,i.options.timeFormat)+"</span>";else{t.querySelector("."+i.options.classPrefix+"currenttime")&&(0,l.addClass)(t.querySelector("."+i.options.classPrefix+"currenttime").parentNode,i.options.classPrefix+"currenttime-container");var r=a.default.createElement("div");r.className=i.options.classPrefix+"time "+i.options.classPrefix+"duration-container",r.innerHTML='<span class="'+i.options.classPrefix+'duration">'+(0,s.secondsToTimeCode)(i.options.duration,i.options.alwaysShowHours,i.options.showTimecodeFrameCount,i.options.framesPerSecond,i.options.secondsDecimalLength,i.options.timeFormat)+"</span>",i.addControlElement(r,"duration")}i.updateDurationCallback=function(){i.controlsAreVisible&&e.updateDuration()},o.addEventListener("timeupdate",i.updateDurationCallback)},cleanduration:function(e,t,n,o){o.removeEventListener("timeupdate",e.updateDurationCallback)},updateCurrent:function(){var e=this,t=e.getCurrentTime();isNaN(t)&&(t=0);var n=(0,s.secondsToTimeCode)(t,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond,e.options.secondsDecimalLength,e.options.timeFormat);5<n.length?(0,l.addClass)(e.getElement(e.container),e.options.classPrefix+"long-video"):(0,l.removeClass)(e.getElement(e.container),e.options.classPrefix+"long-video"),e.getElement(e.controls).querySelector("."+e.options.classPrefix+"currenttime")&&(e.getElement(e.controls).querySelector("."+e.options.classPrefix+"currenttime").innerText=n)},updateDuration:function(){var e=this,t=e.getDuration();void 0!==e.media&&(isNaN(t)||t===1/0||t<0)&&(e.media.duration=e.options.duration=t=0),0<e.options.duration&&(t=e.options.duration);var n=(0,s.secondsToTimeCode)(t,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond,e.options.secondsDecimalLength,e.options.timeFormat);5<n.length?(0,l.addClass)(e.getElement(e.container),e.options.classPrefix+"long-video"):(0,l.removeClass)(e.getElement(e.container),e.options.classPrefix+"long-video"),e.getElement(e.controls).querySelector("."+e.options.classPrefix+"duration")&&0<t&&(e.getElement(e.controls).querySelector("."+e.options.classPrefix+"duration").innerHTML=n)}})},{16:16,2:2,26:26,30:30}],13:[function(e,t,n){"use strict";var L=r(e(2)),d=r(e(7)),F=r(e(5)),o=e(16),i=r(o),m=e(30),j=e(27),I=e(26);function r(e){return e&&e.__esModule?e:{default:e}}Object.assign(o.config,{startLanguage:"",tracksText:null,chaptersText:null,tracksAriaLive:!1,hideCaptionsButtonWhenEmpty:!0,toggleCaptionsButtonWhenOnlyOne:!1,slidesSelector:""}),Object.assign(i.default.prototype,{hasChapters:!1,buildtracks:function(o,e,t,n){if(this.findTracks(),o.tracks.length||o.trackFiles&&0!==!o.trackFiles.length){var i=this,r=i.options.tracksAriaLive?' role="log" aria-live="assertive" aria-atomic="false"':"",a=(0,j.isString)(i.options.tracksText)?i.options.tracksText:F.default.t("mejs.captions-subtitles"),s=(0,j.isString)(i.options.chaptersText)?i.options.chaptersText:F.default.t("mejs.captions-chapters"),l=null===o.trackFiles?o.tracks.length:o.trackFiles.length;if(i.domNode.textTracks)for(var d=i.domNode.textTracks.length-1;0<=d;d--)i.domNode.textTracks[d].mode="hidden";i.cleartracks(o),o.captions=L.default.createElement("div"),o.captions.className=i.options.classPrefix+"captions-layer "+i.options.classPrefix+"layer",o.captions.innerHTML='<div class="'+i.options.classPrefix+"captions-position "+i.options.classPrefix+'captions-position-hover"'+r+'><span class="'+i.options.classPrefix+'captions-text"></span></div>',o.captions.style.display="none",t.insertBefore(o.captions,t.firstChild),o.captionsText=o.captions.querySelector("."+i.options.classPrefix+"captions-text"),o.captionsButton=L.default.createElement("div"),o.captionsButton.className=i.options.classPrefix+"button "+i.options.classPrefix+"captions-button",o.captionsButton.innerHTML='<button type="button" aria-controls="'+i.id+'" title="'+a+'" aria-label="'+a+'" tabindex="0"></button><div class="'+i.options.classPrefix+"captions-selector "+i.options.classPrefix+'offscreen"><ul class="'+i.options.classPrefix+'captions-selector-list"><li class="'+i.options.classPrefix+'captions-selector-list-item"><input type="radio" class="'+i.options.classPrefix+'captions-selector-input" name="'+o.id+'_captions" id="'+o.id+'_captions_none" value="none" checked disabled><label class="'+i.options.classPrefix+"captions-selector-label "+i.options.classPrefix+'captions-selected" for="'+o.id+'_captions_none">'+F.default.t("mejs.none")+"</label></li></ul></div>",i.addControlElement(o.captionsButton,"tracks"),o.captionsButton.querySelector("."+i.options.classPrefix+"captions-selector-input").disabled=!1,o.chaptersButton=L.default.createElement("div"),o.chaptersButton.className=i.options.classPrefix+"button "+i.options.classPrefix+"chapters-button",o.chaptersButton.innerHTML='<button type="button" aria-controls="'+i.id+'" title="'+s+'" aria-label="'+s+'" tabindex="0"></button><div class="'+i.options.classPrefix+"chapters-selector "+i.options.classPrefix+'offscreen"><ul class="'+i.options.classPrefix+'chapters-selector-list"></ul></div>';for(var u=0,c=0;c<l;c++){var f=o.tracks[c].kind;o.tracks[c].src.trim()&&("subtitles"===f||"captions"===f?u++:"chapters"!==f||e.querySelector("."+i.options.classPrefix+"chapter-selector")||o.captionsButton.parentNode.insertBefore(o.chaptersButton,o.captionsButton))}o.trackToLoad=-1,o.selectedTrack=null,o.isLoadingTrack=!1;for(var p=0;p<l;p++){var m=o.tracks[p].kind;!o.tracks[p].src.trim()||"subtitles"!==m&&"captions"!==m||o.addTrackButton(o.tracks[p].trackId,o.tracks[p].srclang,o.tracks[p].label)}o.loadNextTrack();var h=["mouseenter","focusin"],v=["mouseleave","focusout"];if(i.options.toggleCaptionsButtonWhenOnlyOne&&1===u)o.captionsButton.addEventListener("click",function(e){var t="none";null===o.selectedTrack&&(t=o.tracks[0].trackId);var n=e.keyCode||e.which;o.setTrack(t,void 0!==n)});else{for(var g=o.captionsButton.querySelectorAll("."+i.options.classPrefix+"captions-selector-label"),y=o.captionsButton.querySelectorAll("input[type=radio]"),E=0,b=h.length;E<b;E++)o.captionsButton.addEventListener(h[E],function(){(0,I.removeClass)(this.querySelector("."+i.options.classPrefix+"captions-selector"),i.options.classPrefix+"offscreen")});for(var S=0,x=v.length;S<x;S++)o.captionsButton.addEventListener(v[S],function(){(0,I.addClass)(this.querySelector("."+i.options.classPrefix+"captions-selector"),i.options.classPrefix+"offscreen")});for(var w=0,P=y.length;w<P;w++)y[w].addEventListener("click",function(e){var t=e.keyCode||e.which;o.setTrack(this.value,void 0!==t)});for(var T=0,C=g.length;T<C;T++)g[T].addEventListener("click",function(e){var t=(0,I.siblings)(this,function(e){return"INPUT"===e.tagName})[0],n=(0,j.createEvent)("click",t);t.dispatchEvent(n),e.preventDefault()});o.captionsButton.addEventListener("keydown",function(e){e.stopPropagation()})}for(var k=0,_=h.length;k<_;k++)o.chaptersButton.addEventListener(h[k],function(){this.querySelector("."+i.options.classPrefix+"chapters-selector-list").children.length&&(0,I.removeClass)(this.querySelector("."+i.options.classPrefix+"chapters-selector"),i.options.classPrefix+"offscreen")});for(var N=0,A=v.length;N<A;N++)o.chaptersButton.addEventListener(v[N],function(){(0,I.addClass)(this.querySelector("."+i.options.classPrefix+"chapters-selector"),i.options.classPrefix+"offscreen")});o.chaptersButton.addEventListener("keydown",function(e){e.stopPropagation()}),o.options.alwaysShowControls?(0,I.addClass)(o.getElement(o.container).querySelector("."+i.options.classPrefix+"captions-position"),i.options.classPrefix+"captions-position-hover"):(o.getElement(o.container).addEventListener("controlsshown",function(){(0,I.addClass)(o.getElement(o.container).querySelector("."+i.options.classPrefix+"captions-position"),i.options.classPrefix+"captions-position-hover")}),o.getElement(o.container).addEventListener("controlshidden",function(){n.paused||(0,I.removeClass)(o.getElement(o.container).querySelector("."+i.options.classPrefix+"captions-position"),i.options.classPrefix+"captions-position-hover")})),n.addEventListener("timeupdate",function(){o.displayCaptions()}),""!==o.options.slidesSelector&&(o.slidesContainer=L.default.querySelectorAll(o.options.slidesSelector),n.addEventListener("timeupdate",function(){o.displaySlides()}))}},cleartracks:function(e){e&&(e.captions&&e.captions.remove(),e.chapters&&e.chapters.remove(),e.captionsText&&e.captionsText.remove(),e.captionsButton&&e.captionsButton.remove(),e.chaptersButton&&e.chaptersButton.remove())},rebuildtracks:function(){var e=this;e.findTracks(),e.buildtracks(e,e.getElement(e.controls),e.getElement(e.layers),e.media)},findTracks:function(){var e=this,t=null===e.trackFiles?e.node.querySelectorAll("track"):e.trackFiles,n=t.length;e.tracks=[];for(var o=0;o<n;o++){var i=t[o],r=i.getAttribute("srclang").toLowerCase()||"",a=e.id+"_track_"+o+"_"+i.getAttribute("kind")+"_"+r;e.tracks.push({trackId:a,srclang:r,src:i.getAttribute("src"),kind:i.getAttribute("kind"),label:i.getAttribute("label")||"",entries:[],isLoaded:!1})}},setTrack:function(e,t){for(var n=this,o=n.captionsButton.querySelectorAll('input[type="radio"]'),i=n.captionsButton.querySelectorAll("."+n.options.classPrefix+"captions-selected"),r=n.captionsButton.querySelector('input[value="'+e+'"]'),a=0,s=o.length;a<s;a++)o[a].checked=!1;for(var l=0,d=i.length;l<d;l++)(0,I.removeClass)(i[l],n.options.classPrefix+"captions-selected");r.checked=!0;for(var u=(0,I.siblings)(r,function(e){return(0,I.hasClass)(e,n.options.classPrefix+"captions-selector-label")}),c=0,f=u.length;c<f;c++)(0,I.addClass)(u[c],n.options.classPrefix+"captions-selected");if("none"===e)n.selectedTrack=null,(0,I.removeClass)(n.captionsButton,n.options.classPrefix+"captions-enabled");else for(var p=0,m=n.tracks.length;p<m;p++){var h=n.tracks[p];if(h.trackId===e){null===n.selectedTrack&&(0,I.addClass)(n.captionsButton,n.options.classPrefix+"captions-enabled"),n.selectedTrack=h,n.captions.setAttribute("lang",n.selectedTrack.srclang),n.displayCaptions();break}}var v=(0,j.createEvent)("captionschange",n.media);v.detail.caption=n.selectedTrack,n.media.dispatchEvent(v),t||setTimeout(function(){n.getElement(n.container).focus()},500)},loadNextTrack:function(){var e=this;e.trackToLoad++,e.trackToLoad<e.tracks.length?(e.isLoadingTrack=!0,e.loadTrack(e.trackToLoad)):(e.isLoadingTrack=!1,e.checkForTracks())},loadTrack:function(e){var t=this,n=t.tracks[e];void 0===n||void 0===n.src&&""===n.src||(0,I.ajax)(n.src,"text",function(e){n.entries="string"==typeof e&&/<tt\s+xml/gi.exec(e)?d.default.TrackFormatParser.dfxp.parse(e):d.default.TrackFormatParser.webvtt.parse(e),n.isLoaded=!0,t.enableTrackButton(n),t.loadNextTrack(),"slides"===n.kind?t.setupSlides(n):"chapters"!==n.kind||t.hasChapters||(t.drawChapters(n),t.hasChapters=!0)},function(){t.removeTrackButton(n.trackId),t.loadNextTrack()})},enableTrackButton:function(e){var t=this,n=e.srclang,o=L.default.getElementById(""+e.trackId);if(o){var i=e.label;""===i&&(i=F.default.t(d.default.language.codes[n])||n),o.disabled=!1;for(var r=(0,I.siblings)(o,function(e){return(0,I.hasClass)(e,t.options.classPrefix+"captions-selector-label")}),a=0,s=r.length;a<s;a++)r[a].innerHTML=i;if(t.options.startLanguage===n){o.checked=!0;var l=(0,j.createEvent)("click",o);o.dispatchEvent(l)}}},removeTrackButton:function(e){var t=L.default.getElementById(""+e);if(t){var n=t.closest("li");n&&n.remove()}},addTrackButton:function(e,t,n){var o=this;""===n&&(n=F.default.t(d.default.language.codes[t])||t),o.captionsButton.querySelector("ul").innerHTML+='<li class="'+o.options.classPrefix+'captions-selector-list-item"><input type="radio" class="'+o.options.classPrefix+'captions-selector-input" name="'+o.id+'_captions" id="'+e+'" value="'+e+'" disabled><label class="'+o.options.classPrefix+'captions-selector-label"for="'+e+'">'+n+" (loading)</label></li>"},checkForTracks:function(){var e=this,t=!1;if(e.options.hideCaptionsButtonWhenEmpty){for(var n=0,o=e.tracks.length;n<o;n++){var i=e.tracks[n].kind;if(("subtitles"===i||"captions"===i)&&e.tracks[n].isLoaded){t=!0;break}}e.captionsButton.style.display=t?"":"none",e.setControlsSize()}},displayCaptions:function(){if(void 0!==this.tracks){var e=this,t=e.selectedTrack;if(null!==t&&t.isLoaded){var n=e.searchTrackPosition(t.entries,e.media.currentTime);if(-1<n){var o=t.entries[n].text;return"function"==typeof e.options.captionTextPreprocessor&&(o=e.options.captionTextPreprocessor(o)),e.captionsText.innerHTML=function(e){var t=L.default.createElement("div");t.innerHTML=e;for(var n=t.getElementsByTagName("script"),o=n.length;o--;)n[o].remove();for(var i=t.getElementsByTagName("*"),r=0,a=i.length;r<a;r++)for(var s=i[r].attributes,l=Array.prototype.slice.call(s),d=0,u=l.length;d<u;d++)l[d].name.startsWith("on")||l[d].value.startsWith("javascript")?i[r].remove():"style"===l[d].name&&i[r].removeAttribute(l[d].name);return t.innerHTML}(o),e.captionsText.className=e.options.classPrefix+"captions-text "+(t.entries[n].identifier||""),e.captions.style.display="",void(e.captions.style.height="0px")}e.captions.style.display="none"}else e.captions.style.display="none"}},setupSlides:function(e){this.slides=e,this.slides.entries.imgs=[this.slides.entries.length],this.showSlide(0)},showSlide:function(e){var i=this,r=this;if(void 0!==r.tracks&&void 0!==r.slidesContainer){var t=r.slides.entries[e].text,n=r.slides.entries[e].imgs;if(void 0===n||void 0===n.fadeIn){var a=L.default.createElement("img");a.src=t,a.addEventListener("load",function(){var e=i,t=(0,I.siblings)(e,function(e){return t(e)});e.style.display="none",r.slidesContainer.innerHTML+=e.innerHTML,(0,I.fadeIn)(r.slidesContainer.querySelector(a));for(var n=0,o=t.length;n<o;n++)(0,I.fadeOut)(t[n],400)}),r.slides.entries[e].imgs=n=a}else if(!(0,I.visible)(n)){var o=(0,I.siblings)(self,function(e){return o(e)});(0,I.fadeIn)(r.slidesContainer.querySelector(n));for(var s=0,l=o.length;s<l;s++)(0,I.fadeOut)(o[s])}}},displaySlides:function(){if(void 0!==this.slides){var e=this.slides,t=this.searchTrackPosition(e.entries,this.media.currentTime);-1<t&&this.showSlide(t)}},drawChapters:function(e){var r=this,t=e.entries.length;if(t){r.chaptersButton.querySelector("ul").innerHTML="";for(var n=0;n<t;n++)r.chaptersButton.querySelector("ul").innerHTML+='<li class="'+r.options.classPrefix+'chapters-selector-list-item" role="menuitemcheckbox" aria-live="polite" aria-disabled="false" aria-checked="false"><input type="radio" class="'+r.options.classPrefix+'captions-selector-input" name="'+r.id+'_chapters" id="'+r.id+"_chapters_"+n+'" value="'+e.entries[n].start+'" disabled><label class="'+r.options.classPrefix+'chapters-selector-label"for="'+r.id+"_chapters_"+n+'">'+e.entries[n].text+"</label></li>";for(var o=r.chaptersButton.querySelectorAll('input[type="radio"]'),i=r.chaptersButton.querySelectorAll("."+r.options.classPrefix+"chapters-selector-label"),a=0,s=o.length;a<s;a++)o[a].disabled=!1,o[a].checked=!1,o[a].addEventListener("click",function(e){var t=r.chaptersButton.querySelectorAll("li"),n=(0,I.siblings)(this,function(e){return(0,I.hasClass)(e,r.options.classPrefix+"chapters-selector-label")})[0];this.checked=!0,this.parentNode.setAttribute("aria-checked",!0),(0,I.addClass)(n,r.options.classPrefix+"chapters-selected"),(0,I.removeClass)(r.chaptersButton.querySelector("."+r.options.classPrefix+"chapters-selected"),r.options.classPrefix+"chapters-selected");for(var o=0,i=t.length;o<i;o++)t[o].setAttribute("aria-checked",!1);void 0===(e.keyCode||e.which)&&setTimeout(function(){r.getElement(r.container).focus()},500),r.media.setCurrentTime(parseFloat(this.value)),r.media.paused&&r.media.play()});for(var l=0,d=i.length;l<d;l++)i[l].addEventListener("click",function(e){var t=(0,I.siblings)(this,function(e){return"INPUT"===e.tagName})[0],n=(0,j.createEvent)("click",t);t.dispatchEvent(n),e.preventDefault()})}},searchTrackPosition:function(e,t){for(var n=0,o=e.length-1,i=void 0,r=void 0,a=void 0;n<=o;){if(r=e[i=n+o>>1].start,a=e[i].stop,r<=t&&t<a)return i;r<t?n=i+1:t<r&&(o=i-1)}return-1}}),d.default.language={codes:{af:"mejs.afrikaans",sq:"mejs.albanian",ar:"mejs.arabic",be:"mejs.belarusian",bg:"mejs.bulgarian",ca:"mejs.catalan",zh:"mejs.chinese","zh-cn":"mejs.chinese-simplified","zh-tw":"mejs.chines-traditional",hr:"mejs.croatian",cs:"mejs.czech",da:"mejs.danish",nl:"mejs.dutch",en:"mejs.english",et:"mejs.estonian",fl:"mejs.filipino",fi:"mejs.finnish",fr:"mejs.french",gl:"mejs.galician",de:"mejs.german",el:"mejs.greek",ht:"mejs.haitian-creole",iw:"mejs.hebrew",hi:"mejs.hindi",hu:"mejs.hungarian",is:"mejs.icelandic",id:"mejs.indonesian",ga:"mejs.irish",it:"mejs.italian",ja:"mejs.japanese",ko:"mejs.korean",lv:"mejs.latvian",lt:"mejs.lithuanian",mk:"mejs.macedonian",ms:"mejs.malay",mt:"mejs.maltese",no:"mejs.norwegian",fa:"mejs.persian",pl:"mejs.polish",pt:"mejs.portuguese",ro:"mejs.romanian",ru:"mejs.russian",sr:"mejs.serbian",sk:"mejs.slovak",sl:"mejs.slovenian",es:"mejs.spanish",sw:"mejs.swahili",sv:"mejs.swedish",tl:"mejs.tagalog",th:"mejs.thai",tr:"mejs.turkish",uk:"mejs.ukrainian",vi:"mejs.vietnamese",cy:"mejs.welsh",yi:"mejs.yiddish"}},d.default.TrackFormatParser={webvtt:{pattern:/^((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,parse:function(e){for(var t=e.split(/\r?\n/),n=[],o=void 0,i=void 0,r=void 0,a=0,s=t.length;a<s;a++){if((o=this.pattern.exec(t[a]))&&a<t.length){for(0<=a-1&&""!==t[a-1]&&(r=t[a-1]),i=t[++a],a++;""!==t[a]&&a<t.length;)i=i+"\n"+t[a],a++;i=null===i?"":i.trim().replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,"<a href='$1' target='_blank'>$1</a>"),n.push({identifier:r,start:0===(0,m.convertSMPTEtoSeconds)(o[1])?.2:(0,m.convertSMPTEtoSeconds)(o[1]),stop:(0,m.convertSMPTEtoSeconds)(o[3]),text:i,settings:o[5]})}r=""}return n}},dfxp:{parse:function(e){var t=L.default.adoptNode((new DOMParser).parseFromString(e,"application/xml").documentElement).querySelector("div"),n=t.querySelectorAll("p"),o=L.default.getElementById(t.getAttribute("style")),i=[],r=void 0;if(o){o.removeAttribute("id");var a=o.attributes;if(a.length){r={};for(var s=0,l=a.length;s<l;s++)r[a[s].name.split(":")[1]]=a[s].value}}for(var d=0,u=n.length;d<u;d++){var c=void 0,f={start:null,stop:null,style:null,text:null};if(n[d].getAttribute("begin")&&(f.start=(0,m.convertSMPTEtoSeconds)(n[d].getAttribute("begin"))),!f.start&&n[d-1].getAttribute("end")&&(f.start=(0,m.convertSMPTEtoSeconds)(n[d-1].getAttribute("end"))),n[d].getAttribute("end")&&(f.stop=(0,m.convertSMPTEtoSeconds)(n[d].getAttribute("end"))),!f.stop&&n[d+1].getAttribute("begin")&&(f.stop=(0,m.convertSMPTEtoSeconds)(n[d+1].getAttribute("begin"))),r)for(var p in c="",r)c+=p+": "+r[p]+";";c&&(f.style=c),0===f.start&&(f.start=.2),f.text=n[d].innerHTML.trim().replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_| !:, .; ]*[-A-Z0-9+&@#\/%=~_|])/gi,"<a href='$1' target='_blank'>$1</a>"),i.push(f)}return i}}}},{16:16,2:2,26:26,27:27,30:30,5:5,7:7}],14:[function(e,t,n){"use strict";var x=r(e(2)),o=e(16),i=r(o),w=r(e(5)),P=e(25),T=e(27),C=e(26);function r(e){return e&&e.__esModule?e:{default:e}}Object.assign(o.config,{muteText:null,unmuteText:null,allyVolumeControlText:null,hideVolumeOnTouchDevices:!0,audioVolume:"horizontal",videoVolume:"vertical",startVolume:.8}),Object.assign(i.default.prototype,{buildvolume:function(e,t,n,o){if(!P.IS_ANDROID&&!P.IS_IOS||!this.options.hideVolumeOnTouchDevices){var a=this,s=a.isVideo?a.options.videoVolume:a.options.audioVolume,r=(0,T.isString)(a.options.muteText)?a.options.muteText:w.default.t("mejs.mute"),l=(0,T.isString)(a.options.unmuteText)?a.options.unmuteText:w.default.t("mejs.unmute"),i=(0,T.isString)(a.options.allyVolumeControlText)?a.options.allyVolumeControlText:w.default.t("mejs.volume-help-text"),d=x.default.createElement("div");if(d.className=a.options.classPrefix+"button "+a.options.classPrefix+"volume-button "+a.options.classPrefix+"mute",d.innerHTML="horizontal"===s?'<button type="button" aria-controls="'+a.id+'" title="'+r+'" aria-label="'+r+'" tabindex="0"></button>':'<button type="button" aria-controls="'+a.id+'" title="'+r+'" aria-label="'+r+'" tabindex="0"></button><a href="javascript:void(0);" class="'+a.options.classPrefix+'volume-slider" aria-label="'+w.default.t("mejs.volume-slider")+'" aria-valuemin="0" aria-valuemax="100" role="slider" aria-orientation="vertical"><span class="'+a.options.classPrefix+'offscreen">'+i+'</span><div class="'+a.options.classPrefix+'volume-total"><div class="'+a.options.classPrefix+'volume-current"></div><div class="'+a.options.classPrefix+'volume-handle"></div></div></a>',a.addControlElement(d,"volume"),a.options.keyActions.push({keys:[38],action:function(e){var t=e.getElement(e.container).querySelector("."+a.options.classPrefix+"volume-slider");t&&t.matches(":focus")&&(t.style.display="block"),e.isVideo&&(e.showControls(),e.startControlsTimer());var n=Math.min(e.volume+.1,1);e.setVolume(n),0<n&&e.setMuted(!1)}},{keys:[40],action:function(e){var t=e.getElement(e.container).querySelector("."+a.options.classPrefix+"volume-slider");t&&(t.style.display="block"),e.isVideo&&(e.showControls(),e.startControlsTimer());var n=Math.max(e.volume-.1,0);e.setVolume(n),n<=.1&&e.setMuted(!0)}},{keys:[77],action:function(e){var t=e.getElement(e.container).querySelector("."+a.options.classPrefix+"volume-slider");t&&(t.style.display="block"),e.isVideo&&(e.showControls(),e.startControlsTimer()),e.media.muted?e.setMuted(!1):e.setMuted(!0)}}),"horizontal"===s){var u=x.default.createElement("a");u.className=a.options.classPrefix+"horizontal-volume-slider",u.href="javascript:void(0);",u.setAttribute("aria-label",w.default.t("mejs.volume-slider")),u.setAttribute("aria-valuemin",0),u.setAttribute("aria-valuemax",100),u.setAttribute("aria-valuenow",100),u.setAttribute("role","slider"),u.innerHTML+='<span class="'+a.options.classPrefix+'offscreen">'+i+'</span><div class="'+a.options.classPrefix+'horizontal-volume-total"><div class="'+a.options.classPrefix+'horizontal-volume-current"></div><div class="'+a.options.classPrefix+'horizontal-volume-handle"></div></div>',d.parentNode.insertBefore(u,d.nextSibling)}var c=!1,f=!1,p=!1,m="vertical"===s?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-slider"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-slider"),h="vertical"===s?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-total"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-total"),v="vertical"===s?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-current"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-current"),g="vertical"===s?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-handle"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-handle"),y=function(e){if(null!==e&&!isNaN(e)&&void 0!==e){if(e=Math.max(0,e),0===(e=Math.min(e,1))){(0,C.removeClass)(d,a.options.classPrefix+"mute"),(0,C.addClass)(d,a.options.classPrefix+"unmute");var t=d.firstElementChild;t.setAttribute("title",l),t.setAttribute("aria-label",l)}else{(0,C.removeClass)(d,a.options.classPrefix+"unmute"),(0,C.addClass)(d,a.options.classPrefix+"mute");var n=d.firstElementChild;n.setAttribute("title",r),n.setAttribute("aria-label",r)}var o=100*e+"%",i=getComputedStyle(g);"vertical"===s?(v.style.bottom=0,v.style.height=o,g.style.bottom=o,g.style.marginBottom=-parseFloat(i.height)/2+"px"):(v.style.left=0,v.style.width=o,g.style.left=o,g.style.marginLeft=-parseFloat(i.width)/2+"px")}},E=function(e){var t=(0,C.offset)(h),n=getComputedStyle(h);p=!0;var o=null;if("vertical"===s){var i=parseFloat(n.height);if(o=(i-(e.pageY-t.top))/i,0===t.top||0===t.left)return}else{var r=parseFloat(n.width);o=(e.pageX-t.left)/r}o=Math.max(0,o),o=Math.min(o,1),y(o),a.setMuted(0===o),a.setVolume(o),e.preventDefault(),e.stopPropagation()},b=function(){a.muted?(y(0),(0,C.removeClass)(d,a.options.classPrefix+"mute"),(0,C.addClass)(d,a.options.classPrefix+"unmute")):(y(o.volume),(0,C.removeClass)(d,a.options.classPrefix+"unmute"),(0,C.addClass)(d,a.options.classPrefix+"mute"))};e.getElement(e.container).addEventListener("keydown",function(e){!!e.target.closest("."+a.options.classPrefix+"container")||"vertical"!==s||(m.style.display="none")}),d.addEventListener("mouseenter",function(e){e.target===d&&(m.style.display="block",f=!0,e.preventDefault(),e.stopPropagation())}),d.addEventListener("focusin",function(){m.style.display="block",f=!0}),d.addEventListener("focusout",function(e){e.relatedTarget&&(!e.relatedTarget||e.relatedTarget.matches("."+a.options.classPrefix+"volume-slider"))||"vertical"!==s||(m.style.display="none")}),d.addEventListener("mouseleave",function(){f=!1,c||"vertical"!==s||(m.style.display="none")}),d.addEventListener("focusout",function(){f=!1}),d.addEventListener("keydown",function(e){if(a.options.enableKeyboard&&a.options.keyActions.length){var t=e.which||e.keyCode||0,n=o.volume;switch(t){case 38:n=Math.min(n+.1,1);break;case 40:n=Math.max(0,n-.1);break;default:return!0}c=!1,y(n),o.setVolume(n),e.preventDefault(),e.stopPropagation()}}),d.querySelector("button").addEventListener("click",function(){o.setMuted(!o.muted);var e=(0,T.createEvent)("volumechange",o);o.dispatchEvent(e)}),m.addEventListener("dragstart",function(){return!1}),m.addEventListener("mouseover",function(){f=!0}),m.addEventListener("focusin",function(){m.style.display="block",f=!0}),m.addEventListener("focusout",function(){f=!1,c||"vertical"!==s||(m.style.display="none")}),m.addEventListener("mousedown",function(e){E(e),a.globalBind("mousemove.vol",function(e){var t=e.target;c&&(t===m||t.closest("vertical"===s?"."+a.options.classPrefix+"volume-slider":"."+a.options.classPrefix+"horizontal-volume-slider"))&&E(e)}),a.globalBind("mouseup.vol",function(){c=!1,f||"vertical"!==s||(m.style.display="none")}),c=!0,e.preventDefault(),e.stopPropagation()}),o.addEventListener("volumechange",function(e){var t;c||b(),t=Math.floor(100*o.volume),m.setAttribute("aria-valuenow",t),m.setAttribute("aria-valuetext",t+"%")});var S=!1;o.addEventListener("rendererready",function(){p||setTimeout(function(){S=!0,(0===e.options.startVolume||o.originalNode.muted)&&o.setMuted(!0),o.setVolume(e.options.startVolume),a.setControlsSize()},250)}),o.addEventListener("loadedmetadata",function(){setTimeout(function(){p||S||((0===e.options.startVolume||o.originalNode.muted)&&o.setMuted(!0),0===e.options.startVolume&&(e.options.startVolume=0),o.setVolume(e.options.startVolume),a.setControlsSize()),S=!1},250)}),(0===e.options.startVolume||o.originalNode.muted)&&(o.setMuted(!0),0===e.options.startVolume&&(e.options.startVolume=0),b()),a.getElement(a.container).addEventListener("controlsresize",function(){b()})}}})},{16:16,2:2,25:25,26:26,27:27,5:5}],15:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.EN={"mejs.plural-form":1,"mejs.download-file":"Download File","mejs.install-flash":"You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/","mejs.fullscreen":"Fullscreen","mejs.play":"Play","mejs.pause":"Pause","mejs.time-slider":"Time Slider","mejs.time-help-text":"Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.","mejs.live-broadcast":"Live Broadcast","mejs.volume-help-text":"Use Up/Down Arrow keys to increase or decrease volume.","mejs.unmute":"Unmute","mejs.mute":"Mute","mejs.volume-slider":"Volume Slider","mejs.video-player":"Video Player","mejs.audio-player":"Audio Player","mejs.captions-subtitles":"Captions/Subtitles","mejs.captions-chapters":"Chapters","mejs.none":"None","mejs.afrikaans":"Afrikaans","mejs.albanian":"Albanian","mejs.arabic":"Arabic","mejs.belarusian":"Belarusian","mejs.bulgarian":"Bulgarian","mejs.catalan":"Catalan","mejs.chinese":"Chinese","mejs.chinese-simplified":"Chinese (Simplified)","mejs.chinese-traditional":"Chinese (Traditional)","mejs.croatian":"Croatian","mejs.czech":"Czech","mejs.danish":"Danish","mejs.dutch":"Dutch","mejs.english":"English","mejs.estonian":"Estonian","mejs.filipino":"Filipino","mejs.finnish":"Finnish","mejs.french":"French","mejs.galician":"Galician","mejs.german":"German","mejs.greek":"Greek","mejs.haitian-creole":"Haitian Creole","mejs.hebrew":"Hebrew","mejs.hindi":"Hindi","mejs.hungarian":"Hungarian","mejs.icelandic":"Icelandic","mejs.indonesian":"Indonesian","mejs.irish":"Irish","mejs.italian":"Italian","mejs.japanese":"Japanese","mejs.korean":"Korean","mejs.latvian":"Latvian","mejs.lithuanian":"Lithuanian","mejs.macedonian":"Macedonian","mejs.malay":"Malay","mejs.maltese":"Maltese","mejs.norwegian":"Norwegian","mejs.persian":"Persian","mejs.polish":"Polish","mejs.portuguese":"Portuguese","mejs.romanian":"Romanian","mejs.russian":"Russian","mejs.serbian":"Serbian","mejs.slovak":"Slovak","mejs.slovenian":"Slovenian","mejs.spanish":"Spanish","mejs.swahili":"Swahili","mejs.swedish":"Swedish","mejs.tagalog":"Tagalog","mejs.thai":"Thai","mejs.turkish":"Turkish","mejs.ukrainian":"Ukrainian","mejs.vietnamese":"Vietnamese","mejs.welsh":"Welsh","mejs.yiddish":"Yiddish"}},{}],16:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.config=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}}(),S=r(e(3)),x=r(e(2)),f=r(e(7)),d=r(e(6)),i=r(e(17)),u=r(e(5)),w=e(25),m=e(27),c=e(30),p=e(28),P=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}}(e(26));function r(e){return e&&e.__esModule?e:{default:e}}f.default.mepIndex=0,f.default.players={};var s=n.config={poster:"",showPosterWhenEnded:!1,showPosterWhenPaused:!1,defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:40,defaultSeekBackwardInterval:function(e){return.05*e.getDuration()},defaultSeekForwardInterval:function(e){return.05*e.getDuration()},setDimensions:!0,audioWidth:-1,audioHeight:-1,loop:!1,autoRewind:!0,enableAutosize:!0,timeFormat:"",alwaysShowHours:!1,showTimecodeFrameCount:!1,framesPerSecond:25,alwaysShowControls:!1,hideVideoControlsOnLoad:!1,hideVideoControlsOnPause:!1,clickToPlayPause:!0,controlsTimeoutDefault:1500,controlsTimeoutMouseEnter:2500,controlsTimeoutMouseLeave:1e3,iPadUseNativeControls:!1,iPhoneUseNativeControls:!1,AndroidUseNativeControls:!1,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],useDefaultControls:!1,isVideo:!0,stretching:"auto",classPrefix:"mejs__",enableKeyboard:!0,pauseOtherPlayers:!0,secondsDecimalLength:0,customError:null,keyActions:[{keys:[32,179],action:function(e){w.IS_FIREFOX||(e.paused||e.ended?e.play():e.pause())}}]};f.default.MepDefaults=s;var l=function(){function r(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var n=this,o="string"==typeof e?x.default.getElementById(e):e;if(!(n instanceof r))return new r(o,t);if(n.node=n.media=o,n.node){if(n.media.player)return n.media.player;if(n.hasFocus=!1,n.controlsAreVisible=!0,n.controlsEnabled=!0,n.controlsTimer=null,n.currentMediaTime=0,n.proxy=null,void 0===t){var i=n.node.getAttribute("data-mejsoptions");t=i?JSON.parse(i):{}}return n.options=Object.assign({},s,t),n.options.loop&&!n.media.getAttribute("loop")?(n.media.loop=!0,n.node.loop=!0):n.media.loop&&(n.options.loop=!0),n.options.timeFormat||(n.options.timeFormat="mm:ss",n.options.alwaysShowHours&&(n.options.timeFormat="hh:mm:ss"),n.options.showTimecodeFrameCount&&(n.options.timeFormat+=":ff")),(0,c.calculateTimeFormat)(0,n.options,n.options.framesPerSecond||25),n.id="mep_"+f.default.mepIndex++,(f.default.players[n.id]=n).init(),n}}return o(r,[{key:"getElement",value:function(e){return e}},{key:"init",value:function(){var n=this,e=Object.assign({},n.options,{success:function(e,t){n._meReady(e,t)},error:function(e){n._handleError(e)}}),t=n.node.tagName.toLowerCase();if(n.isDynamic="audio"!==t&&"video"!==t&&"iframe"!==t,n.isVideo=n.isDynamic?n.options.isVideo:"audio"!==t&&n.options.isVideo,n.mediaFiles=null,n.trackFiles=null,w.IS_IPAD&&n.options.iPadUseNativeControls||w.IS_IPHONE&&n.options.iPhoneUseNativeControls)n.node.setAttribute("controls",!0),w.IS_IPAD&&n.node.getAttribute("autoplay")&&n.play();else if(!n.isVideo&&(n.isVideo||!n.options.features.length&&!n.options.useDefaultControls)||w.IS_ANDROID&&n.options.AndroidUseNativeControls)n.isVideo||n.options.features.length||n.options.useDefaultControls||(n.node.style.display="none");else{n.node.removeAttribute("controls");var o=n.isVideo?u.default.t("mejs.video-player"):u.default.t("mejs.audio-player"),i=x.default.createElement("span");if(i.className=n.options.classPrefix+"offscreen",i.innerText=o,n.media.parentNode.insertBefore(i,n.media),n.container=x.default.createElement("div"),n.getElement(n.container).id=n.id,n.getElement(n.container).className=n.options.classPrefix+"container "+n.options.classPrefix+"container-keyboard-inactive "+n.media.className,n.getElement(n.container).tabIndex=0,n.getElement(n.container).setAttribute("role","application"),n.getElement(n.container).setAttribute("aria-label",o),n.getElement(n.container).innerHTML='<div class="'+n.options.classPrefix+'inner"><div class="'+n.options.classPrefix+'mediaelement"></div><div class="'+n.options.classPrefix+'layers"></div><div class="'+n.options.classPrefix+'controls"></div></div>',n.getElement(n.container).addEventListener("focus",function(e){if(!n.controlsAreVisible&&!n.hasFocus&&n.controlsEnabled){n.showControls(!0);var t=(0,m.isNodeAfter)(e.relatedTarget,n.getElement(n.container))?"."+n.options.classPrefix+"controls ."+n.options.classPrefix+"button:last-child > button":"."+n.options.classPrefix+"playpause-button > button";n.getElement(n.container).querySelector(t).focus()}}),n.node.parentNode.insertBefore(n.getElement(n.container),n.node),n.options.features.length||n.options.useDefaultControls||(n.getElement(n.container).style.background="transparent",n.getElement(n.container).querySelector("."+n.options.classPrefix+"controls").style.display="none"),n.isVideo&&"fill"===n.options.stretching&&!P.hasClass(n.getElement(n.container).parentNode,n.options.classPrefix+"fill-container")){n.outerContainer=n.media.parentNode;var r=x.default.createElement("div");r.className=n.options.classPrefix+"fill-container",n.getElement(n.container).parentNode.insertBefore(r,n.getElement(n.container)),r.appendChild(n.getElement(n.container))}w.IS_ANDROID&&P.addClass(n.getElement(n.container),n.options.classPrefix+"android"),w.IS_IOS&&P.addClass(n.getElement(n.container),n.options.classPrefix+"ios"),w.IS_IPAD&&P.addClass(n.getElement(n.container),n.options.classPrefix+"ipad"),w.IS_IPHONE&&P.addClass(n.getElement(n.container),n.options.classPrefix+"iphone"),P.addClass(n.getElement(n.container),n.isVideo?n.options.classPrefix+"video":n.options.classPrefix+"audio"),n.getElement(n.container).querySelector("."+n.options.classPrefix+"mediaelement").appendChild(n.node),(n.media.player=n).controls=n.getElement(n.container).querySelector("."+n.options.classPrefix+"controls"),n.layers=n.getElement(n.container).querySelector("."+n.options.classPrefix+"layers");var a=n.isVideo?"video":"audio",s=a.substring(0,1).toUpperCase()+a.substring(1);0<n.options[a+"Width"]||-1<n.options[a+"Width"].toString().indexOf("%")?n.width=n.options[a+"Width"]:""!==n.node.style.width&&null!==n.node.style.width?n.width=n.node.style.width:n.node.getAttribute("width")?n.width=n.node.getAttribute("width"):n.width=n.options["default"+s+"Width"],0<n.options[a+"Height"]||-1<n.options[a+"Height"].toString().indexOf("%")?n.height=n.options[a+"Height"]:""!==n.node.style.height&&null!==n.node.style.height?n.height=n.node.style.height:n.node.getAttribute("height")?n.height=n.node.getAttribute("height"):n.height=n.options["default"+s+"Height"],n.initialAspectRatio=n.height>=n.width?n.width/n.height:n.height/n.width,n.setPlayerSize(n.width,n.height),e.pluginWidth=n.width,e.pluginHeight=n.height}if(f.default.MepDefaults=e,new d.default(n.media,e,n.mediaFiles),void 0!==n.getElement(n.container)&&n.options.features.length&&n.controlsAreVisible&&!n.options.hideVideoControlsOnLoad){var l=(0,m.createEvent)("controlsshown",n.getElement(n.container));n.getElement(n.container).dispatchEvent(l)}}},{key:"showControls",value:function(e){var i=this;if(e=void 0===e||e,!i.controlsAreVisible&&i.isVideo){if(e)!function(){P.fadeIn(i.getElement(i.controls),200,function(){P.removeClass(i.getElement(i.controls),i.options.classPrefix+"offscreen");var e=(0,m.createEvent)("controlsshown",i.getElement(i.container));i.getElement(i.container).dispatchEvent(e)});for(var n=i.getElement(i.container).querySelectorAll("."+i.options.classPrefix+"control"),e=function(e,t){P.fadeIn(n[e],200,function(){P.removeClass(n[e],i.options.classPrefix+"offscreen")})},t=0,o=n.length;t<o;t++)e(t)}();else{P.removeClass(i.getElement(i.controls),i.options.classPrefix+"offscreen"),i.getElement(i.controls).style.display="",i.getElement(i.controls).style.opacity=1;for(var t=i.getElement(i.container).querySelectorAll("."+i.options.classPrefix+"control"),n=0,o=t.length;n<o;n++)P.removeClass(t[n],i.options.classPrefix+"offscreen"),t[n].style.display="";var r=(0,m.createEvent)("controlsshown",i.getElement(i.container));i.getElement(i.container).dispatchEvent(r)}i.controlsAreVisible=!0,i.setControlsSize()}}},{key:"hideControls",value:function(e,t){var i=this;if(e=void 0===e||e,!0===t||!(!i.controlsAreVisible||i.options.alwaysShowControls||i.paused&&4===i.readyState&&(!i.options.hideVideoControlsOnLoad&&i.currentTime<=0||!i.options.hideVideoControlsOnPause&&0<i.currentTime)||i.isVideo&&!i.options.hideVideoControlsOnLoad&&!i.readyState||i.ended)){if(e)!function(){P.fadeOut(i.getElement(i.controls),200,function(){P.addClass(i.getElement(i.controls),i.options.classPrefix+"offscreen"),i.getElement(i.controls).style.display="";var e=(0,m.createEvent)("controlshidden",i.getElement(i.container));i.getElement(i.container).dispatchEvent(e)});for(var n=i.getElement(i.container).querySelectorAll("."+i.options.classPrefix+"control"),e=function(e,t){P.fadeOut(n[e],200,function(){P.addClass(n[e],i.options.classPrefix+"offscreen"),n[e].style.display=""})},t=0,o=n.length;t<o;t++)e(t)}();else{P.addClass(i.getElement(i.controls),i.options.classPrefix+"offscreen"),i.getElement(i.controls).style.display="",i.getElement(i.controls).style.opacity=0;for(var n=i.getElement(i.container).querySelectorAll("."+i.options.classPrefix+"control"),o=0,r=n.length;o<r;o++)P.addClass(n[o],i.options.classPrefix+"offscreen"),n[o].style.display="";var a=(0,m.createEvent)("controlshidden",i.getElement(i.container));i.getElement(i.container).dispatchEvent(a)}i.controlsAreVisible=!1}}},{key:"startControlsTimer",value:function(e){var t=this;e=void 0!==e?e:t.options.controlsTimeoutDefault,t.killControlsTimer("start"),t.controlsTimer=setTimeout(function(){t.hideControls(),t.killControlsTimer("hide")},e)}},{key:"killControlsTimer",value:function(){null!==this.controlsTimer&&(clearTimeout(this.controlsTimer),delete this.controlsTimer,this.controlsTimer=null)}},{key:"disableControls",value:function(){this.killControlsTimer(),this.controlsEnabled=!1,this.hideControls(!1,!0)}},{key:"enableControls",value:function(){this.controlsEnabled=!0,this.showControls(!1)}},{key:"_setDefaultPlayer",value:function(){var e=this;e.proxy&&e.proxy.pause(),e.proxy=new i.default(e),e.media.addEventListener("loadedmetadata",function(){0<e.getCurrentTime()&&0<e.currentMediaTime&&(e.setCurrentTime(e.currentMediaTime),w.IS_IOS||w.IS_ANDROID||e.play())})}},{key:"_meReady",value:function(e,t){var n=this,o=t.getAttribute("autoplay"),i=!(null==o||"false"===o),r=null!==e.rendererName&&/(native|html5)/i.test(e.rendererName);if(n.getElement(n.controls)&&n.enableControls(),n.getElement(n.container)&&n.getElement(n.container).querySelector("."+n.options.classPrefix+"overlay-play")&&(n.getElement(n.container).querySelector("."+n.options.classPrefix+"overlay-play").style.display=""),!n.created){if(n.created=!0,n.media=e,n.domNode=t,!(w.IS_ANDROID&&n.options.AndroidUseNativeControls||w.IS_IPAD&&n.options.iPadUseNativeControls||w.IS_IPHONE&&n.options.iPhoneUseNativeControls)){if(!n.isVideo&&!n.options.features.length&&!n.options.useDefaultControls)return i&&r&&n.play(),void(n.options.success&&("string"==typeof n.options.success?S.default[n.options.success](n.media,n.domNode,n):n.options.success(n.media,n.domNode,n)));if(n.featurePosition={},n._setDefaultPlayer(),n.buildposter(n,n.getElement(n.controls),n.getElement(n.layers),n.media),n.buildkeyboard(n,n.getElement(n.controls),n.getElement(n.layers),n.media),n.buildoverlays(n,n.getElement(n.controls),n.getElement(n.layers),n.media),n.options.useDefaultControls){var a=["playpause","current","progress","duration","tracks","volume","fullscreen"];n.options.features=a.concat(n.options.features.filter(function(e){return-1===a.indexOf(e)}))}n.buildfeatures(n,n.getElement(n.controls),n.getElement(n.layers),n.media);var s=(0,m.createEvent)("controlsready",n.getElement(n.container));n.getElement(n.container).dispatchEvent(s),n.setPlayerSize(n.width,n.height),n.setControlsSize(),n.isVideo&&(n.clickToPlayPauseCallback=function(){if(n.options.clickToPlayPause){var e=n.getElement(n.container).querySelector("."+n.options.classPrefix+"overlay-button"),t=e.getAttribute("aria-pressed");n.paused&&t?n.pause():n.paused?n.play():n.pause(),e.setAttribute("aria-pressed",!t),n.getElement(n.container).focus()}},n.createIframeLayer(),n.media.addEventListener("click",n.clickToPlayPauseCallback),!w.IS_ANDROID&&!w.IS_IOS||n.options.alwaysShowControls?(n.getElement(n.container).addEventListener("mouseenter",function(){n.controlsEnabled&&(n.options.alwaysShowControls||(n.killControlsTimer("enter"),n.showControls(),n.startControlsTimer(n.options.controlsTimeoutMouseEnter)))}),n.getElement(n.container).addEventListener("mousemove",function(){n.controlsEnabled&&(n.controlsAreVisible||n.showControls(),n.options.alwaysShowControls||n.startControlsTimer(n.options.controlsTimeoutMouseEnter))}),n.getElement(n.container).addEventListener("mouseleave",function(){n.controlsEnabled&&(n.paused||n.options.alwaysShowControls||n.startControlsTimer(n.options.controlsTimeoutMouseLeave))})):n.node.addEventListener("touchstart",function(){n.controlsAreVisible?n.hideControls(!1):n.controlsEnabled&&n.showControls(!1)},!!w.SUPPORT_PASSIVE_EVENT&&{passive:!0}),n.options.hideVideoControlsOnLoad&&n.hideControls(!1),n.options.enableAutosize&&n.media.addEventListener("loadedmetadata",function(e){var t=void 0!==e?e.detail.target||e.target:n.media;n.options.videoHeight<=0&&!n.domNode.getAttribute("height")&&!n.domNode.style.height&&null!==t&&!isNaN(t.videoHeight)&&(n.setPlayerSize(t.videoWidth,t.videoHeight),n.setControlsSize(),n.media.setSize(t.videoWidth,t.videoHeight))})),n.media.addEventListener("play",function(){for(var e in n.hasFocus=!0,f.default.players)if(f.default.players.hasOwnProperty(e)){var t=f.default.players[e];t.id===n.id||!n.options.pauseOtherPlayers||t.paused||t.ended||!0===t.options.ignorePauseOtherPlayersOption||(t.pause(),t.hasFocus=!1)}w.IS_ANDROID||w.IS_IOS||n.options.alwaysShowControls||!n.isVideo||n.hideControls()}),n.media.addEventListener("ended",function(){if(n.options.autoRewind)try{n.setCurrentTime(0),setTimeout(function(){var e=n.getElement(n.container).querySelector("."+n.options.classPrefix+"overlay-loading");e&&e.parentNode&&(e.parentNode.style.display="none")},20)}catch(e){}"function"==typeof n.media.renderer.stop?n.media.renderer.stop():n.pause(),n.setProgressRail&&n.setProgressRail(),n.setCurrentRail&&n.setCurrentRail(),n.options.loop?n.play():!n.options.alwaysShowControls&&n.controlsEnabled&&n.showControls()}),n.media.addEventListener("loadedmetadata",function(){(0,c.calculateTimeFormat)(n.getDuration(),n.options,n.options.framesPerSecond||25),n.updateDuration&&n.updateDuration(),n.updateCurrent&&n.updateCurrent(),n.isFullScreen||(n.setPlayerSize(n.width,n.height),n.setControlsSize())});var l=null;n.media.addEventListener("timeupdate",function(){isNaN(n.getDuration())||l===n.getDuration()||(l=n.getDuration(),(0,c.calculateTimeFormat)(l,n.options,n.options.framesPerSecond||25),n.updateDuration&&n.updateDuration(),n.updateCurrent&&n.updateCurrent(),n.setControlsSize())}),n.getElement(n.container).addEventListener("click",function(e){P.addClass(e.currentTarget,n.options.classPrefix+"container-keyboard-inactive")}),n.getElement(n.container).addEventListener("focusin",function(e){P.removeClass(e.currentTarget,n.options.classPrefix+"container-keyboard-inactive"),!n.isVideo||w.IS_ANDROID||w.IS_IOS||!n.controlsEnabled||n.options.alwaysShowControls||(n.killControlsTimer("enter"),n.showControls(),n.startControlsTimer(n.options.controlsTimeoutMouseEnter))}),n.getElement(n.container).addEventListener("focusout",function(e){setTimeout(function(){e.relatedTarget&&n.keyboardAction&&!e.relatedTarget.closest("."+n.options.classPrefix+"container")&&(n.keyboardAction=!1,!n.isVideo||n.options.alwaysShowControls||n.paused||n.startControlsTimer(n.options.controlsTimeoutMouseLeave))},0)}),setTimeout(function(){n.setPlayerSize(n.width,n.height),n.setControlsSize()},0),n.globalResizeCallback=function(){n.isFullScreen||w.HAS_TRUE_NATIVE_FULLSCREEN&&x.default.webkitIsFullScreen||n.setPlayerSize(n.width,n.height),n.setControlsSize()},n.globalBind("resize",n.globalResizeCallback)}i&&r&&n.play(),n.options.success&&("string"==typeof n.options.success?S.default[n.options.success](n.media,n.domNode,n):n.options.success(n.media,n.domNode,n))}}},{key:"_handleError",value:function(e,t,n){var o=this,i=o.getElement(o.layers).querySelector("."+o.options.classPrefix+"overlay-play");i&&(i.style.display="none"),o.options.error&&o.options.error(e,t,n),o.getElement(o.container).querySelector("."+o.options.classPrefix+"cannotplay")&&o.getElement(o.container).querySelector("."+o.options.classPrefix+"cannotplay").remove();var r=x.default.createElement("div");r.className=o.options.classPrefix+"cannotplay",r.style.width="100%",r.style.height="100%";var a="function"==typeof o.options.customError?o.options.customError(o.media,o.media.originalNode):o.options.customError,s="";if(!a){var l=o.media.originalNode.getAttribute("poster");if(l&&(s='<img src="'+l+'" alt="'+f.default.i18n.t("mejs.download-file")+'">'),e.message&&(a="<p>"+e.message+"</p>"),e.urls)for(var d=0,u=e.urls.length;d<u;d++){var c=e.urls[d];a+='<a href="'+c.src+'" data-type="'+c.type+'"><span>'+f.default.i18n.t("mejs.download-file")+": "+c.src+"</span></a>"}}a&&o.getElement(o.layers).querySelector("."+o.options.classPrefix+"overlay-error")&&(r.innerHTML=a,o.getElement(o.layers).querySelector("."+o.options.classPrefix+"overlay-error").innerHTML=""+s+r.outerHTML,o.getElement(o.layers).querySelector("."+o.options.classPrefix+"overlay-error").parentNode.style.display="block"),o.controlsEnabled&&o.disableControls()}},{key:"setPlayerSize",value:function(e,t){var n=this;if(!n.options.setDimensions)return!1;switch(void 0!==e&&(n.width=e),void 0!==t&&(n.height=t),n.options.stretching){case"fill":n.isVideo?n.setFillMode():n.setDimensions(n.width,n.height);break;case"responsive":n.setResponsiveMode();break;case"none":n.setDimensions(n.width,n.height);break;default:!0===n.hasFluidMode()?n.setResponsiveMode():n.setDimensions(n.width,n.height)}}},{key:"hasFluidMode",value:function(){var e=this;return-1!==e.height.toString().indexOf("%")||e.node&&e.node.style.maxWidth&&"none"!==e.node.style.maxWidth&&e.node.style.maxWidth!==e.width||e.node&&e.node.currentStyle&&"100%"===e.node.currentStyle.maxWidth}},{key:"setResponsiveMode",value:function(){var o=this,e=function(){for(var t=void 0,n=o.getElement(o.container);n;){try{if(w.IS_FIREFOX&&"html"===n.tagName.toLowerCase()&&S.default.self!==S.default.top&&null!==S.default.frameElement)return S.default.frameElement;t=n.parentElement}catch(e){t=n.parentElement}if(t&&P.visible(t))return t;n=t}return null}(),t=e?getComputedStyle(e,null):getComputedStyle(x.default.body,null),n=o.isVideo?o.node.videoWidth&&0<o.node.videoWidth?o.node.videoWidth:o.node.getAttribute("width")?o.node.getAttribute("width"):o.options.defaultVideoWidth:o.options.defaultAudioWidth,i=o.isVideo?o.node.videoHeight&&0<o.node.videoHeight?o.node.videoHeight:o.node.getAttribute("height")?o.node.getAttribute("height"):o.options.defaultVideoHeight:o.options.defaultAudioHeight,r=function(){if(!o.options.enableAutosize)return o.initialAspectRatio;var e=1;return o.isVideo&&(e=o.node.videoWidth&&0<o.node.videoWidth&&o.node.videoHeight&&0<o.node.videoHeight?o.height>=o.width?o.node.videoWidth/o.node.videoHeight:o.node.videoHeight/o.node.videoWidth:o.initialAspectRatio,(isNaN(e)||e<.01||100<e)&&(e=1)),e}(),a=parseFloat(t.height),s=void 0,l=parseFloat(t.width);if(s=o.isVideo?"100%"===o.height?parseFloat(l*i/n,10):o.height>=o.width?parseFloat(l/r,10):parseFloat(l*r,10):i,isNaN(s)&&(s=a),0<o.getElement(o.container).parentNode.length&&"body"===o.getElement(o.container).parentNode.tagName.toLowerCase()&&(l=S.default.innerWidth||x.default.documentElement.clientWidth||x.default.body.clientWidth,s=S.default.innerHeight||x.default.documentElement.clientHeight||x.default.body.clientHeight),s&&l){o.getElement(o.container).style.width=l+"px",o.getElement(o.container).style.height=s+"px",o.node.style.width="100%",o.node.style.height="100%",o.isVideo&&o.media.setSize&&o.media.setSize(l,s);for(var d=o.getElement(o.layers).children,u=0,c=d.length;u<c;u++)d[u].style.width="100%",d[u].style.height="100%"}}},{key:"setFillMode",value:function(){var e=this,t=S.default.self!==S.default.top&&null!==S.default.frameElement,n=function(){for(var t=void 0,n=e.getElement(e.container);n;){try{if(w.IS_FIREFOX&&"html"===n.tagName.toLowerCase()&&S.default.self!==S.default.top&&null!==S.default.frameElement)return S.default.frameElement;t=n.parentElement}catch(e){t=n.parentElement}if(t&&P.visible(t))return t;n=t}return null}(),o=n?getComputedStyle(n,null):getComputedStyle(x.default.body,null);"none"!==e.node.style.height&&e.node.style.height!==e.height&&(e.node.style.height="auto"),"none"!==e.node.style.maxWidth&&e.node.style.maxWidth!==e.width&&(e.node.style.maxWidth="none"),"none"!==e.node.style.maxHeight&&e.node.style.maxHeight!==e.height&&(e.node.style.maxHeight="none"),e.node.currentStyle&&("100%"===e.node.currentStyle.height&&(e.node.currentStyle.height="auto"),"100%"===e.node.currentStyle.maxWidth&&(e.node.currentStyle.maxWidth="none"),"100%"===e.node.currentStyle.maxHeight&&(e.node.currentStyle.maxHeight="none")),t||parseFloat(o.width)||(n.style.width=e.media.offsetWidth+"px"),t||parseFloat(o.height)||(n.style.height=e.media.offsetHeight+"px"),o=getComputedStyle(n);var i=parseFloat(o.width),r=parseFloat(o.height);e.setDimensions("100%","100%");var a=e.getElement(e.container).querySelector("."+e.options.classPrefix+"poster>img");a&&(a.style.display="");for(var s=e.getElement(e.container).querySelectorAll("object, embed, iframe, video"),l=e.height,d=e.width,u=i,c=l*i/d,f=d*r/l,p=r,m=i<f==!1,h=m?Math.floor(u):Math.floor(f),v=m?Math.floor(c):Math.floor(p),g=m?i+"px":h+"px",y=m?v+"px":r+"px",E=0,b=s.length;E<b;E++)s[E].style.height=y,s[E].style.width=g,e.media.setSize&&e.media.setSize(g,y),s[E].style.marginLeft=Math.floor((i-h)/2)+"px",s[E].style.marginTop=0}},{key:"setDimensions",value:function(e,t){var n=this;e=(0,m.isString)(e)&&-1<e.indexOf("%")?e:parseFloat(e)+"px",t=(0,m.isString)(t)&&-1<t.indexOf("%")?t:parseFloat(t)+"px",n.getElement(n.container).style.width=e,n.getElement(n.container).style.height=t;for(var o=n.getElement(n.layers).children,i=0,r=o.length;i<r;i++)o[i].style.width=e,o[i].style.height=t}},{key:"setControlsSize",value:function(){var t=this;if(P.visible(t.getElement(t.container)))if(t.rail&&P.visible(t.rail)){for(var e=t.total?getComputedStyle(t.total,null):null,n=e?parseFloat(e.marginLeft)+parseFloat(e.marginRight):0,o=getComputedStyle(t.rail),i=parseFloat(o.marginLeft)+parseFloat(o.marginRight),r=0,a=P.siblings(t.rail,function(e){return e!==t.rail}),s=a.length,l=0;l<s;l++)r+=a[l].offsetWidth;r+=n+(0===n?2*i:i)+1,t.getElement(t.container).style.minWidth=r+"px";var d=(0,m.createEvent)("controlsresize",t.getElement(t.container));t.getElement(t.container).dispatchEvent(d)}else{for(var u=t.getElement(t.controls).children,c=0,f=0,p=u.length;f<p;f++)c+=u[f].offsetWidth;t.getElement(t.container).style.minWidth=c+"px"}}},{key:"addControlElement",value:function(e,t){var n=this;if(void 0!==n.featurePosition[t]){var o=n.getElement(n.controls).children[n.featurePosition[t]-1];o.parentNode.insertBefore(e,o.nextSibling)}else{n.getElement(n.controls).appendChild(e);for(var i=n.getElement(n.controls).children,r=0,a=i.length;r<a;r++)if(e===i[r]){n.featurePosition[t]=r;break}}}},{key:"createIframeLayer",value:function(){var t=this;if(t.isVideo&&null!==t.media.rendererName&&-1<t.media.rendererName.indexOf("iframe")&&!x.default.getElementById(t.media.id+"-iframe-overlay")){var e=x.default.createElement("div"),n=x.default.getElementById(t.media.id+"_"+t.media.rendererName);e.id=t.media.id+"-iframe-overlay",e.className=t.options.classPrefix+"iframe-overlay",e.addEventListener("click",function(e){t.options.clickToPlayPause&&(t.paused?t.play():t.pause(),e.preventDefault(),e.stopPropagation())}),n.parentNode.insertBefore(e,n)}}},{key:"resetSize",value:function(){var e=this;setTimeout(function(){e.setPlayerSize(e.width,e.height),e.setControlsSize()},50)}},{key:"setPoster",value:function(e){var t=this;if(t.getElement(t.container)){var n=t.getElement(t.container).querySelector("."+t.options.classPrefix+"poster");n||((n=x.default.createElement("div")).className=t.options.classPrefix+"poster "+t.options.classPrefix+"layer",t.getElement(t.layers).appendChild(n));var o=n.querySelector("img");!o&&e&&((o=x.default.createElement("img")).className=t.options.classPrefix+"poster-img",o.width="100%",o.height="100%",n.style.display="",n.appendChild(o)),e?(o.setAttribute("src",e),n.style.backgroundImage='url("'+e+'")',n.style.display=""):o?(n.style.backgroundImage="none",n.style.display="none",o.remove()):n.style.display="none"}else(w.IS_IPAD&&t.options.iPadUseNativeControls||w.IS_IPHONE&&t.options.iPhoneUseNativeControls||w.IS_ANDROID&&t.options.AndroidUseNativeControls)&&(t.media.originalNode.poster=e)}},{key:"changeSkin",value:function(e){var t=this;t.getElement(t.container).className=t.options.classPrefix+"container "+e,t.setPlayerSize(t.width,t.height),t.setControlsSize()}},{key:"globalBind",value:function(e,n){var o=this.node?this.node.ownerDocument:x.default;if((e=(0,m.splitEvents)(e,this.id)).d)for(var t=e.d.split(" "),i=0,r=t.length;i<r;i++)t[i].split(".").reduce(function(e,t){return o.addEventListener(t,n,!1),t},"");if(e.w)for(var a=e.w.split(" "),s=0,l=a.length;s<l;s++)a[s].split(".").reduce(function(e,t){return S.default.addEventListener(t,n,!1),t},"")}},{key:"globalUnbind",value:function(e,n){var o=this.node?this.node.ownerDocument:x.default;if((e=(0,m.splitEvents)(e,this.id)).d)for(var t=e.d.split(" "),i=0,r=t.length;i<r;i++)t[i].split(".").reduce(function(e,t){return o.removeEventListener(t,n,!1),t},"");if(e.w)for(var a=e.w.split(" "),s=0,l=a.length;s<l;s++)a[s].split(".").reduce(function(e,t){return S.default.removeEventListener(t,n,!1),t},"")}},{key:"buildfeatures",value:function(e,t,n,o){for(var i=0,r=this.options.features.length;i<r;i++){var a=this.options.features[i];if(this["build"+a])try{this["build"+a](e,t,n,o)}catch(e){console.error("error building "+a,e)}}}},{key:"buildposter",value:function(e,t,n,o){var i=this,r=x.default.createElement("div");r.className=i.options.classPrefix+"poster "+i.options.classPrefix+"layer",n.appendChild(r);var a=o.originalNode.getAttribute("poster");""!==e.options.poster&&(a&&w.IS_IOS&&o.originalNode.removeAttribute("poster"),a=e.options.poster),a?i.setPoster(a):null!==i.media.renderer&&"function"==typeof i.media.renderer.getPosterUrl?i.setPoster(i.media.renderer.getPosterUrl()):r.style.display="none",o.addEventListener("play",function(){r.style.display="none"}),o.addEventListener("playing",function(){r.style.display="none"}),e.options.showPosterWhenEnded&&e.options.autoRewind&&o.addEventListener("ended",function(){r.style.display=""}),o.addEventListener("error",function(){r.style.display="none"}),e.options.showPosterWhenPaused&&o.addEventListener("pause",function(){e.ended||(r.style.display="")})}},{key:"buildoverlays",value:function(t,e,n,o){if(t.isVideo){var i=this,r=x.default.createElement("div"),a=x.default.createElement("div"),s=x.default.createElement("div");r.style.display="none",r.className=i.options.classPrefix+"overlay "+i.options.classPrefix+"layer",r.innerHTML='<div class="'+i.options.classPrefix+'overlay-loading"><span class="'+i.options.classPrefix+'overlay-loading-bg-img"></span></div>',n.appendChild(r),a.style.display="none",a.className=i.options.classPrefix+"overlay "+i.options.classPrefix+"layer",a.innerHTML='<div class="'+i.options.classPrefix+'overlay-error"></div>',n.appendChild(a),s.className=i.options.classPrefix+"overlay "+i.options.classPrefix+"layer "+i.options.classPrefix+"overlay-play",s.innerHTML='<div class="'+i.options.classPrefix+'overlay-button" role="button" tabindex="0" aria-label="'+u.default.t("mejs.play")+'" aria-pressed="false"></div>',s.addEventListener("click",function(){if(i.options.clickToPlayPause){var e=i.getElement(i.container).querySelector("."+i.options.classPrefix+"overlay-button"),t=e.getAttribute("aria-pressed");i.paused?i.play():i.pause(),e.setAttribute("aria-pressed",!!t),i.getElement(i.container).focus()}}),s.addEventListener("keydown",function(e){var t=e.keyCode||e.which||0;if(13===t||w.IS_FIREFOX&&32===t){var n=(0,m.createEvent)("click",s);return s.dispatchEvent(n),!1}}),n.appendChild(s),null!==i.media.rendererName&&(/(youtube|facebook)/i.test(i.media.rendererName)&&!(i.media.originalNode.getAttribute("poster")||t.options.poster||"function"==typeof i.media.renderer.getPosterUrl&&i.media.renderer.getPosterUrl())||w.IS_STOCK_ANDROID||i.media.originalNode.getAttribute("autoplay"))&&(s.style.display="none");var l=!1;o.addEventListener("play",function(){s.style.display="none",r.style.display="none",a.style.display="none",l=!1}),o.addEventListener("playing",function(){s.style.display="none",r.style.display="none",a.style.display="none",l=!1}),o.addEventListener("seeking",function(){s.style.display="none",r.style.display="",l=!1}),o.addEventListener("seeked",function(){s.style.display=i.paused&&!w.IS_STOCK_ANDROID?"":"none",r.style.display="none",l=!1}),o.addEventListener("pause",function(){r.style.display="none",w.IS_STOCK_ANDROID||l||(s.style.display=""),l=!1}),o.addEventListener("waiting",function(){r.style.display="",l=!1}),o.addEventListener("loadeddata",function(){r.style.display="",w.IS_ANDROID&&(o.canplayTimeout=setTimeout(function(){if(x.default.createEvent){var e=x.default.createEvent("HTMLEvents");return e.initEvent("canplay",!0,!0),o.dispatchEvent(e)}},300)),l=!1}),o.addEventListener("canplay",function(){r.style.display="none",clearTimeout(o.canplayTimeout),l=!1}),o.addEventListener("error",function(e){i._handleError(e,i.media,i.node),r.style.display="none",s.style.display="none",l=!0}),o.addEventListener("loadedmetadata",function(){i.controlsEnabled||i.enableControls()}),o.addEventListener("keydown",function(e){i.onkeydown(t,o,e),l=!1})}}},{key:"buildkeyboard",value:function(o,e,t,i){var r=this;r.getElement(r.container).addEventListener("keydown",function(){r.keyboardAction=!0}),r.globalKeydownCallback=function(e){var t=x.default.activeElement.closest("."+r.options.classPrefix+"container"),n=r.media.closest("."+r.options.classPrefix+"container");return r.hasFocus=!(!t||!n||t.id!==n.id),r.onkeydown(o,i,e)},r.globalClickCallback=function(e){r.hasFocus=!!e.target.closest("."+r.options.classPrefix+"container")},r.globalBind("keydown",r.globalKeydownCallback),r.globalBind("click",r.globalClickCallback)}},{key:"onkeydown",value:function(e,t,n){if(e.hasFocus&&e.options.enableKeyboard)for(var o=0,i=e.options.keyActions.length;o<i;o++)for(var r=e.options.keyActions[o],a=0,s=r.keys.length;a<s;a++)if(n.keyCode===r.keys[a])return r.action(e,t,n.keyCode,n),n.preventDefault(),void n.stopPropagation();return!0}},{key:"play",value:function(){this.proxy.play()}},{key:"pause",value:function(){this.proxy.pause()}},{key:"load",value:function(){this.proxy.load()}},{key:"setCurrentTime",value:function(e){this.proxy.setCurrentTime(e)}},{key:"getCurrentTime",value:function(){return this.proxy.currentTime}},{key:"getDuration",value:function(){return this.proxy.duration}},{key:"setVolume",value:function(e){this.proxy.volume=e}},{key:"getVolume",value:function(){return this.proxy.getVolume()}},{key:"setMuted",value:function(e){this.proxy.setMuted(e)}},{key:"setSrc",value:function(e){this.controlsEnabled||this.enableControls(),this.proxy.setSrc(e)}},{key:"getSrc",value:function(){return this.proxy.getSrc()}},{key:"canPlayType",value:function(e){return this.proxy.canPlayType(e)}},{key:"remove",value:function(){var l=this,d=l.media.rendererName,u=l.media.originalNode.src;for(var e in l.options.features){var t=l.options.features[e];if(l["clean"+t])try{l["clean"+t](l,l.getElement(l.layers),l.getElement(l.controls),l.media)}catch(e){console.error("error cleaning "+t,e)}}var n=l.node.getAttribute("width"),o=l.node.getAttribute("height");if(n?-1===n.indexOf("%")&&(n+="px"):n="auto",o?-1===o.indexOf("%")&&(o+="px"):o="auto",l.node.style.width=n,l.node.style.height=o,l.setPlayerSize(0,0),l.isDynamic?l.getElement(l.container).parentNode.insertBefore(l.node,l.getElement(l.container)):function(){l.node.setAttribute("controls",!0),l.node.setAttribute("id",l.node.getAttribute("id").replace("_"+d,"").replace("_from_mejs",""));var e=l.getElement(l.container).querySelector("."+l.options.classPrefix+"poster>img");(e&&l.node.setAttribute("poster",e.src),delete l.node.autoplay,l.node.setAttribute("src",""),""!==l.media.canPlayType((0,p.getTypeFromFile)(u))&&l.node.setAttribute("src",u),d&&-1<d.indexOf("iframe"))&&x.default.getElementById(l.media.id+"-iframe-overlay").remove();var i=l.node.cloneNode();if(i.style.display="",l.getElement(l.container).parentNode.insertBefore(i,l.getElement(l.container)),l.node.remove(),l.mediaFiles)for(var t=0,n=l.mediaFiles.length;t<n;t++){var o=x.default.createElement("source");o.setAttribute("src",l.mediaFiles[t].src),o.setAttribute("type",l.mediaFiles[t].type),i.appendChild(o)}if(l.trackFiles)for(var r=function(e,t){var n=l.trackFiles[e],o=x.default.createElement("track");o.kind=n.kind,o.label=n.label,o.srclang=n.srclang,o.src=n.src,i.appendChild(o),o.addEventListener("load",function(){this.mode="showing",i.textTracks[e].mode="showing"})},a=0,s=l.trackFiles.length;a<s;a++)r(a);delete l.node,delete l.mediaFiles,delete l.trackFiles}(),l.media.renderer&&"function"==typeof l.media.renderer.destroy&&l.media.renderer.destroy(),delete f.default.players[l.id],"object"===a(l.getElement(l.container))){var i=l.getElement(l.container).parentNode.querySelector("."+l.options.classPrefix+"offscreen");i&&i.remove(),l.getElement(l.container).remove()}l.globalUnbind("resize",l.globalResizeCallback),l.globalUnbind("keydown",l.globalKeydownCallback),l.globalUnbind("click",l.globalClickCallback),delete l.media.player}},{key:"paused",get:function(){return this.proxy.paused}},{key:"muted",get:function(){return this.proxy.muted},set:function(e){this.setMuted(e)}},{key:"ended",get:function(){return this.proxy.ended}},{key:"readyState",get:function(){return this.proxy.readyState}},{key:"currentTime",set:function(e){this.setCurrentTime(e)},get:function(){return this.getCurrentTime()}},{key:"duration",get:function(){return this.getDuration()}},{key:"volume",set:function(e){this.setVolume(e)},get:function(){return this.getVolume()}},{key:"src",set:function(e){this.setSrc(e)},get:function(){return this.getSrc()}}]),r}();S.default.MediaElementPlayer=l,f.default.MediaElementPlayer=l,n.default=l},{17:17,2:2,25:25,26:26,27:27,28:28,3:3,30:30,5:5,6:6,7:7}],17:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o,i=function(){function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}}(),r=e(3),a=(o=r)&&o.__esModule?o:{default:o};var s=function(){function e(t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.media=t.media,this.isVideo=t.isVideo,this.classPrefix=t.options.classPrefix,this.createIframeLayer=function(){return t.createIframeLayer()},this.setPoster=function(e){return t.setPoster(e)},this}return i(e,[{key:"play",value:function(){this.media.play()}},{key:"pause",value:function(){this.media.pause()}},{key:"load",value:function(){this.isLoaded||this.media.load(),this.isLoaded=!0}},{key:"setCurrentTime",value:function(e){this.media.setCurrentTime(e)}},{key:"getCurrentTime",value:function(){return this.media.currentTime}},{key:"getDuration",value:function(){var e=this.media.getDuration();return e===1/0&&this.media.seekable&&this.media.seekable.length&&(e=this.media.seekable.end(0)),e}},{key:"setVolume",value:function(e){this.media.setVolume(e)}},{key:"getVolume",value:function(){return this.media.getVolume()}},{key:"setMuted",value:function(e){this.media.setMuted(e)}},{key:"setSrc",value:function(e){var t=this,n=document.getElementById(t.media.id+"-iframe-overlay");n&&n.remove(),t.media.setSrc(e),t.createIframeLayer(),null!==t.media.renderer&&"function"==typeof t.media.renderer.getPosterUrl&&t.setPoster(t.media.renderer.getPosterUrl())}},{key:"getSrc",value:function(){return this.media.getSrc()}},{key:"canPlayType",value:function(e){return this.media.canPlayType(e)}},{key:"paused",get:function(){return this.media.paused}},{key:"muted",set:function(e){this.setMuted(e)},get:function(){return this.media.muted}},{key:"ended",get:function(){return this.media.ended}},{key:"readyState",get:function(){return this.media.readyState}},{key:"currentTime",set:function(e){this.setCurrentTime(e)},get:function(){return this.getCurrentTime()}},{key:"duration",get:function(){return this.getDuration()}},{key:"remainingTime",get:function(){return this.getDuration()-this.currentTime()}},{key:"volume",set:function(e){this.setVolume(e)},get:function(){return this.getVolume()}},{key:"src",set:function(e){this.setSrc(e)},get:function(){return this.getSrc()}}]),e}();n.default=s,a.default.DefaultPlayer=s},{3:3}],18:[function(e,t,n){"use strict";a(e(3));var o,i=a(e(7)),r=a(e(16));function a(e){return e&&e.__esModule?e:{default:e}}"undefined"!=typeof jQuery?i.default.$=jQuery:"undefined"!=typeof Zepto?i.default.$=Zepto:"undefined"!=typeof ender&&(i.default.$=ender),void 0!==(o=i.default.$)&&(o.fn.mediaelementplayer=function(e){return!1===e?this.each(function(){var e=o(this).data("mediaelementplayer");e&&e.remove(),o(this).removeData("mediaelementplayer")}):this.each(function(){o(this).data("mediaelementplayer",new r.default(this,e))}),this},o(document).ready(function(){o("."+i.default.MepDefaults.classPrefix+"player").mediaelementplayer()}))},{16:16,3:3,7:7}],19:[function(e,t,n){"use strict";var b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S=a(e(3)),x=a(e(7)),w=e(8),P=e(27),o=e(28),i=e(25),r=e(26);function a(e){return e&&e.__esModule?e:{default:e}}var T={promise:null,load:function(e){return"undefined"!=typeof dashjs?T.promise=new Promise(function(e){e()}).then(function(){T._createPlayer(e)}):(e.options.path="string"==typeof e.options.path?e.options.path:"https://cdn.dashjs.org/latest/dash.all.min.js",T.promise=T.promise||(0,r.loadScript)(e.options.path),T.promise.then(function(){T._createPlayer(e)})),T.promise},_createPlayer:function(e){var t=dashjs.MediaPlayer().create();return S.default["__ready__"+e.id](t),t}},s={name:"native_dash",options:{prefix:"native_dash",dash:{path:"https://cdn.dashjs.org/latest/dash.all.min.js",debug:!1,drm:{},robustnessLevel:""}},canPlayType:function(e){return i.HAS_MSE&&-1<["application/dash+xml"].indexOf(e.toLowerCase())},create:function(s,l,e){var t=s.originalNode,r=s.id+"_"+l.prefix,a=t.autoplay,n=t.children,d=null,u=null;t.removeAttribute("type");for(var o=0,i=n.length;o<i;o++)n[o].removeAttribute("type");d=t.cloneNode(!0),l=Object.assign(l,s.options);for(var c=x.default.html5media.properties,f=x.default.html5media.events.concat(["click","mouseover","mouseout"]).filter(function(e){return"error"!==e}),p=function(e){var t=(0,P.createEvent)(e.type,s);s.dispatchEvent(t)},m=function(i){var e=""+i.substring(0,1).toUpperCase()+i.substring(1);d["get"+e]=function(){return null!==u?d[i]:null},d["set"+e]=function(e){if(-1===x.default.html5media.readOnlyProperties.indexOf(i))if("src"===i){var t="object"===(void 0===e?"undefined":b(e))&&e.src?e.src:e;if(d[i]=t,null!==u){u.reset();for(var n=0,o=f.length;n<o;n++)d.removeEventListener(f[n],p);u=T._createPlayer({options:l.dash,id:r}),e&&"object"===(void 0===e?"undefined":b(e))&&"object"===b(e.drm)&&(u.setProtectionData(e.drm),(0,P.isString)(l.dash.robustnessLevel)&&l.dash.robustnessLevel&&u.getProtectionController().setRobustnessLevel(l.dash.robustnessLevel)),u.attachSource(t),a&&u.play()}}else d[i]=e}},h=0,v=c.length;h<v;h++)m(c[h]);if(S.default["__ready__"+r]=function(e){s.dashPlayer=u=e;for(var t,n=dashjs.MediaPlayer.events,o=0,i=f.length;o<i;o++)"loadedmetadata"===(t=f[o])&&(u.initialize(),u.attachView(d),u.setAutoPlay(!1),"object"!==b(l.dash.drm)||x.default.Utils.isObjectEmpty(l.dash.drm)||(u.setProtectionData(l.dash.drm),(0,P.isString)(l.dash.robustnessLevel)&&l.dash.robustnessLevel&&u.getProtectionController().setRobustnessLevel(l.dash.robustnessLevel)),u.attachSource(d.getSrc())),d.addEventListener(t,p);var r=function(e){if("error"===e.type.toLowerCase())s.generateError(e.message,d.src),console.error(e);else{var t=(0,P.createEvent)(e.type,s);t.data=e,s.dispatchEvent(t)}};for(var a in n)n.hasOwnProperty(a)&&u.on(n[a],function(e){return r(e)})},e&&0<e.length)for(var g=0,y=e.length;g<y;g++)if(w.renderer.renderers[l.prefix].canPlayType(e[g].type)){d.setAttribute("src",e[g].src),void 0!==e[g].drm&&(l.dash.drm=e[g].drm);break}d.setAttribute("id",r),t.parentNode.insertBefore(d,t),t.autoplay=!1,t.style.display="none",d.setSize=function(e,t){return d.style.width=e+"px",d.style.height=t+"px",d},d.hide=function(){return d.pause(),d.style.display="none",d},d.show=function(){return d.style.display="",d},d.destroy=function(){null!==u&&u.reset()};var E=(0,P.createEvent)("rendererready",d);return s.dispatchEvent(E),s.promises.push(T.load({options:l.dash,id:r})),d}};o.typeChecks.push(function(e){return~e.toLowerCase().indexOf(".mpd")?"application/dash+xml":null}),w.renderer.add(s)},{25:25,26:26,27:27,28:28,3:3,7:7,8:8}],20:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PluginDetector=void 0;var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C=o(e(3)),k=o(e(2)),_=o(e(7)),N=o(e(5)),A=e(8),L=e(27),F=e(25),j=e(28);function o(e){return e&&e.__esModule?e:{default:e}}var r=n.PluginDetector={plugins:[],hasPluginVersion:function(e,t){var n=r.plugins[e];return t[1]=t[1]||0,t[2]=t[2]||0,n[0]>t[0]||n[0]===t[0]&&n[1]>t[1]||n[0]===t[0]&&n[1]===t[1]&&n[2]>=t[2]},addPlugin:function(e,t,n,o,i){r.plugins[e]=r.detectPlugin(t,n,o,i)},detectPlugin:function(e,t,n,o){var i=[0,0,0],r=void 0,a=void 0;if(null!==F.NAV.plugins&&void 0!==F.NAV.plugins&&"object"===d(F.NAV.plugins[e])){if((r=F.NAV.plugins[e].description)&&(void 0===F.NAV.mimeTypes||!F.NAV.mimeTypes[t]||F.NAV.mimeTypes[t].enabledPlugin))for(var s=0,l=(i=r.replace(e,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".")).length;s<l;s++)i[s]=parseInt(i[s].match(/\d+/),10)}else if(void 0!==C.default.ActiveXObject)try{(a=new ActiveXObject(n))&&(i=o(a))}catch(e){}return i}};r.addPlugin("flash","Shockwave Flash","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash",function(e){var t=[],n=e.GetVariable("$version");return n&&(n=n.split(" ")[1].split(","),t=[parseInt(n[0],10),parseInt(n[1],10),parseInt(n[2],10)]),t});var i={create:function(e,t,n){var r={},o=!1;r.options=t,r.id=e.id+"_"+r.options.prefix,r.mediaElement=e,r.flashState={},r.flashApi=null,r.flashApiStack=[];for(var i=_.default.html5media.properties,a=function(t){r.flashState[t]=null;var e=""+t.substring(0,1).toUpperCase()+t.substring(1);r["get"+e]=function(){if(null!==r.flashApi){if("function"==typeof r.flashApi["get_"+t]){var e=r.flashApi["get_"+t]();return"buffered"===t?{start:function(){return 0},end:function(){return e},length:1}:e}return null}return null},r["set"+e]=function(e){if("src"===t&&(e=(0,j.absolutizeUrl)(e)),null!==r.flashApi&&void 0!==r.flashApi["set_"+t])try{r.flashApi["set_"+t](e)}catch(e){}else r.flashApiStack.push({type:"set",propName:t,value:e})}},s=0,l=i.length;s<l;s++)a(i[s]);var d=_.default.html5media.methods,u=function(e){r[e]=function(){if(o)if(null!==r.flashApi){if(r.flashApi["fire_"+e])try{r.flashApi["fire_"+e]()}catch(e){}}else r.flashApiStack.push({type:"call",methodName:e})}};d.push("stop");for(var c=0,f=d.length;c<f;c++)u(d[c]);for(var p=["rendererready"],m=0,h=p.length;m<h;m++){var v=(0,L.createEvent)(p[m],r);e.dispatchEvent(v)}C.default["__ready__"+r.id]=function(){if(r.flashReady=!0,r.flashApi=k.default.getElementById("__"+r.id),r.flashApiStack.length)for(var e=0,t=r.flashApiStack.length;e<t;e++){var n=r.flashApiStack[e];if("set"===n.type){var o=n.propName,i=""+o.substring(0,1).toUpperCase()+o.substring(1);r["set"+i](n.value)}else"call"===n.type&&r[n.methodName]()}},C.default["__event__"+r.id]=function(e,t){var n=(0,L.createEvent)(e,r);if(t)try{n.data=JSON.parse(t),n.details.data=JSON.parse(t)}catch(e){n.message=t}r.mediaElement.dispatchEvent(n)},r.flashWrapper=k.default.createElement("div"),-1===["always","sameDomain"].indexOf(r.options.shimScriptAccess)&&(r.options.shimScriptAccess="sameDomain");var g=e.originalNode.autoplay,y=["uid="+r.id,"autoplay="+g,"allowScriptAccess="+r.options.shimScriptAccess,"preload="+(e.originalNode.getAttribute("preload")||"")],E=null!==e.originalNode&&"video"===e.originalNode.tagName.toLowerCase(),b=E?e.originalNode.height:1,S=E?e.originalNode.width:1;e.originalNode.getAttribute("src")&&y.push("src="+e.originalNode.getAttribute("src")),!0===r.options.enablePseudoStreaming&&(y.push("pseudostreamstart="+r.options.pseudoStreamingStartQueryParam),y.push("pseudostreamtype="+r.options.pseudoStreamingType)),r.options.streamDelimiter&&y.push("streamdelimiter="+encodeURIComponent(r.options.streamDelimiter)),r.options.proxyType&&y.push("proxytype="+r.options.proxyType),e.appendChild(r.flashWrapper),e.originalNode.style.display="none";var x=[];if(F.IS_IE||F.IS_EDGE){var w=k.default.createElement("div");r.flashWrapper.appendChild(w),x=F.IS_EDGE?['type="application/x-shockwave-flash"','data="'+r.options.pluginPath+r.options.filename+'"','id="__'+r.id+'"','width="'+S+'"','height="'+b+"'\""]:['classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"','codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"','id="__'+r.id+'"','width="'+S+'"','height="'+b+'"'],E||x.push('style="clip: rect(0 0 0 0); position: absolute;"'),w.outerHTML="<object "+x.join(" ")+'><param name="movie" value="'+r.options.pluginPath+r.options.filename+"?x="+new Date+'" /><param name="flashvars" value="'+y.join("&amp;")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="'+r.options.shimScriptAccess+'" /><param name="allowFullScreen" value="true" /><div>'+N.default.t("mejs.install-flash")+"</div></object>"}else x=['id="__'+r.id+'"','name="__'+r.id+'"','play="true"','loop="false"','quality="high"','bgcolor="#000000"','wmode="transparent"','allowScriptAccess="'+r.options.shimScriptAccess+'"','allowFullScreen="true"','type="application/x-shockwave-flash"','pluginspage="//www.macromedia.com/go/getflashplayer"','src="'+r.options.pluginPath+r.options.filename+'"','flashvars="'+y.join("&")+'"'],E?(x.push('width="'+S+'"'),x.push('height="'+b+'"')):x.push('style="position: fixed; left: -9999em; top: -9999em;"'),r.flashWrapper.innerHTML="<embed "+x.join(" ")+">";if(r.flashNode=r.flashWrapper.lastChild,r.hide=function(){o=!1,E&&(r.flashNode.style.display="none")},r.show=function(){o=!0,E&&(r.flashNode.style.display="")},r.setSize=function(e,t){r.flashNode.style.width=e+"px",r.flashNode.style.height=t+"px",null!==r.flashApi&&"function"==typeof r.flashApi.fire_setSize&&r.flashApi.fire_setSize(e,t)},r.destroy=function(){r.flashNode.remove()},n&&0<n.length)for(var P=0,T=n.length;P<T;P++)if(A.renderer.renderers[t.prefix].canPlayType(n[P].type)){r.setSrc(n[P].src);break}return r}};if(r.hasPluginVersion("flash",[10,0,0])){j.typeChecks.push(function(e){return(e=e.toLowerCase()).startsWith("rtmp")?~e.indexOf(".mp3")?"audio/rtmp":"video/rtmp":/\.og(a|g)/i.test(e)?"audio/ogg":~e.indexOf(".m3u8")?"application/x-mpegURL":~e.indexOf(".mpd")?"application/dash+xml":~e.indexOf(".flv")?"video/flv":null});var a={name:"flash_video",options:{prefix:"flash_video",filename:"mediaelement-flash-video.swf",enablePseudoStreaming:!1,pseudoStreamingStartQueryParam:"start",pseudoStreamingType:"byte",proxyType:"",streamDelimiter:""},canPlayType:function(e){return~["video/mp4","video/rtmp","audio/rtmp","rtmp/mp4","audio/mp4","video/flv","video/x-flv"].indexOf(e.toLowerCase())},create:i.create};A.renderer.add(a);var s={name:"flash_hls",options:{prefix:"flash_hls",filename:"mediaelement-flash-video-hls.swf"},canPlayType:function(e){return~["application/x-mpegurl","application/vnd.apple.mpegurl","audio/mpegurl","audio/hls","video/hls"].indexOf(e.toLowerCase())},create:i.create};A.renderer.add(s);var l={name:"flash_dash",options:{prefix:"flash_dash",filename:"mediaelement-flash-video-mdash.swf"},canPlayType:function(e){return~["application/dash+xml"].indexOf(e.toLowerCase())},create:i.create};A.renderer.add(l);var u={name:"flash_audio",options:{prefix:"flash_audio",filename:"mediaelement-flash-audio.swf"},canPlayType:function(e){return~["audio/mp3"].indexOf(e.toLowerCase())},create:i.create};A.renderer.add(u);var c={name:"flash_audio_ogg",options:{prefix:"flash_audio_ogg",filename:"mediaelement-flash-audio-ogg.swf"},canPlayType:function(e){return~["audio/ogg","audio/oga","audio/ogv"].indexOf(e.toLowerCase())},create:i.create};A.renderer.add(c)}},{2:2,25:25,27:27,28:28,3:3,5:5,7:7,8:8}],21:[function(e,t,n){"use strict";var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E=a(e(3)),b=a(e(7)),S=e(8),x=e(27),o=e(25),i=e(28),r=e(26);function a(e){return e&&e.__esModule?e:{default:e}}var w={promise:null,load:function(e){return"undefined"!=typeof flvjs?w.promise=new Promise(function(e){e()}).then(function(){w._createPlayer(e)}):(e.options.path="string"==typeof e.options.path?e.options.path:"https://cdn.jsdelivr.net/npm/flv.js@latest",w.promise=w.promise||(0,r.loadScript)(e.options.path),w.promise.then(function(){w._createPlayer(e)})),w.promise},_createPlayer:function(e){flvjs.LoggingControl.enableDebug=e.options.debug,flvjs.LoggingControl.enableVerbose=e.options.debug;var t=flvjs.createPlayer(e.options,e.configs);return E.default["__ready__"+e.id](t),t}},s={name:"native_flv",options:{prefix:"native_flv",flv:{path:"https://cdn.jsdelivr.net/npm/flv.js@latest",cors:!0,debug:!1}},canPlayType:function(e){return o.HAS_MSE&&-1<["video/x-flv","video/flv"].indexOf(e.toLowerCase())},create:function(s,a,e){var t=s.originalNode,l=s.id+"_"+a.prefix,d=null,u=null;d=t.cloneNode(!0),a=Object.assign(a,s.options);for(var n=b.default.html5media.properties,c=b.default.html5media.events.concat(["click","mouseover","mouseout"]).filter(function(e){return"error"!==e}),f=function(e){var t=(0,x.createEvent)(e.type,s);s.dispatchEvent(t)},o=function(r){var e=""+r.substring(0,1).toUpperCase()+r.substring(1);d["get"+e]=function(){return null!==u?d[r]:null},d["set"+e]=function(e){if(-1===b.default.html5media.readOnlyProperties.indexOf(r))if("src"===r){if(d[r]="object"===(void 0===e?"undefined":y(e))&&e.src?e.src:e,null!==u){var t={type:"flv"};t.url=e,t.cors=a.flv.cors,t.debug=a.flv.debug,t.path=a.flv.path;var n=a.flv.configs;u.destroy();for(var o=0,i=c.length;o<i;o++)d.removeEventListener(c[o],f);(u=w._createPlayer({options:t,configs:n,id:l})).attachMediaElement(d),u.load()}}else d[r]=e}},i=0,r=n.length;i<r;i++)o(n[i]);if(E.default["__ready__"+l]=function(e){s.flvPlayer=u=e;for(var t,i=flvjs.Events,n=0,o=c.length;n<o;n++)"loadedmetadata"===(t=c[n])&&(u.unload(),u.detachMediaElement(),u.attachMediaElement(d),u.load()),d.addEventListener(t,f);var r=function(o){i.hasOwnProperty(o)&&u.on(i[o],function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t){if("error"===e){var n=t[0]+": "+t[1]+" "+t[2].msg;s.generateError(n,d.src)}else{var o=(0,x.createEvent)(e,s);o.data=t,s.dispatchEvent(o)}}(i[o],t)})};for(var a in i)r(a)},e&&0<e.length)for(var p=0,m=e.length;p<m;p++)if(S.renderer.renderers[a.prefix].canPlayType(e[p].type)){d.setAttribute("src",e[p].src);break}d.setAttribute("id",l),t.parentNode.insertBefore(d,t),t.autoplay=!1,t.style.display="none";var h={type:"flv"};h.url=d.src,h.cors=a.flv.cors,h.debug=a.flv.debug,h.path=a.flv.path;var v=a.flv.configs;d.setSize=function(e,t){return d.style.width=e+"px",d.style.height=t+"px",d},d.hide=function(){return null!==u&&u.pause(),d.style.display="none",d},d.show=function(){return d.style.display="",d},d.destroy=function(){null!==u&&u.destroy()};var g=(0,x.createEvent)("rendererready",d);return s.dispatchEvent(g),s.promises.push(w.load({options:h,configs:v,id:l})),d}};i.typeChecks.push(function(e){return~e.toLowerCase().indexOf(".flv")?"video/flv":null}),S.renderer.add(s)},{25:25,26:26,27:27,28:28,3:3,7:7,8:8}],22:[function(e,t,n){"use strict";var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E=a(e(3)),b=a(e(7)),S=e(8),x=e(27),o=e(25),i=e(28),r=e(26);function a(e){return e&&e.__esModule?e:{default:e}}var w={promise:null,load:function(e){return"undefined"!=typeof Hls?w.promise=new Promise(function(e){e()}).then(function(){w._createPlayer(e)}):(e.options.path="string"==typeof e.options.path?e.options.path:"https://cdn.jsdelivr.net/npm/hls.js@latest",w.promise=w.promise||(0,r.loadScript)(e.options.path),w.promise.then(function(){w._createPlayer(e)})),w.promise},_createPlayer:function(e){var t=new Hls(e.options);return E.default["__ready__"+e.id](t),t}},s={name:"native_hls",options:{prefix:"native_hls",hls:{path:"https://cdn.jsdelivr.net/npm/hls.js@latest",autoStartLoad:!1,debug:!1}},canPlayType:function(e){return o.HAS_MSE&&-1<["application/x-mpegurl","application/vnd.apple.mpegurl","audio/mpegurl","audio/hls","video/hls"].indexOf(e.toLowerCase())},create:function(d,i,u){var e=d.originalNode,r=d.id+"_"+i.prefix,t=e.getAttribute("preload"),n=e.autoplay,c=null,f=null,p=0,m=u.length;f=e.cloneNode(!0),(i=Object.assign(i,d.options)).hls.autoStartLoad=t&&"none"!==t||n;for(var o=b.default.html5media.properties,h=b.default.html5media.events.concat(["click","mouseover","mouseout"]).filter(function(e){return"error"!==e}),v=function(e){var t=(0,x.createEvent)(e.type,d);d.dispatchEvent(t)},a=function(o){var e=""+o.substring(0,1).toUpperCase()+o.substring(1);f["get"+e]=function(){return null!==c?f[o]:null},f["set"+e]=function(e){if(-1===b.default.html5media.readOnlyProperties.indexOf(o))if("src"===o){if(f[o]="object"===(void 0===e?"undefined":y(e))&&e.src?e.src:e,null!==c){c.destroy();for(var t=0,n=h.length;t<n;t++)f.removeEventListener(h[t],v);(c=w._createPlayer({options:i.hls,id:r})).loadSource(e),c.attachMedia(f)}}else f[o]=e}},s=0,l=o.length;s<l;s++)a(o[s]);if(E.default["__ready__"+r]=function(e){d.hlsPlayer=c=e;for(var i=Hls.Events,t=function(e){if("loadedmetadata"===e){var t=d.originalNode.src;c.detachMedia(),c.loadSource(t),c.attachMedia(f)}f.addEventListener(e,v)},n=0,o=h.length;n<o;n++)t(h[n]);var s=void 0,l=void 0,r=function(o){i.hasOwnProperty(o)&&c.on(i[o],function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t){if("hlsError"===e&&(console.warn(t),(t=t[1]).fatal))switch(t.type){case"mediaError":var n=(new Date).getTime();if(!s||3e3<n-s)s=(new Date).getTime(),c.recoverMediaError();else if(!l||3e3<n-l)l=(new Date).getTime(),console.warn("Attempting to swap Audio Codec and recover from media error"),c.swapAudioCodec(),c.recoverMediaError();else{var o="Cannot recover, last media error recovery failed";d.generateError(o,f.src),console.error(o)}break;case"networkError":if("manifestLoadError"===t.details)if(p<m&&void 0!==u[p+1])f.setSrc(u[p++].src),f.load(),f.play();else{var i="Network error";d.generateError(i,u),console.error(i)}else{var r="Network error";d.generateError(r,u),console.error(r)}break;default:c.destroy()}else{var a=(0,x.createEvent)(e,d);a.data=t,d.dispatchEvent(a)}}(i[o],t)})};for(var a in i)r(a)},0<m)for(;p<m;p++)if(S.renderer.renderers[i.prefix].canPlayType(u[p].type)){f.setAttribute("src",u[p].src);break}"auto"===t||n||(f.addEventListener("play",function(){null!==c&&c.startLoad()}),f.addEventListener("pause",function(){null!==c&&c.stopLoad()})),f.setAttribute("id",r),e.parentNode.insertBefore(f,e),e.autoplay=!1,e.style.display="none",f.setSize=function(e,t){return f.style.width=e+"px",f.style.height=t+"px",f},f.hide=function(){return f.pause(),f.style.display="none",f},f.show=function(){return f.style.display="",f},f.destroy=function(){null!==c&&(c.stopLoad(),c.destroy())};var g=(0,x.createEvent)("rendererready",f);return d.dispatchEvent(g),d.promises.push(w.load({options:i.hls,id:r})),f}};i.typeChecks.push(function(e){return~e.toLowerCase().indexOf(".m3u8")?"application/x-mpegURL":null}),S.renderer.add(s)},{25:25,26:26,27:27,28:28,3:3,7:7,8:8}],23:[function(e,t,n){"use strict";var o=r(e(3)),g=r(e(2)),y=r(e(7)),E=e(8),b=e(27),i=e(25);function r(e){return e&&e.__esModule?e:{default:e}}var a={name:"html5",options:{prefix:"html5"},canPlayType:function(e){var t=g.default.createElement("video");return i.IS_ANDROID&&/\/mp(3|4)$/i.test(e)||~["application/x-mpegurl","vnd.apple.mpegurl","audio/mpegurl","audio/hls","video/hls"].indexOf(e.toLowerCase())&&i.SUPPORTS_NATIVE_HLS?"yes":t.canPlayType?t.canPlayType(e.toLowerCase()).replace(/no/,""):""},create:function(n,e,t){var o=n.id+"_"+e.prefix,i=!1,r=null;void 0===n.originalNode||null===n.originalNode?(r=g.default.createElement("audio"),n.appendChild(r)):r=n.originalNode,r.setAttribute("id",o);for(var a=y.default.html5media.properties,s=function(t){var e=""+t.substring(0,1).toUpperCase()+t.substring(1);r["get"+e]=function(){return r[t]},r["set"+e]=function(e){-1===y.default.html5media.readOnlyProperties.indexOf(t)&&(r[t]=e)}},l=0,d=a.length;l<d;l++)s(a[l]);for(var u,c=y.default.html5media.events.concat(["click","mouseover","mouseout"]).filter(function(e){return"error"!==e}),f=0,p=c.length;f<p;f++)u=c[f],r.addEventListener(u,function(e){if(i){var t=(0,b.createEvent)(e.type,e.target);n.dispatchEvent(t)}});r.setSize=function(e,t){return r.style.width=e+"px",r.style.height=t+"px",r},r.hide=function(){return i=!1,r.style.display="none",r},r.show=function(){return i=!0,r.style.display="",r};var m=0,h=t.length;if(0<h)for(;m<h;m++)if(E.renderer.renderers[e.prefix].canPlayType(t[m].type)){r.setAttribute("src",t[m].src);break}r.addEventListener("error",function(e){e&&e.target&&e.target.error&&4===e.target.error.code&&i&&(m<h&&void 0!==t[m+1]?(r.src=t[m++].src,r.load(),r.play()):n.generateError("Media error: Format(s) not supported or source(s) not found",t))});var v=(0,b.createEvent)("rendererready",r);return n.dispatchEvent(v),r}};o.default.HtmlMediaElement=y.default.HtmlMediaElement=a,E.renderer.add(a)},{2:2,25:25,27:27,3:3,7:7,8:8}],24:[function(e,t,n){"use strict";var w=a(e(3)),P=a(e(2)),T=a(e(7)),o=e(8),C=e(27),i=e(28),r=e(26);function a(e){return e&&e.__esModule?e:{default:e}}var k={isIframeStarted:!1,isIframeLoaded:!1,iframeQueue:[],enqueueIframe:function(e){k.isLoaded="undefined"!=typeof YT&&YT.loaded,k.isLoaded?k.createIframe(e):(k.loadIframeApi(),k.iframeQueue.push(e))},loadIframeApi:function(){k.isIframeStarted||((0,r.loadScript)("https://www.youtube.com/player_api"),k.isIframeStarted=!0)},iFrameReady:function(){for(k.isLoaded=!0,k.isIframeLoaded=!0;0<k.iframeQueue.length;){var e=k.iframeQueue.pop();k.createIframe(e)}},createIframe:function(e){return new YT.Player(e.containerId,e)},getYouTubeId:function(e){var t="";return 0<e.indexOf("?")?""===(t=k.getYouTubeIdFromParam(e))&&(t=k.getYouTubeIdFromUrl(e)):t=k.getYouTubeIdFromUrl(e),(t=t.substring(t.lastIndexOf("/")+1).split("?"))[0]},getYouTubeIdFromParam:function(e){if(null==e||!e.trim().length)return null;for(var t=e.split("?")[1].split("&"),n="",o=0,i=t.length;o<i;o++){var r=t[o].split("=");if("v"===r[0]){n=r[1];break}}return n},getYouTubeIdFromUrl:function(e){return null!=e&&e.trim().length?(e=e.split("?")[0]).substring(e.lastIndexOf("/")+1):null},getYouTubeNoCookieUrl:function(e){if(null==e||!e.trim().length||-1===e.indexOf("//www.youtube"))return e;var t=e.split("/");return t[2]=t[2].replace(".com","-nocookie.com"),t.join("/")}},s={name:"youtube_iframe",options:{prefix:"youtube_iframe",youtube:{autoplay:0,controls:0,disablekb:1,end:0,loop:0,modestbranding:0,playsinline:0,rel:0,showinfo:0,start:0,iv_load_policy:3,nocookie:!1,imageQuality:null}},canPlayType:function(e){return~["video/youtube","video/x-youtube"].indexOf(e.toLowerCase())},create:function(m,n,o){var h={},v=[],g=null,r=!0,a=!1,y=null;h.options=n,h.id=m.id+"_"+n.prefix,h.mediaElement=m;for(var e=T.default.html5media.properties,t=function(i){var e=""+i.substring(0,1).toUpperCase()+i.substring(1);h["get"+e]=function(){if(null!==g){switch(i){case"currentTime":return g.getCurrentTime();case"duration":return g.getDuration();case"volume":return g.getVolume()/100;case"playbackRate":return g.getPlaybackRate();case"paused":return r;case"ended":return a;case"muted":return g.isMuted();case"buffered":var e=g.getVideoLoadedFraction(),t=g.getDuration();return{start:function(){return 0},end:function(){return e*t},length:1};case"src":return g.getVideoUrl();case"readyState":return 4}return null}return null},h["set"+e]=function(e){if(null!==g)switch(i){case"src":var t="string"==typeof e?e:e[0].src,n=k.getYouTubeId(t);m.originalNode.autoplay?g.loadVideoById(n):g.cueVideoById(n);break;case"currentTime":g.seekTo(e);break;case"muted":e?g.mute():g.unMute(),setTimeout(function(){var e=(0,C.createEvent)("volumechange",h);m.dispatchEvent(e)},50);break;case"volume":e,g.setVolume(100*e),setTimeout(function(){var e=(0,C.createEvent)("volumechange",h);m.dispatchEvent(e)},50);break;case"playbackRate":g.setPlaybackRate(e),setTimeout(function(){var e=(0,C.createEvent)("ratechange",h);m.dispatchEvent(e)},50);break;case"readyState":var o=(0,C.createEvent)("canplay",h);m.dispatchEvent(o)}else v.push({type:"set",propName:i,value:e})}},i=0,s=e.length;i<s;i++)t(e[i]);for(var l=T.default.html5media.methods,d=function(e){h[e]=function(){if(null!==g)switch(e){case"play":return r=!1,g.playVideo();case"pause":return r=!0,g.pauseVideo();case"load":return null}else v.push({type:"call",methodName:e})}},u=0,c=l.length;u<c;u++)d(l[u]);var f=P.default.createElement("div");f.id=h.id,h.options.youtube.nocookie&&(m.originalNode.src=k.getYouTubeNoCookieUrl(o[0].src)),m.originalNode.parentNode.insertBefore(f,m.originalNode),m.originalNode.style.display="none";var p="audio"===m.originalNode.tagName.toLowerCase(),E=p?"1":m.originalNode.height,b=p?"1":m.originalNode.width,S=k.getYouTubeId(o[0].src),x={id:h.id,containerId:f.id,videoId:S,height:E,width:b,host:h.options.youtube&&h.options.youtube.nocookie?"https://www.youtube-nocookie.com":void 0,playerVars:Object.assign({controls:0,rel:0,disablekb:1,showinfo:0,modestbranding:0,html5:1,iv_load_policy:3},h.options.youtube),origin:w.default.location.host,events:{onReady:function(e){if(m.youTubeApi=g=e.target,m.youTubeState={paused:!0,ended:!1},v.length)for(var t=0,n=v.length;t<n;t++){var o=v[t];if("set"===o.type){var i=o.propName,r=""+i.substring(0,1).toUpperCase()+i.substring(1);h["set"+r](o.value)}else"call"===o.type&&h[o.methodName]()}y=g.getIframe(),m.originalNode.muted&&g.mute();for(var a=["mouseover","mouseout"],s=function(e){var t=(0,C.createEvent)(e.type,h);m.dispatchEvent(t)},l=0,d=a.length;l<d;l++)y.addEventListener(a[l],s,!1);for(var u=["rendererready","loadedmetadata","loadeddata","canplay"],c=0,f=u.length;c<f;c++){var p=(0,C.createEvent)(u[c],h);m.dispatchEvent(p)}},onStateChange:function(e){var t=[];switch(e.data){case-1:t=["loadedmetadata"],r=!0,a=!1;break;case 0:t=["ended"],r=!1,a=!h.options.youtube.loop,h.options.youtube.loop||h.stopInterval();break;case 1:t=["play","playing"],a=r=!1,h.startInterval();break;case 2:t=["pause"],r=!0,a=!1,h.stopInterval();break;case 3:t=["progress"],a=!1;break;case 5:t=["loadeddata","loadedmetadata","canplay"],r=!0,a=!1}for(var n=0,o=t.length;n<o;n++){var i=(0,C.createEvent)(t[n],h);m.dispatchEvent(i)}},onError:function(e){return function(e){var t="";switch(e.data){case 2:t="The request contains an invalid parameter value. Verify that video ID has 11 characters and that contains no invalid characters, such as exclamation points or asterisks.";break;case 5:t="The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.";break;case 100:t="The video requested was not found. Either video has been removed or has been marked as private.";break;case 101:case 105:t="The owner of the requested video does not allow it to be played in embedded players.";break;default:t="Unknown error."}m.generateError("Code "+e.data+": "+t,o)}(e)}}};return(p||m.originalNode.hasAttribute("playsinline"))&&(x.playerVars.playsinline=1),m.originalNode.controls&&(x.playerVars.controls=1),m.originalNode.autoplay&&(x.playerVars.autoplay=1),m.originalNode.loop&&(x.playerVars.loop=1),(x.playerVars.loop&&1===parseInt(x.playerVars.loop,10)||-1<m.originalNode.src.indexOf("loop="))&&!x.playerVars.playlist&&-1===m.originalNode.src.indexOf("playlist=")&&(x.playerVars.playlist=k.getYouTubeId(m.originalNode.src)),k.enqueueIframe(x),h.onEvent=function(e,t,n){null!=n&&(m.youTubeState=n)},h.setSize=function(e,t){null!==g&&g.setSize(e,t)},h.hide=function(){h.stopInterval(),h.pause(),y&&(y.style.display="none")},h.show=function(){y&&(y.style.display="")},h.destroy=function(){g.destroy()},h.interval=null,h.startInterval=function(){h.interval=setInterval(function(){var e=(0,C.createEvent)("timeupdate",h);m.dispatchEvent(e)},250)},h.stopInterval=function(){h.interval&&clearInterval(h.interval)},h.getPosterUrl=function(){var e=n.youtube.imageQuality,t=k.getYouTubeId(m.originalNode.src);return e&&-1<["default","hqdefault","mqdefault","sddefault","maxresdefault"].indexOf(e)&&t?"https://img.youtube.com/vi/"+t+"/"+e+".jpg":""},h}};w.default.onYouTubePlayerAPIReady=function(){k.iFrameReady()},i.typeChecks.push(function(e){return/\/\/(www\.youtube|youtu\.?be)/i.test(e)?"video/x-youtube":null}),o.renderer.add(s)},{2:2,26:26,27:27,28:28,3:3,7:7,8:8}],25:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.cancelFullScreen=n.requestFullScreen=n.isFullScreen=n.FULLSCREEN_EVENT_NAME=n.HAS_NATIVE_FULLSCREEN_ENABLED=n.HAS_TRUE_NATIVE_FULLSCREEN=n.HAS_IOS_FULLSCREEN=n.HAS_MS_NATIVE_FULLSCREEN=n.HAS_MOZ_NATIVE_FULLSCREEN=n.HAS_WEBKIT_NATIVE_FULLSCREEN=n.HAS_NATIVE_FULLSCREEN=n.SUPPORTS_NATIVE_HLS=n.SUPPORT_PASSIVE_EVENT=n.SUPPORT_POINTER_EVENTS=n.HAS_MSE=n.IS_STOCK_ANDROID=n.IS_SAFARI=n.IS_FIREFOX=n.IS_CHROME=n.IS_EDGE=n.IS_IE=n.IS_ANDROID=n.IS_IOS=n.IS_IPOD=n.IS_IPHONE=n.IS_IPAD=n.UA=n.NAV=void 0;var i=a(e(3)),r=a(e(2)),o=a(e(7));function a(e){return e&&e.__esModule?e:{default:e}}for(var s=n.NAV=i.default.navigator,l=n.UA=s.userAgent.toLowerCase(),d=n.IS_IPAD=/ipad/i.test(l)&&!i.default.MSStream,u=n.IS_IPHONE=/iphone/i.test(l)&&!i.default.MSStream,c=n.IS_IPOD=/ipod/i.test(l)&&!i.default.MSStream,f=(n.IS_IOS=/ipad|iphone|ipod/i.test(l)&&!i.default.MSStream,n.IS_ANDROID=/android/i.test(l)),p=n.IS_IE=/(trident|microsoft)/i.test(s.appName),m=(n.IS_EDGE="msLaunchUri"in s&&!("documentMode"in r.default)),h=n.IS_CHROME=/chrome/i.test(l),v=n.IS_FIREFOX=/firefox/i.test(l),g=n.IS_SAFARI=/safari/i.test(l)&&!h,y=n.IS_STOCK_ANDROID=/^mozilla\/\d+\.\d+\s\(linux;\su;/i.test(l),E=(n.HAS_MSE="MediaSource"in i.default),b=n.SUPPORT_POINTER_EVENTS=function(){var e=r.default.createElement("x"),t=r.default.documentElement,n=i.default.getComputedStyle;if(!("pointerEvents"in e.style))return!1;e.style.pointerEvents="auto",e.style.pointerEvents="x",t.appendChild(e);var o=n&&"auto"===(n(e,"")||{}).pointerEvents;return e.remove(),!!o}(),S=n.SUPPORT_PASSIVE_EVENT=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});i.default.addEventListener("test",null,t)}catch(e){}return e}(),x=["source","track","audio","video"],w=void 0,P=0,T=x.length;P<T;P++)w=r.default.createElement(x[P]);var C=n.SUPPORTS_NATIVE_HLS=g||p&&/edge/i.test(l),k=void 0!==w.webkitEnterFullscreen,_=void 0!==w.requestFullscreen;k&&/mac os x 10_5/i.test(l)&&(k=_=!1);var N=void 0!==w.webkitRequestFullScreen,A=void 0!==w.mozRequestFullScreen,L=void 0!==w.msRequestFullscreen,F=N||A||L,j=F,I="",M=void 0,O=void 0,D=void 0;A?j=r.default.mozFullScreenEnabled:L&&(j=r.default.msFullscreenEnabled),h&&(k=!1),F&&(N?I="webkitfullscreenchange":A?I="fullscreenchange":L&&(I="MSFullscreenChange"),n.isFullScreen=M=function(){return A?r.default.mozFullScreen:N?r.default.webkitIsFullScreen:L?null!==r.default.msFullscreenElement:void 0},n.requestFullScreen=O=function(e){N?e.webkitRequestFullScreen():A?e.mozRequestFullScreen():L&&e.msRequestFullscreen()},n.cancelFullScreen=D=function(){N?r.default.webkitCancelFullScreen():A?r.default.mozCancelFullScreen():L&&r.default.msExitFullscreen()});var R=n.HAS_NATIVE_FULLSCREEN=_,V=n.HAS_WEBKIT_NATIVE_FULLSCREEN=N,H=n.HAS_MOZ_NATIVE_FULLSCREEN=A,U=n.HAS_MS_NATIVE_FULLSCREEN=L,q=n.HAS_IOS_FULLSCREEN=k,B=n.HAS_TRUE_NATIVE_FULLSCREEN=F,z=n.HAS_NATIVE_FULLSCREEN_ENABLED=j,W=n.FULLSCREEN_EVENT_NAME=I;n.isFullScreen=M,n.requestFullScreen=O,n.cancelFullScreen=D,o.default.Features=o.default.Features||{},o.default.Features.isiPad=d,o.default.Features.isiPod=c,o.default.Features.isiPhone=u,o.default.Features.isiOS=o.default.Features.isiPhone||o.default.Features.isiPad,o.default.Features.isAndroid=f,o.default.Features.isIE=p,o.default.Features.isEdge=m,o.default.Features.isChrome=h,o.default.Features.isFirefox=v,o.default.Features.isSafari=g,o.default.Features.isStockAndroid=y,o.default.Features.hasMSE=E,o.default.Features.supportsNativeHLS=C,o.default.Features.supportsPointerEvents=b,o.default.Features.supportsPassiveEvent=S,o.default.Features.hasiOSFullScreen=q,o.default.Features.hasNativeFullscreen=R,o.default.Features.hasWebkitNativeFullScreen=V,o.default.Features.hasMozNativeFullScreen=H,o.default.Features.hasMsNativeFullScreen=U,o.default.Features.hasTrueNativeFullScreen=B,o.default.Features.nativeFullScreenEnabled=z,o.default.Features.fullScreenEventName=W,o.default.Features.isFullScreen=M,o.default.Features.requestFullScreen=O,o.default.Features.cancelFullScreen=D},{2:2,3:3,7:7}],26:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.removeClass=n.addClass=n.hasClass=void 0,n.loadScript=a,n.offset=s,n.toggleClass=h,n.fadeOut=v,n.fadeIn=g,n.siblings=y,n.visible=E,n.ajax=b;var l=r(e(3)),i=r(e(2)),o=r(e(7));function r(e){return e&&e.__esModule?e:{default:e}}function a(o){return new Promise(function(e,t){var n=i.default.createElement("script");n.src=o,n.async=!0,n.onload=function(){n.remove(),e()},n.onerror=function(){n.remove(),t()},i.default.head.appendChild(n)})}function s(e){var t=e.getBoundingClientRect(),n=l.default.pageXOffset||i.default.documentElement.scrollLeft,o=l.default.pageYOffset||i.default.documentElement.scrollTop;return{top:t.top+o,left:t.left+n}}var d=void 0,u=void 0,c=void 0;"classList"in i.default.documentElement?(d=function(e,t){return void 0!==e.classList&&e.classList.contains(t)},u=function(e,t){return e.classList.add(t)},c=function(e,t){return e.classList.remove(t)}):(d=function(e,t){return new RegExp("\\b"+t+"\\b").test(e.className)},u=function(e,t){f(e,t)||(e.className+=" "+t)},c=function(e,t){e.className=e.className.replace(new RegExp("\\b"+t+"\\b","g"),"")});var f=n.hasClass=d,p=n.addClass=u,m=n.removeClass=c;function h(e,t){f(e,t)?m(e,t):p(e,t)}function v(i){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:400,a=arguments[2];i.style.opacity||(i.style.opacity=1);var s=null;l.default.requestAnimationFrame(function e(t){var n=t-(s=s||t),o=parseFloat(1-n/r,2);i.style.opacity=o<0?0:o,r<n?a&&"function"==typeof a&&a():l.default.requestAnimationFrame(e)})}function g(i){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:400,a=arguments[2];i.style.opacity||(i.style.opacity=0);var s=null;l.default.requestAnimationFrame(function e(t){var n=t-(s=s||t),o=parseFloat(n/r,2);i.style.opacity=1<o?1:o,r<n?a&&"function"==typeof a&&a():l.default.requestAnimationFrame(e)})}function y(e,t){var n=[];for(e=e.parentNode.firstChild;t&&!t(e)||n.push(e),e=e.nextSibling;);return n}function E(e){return void 0!==e.getClientRects&&"function"===e.getClientRects?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!(!e.offsetWidth&&!e.offsetHeight)}function b(e,t,n,o){var i=l.default.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),r="application/x-www-form-urlencoded; charset=UTF-8",a=!1,s="*/".concat("*");switch(t){case"text":r="text/plain";break;case"json":r="application/json, text/javascript";break;case"html":r="text/html";break;case"xml":r="application/xml, text/xml"}"application/x-www-form-urlencoded"!==r&&(s=r+", */*; q=0.01"),i&&(i.open("GET",e,!0),i.setRequestHeader("Accept",s),i.onreadystatechange=function(){if(!a&&4===i.readyState)if(200===i.status){a=!0;var e=void 0;switch(t){case"json":e=JSON.parse(i.responseText);break;case"xml":e=i.responseXML;break;default:e=i.responseText}n(e)}else"function"==typeof o&&o(i.status)},i.send())}o.default.Utils=o.default.Utils||{},o.default.Utils.offset=s,o.default.Utils.hasClass=f,o.default.Utils.addClass=p,o.default.Utils.removeClass=m,o.default.Utils.toggleClass=h,o.default.Utils.fadeIn=g,o.default.Utils.fadeOut=v,o.default.Utils.siblings=y,o.default.Utils.visible=E,o.default.Utils.ajax=b,o.default.Utils.loadScript=a},{2:2,3:3,7:7}],27:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.escapeHTML=a,n.debounce=s,n.isObjectEmpty=l,n.splitEvents=d,n.createEvent=u,n.isNodeAfter=c,n.isString=f;var o,i=e(7),r=(o=i)&&o.__esModule?o:{default:o};function a(e){if("string"!=typeof e)throw new Error("Argument passed must be a string");var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};return e.replace(/[&<>"]/g,function(e){return t[e]})}function s(o,i){var r=this,a=arguments,s=2<arguments.length&&void 0!==arguments[2]&&arguments[2];if("function"!=typeof o)throw new Error("First argument must be a function");if("number"!=typeof i)throw new Error("Second argument must be a numeric value");var l=void 0;return function(){var e=r,t=a,n=s&&!l;clearTimeout(l),l=setTimeout(function(){l=null,s||o.apply(e,t)},i),n&&o.apply(e,t)}}function l(e){return Object.getOwnPropertyNames(e).length<=0}function d(e,n){var o=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/,i={d:[],w:[]};return(e||"").split(" ").forEach(function(e){var t=e+(n?"."+n:"");t.startsWith(".")?(i.d.push(t),i.w.push(t)):i[o.test(e)?"w":"d"].push(t)}),i.d=i.d.join(" "),i.w=i.w.join(" "),i}function u(e,t){if("string"!=typeof e)throw new Error("Event name must be a string");var n=e.match(/([a-z]+\.([a-z]+))/i),o={target:t};return null!==n&&(e=n[1],o.namespace=n[2]),new window.CustomEvent(e,{detail:o})}function c(e,t){return!!(e&&t&&2&e.compareDocumentPosition(t))}function f(e){return"string"==typeof e}r.default.Utils=r.default.Utils||{},r.default.Utils.escapeHTML=a,r.default.Utils.debounce=s,r.default.Utils.isObjectEmpty=l,r.default.Utils.splitEvents=d,r.default.Utils.createEvent=u,r.default.Utils.isNodeAfter=c,r.default.Utils.isString=f},{7:7}],28:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.typeChecks=void 0,n.absolutizeUrl=l,n.formatType=d,n.getMimeFromType=u,n.getTypeFromFile=c,n.getExtension=f,n.normalizeExtension=p;var o,i=e(7),r=(o=i)&&o.__esModule?o:{default:o},a=e(27);var s=n.typeChecks=[];function l(e){if("string"!=typeof e)throw new Error("`url` argument must be a string");var t=document.createElement("div");return t.innerHTML='<a href="'+(0,a.escapeHTML)(e)+'">x</a>',t.firstChild.href}function d(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";return e&&!t?c(e):t}function u(e){if("string"!=typeof e)throw new Error("`type` argument must be a string");return e&&-1<e.indexOf(";")?e.substr(0,e.indexOf(";")):e}function c(e){if("string"!=typeof e)throw new Error("`url` argument must be a string");for(var t=0,n=s.length;t<n;t++){var o=s[t](e);if(o)return o}var i=p(f(e)),r="video/mp4";return i&&(~["mp4","m4v","ogg","ogv","webm","flv","mpeg"].indexOf(i)?r="video/"+i:"mov"===i?r="video/quicktime":~["mp3","oga","wav","mid","midi"].indexOf(i)&&(r="audio/"+i)),r}function f(e){if("string"!=typeof e)throw new Error("`url` argument must be a string");var t=e.split("?")[0].split("\\").pop().split("/").pop();return~t.indexOf(".")?t.substring(t.lastIndexOf(".")+1):""}function p(e){if("string"!=typeof e)throw new Error("`extension` argument must be a string");switch(e){case"mp4":case"m4v":return"mp4";case"webm":case"webma":case"webmv":return"webm";case"ogg":case"oga":case"ogv":return"ogg";default:return e}}r.default.Utils=r.default.Utils||{},r.default.Utils.typeChecks=s,r.default.Utils.absolutizeUrl=l,r.default.Utils.formatType=d,r.default.Utils.getMimeFromType=u,r.default.Utils.getTypeFromFile=c,r.default.Utils.getExtension=f,r.default.Utils.normalizeExtension=p},{27:27,7:7}],29:[function(e,t,n){"use strict";var o,i=a(e(2)),r=a(e(4));function a(e){return e&&e.__esModule?e:{default:e}}if([Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach(function(e){e.hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode.removeChild(this)}})}),function(){if("function"==typeof window.CustomEvent)return;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=i.default.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e}(),"function"!=typeof Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1,o=arguments.length;n<o;n++){var i=arguments[n];if(null!==i)for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t}),String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length-1;0<=--n&&t.item(n)!==this;);return-1<n}),window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(e){var t=(this.document||this.ownerDocument).querySelectorAll(e),n=void 0,o=this;do{for(n=t.length;0<=--n&&t.item(n)!==o;);}while(n<0&&(o=o.parentElement));return o}),function(){for(var i=0,e=["ms","moz","webkit","o"],t=0;t<e.length&&!window.requestAnimationFrame;++t)window.requestAnimationFrame=window[e[t]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[t]+"CancelAnimationFrame"]||window[e[t]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-i)),o=window.setTimeout(function(){e(t+n)},n);return i=t+n,o}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)})}(),/firefox/i.test(navigator.userAgent)){var s=window.getComputedStyle;window.getComputedStyle=function(e,t){var n=s(e,t);return null===n?{getPropertyValue:function(){}}:n}}window.Promise||(window.Promise=r.default),(o=window.Node||window.Element)&&o.prototype&&null===o.prototype.children&&Object.defineProperty(o.prototype,"children",{get:function(){for(var e=0,t=void 0,n=this.childNodes,o=[];t=n[e++];)1===t.nodeType&&o.push(t);return o}})},{2:2,4:4}],30:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isDropFrame=C,n.secondsToTimeCode=a,n.timeCodeToSeconds=s,n.calculateTimeFormat=l,n.convertSMPTEtoSeconds=d;var o,i=e(7),r=(o=i)&&o.__esModule?o:{default:o};function C(){return!((0<arguments.length&&void 0!==arguments[0]?arguments[0]:25)%1==0)}function a(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:25,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,r=5<arguments.length&&void 0!==arguments[5]?arguments[5]:"hh:mm:ss";e=!e||"number"!=typeof e||e<0?0:e;var a=Math.round(.066666*o),s=Math.round(o),l=24*Math.round(3600*o),d=Math.round(600*o),u=C(o)?";":":",c=void 0,f=void 0,p=void 0,m=void 0,h=Math.round(e*o);if(C(o)){h<0&&(h=l+h);var v=(h%=l)%d;h+=9*a*Math.floor(h/d),a<v&&(h+=a*Math.floor((v-a)/Math.round(60*s-a)));var g=Math.floor(h/s);c=Math.floor(Math.floor(g/60)/60),f=Math.floor(g/60)%60,p=n?g%60:Math.floor(h/s%60).toFixed(i)}else c=Math.floor(e/3600)%24,f=Math.floor(e/60)%60,p=n?Math.floor(e%60):Math.floor(e%60).toFixed(i);c=c<=0?0:c,p=60===(p=p<=0?0:p)?0:p,f=60===(f=f<=0?0:f)?0:f;for(var y=r.split(":"),E={},b=0,S=y.length;b<S;++b){for(var x="",w=0,P=y[b].length;w<P;w++)x.indexOf(y[b][w])<0&&(x+=y[b][w]);~["f","s","m","h"].indexOf(x)&&(E[x]=y[b].length)}var T=t||0<c?(c<10&&1<E.h?"0"+c:c)+":":"";return T+=(f<10&&1<E.m?"0"+f:f)+":",T+=""+(p<10&&1<E.s?"0"+p:p),n&&(T+=(m=(m=(h%s).toFixed(0))<=0?0:m)<10&&E.f?u+"0"+m:""+u+m),T}function s(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:25;if("string"!=typeof e)throw new TypeError("Time must be a string");if(0<e.indexOf(";")&&(e=e.replace(";",":")),!/\d{2}(\:\d{2}){0,3}/i.test(e))throw new TypeError("Time code must have the format `00:00:00`");var n=e.split(":"),o=void 0,i=0,r=0,a=0,s=0,l=0,d=Math.round(.066666*t),u=Math.round(t),c=3600*u,f=60*u;switch(n.length){default:case 1:a=parseInt(n[0],10);break;case 2:r=parseInt(n[0],10),a=parseInt(n[1],10);break;case 3:i=parseInt(n[0],10),r=parseInt(n[1],10),a=parseInt(n[2],10);break;case 4:i=parseInt(n[0],10),r=parseInt(n[1],10),a=parseInt(n[2],10),s=parseInt(n[3],10)}return o=C(t)?c*i+f*r+u*a+s-d*((l=60*i+r)-Math.floor(l/10)):(c*i+f*r+t*a+s)/t,parseFloat(o.toFixed(3))}function l(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:25;e=!e||"number"!=typeof e||e<0?0:e;for(var o=Math.floor(e/3600)%24,i=Math.floor(e/60)%60,r=Math.floor(e%60),a=[[Math.floor((e%1*n).toFixed(3)),"f"],[r,"s"],[i,"m"],[o,"h"]],s=t.timeFormat,l=s[1]===s[0],d=l?2:1,u=s.length<d?s[d]:":",c=s[0],f=!1,p=0,m=a.length;p<m;p++)if(~s.indexOf(a[p][1]))f=!0;else if(f){for(var h=!1,v=p;v<m;v++)if(0<a[v][0]){h=!0;break}if(!h)break;l||(s=c+s),s=a[p][1]+u+s,l&&(s=a[p][1]+s),c=a[p][1]}t.timeFormat=s}function d(e){if("string"!=typeof e)throw new TypeError("Argument must be a string value");for(var t=~(e=e.replace(",",".")).indexOf(".")?e.split(".")[1].length:0,n=0,o=1,i=0,r=(e=e.split(":").reverse()).length;i<r;i++)o=1,0<i&&(o=Math.pow(60,i)),n+=Number(e[i])*o;return Number(n.toFixed(t))}r.default.Utils=r.default.Utils||{},r.default.Utils.secondsToTimeCode=a,r.default.Utils.timeCodeToSeconds=s,r.default.Utils.calculateTimeFormat=l,r.default.Utils.convertSMPTEtoSeconds=d},{7:7}]},{},[29,6,5,15,23,20,19,21,22,24,16,18,17,9,10,11,12,13,14]);                                                                                                                                                                                                           mediaelement/mediaelement-migrate.js                                                                0000644                 00000005431 15212564044 0013620 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /* global console, MediaElementPlayer, mejs */
(function ( window, $ ) {
	// Reintegrate `plugins` since they don't exist in MEJS anymore; it won't affect anything in the player
	if (mejs.plugins === undefined) {
		mejs.plugins = {};
		mejs.plugins.silverlight = [];
		mejs.plugins.silverlight.push({
			types: []
		});
	}

	// Inclusion of old `HtmlMediaElementShim` if it doesn't exist
	mejs.HtmlMediaElementShim = mejs.HtmlMediaElementShim || {
		getTypeFromFile: mejs.Utils.getTypeFromFile
	};

	// Add missing global variables for backward compatibility
	if (mejs.MediaFeatures === undefined) {
		mejs.MediaFeatures = mejs.Features;
	}
	if (mejs.Utility === undefined) {
		mejs.Utility = mejs.Utils;
	}

	/**
	 * Create missing variables and have default `classPrefix` overridden to avoid issues.
	 *
	 * `media` is now a fake wrapper needed to simplify manipulation of various media types,
	 * so in order to access the `video` or `audio` tag, use `media.originalNode` or `player.node`;
	 * `player.container` used to be jQuery but now is a HTML element, and many elements inside
	 * the player rely on it being a HTML now, so its conversion is difficult; however, a
	 * `player.$container` new variable has been added to be used as jQuery object
	 */
	var init = MediaElementPlayer.prototype.init;
	MediaElementPlayer.prototype.init = function () {
		this.options.classPrefix = 'mejs-';
		this.$media = this.$node = $( this.node );
		init.call( this );
	};

	var ready = MediaElementPlayer.prototype._meReady;
	MediaElementPlayer.prototype._meReady = function () {
		this.container = $( this.container) ;
		this.controls = $( this.controls );
		this.layers = $( this.layers );
		ready.apply( this, arguments );
	};

	// Override method so certain elements can be called with jQuery
	MediaElementPlayer.prototype.getElement = function ( el ) {
		return $ !== undefined && el instanceof $ ? el[0] : el;
	};

	// Add jQuery ONLY to most of custom features' arguments for backward compatibility; default features rely 100%
	// on the arguments being HTML elements to work properly
	MediaElementPlayer.prototype.buildfeatures = function ( player, controls, layers, media ) {
		var defaultFeatures = [
			'playpause',
			'current',
			'progress',
			'duration',
			'tracks',
			'volume',
			'fullscreen'
		];
		for (var i = 0, total = this.options.features.length; i < total; i++) {
			var feature = this.options.features[i];
			if (this['build' + feature]) {
				try {
					// Use jQuery for non-default features
					if (defaultFeatures.indexOf(feature) === -1) {
						this['build' + feature]( player, $(controls), $(layers), media );
					} else {
						this['build' + feature]( player, controls, layers, media );
					}

				} catch (e) {
					console.error( 'error building ' + feature, e );
				}
			}
		}
	};

})( window, jQuery );
                                                                                                                                                                                                                                       mediaelement/mediaelement-migrate.min.js                                                            0000644                 00000002247 15212564044 0014404 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(a){void 0===mejs.plugins&&(mejs.plugins={},mejs.plugins.silverlight=[],mejs.plugins.silverlight.push({types:[]})),mejs.HtmlMediaElementShim=mejs.HtmlMediaElementShim||{getTypeFromFile:mejs.Utils.getTypeFromFile},void 0===mejs.MediaFeatures&&(mejs.MediaFeatures=mejs.Features),void 0===mejs.Utility&&(mejs.Utility=mejs.Utils);var e=MediaElementPlayer.prototype.init,t=(MediaElementPlayer.prototype.init=function(){this.options.classPrefix="mejs-",this.$media=this.$node=a(this.node),e.call(this)},MediaElementPlayer.prototype._meReady);MediaElementPlayer.prototype._meReady=function(){this.container=a(this.container),this.controls=a(this.controls),this.layers=a(this.layers),t.apply(this,arguments)},MediaElementPlayer.prototype.getElement=function(e){return void 0!==a&&e instanceof a?e[0]:e},MediaElementPlayer.prototype.buildfeatures=function(e,t,i,s){for(var l=["playpause","current","progress","duration","tracks","volume","fullscreen"],r=0,n=this.options.features.length;r<n;r++){var o=this.options.features[r];if(this["build"+o])try{-1===l.indexOf(o)?this["build"+o](e,a(t),a(i),s):this["build"+o](e,t,i,s)}catch(e){console.error("error building "+o,e)}}}}((window,jQuery));                                                                                                                                                                                                                                                                                                                                                         mediaelement/mediaelement.js                                                                        0000644                 00000357326 15212564044 0012207 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * MediaElement.js
 * http://www.mediaelementjs.com/
 *
 * Wrapper that mimics native HTML5 MediaElement (audio and video)
 * using a variety of technologies (pure JavaScript, Flash, iframe)
 *
 * Copyright 2010-2017, John Dyer (http://j.hn/)
 * License: MIT
 *
 */(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(_dereq_,module,exports){

},{}],2:[function(_dereq_,module,exports){
(function (global){
var topLevel = typeof global !== 'undefined' ? global :
    typeof window !== 'undefined' ? window : {}
var minDoc = _dereq_(1);

var doccy;

if (typeof document !== 'undefined') {
    doccy = document;
} else {
    doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];

    if (!doccy) {
        doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;
    }
}

module.exports = doccy;

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"1":1}],3:[function(_dereq_,module,exports){
(function (global){
var win;

if (typeof window !== "undefined") {
    win = window;
} else if (typeof global !== "undefined") {
    win = global;
} else if (typeof self !== "undefined"){
    win = self;
} else {
    win = {};
}

module.exports = win;

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],4:[function(_dereq_,module,exports){
(function (root) {

  // Store setTimeout reference so promise-polyfill will be unaffected by
  // other code modifying setTimeout (like sinon.useFakeTimers())
  var setTimeoutFunc = setTimeout;

  function noop() {}
  
  // Polyfill for Function.prototype.bind
  function bind(fn, thisArg) {
    return function () {
      fn.apply(thisArg, arguments);
    };
  }

  function Promise(fn) {
    if (typeof this !== 'object') throw new TypeError('Promises must be constructed via new');
    if (typeof fn !== 'function') throw new TypeError('not a function');
    this._state = 0;
    this._handled = false;
    this._value = undefined;
    this._deferreds = [];

    doResolve(fn, this);
  }

  function handle(self, deferred) {
    while (self._state === 3) {
      self = self._value;
    }
    if (self._state === 0) {
      self._deferreds.push(deferred);
      return;
    }
    self._handled = true;
    Promise._immediateFn(function () {
      var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;
      if (cb === null) {
        (self._state === 1 ? resolve : reject)(deferred.promise, self._value);
        return;
      }
      var ret;
      try {
        ret = cb(self._value);
      } catch (e) {
        reject(deferred.promise, e);
        return;
      }
      resolve(deferred.promise, ret);
    });
  }

  function resolve(self, newValue) {
    try {
      // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure
      if (newValue === self) throw new TypeError('A promise cannot be resolved with itself.');
      if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {
        var then = newValue.then;
        if (newValue instanceof Promise) {
          self._state = 3;
          self._value = newValue;
          finale(self);
          return;
        } else if (typeof then === 'function') {
          doResolve(bind(then, newValue), self);
          return;
        }
      }
      self._state = 1;
      self._value = newValue;
      finale(self);
    } catch (e) {
      reject(self, e);
    }
  }

  function reject(self, newValue) {
    self._state = 2;
    self._value = newValue;
    finale(self);
  }

  function finale(self) {
    if (self._state === 2 && self._deferreds.length === 0) {
      Promise._immediateFn(function() {
        if (!self._handled) {
          Promise._unhandledRejectionFn(self._value);
        }
      });
    }

    for (var i = 0, len = self._deferreds.length; i < len; i++) {
      handle(self, self._deferreds[i]);
    }
    self._deferreds = null;
  }

  function Handler(onFulfilled, onRejected, promise) {
    this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
    this.onRejected = typeof onRejected === 'function' ? onRejected : null;
    this.promise = promise;
  }

  /**
   * Take a potentially misbehaving resolver function and make sure
   * onFulfilled and onRejected are only called once.
   *
   * Makes no guarantees about asynchrony.
   */
  function doResolve(fn, self) {
    var done = false;
    try {
      fn(function (value) {
        if (done) return;
        done = true;
        resolve(self, value);
      }, function (reason) {
        if (done) return;
        done = true;
        reject(self, reason);
      });
    } catch (ex) {
      if (done) return;
      done = true;
      reject(self, ex);
    }
  }

  Promise.prototype['catch'] = function (onRejected) {
    return this.then(null, onRejected);
  };

  Promise.prototype.then = function (onFulfilled, onRejected) {
    var prom = new (this.constructor)(noop);

    handle(this, new Handler(onFulfilled, onRejected, prom));
    return prom;
  };

  Promise.all = function (arr) {
    var args = Array.prototype.slice.call(arr);

    return new Promise(function (resolve, reject) {
      if (args.length === 0) return resolve([]);
      var remaining = args.length;

      function res(i, val) {
        try {
          if (val && (typeof val === 'object' || typeof val === 'function')) {
            var then = val.then;
            if (typeof then === 'function') {
              then.call(val, function (val) {
                res(i, val);
              }, reject);
              return;
            }
          }
          args[i] = val;
          if (--remaining === 0) {
            resolve(args);
          }
        } catch (ex) {
          reject(ex);
        }
      }

      for (var i = 0; i < args.length; i++) {
        res(i, args[i]);
      }
    });
  };

  Promise.resolve = function (value) {
    if (value && typeof value === 'object' && value.constructor === Promise) {
      return value;
    }

    return new Promise(function (resolve) {
      resolve(value);
    });
  };

  Promise.reject = function (value) {
    return new Promise(function (resolve, reject) {
      reject(value);
    });
  };

  Promise.race = function (values) {
    return new Promise(function (resolve, reject) {
      for (var i = 0, len = values.length; i < len; i++) {
        values[i].then(resolve, reject);
      }
    });
  };

  // Use polyfill for setImmediate for performance gains
  Promise._immediateFn = (typeof setImmediate === 'function' && function (fn) { setImmediate(fn); }) ||
    function (fn) {
      setTimeoutFunc(fn, 0);
    };

  Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {
    if (typeof console !== 'undefined' && console) {
      console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console
    }
  };

  /**
   * Set the immediate function to execute callbacks
   * @param fn {function} Function to execute
   * @deprecated
   */
  Promise._setImmediateFn = function _setImmediateFn(fn) {
    Promise._immediateFn = fn;
  };

  /**
   * Change the function to execute on unhandled rejection
   * @param {function} fn Function to execute on unhandled rejection
   * @deprecated
   */
  Promise._setUnhandledRejectionFn = function _setUnhandledRejectionFn(fn) {
    Promise._unhandledRejectionFn = fn;
  };
  
  if (typeof module !== 'undefined' && module.exports) {
    module.exports = Promise;
  } else if (!root.Promise) {
    root.Promise = Promise;
  }

})(this);

},{}],5:[function(_dereq_,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

var _en = _dereq_(9);

var _general = _dereq_(18);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var i18n = { lang: 'en', en: _en.EN };

i18n.language = function () {
	for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
		args[_key] = arguments[_key];
	}

	if (args !== null && args !== undefined && args.length) {

		if (typeof args[0] !== 'string') {
			throw new TypeError('Language code must be a string value');
		}

		if (!/^[a-z]{2,3}((\-|_)[a-z]{2})?$/i.test(args[0])) {
			throw new TypeError('Language code must have format 2-3 letters and. optionally, hyphen, underscore followed by 2 more letters');
		}

		i18n.lang = args[0];

		if (i18n[args[0]] === undefined) {
			args[1] = args[1] !== null && args[1] !== undefined && _typeof(args[1]) === 'object' ? args[1] : {};
			i18n[args[0]] = !(0, _general.isObjectEmpty)(args[1]) ? args[1] : _en.EN;
		} else if (args[1] !== null && args[1] !== undefined && _typeof(args[1]) === 'object') {
			i18n[args[0]] = args[1];
		}
	}

	return i18n.lang;
};

i18n.t = function (message) {
	var pluralParam = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;


	if (typeof message === 'string' && message.length) {

		var str = void 0,
		    pluralForm = void 0;

		var language = i18n.language();

		var _plural = function _plural(input, number, form) {

			if ((typeof input === 'undefined' ? 'undefined' : _typeof(input)) !== 'object' || typeof number !== 'number' || typeof form !== 'number') {
				return input;
			}

			var _pluralForms = function () {
				return [function () {
					return arguments.length <= 1 ? undefined : arguments[1];
				}, function () {
					return (arguments.length <= 0 ? undefined : arguments[0]) === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
				}, function () {
					return (arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) !== 0) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else {
						return arguments.length <= 3 ? undefined : arguments[3];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) === 1 || (arguments.length <= 0 ? undefined : arguments[0]) === 11) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2 || (arguments.length <= 0 ? undefined : arguments[0]) === 12) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) > 2 && (arguments.length <= 0 ? undefined : arguments[0]) < 20) {
						return arguments.length <= 3 ? undefined : arguments[3];
					} else {
						return arguments.length <= 4 ? undefined : arguments[4];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 > 0 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 20) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else {
						return arguments.length <= 3 ? undefined : arguments[3];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else {
						return [3];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else {
						return arguments.length <= 3 ? undefined : arguments[3];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) <= 4) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else {
						return arguments.length <= 3 ? undefined : arguments[3];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else {
						return arguments.length <= 3 ? undefined : arguments[3];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 1) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 2) {
						return arguments.length <= 3 ? undefined : arguments[3];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 3 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 === 4) {
						return arguments.length <= 4 ? undefined : arguments[4];
					} else {
						return arguments.length <= 1 ? undefined : arguments[1];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) > 2 && (arguments.length <= 0 ? undefined : arguments[0]) < 7) {
						return arguments.length <= 3 ? undefined : arguments[3];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) > 6 && (arguments.length <= 0 ? undefined : arguments[0]) < 11) {
						return arguments.length <= 4 ? undefined : arguments[4];
					} else {
						return arguments.length <= 5 ? undefined : arguments[5];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) === 0) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {
						return arguments.length <= 3 ? undefined : arguments[3];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 3 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 <= 10) {
						return arguments.length <= 4 ? undefined : arguments[4];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 11) {
						return arguments.length <= 5 ? undefined : arguments[5];
					} else {
						return arguments.length <= 6 ? undefined : arguments[6];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 > 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 11) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 > 10 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 20) {
						return arguments.length <= 3 ? undefined : arguments[3];
					} else {
						return arguments.length <= 4 ? undefined : arguments[4];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 2) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else {
						return arguments.length <= 3 ? undefined : arguments[3];
					}
				}, function () {
					return (arguments.length <= 0 ? undefined : arguments[0]) !== 11 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else {
						return arguments.length <= 3 ? undefined : arguments[3];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) !== 8 && (arguments.length <= 0 ? undefined : arguments[0]) !== 11) {
						return arguments.length <= 3 ? undefined : arguments[3];
					} else {
						return arguments.length <= 4 ? undefined : arguments[4];
					}
				}, function () {
					return (arguments.length <= 0 ? undefined : arguments[0]) === 0 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 3) {
						return arguments.length <= 3 ? undefined : arguments[3];
					} else {
						return arguments.length <= 4 ? undefined : arguments[4];
					}
				}, function () {
					if ((arguments.length <= 0 ? undefined : arguments[0]) === 0) {
						return arguments.length <= 1 ? undefined : arguments[1];
					} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
						return arguments.length <= 2 ? undefined : arguments[2];
					} else {
						return arguments.length <= 3 ? undefined : arguments[3];
					}
				}];
			}();

			return _pluralForms[form].apply(null, [number].concat(input));
		};

		if (i18n[language] !== undefined) {
			str = i18n[language][message];
			if (pluralParam !== null && typeof pluralParam === 'number') {
				pluralForm = i18n[language]['mejs.plural-form'];
				str = _plural.apply(null, [str, pluralParam, pluralForm]);
			}
		}

		if (!str && i18n.en) {
			str = i18n.en[message];
			if (pluralParam !== null && typeof pluralParam === 'number') {
				pluralForm = i18n.en['mejs.plural-form'];
				str = _plural.apply(null, [str, pluralParam, pluralForm]);
			}
		}

		str = str || message;

		if (pluralParam !== null && typeof pluralParam === 'number') {
			str = str.replace('%1', pluralParam);
		}

		return (0, _general.escapeHTML)(str);
	}

	return message;
};

_mejs2.default.i18n = i18n;

if (typeof mejsL10n !== 'undefined') {
	_mejs2.default.i18n.language(mejsL10n.language, mejsL10n.strings);
}

exports.default = i18n;

},{"18":18,"7":7,"9":9}],6:[function(_dereq_,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _window = _dereq_(3);

var _window2 = _interopRequireDefault(_window);

var _document = _dereq_(2);

var _document2 = _interopRequireDefault(_document);

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

var _general = _dereq_(18);

var _media2 = _dereq_(19);

var _renderer = _dereq_(8);

var _constants = _dereq_(16);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var MediaElement = function MediaElement(idOrNode, options, sources) {
	var _this = this;

	_classCallCheck(this, MediaElement);

	var t = this;

	sources = Array.isArray(sources) ? sources : null;

	t.defaults = {
		renderers: [],

		fakeNodeName: 'mediaelementwrapper',

		pluginPath: 'build/',

		shimScriptAccess: 'sameDomain'
	};

	options = Object.assign(t.defaults, options);

	t.mediaElement = _document2.default.createElement(options.fakeNodeName);

	var id = idOrNode,
	    error = false;

	if (typeof idOrNode === 'string') {
		t.mediaElement.originalNode = _document2.default.getElementById(idOrNode);
	} else {
		t.mediaElement.originalNode = idOrNode;
		id = idOrNode.id;
	}

	if (t.mediaElement.originalNode === undefined || t.mediaElement.originalNode === null) {
		return null;
	}

	t.mediaElement.options = options;
	id = id || 'mejs_' + Math.random().toString().slice(2);

	t.mediaElement.originalNode.setAttribute('id', id + '_from_mejs');

	var tagName = t.mediaElement.originalNode.tagName.toLowerCase();
	if (['video', 'audio'].indexOf(tagName) > -1 && !t.mediaElement.originalNode.getAttribute('preload')) {
		t.mediaElement.originalNode.setAttribute('preload', 'none');
	}

	t.mediaElement.originalNode.parentNode.insertBefore(t.mediaElement, t.mediaElement.originalNode);

	t.mediaElement.appendChild(t.mediaElement.originalNode);

	var processURL = function processURL(url, type) {
		if (_window2.default.location.protocol === 'https:' && url.indexOf('http:') === 0 && _constants.IS_IOS && _mejs2.default.html5media.mediaTypes.indexOf(type) > -1) {
			var xhr = new XMLHttpRequest();
			xhr.onreadystatechange = function () {
				if (this.readyState === 4 && this.status === 200) {
					var _url = _window2.default.URL || _window2.default.webkitURL,
					    blobUrl = _url.createObjectURL(this.response);
					t.mediaElement.originalNode.setAttribute('src', blobUrl);
					return blobUrl;
				}
				return url;
			};
			xhr.open('GET', url);
			xhr.responseType = 'blob';
			xhr.send();
		}

		return url;
	};

	var mediaFiles = void 0;

	if (sources !== null) {
		mediaFiles = sources;
	} else if (t.mediaElement.originalNode !== null) {

		mediaFiles = [];

		switch (t.mediaElement.originalNode.nodeName.toLowerCase()) {
			case 'iframe':
				mediaFiles.push({
					type: '',
					src: t.mediaElement.originalNode.getAttribute('src')
				});
				break;
			case 'audio':
			case 'video':
				var _sources = t.mediaElement.originalNode.children.length,
				    nodeSource = t.mediaElement.originalNode.getAttribute('src');

				if (nodeSource) {
					var node = t.mediaElement.originalNode,
					    type = (0, _media2.formatType)(nodeSource, node.getAttribute('type'));
					mediaFiles.push({
						type: type,
						src: processURL(nodeSource, type)
					});
				}

				for (var i = 0; i < _sources; i++) {
					var n = t.mediaElement.originalNode.children[i];
					if (n.tagName.toLowerCase() === 'source') {
						var src = n.getAttribute('src'),
						    _type = (0, _media2.formatType)(src, n.getAttribute('type'));
						mediaFiles.push({ type: _type, src: processURL(src, _type) });
					}
				}
				break;
		}
	}

	t.mediaElement.id = id;
	t.mediaElement.renderers = {};
	t.mediaElement.events = {};
	t.mediaElement.promises = [];
	t.mediaElement.renderer = null;
	t.mediaElement.rendererName = null;

	t.mediaElement.changeRenderer = function (rendererName, mediaFiles) {

		var t = _this,
		    media = Object.keys(mediaFiles[0]).length > 2 ? mediaFiles[0] : mediaFiles[0].src;

		if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && t.mediaElement.renderer.name === rendererName) {
			t.mediaElement.renderer.pause();
			if (t.mediaElement.renderer.stop) {
				t.mediaElement.renderer.stop();
			}
			t.mediaElement.renderer.show();
			t.mediaElement.renderer.setSrc(media);
			return true;
		}

		if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null) {
			t.mediaElement.renderer.pause();
			if (t.mediaElement.renderer.stop) {
				t.mediaElement.renderer.stop();
			}
			t.mediaElement.renderer.hide();
		}

		var newRenderer = t.mediaElement.renderers[rendererName],
		    newRendererType = null;

		if (newRenderer !== undefined && newRenderer !== null) {
			newRenderer.show();
			newRenderer.setSrc(media);
			t.mediaElement.renderer = newRenderer;
			t.mediaElement.rendererName = rendererName;
			return true;
		}

		var rendererArray = t.mediaElement.options.renderers.length ? t.mediaElement.options.renderers : _renderer.renderer.order;

		for (var _i = 0, total = rendererArray.length; _i < total; _i++) {
			var index = rendererArray[_i];

			if (index === rendererName) {
				var rendererList = _renderer.renderer.renderers;
				newRendererType = rendererList[index];

				var renderOptions = Object.assign(newRendererType.options, t.mediaElement.options);
				newRenderer = newRendererType.create(t.mediaElement, renderOptions, mediaFiles);
				newRenderer.name = rendererName;

				t.mediaElement.renderers[newRendererType.name] = newRenderer;
				t.mediaElement.renderer = newRenderer;
				t.mediaElement.rendererName = rendererName;
				newRenderer.show();
				return true;
			}
		}

		return false;
	};

	t.mediaElement.setSize = function (width, height) {
		if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null) {
			t.mediaElement.renderer.setSize(width, height);
		}
	};

	t.mediaElement.generateError = function (message, urlList) {
		message = message || '';
		urlList = Array.isArray(urlList) ? urlList : [];
		var event = (0, _general.createEvent)('error', t.mediaElement);
		event.message = message;
		event.urls = urlList;
		t.mediaElement.dispatchEvent(event);
		error = true;
	};

	var props = _mejs2.default.html5media.properties,
	    methods = _mejs2.default.html5media.methods,
	    addProperty = function addProperty(obj, name, onGet, onSet) {
		var oldValue = obj[name];
		var getFn = function getFn() {
			return onGet.apply(obj, [oldValue]);
		},
		    setFn = function setFn(newValue) {
			oldValue = onSet.apply(obj, [newValue]);
			return oldValue;
		};

		Object.defineProperty(obj, name, {
			get: getFn,
			set: setFn
		});
	},
	    assignGettersSetters = function assignGettersSetters(propName) {
		if (propName !== 'src') {

			var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1),
			    getFn = function getFn() {
				return t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer['get' + capName] === 'function' ? t.mediaElement.renderer['get' + capName]() : null;
			},
			    setFn = function setFn(value) {
				if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer['set' + capName] === 'function') {
					t.mediaElement.renderer['set' + capName](value);
				}
			};

			addProperty(t.mediaElement, propName, getFn, setFn);
			t.mediaElement['get' + capName] = getFn;
			t.mediaElement['set' + capName] = setFn;
		}
	},
	    getSrc = function getSrc() {
		return t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null ? t.mediaElement.renderer.getSrc() : null;
	},
	    setSrc = function setSrc(value) {
		var mediaFiles = [];

		if (typeof value === 'string') {
			mediaFiles.push({
				src: value,
				type: value ? (0, _media2.getTypeFromFile)(value) : ''
			});
		} else if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src !== undefined) {
			var _src = (0, _media2.absolutizeUrl)(value.src),
			    _type2 = value.type,
			    media = Object.assign(value, {
				src: _src,
				type: (_type2 === '' || _type2 === null || _type2 === undefined) && _src ? (0, _media2.getTypeFromFile)(_src) : _type2
			});
			mediaFiles.push(media);
		} else if (Array.isArray(value)) {
			for (var _i2 = 0, total = value.length; _i2 < total; _i2++) {

				var _src2 = (0, _media2.absolutizeUrl)(value[_i2].src),
				    _type3 = value[_i2].type,
				    _media = Object.assign(value[_i2], {
					src: _src2,
					type: (_type3 === '' || _type3 === null || _type3 === undefined) && _src2 ? (0, _media2.getTypeFromFile)(_src2) : _type3
				});

				mediaFiles.push(_media);
			}
		}

		var renderInfo = _renderer.renderer.select(mediaFiles, t.mediaElement.options.renderers.length ? t.mediaElement.options.renderers : []),
		    event = void 0;

		if (!t.mediaElement.paused && !(t.mediaElement.src == null || t.mediaElement.src === '')) {
			t.mediaElement.pause();
			event = (0, _general.createEvent)('pause', t.mediaElement);
			t.mediaElement.dispatchEvent(event);
		}
		t.mediaElement.originalNode.src = mediaFiles[0].src || '';

		if (renderInfo === null && mediaFiles[0].src) {
			t.mediaElement.generateError('No renderer found', mediaFiles);
			return;
		}

		var shouldChangeRenderer = !(mediaFiles[0].src == null || mediaFiles[0].src === '');
		return shouldChangeRenderer ? t.mediaElement.changeRenderer(renderInfo.rendererName, mediaFiles) : null;
	},
	    triggerAction = function triggerAction(methodName, args) {
		try {
			if (methodName === 'play' && (t.mediaElement.rendererName === 'native_dash' || t.mediaElement.rendererName === 'native_hls' || t.mediaElement.rendererName === 'vimeo_iframe')) {
				var response = t.mediaElement.renderer[methodName](args);
				if (response && typeof response.then === 'function') {
					response.catch(function () {
						if (t.mediaElement.paused) {
							setTimeout(function () {
								var tmpResponse = t.mediaElement.renderer.play();
								if (tmpResponse !== undefined) {
									tmpResponse.catch(function () {
										if (!t.mediaElement.renderer.paused) {
											t.mediaElement.renderer.pause();
										}
									});
								}
							}, 150);
						}
					});
				}
			} else {
				t.mediaElement.renderer[methodName](args);
			}
		} catch (e) {
			t.mediaElement.generateError(e, mediaFiles);
		}
	},
	    assignMethods = function assignMethods(methodName) {
		t.mediaElement[methodName] = function () {
			for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
				args[_key] = arguments[_key];
			}

			if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer[methodName] === 'function') {
				if (t.mediaElement.promises.length) {
					Promise.all(t.mediaElement.promises).then(function () {
						triggerAction(methodName, args);
					}).catch(function (e) {
						t.mediaElement.generateError(e, mediaFiles);
					});
				} else {
					triggerAction(methodName, args);
				}
			}
			return null;
		};
	};

	addProperty(t.mediaElement, 'src', getSrc, setSrc);
	t.mediaElement.getSrc = getSrc;
	t.mediaElement.setSrc = setSrc;

	for (var _i3 = 0, total = props.length; _i3 < total; _i3++) {
		assignGettersSetters(props[_i3]);
	}

	for (var _i4 = 0, _total = methods.length; _i4 < _total; _i4++) {
		assignMethods(methods[_i4]);
	}

	t.mediaElement.addEventListener = function (eventName, callback) {
		t.mediaElement.events[eventName] = t.mediaElement.events[eventName] || [];

		t.mediaElement.events[eventName].push(callback);
	};
	t.mediaElement.removeEventListener = function (eventName, callback) {
		if (!eventName) {
			t.mediaElement.events = {};
			return true;
		}

		var callbacks = t.mediaElement.events[eventName];

		if (!callbacks) {
			return true;
		}

		if (!callback) {
			t.mediaElement.events[eventName] = [];
			return true;
		}

		for (var _i5 = 0; _i5 < callbacks.length; _i5++) {
			if (callbacks[_i5] === callback) {
				t.mediaElement.events[eventName].splice(_i5, 1);
				return true;
			}
		}
		return false;
	};

	t.mediaElement.dispatchEvent = function (event) {
		var callbacks = t.mediaElement.events[event.type];
		if (callbacks) {
			for (var _i6 = 0; _i6 < callbacks.length; _i6++) {
				callbacks[_i6].apply(null, [event]);
			}
		}
	};

	t.mediaElement.destroy = function () {
		var mediaElement = t.mediaElement.originalNode.cloneNode(true);
		var wrapper = t.mediaElement.parentElement;
		mediaElement.removeAttribute('id');
		mediaElement.remove();
		t.mediaElement.remove();
		wrapper.appendChild(mediaElement);
	};

	if (mediaFiles.length) {
		t.mediaElement.src = mediaFiles;
	}

	if (t.mediaElement.promises.length) {
		Promise.all(t.mediaElement.promises).then(function () {
			if (t.mediaElement.options.success) {
				t.mediaElement.options.success(t.mediaElement, t.mediaElement.originalNode);
			}
		}).catch(function () {
			if (error && t.mediaElement.options.error) {
				t.mediaElement.options.error(t.mediaElement, t.mediaElement.originalNode);
			}
		});
	} else {
		if (t.mediaElement.options.success) {
			t.mediaElement.options.success(t.mediaElement, t.mediaElement.originalNode);
		}

		if (error && t.mediaElement.options.error) {
			t.mediaElement.options.error(t.mediaElement, t.mediaElement.originalNode);
		}
	}

	return t.mediaElement;
};

_window2.default.MediaElement = MediaElement;
_mejs2.default.MediaElement = MediaElement;

exports.default = MediaElement;

},{"16":16,"18":18,"19":19,"2":2,"3":3,"7":7,"8":8}],7:[function(_dereq_,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});

var _window = _dereq_(3);

var _window2 = _interopRequireDefault(_window);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var mejs = {};

mejs.version = '4.2.17';

mejs.html5media = {
	properties: ['volume', 'src', 'currentTime', 'muted', 'duration', 'paused', 'ended', 'buffered', 'error', 'networkState', 'readyState', 'seeking', 'seekable', 'currentSrc', 'preload', 'bufferedBytes', 'bufferedTime', 'initialTime', 'startOffsetTime', 'defaultPlaybackRate', 'playbackRate', 'played', 'autoplay', 'loop', 'controls'],
	readOnlyProperties: ['duration', 'paused', 'ended', 'buffered', 'error', 'networkState', 'readyState', 'seeking', 'seekable'],

	methods: ['load', 'play', 'pause', 'canPlayType'],

	events: ['loadstart', 'durationchange', 'loadedmetadata', 'loadeddata', 'progress', 'canplay', 'canplaythrough', 'suspend', 'abort', 'error', 'emptied', 'stalled', 'play', 'playing', 'pause', 'waiting', 'seeking', 'seeked', 'timeupdate', 'ended', 'ratechange', 'volumechange'],

	mediaTypes: ['audio/mp3', 'audio/ogg', 'audio/oga', 'audio/wav', 'audio/x-wav', 'audio/wave', 'audio/x-pn-wav', 'audio/mpeg', 'audio/mp4', 'video/mp4', 'video/webm', 'video/ogg', 'video/ogv']
};

_window2.default.mejs = mejs;

exports.default = mejs;

},{"3":3}],8:[function(_dereq_,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});
exports.renderer = undefined;

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Renderer = function () {
	function Renderer() {
		_classCallCheck(this, Renderer);

		this.renderers = {};
		this.order = [];
	}

	_createClass(Renderer, [{
		key: 'add',
		value: function add(renderer) {
			if (renderer.name === undefined) {
				throw new TypeError('renderer must contain at least `name` property');
			}

			this.renderers[renderer.name] = renderer;
			this.order.push(renderer.name);
		}
	}, {
		key: 'select',
		value: function select(mediaFiles) {
			var renderers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];

			var renderersLength = renderers.length;

			renderers = renderers.length ? renderers : this.order;

			if (!renderersLength) {
				var rendererIndicator = [/^(html5|native)/i, /^flash/i, /iframe$/i],
				    rendererRanking = function rendererRanking(renderer) {
					for (var i = 0, total = rendererIndicator.length; i < total; i++) {
						if (rendererIndicator[i].test(renderer)) {
							return i;
						}
					}
					return rendererIndicator.length;
				};

				renderers.sort(function (a, b) {
					return rendererRanking(a) - rendererRanking(b);
				});
			}

			for (var i = 0, total = renderers.length; i < total; i++) {
				var key = renderers[i],
				    _renderer = this.renderers[key];

				if (_renderer !== null && _renderer !== undefined) {
					for (var j = 0, jl = mediaFiles.length; j < jl; j++) {
						if (typeof _renderer.canPlayType === 'function' && typeof mediaFiles[j].type === 'string' && _renderer.canPlayType(mediaFiles[j].type)) {
							return {
								rendererName: _renderer.name,
								src: mediaFiles[j].src
							};
						}
					}
				}
			}

			return null;
		}
	}, {
		key: 'order',
		set: function set(order) {
			if (!Array.isArray(order)) {
				throw new TypeError('order must be an array of strings.');
			}

			this._order = order;
		},
		get: function get() {
			return this._order;
		}
	}, {
		key: 'renderers',
		set: function set(renderers) {
			if (renderers !== null && (typeof renderers === 'undefined' ? 'undefined' : _typeof(renderers)) !== 'object') {
				throw new TypeError('renderers must be an array of objects.');
			}

			this._renderers = renderers;
		},
		get: function get() {
			return this._renderers;
		}
	}]);

	return Renderer;
}();

var renderer = exports.renderer = new Renderer();

_mejs2.default.Renderers = renderer;

},{"7":7}],9:[function(_dereq_,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});
var EN = exports.EN = {
	'mejs.plural-form': 1,

	'mejs.download-file': 'Download File',

	'mejs.install-flash': 'You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/',

	'mejs.fullscreen': 'Fullscreen',

	'mejs.play': 'Play',
	'mejs.pause': 'Pause',

	'mejs.time-slider': 'Time Slider',
	'mejs.time-help-text': 'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.',
	'mejs.live-broadcast': 'Live Broadcast',

	'mejs.volume-help-text': 'Use Up/Down Arrow keys to increase or decrease volume.',
	'mejs.unmute': 'Unmute',
	'mejs.mute': 'Mute',
	'mejs.volume-slider': 'Volume Slider',

	'mejs.video-player': 'Video Player',
	'mejs.audio-player': 'Audio Player',

	'mejs.captions-subtitles': 'Captions/Subtitles',
	'mejs.captions-chapters': 'Chapters',
	'mejs.none': 'None',
	'mejs.afrikaans': 'Afrikaans',
	'mejs.albanian': 'Albanian',
	'mejs.arabic': 'Arabic',
	'mejs.belarusian': 'Belarusian',
	'mejs.bulgarian': 'Bulgarian',
	'mejs.catalan': 'Catalan',
	'mejs.chinese': 'Chinese',
	'mejs.chinese-simplified': 'Chinese (Simplified)',
	'mejs.chinese-traditional': 'Chinese (Traditional)',
	'mejs.croatian': 'Croatian',
	'mejs.czech': 'Czech',
	'mejs.danish': 'Danish',
	'mejs.dutch': 'Dutch',
	'mejs.english': 'English',
	'mejs.estonian': 'Estonian',
	'mejs.filipino': 'Filipino',
	'mejs.finnish': 'Finnish',
	'mejs.french': 'French',
	'mejs.galician': 'Galician',
	'mejs.german': 'German',
	'mejs.greek': 'Greek',
	'mejs.haitian-creole': 'Haitian Creole',
	'mejs.hebrew': 'Hebrew',
	'mejs.hindi': 'Hindi',
	'mejs.hungarian': 'Hungarian',
	'mejs.icelandic': 'Icelandic',
	'mejs.indonesian': 'Indonesian',
	'mejs.irish': 'Irish',
	'mejs.italian': 'Italian',
	'mejs.japanese': 'Japanese',
	'mejs.korean': 'Korean',
	'mejs.latvian': 'Latvian',
	'mejs.lithuanian': 'Lithuanian',
	'mejs.macedonian': 'Macedonian',
	'mejs.malay': 'Malay',
	'mejs.maltese': 'Maltese',
	'mejs.norwegian': 'Norwegian',
	'mejs.persian': 'Persian',
	'mejs.polish': 'Polish',
	'mejs.portuguese': 'Portuguese',
	'mejs.romanian': 'Romanian',
	'mejs.russian': 'Russian',
	'mejs.serbian': 'Serbian',
	'mejs.slovak': 'Slovak',
	'mejs.slovenian': 'Slovenian',
	'mejs.spanish': 'Spanish',
	'mejs.swahili': 'Swahili',
	'mejs.swedish': 'Swedish',
	'mejs.tagalog': 'Tagalog',
	'mejs.thai': 'Thai',
	'mejs.turkish': 'Turkish',
	'mejs.ukrainian': 'Ukrainian',
	'mejs.vietnamese': 'Vietnamese',
	'mejs.welsh': 'Welsh',
	'mejs.yiddish': 'Yiddish'
};

},{}],10:[function(_dereq_,module,exports){
'use strict';

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _window = _dereq_(3);

var _window2 = _interopRequireDefault(_window);

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

var _renderer = _dereq_(8);

var _general = _dereq_(18);

var _media = _dereq_(19);

var _constants = _dereq_(16);

var _dom = _dereq_(17);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var NativeDash = {

	promise: null,

	load: function load(settings) {
		if (typeof dashjs !== 'undefined') {
			NativeDash.promise = new Promise(function (resolve) {
				resolve();
			}).then(function () {
				NativeDash._createPlayer(settings);
			});
		} else {
			settings.options.path = typeof settings.options.path === 'string' ? settings.options.path : 'https://cdn.dashjs.org/latest/dash.all.min.js';

			NativeDash.promise = NativeDash.promise || (0, _dom.loadScript)(settings.options.path);
			NativeDash.promise.then(function () {
				NativeDash._createPlayer(settings);
			});
		}

		return NativeDash.promise;
	},

	_createPlayer: function _createPlayer(settings) {
		var player = dashjs.MediaPlayer().create();
		_window2.default['__ready__' + settings.id](player);
		return player;
	}
};

var DashNativeRenderer = {
	name: 'native_dash',
	options: {
		prefix: 'native_dash',
		dash: {
			path: 'https://cdn.dashjs.org/latest/dash.all.min.js',
			debug: false,
			drm: {},

			robustnessLevel: ''
		}
	},

	canPlayType: function canPlayType(type) {
		return _constants.HAS_MSE && ['application/dash+xml'].indexOf(type.toLowerCase()) > -1;
	},

	create: function create(mediaElement, options, mediaFiles) {

		var originalNode = mediaElement.originalNode,
		    id = mediaElement.id + '_' + options.prefix,
		    autoplay = originalNode.autoplay,
		    children = originalNode.children;

		var node = null,
		    dashPlayer = null;

		originalNode.removeAttribute('type');
		for (var i = 0, total = children.length; i < total; i++) {
			children[i].removeAttribute('type');
		}

		node = originalNode.cloneNode(true);
		options = Object.assign(options, mediaElement.options);

		var props = _mejs2.default.html5media.properties,
		    events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {
			return e !== 'error';
		}),
		    attachNativeEvents = function attachNativeEvents(e) {
			var event = (0, _general.createEvent)(e.type, mediaElement);
			mediaElement.dispatchEvent(event);
		},
		    assignGettersSetters = function assignGettersSetters(propName) {
			var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);

			node['get' + capName] = function () {
				return dashPlayer !== null ? node[propName] : null;
			};

			node['set' + capName] = function (value) {
				if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {
					if (propName === 'src') {
						var source = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src ? value.src : value;
						node[propName] = source;
						if (dashPlayer !== null) {
							dashPlayer.reset();
							for (var _i = 0, _total = events.length; _i < _total; _i++) {
								node.removeEventListener(events[_i], attachNativeEvents);
							}
							dashPlayer = NativeDash._createPlayer({
								options: options.dash,
								id: id
							});

							if (value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && _typeof(value.drm) === 'object') {
								dashPlayer.setProtectionData(value.drm);
								if ((0, _general.isString)(options.dash.robustnessLevel) && options.dash.robustnessLevel) {
									dashPlayer.getProtectionController().setRobustnessLevel(options.dash.robustnessLevel);
								}
							}
							dashPlayer.attachSource(source);
							if (autoplay) {
								dashPlayer.play();
							}
						}
					} else {
						node[propName] = value;
					}
				}
			};
		};

		for (var _i2 = 0, _total2 = props.length; _i2 < _total2; _i2++) {
			assignGettersSetters(props[_i2]);
		}

		_window2.default['__ready__' + id] = function (_dashPlayer) {
			mediaElement.dashPlayer = dashPlayer = _dashPlayer;

			var dashEvents = dashjs.MediaPlayer.events,
			    assignEvents = function assignEvents(eventName) {
				if (eventName === 'loadedmetadata') {
					dashPlayer.initialize();
					dashPlayer.attachView(node);
					dashPlayer.setAutoPlay(false);

					if (_typeof(options.dash.drm) === 'object' && !_mejs2.default.Utils.isObjectEmpty(options.dash.drm)) {
						dashPlayer.setProtectionData(options.dash.drm);
						if ((0, _general.isString)(options.dash.robustnessLevel) && options.dash.robustnessLevel) {
							dashPlayer.getProtectionController().setRobustnessLevel(options.dash.robustnessLevel);
						}
					}
					dashPlayer.attachSource(node.getSrc());
				}

				node.addEventListener(eventName, attachNativeEvents);
			};

			for (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) {
				assignEvents(events[_i3]);
			}

			var assignMdashEvents = function assignMdashEvents(e) {
				if (e.type.toLowerCase() === 'error') {
					mediaElement.generateError(e.message, node.src);
					console.error(e);
				} else {
					var _event = (0, _general.createEvent)(e.type, mediaElement);
					_event.data = e;
					mediaElement.dispatchEvent(_event);
				}
			};

			for (var eventType in dashEvents) {
				if (dashEvents.hasOwnProperty(eventType)) {
					dashPlayer.on(dashEvents[eventType], function (e) {
						return assignMdashEvents(e);
					});
				}
			}
		};

		if (mediaFiles && mediaFiles.length > 0) {
			for (var _i4 = 0, _total4 = mediaFiles.length; _i4 < _total4; _i4++) {
				if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i4].type)) {
					node.setAttribute('src', mediaFiles[_i4].src);
					if (typeof mediaFiles[_i4].drm !== 'undefined') {
						options.dash.drm = mediaFiles[_i4].drm;
					}
					break;
				}
			}
		}

		node.setAttribute('id', id);

		originalNode.parentNode.insertBefore(node, originalNode);
		originalNode.autoplay = false;
		originalNode.style.display = 'none';

		node.setSize = function (width, height) {
			node.style.width = width + 'px';
			node.style.height = height + 'px';
			return node;
		};

		node.hide = function () {
			node.pause();
			node.style.display = 'none';
			return node;
		};

		node.show = function () {
			node.style.display = '';
			return node;
		};

		node.destroy = function () {
			if (dashPlayer !== null) {
				dashPlayer.reset();
			}
		};

		var event = (0, _general.createEvent)('rendererready', node);
		mediaElement.dispatchEvent(event);

		mediaElement.promises.push(NativeDash.load({
			options: options.dash,
			id: id
		}));

		return node;
	}
};

_media.typeChecks.push(function (url) {
	return ~url.toLowerCase().indexOf('.mpd') ? 'application/dash+xml' : null;
});

_renderer.renderer.add(DashNativeRenderer);

},{"16":16,"17":17,"18":18,"19":19,"3":3,"7":7,"8":8}],11:[function(_dereq_,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});
exports.PluginDetector = undefined;

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _window = _dereq_(3);

var _window2 = _interopRequireDefault(_window);

var _document = _dereq_(2);

var _document2 = _interopRequireDefault(_document);

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

var _i18n = _dereq_(5);

var _i18n2 = _interopRequireDefault(_i18n);

var _renderer = _dereq_(8);

var _general = _dereq_(18);

var _constants = _dereq_(16);

var _media = _dereq_(19);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var PluginDetector = exports.PluginDetector = {
	plugins: [],

	hasPluginVersion: function hasPluginVersion(plugin, v) {
		var pv = PluginDetector.plugins[plugin];
		v[1] = v[1] || 0;
		v[2] = v[2] || 0;
		return pv[0] > v[0] || pv[0] === v[0] && pv[1] > v[1] || pv[0] === v[0] && pv[1] === v[1] && pv[2] >= v[2];
	},

	addPlugin: function addPlugin(p, pluginName, mimeType, activeX, axDetect) {
		PluginDetector.plugins[p] = PluginDetector.detectPlugin(pluginName, mimeType, activeX, axDetect);
	},

	detectPlugin: function detectPlugin(pluginName, mimeType, activeX, axDetect) {

		var version = [0, 0, 0],
		    description = void 0,
		    ax = void 0;

		if (_constants.NAV.plugins !== null && _constants.NAV.plugins !== undefined && _typeof(_constants.NAV.plugins[pluginName]) === 'object') {
			description = _constants.NAV.plugins[pluginName].description;
			if (description && !(typeof _constants.NAV.mimeTypes !== 'undefined' && _constants.NAV.mimeTypes[mimeType] && !_constants.NAV.mimeTypes[mimeType].enabledPlugin)) {
				version = description.replace(pluginName, '').replace(/^\s+/, '').replace(/\sr/gi, '.').split('.');
				for (var i = 0, total = version.length; i < total; i++) {
					version[i] = parseInt(version[i].match(/\d+/), 10);
				}
			}
		} else if (_window2.default.ActiveXObject !== undefined) {
			try {
				ax = new ActiveXObject(activeX);
				if (ax) {
					version = axDetect(ax);
				}
			} catch (e) {
				
			}
		}
		return version;
	}
};

PluginDetector.addPlugin('flash', 'Shockwave Flash', 'application/x-shockwave-flash', 'ShockwaveFlash.ShockwaveFlash', function (ax) {
	var version = [],
	    d = ax.GetVariable("$version");

	if (d) {
		d = d.split(" ")[1].split(",");
		version = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
	}
	return version;
});

var FlashMediaElementRenderer = {
	create: function create(mediaElement, options, mediaFiles) {

		var flash = {};
		var isActive = false;

		flash.options = options;
		flash.id = mediaElement.id + '_' + flash.options.prefix;
		flash.mediaElement = mediaElement;
		flash.flashState = {};
		flash.flashApi = null;
		flash.flashApiStack = [];

		var props = _mejs2.default.html5media.properties,
		    assignGettersSetters = function assignGettersSetters(propName) {
			flash.flashState[propName] = null;

			var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);

			flash['get' + capName] = function () {
				if (flash.flashApi !== null) {
					if (typeof flash.flashApi['get_' + propName] === 'function') {
						var value = flash.flashApi['get_' + propName]();

						if (propName === 'buffered') {
							return {
								start: function start() {
									return 0;
								},
								end: function end() {
									return value;
								},
								length: 1
							};
						}
						return value;
					} else {
						return null;
					}
				} else {
					return null;
				}
			};

			flash['set' + capName] = function (value) {
				if (propName === 'src') {
					value = (0, _media.absolutizeUrl)(value);
				}

				if (flash.flashApi !== null && flash.flashApi['set_' + propName] !== undefined) {
					try {
						flash.flashApi['set_' + propName](value);
					} catch (e) {
						
					}
				} else {
					flash.flashApiStack.push({
						type: 'set',
						propName: propName,
						value: value
					});
				}
			};
		};

		for (var i = 0, total = props.length; i < total; i++) {
			assignGettersSetters(props[i]);
		}

		var methods = _mejs2.default.html5media.methods,
		    assignMethods = function assignMethods(methodName) {
			flash[methodName] = function () {
				if (isActive) {
					if (flash.flashApi !== null) {
						if (flash.flashApi['fire_' + methodName]) {
							try {
								flash.flashApi['fire_' + methodName]();
							} catch (e) {
								
							}
						} else {
							
						}
					} else {
						flash.flashApiStack.push({
							type: 'call',
							methodName: methodName
						});
					}
				}
			};
		};
		methods.push('stop');
		for (var _i = 0, _total = methods.length; _i < _total; _i++) {
			assignMethods(methods[_i]);
		}

		var initEvents = ['rendererready'];

		for (var _i2 = 0, _total2 = initEvents.length; _i2 < _total2; _i2++) {
			var event = (0, _general.createEvent)(initEvents[_i2], flash);
			mediaElement.dispatchEvent(event);
		}

		_window2.default['__ready__' + flash.id] = function () {

			flash.flashReady = true;
			flash.flashApi = _document2.default.getElementById('__' + flash.id);

			if (flash.flashApiStack.length) {
				for (var _i3 = 0, _total3 = flash.flashApiStack.length; _i3 < _total3; _i3++) {
					var stackItem = flash.flashApiStack[_i3];

					if (stackItem.type === 'set') {
						var propName = stackItem.propName,
						    capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);

						flash['set' + capName](stackItem.value);
					} else if (stackItem.type === 'call') {
						flash[stackItem.methodName]();
					}
				}
			}
		};

		_window2.default['__event__' + flash.id] = function (eventName, message) {
			var event = (0, _general.createEvent)(eventName, flash);
			if (message) {
				try {
					event.data = JSON.parse(message);
					event.details.data = JSON.parse(message);
				} catch (e) {
					event.message = message;
				}
			}

			flash.mediaElement.dispatchEvent(event);
		};

		flash.flashWrapper = _document2.default.createElement('div');

		if (['always', 'sameDomain'].indexOf(flash.options.shimScriptAccess) === -1) {
			flash.options.shimScriptAccess = 'sameDomain';
		}

		var autoplay = mediaElement.originalNode.autoplay,
		    flashVars = ['uid=' + flash.id, 'autoplay=' + autoplay, 'allowScriptAccess=' + flash.options.shimScriptAccess, 'preload=' + (mediaElement.originalNode.getAttribute('preload') || '')],
		    isVideo = mediaElement.originalNode !== null && mediaElement.originalNode.tagName.toLowerCase() === 'video',
		    flashHeight = isVideo ? mediaElement.originalNode.height : 1,
		    flashWidth = isVideo ? mediaElement.originalNode.width : 1;

		if (mediaElement.originalNode.getAttribute('src')) {
			flashVars.push('src=' + mediaElement.originalNode.getAttribute('src'));
		}

		if (flash.options.enablePseudoStreaming === true) {
			flashVars.push('pseudostreamstart=' + flash.options.pseudoStreamingStartQueryParam);
			flashVars.push('pseudostreamtype=' + flash.options.pseudoStreamingType);
		}

		if (flash.options.streamDelimiter) {
			flashVars.push('streamdelimiter=' + encodeURIComponent(flash.options.streamDelimiter));
		}

		if (flash.options.proxyType) {
			flashVars.push('proxytype=' + flash.options.proxyType);
		}

		mediaElement.appendChild(flash.flashWrapper);
		mediaElement.originalNode.style.display = 'none';

		var settings = [];

		if (_constants.IS_IE || _constants.IS_EDGE) {
			var specialIEContainer = _document2.default.createElement('div');
			flash.flashWrapper.appendChild(specialIEContainer);

			if (_constants.IS_EDGE) {
				settings = ['type="application/x-shockwave-flash"', 'data="' + flash.options.pluginPath + flash.options.filename + '"', 'id="__' + flash.id + '"', 'width="' + flashWidth + '"', 'height="' + flashHeight + '\'"'];
			} else {
				settings = ['classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"', 'codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"', 'id="__' + flash.id + '"', 'width="' + flashWidth + '"', 'height="' + flashHeight + '"'];
			}

			if (!isVideo) {
				settings.push('style="clip: rect(0 0 0 0); position: absolute;"');
			}

			specialIEContainer.outerHTML = '<object ' + settings.join(' ') + '>' + ('<param name="movie" value="' + flash.options.pluginPath + flash.options.filename + '?x=' + new Date() + '" />') + ('<param name="flashvars" value="' + flashVars.join('&amp;') + '" />') + '<param name="quality" value="high" />' + '<param name="bgcolor" value="#000000" />' + '<param name="wmode" value="transparent" />' + ('<param name="allowScriptAccess" value="' + flash.options.shimScriptAccess + '" />') + '<param name="allowFullScreen" value="true" />' + ('<div>' + _i18n2.default.t('mejs.install-flash') + '</div>') + '</object>';
		} else {

			settings = ['id="__' + flash.id + '"', 'name="__' + flash.id + '"', 'play="true"', 'loop="false"', 'quality="high"', 'bgcolor="#000000"', 'wmode="transparent"', 'allowScriptAccess="' + flash.options.shimScriptAccess + '"', 'allowFullScreen="true"', 'type="application/x-shockwave-flash"', 'pluginspage="//www.macromedia.com/go/getflashplayer"', 'src="' + flash.options.pluginPath + flash.options.filename + '"', 'flashvars="' + flashVars.join('&') + '"'];

			if (isVideo) {
				settings.push('width="' + flashWidth + '"');
				settings.push('height="' + flashHeight + '"');
			} else {
				settings.push('style="position: fixed; left: -9999em; top: -9999em;"');
			}

			flash.flashWrapper.innerHTML = '<embed ' + settings.join(' ') + '>';
		}

		flash.flashNode = flash.flashWrapper.lastChild;

		flash.hide = function () {
			isActive = false;
			if (isVideo) {
				flash.flashNode.style.display = 'none';
			}
		};
		flash.show = function () {
			isActive = true;
			if (isVideo) {
				flash.flashNode.style.display = '';
			}
		};
		flash.setSize = function (width, height) {
			flash.flashNode.style.width = width + 'px';
			flash.flashNode.style.height = height + 'px';

			if (flash.flashApi !== null && typeof flash.flashApi.fire_setSize === 'function') {
				flash.flashApi.fire_setSize(width, height);
			}
		};

		flash.destroy = function () {
			flash.flashNode.remove();
		};

		if (mediaFiles && mediaFiles.length > 0) {
			for (var _i4 = 0, _total4 = mediaFiles.length; _i4 < _total4; _i4++) {
				if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i4].type)) {
					flash.setSrc(mediaFiles[_i4].src);
					break;
				}
			}
		}

		return flash;
	}
};

var hasFlash = PluginDetector.hasPluginVersion('flash', [10, 0, 0]);

if (hasFlash) {
	_media.typeChecks.push(function (url) {
		url = url.toLowerCase();

		if (url.startsWith('rtmp')) {
			if (~url.indexOf('.mp3')) {
				return 'audio/rtmp';
			} else {
				return 'video/rtmp';
			}
		} else if (/\.og(a|g)/i.test(url)) {
			return 'audio/ogg';
		} else if (~url.indexOf('.m3u8')) {
			return 'application/x-mpegURL';
		} else if (~url.indexOf('.mpd')) {
			return 'application/dash+xml';
		} else if (~url.indexOf('.flv')) {
			return 'video/flv';
		} else {
			return null;
		}
	});

	var FlashMediaElementVideoRenderer = {
		name: 'flash_video',
		options: {
			prefix: 'flash_video',
			filename: 'mediaelement-flash-video.swf',
			enablePseudoStreaming: false,

			pseudoStreamingStartQueryParam: 'start',

			pseudoStreamingType: 'byte',

			proxyType: '',

			streamDelimiter: ''
		},

		canPlayType: function canPlayType(type) {
			return ~['video/mp4', 'video/rtmp', 'audio/rtmp', 'rtmp/mp4', 'audio/mp4', 'video/flv', 'video/x-flv'].indexOf(type.toLowerCase());
		},

		create: FlashMediaElementRenderer.create

	};
	_renderer.renderer.add(FlashMediaElementVideoRenderer);

	var FlashMediaElementHlsVideoRenderer = {
		name: 'flash_hls',
		options: {
			prefix: 'flash_hls',
			filename: 'mediaelement-flash-video-hls.swf'
		},

		canPlayType: function canPlayType(type) {
			return ~['application/x-mpegurl', 'application/vnd.apple.mpegurl', 'audio/mpegurl', 'audio/hls', 'video/hls'].indexOf(type.toLowerCase());
		},

		create: FlashMediaElementRenderer.create
	};
	_renderer.renderer.add(FlashMediaElementHlsVideoRenderer);

	var FlashMediaElementMdashVideoRenderer = {
		name: 'flash_dash',
		options: {
			prefix: 'flash_dash',
			filename: 'mediaelement-flash-video-mdash.swf'
		},

		canPlayType: function canPlayType(type) {
			return ~['application/dash+xml'].indexOf(type.toLowerCase());
		},

		create: FlashMediaElementRenderer.create
	};
	_renderer.renderer.add(FlashMediaElementMdashVideoRenderer);

	var FlashMediaElementAudioRenderer = {
		name: 'flash_audio',
		options: {
			prefix: 'flash_audio',
			filename: 'mediaelement-flash-audio.swf'
		},

		canPlayType: function canPlayType(type) {
			return ~['audio/mp3'].indexOf(type.toLowerCase());
		},

		create: FlashMediaElementRenderer.create
	};
	_renderer.renderer.add(FlashMediaElementAudioRenderer);

	var FlashMediaElementAudioOggRenderer = {
		name: 'flash_audio_ogg',
		options: {
			prefix: 'flash_audio_ogg',
			filename: 'mediaelement-flash-audio-ogg.swf'
		},

		canPlayType: function canPlayType(type) {
			return ~['audio/ogg', 'audio/oga', 'audio/ogv'].indexOf(type.toLowerCase());
		},

		create: FlashMediaElementRenderer.create
	};
	_renderer.renderer.add(FlashMediaElementAudioOggRenderer);
}

},{"16":16,"18":18,"19":19,"2":2,"3":3,"5":5,"7":7,"8":8}],12:[function(_dereq_,module,exports){
'use strict';

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _window = _dereq_(3);

var _window2 = _interopRequireDefault(_window);

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

var _renderer = _dereq_(8);

var _general = _dereq_(18);

var _constants = _dereq_(16);

var _media = _dereq_(19);

var _dom = _dereq_(17);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var NativeFlv = {

	promise: null,

	load: function load(settings) {
		if (typeof flvjs !== 'undefined') {
			NativeFlv.promise = new Promise(function (resolve) {
				resolve();
			}).then(function () {
				NativeFlv._createPlayer(settings);
			});
		} else {
			settings.options.path = typeof settings.options.path === 'string' ? settings.options.path : 'https://cdn.jsdelivr.net/npm/flv.js@latest';

			NativeFlv.promise = NativeFlv.promise || (0, _dom.loadScript)(settings.options.path);
			NativeFlv.promise.then(function () {
				NativeFlv._createPlayer(settings);
			});
		}

		return NativeFlv.promise;
	},

	_createPlayer: function _createPlayer(settings) {
		flvjs.LoggingControl.enableDebug = settings.options.debug;
		flvjs.LoggingControl.enableVerbose = settings.options.debug;
		var player = flvjs.createPlayer(settings.options, settings.configs);
		_window2.default['__ready__' + settings.id](player);
		return player;
	}
};

var FlvNativeRenderer = {
	name: 'native_flv',
	options: {
		prefix: 'native_flv',
		flv: {
			path: 'https://cdn.jsdelivr.net/npm/flv.js@latest',

			cors: true,
			debug: false
		}
	},

	canPlayType: function canPlayType(type) {
		return _constants.HAS_MSE && ['video/x-flv', 'video/flv'].indexOf(type.toLowerCase()) > -1;
	},

	create: function create(mediaElement, options, mediaFiles) {

		var originalNode = mediaElement.originalNode,
		    id = mediaElement.id + '_' + options.prefix;

		var node = null,
		    flvPlayer = null;

		node = originalNode.cloneNode(true);
		options = Object.assign(options, mediaElement.options);

		var props = _mejs2.default.html5media.properties,
		    events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {
			return e !== 'error';
		}),
		    attachNativeEvents = function attachNativeEvents(e) {
			var event = (0, _general.createEvent)(e.type, mediaElement);
			mediaElement.dispatchEvent(event);
		},
		    assignGettersSetters = function assignGettersSetters(propName) {
			var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);

			node['get' + capName] = function () {
				return flvPlayer !== null ? node[propName] : null;
			};

			node['set' + capName] = function (value) {
				if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {
					if (propName === 'src') {
						node[propName] = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src ? value.src : value;
						if (flvPlayer !== null) {
							var _flvOptions = {};
							_flvOptions.type = 'flv';
							_flvOptions.url = value;
							_flvOptions.cors = options.flv.cors;
							_flvOptions.debug = options.flv.debug;
							_flvOptions.path = options.flv.path;
							var _flvConfigs = options.flv.configs;

							flvPlayer.destroy();
							for (var i = 0, total = events.length; i < total; i++) {
								node.removeEventListener(events[i], attachNativeEvents);
							}
							flvPlayer = NativeFlv._createPlayer({
								options: _flvOptions,
								configs: _flvConfigs,
								id: id
							});
							flvPlayer.attachMediaElement(node);
							flvPlayer.load();
						}
					} else {
						node[propName] = value;
					}
				}
			};
		};

		for (var i = 0, total = props.length; i < total; i++) {
			assignGettersSetters(props[i]);
		}

		_window2.default['__ready__' + id] = function (_flvPlayer) {
			mediaElement.flvPlayer = flvPlayer = _flvPlayer;

			var flvEvents = flvjs.Events,
			    assignEvents = function assignEvents(eventName) {
				if (eventName === 'loadedmetadata') {
					flvPlayer.unload();
					flvPlayer.detachMediaElement();
					flvPlayer.attachMediaElement(node);
					flvPlayer.load();
				}

				node.addEventListener(eventName, attachNativeEvents);
			};

			for (var _i = 0, _total = events.length; _i < _total; _i++) {
				assignEvents(events[_i]);
			}

			var assignFlvEvents = function assignFlvEvents(name, data) {
				if (name === 'error') {
					var message = data[0] + ': ' + data[1] + ' ' + data[2].msg;
					mediaElement.generateError(message, node.src);
				} else {
					var _event = (0, _general.createEvent)(name, mediaElement);
					_event.data = data;
					mediaElement.dispatchEvent(_event);
				}
			};

			var _loop = function _loop(eventType) {
				if (flvEvents.hasOwnProperty(eventType)) {
					flvPlayer.on(flvEvents[eventType], function () {
						for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
							args[_key] = arguments[_key];
						}

						return assignFlvEvents(flvEvents[eventType], args);
					});
				}
			};

			for (var eventType in flvEvents) {
				_loop(eventType);
			}
		};

		if (mediaFiles && mediaFiles.length > 0) {
			for (var _i2 = 0, _total2 = mediaFiles.length; _i2 < _total2; _i2++) {
				if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i2].type)) {
					node.setAttribute('src', mediaFiles[_i2].src);
					break;
				}
			}
		}

		node.setAttribute('id', id);

		originalNode.parentNode.insertBefore(node, originalNode);
		originalNode.autoplay = false;
		originalNode.style.display = 'none';

		var flvOptions = {};
		flvOptions.type = 'flv';
		flvOptions.url = node.src;
		flvOptions.cors = options.flv.cors;
		flvOptions.debug = options.flv.debug;
		flvOptions.path = options.flv.path;
		var flvConfigs = options.flv.configs;

		node.setSize = function (width, height) {
			node.style.width = width + 'px';
			node.style.height = height + 'px';
			return node;
		};

		node.hide = function () {
			if (flvPlayer !== null) {
				flvPlayer.pause();
			}
			node.style.display = 'none';
			return node;
		};

		node.show = function () {
			node.style.display = '';
			return node;
		};

		node.destroy = function () {
			if (flvPlayer !== null) {
				flvPlayer.destroy();
			}
		};

		var event = (0, _general.createEvent)('rendererready', node);
		mediaElement.dispatchEvent(event);

		mediaElement.promises.push(NativeFlv.load({
			options: flvOptions,
			configs: flvConfigs,
			id: id
		}));

		return node;
	}
};

_media.typeChecks.push(function (url) {
	return ~url.toLowerCase().indexOf('.flv') ? 'video/flv' : null;
});

_renderer.renderer.add(FlvNativeRenderer);

},{"16":16,"17":17,"18":18,"19":19,"3":3,"7":7,"8":8}],13:[function(_dereq_,module,exports){
'use strict';

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _window = _dereq_(3);

var _window2 = _interopRequireDefault(_window);

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

var _renderer = _dereq_(8);

var _general = _dereq_(18);

var _constants = _dereq_(16);

var _media = _dereq_(19);

var _dom = _dereq_(17);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var NativeHls = {

	promise: null,

	load: function load(settings) {
		if (typeof Hls !== 'undefined') {
			NativeHls.promise = new Promise(function (resolve) {
				resolve();
			}).then(function () {
				NativeHls._createPlayer(settings);
			});
		} else {
			settings.options.path = typeof settings.options.path === 'string' ? settings.options.path : 'https://cdn.jsdelivr.net/npm/hls.js@latest';

			NativeHls.promise = NativeHls.promise || (0, _dom.loadScript)(settings.options.path);
			NativeHls.promise.then(function () {
				NativeHls._createPlayer(settings);
			});
		}

		return NativeHls.promise;
	},

	_createPlayer: function _createPlayer(settings) {
		var player = new Hls(settings.options);
		_window2.default['__ready__' + settings.id](player);
		return player;
	}
};

var HlsNativeRenderer = {
	name: 'native_hls',
	options: {
		prefix: 'native_hls',
		hls: {
			path: 'https://cdn.jsdelivr.net/npm/hls.js@latest',

			autoStartLoad: false,
			debug: false
		}
	},

	canPlayType: function canPlayType(type) {
		return _constants.HAS_MSE && ['application/x-mpegurl', 'application/vnd.apple.mpegurl', 'audio/mpegurl', 'audio/hls', 'video/hls'].indexOf(type.toLowerCase()) > -1;
	},

	create: function create(mediaElement, options, mediaFiles) {

		var originalNode = mediaElement.originalNode,
		    id = mediaElement.id + '_' + options.prefix,
		    preload = originalNode.getAttribute('preload'),
		    autoplay = originalNode.autoplay;

		var hlsPlayer = null,
		    node = null,
		    index = 0,
		    total = mediaFiles.length;

		node = originalNode.cloneNode(true);
		options = Object.assign(options, mediaElement.options);
		options.hls.autoStartLoad = preload && preload !== 'none' || autoplay;

		var props = _mejs2.default.html5media.properties,
		    events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {
			return e !== 'error';
		}),
		    attachNativeEvents = function attachNativeEvents(e) {
			var event = (0, _general.createEvent)(e.type, mediaElement);
			mediaElement.dispatchEvent(event);
		},
		    assignGettersSetters = function assignGettersSetters(propName) {
			var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);

			node['get' + capName] = function () {
				return hlsPlayer !== null ? node[propName] : null;
			};

			node['set' + capName] = function (value) {
				if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {
					if (propName === 'src') {
						node[propName] = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src ? value.src : value;
						if (hlsPlayer !== null) {
							hlsPlayer.destroy();
							for (var i = 0, _total = events.length; i < _total; i++) {
								node.removeEventListener(events[i], attachNativeEvents);
							}
							hlsPlayer = NativeHls._createPlayer({
								options: options.hls,
								id: id
							});
							hlsPlayer.loadSource(value);
							hlsPlayer.attachMedia(node);
						}
					} else {
						node[propName] = value;
					}
				}
			};
		};

		for (var i = 0, _total2 = props.length; i < _total2; i++) {
			assignGettersSetters(props[i]);
		}

		_window2.default['__ready__' + id] = function (_hlsPlayer) {
			mediaElement.hlsPlayer = hlsPlayer = _hlsPlayer;
			var hlsEvents = Hls.Events,
			    assignEvents = function assignEvents(eventName) {
				if (eventName === 'loadedmetadata') {
					var url = mediaElement.originalNode.src;
					hlsPlayer.detachMedia();
					hlsPlayer.loadSource(url);
					hlsPlayer.attachMedia(node);
				}

				node.addEventListener(eventName, attachNativeEvents);
			};

			for (var _i = 0, _total3 = events.length; _i < _total3; _i++) {
				assignEvents(events[_i]);
			}

			var recoverDecodingErrorDate = void 0,
			    recoverSwapAudioCodecDate = void 0;
			var assignHlsEvents = function assignHlsEvents(name, data) {
				if (name === 'hlsError') {
					console.warn(data);
					data = data[1];

					if (data.fatal) {
						switch (data.type) {
							case 'mediaError':
								var now = new Date().getTime();
								if (!recoverDecodingErrorDate || now - recoverDecodingErrorDate > 3000) {
									recoverDecodingErrorDate = new Date().getTime();
									hlsPlayer.recoverMediaError();
								} else if (!recoverSwapAudioCodecDate || now - recoverSwapAudioCodecDate > 3000) {
									recoverSwapAudioCodecDate = new Date().getTime();
									console.warn('Attempting to swap Audio Codec and recover from media error');
									hlsPlayer.swapAudioCodec();
									hlsPlayer.recoverMediaError();
								} else {
									var message = 'Cannot recover, last media error recovery failed';
									mediaElement.generateError(message, node.src);
									console.error(message);
								}
								break;
							case 'networkError':
								if (data.details === 'manifestLoadError') {
									if (index < total && mediaFiles[index + 1] !== undefined) {
										node.setSrc(mediaFiles[index++].src);
										node.load();
										node.play();
									} else {
										var _message = 'Network error';
										mediaElement.generateError(_message, mediaFiles);
										console.error(_message);
									}
								} else {
									var _message2 = 'Network error';
									mediaElement.generateError(_message2, mediaFiles);
									console.error(_message2);
								}
								break;
							default:
								hlsPlayer.destroy();
								break;
						}
						return;
					}
				}
				var event = (0, _general.createEvent)(name, mediaElement);
				event.data = data;
				mediaElement.dispatchEvent(event);
			};

			var _loop = function _loop(eventType) {
				if (hlsEvents.hasOwnProperty(eventType)) {
					hlsPlayer.on(hlsEvents[eventType], function () {
						for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
							args[_key] = arguments[_key];
						}

						return assignHlsEvents(hlsEvents[eventType], args);
					});
				}
			};

			for (var eventType in hlsEvents) {
				_loop(eventType);
			}
		};

		if (total > 0) {
			for (; index < total; index++) {
				if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[index].type)) {
					node.setAttribute('src', mediaFiles[index].src);
					break;
				}
			}
		}

		if (preload !== 'auto' && !autoplay) {
			node.addEventListener('play', function () {
				if (hlsPlayer !== null) {
					hlsPlayer.startLoad();
				}
			});

			node.addEventListener('pause', function () {
				if (hlsPlayer !== null) {
					hlsPlayer.stopLoad();
				}
			});
		}

		node.setAttribute('id', id);

		originalNode.parentNode.insertBefore(node, originalNode);
		originalNode.autoplay = false;
		originalNode.style.display = 'none';

		node.setSize = function (width, height) {
			node.style.width = width + 'px';
			node.style.height = height + 'px';
			return node;
		};

		node.hide = function () {
			node.pause();
			node.style.display = 'none';
			return node;
		};

		node.show = function () {
			node.style.display = '';
			return node;
		};

		node.destroy = function () {
			if (hlsPlayer !== null) {
				hlsPlayer.stopLoad();
				hlsPlayer.destroy();
			}
		};

		var event = (0, _general.createEvent)('rendererready', node);
		mediaElement.dispatchEvent(event);

		mediaElement.promises.push(NativeHls.load({
			options: options.hls,
			id: id
		}));

		return node;
	}
};

_media.typeChecks.push(function (url) {
	return ~url.toLowerCase().indexOf('.m3u8') ? 'application/x-mpegURL' : null;
});

_renderer.renderer.add(HlsNativeRenderer);

},{"16":16,"17":17,"18":18,"19":19,"3":3,"7":7,"8":8}],14:[function(_dereq_,module,exports){
'use strict';

var _window = _dereq_(3);

var _window2 = _interopRequireDefault(_window);

var _document = _dereq_(2);

var _document2 = _interopRequireDefault(_document);

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

var _renderer = _dereq_(8);

var _general = _dereq_(18);

var _constants = _dereq_(16);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var HtmlMediaElement = {
	name: 'html5',
	options: {
		prefix: 'html5'
	},

	canPlayType: function canPlayType(type) {

		var mediaElement = _document2.default.createElement('video');

		if (_constants.IS_ANDROID && /\/mp(3|4)$/i.test(type) || ~['application/x-mpegurl', 'vnd.apple.mpegurl', 'audio/mpegurl', 'audio/hls', 'video/hls'].indexOf(type.toLowerCase()) && _constants.SUPPORTS_NATIVE_HLS) {
			return 'yes';
		} else if (mediaElement.canPlayType) {
			return mediaElement.canPlayType(type.toLowerCase()).replace(/no/, '');
		} else {
			return '';
		}
	},

	create: function create(mediaElement, options, mediaFiles) {

		var id = mediaElement.id + '_' + options.prefix;
		var isActive = false;

		var node = null;

		if (mediaElement.originalNode === undefined || mediaElement.originalNode === null) {
			node = _document2.default.createElement('audio');
			mediaElement.appendChild(node);
		} else {
			node = mediaElement.originalNode;
		}

		node.setAttribute('id', id);

		var props = _mejs2.default.html5media.properties,
		    assignGettersSetters = function assignGettersSetters(propName) {
			var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);

			node['get' + capName] = function () {
				return node[propName];
			};

			node['set' + capName] = function (value) {
				if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {
					node[propName] = value;
				}
			};
		};

		for (var i = 0, _total = props.length; i < _total; i++) {
			assignGettersSetters(props[i]);
		}

		var events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {
			return e !== 'error';
		}),
		    assignEvents = function assignEvents(eventName) {
			node.addEventListener(eventName, function (e) {
				if (isActive) {
					var _event = (0, _general.createEvent)(e.type, e.target);
					mediaElement.dispatchEvent(_event);
				}
			});
		};

		for (var _i = 0, _total2 = events.length; _i < _total2; _i++) {
			assignEvents(events[_i]);
		}

		node.setSize = function (width, height) {
			node.style.width = width + 'px';
			node.style.height = height + 'px';
			return node;
		};

		node.hide = function () {
			isActive = false;
			node.style.display = 'none';

			return node;
		};

		node.show = function () {
			isActive = true;
			node.style.display = '';

			return node;
		};

		var index = 0,
		    total = mediaFiles.length;
		if (total > 0) {
			for (; index < total; index++) {
				if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[index].type)) {
					node.setAttribute('src', mediaFiles[index].src);
					break;
				}
			}
		}

		node.addEventListener('error', function (e) {
			if (e && e.target && e.target.error && e.target.error.code === 4 && isActive) {
				if (index < total && mediaFiles[index + 1] !== undefined) {
					node.src = mediaFiles[index++].src;
					node.load();
					node.play();
				} else {
					mediaElement.generateError('Media error: Format(s) not supported or source(s) not found', mediaFiles);
				}
			}
		});

		var event = (0, _general.createEvent)('rendererready', node);
		mediaElement.dispatchEvent(event);

		return node;
	}
};

_window2.default.HtmlMediaElement = _mejs2.default.HtmlMediaElement = HtmlMediaElement;

_renderer.renderer.add(HtmlMediaElement);

},{"16":16,"18":18,"2":2,"3":3,"7":7,"8":8}],15:[function(_dereq_,module,exports){
'use strict';

var _window = _dereq_(3);

var _window2 = _interopRequireDefault(_window);

var _document = _dereq_(2);

var _document2 = _interopRequireDefault(_document);

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

var _renderer = _dereq_(8);

var _general = _dereq_(18);

var _media = _dereq_(19);

var _dom = _dereq_(17);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var YouTubeApi = {
	isIframeStarted: false,

	isIframeLoaded: false,

	iframeQueue: [],

	enqueueIframe: function enqueueIframe(settings) {
		YouTubeApi.isLoaded = typeof YT !== 'undefined' && YT.loaded;

		if (YouTubeApi.isLoaded) {
			YouTubeApi.createIframe(settings);
		} else {
			YouTubeApi.loadIframeApi();
			YouTubeApi.iframeQueue.push(settings);
		}
	},

	loadIframeApi: function loadIframeApi() {
		if (!YouTubeApi.isIframeStarted) {
			(0, _dom.loadScript)('https://www.youtube.com/player_api');
			YouTubeApi.isIframeStarted = true;
		}
	},

	iFrameReady: function iFrameReady() {

		YouTubeApi.isLoaded = true;
		YouTubeApi.isIframeLoaded = true;

		while (YouTubeApi.iframeQueue.length > 0) {
			var settings = YouTubeApi.iframeQueue.pop();
			YouTubeApi.createIframe(settings);
		}
	},

	createIframe: function createIframe(settings) {
		return new YT.Player(settings.containerId, settings);
	},

	getYouTubeId: function getYouTubeId(url) {

		var youTubeId = '';

		if (url.indexOf('?') > 0) {
			youTubeId = YouTubeApi.getYouTubeIdFromParam(url);

			if (youTubeId === '') {
				youTubeId = YouTubeApi.getYouTubeIdFromUrl(url);
			}
		} else {
			youTubeId = YouTubeApi.getYouTubeIdFromUrl(url);
		}

		var id = youTubeId.substring(youTubeId.lastIndexOf('/') + 1);
		youTubeId = id.split('?');
		return youTubeId[0];
	},

	getYouTubeIdFromParam: function getYouTubeIdFromParam(url) {

		if (url === undefined || url === null || !url.trim().length) {
			return null;
		}

		var parts = url.split('?'),
		    parameters = parts[1].split('&');

		var youTubeId = '';

		for (var i = 0, total = parameters.length; i < total; i++) {
			var paramParts = parameters[i].split('=');
			if (paramParts[0] === 'v') {
				youTubeId = paramParts[1];
				break;
			}
		}

		return youTubeId;
	},

	getYouTubeIdFromUrl: function getYouTubeIdFromUrl(url) {

		if (url === undefined || url === null || !url.trim().length) {
			return null;
		}

		var parts = url.split('?');
		url = parts[0];
		return url.substring(url.lastIndexOf('/') + 1);
	},

	getYouTubeNoCookieUrl: function getYouTubeNoCookieUrl(url) {
		if (url === undefined || url === null || !url.trim().length || url.indexOf('//www.youtube') === -1) {
			return url;
		}

		var parts = url.split('/');
		parts[2] = parts[2].replace('.com', '-nocookie.com');
		return parts.join('/');
	}
};

var YouTubeIframeRenderer = {
	name: 'youtube_iframe',

	options: {
		prefix: 'youtube_iframe',

		youtube: {
			autoplay: 0,
			controls: 0,
			disablekb: 1,
			end: 0,
			loop: 0,
			modestbranding: 0,
			playsinline: 0,
			rel: 0,
			showinfo: 0,
			start: 0,
			iv_load_policy: 3,

			nocookie: false,

			imageQuality: null
		}
	},

	canPlayType: function canPlayType(type) {
		return ~['video/youtube', 'video/x-youtube'].indexOf(type.toLowerCase());
	},

	create: function create(mediaElement, options, mediaFiles) {

		var youtube = {},
		    apiStack = [],
		    readyState = 4;

		var youTubeApi = null,
		    paused = true,
		    ended = false,
		    youTubeIframe = null,
		    volume = 1;

		youtube.options = options;
		youtube.id = mediaElement.id + '_' + options.prefix;
		youtube.mediaElement = mediaElement;

		var props = _mejs2.default.html5media.properties,
		    assignGettersSetters = function assignGettersSetters(propName) {

			var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);

			youtube['get' + capName] = function () {
				if (youTubeApi !== null) {
					var value = null;

					switch (propName) {
						case 'currentTime':
							return youTubeApi.getCurrentTime();
						case 'duration':
							return youTubeApi.getDuration();
						case 'volume':
							volume = youTubeApi.getVolume() / 100;
							return volume;
						case 'playbackRate':
							return youTubeApi.getPlaybackRate();
						case 'paused':
							return paused;
						case 'ended':
							return ended;
						case 'muted':
							return youTubeApi.isMuted();
						case 'buffered':
							var percentLoaded = youTubeApi.getVideoLoadedFraction(),
							    duration = youTubeApi.getDuration();
							return {
								start: function start() {
									return 0;
								},
								end: function end() {
									return percentLoaded * duration;
								},
								length: 1
							};
						case 'src':
							return youTubeApi.getVideoUrl();
						case 'readyState':
							return readyState;
					}

					return value;
				} else {
					return null;
				}
			};

			youtube['set' + capName] = function (value) {
				if (youTubeApi !== null) {
					switch (propName) {
						case 'src':
							var url = typeof value === 'string' ? value : value[0].src,
							    _videoId = YouTubeApi.getYouTubeId(url);

							if (mediaElement.originalNode.autoplay) {
								youTubeApi.loadVideoById(_videoId);
							} else {
								youTubeApi.cueVideoById(_videoId);
							}
							break;
						case 'currentTime':
							youTubeApi.seekTo(value);
							break;
						case 'muted':
							if (value) {
								youTubeApi.mute();
							} else {
								youTubeApi.unMute();
							}
							setTimeout(function () {
								var event = (0, _general.createEvent)('volumechange', youtube);
								mediaElement.dispatchEvent(event);
							}, 50);
							break;
						case 'volume':
							volume = value;
							youTubeApi.setVolume(value * 100);
							setTimeout(function () {
								var event = (0, _general.createEvent)('volumechange', youtube);
								mediaElement.dispatchEvent(event);
							}, 50);
							break;
						case 'playbackRate':
							youTubeApi.setPlaybackRate(value);
							setTimeout(function () {
								var event = (0, _general.createEvent)('ratechange', youtube);
								mediaElement.dispatchEvent(event);
							}, 50);
							break;
						case 'readyState':
							var event = (0, _general.createEvent)('canplay', youtube);
							mediaElement.dispatchEvent(event);
							break;
						default:
							
							break;
					}
				} else {
					apiStack.push({ type: 'set', propName: propName, value: value });
				}
			};
		};

		for (var i = 0, total = props.length; i < total; i++) {
			assignGettersSetters(props[i]);
		}

		var methods = _mejs2.default.html5media.methods,
		    assignMethods = function assignMethods(methodName) {
			youtube[methodName] = function () {
				if (youTubeApi !== null) {
					switch (methodName) {
						case 'play':
							paused = false;
							return youTubeApi.playVideo();
						case 'pause':
							paused = true;
							return youTubeApi.pauseVideo();
						case 'load':
							return null;
					}
				} else {
					apiStack.push({ type: 'call', methodName: methodName });
				}
			};
		};

		for (var _i = 0, _total = methods.length; _i < _total; _i++) {
			assignMethods(methods[_i]);
		}

		var errorHandler = function errorHandler(error) {
			var message = '';
			switch (error.data) {
				case 2:
					message = 'The request contains an invalid parameter value. Verify that video ID has 11 characters and that contains no invalid characters, such as exclamation points or asterisks.';
					break;
				case 5:
					message = 'The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.';
					break;
				case 100:
					message = 'The video requested was not found. Either video has been removed or has been marked as private.';
					break;
				case 101:
				case 105:
					message = 'The owner of the requested video does not allow it to be played in embedded players.';
					break;
				default:
					message = 'Unknown error.';
					break;
			}
			mediaElement.generateError('Code ' + error.data + ': ' + message, mediaFiles);
		};

		var youtubeContainer = _document2.default.createElement('div');
		youtubeContainer.id = youtube.id;

		if (youtube.options.youtube.nocookie) {
			mediaElement.originalNode.src = YouTubeApi.getYouTubeNoCookieUrl(mediaFiles[0].src);
		}

		mediaElement.originalNode.parentNode.insertBefore(youtubeContainer, mediaElement.originalNode);
		mediaElement.originalNode.style.display = 'none';

		var isAudio = mediaElement.originalNode.tagName.toLowerCase() === 'audio',
		    height = isAudio ? '1' : mediaElement.originalNode.height,
		    width = isAudio ? '1' : mediaElement.originalNode.width,
		    videoId = YouTubeApi.getYouTubeId(mediaFiles[0].src),
		    youtubeSettings = {
			id: youtube.id,
			containerId: youtubeContainer.id,
			videoId: videoId,
			height: height,
			width: width,
			host: youtube.options.youtube && youtube.options.youtube.nocookie ? 'https://www.youtube-nocookie.com' : undefined,
			playerVars: Object.assign({
				controls: 0,
				rel: 0,
				disablekb: 1,
				showinfo: 0,
				modestbranding: 0,
				html5: 1,
				iv_load_policy: 3
			}, youtube.options.youtube),
			origin: _window2.default.location.host,
			events: {
				onReady: function onReady(e) {
					mediaElement.youTubeApi = youTubeApi = e.target;
					mediaElement.youTubeState = {
						paused: true,
						ended: false
					};

					if (apiStack.length) {
						for (var _i2 = 0, _total2 = apiStack.length; _i2 < _total2; _i2++) {

							var stackItem = apiStack[_i2];

							if (stackItem.type === 'set') {
								var propName = stackItem.propName,
								    capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);

								youtube['set' + capName](stackItem.value);
							} else if (stackItem.type === 'call') {
								youtube[stackItem.methodName]();
							}
						}
					}

					youTubeIframe = youTubeApi.getIframe();

					if (mediaElement.originalNode.muted) {
						youTubeApi.mute();
					}

					var events = ['mouseover', 'mouseout'],
					    assignEvents = function assignEvents(e) {
						var newEvent = (0, _general.createEvent)(e.type, youtube);
						mediaElement.dispatchEvent(newEvent);
					};

					for (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) {
						youTubeIframe.addEventListener(events[_i3], assignEvents, false);
					}

					var initEvents = ['rendererready', 'loadedmetadata', 'loadeddata', 'canplay'];

					for (var _i4 = 0, _total4 = initEvents.length; _i4 < _total4; _i4++) {
						var event = (0, _general.createEvent)(initEvents[_i4], youtube);
						mediaElement.dispatchEvent(event);
					}
				},
				onStateChange: function onStateChange(e) {
					var events = [];

					switch (e.data) {
						case -1:
							events = ['loadedmetadata'];
							paused = true;
							ended = false;
							break;
						case 0:
							events = ['ended'];
							paused = false;
							ended = !youtube.options.youtube.loop;
							if (!youtube.options.youtube.loop) {
								youtube.stopInterval();
							}
							break;
						case 1:
							events = ['play', 'playing'];
							paused = false;
							ended = false;
							youtube.startInterval();
							break;
						case 2:
							events = ['pause'];
							paused = true;
							ended = false;
							youtube.stopInterval();
							break;
						case 3:
							events = ['progress'];
							ended = false;
							break;
						case 5:
							events = ['loadeddata', 'loadedmetadata', 'canplay'];
							paused = true;
							ended = false;
							break;
					}

					for (var _i5 = 0, _total5 = events.length; _i5 < _total5; _i5++) {
						var event = (0, _general.createEvent)(events[_i5], youtube);
						mediaElement.dispatchEvent(event);
					}
				},
				onError: function onError(e) {
					return errorHandler(e);
				}
			}
		};

		if (isAudio || mediaElement.originalNode.hasAttribute('playsinline')) {
			youtubeSettings.playerVars.playsinline = 1;
		}

		if (mediaElement.originalNode.controls) {
			youtubeSettings.playerVars.controls = 1;
		}
		if (mediaElement.originalNode.autoplay) {
			youtubeSettings.playerVars.autoplay = 1;
		}
		if (mediaElement.originalNode.loop) {
			youtubeSettings.playerVars.loop = 1;
		}

		if ((youtubeSettings.playerVars.loop && parseInt(youtubeSettings.playerVars.loop, 10) === 1 || mediaElement.originalNode.src.indexOf('loop=') > -1) && !youtubeSettings.playerVars.playlist && mediaElement.originalNode.src.indexOf('playlist=') === -1) {
			youtubeSettings.playerVars.playlist = YouTubeApi.getYouTubeId(mediaElement.originalNode.src);
		}

		YouTubeApi.enqueueIframe(youtubeSettings);

		youtube.onEvent = function (eventName, player, _youTubeState) {
			if (_youTubeState !== null && _youTubeState !== undefined) {
				mediaElement.youTubeState = _youTubeState;
			}
		};

		youtube.setSize = function (width, height) {
			if (youTubeApi !== null) {
				youTubeApi.setSize(width, height);
			}
		};
		youtube.hide = function () {
			youtube.stopInterval();
			youtube.pause();
			if (youTubeIframe) {
				youTubeIframe.style.display = 'none';
			}
		};
		youtube.show = function () {
			if (youTubeIframe) {
				youTubeIframe.style.display = '';
			}
		};
		youtube.destroy = function () {
			youTubeApi.destroy();
		};
		youtube.interval = null;

		youtube.startInterval = function () {
			youtube.interval = setInterval(function () {
				var event = (0, _general.createEvent)('timeupdate', youtube);
				mediaElement.dispatchEvent(event);
			}, 250);
		};
		youtube.stopInterval = function () {
			if (youtube.interval) {
				clearInterval(youtube.interval);
			}
		};
		youtube.getPosterUrl = function () {
			var quality = options.youtube.imageQuality,
			    resolutions = ['default', 'hqdefault', 'mqdefault', 'sddefault', 'maxresdefault'],
			    id = YouTubeApi.getYouTubeId(mediaElement.originalNode.src);
			return quality && resolutions.indexOf(quality) > -1 && id ? 'https://img.youtube.com/vi/' + id + '/' + quality + '.jpg' : '';
		};

		return youtube;
	}
};

_window2.default.onYouTubePlayerAPIReady = function () {
	YouTubeApi.iFrameReady();
};

_media.typeChecks.push(function (url) {
	return (/\/\/(www\.youtube|youtu\.?be)/i.test(url) ? 'video/x-youtube' : null
	);
});

_renderer.renderer.add(YouTubeIframeRenderer);

},{"17":17,"18":18,"19":19,"2":2,"3":3,"7":7,"8":8}],16:[function(_dereq_,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});
exports.cancelFullScreen = exports.requestFullScreen = exports.isFullScreen = exports.FULLSCREEN_EVENT_NAME = exports.HAS_NATIVE_FULLSCREEN_ENABLED = exports.HAS_TRUE_NATIVE_FULLSCREEN = exports.HAS_IOS_FULLSCREEN = exports.HAS_MS_NATIVE_FULLSCREEN = exports.HAS_MOZ_NATIVE_FULLSCREEN = exports.HAS_WEBKIT_NATIVE_FULLSCREEN = exports.HAS_NATIVE_FULLSCREEN = exports.SUPPORTS_NATIVE_HLS = exports.SUPPORT_PASSIVE_EVENT = exports.SUPPORT_POINTER_EVENTS = exports.HAS_MSE = exports.IS_STOCK_ANDROID = exports.IS_SAFARI = exports.IS_FIREFOX = exports.IS_CHROME = exports.IS_EDGE = exports.IS_IE = exports.IS_ANDROID = exports.IS_IOS = exports.IS_IPOD = exports.IS_IPHONE = exports.IS_IPAD = exports.UA = exports.NAV = undefined;

var _window = _dereq_(3);

var _window2 = _interopRequireDefault(_window);

var _document = _dereq_(2);

var _document2 = _interopRequireDefault(_document);

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var NAV = exports.NAV = _window2.default.navigator;
var UA = exports.UA = NAV.userAgent.toLowerCase();
var IS_IPAD = exports.IS_IPAD = /ipad/i.test(UA) && !_window2.default.MSStream;
var IS_IPHONE = exports.IS_IPHONE = /iphone/i.test(UA) && !_window2.default.MSStream;
var IS_IPOD = exports.IS_IPOD = /ipod/i.test(UA) && !_window2.default.MSStream;
var IS_IOS = exports.IS_IOS = /ipad|iphone|ipod/i.test(UA) && !_window2.default.MSStream;
var IS_ANDROID = exports.IS_ANDROID = /android/i.test(UA);
var IS_IE = exports.IS_IE = /(trident|microsoft)/i.test(NAV.appName);
var IS_EDGE = exports.IS_EDGE = 'msLaunchUri' in NAV && !('documentMode' in _document2.default);
var IS_CHROME = exports.IS_CHROME = /chrome/i.test(UA);
var IS_FIREFOX = exports.IS_FIREFOX = /firefox/i.test(UA);
var IS_SAFARI = exports.IS_SAFARI = /safari/i.test(UA) && !IS_CHROME;
var IS_STOCK_ANDROID = exports.IS_STOCK_ANDROID = /^mozilla\/\d+\.\d+\s\(linux;\su;/i.test(UA);
var HAS_MSE = exports.HAS_MSE = 'MediaSource' in _window2.default;
var SUPPORT_POINTER_EVENTS = exports.SUPPORT_POINTER_EVENTS = function () {
	var element = _document2.default.createElement('x'),
	    documentElement = _document2.default.documentElement,
	    getComputedStyle = _window2.default.getComputedStyle;

	if (!('pointerEvents' in element.style)) {
		return false;
	}

	element.style.pointerEvents = 'auto';
	element.style.pointerEvents = 'x';
	documentElement.appendChild(element);
	var supports = getComputedStyle && (getComputedStyle(element, '') || {}).pointerEvents === 'auto';
	element.remove();
	return !!supports;
}();

var SUPPORT_PASSIVE_EVENT = exports.SUPPORT_PASSIVE_EVENT = function () {
	var supportsPassive = false;
	try {
		var opts = Object.defineProperty({}, 'passive', {
			get: function get() {
				supportsPassive = true;
			}
		});
		_window2.default.addEventListener('test', null, opts);
	} catch (e) {}

	return supportsPassive;
}();

var html5Elements = ['source', 'track', 'audio', 'video'];
var video = void 0;

for (var i = 0, total = html5Elements.length; i < total; i++) {
	video = _document2.default.createElement(html5Elements[i]);
}

var SUPPORTS_NATIVE_HLS = exports.SUPPORTS_NATIVE_HLS = IS_SAFARI || IS_IE && /edge/i.test(UA);

var hasiOSFullScreen = video.webkitEnterFullscreen !== undefined;

var hasNativeFullscreen = video.requestFullscreen !== undefined;

if (hasiOSFullScreen && /mac os x 10_5/i.test(UA)) {
	hasNativeFullscreen = false;
	hasiOSFullScreen = false;
}

var hasWebkitNativeFullScreen = video.webkitRequestFullScreen !== undefined;
var hasMozNativeFullScreen = video.mozRequestFullScreen !== undefined;
var hasMsNativeFullScreen = video.msRequestFullscreen !== undefined;
var hasTrueNativeFullScreen = hasWebkitNativeFullScreen || hasMozNativeFullScreen || hasMsNativeFullScreen;
var nativeFullScreenEnabled = hasTrueNativeFullScreen;
var fullScreenEventName = '';
var isFullScreen = void 0,
    requestFullScreen = void 0,
    cancelFullScreen = void 0;

if (hasMozNativeFullScreen) {
	nativeFullScreenEnabled = _document2.default.mozFullScreenEnabled;
} else if (hasMsNativeFullScreen) {
	nativeFullScreenEnabled = _document2.default.msFullscreenEnabled;
}

if (IS_CHROME) {
	hasiOSFullScreen = false;
}

if (hasTrueNativeFullScreen) {
	if (hasWebkitNativeFullScreen) {
		fullScreenEventName = 'webkitfullscreenchange';
	} else if (hasMozNativeFullScreen) {
		fullScreenEventName = 'fullscreenchange';
	} else if (hasMsNativeFullScreen) {
		fullScreenEventName = 'MSFullscreenChange';
	}

	exports.isFullScreen = isFullScreen = function isFullScreen() {
		if (hasMozNativeFullScreen) {
			return _document2.default.mozFullScreen;
		} else if (hasWebkitNativeFullScreen) {
			return _document2.default.webkitIsFullScreen;
		} else if (hasMsNativeFullScreen) {
			return _document2.default.msFullscreenElement !== null;
		}
	};

	exports.requestFullScreen = requestFullScreen = function requestFullScreen(el) {
		if (hasWebkitNativeFullScreen) {
			el.webkitRequestFullScreen();
		} else if (hasMozNativeFullScreen) {
			el.mozRequestFullScreen();
		} else if (hasMsNativeFullScreen) {
			el.msRequestFullscreen();
		}
	};

	exports.cancelFullScreen = cancelFullScreen = function cancelFullScreen() {
		if (hasWebkitNativeFullScreen) {
			_document2.default.webkitCancelFullScreen();
		} else if (hasMozNativeFullScreen) {
			_document2.default.mozCancelFullScreen();
		} else if (hasMsNativeFullScreen) {
			_document2.default.msExitFullscreen();
		}
	};
}

var HAS_NATIVE_FULLSCREEN = exports.HAS_NATIVE_FULLSCREEN = hasNativeFullscreen;
var HAS_WEBKIT_NATIVE_FULLSCREEN = exports.HAS_WEBKIT_NATIVE_FULLSCREEN = hasWebkitNativeFullScreen;
var HAS_MOZ_NATIVE_FULLSCREEN = exports.HAS_MOZ_NATIVE_FULLSCREEN = hasMozNativeFullScreen;
var HAS_MS_NATIVE_FULLSCREEN = exports.HAS_MS_NATIVE_FULLSCREEN = hasMsNativeFullScreen;
var HAS_IOS_FULLSCREEN = exports.HAS_IOS_FULLSCREEN = hasiOSFullScreen;
var HAS_TRUE_NATIVE_FULLSCREEN = exports.HAS_TRUE_NATIVE_FULLSCREEN = hasTrueNativeFullScreen;
var HAS_NATIVE_FULLSCREEN_ENABLED = exports.HAS_NATIVE_FULLSCREEN_ENABLED = nativeFullScreenEnabled;
var FULLSCREEN_EVENT_NAME = exports.FULLSCREEN_EVENT_NAME = fullScreenEventName;
exports.isFullScreen = isFullScreen;
exports.requestFullScreen = requestFullScreen;
exports.cancelFullScreen = cancelFullScreen;


_mejs2.default.Features = _mejs2.default.Features || {};
_mejs2.default.Features.isiPad = IS_IPAD;
_mejs2.default.Features.isiPod = IS_IPOD;
_mejs2.default.Features.isiPhone = IS_IPHONE;
_mejs2.default.Features.isiOS = _mejs2.default.Features.isiPhone || _mejs2.default.Features.isiPad;
_mejs2.default.Features.isAndroid = IS_ANDROID;
_mejs2.default.Features.isIE = IS_IE;
_mejs2.default.Features.isEdge = IS_EDGE;
_mejs2.default.Features.isChrome = IS_CHROME;
_mejs2.default.Features.isFirefox = IS_FIREFOX;
_mejs2.default.Features.isSafari = IS_SAFARI;
_mejs2.default.Features.isStockAndroid = IS_STOCK_ANDROID;
_mejs2.default.Features.hasMSE = HAS_MSE;
_mejs2.default.Features.supportsNativeHLS = SUPPORTS_NATIVE_HLS;
_mejs2.default.Features.supportsPointerEvents = SUPPORT_POINTER_EVENTS;
_mejs2.default.Features.supportsPassiveEvent = SUPPORT_PASSIVE_EVENT;
_mejs2.default.Features.hasiOSFullScreen = HAS_IOS_FULLSCREEN;
_mejs2.default.Features.hasNativeFullscreen = HAS_NATIVE_FULLSCREEN;
_mejs2.default.Features.hasWebkitNativeFullScreen = HAS_WEBKIT_NATIVE_FULLSCREEN;
_mejs2.default.Features.hasMozNativeFullScreen = HAS_MOZ_NATIVE_FULLSCREEN;
_mejs2.default.Features.hasMsNativeFullScreen = HAS_MS_NATIVE_FULLSCREEN;
_mejs2.default.Features.hasTrueNativeFullScreen = HAS_TRUE_NATIVE_FULLSCREEN;
_mejs2.default.Features.nativeFullScreenEnabled = HAS_NATIVE_FULLSCREEN_ENABLED;
_mejs2.default.Features.fullScreenEventName = FULLSCREEN_EVENT_NAME;
_mejs2.default.Features.isFullScreen = isFullScreen;
_mejs2.default.Features.requestFullScreen = requestFullScreen;
_mejs2.default.Features.cancelFullScreen = cancelFullScreen;

},{"2":2,"3":3,"7":7}],17:[function(_dereq_,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});
exports.removeClass = exports.addClass = exports.hasClass = undefined;
exports.loadScript = loadScript;
exports.offset = offset;
exports.toggleClass = toggleClass;
exports.fadeOut = fadeOut;
exports.fadeIn = fadeIn;
exports.siblings = siblings;
exports.visible = visible;
exports.ajax = ajax;

var _window = _dereq_(3);

var _window2 = _interopRequireDefault(_window);

var _document = _dereq_(2);

var _document2 = _interopRequireDefault(_document);

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function loadScript(url) {
	return new Promise(function (resolve, reject) {
		var script = _document2.default.createElement('script');
		script.src = url;
		script.async = true;
		script.onload = function () {
			script.remove();
			resolve();
		};
		script.onerror = function () {
			script.remove();
			reject();
		};
		_document2.default.head.appendChild(script);
	});
}

function offset(el) {
	var rect = el.getBoundingClientRect(),
	    scrollLeft = _window2.default.pageXOffset || _document2.default.documentElement.scrollLeft,
	    scrollTop = _window2.default.pageYOffset || _document2.default.documentElement.scrollTop;
	return { top: rect.top + scrollTop, left: rect.left + scrollLeft };
}

var hasClassMethod = void 0,
    addClassMethod = void 0,
    removeClassMethod = void 0;

if ('classList' in _document2.default.documentElement) {
	hasClassMethod = function hasClassMethod(el, className) {
		return el.classList !== undefined && el.classList.contains(className);
	};
	addClassMethod = function addClassMethod(el, className) {
		return el.classList.add(className);
	};
	removeClassMethod = function removeClassMethod(el, className) {
		return el.classList.remove(className);
	};
} else {
	hasClassMethod = function hasClassMethod(el, className) {
		return new RegExp('\\b' + className + '\\b').test(el.className);
	};
	addClassMethod = function addClassMethod(el, className) {
		if (!hasClass(el, className)) {
			el.className += ' ' + className;
		}
	};
	removeClassMethod = function removeClassMethod(el, className) {
		el.className = el.className.replace(new RegExp('\\b' + className + '\\b', 'g'), '');
	};
}

var hasClass = exports.hasClass = hasClassMethod;
var addClass = exports.addClass = addClassMethod;
var removeClass = exports.removeClass = removeClassMethod;

function toggleClass(el, className) {
	hasClass(el, className) ? removeClass(el, className) : addClass(el, className);
}

function fadeOut(el) {
	var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 400;
	var callback = arguments[2];

	if (!el.style.opacity) {
		el.style.opacity = 1;
	}

	var start = null;
	_window2.default.requestAnimationFrame(function animate(timestamp) {
		start = start || timestamp;
		var progress = timestamp - start;
		var opacity = parseFloat(1 - progress / duration, 2);
		el.style.opacity = opacity < 0 ? 0 : opacity;
		if (progress > duration) {
			if (callback && typeof callback === 'function') {
				callback();
			}
		} else {
			_window2.default.requestAnimationFrame(animate);
		}
	});
}

function fadeIn(el) {
	var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 400;
	var callback = arguments[2];

	if (!el.style.opacity) {
		el.style.opacity = 0;
	}

	var start = null;
	_window2.default.requestAnimationFrame(function animate(timestamp) {
		start = start || timestamp;
		var progress = timestamp - start;
		var opacity = parseFloat(progress / duration, 2);
		el.style.opacity = opacity > 1 ? 1 : opacity;
		if (progress > duration) {
			if (callback && typeof callback === 'function') {
				callback();
			}
		} else {
			_window2.default.requestAnimationFrame(animate);
		}
	});
}

function siblings(el, filter) {
	var siblings = [];
	el = el.parentNode.firstChild;
	do {
		if (!filter || filter(el)) {
			siblings.push(el);
		}
	} while (el = el.nextSibling);
	return siblings;
}

function visible(elem) {
	if (elem.getClientRects !== undefined && elem.getClientRects === 'function') {
		return !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length);
	}
	return !!(elem.offsetWidth || elem.offsetHeight);
}

function ajax(url, dataType, success, error) {
	var xhr = _window2.default.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');

	var type = 'application/x-www-form-urlencoded; charset=UTF-8',
	    completed = false,
	    accept = '*/'.concat('*');

	switch (dataType) {
		case 'text':
			type = 'text/plain';
			break;
		case 'json':
			type = 'application/json, text/javascript';
			break;
		case 'html':
			type = 'text/html';
			break;
		case 'xml':
			type = 'application/xml, text/xml';
			break;
	}

	if (type !== 'application/x-www-form-urlencoded') {
		accept = type + ', */*; q=0.01';
	}

	if (xhr) {
		xhr.open('GET', url, true);
		xhr.setRequestHeader('Accept', accept);
		xhr.onreadystatechange = function () {
			if (completed) {
				return;
			}

			if (xhr.readyState === 4) {
				if (xhr.status === 200) {
					completed = true;
					var data = void 0;
					switch (dataType) {
						case 'json':
							data = JSON.parse(xhr.responseText);
							break;
						case 'xml':
							data = xhr.responseXML;
							break;
						default:
							data = xhr.responseText;
							break;
					}
					success(data);
				} else if (typeof error === 'function') {
					error(xhr.status);
				}
			}
		};

		xhr.send();
	}
}

_mejs2.default.Utils = _mejs2.default.Utils || {};
_mejs2.default.Utils.offset = offset;
_mejs2.default.Utils.hasClass = hasClass;
_mejs2.default.Utils.addClass = addClass;
_mejs2.default.Utils.removeClass = removeClass;
_mejs2.default.Utils.toggleClass = toggleClass;
_mejs2.default.Utils.fadeIn = fadeIn;
_mejs2.default.Utils.fadeOut = fadeOut;
_mejs2.default.Utils.siblings = siblings;
_mejs2.default.Utils.visible = visible;
_mejs2.default.Utils.ajax = ajax;
_mejs2.default.Utils.loadScript = loadScript;

},{"2":2,"3":3,"7":7}],18:[function(_dereq_,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});
exports.escapeHTML = escapeHTML;
exports.debounce = debounce;
exports.isObjectEmpty = isObjectEmpty;
exports.splitEvents = splitEvents;
exports.createEvent = createEvent;
exports.isNodeAfter = isNodeAfter;
exports.isString = isString;

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function escapeHTML(input) {

	if (typeof input !== 'string') {
		throw new Error('Argument passed must be a string');
	}

	var map = {
		'&': '&amp;',
		'<': '&lt;',
		'>': '&gt;',
		'"': '&quot;'
	};

	return input.replace(/[&<>"]/g, function (c) {
		return map[c];
	});
}

function debounce(func, wait) {
	var _this = this,
	    _arguments = arguments;

	var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;


	if (typeof func !== 'function') {
		throw new Error('First argument must be a function');
	}

	if (typeof wait !== 'number') {
		throw new Error('Second argument must be a numeric value');
	}

	var timeout = void 0;
	return function () {
		var context = _this,
		    args = _arguments;
		var later = function later() {
			timeout = null;
			if (!immediate) {
				func.apply(context, args);
			}
		};
		var callNow = immediate && !timeout;
		clearTimeout(timeout);
		timeout = setTimeout(later, wait);

		if (callNow) {
			func.apply(context, args);
		}
	};
}

function isObjectEmpty(instance) {
	return Object.getOwnPropertyNames(instance).length <= 0;
}

function splitEvents(events, id) {
	var rwindow = /^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;

	var ret = { d: [], w: [] };
	(events || '').split(' ').forEach(function (v) {
		var eventName = '' + v + (id ? '.' + id : '');

		if (eventName.startsWith('.')) {
			ret.d.push(eventName);
			ret.w.push(eventName);
		} else {
			ret[rwindow.test(v) ? 'w' : 'd'].push(eventName);
		}
	});

	ret.d = ret.d.join(' ');
	ret.w = ret.w.join(' ');
	return ret;
}

function createEvent(eventName, target) {

	if (typeof eventName !== 'string') {
		throw new Error('Event name must be a string');
	}

	var eventFrags = eventName.match(/([a-z]+\.([a-z]+))/i),
	    detail = {
		target: target
	};

	if (eventFrags !== null) {
		eventName = eventFrags[1];
		detail.namespace = eventFrags[2];
	}

	return new window.CustomEvent(eventName, {
		detail: detail
	});
}

function isNodeAfter(sourceNode, targetNode) {

	return !!(sourceNode && targetNode && sourceNode.compareDocumentPosition(targetNode) & 2);
}

function isString(value) {
	return typeof value === 'string';
}

_mejs2.default.Utils = _mejs2.default.Utils || {};
_mejs2.default.Utils.escapeHTML = escapeHTML;
_mejs2.default.Utils.debounce = debounce;
_mejs2.default.Utils.isObjectEmpty = isObjectEmpty;
_mejs2.default.Utils.splitEvents = splitEvents;
_mejs2.default.Utils.createEvent = createEvent;
_mejs2.default.Utils.isNodeAfter = isNodeAfter;
_mejs2.default.Utils.isString = isString;

},{"7":7}],19:[function(_dereq_,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});
exports.typeChecks = undefined;
exports.absolutizeUrl = absolutizeUrl;
exports.formatType = formatType;
exports.getMimeFromType = getMimeFromType;
exports.getTypeFromFile = getTypeFromFile;
exports.getExtension = getExtension;
exports.normalizeExtension = normalizeExtension;

var _mejs = _dereq_(7);

var _mejs2 = _interopRequireDefault(_mejs);

var _general = _dereq_(18);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var typeChecks = exports.typeChecks = [];

function absolutizeUrl(url) {

	if (typeof url !== 'string') {
		throw new Error('`url` argument must be a string');
	}

	var el = document.createElement('div');
	el.innerHTML = '<a href="' + (0, _general.escapeHTML)(url) + '">x</a>';
	return el.firstChild.href;
}

function formatType(url) {
	var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';

	return url && !type ? getTypeFromFile(url) : type;
}

function getMimeFromType(type) {

	if (typeof type !== 'string') {
		throw new Error('`type` argument must be a string');
	}

	return type && type.indexOf(';') > -1 ? type.substr(0, type.indexOf(';')) : type;
}

function getTypeFromFile(url) {

	if (typeof url !== 'string') {
		throw new Error('`url` argument must be a string');
	}

	for (var i = 0, total = typeChecks.length; i < total; i++) {
		var type = typeChecks[i](url);

		if (type) {
			return type;
		}
	}

	var ext = getExtension(url),
	    normalizedExt = normalizeExtension(ext);

	var mime = 'video/mp4';

	if (normalizedExt) {
		if (~['mp4', 'm4v', 'ogg', 'ogv', 'webm', 'flv', 'mpeg'].indexOf(normalizedExt)) {
			mime = 'video/' + normalizedExt;
		} else if ('mov' === normalizedExt) {
			mime = 'video/quicktime';
		} else if (~['mp3', 'oga', 'wav', 'mid', 'midi'].indexOf(normalizedExt)) {
			mime = 'audio/' + normalizedExt;
		}
	}

	return mime;
}

function getExtension(url) {

	if (typeof url !== 'string') {
		throw new Error('`url` argument must be a string');
	}

	var baseUrl = url.split('?')[0],
	    baseName = baseUrl.split('\\').pop().split('/').pop();
	return ~baseName.indexOf('.') ? baseName.substring(baseName.lastIndexOf('.') + 1) : '';
}

function normalizeExtension(extension) {

	if (typeof extension !== 'string') {
		throw new Error('`extension` argument must be a string');
	}

	switch (extension) {
		case 'mp4':
		case 'm4v':
			return 'mp4';
		case 'webm':
		case 'webma':
		case 'webmv':
			return 'webm';
		case 'ogg':
		case 'oga':
		case 'ogv':
			return 'ogg';
		default:
			return extension;
	}
}

_mejs2.default.Utils = _mejs2.default.Utils || {};
_mejs2.default.Utils.typeChecks = typeChecks;
_mejs2.default.Utils.absolutizeUrl = absolutizeUrl;
_mejs2.default.Utils.formatType = formatType;
_mejs2.default.Utils.getMimeFromType = getMimeFromType;
_mejs2.default.Utils.getTypeFromFile = getTypeFromFile;
_mejs2.default.Utils.getExtension = getExtension;
_mejs2.default.Utils.normalizeExtension = normalizeExtension;

},{"18":18,"7":7}],20:[function(_dereq_,module,exports){
'use strict';

var _document = _dereq_(2);

var _document2 = _interopRequireDefault(_document);

var _promisePolyfill = _dereq_(4);

var _promisePolyfill2 = _interopRequireDefault(_promisePolyfill);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

(function (arr) {
	arr.forEach(function (item) {
		if (item.hasOwnProperty('remove')) {
			return;
		}
		Object.defineProperty(item, 'remove', {
			configurable: true,
			enumerable: true,
			writable: true,
			value: function remove() {
				this.parentNode.removeChild(this);
			}
		});
	});
})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);

(function () {

	if (typeof window.CustomEvent === 'function') {
		return false;
	}

	function CustomEvent(event, params) {
		params = params || { bubbles: false, cancelable: false, detail: undefined };
		var evt = _document2.default.createEvent('CustomEvent');
		evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
		return evt;
	}

	CustomEvent.prototype = window.Event.prototype;
	window.CustomEvent = CustomEvent;
})();

if (typeof Object.assign !== 'function') {
	Object.assign = function (target) {

		if (target === null || target === undefined) {
			throw new TypeError('Cannot convert undefined or null to object');
		}

		var to = Object(target);

		for (var index = 1, total = arguments.length; index < total; index++) {
			var nextSource = arguments[index];

			if (nextSource !== null) {
				for (var nextKey in nextSource) {
					if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
						to[nextKey] = nextSource[nextKey];
					}
				}
			}
		}
		return to;
	};
}

if (!String.prototype.startsWith) {
	String.prototype.startsWith = function (searchString, position) {
		position = position || 0;
		return this.substr(position, searchString.length) === searchString;
	};
}

if (!Element.prototype.matches) {
	Element.prototype.matches = Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector || function (s) {
		var matches = (this.document || this.ownerDocument).querySelectorAll(s),
		    i = matches.length - 1;
		while (--i >= 0 && matches.item(i) !== this) {}
		return i > -1;
	};
}

if (window.Element && !Element.prototype.closest) {
	Element.prototype.closest = function (s) {
		var matches = (this.document || this.ownerDocument).querySelectorAll(s),
		    i = void 0,
		    el = this;
		do {
			i = matches.length;
			while (--i >= 0 && matches.item(i) !== el) {}
		} while (i < 0 && (el = el.parentElement));
		return el;
	};
}

(function () {
	var lastTime = 0;
	var vendors = ['ms', 'moz', 'webkit', 'o'];
	for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
		window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
		window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
	}

	if (!window.requestAnimationFrame) window.requestAnimationFrame = function (callback) {
		var currTime = new Date().getTime();
		var timeToCall = Math.max(0, 16 - (currTime - lastTime));
		var id = window.setTimeout(function () {
			callback(currTime + timeToCall);
		}, timeToCall);
		lastTime = currTime + timeToCall;
		return id;
	};

	if (!window.cancelAnimationFrame) window.cancelAnimationFrame = function (id) {
		clearTimeout(id);
	};
})();

if (/firefox/i.test(navigator.userAgent)) {
	var getComputedStyle = window.getComputedStyle;
	window.getComputedStyle = function (el, pseudoEl) {
		var t = getComputedStyle(el, pseudoEl);
		return t === null ? { getPropertyValue: function getPropertyValue() {} } : t;
	};
}

if (!window.Promise) {
	window.Promise = _promisePolyfill2.default;
}

(function (constructor) {
	if (constructor && constructor.prototype && constructor.prototype.children === null) {
		Object.defineProperty(constructor.prototype, 'children', {
			get: function get() {
				var i = 0,
				    node = void 0,
				    nodes = this.childNodes,
				    children = [];
				while (node = nodes[i++]) {
					if (node.nodeType === 1) {
						children.push(node);
					}
				}
				return children;
			}
		});
	}
})(window.Node || window.Element);

},{"2":2,"4":4}]},{},[20,6,5,9,14,11,10,12,13,15]);
                                                                                                                                                                                                                                                                                                          mediaelement/mediaelement.min.js                                                                    0000644                 00000205326 15212564044 0012761 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * MediaElement.js
 * http://www.mediaelementjs.com/
 *
 * Wrapper that mimics native HTML5 MediaElement (audio and video)
 * using a variety of technologies (pure JavaScript, Flash, iframe)
 *
 * Copyright 2010-2017, John Dyer (http://j.hn/)
 * License: MIT
 *
 */
!function i(o,l,s){function d(n,e){if(!l[n]){if(!o[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(u)return u(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var a=l[n]={exports:{}};o[n][0].call(a.exports,function(e){var t=o[n][1][e];return d(t||e)},a,a.exports,i,o,l,s)}return l[n].exports}for(var u="function"==typeof require&&require,e=0;e<s.length;e++)d(s[e]);return d}({1:[function(e,t,n){},{}],2:[function(a,i,e){(function(e){var t,n=void 0!==e?e:"undefined"!=typeof window?window:{},r=a(1);"undefined"!=typeof document?t=document:(t=n["__GLOBAL_DOCUMENT_CACHE@4"])||(t=n["__GLOBAL_DOCUMENT_CACHE@4"]=r),i.exports=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{1:1}],3:[function(e,n,t){(function(e){var t;t="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},n.exports=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(e,n,t){!function(e){var t=setTimeout;function r(){}function i(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],d(e,this)}function a(n,r){for(;3===n._state;)n=n._value;0!==n._state?(n._handled=!0,i._immediateFn(function(){var e=1===n._state?r.onFulfilled:r.onRejected;if(null!==e){var t;try{t=e(n._value)}catch(e){return void l(r.promise,e)}o(r.promise,t)}else(1===n._state?o:l)(r.promise,n._value)})):n._deferreds.push(r)}function o(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof i)return t._state=3,t._value=e,void s(t);if("function"==typeof n)return void d((r=n,a=e,function(){r.apply(a,arguments)}),t)}t._state=1,t._value=e,s(t)}catch(e){l(t,e)}var r,a}function l(e,t){e._state=2,e._value=t,s(e)}function s(e){2===e._state&&0===e._deferreds.length&&i._immediateFn(function(){e._handled||i._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)a(e,e._deferreds[t]);e._deferreds=null}function d(e,t){var n=!1;try{e(function(e){n||(n=!0,o(t,e))},function(e){n||(n=!0,l(t,e))})}catch(e){if(n)return;n=!0,l(t,e)}}i.prototype.catch=function(e){return this.then(null,e)},i.prototype.then=function(e,t){var n=new this.constructor(r);return a(this,new function(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}(e,t,n)),n},i.all=function(e){var l=Array.prototype.slice.call(e);return new i(function(r,a){if(0===l.length)return r([]);var i=l.length;function o(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){o(t,e)},a)}l[t]=e,0==--i&&r(l)}catch(e){a(e)}}for(var e=0;e<l.length;e++)o(e,l[e])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(e){e(t)})},i.reject=function(n){return new i(function(e,t){t(n)})},i.race=function(a){return new i(function(e,t){for(var n=0,r=a.length;n<r;n++)a[n].then(e,t)})},i._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){t(e,0)},i._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},i._setImmediateFn=function(e){i._immediateFn=e},i._setUnhandledRejectionFn=function(e){i._unhandledRejectionFn=e},void 0!==n&&n.exports?n.exports=i:e.Promise||(e.Promise=i)}(this)},{}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=e(7),i=(r=a)&&r.__esModule?r:{default:r},l=e(9),s=e(18);var d={lang:"en",en:l.EN,language:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(null!=t&&t.length){if("string"!=typeof t[0])throw new TypeError("Language code must be a string value");if(!/^[a-z]{2,3}((\-|_)[a-z]{2})?$/i.test(t[0]))throw new TypeError("Language code must have format 2-3 letters and. optionally, hyphen, underscore followed by 2 more letters");d.lang=t[0],void 0===d[t[0]]?(t[1]=null!==t[1]&&void 0!==t[1]&&"object"===o(t[1])?t[1]:{},d[t[0]]=(0,s.isObjectEmpty)(t[1])?l.EN:t[1]):null!==t[1]&&void 0!==t[1]&&"object"===o(t[1])&&(d[t[0]]=t[1])}return d.lang},t:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof e&&e.length){var n=void 0,r=void 0,a=d.language(),i=function(e,t,n){return"object"!==(void 0===e?"undefined":o(e))||"number"!=typeof t||"number"!=typeof n?e:[function(){return arguments.length<=1?void 0:arguments[1]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return 0===(arguments.length<=0?void 0:arguments[0])||1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1&&(arguments.length<=0?void 0:arguments[0])%100!=11?arguments.length<=1?void 0:arguments[1]:0!==(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])||11===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])||12===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:2<(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])<20?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:0===(arguments.length<=0?void 0:arguments[0])||0<(arguments.length<=0?void 0:arguments[0])%100&&(arguments.length<=0?void 0:arguments[0])%100<20?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1&&(arguments.length<=0?void 0:arguments[0])%100!=11?arguments.length<=1?void 0:arguments[1]:2<=(arguments.length<=0?void 0:arguments[0])%10&&((arguments.length<=0?void 0:arguments[0])%100<10||20<=(arguments.length<=0?void 0:arguments[0])%100)?arguments.length<=2?void 0:arguments[2]:[3]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1&&(arguments.length<=0?void 0:arguments[0])%100!=11?arguments.length<=1?void 0:arguments[1]:2<=(arguments.length<=0?void 0:arguments[0])%10&&(arguments.length<=0?void 0:arguments[0])%10<=4&&((arguments.length<=0?void 0:arguments[0])%100<10||20<=(arguments.length<=0?void 0:arguments[0])%100)?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2<=(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])<=4?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2<=(arguments.length<=0?void 0:arguments[0])%10&&(arguments.length<=0?void 0:arguments[0])%10<=4&&((arguments.length<=0?void 0:arguments[0])%100<10||20<=(arguments.length<=0?void 0:arguments[0])%100)?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return(arguments.length<=0?void 0:arguments[0])%100==1?arguments.length<=2?void 0:arguments[2]:(arguments.length<=0?void 0:arguments[0])%100==2?arguments.length<=3?void 0:arguments[3]:(arguments.length<=0?void 0:arguments[0])%100==3||(arguments.length<=0?void 0:arguments[0])%100==4?arguments.length<=4?void 0:arguments[4]:arguments.length<=1?void 0:arguments[1]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:2<(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])<7?arguments.length<=3?void 0:arguments[3]:6<(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])<11?arguments.length<=4?void 0:arguments[4]:arguments.length<=5?void 0:arguments[5]},function(){return 0===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=3?void 0:arguments[3]:3<=(arguments.length<=0?void 0:arguments[0])%100&&(arguments.length<=0?void 0:arguments[0])%100<=10?arguments.length<=4?void 0:arguments[4]:11<=(arguments.length<=0?void 0:arguments[0])%100?arguments.length<=5?void 0:arguments[5]:arguments.length<=6?void 0:arguments[6]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:0===(arguments.length<=0?void 0:arguments[0])||1<(arguments.length<=0?void 0:arguments[0])%100&&(arguments.length<=0?void 0:arguments[0])%100<11?arguments.length<=2?void 0:arguments[2]:10<(arguments.length<=0?void 0:arguments[0])%100&&(arguments.length<=0?void 0:arguments[0])%100<20?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1?arguments.length<=1?void 0:arguments[1]:(arguments.length<=0?void 0:arguments[0])%10==2?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 11!==(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])%10==1?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2<=(arguments.length<=0?void 0:arguments[0])%10&&(arguments.length<=0?void 0:arguments[0])%10<=4&&((arguments.length<=0?void 0:arguments[0])%100<10||20<=(arguments.length<=0?void 0:arguments[0])%100)?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:8!==(arguments.length<=0?void 0:arguments[0])&&11!==(arguments.length<=0?void 0:arguments[0])?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return 0===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:3===(arguments.length<=0?void 0:arguments[0])?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return 0===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]}][n].apply(null,[t].concat(e))};return void 0!==d[a]&&(n=d[a][e],null!==t&&"number"==typeof t&&(r=d[a]["mejs.plural-form"],n=i.apply(null,[n,t,r]))),!n&&d.en&&(n=d.en[e],null!==t&&"number"==typeof t&&(r=d.en["mejs.plural-form"],n=i.apply(null,[n,t,r]))),n=n||e,null!==t&&"number"==typeof t&&(n=n.replace("%1",t)),(0,s.escapeHTML)(n)}return e}};i.default.i18n=d,"undefined"!=typeof mejsL10n&&i.default.i18n.language(mejsL10n.language,mejsL10n.strings),n.default=d},{18:18,7:7,9:9}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O=r(e(3)),C=r(e(2)),I=r(e(7)),k=e(18),U=e(19),M=e(8),R=e(16);function r(e){return e&&e.__esModule?e:{default:e}}var a=function e(t,n,r){var c=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var f=this;r=Array.isArray(r)?r:null,f.defaults={renderers:[],fakeNodeName:"mediaelementwrapper",pluginPath:"build/",shimScriptAccess:"sameDomain"},n=Object.assign(f.defaults,n),f.mediaElement=C.default.createElement(n.fakeNodeName);var a=t,i=!1;if("string"==typeof t?f.mediaElement.originalNode=C.default.getElementById(t):a=(f.mediaElement.originalNode=t).id,void 0===f.mediaElement.originalNode||null===f.mediaElement.originalNode)return null;f.mediaElement.options=n,a=a||"mejs_"+Math.random().toString().slice(2),f.mediaElement.originalNode.setAttribute("id",a+"_from_mejs");var o=f.mediaElement.originalNode.tagName.toLowerCase();-1<["video","audio"].indexOf(o)&&!f.mediaElement.originalNode.getAttribute("preload")&&f.mediaElement.originalNode.setAttribute("preload","none"),f.mediaElement.originalNode.parentNode.insertBefore(f.mediaElement,f.mediaElement.originalNode),f.mediaElement.appendChild(f.mediaElement.originalNode);var l=function(t,e){if("https:"===O.default.location.protocol&&0===t.indexOf("http:")&&R.IS_IOS&&-1<I.default.html5media.mediaTypes.indexOf(e)){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===this.readyState&&200===this.status){var e=(O.default.URL||O.default.webkitURL).createObjectURL(this.response);return f.mediaElement.originalNode.setAttribute("src",e),e}return t},n.open("GET",t),n.responseType="blob",n.send()}return t},s=void 0;if(null!==r)s=r;else if(null!==f.mediaElement.originalNode)switch(s=[],f.mediaElement.originalNode.nodeName.toLowerCase()){case"iframe":s.push({type:"",src:f.mediaElement.originalNode.getAttribute("src")});break;case"audio":case"video":var d=f.mediaElement.originalNode.children.length,u=f.mediaElement.originalNode.getAttribute("src");if(u){var m=f.mediaElement.originalNode,p=(0,U.formatType)(u,m.getAttribute("type"));s.push({type:p,src:l(u,p)})}for(var h=0;h<d;h++){var v=f.mediaElement.originalNode.children[h];if("source"===v.tagName.toLowerCase()){var g=v.getAttribute("src"),y=(0,U.formatType)(g,v.getAttribute("type"));s.push({type:y,src:l(g,y)})}}}f.mediaElement.id=a,f.mediaElement.renderers={},f.mediaElement.events={},f.mediaElement.promises=[],f.mediaElement.renderer=null,f.mediaElement.rendererName=null,f.mediaElement.changeRenderer=function(e,t){var n=c,r=2<Object.keys(t[0]).length?t[0]:t[0].src;if(void 0!==n.mediaElement.renderer&&null!==n.mediaElement.renderer&&n.mediaElement.renderer.name===e)return n.mediaElement.renderer.pause(),n.mediaElement.renderer.stop&&n.mediaElement.renderer.stop(),n.mediaElement.renderer.show(),n.mediaElement.renderer.setSrc(r),!0;void 0!==n.mediaElement.renderer&&null!==n.mediaElement.renderer&&(n.mediaElement.renderer.pause(),n.mediaElement.renderer.stop&&n.mediaElement.renderer.stop(),n.mediaElement.renderer.hide());var a=n.mediaElement.renderers[e],i=null;if(null!=a)return a.show(),a.setSrc(r),n.mediaElement.renderer=a,n.mediaElement.rendererName=e,!0;for(var o=n.mediaElement.options.renderers.length?n.mediaElement.options.renderers:M.renderer.order,l=0,s=o.length;l<s;l++){var d=o[l];if(d===e){i=M.renderer.renderers[d];var u=Object.assign(i.options,n.mediaElement.options);return(a=i.create(n.mediaElement,u,t)).name=e,n.mediaElement.renderers[i.name]=a,n.mediaElement.renderer=a,n.mediaElement.rendererName=e,a.show(),!0}}return!1},f.mediaElement.setSize=function(e,t){void 0!==f.mediaElement.renderer&&null!==f.mediaElement.renderer&&f.mediaElement.renderer.setSize(e,t)},f.mediaElement.generateError=function(e,t){e=e||"",t=Array.isArray(t)?t:[];var n=(0,k.createEvent)("error",f.mediaElement);n.message=e,n.urls=t,f.mediaElement.dispatchEvent(n),i=!0};var E=I.default.html5media.properties,b=I.default.html5media.methods,w=function(t,e,n,r){var a=t[e];Object.defineProperty(t,e,{get:function(){return n.apply(t,[a])},set:function(e){return a=r.apply(t,[e])}})},_=function(e){if("src"!==e){var t=""+e.substring(0,1).toUpperCase()+e.substring(1),n=function(){return void 0!==f.mediaElement.renderer&&null!==f.mediaElement.renderer&&"function"==typeof f.mediaElement.renderer["get"+t]?f.mediaElement.renderer["get"+t]():null},r=function(e){void 0!==f.mediaElement.renderer&&null!==f.mediaElement.renderer&&"function"==typeof f.mediaElement.renderer["set"+t]&&f.mediaElement.renderer["set"+t](e)};w(f.mediaElement,e,n,r),f.mediaElement["get"+t]=n,f.mediaElement["set"+t]=r}},S=function(){return void 0!==f.mediaElement.renderer&&null!==f.mediaElement.renderer?f.mediaElement.renderer.getSrc():null},N=function(e){var t=[];if("string"==typeof e)t.push({src:e,type:e?(0,U.getTypeFromFile)(e):""});else if("object"===(void 0===e?"undefined":L(e))&&void 0!==e.src){var n=(0,U.absolutizeUrl)(e.src),r=e.type,a=Object.assign(e,{src:n,type:""!==r&&null!=r||!n?r:(0,U.getTypeFromFile)(n)});t.push(a)}else if(Array.isArray(e))for(var i=0,o=e.length;i<o;i++){var l=(0,U.absolutizeUrl)(e[i].src),s=e[i].type,d=Object.assign(e[i],{src:l,type:""!==s&&null!=s||!l?s:(0,U.getTypeFromFile)(l)});t.push(d)}var u=M.renderer.select(t,f.mediaElement.options.renderers.length?f.mediaElement.options.renderers:[]),c=void 0;if(f.mediaElement.paused||null==f.mediaElement.src||""===f.mediaElement.src||(f.mediaElement.pause(),c=(0,k.createEvent)("pause",f.mediaElement),f.mediaElement.dispatchEvent(c)),f.mediaElement.originalNode.src=t[0].src||"",null!==u||!t[0].src)return!(null==t[0].src||""===t[0].src)?f.mediaElement.changeRenderer(u.rendererName,t):null;f.mediaElement.generateError("No renderer found",t)},j=function(e,t){try{if("play"!==e||"native_dash"!==f.mediaElement.rendererName&&"native_hls"!==f.mediaElement.rendererName&&"vimeo_iframe"!==f.mediaElement.rendererName)f.mediaElement.renderer[e](t);else{var n=f.mediaElement.renderer[e](t);n&&"function"==typeof n.then&&n.catch(function(){f.mediaElement.paused&&setTimeout(function(){var e=f.mediaElement.renderer.play();void 0!==e&&e.catch(function(){f.mediaElement.renderer.paused||f.mediaElement.renderer.pause()})},150)})}}catch(e){f.mediaElement.generateError(e,s)}},A=function(r){f.mediaElement[r]=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return void 0!==f.mediaElement.renderer&&null!==f.mediaElement.renderer&&"function"==typeof f.mediaElement.renderer[r]&&(f.mediaElement.promises.length?Promise.all(f.mediaElement.promises).then(function(){j(r,t)}).catch(function(e){f.mediaElement.generateError(e,s)}):j(r,t)),null}};w(f.mediaElement,"src",S,N),f.mediaElement.getSrc=S,f.mediaElement.setSrc=N;for(var T=0,F=E.length;T<F;T++)_(E[T]);for(var P=0,x=b.length;P<x;P++)A(b[P]);return f.mediaElement.addEventListener=function(e,t){f.mediaElement.events[e]=f.mediaElement.events[e]||[],f.mediaElement.events[e].push(t)},f.mediaElement.removeEventListener=function(e,t){if(!e)return f.mediaElement.events={},!0;var n=f.mediaElement.events[e];if(!n)return!0;if(!t)return f.mediaElement.events[e]=[],!0;for(var r=0;r<n.length;r++)if(n[r]===t)return f.mediaElement.events[e].splice(r,1),!0;return!1},f.mediaElement.dispatchEvent=function(e){var t=f.mediaElement.events[e.type];if(t)for(var n=0;n<t.length;n++)t[n].apply(null,[e])},f.mediaElement.destroy=function(){var e=f.mediaElement.originalNode.cloneNode(!0),t=f.mediaElement.parentElement;e.removeAttribute("id"),e.remove(),f.mediaElement.remove(),t.appendChild(e)},s.length&&(f.mediaElement.src=s),f.mediaElement.promises.length?Promise.all(f.mediaElement.promises).then(function(){f.mediaElement.options.success&&f.mediaElement.options.success(f.mediaElement,f.mediaElement.originalNode)}).catch(function(){i&&f.mediaElement.options.error&&f.mediaElement.options.error(f.mediaElement,f.mediaElement.originalNode)}):(f.mediaElement.options.success&&f.mediaElement.options.success(f.mediaElement,f.mediaElement.originalNode),i&&f.mediaElement.options.error&&f.mediaElement.options.error(f.mediaElement,f.mediaElement.originalNode)),f.mediaElement};O.default.MediaElement=a,I.default.MediaElement=a,n.default=a},{16:16,18:18,19:19,2:2,3:3,7:7,8:8}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,a=e(3);var i={version:"4.2.17",html5media:{properties:["volume","src","currentTime","muted","duration","paused","ended","buffered","error","networkState","readyState","seeking","seekable","currentSrc","preload","bufferedBytes","bufferedTime","initialTime","startOffsetTime","defaultPlaybackRate","playbackRate","played","autoplay","loop","controls"],readOnlyProperties:["duration","paused","ended","buffered","error","networkState","readyState","seeking","seekable"],methods:["load","play","pause","canPlayType"],events:["loadstart","durationchange","loadedmetadata","loadeddata","progress","canplay","canplaythrough","suspend","abort","error","emptied","stalled","play","playing","pause","waiting","seeking","seeked","timeupdate","ended","ratechange","volumechange"],mediaTypes:["audio/mp3","audio/ogg","audio/oga","audio/wav","audio/x-wav","audio/wave","audio/x-pn-wav","audio/mpeg","audio/mp4","video/mp4","video/webm","video/ogg","video/ogv"]}};((r=a)&&r.__esModule?r:{default:r}).default.mejs=i,n.default=i},{3:3}],8:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.renderer=void 0;var r,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),o=e(7),l=(r=o)&&r.__esModule?r:{default:r};var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.renderers={},this.order=[]}return i(e,[{key:"add",value:function(e){if(void 0===e.name)throw new TypeError("renderer must contain at least `name` property");this.renderers[e.name]=e,this.order.push(e.name)}},{key:"select",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],n=t.length;if(t=t.length?t:this.order,!n){var r=[/^(html5|native)/i,/^flash/i,/iframe$/i],a=function(e){for(var t=0,n=r.length;t<n;t++)if(r[t].test(e))return t;return r.length};t.sort(function(e,t){return a(e)-a(t)})}for(var i=0,o=t.length;i<o;i++){var l=t[i],s=this.renderers[l];if(null!=s)for(var d=0,u=e.length;d<u;d++)if("function"==typeof s.canPlayType&&"string"==typeof e[d].type&&s.canPlayType(e[d].type))return{rendererName:s.name,src:e[d].src}}return null}},{key:"order",set:function(e){if(!Array.isArray(e))throw new TypeError("order must be an array of strings.");this._order=e},get:function(){return this._order}},{key:"renderers",set:function(e){if(null!==e&&"object"!==(void 0===e?"undefined":a(e)))throw new TypeError("renderers must be an array of objects.");this._renderers=e},get:function(){return this._renderers}}]),e}(),d=n.renderer=new s;l.default.Renderers=d},{7:7}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.EN={"mejs.plural-form":1,"mejs.download-file":"Download File","mejs.install-flash":"You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/","mejs.fullscreen":"Fullscreen","mejs.play":"Play","mejs.pause":"Pause","mejs.time-slider":"Time Slider","mejs.time-help-text":"Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.","mejs.live-broadcast":"Live Broadcast","mejs.volume-help-text":"Use Up/Down Arrow keys to increase or decrease volume.","mejs.unmute":"Unmute","mejs.mute":"Mute","mejs.volume-slider":"Volume Slider","mejs.video-player":"Video Player","mejs.audio-player":"Audio Player","mejs.captions-subtitles":"Captions/Subtitles","mejs.captions-chapters":"Chapters","mejs.none":"None","mejs.afrikaans":"Afrikaans","mejs.albanian":"Albanian","mejs.arabic":"Arabic","mejs.belarusian":"Belarusian","mejs.bulgarian":"Bulgarian","mejs.catalan":"Catalan","mejs.chinese":"Chinese","mejs.chinese-simplified":"Chinese (Simplified)","mejs.chinese-traditional":"Chinese (Traditional)","mejs.croatian":"Croatian","mejs.czech":"Czech","mejs.danish":"Danish","mejs.dutch":"Dutch","mejs.english":"English","mejs.estonian":"Estonian","mejs.filipino":"Filipino","mejs.finnish":"Finnish","mejs.french":"French","mejs.galician":"Galician","mejs.german":"German","mejs.greek":"Greek","mejs.haitian-creole":"Haitian Creole","mejs.hebrew":"Hebrew","mejs.hindi":"Hindi","mejs.hungarian":"Hungarian","mejs.icelandic":"Icelandic","mejs.indonesian":"Indonesian","mejs.irish":"Irish","mejs.italian":"Italian","mejs.japanese":"Japanese","mejs.korean":"Korean","mejs.latvian":"Latvian","mejs.lithuanian":"Lithuanian","mejs.macedonian":"Macedonian","mejs.malay":"Malay","mejs.maltese":"Maltese","mejs.norwegian":"Norwegian","mejs.persian":"Persian","mejs.polish":"Polish","mejs.portuguese":"Portuguese","mejs.romanian":"Romanian","mejs.russian":"Russian","mejs.serbian":"Serbian","mejs.slovak":"Slovak","mejs.slovenian":"Slovenian","mejs.spanish":"Spanish","mejs.swahili":"Swahili","mejs.swedish":"Swedish","mejs.tagalog":"Tagalog","mejs.thai":"Thai","mejs.turkish":"Turkish","mejs.ukrainian":"Ukrainian","mejs.vietnamese":"Vietnamese","mejs.welsh":"Welsh","mejs.yiddish":"Yiddish"}},{}],10:[function(e,t,n){"use strict";var b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w=o(e(3)),_=o(e(7)),S=e(8),N=e(18),r=e(19),a=e(16),i=e(17);function o(e){return e&&e.__esModule?e:{default:e}}var j={promise:null,load:function(e){return"undefined"!=typeof dashjs?j.promise=new Promise(function(e){e()}).then(function(){j._createPlayer(e)}):(e.options.path="string"==typeof e.options.path?e.options.path:"https://cdn.dashjs.org/latest/dash.all.min.js",j.promise=j.promise||(0,i.loadScript)(e.options.path),j.promise.then(function(){j._createPlayer(e)})),j.promise},_createPlayer:function(e){var t=dashjs.MediaPlayer().create();return w.default["__ready__"+e.id](t),t}},l={name:"native_dash",options:{prefix:"native_dash",dash:{path:"https://cdn.dashjs.org/latest/dash.all.min.js",debug:!1,drm:{},robustnessLevel:""}},canPlayType:function(e){return a.HAS_MSE&&-1<["application/dash+xml"].indexOf(e.toLowerCase())},create:function(l,s,e){var t=l.originalNode,i=l.id+"_"+s.prefix,o=t.autoplay,n=t.children,d=null,u=null;t.removeAttribute("type");for(var r=0,a=n.length;r<a;r++)n[r].removeAttribute("type");d=t.cloneNode(!0),s=Object.assign(s,l.options);for(var c=_.default.html5media.properties,f=_.default.html5media.events.concat(["click","mouseover","mouseout"]).filter(function(e){return"error"!==e}),m=function(e){var t=(0,N.createEvent)(e.type,l);l.dispatchEvent(t)},p=function(a){var e=""+a.substring(0,1).toUpperCase()+a.substring(1);d["get"+e]=function(){return null!==u?d[a]:null},d["set"+e]=function(e){if(-1===_.default.html5media.readOnlyProperties.indexOf(a))if("src"===a){var t="object"===(void 0===e?"undefined":b(e))&&e.src?e.src:e;if(d[a]=t,null!==u){u.reset();for(var n=0,r=f.length;n<r;n++)d.removeEventListener(f[n],m);u=j._createPlayer({options:s.dash,id:i}),e&&"object"===(void 0===e?"undefined":b(e))&&"object"===b(e.drm)&&(u.setProtectionData(e.drm),(0,N.isString)(s.dash.robustnessLevel)&&s.dash.robustnessLevel&&u.getProtectionController().setRobustnessLevel(s.dash.robustnessLevel)),u.attachSource(t),o&&u.play()}}else d[a]=e}},h=0,v=c.length;h<v;h++)p(c[h]);if(w.default["__ready__"+i]=function(e){l.dashPlayer=u=e;for(var t,n=dashjs.MediaPlayer.events,r=0,a=f.length;r<a;r++)"loadedmetadata"===(t=f[r])&&(u.initialize(),u.attachView(d),u.setAutoPlay(!1),"object"!==b(s.dash.drm)||_.default.Utils.isObjectEmpty(s.dash.drm)||(u.setProtectionData(s.dash.drm),(0,N.isString)(s.dash.robustnessLevel)&&s.dash.robustnessLevel&&u.getProtectionController().setRobustnessLevel(s.dash.robustnessLevel)),u.attachSource(d.getSrc())),d.addEventListener(t,m);var i=function(e){if("error"===e.type.toLowerCase())l.generateError(e.message,d.src),console.error(e);else{var t=(0,N.createEvent)(e.type,l);t.data=e,l.dispatchEvent(t)}};for(var o in n)n.hasOwnProperty(o)&&u.on(n[o],function(e){return i(e)})},e&&0<e.length)for(var g=0,y=e.length;g<y;g++)if(S.renderer.renderers[s.prefix].canPlayType(e[g].type)){d.setAttribute("src",e[g].src),void 0!==e[g].drm&&(s.dash.drm=e[g].drm);break}d.setAttribute("id",i),t.parentNode.insertBefore(d,t),t.autoplay=!1,t.style.display="none",d.setSize=function(e,t){return d.style.width=e+"px",d.style.height=t+"px",d},d.hide=function(){return d.pause(),d.style.display="none",d},d.show=function(){return d.style.display="",d},d.destroy=function(){null!==u&&u.reset()};var E=(0,N.createEvent)("rendererready",d);return l.dispatchEvent(E),l.promises.push(j.load({options:s.dash,id:i})),d}};r.typeChecks.push(function(e){return~e.toLowerCase().indexOf(".mpd")?"application/dash+xml":null}),S.renderer.add(l)},{16:16,17:17,18:18,19:19,3:3,7:7,8:8}],11:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PluginDetector=void 0;var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A=r(e(3)),T=r(e(2)),F=r(e(7)),P=r(e(5)),x=e(8),L=e(18),O=e(16),C=e(19);function r(e){return e&&e.__esModule?e:{default:e}}var i=n.PluginDetector={plugins:[],hasPluginVersion:function(e,t){var n=i.plugins[e];return t[1]=t[1]||0,t[2]=t[2]||0,n[0]>t[0]||n[0]===t[0]&&n[1]>t[1]||n[0]===t[0]&&n[1]===t[1]&&n[2]>=t[2]},addPlugin:function(e,t,n,r,a){i.plugins[e]=i.detectPlugin(t,n,r,a)},detectPlugin:function(e,t,n,r){var a=[0,0,0],i=void 0,o=void 0;if(null!==O.NAV.plugins&&void 0!==O.NAV.plugins&&"object"===d(O.NAV.plugins[e])){if((i=O.NAV.plugins[e].description)&&(void 0===O.NAV.mimeTypes||!O.NAV.mimeTypes[t]||O.NAV.mimeTypes[t].enabledPlugin))for(var l=0,s=(a=i.replace(e,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".")).length;l<s;l++)a[l]=parseInt(a[l].match(/\d+/),10)}else if(void 0!==A.default.ActiveXObject)try{(o=new ActiveXObject(n))&&(a=r(o))}catch(e){}return a}};i.addPlugin("flash","Shockwave Flash","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash",function(e){var t=[],n=e.GetVariable("$version");return n&&(n=n.split(" ")[1].split(","),t=[parseInt(n[0],10),parseInt(n[1],10),parseInt(n[2],10)]),t});var a={create:function(e,t,n){var i={},r=!1;i.options=t,i.id=e.id+"_"+i.options.prefix,i.mediaElement=e,i.flashState={},i.flashApi=null,i.flashApiStack=[];for(var a=F.default.html5media.properties,o=function(t){i.flashState[t]=null;var e=""+t.substring(0,1).toUpperCase()+t.substring(1);i["get"+e]=function(){if(null!==i.flashApi){if("function"==typeof i.flashApi["get_"+t]){var e=i.flashApi["get_"+t]();return"buffered"===t?{start:function(){return 0},end:function(){return e},length:1}:e}return null}return null},i["set"+e]=function(e){if("src"===t&&(e=(0,C.absolutizeUrl)(e)),null!==i.flashApi&&void 0!==i.flashApi["set_"+t])try{i.flashApi["set_"+t](e)}catch(e){}else i.flashApiStack.push({type:"set",propName:t,value:e})}},l=0,s=a.length;l<s;l++)o(a[l]);var d=F.default.html5media.methods,u=function(e){i[e]=function(){if(r)if(null!==i.flashApi){if(i.flashApi["fire_"+e])try{i.flashApi["fire_"+e]()}catch(e){}}else i.flashApiStack.push({type:"call",methodName:e})}};d.push("stop");for(var c=0,f=d.length;c<f;c++)u(d[c]);for(var m=["rendererready"],p=0,h=m.length;p<h;p++){var v=(0,L.createEvent)(m[p],i);e.dispatchEvent(v)}A.default["__ready__"+i.id]=function(){if(i.flashReady=!0,i.flashApi=T.default.getElementById("__"+i.id),i.flashApiStack.length)for(var e=0,t=i.flashApiStack.length;e<t;e++){var n=i.flashApiStack[e];if("set"===n.type){var r=n.propName,a=""+r.substring(0,1).toUpperCase()+r.substring(1);i["set"+a](n.value)}else"call"===n.type&&i[n.methodName]()}},A.default["__event__"+i.id]=function(e,t){var n=(0,L.createEvent)(e,i);if(t)try{n.data=JSON.parse(t),n.details.data=JSON.parse(t)}catch(e){n.message=t}i.mediaElement.dispatchEvent(n)},i.flashWrapper=T.default.createElement("div"),-1===["always","sameDomain"].indexOf(i.options.shimScriptAccess)&&(i.options.shimScriptAccess="sameDomain");var g=e.originalNode.autoplay,y=["uid="+i.id,"autoplay="+g,"allowScriptAccess="+i.options.shimScriptAccess,"preload="+(e.originalNode.getAttribute("preload")||"")],E=null!==e.originalNode&&"video"===e.originalNode.tagName.toLowerCase(),b=E?e.originalNode.height:1,w=E?e.originalNode.width:1;e.originalNode.getAttribute("src")&&y.push("src="+e.originalNode.getAttribute("src")),!0===i.options.enablePseudoStreaming&&(y.push("pseudostreamstart="+i.options.pseudoStreamingStartQueryParam),y.push("pseudostreamtype="+i.options.pseudoStreamingType)),i.options.streamDelimiter&&y.push("streamdelimiter="+encodeURIComponent(i.options.streamDelimiter)),i.options.proxyType&&y.push("proxytype="+i.options.proxyType),e.appendChild(i.flashWrapper),e.originalNode.style.display="none";var _=[];if(O.IS_IE||O.IS_EDGE){var S=T.default.createElement("div");i.flashWrapper.appendChild(S),_=O.IS_EDGE?['type="application/x-shockwave-flash"','data="'+i.options.pluginPath+i.options.filename+'"','id="__'+i.id+'"','width="'+w+'"','height="'+b+"'\""]:['classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"','codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"','id="__'+i.id+'"','width="'+w+'"','height="'+b+'"'],E||_.push('style="clip: rect(0 0 0 0); position: absolute;"'),S.outerHTML="<object "+_.join(" ")+'><param name="movie" value="'+i.options.pluginPath+i.options.filename+"?x="+new Date+'" /><param name="flashvars" value="'+y.join("&amp;")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="'+i.options.shimScriptAccess+'" /><param name="allowFullScreen" value="true" /><div>'+P.default.t("mejs.install-flash")+"</div></object>"}else _=['id="__'+i.id+'"','name="__'+i.id+'"','play="true"','loop="false"','quality="high"','bgcolor="#000000"','wmode="transparent"','allowScriptAccess="'+i.options.shimScriptAccess+'"','allowFullScreen="true"','type="application/x-shockwave-flash"','pluginspage="//www.macromedia.com/go/getflashplayer"','src="'+i.options.pluginPath+i.options.filename+'"','flashvars="'+y.join("&")+'"'],E?(_.push('width="'+w+'"'),_.push('height="'+b+'"')):_.push('style="position: fixed; left: -9999em; top: -9999em;"'),i.flashWrapper.innerHTML="<embed "+_.join(" ")+">";if(i.flashNode=i.flashWrapper.lastChild,i.hide=function(){r=!1,E&&(i.flashNode.style.display="none")},i.show=function(){r=!0,E&&(i.flashNode.style.display="")},i.setSize=function(e,t){i.flashNode.style.width=e+"px",i.flashNode.style.height=t+"px",null!==i.flashApi&&"function"==typeof i.flashApi.fire_setSize&&i.flashApi.fire_setSize(e,t)},i.destroy=function(){i.flashNode.remove()},n&&0<n.length)for(var N=0,j=n.length;N<j;N++)if(x.renderer.renderers[t.prefix].canPlayType(n[N].type)){i.setSrc(n[N].src);break}return i}};if(i.hasPluginVersion("flash",[10,0,0])){C.typeChecks.push(function(e){return(e=e.toLowerCase()).startsWith("rtmp")?~e.indexOf(".mp3")?"audio/rtmp":"video/rtmp":/\.og(a|g)/i.test(e)?"audio/ogg":~e.indexOf(".m3u8")?"application/x-mpegURL":~e.indexOf(".mpd")?"application/dash+xml":~e.indexOf(".flv")?"video/flv":null});var o={name:"flash_video",options:{prefix:"flash_video",filename:"mediaelement-flash-video.swf",enablePseudoStreaming:!1,pseudoStreamingStartQueryParam:"start",pseudoStreamingType:"byte",proxyType:"",streamDelimiter:""},canPlayType:function(e){return~["video/mp4","video/rtmp","audio/rtmp","rtmp/mp4","audio/mp4","video/flv","video/x-flv"].indexOf(e.toLowerCase())},create:a.create};x.renderer.add(o);var l={name:"flash_hls",options:{prefix:"flash_hls",filename:"mediaelement-flash-video-hls.swf"},canPlayType:function(e){return~["application/x-mpegurl","application/vnd.apple.mpegurl","audio/mpegurl","audio/hls","video/hls"].indexOf(e.toLowerCase())},create:a.create};x.renderer.add(l);var s={name:"flash_dash",options:{prefix:"flash_dash",filename:"mediaelement-flash-video-mdash.swf"},canPlayType:function(e){return~["application/dash+xml"].indexOf(e.toLowerCase())},create:a.create};x.renderer.add(s);var u={name:"flash_audio",options:{prefix:"flash_audio",filename:"mediaelement-flash-audio.swf"},canPlayType:function(e){return~["audio/mp3"].indexOf(e.toLowerCase())},create:a.create};x.renderer.add(u);var c={name:"flash_audio_ogg",options:{prefix:"flash_audio_ogg",filename:"mediaelement-flash-audio-ogg.swf"},canPlayType:function(e){return~["audio/ogg","audio/oga","audio/ogv"].indexOf(e.toLowerCase())},create:a.create};x.renderer.add(c)}},{16:16,18:18,19:19,2:2,3:3,5:5,7:7,8:8}],12:[function(e,t,n){"use strict";var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E=o(e(3)),b=o(e(7)),w=e(8),_=e(18),r=e(16),a=e(19),i=e(17);function o(e){return e&&e.__esModule?e:{default:e}}var S={promise:null,load:function(e){return"undefined"!=typeof flvjs?S.promise=new Promise(function(e){e()}).then(function(){S._createPlayer(e)}):(e.options.path="string"==typeof e.options.path?e.options.path:"https://cdn.jsdelivr.net/npm/flv.js@latest",S.promise=S.promise||(0,i.loadScript)(e.options.path),S.promise.then(function(){S._createPlayer(e)})),S.promise},_createPlayer:function(e){flvjs.LoggingControl.enableDebug=e.options.debug,flvjs.LoggingControl.enableVerbose=e.options.debug;var t=flvjs.createPlayer(e.options,e.configs);return E.default["__ready__"+e.id](t),t}},l={name:"native_flv",options:{prefix:"native_flv",flv:{path:"https://cdn.jsdelivr.net/npm/flv.js@latest",cors:!0,debug:!1}},canPlayType:function(e){return r.HAS_MSE&&-1<["video/x-flv","video/flv"].indexOf(e.toLowerCase())},create:function(l,o,e){var t=l.originalNode,s=l.id+"_"+o.prefix,d=null,u=null;d=t.cloneNode(!0),o=Object.assign(o,l.options);for(var n=b.default.html5media.properties,c=b.default.html5media.events.concat(["click","mouseover","mouseout"]).filter(function(e){return"error"!==e}),f=function(e){var t=(0,_.createEvent)(e.type,l);l.dispatchEvent(t)},r=function(i){var e=""+i.substring(0,1).toUpperCase()+i.substring(1);d["get"+e]=function(){return null!==u?d[i]:null},d["set"+e]=function(e){if(-1===b.default.html5media.readOnlyProperties.indexOf(i))if("src"===i){if(d[i]="object"===(void 0===e?"undefined":y(e))&&e.src?e.src:e,null!==u){var t={type:"flv"};t.url=e,t.cors=o.flv.cors,t.debug=o.flv.debug,t.path=o.flv.path;var n=o.flv.configs;u.destroy();for(var r=0,a=c.length;r<a;r++)d.removeEventListener(c[r],f);(u=S._createPlayer({options:t,configs:n,id:s})).attachMediaElement(d),u.load()}}else d[i]=e}},a=0,i=n.length;a<i;a++)r(n[a]);if(E.default["__ready__"+s]=function(e){l.flvPlayer=u=e;for(var t,a=flvjs.Events,n=0,r=c.length;n<r;n++)"loadedmetadata"===(t=c[n])&&(u.unload(),u.detachMediaElement(),u.attachMediaElement(d),u.load()),d.addEventListener(t,f);var i=function(r){a.hasOwnProperty(r)&&u.on(a[r],function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t){if("error"===e){var n=t[0]+": "+t[1]+" "+t[2].msg;l.generateError(n,d.src)}else{var r=(0,_.createEvent)(e,l);r.data=t,l.dispatchEvent(r)}}(a[r],t)})};for(var o in a)i(o)},e&&0<e.length)for(var m=0,p=e.length;m<p;m++)if(w.renderer.renderers[o.prefix].canPlayType(e[m].type)){d.setAttribute("src",e[m].src);break}d.setAttribute("id",s),t.parentNode.insertBefore(d,t),t.autoplay=!1,t.style.display="none";var h={type:"flv"};h.url=d.src,h.cors=o.flv.cors,h.debug=o.flv.debug,h.path=o.flv.path;var v=o.flv.configs;d.setSize=function(e,t){return d.style.width=e+"px",d.style.height=t+"px",d},d.hide=function(){return null!==u&&u.pause(),d.style.display="none",d},d.show=function(){return d.style.display="",d},d.destroy=function(){null!==u&&u.destroy()};var g=(0,_.createEvent)("rendererready",d);return l.dispatchEvent(g),l.promises.push(S.load({options:h,configs:v,id:s})),d}};a.typeChecks.push(function(e){return~e.toLowerCase().indexOf(".flv")?"video/flv":null}),w.renderer.add(l)},{16:16,17:17,18:18,19:19,3:3,7:7,8:8}],13:[function(e,t,n){"use strict";var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E=o(e(3)),b=o(e(7)),w=e(8),_=e(18),r=e(16),a=e(19),i=e(17);function o(e){return e&&e.__esModule?e:{default:e}}var S={promise:null,load:function(e){return"undefined"!=typeof Hls?S.promise=new Promise(function(e){e()}).then(function(){S._createPlayer(e)}):(e.options.path="string"==typeof e.options.path?e.options.path:"https://cdn.jsdelivr.net/npm/hls.js@latest",S.promise=S.promise||(0,i.loadScript)(e.options.path),S.promise.then(function(){S._createPlayer(e)})),S.promise},_createPlayer:function(e){var t=new Hls(e.options);return E.default["__ready__"+e.id](t),t}},l={name:"native_hls",options:{prefix:"native_hls",hls:{path:"https://cdn.jsdelivr.net/npm/hls.js@latest",autoStartLoad:!1,debug:!1}},canPlayType:function(e){return r.HAS_MSE&&-1<["application/x-mpegurl","application/vnd.apple.mpegurl","audio/mpegurl","audio/hls","video/hls"].indexOf(e.toLowerCase())},create:function(d,a,u){var e=d.originalNode,i=d.id+"_"+a.prefix,t=e.getAttribute("preload"),n=e.autoplay,c=null,f=null,m=0,p=u.length;f=e.cloneNode(!0),(a=Object.assign(a,d.options)).hls.autoStartLoad=t&&"none"!==t||n;for(var r=b.default.html5media.properties,h=b.default.html5media.events.concat(["click","mouseover","mouseout"]).filter(function(e){return"error"!==e}),v=function(e){var t=(0,_.createEvent)(e.type,d);d.dispatchEvent(t)},o=function(r){var e=""+r.substring(0,1).toUpperCase()+r.substring(1);f["get"+e]=function(){return null!==c?f[r]:null},f["set"+e]=function(e){if(-1===b.default.html5media.readOnlyProperties.indexOf(r))if("src"===r){if(f[r]="object"===(void 0===e?"undefined":y(e))&&e.src?e.src:e,null!==c){c.destroy();for(var t=0,n=h.length;t<n;t++)f.removeEventListener(h[t],v);(c=S._createPlayer({options:a.hls,id:i})).loadSource(e),c.attachMedia(f)}}else f[r]=e}},l=0,s=r.length;l<s;l++)o(r[l]);if(E.default["__ready__"+i]=function(e){d.hlsPlayer=c=e;for(var a=Hls.Events,t=function(e){if("loadedmetadata"===e){var t=d.originalNode.src;c.detachMedia(),c.loadSource(t),c.attachMedia(f)}f.addEventListener(e,v)},n=0,r=h.length;n<r;n++)t(h[n]);var l=void 0,s=void 0,i=function(r){a.hasOwnProperty(r)&&c.on(a[r],function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t){if("hlsError"===e&&(console.warn(t),(t=t[1]).fatal))switch(t.type){case"mediaError":var n=(new Date).getTime();if(!l||3e3<n-l)l=(new Date).getTime(),c.recoverMediaError();else if(!s||3e3<n-s)s=(new Date).getTime(),console.warn("Attempting to swap Audio Codec and recover from media error"),c.swapAudioCodec(),c.recoverMediaError();else{var r="Cannot recover, last media error recovery failed";d.generateError(r,f.src),console.error(r)}break;case"networkError":if("manifestLoadError"===t.details)if(m<p&&void 0!==u[m+1])f.setSrc(u[m++].src),f.load(),f.play();else{var a="Network error";d.generateError(a,u),console.error(a)}else{var i="Network error";d.generateError(i,u),console.error(i)}break;default:c.destroy()}else{var o=(0,_.createEvent)(e,d);o.data=t,d.dispatchEvent(o)}}(a[r],t)})};for(var o in a)i(o)},0<p)for(;m<p;m++)if(w.renderer.renderers[a.prefix].canPlayType(u[m].type)){f.setAttribute("src",u[m].src);break}"auto"===t||n||(f.addEventListener("play",function(){null!==c&&c.startLoad()}),f.addEventListener("pause",function(){null!==c&&c.stopLoad()})),f.setAttribute("id",i),e.parentNode.insertBefore(f,e),e.autoplay=!1,e.style.display="none",f.setSize=function(e,t){return f.style.width=e+"px",f.style.height=t+"px",f},f.hide=function(){return f.pause(),f.style.display="none",f},f.show=function(){return f.style.display="",f},f.destroy=function(){null!==c&&(c.stopLoad(),c.destroy())};var g=(0,_.createEvent)("rendererready",f);return d.dispatchEvent(g),d.promises.push(S.load({options:a.hls,id:i})),f}};a.typeChecks.push(function(e){return~e.toLowerCase().indexOf(".m3u8")?"application/x-mpegURL":null}),w.renderer.add(l)},{16:16,17:17,18:18,19:19,3:3,7:7,8:8}],14:[function(e,t,n){"use strict";var r=i(e(3)),g=i(e(2)),y=i(e(7)),E=e(8),b=e(18),a=e(16);function i(e){return e&&e.__esModule?e:{default:e}}var o={name:"html5",options:{prefix:"html5"},canPlayType:function(e){var t=g.default.createElement("video");return a.IS_ANDROID&&/\/mp(3|4)$/i.test(e)||~["application/x-mpegurl","vnd.apple.mpegurl","audio/mpegurl","audio/hls","video/hls"].indexOf(e.toLowerCase())&&a.SUPPORTS_NATIVE_HLS?"yes":t.canPlayType?t.canPlayType(e.toLowerCase()).replace(/no/,""):""},create:function(n,e,t){var r=n.id+"_"+e.prefix,a=!1,i=null;void 0===n.originalNode||null===n.originalNode?(i=g.default.createElement("audio"),n.appendChild(i)):i=n.originalNode,i.setAttribute("id",r);for(var o=y.default.html5media.properties,l=function(t){var e=""+t.substring(0,1).toUpperCase()+t.substring(1);i["get"+e]=function(){return i[t]},i["set"+e]=function(e){-1===y.default.html5media.readOnlyProperties.indexOf(t)&&(i[t]=e)}},s=0,d=o.length;s<d;s++)l(o[s]);for(var u,c=y.default.html5media.events.concat(["click","mouseover","mouseout"]).filter(function(e){return"error"!==e}),f=0,m=c.length;f<m;f++)u=c[f],i.addEventListener(u,function(e){if(a){var t=(0,b.createEvent)(e.type,e.target);n.dispatchEvent(t)}});i.setSize=function(e,t){return i.style.width=e+"px",i.style.height=t+"px",i},i.hide=function(){return a=!1,i.style.display="none",i},i.show=function(){return a=!0,i.style.display="",i};var p=0,h=t.length;if(0<h)for(;p<h;p++)if(E.renderer.renderers[e.prefix].canPlayType(t[p].type)){i.setAttribute("src",t[p].src);break}i.addEventListener("error",function(e){e&&e.target&&e.target.error&&4===e.target.error.code&&a&&(p<h&&void 0!==t[p+1]?(i.src=t[p++].src,i.load(),i.play()):n.generateError("Media error: Format(s) not supported or source(s) not found",t))});var v=(0,b.createEvent)("rendererready",i);return n.dispatchEvent(v),i}};r.default.HtmlMediaElement=y.default.HtmlMediaElement=o,E.renderer.add(o)},{16:16,18:18,2:2,3:3,7:7,8:8}],15:[function(e,t,n){"use strict";var S=o(e(3)),N=o(e(2)),j=o(e(7)),r=e(8),A=e(18),a=e(19),i=e(17);function o(e){return e&&e.__esModule?e:{default:e}}var T={isIframeStarted:!1,isIframeLoaded:!1,iframeQueue:[],enqueueIframe:function(e){T.isLoaded="undefined"!=typeof YT&&YT.loaded,T.isLoaded?T.createIframe(e):(T.loadIframeApi(),T.iframeQueue.push(e))},loadIframeApi:function(){T.isIframeStarted||((0,i.loadScript)("https://www.youtube.com/player_api"),T.isIframeStarted=!0)},iFrameReady:function(){for(T.isLoaded=!0,T.isIframeLoaded=!0;0<T.iframeQueue.length;){var e=T.iframeQueue.pop();T.createIframe(e)}},createIframe:function(e){return new YT.Player(e.containerId,e)},getYouTubeId:function(e){var t="";return 0<e.indexOf("?")?""===(t=T.getYouTubeIdFromParam(e))&&(t=T.getYouTubeIdFromUrl(e)):t=T.getYouTubeIdFromUrl(e),(t=t.substring(t.lastIndexOf("/")+1).split("?"))[0]},getYouTubeIdFromParam:function(e){if(null==e||!e.trim().length)return null;for(var t=e.split("?")[1].split("&"),n="",r=0,a=t.length;r<a;r++){var i=t[r].split("=");if("v"===i[0]){n=i[1];break}}return n},getYouTubeIdFromUrl:function(e){return null!=e&&e.trim().length?(e=e.split("?")[0]).substring(e.lastIndexOf("/")+1):null},getYouTubeNoCookieUrl:function(e){if(null==e||!e.trim().length||-1===e.indexOf("//www.youtube"))return e;var t=e.split("/");return t[2]=t[2].replace(".com","-nocookie.com"),t.join("/")}},l={name:"youtube_iframe",options:{prefix:"youtube_iframe",youtube:{autoplay:0,controls:0,disablekb:1,end:0,loop:0,modestbranding:0,playsinline:0,rel:0,showinfo:0,start:0,iv_load_policy:3,nocookie:!1,imageQuality:null}},canPlayType:function(e){return~["video/youtube","video/x-youtube"].indexOf(e.toLowerCase())},create:function(p,n,r){var h={},v=[],g=null,i=!0,o=!1,y=null;h.options=n,h.id=p.id+"_"+n.prefix,h.mediaElement=p;for(var e=j.default.html5media.properties,t=function(a){var e=""+a.substring(0,1).toUpperCase()+a.substring(1);h["get"+e]=function(){if(null!==g){switch(a){case"currentTime":return g.getCurrentTime();case"duration":return g.getDuration();case"volume":return g.getVolume()/100;case"playbackRate":return g.getPlaybackRate();case"paused":return i;case"ended":return o;case"muted":return g.isMuted();case"buffered":var e=g.getVideoLoadedFraction(),t=g.getDuration();return{start:function(){return 0},end:function(){return e*t},length:1};case"src":return g.getVideoUrl();case"readyState":return 4}return null}return null},h["set"+e]=function(e){if(null!==g)switch(a){case"src":var t="string"==typeof e?e:e[0].src,n=T.getYouTubeId(t);p.originalNode.autoplay?g.loadVideoById(n):g.cueVideoById(n);break;case"currentTime":g.seekTo(e);break;case"muted":e?g.mute():g.unMute(),setTimeout(function(){var e=(0,A.createEvent)("volumechange",h);p.dispatchEvent(e)},50);break;case"volume":e,g.setVolume(100*e),setTimeout(function(){var e=(0,A.createEvent)("volumechange",h);p.dispatchEvent(e)},50);break;case"playbackRate":g.setPlaybackRate(e),setTimeout(function(){var e=(0,A.createEvent)("ratechange",h);p.dispatchEvent(e)},50);break;case"readyState":var r=(0,A.createEvent)("canplay",h);p.dispatchEvent(r)}else v.push({type:"set",propName:a,value:e})}},a=0,l=e.length;a<l;a++)t(e[a]);for(var s=j.default.html5media.methods,d=function(e){h[e]=function(){if(null!==g)switch(e){case"play":return i=!1,g.playVideo();case"pause":return i=!0,g.pauseVideo();case"load":return null}else v.push({type:"call",methodName:e})}},u=0,c=s.length;u<c;u++)d(s[u]);var f=N.default.createElement("div");f.id=h.id,h.options.youtube.nocookie&&(p.originalNode.src=T.getYouTubeNoCookieUrl(r[0].src)),p.originalNode.parentNode.insertBefore(f,p.originalNode),p.originalNode.style.display="none";var m="audio"===p.originalNode.tagName.toLowerCase(),E=m?"1":p.originalNode.height,b=m?"1":p.originalNode.width,w=T.getYouTubeId(r[0].src),_={id:h.id,containerId:f.id,videoId:w,height:E,width:b,host:h.options.youtube&&h.options.youtube.nocookie?"https://www.youtube-nocookie.com":void 0,playerVars:Object.assign({controls:0,rel:0,disablekb:1,showinfo:0,modestbranding:0,html5:1,iv_load_policy:3},h.options.youtube),origin:S.default.location.host,events:{onReady:function(e){if(p.youTubeApi=g=e.target,p.youTubeState={paused:!0,ended:!1},v.length)for(var t=0,n=v.length;t<n;t++){var r=v[t];if("set"===r.type){var a=r.propName,i=""+a.substring(0,1).toUpperCase()+a.substring(1);h["set"+i](r.value)}else"call"===r.type&&h[r.methodName]()}y=g.getIframe(),p.originalNode.muted&&g.mute();for(var o=["mouseover","mouseout"],l=function(e){var t=(0,A.createEvent)(e.type,h);p.dispatchEvent(t)},s=0,d=o.length;s<d;s++)y.addEventListener(o[s],l,!1);for(var u=["rendererready","loadedmetadata","loadeddata","canplay"],c=0,f=u.length;c<f;c++){var m=(0,A.createEvent)(u[c],h);p.dispatchEvent(m)}},onStateChange:function(e){var t=[];switch(e.data){case-1:t=["loadedmetadata"],i=!0,o=!1;break;case 0:t=["ended"],i=!1,o=!h.options.youtube.loop,h.options.youtube.loop||h.stopInterval();break;case 1:t=["play","playing"],o=i=!1,h.startInterval();break;case 2:t=["pause"],i=!0,o=!1,h.stopInterval();break;case 3:t=["progress"],o=!1;break;case 5:t=["loadeddata","loadedmetadata","canplay"],i=!0,o=!1}for(var n=0,r=t.length;n<r;n++){var a=(0,A.createEvent)(t[n],h);p.dispatchEvent(a)}},onError:function(e){return function(e){var t="";switch(e.data){case 2:t="The request contains an invalid parameter value. Verify that video ID has 11 characters and that contains no invalid characters, such as exclamation points or asterisks.";break;case 5:t="The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.";break;case 100:t="The video requested was not found. Either video has been removed or has been marked as private.";break;case 101:case 105:t="The owner of the requested video does not allow it to be played in embedded players.";break;default:t="Unknown error."}p.generateError("Code "+e.data+": "+t,r)}(e)}}};return(m||p.originalNode.hasAttribute("playsinline"))&&(_.playerVars.playsinline=1),p.originalNode.controls&&(_.playerVars.controls=1),p.originalNode.autoplay&&(_.playerVars.autoplay=1),p.originalNode.loop&&(_.playerVars.loop=1),(_.playerVars.loop&&1===parseInt(_.playerVars.loop,10)||-1<p.originalNode.src.indexOf("loop="))&&!_.playerVars.playlist&&-1===p.originalNode.src.indexOf("playlist=")&&(_.playerVars.playlist=T.getYouTubeId(p.originalNode.src)),T.enqueueIframe(_),h.onEvent=function(e,t,n){null!=n&&(p.youTubeState=n)},h.setSize=function(e,t){null!==g&&g.setSize(e,t)},h.hide=function(){h.stopInterval(),h.pause(),y&&(y.style.display="none")},h.show=function(){y&&(y.style.display="")},h.destroy=function(){g.destroy()},h.interval=null,h.startInterval=function(){h.interval=setInterval(function(){var e=(0,A.createEvent)("timeupdate",h);p.dispatchEvent(e)},250)},h.stopInterval=function(){h.interval&&clearInterval(h.interval)},h.getPosterUrl=function(){var e=n.youtube.imageQuality,t=T.getYouTubeId(p.originalNode.src);return e&&-1<["default","hqdefault","mqdefault","sddefault","maxresdefault"].indexOf(e)&&t?"https://img.youtube.com/vi/"+t+"/"+e+".jpg":""},h}};S.default.onYouTubePlayerAPIReady=function(){T.iFrameReady()},a.typeChecks.push(function(e){return/\/\/(www\.youtube|youtu\.?be)/i.test(e)?"video/x-youtube":null}),r.renderer.add(l)},{17:17,18:18,19:19,2:2,3:3,7:7,8:8}],16:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.cancelFullScreen=n.requestFullScreen=n.isFullScreen=n.FULLSCREEN_EVENT_NAME=n.HAS_NATIVE_FULLSCREEN_ENABLED=n.HAS_TRUE_NATIVE_FULLSCREEN=n.HAS_IOS_FULLSCREEN=n.HAS_MS_NATIVE_FULLSCREEN=n.HAS_MOZ_NATIVE_FULLSCREEN=n.HAS_WEBKIT_NATIVE_FULLSCREEN=n.HAS_NATIVE_FULLSCREEN=n.SUPPORTS_NATIVE_HLS=n.SUPPORT_PASSIVE_EVENT=n.SUPPORT_POINTER_EVENTS=n.HAS_MSE=n.IS_STOCK_ANDROID=n.IS_SAFARI=n.IS_FIREFOX=n.IS_CHROME=n.IS_EDGE=n.IS_IE=n.IS_ANDROID=n.IS_IOS=n.IS_IPOD=n.IS_IPHONE=n.IS_IPAD=n.UA=n.NAV=void 0;var a=o(e(3)),i=o(e(2)),r=o(e(7));function o(e){return e&&e.__esModule?e:{default:e}}for(var l=n.NAV=a.default.navigator,s=n.UA=l.userAgent.toLowerCase(),d=n.IS_IPAD=/ipad/i.test(s)&&!a.default.MSStream,u=n.IS_IPHONE=/iphone/i.test(s)&&!a.default.MSStream,c=n.IS_IPOD=/ipod/i.test(s)&&!a.default.MSStream,f=(n.IS_IOS=/ipad|iphone|ipod/i.test(s)&&!a.default.MSStream,n.IS_ANDROID=/android/i.test(s)),m=n.IS_IE=/(trident|microsoft)/i.test(l.appName),p=(n.IS_EDGE="msLaunchUri"in l&&!("documentMode"in i.default)),h=n.IS_CHROME=/chrome/i.test(s),v=n.IS_FIREFOX=/firefox/i.test(s),g=n.IS_SAFARI=/safari/i.test(s)&&!h,y=n.IS_STOCK_ANDROID=/^mozilla\/\d+\.\d+\s\(linux;\su;/i.test(s),E=(n.HAS_MSE="MediaSource"in a.default),b=n.SUPPORT_POINTER_EVENTS=function(){var e=i.default.createElement("x"),t=i.default.documentElement,n=a.default.getComputedStyle;if(!("pointerEvents"in e.style))return!1;e.style.pointerEvents="auto",e.style.pointerEvents="x",t.appendChild(e);var r=n&&"auto"===(n(e,"")||{}).pointerEvents;return e.remove(),!!r}(),w=n.SUPPORT_PASSIVE_EVENT=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});a.default.addEventListener("test",null,t)}catch(e){}return e}(),_=["source","track","audio","video"],S=void 0,N=0,j=_.length;N<j;N++)S=i.default.createElement(_[N]);var A=n.SUPPORTS_NATIVE_HLS=g||m&&/edge/i.test(s),T=void 0!==S.webkitEnterFullscreen,F=void 0!==S.requestFullscreen;T&&/mac os x 10_5/i.test(s)&&(T=F=!1);var P=void 0!==S.webkitRequestFullScreen,x=void 0!==S.mozRequestFullScreen,L=void 0!==S.msRequestFullscreen,O=P||x||L,C=O,I="",k=void 0,U=void 0,M=void 0;x?C=i.default.mozFullScreenEnabled:L&&(C=i.default.msFullscreenEnabled),h&&(T=!1),O&&(P?I="webkitfullscreenchange":x?I="fullscreenchange":L&&(I="MSFullscreenChange"),n.isFullScreen=k=function(){return x?i.default.mozFullScreen:P?i.default.webkitIsFullScreen:L?null!==i.default.msFullscreenElement:void 0},n.requestFullScreen=U=function(e){P?e.webkitRequestFullScreen():x?e.mozRequestFullScreen():L&&e.msRequestFullscreen()},n.cancelFullScreen=M=function(){P?i.default.webkitCancelFullScreen():x?i.default.mozCancelFullScreen():L&&i.default.msExitFullscreen()});var R=n.HAS_NATIVE_FULLSCREEN=F,V=n.HAS_WEBKIT_NATIVE_FULLSCREEN=P,D=n.HAS_MOZ_NATIVE_FULLSCREEN=x,H=n.HAS_MS_NATIVE_FULLSCREEN=L,q=n.HAS_IOS_FULLSCREEN=T,z=n.HAS_TRUE_NATIVE_FULLSCREEN=O,B=n.HAS_NATIVE_FULLSCREEN_ENABLED=C,Y=n.FULLSCREEN_EVENT_NAME=I;n.isFullScreen=k,n.requestFullScreen=U,n.cancelFullScreen=M,r.default.Features=r.default.Features||{},r.default.Features.isiPad=d,r.default.Features.isiPod=c,r.default.Features.isiPhone=u,r.default.Features.isiOS=r.default.Features.isiPhone||r.default.Features.isiPad,r.default.Features.isAndroid=f,r.default.Features.isIE=m,r.default.Features.isEdge=p,r.default.Features.isChrome=h,r.default.Features.isFirefox=v,r.default.Features.isSafari=g,r.default.Features.isStockAndroid=y,r.default.Features.hasMSE=E,r.default.Features.supportsNativeHLS=A,r.default.Features.supportsPointerEvents=b,r.default.Features.supportsPassiveEvent=w,r.default.Features.hasiOSFullScreen=q,r.default.Features.hasNativeFullscreen=R,r.default.Features.hasWebkitNativeFullScreen=V,r.default.Features.hasMozNativeFullScreen=D,r.default.Features.hasMsNativeFullScreen=H,r.default.Features.hasTrueNativeFullScreen=z,r.default.Features.nativeFullScreenEnabled=B,r.default.Features.fullScreenEventName=Y,r.default.Features.isFullScreen=k,r.default.Features.requestFullScreen=U,r.default.Features.cancelFullScreen=M},{2:2,3:3,7:7}],17:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.removeClass=n.addClass=n.hasClass=void 0,n.loadScript=o,n.offset=l,n.toggleClass=h,n.fadeOut=v,n.fadeIn=g,n.siblings=y,n.visible=E,n.ajax=b;var s=i(e(3)),a=i(e(2)),r=i(e(7));function i(e){return e&&e.__esModule?e:{default:e}}function o(r){return new Promise(function(e,t){var n=a.default.createElement("script");n.src=r,n.async=!0,n.onload=function(){n.remove(),e()},n.onerror=function(){n.remove(),t()},a.default.head.appendChild(n)})}function l(e){var t=e.getBoundingClientRect(),n=s.default.pageXOffset||a.default.documentElement.scrollLeft,r=s.default.pageYOffset||a.default.documentElement.scrollTop;return{top:t.top+r,left:t.left+n}}var d=void 0,u=void 0,c=void 0;"classList"in a.default.documentElement?(d=function(e,t){return void 0!==e.classList&&e.classList.contains(t)},u=function(e,t){return e.classList.add(t)},c=function(e,t){return e.classList.remove(t)}):(d=function(e,t){return new RegExp("\\b"+t+"\\b").test(e.className)},u=function(e,t){f(e,t)||(e.className+=" "+t)},c=function(e,t){e.className=e.className.replace(new RegExp("\\b"+t+"\\b","g"),"")});var f=n.hasClass=d,m=n.addClass=u,p=n.removeClass=c;function h(e,t){f(e,t)?p(e,t):m(e,t)}function v(a){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:400,o=arguments[2];a.style.opacity||(a.style.opacity=1);var l=null;s.default.requestAnimationFrame(function e(t){var n=t-(l=l||t),r=parseFloat(1-n/i,2);a.style.opacity=r<0?0:r,i<n?o&&"function"==typeof o&&o():s.default.requestAnimationFrame(e)})}function g(a){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:400,o=arguments[2];a.style.opacity||(a.style.opacity=0);var l=null;s.default.requestAnimationFrame(function e(t){var n=t-(l=l||t),r=parseFloat(n/i,2);a.style.opacity=1<r?1:r,i<n?o&&"function"==typeof o&&o():s.default.requestAnimationFrame(e)})}function y(e,t){var n=[];for(e=e.parentNode.firstChild;t&&!t(e)||n.push(e),e=e.nextSibling;);return n}function E(e){return void 0!==e.getClientRects&&"function"===e.getClientRects?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!(!e.offsetWidth&&!e.offsetHeight)}function b(e,t,n,r){var a=s.default.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),i="application/x-www-form-urlencoded; charset=UTF-8",o=!1,l="*/".concat("*");switch(t){case"text":i="text/plain";break;case"json":i="application/json, text/javascript";break;case"html":i="text/html";break;case"xml":i="application/xml, text/xml"}"application/x-www-form-urlencoded"!==i&&(l=i+", */*; q=0.01"),a&&(a.open("GET",e,!0),a.setRequestHeader("Accept",l),a.onreadystatechange=function(){if(!o&&4===a.readyState)if(200===a.status){o=!0;var e=void 0;switch(t){case"json":e=JSON.parse(a.responseText);break;case"xml":e=a.responseXML;break;default:e=a.responseText}n(e)}else"function"==typeof r&&r(a.status)},a.send())}r.default.Utils=r.default.Utils||{},r.default.Utils.offset=l,r.default.Utils.hasClass=f,r.default.Utils.addClass=m,r.default.Utils.removeClass=p,r.default.Utils.toggleClass=h,r.default.Utils.fadeIn=g,r.default.Utils.fadeOut=v,r.default.Utils.siblings=y,r.default.Utils.visible=E,r.default.Utils.ajax=b,r.default.Utils.loadScript=o},{2:2,3:3,7:7}],18:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.escapeHTML=o,n.debounce=l,n.isObjectEmpty=s,n.splitEvents=d,n.createEvent=u,n.isNodeAfter=c,n.isString=f;var r,a=e(7),i=(r=a)&&r.__esModule?r:{default:r};function o(e){if("string"!=typeof e)throw new Error("Argument passed must be a string");var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};return e.replace(/[&<>"]/g,function(e){return t[e]})}function l(r,a){var i=this,o=arguments,l=2<arguments.length&&void 0!==arguments[2]&&arguments[2];if("function"!=typeof r)throw new Error("First argument must be a function");if("number"!=typeof a)throw new Error("Second argument must be a numeric value");var s=void 0;return function(){var e=i,t=o,n=l&&!s;clearTimeout(s),s=setTimeout(function(){s=null,l||r.apply(e,t)},a),n&&r.apply(e,t)}}function s(e){return Object.getOwnPropertyNames(e).length<=0}function d(e,n){var r=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/,a={d:[],w:[]};return(e||"").split(" ").forEach(function(e){var t=e+(n?"."+n:"");t.startsWith(".")?(a.d.push(t),a.w.push(t)):a[r.test(e)?"w":"d"].push(t)}),a.d=a.d.join(" "),a.w=a.w.join(" "),a}function u(e,t){if("string"!=typeof e)throw new Error("Event name must be a string");var n=e.match(/([a-z]+\.([a-z]+))/i),r={target:t};return null!==n&&(e=n[1],r.namespace=n[2]),new window.CustomEvent(e,{detail:r})}function c(e,t){return!!(e&&t&&2&e.compareDocumentPosition(t))}function f(e){return"string"==typeof e}i.default.Utils=i.default.Utils||{},i.default.Utils.escapeHTML=o,i.default.Utils.debounce=l,i.default.Utils.isObjectEmpty=s,i.default.Utils.splitEvents=d,i.default.Utils.createEvent=u,i.default.Utils.isNodeAfter=c,i.default.Utils.isString=f},{7:7}],19:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.typeChecks=void 0,n.absolutizeUrl=s,n.formatType=d,n.getMimeFromType=u,n.getTypeFromFile=c,n.getExtension=f,n.normalizeExtension=m;var r,a=e(7),i=(r=a)&&r.__esModule?r:{default:r},o=e(18);var l=n.typeChecks=[];function s(e){if("string"!=typeof e)throw new Error("`url` argument must be a string");var t=document.createElement("div");return t.innerHTML='<a href="'+(0,o.escapeHTML)(e)+'">x</a>',t.firstChild.href}function d(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";return e&&!t?c(e):t}function u(e){if("string"!=typeof e)throw new Error("`type` argument must be a string");return e&&-1<e.indexOf(";")?e.substr(0,e.indexOf(";")):e}function c(e){if("string"!=typeof e)throw new Error("`url` argument must be a string");for(var t=0,n=l.length;t<n;t++){var r=l[t](e);if(r)return r}var a=m(f(e)),i="video/mp4";return a&&(~["mp4","m4v","ogg","ogv","webm","flv","mpeg"].indexOf(a)?i="video/"+a:"mov"===a?i="video/quicktime":~["mp3","oga","wav","mid","midi"].indexOf(a)&&(i="audio/"+a)),i}function f(e){if("string"!=typeof e)throw new Error("`url` argument must be a string");var t=e.split("?")[0].split("\\").pop().split("/").pop();return~t.indexOf(".")?t.substring(t.lastIndexOf(".")+1):""}function m(e){if("string"!=typeof e)throw new Error("`extension` argument must be a string");switch(e){case"mp4":case"m4v":return"mp4";case"webm":case"webma":case"webmv":return"webm";case"ogg":case"oga":case"ogv":return"ogg";default:return e}}i.default.Utils=i.default.Utils||{},i.default.Utils.typeChecks=l,i.default.Utils.absolutizeUrl=s,i.default.Utils.formatType=d,i.default.Utils.getMimeFromType=u,i.default.Utils.getTypeFromFile=c,i.default.Utils.getExtension=f,i.default.Utils.normalizeExtension=m},{18:18,7:7}],20:[function(e,t,n){"use strict";var r,a=o(e(2)),i=o(e(4));function o(e){return e&&e.__esModule?e:{default:e}}if([Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach(function(e){e.hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode.removeChild(this)}})}),function(){if("function"==typeof window.CustomEvent)return;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=a.default.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e}(),"function"!=typeof Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1,r=arguments.length;n<r;n++){var a=arguments[n];if(null!==a)for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(t[i]=a[i])}return t}),String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length-1;0<=--n&&t.item(n)!==this;);return-1<n}),window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(e){var t=(this.document||this.ownerDocument).querySelectorAll(e),n=void 0,r=this;do{for(n=t.length;0<=--n&&t.item(n)!==r;);}while(n<0&&(r=r.parentElement));return r}),function(){for(var a=0,e=["ms","moz","webkit","o"],t=0;t<e.length&&!window.requestAnimationFrame;++t)window.requestAnimationFrame=window[e[t]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[t]+"CancelAnimationFrame"]||window[e[t]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-a)),r=window.setTimeout(function(){e(t+n)},n);return a=t+n,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)})}(),/firefox/i.test(navigator.userAgent)){var l=window.getComputedStyle;window.getComputedStyle=function(e,t){var n=l(e,t);return null===n?{getPropertyValue:function(){}}:n}}window.Promise||(window.Promise=i.default),(r=window.Node||window.Element)&&r.prototype&&null===r.prototype.children&&Object.defineProperty(r.prototype,"children",{get:function(){for(var e=0,t=void 0,n=this.childNodes,r=[];t=n[e++];)1===t.nodeType&&r.push(t);return r}})},{2:2,4:4}]},{},[20,6,5,9,14,11,10,12,13,15]);                                                                                                                                                                                                                                                                                                          mediaelement/mediaelementplayer-legacy.css                                                          0000644                 00000036616 15212564044 0015036 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /* Accessibility: hide screen reader texts (and prefer "top" for RTL languages).
Reference: http://blog.rrwd.nl/2015/04/04/the-screen-reader-text-class-why-and-how/ */
.mejs-offscreen {
    border: 0;
    clip: rect( 1px, 1px, 1px, 1px );
    -webkit-clip-path: inset( 50% );
            clip-path: inset( 50% );
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal;
}

.mejs-container {
    background: #000;
    box-sizing: border-box;
    font-family: 'Helvetica', Arial, serif;
    position: relative;
    text-align: left;
    text-indent: 0;
    vertical-align: top;
}

.mejs-container * {
    box-sizing: border-box;
}

/* Hide native play button and control bar from iOS to favor plugin button */
.mejs-container video::-webkit-media-controls,
.mejs-container video::-webkit-media-controls-panel,
.mejs-container video::-webkit-media-controls-panel-container,
.mejs-container video::-webkit-media-controls-start-playback-button {
    -webkit-appearance: none;
    display: none !important;
}

.mejs-fill-container,
.mejs-fill-container .mejs-container {
    height: 100%;
    width: 100%;
}

.mejs-fill-container {
    background: transparent;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

.mejs-container:focus {
    outline: none;
}

.mejs-iframe-overlay {
    height: 100%;
    position: absolute;
    width: 100%;
}

.mejs-embed,
.mejs-embed body {
    background: #000;
    height: 100%;
    margin: 0;
    overflow: hidden;
    padding: 0;
    width: 100%;
}

.mejs-fullscreen {
    overflow: hidden !important;
}

.mejs-container-fullscreen {
    bottom: 0;
    left: 0;
    overflow: hidden;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1000;
}

.mejs-container-fullscreen .mejs-mediaelement,
.mejs-container-fullscreen video {
    height: 100% !important;
    width: 100% !important;
}

/* Start: LAYERS */
.mejs-background {
    left: 0;
    position: absolute;
    top: 0;
}

.mejs-mediaelement {
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 0;
}

.mejs-poster {
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-size: cover;
    left: 0;
    position: absolute;
    top: 0;
    z-index: 1;
}

:root .mejs-poster-img {
    display: none;
}

.mejs-poster-img {
    border: 0;
    padding: 0;
}

.mejs-overlay {
    -webkit-box-align: center;
    -webkit-align-items: center;
        -ms-flex-align: center;
            align-items: center;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
        -ms-flex-pack: center;
            justify-content: center;
    left: 0;
    position: absolute;
    top: 0;
}

.mejs-layer {
    z-index: 1;
}

.mejs-overlay-play {
    cursor: pointer;
}

.mejs-overlay-button {
    background: url('mejs-controls.svg') no-repeat;
    background-position: 0 -39px;
    height: 80px;
    width: 80px;
}

.mejs-overlay:hover > .mejs-overlay-button {
    background-position: -80px -39px;
}

.mejs-overlay-loading {
    height: 80px;
    width: 80px;
}

.mejs-overlay-loading-bg-img {
    -webkit-animation: mejs-loading-spinner 1s linear infinite;
            animation: mejs-loading-spinner 1s linear infinite;
    background: transparent url('mejs-controls.svg') -160px -40px no-repeat;
    display: block;
    height: 80px;
    width: 80px;
    z-index: 1;
}

@-webkit-keyframes mejs-loading-spinner {
    100% {
        -webkit-transform: rotate(360deg);
                transform: rotate(360deg);
    }
}

@keyframes mejs-loading-spinner {
    100% {
        -webkit-transform: rotate(360deg);
                transform: rotate(360deg);
    }
}

/* End: LAYERS */

/* Start: CONTROL BAR */
.mejs-controls {
    bottom: 0;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    height: 40px;
    left: 0;
    list-style-type: none;
    margin: 0;
    padding: 0 10px;
    position: absolute;
    width: 100%;
    z-index: 3;
}

.mejs-controls:not([style*='display: none']) {
    background: rgba(255, 0, 0, 0.7);
    background: -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.35));
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.35));
}

.mejs-button,
.mejs-time,
.mejs-time-rail {
    font-size: 10px;
    height: 40px;
    line-height: 10px;
    margin: 0;
    width: 32px;
}

.mejs-button > button {
    background: transparent url('mejs-controls.svg');
    border: 0;
    cursor: pointer;
    display: block;
    font-size: 0;
    height: 20px;
    line-height: 0;
    margin: 10px 6px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    text-decoration: none;
    width: 20px;
}

/* :focus for accessibility */
.mejs-button > button:focus {
    outline: dotted 1px #999;
}

.mejs-container-keyboard-inactive a,
.mejs-container-keyboard-inactive a:focus,
.mejs-container-keyboard-inactive button,
.mejs-container-keyboard-inactive button:focus,
.mejs-container-keyboard-inactive [role=slider],
.mejs-container-keyboard-inactive [role=slider]:focus {
    outline: 0;
}

/* End: CONTROL BAR */

/* Start: Time (Current / Duration) */
.mejs-time {
    box-sizing: content-box;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    height: 24px;
    overflow: hidden;
    padding: 16px 6px 0;
    text-align: center;
    width: auto;
}

/* End: Time (Current / Duration) */

/* Start: Play/Pause/Stop */
.mejs-play > button {
    background-position: 0 0;
}

.mejs-pause > button {
    background-position: -20px 0;
}

.mejs-replay > button {
    background-position: -160px 0;
}

/* End: Play/Pause/Stop */

/* Start: Progress Bar */
.mejs-time-rail {
    direction: ltr;
    -webkit-box-flex: 1;
    -webkit-flex-grow: 1;
        -ms-flex-positive: 1;
            flex-grow: 1;
    height: 40px;
    margin: 0 10px;
    padding-top: 10px;
    position: relative;
}

.mejs-time-total,
.mejs-time-buffering,
.mejs-time-loaded,
.mejs-time-current,
.mejs-time-float,
.mejs-time-hovered,
.mejs-time-float-current,
.mejs-time-float-corner,
.mejs-time-marker {
    border-radius: 2px;
    cursor: pointer;
    display: block;
    height: 10px;
    position: absolute;
}

.mejs-time-total {
    background: rgba(255, 255, 255, 0.3);
    margin: 5px 0 0;
    width: 100%;
}

.mejs-time-buffering {
    -webkit-animation: buffering-stripes 2s linear infinite;
            animation: buffering-stripes 2s linear infinite;
    background: -webkit-linear-gradient(135deg, rgba(255, 255, 255, 0.4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.4) 75%, transparent 75%, transparent);
    background: linear-gradient(-45deg, rgba(255, 255, 255, 0.4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.4) 75%, transparent 75%, transparent);
    background-size: 15px 15px;
    width: 100%;
}

@-webkit-keyframes buffering-stripes {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 30px 0;
    }
}

@keyframes buffering-stripes {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 30px 0;
    }
}

.mejs-time-loaded {
    background: rgba(255, 255, 255, 0.3);
}

.mejs-time-current,
.mejs-time-handle-content {
    background: rgba(255, 255, 255, 0.9);
}

.mejs-time-hovered {
    background: rgba(255, 255, 255, 0.5);
    z-index: 10;
}

.mejs-time-hovered.negative {
    background: rgba(0, 0, 0, 0.2);
}

.mejs-time-current,
.mejs-time-buffering,
.mejs-time-loaded,
.mejs-time-hovered {
    left: 0;
    -webkit-transform: scaleX(0);
        -ms-transform: scaleX(0);
            transform: scaleX(0);
    -webkit-transform-origin: 0 0;
        -ms-transform-origin: 0 0;
            transform-origin: 0 0;
    -webkit-transition: 0.15s ease-in all;
    transition: 0.15s ease-in all;
    width: 100%;
}

.mejs-time-buffering {
    -webkit-transform: scaleX(1);
        -ms-transform: scaleX(1);
            transform: scaleX(1);
}

.mejs-time-hovered {
    -webkit-transition: height 0.1s cubic-bezier(0.44, 0, 1, 1);
    transition: height 0.1s cubic-bezier(0.44, 0, 1, 1);
}

.mejs-time-hovered.no-hover {
    -webkit-transform: scaleX(0) !important;
        -ms-transform: scaleX(0) !important;
            transform: scaleX(0) !important;
}

.mejs-time-handle,
.mejs-time-handle-content {
    border: 4px solid transparent;
    cursor: pointer;
    left: 0;
    position: absolute;
    -webkit-transform: translateX(0);
        -ms-transform: translateX(0);
            transform: translateX(0);
    z-index: 11;
}

.mejs-time-handle-content {
    border: 4px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    height: 10px;
    left: -7px;
    top: -4px;
    -webkit-transform: scale(0);
        -ms-transform: scale(0);
            transform: scale(0);
    width: 10px;
}

.mejs-time-rail:hover .mejs-time-handle-content,
.mejs-time-rail .mejs-time-handle-content:focus,
.mejs-time-rail .mejs-time-handle-content:active {
    -webkit-transform: scale(1);
        -ms-transform: scale(1);
            transform: scale(1);
}

.mejs-time-float {
    background: #eee;
    border: solid 1px #333;
    bottom: 100%;
    color: #111;
    display: none;
    height: 17px;
    margin-bottom: 9px;
    position: absolute;
    text-align: center;
    -webkit-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
            transform: translateX(-50%);
    width: 36px;
}

.mejs-time-float-current {
    display: block;
    left: 0;
    margin: 2px;
    text-align: center;
    width: 30px;
}

.mejs-time-float-corner {
    border: solid 5px #eee;
    border-color: #eee transparent transparent;
    border-radius: 0;
    display: block;
    height: 0;
    left: 50%;
    line-height: 0;
    position: absolute;
    top: 100%;
    -webkit-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
            transform: translateX(-50%);
    width: 0;
}

.mejs-long-video .mejs-time-float {
    margin-left: -23px;
    width: 64px;
}

.mejs-long-video .mejs-time-float-current {
    width: 60px;
}

.mejs-broadcast {
    color: #fff;
    height: 10px;
    position: absolute;
    top: 15px;
    width: 100%;
}

/* End: Progress Bar */

/* Start: Fullscreen */
.mejs-fullscreen-button > button {
    background-position: -80px 0;
}

.mejs-unfullscreen > button {
    background-position: -100px 0;
}

/* End: Fullscreen */

/* Start: Mute/Volume */
.mejs-mute > button {
    background-position: -60px 0;
}

.mejs-unmute > button {
    background-position: -40px 0;
}

.mejs-volume-button {
    position: relative;
}

.mejs-volume-button > .mejs-volume-slider {
    -webkit-backface-visibility: hidden;
    background: rgba(50, 50, 50, 0.7);
    border-radius: 0;
    bottom: 100%;
    display: none;
    height: 115px;
    left: 50%;
    margin: 0;
    position: absolute;
    -webkit-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
            transform: translateX(-50%);
    width: 25px;
    z-index: 1;
}

.mejs-volume-button:hover {
    border-radius: 0 0 4px 4px;
}

.mejs-volume-total {
    background: rgba(255, 255, 255, 0.5);
    height: 100px;
    left: 50%;
    margin: 0;
    position: absolute;
    top: 8px;
    -webkit-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
            transform: translateX(-50%);
    width: 2px;
}

.mejs-volume-current {
    background: rgba(255, 255, 255, 0.9);
    left: 0;
    margin: 0;
    position: absolute;
    width: 100%;
}

.mejs-volume-handle {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 1px;
    cursor: ns-resize;
    height: 6px;
    left: 50%;
    position: absolute;
    -webkit-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
            transform: translateX(-50%);
    width: 16px;
}

.mejs-horizontal-volume-slider {
    display: block;
    height: 36px;
    position: relative;
    vertical-align: middle;
    width: 56px;
}

.mejs-horizontal-volume-total {
    background: rgba(50, 50, 50, 0.8);
    border-radius: 2px;
    font-size: 1px;
    height: 8px;
    left: 0;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 16px;
    width: 50px;
}

.mejs-horizontal-volume-current {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    font-size: 1px;
    height: 100%;
    left: 0;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 0;
    width: 100%;
}

.mejs-horizontal-volume-handle {
    display: none;
}

/* End: Mute/Volume */

/* Start: Track (Captions and Chapters) */
.mejs-captions-button,
.mejs-chapters-button {
    position: relative;
}

.mejs-captions-button > button {
    background-position: -140px 0;
}

.mejs-chapters-button > button {
    background-position: -180px 0;
}

.mejs-captions-button > .mejs-captions-selector,
.mejs-chapters-button > .mejs-chapters-selector {
    background: rgba(50, 50, 50, 0.7);
    border: solid 1px transparent;
    border-radius: 0;
    bottom: 100%;
    margin-right: -43px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    right: 50%;
    visibility: visible;
    width: 86px;
}

.mejs-chapters-button > .mejs-chapters-selector {
    margin-right: -55px;
    width: 110px;
}

.mejs-captions-selector-list,
.mejs-chapters-selector-list {
    list-style-type: none !important;
    margin: 0;
    overflow: hidden;
    padding: 0;
}

.mejs-captions-selector-list-item,
.mejs-chapters-selector-list-item {
    color: #fff;
    cursor: pointer;
    display: block;
    list-style-type: none !important;
    margin: 0 0 6px;
    overflow: hidden;
    padding: 0;
}

.mejs-captions-selector-list-item:hover,
.mejs-chapters-selector-list-item:hover {
    background-color: rgb(200, 200, 200) !important;
    background-color: rgba(255, 255, 255, 0.4) !important;
}

.mejs-captions-selector-input,
.mejs-chapters-selector-input {
    clear: both;
    float: left;
    left: -1000px;
    margin: 3px 3px 0 5px;
    position: absolute;
}

.mejs-captions-selector-label,
.mejs-chapters-selector-label {
    cursor: pointer;
    float: left;
    font-size: 10px;
    line-height: 15px;
    padding: 4px 10px 0;
    width: 100%;
}

.mejs-captions-selected,
.mejs-chapters-selected {
    color: rgba(33, 248, 248, 1);
}

.mejs-captions-translations {
    font-size: 10px;
    margin: 0 0 5px;
}

.mejs-captions-layer {
    bottom: 0;
    color: #fff;
    font-size: 16px;
    left: 0;
    line-height: 20px;
    position: absolute;
    text-align: center;
}

.mejs-captions-layer a {
    color: #fff;
    text-decoration: underline;
}

.mejs-captions-layer[lang=ar] {
    font-size: 20px;
    font-weight: normal;
}

.mejs-captions-position {
    bottom: 15px;
    left: 0;
    position: absolute;
    width: 100%;
}

.mejs-captions-position-hover {
    bottom: 35px;
}

.mejs-captions-text,
.mejs-captions-text * {
    background: rgba(20, 20, 20, 0.5);
    box-shadow: 5px 0 0 rgba(20, 20, 20, 0.5), -5px 0 0 rgba(20, 20, 20, 0.5);
    padding: 0;
    white-space: pre-wrap;
}

.mejs-container.mejs-hide-cues video::-webkit-media-text-track-container {
    display: none;
}

/* End: Track (Captions and Chapters) */

/* Start: Error */
.mejs-overlay-error {
    position: relative;
}
.mejs-overlay-error > img {
    left: 0;
    max-width: 100%;
    position: absolute;
    top: 0;
    z-index: -1;
}
.mejs-cannotplay,
.mejs-cannotplay a {
    color: #fff;
    font-size: 0.8em;
}

.mejs-cannotplay {
    position: relative;
}

.mejs-cannotplay p,
.mejs-cannotplay a {
    display: inline-block;
    padding: 0 15px;
    width: 100%;
}
/* End: Error */                                                                                                                  mediaelement/mediaelementplayer-legacy.min.css                                                      0000644                 00000025770 15212564044 0015617 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       .mejs-offscreen{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal}.mejs-container{background:#000;font-family:Helvetica,Arial,serif;position:relative;text-align:left;text-indent:0;vertical-align:top}.mejs-container,.mejs-container *{box-sizing:border-box}.mejs-container video::-webkit-media-controls,.mejs-container video::-webkit-media-controls-panel,.mejs-container video::-webkit-media-controls-panel-container,.mejs-container video::-webkit-media-controls-start-playback-button{-webkit-appearance:none;display:none!important}.mejs-fill-container,.mejs-fill-container .mejs-container{height:100%;width:100%}.mejs-fill-container{background:transparent;margin:0 auto;overflow:hidden;position:relative}.mejs-container:focus{outline:none}.mejs-iframe-overlay{height:100%;position:absolute;width:100%}.mejs-embed,.mejs-embed body{background:#000;height:100%;margin:0;overflow:hidden;padding:0;width:100%}.mejs-fullscreen{overflow:hidden!important}.mejs-container-fullscreen{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.mejs-container-fullscreen .mejs-mediaelement,.mejs-container-fullscreen video{height:100%!important;width:100%!important}.mejs-background,.mejs-mediaelement{left:0;position:absolute;top:0}.mejs-mediaelement{height:100%;width:100%;z-index:0}.mejs-poster{background-position:50% 50%;background-repeat:no-repeat;background-size:cover;left:0;position:absolute;top:0;z-index:1}:root .mejs-poster-img{display:none}.mejs-poster-img{border:0;padding:0}.mejs-overlay{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;left:0;position:absolute;top:0}.mejs-layer{z-index:1}.mejs-overlay-play{cursor:pointer}.mejs-overlay-button{background:url(mejs-controls.svg) no-repeat;background-position:0 -39px;height:80px;width:80px}.mejs-overlay:hover>.mejs-overlay-button{background-position:-80px -39px}.mejs-overlay-loading{height:80px;width:80px}.mejs-overlay-loading-bg-img{-webkit-animation:a 1s linear infinite;animation:a 1s linear infinite;background:transparent url(mejs-controls.svg) -160px -40px no-repeat;display:block;height:80px;width:80px;z-index:1}@-webkit-keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.mejs-controls{bottom:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:40px;left:0;list-style-type:none;margin:0;padding:0 10px;position:absolute;width:100%;z-index:3}.mejs-controls:not([style*="display: none"]){background:rgba(255,0,0,.7);background:-webkit-linear-gradient(transparent,rgba(0,0,0,.35));background:linear-gradient(transparent,rgba(0,0,0,.35))}.mejs-button,.mejs-time,.mejs-time-rail{font-size:10px;height:40px;line-height:10px;margin:0;width:32px}.mejs-button>button{background:transparent url(mejs-controls.svg);border:0;cursor:pointer;display:block;font-size:0;height:20px;line-height:0;margin:10px 6px;overflow:hidden;padding:0;position:absolute;text-decoration:none;width:20px}.mejs-button>button:focus{outline:1px dotted #999}.mejs-container-keyboard-inactive [role=slider],.mejs-container-keyboard-inactive [role=slider]:focus,.mejs-container-keyboard-inactive a,.mejs-container-keyboard-inactive a:focus,.mejs-container-keyboard-inactive button,.mejs-container-keyboard-inactive button:focus{outline:0}.mejs-time{box-sizing:content-box;color:#fff;font-size:11px;font-weight:700;height:24px;overflow:hidden;padding:16px 6px 0;text-align:center;width:auto}.mejs-play>button{background-position:0 0}.mejs-pause>button{background-position:-20px 0}.mejs-replay>button{background-position:-160px 0}.mejs-time-rail{direction:ltr;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;height:40px;margin:0 10px;padding-top:10px;position:relative}.mejs-time-buffering,.mejs-time-current,.mejs-time-float,.mejs-time-float-corner,.mejs-time-float-current,.mejs-time-hovered,.mejs-time-loaded,.mejs-time-marker,.mejs-time-total{border-radius:2px;cursor:pointer;display:block;height:10px;position:absolute}.mejs-time-total{background:hsla(0,0%,100%,.3);margin:5px 0 0;width:100%}.mejs-time-buffering{-webkit-animation:b 2s linear infinite;animation:b 2s linear infinite;background:-webkit-linear-gradient(135deg,hsla(0,0%,100%,.4) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.4) 0,hsla(0,0%,100%,.4) 75%,transparent 0,transparent);background:linear-gradient(-45deg,hsla(0,0%,100%,.4) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.4) 0,hsla(0,0%,100%,.4) 75%,transparent 0,transparent);background-size:15px 15px;width:100%}@-webkit-keyframes b{0%{background-position:0 0}to{background-position:30px 0}}@keyframes b{0%{background-position:0 0}to{background-position:30px 0}}.mejs-time-loaded{background:hsla(0,0%,100%,.3)}.mejs-time-current,.mejs-time-handle-content{background:hsla(0,0%,100%,.9)}.mejs-time-hovered{background:hsla(0,0%,100%,.5);z-index:10}.mejs-time-hovered.negative{background:rgba(0,0,0,.2)}.mejs-time-buffering,.mejs-time-current,.mejs-time-hovered,.mejs-time-loaded{left:0;-webkit-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;-webkit-transition:all .15s ease-in;transition:all .15s ease-in;width:100%}.mejs-time-buffering{-webkit-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1)}.mejs-time-hovered{-webkit-transition:height .1s cubic-bezier(.44,0,1,1);transition:height .1s cubic-bezier(.44,0,1,1)}.mejs-time-hovered.no-hover{-webkit-transform:scaleX(0)!important;-ms-transform:scaleX(0)!important;transform:scaleX(0)!important}.mejs-time-handle,.mejs-time-handle-content{border:4px solid transparent;cursor:pointer;left:0;position:absolute;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);z-index:11}.mejs-time-handle-content{border:4px solid hsla(0,0%,100%,.9);border-radius:50%;height:10px;left:-7px;top:-4px;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);width:10px}.mejs-time-rail .mejs-time-handle-content:active,.mejs-time-rail .mejs-time-handle-content:focus,.mejs-time-rail:hover .mejs-time-handle-content{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.mejs-time-float{background:#eee;border:1px solid #333;bottom:100%;color:#111;display:none;height:17px;margin-bottom:9px;position:absolute;text-align:center;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:36px}.mejs-time-float-current{display:block;left:0;margin:2px;text-align:center;width:30px}.mejs-time-float-corner{border:5px solid #eee;border-color:#eee transparent transparent;border-radius:0;display:block;height:0;left:50%;line-height:0;position:absolute;top:100%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:0}.mejs-long-video .mejs-time-float{margin-left:-23px;width:64px}.mejs-long-video .mejs-time-float-current{width:60px}.mejs-broadcast{color:#fff;height:10px;position:absolute;top:15px;width:100%}.mejs-fullscreen-button>button{background-position:-80px 0}.mejs-unfullscreen>button{background-position:-100px 0}.mejs-mute>button{background-position:-60px 0}.mejs-unmute>button{background-position:-40px 0}.mejs-volume-button{position:relative}.mejs-volume-button>.mejs-volume-slider{-webkit-backface-visibility:hidden;background:rgba(50,50,50,.7);border-radius:0;bottom:100%;display:none;height:115px;left:50%;margin:0;position:absolute;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:25px;z-index:1}.mejs-volume-button:hover{border-radius:0 0 4px 4px}.mejs-volume-total{background:hsla(0,0%,100%,.5);height:100px;left:50%;margin:0;position:absolute;top:8px;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:2px}.mejs-volume-current{left:0;margin:0;width:100%}.mejs-volume-current,.mejs-volume-handle{background:hsla(0,0%,100%,.9);position:absolute}.mejs-volume-handle{border-radius:1px;cursor:ns-resize;height:6px;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:16px}.mejs-horizontal-volume-slider{display:block;height:36px;position:relative;vertical-align:middle;width:56px}.mejs-horizontal-volume-total{background:rgba(50,50,50,.8);height:8px;top:16px;width:50px}.mejs-horizontal-volume-current,.mejs-horizontal-volume-total{border-radius:2px;font-size:1px;left:0;margin:0;padding:0;position:absolute}.mejs-horizontal-volume-current{background:hsla(0,0%,100%,.8);height:100%;top:0;width:100%}.mejs-horizontal-volume-handle{display:none}.mejs-captions-button,.mejs-chapters-button{position:relative}.mejs-captions-button>button{background-position:-140px 0}.mejs-chapters-button>button{background-position:-180px 0}.mejs-captions-button>.mejs-captions-selector,.mejs-chapters-button>.mejs-chapters-selector{background:rgba(50,50,50,.7);border:1px solid transparent;border-radius:0;bottom:100%;margin-right:-43px;overflow:hidden;padding:0;position:absolute;right:50%;visibility:visible;width:86px}.mejs-chapters-button>.mejs-chapters-selector{margin-right:-55px;width:110px}.mejs-captions-selector-list,.mejs-chapters-selector-list{list-style-type:none!important;margin:0;overflow:hidden;padding:0}.mejs-captions-selector-list-item,.mejs-chapters-selector-list-item{color:#fff;cursor:pointer;display:block;list-style-type:none!important;margin:0 0 6px;overflow:hidden;padding:0}.mejs-captions-selector-list-item:hover,.mejs-chapters-selector-list-item:hover{background-color:#c8c8c8!important;background-color:hsla(0,0%,100%,.4)!important}.mejs-captions-selector-input,.mejs-chapters-selector-input{clear:both;float:left;left:-1000px;margin:3px 3px 0 5px;position:absolute}.mejs-captions-selector-label,.mejs-chapters-selector-label{cursor:pointer;float:left;font-size:10px;line-height:15px;padding:4px 10px 0;width:100%}.mejs-captions-selected,.mejs-chapters-selected{color:#21f8f8}.mejs-captions-translations{font-size:10px;margin:0 0 5px}.mejs-captions-layer{bottom:0;color:#fff;font-size:16px;left:0;line-height:20px;position:absolute;text-align:center}.mejs-captions-layer a{color:#fff;text-decoration:underline}.mejs-captions-layer[lang=ar]{font-size:20px;font-weight:400}.mejs-captions-position{bottom:15px;left:0;position:absolute;width:100%}.mejs-captions-position-hover{bottom:35px}.mejs-captions-text,.mejs-captions-text *{background:hsla(0,0%,8%,.5);box-shadow:5px 0 0 hsla(0,0%,8%,.5),-5px 0 0 hsla(0,0%,8%,.5);padding:0;white-space:pre-wrap}.mejs-container.mejs-hide-cues video::-webkit-media-text-track-container{display:none}.mejs-overlay-error{position:relative}.mejs-overlay-error>img{left:0;max-width:100%;position:absolute;top:0;z-index:-1}.mejs-cannotplay,.mejs-cannotplay a{color:#fff;font-size:.8em}.mejs-cannotplay{position:relative}.mejs-cannotplay a,.mejs-cannotplay p{display:inline-block;padding:0 15px;width:100%}        mediaelement/mediaelementplayer.css                                                                 0000644                 00000037043 15212564044 0013567 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /* Accessibility: hide screen reader texts (and prefer "top" for RTL languages).
Reference: http://blog.rrwd.nl/2015/04/04/the-screen-reader-text-class-why-and-how/ */
.mejs__offscreen {
    border: 0;
    clip: rect( 1px, 1px, 1px, 1px );
    -webkit-clip-path: inset( 50% );
            clip-path: inset( 50% );
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal;
}

.mejs__container {
    background: #000;
    box-sizing: border-box;
    font-family: 'Helvetica', Arial, serif;
    position: relative;
    text-align: left;
    text-indent: 0;
    vertical-align: top;
}

.mejs__container * {
    box-sizing: border-box;
}

/* Hide native play button and control bar from iOS to favor plugin button */
.mejs__container video::-webkit-media-controls,
.mejs__container video::-webkit-media-controls-panel,
.mejs__container video::-webkit-media-controls-panel-container,
.mejs__container video::-webkit-media-controls-start-playback-button {
    -webkit-appearance: none;
    display: none !important;
}

.mejs__fill-container,
.mejs__fill-container .mejs__container {
    height: 100%;
    width: 100%;
}

.mejs__fill-container {
    background: transparent;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

.mejs__container:focus {
    outline: none;
}

.mejs__iframe-overlay {
    height: 100%;
    position: absolute;
    width: 100%;
}

.mejs__embed,
.mejs__embed body {
    background: #000;
    height: 100%;
    margin: 0;
    overflow: hidden;
    padding: 0;
    width: 100%;
}

.mejs__fullscreen {
    overflow: hidden !important;
}

.mejs__container-fullscreen {
    bottom: 0;
    left: 0;
    overflow: hidden;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1000;
}

.mejs__container-fullscreen .mejs__mediaelement,
.mejs__container-fullscreen video {
    height: 100% !important;
    width: 100% !important;
}

/* Start: LAYERS */
.mejs__background {
    left: 0;
    position: absolute;
    top: 0;
}

.mejs__mediaelement {
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 0;
}

.mejs__poster {
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-size: cover;
    left: 0;
    position: absolute;
    top: 0;
    z-index: 1;
}

:root .mejs__poster-img {
    display: none;
}

.mejs__poster-img {
    border: 0;
    padding: 0;
}

.mejs__overlay {
    -webkit-box-align: center;
    -webkit-align-items: center;
        -ms-flex-align: center;
            align-items: center;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
        -ms-flex-pack: center;
            justify-content: center;
    left: 0;
    position: absolute;
    top: 0;
}

.mejs__layer {
    z-index: 1;
}

.mejs__overlay-play {
    cursor: pointer;
}

.mejs__overlay-button {
    background: url('mejs-controls.svg') no-repeat;
    background-position: 0 -39px;
    height: 80px;
    width: 80px;
}

.mejs__overlay:hover > .mejs__overlay-button {
    background-position: -80px -39px;
}

.mejs__overlay-loading {
    height: 80px;
    width: 80px;
}

.mejs__overlay-loading-bg-img {
    -webkit-animation: mejs__loading-spinner 1s linear infinite;
            animation: mejs__loading-spinner 1s linear infinite;
    background: transparent url('mejs-controls.svg') -160px -40px no-repeat;
    display: block;
    height: 80px;
    width: 80px;
    z-index: 1;
}

@-webkit-keyframes mejs__loading-spinner {
    100% {
        -webkit-transform: rotate(360deg);
                transform: rotate(360deg);
    }
}

@keyframes mejs__loading-spinner {
    100% {
        -webkit-transform: rotate(360deg);
                transform: rotate(360deg);
    }
}

/* End: LAYERS */

/* Start: CONTROL BAR */
.mejs__controls {
    bottom: 0;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    height: 40px;
    left: 0;
    list-style-type: none;
    margin: 0;
    padding: 0 10px;
    position: absolute;
    width: 100%;
    z-index: 3;
}

.mejs__controls:not([style*='display: none']) {
    background: rgba(255, 0, 0, 0.7);
    background: -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.35));
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.35));
}

.mejs__button,
.mejs__time,
.mejs__time-rail {
    font-size: 10px;
    height: 40px;
    line-height: 10px;
    margin: 0;
    width: 32px;
}

.mejs__button > button {
    background: transparent url('mejs-controls.svg');
    border: 0;
    cursor: pointer;
    display: block;
    font-size: 0;
    height: 20px;
    line-height: 0;
    margin: 10px 6px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    text-decoration: none;
    width: 20px;
}

/* :focus for accessibility */
.mejs__button > button:focus {
    outline: dotted 1px #999;
}

.mejs__container-keyboard-inactive a,
.mejs__container-keyboard-inactive a:focus,
.mejs__container-keyboard-inactive button,
.mejs__container-keyboard-inactive button:focus,
.mejs__container-keyboard-inactive [role=slider],
.mejs__container-keyboard-inactive [role=slider]:focus {
    outline: 0;
}

/* End: CONTROL BAR */

/* Start: Time (Current / Duration) */
.mejs__time {
    box-sizing: content-box;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    height: 24px;
    overflow: hidden;
    padding: 16px 6px 0;
    text-align: center;
    width: auto;
}

/* End: Time (Current / Duration) */

/* Start: Play/Pause/Stop */
.mejs__play > button {
    background-position: 0 0;
}

.mejs__pause > button {
    background-position: -20px 0;
}

.mejs__replay > button {
    background-position: -160px 0;
}

/* End: Play/Pause/Stop */

/* Start: Progress Bar */
.mejs__time-rail {
    direction: ltr;
    -webkit-box-flex: 1;
    -webkit-flex-grow: 1;
        -ms-flex-positive: 1;
            flex-grow: 1;
    height: 40px;
    margin: 0 10px;
    padding-top: 10px;
    position: relative;
}

.mejs__time-total,
.mejs__time-buffering,
.mejs__time-loaded,
.mejs__time-current,
.mejs__time-float,
.mejs__time-hovered,
.mejs__time-float-current,
.mejs__time-float-corner,
.mejs__time-marker {
    border-radius: 2px;
    cursor: pointer;
    display: block;
    height: 10px;
    position: absolute;
}

.mejs__time-total {
    background: rgba(255, 255, 255, 0.3);
    margin: 5px 0 0;
    width: 100%;
}

.mejs__time-buffering {
    -webkit-animation: buffering-stripes 2s linear infinite;
            animation: buffering-stripes 2s linear infinite;
    background: -webkit-linear-gradient(135deg, rgba(255, 255, 255, 0.4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.4) 75%, transparent 75%, transparent);
    background: linear-gradient(-45deg, rgba(255, 255, 255, 0.4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.4) 75%, transparent 75%, transparent);
    background-size: 15px 15px;
    width: 100%;
}

@-webkit-keyframes buffering-stripes {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 30px 0;
    }
}

@keyframes buffering-stripes {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 30px 0;
    }
}

.mejs__time-loaded {
    background: rgba(255, 255, 255, 0.3);
}

.mejs__time-current,
.mejs__time-handle-content {
    background: rgba(255, 255, 255, 0.9);
}

.mejs__time-hovered {
    background: rgba(255, 255, 255, 0.5);
    z-index: 10;
}

.mejs__time-hovered.negative {
    background: rgba(0, 0, 0, 0.2);
}

.mejs__time-current,
.mejs__time-buffering,
.mejs__time-loaded,
.mejs__time-hovered {
    left: 0;
    -webkit-transform: scaleX(0);
        -ms-transform: scaleX(0);
            transform: scaleX(0);
    -webkit-transform-origin: 0 0;
        -ms-transform-origin: 0 0;
            transform-origin: 0 0;
    -webkit-transition: 0.15s ease-in all;
    transition: 0.15s ease-in all;
    width: 100%;
}

.mejs__time-buffering {
    -webkit-transform: scaleX(1);
        -ms-transform: scaleX(1);
            transform: scaleX(1);
}

.mejs__time-hovered {
    -webkit-transition: height 0.1s cubic-bezier(0.44, 0, 1, 1);
    transition: height 0.1s cubic-bezier(0.44, 0, 1, 1);
}

.mejs__time-hovered.no-hover {
    -webkit-transform: scaleX(0) !important;
        -ms-transform: scaleX(0) !important;
            transform: scaleX(0) !important;
}

.mejs__time-handle,
.mejs__time-handle-content {
    border: 4px solid transparent;
    cursor: pointer;
    left: 0;
    position: absolute;
    -webkit-transform: translateX(0);
        -ms-transform: translateX(0);
            transform: translateX(0);
    z-index: 11;
}

.mejs__time-handle-content {
    border: 4px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    height: 10px;
    left: -7px;
    top: -4px;
    -webkit-transform: scale(0);
        -ms-transform: scale(0);
            transform: scale(0);
    width: 10px;
}

.mejs__time-rail:hover .mejs__time-handle-content,
.mejs__time-rail .mejs__time-handle-content:focus,
.mejs__time-rail .mejs__time-handle-content:active {
    -webkit-transform: scale(1);
        -ms-transform: scale(1);
            transform: scale(1);
}

.mejs__time-float {
    background: #eee;
    border: solid 1px #333;
    bottom: 100%;
    color: #111;
    display: none;
    height: 17px;
    margin-bottom: 9px;
    position: absolute;
    text-align: center;
    -webkit-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
            transform: translateX(-50%);
    width: 36px;
}

.mejs__time-float-current {
    display: block;
    left: 0;
    margin: 2px;
    text-align: center;
    width: 30px;
}

.mejs__time-float-corner {
    border: solid 5px #eee;
    border-color: #eee transparent transparent;
    border-radius: 0;
    display: block;
    height: 0;
    left: 50%;
    line-height: 0;
    position: absolute;
    top: 100%;
    -webkit-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
            transform: translateX(-50%);
    width: 0;
}

.mejs__long-video .mejs__time-float {
    margin-left: -23px;
    width: 64px;
}

.mejs__long-video .mejs__time-float-current {
    width: 60px;
}

.mejs__broadcast {
    color: #fff;
    height: 10px;
    position: absolute;
    top: 15px;
    width: 100%;
}

/* End: Progress Bar */

/* Start: Fullscreen */
.mejs__fullscreen-button > button {
    background-position: -80px 0;
}

.mejs__unfullscreen > button {
    background-position: -100px 0;
}

/* End: Fullscreen */

/* Start: Mute/Volume */
.mejs__mute > button {
    background-position: -60px 0;
}

.mejs__unmute > button {
    background-position: -40px 0;
}

.mejs__volume-button {
    position: relative;
}

.mejs__volume-button > .mejs__volume-slider {
    -webkit-backface-visibility: hidden;
    background: rgba(50, 50, 50, 0.7);
    border-radius: 0;
    bottom: 100%;
    display: none;
    height: 115px;
    left: 50%;
    margin: 0;
    position: absolute;
    -webkit-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
            transform: translateX(-50%);
    width: 25px;
    z-index: 1;
}

.mejs__volume-button:hover {
    border-radius: 0 0 4px 4px;
}

.mejs__volume-total {
    background: rgba(255, 255, 255, 0.5);
    height: 100px;
    left: 50%;
    margin: 0;
    position: absolute;
    top: 8px;
    -webkit-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
            transform: translateX(-50%);
    width: 2px;
}

.mejs__volume-current {
    background: rgba(255, 255, 255, 0.9);
    left: 0;
    margin: 0;
    position: absolute;
    width: 100%;
}

.mejs__volume-handle {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 1px;
    cursor: ns-resize;
    height: 6px;
    left: 50%;
    position: absolute;
    -webkit-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
            transform: translateX(-50%);
    width: 16px;
}

.mejs__horizontal-volume-slider {
    display: block;
    height: 36px;
    position: relative;
    vertical-align: middle;
    width: 56px;
}

.mejs__horizontal-volume-total {
    background: rgba(50, 50, 50, 0.8);
    border-radius: 2px;
    font-size: 1px;
    height: 8px;
    left: 0;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 16px;
    width: 50px;
}

.mejs__horizontal-volume-current {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    font-size: 1px;
    height: 100%;
    left: 0;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 0;
    width: 100%;
}

.mejs__horizontal-volume-handle {
    display: none;
}

/* End: Mute/Volume */

/* Start: Track (Captions and Chapters) */
.mejs__captions-button,
.mejs__chapters-button {
    position: relative;
}

.mejs__captions-button > button {
    background-position: -140px 0;
}

.mejs__chapters-button > button {
    background-position: -180px 0;
}

.mejs__captions-button > .mejs__captions-selector,
.mejs__chapters-button > .mejs__chapters-selector {
    background: rgba(50, 50, 50, 0.7);
    border: solid 1px transparent;
    border-radius: 0;
    bottom: 100%;
    margin-right: -43px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    right: 50%;
    visibility: visible;
    width: 86px;
}

.mejs__chapters-button > .mejs__chapters-selector {
    margin-right: -55px;
    width: 110px;
}

.mejs__captions-selector-list,
.mejs__chapters-selector-list {
    list-style-type: none !important;
    margin: 0;
    overflow: hidden;
    padding: 0;
}

.mejs__captions-selector-list-item,
.mejs__chapters-selector-list-item {
    color: #fff;
    cursor: pointer;
    display: block;
    list-style-type: none !important;
    margin: 0 0 6px;
    overflow: hidden;
    padding: 0;
}

.mejs__captions-selector-list-item:hover,
.mejs__chapters-selector-list-item:hover {
    background-color: rgb(200, 200, 200) !important;
    background-color: rgba(255, 255, 255, 0.4) !important;
}

.mejs__captions-selector-input,
.mejs__chapters-selector-input {
    clear: both;
    float: left;
    left: -1000px;
    margin: 3px 3px 0 5px;
    position: absolute;
}

.mejs__captions-selector-label,
.mejs__chapters-selector-label {
    cursor: pointer;
    float: left;
    font-size: 10px;
    line-height: 15px;
    padding: 4px 10px 0;
    width: 100%;
}

.mejs__captions-selected,
.mejs__chapters-selected {
    color: rgba(33, 248, 248, 1);
}

.mejs__captions-translations {
    font-size: 10px;
    margin: 0 0 5px;
}

.mejs__captions-layer {
    bottom: 0;
    color: #fff;
    font-size: 16px;
    left: 0;
    line-height: 20px;
    position: absolute;
    text-align: center;
}

.mejs__captions-layer a {
    color: #fff;
    text-decoration: underline;
}

.mejs__captions-layer[lang=ar] {
    font-size: 20px;
    font-weight: normal;
}

.mejs__captions-position {
    bottom: 15px;
    left: 0;
    position: absolute;
    width: 100%;
}

.mejs__captions-position-hover {
    bottom: 35px;
}

.mejs__captions-text,
.mejs__captions-text * {
    background: rgba(20, 20, 20, 0.5);
    box-shadow: 5px 0 0 rgba(20, 20, 20, 0.5), -5px 0 0 rgba(20, 20, 20, 0.5);
    padding: 0;
    white-space: pre-wrap;
}

.mejs__container.mejs__hide-cues video::-webkit-media-text-track-container {
    display: none;
}

/* End: Track (Captions and Chapters) */

/* Start: Error */
.mejs__overlay-error {
    position: relative;
}
.mejs__overlay-error > img {
    left: 0;
    max-width: 100%;
    position: absolute;
    top: 0;
    z-index: -1;
}
.mejs__cannotplay,
.mejs__cannotplay a {
    color: #fff;
    font-size: 0.8em;
}

.mejs__cannotplay {
    position: relative;
}

.mejs__cannotplay p,
.mejs__cannotplay a {
    display: inline-block;
    padding: 0 15px;
    width: 100%;
}
/* End: Error */                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             mediaelement/mediaelementplayer.min.css                                                             0000644                 00000026217 15212564044 0014352 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       .mejs__offscreen{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal}.mejs__container{background:#000;font-family:Helvetica,Arial,serif;position:relative;text-align:left;text-indent:0;vertical-align:top}.mejs__container,.mejs__container *{box-sizing:border-box}.mejs__container video::-webkit-media-controls,.mejs__container video::-webkit-media-controls-panel,.mejs__container video::-webkit-media-controls-panel-container,.mejs__container video::-webkit-media-controls-start-playback-button{-webkit-appearance:none;display:none!important}.mejs__fill-container,.mejs__fill-container .mejs__container{height:100%;width:100%}.mejs__fill-container{background:transparent;margin:0 auto;overflow:hidden;position:relative}.mejs__container:focus{outline:none}.mejs__iframe-overlay{height:100%;position:absolute;width:100%}.mejs__embed,.mejs__embed body{background:#000;height:100%;margin:0;overflow:hidden;padding:0;width:100%}.mejs__fullscreen{overflow:hidden!important}.mejs__container-fullscreen{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.mejs__container-fullscreen .mejs__mediaelement,.mejs__container-fullscreen video{height:100%!important;width:100%!important}.mejs__background,.mejs__mediaelement{left:0;position:absolute;top:0}.mejs__mediaelement{height:100%;width:100%;z-index:0}.mejs__poster{background-position:50% 50%;background-repeat:no-repeat;background-size:cover;left:0;position:absolute;top:0;z-index:1}:root .mejs__poster-img{display:none}.mejs__poster-img{border:0;padding:0}.mejs__overlay{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;left:0;position:absolute;top:0}.mejs__layer{z-index:1}.mejs__overlay-play{cursor:pointer}.mejs__overlay-button{background:url(mejs-controls.svg) no-repeat;background-position:0 -39px;height:80px;width:80px}.mejs__overlay:hover>.mejs__overlay-button{background-position:-80px -39px}.mejs__overlay-loading{height:80px;width:80px}.mejs__overlay-loading-bg-img{-webkit-animation:a 1s linear infinite;animation:a 1s linear infinite;background:transparent url(mejs-controls.svg) -160px -40px no-repeat;display:block;height:80px;width:80px;z-index:1}@-webkit-keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.mejs__controls{bottom:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:40px;left:0;list-style-type:none;margin:0;padding:0 10px;position:absolute;width:100%;z-index:3}.mejs__controls:not([style*="display: none"]){background:rgba(255,0,0,.7);background:-webkit-linear-gradient(transparent,rgba(0,0,0,.35));background:linear-gradient(transparent,rgba(0,0,0,.35))}.mejs__button,.mejs__time,.mejs__time-rail{font-size:10px;height:40px;line-height:10px;margin:0;width:32px}.mejs__button>button{background:transparent url(mejs-controls.svg);border:0;cursor:pointer;display:block;font-size:0;height:20px;line-height:0;margin:10px 6px;overflow:hidden;padding:0;position:absolute;text-decoration:none;width:20px}.mejs__button>button:focus{outline:1px dotted #999}.mejs__container-keyboard-inactive [role=slider],.mejs__container-keyboard-inactive [role=slider]:focus,.mejs__container-keyboard-inactive a,.mejs__container-keyboard-inactive a:focus,.mejs__container-keyboard-inactive button,.mejs__container-keyboard-inactive button:focus{outline:0}.mejs__time{box-sizing:content-box;color:#fff;font-size:11px;font-weight:700;height:24px;overflow:hidden;padding:16px 6px 0;text-align:center;width:auto}.mejs__play>button{background-position:0 0}.mejs__pause>button{background-position:-20px 0}.mejs__replay>button{background-position:-160px 0}.mejs__time-rail{direction:ltr;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;height:40px;margin:0 10px;padding-top:10px;position:relative}.mejs__time-buffering,.mejs__time-current,.mejs__time-float,.mejs__time-float-corner,.mejs__time-float-current,.mejs__time-hovered,.mejs__time-loaded,.mejs__time-marker,.mejs__time-total{border-radius:2px;cursor:pointer;display:block;height:10px;position:absolute}.mejs__time-total{background:hsla(0,0%,100%,.3);margin:5px 0 0;width:100%}.mejs__time-buffering{-webkit-animation:b 2s linear infinite;animation:b 2s linear infinite;background:-webkit-linear-gradient(135deg,hsla(0,0%,100%,.4) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.4) 0,hsla(0,0%,100%,.4) 75%,transparent 0,transparent);background:linear-gradient(-45deg,hsla(0,0%,100%,.4) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.4) 0,hsla(0,0%,100%,.4) 75%,transparent 0,transparent);background-size:15px 15px;width:100%}@-webkit-keyframes b{0%{background-position:0 0}to{background-position:30px 0}}@keyframes b{0%{background-position:0 0}to{background-position:30px 0}}.mejs__time-loaded{background:hsla(0,0%,100%,.3)}.mejs__time-current,.mejs__time-handle-content{background:hsla(0,0%,100%,.9)}.mejs__time-hovered{background:hsla(0,0%,100%,.5);z-index:10}.mejs__time-hovered.negative{background:rgba(0,0,0,.2)}.mejs__time-buffering,.mejs__time-current,.mejs__time-hovered,.mejs__time-loaded{left:0;-webkit-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;-webkit-transition:all .15s ease-in;transition:all .15s ease-in;width:100%}.mejs__time-buffering{-webkit-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1)}.mejs__time-hovered{-webkit-transition:height .1s cubic-bezier(.44,0,1,1);transition:height .1s cubic-bezier(.44,0,1,1)}.mejs__time-hovered.no-hover{-webkit-transform:scaleX(0)!important;-ms-transform:scaleX(0)!important;transform:scaleX(0)!important}.mejs__time-handle,.mejs__time-handle-content{border:4px solid transparent;cursor:pointer;left:0;position:absolute;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);z-index:11}.mejs__time-handle-content{border:4px solid hsla(0,0%,100%,.9);border-radius:50%;height:10px;left:-7px;top:-4px;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);width:10px}.mejs__time-rail .mejs__time-handle-content:active,.mejs__time-rail .mejs__time-handle-content:focus,.mejs__time-rail:hover .mejs__time-handle-content{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.mejs__time-float{background:#eee;border:1px solid #333;bottom:100%;color:#111;display:none;height:17px;margin-bottom:9px;position:absolute;text-align:center;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:36px}.mejs__time-float-current{display:block;left:0;margin:2px;text-align:center;width:30px}.mejs__time-float-corner{border:5px solid #eee;border-color:#eee transparent transparent;border-radius:0;display:block;height:0;left:50%;line-height:0;position:absolute;top:100%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:0}.mejs__long-video .mejs__time-float{margin-left:-23px;width:64px}.mejs__long-video .mejs__time-float-current{width:60px}.mejs__broadcast{color:#fff;height:10px;position:absolute;top:15px;width:100%}.mejs__fullscreen-button>button{background-position:-80px 0}.mejs__unfullscreen>button{background-position:-100px 0}.mejs__mute>button{background-position:-60px 0}.mejs__unmute>button{background-position:-40px 0}.mejs__volume-button{position:relative}.mejs__volume-button>.mejs__volume-slider{-webkit-backface-visibility:hidden;background:rgba(50,50,50,.7);border-radius:0;bottom:100%;display:none;height:115px;left:50%;margin:0;position:absolute;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:25px;z-index:1}.mejs__volume-button:hover{border-radius:0 0 4px 4px}.mejs__volume-total{background:hsla(0,0%,100%,.5);height:100px;left:50%;margin:0;position:absolute;top:8px;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:2px}.mejs__volume-current{left:0;margin:0;width:100%}.mejs__volume-current,.mejs__volume-handle{background:hsla(0,0%,100%,.9);position:absolute}.mejs__volume-handle{border-radius:1px;cursor:ns-resize;height:6px;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:16px}.mejs__horizontal-volume-slider{display:block;height:36px;position:relative;vertical-align:middle;width:56px}.mejs__horizontal-volume-total{background:rgba(50,50,50,.8);height:8px;top:16px;width:50px}.mejs__horizontal-volume-current,.mejs__horizontal-volume-total{border-radius:2px;font-size:1px;left:0;margin:0;padding:0;position:absolute}.mejs__horizontal-volume-current{background:hsla(0,0%,100%,.8);height:100%;top:0;width:100%}.mejs__horizontal-volume-handle{display:none}.mejs__captions-button,.mejs__chapters-button{position:relative}.mejs__captions-button>button{background-position:-140px 0}.mejs__chapters-button>button{background-position:-180px 0}.mejs__captions-button>.mejs__captions-selector,.mejs__chapters-button>.mejs__chapters-selector{background:rgba(50,50,50,.7);border:1px solid transparent;border-radius:0;bottom:100%;margin-right:-43px;overflow:hidden;padding:0;position:absolute;right:50%;visibility:visible;width:86px}.mejs__chapters-button>.mejs__chapters-selector{margin-right:-55px;width:110px}.mejs__captions-selector-list,.mejs__chapters-selector-list{list-style-type:none!important;margin:0;overflow:hidden;padding:0}.mejs__captions-selector-list-item,.mejs__chapters-selector-list-item{color:#fff;cursor:pointer;display:block;list-style-type:none!important;margin:0 0 6px;overflow:hidden;padding:0}.mejs__captions-selector-list-item:hover,.mejs__chapters-selector-list-item:hover{background-color:#c8c8c8!important;background-color:hsla(0,0%,100%,.4)!important}.mejs__captions-selector-input,.mejs__chapters-selector-input{clear:both;float:left;left:-1000px;margin:3px 3px 0 5px;position:absolute}.mejs__captions-selector-label,.mejs__chapters-selector-label{cursor:pointer;float:left;font-size:10px;line-height:15px;padding:4px 10px 0;width:100%}.mejs__captions-selected,.mejs__chapters-selected{color:#21f8f8}.mejs__captions-translations{font-size:10px;margin:0 0 5px}.mejs__captions-layer{bottom:0;color:#fff;font-size:16px;left:0;line-height:20px;position:absolute;text-align:center}.mejs__captions-layer a{color:#fff;text-decoration:underline}.mejs__captions-layer[lang=ar]{font-size:20px;font-weight:400}.mejs__captions-position{bottom:15px;left:0;position:absolute;width:100%}.mejs__captions-position-hover{bottom:35px}.mejs__captions-text,.mejs__captions-text *{background:hsla(0,0%,8%,.5);box-shadow:5px 0 0 hsla(0,0%,8%,.5),-5px 0 0 hsla(0,0%,8%,.5);padding:0;white-space:pre-wrap}.mejs__container.mejs__hide-cues video::-webkit-media-text-track-container{display:none}.mejs__overlay-error{position:relative}.mejs__overlay-error>img{left:0;max-width:100%;position:absolute;top:0;z-index:-1}.mejs__cannotplay,.mejs__cannotplay a{color:#fff;font-size:.8em}.mejs__cannotplay{position:relative}.mejs__cannotplay a,.mejs__cannotplay p{display:inline-block;padding:0 15px;width:100%}                                                                                                                                                                                                                                                                                                                                                                                 mediaelement/mejs-controls.png                                                                      0000644                 00000005503 15212564044 0012510 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       ‰PNG

   IHDR     x   ëT¥  PLTE   ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ­««?;<# LIJº¹¹ñññhef1-.vstäããŸ‘ÈÇÇƒ‚ZWXÖÕÕÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿœ—%7   ^tRNS Ÿ¿0€Pïÿ @Ï`ßp¯ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ<w›H§ƒ³$T+9VÈå¬×º'sM5d
:?"3ŒÌfYS¦&-o†N²8X‘hxœ™i|FxÏ‹  	zIDATxì˜‡r¬¸E7’@Kçþÿ'ß›AÕ§.¾¹’ñrÞàN«Ô[ýu:· É»… ß/?†^?â‹>hK¼$y ê'H¹,?Yè7,4Ñ-?~ÀŽšµ`É2Àú•/ZÓ2G%É|˜‘æƒ³v0óòÇ²»PC9ŒèÊO
cÐš–¥¡â%™3Ò|˜v8Ó…Y#Úÿô4åe’ä’ãÌÉ>!Äñ§„ô`B6YŠ³$óaFšÒNÈëÑ‚Óîªé ö9ç>Â8E¤(ƒ>¡pþ‡BRµg¿Ér–:Šd>ÌˆRÄ4 LûBØ +vOP¥©*cü”B ”}!¶{ ‹®¨¸˜¾Í –,™3¢~^H‰85Ò0Ÿw)Ÿñú¤B8
Áè"5UbFHÁ3I“6Œ
ñ³ë’œMÈÅåÕõÜÞ]Ý?ÜBÖIá¥nt?|¢_eRu"ègÉä§ÜGõ5ujBx¼º»y¸‡‡û‹‹Ë'Èš™Õ(}öKýÈB–0o2õü¢©ÝWLç@ð|ÉÂÕYŽ cèÀï—úß²B©@-!áW…„v6úVÈMÈËZˆQ¼¾J}+¤ÇHÝq§EÈ\´Â»?]!³Öì•ú·½3ÑËGüJH¡+‰ZV>"J ô²Ûcjr¨êë0¸ñÜ!÷ÿtÈ5¼Z‡X©ÿ˜c]b„1IJ£„ÑwŸ$VF|id{ah»¬¼ì²¦Ò„ÀËõÕÛÜ¾Þ_>¼CV["%«±_êÇ¤ü=Ö ë¬w.+$0#ÍjFV£“ß½0t’öKý ÃÅ!BÐËN'I`FšÔŒ¬‡‹¿>::kïýR?æø½¸­ËzFI`FšÔŒ¬Æï¿?\Ü/õ#3ùÝ,TœuURj>¢þÏÎ}%8ªQ ½HÈDÙ^‚'çýïéÆEó óÝÔGÝ–JNŠÉûPŸ!ÆÙ/øï|ûÝ°Ùã~,Á1ÿ4Ã0Ã0Ã0Ã0Ã0Ã0Ã0Ã0ŒåJ®Å†Å6b-WKtâMl‹…n,d–=ñð;Ìâ’s‰A‹¶ëûÅn½ÐJ ­©û‹©%tÃ“²,À`­ö¬Ò~…Æ&s·Ò|‚¸“‰7À ErÇ”v2B=u•¦v€–ÇÍ`ÃŒãÀ´2ª‡ãj9m#±óu$g›c³–œGqLœËõ&ÉµÈl¡eû~Çäû¶f#‘h£öó ÒŽçç7Mú4/ñ -ÎÒŽÓüÎOú´£Œ£1î`X“v‹-*lEÙ#4fI»™DÉ’ÈfhÊt Qr´Zs(ðuràŠ $G+ËWvÕJvœÀ’ZÒˆ\ÐY¢’G#‚ùÚ¾22TžžŸŸGÈÃ¡É´ÞÒ_?è^ 8²Éìw8*½¼ÿ&NHò‡—‡ˆPK$Ô‰p§ÙËç€i9_Žw×çìe*9³Áå!Q›T%ByØ¨ÍV'r;&®O ž“{…YñÍ›ÓÛ~ÎŸyVh`uh	Rì“3A“ûCJ¼;f¼"!)Œ’,ùû¿l—èŸh£êeµ‰P„Ú XVaÙ.w=f½d§OUOï:£wö­òHÙ£`Þ<J¤âõöó1G åYåï¾¼}÷}óØ2$‘GäÌZäA‰TÌæÇœrJý‰Ùöt ¯ÐÂ*Í²ØÕ	Z˜TdùNHBÐ3B¾Òµ2X—/ìò÷Ñ·ÍùÜ×-kK-íç¶xîaÝn'’È;s¾ †¯÷@–è•(Þ°QÕ] Íž§Œœ q=õó—cÖ	5¼ýçñ}B{Î¶ì?5ôë¯0™ßsdûz²tÇ{n²@ÈéÃ×§Oèã[ÇÜƒž %’þƒ³.õXéy9&ng—¬ºú…%ÿépZ"éñ»ÔóË/ôÚðÇŸa­¸‹q*¡³Ž¿ù€Ø”n7íPÏ¢÷¥òÎ/×ãM<cÈV%„H˜_k‰¬Ò×~·z>½Ž¡=Mõ}¾^)²OÞ4aÝêÑ¼ÁEG,j
qì­èˆÕ¥´Œuò ué–e…Ã=Ww»{=‡rÇku	ãú:ôŽõ¨Î¸Ðk«k r¥íîg,Ù½ž¤sÖÈ,iï×483å,Zz´÷w«G³ÈÃ¨Ð¡w}S¥6ñÁwBßüè\/çÁWÒÑ70Á¼Ê!"é*ñ?Û;åÆacgéÌ„³ÚgØÞë)ý”Hî¶Zª²ïÿ©ÒošÛ.rðÝýô'	àìzOœÃúáQxÃ‘},1=¨ÿýì‡o->ãÌzŽµQXbÚ´î´pL¯ÿQûpXoÝýÆJèY0£bÑùDQ÷Àž!^"†¼yæÂÖ³U4ê…;,?úÑ–Vl²öýD:¶Yþ&‹©‡m™Ða@lT2lˆ!Äú€þy|bˆŒ^%õ1táD‘¨¢O³£†„S0A/ëi–QC<=5„„%žü’ÕiÜ’õVb›ÊêÐÓ Žm¯ÀAŽ½í…žn{q0”Hu°†ÐÓƒ!R'É@Vêz5S'š\¬.g%¡§ÉEFúJ‚éwèiúsA…`#tA=½ â\á¢(Aâ
zœ+\-r@Ù£È¥-b¶1Ê€ Ç*ÒB9”~
ÊAU(§¥¤(Žf”’2ô´””Þ¡Øšß>€bküm[¦ž[£Ñ`ÃhG€£Áš5ì )ÎkØáë¡agá·´™çÈk´´AÑÒFã8Ž“”84¿é4}FÓ'HãìŽ÷9ÕäéqlÀØf·E~[4ÿ÷ =É*ê9rzfî°$ˆ {xŸRÎLINâèhJ3‡¤Îze*ÎI>CyæÓÿ96`“¤ÑñLÔ}¨!–¤Ñf”0™cÑ£ÌaLÓ‡ä³aÀKG‡`ÒE6aD.Ãíâ†Ë}ÿU†Š€æ€Ž‰Í½|-îiý¤)lµÉýÑAÊ`œ•œ¤ä0,*Zûž…çæ†`^~è¨ñü~ÕÚKÉe» ylÚ|žvè0þQÒÍS/žbZ&ú\V,@òèƒ.jHsŸ<ò—¬_´4ôQ0pY€ZúlØo!¦ÐòÐ‡%ÁÏÒ‘ø'-}zìñMüØ9 yôqb¥ùÏw+Ê¼¸äÔºR?äH³    IEND®B`‚                                                                                                                                                                                             mediaelement/mejs-controls.svg                                                                      0000644                 00000010766 15212564044 0012532 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <svg xmlns="http://www.w3.org/2000/svg" width="400" height="120" viewBox="0 0 400 120"><style>.st0{fill:#FFFFFF;width:16px;height:16px} .st1{fill:none;stroke:#FFFFFF;stroke-width:1.5;stroke-linecap:round;} .st2{fill:none;stroke:#FFFFFF;stroke-width:2;stroke-linecap:round;} .st3{fill:none;stroke:#FFFFFF;} .st4{fill:#231F20;} .st5{opacity:0.75;fill:none;stroke:#FFFFFF;stroke-width:5;enable-background:new;} .st6{fill:none;stroke:#FFFFFF;stroke-width:5;} .st7{opacity:0.4;fill:#FFFFFF;enable-background:new;} .st8{opacity:0.6;fill:#FFFFFF;enable-background:new;} .st9{opacity:0.8;fill:#FFFFFF;enable-background:new;} .st10{opacity:0.9;fill:#FFFFFF;enable-background:new;} .st11{opacity:0.3;fill:#FFFFFF;enable-background:new;} .st12{opacity:0.5;fill:#FFFFFF;enable-background:new;} .st13{opacity:0.7;fill:#FFFFFF;enable-background:new;}</style><path class="st0" d="M16.5 8.5c.3.1.4.5.2.8-.1.1-.1.2-.2.2l-11.4 7c-.5.3-.8.1-.8-.5V2c0-.5.4-.8.8-.5l11.4 7z"/><path class="st0" d="M24 1h2.2c.6 0 1 .4 1 1v14c0 .6-.4 1-1 1H24c-.6 0-1-.4-1-1V2c0-.5.4-1 1-1zm9.8 0H36c.6 0 1 .4 1 1v14c0 .6-.4 1-1 1h-2.2c-.6 0-1-.4-1-1V2c0-.5.4-1 1-1z"/><path class="st0" d="M81 1.4c0-.6.4-1 1-1h5.4c.6 0 .7.3.3.7l-6 6c-.4.4-.7.3-.7-.3V1.4zm0 15.8c0 .6.4 1 1 1h5.4c.6 0 .7-.3.3-.7l-6-6c-.4-.4-.7-.3-.7.3v5.4zM98.8 1.4c0-.6-.4-1-1-1h-5.4c-.6 0-.7.3-.3.7l6 6c.4.4.7.3.7-.3V1.4zm0 15.8c0 .6-.4 1-1 1h-5.4c-.6 0-.7-.3-.3-.7l6-6c.4-.4.7-.3.7.3v5.4z"/><path class="st0" d="M112.7 5c0 .6.4 1 1 1h4.1c.6 0 .7-.3.3-.7L113.4.6c-.4-.4-.7-.3-.7.3V5zm-7.1 1c.6 0 1-.4 1-1V.9c0-.6-.3-.7-.7-.3l-4.7 4.7c-.4.4-.3.7.3.7h4.1zm1 7.1c0-.6-.4-1-1-1h-4.1c-.6 0-.7.3-.3.7l4.7 4.7c.4.4.7.3.7-.3v-4.1zm7.1-1c-.6 0-1 .4-1 1v4.1c0 .5.3.7.7.3l4.7-4.7c.4-.4.3-.7-.3-.7h-4.1z"/><path class="st0" d="M67 5.8c-.5.4-1.2.6-1.8.6H62c-.6 0-1 .4-1 1v5.7c0 .6.4 1 1 1h4.2c.3.2.5.4.8.6l3.5 2.6c.4.3.8.1.8-.4V3.5c0-.5-.4-.7-.8-.4L67 5.8z"/><path class="st1" d="M73.9 2.5s3.9-.8 3.9 7.7-3.9 7.8-3.9 7.8"/><path class="st1" d="M72.6 6.4s2.6-.4 2.6 3.8-2.6 3.9-2.6 3.9"/><path class="st0" d="M47 5.8c-.5.4-1.2.6-1.8.6H42c-.6 0-1 .4-1 1v5.7c0 .6.4 1 1 1h4.2c.3.2.5.4.8.6l3.5 2.6c.4.3.8.1.8-.4V3.5c0-.5-.4-.7-.8-.4L47 5.8z"/><path class="st2" d="M52.8 7l5.4 5.4m-5.4 0L58.2 7"/><path class="st3" d="M128.7 8.6c-6.2-4.2-6.5 7.8 0 3.9m6.5-3.9c-6.2-4.2-6.5 7.8 0 3.9"/><path class="st0" d="M122.2 3.4h15.7v13.1h-15.7V3.4zM120.8 2v15.7h18.3V2h-18.3z"/><path class="st0" d="M143.2 3h14c1.1 0 2 .9 2 2v10c0 1.1-.9 2-2 2h-14c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2z"/><path class="st4" d="M146.4 13.8c-.8 0-1.6-.4-2.1-1-1.1-1.4-1-3.4.1-4.8.5-.6 2-1.7 4.6.2l-.6.8c-1.4-1-2.6-1.1-3.3-.3-.8 1-.8 2.4-.1 3.5.7.9 1.9.8 3.4-.1l.5.9c-.7.5-1.6.7-2.5.8zm7.5 0c-.8 0-1.6-.4-2.1-1-1.1-1.4-1-3.4.1-4.8.5-.6 2-1.7 4.6.2l-.5.8c-1.4-1-2.6-1.1-3.3-.3-.8 1-.8 2.4-.1 3.5.7.9 1.9.8 3.4-.1l.5.9c-.8.5-1.7.7-2.6.8z"/><path class="st0" d="M60.3 77c.6.2.8.8.6 1.4-.1.3-.3.5-.6.6L30 96.5c-1 .6-1.7.1-1.7-1v-35c0-1.1.8-1.5 1.7-1L60.3 77z"/><path class="st5" d="M2.5 79c0-20.7 16.8-37.5 37.5-37.5S77.5 58.3 77.5 79 60.7 116.5 40 116.5 2.5 99.7 2.5 79z"/><path class="st0" d="M140.3 77c.6.2.8.8.6 1.4-.1.3-.3.5-.6.6L110 96.5c-1 .6-1.7.1-1.7-1v-35c0-1.1.8-1.5 1.7-1L140.3 77z"/><path class="st6" d="M82.5 79c0-20.7 16.8-37.5 37.5-37.5s37.5 16.8 37.5 37.5-16.8 37.5-37.5 37.5S82.5 99.7 82.5 79z"/><circle class="st0" cx="201.9" cy="47.1" r="8.1"/><circle class="st7" cx="233.9" cy="79" r="5"/><circle class="st8" cx="201.9" cy="110.9" r="6"/><circle class="st9" cx="170.1" cy="79" r="7"/><circle class="st10" cx="178.2" cy="56.3" r="7.5"/><circle class="st11" cx="226.3" cy="56.1" r="4.5"/><circle class="st12" cx="225.8" cy="102.8" r="5.5"/><circle class="st13" cx="178.2" cy="102.8" r="6.5"/><path class="st0" d="M178 9.4c0 .4-.4.7-.9.7-.1 0-.2 0-.2-.1L172 8.2c-.5-.2-.6-.6-.1-.8l6.2-3.6c.5-.3.8-.1.7.5l-.8 5.1z"/><path class="st0" d="M169.4 15.9c-1 0-2-.2-2.9-.7-2-1-3.2-3-3.2-5.2.1-3.4 2.9-6 6.3-6 2.5.1 4.8 1.7 5.6 4.1l.1-.1 2.1 1.1c-.6-4.4-4.7-7.5-9.1-6.9-3.9.6-6.9 3.9-7 7.9 0 2.9 1.7 5.6 4.3 7 1.2.6 2.5.9 3.8 1 2.6 0 5-1.2 6.6-3.3l-1.8-.9c-1.2 1.2-3 2-4.8 2z"/><path class="st0" d="M183.4 3.2c.8 0 1.5.7 1.5 1.5s-.7 1.5-1.5 1.5-1.5-.7-1.5-1.5c0-.9.7-1.5 1.5-1.5zm5.1 0h8.5c.9 0 1.5.7 1.5 1.5s-.7 1.5-1.5 1.5h-8.5c-.9 0-1.5-.7-1.5-1.5-.1-.9.6-1.5 1.5-1.5zm-5.1 5c.8 0 1.5.7 1.5 1.5s-.7 1.5-1.5 1.5-1.5-.7-1.5-1.5c0-.9.7-1.5 1.5-1.5zm5.1 0h8.5c.9 0 1.5.7 1.5 1.5s-.7 1.5-1.5 1.5h-8.5c-.9 0-1.5-.7-1.5-1.5-.1-.9.6-1.5 1.5-1.5zm-5.1 5c.8 0 1.5.7 1.5 1.5s-.7 1.5-1.5 1.5-1.5-.7-1.5-1.5c0-.9.7-1.5 1.5-1.5zm5.1 0h8.5c.9 0 1.5.7 1.5 1.5s-.7 1.5-1.5 1.5h-8.5c-.9 0-1.5-.7-1.5-1.5-.1-.9.6-1.5 1.5-1.5z"/></svg>
          mediaelement/renderers/vimeo.js                                                                     0000644                 00000030200 15212564044 0012641 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * MediaElement.js
 * http://www.mediaelementjs.com/
 *
 * Wrapper that mimics native HTML5 MediaElement (audio and video)
 * using a variety of technologies (pure JavaScript, Flash, iframe)
 *
 * Copyright 2010-2017, John Dyer (http://j.hn/)
 * License: MIT
 *
 */(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(_dereq_,module,exports){
'use strict';

var VimeoApi = {

	promise: null,

	load: function load(settings) {

		if (typeof Vimeo !== 'undefined') {
			VimeoApi._createPlayer(settings);
		} else {
			VimeoApi.promise = VimeoApi.promise || mejs.Utils.loadScript('https://player.vimeo.com/api/player.js');
			VimeoApi.promise.then(function () {
				VimeoApi._createPlayer(settings);
			});
		}
	},

	_createPlayer: function _createPlayer(settings) {
		var player = new Vimeo.Player(settings.iframe);
		window['__ready__' + settings.id](player);
	},

	getVimeoId: function getVimeoId(url) {
		if (url == null) {
			return null;
		}

		var parts = url.split('?');
		url = parts[0];

		var playerLinkMatch = url.match(/https:\/\/player.vimeo.com\/video\/(\d+)$/);
		if (playerLinkMatch) {
			return parseInt(playerLinkMatch[1], 10);
		}

		var vimeoLinkMatch = url.match(/https:\/\/vimeo.com\/(\d+)$/);
		if (vimeoLinkMatch) {
			return parseInt(vimeoLinkMatch[1], 10);
		}

		var privateVimeoLinkMatch = url.match(/https:\/\/vimeo.com\/(\d+)\/\w+$/);
		if (privateVimeoLinkMatch) {
			return parseInt(privateVimeoLinkMatch[1], 10);
		}

		return NaN;
	}
};

var vimeoIframeRenderer = {

	name: 'vimeo_iframe',
	options: {
		prefix: 'vimeo_iframe'
	},

	canPlayType: function canPlayType(type) {
		return ~['video/vimeo', 'video/x-vimeo'].indexOf(type.toLowerCase());
	},

	create: function create(mediaElement, options, mediaFiles) {
		var apiStack = [],
		    vimeo = {},
		    readyState = 4;

		var paused = true,
		    volume = 1,
		    oldVolume = volume,
		    currentTime = 0,
		    bufferedTime = 0,
		    ended = false,
		    duration = 0,
		    vimeoPlayer = null,
		    url = '';

		vimeo.options = options;
		vimeo.id = mediaElement.id + '_' + options.prefix;
		vimeo.mediaElement = mediaElement;

		var errorHandler = function errorHandler(error) {
			mediaElement.generateError('Code ' + error.name + ': ' + error.message, mediaFiles);
		};

		var props = mejs.html5media.properties,
		    assignGettersSetters = function assignGettersSetters(propName) {

			var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);

			vimeo['get' + capName] = function () {
				if (vimeoPlayer !== null) {
					var value = null;

					switch (propName) {
						case 'currentTime':
							return currentTime;
						case 'duration':
							return duration;
						case 'volume':
							return volume;
						case 'muted':
							return volume === 0;
						case 'paused':
							return paused;
						case 'ended':
							return ended;
						case 'src':
							vimeoPlayer.getVideoUrl().then(function (_url) {
								url = _url;
							}).catch(function (error) {
								return errorHandler(error);
							});
							return url;
						case 'buffered':
							return {
								start: function start() {
									return 0;
								},
								end: function end() {
									return bufferedTime * duration;
								},
								length: 1
							};
						case 'readyState':
							return readyState;
					}
					return value;
				} else {
					return null;
				}
			};

			vimeo['set' + capName] = function (value) {
				if (vimeoPlayer !== null) {
					switch (propName) {
						case 'src':
							var _url2 = typeof value === 'string' ? value : value[0].src,
							    videoId = VimeoApi.getVimeoId(_url2);

							vimeoPlayer.loadVideo(videoId).then(function () {
								if (mediaElement.originalNode.autoplay) {
									vimeoPlayer.play();
								}
							}).catch(function (error) {
								return errorHandler(error);
							});
							break;
						case 'currentTime':
							vimeoPlayer.setCurrentTime(value).then(function () {
								currentTime = value;
								setTimeout(function () {
									var event = mejs.Utils.createEvent('timeupdate', vimeo);
									mediaElement.dispatchEvent(event);
								}, 50);
							}).catch(function (error) {
								return errorHandler(error);
							});
							break;
						case 'volume':
							vimeoPlayer.setVolume(value).then(function () {
								volume = value;
								oldVolume = volume;
								setTimeout(function () {
									var event = mejs.Utils.createEvent('volumechange', vimeo);
									mediaElement.dispatchEvent(event);
								}, 50);
							}).catch(function (error) {
								return errorHandler(error);
							});
							break;
						case 'loop':
							vimeoPlayer.setLoop(value).catch(function (error) {
								return errorHandler(error);
							});
							break;
						case 'muted':
							if (value) {
								vimeoPlayer.setVolume(0).then(function () {
									volume = 0;
									setTimeout(function () {
										var event = mejs.Utils.createEvent('volumechange', vimeo);
										mediaElement.dispatchEvent(event);
									}, 50);
								}).catch(function (error) {
									return errorHandler(error);
								});
							} else {
								vimeoPlayer.setVolume(oldVolume).then(function () {
									volume = oldVolume;
									setTimeout(function () {
										var event = mejs.Utils.createEvent('volumechange', vimeo);
										mediaElement.dispatchEvent(event);
									}, 50);
								}).catch(function (error) {
									return errorHandler(error);
								});
							}
							break;
						case 'readyState':
							var event = mejs.Utils.createEvent('canplay', vimeo);
							mediaElement.dispatchEvent(event);
							break;
						default:
							
							break;
					}
				} else {
					apiStack.push({ type: 'set', propName: propName, value: value });
				}
			};
		};

		for (var i = 0, total = props.length; i < total; i++) {
			assignGettersSetters(props[i]);
		}

		var methods = mejs.html5media.methods,
		    assignMethods = function assignMethods(methodName) {
			vimeo[methodName] = function () {
				if (vimeoPlayer !== null) {
					switch (methodName) {
						case 'play':
							paused = false;
							return vimeoPlayer.play();
						case 'pause':
							paused = true;
							return vimeoPlayer.pause();
						case 'load':
							return null;
					}
				} else {
					apiStack.push({ type: 'call', methodName: methodName });
				}
			};
		};

		for (var _i = 0, _total = methods.length; _i < _total; _i++) {
			assignMethods(methods[_i]);
		}

		window['__ready__' + vimeo.id] = function (_vimeoPlayer) {

			mediaElement.vimeoPlayer = vimeoPlayer = _vimeoPlayer;

			if (apiStack.length) {
				for (var _i2 = 0, _total2 = apiStack.length; _i2 < _total2; _i2++) {
					var stackItem = apiStack[_i2];

					if (stackItem.type === 'set') {
						var propName = stackItem.propName,
						    capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);

						vimeo['set' + capName](stackItem.value);
					} else if (stackItem.type === 'call') {
						vimeo[stackItem.methodName]();
					}
				}
			}

			if (mediaElement.originalNode.muted) {
				vimeoPlayer.setVolume(0);
				volume = 0;
			}

			var vimeoIframe = document.getElementById(vimeo.id);
			var events = void 0;

			events = ['mouseover', 'mouseout'];

			var assignEvents = function assignEvents(e) {
				var event = mejs.Utils.createEvent(e.type, vimeo);
				mediaElement.dispatchEvent(event);
			};

			for (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) {
				vimeoIframe.addEventListener(events[_i3], assignEvents, false);
			}

			vimeoPlayer.on('loaded', function () {
				vimeoPlayer.getDuration().then(function (loadProgress) {
					duration = loadProgress;
					if (duration > 0) {
						bufferedTime = duration * loadProgress;
						if (mediaElement.originalNode.autoplay) {
							paused = false;
							ended = false;
							var event = mejs.Utils.createEvent('play', vimeo);
							mediaElement.dispatchEvent(event);
						}
					}
				}).catch(function (error) {
					errorHandler(error, vimeo);
				});
			});
			vimeoPlayer.on('progress', function () {
				vimeoPlayer.getDuration().then(function (loadProgress) {
					duration = loadProgress;

					if (duration > 0) {
						bufferedTime = duration * loadProgress;
						if (mediaElement.originalNode.autoplay) {
							var initEvent = mejs.Utils.createEvent('play', vimeo);
							mediaElement.dispatchEvent(initEvent);

							var playingEvent = mejs.Utils.createEvent('playing', vimeo);
							mediaElement.dispatchEvent(playingEvent);
						}
					}

					var event = mejs.Utils.createEvent('progress', vimeo);
					mediaElement.dispatchEvent(event);
				}).catch(function (error) {
					return errorHandler(error);
				});
			});
			vimeoPlayer.on('timeupdate', function () {
				vimeoPlayer.getCurrentTime().then(function (seconds) {
					currentTime = seconds;
					var event = mejs.Utils.createEvent('timeupdate', vimeo);
					mediaElement.dispatchEvent(event);
				}).catch(function (error) {
					return errorHandler(error);
				});
			});
			vimeoPlayer.on('play', function () {
				paused = false;
				ended = false;
				var event = mejs.Utils.createEvent('play', vimeo);
				mediaElement.dispatchEvent(event);

				var playingEvent = mejs.Utils.createEvent('playing', vimeo);
				mediaElement.dispatchEvent(playingEvent);
			});
			vimeoPlayer.on('pause', function () {
				paused = true;
				ended = false;

				var event = mejs.Utils.createEvent('pause', vimeo);
				mediaElement.dispatchEvent(event);
			});
			vimeoPlayer.on('ended', function () {
				paused = false;
				ended = true;

				var event = mejs.Utils.createEvent('ended', vimeo);
				mediaElement.dispatchEvent(event);
			});

			events = ['rendererready', 'loadedmetadata', 'loadeddata', 'canplay'];

			for (var _i4 = 0, _total4 = events.length; _i4 < _total4; _i4++) {
				var event = mejs.Utils.createEvent(events[_i4], vimeo);
				mediaElement.dispatchEvent(event);
			}
		};

		var height = mediaElement.originalNode.height,
		    width = mediaElement.originalNode.width,
		    vimeoContainer = document.createElement('iframe'),
		    standardUrl = 'https://player.vimeo.com/video/' + VimeoApi.getVimeoId(mediaFiles[0].src);

		var queryArgs = ~mediaFiles[0].src.indexOf('?') ? '?' + mediaFiles[0].src.slice(mediaFiles[0].src.indexOf('?') + 1) : '';
		var args = [];

		if (mediaElement.originalNode.autoplay && queryArgs.indexOf('autoplay') === -1) {
			args.push('autoplay=1');
		}
		if (mediaElement.originalNode.loop && queryArgs.indexOf('loop') === -1) {
			args.push('loop=1');
		}

		queryArgs = '' + queryArgs + (queryArgs ? '&' : '?') + args.join('&');

		vimeoContainer.setAttribute('id', vimeo.id);
		vimeoContainer.setAttribute('width', width);
		vimeoContainer.setAttribute('height', height);
		vimeoContainer.setAttribute('frameBorder', '0');
		vimeoContainer.setAttribute('src', '' + standardUrl + queryArgs);
		vimeoContainer.setAttribute('webkitallowfullscreen', 'true');
		vimeoContainer.setAttribute('mozallowfullscreen', 'true');
		vimeoContainer.setAttribute('allowfullscreen', 'true');
		vimeoContainer.setAttribute('allow', 'autoplay');

		mediaElement.originalNode.parentNode.insertBefore(vimeoContainer, mediaElement.originalNode);
		mediaElement.originalNode.style.display = 'none';

		VimeoApi.load({
			iframe: vimeoContainer,
			id: vimeo.id
		});

		vimeo.hide = function () {
			vimeo.pause();
			if (vimeoPlayer) {
				vimeoContainer.style.display = 'none';
			}
		};
		vimeo.setSize = function (width, height) {
			vimeoContainer.setAttribute('width', width);
			vimeoContainer.setAttribute('height', height);
		};
		vimeo.show = function () {
			if (vimeoPlayer) {
				vimeoContainer.style.display = '';
			}
		};

		vimeo.destroy = function () {};

		return vimeo;
	}
};

mejs.Utils.typeChecks.push(function (url) {
	return (/(\/\/player\.vimeo|vimeo\.com)/i.test(url) ? 'video/x-vimeo' : null
	);
});

mejs.Renderers.add(vimeoIframeRenderer);

},{}]},{},[1]);
                                                                                                                                                                                                                                                                                                                                                                                                mediaelement/renderers/vimeo.min.js                                                                 0000644                 00000014500 15212564044 0013430 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*!
 * MediaElement.js
 * http://www.mediaelementjs.com/
 *
 * Wrapper that mimics native HTML5 MediaElement (audio and video)
 * using a variety of technologies (pure JavaScript, Flash, iframe)
 *
 * Copyright 2010-2017, John Dyer (http://j.hn/)
 * License: MIT
 *
 */
!function a(o,s,u){function c(n,e){if(!s[n]){if(!o[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(l)return l(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var i=s[n]={exports:{}};o[n][0].call(i.exports,function(e){var t=o[n][1][e];return c(t||e)},i,i.exports,a,o,s,u)}return s[n].exports}for(var l="function"==typeof require&&require,e=0;e<u.length;e++)c(u[e]);return c}({1:[function(e,t,n){"use strict";var T={promise:null,load:function(e){"undefined"!=typeof Vimeo?T._createPlayer(e):(T.promise=T.promise||mejs.Utils.loadScript("https://player.vimeo.com/api/player.js"),T.promise.then(function(){T._createPlayer(e)}))},_createPlayer:function(e){var t=new Vimeo.Player(e.iframe);window["__ready__"+e.id](t)},getVimeoId:function(e){if(null==e)return null;var t=(e=e.split("?")[0]).match(/https:\/\/player.vimeo.com\/video\/(\d+)$/);if(t)return parseInt(t[1],10);var n=e.match(/https:\/\/vimeo.com\/(\d+)$/);if(n)return parseInt(n[1],10);var r=e.match(/https:\/\/vimeo.com\/(\d+)\/\w+$/);return r?parseInt(r[1],10):NaN}},r={name:"vimeo_iframe",options:{prefix:"vimeo_iframe"},canPlayType:function(e){return~["video/vimeo","video/x-vimeo"].indexOf(e.toLowerCase())},create:function(f,e,t){var v=[],h={},y=!0,g=1,a=g,E=0,j=0,U=!1,b=0,w=null,n="";h.options=e,h.id=f.id+"_"+e.prefix,h.mediaElement=f;for(var N=function(e){f.generateError("Code "+e.name+": "+e.message,t)},r=mejs.html5media.properties,i=function(i){var e=""+i.substring(0,1).toUpperCase()+i.substring(1);h["get"+e]=function(){if(null!==w){switch(i){case"currentTime":return E;case"duration":return b;case"volume":return g;case"muted":return 0===g;case"paused":return y;case"ended":return U;case"src":return w.getVideoUrl().then(function(e){n=e}).catch(function(e){return N(e)}),n;case"buffered":return{start:function(){return 0},end:function(){return j*b},length:1};case"readyState":return 4}return null}return null},h["set"+e]=function(e){if(null!==w)switch(i){case"src":var t="string"==typeof e?e:e[0].src,n=T.getVimeoId(t);w.loadVideo(n).then(function(){f.originalNode.autoplay&&w.play()}).catch(function(e){return N(e)});break;case"currentTime":w.setCurrentTime(e).then(function(){E=e,setTimeout(function(){var e=mejs.Utils.createEvent("timeupdate",h);f.dispatchEvent(e)},50)}).catch(function(e){return N(e)});break;case"volume":w.setVolume(e).then(function(){a=g=e,setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",h);f.dispatchEvent(e)},50)}).catch(function(e){return N(e)});break;case"loop":w.setLoop(e).catch(function(e){return N(e)});break;case"muted":e?w.setVolume(0).then(function(){g=0,setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",h);f.dispatchEvent(e)},50)}).catch(function(e){return N(e)}):w.setVolume(a).then(function(){g=a,setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",h);f.dispatchEvent(e)},50)}).catch(function(e){return N(e)});break;case"readyState":var r=mejs.Utils.createEvent("canplay",h);f.dispatchEvent(r)}else v.push({type:"set",propName:i,value:e})}},o=0,s=r.length;o<s;o++)i(r[o]);for(var u=mejs.html5media.methods,c=function(e){h[e]=function(){if(null!==w)switch(e){case"play":return y=!1,w.play();case"pause":return y=!0,w.pause();case"load":return null}else v.push({type:"call",methodName:e})}},l=0,d=u.length;l<d;l++)c(u[l]);window["__ready__"+h.id]=function(e){if(f.vimeoPlayer=w=e,v.length)for(var t=0,n=v.length;t<n;t++){var r=v[t];if("set"===r.type){var i=r.propName,a=""+i.substring(0,1).toUpperCase()+i.substring(1);h["set"+a](r.value)}else"call"===r.type&&h[r.methodName]()}f.originalNode.muted&&(w.setVolume(0),g=0);for(var o=document.getElementById(h.id),s=void 0,u=function(e){var t=mejs.Utils.createEvent(e.type,h);f.dispatchEvent(t)},c=0,l=(s=["mouseover","mouseout"]).length;c<l;c++)o.addEventListener(s[c],u,!1);w.on("loaded",function(){w.getDuration().then(function(e){if(0<(b=e)&&(j=b*e,f.originalNode.autoplay)){U=y=!1;var t=mejs.Utils.createEvent("play",h);f.dispatchEvent(t)}}).catch(function(e){N(e)})}),w.on("progress",function(){w.getDuration().then(function(e){if(0<(b=e)&&(j=b*e,f.originalNode.autoplay)){var t=mejs.Utils.createEvent("play",h);f.dispatchEvent(t);var n=mejs.Utils.createEvent("playing",h);f.dispatchEvent(n)}var r=mejs.Utils.createEvent("progress",h);f.dispatchEvent(r)}).catch(function(e){return N(e)})}),w.on("timeupdate",function(){w.getCurrentTime().then(function(e){E=e;var t=mejs.Utils.createEvent("timeupdate",h);f.dispatchEvent(t)}).catch(function(e){return N(e)})}),w.on("play",function(){U=y=!1;var e=mejs.Utils.createEvent("play",h);f.dispatchEvent(e);var t=mejs.Utils.createEvent("playing",h);f.dispatchEvent(t)}),w.on("pause",function(){y=!0,U=!1;var e=mejs.Utils.createEvent("pause",h);f.dispatchEvent(e)}),w.on("ended",function(){y=!1,U=!0;var e=mejs.Utils.createEvent("ended",h);f.dispatchEvent(e)});for(var d=0,p=(s=["rendererready","loadedmetadata","loadeddata","canplay"]).length;d<p;d++){var m=mejs.Utils.createEvent(s[d],h);f.dispatchEvent(m)}};var p=f.originalNode.height,m=f.originalNode.width,_=document.createElement("iframe"),x="https://player.vimeo.com/video/"+T.getVimeoId(t[0].src),A=~t[0].src.indexOf("?")?"?"+t[0].src.slice(t[0].src.indexOf("?")+1):"",V=[];return f.originalNode.autoplay&&-1===A.indexOf("autoplay")&&V.push("autoplay=1"),f.originalNode.loop&&-1===A.indexOf("loop")&&V.push("loop=1"),A=A+(A?"&":"?")+V.join("&"),_.setAttribute("id",h.id),_.setAttribute("width",m),_.setAttribute("height",p),_.setAttribute("frameBorder","0"),_.setAttribute("src",""+x+A),_.setAttribute("webkitallowfullscreen","true"),_.setAttribute("mozallowfullscreen","true"),_.setAttribute("allowfullscreen","true"),_.setAttribute("allow","autoplay"),f.originalNode.parentNode.insertBefore(_,f.originalNode),f.originalNode.style.display="none",T.load({iframe:_,id:h.id}),h.hide=function(){h.pause(),w&&(_.style.display="none")},h.setSize=function(e,t){_.setAttribute("width",e),_.setAttribute("height",t)},h.show=function(){w&&(_.style.display="")},h.destroy=function(){},h}};mejs.Utils.typeChecks.push(function(e){return/(\/\/player\.vimeo|vimeo\.com)/i.test(e)?"video/x-vimeo":null}),mejs.Renderers.add(r)},{}]},{},[1]);                                                                                                                                                                                                mediaelement/wp-mediaelement.css                                                                    0000644                 00000011540 15212564044 0012770 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       .mejs-container {
	clear: both;
	max-width: 100%;
}

.mejs-container * {
	font-family: Helvetica, Arial;
}

.mejs-container,
.mejs-embed,
.mejs-embed body,
.mejs-container .mejs-controls {
	background: #222;
}

.mejs-time {
	font-weight: normal;
	word-wrap: normal;
}

.mejs-controls a.mejs-horizontal-volume-slider {
	display: table;
}

.mejs-controls .mejs-time-rail .mejs-time-loaded,
.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current {
	background: #fff;
}

.mejs-controls .mejs-time-rail .mejs-time-current {
	background: #0073aa;
}

.mejs-controls .mejs-time-rail .mejs-time-total,
.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total {
	background: rgba(255, 255, 255, .33);
}

.mejs-controls .mejs-time-rail span,
.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total,
.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current {
	border-radius: 0;
}

.mejs-overlay-loading {
	background: transparent;
}

/* Override theme styles that may conflict with controls. */
.mejs-controls button:hover {
	border: none;
	-webkit-box-shadow: none;
	box-shadow: none;
}

.me-cannotplay {
	width: auto !important;
}

.media-embed-details .wp-audio-shortcode {
	display: inline-block;
	max-width: 400px;
}

.audio-details .embed-media-settings {
	overflow: visible;
}

.media-embed-details .embed-media-settings .setting span:not(.button-group) {
	max-width: 400px; /* Back-compat for pre-5.3 */
	width: auto; /* Back-compat for pre-5.3 */
}

.media-embed-details .embed-media-settings .checkbox-setting span {
	display: inline-block;
}

.media-embed-details .embed-media-settings {
	padding-top: 0;
	top: 28px;
}

.media-embed-details .instructions {
	padding: 16px 0;
	max-width: 600px;
}

.media-embed-details .setting p,
.media-embed-details .setting .remove-setting {
	color: #a00;
	font-size: 10px;
	text-transform: uppercase;
}

.media-embed-details .setting .remove-setting {
	padding: 5px 0;
}

.media-embed-details .setting a:hover {
	color: #dc3232;
}

.media-embed-details .embed-media-settings .checkbox-setting {
	float: none;
	margin: 0 0 10px;
}

.wp-video {
	max-width: 100%;
	height: auto;
}

.wp_attachment_holder .wp-video,
.wp_attachment_holder .wp-audio-shortcode {
	margin-top: 18px;
}

video.wp-video-shortcode,
.wp-video-shortcode video {
	max-width: 100%;
	display: inline-block;
}

.video-details .wp-video-holder {
	width: 100%;
	max-width: 640px;
}

.wp-playlist {
	border: 1px solid #ccc;
	padding: 10px;
	margin: 12px 0 18px;
	font-size: 14px;
	line-height: 1.5;
}

.wp-admin .wp-playlist {
	margin: 0 0 18px;
}

.wp-playlist video {
	display: inline-block;
	max-width: 100%;
}

.wp-playlist audio {
	display: none;
	max-width: 100%;
	width: 400px;
}

.wp-playlist .mejs-container {
	margin: 0;
	max-width: 100%;
}

.wp-playlist .mejs-controls .mejs-button button {
	outline: 0;
}

.wp-playlist-light {
	background: #fff;
	color: #000;
}

.wp-playlist-dark {
	color: #fff;
	background: #000;
}

.wp-playlist-caption {
	display: block;
	max-width: 88%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 14px;
	line-height: 1.5;
}

.wp-playlist-item .wp-playlist-caption {
	text-decoration: none;
	color: #000;
	max-width: -webkit-calc(100% - 40px);
	max-width: calc(100% - 40px);
}

.wp-playlist-item-meta {
	display: block;
	font-size: 14px;
	line-height: 1.5;
}

.wp-playlist-item-title {
	font-size: 14px;
	line-height: 1.5;
}

.wp-playlist-item-album {
	font-style: italic;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wp-playlist-item-artist {
	font-size: 12px;
	text-transform: uppercase;
}

.wp-playlist-item-length {
	position: absolute;
	right: 3px;
	top: 0;
	font-size: 14px;
	line-height: 1.5;
}

.rtl .wp-playlist-item-length {
	left: 3px;
	right: auto;
}

.wp-playlist-tracks {
	margin-top: 10px;
}

.wp-playlist-item {
	position: relative;
	cursor: pointer;
	padding: 0 3px;
	border-bottom: 1px solid #ccc;
}

.wp-playlist-item:last-child {
	border-bottom: 0;
}

.wp-playlist-light .wp-playlist-caption {
	color: #333;
}

.wp-playlist-dark .wp-playlist-caption {
	color: #ddd;
}

.wp-playlist-playing {
	font-weight: bold;
	background: #f7f7f7;
}

.wp-playlist-light .wp-playlist-playing {
	background: #fff;
	color: #000;
}

.wp-playlist-dark .wp-playlist-playing {
	background: #000;
	color: #fff;
}

.wp-playlist-current-item {
	overflow: hidden;
	margin-bottom: 10px;
	height: 60px;
}

.wp-playlist .wp-playlist-current-item img {
	float: left;
	max-width: 60px;
	height: auto;
	margin-right: 10px;
	padding: 0;
	border: 0;
}

.rtl .wp-playlist .wp-playlist-current-item img {
	float: right;
	margin-left: 10px;
	margin-right: 0;
}

.wp-playlist-current-item .wp-playlist-item-title,
.wp-playlist-current-item .wp-playlist-item-artist {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wp-audio-playlist .me-cannotplay span {
	padding: 5px 15px;
}
                                                                                                                                                                mediaelement/wp-mediaelement.js                                                                     0000644                 00000005302 15212564044 0012613 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /* global _wpmejsSettings, mejsL10n */
(function( window, $ ) {

	window.wp = window.wp || {};

	function wpMediaElement() {
		var settings = {};

		/**
		 * Initialize media elements.
		 *
		 * Ensures media elements that have already been initialized won't be
		 * processed again.
		 *
		 * @memberOf wp.mediaelement
		 *
		 * @since 4.4.0
		 *
		 * @return {void}
		 */
		function initialize() {
			var selectors = [];

			if ( typeof _wpmejsSettings !== 'undefined' ) {
				settings = $.extend( true, {}, _wpmejsSettings );
			}
			settings.classPrefix = 'mejs-';
			settings.success = settings.success || function ( mejs ) {
				var autoplay, loop;

				if ( mejs.rendererName && -1 !== mejs.rendererName.indexOf( 'flash' ) ) {
					autoplay = mejs.attributes.autoplay && 'false' !== mejs.attributes.autoplay;
					loop = mejs.attributes.loop && 'false' !== mejs.attributes.loop;

					if ( autoplay ) {
						mejs.addEventListener( 'canplay', function() {
							mejs.play();
						}, false );
					}

					if ( loop ) {
						mejs.addEventListener( 'ended', function() {
							mejs.play();
						}, false );
					}
				}
			};

			/**
			 * Custom error handler.
			 *
			 * Sets up a custom error handler in case a video render fails, and provides a download
			 * link as the fallback.
			 *
			 * @since 4.9.3
			 *
			 * @param {object} media The wrapper that mimics all the native events/properties/methods for all renderers.
			 * @param {object} node  The original HTML video, audio, or iframe tag where the media was loaded.
			 * @return {string}
			 */
			settings.customError = function ( media, node ) {
				// Make sure we only fall back to a download link for flash files.
				if ( -1 !== media.rendererName.indexOf( 'flash' ) || -1 !== media.rendererName.indexOf( 'flv' ) ) {
					return '<a href="' + node.src + '">' + mejsL10n.strings['mejs.download-file'] + '</a>';
				}
			};

			if ( 'undefined' === typeof settings.videoShortcodeLibrary || 'mediaelement' === settings.videoShortcodeLibrary ) {
				selectors.push( '.wp-video-shortcode' );
			}
			if ( 'undefined' === typeof settings.audioShortcodeLibrary || 'mediaelement' === settings.audioShortcodeLibrary ) {
				selectors.push( '.wp-audio-shortcode' );
			}
			if ( ! selectors.length ) {
				return;
			}

			// Only initialize new media elements.
			$( selectors.join( ', ' ) )
				.not( '.mejs-container' )
				.filter(function () {
					return ! $( this ).parent().hasClass( 'mejs-mediaelement' );
				})
				.mediaelementplayer( settings );
		}

		return {
			initialize: initialize
		};
	}

	/**
	 * @namespace wp.mediaelement
	 * @memberOf wp
	 */
	window.wp.mediaelement = new wpMediaElement();

	$( window.wp.mediaelement.initialize );

})( window, jQuery );
                                                                                                                                                                                                                                                                                                                              mediaelement/wp-mediaelement.min.css                                                                0000644                 00000010132 15212564044 0013546 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       .mejs-container{clear:both;max-width:100%}.mejs-container *{font-family:Helvetica,Arial}.mejs-container,.mejs-container .mejs-controls,.mejs-embed,.mejs-embed body{background:#222}.mejs-time{font-weight:400;word-wrap:normal}.mejs-controls a.mejs-horizontal-volume-slider{display:table}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current,.mejs-controls .mejs-time-rail .mejs-time-loaded{background:#fff}.mejs-controls .mejs-time-rail .mejs-time-current{background:#0073aa}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total,.mejs-controls .mejs-time-rail .mejs-time-total{background:rgba(255,255,255,.33)}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current,.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total,.mejs-controls .mejs-time-rail span{border-radius:0}.mejs-overlay-loading{background:0 0}.mejs-controls button:hover{border:none;-webkit-box-shadow:none;box-shadow:none}.me-cannotplay{width:auto!important}.media-embed-details .wp-audio-shortcode{display:inline-block;max-width:400px}.audio-details .embed-media-settings{overflow:visible}.media-embed-details .embed-media-settings .setting span:not(.button-group){max-width:400px;width:auto}.media-embed-details .embed-media-settings .checkbox-setting span{display:inline-block}.media-embed-details .embed-media-settings{padding-top:0;top:28px}.media-embed-details .instructions{padding:16px 0;max-width:600px}.media-embed-details .setting .remove-setting,.media-embed-details .setting p{color:#a00;font-size:10px;text-transform:uppercase}.media-embed-details .setting .remove-setting{padding:5px 0}.media-embed-details .setting a:hover{color:#dc3232}.media-embed-details .embed-media-settings .checkbox-setting{float:none;margin:0 0 10px}.wp-video{max-width:100%;height:auto}.wp_attachment_holder .wp-audio-shortcode,.wp_attachment_holder .wp-video{margin-top:18px}.wp-video-shortcode video,video.wp-video-shortcode{max-width:100%;display:inline-block}.video-details .wp-video-holder{width:100%;max-width:640px}.wp-playlist{border:1px solid #ccc;padding:10px;margin:12px 0 18px;font-size:14px;line-height:1.5}.wp-admin .wp-playlist{margin:0 0 18px}.wp-playlist video{display:inline-block;max-width:100%}.wp-playlist audio{display:none;max-width:100%;width:400px}.wp-playlist .mejs-container{margin:0;max-width:100%}.wp-playlist .mejs-controls .mejs-button button{outline:0}.wp-playlist-light{background:#fff;color:#000}.wp-playlist-dark{color:#fff;background:#000}.wp-playlist-caption{display:block;max-width:88%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;line-height:1.5}.wp-playlist-item .wp-playlist-caption{text-decoration:none;color:#000;max-width:-webkit-calc(100% - 40px);max-width:calc(100% - 40px)}.wp-playlist-item-meta{display:block;font-size:14px;line-height:1.5}.wp-playlist-item-title{font-size:14px;line-height:1.5}.wp-playlist-item-album{font-style:italic;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-playlist-item-artist{font-size:12px;text-transform:uppercase}.wp-playlist-item-length{position:absolute;right:3px;top:0;font-size:14px;line-height:1.5}.rtl .wp-playlist-item-length{left:3px;right:auto}.wp-playlist-tracks{margin-top:10px}.wp-playlist-item{position:relative;cursor:pointer;padding:0 3px;border-bottom:1px solid #ccc}.wp-playlist-item:last-child{border-bottom:0}.wp-playlist-light .wp-playlist-caption{color:#333}.wp-playlist-dark .wp-playlist-caption{color:#ddd}.wp-playlist-playing{font-weight:700;background:#f7f7f7}.wp-playlist-light .wp-playlist-playing{background:#fff;color:#000}.wp-playlist-dark .wp-playlist-playing{background:#000;color:#fff}.wp-playlist-current-item{overflow:hidden;margin-bottom:10px;height:60px}.wp-playlist .wp-playlist-current-item img{float:left;max-width:60px;height:auto;margin-right:10px;padding:0;border:0}.rtl .wp-playlist .wp-playlist-current-item img{float:right;margin-left:10px;margin-right:0}.wp-playlist-current-item .wp-playlist-item-artist,.wp-playlist-current-item .wp-playlist-item-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-audio-playlist .me-cannotplay span{padding:5px 15px}                                                                                                                                                                                                                                                                                                                                                                                                                                      mediaelement/wp-mediaelement.min.js                                                                 0000644                 00000002123 15212564044 0013373 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(e,n){e.wp=e.wp||{},e.wp.mediaelement=new function(){var t={};return{initialize:function(){var e=[];(t="undefined"!=typeof _wpmejsSettings?n.extend(!0,{},_wpmejsSettings):t).classPrefix="mejs-",t.success=t.success||function(e){var t,n;e.rendererName&&-1!==e.rendererName.indexOf("flash")&&(t=e.attributes.autoplay&&"false"!==e.attributes.autoplay,n=e.attributes.loop&&"false"!==e.attributes.loop,t&&e.addEventListener("canplay",function(){e.play()},!1),n)&&e.addEventListener("ended",function(){e.play()},!1)},t.customError=function(e,t){if(-1!==e.rendererName.indexOf("flash")||-1!==e.rendererName.indexOf("flv"))return'<a href="'+t.src+'">'+mejsL10n.strings["mejs.download-file"]+"</a>"},void 0!==t.videoShortcodeLibrary&&"mediaelement"!==t.videoShortcodeLibrary||e.push(".wp-video-shortcode"),void 0!==t.audioShortcodeLibrary&&"mediaelement"!==t.audioShortcodeLibrary||e.push(".wp-audio-shortcode"),e.length&&n(e.join(", ")).not(".mejs-container").filter(function(){return!n(this).parent().hasClass("mejs-mediaelement")}).mediaelementplayer(t)}}},n(e.wp.mediaelement.initialize)}(window,jQuery);                                                                                                                                                                                                                                                                                                                                                                                                                                             mediaelement/wp-playlist.js                                                                         0000644                 00000012442 15212564044 0012026 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /* global _wpmejsSettings, MediaElementPlayer */

(function ($, _, Backbone) {
	'use strict';

	/** @namespace wp */
	window.wp = window.wp || {};

	var WPPlaylistView = Backbone.View.extend(/** @lends WPPlaylistView.prototype */{
		/**
		 * @constructs
		 *
		 * @param {Object} options          The options to create this playlist view with.
		 * @param {Object} options.metadata The metadata
		 */
		initialize : function (options) {
			this.index = 0;
			this.settings = {};
			this.data = options.metadata || $.parseJSON( this.$('script.wp-playlist-script').html() );
			this.playerNode = this.$( this.data.type );

			this.tracks = new Backbone.Collection( this.data.tracks );
			this.current = this.tracks.first();

			if ( 'audio' === this.data.type ) {
				this.currentTemplate = wp.template( 'wp-playlist-current-item' );
				this.currentNode = this.$( '.wp-playlist-current-item' );
			}

			this.renderCurrent();

			if ( this.data.tracklist ) {
				this.itemTemplate = wp.template( 'wp-playlist-item' );
				this.playingClass = 'wp-playlist-playing';
				this.renderTracks();
			}

			this.playerNode.attr( 'src', this.current.get( 'src' ) );

			_.bindAll( this, 'bindPlayer', 'bindResetPlayer', 'setPlayer', 'ended', 'clickTrack' );

			if ( ! _.isUndefined( window._wpmejsSettings ) ) {
				this.settings = _.clone( _wpmejsSettings );
			}
			this.settings.success = this.bindPlayer;
			this.setPlayer();
		},

		bindPlayer : function (mejs) {
			this.mejs = mejs;
			this.mejs.addEventListener( 'ended', this.ended );
		},

		bindResetPlayer : function (mejs) {
			this.bindPlayer( mejs );
			this.playCurrentSrc();
		},

		setPlayer: function (force) {
			if ( this.player ) {
				this.player.pause();
				this.player.remove();
				this.playerNode = this.$( this.data.type );
			}

			if (force) {
				this.playerNode.attr( 'src', this.current.get( 'src' ) );
				this.settings.success = this.bindResetPlayer;
			}

			// This is also our bridge to the outside world.
			this.player = new MediaElementPlayer( this.playerNode.get(0), this.settings );
		},

		playCurrentSrc : function () {
			this.renderCurrent();
			this.mejs.setSrc( this.playerNode.attr( 'src' ) );
			this.mejs.load();
			this.mejs.play();
		},

		renderCurrent : function () {
			var dimensions, defaultImage = 'wp-includes/images/media/video.svg';
			if ( 'video' === this.data.type ) {
				if ( this.data.images && this.current.get( 'image' ) && -1 === this.current.get( 'image' ).src.indexOf( defaultImage ) ) {
					this.playerNode.attr( 'poster', this.current.get( 'image' ).src );
				}
				dimensions = this.current.get( 'dimensions' );
				if ( dimensions && dimensions.resized ) {
					this.playerNode.attr( dimensions.resized );
				}
			} else {
				if ( ! this.data.images ) {
					this.current.set( 'image', false );
				}
				this.currentNode.html( this.currentTemplate( this.current.toJSON() ) );
			}
		},

		renderTracks : function () {
			var self = this, i = 1, tracklist = $( '<div class="wp-playlist-tracks"></div>' );
			this.tracks.each(function (model) {
				if ( ! self.data.images ) {
					model.set( 'image', false );
				}
				model.set( 'artists', self.data.artists );
				model.set( 'index', self.data.tracknumbers ? i : false );
				tracklist.append( self.itemTemplate( model.toJSON() ) );
				i += 1;
			});
			this.$el.append( tracklist );

			this.$( '.wp-playlist-item' ).eq(0).addClass( this.playingClass );
		},

		events : {
			'click .wp-playlist-item' : 'clickTrack',
			'click .wp-playlist-next' : 'next',
			'click .wp-playlist-prev' : 'prev'
		},

		clickTrack : function (e) {
			e.preventDefault();

			this.index = this.$( '.wp-playlist-item' ).index( e.currentTarget );
			this.setCurrent();
		},

		ended : function () {
			if ( this.index + 1 < this.tracks.length ) {
				this.next();
			} else {
				this.index = 0;
				this.setCurrent();
			}
		},

		next : function () {
			this.index = this.index + 1 >= this.tracks.length ? 0 : this.index + 1;
			this.setCurrent();
		},

		prev : function () {
			this.index = this.index - 1 < 0 ? this.tracks.length - 1 : this.index - 1;
			this.setCurrent();
		},

		loadCurrent : function () {
			var last = this.playerNode.attr( 'src' ) && this.playerNode.attr( 'src' ).split('.').pop(),
				current = this.current.get( 'src' ).split('.').pop();

			this.mejs && this.mejs.pause();

			if ( last !== current ) {
				this.setPlayer( true );
			} else {
				this.playerNode.attr( 'src', this.current.get( 'src' ) );
				this.playCurrentSrc();
			}
		},

		setCurrent : function () {
			this.current = this.tracks.at( this.index );

			if ( this.data.tracklist ) {
				this.$( '.wp-playlist-item' )
					.removeClass( this.playingClass )
					.eq( this.index )
						.addClass( this.playingClass );
			}

			this.loadCurrent();
		}
	});

	/**
	 * Initialize media playlists in the document.
	 *
	 * Only initializes new playlists not previously-initialized.
	 *
	 * @since 4.9.3
	 * @return {void}
	 */
	function initialize() {
		$( '.wp-playlist:not(:has(.mejs-container))' ).each( function() {
			new WPPlaylistView( { el: this } );
		} );
	}

	/**
	 * Expose the API publicly on window.wp.playlist.
	 *
	 * @namespace wp.playlist
	 * @since 4.9.3
	 * @type {object}
	 */
	window.wp.playlist = {
		initialize: initialize
	};

	$( document ).ready( initialize );

	window.WPPlaylistView = WPPlaylistView;

}(jQuery, _, Backbone));
                                                                                                                                                                                                                              mediaelement/wp-playlist.min.js                                                                     0000644                 00000006565 15212564044 0012621 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(r,e,i){"use strict";window.wp=window.wp||{};var t=i.View.extend({initialize:function(t){this.index=0,this.settings={},this.data=t.metadata||r.parseJSON(this.$("script.wp-playlist-script").html()),this.playerNode=this.$(this.data.type),this.tracks=new i.Collection(this.data.tracks),this.current=this.tracks.first(),"audio"===this.data.type&&(this.currentTemplate=wp.template("wp-playlist-current-item"),this.currentNode=this.$(".wp-playlist-current-item")),this.renderCurrent(),this.data.tracklist&&(this.itemTemplate=wp.template("wp-playlist-item"),this.playingClass="wp-playlist-playing",this.renderTracks()),this.playerNode.attr("src",this.current.get("src")),e.bindAll(this,"bindPlayer","bindResetPlayer","setPlayer","ended","clickTrack"),e.isUndefined(window._wpmejsSettings)||(this.settings=e.clone(_wpmejsSettings)),this.settings.success=this.bindPlayer,this.setPlayer()},bindPlayer:function(t){this.mejs=t,this.mejs.addEventListener("ended",this.ended)},bindResetPlayer:function(t){this.bindPlayer(t),this.playCurrentSrc()},setPlayer:function(t){this.player&&(this.player.pause(),this.player.remove(),this.playerNode=this.$(this.data.type)),t&&(this.playerNode.attr("src",this.current.get("src")),this.settings.success=this.bindResetPlayer),this.player=new MediaElementPlayer(this.playerNode.get(0),this.settings)},playCurrentSrc:function(){this.renderCurrent(),this.mejs.setSrc(this.playerNode.attr("src")),this.mejs.load(),this.mejs.play()},renderCurrent:function(){var t;"video"===this.data.type?(this.data.images&&this.current.get("image")&&-1===this.current.get("image").src.indexOf("wp-includes/images/media/video.svg")&&this.playerNode.attr("poster",this.current.get("image").src),(t=this.current.get("dimensions"))&&t.resized&&this.playerNode.attr(t.resized)):(this.data.images||this.current.set("image",!1),this.currentNode.html(this.currentTemplate(this.current.toJSON())))},renderTracks:function(){var e=this,i=1,s=r('<div class="wp-playlist-tracks"></div>');this.tracks.each(function(t){e.data.images||t.set("image",!1),t.set("artists",e.data.artists),t.set("index",!!e.data.tracknumbers&&i),s.append(e.itemTemplate(t.toJSON())),i+=1}),this.$el.append(s),this.$(".wp-playlist-item").eq(0).addClass(this.playingClass)},events:{"click .wp-playlist-item":"clickTrack","click .wp-playlist-next":"next","click .wp-playlist-prev":"prev"},clickTrack:function(t){t.preventDefault(),this.index=this.$(".wp-playlist-item").index(t.currentTarget),this.setCurrent()},ended:function(){this.index+1<this.tracks.length?this.next():(this.index=0,this.setCurrent())},next:function(){this.index=this.index+1>=this.tracks.length?0:this.index+1,this.setCurrent()},prev:function(){this.index=this.index-1<0?this.tracks.length-1:this.index-1,this.setCurrent()},loadCurrent:function(){var t=this.playerNode.attr("src")&&this.playerNode.attr("src").split(".").pop(),e=this.current.get("src").split(".").pop();this.mejs&&this.mejs.pause(),t!==e?this.setPlayer(!0):(this.playerNode.attr("src",this.current.get("src")),this.playCurrentSrc())},setCurrent:function(){this.current=this.tracks.at(this.index),this.data.tracklist&&this.$(".wp-playlist-item").removeClass(this.playingClass).eq(this.index).addClass(this.playingClass),this.loadCurrent()}});function s(){r(".wp-playlist:not(:has(.mejs-container))").each(function(){new t({el:this})})}window.wp.playlist={initialize:s},r(document).ready(s),window.WPPlaylistView=t}(jQuery,_,Backbone);                                                                                                                                           plupload/handlers.js                                                                                0000644                 00000050074 15212564044 0010533 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /* global plupload, pluploadL10n, ajaxurl, post_id, wpUploaderInit, deleteUserSetting, setUserSetting, getUserSetting, shortform */
var topWin = window.dialogArguments || opener || parent || top, uploader, uploader_init;

// Progress and success handlers for media multi uploads.
function fileQueued( fileObj ) {
	// Get rid of unused form.
	jQuery( '.media-blank' ).remove();

	var items = jQuery( '#media-items' ).children(), postid = post_id || 0;

	// Collapse a single item.
	if ( items.length == 1 ) {
		items.removeClass( 'open' ).find( '.slidetoggle' ).slideUp( 200 );
	}
	// Create a progress bar containing the filename.
	jQuery( '<div class="media-item">' )
		.attr( 'id', 'media-item-' + fileObj.id )
		.addClass( 'child-of-' + postid )
		.append( jQuery( '<div class="filename original">' ).text( ' ' + fileObj.name ),
			'<div class="progress"><div class="percent">0%</div><div class="bar"></div></div>' )
		.appendTo( jQuery( '#media-items' ) );

	// Disable submit.
	jQuery( '#insert-gallery' ).prop( 'disabled', true );
}

function uploadStart() {
	try {
		if ( typeof topWin.tb_remove != 'undefined' )
			topWin.jQuery( '#TB_overlay' ).unbind( 'click', topWin.tb_remove );
	} catch( e ){}

	return true;
}

function uploadProgress( up, file ) {
	var item = jQuery( '#media-item-' + file.id );

	jQuery( '.bar', item ).width( ( 200 * file.loaded ) / file.size );
	jQuery( '.percent', item ).html( file.percent + '%' );
}

// Check to see if a large file failed to upload.
function fileUploading( up, file ) {
	var hundredmb = 100 * 1024 * 1024,
		max = parseInt( up.settings.max_file_size, 10 );

	if ( max > hundredmb && file.size > hundredmb ) {
		setTimeout( function() {
			if ( file.status < 3 && file.loaded === 0 ) { // Not uploading.
				wpFileError( file, pluploadL10n.big_upload_failed.replace( '%1$s', '<a class="uploader-html" href="#">' ).replace( '%2$s', '</a>' ) );
				up.stop();  // Stop the whole queue.
				up.removeFile( file );
				up.start(); // Restart the queue.
			}
		}, 10000 ); // Wait for 10 seconds for the file to start uploading.
	}
}

function updateMediaForm() {
	var items = jQuery( '#media-items' ).children();

	// Just one file, no need for collapsible part.
	if ( items.length == 1 ) {
		items.addClass( 'open' ).find( '.slidetoggle' ).show();
		jQuery( '.insert-gallery' ).hide();
	} else if ( items.length > 1 ) {
		items.removeClass( 'open' );
		// Only show Gallery/Playlist buttons when there are at least two files.
		jQuery( '.insert-gallery' ).show();
	}

	// Only show Save buttons when there is at least one file.
	if ( items.not( '.media-blank' ).length > 0 )
		jQuery( '.savebutton' ).show();
	else
		jQuery( '.savebutton' ).hide();
}

function uploadSuccess( fileObj, serverData ) {
	var item = jQuery( '#media-item-' + fileObj.id );

	// On success serverData should be numeric,
	// fix bug in html4 runtime returning the serverData wrapped in a <pre> tag.
	if ( typeof serverData === 'string' ) {
		serverData = serverData.replace( /^<pre>(\d+)<\/pre>$/, '$1' );

		// If async-upload returned an error message, place it in the media item div and return.
		if ( /media-upload-error|error-div/.test( serverData ) ) {
			item.html( serverData );
			return;
		}
	}

	item.find( '.percent' ).html( pluploadL10n.crunching );

	prepareMediaItem( fileObj, serverData );
	updateMediaForm();

	// Increment the counter.
	if ( post_id && item.hasClass( 'child-of-' + post_id ) ) {
		jQuery( '#attachments-count' ).text( 1 * jQuery( '#attachments-count' ).text() + 1 );
	}
}

function setResize( arg ) {
	if ( arg ) {
		if ( window.resize_width && window.resize_height ) {
			uploader.settings.resize = {
				enabled: true,
				width: window.resize_width,
				height: window.resize_height,
				quality: 100
			};
		} else {
			uploader.settings.multipart_params.image_resize = true;
		}
	} else {
		delete( uploader.settings.multipart_params.image_resize );
	}
}

function prepareMediaItem( fileObj, serverData ) {
	var f = ( typeof shortform == 'undefined' ) ? 1 : 2, item = jQuery( '#media-item-' + fileObj.id );
	if ( f == 2 && shortform > 2 )
		f = shortform;

	try {
		if ( typeof topWin.tb_remove != 'undefined' )
			topWin.jQuery( '#TB_overlay' ).click( topWin.tb_remove );
	} catch( e ){}

	if ( isNaN( serverData ) || !serverData ) {
		// Old style: Append the HTML returned by the server -- thumbnail and form inputs.
		item.append( serverData );
		prepareMediaItemInit( fileObj );
	} else {
		// New style: server data is just the attachment ID, fetch the thumbnail and form html from the server.
		item.load( 'async-upload.php', {attachment_id:serverData, fetch:f}, function(){prepareMediaItemInit( fileObj );updateMediaForm();});
	}
}

function prepareMediaItemInit( fileObj ) {
	var item = jQuery( '#media-item-' + fileObj.id );
	// Clone the thumbnail as a "pinkynail" -- a tiny image to the left of the filename.
	jQuery( '.thumbnail', item ).clone().attr( 'class', 'pinkynail toggle' ).prependTo( item );

	// Replace the original filename with the new (unique) one assigned during upload.
	jQuery( '.filename.original', item ).replaceWith( jQuery( '.filename.new', item ) );

	// Bind Ajax to the new Delete button.
	jQuery( 'a.delete', item ).on( 'click', function(){
		// Tell the server to delete it. TODO: Handle exceptions.
		jQuery.ajax({
			url: ajaxurl,
			type: 'post',
			success: deleteSuccess,
			error: deleteError,
			id: fileObj.id,
			data: {
				id : this.id.replace(/[^0-9]/g, '' ),
				action : 'trash-post',
				_ajax_nonce : this.href.replace(/^.*wpnonce=/,'' )
			}
		});
		return false;
	});

	// Bind Ajax to the new Undo button.
	jQuery( 'a.undo', item ).on( 'click', function(){
		// Tell the server to untrash it. TODO: Handle exceptions.
		jQuery.ajax({
			url: ajaxurl,
			type: 'post',
			id: fileObj.id,
			data: {
				id : this.id.replace(/[^0-9]/g,'' ),
				action: 'untrash-post',
				_ajax_nonce: this.href.replace(/^.*wpnonce=/,'' )
			},
			success: function( ){
				var type,
					item = jQuery( '#media-item-' + fileObj.id );

				if ( type = jQuery( '#type-of-' + fileObj.id ).val() )
					jQuery( '#' + type + '-counter' ).text( jQuery( '#' + type + '-counter' ).text()-0+1 );

				if ( post_id && item.hasClass( 'child-of-'+post_id ) )
					jQuery( '#attachments-count' ).text( jQuery( '#attachments-count' ).text()-0+1 );

				jQuery( '.filename .trashnotice', item ).remove();
				jQuery( '.filename .title', item ).css( 'font-weight','normal' );
				jQuery( 'a.undo', item ).addClass( 'hidden' );
				jQuery( '.menu_order_input', item ).show();
				item.css( {backgroundColor:'#ceb'} ).animate( {backgroundColor: '#fff'}, { queue: false, duration: 500, complete: function(){ jQuery( this ).css({backgroundColor:''}); } }).removeClass( 'undo' );
			}
		});
		return false;
	});

	// Open this item if it says to start open (e.g. to display an error).
	jQuery( '#media-item-' + fileObj.id + '.startopen' ).removeClass( 'startopen' ).addClass( 'open' ).find( 'slidetoggle' ).fadeIn();
}

// Generic error message.
function wpQueueError( message ) {
	jQuery( '#media-upload-error' ).show().html( '<div class="notice notice-error"><p>' + message + '</p></div>' );
}

// File-specific error messages.
function wpFileError( fileObj, message ) {
	itemAjaxError( fileObj.id, message );
}

function itemAjaxError( id, message ) {
	var item = jQuery( '#media-item-' + id ), filename = item.find( '.filename' ).text(), last_err = item.data( 'last-err' );

	if ( last_err == id ) // Prevent firing an error for the same file twice.
		return;

	item.html( '<div class="error-div">' +
				'<a class="dismiss" href="#">' + pluploadL10n.dismiss + '</a>' +
				'<strong>' + pluploadL10n.error_uploading.replace( '%s', jQuery.trim( filename )) + '</strong> ' +
				message +
				'</div>' ).data( 'last-err', id );
}

function deleteSuccess( data ) {
	var type, id, item;
	if ( data == '-1' )
		return itemAjaxError( this.id, 'You do not have permission. Has your session expired?' );

	if ( data == '0' )
		return itemAjaxError( this.id, 'Could not be deleted. Has it been deleted already?' );

	id = this.id;
	item = jQuery( '#media-item-' + id );

	// Decrement the counters.
	if ( type = jQuery( '#type-of-' + id ).val() )
		jQuery( '#' + type + '-counter' ).text( jQuery( '#' + type + '-counter' ).text() - 1 );

	if ( post_id && item.hasClass( 'child-of-'+post_id ) )
		jQuery( '#attachments-count' ).text( jQuery( '#attachments-count' ).text() - 1 );

	if ( jQuery( 'form.type-form #media-items' ).children().length == 1 && jQuery( '.hidden', '#media-items' ).length > 0 ) {
		jQuery( '.toggle' ).toggle();
		jQuery( '.slidetoggle' ).slideUp( 200 ).siblings().removeClass( 'hidden' );
	}

	// Vanish it.
	jQuery( '.toggle', item ).toggle();
	jQuery( '.slidetoggle', item ).slideUp( 200 ).siblings().removeClass( 'hidden' );
	item.css( {backgroundColor:'#faa'} ).animate( {backgroundColor:'#f4f4f4'}, {queue:false, duration:500} ).addClass( 'undo' );

	jQuery( '.filename:empty', item ).remove();
	jQuery( '.filename .title', item ).css( 'font-weight','bold' );
	jQuery( '.filename', item ).append( '<span class="trashnotice"> ' + pluploadL10n.deleted + ' </span>' ).siblings( 'a.toggle' ).hide();
	jQuery( '.filename', item ).append( jQuery( 'a.undo', item ).removeClass( 'hidden' ) );
	jQuery( '.menu_order_input', item ).hide();

	return;
}

function deleteError() {
}

function uploadComplete() {
	jQuery( '#insert-gallery' ).prop( 'disabled', false );
}

function switchUploader( s ) {
	if ( s ) {
		deleteUserSetting( 'uploader' );
		jQuery( '.media-upload-form' ).removeClass( 'html-uploader' );

		if ( typeof( uploader ) == 'object' )
			uploader.refresh();

		jQuery( '#plupload-browse-button' ).trigger( 'focus' );
	} else {
		setUserSetting( 'uploader', '1' ); // 1 == html uploader.
		jQuery( '.media-upload-form' ).addClass( 'html-uploader' );
		jQuery( '#async-upload' ).trigger( 'focus' );
	}
}

function uploadError( fileObj, errorCode, message, up ) {
	var hundredmb = 100 * 1024 * 1024, max;

	switch ( errorCode ) {
		case plupload.FAILED:
			wpFileError( fileObj, pluploadL10n.upload_failed );
			break;
		case plupload.FILE_EXTENSION_ERROR:
			wpFileExtensionError( up, fileObj, pluploadL10n.invalid_filetype );
			break;
		case plupload.FILE_SIZE_ERROR:
			uploadSizeError( up, fileObj );
			break;
		case plupload.IMAGE_FORMAT_ERROR:
			wpFileError( fileObj, pluploadL10n.not_an_image );
			break;
		case plupload.IMAGE_MEMORY_ERROR:
			wpFileError( fileObj, pluploadL10n.image_memory_exceeded );
			break;
		case plupload.IMAGE_DIMENSIONS_ERROR:
			wpFileError( fileObj, pluploadL10n.image_dimensions_exceeded );
			break;
		case plupload.GENERIC_ERROR:
			wpQueueError( pluploadL10n.upload_failed );
			break;
		case plupload.IO_ERROR:
			max = parseInt( up.settings.filters.max_file_size, 10 );

			if ( max > hundredmb && fileObj.size > hundredmb ) {
				wpFileError( fileObj, pluploadL10n.big_upload_failed.replace( '%1$s', '<a class="uploader-html" href="#">' ).replace( '%2$s', '</a>' ) );
			} else {
				wpQueueError( pluploadL10n.io_error );
			}

			break;
		case plupload.HTTP_ERROR:
			wpQueueError( pluploadL10n.http_error );
			break;
		case plupload.INIT_ERROR:
			jQuery( '.media-upload-form' ).addClass( 'html-uploader' );
			break;
		case plupload.SECURITY_ERROR:
			wpQueueError( pluploadL10n.security_error );
			break;
/*		case plupload.UPLOAD_ERROR.UPLOAD_STOPPED:
		case plupload.UPLOAD_ERROR.FILE_CANCELLED:
			jQuery( '#media-item-' + fileObj.id ).remove();
			break;*/
		default:
			wpFileError( fileObj, pluploadL10n.default_error );
	}
}

function uploadSizeError( up, file ) {
	var message, errorDiv;

	message = pluploadL10n.file_exceeds_size_limit.replace( '%s', file.name );

	// Construct the error div.
	errorDiv = jQuery( '<div />' )
		.attr( {
			'id':    'media-item-' + file.id,
			'class': 'media-item error'
		} )
		.append(
			jQuery( '<p />' )
				.text( message )
		);

	// Append the error.
	jQuery( '#media-items' ).append( errorDiv );
	up.removeFile( file );
}

function wpFileExtensionError( up, file, message ) {
	jQuery( '#media-items' ).append( '<div id="media-item-' + file.id + '" class="media-item error"><p>' + message + '</p></div>' );
	up.removeFile( file );
}

/**
 * Copies the attachment URL to the clipboard.
 *
 * @since 5.8.0
 *
 * @param {MouseEvent} event A click event.
 *
 * @return {void}
 */
function copyAttachmentUploadURLClipboard() {
	var clipboard = new ClipboardJS( '.copy-attachment-url' ),
		successTimeout;

	clipboard.on( 'success', function( event ) {
		var triggerElement = jQuery( event.trigger ),
			successElement = jQuery( '.success', triggerElement.closest( '.copy-to-clipboard-container' ) );

		// Clear the selection and move focus back to the trigger.
		event.clearSelection();
		// Show success visual feedback.
		clearTimeout( successTimeout );
		successElement.removeClass( 'hidden' );
		// Hide success visual feedback after 3 seconds since last success.
		successTimeout = setTimeout( function() {
			successElement.addClass( 'hidden' );
		}, 3000 );
		// Handle success audible feedback.
		wp.a11y.speak( pluploadL10n.file_url_copied );
	} );
}

jQuery( document ).ready( function( $ ) {
	copyAttachmentUploadURLClipboard();
	var tryAgainCount = {};
	var tryAgain;

	$( '.media-upload-form' ).on( 'click.uploader', function( e ) {
		var target = $( e.target ), tr, c;

		if ( target.is( 'input[type="radio"]' ) ) { // Remember the last used image size and alignment.
			tr = target.closest( 'tr' );

			if ( tr.hasClass( 'align' ) )
				setUserSetting( 'align', target.val() );
			else if ( tr.hasClass( 'image-size' ) )
				setUserSetting( 'imgsize', target.val() );

		} else if ( target.is( 'button.button' ) ) { // Remember the last used image link url.
			c = e.target.className || '';
			c = c.match( /url([^ '"]+)/ );

			if ( c && c[1] ) {
				setUserSetting( 'urlbutton', c[1] );
				target.siblings( '.urlfield' ).val( target.data( 'link-url' ) );
			}
		} else if ( target.is( 'a.dismiss' ) ) {
			target.parents( '.media-item' ).fadeOut( 200, function() {
				$( this ).remove();
			} );
		} else if ( target.is( '.upload-flash-bypass button' ) || target.is( 'a.uploader-html' ) ) { // Switch uploader to html4.
			$( '#media-items, p.submit, span.big-file-warning' ).css( 'display', 'none' );
			switchUploader( 0 );
			e.preventDefault();
		} else if ( target.is( '.upload-html-bypass button' ) ) { // Switch uploader to multi-file.
			$( '#media-items, p.submit, span.big-file-warning' ).css( 'display', '' );
			switchUploader( 1 );
			e.preventDefault();
		} else if ( target.is( 'a.describe-toggle-on' ) ) { // Show.
			target.parent().addClass( 'open' );
			target.siblings( '.slidetoggle' ).fadeIn( 250, function() {
				var S = $( window ).scrollTop(),
					H = $( window ).height(),
					top = $( this ).offset().top,
					h = $( this ).height(),
					b,
					B;

				if ( H && top && h ) {
					b = top + h;
					B = S + H;

					if ( b > B ) {
						if ( b - B < top - S )
							window.scrollBy( 0, ( b - B ) + 10 );
						else
							window.scrollBy( 0, top - S - 40 );
					}
				}
			} );

			e.preventDefault();
		} else if ( target.is( 'a.describe-toggle-off' ) ) { // Hide.
			target.siblings( '.slidetoggle' ).fadeOut( 250, function() {
				target.parent().removeClass( 'open' );
			} );

			e.preventDefault();
		}
	});

	// Attempt to create image sub-sizes when an image was uploaded successfully
	// but the server responded with an HTTP 5xx error.
	tryAgain = function( up, error ) {
		var file = error.file;
		var times;
		var id;

		if ( ! error || ! error.responseHeaders ) {
			wpQueueError( pluploadL10n.http_error_image );
			return;
		}

		id = error.responseHeaders.match( /x-wp-upload-attachment-id:\s*(\d+)/i );

		if ( id && id[1] ) {
			id = id[1];
		} else {
			wpQueueError( pluploadL10n.http_error_image );
			return;
		}

		times = tryAgainCount[ file.id ];

		if ( times && times > 4 ) {
			/*
			 * The file may have been uploaded and attachment post created,
			 * but post-processing and resizing failed...
			 * Do a cleanup then tell the user to scale down the image and upload it again.
			 */
			$.ajax({
				type: 'post',
				url: ajaxurl,
				dataType: 'json',
				data: {
					action: 'media-create-image-subsizes',
					_wpnonce: wpUploaderInit.multipart_params._wpnonce,
					attachment_id: id,
					_wp_upload_failed_cleanup: true,
				}
			});

			if ( error.message && ( error.status < 500 || error.status >= 600 ) ) {
				wpQueueError( error.message );
			} else {
				wpQueueError( pluploadL10n.http_error_image );
			}

			return;
		}

		if ( ! times ) {
			tryAgainCount[ file.id ] = 1;
		} else {
			tryAgainCount[ file.id ] = ++times;
		}

		// Try to create the missing image sizes.
		$.ajax({
			type: 'post',
			url: ajaxurl,
			dataType: 'json',
			data: {
				action: 'media-create-image-subsizes',
				_wpnonce: wpUploaderInit.multipart_params._wpnonce,
				attachment_id: id,
				_legacy_support: 'true',
			}
		}).done( function( response ) {
			var message;

			if ( response.success ) {
				uploadSuccess( file, response.data.id );
			} else {
				if ( response.data && response.data.message ) {
					message = response.data.message;
				}

				wpQueueError( message || pluploadL10n.http_error_image );
			}
		}).fail( function( jqXHR ) {
			// If another HTTP 5xx error, try try again...
			if ( jqXHR.status >= 500 && jqXHR.status < 600 ) {
				tryAgain( up, error );
				return;
			}

			wpQueueError( pluploadL10n.http_error_image );
		});
	}

	// Init and set the uploader.
	uploader_init = function() {
		uploader = new plupload.Uploader( wpUploaderInit );

		$( '#image_resize' ).on( 'change', function() {
			var arg = $( this ).prop( 'checked' );

			setResize( arg );

			if ( arg )
				setUserSetting( 'upload_resize', '1' );
			else
				deleteUserSetting( 'upload_resize' );
		});

		uploader.bind( 'Init', function( up ) {
			var uploaddiv = $( '#plupload-upload-ui' );

			setResize( getUserSetting( 'upload_resize', false ) );

			if ( up.features.dragdrop && ! $( document.body ).hasClass( 'mobile' ) ) {
				uploaddiv.addClass( 'drag-drop' );

				$( '#drag-drop-area' ).on( 'dragover.wp-uploader', function() { // dragenter doesn't fire right :(
					uploaddiv.addClass( 'drag-over' );
				}).on( 'dragleave.wp-uploader, drop.wp-uploader', function() {
					uploaddiv.removeClass( 'drag-over' );
				});
			} else {
				uploaddiv.removeClass( 'drag-drop' );
				$( '#drag-drop-area' ).off( '.wp-uploader' );
			}

			if ( up.runtime === 'html4' ) {
				$( '.upload-flash-bypass' ).hide();
			}
		});

		uploader.bind( 'postinit', function( up ) {
			up.refresh();
		});

		uploader.init();

		uploader.bind( 'FilesAdded', function( up, files ) {
			$( '#media-upload-error' ).empty();
			uploadStart();

			plupload.each( files, function( file ) {
				if ( file.type === 'image/heic' && up.settings.heic_upload_error ) {
					// Show error but do not block uploading.
					wpQueueError( pluploadL10n.unsupported_image );
				} else if ( file.type === 'image/webp' && up.settings.webp_upload_error ) {
					// Disallow uploading of WebP images if the server cannot edit them.
					wpQueueError( pluploadL10n.noneditable_image );
					up.removeFile( file );
					return;
				} else if ( file.type === 'image/avif' && up.settings.avif_upload_error ) {
					// Disallow uploading of AVIF images if the server cannot edit them.
					wpQueueError( pluploadL10n.noneditable_image );
					up.removeFile( file );
					return;
				}

				fileQueued( file );
			});

			up.refresh();
			up.start();
		});

		uploader.bind( 'UploadFile', function( up, file ) {
			fileUploading( up, file );
		});

		uploader.bind( 'UploadProgress', function( up, file ) {
			uploadProgress( up, file );
		});

		uploader.bind( 'Error', function( up, error ) {
			var isImage = error.file && error.file.type && error.file.type.indexOf( 'image/' ) === 0;
			var status  = error && error.status;

			// If the file is an image and the error is HTTP 5xx try to create sub-sizes again.
			if ( isImage && status >= 500 && status < 600 ) {
				tryAgain( up, error );
				return;
			}

			uploadError( error.file, error.code, error.message, up );
			up.refresh();
		});

		uploader.bind( 'FileUploaded', function( up, file, response ) {
			uploadSuccess( file, response.response );
		});

		uploader.bind( 'UploadComplete', function() {
			uploadComplete();
		});
	};

	if ( typeof( wpUploaderInit ) == 'object' ) {
		uploader_init();
	}

});
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    plupload/handlers.min.js                                                                            0000644                 00000027403 15212564044 0011315 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var uploader,uploader_init,topWin=window.dialogArguments||opener||parent||top;function fileQueued(e){jQuery(".media-blank").remove();var a=jQuery("#media-items").children(),r=post_id||0;1==a.length&&a.removeClass("open").find(".slidetoggle").slideUp(200),jQuery('<div class="media-item">').attr("id","media-item-"+e.id).addClass("child-of-"+r).append(jQuery('<div class="filename original">').text(" "+e.name),'<div class="progress"><div class="percent">0%</div><div class="bar"></div></div>').appendTo(jQuery("#media-items")),jQuery("#insert-gallery").prop("disabled",!0)}function uploadStart(){try{void 0!==topWin.tb_remove&&topWin.jQuery("#TB_overlay").unbind("click",topWin.tb_remove)}catch(e){}return!0}function uploadProgress(e,a){var r=jQuery("#media-item-"+a.id);jQuery(".bar",r).width(200*a.loaded/a.size),jQuery(".percent",r).html(a.percent+"%")}function fileUploading(e,a){var r=104857600;r<parseInt(e.settings.max_file_size,10)&&a.size>r&&setTimeout(function(){a.status<3&&0===a.loaded&&(wpFileError(a,pluploadL10n.big_upload_failed.replace("%1$s",'<a class="uploader-html" href="#">').replace("%2$s","</a>")),e.stop(),e.removeFile(a),e.start())},1e4)}function updateMediaForm(){var e=jQuery("#media-items").children();1==e.length?(e.addClass("open").find(".slidetoggle").show(),jQuery(".insert-gallery").hide()):1<e.length&&(e.removeClass("open"),jQuery(".insert-gallery").show()),0<e.not(".media-blank").length?jQuery(".savebutton").show():jQuery(".savebutton").hide()}function uploadSuccess(e,a){var r=jQuery("#media-item-"+e.id);"string"==typeof a&&(a=a.replace(/^<pre>(\d+)<\/pre>$/,"$1"),/media-upload-error|error-div/.test(a))?r.html(a):(r.find(".percent").html(pluploadL10n.crunching),prepareMediaItem(e,a),updateMediaForm(),post_id&&r.hasClass("child-of-"+post_id)&&jQuery("#attachments-count").text(+jQuery("#attachments-count").text()+1))}function setResize(e){e?window.resize_width&&window.resize_height?uploader.settings.resize={enabled:!0,width:window.resize_width,height:window.resize_height,quality:100}:uploader.settings.multipart_params.image_resize=!0:delete uploader.settings.multipart_params.image_resize}function prepareMediaItem(e,a){var r="undefined"==typeof shortform?1:2,t=jQuery("#media-item-"+e.id);2==r&&2<shortform&&(r=shortform);try{void 0!==topWin.tb_remove&&topWin.jQuery("#TB_overlay").click(topWin.tb_remove)}catch(e){}isNaN(a)||!a?(t.append(a),prepareMediaItemInit(e)):t.load("async-upload.php",{attachment_id:a,fetch:r},function(){prepareMediaItemInit(e),updateMediaForm()})}function prepareMediaItemInit(r){var e=jQuery("#media-item-"+r.id);jQuery(".thumbnail",e).clone().attr("class","pinkynail toggle").prependTo(e),jQuery(".filename.original",e).replaceWith(jQuery(".filename.new",e)),jQuery("a.delete",e).on("click",function(){return jQuery.ajax({url:ajaxurl,type:"post",success:deleteSuccess,error:deleteError,id:r.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"trash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")}}),!1}),jQuery("a.undo",e).on("click",function(){return jQuery.ajax({url:ajaxurl,type:"post",id:r.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"untrash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")},success:function(){var e,a=jQuery("#media-item-"+r.id);(e=jQuery("#type-of-"+r.id).val())&&jQuery("#"+e+"-counter").text(+jQuery("#"+e+"-counter").text()+1),post_id&&a.hasClass("child-of-"+post_id)&&jQuery("#attachments-count").text(+jQuery("#attachments-count").text()+1),jQuery(".filename .trashnotice",a).remove(),jQuery(".filename .title",a).css("font-weight","normal"),jQuery("a.undo",a).addClass("hidden"),jQuery(".menu_order_input",a).show(),a.css({backgroundColor:"#ceb"}).animate({backgroundColor:"#fff"},{queue:!1,duration:500,complete:function(){jQuery(this).css({backgroundColor:""})}}).removeClass("undo")}}),!1}),jQuery("#media-item-"+r.id+".startopen").removeClass("startopen").addClass("open").find("slidetoggle").fadeIn()}function wpQueueError(e){jQuery("#media-upload-error").show().html('<div class="notice notice-error"><p>'+e+"</p></div>")}function wpFileError(e,a){itemAjaxError(e.id,a)}function itemAjaxError(e,a){var r=jQuery("#media-item-"+e),t=r.find(".filename").text();r.data("last-err")!=e&&r.html('<div class="error-div"><a class="dismiss" href="#">'+pluploadL10n.dismiss+"</a><strong>"+pluploadL10n.error_uploading.replace("%s",jQuery.trim(t))+"</strong> "+a+"</div>").data("last-err",e)}function deleteSuccess(e){var a;return"-1"==e?itemAjaxError(this.id,"You do not have permission. Has your session expired?"):"0"==e?itemAjaxError(this.id,"Could not be deleted. Has it been deleted already?"):(e=this.id,a=jQuery("#media-item-"+e),(e=jQuery("#type-of-"+e).val())&&jQuery("#"+e+"-counter").text(jQuery("#"+e+"-counter").text()-1),post_id&&a.hasClass("child-of-"+post_id)&&jQuery("#attachments-count").text(jQuery("#attachments-count").text()-1),1==jQuery("form.type-form #media-items").children().length&&0<jQuery(".hidden","#media-items").length&&(jQuery(".toggle").toggle(),jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")),jQuery(".toggle",a).toggle(),jQuery(".slidetoggle",a).slideUp(200).siblings().removeClass("hidden"),a.css({backgroundColor:"#faa"}).animate({backgroundColor:"#f4f4f4"},{queue:!1,duration:500}).addClass("undo"),jQuery(".filename:empty",a).remove(),jQuery(".filename .title",a).css("font-weight","bold"),jQuery(".filename",a).append('<span class="trashnotice"> '+pluploadL10n.deleted+" </span>").siblings("a.toggle").hide(),jQuery(".filename",a).append(jQuery("a.undo",a).removeClass("hidden")),void jQuery(".menu_order_input",a).hide())}function deleteError(){}function uploadComplete(){jQuery("#insert-gallery").prop("disabled",!1)}function switchUploader(e){(e?(deleteUserSetting("uploader"),jQuery(".media-upload-form").removeClass("html-uploader"),"object"==typeof uploader&&uploader.refresh(),jQuery("#plupload-browse-button")):(setUserSetting("uploader","1"),jQuery(".media-upload-form").addClass("html-uploader"),jQuery("#async-upload"))).trigger("focus")}function uploadError(e,a,r,t){var i=104857600;switch(a){case plupload.FAILED:wpFileError(e,pluploadL10n.upload_failed);break;case plupload.FILE_EXTENSION_ERROR:wpFileExtensionError(t,e,pluploadL10n.invalid_filetype);break;case plupload.FILE_SIZE_ERROR:uploadSizeError(t,e);break;case plupload.IMAGE_FORMAT_ERROR:wpFileError(e,pluploadL10n.not_an_image);break;case plupload.IMAGE_MEMORY_ERROR:wpFileError(e,pluploadL10n.image_memory_exceeded);break;case plupload.IMAGE_DIMENSIONS_ERROR:wpFileError(e,pluploadL10n.image_dimensions_exceeded);break;case plupload.GENERIC_ERROR:wpQueueError(pluploadL10n.upload_failed);break;case plupload.IO_ERROR:i<parseInt(t.settings.filters.max_file_size,10)&&e.size>i?wpFileError(e,pluploadL10n.big_upload_failed.replace("%1$s",'<a class="uploader-html" href="#">').replace("%2$s","</a>")):wpQueueError(pluploadL10n.io_error);break;case plupload.HTTP_ERROR:wpQueueError(pluploadL10n.http_error);break;case plupload.INIT_ERROR:jQuery(".media-upload-form").addClass("html-uploader");break;case plupload.SECURITY_ERROR:wpQueueError(pluploadL10n.security_error);break;default:wpFileError(e,pluploadL10n.default_error)}}function uploadSizeError(e,a){var r=pluploadL10n.file_exceeds_size_limit.replace("%s",a.name),r=jQuery("<div />").attr({id:"media-item-"+a.id,class:"media-item error"}).append(jQuery("<p />").text(r));jQuery("#media-items").append(r),e.removeFile(a)}function wpFileExtensionError(e,a,r){jQuery("#media-items").append('<div id="media-item-'+a.id+'" class="media-item error"><p>'+r+"</p></div>"),e.removeFile(a)}function copyAttachmentUploadURLClipboard(){var t;new ClipboardJS(".copy-attachment-url").on("success",function(e){var a=jQuery(e.trigger),r=jQuery(".success",a.closest(".copy-to-clipboard-container"));e.clearSelection(),clearTimeout(t),r.removeClass("hidden"),t=setTimeout(function(){r.addClass("hidden")},3e3),wp.a11y.speak(pluploadL10n.file_url_copied)})}jQuery(document).ready(function(o){copyAttachmentUploadURLClipboard();var d,l={};o(".media-upload-form").on("click.uploader",function(e){var a,r=o(e.target);r.is('input[type="radio"]')?(a=r.closest("tr")).hasClass("align")?setUserSetting("align",r.val()):a.hasClass("image-size")&&setUserSetting("imgsize",r.val()):r.is("button.button")?(a=(a=e.target.className||"").match(/url([^ '"]+)/))&&a[1]&&(setUserSetting("urlbutton",a[1]),r.siblings(".urlfield").val(r.data("link-url"))):r.is("a.dismiss")?r.parents(".media-item").fadeOut(200,function(){o(this).remove()}):r.is(".upload-flash-bypass button")||r.is("a.uploader-html")?(o("#media-items, p.submit, span.big-file-warning").css("display","none"),switchUploader(0),e.preventDefault()):r.is(".upload-html-bypass button")?(o("#media-items, p.submit, span.big-file-warning").css("display",""),switchUploader(1),e.preventDefault()):r.is("a.describe-toggle-on")?(r.parent().addClass("open"),r.siblings(".slidetoggle").fadeIn(250,function(){var e=o(window).scrollTop(),a=o(window).height(),r=o(this).offset().top,t=o(this).height();a&&r&&t&&(a=e+a)<(t=r+t)&&(t-a<r-e?window.scrollBy(0,t-a+10):window.scrollBy(0,r-e-40))}),e.preventDefault()):r.is("a.describe-toggle-off")&&(r.siblings(".slidetoggle").fadeOut(250,function(){r.parent().removeClass("open")}),e.preventDefault())}),d=function(a,r){var e,t,i=r.file;r&&r.responseHeaders&&(t=r.responseHeaders.match(/x-wp-upload-attachment-id:\s*(\d+)/i))&&t[1]?(t=t[1],(e=l[i.id])&&4<e?(o.ajax({type:"post",url:ajaxurl,dataType:"json",data:{action:"media-create-image-subsizes",_wpnonce:wpUploaderInit.multipart_params._wpnonce,attachment_id:t,_wp_upload_failed_cleanup:!0}}),r.message&&(r.status<500||600<=r.status)?wpQueueError(r.message):wpQueueError(pluploadL10n.http_error_image)):(l[i.id]=e?++e:1,o.ajax({type:"post",url:ajaxurl,dataType:"json",data:{action:"media-create-image-subsizes",_wpnonce:wpUploaderInit.multipart_params._wpnonce,attachment_id:t,_legacy_support:"true"}}).done(function(e){var a;e.success?uploadSuccess(i,e.data.id):wpQueueError((a=e.data&&e.data.message?e.data.message:a)||pluploadL10n.http_error_image)}).fail(function(e){500<=e.status&&e.status<600?d(a,r):wpQueueError(pluploadL10n.http_error_image)}))):wpQueueError(pluploadL10n.http_error_image)},uploader_init=function(){uploader=new plupload.Uploader(wpUploaderInit),o("#image_resize").on("change",function(){var e=o(this).prop("checked");setResize(e),e?setUserSetting("upload_resize","1"):deleteUserSetting("upload_resize")}),uploader.bind("Init",function(e){var a=o("#plupload-upload-ui");setResize(getUserSetting("upload_resize",!1)),e.features.dragdrop&&!o(document.body).hasClass("mobile")?(a.addClass("drag-drop"),o("#drag-drop-area").on("dragover.wp-uploader",function(){a.addClass("drag-over")}).on("dragleave.wp-uploader, drop.wp-uploader",function(){a.removeClass("drag-over")})):(a.removeClass("drag-drop"),o("#drag-drop-area").off(".wp-uploader")),"html4"===e.runtime&&o(".upload-flash-bypass").hide()}),uploader.bind("postinit",function(e){e.refresh()}),uploader.init(),uploader.bind("FilesAdded",function(a,e){o("#media-upload-error").empty(),uploadStart(),plupload.each(e,function(e){if("image/heic"===e.type&&a.settings.heic_upload_error)wpQueueError(pluploadL10n.unsupported_image);else{if("image/webp"===e.type&&a.settings.webp_upload_error)return wpQueueError(pluploadL10n.noneditable_image),void a.removeFile(e);if("image/avif"===e.type&&a.settings.avif_upload_error)return wpQueueError(pluploadL10n.noneditable_image),void a.removeFile(e)}fileQueued(e)}),a.refresh(),a.start()}),uploader.bind("UploadFile",function(e,a){fileUploading(e,a)}),uploader.bind("UploadProgress",function(e,a){uploadProgress(e,a)}),uploader.bind("Error",function(e,a){var r=a.file&&a.file.type&&0===a.file.type.indexOf("image/"),t=a&&a.status;r&&500<=t&&t<600?d(e,a):(uploadError(a.file,a.code,a.message,e),e.refresh())}),uploader.bind("FileUploaded",function(e,a,r){uploadSuccess(a,r.response)}),uploader.bind("UploadComplete",function(){uploadComplete()})},"object"==typeof wpUploaderInit&&uploader_init()});                                                                                                                                                                                                                                                             plupload/license.txt                                                                                0000644                 00000043103 15212564044 0010553 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       		    GNU GENERAL PUBLIC LICENSE
		       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

			    Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

		    GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

  1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

  9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

			    NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

		     END OF TERMS AND CONDITIONS

	    How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) year name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

  <signature of Ty Coon>, 1 April 1989
  Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
                                                                                                                                                                                                                                                                                                                                                                                                                                                             plupload/moxie.js                                                                                   0000644                 00000760606 15212564044 0010065 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       ;var MXI_DEBUG = false;
/**
 * mOxie - multi-runtime File API & XMLHttpRequest L2 Polyfill
 * v1.3.5.1
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 *
 * Date: 2016-05-15
 */
/**
 * Compiled inline version. (Library mode)
 */

/**
 * Modified for WordPress.
 * - Silverlight and Flash runtimes support was removed. See https://core.trac.wordpress.org/ticket/41755.
 * - A stray Unicode character has been removed. See https://core.trac.wordpress.org/ticket/59329.
 *
 * This is a de-facto fork of the mOxie library that will be maintained by WordPress due to upstream license changes
 * that are incompatible with the GPL.
 */

/*jshint smarttabs:true, undef:true, latedef:true, curly:true, bitwise:true, camelcase:true */
/*globals $code */

(function(exports, undefined) {
	"use strict";

	var modules = {};

	function require(ids, callback) {
		var module, defs = [];

		for (var i = 0; i < ids.length; ++i) {
			module = modules[ids[i]] || resolve(ids[i]);
			if (!module) {
				throw 'module definition dependecy not found: ' + ids[i];
			}

			defs.push(module);
		}

		callback.apply(null, defs);
	}

	function define(id, dependencies, definition) {
		if (typeof id !== 'string') {
			throw 'invalid module definition, module id must be defined and be a string';
		}

		if (dependencies === undefined) {
			throw 'invalid module definition, dependencies must be specified';
		}

		if (definition === undefined) {
			throw 'invalid module definition, definition function must be specified';
		}

		require(dependencies, function() {
			modules[id] = definition.apply(null, arguments);
		});
	}

	function defined(id) {
		return !!modules[id];
	}

	function resolve(id) {
		var target = exports;
		var fragments = id.split(/[.\/]/);

		for (var fi = 0; fi < fragments.length; ++fi) {
			if (!target[fragments[fi]]) {
				return;
			}

			target = target[fragments[fi]];
		}

		return target;
	}

	function expose(ids) {
		for (var i = 0; i < ids.length; i++) {
			var target = exports;
			var id = ids[i];
			var fragments = id.split(/[.\/]/);

			for (var fi = 0; fi < fragments.length - 1; ++fi) {
				if (target[fragments[fi]] === undefined) {
					target[fragments[fi]] = {};
				}

				target = target[fragments[fi]];
			}

			target[fragments[fragments.length - 1]] = modules[id];
		}
	}

// Included from: src/javascript/core/utils/Basic.js

/**
 * Basic.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

define('moxie/core/utils/Basic', [], function() {
	/**
	Gets the true type of the built-in object (better version of typeof).
	@author Angus Croll (http://javascriptweblog.wordpress.com/)

	@method typeOf
	@for Utils
	@static
	@param {Object} o Object to check.
	@return {String} Object [[Class]]
	*/
	var typeOf = function(o) {
		var undef;

		if (o === undef) {
			return 'undefined';
		} else if (o === null) {
			return 'null';
		} else if (o.nodeType) {
			return 'node';
		}

		// the snippet below is awesome, however it fails to detect null, undefined and arguments types in IE lte 8
		return ({}).toString.call(o).match(/\s([a-z|A-Z]+)/)[1].toLowerCase();
	};
		
	/**
	Extends the specified object with another object.

	@method extend
	@static
	@param {Object} target Object to extend.
	@param {Object} [obj]* Multiple objects to extend with.
	@return {Object} Same as target, the extended object.
	*/
	var extend = function(target) {
		var undef;

		each(arguments, function(arg, i) {
			if (i > 0) {
				each(arg, function(value, key) {
					if (value !== undef) {
						if (typeOf(target[key]) === typeOf(value) && !!~inArray(typeOf(value), ['array', 'object'])) {
							extend(target[key], value);
						} else {
							target[key] = value;
						}
					}
				});
			}
		});
		return target;
	};
		
	/**
	Executes the callback function for each item in array/object. If you return false in the
	callback it will break the loop.

	@method each
	@static
	@param {Object} obj Object to iterate.
	@param {function} callback Callback function to execute for each item.
	*/
	var each = function(obj, callback) {
		var length, key, i, undef;

		if (obj) {
			if (typeOf(obj.length) === 'number') { // it might be Array, FileList or even arguments object
				// Loop array items
				for (i = 0, length = obj.length; i < length; i++) {
					if (callback(obj[i], i) === false) {
						return;
					}
				}
			} else if (typeOf(obj) === 'object') {
				// Loop object items
				for (key in obj) {
					if (obj.hasOwnProperty(key)) {
						if (callback(obj[key], key) === false) {
							return;
						}
					}
				}
			}
		}
	};

	/**
	Checks if object is empty.
	
	@method isEmptyObj
	@static
	@param {Object} o Object to check.
	@return {Boolean}
	*/
	var isEmptyObj = function(obj) {
		var prop;

		if (!obj || typeOf(obj) !== 'object') {
			return true;
		}

		for (prop in obj) {
			return false;
		}

		return true;
	};

	/**
	Recieve an array of functions (usually async) to call in sequence, each  function
	receives a callback as first argument that it should call, when it completes. Finally,
	after everything is complete, main callback is called. Passing truthy value to the
	callback as a first argument will interrupt the sequence and invoke main callback
	immediately.

	@method inSeries
	@static
	@param {Array} queue Array of functions to call in sequence
	@param {Function} cb Main callback that is called in the end, or in case of error
	*/
	var inSeries = function(queue, cb) {
		var i = 0, length = queue.length;

		if (typeOf(cb) !== 'function') {
			cb = function() {};
		}

		if (!queue || !queue.length) {
			cb();
		}

		function callNext(i) {
			if (typeOf(queue[i]) === 'function') {
				queue[i](function(error) {
					/*jshint expr:true */
					++i < length && !error ? callNext(i) : cb(error);
				});
			}
		}
		callNext(i);
	};


	/**
	Recieve an array of functions (usually async) to call in parallel, each  function
	receives a callback as first argument that it should call, when it completes. After 
	everything is complete, main callback is called. Passing truthy value to the
	callback as a first argument will interrupt the process and invoke main callback
	immediately.

	@method inParallel
	@static
	@param {Array} queue Array of functions to call in sequence
	@param {Function} cb Main callback that is called in the end, or in case of error
	*/
	var inParallel = function(queue, cb) {
		var count = 0, num = queue.length, cbArgs = new Array(num);

		each(queue, function(fn, i) {
			fn(function(error) {
				if (error) {
					return cb(error);
				}
				
				var args = [].slice.call(arguments);
				args.shift(); // strip error - undefined or not

				cbArgs[i] = args;
				count++;

				if (count === num) {
					cbArgs.unshift(null);
					cb.apply(this, cbArgs);
				} 
			});
		});
	};
	
	
	/**
	Find an element in array and return it's index if present, otherwise return -1.
	
	@method inArray
	@static
	@param {Mixed} needle Element to find
	@param {Array} array
	@return {Int} Index of the element, or -1 if not found
	*/
	var inArray = function(needle, array) {
		if (array) {
			if (Array.prototype.indexOf) {
				return Array.prototype.indexOf.call(array, needle);
			}
		
			for (var i = 0, length = array.length; i < length; i++) {
				if (array[i] === needle) {
					return i;
				}
			}
		}
		return -1;
	};


	/**
	Returns elements of first array if they are not present in second. And false - otherwise.

	@private
	@method arrayDiff
	@param {Array} needles
	@param {Array} array
	@return {Array|Boolean}
	*/
	var arrayDiff = function(needles, array) {
		var diff = [];

		if (typeOf(needles) !== 'array') {
			needles = [needles];
		}

		if (typeOf(array) !== 'array') {
			array = [array];
		}

		for (var i in needles) {
			if (inArray(needles[i], array) === -1) {
				diff.push(needles[i]);
			}	
		}
		return diff.length ? diff : false;
	};


	/**
	Find intersection of two arrays.

	@private
	@method arrayIntersect
	@param {Array} array1
	@param {Array} array2
	@return {Array} Intersection of two arrays or null if there is none
	*/
	var arrayIntersect = function(array1, array2) {
		var result = [];
		each(array1, function(item) {
			if (inArray(item, array2) !== -1) {
				result.push(item);
			}
		});
		return result.length ? result : null;
	};
	
	
	/**
	Forces anything into an array.
	
	@method toArray
	@static
	@param {Object} obj Object with length field.
	@return {Array} Array object containing all items.
	*/
	var toArray = function(obj) {
		var i, arr = [];

		for (i = 0; i < obj.length; i++) {
			arr[i] = obj[i];
		}

		return arr;
	};
	
			
	/**
	Generates an unique ID. The only way a user would be able to get the same ID is if the two persons
	at the same exact millisecond manage to get the same 5 random numbers between 0-65535; it also uses 
	a counter so each ID is guaranteed to be unique for the given page. It is more probable for the earth 
	to be hit with an asteroid.
	
	@method guid
	@static
	@param {String} prefix to prepend (by default 'o' will be prepended).
	@method guid
	@return {String} Virtually unique id.
	*/
	var guid = (function() {
		var counter = 0;
		
		return function(prefix) {
			var guid = new Date().getTime().toString(32), i;

			for (i = 0; i < 5; i++) {
				guid += Math.floor(Math.random() * 65535).toString(32);
			}
			
			return (prefix || 'o_') + guid + (counter++).toString(32);
		};
	}());
	

	/**
	Trims white spaces around the string
	
	@method trim
	@static
	@param {String} str
	@return {String}
	*/
	var trim = function(str) {
		if (!str) {
			return str;
		}
		return String.prototype.trim ? String.prototype.trim.call(str) : str.toString().replace(/^\s*/, '').replace(/\s*$/, '');
	};


	/**
	Parses the specified size string into a byte value. For example 10kb becomes 10240.
	
	@method parseSizeStr
	@static
	@param {String/Number} size String to parse or number to just pass through.
	@return {Number} Size in bytes.
	*/
	var parseSizeStr = function(size) {
		if (typeof(size) !== 'string') {
			return size;
		}
		
		var muls = {
				t: 1099511627776,
				g: 1073741824,
				m: 1048576,
				k: 1024
			},
			mul;


		size = /^([0-9\.]+)([tmgk]?)$/.exec(size.toLowerCase().replace(/[^0-9\.tmkg]/g, ''));
		mul = size[2];
		size = +size[1];
		
		if (muls.hasOwnProperty(mul)) {
			size *= muls[mul];
		}
		return Math.floor(size);
	};


	/**
	 * Pseudo sprintf implementation - simple way to replace tokens with specified values.
	 *
	 * @param {String} str String with tokens
	 * @return {String} String with replaced tokens
	 */
	var sprintf = function(str) {
		var args = [].slice.call(arguments, 1);

		return str.replace(/%[a-z]/g, function() {
			var value = args.shift();
			return typeOf(value) !== 'undefined' ? value : '';
		});
	};
	

	return {
		guid: guid,
		typeOf: typeOf,
		extend: extend,
		each: each,
		isEmptyObj: isEmptyObj,
		inSeries: inSeries,
		inParallel: inParallel,
		inArray: inArray,
		arrayDiff: arrayDiff,
		arrayIntersect: arrayIntersect,
		toArray: toArray,
		trim: trim,
		sprintf: sprintf,
		parseSizeStr: parseSizeStr
	};
});

// Included from: src/javascript/core/utils/Env.js

/**
 * Env.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

define("moxie/core/utils/Env", [
	"moxie/core/utils/Basic"
], function(Basic) {
	
	/**
	 * UAParser.js v0.7.7
	 * Lightweight JavaScript-based User-Agent string parser
	 * https://github.com/faisalman/ua-parser-js
	 *
	 * Copyright Â© 2012-2015 Faisal Salman <fyzlman@gmail.com>
	 * Dual licensed under GPLv2 & MIT
	 */
	var UAParser = (function (undefined) {

	    //////////////
	    // Constants
	    /////////////


	    var EMPTY       = '',
	        UNKNOWN     = '?',
	        FUNC_TYPE   = 'function',
	        UNDEF_TYPE  = 'undefined',
	        OBJ_TYPE    = 'object',
	        MAJOR       = 'major',
	        MODEL       = 'model',
	        NAME        = 'name',
	        TYPE        = 'type',
	        VENDOR      = 'vendor',
	        VERSION     = 'version',
	        ARCHITECTURE= 'architecture',
	        CONSOLE     = 'console',
	        MOBILE      = 'mobile',
	        TABLET      = 'tablet';


	    ///////////
	    // Helper
	    //////////


	    var util = {
	        has : function (str1, str2) {
	            return str2.toLowerCase().indexOf(str1.toLowerCase()) !== -1;
	        },
	        lowerize : function (str) {
	            return str.toLowerCase();
	        }
	    };


	    ///////////////
	    // Map helper
	    //////////////


	    var mapper = {

	        rgx : function () {

	            // loop through all regexes maps
	            for (var result, i = 0, j, k, p, q, matches, match, args = arguments; i < args.length; i += 2) {

	                var regex = args[i],       // even sequence (0,2,4,..)
	                    props = args[i + 1];   // odd sequence (1,3,5,..)

	                // construct object barebones
	                if (typeof(result) === UNDEF_TYPE) {
	                    result = {};
	                    for (p in props) {
	                        q = props[p];
	                        if (typeof(q) === OBJ_TYPE) {
	                            result[q[0]] = undefined;
	                        } else {
	                            result[q] = undefined;
	                        }
	                    }
	                }

	                // try matching uastring with regexes
	                for (j = k = 0; j < regex.length; j++) {
	                    matches = regex[j].exec(this.getUA());
	                    if (!!matches) {
	                        for (p = 0; p < props.length; p++) {
	                            match = matches[++k];
	                            q = props[p];
	                            // check if given property is actually array
	                            if (typeof(q) === OBJ_TYPE && q.length > 0) {
	                                if (q.length == 2) {
	                                    if (typeof(q[1]) == FUNC_TYPE) {
	                                        // assign modified match
	                                        result[q[0]] = q[1].call(this, match);
	                                    } else {
	                                        // assign given value, ignore regex match
	                                        result[q[0]] = q[1];
	                                    }
	                                } else if (q.length == 3) {
	                                    // check whether function or regex
	                                    if (typeof(q[1]) === FUNC_TYPE && !(q[1].exec && q[1].test)) {
	                                        // call function (usually string mapper)
	                                        result[q[0]] = match ? q[1].call(this, match, q[2]) : undefined;
	                                    } else {
	                                        // sanitize match using given regex
	                                        result[q[0]] = match ? match.replace(q[1], q[2]) : undefined;
	                                    }
	                                } else if (q.length == 4) {
	                                        result[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined;
	                                }
	                            } else {
	                                result[q] = match ? match : undefined;
	                            }
	                        }
	                        break;
	                    }
	                }

	                if(!!matches) break; // break the loop immediately if match found
	            }
	            return result;
	        },

	        str : function (str, map) {

	            for (var i in map) {
	                // check if array
	                if (typeof(map[i]) === OBJ_TYPE && map[i].length > 0) {
	                    for (var j = 0; j < map[i].length; j++) {
	                        if (util.has(map[i][j], str)) {
	                            return (i === UNKNOWN) ? undefined : i;
	                        }
	                    }
	                } else if (util.has(map[i], str)) {
	                    return (i === UNKNOWN) ? undefined : i;
	                }
	            }
	            return str;
	        }
	    };


	    ///////////////
	    // String map
	    //////////////


	    var maps = {

	        browser : {
	            oldsafari : {
	                major : {
	                    '1' : ['/8', '/1', '/3'],
	                    '2' : '/4',
	                    '?' : '/'
	                },
	                version : {
	                    '1.0'   : '/8',
	                    '1.2'   : '/1',
	                    '1.3'   : '/3',
	                    '2.0'   : '/412',
	                    '2.0.2' : '/416',
	                    '2.0.3' : '/417',
	                    '2.0.4' : '/419',
	                    '?'     : '/'
	                }
	            }
	        },

	        device : {
	            sprint : {
	                model : {
	                    'Evo Shift 4G' : '7373KT'
	                },
	                vendor : {
	                    'HTC'       : 'APA',
	                    'Sprint'    : 'Sprint'
	                }
	            }
	        },

	        os : {
	            windows : {
	                version : {
	                    'ME'        : '4.90',
	                    'NT 3.11'   : 'NT3.51',
	                    'NT 4.0'    : 'NT4.0',
	                    '2000'      : 'NT 5.0',
	                    'XP'        : ['NT 5.1', 'NT 5.2'],
	                    'Vista'     : 'NT 6.0',
	                    '7'         : 'NT 6.1',
	                    '8'         : 'NT 6.2',
	                    '8.1'       : 'NT 6.3',
	                    'RT'        : 'ARM'
	                }
	            }
	        }
	    };


	    //////////////
	    // Regex map
	    /////////////


	    var regexes = {

	        browser : [[
	        
	            // Presto based
	            /(opera\smini)\/([\w\.-]+)/i,                                       // Opera Mini
	            /(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,                      // Opera Mobi/Tablet
	            /(opera).+version\/([\w\.]+)/i,                                     // Opera > 9.80
	            /(opera)[\/\s]+([\w\.]+)/i                                          // Opera < 9.80

	            ], [NAME, VERSION], [

	            /\s(opr)\/([\w\.]+)/i                                               // Opera Webkit
	            ], [[NAME, 'Opera'], VERSION], [

	            // Mixed
	            /(kindle)\/([\w\.]+)/i,                                             // Kindle
	            /(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]+)*/i,
	                                                                                // Lunascape/Maxthon/Netfront/Jasmine/Blazer

	            // Trident based
	            /(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i,
	                                                                                // Avant/IEMobile/SlimBrowser/Baidu
	            /(?:ms|\()(ie)\s([\w\.]+)/i,                                        // Internet Explorer

	            // Webkit/KHTML based
	            /(rekonq)\/([\w\.]+)*/i,                                            // Rekonq
	            /(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi)\/([\w\.-]+)/i
	                                                                                // Chromium/Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron
	            ], [NAME, VERSION], [

	            /(trident).+rv[:\s]([\w\.]+).+like\sgecko/i                         // IE11
	            ], [[NAME, 'IE'], VERSION], [

	            /(edge)\/((\d+)?[\w\.]+)/i                                          // Microsoft Edge
	            ], [NAME, VERSION], [

	            /(yabrowser)\/([\w\.]+)/i                                           // Yandex
	            ], [[NAME, 'Yandex'], VERSION], [

	            /(comodo_dragon)\/([\w\.]+)/i                                       // Comodo Dragon
	            ], [[NAME, /_/g, ' '], VERSION], [

	            /(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i,
	                                                                                // Chrome/OmniWeb/Arora/Tizen/Nokia
	            /(uc\s?browser|qqbrowser)[\/\s]?([\w\.]+)/i
	                                                                                // UCBrowser/QQBrowser
	            ], [NAME, VERSION], [

	            /(dolfin)\/([\w\.]+)/i                                              // Dolphin
	            ], [[NAME, 'Dolphin'], VERSION], [

	            /((?:android.+)crmo|crios)\/([\w\.]+)/i                             // Chrome for Android/iOS
	            ], [[NAME, 'Chrome'], VERSION], [

	            /XiaoMi\/MiuiBrowser\/([\w\.]+)/i                                   // MIUI Browser
	            ], [VERSION, [NAME, 'MIUI Browser']], [

	            /android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)/i         // Android Browser
	            ], [VERSION, [NAME, 'Android Browser']], [

	            /FBAV\/([\w\.]+);/i                                                 // Facebook App for iOS
	            ], [VERSION, [NAME, 'Facebook']], [

	            /version\/([\w\.]+).+?mobile\/\w+\s(safari)/i                       // Mobile Safari
	            ], [VERSION, [NAME, 'Mobile Safari']], [

	            /version\/([\w\.]+).+?(mobile\s?safari|safari)/i                    // Safari & Safari Mobile
	            ], [VERSION, NAME], [

	            /webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i                     // Safari < 3.0
	            ], [NAME, [VERSION, mapper.str, maps.browser.oldsafari.version]], [

	            /(konqueror)\/([\w\.]+)/i,                                          // Konqueror
	            /(webkit|khtml)\/([\w\.]+)/i
	            ], [NAME, VERSION], [

	            // Gecko based
	            /(navigator|netscape)\/([\w\.-]+)/i                                 // Netscape
	            ], [[NAME, 'Netscape'], VERSION], [
	            /(swiftfox)/i,                                                      // Swiftfox
	            /(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,
	                                                                                // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror
	            /(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\/([\w\.-]+)/i,
	                                                                                // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix
	            /(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,                          // Mozilla

	            // Other
	            /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf)[\/\s]?([\w\.]+)/i,
	                                                                                // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf
	            /(links)\s\(([\w\.]+)/i,                                            // Links
	            /(gobrowser)\/?([\w\.]+)*/i,                                        // GoBrowser
	            /(ice\s?browser)\/v?([\w\._]+)/i,                                   // ICE Browser
	            /(mosaic)[\/\s]([\w\.]+)/i                                          // Mosaic
	            ], [NAME, VERSION]
	        ],

	        engine : [[

	            /windows.+\sedge\/([\w\.]+)/i                                       // EdgeHTML
	            ], [VERSION, [NAME, 'EdgeHTML']], [

	            /(presto)\/([\w\.]+)/i,                                             // Presto
	            /(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i,     // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m
	            /(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,                          // KHTML/Tasman/Links
	            /(icab)[\/\s]([23]\.[\d\.]+)/i                                      // iCab
	            ], [NAME, VERSION], [

	            /rv\:([\w\.]+).*(gecko)/i                                           // Gecko
	            ], [VERSION, NAME]
	        ],

	        os : [[

	            // Windows based
	            /microsoft\s(windows)\s(vista|xp)/i                                 // Windows (iTunes)
	            ], [NAME, VERSION], [
	            /(windows)\snt\s6\.2;\s(arm)/i,                                     // Windows RT
	            /(windows\sphone(?:\sos)*|windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i
	            ], [NAME, [VERSION, mapper.str, maps.os.windows.version]], [
	            /(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i
	            ], [[NAME, 'Windows'], [VERSION, mapper.str, maps.os.windows.version]], [

	            // Mobile/Embedded OS
	            /\((bb)(10);/i                                                      // BlackBerry 10
	            ], [[NAME, 'BlackBerry'], VERSION], [
	            /(blackberry)\w*\/?([\w\.]+)*/i,                                    // Blackberry
	            /(tizen)[\/\s]([\w\.]+)/i,                                          // Tizen
	            /(android|webos|palm\os|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]+)*/i,
	                                                                                // Android/WebOS/Palm/QNX/Bada/RIM/MeeGo/Contiki
	            /linux;.+(sailfish);/i                                              // Sailfish OS
	            ], [NAME, VERSION], [
	            /(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]+)*/i                 // Symbian
	            ], [[NAME, 'Symbian'], VERSION], [
	            /\((series40);/i                                                    // Series 40
	            ], [NAME], [
	            /mozilla.+\(mobile;.+gecko.+firefox/i                               // Firefox OS
	            ], [[NAME, 'Firefox OS'], VERSION], [

	            // Console
	            /(nintendo|playstation)\s([wids3portablevu]+)/i,                    // Nintendo/Playstation

	            // GNU/Linux based
	            /(mint)[\/\s\(]?(\w+)*/i,                                           // Mint
	            /(mageia|vectorlinux)[;\s]/i,                                       // Mageia/VectorLinux
	            /(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?([\w\.-]+)*/i,
	                                                                                // Joli/Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware
	                                                                                // Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus
	            /(hurd|linux)\s?([\w\.]+)*/i,                                       // Hurd/Linux
	            /(gnu)\s?([\w\.]+)*/i                                               // GNU
	            ], [NAME, VERSION], [

	            /(cros)\s[\w]+\s([\w\.]+\w)/i                                       // Chromium OS
	            ], [[NAME, 'Chromium OS'], VERSION],[

	            // Solaris
	            /(sunos)\s?([\w\.]+\d)*/i                                           // Solaris
	            ], [[NAME, 'Solaris'], VERSION], [

	            // BSD based
	            /\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i                   // FreeBSD/NetBSD/OpenBSD/PC-BSD/DragonFly
	            ], [NAME, VERSION],[

	            /(ip[honead]+)(?:.*os\s*([\w]+)*\slike\smac|;\sopera)/i             // iOS
	            ], [[NAME, 'iOS'], [VERSION, /_/g, '.']], [

	            /(mac\sos\sx)\s?([\w\s\.]+\w)*/i,
	            /(macintosh|mac(?=_powerpc)\s)/i                                    // Mac OS
	            ], [[NAME, 'Mac OS'], [VERSION, /_/g, '.']], [

	            // Other
	            /((?:open)?solaris)[\/\s-]?([\w\.]+)*/i,                            // Solaris
	            /(haiku)\s(\w+)/i,                                                  // Haiku
	            /(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i,                               // AIX
	            /(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i,
	                                                                                // Plan9/Minix/BeOS/OS2/AmigaOS/MorphOS/RISCOS/OpenVMS
	            /(unix)\s?([\w\.]+)*/i                                              // UNIX
	            ], [NAME, VERSION]
	        ]
	    };


	    /////////////////
	    // Constructor
	    ////////////////


	    var UAParser = function (uastring) {

	        var ua = uastring || ((window && window.navigator && window.navigator.userAgent) ? window.navigator.userAgent : EMPTY);

	        this.getBrowser = function () {
	            return mapper.rgx.apply(this, regexes.browser);
	        };
	        this.getEngine = function () {
	            return mapper.rgx.apply(this, regexes.engine);
	        };
	        this.getOS = function () {
	            return mapper.rgx.apply(this, regexes.os);
	        };
	        this.getResult = function() {
	            return {
	                ua      : this.getUA(),
	                browser : this.getBrowser(),
	                engine  : this.getEngine(),
	                os      : this.getOS()
	            };
	        };
	        this.getUA = function () {
	            return ua;
	        };
	        this.setUA = function (uastring) {
	            ua = uastring;
	            return this;
	        };
	        this.setUA(ua);
	    };

	    return UAParser;
	})();


	function version_compare(v1, v2, operator) {
	  // From: http://phpjs.org/functions
	  // +      original by: Philippe Jausions (http://pear.php.net/user/jausions)
	  // +      original by: Aidan Lister (http://aidanlister.com/)
	  // + reimplemented by: Kankrelune (http://www.webfaktory.info/)
	  // +      improved by: Brett Zamir (http://brett-zamir.me)
	  // +      improved by: Scott Baker
	  // +      improved by: Theriault
	  // *        example 1: version_compare('8.2.5rc', '8.2.5a');
	  // *        returns 1: 1
	  // *        example 2: version_compare('8.2.50', '8.2.52', '<');
	  // *        returns 2: true
	  // *        example 3: version_compare('5.3.0-dev', '5.3.0');
	  // *        returns 3: -1
	  // *        example 4: version_compare('4.1.0.52','4.01.0.51');
	  // *        returns 4: 1

	  // Important: compare must be initialized at 0.
	  var i = 0,
	    x = 0,
	    compare = 0,
	    // vm maps textual PHP versions to negatives so they're less than 0.
	    // PHP currently defines these as CASE-SENSITIVE. It is important to
	    // leave these as negatives so that they can come before numerical versions
	    // and as if no letters were there to begin with.
	    // (1alpha is < 1 and < 1.1 but > 1dev1)
	    // If a non-numerical value can't be mapped to this table, it receives
	    // -7 as its value.
	    vm = {
	      'dev': -6,
	      'alpha': -5,
	      'a': -5,
	      'beta': -4,
	      'b': -4,
	      'RC': -3,
	      'rc': -3,
	      '#': -2,
	      'p': 1,
	      'pl': 1
	    },
	    // This function will be called to prepare each version argument.
	    // It replaces every _, -, and + with a dot.
	    // It surrounds any nonsequence of numbers/dots with dots.
	    // It replaces sequences of dots with a single dot.
	    //    version_compare('4..0', '4.0') == 0
	    // Important: A string of 0 length needs to be converted into a value
	    // even less than an unexisting value in vm (-7), hence [-8].
	    // It's also important to not strip spaces because of this.
	    //   version_compare('', ' ') == 1
	    prepVersion = function (v) {
	      v = ('' + v).replace(/[_\-+]/g, '.');
	      v = v.replace(/([^.\d]+)/g, '.$1.').replace(/\.{2,}/g, '.');
	      return (!v.length ? [-8] : v.split('.'));
	    },
	    // This converts a version component to a number.
	    // Empty component becomes 0.
	    // Non-numerical component becomes a negative number.
	    // Numerical component becomes itself as an integer.
	    numVersion = function (v) {
	      return !v ? 0 : (isNaN(v) ? vm[v] || -7 : parseInt(v, 10));
	    };

	  v1 = prepVersion(v1);
	  v2 = prepVersion(v2);
	  x = Math.max(v1.length, v2.length);
	  for (i = 0; i < x; i++) {
	    if (v1[i] == v2[i]) {
	      continue;
	    }
	    v1[i] = numVersion(v1[i]);
	    v2[i] = numVersion(v2[i]);
	    if (v1[i] < v2[i]) {
	      compare = -1;
	      break;
	    } else if (v1[i] > v2[i]) {
	      compare = 1;
	      break;
	    }
	  }
	  if (!operator) {
	    return compare;
	  }

	  // Important: operator is CASE-SENSITIVE.
	  // "No operator" seems to be treated as "<."
	  // Any other values seem to make the function return null.
	  switch (operator) {
	  case '>':
	  case 'gt':
	    return (compare > 0);
	  case '>=':
	  case 'ge':
	    return (compare >= 0);
	  case '<=':
	  case 'le':
	    return (compare <= 0);
	  case '==':
	  case '=':
	  case 'eq':
	    return (compare === 0);
	  case '<>':
	  case '!=':
	  case 'ne':
	    return (compare !== 0);
	  case '':
	  case '<':
	  case 'lt':
	    return (compare < 0);
	  default:
	    return null;
	  }
	}


	var can = (function() {
		var caps = {
				define_property: (function() {
					/* // currently too much extra code required, not exactly worth it
					try { // as of IE8, getters/setters are supported only on DOM elements
						var obj = {};
						if (Object.defineProperty) {
							Object.defineProperty(obj, 'prop', {
								enumerable: true,
								configurable: true
							});
							return true;
						}
					} catch(ex) {}

					if (Object.prototype.__defineGetter__ && Object.prototype.__defineSetter__) {
						return true;
					}*/
					return false;
				}()),

				create_canvas: (function() {
					// On the S60 and BB Storm, getContext exists, but always returns undefined
					// so we actually have to call getContext() to verify
					// github.com/Modernizr/Modernizr/issues/issue/97/
					var el = document.createElement('canvas');
					return !!(el.getContext && el.getContext('2d'));
				}()),

				return_response_type: function(responseType) {
					try {
						if (Basic.inArray(responseType, ['', 'text', 'document']) !== -1) {
							return true;
						} else if (window.XMLHttpRequest) {
							var xhr = new XMLHttpRequest();
							xhr.open('get', '/'); // otherwise Gecko throws an exception
							if ('responseType' in xhr) {
								xhr.responseType = responseType;
								// as of 23.0.1271.64, Chrome switched from throwing exception to merely logging it to the console (why? o why?)
								if (xhr.responseType !== responseType) {
									return false;
								}
								return true;
							}
						}
					} catch (ex) {}
					return false;
				},

				// ideas for this heavily come from Modernizr (http://modernizr.com/)
				use_data_uri: (function() {
					var du = new Image();

					du.onload = function() {
						caps.use_data_uri = (du.width === 1 && du.height === 1);
					};
					
					setTimeout(function() {
						du.src = "data:image/gif;base64,R0lGODlhAQABAIAAAP8AAAAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==";
					}, 1);
					return false;
				}()),

				use_data_uri_over32kb: function() { // IE8
					return caps.use_data_uri && (Env.browser !== 'IE' || Env.version >= 9);
				},

				use_data_uri_of: function(bytes) {
					return (caps.use_data_uri && bytes < 33000 || caps.use_data_uri_over32kb());
				},

				use_fileinput: function() {
					if (navigator.userAgent.match(/(Android (1.0|1.1|1.5|1.6|2.0|2.1))|(Windows Phone (OS 7|8.0))|(XBLWP)|(ZuneWP)|(w(eb)?OSBrowser)|(webOS)|(Kindle\/(1.0|2.0|2.5|3.0))/)) {
						return false;
					}

					var el = document.createElement('input');
					el.setAttribute('type', 'file');
					return !el.disabled;
				}
			};

		return function(cap) {
			var args = [].slice.call(arguments);
			args.shift(); // shift of cap
			return Basic.typeOf(caps[cap]) === 'function' ? caps[cap].apply(this, args) : !!caps[cap];
		};
	}());


	var uaResult = new UAParser().getResult();


	var Env = {
		can: can,

		uaParser: UAParser,
		
		browser: uaResult.browser.name,
		version: uaResult.browser.version,
		os: uaResult.os.name, // everybody intuitively types it in a lowercase for some reason
		osVersion: uaResult.os.version,

		verComp: version_compare,

		global_event_dispatcher: "moxie.core.EventTarget.instance.dispatchEvent"
	};

	// for backward compatibility
	// @deprecated Use `Env.os` instead
	Env.OS = Env.os;

	if (MXI_DEBUG) {
		Env.debug = {
			runtime: true,
			events: false
		};

		Env.log = function() {
			
			function logObj(data) {
				// TODO: this should recursively print out the object in a pretty way
				console.appendChild(document.createTextNode(data + "\n"));
			}

			var data = arguments[0];

			if (Basic.typeOf(data) === 'string') {
				data = Basic.sprintf.apply(this, arguments);
			}

			if (window && window.console && window.console.log) {
				window.console.log(data);
			} else if (document) {
				var console = document.getElementById('moxie-console');
				if (!console) {
					console = document.createElement('pre');
					console.id = 'moxie-console';
					//console.style.display = 'none';
					document.body.appendChild(console);
				}

				if (Basic.inArray(Basic.typeOf(data), ['object', 'array']) !== -1) {
					logObj(data);
				} else {
					console.appendChild(document.createTextNode(data + "\n"));
				}
			}
		};
	}

	return Env;
});

// Included from: src/javascript/core/I18n.js

/**
 * I18n.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

define("moxie/core/I18n", [
	"moxie/core/utils/Basic"
], function(Basic) {
	var i18n = {};

	return {
		/**
		 * Extends the language pack object with new items.
		 *
		 * @param {Object} pack Language pack items to add.
		 * @return {Object} Extended language pack object.
		 */
		addI18n: function(pack) {
			return Basic.extend(i18n, pack);
		},

		/**
		 * Translates the specified string by checking for the english string in the language pack lookup.
		 *
		 * @param {String} str String to look for.
		 * @return {String} Translated string or the input string if it wasn't found.
		 */
		translate: function(str) {
			return i18n[str] || str;
		},

		/**
		 * Shortcut for translate function
		 *
		 * @param {String} str String to look for.
		 * @return {String} Translated string or the input string if it wasn't found.
		 */
		_: function(str) {
			return this.translate(str);
		},

		/**
		 * Pseudo sprintf implementation - simple way to replace tokens with specified values.
		 *
		 * @param {String} str String with tokens
		 * @return {String} String with replaced tokens
		 */
		sprintf: function(str) {
			var args = [].slice.call(arguments, 1);

			return str.replace(/%[a-z]/g, function() {
				var value = args.shift();
				return Basic.typeOf(value) !== 'undefined' ? value : '';
			});
		}
	};
});

// Included from: src/javascript/core/utils/Mime.js

/**
 * Mime.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

define("moxie/core/utils/Mime", [
	"moxie/core/utils/Basic",
	"moxie/core/I18n"
], function(Basic, I18n) {
	
	var mimeData = "" +
		"application/msword,doc dot," +
		"application/pdf,pdf," +
		"application/pgp-signature,pgp," +
		"application/postscript,ps ai eps," +
		"application/rtf,rtf," +
		"application/vnd.ms-excel,xls xlb," +
		"application/vnd.ms-powerpoint,ppt pps pot," +
		"application/zip,zip," +
		"application/x-shockwave-flash,swf swfl," +
		"application/vnd.openxmlformats-officedocument.wordprocessingml.document,docx," +
		"application/vnd.openxmlformats-officedocument.wordprocessingml.template,dotx," +
		"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,xlsx," +
		"application/vnd.openxmlformats-officedocument.presentationml.presentation,pptx," +
		"application/vnd.openxmlformats-officedocument.presentationml.template,potx," +
		"application/vnd.openxmlformats-officedocument.presentationml.slideshow,ppsx," +
		"application/x-javascript,js," +
		"application/json,json," +
		"audio/mpeg,mp3 mpga mpega mp2," +
		"audio/x-wav,wav," +
		"audio/x-m4a,m4a," +
		"audio/ogg,oga ogg," +
		"audio/aiff,aiff aif," +
		"audio/flac,flac," +
		"audio/aac,aac," +
		"audio/ac3,ac3," +
		"audio/x-ms-wma,wma," +
		"image/bmp,bmp," +
		"image/gif,gif," +
		"image/jpeg,jpg jpeg jpe," +
		"image/photoshop,psd," +
		"image/png,png," +
		"image/svg+xml,svg svgz," +
		"image/tiff,tiff tif," +
		"text/plain,asc txt text diff log," +
		"text/html,htm html xhtml," +
		"text/css,css," +
		"text/csv,csv," +
		"text/rtf,rtf," +
		"video/mpeg,mpeg mpg mpe m2v," +
		"video/quicktime,qt mov," +
		"video/mp4,mp4," +
		"video/x-m4v,m4v," +
		"video/x-flv,flv," +
		"video/x-ms-wmv,wmv," +
		"video/avi,avi," +
		"video/webm,webm," +
		"video/3gpp,3gpp 3gp," +
		"video/3gpp2,3g2," +
		"video/vnd.rn-realvideo,rv," +
		"video/ogg,ogv," + 
		"video/x-matroska,mkv," +
		"application/vnd.oasis.opendocument.formula-template,otf," +
		"application/octet-stream,exe";
	
	
	var Mime = {

		mimes: {},

		extensions: {},

		// Parses the default mime types string into a mimes and extensions lookup maps
		addMimeType: function (mimeData) {
			var items = mimeData.split(/,/), i, ii, ext;
			
			for (i = 0; i < items.length; i += 2) {
				ext = items[i + 1].split(/ /);

				// extension to mime lookup
				for (ii = 0; ii < ext.length; ii++) {
					this.mimes[ext[ii]] = items[i];
				}
				// mime to extension lookup
				this.extensions[items[i]] = ext;
			}
		},


		extList2mimes: function (filters, addMissingExtensions) {
			var self = this, ext, i, ii, type, mimes = [];
			
			// convert extensions to mime types list
			for (i = 0; i < filters.length; i++) {
				ext = filters[i].extensions.split(/\s*,\s*/);

				for (ii = 0; ii < ext.length; ii++) {
					
					// if there's an asterisk in the list, then accept attribute is not required
					if (ext[ii] === '*') {
						return [];
					}

					type = self.mimes[ext[ii]];
					if (type && Basic.inArray(type, mimes) === -1) {
						mimes.push(type);
					}

					// future browsers should filter by extension, finally
					if (addMissingExtensions && /^\w+$/.test(ext[ii])) {
						mimes.push('.' + ext[ii]);
					} else if (!type) {
						// if we have no type in our map, then accept all
						return [];
					}
				}
			}
			return mimes;
		},


		mimes2exts: function(mimes) {
			var self = this, exts = [];
			
			Basic.each(mimes, function(mime) {
				if (mime === '*') {
					exts = [];
					return false;
				}

				// check if this thing looks like mime type
				var m = mime.match(/^(\w+)\/(\*|\w+)$/);
				if (m) {
					if (m[2] === '*') { 
						// wildcard mime type detected
						Basic.each(self.extensions, function(arr, mime) {
							if ((new RegExp('^' + m[1] + '/')).test(mime)) {
								[].push.apply(exts, self.extensions[mime]);
							}
						});
					} else if (self.extensions[mime]) {
						[].push.apply(exts, self.extensions[mime]);
					}
				}
			});
			return exts;
		},


		mimes2extList: function(mimes) {
			var accept = [], exts = [];

			if (Basic.typeOf(mimes) === 'string') {
				mimes = Basic.trim(mimes).split(/\s*,\s*/);
			}

			exts = this.mimes2exts(mimes);
			
			accept.push({
				title: I18n.translate('Files'),
				extensions: exts.length ? exts.join(',') : '*'
			});
			
			// save original mimes string
			accept.mimes = mimes;

			return accept;
		},


		getFileExtension: function(fileName) {
			var matches = fileName && fileName.match(/\.([^.]+)$/);
			if (matches) {
				return matches[1].toLowerCase();
			}
			return '';
		},

		getFileMime: function(fileName) {
			return this.mimes[this.getFileExtension(fileName)] || '';
		}
	};

	Mime.addMimeType(mimeData);

	return Mime;
});

// Included from: src/javascript/core/utils/Dom.js

/**
 * Dom.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

define('moxie/core/utils/Dom', ['moxie/core/utils/Env'], function(Env) {

	/**
	Get DOM Element by it's id.

	@method get
	@for Utils
	@param {String} id Identifier of the DOM Element
	@return {DOMElement}
	*/
	var get = function(id) {
		if (typeof id !== 'string') {
			return id;
		}
		return document.getElementById(id);
	};

	/**
	Checks if specified DOM element has specified class.

	@method hasClass
	@static
	@param {Object} obj DOM element like object to add handler to.
	@param {String} name Class name
	*/
	var hasClass = function(obj, name) {
		if (!obj.className) {
			return false;
		}

		var regExp = new RegExp("(^|\\s+)"+name+"(\\s+|$)");
		return regExp.test(obj.className);
	};

	/**
	Adds specified className to specified DOM element.

	@method addClass
	@static
	@param {Object} obj DOM element like object to add handler to.
	@param {String} name Class name
	*/
	var addClass = function(obj, name) {
		if (!hasClass(obj, name)) {
			obj.className = !obj.className ? name : obj.className.replace(/\s+$/, '') + ' ' + name;
		}
	};

	/**
	Removes specified className from specified DOM element.

	@method removeClass
	@static
	@param {Object} obj DOM element like object to add handler to.
	@param {String} name Class name
	*/
	var removeClass = function(obj, name) {
		if (obj.className) {
			var regExp = new RegExp("(^|\\s+)"+name+"(\\s+|$)");
			obj.className = obj.className.replace(regExp, function($0, $1, $2) {
				return $1 === ' ' && $2 === ' ' ? ' ' : '';
			});
		}
	};

	/**
	Returns a given computed style of a DOM element.

	@method getStyle
	@static
	@param {Object} obj DOM element like object.
	@param {String} name Style you want to get from the DOM element
	*/
	var getStyle = function(obj, name) {
		if (obj.currentStyle) {
			return obj.currentStyle[name];
		} else if (window.getComputedStyle) {
			return window.getComputedStyle(obj, null)[name];
		}
	};


	/**
	Returns the absolute x, y position of an Element. The position will be returned in a object with x, y fields.

	@method getPos
	@static
	@param {Element} node HTML element or element id to get x, y position from.
	@param {Element} root Optional root element to stop calculations at.
	@return {object} Absolute position of the specified element object with x, y fields.
	*/
	var getPos = function(node, root) {
		var x = 0, y = 0, parent, doc = document, nodeRect, rootRect;

		node = node;
		root = root || doc.body;

		// Returns the x, y cordinate for an element on IE 6 and IE 7
		function getIEPos(node) {
			var bodyElm, rect, x = 0, y = 0;

			if (node) {
				rect = node.getBoundingClientRect();
				bodyElm = doc.compatMode === "CSS1Compat" ? doc.documentElement : doc.body;
				x = rect.left + bodyElm.scrollLeft;
				y = rect.top + bodyElm.scrollTop;
			}

			return {
				x : x,
				y : y
			};
		}

		// Use getBoundingClientRect on IE 6 and IE 7 but not on IE 8 in standards mode
		if (node && node.getBoundingClientRect && Env.browser === 'IE' && (!doc.documentMode || doc.documentMode < 8)) {
			nodeRect = getIEPos(node);
			rootRect = getIEPos(root);

			return {
				x : nodeRect.x - rootRect.x,
				y : nodeRect.y - rootRect.y
			};
		}

		parent = node;
		while (parent && parent != root && parent.nodeType) {
			x += parent.offsetLeft || 0;
			y += parent.offsetTop || 0;
			parent = parent.offsetParent;
		}

		parent = node.parentNode;
		while (parent && parent != root && parent.nodeType) {
			x -= parent.scrollLeft || 0;
			y -= parent.scrollTop || 0;
			parent = parent.parentNode;
		}

		return {
			x : x,
			y : y
		};
	};

	/**
	Returns the size of the specified node in pixels.

	@method getSize
	@static
	@param {Node} node Node to get the size of.
	@return {Object} Object with a w and h property.
	*/
	var getSize = function(node) {
		return {
			w : node.offsetWidth || node.clientWidth,
			h : node.offsetHeight || node.clientHeight
		};
	};

	return {
		get: get,
		hasClass: hasClass,
		addClass: addClass,
		removeClass: removeClass,
		getStyle: getStyle,
		getPos: getPos,
		getSize: getSize
	};
});

// Included from: src/javascript/core/Exceptions.js

/**
 * Exceptions.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

define('moxie/core/Exceptions', [
	'moxie/core/utils/Basic'
], function(Basic) {
	function _findKey(obj, value) {
		var key;
		for (key in obj) {
			if (obj[key] === value) {
				return key;
			}
		}
		return null;
	}

	return {
		RuntimeError: (function() {
			var namecodes = {
				NOT_INIT_ERR: 1,
				NOT_SUPPORTED_ERR: 9,
				JS_ERR: 4
			};

			function RuntimeError(code) {
				this.code = code;
				this.name = _findKey(namecodes, code);
				this.message = this.name + ": RuntimeError " + this.code;
			}
			
			Basic.extend(RuntimeError, namecodes);
			RuntimeError.prototype = Error.prototype;
			return RuntimeError;
		}()),
		
		OperationNotAllowedException: (function() {
			
			function OperationNotAllowedException(code) {
				this.code = code;
				this.name = 'OperationNotAllowedException';
			}
			
			Basic.extend(OperationNotAllowedException, {
				NOT_ALLOWED_ERR: 1
			});
			
			OperationNotAllowedException.prototype = Error.prototype;
			
			return OperationNotAllowedException;
		}()),

		ImageError: (function() {
			var namecodes = {
				WRONG_FORMAT: 1,
				MAX_RESOLUTION_ERR: 2,
				INVALID_META_ERR: 3
			};

			function ImageError(code) {
				this.code = code;
				this.name = _findKey(namecodes, code);
				this.message = this.name + ": ImageError " + this.code;
			}
			
			Basic.extend(ImageError, namecodes);
			ImageError.prototype = Error.prototype;

			return ImageError;
		}()),

		FileException: (function() {
			var namecodes = {
				NOT_FOUND_ERR: 1,
				SECURITY_ERR: 2,
				ABORT_ERR: 3,
				NOT_READABLE_ERR: 4,
				ENCODING_ERR: 5,
				NO_MODIFICATION_ALLOWED_ERR: 6,
				INVALID_STATE_ERR: 7,
				SYNTAX_ERR: 8
			};

			function FileException(code) {
				this.code = code;
				this.name = _findKey(namecodes, code);
				this.message = this.name + ": FileException " + this.code;
			}
			
			Basic.extend(FileException, namecodes);
			FileException.prototype = Error.prototype;
			return FileException;
		}()),
		
		DOMException: (function() {
			var namecodes = {
				INDEX_SIZE_ERR: 1,
				DOMSTRING_SIZE_ERR: 2,
				HIERARCHY_REQUEST_ERR: 3,
				WRONG_DOCUMENT_ERR: 4,
				INVALID_CHARACTER_ERR: 5,
				NO_DATA_ALLOWED_ERR: 6,
				NO_MODIFICATION_ALLOWED_ERR: 7,
				NOT_FOUND_ERR: 8,
				NOT_SUPPORTED_ERR: 9,
				INUSE_ATTRIBUTE_ERR: 10,
				INVALID_STATE_ERR: 11,
				SYNTAX_ERR: 12,
				INVALID_MODIFICATION_ERR: 13,
				NAMESPACE_ERR: 14,
				INVALID_ACCESS_ERR: 15,
				VALIDATION_ERR: 16,
				TYPE_MISMATCH_ERR: 17,
				SECURITY_ERR: 18,
				NETWORK_ERR: 19,
				ABORT_ERR: 20,
				URL_MISMATCH_ERR: 21,
				QUOTA_EXCEEDED_ERR: 22,
				TIMEOUT_ERR: 23,
				INVALID_NODE_TYPE_ERR: 24,
				DATA_CLONE_ERR: 25
			};

			function DOMException(code) {
				this.code = code;
				this.name = _findKey(namecodes, code);
				this.message = this.name + ": DOMException " + this.code;
			}
			
			Basic.extend(DOMException, namecodes);
			DOMException.prototype = Error.prototype;
			return DOMException;
		}()),
		
		EventException: (function() {
			function EventException(code) {
				this.code = code;
				this.name = 'EventException';
			}
			
			Basic.extend(EventException, {
				UNSPECIFIED_EVENT_TYPE_ERR: 0
			});
			
			EventException.prototype = Error.prototype;
			
			return EventException;
		}())
	};
});

// Included from: src/javascript/core/EventTarget.js

/**
 * EventTarget.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

define('moxie/core/EventTarget', [
	'moxie/core/utils/Env',
	'moxie/core/Exceptions',
	'moxie/core/utils/Basic'
], function(Env, x, Basic) {
	/**
	Parent object for all event dispatching components and objects

	@class EventTarget
	@constructor EventTarget
	*/
	function EventTarget() {
		// hash of event listeners by object uid
		var eventpool = {};
				
		Basic.extend(this, {
			
			/**
			Unique id of the event dispatcher, usually overriden by children

			@property uid
			@type String
			*/
			uid: null,
			
			/**
			Can be called from within a child  in order to acquire uniqie id in automated manner

			@method init
			*/
			init: function() {
				if (!this.uid) {
					this.uid = Basic.guid('uid_');
				}
			},

			/**
			Register a handler to a specific event dispatched by the object

			@method addEventListener
			@param {String} type Type or basically a name of the event to subscribe to
			@param {Function} fn Callback function that will be called when event happens
			@param {Number} [priority=0] Priority of the event handler - handlers with higher priorities will be called first
			@param {Object} [scope=this] A scope to invoke event handler in
			*/
			addEventListener: function(type, fn, priority, scope) {
				var self = this, list;

				// without uid no event handlers can be added, so make sure we got one
				if (!this.hasOwnProperty('uid')) {
					this.uid = Basic.guid('uid_');
				}
				
				type = Basic.trim(type);
				
				if (/\s/.test(type)) {
					// multiple event types were passed for one handler
					Basic.each(type.split(/\s+/), function(type) {
						self.addEventListener(type, fn, priority, scope);
					});
					return;
				}
				
				type = type.toLowerCase();
				priority = parseInt(priority, 10) || 0;
				
				list = eventpool[this.uid] && eventpool[this.uid][type] || [];
				list.push({fn : fn, priority : priority, scope : scope || this});
				
				if (!eventpool[this.uid]) {
					eventpool[this.uid] = {};
				}
				eventpool[this.uid][type] = list;
			},
			
			/**
			Check if any handlers were registered to the specified event

			@method hasEventListener
			@param {String} type Type or basically a name of the event to check
			@return {Mixed} Returns a handler if it was found and false, if - not
			*/
			hasEventListener: function(type) {
				var list = type ? eventpool[this.uid] && eventpool[this.uid][type] : eventpool[this.uid];
				return list ? list : false;
			},
			
			/**
			Unregister the handler from the event, or if former was not specified - unregister all handlers

			@method removeEventListener
			@param {String} type Type or basically a name of the event
			@param {Function} [fn] Handler to unregister
			*/
			removeEventListener: function(type, fn) {
				type = type.toLowerCase();
	
				var list = eventpool[this.uid] && eventpool[this.uid][type], i;
	
				if (list) {
					if (fn) {
						for (i = list.length - 1; i >= 0; i--) {
							if (list[i].fn === fn) {
								list.splice(i, 1);
								break;
							}
						}
					} else {
						list = [];
					}
	
					// delete event list if it has become empty
					if (!list.length) {
						delete eventpool[this.uid][type];
						
						// and object specific entry in a hash if it has no more listeners attached
						if (Basic.isEmptyObj(eventpool[this.uid])) {
							delete eventpool[this.uid];
						}
					}
				}
			},
			
			/**
			Remove all event handlers from the object

			@method removeAllEventListeners
			*/
			removeAllEventListeners: function() {
				if (eventpool[this.uid]) {
					delete eventpool[this.uid];
				}
			},
			
			/**
			Dispatch the event

			@method dispatchEvent
			@param {String/Object} Type of event or event object to dispatch
			@param {Mixed} [...] Variable number of arguments to be passed to a handlers
			@return {Boolean} true by default and false if any handler returned false
			*/
			dispatchEvent: function(type) {
				var uid, list, args, tmpEvt, evt = {}, result = true, undef;
				
				if (Basic.typeOf(type) !== 'string') {
					// we can't use original object directly (because of Silverlight)
					tmpEvt = type;

					if (Basic.typeOf(tmpEvt.type) === 'string') {
						type = tmpEvt.type;

						if (tmpEvt.total !== undef && tmpEvt.loaded !== undef) { // progress event
							evt.total = tmpEvt.total;
							evt.loaded = tmpEvt.loaded;
						}
						evt.async = tmpEvt.async || false;
					} else {
						throw new x.EventException(x.EventException.UNSPECIFIED_EVENT_TYPE_ERR);
					}
				}
				
				// check if event is meant to be dispatched on an object having specific uid
				if (type.indexOf('::') !== -1) {
					(function(arr) {
						uid = arr[0];
						type = arr[1];
					}(type.split('::')));
				} else {
					uid = this.uid;
				}
				
				type = type.toLowerCase();
								
				list = eventpool[uid] && eventpool[uid][type];

				if (list) {
					// sort event list by prority
					list.sort(function(a, b) { return b.priority - a.priority; });
					
					args = [].slice.call(arguments);
					
					// first argument will be pseudo-event object
					args.shift();
					evt.type = type;
					args.unshift(evt);

					if (MXI_DEBUG && Env.debug.events) {
						Env.log("Event '%s' fired on %u", evt.type, uid);	
					}

					// Dispatch event to all listeners
					var queue = [];
					Basic.each(list, function(handler) {
						// explicitly set the target, otherwise events fired from shims do not get it
						args[0].target = handler.scope;
						// if event is marked as async, detach the handler
						if (evt.async) {
							queue.push(function(cb) {
								setTimeout(function() {
									cb(handler.fn.apply(handler.scope, args) === false);
								}, 1);
							});
						} else {
							queue.push(function(cb) {
								cb(handler.fn.apply(handler.scope, args) === false); // if handler returns false stop propagation
							});
						}
					});
					if (queue.length) {
						Basic.inSeries(queue, function(err) {
							result = !err;
						});
					}
				}
				return result;
			},
			
			/**
			Alias for addEventListener

			@method bind
			@protected
			*/
			bind: function() {
				this.addEventListener.apply(this, arguments);
			},
			
			/**
			Alias for removeEventListener

			@method unbind
			@protected
			*/
			unbind: function() {
				this.removeEventListener.apply(this, arguments);
			},
			
			/**
			Alias for removeAllEventListeners

			@method unbindAll
			@protected
			*/
			unbindAll: function() {
				this.removeAllEventListeners.apply(this, arguments);
			},
			
			/**
			Alias for dispatchEvent

			@method trigger
			@protected
			*/
			trigger: function() {
				return this.dispatchEvent.apply(this, arguments);
			},
			

			/**
			Handle properties of on[event] type.

			@method handleEventProps
			@private
			*/
			handleEventProps: function(dispatches) {
				var self = this;

				this.bind(dispatches.join(' '), function(e) {
					var prop = 'on' + e.type.toLowerCase();
					if (Basic.typeOf(this[prop]) === 'function') {
						this[prop].apply(this, arguments);
					}
				});

				// object must have defined event properties, even if it doesn't make use of them
				Basic.each(dispatches, function(prop) {
					prop = 'on' + prop.toLowerCase(prop);
					if (Basic.typeOf(self[prop]) === 'undefined') {
						self[prop] = null; 
					}
				});
			}
			
		});
	}

	EventTarget.instance = new EventTarget(); 

	return EventTarget;
});

// Included from: src/javascript/runtime/Runtime.js

/**
 * Runtime.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

define('moxie/runtime/Runtime', [
	"moxie/core/utils/Env",
	"moxie/core/utils/Basic",
	"moxie/core/utils/Dom",
	"moxie/core/EventTarget"
], function(Env, Basic, Dom, EventTarget) {
	var runtimeConstructors = {}, runtimes = {};

	/**
	Common set of methods and properties for every runtime instance

	@class Runtime

	@param {Object} options
	@param {String} type Sanitized name of the runtime
	@param {Object} [caps] Set of capabilities that differentiate specified runtime
	@param {Object} [modeCaps] Set of capabilities that do require specific operational mode
	@param {String} [preferredMode='browser'] Preferred operational mode to choose if no required capabilities were requested
	*/
	function Runtime(options, type, caps, modeCaps, preferredMode) {
		/**
		Dispatched when runtime is initialized and ready.
		Results in RuntimeInit on a connected component.

		@event Init
		*/

		/**
		Dispatched when runtime fails to initialize.
		Results in RuntimeError on a connected component.

		@event Error
		*/

		var self = this
		, _shim
		, _uid = Basic.guid(type + '_')
		, defaultMode = preferredMode || 'browser'
		;

		options = options || {};

		// register runtime in private hash
		runtimes[_uid] = this;

		/**
		Default set of capabilities, which can be redifined later by specific runtime

		@private
		@property caps
		@type Object
		*/
		caps = Basic.extend({
			// Runtime can: 
			// provide access to raw binary data of the file
			access_binary: false,
			// provide access to raw binary data of the image (image extension is optional) 
			access_image_binary: false,
			// display binary data as thumbs for example
			display_media: false,
			// make cross-domain requests
			do_cors: false,
			// accept files dragged and dropped from the desktop
			drag_and_drop: false,
			// filter files in selection dialog by their extensions
			filter_by_extension: true,
			// resize image (and manipulate it raw data of any file in general)
			resize_image: false,
			// periodically report how many bytes of total in the file were uploaded (loaded)
			report_upload_progress: false,
			// provide access to the headers of http response 
			return_response_headers: false,
			// support response of specific type, which should be passed as an argument
			// e.g. runtime.can('return_response_type', 'blob')
			return_response_type: false,
			// return http status code of the response
			return_status_code: true,
			// send custom http header with the request
			send_custom_headers: false,
			// pick up the files from a dialog
			select_file: false,
			// select whole folder in file browse dialog
			select_folder: false,
			// select multiple files at once in file browse dialog
			select_multiple: true,
			// send raw binary data, that is generated after image resizing or manipulation of other kind
			send_binary_string: false,
			// send cookies with http request and therefore retain session
			send_browser_cookies: true,
			// send data formatted as multipart/form-data
			send_multipart: true,
			// slice the file or blob to smaller parts
			slice_blob: false,
			// upload file without preloading it to memory, stream it out directly from disk
			stream_upload: false,
			// programmatically trigger file browse dialog
			summon_file_dialog: false,
			// upload file of specific size, size should be passed as argument
			// e.g. runtime.can('upload_filesize', '500mb')
			upload_filesize: true,
			// initiate http request with specific http method, method should be passed as argument
			// e.g. runtime.can('use_http_method', 'put')
			use_http_method: true
		}, caps);
			
	
		// default to the mode that is compatible with preferred caps
		if (options.preferred_caps) {
			defaultMode = Runtime.getMode(modeCaps, options.preferred_caps, defaultMode);
		}

		if (MXI_DEBUG && Env.debug.runtime) {
			Env.log("\tdefault mode: %s", defaultMode);	
		}
		
		// small extension factory here (is meant to be extended with actual extensions constructors)
		_shim = (function() {
			var objpool = {};
			return {
				exec: function(uid, comp, fn, args) {
					if (_shim[comp]) {
						if (!objpool[uid]) {
							objpool[uid] = {
								context: this,
								instance: new _shim[comp]()
							};
						}
						if (objpool[uid].instance[fn]) {
							return objpool[uid].instance[fn].apply(this, args);
						}
					}
				},

				removeInstance: function(uid) {
					delete objpool[uid];
				},

				removeAllInstances: function() {
					var self = this;
					Basic.each(objpool, function(obj, uid) {
						if (Basic.typeOf(obj.instance.destroy) === 'function') {
							obj.instance.destroy.call(obj.context);
						}
						self.removeInstance(uid);
					});
				}
			};
		}());


		// public methods
		Basic.extend(this, {
			/**
			Specifies whether runtime instance was initialized or not

			@property initialized
			@type {Boolean}
			@default false
			*/
			initialized: false, // shims require this flag to stop initialization retries

			/**
			Unique ID of the runtime

			@property uid
			@type {String}
			*/
			uid: _uid,

			/**
			Runtime type (e.g. flash, html5, etc)

			@property type
			@type {String}
			*/
			type: type,

			/**
			Runtime (not native one) may operate in browser or client mode.

			@property mode
			@private
			@type {String|Boolean} current mode or false, if none possible
			*/
			mode: Runtime.getMode(modeCaps, (options.required_caps), defaultMode),

			/**
			id of the DOM container for the runtime (if available)

			@property shimid
			@type {String}
			*/
			shimid: _uid + '_container',

			/**
			Number of connected clients. If equal to zero, runtime can be destroyed

			@property clients
			@type {Number}
			*/
			clients: 0,

			/**
			Runtime initialization options

			@property options
			@type {Object}
			*/
			options: options,

			/**
			Checks if the runtime has specific capability

			@method can
			@param {String} cap Name of capability to check
			@param {Mixed} [value] If passed, capability should somehow correlate to the value
			@param {Object} [refCaps] Set of capabilities to check the specified cap against (defaults to internal set)
			@return {Boolean} true if runtime has such capability and false, if - not
			*/
			can: function(cap, value) {
				var refCaps = arguments[2] || caps;

				// if cap var is a comma-separated list of caps, convert it to object (key/value)
				if (Basic.typeOf(cap) === 'string' && Basic.typeOf(value) === 'undefined') {
					cap = Runtime.parseCaps(cap);
				}

				if (Basic.typeOf(cap) === 'object') {
					for (var key in cap) {
						if (!this.can(key, cap[key], refCaps)) {
							return false;
						}
					}
					return true;
				}

				// check the individual cap
				if (Basic.typeOf(refCaps[cap]) === 'function') {
					return refCaps[cap].call(this, value);
				} else {
					return (value === refCaps[cap]);
				}
			},

			/**
			Returns container for the runtime as DOM element

			@method getShimContainer
			@return {DOMElement}
			*/
			getShimContainer: function() {
				var container, shimContainer = Dom.get(this.shimid);

				// if no container for shim, create one
				if (!shimContainer) {
					container = this.options.container ? Dom.get(this.options.container) : document.body;

					// create shim container and insert it at an absolute position into the outer container
					shimContainer = document.createElement('div');
					shimContainer.id = this.shimid;
					shimContainer.className = 'moxie-shim moxie-shim-' + this.type;

					Basic.extend(shimContainer.style, {
						position: 'absolute',
						top: '0px',
						left: '0px',
						width: '1px',
						height: '1px',
						overflow: 'hidden'
					});

					container.appendChild(shimContainer);
					container = null;
				}

				return shimContainer;
			},

			/**
			Returns runtime as DOM element (if appropriate)

			@method getShim
			@return {DOMElement}
			*/
			getShim: function() {
				return _shim;
			},

			/**
			Invokes a method within the runtime itself (might differ across the runtimes)

			@method shimExec
			@param {Mixed} []
			@protected
			@return {Mixed} Depends on the action and component
			*/
			shimExec: function(component, action) {
				var args = [].slice.call(arguments, 2);
				return self.getShim().exec.call(this, this.uid, component, action, args);
			},

			/**
			Operaional interface that is used by components to invoke specific actions on the runtime
			(is invoked in the scope of component)

			@method exec
			@param {Mixed} []*
			@protected
			@return {Mixed} Depends on the action and component
			*/
			exec: function(component, action) { // this is called in the context of component, not runtime
				var args = [].slice.call(arguments, 2);

				if (self[component] && self[component][action]) {
					return self[component][action].apply(this, args);
				}
				return self.shimExec.apply(this, arguments);
			},

			/**
			Destroys the runtime (removes all events and deletes DOM structures)

			@method destroy
			*/
			destroy: function() {
				if (!self) {
					return; // obviously already destroyed
				}

				var shimContainer = Dom.get(this.shimid);
				if (shimContainer) {
					shimContainer.parentNode.removeChild(shimContainer);
				}

				if (_shim) {
					_shim.removeAllInstances();
				}

				this.unbindAll();
				delete runtimes[this.uid];
				this.uid = null; // mark this runtime as destroyed
				_uid = self = _shim = shimContainer = null;
			}
		});

		// once we got the mode, test against all caps
		if (this.mode && options.required_caps && !this.can(options.required_caps)) {
			this.mode = false;
		}	
	}


	/**
	Default order to try different runtime types

	@property order
	@type String
	@static
	*/
	Runtime.order = 'html5,html4';


	/**
	Retrieves runtime from private hash by it's uid

	@method getRuntime
	@private
	@static
	@param {String} uid Unique identifier of the runtime
	@return {Runtime|Boolean} Returns runtime, if it exists and false, if - not
	*/
	Runtime.getRuntime = function(uid) {
		return runtimes[uid] ? runtimes[uid] : false;
	};


	/**
	Register constructor for the Runtime of new (or perhaps modified) type

	@method addConstructor
	@static
	@param {String} type Runtime type (e.g. flash, html5, etc)
	@param {Function} construct Constructor for the Runtime type
	*/
	Runtime.addConstructor = function(type, constructor) {
		constructor.prototype = EventTarget.instance;
		runtimeConstructors[type] = constructor;
	};


	/**
	Get the constructor for the specified type.

	method getConstructor
	@static
	@param {String} type Runtime type (e.g. flash, html5, etc)
	@return {Function} Constructor for the Runtime type
	*/
	Runtime.getConstructor = function(type) {
		return runtimeConstructors[type] || null;
	};


	/**
	Get info about the runtime (uid, type, capabilities)

	@method getInfo
	@static
	@param {String} uid Unique identifier of the runtime
	@return {Mixed} Info object or null if runtime doesn't exist
	*/
	Runtime.getInfo = function(uid) {
		var runtime = Runtime.getRuntime(uid);

		if (runtime) {
			return {
				uid: runtime.uid,
				type: runtime.type,
				mode: runtime.mode,
				can: function() {
					return runtime.can.apply(runtime, arguments);
				}
			};
		}
		return null;
	};


	/**
	Convert caps represented by a comma-separated string to the object representation.

	@method parseCaps
	@static
	@param {String} capStr Comma-separated list of capabilities
	@return {Object}
	*/
	Runtime.parseCaps = function(capStr) {
		var capObj = {};

		if (Basic.typeOf(capStr) !== 'string') {
			return capStr || {};
		}

		Basic.each(capStr.split(','), function(key) {
			capObj[key] = true; // we assume it to be - true
		});

		return capObj;
	};

	/**
	Test the specified runtime for specific capabilities.

	@method can
	@static
	@param {String} type Runtime type (e.g. flash, html5, etc)
	@param {String|Object} caps Set of capabilities to check
	@return {Boolean} Result of the test
	*/
	Runtime.can = function(type, caps) {
		var runtime
		, constructor = Runtime.getConstructor(type)
		, mode
		;
		if (constructor) {
			runtime = new constructor({
				required_caps: caps
			});
			mode = runtime.mode;
			runtime.destroy();
			return !!mode;
		}
		return false;
	};


	/**
	Figure out a runtime that supports specified capabilities.

	@method thatCan
	@static
	@param {String|Object} caps Set of capabilities to check
	@param {String} [runtimeOrder] Comma-separated list of runtimes to check against
	@return {String} Usable runtime identifier or null
	*/
	Runtime.thatCan = function(caps, runtimeOrder) {
		var types = (runtimeOrder || Runtime.order).split(/\s*,\s*/);
		for (var i in types) {
			if (Runtime.can(types[i], caps)) {
				return types[i];
			}
		}
		return null;
	};


	/**
	Figure out an operational mode for the specified set of capabilities.

	@method getMode
	@static
	@param {Object} modeCaps Set of capabilities that depend on particular runtime mode
	@param {Object} [requiredCaps] Supplied set of capabilities to find operational mode for
	@param {String|Boolean} [defaultMode='browser'] Default mode to use 
	@return {String|Boolean} Compatible operational mode
	*/
	Runtime.getMode = function(modeCaps, requiredCaps, defaultMode) {
		var mode = null;

		if (Basic.typeOf(defaultMode) === 'undefined') { // only if not specified
			defaultMode = 'browser';
		}

		if (requiredCaps && !Basic.isEmptyObj(modeCaps)) {
			// loop over required caps and check if they do require the same mode
			Basic.each(requiredCaps, function(value, cap) {
				if (modeCaps.hasOwnProperty(cap)) {
					var capMode = modeCaps[cap](value);

					// make sure we always have an array
					if (typeof(capMode) === 'string') {
						capMode = [capMode];
					}
					
					if (!mode) {
						mode = capMode;						
					} else if (!(mode = Basic.arrayIntersect(mode, capMode))) {
						// if cap requires conflicting mode - runtime cannot fulfill required caps

						if (MXI_DEBUG && Env.debug.runtime) {
							Env.log("\t\t%c: %v (conflicting mode requested: %s)", cap, value, capMode);	
						}

						return (mode = false);
					}					
				}

				if (MXI_DEBUG && Env.debug.runtime) {
					Env.log("\t\t%c: %v (compatible modes: %s)", cap, value, mode);	
				}
			});

			if (mode) {
				return Basic.inArray(defaultMode, mode) !== -1 ? defaultMode : mode[0];
			} else if (mode === false) {
				return false;
			}
		}
		return defaultMode; 
	};


	/**
	Capability check that always returns true

	@private
	@static
	@return {True}
	*/
	Runtime.capTrue = function() {
		return true;
	};

	/**
	Capability check that always returns false

	@private
	@static
	@return {False}
	*/
	Runtime.capFalse = function() {
		return false;
	};

	/**
	Evaluate the expression to boolean value and create a function that always returns it.

	@private
	@static
	@param {Mixed} expr Expression to evaluate
	@return {Function} Function returning the result of evaluation
	*/
	Runtime.capTest = function(expr) {
		return function() {
			return !!expr;
		};
	};

	return Runtime;
});

// Included from: src/javascript/runtime/RuntimeClient.js

/**
 * RuntimeClient.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

define('moxie/runtime/RuntimeClient', [
	'moxie/core/utils/Env',
	'moxie/core/Exceptions',
	'moxie/core/utils/Basic',
	'moxie/runtime/Runtime'
], function(Env, x, Basic, Runtime) {
	/**
	Set of methods and properties, required by a component to acquire ability to connect to a runtime

	@class RuntimeClient
	*/
	return function RuntimeClient() {
		var runtime;

		Basic.extend(this, {
			/**
			Connects to the runtime specified by the options. Will either connect to existing runtime or create a new one.
			Increments number of clients connected to the specified runtime.

			@private
			@method connectRuntime
			@param {Mixed} options Can be a runtme uid or a set of key-value pairs defining requirements and pre-requisites
			*/
			connectRuntime: function(options) {
				var comp = this, ruid;

				function initialize(items) {
					var type, constructor;

					// if we ran out of runtimes
					if (!items.length) {
						comp.trigger('RuntimeError', new x.RuntimeError(x.RuntimeError.NOT_INIT_ERR));
						runtime = null;
						return;
					}

					type = items.shift().toLowerCase();
					constructor = Runtime.getConstructor(type);
					if (!constructor) {
						initialize(items);
						return;
					}

					if (MXI_DEBUG && Env.debug.runtime) {
						Env.log("Trying runtime: %s", type);
						Env.log(options);
					}

					// try initializing the runtime
					runtime = new constructor(options);

					runtime.bind('Init', function() {
						// mark runtime as initialized
						runtime.initialized = true;

						if (MXI_DEBUG && Env.debug.runtime) {
							Env.log("Runtime '%s' initialized", runtime.type);
						}

						// jailbreak ...
						setTimeout(function() {
							runtime.clients++;
							// this will be triggered on component
							comp.trigger('RuntimeInit', runtime);
						}, 1);
					});

					runtime.bind('Error', function() {
						if (MXI_DEBUG && Env.debug.runtime) {
							Env.log("Runtime '%s' failed to initialize", runtime.type);
						}

						runtime.destroy(); // runtime cannot destroy itself from inside at a right moment, thus we do it here
						initialize(items);
					});

					/*runtime.bind('Exception', function() { });*/

					if (MXI_DEBUG && Env.debug.runtime) {
						Env.log("\tselected mode: %s", runtime.mode);	
					}

					// check if runtime managed to pick-up operational mode
					if (!runtime.mode) {
						runtime.trigger('Error');
						return;
					}

					runtime.init();
				}

				// check if a particular runtime was requested
				if (Basic.typeOf(options) === 'string') {
					ruid = options;
				} else if (Basic.typeOf(options.ruid) === 'string') {
					ruid = options.ruid;
				}

				if (ruid) {
					runtime = Runtime.getRuntime(ruid);
					if (runtime) {
						runtime.clients++;
						return runtime;
					} else {
						// there should be a runtime and there's none - weird case
						throw new x.RuntimeError(x.RuntimeError.NOT_INIT_ERR);
					}
				}

				// initialize a fresh one, that fits runtime list and required features best
				initialize((options.runtime_order || Runtime.order).split(/\s*,\s*/));
			},


			/**
			Disconnects from the runtime. Decrements number of clients connected to the specified runtime.

			@private
			@method disconnectRuntime
			*/
			disconnectRuntime: function() {
				if (runtime && --runtime.clients <= 0) {
					runtime.destroy();
				}

				// once the component is disconnected, it shouldn't have access to the runtime
				runtime = null;
			},


			/**
			Returns the runtime to which the client is currently connected.

			@method getRuntime
			@return {Runtime} Runtime or null if client is not connected
			*/
			getRuntime: function() {
				if (runtime && runtime.uid) {
					return runtime;
				}
				return runtime = null; // make sure we do not leave zombies rambling around
			},


			/**
			Handy shortcut to safely invoke runtime extension methods.
			
			@private
			@method exec
			@return {Mixed} Whatever runtime extension method returns
			*/
			exec: function() {
				if (runtime) {
					return runtime.exec.apply(this, arguments);
				}
				return null;
			}

		});
	};


});

// Included from: src/javascript/file/FileInput.js

/**
 * FileInput.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

define('moxie/file/FileInput', [
	'moxie/core/utils/Basic',
	'moxie/core/utils/Env',
	'moxie/core/utils/Mime',
	'moxie/core/utils/Dom',
	'moxie/core/Exceptions',
	'moxie/core/EventTarget',
	'moxie/core/I18n',
	'moxie/runtime/Runtime',
	'moxie/runtime/RuntimeClient'
], function(Basic, Env, Mime, Dom, x, EventTarget, I18n, Runtime, RuntimeClient) {
	/**
	Provides a convenient way to create cross-browser file-picker. Generates file selection dialog on click,
	converts selected files to _File_ objects, to be used in conjunction with _Image_, preloaded in memory
	with _FileReader_ or uploaded to a server through _XMLHttpRequest_.

	@class FileInput
	@constructor
	@extends EventTarget
	@uses RuntimeClient
	@param {Object|String|DOMElement} options If options is string or node, argument is considered as _browse\_button_.
		@param {String|DOMElement} options.browse_button DOM Element to turn into file picker.
		@param {Array} [options.accept] Array of mime types to accept. By default accepts all.
		@param {String} [options.file='file'] Name of the file field (not the filename).
		@param {Boolean} [options.multiple=false] Enable selection of multiple files.
		@param {Boolean} [options.directory=false] Turn file input into the folder input (cannot be both at the same time).
		@param {String|DOMElement} [options.container] DOM Element to use as a container for file-picker. Defaults to parentNode 
		for _browse\_button_.
		@param {Object|String} [options.required_caps] Set of required capabilities, that chosen runtime must support.

	@example
		<div id="container">
			<a id="file-picker" href="javascript:;">Browse...</a>
		</div>

		<script>
			var fileInput = new mOxie.FileInput({
				browse_button: 'file-picker', // or document.getElementById('file-picker')
				container: 'container',
				accept: [
					{title: "Image files", extensions: "jpg,gif,png"} // accept only images
				],
				multiple: true // allow multiple file selection
			});

			fileInput.onchange = function(e) {
				// do something to files array
				console.info(e.target.files); // or this.files or fileInput.files
			};

			fileInput.init(); // initialize
		</script>
	*/
	var dispatches = [
		/**
		Dispatched when runtime is connected and file-picker is ready to be used.

		@event ready
		@param {Object} event
		*/
		'ready',

		/**
		Dispatched right after [ready](#event_ready) event, and whenever [refresh()](#method_refresh) is invoked. 
		Check [corresponding documentation entry](#method_refresh) for more info.

		@event refresh
		@param {Object} event
		*/

		/**
		Dispatched when selection of files in the dialog is complete.

		@event change
		@param {Object} event
		*/
		'change',

		'cancel', // TODO: might be useful

		/**
		Dispatched when mouse cursor enters file-picker area. Can be used to style element
		accordingly.

		@event mouseenter
		@param {Object} event
		*/
		'mouseenter',

		/**
		Dispatched when mouse cursor leaves file-picker area. Can be used to style element
		accordingly.

		@event mouseleave
		@param {Object} event
		*/
		'mouseleave',

		/**
		Dispatched when functional mouse button is pressed on top of file-picker area.

		@event mousedown
		@param {Object} event
		*/
		'mousedown',

		/**
		Dispatched when functional mouse button is released on top of file-picker area.

		@event mouseup
		@param {Object} event
		*/
		'mouseup'
	];

	function FileInput(options) {
		if (MXI_DEBUG) {
			Env.log("Instantiating FileInput...");	
		}

		var self = this,
			container, browseButton, defaults;

		// if flat argument passed it should be browse_button id
		if (Basic.inArray(Basic.typeOf(options), ['string', 'node']) !== -1) {
			options = { browse_button : options };
		}

		// this will help us to find proper default container
		browseButton = Dom.get(options.browse_button);
		if (!browseButton) {
			// browse button is required
			throw new x.DOMException(x.DOMException.NOT_FOUND_ERR);
		}

		// figure out the options
		defaults = {
			accept: [{
				title: I18n.translate('All Files'),
				extensions: '*'
			}],
			name: 'file',
			multiple: false,
			required_caps: false,
			container: browseButton.parentNode || document.body
		};
		
		options = Basic.extend({}, defaults, options);

		// convert to object representation
		if (typeof(options.required_caps) === 'string') {
			options.required_caps = Runtime.parseCaps(options.required_caps);
		}
					
		// normalize accept option (could be list of mime types or array of title/extensions pairs)
		if (typeof(options.accept) === 'string') {
			options.accept = Mime.mimes2extList(options.accept);
		}

		container = Dom.get(options.container);
		// make sure we have container
		if (!container) {
			container = document.body;
		}

		// make container relative, if it's not
		if (Dom.getStyle(container, 'position') === 'static') {
			container.style.position = 'relative';
		}

		container = browseButton = null; // IE
						
		RuntimeClient.call(self);
		
		Basic.extend(self, {
			/**
			Unique id of the component

			@property uid
			@protected
			@readOnly
			@type {String}
			@default UID
			*/
			uid: Basic.guid('uid_'),
			
			/**
			Unique id of the connected runtime, if any.

			@property ruid
			@protected
			@type {String}
			*/
			ruid: null,

			/**
			Unique id of the runtime container. Useful to get hold of it for various manipulations.

			@property shimid
			@protected
			@type {String}
			*/
			shimid: null,
			
			/**
			Array of selected mOxie.File objects

			@property files
			@type {Array}
			@default null
			*/
			files: null,

			/**
			Initializes the file-picker, connects it to runtime and dispatches event ready when done.

			@method init
			*/
			init: function() {
				self.bind('RuntimeInit', function(e, runtime) {
					self.ruid = runtime.uid;
					self.shimid = runtime.shimid;

					self.bind("Ready", function() {
						self.trigger("Refresh");
					}, 999);

					// re-position and resize shim container
					self.bind('Refresh', function() {
						var pos, size, browseButton, shimContainer;
						
						browseButton = Dom.get(options.browse_button);
						shimContainer = Dom.get(runtime.shimid); // do not use runtime.getShimContainer(), since it will create container if it doesn't exist

						if (browseButton) {
							pos = Dom.getPos(browseButton, Dom.get(options.container));
							size = Dom.getSize(browseButton);

							if (shimContainer) {
								Basic.extend(shimContainer.style, {
									top     : pos.y + 'px',
									left    : pos.x + 'px',
									width   : size.w + 'px',
									height  : size.h + 'px'
								});
							}
						}
						shimContainer = browseButton = null;
					});
					
					runtime.exec.call(self, 'FileInput', 'init', options);
				});

				// runtime needs: options.required_features, options.runtime_order and options.container
				self.connectRuntime(Basic.extend({}, options, {
					required_caps: {
						select_file: true
					}
				}));
			},

			/**
			Disables file-picker element, so that it doesn't react to mouse clicks.

			@method disable
			@param {Boolean} [state=true] Disable component if - true, enable if - false
			*/
			disable: function(state) {
				var runtime = this.getRuntime();
				if (runtime) {
					runtime.exec.call(this, 'FileInput', 'disable', Basic.typeOf(state) === 'undefined' ? true : state);
				}
			},


			/**
			Reposition and resize dialog trigger to match the position and size of browse_button element.

			@method refresh
			*/
			refresh: function() {
				self.trigger("Refresh");
			},


			/**
			Destroy component.

			@method destroy
			*/
			destroy: function() {
				var runtime = this.getRuntime();
				if (runtime) {
					runtime.exec.call(this, 'FileInput', 'destroy');
					this.disconnectRuntime();
				}

				if (Basic.typeOf(this.files) === 'array') {
					// no sense in leaving associated files behind
					Basic.each(this.files, function(file) {
						file.destroy();
					});
				} 
				this.files = null;

				this.unbindAll();
			}
		});

		this.handleEventProps(dispatches);
	}

	FileInput.prototype = EventTarget.instance;

	return FileInput;
});

// Included from: src/javascript/core/utils/Encode.js

/**
 * Encode.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

define('moxie/core/utils/Encode', [], function() {

	/**
	Encode string with UTF-8

	@method utf8_encode
	@for Utils
	@static
	@param {String} str String to encode
	@return {String} UTF-8 encoded string
	*/
	var utf8_encode = function(str) {
		return unescape(encodeURIComponent(str));
	};
	
	/**
	Decode UTF-8 encoded string

	@method utf8_decode
	@static
	@param {String} str String to decode
	@return {String} Decoded string
	*/
	var utf8_decode = function(str_data) {
		return decodeURIComponent(escape(str_data));
	};
	
	/**
	Decode Base64 encoded string (uses browser's default method if available),
	from: https://raw.github.com/kvz/phpjs/master/functions/url/base64_decode.js

	@method atob
	@static
	@param {String} data String to decode
	@return {String} Decoded string
	*/
	var atob = function(data, utf8) {
		if (typeof(window.atob) === 'function') {
			return utf8 ? utf8_decode(window.atob(data)) : window.atob(data);
		}

		// http://kevin.vanzonneveld.net
		// +   original by: Tyler Akins (http://rumkin.com)
		// +   improved by: Thunder.m
		// +      input by: Aman Gupta
		// +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
		// +   bugfixed by: Onno Marsman
		// +   bugfixed by: Pellentesque Malesuada
		// +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
		// +      input by: Brett Zamir (http://brett-zamir.me)
		// +   bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
		// *     example 1: base64_decode('S2V2aW4gdmFuIFpvbm5ldmVsZA==');
		// *     returns 1: 'Kevin van Zonneveld'
		// mozilla has this native
		// - but breaks in 2.0.0.12!
		//if (typeof this.window.atob == 'function') {
		//    return atob(data);
		//}
		var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
		var o1, o2, o3, h1, h2, h3, h4, bits, i = 0,
			ac = 0,
			dec = "",
			tmp_arr = [];

		if (!data) {
			return data;
		}

		data += '';

		do { // unpack four hexets into three octets using index points in b64
			h1 = b64.indexOf(data.charAt(i++));
			h2 = b64.indexOf(data.charAt(i++));
			h3 = b64.indexOf(data.charAt(i++));
			h4 = b64.indexOf(data.charAt(i++));

			bits = h1 << 18 | h2 << 12 | h3 << 6 | h4;

			o1 = bits >> 16 & 0xff;
			o2 = bits >> 8 & 0xff;
			o3 = bits & 0xff;

			if (h3 == 64) {
				tmp_arr[ac++] = String.fromCharCode(o1);
			} else if (h4 == 64) {
				tmp_arr[ac++] = String.fromCharCode(o1, o2);
			} else {
				tmp_arr[ac++] = String.fromCharCode(o1, o2, o3);
			}
		} while (i < data.length);

		dec = tmp_arr.join('');

		return utf8 ? utf8_decode(dec) : dec;
	};
	
	/**
	Base64 encode string (uses browser's default method if available),
	from: https://raw.github.com/kvz/phpjs/master/functions/url/base64_encode.js

	@method btoa
	@static
	@param {String} data String to encode
	@return {String} Base64 encoded string
	*/
	var btoa = function(data, utf8) {
		if (utf8) {
			data = utf8_encode(data);
		}

		if (typeof(window.btoa) === 'function') {
			return window.btoa(data);
		}

		// http://kevin.vanzonneveld.net
		// +   original by: Tyler Akins (http://rumkin.com)
		// +   improved by: Bayron Guevara
		// +   improved by: Thunder.m
		// +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
		// +   bugfixed by: Pellentesque Malesuada
		// +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
		// +   improved by: RafaÅ‚ Kukawski (http://kukawski.pl)
		// *     example 1: base64_encode('Kevin van Zonneveld');
		// *     returns 1: 'S2V2aW4gdmFuIFpvbm5ldmVsZA=='
		// mozilla has this native
		// - but breaks in 2.0.0.12!
		var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
		var o1, o2, o3, h1, h2, h3, h4, bits, i = 0,
			ac = 0,
			enc = "",
			tmp_arr = [];

		if (!data) {
			return data;
		}

		do { // pack three octets into four hexets
			o1 = data.charCodeAt(i++);
			o2 = data.charCodeAt(i++);
			o3 = data.charCodeAt(i++);

			bits = o1 << 16 | o2 << 8 | o3;

			h1 = bits >> 18 & 0x3f;
			h2 = bits >> 12 & 0x3f;
			h3 = bits >> 6 & 0x3f;
			h4 = bits & 0x3f;

			// use hexets to index into b64, and append result to encoded string
			tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4);
		} while (i < data.length);

		enc = tmp_arr.join('');

		var r = data.length % 3;

		return (r ? enc.slice(0, r - 3) : enc) + '==='.slice(r || 3);
	};


	return {
		utf8_encode: utf8_encode,
		utf8_decode: utf8_decode,
		atob: atob,
		btoa: btoa
	};
});

// Included from: src/javascript/file/Blob.js

/**
 * Blob.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

define('moxie/file/Blob', [
	'moxie/core/utils/Basic',
	'moxie/core/utils/Encode',
	'moxie/runtime/RuntimeClient'
], function(Basic, Encode, RuntimeClient) {
	
	var blobpool = {};

	/**
	@class Blob
	@constructor
	@param {String} ruid Unique id of the runtime, to which this blob belongs to
	@param {Object} blob Object "Native" blob object, as it is represented in the runtime
	*/
	function Blob(ruid, blob) {

		function _sliceDetached(start, end, type) {
			var blob, data = blobpool[this.uid];

			if (Basic.typeOf(data) !== 'string' || !data.length) {
				return null; // or throw exception
			}

			blob = new Blob(null, {
				type: type,
				size: end - start
			});
			blob.detach(data.substr(start, blob.size));

			return blob;
		}

		RuntimeClient.call(this);

		if (ruid) {	
			this.connectRuntime(ruid);
		}

		if (!blob) {
			blob = {};
		} else if (Basic.typeOf(blob) === 'string') { // dataUrl or binary string
			blob = { data: blob };
		}

		Basic.extend(this, {
			
			/**
			Unique id of the component

			@property uid
			@type {String}
			*/
			uid: blob.uid || Basic.guid('uid_'),
			
			/**
			Unique id of the connected runtime, if falsy, then runtime will have to be initialized 
			before this Blob can be used, modified or sent

			@property ruid
			@type {String}
			*/
			ruid: ruid,
	
			/**
			Size of blob

			@property size
			@type {Number}
			@default 0
			*/
			size: blob.size || 0,
			
			/**
			Mime type of blob

			@property type
			@type {String}
			@default ''
			*/
			type: blob.type || '',
			
			/**
			@method slice
			@param {Number} [start=0]
			*/
			slice: function(start, end, type) {		
				if (this.isDetached()) {
					return _sliceDetached.apply(this, arguments);
				}
				return this.getRuntime().exec.call(this, 'Blob', 'slice', this.getSource(), start, end, type);
			},

			/**
			Returns "native" blob object (as it is represented in connected runtime) or null if not found

			@method getSource
			@return {Blob} Returns "native" blob object or null if not found
			*/
			getSource: function() {
				if (!blobpool[this.uid]) {
					return null;	
				}
				return blobpool[this.uid];
			},

			/** 
			Detaches blob from any runtime that it depends on and initialize with standalone value

			@method detach
			@protected
			@param {DOMString} [data=''] Standalone value
			*/
			detach: function(data) {
				if (this.ruid) {
					this.getRuntime().exec.call(this, 'Blob', 'destroy');
					this.disconnectRuntime();
					this.ruid = null;
				}

				data = data || '';

				// if dataUrl, convert to binary string
				if (data.substr(0, 5) == 'data:') {
					var base64Offset = data.indexOf(';base64,');
					this.type = data.substring(5, base64Offset);
					data = Encode.atob(data.substring(base64Offset + 8));
				}

				this.size = data.length;

				blobpool[this.uid] = data;
			},

			/**
			Checks if blob is standalone (detached of any runtime)
			
			@method isDetached
			@protected
			@return {Boolean}
			*/
			isDetached: function() {
				return !this.ruid && Basic.typeOf(blobpool[this.uid]) === 'string';
			},
			
			/** 
			Destroy Blob and free any resources it was using

			@method destroy
			*/
			destroy: function() {
				this.detach();
				delete blobpool[this.uid];
			}
		});

		
		if (blob.data) {
			this.detach(blob.data); // auto-detach if payload has been passed
		} else {
			blobpool[this.uid] = blob;	
		}
	}
	
	return Blob;
});

// Included from: src/javascript/file/File.js

/**
 * File.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

define('moxie/file/File', [
	'moxie/core/utils/Basic',
	'moxie/core/utils/Mime',
	'moxie/file/Blob'
], function(Basic, Mime, Blob) {
	/**
	@class File
	@extends Blob
	@constructor
	@param {String} ruid Unique id of the runtime, to which this blob belongs to
	@param {Object} file Object "Native" file object, as it is represented in the runtime
	*/
	function File(ruid, file) {
		if (!file) { // avoid extra errors in case we overlooked something
			file = {};
		}

		Blob.apply(this, arguments);

		if (!this.type) {
			this.type = Mime.getFileMime(file.name);
		}

		// sanitize file name or generate new one
		var name;
		if (file.name) {
			name = file.name.replace(/\\/g, '/');
			name = name.substr(name.lastIndexOf('/') + 1);
		} else if (this.type) {
			var prefix = this.type.split('/')[0];
			name = Basic.guid((prefix !== '' ? prefix : 'file') + '_');
			
			if (Mime.extensions[this.type]) {
				name += '.' + Mime.extensions[this.type][0]; // append proper extension if possible
			}
		}
		
		
		Basic.extend(this, {
			/**
			File name

			@property name
			@type {String}
			@default UID
			*/
			name: name || Basic.guid('file_'),

			/**
			Relative path to the file inside a directory

			@property relativePath
			@type {String}
			@default ''
			*/
			relativePath: '',
			
			/**
			Date of last modification

			@property lastModifiedDate
			@type {String}
			@default now
			*/
			lastModifiedDate: file.lastModifiedDate || (new Date()).toLocaleString() // Thu Aug 23 2012 19:40:00 GMT+0400 (GET)
		});
	}

	File.prototype = Blob.prototype;

	return File;
});

// Included from: src/javascript/file/FileDrop.js

/**
 * FileDrop.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

define('moxie/file/FileDrop', [
	'moxie/core/I18n',
	'moxie/core/utils/Dom',
	'moxie/core/Exceptions',
	'moxie/core/utils/Basic',
	'moxie/core/utils/Env',
	'moxie/file/File',
	'moxie/runtime/RuntimeClient',
	'moxie/core/EventTarget',
	'moxie/core/utils/Mime'
], function(I18n, Dom, x, Basic, Env, File, RuntimeClient, EventTarget, Mime) {
	/**
	Turn arbitrary DOM element to a drop zone accepting files. Converts selected files to _File_ objects, to be used 
	in conjunction with _Image_, preloaded in memory with _FileReader_ or uploaded to a server through 
	_XMLHttpRequest_.

	@example
		<div id="drop_zone">
			Drop files here
		</div>
		<br />
		<div id="filelist"></div>

		<script type="text/javascript">
			var fileDrop = new mOxie.FileDrop('drop_zone'), fileList = mOxie.get('filelist');

			fileDrop.ondrop = function() {
				mOxie.each(this.files, function(file) {
					fileList.innerHTML += '<div>' + file.name + '</div>';
				});
			};

			fileDrop.init();
		</script>

	@class FileDrop
	@constructor
	@extends EventTarget
	@uses RuntimeClient
	@param {Object|String} options If options has typeof string, argument is considered as options.drop_zone
		@param {String|DOMElement} options.drop_zone DOM Element to turn into a drop zone
		@param {Array} [options.accept] Array of mime types to accept. By default accepts all
		@param {Object|String} [options.required_caps] Set of required capabilities, that chosen runtime must support
	*/
	var dispatches = [
		/**
		Dispatched when runtime is connected and drop zone is ready to accept files.

		@event ready
		@param {Object} event
		*/
		'ready', 

		/**
		Dispatched when dragging cursor enters the drop zone.

		@event dragenter
		@param {Object} event
		*/
		'dragenter',

		/**
		Dispatched when dragging cursor leaves the drop zone.

		@event dragleave
		@param {Object} event
		*/
		'dragleave', 

		/**
		Dispatched when file is dropped onto the drop zone.

		@event drop
		@param {Object} event
		*/
		'drop', 

		/**
		Dispatched if error occurs.

		@event error
		@param {Object} event
		*/
		'error'
	];

	function FileDrop(options) {
		if (MXI_DEBUG) {
			Env.log("Instantiating FileDrop...");	
		}

		var self = this, defaults;

		// if flat argument passed it should be drop_zone id
		if (typeof(options) === 'string') {
			options = { drop_zone : options };
		}

		// figure out the options
		defaults = {
			accept: [{
				title: I18n.translate('All Files'),
				extensions: '*'
			}],
			required_caps: {
				drag_and_drop: true
			}
		};
		
		options = typeof(options) === 'object' ? Basic.extend({}, defaults, options) : defaults;

		// this will help us to find proper default container
		options.container = Dom.get(options.drop_zone) || document.body;

		// make container relative, if it is not
		if (Dom.getStyle(options.container, 'position') === 'static') {
			options.container.style.position = 'relative';
		}
					
		// normalize accept option (could be list of mime types or array of title/extensions pairs)
		if (typeof(options.accept) === 'string') {
			options.accept = Mime.mimes2extList(options.accept);
		}

		RuntimeClient.call(self);

		Basic.extend(self, {
			uid: Basic.guid('uid_'),

			ruid: null,

			files: null,

			init: function() {		
				self.bind('RuntimeInit', function(e, runtime) {
					self.ruid = runtime.uid;
					runtime.exec.call(self, 'FileDrop', 'init', options);
					self.dispatchEvent('ready');
				});
							
				// runtime needs: options.required_features, options.runtime_order and options.container
				self.connectRuntime(options); // throws RuntimeError
			},

			destroy: function() {
				var runtime = this.getRuntime();
				if (runtime) {
					runtime.exec.call(this, 'FileDrop', 'destroy');
					this.disconnectRuntime();
				}
				this.files = null;
				
				this.unbindAll();
			}
		});

		this.handleEventProps(dispatches);
	}

	FileDrop.prototype = EventTarget.instance;

	return FileDrop;
});

// Included from: src/javascript/file/FileReader.js

/**
 * FileReader.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

define('moxie/file/FileReader', [
	'moxie/core/utils/Basic',
	'moxie/core/utils/Encode',
	'moxie/core/Exceptions',
	'moxie/core/EventTarget',
	'moxie/file/Blob',
	'moxie/runtime/RuntimeClient'
], function(Basic, Encode, x, EventTarget, Blob, RuntimeClient) {
	/**
	Utility for preloading o.Blob/o.File objects in memory. By design closely follows [W3C FileReader](http://www.w3.org/TR/FileAPI/#dfn-filereader)
	interface. Where possible uses native FileReader, where - not falls back to shims.

	@class FileReader
	@constructor FileReader
	@extends EventTarget
	@uses RuntimeClient
	*/
	var dispatches = [

		/** 
		Dispatched when the read starts.

		@event loadstart
		@param {Object} event
		*/
		'loadstart', 

		/** 
		Dispatched while reading (and decoding) blob, and reporting partial Blob data (progess.loaded/progress.total).

		@event progress
		@param {Object} event
		*/
		'progress', 

		/** 
		Dispatched when the read has successfully completed.

		@event load
		@param {Object} event
		*/
		'load', 

		/** 
		Dispatched when the read has been aborted. For instance, by invoking the abort() method.

		@event abort
		@param {Object} event
		*/
		'abort', 

		/** 
		Dispatched when the read has failed.

		@event error
		@param {Object} event
		*/
		'error', 

		/** 
		Dispatched when the request has completed (either in success or failure).

		@event loadend
		@param {Object} event
		*/
		'loadend'
	];
	
	function FileReader() {

		RuntimeClient.call(this);

		Basic.extend(this, {
			/**
			UID of the component instance.

			@property uid
			@type {String}
			*/
			uid: Basic.guid('uid_'),

			/**
			Contains current state of FileReader object. Can take values of FileReader.EMPTY, FileReader.LOADING
			and FileReader.DONE.

			@property readyState
			@type {Number}
			@default FileReader.EMPTY
			*/
			readyState: FileReader.EMPTY,
			
			/**
			Result of the successful read operation.

			@property result
			@type {String}
			*/
			result: null,
			
			/**
			Stores the error of failed asynchronous read operation.

			@property error
			@type {DOMError}
			*/
			error: null,
			
			/**
			Initiates reading of File/Blob object contents to binary string.

			@method readAsBinaryString
			@param {Blob|File} blob Object to preload
			*/
			readAsBinaryString: function(blob) {
				_read.call(this, 'readAsBinaryString', blob);
			},
			
			/**
			Initiates reading of File/Blob object contents to dataURL string.

			@method readAsDataURL
			@param {Blob|File} blob Object to preload
			*/
			readAsDataURL: function(blob) {
				_read.call(this, 'readAsDataURL', blob);
			},
			
			/**
			Initiates reading of File/Blob object contents to string.

			@method readAsText
			@param {Blob|File} blob Object to preload
			*/
			readAsText: function(blob) {
				_read.call(this, 'readAsText', blob);
			},
			
			/**
			Aborts preloading process.

			@method abort
			*/
			abort: function() {
				this.result = null;
				
				if (Basic.inArray(this.readyState, [FileReader.EMPTY, FileReader.DONE]) !== -1) {
					return;
				} else if (this.readyState === FileReader.LOADING) {
					this.readyState = FileReader.DONE;
				}

				this.exec('FileReader', 'abort');
				
				this.trigger('abort');
				this.trigger('loadend');
			},

			/**
			Destroy component and release resources.

			@method destroy
			*/
			destroy: function() {
				this.abort();
				this.exec('FileReader', 'destroy');
				this.disconnectRuntime();
				this.unbindAll();
			}
		});

		// uid must already be assigned
		this.handleEventProps(dispatches);

		this.bind('Error', function(e, err) {
			this.readyState = FileReader.DONE;
			this.error = err;
		}, 999);
		
		this.bind('Load', function(e) {
			this.readyState = FileReader.DONE;
		}, 999);

		
		function _read(op, blob) {
			var self = this;			

			this.trigger('loadstart');

			if (this.readyState === FileReader.LOADING) {
				this.trigger('error', new x.DOMException(x.DOMException.INVALID_STATE_ERR));
				this.trigger('loadend');
				return;
			}

			// if source is not o.Blob/o.File
			if (!(blob instanceof Blob)) {
				this.trigger('error', new x.DOMException(x.DOMException.NOT_FOUND_ERR));
				this.trigger('loadend');
				return;
			}

			this.result = null;
			this.readyState = FileReader.LOADING;
			
			if (blob.isDetached()) {
				var src = blob.getSource();
				switch (op) {
					case 'readAsText':
					case 'readAsBinaryString':
						this.result = src;
						break;
					case 'readAsDataURL':
						this.result = 'data:' + blob.type + ';base64,' + Encode.btoa(src);
						break;
				}
				this.readyState = FileReader.DONE;
				this.trigger('load');
				this.trigger('loadend');
			} else {
				this.connectRuntime(blob.ruid);
				this.exec('FileReader', 'read', op, blob);
			}
		}
	}
	
	/**
	Initial FileReader state

	@property EMPTY
	@type {Number}
	@final
	@static
	@default 0
	*/
	FileReader.EMPTY = 0;

	/**
	FileReader switches to this state when it is preloading the source

	@property LOADING
	@type {Number}
	@final
	@static
	@default 1
	*/
	FileReader.LOADING = 1;

	/**
	Preloading is complete, this is a final state

	@property DONE
	@type {Number}
	@final
	@static
	@default 2
	*/
	FileReader.DONE = 2;

	FileReader.prototype = EventTarget.instance;

	return FileReader;
});

// Included from: src/javascript/core/utils/Url.js

/**
 * Url.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

define('moxie/core/utils/Url', [], function() {
	/**
	Parse url into separate components and fill in absent parts with parts from current url,
	based on https://raw.github.com/kvz/phpjs/master/functions/url/parse_url.js

	@method parseUrl
	@for Utils
	@static
	@param {String} url Url to parse (defaults to empty string if undefined)
	@return {Object} Hash containing extracted uri components
	*/
	var parseUrl = function(url, currentUrl) {
		var key = ['source', 'scheme', 'authority', 'userInfo', 'user', 'pass', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'fragment']
		, i = key.length
		, ports = {
			http: 80,
			https: 443
		}
		, uri = {}
		, regex = /^(?:([^:\/?#]+):)?(?:\/\/()(?:(?:()(?:([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?))?()(?:(()(?:(?:[^?#\/]*\/)*)()(?:[^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/
		, m = regex.exec(url || '')
		;
					
		while (i--) {
			if (m[i]) {
				uri[key[i]] = m[i];
			}
		}

		// when url is relative, we set the origin and the path ourselves
		if (!uri.scheme) {
			// come up with defaults
			if (!currentUrl || typeof(currentUrl) === 'string') {
				currentUrl = parseUrl(currentUrl || document.location.href);
			}

			uri.scheme = currentUrl.scheme;
			uri.host = currentUrl.host;
			uri.port = currentUrl.port;

			var path = '';
			// for urls without trailing slash we need to figure out the path
			if (/^[^\/]/.test(uri.path)) {
				path = currentUrl.path;
				// if path ends with a filename, strip it
				if (/\/[^\/]*\.[^\/]*$/.test(path)) {
					path = path.replace(/\/[^\/]+$/, '/');
				} else {
					// avoid double slash at the end (see #127)
					path = path.replace(/\/?$/, '/');
				}
			}
			uri.path = path + (uri.path || ''); // site may reside at domain.com or domain.com/subdir
		}

		if (!uri.port) {
			uri.port = ports[uri.scheme] || 80;
		} 
		
		uri.port = parseInt(uri.port, 10);

		if (!uri.path) {
			uri.path = "/";
		}

		delete uri.source;

		return uri;
	};

	/**
	Resolve url - among other things will turn relative url to absolute

	@method resolveUrl
	@static
	@param {String|Object} url Either absolute or relative, or a result of parseUrl call
	@return {String} Resolved, absolute url
	*/
	var resolveUrl = function(url) {
		var ports = { // we ignore default ports
			http: 80,
			https: 443
		}
		, urlp = typeof(url) === 'object' ? url : parseUrl(url);
		;

		return urlp.scheme + '://' + urlp.host + (urlp.port !== ports[urlp.scheme] ? ':' + urlp.port : '') + urlp.path + (urlp.query ? urlp.query : '');
	};

	/**
	Check if specified url has the same origin as the current document

	@method hasSameOrigin
	@param {String|Object} url
	@return {Boolean}
	*/
	var hasSameOrigin = function(url) {
		function origin(url) {
			return [url.scheme, url.host, url.port].join('/');
		}
			
		if (typeof url === 'string') {
			url = parseUrl(url);
		}	
		
		return origin(parseUrl()) === origin(url);
	};

	return {
		parseUrl: parseUrl,
		resolveUrl: resolveUrl,
		hasSameOrigin: hasSameOrigin
	};
});

// Included from: src/javascript/runtime/RuntimeTarget.js

/**
 * RuntimeTarget.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

define('moxie/runtime/RuntimeTarget', [
	'moxie/core/utils/Basic',
	'moxie/runtime/RuntimeClient',
	"moxie/core/EventTarget"
], function(Basic, RuntimeClient, EventTarget) {
	/**
	Instance of this class can be used as a target for the events dispatched by shims,
	when allowing them onto components is for either reason inappropriate

	@class RuntimeTarget
	@constructor
	@protected
	@extends EventTarget
	*/
	function RuntimeTarget() {
		this.uid = Basic.guid('uid_');
		
		RuntimeClient.call(this);

		this.destroy = function() {
			this.disconnectRuntime();
			this.unbindAll();
		};
	}

	RuntimeTarget.prototype = EventTarget.instance;

	return RuntimeTarget;
});

// Included from: src/javascript/file/FileReaderSync.js

/**
 * FileReaderSync.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

define('moxie/file/FileReaderSync', [
	'moxie/core/utils/Basic',
	'moxie/runtime/RuntimeClient',
	'moxie/core/utils/Encode'
], function(Basic, RuntimeClient, Encode) {
	/**
	Synchronous FileReader implementation. Something like this is available in WebWorkers environment, here
	it can be used to read only preloaded blobs/files and only below certain size (not yet sure what that'd be,
	but probably < 1mb). Not meant to be used directly by user.

	@class FileReaderSync
	@private
	@constructor
	*/
	return function() {
		RuntimeClient.call(this);

		Basic.extend(this, {
			uid: Basic.guid('uid_'),

			readAsBinaryString: function(blob) {
				return _read.call(this, 'readAsBinaryString', blob);
			},
			
			readAsDataURL: function(blob) {
				return _read.call(this, 'readAsDataURL', blob);
			},
			
			/*readAsArrayBuffer: function(blob) {
				return _read.call(this, 'readAsArrayBuffer', blob);
			},*/
			
			readAsText: function(blob) {
				return _read.call(this, 'readAsText', blob);
			}
		});

		function _read(op, blob) {
			if (blob.isDetached()) {
				var src = blob.getSource();
				switch (op) {
					case 'readAsBinaryString':
						return src;
					case 'readAsDataURL':
						return 'data:' + blob.type + ';base64,' + Encode.btoa(src);
					case 'readAsText':
						var txt = '';
						for (var i = 0, length = src.length; i < length; i++) {
							txt += String.fromCharCode(src[i]);
						}
						return txt;
				}
			} else {
				var result = this.connectRuntime(blob.ruid).exec.call(this, 'FileReaderSync', 'read', op, blob);
				this.disconnectRuntime();
				return result;
			}
		}
	};
});

// Included from: src/javascript/xhr/FormData.js

/**
 * FormData.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

define("moxie/xhr/FormData", [
	"moxie/core/Exceptions",
	"moxie/core/utils/Basic",
	"moxie/file/Blob"
], function(x, Basic, Blob) {
	/**
	FormData

	@class FormData
	@constructor
	*/
	function FormData() {
		var _blob, _fields = [];

		Basic.extend(this, {
			/**
			Append another key-value pair to the FormData object

			@method append
			@param {String} name Name for the new field
			@param {String|Blob|Array|Object} value Value for the field
			*/
			append: function(name, value) {
				var self = this, valueType = Basic.typeOf(value);

				// according to specs value might be either Blob or String
				if (value instanceof Blob) {
					_blob = {
						name: name,
						value: value // unfortunately we can only send single Blob in one FormData
					};
				} else if ('array' === valueType) {
					name += '[]';

					Basic.each(value, function(value) {
						self.append(name, value);
					});
				} else if ('object' === valueType) {
					Basic.each(value, function(value, key) {
						self.append(name + '[' + key + ']', value);
					});
				} else if ('null' === valueType || 'undefined' === valueType || 'number' === valueType && isNaN(value)) {
					self.append(name, "false");
				} else {
					_fields.push({
						name: name,
						value: value.toString()
					});
				}
			},

			/**
			Checks if FormData contains Blob.

			@method hasBlob
			@return {Boolean}
			*/
			hasBlob: function() {
				return !!this.getBlob();
			},

			/**
			Retrieves blob.

			@method getBlob
			@return {Object} Either Blob if found or null
			*/
			getBlob: function() {
				return _blob && _blob.value || null;
			},

			/**
			Retrieves blob field name.

			@method getBlobName
			@return {String} Either Blob field name or null
			*/
			getBlobName: function() {
				return _blob && _blob.name || null;
			},

			/**
			Loop over the fields in FormData and invoke the callback for each of them.

			@method each
			@param {Function} cb Callback to call for each field
			*/
			each: function(cb) {
				Basic.each(_fields, function(field) {
					cb(field.value, field.name);
				});

				if (_blob) {
					cb(_blob.value, _blob.name);
				}
			},

			destroy: function() {
				_blob = null;
				_fields = [];
			}
		});
	}

	return FormData;
});

// Included from: src/javascript/xhr/XMLHttpRequest.js

/**
 * XMLHttpRequest.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

define("moxie/xhr/XMLHttpRequest", [
	"moxie/core/utils/Basic",
	"moxie/core/Exceptions",
	"moxie/core/EventTarget",
	"moxie/core/utils/Encode",
	"moxie/core/utils/Url",
	"moxie/runtime/Runtime",
	"moxie/runtime/RuntimeTarget",
	"moxie/file/Blob",
	"moxie/file/FileReaderSync",
	"moxie/xhr/FormData",
	"moxie/core/utils/Env",
	"moxie/core/utils/Mime"
], function(Basic, x, EventTarget, Encode, Url, Runtime, RuntimeTarget, Blob, FileReaderSync, FormData, Env, Mime) {

	var httpCode = {
		100: 'Continue',
		101: 'Switching Protocols',
		102: 'Processing',

		200: 'OK',
		201: 'Created',
		202: 'Accepted',
		203: 'Non-Authoritative Information',
		204: 'No Content',
		205: 'Reset Content',
		206: 'Partial Content',
		207: 'Multi-Status',
		226: 'IM Used',

		300: 'Multiple Choices',
		301: 'Moved Permanently',
		302: 'Found',
		303: 'See Other',
		304: 'Not Modified',
		305: 'Use Proxy',
		306: 'Reserved',
		307: 'Temporary Redirect',

		400: 'Bad Request',
		401: 'Unauthorized',
		402: 'Payment Required',
		403: 'Forbidden',
		404: 'Not Found',
		405: 'Method Not Allowed',
		406: 'Not Acceptable',
		407: 'Proxy Authentication Required',
		408: 'Request Timeout',
		409: 'Conflict',
		410: 'Gone',
		411: 'Length Required',
		412: 'Precondition Failed',
		413: 'Request Entity Too Large',
		414: 'Request-URI Too Long',
		415: 'Unsupported Media Type',
		416: 'Requested Range Not Satisfiable',
		417: 'Expectation Failed',
		422: 'Unprocessable Entity',
		423: 'Locked',
		424: 'Failed Dependency',
		426: 'Upgrade Required',

		500: 'Internal Server Error',
		501: 'Not Implemented',
		502: 'Bad Gateway',
		503: 'Service Unavailable',
		504: 'Gateway Timeout',
		505: 'HTTP Version Not Supported',
		506: 'Variant Also Negotiates',
		507: 'Insufficient Storage',
		510: 'Not Extended'
	};

	function XMLHttpRequestUpload() {
		this.uid = Basic.guid('uid_');
	}
	
	XMLHttpRequestUpload.prototype = EventTarget.instance;

	/**
	Implementation of XMLHttpRequest

	@class XMLHttpRequest
	@constructor
	@uses RuntimeClient
	@extends EventTarget
	*/
	var dispatches = [
		'loadstart',

		'progress',

		'abort',

		'error',

		'load',

		'timeout',

		'loadend'

		// readystatechange (for historical reasons)
	]; 
	
	var NATIVE = 1, RUNTIME = 2;
					
	function XMLHttpRequest() {
		var self = this,
			// this (together with _p() @see below) is here to gracefully upgrade to setter/getter syntax where possible
			props = {
				/**
				The amount of milliseconds a request can take before being terminated. Initially zero. Zero means there is no timeout.

				@property timeout
				@type Number
				@default 0
				*/
				timeout: 0,

				/**
				Current state, can take following values:
				UNSENT (numeric value 0)
				The object has been constructed.

				OPENED (numeric value 1)
				The open() method has been successfully invoked. During this state request headers can be set using setRequestHeader() and the request can be made using the send() method.

				HEADERS_RECEIVED (numeric value 2)
				All redirects (if any) have been followed and all HTTP headers of the final response have been received. Several response members of the object are now available.

				LOADING (numeric value 3)
				The response entity body is being received.

				DONE (numeric value 4)

				@property readyState
				@type Number
				@default 0 (UNSENT)
				*/
				readyState: XMLHttpRequest.UNSENT,

				/**
				True when user credentials are to be included in a cross-origin request. False when they are to be excluded
				in a cross-origin request and when cookies are to be ignored in its response. Initially false.

				@property withCredentials
				@type Boolean
				@default false
				*/
				withCredentials: false,

				/**
				Returns the HTTP status code.

				@property status
				@type Number
				@default 0
				*/
				status: 0,

				/**
				Returns the HTTP status text.

				@property statusText
				@type String
				*/
				statusText: "",

				/**
				Returns the response type. Can be set to change the response type. Values are:
				the empty string (default), "arraybuffer", "blob", "document", "json", and "text".
				
				@property responseType
				@type String
				*/
				responseType: "",

				/**
				Returns the document response entity body.
				
				Throws an "InvalidStateError" exception if responseType is not the empty string or "document".

				@property responseXML
				@type Document
				*/
				responseXML: null,

				/**
				Returns the text response entity body.
				
				Throws an "InvalidStateError" exception if responseType is not the empty string or "text".

				@property responseText
				@type String
				*/
				responseText: null,

				/**
				Returns the response entity body (http://www.w3.org/TR/XMLHttpRequest/#response-entity-body).
				Can become: ArrayBuffer, Blob, Document, JSON, Text
				
				@property response
				@type Mixed
				*/
				response: null
			},

			_async = true,
			_url,
			_method,
			_headers = {},
			_user,
			_password,
			_encoding = null,
			_mimeType = null,

			// flags
			_sync_flag = false,
			_send_flag = false,
			_upload_events_flag = false,
			_upload_complete_flag = false,
			_error_flag = false,
			_same_origin_flag = false,

			// times
			_start_time,
			_timeoutset_time,

			_finalMime = null,
			_finalCharset = null,

			_options = {},
			_xhr,
			_responseHeaders = '',
			_responseHeadersBag
			;

		
		Basic.extend(this, props, {
			/**
			Unique id of the component

			@property uid
			@type String
			*/
			uid: Basic.guid('uid_'),
			
			/**
			Target for Upload events

			@property upload
			@type XMLHttpRequestUpload
			*/
			upload: new XMLHttpRequestUpload(),
			

			/**
			Sets the request method, request URL, synchronous flag, request username, and request password.

			Throws a "SyntaxError" exception if one of the following is true:

			method is not a valid HTTP method.
			url cannot be resolved.
			url contains the "user:password" format in the userinfo production.
			Throws a "SecurityError" exception if method is a case-insensitive match for CONNECT, TRACE or TRACK.

			Throws an "InvalidAccessError" exception if one of the following is true:

			Either user or password is passed as argument and the origin of url does not match the XMLHttpRequest origin.
			There is an associated XMLHttpRequest document and either the timeout attribute is not zero,
			the withCredentials attribute is true, or the responseType attribute is not the empty string.


			@method open
			@param {String} method HTTP method to use on request
			@param {String} url URL to request
			@param {Boolean} [async=true] If false request will be done in synchronous manner. Asynchronous by default.
			@param {String} [user] Username to use in HTTP authentication process on server-side
			@param {String} [password] Password to use in HTTP authentication process on server-side
			*/
			open: function(method, url, async, user, password) {
				var urlp;
				
				// first two arguments are required
				if (!method || !url) {
					throw new x.DOMException(x.DOMException.SYNTAX_ERR);
				}
				
				// 2 - check if any code point in method is higher than U+00FF or after deflating method it does not match the method
				if (/[\u0100-\uffff]/.test(method) || Encode.utf8_encode(method) !== method) {
					throw new x.DOMException(x.DOMException.SYNTAX_ERR);
				}

				// 3
				if (!!~Basic.inArray(method.toUpperCase(), ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT', 'TRACE', 'TRACK'])) {
					_method = method.toUpperCase();
				}
				
				
				// 4 - allowing these methods poses a security risk
				if (!!~Basic.inArray(_method, ['CONNECT', 'TRACE', 'TRACK'])) {
					throw new x.DOMException(x.DOMException.SECURITY_ERR);
				}

				// 5
				url = Encode.utf8_encode(url);
				
				// 6 - Resolve url relative to the XMLHttpRequest base URL. If the algorithm returns an error, throw a "SyntaxError".
				urlp = Url.parseUrl(url);

				_same_origin_flag = Url.hasSameOrigin(urlp);
																
				// 7 - manually build up absolute url
				_url = Url.resolveUrl(url);
		
				// 9-10, 12-13
				if ((user || password) && !_same_origin_flag) {
					throw new x.DOMException(x.DOMException.INVALID_ACCESS_ERR);
				}

				_user = user || urlp.user;
				_password = password || urlp.pass;
				
				// 11
				_async = async || true;
				
				if (_async === false && (_p('timeout') || _p('withCredentials') || _p('responseType') !== "")) {
					throw new x.DOMException(x.DOMException.INVALID_ACCESS_ERR);
				}
				
				// 14 - terminate abort()
				
				// 15 - terminate send()

				// 18
				_sync_flag = !_async;
				_send_flag = false;
				_headers = {};
				_reset.call(this);

				// 19
				_p('readyState', XMLHttpRequest.OPENED);
				
				// 20
				this.dispatchEvent('readystatechange');
			},
			
			/**
			Appends an header to the list of author request headers, or if header is already
			in the list of author request headers, combines its value with value.

			Throws an "InvalidStateError" exception if the state is not OPENED or if the send() flag is set.
			Throws a "SyntaxError" exception if header is not a valid HTTP header field name or if value
			is not a valid HTTP header field value.
			
			@method setRequestHeader
			@param {String} header
			@param {String|Number} value
			*/
			setRequestHeader: function(header, value) {
				var uaHeaders = [ // these headers are controlled by the user agent
						"accept-charset",
						"accept-encoding",
						"access-control-request-headers",
						"access-control-request-method",
						"connection",
						"content-length",
						"cookie",
						"cookie2",
						"content-transfer-encoding",
						"date",
						"expect",
						"host",
						"keep-alive",
						"origin",
						"referer",
						"te",
						"trailer",
						"transfer-encoding",
						"upgrade",
						"user-agent",
						"via"
					];
				
				// 1-2
				if (_p('readyState') !== XMLHttpRequest.OPENED || _send_flag) {
					throw new x.DOMException(x.DOMException.INVALID_STATE_ERR);
				}

				// 3
				if (/[\u0100-\uffff]/.test(header) || Encode.utf8_encode(header) !== header) {
					throw new x.DOMException(x.DOMException.SYNTAX_ERR);
				}

				// 4
				/* this step is seemingly bypassed in browsers, probably to allow various unicode characters in header values
				if (/[\u0100-\uffff]/.test(value) || Encode.utf8_encode(value) !== value) {
					throw new x.DOMException(x.DOMException.SYNTAX_ERR);
				}*/

				header = Basic.trim(header).toLowerCase();
				
				// setting of proxy-* and sec-* headers is prohibited by spec
				if (!!~Basic.inArray(header, uaHeaders) || /^(proxy\-|sec\-)/.test(header)) {
					return false;
				}

				// camelize
				// browsers lowercase header names (at least for custom ones)
				// header = header.replace(/\b\w/g, function($1) { return $1.toUpperCase(); });
				
				if (!_headers[header]) {
					_headers[header] = value;
				} else {
					// http://tools.ietf.org/html/rfc2616#section-4.2 (last paragraph)
					_headers[header] += ', ' + value;
				}
				return true;
			},

			/**
			Returns all headers from the response, with the exception of those whose field name is Set-Cookie or Set-Cookie2.

			@method getAllResponseHeaders
			@return {String} reponse headers or empty string
			*/
			getAllResponseHeaders: function() {
				return _responseHeaders || '';
			},

			/**
			Returns the header field value from the response of which the field name matches header, 
			unless the field name is Set-Cookie or Set-Cookie2.

			@method getResponseHeader
			@param {String} header
			@return {String} value(s) for the specified header or null
			*/
			getResponseHeader: function(header) {
				header = header.toLowerCase();

				if (_error_flag || !!~Basic.inArray(header, ['set-cookie', 'set-cookie2'])) {
					return null;
				}

				if (_responseHeaders && _responseHeaders !== '') {
					// if we didn't parse response headers until now, do it and keep for later
					if (!_responseHeadersBag) {
						_responseHeadersBag = {};
						Basic.each(_responseHeaders.split(/\r\n/), function(line) {
							var pair = line.split(/:\s+/);
							if (pair.length === 2) { // last line might be empty, omit
								pair[0] = Basic.trim(pair[0]); // just in case
								_responseHeadersBag[pair[0].toLowerCase()] = { // simply to retain header name in original form
									header: pair[0],
									value: Basic.trim(pair[1])
								};
							}
						});
					}
					if (_responseHeadersBag.hasOwnProperty(header)) {
						return _responseHeadersBag[header].header + ': ' + _responseHeadersBag[header].value;
					}
				}
				return null;
			},
			
			/**
			Sets the Content-Type header for the response to mime.
			Throws an "InvalidStateError" exception if the state is LOADING or DONE.
			Throws a "SyntaxError" exception if mime is not a valid media type.

			@method overrideMimeType
			@param String mime Mime type to set
			*/
			overrideMimeType: function(mime) {
				var matches, charset;
			
				// 1
				if (!!~Basic.inArray(_p('readyState'), [XMLHttpRequest.LOADING, XMLHttpRequest.DONE])) {
					throw new x.DOMException(x.DOMException.INVALID_STATE_ERR);
				}

				// 2
				mime = Basic.trim(mime.toLowerCase());

				if (/;/.test(mime) && (matches = mime.match(/^([^;]+)(?:;\scharset\=)?(.*)$/))) {
					mime = matches[1];
					if (matches[2]) {
						charset = matches[2];
					}
				}

				if (!Mime.mimes[mime]) {
					throw new x.DOMException(x.DOMException.SYNTAX_ERR);
				}

				// 3-4
				_finalMime = mime;
				_finalCharset = charset;
			},
			
			/**
			Initiates the request. The optional argument provides the request entity body.
			The argument is ignored if request method is GET or HEAD.

			Throws an "InvalidStateError" exception if the state is not OPENED or if the send() flag is set.

			@method send
			@param {Blob|Document|String|FormData} [data] Request entity body
			@param {Object} [options] Set of requirements and pre-requisities for runtime initialization
			*/
			send: function(data, options) {					
				if (Basic.typeOf(options) === 'string') {
					_options = { ruid: options };
				} else if (!options) {
					_options = {};
				} else {
					_options = options;
				}
															
				// 1-2
				if (this.readyState !== XMLHttpRequest.OPENED || _send_flag) {
					throw new x.DOMException(x.DOMException.INVALID_STATE_ERR);
				}
				
				// 3					
				// sending Blob
				if (data instanceof Blob) {
					_options.ruid = data.ruid;
					_mimeType = data.type || 'application/octet-stream';
				}
				
				// FormData
				else if (data instanceof FormData) {
					if (data.hasBlob()) {
						var blob = data.getBlob();
						_options.ruid = blob.ruid;
						_mimeType = blob.type || 'application/octet-stream';
					}
				}
				
				// DOMString
				else if (typeof data === 'string') {
					_encoding = 'UTF-8';
					_mimeType = 'text/plain;charset=UTF-8';
					
					// data should be converted to Unicode and encoded as UTF-8
					data = Encode.utf8_encode(data);
				}

				// if withCredentials not set, but requested, set it automatically
				if (!this.withCredentials) {
					this.withCredentials = (_options.required_caps && _options.required_caps.send_browser_cookies) && !_same_origin_flag;
				}

				// 4 - storage mutex
				// 5
				_upload_events_flag = (!_sync_flag && this.upload.hasEventListener()); // DSAP
				// 6
				_error_flag = false;
				// 7
				_upload_complete_flag = !data;
				// 8 - Asynchronous steps
				if (!_sync_flag) {
					// 8.1
					_send_flag = true;
					// 8.2
					// this.dispatchEvent('loadstart'); // will be dispatched either by native or runtime xhr
					// 8.3
					//if (!_upload_complete_flag) {
						// this.upload.dispatchEvent('loadstart');	// will be dispatched either by native or runtime xhr
					//}
				}
				// 8.5 - Return the send() method call, but continue running the steps in this algorithm.
				_doXHR.call(this, data);
			},
			
			/**
			Cancels any network activity.
			
			@method abort
			*/
			abort: function() {
				_error_flag = true;
				_sync_flag = false;

				if (!~Basic.inArray(_p('readyState'), [XMLHttpRequest.UNSENT, XMLHttpRequest.OPENED, XMLHttpRequest.DONE])) {
					_p('readyState', XMLHttpRequest.DONE);
					_send_flag = false;

					if (_xhr) {
						_xhr.getRuntime().exec.call(_xhr, 'XMLHttpRequest', 'abort', _upload_complete_flag);
					} else {
						throw new x.DOMException(x.DOMException.INVALID_STATE_ERR);
					}

					_upload_complete_flag = true;
				} else {
					_p('readyState', XMLHttpRequest.UNSENT);
				}
			},

			destroy: function() {
				if (_xhr) {
					if (Basic.typeOf(_xhr.destroy) === 'function') {
						_xhr.destroy();
					}
					_xhr = null;
				}

				this.unbindAll();

				if (this.upload) {
					this.upload.unbindAll();
					this.upload = null;
				}
			}
		});

		this.handleEventProps(dispatches.concat(['readystatechange'])); // for historical reasons
		this.upload.handleEventProps(dispatches);

		/* this is nice, but maybe too lengthy

		// if supported by JS version, set getters/setters for specific properties
		o.defineProperty(this, 'readyState', {
			configurable: false,

			get: function() {
				return _p('readyState');
			}
		});

		o.defineProperty(this, 'timeout', {
			configurable: false,

			get: function() {
				return _p('timeout');
			},

			set: function(value) {

				if (_sync_flag) {
					throw new x.DOMException(x.DOMException.INVALID_ACCESS_ERR);
				}

				// timeout still should be measured relative to the start time of request
				_timeoutset_time = (new Date).getTime();

				_p('timeout', value);
			}
		});

		// the withCredentials attribute has no effect when fetching same-origin resources
		o.defineProperty(this, 'withCredentials', {
			configurable: false,

			get: function() {
				return _p('withCredentials');
			},

			set: function(value) {
				// 1-2
				if (!~o.inArray(_p('readyState'), [XMLHttpRequest.UNSENT, XMLHttpRequest.OPENED]) || _send_flag) {
					throw new x.DOMException(x.DOMException.INVALID_STATE_ERR);
				}

				// 3-4
				if (_anonymous_flag || _sync_flag) {
					throw new x.DOMException(x.DOMException.INVALID_ACCESS_ERR);
				}

				// 5
				_p('withCredentials', value);
			}
		});

		o.defineProperty(this, 'status', {
			configurable: false,

			get: function() {
				return _p('status');
			}
		});

		o.defineProperty(this, 'statusText', {
			configurable: false,

			get: function() {
				return _p('statusText');
			}
		});

		o.defineProperty(this, 'responseType', {
			configurable: false,

			get: function() {
				return _p('responseType');
			},

			set: function(value) {
				// 1
				if (!!~o.inArray(_p('readyState'), [XMLHttpRequest.LOADING, XMLHttpRequest.DONE])) {
					throw new x.DOMException(x.DOMException.INVALID_STATE_ERR);
				}

				// 2
				if (_sync_flag) {
					throw new x.DOMException(x.DOMException.INVALID_ACCESS_ERR);
				}

				// 3
				_p('responseType', value.toLowerCase());
			}
		});

		o.defineProperty(this, 'responseText', {
			configurable: false,

			get: function() {
				// 1
				if (!~o.inArray(_p('responseType'), ['', 'text'])) {
					throw new x.DOMException(x.DOMException.INVALID_STATE_ERR);
				}

				// 2-3
				if (_p('readyState') !== XMLHttpRequest.DONE && _p('readyState') !== XMLHttpRequest.LOADING || _error_flag) {
					throw new x.DOMException(x.DOMException.INVALID_STATE_ERR);
				}

				return _p('responseText');
			}
		});

		o.defineProperty(this, 'responseXML', {
			configurable: false,

			get: function() {
				// 1
				if (!~o.inArray(_p('responseType'), ['', 'document'])) {
					throw new x.DOMException(x.DOMException.INVALID_STATE_ERR);
				}

				// 2-3
				if (_p('readyState') !== XMLHttpRequest.DONE || _error_flag) {
					throw new x.DOMException(x.DOMException.INVALID_STATE_ERR);
				}

				return _p('responseXML');
			}
		});

		o.defineProperty(this, 'response', {
			configurable: false,

			get: function() {
				if (!!~o.inArray(_p('responseType'), ['', 'text'])) {
					if (_p('readyState') !== XMLHttpRequest.DONE && _p('readyState') !== XMLHttpRequest.LOADING || _error_flag) {
						return '';
					}
				}

				if (_p('readyState') !== XMLHttpRequest.DONE || _error_flag) {
					return null;
				}

				return _p('response');
			}
		});

		*/

		function _p(prop, value) {
			if (!props.hasOwnProperty(prop)) {
				return;
			}
			if (arguments.length === 1) { // get
				return Env.can('define_property') ? props[prop] : self[prop];
			} else { // set
				if (Env.can('define_property')) {
					props[prop] = value;
				} else {
					self[prop] = value;
				}
			}
		}
		
		/*
		function _toASCII(str, AllowUnassigned, UseSTD3ASCIIRules) {
			// TODO: http://tools.ietf.org/html/rfc3490#section-4.1
			return str.toLowerCase();
		}
		*/
		
		
		function _doXHR(data) {
			var self = this;
			
			_start_time = new Date().getTime();

			_xhr = new RuntimeTarget();

			function loadEnd() {
				if (_xhr) { // it could have been destroyed by now
					_xhr.destroy();
					_xhr = null;
				}
				self.dispatchEvent('loadend');
				self = null;
			}

			function exec(runtime) {
				_xhr.bind('LoadStart', function(e) {
					_p('readyState', XMLHttpRequest.LOADING);
					self.dispatchEvent('readystatechange');

					self.dispatchEvent(e);
					
					if (_upload_events_flag) {
						self.upload.dispatchEvent(e);
					}
				});
				
				_xhr.bind('Progress', function(e) {
					if (_p('readyState') !== XMLHttpRequest.LOADING) {
						_p('readyState', XMLHttpRequest.LOADING); // LoadStart unreliable (in Flash for example)
						self.dispatchEvent('readystatechange');
					}
					self.dispatchEvent(e);
				});
				
				_xhr.bind('UploadProgress', function(e) {
					if (_upload_events_flag) {
						self.upload.dispatchEvent({
							type: 'progress',
							lengthComputable: false,
							total: e.total,
							loaded: e.loaded
						});
					}
				});
				
				_xhr.bind('Load', function(e) {
					_p('readyState', XMLHttpRequest.DONE);
					_p('status', Number(runtime.exec.call(_xhr, 'XMLHttpRequest', 'getStatus') || 0));
					_p('statusText', httpCode[_p('status')] || "");
					
					_p('response', runtime.exec.call(_xhr, 'XMLHttpRequest', 'getResponse', _p('responseType')));

					if (!!~Basic.inArray(_p('responseType'), ['text', ''])) {
						_p('responseText', _p('response'));
					} else if (_p('responseType') === 'document') {
						_p('responseXML', _p('response'));
					}

					_responseHeaders = runtime.exec.call(_xhr, 'XMLHttpRequest', 'getAllResponseHeaders');

					self.dispatchEvent('readystatechange');
					
					if (_p('status') > 0) { // status 0 usually means that server is unreachable
						if (_upload_events_flag) {
							self.upload.dispatchEvent(e);
						}
						self.dispatchEvent(e);
					} else {
						_error_flag = true;
						self.dispatchEvent('error');
					}
					loadEnd();
				});

				_xhr.bind('Abort', function(e) {
					self.dispatchEvent(e);
					loadEnd();
				});
				
				_xhr.bind('Error', function(e) {
					_error_flag = true;
					_p('readyState', XMLHttpRequest.DONE);
					self.dispatchEvent('readystatechange');
					_upload_complete_flag = true;
					self.dispatchEvent(e);
					loadEnd();
				});

				runtime.exec.call(_xhr, 'XMLHttpRequest', 'send', {
					url: _url,
					method: _method,
					async: _async,
					user: _user,
					password: _password,
					headers: _headers,
					mimeType: _mimeType,
					encoding: _encoding,
					responseType: self.responseType,
					withCredentials: self.withCredentials,
					options: _options
				}, data);
			}

			// clarify our requirements
			if (typeof(_options.required_caps) === 'string') {
				_options.required_caps = Runtime.parseCaps(_options.required_caps);
			}

			_options.required_caps = Basic.extend({}, _options.required_caps, {
				return_response_type: self.responseType
			});

			if (data instanceof FormData) {
				_options.required_caps.send_multipart = true;
			}

			if (!Basic.isEmptyObj(_headers)) {
				_options.required_caps.send_custom_headers = true;
			}

			if (!_same_origin_flag) {
				_options.required_caps.do_cors = true;
			}
			

			if (_options.ruid) { // we do not need to wait if we can connect directly
				exec(_xhr.connectRuntime(_options));
			} else {
				_xhr.bind('RuntimeInit', function(e, runtime) {
					exec(runtime);
				});
				_xhr.bind('RuntimeError', function(e, err) {
					self.dispatchEvent('RuntimeError', err);
				});
				_xhr.connectRuntime(_options);
			}
		}
	
		
		function _reset() {
			_p('responseText', "");
			_p('responseXML', null);
			_p('response', null);
			_p('status', 0);
			_p('statusText', "");
			_start_time = _timeoutset_time = null;
		}
	}

	XMLHttpRequest.UNSENT = 0;
	XMLHttpRequest.OPENED = 1;
	XMLHttpRequest.HEADERS_RECEIVED = 2;
	XMLHttpRequest.LOADING = 3;
	XMLHttpRequest.DONE = 4;
	
	XMLHttpRequest.prototype = EventTarget.instance;

	return XMLHttpRequest;
});

// Included from: src/javascript/runtime/Transporter.js

/**
 * Transporter.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

define("moxie/runtime/Transporter", [
	"moxie/core/utils/Basic",
	"moxie/core/utils/Encode",
	"moxie/runtime/RuntimeClient",
	"moxie/core/EventTarget"
], function(Basic, Encode, RuntimeClient, EventTarget) {
	function Transporter() {
		var mod, _runtime, _data, _size, _pos, _chunk_size;

		RuntimeClient.call(this);

		Basic.extend(this, {
			uid: Basic.guid('uid_'),

			state: Transporter.IDLE,

			result: null,

			transport: function(data, type, options) {
				var self = this;

				options = Basic.extend({
					chunk_size: 204798
				}, options);

				// should divide by three, base64 requires this
				if ((mod = options.chunk_size % 3)) {
					options.chunk_size += 3 - mod;
				}

				_chunk_size = options.chunk_size;

				_reset.call(this);
				_data = data;
				_size = data.length;

				if (Basic.typeOf(options) === 'string' || options.ruid) {
					_run.call(self, type, this.connectRuntime(options));
				} else {
					// we require this to run only once
					var cb = function(e, runtime) {
						self.unbind("RuntimeInit", cb);
						_run.call(self, type, runtime);
					};
					this.bind("RuntimeInit", cb);
					this.connectRuntime(options);
				}
			},

			abort: function() {
				var self = this;

				self.state = Transporter.IDLE;
				if (_runtime) {
					_runtime.exec.call(self, 'Transporter', 'clear');
					self.trigger("TransportingAborted");
				}

				_reset.call(self);
			},


			destroy: function() {
				this.unbindAll();
				_runtime = null;
				this.disconnectRuntime();
				_reset.call(this);
			}
		});

		function _reset() {
			_size = _pos = 0;
			_data = this.result = null;
		}

		function _run(type, runtime) {
			var self = this;

			_runtime = runtime;

			//self.unbind("RuntimeInit");

			self.bind("TransportingProgress", function(e) {
				_pos = e.loaded;

				if (_pos < _size && Basic.inArray(self.state, [Transporter.IDLE, Transporter.DONE]) === -1) {
					_transport.call(self);
				}
			}, 999);

			self.bind("TransportingComplete", function() {
				_pos = _size;
				self.state = Transporter.DONE;
				_data = null; // clean a bit
				self.result = _runtime.exec.call(self, 'Transporter', 'getAsBlob', type || '');
			}, 999);

			self.state = Transporter.BUSY;
			self.trigger("TransportingStarted");
			_transport.call(self);
		}

		function _transport() {
			var self = this,
				chunk,
				bytesLeft = _size - _pos;

			if (_chunk_size > bytesLeft) {
				_chunk_size = bytesLeft;
			}

			chunk = Encode.btoa(_data.substr(_pos, _chunk_size));
			_runtime.exec.call(self, 'Transporter', 'receive', chunk, _size);
		}
	}

	Transporter.IDLE = 0;
	Transporter.BUSY = 1;
	Transporter.DONE = 2;

	Transporter.prototype = EventTarget.instance;

	return Transporter;
});

// Included from: src/javascript/image/Image.js

/**
 * Image.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

define("moxie/image/Image", [
	"moxie/core/utils/Basic",
	"moxie/core/utils/Dom",
	"moxie/core/Exceptions",
	"moxie/file/FileReaderSync",
	"moxie/xhr/XMLHttpRequest",
	"moxie/runtime/Runtime",
	"moxie/runtime/RuntimeClient",
	"moxie/runtime/Transporter",
	"moxie/core/utils/Env",
	"moxie/core/EventTarget",
	"moxie/file/Blob",
	"moxie/file/File",
	"moxie/core/utils/Encode"
], function(Basic, Dom, x, FileReaderSync, XMLHttpRequest, Runtime, RuntimeClient, Transporter, Env, EventTarget, Blob, File, Encode) {
	/**
	Image preloading and manipulation utility. Additionally it provides access to image meta info (Exif, GPS) and raw binary data.

	@class Image
	@constructor
	@extends EventTarget
	*/
	var dispatches = [
		'progress',

		/**
		Dispatched when loading is complete.

		@event load
		@param {Object} event
		*/
		'load',

		'error',

		/**
		Dispatched when resize operation is complete.
		
		@event resize
		@param {Object} event
		*/
		'resize',

		/**
		Dispatched when visual representation of the image is successfully embedded
		into the corresponsing container.

		@event embedded
		@param {Object} event
		*/
		'embedded'
	];

	function Image() {

		RuntimeClient.call(this);

		Basic.extend(this, {
			/**
			Unique id of the component

			@property uid
			@type {String}
			*/
			uid: Basic.guid('uid_'),

			/**
			Unique id of the connected runtime, if any.

			@property ruid
			@type {String}
			*/
			ruid: null,

			/**
			Name of the file, that was used to create an image, if available. If not equals to empty string.

			@property name
			@type {String}
			@default ""
			*/
			name: "",

			/**
			Size of the image in bytes. Actual value is set only after image is preloaded.

			@property size
			@type {Number}
			@default 0
			*/
			size: 0,

			/**
			Width of the image. Actual value is set only after image is preloaded.

			@property width
			@type {Number}
			@default 0
			*/
			width: 0,

			/**
			Height of the image. Actual value is set only after image is preloaded.

			@property height
			@type {Number}
			@default 0
			*/
			height: 0,

			/**
			Mime type of the image. Currently only image/jpeg and image/png are supported. Actual value is set only after image is preloaded.

			@property type
			@type {String}
			@default ""
			*/
			type: "",

			/**
			Holds meta info (Exif, GPS). Is populated only for image/jpeg. Actual value is set only after image is preloaded.

			@property meta
			@type {Object}
			@default {}
			*/
			meta: {},

			/**
			Alias for load method, that takes another mOxie.Image object as a source (see load).

			@method clone
			@param {Image} src Source for the image
			@param {Boolean} [exact=false] Whether to activate in-depth clone mode
			*/
			clone: function() {
				this.load.apply(this, arguments);
			},

			/**
			Loads image from various sources. Currently the source for new image can be: mOxie.Image, mOxie.Blob/mOxie.File, 
			native Blob/File, dataUrl or URL. Depending on the type of the source, arguments - differ. When source is URL, 
			Image will be downloaded from remote destination and loaded in memory.

			@example
				var img = new mOxie.Image();
				img.onload = function() {
					var blob = img.getAsBlob();
					
					var formData = new mOxie.FormData();
					formData.append('file', blob);

					var xhr = new mOxie.XMLHttpRequest();
					xhr.onload = function() {
						// upload complete
					};
					xhr.open('post', 'upload.php');
					xhr.send(formData);
				};
				img.load("http://www.moxiecode.com/images/mox-logo.jpg"); // notice file extension (.jpg)
			

			@method load
			@param {Image|Blob|File|String} src Source for the image
			@param {Boolean|Object} [mixed]
			*/
			load: function() {
				_load.apply(this, arguments);
			},

			/**
			Downsizes the image to fit the specified width/height. If crop is supplied, image will be cropped to exact dimensions.

			@method downsize
			@param {Object} opts
				@param {Number} opts.width Resulting width
				@param {Number} [opts.height=width] Resulting height (optional, if not supplied will default to width)
				@param {Boolean} [opts.crop=false] Whether to crop the image to exact dimensions
				@param {Boolean} [opts.preserveHeaders=true] Whether to preserve meta headers (on JPEGs after resize)
				@param {String} [opts.resample=false] Resampling algorithm to use for resizing
			*/
			downsize: function(opts) {
				var defaults = {
					width: this.width,
					height: this.height,
					type: this.type || 'image/jpeg',
					quality: 90,
					crop: false,
					preserveHeaders: true,
					resample: false
				};

				if (typeof(opts) === 'object') {
					opts = Basic.extend(defaults, opts);
				} else {
					// for backward compatibility
					opts = Basic.extend(defaults, {
						width: arguments[0],
						height: arguments[1],
						crop: arguments[2],
						preserveHeaders: arguments[3]
					});
				}

				try {
					if (!this.size) { // only preloaded image objects can be used as source
						throw new x.DOMException(x.DOMException.INVALID_STATE_ERR);
					}

					// no way to reliably intercept the crash due to high resolution, so we simply avoid it
					if (this.width > Image.MAX_RESIZE_WIDTH || this.height > Image.MAX_RESIZE_HEIGHT) {
						throw new x.ImageError(x.ImageError.MAX_RESOLUTION_ERR);
					}

					this.exec('Image', 'downsize', opts.width, opts.height, opts.crop, opts.preserveHeaders);
				} catch(ex) {
					// for now simply trigger error event
					this.trigger('error', ex.code);
				}
			},

			/**
			Alias for downsize(width, height, true). (see downsize)
			
			@method crop
			@param {Number} width Resulting width
			@param {Number} [height=width] Resulting height (optional, if not supplied will default to width)
			@param {Boolean} [preserveHeaders=true] Whether to preserve meta headers (on JPEGs after resize)
			*/
			crop: function(width, height, preserveHeaders) {
				this.downsize(width, height, true, preserveHeaders);
			},

			getAsCanvas: function() {
				if (!Env.can('create_canvas')) {
					throw new x.RuntimeError(x.RuntimeError.NOT_SUPPORTED_ERR);
				}

				var runtime = this.connectRuntime(this.ruid);
				return runtime.exec.call(this, 'Image', 'getAsCanvas');
			},

			/**
			Retrieves image in it's current state as mOxie.Blob object. Cannot be run on empty or image in progress (throws
			DOMException.INVALID_STATE_ERR).

			@method getAsBlob
			@param {String} [type="image/jpeg"] Mime type of resulting blob. Can either be image/jpeg or image/png
			@param {Number} [quality=90] Applicable only together with mime type image/jpeg
			@return {Blob} Image as Blob
			*/
			getAsBlob: function(type, quality) {
				if (!this.size) {
					throw new x.DOMException(x.DOMException.INVALID_STATE_ERR);
				}
				return this.exec('Image', 'getAsBlob', type || 'image/jpeg', quality || 90);
			},

			/**
			Retrieves image in it's current state as dataURL string. Cannot be run on empty or image in progress (throws
			DOMException.INVALID_STATE_ERR).

			@method getAsDataURL
			@param {String} [type="image/jpeg"] Mime type of resulting blob. Can either be image/jpeg or image/png
			@param {Number} [quality=90] Applicable only together with mime type image/jpeg
			@return {String} Image as dataURL string
			*/
			getAsDataURL: function(type, quality) {
				if (!this.size) {
					throw new x.DOMException(x.DOMException.INVALID_STATE_ERR);
				}
				return this.exec('Image', 'getAsDataURL', type || 'image/jpeg', quality || 90);
			},

			/**
			Retrieves image in it's current state as binary string. Cannot be run on empty or image in progress (throws
			DOMException.INVALID_STATE_ERR).

			@method getAsBinaryString
			@param {String} [type="image/jpeg"] Mime type of resulting blob. Can either be image/jpeg or image/png
			@param {Number} [quality=90] Applicable only together with mime type image/jpeg
			@return {String} Image as binary string
			*/
			getAsBinaryString: function(type, quality) {
				var dataUrl = this.getAsDataURL(type, quality);
				return Encode.atob(dataUrl.substring(dataUrl.indexOf('base64,') + 7));
			},

			/**
			Embeds a visual representation of the image into the specified node. Depending on the runtime, 
			it might be a canvas, an img node or a thrid party shim object (Flash or SilverLight - very rare, 
			can be used in legacy browsers that do not have canvas or proper dataURI support).

			@method embed
			@param {DOMElement} el DOM element to insert the image object into
			@param {Object} [opts]
				@param {Number} [opts.width] The width of an embed (defaults to the image width)
				@param {Number} [opts.height] The height of an embed (defaults to the image height)
				@param {String} [type="image/jpeg"] Mime type
				@param {Number} [quality=90] Quality of an embed, if mime type is image/jpeg
				@param {Boolean} [crop=false] Whether to crop an embed to the specified dimensions
			*/
			embed: function(el, opts) {
				var self = this
				, runtime // this has to be outside of all the closures to contain proper runtime
				;

				opts = Basic.extend({
					width: this.width,
					height: this.height,
					type: this.type || 'image/jpeg',
					quality: 90
				}, opts || {});
				

				function render(type, quality) {
					var img = this;

					// if possible, embed a canvas element directly
					if (Env.can('create_canvas')) {
						var canvas = img.getAsCanvas();
						if (canvas) {
							el.appendChild(canvas);
							canvas = null;
							img.destroy();
							self.trigger('embedded');
							return;
						}
					}

					var dataUrl = img.getAsDataURL(type, quality);
					if (!dataUrl) {
						throw new x.ImageError(x.ImageError.WRONG_FORMAT);
					}

					if (Env.can('use_data_uri_of', dataUrl.length)) {
						el.innerHTML = '<img src="' + dataUrl + '" width="' + img.width + '" height="' + img.height + '" />';
						img.destroy();
						self.trigger('embedded');
					} else {
						var tr = new Transporter();

						tr.bind("TransportingComplete", function() {
							runtime = self.connectRuntime(this.result.ruid);

							self.bind("Embedded", function() {
								// position and size properly
								Basic.extend(runtime.getShimContainer().style, {
									//position: 'relative',
									top: '0px',
									left: '0px',
									width: img.width + 'px',
									height: img.height + 'px'
								});

								// some shims (Flash/SilverLight) reinitialize, if parent element is hidden, reordered or it's
								// position type changes (in Gecko), but since we basically need this only in IEs 6/7 and
								// sometimes 8 and they do not have this problem, we can comment this for now
								/*tr.bind("RuntimeInit", function(e, runtime) {
									tr.destroy();
									runtime.destroy();
									onResize.call(self); // re-feed our image data
								});*/

								runtime = null; // release
							}, 999);

							runtime.exec.call(self, "ImageView", "display", this.result.uid, width, height);
							img.destroy();
						});

						tr.transport(Encode.atob(dataUrl.substring(dataUrl.indexOf('base64,') + 7)), type, {
							required_caps: {
								display_media: true
							},
							runtime_order: 'flash,silverlight',
							container: el
						});
					}
				}

				try {
					if (!(el = Dom.get(el))) {
						throw new x.DOMException(x.DOMException.INVALID_NODE_TYPE_ERR);
					}

					if (!this.size) { // only preloaded image objects can be used as source
						throw new x.DOMException(x.DOMException.INVALID_STATE_ERR);
					}
					
					// high-resolution images cannot be consistently handled across the runtimes
					if (this.width > Image.MAX_RESIZE_WIDTH || this.height > Image.MAX_RESIZE_HEIGHT) {
						//throw new x.ImageError(x.ImageError.MAX_RESOLUTION_ERR);
					}

					var imgCopy = new Image();

					imgCopy.bind("Resize", function() {
						render.call(this, opts.type, opts.quality);
					});

					imgCopy.bind("Load", function() {
						imgCopy.downsize(opts);
					});

					// if embedded thumb data is available and dimensions are big enough, use it
					if (this.meta.thumb && this.meta.thumb.width >= opts.width && this.meta.thumb.height >= opts.height) {
						imgCopy.load(this.meta.thumb.data);
					} else {
						imgCopy.clone(this, false);
					}

					return imgCopy;
				} catch(ex) {
					// for now simply trigger error event
					this.trigger('error', ex.code);
				}
			},

			/**
			Properly destroys the image and frees resources in use. If any. Recommended way to dispose mOxie.Image object.

			@method destroy
			*/
			destroy: function() {
				if (this.ruid) {
					this.getRuntime().exec.call(this, 'Image', 'destroy');
					this.disconnectRuntime();
				}
				this.unbindAll();
			}
		});


		// this is here, because in order to bind properly, we need uid, which is created above
		this.handleEventProps(dispatches);

		this.bind('Load Resize', function() {
			_updateInfo.call(this);
		}, 999);


		function _updateInfo(info) {
			if (!info) {
				info = this.exec('Image', 'getInfo');
			}

			this.size = info.size;
			this.width = info.width;
			this.height = info.height;
			this.type = info.type;
			this.meta = info.meta;

			// update file name, only if empty
			if (this.name === '') {
				this.name = info.name;
			}
		}
		

		function _load(src) {
			var srcType = Basic.typeOf(src);

			try {
				// if source is Image
				if (src instanceof Image) {
					if (!src.size) { // only preloaded image objects can be used as source
						throw new x.DOMException(x.DOMException.INVALID_STATE_ERR);
					}
					_loadFromImage.apply(this, arguments);
				}
				// if source is o.Blob/o.File
				else if (src instanceof Blob) {
					if (!~Basic.inArray(src.type, ['image/jpeg', 'image/png'])) {
						throw new x.ImageError(x.ImageError.WRONG_FORMAT);
					}
					_loadFromBlob.apply(this, arguments);
				}
				// if native blob/file
				else if (Basic.inArray(srcType, ['blob', 'file']) !== -1) {
					_load.call(this, new File(null, src), arguments[1]);
				}
				// if String
				else if (srcType === 'string') {
					// if dataUrl String
					if (src.substr(0, 5) === 'data:') {
						_load.call(this, new Blob(null, { data: src }), arguments[1]);
					}
					// else assume Url, either relative or absolute
					else {
						_loadFromUrl.apply(this, arguments);
					}
				}
				// if source seems to be an img node
				else if (srcType === 'node' && src.nodeName.toLowerCase() === 'img') {
					_load.call(this, src.src, arguments[1]);
				}
				else {
					throw new x.DOMException(x.DOMException.TYPE_MISMATCH_ERR);
				}
			} catch(ex) {
				// for now simply trigger error event
				this.trigger('error', ex.code);
			}
		}


		function _loadFromImage(img, exact) {
			var runtime = this.connectRuntime(img.ruid);
			this.ruid = runtime.uid;
			runtime.exec.call(this, 'Image', 'loadFromImage', img, (Basic.typeOf(exact) === 'undefined' ? true : exact));
		}


		function _loadFromBlob(blob, options) {
			var self = this;

			self.name = blob.name || '';

			function exec(runtime) {
				self.ruid = runtime.uid;
				runtime.exec.call(self, 'Image', 'loadFromBlob', blob);
			}

			if (blob.isDetached()) {
				this.bind('RuntimeInit', function(e, runtime) {
					exec(runtime);
				});

				// convert to object representation
				if (options && typeof(options.required_caps) === 'string') {
					options.required_caps = Runtime.parseCaps(options.required_caps);
				}

				this.connectRuntime(Basic.extend({
					required_caps: {
						access_image_binary: true,
						resize_image: true
					}
				}, options));
			} else {
				exec(this.connectRuntime(blob.ruid));
			}
		}


		function _loadFromUrl(url, options) {
			var self = this, xhr;

			xhr = new XMLHttpRequest();

			xhr.open('get', url);
			xhr.responseType = 'blob';

			xhr.onprogress = function(e) {
				self.trigger(e);
			};

			xhr.onload = function() {
				_loadFromBlob.call(self, xhr.response, true);
			};

			xhr.onerror = function(e) {
				self.trigger(e);
			};

			xhr.onloadend = function() {
				xhr.destroy();
			};

			xhr.bind('RuntimeError', function(e, err) {
				self.trigger('RuntimeError', err);
			});

			xhr.send(null, options);
		}
	}

	// virtual world will crash on you if image has a resolution higher than this:
	Image.MAX_RESIZE_WIDTH = 8192;
	Image.MAX_RESIZE_HEIGHT = 8192; 

	Image.prototype = EventTarget.instance;

	return Image;
});

// Included from: src/javascript/runtime/html5/Runtime.js

/**
 * Runtime.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

/*global File:true */

/**
Defines constructor for HTML5 runtime.

@class moxie/runtime/html5/Runtime
@private
*/
define("moxie/runtime/html5/Runtime", [
	"moxie/core/utils/Basic",
	"moxie/core/Exceptions",
	"moxie/runtime/Runtime",
	"moxie/core/utils/Env"
], function(Basic, x, Runtime, Env) {
	
	var type = "html5", extensions = {};
	
	function Html5Runtime(options) {
		var I = this
		, Test = Runtime.capTest
		, True = Runtime.capTrue
		;

		var caps = Basic.extend({
				access_binary: Test(window.FileReader || window.File && window.File.getAsDataURL),
				access_image_binary: function() {
					return I.can('access_binary') && !!extensions.Image;
				},
				display_media: Test(Env.can('create_canvas') || Env.can('use_data_uri_over32kb')),
				do_cors: Test(window.XMLHttpRequest && 'withCredentials' in new XMLHttpRequest()),
				drag_and_drop: Test(function() {
					// this comes directly from Modernizr: http://www.modernizr.com/
					var div = document.createElement('div');
					// IE has support for drag and drop since version 5, but doesn't support dropping files from desktop
					return (('draggable' in div) || ('ondragstart' in div && 'ondrop' in div)) && 
						(Env.browser !== 'IE' || Env.verComp(Env.version, 9, '>'));
				}()),
				filter_by_extension: Test(function() { // if you know how to feature-detect this, please suggest
					return (Env.browser === 'Chrome' && Env.verComp(Env.version, 28, '>=')) || 
						(Env.browser === 'IE' && Env.verComp(Env.version, 10, '>=')) || 
						(Env.browser === 'Safari' && Env.verComp(Env.version, 7, '>='));
				}()),
				return_response_headers: True,
				return_response_type: function(responseType) {
					if (responseType === 'json' && !!window.JSON) { // we can fake this one even if it's not supported
						return true;
					} 
					return Env.can('return_response_type', responseType);
				},
				return_status_code: True,
				report_upload_progress: Test(window.XMLHttpRequest && new XMLHttpRequest().upload),
				resize_image: function() {
					return I.can('access_binary') && Env.can('create_canvas');
				},
				select_file: function() {
					return Env.can('use_fileinput') && window.File;
				},
				select_folder: function() {
					return I.can('select_file') && Env.browser === 'Chrome' && Env.verComp(Env.version, 21, '>=');
				},
				select_multiple: function() {
					// it is buggy on Safari Windows and iOS
					return I.can('select_file') &&
						!(Env.browser === 'Safari' && Env.os === 'Windows') &&
						!(Env.os === 'iOS' && Env.verComp(Env.osVersion, "7.0.0", '>') && Env.verComp(Env.osVersion, "8.0.0", '<'));
				},
				send_binary_string: Test(window.XMLHttpRequest && (new XMLHttpRequest().sendAsBinary || (window.Uint8Array && window.ArrayBuffer))),
				send_custom_headers: Test(window.XMLHttpRequest),
				send_multipart: function() {
					return !!(window.XMLHttpRequest && new XMLHttpRequest().upload && window.FormData) || I.can('send_binary_string');
				},
				slice_blob: Test(window.File && (File.prototype.mozSlice || File.prototype.webkitSlice || File.prototype.slice)),
				stream_upload: function(){
					return I.can('slice_blob') && I.can('send_multipart');
				},
				summon_file_dialog: function() { // yeah... some dirty sniffing here...
					return I.can('select_file') && (
						(Env.browser === 'Firefox' && Env.verComp(Env.version, 4, '>=')) ||
						(Env.browser === 'Opera' && Env.verComp(Env.version, 12, '>=')) ||
						(Env.browser === 'IE' && Env.verComp(Env.version, 10, '>=')) ||
						!!~Basic.inArray(Env.browser, ['Chrome', 'Safari'])
					);
				},
				upload_filesize: True
			}, 
			arguments[2]
		);

		Runtime.call(this, options, (arguments[1] || type), caps);


		Basic.extend(this, {

			init : function() {
				this.trigger("Init");
			},

			destroy: (function(destroy) { // extend default destroy method
				return function() {
					destroy.call(I);
					destroy = I = null;
				};
			}(this.destroy))
		});

		Basic.extend(this.getShim(), extensions);
	}

	Runtime.addConstructor(type, Html5Runtime);

	return extensions;
});

// Included from: src/javascript/core/utils/Events.js

/**
 * Events.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

define('moxie/core/utils/Events', [
	'moxie/core/utils/Basic'
], function(Basic) {
	var eventhash = {}, uid = 'moxie_' + Basic.guid();
	
	// IE W3C like event funcs
	function preventDefault() {
		this.returnValue = false;
	}

	function stopPropagation() {
		this.cancelBubble = true;
	}

	/**
	Adds an event handler to the specified object and store reference to the handler
	in objects internal Plupload registry (@see removeEvent).
	
	@method addEvent
	@for Utils
	@static
	@param {Object} obj DOM element like object to add handler to.
	@param {String} name Name to add event listener to.
	@param {Function} callback Function to call when event occurs.
	@param {String} [key] that might be used to add specifity to the event record.
	*/
	var addEvent = function(obj, name, callback, key) {
		var func, events;
					
		name = name.toLowerCase();

		// Add event listener
		if (obj.addEventListener) {
			func = callback;
			
			obj.addEventListener(name, func, false);
		} else if (obj.attachEvent) {
			func = function() {
				var evt = window.event;

				if (!evt.target) {
					evt.target = evt.srcElement;
				}

				evt.preventDefault = preventDefault;
				evt.stopPropagation = stopPropagation;

				callback(evt);
			};

			obj.attachEvent('on' + name, func);
		}
		
		// Log event handler to objects internal mOxie registry
		if (!obj[uid]) {
			obj[uid] = Basic.guid();
		}
		
		if (!eventhash.hasOwnProperty(obj[uid])) {
			eventhash[obj[uid]] = {};
		}
		
		events = eventhash[obj[uid]];
		
		if (!events.hasOwnProperty(name)) {
			events[name] = [];
		}
				
		events[name].push({
			func: func,
			orig: callback, // store original callback for IE
			key: key
		});
	};
	
	
	/**
	Remove event handler from the specified object. If third argument (callback)
	is not specified remove all events with the specified name.
	
	@method removeEvent
	@static
	@param {Object} obj DOM element to remove event listener(s) from.
	@param {String} name Name of event listener to remove.
	@param {Function|String} [callback] might be a callback or unique key to match.
	*/
	var removeEvent = function(obj, name, callback) {
		var type, undef;
		
		name = name.toLowerCase();
		
		if (obj[uid] && eventhash[obj[uid]] && eventhash[obj[uid]][name]) {
			type = eventhash[obj[uid]][name];
		} else {
			return;
		}
			
		for (var i = type.length - 1; i >= 0; i--) {
			// undefined or not, key should match
			if (type[i].orig === callback || type[i].key === callback) {
				if (obj.removeEventListener) {
					obj.removeEventListener(name, type[i].func, false);
				} else if (obj.detachEvent) {
					obj.detachEvent('on'+name, type[i].func);
				}
				
				type[i].orig = null;
				type[i].func = null;
				type.splice(i, 1);
				
				// If callback was passed we are done here, otherwise proceed
				if (callback !== undef) {
					break;
				}
			}
		}
		
		// If event array got empty, remove it
		if (!type.length) {
			delete eventhash[obj[uid]][name];
		}
		
		// If mOxie registry has become empty, remove it
		if (Basic.isEmptyObj(eventhash[obj[uid]])) {
			delete eventhash[obj[uid]];
			
			// IE doesn't let you remove DOM object property with - delete
			try {
				delete obj[uid];
			} catch(e) {
				obj[uid] = undef;
			}
		}
	};
	
	
	/**
	Remove all kind of events from the specified object
	
	@method removeAllEvents
	@static
	@param {Object} obj DOM element to remove event listeners from.
	@param {String} [key] unique key to match, when removing events.
	*/
	var removeAllEvents = function(obj, key) {		
		if (!obj || !obj[uid]) {
			return;
		}
		
		Basic.each(eventhash[obj[uid]], function(events, name) {
			removeEvent(obj, name, key);
		});
	};

	return {
		addEvent: addEvent,
		removeEvent: removeEvent,
		removeAllEvents: removeAllEvents
	};
});

// Included from: src/javascript/runtime/html5/file/FileInput.js

/**
 * FileInput.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

/**
@class moxie/runtime/html5/file/FileInput
@private
*/
define("moxie/runtime/html5/file/FileInput", [
	"moxie/runtime/html5/Runtime",
	"moxie/file/File",
	"moxie/core/utils/Basic",
	"moxie/core/utils/Dom",
	"moxie/core/utils/Events",
	"moxie/core/utils/Mime",
	"moxie/core/utils/Env"
], function(extensions, File, Basic, Dom, Events, Mime, Env) {
	
	function FileInput() {
		var _options;

		Basic.extend(this, {
			init: function(options) {
				var comp = this, I = comp.getRuntime(), input, shimContainer, mimes, browseButton, zIndex, top;

				_options = options;

				// figure out accept string
				mimes = _options.accept.mimes || Mime.extList2mimes(_options.accept, I.can('filter_by_extension'));

				shimContainer = I.getShimContainer();

				shimContainer.innerHTML = '<input id="' + I.uid +'" type="file" style="font-size:999px;opacity:0;"' +
					(_options.multiple && I.can('select_multiple') ? 'multiple' : '') + 
					(_options.directory && I.can('select_folder') ? 'webkitdirectory directory' : '') + // Chrome 11+
					(mimes ? ' accept="' + mimes.join(',') + '"' : '') + ' />';

				input = Dom.get(I.uid);

				// prepare file input to be placed underneath the browse_button element
				Basic.extend(input.style, {
					position: 'absolute',
					top: 0,
					left: 0,
					width: '100%',
					height: '100%'
				});


				browseButton = Dom.get(_options.browse_button);

				// Route click event to the input[type=file] element for browsers that support such behavior
				if (I.can('summon_file_dialog')) {
					if (Dom.getStyle(browseButton, 'position') === 'static') {
						browseButton.style.position = 'relative';
					}

					zIndex = parseInt(Dom.getStyle(browseButton, 'z-index'), 10) || 1;

					browseButton.style.zIndex = zIndex;
					shimContainer.style.zIndex = zIndex - 1;

					Events.addEvent(browseButton, 'click', function(e) {
						var input = Dom.get(I.uid);
						if (input && !input.disabled) { // for some reason FF (up to 8.0.1 so far) lets to click disabled input[type=file]
							input.click();
						}
						e.preventDefault();
					}, comp.uid);
				}

				/* Since we have to place input[type=file] on top of the browse_button for some browsers,
				browse_button loses interactivity, so we restore it here */
				top = I.can('summon_file_dialog') ? browseButton : shimContainer;

				Events.addEvent(top, 'mouseover', function() {
					comp.trigger('mouseenter');
				}, comp.uid);

				Events.addEvent(top, 'mouseout', function() {
					comp.trigger('mouseleave');
				}, comp.uid);

				Events.addEvent(top, 'mousedown', function() {
					comp.trigger('mousedown');
				}, comp.uid);

				Events.addEvent(Dom.get(_options.container), 'mouseup', function() {
					comp.trigger('mouseup');
				}, comp.uid);


				input.onchange = function onChange(e) { // there should be only one handler for this
					comp.files = [];

					Basic.each(this.files, function(file) {
						var relativePath = '';

						if (_options.directory) {
							// folders are represented by dots, filter them out (Chrome 11+)
							if (file.name == ".") {
								// if it looks like a folder...
								return true;
							}
						}

						if (file.webkitRelativePath) {
							relativePath = '/' + file.webkitRelativePath.replace(/^\//, '');
						}
						
						file = new File(I.uid, file);
						file.relativePath = relativePath;

						comp.files.push(file);
					});

					// clearing the value enables the user to select the same file again if they want to
					if (Env.browser !== 'IE' && Env.browser !== 'IEMobile') {
						this.value = '';
					} else {
						// in IE input[type="file"] is read-only so the only way to reset it is to re-insert it
						var clone = this.cloneNode(true);
						this.parentNode.replaceChild(clone, this);
						clone.onchange = onChange;
					}

					if (comp.files.length) {
						comp.trigger('change');
					}
				};

				// ready event is perfectly asynchronous
				comp.trigger({
					type: 'ready',
					async: true
				});

				shimContainer = null;
			},


			disable: function(state) {
				var I = this.getRuntime(), input;

				if ((input = Dom.get(I.uid))) {
					input.disabled = !!state;
				}
			},

			destroy: function() {
				var I = this.getRuntime()
				, shim = I.getShim()
				, shimContainer = I.getShimContainer()
				;
				
				Events.removeAllEvents(shimContainer, this.uid);
				Events.removeAllEvents(_options && Dom.get(_options.container), this.uid);
				Events.removeAllEvents(_options && Dom.get(_options.browse_button), this.uid);
				
				if (shimContainer) {
					shimContainer.innerHTML = '';
				}

				shim.removeInstance(this.uid);

				_options = shimContainer = shim = null;
			}
		});
	}

	return (extensions.FileInput = FileInput);
});

// Included from: src/javascript/runtime/html5/file/Blob.js

/**
 * Blob.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

/**
@class moxie/runtime/html5/file/Blob
@private
*/
define("moxie/runtime/html5/file/Blob", [
	"moxie/runtime/html5/Runtime",
	"moxie/file/Blob"
], function(extensions, Blob) {

	function HTML5Blob() {
		function w3cBlobSlice(blob, start, end) {
			var blobSlice;

			if (window.File.prototype.slice) {
				try {
					blob.slice();	// depricated version will throw WRONG_ARGUMENTS_ERR exception
					return blob.slice(start, end);
				} catch (e) {
					// depricated slice method
					return blob.slice(start, end - start);
				}
			// slice method got prefixed: https://bugzilla.mozilla.org/show_bug.cgi?id=649672
			} else if ((blobSlice = window.File.prototype.webkitSlice || window.File.prototype.mozSlice)) {
				return blobSlice.call(blob, start, end);
			} else {
				return null; // or throw some exception
			}
		}

		this.slice = function() {
			return new Blob(this.getRuntime().uid, w3cBlobSlice.apply(this, arguments));
		};
	}

	return (extensions.Blob = HTML5Blob);
});

// Included from: src/javascript/runtime/html5/file/FileDrop.js

/**
 * FileDrop.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

/**
@class moxie/runtime/html5/file/FileDrop
@private
*/
define("moxie/runtime/html5/file/FileDrop", [
	"moxie/runtime/html5/Runtime",
	'moxie/file/File',
	"moxie/core/utils/Basic",
	"moxie/core/utils/Dom",
	"moxie/core/utils/Events",
	"moxie/core/utils/Mime"
], function(extensions, File, Basic, Dom, Events, Mime) {
	
	function FileDrop() {
		var _files = [], _allowedExts = [], _options, _ruid;

		Basic.extend(this, {
			init: function(options) {
				var comp = this, dropZone;

				_options = options;
				_ruid = comp.ruid; // every dropped-in file should have a reference to the runtime
				_allowedExts = _extractExts(_options.accept);
				dropZone = _options.container;

				Events.addEvent(dropZone, 'dragover', function(e) {
					if (!_hasFiles(e)) {
						return;
					}
					e.preventDefault();
					e.dataTransfer.dropEffect = 'copy';
				}, comp.uid);

				Events.addEvent(dropZone, 'drop', function(e) {
					if (!_hasFiles(e)) {
						return;
					}
					e.preventDefault();

					_files = [];

					// Chrome 21+ accepts folders via Drag'n'Drop
					if (e.dataTransfer.items && e.dataTransfer.items[0].webkitGetAsEntry) {
						_readItems(e.dataTransfer.items, function() {
							comp.files = _files;
							comp.trigger("drop");
						});
					} else {
						Basic.each(e.dataTransfer.files, function(file) {
							_addFile(file);
						});
						comp.files = _files;
						comp.trigger("drop");
					}
				}, comp.uid);

				Events.addEvent(dropZone, 'dragenter', function(e) {
					comp.trigger("dragenter");
				}, comp.uid);

				Events.addEvent(dropZone, 'dragleave', function(e) {
					comp.trigger("dragleave");
				}, comp.uid);
			},

			destroy: function() {
				Events.removeAllEvents(_options && Dom.get(_options.container), this.uid);
				_ruid = _files = _allowedExts = _options = null;
			}
		});


		function _hasFiles(e) {
			if (!e.dataTransfer || !e.dataTransfer.types) { // e.dataTransfer.files is not available in Gecko during dragover
				return false;
			}

			var types = Basic.toArray(e.dataTransfer.types || []);

			return Basic.inArray("Files", types) !== -1 ||
				Basic.inArray("public.file-url", types) !== -1 || // Safari < 5
				Basic.inArray("application/x-moz-file", types) !== -1 // Gecko < 1.9.2 (< Firefox 3.6)
				;
		}


		function _addFile(file, relativePath) {
			if (_isAcceptable(file)) {
				var fileObj = new File(_ruid, file);
				fileObj.relativePath = relativePath || '';
				_files.push(fileObj);
			}
		}

		
		function _extractExts(accept) {
			var exts = [];
			for (var i = 0; i < accept.length; i++) {
				[].push.apply(exts, accept[i].extensions.split(/\s*,\s*/));
			}
			return Basic.inArray('*', exts) === -1 ? exts : [];
		}


		function _isAcceptable(file) {
			if (!_allowedExts.length) {
				return true;
			}
			var ext = Mime.getFileExtension(file.name);
			return !ext || Basic.inArray(ext, _allowedExts) !== -1;
		}


		function _readItems(items, cb) {
			var entries = [];
			Basic.each(items, function(item) {
				var entry = item.webkitGetAsEntry();
				// Address #998 (https://code.google.com/p/chromium/issues/detail?id=332579)
				if (entry) {
					// file() fails on OSX when the filename contains a special character (e.g. umlaut): see #61
					if (entry.isFile) {
						_addFile(item.getAsFile(), entry.fullPath);
					} else {
						entries.push(entry);
					}
				}
			});

			if (entries.length) {
				_readEntries(entries, cb);
			} else {
				cb();
			}
		}


		function _readEntries(entries, cb) {
			var queue = [];
			Basic.each(entries, function(entry) {
				queue.push(function(cbcb) {
					_readEntry(entry, cbcb);
				});
			});
			Basic.inSeries(queue, function() {
				cb();
			});
		}


		function _readEntry(entry, cb) {
			if (entry.isFile) {
				entry.file(function(file) {
					_addFile(file, entry.fullPath);
					cb();
				}, function() {
					// fire an error event maybe
					cb();
				});
			} else if (entry.isDirectory) {
				_readDirEntry(entry, cb);
			} else {
				cb(); // not file, not directory? what then?..
			}
		}


		function _readDirEntry(dirEntry, cb) {
			var entries = [], dirReader = dirEntry.createReader();

			// keep quering recursively till no more entries
			function getEntries(cbcb) {
				dirReader.readEntries(function(moreEntries) {
					if (moreEntries.length) {
						[].push.apply(entries, moreEntries);
						getEntries(cbcb);
					} else {
						cbcb();
					}
				}, cbcb);
			}

			// ...and you thought FileReader was crazy...
			getEntries(function() {
				_readEntries(entries, cb);
			}); 
		}
	}

	return (extensions.FileDrop = FileDrop);
});

// Included from: src/javascript/runtime/html5/file/FileReader.js

/**
 * FileReader.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

/**
@class moxie/runtime/html5/file/FileReader
@private
*/
define("moxie/runtime/html5/file/FileReader", [
	"moxie/runtime/html5/Runtime",
	"moxie/core/utils/Encode",
	"moxie/core/utils/Basic"
], function(extensions, Encode, Basic) {
	
	function FileReader() {
		var _fr, _convertToBinary = false;

		Basic.extend(this, {

			read: function(op, blob) {
				var comp = this;

				comp.result = '';

				_fr = new window.FileReader();

				_fr.addEventListener('progress', function(e) {
					comp.trigger(e);
				});

				_fr.addEventListener('load', function(e) {
					comp.result = _convertToBinary ? _toBinary(_fr.result) : _fr.result;
					comp.trigger(e);
				});

				_fr.addEventListener('error', function(e) {
					comp.trigger(e, _fr.error);
				});

				_fr.addEventListener('loadend', function(e) {
					_fr = null;
					comp.trigger(e);
				});

				if (Basic.typeOf(_fr[op]) === 'function') {
					_convertToBinary = false;
					_fr[op](blob.getSource());
				} else if (op === 'readAsBinaryString') { // readAsBinaryString is depricated in general and never existed in IE10+
					_convertToBinary = true;
					_fr.readAsDataURL(blob.getSource());
				}
			},

			abort: function() {
				if (_fr) {
					_fr.abort();
				}
			},

			destroy: function() {
				_fr = null;
			}
		});

		function _toBinary(str) {
			return Encode.atob(str.substring(str.indexOf('base64,') + 7));
		}
	}

	return (extensions.FileReader = FileReader);
});

// Included from: src/javascript/runtime/html5/xhr/XMLHttpRequest.js

/**
 * XMLHttpRequest.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

/*global ActiveXObject:true */

/**
@class moxie/runtime/html5/xhr/XMLHttpRequest
@private
*/
define("moxie/runtime/html5/xhr/XMLHttpRequest", [
	"moxie/runtime/html5/Runtime",
	"moxie/core/utils/Basic",
	"moxie/core/utils/Mime",
	"moxie/core/utils/Url",
	"moxie/file/File",
	"moxie/file/Blob",
	"moxie/xhr/FormData",
	"moxie/core/Exceptions",
	"moxie/core/utils/Env"
], function(extensions, Basic, Mime, Url, File, Blob, FormData, x, Env) {
	
	function XMLHttpRequest() {
		var self = this
		, _xhr
		, _filename
		;

		Basic.extend(this, {
			send: function(meta, data) {
				var target = this
				, isGecko2_5_6 = (Env.browser === 'Mozilla' && Env.verComp(Env.version, 4, '>=') && Env.verComp(Env.version, 7, '<'))
				, isAndroidBrowser = Env.browser === 'Android Browser'
				, mustSendAsBinary = false
				;

				// extract file name
				_filename = meta.url.replace(/^.+?\/([\w\-\.]+)$/, '$1').toLowerCase();

				_xhr = _getNativeXHR();
				_xhr.open(meta.method, meta.url, meta.async, meta.user, meta.password);


				// prepare data to be sent
				if (data instanceof Blob) {
					if (data.isDetached()) {
						mustSendAsBinary = true;
					}
					data = data.getSource();
				} else if (data instanceof FormData) {

					if (data.hasBlob()) {
						if (data.getBlob().isDetached()) {
							data = _prepareMultipart.call(target, data); // _xhr must be instantiated and be in OPENED state
							mustSendAsBinary = true;
						} else if ((isGecko2_5_6 || isAndroidBrowser) && Basic.typeOf(data.getBlob().getSource()) === 'blob' && window.FileReader) {
							// Gecko 2/5/6 can't send blob in FormData: https://bugzilla.mozilla.org/show_bug.cgi?id=649150
							// Android browsers (default one and Dolphin) seem to have the same issue, see: #613
							_preloadAndSend.call(target, meta, data);
							return; // _preloadAndSend will reinvoke send() with transmutated FormData =%D
						}	
					}

					// transfer fields to real FormData
					if (data instanceof FormData) { // if still a FormData, e.g. not mangled by _prepareMultipart()
						var fd = new window.FormData();
						data.each(function(value, name) {
							if (value instanceof Blob) {
								fd.append(name, value.getSource());
							} else {
								fd.append(name, value);
							}
						});
						data = fd;
					}
				}


				// if XHR L2
				if (_xhr.upload) {
					if (meta.withCredentials) {
						_xhr.withCredentials = true;
					}

					_xhr.addEventListener('load', function(e) {
						target.trigger(e);
					});

					_xhr.addEventListener('error', function(e) {
						target.trigger(e);
					});

					// additionally listen to progress events
					_xhr.addEventListener('progress', function(e) {
						target.trigger(e);
					});

					_xhr.upload.addEventListener('progress', function(e) {
						target.trigger({
							type: 'UploadProgress',
							loaded: e.loaded,
							total: e.total
						});
					});
				// ... otherwise simulate XHR L2
				} else {
					_xhr.onreadystatechange = function onReadyStateChange() {
						
						// fake Level 2 events
						switch (_xhr.readyState) {
							
							case 1: // XMLHttpRequest.OPENED
								// readystatechanged is fired twice for OPENED state (in IE and Mozilla) - neu
								break;
							
							// looks like HEADERS_RECEIVED (state 2) is not reported in Opera (or it's old versions) - neu
							case 2: // XMLHttpRequest.HEADERS_RECEIVED
								break;
								
							case 3: // XMLHttpRequest.LOADING 
								// try to fire progress event for not XHR L2
								var total, loaded;
								
								try {
									if (Url.hasSameOrigin(meta.url)) { // Content-Length not accessible for cross-domain on some browsers
										total = _xhr.getResponseHeader('Content-Length') || 0; // old Safari throws an exception here
									}

									if (_xhr.responseText) { // responseText was introduced in IE7
										loaded = _xhr.responseText.length;
									}
								} catch(ex) {
									total = loaded = 0;
								}

								target.trigger({
									type: 'progress',
									lengthComputable: !!total,
									total: parseInt(total, 10),
									loaded: loaded
								});
								break;
								
							case 4: // XMLHttpRequest.DONE
								// release readystatechange handler (mostly for IE)
								_xhr.onreadystatechange = function() {};

								// usually status 0 is returned when server is unreachable, but FF also fails to status 0 for 408 timeout
								if (_xhr.status === 0) {
									target.trigger('error');
								} else {
									target.trigger('load');
								}							
								break;
						}
					};
				}
				

				// set request headers
				if (!Basic.isEmptyObj(meta.headers)) {
					Basic.each(meta.headers, function(value, header) {
						_xhr.setRequestHeader(header, value);
					});
				}

				// request response type
				if ("" !== meta.responseType && 'responseType' in _xhr) {
					if ('json' === meta.responseType && !Env.can('return_response_type', 'json')) { // we can fake this one
						_xhr.responseType = 'text';
					} else {
						_xhr.responseType = meta.responseType;
					}
				}

				// send ...
				if (!mustSendAsBinary) {
					_xhr.send(data);
				} else {
					if (_xhr.sendAsBinary) { // Gecko
						_xhr.sendAsBinary(data);
					} else { // other browsers having support for typed arrays
						(function() {
							// mimic Gecko's sendAsBinary
							var ui8a = new Uint8Array(data.length);
							for (var i = 0; i < data.length; i++) {
								ui8a[i] = (data.charCodeAt(i) & 0xff);
							}
							_xhr.send(ui8a.buffer);
						}());
					}
				}

				target.trigger('loadstart');
			},

			getStatus: function() {
				// according to W3C spec it should return 0 for readyState < 3, but instead it throws an exception
				try {
					if (_xhr) {
						return _xhr.status;
					}
				} catch(ex) {}
				return 0;
			},

			getResponse: function(responseType) {
				var I = this.getRuntime();

				try {
					switch (responseType) {
						case 'blob':
							var file = new File(I.uid, _xhr.response);
							
							// try to extract file name from content-disposition if possible (might be - not, if CORS for example)	
							var disposition = _xhr.getResponseHeader('Content-Disposition');
							if (disposition) {
								// extract filename from response header if available
								var match = disposition.match(/filename=([\'\"'])([^\1]+)\1/);
								if (match) {
									_filename = match[2];
								}
							}
							file.name = _filename;

							// pre-webkit Opera doesn't set type property on the blob response
							if (!file.type) {
								file.type = Mime.getFileMime(_filename);
							}
							return file;

						case 'json':
							if (!Env.can('return_response_type', 'json')) {
								return _xhr.status === 200 && !!window.JSON ? JSON.parse(_xhr.responseText) : null;
							}
							return _xhr.response;

						case 'document':
							return _getDocument(_xhr);

						default:
							return _xhr.responseText !== '' ? _xhr.responseText : null; // against the specs, but for consistency across the runtimes
					}
				} catch(ex) {
					return null;
				}				
			},

			getAllResponseHeaders: function() {
				try {
					return _xhr.getAllResponseHeaders();
				} catch(ex) {}
				return '';
			},

			abort: function() {
				if (_xhr) {
					_xhr.abort();
				}
			},

			destroy: function() {
				self = _filename = null;
			}
		});


		// here we go... ugly fix for ugly bug
		function _preloadAndSend(meta, data) {
			var target = this, blob, fr;
				
			// get original blob
			blob = data.getBlob().getSource();
			
			// preload blob in memory to be sent as binary string
			fr = new window.FileReader();
			fr.onload = function() {
				// overwrite original blob
				data.append(data.getBlobName(), new Blob(null, {
					type: blob.type,
					data: fr.result
				}));
				// invoke send operation again
				self.send.call(target, meta, data);
			};
			fr.readAsBinaryString(blob);
		}

		
		function _getNativeXHR() {
			if (window.XMLHttpRequest && !(Env.browser === 'IE' && Env.verComp(Env.version, 8, '<'))) { // IE7 has native XHR but it's buggy
				return new window.XMLHttpRequest();
			} else {
				return (function() {
					var progIDs = ['Msxml2.XMLHTTP.6.0', 'Microsoft.XMLHTTP']; // if 6.0 available, use it, otherwise failback to default 3.0
					for (var i = 0; i < progIDs.length; i++) {
						try {
							return new ActiveXObject(progIDs[i]);
						} catch (ex) {}
					}
				})();
			}
		}
		
		// @credits Sergey Ilinsky	(http://www.ilinsky.com/)
		function _getDocument(xhr) {
			var rXML = xhr.responseXML;
			var rText = xhr.responseText;
			
			// Try parsing responseText (@see: http://www.ilinsky.com/articles/XMLHttpRequest/#bugs-ie-responseXML-content-type)
			if (Env.browser === 'IE' && rText && rXML && !rXML.documentElement && /[^\/]+\/[^\+]+\+xml/.test(xhr.getResponseHeader("Content-Type"))) {
				rXML = new window.ActiveXObject("Microsoft.XMLDOM");
				rXML.async = false;
				rXML.validateOnParse = false;
				rXML.loadXML(rText);
			}
	
			// Check if there is no error in document
			if (rXML) {
				if ((Env.browser === 'IE' && rXML.parseError !== 0) || !rXML.documentElement || rXML.documentElement.tagName === "parsererror") {
					return null;
				}
			}
			return rXML;
		}


		function _prepareMultipart(fd) {
			var boundary = '----moxieboundary' + new Date().getTime()
			, dashdash = '--'
			, crlf = '\r\n'
			, multipart = ''
			, I = this.getRuntime()
			;

			if (!I.can('send_binary_string')) {
				throw new x.RuntimeError(x.RuntimeError.NOT_SUPPORTED_ERR);
			}

			_xhr.setRequestHeader('Content-Type', 'multipart/form-data; boundary=' + boundary);

			// append multipart parameters
			fd.each(function(value, name) {
				// Firefox 3.6 failed to convert multibyte characters to UTF-8 in sendAsBinary(), 
				// so we try it here ourselves with: unescape(encodeURIComponent(value))
				if (value instanceof Blob) {
					// Build RFC2388 blob
					multipart += dashdash + boundary + crlf +
						'Content-Disposition: form-data; name="' + name + '"; filename="' + unescape(encodeURIComponent(value.name || 'blob')) + '"' + crlf +
						'Content-Type: ' + (value.type || 'application/octet-stream') + crlf + crlf +
						value.getSource() + crlf;
				} else {
					multipart += dashdash + boundary + crlf +
						'Content-Disposition: form-data; name="' + name + '"' + crlf + crlf +
						unescape(encodeURIComponent(value)) + crlf;
				}
			});

			multipart += dashdash + boundary + dashdash + crlf;

			return multipart;
		}
	}

	return (extensions.XMLHttpRequest = XMLHttpRequest);
});

// Included from: src/javascript/runtime/html5/utils/BinaryReader.js

/**
 * BinaryReader.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

/**
@class moxie/runtime/html5/utils/BinaryReader
@private
*/
define("moxie/runtime/html5/utils/BinaryReader", [
	"moxie/core/utils/Basic"
], function(Basic) {

	
	function BinaryReader(data) {
		if (data instanceof ArrayBuffer) {
			ArrayBufferReader.apply(this, arguments);
		} else {
			UTF16StringReader.apply(this, arguments);
		}
	}

	Basic.extend(BinaryReader.prototype, {
		
		littleEndian: false,


		read: function(idx, size) {
			var sum, mv, i;

			if (idx + size > this.length()) {
				throw new Error("You are trying to read outside the source boundaries.");
			}
			
			mv = this.littleEndian 
				? 0 
				: -8 * (size - 1)
			;

			for (i = 0, sum = 0; i < size; i++) {
				sum |= (this.readByteAt(idx + i) << Math.abs(mv + i*8));
			}
			return sum;
		},


		write: function(idx, num, size) {
			var mv, i, str = '';

			if (idx > this.length()) {
				throw new Error("You are trying to write outside the source boundaries.");
			}

			mv = this.littleEndian 
				? 0 
				: -8 * (size - 1)
			;

			for (i = 0; i < size; i++) {
				this.writeByteAt(idx + i, (num >> Math.abs(mv + i*8)) & 255);
			}
		},


		BYTE: function(idx) {
			return this.read(idx, 1);
		},


		SHORT: function(idx) {
			return this.read(idx, 2);
		},


		LONG: function(idx) {
			return this.read(idx, 4);
		},


		SLONG: function(idx) { // 2's complement notation
			var num = this.read(idx, 4);
			return (num > 2147483647 ? num - 4294967296 : num);
		},


		CHAR: function(idx) {
			return String.fromCharCode(this.read(idx, 1));
		},


		STRING: function(idx, count) {
			return this.asArray('CHAR', idx, count).join('');
		},


		asArray: function(type, idx, count) {
			var values = [];

			for (var i = 0; i < count; i++) {
				values[i] = this[type](idx + i);
			}
			return values;
		}
	});


	function ArrayBufferReader(data) {
		var _dv = new DataView(data);

		Basic.extend(this, {
			
			readByteAt: function(idx) {
				return _dv.getUint8(idx);
			},


			writeByteAt: function(idx, value) {
				_dv.setUint8(idx, value);
			},
			

			SEGMENT: function(idx, size, value) {
				switch (arguments.length) {
					case 2:
						return data.slice(idx, idx + size);

					case 1:
						return data.slice(idx);

					case 3:
						if (value === null) {
							value = new ArrayBuffer();
						}

						if (value instanceof ArrayBuffer) {					
							var arr = new Uint8Array(this.length() - size + value.byteLength);
							if (idx > 0) {
								arr.set(new Uint8Array(data.slice(0, idx)), 0);
							}
							arr.set(new Uint8Array(value), idx);
							arr.set(new Uint8Array(data.slice(idx + size)), idx + value.byteLength);

							this.clear();
							data = arr.buffer;
							_dv = new DataView(data);
							break;
						}

					default: return data;
				}
			},


			length: function() {
				return data ? data.byteLength : 0;
			},


			clear: function() {
				_dv = data = null;
			}
		});
	}


	function UTF16StringReader(data) {
		Basic.extend(this, {
			
			readByteAt: function(idx) {
				return data.charCodeAt(idx);
			},


			writeByteAt: function(idx, value) {
				putstr(String.fromCharCode(value), idx, 1);
			},


			SEGMENT: function(idx, length, segment) {
				switch (arguments.length) {
					case 1:
						return data.substr(idx);
					case 2:
						return data.substr(idx, length);
					case 3:
						putstr(segment !== null ? segment : '', idx, length);
						break;
					default: return data;
				}
			},


			length: function() {
				return data ? data.length : 0;
			}, 

			clear: function() {
				data = null;
			}
		});


		function putstr(segment, idx, length) {
			length = arguments.length === 3 ? length : data.length - idx - 1;
			data = data.substr(0, idx) + segment + data.substr(length + idx);
		}
	}


	return BinaryReader;
});

// Included from: src/javascript/runtime/html5/image/JPEGHeaders.js

/**
 * JPEGHeaders.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */
 
/**
@class moxie/runtime/html5/image/JPEGHeaders
@private
*/
define("moxie/runtime/html5/image/JPEGHeaders", [
	"moxie/runtime/html5/utils/BinaryReader",
	"moxie/core/Exceptions"
], function(BinaryReader, x) {
	
	return function JPEGHeaders(data) {
		var headers = [], _br, idx, marker, length = 0;

		_br = new BinaryReader(data);

		// Check if data is jpeg
		if (_br.SHORT(0) !== 0xFFD8) {
			_br.clear();
			throw new x.ImageError(x.ImageError.WRONG_FORMAT);
		}

		idx = 2;

		while (idx <= _br.length()) {
			marker = _br.SHORT(idx);

			// omit RST (restart) markers
			if (marker >= 0xFFD0 && marker <= 0xFFD7) {
				idx += 2;
				continue;
			}

			// no headers allowed after SOS marker
			if (marker === 0xFFDA || marker === 0xFFD9) {
				break;
			}

			length = _br.SHORT(idx + 2) + 2;

			// APPn marker detected
			if (marker >= 0xFFE1 && marker <= 0xFFEF) {
				headers.push({
					hex: marker,
					name: 'APP' + (marker & 0x000F),
					start: idx,
					length: length,
					segment: _br.SEGMENT(idx, length)
				});
			}

			idx += length;
		}

		_br.clear();

		return {
			headers: headers,

			restore: function(data) {
				var max, i, br;

				br = new BinaryReader(data);

				idx = br.SHORT(2) == 0xFFE0 ? 4 + br.SHORT(4) : 2;

				for (i = 0, max = headers.length; i < max; i++) {
					br.SEGMENT(idx, 0, headers[i].segment);
					idx += headers[i].length;
				}

				data = br.SEGMENT();
				br.clear();
				return data;
			},

			strip: function(data) {
				var br, headers, jpegHeaders, i;

				jpegHeaders = new JPEGHeaders(data);
				headers = jpegHeaders.headers;
				jpegHeaders.purge();

				br = new BinaryReader(data);

				i = headers.length;
				while (i--) {
					br.SEGMENT(headers[i].start, headers[i].length, '');
				}
				
				data = br.SEGMENT();
				br.clear();
				return data;
			},

			get: function(name) {
				var array = [];

				for (var i = 0, max = headers.length; i < max; i++) {
					if (headers[i].name === name.toUpperCase()) {
						array.push(headers[i].segment);
					}
				}
				return array;
			},

			set: function(name, segment) {
				var array = [], i, ii, max;

				if (typeof(segment) === 'string') {
					array.push(segment);
				} else {
					array = segment;
				}

				for (i = ii = 0, max = headers.length; i < max; i++) {
					if (headers[i].name === name.toUpperCase()) {
						headers[i].segment = array[ii];
						headers[i].length = array[ii].length;
						ii++;
					}
					if (ii >= array.length) {
						break;
					}
				}
			},

			purge: function() {
				this.headers = headers = [];
			}
		};
	};
});

// Included from: src/javascript/runtime/html5/image/ExifParser.js

/**
 * ExifParser.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

/**
@class moxie/runtime/html5/image/ExifParser
@private
*/
define("moxie/runtime/html5/image/ExifParser", [
	"moxie/core/utils/Basic",
	"moxie/runtime/html5/utils/BinaryReader",
	"moxie/core/Exceptions"
], function(Basic, BinaryReader, x) {
	
	function ExifParser(data) {
		var __super__, tags, tagDescs, offsets, idx, Tiff;
		
		BinaryReader.call(this, data);

		tags = {
			tiff: {
				/*
				The image orientation viewed in terms of rows and columns.

				1 = The 0th row is at the visual top of the image, and the 0th column is the visual left-hand side.
				2 = The 0th row is at the visual top of the image, and the 0th column is the visual right-hand side.
				3 = The 0th row is at the visual bottom of the image, and the 0th column is the visual right-hand side.
				4 = The 0th row is at the visual bottom of the image, and the 0th column is the visual left-hand side.
				5 = The 0th row is the visual left-hand side of the image, and the 0th column is the visual top.
				6 = The 0th row is the visual right-hand side of the image, and the 0th column is the visual top.
				7 = The 0th row is the visual right-hand side of the image, and the 0th column is the visual bottom.
				8 = The 0th row is the visual left-hand side of the image, and the 0th column is the visual bottom.
				*/
				0x0112: 'Orientation',
				0x010E: 'ImageDescription',
				0x010F: 'Make',
				0x0110: 'Model',
				0x0131: 'Software',
				0x8769: 'ExifIFDPointer',
				0x8825:	'GPSInfoIFDPointer'
			},
			exif: {
				0x9000: 'ExifVersion',
				0xA001: 'ColorSpace',
				0xA002: 'PixelXDimension',
				0xA003: 'PixelYDimension',
				0x9003: 'DateTimeOriginal',
				0x829A: 'ExposureTime',
				0x829D: 'FNumber',
				0x8827: 'ISOSpeedRatings',
				0x9201: 'ShutterSpeedValue',
				0x9202: 'ApertureValue'	,
				0x9207: 'MeteringMode',
				0x9208: 'LightSource',
				0x9209: 'Flash',
				0x920A: 'FocalLength',
				0xA402: 'ExposureMode',
				0xA403: 'WhiteBalance',
				0xA406: 'SceneCaptureType',
				0xA404: 'DigitalZoomRatio',
				0xA408: 'Contrast',
				0xA409: 'Saturation',
				0xA40A: 'Sharpness'
			},
			gps: {
				0x0000: 'GPSVersionID',
				0x0001: 'GPSLatitudeRef',
				0x0002: 'GPSLatitude',
				0x0003: 'GPSLongitudeRef',
				0x0004: 'GPSLongitude'
			},

			thumb: {
				0x0201: 'JPEGInterchangeFormat',
				0x0202: 'JPEGInterchangeFormatLength'
			}
		};

		tagDescs = {
			'ColorSpace': {
				1: 'sRGB',
				0: 'Uncalibrated'
			},

			'MeteringMode': {
				0: 'Unknown',
				1: 'Average',
				2: 'CenterWeightedAverage',
				3: 'Spot',
				4: 'MultiSpot',
				5: 'Pattern',
				6: 'Partial',
				255: 'Other'
			},

			'LightSource': {
				1: 'Daylight',
				2: 'Fliorescent',
				3: 'Tungsten',
				4: 'Flash',
				9: 'Fine weather',
				10: 'Cloudy weather',
				11: 'Shade',
				12: 'Daylight fluorescent (D 5700 - 7100K)',
				13: 'Day white fluorescent (N 4600 -5400K)',
				14: 'Cool white fluorescent (W 3900 - 4500K)',
				15: 'White fluorescent (WW 3200 - 3700K)',
				17: 'Standard light A',
				18: 'Standard light B',
				19: 'Standard light C',
				20: 'D55',
				21: 'D65',
				22: 'D75',
				23: 'D50',
				24: 'ISO studio tungsten',
				255: 'Other'
			},

			'Flash': {
				0x0000: 'Flash did not fire',
				0x0001: 'Flash fired',
				0x0005: 'Strobe return light not detected',
				0x0007: 'Strobe return light detected',
				0x0009: 'Flash fired, compulsory flash mode',
				0x000D: 'Flash fired, compulsory flash mode, return light not detected',
				0x000F: 'Flash fired, compulsory flash mode, return light detected',
				0x0010: 'Flash did not fire, compulsory flash mode',
				0x0018: 'Flash did not fire, auto mode',
				0x0019: 'Flash fired, auto mode',
				0x001D: 'Flash fired, auto mode, return light not detected',
				0x001F: 'Flash fired, auto mode, return light detected',
				0x0020: 'No flash function',
				0x0041: 'Flash fired, red-eye reduction mode',
				0x0045: 'Flash fired, red-eye reduction mode, return light not detected',
				0x0047: 'Flash fired, red-eye reduction mode, return light detected',
				0x0049: 'Flash fired, compulsory flash mode, red-eye reduction mode',
				0x004D: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected',
				0x004F: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light detected',
				0x0059: 'Flash fired, auto mode, red-eye reduction mode',
				0x005D: 'Flash fired, auto mode, return light not detected, red-eye reduction mode',
				0x005F: 'Flash fired, auto mode, return light detected, red-eye reduction mode'
			},

			'ExposureMode': {
				0: 'Auto exposure',
				1: 'Manual exposure',
				2: 'Auto bracket'
			},

			'WhiteBalance': {
				0: 'Auto white balance',
				1: 'Manual white balance'
			},

			'SceneCaptureType': {
				0: 'Standard',
				1: 'Landscape',
				2: 'Portrait',
				3: 'Night scene'
			},

			'Contrast': {
				0: 'Normal',
				1: 'Soft',
				2: 'Hard'
			},

			'Saturation': {
				0: 'Normal',
				1: 'Low saturation',
				2: 'High saturation'
			},

			'Sharpness': {
				0: 'Normal',
				1: 'Soft',
				2: 'Hard'
			},

			// GPS related
			'GPSLatitudeRef': {
				N: 'North latitude',
				S: 'South latitude'
			},

			'GPSLongitudeRef': {
				E: 'East longitude',
				W: 'West longitude'
			}
		};

		offsets = {
			tiffHeader: 10
		};
		
		idx = offsets.tiffHeader;

		__super__ = {
			clear: this.clear
		};

		// Public functions
		Basic.extend(this, {
			
			read: function() {
				try {
					return ExifParser.prototype.read.apply(this, arguments);
				} catch (ex) {
					throw new x.ImageError(x.ImageError.INVALID_META_ERR);
				}
			},


			write: function() {
				try {
					return ExifParser.prototype.write.apply(this, arguments);
				} catch (ex) {
					throw new x.ImageError(x.ImageError.INVALID_META_ERR);
				}
			},


			UNDEFINED: function() {
				return this.BYTE.apply(this, arguments);
			},


			RATIONAL: function(idx) {
				return this.LONG(idx) / this.LONG(idx + 4)
			},


			SRATIONAL: function(idx) {
				return this.SLONG(idx) / this.SLONG(idx + 4)
			},

			ASCII: function(idx) {
				return this.CHAR(idx);
			},

			TIFF: function() {
				return Tiff || null;
			},


			EXIF: function() {
				var Exif = null;

				if (offsets.exifIFD) {
					try {
						Exif = extractTags.call(this, offsets.exifIFD, tags.exif);
					} catch(ex) {
						return null;
					}

					// Fix formatting of some tags
					if (Exif.ExifVersion && Basic.typeOf(Exif.ExifVersion) === 'array') {
						for (var i = 0, exifVersion = ''; i < Exif.ExifVersion.length; i++) {
							exifVersion += String.fromCharCode(Exif.ExifVersion[i]);
						}
						Exif.ExifVersion = exifVersion;
					}
				}

				return Exif;
			},


			GPS: function() {
				var GPS = null;

				if (offsets.gpsIFD) {
					try {
						GPS = extractTags.call(this, offsets.gpsIFD, tags.gps);
					} catch (ex) {
						return null;
					}

					// iOS devices (and probably some others) do not put in GPSVersionID tag (why?..)
					if (GPS.GPSVersionID && Basic.typeOf(GPS.GPSVersionID) === 'array') {
						GPS.GPSVersionID = GPS.GPSVersionID.join('.');
					}
				}

				return GPS;
			},


			thumb: function() {
				if (offsets.IFD1) {
					try {
						var IFD1Tags = extractTags.call(this, offsets.IFD1, tags.thumb);
						
						if ('JPEGInterchangeFormat' in IFD1Tags) {
							return this.SEGMENT(offsets.tiffHeader + IFD1Tags.JPEGInterchangeFormat, IFD1Tags.JPEGInterchangeFormatLength);
						}
					} catch (ex) {}
				}
				return null;
			},


			setExif: function(tag, value) {
				// Right now only setting of width/height is possible
				if (tag !== 'PixelXDimension' && tag !== 'PixelYDimension') { return false; }

				return setTag.call(this, 'exif', tag, value);
			},


			clear: function() {
				__super__.clear();
				data = tags = tagDescs = Tiff = offsets = __super__ = null;
			}
		});


		// Check if that's APP1 and that it has EXIF
		if (this.SHORT(0) !== 0xFFE1 || this.STRING(4, 5).toUpperCase() !== "EXIF\0") {
			throw new x.ImageError(x.ImageError.INVALID_META_ERR);
		}

		// Set read order of multi-byte data
		this.littleEndian = (this.SHORT(idx) == 0x4949);

		// Check if always present bytes are indeed present
		if (this.SHORT(idx+=2) !== 0x002A) {
			throw new x.ImageError(x.ImageError.INVALID_META_ERR);
		}

		offsets.IFD0 = offsets.tiffHeader + this.LONG(idx += 2);
		Tiff = extractTags.call(this, offsets.IFD0, tags.tiff);

		if ('ExifIFDPointer' in Tiff) {
			offsets.exifIFD = offsets.tiffHeader + Tiff.ExifIFDPointer;
			delete Tiff.ExifIFDPointer;
		}

		if ('GPSInfoIFDPointer' in Tiff) {
			offsets.gpsIFD = offsets.tiffHeader + Tiff.GPSInfoIFDPointer;
			delete Tiff.GPSInfoIFDPointer;
		}

		if (Basic.isEmptyObj(Tiff)) {
			Tiff = null;
		}

		// check if we have a thumb as well
		var IFD1Offset = this.LONG(offsets.IFD0 + this.SHORT(offsets.IFD0) * 12 + 2);
		if (IFD1Offset) {
			offsets.IFD1 = offsets.tiffHeader + IFD1Offset;
		}


		function extractTags(IFD_offset, tags2extract) {
			var data = this;
			var length, i, tag, type, count, size, offset, value, values = [], hash = {};
			
			var types = {
				1 : 'BYTE',
				7 : 'UNDEFINED',
				2 : 'ASCII',
				3 : 'SHORT',
				4 : 'LONG',
				5 : 'RATIONAL',
				9 : 'SLONG',
				10: 'SRATIONAL'
			};

			var sizes = {
				'BYTE' 		: 1,
				'UNDEFINED'	: 1,
				'ASCII'		: 1,
				'SHORT'		: 2,
				'LONG' 		: 4,
				'RATIONAL' 	: 8,
				'SLONG'		: 4,
				'SRATIONAL'	: 8
			};

			length = data.SHORT(IFD_offset);

			// The size of APP1 including all these elements shall not exceed the 64 Kbytes specified in the JPEG standard.

			for (i = 0; i < length; i++) {
				values = [];

				// Set binary reader pointer to beginning of the next tag
				offset = IFD_offset + 2 + i*12;

				tag = tags2extract[data.SHORT(offset)];

				if (tag === undefined) {
					continue; // Not the tag we requested
				}

				type = types[data.SHORT(offset+=2)];
				count = data.LONG(offset+=2);
				size = sizes[type];

				if (!size) {
					throw new x.ImageError(x.ImageError.INVALID_META_ERR);
				}

				offset += 4;

				// tag can only fit 4 bytes of data, if data is larger we should look outside
				if (size * count > 4) {
					// instead of data tag contains an offset of the data
					offset = data.LONG(offset) + offsets.tiffHeader;
				}

				// in case we left the boundaries of data throw an early exception
				if (offset + size * count >= this.length()) {
					throw new x.ImageError(x.ImageError.INVALID_META_ERR);
				} 

				// special care for the string
				if (type === 'ASCII') {
					hash[tag] = Basic.trim(data.STRING(offset, count).replace(/\0$/, '')); // strip trailing NULL
					continue;
				} else {
					values = data.asArray(type, offset, count);
					value = (count == 1 ? values[0] : values);

					if (tagDescs.hasOwnProperty(tag) && typeof value != 'object') {
						hash[tag] = tagDescs[tag][value];
					} else {
						hash[tag] = value;
					}
				}
			}

			return hash;
		}

		// At the moment only setting of simple (LONG) values, that do not require offset recalculation, is supported
		function setTag(ifd, tag, value) {
			var offset, length, tagOffset, valueOffset = 0;

			// If tag name passed translate into hex key
			if (typeof(tag) === 'string') {
				var tmpTags = tags[ifd.toLowerCase()];
				for (var hex in tmpTags) {
					if (tmpTags[hex] === tag) {
						tag = hex;
						break;
					}
				}
			}
			offset = offsets[ifd.toLowerCase() + 'IFD'];
			length = this.SHORT(offset);

			for (var i = 0; i < length; i++) {
				tagOffset = offset + 12 * i + 2;

				if (this.SHORT(tagOffset) == tag) {
					valueOffset = tagOffset + 8;
					break;
				}
			}

			if (!valueOffset) {
				return false;
			}

			try {
				this.write(valueOffset, value, 4);
			} catch(ex) {
				return false;
			}

			return true;
		}
	}

	ExifParser.prototype = BinaryReader.prototype;

	return ExifParser;
});

// Included from: src/javascript/runtime/html5/image/JPEG.js

/**
 * JPEG.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

/**
@class moxie/runtime/html5/image/JPEG
@private
*/
define("moxie/runtime/html5/image/JPEG", [
	"moxie/core/utils/Basic",
	"moxie/core/Exceptions",
	"moxie/runtime/html5/image/JPEGHeaders",
	"moxie/runtime/html5/utils/BinaryReader",
	"moxie/runtime/html5/image/ExifParser"
], function(Basic, x, JPEGHeaders, BinaryReader, ExifParser) {
	
	function JPEG(data) {
		var _br, _hm, _ep, _info;

		_br = new BinaryReader(data);

		// check if it is jpeg
		if (_br.SHORT(0) !== 0xFFD8) {
			throw new x.ImageError(x.ImageError.WRONG_FORMAT);
		}

		// backup headers
		_hm = new JPEGHeaders(data);

		// extract exif info
		try {
			_ep = new ExifParser(_hm.get('app1')[0]);
		} catch(ex) {}

		// get dimensions
		_info = _getDimensions.call(this);

		Basic.extend(this, {
			type: 'image/jpeg',

			size: _br.length(),

			width: _info && _info.width || 0,

			height: _info && _info.height || 0,

			setExif: function(tag, value) {
				if (!_ep) {
					return false; // or throw an exception
				}

				if (Basic.typeOf(tag) === 'object') {
					Basic.each(tag, function(value, tag) {
						_ep.setExif(tag, value);
					});
				} else {
					_ep.setExif(tag, value);
				}

				// update internal headers
				_hm.set('app1', _ep.SEGMENT());
			},

			writeHeaders: function() {
				if (!arguments.length) {
					// if no arguments passed, update headers internally
					return _hm.restore(data);
				}
				return _hm.restore(arguments[0]);
			},

			stripHeaders: function(data) {
				return _hm.strip(data);
			},

			purge: function() {
				_purge.call(this);
			}
		});

		if (_ep) {
			this.meta = {
				tiff: _ep.TIFF(),
				exif: _ep.EXIF(),
				gps: _ep.GPS(),
				thumb: _getThumb()
			};
		}


		function _getDimensions(br) {
			var idx = 0
			, marker
			, length
			;

			if (!br) {
				br = _br;
			}

			// examine all through the end, since some images might have very large APP segments
			while (idx <= br.length()) {
				marker = br.SHORT(idx += 2);

				if (marker >= 0xFFC0 && marker <= 0xFFC3) { // SOFn
					idx += 5; // marker (2 bytes) + length (2 bytes) + Sample precision (1 byte)
					return {
						height: br.SHORT(idx),
						width: br.SHORT(idx += 2)
					};
				}
				length = br.SHORT(idx += 2);
				idx += length - 2;
			}
			return null;
		}


		function _getThumb() {
			var data =  _ep.thumb()
			, br
			, info
			;

			if (data) {
				br = new BinaryReader(data);
				info = _getDimensions(br);
				br.clear();

				if (info) {
					info.data = data;
					return info;
				}
			}
			return null;
		}


		function _purge() {
			if (!_ep || !_hm || !_br) { 
				return; // ignore any repeating purge requests
			}
			_ep.clear();
			_hm.purge();
			_br.clear();
			_info = _hm = _ep = _br = null;
		}
	}

	return JPEG;
});

// Included from: src/javascript/runtime/html5/image/PNG.js

/**
 * PNG.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

/**
@class moxie/runtime/html5/image/PNG
@private
*/
define("moxie/runtime/html5/image/PNG", [
	"moxie/core/Exceptions",
	"moxie/core/utils/Basic",
	"moxie/runtime/html5/utils/BinaryReader"
], function(x, Basic, BinaryReader) {
	
	function PNG(data) {
		var _br, _hm, _ep, _info;

		_br = new BinaryReader(data);

		// check if it's png
		(function() {
			var idx = 0, i = 0
			, signature = [0x8950, 0x4E47, 0x0D0A, 0x1A0A]
			;

			for (i = 0; i < signature.length; i++, idx += 2) {
				if (signature[i] != _br.SHORT(idx)) {
					throw new x.ImageError(x.ImageError.WRONG_FORMAT);
				}
			}
		}());

		function _getDimensions() {
			var chunk, idx;

			chunk = _getChunkAt.call(this, 8);

			if (chunk.type == 'IHDR') {
				idx = chunk.start;
				return {
					width: _br.LONG(idx),
					height: _br.LONG(idx += 4)
				};
			}
			return null;
		}

		function _purge() {
			if (!_br) {
				return; // ignore any repeating purge requests
			}
			_br.clear();
			data = _info = _hm = _ep = _br = null;
		}

		_info = _getDimensions.call(this);

		Basic.extend(this, {
			type: 'image/png',

			size: _br.length(),

			width: _info.width,

			height: _info.height,

			purge: function() {
				_purge.call(this);
			}
		});

		// for PNG we can safely trigger purge automatically, as we do not keep any data for later
		_purge.call(this);

		function _getChunkAt(idx) {
			var length, type, start, CRC;

			length = _br.LONG(idx);
			type = _br.STRING(idx += 4, 4);
			start = idx += 4;
			CRC = _br.LONG(idx + length);

			return {
				length: length,
				type: type,
				start: start,
				CRC: CRC
			};
		}
	}

	return PNG;
});

// Included from: src/javascript/runtime/html5/image/ImageInfo.js

/**
 * ImageInfo.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

/**
@class moxie/runtime/html5/image/ImageInfo
@private
*/
define("moxie/runtime/html5/image/ImageInfo", [
	"moxie/core/utils/Basic",
	"moxie/core/Exceptions",
	"moxie/runtime/html5/image/JPEG",
	"moxie/runtime/html5/image/PNG"
], function(Basic, x, JPEG, PNG) {
	/**
	Optional image investigation tool for HTML5 runtime. Provides the following features:
	- ability to distinguish image type (JPEG or PNG) by signature
	- ability to extract image width/height directly from it's internals, without preloading in memory (fast)
	- ability to extract APP headers from JPEGs (Exif, GPS, etc)
	- ability to replace width/height tags in extracted JPEG headers
	- ability to restore APP headers, that were for example stripped during image manipulation

	@class ImageInfo
	@constructor
	@param {String} data Image source as binary string
	*/
	return function(data) {
		var _cs = [JPEG, PNG], _img;

		// figure out the format, throw: ImageError.WRONG_FORMAT if not supported
		_img = (function() {
			for (var i = 0; i < _cs.length; i++) {
				try {
					return new _cs[i](data);
				} catch (ex) {
					// console.info(ex);
				}
			}
			throw new x.ImageError(x.ImageError.WRONG_FORMAT);
		}());

		Basic.extend(this, {
			/**
			Image Mime Type extracted from it's depths

			@property type
			@type {String}
			@default ''
			*/
			type: '',

			/**
			Image size in bytes

			@property size
			@type {Number}
			@default 0
			*/
			size: 0,

			/**
			Image width extracted from image source

			@property width
			@type {Number}
			@default 0
			*/
			width: 0,

			/**
			Image height extracted from image source

			@property height
			@type {Number}
			@default 0
			*/
			height: 0,

			/**
			Sets Exif tag. Currently applicable only for width and height tags. Obviously works only with JPEGs.

			@method setExif
			@param {String} tag Tag to set
			@param {Mixed} value Value to assign to the tag
			*/
			setExif: function() {},

			/**
			Restores headers to the source.

			@method writeHeaders
			@param {String} data Image source as binary string
			@return {String} Updated binary string
			*/
			writeHeaders: function(data) {
				return data;
			},

			/**
			Strip all headers from the source.

			@method stripHeaders
			@param {String} data Image source as binary string
			@return {String} Updated binary string
			*/
			stripHeaders: function(data) {
				return data;
			},

			/**
			Dispose resources.

			@method purge
			*/
			purge: function() {
				data = null;
			}
		});

		Basic.extend(this, _img);

		this.purge = function() {
			_img.purge();
			_img = null;
		};
	};
});

// Included from: src/javascript/runtime/html5/image/MegaPixel.js

/**
(The MIT License)

Copyright (c) 2012 Shinichi Tomita <shinichi.tomita@gmail.com>;

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

/**
 * Mega pixel image rendering library for iOS6 Safari
 *
 * Fixes iOS6 Safari's image file rendering issue for large size image (over mega-pixel),
 * which causes unexpected subsampling when drawing it in canvas.
 * By using this library, you can safely render the image with proper stretching.
 *
 * Copyright (c) 2012 Shinichi Tomita <shinichi.tomita@gmail.com>
 * Released under the MIT license
 */

/**
@class moxie/runtime/html5/image/MegaPixel
@private
*/
define("moxie/runtime/html5/image/MegaPixel", [], function() {

	/**
	 * Rendering image element (with resizing) into the canvas element
	 */
	function renderImageToCanvas(img, canvas, options) {
		var iw = img.naturalWidth, ih = img.naturalHeight;
		var width = options.width, height = options.height;
		var x = options.x || 0, y = options.y || 0;
		var ctx = canvas.getContext('2d');
		if (detectSubsampling(img)) {
			iw /= 2;
			ih /= 2;
		}
		var d = 1024; // size of tiling canvas
		var tmpCanvas = document.createElement('canvas');
		tmpCanvas.width = tmpCanvas.height = d;
		var tmpCtx = tmpCanvas.getContext('2d');
		var vertSquashRatio = detectVerticalSquash(img, iw, ih);
		var sy = 0;
		while (sy < ih) {
			var sh = sy + d > ih ? ih - sy : d;
			var sx = 0;
			while (sx < iw) {
				var sw = sx + d > iw ? iw - sx : d;
				tmpCtx.clearRect(0, 0, d, d);
				tmpCtx.drawImage(img, -sx, -sy);
				var dx = (sx * width / iw + x) << 0;
				var dw = Math.ceil(sw * width / iw);
				var dy = (sy * height / ih / vertSquashRatio + y) << 0;
				var dh = Math.ceil(sh * height / ih / vertSquashRatio);
				ctx.drawImage(tmpCanvas, 0, 0, sw, sh, dx, dy, dw, dh);
				sx += d;
			}
			sy += d;
		}
		tmpCanvas = tmpCtx = null;
	}

	/**
	 * Detect subsampling in loaded image.
	 * In iOS, larger images than 2M pixels may be subsampled in rendering.
	 */
	function detectSubsampling(img) {
		var iw = img.naturalWidth, ih = img.naturalHeight;
		if (iw * ih > 1024 * 1024) { // subsampling may happen over megapixel image
			var canvas = document.createElement('canvas');
			canvas.width = canvas.height = 1;
			var ctx = canvas.getContext('2d');
			ctx.drawImage(img, -iw + 1, 0);
			// subsampled image becomes half smaller in rendering size.
			// check alpha channel value to confirm image is covering edge pixel or not.
			// if alpha value is 0 image is not covering, hence subsampled.
			return ctx.getImageData(0, 0, 1, 1).data[3] === 0;
		} else {
			return false;
		}
	}


	/**
	 * Detecting vertical squash in loaded image.
	 * Fixes a bug which squash image vertically while drawing into canvas for some images.
	 */
	function detectVerticalSquash(img, iw, ih) {
		var canvas = document.createElement('canvas');
		canvas.width = 1;
		canvas.height = ih;
		var ctx = canvas.getContext('2d');
		ctx.drawImage(img, 0, 0);
		var data = ctx.getImageData(0, 0, 1, ih).data;
		// search image edge pixel position in case it is squashed vertically.
		var sy = 0;
		var ey = ih;
		var py = ih;
		while (py > sy) {
			var alpha = data[(py - 1) * 4 + 3];
			if (alpha === 0) {
				ey = py;
			} else {
			sy = py;
			}
			py = (ey + sy) >> 1;
		}
		canvas = null;
		var ratio = (py / ih);
		return (ratio === 0) ? 1 : ratio;
	}

	return {
		isSubsampled: detectSubsampling,
		renderTo: renderImageToCanvas
	};
});

// Included from: src/javascript/runtime/html5/image/Image.js

/**
 * Image.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

/**
@class moxie/runtime/html5/image/Image
@private
*/
define("moxie/runtime/html5/image/Image", [
	"moxie/runtime/html5/Runtime",
	"moxie/core/utils/Basic",
	"moxie/core/Exceptions",
	"moxie/core/utils/Encode",
	"moxie/file/Blob",
	"moxie/file/File",
	"moxie/runtime/html5/image/ImageInfo",
	"moxie/runtime/html5/image/MegaPixel",
	"moxie/core/utils/Mime",
	"moxie/core/utils/Env"
], function(extensions, Basic, x, Encode, Blob, File, ImageInfo, MegaPixel, Mime, Env) {
	
	function HTML5Image() {
		var me = this
		, _img, _imgInfo, _canvas, _binStr, _blob
		, _modified = false // is set true whenever image is modified
		, _preserveHeaders = true
		;

		Basic.extend(this, {
			loadFromBlob: function(blob) {
				var comp = this, I = comp.getRuntime()
				, asBinary = arguments.length > 1 ? arguments[1] : true
				;

				if (!I.can('access_binary')) {
					throw new x.RuntimeError(x.RuntimeError.NOT_SUPPORTED_ERR);
				}

				_blob = blob;

				if (blob.isDetached()) {
					_binStr = blob.getSource();
					_preload.call(this, _binStr);
					return;
				} else {
					_readAsDataUrl.call(this, blob.getSource(), function(dataUrl) {
						if (asBinary) {
							_binStr = _toBinary(dataUrl);
						}
						_preload.call(comp, dataUrl);
					});
				}
			},

			loadFromImage: function(img, exact) {
				this.meta = img.meta;

				_blob = new File(null, {
					name: img.name,
					size: img.size,
					type: img.type
				});

				_preload.call(this, exact ? (_binStr = img.getAsBinaryString()) : img.getAsDataURL());
			},

			getInfo: function() {
				var I = this.getRuntime(), info;

				if (!_imgInfo && _binStr && I.can('access_image_binary')) {
					_imgInfo = new ImageInfo(_binStr);
				}

				info = {
					width: _getImg().width || 0,
					height: _getImg().height || 0,
					type: _blob.type || Mime.getFileMime(_blob.name),
					size: _binStr && _binStr.length || _blob.size || 0,
					name: _blob.name || '',
					meta: _imgInfo && _imgInfo.meta || this.meta || {}
				};

				// store thumbnail data as blob
				if (info.meta && info.meta.thumb && !(info.meta.thumb.data instanceof Blob)) {
					info.meta.thumb.data = new Blob(null, {
						type: 'image/jpeg',
						data: info.meta.thumb.data
					});
				}

				return info;
			},

			downsize: function() {
				_downsize.apply(this, arguments);
			},

			getAsCanvas: function() {
				if (_canvas) {
					_canvas.id = this.uid + '_canvas';
				}
				return _canvas;
			},

			getAsBlob: function(type, quality) {
				if (type !== this.type) {
					// if different mime type requested prepare image for conversion
					_downsize.call(this, this.width, this.height, false);
				}
				return new File(null, {
					name: _blob.name || '',
					type: type,
					data: me.getAsBinaryString.call(this, type, quality)
				});
			},

			getAsDataURL: function(type) {
				var quality = arguments[1] || 90;

				// if image has not been modified, return the source right away
				if (!_modified) {
					return _img.src;
				}

				if ('image/jpeg' !== type) {
					return _canvas.toDataURL('image/png');
				} else {
					try {
						// older Geckos used to result in an exception on quality argument
						return _canvas.toDataURL('image/jpeg', quality/100);
					} catch (ex) {
						return _canvas.toDataURL('image/jpeg');
					}
				}
			},

			getAsBinaryString: function(type, quality) {
				// if image has not been modified, return the source right away
				if (!_modified) {
					// if image was not loaded from binary string
					if (!_binStr) {
						_binStr = _toBinary(me.getAsDataURL(type, quality));
					}
					return _binStr;
				}

				if ('image/jpeg' !== type) {
					_binStr = _toBinary(me.getAsDataURL(type, quality));
				} else {
					var dataUrl;

					// if jpeg
					if (!quality) {
						quality = 90;
					}

					try {
						// older Geckos used to result in an exception on quality argument
						dataUrl = _canvas.toDataURL('image/jpeg', quality/100);
					} catch (ex) {
						dataUrl = _canvas.toDataURL('image/jpeg');
					}

					_binStr = _toBinary(dataUrl);

					if (_imgInfo) {
						_binStr = _imgInfo.stripHeaders(_binStr);

						if (_preserveHeaders) {
							// update dimensions info in exif
							if (_imgInfo.meta && _imgInfo.meta.exif) {
								_imgInfo.setExif({
									PixelXDimension: this.width,
									PixelYDimension: this.height
								});
							}

							// re-inject the headers
							_binStr = _imgInfo.writeHeaders(_binStr);
						}

						// will be re-created from fresh on next getInfo call
						_imgInfo.purge();
						_imgInfo = null;
					}
				}

				_modified = false;

				return _binStr;
			},

			destroy: function() {
				me = null;
				_purge.call(this);
				this.getRuntime().getShim().removeInstance(this.uid);
			}
		});


		function _getImg() {
			if (!_canvas && !_img) {
				throw new x.ImageError(x.DOMException.INVALID_STATE_ERR);
			}
			return _canvas || _img;
		}


		function _toBinary(str) {
			return Encode.atob(str.substring(str.indexOf('base64,') + 7));
		}


		function _toDataUrl(str, type) {
			return 'data:' + (type || '') + ';base64,' + Encode.btoa(str);
		}


		function _preload(str) {
			var comp = this;

			_img = new Image();
			_img.onerror = function() {
				_purge.call(this);
				comp.trigger('error', x.ImageError.WRONG_FORMAT);
			};
			_img.onload = function() {
				comp.trigger('load');
			};

			_img.src = str.substr(0, 5) == 'data:' ? str : _toDataUrl(str, _blob.type);
		}


		function _readAsDataUrl(file, callback) {
			var comp = this, fr;

			// use FileReader if it's available
			if (window.FileReader) {
				fr = new FileReader();
				fr.onload = function() {
					callback(this.result);
				};
				fr.onerror = function() {
					comp.trigger('error', x.ImageError.WRONG_FORMAT);
				};
				fr.readAsDataURL(file);
			} else {
				return callback(file.getAsDataURL());
			}
		}

		function _downsize(width, height, crop, preserveHeaders) {
			var self = this
			, scale
			, mathFn
			, x = 0
			, y = 0
			, img
			, destWidth
			, destHeight
			, orientation
			;

			_preserveHeaders = preserveHeaders; // we will need to check this on export (see getAsBinaryString())

			// take into account orientation tag
			orientation = (this.meta && this.meta.tiff && this.meta.tiff.Orientation) || 1;

			if (Basic.inArray(orientation, [5,6,7,8]) !== -1) { // values that require 90 degree rotation
				// swap dimensions
				var tmp = width;
				width = height;
				height = tmp;
			}

			img = _getImg();

			// unify dimensions
			if (!crop) {
				scale = Math.min(width/img.width, height/img.height);
			} else {
				// one of the dimensions may exceed the actual image dimensions - we need to take the smallest value
				width = Math.min(width, img.width);
				height = Math.min(height, img.height);

				scale = Math.max(width/img.width, height/img.height);
			}
		
			// we only downsize here
			if (scale > 1 && !crop && preserveHeaders) {
				this.trigger('Resize');
				return;
			}

			// prepare canvas if necessary
			if (!_canvas) {
				_canvas = document.createElement("canvas");
			}

			// calculate dimensions of proportionally resized image
			destWidth = Math.round(img.width * scale);	
			destHeight = Math.round(img.height * scale);

			// scale image and canvas
			if (crop) {
				_canvas.width = width;
				_canvas.height = height;

				// if dimensions of the resulting image still larger than canvas, center it
				if (destWidth > width) {
					x = Math.round((destWidth - width) / 2);
				}

				if (destHeight > height) {
					y = Math.round((destHeight - height) / 2);
				}
			} else {
				_canvas.width = destWidth;
				_canvas.height = destHeight;
			}

			// rotate if required, according to orientation tag
			if (!_preserveHeaders) {
				_rotateToOrientaion(_canvas.width, _canvas.height, orientation);
			}

			_drawToCanvas.call(this, img, _canvas, -x, -y, destWidth, destHeight);

			this.width = _canvas.width;
			this.height = _canvas.height;

			_modified = true;
			self.trigger('Resize');
		}


		function _drawToCanvas(img, canvas, x, y, w, h) {
			if (Env.OS === 'iOS') { 
				// avoid squish bug in iOS6
				MegaPixel.renderTo(img, canvas, { width: w, height: h, x: x, y: y });
			} else {
				var ctx = canvas.getContext('2d');
				ctx.drawImage(img, x, y, w, h);
			}
		}


		/**
		* Transform canvas coordination according to specified frame size and orientation
		* Orientation value is from EXIF tag
		* @author Shinichi Tomita <shinichi.tomita@gmail.com>
		*/
		function _rotateToOrientaion(width, height, orientation) {
			switch (orientation) {
				case 5:
				case 6:
				case 7:
				case 8:
					_canvas.width = height;
					_canvas.height = width;
					break;
				default:
					_canvas.width = width;
					_canvas.height = height;
			}

			/**
			1 = The 0th row is at the visual top of the image, and the 0th column is the visual left-hand side.
			2 = The 0th row is at the visual top of the image, and the 0th column is the visual right-hand side.
			3 = The 0th row is at the visual bottom of the image, and the 0th column is the visual right-hand side.
			4 = The 0th row is at the visual bottom of the image, and the 0th column is the visual left-hand side.
			5 = The 0th row is the visual left-hand side of the image, and the 0th column is the visual top.
			6 = The 0th row is the visual right-hand side of the image, and the 0th column is the visual top.
			7 = The 0th row is the visual right-hand side of the image, and the 0th column is the visual bottom.
			8 = The 0th row is the visual left-hand side of the image, and the 0th column is the visual bottom.
			*/

			var ctx = _canvas.getContext('2d');
			switch (orientation) {
				case 2:
					// horizontal flip
					ctx.translate(width, 0);
					ctx.scale(-1, 1);
					break;
				case 3:
					// 180 rotate left
					ctx.translate(width, height);
					ctx.rotate(Math.PI);
					break;
				case 4:
					// vertical flip
					ctx.translate(0, height);
					ctx.scale(1, -1);
					break;
				case 5:
					// vertical flip + 90 rotate right
					ctx.rotate(0.5 * Math.PI);
					ctx.scale(1, -1);
					break;
				case 6:
					// 90 rotate right
					ctx.rotate(0.5 * Math.PI);
					ctx.translate(0, -height);
					break;
				case 7:
					// horizontal flip + 90 rotate right
					ctx.rotate(0.5 * Math.PI);
					ctx.translate(width, -height);
					ctx.scale(-1, 1);
					break;
				case 8:
					// 90 rotate left
					ctx.rotate(-0.5 * Math.PI);
					ctx.translate(-width, 0);
					break;
			}
		}


		function _purge() {
			if (_imgInfo) {
				_imgInfo.purge();
				_imgInfo = null;
			}
			_binStr = _img = _canvas = _blob = null;
			_modified = false;
		}
	}

	return (extensions.Image = HTML5Image);
});

/**
 * Stub for moxie/runtime/flash/Runtime
 * @private
 */
define("moxie/runtime/flash/Runtime", [
], function() {
	return {};
});

/**
 * Stub for moxie/runtime/silverlight/Runtime
 * @private
 */
define("moxie/runtime/silverlight/Runtime", [
], function() {
	return {};
});

// Included from: src/javascript/runtime/html4/Runtime.js

/**
 * Runtime.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

/*global File:true */

/**
Defines constructor for HTML4 runtime.

@class moxie/runtime/html4/Runtime
@private
*/
define("moxie/runtime/html4/Runtime", [
	"moxie/core/utils/Basic",
	"moxie/core/Exceptions",
	"moxie/runtime/Runtime",
	"moxie/core/utils/Env"
], function(Basic, x, Runtime, Env) {
	
	var type = 'html4', extensions = {};

	function Html4Runtime(options) {
		var I = this
		, Test = Runtime.capTest
		, True = Runtime.capTrue
		;

		Runtime.call(this, options, type, {
			access_binary: Test(window.FileReader || window.File && File.getAsDataURL),
			access_image_binary: false,
			display_media: Test(extensions.Image && (Env.can('create_canvas') || Env.can('use_data_uri_over32kb'))),
			do_cors: false,
			drag_and_drop: false,
			filter_by_extension: Test(function() { // if you know how to feature-detect this, please suggest
				return (Env.browser === 'Chrome' && Env.verComp(Env.version, 28, '>=')) || 
					(Env.browser === 'IE' && Env.verComp(Env.version, 10, '>=')) || 
					(Env.browser === 'Safari' && Env.verComp(Env.version, 7, '>='));
			}()),
			resize_image: function() {
				return extensions.Image && I.can('access_binary') && Env.can('create_canvas');
			},
			report_upload_progress: false,
			return_response_headers: false,
			return_response_type: function(responseType) {
				if (responseType === 'json' && !!window.JSON) {
					return true;
				} 
				return !!~Basic.inArray(responseType, ['text', 'document', '']);
			},
			return_status_code: function(code) {
				return !Basic.arrayDiff(code, [200, 404]);
			},
			select_file: function() {
				return Env.can('use_fileinput');
			},
			select_multiple: false,
			send_binary_string: false,
			send_custom_headers: false,
			send_multipart: true,
			slice_blob: false,
			stream_upload: function() {
				return I.can('select_file');
			},
			summon_file_dialog: function() { // yeah... some dirty sniffing here...
				return I.can('select_file') && (
					(Env.browser === 'Firefox' && Env.verComp(Env.version, 4, '>=')) ||
					(Env.browser === 'Opera' && Env.verComp(Env.version, 12, '>=')) ||
					(Env.browser === 'IE' && Env.verComp(Env.version, 10, '>=')) ||
					!!~Basic.inArray(Env.browser, ['Chrome', 'Safari'])
				);
			},
			upload_filesize: True,
			use_http_method: function(methods) {
				return !Basic.arrayDiff(methods, ['GET', 'POST']);
			}
		});


		Basic.extend(this, {
			init : function() {
				this.trigger("Init");
			},

			destroy: (function(destroy) { // extend default destroy method
				return function() {
					destroy.call(I);
					destroy = I = null;
				};
			}(this.destroy))
		});

		Basic.extend(this.getShim(), extensions);
	}

	Runtime.addConstructor(type, Html4Runtime);

	return extensions;
});

// Included from: src/javascript/runtime/html4/file/FileInput.js

/**
 * FileInput.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

/**
@class moxie/runtime/html4/file/FileInput
@private
*/
define("moxie/runtime/html4/file/FileInput", [
	"moxie/runtime/html4/Runtime",
	"moxie/file/File",
	"moxie/core/utils/Basic",
	"moxie/core/utils/Dom",
	"moxie/core/utils/Events",
	"moxie/core/utils/Mime",
	"moxie/core/utils/Env"
], function(extensions, File, Basic, Dom, Events, Mime, Env) {
	
	function FileInput() {
		var _uid, _mimes = [], _options;

		function addInput() {
			var comp = this, I = comp.getRuntime(), shimContainer, browseButton, currForm, form, input, uid;

			uid = Basic.guid('uid_');

			shimContainer = I.getShimContainer(); // we get new ref everytime to avoid memory leaks in IE

			if (_uid) { // move previous form out of the view
				currForm = Dom.get(_uid + '_form');
				if (currForm) {
					Basic.extend(currForm.style, { top: '100%' });
				}
			}

			// build form in DOM, since innerHTML version not able to submit file for some reason
			form = document.createElement('form');
			form.setAttribute('id', uid + '_form');
			form.setAttribute('method', 'post');
			form.setAttribute('enctype', 'multipart/form-data');
			form.setAttribute('encoding', 'multipart/form-data');

			Basic.extend(form.style, {
				overflow: 'hidden',
				position: 'absolute',
				top: 0,
				left: 0,
				width: '100%',
				height: '100%'
			});

			input = document.createElement('input');
			input.setAttribute('id', uid);
			input.setAttribute('type', 'file');
			input.setAttribute('name', _options.name || 'Filedata');
			input.setAttribute('accept', _mimes.join(','));

			Basic.extend(input.style, {
				fontSize: '999px',
				opacity: 0
			});

			form.appendChild(input);
			shimContainer.appendChild(form);

			// prepare file input to be placed underneath the browse_button element
			Basic.extend(input.style, {
				position: 'absolute',
				top: 0,
				left: 0,
				width: '100%',
				height: '100%'
			});

			if (Env.browser === 'IE' && Env.verComp(Env.version, 10, '<')) {
				Basic.extend(input.style, {
					filter : "progid:DXImageTransform.Microsoft.Alpha(opacity=0)"
				});
			}

			input.onchange = function() { // there should be only one handler for this
				var file;

				if (!this.value) {
					return;
				}

				if (this.files) { // check if browser is fresh enough
					file = this.files[0];

					// ignore empty files (IE10 for example hangs if you try to send them via XHR)
					if (file.size === 0) {
						form.parentNode.removeChild(form);
						return;
					}
				} else {
					file = {
						name: this.value
					};
				}

				file = new File(I.uid, file);

				// clear event handler
				this.onchange = function() {}; 
				addInput.call(comp); 

				comp.files = [file];

				// substitute all ids with file uids (consider file.uid read-only - we cannot do it the other way around)
				input.setAttribute('id', file.uid);
				form.setAttribute('id', file.uid + '_form');
				
				comp.trigger('change');

				input = form = null;
			};


			// route click event to the input
			if (I.can('summon_file_dialog')) {
				browseButton = Dom.get(_options.browse_button);
				Events.removeEvent(browseButton, 'click', comp.uid);
				Events.addEvent(browseButton, 'click', function(e) {
					if (input && !input.disabled) { // for some reason FF (up to 8.0.1 so far) lets to click disabled input[type=file]
						input.click();
					}
					e.preventDefault();
				}, comp.uid);
			}

			_uid = uid;

			shimContainer = currForm = browseButton = null;
		}

		Basic.extend(this, {
			init: function(options) {
				var comp = this, I = comp.getRuntime(), shimContainer;

				// figure out accept string
				_options = options;
				_mimes = options.accept.mimes || Mime.extList2mimes(options.accept, I.can('filter_by_extension'));

				shimContainer = I.getShimContainer();

				(function() {
					var browseButton, zIndex, top;

					browseButton = Dom.get(options.browse_button);

					// Route click event to the input[type=file] element for browsers that support such behavior
					if (I.can('summon_file_dialog')) {
						if (Dom.getStyle(browseButton, 'position') === 'static') {
							browseButton.style.position = 'relative';
						}

						zIndex = parseInt(Dom.getStyle(browseButton, 'z-index'), 10) || 1;

						browseButton.style.zIndex = zIndex;
						shimContainer.style.zIndex = zIndex - 1;
					}

					/* Since we have to place input[type=file] on top of the browse_button for some browsers,
					browse_button loses interactivity, so we restore it here */
					top = I.can('summon_file_dialog') ? browseButton : shimContainer;

					Events.addEvent(top, 'mouseover', function() {
						comp.trigger('mouseenter');
					}, comp.uid);

					Events.addEvent(top, 'mouseout', function() {
						comp.trigger('mouseleave');
					}, comp.uid);

					Events.addEvent(top, 'mousedown', function() {
						comp.trigger('mousedown');
					}, comp.uid);

					Events.addEvent(Dom.get(options.container), 'mouseup', function() {
						comp.trigger('mouseup');
					}, comp.uid);

					browseButton = null;
				}());

				addInput.call(this);

				shimContainer = null;

				// trigger ready event asynchronously
				comp.trigger({
					type: 'ready',
					async: true
				});
			},


			disable: function(state) {
				var input;

				if ((input = Dom.get(_uid))) {
					input.disabled = !!state;
				}
			},

			destroy: function() {
				var I = this.getRuntime()
				, shim = I.getShim()
				, shimContainer = I.getShimContainer()
				;
				
				Events.removeAllEvents(shimContainer, this.uid);
				Events.removeAllEvents(_options && Dom.get(_options.container), this.uid);
				Events.removeAllEvents(_options && Dom.get(_options.browse_button), this.uid);
				
				if (shimContainer) {
					shimContainer.innerHTML = '';
				}

				shim.removeInstance(this.uid);

				_uid = _mimes = _options = shimContainer = shim = null;
			}
		});
	}

	return (extensions.FileInput = FileInput);
});

// Included from: src/javascript/runtime/html4/file/FileReader.js

/**
 * FileReader.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

/**
@class moxie/runtime/html4/file/FileReader
@private
*/
define("moxie/runtime/html4/file/FileReader", [
	"moxie/runtime/html4/Runtime",
	"moxie/runtime/html5/file/FileReader"
], function(extensions, FileReader) {
	return (extensions.FileReader = FileReader);
});

// Included from: src/javascript/runtime/html4/xhr/XMLHttpRequest.js

/**
 * XMLHttpRequest.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

/**
@class moxie/runtime/html4/xhr/XMLHttpRequest
@private
*/
define("moxie/runtime/html4/xhr/XMLHttpRequest", [
	"moxie/runtime/html4/Runtime",
	"moxie/core/utils/Basic",
	"moxie/core/utils/Dom",
	"moxie/core/utils/Url",
	"moxie/core/Exceptions",
	"moxie/core/utils/Events",
	"moxie/file/Blob",
	"moxie/xhr/FormData"
], function(extensions, Basic, Dom, Url, x, Events, Blob, FormData) {
	
	function XMLHttpRequest() {
		var _status, _response, _iframe;

		function cleanup(cb) {
			var target = this, uid, form, inputs, i, hasFile = false;

			if (!_iframe) {
				return;
			}

			uid = _iframe.id.replace(/_iframe$/, '');

			form = Dom.get(uid + '_form');
			if (form) {
				inputs = form.getElementsByTagName('input');
				i = inputs.length;

				while (i--) {
					switch (inputs[i].getAttribute('type')) {
						case 'hidden':
							inputs[i].parentNode.removeChild(inputs[i]);
							break;
						case 'file':
							hasFile = true; // flag the case for later
							break;
					}
				}
				inputs = [];

				if (!hasFile) { // we need to keep the form for sake of possible retries
					form.parentNode.removeChild(form);
				}
				form = null;
			}

			// without timeout, request is marked as canceled (in console)
			setTimeout(function() {
				Events.removeEvent(_iframe, 'load', target.uid);
				if (_iframe.parentNode) { // #382
					_iframe.parentNode.removeChild(_iframe);
				}

				// check if shim container has any other children, if - not, remove it as well
				var shimContainer = target.getRuntime().getShimContainer();
				if (!shimContainer.children.length) {
					shimContainer.parentNode.removeChild(shimContainer);
				}

				shimContainer = _iframe = null;
				cb();
			}, 1);
		}

		Basic.extend(this, {
			send: function(meta, data) {
				var target = this, I = target.getRuntime(), uid, form, input, blob;

				_status = _response = null;

				function createIframe() {
					var container = I.getShimContainer() || document.body
					, temp = document.createElement('div')
					;

					// IE 6 won't be able to set the name using setAttribute or iframe.name
					temp.innerHTML = '<iframe id="' + uid + '_iframe" name="' + uid + '_iframe" src="javascript:&quot;&quot;" style="display:none"></iframe>';
					_iframe = temp.firstChild;
					container.appendChild(_iframe);

					/* _iframe.onreadystatechange = function() {
						console.info(_iframe.readyState);
					};*/

					Events.addEvent(_iframe, 'load', function() { // _iframe.onload doesn't work in IE lte 8
						var el;

						try {
							el = _iframe.contentWindow.document || _iframe.contentDocument || window.frames[_iframe.id].document;

							// try to detect some standard error pages
							if (/^4(0[0-9]|1[0-7]|2[2346])\s/.test(el.title)) { // test if title starts with 4xx HTTP error
								_status = el.title.replace(/^(\d+).*$/, '$1');
							} else {
								_status = 200;
								// get result
								_response = Basic.trim(el.body.innerHTML);

								// we need to fire these at least once
								target.trigger({
									type: 'progress',
									loaded: _response.length,
									total: _response.length
								});

								if (blob) { // if we were uploading a file
									target.trigger({
										type: 'uploadprogress',
										loaded: blob.size || 1025,
										total: blob.size || 1025
									});
								}
							}
						} catch (ex) {
							if (Url.hasSameOrigin(meta.url)) {
								// if response is sent with error code, iframe in IE gets redirected to res://ieframe.dll/http_x.htm
								// which obviously results to cross domain error (wtf?)
								_status = 404;
							} else {
								cleanup.call(target, function() {
									target.trigger('error');
								});
								return;
							}
						}	
					
						cleanup.call(target, function() {
							target.trigger('load');
						});
					}, target.uid);
				} // end createIframe

				// prepare data to be sent and convert if required
				if (data instanceof FormData && data.hasBlob()) {
					blob = data.getBlob();
					uid = blob.uid;
					input = Dom.get(uid);
					form = Dom.get(uid + '_form');
					if (!form) {
						throw new x.DOMException(x.DOMException.NOT_FOUND_ERR);
					}
				} else {
					uid = Basic.guid('uid_');

					form = document.createElement('form');
					form.setAttribute('id', uid + '_form');
					form.setAttribute('method', meta.method);
					form.setAttribute('enctype', 'multipart/form-data');
					form.setAttribute('encoding', 'multipart/form-data');

					I.getShimContainer().appendChild(form);
				}

				// set upload target
				form.setAttribute('target', uid + '_iframe');

				if (data instanceof FormData) {
					data.each(function(value, name) {
						if (value instanceof Blob) {
							if (input) {
								input.setAttribute('name', name);
							}
						} else {
							var hidden = document.createElement('input');

							Basic.extend(hidden, {
								type : 'hidden',
								name : name,
								value : value
							});

							// make sure that input[type="file"], if it's there, comes last
							if (input) {
								form.insertBefore(hidden, input);
							} else {
								form.appendChild(hidden);
							}
						}
					});
				}

				// set destination url
				form.setAttribute("action", meta.url);

				createIframe();
				form.submit();
				target.trigger('loadstart');
			},

			getStatus: function() {
				return _status;
			},

			getResponse: function(responseType) {
				if ('json' === responseType) {
					// strip off <pre>..</pre> tags that might be enclosing the response
					if (Basic.typeOf(_response) === 'string' && !!window.JSON) {
						try {
							return JSON.parse(_response.replace(/^\s*<pre[^>]*>/, '').replace(/<\/pre>\s*$/, ''));
						} catch (ex) {
							return null;
						}
					} 
				} else if ('document' === responseType) {

				}
				return _response;
			},

			abort: function() {
				var target = this;

				if (_iframe && _iframe.contentWindow) {
					if (_iframe.contentWindow.stop) { // FireFox/Safari/Chrome
						_iframe.contentWindow.stop();
					} else if (_iframe.contentWindow.document.execCommand) { // IE
						_iframe.contentWindow.document.execCommand('Stop');
					} else {
						_iframe.src = "about:blank";
					}
				}

				cleanup.call(this, function() {
					// target.dispatchEvent('readystatechange');
					target.dispatchEvent('abort');
				});
			}
		});
	}

	return (extensions.XMLHttpRequest = XMLHttpRequest);
});

// Included from: src/javascript/runtime/html4/image/Image.js

/**
 * Image.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

/**
@class moxie/runtime/html4/image/Image
@private
*/
define("moxie/runtime/html4/image/Image", [
	"moxie/runtime/html4/Runtime",
	"moxie/runtime/html5/image/Image"
], function(extensions, Image) {
	return (extensions.Image = Image);
});

expose(["moxie/core/utils/Basic","moxie/core/utils/Env","moxie/core/I18n","moxie/core/utils/Mime","moxie/core/utils/Dom","moxie/core/Exceptions","moxie/core/EventTarget","moxie/runtime/Runtime","moxie/runtime/RuntimeClient","moxie/file/FileInput","moxie/core/utils/Encode","moxie/file/Blob","moxie/file/File","moxie/file/FileDrop","moxie/file/FileReader","moxie/core/utils/Url","moxie/runtime/RuntimeTarget","moxie/file/FileReaderSync","moxie/xhr/FormData","moxie/xhr/XMLHttpRequest","moxie/runtime/Transporter","moxie/image/Image","moxie/core/utils/Events"]);
})(this);
/**
 * o.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

/*global moxie:true */

/**
Globally exposed namespace with the most frequently used public classes and handy methods.

@class o
@static
@private
*/
(function(exports) {
	"use strict";

	var o = {}, inArray = exports.moxie.core.utils.Basic.inArray;

	// directly add some public classes
	// (we do it dynamically here, since for custom builds we cannot know beforehand what modules were included)
	(function addAlias(ns) {
		var name, itemType;
		for (name in ns) {
			itemType = typeof(ns[name]);
			if (itemType === 'object' && !~inArray(name, ['Exceptions', 'Env', 'Mime'])) {
				addAlias(ns[name]);
			} else if (itemType === 'function') {
				o[name] = ns[name];
			}
		}
	})(exports.moxie);

	// add some manually
	o.Env = exports.moxie.core.utils.Env;
	o.Mime = exports.moxie.core.utils.Mime;
	o.Exceptions = exports.moxie.core.Exceptions;

	// expose globally
	exports.mOxie = o;
	if (!exports.o) {
		exports.o = o;
	}
	return o;
})(this);
                                                                                                                          plupload/moxie.min.js                                                                               0000644                 00000252542 15212564044 0010642 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       var MXI_DEBUG=!1;!function(o,x){"use strict";var s={};function n(e,t){for(var i,n=[],r=0;r<e.length;++r){if(!(i=s[e[r]]||function(e){for(var t=o,i=e.split(/[.\/]/),n=0;n<i.length;++n){if(!t[i[n]])return;t=t[i[n]]}return t}(e[r])))throw"module definition dependecy not found: "+e[r];n.push(i)}t.apply(null,n)}function e(e,t,i){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(t===x)throw"invalid module definition, dependencies must be specified";if(i===x)throw"invalid module definition, definition function must be specified";n(t,function(){s[e]=i.apply(null,arguments)})}e("moxie/core/utils/Basic",[],function(){function n(i){return s(arguments,function(e,t){0<t&&s(e,function(e,t){void 0!==e&&(o(i[t])===o(e)&&~r(o(e),["array","object"])?n(i[t],e):i[t]=e)})}),i}function s(e,t){var i,n,r;if(e)if("number"===o(e.length)){for(r=0,i=e.length;r<i;r++)if(!1===t(e[r],r))return}else if("object"===o(e))for(n in e)if(e.hasOwnProperty(n)&&!1===t(e[n],n))return}function r(e,t){if(t){if(Array.prototype.indexOf)return Array.prototype.indexOf.call(t,e);for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i}return-1}var o=function(e){return void 0===e?"undefined":null===e?"null":e.nodeType?"node":{}.toString.call(e).match(/\s([a-z|A-Z]+)/)[1].toLowerCase()};a=0;var a;return{guid:function(e){for(var t=(new Date).getTime().toString(32),i=0;i<5;i++)t+=Math.floor(65535*Math.random()).toString(32);return(e||"o_")+t+(a++).toString(32)},typeOf:o,extend:n,each:s,isEmptyObj:function(e){if(e&&"object"===o(e))for(var t in e)return!1;return!0},inSeries:function(e,n){var r=e.length;"function"!==o(n)&&(n=function(){}),e&&e.length||n(),function t(i){"function"===o(e[i])&&e[i](function(e){++i<r&&!e?t(i):n(e)})}(0)},inParallel:function(e,i){var n=0,r=e.length,o=new Array(r);s(e,function(e,t){e(function(e){if(e)return i(e);e=[].slice.call(arguments);e.shift(),o[t]=e,++n===r&&(o.unshift(null),i.apply(this,o))})})},inArray:r,arrayDiff:function(e,t){var i,n=[];for(i in"array"!==o(e)&&(e=[e]),"array"!==o(t)&&(t=[t]),e)-1===r(e[i],t)&&n.push(e[i]);return!!n.length&&n},arrayIntersect:function(e,t){var i=[];return s(e,function(e){-1!==r(e,t)&&i.push(e)}),i.length?i:null},toArray:function(e){for(var t=[],i=0;i<e.length;i++)t[i]=e[i];return t},trim:function(e){return e&&(String.prototype.trim?String.prototype.trim.call(e):e.toString().replace(/^\s*/,"").replace(/\s*$/,""))},sprintf:function(e){var t=[].slice.call(arguments,1);return e.replace(/%[a-z]/g,function(){var e=t.shift();return"undefined"!==o(e)?e:""})},parseSizeStr:function(e){var t,i;return"string"!=typeof e?e:(t={t:1099511627776,g:1073741824,m:1048576,k:1024},i=(e=/^([0-9\.]+)([tmgk]?)$/.exec(e.toLowerCase().replace(/[^0-9\.tmkg]/g,"")))[2],e=+e[1],t.hasOwnProperty(i)&&(e*=t[i]),Math.floor(e))}}}),e("moxie/core/utils/Env",["moxie/core/utils/Basic"],function(n){m="function",h="object",r=function(e,t){return-1!==t.toLowerCase().indexOf(e.toLowerCase())},o={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[a="name",c="version"],[/\s(opr)\/([\w\.]+)/i],[[a,"Opera"],c],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]+)*/i,/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]+)*/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi)\/([\w\.-]+)/i],[a,c],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[a,"IE"],c],[/(edge)\/((\d+)?[\w\.]+)/i],[a,c],[/(yabrowser)\/([\w\.]+)/i],[[a,"Yandex"],c],[/(comodo_dragon)\/([\w\.]+)/i],[[a,/_/g," "],c],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i,/(uc\s?browser|qqbrowser)[\/\s]?([\w\.]+)/i],[a,c],[/(dolfin)\/([\w\.]+)/i],[[a,"Dolphin"],c],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[a,"Chrome"],c],[/XiaoMi\/MiuiBrowser\/([\w\.]+)/i],[c,[a,"MIUI Browser"]],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)/i],[c,[a,"Android Browser"]],[/FBAV\/([\w\.]+);/i],[c,[a,"Facebook"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[c,[a,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[c,a],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[a,[c,(i={rgx:function(){for(var e,t,i,n,r,o,s,a=0,u=arguments;a<u.length;a+=2){var c=u[a],l=u[a+1];if(void 0===e)for(n in e={},l)typeof(r=l[n])==h?e[r[0]]=d:e[r]=d;for(t=i=0;t<c.length;t++)if(o=c[t].exec(this.getUA())){for(n=0;n<l.length;n++)s=o[++i],typeof(r=l[n])==h&&0<r.length?2==r.length?typeof r[1]==m?e[r[0]]=r[1].call(this,s):e[r[0]]=r[1]:3==r.length?typeof r[1]!=m||r[1].exec&&r[1].test?e[r[0]]=s?s.replace(r[1],r[2]):d:e[r[0]]=s?r[1].call(this,s,r[2]):d:4==r.length&&(e[r[0]]=s?r[3].call(this,s.replace(r[1],r[2])):d):e[r]=s||d;break}if(o)break}return e},str:function(e,t){for(var i in t)if(typeof t[i]==h&&0<t[i].length){for(var n=0;n<t[i].length;n++)if(r(t[i][n],e))return"?"===i?d:i}else if(r(t[i],e))return"?"===i?d:i;return e}}).str,(e={browser:{oldsafari:{major:{1:["/8","/1","/3"],2:"/4","?":"/"},version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",RT:"ARM"}}}}).browser.oldsafari.version]],[/(konqueror)\/([\w\.]+)/i,/(webkit|khtml)\/([\w\.]+)/i],[a,c],[/(navigator|netscape)\/([\w\.-]+)/i],[[a,"Netscape"],c],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\/([\w\.-]+)/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]+)*/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[a,c]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[c,[a,"EdgeHTML"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[a,c],[/rv\:([\w\.]+).*(gecko)/i],[c,a]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[a,c],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*|windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[a,[c,i.str,e.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[a,"Windows"],[c,i.str,e.os.windows.version]],[/\((bb)(10);/i],[[a,"BlackBerry"],c],[/(blackberry)\w*\/?([\w\.]+)*/i,/(tizen)[\/\s]([\w\.]+)/i,/(android|webos|palm\os|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]+)*/i,/linux;.+(sailfish);/i],[a,c],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]+)*/i],[[a,"Symbian"],c],[/\((series40);/i],[a],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[a,"Firefox OS"],c],[/(nintendo|playstation)\s([wids3portablevu]+)/i,/(mint)[\/\s\(]?(\w+)*/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?([\w\.-]+)*/i,/(hurd|linux)\s?([\w\.]+)*/i,/(gnu)\s?([\w\.]+)*/i],[a,c],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[a,"Chromium OS"],c],[/(sunos)\s?([\w\.]+\d)*/i],[[a,"Solaris"],c],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i],[a,c],[/(ip[honead]+)(?:.*os\s*([\w]+)*\slike\smac|;\sopera)/i],[[a,"iOS"],[c,/_/g,"."]],[/(mac\sos\sx)\s?([\w\s\.]+\w)*/i,/(macintosh|mac(?=_powerpc)\s)/i],[[a,"Mac OS"],[c,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]+)*/i,/(haiku)\s(\w+)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i,/(unix)\s?([\w\.]+)*/i],[a,c]]};var d,m,h,r,i,o,e=function(e){var t=e||(window&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:"");this.getBrowser=function(){return i.rgx.apply(this,o.browser)},this.getEngine=function(){return i.rgx.apply(this,o.engine)},this.getOS=function(){return i.rgx.apply(this,o.os)},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS()}},this.getUA=function(){return t},this.setUA=function(e){return t=e,this},this.setUA(t)};function t(e){var t=[].slice.call(arguments);return t.shift(),"function"===n.typeOf(u[e])?u[e].apply(this,t):!!u[e]}u={define_property:!1,create_canvas:!(!(a=document.createElement("canvas")).getContext||!a.getContext("2d")),return_response_type:function(e){try{if(-1!==n.inArray(e,["","text","document"]))return!0;if(window.XMLHttpRequest){var t=new XMLHttpRequest;if(t.open("get","/"),"responseType"in t)return t.responseType=e,t.responseType===e}}catch(e){}return!1},use_data_uri:((s=new Image).onload=function(){u.use_data_uri=1===s.width&&1===s.height},setTimeout(function(){s.src="data:image/gif;base64,R0lGODlhAQABAIAAAP8AAAAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw=="},1),!1),use_data_uri_over32kb:function(){return u.use_data_uri&&("IE"!==l.browser||9<=l.version)},use_data_uri_of:function(e){return u.use_data_uri&&e<33e3||u.use_data_uri_over32kb()},use_fileinput:function(){var e;return!navigator.userAgent.match(/(Android (1.0|1.1|1.5|1.6|2.0|2.1))|(Windows Phone (OS 7|8.0))|(XBLWP)|(ZuneWP)|(w(eb)?OSBrowser)|(webOS)|(Kindle\/(1.0|2.0|2.5|3.0))/)&&((e=document.createElement("input")).setAttribute("type","file"),!e.disabled)}};var s,a,u,c=(new e).getResult(),l={can:t,uaParser:e,browser:c.browser.name,version:c.browser.version,os:c.os.name,osVersion:c.os.version,verComp:function(e,t,i){function n(e){return(e=(e=(""+e).replace(/[_\-+]/g,".")).replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,".")).length?e.split("."):[-8]}function r(e){return e?isNaN(e)?u[e]||-7:parseInt(e,10):0}var o,s=0,a=0,u={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1};for(e=n(e),t=n(t),o=Math.max(e.length,t.length),s=0;s<o;s++)if(e[s]!=t[s]){if(e[s]=r(e[s]),t[s]=r(t[s]),e[s]<t[s]){a=-1;break}if(e[s]>t[s]){a=1;break}}if(!i)return a;switch(i){case">":case"gt":return 0<a;case">=":case"ge":return 0<=a;case"<=":case"le":return a<=0;case"==":case"=":case"eq":return 0===a;case"<>":case"!=":case"ne":return 0!==a;case"":case"<":case"lt":return a<0;default:return null}},global_event_dispatcher:"moxie.core.EventTarget.instance.dispatchEvent"};return l.OS=l.os,MXI_DEBUG&&(l.debug={runtime:!0,events:!1},l.log=function(){var e,t,i=arguments[0];"string"===n.typeOf(i)&&(i=n.sprintf.apply(this,arguments)),window&&window.console&&window.console.log?window.console.log(i):document&&((e=document.getElementById("moxie-console"))||((e=document.createElement("pre")).id="moxie-console",document.body.appendChild(e)),-1!==n.inArray(n.typeOf(i),["object","array"])?(t=i,e.appendChild(document.createTextNode(t+"\n"))):e.appendChild(document.createTextNode(i+"\n")))}),l}),e("moxie/core/I18n",["moxie/core/utils/Basic"],function(i){var t={};return{addI18n:function(e){return i.extend(t,e)},translate:function(e){return t[e]||e},_:function(e){return this.translate(e)},sprintf:function(e){var t=[].slice.call(arguments,1);return e.replace(/%[a-z]/g,function(){var e=t.shift();return"undefined"!==i.typeOf(e)?e:""})}}}),e("moxie/core/utils/Mime",["moxie/core/utils/Basic","moxie/core/I18n"],function(a,n){var e={mimes:{},extensions:{},addMimeType:function(e){for(var t,i,n=e.split(/,/),r=0;r<n.length;r+=2){for(i=n[r+1].split(/ /),t=0;t<i.length;t++)this.mimes[i[t]]=n[r];this.extensions[n[r]]=i}},extList2mimes:function(e,t){for(var i,n,r,o=[],s=0;s<e.length;s++)for(i=e[s].extensions.split(/\s*,\s*/),n=0;n<i.length;n++){if("*"===i[n])return[];if((r=this.mimes[i[n]])&&-1===a.inArray(r,o)&&o.push(r),t&&/^\w+$/.test(i[n]))o.push("."+i[n]);else if(!r)return[]}return o},mimes2exts:function(e){var n=this,r=[];return a.each(e,function(e){if("*"===e)return!(r=[]);var i=e.match(/^(\w+)\/(\*|\w+)$/);i&&("*"===i[2]?a.each(n.extensions,function(e,t){new RegExp("^"+i[1]+"/").test(t)&&[].push.apply(r,n.extensions[t])}):n.extensions[e]&&[].push.apply(r,n.extensions[e]))}),r},mimes2extList:function(e){var t=[],i=[];return"string"===a.typeOf(e)&&(e=a.trim(e).split(/\s*,\s*/)),i=this.mimes2exts(e),t.push({title:n.translate("Files"),extensions:i.length?i.join(","):"*"}),t.mimes=e,t},getFileExtension:function(e){e=e&&e.match(/\.([^.]+)$/);return e?e[1].toLowerCase():""},getFileMime:function(e){return this.mimes[this.getFileExtension(e)]||""}};return e.addMimeType("application/msword,doc dot,application/pdf,pdf,application/pgp-signature,pgp,application/postscript,ps ai eps,application/rtf,rtf,application/vnd.ms-excel,xls xlb,application/vnd.ms-powerpoint,ppt pps pot,application/zip,zip,application/x-shockwave-flash,swf swfl,application/vnd.openxmlformats-officedocument.wordprocessingml.document,docx,application/vnd.openxmlformats-officedocument.wordprocessingml.template,dotx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,xlsx,application/vnd.openxmlformats-officedocument.presentationml.presentation,pptx,application/vnd.openxmlformats-officedocument.presentationml.template,potx,application/vnd.openxmlformats-officedocument.presentationml.slideshow,ppsx,application/x-javascript,js,application/json,json,audio/mpeg,mp3 mpga mpega mp2,audio/x-wav,wav,audio/x-m4a,m4a,audio/ogg,oga ogg,audio/aiff,aiff aif,audio/flac,flac,audio/aac,aac,audio/ac3,ac3,audio/x-ms-wma,wma,image/bmp,bmp,image/gif,gif,image/jpeg,jpg jpeg jpe,image/photoshop,psd,image/png,png,image/svg+xml,svg svgz,image/tiff,tiff tif,text/plain,asc txt text diff log,text/html,htm html xhtml,text/css,css,text/csv,csv,text/rtf,rtf,video/mpeg,mpeg mpg mpe m2v,video/quicktime,qt mov,video/mp4,mp4,video/x-m4v,m4v,video/x-flv,flv,video/x-ms-wmv,wmv,video/avi,avi,video/webm,webm,video/3gpp,3gpp 3gp,video/3gpp2,3g2,video/vnd.rn-realvideo,rv,video/ogg,ogv,video/x-matroska,mkv,application/vnd.oasis.opendocument.formula-template,otf,application/octet-stream,exe"),e}),e("moxie/core/utils/Dom",["moxie/core/utils/Env"],function(c){function i(e,t){return!!e.className&&new RegExp("(^|\\s+)"+t+"(\\s+|$)").test(e.className)}return{get:function(e){return"string"!=typeof e?e:document.getElementById(e)},hasClass:i,addClass:function(e,t){i(e,t)||(e.className=e.className?e.className.replace(/\s+$/,"")+" "+t:t)},removeClass:function(e,t){e.className&&(t=new RegExp("(^|\\s+)"+t+"(\\s+|$)"),e.className=e.className.replace(t,function(e,t,i){return" "===t&&" "===i?" ":""}))},getStyle:function(e,t){return e.currentStyle?e.currentStyle[t]:window.getComputedStyle?window.getComputedStyle(e,null)[t]:void 0},getPos:function(e,t){var i,n,r,o=0,s=0,a=document;function u(e){var t,i=0,n=0;return e&&(e=e.getBoundingClientRect(),t="CSS1Compat"===a.compatMode?a.documentElement:a.body,i=e.left+t.scrollLeft,n=e.top+t.scrollTop),{x:i,y:n}}if(t=t||a.body,e&&e.getBoundingClientRect&&"IE"===c.browser&&(!a.documentMode||a.documentMode<8))return n=u(e),r=u(t),{x:n.x-r.x,y:n.y-r.y};for(i=e;i&&i!=t&&i.nodeType;)o+=i.offsetLeft||0,s+=i.offsetTop||0,i=i.offsetParent;for(i=e.parentNode;i&&i!=t&&i.nodeType;)o-=i.scrollLeft||0,s-=i.scrollTop||0,i=i.parentNode;return{x:o,y:s}},getSize:function(e){return{w:e.offsetWidth||e.clientWidth,h:e.offsetHeight||e.clientHeight}}}}),e("moxie/core/Exceptions",["moxie/core/utils/Basic"],function(e){function t(e,t){for(var i in e)if(e[i]===t)return i;return null}return{RuntimeError:(a={NOT_INIT_ERR:1,NOT_SUPPORTED_ERR:9,JS_ERR:4},e.extend(d,a),d.prototype=Error.prototype,d),OperationNotAllowedException:(e.extend(l,{NOT_ALLOWED_ERR:1}),l.prototype=Error.prototype,l),ImageError:(s={WRONG_FORMAT:1,MAX_RESOLUTION_ERR:2,INVALID_META_ERR:3},e.extend(c,s),c.prototype=Error.prototype,c),FileException:(o={NOT_FOUND_ERR:1,SECURITY_ERR:2,ABORT_ERR:3,NOT_READABLE_ERR:4,ENCODING_ERR:5,NO_MODIFICATION_ALLOWED_ERR:6,INVALID_STATE_ERR:7,SYNTAX_ERR:8},e.extend(u,o),u.prototype=Error.prototype,u),DOMException:(r={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25},e.extend(n,r),n.prototype=Error.prototype,n),EventException:(e.extend(i,{UNSPECIFIED_EVENT_TYPE_ERR:0}),i.prototype=Error.prototype,i)};function i(e){this.code=e,this.name="EventException"}function n(e){this.code=e,this.name=t(r,e),this.message=this.name+": DOMException "+this.code}var r,o,s,a;function u(e){this.code=e,this.name=t(o,e),this.message=this.name+": FileException "+this.code}function c(e){this.code=e,this.name=t(s,e),this.message=this.name+": ImageError "+this.code}function l(e){this.code=e,this.name="OperationNotAllowedException"}function d(e){this.code=e,this.name=t(a,e),this.message=this.name+": RuntimeError "+this.code}}),e("moxie/core/EventTarget",["moxie/core/utils/Env","moxie/core/Exceptions","moxie/core/utils/Basic"],function(c,l,d){function e(){var u={};d.extend(this,{uid:null,init:function(){this.uid||(this.uid=d.guid("uid_"))},addEventListener:function(e,t,i,n){var r,o=this;this.hasOwnProperty("uid")||(this.uid=d.guid("uid_")),e=d.trim(e),/\s/.test(e)?d.each(e.split(/\s+/),function(e){o.addEventListener(e,t,i,n)}):(e=e.toLowerCase(),i=parseInt(i,10)||0,(r=u[this.uid]&&u[this.uid][e]||[]).push({fn:t,priority:i,scope:n||this}),u[this.uid]||(u[this.uid]={}),u[this.uid][e]=r)},hasEventListener:function(e){e=e?u[this.uid]&&u[this.uid][e]:u[this.uid];return e||!1},removeEventListener:function(e,t){e=e.toLowerCase();var i,n=u[this.uid]&&u[this.uid][e];if(n){if(t){for(i=n.length-1;0<=i;i--)if(n[i].fn===t){n.splice(i,1);break}}else n=[];n.length||(delete u[this.uid][e],d.isEmptyObj(u[this.uid])&&delete u[this.uid])}},removeAllEventListeners:function(){u[this.uid]&&delete u[this.uid]},dispatchEvent:function(e){var t,i,n,r,o,s={},a=!0;if("string"!==d.typeOf(e)){if(r=e,"string"!==d.typeOf(r.type))throw new l.EventException(l.EventException.UNSPECIFIED_EVENT_TYPE_ERR);e=r.type,void 0!==r.total&&void 0!==r.loaded&&(s.total=r.total,s.loaded=r.loaded),s.async=r.async||!1}return-1!==e.indexOf("::")?(r=e.split("::"),t=r[0],e=r[1]):t=this.uid,e=e.toLowerCase(),(i=u[t]&&u[t][e])&&(i.sort(function(e,t){return t.priority-e.priority}),(n=[].slice.call(arguments)).shift(),s.type=e,n.unshift(s),MXI_DEBUG&&c.debug.events&&c.log("Event '%s' fired on %u",s.type,t),o=[],d.each(i,function(t){n[0].target=t.scope,o.push(s.async?function(e){setTimeout(function(){e(!1===t.fn.apply(t.scope,n))},1)}:function(e){e(!1===t.fn.apply(t.scope,n))})}),o.length)&&d.inSeries(o,function(e){a=!e}),a},bind:function(){this.addEventListener.apply(this,arguments)},unbind:function(){this.removeEventListener.apply(this,arguments)},unbindAll:function(){this.removeAllEventListeners.apply(this,arguments)},trigger:function(){return this.dispatchEvent.apply(this,arguments)},handleEventProps:function(e){var t=this;this.bind(e.join(" "),function(e){e="on"+e.type.toLowerCase();"function"===d.typeOf(this[e])&&this[e].apply(this,arguments)}),d.each(e,function(e){e="on"+e.toLowerCase(e),"undefined"===d.typeOf(t[e])&&(t[e]=null)})}})}return e.instance=new e,e}),e("moxie/runtime/Runtime",["moxie/core/utils/Env","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/EventTarget"],function(c,l,d,i){var n={},m={};function h(e,t,r,i,n){var o,s,a=this,u=l.guid(t+"_"),n=n||"browser";e=e||{},m[u]=this,r=l.extend({access_binary:!1,access_image_binary:!1,display_media:!1,do_cors:!1,drag_and_drop:!1,filter_by_extension:!0,resize_image:!1,report_upload_progress:!1,return_response_headers:!1,return_response_type:!1,return_status_code:!0,send_custom_headers:!1,select_file:!1,select_folder:!1,select_multiple:!0,send_binary_string:!1,send_browser_cookies:!0,send_multipart:!0,slice_blob:!1,stream_upload:!1,summon_file_dialog:!1,upload_filesize:!0,use_http_method:!0},r),e.preferred_caps&&(n=h.getMode(i,e.preferred_caps,n)),MXI_DEBUG&&c.debug.runtime&&c.log("\tdefault mode: %s",n),s={},o={exec:function(e,t,i,n){if(o[t]&&(s[e]||(s[e]={context:this,instance:new o[t]}),s[e].instance[i]))return s[e].instance[i].apply(this,n)},removeInstance:function(e){delete s[e]},removeAllInstances:function(){var i=this;l.each(s,function(e,t){"function"===l.typeOf(e.instance.destroy)&&e.instance.destroy.call(e.context),i.removeInstance(t)})}},l.extend(this,{initialized:!1,uid:u,type:t,mode:h.getMode(i,e.required_caps,n),shimid:u+"_container",clients:0,options:e,can:function(e,t){var i,n=arguments[2]||r;if("string"===l.typeOf(e)&&"undefined"===l.typeOf(t)&&(e=h.parseCaps(e)),"object"!==l.typeOf(e))return"function"===l.typeOf(n[e])?n[e].call(this,t):t===n[e];for(i in e)if(!this.can(i,e[i],n))return!1;return!0},getShimContainer:function(){var e,t=d.get(this.shimid);return t||(e=this.options.container?d.get(this.options.container):document.body,(t=document.createElement("div")).id=this.shimid,t.className="moxie-shim moxie-shim-"+this.type,l.extend(t.style,{position:"absolute",top:"0px",left:"0px",width:"1px",height:"1px",overflow:"hidden"}),e.appendChild(t),e=null),t},getShim:function(){return o},shimExec:function(e,t){var i=[].slice.call(arguments,2);return a.getShim().exec.call(this,this.uid,e,t,i)},exec:function(e,t){var i=[].slice.call(arguments,2);return a[e]&&a[e][t]?a[e][t].apply(this,i):a.shimExec.apply(this,arguments)},destroy:function(){var e;a&&((e=d.get(this.shimid))&&e.parentNode.removeChild(e),o&&o.removeAllInstances(),this.unbindAll(),delete m[this.uid],this.uid=null,a=o=null)}}),this.mode&&e.required_caps&&!this.can(e.required_caps)&&(this.mode=!1)}return h.order="html5,html4",h.getRuntime=function(e){return m[e]||!1},h.addConstructor=function(e,t){t.prototype=i.instance,n[e]=t},h.getConstructor=function(e){return n[e]||null},h.getInfo=function(e){var t=h.getRuntime(e);return t?{uid:t.uid,type:t.type,mode:t.mode,can:function(){return t.can.apply(t,arguments)}}:null},h.parseCaps=function(e){var t={};return"string"!==l.typeOf(e)?e||{}:(l.each(e.split(","),function(e){t[e]=!0}),t)},h.can=function(e,t){var e=h.getConstructor(e);return!!e&&(t=(e=new e({required_caps:t})).mode,e.destroy(),!!t)},h.thatCan=function(e,t){var i,n=(t||h.order).split(/\s*,\s*/);for(i in n)if(h.can(n[i],e))return n[i];return null},h.getMode=function(n,e,t){var r=null;if("undefined"===l.typeOf(t)&&(t="browser"),e&&!l.isEmptyObj(n)){if(l.each(e,function(e,t){if(n.hasOwnProperty(t)){var i=n[t](e);if("string"==typeof i&&(i=[i]),r){if(!(r=l.arrayIntersect(r,i)))return MXI_DEBUG&&c.debug.runtime&&c.log("\t\t%c: %v (conflicting mode requested: %s)",t,e,i),r=!1}else r=i}MXI_DEBUG&&c.debug.runtime&&c.log("\t\t%c: %v (compatible modes: %s)",t,e,r)}),r)return-1!==l.inArray(t,r)?t:r[0];if(!1===r)return!1}return t},h.capTrue=function(){return!0},h.capFalse=function(){return!1},h.capTest=function(e){return function(){return!!e}},h}),e("moxie/runtime/RuntimeClient",["moxie/core/utils/Env","moxie/core/Exceptions","moxie/core/utils/Basic","moxie/runtime/Runtime"],function(a,u,t,c){return function(){var s;t.extend(this,{connectRuntime:function(r){var e,o=this;if("string"===t.typeOf(r)?e=r:"string"===t.typeOf(r.ruid)&&(e=r.ruid),e){if(s=c.getRuntime(e))return s.clients++,s;throw new u.RuntimeError(u.RuntimeError.NOT_INIT_ERR)}!function e(t){var i,n;t.length?(i=t.shift().toLowerCase(),(n=c.getConstructor(i))?(MXI_DEBUG&&a.debug.runtime&&(a.log("Trying runtime: %s",i),a.log(r)),(s=new n(r)).bind("Init",function(){s.initialized=!0,MXI_DEBUG&&a.debug.runtime&&a.log("Runtime '%s' initialized",s.type),setTimeout(function(){s.clients++,o.trigger("RuntimeInit",s)},1)}),s.bind("Error",function(){MXI_DEBUG&&a.debug.runtime&&a.log("Runtime '%s' failed to initialize",s.type),s.destroy(),e(t)}),MXI_DEBUG&&a.debug.runtime&&a.log("\tselected mode: %s",s.mode),s.mode?s.init():s.trigger("Error")):e(t)):(o.trigger("RuntimeError",new u.RuntimeError(u.RuntimeError.NOT_INIT_ERR)),s=null)}((r.runtime_order||c.order).split(/\s*,\s*/))},disconnectRuntime:function(){s&&--s.clients<=0&&s.destroy(),s=null},getRuntime:function(){return s&&s.uid?s:s=null},exec:function(){return s?s.exec.apply(this,arguments):null}})}}),e("moxie/file/FileInput",["moxie/core/utils/Basic","moxie/core/utils/Env","moxie/core/utils/Mime","moxie/core/utils/Dom","moxie/core/Exceptions","moxie/core/EventTarget","moxie/core/I18n","moxie/runtime/Runtime","moxie/runtime/RuntimeClient"],function(o,i,n,s,a,e,u,c,l){var d=["ready","change","cancel","mouseenter","mouseleave","mousedown","mouseup"];function t(r){MXI_DEBUG&&i.log("Instantiating FileInput...");var e,t=this;if(-1!==o.inArray(o.typeOf(r),["string","node"])&&(r={browse_button:r}),!(e=s.get(r.browse_button)))throw new a.DOMException(a.DOMException.NOT_FOUND_ERR);e={accept:[{title:u.translate("All Files"),extensions:"*"}],name:"file",multiple:!1,required_caps:!1,container:e.parentNode||document.body},"string"==typeof(r=o.extend({},e,r)).required_caps&&(r.required_caps=c.parseCaps(r.required_caps)),"string"==typeof r.accept&&(r.accept=n.mimes2extList(r.accept)),e=(e=s.get(r.container))||document.body,"static"===s.getStyle(e,"position")&&(e.style.position="relative"),e=null,l.call(t),o.extend(t,{uid:o.guid("uid_"),ruid:null,shimid:null,files:null,init:function(){t.bind("RuntimeInit",function(e,n){t.ruid=n.uid,t.shimid=n.shimid,t.bind("Ready",function(){t.trigger("Refresh")},999),t.bind("Refresh",function(){var e,t=s.get(r.browse_button),i=s.get(n.shimid);t&&(e=s.getPos(t,s.get(r.container)),t=s.getSize(t),i)&&o.extend(i.style,{top:e.y+"px",left:e.x+"px",width:t.w+"px",height:t.h+"px"})}),n.exec.call(t,"FileInput","init",r)}),t.connectRuntime(o.extend({},r,{required_caps:{select_file:!0}}))},disable:function(e){var t=this.getRuntime();t&&t.exec.call(this,"FileInput","disable","undefined"===o.typeOf(e)||e)},refresh:function(){t.trigger("Refresh")},destroy:function(){var e=this.getRuntime();e&&(e.exec.call(this,"FileInput","destroy"),this.disconnectRuntime()),"array"===o.typeOf(this.files)&&o.each(this.files,function(e){e.destroy()}),this.files=null,this.unbindAll()}}),this.handleEventProps(d)}return t.prototype=e.instance,t}),e("moxie/core/utils/Encode",[],function(){function d(e){return unescape(encodeURIComponent(e))}function m(e){return decodeURIComponent(escape(e))}return{utf8_encode:d,utf8_decode:m,atob:function(e,t){if("function"==typeof window.atob)return t?m(window.atob(e)):window.atob(e);var i,n,r,o,s,a,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c=0,l=0,d=[];if(!e)return e;for(e+="";i=(s=u.indexOf(e.charAt(c++))<<18|u.indexOf(e.charAt(c++))<<12|(r=u.indexOf(e.charAt(c++)))<<6|(o=u.indexOf(e.charAt(c++))))>>16&255,n=s>>8&255,s=255&s,d[l++]=64==r?String.fromCharCode(i):64==o?String.fromCharCode(i,n):String.fromCharCode(i,n,s),c<e.length;);return a=d.join(""),t?m(a):a},btoa:function(e,t){if(t&&(e=d(e)),"function"==typeof window.btoa)return window.btoa(e);var i,n,r,o,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,u=0,t="",c=[];if(!e)return e;for(;i=(o=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>12&63,n=o>>6&63,r=63&o,c[u++]=s.charAt(o>>18&63)+s.charAt(i)+s.charAt(n)+s.charAt(r),a<e.length;);var t=c.join(""),l=e.length%3;return(l?t.slice(0,l-3):t)+"===".slice(l||3)}}}),e("moxie/file/Blob",["moxie/core/utils/Basic","moxie/core/utils/Encode","moxie/runtime/RuntimeClient"],function(o,i,n){var s={};return function r(e,t){n.call(this),e&&this.connectRuntime(e),t?"string"===o.typeOf(t)&&(t={data:t}):t={},o.extend(this,{uid:t.uid||o.guid("uid_"),ruid:e,size:t.size||0,type:t.type||"",slice:function(e,t,i){return this.isDetached()?function(e,t,i){var n=s[this.uid];return"string"===o.typeOf(n)&&n.length?((i=new r(null,{type:i,size:t-e})).detach(n.substr(e,i.size)),i):null}.apply(this,arguments):this.getRuntime().exec.call(this,"Blob","slice",this.getSource(),e,t,i)},getSource:function(){return s[this.uid]||null},detach:function(e){var t;this.ruid&&(this.getRuntime().exec.call(this,"Blob","destroy"),this.disconnectRuntime(),this.ruid=null),"data:"==(e=e||"").substr(0,5)&&(t=e.indexOf(";base64,"),this.type=e.substring(5,t),e=i.atob(e.substring(t+8))),this.size=e.length,s[this.uid]=e},isDetached:function(){return!this.ruid&&"string"===o.typeOf(s[this.uid])},destroy:function(){this.detach(),delete s[this.uid]}}),t.data?this.detach(t.data):s[this.uid]=t}}),e("moxie/file/File",["moxie/core/utils/Basic","moxie/core/utils/Mime","moxie/file/Blob"],function(r,o,s){function e(e,t){var i,n;t=t||{},s.apply(this,arguments),this.type||(this.type=o.getFileMime(t.name)),t.name?n=(n=t.name.replace(/\\/g,"/")).substr(n.lastIndexOf("/")+1):this.type&&(i=this.type.split("/")[0],n=r.guid((""!==i?i:"file")+"_"),o.extensions[this.type])&&(n+="."+o.extensions[this.type][0]),r.extend(this,{name:n||r.guid("file_"),relativePath:"",lastModifiedDate:t.lastModifiedDate||(new Date).toLocaleString()})}return e.prototype=s.prototype,e}),e("moxie/file/FileDrop",["moxie/core/I18n","moxie/core/utils/Dom","moxie/core/Exceptions","moxie/core/utils/Basic","moxie/core/utils/Env","moxie/file/File","moxie/runtime/RuntimeClient","moxie/core/EventTarget","moxie/core/utils/Mime"],function(t,r,e,o,s,i,a,n,u){var c=["ready","dragenter","dragleave","drop","error"];function l(i){MXI_DEBUG&&s.log("Instantiating FileDrop...");var e,n=this;"string"==typeof i&&(i={drop_zone:i}),e={accept:[{title:t.translate("All Files"),extensions:"*"}],required_caps:{drag_and_drop:!0}},(i="object"==typeof i?o.extend({},e,i):e).container=r.get(i.drop_zone)||document.body,"static"===r.getStyle(i.container,"position")&&(i.container.style.position="relative"),"string"==typeof i.accept&&(i.accept=u.mimes2extList(i.accept)),a.call(n),o.extend(n,{uid:o.guid("uid_"),ruid:null,files:null,init:function(){n.bind("RuntimeInit",function(e,t){n.ruid=t.uid,t.exec.call(n,"FileDrop","init",i),n.dispatchEvent("ready")}),n.connectRuntime(i)},destroy:function(){var e=this.getRuntime();e&&(e.exec.call(this,"FileDrop","destroy"),this.disconnectRuntime()),this.files=null,this.unbindAll()}}),this.handleEventProps(c)}return l.prototype=n.instance,l}),e("moxie/file/FileReader",["moxie/core/utils/Basic","moxie/core/utils/Encode","moxie/core/Exceptions","moxie/core/EventTarget","moxie/file/Blob","moxie/runtime/RuntimeClient"],function(e,n,r,t,o,i){var s=["loadstart","progress","load","abort","error","loadend"];function a(){function t(e,t){if(this.trigger("loadstart"),this.readyState===a.LOADING)this.trigger("error",new r.DOMException(r.DOMException.INVALID_STATE_ERR)),this.trigger("loadend");else if(t instanceof o)if(this.result=null,this.readyState=a.LOADING,t.isDetached()){var i=t.getSource();switch(e){case"readAsText":case"readAsBinaryString":this.result=i;break;case"readAsDataURL":this.result="data:"+t.type+";base64,"+n.btoa(i)}this.readyState=a.DONE,this.trigger("load"),this.trigger("loadend")}else this.connectRuntime(t.ruid),this.exec("FileReader","read",e,t);else this.trigger("error",new r.DOMException(r.DOMException.NOT_FOUND_ERR)),this.trigger("loadend")}i.call(this),e.extend(this,{uid:e.guid("uid_"),readyState:a.EMPTY,result:null,error:null,readAsBinaryString:function(e){t.call(this,"readAsBinaryString",e)},readAsDataURL:function(e){t.call(this,"readAsDataURL",e)},readAsText:function(e){t.call(this,"readAsText",e)},abort:function(){this.result=null,-1===e.inArray(this.readyState,[a.EMPTY,a.DONE])&&(this.readyState===a.LOADING&&(this.readyState=a.DONE),this.exec("FileReader","abort"),this.trigger("abort"),this.trigger("loadend"))},destroy:function(){this.abort(),this.exec("FileReader","destroy"),this.disconnectRuntime(),this.unbindAll()}}),this.handleEventProps(s),this.bind("Error",function(e,t){this.readyState=a.DONE,this.error=t},999),this.bind("Load",function(e){this.readyState=a.DONE},999)}return a.EMPTY=0,a.LOADING=1,a.DONE=2,a.prototype=t.instance,a}),e("moxie/core/utils/Url",[],function(){function s(e,t){for(var i=["source","scheme","authority","userInfo","user","pass","host","port","relative","path","directory","file","query","fragment"],n=i.length,r={},o=/^(?:([^:\/?#]+):)?(?:\/\/()(?:(?:()(?:([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?))?()(?:(()(?:(?:[^?#\/]*\/)*)()(?:[^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/.exec(e||"");n--;)o[n]&&(r[i[n]]=o[n]);return r.scheme||(t&&"string"!=typeof t||(t=s(t||document.location.href)),r.scheme=t.scheme,r.host=t.host,r.port=t.port,e="",/^[^\/]/.test(r.path)&&(e=t.path,e=/\/[^\/]*\.[^\/]*$/.test(e)?e.replace(/\/[^\/]+$/,"/"):e.replace(/\/?$/,"/")),r.path=e+(r.path||"")),r.port||(r.port={http:80,https:443}[r.scheme]||80),r.port=parseInt(r.port,10),r.path||(r.path="/"),delete r.source,r}return{parseUrl:s,resolveUrl:function(e){e="object"==typeof e?e:s(e);return e.scheme+"://"+e.host+(e.port!=={http:80,https:443}[e.scheme]?":"+e.port:"")+e.path+(e.query||"")},hasSameOrigin:function(e){function t(e){return[e.scheme,e.host,e.port].join("/")}return"string"==typeof e&&(e=s(e)),t(s())===t(e)}}}),e("moxie/runtime/RuntimeTarget",["moxie/core/utils/Basic","moxie/runtime/RuntimeClient","moxie/core/EventTarget"],function(e,t,i){function n(){this.uid=e.guid("uid_"),t.call(this),this.destroy=function(){this.disconnectRuntime(),this.unbindAll()}}return n.prototype=i.instance,n}),e("moxie/file/FileReaderSync",["moxie/core/utils/Basic","moxie/runtime/RuntimeClient","moxie/core/utils/Encode"],function(e,i,a){return function(){function t(e,t){var i;if(!t.isDetached())return i=this.connectRuntime(t.ruid).exec.call(this,"FileReaderSync","read",e,t),this.disconnectRuntime(),i;var n=t.getSource();switch(e){case"readAsBinaryString":return n;case"readAsDataURL":return"data:"+t.type+";base64,"+a.btoa(n);case"readAsText":for(var r="",o=0,s=n.length;o<s;o++)r+=String.fromCharCode(n[o]);return r}}i.call(this),e.extend(this,{uid:e.guid("uid_"),readAsBinaryString:function(e){return t.call(this,"readAsBinaryString",e)},readAsDataURL:function(e){return t.call(this,"readAsDataURL",e)},readAsText:function(e){return t.call(this,"readAsText",e)}})}}),e("moxie/xhr/FormData",["moxie/core/Exceptions","moxie/core/utils/Basic","moxie/file/Blob"],function(e,s,a){return function(){var r,o=[];s.extend(this,{append:function(i,e){var n=this,t=s.typeOf(e);e instanceof a?r={name:i,value:e}:"array"===t?(i+="[]",s.each(e,function(e){n.append(i,e)})):"object"===t?s.each(e,function(e,t){n.append(i+"["+t+"]",e)}):"null"===t||"undefined"===t||"number"===t&&isNaN(e)?n.append(i,"false"):o.push({name:i,value:e.toString()})},hasBlob:function(){return!!this.getBlob()},getBlob:function(){return r&&r.value||null},getBlobName:function(){return r&&r.name||null},each:function(t){s.each(o,function(e){t(e.value,e.name)}),r&&t(r.value,r.name)},destroy:function(){r=null,o=[]}})}}),e("moxie/xhr/XMLHttpRequest",["moxie/core/utils/Basic","moxie/core/Exceptions","moxie/core/EventTarget","moxie/core/utils/Encode","moxie/core/utils/Url","moxie/runtime/Runtime","moxie/runtime/RuntimeTarget","moxie/file/Blob","moxie/file/FileReaderSync","moxie/xhr/FormData","moxie/core/utils/Env","moxie/core/utils/Mime"],function(_,b,e,A,I,T,S,r,t,O,D,N){var C={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",306:"Reserved",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",426:"Upgrade Required",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",510:"Not Extended"};function M(){this.uid=_.guid("uid_")}M.prototype=e.instance;var L=["loadstart","progress","abort","error","load","timeout","loadend"];function F(){var o,s,a,u,c,t,i=this,n={timeout:0,readyState:F.UNSENT,withCredentials:!1,status:0,statusText:"",responseType:"",responseXML:null,responseText:null,response:null},l=!0,d={},m=null,h=null,f=!1,p=!1,g=!1,x=!1,E=!1,y=!1,w={},v="";function R(e,t){if(n.hasOwnProperty(e))return 1===arguments.length?(D.can("define_property")?n:i)[e]:void(D.can("define_property")?n[e]=t:i[e]=t)}_.extend(this,n,{uid:_.guid("uid_"),upload:new M,open:function(e,t,i,n,r){if(!e||!t)throw new b.DOMException(b.DOMException.SYNTAX_ERR);if(/[\u0100-\uffff]/.test(e)||A.utf8_encode(e)!==e)throw new b.DOMException(b.DOMException.SYNTAX_ERR);if(~_.inArray(e.toUpperCase(),["CONNECT","DELETE","GET","HEAD","OPTIONS","POST","PUT","TRACE","TRACK"])&&(s=e.toUpperCase()),~_.inArray(s,["CONNECT","TRACE","TRACK"]))throw new b.DOMException(b.DOMException.SECURITY_ERR);if(t=A.utf8_encode(t),e=I.parseUrl(t),y=I.hasSameOrigin(e),o=I.resolveUrl(t),(n||r)&&!y)throw new b.DOMException(b.DOMException.INVALID_ACCESS_ERR);if(a=n||e.user,u=r||e.pass,!1===(l=i||!0)&&(R("timeout")||R("withCredentials")||""!==R("responseType")))throw new b.DOMException(b.DOMException.INVALID_ACCESS_ERR);f=!l,p=!1,d={},function(){R("responseText",""),R("responseXML",null),R("response",null),R("status",0),R("statusText",""),0}.call(this),R("readyState",F.OPENED),this.dispatchEvent("readystatechange")},setRequestHeader:function(e,t){if(R("readyState")!==F.OPENED||p)throw new b.DOMException(b.DOMException.INVALID_STATE_ERR);if(/[\u0100-\uffff]/.test(e)||A.utf8_encode(e)!==e)throw new b.DOMException(b.DOMException.SYNTAX_ERR);return e=_.trim(e).toLowerCase(),!~_.inArray(e,["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","content-transfer-encoding","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"])&&!/^(proxy\-|sec\-)/.test(e)&&(d[e]?d[e]+=", "+t:d[e]=t,!0)},getAllResponseHeaders:function(){return v||""},getResponseHeader:function(e){return e=e.toLowerCase(),!E&&!~_.inArray(e,["set-cookie","set-cookie2"])&&v&&""!==v&&(t||(t={},_.each(v.split(/\r\n/),function(e){e=e.split(/:\s+/);2===e.length&&(e[0]=_.trim(e[0]),t[e[0].toLowerCase()]={header:e[0],value:_.trim(e[1])})})),t.hasOwnProperty(e))?t[e].header+": "+t[e].value:null},overrideMimeType:function(e){var t,i;if(~_.inArray(R("readyState"),[F.LOADING,F.DONE]))throw new b.DOMException(b.DOMException.INVALID_STATE_ERR);if(e=_.trim(e.toLowerCase()),/;/.test(e)&&(t=e.match(/^([^;]+)(?:;\scharset\=)?(.*)$/))&&(e=t[1],t[2])&&(i=t[2]),!N.mimes[e])throw new b.DOMException(b.DOMException.SYNTAX_ERR);0},send:function(e,t){if(w="string"===_.typeOf(t)?{ruid:t}:t||{},this.readyState!==F.OPENED||p)throw new b.DOMException(b.DOMException.INVALID_STATE_ERR);e instanceof r?(w.ruid=e.ruid,h=e.type||"application/octet-stream"):e instanceof O?e.hasBlob()&&(t=e.getBlob(),w.ruid=t.ruid,h=t.type||"application/octet-stream"):"string"==typeof e&&(m="UTF-8",h="text/plain;charset=UTF-8",e=A.utf8_encode(e)),this.withCredentials||(this.withCredentials=w.required_caps&&w.required_caps.send_browser_cookies&&!y),g=!f&&this.upload.hasEventListener(),E=!1,x=!e,f||(p=!0),function(e){var i=this;function n(){c&&(c.destroy(),c=null),i.dispatchEvent("loadend"),i=null}function r(t){c.bind("LoadStart",function(e){R("readyState",F.LOADING),i.dispatchEvent("readystatechange"),i.dispatchEvent(e),g&&i.upload.dispatchEvent(e)}),c.bind("Progress",function(e){R("readyState")!==F.LOADING&&(R("readyState",F.LOADING),i.dispatchEvent("readystatechange")),i.dispatchEvent(e)}),c.bind("UploadProgress",function(e){g&&i.upload.dispatchEvent({type:"progress",lengthComputable:!1,total:e.total,loaded:e.loaded})}),c.bind("Load",function(e){R("readyState",F.DONE),R("status",Number(t.exec.call(c,"XMLHttpRequest","getStatus")||0)),R("statusText",C[R("status")]||""),R("response",t.exec.call(c,"XMLHttpRequest","getResponse",R("responseType"))),~_.inArray(R("responseType"),["text",""])?R("responseText",R("response")):"document"===R("responseType")&&R("responseXML",R("response")),v=t.exec.call(c,"XMLHttpRequest","getAllResponseHeaders"),i.dispatchEvent("readystatechange"),0<R("status")?(g&&i.upload.dispatchEvent(e),i.dispatchEvent(e)):(E=!0,i.dispatchEvent("error")),n()}),c.bind("Abort",function(e){i.dispatchEvent(e),n()}),c.bind("Error",function(e){E=!0,R("readyState",F.DONE),i.dispatchEvent("readystatechange"),x=!0,i.dispatchEvent(e),n()}),t.exec.call(c,"XMLHttpRequest","send",{url:o,method:s,async:l,user:a,password:u,headers:d,mimeType:h,encoding:m,responseType:i.responseType,withCredentials:i.withCredentials,options:w},e)}(new Date).getTime(),c=new S,"string"==typeof w.required_caps&&(w.required_caps=T.parseCaps(w.required_caps));w.required_caps=_.extend({},w.required_caps,{return_response_type:i.responseType}),e instanceof O&&(w.required_caps.send_multipart=!0);_.isEmptyObj(d)||(w.required_caps.send_custom_headers=!0);y||(w.required_caps.do_cors=!0);w.ruid?r(c.connectRuntime(w)):(c.bind("RuntimeInit",function(e,t){r(t)}),c.bind("RuntimeError",function(e,t){i.dispatchEvent("RuntimeError",t)}),c.connectRuntime(w))}.call(this,e)},abort:function(){if(f=!(E=!0),~_.inArray(R("readyState"),[F.UNSENT,F.OPENED,F.DONE]))R("readyState",F.UNSENT);else{if(R("readyState",F.DONE),p=!1,!c)throw new b.DOMException(b.DOMException.INVALID_STATE_ERR);c.getRuntime().exec.call(c,"XMLHttpRequest","abort",x),x=!0}},destroy:function(){c&&("function"===_.typeOf(c.destroy)&&c.destroy(),c=null),this.unbindAll(),this.upload&&(this.upload.unbindAll(),this.upload=null)}}),this.handleEventProps(L.concat(["readystatechange"])),this.upload.handleEventProps(L)}return F.UNSENT=0,F.OPENED=1,F.HEADERS_RECEIVED=2,F.LOADING=3,F.DONE=4,F.prototype=e.instance,F}),e("moxie/runtime/Transporter",["moxie/core/utils/Basic","moxie/core/utils/Encode","moxie/runtime/RuntimeClient","moxie/core/EventTarget"],function(m,t,e,i){function h(){var o,n,s,a,r,u;function c(){a=r=0,s=this.result=null}function l(e,t){var i=this;n=t,i.bind("TransportingProgress",function(e){(r=e.loaded)<a&&-1===m.inArray(i.state,[h.IDLE,h.DONE])&&d.call(i)},999),i.bind("TransportingComplete",function(){r=a,i.state=h.DONE,s=null,i.result=n.exec.call(i,"Transporter","getAsBlob",e||"")},999),i.state=h.BUSY,i.trigger("TransportingStarted"),d.call(i)}function d(){var e=a-r;e<u&&(u=e),e=t.btoa(s.substr(r,u)),n.exec.call(this,"Transporter","receive",e,a)}e.call(this),m.extend(this,{uid:m.guid("uid_"),state:h.IDLE,result:null,transport:function(e,i,t){var n,r=this;t=m.extend({chunk_size:204798},t),(o=t.chunk_size%3)&&(t.chunk_size+=3-o),u=t.chunk_size,c.call(this),a=(s=e).length,"string"===m.typeOf(t)||t.ruid?l.call(r,i,this.connectRuntime(t)):(n=function(e,t){r.unbind("RuntimeInit",n),l.call(r,i,t)},this.bind("RuntimeInit",n),this.connectRuntime(t))},abort:function(){this.state=h.IDLE,n&&(n.exec.call(this,"Transporter","clear"),this.trigger("TransportingAborted")),c.call(this)},destroy:function(){this.unbindAll(),n=null,this.disconnectRuntime(),c.call(this)}})}return h.IDLE=0,h.BUSY=1,h.DONE=2,h.prototype=i.instance,h}),e("moxie/image/Image",["moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/Exceptions","moxie/file/FileReaderSync","moxie/xhr/XMLHttpRequest","moxie/runtime/Runtime","moxie/runtime/RuntimeClient","moxie/runtime/Transporter","moxie/core/utils/Env","moxie/core/EventTarget","moxie/file/Blob","moxie/file/File","moxie/core/utils/Encode"],function(a,n,u,e,o,s,t,c,l,i,d,m,h){var f=["progress","load","error","resize","embedded"];function p(){function i(e){var t=a.typeOf(e);try{if(e instanceof p){if(!e.size)throw new u.DOMException(u.DOMException.INVALID_STATE_ERR);!function(e,t){var i=this.connectRuntime(e.ruid);this.ruid=i.uid,i.exec.call(this,"Image","loadFromImage",e,"undefined"===a.typeOf(t)||t)}.apply(this,arguments)}else if(e instanceof d){if(!~a.inArray(e.type,["image/jpeg","image/png"]))throw new u.ImageError(u.ImageError.WRONG_FORMAT);r.apply(this,arguments)}else if(-1!==a.inArray(t,["blob","file"]))i.call(this,new m(null,e),arguments[1]);else if("string"===t)"data:"===e.substr(0,5)?i.call(this,new d(null,{data:e}),arguments[1]):function(e,t){var i,n=this;(i=new o).open("get",e),i.responseType="blob",i.onprogress=function(e){n.trigger(e)},i.onload=function(){r.call(n,i.response,!0)},i.onerror=function(e){n.trigger(e)},i.onloadend=function(){i.destroy()},i.bind("RuntimeError",function(e,t){n.trigger("RuntimeError",t)}),i.send(null,t)}.apply(this,arguments);else{if("node"!==t||"img"!==e.nodeName.toLowerCase())throw new u.DOMException(u.DOMException.TYPE_MISMATCH_ERR);i.call(this,e.src,arguments[1])}}catch(e){this.trigger("error",e.code)}}function r(t,e){var i=this;function n(e){i.ruid=e.uid,e.exec.call(i,"Image","loadFromBlob",t)}i.name=t.name||"",t.isDetached()?(this.bind("RuntimeInit",function(e,t){n(t)}),e&&"string"==typeof e.required_caps&&(e.required_caps=s.parseCaps(e.required_caps)),this.connectRuntime(a.extend({required_caps:{access_image_binary:!0,resize_image:!0}},e))):n(this.connectRuntime(t.ruid))}t.call(this),a.extend(this,{uid:a.guid("uid_"),ruid:null,name:"",size:0,width:0,height:0,type:"",meta:{},clone:function(){this.load.apply(this,arguments)},load:function(){i.apply(this,arguments)},downsize:function(e){var t={width:this.width,height:this.height,type:this.type||"image/jpeg",quality:90,crop:!1,preserveHeaders:!0,resample:!1};e="object"==typeof e?a.extend(t,e):a.extend(t,{width:arguments[0],height:arguments[1],crop:arguments[2],preserveHeaders:arguments[3]});try{if(!this.size)throw new u.DOMException(u.DOMException.INVALID_STATE_ERR);if(this.width>p.MAX_RESIZE_WIDTH||this.height>p.MAX_RESIZE_HEIGHT)throw new u.ImageError(u.ImageError.MAX_RESOLUTION_ERR);this.exec("Image","downsize",e.width,e.height,e.crop,e.preserveHeaders)}catch(e){this.trigger("error",e.code)}},crop:function(e,t,i){this.downsize(e,t,!0,i)},getAsCanvas:function(){if(l.can("create_canvas"))return this.connectRuntime(this.ruid).exec.call(this,"Image","getAsCanvas");throw new u.RuntimeError(u.RuntimeError.NOT_SUPPORTED_ERR)},getAsBlob:function(e,t){if(this.size)return this.exec("Image","getAsBlob",e||"image/jpeg",t||90);throw new u.DOMException(u.DOMException.INVALID_STATE_ERR)},getAsDataURL:function(e,t){if(this.size)return this.exec("Image","getAsDataURL",e||"image/jpeg",t||90);throw new u.DOMException(u.DOMException.INVALID_STATE_ERR)},getAsBinaryString:function(e,t){e=this.getAsDataURL(e,t);return h.atob(e.substring(e.indexOf("base64,")+7))},embed:function(r,e){var o,s=this;e=a.extend({width:this.width,height:this.height,type:this.type||"image/jpeg",quality:90},e||{});try{if(!(r=n.get(r)))throw new u.DOMException(u.DOMException.INVALID_NODE_TYPE_ERR);if(!this.size)throw new u.DOMException(u.DOMException.INVALID_STATE_ERR);this.width>p.MAX_RESIZE_WIDTH||this.height;var t=new p;return t.bind("Resize",function(){!function(e,t){var i=this;if(l.can("create_canvas")){var n=i.getAsCanvas();if(n)return r.appendChild(n),i.destroy(),void s.trigger("embedded")}if(!(n=i.getAsDataURL(e,t)))throw new u.ImageError(u.ImageError.WRONG_FORMAT);l.can("use_data_uri_of",n.length)?(r.innerHTML='<img src="'+n+'" width="'+i.width+'" height="'+i.height+'" />',i.destroy(),s.trigger("embedded")):((t=new c).bind("TransportingComplete",function(){o=s.connectRuntime(this.result.ruid),s.bind("Embedded",function(){a.extend(o.getShimContainer().style,{top:"0px",left:"0px",width:i.width+"px",height:i.height+"px"}),o=null},999),o.exec.call(s,"ImageView","display",this.result.uid,width,height),i.destroy()}),t.transport(h.atob(n.substring(n.indexOf("base64,")+7)),e,{required_caps:{display_media:!0},runtime_order:"flash,silverlight",container:r}))}.call(this,e.type,e.quality)}),t.bind("Load",function(){t.downsize(e)}),this.meta.thumb&&this.meta.thumb.width>=e.width&&this.meta.thumb.height>=e.height?t.load(this.meta.thumb.data):t.clone(this,!1),t}catch(e){this.trigger("error",e.code)}},destroy:function(){this.ruid&&(this.getRuntime().exec.call(this,"Image","destroy"),this.disconnectRuntime()),this.unbindAll()}}),this.handleEventProps(f),this.bind("Load Resize",function(){!function(e){e=e||this.exec("Image","getInfo");this.size=e.size,this.width=e.width,this.height=e.height,this.type=e.type,this.meta=e.meta,""===this.name&&(this.name=e.name)}.call(this)},999)}return p.MAX_RESIZE_WIDTH=8192,p.MAX_RESIZE_HEIGHT=8192,p.prototype=i.instance,p}),e("moxie/runtime/html5/Runtime",["moxie/core/utils/Basic","moxie/core/Exceptions","moxie/runtime/Runtime","moxie/core/utils/Env"],function(s,e,a,u){var c={};return a.addConstructor("html5",function(e){var t,i=this,n=a.capTest,r=a.capTrue,o=s.extend({access_binary:n(window.FileReader||window.File&&window.File.getAsDataURL),access_image_binary:function(){return i.can("access_binary")&&!!c.Image},display_media:n(u.can("create_canvas")||u.can("use_data_uri_over32kb")),do_cors:n(window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest),drag_and_drop:n(("draggable"in(o=document.createElement("div"))||"ondragstart"in o&&"ondrop"in o)&&("IE"!==u.browser||u.verComp(u.version,9,">"))),filter_by_extension:n("Chrome"===u.browser&&u.verComp(u.version,28,">=")||"IE"===u.browser&&u.verComp(u.version,10,">=")||"Safari"===u.browser&&u.verComp(u.version,7,">=")),return_response_headers:r,return_response_type:function(e){return!("json"!==e||!window.JSON)||u.can("return_response_type",e)},return_status_code:r,report_upload_progress:n(window.XMLHttpRequest&&(new XMLHttpRequest).upload),resize_image:function(){return i.can("access_binary")&&u.can("create_canvas")},select_file:function(){return u.can("use_fileinput")&&window.File},select_folder:function(){return i.can("select_file")&&"Chrome"===u.browser&&u.verComp(u.version,21,">=")},select_multiple:function(){return i.can("select_file")&&!("Safari"===u.browser&&"Windows"===u.os)&&!("iOS"===u.os&&u.verComp(u.osVersion,"7.0.0",">")&&u.verComp(u.osVersion,"8.0.0","<"))},send_binary_string:n(window.XMLHttpRequest&&((new XMLHttpRequest).sendAsBinary||window.Uint8Array&&window.ArrayBuffer)),send_custom_headers:n(window.XMLHttpRequest),send_multipart:function(){return!!(window.XMLHttpRequest&&(new XMLHttpRequest).upload&&window.FormData)||i.can("send_binary_string")},slice_blob:n(window.File&&(File.prototype.mozSlice||File.prototype.webkitSlice||File.prototype.slice)),stream_upload:function(){return i.can("slice_blob")&&i.can("send_multipart")},summon_file_dialog:function(){return i.can("select_file")&&("Firefox"===u.browser&&u.verComp(u.version,4,">=")||"Opera"===u.browser&&u.verComp(u.version,12,">=")||"IE"===u.browser&&u.verComp(u.version,10,">=")||!!~s.inArray(u.browser,["Chrome","Safari"]))},upload_filesize:r},arguments[2]);a.call(this,e,arguments[1]||"html5",o),s.extend(this,{init:function(){this.trigger("Init")},destroy:(t=this.destroy,function(){t.call(i),t=i=null})}),s.extend(this.getShim(),c)}),c}),e("moxie/core/utils/Events",["moxie/core/utils/Basic"],function(o){var s={},a="moxie_"+o.guid();function u(){this.returnValue=!1}function c(){this.cancelBubble=!0}function r(t,e,i){if(e=e.toLowerCase(),t[a]&&s[t[a]]&&s[t[a]][e]){for(var n,r=(n=s[t[a]][e]).length-1;0<=r&&(n[r].orig!==i&&n[r].key!==i||(t.removeEventListener?t.removeEventListener(e,n[r].func,!1):t.detachEvent&&t.detachEvent("on"+e,n[r].func),n[r].orig=null,n[r].func=null,n.splice(r,1),void 0===i));r--);if(n.length||delete s[t[a]][e],o.isEmptyObj(s[t[a]])){delete s[t[a]];try{delete t[a]}catch(e){t[a]=void 0}}}}return{addEvent:function(e,t,i,n){var r;t=t.toLowerCase(),e.addEventListener?e.addEventListener(t,r=i,!1):e.attachEvent&&e.attachEvent("on"+t,r=function(){var e=window.event;e.target||(e.target=e.srcElement),e.preventDefault=u,e.stopPropagation=c,i(e)}),e[a]||(e[a]=o.guid()),s.hasOwnProperty(e[a])||(s[e[a]]={}),(e=s[e[a]]).hasOwnProperty(t)||(e[t]=[]),e[t].push({func:r,orig:i,key:n})},removeEvent:r,removeAllEvents:function(i,n){i&&i[a]&&o.each(s[i[a]],function(e,t){r(i,t,n)})}}}),e("moxie/runtime/html5/file/FileInput",["moxie/runtime/html5/Runtime","moxie/file/File","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/utils/Events","moxie/core/utils/Mime","moxie/core/utils/Env"],function(e,a,u,c,l,d,m){return e.FileInput=function(){var s;u.extend(this,{init:function(e){var t,i,n,r=this,o=r.getRuntime(),e=(s=e).accept.mimes||d.extList2mimes(s.accept,o.can("filter_by_extension"));(t=o.getShimContainer()).innerHTML='<input id="'+o.uid+'" type="file" style="font-size:999px;opacity:0;"'+(s.multiple&&o.can("select_multiple")?"multiple":"")+(s.directory&&o.can("select_folder")?"webkitdirectory directory":"")+(e?' accept="'+e.join(",")+'"':"")+" />",e=c.get(o.uid),u.extend(e.style,{position:"absolute",top:0,left:0,width:"100%",height:"100%"}),i=c.get(s.browse_button),o.can("summon_file_dialog")&&("static"===c.getStyle(i,"position")&&(i.style.position="relative"),n=parseInt(c.getStyle(i,"z-index"),10)||1,i.style.zIndex=n,t.style.zIndex=n-1,l.addEvent(i,"click",function(e){var t=c.get(o.uid);t&&!t.disabled&&t.click(),e.preventDefault()},r.uid)),n=o.can("summon_file_dialog")?i:t,l.addEvent(n,"mouseover",function(){r.trigger("mouseenter")},r.uid),l.addEvent(n,"mouseout",function(){r.trigger("mouseleave")},r.uid),l.addEvent(n,"mousedown",function(){r.trigger("mousedown")},r.uid),l.addEvent(c.get(s.container),"mouseup",function(){r.trigger("mouseup")},r.uid),e.onchange=function e(t){var i;r.files=[],u.each(this.files,function(e){var t="";if(s.directory&&"."==e.name)return!0;e.webkitRelativePath&&(t="/"+e.webkitRelativePath.replace(/^\//,"")),(e=new a(o.uid,e)).relativePath=t,r.files.push(e)}),"IE"!==m.browser&&"IEMobile"!==m.browser?this.value="":(i=this.cloneNode(!0),this.parentNode.replaceChild(i,this),i.onchange=e),r.files.length&&r.trigger("change")},r.trigger({type:"ready",async:!0})},disable:function(e){var t=this.getRuntime();(t=c.get(t.uid))&&(t.disabled=!!e)},destroy:function(){var e=this.getRuntime(),t=e.getShim(),e=e.getShimContainer();l.removeAllEvents(e,this.uid),l.removeAllEvents(s&&c.get(s.container),this.uid),l.removeAllEvents(s&&c.get(s.browse_button),this.uid),e&&(e.innerHTML=""),t.removeInstance(this.uid),s=null}})}}),e("moxie/runtime/html5/file/Blob",["moxie/runtime/html5/Runtime","moxie/file/Blob"],function(e,t){return e.Blob=function(){this.slice=function(){return new t(this.getRuntime().uid,function(t,i,n){var e;if(!window.File.prototype.slice)return(e=window.File.prototype.webkitSlice||window.File.prototype.mozSlice)?e.call(t,i,n):null;try{return t.slice(),t.slice(i,n)}catch(e){return t.slice(i,n-i)}}.apply(this,arguments))}}}),e("moxie/runtime/html5/file/FileDrop",["moxie/runtime/html5/Runtime","moxie/file/File","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/utils/Events","moxie/core/utils/Mime"],function(e,r,l,i,d,m){return e.FileDrop=function(){var t,n,o=[],s=[];function a(e){if(e.dataTransfer&&e.dataTransfer.types)return e=l.toArray(e.dataTransfer.types||[]),-1!==l.inArray("Files",e)||-1!==l.inArray("public.file-url",e)||-1!==l.inArray("application/x-moz-file",e)}function u(e,t){var i;i=e,s.length&&(i=m.getFileExtension(i.name))&&-1===l.inArray(i,s)||((i=new r(n,e)).relativePath=t||"",o.push(i))}function c(e,t){var i=[];l.each(e,function(s){i.push(function(e){{var t,n,r;(o=e,(i=s).isFile)?i.file(function(e){u(e,i.fullPath),o()},function(){o()}):i.isDirectory?(t=o,n=[],r=(e=i).createReader(),function t(i){r.readEntries(function(e){e.length?([].push.apply(n,e),t(i)):i()},i)}(function(){c(n,t)})):o()}var i,o})}),l.inSeries(i,function(){t()})}l.extend(this,{init:function(e){var r=this;t=e,n=r.ruid,s=function(e){for(var t=[],i=0;i<e.length;i++)[].push.apply(t,e[i].extensions.split(/\s*,\s*/));return-1===l.inArray("*",t)?t:[]}(t.accept),e=t.container,d.addEvent(e,"dragover",function(e){a(e)&&(e.preventDefault(),e.dataTransfer.dropEffect="copy")},r.uid),d.addEvent(e,"drop",function(e){var t,i,n;a(e)&&(e.preventDefault(),o=[],e.dataTransfer.items&&e.dataTransfer.items[0].webkitGetAsEntry?(t=e.dataTransfer.items,i=function(){r.files=o,r.trigger("drop")},n=[],l.each(t,function(e){var t=e.webkitGetAsEntry();t&&(t.isFile?u(e.getAsFile(),t.fullPath):n.push(t))}),n.length?c(n,i):i()):(l.each(e.dataTransfer.files,function(e){u(e)}),r.files=o,r.trigger("drop")))},r.uid),d.addEvent(e,"dragenter",function(e){r.trigger("dragenter")},r.uid),d.addEvent(e,"dragleave",function(e){r.trigger("dragleave")},r.uid)},destroy:function(){d.removeAllEvents(t&&i.get(t.container),this.uid),n=o=s=t=null}})}}),e("moxie/runtime/html5/file/FileReader",["moxie/runtime/html5/Runtime","moxie/core/utils/Encode","moxie/core/utils/Basic"],function(e,o,s){return e.FileReader=function(){var n,r=!1;s.extend(this,{read:function(e,t){var i=this;i.result="",(n=new window.FileReader).addEventListener("progress",function(e){i.trigger(e)}),n.addEventListener("load",function(e){var t;i.result=r?(t=n.result,o.atob(t.substring(t.indexOf("base64,")+7))):n.result,i.trigger(e)}),n.addEventListener("error",function(e){i.trigger(e,n.error)}),n.addEventListener("loadend",function(e){n=null,i.trigger(e)}),"function"===s.typeOf(n[e])?(r=!1,n[e](t.getSource())):"readAsBinaryString"===e&&(r=!0,n.readAsDataURL(t.getSource()))},abort:function(){n&&n.abort()},destroy:function(){n=null}})}}),e("moxie/runtime/html5/xhr/XMLHttpRequest",["moxie/runtime/html5/Runtime","moxie/core/utils/Basic","moxie/core/utils/Mime","moxie/core/utils/Url","moxie/file/File","moxie/file/Blob","moxie/xhr/FormData","moxie/core/Exceptions","moxie/core/utils/Env"],function(e,m,u,h,f,p,g,x,E){return e.XMLHttpRequest=function(){var c,l,d=this;m.extend(this,{send:function(e,t){var i,n=this,r="Mozilla"===E.browser&&E.verComp(E.version,4,">=")&&E.verComp(E.version,7,"<"),o="Android Browser"===E.browser,s=!1;if(l=e.url.replace(/^.+?\/([\w\-\.]+)$/,"$1").toLowerCase(),(c=!window.XMLHttpRequest||"IE"===E.browser&&E.verComp(E.version,8,"<")?function(){for(var e=["Msxml2.XMLHTTP.6.0","Microsoft.XMLHTTP"],t=0;t<e.length;t++)try{return new ActiveXObject(e[t])}catch(e){}}():new window.XMLHttpRequest).open(e.method,e.url,e.async,e.user,e.password),t instanceof p)t.isDetached()&&(s=!0),t=t.getSource();else if(t instanceof g){if(t.hasBlob())if(t.getBlob().isDetached())t=function(e){var i="----moxieboundary"+(new Date).getTime(),n="\r\n",r="";if(this.getRuntime().can("send_binary_string"))return c.setRequestHeader("Content-Type","multipart/form-data; boundary="+i),e.each(function(e,t){e instanceof p?r+="--"+i+n+'Content-Disposition: form-data; name="'+t+'"; filename="'+unescape(encodeURIComponent(e.name||"blob"))+'"'+n+"Content-Type: "+(e.type||"application/octet-stream")+n+n+e.getSource()+n:r+="--"+i+n+'Content-Disposition: form-data; name="'+t+'"'+n+n+unescape(encodeURIComponent(e))+n}),r+="--"+i+"--"+n;throw new x.RuntimeError(x.RuntimeError.NOT_SUPPORTED_ERR)}.call(n,t),s=!0;else if((r||o)&&"blob"===m.typeOf(t.getBlob().getSource())&&window.FileReader)return void function(e,t){var i,n,r=this;i=t.getBlob().getSource(),(n=new window.FileReader).onload=function(){t.append(t.getBlobName(),new p(null,{type:i.type,data:n.result})),d.send.call(r,e,t)},n.readAsBinaryString(i)}.call(n,e,t);t instanceof g&&(i=new window.FormData,t.each(function(e,t){e instanceof p?i.append(t,e.getSource()):i.append(t,e)}),t=i)}if(c.upload?(e.withCredentials&&(c.withCredentials=!0),c.addEventListener("load",function(e){n.trigger(e)}),c.addEventListener("error",function(e){n.trigger(e)}),c.addEventListener("progress",function(e){n.trigger(e)}),c.upload.addEventListener("progress",function(e){n.trigger({type:"UploadProgress",loaded:e.loaded,total:e.total})})):c.onreadystatechange=function(){switch(c.readyState){case 1:case 2:break;case 3:var t,i;try{h.hasSameOrigin(e.url)&&(t=c.getResponseHeader("Content-Length")||0),c.responseText&&(i=c.responseText.length)}catch(e){t=i=0}n.trigger({type:"progress",lengthComputable:!!t,total:parseInt(t,10),loaded:i});break;case 4:c.onreadystatechange=function(){},0===c.status?n.trigger("error"):n.trigger("load")}},m.isEmptyObj(e.headers)||m.each(e.headers,function(e,t){c.setRequestHeader(t,e)}),""!==e.responseType&&"responseType"in c&&("json"!==e.responseType||E.can("return_response_type","json")?c.responseType=e.responseType:c.responseType="text"),s)if(c.sendAsBinary)c.sendAsBinary(t);else{for(var a=new Uint8Array(t.length),u=0;u<t.length;u++)a[u]=255&t.charCodeAt(u);c.send(a.buffer)}else c.send(t);n.trigger("loadstart")},getStatus:function(){try{if(c)return c.status}catch(e){}return 0},getResponse:function(e){var t=this.getRuntime();try{switch(e){case"blob":var i,n=new f(t.uid,c.response),r=c.getResponseHeader("Content-Disposition");return r&&(i=r.match(/filename=([\'\"'])([^\1]+)\1/))&&(l=i[2]),n.name=l,n.type||(n.type=u.getFileMime(l)),n;case"json":return E.can("return_response_type","json")?c.response:200===c.status&&window.JSON?JSON.parse(c.responseText):null;case"document":var o=c,s=o.responseXML,a=o.responseText;return"IE"===E.browser&&a&&s&&!s.documentElement&&/[^\/]+\/[^\+]+\+xml/.test(o.getResponseHeader("Content-Type"))&&((s=new window.ActiveXObject("Microsoft.XMLDOM")).async=!1,s.validateOnParse=!1,s.loadXML(a)),s&&("IE"===E.browser&&0!==s.parseError||!s.documentElement||"parsererror"===s.documentElement.tagName)?null:s;default:return""!==c.responseText?c.responseText:null}}catch(e){return null}},getAllResponseHeaders:function(){try{return c.getAllResponseHeaders()}catch(e){}return""},abort:function(){c&&c.abort()},destroy:function(){d=l=null}})}}),e("moxie/runtime/html5/utils/BinaryReader",["moxie/core/utils/Basic"],function(t){function e(e){(e instanceof ArrayBuffer?function(r){var o=new DataView(r);t.extend(this,{readByteAt:function(e){return o.getUint8(e)},writeByteAt:function(e,t){o.setUint8(e,t)},SEGMENT:function(e,t,i){switch(arguments.length){case 2:return r.slice(e,e+t);case 1:return r.slice(e);case 3:if((i=null===i?new ArrayBuffer:i)instanceof ArrayBuffer){var n=new Uint8Array(this.length()-t+i.byteLength);0<e&&n.set(new Uint8Array(r.slice(0,e)),0),n.set(new Uint8Array(i),e),n.set(new Uint8Array(r.slice(e+t)),e+i.byteLength),this.clear(),r=n.buffer,o=new DataView(r);break}default:return r}},length:function(){return r?r.byteLength:0},clear:function(){o=r=null}})}:function(n){function r(e,t,i){i=3===arguments.length?i:n.length-t-1,n=n.substr(0,t)+e+n.substr(i+t)}t.extend(this,{readByteAt:function(e){return n.charCodeAt(e)},writeByteAt:function(e,t){r(String.fromCharCode(t),e,1)},SEGMENT:function(e,t,i){switch(arguments.length){case 1:return n.substr(e);case 2:return n.substr(e,t);case 3:r(null!==i?i:"",e,t);break;default:return n}},length:function(){return n?n.length:0},clear:function(){n=null}})}).apply(this,arguments)}return t.extend(e.prototype,{littleEndian:!1,read:function(e,t){var i,n,r;if(e+t>this.length())throw new Error("You are trying to read outside the source boundaries.");for(n=this.littleEndian?0:-8*(t-1),i=r=0;r<t;r++)i|=this.readByteAt(e+r)<<Math.abs(n+8*r);return i},write:function(e,t,i){var n,r;if(e>this.length())throw new Error("You are trying to write outside the source boundaries.");for(n=this.littleEndian?0:-8*(i-1),r=0;r<i;r++)this.writeByteAt(e+r,t>>Math.abs(n+8*r)&255)},BYTE:function(e){return this.read(e,1)},SHORT:function(e){return this.read(e,2)},LONG:function(e){return this.read(e,4)},SLONG:function(e){e=this.read(e,4);return 2147483647<e?e-4294967296:e},CHAR:function(e){return String.fromCharCode(this.read(e,1))},STRING:function(e,t){return this.asArray("CHAR",e,t).join("")},asArray:function(e,t,i){for(var n=[],r=0;r<i;r++)n[r]=this[e](t+r);return n}}),e}),e("moxie/runtime/html5/image/JPEGHeaders",["moxie/runtime/html5/utils/BinaryReader","moxie/core/Exceptions"],function(a,u){return function o(e){var r,t,i,s=[],n=new a(e);if(65496!==n.SHORT(0))throw n.clear(),new u.ImageError(u.ImageError.WRONG_FORMAT);for(r=2;r<=n.length();)if(65488<=(t=n.SHORT(r))&&t<=65495)r+=2;else{if(65498===t||65497===t)break;i=n.SHORT(r+2)+2,65505<=t&&t<=65519&&s.push({hex:t,name:"APP"+(15&t),start:r,length:i,segment:n.SEGMENT(r,i)}),r+=i}return n.clear(),{headers:s,restore:function(e){var t,i,n=new a(e);for(r=65504==n.SHORT(2)?4+n.SHORT(4):2,i=0,t=s.length;i<t;i++)n.SEGMENT(r,0,s[i].segment),r+=s[i].length;return e=n.SEGMENT(),n.clear(),e},strip:function(e){var t,i,n=new o(e),r=n.headers;for(n.purge(),t=new a(e),i=r.length;i--;)t.SEGMENT(r[i].start,r[i].length,"");return e=t.SEGMENT(),t.clear(),e},get:function(e){for(var t=[],i=0,n=s.length;i<n;i++)s[i].name===e.toUpperCase()&&t.push(s[i].segment);return t},set:function(e,t){var i,n,r,o=[];for("string"==typeof t?o.push(t):o=t,i=n=0,r=s.length;i<r&&(s[i].name===e.toUpperCase()&&(s[i].segment=o[n],s[i].length=o[n].length,n++),!(n>=o.length));i++);},purge:function(){this.headers=s=[]}}}}),e("moxie/runtime/html5/image/ExifParser",["moxie/core/utils/Basic","moxie/runtime/html5/utils/BinaryReader","moxie/core/Exceptions"],function(p,o,g){function s(e){var t,l,h,f,i;if(o.call(this,e),l={tiff:{274:"Orientation",270:"ImageDescription",271:"Make",272:"Model",305:"Software",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer"},exif:{36864:"ExifVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",36867:"DateTimeOriginal",33434:"ExposureTime",33437:"FNumber",34855:"ISOSpeedRatings",37377:"ShutterSpeedValue",37378:"ApertureValue",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37386:"FocalLength",41986:"ExposureMode",41987:"WhiteBalance",41990:"SceneCaptureType",41988:"DigitalZoomRatio",41992:"Contrast",41993:"Saturation",41994:"Sharpness"},gps:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude"},thumb:{513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength"}},h={ColorSpace:{1:"sRGB",0:"Uncalibrated"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{1:"Daylight",2:"Fliorescent",3:"Tungsten",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 -5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},ExposureMode:{0:"Auto exposure",1:"Manual exposure",2:"Auto bracket"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},GPSLatitudeRef:{N:"North latitude",S:"South latitude"},GPSLongitudeRef:{E:"East longitude",W:"West longitude"}},n=(f={tiffHeader:10}).tiffHeader,t={clear:this.clear},p.extend(this,{read:function(){try{return s.prototype.read.apply(this,arguments)}catch(e){throw new g.ImageError(g.ImageError.INVALID_META_ERR)}},write:function(){try{return s.prototype.write.apply(this,arguments)}catch(e){throw new g.ImageError(g.ImageError.INVALID_META_ERR)}},UNDEFINED:function(){return this.BYTE.apply(this,arguments)},RATIONAL:function(e){return this.LONG(e)/this.LONG(e+4)},SRATIONAL:function(e){return this.SLONG(e)/this.SLONG(e+4)},ASCII:function(e){return this.CHAR(e)},TIFF:function(){return i||null},EXIF:function(){var e=null;if(f.exifIFD){try{e=r.call(this,f.exifIFD,l.exif)}catch(e){return null}if(e.ExifVersion&&"array"===p.typeOf(e.ExifVersion)){for(var t=0,i="";t<e.ExifVersion.length;t++)i+=String.fromCharCode(e.ExifVersion[t]);e.ExifVersion=i}}return e},GPS:function(){var e=null;if(f.gpsIFD){try{e=r.call(this,f.gpsIFD,l.gps)}catch(e){return null}e.GPSVersionID&&"array"===p.typeOf(e.GPSVersionID)&&(e.GPSVersionID=e.GPSVersionID.join("."))}return e},thumb:function(){if(f.IFD1)try{var e=r.call(this,f.IFD1,l.thumb);if("JPEGInterchangeFormat"in e)return this.SEGMENT(f.tiffHeader+e.JPEGInterchangeFormat,e.JPEGInterchangeFormatLength)}catch(e){}return null},setExif:function(e,t){return("PixelXDimension"===e||"PixelYDimension"===e)&&function(e,t,i){var n,r,o,s=0;if("string"==typeof t){var a,u=l[e.toLowerCase()];for(a in u)if(u[a]===t){t=a;break}}n=f[e.toLowerCase()+"IFD"],r=this.SHORT(n);for(var c=0;c<r;c++)if(o=n+12*c+2,this.SHORT(o)==t){s=o+8;break}if(!s)return!1;try{this.write(s,i,4)}catch(e){return!1}return!0}.call(this,"exif",e,t)},clear:function(){t.clear(),e=l=h=i=f=t=null}}),65505!==this.SHORT(0)||"EXIF\0"!==this.STRING(4,5).toUpperCase())throw new g.ImageError(g.ImageError.INVALID_META_ERR);if(this.littleEndian=18761==this.SHORT(n),42!==this.SHORT(n+=2))throw new g.ImageError(g.ImageError.INVALID_META_ERR);f.IFD0=f.tiffHeader+this.LONG(n+=2),"ExifIFDPointer"in(i=r.call(this,f.IFD0,l.tiff))&&(f.exifIFD=f.tiffHeader+i.ExifIFDPointer,delete i.ExifIFDPointer),"GPSInfoIFDPointer"in i&&(f.gpsIFD=f.tiffHeader+i.GPSInfoIFDPointer,delete i.GPSInfoIFDPointer),p.isEmptyObj(i)&&(i=null);var n=this.LONG(f.IFD0+12*this.SHORT(f.IFD0)+2);function r(e,t){for(var i,n,r,o,s,a=this,u={},c={1:"BYTE",7:"UNDEFINED",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",9:"SLONG",10:"SRATIONAL"},l={BYTE:1,UNDEFINED:1,ASCII:1,SHORT:2,LONG:4,RATIONAL:8,SLONG:4,SRATIONAL:8},d=a.SHORT(e),m=0;m<d;m++)if((i=t[a.SHORT(r=e+2+12*m)])!==x){if(o=c[a.SHORT(r+=2)],n=a.LONG(r+=2),!(s=l[o]))throw new g.ImageError(g.ImageError.INVALID_META_ERR);if(r+=4,(r=4<s*n?a.LONG(r)+f.tiffHeader:r)+s*n>=this.length())throw new g.ImageError(g.ImageError.INVALID_META_ERR);"ASCII"===o?u[i]=p.trim(a.STRING(r,n).replace(/\0$/,"")):(s=a.asArray(o,r,n),o=1==n?s[0]:s,h.hasOwnProperty(i)&&"object"!=typeof o?u[i]=h[i][o]:u[i]=o)}return u}n&&(f.IFD1=f.tiffHeader+n)}return s.prototype=o.prototype,s}),e("moxie/runtime/html5/image/JPEG",["moxie/core/utils/Basic","moxie/core/Exceptions","moxie/runtime/html5/image/JPEGHeaders","moxie/runtime/html5/utils/BinaryReader","moxie/runtime/html5/image/ExifParser"],function(s,a,u,c,l){return function(e){var i,n,t,r=new c(e);if(65496!==r.SHORT(0))throw new a.ImageError(a.ImageError.WRONG_FORMAT);i=new u(e);try{n=new l(i.get("app1")[0])}catch(e){}function o(e){var t,i=0;for(e=e||r;i<=e.length();){if(65472<=(t=e.SHORT(i+=2))&&t<=65475)return i+=5,{height:e.SHORT(i),width:e.SHORT(i+=2)};t=e.SHORT(i+=2),i+=t-2}return null}t=o.call(this),s.extend(this,{type:"image/jpeg",size:r.length(),width:t&&t.width||0,height:t&&t.height||0,setExif:function(e,t){if(!n)return!1;"object"===s.typeOf(e)?s.each(e,function(e,t){n.setExif(t,e)}):n.setExif(e,t),i.set("app1",n.SEGMENT())},writeHeaders:function(){return arguments.length?i.restore(arguments[0]):i.restore(e)},stripHeaders:function(e){return i.strip(e)},purge:function(){!function(){n&&i&&r&&(n.clear(),i.purge(),r.clear(),t=i=n=r=null)}.call(this)}}),n&&(this.meta={tiff:n.TIFF(),exif:n.EXIF(),gps:n.GPS(),thumb:function(){var e,t,i=n.thumb();if(i&&(e=new c(i),t=o(e),e.clear(),t))return t.data=i,t;return null}()})}}),e("moxie/runtime/html5/image/PNG",["moxie/core/Exceptions","moxie/core/utils/Basic","moxie/runtime/html5/utils/BinaryReader"],function(a,u,c){return function(e){for(var t,r=new c(e),i=0,n=0,o=[35152,20039,3338,6666],n=0;n<o.length;n++,i+=2)if(o[n]!=r.SHORT(i))throw new a.ImageError(a.ImageError.WRONG_FORMAT);function s(){r&&(r.clear(),e=t=r=null)}t=function(){var e=function(e){var t,i,n;return t=r.LONG(e),i=r.STRING(e+=4,4),n=e+=4,e=r.LONG(e+t),{length:t,type:i,start:n,CRC:e}}.call(this,8);return"IHDR"==e.type?(e=e.start,{width:r.LONG(e),height:r.LONG(e+=4)}):null}.call(this),u.extend(this,{type:"image/png",size:r.length(),width:t.width,height:t.height,purge:function(){s.call(this)}}),s.call(this)}}),e("moxie/runtime/html5/image/ImageInfo",["moxie/core/utils/Basic","moxie/core/Exceptions","moxie/runtime/html5/image/JPEG","moxie/runtime/html5/image/PNG"],function(n,r,o,s){return function(t){var i=[o,s],e=function(){for(var e=0;e<i.length;e++)try{return new i[e](t)}catch(e){}throw new r.ImageError(r.ImageError.WRONG_FORMAT)}();n.extend(this,{type:"",size:0,width:0,height:0,setExif:function(){},writeHeaders:function(e){return e},stripHeaders:function(e){return e},purge:function(){t=null}}),n.extend(this,e),this.purge=function(){e.purge(),e=null}}}),e("moxie/runtime/html5/image/MegaPixel",[],function(){function R(e){var t,i=e.naturalWidth;return 1048576<i*e.naturalHeight&&((t=document.createElement("canvas")).width=t.height=1,(t=t.getContext("2d")).drawImage(e,1-i,0),0===t.getImageData(0,0,1,1).data[3])}return{isSubsampled:R,renderTo:function(e,t,i){for(var n=e.naturalWidth,r=e.naturalHeight,o=i.width,s=i.height,a=i.x||0,u=i.y||0,c=t.getContext("2d"),l=(R(e)&&(n/=2,r/=2),1024),d=document.createElement("canvas"),m=(d.width=d.height=l,d.getContext("2d")),h=function(e,t){var i=document.createElement("canvas"),n=(i.width=1,i.height=t,i.getContext("2d")),r=(n.drawImage(e,0,0),n.getImageData(0,0,1,t).data),o=0,s=t,a=t;for(;o<a;)0===r[4*(a-1)+3]?s=a:o=a,a=s+o>>1;i=null;e=a/t;return 0==e?1:e}(e,r),f=0;f<r;){for(var p=r<f+l?r-f:l,g=0;g<n;){var x=n<g+l?n-g:l,E=(m.clearRect(0,0,l,l),m.drawImage(e,-g,-f),g*o/n+a<<0),y=Math.ceil(x*o/n),w=f*s/r/h+u<<0,v=Math.ceil(p*s/r/h);c.drawImage(d,0,0,x,p,E,w,y,v),g+=l}f+=l}}}}),e("moxie/runtime/html5/image/Image",["moxie/runtime/html5/Runtime","moxie/core/utils/Basic","moxie/core/Exceptions","moxie/core/utils/Encode","moxie/file/Blob","moxie/file/File","moxie/runtime/html5/image/ImageInfo","moxie/runtime/html5/image/MegaPixel","moxie/core/utils/Mime","moxie/core/utils/Env"],function(e,g,d,x,t,E,y,w,v,R){return e.Image=function(){var i,n,m,r,o,s=this,h=!1,f=!0;function p(){if(m||i)return m||i;throw new d.ImageError(d.DOMException.INVALID_STATE_ERR)}function a(e){return x.atob(e.substring(e.indexOf("base64,")+7))}function u(e){var t=this;(i=new Image).onerror=function(){l.call(this),t.trigger("error",d.ImageError.WRONG_FORMAT)},i.onload=function(){t.trigger("load")},i.src="data:"==e.substr(0,5)?e:"data:"+(o.type||"")+";base64,"+x.btoa(e)}function c(e,t,i,n){var r,o,s,a=0,u=0;if(f=n,o=this.meta&&this.meta.tiff&&this.meta.tiff.Orientation||1,-1!==g.inArray(o,[5,6,7,8])&&(s=e,e=t,t=s),s=p(),!(1<(r=i?(e=Math.min(e,s.width),t=Math.min(t,s.height),Math.max(e/s.width,t/s.height)):Math.min(e/s.width,t/s.height))&&!i&&n)){if(m=m||document.createElement("canvas"),n=Math.round(s.width*r),r=Math.round(s.height*r),i?(m.width=e,m.height=t,e<n&&(a=Math.round((n-e)/2)),t<r&&(u=Math.round((r-t)/2))):(m.width=n,m.height=r),!f){var c=m.width,l=m.height,i=o;switch(i){case 5:case 6:case 7:case 8:m.width=l,m.height=c;break;default:m.width=c,m.height=l}var d=m.getContext("2d");switch(i){case 2:d.translate(c,0),d.scale(-1,1);break;case 3:d.translate(c,l),d.rotate(Math.PI);break;case 4:d.translate(0,l),d.scale(1,-1);break;case 5:d.rotate(.5*Math.PI),d.scale(1,-1);break;case 6:d.rotate(.5*Math.PI),d.translate(0,-l);break;case 7:d.rotate(.5*Math.PI),d.translate(c,-l),d.scale(-1,1);break;case 8:d.rotate(-.5*Math.PI),d.translate(-c,0)}}!function(e,t,i,n,r,o){"iOS"===R.OS?w.renderTo(e,t,{width:r,height:o,x:i,y:n}):t.getContext("2d").drawImage(e,i,n,r,o)}.call(this,s,m,-a,-u,n,r),this.width=m.width,this.height=m.height,h=!0}this.trigger("Resize")}function l(){n&&(n.purge(),n=null),r=i=m=o=null,h=!1}g.extend(this,{loadFromBlob:function(e){var t=this,i=t.getRuntime(),n=!(1<arguments.length)||arguments[1];if(!i.can("access_binary"))throw new d.RuntimeError(d.RuntimeError.NOT_SUPPORTED_ERR);(o=e).isDetached()?(r=e.getSource(),u.call(this,r)):function(e,t){var i,n=this;{if(!window.FileReader)return t(e.getAsDataURL());(i=new FileReader).onload=function(){t(this.result)},i.onerror=function(){n.trigger("error",d.ImageError.WRONG_FORMAT)},i.readAsDataURL(e)}}.call(this,e.getSource(),function(e){n&&(r=a(e)),u.call(t,e)})},loadFromImage:function(e,t){this.meta=e.meta,o=new E(null,{name:e.name,size:e.size,type:e.type}),u.call(this,t?r=e.getAsBinaryString():e.getAsDataURL())},getInfo:function(){var e=this.getRuntime();return!n&&r&&e.can("access_image_binary")&&(n=new y(r)),!(e={width:p().width||0,height:p().height||0,type:o.type||v.getFileMime(o.name),size:r&&r.length||o.size||0,name:o.name||"",meta:n&&n.meta||this.meta||{}}).meta||!e.meta.thumb||e.meta.thumb.data instanceof t||(e.meta.thumb.data=new t(null,{type:"image/jpeg",data:e.meta.thumb.data})),e},downsize:function(){c.apply(this,arguments)},getAsCanvas:function(){return m&&(m.id=this.uid+"_canvas"),m},getAsBlob:function(e,t){return e!==this.type&&c.call(this,this.width,this.height,!1),new E(null,{name:o.name||"",type:e,data:s.getAsBinaryString.call(this,e,t)})},getAsDataURL:function(e){var t=arguments[1]||90;if(!h)return i.src;if("image/jpeg"!==e)return m.toDataURL("image/png");try{return m.toDataURL("image/jpeg",t/100)}catch(e){return m.toDataURL("image/jpeg")}},getAsBinaryString:function(e,t){if(!h)return r=r||a(s.getAsDataURL(e,t));if("image/jpeg"!==e)r=a(s.getAsDataURL(e,t));else{var i;t=t||90;try{i=m.toDataURL("image/jpeg",t/100)}catch(e){i=m.toDataURL("image/jpeg")}r=a(i),n&&(r=n.stripHeaders(r),f&&(n.meta&&n.meta.exif&&n.setExif({PixelXDimension:this.width,PixelYDimension:this.height}),r=n.writeHeaders(r)),n.purge(),n=null)}return h=!1,r},destroy:function(){s=null,l.call(this),this.getRuntime().getShim().removeInstance(this.uid)}})}}),e("moxie/runtime/flash/Runtime",[],function(){return{}}),e("moxie/runtime/silverlight/Runtime",[],function(){return{}}),e("moxie/runtime/html4/Runtime",["moxie/core/utils/Basic","moxie/core/Exceptions","moxie/runtime/Runtime","moxie/core/utils/Env"],function(o,e,s,a){var u={};return s.addConstructor("html4",function(e){var t,i=this,n=s.capTest,r=s.capTrue;s.call(this,e,"html4",{access_binary:n(window.FileReader||window.File&&File.getAsDataURL),access_image_binary:!1,display_media:n(u.Image&&(a.can("create_canvas")||a.can("use_data_uri_over32kb"))),do_cors:!1,drag_and_drop:!1,filter_by_extension:n("Chrome"===a.browser&&a.verComp(a.version,28,">=")||"IE"===a.browser&&a.verComp(a.version,10,">=")||"Safari"===a.browser&&a.verComp(a.version,7,">=")),resize_image:function(){return u.Image&&i.can("access_binary")&&a.can("create_canvas")},report_upload_progress:!1,return_response_headers:!1,return_response_type:function(e){return!("json"!==e||!window.JSON)||!!~o.inArray(e,["text","document",""])},return_status_code:function(e){return!o.arrayDiff(e,[200,404])},select_file:function(){return a.can("use_fileinput")},select_multiple:!1,send_binary_string:!1,send_custom_headers:!1,send_multipart:!0,slice_blob:!1,stream_upload:function(){return i.can("select_file")},summon_file_dialog:function(){return i.can("select_file")&&("Firefox"===a.browser&&a.verComp(a.version,4,">=")||"Opera"===a.browser&&a.verComp(a.version,12,">=")||"IE"===a.browser&&a.verComp(a.version,10,">=")||!!~o.inArray(a.browser,["Chrome","Safari"]))},upload_filesize:r,use_http_method:function(e){return!o.arrayDiff(e,["GET","POST"])}}),o.extend(this,{init:function(){this.trigger("Init")},destroy:(t=this.destroy,function(){t.call(i),t=i=null})}),o.extend(this.getShim(),u)}),u}),e("moxie/runtime/html4/file/FileInput",["moxie/runtime/html4/Runtime","moxie/file/File","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/utils/Events","moxie/core/utils/Mime","moxie/core/utils/Env"],function(e,d,m,h,f,s,p){return e.FileInput=function(){var a,u,c=[];function l(){var e,t,i,n=this,r=n.getRuntime(),o=m.guid("uid_"),s=r.getShimContainer();a&&(e=h.get(a+"_form"))&&m.extend(e.style,{top:"100%"}),(t=document.createElement("form")).setAttribute("id",o+"_form"),t.setAttribute("method","post"),t.setAttribute("enctype","multipart/form-data"),t.setAttribute("encoding","multipart/form-data"),m.extend(t.style,{overflow:"hidden",position:"absolute",top:0,left:0,width:"100%",height:"100%"}),(i=document.createElement("input")).setAttribute("id",o),i.setAttribute("type","file"),i.setAttribute("name",u.name||"Filedata"),i.setAttribute("accept",c.join(",")),m.extend(i.style,{fontSize:"999px",opacity:0}),t.appendChild(i),s.appendChild(t),m.extend(i.style,{position:"absolute",top:0,left:0,width:"100%",height:"100%"}),"IE"===p.browser&&p.verComp(p.version,10,"<")&&m.extend(i.style,{filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=0)"}),i.onchange=function(){var e;if(this.value){if(this.files){if(0===(e=this.files[0]).size)return void t.parentNode.removeChild(t)}else e={name:this.value};e=new d(r.uid,e),this.onchange=function(){},l.call(n),n.files=[e],i.setAttribute("id",e.uid),t.setAttribute("id",e.uid+"_form"),n.trigger("change"),i=t=null}},r.can("summon_file_dialog")&&(e=h.get(u.browse_button),f.removeEvent(e,"click",n.uid),f.addEvent(e,"click",function(e){i&&!i.disabled&&i.click(),e.preventDefault()},n.uid)),a=o}m.extend(this,{init:function(e){var t,i,n,r=this,o=r.getRuntime();c=(u=e).accept.mimes||s.extList2mimes(e.accept,o.can("filter_by_extension")),t=o.getShimContainer(),n=h.get(e.browse_button),o.can("summon_file_dialog")&&("static"===h.getStyle(n,"position")&&(n.style.position="relative"),i=parseInt(h.getStyle(n,"z-index"),10)||1,n.style.zIndex=i,t.style.zIndex=i-1),i=o.can("summon_file_dialog")?n:t,f.addEvent(i,"mouseover",function(){r.trigger("mouseenter")},r.uid),f.addEvent(i,"mouseout",function(){r.trigger("mouseleave")},r.uid),f.addEvent(i,"mousedown",function(){r.trigger("mousedown")},r.uid),f.addEvent(h.get(e.container),"mouseup",function(){r.trigger("mouseup")},r.uid),l.call(this),t=null,r.trigger({type:"ready",async:!0})},disable:function(e){var t;(t=h.get(a))&&(t.disabled=!!e)},destroy:function(){var e=this.getRuntime(),t=e.getShim(),e=e.getShimContainer();f.removeAllEvents(e,this.uid),f.removeAllEvents(u&&h.get(u.container),this.uid),f.removeAllEvents(u&&h.get(u.browse_button),this.uid),e&&(e.innerHTML=""),t.removeInstance(this.uid),a=c=u=null}})}}),e("moxie/runtime/html4/file/FileReader",["moxie/runtime/html4/Runtime","moxie/runtime/html5/file/FileReader"],function(e,t){return e.FileReader=t}),e("moxie/runtime/html4/xhr/XMLHttpRequest",["moxie/runtime/html4/Runtime","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/utils/Url","moxie/core/Exceptions","moxie/core/utils/Events","moxie/file/Blob","moxie/xhr/FormData"],function(e,m,h,f,p,g,x,E){return e.XMLHttpRequest=function(){var u,c,l;function d(t){var e,i,n,r=this,o=!1;if(l){if(e=l.id.replace(/_iframe$/,""),e=h.get(e+"_form")){for(n=(i=e.getElementsByTagName("input")).length;n--;)switch(i[n].getAttribute("type")){case"hidden":i[n].parentNode.removeChild(i[n]);break;case"file":o=!0}i=[],o||e.parentNode.removeChild(e),e=null}setTimeout(function(){g.removeEvent(l,"load",r.uid),l.parentNode&&l.parentNode.removeChild(l);var e=r.getRuntime().getShimContainer();e.children.length||e.parentNode.removeChild(e),e=l=null,t()},1)}}m.extend(this,{send:function(t,e){var i,n,r,o,s=this,a=s.getRuntime();if(u=c=null,e instanceof E&&e.hasBlob()){if(o=e.getBlob(),i=o.uid,r=h.get(i),!(n=h.get(i+"_form")))throw new p.DOMException(p.DOMException.NOT_FOUND_ERR)}else i=m.guid("uid_"),(n=document.createElement("form")).setAttribute("id",i+"_form"),n.setAttribute("method",t.method),n.setAttribute("enctype","multipart/form-data"),n.setAttribute("encoding","multipart/form-data"),a.getShimContainer().appendChild(n);n.setAttribute("target",i+"_iframe"),e instanceof E&&e.each(function(e,t){var i;e instanceof x?r&&r.setAttribute("name",t):(i=document.createElement("input"),m.extend(i,{type:"hidden",name:t,value:e}),r?n.insertBefore(i,r):n.appendChild(i))}),n.setAttribute("action",t.url),e=a.getShimContainer()||document.body,(a=document.createElement("div")).innerHTML='<iframe id="'+i+'_iframe" name="'+i+'_iframe" src="javascript:&quot;&quot;" style="display:none"></iframe>',l=a.firstChild,e.appendChild(l),g.addEvent(l,"load",function(){var e;try{e=l.contentWindow.document||l.contentDocument||window.frames[l.id].document,/^4(0[0-9]|1[0-7]|2[2346])\s/.test(e.title)?u=e.title.replace(/^(\d+).*$/,"$1"):(u=200,c=m.trim(e.body.innerHTML),s.trigger({type:"progress",loaded:c.length,total:c.length}),o&&s.trigger({type:"uploadprogress",loaded:o.size||1025,total:o.size||1025}))}catch(e){if(!f.hasSameOrigin(t.url))return void d.call(s,function(){s.trigger("error")});u=404}d.call(s,function(){s.trigger("load")})},s.uid),n.submit(),s.trigger("loadstart")},getStatus:function(){return u},getResponse:function(e){if("json"===e&&"string"===m.typeOf(c)&&window.JSON)try{return JSON.parse(c.replace(/^\s*<pre[^>]*>/,"").replace(/<\/pre>\s*$/,""))}catch(e){return null}return c},abort:function(){var e=this;l&&l.contentWindow&&(l.contentWindow.stop?l.contentWindow.stop():l.contentWindow.document.execCommand?l.contentWindow.document.execCommand("Stop"):l.src="about:blank"),d.call(this,function(){e.dispatchEvent("abort")})}})}}),e("moxie/runtime/html4/image/Image",["moxie/runtime/html4/Runtime","moxie/runtime/html5/image/Image"],function(e,t){return e.Image=t});for(var t=["moxie/core/utils/Basic","moxie/core/utils/Env","moxie/core/I18n","moxie/core/utils/Mime","moxie/core/utils/Dom","moxie/core/Exceptions","moxie/core/EventTarget","moxie/runtime/Runtime","moxie/runtime/RuntimeClient","moxie/file/FileInput","moxie/core/utils/Encode","moxie/file/Blob","moxie/file/File","moxie/file/FileDrop","moxie/file/FileReader","moxie/core/utils/Url","moxie/runtime/RuntimeTarget","moxie/file/FileReaderSync","moxie/xhr/FormData","moxie/xhr/XMLHttpRequest","moxie/runtime/Transporter","moxie/image/Image","moxie/core/utils/Events"],i=0;i<t.length;i++){for(var r=o,a=t[i],u=a.split(/[.\/]/),c=0;c<u.length-1;++c)r[u[c]]===x&&(r[u[c]]={}),r=r[u[c]];r[u[u.length-1]]=s[a]}}(this),function(e){"use strict";var r={},o=e.moxie.core.utils.Basic.inArray;!function e(t){var i,n;for(i in t)"object"!=(n=typeof t[i])||~o(i,["Exceptions","Env","Mime"])?"function"==n&&(r[i]=t[i]):e(t[i])}(e.moxie),r.Env=e.moxie.core.utils.Env,r.Mime=e.moxie.core.utils.Mime,r.Exceptions=e.moxie.core.Exceptions,e.mOxie=r,e.o||(e.o=r)}(this);                                                                                                                                                              plupload/plupload.js                                                                                0000644                 00000165632 15212564046 0010564 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * Plupload - multi-runtime File Uploader
 * v2.1.9
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 *
 * Date: 2016-05-15
 */
/**
 * Plupload.js
 *
 * Copyright 2013, Moxiecode Systems AB
 * Released under GPL License.
 *
 * License: http://www.plupload.com/license
 * Contributing: http://www.plupload.com/contributing
 */

/**
 * Modified for WordPress, Silverlight and Flash runtimes support was removed.
 * See https://core.trac.wordpress.org/ticket/41755.
 */

/*global mOxie:true */

;(function(window, o, undef) {

var delay = window.setTimeout
, fileFilters = {}
;

// convert plupload features to caps acceptable by mOxie
function normalizeCaps(settings) {		
	var features = settings.required_features, caps = {};

	function resolve(feature, value, strict) {
		// Feature notation is deprecated, use caps (this thing here is required for backward compatibility)
		var map = { 
			chunks: 'slice_blob',
			jpgresize: 'send_binary_string',
			pngresize: 'send_binary_string',
			progress: 'report_upload_progress',
			multi_selection: 'select_multiple',
			dragdrop: 'drag_and_drop',
			drop_element: 'drag_and_drop',
			headers: 'send_custom_headers',
			urlstream_upload: 'send_binary_string',
			canSendBinary: 'send_binary',
			triggerDialog: 'summon_file_dialog'
		};

		if (map[feature]) {
			caps[map[feature]] = value;
		} else if (!strict) {
			caps[feature] = value;
		}
	}

	if (typeof(features) === 'string') {
		plupload.each(features.split(/\s*,\s*/), function(feature) {
			resolve(feature, true);
		});
	} else if (typeof(features) === 'object') {
		plupload.each(features, function(value, feature) {
			resolve(feature, value);
		});
	} else if (features === true) {
		// check settings for required features
		if (settings.chunk_size > 0) {
			caps.slice_blob = true;
		}

		if (settings.resize.enabled || !settings.multipart) {
			caps.send_binary_string = true;
		}
		
		plupload.each(settings, function(value, feature) {
			resolve(feature, !!value, true); // strict check
		});
	}

	// WP: only html runtimes.
	settings.runtimes = 'html5,html4';

	return caps;
}

/** 
 * @module plupload	
 * @static
 */
var plupload = {
	/**
	 * Plupload version will be replaced on build.
	 *
	 * @property VERSION
	 * @for Plupload
	 * @static
	 * @final
	 */
	VERSION : '2.1.9',

	/**
	 * The state of the queue before it has started and after it has finished
	 *
	 * @property STOPPED
	 * @static
	 * @final
	 */
	STOPPED : 1,

	/**
	 * Upload process is running
	 *
	 * @property STARTED
	 * @static
	 * @final
	 */
	STARTED : 2,

	/**
	 * File is queued for upload
	 *
	 * @property QUEUED
	 * @static
	 * @final
	 */
	QUEUED : 1,

	/**
	 * File is being uploaded
	 *
	 * @property UPLOADING
	 * @static
	 * @final
	 */
	UPLOADING : 2,

	/**
	 * File has failed to be uploaded
	 *
	 * @property FAILED
	 * @static
	 * @final
	 */
	FAILED : 4,

	/**
	 * File has been uploaded successfully
	 *
	 * @property DONE
	 * @static
	 * @final
	 */
	DONE : 5,

	// Error constants used by the Error event

	/**
	 * Generic error for example if an exception is thrown inside Silverlight.
	 *
	 * @property GENERIC_ERROR
	 * @static
	 * @final
	 */
	GENERIC_ERROR : -100,

	/**
	 * HTTP transport error. For example if the server produces a HTTP status other than 200.
	 *
	 * @property HTTP_ERROR
	 * @static
	 * @final
	 */
	HTTP_ERROR : -200,

	/**
	 * Generic I/O error. For example if it wasn't possible to open the file stream on local machine.
	 *
	 * @property IO_ERROR
	 * @static
	 * @final
	 */
	IO_ERROR : -300,

	/**
	 * @property SECURITY_ERROR
	 * @static
	 * @final
	 */
	SECURITY_ERROR : -400,

	/**
	 * Initialization error. Will be triggered if no runtime was initialized.
	 *
	 * @property INIT_ERROR
	 * @static
	 * @final
	 */
	INIT_ERROR : -500,

	/**
	 * File size error. If the user selects a file that is too large it will be blocked and an error of this type will be triggered.
	 *
	 * @property FILE_SIZE_ERROR
	 * @static
	 * @final
	 */
	FILE_SIZE_ERROR : -600,

	/**
	 * File extension error. If the user selects a file that isn't valid according to the filters setting.
	 *
	 * @property FILE_EXTENSION_ERROR
	 * @static
	 * @final
	 */
	FILE_EXTENSION_ERROR : -601,

	/**
	 * Duplicate file error. If prevent_duplicates is set to true and user selects the same file again.
	 *
	 * @property FILE_DUPLICATE_ERROR
	 * @static
	 * @final
	 */
	FILE_DUPLICATE_ERROR : -602,

	/**
	 * Runtime will try to detect if image is proper one. Otherwise will throw this error.
	 *
	 * @property IMAGE_FORMAT_ERROR
	 * @static
	 * @final
	 */
	IMAGE_FORMAT_ERROR : -700,

	/**
	 * While working on files runtime may run out of memory and will throw this error.
	 *
	 * @since 2.1.2
	 * @property MEMORY_ERROR
	 * @static
	 * @final
	 */
	MEMORY_ERROR : -701,

	/**
	 * Each runtime has an upper limit on a dimension of the image it can handle. If bigger, will throw this error.
	 *
	 * @property IMAGE_DIMENSIONS_ERROR
	 * @static
	 * @final
	 */
	IMAGE_DIMENSIONS_ERROR : -702,

	/**
	 * Mime type lookup table.
	 *
	 * @property mimeTypes
	 * @type Object
	 * @final
	 */
	mimeTypes : o.mimes,

	/**
	 * In some cases sniffing is the only way around :(
	 */
	ua: o.ua,

	/**
	 * Gets the true type of the built-in object (better version of typeof).
	 * @credits Angus Croll (http://javascriptweblog.wordpress.com/)
	 *
	 * @method typeOf
	 * @static
	 * @param {Object} o Object to check.
	 * @return {String} Object [[Class]]
	 */
	typeOf: o.typeOf,

	/**
	 * Extends the specified object with another object.
	 *
	 * @method extend
	 * @static
	 * @param {Object} target Object to extend.
	 * @param {Object..} obj Multiple objects to extend with.
	 * @return {Object} Same as target, the extended object.
	 */
	extend : o.extend,

	/**
	 * Generates an unique ID. This is 99.99% unique since it takes the current time and 5 random numbers.
	 * The only way a user would be able to get the same ID is if the two persons at the same exact millisecond manages
	 * to get 5 the same random numbers between 0-65535 it also uses a counter so each call will be guaranteed to be page unique.
	 * It's more probable for the earth to be hit with an asteriod. You can also if you want to be 100% sure set the plupload.guidPrefix property
	 * to an user unique key.
	 *
	 * @method guid
	 * @static
	 * @return {String} Virtually unique id.
	 */
	guid : o.guid,

	/**
	 * Get array of DOM Elements by their ids.
	 * 
	 * @method get
	 * @param {String} id Identifier of the DOM Element
	 * @return {Array}
	*/
	getAll : function get(ids) {
		var els = [], el;

		if (plupload.typeOf(ids) !== 'array') {
			ids = [ids];
		}

		var i = ids.length;
		while (i--) {
			el = plupload.get(ids[i]);
			if (el) {
				els.push(el);
			}
		}

		return els.length ? els : null;
	},

	/**
	Get DOM element by id

	@method get
	@param {String} id Identifier of the DOM Element
	@return {Node}
	*/
	get: o.get,

	/**
	 * Executes the callback function for each item in array/object. If you return false in the
	 * callback it will break the loop.
	 *
	 * @method each
	 * @static
	 * @param {Object} obj Object to iterate.
	 * @param {function} callback Callback function to execute for each item.
	 */
	each : o.each,

	/**
	 * Returns the absolute x, y position of an Element. The position will be returned in a object with x, y fields.
	 *
	 * @method getPos
	 * @static
	 * @param {Element} node HTML element or element id to get x, y position from.
	 * @param {Element} root Optional root element to stop calculations at.
	 * @return {object} Absolute position of the specified element object with x, y fields.
	 */
	getPos : o.getPos,

	/**
	 * Returns the size of the specified node in pixels.
	 *
	 * @method getSize
	 * @static
	 * @param {Node} node Node to get the size of.
	 * @return {Object} Object with a w and h property.
	 */
	getSize : o.getSize,

	/**
	 * Encodes the specified string.
	 *
	 * @method xmlEncode
	 * @static
	 * @param {String} s String to encode.
	 * @return {String} Encoded string.
	 */
	xmlEncode : function(str) {
		var xmlEncodeChars = {'<' : 'lt', '>' : 'gt', '&' : 'amp', '"' : 'quot', '\'' : '#39'}, xmlEncodeRegExp = /[<>&\"\']/g;

		return str ? ('' + str).replace(xmlEncodeRegExp, function(chr) {
			return xmlEncodeChars[chr] ? '&' + xmlEncodeChars[chr] + ';' : chr;
		}) : str;
	},

	/**
	 * Forces anything into an array.
	 *
	 * @method toArray
	 * @static
	 * @param {Object} obj Object with length field.
	 * @return {Array} Array object containing all items.
	 */
	toArray : o.toArray,

	/**
	 * Find an element in array and return its index if present, otherwise return -1.
	 *
	 * @method inArray
	 * @static
	 * @param {mixed} needle Element to find
	 * @param {Array} array
	 * @return {Int} Index of the element, or -1 if not found
	 */
	inArray : o.inArray,

	/**
	 * Extends the language pack object with new items.
	 *
	 * @method addI18n
	 * @static
	 * @param {Object} pack Language pack items to add.
	 * @return {Object} Extended language pack object.
	 */
	addI18n : o.addI18n,

	/**
	 * Translates the specified string by checking for the english string in the language pack lookup.
	 *
	 * @method translate
	 * @static
	 * @param {String} str String to look for.
	 * @return {String} Translated string or the input string if it wasn't found.
	 */
	translate : o.translate,

	/**
	 * Checks if object is empty.
	 *
	 * @method isEmptyObj
	 * @static
	 * @param {Object} obj Object to check.
	 * @return {Boolean}
	 */
	isEmptyObj : o.isEmptyObj,

	/**
	 * Checks if specified DOM element has specified class.
	 *
	 * @method hasClass
	 * @static
	 * @param {Object} obj DOM element like object to add handler to.
	 * @param {String} name Class name
	 */
	hasClass : o.hasClass,

	/**
	 * Adds specified className to specified DOM element.
	 *
	 * @method addClass
	 * @static
	 * @param {Object} obj DOM element like object to add handler to.
	 * @param {String} name Class name
	 */
	addClass : o.addClass,

	/**
	 * Removes specified className from specified DOM element.
	 *
	 * @method removeClass
	 * @static
	 * @param {Object} obj DOM element like object to add handler to.
	 * @param {String} name Class name
	 */
	removeClass : o.removeClass,

	/**
	 * Returns a given computed style of a DOM element.
	 *
	 * @method getStyle
	 * @static
	 * @param {Object} obj DOM element like object.
	 * @param {String} name Style you want to get from the DOM element
	 */
	getStyle : o.getStyle,

	/**
	 * Adds an event handler to the specified object and store reference to the handler
	 * in objects internal Plupload registry (@see removeEvent).
	 *
	 * @method addEvent
	 * @static
	 * @param {Object} obj DOM element like object to add handler to.
	 * @param {String} name Name to add event listener to.
	 * @param {Function} callback Function to call when event occurs.
	 * @param {String} (optional) key that might be used to add specifity to the event record.
	 */
	addEvent : o.addEvent,

	/**
	 * Remove event handler from the specified object. If third argument (callback)
	 * is not specified remove all events with the specified name.
	 *
	 * @method removeEvent
	 * @static
	 * @param {Object} obj DOM element to remove event listener(s) from.
	 * @param {String} name Name of event listener to remove.
	 * @param {Function|String} (optional) might be a callback or unique key to match.
	 */
	removeEvent: o.removeEvent,

	/**
	 * Remove all kind of events from the specified object
	 *
	 * @method removeAllEvents
	 * @static
	 * @param {Object} obj DOM element to remove event listeners from.
	 * @param {String} (optional) unique key to match, when removing events.
	 */
	removeAllEvents: o.removeAllEvents,

	/**
	 * Cleans the specified name from national characters (diacritics). The result will be a name with only a-z, 0-9 and _.
	 *
	 * @method cleanName
	 * @static
	 * @param {String} s String to clean up.
	 * @return {String} Cleaned string.
	 */
	cleanName : function(name) {
		var i, lookup;

		// Replace diacritics
		lookup = [
			/[\300-\306]/g, 'A', /[\340-\346]/g, 'a',
			/\307/g, 'C', /\347/g, 'c',
			/[\310-\313]/g, 'E', /[\350-\353]/g, 'e',
			/[\314-\317]/g, 'I', /[\354-\357]/g, 'i',
			/\321/g, 'N', /\361/g, 'n',
			/[\322-\330]/g, 'O', /[\362-\370]/g, 'o',
			/[\331-\334]/g, 'U', /[\371-\374]/g, 'u'
		];

		for (i = 0; i < lookup.length; i += 2) {
			name = name.replace(lookup[i], lookup[i + 1]);
		}

		// Replace whitespace
		name = name.replace(/\s+/g, '_');

		// Remove anything else
		name = name.replace(/[^a-z0-9_\-\.]+/gi, '');

		return name;
	},

	/**
	 * Builds a full url out of a base URL and an object with items to append as query string items.
	 *
	 * @method buildUrl
	 * @static
	 * @param {String} url Base URL to append query string items to.
	 * @param {Object} items Name/value object to serialize as a querystring.
	 * @return {String} String with url + serialized query string items.
	 */
	buildUrl : function(url, items) {
		var query = '';

		plupload.each(items, function(value, name) {
			query += (query ? '&' : '') + encodeURIComponent(name) + '=' + encodeURIComponent(value);
		});

		if (query) {
			url += (url.indexOf('?') > 0 ? '&' : '?') + query;
		}

		return url;
	},

	/**
	 * Formats the specified number as a size string for example 1024 becomes 1 KB.
	 *
	 * @method formatSize
	 * @static
	 * @param {Number} size Size to format as string.
	 * @return {String} Formatted size string.
	 */
	formatSize : function(size) {

		if (size === undef || /\D/.test(size)) {
			return plupload.translate('N/A');
		}

		function round(num, precision) {
			return Math.round(num * Math.pow(10, precision)) / Math.pow(10, precision);
		}

		var boundary = Math.pow(1024, 4);

		// TB
		if (size > boundary) {
			return round(size / boundary, 1) + " " + plupload.translate('tb');
		}

		// GB
		if (size > (boundary/=1024)) {
			return round(size / boundary, 1) + " " + plupload.translate('gb');
		}

		// MB
		if (size > (boundary/=1024)) {
			return round(size / boundary, 1) + " " + plupload.translate('mb');
		}

		// KB
		if (size > 1024) {
			return Math.round(size / 1024) + " " + plupload.translate('kb');
		}

		return size + " " + plupload.translate('b');
	},


	/**
	 * Parses the specified size string into a byte value. For example 10kb becomes 10240.
	 *
	 * @method parseSize
	 * @static
	 * @param {String|Number} size String to parse or number to just pass through.
	 * @return {Number} Size in bytes.
	 */
	parseSize : o.parseSizeStr,


	/**
	 * A way to predict what runtime will be choosen in the current environment with the
	 * specified settings.
	 *
	 * @method predictRuntime
	 * @static
	 * @param {Object|String} config Plupload settings to check
	 * @param {String} [runtimes] Comma-separated list of runtimes to check against
	 * @return {String} Type of compatible runtime
	 */
	predictRuntime : function(config, runtimes) {
		var up, runtime;

		up = new plupload.Uploader(config);
		runtime = o.Runtime.thatCan(up.getOption().required_features, runtimes || config.runtimes);
		up.destroy();
		return runtime;
	},

	/**
	 * Registers a filter that will be executed for each file added to the queue.
	 * If callback returns false, file will not be added.
	 *
	 * Callback receives two arguments: a value for the filter as it was specified in settings.filters
	 * and a file to be filtered. Callback is executed in the context of uploader instance.
	 *
	 * @method addFileFilter
	 * @static
	 * @param {String} name Name of the filter by which it can be referenced in settings.filters
	 * @param {String} cb Callback - the actual routine that every added file must pass
	 */
	addFileFilter: function(name, cb) {
		fileFilters[name] = cb;
	}
};


plupload.addFileFilter('mime_types', function(filters, file, cb) {
	if (filters.length && !filters.regexp.test(file.name)) {
		this.trigger('Error', {
			code : plupload.FILE_EXTENSION_ERROR,
			message : plupload.translate('File extension error.'),
			file : file
		});
		cb(false);
	} else {
		cb(true);
	}
});


plupload.addFileFilter('max_file_size', function(maxSize, file, cb) {
	var undef;

	maxSize = plupload.parseSize(maxSize);

	// Invalid file size
	if (file.size !== undef && maxSize && file.size > maxSize) {
		this.trigger('Error', {
			code : plupload.FILE_SIZE_ERROR,
			message : plupload.translate('File size error.'),
			file : file
		});
		cb(false);
	} else {
		cb(true);
	}
});


plupload.addFileFilter('prevent_duplicates', function(value, file, cb) {
	if (value) {
		var ii = this.files.length;
		while (ii--) {
			// Compare by name and size (size might be 0 or undefined, but still equivalent for both)
			if (file.name === this.files[ii].name && file.size === this.files[ii].size) {
				this.trigger('Error', {
					code : plupload.FILE_DUPLICATE_ERROR,
					message : plupload.translate('Duplicate file error.'),
					file : file
				});
				cb(false);
				return;
			}
		}
	}
	cb(true);
});


/**
@class Uploader
@constructor

@param {Object} settings For detailed information about each option check documentation.
	@param {String|DOMElement} settings.browse_button id of the DOM element or DOM element itself to use as file dialog trigger.
	@param {String} settings.url URL of the server-side upload handler.
	@param {Number|String} [settings.chunk_size=0] Chunk size in bytes to slice the file into. Shorcuts with b, kb, mb, gb, tb suffixes also supported. `e.g. 204800 or "204800b" or "200kb"`. By default - disabled.
	@param {Boolean} [settings.send_chunk_number=true] Whether to send chunks and chunk numbers, or total and offset bytes.
	@param {String|DOMElement} [settings.container] id of the DOM element or DOM element itself that will be used to wrap uploader structures. Defaults to immediate parent of the `browse_button` element.
	@param {String|DOMElement} [settings.drop_element] id of the DOM element or DOM element itself to use as a drop zone for Drag-n-Drop.
	@param {String} [settings.file_data_name="file"] Name for the file field in Multipart formated message.
	@param {Object} [settings.filters={}] Set of file type filters.
		@param {Array} [settings.filters.mime_types=[]] List of file types to accept, each one defined by title and list of extensions. `e.g. {title : "Image files", extensions : "jpg,jpeg,gif,png"}`. Dispatches `plupload.FILE_EXTENSION_ERROR`
		@param {String|Number} [settings.filters.max_file_size=0] Maximum file size that the user can pick, in bytes. Optionally supports b, kb, mb, gb, tb suffixes. `e.g. "10mb" or "1gb"`. By default - not set. Dispatches `plupload.FILE_SIZE_ERROR`.
		@param {Boolean} [settings.filters.prevent_duplicates=false] Do not let duplicates into the queue. Dispatches `plupload.FILE_DUPLICATE_ERROR`.
	@param {String} [settings.flash_swf_url] URL of the Flash swf. (Not used in WordPress)
	@param {Object} [settings.headers] Custom headers to send with the upload. Hash of name/value pairs.
	@param {Number} [settings.max_retries=0] How many times to retry the chunk or file, before triggering Error event.
	@param {Boolean} [settings.multipart=true] Whether to send file and additional parameters as Multipart formated message.
	@param {Object} [settings.multipart_params] Hash of key/value pairs to send with every file upload.
	@param {Boolean} [settings.multi_selection=true] Enable ability to select multiple files at once in file dialog.
	@param {String|Object} [settings.required_features] Either comma-separated list or hash of required features that chosen runtime should absolutely possess.
	@param {Object} [settings.resize] Enable resizng of images on client-side. Applies to `image/jpeg` and `image/png` only. `e.g. {width : 200, height : 200, quality : 90, crop: true}`
		@param {Number} [settings.resize.width] If image is bigger, it will be resized.
		@param {Number} [settings.resize.height] If image is bigger, it will be resized.
		@param {Number} [settings.resize.quality=90] Compression quality for jpegs (1-100).
		@param {Boolean} [settings.resize.crop=false] Whether to crop images to exact dimensions. By default they will be resized proportionally.
	@param {String} [settings.runtimes="html5,html4"] Comma separated list of runtimes, that Plupload will try in turn, moving to the next if previous fails.
	@param {String} [settings.silverlight_xap_url] URL of the Silverlight xap. (Not used in WordPress)
	@param {Boolean} [settings.unique_names=false] If true will generate unique filenames for uploaded files.
	@param {Boolean} [settings.send_file_name=true] Whether to send file name as additional argument - 'name' (required for chunked uploads and some other cases where file name cannot be sent via normal ways).
*/
plupload.Uploader = function(options) {
	/**
	Fires when the current RunTime has been initialized.
	
	@event Init
	@param {plupload.Uploader} uploader Uploader instance sending the event.
	 */

	/**
	Fires after the init event incase you need to perform actions there.
	
	@event PostInit
	@param {plupload.Uploader} uploader Uploader instance sending the event.
	 */

	/**
	Fires when the option is changed in via uploader.setOption().
	
	@event OptionChanged
	@since 2.1
	@param {plupload.Uploader} uploader Uploader instance sending the event.
	@param {String} name Name of the option that was changed
	@param {Mixed} value New value for the specified option
	@param {Mixed} oldValue Previous value of the option
	 */

	/**
	Fires when the silverlight/flash or other shim needs to move.
	
	@event Refresh
	@param {plupload.Uploader} uploader Uploader instance sending the event.
	 */

	/**
	Fires when the overall state is being changed for the upload queue.
	
	@event StateChanged
	@param {plupload.Uploader} uploader Uploader instance sending the event.
	 */

	/**
	Fires when browse_button is clicked and browse dialog shows.
	
	@event Browse
	@since 2.1.2
	@param {plupload.Uploader} uploader Uploader instance sending the event.
	 */	

	/**
	Fires for every filtered file before it is added to the queue.
	
	@event FileFiltered
	@since 2.1
	@param {plupload.Uploader} uploader Uploader instance sending the event.
	@param {plupload.File} file Another file that has to be added to the queue.
	 */

	/**
	Fires when the file queue is changed. In other words when files are added/removed to the files array of the uploader instance.
	
	@event QueueChanged
	@param {plupload.Uploader} uploader Uploader instance sending the event.
	 */ 

	/**
	Fires after files were filtered and added to the queue.
	
	@event FilesAdded
	@param {plupload.Uploader} uploader Uploader instance sending the event.
	@param {Array} files Array of file objects that were added to queue by the user.
	 */

	/**
	Fires when file is removed from the queue.
	
	@event FilesRemoved
	@param {plupload.Uploader} uploader Uploader instance sending the event.
	@param {Array} files Array of files that got removed.
	 */

	/**
	Fires just before a file is uploaded. Can be used to cancel the upload for the specified file
	by returning false from the handler.
	
	@event BeforeUpload
	@param {plupload.Uploader} uploader Uploader instance sending the event.
	@param {plupload.File} file File to be uploaded.
	 */

	/**
	Fires when a file is to be uploaded by the runtime.
	
	@event UploadFile
	@param {plupload.Uploader} uploader Uploader instance sending the event.
	@param {plupload.File} file File to be uploaded.
	 */

	/**
	Fires while a file is being uploaded. Use this event to update the current file upload progress.
	
	@event UploadProgress
	@param {plupload.Uploader} uploader Uploader instance sending the event.
	@param {plupload.File} file File that is currently being uploaded.
	 */	

	/**
	Fires when file chunk is uploaded.
	
	@event ChunkUploaded
	@param {plupload.Uploader} uploader Uploader instance sending the event.
	@param {plupload.File} file File that the chunk was uploaded for.
	@param {Object} result Object with response properties.
		@param {Number} result.offset The amount of bytes the server has received so far, including this chunk.
		@param {Number} result.total The size of the file.
		@param {String} result.response The response body sent by the server.
		@param {Number} result.status The HTTP status code sent by the server.
		@param {String} result.responseHeaders All the response headers as a single string.
	 */

	/**
	Fires when a file is successfully uploaded.
	
	@event FileUploaded
	@param {plupload.Uploader} uploader Uploader instance sending the event.
	@param {plupload.File} file File that was uploaded.
	@param {Object} result Object with response properties.
		@param {String} result.response The response body sent by the server.
		@param {Number} result.status The HTTP status code sent by the server.
		@param {String} result.responseHeaders All the response headers as a single string.
	 */

	/**
	Fires when all files in a queue are uploaded.
	
	@event UploadComplete
	@param {plupload.Uploader} uploader Uploader instance sending the event.
	@param {Array} files Array of file objects that was added to queue/selected by the user.
	 */

	/**
	Fires when a error occurs.
	
	@event Error
	@param {plupload.Uploader} uploader Uploader instance sending the event.
	@param {Object} error Contains code, message and sometimes file and other details.
		@param {Number} error.code The plupload error code.
		@param {String} error.message Description of the error (uses i18n).
	 */

	/**
	Fires when destroy method is called.
	
	@event Destroy
	@param {plupload.Uploader} uploader Uploader instance sending the event.
	 */
	var uid = plupload.guid()
	, settings
	, files = []
	, preferred_caps = {}
	, fileInputs = []
	, fileDrops = []
	, startTime
	, total
	, disabled = false
	, xhr
	;


	// Private methods
	function uploadNext() {
		var file, count = 0, i;

		if (this.state == plupload.STARTED) {
			// Find first QUEUED file
			for (i = 0; i < files.length; i++) {
				if (!file && files[i].status == plupload.QUEUED) {
					file = files[i];
					if (this.trigger("BeforeUpload", file)) {
						file.status = plupload.UPLOADING;
						this.trigger("UploadFile", file);
					}
				} else {
					count++;
				}
			}

			// All files are DONE or FAILED
			if (count == files.length) {
				if (this.state !== plupload.STOPPED) {
					this.state = plupload.STOPPED;
					this.trigger("StateChanged");
				}
				this.trigger("UploadComplete", files);
			}
		}
	}


	function calcFile(file) {
		file.percent = file.size > 0 ? Math.ceil(file.loaded / file.size * 100) : 100;
		calc();
	}


	function calc() {
		var i, file;

		// Reset stats
		total.reset();

		// Check status, size, loaded etc on all files
		for (i = 0; i < files.length; i++) {
			file = files[i];

			if (file.size !== undef) {
				// We calculate totals based on original file size
				total.size += file.origSize;

				// Since we cannot predict file size after resize, we do opposite and
				// interpolate loaded amount to match magnitude of total
				total.loaded += file.loaded * file.origSize / file.size;
			} else {
				total.size = undef;
			}

			if (file.status == plupload.DONE) {
				total.uploaded++;
			} else if (file.status == plupload.FAILED) {
				total.failed++;
			} else {
				total.queued++;
			}
		}

		// If we couldn't calculate a total file size then use the number of files to calc percent
		if (total.size === undef) {
			total.percent = files.length > 0 ? Math.ceil(total.uploaded / files.length * 100) : 0;
		} else {
			total.bytesPerSec = Math.ceil(total.loaded / ((+new Date() - startTime || 1) / 1000.0));
			total.percent = total.size > 0 ? Math.ceil(total.loaded / total.size * 100) : 0;
		}
	}


	function getRUID() {
		var ctrl = fileInputs[0] || fileDrops[0];
		if (ctrl) {
			return ctrl.getRuntime().uid;
		}
		return false;
	}


	function runtimeCan(file, cap) {
		if (file.ruid) {
			var info = o.Runtime.getInfo(file.ruid);
			if (info) {
				return info.can(cap);
			}
		}
		return false;
	}


	function bindEventListeners() {
		this.bind('FilesAdded FilesRemoved', function(up) {
			up.trigger('QueueChanged');
			up.refresh();
		});

		this.bind('CancelUpload', onCancelUpload);
		
		this.bind('BeforeUpload', onBeforeUpload);

		this.bind('UploadFile', onUploadFile);

		this.bind('UploadProgress', onUploadProgress);

		this.bind('StateChanged', onStateChanged);

		this.bind('QueueChanged', calc);

		this.bind('Error', onError);

		this.bind('FileUploaded', onFileUploaded);

		this.bind('Destroy', onDestroy);
	}


	function initControls(settings, cb) {
		var self = this, inited = 0, queue = [];

		// common settings
		var options = {
			runtime_order: settings.runtimes,
			required_caps: settings.required_features,
			preferred_caps: preferred_caps
		};

		// add runtime specific options if any
		plupload.each(settings.runtimes.split(/\s*,\s*/), function(runtime) {
			if (settings[runtime]) {
				options[runtime] = settings[runtime];
			}
		});

		// initialize file pickers - there can be many
		if (settings.browse_button) {
			plupload.each(settings.browse_button, function(el) {
				queue.push(function(cb) {
					var fileInput = new o.FileInput(plupload.extend({}, options, {
						accept: settings.filters.mime_types,
						name: settings.file_data_name,
						multiple: settings.multi_selection,
						container: settings.container,
						browse_button: el
					}));

					fileInput.onready = function() {
						var info = o.Runtime.getInfo(this.ruid);

						// for backward compatibility
						o.extend(self.features, {
							chunks: info.can('slice_blob'),
							multipart: info.can('send_multipart'),
							multi_selection: info.can('select_multiple')
						});

						inited++;
						fileInputs.push(this);
						cb();
					};

					fileInput.onchange = function() {
						self.addFile(this.files);
					};

					fileInput.bind('mouseenter mouseleave mousedown mouseup', function(e) {
						if (!disabled) {
							if (settings.browse_button_hover) {
								if ('mouseenter' === e.type) {
									o.addClass(el, settings.browse_button_hover);
								} else if ('mouseleave' === e.type) {
									o.removeClass(el, settings.browse_button_hover);
								}
							}

							if (settings.browse_button_active) {
								if ('mousedown' === e.type) {
									o.addClass(el, settings.browse_button_active);
								} else if ('mouseup' === e.type) {
									o.removeClass(el, settings.browse_button_active);
								}
							}
						}
					});

					fileInput.bind('mousedown', function() {
						self.trigger('Browse');
					});

					fileInput.bind('error runtimeerror', function() {
						fileInput = null;
						cb();
					});

					fileInput.init();
				});
			});
		}

		// initialize drop zones
		if (settings.drop_element) {
			plupload.each(settings.drop_element, function(el) {
				queue.push(function(cb) {
					var fileDrop = new o.FileDrop(plupload.extend({}, options, {
						drop_zone: el
					}));

					fileDrop.onready = function() {
						var info = o.Runtime.getInfo(this.ruid);

						// for backward compatibility
						o.extend(self.features, {
							chunks: info.can('slice_blob'),
							multipart: info.can('send_multipart'),
							dragdrop: info.can('drag_and_drop')
						});

						inited++;
						fileDrops.push(this);
						cb();
					};

					fileDrop.ondrop = function() {
						self.addFile(this.files);
					};

					fileDrop.bind('error runtimeerror', function() {
						fileDrop = null;
						cb();
					});

					fileDrop.init();
				});
			});
		}


		o.inSeries(queue, function() {
			if (typeof(cb) === 'function') {
				cb(inited);
			}
		});
	}


	function resizeImage(blob, params, cb) {
		var img = new o.Image();

		try {
			img.onload = function() {
				// no manipulation required if...
				if (params.width > this.width &&
					params.height > this.height &&
					params.quality === undef &&
					params.preserve_headers &&
					!params.crop
				) {
					this.destroy();
					return cb(blob);
				}
				// otherwise downsize
				img.downsize(params.width, params.height, params.crop, params.preserve_headers);
			};

			img.onresize = function() {
				cb(this.getAsBlob(blob.type, params.quality));
				this.destroy();
			};

			img.onerror = function() {
				cb(blob);
			};

			img.load(blob);
		} catch(ex) {
			cb(blob);
		}
	}


	function setOption(option, value, init) {
		var self = this, reinitRequired = false;

		function _setOption(option, value, init) {
			var oldValue = settings[option];

			switch (option) {
				case 'max_file_size':
					if (option === 'max_file_size') {
						settings.max_file_size = settings.filters.max_file_size = value;
					}
					break;

				case 'chunk_size':
					if (value = plupload.parseSize(value)) {
						settings[option] = value;
						settings.send_file_name = true;
					}
					break;

				case 'multipart':
					settings[option] = value;
					if (!value) {
						settings.send_file_name = true;
					}
					break;

				case 'unique_names':
					settings[option] = value;
					if (value) {
						settings.send_file_name = true;
					}
					break;

				case 'filters':
					// for sake of backward compatibility
					if (plupload.typeOf(value) === 'array') {
						value = {
							mime_types: value
						};
					}

					if (init) {
						plupload.extend(settings.filters, value);
					} else {
						settings.filters = value;
					}

					// if file format filters are being updated, regenerate the matching expressions
					if (value.mime_types) {
						settings.filters.mime_types.regexp = (function(filters) {
							var extensionsRegExp = [];

							plupload.each(filters, function(filter) {
								plupload.each(filter.extensions.split(/,/), function(ext) {
									if (/^\s*\*\s*$/.test(ext)) {
										extensionsRegExp.push('\\.*');
									} else {
										extensionsRegExp.push('\\.' + ext.replace(new RegExp('[' + ('/^$.*+?|()[]{}\\'.replace(/./g, '\\$&')) + ']', 'g'), '\\$&'));
									}
								});
							});

							return new RegExp('(' + extensionsRegExp.join('|') + ')$', 'i');
						}(settings.filters.mime_types));
					}
					break;
	
				case 'resize':
					if (init) {
						plupload.extend(settings.resize, value, {
							enabled: true
						});
					} else {
						settings.resize = value;
					}
					break;

				case 'prevent_duplicates':
					settings.prevent_duplicates = settings.filters.prevent_duplicates = !!value;
					break;

				// options that require reinitialisation
				case 'container':
				case 'browse_button':
				case 'drop_element':
						value = 'container' === option
							? plupload.get(value)
							: plupload.getAll(value)
							; 
				
				case 'runtimes':
				case 'multi_selection':
					settings[option] = value;
					if (!init) {
						reinitRequired = true;
					}
					break;

				default:
					settings[option] = value;
			}

			if (!init) {
				self.trigger('OptionChanged', option, value, oldValue);
			}
		}

		if (typeof(option) === 'object') {
			plupload.each(option, function(value, option) {
				_setOption(option, value, init);
			});
		} else {
			_setOption(option, value, init);
		}

		if (init) {
			// Normalize the list of required capabilities
			settings.required_features = normalizeCaps(plupload.extend({}, settings));

			// Come up with the list of capabilities that can affect default mode in a multi-mode runtimes
			preferred_caps = normalizeCaps(plupload.extend({}, settings, {
				required_features: true
			}));
		} else if (reinitRequired) {
			self.trigger('Destroy');
			
			initControls.call(self, settings, function(inited) {
				if (inited) {
					self.runtime = o.Runtime.getInfo(getRUID()).type;
					self.trigger('Init', { runtime: self.runtime });
					self.trigger('PostInit');
				} else {
					self.trigger('Error', {
						code : plupload.INIT_ERROR,
						message : plupload.translate('Init error.')
					});
				}
			});
		}
	}


	// Internal event handlers
	function onBeforeUpload(up, file) {
		// Generate unique target filenames
		if (up.settings.unique_names) {
			var matches = file.name.match(/\.([^.]+)$/), ext = "part";
			if (matches) {
				ext = matches[1];
			}
			file.target_name = file.id + '.' + ext;
		}
	}


	function onUploadFile(up, file) {
		var url = up.settings.url
		, chunkSize = up.settings.chunk_size
		, retries = up.settings.max_retries
		, features = up.features
		, offset = 0
		, blob
		;

		// make sure we start at a predictable offset
		if (file.loaded) {
			offset = file.loaded = chunkSize ? chunkSize * Math.floor(file.loaded / chunkSize) : 0;
		}

		function handleError() {
			if (retries-- > 0) {
				delay(uploadNextChunk, 1000);
			} else {
				file.loaded = offset; // reset all progress

				up.trigger('Error', {
					code : plupload.HTTP_ERROR,
					message : plupload.translate('HTTP Error.'),
					file : file,
					response : xhr.responseText,
					status : xhr.status,
					responseHeaders: xhr.getAllResponseHeaders()
				});
			}
		}

		function uploadNextChunk() {
			var chunkBlob, formData, args = {}, curChunkSize;

			// make sure that file wasn't cancelled and upload is not stopped in general
			if (file.status !== plupload.UPLOADING || up.state === plupload.STOPPED) {
				return;
			}

			// send additional 'name' parameter only if required
			if (up.settings.send_file_name) {
				args.name = file.target_name || file.name;
			}

			if (chunkSize && features.chunks && blob.size > chunkSize) { // blob will be of type string if it was loaded in memory 
				curChunkSize = Math.min(chunkSize, blob.size - offset);
				chunkBlob = blob.slice(offset, offset + curChunkSize);
			} else {
				curChunkSize = blob.size;
				chunkBlob = blob;
			}

			// If chunking is enabled add corresponding args, no matter if file is bigger than chunk or smaller
			if (chunkSize && features.chunks) {
				// Setup query string arguments
				if (up.settings.send_chunk_number) {
					args.chunk = Math.ceil(offset / chunkSize);
					args.chunks = Math.ceil(blob.size / chunkSize);
				} else { // keep support for experimental chunk format, just in case
					args.offset = offset;
					args.total = blob.size;
				}
			}

			xhr = new o.XMLHttpRequest();

			// Do we have upload progress support
			if (xhr.upload) {
				xhr.upload.onprogress = function(e) {
					file.loaded = Math.min(file.size, offset + e.loaded);
					up.trigger('UploadProgress', file);
				};
			}

			xhr.onload = function() {
				// check if upload made itself through
				if (xhr.status >= 400) {
					handleError();
					return;
				}

				retries = up.settings.max_retries; // reset the counter

				// Handle chunk response
				if (curChunkSize < blob.size) {
					chunkBlob.destroy();

					offset += curChunkSize;
					file.loaded = Math.min(offset, blob.size);

					up.trigger('ChunkUploaded', file, {
						offset : file.loaded,
						total : blob.size,
						response : xhr.responseText,
						status : xhr.status,
						responseHeaders: xhr.getAllResponseHeaders()
					});

					// stock Android browser doesn't fire upload progress events, but in chunking mode we can fake them
					if (o.Env.browser === 'Android Browser') {
						// doesn't harm in general, but is not required anywhere else
						up.trigger('UploadProgress', file);
					} 
				} else {
					file.loaded = file.size;
				}

				chunkBlob = formData = null; // Free memory

				// Check if file is uploaded
				if (!offset || offset >= blob.size) {
					// If file was modified, destory the copy
					if (file.size != file.origSize) {
						blob.destroy();
						blob = null;
					}

					up.trigger('UploadProgress', file);

					file.status = plupload.DONE;

					up.trigger('FileUploaded', file, {
						response : xhr.responseText,
						status : xhr.status,
						responseHeaders: xhr.getAllResponseHeaders()
					});
				} else {
					// Still chunks left
					delay(uploadNextChunk, 1); // run detached, otherwise event handlers interfere
				}
			};

			xhr.onerror = function() {
				handleError();
			};

			xhr.onloadend = function() {
				this.destroy();
				xhr = null;
			};

			// Build multipart request
			if (up.settings.multipart && features.multipart) {
				xhr.open("post", url, true);

				// Set custom headers
				plupload.each(up.settings.headers, function(value, name) {
					xhr.setRequestHeader(name, value);
				});

				formData = new o.FormData();

				// Add multipart params
				plupload.each(plupload.extend(args, up.settings.multipart_params), function(value, name) {
					formData.append(name, value);
				});

				// Add file and send it
				formData.append(up.settings.file_data_name, chunkBlob);
				xhr.send(formData, {
					runtime_order: up.settings.runtimes,
					required_caps: up.settings.required_features,
					preferred_caps: preferred_caps
				});
			} else {
				// if no multipart, send as binary stream
				url = plupload.buildUrl(up.settings.url, plupload.extend(args, up.settings.multipart_params));

				xhr.open("post", url, true);

				xhr.setRequestHeader('Content-Type', 'application/octet-stream'); // Binary stream header

				// Set custom headers
				plupload.each(up.settings.headers, function(value, name) {
					xhr.setRequestHeader(name, value);
				});

				xhr.send(chunkBlob, {
					runtime_order: up.settings.runtimes,
					required_caps: up.settings.required_features,
					preferred_caps: preferred_caps
				});
			}
		}

		blob = file.getSource();

		// Start uploading chunks
		if (up.settings.resize.enabled && runtimeCan(blob, 'send_binary_string') && !!~o.inArray(blob.type, ['image/jpeg', 'image/png'])) {
			// Resize if required
			resizeImage.call(this, blob, up.settings.resize, function(resizedBlob) {
				blob = resizedBlob;
				file.size = resizedBlob.size;
				uploadNextChunk();
			});
		} else {
			uploadNextChunk();
		}
	}


	function onUploadProgress(up, file) {
		calcFile(file);
	}


	function onStateChanged(up) {
		if (up.state == plupload.STARTED) {
			// Get start time to calculate bps
			startTime = (+new Date());
		} else if (up.state == plupload.STOPPED) {
			// Reset currently uploading files
			for (var i = up.files.length - 1; i >= 0; i--) {
				if (up.files[i].status == plupload.UPLOADING) {
					up.files[i].status = plupload.QUEUED;
					calc();
				}
			}
		}
	}


	function onCancelUpload() {
		if (xhr) {
			xhr.abort();
		}
	}


	function onFileUploaded(up) {
		calc();

		// Upload next file but detach it from the error event
		// since other custom listeners might want to stop the queue
		delay(function() {
			uploadNext.call(up);
		}, 1);
	}


	function onError(up, err) {
		if (err.code === plupload.INIT_ERROR) {
			up.destroy();
		}
		// Set failed status if an error occured on a file
		else if (err.code === plupload.HTTP_ERROR) {
			err.file.status = plupload.FAILED;
			calcFile(err.file);

			// Upload next file but detach it from the error event
			// since other custom listeners might want to stop the queue
			if (up.state == plupload.STARTED) { // upload in progress
				up.trigger('CancelUpload');
				delay(function() {
					uploadNext.call(up);
				}, 1);
			}
		}
	}


	function onDestroy(up) {
		up.stop();

		// Purge the queue
		plupload.each(files, function(file) {
			file.destroy();
		});
		files = [];

		if (fileInputs.length) {
			plupload.each(fileInputs, function(fileInput) {
				fileInput.destroy();
			});
			fileInputs = [];
		}

		if (fileDrops.length) {
			plupload.each(fileDrops, function(fileDrop) {
				fileDrop.destroy();
			});
			fileDrops = [];
		}

		preferred_caps = {};
		disabled = false;
		startTime = xhr = null;
		total.reset();
	}


	// Default settings
	settings = {
		runtimes: o.Runtime.order,
		max_retries: 0,
		chunk_size: 0,
		multipart: true,
		multi_selection: true,
		file_data_name: 'file',
		filters: {
			mime_types: [],
			prevent_duplicates: false,
			max_file_size: 0
		},
		resize: {
			enabled: false,
			preserve_headers: true,
			crop: false
		},
		send_file_name: true,
		send_chunk_number: true
	};

	
	setOption.call(this, options, null, true);

	// Inital total state
	total = new plupload.QueueProgress(); 

	// Add public methods
	plupload.extend(this, {

		/**
		 * Unique id for the Uploader instance.
		 *
		 * @property id
		 * @type String
		 */
		id : uid,
		uid : uid, // mOxie uses this to differentiate between event targets

		/**
		 * Current state of the total uploading progress. This one can either be plupload.STARTED or plupload.STOPPED.
		 * These states are controlled by the stop/start methods. The default value is STOPPED.
		 *
		 * @property state
		 * @type Number
		 */
		state : plupload.STOPPED,

		/**
		 * Map of features that are available for the uploader runtime. Features will be filled
		 * before the init event is called, these features can then be used to alter the UI for the end user.
		 * Some of the current features that might be in this map is: dragdrop, chunks, jpgresize, pngresize.
		 *
		 * @property features
		 * @type Object
		 */
		features : {},

		/**
		 * Current runtime name.
		 *
		 * @property runtime
		 * @type String
		 */
		runtime : null,

		/**
		 * Current upload queue, an array of File instances.
		 *
		 * @property files
		 * @type Array
		 * @see plupload.File
		 */
		files : files,

		/**
		 * Object with name/value settings.
		 *
		 * @property settings
		 * @type Object
		 */
		settings : settings,

		/**
		 * Total progess information. How many files has been uploaded, total percent etc.
		 *
		 * @property total
		 * @type plupload.QueueProgress
		 */
		total : total,


		/**
		 * Initializes the Uploader instance and adds internal event listeners.
		 *
		 * @method init
		 */
		init : function() {
			var self = this, opt, preinitOpt, err;
			
			preinitOpt = self.getOption('preinit');
			if (typeof(preinitOpt) == "function") {
				preinitOpt(self);
			} else {
				plupload.each(preinitOpt, function(func, name) {
					self.bind(name, func);
				});
			}

			bindEventListeners.call(self);

			// Check for required options
			plupload.each(['container', 'browse_button', 'drop_element'], function(el) {
				if (self.getOption(el) === null) {
					err = {
						code : plupload.INIT_ERROR,
						message : plupload.translate("'%' specified, but cannot be found.")
					}
					return false;
				}
			});

			if (err) {
				return self.trigger('Error', err);
			}


			if (!settings.browse_button && !settings.drop_element) {
				return self.trigger('Error', {
					code : plupload.INIT_ERROR,
					message : plupload.translate("You must specify either 'browse_button' or 'drop_element'.")
				});
			}


			initControls.call(self, settings, function(inited) {
				var initOpt = self.getOption('init');
				if (typeof(initOpt) == "function") {
					initOpt(self);
				} else {
					plupload.each(initOpt, function(func, name) {
						self.bind(name, func);
					});
				}

				if (inited) {
					self.runtime = o.Runtime.getInfo(getRUID()).type;
					self.trigger('Init', { runtime: self.runtime });
					self.trigger('PostInit');
				} else {
					self.trigger('Error', {
						code : plupload.INIT_ERROR,
						message : plupload.translate('Init error.')
					});
				}
			});
		},

		/**
		 * Set the value for the specified option(s).
		 *
		 * @method setOption
		 * @since 2.1
		 * @param {String|Object} option Name of the option to change or the set of key/value pairs
		 * @param {Mixed} [value] Value for the option (is ignored, if first argument is object)
		 */
		setOption: function(option, value) {
			setOption.call(this, option, value, !this.runtime); // until runtime not set we do not need to reinitialize
		},

		/**
		 * Get the value for the specified option or the whole configuration, if not specified.
		 * 
		 * @method getOption
		 * @since 2.1
		 * @param {String} [option] Name of the option to get
		 * @return {Mixed} Value for the option or the whole set
		 */
		getOption: function(option) {
			if (!option) {
				return settings;
			}
			return settings[option];
		},

		/**
		 * Refreshes the upload instance by dispatching out a refresh event to all runtimes.
		 * This would for example reposition flash/silverlight shims on the page.
		 *
		 * @method refresh
		 */
		refresh : function() {
			if (fileInputs.length) {
				plupload.each(fileInputs, function(fileInput) {
					fileInput.trigger('Refresh');
				});
			}
			this.trigger('Refresh');
		},

		/**
		 * Starts uploading the queued files.
		 *
		 * @method start
		 */
		start : function() {
			if (this.state != plupload.STARTED) {
				this.state = plupload.STARTED;
				this.trigger('StateChanged');

				uploadNext.call(this);
			}
		},

		/**
		 * Stops the upload of the queued files.
		 *
		 * @method stop
		 */
		stop : function() {
			if (this.state != plupload.STOPPED) {
				this.state = plupload.STOPPED;
				this.trigger('StateChanged');
				this.trigger('CancelUpload');
			}
		},


		/**
		 * Disables/enables browse button on request.
		 *
		 * @method disableBrowse
		 * @param {Boolean} disable Whether to disable or enable (default: true)
		 */
		disableBrowse : function() {
			disabled = arguments[0] !== undef ? arguments[0] : true;

			if (fileInputs.length) {
				plupload.each(fileInputs, function(fileInput) {
					fileInput.disable(disabled);
				});
			}

			this.trigger('DisableBrowse', disabled);
		},

		/**
		 * Returns the specified file object by id.
		 *
		 * @method getFile
		 * @param {String} id File id to look for.
		 * @return {plupload.File} File object or undefined if it wasn't found;
		 */
		getFile : function(id) {
			var i;
			for (i = files.length - 1; i >= 0; i--) {
				if (files[i].id === id) {
					return files[i];
				}
			}
		},

		/**
		 * Adds file to the queue programmatically. Can be native file, instance of Plupload.File,
		 * instance of mOxie.File, input[type="file"] element, or array of these. Fires FilesAdded, 
		 * if any files were added to the queue. Otherwise nothing happens.
		 *
		 * @method addFile
		 * @since 2.0
		 * @param {plupload.File|mOxie.File|File|Node|Array} file File or files to add to the queue.
		 * @param {String} [fileName] If specified, will be used as a name for the file
		 */
		addFile : function(file, fileName) {
			var self = this
			, queue = [] 
			, filesAdded = []
			, ruid
			;

			function filterFile(file, cb) {
				var queue = [];
				o.each(self.settings.filters, function(rule, name) {
					if (fileFilters[name]) {
						queue.push(function(cb) {
							fileFilters[name].call(self, rule, file, function(res) {
								cb(!res);
							});
						});
					}
				});
				o.inSeries(queue, cb);
			}

			/**
			 * @method resolveFile
			 * @private
			 * @param {o.File|o.Blob|plupload.File|File|Blob|input[type="file"]} file
			 */
			function resolveFile(file) {
				var type = o.typeOf(file);

				// o.File
				if (file instanceof o.File) { 
					if (!file.ruid && !file.isDetached()) {
						if (!ruid) { // weird case
							return false;
						}
						file.ruid = ruid;
						file.connectRuntime(ruid);
					}
					resolveFile(new plupload.File(file));
				}
				// o.Blob 
				else if (file instanceof o.Blob) {
					resolveFile(file.getSource());
					file.destroy();
				} 
				// plupload.File - final step for other branches
				else if (file instanceof plupload.File) {
					if (fileName) {
						file.name = fileName;
					}
					
					queue.push(function(cb) {
						// run through the internal and user-defined filters, if any
						filterFile(file, function(err) {
							if (!err) {
								// make files available for the filters by updating the main queue directly
								files.push(file);
								// collect the files that will be passed to FilesAdded event
								filesAdded.push(file); 

								self.trigger("FileFiltered", file);
							}
							delay(cb, 1); // do not build up recursions or eventually we might hit the limits
						});
					});
				} 
				// native File or blob
				else if (o.inArray(type, ['file', 'blob']) !== -1) {
					resolveFile(new o.File(null, file));
				} 
				// input[type="file"]
				else if (type === 'node' && o.typeOf(file.files) === 'filelist') {
					// if we are dealing with input[type="file"]
					o.each(file.files, resolveFile);
				} 
				// mixed array of any supported types (see above)
				else if (type === 'array') {
					fileName = null; // should never happen, but unset anyway to avoid funny situations
					o.each(file, resolveFile);
				}
			}

			ruid = getRUID();
			
			resolveFile(file);

			if (queue.length) {
				o.inSeries(queue, function() {
					// if any files left after filtration, trigger FilesAdded
					if (filesAdded.length) {
						self.trigger("FilesAdded", filesAdded);
					}
				});
			}
		},

		/**
		 * Removes a specific file.
		 *
		 * @method removeFile
		 * @param {plupload.File|String} file File to remove from queue.
		 */
		removeFile : function(file) {
			var id = typeof(file) === 'string' ? file : file.id;

			for (var i = files.length - 1; i >= 0; i--) {
				if (files[i].id === id) {
					return this.splice(i, 1)[0];
				}
			}
		},

		/**
		 * Removes part of the queue and returns the files removed. This will also trigger the FilesRemoved and QueueChanged events.
		 *
		 * @method splice
		 * @param {Number} start (Optional) Start index to remove from.
		 * @param {Number} length (Optional) Lengh of items to remove.
		 * @return {Array} Array of files that was removed.
		 */
		splice : function(start, length) {
			// Splice and trigger events
			var removed = files.splice(start === undef ? 0 : start, length === undef ? files.length : length);

			// if upload is in progress we need to stop it and restart after files are removed
			var restartRequired = false;
			if (this.state == plupload.STARTED) { // upload in progress
				plupload.each(removed, function(file) {
					if (file.status === plupload.UPLOADING) {
						restartRequired = true; // do not restart, unless file that is being removed is uploading
						return false;
					}
				});
				
				if (restartRequired) {
					this.stop();
				}
			}

			this.trigger("FilesRemoved", removed);

			// Dispose any resources allocated by those files
			plupload.each(removed, function(file) {
				file.destroy();
			});
			
			if (restartRequired) {
				this.start();
			}

			return removed;
		},

		/**
		Dispatches the specified event name and its arguments to all listeners.

		@method trigger
		@param {String} name Event name to fire.
		@param {Object..} Multiple arguments to pass along to the listener functions.
		*/

		// override the parent method to match Plupload-like event logic
		dispatchEvent: function(type) {
			var list, args, result;
						
			type = type.toLowerCase();
							
			list = this.hasEventListener(type);

			if (list) {
				// sort event list by priority
				list.sort(function(a, b) { return b.priority - a.priority; });
				
				// first argument should be current plupload.Uploader instance
				args = [].slice.call(arguments);
				args.shift();
				args.unshift(this);

				for (var i = 0; i < list.length; i++) {
					// Fire event, break chain if false is returned
					if (list[i].fn.apply(list[i].scope, args) === false) {
						return false;
					}
				}
			}
			return true;
		},

		/**
		Check whether uploader has any listeners to the specified event.

		@method hasEventListener
		@param {String} name Event name to check for.
		*/


		/**
		Adds an event listener by name.

		@method bind
		@param {String} name Event name to listen for.
		@param {function} fn Function to call ones the event gets fired.
		@param {Object} [scope] Optional scope to execute the specified function in.
		@param {Number} [priority=0] Priority of the event handler - handlers with higher priorities will be called first
		*/
		bind: function(name, fn, scope, priority) {
			// adapt moxie EventTarget style to Plupload-like
			plupload.Uploader.prototype.bind.call(this, name, fn, priority, scope);
		},

		/**
		Removes the specified event listener.

		@method unbind
		@param {String} name Name of event to remove.
		@param {function} fn Function to remove from listener.
		*/

		/**
		Removes all event listeners.

		@method unbindAll
		*/


		/**
		 * Destroys Plupload instance and cleans after itself.
		 *
		 * @method destroy
		 */
		destroy : function() {
			this.trigger('Destroy');
			settings = total = null; // purge these exclusively
			this.unbindAll();
		}
	});
};

plupload.Uploader.prototype = o.EventTarget.instance;

/**
 * Constructs a new file instance.
 *
 * @class File
 * @constructor
 * 
 * @param {Object} file Object containing file properties
 * @param {String} file.name Name of the file.
 * @param {Number} file.size File size.
 */
plupload.File = (function() {
	var filepool = {};

	function PluploadFile(file) {

		plupload.extend(this, {

			/**
			 * File id this is a globally unique id for the specific file.
			 *
			 * @property id
			 * @type String
			 */
			id: plupload.guid(),

			/**
			 * File name for example "myfile.gif".
			 *
			 * @property name
			 * @type String
			 */
			name: file.name || file.fileName,

			/**
			 * File type, `e.g image/jpeg`
			 *
			 * @property type
			 * @type String
			 */
			type: file.type || '',

			/**
			 * File size in bytes (may change after client-side manupilation).
			 *
			 * @property size
			 * @type Number
			 */
			size: file.size || file.fileSize,

			/**
			 * Original file size in bytes.
			 *
			 * @property origSize
			 * @type Number
			 */
			origSize: file.size || file.fileSize,

			/**
			 * Number of bytes uploaded of the files total size.
			 *
			 * @property loaded
			 * @type Number
			 */
			loaded: 0,

			/**
			 * Number of percentage uploaded of the file.
			 *
			 * @property percent
			 * @type Number
			 */
			percent: 0,

			/**
			 * Status constant matching the plupload states QUEUED, UPLOADING, FAILED, DONE.
			 *
			 * @property status
			 * @type Number
			 * @see plupload
			 */
			status: plupload.QUEUED,

			/**
			 * Date of last modification.
			 *
			 * @property lastModifiedDate
			 * @type {String}
			 */
			lastModifiedDate: file.lastModifiedDate || (new Date()).toLocaleString(), // Thu Aug 23 2012 19:40:00 GMT+0400 (GET)

			/**
			 * Returns native window.File object, when it's available.
			 *
			 * @method getNative
			 * @return {window.File} or null, if plupload.File is of different origin
			 */
			getNative: function() {
				var file = this.getSource().getSource();
				return o.inArray(o.typeOf(file), ['blob', 'file']) !== -1 ? file : null;
			},

			/**
			 * Returns mOxie.File - unified wrapper object that can be used across runtimes.
			 *
			 * @method getSource
			 * @return {mOxie.File} or null
			 */
			getSource: function() {
				if (!filepool[this.id]) {
					return null;
				}
				return filepool[this.id];
			},

			/**
			 * Destroys plupload.File object.
			 *
			 * @method destroy
			 */
			destroy: function() {
				var src = this.getSource();
				if (src) {
					src.destroy();
					delete filepool[this.id];
				}
			}
		});

		filepool[this.id] = file;
	}

	return PluploadFile;
}());


/**
 * Constructs a queue progress.
 *
 * @class QueueProgress
 * @constructor
 */
 plupload.QueueProgress = function() {
	var self = this; // Setup alias for self to reduce code size when it's compressed

	/**
	 * Total queue file size.
	 *
	 * @property size
	 * @type Number
	 */
	self.size = 0;

	/**
	 * Total bytes uploaded.
	 *
	 * @property loaded
	 * @type Number
	 */
	self.loaded = 0;

	/**
	 * Number of files uploaded.
	 *
	 * @property uploaded
	 * @type Number
	 */
	self.uploaded = 0;

	/**
	 * Number of files failed to upload.
	 *
	 * @property failed
	 * @type Number
	 */
	self.failed = 0;

	/**
	 * Number of files yet to be uploaded.
	 *
	 * @property queued
	 * @type Number
	 */
	self.queued = 0;

	/**
	 * Total percent of the uploaded bytes.
	 *
	 * @property percent
	 * @type Number
	 */
	self.percent = 0;

	/**
	 * Bytes uploaded per second.
	 *
	 * @property bytesPerSec
	 * @type Number
	 */
	self.bytesPerSec = 0;

	/**
	 * Resets the progress to its initial values.
	 *
	 * @method reset
	 */
	self.reset = function() {
		self.size = self.loaded = self.uploaded = self.failed = self.queued = self.percent = self.bytesPerSec = 0;
	};
};

window.plupload = plupload;

}(window, mOxie));
                                                                                                      plupload/plupload.min.js                                                                            0000644                 00000036365 15212564046 0011346 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(e,I,S){var T=e.setTimeout,D={};function w(e){var t=e.required_features,r={};function i(e,t,i){var n={chunks:"slice_blob",jpgresize:"send_binary_string",pngresize:"send_binary_string",progress:"report_upload_progress",multi_selection:"select_multiple",dragdrop:"drag_and_drop",drop_element:"drag_and_drop",headers:"send_custom_headers",urlstream_upload:"send_binary_string",canSendBinary:"send_binary",triggerDialog:"summon_file_dialog"};n[e]?r[n[e]]=t:i||(r[e]=t)}return"string"==typeof t?F.each(t.split(/\s*,\s*/),function(e){i(e,!0)}):"object"==typeof t?F.each(t,function(e,t){i(t,e)}):!0===t&&(0<e.chunk_size&&(r.slice_blob=!0),!e.resize.enabled&&e.multipart||(r.send_binary_string=!0),F.each(e,function(e,t){i(t,!!e,!0)})),e.runtimes="html5,html4",r}var t,F={VERSION:"2.1.9",STOPPED:1,STARTED:2,QUEUED:1,UPLOADING:2,FAILED:4,DONE:5,GENERIC_ERROR:-100,HTTP_ERROR:-200,IO_ERROR:-300,SECURITY_ERROR:-400,INIT_ERROR:-500,FILE_SIZE_ERROR:-600,FILE_EXTENSION_ERROR:-601,FILE_DUPLICATE_ERROR:-602,IMAGE_FORMAT_ERROR:-700,MEMORY_ERROR:-701,IMAGE_DIMENSIONS_ERROR:-702,mimeTypes:I.mimes,ua:I.ua,typeOf:I.typeOf,extend:I.extend,guid:I.guid,getAll:function(e){for(var t,i=[],n=(e="array"!==F.typeOf(e)?[e]:e).length;n--;)(t=F.get(e[n]))&&i.push(t);return i.length?i:null},get:I.get,each:I.each,getPos:I.getPos,getSize:I.getSize,xmlEncode:function(e){var t={"<":"lt",">":"gt","&":"amp",'"':"quot","'":"#39"};return e&&(""+e).replace(/[<>&\"\']/g,function(e){return t[e]?"&"+t[e]+";":e})},toArray:I.toArray,inArray:I.inArray,addI18n:I.addI18n,translate:I.translate,isEmptyObj:I.isEmptyObj,hasClass:I.hasClass,addClass:I.addClass,removeClass:I.removeClass,getStyle:I.getStyle,addEvent:I.addEvent,removeEvent:I.removeEvent,removeAllEvents:I.removeAllEvents,cleanName:function(e){for(var t=[/[\300-\306]/g,"A",/[\340-\346]/g,"a",/\307/g,"C",/\347/g,"c",/[\310-\313]/g,"E",/[\350-\353]/g,"e",/[\314-\317]/g,"I",/[\354-\357]/g,"i",/\321/g,"N",/\361/g,"n",/[\322-\330]/g,"O",/[\362-\370]/g,"o",/[\331-\334]/g,"U",/[\371-\374]/g,"u"],i=0;i<t.length;i+=2)e=e.replace(t[i],t[i+1]);return e=(e=e.replace(/\s+/g,"_")).replace(/[^a-z0-9_\-\.]+/gi,"")},buildUrl:function(e,t){var i="";return F.each(t,function(e,t){i+=(i?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(e)}),i&&(e+=(0<e.indexOf("?")?"&":"?")+i),e},formatSize:function(e){var t;return e===S||/\D/.test(e)?F.translate("N/A"):(t=Math.pow(1024,4))<e?i(e/t,1)+" "+F.translate("tb"):e>(t/=1024)?i(e/t,1)+" "+F.translate("gb"):e>(t/=1024)?i(e/t,1)+" "+F.translate("mb"):1024<e?Math.round(e/1024)+" "+F.translate("kb"):e+" "+F.translate("b");function i(e,t){return Math.round(e*Math.pow(10,t))/Math.pow(10,t)}},parseSize:I.parseSizeStr,predictRuntime:function(e,t){var i=new F.Uploader(e),t=I.Runtime.thatCan(i.getOption().required_features,t||e.runtimes);return i.destroy(),t},addFileFilter:function(e,t){D[e]=t}};F.addFileFilter("mime_types",function(e,t,i){e.length&&!e.regexp.test(t.name)?(this.trigger("Error",{code:F.FILE_EXTENSION_ERROR,message:F.translate("File extension error."),file:t}),i(!1)):i(!0)}),F.addFileFilter("max_file_size",function(e,t,i){e=F.parseSize(e),void 0!==t.size&&e&&t.size>e?(this.trigger("Error",{code:F.FILE_SIZE_ERROR,message:F.translate("File size error."),file:t}),i(!1)):i(!0)}),F.addFileFilter("prevent_duplicates",function(e,t,i){if(e)for(var n=this.files.length;n--;)if(t.name===this.files[n].name&&t.size===this.files[n].size)return this.trigger("Error",{code:F.FILE_DUPLICATE_ERROR,message:F.translate("Duplicate file error."),file:t}),void i(!1);i(!0)}),F.Uploader=function(e){var u,i,n,p,t=F.guid(),l=[],h={},o=[],d=[],c=!1;function r(){var e,t,i=0;if(this.state==F.STARTED){for(t=0;t<l.length;t++)e||l[t].status!=F.QUEUED?i++:(e=l[t],this.trigger("BeforeUpload",e)&&(e.status=F.UPLOADING,this.trigger("UploadFile",e)));i==l.length&&(this.state!==F.STOPPED&&(this.state=F.STOPPED,this.trigger("StateChanged")),this.trigger("UploadComplete",l))}}function s(e){e.percent=0<e.size?Math.ceil(e.loaded/e.size*100):100,a()}function a(){var e,t;for(n.reset(),e=0;e<l.length;e++)(t=l[e]).size!==S?(n.size+=t.origSize,n.loaded+=t.loaded*t.origSize/t.size):n.size=S,t.status==F.DONE?n.uploaded++:t.status==F.FAILED?n.failed++:n.queued++;n.size===S?n.percent=0<l.length?Math.ceil(n.uploaded/l.length*100):0:(n.bytesPerSec=Math.ceil(n.loaded/((+new Date-i||1)/1e3)),n.percent=0<n.size?Math.ceil(n.loaded/n.size*100):0)}function f(){var e=o[0]||d[0];return!!e&&e.getRuntime().uid}function g(n,e){var r=this,s=0,t=[],a={runtime_order:n.runtimes,required_caps:n.required_features,preferred_caps:h};F.each(n.runtimes.split(/\s*,\s*/),function(e){n[e]&&(a[e]=n[e])}),n.browse_button&&F.each(n.browse_button,function(i){t.push(function(t){var e=new I.FileInput(F.extend({},a,{accept:n.filters.mime_types,name:n.file_data_name,multiple:n.multi_selection,container:n.container,browse_button:i}));e.onready=function(){var e=I.Runtime.getInfo(this.ruid);I.extend(r.features,{chunks:e.can("slice_blob"),multipart:e.can("send_multipart"),multi_selection:e.can("select_multiple")}),s++,o.push(this),t()},e.onchange=function(){r.addFile(this.files)},e.bind("mouseenter mouseleave mousedown mouseup",function(e){c||(n.browse_button_hover&&("mouseenter"===e.type?I.addClass(i,n.browse_button_hover):"mouseleave"===e.type&&I.removeClass(i,n.browse_button_hover)),n.browse_button_active&&("mousedown"===e.type?I.addClass(i,n.browse_button_active):"mouseup"===e.type&&I.removeClass(i,n.browse_button_active)))}),e.bind("mousedown",function(){r.trigger("Browse")}),e.bind("error runtimeerror",function(){e=null,t()}),e.init()})}),n.drop_element&&F.each(n.drop_element,function(i){t.push(function(t){var e=new I.FileDrop(F.extend({},a,{drop_zone:i}));e.onready=function(){var e=I.Runtime.getInfo(this.ruid);I.extend(r.features,{chunks:e.can("slice_blob"),multipart:e.can("send_multipart"),dragdrop:e.can("drag_and_drop")}),s++,d.push(this),t()},e.ondrop=function(){r.addFile(this.files)},e.bind("error runtimeerror",function(){e=null,t()}),e.init()})}),I.inSeries(t,function(){"function"==typeof e&&e(s)})}function _(e,t,i){var a=this,o=!1;function n(e,t,i){var n,r,s=u[e];switch(e){case"max_file_size":"max_file_size"===e&&(u.max_file_size=u.filters.max_file_size=t);break;case"chunk_size":(t=F.parseSize(t))&&(u[e]=t,u.send_file_name=!0);break;case"multipart":(u[e]=t)||(u.send_file_name=!0);break;case"unique_names":(u[e]=t)&&(u.send_file_name=!0);break;case"filters":"array"===F.typeOf(t)&&(t={mime_types:t}),i?F.extend(u.filters,t):u.filters=t,t.mime_types&&(u.filters.mime_types.regexp=(n=u.filters.mime_types,r=[],F.each(n,function(e){F.each(e.extensions.split(/,/),function(e){/^\s*\*\s*$/.test(e)?r.push("\\.*"):r.push("\\."+e.replace(new RegExp("["+"/^$.*+?|()[]{}\\".replace(/./g,"\\$&")+"]","g"),"\\$&"))})}),new RegExp("("+r.join("|")+")$","i")));break;case"resize":i?F.extend(u.resize,t,{enabled:!0}):u.resize=t;break;case"prevent_duplicates":u.prevent_duplicates=u.filters.prevent_duplicates=!!t;break;case"container":case"browse_button":case"drop_element":t="container"===e?F.get(t):F.getAll(t);case"runtimes":case"multi_selection":u[e]=t,i||(o=!0);break;default:u[e]=t}i||a.trigger("OptionChanged",e,t,s)}"object"==typeof e?F.each(e,function(e,t){n(t,e,i)}):n(e,t,i),i?(u.required_features=w(F.extend({},u)),h=w(F.extend({},u,{required_features:!0}))):o&&(a.trigger("Destroy"),g.call(a,u,function(e){e?(a.runtime=I.Runtime.getInfo(f()).type,a.trigger("Init",{runtime:a.runtime}),a.trigger("PostInit")):a.trigger("Error",{code:F.INIT_ERROR,message:F.translate("Init error.")})}))}function m(e,t){var i;e.settings.unique_names&&(e="part",(i=t.name.match(/\.([^.]+)$/))&&(e=i[1]),t.target_name=t.id+"."+e)}function b(r,s){var a,o=r.settings.url,u=r.settings.chunk_size,l=r.settings.max_retries,d=r.features,c=0;function f(){0<l--?T(g,1e3):(s.loaded=c,r.trigger("Error",{code:F.HTTP_ERROR,message:F.translate("HTTP Error."),file:s,response:p.responseText,status:p.status,responseHeaders:p.getAllResponseHeaders()}))}function g(){var e,i,t,n={};s.status===F.UPLOADING&&r.state!==F.STOPPED&&(r.settings.send_file_name&&(n.name=s.target_name||s.name),e=u&&d.chunks&&a.size>u?(t=Math.min(u,a.size-c),a.slice(c,c+t)):(t=a.size,a),u&&d.chunks&&(r.settings.send_chunk_number?(n.chunk=Math.ceil(c/u),n.chunks=Math.ceil(a.size/u)):(n.offset=c,n.total=a.size)),(p=new I.XMLHttpRequest).upload&&(p.upload.onprogress=function(e){s.loaded=Math.min(s.size,c+e.loaded),r.trigger("UploadProgress",s)}),p.onload=function(){400<=p.status?f():(l=r.settings.max_retries,t<a.size?(e.destroy(),c+=t,s.loaded=Math.min(c,a.size),r.trigger("ChunkUploaded",s,{offset:s.loaded,total:a.size,response:p.responseText,status:p.status,responseHeaders:p.getAllResponseHeaders()}),"Android Browser"===I.Env.browser&&r.trigger("UploadProgress",s)):s.loaded=s.size,e=i=null,!c||c>=a.size?(s.size!=s.origSize&&(a.destroy(),a=null),r.trigger("UploadProgress",s),s.status=F.DONE,r.trigger("FileUploaded",s,{response:p.responseText,status:p.status,responseHeaders:p.getAllResponseHeaders()})):T(g,1))},p.onerror=function(){f()},p.onloadend=function(){this.destroy(),p=null},r.settings.multipart&&d.multipart?(p.open("post",o,!0),F.each(r.settings.headers,function(e,t){p.setRequestHeader(t,e)}),i=new I.FormData,F.each(F.extend(n,r.settings.multipart_params),function(e,t){i.append(t,e)}),i.append(r.settings.file_data_name,e),p.send(i,{runtime_order:r.settings.runtimes,required_caps:r.settings.required_features,preferred_caps:h})):(o=F.buildUrl(r.settings.url,F.extend(n,r.settings.multipart_params)),p.open("post",o,!0),p.setRequestHeader("Content-Type","application/octet-stream"),F.each(r.settings.headers,function(e,t){p.setRequestHeader(t,e)}),p.send(e,{runtime_order:r.settings.runtimes,required_caps:r.settings.required_features,preferred_caps:h})))}s.loaded&&(c=s.loaded=u?u*Math.floor(s.loaded/u):0),a=s.getSource(),r.settings.resize.enabled&&function(e,t){if(e.ruid){e=I.Runtime.getInfo(e.ruid);if(e)return e.can(t)}}(a,"send_binary_string")&&~I.inArray(a.type,["image/jpeg","image/png"])?function(t,e,i){var n=new I.Image;try{n.onload=function(){if(e.width>this.width&&e.height>this.height&&e.quality===S&&e.preserve_headers&&!e.crop)return this.destroy(),i(t);n.downsize(e.width,e.height,e.crop,e.preserve_headers)},n.onresize=function(){i(this.getAsBlob(t.type,e.quality)),this.destroy()},n.onerror=function(){i(t)},n.load(t)}catch(e){i(t)}}.call(this,a,r.settings.resize,function(e){a=e,s.size=e.size,g()}):g()}function R(e,t){s(t)}function E(e){if(e.state==F.STARTED)i=+new Date;else if(e.state==F.STOPPED)for(var t=e.files.length-1;0<=t;t--)e.files[t].status==F.UPLOADING&&(e.files[t].status=F.QUEUED,a())}function y(){p&&p.abort()}function v(e){a(),T(function(){r.call(e)},1)}function z(e,t){t.code===F.INIT_ERROR?e.destroy():t.code===F.HTTP_ERROR&&(t.file.status=F.FAILED,s(t.file),e.state==F.STARTED)&&(e.trigger("CancelUpload"),T(function(){r.call(e)},1))}function O(e){e.stop(),F.each(l,function(e){e.destroy()}),l=[],o.length&&(F.each(o,function(e){e.destroy()}),o=[]),d.length&&(F.each(d,function(e){e.destroy()}),d=[]),c=!(h={}),i=p=null,n.reset()}u={runtimes:I.Runtime.order,max_retries:0,chunk_size:0,multipart:!0,multi_selection:!0,file_data_name:"file",filters:{mime_types:[],prevent_duplicates:!1,max_file_size:0},resize:{enabled:!1,preserve_headers:!0,crop:!1},send_file_name:!0,send_chunk_number:!0},_.call(this,e,null,!0),n=new F.QueueProgress,F.extend(this,{id:t,uid:t,state:F.STOPPED,features:{},runtime:null,files:l,settings:u,total:n,init:function(){var t,i=this,e=i.getOption("preinit");return"function"==typeof e?e(i):F.each(e,function(e,t){i.bind(t,e)}),function(){this.bind("FilesAdded FilesRemoved",function(e){e.trigger("QueueChanged"),e.refresh()}),this.bind("CancelUpload",y),this.bind("BeforeUpload",m),this.bind("UploadFile",b),this.bind("UploadProgress",R),this.bind("StateChanged",E),this.bind("QueueChanged",a),this.bind("Error",z),this.bind("FileUploaded",v),this.bind("Destroy",O)}.call(i),F.each(["container","browse_button","drop_element"],function(e){if(null===i.getOption(e))return!(t={code:F.INIT_ERROR,message:F.translate("'%' specified, but cannot be found.")})}),t?i.trigger("Error",t):u.browse_button||u.drop_element?void g.call(i,u,function(e){var t=i.getOption("init");"function"==typeof t?t(i):F.each(t,function(e,t){i.bind(t,e)}),e?(i.runtime=I.Runtime.getInfo(f()).type,i.trigger("Init",{runtime:i.runtime}),i.trigger("PostInit")):i.trigger("Error",{code:F.INIT_ERROR,message:F.translate("Init error.")})}):i.trigger("Error",{code:F.INIT_ERROR,message:F.translate("You must specify either 'browse_button' or 'drop_element'.")})},setOption:function(e,t){_.call(this,e,t,!this.runtime)},getOption:function(e){return e?u[e]:u},refresh:function(){o.length&&F.each(o,function(e){e.trigger("Refresh")}),this.trigger("Refresh")},start:function(){this.state!=F.STARTED&&(this.state=F.STARTED,this.trigger("StateChanged"),r.call(this))},stop:function(){this.state!=F.STOPPED&&(this.state=F.STOPPED,this.trigger("StateChanged"),this.trigger("CancelUpload"))},disableBrowse:function(){c=arguments[0]===S||arguments[0],o.length&&F.each(o,function(e){e.disable(c)}),this.trigger("DisableBrowse",c)},getFile:function(e){for(var t=l.length-1;0<=t;t--)if(l[t].id===e)return l[t]},addFile:function(e,n){var r,s=this,a=[],o=[];r=f(),function e(i){var t=I.typeOf(i);if(i instanceof I.File){if(!i.ruid&&!i.isDetached()){if(!r)return!1;i.ruid=r,i.connectRuntime(r)}e(new F.File(i))}else i instanceof I.Blob?(e(i.getSource()),i.destroy()):i instanceof F.File?(n&&(i.name=n),a.push(function(t){var n,e,r;n=i,e=function(e){e||(l.push(i),o.push(i),s.trigger("FileFiltered",i)),T(t,1)},r=[],I.each(s.settings.filters,function(e,i){D[i]&&r.push(function(t){D[i].call(s,e,n,function(e){t(!e)})})}),I.inSeries(r,e)})):-1!==I.inArray(t,["file","blob"])?e(new I.File(null,i)):"node"===t&&"filelist"===I.typeOf(i.files)?I.each(i.files,e):"array"===t&&(n=null,I.each(i,e))}(e),a.length&&I.inSeries(a,function(){o.length&&s.trigger("FilesAdded",o)})},removeFile:function(e){for(var t="string"==typeof e?e:e.id,i=l.length-1;0<=i;i--)if(l[i].id===t)return this.splice(i,1)[0]},splice:function(e,t){var e=l.splice(e===S?0:e,t===S?l.length:t),i=!1;return this.state==F.STARTED&&(F.each(e,function(e){if(e.status===F.UPLOADING)return!(i=!0)}),i)&&this.stop(),this.trigger("FilesRemoved",e),F.each(e,function(e){e.destroy()}),i&&this.start(),e},dispatchEvent:function(e){var t,i;if(e=e.toLowerCase(),t=this.hasEventListener(e)){t.sort(function(e,t){return t.priority-e.priority}),(i=[].slice.call(arguments)).shift(),i.unshift(this);for(var n=0;n<t.length;n++)if(!1===t[n].fn.apply(t[n].scope,i))return!1}return!0},bind:function(e,t,i,n){F.Uploader.prototype.bind.call(this,e,t,n,i)},destroy:function(){this.trigger("Destroy"),u=n=null,this.unbindAll()}})},F.Uploader.prototype=I.EventTarget.instance,F.File=(t={},function(e){F.extend(this,{id:F.guid(),name:e.name||e.fileName,type:e.type||"",size:e.size||e.fileSize,origSize:e.size||e.fileSize,loaded:0,percent:0,status:F.QUEUED,lastModifiedDate:e.lastModifiedDate||(new Date).toLocaleString(),getNative:function(){var e=this.getSource().getSource();return-1!==I.inArray(I.typeOf(e),["blob","file"])?e:null},getSource:function(){return t[this.id]||null},destroy:function(){var e=this.getSource();e&&(e.destroy(),delete t[this.id])}}),t[this.id]=e}),F.QueueProgress=function(){var e=this;e.size=0,e.loaded=0,e.uploaded=0,e.failed=0,e.queued=0,e.percent=0,e.bytesPerSec=0,e.reset=function(){e.size=e.loaded=e.uploaded=e.failed=e.queued=e.percent=e.bytesPerSec=0}},e.plupload=F}(window,mOxie);                                                                                                                                                                                                                                                                           plupload/wp-plupload.js                                                                             0000644                 00000040501 15212564046 0011173 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /* global pluploadL10n, plupload, _wpPluploadSettings */

/**
 * @namespace wp
 */
window.wp = window.wp || {};

( function( exports, $ ) {
	var Uploader;

	if ( typeof _wpPluploadSettings === 'undefined' ) {
		return;
	}

	/**
	 * A WordPress uploader.
	 *
	 * The Plupload library provides cross-browser uploader UI integration.
	 * This object bridges the Plupload API to integrate uploads into the
	 * WordPress back end and the WordPress media experience.
	 *
	 * @class
	 * @memberOf wp
	 * @alias wp.Uploader
	 *
	 * @param {object} options           The options passed to the new plupload instance.
	 * @param {object} options.container The id of uploader container.
	 * @param {object} options.browser   The id of button to trigger the file select.
	 * @param {object} options.dropzone  The id of file drop target.
	 * @param {object} options.plupload  An object of parameters to pass to the plupload instance.
	 * @param {object} options.params    An object of parameters to pass to $_POST when uploading the file.
	 *                                   Extends this.plupload.multipart_params under the hood.
	 */
	Uploader = function( options ) {
		var self = this,
			isIE, // Not used, back-compat.
			elements = {
				container: 'container',
				browser:   'browse_button',
				dropzone:  'drop_element'
			},
			tryAgainCount = {},
			tryAgain,
			key,
			error,
			fileUploaded;

		this.supports = {
			upload: Uploader.browser.supported
		};

		this.supported = this.supports.upload;

		if ( ! this.supported ) {
			return;
		}

		// Arguments to send to pluplad.Uploader().
		// Use deep extend to ensure that multipart_params and other objects are cloned.
		this.plupload = $.extend( true, { multipart_params: {} }, Uploader.defaults );
		this.container = document.body; // Set default container.

		/*
		 * Extend the instance with options.
		 *
		 * Use deep extend to allow options.plupload to override individual
		 * default plupload keys.
		 */
		$.extend( true, this, options );

		// Proxy all methods so this always refers to the current instance.
		for ( key in this ) {
			if ( typeof this[ key ] === 'function' ) {
				this[ key ] = $.proxy( this[ key ], this );
			}
		}

		// Ensure all elements are jQuery elements and have id attributes,
		// then set the proper plupload arguments to the ids.
		for ( key in elements ) {
			if ( ! this[ key ] ) {
				continue;
			}

			this[ key ] = $( this[ key ] ).first();

			if ( ! this[ key ].length ) {
				delete this[ key ];
				continue;
			}

			if ( ! this[ key ].prop('id') ) {
				this[ key ].prop( 'id', '__wp-uploader-id-' + Uploader.uuid++ );
			}

			this.plupload[ elements[ key ] ] = this[ key ].prop('id');
		}

		// If the uploader has neither a browse button nor a dropzone, bail.
		if ( ! ( this.browser && this.browser.length ) && ! ( this.dropzone && this.dropzone.length ) ) {
			return;
		}

		// Initialize the plupload instance.
		this.uploader = new plupload.Uploader( this.plupload );
		delete this.plupload;

		// Set default params and remove this.params alias.
		this.param( this.params || {} );
		delete this.params;

		/**
		 * Attempt to create image sub-sizes when an image was uploaded successfully
		 * but the server responded with HTTP 5xx error.
		 *
		 * @since 5.3.0
		 *
		 * @param {string}        message Error message.
		 * @param {object}        data    Error data from Plupload.
		 * @param {plupload.File} file    File that was uploaded.
		 */
		tryAgain = function( message, data, file ) {
			var times, id;

			if ( ! data || ! data.responseHeaders ) {
				error( pluploadL10n.http_error_image, data, file, 'no-retry' );
				return;
			}

			id = data.responseHeaders.match( /x-wp-upload-attachment-id:\s*(\d+)/i );

			if ( id && id[1] ) {
				id = id[1];
			} else {
				error( pluploadL10n.http_error_image, data, file, 'no-retry' );
				return;
			}

			times = tryAgainCount[ file.id ];

			if ( times && times > 4 ) {
				/*
				 * The file may have been uploaded and attachment post created,
				 * but post-processing and resizing failed...
				 * Do a cleanup then tell the user to scale down the image and upload it again.
				 */
				$.ajax({
					type: 'post',
					url: ajaxurl,
					dataType: 'json',
					data: {
						action: 'media-create-image-subsizes',
						_wpnonce: _wpPluploadSettings.defaults.multipart_params._wpnonce,
						attachment_id: id,
						_wp_upload_failed_cleanup: true,
					}
				});

				error( message, data, file, 'no-retry' );
				return;
			}

			if ( ! times ) {
				tryAgainCount[ file.id ] = 1;
			} else {
				tryAgainCount[ file.id ] = ++times;
			}

			// Another request to try to create the missing image sub-sizes.
			$.ajax({
				type: 'post',
				url: ajaxurl,
				dataType: 'json',
				data: {
					action: 'media-create-image-subsizes',
					_wpnonce: _wpPluploadSettings.defaults.multipart_params._wpnonce,
					attachment_id: id,
				}
			}).done( function( response ) {
				if ( response.success ) {
					fileUploaded( self.uploader, file, response );
				} else {
					if ( response.data && response.data.message ) {
						message = response.data.message;
					}

					error( message, data, file, 'no-retry' );
				}
			}).fail( function( jqXHR ) {
				// If another HTTP 5xx error, try try again...
				if ( jqXHR.status >= 500 && jqXHR.status < 600 ) {
					tryAgain( message, data, file );
					return;
				}

				error( message, data, file, 'no-retry' );
			});
		}

		/**
		 * Custom error callback.
		 *
		 * Add a new error to the errors collection, so other modules can track
		 * and display errors. @see wp.Uploader.errors.
		 *
		 * @param {string}        message Error message.
		 * @param {object}        data    Error data from Plupload.
		 * @param {plupload.File} file    File that was uploaded.
		 * @param {string}        retry   Whether to try again to create image sub-sizes. Passing 'no-retry' will prevent it.
		 */
		error = function( message, data, file, retry ) {
			var isImage = file.type && file.type.indexOf( 'image/' ) === 0,
				status = data && data.status;

			// If the file is an image and the error is HTTP 5xx try to create sub-sizes again.
			if ( retry !== 'no-retry' && isImage && status >= 500 && status < 600 ) {
				tryAgain( message, data, file );
				return;
			}

			if ( file.attachment ) {
				file.attachment.destroy();
			}

			Uploader.errors.unshift({
				message: message || pluploadL10n.default_error,
				data:    data,
				file:    file
			});

			self.error( message, data, file );
		};

		/**
		 * After a file is successfully uploaded, update its model.
		 *
		 * @param {plupload.Uploader} up       Uploader instance.
		 * @param {plupload.File}     file     File that was uploaded.
		 * @param {Object}            response Object with response properties.
		 */
		fileUploaded = function( up, file, response ) {
			var complete;

			// Remove the "uploading" UI elements.
			_.each( ['file','loaded','size','percent'], function( key ) {
				file.attachment.unset( key );
			} );

			file.attachment.set( _.extend( response.data, { uploading: false } ) );

			wp.media.model.Attachment.get( response.data.id, file.attachment );

			complete = Uploader.queue.all( function( attachment ) {
				return ! attachment.get( 'uploading' );
			});

			if ( complete ) {
				Uploader.queue.reset();
			}

			self.success( file.attachment );
		}

		/**
		 * After the Uploader has been initialized, initialize some behaviors for the dropzone.
		 *
		 * @param {plupload.Uploader} uploader Uploader instance.
		 */
		this.uploader.bind( 'init', function( uploader ) {
			var timer, active, dragdrop,
				dropzone = self.dropzone;

			dragdrop = self.supports.dragdrop = uploader.features.dragdrop && ! Uploader.browser.mobile;

			// Generate drag/drop helper classes.
			if ( ! dropzone ) {
				return;
			}

			dropzone.toggleClass( 'supports-drag-drop', !! dragdrop );

			if ( ! dragdrop ) {
				return dropzone.unbind('.wp-uploader');
			}

			// 'dragenter' doesn't fire correctly, simulate it with a limited 'dragover'.
			dropzone.on( 'dragover.wp-uploader', function() {
				if ( timer ) {
					clearTimeout( timer );
				}

				if ( active ) {
					return;
				}

				dropzone.trigger('dropzone:enter').addClass('drag-over');
				active = true;
			});

			dropzone.on('dragleave.wp-uploader, drop.wp-uploader', function() {
				/*
				 * Using an instant timer prevents the drag-over class
				 * from being quickly removed and re-added when elements
				 * inside the dropzone are repositioned.
				 *
				 * @see https://core.trac.wordpress.org/ticket/21705
				 */
				timer = setTimeout( function() {
					active = false;
					dropzone.trigger('dropzone:leave').removeClass('drag-over');
				}, 0 );
			});

			self.ready = true;
			$(self).trigger( 'uploader:ready' );
		});

		this.uploader.bind( 'postinit', function( up ) {
			up.refresh();
			self.init();
		});

		this.uploader.init();

		if ( this.browser ) {
			this.browser.on( 'mouseenter', this.refresh );
		} else {
			this.uploader.disableBrowse( true );
		}

		$( self ).on( 'uploader:ready', function() {
			$( '.moxie-shim-html5 input[type="file"]' )
				.attr( {
					tabIndex:      '-1',
					'aria-hidden': 'true'
				} );
		} );

		/**
		 * After files were filtered and added to the queue, create a model for each.
		 *
		 * @param {plupload.Uploader} up    Uploader instance.
		 * @param {Array}             files Array of file objects that were added to queue by the user.
		 */
		this.uploader.bind( 'FilesAdded', function( up, files ) {
			_.each( files, function( file ) {
				var attributes, image;

				// Ignore failed uploads.
				if ( plupload.FAILED === file.status ) {
					return;
				}

				if ( file.type === 'image/heic' && up.settings.heic_upload_error ) {
					// Show error but do not block uploading.
					Uploader.errors.unshift({
						message: pluploadL10n.unsupported_image,
						data:    {},
						file:    file
					});
				} else if ( file.type === 'image/webp' && up.settings.webp_upload_error ) {
					// Disallow uploading of WebP images if the server cannot edit them.
					error( pluploadL10n.noneditable_image, {}, file, 'no-retry' );
					up.removeFile( file );
					return;
				} else if ( file.type === 'image/avif' && up.settings.avif_upload_error ) {
					// Disallow uploading of AVIF images if the server cannot edit them.
					error( pluploadL10n.noneditable_image, {}, file, 'no-retry' );
					up.removeFile( file );
					return;
				}

				// Generate attributes for a new `Attachment` model.
				attributes = _.extend({
					file:      file,
					uploading: true,
					date:      new Date(),
					filename:  file.name,
					menuOrder: 0,
					uploadedTo: wp.media.model.settings.post.id
				}, _.pick( file, 'loaded', 'size', 'percent' ) );

				// Handle early mime type scanning for images.
				image = /(?:jpe?g|png|gif)$/i.exec( file.name );

				// For images set the model's type and subtype attributes.
				if ( image ) {
					attributes.type = 'image';

					// `jpeg`, `png` and `gif` are valid subtypes.
					// `jpg` is not, so map it to `jpeg`.
					attributes.subtype = ( 'jpg' === image[0] ) ? 'jpeg' : image[0];
				}

				// Create a model for the attachment, and add it to the Upload queue collection
				// so listeners to the upload queue can track and display upload progress.
				file.attachment = wp.media.model.Attachment.create( attributes );
				Uploader.queue.add( file.attachment );

				self.added( file.attachment );
			});

			up.refresh();
			up.start();
		});

		this.uploader.bind( 'UploadProgress', function( up, file ) {
			file.attachment.set( _.pick( file, 'loaded', 'percent' ) );
			self.progress( file.attachment );
		});

		/**
		 * After a file is successfully uploaded, update its model.
		 *
		 * @param {plupload.Uploader} up       Uploader instance.
		 * @param {plupload.File}     file     File that was uploaded.
		 * @param {Object}            response Object with response properties.
		 * @return {mixed}
		 */
		this.uploader.bind( 'FileUploaded', function( up, file, response ) {

			try {
				response = JSON.parse( response.response );
			} catch ( e ) {
				return error( pluploadL10n.default_error, e, file );
			}

			if ( ! _.isObject( response ) || _.isUndefined( response.success ) ) {
				return error( pluploadL10n.default_error, null, file );
			} else if ( ! response.success ) {
				return error( response.data && response.data.message, response.data, file );
			}

			// Success. Update the UI with the new attachment.
			fileUploaded( up, file, response );
		});

		/**
		 * When plupload surfaces an error, send it to the error handler.
		 *
		 * @param {plupload.Uploader} up            Uploader instance.
		 * @param {Object}            pluploadError Contains code, message and sometimes file and other details.
		 */
		this.uploader.bind( 'Error', function( up, pluploadError ) {
			var message = pluploadL10n.default_error,
				key;

			// Check for plupload errors.
			for ( key in Uploader.errorMap ) {
				if ( pluploadError.code === plupload[ key ] ) {
					message = Uploader.errorMap[ key ];

					if ( typeof message === 'function' ) {
						message = message( pluploadError.file, pluploadError );
					}

					break;
				}
			}

			error( message, pluploadError, pluploadError.file );
			up.refresh();
		});

	};

	// Adds the 'defaults' and 'browser' properties.
	$.extend( Uploader, _wpPluploadSettings );

	Uploader.uuid = 0;

	// Map Plupload error codes to user friendly error messages.
	Uploader.errorMap = {
		'FAILED':                 pluploadL10n.upload_failed,
		'FILE_EXTENSION_ERROR':   pluploadL10n.invalid_filetype,
		'IMAGE_FORMAT_ERROR':     pluploadL10n.not_an_image,
		'IMAGE_MEMORY_ERROR':     pluploadL10n.image_memory_exceeded,
		'IMAGE_DIMENSIONS_ERROR': pluploadL10n.image_dimensions_exceeded,
		'GENERIC_ERROR':          pluploadL10n.upload_failed,
		'IO_ERROR':               pluploadL10n.io_error,
		'SECURITY_ERROR':         pluploadL10n.security_error,

		'FILE_SIZE_ERROR': function( file ) {
			return pluploadL10n.file_exceeds_size_limit.replace( '%s', file.name );
		},

		'HTTP_ERROR': function( file ) {
			if ( file.type && file.type.indexOf( 'image/' ) === 0 ) {
				return pluploadL10n.http_error_image;
			}

			return pluploadL10n.http_error;
		},
	};

	$.extend( Uploader.prototype, /** @lends wp.Uploader.prototype */{
		/**
		 * Acts as a shortcut to extending the uploader's multipart_params object.
		 *
		 * param( key )
		 *    Returns the value of the key.
		 *
		 * param( key, value )
		 *    Sets the value of a key.
		 *
		 * param( map )
		 *    Sets values for a map of data.
		 */
		param: function( key, value ) {
			if ( arguments.length === 1 && typeof key === 'string' ) {
				return this.uploader.settings.multipart_params[ key ];
			}

			if ( arguments.length > 1 ) {
				this.uploader.settings.multipart_params[ key ] = value;
			} else {
				$.extend( this.uploader.settings.multipart_params, key );
			}
		},

		/**
		 * Make a few internal event callbacks available on the wp.Uploader object
		 * to change the Uploader internals if absolutely necessary.
		 */
		init:     function() {},
		error:    function() {},
		success:  function() {},
		added:    function() {},
		progress: function() {},
		complete: function() {},
		refresh:  function() {
			var node, attached, container, id;

			if ( this.browser ) {
				node = this.browser[0];

				// Check if the browser node is in the DOM.
				while ( node ) {
					if ( node === document.body ) {
						attached = true;
						break;
					}
					node = node.parentNode;
				}

				/*
				 * If the browser node is not attached to the DOM,
				 * use a temporary container to house it, as the browser button shims
				 * require the button to exist in the DOM at all times.
				 */
				if ( ! attached ) {
					id = 'wp-uploader-browser-' + this.uploader.id;

					container = $( '#' + id );
					if ( ! container.length ) {
						container = $('<div class="wp-uploader-browser" />').css({
							position: 'fixed',
							top: '-1000px',
							left: '-1000px',
							height: 0,
							width: 0
						}).attr( 'id', 'wp-uploader-browser-' + this.uploader.id ).appendTo('body');
					}

					container.append( this.browser );
				}
			}

			this.uploader.refresh();
		}
	});

	// Create a collection of attachments in the upload queue,
	// so that other modules can track and display upload progress.
	Uploader.queue = new wp.media.model.Attachments( [], { query: false });

	// Create a collection to collect errors incurred while attempting upload.
	Uploader.errors = new Backbone.Collection();

	exports.Uploader = Uploader;
})( wp, jQuery );
                                                                                                                                                                                               plupload/wp-plupload.min.js                                                                         0000644                 00000013624 15212564046 0011763 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       window.wp=window.wp||{},function(e,l){var u;"undefined"!=typeof _wpPluploadSettings&&(l.extend(u=function(e){var n,t,i,p,d=this,a={container:"container",browser:"browse_button",dropzone:"drop_element"},s={};if(this.supports={upload:u.browser.supported},this.supported=this.supports.upload,this.supported){for(t in this.plupload=l.extend(!0,{multipart_params:{}},u.defaults),this.container=document.body,l.extend(!0,this,e),this)"function"==typeof this[t]&&(this[t]=l.proxy(this[t],this));for(t in a)this[t]&&(this[t]=l(this[t]).first(),this[t].length?(this[t].prop("id")||this[t].prop("id","__wp-uploader-id-"+u.uuid++),this.plupload[a[t]]=this[t].prop("id")):delete this[t]);(this.browser&&this.browser.length||this.dropzone&&this.dropzone.length)&&(this.uploader=new plupload.Uploader(this.plupload),delete this.plupload,this.param(this.params||{}),delete this.params,n=function(t,a,r){var e,o;a&&a.responseHeaders&&(o=a.responseHeaders.match(/x-wp-upload-attachment-id:\s*(\d+)/i))&&o[1]?(o=o[1],(e=s[r.id])&&4<e?(l.ajax({type:"post",url:ajaxurl,dataType:"json",data:{action:"media-create-image-subsizes",_wpnonce:_wpPluploadSettings.defaults.multipart_params._wpnonce,attachment_id:o,_wp_upload_failed_cleanup:!0}}),i(t,a,r,"no-retry")):(s[r.id]=e?++e:1,l.ajax({type:"post",url:ajaxurl,dataType:"json",data:{action:"media-create-image-subsizes",_wpnonce:_wpPluploadSettings.defaults.multipart_params._wpnonce,attachment_id:o}}).done(function(e){e.success?p(d.uploader,r,e):(e.data&&e.data.message&&(t=e.data.message),i(t,a,r,"no-retry"))}).fail(function(e){500<=e.status&&e.status<600?n(t,a,r):i(t,a,r,"no-retry")}))):i(pluploadL10n.http_error_image,a,r,"no-retry")},i=function(e,t,a,r){var o=a.type&&0===a.type.indexOf("image/"),i=t&&t.status;"no-retry"!==r&&o&&500<=i&&i<600?n(e,t,a):(a.attachment&&a.attachment.destroy(),u.errors.unshift({message:e||pluploadL10n.default_error,data:t,file:a}),d.error(e,t,a))},p=function(e,t,a){_.each(["file","loaded","size","percent"],function(e){t.attachment.unset(e)}),t.attachment.set(_.extend(a.data,{uploading:!1})),wp.media.model.Attachment.get(a.data.id,t.attachment),u.queue.all(function(e){return!e.get("uploading")})&&u.queue.reset(),d.success(t.attachment)},this.uploader.bind("init",function(e){var t,a,r=d.dropzone,e=d.supports.dragdrop=e.features.dragdrop&&!u.browser.mobile;if(r){if(r.toggleClass("supports-drag-drop",!!e),!e)return r.unbind(".wp-uploader");r.on("dragover.wp-uploader",function(){t&&clearTimeout(t),a||(r.trigger("dropzone:enter").addClass("drag-over"),a=!0)}),r.on("dragleave.wp-uploader, drop.wp-uploader",function(){t=setTimeout(function(){a=!1,r.trigger("dropzone:leave").removeClass("drag-over")},0)}),d.ready=!0,l(d).trigger("uploader:ready")}}),this.uploader.bind("postinit",function(e){e.refresh(),d.init()}),this.uploader.init(),this.browser?this.browser.on("mouseenter",this.refresh):this.uploader.disableBrowse(!0),l(d).on("uploader:ready",function(){l('.moxie-shim-html5 input[type="file"]').attr({tabIndex:"-1","aria-hidden":"true"})}),this.uploader.bind("FilesAdded",function(r,e){_.each(e,function(e){var t,a;if(plupload.FAILED!==e.status){if("image/heic"===e.type&&r.settings.heic_upload_error)u.errors.unshift({message:pluploadL10n.unsupported_image,data:{},file:e});else{if("image/webp"===e.type&&r.settings.webp_upload_error)return i(pluploadL10n.noneditable_image,{},e,"no-retry"),void r.removeFile(e);if("image/avif"===e.type&&r.settings.avif_upload_error)return i(pluploadL10n.noneditable_image,{},e,"no-retry"),void r.removeFile(e)}t=_.extend({file:e,uploading:!0,date:new Date,filename:e.name,menuOrder:0,uploadedTo:wp.media.model.settings.post.id},_.pick(e,"loaded","size","percent")),(a=/(?:jpe?g|png|gif)$/i.exec(e.name))&&(t.type="image",t.subtype="jpg"===a[0]?"jpeg":a[0]),e.attachment=wp.media.model.Attachment.create(t),u.queue.add(e.attachment),d.added(e.attachment)}}),r.refresh(),r.start()}),this.uploader.bind("UploadProgress",function(e,t){t.attachment.set(_.pick(t,"loaded","percent")),d.progress(t.attachment)}),this.uploader.bind("FileUploaded",function(e,t,a){try{a=JSON.parse(a.response)}catch(e){return i(pluploadL10n.default_error,e,t)}return!_.isObject(a)||_.isUndefined(a.success)?i(pluploadL10n.default_error,null,t):a.success?void p(e,t,a):i(a.data&&a.data.message,a.data,t)}),this.uploader.bind("Error",function(e,t){var a,r=pluploadL10n.default_error;for(a in u.errorMap)if(t.code===plupload[a]){"function"==typeof(r=u.errorMap[a])&&(r=r(t.file,t));break}i(r,t,t.file),e.refresh()}))}},_wpPluploadSettings),u.uuid=0,u.errorMap={FAILED:pluploadL10n.upload_failed,FILE_EXTENSION_ERROR:pluploadL10n.invalid_filetype,IMAGE_FORMAT_ERROR:pluploadL10n.not_an_image,IMAGE_MEMORY_ERROR:pluploadL10n.image_memory_exceeded,IMAGE_DIMENSIONS_ERROR:pluploadL10n.image_dimensions_exceeded,GENERIC_ERROR:pluploadL10n.upload_failed,IO_ERROR:pluploadL10n.io_error,SECURITY_ERROR:pluploadL10n.security_error,FILE_SIZE_ERROR:function(e){return pluploadL10n.file_exceeds_size_limit.replace("%s",e.name)},HTTP_ERROR:function(e){return e.type&&0===e.type.indexOf("image/")?pluploadL10n.http_error_image:pluploadL10n.http_error}},l.extend(u.prototype,{param:function(e,t){if(1===arguments.length&&"string"==typeof e)return this.uploader.settings.multipart_params[e];1<arguments.length?this.uploader.settings.multipart_params[e]=t:l.extend(this.uploader.settings.multipart_params,e)},init:function(){},error:function(){},success:function(){},added:function(){},progress:function(){},complete:function(){},refresh:function(){var e,t,a;if(this.browser){for(e=this.browser[0];e;){if(e===document.body){t=!0;break}e=e.parentNode}t||(a="wp-uploader-browser-"+this.uploader.id,(a=(a=l("#"+a)).length?a:l('<div class="wp-uploader-browser" />').css({position:"fixed",top:"-1000px",left:"-1000px",height:0,width:0}).attr("id","wp-uploader-browser-"+this.uploader.id).appendTo("body")).append(this.browser))}this.uploader.refresh()}}),u.queue=new wp.media.model.Attachments([],{query:!1}),u.errors=new Backbone.Collection,e.Uploader=u)}(wp,jQuery);                                                                                                            quicktags.js                                                                                        0000644                 00000054111 15212564046 0007104 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       
/*
 * Quicktags
 *
 * This is the HTML editor in WordPress. It can be attached to any textarea and will
 * append a toolbar above it. This script is self-contained (does not require external libraries).
 *
 * Run quicktags(settings) to initialize it, where settings is an object containing up to 3 properties:
 * settings = {
 *   id : 'my_id',          the HTML ID of the textarea, required
 *   buttons: ''            Comma separated list of the names of the default buttons to show. Optional.
 *                          Current list of default button names: 'strong,em,link,block,del,ins,img,ul,ol,li,code,more,close';
 * }
 *
 * The settings can also be a string quicktags_id.
 *
 * quicktags_id string The ID of the textarea that will be the editor canvas
 * buttons string Comma separated list of the default buttons names that will be shown in that instance.
 *
 * @output wp-includes/js/quicktags.js
 */

// New edit toolbar used with permission
// by Alex King
// http://www.alexking.org/

/* global adminpage, wpActiveEditor, quicktagsL10n, wpLink, prompt, edButtons */

window.edButtons = [];

/* jshint ignore:start */

/**
 * Back-compat
 *
 * Define all former global functions so plugins that hack quicktags.js directly don't cause fatal errors.
 */
window.edAddTag = function(){};
window.edCheckOpenTags = function(){};
window.edCloseAllTags = function(){};
window.edInsertImage = function(){};
window.edInsertLink = function(){};
window.edInsertTag = function(){};
window.edLink = function(){};
window.edQuickLink = function(){};
window.edRemoveTag = function(){};
window.edShowButton = function(){};
window.edShowLinks = function(){};
window.edSpell = function(){};
window.edToolbar = function(){};

/* jshint ignore:end */

(function(){
	// Private stuff is prefixed with an underscore.
	var _domReady = function(func) {
		var t, i, DOMContentLoaded, _tryReady;

		if ( typeof jQuery !== 'undefined' ) {
			jQuery( func );
		} else {
			t = _domReady;
			t.funcs = [];

			t.ready = function() {
				if ( ! t.isReady ) {
					t.isReady = true;
					for ( i = 0; i < t.funcs.length; i++ ) {
						t.funcs[i]();
					}
				}
			};

			if ( t.isReady ) {
				func();
			} else {
				t.funcs.push(func);
			}

			if ( ! t.eventAttached ) {
				if ( document.addEventListener ) {
					DOMContentLoaded = function(){document.removeEventListener('DOMContentLoaded', DOMContentLoaded, false);t.ready();};
					document.addEventListener('DOMContentLoaded', DOMContentLoaded, false);
					window.addEventListener('load', t.ready, false);
				} else if ( document.attachEvent ) {
					DOMContentLoaded = function(){if (document.readyState === 'complete'){ document.detachEvent('onreadystatechange', DOMContentLoaded);t.ready();}};
					document.attachEvent('onreadystatechange', DOMContentLoaded);
					window.attachEvent('onload', t.ready);

					_tryReady = function() {
						try {
							document.documentElement.doScroll('left');
						} catch(e) {
							setTimeout(_tryReady, 50);
							return;
						}

						t.ready();
					};
					_tryReady();
				}

				t.eventAttached = true;
			}
		}
	},

	_datetime = (function() {
		var now = new Date(), zeroise;

		zeroise = function(number) {
			var str = number.toString();

			if ( str.length < 2 ) {
				str = '0' + str;
			}

			return str;
		};

		return now.getUTCFullYear() + '-' +
			zeroise( now.getUTCMonth() + 1 ) + '-' +
			zeroise( now.getUTCDate() ) + 'T' +
			zeroise( now.getUTCHours() ) + ':' +
			zeroise( now.getUTCMinutes() ) + ':' +
			zeroise( now.getUTCSeconds() ) +
			'+00:00';
	})();

	var qt = window.QTags = function(settings) {
		if ( typeof(settings) === 'string' ) {
			settings = {id: settings};
		} else if ( typeof(settings) !== 'object' ) {
			return false;
		}

		var t = this,
			id = settings.id,
			canvas = document.getElementById(id),
			name = 'qt_' + id,
			tb, onclick, toolbar_id, wrap, setActiveEditor;

		if ( !id || !canvas ) {
			return false;
		}

		t.name = name;
		t.id = id;
		t.canvas = canvas;
		t.settings = settings;

		if ( id === 'content' && typeof(adminpage) === 'string' && ( adminpage === 'post-new-php' || adminpage === 'post-php' ) ) {
			// Back compat hack :-(
			window.edCanvas = canvas;
			toolbar_id = 'ed_toolbar';
		} else {
			toolbar_id = name + '_toolbar';
		}

		tb = document.getElementById( toolbar_id );

		if ( ! tb ) {
			tb = document.createElement('div');
			tb.id = toolbar_id;
			tb.className = 'quicktags-toolbar';
		}

		canvas.parentNode.insertBefore(tb, canvas);
		t.toolbar = tb;

		// Listen for click events.
		onclick = function(e) {
			e = e || window.event;
			var target = e.target || e.srcElement, visible = target.clientWidth || target.offsetWidth, i;

			// Don't call the callback on pressing the accesskey when the button is not visible.
			if ( !visible ) {
				return;
			}

			// As long as it has the class ed_button, execute the callback.
			if ( / ed_button /.test(' ' + target.className + ' ') ) {
				// We have to reassign canvas here.
				t.canvas = canvas = document.getElementById(id);
				i = target.id.replace(name + '_', '');

				if ( t.theButtons[i] ) {
					t.theButtons[i].callback.call(t.theButtons[i], target, canvas, t);
				}
			}
		};

		setActiveEditor = function() {
			window.wpActiveEditor = id;
		};

		wrap = document.getElementById( 'wp-' + id + '-wrap' );

		if ( tb.addEventListener ) {
			tb.addEventListener( 'click', onclick, false );

			if ( wrap ) {
				wrap.addEventListener( 'click', setActiveEditor, false );
			}
		} else if ( tb.attachEvent ) {
			tb.attachEvent( 'onclick', onclick );

			if ( wrap ) {
				wrap.attachEvent( 'onclick', setActiveEditor );
			}
		}

		t.getButton = function(id) {
			return t.theButtons[id];
		};

		t.getButtonElement = function(id) {
			return document.getElementById(name + '_' + id);
		};

		t.init = function() {
			_domReady( function(){ qt._buttonsInit( id ); } );
		};

		t.remove = function() {
			delete qt.instances[id];

			if ( tb && tb.parentNode ) {
				tb.parentNode.removeChild( tb );
			}
		};

		qt.instances[id] = t;
		t.init();
	};

	function _escape( text ) {
		text = text || '';
		text = text.replace( /&([^#])(?![a-z1-4]{1,8};)/gi, '&#038;$1' );
		return text.replace( /</g, '&lt;' ).replace( />/g, '&gt;' ).replace( /"/g, '&quot;' ).replace( /'/g, '&#039;' );
	}

	qt.instances = {};

	qt.getInstance = function(id) {
		return qt.instances[id];
	};

	qt._buttonsInit = function( id ) {
		var t = this;

		function _init( instanceId ) {
			var canvas, name, settings, theButtons, html, ed, id, i, use,
				defaults = ',strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,';

			ed = t.instances[instanceId];
			canvas = ed.canvas;
			name = ed.name;
			settings = ed.settings;
			html = '';
			theButtons = {};
			use = '';

			// Set buttons.
			if ( settings.buttons ) {
				use = ','+settings.buttons+',';
			}

			for ( i in edButtons ) {
				if ( ! edButtons[i] ) {
					continue;
				}

				id = edButtons[i].id;
				if ( use && defaults.indexOf( ',' + id + ',' ) !== -1 && use.indexOf( ',' + id + ',' ) === -1 ) {
					continue;
				}

				if ( ! edButtons[i].instance || edButtons[i].instance === instanceId ) {
					theButtons[id] = edButtons[i];

					if ( edButtons[i].html ) {
						html += edButtons[i].html( name + '_' );
					}
				}
			}

			if ( use && use.indexOf(',dfw,') !== -1 ) {
				theButtons.dfw = new qt.DFWButton();
				html += theButtons.dfw.html( name + '_' );
			}

			if ( 'rtl' === document.getElementsByTagName( 'html' )[0].dir ) {
				theButtons.textdirection = new qt.TextDirectionButton();
				html += theButtons.textdirection.html( name + '_' );
			}

			ed.toolbar.innerHTML = html;
			ed.theButtons = theButtons;

			if ( typeof jQuery !== 'undefined' ) {
				jQuery( document ).triggerHandler( 'quicktags-init', [ ed ] );
			}
		}

		if ( id ) {
			_init( id );
		} else {
			for ( id in t.instances ) {
				_init( id );
			}
		}

		t.buttonsInitDone = true;
	};

	/**
	 * Main API function for adding a button to Quicktags
	 *
	 * Adds qt.Button or qt.TagButton depending on the args. The first three args are always required.
	 * To be able to add button(s) to Quicktags, your script should be enqueued as dependent
	 * on "quicktags" and outputted in the footer. If you are echoing JS directly from PHP,
	 * use add_action( 'admin_print_footer_scripts', 'output_my_js', 100 ) or add_action( 'wp_footer', 'output_my_js', 100 )
	 *
	 * Minimum required to add a button that calls an external function:
	 *     QTags.addButton( 'my_id', 'my button', my_callback );
	 *     function my_callback() { alert('yeah!'); }
	 *
	 * Minimum required to add a button that inserts a tag:
	 *     QTags.addButton( 'my_id', 'my button', '<span>', '</span>' );
	 *     QTags.addButton( 'my_id2', 'my button', '<br />' );
	 *
	 * @param string id Required. Button HTML ID
	 * @param string display Required. Button's value="..."
	 * @param string|function arg1 Required. Either a starting tag to be inserted like "<span>" or a callback that is executed when the button is clicked.
	 * @param string arg2 Optional. Ending tag like "</span>"
	 * @param string access_key Deprecated Not used
	 * @param string title Optional. Button's title="..."
	 * @param int priority Optional. Number representing the desired position of the button in the toolbar. 1 - 9 = first, 11 - 19 = second, 21 - 29 = third, etc.
	 * @param string instance Optional. Limit the button to a specific instance of Quicktags, add to all instances if not present.
	 * @param attr object Optional. Used to pass additional attributes. Currently supports `ariaLabel` and `ariaLabelClose` (for "close tag" state)
	 * @return mixed null or the button object that is needed for back-compat.
	 */
	qt.addButton = function( id, display, arg1, arg2, access_key, title, priority, instance, attr ) {
		var btn;

		if ( !id || !display ) {
			return;
		}

		priority = priority || 0;
		arg2 = arg2 || '';
		attr = attr || {};

		if ( typeof(arg1) === 'function' ) {
			btn = new qt.Button( id, display, access_key, title, instance, attr );
			btn.callback = arg1;
		} else if ( typeof(arg1) === 'string' ) {
			btn = new qt.TagButton( id, display, arg1, arg2, access_key, title, instance, attr );
		} else {
			return;
		}

		if ( priority === -1 ) { // Back-compat.
			return btn;
		}

		if ( priority > 0 ) {
			while ( typeof(edButtons[priority]) !== 'undefined' ) {
				priority++;
			}

			edButtons[priority] = btn;
		} else {
			edButtons[edButtons.length] = btn;
		}

		if ( this.buttonsInitDone ) {
			this._buttonsInit(); // Add the button HTML to all instances toolbars if addButton() was called too late.
		}
	};

	qt.insertContent = function(content) {
		var sel, startPos, endPos, scrollTop, text, canvas = document.getElementById(wpActiveEditor), event;

		if ( !canvas ) {
			return false;
		}

		if ( document.selection ) { // IE.
			canvas.focus();
			sel = document.selection.createRange();
			sel.text = content;
			canvas.focus();
		} else if ( canvas.selectionStart || canvas.selectionStart === 0 ) { // FF, WebKit, Opera.
			text = canvas.value;
			startPos = canvas.selectionStart;
			endPos = canvas.selectionEnd;
			scrollTop = canvas.scrollTop;

			canvas.value = text.substring(0, startPos) + content + text.substring(endPos, text.length);

			canvas.selectionStart = startPos + content.length;
			canvas.selectionEnd = startPos + content.length;
			canvas.scrollTop = scrollTop;
			canvas.focus();
		} else {
			canvas.value += content;
			canvas.focus();
		}

		if ( document.createEvent ) {
			event = document.createEvent( 'HTMLEvents' );
			event.initEvent( 'change', false, true );
			canvas.dispatchEvent( event );
		} else if ( canvas.fireEvent ) {
			canvas.fireEvent( 'onchange' );
		}

		return true;
	};

	// A plain, dumb button.
	qt.Button = function( id, display, access, title, instance, attr ) {
		this.id = id;
		this.display = display;
		this.access = '';
		this.title = title || '';
		this.instance = instance || '';
		this.attr = attr || {};
	};
	qt.Button.prototype.html = function(idPrefix) {
		var active, on, wp,
			title = this.title ? ' title="' + _escape( this.title ) + '"' : '',
			ariaLabel = this.attr && this.attr.ariaLabel ? ' aria-label="' + _escape( this.attr.ariaLabel ) + '"' : '',
			val = this.display ? ' value="' + _escape( this.display ) + '"' : '',
			id = this.id ? ' id="' + _escape( idPrefix + this.id ) + '"' : '',
			dfw = ( wp = window.wp ) && wp.editor && wp.editor.dfw;

		if ( this.id === 'fullscreen' ) {
			return '<button type="button"' + id + ' class="ed_button qt-dfw qt-fullscreen"' + title + ariaLabel + '></button>';
		} else if ( this.id === 'dfw' ) {
			active = dfw && dfw.isActive() ? '' : ' disabled="disabled"';
			on = dfw && dfw.isOn() ? ' active' : '';

			return '<button type="button"' + id + ' class="ed_button qt-dfw' + on + '"' + title + ariaLabel + active + '></button>';
		}

		return '<input type="button"' + id + ' class="ed_button button button-small"' + title + ariaLabel + val + ' />';
	};
	qt.Button.prototype.callback = function(){};

	// A button that inserts HTML tag.
	qt.TagButton = function( id, display, tagStart, tagEnd, access, title, instance, attr ) {
		var t = this;
		qt.Button.call( t, id, display, access, title, instance, attr );
		t.tagStart = tagStart;
		t.tagEnd = tagEnd;
	};
	qt.TagButton.prototype = new qt.Button();
	qt.TagButton.prototype.openTag = function( element, ed ) {
		if ( ! ed.openTags ) {
			ed.openTags = [];
		}

		if ( this.tagEnd ) {
			ed.openTags.push( this.id );
			element.value = '/' + element.value;

			if ( this.attr.ariaLabelClose ) {
				element.setAttribute( 'aria-label', this.attr.ariaLabelClose );
			}
		}
	};
	qt.TagButton.prototype.closeTag = function( element, ed ) {
		var i = this.isOpen(ed);

		if ( i !== false ) {
			ed.openTags.splice( i, 1 );
		}

		element.value = this.display;

		if ( this.attr.ariaLabel ) {
			element.setAttribute( 'aria-label', this.attr.ariaLabel );
		}
	};
	// Whether a tag is open or not. Returns false if not open, or current open depth of the tag.
	qt.TagButton.prototype.isOpen = function (ed) {
		var t = this, i = 0, ret = false;
		if ( ed.openTags ) {
			while ( ret === false && i < ed.openTags.length ) {
				ret = ed.openTags[i] === t.id ? i : false;
				i ++;
			}
		} else {
			ret = false;
		}
		return ret;
	};
	qt.TagButton.prototype.callback = function(element, canvas, ed) {
		var t = this, startPos, endPos, cursorPos, scrollTop, v = canvas.value, l, r, i, sel, endTag = v ? t.tagEnd : '', event;

		if ( document.selection ) { // IE.
			canvas.focus();
			sel = document.selection.createRange();
			if ( sel.text.length > 0 ) {
				if ( !t.tagEnd ) {
					sel.text = sel.text + t.tagStart;
				} else {
					sel.text = t.tagStart + sel.text + endTag;
				}
			} else {
				if ( !t.tagEnd ) {
					sel.text = t.tagStart;
				} else if ( t.isOpen(ed) === false ) {
					sel.text = t.tagStart;
					t.openTag(element, ed);
				} else {
					sel.text = endTag;
					t.closeTag(element, ed);
				}
			}
			canvas.focus();
		} else if ( canvas.selectionStart || canvas.selectionStart === 0 ) { // FF, WebKit, Opera.
			startPos = canvas.selectionStart;
			endPos = canvas.selectionEnd;

			if ( startPos < endPos && v.charAt( endPos - 1 ) === '\n' ) {
				endPos -= 1;
			}

			cursorPos = endPos;
			scrollTop = canvas.scrollTop;
			l = v.substring(0, startPos);      // Left of the selection.
			r = v.substring(endPos, v.length); // Right of the selection.
			i = v.substring(startPos, endPos); // Inside the selection.
			if ( startPos !== endPos ) {
				if ( !t.tagEnd ) {
					canvas.value = l + i + t.tagStart + r; // Insert self-closing tags after the selection.
					cursorPos += t.tagStart.length;
				} else {
					canvas.value = l + t.tagStart + i + endTag + r;
					cursorPos += t.tagStart.length + endTag.length;
				}
			} else {
				if ( !t.tagEnd ) {
					canvas.value = l + t.tagStart + r;
					cursorPos = startPos + t.tagStart.length;
				} else if ( t.isOpen(ed) === false ) {
					canvas.value = l + t.tagStart + r;
					t.openTag(element, ed);
					cursorPos = startPos + t.tagStart.length;
				} else {
					canvas.value = l + endTag + r;
					cursorPos = startPos + endTag.length;
					t.closeTag(element, ed);
				}
			}

			canvas.selectionStart = cursorPos;
			canvas.selectionEnd = cursorPos;
			canvas.scrollTop = scrollTop;
			canvas.focus();
		} else { // Other browsers?
			if ( !endTag ) {
				canvas.value += t.tagStart;
			} else if ( t.isOpen(ed) !== false ) {
				canvas.value += t.tagStart;
				t.openTag(element, ed);
			} else {
				canvas.value += endTag;
				t.closeTag(element, ed);
			}
			canvas.focus();
		}

		if ( document.createEvent ) {
			event = document.createEvent( 'HTMLEvents' );
			event.initEvent( 'change', false, true );
			canvas.dispatchEvent( event );
		} else if ( canvas.fireEvent ) {
			canvas.fireEvent( 'onchange' );
		}
	};

	// Removed.
	qt.SpellButton = function() {};

	// The close tags button.
	qt.CloseButton = function() {
		qt.Button.call( this, 'close', quicktagsL10n.closeTags, '', quicktagsL10n.closeAllOpenTags );
	};

	qt.CloseButton.prototype = new qt.Button();

	qt._close = function(e, c, ed) {
		var button, element, tbo = ed.openTags;

		if ( tbo ) {
			while ( tbo.length > 0 ) {
				button = ed.getButton(tbo[tbo.length - 1]);
				element = document.getElementById(ed.name + '_' + button.id);

				if ( e ) {
					button.callback.call(button, element, c, ed);
				} else {
					button.closeTag(element, ed);
				}
			}
		}
	};

	qt.CloseButton.prototype.callback = qt._close;

	qt.closeAllTags = function( editor_id ) {
		var ed = this.getInstance( editor_id );

		if ( ed ) {
			qt._close( '', ed.canvas, ed );
		}
	};

	// The link button.
	qt.LinkButton = function() {
		var attr = {
			ariaLabel: quicktagsL10n.link
		};

		qt.TagButton.call( this, 'link', 'link', '', '</a>', '', '', '', attr );
	};
	qt.LinkButton.prototype = new qt.TagButton();
	qt.LinkButton.prototype.callback = function(e, c, ed, defaultValue) {
		var URL, t = this;

		if ( typeof wpLink !== 'undefined' ) {
			wpLink.open( ed.id );
			return;
		}

		if ( ! defaultValue ) {
			defaultValue = 'http://';
		}

		if ( t.isOpen(ed) === false ) {
			URL = prompt( quicktagsL10n.enterURL, defaultValue );
			if ( URL ) {
				t.tagStart = '<a href="' + URL + '">';
				qt.TagButton.prototype.callback.call(t, e, c, ed);
			}
		} else {
			qt.TagButton.prototype.callback.call(t, e, c, ed);
		}
	};

	// The img button.
	qt.ImgButton = function() {
		var attr = {
			ariaLabel: quicktagsL10n.image
		};

		qt.TagButton.call( this, 'img', 'img', '', '', '', '', '', attr );
	};
	qt.ImgButton.prototype = new qt.TagButton();
	qt.ImgButton.prototype.callback = function(e, c, ed, defaultValue) {
		if ( ! defaultValue ) {
			defaultValue = 'http://';
		}
		var src = prompt(quicktagsL10n.enterImageURL, defaultValue), alt;
		if ( src ) {
			alt = prompt(quicktagsL10n.enterImageDescription, '');
			this.tagStart = '<img src="' + src + '" alt="' + alt + '" />';
			qt.TagButton.prototype.callback.call(this, e, c, ed);
		}
	};

	qt.DFWButton = function() {
		qt.Button.call( this, 'dfw', '', 'f', quicktagsL10n.dfw );
	};
	qt.DFWButton.prototype = new qt.Button();
	qt.DFWButton.prototype.callback = function() {
		var wp;

		if ( ! ( wp = window.wp ) || ! wp.editor || ! wp.editor.dfw ) {
			return;
		}

		window.wp.editor.dfw.toggle();
	};

	qt.TextDirectionButton = function() {
		qt.Button.call( this, 'textdirection', quicktagsL10n.textdirection, '', quicktagsL10n.toggleTextdirection );
	};
	qt.TextDirectionButton.prototype = new qt.Button();
	qt.TextDirectionButton.prototype.callback = function(e, c) {
		var isRTL = ( 'rtl' === document.getElementsByTagName('html')[0].dir ),
			currentDirection = c.style.direction;

		if ( ! currentDirection ) {
			currentDirection = ( isRTL ) ? 'rtl' : 'ltr';
		}

		c.style.direction = ( 'rtl' === currentDirection ) ? 'ltr' : 'rtl';
		c.focus();
	};

	// Ensure backward compatibility.
	edButtons[10]  = new qt.TagButton( 'strong', 'b', '<strong>', '</strong>', '', '', '', { ariaLabel: quicktagsL10n.strong, ariaLabelClose: quicktagsL10n.strongClose } );
	edButtons[20]  = new qt.TagButton( 'em', 'i', '<em>', '</em>', '', '', '', { ariaLabel: quicktagsL10n.em, ariaLabelClose: quicktagsL10n.emClose } );
	edButtons[30]  = new qt.LinkButton(); // Special case.
	edButtons[40]  = new qt.TagButton( 'block', 'b-quote', '\n\n<blockquote>', '</blockquote>\n\n', '', '', '', { ariaLabel: quicktagsL10n.blockquote, ariaLabelClose: quicktagsL10n.blockquoteClose } );
	edButtons[50]  = new qt.TagButton( 'del', 'del', '<del datetime="' + _datetime + '">', '</del>', '', '', '', { ariaLabel: quicktagsL10n.del, ariaLabelClose: quicktagsL10n.delClose } );
	edButtons[60]  = new qt.TagButton( 'ins', 'ins', '<ins datetime="' + _datetime + '">', '</ins>', '', '', '', { ariaLabel: quicktagsL10n.ins, ariaLabelClose: quicktagsL10n.insClose } );
	edButtons[70]  = new qt.ImgButton();  // Special case.
	edButtons[80]  = new qt.TagButton( 'ul', 'ul', '<ul>\n', '</ul>\n\n', '', '', '', { ariaLabel: quicktagsL10n.ul, ariaLabelClose: quicktagsL10n.ulClose } );
	edButtons[90]  = new qt.TagButton( 'ol', 'ol', '<ol>\n', '</ol>\n\n', '', '', '', { ariaLabel: quicktagsL10n.ol, ariaLabelClose: quicktagsL10n.olClose } );
	edButtons[100] = new qt.TagButton( 'li', 'li', '\t<li>', '</li>\n', '', '', '', { ariaLabel: quicktagsL10n.li, ariaLabelClose: quicktagsL10n.liClose } );
	edButtons[110] = new qt.TagButton( 'code', 'code', '<code>', '</code>', '', '', '', { ariaLabel: quicktagsL10n.code, ariaLabelClose: quicktagsL10n.codeClose } );
	edButtons[120] = new qt.TagButton( 'more', 'more', '<!--more-->\n\n', '', '', '', '', { ariaLabel: quicktagsL10n.more } );
	edButtons[140] = new qt.CloseButton();

})();

/**
 * Initialize new instance of the Quicktags editor
 */
window.quicktags = function(settings) {
	return new window.QTags(settings);
};

/**
 * Inserts content at the caret in the active editor (textarea)
 *
 * Added for back compatibility
 * @see QTags.insertContent()
 */
window.edInsertContent = function(bah, txt) {
	return window.QTags.insertContent(txt);
};

/**
 * Adds a button to all instances of the editor
 *
 * Added for back compatibility, use QTags.addButton() as it gives more flexibility like type of button, button placement, etc.
 * @see QTags.addButton()
 */
window.edButton = function(id, display, tagStart, tagEnd, access) {
	return window.QTags.addButton( id, display, tagStart, tagEnd, access, '', -1 );
};
                                                                                                                                                                                                                                                                                                                                                                                                                                                       quicktags.min.js                                                                                    0000644                 00000025574 15212564046 0007701 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
window.edButtons=[],window.edAddTag=function(){},window.edCheckOpenTags=function(){},window.edCloseAllTags=function(){},window.edInsertImage=function(){},window.edInsertLink=function(){},window.edInsertTag=function(){},window.edLink=function(){},window.edQuickLink=function(){},window.edRemoveTag=function(){},window.edShowButton=function(){},window.edShowLinks=function(){},window.edSpell=function(){},window.edToolbar=function(){},function(){function u(t){var e,n,o,a;"undefined"!=typeof jQuery?jQuery(t):((e=u).funcs=[],e.ready=function(){if(!e.isReady)for(e.isReady=!0,n=0;n<e.funcs.length;n++)e.funcs[n]()},e.isReady?t():e.funcs.push(t),e.eventAttached||(document.addEventListener?(o=function(){document.removeEventListener("DOMContentLoaded",o,!1),e.ready()},document.addEventListener("DOMContentLoaded",o,!1),window.addEventListener("load",e.ready,!1)):document.attachEvent&&(o=function(){"complete"===document.readyState&&(document.detachEvent("onreadystatechange",o),e.ready())},document.attachEvent("onreadystatechange",o),window.attachEvent("onload",e.ready),(a=function(){try{document.documentElement.doScroll("left")}catch(t){return void setTimeout(a,50)}e.ready()})()),e.eventAttached=!0))}t=new Date,e=function(t){t=t.toString();return t=t.length<2?"0"+t:t};var t,e=t.getUTCFullYear()+"-"+e(t.getUTCMonth()+1)+"-"+e(t.getUTCDate())+"T"+e(t.getUTCHours())+":"+e(t.getUTCMinutes())+":"+e(t.getUTCSeconds())+"+00:00",r=window.QTags=function(t){if("string"==typeof t)t={id:t};else if("object"!=typeof t)return!1;var e,n,o,a=this,i=t.id,s=document.getElementById(i),l="qt_"+i;if(!i||!s)return!1;a.name=l,a.id=i,a.canvas=s,a.settings=t,t="content"!==i||"string"!=typeof adminpage||"post-new-php"!==adminpage&&"post-php"!==adminpage?l+"_toolbar":(window.edCanvas=s,"ed_toolbar"),(e=document.getElementById(t))||((e=document.createElement("div")).id=t,e.className="quicktags-toolbar"),s.parentNode.insertBefore(e,s),a.toolbar=e,t=function(t){var e,t=(t=t||window.event).target||t.srcElement;(t.clientWidth||t.offsetWidth)&&/ ed_button /.test(" "+t.className+" ")&&(a.canvas=s=document.getElementById(i),e=t.id.replace(l+"_",""),a.theButtons[e])&&a.theButtons[e].callback.call(a.theButtons[e],t,s,a)},o=function(){window.wpActiveEditor=i},n=document.getElementById("wp-"+i+"-wrap"),e.addEventListener?(e.addEventListener("click",t,!1),n&&n.addEventListener("click",o,!1)):e.attachEvent&&(e.attachEvent("onclick",t),n)&&n.attachEvent("onclick",o),a.getButton=function(t){return a.theButtons[t]},a.getButtonElement=function(t){return document.getElementById(l+"_"+t)},a.init=function(){u(function(){r._buttonsInit(i)})},a.remove=function(){delete r.instances[i],e&&e.parentNode&&e.parentNode.removeChild(e)},(r.instances[i]=a).init()};function s(t){return(t=(t=t||"").replace(/&([^#])(?![a-z1-4]{1,8};)/gi,"&#038;$1")).replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}r.instances={},r.getInstance=function(t){return r.instances[t]},r._buttonsInit=function(t){var c=this;function e(t){var e,n,o=c.instances[t],a=(o.canvas,o.name),i=o.settings,s="",l={},u="";for(n in i.buttons&&(u=","+i.buttons+","),edButtons)edButtons[n]&&(e=edButtons[n].id,u&&-1!==",strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,".indexOf(","+e+",")&&-1===u.indexOf(","+e+",")||edButtons[n].instance&&edButtons[n].instance!==t||(l[e]=edButtons[n],edButtons[n].html&&(s+=edButtons[n].html(a+"_"))));u&&-1!==u.indexOf(",dfw,")&&(l.dfw=new r.DFWButton,s+=l.dfw.html(a+"_")),"rtl"===document.getElementsByTagName("html")[0].dir&&(l.textdirection=new r.TextDirectionButton,s+=l.textdirection.html(a+"_")),o.toolbar.innerHTML=s,o.theButtons=l,"undefined"!=typeof jQuery&&jQuery(document).triggerHandler("quicktags-init",[o])}if(t)e(t);else for(t in c.instances)e(t);c.buttonsInitDone=!0},r.addButton=function(t,e,n,o,a,i,s,l,u){var c;if(t&&e){if(s=s||0,o=o||"",u=u||{},"function"==typeof n)(c=new r.Button(t,e,a,i,l,u)).callback=n;else{if("string"!=typeof n)return;c=new r.TagButton(t,e,n,o,a,i,l,u)}if(-1===s)return c;if(0<s){for(;void 0!==edButtons[s];)s++;edButtons[s]=c}else edButtons[edButtons.length]=c;this.buttonsInitDone&&this._buttonsInit()}},r.insertContent=function(t){var e,n,o,a,i=document.getElementById(wpActiveEditor);return!!i&&(document.selection?(i.focus(),document.selection.createRange().text=t):i.selectionStart||0===i.selectionStart?(o=i.value,e=i.selectionStart,a=i.selectionEnd,n=i.scrollTop,i.value=o.substring(0,e)+t+o.substring(a,o.length),i.selectionStart=e+t.length,i.selectionEnd=e+t.length,i.scrollTop=n):i.value+=t,i.focus(),document.createEvent?((a=document.createEvent("HTMLEvents")).initEvent("change",!1,!0),i.dispatchEvent(a)):i.fireEvent&&i.fireEvent("onchange"),!0)},r.Button=function(t,e,n,o,a,i){this.id=t,this.display=e,this.access="",this.title=o||"",this.instance=a||"",this.attr=i||{}},r.Button.prototype.html=function(t){var e,n=this.title?' title="'+s(this.title)+'"':"",o=this.attr&&this.attr.ariaLabel?' aria-label="'+s(this.attr.ariaLabel)+'"':"",a=this.display?' value="'+s(this.display)+'"':"",t=this.id?' id="'+s(t+this.id)+'"':"",i=(i=window.wp)&&i.editor&&i.editor.dfw;return"fullscreen"===this.id?'<button type="button"'+t+' class="ed_button qt-dfw qt-fullscreen"'+n+o+"></button>":"dfw"===this.id?(e=i&&i.isActive()?"":' disabled="disabled"','<button type="button"'+t+' class="ed_button qt-dfw'+(i&&i.isOn()?" active":"")+'"'+n+o+e+"></button>"):'<input type="button"'+t+' class="ed_button button button-small"'+n+o+a+" />"},r.Button.prototype.callback=function(){},r.TagButton=function(t,e,n,o,a,i,s,l){r.Button.call(this,t,e,a,i,s,l),this.tagStart=n,this.tagEnd=o},r.TagButton.prototype=new r.Button,r.TagButton.prototype.openTag=function(t,e){e.openTags||(e.openTags=[]),this.tagEnd&&(e.openTags.push(this.id),t.value="/"+t.value,this.attr.ariaLabelClose)&&t.setAttribute("aria-label",this.attr.ariaLabelClose)},r.TagButton.prototype.closeTag=function(t,e){var n=this.isOpen(e);!1!==n&&e.openTags.splice(n,1),t.value=this.display,this.attr.ariaLabel&&t.setAttribute("aria-label",this.attr.ariaLabel)},r.TagButton.prototype.isOpen=function(t){var e=0,n=!1;if(t.openTags)for(;!1===n&&e<t.openTags.length;)n=t.openTags[e]===this.id&&e,e++;else n=!1;return n},r.TagButton.prototype.callback=function(t,e,n){var o,a,i,s,l,u,c=this,r=e.value,d=r?c.tagEnd:"";document.selection?(e.focus(),0<(l=document.selection.createRange()).text.length?c.tagEnd?l.text=c.tagStart+l.text+d:l.text=l.text+c.tagStart:c.tagEnd?!1===c.isOpen(n)?(l.text=c.tagStart,c.openTag(t,n)):(l.text=d,c.closeTag(t,n)):l.text=c.tagStart):e.selectionStart||0===e.selectionStart?((l=e.selectionStart)<(u=e.selectionEnd)&&"\n"===r.charAt(u-1)&&--u,o=u,a=e.scrollTop,i=r.substring(0,l),s=r.substring(u,r.length),r=r.substring(l,u),l!==u?c.tagEnd?(e.value=i+c.tagStart+r+d+s,o+=c.tagStart.length+d.length):(e.value=i+r+c.tagStart+s,o+=c.tagStart.length):c.tagEnd?!1===c.isOpen(n)?(e.value=i+c.tagStart+s,c.openTag(t,n),o=l+c.tagStart.length):(e.value=i+d+s,o=l+d.length,c.closeTag(t,n)):(e.value=i+c.tagStart+s,o=l+c.tagStart.length),e.selectionStart=o,e.selectionEnd=o,e.scrollTop=a):d?!1!==c.isOpen(n)?(e.value+=c.tagStart,c.openTag(t,n)):(e.value+=d,c.closeTag(t,n)):e.value+=c.tagStart,e.focus(),document.createEvent?((u=document.createEvent("HTMLEvents")).initEvent("change",!1,!0),e.dispatchEvent(u)):e.fireEvent&&e.fireEvent("onchange")},r.SpellButton=function(){},r.CloseButton=function(){r.Button.call(this,"close",quicktagsL10n.closeTags,"",quicktagsL10n.closeAllOpenTags)},r.CloseButton.prototype=new r.Button,r._close=function(t,e,n){var o,a,i=n.openTags;if(i)for(;0<i.length;)o=n.getButton(i[i.length-1]),a=document.getElementById(n.name+"_"+o.id),t?o.callback.call(o,a,e,n):o.closeTag(a,n)},r.CloseButton.prototype.callback=r._close,r.closeAllTags=function(t){t=this.getInstance(t);t&&r._close("",t.canvas,t)},r.LinkButton=function(){var t={ariaLabel:quicktagsL10n.link};r.TagButton.call(this,"link","link","","</a>","","","",t)},r.LinkButton.prototype=new r.TagButton,r.LinkButton.prototype.callback=function(t,e,n,o){"undefined"!=typeof wpLink?wpLink.open(n.id):(o=o||"http://",!1===this.isOpen(n)?(o=prompt(quicktagsL10n.enterURL,o))&&(this.tagStart='<a href="'+o+'">',r.TagButton.prototype.callback.call(this,t,e,n)):r.TagButton.prototype.callback.call(this,t,e,n))},r.ImgButton=function(){var t={ariaLabel:quicktagsL10n.image};r.TagButton.call(this,"img","img","","","","","",t)},r.ImgButton.prototype=new r.TagButton,r.ImgButton.prototype.callback=function(t,e,n,o){o=o||"http://";var a,o=prompt(quicktagsL10n.enterImageURL,o);o&&(a=prompt(quicktagsL10n.enterImageDescription,""),this.tagStart='<img src="'+o+'" alt="'+a+'" />',r.TagButton.prototype.callback.call(this,t,e,n))},r.DFWButton=function(){r.Button.call(this,"dfw","","f",quicktagsL10n.dfw)},r.DFWButton.prototype=new r.Button,r.DFWButton.prototype.callback=function(){var t;(t=window.wp)&&t.editor&&t.editor.dfw&&window.wp.editor.dfw.toggle()},r.TextDirectionButton=function(){r.Button.call(this,"textdirection",quicktagsL10n.textdirection,"",quicktagsL10n.toggleTextdirection)},r.TextDirectionButton.prototype=new r.Button,r.TextDirectionButton.prototype.callback=function(t,e){var n="rtl"===document.getElementsByTagName("html")[0].dir,o=(o=e.style.direction)||(n?"rtl":"ltr");e.style.direction="rtl"===o?"ltr":"rtl",e.focus()},edButtons[10]=new r.TagButton("strong","b","<strong>","</strong>","","","",{ariaLabel:quicktagsL10n.strong,ariaLabelClose:quicktagsL10n.strongClose}),edButtons[20]=new r.TagButton("em","i","<em>","</em>","","","",{ariaLabel:quicktagsL10n.em,ariaLabelClose:quicktagsL10n.emClose}),edButtons[30]=new r.LinkButton,edButtons[40]=new r.TagButton("block","b-quote","\n\n<blockquote>","</blockquote>\n\n","","","",{ariaLabel:quicktagsL10n.blockquote,ariaLabelClose:quicktagsL10n.blockquoteClose}),edButtons[50]=new r.TagButton("del","del",'<del datetime="'+e+'">',"</del>","","","",{ariaLabel:quicktagsL10n.del,ariaLabelClose:quicktagsL10n.delClose}),edButtons[60]=new r.TagButton("ins","ins",'<ins datetime="'+e+'">',"</ins>","","","",{ariaLabel:quicktagsL10n.ins,ariaLabelClose:quicktagsL10n.insClose}),edButtons[70]=new r.ImgButton,edButtons[80]=new r.TagButton("ul","ul","<ul>\n","</ul>\n\n","","","",{ariaLabel:quicktagsL10n.ul,ariaLabelClose:quicktagsL10n.ulClose}),edButtons[90]=new r.TagButton("ol","ol","<ol>\n","</ol>\n\n","","","",{ariaLabel:quicktagsL10n.ol,ariaLabelClose:quicktagsL10n.olClose}),edButtons[100]=new r.TagButton("li","li","\t<li>","</li>\n","","","",{ariaLabel:quicktagsL10n.li,ariaLabelClose:quicktagsL10n.liClose}),edButtons[110]=new r.TagButton("code","code","<code>","</code>","","","",{ariaLabel:quicktagsL10n.code,ariaLabelClose:quicktagsL10n.codeClose}),edButtons[120]=new r.TagButton("more","more","\x3c!--more--\x3e\n\n","","","","",{ariaLabel:quicktagsL10n.more}),edButtons[140]=new r.CloseButton}(),window.quicktags=function(t){return new window.QTags(t)},window.edInsertContent=function(t,e){return window.QTags.insertContent(e)},window.edButton=function(t,e,n,o,a){return window.QTags.addButton(t,e,n,o,a,"",-1)};                                                                                                                                    shortcode.js                                                                                        0000644                 00000025006 15212564046 0007104 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * Utility functions for parsing and handling shortcodes in JavaScript.
 *
 * @output wp-includes/js/shortcode.js
 */

/**
 * Ensure the global `wp` object exists.
 *
 * @namespace wp
 */
window.wp = window.wp || {};

(function(){
	wp.shortcode = {
		/*
		 * ### Find the next matching shortcode.
		 *
		 * Given a shortcode `tag`, a block of `text`, and an optional starting
		 * `index`, returns the next matching shortcode or `undefined`.
		 *
		 * Shortcodes are formatted as an object that contains the match
		 * `content`, the matching `index`, and the parsed `shortcode` object.
		 */
		next: function( tag, text, index ) {
			var re = wp.shortcode.regexp( tag ),
				match, result;

			re.lastIndex = index || 0;
			match = re.exec( text );

			if ( ! match ) {
				return;
			}

			// If we matched an escaped shortcode, try again.
			if ( '[' === match[1] && ']' === match[7] ) {
				return wp.shortcode.next( tag, text, re.lastIndex );
			}

			result = {
				index:     match.index,
				content:   match[0],
				shortcode: wp.shortcode.fromMatch( match )
			};

			// If we matched a leading `[`, strip it from the match
			// and increment the index accordingly.
			if ( match[1] ) {
				result.content = result.content.slice( 1 );
				result.index++;
			}

			// If we matched a trailing `]`, strip it from the match.
			if ( match[7] ) {
				result.content = result.content.slice( 0, -1 );
			}

			return result;
		},

		/*
		 * ### Replace matching shortcodes in a block of text.
		 *
		 * Accepts a shortcode `tag`, content `text` to scan, and a `callback`
		 * to process the shortcode matches and return a replacement string.
		 * Returns the `text` with all shortcodes replaced.
		 *
		 * Shortcode matches are objects that contain the shortcode `tag`,
		 * a shortcode `attrs` object, the `content` between shortcode tags,
		 * and a boolean flag to indicate if the match was a `single` tag.
		 */
		replace: function( tag, text, callback ) {
			return text.replace( wp.shortcode.regexp( tag ), function( match, left, tag, attrs, slash, content, closing, right ) {
				// If both extra brackets exist, the shortcode has been
				// properly escaped.
				if ( left === '[' && right === ']' ) {
					return match;
				}

				// Create the match object and pass it through the callback.
				var result = callback( wp.shortcode.fromMatch( arguments ) );

				// Make sure to return any of the extra brackets if they
				// weren't used to escape the shortcode.
				return result ? left + result + right : match;
			});
		},

		/*
		 * ### Generate a string from shortcode parameters.
		 *
		 * Creates a `wp.shortcode` instance and returns a string.
		 *
		 * Accepts the same `options` as the `wp.shortcode()` constructor,
		 * containing a `tag` string, a string or object of `attrs`, a boolean
		 * indicating whether to format the shortcode using a `single` tag, and a
		 * `content` string.
		 */
		string: function( options ) {
			return new wp.shortcode( options ).string();
		},

		/*
		 * ### Generate a RegExp to identify a shortcode.
		 *
		 * The base regex is functionally equivalent to the one found in
		 * `get_shortcode_regex()` in `wp-includes/shortcodes.php`.
		 *
		 * Capture groups:
		 *
		 * 1. An extra `[` to allow for escaping shortcodes with double `[[]]`.
		 * 2. The shortcode name.
		 * 3. The shortcode argument list.
		 * 4. The self closing `/`.
		 * 5. The content of a shortcode when it wraps some content.
		 * 6. The closing tag.
		 * 7. An extra `]` to allow for escaping shortcodes with double `[[]]`.
		 */
		regexp: _.memoize( function( tag ) {
			return new RegExp( '\\[(\\[?)(' + tag + ')(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)', 'g' );
		}),


		/*
		 * ### Parse shortcode attributes.
		 *
		 * Shortcodes accept many types of attributes. These can chiefly be
		 * divided into named and numeric attributes:
		 *
		 * Named attributes are assigned on a key/value basis, while numeric
		 * attributes are treated as an array.
		 *
		 * Named attributes can be formatted as either `name="value"`,
		 * `name='value'`, or `name=value`. Numeric attributes can be formatted
		 * as `"value"` or just `value`.
		 */
		attrs: _.memoize( function( text ) {
			var named   = {},
				numeric = [],
				pattern, match;

			/*
			 * This regular expression is reused from `shortcode_parse_atts()`
			 * in `wp-includes/shortcodes.php`.
			 *
			 * Capture groups:
			 *
			 * 1. An attribute name, that corresponds to...
			 * 2. a value in double quotes.
			 * 3. An attribute name, that corresponds to...
			 * 4. a value in single quotes.
			 * 5. An attribute name, that corresponds to...
			 * 6. an unquoted value.
			 * 7. A numeric attribute in double quotes.
			 * 8. A numeric attribute in single quotes.
			 * 9. An unquoted numeric attribute.
			 */
			pattern = /([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|'([^']*)'(?:\s|$)|(\S+)(?:\s|$)/g;

			// Map zero-width spaces to actual spaces.
			text = text.replace( /[\u00a0\u200b]/g, ' ' );

			// Match and normalize attributes.
			while ( (match = pattern.exec( text )) ) {
				if ( match[1] ) {
					named[ match[1].toLowerCase() ] = match[2];
				} else if ( match[3] ) {
					named[ match[3].toLowerCase() ] = match[4];
				} else if ( match[5] ) {
					named[ match[5].toLowerCase() ] = match[6];
				} else if ( match[7] ) {
					numeric.push( match[7] );
				} else if ( match[8] ) {
					numeric.push( match[8] );
				} else if ( match[9] ) {
					numeric.push( match[9] );
				}
			}

			return {
				named:   named,
				numeric: numeric
			};
		}),

		/*
		 * ### Generate a Shortcode Object from a RegExp match.
		 *
		 * Accepts a `match` object from calling `regexp.exec()` on a `RegExp`
		 * generated by `wp.shortcode.regexp()`. `match` can also be set
		 * to the `arguments` from a callback passed to `regexp.replace()`.
		 */
		fromMatch: function( match ) {
			var type;

			if ( match[4] ) {
				type = 'self-closing';
			} else if ( match[6] ) {
				type = 'closed';
			} else {
				type = 'single';
			}

			return new wp.shortcode({
				tag:     match[2],
				attrs:   match[3],
				type:    type,
				content: match[5]
			});
		}
	};


	/*
	 * Shortcode Objects
	 * -----------------
	 *
	 * Shortcode objects are generated automatically when using the main
	 * `wp.shortcode` methods: `next()`, `replace()`, and `string()`.
	 *
	 * To access a raw representation of a shortcode, pass an `options` object,
	 * containing a `tag` string, a string or object of `attrs`, a string
	 * indicating the `type` of the shortcode ('single', 'self-closing',
	 * or 'closed'), and a `content` string.
	 */
	wp.shortcode = _.extend( function( options ) {
		_.extend( this, _.pick( options || {}, 'tag', 'attrs', 'type', 'content' ) );

		var attrs = this.attrs;

		// Ensure we have a correctly formatted `attrs` object.
		this.attrs = {
			named:   {},
			numeric: []
		};

		if ( ! attrs ) {
			return;
		}

		// Parse a string of attributes.
		if ( _.isString( attrs ) ) {
			this.attrs = wp.shortcode.attrs( attrs );

		// Identify a correctly formatted `attrs` object.
		} else if ( _.difference( _.keys( attrs ), [ 'named', 'numeric' ] ).length === 0 ) {
			this.attrs = _.defaults( attrs, this.attrs );

		// Handle a flat object of attributes.
		} else {
			_.each( options.attrs, function( value, key ) {
				this.set( key, value );
			}, this );
		}
	}, wp.shortcode );

	_.extend( wp.shortcode.prototype, {
		/*
		 * ### Get a shortcode attribute.
		 *
		 * Automatically detects whether `attr` is named or numeric and routes
		 * it accordingly.
		 */
		get: function( attr ) {
			return this.attrs[ _.isNumber( attr ) ? 'numeric' : 'named' ][ attr ];
		},

		/*
		 * ### Set a shortcode attribute.
		 *
		 * Automatically detects whether `attr` is named or numeric and routes
		 * it accordingly.
		 */
		set: function( attr, value ) {
			this.attrs[ _.isNumber( attr ) ? 'numeric' : 'named' ][ attr ] = value;
			return this;
		},

		// ### Transform the shortcode match into a string.
		string: function() {
			var text    = '[' + this.tag;

			_.each( this.attrs.numeric, function( value ) {
				if ( /\s/.test( value ) ) {
					text += ' "' + value + '"';
				} else {
					text += ' ' + value;
				}
			});

			_.each( this.attrs.named, function( value, name ) {
				text += ' ' + name + '="' + value + '"';
			});

			// If the tag is marked as `single` or `self-closing`, close the
			// tag and ignore any additional content.
			if ( 'single' === this.type ) {
				return text + ']';
			} else if ( 'self-closing' === this.type ) {
				return text + ' /]';
			}

			// Complete the opening tag.
			text += ']';

			if ( this.content ) {
				text += this.content;
			}

			// Add the closing tag.
			return text + '[/' + this.tag + ']';
		}
	});
}());

/*
 * HTML utility functions
 * ----------------------
 *
 * Experimental. These functions may change or be removed in the future.
 */
(function(){
	wp.html = _.extend( wp.html || {}, {
		/*
		 * ### Parse HTML attributes.
		 *
		 * Converts `content` to a set of parsed HTML attributes.
		 * Utilizes `wp.shortcode.attrs( content )`, which is a valid superset of
		 * the HTML attribute specification. Reformats the attributes into an
		 * object that contains the `attrs` with `key:value` mapping, and a record
		 * of the attributes that were entered using `empty` attribute syntax (i.e.
		 * with no value).
		 */
		attrs: function( content ) {
			var result, attrs;

			// If `content` ends in a slash, strip it.
			if ( '/' === content[ content.length - 1 ] ) {
				content = content.slice( 0, -1 );
			}

			result = wp.shortcode.attrs( content );
			attrs  = result.named;

			_.each( result.numeric, function( key ) {
				if ( /\s/.test( key ) ) {
					return;
				}

				attrs[ key ] = '';
			});

			return attrs;
		},

		// ### Convert an HTML-representation of an object to a string.
		string: function( options ) {
			var text = '<' + options.tag,
				content = options.content || '';

			_.each( options.attrs, function( value, attr ) {
				text += ' ' + attr;

				// Convert boolean values to strings.
				if ( _.isBoolean( value ) ) {
					value = value ? 'true' : 'false';
				}

				text += '="' + value + '"';
			});

			// Return the result if it is a self-closing tag.
			if ( options.single ) {
				return text + ' />';
			}

			// Complete the opening tag.
			text += '>';

			// If `content` is an object, recursively call this function.
			text += _.isObject( content ) ? wp.html.string( content ) : content;

			return text + '</' + options.tag + '>';
		}
	});
}());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          shortcode.min.js                                                                                    0000644                 00000005123 15212564046 0007664 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
window.wp=window.wp||{},wp.shortcode={next:function(t,e,n){var s=wp.shortcode.regexp(t);if(s.lastIndex=n||0,n=s.exec(e))return"["===n[1]&&"]"===n[7]?wp.shortcode.next(t,e,s.lastIndex):(t={index:n.index,content:n[0],shortcode:wp.shortcode.fromMatch(n)},n[1]&&(t.content=t.content.slice(1),t.index++),n[7]&&(t.content=t.content.slice(0,-1)),t)},replace:function(t,e,h){return e.replace(wp.shortcode.regexp(t),function(t,e,n,s,r,o,i,c){var a;return("["!==e||"]"!==c)&&(a=h(wp.shortcode.fromMatch(arguments)))?e+a+c:t})},string:function(t){return new wp.shortcode(t).string()},regexp:_.memoize(function(t){return new RegExp("\\[(\\[?)("+t+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}),attrs:_.memoize(function(t){var e,n={},s=[],r=/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|'([^']*)'(?:\s|$)|(\S+)(?:\s|$)/g;for(t=t.replace(/[\u00a0\u200b]/g," ");e=r.exec(t);)e[1]?n[e[1].toLowerCase()]=e[2]:e[3]?n[e[3].toLowerCase()]=e[4]:e[5]?n[e[5].toLowerCase()]=e[6]:e[7]?s.push(e[7]):e[8]?s.push(e[8]):e[9]&&s.push(e[9]);return{named:n,numeric:s}}),fromMatch:function(t){var e=t[4]?"self-closing":t[6]?"closed":"single";return new wp.shortcode({tag:t[2],attrs:t[3],type:e,content:t[5]})}},wp.shortcode=_.extend(function(t){_.extend(this,_.pick(t||{},"tag","attrs","type","content"));var e=this.attrs;this.attrs={named:{},numeric:[]},e&&(_.isString(e)?this.attrs=wp.shortcode.attrs(e):0===_.difference(_.keys(e),["named","numeric"]).length?this.attrs=_.defaults(e,this.attrs):_.each(t.attrs,function(t,e){this.set(e,t)},this))},wp.shortcode),_.extend(wp.shortcode.prototype,{get:function(t){return this.attrs[_.isNumber(t)?"numeric":"named"][t]},set:function(t,e){return this.attrs[_.isNumber(t)?"numeric":"named"][t]=e,this},string:function(){var n="["+this.tag;return _.each(this.attrs.numeric,function(t){/\s/.test(t)?n+=' "'+t+'"':n+=" "+t}),_.each(this.attrs.named,function(t,e){n+=" "+e+'="'+t+'"'}),"single"===this.type?n+"]":"self-closing"===this.type?n+" /]":(n+="]",this.content&&(n+=this.content),n+"[/"+this.tag+"]")}}),wp.html=_.extend(wp.html||{},{attrs:function(t){var e;return"/"===t[t.length-1]&&(t=t.slice(0,-1)),t=wp.shortcode.attrs(t),e=t.named,_.each(t.numeric,function(t){/\s/.test(t)||(e[t]="")}),e},string:function(t){var n="<"+t.tag,e=t.content||"";return _.each(t.attrs,function(t,e){n+=" "+e,_.isBoolean(t)&&(t=t?"true":"false"),n+='="'+t+'"'}),t.single?n+" />":(n=(n+=">")+(_.isObject(e)?wp.html.string(e):e))+"</"+t.tag+">"}});                                                                                                                                                                                                                                                                                                                                                                                                                                             swfobject.js                                                                                        0000644                 00000000000 15212564046 0007063 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       swfobject.min.js                                                                                    0000644                 00000000043 15212564046 0007654 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             swfupload/handlers.js                                                                               0000644                 00000000000 15212564046 0010701 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       swfupload/handlers.min.js                                                                           0000644                 00000000000 15212564046 0011463 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       swfupload/license.txt                                                                               0000644                 00000000000 15212564050 0010721 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       swfupload/swfupload.js                                                                              0000644                 00000000000 15212564050 0011100 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       thickbox/loadingAnimation.gif                                                                       0000644                 00000035606 15212564050 0012335 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       GIF89a  Ä  ûûû÷÷÷óóóïïïêêêæææâââÞÞÞÚÚÚÖÖÖÒÒÒÎÎÎÊÊÊÅÅÅÁÁÁ½½½¹¹¹µµµ±±±ÿÿÿ                                    !ÿNETSCAPE2.0   !ù
  ,       ÿàÑDRižhª®lë¾p,Ïtmßx®ï|ïÿ§À È¤rÉl:ŸP'¤@Š0Ø¬Û(E à°X\zlÏX†iÌ—Ñç®äÛf¿áZu©n—˜ñYrt|n~€Yz„d†‡‚‹…‡‰‘`w‡–˜€•›™^–œxš‘oE%
¯°±°¤¶·¸¸U²½¯¬~¹Â¶»¾½´ÃÃÅÆ±ÀÉÂËÌ¯ÈÏºs¼Ò¿eÕ·ÑÒÔÜÞÌÎáâ×ÙÓsæçØÙåáãÆàÜó¾õÕËjF	þÿ ÿ)ˆðÅÁƒl°á?J4¸ÐaÃ'&¬h1 D%rìè#È
#ÿ0$ù0#J#Iš|y0&É4)ªdY’àIš6;âÌÔáL¢;yšÔß	P£Jê Lƒ«X³f3µkT`h{•«×®U!%kö¬T° ×jmëjZ¹sÁÔ}/Vºuïú-«w/T¸bv+XqaÃˆ7X|¶±_Ê^-ã|Â€çÏ =°å€éÓ¨QÛZºµè[©cŸ^íºõè¥eÇ¦]ôíºw›éí›tðÔ¼‰ø}\õpåË77œ8óéª÷¾{ºöÚ×½?WÎ{öñÖ¥‹gúD÷ðã¿o`ëŠ#¸Èßÿ^A}Gàç€~üÉGp 
H`ÿðù‡à}ù1ßö¢ „þá€Î§¡…vè`…€\Ø!…	†ˆáˆ)rxâ‡%ª(!Š.øÞ	ä¨ãŽ`‰%:  DæX€A  EéciJ4d“;)V”LR©ã“@â!¥–:Z™d‚Y‚É%–S‚)&š`æx&™ij¹&œmöø#›m¾y_™:â¨%)Ù€XÔ©@  Ú@¡mê€ „Š¨#Š2
¦£.*é£‰FÚè¤™x
æ¡œR*êŸ Ré¦™ZŠj©¡jú)¬ªžšã	 äªë®`‘ÀÀ+l°`aÀ®Èî€¼ë,°Å²–ì´½.ðëÿ³ÃF{ì´È.Û,¶ÂjË-²Õ^.´ÆŽ«,³
œKlºêæZ®»èJ/ Þ¶K¯¸÷Î»/¼ñæKïüÆë¯»«{ð¹	ëŠë¸	|K/»Ü€X 00ÅG¬ïÄ¼T|/Æh²"ÇëñÀp<rÆ‡Ü±Äîº/É&×,ó½+ÇŒ²Å8ûœ²º=Ÿ<4Ä4Ÿkó®SëëÀs+ð¿öü4ÕÛÌ.Ô +|5Â];5ØU{m-×e‹½5Ö/nÔÓŽÍpØÜº-ÜÉÚý,ÞM'-ËK´Ñÿ-4Ð0~¯áŠßœ¸Î?/Žà;;^òá’/@yä–ç¬tåê2ùÿÑÜŠþ9çÈö­ì×îÒ÷Úôºžl ¬Ÿ+{·°·ž¶Ôµƒ{ûºIû¾{Ü½cû»®rÛ>üìÅ?{|®ÉŸµº´Ÿ=ðóø6ïìíªë±æ1/@ú´$S.þÌàƒ|þËéë¼¾Ê“‡?~²åË¾ùó#[¿úùïú=þˆkßçÞG´øñï~öãV÷²g½Ø-/YXø˜î¦'6í{ ˆ Ë°W=sMÐbžñ¸º~Ðb¼	‘gAaa0…¤ ïL¨<†ÒS×M.vp!±åÃ nNˆ¢}†Dö?LâéšxÄ%žŒŠL,œŸ¨€xuOoÎÂîDFÿì1[ÌÝÛÌØÂzÙpvj¼q¸·4’+”W	fG	®1 8c¸æèÁ?¾Ña&ðÛ‰:Á=îtýÓÕŸ8nntZt"#QçÈË5.t‹¤d#-ùH.F2W“tV%ÉWÊMž ©Ö*©IQr2Yªä» ½:R—n´X/ËøË=Šx~”c1éHÌC"mÎÔ0ùÈË8ú2šzd&±Hc>OuEÃ$û<gÊ™%Ó•$':yvGYŽ’•ž'üÎiËW^’æÜœ=[YÏ|bnžúØ	ÀBm^°šít!/÷x€>np¡U(7‡¹=ˆ2‡÷¢èA'ÊP‡ªp£;šÇìÁC€e(UùNú­Ô·œV,…5Ký½”¦-EÖLƒUÓ]Ÿ™(û„¯«§ºúi9ƒúOPÖ’¥1E^H"
XÍªV·ÊÕ®zõ«3`  Žd°šõ¬hM«Z×šÕZ\! !ù
  ,       ÿà´Ldižhª®lë¾p,Ïtmßx®ï|ïŸ‘†Añ+È¤rÉl:Ÿ&ˆDòX-®‹Æ´éJ©,,c*ay¿U6»5{§iõuÜVáV¬¶ìž Ãsd}rW{\o`yt|v‰q(k‡ƒx‹•Š)“u~–›z)w',
¬D©,±§¯+­®Ž)²³ªµ­´*º¨¼*¶¿¸(ÂÀ)ÆËÉ²Ã«¾£¦ÐÎ'ÍÄ¹ÖÚ(ÍÈÕ±Ñ½¬¿Ýá»ÒåÔ&Êç&Ù°Üê®ï%î&A,	þ
û °p@P¿þüAˆ pEAƒúý8°à¾ˆ.l¨âáE‰	 2¬8"ÈIÿšÌ’¢C‹U$D9òeÉ,ErLá1fŠ™)m®”9±fG˜‰¶4Êi”.,HEàg'ŠXx‰:µ*‹¬Z¡®˜JU¬
°[Çv5›-[d½®pkõDÜ·'èr•*÷lÖ´*îÖ5¡W-_¼„ÿ".!ø«âÁŒ×B&Q8°dÇX“ˆ5b…Ïb9`Á 4Î,>‹´iÔžA‹v=áôƒÎ*T³Ž„Â´mÜ)tÏ^ávnÙ­‰¿¾ùhåµGÎûDqæ±WWq8
áÉ¹/÷~üsñÑ±×þà|Šî¦Ü£(@¿@ƒð¡®8hÏ¢~	øI‚Å~òàß}Õ™°ÿýÕ`‚%,Èß
x‚„šàßƒ€è7¡
BH†ÒÇá"0Ha}v˜â‡)lh¡‚Â8‹3FXc†%„è¢Šù¡D` A-,è€CY AIå—â’+i$’?RY¥“PfÉ$
VÉ£Ž"ô%˜\:¥€ej™B˜X¢h&E>©¦—[)f’#Lyæ	uv)§›hêg!~æyå˜#ö9g^tY£“Ü©è¤.6`i“DbŠ¢¦k*é¡²é›£RªÇ©…à)¢ FÚ)©®ª	V¾*e¬—ÒJ£©·–«¯:+««Ä6jl¯ª.[Þ
 D€ W$ÀÂÿØ"p…,H€üi¶h» ·*H;mµ×f»m·Ñ~n»å¾›®´Ô.`í
äš‹î½ È+n	ýÚ›‚ºùî«BÁçÂ0¸“Àð¿( Ì.¿î6m¼ÓëïÆÑ&ì±Áã{ñÂSü‚º	Ì‹1¶ƒ€ä‹í1@ËOp3Î.ëLs»0}°´<tÏêýòÒïl4
?ç|t´N£\4ÓHO}BÕ^›ÐôJ[]r´I?mö	,‡MðÍk·`±¾#k°Àu«,¶Ét¿ü1ÈxûM2Û|+œÂÄ®õßW¯Û÷âƒþ°Û§,³È‚Û}µâ‡[®3æk.¹ÿã†Síyc×üöÖQgÝ9ë2»n:ìB“­6å¤^6îºßÎ5Ö¶kuìÁ¿>|íªWN{ã²7ïÒ6oóògÏ\üìÇ£ïÉÆG¾÷ä=“{€÷%xË=öä“àmÜ«/ºäœï¼ÏéçÎ1îâ×oþãÝ¿ÿ=çèó_ù¶Ç¿ êíìSžû8À€ÉozLÜÛ§¿êµ,y>{{'<pm°kÛBFí‚»¡õJX4¢ðv*”^û<xÂë9¯…­³!i(³vP‡”ÃÆ¯€ó‹ Ì®¾›é€¥Kâ£ÅDz)ñnTàPÅ§MñˆQ„à»(¼ÿ/f1ƒô ú¤EÆþ1pD¢Õh¿8†‘‚td˜À:®pw¿û£ïr8Ä>rÐx†ŒÞ3H½ÑÉÐ#! 	9Iâ2’‚üa ÉÈì­¬pyK\÷¹3’òn£<]õ@÷:Æm.•õRãÜî¨<Wž€ó³å÷HJÀÁR—Adåì€	G^fîÈ«d2iIeêñ’›\$Ø¢	MJ2s™š´f6›yÍg:³zœœæfÙKTâO•£f.¿øËô‘ó˜¢<g,ßøÎÐ!s}ò$¦Õ9=}Ö—ýt'(áYJ9®ÎŸKÛ6±‰HL*´¡ÔüæèŠ½DJ²›<g#wÎç’¢7ô¤#¥éÑ6q£Aéq‡Eƒj‘Žø<é7gJ'Âô~25£KÑ8Ó[Â²§ð«iï‰S+ê”–<e§<ú?¡2ÕˆN­Ÿ71:Òjrs¡SÅ*8IŠÒbv´«~üªH9ÊÕ±Q¬Í$Dµ¹Ö«¶Õ!Pˆ«\çJ×ºÚõ®x¥S^÷Ê×¾úõ¯€•+  !ù
  ,   ž  ÿà$Ždižhª®lë¾p,Ïtmßx®ï¼©ôÀ pH,È¤ò78!É#µ¨.ÑÕ*UYQ‰j¢¬×ìøYöVÁj¹{¶bÅëf›úç¹f'hwZltupxr†&ƒqŒz‡‚}‘&sŽ%‹’€|U„c"§*
®?«*¨©±)¯°&³ª¬¶¯µ(»Á'·À¹%Ã½(ÆÄº¨¼­¿—ÉÐÎ%ÍË'ÊÒ®Ç²ÖÚ>ÓâÕ§Ñ¾ÞÔ$Üé°åìáÝïà÷*	þ
úJ¥À—o_?	 Dˆ‚ >~)\¨Â¡Áˆ2<a"
‰+â{xÐŸF‘
ÿz<’âÀ‘?ftÙæJ-7šèX2!MŽ6KNÔY‚'ÆCQŠhÀ´Á¢"hB”DS§N J¥ªâêÓR§fMáu,Š°\É6ýzv«Ùe«Ž@ûÖD\­QÓ¢¸Ö­Ü¥kë– ûwß¶y[\˜pWÆxÅ¾*‚e§¨0ÀùÀ)*.c~ 9gžO…¾œysçÏ«'Œ.âtjM%D·6ýúèºI»F*öìá©£Nû„íâÀYçMÜ·ñÝµ{ã&Á9ìè²±;ï­ü„hVXOQ }ªA-P_Þ„û¦¶@C_Å}øú¡—Þz(Ü—ŸUôÇžÿ{ "8'"ÖWÂV’ „ö¹w |
È`†h!	8^8¢Š,ž8†0¦'à|0q<`À=+ð—£
=pÏM›h†£Ž&ôè#ÞÃd“<é ’$9%	Nþ(ã~JJId•GF9$
]B	â™h’y¥™[Žæ—7.9&Vb	æŠb¶É£—A†É&•ªIáo¡¼™‚“)Ñ9ˆ¢~Ð¨ƒ@ºc“ÊW©ž"0jh‰‰r:§ŽÚa)¡’~šd¨w¦Z*«‹bªj–¦ŠJ*¥§–p«¦¹r)ë«Wô*ç¯¸ÎU…)  , T‘€
D‹À±*,€ÿÄ9B´L» ²(,Ë¬³ÐJKm²Ê^›m¹Ýž{‚¸Í.ðl
Üzn¸éb«­õºk¼äÒkî·Õæ»®ÀíŒ¯²ñÎ‹B¿
/¬î¾@|ï¿Ë6Ì®½è2ðÃó«oÁÊ&p0ÈÑŽÜ1 +6gB´)Ÿüî²&Só*/ÌråÆL±¸5÷Œ³Ì+Û²Ð9Ï\2Ñ%ÜœtÑ;»Ü4ÌO— 4Ó$8õâ-°Ï$ô×CÿLóÖüR}0Ç:kŒ0ÛWõÀ[ñÇ'XLòÄûk·Çòö±Ò|¿í7	 nøàEŽ2ÜP»ýøáˆl3Ý+Kž7æmãý2çrs½¬ÿ×(—6é›ƒ½2êŸ«®3ëS»®tÔH£=A×<“º¸K=·ìPÃþ»é«ç^úî·n|êÄ¿¾|ëÍÏ.ü¶jëH¹è àyì\Ï»åìvÏøßÚ+^º÷Ég<·â×MþöÃ£oíú0ËŸ.üÔWl¿ú¶³¿ùcÞÿè§¿ñU.{øK[Ýw@ †Ï]Ïû›Ø"8<lù{´Ó1h²¦-fL_·Áï--„Zaïj§Â³¡Pm-4Z	+Ã°u…§›a
m¨Ã®ì†lŽ±ç@„µ/lU¸Ü÷–@.qeI|àMXÄóMQ„Q4âÿšè¿+Š+‹Vd ¹X?ÿ/.Œ4#Í—F1R‘ŒOÙdøBàIpzŒ^ðzhÇŽyÈ[¡çøGèRyuÔãù¨H?â‘†}Äà#µFÈIV/‡‰|šÀÖA®qü¤5çÉös³#eìDÙÀPz“‚ÛäüN™0Y®“«4¥YiÂq±±”S„åâÜ¸ÇLÚN$¬$#IÇÚ)Ó˜Ït&&¥Y<hNs×Lf6yLDR³Âœœ—:^ŠP•¿3gúÈ	L[ú—éÔe,3GuÎr—¯¼Û/s9NWSŸðÌŸ9ÃYNôIplÚ¬æ7g‡PnF›?<e${iÉ‰Š°¡†ìf3!ª3Œr`™…ü¨F'x9‹^­¤ìXÛ¸7Q¥p|iÜh)SÂÅTžZçMûIÓ-î3~<UbM·SbZ«¨/@¦C·™Ñ‡&ÔyÖT(G¥·Ì‘V4¥­ªS—*Õ§R5ªP](	B  !ù
  ,   ž  ÿà$Ž"dB’ôìâ.MÊÎ'ªÎäË¤>Ö©•ï“ùJ§àq¢ã-·á+Ö{&£ÒÅÎèƒ
qDªõú»¶Õ.ùæª'¶ò¬é¦­³Åô;ÎžÖ—‚K
‰
†Kƒ„GŠ‹$…‡’ŠŒ™>—‘>“Œz3Ÿ8¢ 8¦ˆ›•#¬š‰œŽƒ˜­³¯"±¡®§¥¶ª3©¤,¼¨¾µ‚·²”¿€ÑK	Ø
ÔKÒÓÕ×Ø	ÜGÞÔÖGâÚåÝÒéáØäæ>èàëÙÛïßê>âÆ¹;@}íü‡# =~þäµ«‡ãÃV\(qÁ~ñò%˜ˆDƒ“Nÿ,AÀŠ3P¦4±²åË%2Uié’æ‘œ>}ð¼ù¥N¡6ƒâ 
“ÅP¥1Buš´©I©VG<Í*‚iM–D}xÝY'Ö¯=¹N‹ìÔ%â2´`‰»9€+—®]¼ƒøN˜û î‘»ò>Ø{D.aÃ>+–ÃÂ±ßÃ€~ü7qàÆ}wVÌØ‡eÑ˜=Ú|9ræÒ8NCÆ!ù³éÐ³gÔÖzpkÚ¯KŽ â€·È4XÝÇEqØ3’D9Ç‹çK¤/¯>üºqÒ©/!þ=zòíã½Cgž9ìG´»7ã¼<ûäâ›/€üüü9êe‡ß-ŸÜ‰@Þÿz$È— 2Í">`!DqPX¡…DsQ„ûuxÄ…j˜ž„&ž¢ˆ+–èá(fÈ u,ÎHã‹Œˆ£Œ.Zhã†udˆ=Æ8a)ÞØ]ŽK\ˆ¤O‰C*ê·ä‡Bf9„u.4$“ý8ÉÄcrI@™é…™æ•²©Ÿ˜TŠ€¢œxÐeœ^èfÜÙgîi!žôÁðæŽ‡
¦¢€
jf‹² i›º¦£ÝJ&§
ÎvÀ¨¸`À ¤
€ .$°Ä¨”ºÀ©¨¦€èÈ¬²ÒŠƒª«¶ú*©¦.¡ê­¹k±> Ëê®Á+³ÍÚŠ«ÿ®$L;k­©>­Úúú«µÉJKì¶Õv+¬¹Ë¢›.²ØŽ.·ÁB«l¯ôz«¬£Žz­±ª&P.¸ýþKï™Ãú;ð¸©
/¿/<°›«ðÃ ëpÂœ. |1ÀK¼kÄSìÇ3ÀÆwl2	*çvòÈôÂ,²Ì)<³¼°BÜ®¸,8»®Èørï½ÔN¬ª¾ì&ýnË3Ìû1ÔH7í4 KG­5ÍOƒÕSÿ,´Ô[×ûíØç]4¹“6Öl¯ØUÝ/Ï$ƒ¼rÌT¿jÈlãü1áyî2â7ó}ðß;öàîøá•'~ùâ™7.ù5³lvÿÆª2ž-Ê}›´âi«±Þý~=y x7.;èp+{Àí"[ûéìî.Ã]ïÌ;é\ÿ¾ºðnÏþ¹ÐÌ“L»½ìF¯ôóÁÇ>üÖÓ¯­ùñÇb«õï*=ø¶šŸ}ð¯ãjóä/w~ºÂïãNyý¯ËŒ?òñï¿·û©“ßò ˜3æ€˜ó_Äö§1f~T (AýEPtôYè2mðuèKõŒ·=ÁÀqÓ^óì×=Ý…ð„£_[X½¢Ð…%œúd˜CûÁ0…Á›áUØ·Ö°‡½KßëF>â1ˆÃ^è 7º)F®Š¥sàÿ°x?Ñõ¬‹Tü¢ß6ÈÅÿ1zñ‚aDãÅèºn®uZDÝãÈ¨Þm‰‰C÷Ä×¶»áñfz\ñêHÒ-3ä£Ý®öÄB²P‘Žäß!™Èö‘‘^$ïè=Jæ&lãÙGÖ…²” „Ÿ(å˜À3ÎÑ•­Lã+eË5ªÑrRÌ"I¹Kl2l™\Ý/sç5$r’iÆŸ%é²Ij²’@¦Ú¹Â$r’vf'Ÿ™Lbf­›Ó,f5)Nä²d)4¥*QyÎø¥3•>\¥:}¨3\–Qžð´¦;aÉ¹^ðíÄg;ë©¹ZÒp 'I8Ne±‰Ü{"D©È‰ê0˜çShE…ˆÑõYlô‘Ëü¨5ÊDhâ°¡JÜæò8ªÒŒú*¸eAïÉNšú³–öä%?áxÓ~îô”=åéO×T 5ž55Æ„ÃÔ¦:õ©PªT§JÕªZõªXÍªV·ÊU§* %]«XÇJÖ²šõ¬hM«Z› !ù
  ,       ÿ ÒLdižhª®lë¾p,Ïtmßx®ï|ï«£ŸpH,È¤rÉtAž‰ä±ZXi²®©„Å•RUW¬–5­áµªìE_³cö¤{¶/âysmu)ix[ƒ}…pbz|Uwr‚{n+tŠ'†’)š–j1¥,
¬
©,¦§°+­®ž'²¨ªµ­¯¼*º´*¶¯£(ÂÀ)ÅÃ)É«¾¸&Ï½¬¿±¦»ÐÖÒ%ÔÄÑÊÈÙÍ(ÌÇ¹äâ'ÌëÓêÛ·î-õA*	ü
ø,ìÝËÇ‚? ®ˆO_
ƒþ´×° A„
U0$¸â¿‰:Da0F"-ÿ&ˆ˜1ÅÆ‘'Jž\H‘ã¾~i†¬Øñ¢D){®Ì©±&LÆhÀ´¢"ØÓES§O J¥ÊâêÓR§f]áu¬Š°\É6ýzv«Ùe«ž@ûÖêÚºsÝÊ5WkÔ´@îî-Aw0‰¾`õvìW¬á	ˆÛþÅë‚e¥°0Àù@),.c~ ygžK…¾œysçÏ«'Œ.­âtêM'D·6ýúèºI»Fm*öìá©«N;…íâÀYçMÜ·ñÝµ{ã6Á9ìè²±;ï­FÖWX_ êPèË£`_`Â{?â³ ï~{‰óé©@Ÿ}þ‘  |'ðwßÿ"Vè§{¾Ñ`€)(Xàîá‚(døàzýI˜…ómx¡‡²"|$&¨"‡/œç€+*`#ÔÓ‚Œ4ÖhcõõŸfùÍ¸Â8ê(b==¦p#i ‘LycŽrB¥‘V ¥”nÙä	Hb¹£˜,<ä’\:y¥’ðµé¦—kÆ9¦	eÂ‰_•>Úhæ†D™æ!e9¤Ú%…Š˜(˜H6Ê£ƒÚ()~”.z)ƒX(Ú'£zvx‡§s‚jè”ˆ’ŠB¤¡j™*¤„¶jB °Z*ë¡Öjª£ª’ë©+ ,V° È €	° ìÄ.`ì±È Àÿwšðl´Ó¦¬²Ì:;l±,$k-¶âBK®
ß.»@³ÁŽ+m¹Õ^›m	Û®ëm²îÂ«B¾óRÀ¹÷’ p·(´n¼êÌn½è2Ì­Àà¾›îÄ#ÛïÂ
k/½È&ñ¿Lq˜âz<ò¾!¯ŒBÇ˜œ1 (Ç«rÁ|+2Î0ËÌ2ÍV¤³Ë'èL´¶%]Â·5“|3È ì,´Ï	'Ût
=+M‚Ñ<'3×4LñÆëË2Á›]4¿;qÆh—ípÕ·µ¼Ó·Ûj› °Årç½öÀTŸ öÌdó=·Þ…#Ý°àK³¸âo-¹¿0dýµÕAÛ<ôæÈ^ý²ÿ×P‹n8é'wîôç¥«~÷Ó©77:ì3›Ž4í?ÛŽ/êµ»>;ë±O­uÎœË~:îtm¼ÏÐ·ßÕÚýûó‘>|óÔ[>°ôÇ;¿øà{¿î}åÚÀ½ããƒþôßC¿ýäâgO¼õ]O¾ÀæÃÏ>ùó¯ß½üæ:ßîìÀèéyI[^õ¢æ»î]KÚSžð 8?R0kdZo7´&KdL`ëB¨2¶Œ„á¡ÂÏsdáwWB^0~í«^þ0·?¨Y¡~÷ƒ› Ö±"ë‡é
âÙ†h¿"æ0‚Hd˜õÆDì=±‚Q\w˜D# ‹8ä_ ˆ¾ÿ-Vñw[ îˆˆ¼ÁI†ÃÓ 
ÓÁ56±î{ãêèXA;jN…pÅÇG9
O~ä]îfÈFàõ.„³{[ò÷:I2îzx[3‰?>îg”Œä=ÉIPnòqê#%*wJK‚O•®\`(ËÎÒq,dñ	È=Æq—ì%!:FÞÑ‘‹œ#1‰Æe&j4æ_èKDJS‘É{&-³÷7nóŠæ‚%7/—6pB¬~µ¬à-˜Îþ‰ó‰Ý,§Ï)OM’‘£Ää*MyO6¦3žËå2¥LjS­¦0›‰PLB³Ž×|hzÐ…:p Ef6#ªQ7R”¡2ìÚ³J  'Îó}Þ,£9é×Å•rQŠù¢ûyÌ˜¶ô¤/Õ¢KU9Eð²§îóŸJqúÓ™¦t€c*©.‹©Lk6Õ¢u*/
Rª^Tª}äTµšÕdnÕ«]Ý(	iô˜&˜õ¬hM«Z×ÊÖ¶& fm«\çJ×ºÚu­`ÀB  !ù
  ,       ÿ PLdižhª®lë¾p,Ïtmßx®ï|ï«„ŸpH,È¤rÉœ8H’(B…D«…vÑN«WÖ–•|'V	VµåzWÕôš­%¿Sñ0]Û5Ÿåbuez)m}-yjv~*Šs(‡wx`‹Y‚•'‘™|›œ—’'”% %ª,
±
®,«¬µ+²³¨$·­¯º²´Á*¿¹*»´¦(ÇÅ)ÊÈ)Î°Ã½ÔÂ±Ä¶«ÀÕÛ×ÙÉÖÏÍÞÒ(ÑÌ'ãÐåÝªßÚ¼æ,O,Tà/ßŠ}Nü\!Pà=ƒ*öûp`A}üVtˆcBŠ-v<˜¤Š†	ÿzœ¸ð¤Hˆ)$jÉ&
™&S4$82bÉ–:ª$ù(Š‰²ÜÈÓ&¢6¨ÂUhlž:õéŠ«X½ªàJõëÕ¬P¥–Uí
²bS´‹®Vsï–°[õ,Ý­jÿâõ«—_³VÝŽ\xBÞ´Q×Ê%¹kãÇíF`À™ª,ˆ> êÉŠÎž€^!Ú iU,P=ºtìÎ³Y×†}·jÚ®m÷žzµŠÖ¯5›ý[wð¦U07žùªÛÄsß=ÅtàÉ±/\ºoê(¬CoÆhƒõ+
È/Ð€÷÷ðUÌaßÐ–÷Ý¡°_}Ê•Ð€,ì‡Mÿ$˜_
ö7É
8ß‚í!ß|fXá	
JH
…‚È¡ˆ&8X¢	!28Š	žè"ŒÊ×a]:0ôh B9îÈ#ìcÔˆ/î#$
=ú¤'îéÈB“E:pdŠ E¹ä	MðãŠX&)å
T$™M~ÙÂcYå•f©$šN‚§˜[rÙã›géå“÷Íé§š3bå”M:aç‹[4p(A :!ú©h{ŽÂIB——B™)¢=vzß§Šê¥šNÀ©¤#¢
j¤‹šêª±6Zi
´bz+“‰²Š¥«¥úÚÂÄ" …+  , h‘ Ä:v,Ë Àÿyš­± «Â²Ì:m±Ó&«¬µØŽ+m·æ*ÛìÏ®°m¹ßž{m¶%ÌËn½îŠ+/¹ûò‹.¾$èëm
à¾¯
Skoºÿ®{0
	ûË0ÀŸP1¼3Kì½+› ÄL2ÂË2:®ÉO îÈ-{| Èí ò¿,‡ Ì+Ï|2Å)kÑ3Íüîüó	2²²7—ìsË/­­ÇJÍ´Ð8?­3ÏYW­ñ²\ËÐpÑ
«ËmÆ_0°ÙôZ.ÇŸòÚq·öÛ§0¶À^O-qÍe×ðÒt—,7ÙëñÜ}ç»8âpn·	çýBÒR— nÓŠç\3ç(`uÿÐè!Muæ$lŽµÓ§NúÐ¨»üz×±«^úÔžºé¹/móêký9ð¡Ÿ>úÕ·;Þ»Û»»í“S~nâÅO ýàV|ôšOùöØ§­}õ×£-½ÚÔó^>ã±?Ï½ëèOþû²«ÝºõÓ_mú~¯ßîøêÓŸ÷,Àð/ üƒ]òàg´âÏd´·F<õ]+‚³c]Ï×À	Ï˜Ã È6¨<Ÿ‰ðw <Ý	G–Bê¬y%¼ [hÂÒÀ}ì^üØ?*K1Ë_á‡@ùÐ|: Õå?%°`BD"—±&î‰´¢Û¨è4‘‡%ô¡ÛÅÿ¹a‡R¬ß;f¼’ŠË»á(<Ý½1‹÷“ íŽ‡BØñqŽx¬]ƒ—ÇA/Ž¤èÜHÃB"ÏŒ¼áã|8ÉQ÷Û›Û*Ù¹ÃñŒƒáèIÂer’›<#*³wÊPRR•®4%(Ky7NV–´¥óÚøAHör‘æ/5øÇ;.r˜„ä#…iÇF*³Ìô"yÙL_V“±¬%,qyÀVr“ºôÛ7‰èÍ÷UŽm—¬V9‡xNÁ¥Q³4ç²Â©¼qb2žìœç6åÙ/#‹š¾[2‹éL>
ôu”¦1ê¶ƒZð™ÓDdŠ»„2o¡e EcQŒZwôn¥£#Ö².¦s€Lôb+µ(>X²´› |©×XE•ÆÔ‹.µi­‡S†ñ¤ö»)PijÒw¢Tl•£GGÑ&r©-h0‰9ÕV¡L…*A­©P©"«Qm‚XÇJÖ²šõ¬hM«Z×ÊÖ¶ºõ­pk@ !ù
  ,       ÿ`ñHSižhª®lë¾p,Ïtmßx®ï|ïÿ¦A°€€È¤rÉl:ŸÐ¨²˜‹CÂuA¾ÜG+»ht½`‰x¬åY_«š]>·âaWvk_áç,dfopikm}*‡*‚Š‹†z‰„‘r)•–yl|›(Œtƒ/¢%T
­r.±.­
Vµ-±³º,·¯»²´¶®ÅÃ½ÈÀÇ '¼¾Æ¸Ë+ÐÔ*Á(Ö¿+ÙÝ*ÜÒÂ,â-ß°Äà)ÙÎAêã×)æÌ[U	ù	. #Dhà"ŸþZ œ `}ü²XØ°`‚ƒýþhq_F…²0ˆP#CŽóÿE4Y1%F‰+(¢©òãÄ_²œ¹¢Í˜8]–yRdÏ‹$L@À”Aœ¢~©‚)‚	OYDm0Õ…U§TSlíÚÂ*Ö°(Æf]ñu­
µhO˜u+V*]mãš€ë•éY|Ë6½{"0‹¹zKf;8ñ„ÅUýÞk×±Y&0p€—¨bUi±¹óŸC?Í¢´ç 'ˆváútjÙ«is~Í"ölÒ»mÃVÍzEmL)|çnõpÜÅU¿ý»upç½‰ë6…òè)jc_ñ}ûˆ	™PkÒÂY¨/€Û=üñ*æ³ï~‚Ì}óÕGÇ-è×Þ€ñ­àÿˆ¼—`~êígßƒ),ÈŸ	þQˆ‚–!~ª'`ƒÊ!ƒ+| ˆ(:’E‰
²ˆÙ Q.N .,à£Ùç =Öx£Dªà#@‚˜I;ºà£àø¤ŽC¶°d“/ø—¥–FV‰$˜L9à—ERi%
^&™Â–f’ˆæ
Sy¦›(Àé$›PÎùæ ÍH –î5 &™„Žrh‘ƒÆéb‹Òéc¢ºæ	KRšb–J9©£OBz©	™‚Ê§¨ž6º'†œFªä§«zØê¨%”ë=³¦ªé£"jj¹úêÀŒ(° ž(p YÐ Ð±€R-(ËìÿÎ>@±Çº`m³Ú -µ,|‹­Ðr‹ì	æf»´âfAî
í¢»­±ëšP/ðŽëí²àj«î¿×º«B¿ò0¿÷v[-Àç2ï´
Gün´òÎh@ÿ€¯½ $àp¹Ê~îÆà%[òÈ‡Ì²
Êzür
ð¢Ü±É‹œo	1ãÜ²ÍË¼óðê|óÌ(ÔÌqÐ>­ÑL#}‚Ò)³»òÐEK­ïÕ =cÓ)ìÛ²¿lïÀe/ìôÄóÂ±ÁN£M²Ù“=·Úqƒ­2Ýc'œ¶ÅËMïÛáÚ=8ßëm5â4cLñßp'í¸R3.M²Ð ãz4ÖÐ}¹â&À«yÿÔœàùà˜‡;úçZ—@õæ™[Ž:è®w.»Û©K¼úì­m{Õ[çÞòî¸Óî; £W>tÌx7€ß—7/¹à¸K?õ¶Ð£n}è/ŸÙöµ?ÿxô€çÝ;óå;Ÿ}õéOo<ú‘O¿~Øß·=õôãÿýó«¬ÿÙ~«ÜÑ€W;—=+; ènG?™)ðiT™cwÀžEðz 5.‘U0ŒÚ3(Â²n„ä`Î,÷µŽÏwâk[þ^¯,xïëŸÕp(1ºÐ~Ü‹á÷Ç= ø0h4ÄÞø´Ä‘|DŸƒ—D#ž¯~Q„áy†E ŽoF™a]éˆ×@ÿã-ðƒÂ[%hÆßÁNu^‘G.¦±qtDã×hµ;J.oÔ]èGòQŽ½;ã	À¹ÂmŒsÞûW·GŠ-qWŒ$ç6MÞo’ž, 'éÊð|[b'“ˆ¿½¡rr‹b*çÅHÞq,ÝéŠ—HhÒŽsÜe{	HÒL˜l$æ/	L\rŽz$&2û¸Gg²ˆÄ«å*›8ËXží”Ü„e#NYŠónáìž7+©JR²²œŽl§+ÓÙÊÅ½’mëì›*µ™ÌÒAMŒÇ´æÿiË€FÓŸW¼f§‰H„zO¡Çc(0‰IP^êR Mè@göµ0úz•–ì"9
Ryîð$¥gHyˆÉ–T†¥ç$Y·•¢Ô¥*5)sÚ6`†
ðèDoyPšF‰šT5.Õ¨…ê0™jL¤VUEµª	"›¬C
`«XÇJÖ²šõ¬ñØyÐÊÖ¶ºõ­pëX€Ì„  !ù
  ,       ÿ P<Sižhª®lë¾p,Ïtmßx®ï|ïÿ&Éƒ  @€È¤rÉl:ŸÐèS)8&‘ÆbËeH¾°x<þ>¸èô¢ñm‘Íê¸L®‡áñ4[â.óisTvux€[{}b†‡‚„…‡ˆm,o‘’Ž~g’k”+–œ˜_ƒšw—‡‰•›*W
´µ
¯Bº»¼»,¶·À½Æ¾ÀÂ¶¸ÇÇ¿Á+Ã¯ÍÆÏÊµÌÕ¼×ÑËÅÛÈÐ*ÒfáºÝäßÔçé)å¹çï(åìóÉÞÙæøãðëíÜåƒçê—„"„‚ƒ‡#FŒE¡E…
(:”Èñ!ÅC&`¸±£Ä"-ÿflh’#Ê”
I¶<Y&Â•%g:xis$KkÚÄ	4(Èž>sÎä	“hQ¦0e>ÚTcÑYX$ %×¯&„aÑ lY1`Ó¦Á¬Û·gÃ¨vìŠ·hé®·oƒ¼z¿²%ëpàºmýâ•{Øëà»…7f«x1„ÆŽíª°ŒqåÈ—1?Þº3åÏq¬ðÊÕ€ë×v1˜M»vm]^ëÞm ö¶ƒÓÆÍ»¸ïÂ…/¾Û7ðä¶—3‡-úí3Óu;·~=wv×Ç¹Çþ½·®çâ¥g/žúéÛÛ¿gÎ>=ùïñí/`áškÿ N i8ð þ×Àÿ€+xà
	  	¢aà&¸ …*8ˆ¡
NH …‚¨!ƒ’øa
!¢˜‚‡žÈá‹*Æ ‹(À˜!€ŽÈÅ…6þ'b…?–È¢Œ>näŽ\à¤“V8 E'<¤À“XfI€µP Wj©e”Svb¥˜Zr¹"?‚‰f–dRY¥›o>©¦—ÒY'qRyæž[v™äœaîÙ§™zÖyç úP™’4ª¨ D*™(šMb9ÁCr6 %Ynê@§Ÿ®*§TzÚ ¨š¢Ú‰ª¬>)*©«šÚê¨©–ªÂ©¸¾ªk
¼Ò«“³æZë®·
k«¬®Jë²Ä6›Ê¯(`Éÿ Ø€(pÀ·à†.[í¹è À	ˆëî·äæ–î¼Ûvû®»ñš;/ºë.Ðî½áæ»/ºõzð¸å|n¿ÿ|€À
c[°Ãð&±ºìRü°ÅOL1Ä3¬1È
{ì0É‹ü1Ç
_›í[° .··¬€nöjL3èÂ¼ß
3wËó¹8LñÎ6Ÿë³Ìá"­ÂÍ9-tÒ/ÇtÓS?MtÔ;BÏV«tÍZg[´ÆxØ?‹5Ù_omt×YÇ­ËÚÒ<2Ë)g¼²¼›|0Êûª|2ßû
0áó>8âôêý·¾!û}8àK~9å
;¾8äé*~/ÿãéz>:èüâ½ôÕàª}Ûh»nÛL·^÷ÚJoûí¯çÞv
c]õ»Ãûðµ+{	°ëÌûì¾'ŸöóÌû^¼ðØ®î¶íÆ÷>üõTc‹€Ë¢ß‹ú¹XîðùÙ–ÿ.û«0üys=?æ%Ë0ýî»Ë¿þæÃßÀú'®ÿùmüÓÜú˜8 ¾ôZ€Ë|¶»ß[8#žó,è½ìénƒØ@+B
‚0|"ü Ô8½ï°lT!ÝXX=®0„#|¡Ý<¨Á¢0‡>„a
]¶…¹Ýst ÿ 8¯""‰Sb¡ˆ.'jÌ€[ fEŠañ‰[ÜWµx1ÿmI1\ôÀXÆôðŠTlß®eB©) Œ ¨#ÝîXF=Œfxô#À ÙGþ±[4ä YÈî1‘Ž<$/&È{’’Š´$#1ÉEN2b•|×%A9GRaqÄ–éÞE:‚)ðs©ÄØ7×ÆWž.–«ÄWíwË0–îŒ‹å)ƒéK~scÂ´%+é—KqµraìâŠö€÷¶fR”Ô› íX§¼l6ÏŽÖ¤á‚‡ÂPºkyÚŒ7§×½ò|Bœ&
ÈÏkžÓ›êÜ^7ÛYÃw:ŸéüW”©K\ó™í#¨3™yÐ]±—elfÀº7ƒÎòqÉäå2-šEXÕ}
(G+úÑl‰Œ+a£&÷p¨Qlt›úd'KªÉ—æS¥ûœ)<w˜Ç”Î³š?lé=mŠ¼u¢j4ui8¥wT¹íô‚)4WÔ%–4~ecàBŠFaó …ãUÍ˜Õýe´ªS«;jVµr\_k-…šÖ6~õ‹·hÐºÒrÚ“ž<5'`¡*X Ö³“5çS;ØSÄ*Õ¯Žªbÿ9YpBv±îl,fûÙX9R­hGKÚÒšö´¨¥ÁA&° Ôºöµ°­lg[Zj$`!  !ù	
  ,       ÿ 1dižhª®lë¾p,Ïtmßx®ï|ïÿÀ pH,Èäm±`Hž,ˆôùX1ht*©Z›OÉvBýbµ+)¹Ëb:Ñ)uYuÍŠÇs:Ž’³õgwi\^zo‚q„fv-~…)naxLŒ“/
›k,Ÿ,›
d£+Ÿ¡¨*¥© ¢¤œ³±«¶®µˆ(ª¬´¦¹)¾Â(¯|'Ä­)ÇË½²Î'Ç¼ÉÐÀ§žÖ+ÓÙ¸Ñ&ÍÝ¿3	å,ë,å
íé+ëíï+å	çô*öøà%‡N;wù¬w0ŸŠxóÞC¨ÏÜÂô— Å‡9¢ðè0Ä‹3ÿVT(òIN,ùMjV4Ø)¥¥	›&äT±³AO@qú,Qôè
 B—’h:4EÒª(¨Jë	­Hoz5ö©Í¨,Êª¸ºu‚Z«gÇ2å)—Û´tÛvmû†T±`@øÓ?p0¸ðƒÃ+^Ax‚aÄ€?1¦ì²
ÉŸ[~ŒYñf•/GÎšóhÏ)@ŸN‘šôjÅ™NÔ†B¶hÕŸYç6±»´æß¶cX® 5 ‹Y,/0ºè³QLo>¼ÄìÒ—W7~Åvç•”W1}üóèæ™£Gñ>{ñóOÔÏ~â|wû…G]~&_ÜY§žÿ})´G w×1°Mú¶Ž)*PH€ö(¸!Zè †jè ‡)x"N0â
%^(âŠ4Røbßá˜£‰(B(£-ê"yD	ä,¢àâ‘Ï%éd…6"Ùä	OÂ˜âWºàá
6p"‰‚¹È˜9`& bIÂ—PÒg	š–g†XÐY¤šw¦˜§›#À©%€s: aê9%ŸƒŽP‡¢XÚÙèŠè™–Jš¨¡)  @ 
,Ð¥	€ "¨à) 0‘ ¥žº@ªª~ê¨%ÄŠê
«¶ºÀ«+è:+ž‚**¬¦îZ+«®"++­Úzl°É»¬ÿ¯Àª ,´({«³ÊFËì¯àZ[«±¸’°-¯žb[.·.¬j Èð-» $0­¶¥Þ»ì¼¼Pª½ûŠ«oº#ì¯¸ ×»p·žìpÁÐ0µ#<Áªcüð	òÒë1Å GL2©ýž\BÈ£œ1±&k¬°Ê0£û.¾îRûlÍ£¼óµÍên´6mnÅ9óûó¹=çZ-¼+·´ÒCC\4ÕG—<n¶)¬ËîÕ]?óÔa/ÝmÅóû2¾”¶ìôÚÿŠ¬vÓ$¬ÚöÄ³Œ7Ì Ü=rÞž¦6Üâú=7Í#èý7ß†NwâËí8â{Ú8
3çmõã\uÉyÿ©Ÿ›à-åžgºè“®ºéÒÊì:ÔQ‡N.Æ¥×Îyê´×ý)ë.çî;Ø£·Ý;ä¶s]¼ðÈï>{ÍÀ¿ÍüÆZ_Þ:Ánûž¯ä£cÏ8÷×‡š=äÛßyÊæÛ¾Ëâó­¯ù3§oùúo·ïûËß7ýê¢ï>ÿ	óÛ x>ïÝ€ñƒ™Ö˜ ;ãAïvj›ÞªX/	þ‚ƒ³  (ˆ»×Õ.zýs ¾8A„á²H˜A"…Ô —çÂÊ%¯‚5´\Ôö¿”Ž‡{`	W1ë±rê"ç’Ä¸)‰ó{âX?(qqBlbáèCÆéubGg¶ÿÍ±Œ°ÛÚÍ¾æ<4î0ie³ ñZçFíÁ‘Œrl#ózC¯1íŒ{”ÚéHVíPpÝ[bµˆ6.±zŽT¤Å"iE*öï‘iDdø*IÉjòˆSì$ß>YÅPJÑ‹ÃÓ£ù8HŸå«¤ò™ÃØ­Q\w¤åñl¨Êã±r–®¬åƒéKYÞ’h½[+VGòµ*j¤¼¤$;v8OŠò€²Ãä!¯¹,jNÎš§Ä&#µÍ jS{ÞL¤ËYÀi‚ñœäÓW	0Lé	³Ïcã;åˆO"sŸ÷\f_Ù@~
4…Åá.‹ÕÏ„vp¡¦=!:qs‹átâ8ÓhIsJ8²£íädF1ºÑ‚4sßi/ºR•BÒ¥uˆš”@ÓšÚô¦8Í©Nwªª™òô§@ªP‡JT%„  ;                                                                                                                          thickbox/macFFBgHack.png                                                                            0000644                 00000000136 15212564050 0011101 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       ‰PNG

   IHDR         Äé…c   %IDATH‰íÍ!  ¡ë_jÕÖâMÕH$‰D"‘HÉ—Ò_,!Z’    IEND®B`‚                                                                                                                                                                                                                                                                                                                                                                                                                                  thickbox/thickbox.css                                                                               0000644                 00000005154 15212564050 0010711 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       #TB_overlay {
	background: #000;
	opacity: 0.7;
	filter: alpha(opacity=70);
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 100050; /* Above DFW. */
}

#TB_window {
	position: fixed;
	background-color: #fff;
	z-index: 100050; /* Above DFW. */
	visibility: hidden;
	text-align: left;
	top: 50%;
	left: 50%;
	-webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
	box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
}

#TB_window img#TB_Image {
	display: block;
	margin: 15px 0 0 15px;
	border-right: 1px solid #ccc;
	border-bottom: 1px solid #ccc;
	border-top: 1px solid #666;
	border-left: 1px solid #666;
}

#TB_caption{
	height: 25px;
	padding: 7px 30px 10px 25px;
	float: left;
}

#TB_closeWindow {
	height: 25px;
	padding: 11px 25px 10px 0;
	float: right;
}

#TB_closeWindowButton {
	position: absolute;
	left: auto;
	right: 0;
	width: 29px;
	height: 29px;
	border: 0;
	padding: 0;
	background: none;
	cursor: pointer;
	outline: none;
	-webkit-transition: color .1s ease-in-out, background .1s ease-in-out;
	transition: color .1s ease-in-out, background .1s ease-in-out;
}

#TB_ajaxWindowTitle {
	float: left;
	font-weight: 600;
	line-height: 29px;
	overflow: hidden;
	padding: 0 29px 0 10px;
	text-overflow: ellipsis;
	white-space: nowrap;
	width: calc( 100% - 39px );
}

#TB_title {
	background: #fcfcfc;
	border-bottom: 1px solid #ddd;
	height: 29px;
}

#TB_ajaxContent {
	clear: both;
	padding: 2px 15px 15px 15px;
	overflow: auto;
	text-align: left;
	line-height: 1.4em;
}

#TB_ajaxContent.TB_modal {
	padding: 15px;
}

#TB_ajaxContent p {
	padding: 5px 0px 5px 0px;
}

#TB_load {
	position: fixed;
	display: none;
	z-index: 100050;
	top: 50%;
	left: 50%;
	background-color: #E8E8E8;
	border: 1px solid #555;
	margin: -45px 0 0 -125px;
	padding: 40px 15px 15px;
}

#TB_HideSelect {
	z-index: 99;
	position: fixed;
	top: 0;
	left: 0;
	background-color: #fff;
	border: none;
	filter: alpha(opacity=0);
	opacity: 0;
	height: 100%;
	width: 100%;
}

#TB_iframeContent {
	clear: both;
	border: none;
}

.tb-close-icon {
	display: block;
	color: #666;
	text-align: center;
	line-height: 29px;
	width: 29px;
	height: 29px;
	position: absolute;
	top: 0;
	right: 0;
}

.tb-close-icon:before {
	content: "\f158";
	content: "\f158" / '';
	font: normal 20px/29px dashicons;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

#TB_closeWindowButton:hover .tb-close-icon,
#TB_closeWindowButton:focus .tb-close-icon {
	color: #006799;
}

#TB_closeWindowButton:focus .tb-close-icon {
	-webkit-box-shadow:
		0 0 0 1px #5b9dd9,
		0 0 2px 1px rgba(30, 140, 190, .8);
	box-shadow:
		0 0 0 1px #5b9dd9,
		0 0 2px 1px rgba(30, 140, 190, .8);
}
                                                                                                                                                                                                                                                                                                                                                                                                                    thickbox/thickbox.js                                                                                0000644                 00000032024 15212564050 0010531 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*
 * Thickbox 3.1 - One Box To Rule Them All.
 * By Cody Lindley (http://www.codylindley.com)
 * Copyright (c) 2007 cody lindley
 * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
*/

if ( typeof tb_pathToImage != 'string' ) {
	var tb_pathToImage = thickboxL10n.loadingAnimation;
}

/*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/

//on page load call tb_init
jQuery(document).ready(function(){
	tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox
	imgLoader = new Image();// preload image
	imgLoader.src = tb_pathToImage;
});

/*
 * Add thickbox to href & area elements that have a class of .thickbox.
 * Remove the loading indicator when content in an iframe has loaded.
 */
function tb_init(domChunk){
	jQuery( 'body' )
		.on( 'click', domChunk, tb_click )
		.on( 'thickbox:iframe:loaded', function() {
			jQuery( '#TB_window' ).removeClass( 'thickbox-loading' );
		});
}

function tb_click(){
	var t = this.title || this.name || null;
	var a = this.href || this.alt;
	var g = this.rel || false;
	tb_show(t,a,g);
	this.blur();
	return false;
}

function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link

	var $closeBtn;

	try {
		if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
			jQuery("body","html").css({height: "100%", width: "100%"});
			jQuery("html").css("overflow","hidden");
			if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6
				jQuery("body").append("<iframe id='TB_HideSelect'>"+thickboxL10n.noiframes+"</iframe><div id='TB_overlay'></div><div id='TB_window' class='thickbox-loading'></div>");
				jQuery("#TB_overlay").on( 'click', tb_remove );
			}
		}else{//all others
			if(document.getElementById("TB_overlay") === null){
				jQuery("body").append("<div id='TB_overlay'></div><div id='TB_window' class='thickbox-loading'></div>");
				jQuery("#TB_overlay").on( 'click', tb_remove );
				jQuery( 'body' ).addClass( 'modal-open' );
			}
		}

		if(tb_detectMacXFF()){
			jQuery("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash
		}else{
			jQuery("#TB_overlay").addClass("TB_overlayBG");//use background and opacity
		}

		if(caption===null){caption="";}
		jQuery("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' width='208' /></div>");//add loader to the page
		jQuery('#TB_load').show();//show loader

		var baseURL;
	   if(url.indexOf("?")!==-1){ //ff there is a query string involved
			baseURL = url.substr(0, url.indexOf("?"));
	   }else{
	   		baseURL = url;
	   }

	   var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$|\.webp$|\.avif$/;
	   var urlType = baseURL.toLowerCase().match(urlString);

		if(urlType == '.jpg' ||
			urlType == '.jpeg' ||
			urlType == '.png' ||
			urlType == '.gif' ||
			urlType == '.bmp' ||
			urlType == '.webp' ||
			urlType == '.avif'
		){//code to show images

			TB_PrevCaption = "";
			TB_PrevURL = "";
			TB_PrevHTML = "";
			TB_NextCaption = "";
			TB_NextURL = "";
			TB_NextHTML = "";
			TB_imageCount = "";
			TB_FoundURL = false;
			if(imageGroup){
				TB_TempArray = jQuery("a[rel="+imageGroup+"]").get();
				for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) {
					var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);
						if (!(TB_TempArray[TB_Counter].href == url)) {
							if (TB_FoundURL) {
								TB_NextCaption = TB_TempArray[TB_Counter].title;
								TB_NextURL = TB_TempArray[TB_Counter].href;
								TB_NextHTML = "<span id='TB_next'>&nbsp;&nbsp;<a href='#'>"+thickboxL10n.next+"</a></span>";
							} else {
								TB_PrevCaption = TB_TempArray[TB_Counter].title;
								TB_PrevURL = TB_TempArray[TB_Counter].href;
								TB_PrevHTML = "<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>"+thickboxL10n.prev+"</a></span>";
							}
						} else {
							TB_FoundURL = true;
							TB_imageCount = thickboxL10n.image + ' ' + (TB_Counter + 1) + ' ' + thickboxL10n.of + ' ' + (TB_TempArray.length);
						}
				}
			}

			imgPreloader = new Image();
			imgPreloader.onload = function(){
			imgPreloader.onload = null;

			// Resizing large images - original by Christian Montoya edited by me.
			var pagesize = tb_getPageSize();
			var x = pagesize[0] - 150;
			var y = pagesize[1] - 150;
			var imageWidth = imgPreloader.width;
			var imageHeight = imgPreloader.height;
			if (imageWidth > x) {
				imageHeight = imageHeight * (x / imageWidth);
				imageWidth = x;
				if (imageHeight > y) {
					imageWidth = imageWidth * (y / imageHeight);
					imageHeight = y;
				}
			} else if (imageHeight > y) {
				imageWidth = imageWidth * (y / imageHeight);
				imageHeight = y;
				if (imageWidth > x) {
					imageHeight = imageHeight * (x / imageWidth);
					imageWidth = x;
				}
			}
			// End Resizing

			TB_WIDTH = imageWidth + 30;
			TB_HEIGHT = imageHeight + 60;
			jQuery("#TB_window").append("<a href='' id='TB_ImageOff'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><span class='tb-close-icon' aria-hidden='true'></span></button></div>");

			jQuery("#TB_closeWindowButton").on( 'click', tb_remove );

			if (!(TB_PrevHTML === "")) {
				function goPrev(){
					if(jQuery(document).off("click",goPrev)){jQuery(document).off("click",goPrev);}
					jQuery("#TB_window").remove();
					jQuery("body").append("<div id='TB_window'></div>");
					tb_show(TB_PrevCaption, TB_PrevURL, imageGroup);
					return false;
				}
				jQuery("#TB_prev").on( 'click', goPrev );
			}

			if (!(TB_NextHTML === "")) {
				function goNext(){
					jQuery("#TB_window").remove();
					jQuery("body").append("<div id='TB_window'></div>");
					tb_show(TB_NextCaption, TB_NextURL, imageGroup);
					return false;
				}
				jQuery("#TB_next").on( 'click', goNext );

			}

			jQuery(document).on('keydown.thickbox', function(e){
				if ( e.which == 27 ){ // close
					tb_remove();

				} else if ( e.which == 190 ){ // display previous image
					if(!(TB_NextHTML == "")){
						jQuery(document).off('thickbox');
						goNext();
					}
				} else if ( e.which == 188 ){ // display next image
					if(!(TB_PrevHTML == "")){
						jQuery(document).off('thickbox');
						goPrev();
					}
				}
				return false;
			});

			tb_position();
			jQuery("#TB_load").remove();
			jQuery("#TB_ImageOff").on( 'click', tb_remove );
			jQuery("#TB_window").css({'visibility':'visible'}); //for safari using css instead of show
			};

			imgPreloader.src = url;
		}else{//code to show html

			var queryString = url.replace(/^[^\?]+\??/,'');
			var params = tb_parseQuery( queryString );

			TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no parameters were added to URL
			TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no parameters were added to URL
			ajaxContentW = TB_WIDTH - 30;
			ajaxContentH = TB_HEIGHT - 45;

			if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window
					urlNoQuery = url.split('TB_');
					jQuery("#TB_iframeContent").remove();
					if(params['modal'] != "true"){//iframe no modal
						jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><span class='tb-close-icon' aria-hidden='true'></span></button></div></div><iframe frameborder='0' hspace='0' allowtransparency='true' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' >"+thickboxL10n.noiframes+"</iframe>");
					}else{//iframe modal
					jQuery("#TB_overlay").off();
						jQuery("#TB_window").append("<iframe frameborder='0' hspace='0' allowtransparency='true' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'>"+thickboxL10n.noiframes+"</iframe>");
					}
			}else{// not an iframe, ajax
					if(jQuery("#TB_window").css("visibility") != "visible"){
						if(params['modal'] != "true"){//ajax no modal
						jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><span class='tb-close-icon' aria-hidden='true'></span></button></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");
						}else{//ajax modal
						jQuery("#TB_overlay").off();
						jQuery("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");
						}
					}else{//this means the window is already up, we are just loading new content via ajax
						jQuery("#TB_ajaxContent")[0].style.width = ajaxContentW +"px";
						jQuery("#TB_ajaxContent")[0].style.height = ajaxContentH +"px";
						jQuery("#TB_ajaxContent")[0].scrollTop = 0;
						jQuery("#TB_ajaxWindowTitle").html(caption);
					}
			}

			jQuery("#TB_closeWindowButton").on( 'click', tb_remove );

				if(url.indexOf('TB_inline') != -1){
					jQuery("#TB_ajaxContent").append(jQuery('#' + params['inlineId']).children());
					jQuery("#TB_window").on('tb_unload', function () {
						jQuery('#' + params['inlineId']).append( jQuery("#TB_ajaxContent").children() ); // move elements back when you're finished
					});
					tb_position();
					jQuery("#TB_load").remove();
					jQuery("#TB_window").css({'visibility':'visible'});
				}else if(url.indexOf('TB_iframe') != -1){
					tb_position();
					jQuery("#TB_load").remove();
					jQuery("#TB_window").css({'visibility':'visible'});
				}else{
					var load_url = url;
					load_url += -1 === url.indexOf('?') ? '?' : '&';
					jQuery("#TB_ajaxContent").load(load_url += "random=" + (new Date().getTime()),function(){//to do a post change this load method
						tb_position();
						jQuery("#TB_load").remove();
						tb_init("#TB_ajaxContent a.thickbox");
						jQuery("#TB_window").css({'visibility':'visible'});
					});
				}

		}

		if(!params['modal']){
			jQuery(document).on('keydown.thickbox', function(e){
				if ( e.which == 27 ){ // close
					tb_remove();
					return false;
				}
			});
		}

		$closeBtn = jQuery( '#TB_closeWindowButton' );
		/*
		 * If the native Close button icon is visible, move focus on the button
		 * (e.g. in the Network Admin Themes screen).
		 * In other admin screens is hidden and replaced by a different icon.
		 */
		if ( $closeBtn.find( '.tb-close-icon' ).is( ':visible' ) ) {
			$closeBtn.trigger( 'focus' );
		}

	} catch(e) {
		//nothing here
	}
}

//helper functions below
function tb_showIframe(){
	jQuery("#TB_load").remove();
	jQuery("#TB_window").css({'visibility':'visible'}).trigger( 'thickbox:iframe:loaded' );
}

function tb_remove() {
 	jQuery("#TB_imageOff").off("click");
	jQuery("#TB_closeWindowButton").off("click");
	jQuery( '#TB_window' ).fadeOut( 'fast', function() {
		jQuery( '#TB_window, #TB_overlay, #TB_HideSelect' ).trigger( 'tb_unload' ).off().remove();
		jQuery( 'body' ).trigger( 'thickbox:removed' );
	});
	jQuery( 'body' ).removeClass( 'modal-open' );
	jQuery("#TB_load").remove();
	if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
		jQuery("body","html").css({height: "auto", width: "auto"});
		jQuery("html").css("overflow","");
	}
	jQuery(document).off('.thickbox');
	return false;
}

function tb_position() {
var isIE6 = typeof document.body.style.maxHeight === "undefined";
jQuery("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'});
	if ( ! isIE6 ) { // take away IE6
		jQuery("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});
	}
}

function tb_parseQuery ( query ) {
   var Params = {};
   if ( ! query ) {return Params;}// return empty object
   var Pairs = query.split(/[;&]/);
   for ( var i = 0; i < Pairs.length; i++ ) {
      var KeyVal = Pairs[i].split('=');
      if ( ! KeyVal || KeyVal.length != 2 ) {continue;}
      var key = unescape( KeyVal[0] );
      var val = unescape( KeyVal[1] );
      val = val.replace(/\+/g, ' ');
      Params[key] = val;
   }
   return Params;
}

function tb_getPageSize(){
	var de = document.documentElement;
	var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
	var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
	arrayPageSize = [w,h];
	return arrayPageSize;
}

function tb_detectMacXFF() {
  var userAgent = navigator.userAgent.toLowerCase();
  if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) {
    return true;
  }
}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            tinymce/langs/wp-langs-en.js                                                                        0000644                 00000036251 15212564050 0012015 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * TinyMCE 3.x language strings
 *
 * Loaded only when external plugins are added to TinyMCE.
 */
( function() {
	var main = {}, lang = 'en';

	if ( typeof tinyMCEPreInit !== 'undefined' && tinyMCEPreInit.ref.language !== 'en' ) {
		lang = tinyMCEPreInit.ref.language;
	}

	main[lang] = {
		common: {
			edit_confirm: "Do you want to use the WYSIWYG mode for this textarea?",
			apply: "Apply",
			insert: "Insert",
			update: "Update",
			cancel: "Cancel",
			close: "Close",
			browse: "Browse",
			class_name: "Class",
			not_set: "-- Not set --",
			clipboard_msg: "Copy/Cut/Paste is not available in Mozilla and Firefox.",
			clipboard_no_support: "Currently not supported by your browser, use keyboard shortcuts instead.",
			popup_blocked: "Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.",
			invalid_data: "Error: Invalid values entered, these are marked in red.",
			invalid_data_number: "{#field} must be a number",
			invalid_data_min: "{#field} must be a number greater than {#min}",
			invalid_data_size: "{#field} must be a number or percentage",
			more_colors: "More colors"
		},
		colors: {
			"000000": "Black",
			"993300": "Burnt orange",
			"333300": "Dark olive",
			"003300": "Dark green",
			"003366": "Dark azure",
			"000080": "Navy Blue",
			"333399": "Indigo",
			"333333": "Very dark gray",
			"800000": "Maroon",
			"FF6600": "Orange",
			"808000": "Olive",
			"008000": "Green",
			"008080": "Teal",
			"0000FF": "Blue",
			"666699": "Grayish blue",
			"808080": "Gray",
			"FF0000": "Red",
			"FF9900": "Amber",
			"99CC00": "Yellow green",
			"339966": "Sea green",
			"33CCCC": "Turquoise",
			"3366FF": "Royal blue",
			"800080": "Purple",
			"999999": "Medium gray",
			"FF00FF": "Magenta",
			"FFCC00": "Gold",
			"FFFF00": "Yellow",
			"00FF00": "Lime",
			"00FFFF": "Aqua",
			"00CCFF": "Sky blue",
			"993366": "Brown",
			"C0C0C0": "Silver",
			"FF99CC": "Pink",
			"FFCC99": "Peach",
			"FFFF99": "Light yellow",
			"CCFFCC": "Pale green",
			"CCFFFF": "Pale cyan",
			"99CCFF": "Light sky blue",
			"CC99FF": "Plum",
			"FFFFFF": "White"
		},
		contextmenu: {
			align: "Alignment",
			left: "Left",
			center: "Center",
			right: "Right",
			full: "Full"
		},
		insertdatetime: {
			date_fmt: "%Y-%m-%d",
			time_fmt: "%H:%M:%S",
			insertdate_desc: "Insert date",
			inserttime_desc: "Insert time",
			months_long: "January,February,March,April,May,June,July,August,September,October,November,December",
			months_short: "Jan_January_abbreviation,Feb_February_abbreviation,Mar_March_abbreviation,Apr_April_abbreviation,May_May_abbreviation,Jun_June_abbreviation,Jul_July_abbreviation,Aug_August_abbreviation,Sep_September_abbreviation,Oct_October_abbreviation,Nov_November_abbreviation,Dec_December_abbreviation",
			day_long: "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",
			day_short: "Sun,Mon,Tue,Wed,Thu,Fri,Sat"
		},
		print: {
			print_desc: "Print"
		},
		preview: {
			preview_desc: "Preview"
		},
		directionality: {
			ltr_desc: "Direction left to right",
			rtl_desc: "Direction right to left"
		},
		layer: {
			insertlayer_desc: "Insert new layer",
			forward_desc: "Move forward",
			backward_desc: "Move backward",
			absolute_desc: "Toggle absolute positioning",
			content: "New layer..."
		},
		save: {
			save_desc: "Save",
			cancel_desc: "Cancel all changes"
		},
		nonbreaking: {
			nonbreaking_desc: "Insert non-breaking space character"
		},
		iespell: {
			iespell_desc: "Run spell checking",
			download: "ieSpell not detected. Do you want to install it now?"
		},
		advhr: {
			advhr_desc: "Horizontal rule"
		},
		emotions: {
			emotions_desc: "Emotions"
		},
		searchreplace: {
			search_desc: "Find",
			replace_desc: "Find/Replace"
		},
		advimage: {
			image_desc: "Insert/edit image"
		},
		advlink: {
			link_desc: "Insert/edit link"
		},
		xhtmlxtras: {
			cite_desc: "Citation",
			abbr_desc: "Abbreviation",
			acronym_desc: "Acronym",
			del_desc: "Deletion",
			ins_desc: "Insertion",
			attribs_desc: "Insert/Edit Attributes"
		},
		style: {
			desc: "Edit CSS Style"
		},
		paste: {
			paste_text_desc: "Paste as Plain Text",
			paste_word_desc: "Paste from Word",
			selectall_desc: "Select All",
			plaintext_mode_sticky: "Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.",
			plaintext_mode: "Paste is now in plain text mode. Click again to toggle back to regular paste mode."
		},
		paste_dlg: {
			text_title: "Use Ctrl + V on your keyboard to paste the text into the window.",
			text_linebreaks: "Keep linebreaks",
			word_title: "Use Ctrl + V on your keyboard to paste the text into the window."
		},
		table: {
			desc: "Inserts a new table",
			row_before_desc: "Insert row before",
			row_after_desc: "Insert row after",
			delete_row_desc: "Delete row",
			col_before_desc: "Insert column before",
			col_after_desc: "Insert column after",
			delete_col_desc: "Remove column",
			split_cells_desc: "Split merged table cells",
			merge_cells_desc: "Merge table cells",
			row_desc: "Table row properties",
			cell_desc: "Table cell properties",
			props_desc: "Table properties",
			paste_row_before_desc: "Paste table row before",
			paste_row_after_desc: "Paste table row after",
			cut_row_desc: "Cut table row",
			copy_row_desc: "Copy table row",
			del: "Delete table",
			row: "Row",
			col: "Column",
			cell: "Cell"
		},
		autosave: {
			unload_msg: "The changes you made will be lost if you navigate away from this page."
		},
		fullscreen: {
			desc: "Toggle fullscreen mode (Alt + Shift + G)"
		},
		media: {
			desc: "Insert / edit embedded media",
			edit: "Edit embedded media"
		},
		fullpage: {
			desc: "Document properties"
		},
		template: {
			desc: "Insert predefined template content"
		},
		visualchars: {
			desc: "Visual control characters on/off."
		},
		spellchecker: {
			desc: "Toggle spellchecker (Alt + Shift + N)",
			menu: "Spellchecker settings",
			ignore_word: "Ignore word",
			ignore_words: "Ignore all",
			langs: "Languages",
			wait: "Please wait...",
			sug: "Suggestions",
			no_sug: "No suggestions",
			no_mpell: "No misspellings found.",
			learn_word: "Learn word"
		},
		pagebreak: {
			desc: "Insert Page Break"
		},
		advlist:{
			types: "Types",
			def: "Default",
			lower_alpha: "Lower alpha",
			lower_greek: "Lower greek",
			lower_roman: "Lower roman",
			upper_alpha: "Upper alpha",
			upper_roman: "Upper roman",
			circle: "Circle",
			disc: "Disc",
			square: "Square"
		},
		aria: {
			rich_text_area: "Rich Text Area"
		},
		wordcount:{
			words: "Words: "
		}
	};

	tinyMCE.addI18n( main );

	tinyMCE.addI18n( lang + ".advanced", {
		style_select: "Styles",
		font_size: "Font size",
		fontdefault: "Font family",
		block: "Format",
		paragraph: "Paragraph",
		div: "Div",
		address: "Address",
		pre: "Preformatted",
		h1: "Heading 1",
		h2: "Heading 2",
		h3: "Heading 3",
		h4: "Heading 4",
		h5: "Heading 5",
		h6: "Heading 6",
		blockquote: "Blockquote",
		code: "Code",
		samp: "Code sample",
		dt: "Definition term ",
		dd: "Definition description",
		bold_desc: "Bold (Ctrl + B)",
		italic_desc: "Italic (Ctrl + I)",
		underline_desc: "Underline",
		striketrough_desc: "Strikethrough (Alt + Shift + D)",
		justifyleft_desc: "Align Left (Alt + Shift + L)",
		justifycenter_desc: "Align Center (Alt + Shift + C)",
		justifyright_desc: "Align Right (Alt + Shift + R)",
		justifyfull_desc: "Align Full (Alt + Shift + J)",
		bullist_desc: "Unordered list (Alt + Shift + U)",
		numlist_desc: "Ordered list (Alt + Shift + O)",
		outdent_desc: "Outdent",
		indent_desc: "Indent",
		undo_desc: "Undo (Ctrl + Z)",
		redo_desc: "Redo (Ctrl + Y)",
		link_desc: "Insert/edit link (Alt + Shift + A)",
		unlink_desc: "Unlink (Alt + Shift + S)",
		image_desc: "Insert/edit image (Alt + Shift + M)",
		cleanup_desc: "Cleanup messy code",
		code_desc: "Edit HTML Source",
		sub_desc: "Subscript",
		sup_desc: "Superscript",
		hr_desc: "Insert horizontal ruler",
		removeformat_desc: "Remove formatting",
		forecolor_desc: "Select text color",
		backcolor_desc: "Select background color",
		charmap_desc: "Insert custom character",
		visualaid_desc: "Toggle guidelines/invisible elements",
		anchor_desc: "Insert/edit anchor",
		cut_desc: "Cut",
		copy_desc: "Copy",
		paste_desc: "Paste",
		image_props_desc: "Image properties",
		newdocument_desc: "New document",
		help_desc: "Help",
		blockquote_desc: "Blockquote (Alt + Shift + Q)",
		clipboard_msg: "Copy/Cut/Paste is not available in Mozilla and Firefox.",
		path: "Path",
		newdocument: "Are you sure you want to clear all contents?",
		toolbar_focus: "Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",
		more_colors: "More colors",
		shortcuts_desc: "Accessibility Help",
		help_shortcut: " Press ALT F10 for toolbar. Press ALT 0 for help.",
		rich_text_area: "Rich Text Area",
		toolbar: "Toolbar"
	});

	tinyMCE.addI18n( lang + ".advanced_dlg", {
		about_title: "About TinyMCE",
		about_general: "About",
		about_help: "Help",
		about_license: "License",
		about_plugins: "Plugins",
		about_plugin: "Plugin",
		about_author: "Author",
		about_version: "Version",
		about_loaded: "Loaded plugins",
		anchor_title: "Insert/edit anchor",
		anchor_name: "Anchor name",
		code_title: "HTML Source Editor",
		code_wordwrap: "Word wrap",
		colorpicker_title: "Select a color",
		colorpicker_picker_tab: "Picker",
		colorpicker_picker_title: "Color picker",
		colorpicker_palette_tab: "Palette",
		colorpicker_palette_title: "Palette colors",
		colorpicker_named_tab: "Named",
		colorpicker_named_title: "Named colors",
		colorpicker_color: "Color: ",
		colorpicker_name: "Name: ",
		charmap_title: "Select custom character",
		charmap_usage: "Use left and right arrows to navigate.",
		image_title: "Insert/edit image",
		image_src: "Image URL",
		image_alt: "Image description",
		image_list: "Image list",
		image_border: "Border",
		image_dimensions: "Dimensions",
		image_vspace: "Vertical space",
		image_hspace: "Horizontal space",
		image_align: "Alignment",
		image_align_baseline: "Baseline",
		image_align_top: "Top",
		image_align_middle: "Middle",
		image_align_bottom: "Bottom",
		image_align_texttop: "Text top",
		image_align_textbottom: "Text bottom",
		image_align_left: "Left",
		image_align_right: "Right",
		link_title: "Insert/edit link",
		link_url: "Link URL",
		link_target: "Target",
		link_target_same: "Open link in the same window",
		link_target_blank: "Open link in a new window",
		link_titlefield: "Title",
		link_is_email: "The URL you entered seems to be an email address, do you want to add the required mailto: prefix?",
		link_is_external: "The URL you entered seems to be an external link, do you want to add the required http:// prefix?",
		link_list: "Link list",
		accessibility_help: "Accessibility Help",
		accessibility_usage_title: "General Usage"
	});

	tinyMCE.addI18n( lang + ".media_dlg", {
		title: "Insert / edit embedded media",
		general: "General",
		advanced: "Advanced",
		file: "File/URL",
		list: "List",
		size: "Dimensions",
		preview: "Preview",
		constrain_proportions: "Constrain proportions",
		type: "Type",
		id: "Id",
		name: "Name",
		class_name: "Class",
		vspace: "V-Space",
		hspace: "H-Space",
		play: "Auto play",
		loop: "Loop",
		menu: "Show menu",
		quality: "Quality",
		scale: "Scale",
		align: "Align",
		salign: "SAlign",
		wmode: "WMode",
		bgcolor: "Background",
		base: "Base",
		flashvars: "Flashvars",
		liveconnect: "SWLiveConnect",
		autohref: "AutoHREF",
		cache: "Cache",
		hidden: "Hidden",
		controller: "Controller",
		kioskmode: "Kiosk mode",
		playeveryframe: "Play every frame",
		targetcache: "Target cache",
		correction: "No correction",
		enablejavascript: "Enable JavaScript",
		starttime: "Start time",
		endtime: "End time",
		href: "href",
		qtsrcchokespeed: "Choke speed",
		target: "Target",
		volume: "Volume",
		autostart: "Auto start",
		enabled: "Enabled",
		fullscreen: "Fullscreen",
		invokeurls: "Invoke URLs",
		mute: "Mute",
		stretchtofit: "Stretch to fit",
		windowlessvideo: "Windowless video",
		balance: "Balance",
		baseurl: "Base URL",
		captioningid: "Captioning id",
		currentmarker: "Current marker",
		currentposition: "Current position",
		defaultframe: "Default frame",
		playcount: "Play count",
		rate: "Rate",
		uimode: "UI Mode",
		flash_options: "Flash options",
		qt_options: "QuickTime options",
		wmp_options: "Windows media player options",
		rmp_options: "Real media player options",
		shockwave_options: "Shockwave options",
		autogotourl: "Auto goto URL",
		center: "Center",
		imagestatus: "Image status",
		maintainaspect: "Maintain aspect",
		nojava: "No java",
		prefetch: "Prefetch",
		shuffle: "Shuffle",
		console: "Console",
		numloop: "Num loops",
		controls: "Controls",
		scriptcallbacks: "Script callbacks",
		swstretchstyle: "Stretch style",
		swstretchhalign: "Stretch H-Align",
		swstretchvalign: "Stretch V-Align",
		sound: "Sound",
		progress: "Progress",
		qtsrc: "QT Src",
		qt_stream_warn: "Streamed rtsp resources should be added to the QT Src field under the advanced tab.",
		align_top: "Top",
		align_right: "Right",
		align_bottom: "Bottom",
		align_left: "Left",
		align_center: "Center",
		align_top_left: "Top left",
		align_top_right: "Top right",
		align_bottom_left: "Bottom left",
		align_bottom_right: "Bottom right",
		flv_options: "Flash video options",
		flv_scalemode: "Scale mode",
		flv_buffer: "Buffer",
		flv_startimage: "Start image",
		flv_starttime: "Start time",
		flv_defaultvolume: "Default volume",
		flv_hiddengui: "Hidden GUI",
		flv_autostart: "Auto start",
		flv_loop: "Loop",
		flv_showscalemodes: "Show scale modes",
		flv_smoothvideo: "Smooth video",
		flv_jscallback: "JS Callback",
		html5_video_options: "HTML5 Video Options",
		altsource1: "Alternative source 1",
		altsource2: "Alternative source 2",
		preload: "Preload",
		poster: "Poster",
		source: "Source"
	});

	tinyMCE.addI18n( lang + ".wordpress", {
		wp_adv_desc: "Show/Hide Kitchen Sink (Alt + Shift + Z)",
		wp_more_desc: "Insert More Tag (Alt + Shift + T)",
		wp_page_desc: "Insert Page break (Alt + Shift + P)",
		wp_help_desc: "Help (Alt + Shift + H)",
		wp_more_alt: "More...",
		wp_page_alt: "Next page...",
		add_media: "Add Media",
		add_image: "Add an Image",
		add_video: "Add Video",
		add_audio: "Add Audio",
		editgallery: "Edit Gallery",
		delgallery: "Delete Gallery",
		wp_fullscreen_desc: "Distraction-free writing mode (Alt + Shift + W)"
	});

	tinyMCE.addI18n( lang + ".wpeditimage", {
		edit_img: "Edit Image",
		del_img: "Delete Image",
		adv_settings: "Advanced Settings",
		none: "None",
		size: "Size",
		thumbnail: "Thumbnail",
		medium: "Medium",
		full_size: "Full Size",
		current_link: "Current Link",
		link_to_img: "Link to Image",
		link_help: "Enter a link URL or click above for presets.",
		adv_img_settings: "Advanced Image Settings",
		source: "Source",
		width: "Width",
		height: "Height",
		orig_size: "Original Size",
		css: "CSS Class",
		adv_link_settings: "Advanced Link Settings",
		link_rel: "Link Rel",
		s60: "60%",
		s70: "70%",
		s80: "80%",
		s90: "90%",
		s100: "100%",
		s110: "110%",
		s120: "120%",
		s130: "130%",
		img_title: "Title",
		caption: "Caption",
		alt: "Alternative Text"
	});
}());
                                                                                                                                                                                                                                                                                                                                                       tinymce/license.txt                                                                                 0000644                 00000063511 15212564050 0010405 0                                                                                                    ustar 00                                                                                                                                                                                                                                                             GNU LESSER GENERAL PUBLIC LICENSE
           Version 2.1, February 1999

 Copyright (C) 1991, 1999 Free Software Foundation, Inc.
 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

[This is the first released version of the Lesser GPL.  It also counts
 as the successor of the GNU Library Public License, version 2, hence
 the version number 2.1.]

          Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.

  This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it.  You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.

  When we speak of free software, we are referring to freedom of use,
not price.  Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.

  To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights.  These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.

  For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you.  You must make sure that they, too, receive or can get the source
code.  If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it.  And you must show them these terms so they know their rights.

  We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.

  To protect each distributor, we want to make it very clear that
there is no warranty for the free library.  Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.

  Finally, software patents pose a constant threat to the existence of
any free program.  We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder.  Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.

  Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License.  This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License.  We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.

  When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library.  The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom.  The Lesser General
Public License permits more lax criteria for linking other code with
the library.

  We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License.  It also provides other free software developers Less
of an advantage over competing non-free programs.  These disadvantages
are the reason we use the ordinary General Public License for many
libraries.  However, the Lesser license provides advantages in certain
special circumstances.

  For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard.  To achieve this, non-free programs must be
allowed to use the library.  A more frequent case is that a free
library does the same job as widely used non-free libraries.  In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.

  In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software.  For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.

  Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.

  The precise terms and conditions for copying, distribution and
modification follow.  Pay close attention to the difference between a
"work based on the library" and a "work that uses the library".  The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.

      GNU LESSER GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".

  A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.

  The "Library", below, refers to any such software library or work
which has been distributed under these terms.  A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language.  (Hereinafter, translation is
included without limitation in the term "modification".)

  "Source code" for a work means the preferred form of the work for
making modifications to it.  For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.

  Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it).  Whether that is true depends on what the Library does
and what the program that uses the Library does.
  
  1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.

  You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.

  2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) The modified work must itself be a software library.

    b) You must cause the files modified to carry prominent notices
    stating that you changed the files and the date of any change.

    c) You must cause the whole of the work to be licensed at no
    charge to all third parties under the terms of this License.

    d) If a facility in the modified Library refers to a function or a
    table of data to be supplied by an application program that uses
    the facility, other than as an argument passed when the facility
    is invoked, then you must make a good faith effort to ensure that,
    in the event an application does not supply such function or
    table, the facility still operates, and performs whatever part of
    its purpose remains meaningful.

    (For example, a function in a library to compute square roots has
    a purpose that is entirely well-defined independent of the
    application.  Therefore, Subsection 2d requires that any
    application-supplied function or table used by this function must
    be optional: if the application does not supply it, the square
    root function must still compute square roots.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.

In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library.  To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License.  (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.)  Do not make any other change in
these notices.

  Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.

  This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.

  4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.

  If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.

  5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library".  Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.

  However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library".  The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.

  When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library.  The
threshold for this to be true is not precisely defined by law.

  If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work.  (Executables containing this object code plus portions of the
Library will still fall under Section 6.)

  Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.

  6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.

  You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License.  You must supply a copy of this License.  If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License.  Also, you must do one
of these things:

    a) Accompany the work with the complete corresponding
    machine-readable source code for the Library including whatever
    changes were used in the work (which must be distributed under
    Sections 1 and 2 above); and, if the work is an executable linked
    with the Library, with the complete machine-readable "work that
    uses the Library", as object code and/or source code, so that the
    user can modify the Library and then relink to produce a modified
    executable containing the modified Library.  (It is understood
    that the user who changes the contents of definitions files in the
    Library will not necessarily be able to recompile the application
    to use the modified definitions.)

    b) Use a suitable shared library mechanism for linking with the
    Library.  A suitable mechanism is one that (1) uses at run time a
    copy of the library already present on the user's computer system,
    rather than copying library functions into the executable, and (2)
    will operate properly with a modified version of the library, if
    the user installs one, as long as the modified version is
    interface-compatible with the version that the work was made with.

    c) Accompany the work with a written offer, valid for at
    least three years, to give the same user the materials
    specified in Subsection 6a, above, for a charge no more
    than the cost of performing this distribution.

    d) If distribution of the work is made by offering access to copy
    from a designated place, offer equivalent access to copy the above
    specified materials from the same place.

    e) Verify that the user has already received a copy of these
    materials or that you have already sent this user a copy.

  For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it.  However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.

  It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system.  Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.

  7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:

    a) Accompany the combined library with a copy of the same work
    based on the Library, uncombined with any other library
    facilities.  This must be distributed under the terms of the
    Sections above.

    b) Give prominent notice with the combined library of the fact
    that part of it is a work based on the Library, and explaining
    where to find the accompanying uncombined form of the same work.

  8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License.  Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License.  However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.

  9. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Library or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.

  10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.

  11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all.  For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.

If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded.  In such case, this License incorporates the limitation as if
written in the body of this License.

  13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number.  If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation.  If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.

  14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission.  For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this.  Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.

          NO WARRANTY

  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.

         END OF TERMS AND CONDITIONS

           How to Apply These Terms to Your New Libraries

  If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change.  You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).

  To apply these terms, attach the following notices to the library.  It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.

    <one line to give the library's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

Also add information on how to contact you by electronic and paper mail.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the
  library `Frob' (a library for tweaking knobs) written by James Random Hacker.

  <signature of Ty Coon>, 1 April 1990
  Ty Coon, President of Vice

That's all there is to it!


                                                                                                                                                                                       tinymce/plugins/charmap/plugin.js                                                                   0000644                 00000055252 15212564050 0013155 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       (function () {
var charmap = (function () {
    'use strict';

    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');

    var fireInsertCustomChar = function (editor, chr) {
      return editor.fire('insertCustomChar', { chr: chr });
    };
    var Events = { fireInsertCustomChar: fireInsertCustomChar };

    var insertChar = function (editor, chr) {
      var evtChr = Events.fireInsertCustomChar(editor, chr).chr;
      editor.execCommand('mceInsertContent', false, evtChr);
    };
    var Actions = { insertChar: insertChar };

    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');

    var getCharMap = function (editor) {
      return editor.settings.charmap;
    };
    var getCharMapAppend = function (editor) {
      return editor.settings.charmap_append;
    };
    var Settings = {
      getCharMap: getCharMap,
      getCharMapAppend: getCharMapAppend
    };

    var isArray = global$1.isArray;
    var getDefaultCharMap = function () {
      return [
        [
          '160',
          'no-break space'
        ],
        [
          '173',
          'soft hyphen'
        ],
        [
          '34',
          'quotation mark'
        ],
        [
          '162',
          'cent sign'
        ],
        [
          '8364',
          'euro sign'
        ],
        [
          '163',
          'pound sign'
        ],
        [
          '165',
          'yen sign'
        ],
        [
          '169',
          'copyright sign'
        ],
        [
          '174',
          'registered sign'
        ],
        [
          '8482',
          'trade mark sign'
        ],
        [
          '8240',
          'per mille sign'
        ],
        [
          '181',
          'micro sign'
        ],
        [
          '183',
          'middle dot'
        ],
        [
          '8226',
          'bullet'
        ],
        [
          '8230',
          'three dot leader'
        ],
        [
          '8242',
          'minutes / feet'
        ],
        [
          '8243',
          'seconds / inches'
        ],
        [
          '167',
          'section sign'
        ],
        [
          '182',
          'paragraph sign'
        ],
        [
          '223',
          'sharp s / ess-zed'
        ],
        [
          '8249',
          'single left-pointing angle quotation mark'
        ],
        [
          '8250',
          'single right-pointing angle quotation mark'
        ],
        [
          '171',
          'left pointing guillemet'
        ],
        [
          '187',
          'right pointing guillemet'
        ],
        [
          '8216',
          'left single quotation mark'
        ],
        [
          '8217',
          'right single quotation mark'
        ],
        [
          '8220',
          'left double quotation mark'
        ],
        [
          '8221',
          'right double quotation mark'
        ],
        [
          '8218',
          'single low-9 quotation mark'
        ],
        [
          '8222',
          'double low-9 quotation mark'
        ],
        [
          '60',
          'less-than sign'
        ],
        [
          '62',
          'greater-than sign'
        ],
        [
          '8804',
          'less-than or equal to'
        ],
        [
          '8805',
          'greater-than or equal to'
        ],
        [
          '8211',
          'en dash'
        ],
        [
          '8212',
          'em dash'
        ],
        [
          '175',
          'macron'
        ],
        [
          '8254',
          'overline'
        ],
        [
          '164',
          'currency sign'
        ],
        [
          '166',
          'broken bar'
        ],
        [
          '168',
          'diaeresis'
        ],
        [
          '161',
          'inverted exclamation mark'
        ],
        [
          '191',
          'turned question mark'
        ],
        [
          '710',
          'circumflex accent'
        ],
        [
          '732',
          'small tilde'
        ],
        [
          '176',
          'degree sign'
        ],
        [
          '8722',
          'minus sign'
        ],
        [
          '177',
          'plus-minus sign'
        ],
        [
          '247',
          'division sign'
        ],
        [
          '8260',
          'fraction slash'
        ],
        [
          '215',
          'multiplication sign'
        ],
        [
          '185',
          'superscript one'
        ],
        [
          '178',
          'superscript two'
        ],
        [
          '179',
          'superscript three'
        ],
        [
          '188',
          'fraction one quarter'
        ],
        [
          '189',
          'fraction one half'
        ],
        [
          '190',
          'fraction three quarters'
        ],
        [
          '402',
          'function / florin'
        ],
        [
          '8747',
          'integral'
        ],
        [
          '8721',
          'n-ary sumation'
        ],
        [
          '8734',
          'infinity'
        ],
        [
          '8730',
          'square root'
        ],
        [
          '8764',
          'similar to'
        ],
        [
          '8773',
          'approximately equal to'
        ],
        [
          '8776',
          'almost equal to'
        ],
        [
          '8800',
          'not equal to'
        ],
        [
          '8801',
          'identical to'
        ],
        [
          '8712',
          'element of'
        ],
        [
          '8713',
          'not an element of'
        ],
        [
          '8715',
          'contains as member'
        ],
        [
          '8719',
          'n-ary product'
        ],
        [
          '8743',
          'logical and'
        ],
        [
          '8744',
          'logical or'
        ],
        [
          '172',
          'not sign'
        ],
        [
          '8745',
          'intersection'
        ],
        [
          '8746',
          'union'
        ],
        [
          '8706',
          'partial differential'
        ],
        [
          '8704',
          'for all'
        ],
        [
          '8707',
          'there exists'
        ],
        [
          '8709',
          'diameter'
        ],
        [
          '8711',
          'backward difference'
        ],
        [
          '8727',
          'asterisk operator'
        ],
        [
          '8733',
          'proportional to'
        ],
        [
          '8736',
          'angle'
        ],
        [
          '180',
          'acute accent'
        ],
        [
          '184',
          'cedilla'
        ],
        [
          '170',
          'feminine ordinal indicator'
        ],
        [
          '186',
          'masculine ordinal indicator'
        ],
        [
          '8224',
          'dagger'
        ],
        [
          '8225',
          'double dagger'
        ],
        [
          '192',
          'A - grave'
        ],
        [
          '193',
          'A - acute'
        ],
        [
          '194',
          'A - circumflex'
        ],
        [
          '195',
          'A - tilde'
        ],
        [
          '196',
          'A - diaeresis'
        ],
        [
          '197',
          'A - ring above'
        ],
        [
          '256',
          'A - macron'
        ],
        [
          '198',
          'ligature AE'
        ],
        [
          '199',
          'C - cedilla'
        ],
        [
          '200',
          'E - grave'
        ],
        [
          '201',
          'E - acute'
        ],
        [
          '202',
          'E - circumflex'
        ],
        [
          '203',
          'E - diaeresis'
        ],
        [
          '274',
          'E - macron'
        ],
        [
          '204',
          'I - grave'
        ],
        [
          '205',
          'I - acute'
        ],
        [
          '206',
          'I - circumflex'
        ],
        [
          '207',
          'I - diaeresis'
        ],
        [
          '298',
          'I - macron'
        ],
        [
          '208',
          'ETH'
        ],
        [
          '209',
          'N - tilde'
        ],
        [
          '210',
          'O - grave'
        ],
        [
          '211',
          'O - acute'
        ],
        [
          '212',
          'O - circumflex'
        ],
        [
          '213',
          'O - tilde'
        ],
        [
          '214',
          'O - diaeresis'
        ],
        [
          '216',
          'O - slash'
        ],
        [
          '332',
          'O - macron'
        ],
        [
          '338',
          'ligature OE'
        ],
        [
          '352',
          'S - caron'
        ],
        [
          '217',
          'U - grave'
        ],
        [
          '218',
          'U - acute'
        ],
        [
          '219',
          'U - circumflex'
        ],
        [
          '220',
          'U - diaeresis'
        ],
        [
          '362',
          'U - macron'
        ],
        [
          '221',
          'Y - acute'
        ],
        [
          '376',
          'Y - diaeresis'
        ],
        [
          '562',
          'Y - macron'
        ],
        [
          '222',
          'THORN'
        ],
        [
          '224',
          'a - grave'
        ],
        [
          '225',
          'a - acute'
        ],
        [
          '226',
          'a - circumflex'
        ],
        [
          '227',
          'a - tilde'
        ],
        [
          '228',
          'a - diaeresis'
        ],
        [
          '229',
          'a - ring above'
        ],
        [
          '257',
          'a - macron'
        ],
        [
          '230',
          'ligature ae'
        ],
        [
          '231',
          'c - cedilla'
        ],
        [
          '232',
          'e - grave'
        ],
        [
          '233',
          'e - acute'
        ],
        [
          '234',
          'e - circumflex'
        ],
        [
          '235',
          'e - diaeresis'
        ],
        [
          '275',
          'e - macron'
        ],
        [
          '236',
          'i - grave'
        ],
        [
          '237',
          'i - acute'
        ],
        [
          '238',
          'i - circumflex'
        ],
        [
          '239',
          'i - diaeresis'
        ],
        [
          '299',
          'i - macron'
        ],
        [
          '240',
          'eth'
        ],
        [
          '241',
          'n - tilde'
        ],
        [
          '242',
          'o - grave'
        ],
        [
          '243',
          'o - acute'
        ],
        [
          '244',
          'o - circumflex'
        ],
        [
          '245',
          'o - tilde'
        ],
        [
          '246',
          'o - diaeresis'
        ],
        [
          '248',
          'o slash'
        ],
        [
          '333',
          'o macron'
        ],
        [
          '339',
          'ligature oe'
        ],
        [
          '353',
          's - caron'
        ],
        [
          '249',
          'u - grave'
        ],
        [
          '250',
          'u - acute'
        ],
        [
          '251',
          'u - circumflex'
        ],
        [
          '252',
          'u - diaeresis'
        ],
        [
          '363',
          'u - macron'
        ],
        [
          '253',
          'y - acute'
        ],
        [
          '254',
          'thorn'
        ],
        [
          '255',
          'y - diaeresis'
        ],
        [
          '563',
          'y - macron'
        ],
        [
          '913',
          'Alpha'
        ],
        [
          '914',
          'Beta'
        ],
        [
          '915',
          'Gamma'
        ],
        [
          '916',
          'Delta'
        ],
        [
          '917',
          'Epsilon'
        ],
        [
          '918',
          'Zeta'
        ],
        [
          '919',
          'Eta'
        ],
        [
          '920',
          'Theta'
        ],
        [
          '921',
          'Iota'
        ],
        [
          '922',
          'Kappa'
        ],
        [
          '923',
          'Lambda'
        ],
        [
          '924',
          'Mu'
        ],
        [
          '925',
          'Nu'
        ],
        [
          '926',
          'Xi'
        ],
        [
          '927',
          'Omicron'
        ],
        [
          '928',
          'Pi'
        ],
        [
          '929',
          'Rho'
        ],
        [
          '931',
          'Sigma'
        ],
        [
          '932',
          'Tau'
        ],
        [
          '933',
          'Upsilon'
        ],
        [
          '934',
          'Phi'
        ],
        [
          '935',
          'Chi'
        ],
        [
          '936',
          'Psi'
        ],
        [
          '937',
          'Omega'
        ],
        [
          '945',
          'alpha'
        ],
        [
          '946',
          'beta'
        ],
        [
          '947',
          'gamma'
        ],
        [
          '948',
          'delta'
        ],
        [
          '949',
          'epsilon'
        ],
        [
          '950',
          'zeta'
        ],
        [
          '951',
          'eta'
        ],
        [
          '952',
          'theta'
        ],
        [
          '953',
          'iota'
        ],
        [
          '954',
          'kappa'
        ],
        [
          '955',
          'lambda'
        ],
        [
          '956',
          'mu'
        ],
        [
          '957',
          'nu'
        ],
        [
          '958',
          'xi'
        ],
        [
          '959',
          'omicron'
        ],
        [
          '960',
          'pi'
        ],
        [
          '961',
          'rho'
        ],
        [
          '962',
          'final sigma'
        ],
        [
          '963',
          'sigma'
        ],
        [
          '964',
          'tau'
        ],
        [
          '965',
          'upsilon'
        ],
        [
          '966',
          'phi'
        ],
        [
          '967',
          'chi'
        ],
        [
          '968',
          'psi'
        ],
        [
          '969',
          'omega'
        ],
        [
          '8501',
          'alef symbol'
        ],
        [
          '982',
          'pi symbol'
        ],
        [
          '8476',
          'real part symbol'
        ],
        [
          '978',
          'upsilon - hook symbol'
        ],
        [
          '8472',
          'Weierstrass p'
        ],
        [
          '8465',
          'imaginary part'
        ],
        [
          '8592',
          'leftwards arrow'
        ],
        [
          '8593',
          'upwards arrow'
        ],
        [
          '8594',
          'rightwards arrow'
        ],
        [
          '8595',
          'downwards arrow'
        ],
        [
          '8596',
          'left right arrow'
        ],
        [
          '8629',
          'carriage return'
        ],
        [
          '8656',
          'leftwards double arrow'
        ],
        [
          '8657',
          'upwards double arrow'
        ],
        [
          '8658',
          'rightwards double arrow'
        ],
        [
          '8659',
          'downwards double arrow'
        ],
        [
          '8660',
          'left right double arrow'
        ],
        [
          '8756',
          'therefore'
        ],
        [
          '8834',
          'subset of'
        ],
        [
          '8835',
          'superset of'
        ],
        [
          '8836',
          'not a subset of'
        ],
        [
          '8838',
          'subset of or equal to'
        ],
        [
          '8839',
          'superset of or equal to'
        ],
        [
          '8853',
          'circled plus'
        ],
        [
          '8855',
          'circled times'
        ],
        [
          '8869',
          'perpendicular'
        ],
        [
          '8901',
          'dot operator'
        ],
        [
          '8968',
          'left ceiling'
        ],
        [
          '8969',
          'right ceiling'
        ],
        [
          '8970',
          'left floor'
        ],
        [
          '8971',
          'right floor'
        ],
        [
          '9001',
          'left-pointing angle bracket'
        ],
        [
          '9002',
          'right-pointing angle bracket'
        ],
        [
          '9674',
          'lozenge'
        ],
        [
          '9824',
          'black spade suit'
        ],
        [
          '9827',
          'black club suit'
        ],
        [
          '9829',
          'black heart suit'
        ],
        [
          '9830',
          'black diamond suit'
        ],
        [
          '8194',
          'en space'
        ],
        [
          '8195',
          'em space'
        ],
        [
          '8201',
          'thin space'
        ],
        [
          '8204',
          'zero width non-joiner'
        ],
        [
          '8205',
          'zero width joiner'
        ],
        [
          '8206',
          'left-to-right mark'
        ],
        [
          '8207',
          'right-to-left mark'
        ]
      ];
    };
    var charmapFilter = function (charmap) {
      return global$1.grep(charmap, function (item) {
        return isArray(item) && item.length === 2;
      });
    };
    var getCharsFromSetting = function (settingValue) {
      if (isArray(settingValue)) {
        return [].concat(charmapFilter(settingValue));
      }
      if (typeof settingValue === 'function') {
        return settingValue();
      }
      return [];
    };
    var extendCharMap = function (editor, charmap) {
      var userCharMap = Settings.getCharMap(editor);
      if (userCharMap) {
        charmap = getCharsFromSetting(userCharMap);
      }
      var userCharMapAppend = Settings.getCharMapAppend(editor);
      if (userCharMapAppend) {
        return [].concat(charmap).concat(getCharsFromSetting(userCharMapAppend));
      }
      return charmap;
    };
    var getCharMap$1 = function (editor) {
      return extendCharMap(editor, getDefaultCharMap());
    };
    var CharMap = { getCharMap: getCharMap$1 };

    var get = function (editor) {
      var getCharMap = function () {
        return CharMap.getCharMap(editor);
      };
      var insertChar = function (chr) {
        Actions.insertChar(editor, chr);
      };
      return {
        getCharMap: getCharMap,
        insertChar: insertChar
      };
    };
    var Api = { get: get };

    var getHtml = function (charmap) {
      var gridHtml, x, y;
      var width = Math.min(charmap.length, 25);
      var height = Math.ceil(charmap.length / width);
      gridHtml = '<table role="presentation" cellspacing="0" class="mce-charmap"><tbody>';
      for (y = 0; y < height; y++) {
        gridHtml += '<tr>';
        for (x = 0; x < width; x++) {
          var index = y * width + x;
          if (index < charmap.length) {
            var chr = charmap[index];
            var charCode = parseInt(chr[0], 10);
            var chrText = chr ? String.fromCharCode(charCode) : '&nbsp;';
            gridHtml += '<td title="' + chr[1] + '">' + '<div tabindex="-1" title="' + chr[1] + '" role="button" data-chr="' + charCode + '">' + chrText + '</div>' + '</td>';
          } else {
            gridHtml += '<td />';
          }
        }
        gridHtml += '</tr>';
      }
      gridHtml += '</tbody></table>';
      return gridHtml;
    };
    var GridHtml = { getHtml: getHtml };

    var getParentTd = function (elm) {
      while (elm) {
        if (elm.nodeName === 'TD') {
          return elm;
        }
        elm = elm.parentNode;
      }
    };
    var open = function (editor) {
      var win;
      var charMapPanel = {
        type: 'container',
        html: GridHtml.getHtml(CharMap.getCharMap(editor)),
        onclick: function (e) {
          var target = e.target;
          if (/^(TD|DIV)$/.test(target.nodeName)) {
            var charDiv = getParentTd(target).firstChild;
            if (charDiv && charDiv.hasAttribute('data-chr')) {
              var charCodeString = charDiv.getAttribute('data-chr');
              var charCode = parseInt(charCodeString, 10);
              if (!isNaN(charCode)) {
                Actions.insertChar(editor, String.fromCharCode(charCode));
              }
              if (!e.ctrlKey) {
                win.close();
              }
            }
          }
        },
        onmouseover: function (e) {
          var td = getParentTd(e.target);
          if (td && td.firstChild) {
            win.find('#preview').text(td.firstChild.firstChild.data);
            win.find('#previewTitle').text(td.title);
          } else {
            win.find('#preview').text(' ');
            win.find('#previewTitle').text(' ');
          }
        }
      };
      win = editor.windowManager.open({
        title: 'Special character',
        spacing: 10,
        padding: 10,
        items: [
          charMapPanel,
          {
            type: 'container',
            layout: 'flex',
            direction: 'column',
            align: 'center',
            spacing: 5,
            minWidth: 160,
            minHeight: 160,
            items: [
              {
                type: 'label',
                name: 'preview',
                text: ' ',
                style: 'font-size: 40px; text-align: center',
                border: 1,
                minWidth: 140,
                minHeight: 80
              },
              {
                type: 'spacer',
                minHeight: 20
              },
              {
                type: 'label',
                name: 'previewTitle',
                text: ' ',
                style: 'white-space: pre-wrap;',
                border: 1,
                minWidth: 140
              }
            ]
          }
        ],
        buttons: [{
            text: 'Close',
            onclick: function () {
              win.close();
            }
          }]
      });
    };
    var Dialog = { open: open };

    var register = function (editor) {
      editor.addCommand('mceShowCharmap', function () {
        Dialog.open(editor);
      });
    };
    var Commands = { register: register };

    var register$1 = function (editor) {
      editor.addButton('charmap', {
        icon: 'charmap',
        tooltip: 'Special character',
        cmd: 'mceShowCharmap'
      });
      editor.addMenuItem('charmap', {
        icon: 'charmap',
        text: 'Special character',
        cmd: 'mceShowCharmap',
        context: 'insert'
      });
    };
    var Buttons = { register: register$1 };

    global.add('charmap', function (editor) {
      Commands.register(editor);
      Buttons.register(editor);
      return Api.get(editor);
    });
    function Plugin () {
    }

    return Plugin;

}());
})();
                                                                                                                                                                                                                                                                                                                                                      tinymce/plugins/charmap/plugin.min.js                                                               0000644                 00000020631 15212564050 0013730 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(e,t){return e.fire("insertCustomChar",{chr:t})},l=function(e,t){var a=i(e,t).chr;e.execCommand("mceInsertContent",!1,a)},a=tinymce.util.Tools.resolve("tinymce.util.Tools"),r=function(e){return e.settings.charmap},n=function(e){return e.settings.charmap_append},o=a.isArray,c=function(e){return o(e)?[].concat((t=e,a.grep(t,function(e){return o(e)&&2===e.length}))):"function"==typeof e?e():[];var t},s=function(e){return function(e,t){var a=r(e);a&&(t=c(a));var i=n(e);return i?[].concat(t).concat(c(i)):t}(e,[["160","no-break space"],["173","soft hyphen"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["256","A - macron"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["274","E - macron"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["298","I - macron"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["332","O - macron"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["362","U - macron"],["221","Y - acute"],["376","Y - diaeresis"],["562","Y - macron"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["257","a - macron"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["275","e - macron"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["299","i - macron"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["333","o macron"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["363","u - macron"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["563","y - macron"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"]])},t=function(t){return{getCharMap:function(){return s(t)},insertChar:function(e){l(t,e)}}},u=function(e){var t,a,i,r=Math.min(e.length,25),n=Math.ceil(e.length/r);for(t='<table role="presentation" cellspacing="0" class="mce-charmap"><tbody>',i=0;i<n;i++){for(t+="<tr>",a=0;a<r;a++){var o=i*r+a;if(o<e.length){var l=e[o],c=parseInt(l[0],10),s=l?String.fromCharCode(c):"&nbsp;";t+='<td title="'+l[1]+'"><div tabindex="-1" title="'+l[1]+'" role="button" data-chr="'+c+'">'+s+"</div></td>"}else t+="<td />"}t+="</tr>"}return t+="</tbody></table>"},d=function(e){for(;e;){if("TD"===e.nodeName)return e;e=e.parentNode}},m=function(n){var o,e={type:"container",html:u(s(n)),onclick:function(e){var t=e.target;if(/^(TD|DIV)$/.test(t.nodeName)){var a=d(t).firstChild;if(a&&a.hasAttribute("data-chr")){var i=a.getAttribute("data-chr"),r=parseInt(i,10);isNaN(r)||l(n,String.fromCharCode(r)),e.ctrlKey||o.close()}}},onmouseover:function(e){var t=d(e.target);t&&t.firstChild?(o.find("#preview").text(t.firstChild.firstChild.data),o.find("#previewTitle").text(t.title)):(o.find("#preview").text(" "),o.find("#previewTitle").text(" "))}};o=n.windowManager.open({title:"Special character",spacing:10,padding:10,items:[e,{type:"container",layout:"flex",direction:"column",align:"center",spacing:5,minWidth:160,minHeight:160,items:[{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:140,minHeight:80},{type:"spacer",minHeight:20},{type:"label",name:"previewTitle",text:" ",style:"white-space: pre-wrap;",border:1,minWidth:140}]}],buttons:[{text:"Close",onclick:function(){o.close()}}]})},g=function(e){e.addCommand("mceShowCharmap",function(){m(e)})},p=function(e){e.addButton("charmap",{icon:"charmap",tooltip:"Special character",cmd:"mceShowCharmap"}),e.addMenuItem("charmap",{icon:"charmap",text:"Special character",cmd:"mceShowCharmap",context:"insert"})};e.add("charmap",function(e){return g(e),p(e),t(e)})}();                                                                                                       tinymce/plugins/colorpicker/plugin.js                                                               0000644                 00000006751 15212564050 0014056 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       (function () {
var colorpicker = (function () {
    'use strict';

    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');

    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Color');

    var showPreview = function (win, hexColor) {
      win.find('#preview')[0].getEl().style.background = hexColor;
    };
    var setColor = function (win, value) {
      var color = global$1(value), rgb = color.toRgb();
      win.fromJSON({
        r: rgb.r,
        g: rgb.g,
        b: rgb.b,
        hex: color.toHex().substr(1)
      });
      showPreview(win, color.toHex());
    };
    var open = function (editor, callback, value) {
      var win = editor.windowManager.open({
        title: 'Color',
        items: {
          type: 'container',
          layout: 'flex',
          direction: 'row',
          align: 'stretch',
          padding: 5,
          spacing: 10,
          items: [
            {
              type: 'colorpicker',
              value: value,
              onchange: function () {
                var rgb = this.rgb();
                if (win) {
                  win.find('#r').value(rgb.r);
                  win.find('#g').value(rgb.g);
                  win.find('#b').value(rgb.b);
                  win.find('#hex').value(this.value().substr(1));
                  showPreview(win, this.value());
                }
              }
            },
            {
              type: 'form',
              padding: 0,
              labelGap: 5,
              defaults: {
                type: 'textbox',
                size: 7,
                value: '0',
                flex: 1,
                spellcheck: false,
                onchange: function () {
                  var colorPickerCtrl = win.find('colorpicker')[0];
                  var name, value;
                  name = this.name();
                  value = this.value();
                  if (name === 'hex') {
                    value = '#' + value;
                    setColor(win, value);
                    colorPickerCtrl.value(value);
                    return;
                  }
                  value = {
                    r: win.find('#r').value(),
                    g: win.find('#g').value(),
                    b: win.find('#b').value()
                  };
                  colorPickerCtrl.value(value);
                  setColor(win, value);
                }
              },
              items: [
                {
                  name: 'r',
                  label: 'R',
                  autofocus: 1
                },
                {
                  name: 'g',
                  label: 'G'
                },
                {
                  name: 'b',
                  label: 'B'
                },
                {
                  name: 'hex',
                  label: '#',
                  value: '000000'
                },
                {
                  name: 'preview',
                  type: 'container',
                  border: 1
                }
              ]
            }
          ]
        },
        onSubmit: function () {
          callback('#' + win.toJSON().hex);
        }
      });
      setColor(win, value);
    };
    var Dialog = { open: open };

    global.add('colorpicker', function (editor) {
      if (!editor.settings.color_picker_callback) {
        editor.settings.color_picker_callback = function (callback, value) {
          Dialog.open(editor, callback, value);
        };
      }
    });
    function Plugin () {
    }

    return Plugin;

}());
})();
                       tinymce/plugins/colorpicker/plugin.min.js                                                           0000644                 00000002505 15212564050 0014631 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.util.Color"),a=function(e,n){e.find("#preview")[0].getEl().style.background=n},o=function(e,n){var i=l(n),t=i.toRgb();e.fromJSON({r:t.r,g:t.g,b:t.b,hex:i.toHex().substr(1)}),a(e,i.toHex())},t=function(e,n,i){var t=e.windowManager.open({title:"Color",items:{type:"container",layout:"flex",direction:"row",align:"stretch",padding:5,spacing:10,items:[{type:"colorpicker",value:i,onchange:function(){var e=this.rgb();t&&(t.find("#r").value(e.r),t.find("#g").value(e.g),t.find("#b").value(e.b),t.find("#hex").value(this.value().substr(1)),a(t,this.value()))}},{type:"form",padding:0,labelGap:5,defaults:{type:"textbox",size:7,value:"0",flex:1,spellcheck:!1,onchange:function(){var e,n,i=t.find("colorpicker")[0];if(e=this.name(),n=this.value(),"hex"===e)return o(t,n="#"+n),void i.value(n);n={r:t.find("#r").value(),g:t.find("#g").value(),b:t.find("#b").value()},i.value(n),o(t,n)}},items:[{name:"r",label:"R",autofocus:1},{name:"g",label:"G"},{name:"b",label:"B"},{name:"hex",label:"#",value:"000000"},{name:"preview",type:"container",border:1}]}]},onSubmit:function(){n("#"+t.toJSON().hex)}});o(t,i)};e.add("colorpicker",function(i){i.settings.color_picker_callback||(i.settings.color_picker_callback=function(e,n){t(i,e,n)})})}();                                                                                                                                                                                           tinymce/plugins/compat3x/css/dialog.css                                                             0000644                 00000017763 15212564050 0014212 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*
 * Edited for compatibility with old TinyMCE 3.x plugins in WordPress.
 * More info: https://core.trac.wordpress.org/ticket/31596#comment:10
 */

/* Generic */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
font-size:13px;
background:#fcfcfc;
padding:0;
margin:8px 8px 0 8px;
}

textarea {resize:none;outline:none;}

a:link, a:hover {
	color: #2B6FB6;
}

a:visited {
	color: #3C2BB6;
}

.nowrap {white-space: nowrap}

/* Forms */
form {margin: 0;}
fieldset {margin:0; padding:4px; border:1px solid #dfdfdf; font-family:Verdana, Arial; font-size:10px;}
legend {color:#2B6FB6; font-weight:bold;}
label.msg {display:none;}
label.invalid {color:#EE0000; display:inline;}
input.invalid {border:1px solid #EE0000;}
input {background:#FFF; border:1px solid #dfdfdf;}
input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
input, select, textarea {border:1px solid #dfdfdf;}
input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
.input_noborder {border:0;}

/* Buttons */
#insert,
#cancel,
#apply,
.mceActionPanel .button,
input.mceButton,
.updateButton {
	display: inline-block;
	text-decoration: none;
	border: 1px solid #adadad;
	margin: 0;
	padding: 0 10px 1px;
	font-size: 13px;
	height: 24px;
	line-height: 22px;
	color: #333;
	cursor: pointer;
	-webkit-border-radius: 3px;
	-webkit-appearance: none;
	border-radius: 3px;
	white-space: nowrap;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	background: #fafafa;
	background-image: -webkit-gradient(linear, left top, left bottom, from(#fafafa), to(#e9e9e9));
	background-image: -webkit-linear-gradient(top, #fafafa, #e9e9e9);
	background-image: -moz-linear-gradient(top, #fafafa, #e9e9e9);
	background-image: -o-linear-gradient(top, #fafafa, #e9e9e9);
	background-image: linear-gradient(to bottom, #fafafa, #e9e9e9);

	text-shadow: 0 1px 0 #fff;
	-webkit-box-shadow: inset 0 1px 0 #fff;
	-moz-box-shadow: inset 0 1px 0 #fff;
	box-shadow: inset 0 1px 0 #fff;
}

#insert {
	background: #2ea2cc;
	background: -webkit-gradient(linear, left top, left bottom, from(#2ea2cc), to(#1e8cbe));
	background: -webkit-linear-gradient(top, #2ea2cc 0%,#1e8cbe 100%);
	background: linear-gradient(top, #2ea2cc 0%,#1e8cbe 100%);
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2ea2cc', endColorstr='#1e8cbe',GradientType=0 );
	border-color: #0074a2;
	-webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
	box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
	color: #fff;
	text-decoration: none;
	text-shadow: 0 1px 0 rgba(0,86,132,0.7);
}

#cancel:hover,
input.mceButton:hover,
.updateButton:hover,
#cancel:focus,
input.mceButton:focus,
.updateButton:focus {
	background: #f3f3f3;
	background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f3f3f3));
	background-image: -webkit-linear-gradient(top, #fff, #f3f3f3);
	background-image: -moz-linear-gradient(top, #fff, #f3f3f3);
	background-image: -ms-linear-gradient(top, #fff, #f3f3f3);
	background-image: -o-linear-gradient(top, #fff, #f3f3f3);
	background-image: linear-gradient(to bottom, #fff, #f3f3f3);
	border-color: #999;
	color: #222;
}

#insert:hover,
#insert:focus {
	background: #1e8cbe;
	background: -webkit-gradient(linear, left top, left bottom, from(#1e8cbe), to(#0074a2));
	background: -webkit-linear-gradient(top, #1e8cbe 0%,#0074a2 100%);
	background: linear-gradient(top, #1e8cbe 0%,#0074a2 100%);
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1e8cbe', endColorstr='#0074a2',GradientType=0 );
	border-color: #0074a2;
	-webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
	box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
	color: #fff;
}

.mceActionPanel #insert {
	float: right;
}

/* Browse */
a.pickcolor, a.browse {text-decoration:none}
a.browse span {display:block; width:20px; height:18px; border:1px solid #FFF; margin-left:1px;}
.mceOldBoxModel a.browse span {width:22px; height:20px;}
a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30);}
a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
a.pickcolor span {display:block; width:20px; height:16px; margin-left:2px;}
.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
a.pickcolor:hover span {background-color:#B2BBD0;}
div.iframecontainer {background: #fff;}

/* Charmap */
table.charmap {border:1px solid #AAA; text-align:center}
td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
#charmap a {display:block; color:#000; text-decoration:none; border:0}
#charmap a:hover {background:#CCC;color:#2B6FB6}
#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
#charmap #charmapView {background-color:#fff;}

/* Source */
.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
.mceActionPanel {margin-top:5px;}

/* Tabs classes */
.tabs {width:100%; height:19px; line-height:normal; border-bottom: 1px solid #aaa;}
.tabs ul {margin:0; padding:0; list-style:none;}
.tabs li {float:left; border: 1px solid #aaa; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
.tabs li.current {border-bottom: 1px solid #fff; margin-right:2px;}
.tabs span {float:left; display:block; padding:0px 10px 0 0;}
.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}

.wp-core-ui #tabs {
	padding-bottom: 5px;
	background-color: transparent;
}

.wp-core-ui #tabs a {
	padding: 6px 10px;
	margin: 0 2px;
}

/* Panels */
.panel_wrapper div.panel {display:none;}
.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}

/* Columns */
.column {float:left;}
.properties {width:100%;}
.properties .column1 {}
.properties .column2 {text-align:left;}

/* Titles */
h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
h3 {font-size:14px;}
.title {font-size:12px; font-weight:bold; color:#2B6FB6;}

/* Dialog specific */
#link .panel_wrapper, #link div.current {height:125px;}
#image .panel_wrapper, #image div.current {height:200px;}
#plugintable thead {font-weight:bold; background:#DDD;}
#plugintable, #about #plugintable td {border:1px solid #919B9C;}
#plugintable {width:96%; margin-top:10px;}
#pluginscontainer {height:290px; overflow:auto;}
#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px}
#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline}
#colorpicker #preview_wrapper {text-align:center; padding-top:4px; white-space: nowrap; float: right;}
#colorpicker #insert, #colorpicker #cancel {width: 90px}
#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
#colorpicker #light div {overflow:hidden;}
#colorpicker .panel_wrapper div.current {height:175px;}
#colorpicker #namedcolors {width:150px;}
#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
#colorpicker #colornamecontainer {margin-top:5px;}
#colorpicker #picker_panel fieldset {margin:auto;width:325px;}


/* Localization */

body[dir="rtl"],
body[dir="rtl"] fieldset,
body[dir="rtl"] input, body[dir="rtl"] select, body[dir="rtl"]  textarea,
body[dir="rtl"]  #charmap #codeN,
body[dir="rtl"] .tabs a {
	font-family: Tahoma, sans-serif;
}
             tinymce/plugins/compat3x/plugin.js                                                                  0000644                 00000022352 15212564050 0013273 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * plugin.js
 *
 * Released under LGPL License.
 * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
 *
 * License: http://www.tinymce.com/license
 * Contributing: http://www.tinymce.com/contributing
 */

/*global tinymce:true, console:true */
/*eslint no-console:0, new-cap:0 */

/**
 * This plugin adds missing events form the 4.x API back. Not every event is
 * properly supported but most things should work.
 *
 * Unsupported things:
 *  - No editor.onEvent
 *  - Can't cancel execCommands with beforeExecCommand
 */
(function (tinymce) {
  var reported;

  function noop() {
  }

  function log(apiCall) {
    if (!reported && window && window.console) {
      reported = true;
      console.log("Deprecated TinyMCE API call: " + apiCall);
    }
  }

  function Dispatcher(target, newEventName, argsMap, defaultScope) {
    target = target || this;
    var cbs = [];

    if (!newEventName) {
      this.add = this.addToTop = this.remove = this.dispatch = noop;
      return;
    }

    this.add = function (callback, scope, prepend) {
      log('<target>.on' + newEventName + ".add(..)");

      // Convert callback({arg1:x, arg2:x}) -> callback(arg1, arg2)
      function patchedEventCallback(e) {
        var callbackArgs = [];

        if (typeof argsMap == "string") {
          argsMap = argsMap.split(" ");
        }

        if (argsMap && typeof argsMap !== "function") {
          for (var i = 0; i < argsMap.length; i++) {
            callbackArgs.push(e[argsMap[i]]);
          }
        }

        if (typeof argsMap == "function") {
          callbackArgs = argsMap(newEventName, e, target);
          if (!callbackArgs) {
            return;
          }
        }

        if (!argsMap) {
          callbackArgs = [e];
        }

        callbackArgs.unshift(defaultScope || target);

        if (callback.apply(scope || defaultScope || target, callbackArgs) === false) {
          e.stopImmediatePropagation();
        }
      }

      target.on(newEventName, patchedEventCallback, prepend);

      var handlers = {
        original: callback,
        patched: patchedEventCallback
      };

      cbs.push(handlers);
      return patchedEventCallback;
    };

    this.addToTop = function (callback, scope) {
      this.add(callback, scope, true);
    };

    this.remove = function (callback) {
      cbs.forEach(function (item, i) {
        if (item.original === callback) {
          cbs.splice(i, 1);
          return target.off(newEventName, item.patched);
        }
      });

      return target.off(newEventName, callback);
    };

    this.dispatch = function () {
      target.fire(newEventName);
      return true;
    };
  }

  tinymce.util.Dispatcher = Dispatcher;
  tinymce.onBeforeUnload = new Dispatcher(tinymce, "BeforeUnload");
  tinymce.onAddEditor = new Dispatcher(tinymce, "AddEditor", "editor");
  tinymce.onRemoveEditor = new Dispatcher(tinymce, "RemoveEditor", "editor");

  tinymce.util.Cookie = {
    get: noop, getHash: noop, remove: noop, set: noop, setHash: noop
  };

  function patchEditor(editor) {

    function translate(str) {
      var prefix = editor.settings.language || "en";
      var prefixedStr = [prefix, str].join('.');
      var translatedStr = tinymce.i18n.translate(prefixedStr);

      return prefixedStr !== translatedStr ? translatedStr : tinymce.i18n.translate(str);
    }

    function patchEditorEvents(oldEventNames, argsMap) {
      tinymce.each(oldEventNames.split(" "), function (oldName) {
        editor["on" + oldName] = new Dispatcher(editor, oldName, argsMap);
      });
    }

    function convertUndoEventArgs(type, event, target) {
      return [
        event.level,
        target
      ];
    }

    function filterSelectionEvents(needsSelection) {
      return function (type, e) {
        if ((!e.selection && !needsSelection) || e.selection == needsSelection) {
          return [e];
        }
      };
    }

    if (editor.controlManager) {
      return;
    }

    function cmNoop() {
      var obj = {}, methods = 'add addMenu addSeparator collapse createMenu destroy displayColor expand focus ' +
        'getLength hasMenus hideMenu isActive isCollapsed isDisabled isRendered isSelected mark ' +
        'postRender remove removeAll renderHTML renderMenu renderNode renderTo select selectByIndex ' +
        'setActive setAriaProperty setColor setDisabled setSelected setState showMenu update';

      log('editor.controlManager.*');

      function _noop() {
        return cmNoop();
      }

      tinymce.each(methods.split(' '), function (method) {
        obj[method] = _noop;
      });

      return obj;
    }

    editor.controlManager = {
      buttons: {},

      setDisabled: function (name, state) {
        log("controlManager.setDisabled(..)");

        if (this.buttons[name]) {
          this.buttons[name].disabled(state);
        }
      },

      setActive: function (name, state) {
        log("controlManager.setActive(..)");

        if (this.buttons[name]) {
          this.buttons[name].active(state);
        }
      },

      onAdd: new Dispatcher(),
      onPostRender: new Dispatcher(),

      add: function (obj) {
        return obj;
      },
      createButton: cmNoop,
      createColorSplitButton: cmNoop,
      createControl: cmNoop,
      createDropMenu: cmNoop,
      createListBox: cmNoop,
      createMenuButton: cmNoop,
      createSeparator: cmNoop,
      createSplitButton: cmNoop,
      createToolbar: cmNoop,
      createToolbarGroup: cmNoop,
      destroy: noop,
      get: noop,
      setControlType: cmNoop
    };

    patchEditorEvents("PreInit BeforeRenderUI PostRender Load Init Remove Activate Deactivate", "editor");
    patchEditorEvents("Click MouseUp MouseDown DblClick KeyDown KeyUp KeyPress ContextMenu Paste Submit Reset");
    patchEditorEvents("BeforeExecCommand ExecCommand", "command ui value args"); // args.terminate not supported
    patchEditorEvents("PreProcess PostProcess LoadContent SaveContent Change");
    patchEditorEvents("BeforeSetContent BeforeGetContent SetContent GetContent", filterSelectionEvents(false));
    patchEditorEvents("SetProgressState", "state time");
    patchEditorEvents("VisualAid", "element hasVisual");
    patchEditorEvents("Undo Redo", convertUndoEventArgs);

    patchEditorEvents("NodeChange", function (type, e) {
      return [
        editor.controlManager,
        e.element,
        editor.selection.isCollapsed(),
        e
      ];
    });

    var originalAddButton = editor.addButton;
    editor.addButton = function (name, settings) {
      var originalOnPostRender;

      function patchedPostRender() {
        editor.controlManager.buttons[name] = this;

        if (originalOnPostRender) {
          return originalOnPostRender.apply(this, arguments);
        }
      }

      for (var key in settings) {
        if (key.toLowerCase() === "onpostrender") {
          originalOnPostRender = settings[key];
          settings.onPostRender = patchedPostRender;
        }
      }

      if (!originalOnPostRender) {
        settings.onPostRender = patchedPostRender;
      }

      if (settings.title) {
        settings.title = translate(settings.title);
      }

      return originalAddButton.call(this, name, settings);
    };

    editor.on('init', function () {
      var undoManager = editor.undoManager, selection = editor.selection;

      undoManager.onUndo = new Dispatcher(editor, "Undo", convertUndoEventArgs, null, undoManager);
      undoManager.onRedo = new Dispatcher(editor, "Redo", convertUndoEventArgs, null, undoManager);
      undoManager.onBeforeAdd = new Dispatcher(editor, "BeforeAddUndo", null, undoManager);
      undoManager.onAdd = new Dispatcher(editor, "AddUndo", null, undoManager);

      selection.onBeforeGetContent = new Dispatcher(editor, "BeforeGetContent", filterSelectionEvents(true), selection);
      selection.onGetContent = new Dispatcher(editor, "GetContent", filterSelectionEvents(true), selection);
      selection.onBeforeSetContent = new Dispatcher(editor, "BeforeSetContent", filterSelectionEvents(true), selection);
      selection.onSetContent = new Dispatcher(editor, "SetContent", filterSelectionEvents(true), selection);
    });

    editor.on('BeforeRenderUI', function () {
      var windowManager = editor.windowManager;

      windowManager.onOpen = new Dispatcher();
      windowManager.onClose = new Dispatcher();
      windowManager.createInstance = function (className, a, b, c, d, e) {
        log("windowManager.createInstance(..)");

        var constr = tinymce.resolve(className);
        return new constr(a, b, c, d, e);
      };
    });
  }

  tinymce.on('SetupEditor', function (e) {
    patchEditor(e.editor);
  });

  tinymce.PluginManager.add("compat3x", patchEditor);

  tinymce.addI18n = function (prefix, o) {
    var I18n = tinymce.util.I18n, each = tinymce.each;

    if (typeof prefix == "string" && prefix.indexOf('.') === -1) {
      I18n.add(prefix, o);
      return;
    }

    if (!tinymce.is(prefix, 'string')) {
      each(prefix, function (o, lc) {
        each(o, function (o, g) {
          each(o, function (o, k) {
            if (g === 'common') {
              I18n.data[lc + '.' + k] = o;
            } else {
              I18n.data[lc + '.' + g + '.' + k] = o;
            }
          });
        });
      });
    } else {
      each(o, function (o, k) {
        I18n.data[prefix + '.' + k] = o;
      });
    }
  };
})(tinymce);
                                                                                                                                                                                                                                                                                      tinymce/plugins/compat3x/plugin.min.js                                                              0000644                 00000010041 15212564050 0014045 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(u){var t;function l(){}function f(e){!t&&window&&window.console&&(t=!0,console.log("Deprecated TinyMCE API call: "+e))}function i(i,a,d,s){i=i||this;var c=[];a?(this.add=function(o,r,e){function t(e){var t=[];if("string"==typeof d&&(d=d.split(" ")),d&&"function"!=typeof d)for(var n=0;n<d.length;n++)t.push(e[d[n]]);("function"!=typeof d||(t=d(a,e,i)))&&(d||(t=[e]),t.unshift(s||i),!1===o.apply(r||s||i,t)&&e.stopImmediatePropagation())}f("<target>.on"+a+".add(..)"),i.on(a,t,e);var n={original:o,patched:t};return c.push(n),t},this.addToTop=function(e,t){this.add(e,t,!0)},this.remove=function(n){return c.forEach(function(e,t){if(e.original===n)return c.splice(t,1),i.off(a,e.patched)}),i.off(a,n)},this.dispatch=function(){return i.fire(a),!0}):this.add=this.addToTop=this.remove=this.dispatch=l}function n(s){function e(e,t){u.each(e.split(" "),function(e){s["on"+e]=new i(s,e,t)})}function n(e,t,n){return[t.level,n]}function o(n){return function(e,t){if(!t.selection&&!n||t.selection==n)return[t]}}if(!s.controlManager){s.controlManager={buttons:{},setDisabled:function(e,t){f("controlManager.setDisabled(..)"),this.buttons[e]&&this.buttons[e].disabled(t)},setActive:function(e,t){f("controlManager.setActive(..)"),this.buttons[e]&&this.buttons[e].active(t)},onAdd:new i,onPostRender:new i,add:function(e){return e},createButton:r,createColorSplitButton:r,createControl:r,createDropMenu:r,createListBox:r,createMenuButton:r,createSeparator:r,createSplitButton:r,createToolbar:r,createToolbarGroup:r,destroy:l,get:l,setControlType:r},e("PreInit BeforeRenderUI PostRender Load Init Remove Activate Deactivate","editor"),e("Click MouseUp MouseDown DblClick KeyDown KeyUp KeyPress ContextMenu Paste Submit Reset"),e("BeforeExecCommand ExecCommand","command ui value args"),e("PreProcess PostProcess LoadContent SaveContent Change"),e("BeforeSetContent BeforeGetContent SetContent GetContent",o(!1)),e("SetProgressState","state time"),e("VisualAid","element hasVisual"),e("Undo Redo",n),e("NodeChange",function(e,t){return[s.controlManager,t.element,s.selection.isCollapsed(),t]});var c=s.addButton;s.addButton=function(e,t){var n,o,r,i;function a(){if(s.controlManager.buttons[e]=this,n)return n.apply(this,arguments)}for(var d in t)"onpostrender"===d.toLowerCase()&&(n=t[d],t.onPostRender=a);return n||(t.onPostRender=a),t.title&&(t.title=(o=t.title,r=[s.settings.language||"en",o].join("."),i=u.i18n.translate(r),r!==i?i:u.i18n.translate(o))),c.call(this,e,t)},s.on("init",function(){var e=s.undoManager,t=s.selection;e.onUndo=new i(s,"Undo",n,null,e),e.onRedo=new i(s,"Redo",n,null,e),e.onBeforeAdd=new i(s,"BeforeAddUndo",null,e),e.onAdd=new i(s,"AddUndo",null,e),t.onBeforeGetContent=new i(s,"BeforeGetContent",o(!0),t),t.onGetContent=new i(s,"GetContent",o(!0),t),t.onBeforeSetContent=new i(s,"BeforeSetContent",o(!0),t),t.onSetContent=new i(s,"SetContent",o(!0),t)}),s.on("BeforeRenderUI",function(){var e=s.windowManager;e.onOpen=new i,e.onClose=new i,e.createInstance=function(e,t,n,o,r,i){return f("windowManager.createInstance(..)"),new(u.resolve(e))(t,n,o,r,i)}})}function r(){var t={};function n(){return r()}return f("editor.controlManager.*"),u.each("add addMenu addSeparator collapse createMenu destroy displayColor expand focus getLength hasMenus hideMenu isActive isCollapsed isDisabled isRendered isSelected mark postRender remove removeAll renderHTML renderMenu renderNode renderTo select selectByIndex setActive setAriaProperty setColor setDisabled setSelected setState showMenu update".split(" "),function(e){t[e]=n}),t}}u.util.Dispatcher=i,u.onBeforeUnload=new i(u,"BeforeUnload"),u.onAddEditor=new i(u,"AddEditor","editor"),u.onRemoveEditor=new i(u,"RemoveEditor","editor"),u.util.Cookie={get:l,getHash:l,remove:l,set:l,setHash:l},u.on("SetupEditor",function(e){n(e.editor)}),u.PluginManager.add("compat3x",n),u.addI18n=function(n,e){var r=u.util.I18n,t=u.each;"string"!=typeof n||-1!==n.indexOf(".")?u.is(n,"string")?t(e,function(e,t){r.data[n+"."+t]=e}):t(n,function(e,o){t(e,function(e,n){t(e,function(e,t){"common"===n?r.data[o+"."+t]=e:r.data[o+"."+n+"."+t]=e})})}):r.add(n,e)}}(tinymce);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               tinymce/plugins/directionality/plugin.js                                                            0000644                 00000003544 15212564050 0014562 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       (function () {
var directionality = (function () {
    'use strict';

    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');

    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');

    var setDir = function (editor, dir) {
      var dom = editor.dom;
      var curDir;
      var blocks = editor.selection.getSelectedBlocks();
      if (blocks.length) {
        curDir = dom.getAttrib(blocks[0], 'dir');
        global$1.each(blocks, function (block) {
          if (!dom.getParent(block.parentNode, '*[dir="' + dir + '"]', dom.getRoot())) {
            dom.setAttrib(block, 'dir', curDir !== dir ? dir : null);
          }
        });
        editor.nodeChanged();
      }
    };
    var Direction = { setDir: setDir };

    var register = function (editor) {
      editor.addCommand('mceDirectionLTR', function () {
        Direction.setDir(editor, 'ltr');
      });
      editor.addCommand('mceDirectionRTL', function () {
        Direction.setDir(editor, 'rtl');
      });
    };
    var Commands = { register: register };

    var generateSelector = function (dir) {
      var selector = [];
      global$1.each('h1 h2 h3 h4 h5 h6 div p'.split(' '), function (name) {
        selector.push(name + '[dir=' + dir + ']');
      });
      return selector.join(',');
    };
    var register$1 = function (editor) {
      editor.addButton('ltr', {
        title: 'Left to right',
        cmd: 'mceDirectionLTR',
        stateSelector: generateSelector('ltr')
      });
      editor.addButton('rtl', {
        title: 'Right to left',
        cmd: 'mceDirectionRTL',
        stateSelector: generateSelector('rtl')
      });
    };
    var Buttons = { register: register$1 };

    global.add('directionality', function (editor) {
      Commands.register(editor);
      Buttons.register(editor);
    });
    function Plugin () {
    }

    return Plugin;

}());
})();
                                                                                                                                                            tinymce/plugins/directionality/plugin.min.js                                                        0000644                 00000001531 15212564050 0015336 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),e=function(t,e){var i,n=t.dom,o=t.selection.getSelectedBlocks();o.length&&(i=n.getAttrib(o[0],"dir"),c.each(o,function(t){n.getParent(t.parentNode,'*[dir="'+e+'"]',n.getRoot())||n.setAttrib(t,"dir",i!==e?e:null)}),t.nodeChanged())},i=function(t){t.addCommand("mceDirectionLTR",function(){e(t,"ltr")}),t.addCommand("mceDirectionRTL",function(){e(t,"rtl")})},n=function(e){var i=[];return c.each("h1 h2 h3 h4 h5 h6 div p".split(" "),function(t){i.push(t+"[dir="+e+"]")}),i.join(",")},o=function(t){t.addButton("ltr",{title:"Left to right",cmd:"mceDirectionLTR",stateSelector:n("ltr")}),t.addButton("rtl",{title:"Right to left",cmd:"mceDirectionRTL",stateSelector:n("rtl")})};t.add("directionality",function(t){i(t),o(t)})}();                                                                                                                                                                       tinymce/plugins/fullscreen/plugin.js                                                                0000644                 00000012733 15212564050 0013701 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       (function () {
var fullscreen = (function (domGlobals) {
    'use strict';

    var Cell = function (initial) {
      var value = initial;
      var get = function () {
        return value;
      };
      var set = function (v) {
        value = v;
      };
      var clone = function () {
        return Cell(get());
      };
      return {
        get: get,
        set: set,
        clone: clone
      };
    };

    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');

    var get = function (fullscreenState) {
      return {
        isFullscreen: function () {
          return fullscreenState.get() !== null;
        }
      };
    };
    var Api = { get: get };

    var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');

    var fireFullscreenStateChanged = function (editor, state) {
      editor.fire('FullscreenStateChanged', { state: state });
    };
    var Events = { fireFullscreenStateChanged: fireFullscreenStateChanged };

    var DOM = global$1.DOM;
    var getWindowSize = function () {
      var w;
      var h;
      var win = domGlobals.window;
      var doc = domGlobals.document;
      var body = doc.body;
      if (body.offsetWidth) {
        w = body.offsetWidth;
        h = body.offsetHeight;
      }
      if (win.innerWidth && win.innerHeight) {
        w = win.innerWidth;
        h = win.innerHeight;
      }
      return {
        w: w,
        h: h
      };
    };
    var getScrollPos = function () {
      var vp = DOM.getViewPort();
      return {
        x: vp.x,
        y: vp.y
      };
    };
    var setScrollPos = function (pos) {
      domGlobals.window.scrollTo(pos.x, pos.y);
    };
    var toggleFullscreen = function (editor, fullscreenState) {
      var body = domGlobals.document.body;
      var documentElement = domGlobals.document.documentElement;
      var editorContainerStyle;
      var editorContainer, iframe, iframeStyle;
      var fullscreenInfo = fullscreenState.get();
      var resize = function () {
        DOM.setStyle(iframe, 'height', getWindowSize().h - (editorContainer.clientHeight - iframe.clientHeight));
      };
      var removeResize = function () {
        DOM.unbind(domGlobals.window, 'resize', resize);
      };
      editorContainer = editor.getContainer();
      editorContainerStyle = editorContainer.style;
      iframe = editor.getContentAreaContainer().firstChild;
      iframeStyle = iframe.style;
      if (!fullscreenInfo) {
        var newFullScreenInfo = {
          scrollPos: getScrollPos(),
          containerWidth: editorContainerStyle.width,
          containerHeight: editorContainerStyle.height,
          iframeWidth: iframeStyle.width,
          iframeHeight: iframeStyle.height,
          resizeHandler: resize,
          removeHandler: removeResize
        };
        iframeStyle.width = iframeStyle.height = '100%';
        editorContainerStyle.width = editorContainerStyle.height = '';
        DOM.addClass(body, 'mce-fullscreen');
        DOM.addClass(documentElement, 'mce-fullscreen');
        DOM.addClass(editorContainer, 'mce-fullscreen');
        DOM.bind(domGlobals.window, 'resize', resize);
        editor.on('remove', removeResize);
        resize();
        fullscreenState.set(newFullScreenInfo);
        Events.fireFullscreenStateChanged(editor, true);
      } else {
        iframeStyle.width = fullscreenInfo.iframeWidth;
        iframeStyle.height = fullscreenInfo.iframeHeight;
        if (fullscreenInfo.containerWidth) {
          editorContainerStyle.width = fullscreenInfo.containerWidth;
        }
        if (fullscreenInfo.containerHeight) {
          editorContainerStyle.height = fullscreenInfo.containerHeight;
        }
        DOM.removeClass(body, 'mce-fullscreen');
        DOM.removeClass(documentElement, 'mce-fullscreen');
        DOM.removeClass(editorContainer, 'mce-fullscreen');
        setScrollPos(fullscreenInfo.scrollPos);
        DOM.unbind(domGlobals.window, 'resize', fullscreenInfo.resizeHandler);
        editor.off('remove', fullscreenInfo.removeHandler);
        fullscreenState.set(null);
        Events.fireFullscreenStateChanged(editor, false);
      }
    };
    var Actions = { toggleFullscreen: toggleFullscreen };

    var register = function (editor, fullscreenState) {
      editor.addCommand('mceFullScreen', function () {
        Actions.toggleFullscreen(editor, fullscreenState);
      });
    };
    var Commands = { register: register };

    var postRender = function (editor) {
      return function (e) {
        var ctrl = e.control;
        editor.on('FullscreenStateChanged', function (e) {
          ctrl.active(e.state);
        });
      };
    };
    var register$1 = function (editor) {
      editor.addMenuItem('fullscreen', {
        text: 'Fullscreen',
        shortcut: 'Ctrl+Shift+F',
        selectable: true,
        cmd: 'mceFullScreen',
        onPostRender: postRender(editor),
        context: 'view'
      });
      editor.addButton('fullscreen', {
        active: false,
        tooltip: 'Fullscreen',
        cmd: 'mceFullScreen',
        onPostRender: postRender(editor)
      });
    };
    var Buttons = { register: register$1 };

    global.add('fullscreen', function (editor) {
      var fullscreenState = Cell(null);
      if (editor.settings.inline) {
        return Api.get(fullscreenState);
      }
      Commands.register(editor, fullscreenState);
      Buttons.register(editor);
      editor.addShortcut('Ctrl+Shift+F', '', 'mceFullScreen');
      return Api.get(fullscreenState);
    });
    function Plugin () {
    }

    return Plugin;

}(window));
})();
                                     tinymce/plugins/fullscreen/plugin.min.js                                                            0000644                 00000004210 15212564050 0014452 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(m){"use strict";var i=function(e){var n=e,t=function(){return n};return{get:t,set:function(e){n=e},clone:function(){return i(t())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e){return{isFullscreen:function(){return null!==e.get()}}},n=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),g=function(e,n){e.fire("FullscreenStateChanged",{state:n})},w=n.DOM,r=function(e,n){var t,r,l,i,o,c,s=m.document.body,u=m.document.documentElement,d=n.get(),a=function(){var e,n,t,i;w.setStyle(l,"height",(t=m.window,i=m.document.body,i.offsetWidth&&(e=i.offsetWidth,n=i.offsetHeight),t.innerWidth&&t.innerHeight&&(e=t.innerWidth,n=t.innerHeight),{w:e,h:n}).h-(r.clientHeight-l.clientHeight))},h=function(){w.unbind(m.window,"resize",a)};if(t=(r=e.getContainer()).style,i=(l=e.getContentAreaContainer().firstChild).style,d)i.width=d.iframeWidth,i.height=d.iframeHeight,d.containerWidth&&(t.width=d.containerWidth),d.containerHeight&&(t.height=d.containerHeight),w.removeClass(s,"mce-fullscreen"),w.removeClass(u,"mce-fullscreen"),w.removeClass(r,"mce-fullscreen"),o=d.scrollPos,m.window.scrollTo(o.x,o.y),w.unbind(m.window,"resize",d.resizeHandler),e.off("remove",d.removeHandler),n.set(null),g(e,!1);else{var f={scrollPos:(c=w.getViewPort(),{x:c.x,y:c.y}),containerWidth:t.width,containerHeight:t.height,iframeWidth:i.width,iframeHeight:i.height,resizeHandler:a,removeHandler:h};i.width=i.height="100%",t.width=t.height="",w.addClass(s,"mce-fullscreen"),w.addClass(u,"mce-fullscreen"),w.addClass(r,"mce-fullscreen"),w.bind(m.window,"resize",a),e.on("remove",h),a(),n.set(f),g(e,!0)}},l=function(e,n){e.addCommand("mceFullScreen",function(){r(e,n)})},o=function(t){return function(e){var n=e.control;t.on("FullscreenStateChanged",function(e){n.active(e.state)})}},c=function(e){e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,cmd:"mceFullScreen",onPostRender:o(e),context:"view"}),e.addButton("fullscreen",{active:!1,tooltip:"Fullscreen",cmd:"mceFullScreen",onPostRender:o(e)})};e.add("fullscreen",function(e){var n=i(null);return e.settings.inline||(l(e,n),c(e),e.addShortcut("Ctrl+Shift+F","","mceFullScreen")),t(n)})}(window);                                                                                                                                                                                                                                                                                                                                                                                        tinymce/plugins/hr/plugin.js                                                                        0000644                 00000001627 15212564050 0012150 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       (function () {
var hr = (function () {
    'use strict';

    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');

    var register = function (editor) {
      editor.addCommand('InsertHorizontalRule', function () {
        editor.execCommand('mceInsertContent', false, '<hr />');
      });
    };
    var Commands = { register: register };

    var register$1 = function (editor) {
      editor.addButton('hr', {
        icon: 'hr',
        tooltip: 'Horizontal line',
        cmd: 'InsertHorizontalRule'
      });
      editor.addMenuItem('hr', {
        icon: 'hr',
        text: 'Horizontal line',
        cmd: 'InsertHorizontalRule',
        context: 'insert'
      });
    };
    var Buttons = { register: register$1 };

    global.add('hr', function (editor) {
      Commands.register(editor);
      Buttons.register(editor);
    });
    function Plugin () {
    }

    return Plugin;

}());
})();
                                                                                                         tinymce/plugins/hr/plugin.min.js                                                                    0000644                 00000000654 15212564050 0012731 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(n){n.addCommand("InsertHorizontalRule",function(){n.execCommand("mceInsertContent",!1,"<hr />")})},o=function(n){n.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),n.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})};n.add("hr",function(n){t(n),o(n)})}();                                                                                    tinymce/plugins/image/plugin.js                                                                     0000644                 00000116126 15212564050 0012622 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       (function () {
var image = (function (domGlobals) {
    'use strict';

    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');

    var hasDimensions = function (editor) {
      return editor.settings.image_dimensions === false ? false : true;
    };
    var hasAdvTab = function (editor) {
      return editor.settings.image_advtab === true ? true : false;
    };
    var getPrependUrl = function (editor) {
      return editor.getParam('image_prepend_url', '');
    };
    var getClassList = function (editor) {
      return editor.getParam('image_class_list');
    };
    var hasDescription = function (editor) {
      return editor.settings.image_description === false ? false : true;
    };
    var hasImageTitle = function (editor) {
      return editor.settings.image_title === true ? true : false;
    };
    var hasImageCaption = function (editor) {
      return editor.settings.image_caption === true ? true : false;
    };
    var getImageList = function (editor) {
      return editor.getParam('image_list', false);
    };
    var hasUploadUrl = function (editor) {
      return editor.getParam('images_upload_url', false);
    };
    var hasUploadHandler = function (editor) {
      return editor.getParam('images_upload_handler', false);
    };
    var getUploadUrl = function (editor) {
      return editor.getParam('images_upload_url');
    };
    var getUploadHandler = function (editor) {
      return editor.getParam('images_upload_handler');
    };
    var getUploadBasePath = function (editor) {
      return editor.getParam('images_upload_base_path');
    };
    var getUploadCredentials = function (editor) {
      return editor.getParam('images_upload_credentials');
    };
    var Settings = {
      hasDimensions: hasDimensions,
      hasAdvTab: hasAdvTab,
      getPrependUrl: getPrependUrl,
      getClassList: getClassList,
      hasDescription: hasDescription,
      hasImageTitle: hasImageTitle,
      hasImageCaption: hasImageCaption,
      getImageList: getImageList,
      hasUploadUrl: hasUploadUrl,
      hasUploadHandler: hasUploadHandler,
      getUploadUrl: getUploadUrl,
      getUploadHandler: getUploadHandler,
      getUploadBasePath: getUploadBasePath,
      getUploadCredentials: getUploadCredentials
    };

    var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();

    var path = function (parts, scope) {
      var o = scope !== undefined && scope !== null ? scope : Global;
      for (var i = 0; i < parts.length && o !== undefined && o !== null; ++i) {
        o = o[parts[i]];
      }
      return o;
    };
    var resolve = function (p, scope) {
      var parts = p.split('.');
      return path(parts, scope);
    };

    var unsafe = function (name, scope) {
      return resolve(name, scope);
    };
    var getOrDie = function (name, scope) {
      var actual = unsafe(name, scope);
      if (actual === undefined || actual === null) {
        throw new Error(name + ' not available on this browser');
      }
      return actual;
    };
    var Global$1 = { getOrDie: getOrDie };

    function FileReader () {
      var f = Global$1.getOrDie('FileReader');
      return new f();
    }

    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Promise');

    var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');

    var global$3 = tinymce.util.Tools.resolve('tinymce.util.XHR');

    var parseIntAndGetMax = function (val1, val2) {
      return Math.max(parseInt(val1, 10), parseInt(val2, 10));
    };
    var getImageSize = function (url, callback) {
      var img = domGlobals.document.createElement('img');
      function done(width, height) {
        if (img.parentNode) {
          img.parentNode.removeChild(img);
        }
        callback({
          width: width,
          height: height
        });
      }
      img.onload = function () {
        var width = parseIntAndGetMax(img.width, img.clientWidth);
        var height = parseIntAndGetMax(img.height, img.clientHeight);
        done(width, height);
      };
      img.onerror = function () {
        done(0, 0);
      };
      var style = img.style;
      style.visibility = 'hidden';
      style.position = 'fixed';
      style.bottom = style.left = '0px';
      style.width = style.height = 'auto';
      domGlobals.document.body.appendChild(img);
      img.src = url;
    };
    var buildListItems = function (inputList, itemCallback, startItems) {
      function appendItems(values, output) {
        output = output || [];
        global$2.each(values, function (item) {
          var menuItem = { text: item.text || item.title };
          if (item.menu) {
            menuItem.menu = appendItems(item.menu);
          } else {
            menuItem.value = item.value;
            itemCallback(menuItem);
          }
          output.push(menuItem);
        });
        return output;
      }
      return appendItems(inputList, startItems || []);
    };
    var removePixelSuffix = function (value) {
      if (value) {
        value = value.replace(/px$/, '');
      }
      return value;
    };
    var addPixelSuffix = function (value) {
      if (value.length > 0 && /^[0-9]+$/.test(value)) {
        value += 'px';
      }
      return value;
    };
    var mergeMargins = function (css) {
      if (css.margin) {
        var splitMargin = css.margin.split(' ');
        switch (splitMargin.length) {
        case 1:
          css['margin-top'] = css['margin-top'] || splitMargin[0];
          css['margin-right'] = css['margin-right'] || splitMargin[0];
          css['margin-bottom'] = css['margin-bottom'] || splitMargin[0];
          css['margin-left'] = css['margin-left'] || splitMargin[0];
          break;
        case 2:
          css['margin-top'] = css['margin-top'] || splitMargin[0];
          css['margin-right'] = css['margin-right'] || splitMargin[1];
          css['margin-bottom'] = css['margin-bottom'] || splitMargin[0];
          css['margin-left'] = css['margin-left'] || splitMargin[1];
          break;
        case 3:
          css['margin-top'] = css['margin-top'] || splitMargin[0];
          css['margin-right'] = css['margin-right'] || splitMargin[1];
          css['margin-bottom'] = css['margin-bottom'] || splitMargin[2];
          css['margin-left'] = css['margin-left'] || splitMargin[1];
          break;
        case 4:
          css['margin-top'] = css['margin-top'] || splitMargin[0];
          css['margin-right'] = css['margin-right'] || splitMargin[1];
          css['margin-bottom'] = css['margin-bottom'] || splitMargin[2];
          css['margin-left'] = css['margin-left'] || splitMargin[3];
        }
        delete css.margin;
      }
      return css;
    };
    var createImageList = function (editor, callback) {
      var imageList = Settings.getImageList(editor);
      if (typeof imageList === 'string') {
        global$3.send({
          url: imageList,
          success: function (text) {
            callback(JSON.parse(text));
          }
        });
      } else if (typeof imageList === 'function') {
        imageList(callback);
      } else {
        callback(imageList);
      }
    };
    var waitLoadImage = function (editor, data, imgElm) {
      function selectImage() {
        imgElm.onload = imgElm.onerror = null;
        if (editor.selection) {
          editor.selection.select(imgElm);
          editor.nodeChanged();
        }
      }
      imgElm.onload = function () {
        if (!data.width && !data.height && Settings.hasDimensions(editor)) {
          editor.dom.setAttribs(imgElm, {
            width: imgElm.clientWidth,
            height: imgElm.clientHeight
          });
        }
        selectImage();
      };
      imgElm.onerror = selectImage;
    };
    var blobToDataUri = function (blob) {
      return new global$1(function (resolve, reject) {
        var reader = FileReader();
        reader.onload = function () {
          resolve(reader.result);
        };
        reader.onerror = function () {
          reject(reader.error.message);
        };
        reader.readAsDataURL(blob);
      });
    };
    var Utils = {
      getImageSize: getImageSize,
      buildListItems: buildListItems,
      removePixelSuffix: removePixelSuffix,
      addPixelSuffix: addPixelSuffix,
      mergeMargins: mergeMargins,
      createImageList: createImageList,
      waitLoadImage: waitLoadImage,
      blobToDataUri: blobToDataUri
    };

    var global$4 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');

    var hasOwnProperty = Object.prototype.hasOwnProperty;
    var shallow = function (old, nu) {
      return nu;
    };
    var baseMerge = function (merger) {
      return function () {
        var objects = new Array(arguments.length);
        for (var i = 0; i < objects.length; i++) {
          objects[i] = arguments[i];
        }
        if (objects.length === 0) {
          throw new Error('Can\'t merge zero objects');
        }
        var ret = {};
        for (var j = 0; j < objects.length; j++) {
          var curObject = objects[j];
          for (var key in curObject) {
            if (hasOwnProperty.call(curObject, key)) {
              ret[key] = merger(ret[key], curObject[key]);
            }
          }
        }
        return ret;
      };
    };
    var merge = baseMerge(shallow);

    var DOM = global$4.DOM;
    var getHspace = function (image) {
      if (image.style.marginLeft && image.style.marginRight && image.style.marginLeft === image.style.marginRight) {
        return Utils.removePixelSuffix(image.style.marginLeft);
      } else {
        return '';
      }
    };
    var getVspace = function (image) {
      if (image.style.marginTop && image.style.marginBottom && image.style.marginTop === image.style.marginBottom) {
        return Utils.removePixelSuffix(image.style.marginTop);
      } else {
        return '';
      }
    };
    var getBorder = function (image) {
      if (image.style.borderWidth) {
        return Utils.removePixelSuffix(image.style.borderWidth);
      } else {
        return '';
      }
    };
    var getAttrib = function (image, name) {
      if (image.hasAttribute(name)) {
        return image.getAttribute(name);
      } else {
        return '';
      }
    };
    var getStyle = function (image, name) {
      return image.style[name] ? image.style[name] : '';
    };
    var hasCaption = function (image) {
      return image.parentNode !== null && image.parentNode.nodeName === 'FIGURE';
    };
    var setAttrib = function (image, name, value) {
      image.setAttribute(name, value);
    };
    var wrapInFigure = function (image) {
      var figureElm = DOM.create('figure', { class: 'image' });
      DOM.insertAfter(figureElm, image);
      figureElm.appendChild(image);
      figureElm.appendChild(DOM.create('figcaption', { contentEditable: true }, 'Caption'));
      figureElm.contentEditable = 'false';
    };
    var removeFigure = function (image) {
      var figureElm = image.parentNode;
      DOM.insertAfter(image, figureElm);
      DOM.remove(figureElm);
    };
    var toggleCaption = function (image) {
      if (hasCaption(image)) {
        removeFigure(image);
      } else {
        wrapInFigure(image);
      }
    };
    var normalizeStyle = function (image, normalizeCss) {
      var attrValue = image.getAttribute('style');
      var value = normalizeCss(attrValue !== null ? attrValue : '');
      if (value.length > 0) {
        image.setAttribute('style', value);
        image.setAttribute('data-mce-style', value);
      } else {
        image.removeAttribute('style');
      }
    };
    var setSize = function (name, normalizeCss) {
      return function (image, name, value) {
        if (image.style[name]) {
          image.style[name] = Utils.addPixelSuffix(value);
          normalizeStyle(image, normalizeCss);
        } else {
          setAttrib(image, name, value);
        }
      };
    };
    var getSize = function (image, name) {
      if (image.style[name]) {
        return Utils.removePixelSuffix(image.style[name]);
      } else {
        return getAttrib(image, name);
      }
    };
    var setHspace = function (image, value) {
      var pxValue = Utils.addPixelSuffix(value);
      image.style.marginLeft = pxValue;
      image.style.marginRight = pxValue;
    };
    var setVspace = function (image, value) {
      var pxValue = Utils.addPixelSuffix(value);
      image.style.marginTop = pxValue;
      image.style.marginBottom = pxValue;
    };
    var setBorder = function (image, value) {
      var pxValue = Utils.addPixelSuffix(value);
      image.style.borderWidth = pxValue;
    };
    var setBorderStyle = function (image, value) {
      image.style.borderStyle = value;
    };
    var getBorderStyle = function (image) {
      return getStyle(image, 'borderStyle');
    };
    var isFigure = function (elm) {
      return elm.nodeName === 'FIGURE';
    };
    var defaultData = function () {
      return {
        src: '',
        alt: '',
        title: '',
        width: '',
        height: '',
        class: '',
        style: '',
        caption: false,
        hspace: '',
        vspace: '',
        border: '',
        borderStyle: ''
      };
    };
    var getStyleValue = function (normalizeCss, data) {
      var image = domGlobals.document.createElement('img');
      setAttrib(image, 'style', data.style);
      if (getHspace(image) || data.hspace !== '') {
        setHspace(image, data.hspace);
      }
      if (getVspace(image) || data.vspace !== '') {
        setVspace(image, data.vspace);
      }
      if (getBorder(image) || data.border !== '') {
        setBorder(image, data.border);
      }
      if (getBorderStyle(image) || data.borderStyle !== '') {
        setBorderStyle(image, data.borderStyle);
      }
      return normalizeCss(image.getAttribute('style'));
    };
    var create = function (normalizeCss, data) {
      var image = domGlobals.document.createElement('img');
      write(normalizeCss, merge(data, { caption: false }), image);
      setAttrib(image, 'alt', data.alt);
      if (data.caption) {
        var figure = DOM.create('figure', { class: 'image' });
        figure.appendChild(image);
        figure.appendChild(DOM.create('figcaption', { contentEditable: true }, 'Caption'));
        figure.contentEditable = 'false';
        return figure;
      } else {
        return image;
      }
    };
    var read = function (normalizeCss, image) {
      return {
        src: getAttrib(image, 'src'),
        alt: getAttrib(image, 'alt'),
        title: getAttrib(image, 'title'),
        width: getSize(image, 'width'),
        height: getSize(image, 'height'),
        class: getAttrib(image, 'class'),
        style: normalizeCss(getAttrib(image, 'style')),
        caption: hasCaption(image),
        hspace: getHspace(image),
        vspace: getVspace(image),
        border: getBorder(image),
        borderStyle: getStyle(image, 'borderStyle')
      };
    };
    var updateProp = function (image, oldData, newData, name, set) {
      if (newData[name] !== oldData[name]) {
        set(image, name, newData[name]);
      }
    };
    var normalized = function (set, normalizeCss) {
      return function (image, name, value) {
        set(image, value);
        normalizeStyle(image, normalizeCss);
      };
    };
    var write = function (normalizeCss, newData, image) {
      var oldData = read(normalizeCss, image);
      updateProp(image, oldData, newData, 'caption', function (image, _name, _value) {
        return toggleCaption(image);
      });
      updateProp(image, oldData, newData, 'src', setAttrib);
      updateProp(image, oldData, newData, 'alt', setAttrib);
      updateProp(image, oldData, newData, 'title', setAttrib);
      updateProp(image, oldData, newData, 'width', setSize('width', normalizeCss));
      updateProp(image, oldData, newData, 'height', setSize('height', normalizeCss));
      updateProp(image, oldData, newData, 'class', setAttrib);
      updateProp(image, oldData, newData, 'style', normalized(function (image, value) {
        return setAttrib(image, 'style', value);
      }, normalizeCss));
      updateProp(image, oldData, newData, 'hspace', normalized(setHspace, normalizeCss));
      updateProp(image, oldData, newData, 'vspace', normalized(setVspace, normalizeCss));
      updateProp(image, oldData, newData, 'border', normalized(setBorder, normalizeCss));
      updateProp(image, oldData, newData, 'borderStyle', normalized(setBorderStyle, normalizeCss));
    };

    var normalizeCss = function (editor, cssText) {
      var css = editor.dom.styles.parse(cssText);
      var mergedCss = Utils.mergeMargins(css);
      var compressed = editor.dom.styles.parse(editor.dom.styles.serialize(mergedCss));
      return editor.dom.styles.serialize(compressed);
    };
    var getSelectedImage = function (editor) {
      var imgElm = editor.selection.getNode();
      var figureElm = editor.dom.getParent(imgElm, 'figure.image');
      if (figureElm) {
        return editor.dom.select('img', figureElm)[0];
      }
      if (imgElm && (imgElm.nodeName !== 'IMG' || imgElm.getAttribute('data-mce-object') || imgElm.getAttribute('data-mce-placeholder'))) {
        return null;
      }
      return imgElm;
    };
    var splitTextBlock = function (editor, figure) {
      var dom = editor.dom;
      var textBlock = dom.getParent(figure.parentNode, function (node) {
        return editor.schema.getTextBlockElements()[node.nodeName];
      }, editor.getBody());
      if (textBlock) {
        return dom.split(textBlock, figure);
      } else {
        return figure;
      }
    };
    var readImageDataFromSelection = function (editor) {
      var image = getSelectedImage(editor);
      return image ? read(function (css) {
        return normalizeCss(editor, css);
      }, image) : defaultData();
    };
    var insertImageAtCaret = function (editor, data) {
      var elm = create(function (css) {
        return normalizeCss(editor, css);
      }, data);
      editor.dom.setAttrib(elm, 'data-mce-id', '__mcenew');
      editor.focus();
      editor.selection.setContent(elm.outerHTML);
      var insertedElm = editor.dom.select('*[data-mce-id="__mcenew"]')[0];
      editor.dom.setAttrib(insertedElm, 'data-mce-id', null);
      if (isFigure(insertedElm)) {
        var figure = splitTextBlock(editor, insertedElm);
        editor.selection.select(figure);
      } else {
        editor.selection.select(insertedElm);
      }
    };
    var syncSrcAttr = function (editor, image) {
      editor.dom.setAttrib(image, 'src', image.getAttribute('src'));
    };
    var deleteImage = function (editor, image) {
      if (image) {
        var elm = editor.dom.is(image.parentNode, 'figure.image') ? image.parentNode : image;
        editor.dom.remove(elm);
        editor.focus();
        editor.nodeChanged();
        if (editor.dom.isEmpty(editor.getBody())) {
          editor.setContent('');
          editor.selection.setCursorLocation();
        }
      }
    };
    var writeImageDataToSelection = function (editor, data) {
      var image = getSelectedImage(editor);
      write(function (css) {
        return normalizeCss(editor, css);
      }, data, image);
      syncSrcAttr(editor, image);
      if (isFigure(image.parentNode)) {
        var figure = image.parentNode;
        splitTextBlock(editor, figure);
        editor.selection.select(image.parentNode);
      } else {
        editor.selection.select(image);
        Utils.waitLoadImage(editor, data, image);
      }
    };
    var insertOrUpdateImage = function (editor, data) {
      var image = getSelectedImage(editor);
      if (image) {
        if (data.src) {
          writeImageDataToSelection(editor, data);
        } else {
          deleteImage(editor, image);
        }
      } else if (data.src) {
        insertImageAtCaret(editor, data);
      }
    };

    var updateVSpaceHSpaceBorder = function (editor) {
      return function (evt) {
        var dom = editor.dom;
        var rootControl = evt.control.rootControl;
        if (!Settings.hasAdvTab(editor)) {
          return;
        }
        var data = rootControl.toJSON();
        var css = dom.parseStyle(data.style);
        rootControl.find('#vspace').value('');
        rootControl.find('#hspace').value('');
        css = Utils.mergeMargins(css);
        if (css['margin-top'] && css['margin-bottom'] || css['margin-right'] && css['margin-left']) {
          if (css['margin-top'] === css['margin-bottom']) {
            rootControl.find('#vspace').value(Utils.removePixelSuffix(css['margin-top']));
          } else {
            rootControl.find('#vspace').value('');
          }
          if (css['margin-right'] === css['margin-left']) {
            rootControl.find('#hspace').value(Utils.removePixelSuffix(css['margin-right']));
          } else {
            rootControl.find('#hspace').value('');
          }
        }
        if (css['border-width']) {
          rootControl.find('#border').value(Utils.removePixelSuffix(css['border-width']));
        } else {
          rootControl.find('#border').value('');
        }
        if (css['border-style']) {
          rootControl.find('#borderStyle').value(css['border-style']);
        } else {
          rootControl.find('#borderStyle').value('');
        }
        rootControl.find('#style').value(dom.serializeStyle(dom.parseStyle(dom.serializeStyle(css))));
      };
    };
    var updateStyle = function (editor, win) {
      win.find('#style').each(function (ctrl) {
        var value = getStyleValue(function (css) {
          return normalizeCss(editor, css);
        }, merge(defaultData(), win.toJSON()));
        ctrl.value(value);
      });
    };
    var makeTab = function (editor) {
      return {
        title: 'Advanced',
        type: 'form',
        pack: 'start',
        items: [
          {
            label: 'Style',
            name: 'style',
            type: 'textbox',
            onchange: updateVSpaceHSpaceBorder(editor)
          },
          {
            type: 'form',
            layout: 'grid',
            packV: 'start',
            columns: 2,
            padding: 0,
            defaults: {
              type: 'textbox',
              maxWidth: 50,
              onchange: function (evt) {
                updateStyle(editor, evt.control.rootControl);
              }
            },
            items: [
              {
                label: 'Vertical space',
                name: 'vspace'
              },
              {
                label: 'Border width',
                name: 'border'
              },
              {
                label: 'Horizontal space',
                name: 'hspace'
              },
              {
                label: 'Border style',
                type: 'listbox',
                name: 'borderStyle',
                width: 90,
                maxWidth: 90,
                onselect: function (evt) {
                  updateStyle(editor, evt.control.rootControl);
                },
                values: [
                  {
                    text: 'Select...',
                    value: ''
                  },
                  {
                    text: 'Solid',
                    value: 'solid'
                  },
                  {
                    text: 'Dotted',
                    value: 'dotted'
                  },
                  {
                    text: 'Dashed',
                    value: 'dashed'
                  },
                  {
                    text: 'Double',
                    value: 'double'
                  },
                  {
                    text: 'Groove',
                    value: 'groove'
                  },
                  {
                    text: 'Ridge',
                    value: 'ridge'
                  },
                  {
                    text: 'Inset',
                    value: 'inset'
                  },
                  {
                    text: 'Outset',
                    value: 'outset'
                  },
                  {
                    text: 'None',
                    value: 'none'
                  },
                  {
                    text: 'Hidden',
                    value: 'hidden'
                  }
                ]
              }
            ]
          }
        ]
      };
    };
    var AdvTab = { makeTab: makeTab };

    var doSyncSize = function (widthCtrl, heightCtrl) {
      widthCtrl.state.set('oldVal', widthCtrl.value());
      heightCtrl.state.set('oldVal', heightCtrl.value());
    };
    var doSizeControls = function (win, f) {
      var widthCtrl = win.find('#width')[0];
      var heightCtrl = win.find('#height')[0];
      var constrained = win.find('#constrain')[0];
      if (widthCtrl && heightCtrl && constrained) {
        f(widthCtrl, heightCtrl, constrained.checked());
      }
    };
    var doUpdateSize = function (widthCtrl, heightCtrl, isContrained) {
      var oldWidth = widthCtrl.state.get('oldVal');
      var oldHeight = heightCtrl.state.get('oldVal');
      var newWidth = widthCtrl.value();
      var newHeight = heightCtrl.value();
      if (isContrained && oldWidth && oldHeight && newWidth && newHeight) {
        if (newWidth !== oldWidth) {
          newHeight = Math.round(newWidth / oldWidth * newHeight);
          if (!isNaN(newHeight)) {
            heightCtrl.value(newHeight);
          }
        } else {
          newWidth = Math.round(newHeight / oldHeight * newWidth);
          if (!isNaN(newWidth)) {
            widthCtrl.value(newWidth);
          }
        }
      }
      doSyncSize(widthCtrl, heightCtrl);
    };
    var syncSize = function (win) {
      doSizeControls(win, doSyncSize);
    };
    var updateSize = function (win) {
      doSizeControls(win, doUpdateSize);
    };
    var createUi = function () {
      var recalcSize = function (evt) {
        updateSize(evt.control.rootControl);
      };
      return {
        type: 'container',
        label: 'Dimensions',
        layout: 'flex',
        align: 'center',
        spacing: 5,
        items: [
          {
            name: 'width',
            type: 'textbox',
            maxLength: 5,
            size: 5,
            onchange: recalcSize,
            ariaLabel: 'Width'
          },
          {
            type: 'label',
            text: 'x'
          },
          {
            name: 'height',
            type: 'textbox',
            maxLength: 5,
            size: 5,
            onchange: recalcSize,
            ariaLabel: 'Height'
          },
          {
            name: 'constrain',
            type: 'checkbox',
            checked: true,
            text: 'Constrain proportions'
          }
        ]
      };
    };
    var SizeManager = {
      createUi: createUi,
      syncSize: syncSize,
      updateSize: updateSize
    };

    var onSrcChange = function (evt, editor) {
      var srcURL, prependURL, absoluteURLPattern;
      var meta = evt.meta || {};
      var control = evt.control;
      var rootControl = control.rootControl;
      var imageListCtrl = rootControl.find('#image-list')[0];
      if (imageListCtrl) {
        imageListCtrl.value(editor.convertURL(control.value(), 'src'));
      }
      global$2.each(meta, function (value, key) {
        rootControl.find('#' + key).value(value);
      });
      if (!meta.width && !meta.height) {
        srcURL = editor.convertURL(control.value(), 'src');
        prependURL = Settings.getPrependUrl(editor);
        absoluteURLPattern = new RegExp('^(?:[a-z]+:)?//', 'i');
        if (prependURL && !absoluteURLPattern.test(srcURL) && srcURL.substring(0, prependURL.length) !== prependURL) {
          srcURL = prependURL + srcURL;
        }
        control.value(srcURL);
        Utils.getImageSize(editor.documentBaseURI.toAbsolute(control.value()), function (data) {
          if (data.width && data.height && Settings.hasDimensions(editor)) {
            rootControl.find('#width').value(data.width);
            rootControl.find('#height').value(data.height);
            SizeManager.syncSize(rootControl);
          }
        });
      }
    };
    var onBeforeCall = function (evt) {
      evt.meta = evt.control.rootControl.toJSON();
    };
    var getGeneralItems = function (editor, imageListCtrl) {
      var generalFormItems = [
        {
          name: 'src',
          type: 'filepicker',
          filetype: 'image',
          label: 'Source',
          autofocus: true,
          onchange: function (evt) {
            onSrcChange(evt, editor);
          },
          onbeforecall: onBeforeCall
        },
        imageListCtrl
      ];
      if (Settings.hasDescription(editor)) {
        generalFormItems.push({
          name: 'alt',
          type: 'textbox',
          label: 'Image description'
        });
      }
      if (Settings.hasImageTitle(editor)) {
        generalFormItems.push({
          name: 'title',
          type: 'textbox',
          label: 'Image Title'
        });
      }
      if (Settings.hasDimensions(editor)) {
        generalFormItems.push(SizeManager.createUi());
      }
      if (Settings.getClassList(editor)) {
        generalFormItems.push({
          name: 'class',
          type: 'listbox',
          label: 'Class',
          values: Utils.buildListItems(Settings.getClassList(editor), function (item) {
            if (item.value) {
              item.textStyle = function () {
                return editor.formatter.getCssText({
                  inline: 'img',
                  classes: [item.value]
                });
              };
            }
          })
        });
      }
      if (Settings.hasImageCaption(editor)) {
        generalFormItems.push({
          name: 'caption',
          type: 'checkbox',
          label: 'Caption'
        });
      }
      return generalFormItems;
    };
    var makeTab$1 = function (editor, imageListCtrl) {
      return {
        title: 'General',
        type: 'form',
        items: getGeneralItems(editor, imageListCtrl)
      };
    };
    var MainTab = {
      makeTab: makeTab$1,
      getGeneralItems: getGeneralItems
    };

    var url = function () {
      return Global$1.getOrDie('URL');
    };
    var createObjectURL = function (blob) {
      return url().createObjectURL(blob);
    };
    var revokeObjectURL = function (u) {
      url().revokeObjectURL(u);
    };
    var URL = {
      createObjectURL: createObjectURL,
      revokeObjectURL: revokeObjectURL
    };

    var global$5 = tinymce.util.Tools.resolve('tinymce.ui.Factory');

    function XMLHttpRequest () {
      var f = Global$1.getOrDie('XMLHttpRequest');
      return new f();
    }

    var noop = function () {
    };
    var pathJoin = function (path1, path2) {
      if (path1) {
        return path1.replace(/\/$/, '') + '/' + path2.replace(/^\//, '');
      }
      return path2;
    };
    function Uploader (settings) {
      var defaultHandler = function (blobInfo, success, failure, progress) {
        var xhr, formData;
        xhr = XMLHttpRequest();
        xhr.open('POST', settings.url);
        xhr.withCredentials = settings.credentials;
        xhr.upload.onprogress = function (e) {
          progress(e.loaded / e.total * 100);
        };
        xhr.onerror = function () {
          failure('Image upload failed due to a XHR Transport error. Code: ' + xhr.status);
        };
        xhr.onload = function () {
          var json;
          if (xhr.status < 200 || xhr.status >= 300) {
            failure('HTTP Error: ' + xhr.status);
            return;
          }
          json = JSON.parse(xhr.responseText);
          if (!json || typeof json.location !== 'string') {
            failure('Invalid JSON: ' + xhr.responseText);
            return;
          }
          success(pathJoin(settings.basePath, json.location));
        };
        formData = new domGlobals.FormData();
        formData.append('file', blobInfo.blob(), blobInfo.filename());
        xhr.send(formData);
      };
      var uploadBlob = function (blobInfo, handler) {
        return new global$1(function (resolve, reject) {
          try {
            handler(blobInfo, resolve, reject, noop);
          } catch (ex) {
            reject(ex.message);
          }
        });
      };
      var isDefaultHandler = function (handler) {
        return handler === defaultHandler;
      };
      var upload = function (blobInfo) {
        return !settings.url && isDefaultHandler(settings.handler) ? global$1.reject('Upload url missing from the settings.') : uploadBlob(blobInfo, settings.handler);
      };
      settings = global$2.extend({
        credentials: false,
        handler: defaultHandler
      }, settings);
      return { upload: upload };
    }

    var onFileInput = function (editor) {
      return function (evt) {
        var Throbber = global$5.get('Throbber');
        var rootControl = evt.control.rootControl;
        var throbber = new Throbber(rootControl.getEl());
        var file = evt.control.value();
        var blobUri = URL.createObjectURL(file);
        var uploader = Uploader({
          url: Settings.getUploadUrl(editor),
          basePath: Settings.getUploadBasePath(editor),
          credentials: Settings.getUploadCredentials(editor),
          handler: Settings.getUploadHandler(editor)
        });
        var finalize = function () {
          throbber.hide();
          URL.revokeObjectURL(blobUri);
        };
        throbber.show();
        return Utils.blobToDataUri(file).then(function (dataUrl) {
          var blobInfo = editor.editorUpload.blobCache.create({
            blob: file,
            blobUri: blobUri,
            name: file.name ? file.name.replace(/\.[^\.]+$/, '') : null,
            base64: dataUrl.split(',')[1]
          });
          return uploader.upload(blobInfo).then(function (url) {
            var src = rootControl.find('#src');
            src.value(url);
            rootControl.find('tabpanel')[0].activateTab(0);
            src.fire('change');
            finalize();
            return url;
          });
        }).catch(function (err) {
          editor.windowManager.alert(err);
          finalize();
        });
      };
    };
    var acceptExts = '.jpg,.jpeg,.png,.gif';
    var makeTab$2 = function (editor) {
      return {
        title: 'Upload',
        type: 'form',
        layout: 'flex',
        direction: 'column',
        align: 'stretch',
        padding: '20 20 20 20',
        items: [
          {
            type: 'container',
            layout: 'flex',
            direction: 'column',
            align: 'center',
            spacing: 10,
            items: [
              {
                text: 'Browse for an image',
                type: 'browsebutton',
                accept: acceptExts,
                onchange: onFileInput(editor)
              },
              {
                text: 'OR',
                type: 'label'
              }
            ]
          },
          {
            text: 'Drop an image here',
            type: 'dropzone',
            accept: acceptExts,
            height: 100,
            onchange: onFileInput(editor)
          }
        ]
      };
    };
    var UploadTab = { makeTab: makeTab$2 };

    function curry(fn) {
      var initialArgs = [];
      for (var _i = 1; _i < arguments.length; _i++) {
        initialArgs[_i - 1] = arguments[_i];
      }
      return function () {
        var restArgs = [];
        for (var _i = 0; _i < arguments.length; _i++) {
          restArgs[_i] = arguments[_i];
        }
        var all = initialArgs.concat(restArgs);
        return fn.apply(null, all);
      };
    }

    var submitForm = function (editor, evt) {
      var win = evt.control.getRoot();
      SizeManager.updateSize(win);
      editor.undoManager.transact(function () {
        var data = merge(readImageDataFromSelection(editor), win.toJSON());
        insertOrUpdateImage(editor, data);
      });
      editor.editorUpload.uploadImagesAuto();
    };
    function Dialog (editor) {
      function showDialog(imageList) {
        var data = readImageDataFromSelection(editor);
        var win, imageListCtrl;
        if (imageList) {
          imageListCtrl = {
            type: 'listbox',
            label: 'Image list',
            name: 'image-list',
            values: Utils.buildListItems(imageList, function (item) {
              item.value = editor.convertURL(item.value || item.url, 'src');
            }, [{
                text: 'None',
                value: ''
              }]),
            value: data.src && editor.convertURL(data.src, 'src'),
            onselect: function (e) {
              var altCtrl = win.find('#alt');
              if (!altCtrl.value() || e.lastControl && altCtrl.value() === e.lastControl.text()) {
                altCtrl.value(e.control.text());
              }
              win.find('#src').value(e.control.value()).fire('change');
            },
            onPostRender: function () {
              imageListCtrl = this;
            }
          };
        }
        if (Settings.hasAdvTab(editor) || Settings.hasUploadUrl(editor) || Settings.hasUploadHandler(editor)) {
          var body = [MainTab.makeTab(editor, imageListCtrl)];
          if (Settings.hasAdvTab(editor)) {
            body.push(AdvTab.makeTab(editor));
          }
          if (Settings.hasUploadUrl(editor) || Settings.hasUploadHandler(editor)) {
            body.push(UploadTab.makeTab(editor));
          }
          win = editor.windowManager.open({
            title: 'Insert/edit image',
            data: data,
            bodyType: 'tabpanel',
            body: body,
            onSubmit: curry(submitForm, editor)
          });
        } else {
          win = editor.windowManager.open({
            title: 'Insert/edit image',
            data: data,
            body: MainTab.getGeneralItems(editor, imageListCtrl),
            onSubmit: curry(submitForm, editor)
          });
        }
        SizeManager.syncSize(win);
      }
      function open() {
        Utils.createImageList(editor, showDialog);
      }
      return { open: open };
    }

    var register = function (editor) {
      editor.addCommand('mceImage', Dialog(editor).open);
    };
    var Commands = { register: register };

    var hasImageClass = function (node) {
      var className = node.attr('class');
      return className && /\bimage\b/.test(className);
    };
    var toggleContentEditableState = function (state) {
      return function (nodes) {
        var i = nodes.length, node;
        var toggleContentEditable = function (node) {
          node.attr('contenteditable', state ? 'true' : null);
        };
        while (i--) {
          node = nodes[i];
          if (hasImageClass(node)) {
            node.attr('contenteditable', state ? 'false' : null);
            global$2.each(node.getAll('figcaption'), toggleContentEditable);
          }
        }
      };
    };
    var setup = function (editor) {
      editor.on('preInit', function () {
        editor.parser.addNodeFilter('figure', toggleContentEditableState(true));
        editor.serializer.addNodeFilter('figure', toggleContentEditableState(false));
      });
    };
    var FilterContent = { setup: setup };

    var register$1 = function (editor) {
      editor.addButton('image', {
        icon: 'image',
        tooltip: 'Insert/edit image',
        onclick: Dialog(editor).open,
        stateSelector: 'img:not([data-mce-object],[data-mce-placeholder]),figure.image'
      });
      editor.addMenuItem('image', {
        icon: 'image',
        text: 'Image',
        onclick: Dialog(editor).open,
        context: 'insert',
        prependToContext: true
      });
    };
    var Buttons = { register: register$1 };

    global.add('image', function (editor) {
      FilterContent.setup(editor);
      Buttons.register(editor);
      Commands.register(editor);
    });
    function Plugin () {
    }

    return Plugin;

}(window));
})();
                                                                                                                                                                                                                                                                                                                                                                                                                                          tinymce/plugins/image/plugin.min.js                                                                 0000644                 00000036754 15212564050 0013414 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(l){"use strict";var i,e=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=function(e){return!1!==e.settings.image_dimensions},u=function(e){return!0===e.settings.image_advtab},m=function(e){return e.getParam("image_prepend_url","")},n=function(e){return e.getParam("image_class_list")},r=function(e){return!1!==e.settings.image_description},a=function(e){return!0===e.settings.image_title},o=function(e){return!0===e.settings.image_caption},c=function(e){return e.getParam("image_list",!1)},s=function(e){return e.getParam("images_upload_url",!1)},g=function(e){return e.getParam("images_upload_handler",!1)},f=function(e){return e.getParam("images_upload_url")},p=function(e){return e.getParam("images_upload_handler")},h=function(e){return e.getParam("images_upload_base_path")},v=function(e){return e.getParam("images_upload_credentials")},b="undefined"!=typeof l.window?l.window:Function("return this;")(),y=function(e,t){return function(e,t){for(var n=t!==undefined&&null!==t?t:b,r=0;r<e.length&&n!==undefined&&null!==n;++r)n=n[e[r]];return n}(e.split("."),t)},x={getOrDie:function(e,t){var n=y(e,t);if(n===undefined||null===n)throw new Error(e+" not available on this browser");return n}},w=tinymce.util.Tools.resolve("tinymce.util.Promise"),C=tinymce.util.Tools.resolve("tinymce.util.Tools"),S=tinymce.util.Tools.resolve("tinymce.util.XHR"),N=function(e,t){return Math.max(parseInt(e,10),parseInt(t,10))},_=function(e,n){var r=l.document.createElement("img");function t(e,t){r.parentNode&&r.parentNode.removeChild(r),n({width:e,height:t})}r.onload=function(){t(N(r.width,r.clientWidth),N(r.height,r.clientHeight))},r.onerror=function(){t(0,0)};var a=r.style;a.visibility="hidden",a.position="fixed",a.bottom=a.left="0px",a.width=a.height="auto",l.document.body.appendChild(r),r.src=e},T=function(e,a,t){return function n(e,r){return r=r||[],C.each(e,function(e){var t={text:e.text||e.title};e.menu?t.menu=n(e.menu):(t.value=e.value,a(t)),r.push(t)}),r}(e,t||[])},A=function(e){return e&&(e=e.replace(/px$/,"")),e},R=function(e){return 0<e.length&&/^[0-9]+$/.test(e)&&(e+="px"),e},I=function(e){if(e.margin){var t=e.margin.split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e},t=function(e,t){var n=c(e);"string"==typeof n?S.send({url:n,success:function(e){t(JSON.parse(e))}}):"function"==typeof n?n(t):t(n)},O=function(e,t,n){function r(){n.onload=n.onerror=null,e.selection&&(e.selection.select(n),e.nodeChanged())}n.onload=function(){t.width||t.height||!d(e)||e.dom.setAttribs(n,{width:n.clientWidth,height:n.clientHeight}),r()},n.onerror=r},L=function(r){return new w(function(e,t){var n=new(x.getOrDie("FileReader"));n.onload=function(){e(n.result)},n.onerror=function(){t(n.error.message)},n.readAsDataURL(r)})},P=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),U=Object.prototype.hasOwnProperty,E=(i=function(e,t){return t},function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var a=e[r];for(var o in a)U.call(a,o)&&(n[o]=i(n[o],a[o]))}return n}),k=P.DOM,M=function(e){return e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?A(e.style.marginLeft):""},D=function(e){return e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?A(e.style.marginTop):""},z=function(e){return e.style.borderWidth?A(e.style.borderWidth):""},B=function(e,t){return e.hasAttribute(t)?e.getAttribute(t):""},H=function(e,t){return e.style[t]?e.style[t]:""},j=function(e){return null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName},F=function(e,t,n){e.setAttribute(t,n)},W=function(e){var t,n,r,a;j(e)?(a=(r=e).parentNode,k.insertAfter(r,a),k.remove(a)):(t=e,n=k.create("figure",{"class":"image"}),k.insertAfter(n,t),n.appendChild(t),n.appendChild(k.create("figcaption",{contentEditable:!0},"Caption")),n.contentEditable="false")},J=function(e,t){var n=e.getAttribute("style"),r=t(null!==n?n:"");0<r.length?(e.setAttribute("style",r),e.setAttribute("data-mce-style",r)):e.removeAttribute("style")},V=function(e,r){return function(e,t,n){e.style[t]?(e.style[t]=R(n),J(e,r)):F(e,t,n)}},G=function(e,t){return e.style[t]?A(e.style[t]):B(e,t)},$=function(e,t){var n=R(t);e.style.marginLeft=n,e.style.marginRight=n},X=function(e,t){var n=R(t);e.style.marginTop=n,e.style.marginBottom=n},q=function(e,t){var n=R(t);e.style.borderWidth=n},K=function(e,t){e.style.borderStyle=t},Q=function(e){return"FIGURE"===e.nodeName},Y=function(e,t){var n=l.document.createElement("img");return F(n,"style",t.style),(M(n)||""!==t.hspace)&&$(n,t.hspace),(D(n)||""!==t.vspace)&&X(n,t.vspace),(z(n)||""!==t.border)&&q(n,t.border),(H(n,"borderStyle")||""!==t.borderStyle)&&K(n,t.borderStyle),e(n.getAttribute("style"))},Z=function(e,t){return{src:B(t,"src"),alt:B(t,"alt"),title:B(t,"title"),width:G(t,"width"),height:G(t,"height"),"class":B(t,"class"),style:e(B(t,"style")),caption:j(t),hspace:M(t),vspace:D(t),border:z(t),borderStyle:H(t,"borderStyle")}},ee=function(e,t,n,r,a){n[r]!==t[r]&&a(e,r,n[r])},te=function(r,a){return function(e,t,n){r(e,n),J(e,a)}},ne=function(e,t,n){var r=Z(e,n);ee(n,r,t,"caption",function(e,t,n){return W(e)}),ee(n,r,t,"src",F),ee(n,r,t,"alt",F),ee(n,r,t,"title",F),ee(n,r,t,"width",V(0,e)),ee(n,r,t,"height",V(0,e)),ee(n,r,t,"class",F),ee(n,r,t,"style",te(function(e,t){return F(e,"style",t)},e)),ee(n,r,t,"hspace",te($,e)),ee(n,r,t,"vspace",te(X,e)),ee(n,r,t,"border",te(q,e)),ee(n,r,t,"borderStyle",te(K,e))},re=function(e,t){var n=e.dom.styles.parse(t),r=I(n),a=e.dom.styles.parse(e.dom.styles.serialize(r));return e.dom.styles.serialize(a)},ae=function(e){var t=e.selection.getNode(),n=e.dom.getParent(t,"figure.image");return n?e.dom.select("img",n)[0]:t&&("IMG"!==t.nodeName||t.getAttribute("data-mce-object")||t.getAttribute("data-mce-placeholder"))?null:t},oe=function(t,e){var n=t.dom,r=n.getParent(e.parentNode,function(e){return t.schema.getTextBlockElements()[e.nodeName]},t.getBody());return r?n.split(r,e):e},ie=function(t){var e=ae(t);return e?Z(function(e){return re(t,e)},e):{src:"",alt:"",title:"",width:"",height:"","class":"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:""}},le=function(t,e){var n=function(e,t){var n=l.document.createElement("img");if(ne(e,E(t,{caption:!1}),n),F(n,"alt",t.alt),t.caption){var r=k.create("figure",{"class":"image"});return r.appendChild(n),r.appendChild(k.create("figcaption",{contentEditable:!0},"Caption")),r.contentEditable="false",r}return n}(function(e){return re(t,e)},e);t.dom.setAttrib(n,"data-mce-id","__mcenew"),t.focus(),t.selection.setContent(n.outerHTML);var r=t.dom.select('*[data-mce-id="__mcenew"]')[0];if(t.dom.setAttrib(r,"data-mce-id",null),Q(r)){var a=oe(t,r);t.selection.select(a)}else t.selection.select(r)},ue=function(e,t){var n=ae(e);n?t.src?function(t,e){var n,r=ae(t);if(ne(function(e){return re(t,e)},e,r),n=r,t.dom.setAttrib(n,"src",n.getAttribute("src")),Q(r.parentNode)){var a=r.parentNode;oe(t,a),t.selection.select(r.parentNode)}else t.selection.select(r),O(t,e,r)}(e,t):function(e,t){if(t){var n=e.dom.is(t.parentNode,"figure.image")?t.parentNode:t;e.dom.remove(n),e.focus(),e.nodeChanged(),e.dom.isEmpty(e.getBody())&&(e.setContent(""),e.selection.setCursorLocation())}}(e,n):t.src&&le(e,t)},ce=function(n,r){r.find("#style").each(function(e){var t=Y(function(e){return re(n,e)},E({src:"",alt:"",title:"",width:"",height:"","class":"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:""},r.toJSON()));e.value(t)})},se=function(t){return{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox",onchange:(o=t,function(e){var t=o.dom,n=e.control.rootControl;if(u(o)){var r=n.toJSON(),a=t.parseStyle(r.style);n.find("#vspace").value(""),n.find("#hspace").value(""),((a=I(a))["margin-top"]&&a["margin-bottom"]||a["margin-right"]&&a["margin-left"])&&(a["margin-top"]===a["margin-bottom"]?n.find("#vspace").value(A(a["margin-top"])):n.find("#vspace").value(""),a["margin-right"]===a["margin-left"]?n.find("#hspace").value(A(a["margin-right"])):n.find("#hspace").value("")),a["border-width"]?n.find("#border").value(A(a["border-width"])):n.find("#border").value(""),a["border-style"]?n.find("#borderStyle").value(a["border-style"]):n.find("#borderStyle").value(""),n.find("#style").value(t.serializeStyle(t.parseStyle(t.serializeStyle(a))))}})},{type:"form",layout:"grid",packV:"start",columns:2,padding:0,defaults:{type:"textbox",maxWidth:50,onchange:function(e){ce(t,e.control.rootControl)}},items:[{label:"Vertical space",name:"vspace"},{label:"Border width",name:"border"},{label:"Horizontal space",name:"hspace"},{label:"Border style",type:"listbox",name:"borderStyle",width:90,maxWidth:90,onselect:function(e){ce(t,e.control.rootControl)},values:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]};var o},de=function(e,t){e.state.set("oldVal",e.value()),t.state.set("oldVal",t.value())},me=function(e,t){var n=e.find("#width")[0],r=e.find("#height")[0],a=e.find("#constrain")[0];n&&r&&a&&t(n,r,a.checked())},ge=function(e,t,n){var r=e.state.get("oldVal"),a=t.state.get("oldVal"),o=e.value(),i=t.value();n&&r&&a&&o&&i&&(o!==r?(i=Math.round(o/r*i),isNaN(i)||t.value(i)):(o=Math.round(i/a*o),isNaN(o)||e.value(o))),de(e,t)},fe=function(e){me(e,ge)},pe=function(){var e=function(e){fe(e.control.rootControl)};return{type:"container",label:"Dimensions",layout:"flex",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:5,onchange:e,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:5,onchange:e,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}},he=function(e){me(e,de)},ve=fe,be=function(e){e.meta=e.control.rootControl.toJSON()},ye=function(s,e){var t=[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0,onchange:function(e){var t,n,r,a,o,i,l,u,c;n=s,i=(t=e).meta||{},l=t.control,u=l.rootControl,(c=u.find("#image-list")[0])&&c.value(n.convertURL(l.value(),"src")),C.each(i,function(e,t){u.find("#"+t).value(e)}),i.width||i.height||(r=n.convertURL(l.value(),"src"),a=m(n),o=new RegExp("^(?:[a-z]+:)?//","i"),a&&!o.test(r)&&r.substring(0,a.length)!==a&&(r=a+r),l.value(r),_(n.documentBaseURI.toAbsolute(l.value()),function(e){e.width&&e.height&&d(n)&&(u.find("#width").value(e.width),u.find("#height").value(e.height),he(u))}))},onbeforecall:be},e];return r(s)&&t.push({name:"alt",type:"textbox",label:"Image description"}),a(s)&&t.push({name:"title",type:"textbox",label:"Image Title"}),d(s)&&t.push(pe()),n(s)&&t.push({name:"class",type:"listbox",label:"Class",values:T(n(s),function(e){e.value&&(e.textStyle=function(){return s.formatter.getCssText({inline:"img",classes:[e.value]})})})}),o(s)&&t.push({name:"caption",type:"checkbox",label:"Caption"}),t},xe=function(e,t){return{title:"General",type:"form",items:ye(e,t)}},we=ye,Ce=function(){return x.getOrDie("URL")},Se=function(e){return Ce().createObjectURL(e)},Ne=function(e){Ce().revokeObjectURL(e)},_e=tinymce.util.Tools.resolve("tinymce.ui.Factory"),Te=function(){};function Ae(i){var t=function(e,r,a,t){var o,n;(o=new(x.getOrDie("XMLHttpRequest"))).open("POST",i.url),o.withCredentials=i.credentials,o.upload.onprogress=function(e){t(e.loaded/e.total*100)},o.onerror=function(){a("Image upload failed due to a XHR Transport error. Code: "+o.status)},o.onload=function(){var e,t,n;o.status<200||300<=o.status?a("HTTP Error: "+o.status):(e=JSON.parse(o.responseText))&&"string"==typeof e.location?r((t=i.basePath,n=e.location,t?t.replace(/\/$/,"")+"/"+n.replace(/^\//,""):n)):a("Invalid JSON: "+o.responseText)},(n=new l.FormData).append("file",e.blob(),e.filename()),o.send(n)};return i=C.extend({credentials:!1,handler:t},i),{upload:function(e){return i.url||i.handler!==t?(r=e,a=i.handler,new w(function(e,t){try{a(r,e,t,Te)}catch(n){t(n.message)}})):w.reject("Upload url missing from the settings.");var r,a}}}var Re=function(u){return function(e){var t=_e.get("Throbber"),n=e.control.rootControl,r=new t(n.getEl()),a=e.control.value(),o=Se(a),i=Ae({url:f(u),basePath:h(u),credentials:v(u),handler:p(u)}),l=function(){r.hide(),Ne(o)};return r.show(),L(a).then(function(e){var t=u.editorUpload.blobCache.create({blob:a,blobUri:o,name:a.name?a.name.replace(/\.[^\.]+$/,""):null,base64:e.split(",")[1]});return i.upload(t).then(function(e){var t=n.find("#src");return t.value(e),n.find("tabpanel")[0].activateTab(0),t.fire("change"),l(),e})})["catch"](function(e){u.windowManager.alert(e),l()})}},Ie=".jpg,.jpeg,.png,.gif",Oe=function(e){return{title:"Upload",type:"form",layout:"flex",direction:"column",align:"stretch",padding:"20 20 20 20",items:[{type:"container",layout:"flex",direction:"column",align:"center",spacing:10,items:[{text:"Browse for an image",type:"browsebutton",accept:Ie,onchange:Re(e)},{text:"OR",type:"label"}]},{text:"Drop an image here",type:"dropzone",accept:Ie,height:100,onchange:Re(e)}]}};function Le(r){for(var a=[],e=1;e<arguments.length;e++)a[e-1]=arguments[e];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=a.concat(e);return r.apply(null,n)}}var Pe=function(t,e){var n=e.control.getRoot();ve(n),t.undoManager.transact(function(){var e=E(ie(t),n.toJSON());ue(t,e)}),t.editorUpload.uploadImagesAuto()};function Ue(o){function e(e){var n,t,r=ie(o);if(e&&(t={type:"listbox",label:"Image list",name:"image-list",values:T(e,function(e){e.value=o.convertURL(e.value||e.url,"src")},[{text:"None",value:""}]),value:r.src&&o.convertURL(r.src,"src"),onselect:function(e){var t=n.find("#alt");(!t.value()||e.lastControl&&t.value()===e.lastControl.text())&&t.value(e.control.text()),n.find("#src").value(e.control.value()).fire("change")},onPostRender:function(){t=this}}),u(o)||s(o)||g(o)){var a=[xe(o,t)];u(o)&&a.push(se(o)),(s(o)||g(o))&&a.push(Oe(o)),n=o.windowManager.open({title:"Insert/edit image",data:r,bodyType:"tabpanel",body:a,onSubmit:Le(Pe,o)})}else n=o.windowManager.open({title:"Insert/edit image",data:r,body:we(o,t),onSubmit:Le(Pe,o)});he(n)}return{open:function(){t(o,e)}}}var Ee=function(e){e.addCommand("mceImage",Ue(e).open)},ke=function(o){return function(e){for(var t,n,r=e.length,a=function(e){e.attr("contenteditable",o?"true":null)};r--;)t=e[r],(n=t.attr("class"))&&/\bimage\b/.test(n)&&(t.attr("contenteditable",o?"false":null),C.each(t.getAll("figcaption"),a))}},Me=function(e){e.on("preInit",function(){e.parser.addNodeFilter("figure",ke(!0)),e.serializer.addNodeFilter("figure",ke(!1))})},De=function(e){e.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:Ue(e).open,stateSelector:"img:not([data-mce-object],[data-mce-placeholder]),figure.image"}),e.addMenuItem("image",{icon:"image",text:"Image",onclick:Ue(e).open,context:"insert",prependToContext:!0})};e.add("image",function(e){Me(e),De(e),Ee(e)})}(window);                    tinymce/plugins/link/plugin.js                                                                      0000644                 00000056711 15212564050 0012500 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       (function () {
var link = (function (domGlobals) {
    'use strict';

    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');

    var global$1 = tinymce.util.Tools.resolve('tinymce.util.VK');

    var assumeExternalTargets = function (editorSettings) {
      return typeof editorSettings.link_assume_external_targets === 'boolean' ? editorSettings.link_assume_external_targets : false;
    };
    var hasContextToolbar = function (editorSettings) {
      return typeof editorSettings.link_context_toolbar === 'boolean' ? editorSettings.link_context_toolbar : false;
    };
    var getLinkList = function (editorSettings) {
      return editorSettings.link_list;
    };
    var hasDefaultLinkTarget = function (editorSettings) {
      return typeof editorSettings.default_link_target === 'string';
    };
    var getDefaultLinkTarget = function (editorSettings) {
      return editorSettings.default_link_target;
    };
    var getTargetList = function (editorSettings) {
      return editorSettings.target_list;
    };
    var setTargetList = function (editor, list) {
      editor.settings.target_list = list;
    };
    var shouldShowTargetList = function (editorSettings) {
      return getTargetList(editorSettings) !== false;
    };
    var getRelList = function (editorSettings) {
      return editorSettings.rel_list;
    };
    var hasRelList = function (editorSettings) {
      return getRelList(editorSettings) !== undefined;
    };
    var getLinkClassList = function (editorSettings) {
      return editorSettings.link_class_list;
    };
    var hasLinkClassList = function (editorSettings) {
      return getLinkClassList(editorSettings) !== undefined;
    };
    var shouldShowLinkTitle = function (editorSettings) {
      return editorSettings.link_title !== false;
    };
    var allowUnsafeLinkTarget = function (editorSettings) {
      return typeof editorSettings.allow_unsafe_link_target === 'boolean' ? editorSettings.allow_unsafe_link_target : false;
    };
    var Settings = {
      assumeExternalTargets: assumeExternalTargets,
      hasContextToolbar: hasContextToolbar,
      getLinkList: getLinkList,
      hasDefaultLinkTarget: hasDefaultLinkTarget,
      getDefaultLinkTarget: getDefaultLinkTarget,
      getTargetList: getTargetList,
      setTargetList: setTargetList,
      shouldShowTargetList: shouldShowTargetList,
      getRelList: getRelList,
      hasRelList: hasRelList,
      getLinkClassList: getLinkClassList,
      hasLinkClassList: hasLinkClassList,
      shouldShowLinkTitle: shouldShowLinkTitle,
      allowUnsafeLinkTarget: allowUnsafeLinkTarget
    };

    var global$2 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');

    var global$3 = tinymce.util.Tools.resolve('tinymce.Env');

    var appendClickRemove = function (link, evt) {
      domGlobals.document.body.appendChild(link);
      link.dispatchEvent(evt);
      domGlobals.document.body.removeChild(link);
    };
    var open = function (url) {
      if (!global$3.ie || global$3.ie > 10) {
        var link = domGlobals.document.createElement('a');
        link.target = '_blank';
        link.href = url;
        link.rel = 'noreferrer noopener';
        var evt = domGlobals.document.createEvent('MouseEvents');
        evt.initMouseEvent('click', true, true, domGlobals.window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
        appendClickRemove(link, evt);
      } else {
        var win = domGlobals.window.open('', '_blank');
        if (win) {
          win.opener = null;
          var doc = win.document;
          doc.open();
          doc.write('<meta http-equiv="refresh" content="0; url=' + global$2.DOM.encode(url) + '">');
          doc.close();
        }
      }
    };
    var OpenUrl = { open: open };

    var global$4 = tinymce.util.Tools.resolve('tinymce.util.Tools');

    var toggleTargetRules = function (rel, isUnsafe) {
      var rules = ['noopener'];
      var newRel = rel ? rel.split(/\s+/) : [];
      var toString = function (rel) {
        return global$4.trim(rel.sort().join(' '));
      };
      var addTargetRules = function (rel) {
        rel = removeTargetRules(rel);
        return rel.length ? rel.concat(rules) : rules;
      };
      var removeTargetRules = function (rel) {
        return rel.filter(function (val) {
          return global$4.inArray(rules, val) === -1;
        });
      };
      newRel = isUnsafe ? addTargetRules(newRel) : removeTargetRules(newRel);
      return newRel.length ? toString(newRel) : null;
    };
    var trimCaretContainers = function (text) {
      return text.replace(/\uFEFF/g, '');
    };
    var getAnchorElement = function (editor, selectedElm) {
      selectedElm = selectedElm || editor.selection.getNode();
      if (isImageFigure(selectedElm)) {
        return editor.dom.select('a[href]', selectedElm)[0];
      } else {
        return editor.dom.getParent(selectedElm, 'a[href]');
      }
    };
    var getAnchorText = function (selection, anchorElm) {
      var text = anchorElm ? anchorElm.innerText || anchorElm.textContent : selection.getContent({ format: 'text' });
      return trimCaretContainers(text);
    };
    var isLink = function (elm) {
      return elm && elm.nodeName === 'A' && elm.href;
    };
    var hasLinks = function (elements) {
      return global$4.grep(elements, isLink).length > 0;
    };
    var isOnlyTextSelected = function (html) {
      if (/</.test(html) && (!/^<a [^>]+>[^<]+<\/a>$/.test(html) || html.indexOf('href=') === -1)) {
        return false;
      }
      return true;
    };
    var isImageFigure = function (node) {
      return node && node.nodeName === 'FIGURE' && /\bimage\b/i.test(node.className);
    };
    var link = function (editor, attachState) {
      return function (data) {
        editor.undoManager.transact(function () {
          var selectedElm = editor.selection.getNode();
          var anchorElm = getAnchorElement(editor, selectedElm);
          var linkAttrs = {
            href: data.href,
            target: data.target ? data.target : null,
            rel: data.rel ? data.rel : null,
            class: data.class ? data.class : null,
            title: data.title ? data.title : null
          };
          if (!Settings.hasRelList(editor.settings) && Settings.allowUnsafeLinkTarget(editor.settings) === false) {
            linkAttrs.rel = toggleTargetRules(linkAttrs.rel, linkAttrs.target === '_blank');
          }
          if (data.href === attachState.href) {
            attachState.attach();
            attachState = {};
          }
          if (anchorElm) {
            editor.focus();
            if (data.hasOwnProperty('text')) {
              if ('innerText' in anchorElm) {
                anchorElm.innerText = data.text;
              } else {
                anchorElm.textContent = data.text;
              }
            }
            editor.dom.setAttribs(anchorElm, linkAttrs);
            editor.selection.select(anchorElm);
            editor.undoManager.add();
          } else {
            if (isImageFigure(selectedElm)) {
              linkImageFigure(editor, selectedElm, linkAttrs);
            } else if (data.hasOwnProperty('text')) {
              editor.insertContent(editor.dom.createHTML('a', linkAttrs, editor.dom.encode(data.text)));
            } else {
              editor.execCommand('mceInsertLink', false, linkAttrs);
            }
          }
        });
      };
    };
    var unlink = function (editor) {
      return function () {
        editor.undoManager.transact(function () {
          var node = editor.selection.getNode();
          if (isImageFigure(node)) {
            unlinkImageFigure(editor, node);
          } else {
            editor.execCommand('unlink');
          }
        });
      };
    };
    var unlinkImageFigure = function (editor, fig) {
      var a, img;
      img = editor.dom.select('img', fig)[0];
      if (img) {
        a = editor.dom.getParents(img, 'a[href]', fig)[0];
        if (a) {
          a.parentNode.insertBefore(img, a);
          editor.dom.remove(a);
        }
      }
    };
    var linkImageFigure = function (editor, fig, attrs) {
      var a, img;
      img = editor.dom.select('img', fig)[0];
      if (img) {
        a = editor.dom.create('a', attrs);
        img.parentNode.insertBefore(a, img);
        a.appendChild(img);
      }
    };
    var Utils = {
      link: link,
      unlink: unlink,
      isLink: isLink,
      hasLinks: hasLinks,
      isOnlyTextSelected: isOnlyTextSelected,
      getAnchorElement: getAnchorElement,
      getAnchorText: getAnchorText,
      toggleTargetRules: toggleTargetRules
    };

    var global$5 = tinymce.util.Tools.resolve('tinymce.util.Delay');

    var global$6 = tinymce.util.Tools.resolve('tinymce.util.XHR');

    var attachState = {};
    var createLinkList = function (editor, callback) {
      var linkList = Settings.getLinkList(editor.settings);
      if (typeof linkList === 'string') {
        global$6.send({
          url: linkList,
          success: function (text) {
            callback(editor, JSON.parse(text));
          }
        });
      } else if (typeof linkList === 'function') {
        linkList(function (list) {
          callback(editor, list);
        });
      } else {
        callback(editor, linkList);
      }
    };
    var buildListItems = function (inputList, itemCallback, startItems) {
      var appendItems = function (values, output) {
        output = output || [];
        global$4.each(values, function (item) {
          var menuItem = { text: item.text || item.title };
          if (item.menu) {
            menuItem.menu = appendItems(item.menu);
          } else {
            menuItem.value = item.value;
            if (itemCallback) {
              itemCallback(menuItem);
            }
          }
          output.push(menuItem);
        });
        return output;
      };
      return appendItems(inputList, startItems || []);
    };
    var delayedConfirm = function (editor, message, callback) {
      var rng = editor.selection.getRng();
      global$5.setEditorTimeout(editor, function () {
        editor.windowManager.confirm(message, function (state) {
          editor.selection.setRng(rng);
          callback(state);
        });
      });
    };
    var showDialog = function (editor, linkList) {
      var data = {};
      var selection = editor.selection;
      var dom = editor.dom;
      var anchorElm, initialText;
      var win, onlyText, textListCtrl, linkListCtrl, relListCtrl, targetListCtrl, classListCtrl, linkTitleCtrl, value;
      var linkListChangeHandler = function (e) {
        var textCtrl = win.find('#text');
        if (!textCtrl.value() || e.lastControl && textCtrl.value() === e.lastControl.text()) {
          textCtrl.value(e.control.text());
        }
        win.find('#href').value(e.control.value());
      };
      var buildAnchorListControl = function (url) {
        var anchorList = [];
        global$4.each(editor.dom.select('a:not([href])'), function (anchor) {
          var id = anchor.name || anchor.id;
          if (id) {
            anchorList.push({
              text: id,
              value: '#' + id,
              selected: url.indexOf('#' + id) !== -1
            });
          }
        });
        if (anchorList.length) {
          anchorList.unshift({
            text: 'None',
            value: ''
          });
          return {
            name: 'anchor',
            type: 'listbox',
            label: 'Anchors',
            values: anchorList,
            onselect: linkListChangeHandler
          };
        }
      };
      var updateText = function () {
        if (!initialText && onlyText && !data.text) {
          this.parent().parent().find('#text')[0].value(this.value());
        }
      };
      var urlChange = function (e) {
        var meta = e.meta || {};
        if (linkListCtrl) {
          linkListCtrl.value(editor.convertURL(this.value(), 'href'));
        }
        global$4.each(e.meta, function (value, key) {
          var inp = win.find('#' + key);
          if (key === 'text') {
            if (initialText.length === 0) {
              inp.value(value);
              data.text = value;
            }
          } else {
            inp.value(value);
          }
        });
        if (meta.attach) {
          attachState = {
            href: this.value(),
            attach: meta.attach
          };
        }
        if (!meta.text) {
          updateText.call(this);
        }
      };
      var onBeforeCall = function (e) {
        e.meta = win.toJSON();
      };
      onlyText = Utils.isOnlyTextSelected(selection.getContent());
      anchorElm = Utils.getAnchorElement(editor);
      data.text = initialText = Utils.getAnchorText(editor.selection, anchorElm);
      data.href = anchorElm ? dom.getAttrib(anchorElm, 'href') : '';
      if (anchorElm) {
        data.target = dom.getAttrib(anchorElm, 'target');
      } else if (Settings.hasDefaultLinkTarget(editor.settings)) {
        data.target = Settings.getDefaultLinkTarget(editor.settings);
      }
      if (value = dom.getAttrib(anchorElm, 'rel')) {
        data.rel = value;
      }
      if (value = dom.getAttrib(anchorElm, 'class')) {
        data.class = value;
      }
      if (value = dom.getAttrib(anchorElm, 'title')) {
        data.title = value;
      }
      if (onlyText) {
        textListCtrl = {
          name: 'text',
          type: 'textbox',
          size: 40,
          label: 'Text to display',
          onchange: function () {
            data.text = this.value();
          }
        };
      }
      if (linkList) {
        linkListCtrl = {
          type: 'listbox',
          label: 'Link list',
          values: buildListItems(linkList, function (item) {
            item.value = editor.convertURL(item.value || item.url, 'href');
          }, [{
              text: 'None',
              value: ''
            }]),
          onselect: linkListChangeHandler,
          value: editor.convertURL(data.href, 'href'),
          onPostRender: function () {
            linkListCtrl = this;
          }
        };
      }
      if (Settings.shouldShowTargetList(editor.settings)) {
        if (Settings.getTargetList(editor.settings) === undefined) {
          Settings.setTargetList(editor, [
            {
              text: 'None',
              value: ''
            },
            {
              text: 'New window',
              value: '_blank'
            }
          ]);
        }
        targetListCtrl = {
          name: 'target',
          type: 'listbox',
          label: 'Target',
          values: buildListItems(Settings.getTargetList(editor.settings))
        };
      }
      if (Settings.hasRelList(editor.settings)) {
        relListCtrl = {
          name: 'rel',
          type: 'listbox',
          label: 'Rel',
          values: buildListItems(Settings.getRelList(editor.settings), function (item) {
            if (Settings.allowUnsafeLinkTarget(editor.settings) === false) {
              item.value = Utils.toggleTargetRules(item.value, data.target === '_blank');
            }
          })
        };
      }
      if (Settings.hasLinkClassList(editor.settings)) {
        classListCtrl = {
          name: 'class',
          type: 'listbox',
          label: 'Class',
          values: buildListItems(Settings.getLinkClassList(editor.settings), function (item) {
            if (item.value) {
              item.textStyle = function () {
                return editor.formatter.getCssText({
                  inline: 'a',
                  classes: [item.value]
                });
              };
            }
          })
        };
      }
      if (Settings.shouldShowLinkTitle(editor.settings)) {
        linkTitleCtrl = {
          name: 'title',
          type: 'textbox',
          label: 'Title',
          value: data.title
        };
      }
      win = editor.windowManager.open({
        title: 'Insert link',
        data: data,
        body: [
          {
            name: 'href',
            type: 'filepicker',
            filetype: 'file',
            size: 40,
            autofocus: true,
            label: 'Url',
            onchange: urlChange,
            onkeyup: updateText,
            onpaste: updateText,
            onbeforecall: onBeforeCall
          },
          textListCtrl,
          linkTitleCtrl,
          buildAnchorListControl(data.href),
          linkListCtrl,
          relListCtrl,
          targetListCtrl,
          classListCtrl
        ],
        onSubmit: function (e) {
          var assumeExternalTargets = Settings.assumeExternalTargets(editor.settings);
          var insertLink = Utils.link(editor, attachState);
          var removeLink = Utils.unlink(editor);
          var resultData = global$4.extend({}, data, e.data);
          var href = resultData.href;
          if (!href) {
            removeLink();
            return;
          }
          if (!onlyText || resultData.text === initialText) {
            delete resultData.text;
          }
          if (href.indexOf('@') > 0 && href.indexOf('//') === -1 && href.indexOf('mailto:') === -1) {
            delayedConfirm(editor, 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?', function (state) {
              if (state) {
                resultData.href = 'mailto:' + href;
              }
              insertLink(resultData);
            });
            return;
          }
          if (assumeExternalTargets === true && !/^\w+:/i.test(href) || assumeExternalTargets === false && /^\s*www[\.|\d\.]/i.test(href)) {
            delayedConfirm(editor, 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?', function (state) {
              if (state) {
                resultData.href = 'http://' + href;
              }
              insertLink(resultData);
            });
            return;
          }
          insertLink(resultData);
        }
      });
    };
    var open$1 = function (editor) {
      createLinkList(editor, showDialog);
    };
    var Dialog = { open: open$1 };

    var getLink = function (editor, elm) {
      return editor.dom.getParent(elm, 'a[href]');
    };
    var getSelectedLink = function (editor) {
      return getLink(editor, editor.selection.getStart());
    };
    var getHref = function (elm) {
      var href = elm.getAttribute('data-mce-href');
      return href ? href : elm.getAttribute('href');
    };
    var isContextMenuVisible = function (editor) {
      var contextmenu = editor.plugins.contextmenu;
      return contextmenu ? contextmenu.isContextMenuVisible() : false;
    };
    var hasOnlyAltModifier = function (e) {
      return e.altKey === true && e.shiftKey === false && e.ctrlKey === false && e.metaKey === false;
    };
    var gotoLink = function (editor, a) {
      if (a) {
        var href = getHref(a);
        if (/^#/.test(href)) {
          var targetEl = editor.$(href);
          if (targetEl.length) {
            editor.selection.scrollIntoView(targetEl[0], true);
          }
        } else {
          OpenUrl.open(a.href);
        }
      }
    };
    var openDialog = function (editor) {
      return function () {
        Dialog.open(editor);
      };
    };
    var gotoSelectedLink = function (editor) {
      return function () {
        gotoLink(editor, getSelectedLink(editor));
      };
    };
    var leftClickedOnAHref = function (editor) {
      return function (elm) {
        var sel, rng, node;
        if (Settings.hasContextToolbar(editor.settings) && !isContextMenuVisible(editor) && Utils.isLink(elm)) {
          sel = editor.selection;
          rng = sel.getRng();
          node = rng.startContainer;
          if (node.nodeType === 3 && sel.isCollapsed() && rng.startOffset > 0 && rng.startOffset < node.data.length) {
            return true;
          }
        }
        return false;
      };
    };
    var setupGotoLinks = function (editor) {
      editor.on('click', function (e) {
        var link = getLink(editor, e.target);
        if (link && global$1.metaKeyPressed(e)) {
          e.preventDefault();
          gotoLink(editor, link);
        }
      });
      editor.on('keydown', function (e) {
        var link = getSelectedLink(editor);
        if (link && e.keyCode === 13 && hasOnlyAltModifier(e)) {
          e.preventDefault();
          gotoLink(editor, link);
        }
      });
    };
    var toggleActiveState = function (editor) {
      return function () {
        var self = this;
        editor.on('nodechange', function (e) {
          self.active(!editor.readonly && !!Utils.getAnchorElement(editor, e.element));
        });
      };
    };
    var toggleViewLinkState = function (editor) {
      return function () {
        var self = this;
        var toggleVisibility = function (e) {
          if (Utils.hasLinks(e.parents)) {
            self.show();
          } else {
            self.hide();
          }
        };
        if (!Utils.hasLinks(editor.dom.getParents(editor.selection.getStart()))) {
          self.hide();
        }
        editor.on('nodechange', toggleVisibility);
        self.on('remove', function () {
          editor.off('nodechange', toggleVisibility);
        });
      };
    };
    var Actions = {
      openDialog: openDialog,
      gotoSelectedLink: gotoSelectedLink,
      leftClickedOnAHref: leftClickedOnAHref,
      setupGotoLinks: setupGotoLinks,
      toggleActiveState: toggleActiveState,
      toggleViewLinkState: toggleViewLinkState
    };

    var register = function (editor) {
      editor.addCommand('mceLink', Actions.openDialog(editor));
    };
    var Commands = { register: register };

    var setup = function (editor) {
      editor.addShortcut('Meta+K', '', Actions.openDialog(editor));
    };
    var Keyboard = { setup: setup };

    var setupButtons = function (editor) {
      editor.addButton('link', {
        active: false,
        icon: 'link',
        tooltip: 'Insert/edit link',
        onclick: Actions.openDialog(editor),
        onpostrender: Actions.toggleActiveState(editor)
      });
      editor.addButton('unlink', {
        active: false,
        icon: 'unlink',
        tooltip: 'Remove link',
        onclick: Utils.unlink(editor),
        onpostrender: Actions.toggleActiveState(editor)
      });
      if (editor.addContextToolbar) {
        editor.addButton('openlink', {
          icon: 'newtab',
          tooltip: 'Open link',
          onclick: Actions.gotoSelectedLink(editor)
        });
      }
    };
    var setupMenuItems = function (editor) {
      editor.addMenuItem('openlink', {
        text: 'Open link',
        icon: 'newtab',
        onclick: Actions.gotoSelectedLink(editor),
        onPostRender: Actions.toggleViewLinkState(editor),
        prependToContext: true
      });
      editor.addMenuItem('link', {
        icon: 'link',
        text: 'Link',
        shortcut: 'Meta+K',
        onclick: Actions.openDialog(editor),
        stateSelector: 'a[href]',
        context: 'insert',
        prependToContext: true
      });
      editor.addMenuItem('unlink', {
        icon: 'unlink',
        text: 'Remove link',
        onclick: Utils.unlink(editor),
        stateSelector: 'a[href]'
      });
    };
    var setupContextToolbars = function (editor) {
      if (editor.addContextToolbar) {
        editor.addContextToolbar(Actions.leftClickedOnAHref(editor), 'openlink | link unlink');
      }
    };
    var Controls = {
      setupButtons: setupButtons,
      setupMenuItems: setupMenuItems,
      setupContextToolbars: setupContextToolbars
    };

    global.add('link', function (editor) {
      Controls.setupButtons(editor);
      Controls.setupMenuItems(editor);
      Controls.setupContextToolbars(editor);
      Actions.setupGotoLinks(editor);
      Commands.register(editor);
      Keyboard.setup(editor);
    });
    function Plugin () {
    }

    return Plugin;

}(window));
})();
                                                       tinymce/plugins/link/plugin.min.js                                                                  0000644                 00000021354 15212564050 0013255 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(l){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.util.VK"),e=function(t){return t.target_list},o=function(t){return t.rel_list},i=function(t){return t.link_class_list},p=function(t){return"boolean"==typeof t.link_assume_external_targets&&t.link_assume_external_targets},a=function(t){return"boolean"==typeof t.link_context_toolbar&&t.link_context_toolbar},r=function(t){return t.link_list},k=function(t){return"string"==typeof t.default_link_target},y=function(t){return t.default_link_target},b=e,_=function(t,e){t.settings.target_list=e},w=function(t){return!1!==e(t)},T=o,C=function(t){return o(t)!==undefined},M=i,O=function(t){return i(t)!==undefined},R=function(t){return!1!==t.link_title},N=function(t){return"boolean"==typeof t.allow_unsafe_link_target&&t.allow_unsafe_link_target},u=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),c=tinymce.util.Tools.resolve("tinymce.Env"),s=function(t){if(!c.ie||10<c.ie){var e=l.document.createElement("a");e.target="_blank",e.href=t,e.rel="noreferrer noopener";var n=l.document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,l.window,0,0,0,0,0,!1,!1,!1,!1,0,null),r=e,a=n,l.document.body.appendChild(r),r.dispatchEvent(a),l.document.body.removeChild(r)}else{var o=l.window.open("","_blank");if(o){o.opener=null;var i=o.document;i.open(),i.write('<meta http-equiv="refresh" content="0; url='+u.DOM.encode(t)+'">'),i.close()}}var r,a},A=tinymce.util.Tools.resolve("tinymce.util.Tools"),f=function(t,e){var n,o,i=["noopener"],r=t?t.split(/\s+/):[],a=function(t){return t.filter(function(t){return-1===A.inArray(i,t)})};return(r=e?(n=a(n=r)).length?n.concat(i):i:a(r)).length?(o=r,A.trim(o.sort().join(" "))):null},d=function(t,e){return e=e||t.selection.getNode(),v(e)?t.dom.select("a[href]",e)[0]:t.dom.getParent(e,"a[href]")},m=function(t){return t&&"A"===t.nodeName&&t.href},v=function(t){return t&&"FIGURE"===t.nodeName&&/\bimage\b/i.test(t.className)},g=function(t,e){var n,o;(o=t.dom.select("img",e)[0])&&(n=t.dom.getParents(o,"a[href]",e)[0])&&(n.parentNode.insertBefore(o,n),t.dom.remove(n))},h=function(t,e,n){var o,i;(i=t.dom.select("img",e)[0])&&(o=t.dom.create("a",n),i.parentNode.insertBefore(o,i),o.appendChild(i))},L=function(i,r){return function(o){i.undoManager.transact(function(){var t=i.selection.getNode(),e=d(i,t),n={href:o.href,target:o.target?o.target:null,rel:o.rel?o.rel:null,"class":o["class"]?o["class"]:null,title:o.title?o.title:null};C(i.settings)||!1!==N(i.settings)||(n.rel=f(n.rel,"_blank"===n.target)),o.href===r.href&&(r.attach(),r={}),e?(i.focus(),o.hasOwnProperty("text")&&("innerText"in e?e.innerText=o.text:e.textContent=o.text),i.dom.setAttribs(e,n),i.selection.select(e),i.undoManager.add()):v(t)?h(i,t,n):o.hasOwnProperty("text")?i.insertContent(i.dom.createHTML("a",n,i.dom.encode(o.text))):i.execCommand("mceInsertLink",!1,n)})}},P=function(e){return function(){e.undoManager.transact(function(){var t=e.selection.getNode();v(t)?g(e,t):e.execCommand("unlink")})}},x=m,E=function(t){return 0<A.grep(t,m).length},S=function(t){return!(/</.test(t)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(t)||-1===t.indexOf("href=")))},I=d,K=function(t,e){var n=e?e.innerText||e.textContent:t.getContent({format:"text"});return n.replace(/\uFEFF/g,"")},U=f,D=tinymce.util.Tools.resolve("tinymce.util.Delay"),B=tinymce.util.Tools.resolve("tinymce.util.XHR"),F={},q=function(t,o,e){var i=function(t,n){return n=n||[],A.each(t,function(t){var e={text:t.text||t.title};t.menu?e.menu=i(t.menu):(e.value=t.value,o&&o(e)),n.push(e)}),n};return i(t,e||[])},V=function(e,t,n){var o=e.selection.getRng();D.setEditorTimeout(e,function(){e.windowManager.confirm(t,function(t){e.selection.setRng(o),n(t)})})},z=function(a,t){var e,l,o,u,n,i,r,c,s,f,d,m={},v=a.selection,g=a.dom,h=function(t){var e=o.find("#text");(!e.value()||t.lastControl&&e.value()===t.lastControl.text())&&e.value(t.control.text()),o.find("#href").value(t.control.value())},x=function(){l||!u||m.text||this.parent().parent().find("#text")[0].value(this.value())};u=S(v.getContent()),e=I(a),m.text=l=K(a.selection,e),m.href=e?g.getAttrib(e,"href"):"",e?m.target=g.getAttrib(e,"target"):k(a.settings)&&(m.target=y(a.settings)),(d=g.getAttrib(e,"rel"))&&(m.rel=d),(d=g.getAttrib(e,"class"))&&(m["class"]=d),(d=g.getAttrib(e,"title"))&&(m.title=d),u&&(n={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){m.text=this.value()}}),t&&(i={type:"listbox",label:"Link list",values:q(t,function(t){t.value=a.convertURL(t.value||t.url,"href")},[{text:"None",value:""}]),onselect:h,value:a.convertURL(m.href,"href"),onPostRender:function(){i=this}}),w(a.settings)&&(b(a.settings)===undefined&&_(a,[{text:"None",value:""},{text:"New window",value:"_blank"}]),c={name:"target",type:"listbox",label:"Target",values:q(b(a.settings))}),C(a.settings)&&(r={name:"rel",type:"listbox",label:"Rel",values:q(T(a.settings),function(t){!1===N(a.settings)&&(t.value=U(t.value,"_blank"===m.target))})}),O(a.settings)&&(s={name:"class",type:"listbox",label:"Class",values:q(M(a.settings),function(t){t.value&&(t.textStyle=function(){return a.formatter.getCssText({inline:"a",classes:[t.value]})})})}),R(a.settings)&&(f={name:"title",type:"textbox",label:"Title",value:m.title}),o=a.windowManager.open({title:"Insert link",data:m,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:function(t){var e=t.meta||{};i&&i.value(a.convertURL(this.value(),"href")),A.each(t.meta,function(t,e){var n=o.find("#"+e);"text"===e?0===l.length&&(n.value(t),m.text=t):n.value(t)}),e.attach&&(F={href:this.value(),attach:e.attach}),e.text||x.call(this)},onkeyup:x,onpaste:x,onbeforecall:function(t){t.meta=o.toJSON()}},n,f,function(n){var o=[];if(A.each(a.dom.select("a:not([href])"),function(t){var e=t.name||t.id;e&&o.push({text:e,value:"#"+e,selected:-1!==n.indexOf("#"+e)})}),o.length)return o.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:o,onselect:h}}(m.href),i,r,c,s],onSubmit:function(t){var e=p(a.settings),n=L(a,F),o=P(a),i=A.extend({},m,t.data),r=i.href;r?(u&&i.text!==l||delete i.text,0<r.indexOf("@")&&-1===r.indexOf("//")&&-1===r.indexOf("mailto:")?V(a,"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(t){t&&(i.href="mailto:"+r),n(i)}):!0===e&&!/^\w+:/i.test(r)||!1===e&&/^\s*www[\.|\d\.]/i.test(r)?V(a,"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(t){t&&(i.href="http://"+r),n(i)}):n(i)):o()}})},H=function(t){var e,n,o;n=z,"string"==typeof(o=r((e=t).settings))?B.send({url:o,success:function(t){n(e,JSON.parse(t))}}):"function"==typeof o?o(function(t){n(e,t)}):n(e,o)},J=function(t,e){return t.dom.getParent(e,"a[href]")},$=function(t){return J(t,t.selection.getStart())},j=function(t,e){if(e){var n=(i=e).getAttribute("data-mce-href")||i.getAttribute("href");if(/^#/.test(n)){var o=t.$(n);o.length&&t.selection.scrollIntoView(o[0],!0)}else s(e.href)}var i},G=function(t){return function(){H(t)}},X=function(t){return function(){j(t,$(t))}},Q=function(r){return function(t){var e,n,o,i;return!!(a(r.settings)&&(!(i=r.plugins.contextmenu)||!i.isContextMenuVisible())&&x(t)&&3===(o=(n=(e=r.selection).getRng()).startContainer).nodeType&&e.isCollapsed()&&0<n.startOffset&&n.startOffset<o.data.length)}},W=function(o){o.on("click",function(t){var e=J(o,t.target);e&&n.metaKeyPressed(t)&&(t.preventDefault(),j(o,e))}),o.on("keydown",function(t){var e,n=$(o);n&&13===t.keyCode&&!0===(e=t).altKey&&!1===e.shiftKey&&!1===e.ctrlKey&&!1===e.metaKey&&(t.preventDefault(),j(o,n))})},Y=function(n){return function(){var e=this;n.on("nodechange",function(t){e.active(!n.readonly&&!!I(n,t.element))})}},Z=function(n){return function(){var e=this,t=function(t){E(t.parents)?e.show():e.hide()};E(n.dom.getParents(n.selection.getStart()))||e.hide(),n.on("nodechange",t),e.on("remove",function(){n.off("nodechange",t)})}},tt=function(t){t.addCommand("mceLink",G(t))},et=function(t){t.addShortcut("Meta+K","",G(t))},nt=function(t){t.addButton("link",{active:!1,icon:"link",tooltip:"Insert/edit link",onclick:G(t),onpostrender:Y(t)}),t.addButton("unlink",{active:!1,icon:"unlink",tooltip:"Remove link",onclick:P(t),onpostrender:Y(t)}),t.addContextToolbar&&t.addButton("openlink",{icon:"newtab",tooltip:"Open link",onclick:X(t)})},ot=function(t){t.addMenuItem("openlink",{text:"Open link",icon:"newtab",onclick:X(t),onPostRender:Z(t),prependToContext:!0}),t.addMenuItem("link",{icon:"link",text:"Link",shortcut:"Meta+K",onclick:G(t),stateSelector:"a[href]",context:"insert",prependToContext:!0}),t.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onclick:P(t),stateSelector:"a[href]"})},it=function(t){t.addContextToolbar&&t.addContextToolbar(Q(t),"openlink | link unlink")};t.add("link",function(t){nt(t),ot(t),it(t),W(t),tt(t),et(t)})}(window);                                                                                                                                                                                                                                                                                    tinymce/plugins/lists/plugin.js                                                                     0000644                 00000211417 15212564050 0012675 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       (function () {
var lists = (function (domGlobals) {
    'use strict';

    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');

    var global$1 = tinymce.util.Tools.resolve('tinymce.dom.RangeUtils');

    var global$2 = tinymce.util.Tools.resolve('tinymce.dom.TreeWalker');

    var global$3 = tinymce.util.Tools.resolve('tinymce.util.VK');

    var global$4 = tinymce.util.Tools.resolve('tinymce.dom.BookmarkManager');

    var global$5 = tinymce.util.Tools.resolve('tinymce.util.Tools');

    var global$6 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');

    var isTextNode = function (node) {
      return node && node.nodeType === 3;
    };
    var isListNode = function (node) {
      return node && /^(OL|UL|DL)$/.test(node.nodeName);
    };
    var isOlUlNode = function (node) {
      return node && /^(OL|UL)$/.test(node.nodeName);
    };
    var isListItemNode = function (node) {
      return node && /^(LI|DT|DD)$/.test(node.nodeName);
    };
    var isDlItemNode = function (node) {
      return node && /^(DT|DD)$/.test(node.nodeName);
    };
    var isTableCellNode = function (node) {
      return node && /^(TH|TD)$/.test(node.nodeName);
    };
    var isBr = function (node) {
      return node && node.nodeName === 'BR';
    };
    var isFirstChild = function (node) {
      return node.parentNode.firstChild === node;
    };
    var isLastChild = function (node) {
      return node.parentNode.lastChild === node;
    };
    var isTextBlock = function (editor, node) {
      return node && !!editor.schema.getTextBlockElements()[node.nodeName];
    };
    var isBlock = function (node, blockElements) {
      return node && node.nodeName in blockElements;
    };
    var isBogusBr = function (dom, node) {
      if (!isBr(node)) {
        return false;
      }
      if (dom.isBlock(node.nextSibling) && !isBr(node.previousSibling)) {
        return true;
      }
      return false;
    };
    var isEmpty = function (dom, elm, keepBookmarks) {
      var empty = dom.isEmpty(elm);
      if (keepBookmarks && dom.select('span[data-mce-type=bookmark]', elm).length > 0) {
        return false;
      }
      return empty;
    };
    var isChildOfBody = function (dom, elm) {
      return dom.isChildOf(elm, dom.getRoot());
    };
    var NodeType = {
      isTextNode: isTextNode,
      isListNode: isListNode,
      isOlUlNode: isOlUlNode,
      isDlItemNode: isDlItemNode,
      isListItemNode: isListItemNode,
      isTableCellNode: isTableCellNode,
      isBr: isBr,
      isFirstChild: isFirstChild,
      isLastChild: isLastChild,
      isTextBlock: isTextBlock,
      isBlock: isBlock,
      isBogusBr: isBogusBr,
      isEmpty: isEmpty,
      isChildOfBody: isChildOfBody
    };

    var getNormalizedPoint = function (container, offset) {
      if (NodeType.isTextNode(container)) {
        return {
          container: container,
          offset: offset
        };
      }
      var node = global$1.getNode(container, offset);
      if (NodeType.isTextNode(node)) {
        return {
          container: node,
          offset: offset >= container.childNodes.length ? node.data.length : 0
        };
      } else if (node.previousSibling && NodeType.isTextNode(node.previousSibling)) {
        return {
          container: node.previousSibling,
          offset: node.previousSibling.data.length
        };
      } else if (node.nextSibling && NodeType.isTextNode(node.nextSibling)) {
        return {
          container: node.nextSibling,
          offset: 0
        };
      }
      return {
        container: container,
        offset: offset
      };
    };
    var normalizeRange = function (rng) {
      var outRng = rng.cloneRange();
      var rangeStart = getNormalizedPoint(rng.startContainer, rng.startOffset);
      outRng.setStart(rangeStart.container, rangeStart.offset);
      var rangeEnd = getNormalizedPoint(rng.endContainer, rng.endOffset);
      outRng.setEnd(rangeEnd.container, rangeEnd.offset);
      return outRng;
    };
    var Range = {
      getNormalizedPoint: getNormalizedPoint,
      normalizeRange: normalizeRange
    };

    var DOM = global$6.DOM;
    var createBookmark = function (rng) {
      var bookmark = {};
      var setupEndPoint = function (start) {
        var offsetNode, container, offset;
        container = rng[start ? 'startContainer' : 'endContainer'];
        offset = rng[start ? 'startOffset' : 'endOffset'];
        if (container.nodeType === 1) {
          offsetNode = DOM.create('span', { 'data-mce-type': 'bookmark' });
          if (container.hasChildNodes()) {
            offset = Math.min(offset, container.childNodes.length - 1);
            if (start) {
              container.insertBefore(offsetNode, container.childNodes[offset]);
            } else {
              DOM.insertAfter(offsetNode, container.childNodes[offset]);
            }
          } else {
            container.appendChild(offsetNode);
          }
          container = offsetNode;
          offset = 0;
        }
        bookmark[start ? 'startContainer' : 'endContainer'] = container;
        bookmark[start ? 'startOffset' : 'endOffset'] = offset;
      };
      setupEndPoint(true);
      if (!rng.collapsed) {
        setupEndPoint();
      }
      return bookmark;
    };
    var resolveBookmark = function (bookmark) {
      function restoreEndPoint(start) {
        var container, offset, node;
        var nodeIndex = function (container) {
          var node = container.parentNode.firstChild, idx = 0;
          while (node) {
            if (node === container) {
              return idx;
            }
            if (node.nodeType !== 1 || node.getAttribute('data-mce-type') !== 'bookmark') {
              idx++;
            }
            node = node.nextSibling;
          }
          return -1;
        };
        container = node = bookmark[start ? 'startContainer' : 'endContainer'];
        offset = bookmark[start ? 'startOffset' : 'endOffset'];
        if (!container) {
          return;
        }
        if (container.nodeType === 1) {
          offset = nodeIndex(container);
          container = container.parentNode;
          DOM.remove(node);
          if (!container.hasChildNodes() && DOM.isBlock(container)) {
            container.appendChild(DOM.create('br'));
          }
        }
        bookmark[start ? 'startContainer' : 'endContainer'] = container;
        bookmark[start ? 'startOffset' : 'endOffset'] = offset;
      }
      restoreEndPoint(true);
      restoreEndPoint();
      var rng = DOM.createRng();
      rng.setStart(bookmark.startContainer, bookmark.startOffset);
      if (bookmark.endContainer) {
        rng.setEnd(bookmark.endContainer, bookmark.endOffset);
      }
      return Range.normalizeRange(rng);
    };
    var Bookmark = {
      createBookmark: createBookmark,
      resolveBookmark: resolveBookmark
    };

    var noop = function () {
    };
    var constant = function (value) {
      return function () {
        return value;
      };
    };
    var not = function (f) {
      return function () {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
          args[_i] = arguments[_i];
        }
        return !f.apply(null, args);
      };
    };
    var never = constant(false);
    var always = constant(true);

    var none = function () {
      return NONE;
    };
    var NONE = function () {
      var eq = function (o) {
        return o.isNone();
      };
      var call = function (thunk) {
        return thunk();
      };
      var id = function (n) {
        return n;
      };
      var me = {
        fold: function (n, s) {
          return n();
        },
        is: never,
        isSome: never,
        isNone: always,
        getOr: id,
        getOrThunk: call,
        getOrDie: function (msg) {
          throw new Error(msg || 'error: getOrDie called on none.');
        },
        getOrNull: constant(null),
        getOrUndefined: constant(undefined),
        or: id,
        orThunk: call,
        map: none,
        each: noop,
        bind: none,
        exists: never,
        forall: always,
        filter: none,
        equals: eq,
        equals_: eq,
        toArray: function () {
          return [];
        },
        toString: constant('none()')
      };
      if (Object.freeze) {
        Object.freeze(me);
      }
      return me;
    }();
    var some = function (a) {
      var constant_a = constant(a);
      var self = function () {
        return me;
      };
      var bind = function (f) {
        return f(a);
      };
      var me = {
        fold: function (n, s) {
          return s(a);
        },
        is: function (v) {
          return a === v;
        },
        isSome: always,
        isNone: never,
        getOr: constant_a,
        getOrThunk: constant_a,
        getOrDie: constant_a,
        getOrNull: constant_a,
        getOrUndefined: constant_a,
        or: self,
        orThunk: self,
        map: function (f) {
          return some(f(a));
        },
        each: function (f) {
          f(a);
        },
        bind: bind,
        exists: bind,
        forall: bind,
        filter: function (f) {
          return f(a) ? me : NONE;
        },
        toArray: function () {
          return [a];
        },
        toString: function () {
          return 'some(' + a + ')';
        },
        equals: function (o) {
          return o.is(a);
        },
        equals_: function (o, elementEq) {
          return o.fold(never, function (b) {
            return elementEq(a, b);
          });
        }
      };
      return me;
    };
    var from = function (value) {
      return value === null || value === undefined ? NONE : some(value);
    };
    var Option = {
      some: some,
      none: none,
      from: from
    };

    var typeOf = function (x) {
      if (x === null) {
        return 'null';
      }
      var t = typeof x;
      if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
        return 'array';
      }
      if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
        return 'string';
      }
      return t;
    };
    var isType = function (type) {
      return function (value) {
        return typeOf(value) === type;
      };
    };
    var isString = isType('string');
    var isArray = isType('array');
    var isBoolean = isType('boolean');
    var isFunction = isType('function');
    var isNumber = isType('number');

    var nativeSlice = Array.prototype.slice;
    var nativePush = Array.prototype.push;
    var map = function (xs, f) {
      var len = xs.length;
      var r = new Array(len);
      for (var i = 0; i < len; i++) {
        var x = xs[i];
        r[i] = f(x, i);
      }
      return r;
    };
    var each = function (xs, f) {
      for (var i = 0, len = xs.length; i < len; i++) {
        var x = xs[i];
        f(x, i);
      }
    };
    var filter = function (xs, pred) {
      var r = [];
      for (var i = 0, len = xs.length; i < len; i++) {
        var x = xs[i];
        if (pred(x, i)) {
          r.push(x);
        }
      }
      return r;
    };
    var groupBy = function (xs, f) {
      if (xs.length === 0) {
        return [];
      } else {
        var wasType = f(xs[0]);
        var r = [];
        var group = [];
        for (var i = 0, len = xs.length; i < len; i++) {
          var x = xs[i];
          var type = f(x);
          if (type !== wasType) {
            r.push(group);
            group = [];
          }
          wasType = type;
          group.push(x);
        }
        if (group.length !== 0) {
          r.push(group);
        }
        return r;
      }
    };
    var foldl = function (xs, f, acc) {
      each(xs, function (x) {
        acc = f(acc, x);
      });
      return acc;
    };
    var find = function (xs, pred) {
      for (var i = 0, len = xs.length; i < len; i++) {
        var x = xs[i];
        if (pred(x, i)) {
          return Option.some(x);
        }
      }
      return Option.none();
    };
    var flatten = function (xs) {
      var r = [];
      for (var i = 0, len = xs.length; i < len; ++i) {
        if (!isArray(xs[i])) {
          throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
        }
        nativePush.apply(r, xs[i]);
      }
      return r;
    };
    var bind = function (xs, f) {
      var output = map(xs, f);
      return flatten(output);
    };
    var reverse = function (xs) {
      var r = nativeSlice.call(xs, 0);
      r.reverse();
      return r;
    };
    var head = function (xs) {
      return xs.length === 0 ? Option.none() : Option.some(xs[0]);
    };
    var last = function (xs) {
      return xs.length === 0 ? Option.none() : Option.some(xs[xs.length - 1]);
    };
    var from$1 = isFunction(Array.from) ? Array.from : function (x) {
      return nativeSlice.call(x);
    };

    var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();

    var path = function (parts, scope) {
      var o = scope !== undefined && scope !== null ? scope : Global;
      for (var i = 0; i < parts.length && o !== undefined && o !== null; ++i) {
        o = o[parts[i]];
      }
      return o;
    };
    var resolve = function (p, scope) {
      var parts = p.split('.');
      return path(parts, scope);
    };

    var unsafe = function (name, scope) {
      return resolve(name, scope);
    };
    var getOrDie = function (name, scope) {
      var actual = unsafe(name, scope);
      if (actual === undefined || actual === null) {
        throw new Error(name + ' not available on this browser');
      }
      return actual;
    };
    var Global$1 = { getOrDie: getOrDie };

    var htmlElement = function (scope) {
      return Global$1.getOrDie('HTMLElement', scope);
    };
    var isPrototypeOf = function (x) {
      var scope = resolve('ownerDocument.defaultView', x);
      return htmlElement(scope).prototype.isPrototypeOf(x);
    };
    var HTMLElement = { isPrototypeOf: isPrototypeOf };

    var global$7 = tinymce.util.Tools.resolve('tinymce.dom.DomQuery');

    var getParentList = function (editor) {
      var selectionStart = editor.selection.getStart(true);
      return editor.dom.getParent(selectionStart, 'OL,UL,DL', getClosestListRootElm(editor, selectionStart));
    };
    var isParentListSelected = function (parentList, selectedBlocks) {
      return parentList && selectedBlocks.length === 1 && selectedBlocks[0] === parentList;
    };
    var findSubLists = function (parentList) {
      return global$5.grep(parentList.querySelectorAll('ol,ul,dl'), function (elm) {
        return NodeType.isListNode(elm);
      });
    };
    var getSelectedSubLists = function (editor) {
      var parentList = getParentList(editor);
      var selectedBlocks = editor.selection.getSelectedBlocks();
      if (isParentListSelected(parentList, selectedBlocks)) {
        return findSubLists(parentList);
      } else {
        return global$5.grep(selectedBlocks, function (elm) {
          return NodeType.isListNode(elm) && parentList !== elm;
        });
      }
    };
    var findParentListItemsNodes = function (editor, elms) {
      var listItemsElms = global$5.map(elms, function (elm) {
        var parentLi = editor.dom.getParent(elm, 'li,dd,dt', getClosestListRootElm(editor, elm));
        return parentLi ? parentLi : elm;
      });
      return global$7.unique(listItemsElms);
    };
    var getSelectedListItems = function (editor) {
      var selectedBlocks = editor.selection.getSelectedBlocks();
      return global$5.grep(findParentListItemsNodes(editor, selectedBlocks), function (block) {
        return NodeType.isListItemNode(block);
      });
    };
    var getSelectedDlItems = function (editor) {
      return filter(getSelectedListItems(editor), NodeType.isDlItemNode);
    };
    var getClosestListRootElm = function (editor, elm) {
      var parentTableCell = editor.dom.getParents(elm, 'TD,TH');
      var root = parentTableCell.length > 0 ? parentTableCell[0] : editor.getBody();
      return root;
    };
    var findLastParentListNode = function (editor, elm) {
      var parentLists = editor.dom.getParents(elm, 'ol,ul', getClosestListRootElm(editor, elm));
      return last(parentLists);
    };
    var getSelectedLists = function (editor) {
      var firstList = findLastParentListNode(editor, editor.selection.getStart());
      var subsequentLists = filter(editor.selection.getSelectedBlocks(), NodeType.isOlUlNode);
      return firstList.toArray().concat(subsequentLists);
    };
    var getSelectedListRoots = function (editor) {
      var selectedLists = getSelectedLists(editor);
      return getUniqueListRoots(editor, selectedLists);
    };
    var getUniqueListRoots = function (editor, lists) {
      var listRoots = map(lists, function (list) {
        return findLastParentListNode(editor, list).getOr(list);
      });
      return global$7.unique(listRoots);
    };
    var isList = function (editor) {
      var list = getParentList(editor);
      return HTMLElement.isPrototypeOf(list);
    };
    var Selection = {
      isList: isList,
      getParentList: getParentList,
      getSelectedSubLists: getSelectedSubLists,
      getSelectedListItems: getSelectedListItems,
      getClosestListRootElm: getClosestListRootElm,
      getSelectedDlItems: getSelectedDlItems,
      getSelectedListRoots: getSelectedListRoots
    };

    var fromHtml = function (html, scope) {
      var doc = scope || domGlobals.document;
      var div = doc.createElement('div');
      div.innerHTML = html;
      if (!div.hasChildNodes() || div.childNodes.length > 1) {
        domGlobals.console.error('HTML does not have a single root node', html);
        throw new Error('HTML must have a single root node');
      }
      return fromDom(div.childNodes[0]);
    };
    var fromTag = function (tag, scope) {
      var doc = scope || domGlobals.document;
      var node = doc.createElement(tag);
      return fromDom(node);
    };
    var fromText = function (text, scope) {
      var doc = scope || domGlobals.document;
      var node = doc.createTextNode(text);
      return fromDom(node);
    };
    var fromDom = function (node) {
      if (node === null || node === undefined) {
        throw new Error('Node cannot be null or undefined');
      }
      return { dom: constant(node) };
    };
    var fromPoint = function (docElm, x, y) {
      var doc = docElm.dom();
      return Option.from(doc.elementFromPoint(x, y)).map(fromDom);
    };
    var Element = {
      fromHtml: fromHtml,
      fromTag: fromTag,
      fromText: fromText,
      fromDom: fromDom,
      fromPoint: fromPoint
    };

    var lift2 = function (oa, ob, f) {
      return oa.isSome() && ob.isSome() ? Option.some(f(oa.getOrDie(), ob.getOrDie())) : Option.none();
    };

    var fromElements = function (elements, scope) {
      var doc = scope || domGlobals.document;
      var fragment = doc.createDocumentFragment();
      each(elements, function (element) {
        fragment.appendChild(element.dom());
      });
      return Element.fromDom(fragment);
    };

    var Immutable = function () {
      var fields = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        fields[_i] = arguments[_i];
      }
      return function () {
        var values = [];
        for (var _i = 0; _i < arguments.length; _i++) {
          values[_i] = arguments[_i];
        }
        if (fields.length !== values.length) {
          throw new Error('Wrong number of arguments to struct. Expected "[' + fields.length + ']", got ' + values.length + ' arguments');
        }
        var struct = {};
        each(fields, function (name, i) {
          struct[name] = constant(values[i]);
        });
        return struct;
      };
    };

    var keys = Object.keys;
    var each$1 = function (obj, f) {
      var props = keys(obj);
      for (var k = 0, len = props.length; k < len; k++) {
        var i = props[k];
        var x = obj[i];
        f(x, i);
      }
    };

    var node = function () {
      var f = Global$1.getOrDie('Node');
      return f;
    };
    var compareDocumentPosition = function (a, b, match) {
      return (a.compareDocumentPosition(b) & match) !== 0;
    };
    var documentPositionPreceding = function (a, b) {
      return compareDocumentPosition(a, b, node().DOCUMENT_POSITION_PRECEDING);
    };
    var documentPositionContainedBy = function (a, b) {
      return compareDocumentPosition(a, b, node().DOCUMENT_POSITION_CONTAINED_BY);
    };
    var Node = {
      documentPositionPreceding: documentPositionPreceding,
      documentPositionContainedBy: documentPositionContainedBy
    };

    var cached = function (f) {
      var called = false;
      var r;
      return function () {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
          args[_i] = arguments[_i];
        }
        if (!called) {
          called = true;
          r = f.apply(null, args);
        }
        return r;
      };
    };

    var firstMatch = function (regexes, s) {
      for (var i = 0; i < regexes.length; i++) {
        var x = regexes[i];
        if (x.test(s)) {
          return x;
        }
      }
      return undefined;
    };
    var find$1 = function (regexes, agent) {
      var r = firstMatch(regexes, agent);
      if (!r) {
        return {
          major: 0,
          minor: 0
        };
      }
      var group = function (i) {
        return Number(agent.replace(r, '$' + i));
      };
      return nu(group(1), group(2));
    };
    var detect = function (versionRegexes, agent) {
      var cleanedAgent = String(agent).toLowerCase();
      if (versionRegexes.length === 0) {
        return unknown();
      }
      return find$1(versionRegexes, cleanedAgent);
    };
    var unknown = function () {
      return nu(0, 0);
    };
    var nu = function (major, minor) {
      return {
        major: major,
        minor: minor
      };
    };
    var Version = {
      nu: nu,
      detect: detect,
      unknown: unknown
    };

    var edge = 'Edge';
    var chrome = 'Chrome';
    var ie = 'IE';
    var opera = 'Opera';
    var firefox = 'Firefox';
    var safari = 'Safari';
    var isBrowser = function (name, current) {
      return function () {
        return current === name;
      };
    };
    var unknown$1 = function () {
      return nu$1({
        current: undefined,
        version: Version.unknown()
      });
    };
    var nu$1 = function (info) {
      var current = info.current;
      var version = info.version;
      return {
        current: current,
        version: version,
        isEdge: isBrowser(edge, current),
        isChrome: isBrowser(chrome, current),
        isIE: isBrowser(ie, current),
        isOpera: isBrowser(opera, current),
        isFirefox: isBrowser(firefox, current),
        isSafari: isBrowser(safari, current)
      };
    };
    var Browser = {
      unknown: unknown$1,
      nu: nu$1,
      edge: constant(edge),
      chrome: constant(chrome),
      ie: constant(ie),
      opera: constant(opera),
      firefox: constant(firefox),
      safari: constant(safari)
    };

    var windows = 'Windows';
    var ios = 'iOS';
    var android = 'Android';
    var linux = 'Linux';
    var osx = 'OSX';
    var solaris = 'Solaris';
    var freebsd = 'FreeBSD';
    var isOS = function (name, current) {
      return function () {
        return current === name;
      };
    };
    var unknown$2 = function () {
      return nu$2({
        current: undefined,
        version: Version.unknown()
      });
    };
    var nu$2 = function (info) {
      var current = info.current;
      var version = info.version;
      return {
        current: current,
        version: version,
        isWindows: isOS(windows, current),
        isiOS: isOS(ios, current),
        isAndroid: isOS(android, current),
        isOSX: isOS(osx, current),
        isLinux: isOS(linux, current),
        isSolaris: isOS(solaris, current),
        isFreeBSD: isOS(freebsd, current)
      };
    };
    var OperatingSystem = {
      unknown: unknown$2,
      nu: nu$2,
      windows: constant(windows),
      ios: constant(ios),
      android: constant(android),
      linux: constant(linux),
      osx: constant(osx),
      solaris: constant(solaris),
      freebsd: constant(freebsd)
    };

    var DeviceType = function (os, browser, userAgent) {
      var isiPad = os.isiOS() && /ipad/i.test(userAgent) === true;
      var isiPhone = os.isiOS() && !isiPad;
      var isAndroid3 = os.isAndroid() && os.version.major === 3;
      var isAndroid4 = os.isAndroid() && os.version.major === 4;
      var isTablet = isiPad || isAndroid3 || isAndroid4 && /mobile/i.test(userAgent) === true;
      var isTouch = os.isiOS() || os.isAndroid();
      var isPhone = isTouch && !isTablet;
      var iOSwebview = browser.isSafari() && os.isiOS() && /safari/i.test(userAgent) === false;
      return {
        isiPad: constant(isiPad),
        isiPhone: constant(isiPhone),
        isTablet: constant(isTablet),
        isPhone: constant(isPhone),
        isTouch: constant(isTouch),
        isAndroid: os.isAndroid,
        isiOS: os.isiOS,
        isWebView: constant(iOSwebview)
      };
    };

    var detect$1 = function (candidates, userAgent) {
      var agent = String(userAgent).toLowerCase();
      return find(candidates, function (candidate) {
        return candidate.search(agent);
      });
    };
    var detectBrowser = function (browsers, userAgent) {
      return detect$1(browsers, userAgent).map(function (browser) {
        var version = Version.detect(browser.versionRegexes, userAgent);
        return {
          current: browser.name,
          version: version
        };
      });
    };
    var detectOs = function (oses, userAgent) {
      return detect$1(oses, userAgent).map(function (os) {
        var version = Version.detect(os.versionRegexes, userAgent);
        return {
          current: os.name,
          version: version
        };
      });
    };
    var UaString = {
      detectBrowser: detectBrowser,
      detectOs: detectOs
    };

    var contains = function (str, substr) {
      return str.indexOf(substr) !== -1;
    };

    var normalVersionRegex = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/;
    var checkContains = function (target) {
      return function (uastring) {
        return contains(uastring, target);
      };
    };
    var browsers = [
      {
        name: 'Edge',
        versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],
        search: function (uastring) {
          return contains(uastring, 'edge/') && contains(uastring, 'chrome') && contains(uastring, 'safari') && contains(uastring, 'applewebkit');
        }
      },
      {
        name: 'Chrome',
        versionRegexes: [
          /.*?chrome\/([0-9]+)\.([0-9]+).*/,
          normalVersionRegex
        ],
        search: function (uastring) {
          return contains(uastring, 'chrome') && !contains(uastring, 'chromeframe');
        }
      },
      {
        name: 'IE',
        versionRegexes: [
          /.*?msie\ ?([0-9]+)\.([0-9]+).*/,
          /.*?rv:([0-9]+)\.([0-9]+).*/
        ],
        search: function (uastring) {
          return contains(uastring, 'msie') || contains(uastring, 'trident');
        }
      },
      {
        name: 'Opera',
        versionRegexes: [
          normalVersionRegex,
          /.*?opera\/([0-9]+)\.([0-9]+).*/
        ],
        search: checkContains('opera')
      },
      {
        name: 'Firefox',
        versionRegexes: [/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],
        search: checkContains('firefox')
      },
      {
        name: 'Safari',
        versionRegexes: [
          normalVersionRegex,
          /.*?cpu os ([0-9]+)_([0-9]+).*/
        ],
        search: function (uastring) {
          return (contains(uastring, 'safari') || contains(uastring, 'mobile/')) && contains(uastring, 'applewebkit');
        }
      }
    ];
    var oses = [
      {
        name: 'Windows',
        search: checkContains('win'),
        versionRegexes: [/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]
      },
      {
        name: 'iOS',
        search: function (uastring) {
          return contains(uastring, 'iphone') || contains(uastring, 'ipad');
        },
        versionRegexes: [
          /.*?version\/\ ?([0-9]+)\.([0-9]+).*/,
          /.*cpu os ([0-9]+)_([0-9]+).*/,
          /.*cpu iphone os ([0-9]+)_([0-9]+).*/
        ]
      },
      {
        name: 'Android',
        search: checkContains('android'),
        versionRegexes: [/.*?android\ ?([0-9]+)\.([0-9]+).*/]
      },
      {
        name: 'OSX',
        search: checkContains('os x'),
        versionRegexes: [/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]
      },
      {
        name: 'Linux',
        search: checkContains('linux'),
        versionRegexes: []
      },
      {
        name: 'Solaris',
        search: checkContains('sunos'),
        versionRegexes: []
      },
      {
        name: 'FreeBSD',
        search: checkContains('freebsd'),
        versionRegexes: []
      }
    ];
    var PlatformInfo = {
      browsers: constant(browsers),
      oses: constant(oses)
    };

    var detect$2 = function (userAgent) {
      var browsers = PlatformInfo.browsers();
      var oses = PlatformInfo.oses();
      var browser = UaString.detectBrowser(browsers, userAgent).fold(Browser.unknown, Browser.nu);
      var os = UaString.detectOs(oses, userAgent).fold(OperatingSystem.unknown, OperatingSystem.nu);
      var deviceType = DeviceType(os, browser, userAgent);
      return {
        browser: browser,
        os: os,
        deviceType: deviceType
      };
    };
    var PlatformDetection = { detect: detect$2 };

    var detect$3 = cached(function () {
      var userAgent = domGlobals.navigator.userAgent;
      return PlatformDetection.detect(userAgent);
    });
    var PlatformDetection$1 = { detect: detect$3 };

    var ATTRIBUTE = domGlobals.Node.ATTRIBUTE_NODE;
    var CDATA_SECTION = domGlobals.Node.CDATA_SECTION_NODE;
    var COMMENT = domGlobals.Node.COMMENT_NODE;
    var DOCUMENT = domGlobals.Node.DOCUMENT_NODE;
    var DOCUMENT_TYPE = domGlobals.Node.DOCUMENT_TYPE_NODE;
    var DOCUMENT_FRAGMENT = domGlobals.Node.DOCUMENT_FRAGMENT_NODE;
    var ELEMENT = domGlobals.Node.ELEMENT_NODE;
    var TEXT = domGlobals.Node.TEXT_NODE;
    var PROCESSING_INSTRUCTION = domGlobals.Node.PROCESSING_INSTRUCTION_NODE;
    var ENTITY_REFERENCE = domGlobals.Node.ENTITY_REFERENCE_NODE;
    var ENTITY = domGlobals.Node.ENTITY_NODE;
    var NOTATION = domGlobals.Node.NOTATION_NODE;

    var ELEMENT$1 = ELEMENT;
    var is = function (element, selector) {
      var dom = element.dom();
      if (dom.nodeType !== ELEMENT$1) {
        return false;
      } else {
        var elem = dom;
        if (elem.matches !== undefined) {
          return elem.matches(selector);
        } else if (elem.msMatchesSelector !== undefined) {
          return elem.msMatchesSelector(selector);
        } else if (elem.webkitMatchesSelector !== undefined) {
          return elem.webkitMatchesSelector(selector);
        } else if (elem.mozMatchesSelector !== undefined) {
          return elem.mozMatchesSelector(selector);
        } else {
          throw new Error('Browser lacks native selectors');
        }
      }
    };

    var eq = function (e1, e2) {
      return e1.dom() === e2.dom();
    };
    var regularContains = function (e1, e2) {
      var d1 = e1.dom();
      var d2 = e2.dom();
      return d1 === d2 ? false : d1.contains(d2);
    };
    var ieContains = function (e1, e2) {
      return Node.documentPositionContainedBy(e1.dom(), e2.dom());
    };
    var browser = PlatformDetection$1.detect().browser;
    var contains$1 = browser.isIE() ? ieContains : regularContains;
    var is$1 = is;

    var parent = function (element) {
      return Option.from(element.dom().parentNode).map(Element.fromDom);
    };
    var children = function (element) {
      return map(element.dom().childNodes, Element.fromDom);
    };
    var child = function (element, index) {
      var cs = element.dom().childNodes;
      return Option.from(cs[index]).map(Element.fromDom);
    };
    var firstChild = function (element) {
      return child(element, 0);
    };
    var lastChild = function (element) {
      return child(element, element.dom().childNodes.length - 1);
    };
    var spot = Immutable('element', 'offset');

    var before = function (marker, element) {
      var parent$1 = parent(marker);
      parent$1.each(function (v) {
        v.dom().insertBefore(element.dom(), marker.dom());
      });
    };
    var append = function (parent, element) {
      parent.dom().appendChild(element.dom());
    };

    var before$1 = function (marker, elements) {
      each(elements, function (x) {
        before(marker, x);
      });
    };
    var append$1 = function (parent, elements) {
      each(elements, function (x) {
        append(parent, x);
      });
    };

    var remove = function (element) {
      var dom = element.dom();
      if (dom.parentNode !== null) {
        dom.parentNode.removeChild(dom);
      }
    };

    var name = function (element) {
      var r = element.dom().nodeName;
      return r.toLowerCase();
    };
    var type = function (element) {
      return element.dom().nodeType;
    };
    var isType$1 = function (t) {
      return function (element) {
        return type(element) === t;
      };
    };
    var isElement = isType$1(ELEMENT);

    var rawSet = function (dom, key, value) {
      if (isString(value) || isBoolean(value) || isNumber(value)) {
        dom.setAttribute(key, value + '');
      } else {
        domGlobals.console.error('Invalid call to Attr.set. Key ', key, ':: Value ', value, ':: Element ', dom);
        throw new Error('Attribute value was not simple');
      }
    };
    var setAll = function (element, attrs) {
      var dom = element.dom();
      each$1(attrs, function (v, k) {
        rawSet(dom, k, v);
      });
    };
    var clone = function (element) {
      return foldl(element.dom().attributes, function (acc, attr) {
        acc[attr.name] = attr.value;
        return acc;
      }, {});
    };

    var isSupported = function (dom) {
      return dom.style !== undefined && isFunction(dom.style.getPropertyValue);
    };

    var internalSet = function (dom, property, value) {
      if (!isString(value)) {
        domGlobals.console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom);
        throw new Error('CSS value must be a string: ' + value);
      }
      if (isSupported(dom)) {
        dom.style.setProperty(property, value);
      }
    };
    var set = function (element, property, value) {
      var dom = element.dom();
      internalSet(dom, property, value);
    };

    var clone$1 = function (original, isDeep) {
      return Element.fromDom(original.dom().cloneNode(isDeep));
    };
    var deep = function (original) {
      return clone$1(original, true);
    };
    var shallowAs = function (original, tag) {
      var nu = Element.fromTag(tag);
      var attributes = clone(original);
      setAll(nu, attributes);
      return nu;
    };
    var mutate = function (original, tag) {
      var nu = shallowAs(original, tag);
      before(original, nu);
      var children$1 = children(original);
      append$1(nu, children$1);
      remove(original);
      return nu;
    };

    var joinSegment = function (parent, child) {
      append(parent.item, child.list);
    };
    var joinSegments = function (segments) {
      for (var i = 1; i < segments.length; i++) {
        joinSegment(segments[i - 1], segments[i]);
      }
    };
    var appendSegments = function (head$1, tail) {
      lift2(last(head$1), head(tail), joinSegment);
    };
    var createSegment = function (scope, listType) {
      var segment = {
        list: Element.fromTag(listType, scope),
        item: Element.fromTag('li', scope)
      };
      append(segment.list, segment.item);
      return segment;
    };
    var createSegments = function (scope, entry, size) {
      var segments = [];
      for (var i = 0; i < size; i++) {
        segments.push(createSegment(scope, entry.listType));
      }
      return segments;
    };
    var populateSegments = function (segments, entry) {
      for (var i = 0; i < segments.length - 1; i++) {
        set(segments[i].item, 'list-style-type', 'none');
      }
      last(segments).each(function (segment) {
        setAll(segment.list, entry.listAttributes);
        setAll(segment.item, entry.itemAttributes);
        append$1(segment.item, entry.content);
      });
    };
    var normalizeSegment = function (segment, entry) {
      if (name(segment.list) !== entry.listType) {
        segment.list = mutate(segment.list, entry.listType);
      }
      setAll(segment.list, entry.listAttributes);
    };
    var createItem = function (scope, attr, content) {
      var item = Element.fromTag('li', scope);
      setAll(item, attr);
      append$1(item, content);
      return item;
    };
    var appendItem = function (segment, item) {
      append(segment.list, item);
      segment.item = item;
    };
    var writeShallow = function (scope, cast, entry) {
      var newCast = cast.slice(0, entry.depth);
      last(newCast).each(function (segment) {
        var item = createItem(scope, entry.itemAttributes, entry.content);
        appendItem(segment, item);
        normalizeSegment(segment, entry);
      });
      return newCast;
    };
    var writeDeep = function (scope, cast, entry) {
      var segments = createSegments(scope, entry, entry.depth - cast.length);
      joinSegments(segments);
      populateSegments(segments, entry);
      appendSegments(cast, segments);
      return cast.concat(segments);
    };
    var composeList = function (scope, entries) {
      var cast = foldl(entries, function (cast, entry) {
        return entry.depth > cast.length ? writeDeep(scope, cast, entry) : writeShallow(scope, cast, entry);
      }, []);
      return head(cast).map(function (segment) {
        return segment.list;
      });
    };

    var isList$1 = function (el) {
      return is$1(el, 'OL,UL');
    };
    var hasFirstChildList = function (el) {
      return firstChild(el).map(isList$1).getOr(false);
    };
    var hasLastChildList = function (el) {
      return lastChild(el).map(isList$1).getOr(false);
    };

    var isIndented = function (entry) {
      return entry.depth > 0;
    };
    var isSelected = function (entry) {
      return entry.isSelected;
    };
    var cloneItemContent = function (li) {
      var children$1 = children(li);
      var content = hasLastChildList(li) ? children$1.slice(0, -1) : children$1;
      return map(content, deep);
    };
    var createEntry = function (li, depth, isSelected) {
      return parent(li).filter(isElement).map(function (list) {
        return {
          depth: depth,
          isSelected: isSelected,
          content: cloneItemContent(li),
          itemAttributes: clone(li),
          listAttributes: clone(list),
          listType: name(list)
        };
      });
    };

    var indentEntry = function (indentation, entry) {
      switch (indentation) {
      case 'Indent':
        entry.depth++;
        break;
      case 'Outdent':
        entry.depth--;
        break;
      case 'Flatten':
        entry.depth = 0;
      }
    };

    var hasOwnProperty = Object.prototype.hasOwnProperty;
    var shallow = function (old, nu) {
      return nu;
    };
    var baseMerge = function (merger) {
      return function () {
        var objects = new Array(arguments.length);
        for (var i = 0; i < objects.length; i++) {
          objects[i] = arguments[i];
        }
        if (objects.length === 0) {
          throw new Error('Can\'t merge zero objects');
        }
        var ret = {};
        for (var j = 0; j < objects.length; j++) {
          var curObject = objects[j];
          for (var key in curObject) {
            if (hasOwnProperty.call(curObject, key)) {
              ret[key] = merger(ret[key], curObject[key]);
            }
          }
        }
        return ret;
      };
    };
    var merge = baseMerge(shallow);

    var cloneListProperties = function (target, source) {
      target.listType = source.listType;
      target.listAttributes = merge({}, source.listAttributes);
    };
    var previousSiblingEntry = function (entries, start) {
      var depth = entries[start].depth;
      for (var i = start - 1; i >= 0; i--) {
        if (entries[i].depth === depth) {
          return Option.some(entries[i]);
        }
        if (entries[i].depth < depth) {
          break;
        }
      }
      return Option.none();
    };
    var normalizeEntries = function (entries) {
      each(entries, function (entry, i) {
        previousSiblingEntry(entries, i).each(function (matchingEntry) {
          cloneListProperties(entry, matchingEntry);
        });
      });
    };

    var Cell = function (initial) {
      var value = initial;
      var get = function () {
        return value;
      };
      var set = function (v) {
        value = v;
      };
      var clone = function () {
        return Cell(get());
      };
      return {
        get: get,
        set: set,
        clone: clone
      };
    };

    var parseItem = function (depth, itemSelection, selectionState, item) {
      return firstChild(item).filter(isList$1).fold(function () {
        itemSelection.each(function (selection) {
          if (eq(selection.start, item)) {
            selectionState.set(true);
          }
        });
        var currentItemEntry = createEntry(item, depth, selectionState.get());
        itemSelection.each(function (selection) {
          if (eq(selection.end, item)) {
            selectionState.set(false);
          }
        });
        var childListEntries = lastChild(item).filter(isList$1).map(function (list) {
          return parseList(depth, itemSelection, selectionState, list);
        }).getOr([]);
        return currentItemEntry.toArray().concat(childListEntries);
      }, function (list) {
        return parseList(depth, itemSelection, selectionState, list);
      });
    };
    var parseList = function (depth, itemSelection, selectionState, list) {
      return bind(children(list), function (element) {
        var parser = isList$1(element) ? parseList : parseItem;
        var newDepth = depth + 1;
        return parser(newDepth, itemSelection, selectionState, element);
      });
    };
    var parseLists = function (lists, itemSelection) {
      var selectionState = Cell(false);
      var initialDepth = 0;
      return map(lists, function (list) {
        return {
          sourceList: list,
          entries: parseList(initialDepth, itemSelection, selectionState, list)
        };
      });
    };

    var global$8 = tinymce.util.Tools.resolve('tinymce.Env');

    var createTextBlock = function (editor, contentNode) {
      var dom = editor.dom;
      var blockElements = editor.schema.getBlockElements();
      var fragment = dom.createFragment();
      var node, textBlock, blockName, hasContentNode;
      if (editor.settings.forced_root_block) {
        blockName = editor.settings.forced_root_block;
      }
      if (blockName) {
        textBlock = dom.create(blockName);
        if (textBlock.tagName === editor.settings.forced_root_block) {
          dom.setAttribs(textBlock, editor.settings.forced_root_block_attrs);
        }
        if (!NodeType.isBlock(contentNode.firstChild, blockElements)) {
          fragment.appendChild(textBlock);
        }
      }
      if (contentNode) {
        while (node = contentNode.firstChild) {
          var nodeName = node.nodeName;
          if (!hasContentNode && (nodeName !== 'SPAN' || node.getAttribute('data-mce-type') !== 'bookmark')) {
            hasContentNode = true;
          }
          if (NodeType.isBlock(node, blockElements)) {
            fragment.appendChild(node);
            textBlock = null;
          } else {
            if (blockName) {
              if (!textBlock) {
                textBlock = dom.create(blockName);
                fragment.appendChild(textBlock);
              }
              textBlock.appendChild(node);
            } else {
              fragment.appendChild(node);
            }
          }
        }
      }
      if (!editor.settings.forced_root_block) {
        fragment.appendChild(dom.create('br'));
      } else {
        if (!hasContentNode && (!global$8.ie || global$8.ie > 10)) {
          textBlock.appendChild(dom.create('br', { 'data-mce-bogus': '1' }));
        }
      }
      return fragment;
    };

    var outdentedComposer = function (editor, entries) {
      return map(entries, function (entry) {
        var content = fromElements(entry.content);
        return Element.fromDom(createTextBlock(editor, content.dom()));
      });
    };
    var indentedComposer = function (editor, entries) {
      normalizeEntries(entries);
      return composeList(editor.contentDocument, entries).toArray();
    };
    var composeEntries = function (editor, entries) {
      return bind(groupBy(entries, isIndented), function (entries) {
        var groupIsIndented = head(entries).map(isIndented).getOr(false);
        return groupIsIndented ? indentedComposer(editor, entries) : outdentedComposer(editor, entries);
      });
    };
    var indentSelectedEntries = function (entries, indentation) {
      each(filter(entries, isSelected), function (entry) {
        return indentEntry(indentation, entry);
      });
    };
    var getItemSelection = function (editor) {
      var selectedListItems = map(Selection.getSelectedListItems(editor), Element.fromDom);
      return lift2(find(selectedListItems, not(hasFirstChildList)), find(reverse(selectedListItems), not(hasFirstChildList)), function (start, end) {
        return {
          start: start,
          end: end
        };
      });
    };
    var listsIndentation = function (editor, lists, indentation) {
      var entrySets = parseLists(lists, getItemSelection(editor));
      each(entrySets, function (entrySet) {
        indentSelectedEntries(entrySet.entries, indentation);
        before$1(entrySet.sourceList, composeEntries(editor, entrySet.entries));
        remove(entrySet.sourceList);
      });
    };

    var DOM$1 = global$6.DOM;
    var splitList = function (editor, ul, li) {
      var tmpRng, fragment, bookmarks, node, newBlock;
      var removeAndKeepBookmarks = function (targetNode) {
        global$5.each(bookmarks, function (node) {
          targetNode.parentNode.insertBefore(node, li.parentNode);
        });
        DOM$1.remove(targetNode);
      };
      bookmarks = DOM$1.select('span[data-mce-type="bookmark"]', ul);
      newBlock = createTextBlock(editor, li);
      tmpRng = DOM$1.createRng();
      tmpRng.setStartAfter(li);
      tmpRng.setEndAfter(ul);
      fragment = tmpRng.extractContents();
      for (node = fragment.firstChild; node; node = node.firstChild) {
        if (node.nodeName === 'LI' && editor.dom.isEmpty(node)) {
          DOM$1.remove(node);
          break;
        }
      }
      if (!editor.dom.isEmpty(fragment)) {
        DOM$1.insertAfter(fragment, ul);
      }
      DOM$1.insertAfter(newBlock, ul);
      if (NodeType.isEmpty(editor.dom, li.parentNode)) {
        removeAndKeepBookmarks(li.parentNode);
      }
      DOM$1.remove(li);
      if (NodeType.isEmpty(editor.dom, ul)) {
        DOM$1.remove(ul);
      }
    };
    var SplitList = { splitList: splitList };

    var outdentDlItem = function (editor, item) {
      if (is$1(item, 'dd')) {
        mutate(item, 'dt');
      } else if (is$1(item, 'dt')) {
        parent(item).each(function (dl) {
          return SplitList.splitList(editor, dl.dom(), item.dom());
        });
      }
    };
    var indentDlItem = function (item) {
      if (is$1(item, 'dt')) {
        mutate(item, 'dd');
      }
    };
    var dlIndentation = function (editor, indentation, dlItems) {
      if (indentation === 'Indent') {
        each(dlItems, indentDlItem);
      } else {
        each(dlItems, function (item) {
          return outdentDlItem(editor, item);
        });
      }
    };

    var selectionIndentation = function (editor, indentation) {
      var lists = map(Selection.getSelectedListRoots(editor), Element.fromDom);
      var dlItems = map(Selection.getSelectedDlItems(editor), Element.fromDom);
      var isHandled = false;
      if (lists.length || dlItems.length) {
        var bookmark = editor.selection.getBookmark();
        listsIndentation(editor, lists, indentation);
        dlIndentation(editor, indentation, dlItems);
        editor.selection.moveToBookmark(bookmark);
        editor.selection.setRng(Range.normalizeRange(editor.selection.getRng()));
        editor.nodeChanged();
        isHandled = true;
      }
      return isHandled;
    };
    var indentListSelection = function (editor) {
      return selectionIndentation(editor, 'Indent');
    };
    var outdentListSelection = function (editor) {
      return selectionIndentation(editor, 'Outdent');
    };
    var flattenListSelection = function (editor) {
      return selectionIndentation(editor, 'Flatten');
    };

    var updateListStyle = function (dom, el, detail) {
      var type = detail['list-style-type'] ? detail['list-style-type'] : null;
      dom.setStyle(el, 'list-style-type', type);
    };
    var setAttribs = function (elm, attrs) {
      global$5.each(attrs, function (value, key) {
        elm.setAttribute(key, value);
      });
    };
    var updateListAttrs = function (dom, el, detail) {
      setAttribs(el, detail['list-attributes']);
      global$5.each(dom.select('li', el), function (li) {
        setAttribs(li, detail['list-item-attributes']);
      });
    };
    var updateListWithDetails = function (dom, el, detail) {
      updateListStyle(dom, el, detail);
      updateListAttrs(dom, el, detail);
    };
    var removeStyles = function (dom, element, styles) {
      global$5.each(styles, function (style) {
        var _a;
        return dom.setStyle(element, (_a = {}, _a[style] = '', _a));
      });
    };
    var getEndPointNode = function (editor, rng, start, root) {
      var container, offset;
      container = rng[start ? 'startContainer' : 'endContainer'];
      offset = rng[start ? 'startOffset' : 'endOffset'];
      if (container.nodeType === 1) {
        container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;
      }
      if (!start && NodeType.isBr(container.nextSibling)) {
        container = container.nextSibling;
      }
      while (container.parentNode !== root) {
        if (NodeType.isTextBlock(editor, container)) {
          return container;
        }
        if (/^(TD|TH)$/.test(container.parentNode.nodeName)) {
          return container;
        }
        container = container.parentNode;
      }
      return container;
    };
    var getSelectedTextBlocks = function (editor, rng, root) {
      var textBlocks = [], dom = editor.dom;
      var startNode = getEndPointNode(editor, rng, true, root);
      var endNode = getEndPointNode(editor, rng, false, root);
      var block;
      var siblings = [];
      for (var node = startNode; node; node = node.nextSibling) {
        siblings.push(node);
        if (node === endNode) {
          break;
        }
      }
      global$5.each(siblings, function (node) {
        if (NodeType.isTextBlock(editor, node)) {
          textBlocks.push(node);
          block = null;
          return;
        }
        if (dom.isBlock(node) || NodeType.isBr(node)) {
          if (NodeType.isBr(node)) {
            dom.remove(node);
          }
          block = null;
          return;
        }
        var nextSibling = node.nextSibling;
        if (global$4.isBookmarkNode(node)) {
          if (NodeType.isTextBlock(editor, nextSibling) || !nextSibling && node.parentNode === root) {
            block = null;
            return;
          }
        }
        if (!block) {
          block = dom.create('p');
          node.parentNode.insertBefore(block, node);
          textBlocks.push(block);
        }
        block.appendChild(node);
      });
      return textBlocks;
    };
    var hasCompatibleStyle = function (dom, sib, detail) {
      var sibStyle = dom.getStyle(sib, 'list-style-type');
      var detailStyle = detail ? detail['list-style-type'] : '';
      detailStyle = detailStyle === null ? '' : detailStyle;
      return sibStyle === detailStyle;
    };
    var applyList = function (editor, listName, detail) {
      if (detail === void 0) {
        detail = {};
      }
      var rng = editor.selection.getRng(true);
      var bookmark;
      var listItemName = 'LI';
      var root = Selection.getClosestListRootElm(editor, editor.selection.getStart(true));
      var dom = editor.dom;
      if (dom.getContentEditable(editor.selection.getNode()) === 'false') {
        return;
      }
      listName = listName.toUpperCase();
      if (listName === 'DL') {
        listItemName = 'DT';
      }
      bookmark = Bookmark.createBookmark(rng);
      global$5.each(getSelectedTextBlocks(editor, rng, root), function (block) {
        var listBlock, sibling;
        sibling = block.previousSibling;
        if (sibling && NodeType.isListNode(sibling) && sibling.nodeName === listName && hasCompatibleStyle(dom, sibling, detail)) {
          listBlock = sibling;
          block = dom.rename(block, listItemName);
          sibling.appendChild(block);
        } else {
          listBlock = dom.create(listName);
          block.parentNode.insertBefore(listBlock, block);
          listBlock.appendChild(block);
          block = dom.rename(block, listItemName);
        }
        removeStyles(dom, block, [
          'margin',
          'margin-right',
          'margin-bottom',
          'margin-left',
          'margin-top',
          'padding',
          'padding-right',
          'padding-bottom',
          'padding-left',
          'padding-top'
        ]);
        updateListWithDetails(dom, listBlock, detail);
        mergeWithAdjacentLists(editor.dom, listBlock);
      });
      editor.selection.setRng(Bookmark.resolveBookmark(bookmark));
    };
    var isValidLists = function (list1, list2) {
      return list1 && list2 && NodeType.isListNode(list1) && list1.nodeName === list2.nodeName;
    };
    var hasSameListStyle = function (dom, list1, list2) {
      var targetStyle = dom.getStyle(list1, 'list-style-type', true);
      var style = dom.getStyle(list2, 'list-style-type', true);
      return targetStyle === style;
    };
    var hasSameClasses = function (elm1, elm2) {
      return elm1.className === elm2.className;
    };
    var shouldMerge = function (dom, list1, list2) {
      return isValidLists(list1, list2) && hasSameListStyle(dom, list1, list2) && hasSameClasses(list1, list2);
    };
    var mergeWithAdjacentLists = function (dom, listBlock) {
      var sibling, node;
      sibling = listBlock.nextSibling;
      if (shouldMerge(dom, listBlock, sibling)) {
        while (node = sibling.firstChild) {
          listBlock.appendChild(node);
        }
        dom.remove(sibling);
      }
      sibling = listBlock.previousSibling;
      if (shouldMerge(dom, listBlock, sibling)) {
        while (node = sibling.lastChild) {
          listBlock.insertBefore(node, listBlock.firstChild);
        }
        dom.remove(sibling);
      }
    };
    var updateList = function (dom, list, listName, detail) {
      if (list.nodeName !== listName) {
        var newList = dom.rename(list, listName);
        updateListWithDetails(dom, newList, detail);
      } else {
        updateListWithDetails(dom, list, detail);
      }
    };
    var toggleMultipleLists = function (editor, parentList, lists, listName, detail) {
      if (parentList.nodeName === listName && !hasListStyleDetail(detail)) {
        flattenListSelection(editor);
      } else {
        var bookmark = Bookmark.createBookmark(editor.selection.getRng(true));
        global$5.each([parentList].concat(lists), function (elm) {
          updateList(editor.dom, elm, listName, detail);
        });
        editor.selection.setRng(Bookmark.resolveBookmark(bookmark));
      }
    };
    var hasListStyleDetail = function (detail) {
      return 'list-style-type' in detail;
    };
    var toggleSingleList = function (editor, parentList, listName, detail) {
      if (parentList === editor.getBody()) {
        return;
      }
      if (parentList) {
        if (parentList.nodeName === listName && !hasListStyleDetail(detail)) {
          flattenListSelection(editor);
        } else {
          var bookmark = Bookmark.createBookmark(editor.selection.getRng(true));
          updateListWithDetails(editor.dom, parentList, detail);
          mergeWithAdjacentLists(editor.dom, editor.dom.rename(parentList, listName));
          editor.selection.setRng(Bookmark.resolveBookmark(bookmark));
        }
      } else {
        applyList(editor, listName, detail);
      }
    };
    var toggleList = function (editor, listName, detail) {
      var parentList = Selection.getParentList(editor);
      var selectedSubLists = Selection.getSelectedSubLists(editor);
      detail = detail ? detail : {};
      if (parentList && selectedSubLists.length > 0) {
        toggleMultipleLists(editor, parentList, selectedSubLists, listName, detail);
      } else {
        toggleSingleList(editor, parentList, listName, detail);
      }
    };
    var ToggleList = {
      toggleList: toggleList,
      mergeWithAdjacentLists: mergeWithAdjacentLists
    };

    var DOM$2 = global$6.DOM;
    var normalizeList = function (dom, ul) {
      var sibling;
      var parentNode = ul.parentNode;
      if (parentNode.nodeName === 'LI' && parentNode.firstChild === ul) {
        sibling = parentNode.previousSibling;
        if (sibling && sibling.nodeName === 'LI') {
          sibling.appendChild(ul);
          if (NodeType.isEmpty(dom, parentNode)) {
            DOM$2.remove(parentNode);
          }
        } else {
          DOM$2.setStyle(parentNode, 'listStyleType', 'none');
        }
      }
      if (NodeType.isListNode(parentNode)) {
        sibling = parentNode.previousSibling;
        if (sibling && sibling.nodeName === 'LI') {
          sibling.appendChild(ul);
        }
      }
    };
    var normalizeLists = function (dom, element) {
      global$5.each(global$5.grep(dom.select('ol,ul', element)), function (ul) {
        normalizeList(dom, ul);
      });
    };
    var NormalizeLists = {
      normalizeList: normalizeList,
      normalizeLists: normalizeLists
    };

    var findNextCaretContainer = function (editor, rng, isForward, root) {
      var node = rng.startContainer;
      var offset = rng.startOffset;
      var nonEmptyBlocks, walker;
      if (node.nodeType === 3 && (isForward ? offset < node.data.length : offset > 0)) {
        return node;
      }
      nonEmptyBlocks = editor.schema.getNonEmptyElements();
      if (node.nodeType === 1) {
        node = global$1.getNode(node, offset);
      }
      walker = new global$2(node, root);
      if (isForward) {
        if (NodeType.isBogusBr(editor.dom, node)) {
          walker.next();
        }
      }
      while (node = walker[isForward ? 'next' : 'prev2']()) {
        if (node.nodeName === 'LI' && !node.hasChildNodes()) {
          return node;
        }
        if (nonEmptyBlocks[node.nodeName]) {
          return node;
        }
        if (node.nodeType === 3 && node.data.length > 0) {
          return node;
        }
      }
    };
    var hasOnlyOneBlockChild = function (dom, elm) {
      var childNodes = elm.childNodes;
      return childNodes.length === 1 && !NodeType.isListNode(childNodes[0]) && dom.isBlock(childNodes[0]);
    };
    var unwrapSingleBlockChild = function (dom, elm) {
      if (hasOnlyOneBlockChild(dom, elm)) {
        dom.remove(elm.firstChild, true);
      }
    };
    var moveChildren = function (dom, fromElm, toElm) {
      var node, targetElm;
      targetElm = hasOnlyOneBlockChild(dom, toElm) ? toElm.firstChild : toElm;
      unwrapSingleBlockChild(dom, fromElm);
      if (!NodeType.isEmpty(dom, fromElm, true)) {
        while (node = fromElm.firstChild) {
          targetElm.appendChild(node);
        }
      }
    };
    var mergeLiElements = function (dom, fromElm, toElm) {
      var node, listNode;
      var ul = fromElm.parentNode;
      if (!NodeType.isChildOfBody(dom, fromElm) || !NodeType.isChildOfBody(dom, toElm)) {
        return;
      }
      if (NodeType.isListNode(toElm.lastChild)) {
        listNode = toElm.lastChild;
      }
      if (ul === toElm.lastChild) {
        if (NodeType.isBr(ul.previousSibling)) {
          dom.remove(ul.previousSibling);
        }
      }
      node = toElm.lastChild;
      if (node && NodeType.isBr(node) && fromElm.hasChildNodes()) {
        dom.remove(node);
      }
      if (NodeType.isEmpty(dom, toElm, true)) {
        dom.$(toElm).empty();
      }
      moveChildren(dom, fromElm, toElm);
      if (listNode) {
        toElm.appendChild(listNode);
      }
      var contains = contains$1(Element.fromDom(toElm), Element.fromDom(fromElm));
      var nestedLists = contains ? dom.getParents(fromElm, NodeType.isListNode, toElm) : [];
      dom.remove(fromElm);
      each(nestedLists, function (list) {
        if (NodeType.isEmpty(dom, list) && list !== dom.getRoot()) {
          dom.remove(list);
        }
      });
    };
    var mergeIntoEmptyLi = function (editor, fromLi, toLi) {
      editor.dom.$(toLi).empty();
      mergeLiElements(editor.dom, fromLi, toLi);
      editor.selection.setCursorLocation(toLi);
    };
    var mergeForward = function (editor, rng, fromLi, toLi) {
      var dom = editor.dom;
      if (dom.isEmpty(toLi)) {
        mergeIntoEmptyLi(editor, fromLi, toLi);
      } else {
        var bookmark = Bookmark.createBookmark(rng);
        mergeLiElements(dom, fromLi, toLi);
        editor.selection.setRng(Bookmark.resolveBookmark(bookmark));
      }
    };
    var mergeBackward = function (editor, rng, fromLi, toLi) {
      var bookmark = Bookmark.createBookmark(rng);
      mergeLiElements(editor.dom, fromLi, toLi);
      var resolvedBookmark = Bookmark.resolveBookmark(bookmark);
      editor.selection.setRng(resolvedBookmark);
    };
    var backspaceDeleteFromListToListCaret = function (editor, isForward) {
      var dom = editor.dom, selection = editor.selection;
      var selectionStartElm = selection.getStart();
      var root = Selection.getClosestListRootElm(editor, selectionStartElm);
      var li = dom.getParent(selection.getStart(), 'LI', root);
      var ul, rng, otherLi;
      if (li) {
        ul = li.parentNode;
        if (ul === editor.getBody() && NodeType.isEmpty(dom, ul)) {
          return true;
        }
        rng = Range.normalizeRange(selection.getRng(true));
        otherLi = dom.getParent(findNextCaretContainer(editor, rng, isForward, root), 'LI', root);
        if (otherLi && otherLi !== li) {
          if (isForward) {
            mergeForward(editor, rng, otherLi, li);
          } else {
            mergeBackward(editor, rng, li, otherLi);
          }
          return true;
        } else if (!otherLi) {
          if (!isForward) {
            flattenListSelection(editor);
            return true;
          }
        }
      }
      return false;
    };
    var removeBlock = function (dom, block, root) {
      var parentBlock = dom.getParent(block.parentNode, dom.isBlock, root);
      dom.remove(block);
      if (parentBlock && dom.isEmpty(parentBlock)) {
        dom.remove(parentBlock);
      }
    };
    var backspaceDeleteIntoListCaret = function (editor, isForward) {
      var dom = editor.dom;
      var selectionStartElm = editor.selection.getStart();
      var root = Selection.getClosestListRootElm(editor, selectionStartElm);
      var block = dom.getParent(selectionStartElm, dom.isBlock, root);
      if (block && dom.isEmpty(block)) {
        var rng = Range.normalizeRange(editor.selection.getRng(true));
        var otherLi_1 = dom.getParent(findNextCaretContainer(editor, rng, isForward, root), 'LI', root);
        if (otherLi_1) {
          editor.undoManager.transact(function () {
            removeBlock(dom, block, root);
            ToggleList.mergeWithAdjacentLists(dom, otherLi_1.parentNode);
            editor.selection.select(otherLi_1, true);
            editor.selection.collapse(isForward);
          });
          return true;
        }
      }
      return false;
    };
    var backspaceDeleteCaret = function (editor, isForward) {
      return backspaceDeleteFromListToListCaret(editor, isForward) || backspaceDeleteIntoListCaret(editor, isForward);
    };
    var backspaceDeleteRange = function (editor) {
      var selectionStartElm = editor.selection.getStart();
      var root = Selection.getClosestListRootElm(editor, selectionStartElm);
      var startListParent = editor.dom.getParent(selectionStartElm, 'LI,DT,DD', root);
      if (startListParent || Selection.getSelectedListItems(editor).length > 0) {
        editor.undoManager.transact(function () {
          editor.execCommand('Delete');
          NormalizeLists.normalizeLists(editor.dom, editor.getBody());
        });
        return true;
      }
      return false;
    };
    var backspaceDelete = function (editor, isForward) {
      return editor.selection.isCollapsed() ? backspaceDeleteCaret(editor, isForward) : backspaceDeleteRange(editor);
    };
    var setup = function (editor) {
      editor.on('keydown', function (e) {
        if (e.keyCode === global$3.BACKSPACE) {
          if (backspaceDelete(editor, false)) {
            e.preventDefault();
          }
        } else if (e.keyCode === global$3.DELETE) {
          if (backspaceDelete(editor, true)) {
            e.preventDefault();
          }
        }
      });
    };
    var Delete = {
      setup: setup,
      backspaceDelete: backspaceDelete
    };

    var get = function (editor) {
      return {
        backspaceDelete: function (isForward) {
          Delete.backspaceDelete(editor, isForward);
        }
      };
    };
    var Api = { get: get };

    var queryListCommandState = function (editor, listName) {
      return function () {
        var parentList = editor.dom.getParent(editor.selection.getStart(), 'UL,OL,DL');
        return parentList && parentList.nodeName === listName;
      };
    };
    var register = function (editor) {
      editor.on('BeforeExecCommand', function (e) {
        var cmd = e.command.toLowerCase();
        if (cmd === 'indent') {
          indentListSelection(editor);
        } else if (cmd === 'outdent') {
          outdentListSelection(editor);
        }
      });
      editor.addCommand('InsertUnorderedList', function (ui, detail) {
        ToggleList.toggleList(editor, 'UL', detail);
      });
      editor.addCommand('InsertOrderedList', function (ui, detail) {
        ToggleList.toggleList(editor, 'OL', detail);
      });
      editor.addCommand('InsertDefinitionList', function (ui, detail) {
        ToggleList.toggleList(editor, 'DL', detail);
      });
      editor.addCommand('RemoveList', function () {
        flattenListSelection(editor);
      });
      editor.addQueryStateHandler('InsertUnorderedList', queryListCommandState(editor, 'UL'));
      editor.addQueryStateHandler('InsertOrderedList', queryListCommandState(editor, 'OL'));
      editor.addQueryStateHandler('InsertDefinitionList', queryListCommandState(editor, 'DL'));
    };
    var Commands = { register: register };

    var shouldIndentOnTab = function (editor) {
      return editor.getParam('lists_indent_on_tab', true);
    };
    var Settings = { shouldIndentOnTab: shouldIndentOnTab };

    var setupTabKey = function (editor) {
      editor.on('keydown', function (e) {
        if (e.keyCode !== global$3.TAB || global$3.metaKeyPressed(e)) {
          return;
        }
        editor.undoManager.transact(function () {
          if (e.shiftKey ? outdentListSelection(editor) : indentListSelection(editor)) {
            e.preventDefault();
          }
        });
      });
    };
    var setup$1 = function (editor) {
      if (Settings.shouldIndentOnTab(editor)) {
        setupTabKey(editor);
      }
      Delete.setup(editor);
    };
    var Keyboard = { setup: setup$1 };

    var findIndex = function (list, predicate) {
      for (var index = 0; index < list.length; index++) {
        var element = list[index];
        if (predicate(element)) {
          return index;
        }
      }
      return -1;
    };
    var listState = function (editor, listName) {
      return function (e) {
        var ctrl = e.control;
        editor.on('NodeChange', function (e) {
          var tableCellIndex = findIndex(e.parents, NodeType.isTableCellNode);
          var parents = tableCellIndex !== -1 ? e.parents.slice(0, tableCellIndex) : e.parents;
          var lists = global$5.grep(parents, NodeType.isListNode);
          ctrl.active(lists.length > 0 && lists[0].nodeName === listName);
        });
      };
    };
    var register$1 = function (editor) {
      var hasPlugin = function (editor, plugin) {
        var plugins = editor.settings.plugins ? editor.settings.plugins : '';
        return global$5.inArray(plugins.split(/[ ,]/), plugin) !== -1;
      };
      if (!hasPlugin(editor, 'advlist')) {
        editor.addButton('numlist', {
          active: false,
          title: 'Numbered list',
          cmd: 'InsertOrderedList',
          onPostRender: listState(editor, 'OL')
        });
        editor.addButton('bullist', {
          active: false,
          title: 'Bullet list',
          cmd: 'InsertUnorderedList',
          onPostRender: listState(editor, 'UL')
        });
      }
      editor.addButton('indent', {
        icon: 'indent',
        title: 'Increase indent',
        cmd: 'Indent'
      });
    };
    var Buttons = { register: register$1 };

    global.add('lists', function (editor) {
      Keyboard.setup(editor);
      Buttons.register(editor);
      Commands.register(editor);
      return Api.get(editor);
    });
    function Plugin () {
    }

    return Plugin;

}(window));
})();
                                                                                                                                                                                                                                                 tinymce/plugins/lists/plugin.min.js                                                                 0000644                 00000064530 15212564050 0013461 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(u){"use strict";var e,n,t,r,o,i,s,a,c,f=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),l=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),m=tinymce.util.Tools.resolve("tinymce.util.VK"),p=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),g=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),h=function(e){return e&&"BR"===e.nodeName},y=function(e){return e&&3===e.nodeType},N=function(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)},S=function(e){return e&&/^(OL|UL)$/.test(e.nodeName)},C=function(e){return e&&/^(DT|DD)$/.test(e.nodeName)},O=function(e){return e&&/^(LI|DT|DD)$/.test(e.nodeName)},b=function(e){return e&&/^(TH|TD)$/.test(e.nodeName)},T=h,E=function(e,n){return n&&!!e.schema.getTextBlockElements()[n.nodeName]},L=function(e,n){return e&&e.nodeName in n},D=function(e,n){return!!h(n)&&!(!e.isBlock(n.nextSibling)||h(n.previousSibling))},w=function(e,n,t){var r=e.isEmpty(n);return!(t&&0<e.select("span[data-mce-type=bookmark]",n).length)&&r},k=function(e,n){return e.isChildOf(n,e.getRoot())},A=function(e,n){if(y(e))return{container:e,offset:n};var t=d.getNode(e,n);return y(t)?{container:t,offset:n>=e.childNodes.length?t.data.length:0}:t.previousSibling&&y(t.previousSibling)?{container:t.previousSibling,offset:t.previousSibling.data.length}:t.nextSibling&&y(t.nextSibling)?{container:t.nextSibling,offset:0}:{container:e,offset:n}},x=function(e){var n=e.cloneRange(),t=A(e.startContainer,e.startOffset);n.setStart(t.container,t.offset);var r=A(e.endContainer,e.endOffset);return n.setEnd(r.container,r.offset),n},R=g.DOM,I=function(o){var i={},e=function(e){var n,t,r;t=o[e?"startContainer":"endContainer"],r=o[e?"startOffset":"endOffset"],1===t.nodeType&&(n=R.create("span",{"data-mce-type":"bookmark"}),t.hasChildNodes()?(r=Math.min(r,t.childNodes.length-1),e?t.insertBefore(n,t.childNodes[r]):R.insertAfter(n,t.childNodes[r])):t.appendChild(n),t=n,r=0),i[e?"startContainer":"endContainer"]=t,i[e?"startOffset":"endOffset"]=r};return e(!0),o.collapsed||e(),i},_=function(o){function e(e){var n,t,r;n=r=o[e?"startContainer":"endContainer"],t=o[e?"startOffset":"endOffset"],n&&(1===n.nodeType&&(t=function(e){for(var n=e.parentNode.firstChild,t=0;n;){if(n===e)return t;1===n.nodeType&&"bookmark"===n.getAttribute("data-mce-type")||t++,n=n.nextSibling}return-1}(n),n=n.parentNode,R.remove(r),!n.hasChildNodes()&&R.isBlock(n)&&n.appendChild(R.create("br"))),o[e?"startContainer":"endContainer"]=n,o[e?"startOffset":"endOffset"]=t)}e(!0),e();var n=R.createRng();return n.setStart(o.startContainer,o.startOffset),o.endContainer&&n.setEnd(o.endContainer,o.endOffset),x(n)},B=function(){},P=function(e){return function(){return e}},M=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return!t.apply(null,e)}},U=P(!1),F=P(!0),j=function(){return H},H=(e=function(e){return e.isNone()},r={fold:function(e,n){return e()},is:U,isSome:U,isNone:F,getOr:t=function(e){return e},getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:P(null),getOrUndefined:P(undefined),or:t,orThunk:n,map:j,each:B,bind:j,exists:U,forall:F,filter:j,equals:e,equals_:e,toArray:function(){return[]},toString:P("none()")},Object.freeze&&Object.freeze(r),r),$=function(t){var e=P(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:F,isNone:U,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return $(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:H},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(U,function(e){return n(t,e)})}};return o},q={some:$,none:j,from:function(e){return null===e||e===undefined?H:$(e)}},W=function(n){return function(e){return function(e){if(null===e)return"null";var n=typeof e;return"object"===n&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===n&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":n}(e)===n}},V=W("string"),z=W("array"),K=W("boolean"),X=W("function"),Q=W("number"),Y=Array.prototype.slice,G=Array.prototype.push,J=function(e,n){for(var t=e.length,r=new Array(t),o=0;o<t;o++){var i=e[o];r[o]=n(i,o)}return r},Z=function(e,n){for(var t=0,r=e.length;t<r;t++)n(e[t],t)},ee=function(e,n){for(var t=[],r=0,o=e.length;r<o;r++){var i=e[r];n(i,r)&&t.push(i)}return t},ne=function(e,n,t){return Z(e,function(e){t=n(t,e)}),t},te=function(e,n){for(var t=0,r=e.length;t<r;t++){var o=e[t];if(n(o,t))return q.some(o)}return q.none()},re=function(e,n){return function(e){for(var n=[],t=0,r=e.length;t<r;++t){if(!z(e[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+e);G.apply(n,e[t])}return n}(J(e,n))},oe=function(e){return 0===e.length?q.none():q.some(e[0])},ie=function(e){return 0===e.length?q.none():q.some(e[e.length-1])},ue=(X(Array.from)&&Array.from,"undefined"!=typeof u.window?u.window:Function("return this;")()),se=function(e,n){return function(e,n){for(var t=n!==undefined&&null!==n?n:ue,r=0;r<e.length&&t!==undefined&&null!==t;++r)t=t[e[r]];return t}(e.split("."),n)},ae=function(e,n){var t=se(e,n);if(t===undefined||null===t)throw new Error(e+" not available on this browser");return t},ce=function(e){var n,t=se("ownerDocument.defaultView",e);return(n=t,ae("HTMLElement",n)).prototype.isPrototypeOf(e)},fe=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),de=function(e){var n=e.selection.getStart(!0);return e.dom.getParent(n,"OL,UL,DL",me(e,n))},le=function(e){var t,n,r,o=e.selection.getSelectedBlocks();return v.grep((t=e,n=o,r=v.map(n,function(e){var n=t.dom.getParent(e,"li,dd,dt",me(t,e));return n||e}),fe.unique(r)),function(e){return O(e)})},me=function(e,n){var t=e.dom.getParents(n,"TD,TH");return 0<t.length?t[0]:e.getBody()},ge=function(e,n){var t=e.dom.getParents(n,"ol,ul",me(e,n));return ie(t)},pe=function(n,e){var t=J(e,function(e){return ge(n,e).getOr(e)});return fe.unique(t)},ve={isList:function(e){var n=de(e);return ce(n)},getParentList:de,getSelectedSubLists:function(e){var n,t,r,o=de(e),i=e.selection.getSelectedBlocks();return r=i,(t=o)&&1===r.length&&r[0]===t?(n=o,v.grep(n.querySelectorAll("ol,ul,dl"),function(e){return N(e)})):v.grep(i,function(e){return N(e)&&o!==e})},getSelectedListItems:le,getClosestListRootElm:me,getSelectedDlItems:function(e){return ee(le(e),C)},getSelectedListRoots:function(e){var n,t,r,o=(t=ge(n=e,n.selection.getStart()),r=ee(n.selection.getSelectedBlocks(),S),t.toArray().concat(r));return pe(e,o)}},he=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:P(e)}},ye={fromHtml:function(e,n){var t=(n||u.document).createElement("div");if(t.innerHTML=e,!t.hasChildNodes()||1<t.childNodes.length)throw u.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return he(t.childNodes[0])},fromTag:function(e,n){var t=(n||u.document).createElement(e);return he(t)},fromText:function(e,n){var t=(n||u.document).createTextNode(e);return he(t)},fromDom:he,fromPoint:function(e,n,t){var r=e.dom();return q.from(r.elementFromPoint(n,t)).map(he)}},Ne=function(e,n,t){return e.isSome()&&n.isSome()?q.some(t(e.getOrDie(),n.getOrDie())):q.none()},Se=Object.keys,Ce=function(){return ae("Node")},Oe=function(e,n,t){return 0!=(e.compareDocumentPosition(n)&t)},be=function(e,n){return Oe(e,n,Ce().DOCUMENT_POSITION_CONTAINED_BY)},Te=function(e,n){var t=function(e,n){for(var t=0;t<e.length;t++){var r=e[t];if(r.test(n))return r}return undefined}(e,n);if(!t)return{major:0,minor:0};var r=function(e){return Number(n.replace(t,"$"+e))};return Le(r(1),r(2))},Ee=function(){return Le(0,0)},Le=function(e,n){return{major:e,minor:n}},De={nu:Le,detect:function(e,n){var t=String(n).toLowerCase();return 0===e.length?Ee():Te(e,t)},unknown:Ee},we="Firefox",ke=function(e,n){return function(){return n===e}},Ae=function(e){var n=e.current;return{current:n,version:e.version,isEdge:ke("Edge",n),isChrome:ke("Chrome",n),isIE:ke("IE",n),isOpera:ke("Opera",n),isFirefox:ke(we,n),isSafari:ke("Safari",n)}},xe={unknown:function(){return Ae({current:undefined,version:De.unknown()})},nu:Ae,edge:P("Edge"),chrome:P("Chrome"),ie:P("IE"),opera:P("Opera"),firefox:P(we),safari:P("Safari")},Re="Windows",Ie="Android",_e="Solaris",Be="FreeBSD",Pe=function(e,n){return function(){return n===e}},Me=function(e){var n=e.current;return{current:n,version:e.version,isWindows:Pe(Re,n),isiOS:Pe("iOS",n),isAndroid:Pe(Ie,n),isOSX:Pe("OSX",n),isLinux:Pe("Linux",n),isSolaris:Pe(_e,n),isFreeBSD:Pe(Be,n)}},Ue={unknown:function(){return Me({current:undefined,version:De.unknown()})},nu:Me,windows:P(Re),ios:P("iOS"),android:P(Ie),linux:P("Linux"),osx:P("OSX"),solaris:P(_e),freebsd:P(Be)},Fe=function(e,n){var t=String(n).toLowerCase();return te(e,function(e){return e.search(t)})},je=function(e,t){return Fe(e,t).map(function(e){var n=De.detect(e.versionRegexes,t);return{current:e.name,version:n}})},He=function(e,t){return Fe(e,t).map(function(e){var n=De.detect(e.versionRegexes,t);return{current:e.name,version:n}})},$e=function(e,n){return-1!==e.indexOf(n)},qe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,We=function(n){return function(e){return $e(e,n)}},Ve=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return $e(e,"edge/")&&$e(e,"chrome")&&$e(e,"safari")&&$e(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,qe],search:function(e){return $e(e,"chrome")&&!$e(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return $e(e,"msie")||$e(e,"trident")}},{name:"Opera",versionRegexes:[qe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:We("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:We("firefox")},{name:"Safari",versionRegexes:[qe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return($e(e,"safari")||$e(e,"mobile/"))&&$e(e,"applewebkit")}}],ze=[{name:"Windows",search:We("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return $e(e,"iphone")||$e(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:We("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:We("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:We("linux"),versionRegexes:[]},{name:"Solaris",search:We("sunos"),versionRegexes:[]},{name:"FreeBSD",search:We("freebsd"),versionRegexes:[]}],Ke={browsers:P(Ve),oses:P(ze)},Xe=function(e){var n,t,r,o,i,u,s,a,c,f,d,l=Ke.browsers(),m=Ke.oses(),g=je(l,e).fold(xe.unknown,xe.nu),p=He(m,e).fold(Ue.unknown,Ue.nu);return{browser:g,os:p,deviceType:(t=g,r=e,o=(n=p).isiOS()&&!0===/ipad/i.test(r),i=n.isiOS()&&!o,u=n.isAndroid()&&3===n.version.major,s=n.isAndroid()&&4===n.version.major,a=o||u||s&&!0===/mobile/i.test(r),c=n.isiOS()||n.isAndroid(),f=c&&!a,d=t.isSafari()&&n.isiOS()&&!1===/safari/i.test(r),{isiPad:P(o),isiPhone:P(i),isTablet:P(a),isPhone:P(f),isTouch:P(c),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:P(d)})}},Qe={detect:(o=function(){var e=u.navigator.userAgent;return Xe(e)},s=!1,function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return s||(s=!0,i=o.apply(null,e)),i})},Ye=(u.Node.ATTRIBUTE_NODE,u.Node.CDATA_SECTION_NODE,u.Node.COMMENT_NODE,u.Node.DOCUMENT_NODE,u.Node.DOCUMENT_TYPE_NODE,u.Node.DOCUMENT_FRAGMENT_NODE,u.Node.ELEMENT_NODE),Ge=(u.Node.TEXT_NODE,u.Node.PROCESSING_INSTRUCTION_NODE,u.Node.ENTITY_REFERENCE_NODE,u.Node.ENTITY_NODE,u.Node.NOTATION_NODE,Ye),Je=function(e,n){return e.dom()===n.dom()},Ze=Qe.detect().browser.isIE()?function(e,n){return be(e.dom(),n.dom())}:function(e,n){var t=e.dom(),r=n.dom();return t!==r&&t.contains(r)},en=function(e,n){var t=e.dom();if(t.nodeType!==Ge)return!1;var r=t;if(r.matches!==undefined)return r.matches(n);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(n);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(n);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(n);throw new Error("Browser lacks native selectors")},nn=function(e){return q.from(e.dom().parentNode).map(ye.fromDom)},tn=function(e){return J(e.dom().childNodes,ye.fromDom)},rn=function(e,n){var t=e.dom().childNodes;return q.from(t[n]).map(ye.fromDom)},on=function(e){return rn(e,0)},un=function(e){return rn(e,e.dom().childNodes.length-1)},sn=(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n]}("element","offset"),function(n,t){nn(n).each(function(e){e.dom().insertBefore(t.dom(),n.dom())})}),an=function(e,n){e.dom().appendChild(n.dom())},cn=function(n,e){Z(e,function(e){an(n,e)})},fn=function(e){var n=e.dom();null!==n.parentNode&&n.parentNode.removeChild(n)},dn=function(e){return e.dom().nodeName.toLowerCase()},ln=(a=Ye,function(e){return e.dom().nodeType===a}),mn=function(e,n){var t=e.dom();!function(e,n){for(var t=Se(e),r=0,o=t.length;r<o;r++){var i=t[r];n(e[i],i)}}(n,function(e,n){!function(e,n,t){if(!(V(t)||K(t)||Q(t)))throw u.console.error("Invalid call to Attr.set. Key ",n,":: Value ",t,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(n,t+"")}(t,n,e)})},gn=function(e){return ne(e.dom().attributes,function(e,n){return e[n.name]=n.value,e},{})},pn=function(e,n,t){if(!V(t))throw u.console.error("Invalid call to CSS.set. Property ",n,":: Value ",t,":: Element ",e),new Error("CSS value must be a string: "+t);var r;(r=e).style!==undefined&&X(r.style.getPropertyValue)&&e.style.setProperty(n,t)},vn=function(e){return n=e,t=!0,ye.fromDom(n.dom().cloneNode(t));var n,t},hn=function(e,n){var t,r,o,i,u=(t=e,r=n,o=ye.fromTag(r),i=gn(t),mn(o,i),o);sn(e,u);var s=tn(e);return cn(u,s),fn(e),u},yn=function(e,n){an(e.item,n.list)},Nn=function(f,e,d){var n=e.slice(0,d.depth);return ie(n).each(function(e){var n,t,r,o,i,u,s,a,c=(n=f,t=d.itemAttributes,r=d.content,o=ye.fromTag("li",n),mn(o,t),cn(o,r),o);u=c,an((i=e).list,u),i.item=u,a=d,dn((s=e).list)!==a.listType&&(s.list=hn(s.list,a.listType)),mn(s.list,a.listAttributes)}),n},Sn=function(e,n,t){var r,o=function(e,n,t){for(var r,o,i,u=[],s=0;s<t;s++)u.push((r=e,o=n.listType,i={list:ye.fromTag(o,r),item:ye.fromTag("li",r)},an(i.list,i.item),i));return u}(e,t,t.depth-n.length);return function(e){for(var n=1;n<e.length;n++)yn(e[n-1],e[n])}(o),function(e,n){for(var t=0;t<e.length-1;t++)r=e[t].item,o="list-style-type",i="none",u=r.dom(),pn(u,o,i);var r,o,i,u;ie(e).each(function(e){mn(e.list,n.listAttributes),mn(e.item,n.itemAttributes),cn(e.item,n.content)})}(o,t),r=o,Ne(ie(n),oe(r),yn),n.concat(o)},Cn=function(e){return en(e,"OL,UL")},On=function(e){return on(e).map(Cn).getOr(!1)},bn=function(e){return 0<e.depth},Tn=function(e){return e.isSelected},En=function(e){var n=tn(e),t=un(e).map(Cn).getOr(!1)?n.slice(0,-1):n;return J(t,vn)},Ln=Object.prototype.hasOwnProperty,Dn=(c=function(e,n){return n},function(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];if(0===e.length)throw new Error("Can't merge zero objects");for(var t={},r=0;r<e.length;r++){var o=e[r];for(var i in o)Ln.call(o,i)&&(t[i]=c(t[i],o[i]))}return t}),wn=function(n){Z(n,function(r,e){(function(e,n){for(var t=e[n].depth,r=n-1;0<=r;r--){if(e[r].depth===t)return q.some(e[r]);if(e[r].depth<t)break}return q.none()})(n,e).each(function(e){var n,t;t=e,(n=r).listType=t.listType,n.listAttributes=Dn({},t.listAttributes)})})},kn=function(e){var n=e,t=function(){return n};return{get:t,set:function(e){n=e},clone:function(){return kn(t())}}},An=function(i,u,s,a){return on(a).filter(Cn).fold(function(){u.each(function(e){Je(e.start,a)&&s.set(!0)});var n,t,r,e=(n=a,t=i,r=s.get(),nn(n).filter(ln).map(function(e){return{depth:t,isSelected:r,content:En(n),itemAttributes:gn(n),listAttributes:gn(e),listType:dn(e)}}));u.each(function(e){Je(e.end,a)&&s.set(!1)});var o=un(a).filter(Cn).map(function(e){return xn(i,u,s,e)}).getOr([]);return e.toArray().concat(o)},function(e){return xn(i,u,s,e)})},xn=function(n,t,r,e){return re(tn(e),function(e){return(Cn(e)?xn:An)(n+1,t,r,e)})},Rn=tinymce.util.Tools.resolve("tinymce.Env"),In=function(e,n){var t,r,o,i,u=e.dom,s=e.schema.getBlockElements(),a=u.createFragment();if(e.settings.forced_root_block&&(o=e.settings.forced_root_block),o&&((r=u.create(o)).tagName===e.settings.forced_root_block&&u.setAttribs(r,e.settings.forced_root_block_attrs),L(n.firstChild,s)||a.appendChild(r)),n)for(;t=n.firstChild;){var c=t.nodeName;i||"SPAN"===c&&"bookmark"===t.getAttribute("data-mce-type")||(i=!0),L(t,s)?(a.appendChild(t),r=null):o?(r||(r=u.create(o),a.appendChild(r)),r.appendChild(t)):a.appendChild(t)}return e.settings.forced_root_block?i||Rn.ie&&!(10<Rn.ie)||r.appendChild(u.create("br",{"data-mce-bogus":"1"})):a.appendChild(u.create("br")),a},_n=function(i,e){return J(e,function(e){var n,t,r,o=(n=e.content,r=(t||u.document).createDocumentFragment(),Z(n,function(e){r.appendChild(e.dom())}),ye.fromDom(r));return ye.fromDom(In(i,o.dom()))})},Bn=function(e,n){return wn(n),(t=e.contentDocument,r=n,o=ne(r,function(e,n){return n.depth>e.length?Sn(t,e,n):Nn(t,e,n)},[]),oe(o).map(function(e){return e.list})).toArray();var t,r,o},Pn=function(e){var n,t,r=J(ve.getSelectedListItems(e),ye.fromDom);return Ne(te(r,M(On)),te((n=r,(t=Y.call(n,0)).reverse(),t),M(On)),function(e,n){return{start:e,end:n}})},Mn=function(s,e,a){var n,t,r,o=(n=e,t=Pn(s),r=kn(!1),J(n,function(e){return{sourceList:e,entries:xn(0,t,r,e)}}));Z(o,function(e){var n,t,r,o,i,u;n=e.entries,t=a,Z(ee(n,Tn),function(e){return function(e,n){switch(e){case"Indent":n.depth++;break;case"Outdent":n.depth--;break;case"Flatten":n.depth=0}}(t,e)}),r=e.sourceList,i=s,u=e.entries,o=re(function(e,n){if(0===e.length)return[];for(var t=n(e[0]),r=[],o=[],i=0,u=e.length;i<u;i++){var s=e[i],a=n(s);a!==t&&(r.push(o),o=[]),t=a,o.push(s)}return 0!==o.length&&r.push(o),r}(u,bn),function(e){return oe(e).map(bn).getOr(!1)?Bn(i,e):_n(i,e)}),Z(o,function(e){sn(r,e)}),fn(e.sourceList)})},Un=g.DOM,Fn=function(e,n,t){var r,o,i,u,s,a;for(i=Un.select('span[data-mce-type="bookmark"]',n),s=In(e,t),(r=Un.createRng()).setStartAfter(t),r.setEndAfter(n),u=(o=r.extractContents()).firstChild;u;u=u.firstChild)if("LI"===u.nodeName&&e.dom.isEmpty(u)){Un.remove(u);break}e.dom.isEmpty(o)||Un.insertAfter(o,n),Un.insertAfter(s,n),w(e.dom,t.parentNode)&&(a=t.parentNode,v.each(i,function(e){a.parentNode.insertBefore(e,t.parentNode)}),Un.remove(a)),Un.remove(t),w(e.dom,n)&&Un.remove(n)},jn=function(e){en(e,"dt")&&hn(e,"dd")},Hn=function(r,e,n){Z(n,"Indent"===e?jn:function(e){return n=r,void(en(t=e,"dd")?hn(t,"dt"):en(t,"dt")&&nn(t).each(function(e){return Fn(n,e.dom(),t.dom())}));var n,t})},$n=function(e,n){var t=J(ve.getSelectedListRoots(e),ye.fromDom),r=J(ve.getSelectedDlItems(e),ye.fromDom),o=!1;if(t.length||r.length){var i=e.selection.getBookmark();Mn(e,t,n),Hn(e,n,r),e.selection.moveToBookmark(i),e.selection.setRng(x(e.selection.getRng())),e.nodeChanged(),o=!0}return o},qn=function(e){return $n(e,"Indent")},Wn=function(e){return $n(e,"Outdent")},Vn=function(e){return $n(e,"Flatten")},zn=function(t,e){v.each(e,function(e,n){t.setAttribute(n,e)})},Kn=function(e,n,t){var r,o,i,u,s,a,c;r=e,o=n,u=(i=t)["list-style-type"]?i["list-style-type"]:null,r.setStyle(o,"list-style-type",u),s=e,zn(a=n,(c=t)["list-attributes"]),v.each(s.select("li",a),function(e){zn(e,c["list-item-attributes"])})},Xn=function(e,n,t,r){var o,i;for(o=n[t?"startContainer":"endContainer"],i=n[t?"startOffset":"endOffset"],1===o.nodeType&&(o=o.childNodes[Math.min(i,o.childNodes.length-1)]||o),!t&&T(o.nextSibling)&&(o=o.nextSibling);o.parentNode!==r;){if(E(e,o))return o;if(/^(TD|TH)$/.test(o.parentNode.nodeName))return o;o=o.parentNode}return o},Qn=function(f,d,l){void 0===l&&(l={});var e,n=f.selection.getRng(!0),m="LI",t=ve.getClosestListRootElm(f,f.selection.getStart(!0)),g=f.dom;"false"!==g.getContentEditable(f.selection.getNode())&&("DL"===(d=d.toUpperCase())&&(m="DT"),e=I(n),v.each(function(t,e,r){for(var o,i=[],u=t.dom,n=Xn(t,e,!0,r),s=Xn(t,e,!1,r),a=[],c=n;c&&(a.push(c),c!==s);c=c.nextSibling);return v.each(a,function(e){if(E(t,e))return i.push(e),void(o=null);if(u.isBlock(e)||T(e))return T(e)&&u.remove(e),void(o=null);var n=e.nextSibling;p.isBookmarkNode(e)&&(E(t,n)||!n&&e.parentNode===r)?o=null:(o||(o=u.create("p"),e.parentNode.insertBefore(o,e),i.push(o)),o.appendChild(e))}),i}(f,n,t),function(e){var n,t,r,o,i,u,s,a,c;(t=e.previousSibling)&&N(t)&&t.nodeName===d&&(r=t,o=l,i=g.getStyle(r,"list-style-type"),u=o?o["list-style-type"]:"",i===(u=null===u?"":u))?(n=t,e=g.rename(e,m),t.appendChild(e)):(n=g.create(d),e.parentNode.insertBefore(n,e),n.appendChild(e),e=g.rename(e,m)),s=g,a=e,c=["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"],v.each(c,function(e){var n;return s.setStyle(a,((n={})[e]="",n))}),Kn(g,n,l),Gn(f.dom,n)}),f.selection.setRng(_(e)))},Yn=function(e,n,t){return a=t,(s=n)&&a&&N(s)&&s.nodeName===a.nodeName&&(i=n,u=t,(o=e).getStyle(i,"list-style-type",!0)===o.getStyle(u,"list-style-type",!0))&&(r=t,n.className===r.className);var r,o,i,u,s,a},Gn=function(e,n){var t,r;if(t=n.nextSibling,Yn(e,n,t)){for(;r=t.firstChild;)n.appendChild(r);e.remove(t)}if(t=n.previousSibling,Yn(e,n,t)){for(;r=t.lastChild;)n.insertBefore(r,n.firstChild);e.remove(t)}},Jn=function(n,e,t,r,o){if(e.nodeName!==r||Zn(o)){var i=I(n.selection.getRng(!0));v.each([e].concat(t),function(e){!function(e,n,t,r){if(n.nodeName!==t){var o=e.rename(n,t);Kn(e,o,r)}else Kn(e,n,r)}(n.dom,e,r,o)}),n.selection.setRng(_(i))}else Vn(n)},Zn=function(e){return"list-style-type"in e},et={toggleList:function(e,n,t){var r=ve.getParentList(e),o=ve.getSelectedSubLists(e);t=t||{},r&&0<o.length?Jn(e,r,o,n,t):function(e,n,t,r){if(n!==e.getBody())if(n)if(n.nodeName!==t||Zn(r)){var o=I(e.selection.getRng(!0));Kn(e.dom,n,r),Gn(e.dom,e.dom.rename(n,t)),e.selection.setRng(_(o))}else Vn(e);else Qn(e,t,r)}(e,r,n,t)},mergeWithAdjacentLists:Gn},nt=g.DOM,tt=function(e,n){var t,r=n.parentNode;"LI"===r.nodeName&&r.firstChild===n&&((t=r.previousSibling)&&"LI"===t.nodeName?(t.appendChild(n),w(e,r)&&nt.remove(r)):nt.setStyle(r,"listStyleType","none")),N(r)&&(t=r.previousSibling)&&"LI"===t.nodeName&&t.appendChild(n)},rt=function(n,e){v.each(v.grep(n.select("ol,ul",e)),function(e){tt(n,e)})},ot=function(e,n,t,r){var o,i,u=n.startContainer,s=n.startOffset;if(3===u.nodeType&&(t?s<u.data.length:0<s))return u;for(o=e.schema.getNonEmptyElements(),1===u.nodeType&&(u=d.getNode(u,s)),i=new l(u,r),t&&D(e.dom,u)&&i.next();u=i[t?"next":"prev2"]();){if("LI"===u.nodeName&&!u.hasChildNodes())return u;if(o[u.nodeName])return u;if(3===u.nodeType&&0<u.data.length)return u}},it=function(e,n){var t=n.childNodes;return 1===t.length&&!N(t[0])&&e.isBlock(t[0])},ut=function(e,n,t){var r,o,i,u;if(o=it(e,t)?t.firstChild:t,it(i=e,u=n)&&i.remove(u.firstChild,!0),!w(e,n,!0))for(;r=n.firstChild;)o.appendChild(r)},st=function(n,e,t){var r,o,i=e.parentNode;if(k(n,e)&&k(n,t)){N(t.lastChild)&&(o=t.lastChild),i===t.lastChild&&T(i.previousSibling)&&n.remove(i.previousSibling),(r=t.lastChild)&&T(r)&&e.hasChildNodes()&&n.remove(r),w(n,t,!0)&&n.$(t).empty(),ut(n,e,t),o&&t.appendChild(o);var u=Ze(ye.fromDom(t),ye.fromDom(e))?n.getParents(e,N,t):[];n.remove(e),Z(u,function(e){w(n,e)&&e!==n.getRoot()&&n.remove(e)})}},at=function(e,n,t,r){var o,i,u,s=e.dom;if(s.isEmpty(r))i=t,u=r,(o=e).dom.$(u).empty(),st(o.dom,i,u),o.selection.setCursorLocation(u);else{var a=I(n);st(s,t,r),e.selection.setRng(_(a))}},ct=function(e,n){var t,r,o,i=e.dom,u=e.selection,s=u.getStart(),a=ve.getClosestListRootElm(e,s),c=i.getParent(u.getStart(),"LI",a);if(c){if((t=c.parentNode)===e.getBody()&&w(i,t))return!0;if(r=x(u.getRng(!0)),(o=i.getParent(ot(e,r,n,a),"LI",a))&&o!==c)return n?at(e,r,o,c):function(e,n,t,r){var o=I(n);st(e.dom,t,r);var i=_(o);e.selection.setRng(i)}(e,r,c,o),!0;if(!o&&!n)return Vn(e),!0}return!1},ft=function(e,n){return ct(e,n)||function(o,i){var u=o.dom,e=o.selection.getStart(),s=ve.getClosestListRootElm(o,e),a=u.getParent(e,u.isBlock,s);if(a&&u.isEmpty(a)){var n=x(o.selection.getRng(!0)),c=u.getParent(ot(o,n,i,s),"LI",s);if(c)return o.undoManager.transact(function(){var e,n,t,r;n=a,t=s,r=(e=u).getParent(n.parentNode,e.isBlock,t),e.remove(n),r&&e.isEmpty(r)&&e.remove(r),et.mergeWithAdjacentLists(u,c.parentNode),o.selection.select(c,!0),o.selection.collapse(i)}),!0}return!1}(e,n)},dt=function(e,n){return e.selection.isCollapsed()?ft(e,n):(r=(t=e).selection.getStart(),o=ve.getClosestListRootElm(t,r),!!(t.dom.getParent(r,"LI,DT,DD",o)||0<ve.getSelectedListItems(t).length)&&(t.undoManager.transact(function(){t.execCommand("Delete"),rt(t.dom,t.getBody())}),!0));var t,r,o},lt=function(n){n.on("keydown",function(e){e.keyCode===m.BACKSPACE?dt(n,!1)&&e.preventDefault():e.keyCode===m.DELETE&&dt(n,!0)&&e.preventDefault()})},mt=dt,gt=function(n){return{backspaceDelete:function(e){mt(n,e)}}},pt=function(n,t){return function(){var e=n.dom.getParent(n.selection.getStart(),"UL,OL,DL");return e&&e.nodeName===t}},vt=function(t){t.on("BeforeExecCommand",function(e){var n=e.command.toLowerCase();"indent"===n?qn(t):"outdent"===n&&Wn(t)}),t.addCommand("InsertUnorderedList",function(e,n){et.toggleList(t,"UL",n)}),t.addCommand("InsertOrderedList",function(e,n){et.toggleList(t,"OL",n)}),t.addCommand("InsertDefinitionList",function(e,n){et.toggleList(t,"DL",n)}),t.addCommand("RemoveList",function(){Vn(t)}),t.addQueryStateHandler("InsertUnorderedList",pt(t,"UL")),t.addQueryStateHandler("InsertOrderedList",pt(t,"OL")),t.addQueryStateHandler("InsertDefinitionList",pt(t,"DL"))},ht=function(e){return e.getParam("lists_indent_on_tab",!0)},yt=function(e){var n;ht(e)&&(n=e).on("keydown",function(e){e.keyCode!==m.TAB||m.metaKeyPressed(e)||n.undoManager.transact(function(){(e.shiftKey?Wn(n):qn(n))&&e.preventDefault()})}),lt(e)},Nt=function(n,i){return function(e){var o=e.control;n.on("NodeChange",function(e){var n=function(e,n){for(var t=0;t<e.length;t++)if(n(e[t]))return t;return-1}(e.parents,b),t=-1!==n?e.parents.slice(0,n):e.parents,r=v.grep(t,N);o.active(0<r.length&&r[0].nodeName===i)})}},St=function(e){var n,t,r;t="advlist",r=(n=e).settings.plugins?n.settings.plugins:"",-1===v.inArray(r.split(/[ ,]/),t)&&(e.addButton("numlist",{active:!1,title:"Numbered list",cmd:"InsertOrderedList",onPostRender:Nt(e,"OL")}),e.addButton("bullist",{active:!1,title:"Bullet list",cmd:"InsertUnorderedList",onPostRender:Nt(e,"UL")})),e.addButton("indent",{icon:"indent",title:"Increase indent",cmd:"Indent"})};f.add("lists",function(e){return yt(e),St(e),vt(e),gt(e)})}(window);                                                                                                                                                                        tinymce/plugins/media/plugin.js                                                                     0000644                 00000120572 15212564050 0012617 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       (function () {
var media = (function () {
    'use strict';

    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');

    var global$1 = tinymce.util.Tools.resolve('tinymce.Env');

    var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');

    var getScripts = function (editor) {
      return editor.getParam('media_scripts');
    };
    var getAudioTemplateCallback = function (editor) {
      return editor.getParam('audio_template_callback');
    };
    var getVideoTemplateCallback = function (editor) {
      return editor.getParam('video_template_callback');
    };
    var hasLiveEmbeds = function (editor) {
      return editor.getParam('media_live_embeds', true);
    };
    var shouldFilterHtml = function (editor) {
      return editor.getParam('media_filter_html', true);
    };
    var getUrlResolver = function (editor) {
      return editor.getParam('media_url_resolver');
    };
    var hasAltSource = function (editor) {
      return editor.getParam('media_alt_source', true);
    };
    var hasPoster = function (editor) {
      return editor.getParam('media_poster', true);
    };
    var hasDimensions = function (editor) {
      return editor.getParam('media_dimensions', true);
    };
    var Settings = {
      getScripts: getScripts,
      getAudioTemplateCallback: getAudioTemplateCallback,
      getVideoTemplateCallback: getVideoTemplateCallback,
      hasLiveEmbeds: hasLiveEmbeds,
      shouldFilterHtml: shouldFilterHtml,
      getUrlResolver: getUrlResolver,
      hasAltSource: hasAltSource,
      hasPoster: hasPoster,
      hasDimensions: hasDimensions
    };

    var Cell = function (initial) {
      var value = initial;
      var get = function () {
        return value;
      };
      var set = function (v) {
        value = v;
      };
      var clone = function () {
        return Cell(get());
      };
      return {
        get: get,
        set: set,
        clone: clone
      };
    };

    var noop = function () {
    };
    var constant = function (value) {
      return function () {
        return value;
      };
    };
    var never = constant(false);
    var always = constant(true);

    var none = function () {
      return NONE;
    };
    var NONE = function () {
      var eq = function (o) {
        return o.isNone();
      };
      var call = function (thunk) {
        return thunk();
      };
      var id = function (n) {
        return n;
      };
      var me = {
        fold: function (n, s) {
          return n();
        },
        is: never,
        isSome: never,
        isNone: always,
        getOr: id,
        getOrThunk: call,
        getOrDie: function (msg) {
          throw new Error(msg || 'error: getOrDie called on none.');
        },
        getOrNull: constant(null),
        getOrUndefined: constant(undefined),
        or: id,
        orThunk: call,
        map: none,
        each: noop,
        bind: none,
        exists: never,
        forall: always,
        filter: none,
        equals: eq,
        equals_: eq,
        toArray: function () {
          return [];
        },
        toString: constant('none()')
      };
      if (Object.freeze) {
        Object.freeze(me);
      }
      return me;
    }();
    var some = function (a) {
      var constant_a = constant(a);
      var self = function () {
        return me;
      };
      var bind = function (f) {
        return f(a);
      };
      var me = {
        fold: function (n, s) {
          return s(a);
        },
        is: function (v) {
          return a === v;
        },
        isSome: always,
        isNone: never,
        getOr: constant_a,
        getOrThunk: constant_a,
        getOrDie: constant_a,
        getOrNull: constant_a,
        getOrUndefined: constant_a,
        or: self,
        orThunk: self,
        map: function (f) {
          return some(f(a));
        },
        each: function (f) {
          f(a);
        },
        bind: bind,
        exists: bind,
        forall: bind,
        filter: function (f) {
          return f(a) ? me : NONE;
        },
        toArray: function () {
          return [a];
        },
        toString: function () {
          return 'some(' + a + ')';
        },
        equals: function (o) {
          return o.is(a);
        },
        equals_: function (o, elementEq) {
          return o.fold(never, function (b) {
            return elementEq(a, b);
          });
        }
      };
      return me;
    };
    var from = function (value) {
      return value === null || value === undefined ? NONE : some(value);
    };
    var Option = {
      some: some,
      none: none,
      from: from
    };

    var hasOwnProperty = Object.hasOwnProperty;
    var get = function (obj, key) {
      return has(obj, key) ? Option.from(obj[key]) : Option.none();
    };
    var has = function (obj, key) {
      return hasOwnProperty.call(obj, key);
    };

    var global$3 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');

    var global$4 = tinymce.util.Tools.resolve('tinymce.html.SaxParser');

    var getVideoScriptMatch = function (prefixes, src) {
      if (prefixes) {
        for (var i = 0; i < prefixes.length; i++) {
          if (src.indexOf(prefixes[i].filter) !== -1) {
            return prefixes[i];
          }
        }
      }
    };
    var VideoScript = { getVideoScriptMatch: getVideoScriptMatch };

    var DOM = global$3.DOM;
    var trimPx = function (value) {
      return value.replace(/px$/, '');
    };
    var getEphoxEmbedData = function (attrs) {
      var style = attrs.map.style;
      var styles = style ? DOM.parseStyle(style) : {};
      return {
        type: 'ephox-embed-iri',
        source1: attrs.map['data-ephox-embed-iri'],
        source2: '',
        poster: '',
        width: get(styles, 'max-width').map(trimPx).getOr(''),
        height: get(styles, 'max-height').map(trimPx).getOr('')
      };
    };
    var htmlToData = function (prefixes, html) {
      var isEphoxEmbed = Cell(false);
      var data = {};
      global$4({
        validate: false,
        allow_conditional_comments: true,
        special: 'script,noscript',
        start: function (name, attrs) {
          if (isEphoxEmbed.get()) ; else if (has(attrs.map, 'data-ephox-embed-iri')) {
            isEphoxEmbed.set(true);
            data = getEphoxEmbedData(attrs);
          } else {
            if (!data.source1 && name === 'param') {
              data.source1 = attrs.map.movie;
            }
            if (name === 'iframe' || name === 'object' || name === 'embed' || name === 'video' || name === 'audio') {
              if (!data.type) {
                data.type = name;
              }
              data = global$2.extend(attrs.map, data);
            }
            if (name === 'script') {
              var videoScript = VideoScript.getVideoScriptMatch(prefixes, attrs.map.src);
              if (!videoScript) {
                return;
              }
              data = {
                type: 'script',
                source1: attrs.map.src,
                width: videoScript.width,
                height: videoScript.height
              };
            }
            if (name === 'source') {
              if (!data.source1) {
                data.source1 = attrs.map.src;
              } else if (!data.source2) {
                data.source2 = attrs.map.src;
              }
            }
            if (name === 'img' && !data.poster) {
              data.poster = attrs.map.src;
            }
          }
        }
      }).parse(html);
      data.source1 = data.source1 || data.src || data.data;
      data.source2 = data.source2 || '';
      data.poster = data.poster || '';
      return data;
    };
    var HtmlToData = { htmlToData: htmlToData };

    var global$5 = tinymce.util.Tools.resolve('tinymce.util.Promise');

    var guess = function (url) {
      var mimes = {
        mp3: 'audio/mpeg',
        wav: 'audio/wav',
        mp4: 'video/mp4',
        webm: 'video/webm',
        ogg: 'video/ogg',
        swf: 'application/x-shockwave-flash'
      };
      var fileEnd = url.toLowerCase().split('.').pop();
      var mime = mimes[fileEnd];
      return mime ? mime : '';
    };
    var Mime = { guess: guess };

    var global$6 = tinymce.util.Tools.resolve('tinymce.html.Schema');

    var global$7 = tinymce.util.Tools.resolve('tinymce.html.Writer');

    var DOM$1 = global$3.DOM;
    var addPx = function (value) {
      return /^[0-9.]+$/.test(value) ? value + 'px' : value;
    };
    var setAttributes = function (attrs, updatedAttrs) {
      for (var name in updatedAttrs) {
        var value = '' + updatedAttrs[name];
        if (attrs.map[name]) {
          var i = attrs.length;
          while (i--) {
            var attr = attrs[i];
            if (attr.name === name) {
              if (value) {
                attrs.map[name] = value;
                attr.value = value;
              } else {
                delete attrs.map[name];
                attrs.splice(i, 1);
              }
            }
          }
        } else if (value) {
          attrs.push({
            name: name,
            value: value
          });
          attrs.map[name] = value;
        }
      }
    };
    var updateEphoxEmbed = function (data, attrs) {
      var style = attrs.map.style;
      var styleMap = style ? DOM$1.parseStyle(style) : {};
      styleMap['max-width'] = addPx(data.width);
      styleMap['max-height'] = addPx(data.height);
      setAttributes(attrs, { style: DOM$1.serializeStyle(styleMap) });
    };
    var updateHtml = function (html, data, updateAll) {
      var writer = global$7();
      var isEphoxEmbed = Cell(false);
      var sourceCount = 0;
      var hasImage;
      global$4({
        validate: false,
        allow_conditional_comments: true,
        special: 'script,noscript',
        comment: function (text) {
          writer.comment(text);
        },
        cdata: function (text) {
          writer.cdata(text);
        },
        text: function (text, raw) {
          writer.text(text, raw);
        },
        start: function (name, attrs, empty) {
          if (isEphoxEmbed.get()) ; else if (has(attrs.map, 'data-ephox-embed-iri')) {
            isEphoxEmbed.set(true);
            updateEphoxEmbed(data, attrs);
          } else {
            switch (name) {
            case 'video':
            case 'object':
            case 'embed':
            case 'img':
            case 'iframe':
              if (data.height !== undefined && data.width !== undefined) {
                setAttributes(attrs, {
                  width: data.width,
                  height: data.height
                });
              }
              break;
            }
            if (updateAll) {
              switch (name) {
              case 'video':
                setAttributes(attrs, {
                  poster: data.poster,
                  src: ''
                });
                if (data.source2) {
                  setAttributes(attrs, { src: '' });
                }
                break;
              case 'iframe':
                setAttributes(attrs, { src: data.source1 });
                break;
              case 'source':
                sourceCount++;
                if (sourceCount <= 2) {
                  setAttributes(attrs, {
                    src: data['source' + sourceCount],
                    type: data['source' + sourceCount + 'mime']
                  });
                  if (!data['source' + sourceCount]) {
                    return;
                  }
                }
                break;
              case 'img':
                if (!data.poster) {
                  return;
                }
                hasImage = true;
                break;
              }
            }
          }
          writer.start(name, attrs, empty);
        },
        end: function (name) {
          if (!isEphoxEmbed.get()) {
            if (name === 'video' && updateAll) {
              for (var index = 1; index <= 2; index++) {
                if (data['source' + index]) {
                  var attrs = [];
                  attrs.map = {};
                  if (sourceCount < index) {
                    setAttributes(attrs, {
                      src: data['source' + index],
                      type: data['source' + index + 'mime']
                    });
                    writer.start('source', attrs, true);
                  }
                }
              }
            }
            if (data.poster && name === 'object' && updateAll && !hasImage) {
              var imgAttrs = [];
              imgAttrs.map = {};
              setAttributes(imgAttrs, {
                src: data.poster,
                width: data.width,
                height: data.height
              });
              writer.start('img', imgAttrs, true);
            }
          }
          writer.end(name);
        }
      }, global$6({})).parse(html);
      return writer.getContent();
    };
    var UpdateHtml = { updateHtml: updateHtml };

    var urlPatterns = [
      {
        regex: /youtu\.be\/([\w\-_\?&=.]+)/i,
        type: 'iframe',
        w: 560,
        h: 314,
        url: '//www.youtube.com/embed/$1',
        allowFullscreen: true
      },
      {
        regex: /youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,
        type: 'iframe',
        w: 560,
        h: 314,
        url: '//www.youtube.com/embed/$2?$4',
        allowFullscreen: true
      },
      {
        regex: /youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,
        type: 'iframe',
        w: 560,
        h: 314,
        url: '//www.youtube.com/embed/$1',
        allowFullscreen: true
      },
      {
        regex: /vimeo\.com\/([0-9]+)/,
        type: 'iframe',
        w: 425,
        h: 350,
        url: '//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc',
        allowFullscreen: true
      },
      {
        regex: /vimeo\.com\/(.*)\/([0-9]+)/,
        type: 'iframe',
        w: 425,
        h: 350,
        url: '//player.vimeo.com/video/$2?title=0&amp;byline=0',
        allowFullscreen: true
      },
      {
        regex: /maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,
        type: 'iframe',
        w: 425,
        h: 350,
        url: '//maps.google.com/maps/ms?msid=$2&output=embed"',
        allowFullscreen: false
      },
      {
        regex: /dailymotion\.com\/video\/([^_]+)/,
        type: 'iframe',
        w: 480,
        h: 270,
        url: '//www.dailymotion.com/embed/video/$1',
        allowFullscreen: true
      },
      {
        regex: /dai\.ly\/([^_]+)/,
        type: 'iframe',
        w: 480,
        h: 270,
        url: '//www.dailymotion.com/embed/video/$1',
        allowFullscreen: true
      }
    ];
    var getUrl = function (pattern, url) {
      var match = pattern.regex.exec(url);
      var newUrl = pattern.url;
      var _loop_1 = function (i) {
        newUrl = newUrl.replace('$' + i, function () {
          return match[i] ? match[i] : '';
        });
      };
      for (var i = 0; i < match.length; i++) {
        _loop_1(i);
      }
      return newUrl.replace(/\?$/, '');
    };
    var matchPattern = function (url) {
      var pattern = urlPatterns.filter(function (pattern) {
        return pattern.regex.test(url);
      });
      if (pattern.length > 0) {
        return global$2.extend({}, pattern[0], { url: getUrl(pattern[0], url) });
      } else {
        return null;
      }
    };

    var getIframeHtml = function (data) {
      var allowFullscreen = data.allowFullscreen ? ' allowFullscreen="1"' : '';
      return '<iframe src="' + data.source1 + '" width="' + data.width + '" height="' + data.height + '"' + allowFullscreen + '></iframe>';
    };
    var getFlashHtml = function (data) {
      var html = '<object data="' + data.source1 + '" width="' + data.width + '" height="' + data.height + '" type="application/x-shockwave-flash">';
      if (data.poster) {
        html += '<img src="' + data.poster + '" width="' + data.width + '" height="' + data.height + '" />';
      }
      html += '</object>';
      return html;
    };
    var getAudioHtml = function (data, audioTemplateCallback) {
      if (audioTemplateCallback) {
        return audioTemplateCallback(data);
      } else {
        return '<audio controls="controls" src="' + data.source1 + '">' + (data.source2 ? '\n<source src="' + data.source2 + '"' + (data.source2mime ? ' type="' + data.source2mime + '"' : '') + ' />\n' : '') + '</audio>';
      }
    };
    var getVideoHtml = function (data, videoTemplateCallback) {
      if (videoTemplateCallback) {
        return videoTemplateCallback(data);
      } else {
        return '<video width="' + data.width + '" height="' + data.height + '"' + (data.poster ? ' poster="' + data.poster + '"' : '') + ' controls="controls">\n' + '<source src="' + data.source1 + '"' + (data.source1mime ? ' type="' + data.source1mime + '"' : '') + ' />\n' + (data.source2 ? '<source src="' + data.source2 + '"' + (data.source2mime ? ' type="' + data.source2mime + '"' : '') + ' />\n' : '') + '</video>';
      }
    };
    var getScriptHtml = function (data) {
      return '<script src="' + data.source1 + '"></script>';
    };
    var dataToHtml = function (editor, dataIn) {
      var data = global$2.extend({}, dataIn);
      if (!data.source1) {
        global$2.extend(data, HtmlToData.htmlToData(Settings.getScripts(editor), data.embed));
        if (!data.source1) {
          return '';
        }
      }
      if (!data.source2) {
        data.source2 = '';
      }
      if (!data.poster) {
        data.poster = '';
      }
      data.source1 = editor.convertURL(data.source1, 'source');
      data.source2 = editor.convertURL(data.source2, 'source');
      data.source1mime = Mime.guess(data.source1);
      data.source2mime = Mime.guess(data.source2);
      data.poster = editor.convertURL(data.poster, 'poster');
      var pattern = matchPattern(data.source1);
      if (pattern) {
        data.source1 = pattern.url;
        data.type = pattern.type;
        data.allowFullscreen = pattern.allowFullscreen;
        data.width = data.width || pattern.w;
        data.height = data.height || pattern.h;
      }
      if (data.embed) {
        return UpdateHtml.updateHtml(data.embed, data, true);
      } else {
        var videoScript = VideoScript.getVideoScriptMatch(Settings.getScripts(editor), data.source1);
        if (videoScript) {
          data.type = 'script';
          data.width = videoScript.width;
          data.height = videoScript.height;
        }
        var audioTemplateCallback = Settings.getAudioTemplateCallback(editor);
        var videoTemplateCallback = Settings.getVideoTemplateCallback(editor);
        data.width = data.width || 300;
        data.height = data.height || 150;
        global$2.each(data, function (value, key) {
          data[key] = editor.dom.encode(value);
        });
        if (data.type === 'iframe') {
          return getIframeHtml(data);
        } else if (data.source1mime === 'application/x-shockwave-flash') {
          return getFlashHtml(data);
        } else if (data.source1mime.indexOf('audio') !== -1) {
          return getAudioHtml(data, audioTemplateCallback);
        } else if (data.type === 'script') {
          return getScriptHtml(data);
        } else {
          return getVideoHtml(data, videoTemplateCallback);
        }
      }
    };
    var DataToHtml = { dataToHtml: dataToHtml };

    var cache = {};
    var embedPromise = function (data, dataToHtml, handler) {
      return new global$5(function (res, rej) {
        var wrappedResolve = function (response) {
          if (response.html) {
            cache[data.source1] = response;
          }
          return res({
            url: data.source1,
            html: response.html ? response.html : dataToHtml(data)
          });
        };
        if (cache[data.source1]) {
          wrappedResolve(cache[data.source1]);
        } else {
          handler({ url: data.source1 }, wrappedResolve, rej);
        }
      });
    };
    var defaultPromise = function (data, dataToHtml) {
      return new global$5(function (res) {
        res({
          html: dataToHtml(data),
          url: data.source1
        });
      });
    };
    var loadedData = function (editor) {
      return function (data) {
        return DataToHtml.dataToHtml(editor, data);
      };
    };
    var getEmbedHtml = function (editor, data) {
      var embedHandler = Settings.getUrlResolver(editor);
      return embedHandler ? embedPromise(data, loadedData(editor), embedHandler) : defaultPromise(data, loadedData(editor));
    };
    var isCached = function (url) {
      return cache.hasOwnProperty(url);
    };
    var Service = {
      getEmbedHtml: getEmbedHtml,
      isCached: isCached
    };

    var trimPx$1 = function (value) {
      return value.replace(/px$/, '');
    };
    var addPx$1 = function (value) {
      return /^[0-9.]+$/.test(value) ? value + 'px' : value;
    };
    var getSize = function (name) {
      return function (elm) {
        return elm ? trimPx$1(elm.style[name]) : '';
      };
    };
    var setSize = function (name) {
      return function (elm, value) {
        if (elm) {
          elm.style[name] = addPx$1(value);
        }
      };
    };
    var Size = {
      getMaxWidth: getSize('maxWidth'),
      getMaxHeight: getSize('maxHeight'),
      setMaxWidth: setSize('maxWidth'),
      setMaxHeight: setSize('maxHeight')
    };

    var doSyncSize = function (widthCtrl, heightCtrl) {
      widthCtrl.state.set('oldVal', widthCtrl.value());
      heightCtrl.state.set('oldVal', heightCtrl.value());
    };
    var doSizeControls = function (win, f) {
      var widthCtrl = win.find('#width')[0];
      var heightCtrl = win.find('#height')[0];
      var constrained = win.find('#constrain')[0];
      if (widthCtrl && heightCtrl && constrained) {
        f(widthCtrl, heightCtrl, constrained.checked());
      }
    };
    var doUpdateSize = function (widthCtrl, heightCtrl, isContrained) {
      var oldWidth = widthCtrl.state.get('oldVal');
      var oldHeight = heightCtrl.state.get('oldVal');
      var newWidth = widthCtrl.value();
      var newHeight = heightCtrl.value();
      if (isContrained && oldWidth && oldHeight && newWidth && newHeight) {
        if (newWidth !== oldWidth) {
          newHeight = Math.round(newWidth / oldWidth * newHeight);
          if (!isNaN(newHeight)) {
            heightCtrl.value(newHeight);
          }
        } else {
          newWidth = Math.round(newHeight / oldHeight * newWidth);
          if (!isNaN(newWidth)) {
            widthCtrl.value(newWidth);
          }
        }
      }
      doSyncSize(widthCtrl, heightCtrl);
    };
    var syncSize = function (win) {
      doSizeControls(win, doSyncSize);
    };
    var updateSize = function (win) {
      doSizeControls(win, doUpdateSize);
    };
    var createUi = function (onChange) {
      var recalcSize = function () {
        onChange(function (win) {
          updateSize(win);
        });
      };
      return {
        type: 'container',
        label: 'Dimensions',
        layout: 'flex',
        align: 'center',
        spacing: 5,
        items: [
          {
            name: 'width',
            type: 'textbox',
            maxLength: 5,
            size: 5,
            onchange: recalcSize,
            ariaLabel: 'Width'
          },
          {
            type: 'label',
            text: 'x'
          },
          {
            name: 'height',
            type: 'textbox',
            maxLength: 5,
            size: 5,
            onchange: recalcSize,
            ariaLabel: 'Height'
          },
          {
            name: 'constrain',
            type: 'checkbox',
            checked: true,
            text: 'Constrain proportions'
          }
        ]
      };
    };
    var SizeManager = {
      createUi: createUi,
      syncSize: syncSize,
      updateSize: updateSize
    };

    var embedChange = global$1.ie && global$1.ie <= 8 ? 'onChange' : 'onInput';
    var handleError = function (editor) {
      return function (error) {
        var errorMessage = error && error.msg ? 'Media embed handler error: ' + error.msg : 'Media embed handler threw unknown error.';
        editor.notificationManager.open({
          type: 'error',
          text: errorMessage
        });
      };
    };
    var getData = function (editor) {
      var element = editor.selection.getNode();
      var dataEmbed = element.getAttribute('data-ephox-embed-iri');
      if (dataEmbed) {
        return {
          'source1': dataEmbed,
          'data-ephox-embed-iri': dataEmbed,
          'width': Size.getMaxWidth(element),
          'height': Size.getMaxHeight(element)
        };
      }
      return element.getAttribute('data-mce-object') ? HtmlToData.htmlToData(Settings.getScripts(editor), editor.serializer.serialize(element, { selection: true })) : {};
    };
    var getSource = function (editor) {
      var elm = editor.selection.getNode();
      if (elm.getAttribute('data-mce-object') || elm.getAttribute('data-ephox-embed-iri')) {
        return editor.selection.getContent();
      }
    };
    var addEmbedHtml = function (win, editor) {
      return function (response) {
        var html = response.html;
        var embed = win.find('#embed')[0];
        var data = global$2.extend(HtmlToData.htmlToData(Settings.getScripts(editor), html), { source1: response.url });
        win.fromJSON(data);
        if (embed) {
          embed.value(html);
          SizeManager.updateSize(win);
        }
      };
    };
    var selectPlaceholder = function (editor, beforeObjects) {
      var i;
      var y;
      var afterObjects = editor.dom.select('img[data-mce-object]');
      for (i = 0; i < beforeObjects.length; i++) {
        for (y = afterObjects.length - 1; y >= 0; y--) {
          if (beforeObjects[i] === afterObjects[y]) {
            afterObjects.splice(y, 1);
          }
        }
      }
      editor.selection.select(afterObjects[0]);
    };
    var handleInsert = function (editor, html) {
      var beforeObjects = editor.dom.select('img[data-mce-object]');
      editor.insertContent(html);
      selectPlaceholder(editor, beforeObjects);
      editor.nodeChanged();
    };
    var submitForm = function (win, editor) {
      var data = win.toJSON();
      data.embed = UpdateHtml.updateHtml(data.embed, data);
      if (data.embed && Service.isCached(data.source1)) {
        handleInsert(editor, data.embed);
      } else {
        Service.getEmbedHtml(editor, data).then(function (response) {
          handleInsert(editor, response.html);
        }).catch(handleError(editor));
      }
    };
    var populateMeta = function (win, meta) {
      global$2.each(meta, function (value, key) {
        win.find('#' + key).value(value);
      });
    };
    var showDialog = function (editor) {
      var win;
      var data;
      var generalFormItems = [{
          name: 'source1',
          type: 'filepicker',
          filetype: 'media',
          size: 40,
          autofocus: true,
          label: 'Source',
          onpaste: function () {
            setTimeout(function () {
              Service.getEmbedHtml(editor, win.toJSON()).then(addEmbedHtml(win, editor)).catch(handleError(editor));
            }, 1);
          },
          onchange: function (e) {
            Service.getEmbedHtml(editor, win.toJSON()).then(addEmbedHtml(win, editor)).catch(handleError(editor));
            populateMeta(win, e.meta);
          },
          onbeforecall: function (e) {
            e.meta = win.toJSON();
          }
        }];
      var advancedFormItems = [];
      var reserialise = function (update) {
        update(win);
        data = win.toJSON();
        win.find('#embed').value(UpdateHtml.updateHtml(data.embed, data));
      };
      if (Settings.hasAltSource(editor)) {
        advancedFormItems.push({
          name: 'source2',
          type: 'filepicker',
          filetype: 'media',
          size: 40,
          label: 'Alternative source'
        });
      }
      if (Settings.hasPoster(editor)) {
        advancedFormItems.push({
          name: 'poster',
          type: 'filepicker',
          filetype: 'image',
          size: 40,
          label: 'Poster'
        });
      }
      if (Settings.hasDimensions(editor)) {
        var control = SizeManager.createUi(reserialise);
        generalFormItems.push(control);
      }
      data = getData(editor);
      var embedTextBox = {
        id: 'mcemediasource',
        type: 'textbox',
        flex: 1,
        name: 'embed',
        value: getSource(editor),
        multiline: true,
        rows: 5,
        label: 'Source'
      };
      var updateValueOnChange = function () {
        data = global$2.extend({}, HtmlToData.htmlToData(Settings.getScripts(editor), this.value()));
        this.parent().parent().fromJSON(data);
      };
      embedTextBox[embedChange] = updateValueOnChange;
      var body = [
        {
          title: 'General',
          type: 'form',
          items: generalFormItems
        },
        {
          title: 'Embed',
          type: 'container',
          layout: 'flex',
          direction: 'column',
          align: 'stretch',
          padding: 10,
          spacing: 10,
          items: [
            {
              type: 'label',
              text: 'Paste your embed code below:',
              forId: 'mcemediasource'
            },
            embedTextBox
          ]
        }
      ];
      if (advancedFormItems.length > 0) {
        body.push({
          title: 'Advanced',
          type: 'form',
          items: advancedFormItems
        });
      }
      win = editor.windowManager.open({
        title: 'Insert/edit media',
        data: data,
        bodyType: 'tabpanel',
        body: body,
        onSubmit: function () {
          SizeManager.updateSize(win);
          submitForm(win, editor);
        }
      });
      SizeManager.syncSize(win);
    };
    var Dialog = { showDialog: showDialog };

    var get$1 = function (editor) {
      var showDialog = function () {
        Dialog.showDialog(editor);
      };
      return { showDialog: showDialog };
    };
    var Api = { get: get$1 };

    var register = function (editor) {
      var showDialog = function () {
        Dialog.showDialog(editor);
      };
      editor.addCommand('mceMedia', showDialog);
    };
    var Commands = { register: register };

    var global$8 = tinymce.util.Tools.resolve('tinymce.html.Node');

    var sanitize = function (editor, html) {
      if (Settings.shouldFilterHtml(editor) === false) {
        return html;
      }
      var writer = global$7();
      var blocked;
      global$4({
        validate: false,
        allow_conditional_comments: false,
        special: 'script,noscript',
        comment: function (text) {
          writer.comment(text);
        },
        cdata: function (text) {
          writer.cdata(text);
        },
        text: function (text, raw) {
          writer.text(text, raw);
        },
        start: function (name, attrs, empty) {
          blocked = true;
          if (name === 'script' || name === 'noscript' || name === 'svg') {
            return;
          }
          for (var i = attrs.length - 1; i >= 0; i--) {
            var attrName = attrs[i].name;
            if (attrName.indexOf('on') === 0) {
              delete attrs.map[attrName];
              attrs.splice(i, 1);
            }
            if (attrName === 'style') {
              attrs[i].value = editor.dom.serializeStyle(editor.dom.parseStyle(attrs[i].value), name);
            }
          }
          writer.start(name, attrs, empty);
          blocked = false;
        },
        end: function (name) {
          if (blocked) {
            return;
          }
          writer.end(name);
        }
      }, global$6({})).parse(html);
      return writer.getContent();
    };
    var Sanitize = { sanitize: sanitize };

    var createPlaceholderNode = function (editor, node) {
      var placeHolder;
      var name = node.name;
      placeHolder = new global$8('img', 1);
      placeHolder.shortEnded = true;
      retainAttributesAndInnerHtml(editor, node, placeHolder);
      placeHolder.attr({
        'width': node.attr('width') || '300',
        'height': node.attr('height') || (name === 'audio' ? '30' : '150'),
        'style': node.attr('style'),
        'src': global$1.transparentSrc,
        'data-mce-object': name,
        'class': 'mce-object mce-object-' + name
      });
      return placeHolder;
    };
    var createPreviewIframeNode = function (editor, node) {
      var previewWrapper;
      var previewNode;
      var shimNode;
      var name = node.name;
      previewWrapper = new global$8('span', 1);
      previewWrapper.attr({
        'contentEditable': 'false',
        'style': node.attr('style'),
        'data-mce-object': name,
        'class': 'mce-preview-object mce-object-' + name
      });
      retainAttributesAndInnerHtml(editor, node, previewWrapper);
      previewNode = new global$8(name, 1);
      previewNode.attr({
        src: node.attr('src'),
        allowfullscreen: node.attr('allowfullscreen'),
        style: node.attr('style'),
        class: node.attr('class'),
        width: node.attr('width'),
        height: node.attr('height'),
        frameborder: '0'
      });
      shimNode = new global$8('span', 1);
      shimNode.attr('class', 'mce-shim');
      previewWrapper.append(previewNode);
      previewWrapper.append(shimNode);
      return previewWrapper;
    };
    var retainAttributesAndInnerHtml = function (editor, sourceNode, targetNode) {
      var attrName;
      var attrValue;
      var attribs;
      var ai;
      var innerHtml;
      attribs = sourceNode.attributes;
      ai = attribs.length;
      while (ai--) {
        attrName = attribs[ai].name;
        attrValue = attribs[ai].value;
        if (attrName !== 'width' && attrName !== 'height' && attrName !== 'style') {
          if (attrName === 'data' || attrName === 'src') {
            attrValue = editor.convertURL(attrValue, attrName);
          }
          targetNode.attr('data-mce-p-' + attrName, attrValue);
        }
      }
      innerHtml = sourceNode.firstChild && sourceNode.firstChild.value;
      if (innerHtml) {
        targetNode.attr('data-mce-html', escape(Sanitize.sanitize(editor, innerHtml)));
        targetNode.firstChild = null;
      }
    };
    var isWithinEphoxEmbed = function (node) {
      while (node = node.parent) {
        if (node.attr('data-ephox-embed-iri')) {
          return true;
        }
      }
      return false;
    };
    var placeHolderConverter = function (editor) {
      return function (nodes) {
        var i = nodes.length;
        var node;
        var videoScript;
        while (i--) {
          node = nodes[i];
          if (!node.parent) {
            continue;
          }
          if (node.parent.attr('data-mce-object')) {
            continue;
          }
          if (node.name === 'script') {
            videoScript = VideoScript.getVideoScriptMatch(Settings.getScripts(editor), node.attr('src'));
            if (!videoScript) {
              continue;
            }
          }
          if (videoScript) {
            if (videoScript.width) {
              node.attr('width', videoScript.width.toString());
            }
            if (videoScript.height) {
              node.attr('height', videoScript.height.toString());
            }
          }
          if (node.name === 'iframe' && Settings.hasLiveEmbeds(editor) && global$1.ceFalse) {
            if (!isWithinEphoxEmbed(node)) {
              node.replace(createPreviewIframeNode(editor, node));
            }
          } else {
            if (!isWithinEphoxEmbed(node)) {
              node.replace(createPlaceholderNode(editor, node));
            }
          }
        }
      };
    };
    var Nodes = {
      createPreviewIframeNode: createPreviewIframeNode,
      createPlaceholderNode: createPlaceholderNode,
      placeHolderConverter: placeHolderConverter
    };

    var setup = function (editor) {
      editor.on('preInit', function () {
        var specialElements = editor.schema.getSpecialElements();
        global$2.each('video audio iframe object'.split(' '), function (name) {
          specialElements[name] = new RegExp('</' + name + '[^>]*>', 'gi');
        });
        var boolAttrs = editor.schema.getBoolAttrs();
        global$2.each('webkitallowfullscreen mozallowfullscreen allowfullscreen'.split(' '), function (name) {
          boolAttrs[name] = {};
        });
        editor.parser.addNodeFilter('iframe,video,audio,object,embed,script', Nodes.placeHolderConverter(editor));
        editor.serializer.addAttributeFilter('data-mce-object', function (nodes, name) {
          var i = nodes.length;
          var node;
          var realElm;
          var ai;
          var attribs;
          var innerHtml;
          var innerNode;
          var realElmName;
          var className;
          while (i--) {
            node = nodes[i];
            if (!node.parent) {
              continue;
            }
            realElmName = node.attr(name);
            realElm = new global$8(realElmName, 1);
            if (realElmName !== 'audio' && realElmName !== 'script') {
              className = node.attr('class');
              if (className && className.indexOf('mce-preview-object') !== -1) {
                realElm.attr({
                  width: node.firstChild.attr('width'),
                  height: node.firstChild.attr('height')
                });
              } else {
                realElm.attr({
                  width: node.attr('width'),
                  height: node.attr('height')
                });
              }
            }
            realElm.attr({ style: node.attr('style') });
            attribs = node.attributes;
            ai = attribs.length;
            while (ai--) {
              var attrName = attribs[ai].name;
              if (attrName.indexOf('data-mce-p-') === 0) {
                realElm.attr(attrName.substr(11), attribs[ai].value);
              }
            }
            if (realElmName === 'script') {
              realElm.attr('type', 'text/javascript');
            }
            innerHtml = node.attr('data-mce-html');
            if (innerHtml) {
              innerNode = new global$8('#text', 3);
              innerNode.raw = true;
              innerNode.value = Sanitize.sanitize(editor, unescape(innerHtml));
              realElm.append(innerNode);
            }
            node.replace(realElm);
          }
        });
      });
      editor.on('setContent', function () {
        editor.$('span.mce-preview-object').each(function (index, elm) {
          var $elm = editor.$(elm);
          if ($elm.find('span.mce-shim', elm).length === 0) {
            $elm.append('<span class="mce-shim"></span>');
          }
        });
      });
    };
    var FilterContent = { setup: setup };

    var setup$1 = function (editor) {
      editor.on('ResolveName', function (e) {
        var name;
        if (e.target.nodeType === 1 && (name = e.target.getAttribute('data-mce-object'))) {
          e.name = name;
        }
      });
    };
    var ResolveName = { setup: setup$1 };

    var setup$2 = function (editor) {
      editor.on('click keyup', function () {
        var selectedNode = editor.selection.getNode();
        if (selectedNode && editor.dom.hasClass(selectedNode, 'mce-preview-object')) {
          if (editor.dom.getAttrib(selectedNode, 'data-mce-selected')) {
            selectedNode.setAttribute('data-mce-selected', '2');
          }
        }
      });
      editor.on('ObjectSelected', function (e) {
        var objectType = e.target.getAttribute('data-mce-object');
        if (objectType === 'audio' || objectType === 'script') {
          e.preventDefault();
        }
      });
      editor.on('objectResized', function (e) {
        var target = e.target;
        var html;
        if (target.getAttribute('data-mce-object')) {
          html = target.getAttribute('data-mce-html');
          if (html) {
            html = unescape(html);
            target.setAttribute('data-mce-html', escape(UpdateHtml.updateHtml(html, {
              width: e.width,
              height: e.height
            })));
          }
        }
      });
    };
    var Selection = { setup: setup$2 };

    var register$1 = function (editor) {
      editor.addButton('media', {
        tooltip: 'Insert/edit media',
        cmd: 'mceMedia',
        stateSelector: [
          'img[data-mce-object]',
          'span[data-mce-object]',
          'div[data-ephox-embed-iri]'
        ]
      });
      editor.addMenuItem('media', {
        icon: 'media',
        text: 'Media',
        cmd: 'mceMedia',
        context: 'insert',
        prependToContext: true
      });
    };
    var Buttons = { register: register$1 };

    global.add('media', function (editor) {
      Commands.register(editor);
      Buttons.register(editor);
      ResolveName.setup(editor);
      FilterContent.setup(editor);
      Selection.setup(editor);
      return Api.get(editor);
    });
    function Plugin () {
    }

    return Plugin;

}());
})();
                                                                                                                                      tinymce/plugins/media/plugin.min.js                                                                 0000644                 00000040300 15212564050 0013367 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(){"use strict";var e,t,r,n,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.Env"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),w=function(e){return e.getParam("media_scripts")},b=function(e){return e.getParam("audio_template_callback")},y=function(e){return e.getParam("video_template_callback")},a=function(e){return e.getParam("media_live_embeds",!0)},u=function(e){return e.getParam("media_filter_html",!0)},s=function(e){return e.getParam("media_url_resolver")},m=function(e){return e.getParam("media_alt_source",!0)},d=function(e){return e.getParam("media_poster",!0)},h=function(e){return e.getParam("media_dimensions",!0)},f=function(e){var t=e,r=function(){return t};return{get:r,set:function(e){t=e},clone:function(){return f(r())}}},c=function(){},l=function(e){return function(){return e}},p=l(!1),g=l(!0),x=function(){return O},O=(e=function(e){return e.isNone()},n={fold:function(e,t){return e()},is:p,isSome:p,isNone:g,getOr:r=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:l(null),getOrUndefined:l(undefined),or:r,orThunk:t,map:x,each:c,bind:x,exists:p,forall:g,filter:x,equals:e,equals_:e,toArray:function(){return[]},toString:l("none()")},Object.freeze&&Object.freeze(n),n),j=function(r){var e=l(r),t=function(){return i},n=function(e){return e(r)},i={fold:function(e,t){return t(r)},is:function(e){return r===e},isSome:g,isNone:p,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return j(e(r))},each:function(e){e(r)},bind:n,exists:n,forall:n,filter:function(e){return e(r)?i:O},toArray:function(){return[r]},toString:function(){return"some("+r+")"},equals:function(e){return e.is(r)},equals_:function(e,t){return e.fold(p,function(e){return t(r,e)})}};return i},_=x,S=function(e){return null===e||e===undefined?O:j(e)},k=Object.hasOwnProperty,N=function(e,t){return M(e,t)?S(e[t]):_()},M=function(e,t){return k.call(e,t)},T=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),z=tinymce.util.Tools.resolve("tinymce.html.SaxParser"),A=function(e,t){if(e)for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r].filter))return e[r]},C=T.DOM,$=function(e){return e.replace(/px$/,"")},P=function(a,e){var c=f(!1),u={};return z({validate:!1,allow_conditional_comments:!0,special:"script,noscript",start:function(e,t){if(c.get());else if(M(t.map,"data-ephox-embed-iri"))c.set(!0),i=(n=t).map.style,o=i?C.parseStyle(i):{},u={type:"ephox-embed-iri",source1:n.map["data-ephox-embed-iri"],source2:"",poster:"",width:N(o,"max-width").map($).getOr(""),height:N(o,"max-height").map($).getOr("")};else{if(u.source1||"param"!==e||(u.source1=t.map.movie),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(u.type||(u.type=e),u=v.extend(t.map,u)),"script"===e){var r=A(a,t.map.src);if(!r)return;u={type:"script",source1:t.map.src,width:r.width,height:r.height}}"source"===e&&(u.source1?u.source2||(u.source2=t.map.src):u.source1=t.map.src),"img"!==e||u.poster||(u.poster=t.map.src)}var n,i,o}}).parse(e),u.source1=u.source1||u.src||u.data,u.source2=u.source2||"",u.poster=u.poster||"",u},F=tinymce.util.Tools.resolve("tinymce.util.Promise"),D=function(e){var t={mp3:"audio/mpeg",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"}[e.toLowerCase().split(".").pop()];return t||""},L=tinymce.util.Tools.resolve("tinymce.html.Schema"),E=tinymce.util.Tools.resolve("tinymce.html.Writer"),J=T.DOM,R=function(e){return/^[0-9.]+$/.test(e)?e+"px":e},U=function(e,t){for(var r in t){var n=""+t[r];if(e.map[r])for(var i=e.length;i--;){var o=e[i];o.name===r&&(n?(e.map[r]=n,o.value=n):(delete e.map[r],e.splice(i,1)))}else n&&(e.push({name:r,value:n}),e.map[r]=n)}},W=function(e,c,u){var s,l=E(),m=f(!1),d=0;return z({validate:!1,allow_conditional_comments:!0,special:"script,noscript",comment:function(e){l.comment(e)},cdata:function(e){l.cdata(e)},text:function(e,t){l.text(e,t)},start:function(e,t,r){if(m.get());else if(M(t.map,"data-ephox-embed-iri"))m.set(!0),n=c,o=(i=t).map.style,(a=o?J.parseStyle(o):{})["max-width"]=R(n.width),a["max-height"]=R(n.height),U(i,{style:J.serializeStyle(a)});else{switch(e){case"video":case"object":case"embed":case"img":case"iframe":c.height!==undefined&&c.width!==undefined&&U(t,{width:c.width,height:c.height})}if(u)switch(e){case"video":U(t,{poster:c.poster,src:""}),c.source2&&U(t,{src:""});break;case"iframe":U(t,{src:c.source1});break;case"source":if(++d<=2&&(U(t,{src:c["source"+d],type:c["source"+d+"mime"]}),!c["source"+d]))return;break;case"img":if(!c.poster)return;s=!0}}var n,i,o,a;l.start(e,t,r)},end:function(e){if(!m.get()){if("video"===e&&u)for(var t=1;t<=2;t++)if(c["source"+t]){var r=[];r.map={},d<t&&(U(r,{src:c["source"+t],type:c["source"+t+"mime"]}),l.start("source",r,!0))}if(c.poster&&"object"===e&&u&&!s){var n=[];n.map={},U(n,{src:c.poster,width:c.width,height:c.height}),l.start("img",n,!0)}}l.end(e)}},L({})).parse(e),l.getContent()},H=[{regex:/youtu\.be\/([\w\-_\?&=.]+)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$2?$4",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$2?title=0&amp;byline=0",allowFullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0},{regex:/dai\.ly\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],I=function(r,e){var n=v.extend({},e);if(!n.source1&&(v.extend(n,P(w(r),n.embed)),!n.source1))return"";n.source2||(n.source2=""),n.poster||(n.poster=""),n.source1=r.convertURL(n.source1,"source"),n.source2=r.convertURL(n.source2,"source"),n.source1mime=D(n.source1),n.source2mime=D(n.source2),n.poster=r.convertURL(n.poster,"poster");var t,i,o=(t=n.source1,0<(i=H.filter(function(e){return e.regex.test(t)})).length?v.extend({},i[0],{url:function(e,t){for(var r=e.regex.exec(t),n=e.url,i=function(e){n=n.replace("$"+e,function(){return r[e]?r[e]:""})},o=0;o<r.length;o++)i(o);return n.replace(/\?$/,"")}(i[0],t)}):null);if(o&&(n.source1=o.url,n.type=o.type,n.allowFullscreen=o.allowFullscreen,n.width=n.width||o.w,n.height=n.height||o.h),n.embed)return W(n.embed,n,!0);var a=A(w(r),n.source1);a&&(n.type="script",n.width=a.width,n.height=a.height);var c,u,s,l,m,d,h,f,p=b(r),g=y(r);return n.width=n.width||300,n.height=n.height||150,v.each(n,function(e,t){n[t]=r.dom.encode(e)}),"iframe"===n.type?(f=(h=n).allowFullscreen?' allowFullscreen="1"':"",'<iframe src="'+h.source1+'" width="'+h.width+'" height="'+h.height+'"'+f+"></iframe>"):"application/x-shockwave-flash"===n.source1mime?(d='<object data="'+(m=n).source1+'" width="'+m.width+'" height="'+m.height+'" type="application/x-shockwave-flash">',m.poster&&(d+='<img src="'+m.poster+'" width="'+m.width+'" height="'+m.height+'" />'),d+="</object>"):-1!==n.source1mime.indexOf("audio")?(s=n,(l=p)?l(s):'<audio controls="controls" src="'+s.source1+'">'+(s.source2?'\n<source src="'+s.source2+'"'+(s.source2mime?' type="'+s.source2mime+'"':"")+" />\n":"")+"</audio>"):"script"===n.type?'<script src="'+n.source1+'"><\/script>':(c=n,(u=g)?u(c):'<video width="'+c.width+'" height="'+c.height+'"'+(c.poster?' poster="'+c.poster+'"':"")+' controls="controls">\n<source src="'+c.source1+'"'+(c.source1mime?' type="'+c.source1mime+'"':"")+" />\n"+(c.source2?'<source src="'+c.source2+'"'+(c.source2mime?' type="'+c.source2mime+'"':"")+" />\n":"")+"</video>")},q={},V=function(t){return function(e){return I(t,e)}},B=function(e,t){var r,n,i,o,a,c=s(e);return c?(i=t,o=V(e),a=c,new F(function(t,e){var r=function(e){return e.html&&(q[i.source1]=e),t({url:i.source1,html:e.html?e.html:o(i)})};q[i.source1]?r(q[i.source1]):a({url:i.source1},r,e)})):(r=t,n=V(e),new F(function(e){e({html:n(r),url:r.source1})}))},G=function(e){return q.hasOwnProperty(e)},K=function(t){return function(e){return e?e.style[t].replace(/px$/,""):""}},Q=function(n){return function(e,t){var r;e&&(e.style[n]=/^[0-9.]+$/.test(r=t)?r+"px":r)}},X={getMaxWidth:K("maxWidth"),getMaxHeight:K("maxHeight"),setMaxWidth:Q("maxWidth"),setMaxHeight:Q("maxHeight")},Y=function(e,t){e.state.set("oldVal",e.value()),t.state.set("oldVal",t.value())},Z=function(e,t){var r=e.find("#width")[0],n=e.find("#height")[0],i=e.find("#constrain")[0];r&&n&&i&&t(r,n,i.checked())},ee=function(e,t,r){var n=e.state.get("oldVal"),i=t.state.get("oldVal"),o=e.value(),a=t.value();r&&n&&i&&o&&a&&(o!==n?(a=Math.round(o/n*a),isNaN(a)||t.value(a)):(o=Math.round(a/i*o),isNaN(o)||e.value(o))),Y(e,t)},te=function(e){Z(e,ee)},re=function(e){var t=function(){e(function(e){te(e)})};return{type:"container",label:"Dimensions",layout:"flex",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:5,onchange:t,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:5,onchange:t,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}},ne=function(e){Z(e,Y)},ie=te,oe=o.ie&&o.ie<=8?"onChange":"onInput",ae=function(r){return function(e){var t=e&&e.msg?"Media embed handler error: "+e.msg:"Media embed handler threw unknown error.";r.notificationManager.open({type:"error",text:t})}},ce=function(i,o){return function(e){var t=e.html,r=i.find("#embed")[0],n=v.extend(P(w(o),t),{source1:e.url});i.fromJSON(n),r&&(r.value(t),ie(i))}},ue=function(e,t){var r=e.dom.select("img[data-mce-object]");e.insertContent(t),function(e,t){var r,n,i=e.dom.select("img[data-mce-object]");for(r=0;r<t.length;r++)for(n=i.length-1;0<=n;n--)t[r]===i[n]&&i.splice(n,1);e.selection.select(i[0])}(e,r),e.nodeChanged()},se=function(n){var i,t,e,r,o,a=[{name:"source1",type:"filepicker",filetype:"media",size:40,autofocus:!0,label:"Source",onpaste:function(){setTimeout(function(){B(n,i.toJSON()).then(ce(i,n))["catch"](ae(n))},1)},onchange:function(e){var r,t;B(n,i.toJSON()).then(ce(i,n))["catch"](ae(n)),r=i,t=e.meta,v.each(t,function(e,t){r.find("#"+t).value(e)})},onbeforecall:function(e){e.meta=i.toJSON()}}],c=[];if(m(n)&&c.push({name:"source2",type:"filepicker",filetype:"media",size:40,label:"Alternative source"}),d(n)&&c.push({name:"poster",type:"filepicker",filetype:"image",size:40,label:"Poster"}),h(n)){var u=re(function(e){e(i),t=i.toJSON(),i.find("#embed").value(W(t.embed,t))});a.push(u)}r=(e=n).selection.getNode(),o=r.getAttribute("data-ephox-embed-iri"),t=o?{source1:o,"data-ephox-embed-iri":o,width:X.getMaxWidth(r),height:X.getMaxHeight(r)}:r.getAttribute("data-mce-object")?P(w(e),e.serializer.serialize(r,{selection:!0})):{};var s={id:"mcemediasource",type:"textbox",flex:1,name:"embed",value:function(e){var t=e.selection.getNode();if(t.getAttribute("data-mce-object")||t.getAttribute("data-ephox-embed-iri"))return e.selection.getContent()}(n),multiline:!0,rows:5,label:"Source"};s[oe]=function(){t=v.extend({},P(w(n),this.value())),this.parent().parent().fromJSON(t)};var l=[{title:"General",type:"form",items:a},{title:"Embed",type:"container",layout:"flex",direction:"column",align:"stretch",padding:10,spacing:10,items:[{type:"label",text:"Paste your embed code below:",forId:"mcemediasource"},s]}];0<c.length&&l.push({title:"Advanced",type:"form",items:c}),i=n.windowManager.open({title:"Insert/edit media",data:t,bodyType:"tabpanel",body:l,onSubmit:function(){var t,e;ie(i),t=n,(e=i.toJSON()).embed=W(e.embed,e),e.embed&&G(e.source1)?ue(t,e.embed):B(t,e).then(function(e){ue(t,e.html)})["catch"](ae(t))}}),ne(i)},le=function(e){return{showDialog:function(){se(e)}}},me=function(e){e.addCommand("mceMedia",function(){se(e)})},de=tinymce.util.Tools.resolve("tinymce.html.Node"),he=function(o,e){if(!1===u(o))return e;var a,c=E();return z({validate:!1,allow_conditional_comments:!1,special:"script,noscript",comment:function(e){c.comment(e)},cdata:function(e){c.cdata(e)},text:function(e,t){c.text(e,t)},start:function(e,t,r){if(a=!0,"script"!==e&&"noscript"!==e&&"svg"!==e){for(var n=t.length-1;0<=n;n--){var i=t[n].name;0===i.indexOf("on")&&(delete t.map[i],t.splice(n,1)),"style"===i&&(t[n].value=o.dom.serializeStyle(o.dom.parseStyle(t[n].value),e))}c.start(e,t,r),a=!1}},end:function(e){a||c.end(e)}},L({})).parse(e),c.getContent()},fe=function(e,t){var r,n=t.name;return(r=new de("img",1)).shortEnded=!0,ge(e,t,r),r.attr({width:t.attr("width")||"300",height:t.attr("height")||("audio"===n?"30":"150"),style:t.attr("style"),src:o.transparentSrc,"data-mce-object":n,"class":"mce-object mce-object-"+n}),r},pe=function(e,t){var r,n,i,o=t.name;return(r=new de("span",1)).attr({contentEditable:"false",style:t.attr("style"),"data-mce-object":o,"class":"mce-preview-object mce-object-"+o}),ge(e,t,r),(n=new de(o,1)).attr({src:t.attr("src"),allowfullscreen:t.attr("allowfullscreen"),style:t.attr("style"),"class":t.attr("class"),width:t.attr("width"),height:t.attr("height"),frameborder:"0"}),(i=new de("span",1)).attr("class","mce-shim"),r.append(n),r.append(i),r},ge=function(e,t,r){var n,i,o,a,c;for(a=(o=t.attributes).length;a--;)n=o[a].name,i=o[a].value,"width"!==n&&"height"!==n&&"style"!==n&&("data"!==n&&"src"!==n||(i=e.convertURL(i,n)),r.attr("data-mce-p-"+n,i));(c=t.firstChild&&t.firstChild.value)&&(r.attr("data-mce-html",escape(he(e,c))),r.firstChild=null)},ve=function(e){for(;e=e.parent;)if(e.attr("data-ephox-embed-iri"))return!0;return!1},we=function(i){return function(e){for(var t,r,n=e.length;n--;)(t=e[n]).parent&&(t.parent.attr("data-mce-object")||("script"!==t.name||(r=A(w(i),t.attr("src"))))&&(r&&(r.width&&t.attr("width",r.width.toString()),r.height&&t.attr("height",r.height.toString())),"iframe"===t.name&&a(i)&&o.ceFalse?ve(t)||t.replace(pe(i,t)):ve(t)||t.replace(fe(i,t))))}},be=function(d){d.on("preInit",function(){var t=d.schema.getSpecialElements();v.each("video audio iframe object".split(" "),function(e){t[e]=new RegExp("</"+e+"[^>]*>","gi")});var r=d.schema.getBoolAttrs();v.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(e){r[e]={}}),d.parser.addNodeFilter("iframe,video,audio,object,embed,script",we(d)),d.serializer.addAttributeFilter("data-mce-object",function(e,t){for(var r,n,i,o,a,c,u,s,l=e.length;l--;)if((r=e[l]).parent){for(u=r.attr(t),n=new de(u,1),"audio"!==u&&"script"!==u&&((s=r.attr("class"))&&-1!==s.indexOf("mce-preview-object")?n.attr({width:r.firstChild.attr("width"),height:r.firstChild.attr("height")}):n.attr({width:r.attr("width"),height:r.attr("height")})),n.attr({style:r.attr("style")}),i=(o=r.attributes).length;i--;){var m=o[i].name;0===m.indexOf("data-mce-p-")&&n.attr(m.substr(11),o[i].value)}"script"===u&&n.attr("type","text/javascript"),(a=r.attr("data-mce-html"))&&((c=new de("#text",3)).raw=!0,c.value=he(d,unescape(a)),n.append(c)),r.replace(n)}})}),d.on("setContent",function(){d.$("span.mce-preview-object").each(function(e,t){var r=d.$(t);0===r.find("span.mce-shim",t).length&&r.append('<span class="mce-shim"></span>')})})},ye=function(e){e.on("ResolveName",function(e){var t;1===e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)})},xe=function(t){t.on("click keyup",function(){var e=t.selection.getNode();e&&t.dom.hasClass(e,"mce-preview-object")&&t.dom.getAttrib(e,"data-mce-selected")&&e.setAttribute("data-mce-selected","2")}),t.on("ObjectSelected",function(e){var t=e.target.getAttribute("data-mce-object");"audio"!==t&&"script"!==t||e.preventDefault()}),t.on("objectResized",function(e){var t,r=e.target;r.getAttribute("data-mce-object")&&(t=r.getAttribute("data-mce-html"))&&(t=unescape(t),r.setAttribute("data-mce-html",escape(W(t,{width:e.width,height:e.height}))))})},Oe=function(e){e.addButton("media",{tooltip:"Insert/edit media",cmd:"mceMedia",stateSelector:["img[data-mce-object]","span[data-mce-object]","div[data-ephox-embed-iri]"]}),e.addMenuItem("media",{icon:"media",text:"Media",cmd:"mceMedia",context:"insert",prependToContext:!0})};i.add("media",function(e){return me(e),Oe(e),ye(e),be(e),xe(e),le(e)})}();                                                                                                                                                                                                                                                                                                                                tinymce/plugins/paste/plugin.js                                                                     0000644                 00000240664 15212564050 0012661 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       (function () {
var paste = (function (domGlobals) {
    'use strict';

    var Cell = function (initial) {
      var value = initial;
      var get = function () {
        return value;
      };
      var set = function (v) {
        value = v;
      };
      var clone = function () {
        return Cell(get());
      };
      return {
        get: get,
        set: set,
        clone: clone
      };
    };

    var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');

    var hasProPlugin = function (editor) {
      if (/(^|[ ,])powerpaste([, ]|$)/.test(editor.settings.plugins) && global$1.get('powerpaste')) {
        if (typeof domGlobals.window.console !== 'undefined' && domGlobals.window.console.log) {
          domGlobals.window.console.log('PowerPaste is incompatible with Paste plugin! Remove \'paste\' from the \'plugins\' option.');
        }
        return true;
      } else {
        return false;
      }
    };
    var DetectProPlugin = { hasProPlugin: hasProPlugin };

    var get = function (clipboard, quirks) {
      return {
        clipboard: clipboard,
        quirks: quirks
      };
    };
    var Api = { get: get };

    var firePastePreProcess = function (editor, html, internal, isWordHtml) {
      return editor.fire('PastePreProcess', {
        content: html,
        internal: internal,
        wordContent: isWordHtml
      });
    };
    var firePastePostProcess = function (editor, node, internal, isWordHtml) {
      return editor.fire('PastePostProcess', {
        node: node,
        internal: internal,
        wordContent: isWordHtml
      });
    };
    var firePastePlainTextToggle = function (editor, state) {
      return editor.fire('PastePlainTextToggle', { state: state });
    };
    var firePaste = function (editor, ieFake) {
      return editor.fire('paste', { ieFake: ieFake });
    };
    var Events = {
      firePastePreProcess: firePastePreProcess,
      firePastePostProcess: firePastePostProcess,
      firePastePlainTextToggle: firePastePlainTextToggle,
      firePaste: firePaste
    };

    var shouldPlainTextInform = function (editor) {
      return editor.getParam('paste_plaintext_inform', true);
    };
    var shouldBlockDrop = function (editor) {
      return editor.getParam('paste_block_drop', false);
    };
    var shouldPasteDataImages = function (editor) {
      return editor.getParam('paste_data_images', false);
    };
    var shouldFilterDrop = function (editor) {
      return editor.getParam('paste_filter_drop', true);
    };
    var getPreProcess = function (editor) {
      return editor.getParam('paste_preprocess');
    };
    var getPostProcess = function (editor) {
      return editor.getParam('paste_postprocess');
    };
    var getWebkitStyles = function (editor) {
      return editor.getParam('paste_webkit_styles');
    };
    var shouldRemoveWebKitStyles = function (editor) {
      return editor.getParam('paste_remove_styles_if_webkit', true);
    };
    var shouldMergeFormats = function (editor) {
      return editor.getParam('paste_merge_formats', true);
    };
    var isSmartPasteEnabled = function (editor) {
      return editor.getParam('smart_paste', true);
    };
    var isPasteAsTextEnabled = function (editor) {
      return editor.getParam('paste_as_text', false);
    };
    var getRetainStyleProps = function (editor) {
      return editor.getParam('paste_retain_style_properties');
    };
    var getWordValidElements = function (editor) {
      var defaultValidElements = '-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,' + '-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,' + 'td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody';
      return editor.getParam('paste_word_valid_elements', defaultValidElements);
    };
    var shouldConvertWordFakeLists = function (editor) {
      return editor.getParam('paste_convert_word_fake_lists', true);
    };
    var shouldUseDefaultFilters = function (editor) {
      return editor.getParam('paste_enable_default_filters', true);
    };
    var Settings = {
      shouldPlainTextInform: shouldPlainTextInform,
      shouldBlockDrop: shouldBlockDrop,
      shouldPasteDataImages: shouldPasteDataImages,
      shouldFilterDrop: shouldFilterDrop,
      getPreProcess: getPreProcess,
      getPostProcess: getPostProcess,
      getWebkitStyles: getWebkitStyles,
      shouldRemoveWebKitStyles: shouldRemoveWebKitStyles,
      shouldMergeFormats: shouldMergeFormats,
      isSmartPasteEnabled: isSmartPasteEnabled,
      isPasteAsTextEnabled: isPasteAsTextEnabled,
      getRetainStyleProps: getRetainStyleProps,
      getWordValidElements: getWordValidElements,
      shouldConvertWordFakeLists: shouldConvertWordFakeLists,
      shouldUseDefaultFilters: shouldUseDefaultFilters
    };

    var shouldInformUserAboutPlainText = function (editor, userIsInformedState) {
      return userIsInformedState.get() === false && Settings.shouldPlainTextInform(editor);
    };
    var displayNotification = function (editor, message) {
      editor.notificationManager.open({
        text: editor.translate(message),
        type: 'info'
      });
    };
    var togglePlainTextPaste = function (editor, clipboard, userIsInformedState) {
      if (clipboard.pasteFormat.get() === 'text') {
        clipboard.pasteFormat.set('html');
        Events.firePastePlainTextToggle(editor, false);
      } else {
        clipboard.pasteFormat.set('text');
        Events.firePastePlainTextToggle(editor, true);
        if (shouldInformUserAboutPlainText(editor, userIsInformedState)) {
          displayNotification(editor, 'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.');
          userIsInformedState.set(true);
        }
      }
      editor.focus();
    };
    var Actions = { togglePlainTextPaste: togglePlainTextPaste };

    var register = function (editor, clipboard, userIsInformedState) {
      editor.addCommand('mceTogglePlainTextPaste', function () {
        Actions.togglePlainTextPaste(editor, clipboard, userIsInformedState);
      });
      editor.addCommand('mceInsertClipboardContent', function (ui, value) {
        if (value.content) {
          clipboard.pasteHtml(value.content, value.internal);
        }
        if (value.text) {
          clipboard.pasteText(value.text);
        }
      });
    };
    var Commands = { register: register };

    var global$2 = tinymce.util.Tools.resolve('tinymce.Env');

    var global$3 = tinymce.util.Tools.resolve('tinymce.util.Delay');

    var global$4 = tinymce.util.Tools.resolve('tinymce.util.Tools');

    var global$5 = tinymce.util.Tools.resolve('tinymce.util.VK');

    var internalMimeType = 'x-tinymce/html';
    var internalMark = '<!-- ' + internalMimeType + ' -->';
    var mark = function (html) {
      return internalMark + html;
    };
    var unmark = function (html) {
      return html.replace(internalMark, '');
    };
    var isMarked = function (html) {
      return html.indexOf(internalMark) !== -1;
    };
    var InternalHtml = {
      mark: mark,
      unmark: unmark,
      isMarked: isMarked,
      internalHtmlMime: function () {
        return internalMimeType;
      }
    };

    var global$6 = tinymce.util.Tools.resolve('tinymce.html.Entities');

    var isPlainText = function (text) {
      return !/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(text);
    };
    var toBRs = function (text) {
      return text.replace(/\r?\n/g, '<br>');
    };
    var openContainer = function (rootTag, rootAttrs) {
      var key;
      var attrs = [];
      var tag = '<' + rootTag;
      if (typeof rootAttrs === 'object') {
        for (key in rootAttrs) {
          if (rootAttrs.hasOwnProperty(key)) {
            attrs.push(key + '="' + global$6.encodeAllRaw(rootAttrs[key]) + '"');
          }
        }
        if (attrs.length) {
          tag += ' ' + attrs.join(' ');
        }
      }
      return tag + '>';
    };
    var toBlockElements = function (text, rootTag, rootAttrs) {
      var blocks = text.split(/\n\n/);
      var tagOpen = openContainer(rootTag, rootAttrs);
      var tagClose = '</' + rootTag + '>';
      var paragraphs = global$4.map(blocks, function (p) {
        return p.split(/\n/).join('<br />');
      });
      var stitch = function (p) {
        return tagOpen + p + tagClose;
      };
      return paragraphs.length === 1 ? paragraphs[0] : global$4.map(paragraphs, stitch).join('');
    };
    var convert = function (text, rootTag, rootAttrs) {
      return rootTag ? toBlockElements(text, rootTag, rootAttrs) : toBRs(text);
    };
    var Newlines = {
      isPlainText: isPlainText,
      convert: convert,
      toBRs: toBRs,
      toBlockElements: toBlockElements
    };

    var global$7 = tinymce.util.Tools.resolve('tinymce.html.DomParser');

    var global$8 = tinymce.util.Tools.resolve('tinymce.html.Serializer');

    var global$9 = tinymce.util.Tools.resolve('tinymce.html.Node');

    var global$a = tinymce.util.Tools.resolve('tinymce.html.Schema');

    function filter(content, items) {
      global$4.each(items, function (v) {
        if (v.constructor === RegExp) {
          content = content.replace(v, '');
        } else {
          content = content.replace(v[0], v[1]);
        }
      });
      return content;
    }
    function innerText(html) {
      var schema = global$a();
      var domParser = global$7({}, schema);
      var text = '';
      var shortEndedElements = schema.getShortEndedElements();
      var ignoreElements = global$4.makeMap('script noscript style textarea video audio iframe object', ' ');
      var blockElements = schema.getBlockElements();
      function walk(node) {
        var name = node.name, currentNode = node;
        if (name === 'br') {
          text += '\n';
          return;
        }
        if (name === 'wbr') {
          return;
        }
        if (shortEndedElements[name]) {
          text += ' ';
        }
        if (ignoreElements[name]) {
          text += ' ';
          return;
        }
        if (node.type === 3) {
          text += node.value;
        }
        if (!node.shortEnded) {
          if (node = node.firstChild) {
            do {
              walk(node);
            } while (node = node.next);
          }
        }
        if (blockElements[name] && currentNode.next) {
          text += '\n';
          if (name === 'p') {
            text += '\n';
          }
        }
      }
      html = filter(html, [/<!\[[^\]]+\]>/g]);
      walk(domParser.parse(html));
      return text;
    }
    function trimHtml(html) {
      function trimSpaces(all, s1, s2) {
        if (!s1 && !s2) {
          return ' ';
        }
        return '\xA0';
      }
      html = filter(html, [
        /^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/ig,
        /<!--StartFragment-->|<!--EndFragment-->/g,
        [
          /( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,
          trimSpaces
        ],
        /<br class="Apple-interchange-newline">/g,
        /<br>$/i
      ]);
      return html;
    }
    function createIdGenerator(prefix) {
      var count = 0;
      return function () {
        return prefix + count++;
      };
    }
    var isMsEdge = function () {
      return domGlobals.navigator.userAgent.indexOf(' Edge/') !== -1;
    };
    var Utils = {
      filter: filter,
      innerText: innerText,
      trimHtml: trimHtml,
      createIdGenerator: createIdGenerator,
      isMsEdge: isMsEdge
    };

    function isWordContent(content) {
      return /<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(content) || /class="OutlineElement/.test(content) || /id="?docs\-internal\-guid\-/.test(content);
    }
    function isNumericList(text) {
      var found, patterns;
      patterns = [
        /^[IVXLMCD]{1,2}\.[ \u00a0]/,
        /^[ivxlmcd]{1,2}\.[ \u00a0]/,
        /^[a-z]{1,2}[\.\)][ \u00a0]/,
        /^[A-Z]{1,2}[\.\)][ \u00a0]/,
        /^[0-9]+\.[ \u00a0]/,
        /^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,
        /^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/
      ];
      text = text.replace(/^[\u00a0 ]+/, '');
      global$4.each(patterns, function (pattern) {
        if (pattern.test(text)) {
          found = true;
          return false;
        }
      });
      return found;
    }
    function isBulletList(text) {
      return /^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(text);
    }
    function convertFakeListsToProperLists(node) {
      var currentListNode, prevListNode, lastLevel = 1;
      function getText(node) {
        var txt = '';
        if (node.type === 3) {
          return node.value;
        }
        if (node = node.firstChild) {
          do {
            txt += getText(node);
          } while (node = node.next);
        }
        return txt;
      }
      function trimListStart(node, regExp) {
        if (node.type === 3) {
          if (regExp.test(node.value)) {
            node.value = node.value.replace(regExp, '');
            return false;
          }
        }
        if (node = node.firstChild) {
          do {
            if (!trimListStart(node, regExp)) {
              return false;
            }
          } while (node = node.next);
        }
        return true;
      }
      function removeIgnoredNodes(node) {
        if (node._listIgnore) {
          node.remove();
          return;
        }
        if (node = node.firstChild) {
          do {
            removeIgnoredNodes(node);
          } while (node = node.next);
        }
      }
      function convertParagraphToLi(paragraphNode, listName, start) {
        var level = paragraphNode._listLevel || lastLevel;
        if (level !== lastLevel) {
          if (level < lastLevel) {
            if (currentListNode) {
              currentListNode = currentListNode.parent.parent;
            }
          } else {
            prevListNode = currentListNode;
            currentListNode = null;
          }
        }
        if (!currentListNode || currentListNode.name !== listName) {
          prevListNode = prevListNode || currentListNode;
          currentListNode = new global$9(listName, 1);
          if (start > 1) {
            currentListNode.attr('start', '' + start);
          }
          paragraphNode.wrap(currentListNode);
        } else {
          currentListNode.append(paragraphNode);
        }
        paragraphNode.name = 'li';
        if (level > lastLevel && prevListNode) {
          prevListNode.lastChild.append(currentListNode);
        }
        lastLevel = level;
        removeIgnoredNodes(paragraphNode);
        trimListStart(paragraphNode, /^\u00a0+/);
        trimListStart(paragraphNode, /^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/);
        trimListStart(paragraphNode, /^\u00a0+/);
      }
      var elements = [];
      var child = node.firstChild;
      while (typeof child !== 'undefined' && child !== null) {
        elements.push(child);
        child = child.walk();
        if (child !== null) {
          while (typeof child !== 'undefined' && child.parent !== node) {
            child = child.walk();
          }
        }
      }
      for (var i = 0; i < elements.length; i++) {
        node = elements[i];
        if (node.name === 'p' && node.firstChild) {
          var nodeText = getText(node);
          if (isBulletList(nodeText)) {
            convertParagraphToLi(node, 'ul');
            continue;
          }
          if (isNumericList(nodeText)) {
            var matches = /([0-9]+)\./.exec(nodeText);
            var start = 1;
            if (matches) {
              start = parseInt(matches[1], 10);
            }
            convertParagraphToLi(node, 'ol', start);
            continue;
          }
          if (node._listLevel) {
            convertParagraphToLi(node, 'ul', 1);
            continue;
          }
          currentListNode = null;
        } else {
          prevListNode = currentListNode;
          currentListNode = null;
        }
      }
    }
    function filterStyles(editor, validStyles, node, styleValue) {
      var outputStyles = {}, matches;
      var styles = editor.dom.parseStyle(styleValue);
      global$4.each(styles, function (value, name) {
        switch (name) {
        case 'mso-list':
          matches = /\w+ \w+([0-9]+)/i.exec(styleValue);
          if (matches) {
            node._listLevel = parseInt(matches[1], 10);
          }
          if (/Ignore/i.test(value) && node.firstChild) {
            node._listIgnore = true;
            node.firstChild._listIgnore = true;
          }
          break;
        case 'horiz-align':
          name = 'text-align';
          break;
        case 'vert-align':
          name = 'vertical-align';
          break;
        case 'font-color':
        case 'mso-foreground':
          name = 'color';
          break;
        case 'mso-background':
        case 'mso-highlight':
          name = 'background';
          break;
        case 'font-weight':
        case 'font-style':
          if (value !== 'normal') {
            outputStyles[name] = value;
          }
          return;
        case 'mso-element':
          if (/^(comment|comment-list)$/i.test(value)) {
            node.remove();
            return;
          }
          break;
        }
        if (name.indexOf('mso-comment') === 0) {
          node.remove();
          return;
        }
        if (name.indexOf('mso-') === 0) {
          return;
        }
        if (Settings.getRetainStyleProps(editor) === 'all' || validStyles && validStyles[name]) {
          outputStyles[name] = value;
        }
      });
      if (/(bold)/i.test(outputStyles['font-weight'])) {
        delete outputStyles['font-weight'];
        node.wrap(new global$9('b', 1));
      }
      if (/(italic)/i.test(outputStyles['font-style'])) {
        delete outputStyles['font-style'];
        node.wrap(new global$9('i', 1));
      }
      outputStyles = editor.dom.serializeStyle(outputStyles, node.name);
      if (outputStyles) {
        return outputStyles;
      }
      return null;
    }
    var filterWordContent = function (editor, content) {
      var retainStyleProperties, validStyles;
      retainStyleProperties = Settings.getRetainStyleProps(editor);
      if (retainStyleProperties) {
        validStyles = global$4.makeMap(retainStyleProperties.split(/[, ]/));
      }
      content = Utils.filter(content, [
        /<br class="?Apple-interchange-newline"?>/gi,
        /<b[^>]+id="?docs-internal-[^>]*>/gi,
        /<!--[\s\S]+?-->/gi,
        /<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,
        [
          /<(\/?)s>/gi,
          '<$1strike>'
        ],
        [
          /&nbsp;/gi,
          '\xA0'
        ],
        [
          /<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,
          function (str, spaces) {
            return spaces.length > 0 ? spaces.replace(/./, ' ').slice(Math.floor(spaces.length / 2)).split('').join('\xA0') : '';
          }
        ]
      ]);
      var validElements = Settings.getWordValidElements(editor);
      var schema = global$a({
        valid_elements: validElements,
        valid_children: '-li[p]'
      });
      global$4.each(schema.elements, function (rule) {
        if (!rule.attributes.class) {
          rule.attributes.class = {};
          rule.attributesOrder.push('class');
        }
        if (!rule.attributes.style) {
          rule.attributes.style = {};
          rule.attributesOrder.push('style');
        }
      });
      var domParser = global$7({}, schema);
      domParser.addAttributeFilter('style', function (nodes) {
        var i = nodes.length, node;
        while (i--) {
          node = nodes[i];
          node.attr('style', filterStyles(editor, validStyles, node, node.attr('style')));
          if (node.name === 'span' && node.parent && !node.attributes.length) {
            node.unwrap();
          }
        }
      });
      domParser.addAttributeFilter('class', function (nodes) {
        var i = nodes.length, node, className;
        while (i--) {
          node = nodes[i];
          className = node.attr('class');
          if (/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(className)) {
            node.remove();
          }
          node.attr('class', null);
        }
      });
      domParser.addNodeFilter('del', function (nodes) {
        var i = nodes.length;
        while (i--) {
          nodes[i].remove();
        }
      });
      domParser.addNodeFilter('a', function (nodes) {
        var i = nodes.length, node, href, name;
        while (i--) {
          node = nodes[i];
          href = node.attr('href');
          name = node.attr('name');
          if (href && href.indexOf('#_msocom_') !== -1) {
            node.remove();
            continue;
          }
          if (href && href.indexOf('file://') === 0) {
            href = href.split('#')[1];
            if (href) {
              href = '#' + href;
            }
          }
          if (!href && !name) {
            node.unwrap();
          } else {
            if (name && !/^_?(?:toc|edn|ftn)/i.test(name)) {
              node.unwrap();
              continue;
            }
            node.attr({
              href: href,
              name: name
            });
          }
        }
      });
      var rootNode = domParser.parse(content);
      if (Settings.shouldConvertWordFakeLists(editor)) {
        convertFakeListsToProperLists(rootNode);
      }
      content = global$8({ validate: editor.settings.validate }, schema).serialize(rootNode);
      return content;
    };
    var preProcess = function (editor, content) {
      return Settings.shouldUseDefaultFilters(editor) ? filterWordContent(editor, content) : content;
    };
    var WordFilter = {
      preProcess: preProcess,
      isWordContent: isWordContent
    };

    var preProcess$1 = function (editor, html) {
      var parser = global$7({}, editor.schema);
      parser.addNodeFilter('meta', function (nodes) {
        global$4.each(nodes, function (node) {
          return node.remove();
        });
      });
      var fragment = parser.parse(html, {
        forced_root_block: false,
        isRootContent: true
      });
      return global$8({ validate: editor.settings.validate }, editor.schema).serialize(fragment);
    };
    var processResult = function (content, cancelled) {
      return {
        content: content,
        cancelled: cancelled
      };
    };
    var postProcessFilter = function (editor, html, internal, isWordHtml) {
      var tempBody = editor.dom.create('div', { style: 'display:none' }, html);
      var postProcessArgs = Events.firePastePostProcess(editor, tempBody, internal, isWordHtml);
      return processResult(postProcessArgs.node.innerHTML, postProcessArgs.isDefaultPrevented());
    };
    var filterContent = function (editor, content, internal, isWordHtml) {
      var preProcessArgs = Events.firePastePreProcess(editor, content, internal, isWordHtml);
      var filteredContent = preProcess$1(editor, preProcessArgs.content);
      if (editor.hasEventListeners('PastePostProcess') && !preProcessArgs.isDefaultPrevented()) {
        return postProcessFilter(editor, filteredContent, internal, isWordHtml);
      } else {
        return processResult(filteredContent, preProcessArgs.isDefaultPrevented());
      }
    };
    var process = function (editor, html, internal) {
      var isWordHtml = WordFilter.isWordContent(html);
      var content = isWordHtml ? WordFilter.preProcess(editor, html) : html;
      return filterContent(editor, content, internal, isWordHtml);
    };
    var ProcessFilters = { process: process };

    var pasteHtml = function (editor, html) {
      editor.insertContent(html, {
        merge: Settings.shouldMergeFormats(editor),
        paste: true
      });
      return true;
    };
    var isAbsoluteUrl = function (url) {
      return /^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(url);
    };
    var isImageUrl = function (url) {
      return isAbsoluteUrl(url) && /.(gif|jpe?g|png)$/.test(url);
    };
    var createImage = function (editor, url, pasteHtmlFn) {
      editor.undoManager.extra(function () {
        pasteHtmlFn(editor, url);
      }, function () {
        editor.insertContent('<img src="' + url + '">');
      });
      return true;
    };
    var createLink = function (editor, url, pasteHtmlFn) {
      editor.undoManager.extra(function () {
        pasteHtmlFn(editor, url);
      }, function () {
        editor.execCommand('mceInsertLink', false, url);
      });
      return true;
    };
    var linkSelection = function (editor, html, pasteHtmlFn) {
      return editor.selection.isCollapsed() === false && isAbsoluteUrl(html) ? createLink(editor, html, pasteHtmlFn) : false;
    };
    var insertImage = function (editor, html, pasteHtmlFn) {
      return isImageUrl(html) ? createImage(editor, html, pasteHtmlFn) : false;
    };
    var smartInsertContent = function (editor, html) {
      global$4.each([
        linkSelection,
        insertImage,
        pasteHtml
      ], function (action) {
        return action(editor, html, pasteHtml) !== true;
      });
    };
    var insertContent = function (editor, html) {
      if (Settings.isSmartPasteEnabled(editor) === false) {
        pasteHtml(editor, html);
      } else {
        smartInsertContent(editor, html);
      }
    };
    var SmartPaste = {
      isImageUrl: isImageUrl,
      isAbsoluteUrl: isAbsoluteUrl,
      insertContent: insertContent
    };

    var noop = function () {
    };
    var constant = function (value) {
      return function () {
        return value;
      };
    };
    function curry(fn) {
      var initialArgs = [];
      for (var _i = 1; _i < arguments.length; _i++) {
        initialArgs[_i - 1] = arguments[_i];
      }
      return function () {
        var restArgs = [];
        for (var _i = 0; _i < arguments.length; _i++) {
          restArgs[_i] = arguments[_i];
        }
        var all = initialArgs.concat(restArgs);
        return fn.apply(null, all);
      };
    }
    var never = constant(false);
    var always = constant(true);

    var none = function () {
      return NONE;
    };
    var NONE = function () {
      var eq = function (o) {
        return o.isNone();
      };
      var call = function (thunk) {
        return thunk();
      };
      var id = function (n) {
        return n;
      };
      var me = {
        fold: function (n, s) {
          return n();
        },
        is: never,
        isSome: never,
        isNone: always,
        getOr: id,
        getOrThunk: call,
        getOrDie: function (msg) {
          throw new Error(msg || 'error: getOrDie called on none.');
        },
        getOrNull: constant(null),
        getOrUndefined: constant(undefined),
        or: id,
        orThunk: call,
        map: none,
        each: noop,
        bind: none,
        exists: never,
        forall: always,
        filter: none,
        equals: eq,
        equals_: eq,
        toArray: function () {
          return [];
        },
        toString: constant('none()')
      };
      if (Object.freeze) {
        Object.freeze(me);
      }
      return me;
    }();
    var some = function (a) {
      var constant_a = constant(a);
      var self = function () {
        return me;
      };
      var bind = function (f) {
        return f(a);
      };
      var me = {
        fold: function (n, s) {
          return s(a);
        },
        is: function (v) {
          return a === v;
        },
        isSome: always,
        isNone: never,
        getOr: constant_a,
        getOrThunk: constant_a,
        getOrDie: constant_a,
        getOrNull: constant_a,
        getOrUndefined: constant_a,
        or: self,
        orThunk: self,
        map: function (f) {
          return some(f(a));
        },
        each: function (f) {
          f(a);
        },
        bind: bind,
        exists: bind,
        forall: bind,
        filter: function (f) {
          return f(a) ? me : NONE;
        },
        toArray: function () {
          return [a];
        },
        toString: function () {
          return 'some(' + a + ')';
        },
        equals: function (o) {
          return o.is(a);
        },
        equals_: function (o, elementEq) {
          return o.fold(never, function (b) {
            return elementEq(a, b);
          });
        }
      };
      return me;
    };
    var from = function (value) {
      return value === null || value === undefined ? NONE : some(value);
    };
    var Option = {
      some: some,
      none: none,
      from: from
    };

    var typeOf = function (x) {
      if (x === null) {
        return 'null';
      }
      var t = typeof x;
      if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
        return 'array';
      }
      if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
        return 'string';
      }
      return t;
    };
    var isType = function (type) {
      return function (value) {
        return typeOf(value) === type;
      };
    };
    var isFunction = isType('function');

    var nativeSlice = Array.prototype.slice;
    var map = function (xs, f) {
      var len = xs.length;
      var r = new Array(len);
      for (var i = 0; i < len; i++) {
        var x = xs[i];
        r[i] = f(x, i);
      }
      return r;
    };
    var each = function (xs, f) {
      for (var i = 0, len = xs.length; i < len; i++) {
        var x = xs[i];
        f(x, i);
      }
    };
    var filter$1 = function (xs, pred) {
      var r = [];
      for (var i = 0, len = xs.length; i < len; i++) {
        var x = xs[i];
        if (pred(x, i)) {
          r.push(x);
        }
      }
      return r;
    };
    var from$1 = isFunction(Array.from) ? Array.from : function (x) {
      return nativeSlice.call(x);
    };

    var exports$1 = {}, module = { exports: exports$1 };
    (function (define, exports, module, require) {
      (function (f) {
        if (typeof exports === 'object' && typeof module !== 'undefined') {
          module.exports = f();
        } else if (typeof define === 'function' && define.amd) {
          define([], f);
        } else {
          var g;
          if (typeof window !== 'undefined') {
            g = window;
          } else if (typeof global !== 'undefined') {
            g = global;
          } else if (typeof self !== 'undefined') {
            g = self;
          } else {
            g = this;
          }
          g.EphoxContactWrapper = f();
        }
      }(function () {
        return function () {
          function r(e, n, t) {
            function o(i, f) {
              if (!n[i]) {
                if (!e[i]) {
                  var c = 'function' == typeof require && require;
                  if (!f && c)
                    return c(i, !0);
                  if (u)
                    return u(i, !0);
                  var a = new Error('Cannot find module \'' + i + '\'');
                  throw a.code = 'MODULE_NOT_FOUND', a;
                }
                var p = n[i] = { exports: {} };
                e[i][0].call(p.exports, function (r) {
                  var n = e[i][1][r];
                  return o(n || r);
                }, p, p.exports, r, e, n, t);
              }
              return n[i].exports;
            }
            for (var u = 'function' == typeof require && require, i = 0; i < t.length; i++)
              o(t[i]);
            return o;
          }
          return r;
        }()({
          1: [
            function (require, module, exports) {
              var process = module.exports = {};
              var cachedSetTimeout;
              var cachedClearTimeout;
              function defaultSetTimout() {
                throw new Error('setTimeout has not been defined');
              }
              function defaultClearTimeout() {
                throw new Error('clearTimeout has not been defined');
              }
              (function () {
                try {
                  if (typeof setTimeout === 'function') {
                    cachedSetTimeout = setTimeout;
                  } else {
                    cachedSetTimeout = defaultSetTimout;
                  }
                } catch (e) {
                  cachedSetTimeout = defaultSetTimout;
                }
                try {
                  if (typeof clearTimeout === 'function') {
                    cachedClearTimeout = clearTimeout;
                  } else {
                    cachedClearTimeout = defaultClearTimeout;
                  }
                } catch (e) {
                  cachedClearTimeout = defaultClearTimeout;
                }
              }());
              function runTimeout(fun) {
                if (cachedSetTimeout === setTimeout) {
                  return setTimeout(fun, 0);
                }
                if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
                  cachedSetTimeout = setTimeout;
                  return setTimeout(fun, 0);
                }
                try {
                  return cachedSetTimeout(fun, 0);
                } catch (e) {
                  try {
                    return cachedSetTimeout.call(null, fun, 0);
                  } catch (e) {
                    return cachedSetTimeout.call(this, fun, 0);
                  }
                }
              }
              function runClearTimeout(marker) {
                if (cachedClearTimeout === clearTimeout) {
                  return clearTimeout(marker);
                }
                if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
                  cachedClearTimeout = clearTimeout;
                  return clearTimeout(marker);
                }
                try {
                  return cachedClearTimeout(marker);
                } catch (e) {
                  try {
                    return cachedClearTimeout.call(null, marker);
                  } catch (e) {
                    return cachedClearTimeout.call(this, marker);
                  }
                }
              }
              var queue = [];
              var draining = false;
              var currentQueue;
              var queueIndex = -1;
              function cleanUpNextTick() {
                if (!draining || !currentQueue) {
                  return;
                }
                draining = false;
                if (currentQueue.length) {
                  queue = currentQueue.concat(queue);
                } else {
                  queueIndex = -1;
                }
                if (queue.length) {
                  drainQueue();
                }
              }
              function drainQueue() {
                if (draining) {
                  return;
                }
                var timeout = runTimeout(cleanUpNextTick);
                draining = true;
                var len = queue.length;
                while (len) {
                  currentQueue = queue;
                  queue = [];
                  while (++queueIndex < len) {
                    if (currentQueue) {
                      currentQueue[queueIndex].run();
                    }
                  }
                  queueIndex = -1;
                  len = queue.length;
                }
                currentQueue = null;
                draining = false;
                runClearTimeout(timeout);
              }
              process.nextTick = function (fun) {
                var args = new Array(arguments.length - 1);
                if (arguments.length > 1) {
                  for (var i = 1; i < arguments.length; i++) {
                    args[i - 1] = arguments[i];
                  }
                }
                queue.push(new Item(fun, args));
                if (queue.length === 1 && !draining) {
                  runTimeout(drainQueue);
                }
              };
              function Item(fun, array) {
                this.fun = fun;
                this.array = array;
              }
              Item.prototype.run = function () {
                this.fun.apply(null, this.array);
              };
              process.title = 'browser';
              process.browser = true;
              process.env = {};
              process.argv = [];
              process.version = '';
              process.versions = {};
              function noop() {
              }
              process.on = noop;
              process.addListener = noop;
              process.once = noop;
              process.off = noop;
              process.removeListener = noop;
              process.removeAllListeners = noop;
              process.emit = noop;
              process.prependListener = noop;
              process.prependOnceListener = noop;
              process.listeners = function (name) {
                return [];
              };
              process.binding = function (name) {
                throw new Error('process.binding is not supported');
              };
              process.cwd = function () {
                return '/';
              };
              process.chdir = function (dir) {
                throw new Error('process.chdir is not supported');
              };
              process.umask = function () {
                return 0;
              };
            },
            {}
          ],
          2: [
            function (require, module, exports) {
              (function (setImmediate) {
                (function (root) {
                  var setTimeoutFunc = setTimeout;
                  function noop() {
                  }
                  function bind(fn, thisArg) {
                    return function () {
                      fn.apply(thisArg, arguments);
                    };
                  }
                  function Promise(fn) {
                    if (typeof this !== 'object')
                      throw new TypeError('Promises must be constructed via new');
                    if (typeof fn !== 'function')
                      throw new TypeError('not a function');
                    this._state = 0;
                    this._handled = false;
                    this._value = undefined;
                    this._deferreds = [];
                    doResolve(fn, this);
                  }
                  function handle(self, deferred) {
                    while (self._state === 3) {
                      self = self._value;
                    }
                    if (self._state === 0) {
                      self._deferreds.push(deferred);
                      return;
                    }
                    self._handled = true;
                    Promise._immediateFn(function () {
                      var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;
                      if (cb === null) {
                        (self._state === 1 ? resolve : reject)(deferred.promise, self._value);
                        return;
                      }
                      var ret;
                      try {
                        ret = cb(self._value);
                      } catch (e) {
                        reject(deferred.promise, e);
                        return;
                      }
                      resolve(deferred.promise, ret);
                    });
                  }
                  function resolve(self, newValue) {
                    try {
                      if (newValue === self)
                        throw new TypeError('A promise cannot be resolved with itself.');
                      if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {
                        var then = newValue.then;
                        if (newValue instanceof Promise) {
                          self._state = 3;
                          self._value = newValue;
                          finale(self);
                          return;
                        } else if (typeof then === 'function') {
                          doResolve(bind(then, newValue), self);
                          return;
                        }
                      }
                      self._state = 1;
                      self._value = newValue;
                      finale(self);
                    } catch (e) {
                      reject(self, e);
                    }
                  }
                  function reject(self, newValue) {
                    self._state = 2;
                    self._value = newValue;
                    finale(self);
                  }
                  function finale(self) {
                    if (self._state === 2 && self._deferreds.length === 0) {
                      Promise._immediateFn(function () {
                        if (!self._handled) {
                          Promise._unhandledRejectionFn(self._value);
                        }
                      });
                    }
                    for (var i = 0, len = self._deferreds.length; i < len; i++) {
                      handle(self, self._deferreds[i]);
                    }
                    self._deferreds = null;
                  }
                  function Handler(onFulfilled, onRejected, promise) {
                    this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
                    this.onRejected = typeof onRejected === 'function' ? onRejected : null;
                    this.promise = promise;
                  }
                  function doResolve(fn, self) {
                    var done = false;
                    try {
                      fn(function (value) {
                        if (done)
                          return;
                        done = true;
                        resolve(self, value);
                      }, function (reason) {
                        if (done)
                          return;
                        done = true;
                        reject(self, reason);
                      });
                    } catch (ex) {
                      if (done)
                        return;
                      done = true;
                      reject(self, ex);
                    }
                  }
                  Promise.prototype['catch'] = function (onRejected) {
                    return this.then(null, onRejected);
                  };
                  Promise.prototype.then = function (onFulfilled, onRejected) {
                    var prom = new this.constructor(noop);
                    handle(this, new Handler(onFulfilled, onRejected, prom));
                    return prom;
                  };
                  Promise.all = function (arr) {
                    var args = Array.prototype.slice.call(arr);
                    return new Promise(function (resolve, reject) {
                      if (args.length === 0)
                        return resolve([]);
                      var remaining = args.length;
                      function res(i, val) {
                        try {
                          if (val && (typeof val === 'object' || typeof val === 'function')) {
                            var then = val.then;
                            if (typeof then === 'function') {
                              then.call(val, function (val) {
                                res(i, val);
                              }, reject);
                              return;
                            }
                          }
                          args[i] = val;
                          if (--remaining === 0) {
                            resolve(args);
                          }
                        } catch (ex) {
                          reject(ex);
                        }
                      }
                      for (var i = 0; i < args.length; i++) {
                        res(i, args[i]);
                      }
                    });
                  };
                  Promise.resolve = function (value) {
                    if (value && typeof value === 'object' && value.constructor === Promise) {
                      return value;
                    }
                    return new Promise(function (resolve) {
                      resolve(value);
                    });
                  };
                  Promise.reject = function (value) {
                    return new Promise(function (resolve, reject) {
                      reject(value);
                    });
                  };
                  Promise.race = function (values) {
                    return new Promise(function (resolve, reject) {
                      for (var i = 0, len = values.length; i < len; i++) {
                        values[i].then(resolve, reject);
                      }
                    });
                  };
                  Promise._immediateFn = typeof setImmediate === 'function' ? function (fn) {
                    setImmediate(fn);
                  } : function (fn) {
                    setTimeoutFunc(fn, 0);
                  };
                  Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {
                    if (typeof console !== 'undefined' && console) {
                      console.warn('Possible Unhandled Promise Rejection:', err);
                    }
                  };
                  Promise._setImmediateFn = function _setImmediateFn(fn) {
                    Promise._immediateFn = fn;
                  };
                  Promise._setUnhandledRejectionFn = function _setUnhandledRejectionFn(fn) {
                    Promise._unhandledRejectionFn = fn;
                  };
                  if (typeof module !== 'undefined' && module.exports) {
                    module.exports = Promise;
                  } else if (!root.Promise) {
                    root.Promise = Promise;
                  }
                }(this));
              }.call(this, require('timers').setImmediate));
            },
            { 'timers': 3 }
          ],
          3: [
            function (require, module, exports) {
              (function (setImmediate, clearImmediate) {
                var nextTick = require('process/browser.js').nextTick;
                var apply = Function.prototype.apply;
                var slice = Array.prototype.slice;
                var immediateIds = {};
                var nextImmediateId = 0;
                exports.setTimeout = function () {
                  return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);
                };
                exports.setInterval = function () {
                  return new Timeout(apply.call(setInterval, window, arguments), clearInterval);
                };
                exports.clearTimeout = exports.clearInterval = function (timeout) {
                  timeout.close();
                };
                function Timeout(id, clearFn) {
                  this._id = id;
                  this._clearFn = clearFn;
                }
                Timeout.prototype.unref = Timeout.prototype.ref = function () {
                };
                Timeout.prototype.close = function () {
                  this._clearFn.call(window, this._id);
                };
                exports.enroll = function (item, msecs) {
                  clearTimeout(item._idleTimeoutId);
                  item._idleTimeout = msecs;
                };
                exports.unenroll = function (item) {
                  clearTimeout(item._idleTimeoutId);
                  item._idleTimeout = -1;
                };
                exports._unrefActive = exports.active = function (item) {
                  clearTimeout(item._idleTimeoutId);
                  var msecs = item._idleTimeout;
                  if (msecs >= 0) {
                    item._idleTimeoutId = setTimeout(function onTimeout() {
                      if (item._onTimeout)
                        item._onTimeout();
                    }, msecs);
                  }
                };
                exports.setImmediate = typeof setImmediate === 'function' ? setImmediate : function (fn) {
                  var id = nextImmediateId++;
                  var args = arguments.length < 2 ? false : slice.call(arguments, 1);
                  immediateIds[id] = true;
                  nextTick(function onNextTick() {
                    if (immediateIds[id]) {
                      if (args) {
                        fn.apply(null, args);
                      } else {
                        fn.call(null);
                      }
                      exports.clearImmediate(id);
                    }
                  });
                  return id;
                };
                exports.clearImmediate = typeof clearImmediate === 'function' ? clearImmediate : function (id) {
                  delete immediateIds[id];
                };
              }.call(this, require('timers').setImmediate, require('timers').clearImmediate));
            },
            {
              'process/browser.js': 1,
              'timers': 3
            }
          ],
          4: [
            function (require, module, exports) {
              var promisePolyfill = require('promise-polyfill');
              var Global = function () {
                if (typeof window !== 'undefined') {
                  return window;
                } else {
                  return Function('return this;')();
                }
              }();
              module.exports = { boltExport: Global.Promise || promisePolyfill };
            },
            { 'promise-polyfill': 2 }
          ]
        }, {}, [4])(4);
      }));
    }(undefined, exports$1, module, undefined));
    var Promise = module.exports.boltExport;

    var nu = function (baseFn) {
      var data = Option.none();
      var callbacks = [];
      var map = function (f) {
        return nu(function (nCallback) {
          get(function (data) {
            nCallback(f(data));
          });
        });
      };
      var get = function (nCallback) {
        if (isReady()) {
          call(nCallback);
        } else {
          callbacks.push(nCallback);
        }
      };
      var set = function (x) {
        data = Option.some(x);
        run(callbacks);
        callbacks = [];
      };
      var isReady = function () {
        return data.isSome();
      };
      var run = function (cbs) {
        each(cbs, call);
      };
      var call = function (cb) {
        data.each(function (x) {
          domGlobals.setTimeout(function () {
            cb(x);
          }, 0);
        });
      };
      baseFn(set);
      return {
        get: get,
        map: map,
        isReady: isReady
      };
    };
    var pure = function (a) {
      return nu(function (callback) {
        callback(a);
      });
    };
    var LazyValue = {
      nu: nu,
      pure: pure
    };

    var errorReporter = function (err) {
      domGlobals.setTimeout(function () {
        throw err;
      }, 0);
    };
    var make = function (run) {
      var get = function (callback) {
        run().then(callback, errorReporter);
      };
      var map = function (fab) {
        return make(function () {
          return run().then(fab);
        });
      };
      var bind = function (aFutureB) {
        return make(function () {
          return run().then(function (v) {
            return aFutureB(v).toPromise();
          });
        });
      };
      var anonBind = function (futureB) {
        return make(function () {
          return run().then(function () {
            return futureB.toPromise();
          });
        });
      };
      var toLazy = function () {
        return LazyValue.nu(get);
      };
      var toCached = function () {
        var cache = null;
        return make(function () {
          if (cache === null) {
            cache = run();
          }
          return cache;
        });
      };
      var toPromise = run;
      return {
        map: map,
        bind: bind,
        anonBind: anonBind,
        toLazy: toLazy,
        toCached: toCached,
        toPromise: toPromise,
        get: get
      };
    };
    var nu$1 = function (baseFn) {
      return make(function () {
        return new Promise(baseFn);
      });
    };
    var pure$1 = function (a) {
      return make(function () {
        return Promise.resolve(a);
      });
    };
    var Future = {
      nu: nu$1,
      pure: pure$1
    };

    var par = function (asyncValues, nu) {
      return nu(function (callback) {
        var r = [];
        var count = 0;
        var cb = function (i) {
          return function (value) {
            r[i] = value;
            count++;
            if (count >= asyncValues.length) {
              callback(r);
            }
          };
        };
        if (asyncValues.length === 0) {
          callback([]);
        } else {
          each(asyncValues, function (asyncValue, i) {
            asyncValue.get(cb(i));
          });
        }
      });
    };

    var par$1 = function (futures) {
      return par(futures, Future.nu);
    };
    var traverse = function (array, fn) {
      return par$1(map(array, fn));
    };
    var mapM = traverse;

    var value = function () {
      var subject = Cell(Option.none());
      var clear = function () {
        subject.set(Option.none());
      };
      var set = function (s) {
        subject.set(Option.some(s));
      };
      var on = function (f) {
        subject.get().each(f);
      };
      var isSet = function () {
        return subject.get().isSome();
      };
      return {
        clear: clear,
        set: set,
        isSet: isSet,
        on: on
      };
    };

    var pasteHtml$1 = function (editor, html, internalFlag) {
      var internal = internalFlag ? internalFlag : InternalHtml.isMarked(html);
      var args = ProcessFilters.process(editor, InternalHtml.unmark(html), internal);
      if (args.cancelled === false) {
        SmartPaste.insertContent(editor, args.content);
      }
    };
    var pasteText = function (editor, text) {
      text = editor.dom.encode(text).replace(/\r\n/g, '\n');
      text = Newlines.convert(text, editor.settings.forced_root_block, editor.settings.forced_root_block_attrs);
      pasteHtml$1(editor, text, false);
    };
    var getDataTransferItems = function (dataTransfer) {
      var items = {};
      var mceInternalUrlPrefix = 'data:text/mce-internal,';
      if (dataTransfer) {
        if (dataTransfer.getData) {
          var legacyText = dataTransfer.getData('Text');
          if (legacyText && legacyText.length > 0) {
            if (legacyText.indexOf(mceInternalUrlPrefix) === -1) {
              items['text/plain'] = legacyText;
            }
          }
        }
        if (dataTransfer.types) {
          for (var i = 0; i < dataTransfer.types.length; i++) {
            var contentType = dataTransfer.types[i];
            try {
              items[contentType] = dataTransfer.getData(contentType);
            } catch (ex) {
              items[contentType] = '';
            }
          }
        }
      }
      return items;
    };
    var getClipboardContent = function (editor, clipboardEvent) {
      var content = getDataTransferItems(clipboardEvent.clipboardData || editor.getDoc().dataTransfer);
      return Utils.isMsEdge() ? global$4.extend(content, { 'text/html': '' }) : content;
    };
    var hasContentType = function (clipboardContent, mimeType) {
      return mimeType in clipboardContent && clipboardContent[mimeType].length > 0;
    };
    var hasHtmlOrText = function (content) {
      return hasContentType(content, 'text/html') || hasContentType(content, 'text/plain');
    };
    var getBase64FromUri = function (uri) {
      var idx;
      idx = uri.indexOf(',');
      if (idx !== -1) {
        return uri.substr(idx + 1);
      }
      return null;
    };
    var isValidDataUriImage = function (settings, imgElm) {
      return settings.images_dataimg_filter ? settings.images_dataimg_filter(imgElm) : true;
    };
    var extractFilename = function (editor, str) {
      var m = str.match(/([\s\S]+?)\.(?:jpeg|jpg|png|gif)$/i);
      return m ? editor.dom.encode(m[1]) : null;
    };
    var uniqueId = Utils.createIdGenerator('mceclip');
    var pasteImage = function (editor, imageItem) {
      var base64 = getBase64FromUri(imageItem.uri);
      var id = uniqueId();
      var name = editor.settings.images_reuse_filename && imageItem.blob.name ? extractFilename(editor, imageItem.blob.name) : id;
      var img = new domGlobals.Image();
      img.src = imageItem.uri;
      if (isValidDataUriImage(editor.settings, img)) {
        var blobCache = editor.editorUpload.blobCache;
        var blobInfo = void 0, existingBlobInfo = void 0;
        existingBlobInfo = blobCache.findFirst(function (cachedBlobInfo) {
          return cachedBlobInfo.base64() === base64;
        });
        if (!existingBlobInfo) {
          blobInfo = blobCache.create(id, imageItem.blob, base64, name);
          blobCache.add(blobInfo);
        } else {
          blobInfo = existingBlobInfo;
        }
        pasteHtml$1(editor, '<img src="' + blobInfo.blobUri() + '">', false);
      } else {
        pasteHtml$1(editor, '<img src="' + imageItem.uri + '">', false);
      }
    };
    var isClipboardEvent = function (event) {
      return event.type === 'paste';
    };
    var readBlobsAsDataUris = function (items) {
      return mapM(items, function (item) {
        return Future.nu(function (resolve) {
          var blob = item.getAsFile ? item.getAsFile() : item;
          var reader = new window.FileReader();
          reader.onload = function () {
            resolve({
              blob: blob,
              uri: reader.result
            });
          };
          reader.readAsDataURL(blob);
        });
      });
    };
    var getImagesFromDataTransfer = function (dataTransfer) {
      var items = dataTransfer.items ? map(from$1(dataTransfer.items), function (item) {
        return item.getAsFile();
      }) : [];
      var files = dataTransfer.files ? from$1(dataTransfer.files) : [];
      var images = filter$1(items.length > 0 ? items : files, function (file) {
        return /^image\/(jpeg|png|gif|bmp)$/.test(file.type);
      });
      return images;
    };
    var pasteImageData = function (editor, e, rng) {
      var dataTransfer = isClipboardEvent(e) ? e.clipboardData : e.dataTransfer;
      if (editor.settings.paste_data_images && dataTransfer) {
        var images = getImagesFromDataTransfer(dataTransfer);
        if (images.length > 0) {
          e.preventDefault();
          readBlobsAsDataUris(images).get(function (blobResults) {
            if (rng) {
              editor.selection.setRng(rng);
            }
            each(blobResults, function (result) {
              pasteImage(editor, result);
            });
          });
          return true;
        }
      }
      return false;
    };
    var isBrokenAndroidClipboardEvent = function (e) {
      var clipboardData = e.clipboardData;
      return domGlobals.navigator.userAgent.indexOf('Android') !== -1 && clipboardData && clipboardData.items && clipboardData.items.length === 0;
    };
    var isKeyboardPasteEvent = function (e) {
      return global$5.metaKeyPressed(e) && e.keyCode === 86 || e.shiftKey && e.keyCode === 45;
    };
    var registerEventHandlers = function (editor, pasteBin, pasteFormat) {
      var keyboardPasteEvent = value();
      var keyboardPastePlainTextState;
      editor.on('keydown', function (e) {
        function removePasteBinOnKeyUp(e) {
          if (isKeyboardPasteEvent(e) && !e.isDefaultPrevented()) {
            pasteBin.remove();
          }
        }
        if (isKeyboardPasteEvent(e) && !e.isDefaultPrevented()) {
          keyboardPastePlainTextState = e.shiftKey && e.keyCode === 86;
          if (keyboardPastePlainTextState && global$2.webkit && domGlobals.navigator.userAgent.indexOf('Version/') !== -1) {
            return;
          }
          e.stopImmediatePropagation();
          keyboardPasteEvent.set(e);
          window.setTimeout(function () {
            keyboardPasteEvent.clear();
          }, 100);
          if (global$2.ie && keyboardPastePlainTextState) {
            e.preventDefault();
            Events.firePaste(editor, true);
            return;
          }
          pasteBin.remove();
          pasteBin.create();
          editor.once('keyup', removePasteBinOnKeyUp);
          editor.once('paste', function () {
            editor.off('keyup', removePasteBinOnKeyUp);
          });
        }
      });
      function insertClipboardContent(clipboardContent, isKeyBoardPaste, plainTextMode, internal) {
        var content, isPlainTextHtml;
        if (hasContentType(clipboardContent, 'text/html')) {
          content = clipboardContent['text/html'];
        } else {
          content = pasteBin.getHtml();
          internal = internal ? internal : InternalHtml.isMarked(content);
          if (pasteBin.isDefaultContent(content)) {
            plainTextMode = true;
          }
        }
        content = Utils.trimHtml(content);
        pasteBin.remove();
        isPlainTextHtml = internal === false && Newlines.isPlainText(content);
        if (!content.length || isPlainTextHtml) {
          plainTextMode = true;
        }
        if (plainTextMode) {
          if (hasContentType(clipboardContent, 'text/plain') && isPlainTextHtml) {
            content = clipboardContent['text/plain'];
          } else {
            content = Utils.innerText(content);
          }
        }
        if (pasteBin.isDefaultContent(content)) {
          if (!isKeyBoardPaste) {
            editor.windowManager.alert('Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents.');
          }
          return;
        }
        if (plainTextMode) {
          pasteText(editor, content);
        } else {
          pasteHtml$1(editor, content, internal);
        }
      }
      var getLastRng = function () {
        return pasteBin.getLastRng() || editor.selection.getRng();
      };
      editor.on('paste', function (e) {
        var isKeyBoardPaste = keyboardPasteEvent.isSet();
        var clipboardContent = getClipboardContent(editor, e);
        var plainTextMode = pasteFormat.get() === 'text' || keyboardPastePlainTextState;
        var internal = hasContentType(clipboardContent, InternalHtml.internalHtmlMime());
        keyboardPastePlainTextState = false;
        if (e.isDefaultPrevented() || isBrokenAndroidClipboardEvent(e)) {
          pasteBin.remove();
          return;
        }
        if (!hasHtmlOrText(clipboardContent) && pasteImageData(editor, e, getLastRng())) {
          pasteBin.remove();
          return;
        }
        if (!isKeyBoardPaste) {
          e.preventDefault();
        }
        if (global$2.ie && (!isKeyBoardPaste || e.ieFake) && !hasContentType(clipboardContent, 'text/html')) {
          pasteBin.create();
          editor.dom.bind(pasteBin.getEl(), 'paste', function (e) {
            e.stopPropagation();
          });
          editor.getDoc().execCommand('Paste', false, null);
          clipboardContent['text/html'] = pasteBin.getHtml();
        }
        if (hasContentType(clipboardContent, 'text/html')) {
          e.preventDefault();
          if (!internal) {
            internal = InternalHtml.isMarked(clipboardContent['text/html']);
          }
          insertClipboardContent(clipboardContent, isKeyBoardPaste, plainTextMode, internal);
        } else {
          global$3.setEditorTimeout(editor, function () {
            insertClipboardContent(clipboardContent, isKeyBoardPaste, plainTextMode, internal);
          }, 0);
        }
      });
    };
    var registerEventsAndFilters = function (editor, pasteBin, pasteFormat) {
      registerEventHandlers(editor, pasteBin, pasteFormat);
      var src;
      editor.parser.addNodeFilter('img', function (nodes, name, args) {
        var isPasteInsert = function (args) {
          return args.data && args.data.paste === true;
        };
        var remove = function (node) {
          if (!node.attr('data-mce-object') && src !== global$2.transparentSrc) {
            node.remove();
          }
        };
        var isWebKitFakeUrl = function (src) {
          return src.indexOf('webkit-fake-url') === 0;
        };
        var isDataUri = function (src) {
          return src.indexOf('data:') === 0;
        };
        if (!editor.settings.paste_data_images && isPasteInsert(args)) {
          var i = nodes.length;
          while (i--) {
            src = nodes[i].attributes.map.src;
            if (!src) {
              continue;
            }
            if (isWebKitFakeUrl(src)) {
              remove(nodes[i]);
            } else if (!editor.settings.allow_html_data_urls && isDataUri(src)) {
              remove(nodes[i]);
            }
          }
        }
      });
    };

    var getPasteBinParent = function (editor) {
      return global$2.ie && editor.inline ? domGlobals.document.body : editor.getBody();
    };
    var isExternalPasteBin = function (editor) {
      return getPasteBinParent(editor) !== editor.getBody();
    };
    var delegatePasteEvents = function (editor, pasteBinElm, pasteBinDefaultContent) {
      if (isExternalPasteBin(editor)) {
        editor.dom.bind(pasteBinElm, 'paste keyup', function (e) {
          if (!isDefault(editor, pasteBinDefaultContent)) {
            editor.fire('paste');
          }
        });
      }
    };
    var create = function (editor, lastRngCell, pasteBinDefaultContent) {
      var dom = editor.dom, body = editor.getBody();
      var pasteBinElm;
      lastRngCell.set(editor.selection.getRng());
      pasteBinElm = editor.dom.add(getPasteBinParent(editor), 'div', {
        'id': 'mcepastebin',
        'class': 'mce-pastebin',
        'contentEditable': true,
        'data-mce-bogus': 'all',
        'style': 'position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0'
      }, pasteBinDefaultContent);
      if (global$2.ie || global$2.gecko) {
        dom.setStyle(pasteBinElm, 'left', dom.getStyle(body, 'direction', true) === 'rtl' ? 65535 : -65535);
      }
      dom.bind(pasteBinElm, 'beforedeactivate focusin focusout', function (e) {
        e.stopPropagation();
      });
      delegatePasteEvents(editor, pasteBinElm, pasteBinDefaultContent);
      pasteBinElm.focus();
      editor.selection.select(pasteBinElm, true);
    };
    var remove = function (editor, lastRngCell) {
      if (getEl(editor)) {
        var pasteBinClone = void 0;
        var lastRng = lastRngCell.get();
        while (pasteBinClone = editor.dom.get('mcepastebin')) {
          editor.dom.remove(pasteBinClone);
          editor.dom.unbind(pasteBinClone);
        }
        if (lastRng) {
          editor.selection.setRng(lastRng);
        }
      }
      lastRngCell.set(null);
    };
    var getEl = function (editor) {
      return editor.dom.get('mcepastebin');
    };
    var getHtml = function (editor) {
      var pasteBinElm, pasteBinClones, i, dirtyWrappers, cleanWrapper;
      var copyAndRemove = function (toElm, fromElm) {
        toElm.appendChild(fromElm);
        editor.dom.remove(fromElm, true);
      };
      pasteBinClones = global$4.grep(getPasteBinParent(editor).childNodes, function (elm) {
        return elm.id === 'mcepastebin';
      });
      pasteBinElm = pasteBinClones.shift();
      global$4.each(pasteBinClones, function (pasteBinClone) {
        copyAndRemove(pasteBinElm, pasteBinClone);
      });
      dirtyWrappers = editor.dom.select('div[id=mcepastebin]', pasteBinElm);
      for (i = dirtyWrappers.length - 1; i >= 0; i--) {
        cleanWrapper = editor.dom.create('div');
        pasteBinElm.insertBefore(cleanWrapper, dirtyWrappers[i]);
        copyAndRemove(cleanWrapper, dirtyWrappers[i]);
      }
      return pasteBinElm ? pasteBinElm.innerHTML : '';
    };
    var getLastRng = function (lastRng) {
      return lastRng.get();
    };
    var isDefaultContent = function (pasteBinDefaultContent, content) {
      return content === pasteBinDefaultContent;
    };
    var isPasteBin = function (elm) {
      return elm && elm.id === 'mcepastebin';
    };
    var isDefault = function (editor, pasteBinDefaultContent) {
      var pasteBinElm = getEl(editor);
      return isPasteBin(pasteBinElm) && isDefaultContent(pasteBinDefaultContent, pasteBinElm.innerHTML);
    };
    var PasteBin = function (editor) {
      var lastRng = Cell(null);
      var pasteBinDefaultContent = '%MCEPASTEBIN%';
      return {
        create: function () {
          return create(editor, lastRng, pasteBinDefaultContent);
        },
        remove: function () {
          return remove(editor, lastRng);
        },
        getEl: function () {
          return getEl(editor);
        },
        getHtml: function () {
          return getHtml(editor);
        },
        getLastRng: function () {
          return getLastRng(lastRng);
        },
        isDefault: function () {
          return isDefault(editor, pasteBinDefaultContent);
        },
        isDefaultContent: function (content) {
          return isDefaultContent(pasteBinDefaultContent, content);
        }
      };
    };

    var Clipboard = function (editor, pasteFormat) {
      var pasteBin = PasteBin(editor);
      editor.on('preInit', function () {
        return registerEventsAndFilters(editor, pasteBin, pasteFormat);
      });
      return {
        pasteFormat: pasteFormat,
        pasteHtml: function (html, internalFlag) {
          return pasteHtml$1(editor, html, internalFlag);
        },
        pasteText: function (text) {
          return pasteText(editor, text);
        },
        pasteImageData: function (e, rng) {
          return pasteImageData(editor, e, rng);
        },
        getDataTransferItems: getDataTransferItems,
        hasHtmlOrText: hasHtmlOrText,
        hasContentType: hasContentType
      };
    };

    var noop$1 = function () {
    };
    var hasWorkingClipboardApi = function (clipboardData) {
      return global$2.iOS === false && clipboardData !== undefined && typeof clipboardData.setData === 'function' && Utils.isMsEdge() !== true;
    };
    var setHtml5Clipboard = function (clipboardData, html, text) {
      if (hasWorkingClipboardApi(clipboardData)) {
        try {
          clipboardData.clearData();
          clipboardData.setData('text/html', html);
          clipboardData.setData('text/plain', text);
          clipboardData.setData(InternalHtml.internalHtmlMime(), html);
          return true;
        } catch (e) {
          return false;
        }
      } else {
        return false;
      }
    };
    var setClipboardData = function (evt, data, fallback, done) {
      if (setHtml5Clipboard(evt.clipboardData, data.html, data.text)) {
        evt.preventDefault();
        done();
      } else {
        fallback(data.html, done);
      }
    };
    var fallback = function (editor) {
      return function (html, done) {
        var markedHtml = InternalHtml.mark(html);
        var outer = editor.dom.create('div', {
          'contenteditable': 'false',
          'data-mce-bogus': 'all'
        });
        var inner = editor.dom.create('div', { contenteditable: 'true' }, markedHtml);
        editor.dom.setStyles(outer, {
          position: 'fixed',
          top: '0',
          left: '-3000px',
          width: '1000px',
          overflow: 'hidden'
        });
        outer.appendChild(inner);
        editor.dom.add(editor.getBody(), outer);
        var range = editor.selection.getRng();
        inner.focus();
        var offscreenRange = editor.dom.createRng();
        offscreenRange.selectNodeContents(inner);
        editor.selection.setRng(offscreenRange);
        setTimeout(function () {
          editor.selection.setRng(range);
          outer.parentNode.removeChild(outer);
          done();
        }, 0);
      };
    };
    var getData = function (editor) {
      return {
        html: editor.selection.getContent({ contextual: true }),
        text: editor.selection.getContent({ format: 'text' })
      };
    };
    var isTableSelection = function (editor) {
      return !!editor.dom.getParent(editor.selection.getStart(), 'td[data-mce-selected],th[data-mce-selected]', editor.getBody());
    };
    var hasSelectedContent = function (editor) {
      return !editor.selection.isCollapsed() || isTableSelection(editor);
    };
    var cut = function (editor) {
      return function (evt) {
        if (hasSelectedContent(editor)) {
          setClipboardData(evt, getData(editor), fallback(editor), function () {
            setTimeout(function () {
              editor.execCommand('Delete');
            }, 0);
          });
        }
      };
    };
    var copy = function (editor) {
      return function (evt) {
        if (hasSelectedContent(editor)) {
          setClipboardData(evt, getData(editor), fallback(editor), noop$1);
        }
      };
    };
    var register$1 = function (editor) {
      editor.on('cut', cut(editor));
      editor.on('copy', copy(editor));
    };
    var CutCopy = { register: register$1 };

    var global$b = tinymce.util.Tools.resolve('tinymce.dom.RangeUtils');

    var getCaretRangeFromEvent = function (editor, e) {
      return global$b.getCaretRangeFromPoint(e.clientX, e.clientY, editor.getDoc());
    };
    var isPlainTextFileUrl = function (content) {
      var plainTextContent = content['text/plain'];
      return plainTextContent ? plainTextContent.indexOf('file://') === 0 : false;
    };
    var setFocusedRange = function (editor, rng) {
      editor.focus();
      editor.selection.setRng(rng);
    };
    var setup = function (editor, clipboard, draggingInternallyState) {
      if (Settings.shouldBlockDrop(editor)) {
        editor.on('dragend dragover draggesture dragdrop drop drag', function (e) {
          e.preventDefault();
          e.stopPropagation();
        });
      }
      if (!Settings.shouldPasteDataImages(editor)) {
        editor.on('drop', function (e) {
          var dataTransfer = e.dataTransfer;
          if (dataTransfer && dataTransfer.files && dataTransfer.files.length > 0) {
            e.preventDefault();
          }
        });
      }
      editor.on('drop', function (e) {
        var dropContent, rng;
        rng = getCaretRangeFromEvent(editor, e);
        if (e.isDefaultPrevented() || draggingInternallyState.get()) {
          return;
        }
        dropContent = clipboard.getDataTransferItems(e.dataTransfer);
        var internal = clipboard.hasContentType(dropContent, InternalHtml.internalHtmlMime());
        if ((!clipboard.hasHtmlOrText(dropContent) || isPlainTextFileUrl(dropContent)) && clipboard.pasteImageData(e, rng)) {
          return;
        }
        if (rng && Settings.shouldFilterDrop(editor)) {
          var content_1 = dropContent['mce-internal'] || dropContent['text/html'] || dropContent['text/plain'];
          if (content_1) {
            e.preventDefault();
            global$3.setEditorTimeout(editor, function () {
              editor.undoManager.transact(function () {
                if (dropContent['mce-internal']) {
                  editor.execCommand('Delete');
                }
                setFocusedRange(editor, rng);
                content_1 = Utils.trimHtml(content_1);
                if (!dropContent['text/html']) {
                  clipboard.pasteText(content_1);
                } else {
                  clipboard.pasteHtml(content_1, internal);
                }
              });
            });
          }
        }
      });
      editor.on('dragstart', function (e) {
        draggingInternallyState.set(true);
      });
      editor.on('dragover dragend', function (e) {
        if (Settings.shouldPasteDataImages(editor) && draggingInternallyState.get() === false) {
          e.preventDefault();
          setFocusedRange(editor, getCaretRangeFromEvent(editor, e));
        }
        if (e.type === 'dragend') {
          draggingInternallyState.set(false);
        }
      });
    };
    var DragDrop = { setup: setup };

    var setup$1 = function (editor) {
      var plugin = editor.plugins.paste;
      var preProcess = Settings.getPreProcess(editor);
      if (preProcess) {
        editor.on('PastePreProcess', function (e) {
          preProcess.call(plugin, plugin, e);
        });
      }
      var postProcess = Settings.getPostProcess(editor);
      if (postProcess) {
        editor.on('PastePostProcess', function (e) {
          postProcess.call(plugin, plugin, e);
        });
      }
    };
    var PrePostProcess = { setup: setup$1 };

    function addPreProcessFilter(editor, filterFunc) {
      editor.on('PastePreProcess', function (e) {
        e.content = filterFunc(editor, e.content, e.internal, e.wordContent);
      });
    }
    function addPostProcessFilter(editor, filterFunc) {
      editor.on('PastePostProcess', function (e) {
        filterFunc(editor, e.node);
      });
    }
    function removeExplorerBrElementsAfterBlocks(editor, html) {
      if (!WordFilter.isWordContent(html)) {
        return html;
      }
      var blockElements = [];
      global$4.each(editor.schema.getBlockElements(), function (block, blockName) {
        blockElements.push(blockName);
      });
      var explorerBlocksRegExp = new RegExp('(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?(' + blockElements.join('|') + ')[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*', 'g');
      html = Utils.filter(html, [[
          explorerBlocksRegExp,
          '$1'
        ]]);
      html = Utils.filter(html, [
        [
          /<br><br>/g,
          '<BR><BR>'
        ],
        [
          /<br>/g,
          ' '
        ],
        [
          /<BR><BR>/g,
          '<br>'
        ]
      ]);
      return html;
    }
    function removeWebKitStyles(editor, content, internal, isWordHtml) {
      if (isWordHtml || internal) {
        return content;
      }
      var webKitStylesSetting = Settings.getWebkitStyles(editor);
      var webKitStyles;
      if (Settings.shouldRemoveWebKitStyles(editor) === false || webKitStylesSetting === 'all') {
        return content;
      }
      if (webKitStylesSetting) {
        webKitStyles = webKitStylesSetting.split(/[, ]/);
      }
      if (webKitStyles) {
        var dom_1 = editor.dom, node_1 = editor.selection.getNode();
        content = content.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi, function (all, before, value, after) {
          var inputStyles = dom_1.parseStyle(dom_1.decode(value));
          var outputStyles = {};
          if (webKitStyles === 'none') {
            return before + after;
          }
          for (var i = 0; i < webKitStyles.length; i++) {
            var inputValue = inputStyles[webKitStyles[i]], currentValue = dom_1.getStyle(node_1, webKitStyles[i], true);
            if (/color/.test(webKitStyles[i])) {
              inputValue = dom_1.toHex(inputValue);
              currentValue = dom_1.toHex(currentValue);
            }
            if (currentValue !== inputValue) {
              outputStyles[webKitStyles[i]] = inputValue;
            }
          }
          outputStyles = dom_1.serializeStyle(outputStyles, 'span');
          if (outputStyles) {
            return before + ' style="' + outputStyles + '"' + after;
          }
          return before + after;
        });
      } else {
        content = content.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi, '$1$3');
      }
      content = content.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi, function (all, before, value, after) {
        return before + ' style="' + value + '"' + after;
      });
      return content;
    }
    function removeUnderlineAndFontInAnchor(editor, root) {
      editor.$('a', root).find('font,u').each(function (i, node) {
        editor.dom.remove(node, true);
      });
    }
    var setup$2 = function (editor) {
      if (global$2.webkit) {
        addPreProcessFilter(editor, removeWebKitStyles);
      }
      if (global$2.ie) {
        addPreProcessFilter(editor, removeExplorerBrElementsAfterBlocks);
        addPostProcessFilter(editor, removeUnderlineAndFontInAnchor);
      }
    };
    var Quirks = { setup: setup$2 };

    var stateChange = function (editor, clipboard, e) {
      var ctrl = e.control;
      ctrl.active(clipboard.pasteFormat.get() === 'text');
      editor.on('PastePlainTextToggle', function (e) {
        ctrl.active(e.state);
      });
    };
    var register$2 = function (editor, clipboard) {
      var postRender = curry(stateChange, editor, clipboard);
      editor.addButton('pastetext', {
        active: false,
        icon: 'pastetext',
        tooltip: 'Paste as text',
        cmd: 'mceTogglePlainTextPaste',
        onPostRender: postRender
      });
      editor.addMenuItem('pastetext', {
        text: 'Paste as text',
        selectable: true,
        active: clipboard.pasteFormat,
        cmd: 'mceTogglePlainTextPaste',
        onPostRender: postRender
      });
    };
    var Buttons = { register: register$2 };

    global$1.add('paste', function (editor) {
      if (DetectProPlugin.hasProPlugin(editor) === false) {
        var userIsInformedState = Cell(false);
        var draggingInternallyState = Cell(false);
        var pasteFormat = Cell(Settings.isPasteAsTextEnabled(editor) ? 'text' : 'html');
        var clipboard = Clipboard(editor, pasteFormat);
        var quirks = Quirks.setup(editor);
        Buttons.register(editor, clipboard);
        Commands.register(editor, clipboard, userIsInformedState);
        PrePostProcess.setup(editor);
        CutCopy.register(editor);
        DragDrop.setup(editor, clipboard, draggingInternallyState);
        return Api.get(clipboard, quirks);
      }
    });
    function Plugin () {
    }

    return Plugin;

}(window));
})();
                                                                            tinymce/plugins/paste/plugin.min.js                                                                 0000644                 00000074165 15212564050 0013444 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(v){"use strict";var p=function(t){var e=t,n=function(){return e};return{get:n,set:function(t){e=t},clone:function(){return p(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(t){return!(!/(^|[ ,])powerpaste([, ]|$)/.test(t.settings.plugins)||!e.get("powerpaste")||("undefined"!=typeof v.window.console&&v.window.console.log&&v.window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),0))},u=function(t,e){return{clipboard:t,quirks:e}},d=function(t,e,n,r){return t.fire("PastePreProcess",{content:e,internal:n,wordContent:r})},m=function(t,e,n,r){return t.fire("PastePostProcess",{node:e,internal:n,wordContent:r})},s=function(t,e){return t.fire("PastePlainTextToggle",{state:e})},n=function(t,e){return t.fire("paste",{ieFake:e})},g={shouldPlainTextInform:function(t){return t.getParam("paste_plaintext_inform",!0)},shouldBlockDrop:function(t){return t.getParam("paste_block_drop",!1)},shouldPasteDataImages:function(t){return t.getParam("paste_data_images",!1)},shouldFilterDrop:function(t){return t.getParam("paste_filter_drop",!0)},getPreProcess:function(t){return t.getParam("paste_preprocess")},getPostProcess:function(t){return t.getParam("paste_postprocess")},getWebkitStyles:function(t){return t.getParam("paste_webkit_styles")},shouldRemoveWebKitStyles:function(t){return t.getParam("paste_remove_styles_if_webkit",!0)},shouldMergeFormats:function(t){return t.getParam("paste_merge_formats",!0)},isSmartPasteEnabled:function(t){return t.getParam("smart_paste",!0)},isPasteAsTextEnabled:function(t){return t.getParam("paste_as_text",!1)},getRetainStyleProps:function(t){return t.getParam("paste_retain_style_properties")},getWordValidElements:function(t){return t.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody")},shouldConvertWordFakeLists:function(t){return t.getParam("paste_convert_word_fake_lists",!0)},shouldUseDefaultFilters:function(t){return t.getParam("paste_enable_default_filters",!0)}},r=function(t,e,n){var r,o,i;"text"===e.pasteFormat.get()?(e.pasteFormat.set("html"),s(t,!1)):(e.pasteFormat.set("text"),s(t,!0),i=t,!1===n.get()&&g.shouldPlainTextInform(i)&&(o="Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.",(r=t).notificationManager.open({text:r.translate(o),type:"info"}),n.set(!0))),t.focus()},c=function(t,n,e){t.addCommand("mceTogglePlainTextPaste",function(){r(t,n,e)}),t.addCommand("mceInsertClipboardContent",function(t,e){e.content&&n.pasteHtml(e.content,e.internal),e.text&&n.pasteText(e.text)})},h=tinymce.util.Tools.resolve("tinymce.Env"),y=tinymce.util.Tools.resolve("tinymce.util.Delay"),b=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=tinymce.util.Tools.resolve("tinymce.util.VK"),t="x-tinymce/html",i="\x3c!-- "+t+" --\x3e",l=function(t){return i+t},f=function(t){return t.replace(i,"")},w=function(t){return-1!==t.indexOf(i)},x=function(){return t},_=tinymce.util.Tools.resolve("tinymce.html.Entities"),P=function(t){return t.replace(/\r?\n/g,"<br>")},T=function(t,e,n){var r=t.split(/\n\n/),o=function(t,e){var n,r=[],o="<"+t;if("object"==typeof e){for(n in e)e.hasOwnProperty(n)&&r.push(n+'="'+_.encodeAllRaw(e[n])+'"');r.length&&(o+=" "+r.join(" "))}return o+">"}(e,n),i="</"+e+">",a=b.map(r,function(t){return t.split(/\n/).join("<br />")});return 1===a.length?a[0]:b.map(a,function(t){return o+t+i}).join("")},D=function(t){return!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(t)},C=function(t,e,n){return e?T(t,e,n):P(t)},k=tinymce.util.Tools.resolve("tinymce.html.DomParser"),F=tinymce.util.Tools.resolve("tinymce.html.Serializer"),E=tinymce.util.Tools.resolve("tinymce.html.Node"),R=tinymce.util.Tools.resolve("tinymce.html.Schema");function I(e,t){return b.each(t,function(t){e=t.constructor===RegExp?e.replace(t,""):e.replace(t[0],t[1])}),e}var O={filter:I,innerText:function(e){var n=R(),r=k({},n),o="",i=n.getShortEndedElements(),a=b.makeMap("script noscript style textarea video audio iframe object"," "),u=n.getBlockElements();return e=I(e,[/<!\[[^\]]+\]>/g]),function t(e){var n=e.name,r=e;if("br"!==n){if("wbr"!==n)if(i[n]&&(o+=" "),a[n])o+=" ";else{if(3===e.type&&(o+=e.value),!e.shortEnded&&(e=e.firstChild))for(;t(e),e=e.next;);u[n]&&r.next&&(o+="\n","p"===n&&(o+="\n"))}}else o+="\n"}(r.parse(e)),o},trimHtml:function(t){return t=I(t,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function(t,e,n){return e||n?"\xa0":" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])},createIdGenerator:function(t){var e=0;return function(){return t+e++}},isMsEdge:function(){return-1!==v.navigator.userAgent.indexOf(" Edge/")}};function S(e){var n,t;return t=[/^[IVXLMCD]{1,2}\.[ \u00a0]/,/^[ivxlmcd]{1,2}\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],e=e.replace(/^[\u00a0 ]+/,""),b.each(t,function(t){if(t.test(e))return!(n=!0)}),n}function A(t){var i,a,u=1;function n(t){var e="";if(3===t.type)return t.value;if(t=t.firstChild)for(;e+=n(t),t=t.next;);return e}function s(t,e){if(3===t.type&&e.test(t.value))return t.value=t.value.replace(e,""),!1;if(t=t.firstChild)do{if(!s(t,e))return!1}while(t=t.next);return!0}function e(e,n,r){var o=e._listLevel||u;o!==u&&(o<u?i&&(i=i.parent.parent):(a=i,i=null)),i&&i.name===n?i.append(e):(a=a||i,i=new E(n,1),1<r&&i.attr("start",""+r),e.wrap(i)),e.name="li",u<o&&a&&a.lastChild.append(i),u=o,function t(e){if(e._listIgnore)e.remove();else if(e=e.firstChild)for(;t(e),e=e.next;);}(e),s(e,/^\u00a0+/),s(e,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),s(e,/^\u00a0+/)}for(var r=[],o=t.firstChild;null!=o;)if(r.push(o),null!==(o=o.walk()))for(;void 0!==o&&o.parent!==t;)o=o.walk();for(var c=0;c<r.length;c++)if("p"===(t=r[c]).name&&t.firstChild){var l=n(t);if(/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(l)){e(t,"ul");continue}if(S(l)){var f=/([0-9]+)\./.exec(l),d=1;f&&(d=parseInt(f[1],10)),e(t,"ol",d);continue}if(t._listLevel){e(t,"ul",1);continue}i=null}else a=i,i=null}function j(n,r,o,i){var a,u={},t=n.dom.parseStyle(i);return b.each(t,function(t,e){switch(e){case"mso-list":(a=/\w+ \w+([0-9]+)/i.exec(i))&&(o._listLevel=parseInt(a[1],10)),/Ignore/i.test(t)&&o.firstChild&&(o._listIgnore=!0,o.firstChild._listIgnore=!0);break;case"horiz-align":e="text-align";break;case"vert-align":e="vertical-align";break;case"font-color":case"mso-foreground":e="color";break;case"mso-background":case"mso-highlight":e="background";break;case"font-weight":case"font-style":return void("normal"!==t&&(u[e]=t));case"mso-element":if(/^(comment|comment-list)$/i.test(t))return void o.remove()}0!==e.indexOf("mso-comment")?0!==e.indexOf("mso-")&&("all"===g.getRetainStyleProps(n)||r&&r[e])&&(u[e]=t):o.remove()}),/(bold)/i.test(u["font-weight"])&&(delete u["font-weight"],o.wrap(new E("b",1))),/(italic)/i.test(u["font-style"])&&(delete u["font-style"],o.wrap(new E("i",1))),(u=n.dom.serializeStyle(u,o.name))||null}var M,L,N,B,H,$,W,U,z,V={preProcess:function(t,e){return g.shouldUseDefaultFilters(t)?function(r,t){var e,o;(e=g.getRetainStyleProps(r))&&(o=b.makeMap(e.split(/[, ]/))),t=O.filter(t,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi,"\xa0"],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(t,e){return 0<e.length?e.replace(/./," ").slice(Math.floor(e.length/2)).split("").join("\xa0"):""}]]);var n=g.getWordValidElements(r),i=R({valid_elements:n,valid_children:"-li[p]"});b.each(i.elements,function(t){t.attributes["class"]||(t.attributes["class"]={},t.attributesOrder.push("class")),t.attributes.style||(t.attributes.style={},t.attributesOrder.push("style"))});var a=k({},i);a.addAttributeFilter("style",function(t){for(var e,n=t.length;n--;)(e=t[n]).attr("style",j(r,o,e,e.attr("style"))),"span"===e.name&&e.parent&&!e.attributes.length&&e.unwrap()}),a.addAttributeFilter("class",function(t){for(var e,n,r=t.length;r--;)n=(e=t[r]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&e.remove(),e.attr("class",null)}),a.addNodeFilter("del",function(t){for(var e=t.length;e--;)t[e].remove()}),a.addNodeFilter("a",function(t){for(var e,n,r,o=t.length;o--;)if(n=(e=t[o]).attr("href"),r=e.attr("name"),n&&-1!==n.indexOf("#_msocom_"))e.remove();else if(n&&0===n.indexOf("file://")&&(n=n.split("#")[1])&&(n="#"+n),n||r){if(r&&!/^_?(?:toc|edn|ftn)/i.test(r)){e.unwrap();continue}e.attr({href:n,name:r})}else e.unwrap()});var u=a.parse(t);return g.shouldConvertWordFakeLists(r)&&A(u),t=F({validate:r.settings.validate},i).serialize(u)}(t,e):e},isWordContent:function(t){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(t)||/class="OutlineElement/.test(t)||/id="?docs\-internal\-guid\-/.test(t)}},K=function(t,e){return{content:t,cancelled:e}},q=function(t,e,n,r){var o,i,a,u,s,c,l=d(t,e,n,r),f=function(t,e){var n=k({},t.schema);n.addNodeFilter("meta",function(t){b.each(t,function(t){return t.remove()})});var r=n.parse(e,{forced_root_block:!1,isRootContent:!0});return F({validate:t.settings.validate},t.schema).serialize(r)}(t,l.content);return t.hasEventListeners("PastePostProcess")&&!l.isDefaultPrevented()?(i=f,a=n,u=r,s=(o=t).dom.create("div",{style:"display:none"},i),c=m(o,s,a,u),K(c.node.innerHTML,c.isDefaultPrevented())):K(f,l.isDefaultPrevented())},G=function(t,e,n){var r=V.isWordContent(e),o=r?V.preProcess(t,e):e;return q(t,o,n,r)},X=function(t,e){return t.insertContent(e,{merge:g.shouldMergeFormats(t),paste:!0}),!0},Y=function(t){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(t)},Z=function(t){return Y(t)&&/.(gif|jpe?g|png)$/.test(t)},J=function(t,e,n){return!(!1!==t.selection.isCollapsed()||!Y(e)||(o=e,i=n,(r=t).undoManager.extra(function(){i(r,o)},function(){r.execCommand("mceInsertLink",!1,o)}),0));var r,o,i},Q=function(t,e,n){return!!Z(e)&&(o=e,i=n,(r=t).undoManager.extra(function(){i(r,o)},function(){r.insertContent('<img src="'+o+'">')}),!0);var r,o,i},tt=function(t,e){var n,r;!1===g.isSmartPasteEnabled(t)?X(t,e):(n=t,r=e,b.each([J,Q,X],function(t){return!0!==t(n,r,X)}))},et=function(){},nt=function(t){return function(){return t}},rt=nt(!1),ot=nt(!0),it=function(){return at},at=(M=function(t){return t.isNone()},B={fold:function(t,e){return t()},is:rt,isSome:rt,isNone:ot,getOr:N=function(t){return t},getOrThunk:L=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:nt(null),getOrUndefined:nt(undefined),or:N,orThunk:L,map:it,each:et,bind:it,exists:rt,forall:ot,filter:it,equals:M,equals_:M,toArray:function(){return[]},toString:nt("none()")},Object.freeze&&Object.freeze(B),B),ut=function(n){var t=nt(n),e=function(){return o},r=function(t){return t(n)},o={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:ot,isNone:rt,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){return ut(t(n))},each:function(t){t(n)},bind:r,exists:r,forall:r,filter:function(t){return t(n)?o:at},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(rt,function(t){return e(n,t)})}};return o},st={some:ut,none:it,from:function(t){return null===t||t===undefined?at:ut(t)}},ct=(H="function",function(t){return function(t){if(null===t)return"null";var e=typeof t;return"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e}(t)===H}),lt=Array.prototype.slice,ft=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},dt=function(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n)},mt=ct(Array.from)?Array.from:function(t){return lt.call(t)},pt={},gt={exports:pt};$=undefined,W=pt,U=gt,z=undefined,function(t){"object"==typeof W&&void 0!==U?U.exports=t():"function"==typeof $&&$.amd?$([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=t()}(function(){return function i(a,u,s){function c(e,t){if(!u[e]){if(!a[e]){var n="function"==typeof z&&z;if(!t&&n)return n(e,!0);if(l)return l(e,!0);var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}var o=u[e]={exports:{}};a[e][0].call(o.exports,function(t){return c(a[e][1][t]||t)},o,o.exports,i,a,u,s)}return u[e].exports}for(var l="function"==typeof z&&z,t=0;t<s.length;t++)c(s[t]);return c}({1:[function(t,e,n){var r,o,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(t){r=a}try{o="function"==typeof clearTimeout?clearTimeout:u}catch(t){o=u}}();var c,l=[],f=!1,d=-1;function m(){f&&c&&(f=!1,c.length?l=c.concat(l):d=-1,l.length&&p())}function p(){if(!f){var t=s(m);f=!0;for(var e=l.length;e;){for(c=l,l=[];++d<e;)c&&c[d].run();d=-1,e=l.length}c=null,f=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===u||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(t)}}function g(t,e){this.fun=t,this.array=e}function v(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new g(t,e)),1!==l.length||f||s(p)},g.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(t,f,e){(function(n){!function(t){var e=setTimeout;function r(){}function a(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],l(t,this)}function o(r,o){for(;3===r._state;)r=r._value;0!==r._state?(r._handled=!0,a._immediateFn(function(){var t=1===r._state?o.onFulfilled:o.onRejected;if(null!==t){var e;try{e=t(r._value)}catch(n){return void u(o.promise,n)}i(o.promise,e)}else(1===r._state?i:u)(o.promise,r._value)})):r._deferreds.push(o)}function i(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof a)return t._state=3,t._value=e,void s(t);if("function"==typeof n)return void l((r=n,o=e,function(){r.apply(o,arguments)}),t)}t._state=1,t._value=e,s(t)}catch(i){u(t,i)}var r,o}function u(t,e){t._state=2,t._value=e,s(t)}function s(t){2===t._state&&0===t._deferreds.length&&a._immediateFn(function(){t._handled||a._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e<n;e++)o(t,t._deferreds[e]);t._deferreds=null}function c(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function l(t,e){var n=!1;try{t(function(t){n||(n=!0,i(e,t))},function(t){n||(n=!0,u(e,t))})}catch(r){if(n)return;n=!0,u(e,r)}}a.prototype["catch"]=function(t){return this.then(null,t)},a.prototype.then=function(t,e){var n=new this.constructor(r);return o(this,new c(t,e,n)),n},a.all=function(t){var s=Array.prototype.slice.call(t);return new a(function(o,i){if(0===s.length)return o([]);var a=s.length;function u(e,t){try{if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void n.call(t,function(t){u(e,t)},i)}s[e]=t,0==--a&&o(s)}catch(r){i(r)}}for(var t=0;t<s.length;t++)u(t,s[t])})},a.resolve=function(e){return e&&"object"==typeof e&&e.constructor===a?e:new a(function(t){t(e)})},a.reject=function(n){return new a(function(t,e){e(n)})},a.race=function(o){return new a(function(t,e){for(var n=0,r=o.length;n<r;n++)o[n].then(t,e)})},a._immediateFn="function"==typeof n?function(t){n(t)}:function(t){e(t,0)},a._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},a._setImmediateFn=function(t){a._immediateFn=t},a._setUnhandledRejectionFn=function(t){a._unhandledRejectionFn=t},void 0!==f&&f.exports?f.exports=a:t.Promise||(t.Promise=a)}(this)}).call(this,t("timers").setImmediate)},{timers:3}],3:[function(s,t,c){(function(t,e){var r=s("process/browser.js").nextTick,n=Function.prototype.apply,o=Array.prototype.slice,i={},a=0;function u(t,e){this._id=t,this._clearFn=e}c.setTimeout=function(){return new u(n.call(setTimeout,window,arguments),clearTimeout)},c.setInterval=function(){return new u(n.call(setInterval,window,arguments),clearInterval)},c.clearTimeout=c.clearInterval=function(t){t.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id)},c.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},c.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},c._unrefActive=c.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;0<=e&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},c.setImmediate="function"==typeof t?t:function(t){var e=a++,n=!(arguments.length<2)&&o.call(arguments,1);return i[e]=!0,r(function(){i[e]&&(n?t.apply(null,n):t.call(null),c.clearImmediate(e))}),e},c.clearImmediate="function"==typeof e?e:function(t){delete i[t]}}).call(this,s("timers").setImmediate,s("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(t,e,n){var r=t("promise-polyfill"),o="undefined"!=typeof window?window:Function("return this;")();e.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)});var vt=gt.exports.boltExport,ht=function(t){var n=st.none(),e=[],r=function(t){o()?a(t):e.push(t)},o=function(){return n.isSome()},i=function(t){dt(t,a)},a=function(e){n.each(function(t){v.setTimeout(function(){e(t)},0)})};return t(function(t){n=st.some(t),i(e),e=[]}),{get:r,map:function(n){return ht(function(e){r(function(t){e(n(t))})})},isReady:o}},yt={nu:ht,pure:function(e){return ht(function(t){t(e)})}},bt=function(t){v.setTimeout(function(){throw t},0)},wt=function(n){var t=function(t){n().then(t,bt)};return{map:function(t){return wt(function(){return n().then(t)})},bind:function(e){return wt(function(){return n().then(function(t){return e(t).toPromise()})})},anonBind:function(t){return wt(function(){return n().then(function(){return t.toPromise()})})},toLazy:function(){return yt.nu(t)},toCached:function(){var t=null;return wt(function(){return null===t&&(t=n()),t})},toPromise:n,get:t}},xt=function(t){return wt(function(){return new vt(t)})},_t=function(a,t){return t(function(r){var o=[],i=0;0===a.length?r([]):dt(a,function(t,e){var n;t.get((n=e,function(t){o[n]=t,++i>=a.length&&r(o)}))})})},Pt=function(t,e){return n=ft(t,e),_t(n,xt);var n},Tt=function(t,e,n){var r=n||w(e),o=G(t,f(e),r);!1===o.cancelled&&tt(t,o.content)},Dt=function(t,e){e=t.dom.encode(e).replace(/\r\n/g,"\n"),e=C(e,t.settings.forced_root_block,t.settings.forced_root_block_attrs),Tt(t,e,!1)},Ct=function(t){var e={};if(t){if(t.getData){var n=t.getData("Text");n&&0<n.length&&-1===n.indexOf("data:text/mce-internal,")&&(e["text/plain"]=n)}if(t.types)for(var r=0;r<t.types.length;r++){var o=t.types[r];try{e[o]=t.getData(o)}catch(i){e[o]=""}}}return e},kt=function(t,e){return e in t&&0<t[e].length},Ft=function(t){return kt(t,"text/html")||kt(t,"text/plain")},Et=O.createIdGenerator("mceclip"),Rt=function(e,t,n){var r,o,i,a,u="paste"===t.type?t.clipboardData:t.dataTransfer;if(e.settings.paste_data_images&&u){var s=(i=(o=u).items?ft(mt(o.items),function(t){return t.getAsFile()}):[],a=o.files?mt(o.files):[],function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n}(0<i.length?i:a,function(t){return/^image\/(jpeg|png|gif|bmp)$/.test(t.type)}));if(0<s.length)return t.preventDefault(),(r=s,Pt(r,function(r){return xt(function(t){var e=r.getAsFile?r.getAsFile():r,n=new window.FileReader;n.onload=function(){t({blob:e,uri:n.result})},n.readAsDataURL(e)})})).get(function(t){n&&e.selection.setRng(n),dt(t,function(t){!function(t,e){var n,r,o,i,a,u,s,c=(n=e.uri,-1!==(r=n.indexOf(","))?n.substr(r+1):null),l=Et(),f=t.settings.images_reuse_filename&&e.blob.name?(o=t,i=e.blob.name,(a=i.match(/([\s\S]+?)\.(?:jpeg|jpg|png|gif)$/i))?o.dom.encode(a[1]):null):l,d=new v.Image;if(d.src=e.uri,u=t.settings,s=d,!u.images_dataimg_filter||u.images_dataimg_filter(s)){var m,p=t.editorUpload.blobCache,g=void 0;(m=p.findFirst(function(t){return t.base64()===c}))?g=m:(g=p.create(l,e.blob,c,f),p.add(g)),Tt(t,'<img src="'+g.blobUri()+'">',!1)}else Tt(t,'<img src="'+e.uri+'">',!1)}(e,t)})}),!0}return!1},It=function(t){return o.metaKeyPressed(t)&&86===t.keyCode||t.shiftKey&&45===t.keyCode},Ot=function(s,c,l){var e,f,d=(e=p(st.none()),{clear:function(){e.set(st.none())},set:function(t){e.set(st.some(t))},isSet:function(){return e.get().isSome()},on:function(t){e.get().each(t)}});function m(t,e,n,r){var o,i;kt(t,"text/html")?o=t["text/html"]:(o=c.getHtml(),r=r||w(o),c.isDefaultContent(o)&&(n=!0)),o=O.trimHtml(o),c.remove(),i=!1===r&&D(o),o.length&&!i||(n=!0),n&&(o=kt(t,"text/plain")&&i?t["text/plain"]:O.innerText(o)),c.isDefaultContent(o)?e||s.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):n?Dt(s,o):Tt(s,o,r)}s.on("keydown",function(t){function e(t){It(t)&&!t.isDefaultPrevented()&&c.remove()}if(It(t)&&!t.isDefaultPrevented()){if((f=t.shiftKey&&86===t.keyCode)&&h.webkit&&-1!==v.navigator.userAgent.indexOf("Version/"))return;if(t.stopImmediatePropagation(),d.set(t),window.setTimeout(function(){d.clear()},100),h.ie&&f)return t.preventDefault(),void n(s,!0);c.remove(),c.create(),s.once("keyup",e),s.once("paste",function(){s.off("keyup",e)})}}),s.on("paste",function(t){var e,n,r,o=d.isSet(),i=(e=s,n=Ct(t.clipboardData||e.getDoc().dataTransfer),O.isMsEdge()?b.extend(n,{"text/html":""}):n),a="text"===l.get()||f,u=kt(i,x());f=!1,t.isDefaultPrevented()||(r=t.clipboardData,-1!==v.navigator.userAgent.indexOf("Android")&&r&&r.items&&0===r.items.length)?c.remove():Ft(i)||!Rt(s,t,c.getLastRng()||s.selection.getRng())?(o||t.preventDefault(),!h.ie||o&&!t.ieFake||kt(i,"text/html")||(c.create(),s.dom.bind(c.getEl(),"paste",function(t){t.stopPropagation()}),s.getDoc().execCommand("Paste",!1,null),i["text/html"]=c.getHtml()),kt(i,"text/html")?(t.preventDefault(),u||(u=w(i["text/html"])),m(i,o,a,u)):y.setEditorTimeout(s,function(){m(i,o,a,u)},0)):c.remove()})},St=function(t){return h.ie&&t.inline?v.document.body:t.getBody()},At=function(e,t,n){var r;St(r=e)!==r.getBody()&&e.dom.bind(t,"paste keyup",function(t){Lt(e,n)||e.fire("paste")})},jt=function(t){return t.dom.get("mcepastebin")},Mt=function(t,e){return e===t},Lt=function(t,e){var n,r=jt(t);return(n=r)&&"mcepastebin"===n.id&&Mt(e,r.innerHTML)},Nt=function(a){var u=p(null),s="%MCEPASTEBIN%";return{create:function(){return e=u,n=s,o=(t=a).dom,i=t.getBody(),e.set(t.selection.getRng()),r=t.dom.add(St(t),"div",{id:"mcepastebin","class":"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},n),(h.ie||h.gecko)&&o.setStyle(r,"left","rtl"===o.getStyle(i,"direction",!0)?65535:-65535),o.bind(r,"beforedeactivate focusin focusout",function(t){t.stopPropagation()}),At(t,r,n),r.focus(),void t.selection.select(r,!0);var t,e,n,r,o,i},remove:function(){return function(t,e){if(jt(t)){for(var n=void 0,r=e.get();n=t.dom.get("mcepastebin");)t.dom.remove(n),t.dom.unbind(n);r&&t.selection.setRng(r)}e.set(null)}(a,u)},getEl:function(){return jt(a)},getHtml:function(){return function(n){var e,t,r,o,i,a=function(t,e){t.appendChild(e),n.dom.remove(e,!0)};for(t=b.grep(St(n).childNodes,function(t){return"mcepastebin"===t.id}),e=t.shift(),b.each(t,function(t){a(e,t)}),r=(o=n.dom.select("div[id=mcepastebin]",e)).length-1;0<=r;r--)i=n.dom.create("div"),e.insertBefore(i,o[r]),a(i,o[r]);return e?e.innerHTML:""}(a)},getLastRng:function(){return u.get()},isDefault:function(){return Lt(a,s)},isDefaultContent:function(t){return Mt(s,t)}}},Bt=function(n,t){var e=Nt(n);return n.on("preInit",function(){return Ot(a=n,e,t),void a.parser.addNodeFilter("img",function(t,e,n){var r,o=function(t){t.attr("data-mce-object")||u===h.transparentSrc||t.remove()};if(!a.settings.paste_data_images&&(r=n).data&&!0===r.data.paste)for(var i=t.length;i--;)(u=t[i].attributes.map.src)&&(0===u.indexOf("webkit-fake-url")?o(t[i]):a.settings.allow_html_data_urls||0!==u.indexOf("data:")||o(t[i]))});var a,u}),{pasteFormat:t,pasteHtml:function(t,e){return Tt(n,t,e)},pasteText:function(t){return Dt(n,t)},pasteImageData:function(t,e){return Rt(n,t,e)},getDataTransferItems:Ct,hasHtmlOrText:Ft,hasContentType:kt}},Ht=function(){},$t=function(t,e,n){if(r=t,!1!==h.iOS||r===undefined||"function"!=typeof r.setData||!0===O.isMsEdge())return!1;try{return t.clearData(),t.setData("text/html",e),t.setData("text/plain",n),t.setData(x(),e),!0}catch(o){return!1}var r},Wt=function(t,e,n,r){$t(t.clipboardData,e.html,e.text)?(t.preventDefault(),r()):n(e.html,r)},Ut=function(u){return function(t,e){var n=l(t),r=u.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),o=u.dom.create("div",{contenteditable:"true"},n);u.dom.setStyles(r,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),r.appendChild(o),u.dom.add(u.getBody(),r);var i=u.selection.getRng();o.focus();var a=u.dom.createRng();a.selectNodeContents(o),u.selection.setRng(a),setTimeout(function(){u.selection.setRng(i),r.parentNode.removeChild(r),e()},0)}},zt=function(t){return{html:t.selection.getContent({contextual:!0}),text:t.selection.getContent({format:"text"})}},Vt=function(t){return!t.selection.isCollapsed()||!!(e=t).dom.getParent(e.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",e.getBody());var e},Kt=function(t){var e,n;t.on("cut",(e=t,function(t){Vt(e)&&Wt(t,zt(e),Ut(e),function(){setTimeout(function(){e.execCommand("Delete")},0)})})),t.on("copy",(n=t,function(t){Vt(n)&&Wt(t,zt(n),Ut(n),Ht)}))},qt=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),Gt=function(t,e){return qt.getCaretRangeFromPoint(e.clientX,e.clientY,t.getDoc())},Xt=function(t,e){t.focus(),t.selection.setRng(e)},Yt=function(a,u,s){g.shouldBlockDrop(a)&&a.on("dragend dragover draggesture dragdrop drop drag",function(t){t.preventDefault(),t.stopPropagation()}),g.shouldPasteDataImages(a)||a.on("drop",function(t){var e=t.dataTransfer;e&&e.files&&0<e.files.length&&t.preventDefault()}),a.on("drop",function(t){var e,n;if(n=Gt(a,t),!t.isDefaultPrevented()&&!s.get()){e=u.getDataTransferItems(t.dataTransfer);var r,o=u.hasContentType(e,x());if((u.hasHtmlOrText(e)&&(!(r=e["text/plain"])||0!==r.indexOf("file://"))||!u.pasteImageData(t,n))&&n&&g.shouldFilterDrop(a)){var i=e["mce-internal"]||e["text/html"]||e["text/plain"];i&&(t.preventDefault(),y.setEditorTimeout(a,function(){a.undoManager.transact(function(){e["mce-internal"]&&a.execCommand("Delete"),Xt(a,n),i=O.trimHtml(i),e["text/html"]?u.pasteHtml(i,o):u.pasteText(i)})}))}}}),a.on("dragstart",function(t){s.set(!0)}),a.on("dragover dragend",function(t){g.shouldPasteDataImages(a)&&!1===s.get()&&(t.preventDefault(),Xt(a,Gt(a,t))),"dragend"===t.type&&s.set(!1)})},Zt=function(t){var e=t.plugins.paste,n=g.getPreProcess(t);n&&t.on("PastePreProcess",function(t){n.call(e,e,t)});var r=g.getPostProcess(t);r&&t.on("PastePostProcess",function(t){r.call(e,e,t)})};function Jt(e,n){e.on("PastePreProcess",function(t){t.content=n(e,t.content,t.internal,t.wordContent)})}function Qt(t,e){if(!V.isWordContent(e))return e;var n=[];b.each(t.schema.getBlockElements(),function(t,e){n.push(e)});var r=new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+n.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g");return e=O.filter(e,[[r,"$1"]]),e=O.filter(e,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function te(t,e,n,r){if(r||n)return e;var c,o=g.getWebkitStyles(t);if(!1===g.shouldRemoveWebKitStyles(t)||"all"===o)return e;if(o&&(c=o.split(/[, ]/)),c){var l=t.dom,f=t.selection.getNode();e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(t,e,n,r){var o=l.parseStyle(l.decode(n)),i={};if("none"===c)return e+r;for(var a=0;a<c.length;a++){var u=o[c[a]],s=l.getStyle(f,c[a],!0);/color/.test(c[a])&&(u=l.toHex(u),s=l.toHex(s)),s!==u&&(i[c[a]]=u)}return(i=l.serializeStyle(i,"span"))?e+' style="'+i+'"'+r:e+r})}else e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return e=e.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(t,e,n,r){return e+' style="'+n+'"'+r})}function ee(n,t){n.$("a",t).find("font,u").each(function(t,e){n.dom.remove(e,!0)})}var ne=function(t){var e,n;h.webkit&&Jt(t,te),h.ie&&(Jt(t,Qt),n=ee,(e=t).on("PastePostProcess",function(t){n(e,t.node)}))},re=function(t,e,n){var r=n.control;r.active("text"===e.pasteFormat.get()),t.on("PastePlainTextToggle",function(t){r.active(t.state)})},oe=function(t,e){var n=function(r){for(var o=[],t=1;t<arguments.length;t++)o[t-1]=arguments[t];return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=o.concat(t);return r.apply(null,n)}}(re,t,e);t.addButton("pastetext",{active:!1,icon:"pastetext",tooltip:"Paste as text",cmd:"mceTogglePlainTextPaste",onPostRender:n}),t.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:e.pasteFormat,cmd:"mceTogglePlainTextPaste",onPostRender:n})};e.add("paste",function(t){if(!1===a(t)){var e=p(!1),n=p(!1),r=p(g.isPasteAsTextEnabled(t)?"text":"html"),o=Bt(t,r),i=ne(t);return oe(t,o),c(t,o,e),Zt(t),Kt(t),Yt(t,o,n),u(o,i)}})}(window);                                                                                                                                                                                                                                                                                                                                                                                                           tinymce/plugins/tabfocus/plugin.js                                                                  0000644                 00000007212 15212564050 0013341 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       (function () {
var tabfocus = (function (domGlobals) {
    'use strict';

    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');

    var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');

    var global$2 = tinymce.util.Tools.resolve('tinymce.EditorManager');

    var global$3 = tinymce.util.Tools.resolve('tinymce.Env');

    var global$4 = tinymce.util.Tools.resolve('tinymce.util.Delay');

    var global$5 = tinymce.util.Tools.resolve('tinymce.util.Tools');

    var global$6 = tinymce.util.Tools.resolve('tinymce.util.VK');

    var getTabFocusElements = function (editor) {
      return editor.getParam('tabfocus_elements', ':prev,:next');
    };
    var getTabFocus = function (editor) {
      return editor.getParam('tab_focus', getTabFocusElements(editor));
    };
    var Settings = { getTabFocus: getTabFocus };

    var DOM = global$1.DOM;
    var tabCancel = function (e) {
      if (e.keyCode === global$6.TAB && !e.ctrlKey && !e.altKey && !e.metaKey) {
        e.preventDefault();
      }
    };
    var setup = function (editor) {
      function tabHandler(e) {
        var x, el, v, i;
        if (e.keyCode !== global$6.TAB || e.ctrlKey || e.altKey || e.metaKey || e.isDefaultPrevented()) {
          return;
        }
        function find(direction) {
          el = DOM.select(':input:enabled,*[tabindex]:not(iframe)');
          function canSelectRecursive(e) {
            return e.nodeName === 'BODY' || e.type !== 'hidden' && e.style.display !== 'none' && e.style.visibility !== 'hidden' && canSelectRecursive(e.parentNode);
          }
          function canSelect(el) {
            return /INPUT|TEXTAREA|BUTTON/.test(el.tagName) && global$2.get(e.id) && el.tabIndex !== -1 && canSelectRecursive(el);
          }
          global$5.each(el, function (e, i) {
            if (e.id === editor.id) {
              x = i;
              return false;
            }
          });
          if (direction > 0) {
            for (i = x + 1; i < el.length; i++) {
              if (canSelect(el[i])) {
                return el[i];
              }
            }
          } else {
            for (i = x - 1; i >= 0; i--) {
              if (canSelect(el[i])) {
                return el[i];
              }
            }
          }
          return null;
        }
        v = global$5.explode(Settings.getTabFocus(editor));
        if (v.length === 1) {
          v[1] = v[0];
          v[0] = ':prev';
        }
        if (e.shiftKey) {
          if (v[0] === ':prev') {
            el = find(-1);
          } else {
            el = DOM.get(v[0]);
          }
        } else {
          if (v[1] === ':next') {
            el = find(1);
          } else {
            el = DOM.get(v[1]);
          }
        }
        if (el) {
          var focusEditor = global$2.get(el.id || el.name);
          if (el.id && focusEditor) {
            focusEditor.focus();
          } else {
            global$4.setTimeout(function () {
              if (!global$3.webkit) {
                domGlobals.window.focus();
              }
              el.focus();
            }, 10);
          }
          e.preventDefault();
        }
      }
      editor.on('init', function () {
        if (editor.inline) {
          DOM.setAttrib(editor.getBody(), 'tabIndex', null);
        }
        editor.on('keyup', tabCancel);
        if (global$3.gecko) {
          editor.on('keypress keydown', tabHandler);
        } else {
          editor.on('keydown', tabHandler);
        }
      });
    };
    var Keyboard = { setup: setup };

    global.add('tabfocus', function (editor) {
      Keyboard.setup(editor);
    });
    function Plugin () {
    }

    return Plugin;

}(window));
})();
                                                                                                                                                                                                                                                                                                                                                                                      tinymce/plugins/tabfocus/plugin.min.js                                                              0000644                 00000003116 15212564050 0014122 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(c){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),s=tinymce.util.Tools.resolve("tinymce.EditorManager"),a=tinymce.util.Tools.resolve("tinymce.Env"),y=tinymce.util.Tools.resolve("tinymce.util.Delay"),f=tinymce.util.Tools.resolve("tinymce.util.Tools"),d=tinymce.util.Tools.resolve("tinymce.util.VK"),m=function(e){return e.getParam("tab_focus",e.getParam("tabfocus_elements",":prev,:next"))},v=t.DOM,n=function(e){e.keyCode!==d.TAB||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()},i=function(r){function e(n){var i,o,e,l;if(!(n.keyCode!==d.TAB||n.ctrlKey||n.altKey||n.metaKey||n.isDefaultPrevented())&&(1===(e=f.explode(m(r))).length&&(e[1]=e[0],e[0]=":prev"),o=n.shiftKey?":prev"===e[0]?u(-1):v.get(e[0]):":next"===e[1]?u(1):v.get(e[1]))){var t=s.get(o.id||o.name);o.id&&t?t.focus():y.setTimeout(function(){a.webkit||c.window.focus(),o.focus()},10),n.preventDefault()}function u(e){function t(t){return/INPUT|TEXTAREA|BUTTON/.test(t.tagName)&&s.get(n.id)&&-1!==t.tabIndex&&function e(t){return"BODY"===t.nodeName||"hidden"!==t.type&&"none"!==t.style.display&&"hidden"!==t.style.visibility&&e(t.parentNode)}(t)}if(o=v.select(":input:enabled,*[tabindex]:not(iframe)"),f.each(o,function(e,t){if(e.id===r.id)return i=t,!1}),0<e){for(l=i+1;l<o.length;l++)if(t(o[l]))return o[l]}else for(l=i-1;0<=l;l--)if(t(o[l]))return o[l];return null}}r.on("init",function(){r.inline&&v.setAttrib(r.getBody(),"tabIndex",null),r.on("keyup",n),a.gecko?r.on("keypress keydown",e):r.on("keydown",e)})};e.add("tabfocus",function(e){i(e)})}(window);                                                                                                                                                                                                                                                                                                                                                                                                                                                  tinymce/plugins/textcolor/plugin.js                                                                 0000644                 00000026056 15212564050 0013565 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       (function () {
var textcolor = (function () {
    'use strict';

    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');

    var getCurrentColor = function (editor, format) {
      var color;
      editor.dom.getParents(editor.selection.getStart(), function (elm) {
        var value;
        if (value = elm.style[format === 'forecolor' ? 'color' : 'background-color']) {
          color = color ? color : value;
        }
      });
      return color;
    };
    var mapColors = function (colorMap) {
      var i;
      var colors = [];
      for (i = 0; i < colorMap.length; i += 2) {
        colors.push({
          text: colorMap[i + 1],
          color: '#' + colorMap[i]
        });
      }
      return colors;
    };
    var applyFormat = function (editor, format, value) {
      editor.undoManager.transact(function () {
        editor.focus();
        editor.formatter.apply(format, { value: value });
        editor.nodeChanged();
      });
    };
    var removeFormat = function (editor, format) {
      editor.undoManager.transact(function () {
        editor.focus();
        editor.formatter.remove(format, { value: null }, null, true);
        editor.nodeChanged();
      });
    };
    var TextColor = {
      getCurrentColor: getCurrentColor,
      mapColors: mapColors,
      applyFormat: applyFormat,
      removeFormat: removeFormat
    };

    var register = function (editor) {
      editor.addCommand('mceApplyTextcolor', function (format, value) {
        TextColor.applyFormat(editor, format, value);
      });
      editor.addCommand('mceRemoveTextcolor', function (format) {
        TextColor.removeFormat(editor, format);
      });
    };
    var Commands = { register: register };

    var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');

    var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');

    var defaultColorMap = [
      '000000',
      'Black',
      '993300',
      'Burnt orange',
      '333300',
      'Dark olive',
      '003300',
      'Dark green',
      '003366',
      'Dark azure',
      '000080',
      'Navy Blue',
      '333399',
      'Indigo',
      '333333',
      'Very dark gray',
      '800000',
      'Maroon',
      'FF6600',
      'Orange',
      '808000',
      'Olive',
      '008000',
      'Green',
      '008080',
      'Teal',
      '0000FF',
      'Blue',
      '666699',
      'Grayish blue',
      '808080',
      'Gray',
      'FF0000',
      'Red',
      'FF9900',
      'Amber',
      '99CC00',
      'Yellow green',
      '339966',
      'Sea green',
      '33CCCC',
      'Turquoise',
      '3366FF',
      'Royal blue',
      '800080',
      'Purple',
      '999999',
      'Medium gray',
      'FF00FF',
      'Magenta',
      'FFCC00',
      'Gold',
      'FFFF00',
      'Yellow',
      '00FF00',
      'Lime',
      '00FFFF',
      'Aqua',
      '00CCFF',
      'Sky blue',
      '993366',
      'Red violet',
      'FFFFFF',
      'White',
      'FF99CC',
      'Pink',
      'FFCC99',
      'Peach',
      'FFFF99',
      'Light yellow',
      'CCFFCC',
      'Pale green',
      'CCFFFF',
      'Pale cyan',
      '99CCFF',
      'Light sky blue',
      'CC99FF',
      'Plum'
    ];
    var getTextColorMap = function (editor) {
      return editor.getParam('textcolor_map', defaultColorMap);
    };
    var getForeColorMap = function (editor) {
      return editor.getParam('forecolor_map', getTextColorMap(editor));
    };
    var getBackColorMap = function (editor) {
      return editor.getParam('backcolor_map', getTextColorMap(editor));
    };
    var getTextColorRows = function (editor) {
      return editor.getParam('textcolor_rows', 5);
    };
    var getTextColorCols = function (editor) {
      return editor.getParam('textcolor_cols', 8);
    };
    var getForeColorRows = function (editor) {
      return editor.getParam('forecolor_rows', getTextColorRows(editor));
    };
    var getBackColorRows = function (editor) {
      return editor.getParam('backcolor_rows', getTextColorRows(editor));
    };
    var getForeColorCols = function (editor) {
      return editor.getParam('forecolor_cols', getTextColorCols(editor));
    };
    var getBackColorCols = function (editor) {
      return editor.getParam('backcolor_cols', getTextColorCols(editor));
    };
    var getColorPickerCallback = function (editor) {
      return editor.getParam('color_picker_callback', null);
    };
    var hasColorPicker = function (editor) {
      return typeof getColorPickerCallback(editor) === 'function';
    };
    var Settings = {
      getForeColorMap: getForeColorMap,
      getBackColorMap: getBackColorMap,
      getForeColorRows: getForeColorRows,
      getBackColorRows: getBackColorRows,
      getForeColorCols: getForeColorCols,
      getBackColorCols: getBackColorCols,
      getColorPickerCallback: getColorPickerCallback,
      hasColorPicker: hasColorPicker
    };

    var global$3 = tinymce.util.Tools.resolve('tinymce.util.I18n');

    var getHtml = function (cols, rows, colorMap, hasColorPicker) {
      var colors, color, html, last, x, y, i, count = 0;
      var id = global$1.DOM.uniqueId('mcearia');
      var getColorCellHtml = function (color, title) {
        var isNoColor = color === 'transparent';
        return '<td class="mce-grid-cell' + (isNoColor ? ' mce-colorbtn-trans' : '') + '">' + '<div id="' + id + '-' + count++ + '"' + ' data-mce-color="' + (color ? color : '') + '"' + ' role="option"' + ' tabIndex="-1"' + ' style="' + (color ? 'background-color: ' + color : '') + '"' + ' title="' + global$3.translate(title) + '">' + (isNoColor ? '&#215;' : '') + '</div>' + '</td>';
      };
      colors = TextColor.mapColors(colorMap);
      colors.push({
        text: global$3.translate('No color'),
        color: 'transparent'
      });
      html = '<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="list" cellspacing="0"><tbody>';
      last = colors.length - 1;
      for (y = 0; y < rows; y++) {
        html += '<tr>';
        for (x = 0; x < cols; x++) {
          i = y * cols + x;
          if (i > last) {
            html += '<td></td>';
          } else {
            color = colors[i];
            html += getColorCellHtml(color.color, color.text);
          }
        }
        html += '</tr>';
      }
      if (hasColorPicker) {
        html += '<tr>' + '<td colspan="' + cols + '" class="mce-custom-color-btn">' + '<div id="' + id + '-c" class="mce-widget mce-btn mce-btn-small mce-btn-flat" ' + 'role="button" tabindex="-1" aria-labelledby="' + id + '-c" style="width: 100%">' + '<button type="button" role="presentation" tabindex="-1">' + global$3.translate('Custom...') + '</button>' + '</div>' + '</td>' + '</tr>';
        html += '<tr>';
        for (x = 0; x < cols; x++) {
          html += getColorCellHtml('', 'Custom color');
        }
        html += '</tr>';
      }
      html += '</tbody></table>';
      return html;
    };
    var ColorPickerHtml = { getHtml: getHtml };

    var setDivColor = function setDivColor(div, value) {
      div.style.background = value;
      div.setAttribute('data-mce-color', value);
    };
    var onButtonClick = function (editor) {
      return function (e) {
        var ctrl = e.control;
        if (ctrl._color) {
          editor.execCommand('mceApplyTextcolor', ctrl.settings.format, ctrl._color);
        } else {
          editor.execCommand('mceRemoveTextcolor', ctrl.settings.format);
        }
      };
    };
    var onPanelClick = function (editor, cols) {
      return function (e) {
        var buttonCtrl = this.parent();
        var value;
        var currentColor = TextColor.getCurrentColor(editor, buttonCtrl.settings.format);
        var selectColor = function (value) {
          editor.execCommand('mceApplyTextcolor', buttonCtrl.settings.format, value);
          buttonCtrl.hidePanel();
          buttonCtrl.color(value);
        };
        var resetColor = function () {
          editor.execCommand('mceRemoveTextcolor', buttonCtrl.settings.format);
          buttonCtrl.hidePanel();
          buttonCtrl.resetColor();
        };
        if (global$1.DOM.getParent(e.target, '.mce-custom-color-btn')) {
          buttonCtrl.hidePanel();
          var colorPickerCallback = Settings.getColorPickerCallback(editor);
          colorPickerCallback.call(editor, function (value) {
            var tableElm = buttonCtrl.panel.getEl().getElementsByTagName('table')[0];
            var customColorCells, div, i;
            customColorCells = global$2.map(tableElm.rows[tableElm.rows.length - 1].childNodes, function (elm) {
              return elm.firstChild;
            });
            for (i = 0; i < customColorCells.length; i++) {
              div = customColorCells[i];
              if (!div.getAttribute('data-mce-color')) {
                break;
              }
            }
            if (i === cols) {
              for (i = 0; i < cols - 1; i++) {
                setDivColor(customColorCells[i], customColorCells[i + 1].getAttribute('data-mce-color'));
              }
            }
            setDivColor(div, value);
            selectColor(value);
          }, currentColor);
        }
        value = e.target.getAttribute('data-mce-color');
        if (value) {
          if (this.lastId) {
            global$1.DOM.get(this.lastId).setAttribute('aria-selected', 'false');
          }
          e.target.setAttribute('aria-selected', true);
          this.lastId = e.target.id;
          if (value === 'transparent') {
            resetColor();
          } else {
            selectColor(value);
          }
        } else if (value !== null) {
          buttonCtrl.hidePanel();
        }
      };
    };
    var renderColorPicker = function (editor, foreColor) {
      return function () {
        var cols = foreColor ? Settings.getForeColorCols(editor) : Settings.getBackColorCols(editor);
        var rows = foreColor ? Settings.getForeColorRows(editor) : Settings.getBackColorRows(editor);
        var colorMap = foreColor ? Settings.getForeColorMap(editor) : Settings.getBackColorMap(editor);
        var hasColorPicker = Settings.hasColorPicker(editor);
        return ColorPickerHtml.getHtml(cols, rows, colorMap, hasColorPicker);
      };
    };
    var register$1 = function (editor) {
      editor.addButton('forecolor', {
        type: 'colorbutton',
        tooltip: 'Text color',
        format: 'forecolor',
        panel: {
          role: 'application',
          ariaRemember: true,
          html: renderColorPicker(editor, true),
          onclick: onPanelClick(editor, Settings.getForeColorCols(editor))
        },
        onclick: onButtonClick(editor)
      });
      editor.addButton('backcolor', {
        type: 'colorbutton',
        tooltip: 'Background color',
        format: 'hilitecolor',
        panel: {
          role: 'application',
          ariaRemember: true,
          html: renderColorPicker(editor, false),
          onclick: onPanelClick(editor, Settings.getBackColorCols(editor))
        },
        onclick: onButtonClick(editor)
      });
    };
    var Buttons = { register: register$1 };

    global.add('textcolor', function (editor) {
      Commands.register(editor);
      Buttons.register(editor);
    });
    function Plugin () {
    }

    return Plugin;

}());
})();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  tinymce/plugins/textcolor/plugin.min.js                                                             0000644                 00000011477 15212564050 0014350 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(t,o){var r;return t.dom.getParents(t.selection.getStart(),function(t){var e;(e=t.style["forecolor"===o?"color":"background-color"])&&(r=r||e)}),r},g=function(t){var e,o=[];for(e=0;e<t.length;e+=2)o.push({text:t[e+1],color:"#"+t[e]});return o},r=function(t,e,o){t.undoManager.transact(function(){t.focus(),t.formatter.apply(e,{value:o}),t.nodeChanged()})},e=function(t,e){t.undoManager.transact(function(){t.focus(),t.formatter.remove(e,{value:null},null,!0),t.nodeChanged()})},o=function(o){o.addCommand("mceApplyTextcolor",function(t,e){r(o,t,e)}),o.addCommand("mceRemoveTextcolor",function(t){e(o,t)})},F=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","FFFFFF","White","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum"],l=function(t){return t.getParam("textcolor_map",a)},c=function(t){return t.getParam("textcolor_rows",5)},u=function(t){return t.getParam("textcolor_cols",8)},m=function(t){return t.getParam("color_picker_callback",null)},s=function(t){return t.getParam("forecolor_map",l(t))},d=function(t){return t.getParam("backcolor_map",l(t))},f=function(t){return t.getParam("forecolor_rows",c(t))},b=function(t){return t.getParam("backcolor_rows",c(t))},p=function(t){return t.getParam("forecolor_cols",u(t))},C=function(t){return t.getParam("backcolor_cols",u(t))},y=m,v=function(t){return"function"==typeof m(t)},h=tinymce.util.Tools.resolve("tinymce.util.I18n"),P=function(t,e,o,r){var n,a,l,c,i,u,m,s=0,d=F.DOM.uniqueId("mcearia"),f=function(t,e){var o="transparent"===t;return'<td class="mce-grid-cell'+(o?" mce-colorbtn-trans":"")+'"><div id="'+d+"-"+s+++'" data-mce-color="'+(t||"")+'" role="option" tabIndex="-1" style="'+(t?"background-color: "+t:"")+'" title="'+h.translate(e)+'">'+(o?"&#215;":"")+"</div></td>"};for((n=g(o)).push({text:h.translate("No color"),color:"transparent"}),l='<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="list" cellspacing="0"><tbody>',c=n.length-1,u=0;u<e;u++){for(l+="<tr>",i=0;i<t;i++)l+=c<(m=u*t+i)?"<td></td>":f((a=n[m]).color,a.text);l+="</tr>"}if(r){for(l+='<tr><td colspan="'+t+'" class="mce-custom-color-btn"><div id="'+d+'-c" class="mce-widget mce-btn mce-btn-small mce-btn-flat" role="button" tabindex="-1" aria-labelledby="'+d+'-c" style="width: 100%"><button type="button" role="presentation" tabindex="-1">'+h.translate("Custom...")+"</button></div></td></tr>",l+="<tr>",i=0;i<t;i++)l+=f("","Custom color");l+="</tr>"}return l+="</tbody></table>"},k=function(t,e){t.style.background=e,t.setAttribute("data-mce-color",e)},x=function(o){return function(t){var e=t.control;e._color?o.execCommand("mceApplyTextcolor",e.settings.format,e._color):o.execCommand("mceRemoveTextcolor",e.settings.format)}},T=function(r,c){return function(t){var e,a=this.parent(),o=n(r,a.settings.format),l=function(t){r.execCommand("mceApplyTextcolor",a.settings.format,t),a.hidePanel(),a.color(t)};F.DOM.getParent(t.target,".mce-custom-color-btn")&&(a.hidePanel(),y(r).call(r,function(t){var e,o,r,n=a.panel.getEl().getElementsByTagName("table")[0];for(e=i.map(n.rows[n.rows.length-1].childNodes,function(t){return t.firstChild}),r=0;r<e.length&&(o=e[r]).getAttribute("data-mce-color");r++);if(r===c)for(r=0;r<c-1;r++)k(e[r],e[r+1].getAttribute("data-mce-color"));k(o,t),l(t)},o)),(e=t.target.getAttribute("data-mce-color"))?(this.lastId&&F.DOM.get(this.lastId).setAttribute("aria-selected","false"),t.target.setAttribute("aria-selected",!0),this.lastId=t.target.id,"transparent"===e?(r.execCommand("mceRemoveTextcolor",a.settings.format),a.hidePanel(),a.resetColor()):l(e)):null!==e&&a.hidePanel()}},_=function(n,a){return function(){var t=a?p(n):C(n),e=a?f(n):b(n),o=a?s(n):d(n),r=v(n);return P(t,e,o,r)}},A=function(t){t.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",format:"forecolor",panel:{role:"application",ariaRemember:!0,html:_(t,!0),onclick:T(t,p(t))},onclick:x(t)}),t.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",format:"hilitecolor",panel:{role:"application",ariaRemember:!0,html:_(t,!1),onclick:T(t,C(t))},onclick:x(t)})};t.add("textcolor",function(t){o(t),A(t)})}();                                                                                                                                                                                                 tinymce/plugins/wordpress/plugin.js                                                                 0000644                 00000102542 15212564050 0013565 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /* global getUserSetting, setUserSetting */
( function( tinymce ) {
// Set the minimum value for the modals z-index higher than #wpadminbar (100000).
if ( ! tinymce.ui.FloatPanel.zIndex || tinymce.ui.FloatPanel.zIndex < 100100 ) {
	tinymce.ui.FloatPanel.zIndex = 100100;
}

tinymce.PluginManager.add( 'wordpress', function( editor ) {
	var wpAdvButton, style,
		DOM = tinymce.DOM,
		each = tinymce.each,
		__ = editor.editorManager.i18n.translate,
		$ = window.jQuery,
		wp = window.wp,
		hasWpautop = ( wp && wp.editor && wp.editor.autop && editor.getParam( 'wpautop', true ) ),
		wpTooltips = false;

	if ( $ ) {
		// Runs as soon as TinyMCE has started initializing, while plugins are loading.
		// Handlers attached after the `tinymce.init()` call may not get triggered for this instance.
		$( document ).triggerHandler( 'tinymce-editor-setup', [ editor ] );
	}

	function toggleToolbars( state ) {
		var initial, toolbars, iframeHeight,
			pixels = 0,
			classicBlockToolbar = tinymce.$( '.block-library-classic__toolbar' );

		if ( state === 'hide' ) {
			initial = true;
		} else if ( classicBlockToolbar.length && ! classicBlockToolbar.hasClass( 'has-advanced-toolbar' ) ) {
			// Show the second, third, etc. toolbar rows in the Classic block instance.
			classicBlockToolbar.addClass( 'has-advanced-toolbar' );
			state = 'show';
		}

		if ( editor.theme.panel ) {
			toolbars = editor.theme.panel.find('.toolbar:not(.menubar)');
		}

		if ( toolbars && toolbars.length > 1 ) {
			if ( ! state && toolbars[1].visible() ) {
				state = 'hide';
			}

			each( toolbars, function( toolbar, i ) {
				if ( i > 0 ) {
					if ( state === 'hide' ) {
						toolbar.hide();
						pixels += 34;
					} else {
						toolbar.show();
						pixels -= 34;
					}
				}
			});
		}

		// Resize editor iframe, not needed for iOS and inline instances.
		// Don't resize if the editor is in a hidden container.
		if ( pixels && ! tinymce.Env.iOS && editor.iframeElement && editor.iframeElement.clientHeight ) {
			iframeHeight = editor.iframeElement.clientHeight + pixels;

			// Keep min-height.
			if ( iframeHeight > 50  ) {
				DOM.setStyle( editor.iframeElement, 'height', iframeHeight );
			}
		}

		if ( ! initial ) {
			if ( state === 'hide' ) {
				setUserSetting( 'hidetb', '0' );
				wpAdvButton && wpAdvButton.active( false );
			} else {
				setUserSetting( 'hidetb', '1' );
				wpAdvButton && wpAdvButton.active( true );
			}
		}

		editor.fire( 'wp-toolbar-toggle' );
	}

	// Add the kitchen sink button :)
	editor.addButton( 'wp_adv', {
		tooltip: 'Toolbar Toggle',
		cmd: 'WP_Adv',
		onPostRender: function() {
			wpAdvButton = this;
			wpAdvButton.active( getUserSetting( 'hidetb' ) === '1' );
		}
	});

	// Hide the toolbars after loading.
	editor.on( 'PostRender', function() {
		if ( editor.getParam( 'wordpress_adv_hidden', true ) && getUserSetting( 'hidetb', '0' ) === '0' ) {
			toggleToolbars( 'hide' );
		} else {
			tinymce.$( '.block-library-classic__toolbar' ).addClass( 'has-advanced-toolbar' );
		}
	});

	editor.addCommand( 'WP_Adv', function() {
		toggleToolbars();
	});

	editor.on( 'focus', function() {
        window.wpActiveEditor = editor.id;
    });

	editor.on( 'BeforeSetContent', function( event ) {
		var title;

		if ( event.content ) {
			if ( event.content.indexOf( '<!--more' ) !== -1 ) {
				title = __( 'Read more...' );

				event.content = event.content.replace( /<!--more(.*?)-->/g, function( match, moretext ) {
					return '<img src="' + tinymce.Env.transparentSrc + '" data-wp-more="more" data-wp-more-text="' + moretext + '" ' +
						'class="wp-more-tag mce-wp-more" alt="' + title + '" data-mce-resize="false" data-mce-placeholder="1" />';
				});
			}

			if ( event.content.indexOf( '<!--nextpage-->' ) !== -1 ) {
				title = __( 'Page break' );

				event.content = event.content.replace( /<!--nextpage-->/g,
					'<img src="' + tinymce.Env.transparentSrc + '" data-wp-more="nextpage" class="wp-more-tag mce-wp-nextpage" ' +
						'alt="' + title + '" data-mce-resize="false" data-mce-placeholder="1" />' );
			}

			if ( event.load && event.format !== 'raw' ) {
				if ( hasWpautop ) {
					event.content = wp.editor.autop( event.content );
				} else {
					// Prevent creation of paragraphs out of multiple HTML comments.
					event.content = event.content.replace( /-->\s+<!--/g, '--><!--' );
				}
			}

			if ( event.content.indexOf( '<script' ) !== -1 || event.content.indexOf( '<style' ) !== -1 ) {
				event.content = event.content.replace( /<(script|style)[^>]*>[\s\S]*?<\/\1>/g, function( match, tag ) {
					return '<img ' +
						'src="' + tinymce.Env.transparentSrc + '" ' +
						'data-wp-preserve="' + encodeURIComponent( match ) + '" ' +
						'data-mce-resize="false" ' +
						'data-mce-placeholder="1" '+
						'class="mce-object mce-object-' + tag + '" ' +
						'width="20" height="20" '+
						'alt="&lt;' + tag + '&gt;" ' +
					'/>';
				} );
			}
		}
	});

	editor.on( 'setcontent', function() {
		// Remove spaces from empty paragraphs.
		editor.$( 'p' ).each( function( i, node ) {
			if ( node.innerHTML && node.innerHTML.length < 10 ) {
				var html = tinymce.trim( node.innerHTML );

				if ( ! html || html === '&nbsp;' ) {
					node.innerHTML = ( tinymce.Env.ie && tinymce.Env.ie < 11 ) ? '' : '<br data-mce-bogus="1">';
				}
			}
		} );
	});

	editor.on( 'PostProcess', function( event ) {
		if ( event.get ) {
			event.content = event.content.replace(/<img[^>]+>/g, function( image ) {
				var match,
					string,
					moretext = '';

				if ( image.indexOf( 'data-wp-more="more"' ) !== -1 ) {
					if ( match = image.match( /data-wp-more-text="([^"]+)"/ ) ) {
						moretext = match[1];
					}

					string = '<!--more' + moretext + '-->';
				} else if ( image.indexOf( 'data-wp-more="nextpage"' ) !== -1 ) {
					string = '<!--nextpage-->';
				} else if ( image.indexOf( 'data-wp-preserve' ) !== -1 ) {
					if ( match = image.match( / data-wp-preserve="([^"]+)"/ ) ) {
						string = decodeURIComponent( match[1] );
					}
				}

				return string || image;
			});
		}
	});

	// Display the tag name instead of img in element path.
	editor.on( 'ResolveName', function( event ) {
		var attr;

		if ( event.target.nodeName === 'IMG' && ( attr = editor.dom.getAttrib( event.target, 'data-wp-more' ) ) ) {
			event.name = attr;
		}
	});

	// Register commands.
	editor.addCommand( 'WP_More', function( tag ) {
		var parent, html, title,
			classname = 'wp-more-tag',
			dom = editor.dom,
			node = editor.selection.getNode(),
			rootNode = editor.getBody();

		tag = tag || 'more';
		classname += ' mce-wp-' + tag;
		title = tag === 'more' ? 'Read more...' : 'Next page';
		title = __( title );
		html = '<img src="' + tinymce.Env.transparentSrc + '" alt="' + title + '" class="' + classname + '" ' +
			'data-wp-more="' + tag + '" data-mce-resize="false" data-mce-placeholder="1" />';

		// Most common case.
		if ( node === rootNode || ( node.nodeName === 'P' && node.parentNode === rootNode ) ) {
			editor.insertContent( html );
			return;
		}

		// Get the top level parent node.
		parent = dom.getParent( node, function( found ) {
			if ( found.parentNode && found.parentNode === rootNode ) {
				return true;
			}

			return false;
		}, editor.getBody() );

		if ( parent ) {
			if ( parent.nodeName === 'P' ) {
				parent.appendChild( dom.create( 'p', null, html ).firstChild );
			} else {
				dom.insertAfter( dom.create( 'p', null, html ), parent );
			}

			editor.nodeChanged();
		}
	});

	editor.addCommand( 'WP_Code', function() {
		editor.formatter.toggle('code');
	});

	editor.addCommand( 'WP_Page', function() {
		editor.execCommand( 'WP_More', 'nextpage' );
	});

	editor.addCommand( 'WP_Help', function() {
		var access = tinymce.Env.mac ? __( 'Ctrl + Alt + letter:' ) : __( 'Shift + Alt + letter:' ),
			meta = tinymce.Env.mac ? __( 'âŒ˜ + letter:' ) : __( 'Ctrl + letter:' ),
			table1 = [],
			table2 = [],
			row1 = {},
			row2 = {},
			i1 = 0,
			i2 = 0,
			labels = editor.settings.wp_shortcut_labels,
			header, html, dialog, $wrap;

		if ( ! labels ) {
			return;
		}

		function tr( row, columns ) {
			var out = '<tr>';
			var i = 0;

			columns = columns || 1;

			each( row, function( text, key ) {
				out += '<td><kbd>' + key + '</kbd></td><td>' + __( text ) + '</td>';
				i++;
			});

			while ( i < columns ) {
				out += '<td></td><td></td>';
				i++;
			}

			return out + '</tr>';
		}

		each ( labels, function( label, name ) {
			var letter;

			if ( label.indexOf( 'meta' ) !== -1 ) {
				i1++;
				letter = label.replace( 'meta', '' ).toLowerCase();

				if ( letter ) {
					row1[ letter ] = name;

					if ( i1 % 2 === 0 ) {
						table1.push( tr( row1, 2 ) );
						row1 = {};
					}
				}
			} else if ( label.indexOf( 'access' ) !== -1 ) {
				i2++;
				letter = label.replace( 'access', '' ).toLowerCase();

				if ( letter ) {
					row2[ letter ] = name;

					if ( i2 % 2 === 0 ) {
						table2.push( tr( row2, 2 ) );
						row2 = {};
					}
				}
			}
		} );

		// Add remaining single entries.
		if ( i1 % 2 > 0 ) {
			table1.push( tr( row1, 2 ) );
		}

		if ( i2 % 2 > 0 ) {
			table2.push( tr( row2, 2 ) );
		}

		header = [ __( 'Letter' ), __( 'Action' ), __( 'Letter' ), __( 'Action' ) ];
		header = '<tr><th>' + header.join( '</th><th>' ) + '</th></tr>';

		html = '<div class="wp-editor-help">';

		// Main section, default and additional shortcuts.
		html = html +
			'<h2>' + __( 'Default shortcuts,' ) + ' ' + meta + '</h2>' +
			'<table class="wp-help-th-center fixed">' +
				header +
				table1.join('') +
			'</table>' +
			'<h2>' + __( 'Additional shortcuts,' ) + ' ' + access + '</h2>' +
			'<table class="wp-help-th-center fixed">' +
				header +
				table2.join('') +
			'</table>';

		if ( editor.plugins.wptextpattern && ( ! tinymce.Env.ie || tinymce.Env.ie > 8 ) ) {
			// Text pattern section.
			html = html +
				'<h2>' + __( 'When starting a new paragraph with one of these formatting shortcuts followed by a space, the formatting will be applied automatically. Press Backspace or Escape to undo.' ) + '</h2>' +
				'<table class="wp-help-th-center fixed">' +
					tr({ '*':  'Bullet list', '1.':  'Numbered list' }) +
					tr({ '-':  'Bullet list', '1)':  'Numbered list' }) +
				'</table>';

			html = html +
				'<h2>' + __( 'The following formatting shortcuts are replaced when pressing Enter. Press Escape or the Undo button to undo.' ) + '</h2>' +
				'<table class="wp-help-single">' +
					tr({ '>': 'Blockquote' }) +
					tr({ '##': 'Heading 2' }) +
					tr({ '###': 'Heading 3' }) +
					tr({ '####': 'Heading 4' }) +
					tr({ '#####': 'Heading 5' }) +
					tr({ '######': 'Heading 6' }) +
					tr({ '---': 'Horizontal line' }) +
				'</table>';
		}

		// Focus management section.
		html = html +
			'<h2>' + __( 'Focus shortcuts:' ) + '</h2>' +
			'<table class="wp-help-single">' +
				tr({ 'Alt + F8':  'Inline toolbar (when an image, link or preview is selected)' }) +
				tr({ 'Alt + F9':  'Editor menu (when enabled)' }) +
				tr({ 'Alt + F10': 'Editor toolbar' }) +
				tr({ 'Alt + F11': 'Elements path' }) +
			'</table>' +
			'<p>' + __( 'To move focus to other buttons use Tab or the arrow keys. To return focus to the editor press Escape or use one of the buttons.' ) + '</p>';

		html += '</div>';

		dialog = editor.windowManager.open( {
			title: editor.settings.classic_block_editor ? 'Classic Block Keyboard Shortcuts' : 'Keyboard Shortcuts',
			items: {
				type: 'container',
				classes: 'wp-help',
				html: html
			},
			buttons: {
				text: 'Close',
				onclick: 'close'
			}
		} );

		if ( dialog.$el ) {
			dialog.$el.find( 'div[role="application"]' ).attr( 'role', 'document' );
			$wrap = dialog.$el.find( '.mce-wp-help' );

			if ( $wrap[0] ) {
				$wrap.attr( 'tabindex', '0' );
				$wrap[0].focus();
				$wrap.on( 'keydown', function( event ) {
					// Prevent use of: page up, page down, end, home, left arrow, up arrow, right arrow, down arrow
					// in the dialog keydown handler.
					if ( event.keyCode >= 33 && event.keyCode <= 40 ) {
						event.stopPropagation();
					}
				});
			}
		}
	} );

	editor.addCommand( 'WP_Medialib', function() {
		if ( wp && wp.media && wp.media.editor ) {
			wp.media.editor.open( editor.id );
		}
	});

	// Register buttons.
	editor.addButton( 'wp_more', {
		tooltip: 'Insert Read More tag',
		onclick: function() {
			editor.execCommand( 'WP_More', 'more' );
		}
	});

	editor.addButton( 'wp_page', {
		tooltip: 'Page break',
		onclick: function() {
			editor.execCommand( 'WP_More', 'nextpage' );
		}
	});

	editor.addButton( 'wp_help', {
		tooltip: 'Keyboard Shortcuts',
		cmd: 'WP_Help'
	});

	editor.addButton( 'wp_code', {
		tooltip: 'Code',
		cmd: 'WP_Code',
		stateSelector: 'code'
	});

	// Insert->Add Media.
	if ( wp && wp.media && wp.media.editor ) {
		editor.addButton( 'wp_add_media', {
			tooltip: 'Add Media',
			icon: 'dashicon dashicons-admin-media',
			cmd: 'WP_Medialib'
		} );

		editor.addMenuItem( 'add_media', {
			text: 'Add Media',
			icon: 'wp-media-library',
			context: 'insert',
			cmd: 'WP_Medialib'
		});
	}

	// Insert "Read More...".
	editor.addMenuItem( 'wp_more', {
		text: 'Insert Read More tag',
		icon: 'wp_more',
		context: 'insert',
		onclick: function() {
			editor.execCommand( 'WP_More', 'more' );
		}
	});

	// Insert "Next Page".
	editor.addMenuItem( 'wp_page', {
		text: 'Page break',
		icon: 'wp_page',
		context: 'insert',
		onclick: function() {
			editor.execCommand( 'WP_More', 'nextpage' );
		}
	});

	editor.on( 'BeforeExecCommand', function(e) {
		if ( tinymce.Env.webkit && ( e.command === 'InsertUnorderedList' || e.command === 'InsertOrderedList' ) ) {
			if ( ! style ) {
				style = editor.dom.create( 'style', {'type': 'text/css'},
					'#tinymce,#tinymce span,#tinymce li,#tinymce li>span,#tinymce p,#tinymce p>span{font:medium sans-serif;color:#000;line-height:normal;}');
			}

			editor.getDoc().head.appendChild( style );
		}
	});

	editor.on( 'ExecCommand', function( e ) {
		if ( tinymce.Env.webkit && style &&
			( 'InsertUnorderedList' === e.command || 'InsertOrderedList' === e.command ) ) {

			editor.dom.remove( style );
		}
	});

	editor.on( 'init', function() {
		var env = tinymce.Env,
			bodyClass = ['mceContentBody'], // Back-compat for themes that use this in editor-style.css...
			doc = editor.getDoc(),
			dom = editor.dom;

		if ( env.iOS ) {
			dom.addClass( doc.documentElement, 'ios' );
		}

		if ( editor.getParam( 'directionality' ) === 'rtl' ) {
			bodyClass.push('rtl');
			dom.setAttrib( doc.documentElement, 'dir', 'rtl' );
		}

		dom.setAttrib( doc.documentElement, 'lang', editor.getParam( 'wp_lang_attr' ) );

		if ( env.ie ) {
			if ( parseInt( env.ie, 10 ) === 9 ) {
				bodyClass.push('ie9');
			} else if ( parseInt( env.ie, 10 ) === 8 ) {
				bodyClass.push('ie8');
			} else if ( env.ie < 8 ) {
				bodyClass.push('ie7');
			}
		} else if ( env.webkit ) {
			bodyClass.push('webkit');
		}

		bodyClass.push('wp-editor');

		each( bodyClass, function( cls ) {
			if ( cls ) {
				dom.addClass( doc.body, cls );
			}
		});

		// Remove invalid parent paragraphs when inserting HTML.
		editor.on( 'BeforeSetContent', function( event ) {
			if ( event.content ) {
				event.content = event.content.replace( /<p>\s*<(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre)( [^>]*)?>/gi, '<$1$2>' )
					.replace( /<\/(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre)>\s*<\/p>/gi, '</$1>' );
			}
		});

		if ( $ ) {
			// Run on DOM ready. Otherwise TinyMCE may initialize earlier and handlers attached
			// on DOM ready of after the `tinymce.init()` call may not get triggered.
			$( function() {
				$( document ).triggerHandler( 'tinymce-editor-init', [editor] );
			});
		}

		if ( window.tinyMCEPreInit && window.tinyMCEPreInit.dragDropUpload ) {
			dom.bind( doc, 'dragstart dragend dragover drop', function( event ) {
				if ( $ ) {
					// Trigger the jQuery handlers.
					$( document ).trigger( new $.Event( event ) );
				}
			});
		}

		if ( editor.getParam( 'wp_paste_filters', true ) ) {
			editor.on( 'PastePreProcess', function( event ) {
				// Remove trailing <br> added by WebKit browsers to the clipboard.
				event.content = event.content.replace( /<br class="?Apple-interchange-newline"?>/gi, '' );

				// In WebKit this is handled by removeWebKitStyles().
				if ( ! tinymce.Env.webkit ) {
					// Remove all inline styles.
					event.content = event.content.replace( /(<[^>]+) style="[^"]*"([^>]*>)/gi, '$1$2' );

					// Put back the internal styles.
					event.content = event.content.replace(/(<[^>]+) data-mce-style=([^>]+>)/gi, '$1 style=$2' );
				}
			});

			editor.on( 'PastePostProcess', function( event ) {
				// Remove empty paragraphs.
				editor.$( 'p', event.node ).each( function( i, node ) {
					if ( dom.isEmpty( node ) ) {
						dom.remove( node );
					}
				});

				if ( tinymce.isIE ) {
					editor.$( 'a', event.node ).find( 'font, u' ).each( function( i, node ) {
						dom.remove( node, true );
					});
				}
			});
		}
	});

	editor.on( 'SaveContent', function( event ) {
		// If editor is hidden, we just want the textarea's value to be saved.
		if ( ! editor.inline && editor.isHidden() ) {
			event.content = event.element.value;
			return;
		}

		// Keep empty paragraphs :(
		event.content = event.content.replace( /<p>(?:<br ?\/?>|\u00a0|\uFEFF| )*<\/p>/g, '<p>&nbsp;</p>' );

		if ( hasWpautop ) {
			event.content = wp.editor.removep( event.content );
		} else {
			// Restore formatting of block boundaries.
			event.content = event.content.replace( /-->\s*<!-- wp:/g, '-->\n\n<!-- wp:' );
		}
	});

	editor.on( 'preInit', function() {
		var validElementsSetting = '@[id|accesskey|class|dir|lang|style|tabindex|' +
			'title|contenteditable|draggable|dropzone|hidden|spellcheck|translate],' + // Global attributes.
			'i,' + // Don't replace <i> with <em> and <b> with <strong> and don't remove them when empty.
			'b,' +
			'script[src|async|defer|type|charset|crossorigin|integrity]'; // Add support for <script>.

		editor.schema.addValidElements( validElementsSetting );

		if ( tinymce.Env.iOS ) {
			editor.settings.height = 300;
		}

		each( {
			c: 'JustifyCenter',
			r: 'JustifyRight',
			l: 'JustifyLeft',
			j: 'JustifyFull',
			q: 'mceBlockQuote',
			u: 'InsertUnorderedList',
			o: 'InsertOrderedList',
			m: 'WP_Medialib',
			t: 'WP_More',
			d: 'Strikethrough',
			p: 'WP_Page',
			x: 'WP_Code'
		}, function( command, key ) {
			editor.shortcuts.add( 'access+' + key, '', command );
		} );

		editor.addShortcut( 'meta+s', '', function() {
			if ( wp && wp.autosave ) {
				wp.autosave.server.triggerSave();
			}
		} );

		// Alt+Shift+Z removes a block in the block editor, don't add it to the Classic block.
		if ( ! editor.settings.classic_block_editor ) {
			editor.addShortcut( 'access+z', '', 'WP_Adv' );
		}

		// Workaround for not triggering the global help modal in the block editor by the Classic block shortcut.
		editor.on( 'keydown', function( event ) {
			var match;

			if ( tinymce.Env.mac ) {
				match = event.ctrlKey && event.altKey && event.code === 'KeyH';
			} else {
				match = event.shiftKey && event.altKey && event.code === 'KeyH';
			}

			if ( match ) {
				editor.execCommand( 'WP_Help' );
				event.stopPropagation();
				event.stopImmediatePropagation();
				return false;
			}

			return true;
		});

		if ( window.getUserSetting( 'editor_plain_text_paste_warning' ) > 1 ) {
			editor.settings.paste_plaintext_inform = false;
		}

		// Change the editor iframe title on MacOS, add the correct help shortcut.
		if ( tinymce.Env.mac ) {
			tinymce.$( editor.iframeElement ).attr( 'title', __( 'Rich Text Area. Press Control-Option-H for help.' ) );
		}
	} );

	editor.on( 'PastePlainTextToggle', function( event ) {
		// Warn twice, then stop.
		if ( event.state === true ) {
			var times = parseInt( window.getUserSetting( 'editor_plain_text_paste_warning' ), 10 ) || 0;

			if ( times < 2 ) {
				window.setUserSetting( 'editor_plain_text_paste_warning', ++times );
			}
		}
	});

	editor.on( 'beforerenderui', function() {
		if ( editor.theme.panel ) {
			each( [ 'button', 'colorbutton', 'splitbutton' ], function( buttonType ) {
				replaceButtonsTooltips( editor.theme.panel.find( buttonType ) );
			} );

			addShortcutsToListbox();
		}
	} );

	function prepareTooltips() {
		var access = 'Shift+Alt+';
		var meta = 'Ctrl+';

		wpTooltips = {};

		// For MacOS: ctrl = \u2303, cmd = \u2318, alt = \u2325.
		if ( tinymce.Env.mac ) {
			access = '\u2303\u2325';
			meta = '\u2318';
		}

		// Some tooltips are translated, others are not...
		if ( editor.settings.wp_shortcut_labels ) {
			each( editor.settings.wp_shortcut_labels, function( value, tooltip ) {
				var translated = editor.translate( tooltip );

				value = value.replace( 'access', access ).replace( 'meta', meta );
				wpTooltips[ tooltip ] = value;

				// Add the translated so we can match all of them.
				if ( tooltip !== translated ) {
					wpTooltips[ translated ] = value;
				}
			} );
		}
	}

	function getTooltip( tooltip ) {
		var translated = editor.translate( tooltip );
		var label;

		if ( ! wpTooltips ) {
			prepareTooltips();
		}

		if ( wpTooltips.hasOwnProperty( translated ) ) {
			label = wpTooltips[ translated ];
		} else if ( wpTooltips.hasOwnProperty( tooltip ) ) {
			label = wpTooltips[ tooltip ];
		}

		return label ? translated + ' (' + label + ')' : translated;
	}

	function replaceButtonsTooltips( buttons ) {

		if ( ! buttons ) {
			return;
		}

		each( buttons, function( button ) {
			var tooltip;

			if ( button && button.settings.tooltip ) {
				tooltip = getTooltip( button.settings.tooltip );
				button.settings.tooltip = tooltip;

				// Override the aria label with the translated tooltip + shortcut.
				if ( button._aria && button._aria.label ) {
					button._aria.label = tooltip;
				}
			}
		} );
	}

	function addShortcutsToListbox() {
		// listbox for the "blocks" drop-down.
		each( editor.theme.panel.find( 'listbox' ), function( listbox ) {
			if ( listbox && listbox.settings.text === 'Paragraph' ) {
				each( listbox.settings.values, function( item ) {
					if ( item.text && wpTooltips.hasOwnProperty( item.text ) ) {
						item.shortcut = '(' + wpTooltips[ item.text ] + ')';
					}
				} );
			}
		} );
	}

	/**
	 * Experimental: create a floating toolbar.
	 * This functionality will change in the next releases. Not recommended for use by plugins.
	 */
	editor.on( 'preinit', function() {
		var Factory = tinymce.ui.Factory,
			settings = editor.settings,
			activeToolbar,
			currentSelection,
			timeout,
			container = editor.getContainer(),
			wpAdminbar = document.getElementById( 'wpadminbar' ),
			mceIframe = document.getElementById( editor.id + '_ifr' ),
			mceToolbar,
			mceStatusbar,
			wpStatusbar,
			cachedWinSize;

			if ( container ) {
				mceToolbar = tinymce.$( '.mce-toolbar-grp', container )[0];
				mceStatusbar = tinymce.$( '.mce-statusbar', container )[0];
			}

			if ( editor.id === 'content' ) {
				wpStatusbar = document.getElementById( 'post-status-info' );
			}

		function create( buttons, bottom ) {
			var toolbar,
				toolbarItems = [],
				buttonGroup;

			each( buttons, function( item ) {
				var itemName;
				var tooltip;

				function bindSelectorChanged() {
					var selection = editor.selection;

					if ( itemName === 'bullist' ) {
						selection.selectorChanged( 'ul > li', function( state, args ) {
							var i = args.parents.length,
								nodeName;

							while ( i-- ) {
								nodeName = args.parents[ i ].nodeName;

								if ( nodeName === 'OL' || nodeName == 'UL' ) {
									break;
								}
							}

							item.active( state && nodeName === 'UL' );
						} );
					}

					if ( itemName === 'numlist' ) {
						selection.selectorChanged( 'ol > li', function( state, args ) {
							var i = args.parents.length,
								nodeName;

							while ( i-- ) {
								nodeName = args.parents[ i ].nodeName;

								if ( nodeName === 'OL' || nodeName === 'UL' ) {
									break;
								}
							}

							item.active( state && nodeName === 'OL' );
						} );
					}

					if ( item.settings.stateSelector ) {
						selection.selectorChanged( item.settings.stateSelector, function( state ) {
							item.active( state );
						}, true );
					}

					if ( item.settings.disabledStateSelector ) {
						selection.selectorChanged( item.settings.disabledStateSelector, function( state ) {
							item.disabled( state );
						} );
					}
				}

				if ( item === '|' ) {
					buttonGroup = null;
				} else {
					if ( Factory.has( item ) ) {
						item = {
							type: item
						};

						if ( settings.toolbar_items_size ) {
							item.size = settings.toolbar_items_size;
						}

						toolbarItems.push( item );

						buttonGroup = null;
					} else {
						if ( ! buttonGroup ) {
							buttonGroup = {
								type: 'buttongroup',
								items: []
							};

							toolbarItems.push( buttonGroup );
						}

						if ( editor.buttons[ item ] ) {
							itemName = item;
							item = editor.buttons[ itemName ];

							if ( typeof item === 'function' ) {
								item = item();
							}

							item.type = item.type || 'button';

							if ( settings.toolbar_items_size ) {
								item.size = settings.toolbar_items_size;
							}

							tooltip = item.tooltip || item.title;

							if ( tooltip ) {
								item.tooltip = getTooltip( tooltip );
							}

							item = Factory.create( item );

							buttonGroup.items.push( item );

							if ( editor.initialized ) {
								bindSelectorChanged();
							} else {
								editor.on( 'init', bindSelectorChanged );
							}
						}
					}
				}
			} );

			toolbar = Factory.create( {
				type: 'panel',
				layout: 'stack',
				classes: 'toolbar-grp inline-toolbar-grp',
				ariaRoot: true,
				ariaRemember: true,
				items: [ {
					type: 'toolbar',
					layout: 'flow',
					items: toolbarItems
				} ]
			} );

			toolbar.bottom = bottom;

			function reposition() {
				if ( ! currentSelection ) {
					return this;
				}

				var scrollX = window.pageXOffset || document.documentElement.scrollLeft,
					scrollY = window.pageYOffset || document.documentElement.scrollTop,
					windowWidth = window.innerWidth,
					windowHeight = window.innerHeight,
					iframeRect = mceIframe ? mceIframe.getBoundingClientRect() : {
						top: 0,
						right: windowWidth,
						bottom: windowHeight,
						left: 0,
						width: windowWidth,
						height: windowHeight
					},
					toolbar = this.getEl(),
					toolbarWidth = toolbar.offsetWidth,
					toolbarHeight = toolbar.clientHeight,
					selection = currentSelection.getBoundingClientRect(),
					selectionMiddle = ( selection.left + selection.right ) / 2,
					buffer = 5,
					spaceNeeded = toolbarHeight + buffer,
					wpAdminbarBottom = wpAdminbar ? wpAdminbar.getBoundingClientRect().bottom : 0,
					mceToolbarBottom = mceToolbar ? mceToolbar.getBoundingClientRect().bottom : 0,
					mceStatusbarTop = mceStatusbar ? windowHeight - mceStatusbar.getBoundingClientRect().top : 0,
					wpStatusbarTop = wpStatusbar ? windowHeight - wpStatusbar.getBoundingClientRect().top : 0,
					blockedTop = Math.max( 0, wpAdminbarBottom, mceToolbarBottom, iframeRect.top ),
					blockedBottom = Math.max( 0, mceStatusbarTop, wpStatusbarTop, windowHeight - iframeRect.bottom ),
					spaceTop = selection.top + iframeRect.top - blockedTop,
					spaceBottom = windowHeight - iframeRect.top - selection.bottom - blockedBottom,
					editorHeight = windowHeight - blockedTop - blockedBottom,
					className = '',
					iosOffsetTop = 0,
					iosOffsetBottom = 0,
					top, left;

				if ( spaceTop >= editorHeight || spaceBottom >= editorHeight ) {
					this.scrolling = true;
					this.hide();
					this.scrolling = false;
					return this;
				}

				// Add offset in iOS to move the menu over the image, out of the way of the default iOS menu.
				if ( tinymce.Env.iOS && currentSelection.nodeName === 'IMG' ) {
					iosOffsetTop = 54;
					iosOffsetBottom = 46;
				}

				if ( this.bottom ) {
					if ( spaceBottom >= spaceNeeded ) {
						className = ' mce-arrow-up';
						top = selection.bottom + iframeRect.top + scrollY - iosOffsetBottom;
					} else if ( spaceTop >= spaceNeeded ) {
						className = ' mce-arrow-down';
						top = selection.top + iframeRect.top + scrollY - toolbarHeight + iosOffsetTop;
					}
				} else {
					if ( spaceTop >= spaceNeeded ) {
						className = ' mce-arrow-down';
						top = selection.top + iframeRect.top + scrollY - toolbarHeight + iosOffsetTop;
					} else if ( spaceBottom >= spaceNeeded && editorHeight / 2 > selection.bottom + iframeRect.top - blockedTop ) {
						className = ' mce-arrow-up';
						top = selection.bottom + iframeRect.top + scrollY - iosOffsetBottom;
					}
				}

				if ( typeof top === 'undefined' ) {
					top = scrollY + blockedTop + buffer + iosOffsetBottom;
				}

				left = selectionMiddle - toolbarWidth / 2 + iframeRect.left + scrollX;

				if ( selection.left < 0 || selection.right > iframeRect.width ) {
					left = iframeRect.left + scrollX + ( iframeRect.width - toolbarWidth ) / 2;
				} else if ( toolbarWidth >= windowWidth ) {
					className += ' mce-arrow-full';
					left = 0;
				} else if ( ( left < 0 && selection.left + toolbarWidth > windowWidth ) || ( left + toolbarWidth > windowWidth && selection.right - toolbarWidth < 0 ) ) {
					left = ( windowWidth - toolbarWidth ) / 2;
				} else if ( left < iframeRect.left + scrollX ) {
					className += ' mce-arrow-left';
					left = selection.left + iframeRect.left + scrollX;
				} else if ( left + toolbarWidth > iframeRect.width + iframeRect.left + scrollX ) {
					className += ' mce-arrow-right';
					left = selection.right - toolbarWidth + iframeRect.left + scrollX;
				}

				// No up/down arrows on the menu over images in iOS.
				if ( tinymce.Env.iOS && currentSelection.nodeName === 'IMG' ) {
					className = className.replace( / ?mce-arrow-(up|down)/g, '' );
				}

				toolbar.className = toolbar.className.replace( / ?mce-arrow-[\w]+/g, '' ) + className;

				DOM.setStyles( toolbar, {
					'left': left,
					'top': top
				} );

				return this;
			}

			toolbar.on( 'show', function() {
				this.reposition();
			} );

			toolbar.on( 'keydown', function( event ) {
				if ( event.keyCode === 27 ) {
					this.hide();
					editor.focus();
				}
			} );

			editor.on( 'remove', function() {
				toolbar.remove();
			} );

			toolbar.reposition = reposition;
			toolbar.hide().renderTo( document.body );

			return toolbar;
		}

		editor.shortcuts.add( 'alt+119', '', function() {
			var node;

			if ( activeToolbar ) {
				node = activeToolbar.find( 'toolbar' )[0];
				node && node.focus( true );
			}
		} );

		editor.on( 'nodechange', function( event ) {
			var collapsed = editor.selection.isCollapsed();

			var args = {
				element: event.element,
				parents: event.parents,
				collapsed: collapsed
			};

			editor.fire( 'wptoolbar', args );

			currentSelection = args.selection || args.element;

			if ( activeToolbar && activeToolbar !== args.toolbar ) {
				activeToolbar.hide();
			}

			if ( args.toolbar ) {
				activeToolbar = args.toolbar;

				if ( activeToolbar.visible() ) {
					activeToolbar.reposition();
				} else {
					activeToolbar.show();
				}
			} else {
				activeToolbar = false;
			}
		} );

		editor.on( 'focus', function() {
			if ( activeToolbar ) {
				activeToolbar.show();
			}
		} );

		function hide( event ) {
			var win;
			var size;

			if ( activeToolbar ) {
				if ( activeToolbar.tempHide || event.type === 'hide' || event.type === 'blur' ) {
					activeToolbar.hide();
					activeToolbar = false;
				} else if ( (
					event.type === 'resizewindow' ||
					event.type === 'scrollwindow' ||
					event.type === 'resize' ||
					event.type === 'scroll'
				) && ! activeToolbar.blockHide ) {
					/*
					 * Showing a tooltip may trigger a `resize` event in Chromium browsers.
					 * That results in a flicketing inline menu; tooltips are shown on hovering over a button,
					 * which then hides the toolbar on `resize`, then it repeats as soon as the toolbar is shown again.
					 */
					if ( event.type === 'resize' || event.type === 'resizewindow' ) {
						win = editor.getWin();
						size = win.innerHeight + win.innerWidth;

						// Reset old cached size.
						if ( cachedWinSize && ( new Date() ).getTime() - cachedWinSize.timestamp > 2000 ) {
							cachedWinSize = null;
						}

						if ( cachedWinSize ) {
							if ( size && Math.abs( size - cachedWinSize.size ) < 2 ) {
								// `resize` fired but the window hasn't been resized. Bail.
								return;
							}
						} else {
							// First of a new series of `resize` events. Store the cached size and bail.
							cachedWinSize = {
								timestamp: ( new Date() ).getTime(),
								size: size,
							};

							return;
						}
					}

					clearTimeout( timeout );

					timeout = setTimeout( function() {
						if ( activeToolbar && typeof activeToolbar.show === 'function' ) {
							activeToolbar.scrolling = false;
							activeToolbar.show();
						}
					}, 250 );

					activeToolbar.scrolling = true;
					activeToolbar.hide();
				}
			}
		}

		if ( editor.inline ) {
			editor.on( 'resizewindow', hide );

			// Enable `capture` for the event.
			// This will hide/reposition the toolbar on any scrolling in the document.
			document.addEventListener( 'scroll', hide, true );
		} else {
			// Bind to the editor iframe and to the parent window.
			editor.dom.bind( editor.getWin(), 'resize scroll', hide );
			editor.on( 'resizewindow scrollwindow', hide );
		}

		editor.on( 'remove', function() {
			document.removeEventListener( 'scroll', hide, true );
			editor.off( 'resizewindow scrollwindow', hide );
			editor.dom.unbind( editor.getWin(), 'resize scroll', hide );
		} );

		editor.on( 'blur hide', hide );

		editor.wp = editor.wp || {};
		editor.wp._createToolbar = create;
	}, true );

	function noop() {}

	// Expose some functions (back-compat).
	return {
		_showButtons: noop,
		_hideButtons: noop,
		_setEmbed: noop,
		_getEmbed: noop
	};
});

}( window.tinymce ));
                                                                                                                                                              tinymce/plugins/wordpress/plugin.min.js                                                             0000644                 00000040027 15212564050 0014346 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(k){(!k.ui.FloatPanel.zIndex||k.ui.FloatPanel.zIndex<100100)&&(k.ui.FloatPanel.zIndex=100100),k.PluginManager.add("wordpress",function(p){var a,t,E=k.DOM,m=k.each,u=p.editorManager.i18n.translate,i=window.jQuery,o=window.wp,r=o&&o.editor&&o.editor.autop&&p.getParam("wpautop",!0),s=!1;function e(n){var e,t,o=0,i=k.$(".block-library-classic__toolbar");"hide"===n?e=!0:i.length&&!i.hasClass("has-advanced-toolbar")&&(i.addClass("has-advanced-toolbar"),n="show"),(t=p.theme.panel?p.theme.panel.find(".toolbar:not(.menubar)"):t)&&1<t.length&&(!n&&t[1].visible()&&(n="hide"),m(t,function(e,t){0<t&&("hide"===n?(e.hide(),o+=34):(e.show(),o-=34))})),o&&!k.Env.iOS&&p.iframeElement&&p.iframeElement.clientHeight&&50<(i=p.iframeElement.clientHeight+o)&&E.setStyle(p.iframeElement,"height",i),e||("hide"===n?(setUserSetting("hidetb","0"),a&&a.active(!1)):(setUserSetting("hidetb","1"),a&&a.active(!0))),p.fire("wp-toolbar-toggle")}function d(e){var t,o,i,n=p.translate(e);return s||(o="Shift+Alt+",i="Ctrl+",s={},k.Env.mac&&(o="\u2303\u2325",i="\u2318"),p.settings.wp_shortcut_labels&&m(p.settings.wp_shortcut_labels,function(e,t){var n=p.translate(t);e=e.replace("access",o).replace("meta",i),s[t]=e,t!==n&&(s[n]=e)})),s.hasOwnProperty(n)?t=s[n]:s.hasOwnProperty(e)&&(t=s[e]),t?n+" ("+t+")":n}function n(){}return i&&i(document).triggerHandler("tinymce-editor-setup",[p]),p.addButton("wp_adv",{tooltip:"Toolbar Toggle",cmd:"WP_Adv",onPostRender:function(){(a=this).active("1"===getUserSetting("hidetb"))}}),p.on("PostRender",function(){p.getParam("wordpress_adv_hidden",!0)&&"0"===getUserSetting("hidetb","0")?e("hide"):k.$(".block-library-classic__toolbar").addClass("has-advanced-toolbar")}),p.addCommand("WP_Adv",function(){e()}),p.on("focus",function(){window.wpActiveEditor=p.id}),p.on("BeforeSetContent",function(e){var n;e.content&&(-1!==e.content.indexOf("\x3c!--more")&&(n=u("Read more..."),e.content=e.content.replace(/<!--more(.*?)-->/g,function(e,t){return'<img src="'+k.Env.transparentSrc+'" data-wp-more="more" data-wp-more-text="'+t+'" class="wp-more-tag mce-wp-more" alt="'+n+'" data-mce-resize="false" data-mce-placeholder="1" />'})),-1!==e.content.indexOf("\x3c!--nextpage--\x3e")&&(n=u("Page break"),e.content=e.content.replace(/<!--nextpage-->/g,'<img src="'+k.Env.transparentSrc+'" data-wp-more="nextpage" class="wp-more-tag mce-wp-nextpage" alt="'+n+'" data-mce-resize="false" data-mce-placeholder="1" />')),e.load&&"raw"!==e.format&&(e.content=r?o.editor.autop(e.content):e.content.replace(/-->\s+<!--/g,"--\x3e\x3c!--")),-1===e.content.indexOf("<script")&&-1===e.content.indexOf("<style")||(e.content=e.content.replace(/<(script|style)[^>]*>[\s\S]*?<\/\1>/g,function(e,t){return'<img src="'+k.Env.transparentSrc+'" data-wp-preserve="'+encodeURIComponent(e)+'" data-mce-resize="false" data-mce-placeholder="1" class="mce-object mce-object-'+t+'" width="20" height="20" alt="&lt;'+t+'&gt;" />'})))}),p.on("setcontent",function(){p.$("p").each(function(e,t){var n;t.innerHTML&&t.innerHTML.length<10&&((n=k.trim(t.innerHTML))&&"&nbsp;"!==n||(t.innerHTML=k.Env.ie&&k.Env.ie<11?"":'<br data-mce-bogus="1">'))})}),p.on("PostProcess",function(e){e.get&&(e.content=e.content.replace(/<img[^>]+>/g,function(e){var t,n,o="";return-1!==e.indexOf('data-wp-more="more"')?n="\x3c!--more"+(o=(t=e.match(/data-wp-more-text="([^"]+)"/))?t[1]:o)+"--\x3e":-1!==e.indexOf('data-wp-more="nextpage"')?n="\x3c!--nextpage--\x3e":-1!==e.indexOf("data-wp-preserve")&&(t=e.match(/ data-wp-preserve="([^"]+)"/))&&(n=decodeURIComponent(t[1])),n||e}))}),p.on("ResolveName",function(e){var t;"IMG"===e.target.nodeName&&(t=p.dom.getAttrib(e.target,"data-wp-more"))&&(e.name=t)}),p.addCommand("WP_More",function(e){var t,n="wp-more-tag",o=p.dom,i=p.selection.getNode(),a=p.getBody();n+=" mce-wp-"+(e=e||"more"),t=u("more"===e?"Read more...":"Next page"),t='<img src="'+k.Env.transparentSrc+'" alt="'+t+'" class="'+n+'" data-wp-more="'+e+'" data-mce-resize="false" data-mce-placeholder="1" />',i===a||"P"===i.nodeName&&i.parentNode===a?p.insertContent(t):(n=o.getParent(i,function(e){return!(!e.parentNode||e.parentNode!==a)},p.getBody()))&&("P"===n.nodeName?n.appendChild(o.create("p",null,t).firstChild):o.insertAfter(o.create("p",null,t),n),p.nodeChanged())}),p.addCommand("WP_Code",function(){p.formatter.toggle("code")}),p.addCommand("WP_Page",function(){p.execCommand("WP_More","nextpage")}),p.addCommand("WP_Help",function(){var e,t=k.Env.mac?u("Ctrl + Alt + letter:"):u("Shift + Alt + letter:"),n=k.Env.mac?u("\u2318 + letter:"):u("Ctrl + letter:"),o=[],i=[],a={},r={},s=0,d=0,l=p.settings.wp_shortcut_labels;function c(e,t){var n="<tr>",o=0;for(t=t||1,m(e,function(e,t){n+="<td><kbd>"+t+"</kbd></td><td>"+u(e)+"</td>",o++});o<t;)n+="<td></td><td></td>",o++;return n+"</tr>"}l&&(m(l,function(e,t){var n;-1!==e.indexOf("meta")?(s++,(n=e.replace("meta","").toLowerCase())&&(a[n]=t,s%2==0)&&(o.push(c(a,2)),a={})):-1!==e.indexOf("access")&&(d++,n=e.replace("access","").toLowerCase())&&(r[n]=t,d%2==0)&&(i.push(c(r,2)),r={})}),0<s%2&&o.push(c(a,2)),0<d%2&&i.push(c(r,2)),l="<tr><th>"+(l=[u("Letter"),u("Action"),u("Letter"),u("Action")]).join("</th><th>")+"</th></tr>",e=(e='<div class="wp-editor-help">')+"<h2>"+u("Default shortcuts,")+" "+n+'</h2><table class="wp-help-th-center fixed">'+l+o.join("")+"</table><h2>"+u("Additional shortcuts,")+" "+t+'</h2><table class="wp-help-th-center fixed">'+l+i.join("")+"</table>",e=(e=p.plugins.wptextpattern&&(!k.Env.ie||8<k.Env.ie)?(e=e+"<h2>"+u("When starting a new paragraph with one of these formatting shortcuts followed by a space, the formatting will be applied automatically. Press Backspace or Escape to undo.")+'</h2><table class="wp-help-th-center fixed">'+c({"*":"Bullet list","1.":"Numbered list"})+c({"-":"Bullet list","1)":"Numbered list"})+"</table>")+"<h2>"+u("The following formatting shortcuts are replaced when pressing Enter. Press Escape or the Undo button to undo.")+'</h2><table class="wp-help-single">'+c({">":"Blockquote"})+c({"##":"Heading 2"})+c({"###":"Heading 3"})+c({"####":"Heading 4"})+c({"#####":"Heading 5"})+c({"######":"Heading 6"})+c({"---":"Horizontal line"})+"</table>":e)+"<h2>"+u("Focus shortcuts:")+'</h2><table class="wp-help-single">'+c({"Alt + F8":"Inline toolbar (when an image, link or preview is selected)"})+c({"Alt + F9":"Editor menu (when enabled)"})+c({"Alt + F10":"Editor toolbar"})+c({"Alt + F11":"Elements path"})+"</table><p>"+u("To move focus to other buttons use Tab or the arrow keys. To return focus to the editor press Escape or use one of the buttons.")+"</p>",(n=p.windowManager.open({title:p.settings.classic_block_editor?"Classic Block Keyboard Shortcuts":"Keyboard Shortcuts",items:{type:"container",classes:"wp-help",html:e+="</div>"},buttons:{text:"Close",onclick:"close"}})).$el)&&(n.$el.find('div[role="application"]').attr("role","document"),(t=n.$el.find(".mce-wp-help"))[0])&&(t.attr("tabindex","0"),t[0].focus(),t.on("keydown",function(e){33<=e.keyCode&&e.keyCode<=40&&e.stopPropagation()}))}),p.addCommand("WP_Medialib",function(){o&&o.media&&o.media.editor&&o.media.editor.open(p.id)}),p.addButton("wp_more",{tooltip:"Insert Read More tag",onclick:function(){p.execCommand("WP_More","more")}}),p.addButton("wp_page",{tooltip:"Page break",onclick:function(){p.execCommand("WP_More","nextpage")}}),p.addButton("wp_help",{tooltip:"Keyboard Shortcuts",cmd:"WP_Help"}),p.addButton("wp_code",{tooltip:"Code",cmd:"WP_Code",stateSelector:"code"}),o&&o.media&&o.media.editor&&(p.addButton("wp_add_media",{tooltip:"Add Media",icon:"dashicon dashicons-admin-media",cmd:"WP_Medialib"}),p.addMenuItem("add_media",{text:"Add Media",icon:"wp-media-library",context:"insert",cmd:"WP_Medialib"})),p.addMenuItem("wp_more",{text:"Insert Read More tag",icon:"wp_more",context:"insert",onclick:function(){p.execCommand("WP_More","more")}}),p.addMenuItem("wp_page",{text:"Page break",icon:"wp_page",context:"insert",onclick:function(){p.execCommand("WP_More","nextpage")}}),p.on("BeforeExecCommand",function(e){!k.Env.webkit||"InsertUnorderedList"!==e.command&&"InsertOrderedList"!==e.command||(t=t||p.dom.create("style",{type:"text/css"},"#tinymce,#tinymce span,#tinymce li,#tinymce li>span,#tinymce p,#tinymce p>span{font:medium sans-serif;color:#000;line-height:normal;}"),p.getDoc().head.appendChild(t))}),p.on("ExecCommand",function(e){k.Env.webkit&&t&&("InsertUnorderedList"===e.command||"InsertOrderedList"===e.command)&&p.dom.remove(t)}),p.on("init",function(){var e=k.Env,t=["mceContentBody"],n=p.getDoc(),o=p.dom;e.iOS&&o.addClass(n.documentElement,"ios"),"rtl"===p.getParam("directionality")&&(t.push("rtl"),o.setAttrib(n.documentElement,"dir","rtl")),o.setAttrib(n.documentElement,"lang",p.getParam("wp_lang_attr")),e.ie?9===parseInt(e.ie,10)?t.push("ie9"):8===parseInt(e.ie,10)?t.push("ie8"):e.ie<8&&t.push("ie7"):e.webkit&&t.push("webkit"),t.push("wp-editor"),m(t,function(e){e&&o.addClass(n.body,e)}),p.on("BeforeSetContent",function(e){e.content&&(e.content=e.content.replace(/<p>\s*<(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre)( [^>]*)?>/gi,"<$1$2>").replace(/<\/(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre)>\s*<\/p>/gi,"</$1>"))}),i&&i(function(){i(document).triggerHandler("tinymce-editor-init",[p])}),window.tinyMCEPreInit&&window.tinyMCEPreInit.dragDropUpload&&o.bind(n,"dragstart dragend dragover drop",function(e){i&&i(document).trigger(new i.Event(e))}),p.getParam("wp_paste_filters",!0)&&(p.on("PastePreProcess",function(e){e.content=e.content.replace(/<br class="?Apple-interchange-newline"?>/gi,""),k.Env.webkit||(e.content=e.content.replace(/(<[^>]+) style="[^"]*"([^>]*>)/gi,"$1$2"),e.content=e.content.replace(/(<[^>]+) data-mce-style=([^>]+>)/gi,"$1 style=$2"))}),p.on("PastePostProcess",function(e){p.$("p",e.node).each(function(e,t){o.isEmpty(t)&&o.remove(t)}),k.isIE&&p.$("a",e.node).find("font, u").each(function(e,t){o.remove(t,!0)})}))}),p.on("SaveContent",function(e){!p.inline&&p.isHidden()?e.content=e.element.value:(e.content=e.content.replace(/<p>(?:<br ?\/?>|\u00a0|\uFEFF| )*<\/p>/g,"<p>&nbsp;</p>"),e.content=r?o.editor.removep(e.content):e.content.replace(/-->\s*<!-- wp:/g,"--\x3e\n\n\x3c!-- wp:"))}),p.on("preInit",function(){p.schema.addValidElements("@[id|accesskey|class|dir|lang|style|tabindex|title|contenteditable|draggable|dropzone|hidden|spellcheck|translate],i,b,script[src|async|defer|type|charset|crossorigin|integrity]"),k.Env.iOS&&(p.settings.height=300),m({c:"JustifyCenter",r:"JustifyRight",l:"JustifyLeft",j:"JustifyFull",q:"mceBlockQuote",u:"InsertUnorderedList",o:"InsertOrderedList",m:"WP_Medialib",t:"WP_More",d:"Strikethrough",p:"WP_Page",x:"WP_Code"},function(e,t){p.shortcuts.add("access+"+t,"",e)}),p.addShortcut("meta+s","",function(){o&&o.autosave&&o.autosave.server.triggerSave()}),p.settings.classic_block_editor||p.addShortcut("access+z","","WP_Adv"),p.on("keydown",function(e){var t=k.Env.mac?e.ctrlKey&&e.altKey&&"KeyH"===e.code:e.shiftKey&&e.altKey&&"KeyH"===e.code;return!t||(p.execCommand("WP_Help"),e.stopPropagation(),e.stopImmediatePropagation(),!1)}),1<window.getUserSetting("editor_plain_text_paste_warning")&&(p.settings.paste_plaintext_inform=!1),k.Env.mac&&k.$(p.iframeElement).attr("title",u("Rich Text Area. Press Control-Option-H for help."))}),p.on("PastePlainTextToggle",function(e){!0===e.state&&(e=parseInt(window.getUserSetting("editor_plain_text_paste_warning"),10)||0)<2&&window.setUserSetting("editor_plain_text_paste_warning",++e)}),p.on("beforerenderui",function(){p.theme.panel&&(m(["button","colorbutton","splitbutton"],function(e){(e=p.theme.panel.find(e))&&m(e,function(e){var t;e&&e.settings.tooltip&&(t=d(e.settings.tooltip),e.settings.tooltip=t,e._aria)&&e._aria.label&&(e._aria.label=t)})}),m(p.theme.panel.find("listbox"),function(e){e&&"Paragraph"===e.settings.text&&m(e.settings.values,function(e){e.text&&s.hasOwnProperty(e.text)&&(e.shortcut="("+s[e.text]+")")})}))}),p.on("preinit",function(){var n,v,t,_,y,P,o,r=k.ui.Factory,s=p.settings,e=p.getContainer(),x=document.getElementById("wpadminbar"),C=document.getElementById(p.id+"_ifr");function i(e){if(n)if(n.tempHide||"hide"===e.type||"blur"===e.type)n.hide(),n=!1;else if(("resizewindow"===e.type||"scrollwindow"===e.type||"resize"===e.type||"scroll"===e.type)&&!n.blockHide){if("resize"===e.type||"resizewindow"===e.type){if(e=(e=p.getWin()).innerHeight+e.innerWidth,!(o=o&&2e3<(new Date).getTime()-o.timestamp?null:o))return void(o={timestamp:(new Date).getTime(),size:e});if(e&&Math.abs(e-o.size)<2)return}clearTimeout(t),t=setTimeout(function(){n&&"function"==typeof n.show&&(n.scrolling=!1,n.show())},250),n.scrolling=!0,n.hide()}}e&&(_=k.$(".mce-toolbar-grp",e)[0],y=k.$(".mce-statusbar",e)[0]),"content"===p.id&&(P=document.getElementById("post-status-info")),p.shortcuts.add("alt+119","",function(){var e;n&&(e=n.find("toolbar")[0])&&e.focus(!0)}),p.on("nodechange",function(e){var t=p.selection.isCollapsed(),e={element:e.element,parents:e.parents,collapsed:t};p.fire("wptoolbar",e),v=e.selection||e.element,n&&n!==e.toolbar&&n.hide(),e.toolbar?(n=e.toolbar).visible()?n.reposition():n.show():n=!1}),p.on("focus",function(){n&&n.show()}),p.inline?(p.on("resizewindow",i),document.addEventListener("scroll",i,!0)):(p.dom.bind(p.getWin(),"resize scroll",i),p.on("resizewindow scrollwindow",i)),p.on("remove",function(){document.removeEventListener("scroll",i,!0),p.off("resizewindow scrollwindow",i),p.dom.unbind(p.getWin(),"resize scroll",i)}),p.on("blur hide",i),p.wp=p.wp||{},p.wp._createToolbar=function(e,t){var n,o,a=[];return m(e,function(i){var t,e;function n(){var e=p.selection;"bullist"===t&&e.selectorChanged("ul > li",function(e,t){for(var n,o=t.parents.length;o--&&"OL"!==(n=t.parents[o].nodeName)&&"UL"!=n;);i.active(e&&"UL"===n)}),"numlist"===t&&e.selectorChanged("ol > li",function(e,t){for(var n,o=t.parents.length;o--&&"OL"!==(n=t.parents[o].nodeName)&&"UL"!==n;);i.active(e&&"OL"===n)}),i.settings.stateSelector&&e.selectorChanged(i.settings.stateSelector,function(e){i.active(e)},!0),i.settings.disabledStateSelector&&e.selectorChanged(i.settings.disabledStateSelector,function(e){i.disabled(e)})}"|"===i?o=null:r.has(i)?(i={type:i},s.toolbar_items_size&&(i.size=s.toolbar_items_size),a.push(i),o=null):(o||(o={type:"buttongroup",items:[]},a.push(o)),p.buttons[i]&&(t=i,(i="function"==typeof(i=p.buttons[t])?i():i).type=i.type||"button",s.toolbar_items_size&&(i.size=s.toolbar_items_size),(e=i.tooltip||i.title)&&(i.tooltip=d(e)),i=r.create(i),o.items.push(i),p.initialized?n():p.on("init",n)))}),(n=r.create({type:"panel",layout:"stack",classes:"toolbar-grp inline-toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:[{type:"toolbar",layout:"flow",items:a}]})).bottom=t,n.on("show",function(){this.reposition()}),n.on("keydown",function(e){27===e.keyCode&&(this.hide(),p.focus())}),p.on("remove",function(){n.remove()}),n.reposition=function(){var e,t,n,o,i,a,r,s,d,l,c,p,m,u,g,h,f,w,b;return v&&(e=window.pageXOffset||document.documentElement.scrollLeft,t=window.pageYOffset||document.documentElement.scrollTop,n=window.innerWidth,u=window.innerHeight,o=C?C.getBoundingClientRect():{top:0,right:n,bottom:u,left:0,width:n,height:u},a=(i=this.getEl()).offsetWidth,r=i.clientHeight,d=((s=v.getBoundingClientRect()).left+s.right)/2,l=r+5,c=x?x.getBoundingClientRect().bottom:0,b=_?_.getBoundingClientRect().bottom:0,p=y?u-y.getBoundingClientRect().top:0,m=P?u-P.getBoundingClientRect().top:0,c=Math.max(0,c,b,o.top),b=Math.max(0,p,m,u-o.bottom),p=s.top+o.top-c,m=u-o.top-s.bottom-b,g="",f=h=0,(u=u-c-b)<=p||u<=m?(this.scrolling=!0,this.hide(),this.scrolling=!1):(k.Env.iOS&&"IMG"===v.nodeName&&(h=54,f=46),this.bottom?l<=m?(g=" mce-arrow-up",w=s.bottom+o.top+t-f):l<=p&&(g=" mce-arrow-down",w=s.top+o.top+t-r+h):l<=p?(g=" mce-arrow-down",w=s.top+o.top+t-r+h):l<=m&&u/2>s.bottom+o.top-c&&(g=" mce-arrow-up",w=s.bottom+o.top+t-f),void 0===w&&(w=t+c+5+f),b=d-a/2+o.left+e,s.left<0||s.right>o.width?b=o.left+e+(o.width-a)/2:n<=a?(g+=" mce-arrow-full",b=0):b<0&&s.left+a>n||n<b+a&&s.right-a<0?b=(n-a)/2:b<o.left+e?(g+=" mce-arrow-left",b=s.left+o.left+e):b+a>o.width+o.left+e&&(g+=" mce-arrow-right",b=s.right-a+o.left+e),k.Env.iOS&&"IMG"===v.nodeName&&(g=g.replace(/ ?mce-arrow-(up|down)/g,"")),i.className=i.className.replace(/ ?mce-arrow-[\w]+/g,"")+g,E.setStyles(i,{left:b,top:w}))),this},n.hide().renderTo(document.body),n}},!0),{_showButtons:n,_hideButtons:n,_setEmbed:n,_getEmbed:n}})}(window.tinymce);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         tinymce/plugins/wpautoresize/plugin.js                                                              0000644                 00000013544 15212564050 0014301 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * plugin.js
 *
 * Copyright, Moxiecode Systems AB
 * Released under LGPL License.
 *
 * License: http://www.tinymce.com/license
 * Contributing: http://www.tinymce.com/contributing
 */

// Forked for WordPress so it can be turned on/off after loading.

/*global tinymce:true */
/*eslint no-nested-ternary:0 */

/**
 * Auto Resize
 *
 * This plugin automatically resizes the content area to fit its content height.
 * It will retain a minimum height, which is the height of the content area when
 * it's initialized.
 */
tinymce.PluginManager.add( 'wpautoresize', function( editor ) {
	var settings = editor.settings,
		oldSize = 300,
		isActive = false;

	if ( editor.settings.inline || tinymce.Env.iOS ) {
		return;
	}

	function isFullscreen() {
		return editor.plugins.fullscreen && editor.plugins.fullscreen.isFullscreen();
	}

	function getInt( n ) {
		return parseInt( n, 10 ) || 0;
	}

	/**
	 * This method gets executed each time the editor needs to resize.
	 */
	function resize( e ) {
		var deltaSize, doc, body, docElm, DOM = tinymce.DOM, resizeHeight, myHeight,
			marginTop, marginBottom, paddingTop, paddingBottom, borderTop, borderBottom;

		if ( ! isActive ) {
			return;
		}

		doc = editor.getDoc();
		if ( ! doc ) {
			return;
		}

		e = e || {};
		body = doc.body;
		docElm = doc.documentElement;
		resizeHeight = settings.autoresize_min_height;

		if ( ! body || ( e && e.type === 'setcontent' && e.initial ) || isFullscreen() ) {
			if ( body && docElm ) {
				body.style.overflowY = 'auto';
				docElm.style.overflowY = 'auto'; // Old IE.
			}

			return;
		}

		// Calculate outer height of the body element using CSS styles.
		marginTop = editor.dom.getStyle( body, 'margin-top', true );
		marginBottom = editor.dom.getStyle( body, 'margin-bottom', true );
		paddingTop = editor.dom.getStyle( body, 'padding-top', true );
		paddingBottom = editor.dom.getStyle( body, 'padding-bottom', true );
		borderTop = editor.dom.getStyle( body, 'border-top-width', true );
		borderBottom = editor.dom.getStyle( body, 'border-bottom-width', true );
		myHeight = body.offsetHeight + getInt( marginTop ) + getInt( marginBottom ) +
			getInt( paddingTop ) + getInt( paddingBottom ) +
			getInt( borderTop ) + getInt( borderBottom );

		// IE < 11, other?
		if ( myHeight && myHeight < docElm.offsetHeight ) {
			myHeight = docElm.offsetHeight;
		}

		// Make sure we have a valid height.
		if ( isNaN( myHeight ) || myHeight <= 0 ) {
			// Get height differently depending on the browser used.
			myHeight = tinymce.Env.ie ? body.scrollHeight : ( tinymce.Env.webkit && body.clientHeight === 0 ? 0 : body.offsetHeight );
		}

		// Don't make it smaller than the minimum height.
		if ( myHeight > settings.autoresize_min_height ) {
			resizeHeight = myHeight;
		}

		// If a maximum height has been defined don't exceed this height.
		if ( settings.autoresize_max_height && myHeight > settings.autoresize_max_height ) {
			resizeHeight = settings.autoresize_max_height;
			body.style.overflowY = 'auto';
			docElm.style.overflowY = 'auto'; // Old IE.
		} else {
			body.style.overflowY = 'hidden';
			docElm.style.overflowY = 'hidden'; // Old IE.
			body.scrollTop = 0;
		}

		// Resize content element.
		if (resizeHeight !== oldSize) {
			deltaSize = resizeHeight - oldSize;
			DOM.setStyle( editor.iframeElement, 'height', resizeHeight + 'px' );
			oldSize = resizeHeight;

			// WebKit doesn't decrease the size of the body element until the iframe gets resized.
			// So we need to continue to resize the iframe down until the size gets fixed.
			if ( tinymce.isWebKit && deltaSize < 0 ) {
				resize( e );
			}

			editor.fire( 'wp-autoresize', { height: resizeHeight, deltaHeight: e.type === 'nodechange' ? deltaSize : null } );
		}
	}

	/**
	 * Calls the resize x times in 100ms intervals. We can't wait for load events since
	 * the CSS files might load async.
	 */
	function wait( times, interval, callback ) {
		setTimeout( function() {
			resize();

			if ( times-- ) {
				wait( times, interval, callback );
			} else if ( callback ) {
				callback();
			}
		}, interval );
	}

	// Define minimum height.
	settings.autoresize_min_height = parseInt(editor.getParam( 'autoresize_min_height', editor.getElement().offsetHeight), 10 );

	// Define maximum height.
	settings.autoresize_max_height = parseInt(editor.getParam( 'autoresize_max_height', 0), 10 );

	function on() {
		if ( ! editor.dom.hasClass( editor.getBody(), 'wp-autoresize' ) ) {
			isActive = true;
			editor.dom.addClass( editor.getBody(), 'wp-autoresize' );
			// Add appropriate listeners for resizing the content area.
			editor.on( 'nodechange setcontent keyup FullscreenStateChanged', resize );
			resize();
		}
	}

	function off() {
		var doc;

		// Don't turn off if the setting is 'on'.
		if ( ! settings.wp_autoresize_on ) {
			isActive = false;
			doc = editor.getDoc();
			editor.dom.removeClass( editor.getBody(), 'wp-autoresize' );
			editor.off( 'nodechange setcontent keyup FullscreenStateChanged', resize );
			doc.body.style.overflowY = 'auto';
			doc.documentElement.style.overflowY = 'auto'; // Old IE.
			oldSize = 0;
		}
	}

	if ( settings.wp_autoresize_on ) {
		// Turn resizing on when the editor loads.
		isActive = true;

		editor.on( 'init', function() {
			editor.dom.addClass( editor.getBody(), 'wp-autoresize' );
		});

		editor.on( 'nodechange keyup FullscreenStateChanged', resize );

		editor.on( 'setcontent', function() {
			wait( 3, 100 );
		});

		if ( editor.getParam( 'autoresize_on_init', true ) ) {
			editor.on( 'init', function() {
				// Hit it 10 times in 200 ms intervals.
				wait( 10, 200, function() {
					// Hit it 5 times in 1 sec intervals.
					wait( 5, 1000 );
				});
			});
		}
	}

	// Reset the stored size.
	editor.on( 'show', function() {
		oldSize = 0;
	});

	// Register the command.
	editor.addCommand( 'wpAutoResize', resize );

	// On/off.
	editor.addCommand( 'wpAutoResizeOn', on );
	editor.addCommand( 'wpAutoResizeOff', off );
});
                                                                                                                                                            tinymce/plugins/wpautoresize/plugin.min.js                                                          0000644                 00000004450 15212564050 0015057 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       tinymce.PluginManager.add("wpautoresize",function(g){var m=g.settings,h=300,c=!1;function f(e){return parseInt(e,10)||0}function y(e){var t,o,n,i,a,s,l,u,r,d=tinymce.DOM;c&&(o=g.getDoc())&&(e=e||{},t=o.body,o=o.documentElement,n=m.autoresize_min_height,!t||e&&"setcontent"===e.type&&e.initial||g.plugins.fullscreen&&g.plugins.fullscreen.isFullscreen()?t&&o&&(t.style.overflowY="auto",o.style.overflowY="auto"):(i=g.dom.getStyle(t,"margin-top",!0),a=g.dom.getStyle(t,"margin-bottom",!0),s=g.dom.getStyle(t,"padding-top",!0),l=g.dom.getStyle(t,"padding-bottom",!0),u=g.dom.getStyle(t,"border-top-width",!0),r=g.dom.getStyle(t,"border-bottom-width",!0),(i=t.offsetHeight+f(i)+f(a)+f(s)+f(l)+f(u)+f(r))&&i<o.offsetHeight&&(i=o.offsetHeight),(i=isNaN(i)||i<=0?tinymce.Env.ie?t.scrollHeight:tinymce.Env.webkit&&0===t.clientHeight?0:t.offsetHeight:i)>m.autoresize_min_height&&(n=i),m.autoresize_max_height&&i>m.autoresize_max_height?(n=m.autoresize_max_height,t.style.overflowY="auto",o.style.overflowY="auto"):(t.style.overflowY="hidden",o.style.overflowY="hidden",t.scrollTop=0),n!==h&&(a=n-h,d.setStyle(g.iframeElement,"height",n+"px"),h=n,tinymce.isWebKit&&a<0&&y(e),g.fire("wp-autoresize",{height:n,deltaHeight:"nodechange"===e.type?a:null}))))}function n(e,t,o){setTimeout(function(){y(),e--?n(e,t,o):o&&o()},t)}g.settings.inline||tinymce.Env.iOS||(m.autoresize_min_height=parseInt(g.getParam("autoresize_min_height",g.getElement().offsetHeight),10),m.autoresize_max_height=parseInt(g.getParam("autoresize_max_height",0),10),m.wp_autoresize_on&&(c=!0,g.on("init",function(){g.dom.addClass(g.getBody(),"wp-autoresize")}),g.on("nodechange keyup FullscreenStateChanged",y),g.on("setcontent",function(){n(3,100)}),g.getParam("autoresize_on_init",!0))&&g.on("init",function(){n(10,200,function(){n(5,1e3)})}),g.on("show",function(){h=0}),g.addCommand("wpAutoResize",y),g.addCommand("wpAutoResizeOn",function(){g.dom.hasClass(g.getBody(),"wp-autoresize")||(c=!0,g.dom.addClass(g.getBody(),"wp-autoresize"),g.on("nodechange setcontent keyup FullscreenStateChanged",y),y())}),g.addCommand("wpAutoResizeOff",function(){var e;m.wp_autoresize_on||(c=!1,e=g.getDoc(),g.dom.removeClass(g.getBody(),"wp-autoresize"),g.off("nodechange setcontent keyup FullscreenStateChanged",y),e.body.style.overflowY="auto",e.documentElement.style.overflowY="auto",h=0)}))});                                                                                                                                                                                                                        tinymce/plugins/wpdialogs/plugin.js                                                                 0000644                 00000004607 15212564050 0013531 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /* global tinymce */
/**
 * Included for back-compat.
 * The default WindowManager in TinyMCE 4.0 supports three types of dialogs:
 *	- With HTML created from JS.
 *	- With inline HTML (like WPWindowManager).
 *	- Old type iframe based dialogs.
 * For examples see the default plugins: https://github.com/tinymce/tinymce/tree/master/js/tinymce/plugins
 */
tinymce.WPWindowManager = tinymce.InlineWindowManager = function( editor ) {
	if ( this.wp ) {
		return this;
	}

	this.wp = {};
	this.parent = editor.windowManager;
	this.editor = editor;

	tinymce.extend( this, this.parent );

	this.open = function( args, params ) {
		var $element,
			self = this,
			wp = this.wp;

		if ( ! args.wpDialog ) {
			return this.parent.open.apply( this, arguments );
		} else if ( ! args.id ) {
			return;
		}

		if ( typeof jQuery === 'undefined' || ! jQuery.wp || ! jQuery.wp.wpdialog ) {
			// wpdialog.js is not loaded.
			if ( window.console && window.console.error ) {
				window.console.error('wpdialog.js is not loaded. Please set "wpdialogs" as dependency for your script when calling wp_enqueue_script(). You may also want to enqueue the "wp-jquery-ui-dialog" stylesheet.');
			}

			return;
		}

		wp.$element = $element = jQuery( '#' + args.id );

		if ( ! $element.length ) {
			return;
		}

		if ( window.console && window.console.log ) {
			window.console.log('tinymce.WPWindowManager is deprecated. Use the default editor.windowManager to open dialogs with inline HTML.');
		}

		wp.features = args;
		wp.params = params;

		// Store selection. Takes a snapshot in the FocusManager of the selection before focus is moved to the dialog.
		editor.nodeChanged();

		// Create the dialog if necessary.
		if ( ! $element.data('wpdialog') ) {
			$element.wpdialog({
				title: args.title,
				width: args.width,
				height: args.height,
				modal: true,
				dialogClass: 'wp-dialog',
				zIndex: 300000
			});
		}

		$element.wpdialog('open');

		$element.on( 'wpdialogclose', function() {
			if ( self.wp.$element ) {
				self.wp = {};
			}
		});
	};

	this.close = function() {
		if ( ! this.wp.features || ! this.wp.features.wpDialog ) {
			return this.parent.close.apply( this, arguments );
		}

		this.wp.$element.wpdialog('close');
	};
};

tinymce.PluginManager.add( 'wpdialogs', function( editor ) {
	// Replace window manager.
	editor.on( 'init', function() {
		editor.windowManager = new tinymce.WPWindowManager( editor );
	});
});
                                                                                                                         tinymce/plugins/wpdialogs/plugin.min.js                                                             0000644                 00000002452 15212564050 0014307 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       tinymce.WPWindowManager=tinymce.InlineWindowManager=function(a){if(this.wp)return this;this.wp={},this.parent=a.windowManager,this.editor=a,tinymce.extend(this,this.parent),this.open=function(e,i){var n,o=this,t=this.wp;if(!e.wpDialog)return this.parent.open.apply(this,arguments);e.id&&("undefined"!=typeof jQuery&&jQuery.wp&&jQuery.wp.wpdialog?(t.$element=n=jQuery("#"+e.id),n.length&&(window.console&&window.console.log&&window.console.log("tinymce.WPWindowManager is deprecated. Use the default editor.windowManager to open dialogs with inline HTML."),t.features=e,t.params=i,a.nodeChanged(),n.data("wpdialog")||n.wpdialog({title:e.title,width:e.width,height:e.height,modal:!0,dialogClass:"wp-dialog",zIndex:3e5}),n.wpdialog("open"),n.on("wpdialogclose",function(){o.wp.$element&&(o.wp={})}))):window.console&&window.console.error&&window.console.error('wpdialog.js is not loaded. Please set "wpdialogs" as dependency for your script when calling wp_enqueue_script(). You may also want to enqueue the "wp-jquery-ui-dialog" stylesheet.'))},this.close=function(){if(!this.wp.features||!this.wp.features.wpDialog)return this.parent.close.apply(this,arguments);this.wp.$element.wpdialog("close")}},tinymce.PluginManager.add("wpdialogs",function(e){e.on("init",function(){e.windowManager=new tinymce.WPWindowManager(e)})});                                                                                                                                                                                                                      tinymce/plugins/wpeditimage/plugin.js                                                               0000644                 00000062052 15212564050 0014035 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /* global tinymce */
tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
	var toolbar, serializer, touchOnImage, pasteInCaption,
		each = tinymce.each,
		trim = tinymce.trim,
		iOS = tinymce.Env.iOS;

	function isPlaceholder( node ) {
		return !! ( editor.dom.getAttrib( node, 'data-mce-placeholder' ) || editor.dom.getAttrib( node, 'data-mce-object' ) );
	}

	editor.addButton( 'wp_img_remove', {
		tooltip: 'Remove',
		icon: 'dashicon dashicons-no',
		onclick: function() {
			removeImage( editor.selection.getNode() );
		}
	} );

	editor.addButton( 'wp_img_edit', {
		tooltip: 'Edit|button', // '|button' is not displayed, only used for context.
		icon: 'dashicon dashicons-edit',
		onclick: function() {
			editImage( editor.selection.getNode() );
		}
	} );

	each( {
		alignleft: 'Align left',
		aligncenter: 'Align center',
		alignright: 'Align right',
		alignnone: 'No alignment'
	}, function( tooltip, name ) {
		var direction = name.slice( 5 );

		editor.addButton( 'wp_img_' + name, {
			tooltip: tooltip,
			icon: 'dashicon dashicons-align-' + direction,
			cmd: 'alignnone' === name ? 'wpAlignNone' : 'Justify' + direction.slice( 0, 1 ).toUpperCase() + direction.slice( 1 ),
			onPostRender: function() {
				var self = this;

				editor.on( 'NodeChange', function( event ) {
					var node;

					// Don't bother.
					if ( event.element.nodeName !== 'IMG' ) {
						return;
					}

					node = editor.dom.getParent( event.element, '.wp-caption' ) || event.element;

					if ( 'alignnone' === name ) {
						self.active( ! /\balign(left|center|right)\b/.test( node.className ) );
					} else {
						self.active( editor.dom.hasClass( node, name ) );
					}
				} );
			}
		} );
	} );

	editor.once( 'preinit', function() {
		if ( editor.wp && editor.wp._createToolbar ) {
			toolbar = editor.wp._createToolbar( [
				'wp_img_alignleft',
				'wp_img_aligncenter',
				'wp_img_alignright',
				'wp_img_alignnone',
				'wp_img_edit',
				'wp_img_remove'
			] );
		}
	} );

	editor.on( 'wptoolbar', function( event ) {
		if ( event.element.nodeName === 'IMG' && ! isPlaceholder( event.element ) ) {
			event.toolbar = toolbar;
		}
	} );

	function isNonEditable( node ) {
		var parent = editor.$( node ).parents( '[contenteditable]' );
		return parent && parent.attr( 'contenteditable' ) === 'false';
	}

	// Safari on iOS fails to select images in contentEditoble mode on touch.
	// Select them again.
	if ( iOS ) {
		editor.on( 'init', function() {
			editor.on( 'touchstart', function( event ) {
				if ( event.target.nodeName === 'IMG' && ! isNonEditable( event.target ) ) {
					touchOnImage = true;
				}
			});

			editor.dom.bind( editor.getDoc(), 'touchmove', function() {
				touchOnImage = false;
			});

			editor.on( 'touchend', function( event ) {
				if ( touchOnImage && event.target.nodeName === 'IMG' && ! isNonEditable( event.target ) ) {
					var node = event.target;

					touchOnImage = false;

					window.setTimeout( function() {
						editor.selection.select( node );
						editor.nodeChanged();
					}, 100 );
				} else if ( toolbar ) {
					toolbar.hide();
				}
			});
		});
	}

	function parseShortcode( content ) {
		return content.replace( /(?:<p>)?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?/g, function( a, b, c ) {
			var id, align, classes, caption, img, width;

			id = b.match( /id=['"]([^'"]*)['"] ?/ );
			if ( id ) {
				b = b.replace( id[0], '' );
			}

			align = b.match( /align=['"]([^'"]*)['"] ?/ );
			if ( align ) {
				b = b.replace( align[0], '' );
			}

			classes = b.match( /class=['"]([^'"]*)['"] ?/ );
			if ( classes ) {
				b = b.replace( classes[0], '' );
			}

			width = b.match( /width=['"]([0-9]*)['"] ?/ );
			if ( width ) {
				b = b.replace( width[0], '' );
			}

			c = trim( c );
			img = c.match( /((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)([\s\S]*)/i );

			if ( img && img[2] ) {
				caption = trim( img[2] );
				img = trim( img[1] );
			} else {
				// Old captions shortcode style.
				caption = trim( b ).replace( /caption=['"]/, '' ).replace( /['"]$/, '' );
				img = c;
			}

			id = ( id && id[1] ) ? id[1].replace( /[<>&]+/g,  '' ) : '';
			align = ( align && align[1] ) ? align[1] : 'alignnone';
			classes = ( classes && classes[1] ) ? ' ' + classes[1].replace( /[<>&]+/g,  '' ) : '';

			if ( ! width && img ) {
				width = img.match( /width=['"]([0-9]*)['"]/ );
			}

			if ( width && width[1] ) {
				width = width[1];
			}

			if ( ! width || ! caption ) {
				return c;
			}

			width = parseInt( width, 10 );
			if ( ! editor.getParam( 'wpeditimage_html5_captions' ) ) {
				width += 10;
			}

			return '<div class="mceTemp"><dl id="' + id + '" class="wp-caption ' + align + classes + '" style="width: ' + width + 'px">' +
				'<dt class="wp-caption-dt">'+ img +'</dt><dd class="wp-caption-dd">'+ caption +'</dd></dl></div>';
		});
	}

	function getShortcode( content ) {
		return content.replace( /(?:<div [^>]+mceTemp[^>]+>)?\s*(<dl [^>]+wp-caption[^>]+>[\s\S]+?<\/dl>)\s*(?:<\/div>)?/g, function( all, dl ) {
			var out = '';

			if ( dl.indexOf('<img ') === -1 || dl.indexOf('</p>') !== -1 ) {
				// Broken caption. The user managed to drag the image out or type in the wrapper div?
				// Remove the <dl>, <dd> and <dt> and return the remaining text.
				return dl.replace( /<d[ldt]( [^>]+)?>/g, '' ).replace( /<\/d[ldt]>/g, '' );
			}

			out = dl.replace( /\s*<dl ([^>]+)>\s*<dt [^>]+>([\s\S]+?)<\/dt>\s*<dd [^>]+>([\s\S]*?)<\/dd>\s*<\/dl>\s*/gi, function( a, b, c, caption ) {
				var id, classes, align, width;

				width = c.match( /width="([0-9]*)"/ );
				width = ( width && width[1] ) ? width[1] : '';

				classes = b.match( /class="([^"]*)"/ );
				classes = ( classes && classes[1] ) ? classes[1] : '';
				align = classes.match( /align[a-z]+/i ) || 'alignnone';

				if ( ! width || ! caption ) {
					if ( 'alignnone' !== align[0] ) {
						c = c.replace( /><img/, ' class="' + align[0] + '"><img' );
					}
					return c;
				}

				id = b.match( /id="([^"]*)"/ );
				id = ( id && id[1] ) ? id[1] : '';

				classes = classes.replace( /wp-caption ?|align[a-z]+ ?/gi, '' );

				if ( classes ) {
					classes = ' class="' + classes + '"';
				}

				caption = caption.replace( /\r\n|\r/g, '\n' ).replace( /<[a-zA-Z0-9]+( [^<>]+)?>/g, function( a ) {
					// No line breaks inside HTML tags.
					return a.replace( /[\r\n\t]+/, ' ' );
				});

				// Convert remaining line breaks to <br>.
				caption = caption.replace( /\s*\n\s*/g, '<br />' );

				return '[caption id="' + id + '" align="' + align + '" width="' + width + '"' + classes + ']' + c + ' ' + caption + '[/caption]';
			});

			if ( out.indexOf('[caption') === -1 ) {
				// The caption html seems broken, try to find the image that may be wrapped in a link
				// and may be followed by <p> with the caption text.
				out = dl.replace( /[\s\S]*?((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)(<p>[\s\S]*<\/p>)?[\s\S]*/gi, '<p>$1</p>$2' );
			}

			return out;
		});
	}

	function extractImageData( imageNode ) {
		var classes, extraClasses, metadata, captionBlock, caption, link, width, height,
			captionClassName = [],
			dom = editor.dom,
			isIntRegExp = /^\d+$/;

		// Default attributes.
		metadata = {
			attachment_id: false,
			size: 'custom',
			caption: '',
			align: 'none',
			extraClasses: '',
			link: false,
			linkUrl: '',
			linkClassName: '',
			linkTargetBlank: false,
			linkRel: '',
			title: ''
		};

		metadata.url = dom.getAttrib( imageNode, 'src' );
		metadata.alt = dom.getAttrib( imageNode, 'alt' );
		metadata.title = dom.getAttrib( imageNode, 'title' );

		width = dom.getAttrib( imageNode, 'width' );
		height = dom.getAttrib( imageNode, 'height' );

		if ( ! isIntRegExp.test( width ) || parseInt( width, 10 ) < 1 ) {
			width = imageNode.naturalWidth || imageNode.width;
		}

		if ( ! isIntRegExp.test( height ) || parseInt( height, 10 ) < 1 ) {
			height = imageNode.naturalHeight || imageNode.height;
		}

		metadata.customWidth = metadata.width = width;
		metadata.customHeight = metadata.height = height;

		classes = tinymce.explode( imageNode.className, ' ' );
		extraClasses = [];

		tinymce.each( classes, function( name ) {

			if ( /^wp-image/.test( name ) ) {
				metadata.attachment_id = parseInt( name.replace( 'wp-image-', '' ), 10 );
			} else if ( /^align/.test( name ) ) {
				metadata.align = name.replace( 'align', '' );
			} else if ( /^size/.test( name ) ) {
				metadata.size = name.replace( 'size-', '' );
			} else {
				extraClasses.push( name );
			}

		} );

		metadata.extraClasses = extraClasses.join( ' ' );

		// Extract caption.
		captionBlock = dom.getParents( imageNode, '.wp-caption' );

		if ( captionBlock.length ) {
			captionBlock = captionBlock[0];

			classes = captionBlock.className.split( ' ' );
			tinymce.each( classes, function( name ) {
				if ( /^align/.test( name ) ) {
					metadata.align = name.replace( 'align', '' );
				} else if ( name && name !== 'wp-caption' ) {
					captionClassName.push( name );
				}
			} );

			metadata.captionClassName = captionClassName.join( ' ' );

			caption = dom.select( 'dd.wp-caption-dd', captionBlock );
			if ( caption.length ) {
				caption = caption[0];

				metadata.caption = editor.serializer.serialize( caption )
					.replace( /<br[^>]*>/g, '$&\n' ).replace( /^<p>/, '' ).replace( /<\/p>$/, '' );
			}
		}

		// Extract linkTo.
		if ( imageNode.parentNode && imageNode.parentNode.nodeName === 'A' ) {
			link = imageNode.parentNode;
			metadata.linkUrl = dom.getAttrib( link, 'href' );
			metadata.linkTargetBlank = dom.getAttrib( link, 'target' ) === '_blank' ? true : false;
			metadata.linkRel = dom.getAttrib( link, 'rel' );
			metadata.linkClassName = link.className;
		}

		return metadata;
	}

	function hasTextContent( node ) {
		return node && !! ( node.textContent || node.innerText ).replace( /\ufeff/g, '' );
	}

	// Verify HTML in captions.
	function verifyHTML( caption ) {
		if ( ! caption || ( caption.indexOf( '<' ) === -1 && caption.indexOf( '>' ) === -1 ) ) {
			return caption;
		}

		if ( ! serializer ) {
			serializer = new tinymce.html.Serializer( {}, editor.schema );
		}

		return serializer.serialize( editor.parser.parse( caption, { forced_root_block: false } ) );
	}

	function updateImage( $imageNode, imageData ) {
		var classes, className, node, html, parent, wrap, linkNode, imageNode,
			captionNode, dd, dl, id, attrs, linkAttrs, width, height, align,
			$imageNode, srcset, src,
			dom = editor.dom;

		if ( ! $imageNode || ! $imageNode.length ) {
			return;
		}

		imageNode = $imageNode[0];
		classes = tinymce.explode( imageData.extraClasses, ' ' );

		if ( ! classes ) {
			classes = [];
		}

		if ( ! imageData.caption ) {
			classes.push( 'align' + imageData.align );
		}

		if ( imageData.attachment_id ) {
			classes.push( 'wp-image-' + imageData.attachment_id );
			if ( imageData.size && imageData.size !== 'custom' ) {
				classes.push( 'size-' + imageData.size );
			}
		}

		width = imageData.width;
		height = imageData.height;

		if ( imageData.size === 'custom' ) {
			width = imageData.customWidth;
			height = imageData.customHeight;
		}

		attrs = {
			src: imageData.url,
			width: width || null,
			height: height || null,
			title: imageData.title || null,
			'class': classes.join( ' ' ) || null
		};

		dom.setAttribs( imageNode, attrs );

		// Preserve empty alt attributes.
		$imageNode.attr( 'alt', imageData.alt || '' );

		linkAttrs = {
			href: imageData.linkUrl,
			rel: imageData.linkRel || null,
			target: imageData.linkTargetBlank ? '_blank': null,
			'class': imageData.linkClassName || null
		};

		if ( imageNode.parentNode && imageNode.parentNode.nodeName === 'A' && ! hasTextContent( imageNode.parentNode ) ) {
			// Update or remove an existing link wrapped around the image.
			if ( imageData.linkUrl ) {
				dom.setAttribs( imageNode.parentNode, linkAttrs );
			} else {
				dom.remove( imageNode.parentNode, true );
			}
		} else if ( imageData.linkUrl ) {
			if ( linkNode = dom.getParent( imageNode, 'a' ) ) {
				// The image is inside a link together with other nodes,
				// or is nested in another node, move it out.
				dom.insertAfter( imageNode, linkNode );
			}

			// Add link wrapped around the image.
			linkNode = dom.create( 'a', linkAttrs );
			imageNode.parentNode.insertBefore( linkNode, imageNode );
			linkNode.appendChild( imageNode );
		}

		captionNode = editor.dom.getParent( imageNode, '.mceTemp' );

		if ( imageNode.parentNode && imageNode.parentNode.nodeName === 'A' && ! hasTextContent( imageNode.parentNode ) ) {
			node = imageNode.parentNode;
		} else {
			node = imageNode;
		}

		if ( imageData.caption ) {
			imageData.caption = verifyHTML( imageData.caption );

			id = imageData.attachment_id ? 'attachment_' + imageData.attachment_id : null;
			align = 'align' + ( imageData.align || 'none' );
			className = 'wp-caption ' + align;

			if ( imageData.captionClassName ) {
				className += ' ' + imageData.captionClassName.replace( /[<>&]+/g,  '' );
			}

			if ( ! editor.getParam( 'wpeditimage_html5_captions' ) ) {
				width = parseInt( width, 10 );
				width += 10;
			}

			if ( captionNode ) {
				dl = dom.select( 'dl.wp-caption', captionNode );

				if ( dl.length ) {
					dom.setAttribs( dl, {
						id: id,
						'class': className,
						style: 'width: ' + width + 'px'
					} );
				}

				dd = dom.select( '.wp-caption-dd', captionNode );

				if ( dd.length ) {
					dom.setHTML( dd[0], imageData.caption );
				}

			} else {
				id = id ? 'id="'+ id +'" ' : '';

				// Should create a new function for generating the caption markup.
				html =  '<dl ' + id + 'class="' + className +'" style="width: '+ width +'px">' +
					'<dt class="wp-caption-dt"></dt><dd class="wp-caption-dd">'+ imageData.caption +'</dd></dl>';

				wrap = dom.create( 'div', { 'class': 'mceTemp' }, html );

				if ( parent = dom.getParent( node, 'p' ) ) {
					parent.parentNode.insertBefore( wrap, parent );
				} else {
					node.parentNode.insertBefore( wrap, node );
				}

				editor.$( wrap ).find( 'dt.wp-caption-dt' ).append( node );

				if ( parent && dom.isEmpty( parent ) ) {
					dom.remove( parent );
				}
			}
		} else if ( captionNode ) {
			// Remove the caption wrapper and place the image in new paragraph.
			parent = dom.create( 'p' );
			captionNode.parentNode.insertBefore( parent, captionNode );
			parent.appendChild( node );
			dom.remove( captionNode );
		}

		$imageNode = editor.$( imageNode );
		srcset = $imageNode.attr( 'srcset' );
		src = $imageNode.attr( 'src' );

		// Remove srcset and sizes if the image file was edited or the image was replaced.
		if ( srcset && src ) {
			src = src.replace( /[?#].*/, '' );

			if ( srcset.indexOf( src ) === -1 ) {
				$imageNode.attr( 'srcset', null ).attr( 'sizes', null );
			}
		}

		if ( wp.media.events ) {
			wp.media.events.trigger( 'editor:image-update', {
				editor: editor,
				metadata: imageData,
				image: imageNode
			} );
		}

		editor.nodeChanged();
	}

	function editImage( img ) {
		var frame, callback, metadata, imageNode;

		if ( typeof wp === 'undefined' || ! wp.media ) {
			editor.execCommand( 'mceImage' );
			return;
		}

		metadata = extractImageData( img );

		// Mark the image node so we can select it later.
		editor.$( img ).attr( 'data-wp-editing', 1 );

		// Manipulate the metadata by reference that is fed into the PostImage model used in the media modal.
		wp.media.events.trigger( 'editor:image-edit', {
			editor: editor,
			metadata: metadata,
			image: img
		} );

		frame = wp.media({
			frame: 'image',
			state: 'image-details',
			metadata: metadata
		} );

		wp.media.events.trigger( 'editor:frame-create', { frame: frame } );

		callback = function( imageData ) {
			editor.undoManager.transact( function() {
				updateImage( imageNode, imageData );
			} );
			frame.detach();
		};

		frame.state('image-details').on( 'update', callback );
		frame.state('replace-image').on( 'replace', callback );
		frame.on( 'close', function() {
			editor.focus();
			frame.detach();

			/*
			 * `close` fires first...
			 * To be able to update the image node, we need to find it here,
			 * and use it in the callback.
			 */
			imageNode = editor.$( 'img[data-wp-editing]' )
			imageNode.removeAttr( 'data-wp-editing' );
		});

		frame.open();
	}

	function removeImage( node ) {
		var wrap = editor.dom.getParent( node, 'div.mceTemp' );

		if ( ! wrap && node.nodeName === 'IMG' ) {
			wrap = editor.dom.getParent( node, 'a' );
		}

		if ( wrap ) {
			if ( wrap.nextSibling ) {
				editor.selection.select( wrap.nextSibling );
			} else if ( wrap.previousSibling ) {
				editor.selection.select( wrap.previousSibling );
			} else {
				editor.selection.select( wrap.parentNode );
			}

			editor.selection.collapse( true );
			editor.dom.remove( wrap );
		} else {
			editor.dom.remove( node );
		}

		editor.nodeChanged();
		editor.undoManager.add();
	}

	editor.on( 'init', function() {
		var dom = editor.dom,
			captionClass = editor.getParam( 'wpeditimage_html5_captions' ) ? 'html5-captions' : 'html4-captions';

		dom.addClass( editor.getBody(), captionClass );

		// Prevent IE11 from making dl.wp-caption resizable.
		if ( tinymce.Env.ie && tinymce.Env.ie > 10 ) {
			// The 'mscontrolselect' event is supported only in IE11+.
			dom.bind( editor.getBody(), 'mscontrolselect', function( event ) {
				if ( event.target.nodeName === 'IMG' && dom.getParent( event.target, '.wp-caption' ) ) {
					// Hide the thick border with resize handles around dl.wp-caption.
					editor.getBody().focus(); // :(
				} else if ( event.target.nodeName === 'DL' && dom.hasClass( event.target, 'wp-caption' ) ) {
					// Trigger the thick border with resize handles...
					// This will make the caption text editable.
					event.target.focus();
				}
			});
		}
	});

	editor.on( 'ObjectResized', function( event ) {
		var node = event.target;

		if ( node.nodeName === 'IMG' ) {
			editor.undoManager.transact( function() {
				var parent, width,
					dom = editor.dom;

				node.className = node.className.replace( /\bsize-[^ ]+/, '' );

				if ( parent = dom.getParent( node, '.wp-caption' ) ) {
					width = event.width || dom.getAttrib( node, 'width' );

					if ( width ) {
						width = parseInt( width, 10 );

						if ( ! editor.getParam( 'wpeditimage_html5_captions' ) ) {
							width += 10;
						}

						dom.setStyle( parent, 'width', width + 'px' );
					}
				}
			});
		}
	});

	editor.on( 'pastePostProcess', function( event ) {
		// Pasting in a caption node.
		if ( editor.dom.getParent( editor.selection.getNode(), 'dd.wp-caption-dd' ) ) {
			// Remove "non-block" elements that should not be in captions.
			editor.$( 'img, audio, video, object, embed, iframe, script, style', event.node ).remove();

			editor.$( '*', event.node ).each( function( i, node ) {
				if ( editor.dom.isBlock( node ) ) {
					// Insert <br> where the blocks used to be. Makes it look better after pasting in the caption.
					if ( tinymce.trim( node.textContent || node.innerText ) ) {
						editor.dom.insertAfter( editor.dom.create( 'br' ), node );
						editor.dom.remove( node, true );
					} else {
						editor.dom.remove( node );
					}
				}
			});

			// Trim <br> tags.
			editor.$( 'br',  event.node ).each( function( i, node ) {
				if ( ! node.nextSibling || node.nextSibling.nodeName === 'BR' ||
					! node.previousSibling || node.previousSibling.nodeName === 'BR' ) {

					editor.dom.remove( node );
				}
			} );

			// Pasted HTML is cleaned up for inserting in the caption.
			pasteInCaption = true;
		}
	});

	editor.on( 'BeforeExecCommand', function( event ) {
		var node, p, DL, align, replacement, captionParent,
			cmd = event.command,
			dom = editor.dom;

		if ( cmd === 'mceInsertContent' || cmd === 'Indent' || cmd === 'Outdent' ) {
			node = editor.selection.getNode();
			captionParent = dom.getParent( node, 'div.mceTemp' );

			if ( captionParent ) {
				if ( cmd === 'mceInsertContent' ) {
					if ( pasteInCaption ) {
						pasteInCaption = false;
						/*
						 * We are in the caption element, and in 'paste' context,
						 * and the pasted HTML was cleaned up on 'pastePostProcess' above.
						 * Let it be pasted in the caption.
						 */
						return;
					}

					/*
					 * The paste is somewhere else in the caption DL element.
					 * Prevent pasting in there as it will break the caption.
					 * Make new paragraph under the caption DL and move the caret there.
					 */
					p = dom.create( 'p' );
					dom.insertAfter( p, captionParent );
					editor.selection.setCursorLocation( p, 0 );

					/*
					 * If the image is selected and the user pastes "over" it,
					 * replace both the image and the caption elements with the pasted content.
					 * This matches the behavior when pasting over non-caption images.
					 */
					if ( node.nodeName === 'IMG' ) {
						editor.$( captionParent ).remove();
					}

					editor.nodeChanged();
				} else {
					// Clicking Indent or Outdent while an image with a caption is selected breaks the caption.
					// See #38313.
					event.preventDefault();
					event.stopImmediatePropagation();
					return false;
				}
			}
		} else if ( cmd === 'JustifyLeft' || cmd === 'JustifyRight' || cmd === 'JustifyCenter' || cmd === 'wpAlignNone' ) {
			node = editor.selection.getNode();
			align = 'align' + cmd.slice( 7 ).toLowerCase();
			DL = editor.dom.getParent( node, '.wp-caption' );

			if ( node.nodeName !== 'IMG' && ! DL ) {
				return;
			}

			node = DL || node;

			if ( editor.dom.hasClass( node, align ) ) {
				replacement = ' alignnone';
			} else {
				replacement = ' ' + align;
			}

			node.className = trim( node.className.replace( / ?align(left|center|right|none)/g, '' ) + replacement );

			editor.nodeChanged();
			event.preventDefault();

			if ( toolbar ) {
				toolbar.reposition();
			}

			editor.fire( 'ExecCommand', {
				command: cmd,
				ui: event.ui,
				value: event.value
			} );
		}
	});

	editor.on( 'keydown', function( event ) {
		var node, wrap, P, spacer,
			selection = editor.selection,
			keyCode = event.keyCode,
			dom = editor.dom,
			VK = tinymce.util.VK;

		if ( keyCode === VK.ENTER ) {
			// When pressing Enter inside a caption move the caret to a new parapraph under it.
			node = selection.getNode();
			wrap = dom.getParent( node, 'div.mceTemp' );

			if ( wrap ) {
				dom.events.cancel( event ); // Doesn't cancel all :(

				// Remove any extra dt and dd cleated on pressing Enter...
				tinymce.each( dom.select( 'dt, dd', wrap ), function( element ) {
					if ( dom.isEmpty( element ) ) {
						dom.remove( element );
					}
				});

				spacer = tinymce.Env.ie && tinymce.Env.ie < 11 ? '' : '<br data-mce-bogus="1" />';
				P = dom.create( 'p', null, spacer );

				if ( node.nodeName === 'DD' ) {
					dom.insertAfter( P, wrap );
				} else {
					wrap.parentNode.insertBefore( P, wrap );
				}

				editor.nodeChanged();
				selection.setCursorLocation( P, 0 );
			}
		} else if ( keyCode === VK.DELETE || keyCode === VK.BACKSPACE ) {
			node = selection.getNode();

			if ( node.nodeName === 'DIV' && dom.hasClass( node, 'mceTemp' ) ) {
				wrap = node;
			} else if ( node.nodeName === 'IMG' || node.nodeName === 'DT' || node.nodeName === 'A' ) {
				wrap = dom.getParent( node, 'div.mceTemp' );
			}

			if ( wrap ) {
				dom.events.cancel( event );
				removeImage( node );
				return false;
			}
		}
	});

	/*
	 * After undo/redo FF seems to set the image height very slowly when it is set to 'auto' in the CSS.
	 * This causes image.getBoundingClientRect() to return wrong values and the resize handles are shown in wrong places.
	 * Collapse the selection to remove the resize handles.
	 */
	if ( tinymce.Env.gecko ) {
		editor.on( 'undo redo', function() {
			if ( editor.selection.getNode().nodeName === 'IMG' ) {
				editor.selection.collapse();
			}
		});
	}

	editor.wpSetImgCaption = function( content ) {
		return parseShortcode( content );
	};

	editor.wpGetImgCaption = function( content ) {
		return getShortcode( content );
	};

	editor.on( 'beforeGetContent', function( event ) {
		if ( event.format !== 'raw' ) {
			editor.$( 'img[id="__wp-temp-img-id"]' ).removeAttr( 'id' );
		}
	});

	editor.on( 'BeforeSetContent', function( event ) {
		if ( event.format !== 'raw' ) {
			event.content = editor.wpSetImgCaption( event.content );
		}
	});

	editor.on( 'PostProcess', function( event ) {
		if ( event.get ) {
			event.content = editor.wpGetImgCaption( event.content );
		}
	});

	( function() {
		var wrap;

		editor.on( 'dragstart', function() {
			var node = editor.selection.getNode();

			if ( node.nodeName === 'IMG' ) {
				wrap = editor.dom.getParent( node, '.mceTemp' );

				if ( ! wrap && node.parentNode.nodeName === 'A' && ! hasTextContent( node.parentNode ) ) {
					wrap = node.parentNode;
				}
			}
		} );

		editor.on( 'drop', function( event ) {
			var dom = editor.dom,
				rng = tinymce.dom.RangeUtils.getCaretRangeFromPoint( event.clientX, event.clientY, editor.getDoc() );

			// Don't allow anything to be dropped in a captioned image.
			if ( rng && dom.getParent( rng.startContainer, '.mceTemp' ) ) {
				event.preventDefault();
			} else if ( wrap ) {
				event.preventDefault();

				editor.undoManager.transact( function() {
					if ( rng ) {
						editor.selection.setRng( rng );
					}

					editor.selection.setNode( wrap );
					dom.remove( wrap );
				} );
			}

			wrap = null;
		} );
	} )();

	// Add to editor.wp.
	editor.wp = editor.wp || {};
	editor.wp.isPlaceholder = isPlaceholder;

	// Back-compat.
	return {
		_do_shcode: parseShortcode,
		_get_shcode: getShortcode
	};
});
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      tinymce/plugins/wpeditimage/plugin.min.js                                                           0000644                 00000027443 15212564050 0014624 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       tinymce.PluginManager.add("wpeditimage",function(g){var r,u,n,c,a,e=tinymce.each,l=tinymce.trim,t=tinymce.Env.iOS;function i(e){return!(!g.dom.getAttrib(e,"data-mce-placeholder")&&!g.dom.getAttrib(e,"data-mce-object"))}function o(e){e=g.$(e).parents("[contenteditable]");return e&&"false"===e.attr("contenteditable")}function d(e){return e.replace(/(?:<p>)?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?/g,function(e,t,n){var a,i,o,r,c,d=t.match(/id=['"]([^'"]*)['"] ?/);return(c=(t=(i=(t=(a=(t=d?t.replace(d[0],""):t).match(/align=['"]([^'"]*)['"] ?/))?t.replace(a[0],""):t).match(/class=['"]([^'"]*)['"] ?/))?t.replace(i[0],""):t).match(/width=['"]([0-9]*)['"] ?/))&&(t=t.replace(c[0],"")),r=(r=(n=l(n)).match(/((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)([\s\S]*)/i))&&r[2]?(o=l(r[2]),l(r[1])):(o=l(t).replace(/caption=['"]/,"").replace(/['"]$/,""),n),d=d&&d[1]?d[1].replace(/[<>&]+/g,""):"",a=a&&a[1]?a[1]:"alignnone",i=i&&i[1]?" "+i[1].replace(/[<>&]+/g,""):"",(c=(c=!c&&r?r.match(/width=['"]([0-9]*)['"]/):c)&&c[1]?c[1]:c)&&o?(c=parseInt(c,10),g.getParam("wpeditimage_html5_captions")||(c+=10),'<div class="mceTemp"><dl id="'+d+'" class="wp-caption '+a+i+'" style="width: '+c+'px"><dt class="wp-caption-dt">'+r+'</dt><dd class="wp-caption-dd">'+o+"</dd></dl></div>"):n})}function s(e){return e.replace(/(?:<div [^>]+mceTemp[^>]+>)?\s*(<dl [^>]+wp-caption[^>]+>[\s\S]+?<\/dl>)\s*(?:<\/div>)?/g,function(e,t){var n="";return-1===t.indexOf("<img ")||-1!==t.indexOf("</p>")?t.replace(/<d[ldt]( [^>]+)?>/g,"").replace(/<\/d[ldt]>/g,""):-1===(n=t.replace(/\s*<dl ([^>]+)>\s*<dt [^>]+>([\s\S]+?)<\/dt>\s*<dd [^>]+>([\s\S]*?)<\/dd>\s*<\/dl>\s*/gi,function(e,t,n,a){var i,o,r=n.match(/width="([0-9]*)"/);return r=r&&r[1]?r[1]:"",o=(i=(i=t.match(/class="([^"]*)"/))&&i[1]?i[1]:"").match(/align[a-z]+/i)||"alignnone",r&&a?'[caption id="'+((t=t.match(/id="([^"]*)"/))&&t[1]?t[1]:"")+'" align="'+o+'" width="'+r+'"'+(i=(i=i.replace(/wp-caption ?|align[a-z]+ ?/gi,""))&&' class="'+i+'"')+"]"+n+" "+(a=(a=a.replace(/\r\n|\r/g,"\n").replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g,function(e){return e.replace(/[\r\n\t]+/," ")})).replace(/\s*\n\s*/g,"<br />"))+"[/caption]":"alignnone"!==o[0]?n.replace(/><img/,' class="'+o[0]+'"><img'):n})).indexOf("[caption")?t.replace(/[\s\S]*?((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)(<p>[\s\S]*<\/p>)?[\s\S]*/gi,"<p>$1</p>$2"):n})}function h(e){return e&&(e.textContent||e.innerText).replace(/\ufeff/g,"")}function m(e){var t=g.dom.getParent(e,"div.mceTemp");(t=t||"IMG"!==e.nodeName?t:g.dom.getParent(e,"a"))?(t.nextSibling?g.selection.select(t.nextSibling):t.previousSibling?g.selection.select(t.previousSibling):g.selection.select(t.parentNode),g.selection.collapse(!0),g.dom.remove(t)):g.dom.remove(e),g.nodeChanged(),g.undoManager.add()}return g.addButton("wp_img_remove",{tooltip:"Remove",icon:"dashicon dashicons-no",onclick:function(){m(g.selection.getNode())}}),g.addButton("wp_img_edit",{tooltip:"Edit|button",icon:"dashicon dashicons-edit",onclick:function(){var e,t,n,p;e=g.selection.getNode(),"undefined"!=typeof wp&&wp.media?(n=function(e){var t,n,a,i,o=[],r=g.dom,c=/^\d+$/;(n={attachment_id:!1,size:"custom",caption:"",align:"none",extraClasses:"",link:!1,linkUrl:"",linkClassName:"",linkTargetBlank:!1,linkRel:"",title:""}).url=r.getAttrib(e,"src"),n.alt=r.getAttrib(e,"alt"),n.title=r.getAttrib(e,"title"),a=r.getAttrib(e,"width"),i=r.getAttrib(e,"height"),(!c.test(a)||parseInt(a,10)<1)&&(a=e.naturalWidth||e.width);(!c.test(i)||parseInt(i,10)<1)&&(i=e.naturalHeight||e.height);n.customWidth=n.width=a,n.customHeight=n.height=i,c=tinymce.explode(e.className," "),t=[],tinymce.each(c,function(e){/^wp-image/.test(e)?n.attachment_id=parseInt(e.replace("wp-image-",""),10):/^align/.test(e)?n.align=e.replace("align",""):/^size/.test(e)?n.size=e.replace("size-",""):t.push(e)}),n.extraClasses=t.join(" "),(a=r.getParents(e,".wp-caption")).length&&(a=a[0],c=a.className.split(" "),tinymce.each(c,function(e){/^align/.test(e)?n.align=e.replace("align",""):e&&"wp-caption"!==e&&o.push(e)}),n.captionClassName=o.join(" "),(i=r.select("dd.wp-caption-dd",a)).length)&&(i=i[0],n.caption=g.serializer.serialize(i).replace(/<br[^>]*>/g,"$&\n").replace(/^<p>/,"").replace(/<\/p>$/,""));e.parentNode&&"A"===e.parentNode.nodeName&&(c=e.parentNode,n.linkUrl=r.getAttrib(c,"href"),n.linkTargetBlank="_blank"===r.getAttrib(c,"target"),n.linkRel=r.getAttrib(c,"rel"),n.linkClassName=c.className);return n}(e),g.$(e).attr("data-wp-editing",1),wp.media.events.trigger("editor:image-edit",{editor:g,metadata:n,image:e}),t=wp.media({frame:"image",state:"image-details",metadata:n}),wp.media.events.trigger("editor:frame-create",{frame:t}),e=function(m){g.undoManager.transact(function(){var e,t,n,a,i,o,r,c,d,l,s;e=p,t=m,s=g.dom,e&&e.length&&(a=e[0],r=(r=tinymce.explode(t.extraClasses," "))||[],t.caption||r.push("align"+t.align),t.attachment_id&&(r.push("wp-image-"+t.attachment_id),t.size)&&"custom"!==t.size&&r.push("size-"+t.size),l=t.width,c=t.height,"custom"===t.size&&(l=t.customWidth,c=t.customHeight),c={src:t.url,width:l||null,height:c||null,title:t.title||null,class:r.join(" ")||null},s.setAttribs(a,c),e.attr("alt",t.alt||""),r={href:t.linkUrl,rel:t.linkRel||null,target:t.linkTargetBlank?"_blank":null,class:t.linkClassName||null},a.parentNode&&"A"===a.parentNode.nodeName&&!h(a.parentNode)?t.linkUrl?s.setAttribs(a.parentNode,r):s.remove(a.parentNode,!0):t.linkUrl&&((c=s.getParent(a,"a"))&&s.insertAfter(a,c),c=s.create("a",r),a.parentNode.insertBefore(c,a),c.appendChild(a)),r=g.dom.getParent(a,".mceTemp"),c=a.parentNode&&"A"===a.parentNode.nodeName&&!h(a.parentNode)?a.parentNode:a,t.caption?(t.caption=function(e){if(!e||-1===e.indexOf("<")&&-1===e.indexOf(">"))return e;u=u||new tinymce.html.Serializer({},g.schema);return u.serialize(g.parser.parse(e,{forced_root_block:!1}))}(t.caption),o=t.attachment_id?"attachment_"+t.attachment_id:null,d="wp-caption "+("align"+(t.align||"none")),t.captionClassName&&(d+=" "+t.captionClassName.replace(/[<>&]+/g,"")),g.getParam("wpeditimage_html5_captions")||(l=parseInt(l,10),l+=10),r?((i=s.select("dl.wp-caption",r)).length&&s.setAttribs(i,{id:o,class:d,style:"width: "+l+"px"}),(i=s.select(".wp-caption-dd",r)).length&&s.setHTML(i[0],t.caption)):(i="<dl "+(o=o?'id="'+o+'" ':"")+'class="'+d+'" style="width: '+l+'px"><dt class="wp-caption-dt"></dt><dd class="wp-caption-dd">'+t.caption+"</dd></dl>",o=s.create("div",{class:"mceTemp"},i),(n=s.getParent(c,"p"))?n.parentNode.insertBefore(o,n):c.parentNode.insertBefore(o,c),g.$(o).find("dt.wp-caption-dt").append(c),n&&s.isEmpty(n)&&s.remove(n))):r&&(n=s.create("p"),r.parentNode.insertBefore(n,r),n.appendChild(c),s.remove(r)),e=g.$(a),d=e.attr("srcset"),l=e.attr("src"),d&&l&&(l=l.replace(/[?#].*/,""),-1===d.indexOf(l))&&e.attr("srcset",null).attr("sizes",null),wp.media.events&&wp.media.events.trigger("editor:image-update",{editor:g,metadata:t,image:a}),g.nodeChanged())}),t.detach()},t.state("image-details").on("update",e),t.state("replace-image").on("replace",e),t.on("close",function(){g.focus(),t.detach(),(p=g.$("img[data-wp-editing]")).removeAttr("data-wp-editing")}),t.open()):g.execCommand("mceImage")}}),e({alignleft:"Align left",aligncenter:"Align center",alignright:"Align right",alignnone:"No alignment"},function(e,n){var t=n.slice(5);g.addButton("wp_img_"+n,{tooltip:e,icon:"dashicon dashicons-align-"+t,cmd:"alignnone"===n?"wpAlignNone":"Justify"+t.slice(0,1).toUpperCase()+t.slice(1),onPostRender:function(){var t=this;g.on("NodeChange",function(e){"IMG"===e.element.nodeName&&(e=g.dom.getParent(e.element,".wp-caption")||e.element,"alignnone"===n?t.active(!/\balign(left|center|right)\b/.test(e.className)):t.active(g.dom.hasClass(e,n)))})}})}),g.once("preinit",function(){g.wp&&g.wp._createToolbar&&(r=g.wp._createToolbar(["wp_img_alignleft","wp_img_aligncenter","wp_img_alignright","wp_img_alignnone","wp_img_edit","wp_img_remove"]))}),g.on("wptoolbar",function(e){"IMG"!==e.element.nodeName||i(e.element)||(e.toolbar=r)}),t&&g.on("init",function(){g.on("touchstart",function(e){"IMG"!==e.target.nodeName||o(e.target)||(n=!0)}),g.dom.bind(g.getDoc(),"touchmove",function(){n=!1}),g.on("touchend",function(e){var t;n&&"IMG"===e.target.nodeName&&!o(e.target)?(t=e.target,n=!1,window.setTimeout(function(){g.selection.select(t),g.nodeChanged()},100)):r&&r.hide()})}),g.on("init",function(){var t=g.dom,e=g.getParam("wpeditimage_html5_captions")?"html5-captions":"html4-captions";t.addClass(g.getBody(),e),tinymce.Env.ie&&10<tinymce.Env.ie&&t.bind(g.getBody(),"mscontrolselect",function(e){"IMG"===e.target.nodeName&&t.getParent(e.target,".wp-caption")?g.getBody().focus():"DL"===e.target.nodeName&&t.hasClass(e.target,"wp-caption")&&e.target.focus()})}),g.on("ObjectResized",function(a){var i=a.target;"IMG"===i.nodeName&&g.undoManager.transact(function(){var e,t,n=g.dom;i.className=i.className.replace(/\bsize-[^ ]+/,""),(e=n.getParent(i,".wp-caption"))&&(t=a.width||n.getAttrib(i,"width"))&&(t=parseInt(t,10),g.getParam("wpeditimage_html5_captions")||(t+=10),n.setStyle(e,"width",t+"px"))})}),g.on("pastePostProcess",function(e){g.dom.getParent(g.selection.getNode(),"dd.wp-caption-dd")&&(g.$("img, audio, video, object, embed, iframe, script, style",e.node).remove(),g.$("*",e.node).each(function(e,t){g.dom.isBlock(t)&&(tinymce.trim(t.textContent||t.innerText)?(g.dom.insertAfter(g.dom.create("br"),t),g.dom.remove(t,!0)):g.dom.remove(t))}),g.$("br",e.node).each(function(e,t){t.nextSibling&&"BR"!==t.nextSibling.nodeName&&t.previousSibling&&"BR"!==t.previousSibling.nodeName||g.dom.remove(t)}),c=!0)}),g.on("BeforeExecCommand",function(e){var t,n,a,i=e.command,o=g.dom;if("mceInsertContent"===i||"Indent"===i||"Outdent"===i){if(t=g.selection.getNode(),a=o.getParent(t,"div.mceTemp")){if("mceInsertContent"!==i)return e.preventDefault(),e.stopImmediatePropagation(),!1;c?c=!1:(n=o.create("p"),o.insertAfter(n,a),g.selection.setCursorLocation(n,0),"IMG"===t.nodeName&&g.$(a).remove(),g.nodeChanged())}}else"JustifyLeft"!==i&&"JustifyRight"!==i&&"JustifyCenter"!==i&&"wpAlignNone"!==i||(t=g.selection.getNode(),o="align"+i.slice(7).toLowerCase(),n=g.dom.getParent(t,".wp-caption"),"IMG"!==t.nodeName&&!n)||(a=g.dom.hasClass(t=n||t,o)?" alignnone":" "+o,t.className=l(t.className.replace(/ ?align(left|center|right|none)/g,"")+a),g.nodeChanged(),e.preventDefault(),r&&r.reposition(),g.fire("ExecCommand",{command:i,ui:e.ui,value:e.value}))}),g.on("keydown",function(e){var t,n,a,i=g.selection,o=e.keyCode,r=g.dom,c=tinymce.util.VK;if(o===c.ENTER)t=i.getNode(),(n=r.getParent(t,"div.mceTemp"))&&(r.events.cancel(e),tinymce.each(r.select("dt, dd",n),function(e){r.isEmpty(e)&&r.remove(e)}),a=tinymce.Env.ie&&tinymce.Env.ie<11?"":'<br data-mce-bogus="1" />',a=r.create("p",null,a),"DD"===t.nodeName?r.insertAfter(a,n):n.parentNode.insertBefore(a,n),g.nodeChanged(),i.setCursorLocation(a,0));else if((o===c.DELETE||o===c.BACKSPACE)&&("DIV"===(t=i.getNode()).nodeName&&r.hasClass(t,"mceTemp")?n=t:"IMG"!==t.nodeName&&"DT"!==t.nodeName&&"A"!==t.nodeName||(n=r.getParent(t,"div.mceTemp")),n))return r.events.cancel(e),m(t),!1}),tinymce.Env.gecko&&g.on("undo redo",function(){"IMG"===g.selection.getNode().nodeName&&g.selection.collapse()}),g.wpSetImgCaption=d,g.wpGetImgCaption=s,g.on("beforeGetContent",function(e){"raw"!==e.format&&g.$('img[id="__wp-temp-img-id"]').removeAttr("id")}),g.on("BeforeSetContent",function(e){"raw"!==e.format&&(e.content=g.wpSetImgCaption(e.content))}),g.on("PostProcess",function(e){e.get&&(e.content=g.wpGetImgCaption(e.content))}),g.on("dragstart",function(){var e=g.selection.getNode();"IMG"!==e.nodeName||(a=g.dom.getParent(e,".mceTemp"))||"A"!==e.parentNode.nodeName||h(e.parentNode)||(a=e.parentNode)}),g.on("drop",function(e){var t=g.dom,n=tinymce.dom.RangeUtils.getCaretRangeFromPoint(e.clientX,e.clientY,g.getDoc());n&&t.getParent(n.startContainer,".mceTemp")?e.preventDefault():a&&(e.preventDefault(),g.undoManager.transact(function(){n&&g.selection.setRng(n),g.selection.setNode(a),t.remove(a)})),a=null}),g.wp=g.wp||{},g.wp.isPlaceholder=i,{_do_shcode:d,_get_shcode:s}});                                                                                                                                                                                                                             tinymce/plugins/wpemoji/plugin.js                                                                   0000644                 00000006774 15212564050 0013221 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       ( function( tinymce ) {
	tinymce.PluginManager.add( 'wpemoji', function( editor ) {
		var typing,
			wp = window.wp,
			settings = window._wpemojiSettings,
			env = tinymce.Env,
			ua = window.navigator.userAgent,
			isWin = ua.indexOf( 'Windows' ) > -1,
			isWin8 = ( function() {
				var match = ua.match( /Windows NT 6\.(\d)/ );

				if ( match && match[1] > 1 ) {
					return true;
				}

				return false;
			}());

		if ( ! wp || ! wp.emoji || settings.supports.everything ) {
			return;
		}

		function setImgAttr( image ) {
			image.className = 'emoji';
			image.setAttribute( 'data-mce-resize', 'false' );
			image.setAttribute( 'data-mce-placeholder', '1' );
			image.setAttribute( 'data-wp-emoji', '1' );
		}

		function replaceEmoji( node ) {
			var imgAttr = {
				'data-mce-resize': 'false',
				'data-mce-placeholder': '1',
				'data-wp-emoji': '1'
			};

			wp.emoji.parse( node, { imgAttr: imgAttr } );
		}

		// Test if the node text contains emoji char(s) and replace.
		function parseNode( node ) {
			var selection, bookmark;

			if ( node && window.twemoji && window.twemoji.test( node.textContent || node.innerText ) ) {
				if ( env.webkit ) {
					selection = editor.selection;
					bookmark = selection.getBookmark();
				}

				replaceEmoji( node );

				if ( env.webkit ) {
					selection.moveToBookmark( bookmark );
				}
			}
		}

		if ( isWin8 ) {
			/*
			 * Windows 8+ emoji can be "typed" with the onscreen keyboard.
			 * That triggers the normal keyboard events, but not the 'input' event.
			 * Thankfully it sets keyCode 231 when the onscreen keyboard inserts any emoji.
			 */
			editor.on( 'keyup', function( event ) {
				if ( event.keyCode === 231 ) {
					parseNode( editor.selection.getNode() );
				}
			} );
		} else if ( ! isWin ) {
			/*
			 * In MacOS inserting emoji doesn't trigger the stanradr keyboard events.
			 * Thankfully it triggers the 'input' event.
			 * This works in Android and iOS as well.
			 */
			editor.on( 'keydown keyup', function( event ) {
				typing = ( event.type === 'keydown' );
			} );

			editor.on( 'input', function() {
				if ( typing ) {
					return;
				}

				parseNode( editor.selection.getNode() );
			});
		}

		editor.on( 'setcontent', function( event ) {
			var selection = editor.selection,
				node = selection.getNode();

			if ( window.twemoji && window.twemoji.test( node.textContent || node.innerText ) ) {
				replaceEmoji( node );

				// In IE all content in the editor is left selected after wp.emoji.parse()...
				// Collapse the selection to the beginning.
				if ( env.ie && env.ie < 9 && event.load && node && node.nodeName === 'BODY' ) {
					selection.collapse( true );
				}
			}
		} );

		// Convert Twemoji compatible pasted emoji replacement images into our format.
		editor.on( 'PastePostProcess', function( event ) {
			if ( window.twemoji ) {
				tinymce.each( editor.dom.$( 'img.emoji', event.node ), function( image ) {
					if ( image.alt && window.twemoji.test( image.alt ) ) {
						setImgAttr( image );
					}
				});
			}
		});

		editor.on( 'postprocess', function( event ) {
			if ( event.content ) {
				event.content = event.content.replace( /<img[^>]+data-wp-emoji="[^>]+>/g, function( img ) {
					var alt = img.match( /alt="([^"]+)"/ );

					if ( alt && alt[1] ) {
						return alt[1];
					}

					return img;
				});
			}
		} );

		editor.on( 'resolvename', function( event ) {
			if ( event.target.nodeName === 'IMG' && editor.dom.getAttrib( event.target, 'data-wp-emoji' ) ) {
				event.preventDefault();
			}
		} );
	} );
} )( window.tinymce );
    tinymce/plugins/wpemoji/plugin.min.js                                                               0000644                 00000002757 15212564050 0014000 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(m){m.PluginManager.add("wpemoji",function(n){var t,o=window.wp,e=window._wpemojiSettings,i=m.Env,a=window.navigator.userAgent,w=-1<a.indexOf("Windows"),a=!!((a=a.match(/Windows NT 6\.(\d)/))&&1<a[1]);function d(e){o.emoji.parse(e,{imgAttr:{"data-mce-resize":"false","data-mce-placeholder":"1","data-wp-emoji":"1"}})}function c(e){var t,o;e&&window.twemoji&&window.twemoji.test(e.textContent||e.innerText)&&(i.webkit&&(o=(t=n.selection).getBookmark()),d(e),i.webkit)&&t.moveToBookmark(o)}o&&o.emoji&&!e.supports.everything&&(a?n.on("keyup",function(e){231===e.keyCode&&c(n.selection.getNode())}):w||(n.on("keydown keyup",function(e){t="keydown"===e.type}),n.on("input",function(){t||c(n.selection.getNode())})),n.on("setcontent",function(e){var t=n.selection,o=t.getNode();window.twemoji&&window.twemoji.test(o.textContent||o.innerText)&&(d(o),i.ie)&&i.ie<9&&e.load&&o&&"BODY"===o.nodeName&&t.collapse(!0)}),n.on("PastePostProcess",function(e){window.twemoji&&m.each(n.dom.$("img.emoji",e.node),function(e){e.alt&&window.twemoji.test(e.alt)&&((e=e).className="emoji",e.setAttribute("data-mce-resize","false"),e.setAttribute("data-mce-placeholder","1"),e.setAttribute("data-wp-emoji","1"))})}),n.on("postprocess",function(e){e.content&&(e.content=e.content.replace(/<img[^>]+data-wp-emoji="[^>]+>/g,function(e){var t=e.match(/alt="([^"]+)"/);return t&&t[1]?t[1]:e}))}),n.on("resolvename",function(e){"IMG"===e.target.nodeName&&n.dom.getAttrib(e.target,"data-wp-emoji")&&e.preventDefault()}))})}(window.tinymce);                 tinymce/plugins/wpgallery/plugin.js                                                                 0000644                 00000006157 15212564050 0013550 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /* global tinymce */
tinymce.PluginManager.add('wpgallery', function( editor ) {

	function replaceGalleryShortcodes( content ) {
		return content.replace( /\[gallery([^\]]*)\]/g, function( match ) {
			return html( 'wp-gallery', match );
		});
	}

	function html( cls, data ) {
		data = window.encodeURIComponent( data );
		return '<img src="' + tinymce.Env.transparentSrc + '" class="wp-media mceItem ' + cls + '" ' +
			'data-wp-media="' + data + '" data-mce-resize="false" data-mce-placeholder="1" alt="" />';
	}

	function restoreMediaShortcodes( content ) {
		function getAttr( str, name ) {
			name = new RegExp( name + '=\"([^\"]+)\"' ).exec( str );
			return name ? window.decodeURIComponent( name[1] ) : '';
		}

		return content.replace( /(?:<p(?: [^>]+)?>)*(<img [^>]+>)(?:<\/p>)*/g, function( match, image ) {
			var data = getAttr( image, 'data-wp-media' );

			if ( data ) {
				return '<p>' + data + '</p>';
			}

			return match;
		});
	}

	function editMedia( node ) {
		var gallery, frame, data;

		if ( node.nodeName !== 'IMG' ) {
			return;
		}

		// Check if the `wp.media` API exists.
		if ( typeof wp === 'undefined' || ! wp.media ) {
			return;
		}

		data = window.decodeURIComponent( editor.dom.getAttrib( node, 'data-wp-media' ) );

		// Make sure we've selected a gallery node.
		if ( editor.dom.hasClass( node, 'wp-gallery' ) && wp.media.gallery ) {
			gallery = wp.media.gallery;
			frame = gallery.edit( data );

			frame.state('gallery-edit').on( 'update', function( selection ) {
				var shortcode = gallery.shortcode( selection ).string();
				editor.dom.setAttrib( node, 'data-wp-media', window.encodeURIComponent( shortcode ) );
				frame.detach();
			});
		}
	}

	// Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('...').
	editor.addCommand( 'WP_Gallery', function() {
		editMedia( editor.selection.getNode() );
	});

	editor.on( 'mouseup', function( event ) {
		var dom = editor.dom,
			node = event.target;

		function unselect() {
			dom.removeClass( dom.select( 'img.wp-media-selected' ), 'wp-media-selected' );
		}

		if ( node.nodeName === 'IMG' && dom.getAttrib( node, 'data-wp-media' ) ) {
			// Don't trigger on right-click.
			if ( event.button !== 2 ) {
				if ( dom.hasClass( node, 'wp-media-selected' ) ) {
					editMedia( node );
				} else {
					unselect();
					dom.addClass( node, 'wp-media-selected' );
				}
			}
		} else {
			unselect();
		}
	});

	// Display gallery, audio or video instead of img in the element path.
	editor.on( 'ResolveName', function( event ) {
		var dom = editor.dom,
			node = event.target;

		if ( node.nodeName === 'IMG' && dom.getAttrib( node, 'data-wp-media' ) ) {
			if ( dom.hasClass( node, 'wp-gallery' ) ) {
				event.name = 'gallery';
			}
		}
	});

	editor.on( 'BeforeSetContent', function( event ) {
		// 'wpview' handles the gallery shortcode when present.
		if ( ! editor.plugins.wpview || typeof wp === 'undefined' || ! wp.mce ) {
			event.content = replaceGalleryShortcodes( event.content );
		}
	});

	editor.on( 'PostProcess', function( event ) {
		if ( event.get ) {
			event.content = restoreMediaShortcodes( event.content );
		}
	});
});
                                                                                                                                                                                                                                                                                                                                                                                                                 tinymce/plugins/wpgallery/plugin.min.js                                                             0000644                 00000003127 15212564050 0014324 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       tinymce.PluginManager.add("wpgallery",function(d){function t(e){return e.replace(/\[gallery([^\]]*)\]/g,function(e){return t="wp-gallery",n=e,n=window.encodeURIComponent(e),'<img src="'+tinymce.Env.transparentSrc+'" class="wp-media mceItem '+t+'" data-wp-media="'+n+'" data-mce-resize="false" data-mce-placeholder="1" alt="" />';var t,n})}function n(e){return e.replace(/(?:<p(?: [^>]+)?>)*(<img [^>]+>)(?:<\/p>)*/g,function(e,t){t=t,n="data-wp-media";var n,t=(n=new RegExp(n+'="([^"]+)"').exec(t))?window.decodeURIComponent(n[1]):"";return t?"<p>"+t+"</p>":e})}function o(t){var n,a,e;"IMG"===t.nodeName&&"undefined"!=typeof wp&&wp.media&&(e=window.decodeURIComponent(d.dom.getAttrib(t,"data-wp-media")),d.dom.hasClass(t,"wp-gallery"))&&wp.media.gallery&&(n=wp.media.gallery,(a=n.edit(e)).state("gallery-edit").on("update",function(e){e=n.shortcode(e).string();d.dom.setAttrib(t,"data-wp-media",window.encodeURIComponent(e)),a.detach()}))}d.addCommand("WP_Gallery",function(){o(d.selection.getNode())}),d.on("mouseup",function(e){var t=d.dom,n=e.target;function a(){t.removeClass(t.select("img.wp-media-selected"),"wp-media-selected")}"IMG"===n.nodeName&&t.getAttrib(n,"data-wp-media")?2!==e.button&&(t.hasClass(n,"wp-media-selected")?o(n):(a(),t.addClass(n,"wp-media-selected"))):a()}),d.on("ResolveName",function(e){var t=d.dom,n=e.target;"IMG"===n.nodeName&&t.getAttrib(n,"data-wp-media")&&t.hasClass(n,"wp-gallery")&&(e.name="gallery")}),d.on("BeforeSetContent",function(e){d.plugins.wpview&&"undefined"!=typeof wp&&wp.mce||(e.content=t(e.content))}),d.on("PostProcess",function(e){e.get&&(e.content=n(e.content))})});                                                                                                                                                                                                                                                                                                                                                                                                                                         tinymce/plugins/wplink/plugin.js                                                                    0000644                 00000042606 15212564050 0013045 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       ( function( tinymce ) {
	tinymce.ui.Factory.add( 'WPLinkPreview', tinymce.ui.Control.extend( {
		url: '#',
		renderHtml: function() {
			return (
				'<div id="' + this._id + '" class="wp-link-preview">' +
					'<a href="' + this.url + '" target="_blank" tabindex="-1">' + this.url + '</a>' +
				'</div>'
			);
		},
		setURL: function( url ) {
			var index, lastIndex;

			if ( this.url !== url ) {
				this.url = url;

				url = window.decodeURIComponent( url );

				url = url.replace( /^(?:https?:)?\/\/(?:www\.)?/, '' );

				if ( ( index = url.indexOf( '?' ) ) !== -1 ) {
					url = url.slice( 0, index );
				}

				if ( ( index = url.indexOf( '#' ) ) !== -1 ) {
					url = url.slice( 0, index );
				}

				url = url.replace( /(?:index)?\.html$/, '' );

				if ( url.charAt( url.length - 1 ) === '/' ) {
					url = url.slice( 0, -1 );
				}

				// If nothing's left (maybe the URL was just a fragment), use the whole URL.
				if ( url === '' ) {
					url = this.url;
				}

				// If the URL is longer that 40 chars, concatenate the beginning (after the domain) and ending with '...'.
				if ( url.length > 40 && ( index = url.indexOf( '/' ) ) !== -1 && ( lastIndex = url.lastIndexOf( '/' ) ) !== -1 && lastIndex !== index ) {
					// If the beginning + ending are shorter that 40 chars, show more of the ending.
					if ( index + url.length - lastIndex < 40 ) {
						lastIndex = -( 40 - ( index + 1 ) );
					}

					url = url.slice( 0, index + 1 ) + '\u2026' + url.slice( lastIndex );
				}

				tinymce.$( this.getEl().firstChild ).attr( 'href', this.url ).text( url );
			}
		}
	} ) );

	tinymce.ui.Factory.add( 'WPLinkInput', tinymce.ui.Control.extend( {
		renderHtml: function() {
			return (
				'<div id="' + this._id + '" class="wp-link-input">' +
					'<label for="' + this._id + '_label">' + tinymce.translate( 'Paste URL or type to search' ) + '</label><input id="' + this._id + '_label" type="text" value="" />' +
					'<input type="text" style="display:none" value="" />' +
				'</div>'
			);
		},
		setURL: function( url ) {
			this.getEl().firstChild.nextSibling.value = url;
		},
		getURL: function() {
			return tinymce.trim( this.getEl().firstChild.nextSibling.value );
		},
		getLinkText: function() {
			var text = this.getEl().firstChild.nextSibling.nextSibling.value;

			if ( ! tinymce.trim( text ) ) {
				return '';
			}

			return text.replace( /[\r\n\t ]+/g, ' ' );
		},
		reset: function() {
			var urlInput = this.getEl().firstChild.nextSibling;

			urlInput.value = '';
			urlInput.nextSibling.value = '';
		}
	} ) );

	tinymce.PluginManager.add( 'wplink', function( editor ) {
		var toolbar;
		var editToolbar;
		var previewInstance;
		var inputInstance;
		var linkNode;
		var doingUndoRedo;
		var doingUndoRedoTimer;
		var $ = window.jQuery;
		var emailRegex = /^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i;
		var urlRegex1 = /^https?:\/\/([^\s/?.#-][^\s\/?.#]*\.?)+(\/[^\s"]*)?$/i;
		var urlRegex2 = /^https?:\/\/[^\/]+\.[^\/]+($|\/)/i;
		var speak = ( typeof window.wp !== 'undefined' && window.wp.a11y && window.wp.a11y.speak ) ? window.wp.a11y.speak : function() {};
		var hasLinkError = false;
		var __ = window.wp.i18n.__;
		var _n = window.wp.i18n._n;
		var sprintf = window.wp.i18n.sprintf;

		function getSelectedLink() {
			var href, html,
				node = editor.selection.getStart(),
				link = editor.dom.getParent( node, 'a[href]' );

			if ( ! link ) {
				html = editor.selection.getContent({ format: 'raw' });

				if ( html && html.indexOf( '</a>' ) !== -1 ) {
					href = html.match( /href="([^">]+)"/ );

					if ( href && href[1] ) {
						link = editor.$( 'a[href="' + href[1] + '"]', node )[0];
					}

					if ( link ) {
						editor.selection.select( link );
					}
				}
			}

			return link;
		}

		function removePlaceholders() {
			editor.$( 'a' ).each( function( i, element ) {
				var $element = editor.$( element );

				if ( $element.attr( 'href' ) === '_wp_link_placeholder' ) {
					editor.dom.remove( element, true );
				} else if ( $element.attr( 'data-wplink-edit' ) ) {
					$element.attr( 'data-wplink-edit', null );
				}
			});
		}

		function removePlaceholderStrings( content, dataAttr ) {
			return content.replace( /(<a [^>]+>)([\s\S]*?)<\/a>/g, function( all, tag, text ) {
				if ( tag.indexOf( ' href="_wp_link_placeholder"' ) > -1 ) {
					return text;
				}

				if ( dataAttr ) {
					tag = tag.replace( / data-wplink-edit="true"/g, '' );
				}

				tag = tag.replace( / data-wplink-url-error="true"/g, '' );

				return tag + text + '</a>';
			});
		}

		function checkLink( node ) {
			var $link = editor.$( node );
			var href = $link.attr( 'href' );

			if ( ! href || typeof $ === 'undefined' ) {
				return;
			}

			hasLinkError = false;

			if ( /^http/i.test( href ) && ( ! urlRegex1.test( href ) || ! urlRegex2.test( href ) ) ) {
				hasLinkError = true;
				$link.attr( 'data-wplink-url-error', 'true' );
				speak( editor.translate( 'Warning: the link has been inserted but may have errors. Please test it.' ), 'assertive' );
			} else {
				$link.removeAttr( 'data-wplink-url-error' );
			}
		}

		editor.on( 'preinit', function() {
			if ( editor.wp && editor.wp._createToolbar ) {
				toolbar = editor.wp._createToolbar( [
					'wp_link_preview',
					'wp_link_edit',
					'wp_link_remove'
				], true );

				var editButtons = [
					'wp_link_input',
					'wp_link_apply'
				];

				if ( typeof window.wpLink !== 'undefined' ) {
					editButtons.push( 'wp_link_advanced' );
				}

				editToolbar = editor.wp._createToolbar( editButtons, true );

				editToolbar.on( 'show', function() {
					if ( typeof window.wpLink === 'undefined' || ! window.wpLink.modalOpen ) {
						window.setTimeout( function() {
							var element = editToolbar.$el.find( 'input.ui-autocomplete-input' )[0],
								selection = linkNode && ( linkNode.textContent || linkNode.innerText );

							if ( element ) {
								if ( ! element.value && selection && typeof window.wpLink !== 'undefined' ) {
									element.value = window.wpLink.getUrlFromSelection( selection );
								}

								if ( ! doingUndoRedo ) {
									element.focus();
									element.select();
								}
							}
						} );
					}
				} );

				editToolbar.on( 'hide', function() {
					if ( ! editToolbar.scrolling ) {
						editor.execCommand( 'wp_link_cancel' );
					}
				} );
			}
		} );

		editor.addCommand( 'WP_Link', function() {
			if ( tinymce.Env.ie && tinymce.Env.ie < 10 && typeof window.wpLink !== 'undefined' ) {
				window.wpLink.open( editor.id );
				return;
			}

			linkNode = getSelectedLink();
			editToolbar.tempHide = false;

			if ( ! linkNode ) {
				removePlaceholders();
				editor.execCommand( 'mceInsertLink', false, { href: '_wp_link_placeholder' } );

				linkNode = editor.$( 'a[href="_wp_link_placeholder"]' )[0];
				editor.nodeChanged();
			}

			editor.dom.setAttribs( linkNode, { 'data-wplink-edit': true } );
		} );

		editor.addCommand( 'wp_link_apply', function() {
			if ( editToolbar.scrolling ) {
				return;
			}

			var href, text;

			if ( linkNode ) {
				href = inputInstance.getURL();
				text = inputInstance.getLinkText();
				editor.focus();

				var parser = document.createElement( 'a' );
				parser.href = href;

				if ( 'javascript:' === parser.protocol || 'data:' === parser.protocol ) { // jshint ignore:line
					href = '';
				}

				if ( ! href ) {
					editor.dom.remove( linkNode, true );
					return;
				}

				if ( ! /^(?:[a-z]+:|#|\?|\.|\/)/.test( href ) && ! emailRegex.test( href ) ) {
					href = 'http://' + href;
				}

				editor.dom.setAttribs( linkNode, { href: href, 'data-wplink-edit': null } );

				if ( ! tinymce.trim( linkNode.innerHTML ) ) {
					editor.$( linkNode ).text( text || href );
				}

				checkLink( linkNode );
			}

			inputInstance.reset();
			editor.nodeChanged();

			// Audible confirmation message when a link has been inserted in the Editor.
			if ( typeof window.wpLinkL10n !== 'undefined' && ! hasLinkError ) {
				speak( window.wpLinkL10n.linkInserted );
			}
		} );

		editor.addCommand( 'wp_link_cancel', function() {
			inputInstance.reset();

			if ( ! editToolbar.tempHide ) {
				removePlaceholders();
			}
		} );

		editor.addCommand( 'wp_unlink', function() {
			editor.execCommand( 'unlink' );
			editToolbar.tempHide = false;
			editor.execCommand( 'wp_link_cancel' );
		} );

		// WP default shortcuts.
		editor.addShortcut( 'access+a', '', 'WP_Link' );
		editor.addShortcut( 'access+s', '', 'wp_unlink' );
		// The "de-facto standard" shortcut, see #27305.
		editor.addShortcut( 'meta+k', '', 'WP_Link' );

		editor.addButton( 'link', {
			icon: 'link',
			tooltip: 'Insert/edit link',
			cmd: 'WP_Link',
			stateSelector: 'a[href]'
		});

		editor.addButton( 'unlink', {
			icon: 'unlink',
			tooltip: 'Remove link',
			cmd: 'unlink'
		});

		editor.addMenuItem( 'link', {
			icon: 'link',
			text: 'Insert/edit link',
			cmd: 'WP_Link',
			stateSelector: 'a[href]',
			context: 'insert',
			prependToContext: true
		});

		editor.on( 'pastepreprocess', function( event ) {
			var pastedStr = event.content,
				regExp = /^(?:https?:)?\/\/\S+$/i;

			if ( ! editor.selection.isCollapsed() && ! regExp.test( editor.selection.getContent() ) ) {
				pastedStr = pastedStr.replace( /<[^>]+>/g, '' );
				pastedStr = tinymce.trim( pastedStr );

				if ( regExp.test( pastedStr ) ) {
					editor.execCommand( 'mceInsertLink', false, {
						href: editor.dom.decode( pastedStr )
					} );

					event.preventDefault();
				}
			}
		} );

		// Remove any remaining placeholders on saving.
		editor.on( 'savecontent', function( event ) {
			event.content = removePlaceholderStrings( event.content, true );
		});

		// Prevent adding undo levels on inserting link placeholder.
		editor.on( 'BeforeAddUndo', function( event ) {
			if ( event.lastLevel && event.lastLevel.content && event.level.content &&
				event.lastLevel.content === removePlaceholderStrings( event.level.content ) ) {

				event.preventDefault();
			}
		});

		// When doing undo and redo with keyboard shortcuts (Ctrl|Cmd+Z, Ctrl|Cmd+Shift+Z, Ctrl|Cmd+Y),
		// set a flag to not focus the inline dialog. The editor has to remain focused so the users can do consecutive undo/redo.
		editor.on( 'keydown', function( event ) {
			if ( event.keyCode === 27 ) { // Esc
				editor.execCommand( 'wp_link_cancel' );
			}

			if ( event.altKey || ( tinymce.Env.mac && ( ! event.metaKey || event.ctrlKey ) ) ||
				( ! tinymce.Env.mac && ! event.ctrlKey ) ) {

				return;
			}

			if ( event.keyCode === 89 || event.keyCode === 90 ) { // Y or Z
				doingUndoRedo = true;

				window.clearTimeout( doingUndoRedoTimer );
				doingUndoRedoTimer = window.setTimeout( function() {
					doingUndoRedo = false;
				}, 500 );
			}
		} );

		editor.addButton( 'wp_link_preview', {
			type: 'WPLinkPreview',
			onPostRender: function() {
				previewInstance = this;
			}
		} );

		editor.addButton( 'wp_link_input', {
			type: 'WPLinkInput',
			onPostRender: function() {
				var element = this.getEl(),
					input = element.firstChild.nextSibling,
					$input, cache, last;

				inputInstance = this;

				if ( $ && $.ui && $.ui.autocomplete ) {
					$input = $( input );

					$input.on( 'keydown', function() {
						$input.removeAttr( 'aria-activedescendant' );
					} )
					.autocomplete( {
						source: function( request, response ) {
							if ( last === request.term ) {
								response( cache );
								return;
							}

							if ( /^https?:/.test( request.term ) || request.term.indexOf( '.' ) !== -1 ) {
								return response();
							}

							$.post( window.ajaxurl, {
								action: 'wp-link-ajax',
								page: 1,
								search: request.term,
								_ajax_linking_nonce: $( '#_ajax_linking_nonce' ).val()
							}, function( data ) {
								cache = data;
								response( data );
							}, 'json' );

							last = request.term;
						},
						focus: function( event, ui ) {
							$input.attr( 'aria-activedescendant', 'mce-wp-autocomplete-' + ui.item.ID );
							/*
							 * Don't empty the URL input field, when using the arrow keys to
							 * highlight items. See api.jqueryui.com/autocomplete/#event-focus
							 */
							event.preventDefault();
						},
						select: function( event, ui ) {
							$input.val( ui.item.permalink );
							$( element.firstChild.nextSibling.nextSibling ).val( ui.item.title );

							if ( 9 === event.keyCode && typeof window.wpLinkL10n !== 'undefined' ) {
								// Audible confirmation message when a link has been selected.
								speak( window.wpLinkL10n.linkSelected );
							}

							return false;
						},
						open: function() {
							$input.attr( 'aria-expanded', 'true' );
							editToolbar.blockHide = true;
						},
						close: function() {
							$input.attr( 'aria-expanded', 'false' );
							editToolbar.blockHide = false;
						},
						minLength: 2,
						position: {
							my: 'left top+2'
						},
						messages: {
							noResults: __( 'No results found.' ) ,
							results: function( number ) {
								return sprintf(
									/* translators: %d: Number of search results found. */
									_n(
										'%d result found. Use up and down arrow keys to navigate.',
										'%d results found. Use up and down arrow keys to navigate.',
										number
									),
									number
								);
							}
						}
					} ).autocomplete( 'instance' )._renderItem = function( ul, item ) {
						var fallbackTitle = ( typeof window.wpLinkL10n !== 'undefined' ) ? window.wpLinkL10n.noTitle : '',
							title = item.title ? item.title : fallbackTitle;

						return $( '<li role="option" id="mce-wp-autocomplete-' + item.ID + '">' )
						.append( '<span>' + title + '</span>&nbsp;<span class="wp-editor-float-right">' + item.info + '</span>' )
						.appendTo( ul );
					};

					$input.attr( {
						'role': 'combobox',
						'aria-autocomplete': 'list',
						'aria-expanded': 'false',
						'aria-owns': $input.autocomplete( 'widget' ).attr( 'id' )
					} )
					.on( 'focus', function() {
						var inputValue = $input.val();
						/*
						 * Don't trigger a search if the URL field already has a link or is empty.
						 * Also, avoids screen readers announce `No search results`.
						 */
						if ( inputValue && ! /^https?:/.test( inputValue ) ) {
							$input.autocomplete( 'search' );
						}
					} )
					// Returns a jQuery object containing the menu element.
					.autocomplete( 'widget' )
						.addClass( 'wplink-autocomplete' )
						.attr( 'role', 'listbox' )
						.removeAttr( 'tabindex' ) // Remove the `tabindex=0` attribute added by jQuery UI.
						/*
						 * Looks like Safari and VoiceOver need an `aria-selected` attribute. See ticket #33301.
						 * The `menufocus` and `menublur` events are the same events used to add and remove
						 * the `ui-state-focus` CSS class on the menu items. See jQuery UI Menu Widget.
						 */
						.on( 'menufocus', function( event, ui ) {
							ui.item.attr( 'aria-selected', 'true' );
						})
						.on( 'menublur', function() {
							/*
							 * The `menublur` event returns an object where the item is `null`
							 * so we need to find the active item with other means.
							 */
							$( this ).find( '[aria-selected="true"]' ).removeAttr( 'aria-selected' );
						});
				}

				tinymce.$( input ).on( 'keydown', function( event ) {
					if ( event.keyCode === 13 ) {
						editor.execCommand( 'wp_link_apply' );
						event.preventDefault();
					}
				} );
			}
		} );

		editor.on( 'wptoolbar', function( event ) {
			var linkNode = editor.dom.getParent( event.element, 'a' ),
				$linkNode, href, edit;

			if ( typeof window.wpLink !== 'undefined' && window.wpLink.modalOpen ) {
				editToolbar.tempHide = true;
				return;
			}

			editToolbar.tempHide = false;

			if ( linkNode ) {
				$linkNode = editor.$( linkNode );
				href = $linkNode.attr( 'href' );
				edit = $linkNode.attr( 'data-wplink-edit' );

				if ( href === '_wp_link_placeholder' || edit ) {
					if ( href !== '_wp_link_placeholder' && ! inputInstance.getURL() ) {
						inputInstance.setURL( href );
					}

					event.element = linkNode;
					event.toolbar = editToolbar;
				} else if ( href && ! $linkNode.find( 'img' ).length ) {
					previewInstance.setURL( href );
					event.element = linkNode;
					event.toolbar = toolbar;

					if ( $linkNode.attr( 'data-wplink-url-error' ) === 'true' ) {
						toolbar.$el.find( '.wp-link-preview a' ).addClass( 'wplink-url-error' );
					} else {
						toolbar.$el.find( '.wp-link-preview a' ).removeClass( 'wplink-url-error' );
						hasLinkError = false;
					}
				}
			} else if ( editToolbar.visible() ) {
				editor.execCommand( 'wp_link_cancel' );
			}
		} );

		editor.addButton( 'wp_link_edit', {
			tooltip: 'Edit|button', // '|button' is not displayed, only used for context.
			icon: 'dashicon dashicons-edit',
			cmd: 'WP_Link'
		} );

		editor.addButton( 'wp_link_remove', {
			tooltip: 'Remove link',
			icon: 'dashicon dashicons-editor-unlink',
			cmd: 'wp_unlink'
		} );

		editor.addButton( 'wp_link_advanced', {
			tooltip: 'Link options',
			icon: 'dashicon dashicons-admin-generic',
			onclick: function() {
				if ( typeof window.wpLink !== 'undefined' ) {
					var url = inputInstance.getURL() || null,
						text = inputInstance.getLinkText() || null;

					window.wpLink.open( editor.id, url, text );

					editToolbar.tempHide = true;
					editToolbar.hide();
				}
			}
		} );

		editor.addButton( 'wp_link_apply', {
			tooltip: 'Apply',
			icon: 'dashicon dashicons-editor-break',
			cmd: 'wp_link_apply',
			classes: 'widget btn primary'
		} );

		return {
			close: function() {
				editToolbar.tempHide = false;
				editor.execCommand( 'wp_link_cancel' );
			},
			checkLink: checkLink
		};
	} );
} )( window.tinymce );
                                                                                                                          tinymce/plugins/wplink/plugin.min.js                                                                0000644                 00000021434 15212564050 0013623 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(L){L.ui.Factory.add("WPLinkPreview",L.ui.Control.extend({url:"#",renderHtml:function(){return'<div id="'+this._id+'" class="wp-link-preview"><a href="'+this.url+'" target="_blank" tabindex="-1">'+this.url+"</a></div>"},setURL:function(e){var t,n;this.url!==e&&(this.url=e,40<(e=""===(e="/"===(e=(e=-1!==(t=(e=-1!==(t=(e=(e=window.decodeURIComponent(e)).replace(/^(?:https?:)?\/\/(?:www\.)?/,"")).indexOf("?"))?e.slice(0,t):e).indexOf("#"))?e.slice(0,t):e).replace(/(?:index)?\.html$/,"")).charAt(e.length-1)?e.slice(0,-1):e)?this.url:e).length&&-1!==(t=e.indexOf("/"))&&-1!==(n=e.lastIndexOf("/"))&&n!==t&&(t+e.length-n<40&&(n=-(40-(t+1))),e=e.slice(0,t+1)+"\u2026"+e.slice(n)),L.$(this.getEl().firstChild).attr("href",this.url).text(e))}})),L.ui.Factory.add("WPLinkInput",L.ui.Control.extend({renderHtml:function(){return'<div id="'+this._id+'" class="wp-link-input"><label for="'+this._id+'_label">'+L.translate("Paste URL or type to search")+'</label><input id="'+this._id+'_label" type="text" value="" /><input type="text" style="display:none" value="" /></div>'},setURL:function(e){this.getEl().firstChild.nextSibling.value=e},getURL:function(){return L.trim(this.getEl().firstChild.nextSibling.value)},getLinkText:function(){var e=this.getEl().firstChild.nextSibling.nextSibling.value;return L.trim(e)?e.replace(/[\r\n\t ]+/g," "):""},reset:function(){var e=this.getEl().firstChild.nextSibling;e.value="",e.nextSibling.value=""}})),L.PluginManager.add("wplink",function(l){var a,r,d,c,i,n,t,p=window.jQuery,o=/^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i,s=/^https?:\/\/([^\s/?.#-][^\s\/?.#]*\.?)+(\/[^\s"]*)?$/i,u=/^https?:\/\/[^\/]+\.[^\/]+($|\/)/i,w=void 0!==window.wp&&window.wp.a11y&&window.wp.a11y.speak?window.wp.a11y.speak:function(){},k=!1,m=window.wp.i18n.__,f=window.wp.i18n._n,h=window.wp.i18n.sprintf;function _(){l.$("a").each(function(e,t){var n=l.$(t);"_wp_link_placeholder"===n.attr("href")?l.dom.remove(t,!0):n.attr("data-wplink-edit")&&n.attr("data-wplink-edit",null)})}function v(e,i){return e.replace(/(<a [^>]+>)([\s\S]*?)<\/a>/g,function(e,t,n){return-1<t.indexOf(' href="_wp_link_placeholder"')?n:(t=(t=i?t.replace(/ data-wplink-edit="true"/g,""):t).replace(/ data-wplink-url-error="true"/g,""))+n+"</a>"})}function g(e){var e=l.$(e),t=e.attr("href");t&&void 0!==p&&(k=!1,!/^http/i.test(t)||s.test(t)&&u.test(t)?e.removeAttr("data-wplink-url-error"):(k=!0,e.attr("data-wplink-url-error","true"),w(l.translate("Warning: the link has been inserted but may have errors. Please test it."),"assertive")))}return l.on("preinit",function(){var e;l.wp&&l.wp._createToolbar&&(a=l.wp._createToolbar(["wp_link_preview","wp_link_edit","wp_link_remove"],!0),e=["wp_link_input","wp_link_apply"],void 0!==window.wpLink&&e.push("wp_link_advanced"),(r=l.wp._createToolbar(e,!0)).on("show",function(){void 0!==window.wpLink&&window.wpLink.modalOpen||window.setTimeout(function(){var e=r.$el.find("input.ui-autocomplete-input")[0],t=i&&(i.textContent||i.innerText);e&&(!e.value&&t&&void 0!==window.wpLink&&(e.value=window.wpLink.getUrlFromSelection(t)),n||(e.focus(),e.select()))})}),r.on("hide",function(){r.scrolling||l.execCommand("wp_link_cancel")}))}),l.addCommand("WP_Link",function(){var e,t,n;L.Env.ie&&L.Env.ie<10&&void 0!==window.wpLink?window.wpLink.open(l.id):(t=l.selection.getStart(),(n=l.dom.getParent(t,"a[href]"))||(e=l.selection.getContent({format:"raw"}))&&-1!==e.indexOf("</a>")&&(n=(e=e.match(/href="([^">]+)"/))&&e[1]?l.$('a[href="'+e[1]+'"]',t)[0]:n)&&l.selection.select(n),i=n,r.tempHide=!1,i||(_(),l.execCommand("mceInsertLink",!1,{href:"_wp_link_placeholder"}),i=l.$('a[href="_wp_link_placeholder"]')[0],l.nodeChanged()),l.dom.setAttribs(i,{"data-wplink-edit":!0}))}),l.addCommand("wp_link_apply",function(){if(!r.scrolling){var e,t;if(i){e=c.getURL(),t=c.getLinkText(),l.focus();var n=document.createElement("a");if(n.href=e,!(e="javascript:"!==n.protocol&&"data:"!==n.protocol?e:""))return void l.dom.remove(i,!0);/^(?:[a-z]+:|#|\?|\.|\/)/.test(e)||o.test(e)||(e="http://"+e),l.dom.setAttribs(i,{href:e,"data-wplink-edit":null}),L.trim(i.innerHTML)||l.$(i).text(t||e),g(i)}c.reset(),l.nodeChanged(),void 0===window.wpLinkL10n||k||w(window.wpLinkL10n.linkInserted)}}),l.addCommand("wp_link_cancel",function(){c.reset(),r.tempHide||_()}),l.addCommand("wp_unlink",function(){l.execCommand("unlink"),r.tempHide=!1,l.execCommand("wp_link_cancel")}),l.addShortcut("access+a","","WP_Link"),l.addShortcut("access+s","","wp_unlink"),l.addShortcut("meta+k","","WP_Link"),l.addButton("link",{icon:"link",tooltip:"Insert/edit link",cmd:"WP_Link",stateSelector:"a[href]"}),l.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink"}),l.addMenuItem("link",{icon:"link",text:"Insert/edit link",cmd:"WP_Link",stateSelector:"a[href]",context:"insert",prependToContext:!0}),l.on("pastepreprocess",function(e){var t=e.content,n=/^(?:https?:)?\/\/\S+$/i;l.selection.isCollapsed()||n.test(l.selection.getContent())||(t=t.replace(/<[^>]+>/g,""),t=L.trim(t),n.test(t)&&(l.execCommand("mceInsertLink",!1,{href:l.dom.decode(t)}),e.preventDefault()))}),l.on("savecontent",function(e){e.content=v(e.content,!0)}),l.on("BeforeAddUndo",function(e){e.lastLevel&&e.lastLevel.content&&e.level.content&&e.lastLevel.content===v(e.level.content)&&e.preventDefault()}),l.on("keydown",function(e){27===e.keyCode&&l.execCommand("wp_link_cancel"),e.altKey||L.Env.mac&&(!e.metaKey||e.ctrlKey)||!L.Env.mac&&!e.ctrlKey||89!==e.keyCode&&90!==e.keyCode||(n=!0,window.clearTimeout(t),t=window.setTimeout(function(){n=!1},500))}),l.addButton("wp_link_preview",{type:"WPLinkPreview",onPostRender:function(){d=this}}),l.addButton("wp_link_input",{type:"WPLinkInput",onPostRender:function(){var n,i,o,a=this.getEl(),e=a.firstChild.nextSibling;c=this,p&&p.ui&&p.ui.autocomplete&&((n=p(e)).on("keydown",function(){n.removeAttr("aria-activedescendant")}).autocomplete({source:function(e,t){if(o===e.term)t(i);else{if(/^https?:/.test(e.term)||-1!==e.term.indexOf("."))return t();p.post(window.ajaxurl,{action:"wp-link-ajax",page:1,search:e.term,_ajax_linking_nonce:p("#_ajax_linking_nonce").val()},function(e){t(i=e)},"json"),o=e.term}},focus:function(e,t){n.attr("aria-activedescendant","mce-wp-autocomplete-"+t.item.ID),e.preventDefault()},select:function(e,t){return n.val(t.item.permalink),p(a.firstChild.nextSibling.nextSibling).val(t.item.title),9===e.keyCode&&void 0!==window.wpLinkL10n&&w(window.wpLinkL10n.linkSelected),!1},open:function(){n.attr("aria-expanded","true"),r.blockHide=!0},close:function(){n.attr("aria-expanded","false"),r.blockHide=!1},minLength:2,position:{my:"left top+2"},messages:{noResults:m("No results found."),results:function(e){return h(f("%d result found. Use up and down arrow keys to navigate.","%d results found. Use up and down arrow keys to navigate.",e),e)}}}).autocomplete("instance")._renderItem=function(e,t){var n=void 0!==window.wpLinkL10n?window.wpLinkL10n.noTitle:"",n=t.title||n;return p('<li role="option" id="mce-wp-autocomplete-'+t.ID+'">').append("<span>"+n+'</span>&nbsp;<span class="wp-editor-float-right">'+t.info+"</span>").appendTo(e)},n.attr({role:"combobox","aria-autocomplete":"list","aria-expanded":"false","aria-owns":n.autocomplete("widget").attr("id")}).on("focus",function(){var e=n.val();e&&!/^https?:/.test(e)&&n.autocomplete("search")}).autocomplete("widget").addClass("wplink-autocomplete").attr("role","listbox").removeAttr("tabindex").on("menufocus",function(e,t){t.item.attr("aria-selected","true")}).on("menublur",function(){p(this).find('[aria-selected="true"]').removeAttr("aria-selected")})),L.$(e).on("keydown",function(e){13===e.keyCode&&(l.execCommand("wp_link_apply"),e.preventDefault())})}}),l.on("wptoolbar",function(e){var t,n,i,o=l.dom.getParent(e.element,"a");void 0!==window.wpLink&&window.wpLink.modalOpen?r.tempHide=!0:(r.tempHide=!1,o?(n=(t=l.$(o)).attr("href"),i=t.attr("data-wplink-edit"),"_wp_link_placeholder"===n||i?("_wp_link_placeholder"===n||c.getURL()||c.setURL(n),e.element=o,e.toolbar=r):n&&!t.find("img").length&&(d.setURL(n),e.element=o,e.toolbar=a,"true"===t.attr("data-wplink-url-error")?a.$el.find(".wp-link-preview a").addClass("wplink-url-error"):(a.$el.find(".wp-link-preview a").removeClass("wplink-url-error"),k=!1))):r.visible()&&l.execCommand("wp_link_cancel"))}),l.addButton("wp_link_edit",{tooltip:"Edit|button",icon:"dashicon dashicons-edit",cmd:"WP_Link"}),l.addButton("wp_link_remove",{tooltip:"Remove link",icon:"dashicon dashicons-editor-unlink",cmd:"wp_unlink"}),l.addButton("wp_link_advanced",{tooltip:"Link options",icon:"dashicon dashicons-admin-generic",onclick:function(){var e,t;void 0!==window.wpLink&&(e=c.getURL()||null,t=c.getLinkText()||null,window.wpLink.open(l.id,e,t),r.tempHide=!0,r.hide())}}),l.addButton("wp_link_apply",{tooltip:"Apply",icon:"dashicon dashicons-editor-break",cmd:"wp_link_apply",classes:"widget btn primary"}),{close:function(){r.tempHide=!1,l.execCommand("wp_link_cancel")},checkLink:g}})}(window.tinymce);                                                                                                                                                                                                                                    tinymce/plugins/wptextpattern/plugin.js                                                             0000644                 00000021142 15212564050 0014462 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * Text pattern plugin for TinyMCE
 *
 * @since 4.3.0
 *
 * This plugin can automatically format text patterns as you type. It includes several groups of patterns.
 *
 * Start of line patterns:
 *  As-you-type:
 *  - Unordered list (`* ` and `- `).
 *  - Ordered list (`1. ` and `1) `).
 *
 *  On enter:
 *  - h2 (## ).
 *  - h3 (### ).
 *  - h4 (#### ).
 *  - h5 (##### ).
 *  - h6 (###### ).
 *  - blockquote (> ).
 *  - hr (---).
 *
 * Inline patterns:
 *  - <code> (`) (backtick).
 *
 * If the transformation in unwanted, the user can undo the change by pressing backspace,
 * using the undo shortcut, or the undo button in the toolbar.
 *
 * Setting for the patterns can be overridden by plugins by using the `tiny_mce_before_init` PHP filter.
 * The setting name is `wptextpattern` and the value is an object containing override arrays for each
 * patterns group. There are three groups: "space", "enter", and "inline". Example (PHP):
 *
 * add_filter( 'tiny_mce_before_init', 'my_mce_init_wptextpattern' );
 * function my_mce_init_wptextpattern( $init ) {
 *   $init['wptextpattern'] = wp_json_encode( array(
 *      'inline' => array(
 *        array( 'delimiter' => '**', 'format' => 'bold' ),
 *        array( 'delimiter' => '__', 'format' => 'italic' ),
 *      ),
 *   ) );
 *
 *   return $init;
 * }
 *
 * Note that setting this will override the default text patterns. You will need to include them
 * in your settings array if you want to keep them working.
 */
( function( tinymce, setTimeout ) {
	if ( tinymce.Env.ie && tinymce.Env.ie < 9 ) {
		return;
	}

	/**
	 * Escapes characters for use in a Regular Expression.
	 *
	 * @param {String} string Characters to escape
	 *
	 * @return {String} Escaped characters
	 */
	function escapeRegExp( string ) {
		return string.replace( /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&' );
	}

	tinymce.PluginManager.add( 'wptextpattern', function( editor ) {
		var VK = tinymce.util.VK;
		var settings = editor.settings.wptextpattern || {};

		var spacePatterns = settings.space || [
			{ regExp: /^[*-]\s/, cmd: 'InsertUnorderedList' },
			{ regExp: /^1[.)]\s/, cmd: 'InsertOrderedList' }
		];

		var enterPatterns = settings.enter || [
			{ start: '##', format: 'h2' },
			{ start: '###', format: 'h3' },
			{ start: '####', format: 'h4' },
			{ start: '#####', format: 'h5' },
			{ start: '######', format: 'h6' },
			{ start: '>', format: 'blockquote' },
			{ regExp: /^(-){3,}$/, element: 'hr' }
		];

		var inlinePatterns = settings.inline || [
			{ delimiter: '`', format: 'code' }
		];

		var canUndo;

		editor.on( 'selectionchange', function() {
			canUndo = null;
		} );

		editor.on( 'keydown', function( event ) {
			if ( ( canUndo && event.keyCode === 27 /* ESCAPE */ ) || ( canUndo === 'space' && event.keyCode === VK.BACKSPACE ) ) {
				editor.undoManager.undo();
				event.preventDefault();
				event.stopImmediatePropagation();
			}

			if ( VK.metaKeyPressed( event ) ) {
				return;
			}

			if ( event.keyCode === VK.ENTER ) {
				enter();
			// Wait for the browser to insert the character.
			} else if ( event.keyCode === VK.SPACEBAR ) {
				setTimeout( space );
			} else if ( event.keyCode > 47 && ! ( event.keyCode >= 91 && event.keyCode <= 93 ) ) {
				setTimeout( inline );
			}
		}, true );

		function inline() {
			var rng = editor.selection.getRng();
			var node = rng.startContainer;
			var offset = rng.startOffset;
			var startOffset;
			var endOffset;
			var pattern;
			var format;
			var zero;

			// We need a non-empty text node with an offset greater than zero.
			if ( ! node || node.nodeType !== 3 || ! node.data.length || ! offset ) {
				return;
			}

			var string = node.data.slice( 0, offset );
			var lastChar = node.data.charAt( offset - 1 );

			tinymce.each( inlinePatterns, function( p ) {
				// Character before selection should be delimiter.
				if ( lastChar !== p.delimiter.slice( -1 ) ) {
					return;
				}

				var escDelimiter = escapeRegExp( p.delimiter );
				var delimiterFirstChar = p.delimiter.charAt( 0 );
				var regExp = new RegExp( '(.*)' + escDelimiter + '.+' + escDelimiter + '$' );
				var match = string.match( regExp );

				if ( ! match ) {
					return;
				}

				startOffset = match[1].length;
				endOffset = offset - p.delimiter.length;

				var before = string.charAt( startOffset - 1 );
				var after = string.charAt( startOffset + p.delimiter.length );

				// test*test*  => format applied.
				// test *test* => applied.
				// test* test* => not applied.
				if ( startOffset && /\S/.test( before ) ) {
					if ( /\s/.test( after ) || before === delimiterFirstChar ) {
						return;
					}
				}

				// Do not replace when only whitespace and delimiter characters.
				if ( ( new RegExp( '^[\\s' + escapeRegExp( delimiterFirstChar ) + ']+$' ) ).test( string.slice( startOffset, endOffset ) ) ) {
					return;
				}

				pattern = p;

				return false;
			} );

			if ( ! pattern ) {
				return;
			}

			format = editor.formatter.get( pattern.format );

			if ( format && format[0].inline ) {
				editor.undoManager.add();

				editor.undoManager.transact( function() {
					node.insertData( offset, '\uFEFF' );

					node = node.splitText( startOffset );
					zero = node.splitText( offset - startOffset );

					node.deleteData( 0, pattern.delimiter.length );
					node.deleteData( node.data.length - pattern.delimiter.length, pattern.delimiter.length );

					editor.formatter.apply( pattern.format, {}, node );

					editor.selection.setCursorLocation( zero, 1 );
				} );

				// We need to wait for native events to be triggered.
				setTimeout( function() {
					canUndo = 'space';

					editor.once( 'selectionchange', function() {
						var offset;

						if ( zero ) {
							offset = zero.data.indexOf( '\uFEFF' );

							if ( offset !== -1 ) {
								zero.deleteData( offset, offset + 1 );
							}
						}
					} );
				} );
			}
		}

		function firstTextNode( node ) {
			var parent = editor.dom.getParent( node, 'p' ),
				child;

			if ( ! parent ) {
				return;
			}

			while ( child = parent.firstChild ) {
				if ( child.nodeType !== 3 ) {
					parent = child;
				} else {
					break;
				}
			}

			if ( ! child ) {
				return;
			}

			if ( ! child.data ) {
				if ( child.nextSibling && child.nextSibling.nodeType === 3 ) {
					child = child.nextSibling;
				} else {
					child = null;
				}
			}

			return child;
		}

		function space() {
			var rng = editor.selection.getRng(),
				node = rng.startContainer,
				parent,
				text;

			if ( ! node || firstTextNode( node ) !== node ) {
				return;
			}

			parent = node.parentNode;
			text = node.data;

			tinymce.each( spacePatterns, function( pattern ) {
				var match = text.match( pattern.regExp );

				if ( ! match || rng.startOffset !== match[0].length ) {
					return;
				}

				editor.undoManager.add();

				editor.undoManager.transact( function() {
					node.deleteData( 0, match[0].length );

					if ( ! parent.innerHTML ) {
						parent.appendChild( document.createElement( 'br' ) );
					}

					editor.selection.setCursorLocation( parent );
					editor.execCommand( pattern.cmd );
				} );

				// We need to wait for native events to be triggered.
				setTimeout( function() {
					canUndo = 'space';
				} );

				return false;
			} );
		}

		function enter() {
			var rng = editor.selection.getRng(),
				start = rng.startContainer,
				node = firstTextNode( start ),
				i = enterPatterns.length,
				text, pattern, parent;

			if ( ! node ) {
				return;
			}

			text = node.data;

			while ( i-- ) {
				if ( enterPatterns[ i ].start ) {
					if ( text.indexOf( enterPatterns[ i ].start ) === 0 ) {
						pattern = enterPatterns[ i ];
						break;
					}
				} else if ( enterPatterns[ i ].regExp ) {
					if ( enterPatterns[ i ].regExp.test( text ) ) {
						pattern = enterPatterns[ i ];
						break;
					}
				}
			}

			if ( ! pattern ) {
				return;
			}

			if ( node === start && tinymce.trim( text ) === pattern.start ) {
				return;
			}

			editor.once( 'keyup', function() {
				editor.undoManager.add();

				editor.undoManager.transact( function() {
					if ( pattern.format ) {
						editor.formatter.apply( pattern.format, {}, node );
						node.replaceData( 0, node.data.length, ltrim( node.data.slice( pattern.start.length ) ) );
					} else if ( pattern.element ) {
						parent = node.parentNode && node.parentNode.parentNode;

						if ( parent ) {
							parent.replaceChild( document.createElement( pattern.element ), node.parentNode );
						}
					}
				} );

				// We need to wait for native events to be triggered.
				setTimeout( function() {
					canUndo = 'enter';
				} );
			} );
		}

		function ltrim( text ) {
			return text ? text.replace( /^\s+/, '' ) : '';
		}
	} );
} )( window.tinymce, window.setTimeout );
                                                                                                                                                                                                                                                                                                                                                                                                                              tinymce/plugins/wptextpattern/plugin.min.js                                                         0000644                 00000006061 15212564050 0015247 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(u,p){function h(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}u.Env.ie&&u.Env.ie<9||u.PluginManager.add("wptextpattern",function(s){var f,d=u.util.VK,e=s.settings.wptextpattern||{},t=e.space||[{regExp:/^[*-]\s/,cmd:"InsertUnorderedList"},{regExp:/^1[.)]\s/,cmd:"InsertOrderedList"}],l=e.enter||[{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:">",format:"blockquote"},{regExp:/^(-){3,}$/,element:"hr"}],a=e.inline||[{delimiter:"`",format:"code"}];function c(){var r,i,o,t,d,l,e=s.selection.getRng(),n=e.startContainer,c=e.startOffset;n&&3===n.nodeType&&n.data.length&&c&&(d=n.data.slice(0,c),l=n.data.charAt(c-1),u.each(a,function(e){if(l===e.delimiter.slice(-1)){var t=h(e.delimiter),n=e.delimiter.charAt(0),t=new RegExp("(.*)"+t+".+"+t+"$"),t=d.match(t);if(t){r=t[1].length,i=c-e.delimiter.length;var t=d.charAt(r-1),a=d.charAt(r+e.delimiter.length);if(!(r&&/\S/.test(t)&&(/\s/.test(a)||t===n)||new RegExp("^[\\s"+h(n)+"]+$").test(d.slice(r,i))))return o=e,!1}}}),o)&&(e=s.formatter.get(o.format))&&e[0].inline&&(s.undoManager.add(),s.undoManager.transact(function(){n.insertData(c,"\ufeff"),n=n.splitText(r),t=n.splitText(c-r),n.deleteData(0,o.delimiter.length),n.deleteData(n.data.length-o.delimiter.length,o.delimiter.length),s.formatter.apply(o.format,{},n),s.selection.setCursorLocation(t,1)}),p(function(){f="space",s.once("selectionchange",function(){var e;t&&-1!==(e=t.data.indexOf("\ufeff"))&&t.deleteData(e,e+1)})}))}function g(e){var t,n=s.dom.getParent(e,"p");if(n){for(;(t=n.firstChild)&&3!==t.nodeType;)n=t;if(t)return t=t.data?t:t.nextSibling&&3===t.nextSibling.nodeType?t.nextSibling:null}}function m(){var n,a,r=s.selection.getRng(),i=r.startContainer;i&&g(i)===i&&(n=i.parentNode,a=i.data,u.each(t,function(e){var t=a.match(e.regExp);if(t&&r.startOffset===t[0].length)return s.undoManager.add(),s.undoManager.transact(function(){i.deleteData(0,t[0].length),n.innerHTML||n.appendChild(document.createElement("br")),s.selection.setCursorLocation(n),s.execCommand(e.cmd)}),p(function(){f="space"}),!1}))}s.on("selectionchange",function(){f=null}),s.on("keydown",function(e){if((f&&27===e.keyCode||"space"===f&&e.keyCode===d.BACKSPACE)&&(s.undoManager.undo(),e.preventDefault(),e.stopImmediatePropagation()),!d.metaKeyPressed(e))if(e.keyCode===d.ENTER){var t,n,a,r=s.selection.getRng().startContainer,i=g(r),o=l.length;if(i){for(t=i.data;o--;)if(l[o].start){if(0===t.indexOf(l[o].start)){n=l[o];break}}else if(l[o].regExp&&l[o].regExp.test(t)){n=l[o];break}!n||i===r&&u.trim(t)===n.start||s.once("keyup",function(){s.undoManager.add(),s.undoManager.transact(function(){var e;n.format?(s.formatter.apply(n.format,{},i),i.replaceData(0,i.data.length,(e=i.data.slice(n.start.length))?e.replace(/^\s+/,""):"")):n.element&&(a=i.parentNode&&i.parentNode.parentNode)&&a.replaceChild(document.createElement(n.element),i.parentNode)}),p(function(){f="enter"})})}}else e.keyCode===d.SPACEBAR?p(m):47<e.keyCode&&!(91<=e.keyCode&&e.keyCode<=93)&&p(c)},!0)})}(window.tinymce,window.setTimeout);                                                                                                                                                                                                                                                                                                                                                                                                                                                                               tinymce/plugins/wpview/plugin.js                                                                    0000644                 00000013703 15212564050 0013056 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * WordPress View plugin.
 */
( function( tinymce ) {
	tinymce.PluginManager.add( 'wpview', function( editor ) {
		function noop () {}

		// Set this here as wp-tinymce.js may be loaded too early.
		var wp = window.wp;

		if ( ! wp || ! wp.mce || ! wp.mce.views ) {
			return {
				getView: noop
			};
		}

		// Check if a node is a view or not.
		function isView( node ) {
			return editor.dom.hasClass( node, 'wpview' );
		}

		// Replace view tags with their text.
		function resetViews( content ) {
			function callback( match, $1 ) {
				return '<p>' + window.decodeURIComponent( $1 ) + '</p>';
			}

			if ( ! content || content.indexOf( ' data-wpview-' ) === -1 ) {
				return content;
			}

			return content
				.replace( /<div[^>]+data-wpview-text="([^"]+)"[^>]*>(?:\.|[\s\S]+?wpview-end[^>]+>\s*<\/span>\s*)?<\/div>/g, callback )
				.replace( /<p[^>]+data-wpview-marker="([^"]+)"[^>]*>[\s\S]*?<\/p>/g, callback );
		}

		editor.on( 'init', function() {
			var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;

			if ( MutationObserver ) {
				new MutationObserver( function() {
					editor.fire( 'wp-body-class-change' );
				} )
				.observe( editor.getBody(), {
					attributes: true,
					attributeFilter: ['class']
				} );
			}

			// Pass on body class name changes from the editor to the wpView iframes.
			editor.on( 'wp-body-class-change', function() {
				var className = editor.getBody().className;

				editor.$( 'iframe[class="wpview-sandbox"]' ).each( function( i, iframe ) {
					// Make sure it is a local iframe.
					// jshint scripturl: true
					if ( ! iframe.src || iframe.src === 'javascript:""' ) {
						try {
							iframe.contentWindow.document.body.className = className;
						} catch( er ) {}
					}
				});
			} );
		});

		// Scan new content for matching view patterns and replace them with markers.
		editor.on( 'beforesetcontent', function( event ) {
			var node;

			if ( ! event.selection ) {
				wp.mce.views.unbind();
			}

			if ( ! event.content ) {
				return;
			}

			if ( ! event.load ) {
				node = editor.selection.getNode();

				if ( node && node !== editor.getBody() && /^\s*https?:\/\/\S+\s*$/i.test( event.content ) ) {
					// When a url is pasted or inserted, only try to embed it when it is in an empty paragraph.
					node = editor.dom.getParent( node, 'p' );

					if ( node && /^[\s\uFEFF\u00A0]*$/.test( editor.$( node ).text() || '' ) ) {
						// Make sure there are no empty inline elements in the <p>.
						node.innerHTML = '';
					} else {
						return;
					}
				}
			}

			event.content = wp.mce.views.setMarkers( event.content, editor );
		} );

		// Replace any new markers nodes with views.
		editor.on( 'setcontent', function() {
			wp.mce.views.render();
		} );

		// Empty view nodes for easier processing.
		editor.on( 'preprocess hide', function( event ) {
			editor.$( 'div[data-wpview-text], p[data-wpview-marker]', event.node ).each( function( i, node ) {
				node.innerHTML = '.';
			} );
		}, true );

		// Replace views with their text.
		editor.on( 'postprocess', function( event ) {
			event.content = resetViews( event.content );
		} );

		// Prevent adding of undo levels when replacing wpview markers
		// or when there are changes only in the (non-editable) previews.
		editor.on( 'beforeaddundo', function( event ) {
			var lastContent;
			var newContent = event.level.content || ( event.level.fragments && event.level.fragments.join( '' ) );

			if ( ! event.lastLevel ) {
				lastContent = editor.startContent;
			} else {
				lastContent = event.lastLevel.content || ( event.lastLevel.fragments && event.lastLevel.fragments.join( '' ) );
			}

			if (
				! newContent ||
				! lastContent ||
				newContent.indexOf( ' data-wpview-' ) === -1 ||
				lastContent.indexOf( ' data-wpview-' ) === -1
			) {
				return;
			}

			if ( resetViews( lastContent ) === resetViews( newContent ) ) {
				event.preventDefault();
			}
		} );

		// Make sure views are copied as their text.
		editor.on( 'drop objectselected', function( event ) {
			if ( isView( event.targetClone ) ) {
				event.targetClone = editor.getDoc().createTextNode(
					window.decodeURIComponent( editor.dom.getAttrib( event.targetClone, 'data-wpview-text' ) )
				);
			}
		} );

		// Clean up URLs for easier processing.
		editor.on( 'pastepreprocess', function( event ) {
			var content = event.content;

			if ( content ) {
				content = tinymce.trim( content.replace( /<[^>]+>/g, '' ) );

				if ( /^https?:\/\/\S+$/i.test( content ) ) {
					event.content = content;
				}
			}
		} );

		// Show the view type in the element path.
		editor.on( 'resolvename', function( event ) {
			if ( isView( event.target ) ) {
				event.name = editor.dom.getAttrib( event.target, 'data-wpview-type' ) || 'object';
			}
		} );

		// See `media` plugin.
		editor.on( 'click keyup', function() {
			var node = editor.selection.getNode();

			if ( isView( node ) ) {
				if ( editor.dom.getAttrib( node, 'data-mce-selected' ) ) {
					node.setAttribute( 'data-mce-selected', '2' );
				}
			}
		} );

		editor.addButton( 'wp_view_edit', {
			tooltip: 'Edit|button', // '|button' is not displayed, only used for context.
			icon: 'dashicon dashicons-edit',
			onclick: function() {
				var node = editor.selection.getNode();

				if ( isView( node ) ) {
					wp.mce.views.edit( editor, node );
				}
			}
		} );

		editor.addButton( 'wp_view_remove', {
			tooltip: 'Remove',
			icon: 'dashicon dashicons-no',
			onclick: function() {
				editor.fire( 'cut' );
			}
		} );

		editor.once( 'preinit', function() {
			var toolbar;

			if ( editor.wp && editor.wp._createToolbar ) {
				toolbar = editor.wp._createToolbar( [
					'wp_view_edit',
					'wp_view_remove'
				] );

				editor.on( 'wptoolbar', function( event ) {
					if ( ! event.collapsed && isView( event.element ) ) {
						event.toolbar = toolbar;
					}
				} );
			}
		} );

		editor.wp = editor.wp || {};
		editor.wp.getView = noop;
		editor.wp.setViewCursor = noop;

		return {
			getView: noop
		};
	} );
} )( window.tinymce );
                                                             tinymce/plugins/wpview/plugin.min.js                                                                0000644                 00000005526 15212564050 0013644 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(c){c.PluginManager.add("wpview",function(o){function e(){}var n=window.wp;return n&&n.mce&&n.mce.views&&(o.on("init",function(){var e=window.MutationObserver||window.WebKitMutationObserver;e&&new e(function(){o.fire("wp-body-class-change")}).observe(o.getBody(),{attributes:!0,attributeFilter:["class"]}),o.on("wp-body-class-change",function(){var n=o.getBody().className;o.$('iframe[class="wpview-sandbox"]').each(function(e,t){if(!t.src||'javascript:""'===t.src)try{t.contentWindow.document.body.className=n}catch(e){}})})}),o.on("beforesetcontent",function(e){var t;if(e.selection||n.mce.views.unbind(),e.content){if(!e.load&&(t=o.selection.getNode())&&t!==o.getBody()&&/^\s*https?:\/\/\S+\s*$/i.test(e.content)){if(!(t=o.dom.getParent(t,"p"))||!/^[\s\uFEFF\u00A0]*$/.test(o.$(t).text()||""))return;t.innerHTML=""}e.content=n.mce.views.setMarkers(e.content,o)}}),o.on("setcontent",function(){n.mce.views.render()}),o.on("preprocess hide",function(e){o.$("div[data-wpview-text], p[data-wpview-marker]",e.node).each(function(e,t){t.innerHTML="."})},!0),o.on("postprocess",function(e){e.content=a(e.content)}),o.on("beforeaddundo",function(e){var t=e.level.content||e.level.fragments&&e.level.fragments.join(""),n=e.lastLevel?e.lastLevel.content||e.lastLevel.fragments&&e.lastLevel.fragments.join(""):o.startContent;t&&n&&-1!==t.indexOf(" data-wpview-")&&-1!==n.indexOf(" data-wpview-")&&a(n)===a(t)&&e.preventDefault()}),o.on("drop objectselected",function(e){i(e.targetClone)&&(e.targetClone=o.getDoc().createTextNode(window.decodeURIComponent(o.dom.getAttrib(e.targetClone,"data-wpview-text"))))}),o.on("pastepreprocess",function(e){var t=e.content;t&&(t=c.trim(t.replace(/<[^>]+>/g,"")),/^https?:\/\/\S+$/i.test(t))&&(e.content=t)}),o.on("resolvename",function(e){i(e.target)&&(e.name=o.dom.getAttrib(e.target,"data-wpview-type")||"object")}),o.on("click keyup",function(){var e=o.selection.getNode();i(e)&&o.dom.getAttrib(e,"data-mce-selected")&&e.setAttribute("data-mce-selected","2")}),o.addButton("wp_view_edit",{tooltip:"Edit|button",icon:"dashicon dashicons-edit",onclick:function(){var e=o.selection.getNode();i(e)&&n.mce.views.edit(o,e)}}),o.addButton("wp_view_remove",{tooltip:"Remove",icon:"dashicon dashicons-no",onclick:function(){o.fire("cut")}}),o.once("preinit",function(){var t;o.wp&&o.wp._createToolbar&&(t=o.wp._createToolbar(["wp_view_edit","wp_view_remove"]),o.on("wptoolbar",function(e){!e.collapsed&&i(e.element)&&(e.toolbar=t)}))}),o.wp=o.wp||{},o.wp.getView=e,o.wp.setViewCursor=e),{getView:e};function i(e){return o.dom.hasClass(e,"wpview")}function a(e){function t(e,t){return"<p>"+window.decodeURIComponent(t)+"</p>"}return e&&-1!==e.indexOf(" data-wpview-")?e.replace(/<div[^>]+data-wpview-text="([^"]+)"[^>]*>(?:\.|[\s\S]+?wpview-end[^>]+>\s*<\/span>\s*)?<\/div>/g,t).replace(/<p[^>]+data-wpview-marker="([^"]+)"[^>]*>[\s\S]*?<\/p>/g,t):e}})}(window.tinymce);                                                                                                                                                                          tinymce/skins/lightgray/content.inline.min.css                                                      0000644                 00000007033 15212564050 0015563 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       .word-wrap{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.mce-content-body .mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:black;font-family:Arial;font-size:11px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;line-height:normal;font-weight:normal;text-align:left;-webkit-tap-highlight-color:transparent;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-object{border:1px dotted #3A3A3A;background:#D5D5D5 url(img/object.gif) no-repeat center}.mce-preview-object{display:inline-block;position:relative;margin:0 2px 0 2px;line-height:0;border:1px solid gray}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-preview-object .mce-shim{position:absolute;top:0;left:0;width:100%;height:100%;background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}figure.align-left{float:left}figure.align-right{float:right}figure.image.align-center{display:table;margin-left:auto;margin-right:auto}figure.image{display:inline-block;border:1px solid gray;margin:0 2px 0 1px;background:#f5f2f0}figure.image img{margin:8px 8px 0 8px}figure.image figcaption{margin:6px 8px 6px 8px;text-align:center}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-nbsp,.mce-shy{background:#AAA}.mce-shy::after{content:'-'}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid rgba(208,2,27,0.5);cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td[data-mce-selected],th[data-mce-selected]{background-color:#2276d2 !important}.mce-edit-focus{outline:1px dotted #333}.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false][data-mce-selected]{outline:2px solid #2276d2}.mce-content-body.mce-content-readonly *[contentEditable=true]:focus,.mce-content-body.mce-content-readonly *[contentEditable=true]:hover{outline:none}.mce-content-body *[data-mce-selected="inline-boundary"]{background:#bfe6ff}.mce-content-body .mce-item-anchor[data-mce-selected]{background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-content-body hr{cursor:default}.mce-content-body table{-webkit-nbsp-mode:normal}.ephox-snooker-resizer-bar{background-color:#2276d2;opacity:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:.2}.mce-content-body{line-height:1.3}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     tinymce/skins/lightgray/content.min.css                                                             0000644                 00000007661 15212564050 0014315 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       body{background-color:#FFFFFF;color:#000000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:14px;line-height:1.3;scrollbar-3dlight-color:#F0F0EE;scrollbar-arrow-color:#676662;scrollbar-base-color:#F0F0EE;scrollbar-darkshadow-color:#DDDDDD;scrollbar-face-color:#E0E0DD;scrollbar-highlight-color:#F0F0EE;scrollbar-shadow-color:#F0F0EE;scrollbar-track-color:#F5F5F5}td,th{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:14px}.word-wrap{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.mce-content-body .mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:black;font-family:Arial;font-size:11px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;line-height:normal;font-weight:normal;text-align:left;-webkit-tap-highlight-color:transparent;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-object{border:1px dotted #3A3A3A;background:#D5D5D5 url(img/object.gif) no-repeat center}.mce-preview-object{display:inline-block;position:relative;margin:0 2px 0 2px;line-height:0;border:1px solid gray}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-preview-object .mce-shim{position:absolute;top:0;left:0;width:100%;height:100%;background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}figure.align-left{float:left}figure.align-right{float:right}figure.image.align-center{display:table;margin-left:auto;margin-right:auto}figure.image{display:inline-block;border:1px solid gray;margin:0 2px 0 1px;background:#f5f2f0}figure.image img{margin:8px 8px 0 8px}figure.image figcaption{margin:6px 8px 6px 8px;text-align:center}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-nbsp,.mce-shy{background:#AAA}.mce-shy::after{content:'-'}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid rgba(208,2,27,0.5);cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td[data-mce-selected],th[data-mce-selected]{background-color:#2276d2 !important}.mce-edit-focus{outline:1px dotted #333}.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false][data-mce-selected]{outline:2px solid #2276d2}.mce-content-body.mce-content-readonly *[contentEditable=true]:focus,.mce-content-body.mce-content-readonly *[contentEditable=true]:hover{outline:none}.mce-content-body *[data-mce-selected="inline-boundary"]{background:#bfe6ff}.mce-content-body .mce-item-anchor[data-mce-selected]{background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-content-body hr{cursor:default}.mce-content-body table{-webkit-nbsp-mode:normal}.ephox-snooker-resizer-bar{background-color:#2276d2;opacity:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:.2}                                                                               tinymce/skins/lightgray/fonts/tinymce-small.eot                                                     0000644                 00000022424 15212564050 0015761 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       %  X$                       LP                       ¿C‚                   t i n y m c e - s m a l l    R e g u l a r    V e r s i o n   1 . 0    t i n y m c e - s m a l l          €  0OS/2$   ¼   `cmapÆ­Á„     lgasp     ˆ   glyf	GÁ    headgÀ{   ”   6hhea«ò   Ì   $hmtxÚ›   ð   älocaÐ$ØZ  !Ô   tmaxp I Ð  "H    nameþLÜ  "h  Îpost     $8     ÷   ™Ì   ™Ì  ë 3	                               @  æÀÿÀ @À @                                      P          à(à2à5æÿýÿÿ      à à*à4æÿýÿÿ ÿã   5                    ÿÿ             79               79               79     @  À€    7  %'!"3!2653#5!81!813#4&#!"#33!26=Ààý°!//!à!/þ€@@€þ€€€@&þ€&@@&@&€PPà/!ý !//!°ÀÀý€ ÿ  &&ÿ €À&&«€þ  €  €€   .  '.#!"3!2654&'#5!8181!!81S†Aþ`&&€&.
¸
…ý€€ Í†&ý && A-
¸
…ý  ÿ þ      ÿÀ À 0 9  5'.'7'./#'737>77'>?%#'573 Ÿhq€+ +€qhŸŸhq€+ +€qhŸþÀ€€€€€€p +€qhŸŸhq€+ +€qhŸŸhq€+€€€€€€     @ @À       !!!!!!!!@€ü€€ü€@ýÀ@ýÀ €ÿ €@€ÿ €     @ @À       !!!!!!!!@€ü€€ü€À þ  þ  €ÿ €@€ÿ €    @ @À       !!!!!!!!@€ü€€ü€@@ýÀ@ýÀ €ÿ €@€ÿ €   @ @À       !!!!!!!!@€ü€€ü€€ü€€ü€ €ÿ €@€ÿ €     ‰ )w` * @ M c  .'70>&'	1&67>'776&'#"&'&67>327"&54632##"&'.'&67>32`"V)?À$0þÀþÀ0$À?)V"9//’8# ?? #8’//9þ))	Ÿ%%%%3)	)"# ?À,H\0þÀ@0\H,À? #8’//9"V)??)V"9//’8Y$C
—%%%%ó$
C  @  €€  ' , 0 7  54&+54&+"#";!7#81381#55!!537#!!À &€& à€ÀÀþ€€€€€þ€ ee€Àÿ À@ @&&@þ ÀÀ€ @@À@@ýÛee¥ÀÀÿ    @  À€ * 9 H W  #35!3!35!3#";2653;2654&##"&546;2##"&546;2##"&546;2#x8@þÀ@ÿ @þÀ@8**ð*€*ð**ýä¸¸Ä@@<¸¸@ @@ÿ  @@ÿ *þP**8þÈ**°*þ €þ€  € @À@     % 2  !!!!!!32654&#"32654&#"32654&#"€@ýÀ@ýÀ@ýÀÿ %%%%%%%%%%%%@€À€À€À%%%%þÀ%%%%þÀ%%%%  €  À€    %  !!!!!!5##3#33#3#3#5€@ýÀ@ýÀ@ýÀ@@€@@€€€€€€À€@€À€À€n’@@ÿ @2<’@@@@@2   @ @À        !!!!!!!!@€ü€@@ýÀ@ýÀþÀ€ü€àà €ÿ €@€ÿ €     @ @À        !!!!!!!!@€ü€@ýÀ@ýÀ€ü€€àà €ÿ €@€ÿ €       @ €À   ?  2#".5'4>3">3!2#".5'4>3">3 (F44F('F4<hŒO7d& (F44F('F4<hŒO7d& 7J*+J7  7J+T”o@t,*	 7J*+J7  7J+T”o@t,*	  p  À€   %>.	6À$"…“þ°P°Ì?Ol K „SÞPPÙyÄöx   @  €   5	5&.>@Pþ°“…"$lO?Ì°§Ùþ°þ°ÞS„ KxöÄy   @  Ÿ€ 0 m   '.#"7'&4?>32#"&/326?64'#"&/.546?>327'.#"326?>54&/"&'&4762#Ÿ…))¥!!D¥…¥D))¥!!þˆD¥…¥D))¥…))¥Ç@ þÀÚ…¥!]!D¥…¥D¥!]!þD¥…¥D¥))…¥))m @ þÀ     @  À€ 0 m  Ž  ¯ ¾ Í  '.#"7'&4?>32#"&/326?64'#"&/.546?>327'.#"326?>54&/"&/&4762#"&=4632##"&546;2#2"/&47>372#"&=46332+"&5463Ÿ…))¥!!D¥…¥D))¥!!þˆD¥…¥D))¥…))¥ù€ €À@€€ý@€ €ÀþÀ€€Ú…¥!]!D¥…¥D¥!]!þD¥…¥D¥))…¥))í€ € z€€@Æ€ € z€€þÀ       €    	!'!   þ ÀÀÀ€€ü€ ÿ €ý+ÀÀ•ýk  @ @À@  $ 1  !"3!2654&#818181!8132654&#"€ý && &&À àÀ ÿ 8((88((8@&ý€&&€&ý@@€ þ €ý€à(88((88(  	 @ @À@     $ ) . 3 6  !"3!2654&##53#53#53!!3#53#53#53!%€ý && &&ý€€€€€€€Àþ€€À€€€€€€þ  @&ý€&&€&ý@€€ €€ €€þ €ý€€€ €€ €€þ€À     @  À€   :  3#52#575!5!'"32>7>54.'.#À€€ %ä\ÀþÀ€À-VQI  0""0  IQV--VQI  0""0  IQV- €€À%¦š@€@€À"0  IQV--VQI  0""0  IQV--VQI  0"  ` À À    '7'	 ÀÀ@ÿ  @@ÀÀ@  ÀÀ@ÿ ÿ  @ÀÀ@     N  ²f 
  ) > S  >7'%7.'"&/54632#"32>54.#".54>32#NQ&rE+NE;TEr&Q;EN+B’n		`P‹i<<i‹PP‹i<<i‹P<iN--Ni<<iN--Ni<3=[[+6B&×[[=3&B6+ýšIÔ¬7		 <i‹PP‹i<<i‹PP‹i<ý`-Ni<<iN--Ni<<iN-    @ €À  3 @ e  >7>325.'.#"%"32>7.##"&54632#"&'.'>7>732654&'@"M*D–MM–D*M"4'TVY--YVT'4ÀE€sb&&bs€EE€sb&&bs€E%%%%Ø3l99l3'FF'

pPPp

'FF'ø&?())(?&v%##%vˆ$C_::_C$$C_::_C$À%%%%¹=%%='PppP'=%%=  ä À     .+"8137337>101#‹;@<q:â:q‘Ö''–¤> @þ ÀÀä¤ˆˆ 
 @ @À   	     " ' , 1  !!5!!!5!!5!!#533#5!3#5=3#3#553#@€ü€@ ÿ  ÿ  ÿ  þÀÀÀÀÀÀ@ÀÀÀÀýÀÀÀ@ÀÀ ý@Àþ@€€@€€€€€€€À€€€€@€€ÿ €€€€€    @€À    !!@€ü€ €    @ @à€     7!!5###5!''7'77@ þ ÀÝ·…¸ß@¢‚‚>‚‚>‚‚>‚‚>À€€@þ  €€ý@‚‚>‚‚>‚‚>‚‚>     ÿÀ€À    %3#575#53#'#	373 €À€€ÀÜˆ¼¼ˆ ÿ ˆ¼¼ˆÿ 22@’<2@’R¼¼ÿ ÿ ¼¼      À€À    3#575#53#'#	373 €À€€ÀÜˆ¼¼ˆ ÿ ˆ¼¼ˆÿ ò2@’<2@’n¼¼ÿ ÿ ¼¼     @  À€ 4  %5>54.#"#'!5.54>32!5#À9^D%Fz£]]£zF%D^9À@@&?-/Qm>>mQ/-?&@@À€%GZj9P‹i<<i‹P9jZG%`àß;KX0BuW22WuB0XK;ßà`  @  À€  . ; H Y  2#"&'.5467>35"32>54.#132654&#"!32654&#""&'32>7# K‡558855‡KK‡558855‡K]£zFFz£]]£zFFz£]À%%%% %%%%@Lƒ,	-CS//SC-	,ƒL4855‡KK‡558855‡KK‡558LFz£]]£zFFz£]]£zFþÀ%%%%%%%%þð3+,K88K,+3    @ @À@    +  !!5!";!532654&#!!#"&54632  þ €ý &&€ €&&Àþ€€Î@€€À&ÿ &ÀÀ& &þ  ÿ     @  À€      '7!7!7!!'!'!'7àÀ€þ €À À€þ €ÀÀ€`€Àÿ À€`€À@À€þ €ÀÀ€`€Àÿ À€`€ÀÀ€þ €À    @  À€  " ' 9 > C  5#"'35#334&+"35353#54&#26=4&+32653#53#5ÀÀ&þÑŽRà €ÀÀý@@&€&@€€€€ &ÀÀ&À€€€€@@&þÀ	þü”FþàÀ@@þ€€&&þ€ÀÀ €€À`&&`&þ@&@€€À€€  @ @ÀÀ    #53533##5!3!53À€€€€€€ ü€€€€À€€€€€€@þÀ@ÀÀ     @  À€        # ) . 3 9 = A  3#3#3#7#3!3#3#3#35353##!!!!35353#'3# €€€€@€€À@€þ@€€@€€€€€@@€€@@ý€€ü€@ý  ý@@@ €€À€€@@þÀ@ @@À@ @€@À@ ÿ À@ÿ  À@ü€€üÀ ý @ÿ À@€@@@  @  À€      ! %  !3!3!#!#3#73#73#73#73#0ý€   ý € þ  €€À€€À€€À€€À€€€þ€€þÀ@ü€@þÀ ÿ À@@@@@@@@@   ÿà   € & ,  2#5267>54&'.#"33>3!3@]£zFFz£]G€225522€GG€2&2	ºàà¥Nv—UÀÿ €€Fz£]]£zF`522€GG€22552&_4ÿ  Qg;þ€€@À   @ @    -  >54.+!2>54&''46;2+5#"&=32#q$+#=R.à .R=#P?ñC -- s£s£ -- ÒS/+L8!ý !8L+Bi¾8((8þ08((8  € @@@   #3!53#5!@ÿ þ@ À@@ý€@@€@   À @ @  !  7!!5#"&'.5#32>5#À@ýÀÀ=""=€-Ni<<iN-€€@@Àþ€--€þ€5]F((F]5€    @ @À@ >  !.#"&546323.'.#"!!#"&'#3267>54&'35Àþö%^3CbbC8Yq+#&a55a&)--)þö+9bC8Yq+#&a55a&)-ÌÀA-,A/#&ET-.T@6",A/#&ET-3@      @@@   "333335!€.R=##=R.€@€€þ@@#=R..R=#þÀ€ý€€€  @ @€@    "333335!7'À.R=##=R.€@€€þ@þ€àà@#=R..R=#þÀ€ý€€€ý ÀÀ     ` @À@    "333335!@.R=##=R.€@€€þ@€àà@#=R..R=#þÀ€ý€€€þ€ÀÀ     @   € 
    "  #5'!!!'#5#5%!3!!5333@ÀÀþ€€@Àeeþ€eeþÀ Àþ@@þ@€€À€@Àý@ÀÀÀ[ee eeÀþ€@ý €€ÀþÀ    €@À         # ' + / 3 7 ;  3#3#3#3#'3#3#'3#3#3#3#3#'3#'3#'3#'3# @@€@@@@@@€@@@@€@@€@@@@@@@@€@@€@@€@@€@@À@@@@@@@À@@@@@@@@@@@@@@@@@@@@@   @ À€   6 C  !'!!3!!.54>32'>54&#"3267?6&'%"&54632# þ` þ @€xX ü€@d'B0+Jc88cJ+#†pPPppP2o3þÕ3II33II3@@€þ Àý€3BQ,8cJ++Jc8 ’o2PppPPp†3VI33II33I   @  €€  & + 0 @  54&+54&+"#";!#81381#55!!!!373#35#5335À &€& à@Àþ€€€€€þ€€þ@Àþ€  @0 0@  @ @&&@þ À@ @@À@@ýÀÀþ@€€@À@@À@€  ÿø  ` % K X k  546;5#"+32;5#"&=4&'>5!54&+532;#"+5326=467.5'#"&54632"0>54&#È. Kk.  .kK .p. Kk.  .kK .Ð=++==++=h+=.<5#ANA=+Bh .hkKh .h. hKkh. h&CC&h .hkKh .h. hKkh. h&CC&+==++==+š=+*;>%ZX+=         ‚C¿_<õ      Ò0=ÿ    Ò0=ÿÿàÿÀÀ             ÀÿÀ   ÿàÿø                9                @  €     @  @  @  @  ‰  @  @  €  €  @  @  @  p @  @  @    @  @  @  `  N  @  ä  @  @  @      @  @  @  @  @  @  @  @ ÿà    €  À  @     @  `  @    @  @ ÿø     
   l °0Rt–0~ô@x È"Bb B`¤úNnèz¦ö		6	`	Š	Ò
P
”
Ê,PºþB„žÔ0R|¦â: ø‚    9 Î                          ®                 –        H        «        '        o      
  Ò  	     	     	   U  	   ¸  	   2  	   |  	 
 4 ìtinymce-small t i n y m c e - s m a l lVersion 1.0 V e r s i o n   1 . 0tinymce-small t i n y m c e - s m a l ltinymce-small t i n y m c e - s m a l lRegular R e g u l a rtinymce-small t i n y m c e - s m a l lFont generated by IcoMoon. F o n t   g e n e r a t e d   b y   I c o M o o n .                                                                                                                                                                                                                                                                             tinymce/skins/lightgray/fonts/tinymce-small.svg                                                     0000644                 00000060227 15212564050 0015774 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="tinymce-small" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xe000;" glyph-name="save" d="M960 80v591.938l-223.938 224.062h-592.062c-44.182 0-80-35.816-80-80v-736c0-44.184 35.818-80 80-80h736c44.184 0 80 35.816 80 80zM576 768h64v-192h-64v192zM704 128h-384v255.882c0.034 0.042 0.076 0.082 0.116 0.118h383.77c0.040-0.036 0.082-0.076 0.116-0.118l-0.002-255.882zM832 128h-64v256c0 35.2-28.8 64-64 64h-384c-35.2 0-64-28.8-64-64v-256h-64v640h64v-192c0-35.2 28.8-64 64-64h320c35.2 0 64 28.8 64 64v171.010l128-128.072v-490.938z" />
<glyph unicode="&#xe001;" glyph-name="newdocument" d="M850.746 717.254l-133.492 133.49c-24.888 24.892-74.054 45.256-109.254 45.256h-416c-35.2 0-64-28.8-64-64v-768c0-35.2 28.8-64 64-64h640c35.2 0 64 28.8 64 64v544c0 35.2-20.366 84.364-45.254 109.254zM805.49 672.002c6.792-6.796 13.792-19.162 18.894-32.002h-184.384v184.386c12.84-5.1 25.204-12.1 32-18.896l133.49-133.488zM831.884 64h-639.77c-0.040 0.034-0.082 0.076-0.114 0.116v767.77c0.034 0.040 0.076 0.082 0.114 0.114h383.886v-256h256v-511.884c-0.034-0.040-0.076-0.082-0.116-0.116z" />
<glyph unicode="&#xe002;" glyph-name="fullpage" d="M1024 367.542v160.916l-159.144 15.914c-8.186 30.042-20.088 58.548-35.21 84.98l104.596 127.838-113.052 113.050-127.836-104.596c-26.434 15.124-54.942 27.026-84.982 35.208l-15.914 159.148h-160.916l-15.914-159.146c-30.042-8.186-58.548-20.086-84.98-35.208l-127.838 104.594-113.050-113.050 104.596-127.836c-15.124-26.432-27.026-54.94-35.21-84.98l-159.146-15.916v-160.916l159.146-15.914c8.186-30.042 20.086-58.548 35.21-84.982l-104.596-127.836 113.048-113.048 127.838 104.596c26.432-15.124 54.94-27.028 84.98-35.21l15.916-159.148h160.916l15.914 159.144c30.042 8.186 58.548 20.088 84.982 35.21l127.836-104.596 113.048 113.048-104.596 127.836c15.124 26.434 27.028 54.942 35.21 84.98l159.148 15.92zM704 384l-128-128h-128l-128 128v128l128 128h128l128-128v-128z" />
<glyph unicode="&#xe003;" glyph-name="alignleft" d="M64 768h896v-128h-896zM64 384h896v-128h-896zM64 576h576v-128h-576zM64 192h576v-128h-576z" />
<glyph unicode="&#xe004;" glyph-name="aligncenter" d="M64 768h896v-128h-896zM64 384h896v-128h-896zM256 576h512v-128h-512zM256 192h512v-128h-512z" />
<glyph unicode="&#xe005;" glyph-name="alignright" d="M64 768h896v-128h-896zM64 384h896v-128h-896zM384 576h576v-128h-576zM384 192h576v-128h-576z" />
<glyph unicode="&#xe006;" glyph-name="alignjustify" d="M64 768h896v-128h-896zM64 384h896v-128h-896zM64 576h896v-128h-896zM64 192h896v-128h-896z" />
<glyph unicode="&#xe007;" glyph-name="cut" d="M864.408 289.868c-46.47 46.47-106.938 68.004-161.082 62.806l-63.326 63.326 192 192c0 0 128 128 0 256l-320-320-320 320c-128-128 0-256 0-256l192-192-63.326-63.326c-54.144 5.198-114.61-16.338-161.080-62.806-74.98-74.98-85.112-186.418-22.626-248.9 62.482-62.482 173.92-52.354 248.9 22.626 46.47 46.468 68.002 106.938 62.806 161.080l63.326 63.326 63.328-63.328c-5.196-54.144 16.336-114.61 62.806-161.078 74.978-74.98 186.418-85.112 248.898-22.626 62.488 62.482 52.356 173.918-22.624 248.9zM353.124 201.422c-2.212-24.332-15.020-49.826-35.14-69.946-22.212-22.214-51.080-35.476-77.218-35.476-10.524 0-25.298 2.228-35.916 12.848-21.406 21.404-17.376 73.132 22.626 113.136 22.212 22.214 51.080 35.476 77.218 35.476 10.524 0 25.298-2.228 35.916-12.848 13.112-13.11 13.47-32.688 12.514-43.19zM512 352c-35.346 0-64 28.654-64 64s28.654 64 64 64 64-28.654 64-64-28.654-64-64-64zM819.152 108.848c-10.62-10.62-25.392-12.848-35.916-12.848-26.138 0-55.006 13.262-77.218 35.476-20.122 20.12-32.928 45.614-35.138 69.946-0.958 10.502-0.6 30.080 12.514 43.192 10.618 10.622 25.39 12.848 35.916 12.848 26.136 0 55.006-13.262 77.216-35.474 40.004-40.008 44.032-91.736 22.626-113.14z" />
<glyph unicode="&#xe008;" glyph-name="paste" d="M704 576v160c0 17.6-14.4 32-32 32h-160v64c0 35.2-28.8 64-64 64h-128c-35.204 0-64-28.8-64-64v-64h-160c-17.602 0-32-14.4-32-32v-512c0-17.6 14.398-32 32-32h224v-192h384l192 192v384h-192zM320 831.886c0.034 0.038 0.072 0.078 0.114 0.114h127.768c0.042-0.036 0.082-0.076 0.118-0.114v-63.886h-128v63.886zM192 640v64h384v-64h-384zM704 90.51v101.49h101.49l-101.49-101.49zM832 256h-192v-192h-256v448h448v-256z" />
<glyph unicode="&#xe009;" glyph-name="searchreplace" d="M888 576h-56v256h64v64h-320v-64h64v-256h-256v256h64v64h-320v-64h64v-256h-56c-39.6 0-72-32.4-72-72v-432c0-39.6 32.4-72 72-72h240c39.6 0 72 32.4 72 72v312h128v-312c0-39.6 32.4-72 72-72h240c39.6 0 72 32.4 72 72v432c0 39.6-32.4 72-72 72zM348 64h-184c-19.8 0-36 14.4-36 32s16.2 32 36 32h184c19.8 0 36-14.4 36-32s-16.2-32-36-32zM544 448h-64c-17.6 0-32 14.4-32 32s14.4 32 32 32h64c17.6 0 32-14.4 32-32s-14.4-32-32-32zM860 64h-184c-19.8 0-36 14.4-36 32s16.2 32 36 32h184c19.8 0 36-14.4 36-32s-16.2-32-36-32z" />
<glyph unicode="&#xe00a;" glyph-name="bullist" d="M384 832h576v-128h-576zM384 512h576v-128h-576zM384 192h576v-128h-576zM128 768c0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64s-64-28.654-64-64zM128 448c0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64s-64-28.654-64-64zM128 128c0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64s-64-28.654-64-64z" />
<glyph unicode="&#xe00b;" glyph-name="numlist" d="M384 832h576v-128h-576zM384 512h576v-128h-576zM384 192h576v-128h-576zM320 430v146h-64v320h-128v-64h64v-256h-64v-64h128v-50l-128-60v-146h128v-64h-128v-64h128v-64h-128v-64h192v320h-128v50z" />
<glyph unicode="&#xe00c;" glyph-name="indent" d="M64 768h896v-128h-896zM384 384h576v-128h-576zM384 576h576v-128h-576zM64 192h896v-128h-896zM64 576l224-160-224-160z" />
<glyph unicode="&#xe00d;" glyph-name="outdent" d="M64 768h896v-128h-896zM64 384h576v-128h-576zM64 576h576v-128h-576zM64 192h896v-128h-896zM960 576l-224-160 224-160z" />
<glyph unicode="&#xe00e;" glyph-name="blockquote" d="M256.428 535.274c105.8 0 191.572-91.17 191.572-203.638 0-112.464-85.772-203.636-191.572-203.636-105.802 0-191.572 91.17-191.572 203.636l-0.856 29.092c0 224.93 171.54 407.272 383.144 407.272v-116.364c-73.1 0-141.826-30.26-193.516-85.204-9.954-10.578-19.034-21.834-27.224-33.656 9.784 1.64 19.806 2.498 30.024 2.498zM768.428 535.274c105.8 0 191.572-91.17 191.572-203.638 0-112.464-85.772-203.636-191.572-203.636-105.802 0-191.572 91.17-191.572 203.636l-0.856 29.092c0 224.93 171.54 407.272 383.144 407.272v-116.364c-73.1 0-141.826-30.26-193.516-85.204-9.956-10.578-19.036-21.834-27.224-33.656 9.784 1.64 19.806 2.498 30.024 2.498z" />
<glyph unicode="&#xe00f;" glyph-name="undo" d="M704 0c59 199 134.906 455.266-256 446.096v-222.096l-336.002 336 336.002 336v-217.326c468.092 12.2 544-358.674 256-678.674z" />
<glyph unicode="&#xe010;" glyph-name="redo" d="M576 678.674v217.326l336.002-336-336.002-336v222.096c-390.906 9.17-315-247.096-256-446.096-288 320-212.092 690.874 256 678.674z" />
<glyph unicode="&#xe011;" glyph-name="unlink" d="M927.274 729.784l-133.49 133.488c-21.104 21.104-49.232 32.728-79.198 32.728s-58.094-11.624-79.196-32.726l-165.492-165.49c-43.668-43.668-43.668-114.724 0-158.392l2.746-2.746 67.882 67.882-2.746 2.746c-6.132 6.132-6.132 16.494 0 22.626l165.492 165.492c4.010 4.008 8.808 4.608 11.312 4.608s7.302-0.598 11.312-4.61l133.49-133.488c6.132-6.134 6.132-16.498 0.002-22.628l-165.494-165.494c-4.008-4.008-8.806-4.608-11.31-4.608s-7.302 0.6-11.312 4.612l-2.746 2.746-67.88-67.884 2.742-2.742c21.106-21.108 49.23-32.728 79.2-32.728s58.094 11.624 79.196 32.726l165.494 165.492c43.662 43.666 43.662 114.72-0.004 158.39zM551.356 359.356l-67.882-67.882 2.746-2.746c4.008-4.008 4.61-8.806 4.61-11.31 0-2.506-0.598-7.302-4.606-11.314l-165.494-165.49c-4.010-4.010-8.81-4.61-11.314-4.61s-7.304 0.6-11.314 4.61l-133.492 133.486c-4.010 4.010-4.61 8.81-4.61 11.314s0.598 7.3 4.61 11.312l165.49 165.488c4.010 4.012 8.81 4.612 11.314 4.612s7.304-0.6 11.314-4.612l2.746-2.742 67.882 67.88-2.746 2.746c-21.104 21.104-49.23 32.726-79.196 32.726s-58.092-11.624-79.196-32.726l-165.488-165.486c-21.106-21.104-32.73-49.234-32.73-79.198s11.624-58.094 32.726-79.198l133.49-133.49c21.106-21.102 49.232-32.726 79.198-32.726s58.092 11.624 79.196 32.726l165.494 165.492c21.104 21.104 32.722 49.23 32.722 79.196s-11.624 58.094-32.726 79.196l-2.744 2.746zM352 250c-9.724 0-19.45 3.71-26.87 11.128-14.84 14.84-14.84 38.898 0 53.738l320 320c14.84 14.84 38.896 14.84 53.736 0 14.844-14.84 14.844-38.9 0-53.74l-320-320c-7.416-7.416-17.142-11.126-26.866-11.126z" />
<glyph unicode="&#xe012;" glyph-name="link" d="M927.274 729.784l-133.49 133.488c-21.104 21.104-49.232 32.728-79.198 32.728s-58.094-11.624-79.196-32.726l-165.492-165.49c-43.668-43.668-43.668-114.724 0-158.392l2.746-2.746 67.882 67.882-2.746 2.746c-6.132 6.132-6.132 16.494 0 22.626l165.492 165.492c4.010 4.008 8.808 4.608 11.312 4.608s7.302-0.598 11.312-4.61l133.49-133.488c6.132-6.134 6.132-16.498 0.002-22.628l-165.494-165.494c-4.008-4.008-8.806-4.608-11.31-4.608s-7.302 0.6-11.312 4.612l-2.746 2.746-67.88-67.884 2.742-2.742c21.106-21.108 49.23-32.728 79.2-32.728s58.094 11.624 79.196 32.726l165.494 165.492c43.662 43.666 43.662 114.72-0.004 158.39zM551.356 359.356l-67.882-67.882 2.746-2.746c4.008-4.008 4.61-8.806 4.61-11.31 0-2.506-0.598-7.302-4.606-11.314l-165.494-165.49c-4.010-4.010-8.81-4.61-11.314-4.61s-7.304 0.6-11.314 4.61l-133.492 133.486c-4.010 4.010-4.61 8.81-4.61 11.314s0.598 7.3 4.61 11.312l165.49 165.488c4.010 4.012 8.81 4.612 11.314 4.612s7.304-0.6 11.314-4.612l2.746-2.742 67.882 67.88-2.746 2.746c-21.104 21.104-49.23 32.726-79.196 32.726s-58.092-11.624-79.196-32.726l-165.488-165.486c-21.106-21.104-32.73-49.234-32.73-79.198s11.624-58.094 32.726-79.198l133.49-133.49c21.106-21.102 49.232-32.726 79.198-32.726s58.092 11.624 79.196 32.726l165.494 165.492c21.104 21.104 32.722 49.23 32.722 79.196s-11.624 58.094-32.726 79.196l-2.744 2.746zM800 122c-9.724 0-19.45 3.708-26.87 11.13l-128 127.998c-14.844 14.84-14.844 38.898 0 53.738 14.84 14.844 38.896 14.844 53.736 0l128-128c14.844-14.84 14.844-38.896 0-53.736-7.416-7.422-17.142-11.13-26.866-11.13zM608 0c-17.674 0-32 14.326-32 32v128c0 17.674 14.326 32 32 32s32-14.326 32-32v-128c0-17.674-14.326-32-32-32zM928 320h-128c-17.674 0-32 14.326-32 32s14.326 32 32 32h128c17.674 0 32-14.326 32-32s-14.326-32-32-32zM224 774c9.724 0 19.45-3.708 26.87-11.13l128-128c14.842-14.84 14.842-38.898 0-53.738-14.84-14.844-38.898-14.844-53.738 0l-128 128c-14.842 14.84-14.842 38.898 0 53.738 7.418 7.422 17.144 11.13 26.868 11.13zM416 896c17.674 0 32-14.326 32-32v-128c0-17.674-14.326-32-32-32s-32 14.326-32 32v128c0 17.674 14.326 32 32 32zM96 576h128c17.674 0 32-14.326 32-32s-14.326-32-32-32h-128c-17.674 0-32 14.326-32 32s14.326 32 32 32z" />
<glyph unicode="&#xe013;" glyph-name="bookmark" d="M256 896v-896l256 256 256-256v896h-512zM704 170.51l-192 192-192-192v661.49h384v-661.49z" />
<glyph unicode="&#xe014;" glyph-name="image" d="M896 832h-768c-35.2 0-64-28.8-64-64v-640c0-35.2 28.8-64 64-64h768c35.2 0 64 28.8 64 64v640c0 35.2-28.8 64-64 64zM896 128.116c-0.012-0.014-0.030-0.028-0.042-0.042l-191.958 319.926-160-128-224 288-191.968-479.916c-0.010 0.010-0.022 0.022-0.032 0.032v639.77c0.034 0.040 0.076 0.082 0.114 0.114h767.77c0.040-0.034 0.082-0.076 0.116-0.116v-639.768zM640 608c0-53.019 42.981-96 96-96s96 42.981 96 96c0 53.019-42.981 96-96 96s-96-42.981-96-96z" />
<glyph unicode="&#xe015;" glyph-name="media" d="M896 832h-768c-35.2 0-64-28.8-64-64v-640c0-35.2 28.8-64 64-64h768c35.2 0 64 28.8 64 64v640c0 35.2-28.8 64-64 64zM256 128h-128v128h128v-128zM256 384h-128v128h128v-128zM256 640h-128v128h128v-128zM704 128h-384v640h384v-640zM896 128h-128v128h128v-128zM896 384h-128v128h128v-128zM896 640h-128v128h128v-128zM384 640v-384l288 192z" />
<glyph unicode="&#xe016;" glyph-name="help" d="M448 256h128v-128h-128v128zM704 704c35.346 0 64-28.654 64-64v-166l-228-154h-92v64l192 128v64h-320v128h384zM512 896c-119.666 0-232.166-46.6-316.784-131.216-84.614-84.618-131.216-197.118-131.216-316.784 0-119.664 46.602-232.168 131.216-316.784 84.618-84.616 197.118-131.216 316.784-131.216 119.664 0 232.168 46.6 316.784 131.216s131.216 197.12 131.216 316.784c0 119.666-46.6 232.166-131.216 316.784-84.616 84.616-197.12 131.216-316.784 131.216z" />
<glyph unicode="&#xe017;" glyph-name="code" d="M416 256l-192 192 192 192-64 64-256-256 256-256zM672 704l-64-64 192-192-192-192 64-64 256 256z" />
<glyph unicode="&#xe018;" glyph-name="insertdatetime" d="M77.798 655.376l81.414-50.882c50.802 81.114 128.788 143.454 221.208 174.246l-30.366 91.094c-113.748-37.898-209.728-114.626-272.256-214.458zM673.946 869.834l-30.366-91.094c92.422-30.792 170.404-93.132 221.208-174.248l81.412 50.882c-62.526 99.834-158.506 176.562-272.254 214.46zM607.974 255.992c-4.808 0-9.692 1.090-14.286 3.386l-145.688 72.844v211.778c0 17.672 14.328 32 32 32s32-14.328 32-32v-172.222l110.31-55.156c15.806-7.902 22.214-27.124 14.31-42.932-5.604-11.214-16.908-17.696-28.646-17.698zM512 768c-212.078 0-384-171.922-384-384s171.922-384 384-384c212.078 0 384 171.922 384 384s-171.922 384-384 384zM512 96c-159.058 0-288 128.942-288 288s128.942 288 288 288c159.058 0 288-128.942 288-288s-128.942-288-288-288z" />
<glyph unicode="&#xe019;" glyph-name="preview" d="M64 504.254c45.318 49.92 97.162 92.36 153.272 125.124 90.332 52.744 192.246 80.622 294.728 80.622 102.48 0 204.396-27.878 294.726-80.624 56.112-32.764 107.956-75.204 153.274-125.124v117.432c-33.010 28.118-68.124 53.14-104.868 74.594-105.006 61.314-223.658 93.722-343.132 93.722s-238.128-32.408-343.134-93.72c-36.742-21.454-71.856-46.478-104.866-74.596v-117.43zM512 640c-183.196 0-345.838-100.556-448-256 102.162-155.448 264.804-256 448-256s345.838 100.552 448 256c-102.162 155.444-264.804 256-448 256zM512 448c0-35.346-28.654-64-64-64s-64 28.654-64 64c0 35.348 28.654 64 64 64s64-28.652 64-64zM728.066 263.338c-67.434-39.374-140.128-59.338-216.066-59.338s-148.632 19.964-216.066 59.338c-51.554 30.104-98.616 71.31-138.114 120.662 39.498 49.35 86.56 90.558 138.116 120.66 13.276 7.752 26.758 14.74 40.426 20.982-10.512-23.742-16.362-50.008-16.362-77.642 0-106.040 85.962-192 192-192 106.040 0 192 85.96 192 192 0 27.634-5.85 53.9-16.36 77.642 13.668-6.244 27.15-13.23 40.426-20.982 51.554-30.102 98.616-71.31 138.116-120.66-39.498-49.352-86.56-90.558-138.116-120.662z" />
<glyph unicode="&#xe01a;" glyph-name="forecolor" d="M651.168 676.166c-24.612 81.962-28.876 91.834-107.168 91.834h-64c-79.618 0-82.664-10.152-108.418-96 0-0.002 0-0.002-0.002-0.004l-143.998-479.996h113.636l57.6 192h226.366l57.6-192h113.63l-145.246 484.166zM437.218 512l38.4 136c10.086 33.618 36.38 30 36.38 30s26.294 3.618 36.38-30h0.004l38.4-136h-149.564z" />
<glyph unicode="&#xe01b;" glyph-name="table" d="M64 768v-704h896v704h-896zM384 320v128h256v-128h-256zM640 256v-128h-256v128h256zM640 640v-128h-256v128h256zM320 640v-128h-192v128h192zM128 448h192v-128h-192v128zM704 448h192v-128h-192v128zM704 512v128h192v-128h-192zM128 256h192v-128h-192v128zM704 128v128h192v-128h-192z" />
<glyph unicode="&#xe01c;" glyph-name="hr" d="M64 512h896v-128h-896z" />
<glyph unicode="&#xe01d;" glyph-name="removeformat" d="M64 192h512v-128h-512v128zM768 768h-220.558l-183.766-512h-132.288l183.762 512h-223.15v128h576v-128zM929.774 64l-129.774 129.774-129.774-129.774-62.226 62.226 129.774 129.774-129.774 129.774 62.226 62.226 129.774-129.774 129.774 129.774 62.226-62.226-129.774-129.774 129.774-129.774-62.226-62.226z" />
<glyph unicode="&#xe01e;" glyph-name="subscript" d="M768 50v-50h128v-64h-192v146l128 60v50h-128v64h192v-146zM676 704h-136l-188-188-188 188h-136l256-256-256-256h136l188 188 188-188h136l-256 256z" />
<glyph unicode="&#xe01f;" glyph-name="superscript" d="M768 754v-50h128v-64h-192v146l128 60v50h-128v64h192v-146zM676 704h-136l-188-188-188 188h-136l256-256-256-256h136l188 188 188-188h136l-256 256z" />
<glyph unicode="&#xe020;" glyph-name="charmap" d="M704 128v37.004c151.348 61.628 256 193.82 256 346.996 0 212.078-200.576 384-448 384s-448-171.922-448-384c0-153.176 104.654-285.368 256-346.996v-37.004h-192l-64 96v-224h320v222.812c-100.9 51.362-170.666 161.54-170.666 289.188 0 176.732 133.718 320 298.666 320s298.666-143.268 298.666-320c0-127.648-69.766-237.826-170.666-289.188v-222.812h320v224l-64-96h-192z" />
<glyph unicode="&#xe021;" glyph-name="emoticons" d="M512 820c99.366 0 192.782-38.694 263.042-108.956s108.958-163.678 108.958-263.044-38.696-192.782-108.958-263.042-163.676-108.958-263.042-108.958-192.782 38.696-263.044 108.958-108.956 163.676-108.956 263.042 38.694 192.782 108.956 263.044 163.678 108.956 263.044 108.956zM512 896c-247.424 0-448-200.576-448-448s200.576-448 448-448 448 200.576 448 448-200.576 448-448 448v0zM320 576c0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64s-64-28.654-64-64zM576 576c0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64s-64-28.654-64-64zM512 304c-101.84 0-192.56 36.874-251.166 94.328 23.126-117.608 126.778-206.328 251.166-206.328s228.040 88.72 251.168 206.328c-58.608-57.454-149.328-94.328-251.168-94.328z" />
<glyph unicode="&#xe022;" glyph-name="print" d="M256 832h512v-128h-512v128zM896 640h-768c-35.2 0-64-28.8-64-64v-256c0-35.2 28.796-64 64-64h128v-192h512v192h128c35.2 0 64 28.8 64 64v256c0 35.2-28.8 64-64 64zM704 128h-384v256h384v-256zM910.4 544c0-25.626-20.774-46.4-46.398-46.4s-46.402 20.774-46.402 46.4 20.778 46.4 46.402 46.4c25.626 0 46.398-20.774 46.398-46.4z" />
<glyph unicode="&#xe023;" glyph-name="fullscreen" d="M480 576l-192 192 128 128h-352v-352l128 128 192-192zM640 480l192 192 128-128v352h-352l128-128-192-192zM544 320l192-192-128-128h352v352l-128-128-192 192zM384 416l-192-192-128 128v-352h352l-128 128 192 192z" />
<glyph unicode="&#xe024;" glyph-name="spellcheck" d="M960 832v64h-192c-35.202 0-64-28.8-64-64v-320c0-15.856 5.858-30.402 15.496-41.614l-303.496-260.386-142 148-82-70 224-288 416 448h128v64h-192v320h192zM256 448h64v384c0 35.2-28.8 64-64 64h-128c-35.2 0-64-28.8-64-64v-384h64v192h128v-192zM128 704v128h128v-128h-128zM640 512v96c0 35.2-8.8 64-44 64 35.2 0 44 28.8 44 64v96c0 35.2-28.8 64-64 64h-192v-448h192c35.2 0 64 28.8 64 64zM448 832h128v-128h-128v128zM448 640h128v-128h-128v128z" />
<glyph unicode="&#xe025;" glyph-name="nonbreaking" d="M448 448h-128v128h128v128h128v-128h128v-128h-128v-128h-128v128zM960 384v-320h-896v320h128v-192h640v192h128z" />
<glyph unicode="&#xe026;" glyph-name="template" d="M512 576h128v-64h-128zM512 192h128v-64h-128zM576 384h128v-64h-128zM768 384v-192h-64v-64h128v256zM384 384h128v-64h-128zM320 192h128v-64h-128zM320 576h128v-64h-128zM192 768v-256h64v192h64v64zM704 512h128v256h-64v-192h-64zM64 896v-896h896v896h-896zM896 64h-768v768h768v-768zM192 384v-256h64v192h64v64zM576 768h128v-64h-128zM384 768h128v-64h-128z" />
<glyph unicode="&#xe027;" glyph-name="pagebreak" d="M816 896l16-384h-640l16 384h32l16-320h512l16 320h32zM208 0l-16 320h640l-16-320h-32l-16 256h-512l-16-256h-32zM64 448h128v-64h-128zM256 448h128v-64h-128zM448 448h128v-64h-128zM640 448h128v-64h-128zM832 448h128v-64h-128z" />
<glyph unicode="&#xe028;" glyph-name="restoredraft" d="M576 896c247.424 0 448-200.576 448-448s-200.576-448-448-448v96c94.024 0 182.418 36.614 248.902 103.098s103.098 154.878 103.098 248.902c0 94.022-36.614 182.418-103.098 248.902s-154.878 103.098-248.902 103.098c-94.022 0-182.418-36.614-248.902-103.098-51.14-51.138-84.582-115.246-97.306-184.902h186.208l-224-256-224 256h164.57c31.060 217.102 217.738 384 443.43 384zM768 512v-128h-256v320h128v-192z" />
<glyph unicode="&#xe02a;" glyph-name="bold" d="M625.442 465.818c48.074 38.15 78.558 94.856 78.558 158.182 0 114.876-100.29 208-224 208h-224v-768h288c123.712 0 224 93.124 224 208 0 88.196-59.118 163.562-142.558 193.818zM384 656c0 26.51 21.49 48 48 48h67.204c42.414 0 76.796-42.98 76.796-96s-34.382-96-76.796-96h-115.204v144zM547.2 192h-115.2c-26.51 0-48 21.49-48 48v144h163.2c42.418 0 76.8-42.98 76.8-96s-34.382-96-76.8-96z" />
<glyph unicode="&#xe02b;" glyph-name="italic" d="M832 832v-64h-144l-256-640h144v-64h-448v64h144l256 640h-144v64h448z" />
<glyph unicode="&#xe02c;" glyph-name="underline" d="M192 128h576v-64h-576v64zM640 832v-384c0-31.312-14.7-61.624-41.39-85.352-30.942-27.502-73.068-42.648-118.61-42.648-45.544 0-87.668 15.146-118.608 42.648-26.692 23.728-41.392 54.040-41.392 85.352v384h-128v-384c0-141.382 128.942-256 288-256s288 114.618 288 256v384h-128z" />
<glyph unicode="&#xe02d;" glyph-name="strikethrough" d="M960 448h-265.876c-50.078 35.42-114.43 54.86-182.124 54.86-89.206 0-164.572 50.242-164.572 109.712s75.366 109.714 164.572 109.714c75.058 0 140.308-35.576 159.12-82.286h113.016c-7.93 50.644-37.58 97.968-84.058 132.826-50.88 38.16-117.676 59.174-188.078 59.174-70.404 0-137.196-21.014-188.074-59.174-54.788-41.090-86.212-99.502-86.212-160.254s31.424-119.164 86.212-160.254c1.956-1.466 3.942-2.898 5.946-4.316h-265.872v-64h512.532c58.208-17.106 100.042-56.27 100.042-100.572 0-59.468-75.368-109.71-164.572-109.71-75.060 0-140.308 35.574-159.118 82.286h-113.016c7.93-50.64 37.582-97.968 84.060-132.826 50.876-38.164 117.668-59.18 188.072-59.18 70.402 0 137.198 21.016 188.074 59.174 54.79 41.090 86.208 99.502 86.208 160.254 0 35.298-10.654 69.792-30.294 100.572h204.012v64z" />
<glyph unicode="&#xe02e;" glyph-name="visualchars" d="M384 832c-123.712 0-224-100.288-224-224s100.288-224 224-224v-320h128v640h64v-640h128v640h128v128h-448z" />
<glyph unicode="&#xe02f;" glyph-name="ltr" d="M448 832c-123.712 0-224-100.288-224-224s100.288-224 224-224v-320h128v640h64v-640h128v640h128v128h-448zM64 64l224 192-224 192z" />
<glyph unicode="&#xe030;" glyph-name="rtl" d="M320 832c-123.712 0-224-100.288-224-224s100.288-224 224-224v-320h128v640h64v-640h128v640h128v128h-448zM960 448l-224-192 224-192z" />
<glyph unicode="&#xe031;" glyph-name="copy" d="M832 640h-192v64l-192 192h-384v-704h384v-192h576v448l-192 192zM832 549.49l101.49-101.49h-101.49v101.49zM448 805.49l101.49-101.49h-101.49v101.49zM128 832h256v-192h192v-384h-448v576zM960 64h-448v128h128v384h128v-192h192v-320z" />
<glyph unicode="&#xe032;" glyph-name="resize" d="M768 704h64v-64h-64zM640 576h64v-64h-64zM640 448h64v-64h-64zM640 320h64v-64h-64zM512 448h64v-64h-64zM512 320h64v-64h-64zM384 320h64v-64h-64zM768 576h64v-64h-64zM768 448h64v-64h-64zM768 320h64v-64h-64zM768 192h64v-64h-64zM640 192h64v-64h-64zM512 192h64v-64h-64zM384 192h64v-64h-64zM256 192h64v-64h-64z" />
<glyph unicode="&#xe034;" glyph-name="browse" d="M928 832h-416l-32 64h-352l-64-128h896zM840.34 256h87.66l32 448h-896l64-640h356.080c-104.882 37.776-180.080 138.266-180.080 256 0 149.982 122.018 272 272 272 149.98 0 272-122.018 272-272 0-21.678-2.622-43.15-7.66-64zM874.996 110.25l-134.496 110.692c17.454 28.922 27.5 62.814 27.5 99.058 0 106.040-85.96 192-192 192s-192-85.96-192-192 85.96-192 192-192c36.244 0 70.138 10.046 99.058 27.5l110.692-134.496c22.962-26.678 62.118-28.14 87.006-3.252l5.492 5.492c24.888 24.888 23.426 64.044-3.252 87.006zM576 196c-68.484 0-124 55.516-124 124s55.516 124 124 124 124-55.516 124-124-55.516-124-124-124z" />
<glyph unicode="&#xe035;" glyph-name="pastetext" d="M704 576v160c0 17.6-14.4 32-32 32h-160v64c0 35.2-28.8 64-64 64h-128c-35.204 0-64-28.8-64-64v-64h-160c-17.602 0-32-14.4-32-32v-512c0-17.6 14.398-32 32-32h224v-192h576v576h-192zM320 831.886c0.034 0.038 0.072 0.078 0.114 0.114h127.768c0.042-0.036 0.082-0.076 0.118-0.114v-63.886h-128v63.886zM192 640v64h384v-64h-384zM832 64h-448v448h448v-448zM448 448v-128h32l32 64h64v-192h-48v-64h160v64h-48v192h64l32-64h32v128z" />
<glyph unicode="&#xe603;" glyph-name="codesample" d="M200.015 577.994v103.994c0 43.077 34.919 77.997 77.997 77.997h26v103.994h-26c-100.51 0-181.991-81.481-181.991-181.991v-103.994c0-43.077-34.919-77.997-77.997-77.997h-26v-103.994h26c43.077 0 77.997-34.919 77.997-77.997v-103.994c0-100.509 81.481-181.991 181.991-181.991h26v103.994h-26c-43.077 0-77.997 34.919-77.997 77.997v103.994c0 50.927-20.928 96.961-54.642 129.994 33.714 33.032 54.642 79.065 54.642 129.994zM823.985 577.994v103.994c0 43.077-34.919 77.997-77.997 77.997h-26v103.994h26c100.509 0 181.991-81.481 181.991-181.991v-103.994c0-43.077 34.919-77.997 77.997-77.997h26v-103.994h-26c-43.077 0-77.997-34.919-77.997-77.997v-103.994c0-100.509-81.482-181.991-181.991-181.991h-26v103.994h26c43.077 0 77.997 34.919 77.997 77.997v103.994c0 50.927 20.928 96.961 54.642 129.994-33.714 33.032-54.642 79.065-54.642 129.994zM615.997 603.277c0-57.435-46.56-103.994-103.994-103.994s-103.994 46.56-103.994 103.994c0 57.435 46.56 103.994 103.994 103.994s103.994-46.56 103.994-103.994zM512 448.717c-57.435 0-103.994-46.56-103.994-103.994 0-55.841 26-100.107 105.747-103.875-23.715-33.413-59.437-46.608-105.747-50.94v-61.747c0 0 207.991-18.144 207.991 216.561-0.202 57.437-46.56 103.996-103.994 103.996z" />
</font></defs></svg>                                                                                                                                                                                                                                                                                                                                                                         tinymce/skins/lightgray/fonts/tinymce-small.ttf                                                     0000644                 00000022130 15212564050 0015761 0                                                                                                    ustar 00                                                                                                                                                                                                                                                            €  0OS/2$   ¼   `cmapÆ­Á„     lgasp     ˆ   glyf	GÁ    headgÀ{   ”   6hhea«ò   Ì   $hmtxÚ›   ð   älocaÐ$ØZ  !Ô   tmaxp I Ð  "H    nameþLÜ  "h  Îpost     $8     ÷   ™Ì   ™Ì  ë 3	                               @  æÀÿÀ @À @                                      P          à(à2à5æÿýÿÿ      à à*à4æÿýÿÿ ÿã   5                    ÿÿ             79               79               79     @  À€    7  %'!"3!2653#5!81!813#4&#!"#33!26=Ààý°!//!à!/þ€@@€þ€€€@&þ€&@@&@&€PPà/!ý !//!°ÀÀý€ ÿ  &&ÿ €À&&«€þ  €  €€   .  '.#!"3!2654&'#5!8181!!81S†Aþ`&&€&.
¸
…ý€€ Í†&ý && A-
¸
…ý  ÿ þ      ÿÀ À 0 9  5'.'7'./#'737>77'>?%#'573 Ÿhq€+ +€qhŸŸhq€+ +€qhŸþÀ€€€€€€p +€qhŸŸhq€+ +€qhŸŸhq€+€€€€€€     @ @À       !!!!!!!!@€ü€€ü€@ýÀ@ýÀ €ÿ €@€ÿ €     @ @À       !!!!!!!!@€ü€€ü€À þ  þ  €ÿ €@€ÿ €    @ @À       !!!!!!!!@€ü€€ü€@@ýÀ@ýÀ €ÿ €@€ÿ €   @ @À       !!!!!!!!@€ü€€ü€€ü€€ü€ €ÿ €@€ÿ €     ‰ )w` * @ M c  .'70>&'	1&67>'776&'#"&'&67>327"&54632##"&'.'&67>32`"V)?À$0þÀþÀ0$À?)V"9//’8# ?? #8’//9þ))	Ÿ%%%%3)	)"# ?À,H\0þÀ@0\H,À? #8’//9"V)??)V"9//’8Y$C
—%%%%ó$
C  @  €€  ' , 0 7  54&+54&+"#";!7#81381#55!!537#!!À &€& à€ÀÀþ€€€€€þ€ ee€Àÿ À@ @&&@þ ÀÀ€ @@À@@ýÛee¥ÀÀÿ    @  À€ * 9 H W  #35!3!35!3#";2653;2654&##"&546;2##"&546;2##"&546;2#x8@þÀ@ÿ @þÀ@8**ð*€*ð**ýä¸¸Ä@@<¸¸@ @@ÿ  @@ÿ *þP**8þÈ**°*þ €þ€  € @À@     % 2  !!!!!!32654&#"32654&#"32654&#"€@ýÀ@ýÀ@ýÀÿ %%%%%%%%%%%%@€À€À€À%%%%þÀ%%%%þÀ%%%%  €  À€    %  !!!!!!5##3#33#3#3#5€@ýÀ@ýÀ@ýÀ@@€@@€€€€€€À€@€À€À€n’@@ÿ @2<’@@@@@2   @ @À        !!!!!!!!@€ü€@@ýÀ@ýÀþÀ€ü€àà €ÿ €@€ÿ €     @ @À        !!!!!!!!@€ü€@ýÀ@ýÀ€ü€€àà €ÿ €@€ÿ €       @ €À   ?  2#".5'4>3">3!2#".5'4>3">3 (F44F('F4<hŒO7d& (F44F('F4<hŒO7d& 7J*+J7  7J+T”o@t,*	 7J*+J7  7J+T”o@t,*	  p  À€   %>.	6À$"…“þ°P°Ì?Ol K „SÞPPÙyÄöx   @  €   5	5&.>@Pþ°“…"$lO?Ì°§Ùþ°þ°ÞS„ KxöÄy   @  Ÿ€ 0 m   '.#"7'&4?>32#"&/326?64'#"&/.546?>327'.#"326?>54&/"&'&4762#Ÿ…))¥!!D¥…¥D))¥!!þˆD¥…¥D))¥…))¥Ç@ þÀÚ…¥!]!D¥…¥D¥!]!þD¥…¥D¥))…¥))m @ þÀ     @  À€ 0 m  Ž  ¯ ¾ Í  '.#"7'&4?>32#"&/326?64'#"&/.546?>327'.#"326?>54&/"&/&4762#"&=4632##"&546;2#2"/&47>372#"&=46332+"&5463Ÿ…))¥!!D¥…¥D))¥!!þˆD¥…¥D))¥…))¥ù€ €À@€€ý@€ €ÀþÀ€€Ú…¥!]!D¥…¥D¥!]!þD¥…¥D¥))…¥))í€ € z€€@Æ€ € z€€þÀ       €    	!'!   þ ÀÀÀ€€ü€ ÿ €ý+ÀÀ•ýk  @ @À@  $ 1  !"3!2654&#818181!8132654&#"€ý && &&À àÀ ÿ 8((88((8@&ý€&&€&ý@@€ þ €ý€à(88((88(  	 @ @À@     $ ) . 3 6  !"3!2654&##53#53#53!!3#53#53#53!%€ý && &&ý€€€€€€€Àþ€€À€€€€€€þ  @&ý€&&€&ý@€€ €€ €€þ €ý€€€ €€ €€þ€À     @  À€   :  3#52#575!5!'"32>7>54.'.#À€€ %ä\ÀþÀ€À-VQI  0""0  IQV--VQI  0""0  IQV- €€À%¦š@€@€À"0  IQV--VQI  0""0  IQV--VQI  0"  ` À À    '7'	 ÀÀ@ÿ  @@ÀÀ@  ÀÀ@ÿ ÿ  @ÀÀ@     N  ²f 
  ) > S  >7'%7.'"&/54632#"32>54.#".54>32#NQ&rE+NE;TEr&Q;EN+B’n		`P‹i<<i‹PP‹i<<i‹P<iN--Ni<<iN--Ni<3=[[+6B&×[[=3&B6+ýšIÔ¬7		 <i‹PP‹i<<i‹PP‹i<ý`-Ni<<iN--Ni<<iN-    @ €À  3 @ e  >7>325.'.#"%"32>7.##"&54632#"&'.'>7>732654&'@"M*D–MM–D*M"4'TVY--YVT'4ÀE€sb&&bs€EE€sb&&bs€E%%%%Ø3l99l3'FF'

pPPp

'FF'ø&?())(?&v%##%vˆ$C_::_C$$C_::_C$À%%%%¹=%%='PppP'=%%=  ä À     .+"8137337>101#‹;@<q:â:q‘Ö''–¤> @þ ÀÀä¤ˆˆ 
 @ @À   	     " ' , 1  !!5!!!5!!5!!#533#5!3#5=3#3#553#@€ü€@ ÿ  ÿ  ÿ  þÀÀÀÀÀÀ@ÀÀÀÀýÀÀÀ@ÀÀ ý@Àþ@€€@€€€€€€€À€€€€@€€ÿ €€€€€    @€À    !!@€ü€ €    @ @à€     7!!5###5!''7'77@ þ ÀÝ·…¸ß@¢‚‚>‚‚>‚‚>‚‚>À€€@þ  €€ý@‚‚>‚‚>‚‚>‚‚>     ÿÀ€À    %3#575#53#'#	373 €À€€ÀÜˆ¼¼ˆ ÿ ˆ¼¼ˆÿ 22@’<2@’R¼¼ÿ ÿ ¼¼      À€À    3#575#53#'#	373 €À€€ÀÜˆ¼¼ˆ ÿ ˆ¼¼ˆÿ ò2@’<2@’n¼¼ÿ ÿ ¼¼     @  À€ 4  %5>54.#"#'!5.54>32!5#À9^D%Fz£]]£zF%D^9À@@&?-/Qm>>mQ/-?&@@À€%GZj9P‹i<<i‹P9jZG%`àß;KX0BuW22WuB0XK;ßà`  @  À€  . ; H Y  2#"&'.5467>35"32>54.#132654&#"!32654&#""&'32>7# K‡558855‡KK‡558855‡K]£zFFz£]]£zFFz£]À%%%% %%%%@Lƒ,	-CS//SC-	,ƒL4855‡KK‡558855‡KK‡558LFz£]]£zFFz£]]£zFþÀ%%%%%%%%þð3+,K88K,+3    @ @À@    +  !!5!";!532654&#!!#"&54632  þ €ý &&€ €&&Àþ€€Î@€€À&ÿ &ÀÀ& &þ  ÿ     @  À€      '7!7!7!!'!'!'7àÀ€þ €À À€þ €ÀÀ€`€Àÿ À€`€À@À€þ €ÀÀ€`€Àÿ À€`€ÀÀ€þ €À    @  À€  " ' 9 > C  5#"'35#334&+"35353#54&#26=4&+32653#53#5ÀÀ&þÑŽRà €ÀÀý@@&€&@€€€€ &ÀÀ&À€€€€@@&þÀ	þü”FþàÀ@@þ€€&&þ€ÀÀ €€À`&&`&þ@&@€€À€€  @ @ÀÀ    #53533##5!3!53À€€€€€€ ü€€€€À€€€€€€@þÀ@ÀÀ     @  À€        # ) . 3 9 = A  3#3#3#7#3!3#3#3#35353##!!!!35353#'3# €€€€@€€À@€þ@€€@€€€€€@@€€@@ý€€ü€@ý  ý@@@ €€À€€@@þÀ@ @@À@ @€@À@ ÿ À@ÿ  À@ü€€üÀ ý @ÿ À@€@@@  @  À€      ! %  !3!3!#!#3#73#73#73#73#0ý€   ý € þ  €€À€€À€€À€€À€€€þ€€þÀ@ü€@þÀ ÿ À@@@@@@@@@   ÿà   € & ,  2#5267>54&'.#"33>3!3@]£zFFz£]G€225522€GG€2&2	ºàà¥Nv—UÀÿ €€Fz£]]£zF`522€GG€22552&_4ÿ  Qg;þ€€@À   @ @    -  >54.+!2>54&''46;2+5#"&=32#q$+#=R.à .R=#P?ñC -- s£s£ -- ÒS/+L8!ý !8L+Bi¾8((8þ08((8  € @@@   #3!53#5!@ÿ þ@ À@@ý€@@€@   À @ @  !  7!!5#"&'.5#32>5#À@ýÀÀ=""=€-Ni<<iN-€€@@Àþ€--€þ€5]F((F]5€    @ @À@ >  !.#"&546323.'.#"!!#"&'#3267>54&'35Àþö%^3CbbC8Yq+#&a55a&)--)þö+9bC8Yq+#&a55a&)-ÌÀA-,A/#&ET-.T@6",A/#&ET-3@      @@@   "333335!€.R=##=R.€@€€þ@@#=R..R=#þÀ€ý€€€  @ @€@    "333335!7'À.R=##=R.€@€€þ@þ€àà@#=R..R=#þÀ€ý€€€ý ÀÀ     ` @À@    "333335!@.R=##=R.€@€€þ@€àà@#=R..R=#þÀ€ý€€€þ€ÀÀ     @   € 
    "  #5'!!!'#5#5%!3!!5333@ÀÀþ€€@Àeeþ€eeþÀ Àþ@@þ@€€À€@Àý@ÀÀÀ[ee eeÀþ€@ý €€ÀþÀ    €@À         # ' + / 3 7 ;  3#3#3#3#'3#3#'3#3#3#3#3#'3#'3#'3#'3# @@€@@@@@@€@@@@€@@€@@@@@@@@€@@€@@€@@€@@À@@@@@@@À@@@@@@@@@@@@@@@@@@@@@   @ À€   6 C  !'!!3!!.54>32'>54&#"3267?6&'%"&54632# þ` þ @€xX ü€@d'B0+Jc88cJ+#†pPPppP2o3þÕ3II33II3@@€þ Àý€3BQ,8cJ++Jc8 ’o2PppPPp†3VI33II33I   @  €€  & + 0 @  54&+54&+"#";!#81381#55!!!!373#35#5335À &€& à@Àþ€€€€€þ€€þ@Àþ€  @0 0@  @ @&&@þ À@ @@À@@ýÀÀþ@€€@À@@À@€  ÿø  ` % K X k  546;5#"+32;5#"&=4&'>5!54&+532;#"+5326=467.5'#"&54632"0>54&#È. Kk.  .kK .p. Kk.  .kK .Ð=++==++=h+=.<5#ANA=+Bh .hkKh .h. hKkh. h&CC&h .hkKh .h. hKkh. h&CC&+==++==+š=+*;>%ZX+=         ‚C¿_<õ      Ò0=ÿ    Ò0=ÿÿàÿÀÀ             ÀÿÀ   ÿàÿø                9                @  €     @  @  @  @  ‰  @  @  €  €  @  @  @  p @  @  @    @  @  @  `  N  @  ä  @  @  @      @  @  @  @  @  @  @  @ ÿà    €  À  @     @  `  @    @  @ ÿø     
   l °0Rt–0~ô@x È"Bb B`¤úNnèz¦ö		6	`	Š	Ò
P
”
Ê,PºþB„žÔ0R|¦â: ø‚    9 Î                          ®                 –        H        «        '        o      
  Ò  	     	     	   U  	   ¸  	   2  	   |  	 
 4 ìtinymce-small t i n y m c e - s m a l lVersion 1.0 V e r s i o n   1 . 0tinymce-small t i n y m c e - s m a l ltinymce-small t i n y m c e - s m a l lRegular R e g u l a rtinymce-small t i n y m c e - s m a l lFont generated by IcoMoon. F o n t   g e n e r a t e d   b y   I c o M o o n .                                                                                                                                                                                                                                                                                                                                                                                                                                                                         tinymce/skins/lightgray/fonts/tinymce-small.woff                                                    0000644                 00000022244 15212564050 0016133 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       wOFF     $¤     $X                       OS/2     `   `$cmap  h   l   lÆ­Á„gasp  Ô         glyf  Ü    	GÁhead   à   6   6gÀ{hhea  !   $   $«òhmtx  !<   ä   äÚ›loca  "    t   tÐ$ØZmaxp  "”         I Ðname  "´  Î  ÎþLÜpost  $„            ÷   ™Ì   ™Ì  ë 3	                               @  æÀÿÀ @À @                                      P          à(à2à5æÿýÿÿ      à à*à4æÿýÿÿ ÿã   5                    ÿÿ             79               79               79     @  À€    7  %'!"3!2653#5!81!813#4&#!"#33!26=Ààý°!//!à!/þ€@@€þ€€€@&þ€&@@&@&€PPà/!ý !//!°ÀÀý€ ÿ  &&ÿ €À&&«€þ  €  €€   .  '.#!"3!2654&'#5!8181!!81S†Aþ`&&€&.
¸
…ý€€ Í†&ý && A-
¸
…ý  ÿ þ      ÿÀ À 0 9  5'.'7'./#'737>77'>?%#'573 Ÿhq€+ +€qhŸŸhq€+ +€qhŸþÀ€€€€€€p +€qhŸŸhq€+ +€qhŸŸhq€+€€€€€€     @ @À       !!!!!!!!@€ü€€ü€@ýÀ@ýÀ €ÿ €@€ÿ €     @ @À       !!!!!!!!@€ü€€ü€À þ  þ  €ÿ €@€ÿ €    @ @À       !!!!!!!!@€ü€€ü€@@ýÀ@ýÀ €ÿ €@€ÿ €   @ @À       !!!!!!!!@€ü€€ü€€ü€€ü€ €ÿ €@€ÿ €     ‰ )w` * @ M c  .'70>&'	1&67>'776&'#"&'&67>327"&54632##"&'.'&67>32`"V)?À$0þÀþÀ0$À?)V"9//’8# ?? #8’//9þ))	Ÿ%%%%3)	)"# ?À,H\0þÀ@0\H,À? #8’//9"V)??)V"9//’8Y$C
—%%%%ó$
C  @  €€  ' , 0 7  54&+54&+"#";!7#81381#55!!537#!!À &€& à€ÀÀþ€€€€€þ€ ee€Àÿ À@ @&&@þ ÀÀ€ @@À@@ýÛee¥ÀÀÿ    @  À€ * 9 H W  #35!3!35!3#";2653;2654&##"&546;2##"&546;2##"&546;2#x8@þÀ@ÿ @þÀ@8**ð*€*ð**ýä¸¸Ä@@<¸¸@ @@ÿ  @@ÿ *þP**8þÈ**°*þ €þ€  € @À@     % 2  !!!!!!32654&#"32654&#"32654&#"€@ýÀ@ýÀ@ýÀÿ %%%%%%%%%%%%@€À€À€À%%%%þÀ%%%%þÀ%%%%  €  À€    %  !!!!!!5##3#33#3#3#5€@ýÀ@ýÀ@ýÀ@@€@@€€€€€€À€@€À€À€n’@@ÿ @2<’@@@@@2   @ @À        !!!!!!!!@€ü€@@ýÀ@ýÀþÀ€ü€àà €ÿ €@€ÿ €     @ @À        !!!!!!!!@€ü€@ýÀ@ýÀ€ü€€àà €ÿ €@€ÿ €       @ €À   ?  2#".5'4>3">3!2#".5'4>3">3 (F44F('F4<hŒO7d& (F44F('F4<hŒO7d& 7J*+J7  7J+T”o@t,*	 7J*+J7  7J+T”o@t,*	  p  À€   %>.	6À$"…“þ°P°Ì?Ol K „SÞPPÙyÄöx   @  €   5	5&.>@Pþ°“…"$lO?Ì°§Ùþ°þ°ÞS„ KxöÄy   @  Ÿ€ 0 m   '.#"7'&4?>32#"&/326?64'#"&/.546?>327'.#"326?>54&/"&'&4762#Ÿ…))¥!!D¥…¥D))¥!!þˆD¥…¥D))¥…))¥Ç@ þÀÚ…¥!]!D¥…¥D¥!]!þD¥…¥D¥))…¥))m @ þÀ     @  À€ 0 m  Ž  ¯ ¾ Í  '.#"7'&4?>32#"&/326?64'#"&/.546?>327'.#"326?>54&/"&/&4762#"&=4632##"&546;2#2"/&47>372#"&=46332+"&5463Ÿ…))¥!!D¥…¥D))¥!!þˆD¥…¥D))¥…))¥ù€ €À@€€ý@€ €ÀþÀ€€Ú…¥!]!D¥…¥D¥!]!þD¥…¥D¥))…¥))í€ € z€€@Æ€ € z€€þÀ       €    	!'!   þ ÀÀÀ€€ü€ ÿ €ý+ÀÀ•ýk  @ @À@  $ 1  !"3!2654&#818181!8132654&#"€ý && &&À àÀ ÿ 8((88((8@&ý€&&€&ý@@€ þ €ý€à(88((88(  	 @ @À@     $ ) . 3 6  !"3!2654&##53#53#53!!3#53#53#53!%€ý && &&ý€€€€€€€Àþ€€À€€€€€€þ  @&ý€&&€&ý@€€ €€ €€þ €ý€€€ €€ €€þ€À     @  À€   :  3#52#575!5!'"32>7>54.'.#À€€ %ä\ÀþÀ€À-VQI  0""0  IQV--VQI  0""0  IQV- €€À%¦š@€@€À"0  IQV--VQI  0""0  IQV--VQI  0"  ` À À    '7'	 ÀÀ@ÿ  @@ÀÀ@  ÀÀ@ÿ ÿ  @ÀÀ@     N  ²f 
  ) > S  >7'%7.'"&/54632#"32>54.#".54>32#NQ&rE+NE;TEr&Q;EN+B’n		`P‹i<<i‹PP‹i<<i‹P<iN--Ni<<iN--Ni<3=[[+6B&×[[=3&B6+ýšIÔ¬7		 <i‹PP‹i<<i‹PP‹i<ý`-Ni<<iN--Ni<<iN-    @ €À  3 @ e  >7>325.'.#"%"32>7.##"&54632#"&'.'>7>732654&'@"M*D–MM–D*M"4'TVY--YVT'4ÀE€sb&&bs€EE€sb&&bs€E%%%%Ø3l99l3'FF'

pPPp

'FF'ø&?())(?&v%##%vˆ$C_::_C$$C_::_C$À%%%%¹=%%='PppP'=%%=  ä À     .+"8137337>101#‹;@<q:â:q‘Ö''–¤> @þ ÀÀä¤ˆˆ 
 @ @À   	     " ' , 1  !!5!!!5!!5!!#533#5!3#5=3#3#553#@€ü€@ ÿ  ÿ  ÿ  þÀÀÀÀÀÀ@ÀÀÀÀýÀÀÀ@ÀÀ ý@Àþ@€€@€€€€€€€À€€€€@€€ÿ €€€€€    @€À    !!@€ü€ €    @ @à€     7!!5###5!''7'77@ þ ÀÝ·…¸ß@¢‚‚>‚‚>‚‚>‚‚>À€€@þ  €€ý@‚‚>‚‚>‚‚>‚‚>     ÿÀ€À    %3#575#53#'#	373 €À€€ÀÜˆ¼¼ˆ ÿ ˆ¼¼ˆÿ 22@’<2@’R¼¼ÿ ÿ ¼¼      À€À    3#575#53#'#	373 €À€€ÀÜˆ¼¼ˆ ÿ ˆ¼¼ˆÿ ò2@’<2@’n¼¼ÿ ÿ ¼¼     @  À€ 4  %5>54.#"#'!5.54>32!5#À9^D%Fz£]]£zF%D^9À@@&?-/Qm>>mQ/-?&@@À€%GZj9P‹i<<i‹P9jZG%`àß;KX0BuW22WuB0XK;ßà`  @  À€  . ; H Y  2#"&'.5467>35"32>54.#132654&#"!32654&#""&'32>7# K‡558855‡KK‡558855‡K]£zFFz£]]£zFFz£]À%%%% %%%%@Lƒ,	-CS//SC-	,ƒL4855‡KK‡558855‡KK‡558LFz£]]£zFFz£]]£zFþÀ%%%%%%%%þð3+,K88K,+3    @ @À@    +  !!5!";!532654&#!!#"&54632  þ €ý &&€ €&&Àþ€€Î@€€À&ÿ &ÀÀ& &þ  ÿ     @  À€      '7!7!7!!'!'!'7àÀ€þ €À À€þ €ÀÀ€`€Àÿ À€`€À@À€þ €ÀÀ€`€Àÿ À€`€ÀÀ€þ €À    @  À€  " ' 9 > C  5#"'35#334&+"35353#54&#26=4&+32653#53#5ÀÀ&þÑŽRà €ÀÀý@@&€&@€€€€ &ÀÀ&À€€€€@@&þÀ	þü”FþàÀ@@þ€€&&þ€ÀÀ €€À`&&`&þ@&@€€À€€  @ @ÀÀ    #53533##5!3!53À€€€€€€ ü€€€€À€€€€€€@þÀ@ÀÀ     @  À€        # ) . 3 9 = A  3#3#3#7#3!3#3#3#35353##!!!!35353#'3# €€€€@€€À@€þ@€€@€€€€€@@€€@@ý€€ü€@ý  ý@@@ €€À€€@@þÀ@ @@À@ @€@À@ ÿ À@ÿ  À@ü€€üÀ ý @ÿ À@€@@@  @  À€      ! %  !3!3!#!#3#73#73#73#73#0ý€   ý € þ  €€À€€À€€À€€À€€€þ€€þÀ@ü€@þÀ ÿ À@@@@@@@@@   ÿà   € & ,  2#5267>54&'.#"33>3!3@]£zFFz£]G€225522€GG€2&2	ºàà¥Nv—UÀÿ €€Fz£]]£zF`522€GG€22552&_4ÿ  Qg;þ€€@À   @ @    -  >54.+!2>54&''46;2+5#"&=32#q$+#=R.à .R=#P?ñC -- s£s£ -- ÒS/+L8!ý !8L+Bi¾8((8þ08((8  € @@@   #3!53#5!@ÿ þ@ À@@ý€@@€@   À @ @  !  7!!5#"&'.5#32>5#À@ýÀÀ=""=€-Ni<<iN-€€@@Àþ€--€þ€5]F((F]5€    @ @À@ >  !.#"&546323.'.#"!!#"&'#3267>54&'35Àþö%^3CbbC8Yq+#&a55a&)--)þö+9bC8Yq+#&a55a&)-ÌÀA-,A/#&ET-.T@6",A/#&ET-3@      @@@   "333335!€.R=##=R.€@€€þ@@#=R..R=#þÀ€ý€€€  @ @€@    "333335!7'À.R=##=R.€@€€þ@þ€àà@#=R..R=#þÀ€ý€€€ý ÀÀ     ` @À@    "333335!@.R=##=R.€@€€þ@€àà@#=R..R=#þÀ€ý€€€þ€ÀÀ     @   € 
    "  #5'!!!'#5#5%!3!!5333@ÀÀþ€€@Àeeþ€eeþÀ Àþ@@þ@€€À€@Àý@ÀÀÀ[ee eeÀþ€@ý €€ÀþÀ    €@À         # ' + / 3 7 ;  3#3#3#3#'3#3#'3#3#3#3#3#'3#'3#'3#'3# @@€@@@@@@€@@@@€@@€@@@@@@@@€@@€@@€@@€@@À@@@@@@@À@@@@@@@@@@@@@@@@@@@@@   @ À€   6 C  !'!!3!!.54>32'>54&#"3267?6&'%"&54632# þ` þ @€xX ü€@d'B0+Jc88cJ+#†pPPppP2o3þÕ3II33II3@@€þ Àý€3BQ,8cJ++Jc8 ’o2PppPPp†3VI33II33I   @  €€  & + 0 @  54&+54&+"#";!#81381#55!!!!373#35#5335À &€& à@Àþ€€€€€þ€€þ@Àþ€  @0 0@  @ @&&@þ À@ @@À@@ýÀÀþ@€€@À@@À@€  ÿø  ` % K X k  546;5#"+32;5#"&=4&'>5!54&+532;#"+5326=467.5'#"&54632"0>54&#È. Kk.  .kK .p. Kk.  .kK .Ð=++==++=h+=.<5#ANA=+Bh .hkKh .h. hKkh. h&CC&h .hkKh .h. hKkh. h&CC&+==++==+š=+*;>%ZX+=         ‚C¿_<õ      Ò0=ÿ    Ò0=ÿÿàÿÀÀ             ÀÿÀ   ÿàÿø                9                @  €     @  @  @  @  ‰  @  @  €  €  @  @  @  p @  @  @    @  @  @  `  N  @  ä  @  @  @      @  @  @  @  @  @  @  @ ÿà    €  À  @     @  `  @    @  @ ÿø     
   l °0Rt–0~ô@x È"Bb B`¤úNnèz¦ö		6	`	Š	Ò
P
”
Ê,PºþB„žÔ0R|¦â: ø‚    9 Î                          ®                 –        H        «        '        o      
  Ò  	     	     	   U  	   ¸  	   2  	   |  	 
 4 ìtinymce-small t i n y m c e - s m a l lVersion 1.0 V e r s i o n   1 . 0tinymce-small t i n y m c e - s m a l ltinymce-small t i n y m c e - s m a l lRegular R e g u l a rtinymce-small t i n y m c e - s m a l lFont generated by IcoMoon. F o n t   g e n e r a t e d   b y   I c o M o o n .                                                                                                                                                                                                                                                                                                                                                                                             tinymce/skins/lightgray/fonts/tinymce.eot                                                           0000644                 00000044740 15212564050 0014660 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       àI  <I                       LP                       ½–?.                   t i n y m c e    R e g u l a r    V e r s i o n   1 . 0    t i n y m c e          €  0OS/2ž   ¼   `cmapßqŸô    4gasp     P   glyf6–Å  X  AÈheadp¿  D    6hhea«7  DX   $hmtxîu  D|  øloca6B$è  Ft   þmaxp Ž   Gt    name£T  G”  †post     I     ü   ™Ì   ™Ì  ë 3	                               @  îxÀÿÀ @À @                                        B @     à(à5æææ+èé	ééééé(é*é-é5é=éAéaêªê¬ë6ë§ìjìÍìÔíjíÀíùîxÿýÿÿ      à à*æ ææ*è é ééééé&é*é-é0é9é?éaê¨ê¬ë5ë§ìjìÌìÔíjíÀíùîxÿýÿÿ ÿã  98IKJEC=5420-,ÇÆ>Î«¥»ƒ                                                                      ÿÿ             79               79               79      ÿÀ À     !!!3#!3!3€ü€ þ €€€ý @@K5Àü €ÿ þ  þÀ@5  @ÿÀÀÀ   1  '.#!"3!2654&#5#!"&5463!23‡ŽP!þ !//!à!/!E£µ	ý 		àþùŽ!/!ü !//!`!P£ü¶		`	þ    ÿÀ À / 7  5'.'7'./#'737>77'>7'#'573 Ÿhq€+ +€qhŸŸhq€+ +€qh¡€€€€€€p +€qhŸŸhq€+ +€qhŸŸhq€+ €€€€€       €       !!!!!!!!!!  ü €ý€€ý€ ü  ü €€@€ÿ €@€ÿ €         €       !!!!!!!!!!  ü À€ý€€ý€À ü  ü €€@€ÿ €@€ÿ €       €       !!!!!!!!!!  ü €€ý€€ý€þ€ ü  ü €€@€ÿ €@€ÿ €         €       !!!!!!!!!!  ü  ü  ü  ü  ü €€@€@€@€@€    ]ÿÀ£€ 6 Z f ‹  %.+'6764'&'	#"3267>'732676&'#"&'.5467>7>7>327"&54632#"&'.'.'.5467>32{"T(@ÿþþÿ@(T"=3; (S#("AA"(#S( ;3=ýæš%55%%552û"#@ ""H""þ€€""H""ÿ @#"=Ÿ3#"(c.BB.c("#3Ÿ=‰
§5&%55%&5ü
  @ÿÀ À  & * - 3  54&+54&+"#"3!!781381#55!537#!!@à&€&à ÀÀý€€€À €eÀþÀ € @&&@ý€ÀÀ  @@À@@ý[e@À@   ÿÀ À   ) 7 E S  !!%!!#!!!#"3!26533!2654&#"&546;2#"&546;2#"&546;2@€þ€ €þ€x8ÿ ÿ ÿ 8**0*€*0**ý†øøµ@@oøøÀ@@@ÿ  ÿ  ÿ *ýÐ**xþˆ**0*ý€Àþ@     ÿÀ À     # /  !!!!!!4632#"&4632#"&4632#"&€€ý€€ý€€ý€þ€K55KK55KK55KK55KK55KK55K€€ÿ €ÿ €@5KK55KKþµ5KK55KKþµ5KK55KK  @ÿÀ À      )  %!!!!!!'#5#53#575#53#535#535#5€€ý€€ý€€ý€À@@@€À€€ÀÀ€€€€€€ € €Àÿ À@ýò2@’<2@’îþÀ@@@@@      €        !!!!!!!!!!  ü €€ý€€ý€€ý€þ€ ü  €€@€@€@€@€ €À        €        !!!!!!!!!!%  ü €€ý€€ý€€ý€þ€ ü  ÿ €€@€@€@€@€€þ€À    @  & M  2#"'.'&5'47>763">!2#"'.'&5'47>763">á.))==))..))=##zRQ]@u-	I.))==))..))=##zRQ]@u-	 =))..))==)). ]QRz##€0.
=))..))==)). ]QRz##€0.
   @ÿÀŠÀ   676&'&	6ú+8UV¨þ€€ÉqrF('@M[[š32þ€€øNNìŠ‰   vÿÀÀÀ   5	5&&'&676@€þ€¨VU8+i'(FrqÉÈøþ€þ€þ23š[[Mr‰ŠìNN   .ÿÀÒÀ  @ r  67>'&7#"&/.546?>327.#"326?>''.#"7.546?>32#"&'326?64@'<'þÄª
	£
	c
		
£	A19£..c9:£*#Aõc9:¤*#A
	£
	c
		
£	A19£. <'þÄ'	£
		
c		¤	
A£.‚-c£*u.Ac£*u.A	£
		
c		¤	
A¤-‚      ÿÀ À 2 e i m q u y }  #"&/.546?>327.#"326?>''.#"7.546?>32#"&'326?64''773#3#'3#3#Ý
	£
	c
		
£	A19£..c9:£*#Aõc9:¤*#A
	¤		c
		
£	A19£..ýÀ.Ài@@þ€ÀÀÀ.À©@@ ÀÀ	£
		
c		¤	
A¤-‚-d¤*u.Ac£*u.A	£
		
c		¤	
A¤-‚-†À.ÀéÀÀ@þ×À.À)ÀÀ@    ÀÿÀ@À  	  		!À@@@ÿ ÿ  Àü @þÀ ü› ÿ %      @      !!!4632#"&!7  @ü€€ÿ 8((88((8Àý À €@üÀ@ý À (88((88þH þÀ`  	   @ @         "  !#535#535#53!!#535#535#53%  üÀ€€€€€€@þ  À€€€€€€ýÀ @ý  ý@€€€€€ý€€ý€€€€€€€þ€À      ÿÀ À   H e  3#2#575!57"327>76767>7654'.'&'&'.'&#512#"'.'&547>76À€€ %À€ÀþÀÀ*((K""""K((**((K""""K((*j]^‹((((‹^]jj]^‹((((‹^] €@%À€@€@€ ""K((**((K""""K((**((K""`((‹^]jj]^‹((((‹^]jj]^‹((    @ ÀÀÀ    	3	!#	3@ÿ  €ÿ   € ÿ € Àÿ ÿ   ÿ ÿ    6  ÊJ  3 @ L V  "327>7654'.'&#"&'.5467>32'>77&'.'&'#17' PEFiiFEPPEFiiFE|)i::i)(,,()i::i)(,,þR+%"!:V`<.V:!"%+<`þª@ (” iFEPPEFiiFEPPEFiý´(,,()i::i)(,,()i::iV:!"%+<`º+%"!:V`6À€2v      €    ' Q |  "327>767&'.'&2#"&546#"&'.'.'>7>732654&'&'.'&#">767>76325.' OIIƒ88,,88ƒIIOOIIƒ88,,88ƒII%%%%a? "D##D" ?/U##U/2pPPp2/U##U()*+W--..--W+*),R%*a5&&'P*)**)*P'&&5a*%R,€C/0::0/CC/0::0/C€%%%%þÿA((A6PppP6A((Aµ9!m,II,m!9  Ð €0     %7!3#33#B::rÀàÀršH:¼€ÀÀ€ý€ À   
     €         # '  !5!!5!5#!5!!%!!5!!!!5!  ý€ ÿ  ÿ @ÿ  ÿ € ÿ  ü€ ÿ € €ü€€ýÀÀÀ@ÀÀ ÀÀÀÀÿ ÀÀÀ ÀÀþÀÀÀÀ    €     !!  ü  €     ÿÀàÀ      7!!!!''7'77 @ýÀÀÀý@UÍ|Ä‚‚>‚‚>‚‚>‚‚@€ €ý@ ýÀ‚‚>‚‚>‚‚>‚‚   ÿÀ€À    %3#575#53#'#	373 €À€€ÀÜˆ¼¼ˆ ÿ ˆ¼¼ˆÿ 22@’<2@’R¼¼ÿ ÿ ¼¼      À€À    3#575#53#'#	373 €À€€ÀÜˆ¼¼ˆ ÿ ˆ¼¼ˆÿ ò2@’<2@’n¼¼ÿ ÿ ¼¼      ÿÀ À C  %!7!567>7654'.'&#"!!5&'.'&547>7632À @þ€1))<`@@II@@`<))1þ€@ F;;U((‹^]jj]^‹((U;;F@€ÿ Ö$$_88>PFFggFFP>88_$$Ö €!)*l@@G]QRz####zRQ]G@@l*)   ÿÀ À  7 C O k  "327>7654'.'&"'.'&547>7632#"&54632#"&5463227>767#"'.'&' j]^‹((((‹^]jj]^‹((((‹^]jYOOu""""uOOYYOOu""""uOOÙ%%%%€%%%%ÿ 501R!!U76==67U!!R10À((‹^]jj]^‹((((‹^]jj]^‹((üP""uOOYYOOu""""uOOYYOOu""p%%%%%%%%þ™

"@78QQ87@"

        €    '  !!!";!32654&!!%#"&54632  þ Àü€&&À À&&þæþ€€€€@&þÀ&ÿ  &@&ý€@à      ÿÀ À      ''7''!7!7'7!7 ŠÔlÔŠþvÔlÔŠ€öŠþ€ŠÔlØÔŠþ€ŠÔÀþ€ŠÔlÔŠŠÔlÔŠ€üöŠþ€ŠÔllÔŠ€ŠÔ     @ÿÀÀÀ    0 4 8 >  334&+"33#%5#";5#54&+326=4&#26#535#53	7€€@&€&@€€@À&&ÀÀ€&ÀÀ&@€€€€ þ`àRŽ`ÀÀ€&&þ€€€€@&þÀ&@@``&þ@&`&&Æ€@€þ þ@ F”.      ÿÀ À    #53533##%!3!ÀÀÀ€ÀÀ€@ü € €€ÀÀ€À€þ€€ÿ      ÿÀ À       # ' / 3 7 ? C H  3#73#%#535#53#73#%3#33#73#%#535#53#73#%3#3!!1!€€€À€€@À€@þ@€€À€€þÀ@€À@€€À€€@À€@þ@€€À€€þÀ@€À€ü€€@ü  @@@@ÿ @€@À@@@À€@ @þÀ@@@@ÿ @€@À@@@À€@ @@ü€Àü        ÿÀ À       #  3#73#%3#73#%3#!3!!#! €€ÀÀÀ €€ÀÀÀ €€ý  €ý@  ý€À@@@@@@@@@@þ@Àþ€€ü €þ€@þÀ  ÿà   € + 1  2#5267>54&'.#"3367>76!3@]QRz####zRQ]G€225522€GG€2&2	ºàà¥''vLKÿ €€##zRQ]]QRz##`522€GG€22552&_4ÿ  QGFgþ€€@À     À  @€   (  >54'.'&#!!27>7654&32+#32Ä F./5þÀ€5/.FDþ„e*<<)fŸŸŸ,>>Û"T/5/.Fü€F./5FtFK55Kþ€ K55K     €  €€   #3!53#5€€þÀ€þ@€@€€@ý @@ @  À  @€  #  3#"'.'&533267>5!!À€W:;BB;:W€I((Iþ €ý€€þ`<45NN54< þ`88þ €         € 8 <  #"&'.5332654&#"&'.5467>32#4&#"32%!!Û0550,q>>q,05€rNNrrN>q,0550,q>>q,05€rNNrrN>q,ý% ü »$b55b$!$$!$b54LL44L$!$b55b$!$$!$b54LL44L$!@      €€   !####"'.'&547>76€ €€€€.))==))€€ý  ý À=))..))=  @  À€    !####"'.'&547>76À €€€€.))==))þ® ÿ €€ý  ý À=))..))=þ€àà      À€    !####"'.'&547>76-  €€€€.))==))îÿ  €€ý  ý À=))..))=üÀàà    ÿÀ À 	      #5'!!!'##%!3!!5333@ÀÀþ@€€Àeeþ€eeþ€@Àþ €þ À€ÀÀ@Àý ÿ @eeee€Àþ@ÿ ÀÀÀ   €@À         # ' + / 3 7 ;  3#3#3#3#'3#3#'3#3#3#3#3#'3#'3#'3#'3# @@€@@@@@@€@@@@€@@€@@@@@@@@€@@€@@€@@€@@À@@@@@@@À@@@@@@@@@@@@@@@@@@@@@   € €€à   	''€ à€þ   þàà€þ      ÿÒ €  # ; G  !'!!3!!&'.'&547>7632'>54&#"3267?6&%"&54632 þ` þ @€8K-ü @ä'!!0J128821JcÆpPPppP2¯3þ3II33II@@€þ Àý€B)(,821JJ128 Ò¯2PppPPpÆ3§I33II33I  @ÿÀ À  * 5 9 =  373#35#335'54&+54&+"#"3!!81381#55!!!   @0à0@  @à&€&à €ý€€€À  þ  À€@ÿ @@ @€À @&&@ý€ÀÀ @@À@@ý@@   ÿÀ À  " &  .'.#"#5>723#5!!!ã“	&		z–]ÆWþ @ü€€@PF

þÝsþ*àà€ü  ü@€   0ÿáà@   5  %!!!!6762'&'7>76767>'&'&'.sý½CIþL´þÙBSR¬RSBB!!!!B.67v>=;.00_,,%84-::~?@8VþÚPGÿ GB!!!!BBSR¬RSB-
%9EEŽBC4-)V'   -ÿÀ­À 1 u  '#"'.'&'81<5<5104504167>767'7818181<1&'.'&10>7>71099>581<5<5}Z  J()+NEEi	À-¶:c-<<:;;&%%F<<) ,MY"
	fDEP'('M%%#À-·ýÇd0wpq°65:))1F&BB&412^+,'MG$    ÿø  ` % K W l  546;5#"+32;5#"&=4&'>5!54&+532;#"+5326=467.5'#"&54632"07>7654&#È. Kk.  .kK .p. Kk.  .kK .Ð=++==++=h+=.<5# !N! =+Bh .hkKh .h. hKkh. h&CC&h .hkKh .h. hKkh. h&CC&+==++==Å=+*;>%--X+=        €         !!5!5#!55!!!!5!  þ€ÿ  ÿ @ÿ € ü€ ÿ € €ü€€ý€ÀÀ ÀÀÀÀÀÀÀþÀÀÀÀ   	     €         #  !!5!5#!5!!%!!5!!!!5!  þ€ÿ  ÿ @ÿ  ÿ € ÿ  ü€ ÿ € €ü€€ý€ÀÀ ÀÀÀÀÿ ÀÀÀ ÀÀþÀÀÀÀ    @ €          !!5!5!5!!5!5!5!!5!5!5!5!5!  ý@ÿ  ÿ  @ÿ  ÿ  @ÿ  ÿ  ü€€€üÀ@ý À@Àþ@À@Àþ@À@À@À      €         !!!5#!5!!5!!!  ý€@þÀÿ @ÿ  ÿ € ü€ ÿ €ü€€üÀÀþ@ÀÀÀÀÀÿ À ÀÀþÀÀ        €        %5#53533#!!!!5!5!5!5!5!@¶¶Vººþj þ€ýÀ@@ÿ  ÿ  ÿ  ½¶Z¶¶Z¶Ãü€€üÀÀý@À@À@À       €        3##5#535%!!5!5!5!5!5!!!À¶¶Vººý– ý@ÿ  ÿ  ÿ  €ýÀ@ƒ¶Z¶¶Z¶ýü€€üÀÀ@À@Àý@À       €        ##5#53533!!5!!5!!5!5!!³FFýM ý@ÿ  @ÿ  @ÿ  ü€€ýC@ü€€üÀÀÀÀÀÀ=Ã         €        3533##5#!!!%!!!!5!5!MFFþ³ ý€ ÿ þÀ ÿ €ü€€ÿ  CC€ü€€€ÀÀÀþ Ã=À         €        '  !!!!5!5!5!5!5!!!5!5!''7'77  ý€ ÿ @ÿ  ÿ  ÿ  €ýÀ@ÿ  `=ƒƒ=ƒƒ=ƒƒ=ƒ€ü€€€Àþ À@À@Àý@À@Àý=ƒƒ=ƒƒ=ƒƒ=ƒ        €     !!!!''7'77  ü =ƒü}í`ÍÍ`ÍÍ`ÍÍ`Í€ü€ ý@ÀýÓ`ÍÍ`ÍÍ`ÍÍ`Í       @ €         !!5!5!5!5!5!!5!5!5!5!5!  þ€ÿ  ÿ  ÿ  @ÿ  ÿ  ÿ  €üÀ@ý À@À@Àý@À@À@À       @ €         !!5!5!5!!5!5!5!!5!5!5!  ý@ÿ  ÿ  @ÿ  ÿ  @ÿ  ÿ  €üÀ@ý À@Àþ@À@Àþ@À@À      €   $  ''7'77!#3#3!5!7!5!'!5!vœ M M £M£IüŠ @@VZ@ü€6@þŠs@þÍ€= M J £M£MCü€€þÀ@À@ÀÀ@À@À         €    % 1  55!!'5!'5!!57!57!'77'7@@@@@@€ü Àÿ 3ÿ 3ÿ  # 0 þà£M£œL M ó@@M@Š@Ðü€€€34ZZ43ý@v#ss0SÃjœ£M£M M   @ÿ€À€    5%33'47632#"'&Àþ@þ@@€@ÀÀ@€à((((À@€€@€ÿ þ@Àþ@À à((( 
     €         # '  3#7!!3#7!!3#7!!3#7!!3#7!! €€À@üÀÀ€€À@üÀÀ€€À@üÀ€€À€ý€À€€À€ý€€€€€ÿ €€€ÿ €€€À€€€ÿ €€€   ÿÚ ¦   3  '	7%93267>594&'.'
DVVVþ°þTWþú#@ª		
	“CVVVþþP³üó#3I/


,     ÿà        !!!!!!!!  ü  ü  ü  ü 
€j@VÀ*ÿ      *ÿÀÖ­     	#57'762!!5ãþ
º÷¹@¹C+lCý¬üTsþ
¹÷º=ºCm+Cý€pp   	  ÿó   	  ! G V h t   !!##53#575#53%#535#535#5>32#.'#"&546?>54&#"##3267573>32#"&'#32654&#"%.#"3267#"&54632#  ü 0CC†É††ÉÌ‰‰‰‰ýé55+J )0.5&C“		€J0:=0GG†G?07BC90>Cà@ðþ­CÚ6C™@7Cššþ­CCGCCý,( p
+!"'	3	#Ýp
E7:MVÖ '' !%'%"$%-3G9<G2.    ÿÀ À ! B  &'.'&#"347>7632!#"'.'&'7!7327>765z#+*`558j]^‹((`! qLLV.,+O"#–`†&! qLLV.,+O"#–þ †#+*`558j]^‹((&+((‹^]jVLLq !
	$ –`†þ¦VLLq !
	$ –þ †&+((‹^]j    ÿí  " * .  '67>76735!5#!!.'#7261%#3733%7#*w+Šþ¹]þºH3!6\D+íDé$]Ð]3Ý3]þ³MMš0v"$%M(((]]]]C7$M,:j0éCé]íýÐéÊÊ    @  À€          3#3#%3#3#%3#3#%3#3#@€€€€ÿ €€ €€ÿ €€€€ €€ÿ €€€€€€€€€€€€€€€€€€    « @€@    54&#!"3!26=3!;265!# þ  +þUUU€ë*ª*ªþ€*V      ¡    	5	!!! þ þ   €ÿ ÿ ÿ €rþs¢þs”þ€ ÿ €      @ÿ        7)!3#!!3#@óÌóüô ÿ @€€  ÿ @€€ŸQý¡QÀ€@þ À€@     @ÿÀ€À     !!"3!265#5#	GþÁE¹þ!//! !/þÀÀ   ùE?þ¹€/!ü !//!0þ€ÀÀ ÿ      ÿÀ À     !!7!"3!26534&' ý€`€þ (88(À(8 ý  `Xýø0à0 þ €€8(ý@(88(  ý  `HXý€0à0     ÿÀ €    !";!2654&!5#! üÀ(88( 3m(88Hþ…ÅÀ €8(þ (8ÿ  8( (8ýÀ¯¯À     @  À` .  .106726'476&'&#"310!4'.'&oE
*)ZZ)*
E88q*+€+*q88>V@d,+^%%%%^+,d@V>F--00--F      ÿÀ€€  #  #54&+"#"3!2654&%46;2!PqO€Oq þ\&€&ÿ  ÀOqqOÀþ àÀ&&À      ÿÀÀ€ #  2#54&+"32#!"&5463!5463 Oq€&€&ýàqO€qOÀÀ&&Àþ àÀOq         €   3 7 O S  54&+"#3;26=!5534&+"!!;26=35#534&+"#3;26=!5!53À ÀÀ @ý €À ýÀ@ ÀÀÀ€þÀ ÀÀ @ýÀÀ€@€€€€€°€€€€€°€€€€€  @ÿÀÀÀ     !!%5!!7!5!#53À€@ý  ÿ þÀ@ @þ€€€@ÀÀ€€À@@À@  €  €€     !!!!!!€ ÿ  ÿ  ÿ €ÿ @ÿ @ÿ     ÿÀòÀ   $  %.#"3!26'%"&546327#4632òþKþK%3f3%þ%%%%X%%,gü™,@@,%%%%À %%   ÿÀ À   H e  3#2#575!57"327>76767>7654'.'&'&'.'&#512#"'.'&547>76À€€ %À€ÀþÀÀ*((K""""K((**((K""""K((*j]^‹((((‹^]jj]^‹((((‹^] €@%À€@€@€ ""K((**((K""""K((**((K""`((‹^]jj]^‹((((‹^]jj]^‹((     ÿÀ À  7 C  "327>7654'.'&"'.'&547>7632##5#53533 j]^‹((((‹^]jj]^‹((((‹^]jPEFiiFEPPEFiiFE°À€ÀÀ€ÀÀ((‹^]jj]^‹((((‹^]jj]^‹((ü€iFEPPEFiiFEPPEFi@ÀÀ€ÀÀ      ÿÀ À   )  "327>7654'.'&3#!53#533 j]^‹((((‹^]jj]^‹((((‹^]ª€€Àÿ @@À@À((‹^]jj]^‹((((‹^]jj]^‹((À€þ @ @þÀ    ÿÀ À 	    %!!#535#3 þàþ@þà À þà €€€€ààþàþ@þà À üÀ€€€    ˆÿÀxÀ * D  &'.'&'327>76767>'&'#"&'327>767>'a%&\557755\&%

$$Y235532Y$$

~!|F)N!

,**J""çEAAw66//66wAAE+,,X++).&&66&&.)++X,,+þâ>K- '@€5*0‚A   @ @   3!26=4&#!" Àü@ ÀÀ     ÿÀ À #  !4&+"!"3!;265!26=4&àþ Àþ `À`@`þ Àþ `À       € @   	7 À@@Àþ @À@þÀÀ    ÀÿÀ€À   	€À@þÀÀ ÀÀþÀþÀÀ     @     '	 ÀþÀþÀÀ @ÀþÀ@Àþ   @ @   	 ÿ ÿ @ ÿ   @ @   	   @ÿ     € À    		   þ   Àÿ  þÀÿ    @  À€ 	   7!!!!'#5'À€ý  €ÿ   ƒþž[cƒ€€þ  €þ  þ ƒþ[bƒ    @à@ /  "#7#47>7632#27>7654'.'&#`PEFiÀ÷÷ÀJ229922JJ229PEFiiFEP@iFEP÷÷922JJ229922JniFEPPEFi       @à@ /  23'34'.'&#"3"'.'&547>763 PEFiÀ÷÷ÀJ229922JJ229PEFiiFEP@iFEP÷÷922JJ229922JniFEPPEFi         À    !!  ü @€ü@€    ÿÀÀÀ    !)@€ü@€Àü     ÿØèÀ ( D P  %'.>54'.'&#"326776&"'.'&547>7632##33535#àò'+1iFEPPEFiiFEPG€2ÎKý‚5/.FF./55/.FF./€€€€€€YÎ2€GPEFiiFEPPEFi1+'òKF./55/.FF./55/.FÀ€€€€€    ÿØèÀ ( D H  %'.>54'.'&#"326776&"'.'&547>7632!!àò'+1iFEPPEFiiFEPG€2ÎKý‚5/.FF./55/.FF./õ€þ€YÎ2€GPEFiiFEPPEFi1+'òKF./55/.FF./55/.F@€         @  N  !	5#'35#'35#'35#'35#'35#'35#'35#'35#'35!'!5!'!5!'!5!'733#3!!!!!! þ ÿ   þ -;IXft‚‘Ÿ­»ÉØæôþþþá-þÅIþ¨‹Ô×ç÷þùþÙ7þ¹Wþ¡@ÿ ýÀ@þu‹þu  @ @À      !!!!!!@€ü€€ü€€ü€ À@À@À   
  ÿÀ À   ) 7 F T c r Ž š  %2#"&=46"&=46322+"&5463+"&546;2"/&4762'&4762"%"'&4?6262"'&4?"327>7654'.'&"&54632 %%%%%%%%¥%%@%%ý@%@%%@%}-5.5ý†-5.5g5.5-ý†5.5-=5/.FF./55/.FF./5B^^BB^^€%@%%@%€%@%%@%ÿ %%%%@%%%%ý.5-5Ä.5-55-5.þ<5-5.âF./55/.FF./55/.Fþ`^BB^^BB^     3ÿÄÉÀ "  .''6767676&'&'Ì-`1.((99‡KJKK.\ee¿RR553==\€ <GF•KLEF44A
'C53==\\fe¿QR6      ÿÀ À  *  "327>7654'.'&47>763"'.'& j]^‹((((‹^]jj]^‹((((‹^]þiFEPPEFiÀ((‹^]jj]^‹((((‹^]jj]^‹((þ PEFiý iFE   ƒ C}=   '			7}ZþÝþÝZ"þÞZ##ZþÞãZþÞ"ZþÝþÝZ"þÞZ#     ÿÀ`À   7	' ÀþÀ@Àþ @À@@Àþ     ÿÀ À (  326=#"3!2654&#"32654&#!" %%¥å%%€%%%ý[å%%þ€%€þ€%%åý[%%%€%%å¥%%%     ÿÀ À     7'!5##3!3535#!@À@Àþ@€ÀÀ €ÀÀþ @þÀ@@ÀÀ@ÀÀÀ€þ ÀÀ€€þÀ@@þÀ         .?–½_<õ      ØA    ØAÿàÿ€À             ÀÿÀ   ÿàÿø                ~                   @                 ]  @        @           @  v  .     À           @  6     Ð                           @          ÿà  À  €  À        @          €     @     0  - ÿø                                            @           *          @  «        @        @           @ €                ˆ           À           @                       @     3     ƒ              
   B Ž è8bˆX d¢Ðþr–¼j(Dt²Jjò®Ê		 	P	z	¤


¬
î&„¦X¨ê>–¾îT¬À.‚Æ"²>t¶ò*bšÔX„ºð0„¸üDf’XÀBr–Àø0^¦Ü~ ¼øö8`Îê 4H\jxŽ´þHZläVÆàÀþ D f z ¶ ä      ~ ›                          ®                 `        6        u                K      
  Š  	     	   g  	   =  	   |  	      	   R  	 
 4 ¤tinymce t i n y m c eVersion 1.0 V e r s i o n   1 . 0tinymce t i n y m c etinymce t i n y m c eRegular R e g u l a rtinymce t i n y m c eFont generated by IcoMoon. F o n t   g e n e r a t e d   b y   I c o M o o n .                                                                 tinymce/skins/lightgray/fonts/tinymce.svg                                                           0000644                 00000132445 15212564050 0014670 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="tinymce" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xe000;" glyph-name="save" d="M896 960h-896v-1024h1024v896l-128 128zM512 832h128v-256h-128v256zM896 64h-768v768h64v-320h576v320h74.978l53.022-53.018v-714.982z" />
<glyph unicode="&#xe001;" glyph-name="newdocument" d="M903.432 760.57l-142.864 142.862c-31.112 31.112-92.568 56.568-136.568 56.568h-480c-44 0-80-36-80-80v-864c0-44 36-80 80-80h736c44 0 80 36 80 80v608c0 44-25.456 105.458-56.568 136.57zM858.178 715.314c3.13-3.13 6.25-6.974 9.28-11.314h-163.458v163.456c4.34-3.030 8.184-6.15 11.314-9.28l142.864-142.862zM896 16c0-8.672-7.328-16-16-16h-736c-8.672 0-16 7.328-16 16v864c0 8.672 7.328 16 16 16h480c4.832 0 10.254-0.61 16-1.704v-254.296h254.296c1.094-5.746 1.704-11.166 1.704-16v-608z" />
<glyph unicode="&#xe002;" glyph-name="fullpage" d="M1024 367.542v160.916l-159.144 15.914c-8.186 30.042-20.088 58.548-35.21 84.98l104.596 127.838-113.052 113.050-127.836-104.596c-26.434 15.124-54.942 27.026-84.982 35.208l-15.914 159.148h-160.916l-15.914-159.146c-30.042-8.186-58.548-20.086-84.98-35.208l-127.838 104.594-113.050-113.050 104.596-127.836c-15.124-26.432-27.026-54.94-35.21-84.98l-159.146-15.916v-160.916l159.146-15.914c8.186-30.042 20.086-58.548 35.21-84.982l-104.596-127.836 113.048-113.048 127.838 104.596c26.432-15.124 54.94-27.028 84.98-35.21l15.916-159.148h160.916l15.914 159.144c30.042 8.186 58.548 20.088 84.982 35.21l127.836-104.596 113.048 113.048-104.596 127.836c15.124 26.434 27.028 54.942 35.21 84.98l159.148 15.92zM704 384l-128-128h-128l-128 128v128l128 128h128l128-128v-128z" />
<glyph unicode="&#xe003;" glyph-name="alignleft" d="M0 896h1024v-128h-1024zM0 704h640v-128h-640zM0 320h640v-128h-640zM0 512h1024v-128h-1024zM0 128h1024v-128h-1024z" />
<glyph unicode="&#xe004;" glyph-name="aligncenter" d="M0 896h1024v-128h-1024zM192 704h640v-128h-640zM192 320h640v-128h-640zM0 512h1024v-128h-1024zM0 128h1024v-128h-1024z" />
<glyph unicode="&#xe005;" glyph-name="alignright" d="M0 896h1024v-128h-1024zM384 704h640v-128h-640zM384 320h640v-128h-640zM0 512h1024v-128h-1024zM0 128h1024v-128h-1024z" />
<glyph unicode="&#xe006;" glyph-name="alignjustify" d="M0 896h1024v-128h-1024zM0 704h1024v-128h-1024zM0 512h1024v-128h-1024zM0 320h1024v-128h-1024zM0 128h1024v-128h-1024z" />
<glyph unicode="&#xe007;" glyph-name="cut" d="M890.774 250.846c-45.654 45.556-103.728 69.072-157.946 69.072h-29.112l-63.904 64.008 255.62 256.038c63.904 64.010 63.904 192.028 0 256.038l-383.43-384.056-383.432 384.054c-63.904-64.008-63.904-192.028 0-256.038l255.622-256.034-63.906-64.008h-29.114c-54.22 0-112.292-23.518-157.948-69.076-81.622-81.442-92.65-202.484-24.63-270.35 29.97-29.902 70.288-44.494 112.996-44.494 54.216 0 112.29 23.514 157.946 69.072 53.584 53.464 76.742 124 67.084 185.348l65.384 65.488 65.376-65.488c-9.656-61.348 13.506-131.882 67.084-185.348 45.662-45.558 103.732-69.072 157.948-69.072 42.708 0 83.024 14.592 112.994 44.496 68.020 67.866 56.988 188.908-24.632 270.35zM353.024 114.462c-7.698-17.882-19.010-34.346-33.626-48.926-14.636-14.604-31.172-25.918-49.148-33.624-16.132-6.916-32.96-10.568-48.662-10.568-15.146 0-36.612 3.402-52.862 19.612-16.136 16.104-19.52 37.318-19.52 52.288 0 15.542 3.642 32.21 10.526 48.212 7.7 17.884 19.014 34.346 33.626 48.926 14.634 14.606 31.172 25.914 49.15 33.624 16.134 6.914 32.96 10.568 48.664 10.568 15.146 0 36.612-3.4 52.858-19.614 16.134-16.098 19.522-37.316 19.522-52.284 0.002-15.542-3.638-32.216-10.528-48.214zM512.004 293.404c-49.914 0-90.376 40.532-90.376 90.526 0 49.992 40.462 90.52 90.376 90.52s90.372-40.528 90.372-90.52c0-49.998-40.46-90.526-90.372-90.526zM855.272 40.958c-16.248-16.208-37.712-19.612-52.86-19.612-15.704 0-32.53 3.652-48.666 10.568-17.972 7.706-34.508 19.020-49.142 33.624-14.614 14.58-25.926 31.042-33.626 48.926-6.886 15.998-10.526 32.672-10.526 48.212 0 14.966 3.384 36.188 19.52 52.286 16.246 16.208 37.712 19.614 52.86 19.614 15.7 0 32.53-3.654 48.66-10.568 17.978-7.708 34.516-19.018 49.15-33.624 14.61-14.58 25.924-31.042 33.626-48.926 6.884-15.998 10.526-32.67 10.526-48.212-0.002-14.97-3.39-36.186-19.522-52.288z" />
<glyph unicode="&#xe008;" glyph-name="paste" d="M832 640v160c0 17.6-14.4 32-32 32h-224v64c0 35.2-28.8 64-64 64h-128c-35.204 0-64-28.8-64-64v-64h-224c-17.602 0-32-14.4-32-32v-640c0-17.6 14.398-32 32-32h288v-192h448l192 192v512h-192zM384 895.886c0.034 0.038 0.072 0.078 0.114 0.114h127.768c0.042-0.036 0.082-0.076 0.118-0.114v-63.886h-128v63.886zM192 704v64h512v-64h-512zM832 26.51v101.49h101.49l-101.49-101.49zM960 192h-192v-192h-320v576h512v-384z" />
<glyph unicode="&#xe009;" glyph-name="searchreplace" d="M64 960h384v-64h-384zM576 960h384v-64h-384zM952 640h-56v256h-256v-256h-256v256h-256v-256h-56c-39.6 0-72-32.4-72-72v-560c0-39.6 32.4-72 72-72h304c39.6 0 72 32.4 72 72v376h128v-376c0-39.6 32.4-72 72-72h304c39.6 0 72 32.4 72 72v560c0 39.6-32.4 72-72 72zM348 0h-248c-19.8 0-36 14.4-36 32s16.2 32 36 32h248c19.8 0 36-14.4 36-32s-16.2-32-36-32zM544 448h-64c-17.6 0-32 14.4-32 32s14.4 32 32 32h64c17.6 0 32-14.4 32-32s-14.4-32-32-32zM924 0h-248c-19.8 0-36 14.4-36 32s16.2 32 36 32h248c19.8 0 36-14.4 36-32s-16.2-32-36-32z" />
<glyph unicode="&#xe00a;" glyph-name="bullist" d="M384 896h640v-128h-640v128zM384 512h640v-128h-640v128zM384 128h640v-128h-640v128zM0 832c0 70.692 57.308 128 128 128s128-57.308 128-128c0-70.692-57.308-128-128-128s-128 57.308-128 128zM0 448c0 70.692 57.308 128 128 128s128-57.308 128-128c0-70.692-57.308-128-128-128s-128 57.308-128 128zM0 64c0 70.692 57.308 128 128 128s128-57.308 128-128c0-70.692-57.308-128-128-128s-128 57.308-128 128z" />
<glyph unicode="&#xe00b;" glyph-name="numlist" d="M384 128h640v-128h-640zM384 512h640v-128h-640zM384 896h640v-128h-640zM192 960v-256h-64v192h-64v64zM128 434v-50h128v-64h-192v146l128 60v50h-128v64h192v-146zM256 256v-320h-192v64h128v64h-128v64h128v64h-128v64z" />
<glyph unicode="&#xe00c;" glyph-name="indent" d="M0 896h1024v-128h-1024zM384 704h640v-128h-640zM384 512h640v-128h-640zM384 320h640v-128h-640zM0 128h1024v-128h-1024zM0 256v384l256-192z" />
<glyph unicode="&#xe00d;" glyph-name="outdent" d="M0 896h1024v-128h-1024zM384 704h640v-128h-640zM384 512h640v-128h-640zM384 320h640v-128h-640zM0 128h1024v-128h-1024zM256 640v-384l-256 192z" />
<glyph unicode="&#xe00e;" glyph-name="blockquote" d="M225 512c123.712 0 224-100.29 224-224 0-123.712-100.288-224-224-224s-224 100.288-224 224l-1 32c0 247.424 200.576 448 448 448v-128c-85.474 0-165.834-33.286-226.274-93.726-11.634-11.636-22.252-24.016-31.83-37.020 11.438 1.8 23.16 2.746 35.104 2.746zM801 512c123.71 0 224-100.29 224-224 0-123.712-100.29-224-224-224s-224 100.288-224 224l-1 32c0 247.424 200.576 448 448 448v-128c-85.474 0-165.834-33.286-226.274-93.726-11.636-11.636-22.254-24.016-31.832-37.020 11.44 1.8 23.16 2.746 35.106 2.746z" />
<glyph unicode="&#xe00f;" glyph-name="undo" d="M761.862-64c113.726 206.032 132.888 520.306-313.862 509.824v-253.824l-384 384 384 384v-248.372c534.962 13.942 594.57-472.214 313.862-775.628z" />
<glyph unicode="&#xe010;" glyph-name="redo" d="M576 711.628v248.372l384-384-384-384v253.824c-446.75 10.482-427.588-303.792-313.86-509.824-280.712 303.414-221.1 789.57 313.86 775.628z" />
<glyph unicode="&#xe011;" glyph-name="link" d="M320 256c17.6-17.6 47.274-16.726 65.942 1.942l316.118 316.116c18.668 18.668 19.54 48.342 1.94 65.942s-47.274 16.726-65.942-1.942l-316.116-316.116c-18.668-18.668-19.542-48.342-1.942-65.942zM476.888 284.888c4.56-9.050 6.99-19.16 6.99-29.696 0-17.616-6.744-34.060-18.992-46.308l-163.382-163.382c-12.248-12.248-28.694-18.992-46.308-18.992s-34.060 6.744-46.308 18.992l-99.382 99.382c-12.248 12.248-18.992 28.694-18.992 46.308s6.744 34.060 18.992 46.308l163.382 163.382c12.248 12.248 28.694 18.994 46.308 18.994 10.536 0 20.644-2.43 29.696-6.99l65.338 65.338c-27.87 21.41-61.44 32.16-95.034 32.16-39.986 0-79.972-15.166-110.308-45.502l-163.382-163.382c-60.67-60.67-60.67-159.948 0-220.618l99.382-99.382c30.334-30.332 70.32-45.5 110.306-45.5 39.988 0 79.974 15.168 110.308 45.502l163.382 163.382c55.82 55.82 60.238 144.298 13.344 205.344l-65.34-65.34zM978.498 815.116l-99.382 99.382c-30.334 30.336-70.32 45.502-110.308 45.502-39.986 0-79.972-15.166-110.308-45.502l-163.382-163.382c-55.82-55.82-60.238-144.298-13.342-205.342l65.338 65.34c-4.558 9.050-6.988 19.16-6.988 29.694 0 17.616 6.744 34.060 18.992 46.308l163.382 163.382c12.248 12.248 28.694 18.994 46.308 18.994s34.060-6.746 46.308-18.994l99.382-99.382c12.248-12.248 18.992-28.694 18.992-46.308s-6.744-34.060-18.992-46.308l-163.382-163.382c-12.248-12.248-28.694-18.992-46.308-18.992-10.536 0-20.644 2.43-29.696 6.99l-65.338-65.338c27.872-21.41 61.44-32.16 95.034-32.16 39.988 0 79.974 15.168 110.308 45.502l163.382 163.382c60.67 60.666 60.67 159.944 0 220.614z" />
<glyph unicode="&#xe012;" glyph-name="unlink" d="M476.888 284.886c4.56-9.048 6.99-19.158 6.99-29.696 0-17.616-6.744-34.058-18.992-46.308l-163.38-163.38c-12.248-12.248-28.696-18.992-46.308-18.992s-34.060 6.744-46.308 18.992l-99.38 99.38c-12.248 12.25-18.992 28.696-18.992 46.308s6.744 34.060 18.992 46.308l163.38 163.382c12.248 12.246 28.696 18.992 46.308 18.992 10.538 0 20.644-2.43 29.696-6.988l65.338 65.336c-27.87 21.41-61.44 32.16-95.034 32.16-39.986 0-79.972-15.166-110.308-45.502l-163.38-163.382c-60.67-60.67-60.67-159.95 0-220.618l99.38-99.382c30.334-30.332 70.32-45.5 110.306-45.5 39.988 0 79.974 15.168 110.308 45.502l163.38 163.38c55.82 55.82 60.238 144.298 13.344 205.346l-65.34-65.338zM978.496 815.116l-99.38 99.382c-30.334 30.336-70.32 45.502-110.308 45.502-39.986 0-79.97-15.166-110.306-45.502l-163.382-163.382c-55.82-55.82-60.238-144.298-13.342-205.342l65.338 65.34c-4.558 9.050-6.988 19.16-6.988 29.694 0 17.616 6.744 34.060 18.992 46.308l163.382 163.382c12.246 12.248 28.694 18.994 46.306 18.994 17.616 0 34.060-6.746 46.308-18.994l99.38-99.382c12.248-12.248 18.992-28.694 18.992-46.308s-6.744-34.060-18.992-46.308l-163.38-163.382c-12.248-12.248-28.694-18.992-46.308-18.992-10.536 0-20.644 2.43-29.696 6.99l-65.338-65.338c27.872-21.41 61.44-32.16 95.034-32.16 39.988 0 79.974 15.168 110.308 45.504l163.38 163.38c60.672 60.666 60.672 159.944 0 220.614zM233.368 681.376l-191.994 191.994 45.256 45.256 191.994-191.994zM384 960h64v-192h-64zM0 576h192v-64h-192zM790.632 214.624l191.996-191.996-45.256-45.256-191.996 191.996zM576 128h64v-192h-64zM832 384h192v-64h-192z" />
<glyph unicode="&#xe013;" glyph-name="anchor" d="M192 960v-1024l320 320 320-320v1024h-640zM768 90.51l-256 256-256-256v805.49h512v-805.49z" />
<glyph unicode="&#xe014;" glyph-name="image" d="M0 832v-832h1024v832h-1024zM960 64h-896v704h896v-704zM704 608c0 53.019 42.981 96 96 96s96-42.981 96-96c0-53.019-42.981-96-96-96s-96 42.981-96 96zM896 128h-768l192 512 256-320 128 96z" />
<glyph unicode="&#xe015;" glyph-name="media" d="M0 832v-768h1024v768h-1024zM192 128h-128v128h128v-128zM192 384h-128v128h128v-128zM192 640h-128v128h128v-128zM768 128h-512v640h512v-640zM960 128h-128v128h128v-128zM960 384h-128v128h128v-128zM960 640h-128v128h128v-128zM384 640v-384l256 192z" />
<glyph unicode="&#xe016;" glyph-name="help" d="M448 256h128v-128h-128zM704 704c35.346 0 64-28.654 64-64v-192l-192-128h-128v64l192 128v64h-320v128h384zM512 864c-111.118 0-215.584-43.272-294.156-121.844s-121.844-183.038-121.844-294.156c0-111.118 43.272-215.584 121.844-294.156s183.038-121.844 294.156-121.844c111.118 0 215.584 43.272 294.156 121.844s121.844 183.038 121.844 294.156c0 111.118-43.272 215.584-121.844 294.156s-183.038 121.844-294.156 121.844zM512 960v0c282.77 0 512-229.23 512-512s-229.23-512-512-512c-282.77 0-512 229.23-512 512s229.23 512 512 512z" />
<glyph unicode="&#xe017;" glyph-name="code" d="M320 704l-256-256 256-256h128l-256 256 256 256zM704 704h-128l256-256-256-256h128l256 256z" />
<glyph unicode="&#xe018;" glyph-name="inserttime" d="M512 768c-212.076 0-384-171.922-384-384s171.922-384 384-384c212.074 0 384 171.922 384 384s-171.926 384-384 384zM715.644 180.354c-54.392-54.396-126.716-84.354-203.644-84.354s-149.25 29.958-203.646 84.354c-54.396 54.394-84.354 126.718-84.354 203.646s29.958 149.25 84.354 203.646c54.396 54.396 126.718 84.354 203.646 84.354s149.252-29.958 203.642-84.354c54.402-54.396 84.358-126.718 84.358-203.646s-29.958-149.252-84.356-203.646zM325.93 756.138l-42.94 85.878c-98.874-49.536-179.47-130.132-229.006-229.008l85.876-42.94c40.248 80.336 105.732 145.822 186.070 186.070zM884.134 570.070l85.878 42.938c-49.532 98.876-130.126 179.472-229.004 229.008l-42.944-85.878c80.338-40.248 145.824-105.732 186.070-186.068zM512 576h-64v-192c0-10.11 4.7-19.11 12.022-24.972l-0.012-0.016 160-128 39.976 49.976-147.986 118.39v176.622z" />
<glyph unicode="&#xe019;" glyph-name="preview" d="M512 640c-209.368 0-395.244-100.556-512-256 116.756-155.446 302.632-256 512-256s395.244 100.554 512 256c-116.756 155.444-302.632 256-512 256zM448 512c35.346 0 64-28.654 64-64s-28.654-64-64-64-64 28.654-64 64 28.654 64 64 64zM773.616 254.704c-39.648-20.258-81.652-35.862-124.846-46.376-44.488-10.836-90.502-16.328-136.77-16.328-46.266 0-92.282 5.492-136.768 16.324-43.194 10.518-85.198 26.122-124.846 46.376-63.020 32.202-120.222 76.41-167.64 129.298 47.418 52.888 104.62 97.1 167.64 129.298 32.336 16.522 66.242 29.946 101.082 40.040-19.888-30.242-31.468-66.434-31.468-105.336 0-106.040 85.962-192 192-192s192 85.96 192 192c0 38.902-11.582 75.094-31.466 105.34 34.838-10.096 68.744-23.52 101.082-40.042 63.022-32.198 120.218-76.408 167.638-129.298-47.42-52.886-104.618-97.1-167.638-129.296zM860.918 716.278c-108.72 55.554-226.112 83.722-348.918 83.722s-240.198-28.168-348.918-83.722c-58.772-30.032-113.732-67.904-163.082-112.076v-109.206c55.338 58.566 120.694 107.754 192.194 144.29 99.62 50.904 207.218 76.714 319.806 76.714s220.186-25.81 319.804-76.716c71.502-36.536 136.858-85.724 192.196-144.29v109.206c-49.35 44.174-104.308 82.046-163.082 112.078z" />
<glyph unicode="&#xe01a;" glyph-name="forecolor" d="M322.018 128l57.6 192h264.764l57.6-192h113.632l-191.996 640h-223.236l-192-640h113.636zM475.618 640h72.764l57.6-192h-187.964l57.6 192z" />
<glyph unicode="&#xe01b;" glyph-name="table" d="M0 896v-896h1024v896h-1024zM384 320v192h256v-192h-256zM640 256v-192h-256v192h256zM640 768v-192h-256v192h256zM320 768v-192h-256v192h256zM64 512h256v-192h-256v192zM704 512h256v-192h-256v192zM704 576v192h256v-192h-256zM64 256h256v-192h-256v192zM704 64v192h256v-192h-256z" />
<glyph unicode="&#xe01c;" glyph-name="hr" d="M0 512h1024v-128h-1024z" />
<glyph unicode="&#xe01d;" glyph-name="removeformat" d="M0 64h576v-128h-576zM192 960h704v-128h-704zM277.388 128l204.688 784.164 123.85-32.328-196.25-751.836zM929.774-64l-129.774 129.774-129.774-129.774-62.226 62.226 129.774 129.774-129.774 129.774 62.226 62.226 129.774-129.774 129.774 129.774 62.226-62.226-129.774-129.774 129.774-129.774z" />
<glyph unicode="&#xe01e;" glyph-name="sub" d="M768 50v-50h128v-64h-192v146l128 60v50h-128v64h192v-146zM676 704h-136l-188-188-188 188h-136l256-256-256-256h136l188 188 188-188h136l-256 256z" />
<glyph unicode="&#xe01f;" glyph-name="sup" d="M768 754v-50h128v-64h-192v146l128 60v50h-128v64h192v-146zM676 704h-136l-188-188-188 188h-136l256-256-256-256h136l188 188 188-188h136l-256 256z" />
<glyph unicode="&#xe020;" glyph-name="charmap" d="M704 64h256l64 128v-256h-384v214.214c131.112 56.484 224 197.162 224 361.786 0 214.432-157.598 382.266-352 382.266-194.406 0-352-167.832-352-382.266 0-164.624 92.886-305.302 224-361.786v-214.214h-384v256l64-128h256v32.59c-187.63 66.46-320 227.402-320 415.41 0 247.424 229.23 448 512 448s512-200.576 512-448c0-188.008-132.37-348.95-320-415.41v-32.59z" />
<glyph unicode="&#xe021;" glyph-name="emoticons" d="M512 960c-282.77 0-512-229.228-512-512 0-282.77 229.228-512 512-512 282.77 0 512 229.23 512 512 0 282.772-229.23 512-512 512zM512 16c-238.586 0-432 193.412-432 432 0 238.586 193.414 432 432 432 238.59 0 432-193.414 432-432 0-238.588-193.41-432-432-432zM384 640c0-35.346-28.654-64-64-64s-64 28.654-64 64 28.654 64 64 64 64-28.654 64-64zM768 640c0-35.346-28.652-64-64-64s-64 28.654-64 64 28.652 64 64 64 64-28.654 64-64zM512 308c141.074 0 262.688 57.532 318.462 123.192-20.872-171.22-156.288-303.192-318.462-303.192-162.118 0-297.498 132.026-318.444 303.168 55.786-65.646 177.386-123.168 318.444-123.168z" />
<glyph unicode="&#xe022;" glyph-name="print" d="M256 896h512v-128h-512zM960 704h-896c-35.2 0-64-28.8-64-64v-320c0-35.2 28.796-64 64-64h192v-256h512v256h192c35.2 0 64 28.8 64 64v320c0 35.2-28.8 64-64 64zM704 64h-384v320h384v-320zM974.4 608c0-25.626-20.774-46.4-46.398-46.4-25.626 0-46.402 20.774-46.402 46.4s20.776 46.4 46.402 46.4c25.626 0 46.398-20.774 46.398-46.4z" />
<glyph unicode="&#xe023;" glyph-name="fullscreen" d="M1024 960v-384l-138.26 138.26-212-212-107.48 107.48 212 212-138.26 138.26zM245.74 821.74l212-212-107.48-107.48-212 212-138.26-138.26v384h384zM885.74 181.74l138.26 138.26v-384h-384l138.26 138.26-212 212 107.48 107.48zM457.74 286.26l-212-212 138.26-138.26h-384v384l138.26-138.26 212 212z" />
<glyph unicode="&#xe024;" glyph-name="spellchecker" d="M128 704h128v-192h64v384c0 35.2-28.8 64-64 64h-128c-35.2 0-64-28.8-64-64v-384h64v192zM128 896h128v-128h-128v128zM960 896v64h-192c-35.202 0-64-28.8-64-64v-320c0-35.2 28.798-64 64-64h192v64h-192v320h192zM640 800v96c0 35.2-28.8 64-64 64h-192v-448h192c35.2 0 64 28.8 64 64v96c0 35.2-8.8 64-44 64 35.2 0 44 28.8 44 64zM576 576h-128v128h128v-128zM576 768h-128v128h128v-128zM832 384l-416-448-224 288 82 70 142-148 352 302z" />
<glyph unicode="&#xe025;" glyph-name="nonbreaking" d="M448 384h-192v128h192v192h128v-192h192v-128h-192v-192h-128zM1024 320v-384h-1024v384h128v-256h768v256z" />
<glyph unicode="&#xe026;" glyph-name="template" d="M384 768h128v-64h-128zM576 768h128v-64h-128zM896 768v-256h-192v64h128v128h-64v64zM320 576h128v-64h-128zM512 576h128v-64h-128zM192 704v-128h64v-64h-128v256h192v-64zM384 384h128v-64h-128zM576 384h128v-64h-128zM896 384v-256h-192v64h128v128h-64v64zM320 192h128v-64h-128zM512 192h128v-64h-128zM192 320v-128h64v-64h-128v256h192v-64zM960 896h-896v-896h896v896zM1024 960v0-1024h-1024v1024h1024z" />
<glyph unicode="&#xe027;" glyph-name="pagebreak" d="M0 448h128v-64h-128zM192 448h192v-64h-192zM448 448h128v-64h-128zM640 448h192v-64h-192zM896 448h128v-64h-128zM880 960l16-448h-768l16 448h32l16-384h640l16 384zM144-64l-16 384h768l-16-384h-32l-16 320h-640l-16-320z" />
<glyph unicode="&#xe028;" glyph-name="restoredraft" d="M576 896c247.424 0 448-200.576 448-448s-200.576-448-448-448v96c94.024 0 182.418 36.614 248.902 103.098s103.098 154.878 103.098 248.902c0 94.022-36.614 182.418-103.098 248.902s-154.878 103.098-248.902 103.098c-94.022 0-182.418-36.614-248.902-103.098-51.14-51.138-84.582-115.246-97.306-184.902h186.208l-224-256-224 256h164.57c31.060 217.102 217.738 384 443.43 384zM768 512v-128h-256v320h128v-192z" />
<glyph unicode="&#xe02a;" glyph-name="bold" d="M707.88 475.348c37.498 44.542 60.12 102.008 60.12 164.652 0 141.16-114.842 256-256 256h-320v-896h384c141.158 0 256 114.842 256 256 0 92.956-49.798 174.496-124.12 219.348zM384 768h101.5c55.968 0 101.5-57.42 101.5-128s-45.532-128-101.5-128h-101.5v256zM543 128h-159v256h159c58.45 0 106-57.42 106-128s-47.55-128-106-128z" />
<glyph unicode="&#xe02b;" glyph-name="italic" d="M896 896v-64h-128l-320-768h128v-64h-448v64h128l320 768h-128v64z" />
<glyph unicode="&#xe02c;" glyph-name="underline" d="M704 896h128v-416c0-159.058-143.268-288-320-288-176.73 0-320 128.942-320 288v416h128v-416c0-40.166 18.238-78.704 51.354-108.506 36.896-33.204 86.846-51.494 140.646-51.494s103.75 18.29 140.646 51.494c33.116 29.802 51.354 68.34 51.354 108.506v416zM192 128h640v-128h-640z" />
<glyph unicode="&#xe02d;" glyph-name="strikethrough" d="M731.42 442.964c63.92-47.938 100.58-116.086 100.58-186.964s-36.66-139.026-100.58-186.964c-59.358-44.518-137.284-69.036-219.42-69.036-82.138 0-160.062 24.518-219.42 69.036-63.92 47.938-100.58 116.086-100.58 186.964h128c0-69.382 87.926-128 192-128s192 58.618 192 128c0 69.382-87.926 128-192 128-82.138 0-160.062 24.518-219.42 69.036-63.92 47.94-100.58 116.086-100.58 186.964s36.66 139.024 100.58 186.964c59.358 44.518 137.282 69.036 219.42 69.036 82.136 0 160.062-24.518 219.42-69.036 63.92-47.94 100.58-116.086 100.58-186.964h-128c0 69.382-87.926 128-192 128s-192-58.618-192-128c0-69.382 87.926-128 192-128 82.136 0 160.062-24.518 219.42-69.036zM0 448h1024v-64h-1024z" />
<glyph unicode="&#xe02e;" glyph-name="visualchars" d="M384 896h512v-128h-128v-768h-128v768h-128v-768h-128v448c-123.712 0-224 100.288-224 224s100.288 224 224 224z" />
<glyph unicode="&#xe02f;" glyph-name="ltr" d="M448 896h512v-128h-128v-768h-128v768h-128v-768h-128v448c-123.712 0-224 100.288-224 224s100.288 224 224 224zM64 512l256-224-256-224z" />
<glyph unicode="&#xe030;" glyph-name="rtl" d="M256 896h512v-128h-128v-768h-128v768h-128v-768h-128v448c-123.712 0-224 100.288-224 224s100.288 224 224 224zM960 64l-256 224 256 224z" />
<glyph unicode="&#xe031;" glyph-name="copy" d="M832 704h-192v64l-192 192h-448v-768h384v-256h640v576l-192 192zM832 613.49l101.49-101.49h-101.49v101.49zM448 869.49l101.49-101.49h-101.49v101.49zM64 896h320v-192h192v-448h-512v640zM960 0h-512v192h192v448h128v-192h192v-448z" />
<glyph unicode="&#xe032;" glyph-name="resize" d="M768 704h64v-64h-64zM640 576h64v-64h-64zM640 448h64v-64h-64zM640 320h64v-64h-64zM512 448h64v-64h-64zM512 320h64v-64h-64zM384 320h64v-64h-64zM768 576h64v-64h-64zM768 448h64v-64h-64zM768 320h64v-64h-64zM768 192h64v-64h-64zM640 192h64v-64h-64zM512 192h64v-64h-64zM384 192h64v-64h-64zM256 192h64v-64h-64z" />
<glyph unicode="&#xe033;" glyph-name="checkbox" d="M128 416l288-288 480 480-128 128-352-352-160 160z" />
<glyph unicode="&#xe034;" glyph-name="browse" d="M928 832h-416l-32 64h-352l-64-128h896zM904.34 256h74.86l44.8 448h-1024l64-640h484.080c-104.882 37.776-180.080 138.266-180.080 256 0 149.982 122.018 272 272 272 149.98 0 272-122.018 272-272 0-21.678-2.622-43.15-7.66-64zM1002.996 46.25l-198.496 174.692c17.454 28.92 27.5 62.814 27.5 99.058 0 106.040-85.96 192-192 192s-192-85.96-192-192 85.96-192 192-192c36.244 0 70.138 10.046 99.058 27.5l174.692-198.496c22.962-26.678 62.118-28.14 87.006-3.252l5.492 5.492c24.888 24.888 23.426 64.044-3.252 87.006zM640 196c-68.484 0-124 55.516-124 124s55.516 124 124 124 124-55.516 124-124-55.516-124-124-124z" />
<glyph unicode="&#xe035;" glyph-name="pastetext" d="M512 448v-128h32l32 64h64v-256h-48v-64h224v64h-48v256h64l32-64h32v128zM832 640v160c0 17.6-14.4 32-32 32h-224v64c0 35.2-28.8 64-64 64h-128c-35.204 0-64-28.8-64-64v-64h-224c-17.602 0-32-14.4-32-32v-640c0-17.6 14.398-32 32-32h288v-192h640v704h-192zM384 895.886c0.034 0.038 0.072 0.078 0.114 0.114h127.768c0.042-0.036 0.082-0.076 0.118-0.114v-63.886h-128v63.886zM192 704v64h512v-64h-512zM960 0h-512v576h512v-576z" />
<glyph unicode="&#xe600;" glyph-name="gamma" d="M483.2 320l-147.2 336c-9.6 25.6-19.2 44.8-25.6 54.4s-16 12.8-25.6 12.8c-16 0-25.6-3.2-28.8-3.2v70.4c9.6 6.4 25.6 6.4 38.4 9.6 32 0 57.6-6.4 73.6-22.4 6.4-6.4 12.8-16 19.2-25.6 6.4-12.8 12.8-25.6 16-41.6l121.6-291.2 150.4 371.2h92.8l-198.4-470.4v-224h-86.4v224zM0 960v-1024h1024v1024h-1024zM960 0h-896v896h896v-896z" />
<glyph unicode="&#xe601;" glyph-name="orientation" d="M627.2 80h-579.2v396.8h579.2v-396.8zM553.6 406.4h-435.2v-256h435.2v256zM259.2 732.8c176 176 457.6 176 633.6 0s176-457.6 0-633.6c-121.6-121.6-297.6-160-454.4-108.8 121.6-28.8 262.4 9.6 361.6 108.8 150.4 150.4 160 384 22.4 521.6-121.6 121.6-320 128-470.4 19.2l86.4-86.4-294.4-22.4 22.4 294.4 92.8-92.8z" />
<glyph unicode="&#xe602;" glyph-name="invert" d="M892.8-22.4l-89.6 89.6c-70.4-80-172.8-131.2-288-131.2-208 0-380.8 166.4-384 377.6 0 0 0 0 0 0 0 3.2 0 3.2 0 6.4s0 3.2 0 6.4v0c0 0 0 0 0 3.2 0 0 0 3.2 0 3.2 3.2 105.6 48 211.2 105.6 304l-192 192 44.8 44.8 182.4-182.4c0 0 0 0 0 0l569.6-569.6c0 0 0 0 0 0l99.2-99.2-48-44.8zM896 326.4c0 0 0 0 0 0 0 3.2 0 6.4 0 6.4-9.6 316.8-384 627.2-384 627.2s-108.8-89.6-208-220.8l70.4-70.4c6.4 9.6 16 22.4 22.4 32 41.6 51.2 83.2 96 115.2 128v0c32-32 73.6-76.8 115.2-128 108.8-137.6 169.6-265.6 172.8-371.2 0 0 0-3.2 0-3.2v0 0c0-3.2 0-3.2 0-6.4s0-3.2 0-3.2v0 0c0-22.4-3.2-41.6-9.6-64l76.8-76.8c16 41.6 28.8 89.6 28.8 137.6 0 0 0 0 0 0 0 3.2 0 3.2 0 6.4s0 3.2 0 6.4z" />
<glyph unicode="&#xe603;" glyph-name="codesample" d="M199.995 578.002v104.002c0 43.078 34.923 78.001 78.001 78.001h26v104.002h-26c-100.518 0-182.003-81.485-182.003-182.003v-104.002c0-43.078-34.923-78.001-78.001-78.001h-26v-104.002h26c43.078 0 78.001-34.923 78.001-78.001v-104.002c0-100.515 81.485-182.003 182.003-182.003h26v104.002h-26c-43.078 0-78.001 34.923-78.001 78.001v104.002c0 50.931-20.928 96.966-54.646 130.002 33.716 33.036 54.646 79.072 54.646 130.002zM824.005 578.002v104.002c0 43.078-34.923 78.001-78.001 78.001h-26v104.002h26c100.515 0 182.003-81.485 182.003-182.003v-104.002c0-43.078 34.923-78.001 78.001-78.001h26v-104.002h-26c-43.078 0-78.001-34.923-78.001-78.001v-104.002c0-100.515-81.488-182.003-182.003-182.003h-26v104.002h26c43.078 0 78.001 34.923 78.001 78.001v104.002c0 50.931 20.928 96.966 54.646 130.002-33.716 33.036-54.646 79.072-54.646 130.002zM616.002 603.285c0-57.439-46.562-104.002-104.002-104.002s-104.002 46.562-104.002 104.002c0 57.439 46.562 104.002 104.002 104.002s104.002-46.562 104.002-104.002zM512 448.717c-57.439 0-104.002-46.562-104.002-104.002 0-55.845 26-100.115 105.752-103.88-23.719-33.417-59.441-46.612-105.752-50.944v-61.751c0 0 208.003-18.144 208.003 216.577-0.202 57.441-46.56 104.004-104.002 104.004z" />
<glyph unicode="&#xe604;" glyph-name="tablerowprops" d="M0 896v-896h1024v896h-1024zM640 256v-192h-256v192h256zM640 768v-192h-256v192h256zM320 768v-192h-256v192h256zM704 576v192h256v-192h-256zM64 256h256v-192h-256v192zM704 64v192h256v-192h-256z" />
<glyph unicode="&#xe605;" glyph-name="tablecellprops" d="M0 896v-896h1024v896h-1024zM640 256v-192h-256v192h256zM640 768v-192h-256v192h256zM320 768v-192h-256v192h256zM64 512h256v-192h-256v192zM704 512h256v-192h-256v192zM704 576v192h256v-192h-256zM64 256h256v-192h-256v192zM704 64v192h256v-192h-256z" />
<glyph unicode="&#xe606;" glyph-name="table2" d="M0 896v-832h1024v832h-1024zM320 128h-256v192h256v-192zM320 384h-256v192h256v-192zM640 128h-256v192h256v-192zM640 384h-256v192h256v-192zM960 128h-256v192h256v-192zM960 384h-256v192h256v-192zM960 640h-896v192h896v-192z" />
<glyph unicode="&#xe607;" glyph-name="tablemergecells" d="M0 896v-896h1024v896h-1024zM384 64v448h576v-448h-576zM640 768v-192h-256v192h256zM320 768v-192h-256v192h256zM64 512h256v-192h-256v192zM704 576v192h256v-192h-256zM64 256h256v-192h-256v192z" />
<glyph unicode="&#xe608;" glyph-name="tableinsertcolbefore" d="M320 188.8v182.4h-182.4v89.6h182.4v182.4h86.4v-182.4h185.6v-89.6h-185.6v-182.4zM0 896v-896h1024v896h-1024zM640 64h-576v704h576v-704zM960 64h-256v192h256v-192zM960 320h-256v192h256v-192zM960 576h-256v192h256v-192z" />
<glyph unicode="&#xe609;" glyph-name="tableinsertcolafter" d="M704 643.2v-182.4h182.4v-89.6h-182.4v-182.4h-86.4v182.4h-185.6v89.6h185.6v182.4zM0 896v-896h1024v896h-1024zM320 64h-256v192h256v-192zM320 320h-256v192h256v-192zM320 576h-256v192h256v-192zM960 64h-576v704h576v-704z" />
<glyph unicode="&#xe60a;" glyph-name="tableinsertrowbefore" d="M691.2 508.8h-144v-144h-70.4v144h-144v67.2h144v144h70.4v-144h144zM0 896v-896h1024v896h-1024zM320 64h-256v192h256v-192zM640 64h-256v192h256v-192zM960 64h-256v192h256v-192zM960 316.8h-896v451.2h896v-451.2z" />
<glyph unicode="&#xe60b;" glyph-name="tableinsertrowafter" d="M332.8 323.2h144v144h70.4v-144h144v-67.2h-144v-144h-70.4v144h-144zM0 896v-896h1024v896h-1024zM384 768h256v-192h-256v192zM64 768h256v-192h-256v192zM960 64h-896v451.2h896v-451.2zM960 576h-256v192h256v-192z" />
<glyph unicode="&#xe60d;" glyph-name="tablesplitcells" d="M0 896v-896h1024v896h-1024zM384 768h256v-192h-256v192zM320 64h-256v192h256v-192zM320 320h-256v192h256v-192zM320 576h-256v192h256v-192zM960 64h-576v448h576v-448zM960 576h-256v192h256v-192zM864 156.8l-60.8-60.8-131.2 131.2-131.2-131.2-60.8 60.8 131.2 131.2-131.2 131.2 60.8 60.8 131.2-131.2 131.2 131.2 60.8-60.8-131.2-131.2z" />
<glyph unicode="&#xe60e;" glyph-name="tabledelete" d="M0 896h1024v-896h-1024v896zM60.8 768v-704h899.2v704h-899.2zM809.6 211.2l-96-96-204.8 204.8-204.8-204.8-96 96 204.8 204.8-204.8 204.8 96 96 204.8-204.8 204.8 204.8 96-96-204.8-204.8z" />
<glyph unicode="&#xe62a;" glyph-name="tableleftheader" d="M0 896v-832h1024v832h-1024zM640 128h-256v192h256v-192zM640 384h-256v192h256v-192zM640 640h-256v192h256v-192zM960 128h-256v192h256v-192zM960 384h-256v192h256v-192zM960 640h-256v192h256v-192z" />
<glyph unicode="&#xe62b;" glyph-name="tabletopheader" d="M0 896v-832h1024v832h-1024zM320 128h-256v192h256v-192zM320 384h-256v192h256v-192zM640 128h-256v192h256v-192zM640 384h-256v192h256v-192zM960 128h-256v192h256v-192zM960 384h-256v192h256v-192z" />
<glyph unicode="&#xe800;" glyph-name="tabledeleterow" d="M886.4 572.8l-156.8-156.8 160-160-76.8-76.8-160 160-156.8-156.8-76.8 73.6 160 160-163.2 163.2 76.8 76.8 163.2-163.2 156.8 156.8 73.6-76.8zM0 896v-896h1024v896h-1024zM960 576h-22.4l-64-64h86.4v-192h-89.6l64-64h25.6v-192h-896v192h310.4l64 64h-374.4v192h371.2l-64 64h-307.2v192h896v-192z" />
<glyph unicode="&#xe801;" glyph-name="tabledeletecol" d="M320 499.2l64-64v-12.8l-64-64v140.8zM640 422.4l64-64v137.6l-64-64v-9.6zM1024 896v-896h-1024v896h1024zM960 768h-256v-51.2l-12.8 12.8-51.2-51.2v89.6h-256v-89.6l-51.2 51.2-12.8-12.8v51.2h-256v-704h256v118.4l35.2-35.2 28.8 28.8v-115.2h256v115.2l48-48 16 16v-83.2h256v707.2zM672 662.4l-156.8-156.8-163.2 163.2-76.8-76.8 163.2-163.2-156.8-156.8 76.8-76.8 156.8 156.8 160-160 76.8 76.8-160 160 156.8 156.8-76.8 76.8z" />
<glyph unicode="&#xe900;" glyph-name="a11y" d="M960 704v64l-448-128-448 128v-64l320-128v-256l-128-448h64l192 448 192-448h64l-128 448v256zM416 800q0 40 28 68t68 28 68-28 28-68-28-68-68-28-68 28-28 68z" />
<glyph unicode="&#xe901;" glyph-name="toc" d="M0 896h128v-128h-128v128zM192 896h832v-128h-832v128zM0 512h128v-128h-128v128zM192 512h832v-128h-832v128zM0 128h128v-128h-128v128zM192 128h832v-128h-832v128zM192 704h128v-128h-128v128zM384 704h640v-128h-640v128zM192 320h128v-128h-128v128zM384 320h640v-128h-640v128z" />
<glyph unicode="&#xe902;" glyph-name="fill" d="M521.6 915.2l-67.2-67.2-86.4 86.4-86.4-86.4 86.4-86.4-368-368 432-432 518.4 518.4-428.8 435.2zM435.2 134.4l-262.4 262.4 35.2 35.2 576 51.2-348.8-348.8zM953.6 409.6c-6.4-6.4-16-16-28.8-32-28.8-32-41.6-64-41.6-89.6v0 0 0 0 0 0 0c0-16 6.4-35.2 22.4-48 12.8-12.8 32-22.4 48-22.4s35.2 6.4 48 22.4 22.4 32 22.4 48v0 0 0 0 0 0 0c0 25.6-12.8 54.4-41.6 89.6-9.6 16-22.4 25.6-28.8 32v0z" />
<glyph unicode="&#xe903;" glyph-name="borderwidth" d="M0 265.6h1024v-128h-1024v128zM0 32h1024v-64h-1024v64zM0 566.4h1024v-192h-1024v192zM0 928h1024v-256h-1024v256z" />
<glyph unicode="&#xe904;" glyph-name="line" d="M739.2 627.2l-502.4-502.4h-185.6v185.6l502.4 502.4 185.6-185.6zM803.2 688l-185.6 185.6 67.2 67.2c22.4 22.4 54.4 22.4 76.8 0l108.8-108.8c22.4-22.4 22.4-54.4 0-76.8l-67.2-67.2zM41.6 48h940.8v-112h-940.8v112z" />
<glyph unicode="&#xe905;" glyph-name="count" d="M0 480h1024v-64h-1024v64zM304 912v-339.2h-67.2v272h-67.2v67.2zM444.8 694.4v-54.4h134.4v-67.2h-201.6v153.6l134.4 64v54.4h-134.4v67.2h201.6v-153.6zM854.4 912v-339.2h-204.8v67.2h137.6v67.2h-137.6v70.4h137.6v67.2h-137.6v67.2zM115.2 166.4c3.2 57.6 38.4 83.2 108.8 83.2 38.4 0 67.2-9.6 86.4-25.6s25.6-35.2 25.6-70.4v-112c0-25.6 0-28.8 9.6-41.6h-73.6c-3.2 9.6-3.2 9.6-6.4 19.2-22.4-19.2-41.6-25.6-70.4-25.6-54.4 0-89.6 32-89.6 76.8s28.8 70.4 99.2 80l38.4 6.4c16 3.2 22.4 6.4 22.4 16 0 12.8-12.8 22.4-38.4 22.4s-41.6-9.6-44.8-28.8h-67.2zM262.4 115.2c-6.4-3.2-12.8-6.4-25.6-6.4l-25.6-6.4c-25.6-6.4-38.4-16-38.4-28.8 0-16 12.8-25.6 35.2-25.6s41.6 9.6 54.4 32v35.2zM390.4 336h73.6v-112c22.4 16 41.6 22.4 67.2 22.4 64 0 105.6-51.2 105.6-124.8 0-76.8-44.8-134.4-108.8-134.4-32 0-48 9.6-67.2 35.2v-28.8h-70.4v342.4zM460.8 121.6c0-41.6 22.4-70.4 51.2-70.4s51.2 28.8 51.2 70.4c0 44.8-19.2 70.4-51.2 70.4-28.8 0-51.2-28.8-51.2-70.4zM851.2 153.6c-3.2 22.4-19.2 35.2-44.8 35.2-32 0-51.2-25.6-51.2-70.4 0-48 19.2-73.6 51.2-73.6 25.6 0 41.6 12.8 44.8 41.6l70.4-3.2c-9.6-60.8-54.4-96-118.4-96-73.6 0-121.6 51.2-121.6 128 0 80 48 131.2 124.8 131.2 64 0 108.8-35.2 112-96h-67.2z" />
<glyph unicode="&#xe906;" glyph-name="reload" d="M889.68 793.68c-93.608 102.216-228.154 166.32-377.68 166.32-282.77 0-512-229.23-512-512h96c0 229.75 186.25 416 416 416 123.020 0 233.542-53.418 309.696-138.306l-149.696-149.694h352v352l-134.32-134.32zM928 448c0-229.75-186.25-416-416-416-123.020 0-233.542 53.418-309.694 138.306l149.694 149.694h-352v-352l134.32 134.32c93.608-102.216 228.154-166.32 377.68-166.32 282.77 0 512 229.23 512 512h-96z" />
<glyph unicode="&#xe907;" glyph-name="translate" d="M553.6 304l-118.4 118.4c80 89.6 137.6 195.2 172.8 304h137.6v92.8h-326.4v92.8h-92.8v-92.8h-326.4v-92.8h518.4c-32-89.6-80-176-147.2-249.6-44.8 48-80 99.2-108.8 156.8h-92.8c35.2-76.8 80-147.2 137.6-211.2l-236.8-233.6 67.2-67.2 233.6 233.6 144-144c3.2 0 38.4 92.8 38.4 92.8zM816 540.8h-92.8l-208-560h92.8l51.2 140.8h220.8l51.2-140.8h92.8l-208 560zM691.2 214.4l76.8 201.6 76.8-201.6h-153.6z" />
<glyph unicode="&#xe908;" glyph-name="drag" d="M576 896h128v-128h-128v128zM576 640h128v-128h-128v128zM320 640h128v-128h-128v128zM576 384h128v-128h-128v128zM320 384h128v-128h-128v128zM320 128h128v-128h-128v128zM576 128h128v-128h-128v128zM320 896h128v-128h-128v128z" />
<glyph unicode="&#xe909;" glyph-name="format-painter" d="M768 746.667v42.667c0 23.467-19.2 42.667-42.667 42.667h-512c-23.467 0-42.667-19.2-42.667-42.667v-170.667c0-23.467 19.2-42.667 42.667-42.667h512c23.467 0 42.667 19.2 42.667 42.667v42.667h42.667v-170.667h-426.667v-384c0-23.467 19.2-42.667 42.667-42.667h85.333c23.467 0 42.667 19.2 42.667 42.667v298.667h341.333v341.333h-128z" />
<glyph unicode="&#xe90b;" glyph-name="home" d="M1024 369.556l-512 397.426-512-397.428v162.038l512 397.426 512-397.428zM896 384v-384h-256v256h-256v-256h-256v384l384 288z" />
<glyph unicode="&#xe911;" glyph-name="books" d="M576.234 670.73l242.712 81.432 203.584-606.784-242.712-81.432zM0 64h256v704h-256v-704zM64 640h128v-64h-128v64zM320 64h256v704h-256v-704zM384 640h128v-64h-128v64z" />
<glyph unicode="&#xe914;" glyph-name="upload" d="M839.432 760.57c27.492-27.492 50.554-78.672 55.552-120.57h-318.984v318.984c41.898-4.998 93.076-28.060 120.568-55.552l142.864-142.862zM512 576v384h-368c-44 0-80-36-80-80v-864c0-44 36-80 80-80h672c44 0 80 36 80 80v560h-384zM576 192v-192h-192v192h-160l256 256 256-256h-160z" />
<glyph unicode="&#xe915;" glyph-name="editimage" d="M768 416v-352h-640v640h352l128 128h-512c-52.8 0-96-43.2-96-96v-704c0-52.8 43.2-96 96-96h704c52.798 0 96 43.2 96 96v512l-128-128zM864 960l-608-608v-160h160l608 608c0 96-64 160-160 160zM416 320l-48 48 480 480 48-48-480-480z" />
<glyph unicode="&#xe91c;" glyph-name="bubble" d="M928 896h-832c-52.8 0-96-43.2-96-96v-512c0-52.8 43.2-96 96-96h160v-256l307.2 256h364.8c52.8 0 96 43.2 96 96v512c0 52.8-43.2 96-96 96zM896 320h-379.142l-196.858-174.714v174.714h-192v448h768v-448z" />
<glyph unicode="&#xe91d;" glyph-name="user" d="M622.826 257.264c-22.11 3.518-22.614 64.314-22.614 64.314s64.968 64.316 79.128 150.802c38.090 0 61.618 91.946 23.522 124.296 1.59 34.054 48.96 267.324-190.862 267.324s-192.45-233.27-190.864-267.324c-38.094-32.35-14.57-124.296 23.522-124.296 14.158-86.486 79.128-150.802 79.128-150.802s-0.504-60.796-22.614-64.314c-71.22-11.332-337.172-128.634-337.172-257.264h896c0 128.63-265.952 245.932-337.174 257.264z" />
<glyph unicode="&#xe926;" glyph-name="lock" d="M592 512h-16v192c0 105.87-86.13 192-192 192h-128c-105.87 0-192-86.13-192-192v-192h-16c-26.4 0-48-21.6-48-48v-480c0-26.4 21.6-48 48-48h544c26.4 0 48 21.6 48 48v480c0 26.4-21.6 48-48 48zM192 704c0 35.29 28.71 64 64 64h128c35.29 0 64-28.71 64-64v-192h-256v192z" />
<glyph unicode="&#xe927;" glyph-name="unlock" d="M768 896c105.87 0 192-86.13 192-192v-192h-128v192c0 35.29-28.71 64-64 64h-128c-35.29 0-64-28.71-64-64v-192h16c26.4 0 48-21.6 48-48v-480c0-26.4-21.6-48-48-48h-544c-26.4 0-48 21.6-48 48v480c0 26.4 21.6 48 48 48h400v192c0 105.87 86.13 192 192 192h128z" />
<glyph unicode="&#xe928;" glyph-name="settings" d="M448 832v16c0 26.4-21.6 48-48 48h-160c-26.4 0-48-21.6-48-48v-16h-192v-128h192v-16c0-26.4 21.6-48 48-48h160c26.4 0 48 21.6 48 48v16h576v128h-576zM256 704v128h128v-128h-128zM832 528c0 26.4-21.6 48-48 48h-160c-26.4 0-48-21.6-48-48v-16h-576v-128h576v-16c0-26.4 21.6-48 48-48h160c26.4 0 48 21.6 48 48v16h192v128h-192v16zM640 384v128h128v-128h-128zM448 208c0 26.4-21.6 48-48 48h-160c-26.4 0-48-21.6-48-48v-16h-192v-128h192v-16c0-26.4 21.6-48 48-48h160c26.4 0 48 21.6 48 48v16h576v128h-576v16zM256 64v128h128v-128h-128z" />
<glyph unicode="&#xe92a;" glyph-name="remove2" d="M192-64h640l64 704h-768zM640 832v128h-256v-128h-320v-192l64 64h768l64-64v192h-320zM576 832h-128v64h128v-64z" />
<glyph unicode="&#xe92d;" glyph-name="menu" d="M384 896h256v-256h-256zM384 576h256v-256h-256zM384 256h256v-256h-256z" />
<glyph unicode="&#xe930;" glyph-name="warning" d="M1009.956 44.24l-437.074 871.112c-16.742 29.766-38.812 44.648-60.882 44.648s-44.14-14.882-60.884-44.648l-437.074-871.112c-33.486-59.532-5-108.24 63.304-108.24h869.308c68.302 0 96.792 48.708 63.302 108.24zM512 64c-35.346 0-64 28.654-64 64 0 35.348 28.654 64 64 64 35.348 0 64-28.652 64-64 0-35.346-28.652-64-64-64zM556 256h-88l-20 256c0 35.346 28.654 64 64 64s64-28.654 64-64l-20-256z" />
<glyph unicode="&#xe931;" glyph-name="question" d="M448 256h128v-128h-128zM704 704c35.346 0 64-28.654 64-64v-192l-192-128h-128v64l192 128v64h-320v128h384zM512 864c-111.118 0-215.584-43.272-294.156-121.844s-121.844-183.038-121.844-294.156c0-111.118 43.272-215.584 121.844-294.156s183.038-121.844 294.156-121.844c111.118 0 215.584 43.272 294.156 121.844s121.844 183.038 121.844 294.156c0 111.118-43.272 215.584-121.844 294.156s-183.038 121.844-294.156 121.844zM512 960v0c282.77 0 512-229.23 512-512s-229.23-512-512-512c-282.77 0-512 229.23-512 512s229.23 512 512 512z" />
<glyph unicode="&#xe932;" glyph-name="pluscircle" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM512 64c-212.078 0-384 171.922-384 384s171.922 384 384 384c212.078 0 384-171.922 384-384s-171.922-384-384-384zM768 384h-192v-192h-128v192h-192v128h192v192h128v-192h192z" />
<glyph unicode="&#xe933;" glyph-name="info" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM448 768h128v-128h-128v128zM640 128h-256v64h64v256h-64v64h192v-320h64v-64z" />
<glyph unicode="&#xe934;" glyph-name="notice" d="M1024 224l-288 736h-448l-288-288v-448l288-288h448l288 288v448l-288 288zM576 128h-128v128h128v-128zM576 384h-128v384h128v-384z" />
<glyph unicode="&#xe935;" glyph-name="drop" d="M864.626 486.838c-65.754 183.44-205.11 348.15-352.626 473.162-147.516-125.012-286.87-289.722-352.626-473.162-40.664-113.436-44.682-236.562 12.584-345.4 65.846-125.14 198.632-205.438 340.042-205.438s274.196 80.298 340.040 205.44c57.27 108.838 53.25 231.962 12.586 345.398zM738.764 201.044c-43.802-83.252-132.812-137.044-226.764-137.044-55.12 0-108.524 18.536-152.112 50.652 13.242-1.724 26.632-2.652 40.112-2.652 117.426 0 228.668 67.214 283.402 171.242 44.878 85.292 40.978 173.848 23.882 244.338 14.558-28.15 26.906-56.198 36.848-83.932 22.606-63.062 40.024-156.34-5.368-242.604z" />
<glyph unicode="&#xe939;" glyph-name="minus" d="M0 544v-192c0-17.672 14.328-32 32-32h960c17.672 0 32 14.328 32 32v192c0 17.672-14.328 32-32 32h-960c-17.672 0-32-14.328-32-32z" />
<glyph unicode="&#xe93a;" glyph-name="plus" d="M992 576h-352v352c0 17.672-14.328 32-32 32h-192c-17.672 0-32-14.328-32-32v-352h-352c-17.672 0-32-14.328-32-32v-192c0-17.672 14.328-32 32-32h352v-352c0-17.672 14.328-32 32-32h192c17.672 0 32 14.328 32 32v352h352c17.672 0 32 14.328 32 32v192c0 17.672-14.328 32-32 32z" />
<glyph unicode="&#xe93b;" glyph-name="arrowup" d="M0 320l192-192 320 320 320-320 192 192-511.998 512z" />
<glyph unicode="&#xe93c;" glyph-name="arrowright" d="M384 960l-192-192 320-320-320-320 192-192 512 512z" />
<glyph unicode="&#xe93d;" glyph-name="arrowdown" d="M1024 576l-192 192-320-320-320 320-192-192 512-511.998z" />
<glyph unicode="&#xe93f;" glyph-name="arrowup2" d="M768 320l-256 256-256-256z" />
<glyph unicode="&#xe940;" glyph-name="arrowdown2" d="M256 576l256-256 256 256z" />
<glyph unicode="&#xe941;" glyph-name="menu2" d="M256 704l256-256 256 256zM255.996 384.004l256-256 256 256z" />
<glyph unicode="&#xe961;" glyph-name="newtab" d="M704 384l128 128v-512h-768v768h512l-128-128h-256v-512h512zM960 896v-352l-130.744 130.744-354.746-354.744h-90.51v90.512l354.744 354.744-130.744 130.744z" />
<glyph unicode="&#xeaa8;" glyph-name="rotateleft" d="M607.998 831.986c-212.070 0-383.986-171.916-383.986-383.986h-191.994l246.848-246.848 246.848 246.848h-191.994c0 151.478 122.798 274.276 274.276 274.276 151.48 0 274.276-122.798 274.276-274.276 0-151.48-122.796-274.276-274.276-274.276v-109.71c212.070 0 383.986 171.916 383.986 383.986s-171.916 383.986-383.986 383.986z" />
<glyph unicode="&#xeaa9;" glyph-name="rotateright" d="M416.002 831.986c212.070 0 383.986-171.916 383.986-383.986h191.994l-246.848-246.848-246.848 246.848h191.994c0 151.478-122.798 274.276-274.276 274.276-151.48 0-274.276-122.798-274.276-274.276 0-151.48 122.796-274.276 274.276-274.276v-109.71c-212.070 0-383.986 171.916-383.986 383.986s171.916 383.986 383.986 383.986z" />
<glyph unicode="&#xeaaa;" glyph-name="flipv" d="M0 576h1024v384zM1024 0v384h-1024z" />
<glyph unicode="&#xeaac;" glyph-name="fliph" d="M576 960v-1024h384zM0-64h384v1024z" />
<glyph unicode="&#xeb35;" glyph-name="zoomin" d="M992.262 88.604l-242.552 206.294c-25.074 22.566-51.89 32.926-73.552 31.926 57.256 67.068 91.842 154.078 91.842 249.176 0 212.078-171.922 384-384 384-212.076 0-384-171.922-384-384s171.922-384 384-384c95.098 0 182.108 34.586 249.176 91.844-1-21.662 9.36-48.478 31.926-73.552l206.294-242.552c35.322-39.246 93.022-42.554 128.22-7.356s31.892 92.898-7.354 128.22zM384 320c-141.384 0-256 114.616-256 256s114.616 256 256 256 256-114.616 256-256-114.614-256-256-256zM448 768h-128v-128h-128v-128h128v-128h128v128h128v128h-128z" />
<glyph unicode="&#xeb36;" glyph-name="zoomout" d="M992.262 88.604l-242.552 206.294c-25.074 22.566-51.89 32.926-73.552 31.926 57.256 67.068 91.842 154.078 91.842 249.176 0 212.078-171.922 384-384 384-212.076 0-384-171.922-384-384s171.922-384 384-384c95.098 0 182.108 34.586 249.176 91.844-1-21.662 9.36-48.478 31.926-73.552l206.294-242.552c35.322-39.246 93.022-42.554 128.22-7.356s31.892 92.898-7.354 128.22zM384 320c-141.384 0-256 114.616-256 256s114.616 256 256 256 256-114.616 256-256-114.614-256-256-256zM192 640h384v-128h-384z" />
<glyph unicode="&#xeba7;" glyph-name="sharpen" d="M768 832h-512l-256-256 512-576 512 576-256 256zM512 181.334v2.666h-2.37l-14.222 16h16.592v16h-30.814l-14.222 16h45.036v16h-59.258l-14.222 16h73.48v16h-87.704l-14.222 16h101.926v16h-116.148l-14.222 16h130.37v16h-144.592l-14.222 16h158.814v16h-173.038l-14.222 16h187.26v16h-201.482l-14.222 16h215.704v16h-229.926l-14.222 16h244.148v16h-258.372l-14.222 16h272.594v16h-286.816l-14.222 16h301.038v16h-315.26l-14.222 16h329.482v16h-343.706l-7.344 8.262 139.072 139.072h211.978v-3.334h215.314l16-16h-231.314v-16h247.314l16-16h-263.314v-16h279.314l16-16h-295.314v-16h311.314l16-16h-327.314v-16h343.312l7.738-7.738-351.050-394.928z" />
<glyph unicode="&#xec6a;" glyph-name="options" d="M64 768h896v-192h-896zM64 512h896v-192h-896zM64 256h896v-192h-896z" />
<glyph unicode="&#xeccc;" glyph-name="sun" d="M512 128c35.346 0 64-28.654 64-64v-64c0-35.346-28.654-64-64-64s-64 28.654-64 64v64c0 35.346 28.654 64 64 64zM512 768c-35.346 0-64 28.654-64 64v64c0 35.346 28.654 64 64 64s64-28.654 64-64v-64c0-35.346-28.654-64-64-64zM960 512c35.346 0 64-28.654 64-64s-28.654-64-64-64h-64c-35.348 0-64 28.654-64 64s28.652 64 64 64h64zM192 448c0-35.346-28.654-64-64-64h-64c-35.346 0-64 28.654-64 64s28.654 64 64 64h64c35.346 0 64-28.654 64-64zM828.784 221.726l45.256-45.258c24.992-24.99 24.992-65.516 0-90.508-24.994-24.992-65.518-24.992-90.51 0l-45.256 45.256c-24.992 24.99-24.992 65.516 0 90.51 24.994 24.992 65.518 24.992 90.51 0zM195.216 674.274l-45.256 45.256c-24.994 24.994-24.994 65.516 0 90.51s65.516 24.994 90.51 0l45.256-45.256c24.994-24.994 24.994-65.516 0-90.51s-65.516-24.994-90.51 0zM828.784 674.274c-24.992-24.992-65.516-24.992-90.51 0-24.992 24.994-24.992 65.516 0 90.51l45.256 45.254c24.992 24.994 65.516 24.994 90.51 0 24.992-24.994 24.992-65.516 0-90.51l-45.256-45.254zM195.216 221.726c24.992 24.992 65.518 24.992 90.508 0 24.994-24.994 24.994-65.52 0-90.51l-45.254-45.256c-24.994-24.992-65.516-24.992-90.51 0s-24.994 65.518 0 90.508l45.256 45.258zM512 704c-141.384 0-256-114.616-256-256 0-141.382 114.616-256 256-256 141.382 0 256 114.618 256 256 0 141.384-114.616 256-256 256zM512 288c-88.366 0-160 71.634-160 160s71.634 160 160 160 160-71.634 160-160-71.634-160-160-160z" />
<glyph unicode="&#xeccd;" glyph-name="moon" d="M715.812 895.52c-60.25 34.784-124.618 55.904-189.572 64.48 122.936-160.082 144.768-384.762 37.574-570.42-107.2-185.67-312.688-279.112-512.788-252.68 39.898-51.958 90.376-97.146 150.628-131.934 245.908-141.974 560.37-57.72 702.344 188.198 141.988 245.924 57.732 560.372-188.186 702.356z" />
<glyph unicode="&#xecd4;" glyph-name="contrast" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM128 448c0 212.078 171.922 384 384 384v-768c-212.078 0-384 171.922-384 384z" />
<glyph unicode="&#xed6a;" glyph-name="remove22" d="M893.254 738.746l-90.508 90.508-290.746-290.744-290.746 290.744-90.508-90.506 290.746-290.748-290.746-290.746 90.508-90.508 290.746 290.746 290.746-290.746 90.508 90.51-290.744 290.744z" />
<glyph unicode="&#xedc0;" glyph-name="arrowleft" d="M672-64l192 192-320 320 320 320-192 192-512-512z" />
<glyph unicode="&#xedf9;" glyph-name="resize2" d="M0 896v-384c0-35.346 28.654-64 64-64s64 28.654 64 64v229.488l677.488-677.488h-229.488c-35.346 0-64-28.652-64-64 0-35.346 28.654-64 64-64h384c35.346 0 64 28.654 64 64v384c0 35.348-28.654 64-64 64s-64-28.652-64-64v-229.488l-677.488 677.488h229.488c35.346 0 64 28.654 64 64s-28.652 64-64 64h-384c-35.346 0-64-28.654-64-64z" />
<glyph unicode="&#xee78;" glyph-name="crop" d="M832 704l192 192-64 64-192-192h-448v192h-128v-192h-192v-128h192v-512h512v-192h128v192h192v128h-192v448zM320 640h320l-320-320v320zM384 256l320 320v-320h-320z" />
</font></defs></svg>                                                                                                                                                                                                                           tinymce/skins/lightgray/fonts/tinymce.ttf                                                           0000644                 00000044474 15212564050 0014672 0                                                                                                    ustar 00                                                                                                                                                                                                                                                            €  0OS/2ž   ¼   `cmapßqŸô    4gasp     P   glyf6–Å  X  AÈheadp¿  D    6hhea«7  DX   $hmtxîu  D|  øloca6B$è  Ft   þmaxp Ž   Gt    name£T  G”  †post     I     ü   ™Ì   ™Ì  ë 3	                               @  îxÀÿÀ @À @                                        B @     à(à5æææ+èé	ééééé(é*é-é5é=éAéaêªê¬ë6ë§ìjìÍìÔíjíÀíùîxÿýÿÿ      à à*æ ææ*è é ééééé&é*é-é0é9é?éaê¨ê¬ë5ë§ìjìÌìÔíjíÀíùîxÿýÿÿ ÿã  98IKJEC=5420-,ÇÆ>Î«¥»ƒ                                                                      ÿÿ             79               79               79      ÿÀ À     !!!3#!3!3€ü€ þ €€€ý @@K5Àü €ÿ þ  þÀ@5  @ÿÀÀÀ   1  '.#!"3!2654&#5#!"&5463!23‡ŽP!þ !//!à!/!E£µ	ý 		àþùŽ!/!ü !//!`!P£ü¶		`	þ    ÿÀ À / 7  5'.'7'./#'737>77'>7'#'573 Ÿhq€+ +€qhŸŸhq€+ +€qh¡€€€€€€p +€qhŸŸhq€+ +€qhŸŸhq€+ €€€€€       €       !!!!!!!!!!  ü €ý€€ý€ ü  ü €€@€ÿ €@€ÿ €         €       !!!!!!!!!!  ü À€ý€€ý€À ü  ü €€@€ÿ €@€ÿ €       €       !!!!!!!!!!  ü €€ý€€ý€þ€ ü  ü €€@€ÿ €@€ÿ €         €       !!!!!!!!!!  ü  ü  ü  ü  ü €€@€@€@€@€    ]ÿÀ£€ 6 Z f ‹  %.+'6764'&'	#"3267>'732676&'#"&'.5467>7>7>327"&54632#"&'.'.'.5467>32{"T(@ÿþþÿ@(T"=3; (S#("AA"(#S( ;3=ýæš%55%%552û"#@ ""H""þ€€""H""ÿ @#"=Ÿ3#"(c.BB.c("#3Ÿ=‰
§5&%55%&5ü
  @ÿÀ À  & * - 3  54&+54&+"#"3!!781381#55!537#!!@à&€&à ÀÀý€€€À €eÀþÀ € @&&@ý€ÀÀ  @@À@@ý[e@À@   ÿÀ À   ) 7 E S  !!%!!#!!!#"3!26533!2654&#"&546;2#"&546;2#"&546;2@€þ€ €þ€x8ÿ ÿ ÿ 8**0*€*0**ý†øøµ@@oøøÀ@@@ÿ  ÿ  ÿ *ýÐ**xþˆ**0*ý€Àþ@     ÿÀ À     # /  !!!!!!4632#"&4632#"&4632#"&€€ý€€ý€€ý€þ€K55KK55KK55KK55KK55KK55K€€ÿ €ÿ €@5KK55KKþµ5KK55KKþµ5KK55KK  @ÿÀ À      )  %!!!!!!'#5#53#575#53#535#535#5€€ý€€ý€€ý€À@@@€À€€ÀÀ€€€€€€ € €Àÿ À@ýò2@’<2@’îþÀ@@@@@      €        !!!!!!!!!!  ü €€ý€€ý€€ý€þ€ ü  €€@€@€@€@€ €À        €        !!!!!!!!!!%  ü €€ý€€ý€€ý€þ€ ü  ÿ €€@€@€@€@€€þ€À    @  & M  2#"'.'&5'47>763">!2#"'.'&5'47>763">á.))==))..))=##zRQ]@u-	I.))==))..))=##zRQ]@u-	 =))..))==)). ]QRz##€0.
=))..))==)). ]QRz##€0.
   @ÿÀŠÀ   676&'&	6ú+8UV¨þ€€ÉqrF('@M[[š32þ€€øNNìŠ‰   vÿÀÀÀ   5	5&&'&676@€þ€¨VU8+i'(FrqÉÈøþ€þ€þ23š[[Mr‰ŠìNN   .ÿÀÒÀ  @ r  67>'&7#"&/.546?>327.#"326?>''.#"7.546?>32#"&'326?64@'<'þÄª
	£
	c
		
£	A19£..c9:£*#Aõc9:¤*#A
	£
	c
		
£	A19£. <'þÄ'	£
		
c		¤	
A£.‚-c£*u.Ac£*u.A	£
		
c		¤	
A¤-‚      ÿÀ À 2 e i m q u y }  #"&/.546?>327.#"326?>''.#"7.546?>32#"&'326?64''773#3#'3#3#Ý
	£
	c
		
£	A19£..c9:£*#Aõc9:¤*#A
	¤		c
		
£	A19£..ýÀ.Ài@@þ€ÀÀÀ.À©@@ ÀÀ	£
		
c		¤	
A¤-‚-d¤*u.Ac£*u.A	£
		
c		¤	
A¤-‚-†À.ÀéÀÀ@þ×À.À)ÀÀ@    ÀÿÀ@À  	  		!À@@@ÿ ÿ  Àü @þÀ ü› ÿ %      @      !!!4632#"&!7  @ü€€ÿ 8((88((8Àý À €@üÀ@ý À (88((88þH þÀ`  	   @ @         "  !#535#535#53!!#535#535#53%  üÀ€€€€€€@þ  À€€€€€€ýÀ @ý  ý@€€€€€ý€€ý€€€€€€€þ€À      ÿÀ À   H e  3#2#575!57"327>76767>7654'.'&'&'.'&#512#"'.'&547>76À€€ %À€ÀþÀÀ*((K""""K((**((K""""K((*j]^‹((((‹^]jj]^‹((((‹^] €@%À€@€@€ ""K((**((K""""K((**((K""`((‹^]jj]^‹((((‹^]jj]^‹((    @ ÀÀÀ    	3	!#	3@ÿ  €ÿ   € ÿ € Àÿ ÿ   ÿ ÿ    6  ÊJ  3 @ L V  "327>7654'.'&#"&'.5467>32'>77&'.'&'#17' PEFiiFEPPEFiiFE|)i::i)(,,()i::i)(,,þR+%"!:V`<.V:!"%+<`þª@ (” iFEPPEFiiFEPPEFiý´(,,()i::i)(,,()i::iV:!"%+<`º+%"!:V`6À€2v      €    ' Q |  "327>767&'.'&2#"&546#"&'.'.'>7>732654&'&'.'&#">767>76325.' OIIƒ88,,88ƒIIOOIIƒ88,,88ƒII%%%%a? "D##D" ?/U##U/2pPPp2/U##U()*+W--..--W+*),R%*a5&&'P*)**)*P'&&5a*%R,€C/0::0/CC/0::0/C€%%%%þÿA((A6PppP6A((Aµ9!m,II,m!9  Ð €0     %7!3#33#B::rÀàÀršH:¼€ÀÀ€ý€ À   
     €         # '  !5!!5!5#!5!!%!!5!!!!5!  ý€ ÿ  ÿ @ÿ  ÿ € ÿ  ü€ ÿ € €ü€€ýÀÀÀ@ÀÀ ÀÀÀÀÿ ÀÀÀ ÀÀþÀÀÀÀ    €     !!  ü  €     ÿÀàÀ      7!!!!''7'77 @ýÀÀÀý@UÍ|Ä‚‚>‚‚>‚‚>‚‚@€ €ý@ ýÀ‚‚>‚‚>‚‚>‚‚   ÿÀ€À    %3#575#53#'#	373 €À€€ÀÜˆ¼¼ˆ ÿ ˆ¼¼ˆÿ 22@’<2@’R¼¼ÿ ÿ ¼¼      À€À    3#575#53#'#	373 €À€€ÀÜˆ¼¼ˆ ÿ ˆ¼¼ˆÿ ò2@’<2@’n¼¼ÿ ÿ ¼¼      ÿÀ À C  %!7!567>7654'.'&#"!!5&'.'&547>7632À @þ€1))<`@@II@@`<))1þ€@ F;;U((‹^]jj]^‹((U;;F@€ÿ Ö$$_88>PFFggFFP>88_$$Ö €!)*l@@G]QRz####zRQ]G@@l*)   ÿÀ À  7 C O k  "327>7654'.'&"'.'&547>7632#"&54632#"&5463227>767#"'.'&' j]^‹((((‹^]jj]^‹((((‹^]jYOOu""""uOOYYOOu""""uOOÙ%%%%€%%%%ÿ 501R!!U76==67U!!R10À((‹^]jj]^‹((((‹^]jj]^‹((üP""uOOYYOOu""""uOOYYOOu""p%%%%%%%%þ™

"@78QQ87@"

        €    '  !!!";!32654&!!%#"&54632  þ Àü€&&À À&&þæþ€€€€@&þÀ&ÿ  &@&ý€@à      ÿÀ À      ''7''!7!7'7!7 ŠÔlÔŠþvÔlÔŠ€öŠþ€ŠÔlØÔŠþ€ŠÔÀþ€ŠÔlÔŠŠÔlÔŠ€üöŠþ€ŠÔllÔŠ€ŠÔ     @ÿÀÀÀ    0 4 8 >  334&+"33#%5#";5#54&+326=4&#26#535#53	7€€@&€&@€€@À&&ÀÀ€&ÀÀ&@€€€€ þ`àRŽ`ÀÀ€&&þ€€€€@&þÀ&@@``&þ@&`&&Æ€@€þ þ@ F”.      ÿÀ À    #53533##%!3!ÀÀÀ€ÀÀ€@ü € €€ÀÀ€À€þ€€ÿ      ÿÀ À       # ' / 3 7 ? C H  3#73#%#535#53#73#%3#33#73#%#535#53#73#%3#3!!1!€€€À€€@À€@þ@€€À€€þÀ@€À@€€À€€@À€@þ@€€À€€þÀ@€À€ü€€@ü  @@@@ÿ @€@À@@@À€@ @þÀ@@@@ÿ @€@À@@@À€@ @@ü€Àü        ÿÀ À       #  3#73#%3#73#%3#!3!!#! €€ÀÀÀ €€ÀÀÀ €€ý  €ý@  ý€À@@@@@@@@@@þ@Àþ€€ü €þ€@þÀ  ÿà   € + 1  2#5267>54&'.#"3367>76!3@]QRz####zRQ]G€225522€GG€2&2	ºàà¥''vLKÿ €€##zRQ]]QRz##`522€GG€22552&_4ÿ  QGFgþ€€@À     À  @€   (  >54'.'&#!!27>7654&32+#32Ä F./5þÀ€5/.FDþ„e*<<)fŸŸŸ,>>Û"T/5/.Fü€F./5FtFK55Kþ€ K55K     €  €€   #3!53#5€€þÀ€þ@€@€€@ý @@ @  À  @€  #  3#"'.'&533267>5!!À€W:;BB;:W€I((Iþ €ý€€þ`<45NN54< þ`88þ €         € 8 <  #"&'.5332654&#"&'.5467>32#4&#"32%!!Û0550,q>>q,05€rNNrrN>q,0550,q>>q,05€rNNrrN>q,ý% ü »$b55b$!$$!$b54LL44L$!$b55b$!$$!$b54LL44L$!@      €€   !####"'.'&547>76€ €€€€.))==))€€ý  ý À=))..))=  @  À€    !####"'.'&547>76À €€€€.))==))þ® ÿ €€ý  ý À=))..))=þ€àà      À€    !####"'.'&547>76-  €€€€.))==))îÿ  €€ý  ý À=))..))=üÀàà    ÿÀ À 	      #5'!!!'##%!3!!5333@ÀÀþ@€€Àeeþ€eeþ€@Àþ €þ À€ÀÀ@Àý ÿ @eeee€Àþ@ÿ ÀÀÀ   €@À         # ' + / 3 7 ;  3#3#3#3#'3#3#'3#3#3#3#3#'3#'3#'3#'3# @@€@@@@@@€@@@@€@@€@@@@@@@@€@@€@@€@@€@@À@@@@@@@À@@@@@@@@@@@@@@@@@@@@@   € €€à   	''€ à€þ   þàà€þ      ÿÒ €  # ; G  !'!!3!!&'.'&547>7632'>54&#"3267?6&%"&54632 þ` þ @€8K-ü @ä'!!0J128821JcÆpPPppP2¯3þ3II33II@@€þ Àý€B)(,821JJ128 Ò¯2PppPPpÆ3§I33II33I  @ÿÀ À  * 5 9 =  373#35#335'54&+54&+"#"3!!81381#55!!!   @0à0@  @à&€&à €ý€€€À  þ  À€@ÿ @@ @€À @&&@ý€ÀÀ @@À@@ý@@   ÿÀ À  " &  .'.#"#5>723#5!!!ã“	&		z–]ÆWþ @ü€€@PF

þÝsþ*àà€ü  ü@€   0ÿáà@   5  %!!!!6762'&'7>76767>'&'&'.sý½CIþL´þÙBSR¬RSBB!!!!B.67v>=;.00_,,%84-::~?@8VþÚPGÿ GB!!!!BBSR¬RSB-
%9EEŽBC4-)V'   -ÿÀ­À 1 u  '#"'.'&'81<5<5104504167>767'7818181<1&'.'&10>7>71099>581<5<5}Z  J()+NEEi	À-¶:c-<<:;;&%%F<<) ,MY"
	fDEP'('M%%#À-·ýÇd0wpq°65:))1F&BB&412^+,'MG$    ÿø  ` % K W l  546;5#"+32;5#"&=4&'>5!54&+532;#"+5326=467.5'#"&54632"07>7654&#È. Kk.  .kK .p. Kk.  .kK .Ð=++==++=h+=.<5# !N! =+Bh .hkKh .h. hKkh. h&CC&h .hkKh .h. hKkh. h&CC&+==++==Å=+*;>%--X+=        €         !!5!5#!55!!!!5!  þ€ÿ  ÿ @ÿ € ü€ ÿ € €ü€€ý€ÀÀ ÀÀÀÀÀÀÀþÀÀÀÀ   	     €         #  !!5!5#!5!!%!!5!!!!5!  þ€ÿ  ÿ @ÿ  ÿ € ÿ  ü€ ÿ € €ü€€ý€ÀÀ ÀÀÀÀÿ ÀÀÀ ÀÀþÀÀÀÀ    @ €          !!5!5!5!!5!5!5!!5!5!5!5!5!  ý@ÿ  ÿ  @ÿ  ÿ  @ÿ  ÿ  ü€€€üÀ@ý À@Àþ@À@Àþ@À@À@À      €         !!!5#!5!!5!!!  ý€@þÀÿ @ÿ  ÿ € ü€ ÿ €ü€€üÀÀþ@ÀÀÀÀÀÿ À ÀÀþÀÀ        €        %5#53533#!!!!5!5!5!5!5!@¶¶Vººþj þ€ýÀ@@ÿ  ÿ  ÿ  ½¶Z¶¶Z¶Ãü€€üÀÀý@À@À@À       €        3##5#535%!!5!5!5!5!5!!!À¶¶Vººý– ý@ÿ  ÿ  ÿ  €ýÀ@ƒ¶Z¶¶Z¶ýü€€üÀÀ@À@Àý@À       €        ##5#53533!!5!!5!!5!5!!³FFýM ý@ÿ  @ÿ  @ÿ  ü€€ýC@ü€€üÀÀÀÀÀÀ=Ã         €        3533##5#!!!%!!!!5!5!MFFþ³ ý€ ÿ þÀ ÿ €ü€€ÿ  CC€ü€€€ÀÀÀþ Ã=À         €        '  !!!!5!5!5!5!5!!!5!5!''7'77  ý€ ÿ @ÿ  ÿ  ÿ  €ýÀ@ÿ  `=ƒƒ=ƒƒ=ƒƒ=ƒ€ü€€€Àþ À@À@Àý@À@Àý=ƒƒ=ƒƒ=ƒƒ=ƒ        €     !!!!''7'77  ü =ƒü}í`ÍÍ`ÍÍ`ÍÍ`Í€ü€ ý@ÀýÓ`ÍÍ`ÍÍ`ÍÍ`Í       @ €         !!5!5!5!5!5!!5!5!5!5!5!  þ€ÿ  ÿ  ÿ  @ÿ  ÿ  ÿ  €üÀ@ý À@À@Àý@À@À@À       @ €         !!5!5!5!!5!5!5!!5!5!5!  ý@ÿ  ÿ  @ÿ  ÿ  @ÿ  ÿ  €üÀ@ý À@Àþ@À@Àþ@À@À      €   $  ''7'77!#3#3!5!7!5!'!5!vœ M M £M£IüŠ @@VZ@ü€6@þŠs@þÍ€= M J £M£MCü€€þÀ@À@ÀÀ@À@À         €    % 1  55!!'5!'5!!57!57!'77'7@@@@@@€ü Àÿ 3ÿ 3ÿ  # 0 þà£M£œL M ó@@M@Š@Ðü€€€34ZZ43ý@v#ss0SÃjœ£M£M M   @ÿ€À€    5%33'47632#"'&Àþ@þ@@€@ÀÀ@€à((((À@€€@€ÿ þ@Àþ@À à((( 
     €         # '  3#7!!3#7!!3#7!!3#7!!3#7!! €€À@üÀÀ€€À@üÀÀ€€À@üÀ€€À€ý€À€€À€ý€€€€€ÿ €€€ÿ €€€À€€€ÿ €€€   ÿÚ ¦   3  '	7%93267>594&'.'
DVVVþ°þTWþú#@ª		
	“CVVVþþP³üó#3I/


,     ÿà        !!!!!!!!  ü  ü  ü  ü 
€j@VÀ*ÿ      *ÿÀÖ­     	#57'762!!5ãþ
º÷¹@¹C+lCý¬üTsþ
¹÷º=ºCm+Cý€pp   	  ÿó   	  ! G V h t   !!##53#575#53%#535#535#5>32#.'#"&546?>54&#"##3267573>32#"&'#32654&#"%.#"3267#"&54632#  ü 0CC†É††ÉÌ‰‰‰‰ýé55+J )0.5&C“		€J0:=0GG†G?07BC90>Cà@ðþ­CÚ6C™@7Cššþ­CCGCCý,( p
+!"'	3	#Ýp
E7:MVÖ '' !%'%"$%-3G9<G2.    ÿÀ À ! B  &'.'&#"347>7632!#"'.'&'7!7327>765z#+*`558j]^‹((`! qLLV.,+O"#–`†&! qLLV.,+O"#–þ †#+*`558j]^‹((&+((‹^]jVLLq !
	$ –`†þ¦VLLq !
	$ –þ †&+((‹^]j    ÿí  " * .  '67>76735!5#!!.'#7261%#3733%7#*w+Šþ¹]þºH3!6\D+íDé$]Ð]3Ý3]þ³MMš0v"$%M(((]]]]C7$M,:j0éCé]íýÐéÊÊ    @  À€          3#3#%3#3#%3#3#%3#3#@€€€€ÿ €€ €€ÿ €€€€ €€ÿ €€€€€€€€€€€€€€€€€€    « @€@    54&#!"3!26=3!;265!# þ  +þUUU€ë*ª*ªþ€*V      ¡    	5	!!! þ þ   €ÿ ÿ ÿ €rþs¢þs”þ€ ÿ €      @ÿ        7)!3#!!3#@óÌóüô ÿ @€€  ÿ @€€ŸQý¡QÀ€@þ À€@     @ÿÀ€À     !!"3!265#5#	GþÁE¹þ!//! !/þÀÀ   ùE?þ¹€/!ü !//!0þ€ÀÀ ÿ      ÿÀ À     !!7!"3!26534&' ý€`€þ (88(À(8 ý  `Xýø0à0 þ €€8(ý@(88(  ý  `HXý€0à0     ÿÀ €    !";!2654&!5#! üÀ(88( 3m(88Hþ…ÅÀ €8(þ (8ÿ  8( (8ýÀ¯¯À     @  À` .  .106726'476&'&#"310!4'.'&oE
*)ZZ)*
E88q*+€+*q88>V@d,+^%%%%^+,d@V>F--00--F      ÿÀ€€  #  #54&+"#"3!2654&%46;2!PqO€Oq þ\&€&ÿ  ÀOqqOÀþ àÀ&&À      ÿÀÀ€ #  2#54&+"32#!"&5463!5463 Oq€&€&ýàqO€qOÀÀ&&Àþ àÀOq         €   3 7 O S  54&+"#3;26=!5534&+"!!;26=35#534&+"#3;26=!5!53À ÀÀ @ý €À ýÀ@ ÀÀÀ€þÀ ÀÀ @ýÀÀ€@€€€€€°€€€€€°€€€€€  @ÿÀÀÀ     !!%5!!7!5!#53À€@ý  ÿ þÀ@ @þ€€€@ÀÀ€€À@@À@  €  €€     !!!!!!€ ÿ  ÿ  ÿ €ÿ @ÿ @ÿ     ÿÀòÀ   $  %.#"3!26'%"&546327#4632òþKþK%3f3%þ%%%%X%%,gü™,@@,%%%%À %%   ÿÀ À   H e  3#2#575!57"327>76767>7654'.'&'&'.'&#512#"'.'&547>76À€€ %À€ÀþÀÀ*((K""""K((**((K""""K((*j]^‹((((‹^]jj]^‹((((‹^] €@%À€@€@€ ""K((**((K""""K((**((K""`((‹^]jj]^‹((((‹^]jj]^‹((     ÿÀ À  7 C  "327>7654'.'&"'.'&547>7632##5#53533 j]^‹((((‹^]jj]^‹((((‹^]jPEFiiFEPPEFiiFE°À€ÀÀ€ÀÀ((‹^]jj]^‹((((‹^]jj]^‹((ü€iFEPPEFiiFEPPEFi@ÀÀ€ÀÀ      ÿÀ À   )  "327>7654'.'&3#!53#533 j]^‹((((‹^]jj]^‹((((‹^]ª€€Àÿ @@À@À((‹^]jj]^‹((((‹^]jj]^‹((À€þ @ @þÀ    ÿÀ À 	    %!!#535#3 þàþ@þà À þà €€€€ààþàþ@þà À üÀ€€€    ˆÿÀxÀ * D  &'.'&'327>76767>'&'#"&'327>767>'a%&\557755\&%

$$Y235532Y$$

~!|F)N!

,**J""çEAAw66//66wAAE+,,X++).&&66&&.)++X,,+þâ>K- '@€5*0‚A   @ @   3!26=4&#!" Àü@ ÀÀ     ÿÀ À #  !4&+"!"3!;265!26=4&àþ Àþ `À`@`þ Àþ `À       € @   	7 À@@Àþ @À@þÀÀ    ÀÿÀ€À   	€À@þÀÀ ÀÀþÀþÀÀ     @     '	 ÀþÀþÀÀ @ÀþÀ@Àþ   @ @   	 ÿ ÿ @ ÿ   @ @   	   @ÿ     € À    		   þ   Àÿ  þÀÿ    @  À€ 	   7!!!!'#5'À€ý  €ÿ   ƒþž[cƒ€€þ  €þ  þ ƒþ[bƒ    @à@ /  "#7#47>7632#27>7654'.'&#`PEFiÀ÷÷ÀJ229922JJ229PEFiiFEP@iFEP÷÷922JJ229922JniFEPPEFi       @à@ /  23'34'.'&#"3"'.'&547>763 PEFiÀ÷÷ÀJ229922JJ229PEFiiFEP@iFEP÷÷922JJ229922JniFEPPEFi         À    !!  ü @€ü@€    ÿÀÀÀ    !)@€ü@€Àü     ÿØèÀ ( D P  %'.>54'.'&#"326776&"'.'&547>7632##33535#àò'+1iFEPPEFiiFEPG€2ÎKý‚5/.FF./55/.FF./€€€€€€YÎ2€GPEFiiFEPPEFi1+'òKF./55/.FF./55/.FÀ€€€€€    ÿØèÀ ( D H  %'.>54'.'&#"326776&"'.'&547>7632!!àò'+1iFEPPEFiiFEPG€2ÎKý‚5/.FF./55/.FF./õ€þ€YÎ2€GPEFiiFEPPEFi1+'òKF./55/.FF./55/.F@€         @  N  !	5#'35#'35#'35#'35#'35#'35#'35#'35#'35!'!5!'!5!'!5!'733#3!!!!!! þ ÿ   þ -;IXft‚‘Ÿ­»ÉØæôþþþá-þÅIþ¨‹Ô×ç÷þùþÙ7þ¹Wþ¡@ÿ ýÀ@þu‹þu  @ @À      !!!!!!@€ü€€ü€€ü€ À@À@À   
  ÿÀ À   ) 7 F T c r Ž š  %2#"&=46"&=46322+"&5463+"&546;2"/&4762'&4762"%"'&4?6262"'&4?"327>7654'.'&"&54632 %%%%%%%%¥%%@%%ý@%@%%@%}-5.5ý†-5.5g5.5-ý†5.5-=5/.FF./55/.FF./5B^^BB^^€%@%%@%€%@%%@%ÿ %%%%@%%%%ý.5-5Ä.5-55-5.þ<5-5.âF./55/.FF./55/.Fþ`^BB^^BB^     3ÿÄÉÀ "  .''6767676&'&'Ì-`1.((99‡KJKK.\ee¿RR553==\€ <GF•KLEF44A
'C53==\\fe¿QR6      ÿÀ À  *  "327>7654'.'&47>763"'.'& j]^‹((((‹^]jj]^‹((((‹^]þiFEPPEFiÀ((‹^]jj]^‹((((‹^]jj]^‹((þ PEFiý iFE   ƒ C}=   '			7}ZþÝþÝZ"þÞZ##ZþÞãZþÞ"ZþÝþÝZ"þÞZ#     ÿÀ`À   7	' ÀþÀ@Àþ @À@@Àþ     ÿÀ À (  326=#"3!2654&#"32654&#!" %%¥å%%€%%%ý[å%%þ€%€þ€%%åý[%%%€%%å¥%%%     ÿÀ À     7'!5##3!3535#!@À@Àþ@€ÀÀ €ÀÀþ @þÀ@@ÀÀ@ÀÀÀ€þ ÀÀ€€þÀ@@þÀ         .?–½_<õ      ØA    ØAÿàÿ€À             ÀÿÀ   ÿàÿø                ~                   @                 ]  @        @           @  v  .     À           @  6     Ð                           @          ÿà  À  €  À        @          €     @     0  - ÿø                                            @           *          @  «        @        @           @ €                ˆ           À           @                       @     3     ƒ              
   B Ž è8bˆX d¢Ðþr–¼j(Dt²Jjò®Ê		 	P	z	¤


¬
î&„¦X¨ê>–¾îT¬À.‚Æ"²>t¶ò*bšÔX„ºð0„¸üDf’XÀBr–Àø0^¦Ü~ ¼øö8`Îê 4H\jxŽ´þHZläVÆàÀþ D f z ¶ ä      ~ ›                          ®                 `        6        u                K      
  Š  	     	   g  	   =  	   |  	      	   R  	 
 4 ¤tinymce t i n y m c eVersion 1.0 V e r s i o n   1 . 0tinymce t i n y m c etinymce t i n y m c eRegular R e g u l a rtinymce t i n y m c eFont generated by IcoMoon. F o n t   g e n e r a t e d   b y   I c o M o o n .                                                                                                                                                                                                                                     tinymce/skins/lightgray/fonts/tinymce.woff                                                          0000644                 00000044610 15212564050 0015026 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       wOFF     Iˆ     I<                       OS/2     `   `žcmap  h  4  4ßqŸôgasp  œ         glyf  ¤  AÈ  AÈ6–Åhead  Dl   6   6p¿hhea  D¤   $   $«7hmtx  DÈ  ø  øîuloca  FÀ   þ   þ6B$èmaxp  GÀ         Ž name  Gà  †  †£Tpost  Ih            ü   ™Ì   ™Ì  ë 3	                               @  îxÀÿÀ @À @                                        B @     à(à5æææ+èé	ééééé(é*é-é5é=éAéaêªê¬ë6ë§ìjìÍìÔíjíÀíùîxÿýÿÿ      à à*æ ææ*è é ééééé&é*é-é0é9é?éaê¨ê¬ë5ë§ìjìÌìÔíjíÀíùîxÿýÿÿ ÿã  98IKJEC=5420-,ÇÆ>Î«¥»ƒ                                                                      ÿÿ             79               79               79      ÿÀ À     !!!3#!3!3€ü€ þ €€€ý @@K5Àü €ÿ þ  þÀ@5  @ÿÀÀÀ   1  '.#!"3!2654&#5#!"&5463!23‡ŽP!þ !//!à!/!E£µ	ý 		àþùŽ!/!ü !//!`!P£ü¶		`	þ    ÿÀ À / 7  5'.'7'./#'737>77'>7'#'573 Ÿhq€+ +€qhŸŸhq€+ +€qh¡€€€€€€p +€qhŸŸhq€+ +€qhŸŸhq€+ €€€€€       €       !!!!!!!!!!  ü €ý€€ý€ ü  ü €€@€ÿ €@€ÿ €         €       !!!!!!!!!!  ü À€ý€€ý€À ü  ü €€@€ÿ €@€ÿ €       €       !!!!!!!!!!  ü €€ý€€ý€þ€ ü  ü €€@€ÿ €@€ÿ €         €       !!!!!!!!!!  ü  ü  ü  ü  ü €€@€@€@€@€    ]ÿÀ£€ 6 Z f ‹  %.+'6764'&'	#"3267>'732676&'#"&'.5467>7>7>327"&54632#"&'.'.'.5467>32{"T(@ÿþþÿ@(T"=3; (S#("AA"(#S( ;3=ýæš%55%%552û"#@ ""H""þ€€""H""ÿ @#"=Ÿ3#"(c.BB.c("#3Ÿ=‰
§5&%55%&5ü
  @ÿÀ À  & * - 3  54&+54&+"#"3!!781381#55!537#!!@à&€&à ÀÀý€€€À €eÀþÀ € @&&@ý€ÀÀ  @@À@@ý[e@À@   ÿÀ À   ) 7 E S  !!%!!#!!!#"3!26533!2654&#"&546;2#"&546;2#"&546;2@€þ€ €þ€x8ÿ ÿ ÿ 8**0*€*0**ý†øøµ@@oøøÀ@@@ÿ  ÿ  ÿ *ýÐ**xþˆ**0*ý€Àþ@     ÿÀ À     # /  !!!!!!4632#"&4632#"&4632#"&€€ý€€ý€€ý€þ€K55KK55KK55KK55KK55KK55K€€ÿ €ÿ €@5KK55KKþµ5KK55KKþµ5KK55KK  @ÿÀ À      )  %!!!!!!'#5#53#575#53#535#535#5€€ý€€ý€€ý€À@@@€À€€ÀÀ€€€€€€ € €Àÿ À@ýò2@’<2@’îþÀ@@@@@      €        !!!!!!!!!!  ü €€ý€€ý€€ý€þ€ ü  €€@€@€@€@€ €À        €        !!!!!!!!!!%  ü €€ý€€ý€€ý€þ€ ü  ÿ €€@€@€@€@€€þ€À    @  & M  2#"'.'&5'47>763">!2#"'.'&5'47>763">á.))==))..))=##zRQ]@u-	I.))==))..))=##zRQ]@u-	 =))..))==)). ]QRz##€0.
=))..))==)). ]QRz##€0.
   @ÿÀŠÀ   676&'&	6ú+8UV¨þ€€ÉqrF('@M[[š32þ€€øNNìŠ‰   vÿÀÀÀ   5	5&&'&676@€þ€¨VU8+i'(FrqÉÈøþ€þ€þ23š[[Mr‰ŠìNN   .ÿÀÒÀ  @ r  67>'&7#"&/.546?>327.#"326?>''.#"7.546?>32#"&'326?64@'<'þÄª
	£
	c
		
£	A19£..c9:£*#Aõc9:¤*#A
	£
	c
		
£	A19£. <'þÄ'	£
		
c		¤	
A£.‚-c£*u.Ac£*u.A	£
		
c		¤	
A¤-‚      ÿÀ À 2 e i m q u y }  #"&/.546?>327.#"326?>''.#"7.546?>32#"&'326?64''773#3#'3#3#Ý
	£
	c
		
£	A19£..c9:£*#Aõc9:¤*#A
	¤		c
		
£	A19£..ýÀ.Ài@@þ€ÀÀÀ.À©@@ ÀÀ	£
		
c		¤	
A¤-‚-d¤*u.Ac£*u.A	£
		
c		¤	
A¤-‚-†À.ÀéÀÀ@þ×À.À)ÀÀ@    ÀÿÀ@À  	  		!À@@@ÿ ÿ  Àü @þÀ ü› ÿ %      @      !!!4632#"&!7  @ü€€ÿ 8((88((8Àý À €@üÀ@ý À (88((88þH þÀ`  	   @ @         "  !#535#535#53!!#535#535#53%  üÀ€€€€€€@þ  À€€€€€€ýÀ @ý  ý@€€€€€ý€€ý€€€€€€€þ€À      ÿÀ À   H e  3#2#575!57"327>76767>7654'.'&'&'.'&#512#"'.'&547>76À€€ %À€ÀþÀÀ*((K""""K((**((K""""K((*j]^‹((((‹^]jj]^‹((((‹^] €@%À€@€@€ ""K((**((K""""K((**((K""`((‹^]jj]^‹((((‹^]jj]^‹((    @ ÀÀÀ    	3	!#	3@ÿ  €ÿ   € ÿ € Àÿ ÿ   ÿ ÿ    6  ÊJ  3 @ L V  "327>7654'.'&#"&'.5467>32'>77&'.'&'#17' PEFiiFEPPEFiiFE|)i::i)(,,()i::i)(,,þR+%"!:V`<.V:!"%+<`þª@ (” iFEPPEFiiFEPPEFiý´(,,()i::i)(,,()i::iV:!"%+<`º+%"!:V`6À€2v      €    ' Q |  "327>767&'.'&2#"&546#"&'.'.'>7>732654&'&'.'&#">767>76325.' OIIƒ88,,88ƒIIOOIIƒ88,,88ƒII%%%%a? "D##D" ?/U##U/2pPPp2/U##U()*+W--..--W+*),R%*a5&&'P*)**)*P'&&5a*%R,€C/0::0/CC/0::0/C€%%%%þÿA((A6PppP6A((Aµ9!m,II,m!9  Ð €0     %7!3#33#B::rÀàÀršH:¼€ÀÀ€ý€ À   
     €         # '  !5!!5!5#!5!!%!!5!!!!5!  ý€ ÿ  ÿ @ÿ  ÿ € ÿ  ü€ ÿ € €ü€€ýÀÀÀ@ÀÀ ÀÀÀÀÿ ÀÀÀ ÀÀþÀÀÀÀ    €     !!  ü  €     ÿÀàÀ      7!!!!''7'77 @ýÀÀÀý@UÍ|Ä‚‚>‚‚>‚‚>‚‚@€ €ý@ ýÀ‚‚>‚‚>‚‚>‚‚   ÿÀ€À    %3#575#53#'#	373 €À€€ÀÜˆ¼¼ˆ ÿ ˆ¼¼ˆÿ 22@’<2@’R¼¼ÿ ÿ ¼¼      À€À    3#575#53#'#	373 €À€€ÀÜˆ¼¼ˆ ÿ ˆ¼¼ˆÿ ò2@’<2@’n¼¼ÿ ÿ ¼¼      ÿÀ À C  %!7!567>7654'.'&#"!!5&'.'&547>7632À @þ€1))<`@@II@@`<))1þ€@ F;;U((‹^]jj]^‹((U;;F@€ÿ Ö$$_88>PFFggFFP>88_$$Ö €!)*l@@G]QRz####zRQ]G@@l*)   ÿÀ À  7 C O k  "327>7654'.'&"'.'&547>7632#"&54632#"&5463227>767#"'.'&' j]^‹((((‹^]jj]^‹((((‹^]jYOOu""""uOOYYOOu""""uOOÙ%%%%€%%%%ÿ 501R!!U76==67U!!R10À((‹^]jj]^‹((((‹^]jj]^‹((üP""uOOYYOOu""""uOOYYOOu""p%%%%%%%%þ™

"@78QQ87@"

        €    '  !!!";!32654&!!%#"&54632  þ Àü€&&À À&&þæþ€€€€@&þÀ&ÿ  &@&ý€@à      ÿÀ À      ''7''!7!7'7!7 ŠÔlÔŠþvÔlÔŠ€öŠþ€ŠÔlØÔŠþ€ŠÔÀþ€ŠÔlÔŠŠÔlÔŠ€üöŠþ€ŠÔllÔŠ€ŠÔ     @ÿÀÀÀ    0 4 8 >  334&+"33#%5#";5#54&+326=4&#26#535#53	7€€@&€&@€€@À&&ÀÀ€&ÀÀ&@€€€€ þ`àRŽ`ÀÀ€&&þ€€€€@&þÀ&@@``&þ@&`&&Æ€@€þ þ@ F”.      ÿÀ À    #53533##%!3!ÀÀÀ€ÀÀ€@ü € €€ÀÀ€À€þ€€ÿ      ÿÀ À       # ' / 3 7 ? C H  3#73#%#535#53#73#%3#33#73#%#535#53#73#%3#3!!1!€€€À€€@À€@þ@€€À€€þÀ@€À@€€À€€@À€@þ@€€À€€þÀ@€À€ü€€@ü  @@@@ÿ @€@À@@@À€@ @þÀ@@@@ÿ @€@À@@@À€@ @@ü€Àü        ÿÀ À       #  3#73#%3#73#%3#!3!!#! €€ÀÀÀ €€ÀÀÀ €€ý  €ý@  ý€À@@@@@@@@@@þ@Àþ€€ü €þ€@þÀ  ÿà   € + 1  2#5267>54&'.#"3367>76!3@]QRz####zRQ]G€225522€GG€2&2	ºàà¥''vLKÿ €€##zRQ]]QRz##`522€GG€22552&_4ÿ  QGFgþ€€@À     À  @€   (  >54'.'&#!!27>7654&32+#32Ä F./5þÀ€5/.FDþ„e*<<)fŸŸŸ,>>Û"T/5/.Fü€F./5FtFK55Kþ€ K55K     €  €€   #3!53#5€€þÀ€þ@€@€€@ý @@ @  À  @€  #  3#"'.'&533267>5!!À€W:;BB;:W€I((Iþ €ý€€þ`<45NN54< þ`88þ €         € 8 <  #"&'.5332654&#"&'.5467>32#4&#"32%!!Û0550,q>>q,05€rNNrrN>q,0550,q>>q,05€rNNrrN>q,ý% ü »$b55b$!$$!$b54LL44L$!$b55b$!$$!$b54LL44L$!@      €€   !####"'.'&547>76€ €€€€.))==))€€ý  ý À=))..))=  @  À€    !####"'.'&547>76À €€€€.))==))þ® ÿ €€ý  ý À=))..))=þ€àà      À€    !####"'.'&547>76-  €€€€.))==))îÿ  €€ý  ý À=))..))=üÀàà    ÿÀ À 	      #5'!!!'##%!3!!5333@ÀÀþ@€€Àeeþ€eeþ€@Àþ €þ À€ÀÀ@Àý ÿ @eeee€Àþ@ÿ ÀÀÀ   €@À         # ' + / 3 7 ;  3#3#3#3#'3#3#'3#3#3#3#3#'3#'3#'3#'3# @@€@@@@@@€@@@@€@@€@@@@@@@@€@@€@@€@@€@@À@@@@@@@À@@@@@@@@@@@@@@@@@@@@@   € €€à   	''€ à€þ   þàà€þ      ÿÒ €  # ; G  !'!!3!!&'.'&547>7632'>54&#"3267?6&%"&54632 þ` þ @€8K-ü @ä'!!0J128821JcÆpPPppP2¯3þ3II33II@@€þ Àý€B)(,821JJ128 Ò¯2PppPPpÆ3§I33II33I  @ÿÀ À  * 5 9 =  373#35#335'54&+54&+"#"3!!81381#55!!!   @0à0@  @à&€&à €ý€€€À  þ  À€@ÿ @@ @€À @&&@ý€ÀÀ @@À@@ý@@   ÿÀ À  " &  .'.#"#5>723#5!!!ã“	&		z–]ÆWþ @ü€€@PF

þÝsþ*àà€ü  ü@€   0ÿáà@   5  %!!!!6762'&'7>76767>'&'&'.sý½CIþL´þÙBSR¬RSBB!!!!B.67v>=;.00_,,%84-::~?@8VþÚPGÿ GB!!!!BBSR¬RSB-
%9EEŽBC4-)V'   -ÿÀ­À 1 u  '#"'.'&'81<5<5104504167>767'7818181<1&'.'&10>7>71099>581<5<5}Z  J()+NEEi	À-¶:c-<<:;;&%%F<<) ,MY"
	fDEP'('M%%#À-·ýÇd0wpq°65:))1F&BB&412^+,'MG$    ÿø  ` % K W l  546;5#"+32;5#"&=4&'>5!54&+532;#"+5326=467.5'#"&54632"07>7654&#È. Kk.  .kK .p. Kk.  .kK .Ð=++==++=h+=.<5# !N! =+Bh .hkKh .h. hKkh. h&CC&h .hkKh .h. hKkh. h&CC&+==++==Å=+*;>%--X+=        €         !!5!5#!55!!!!5!  þ€ÿ  ÿ @ÿ € ü€ ÿ € €ü€€ý€ÀÀ ÀÀÀÀÀÀÀþÀÀÀÀ   	     €         #  !!5!5#!5!!%!!5!!!!5!  þ€ÿ  ÿ @ÿ  ÿ € ÿ  ü€ ÿ € €ü€€ý€ÀÀ ÀÀÀÀÿ ÀÀÀ ÀÀþÀÀÀÀ    @ €          !!5!5!5!!5!5!5!!5!5!5!5!5!  ý@ÿ  ÿ  @ÿ  ÿ  @ÿ  ÿ  ü€€€üÀ@ý À@Àþ@À@Àþ@À@À@À      €         !!!5#!5!!5!!!  ý€@þÀÿ @ÿ  ÿ € ü€ ÿ €ü€€üÀÀþ@ÀÀÀÀÀÿ À ÀÀþÀÀ        €        %5#53533#!!!!5!5!5!5!5!@¶¶Vººþj þ€ýÀ@@ÿ  ÿ  ÿ  ½¶Z¶¶Z¶Ãü€€üÀÀý@À@À@À       €        3##5#535%!!5!5!5!5!5!!!À¶¶Vººý– ý@ÿ  ÿ  ÿ  €ýÀ@ƒ¶Z¶¶Z¶ýü€€üÀÀ@À@Àý@À       €        ##5#53533!!5!!5!!5!5!!³FFýM ý@ÿ  @ÿ  @ÿ  ü€€ýC@ü€€üÀÀÀÀÀÀ=Ã         €        3533##5#!!!%!!!!5!5!MFFþ³ ý€ ÿ þÀ ÿ €ü€€ÿ  CC€ü€€€ÀÀÀþ Ã=À         €        '  !!!!5!5!5!5!5!!!5!5!''7'77  ý€ ÿ @ÿ  ÿ  ÿ  €ýÀ@ÿ  `=ƒƒ=ƒƒ=ƒƒ=ƒ€ü€€€Àþ À@À@Àý@À@Àý=ƒƒ=ƒƒ=ƒƒ=ƒ        €     !!!!''7'77  ü =ƒü}í`ÍÍ`ÍÍ`ÍÍ`Í€ü€ ý@ÀýÓ`ÍÍ`ÍÍ`ÍÍ`Í       @ €         !!5!5!5!5!5!!5!5!5!5!5!  þ€ÿ  ÿ  ÿ  @ÿ  ÿ  ÿ  €üÀ@ý À@À@Àý@À@À@À       @ €         !!5!5!5!!5!5!5!!5!5!5!  ý@ÿ  ÿ  @ÿ  ÿ  @ÿ  ÿ  €üÀ@ý À@Àþ@À@Àþ@À@À      €   $  ''7'77!#3#3!5!7!5!'!5!vœ M M £M£IüŠ @@VZ@ü€6@þŠs@þÍ€= M J £M£MCü€€þÀ@À@ÀÀ@À@À         €    % 1  55!!'5!'5!!57!57!'77'7@@@@@@€ü Àÿ 3ÿ 3ÿ  # 0 þà£M£œL M ó@@M@Š@Ðü€€€34ZZ43ý@v#ss0SÃjœ£M£M M   @ÿ€À€    5%33'47632#"'&Àþ@þ@@€@ÀÀ@€à((((À@€€@€ÿ þ@Àþ@À à((( 
     €         # '  3#7!!3#7!!3#7!!3#7!!3#7!! €€À@üÀÀ€€À@üÀÀ€€À@üÀ€€À€ý€À€€À€ý€€€€€ÿ €€€ÿ €€€À€€€ÿ €€€   ÿÚ ¦   3  '	7%93267>594&'.'
DVVVþ°þTWþú#@ª		
	“CVVVþþP³üó#3I/


,     ÿà        !!!!!!!!  ü  ü  ü  ü 
€j@VÀ*ÿ      *ÿÀÖ­     	#57'762!!5ãþ
º÷¹@¹C+lCý¬üTsþ
¹÷º=ºCm+Cý€pp   	  ÿó   	  ! G V h t   !!##53#575#53%#535#535#5>32#.'#"&546?>54&#"##3267573>32#"&'#32654&#"%.#"3267#"&54632#  ü 0CC†É††ÉÌ‰‰‰‰ýé55+J )0.5&C“		€J0:=0GG†G?07BC90>Cà@ðþ­CÚ6C™@7Cššþ­CCGCCý,( p
+!"'	3	#Ýp
E7:MVÖ '' !%'%"$%-3G9<G2.    ÿÀ À ! B  &'.'&#"347>7632!#"'.'&'7!7327>765z#+*`558j]^‹((`! qLLV.,+O"#–`†&! qLLV.,+O"#–þ †#+*`558j]^‹((&+((‹^]jVLLq !
	$ –`†þ¦VLLq !
	$ –þ †&+((‹^]j    ÿí  " * .  '67>76735!5#!!.'#7261%#3733%7#*w+Šþ¹]þºH3!6\D+íDé$]Ð]3Ý3]þ³MMš0v"$%M(((]]]]C7$M,:j0éCé]íýÐéÊÊ    @  À€          3#3#%3#3#%3#3#%3#3#@€€€€ÿ €€ €€ÿ €€€€ €€ÿ €€€€€€€€€€€€€€€€€€    « @€@    54&#!"3!26=3!;265!# þ  +þUUU€ë*ª*ªþ€*V      ¡    	5	!!! þ þ   €ÿ ÿ ÿ €rþs¢þs”þ€ ÿ €      @ÿ        7)!3#!!3#@óÌóüô ÿ @€€  ÿ @€€ŸQý¡QÀ€@þ À€@     @ÿÀ€À     !!"3!265#5#	GþÁE¹þ!//! !/þÀÀ   ùE?þ¹€/!ü !//!0þ€ÀÀ ÿ      ÿÀ À     !!7!"3!26534&' ý€`€þ (88(À(8 ý  `Xýø0à0 þ €€8(ý@(88(  ý  `HXý€0à0     ÿÀ €    !";!2654&!5#! üÀ(88( 3m(88Hþ…ÅÀ €8(þ (8ÿ  8( (8ýÀ¯¯À     @  À` .  .106726'476&'&#"310!4'.'&oE
*)ZZ)*
E88q*+€+*q88>V@d,+^%%%%^+,d@V>F--00--F      ÿÀ€€  #  #54&+"#"3!2654&%46;2!PqO€Oq þ\&€&ÿ  ÀOqqOÀþ àÀ&&À      ÿÀÀ€ #  2#54&+"32#!"&5463!5463 Oq€&€&ýàqO€qOÀÀ&&Àþ àÀOq         €   3 7 O S  54&+"#3;26=!5534&+"!!;26=35#534&+"#3;26=!5!53À ÀÀ @ý €À ýÀ@ ÀÀÀ€þÀ ÀÀ @ýÀÀ€@€€€€€°€€€€€°€€€€€  @ÿÀÀÀ     !!%5!!7!5!#53À€@ý  ÿ þÀ@ @þ€€€@ÀÀ€€À@@À@  €  €€     !!!!!!€ ÿ  ÿ  ÿ €ÿ @ÿ @ÿ     ÿÀòÀ   $  %.#"3!26'%"&546327#4632òþKþK%3f3%þ%%%%X%%,gü™,@@,%%%%À %%   ÿÀ À   H e  3#2#575!57"327>76767>7654'.'&'&'.'&#512#"'.'&547>76À€€ %À€ÀþÀÀ*((K""""K((**((K""""K((*j]^‹((((‹^]jj]^‹((((‹^] €@%À€@€@€ ""K((**((K""""K((**((K""`((‹^]jj]^‹((((‹^]jj]^‹((     ÿÀ À  7 C  "327>7654'.'&"'.'&547>7632##5#53533 j]^‹((((‹^]jj]^‹((((‹^]jPEFiiFEPPEFiiFE°À€ÀÀ€ÀÀ((‹^]jj]^‹((((‹^]jj]^‹((ü€iFEPPEFiiFEPPEFi@ÀÀ€ÀÀ      ÿÀ À   )  "327>7654'.'&3#!53#533 j]^‹((((‹^]jj]^‹((((‹^]ª€€Àÿ @@À@À((‹^]jj]^‹((((‹^]jj]^‹((À€þ @ @þÀ    ÿÀ À 	    %!!#535#3 þàþ@þà À þà €€€€ààþàþ@þà À üÀ€€€    ˆÿÀxÀ * D  &'.'&'327>76767>'&'#"&'327>767>'a%&\557755\&%

$$Y235532Y$$

~!|F)N!

,**J""çEAAw66//66wAAE+,,X++).&&66&&.)++X,,+þâ>K- '@€5*0‚A   @ @   3!26=4&#!" Àü@ ÀÀ     ÿÀ À #  !4&+"!"3!;265!26=4&àþ Àþ `À`@`þ Àþ `À       € @   	7 À@@Àþ @À@þÀÀ    ÀÿÀ€À   	€À@þÀÀ ÀÀþÀþÀÀ     @     '	 ÀþÀþÀÀ @ÀþÀ@Àþ   @ @   	 ÿ ÿ @ ÿ   @ @   	   @ÿ     € À    		   þ   Àÿ  þÀÿ    @  À€ 	   7!!!!'#5'À€ý  €ÿ   ƒþž[cƒ€€þ  €þ  þ ƒþ[bƒ    @à@ /  "#7#47>7632#27>7654'.'&#`PEFiÀ÷÷ÀJ229922JJ229PEFiiFEP@iFEP÷÷922JJ229922JniFEPPEFi       @à@ /  23'34'.'&#"3"'.'&547>763 PEFiÀ÷÷ÀJ229922JJ229PEFiiFEP@iFEP÷÷922JJ229922JniFEPPEFi         À    !!  ü @€ü@€    ÿÀÀÀ    !)@€ü@€Àü     ÿØèÀ ( D P  %'.>54'.'&#"326776&"'.'&547>7632##33535#àò'+1iFEPPEFiiFEPG€2ÎKý‚5/.FF./55/.FF./€€€€€€YÎ2€GPEFiiFEPPEFi1+'òKF./55/.FF./55/.FÀ€€€€€    ÿØèÀ ( D H  %'.>54'.'&#"326776&"'.'&547>7632!!àò'+1iFEPPEFiiFEPG€2ÎKý‚5/.FF./55/.FF./õ€þ€YÎ2€GPEFiiFEPPEFi1+'òKF./55/.FF./55/.F@€         @  N  !	5#'35#'35#'35#'35#'35#'35#'35#'35#'35!'!5!'!5!'!5!'733#3!!!!!! þ ÿ   þ -;IXft‚‘Ÿ­»ÉØæôþþþá-þÅIþ¨‹Ô×ç÷þùþÙ7þ¹Wþ¡@ÿ ýÀ@þu‹þu  @ @À      !!!!!!@€ü€€ü€€ü€ À@À@À   
  ÿÀ À   ) 7 F T c r Ž š  %2#"&=46"&=46322+"&5463+"&546;2"/&4762'&4762"%"'&4?6262"'&4?"327>7654'.'&"&54632 %%%%%%%%¥%%@%%ý@%@%%@%}-5.5ý†-5.5g5.5-ý†5.5-=5/.FF./55/.FF./5B^^BB^^€%@%%@%€%@%%@%ÿ %%%%@%%%%ý.5-5Ä.5-55-5.þ<5-5.âF./55/.FF./55/.Fþ`^BB^^BB^     3ÿÄÉÀ "  .''6767676&'&'Ì-`1.((99‡KJKK.\ee¿RR553==\€ <GF•KLEF44A
'C53==\\fe¿QR6      ÿÀ À  *  "327>7654'.'&47>763"'.'& j]^‹((((‹^]jj]^‹((((‹^]þiFEPPEFiÀ((‹^]jj]^‹((((‹^]jj]^‹((þ PEFiý iFE   ƒ C}=   '			7}ZþÝþÝZ"þÞZ##ZþÞãZþÞ"ZþÝþÝZ"þÞZ#     ÿÀ`À   7	' ÀþÀ@Àþ @À@@Àþ     ÿÀ À (  326=#"3!2654&#"32654&#!" %%¥å%%€%%%ý[å%%þ€%€þ€%%åý[%%%€%%å¥%%%     ÿÀ À     7'!5##3!3535#!@À@Àþ@€ÀÀ €ÀÀþ @þÀ@@ÀÀ@ÀÀÀ€þ ÀÀ€€þÀ@@þÀ         .?–½_<õ      ØA    ØAÿàÿ€À             ÀÿÀ   ÿàÿø                ~                   @                 ]  @        @           @  v  .     À           @  6     Ð                           @          ÿà  À  €  À        @          €     @     0  - ÿø                                            @           *          @  «        @        @           @ €                ˆ           À           @                       @     3     ƒ              
   B Ž è8bˆX d¢Ðþr–¼j(Dt²Jjò®Ê		 	P	z	¤


¬
î&„¦X¨ê>–¾îT¬À.‚Æ"²>t¶ò*bšÔX„ºð0„¸üDf’XÀBr–Àø0^¦Ü~ ¼øö8`Îê 4H\jxŽ´þHZläVÆàÀþ D f z ¶ ä      ~ ›                          ®                 `        6        u                K      
  Š  	     	   g  	   =  	   |  	      	   R  	 
 4 ¤tinymce t i n y m c eVersion 1.0 V e r s i o n   1 . 0tinymce t i n y m c etinymce t i n y m c eRegular R e g u l a rtinymce t i n y m c eFont generated by IcoMoon. F o n t   g e n e r a t e d   b y   I c o M o o n .                                                                                                                                                         tinymce/skins/lightgray/img/anchor.gif                                                              0000644                 00000000065 15212564050 0014053 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       GIF89a  €    ÿÿÿ!ù   ,       Œa‰˜Áý˜t4V  ;                                                                                                                                                                                                                                                                                                                                                                                                                                                                           tinymce/skins/lightgray/img/loader.gif                                                              0000644                 00000005060 15212564050 0014047 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       GIF89a  õ  ÿÿÿ   èèèÒÒÒ¼¼¼®®®¢¢¢ÜÜÜ¸¸¸šššäääØØØªªª   °°°ÌÌÌööö¨¨¨ÔÔÔæææ666&&&PPPÄÄÄppp’’’VVVúúúhhhFFFÆÆÆøøøHHH222                                                                                          !ÿNETSCAPE2.0   !þCreated with ajaxload.info !ù	
   ,       ÿ@€pH€bÁ$Ä¨tx@$®W@e»å8>S©‚€-k¹\Œ'<\0Êf4Ä`ð¸œ
/ yXg{wQ
o	X
 h
Ddƒ	a†eTy ›vkyBVevCp“y¡¶CyFp¿QpGpPÆCpHp¬Í«pIp’Ô pJÚÍØßÜeÒß
ÖXÌÔÏ§ÄßÈe½ÔÁp ²X´ŒáÒ%ä€ªia6½ÂŽÑ'_S$äjtÕEYÊ<Š´MÁƒzhŠò‡¢*AY š‚¥I8€Ø¸q‰’ÁJ6c½¬ˆÐN8/Àúf‰sîÙ	 !ù	
   ,       ÿ@€pHÀP Ä¨tx@$®W öŠ8L§
Â«'ŠïpÁ0gÝ	ÆBhÀewã»Øßóf !Q
mx[
 
[  Dbd	jx••Biti££BV[tC­ fžµC¹c¯ÀC¹gcÉD¹cªÑ ¹cÙ¼¹áÙÞ[àÙcL×å
cMÏåcNÇå’[O¾ÙfPba™•lB¨-N¥ª•ÆŒ!šÞtú
"†Þ`QÄÈ$}`ÒÐ““Ì™bJ,{Ô°q	GÃˆ“Ü ‰Våä˜.åxI²¤É:A  !ù	
   ,       ÿ@€pHÀP Ä¨tx@$®W öŠ8L§
Â«'ŠïpÁ0gÝ	ÆBhÀewã»ØßófusD
mx[
 
[eiCbd	j‡XT•jif^ V[tCž[ f›®CfFc¸Q‘[Gc¿DcHc¤Æ
cIcŒÆBcJÓÓÑØ´ÞÞËÜßÞ—XÅØæ½Øî	µc·¿îÅªXXýòÐÁ!F¹JÓÏ—t‡4qòÀ†C
½Á’hQ£GÁ²xá!J@cPJ
Áà‹8*±ìQÃ&9!b2ƒÆX•”cºp£u$É’&Oè !ù	
   ,       ÿ@€pHÀP Ä¨tx@$®W öŠ8L§
Â«'ŠïpÁ0gÝ	ÆBhÀewã»ØßófusD
mx[
 
[eiCbd	j‡XT•jif^ V[tCž[ f›®CfFc¸Q‘[Gc¿DcHc¤Æ
cIcŒÆBcJÓÓÑØÖËÜÎ[MÄÜÈ[N½ÜÁXO¶ÓºcPªX¬¿°c³ £®€WP¸ôFÓ—:T jH¡7X-¢u!ƒ†
^¡¥@ICbôÅ "C† ÃædJŒ ¸
ãeJÿ~Uc3#¸A¢„‚	Š©	 !ù	
   ,       ÿ@€pHÀP Ä¨tx@$®W öŠ8L§
Â«'ŠïpÁ0gÝ	ÆBhÀewã»ØßófusD
mx[
 
[eiCbd	j‡XT•jif^ V[tCž[ f›®CfFc¸Q‘[Gc¿DcHc¤Æ
cIcŒÆBcJÓÓÑØÖËÜÎ[MÄÜÈ[N½ÜÁXO¶ÓºcPªX¬¿°c³ ®¦cP¸”¥B¾tút%ÔB+HÔáG$]¡¥ ‰ C#èKˆ(GnÙ£†” Un¤Æ˜d¢ùõÁ‡”ùNC†Á…%MžÐ	 !ù	
   ,       ÿ@€pHÀP Ä¨tx@$®W öŠ8L§
Â«'ŠïpÁ0gÝ	ÆBhÀewã»ØßófusD
mx[
 
[eiCbd	j‡XT•jif^ V[tCž[ f›®CfFc¸Q‘[Gc¿DcHc¤Æ
cIcŒÆBcJÓÓÛÛPØÕ[ÜÛØ Î[äçÈ[bíØÁXí×¿ºc ph×ÁÃ/XcfpÀ+ScP}`ÇM‹&Nž …âÄ6@‰5z„ï¥(B ³RRƒARìÀi‰e63áÈyx‰¥4Æªø”…
›$J˜8ñö% !ù	
   ,       ÿ@€pHÀP Ä¨tx@$®W öŠ8L§
Â«'ŠïpÁ0gÝ	ÆBhÀewãËåÍcusD 
 
[eiBˆˆZjx[C›› —jif^ ¨tC¢[ ²J¶Cf	²ÁD“[š¨ÊDc²ÒC
c²PÚcÀâÊcŽâäc«ÒÜ[McæÔ¤cæÌXOf>I6Š•-&(Ã5f€€à	”à 1dx%êO©mmFaYÔèQ$"-EY°çE2I±çå•=jØÔ„#ÇV7/ÑH«"¨¡EmF(aâ$Ü—  !ù	
   ,       ÿ@€pH|$0
ÀP Ä¨Tøqp*X, Áå"Ó©“-o»]‚"<d€Êf4š±`Bð¸¼Û/úyYg{	 uD
\ eP
hgkC—a…hC{ v k{` r­B¤h {·C{rÁD–hœhÉCF¦ršÑ
rrÑBrßÑÜhÞßáhLÖäÙhMrÐßÓiÆhÈßË]O¿ÑÃr ÌBS+X.9¼ ¤’ãªÕ+9± 8c” 0Q¤%85DÅ.(ð6©Ò%.™¢üÑÈ£Ca¸,å²›‹±ìBÇáÄ“{Ô$;0°Ë/äz5Û¶¤É;A  ;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         tinymce/skins/lightgray/img/object.gif                                                              0000644                 00000000230 15212564050 0014041 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       GIF89a  ³ ååå???ooo´´´WWWýýýØØØÝÝÝÊÊÊïïï÷÷÷òòòÿÿÿ333   !ù   ,       EÐÉI«{®µ¬»æY†5OiŽ#E
È©ª1˜ïGJS‚Û}; šÜ†Âðe|ŠÃÎÈ+%4›HtÚù,à¦gLnD  ;                                                                                                                                                                                                                                                                                                                                                                        tinymce/skins/lightgray/img/trans.gif                                                               0000644                 00000000053 15212564050 0013725 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       GIF89a          !ù   ,       D ;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     tinymce/skins/lightgray/skin.min.css                                                                0000644                 00000125752 15212564050 0013611 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       .mce-container,.mce-container *,.mce-widget,.mce-widget *,.mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:#595959;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;-webkit-tap-highlight-color:transparent;line-height:normal;font-weight:normal;text-align:left;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-widget button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.mce-container *[unselectable]{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.word-wrap{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.mce-fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.mce-fade.mce-in{opacity:1}.mce-tinymce{visibility:inherit !important;position:relative}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%;z-index:100}div.mce-fullscreen{position:fixed;top:0;left:0;width:100%;height:auto}.mce-tinymce{display:block;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);box-shadow:0 1px 2px rgba(0, 0, 0, 0.2)}.mce-statusbar>.mce-container-body{display:flex;padding-right:16px}.mce-statusbar>.mce-container-body .mce-path{flex:1}.mce-wordcount{font-size:inherit;text-transform:uppercase;padding:8px 0}div.mce-edit-area{background:#FFF;filter:none}.mce-statusbar{position:relative}.mce-statusbar .mce-container-body{position:relative;font-size:11px}.mce-fullscreen .mce-resizehandle{display:none}.mce-statusbar .mce-flow-layout-item{margin:0}.mce-charmap{border-collapse:collapse}.mce-charmap td{cursor:default;border:1px solid #c5c5c5;width:20px;height:20px;line-height:20px;text-align:center;vertical-align:middle;padding:2px}.mce-charmap td div{text-align:center}.mce-charmap td:hover{background:white}.mce-grid td.mce-grid-cell div{border:1px solid #c5c5c5;width:15px;height:15px;margin:0;cursor:pointer}.mce-grid td.mce-grid-cell div:focus{border-color:#91bbe9}.mce-grid td.mce-grid-cell div[disabled]{cursor:not-allowed}.mce-grid{border-spacing:2px;border-collapse:separate}.mce-grid a{display:block;border:1px solid transparent}.mce-grid a:hover,.mce-grid a:focus{border-color:#91bbe9}.mce-grid-border{margin:0 4px 0 4px}.mce-grid-border a{border-color:#c5c5c5;width:13px;height:13px}.mce-grid-border a:hover,.mce-grid-border a.mce-active{border-color:#91bbe9;background:#bdd6f2}.mce-text-center{text-align:center}div.mce-tinymce-inline{width:100%}.mce-colorbtn-trans div{text-align:center;vertical-align:middle;font-weight:bold;font-size:20px;line-height:16px;color:#8b8b8b}.mce-monospace{font-family:"Courier New",Courier,monospace}.mce-toolbar-grp .mce-flow-layout-item{margin-bottom:0}.mce-container b{font-weight:bold}.mce-container p{margin-bottom:5px}.mce-container a{cursor:pointer;color:#2276d2}.mce-container a:hover{text-decoration:underline}.mce-container ul{margin-left:15px}.mce-container .mce-table-striped{border-collapse:collapse;margin:10px}.mce-container .mce-table-striped thead>tr{background-color:#fafafa}.mce-container .mce-table-striped thead>tr th{font-weight:bold}.mce-container .mce-table-striped td,.mce-container .mce-table-striped th{padding:5px}.mce-container .mce-table-striped tr:nth-child(even){background-color:#fafafa}.mce-container .mce-table-striped tbody>tr:hover{background-color:#e1e1e1}.mce-branding{font-size:inherit;text-transform:uppercase;white-space:pre;padding:8px 0}.mce-branding a{font-size:inherit;color:inherit}.mce-top-part{position:relative}.mce-top-part::before{content:'';position:absolute;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);top:0;right:0;bottom:0;left:0;pointer-events:none}.mce-rtl .mce-wordcount{left:0;right:auto}.mce-rtl .mce-statusbar>.mce-container-body>*:last-child{padding-right:0;padding-left:10px}.mce-rtl .mce-path{text-align:right;padding-right:16px}.mce-croprect-container{position:absolute;top:0;left:0}.mce-croprect-handle{position:absolute;top:0;left:0;width:20px;height:20px;border:2px solid white}.mce-croprect-handle-nw{border-width:2px 0 0 2px;margin:-2px 0 0 -2px;cursor:nw-resize;top:100px;left:100px}.mce-croprect-handle-ne{border-width:2px 2px 0 0;margin:-2px 0 0 -20px;cursor:ne-resize;top:100px;left:200px}.mce-croprect-handle-sw{border-width:0 0 2px 2px;margin:-20px 2px 0 -2px;cursor:sw-resize;top:200px;left:100px}.mce-croprect-handle-se{border-width:0 2px 2px 0;margin:-20px 0 0 -20px;cursor:se-resize;top:200px;left:200px}.mce-croprect-handle-move{position:absolute;cursor:move;border:0}.mce-croprect-block{opacity:.5;filter:alpha(opacity=50);zoom:1;position:absolute;background:black}.mce-croprect-handle:focus{border-color:#2276d2}.mce-croprect-handle-move:focus{outline:1px solid #2276d2}.mce-imagepanel{overflow:auto;background:black}.mce-imagepanel-bg{position:absolute;background:url('data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==')}.mce-imagepanel img{position:absolute}.mce-imagetool.mce-btn .mce-ico{display:block;width:20px;height:20px;text-align:center;line-height:20px;font-size:20px;padding:5px}.mce-arrow-up{margin-top:12px}.mce-arrow-down{margin-top:-12px}.mce-arrow:before,.mce-arrow:after{position:absolute;left:50%;display:block;width:0;height:0;border-style:solid;border-color:transparent;content:""}.mce-arrow.mce-arrow-up:before{top:-9px;border-bottom-color:#c5c5c5;border-width:0 9px 9px;margin-left:-9px}.mce-arrow.mce-arrow-down:before{bottom:-9px;border-top-color:#c5c5c5;border-width:9px 9px 0;margin-left:-9px}.mce-arrow.mce-arrow-up:after{top:-8px;border-bottom-color:#fff;border-width:0 8px 8px;margin-left:-8px}.mce-arrow.mce-arrow-down:after{bottom:-8px;border-top-color:#fff;border-width:8px 8px 0;margin-left:-8px}.mce-arrow.mce-arrow-left:before,.mce-arrow.mce-arrow-left:after{margin:0}.mce-arrow.mce-arrow-left:before{left:8px}.mce-arrow.mce-arrow-left:after{left:9px}.mce-arrow.mce-arrow-right:before,.mce-arrow.mce-arrow-right:after{left:auto;margin:0}.mce-arrow.mce-arrow-right:before{right:8px}.mce-arrow.mce-arrow-right:after{right:9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left:before{left:-9px;top:50%;border-right-color:#c5c5c5;border-width:9px 9px 9px 0;margin-top:-9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left:after{left:-8px;top:50%;border-right-color:#fff;border-width:8px 8px 8px 0;margin-top:-8px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left{margin-left:12px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right:before{right:-9px;top:50%;border-left-color:#c5c5c5;border-width:9px 0 9px 9px;margin-top:-9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right:after{right:-8px;top:50%;border-left-color:#fff;border-width:8px 0 8px 8px;margin-top:-8px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right{margin-left:-14px}.mce-edit-aria-container>.mce-container-body{display:flex}.mce-edit-aria-container>.mce-container-body .mce-edit-area{flex:1}.mce-edit-aria-container>.mce-container-body .mce-sidebar>.mce-container-body{display:flex;align-items:stretch;height:100%}.mce-edit-aria-container>.mce-container-body .mce-sidebar-panel{min-width:250px;max-width:250px;position:relative}.mce-edit-aria-container>.mce-container-body .mce-sidebar-panel>.mce-container-body{position:absolute;width:100%;height:100%;overflow:auto;top:0;left:0}.mce-sidebar-toolbar{border:0 solid #c5c5c5;border-left-width:1px}.mce-sidebar-toolbar .mce-btn{border-left:0;border-right:0}.mce-sidebar-toolbar .mce-btn.mce-active,.mce-sidebar-toolbar .mce-btn.mce-active:hover{background-color:#555c66}.mce-sidebar-toolbar .mce-btn.mce-active button,.mce-sidebar-toolbar .mce-btn.mce-active:hover button,.mce-sidebar-toolbar .mce-btn.mce-active button i,.mce-sidebar-toolbar .mce-btn.mce-active:hover button i{color:white;text-shadow:1px 1px none}.mce-sidebar-panel{border:0 solid #c5c5c5;border-left-width:1px}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,0.6);width:5px;height:100%}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#AAA;opacity:.6;filter:alpha(opacity=60);zoom:1}.mce-scroll{position:relative}.mce-panel{border:0 solid #f3f3f3;border:0 solid #c5c5c5;background-color:#fff}.mce-floatpanel{position:absolute;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);box-shadow:0 1px 2px rgba(0, 0, 0, 0.2)}.mce-floatpanel.mce-fixed{position:fixed}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);top:0;left:0;background:#FFF;border:1px solid #c5c5c5;border:1px solid rgba(0,0,0,0.25)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#c5c5c5;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#FFF}.mce-floatpanel.mce-popover.mce-top{margin-top:-10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-top>.mce-arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#c5c5c5;top:auto;bottom:-11px}.mce-floatpanel.mce-popover.mce-top>.mce-arrow:after{bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#FFF}.mce-floatpanel.mce-popover.mce-bottom.mce-start,.mce-floatpanel.mce-popover.mce-top.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow,.mce-floatpanel.mce-popover.mce-top.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end,.mce-floatpanel.mce-popover.mce-top.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow,.mce-floatpanel.mce-popover.mce-top.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#FFF}#mce-modal-block.mce-in{opacity:.5;filter:alpha(opacity=50);zoom:1}.mce-window-move{cursor:move}.mce-window{-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#FFF;position:fixed;top:0;left:0;opacity:0;transform:scale(.1);transition:transform 100ms ease-in,opacity 150ms ease-in}.mce-window.mce-in{transform:scale(1);opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #c5c5c5;position:relative}.mce-window-head .mce-close{position:absolute;right:0;top:0;height:38px;width:38px;text-align:center;cursor:pointer}.mce-window-head .mce-close i{color:#9b9b9b}.mce-close:hover i{color:#bdbdbd}.mce-window-head .mce-title{line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:20px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:#FFF;border-top:1px solid #c5c5c5}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window-body .mce-listbox{border-color:#e2e4e7}.mce-window .mce-btn:hover{border-color:#c5c5c5}.mce-window .mce-btn:focus{border-color:#2276d2}.mce-window-body .mce-btn,.mce-foot .mce-btn{border-color:#c5c5c5}.mce-foot .mce-btn.mce-primary{border-color:transparent}.mce-rtl .mce-window-head .mce-close{position:absolute;right:auto;left:0}.mce-rtl .mce-window-head .mce-dragh{left:auto;right:0}.mce-rtl .mce-window-head .mce-title{direction:rtl;text-align:right;padding-right:0;padding-left:20px}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1;margin-top:1px}.mce-tooltip-inner{font-size:11px;background-color:#000;color:white;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-inner{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-nw,.mce-tooltip-sw{margin-left:-14px}.mce-tooltip-ne,.mce-tooltip-se{margin-left:14px}.mce-tooltip-n .mce-tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-progress{display:inline-block;position:relative;height:20px}.mce-progress .mce-bar-container{display:inline-block;width:100px;height:100%;margin-right:8px;border:1px solid #ccc;overflow:hidden}.mce-progress .mce-text{display:inline-block;margin-top:auto;margin-bottom:auto;font-size:14px;width:40px;color:#595959}.mce-bar{display:block;width:0;height:100%;background-color:#dfdfdf;-webkit-transition:width .2s ease;transition:width .2s ease}.mce-notification{position:absolute;background-color:#fff;padding:5px;margin-top:5px;border-width:1px;border-style:solid;border-color:#c5c5c5;transition:transform 100ms ease-in,opacity 150ms ease-in;opacity:0;box-sizing:border-box}.mce-notification.mce-in{opacity:1}.mce-notification-success{background-color:#dff0d8;border-color:#d6e9c6}.mce-notification-info{background-color:#d9edf7;border-color:#779ECB}.mce-notification-warning{background-color:#fcf8e3;border-color:#faebcc}.mce-notification-error{background-color:#f2dede;border-color:#ebccd1}.mce-notification.mce-has-close{padding-right:15px}.mce-notification .mce-ico{margin-top:5px}.mce-notification-inner{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;display:inline-block;font-size:14px;margin:5px 8px 4px 8px;text-align:center;white-space:normal;color:#31708f}.mce-notification-inner a{text-decoration:underline;cursor:pointer}.mce-notification .mce-progress{margin-right:8px}.mce-notification .mce-progress .mce-text{margin-top:5px}.mce-notification *,.mce-notification .mce-progress .mce-text{color:#595959}.mce-notification .mce-progress .mce-bar-container{border-color:#c5c5c5}.mce-notification .mce-progress .mce-bar-container .mce-bar{background-color:#595959}.mce-notification-success *,.mce-notification-success .mce-progress .mce-text{color:#3c763d}.mce-notification-success .mce-progress .mce-bar-container{border-color:#d6e9c6}.mce-notification-success .mce-progress .mce-bar-container .mce-bar{background-color:#3c763d}.mce-notification-info *,.mce-notification-info .mce-progress .mce-text{color:#31708f}.mce-notification-info .mce-progress .mce-bar-container{border-color:#779ECB}.mce-notification-info .mce-progress .mce-bar-container .mce-bar{background-color:#31708f}.mce-notification-warning *,.mce-notification-warning .mce-progress .mce-text{color:#8a6d3b}.mce-notification-warning .mce-progress .mce-bar-container{border-color:#faebcc}.mce-notification-warning .mce-progress .mce-bar-container .mce-bar{background-color:#8a6d3b}.mce-notification-error *,.mce-notification-error .mce-progress .mce-text{color:#a94442}.mce-notification-error .mce-progress .mce-bar-container{border-color:#ebccd1}.mce-notification-error .mce-progress .mce-bar-container .mce-bar{background-color:#a94442}.mce-notification .mce-close{position:absolute;top:6px;right:8px;font-size:20px;font-weight:bold;line-height:20px;color:#9b9b9b;cursor:pointer}.mce-abs-layout{position:relative}html .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-btn{border:1px solid #b3b3b3;border-color:transparent transparent transparent transparent;position:relative;text-shadow:0 1px 1px rgba(255,255,255,0.75);background:white;display:inline-block;*display:inline;*zoom:1;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-btn:hover,.mce-btn:active{background:white;color:#595959;border-color:#e2e4e7}.mce-btn:focus{background:white;color:#595959;border-color:#e2e4e7}.mce-btn.mce-disabled button,.mce-btn.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover,.mce-btn.mce-active:focus,.mce-btn.mce-active:active{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background:#555c66;color:white;border-color:transparent}.mce-btn.mce-active button,.mce-btn.mce-active:hover button,.mce-btn.mce-active i,.mce-btn.mce-active:hover i{color:white}.mce-btn:hover .mce-caret{border-top-color:#b5bcc2}.mce-btn.mce-active .mce-caret,.mce-btn.mce-active:hover .mce-caret{border-top-color:white}.mce-btn button{padding:4px 6px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#595959;text-align:center;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px none}.mce-primary.mce-btn-has-text{min-width:50px}.mce-primary{color:white;border:1px solid transparent;border-color:transparent;background-color:#2276d2}.mce-primary:hover,.mce-primary:focus{background-color:#1e6abc;border-color:transparent}.mce-primary.mce-disabled button,.mce-primary.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-primary.mce-active,.mce-primary.mce-active:hover,.mce-primary:not(.mce-disabled):active{background-color:#1e6abc;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-primary button,.mce-primary button i{color:white;text-shadow:1px 1px none}.mce-btn .mce-txt{font-size:inherit;line-height:inherit;color:inherit}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:1px 5px;font-size:12px;*padding-bottom:2px}.mce-btn-small i{line-height:20px;vertical-align:top;*line-height:18px}.mce-btn .mce-caret{margin-top:8px;margin-left:0}.mce-btn-small .mce-caret{margin-top:8px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #b5bcc2;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#aaa}.mce-caret.mce-up{border-bottom:4px solid #b5bcc2;border-top:0}.mce-btn-flat{border:0;background:transparent;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:none}.mce-btn-flat:hover,.mce-btn-flat.mce-active,.mce-btn-flat:focus,.mce-btn-flat:active{border:0;background:#e6e6e6;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-btn-has-text .mce-ico{padding-right:5px}.mce-rtl .mce-btn button{direction:rtl}.mce-toolbar .mce-btn-group{margin:0;padding:2px 0}.mce-btn-group .mce-btn{border-width:1px;margin:0;margin-left:2px}.mce-btn-group:not(:first-child){border-left:1px solid #d9d9d9;padding-left:0;margin-left:2px}.mce-btn-group{margin-left:2px}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-rtl .mce-btn-group .mce-btn{margin-left:0;margin-right:2px}.mce-rtl .mce-btn-group .mce-first{margin-right:0}.mce-rtl .mce-btn-group:not(:first-child){border-left:none;border-right:1px solid #d9d9d9;padding-right:4px;margin-right:4px}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background-color:white;text-indent:-10em;overflow:hidden}.mce-checked i.mce-i-checkbox{color:#595959;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox,.mce-checkbox.mce-focus i.mce-i-checkbox{border:1px solid #2276d2;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-checkbox.mce-disabled .mce-label,.mce-checkbox.mce-disabled i.mce-i-checkbox{color:#bdbdbd}.mce-checkbox .mce-label{vertical-align:middle}.mce-rtl .mce-checkbox{direction:rtl;text-align:right}.mce-rtl i.mce-i-checkbox{margin:0 0 0 3px}.mce-combobox{position:relative;display:inline-block;*display:inline;*zoom:1;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;*height:32px}.mce-combobox input{border:1px solid #c5c5c5;border-right-color:#c5c5c5;height:28px}.mce-combobox.mce-disabled input{color:#bdbdbd}.mce-combobox .mce-btn{border:1px solid #c5c5c5;border-left:0;margin:0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox.mce-disabled .mce-btn button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-combobox .mce-status{position:absolute;right:2px;top:50%;line-height:16px;margin-top:-8px;font-size:12px;width:15px;height:15px;text-align:center;cursor:pointer}.mce-combobox.mce-has-status input{padding-right:20px}.mce-combobox.mce-has-open .mce-status{right:37px}.mce-combobox .mce-status.mce-i-warning{color:#c09853}.mce-combobox .mce-status.mce-i-checkmark{color:#468847}.mce-menu.mce-combobox-menu{border-top:0;margin-top:0;max-height:200px}.mce-menu.mce-combobox-menu .mce-menu-item{padding:4px 6px 4px 4px;font-size:11px}.mce-menu.mce-combobox-menu .mce-menu-item-sep{padding:0}.mce-menu.mce-combobox-menu .mce-text,.mce-menu.mce-combobox-menu .mce-text b{font-size:11px}.mce-menu.mce-combobox-menu .mce-menu-item-link,.mce-menu.mce-combobox-menu .mce-menu-item-link b{font-size:11px}.mce-colorbox i{border:1px solid #c5c5c5;width:14px;height:14px}.mce-colorbutton .mce-ico{position:relative}.mce-colorbutton-grid{margin:4px}.mce-colorbutton .mce-preview{padding-right:3px;display:block;position:absolute;left:50%;top:50%;margin-left:-17px;margin-top:7px;background:gray;width:13px;height:2px;overflow:hidden}.mce-colorbutton.mce-btn-small .mce-preview{margin-left:-16px;padding-right:0;width:16px}.mce-rtl .mce-colorbutton{direction:rtl}.mce-rtl .mce-colorbutton .mce-preview{margin-left:0;padding-right:0;padding-left:3px}.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview{margin-left:0;padding-right:0;padding-left:2px}.mce-rtl .mce-colorbutton .mce-open{padding-left:4px;padding-right:4px;border-left:0}.mce-colorpicker{position:relative;width:250px;height:220px}.mce-colorpicker-sv{position:absolute;top:0;left:0;width:90%;height:100%;border:1px solid #c5c5c5;cursor:crosshair;overflow:hidden}.mce-colorpicker-h-chunk{width:100%}.mce-colorpicker-overlay1,.mce-colorpicker-overlay2{width:100%;height:100%;position:absolute;top:0;left:0}.mce-colorpicker-overlay1{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr='#ffffff', endColorstr='#00ffffff');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ffffff', endColorstr='#00ffffff')";background:linear-gradient(to right, #fff, rgba(255,255,255,0))}.mce-colorpicker-overlay2{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#00000000', endColorstr='#000000');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#00000000', endColorstr='#000000')";background:linear-gradient(to bottom, rgba(0,0,0,0), #000)}.mce-colorpicker-selector1{background:none;position:absolute;width:12px;height:12px;margin:-8px 0 0 -8px;border:1px solid black;border-radius:50%}.mce-colorpicker-selector2{position:absolute;width:10px;height:10px;border:1px solid white;border-radius:50%}.mce-colorpicker-h{position:absolute;top:0;right:0;width:6.5%;height:100%;border:1px solid #c5c5c5;cursor:crosshair}.mce-colorpicker-h-marker{margin-top:-4px;position:absolute;top:0;left:-1px;width:100%;border:1px solid black;background:white;height:4px;z-index:100}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal;font-size:inherit}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#595959;font-size:inherit;text-transform:uppercase}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:#555c66;color:white}.mce-path .mce-divider{display:inline;font-size:inherit}.mce-disabled .mce-path-item{color:#aaa}.mce-rtl .mce-path{direction:rtl}.mce-fieldset{border:0 solid #9E9E9E}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-tinymce-inline .mce-flow-layout{white-space:nowrap}.mce-rtl .mce-flow-layout{text-align:right;direction:rtl}.mce-rtl .mce-flow-layout-item{margin:2px 2px 2px 0}.mce-rtl .mce-flow-layout-item.mce-last{margin-left:2px}.mce-iframe{border:0 solid #c5c5c5;width:100%;height:100%}.mce-infobox{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden;border:1px solid red}.mce-infobox div{display:block;margin:5px}.mce-infobox div button{position:absolute;top:50%;right:4px;cursor:pointer;margin-top:-8px;display:none}.mce-infobox div button:focus{outline:2px solid #e2e4e7}.mce-infobox.mce-has-help div{margin-right:25px}.mce-infobox.mce-has-help button{display:block}.mce-infobox.mce-success{background:#dff0d8;border-color:#d6e9c6}.mce-infobox.mce-success div{color:#3c763d}.mce-infobox.mce-warning{background:#fcf8e3;border-color:#faebcc}.mce-infobox.mce-warning div{color:#8a6d3b}.mce-infobox.mce-error{background:#f2dede;border-color:#ebccd1}.mce-infobox.mce-error div{color:#a94442}.mce-rtl .mce-infobox div{text-align:right;direction:rtl}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label.mce-disabled{color:#aaa}.mce-label.mce-multiline{white-space:pre-wrap}.mce-label.mce-success{color:#468847}.mce-label.mce-warning{color:#c09853}.mce-label.mce-error{color:#b94a48}.mce-rtl .mce-label{text-align:right;direction:rtl}.mce-menubar{border:1px solid #e2e4e7}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:none}.mce-menubar .mce-menubtn button span{color:#595959}.mce-menubar .mce-caret{border-top-color:#b5bcc2}.mce-menubar .mce-active .mce-caret,.mce-menubar .mce-menubtn:hover .mce-caret{border-top-color:#b5bcc2}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus{border-color:#e2e4e7;background:white;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-menubar .mce-menubtn.mce-active{border-bottom:none;z-index:65537}div.mce-menubtn.mce-opened{border-bottom-color:white;z-index:65537}div.mce-menubtn.mce-opened.mce-opened-under{z-index:0}.mce-menubtn button{color:#595959}.mce-menubtn.mce-btn-small span{font-size:12px}.mce-menubtn.mce-fixed-width span{display:inline-block;overflow-x:hidden;text-overflow:ellipsis;width:90px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:70px}.mce-menubtn .mce-caret{*margin-top:6px}.mce-rtl .mce-menubtn button{direction:rtl;text-align:right}.mce-rtl .mce-menubtn.mce-fixed-width span{direction:rtl;text-align:right}.mce-menu-item{display:block;padding:6px 4px 6px 4px;clear:both;font-weight:normal;line-height:20px;color:#595959;white-space:nowrap;cursor:pointer;line-height:normal;border-left:4px solid transparent;margin-bottom:1px}.mce-menu-item .mce-text,.mce-menu-item .mce-text b{line-height:1;vertical-align:initial}.mce-menu-item .mce-caret{margin-top:4px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #595959}.mce-menu-item .mce-menu-shortcut{display:inline-block;padding:0 10px 0 20px;color:#aaa}.mce-menu-item .mce-ico{padding-right:4px}.mce-menu-item:hover,.mce-menu-item:focus{background:#ededee}.mce-menu-item:hover .mce-menu-shortcut,.mce-menu-item:focus .mce-menu-shortcut{color:#aaa}.mce-menu-item:hover .mce-text,.mce-menu-item:focus .mce-text,.mce-menu-item:hover .mce-ico,.mce-menu-item:focus .mce-ico{color:#595959}.mce-menu-item.mce-selected{background:#ededee}.mce-menu-item.mce-selected .mce-text,.mce-menu-item.mce-selected .mce-ico{color:#595959}.mce-menu-item.mce-active.mce-menu-item-normal{background:#555c66}.mce-menu-item.mce-active.mce-menu-item-normal .mce-text,.mce-menu-item.mce-active.mce-menu-item-normal .mce-ico{color:white}.mce-menu-item.mce-active.mce-menu-item-checkbox .mce-ico{visibility:visible}.mce-menu-item.mce-disabled,.mce-menu-item.mce-disabled:hover{background:white}.mce-menu-item.mce-disabled:focus,.mce-menu-item.mce-disabled:hover:focus{background:#ededee}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled:hover .mce-text,.mce-menu-item.mce-disabled .mce-ico,.mce-menu-item.mce-disabled:hover .mce-ico{color:#aaa}.mce-menu-item.mce-menu-item-preview.mce-active{border-left:5px solid #555c66;background:white}.mce-menu-item.mce-menu-item-preview.mce-active .mce-text,.mce-menu-item.mce-menu-item-preview.mce-active .mce-ico{color:#595959}.mce-menu-item.mce-menu-item-preview.mce-active:hover{background:#ededee}.mce-menu-item-link{color:#093;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mce-menu-item-link b{color:#093}.mce-menu-item-ellipsis{display:block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mce-menu-item:hover *,.mce-menu-item.mce-selected *,.mce-menu-item:focus *{color:#595959}div.mce-menu .mce-menu-item-sep,.mce-menu-item-sep:hover{border:0;padding:0;height:1px;margin:9px 1px;overflow:hidden;background:transparent;border-bottom:1px solid rgba(0,0,0,0.1);cursor:default;filter:none}div.mce-menu .mce-menu-item b{font-weight:bold}.mce-menu-item-indent-1{padding-left:20px}.mce-menu-item-indent-2{padding-left:35px}.mce-menu-item-indent-2{padding-left:35px}.mce-menu-item-indent-3{padding-left:40px}.mce-menu-item-indent-4{padding-left:45px}.mce-menu-item-indent-5{padding-left:50px}.mce-menu-item-indent-6{padding-left:55px}.mce-menu.mce-rtl{direction:rtl}.mce-rtl .mce-menu-item{text-align:right;direction:rtl;padding:6px 12px 6px 15px}.mce-rtl .mce-menu-item .mce-caret{margin-left:6px;margin-right:0;border-right:4px solid #595959;border-left:0}.mce-rtl .mce-menu-item.mce-selected .mce-caret,.mce-rtl .mce-menu-item:focus .mce-caret,.mce-rtl .mce-menu-item:hover .mce-caret{border-left-color:transparent;border-right-color:#595959}.mce-rtl .mce-menu-item .mce-ico{padding-right:0;padding-left:4px}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}.mce-throbber-inline{position:static;height:50px}.mce-menu .mce-throbber-inline{height:25px;background-size:contain}.mce-menu{position:absolute;left:0;top:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:-1px 0 0;min-width:180px;background:white;border:1px solid #c5c9cf;border:1px solid #e2e4e7;z-index:1002;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);max-height:500px;overflow:auto;overflow-x:hidden}.mce-menu.mce-animate{opacity:.01;transform:rotateY(10deg) rotateX(-10deg);transform-origin:left top}.mce-menu.mce-menu-align .mce-menu-shortcut,.mce-menu.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block}.mce-menu.mce-in.mce-animate{opacity:1;transform:rotateY(0) rotateX(0);transition:opacity .075s ease,transform .1s ease}.mce-menu-sub-tr-tl{margin:-6px 0 0 -1px}.mce-menu-sub-br-bl{margin:6px 0 0 -1px}.mce-menu-sub-tl-tr{margin:-6px 0 0 1px}.mce-menu-sub-bl-br{margin:6px 0 0 1px}.mce-rtl .mce-menu-item .mce-ico{padding-right:0;padding-left:4px}.mce-rtl.mce-menu-align .mce-caret,.mce-rtl .mce-menu-shortcut{right:auto;left:0}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-rtl .mce-listbox .mce-caret{right:auto;left:8px}.mce-rtl .mce-listbox button{padding-right:10px;padding-left:20px}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-container-body .mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#595959}.mce-selectbox{background:#fff;border:1px solid #c5c5c5}.mce-slider{border:1px solid #c5c5c5;background:#fff;width:100px;height:10px;position:relative;display:block}.mce-slider.mce-vertical{width:10px;height:100px}.mce-slider-handle{border:1px solid #c5c5c5;background:#e6e6e6;display:block;width:13px;height:13px;position:absolute;top:0;left:0;margin-left:-1px;margin-top:-2px}.mce-slider-handle:focus{border-color:#2276d2}.mce-spacer{visibility:hidden}.mce-splitbtn:hover .mce-open{border-left:1px solid #e2e4e7}.mce-splitbtn .mce-open{border-left:1px solid transparent;padding-right:4px;padding-left:4px}.mce-splitbtn .mce-open:focus{border-left:1px solid #e2e4e7}.mce-splitbtn .mce-open:hover,.mce-splitbtn .mce-open:active{border-left:1px solid #e2e4e7}.mce-splitbtn.mce-active:hover .mce-open{border-left:1px solid white}.mce-splitbtn.mce-opened{border-color:#e2e4e7}.mce-splitbtn.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-splitbtn{direction:rtl;text-align:right}.mce-rtl .mce-splitbtn button{padding-right:4px;padding-left:4px}.mce-rtl .mce-splitbtn .mce-open{border-left:0}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #c5c5c5}.mce-tabs,.mce-tabs+.mce-container-body{background:#fff}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #c5c5c5;border-width:0 1px 0 0;background:#fff;padding:8px 15px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#FDFDFD}.mce-tab.mce-active{background:#FDFDFD;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-tab:focus{color:#2276d2}.mce-rtl .mce-tabs{text-align:right;direction:rtl}.mce-rtl .mce-tab{border-width:0 0 0 1px}.mce-textbox{background:#fff;border:1px solid #c5c5c5;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:inline-block;-webkit-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:pre-wrap;*white-space:pre;color:#595959}.mce-textbox:focus,.mce-textbox.mce-focus{border-color:#2276d2;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px;height:auto}.mce-textbox.mce-disabled{color:#bdbdbd}.mce-rtl .mce-textbox{text-align:right;direction:rtl}.mce-dropzone{border:3px dashed gray;text-align:center}.mce-dropzone span{text-transform:uppercase;display:inline-block;vertical-align:middle}.mce-dropzone:after{content:"";height:100%;display:inline-block;vertical-align:middle}.mce-dropzone.mce-disabled{opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-dropzone.mce-disabled.mce-dragenter{cursor:not-allowed}.mce-browsebutton{position:relative;overflow:hidden}.mce-browsebutton button{position:relative;z-index:1}.mce-browsebutton input{opacity:0;filter:alpha(opacity=0);zoom:1;position:absolute;top:0;left:0;width:100%;height:100%;z-index:0}@font-face{font-family:'tinymce';src:url('fonts/tinymce.eot');src:url('fonts/tinymce.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce.woff') format('woff'),url('fonts/tinymce.ttf') format('truetype'),url('fonts/tinymce.svg#tinymce') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'tinymce-small';src:url('fonts/tinymce-small.eot');src:url('fonts/tinymce-small.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce-small.woff') format('woff'),url('fonts/tinymce-small.ttf') format('truetype'),url('fonts/tinymce-small.svg#tinymce') format('svg');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce',Arial;font-style:normal;font-weight:normal;font-variant:normal;font-size:16px;line-height:16px;speak:none;vertical-align:text-top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;background:transparent center center;background-size:cover;width:16px;height:16px;color:#595959}.mce-btn-small .mce-ico{font-family:'tinymce-small',Arial}.mce-i-save:before{content:"\e000"}.mce-i-newdocument:before{content:"\e001"}.mce-i-fullpage:before{content:"\e002"}.mce-i-alignleft:before{content:"\e003"}.mce-i-aligncenter:before{content:"\e004"}.mce-i-alignright:before{content:"\e005"}.mce-i-alignjustify:before{content:"\e006"}.mce-i-alignnone:before{content:"\e003"}.mce-i-cut:before{content:"\e007"}.mce-i-paste:before{content:"\e008"}.mce-i-searchreplace:before{content:"\e009"}.mce-i-bullist:before{content:"\e00a"}.mce-i-numlist:before{content:"\e00b"}.mce-i-indent:before{content:"\e00c"}.mce-i-outdent:before{content:"\e00d"}.mce-i-blockquote:before{content:"\e00e"}.mce-i-undo:before{content:"\e00f"}.mce-i-redo:before{content:"\e010"}.mce-i-link:before{content:"\e011"}.mce-i-unlink:before{content:"\e012"}.mce-i-anchor:before{content:"\e013"}.mce-i-image:before{content:"\e014"}.mce-i-media:before{content:"\e015"}.mce-i-help:before{content:"\e016"}.mce-i-code:before{content:"\e017"}.mce-i-insertdatetime:before{content:"\e018"}.mce-i-preview:before{content:"\e019"}.mce-i-forecolor:before{content:"\e01a"}.mce-i-backcolor:before{content:"\e01a"}.mce-i-table:before{content:"\e01b"}.mce-i-hr:before{content:"\e01c"}.mce-i-removeformat:before{content:"\e01d"}.mce-i-subscript:before{content:"\e01e"}.mce-i-superscript:before{content:"\e01f"}.mce-i-charmap:before{content:"\e020"}.mce-i-emoticons:before{content:"\e021"}.mce-i-print:before{content:"\e022"}.mce-i-fullscreen:before{content:"\e023"}.mce-i-spellchecker:before{content:"\e024"}.mce-i-nonbreaking:before{content:"\e025"}.mce-i-template:before{content:"\e026"}.mce-i-pagebreak:before{content:"\e027"}.mce-i-restoredraft:before{content:"\e028"}.mce-i-bold:before{content:"\e02a"}.mce-i-italic:before{content:"\e02b"}.mce-i-underline:before{content:"\e02c"}.mce-i-strikethrough:before{content:"\e02d"}.mce-i-visualchars:before{content:"\e02e"}.mce-i-visualblocks:before{content:"\e02e"}.mce-i-ltr:before{content:"\e02f"}.mce-i-rtl:before{content:"\e030"}.mce-i-copy:before{content:"\e031"}.mce-i-resize:before{content:"\e032"}.mce-i-browse:before{content:"\e034"}.mce-i-pastetext:before{content:"\e035"}.mce-i-rotateleft:before{content:"\eaa8"}.mce-i-rotateright:before{content:"\eaa9"}.mce-i-crop:before{content:"\ee78"}.mce-i-editimage:before{content:"\e915"}.mce-i-options:before{content:"\ec6a"}.mce-i-flipv:before{content:"\eaaa"}.mce-i-fliph:before{content:"\eaac"}.mce-i-zoomin:before{content:"\eb35"}.mce-i-zoomout:before{content:"\eb36"}.mce-i-sun:before{content:"\eccc"}.mce-i-moon:before{content:"\eccd"}.mce-i-arrowleft:before{content:"\edc0"}.mce-i-arrowright:before{content:"\e93c"}.mce-i-drop:before{content:"\e935"}.mce-i-contrast:before{content:"\ecd4"}.mce-i-sharpen:before{content:"\eba7"}.mce-i-resize2:before{content:"\edf9"}.mce-i-orientation:before{content:"\e601"}.mce-i-invert:before{content:"\e602"}.mce-i-gamma:before{content:"\e600"}.mce-i-remove:before{content:"\ed6a"}.mce-i-tablerowprops:before{content:"\e604"}.mce-i-tablecellprops:before{content:"\e605"}.mce-i-table2:before{content:"\e606"}.mce-i-tablemergecells:before{content:"\e607"}.mce-i-tableinsertcolbefore:before{content:"\e608"}.mce-i-tableinsertcolafter:before{content:"\e609"}.mce-i-tableinsertrowbefore:before{content:"\e60a"}.mce-i-tableinsertrowafter:before{content:"\e60b"}.mce-i-tablesplitcells:before{content:"\e60d"}.mce-i-tabledelete:before{content:"\e60e"}.mce-i-tableleftheader:before{content:"\e62a"}.mce-i-tabletopheader:before{content:"\e62b"}.mce-i-tabledeleterow:before{content:"\e800"}.mce-i-tabledeletecol:before{content:"\e801"}.mce-i-codesample:before{content:"\e603"}.mce-i-fill:before{content:"\e902"}.mce-i-borderwidth:before{content:"\e903"}.mce-i-line:before{content:"\e904"}.mce-i-count:before{content:"\e905"}.mce-i-translate:before{content:"\e907"}.mce-i-drag:before{content:"\e908"}.mce-i-home:before{content:"\e90b"}.mce-i-upload:before{content:"\e914"}.mce-i-bubble:before{content:"\e91c"}.mce-i-user:before{content:"\e91d"}.mce-i-lock:before{content:"\e926"}.mce-i-unlock:before{content:"\e927"}.mce-i-settings:before{content:"\e928"}.mce-i-remove2:before{content:"\e92a"}.mce-i-menu:before{content:"\e92d"}.mce-i-warning:before{content:"\e930"}.mce-i-question:before{content:"\e931"}.mce-i-pluscircle:before{content:"\e932"}.mce-i-info:before{content:"\e933"}.mce-i-notice:before{content:"\e934"}.mce-i-arrowup:before{content:"\e93b"}.mce-i-arrowdown:before{content:"\e93d"}.mce-i-arrowup2:before{content:"\e93f"}.mce-i-arrowdown2:before{content:"\e940"}.mce-i-menu2:before{content:"\e941"}.mce-i-newtab:before{content:"\e961"}.mce-i-a11y:before{content:"\e900"}.mce-i-plus:before{content:"\e93a"}.mce-i-insert:before{content:"\e93a"}.mce-i-minus:before{content:"\e939"}.mce-i-books:before{content:"\e911"}.mce-i-reload:before{content:"\e906"}.mce-i-toc:before{content:"\e901"}.mce-i-checkmark:before{content:"\e033"}.mce-i-format-painter:before{content:"\e909"}.mce-i-checkbox:before,.mce-i-selected:before{content:"\e033"}.mce-i-insert{font-size:14px}.mce-i-selected{visibility:hidden}i.mce-i-backcolor{text-shadow:none;background:#BBB}.mce-rtl .mce-filepicker input{direction:ltr}
                      tinymce/skins/wordpress/images/audio.png                                                            0000644                 00000000634 15212564050 0014452 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       ‰PNG

   IHDR   2   2    ;T×m   tRNS  v“Í8  UIDATHÇíÕ¿KÃ@ðûãˆÁ¦qéV¢›d°K¡ ¡nU‘*:±œ 8¸hí(ÄÐ€“%.EC•üù¼4wç={™üoü~óymá…òëç-¼™é?ý<8nÚ PÕyx^t6ÈçzÉêÛ£fÄé¢«è®SÅ¨	Ý¶ I×à«Q
¥I÷;‰Õê_é“Êæþà•2Ö#ÕÖy”7ËI¾œè~¹&«®âŸü’†´wùT‚dÞÇÑÕT$™)H`£¯˜ïš +;[‰@HìðG„œ'¸« >öîg6 ÄÅˆ1’F¹ÙcEˆ’Ln(+(JH]jB–Ÿâ¤-5)Ë‡2yY‘Xxy>‘Dƒ;Š¾XÏ°o|ÆR£È ˆ#AXâ_õâsœ˜9a<J>j×L×—âÂ¬Þ‘Ï“%Š0b¿§3'ú3žôï§%ÀÏ›w³°X1G>Ý    IEND®B`‚                                                                                                    tinymce/skins/wordpress/images/dashicon-edit.png                                                    0000644                 00000000560 15212564050 0016062 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       ‰PNG

   IHDR         EÓ/¦   ™PLTEwwwwwzww†w~žw‚¢wŠ²wŠ¹wŽ®wŽ²wŽ¹w’Á~’®‚wwŠ†w’žªšÉížwwž~z¢‚w¢’¦¦†w¦’ª¦ÉÍªšª®Žw®žª¹ÅÑ½’ŠÁ–wÉ²ŽÍíõÑ¢wÑíñÑíõÙåíÙíõÝ²ŠÝñõáõõéÁ’éõõñõõõÙ®õéÅõíÍõíÑõíÙõõÉõõáõõéõõõÚs:   ’IDAT(‘ÕÌÙÁ0EáÓšR³4¨©‰éO‘÷8W¢‘rß}û­µaÿ„Z#ñfþ‰¼‰%…ol m"ñDß& ºç ‰'šÒÝL[#˜¢TáìƒF0ESÏ>×-eæ²ÈJæð>ŽgYdƒñÚG4ú2‡' ñÀ7‡[ QÏ·7>VÃåþbm%VW/|}¿‹¬?‘    IEND®B`‚                                                                                                                                                tinymce/skins/wordpress/images/dashicon-no.png                                                      0000644                 00000000523 15212564050 0015550 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       ‰PNG

   IHDR         EÓ/¦   ‡PLTEwwwwwzww~wŽ¹zwwzŽ¹~ww~–Á~šÅ~žÅ~žÉ~žÍ‚¦ÕŽ²ÕŽ¹ášÅå¦Ññ²Žw¹Žw½¹ÍÁ–~Åš~Éž~Íž~Í®ŽÍ¹½Õ¦‚ÕÕéÝñõá¹ŽáõõåÅšåÕÕåõõéõõíõõñÑ¦ñõõõñÝõõáõõåõõéõõíõõñõõõåÈÿ   ‡IDAT(ÏÝ’K‚@DÅQ@ùÜÿ|a™” 7Y¼êNº*˜ÿ[„ã#§YÕ~ì´™¥{jü¸€§çb-‹-õ3 N.T€äiñZ¢‡Z¬2Ü¨Ä*ýmUìBÎ	`_œž€¥Èn_™sLÉÒG8¾…¯5>n¶ý&‚~"7za!Ê›    IEND®B`‚                                                                                                                                                                             tinymce/skins/wordpress/images/embedded.png                                                         0000644                 00000017761 15212564050 0015113 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       ‰PNG

   IHDR   |   \   ›l!º   PLTELiqªªªª   ÌÌÌ***  ûüý 		   ÿÿÿ	            y~}ùúûøùú H1&rl–ŸÀ‚–Ñ¦¯Ð|‰£-"­»è‡“¶ðõ÷–£ÄXgt ­×âîýðõùæìõÑßùö÷ùG8/

»ÆÇiwŽdsŽ§¯Á‰–²˜œ´âçî}‰«˜­éÁÊÒlnk©Äûéð÷ÁÎô_myÓÛÛ³¾Útšõøú]cmÃÈâRUK:PU¢ÓŸ¯¨`NDÝâè²ÇîtˆÅ.68N:4P_‚ýÿÿîñø‡”•³Á¼!µÂìaNBL^l²ÁáC4.¥àš¸p‚~js9MTÌÖænb]¡‹q*>?¡ª¿i{°`MFˆ¢ÁÉÝ‘›“¿áÿ¢¼íA3/&6DvˆÁÓÚ×ae\ŸÏÏÖåM?5;.'%).e}ÀTsÄH8/ax¶Xhn‚µ^x·hYP, ›¨¯J_ˆaOAÎÚû&)M^Ÿ7(%

ror|¤õ&3^eaY^L?ˆr[êåé'!,1$!M=4UD:þþþ@2,?0(D5.H926("<-&eREXG>7*'bOB]J>	gVI]LBS@6OA9ùùûlZMwdT•¾7#‹•¸H8-†²ðòø€k[‘ŸÊž§ÆŠt`t^LÜÛß¬°¿¯µÍíëêº½Ï‰™Ã‰®oz¢&ÆÈÓ·ÁÝ…n.D-âåòª¶Ø“|h‹wž¬ÒÎÔéÓÑÜóñêy†³æåäŽ¾¾ÂÁy‚§u•r€­ –eu¥³™}QTV’¤Õ”—©dm} ²Þ~”ÍHRo©ŽvµÍðBQ|“‡FKQgz²€ˆž„Œ;CA¤¦¶§¾êûøñÅ©Šn„½×áó7EgW_\³³«aC …§åÃÙøÒÓÎ¤ª¤òß¶(>tÉ¾°Oi¯×ÛÝz   •tRNS #
lÙ<…P¿4+}bGv¼™¦þ×½¾Y\þÞ×±»½¹Ø¾Õ»¾ÚÙÙ‹¾Ù²uË½¼ØÚÙþÙÙÖÙþÚèlÙÙÙƒÛ þþ·¿ÙÀ™¾<Øþ'üÝLÚ×ôµ{Õg‰Ó‘ÙþÙ’ü–À]×Eü¿þØ’¶Ø6¼ß ¶æÛþjÚÌ¥þL‡ÍõÚÓñÁØËïórÙþ’ÕÆ«évÁ?¯  IDAThÞ­šyœ\e™ï¿g©S§êTU×Ö[º“îÎJHH'„°%aU.h0C\Q?¸¡3¸0Ž"8—‹£~TÆ‹"®Ä‚Ê®" !1iÈÚI§»Ó{×¾œªSu–÷þQ¤;¨ãÌõüSçó9õ¾¿÷ÙŸ÷y‰¿ã£KÖ5­ìØ¬ý@xžMSèëµÿ—þ.¨š²éå¥µêb ê³¾(ªÀ ÎîpÓÝ~ëï¸¾°T]0ïä›ê
lWu]ÀU”bÖcÖßü¦Ñóœ‚TƒÏ·Wq'¿º‘Ò-2Öä·mÓ0O¬86ñ=1s¸ÿ?hió†YÛü¢én?^§\v¡_íT”²é“ñ&ÙvÖ:„DB¼éK»þàï¾JÁåX°xØj¨ÕY&@À’R²d%3“CìÐdiÓâxÿ@î¸¶ùñ?_]Žì¼oÓsdè‹#Á$à© ©€êê3ªøðçt°j§(Ÿÿþ±ä¾cÕêüÐUßýµ­$HBC	DXggH¦¹¨çe²>@,šÞÌG@G°r¼ÎÅ¾§CÛš$÷«ºõÿzë¿\fÒ÷à—Ó ÿÜyÒâÓ:g¬¾Új2Á•â’û´PÁçQÕÃ—5Ò')|Í±+ñ•iÚÖ¹{t ï·þVp_viígÃOud,’ #H¦=d×/ÐIdÜPJFzI•ÿYˆ#ã¿p¨U—~ä§Nýù±…+çÅ6^P?•ÿöÖè¶þÑôˆö73!ùžq¿ÏWq¨aèµP6.•…PË¢¤:ºÒ™Á0’¤g-½Ä_<+úÆmÏfwéµè¢•ó6l<ð…àS}ÛÛ'¶^·{ô+þ&¸X>QlöåòB–¦=9Zså„ÀWM†Î2$²$×_ôt¥3÷;·ÈíÚõž¥BRíö¿ùêÇ··—Ê[¯Û=zÈô{…!“¸éª‘ŒìÚ$Ë‰ZÁ_xa%œL¦'G;C0­ª–ž1ù¾’6<=ËoÛfðÁKæ-ÿúØ~Ï¸âþK„/ÜÖ?šÎÖÿ\tÀ˜BÉÎ+f›íP7 ©–´ÔŒ!Mù•p'€lÆ½JÀYÛ4ø1sø›šµ«'Ñ¡<ô€&×º.‰·¯Ùô´äW<¼=Dxbëu»GÓëvˆÙ|PÊ•˜µ››sá"(-]):)ý!Ó¯Äm+:€ã#Ú³0=xÄMX'<mÜY·n”‰ìoF|û.I‚:=@àž	]$S6í—»™7¾¯DøÓ[·ˆL¯Û1ãš´†4¥i­û…ƒ,;7ŒOeã©Í£ã­V†‚ágDŽ¯¡KƒþÄìÀ²ìVTFs,ƒ·0Ø{$Àâ©Á•íRªÉçp{{‰ðÄÖ+¶P3€ Z¨ÌÄ³®õ¿p[
úxÔ‡mŸÇëžÿ±bF
³¥göÑ¡Ù
çT¼ä´·ã HNà$kH:¿¨ïB'¸Ï¤%Ûüâ+¯HÉ‚ïŠ'Ÿd{û‚FÚ0ñ‘í[‘„­m}ñL¾vlgKÂ[ùÖ¾òg^Ý)ôTì¨×£ç[f³Ý4Øú•áÍ=êž $–~Kß·ÇçÍvÙV–ßŸd±Ï)w¼éEzu‚ŒQóùôÂözL¼8±}¾&Ž×P!ûeL[‰ÚÁ­¡?˜x…ýá92ÇâPÛÈøñxy©¸¥€»déÅ’HO Bš•„HC’¾oË\ýrróùZÃŸñO~?v’‚Ö'@N|³ €"r"!.º²*™Ö.WÍrmÐÕEC[ä“ñ©Få¼92þÅ1a;‹|-áH]i9ËóBhÚ)O³£nYí[ÓS2ÈÖê"Ïm·j5Ó=j¾@ÅFv§Ö³ ×õê`W
G§Â!Sóéö3OÈÜã0)£•	åÝ©Toûh¢õXÍB/ÄW‘¬CÙ}=•çú…t@Ñ•ueÀ^PP=ì’ÖR¡$q|å¦d“~ð×¾h¸Ù=bØs=œŒŠâ2ÐÚÇ×ø,7ôÜú‰º@Zt É2Sè«¹ÌºzÆÏlúvC“ž	.æ¡Rc£° !›N´zÒÔQ\»ip¨–‹é†(Ì•908trPÞR‡{áSø®ïÙr³GSÇa,B %ÒÀªŸ¼üê$=òÉF³;*®e©\‹kN³l®*Ùò¨?¾˜ÞÇJ®ò[/äfÛùÇq¿ôYv$:ÃY€ú’¯¹šP‚î=Šž˜"Ô‘ÍÖ54×5¿'ZÆdMqW¸¯„@¶‚5Í‘Š>Õ­"ÔÙ:šBº2¾úö[½9eï• ´ÀÄ"À Õpä°„¯xYž¹.Hó]wn\¸w³k¡J]ƒþ¸£8ù˜åQ÷!©c%‘×g+u”¨ÖÙ:êË6íœùçWõ­~6¡âðÕ&D ¥}'ç+&¤ €#o†¯&$˜:’WÝ§¹oýÐþ³çíùãµ Ô–©Ó­{¿R7M©®Ý<£Ë~¨Ym{Áç2õ·Ô‚¶­Fjà£<Kæ°c‹=úØ•¿¦ƒÉuÝK¤:©Õ5pA$×Ð~ü9Íö©½µíðuÎ¯FßÿÈ^7’,5²­e3œ%”¾qÓGÍí”_¸êì”²'Òéý`óšxžÛ´#–é¾øÙ+ûÚÕ©ŽŽqu*~0%À!éõÆ—üªÎÒ§ßªTÅíœÈ,«í¿ÅüÄÊjqÉEÒ—WÈ:¾›WÎ¹Œv–«ÍO“ðA€µÓ9¬ÉË‹ÔN!žp2Ò’Xl²ký±ó±rÏîö–1µƒUñÉÉÑTÊ&vUÒT:YJí.ÞË3^Çú£ÊŽ?Å‚åÌ®ljÝä¤¶(1ÿ…c‡Þš–›ÈÚ8—Üs.‰·Òâd”@¦	Š@Ði”çÖø›_ˆÈÑõã2Þ4é‹.…3,Ú™À†ŽàÉ)y™"ÅÈÚ'.™ÿ+uHÞ””Ì°&{MG–µ¤¤yï,r_y÷]­Å³õ’ùÇz";É<$+“DÐ"5Ðfd~Ò½×_ÈçØtV.2¬ßì ež¹“Eà>´À``ˆà²§pº‹GÀçáèÑ†zºpý¸È¦®*dëß¯öv|`ké*:¦•Ê¼Lpdå'Á+£•t½ióŽkrë;BËßùöZ+•T{;hšVÀƒ@¤íu<ñ¬{•ä©zGV?ñVf¾÷5¯r§þcyæ]ÿË·¡éƒ/Í½³Ìe3¡i4Ú
hõÓ)÷Á¢5½!õœ5W­Ù±£gêŽ<VÂô´áº`oŸ††ñõ¬½ø·Ýä¢?¿²ŸÉ?E› ÒVÑ;™Ó©,H¼¼C;}»¶ÝÝûú´ó3Ä¸‘#@'^ƒ=seþðÈ¥.H¼RXY.dé«_ðãLˆÉÈk Û’R=™âë~;–ËGk“kŸ7›k«û"–n­œ #~xË7»žŽË{ž²ë{_Y”ºöÅÅZªˆ7ïº«#2­ÏºÁŸ¤|ûœNFbšÇÞáÏn>¿{ÑPžõí¡­Zs5hï	š´qôâÉÚŠþbq7EnîË¸š“om\ 3]’ÙÌñáÖˆ÷‹Ak‹‡eîà·»N¦i
×îuQÇïx©¯ÆàþW©šŸCJvýž¹ëçî—AÀ‚=Gž»·X|Ž‰A6=Ô3¿YFNÓuÊzol¼~]ß×Ž%È&~sNn-¤¹Cû¡¥¾ê*³Àx4©D\22°wxx„ÿ­;×¥ñ,;\:ƒ÷üàG·½‹‹÷¹t)ô¤ã‘ÕÕF€r³3ú‡7ÂbÀÞqì,ždëÏøårvú\«Ó’ªõsï'„}’íÎÁàÆC‰Üp×ú°¦rtñ²¾«qiþQöp¨Ç÷Àé{–"KÛŽ_©ß Kß¹à²n-¾x¾pX´NÁ	‚œ;ïÕÞáe`ô¦Þ7¶øó ­7«îýÑk<\ò:9ù¤â@¢3Ùý|:6â*¸6)\Ž¾T¼¥èÖ´<³…ý,Ë?Ì²%éAÏ"+®Òª‘—à¨ãÿ–{×;è}Ãb.¿Þms?ßÜaÛ™v¬ô¡›2·M¿Fá*¬ðgnŽDhYÿ¶hî…KW’Fy°)ò5$Ô‡—GŠmÞµhê·ŸW2ÿ4²tƒ^à‡?øÜÒè>úÄØ¹ï(öùúžèH<úº‹çíH^
Ø£·ÃX‚ÖÓ)Ï=¢üªÖ¼`c*sÓçM $ Bm1ðmT‰É=þ5ÐölûïÛùžýú^Öy=çÊj:žG¶ÏýPó'Ò­FçÞŽe‹?R9pGx:³òN>yhb‘ÉíÒg~2™Nð±)u¸…¥>¯â;CJ’Škêš™W+vðº1ÇXpÆ¼EÁQºù-ò–l˜—Áõh•£^TG#ÄÁ­ŽM‚ÿ¡×æwãúRo=Ë¬‚Mrº^ƒÈi¦†©z8ýÇâd¤¥+˜›¾ 6<Ás}&6–Xl¢ˆ
71ýŒëô?w?;RÆÌ1V¼tNOã$"e£SN4µ¯òÐÔƒ?RµÖ©•pÇ(-œoáK(nt®ÌoYÐ]I¶=smÇÈ|b%Ôgn\u”Çn`É;~ý§av —|®”Úþ—š¾-C|}(>z[’­i2Àç¯^õøÞÅ7Œ,Ntp dNAd8DŸ
ú[êäç€Çî¬ÎŸŸ‰,}º=c<:f4ÿ~½,@¡ç(lò>Ì‰úÏÇXÄññçl¾÷Nv–W©Î‘=ÏÕ¶Œ¢P?ûûž^m×ãèøÙï§—tÜJâ|"ƒ°iÓ(¿>=*%c…ú
{ÕŠ3‹Œ»ûh}gI-Ž1¦ ÎØ‡ÏõÑ£m s.—XŸNÀ‚–%cI)MRÜ~64àÇEë{…÷|c“¢ßþ–	ÇJôDOtrÎÀÍq×œK9'÷\Ùíö_´óÉùÃ]M„ŽtÔzïE!GÚÅÏý#ç¯‘Ï~™žî<3ÜÝÚ•Ó×Œçáµ’6¾´«–ýtyâ@ïS±ó;ò=ÉëŽqç"ýÙÀÔ7z™'T'õµÅÄmBR¸\!óÇÂâzy¬Þ—ÍÀQÐhÇ¥ã¦	¼‰¾Hf²‰7?ºÿÝÙeMáù$åÃI mJ‘úð÷ýÍïôúÚùÊE«ß’	[Õ0ú4U¬öÚtn.¸’3‚P<&ügbüœõ©rÿÒ68î¢ˆÃ¦×RPßÀƒKC„©Ú<aûÈýžjaúàX]Fšd‘@	Ë÷DYº­¿æñë²Î‘D4‚2/£}ç˜S´sÀ7vS¦I}£MI~Ò4†Äô|%ºR(Ý{›æ3xå
ÀaàüÈximo¦{“ÜSÞâ­>°nó¸L½ì¥Íx6riòÂ7M®¿æ‘jš–%J$¾P=ÒöR5/ÐÒÉô²ÎÐO£œeea?FPª]k7•Wù0è¶°qß¼Ð@ÇÞm¬fïÇ@u>|FdÏäÞiß…;Þë«õ¬Ý»¾rÜi¯¦äž:öüØ*Å œû¶÷nöÊÚòömÿ·¥ÿ[ú½;<¨â´¥çÂÇ9Ç½öÂáèôqtz©a¶„èµ[ØUÈ}Óm“ Œ™O,ZcŠI{ß¼ÁãEŽØCkÅ"ZüŠ§%}}fŸ[ïÌ7ß³·ïæ}Š;ø Ñmf¾ó¨v‹úú?LÐr0C±ÛjÜQæ(Üý´—@%»“þzkì¼=Cƒm—+—Ô'Ox"öp“˜_ÆÇ½ÙÅM}˜ûã>W®§#±reXúoZMà•ÐâÊ-7¼ëã¹µ®zxÉ¬}ÁhN·sÂýr‹;¦Õ]ß–Ëv³V)+r¥>¸hÿˆ_è¸Ÿ¶¸K›1²ð7öÒó°ÿºvÉ¡ =˜7§ÌùÑ8’÷_óé%S«½’îÿô7Y’un_A$n{UYRMd§g×N·ŸeøK#Þˆò»rKè'…ûÆlwVdöre“±;¡MÃ®ôv­+¥‹šÎ.ßrðáœ)-3Ë™Fæ.Rw%RÝ{?Ùþ…ê¿åÊªç;†{¬’¥Ët™*Spù\ð;W§Ý6—ôÞ··=·¥›n4]™Ja”¯£ÒÕs°ÜCLZó2¾ïzËµêyw®¨½ºh¤‚ÐvôpÞ¼íËœÉ¼`ôëW$Ë–-¬ïÓðü3„kÚ,ðÃý#Š¯mR‰ø´®G{žÙC¨qçE3A}/`š!£Ýøãà2mÚn-?-¥Î(áuŸB„¼“LF EK÷¤-~ÚmKÞºhàwÔ?½ÄƒpœBƒÚ%@@ÓN‚¿>Žk++×U"Ñó_ß99r<ø;Ú§gþP†u?¹ú1²](»Ÿ©$.|ñµ®•û€¨œž)ÜæUª½ÿð»kæ9× 9{¾i|ú.Y§´œx™ò®n=ƒ<›í±«ßþ~}õ>³4µ´;X¬<ÏôJšù¸bõÌK³IÌ®“GégêÚ;öä‘OZ/7úKg7õÝ&+º>t÷íˆ·h–ªr–@æÄÅ¦&Ïº±äˆ·D.^xÆÐGZzj
¡ý‹Z^ZÁé1Ÿ_˜kCYÁú}ZK¹ŽtxÙp,¨ÿøÕ›çt%´º›O¤·÷í¿õÉI­ï¢,5dƒôÂRÜ%Q,7ŠÐlIöf(èwn:—KÖ{~ò»›~}Ç¦wWöv_ôŽñ.:	ÍBY K¥žAORµó”-NR:àOa"^C<T‰O}èCÿNŠê®h{*ñ¶{[õeqJIH£“û{I¸¶,Y’¬ ¹„.ýñ+Ïÿòéþ•¶C“S;ž¯¬ÿH[—tA_y¯ú–c«l“®ïLV™ðOçóBÈ8“gï
XÙÂ9#á/^æUÇ’$?ÁJôpP±—{Ïß¹ÕóVG/(Þ÷†å­Ëë¥TÄé¶ë…Ï_+[¥ú§6šÊ/+’¬ j[uµ
Gn®é‘/¸€^û1Hõè'º,ÓXÏ«»V?7mäˆä”ÁÜ²âºÎ÷rÃíatJaJ¬„‡×Gû£7ÞôÓX\zÛ3óÊÑ"GkñF?{Úbþçø¤&·¤« $„W	º
¸–%!tíÜçŸ‡paÛS7®¾Ìöè[vPŠå|¶I=¦ºÇ:7niÄ¨®R²«Q\ŠçW˜ºã³ã}CõêõmU9tlÕA§E¿c71éÀªCž©4ÙIGrãŸû\:PÇ ¬†oS÷¶BÈóÝ”¤)ï©¾FÜ²PÂxeØQzÏÞ=oBßî¿ãJN*©Fb¨+úKC©¹—4ù]ùóKòµOV2ó½÷¾ôä€oUòûØüÍ–…v£¸ME²tè’^0½ð‰"Us¾·K+ô¯®7sÅ£&ÊWUwÝº{g¦â‹´O”Ã~éV¥TÉó³©–úÊAÂY¾”%Í¼^ø—}7y?ÎKŒ±5ôhî»aYv¿W )`Éœý^à…‰#5É¶ïT ÷[ÃhU­Zÿ¦ /n•¤‚áPoiñsJ|ÌtØð¶›‹z[ò%×q½%¾û¶Æ‹-Åu#‡!ÃÖ¦'Ã‡ \wñP¤›?XÓÜ‚&¬p9Ùºjýœ¾¿û­a)jB¥™– ¤[”šò¥7w™ð¤d£¨‚-Zª·n…›tK?Ô­JÚC¨¾ 'Ú9šL¦Ñ§Ž)®Ç2žßŠ£hxÚûÍÍéR .¢Š¨„"±ð5 ¤øÏºå F*X¹Kué[¥æ<à[µÍ“©	W˜B$ËÔ ágB)…¦‚8•/ ­8 XÉŒ¦šlµeÜgée¿˜þ×æŒVÐT@SAo¼äìS•¶¥J ë/”„ôHÉW4v•,¹©·ÜP å¾±«ù².ÉÕÊ*8¦J-bÉªER •dõˆä“j’žpÒ¢ »[ùJ8O^ â…¥üÌ¼ƒË¡ág%¥-¼U’â(¸¸Ž‚"jŸÉ´K£¤"?'Ê 	¤bƒü¢Œ	FQõå±=É/—QUÀÅWŠÈÉ¬„«|Ö•4]¨S$|”ãhÕãsPRÚÂoHBH=p{Sú¤+ :Ñ(wEýjå®Ïä/8?‚ä¸tLµKuj@=œ(3MûHq^Qµlí‹%ƒPÉ¯¢[áªRÁn6Ý
Ê §”ÄˆYï6m[‘=)]ã˜zÚ¨m“38=­e 1V ?µ±ŽŒHf‘Ì&@2ãÕ²ñ+ò72PV5Sª'ëfÄ®BEÂ%Æ¡A§
îÿGÁˆYÍ×4L]lÃ“ !ÂLú+ä\ðdVH	ÃÊñ‘PY1*!M6pPq§%¿­ËwæýÁŠ«n^$MFª5Ù¨(> A*Æ© 
T%Úü† ÈcÈ€„ûâDû /g®u c*hî¢Œâ“JJYx
jM†ãåý@E”ƒ–â”üž¤¬•£ 5ø Ô‰æ5êD1AœhèiÔ	 *mVsû††q		„'{2Å ²ä*Šlp¿"’cþ‘‡ô• TpªA×ªHšð$4pÊi9`¥ê>¨@Ø­§®5NB’ÒF¸K4 S x²„°+‘ƒT¨ýgJÏU Ø(;	·tmÙ-é. Ù2†‰1S‡h£E!$*Ô‰R©CLGu¨£©4”#$k´añÖƒl4LCÅUÜÒó)ô1á
R
 p©KAÛÕrºðžI’ÁSÉ’1N¥‹Ñí—'l A*'/N]k¤bÎÉv«¨Ž
ß B¤M-JÕçÚÂ£.ðº H`É€a3ghp"ßøR=Ð`¼uðUNŒ½5ø0kVªYc?*%‚F^«ú¤¼äÃ«7(X {3S(Ö©¼ÖÀ<%‘ÚP_C9ufX4›!ö	bG«úJ>êÌ÷fø,	dŠÔè›Ê'LkF&e šAšN¶©§Má>®TÁ‡”'dzº{
üDÙ{fèåÔ5®®ÉH§ÍˆÈ3§0ã¤n4zs@c
Ÿí³gÞ}FI‡‰$©1»ŽÌ\t\d¨£²tbzàôš±aÎâÈ_{B`â5rñ_»ý=êà—á*³o¯mÐýåg·QŸÓcQÄkFŽÀòŒwC ¹ò‰É2¤“[X:mI‹"‰Ù£*:àÊ§ËÅEPfþÔP?O€‚'{(ÿÕ¥p‘OiT#QóêvÑóêÉx³ª8èîÎ|WÞ‰½OÔöN´P\ž,‹™7ë5lW\Iœ&¨×œOqÿÂlXUe2â¯+Ãk0•Í§ <æHDáÏ`Ë¯=¤<gõŸ#â/œk6€2{¥¢(AF§+ö‰eùÏü?ŽðÓq“†É¬    IEND®B`‚               tinymce/skins/wordpress/images/gallery-2x.png                                                       0000644                 00000000677 15212564050 0015346 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       ‰PNG

   IHDR   P   P   |?ïž   0PLTEˆˆˆÿÿÿˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆóÁÒ   tRNS  "3Dfwˆ™ª»ÌÝîì¥W  /IDATHÇí×±MÃ@à'ÀD(, £¡ °l@6ˆÄ‘`€Œp#„x€Ptè’Ÿâðù¸{Ï]lÄ_ÚŸdÝûuö™ÊŽ¡­ÂƒlìƒW²dÐHÐ21„eI‰ôžUîá ;ŽàN¸ÓÄ2‚ç ðš„6‚3 X%!"X€kP±ÈB©Ýà!ÐíÑsòÅh`¸ŸÏH‚|àS	ò
ë<tlÒûÈClîZ8’ >Zx+Âu1!º¬ÖODô&Ã¿ˆ	á;M}9
\íùboŽøuäáóµÝ½‡Ÿ3Âüì…k7µãüÃ¿
ó/û¾À|ä,ƒÚ)@íÈ Ð~Þxú¥i
j¨5à®ÔøxÛ¿ ÝòBL£™kïj    IEND®B`‚                                                                 tinymce/skins/wordpress/images/gallery.png                                                          0000644                 00000000573 15212564050 0015012 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       ‰PNG

   IHDR   (   (   » H_   WPLTEˆˆˆÿÿÿˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆã~   tRNS  DMZw€‰•¢¦ª³ÄÑÙÝÞâæêó÷ûVQ¶ö   ·IDAT8OåÔË‚0…á‘‹U¬à©ÕóþÏ)-‹a¦¤,ýdB¾¤Mi·2Š±*6£Èç¡àz@É©Û
3m­Î~¡Ë¨ÔnÐKf­ìˆŽÏ ‚‡'÷áÑ{Œpø²ËÜxhÏM)ð¸~áE„PT6öÕ”T¼eXçw7·ù2|T ª#í ».çý\jäK±'e‚±Gj‚áÅ¹•R!_
”w ¼»‡ëZ?Q€_á'$ß     IEND®B`‚                                                                                                                                     tinymce/skins/wordpress/images/more-2x.png                                                          0000644                 00000001133 15212564050 0014635 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       ‰PNG

   IHDR  Ø   (   <êÁ   $PLTELiqÎÎÎÆÆÆÌÌÌÃÃÃÆÆÆÐÐÐ»»»¼¼¼¾¾¾ÁÁÁÀÀÀ&µTú   tRNS Y¿óÌLp‰Ä  ßIDATxÚíÝ1j"aÆá|±³Ürnárù„å¬¬Ö#ØzŒ=Þ3£K²Õ:ÏÓäURaø¡g                   VÔêš$/Õ§G5Î?§'ªªÊ« Åv®kOòZ5Õ¶-ClàñØ’d_}Ik-±-±€5b{|O’Ëïžl«Ïou[OZIí¼D ð`lU’Ôžì+IÎ‡)¶©“ØÀ
±ÏC²9¶ž\¦“¤ÞçØ^Ä V‰íÛ)ÙöÖ“ó˜$Ûšc{[ X%¶mLÚØz²|h7Œ|[øNê¯3¿tÏõçØöï$m|=$ûë=¶›9¶­vÓoŸïP¶mûã±,¶¶ýÔ±Ý¼'—]ëI·Ø.‘[Û[±µíÇc›J*ÞÙVUbkÛb+¶¶½Nl/ÃË1þg{»\ãî)eÛ¶ÿ[àYµ1ûÓkÏ§³‘·õ9¶ ÀÅ¶mÌçïÙÖIl`Øn¾óùÇÉý
RûƒØÀ:±ÝÔ|‹ùÚÈ§å‘ØÀ:±M-h¼ßõçvmdg` À
±½,·¸ßÏ¶gúYl`ØîÇ9¯ióäZO²­Al                   €oç®ˆ5…ÅÚy˜    IEND®B`‚                                                                                                                                                                                                                                                                                                                                                                                                                                     tinymce/skins/wordpress/images/more.png                                                             0000644                 00000000636 15212564050 0014315 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       ‰PNG

   IHDR  l      vò=Ð   <PLTELiq»ÉßßÉ»»ÁÒÿêÎ»»»ÒÁ»ÿÞÈÈÞÿÎêÿ»»ÉÁÒîÁ»»É»»»»ÁîÒÁÁÉÉ»ÉÒÉÉ»É»Á³Ùå2   
tRNS ÿÿÿ?ÿÿ³³?ÑI¼ÿ  IDATxÚíÛËnÂ0Ð‰ÍMB ÿÿ×.¨T•.i+çl<[[ŠF¶ã         à¿µ&É©z’©ªjN2VÕqk¶J pUÙö$9TON5'S­É8$m9 Àueû²ÍÉ´¼õä0$_%{:î•- üBÙmHÚÐzvÛš$ÓgÉŽÝÎîIUUÕÓä'›®|Çù\¶Ó’¼ï[Ïn›“dª9cU9ßÙ.Ïú)Ë‘Ÿi¶ÊV–o¸ls˜§ž;Û¶ärgkÝde{_5pƒÇÈi¯ãšvyg»ÛVÇÈ ð;e;ÕqŸæod ø³²Í¡'íû;Û!Ùmƒw¶           ðà> ó(ãˆäNO    IEND®B`‚                                                                                                  tinymce/skins/wordpress/images/pagebreak-2x.png                                                     0000644                 00000001503 15212564050 0015615 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       ‰PNG

   IHDR  Ø   (   <êÁ   !PLTE   ÐÐÐÎÎÎÍÍÍÉÉÉÈÈÈÄÄÄ»»»¼¼¼¾¾¾ÁÁÁ*|   tRNS Ys³¿ós:È*  ÊIDATxÚíÝ1ŽêHÐ+!aÈØK˜”]Ú£A9"c	NYêUünø_Á9ÒkY<èÀ’uUår9                  à?ªjìGæÞ¹·ªÎIRUµû¥×þS’MœO x¶uI’}ÏÊ¡ªêô#lkîa[Ïa»ªÓ=l—Éé€7a;'ÉÒ2w]=H¿‡mízØ>÷¶mÄ;LÉÚÀ ^†í”ì+Iê¯©pÇdué£ÕÇ—6uIj—Ôé©7üÓ¦•§d?;› ð&lWuHÖçíœ´,½wž¯=l‡óSïxYným` ¼ÛÔ!ÙœV•d]·7a»ô°Ý>‡íõ°Ûîë« €×a;Œ©]²©¼ÙÞZØnžÃ¶Úá0õeÉ À«°]×.9^²ÜÚ$ñË°ÝÖ®O#ÏÞúœíœd˜6¶ð‘ª”RÿgÝsôXI®‡ìÇ¥½SU}Nùëi ¶@jzô6§¬*Éð÷2»¶•úÄëÜIPêÂöž£Épjµ®:ÿÛ–£í³¯Þ0ö9è¾Ù…°UJØ*¥^‡í¡-{Úž¶ÕÃöô4ê].­†š÷l[¥„­Rê{ØÞžòt˜ïaûë=ÛUOÛ5N_¹Ú7¹8ç8[¥>ô:>a5r’}µ!n[è´ý¶ÙOIí²Œ_­êkkÇ©-  Þ†íRm“ä¶éâ«°NIíÚråÞÛVÕ}ìÙ ømØÖ-Éql‹_†í±lWu¸÷†9Éºl× ÛU»{êï#Ø¾»g»K–ñÞÛOIR‡þ ® Àû°m·j7•lîSÃßßús{Ú¹õ®c’\Ç¾•yd x¶Ã)é[I-oÂöœ¶«:|õÚXö8õ›ºg§ Þ†í±¥jÝÒÒ6?Ã6=l³œzoÝž+æö_ï0                     øDÿ9ª’¼	H­ö    IEND®B`‚                                                                                                                                                                                             tinymce/skins/wordpress/images/pagebreak.png                                                        0000644                 00000002164 15212564050 0015272 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       ‰PNG

   IHDR  l      vò=Ð  zPLTELiqÀÀÀ¹¹¹¸¸¸ººº¹¹¹¼¼¼ººº¿¿¿»»»¸¸¸¾¾¾ÒÒÒ¹¹¹ÿÿÿ¿¿¿ÌÌÌ¾¾¾½½½½½½¿¿¿ÊÊÊ¾¾¾ÀÀÀ¹¹¹¹¹¹ÝÝÝ»»»ÚÚÚ¶¶¶¾¾¾¼¼¼ÈÈÈ¸¸¸ººº½½½ÄÄÄ¿¿¿½½½¸¸¸···ÂÂÂ¾¾¾ÀÀÀºººÄÄÄÏÏÏ¸¸¸¹¹¹»»»ÁÁÁÍÍÍ»»»ÁÁÁÁÁÁÀÀÀ¾¾¾¹¹¹¾¾¾½½½¾¾¾ÈÈÈ¹¹¹ÀÀÀ¾¾¾´´´¿¿¿ÃÃÃÒÒÒººº¼¼¼¼¼¼ÁÁÁ»»»»»»¼¼¼ÀÀÀ»»»ÏÏÏººº¼¼¼»»»¿¿¿ÀÀÀºººÄÄÄ¸¸¸ÀÀÀÃÃÃÃÃÃ¾¾¾½½½ÁÁÁ¼¼¼¼¼¼ÃÃÃ¾¾¾ÅÅÅÁÁÁÆÆÆºººååå¿¿¿¾¾¾½½½ÄÄÄÿÿÿ»»»ÌÌÌººº¸¸¸ÀÀÀ¹¹¹ÂÂÂ¾¾¾ÁÁÁ½½½ÃÃÃ¼¼¼ÈÈÈååå»»»ººº¼¼¼½½½¾¾¾Ø©tS   ytRNS ¬v?|Ø±‡{ž"Ç„#²”ïX"?‡‡ˆ-.üw3w¿SHŒ~9;~sÊ0È7ïWÏ¢kJ§…»›ïKŒ¼º7¼DÍ.£ÍˆÝE„ 4×nq›Ì(«<€¦Ät~‚_ä,6${aâÃJÉAÈ6Ô3Y–S/+ëb
ê‹µ%  0IDATxÚíÛés“UÇñ¯iÚ›4t§ŠÝ¤¥à¾¡‚"›¢ì›+‚û¸‚Šâ9Iÿw^<I§ô¥4/¾Ÿ™3óL~wžgæÎ™¹7H’$I’$I’$I’$I’$ýš1ñ;Àœà•‰ˆöóUÍÍEñ%ù6ÙRžh¾¼þê‹öS’¤-ÊØèø?m€˜›x#'Ji½el´”zoQù-ÿ‚ÜWjqd ûa.'Ò€³í×l§$I¶ø7ïÃÔÆOm`ožHÛrÔb ëÜœûªZ°œ‹vS’¤m†íßù+Ü'Ö¡Äfòƒ÷r½;lÛýloRn¥ñi.ÛLiEX–µ“UÍÑ±ÑZ§ä4­(+ðÙHiBÉˆ|¢Z”ùÕ1r~ÔÏj3,ä4”«Ñžto[Öîs›`YÃ0l3ò—ïáR¬–µ„‘¸žÕ½ìÈã½‰\Zy"#?¡ŸÅZYq(ñAçœÃÖ²†tŸKÚécäîðÑŒˆü‚©¼<[ïlÿ¼ù#¿ß¿Ïý:#"7 \ãL¶›’$msg,ä1àóˆWºÃö¿w¶?wf!w±‡6³Ö7À·9MiÀ›íyÛ)IÒ¶Ãv|`*'YŒŒÈ¨îe»ßÙ–ŒÈø®úƒÔÁ|©—å‡ Ùê-/¿`;%IÚª¾€Ï °ç"p¾”'z)½ïlë¥ú‰ãïÍçºÙ©= ¼sºzË³Oï·Ÿ’$I’$I’$I’$I’$é‘x >î»‘€‡d    IEND®B`‚                                                                                                                                                                                                                                                                                                                                                                                                            tinymce/skins/wordpress/images/playlist-audio.png                                                   0000644                 00000000670 15212564050 0016311 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       ‰PNG

   IHDR   (   (   Œþ¸m  IDATxÚbüÿÿ?Ã`ŒÈdddŽBqT2Ž:pÔC%“Œ:pØ;p4:p´uàh9H¥ÄN È±ë±”}ˆÃèí@N Öb}¨#`X[à1J7Äa$E”`â@|ˆÿªÅM4r`%ú‘ÝÄ„#Š(Á ÀAdrøÄ—€x;.,tÎ ï€ø8Ÿ„âÏ@lÄžáÀ@¼ÉQ·IÍ„´v ¨ØÈ Ä YåY€‰aƒAï@–²—ˆ«€Øê†G¤8œ4%Äù@l-6¸ð¨U}{€ØILoË­&!ˆñµÂa,êK)­IH=@¬L‚zzg*¦ÍÏÄ8˜Æ 2`Çcá?,b{ð¨ßEL$Õ;ñ¨íÄ‘INaQû–T(mn¡# þŠEÝCh»W1ÓmÉÜ ây@,5Ð¨à@h“=ß€ø=/b)Jú$0<´:Mƒ  —’“´-R°ü    IEND®B`‚                                                                        tinymce/skins/wordpress/images/playlist-video.png                                                   0000644                 00000000442 15212564050 0016313 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       ‰PNG

   IHDR   (   (   » H_   EPLTE   ÿÿÿ                                                               Ô#W¶   tRNS  	"#HJLMNQ€²³ÜÝãæçèöA¤÷Ê   vIDAT8ËíÓ¹€ ÐÁû>PüÿOµPÑÂ©_²™e !œ9àv›o@ºÌ‹ðßcØ=µ4ËÈÜ[miò†gâÁj"!’NQe d	=ßË‘‚iÏ•iÕZOý2á¯çÁá6«éæÂûsQÙÈÑA9Cd    IEND®B`‚                                                                                                                                                                                                                              tinymce/skins/wordpress/images/script.svg                                                           0000644                 00000001642 15212564050 0014670 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path fill="#D5D5D5" d="M0 0h20v20H0z"/><path fill="#101517" d="m8.43 18.18-5.05-2.45v-.84l5.05-2.42v1.1l-3.9 1.74 3.9 1.77v1.1zM16.38 15.73l-5.05 2.45v-1.1l3.9-1.77-3.9-1.74v-1.1l5.05 2.42v.84zM4.7 8.1h.94c.08.48.37.72.85.72s.82-.1 1.01-.31c.2-.2.3-.78.3-1.73V1.81h1.07v4.93c0 1.07-.18 1.85-.52 2.33-.35.47-.97.71-1.85.71-.52 0-.94-.15-1.26-.45-.33-.3-.51-.72-.54-1.23zM10.73 9.31l.39-.98c.2.14.45.27.75.36.3.1.57.15.8.15.42 0 .76-.11 1.01-.34s.38-.52.38-.88c0-.26-.07-.5-.2-.73-.15-.23-.5-.48-1.07-.75l-.64-.3a2.53 2.53 0 0 1-1.12-.88 2.31 2.31 0 0 1-.32-1.25c0-.58.2-1.07.62-1.46s.95-.58 1.6-.58c.87 0 1.48.15 1.82.43l-.32.93c-.14-.1-.36-.2-.66-.3s-.56-.14-.81-.14c-.37 0-.65.1-.86.3-.21.22-.32.48-.32.8a1.25 1.25 0 0 0 .43.96c.13.12.4.28.82.48l.65.3c.54.26.91.56 1.13.91.22.36.32.8.32 1.35 0 .59-.23 1.1-.7 1.5a2.8 2.8 0 0 1-1.91.62c-.7 0-1.3-.17-1.8-.5z"/></svg>                                                                                              tinymce/skins/wordpress/images/style.svg                                                            0000644                 00000002754 15212564050 0014531 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path fill="#D5D5D5" d="M0 0h20v20H0z"/><path fill="#101517" d="m8.43 18.18-5.05-2.45v-.84l5.05-2.42v1.1l-3.9 1.74 3.9 1.77v1.1zM16.38 15.73l-5.05 2.45v-1.1l3.9-1.77-3.9-1.74v-1.1l5.05 2.42v.84zM7.25 2.1 6.89 3c-.35-.25-.89-.37-1.63-.37-.69 0-1.24.3-1.66.89-.41.6-.62 1.36-.62 2.3 0 .9.21 1.62.64 2.18a2 2 0 0 0 1.66.83c.73 0 1.3-.26 1.7-.78l.59.82c-.62.62-1.43.93-2.4.93-1.03 0-1.84-.37-2.43-1.11s-.9-1.72-.9-2.93c0-1.18.32-2.15.95-2.93s1.45-1.17 2.45-1.17c.85 0 1.52.14 2 .43zM8.45 9.31l.4-.98c.2.14.44.27.74.36.3.1.57.15.8.15.42 0 .76-.11 1.01-.34s.38-.52.38-.88c0-.26-.07-.5-.2-.73-.15-.23-.5-.48-1.07-.75l-.64-.3a2.53 2.53 0 0 1-1.12-.89 2.31 2.31 0 0 1-.32-1.24c0-.59.2-1.07.62-1.46s.95-.58 1.6-.58c.87 0 1.48.14 1.82.42l-.32.94c-.14-.1-.36-.2-.65-.3s-.57-.15-.82-.15A1.08 1.08 0 0 0 9.5 3.7a1.25 1.25 0 0 0 .43.96c.13.12.41.27.82.47l.65.31c.54.25.91.56 1.13.91.22.35.33.8.33 1.35 0 .59-.24 1.09-.72 1.5a2.8 2.8 0 0 1-1.9.62c-.7 0-1.3-.17-1.79-.5zM13.74 9.31l.4-.98c.2.14.44.27.74.36.3.1.57.15.8.15.43 0 .76-.11 1.02-.34s.38-.52.38-.88c0-.26-.07-.5-.21-.73-.15-.23-.5-.48-1.07-.75l-.63-.3a2.53 2.53 0 0 1-1.13-.88 2.31 2.31 0 0 1-.32-1.25c0-.58.2-1.07.62-1.46s.95-.58 1.6-.58c.88 0 1.48.15 1.82.43l-.32.93c-.14-.1-.36-.2-.65-.3s-.57-.15-.82-.15c-.36 0-.65.1-.86.32-.21.2-.32.47-.32.8a1.25 1.25 0 0 0 .43.96c.14.11.41.27.83.47l.64.3c.54.26.91.56 1.13.91.22.35.33.8.33 1.35 0 .59-.24 1.09-.72 1.5a2.8 2.8 0 0 1-1.9.62c-.7 0-1.3-.17-1.79-.5z"/></svg>                    tinymce/skins/wordpress/images/video.png                                                            0000644                 00000000553 15212564050 0014457 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       ‰PNG

   IHDR   2   2    ;T×m   tRNS  v“Í8  $IDATHÇÝÖ»ŠÂ@`n"H¬D‹…I/[	éÛŠí<@úôV‹x­lvAÎì‰‰3Ê9ƒ7ðodøò’[¥òf1*bE™£¨	fj£
Û²“Ž¦üLG]ÊU)Ù²ÊIt­„8<ûó$0JÇ Öõl=²É’ýÉ@{8BØ´pt·Ð×HÆÇìvß@ºTýX\#Ô¶.j[6!·ez[ÿ1*·’aLdh‘	uíNîM¾g"Ehœ‰ðg"¬")qH©ˆGÎŠ˜¤XÄ&§">ÞØ•Ú±ÅS®?ÿXÁ%…
&)V°Èy‡”*hbUä[?ãÞg’>õ¢ì¿èûpò÷‹ÑyV˜%f‘gŽ™å™N×oö‘ôùõðÖ.    IEND®B`‚                                                                                                                                                     tinymce/skins/wordpress/wp-content.css                                                              0000644                 00000021070 15212564050 0014203 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /* Additional default styles for the editor */

html {
	cursor: text;
}

html.ios {
	width: 100px;
	min-width: 100%;
}

body {
	font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
	font-size: 16px;
	line-height: 1.5;
	color: #333;
	margin: 9px 10px;
	max-width: 100%;
	-webkit-font-smoothing: antialiased !important;
	overflow-wrap: break-word;
	word-wrap: break-word; /* Old syntax */
}

body.rtl {
	font-family: Tahoma, "Times New Roman", "Bitstream Charter", Times, serif;
}

body.locale-he-il,
body.locale-vi {
	font-family: Arial, "Times New Roman", "Bitstream Charter", Times, serif;
}

body.wp-autoresize {
	overflow: visible !important;
	/* The padding ensures margins of the children are contained in the body. */
	padding-top: 1px !important;
	padding-bottom: 1px !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* When font-weight is different than the default browser style,
Chrome and Safari replace <strong> and <b> with spans with inline styles on pasting?! */
body.webkit strong,
body.webkit b {
	font-weight: bold !important;
}

pre {
	font-family: Consolas, Monaco, monospace;
}

td,
th {
	font-family: inherit;
	font-size: inherit;
}

/* For emoji replacement images */
img.emoji {
	display: inline !important;
	border: none !important;
	height: 1em !important;
	width: 1em !important;
	margin: 0 .07em !important;
	vertical-align: -0.1em !important;
	background: none !important;
	padding: 0 !important;
	-webkit-box-shadow: none !important;
	box-shadow: none !important;
}

.mceIEcenter {
	text-align: center;
}

img {
	height: auto;
	max-width: 100%;
}

.wp-caption {
	margin: 0; /* browser reset */
	max-width: 100%;
}

/* iOS does not obey max-width if width is set. */
.ios .wp-caption {
	width: auto !important;
}

dl.wp-caption dt.wp-caption-dt img {
	display: inline-block;
	margin-bottom: -1ex;
}

div.mceTemp {
	-ms-user-select: element;
}

dl.wp-caption,
dl.wp-caption * {
	-webkit-user-drag: none;
}

.wp-caption-dd {
	font-size: 14px;
	padding-top: 0.5em;
	margin: 0; /* browser reset */
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.alignleft {
	float: left;
	margin: 0.5em 1em 0.5em 0;
}

.alignright {
	float: right;
	margin: 0.5em 0 0.5em 1em;
}

/* Remove blue highlighting of selected images in WebKit */
img[data-mce-selected]::selection {
	background-color: transparent;
}

/* Styles for the WordPress plugins */
.mce-content-body img[data-mce-placeholder] {
	border-radius: 0;
	padding: 0;
}

.mce-content-body img[data-wp-more] {
	border: 0;
	-webkit-box-shadow: none;
	box-shadow: none;
	width: 96%;
	height: 16px;
	display: block;
	margin: 15px auto 0;
	outline: 0;
	cursor: default;
}

.mce-content-body img[data-mce-placeholder][data-mce-selected] {
	outline: 1px dotted #888;
}

.mce-content-body img[data-wp-more="more"] {
	background: transparent url( images/more.png ) repeat-y scroll center center;
}

.mce-content-body img[data-wp-more="nextpage"] {
	background: transparent url( images/pagebreak.png ) repeat-y scroll center center;
}

.mce-object-style {
	background-image: url( images/style.svg );
}

.mce-object-script {
	background-image: url( images/script.svg );
}

/* Styles for formatting the boundaries of anchors and code elements */
.mce-content-body a[data-mce-selected] {
	padding: 0 2px;
	margin: 0 -2px;
	border-radius: 2px;
	box-shadow: 0 0 0 1px #bfe6ff;
	background: #bfe6ff;
}

.mce-content-body .wp-caption-dt a[data-mce-selected] {
	outline: none;
	padding: 0;
	margin: 0;
	box-shadow: none;
	background: transparent;
}

.mce-content-body code {
	padding: 2px 4px;
	margin: 0;
	border-radius: 2px;
	color: #222;
	background: #f2f4f5;
}

.mce-content-body code[data-mce-selected] {
	background: #e9ebec;
}

/* Gallery, audio, video placeholders */
.mce-content-body img.wp-media {
	border: 1px solid #aaa;
	background-color: #f2f2f2;
	background-repeat: no-repeat;
	background-position: center center;
	width: 99%;
	height: 250px;
	outline: 0;
	cursor: pointer;
}

.mce-content-body img.wp-media:hover {
	background-color: #ededed;
	border-color: #72777c;
}

.mce-content-body img.wp-media.wp-media-selected {
	background-color: #d8d8d8;
	border-color: #72777c;
}

.mce-content-body img.wp-media.wp-gallery {
	background-image: url(images/gallery.png);
}

/* Image resize handles */
.mce-content-body div.mce-resizehandle {
	border-color: #72777c;
	width: 7px;
	height: 7px;
}

.mce-content-body img[data-mce-selected] {
	outline: 1px solid #72777c;
}

.mce-content-body img[data-mce-resize="false"] {
	outline: 0;
}

audio,
video,
embed {
	display: -moz-inline-stack;
	display: inline-block;
}

audio {
	visibility: hidden;
}

/* Fix for proprietary Mozilla display attribute, see #38757 */
[_moz_abspos] {
	outline: none;
}

a[data-wplink-url-error],
a[data-wplink-url-error]:hover,
a[data-wplink-url-error]:focus {
	outline: 2px dotted #dc3232;
	position: relative;
}

a[data-wplink-url-error]:before {
	content: "";
	display: block;
	position: absolute;
	top: -2px;
	right: -2px;
	bottom: -2px;
	left: -2px;
	outline: 2px dotted #fff;
	z-index: -1;
}

/**
 * WP Views
 */

.wpview {
	width: 99.99%; /* All IE need hasLayout, incl. 11 (ugh, not again!!) */
	position: relative;
	clear: both;
	margin-bottom: 16px;
	border: 1px solid transparent;
}

.mce-shim {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
}

.wpview[data-mce-selected="2"] .mce-shim {
	display: none;
}

.wpview .loading-placeholder {
	border: 1px dashed #ccc;
	padding: 10px;
}

.wpview[data-mce-selected] .loading-placeholder {
	border-color: transparent;
}

/* A little "loading" animation, not showing in IE < 10 */
.wpview .wpview-loading {
	width: 60px;
	height: 5px;
	overflow: hidden;
	background-color: transparent;
	margin: 10px auto 0;
}

.wpview .wpview-loading ins {
	background-color: #333;
	margin: 0 0 0 -60px;
	width: 36px;
	height: 5px;
	display: block;
	-webkit-animation: wpview-loading 1.3s infinite 1s steps(36);
	animation: wpview-loading 1.3s infinite 1s steps(36);
}

@-webkit-keyframes wpview-loading {
	0% {
		margin-left: -60px;
	}
	100% {
		margin-left: 60px;
	}
}

@keyframes wpview-loading {
	0% {
		margin-left: -60px;
	}
	100% {
		margin-left: 60px;
	}
}

.wpview .wpview-content > iframe {
	max-width: 100%;
	background: transparent;
}

.wpview-error {
	border: 1px solid #ddd;
	padding: 1em 0;
	margin: 0;
	word-wrap: break-word;
}

.wpview[data-mce-selected] .wpview-error {
	border-color: transparent;
}

.wpview-error .dashicons,
.loading-placeholder .dashicons {
	display: block;
	margin: 0 auto;
	width: 32px;
	height: 32px;
	font-size: 32px;
}

.wpview-error p {
	margin: 0;
	text-align: center;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.wpview-type-gallery:after {
	content: "";
	display: table;
	clear: both;
}

.gallery img[data-mce-selected]:focus {
	outline: none;
}

.gallery a {
	cursor: default;
}

.gallery {
	margin: auto -6px;
	padding: 6px 0;
	line-height: 1;
	overflow-x: hidden;
}

.ie7 .gallery,
.ie8 .gallery {
	margin: auto;
}

.gallery .gallery-item {
	float: left;
	margin: 0;
	text-align: center;
	padding: 6px;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}

.ie7 .gallery .gallery-item,
.ie8 .gallery .gallery-item {
	padding: 6px 0;
}

.gallery .gallery-caption,
.gallery .gallery-icon {
	margin: 0;
}

.gallery .gallery-caption {
	font-size: 13px;
	margin: 4px 0;
}

.gallery-columns-1 .gallery-item {
	width: 100%;
}

.gallery-columns-2 .gallery-item {
	width: 50%;
}

.gallery-columns-3 .gallery-item {
	width: 33.333%;
}

.ie8 .gallery-columns-3 .gallery-item,
.ie7 .gallery-columns-3 .gallery-item {
	width: 33%;
}

.gallery-columns-4 .gallery-item {
	width: 25%;
}

.gallery-columns-5 .gallery-item {
	width: 20%;
}

.gallery-columns-6 .gallery-item {
	width: 16.665%;
}

.gallery-columns-7 .gallery-item {
	width: 14.285%;
}

.gallery-columns-8 .gallery-item {
	width: 12.5%;
}

.gallery-columns-9 .gallery-item {
	width: 11.111%;
}

.gallery img {
	max-width: 100%;
	height: auto;
	border: none;
	padding: 0;
}

img.wp-oembed {
	border: 1px dashed #888;
	background: #f7f5f2 url(images/embedded.png) no-repeat scroll center center;
	width: 300px;
	height: 250px;
	outline: 0;
}

/* rtl */
.rtl .gallery .gallery-item {
	float: right;
}

@media print,
	(-o-min-device-pixel-ratio: 5/4),
	(-webkit-min-device-pixel-ratio: 1.25),
	(min-resolution: 120dpi) {

	.mce-content-body img.mce-wp-more {
		background-image: url( images/more-2x.png );
		background-size: 1900px 20px;
	}

	.mce-content-body img.mce-wp-nextpage {
		background-image: url( images/pagebreak-2x.png );
		background-size: 1900px 20px;
	}
}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        tinymce/themes/inlite/theme.js                                                                      0000644                 00001162377 15212564050 0012446 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       (function () {
var inlite = (function (domGlobals) {
    'use strict';

    var global = tinymce.util.Tools.resolve('tinymce.ThemeManager');

    var global$1 = tinymce.util.Tools.resolve('tinymce.Env');

    var global$2 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');

    var global$3 = tinymce.util.Tools.resolve('tinymce.util.Delay');

    var flatten = function (arr) {
      return arr.reduce(function (results, item) {
        return Array.isArray(item) ? results.concat(flatten(item)) : results.concat(item);
      }, []);
    };
    var DeepFlatten = { flatten: flatten };

    var result = function (id, rect) {
      return {
        id: id,
        rect: rect
      };
    };
    var match = function (editor, matchers) {
      for (var i = 0; i < matchers.length; i++) {
        var f = matchers[i];
        var result_1 = f(editor);
        if (result_1) {
          return result_1;
        }
      }
      return null;
    };
    var Matcher = {
      match: match,
      result: result
    };

    var fromClientRect = function (clientRect) {
      return {
        x: clientRect.left,
        y: clientRect.top,
        w: clientRect.width,
        h: clientRect.height
      };
    };
    var toClientRect = function (geomRect) {
      return {
        left: geomRect.x,
        top: geomRect.y,
        width: geomRect.w,
        height: geomRect.h,
        right: geomRect.x + geomRect.w,
        bottom: geomRect.y + geomRect.h
      };
    };
    var Convert = {
      fromClientRect: fromClientRect,
      toClientRect: toClientRect
    };

    var toAbsolute = function (rect) {
      var vp = global$2.DOM.getViewPort();
      return {
        x: rect.x + vp.x,
        y: rect.y + vp.y,
        w: rect.w,
        h: rect.h
      };
    };
    var measureElement = function (elm) {
      var clientRect = elm.getBoundingClientRect();
      return toAbsolute({
        x: clientRect.left,
        y: clientRect.top,
        w: Math.max(elm.clientWidth, elm.offsetWidth),
        h: Math.max(elm.clientHeight, elm.offsetHeight)
      });
    };
    var getElementRect = function (editor, elm) {
      return measureElement(elm);
    };
    var getPageAreaRect = function (editor) {
      return measureElement(editor.getElement().ownerDocument.body);
    };
    var getContentAreaRect = function (editor) {
      return measureElement(editor.getContentAreaContainer() || editor.getBody());
    };
    var getSelectionRect = function (editor) {
      var clientRect = editor.selection.getBoundingClientRect();
      return clientRect ? toAbsolute(Convert.fromClientRect(clientRect)) : null;
    };
    var Measure = {
      getElementRect: getElementRect,
      getPageAreaRect: getPageAreaRect,
      getContentAreaRect: getContentAreaRect,
      getSelectionRect: getSelectionRect
    };

    var element = function (element, predicateIds) {
      return function (editor) {
        for (var i = 0; i < predicateIds.length; i++) {
          if (predicateIds[i].predicate(element)) {
            var result = Matcher.result(predicateIds[i].id, Measure.getElementRect(editor, element));
            return result;
          }
        }
        return null;
      };
    };
    var parent = function (elements, predicateIds) {
      return function (editor) {
        for (var i = 0; i < elements.length; i++) {
          for (var x = 0; x < predicateIds.length; x++) {
            if (predicateIds[x].predicate(elements[i])) {
              return Matcher.result(predicateIds[x].id, Measure.getElementRect(editor, elements[i]));
            }
          }
        }
        return null;
      };
    };
    var ElementMatcher = {
      element: element,
      parent: parent
    };

    var global$4 = tinymce.util.Tools.resolve('tinymce.util.Tools');

    var create = function (id, predicate) {
      return {
        id: id,
        predicate: predicate
      };
    };
    var fromContextToolbars = function (toolbars) {
      return global$4.map(toolbars, function (toolbar) {
        return create(toolbar.id, toolbar.predicate);
      });
    };
    var PredicateId = {
      create: create,
      fromContextToolbars: fromContextToolbars
    };

    var textSelection = function (id) {
      return function (editor) {
        if (!editor.selection.isCollapsed()) {
          var result = Matcher.result(id, Measure.getSelectionRect(editor));
          return result;
        }
        return null;
      };
    };
    var emptyTextBlock = function (elements, id) {
      return function (editor) {
        var i;
        var textBlockElementsMap = editor.schema.getTextBlockElements();
        for (i = 0; i < elements.length; i++) {
          if (elements[i].nodeName === 'TABLE') {
            return null;
          }
        }
        for (i = 0; i < elements.length; i++) {
          if (elements[i].nodeName in textBlockElementsMap) {
            if (editor.dom.isEmpty(elements[i])) {
              return Matcher.result(id, Measure.getSelectionRect(editor));
            }
            return null;
          }
        }
        return null;
      };
    };
    var SelectionMatcher = {
      textSelection: textSelection,
      emptyTextBlock: emptyTextBlock
    };

    var fireSkinLoaded = function (editor) {
      editor.fire('SkinLoaded');
    };
    var fireBeforeRenderUI = function (editor) {
      return editor.fire('BeforeRenderUI');
    };
    var Events = {
      fireSkinLoaded: fireSkinLoaded,
      fireBeforeRenderUI: fireBeforeRenderUI
    };

    var global$5 = tinymce.util.Tools.resolve('tinymce.EditorManager');

    var isType = function (type) {
      return function (value) {
        return typeof value === type;
      };
    };
    var isArray = function (value) {
      return Array.isArray(value);
    };
    var isNull = function (value) {
      return value === null;
    };
    var isObject = function (predicate) {
      return function (value) {
        return !isNull(value) && !isArray(value) && predicate(value);
      };
    };
    var isString = function (value) {
      return isType('string')(value);
    };
    var isNumber = function (value) {
      return isType('number')(value);
    };
    var isFunction = function (value) {
      return isType('function')(value);
    };
    var isBoolean = function (value) {
      return isType('boolean')(value);
    };
    var Type = {
      isString: isString,
      isNumber: isNumber,
      isBoolean: isBoolean,
      isFunction: isFunction,
      isObject: isObject(isType('object')),
      isNull: isNull,
      isArray: isArray
    };

    var validDefaultOrDie = function (value, predicate) {
      if (predicate(value)) {
        return true;
      }
      throw new Error('Default value doesn\'t match requested type.');
    };
    var getByTypeOr = function (predicate) {
      return function (editor, name, defaultValue) {
        var settings = editor.settings;
        validDefaultOrDie(defaultValue, predicate);
        return name in settings && predicate(settings[name]) ? settings[name] : defaultValue;
      };
    };
    var splitNoEmpty = function (str, delim) {
      return str.split(delim).filter(function (item) {
        return item.length > 0;
      });
    };
    var itemsToArray = function (value, defaultValue) {
      var stringToItemsArray = function (value) {
        return typeof value === 'string' ? splitNoEmpty(value, /[ ,]/) : value;
      };
      var boolToItemsArray = function (value, defaultValue) {
        return value === false ? [] : defaultValue;
      };
      if (Type.isArray(value)) {
        return value;
      } else if (Type.isString(value)) {
        return stringToItemsArray(value);
      } else if (Type.isBoolean(value)) {
        return boolToItemsArray(value, defaultValue);
      }
      return defaultValue;
    };
    var getToolbarItemsOr = function (predicate) {
      return function (editor, name, defaultValue) {
        var value = name in editor.settings ? editor.settings[name] : defaultValue;
        validDefaultOrDie(defaultValue, predicate);
        return itemsToArray(value, defaultValue);
      };
    };
    var EditorSettings = {
      getStringOr: getByTypeOr(Type.isString),
      getBoolOr: getByTypeOr(Type.isBoolean),
      getNumberOr: getByTypeOr(Type.isNumber),
      getHandlerOr: getByTypeOr(Type.isFunction),
      getToolbarItemsOr: getToolbarItemsOr(Type.isArray)
    };

    var global$6 = tinymce.util.Tools.resolve('tinymce.geom.Rect');

    var result$1 = function (rect, position) {
      return {
        rect: rect,
        position: position
      };
    };
    var moveTo = function (rect, toRect) {
      return {
        x: toRect.x,
        y: toRect.y,
        w: rect.w,
        h: rect.h
      };
    };
    var calcByPositions = function (testPositions1, testPositions2, targetRect, contentAreaRect, panelRect) {
      var relPos, relRect, outputPanelRect;
      var paddedContentRect = {
        x: contentAreaRect.x,
        y: contentAreaRect.y,
        w: contentAreaRect.w + (contentAreaRect.w < panelRect.w + targetRect.w ? panelRect.w : 0),
        h: contentAreaRect.h + (contentAreaRect.h < panelRect.h + targetRect.h ? panelRect.h : 0)
      };
      relPos = global$6.findBestRelativePosition(panelRect, targetRect, paddedContentRect, testPositions1);
      targetRect = global$6.clamp(targetRect, paddedContentRect);
      if (relPos) {
        relRect = global$6.relativePosition(panelRect, targetRect, relPos);
        outputPanelRect = moveTo(panelRect, relRect);
        return result$1(outputPanelRect, relPos);
      }
      targetRect = global$6.intersect(paddedContentRect, targetRect);
      if (targetRect) {
        relPos = global$6.findBestRelativePosition(panelRect, targetRect, paddedContentRect, testPositions2);
        if (relPos) {
          relRect = global$6.relativePosition(panelRect, targetRect, relPos);
          outputPanelRect = moveTo(panelRect, relRect);
          return result$1(outputPanelRect, relPos);
        }
        outputPanelRect = moveTo(panelRect, targetRect);
        return result$1(outputPanelRect, relPos);
      }
      return null;
    };
    var calcInsert = function (targetRect, contentAreaRect, panelRect) {
      return calcByPositions([
        'cr-cl',
        'cl-cr'
      ], [
        'bc-tc',
        'bl-tl',
        'br-tr'
      ], targetRect, contentAreaRect, panelRect);
    };
    var calc = function (targetRect, contentAreaRect, panelRect) {
      return calcByPositions([
        'tc-bc',
        'bc-tc',
        'tl-bl',
        'bl-tl',
        'tr-br',
        'br-tr',
        'cr-cl',
        'cl-cr'
      ], [
        'bc-tc',
        'bl-tl',
        'br-tr',
        'cr-cl'
      ], targetRect, contentAreaRect, panelRect);
    };
    var userConstrain = function (handler, targetRect, contentAreaRect, panelRect) {
      var userConstrainedPanelRect;
      if (typeof handler === 'function') {
        userConstrainedPanelRect = handler({
          elementRect: Convert.toClientRect(targetRect),
          contentAreaRect: Convert.toClientRect(contentAreaRect),
          panelRect: Convert.toClientRect(panelRect)
        });
        return Convert.fromClientRect(userConstrainedPanelRect);
      }
      return panelRect;
    };
    var defaultHandler = function (rects) {
      return rects.panelRect;
    };
    var Layout = {
      calcInsert: calcInsert,
      calc: calc,
      userConstrain: userConstrain,
      defaultHandler: defaultHandler
    };

    var toAbsoluteUrl = function (editor, url) {
      return editor.documentBaseURI.toAbsolute(url);
    };
    var urlFromName = function (name) {
      var prefix = global$5.baseURL + '/skins/';
      return name ? prefix + name : prefix + 'lightgray';
    };
    var getTextSelectionToolbarItems = function (editor) {
      return EditorSettings.getToolbarItemsOr(editor, 'selection_toolbar', [
        'bold',
        'italic',
        '|',
        'quicklink',
        'h2',
        'h3',
        'blockquote'
      ]);
    };
    var getInsertToolbarItems = function (editor) {
      return EditorSettings.getToolbarItemsOr(editor, 'insert_toolbar', [
        'quickimage',
        'quicktable'
      ]);
    };
    var getPositionHandler = function (editor) {
      return EditorSettings.getHandlerOr(editor, 'inline_toolbar_position_handler', Layout.defaultHandler);
    };
    var getSkinUrl = function (editor) {
      var settings = editor.settings;
      return settings.skin_url ? toAbsoluteUrl(editor, settings.skin_url) : urlFromName(settings.skin);
    };
    var isSkinDisabled = function (editor) {
      return editor.settings.skin === false;
    };
    var Settings = {
      getTextSelectionToolbarItems: getTextSelectionToolbarItems,
      getInsertToolbarItems: getInsertToolbarItems,
      getPositionHandler: getPositionHandler,
      getSkinUrl: getSkinUrl,
      isSkinDisabled: isSkinDisabled
    };

    var fireSkinLoaded$1 = function (editor, callback) {
      var done = function () {
        editor._skinLoaded = true;
        Events.fireSkinLoaded(editor);
        callback();
      };
      if (editor.initialized) {
        done();
      } else {
        editor.on('init', done);
      }
    };
    var load = function (editor, callback) {
      var skinUrl = Settings.getSkinUrl(editor);
      var done = function () {
        fireSkinLoaded$1(editor, callback);
      };
      if (Settings.isSkinDisabled(editor)) {
        done();
      } else {
        global$2.DOM.styleSheetLoader.load(skinUrl + '/skin.min.css', done);
        editor.contentCSS.push(skinUrl + '/content.inline.min.css');
      }
    };
    var SkinLoader = { load: load };

    var getSelectionElements = function (editor) {
      var node = editor.selection.getNode();
      var elms = editor.dom.getParents(node, '*');
      return elms;
    };
    var createToolbar = function (editor, selector, id, items) {
      var selectorPredicate = function (elm) {
        return editor.dom.is(elm, selector);
      };
      return {
        predicate: selectorPredicate,
        id: id,
        items: items
      };
    };
    var getToolbars = function (editor) {
      var contextToolbars = editor.contextToolbars;
      return DeepFlatten.flatten([
        contextToolbars ? contextToolbars : [],
        createToolbar(editor, 'img', 'image', 'alignleft aligncenter alignright')
      ]);
    };
    var findMatchResult = function (editor, toolbars) {
      var result, elements, contextToolbarsPredicateIds;
      elements = getSelectionElements(editor);
      contextToolbarsPredicateIds = PredicateId.fromContextToolbars(toolbars);
      result = Matcher.match(editor, [
        ElementMatcher.element(elements[0], contextToolbarsPredicateIds),
        SelectionMatcher.textSelection('text'),
        SelectionMatcher.emptyTextBlock(elements, 'insert'),
        ElementMatcher.parent(elements, contextToolbarsPredicateIds)
      ]);
      return result && result.rect ? result : null;
    };
    var editorHasFocus = function (editor) {
      return domGlobals.document.activeElement === editor.getBody();
    };
    var togglePanel = function (editor, panel) {
      var toggle = function () {
        var toolbars = getToolbars(editor);
        var result = findMatchResult(editor, toolbars);
        if (result) {
          panel.show(editor, result.id, result.rect, toolbars);
        } else {
          panel.hide();
        }
      };
      return function () {
        if (!editor.removed && editorHasFocus(editor)) {
          toggle();
        }
      };
    };
    var repositionPanel = function (editor, panel) {
      return function () {
        var toolbars = getToolbars(editor);
        var result = findMatchResult(editor, toolbars);
        if (result) {
          panel.reposition(editor, result.id, result.rect);
        }
      };
    };
    var ignoreWhenFormIsVisible = function (editor, panel, f) {
      return function () {
        if (!editor.removed && !panel.inForm()) {
          f();
        }
      };
    };
    var bindContextualToolbarsEvents = function (editor, panel) {
      var throttledTogglePanel = global$3.throttle(togglePanel(editor, panel), 0);
      var throttledTogglePanelWhenNotInForm = global$3.throttle(ignoreWhenFormIsVisible(editor, panel, togglePanel(editor, panel)), 0);
      var reposition = repositionPanel(editor, panel);
      editor.on('blur hide ObjectResizeStart', panel.hide);
      editor.on('click', throttledTogglePanel);
      editor.on('nodeChange mouseup', throttledTogglePanelWhenNotInForm);
      editor.on('ResizeEditor keyup', throttledTogglePanel);
      editor.on('ResizeWindow', reposition);
      global$2.DOM.bind(global$1.container, 'scroll', reposition);
      editor.on('remove', function () {
        global$2.DOM.unbind(global$1.container, 'scroll', reposition);
        panel.remove();
      });
      editor.shortcuts.add('Alt+F10,F10', '', panel.focus);
    };
    var overrideLinkShortcut = function (editor, panel) {
      editor.shortcuts.remove('meta+k');
      editor.shortcuts.add('meta+k', '', function () {
        var toolbars = getToolbars(editor);
        var result = Matcher.match(editor, [SelectionMatcher.textSelection('quicklink')]);
        if (result) {
          panel.show(editor, result.id, result.rect, toolbars);
        }
      });
    };
    var renderInlineUI = function (editor, panel) {
      SkinLoader.load(editor, function () {
        bindContextualToolbarsEvents(editor, panel);
        overrideLinkShortcut(editor, panel);
      });
      return {};
    };
    var fail = function (message) {
      throw new Error(message);
    };
    var renderUI = function (editor, panel) {
      return editor.inline ? renderInlineUI(editor, panel) : fail('inlite theme only supports inline mode.');
    };
    var Render = { renderUI: renderUI };

    var noop = function () {
    };
    var constant = function (value) {
      return function () {
        return value;
      };
    };
    var never = constant(false);
    var always = constant(true);

    var none = function () {
      return NONE;
    };
    var NONE = function () {
      var eq = function (o) {
        return o.isNone();
      };
      var call = function (thunk) {
        return thunk();
      };
      var id = function (n) {
        return n;
      };
      var me = {
        fold: function (n, s) {
          return n();
        },
        is: never,
        isSome: never,
        isNone: always,
        getOr: id,
        getOrThunk: call,
        getOrDie: function (msg) {
          throw new Error(msg || 'error: getOrDie called on none.');
        },
        getOrNull: constant(null),
        getOrUndefined: constant(undefined),
        or: id,
        orThunk: call,
        map: none,
        each: noop,
        bind: none,
        exists: never,
        forall: always,
        filter: none,
        equals: eq,
        equals_: eq,
        toArray: function () {
          return [];
        },
        toString: constant('none()')
      };
      if (Object.freeze) {
        Object.freeze(me);
      }
      return me;
    }();
    var some = function (a) {
      var constant_a = constant(a);
      var self = function () {
        return me;
      };
      var bind = function (f) {
        return f(a);
      };
      var me = {
        fold: function (n, s) {
          return s(a);
        },
        is: function (v) {
          return a === v;
        },
        isSome: always,
        isNone: never,
        getOr: constant_a,
        getOrThunk: constant_a,
        getOrDie: constant_a,
        getOrNull: constant_a,
        getOrUndefined: constant_a,
        or: self,
        orThunk: self,
        map: function (f) {
          return some(f(a));
        },
        each: function (f) {
          f(a);
        },
        bind: bind,
        exists: bind,
        forall: bind,
        filter: function (f) {
          return f(a) ? me : NONE;
        },
        toArray: function () {
          return [a];
        },
        toString: function () {
          return 'some(' + a + ')';
        },
        equals: function (o) {
          return o.is(a);
        },
        equals_: function (o, elementEq) {
          return o.fold(never, function (b) {
            return elementEq(a, b);
          });
        }
      };
      return me;
    };
    var from = function (value) {
      return value === null || value === undefined ? NONE : some(value);
    };
    var Option = {
      some: some,
      none: none,
      from: from
    };

    var typeOf = function (x) {
      if (x === null) {
        return 'null';
      }
      var t = typeof x;
      if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
        return 'array';
      }
      if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
        return 'string';
      }
      return t;
    };
    var isType$1 = function (type) {
      return function (value) {
        return typeOf(value) === type;
      };
    };
    var isArray$1 = isType$1('array');
    var isFunction$1 = isType$1('function');
    var isNumber$1 = isType$1('number');

    var nativeSlice = Array.prototype.slice;
    var nativeIndexOf = Array.prototype.indexOf;
    var nativePush = Array.prototype.push;
    var rawIndexOf = function (ts, t) {
      return nativeIndexOf.call(ts, t);
    };
    var indexOf = function (xs, x) {
      var r = rawIndexOf(xs, x);
      return r === -1 ? Option.none() : Option.some(r);
    };
    var exists = function (xs, pred) {
      for (var i = 0, len = xs.length; i < len; i++) {
        var x = xs[i];
        if (pred(x, i)) {
          return true;
        }
      }
      return false;
    };
    var map = function (xs, f) {
      var len = xs.length;
      var r = new Array(len);
      for (var i = 0; i < len; i++) {
        var x = xs[i];
        r[i] = f(x, i);
      }
      return r;
    };
    var each = function (xs, f) {
      for (var i = 0, len = xs.length; i < len; i++) {
        var x = xs[i];
        f(x, i);
      }
    };
    var filter = function (xs, pred) {
      var r = [];
      for (var i = 0, len = xs.length; i < len; i++) {
        var x = xs[i];
        if (pred(x, i)) {
          r.push(x);
        }
      }
      return r;
    };
    var foldl = function (xs, f, acc) {
      each(xs, function (x) {
        acc = f(acc, x);
      });
      return acc;
    };
    var find = function (xs, pred) {
      for (var i = 0, len = xs.length; i < len; i++) {
        var x = xs[i];
        if (pred(x, i)) {
          return Option.some(x);
        }
      }
      return Option.none();
    };
    var flatten$1 = function (xs) {
      var r = [];
      for (var i = 0, len = xs.length; i < len; ++i) {
        if (!isArray$1(xs[i])) {
          throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
        }
        nativePush.apply(r, xs[i]);
      }
      return r;
    };
    var from$1 = isFunction$1(Array.from) ? Array.from : function (x) {
      return nativeSlice.call(x);
    };

    var count = 0;
    var funcs = {
      id: function () {
        return 'mceu_' + count++;
      },
      create: function (name, attrs, children) {
        var elm = domGlobals.document.createElement(name);
        global$2.DOM.setAttribs(elm, attrs);
        if (typeof children === 'string') {
          elm.innerHTML = children;
        } else {
          global$4.each(children, function (child) {
            if (child.nodeType) {
              elm.appendChild(child);
            }
          });
        }
        return elm;
      },
      createFragment: function (html) {
        return global$2.DOM.createFragment(html);
      },
      getWindowSize: function () {
        return global$2.DOM.getViewPort();
      },
      getSize: function (elm) {
        var width, height;
        if (elm.getBoundingClientRect) {
          var rect = elm.getBoundingClientRect();
          width = Math.max(rect.width || rect.right - rect.left, elm.offsetWidth);
          height = Math.max(rect.height || rect.bottom - rect.bottom, elm.offsetHeight);
        } else {
          width = elm.offsetWidth;
          height = elm.offsetHeight;
        }
        return {
          width: width,
          height: height
        };
      },
      getPos: function (elm, root) {
        return global$2.DOM.getPos(elm, root || funcs.getContainer());
      },
      getContainer: function () {
        return global$1.container ? global$1.container : domGlobals.document.body;
      },
      getViewPort: function (win) {
        return global$2.DOM.getViewPort(win);
      },
      get: function (id) {
        return domGlobals.document.getElementById(id);
      },
      addClass: function (elm, cls) {
        return global$2.DOM.addClass(elm, cls);
      },
      removeClass: function (elm, cls) {
        return global$2.DOM.removeClass(elm, cls);
      },
      hasClass: function (elm, cls) {
        return global$2.DOM.hasClass(elm, cls);
      },
      toggleClass: function (elm, cls, state) {
        return global$2.DOM.toggleClass(elm, cls, state);
      },
      css: function (elm, name, value) {
        return global$2.DOM.setStyle(elm, name, value);
      },
      getRuntimeStyle: function (elm, name) {
        return global$2.DOM.getStyle(elm, name, true);
      },
      on: function (target, name, callback, scope) {
        return global$2.DOM.bind(target, name, callback, scope);
      },
      off: function (target, name, callback) {
        return global$2.DOM.unbind(target, name, callback);
      },
      fire: function (target, name, args) {
        return global$2.DOM.fire(target, name, args);
      },
      innerHtml: function (elm, html) {
        global$2.DOM.setHTML(elm, html);
      }
    };

    var global$7 = tinymce.util.Tools.resolve('tinymce.dom.DomQuery');

    var global$8 = tinymce.util.Tools.resolve('tinymce.util.Class');

    var global$9 = tinymce.util.Tools.resolve('tinymce.util.EventDispatcher');

    var BoxUtils = {
      parseBox: function (value) {
        var len;
        var radix = 10;
        if (!value) {
          return;
        }
        if (typeof value === 'number') {
          value = value || 0;
          return {
            top: value,
            left: value,
            bottom: value,
            right: value
          };
        }
        value = value.split(' ');
        len = value.length;
        if (len === 1) {
          value[1] = value[2] = value[3] = value[0];
        } else if (len === 2) {
          value[2] = value[0];
          value[3] = value[1];
        } else if (len === 3) {
          value[3] = value[1];
        }
        return {
          top: parseInt(value[0], radix) || 0,
          right: parseInt(value[1], radix) || 0,
          bottom: parseInt(value[2], radix) || 0,
          left: parseInt(value[3], radix) || 0
        };
      },
      measureBox: function (elm, prefix) {
        function getStyle(name) {
          var defaultView = elm.ownerDocument.defaultView;
          if (defaultView) {
            var computedStyle = defaultView.getComputedStyle(elm, null);
            if (computedStyle) {
              name = name.replace(/[A-Z]/g, function (a) {
                return '-' + a;
              });
              return computedStyle.getPropertyValue(name);
            } else {
              return null;
            }
          }
          return elm.currentStyle[name];
        }
        function getSide(name) {
          var val = parseFloat(getStyle(name));
          return isNaN(val) ? 0 : val;
        }
        return {
          top: getSide(prefix + 'TopWidth'),
          right: getSide(prefix + 'RightWidth'),
          bottom: getSide(prefix + 'BottomWidth'),
          left: getSide(prefix + 'LeftWidth')
        };
      }
    };

    function noop$1() {
    }
    function ClassList(onchange) {
      this.cls = [];
      this.cls._map = {};
      this.onchange = onchange || noop$1;
      this.prefix = '';
    }
    global$4.extend(ClassList.prototype, {
      add: function (cls) {
        if (cls && !this.contains(cls)) {
          this.cls._map[cls] = true;
          this.cls.push(cls);
          this._change();
        }
        return this;
      },
      remove: function (cls) {
        if (this.contains(cls)) {
          var i = void 0;
          for (i = 0; i < this.cls.length; i++) {
            if (this.cls[i] === cls) {
              break;
            }
          }
          this.cls.splice(i, 1);
          delete this.cls._map[cls];
          this._change();
        }
        return this;
      },
      toggle: function (cls, state) {
        var curState = this.contains(cls);
        if (curState !== state) {
          if (curState) {
            this.remove(cls);
          } else {
            this.add(cls);
          }
          this._change();
        }
        return this;
      },
      contains: function (cls) {
        return !!this.cls._map[cls];
      },
      _change: function () {
        delete this.clsValue;
        this.onchange.call(this);
      }
    });
    ClassList.prototype.toString = function () {
      var value;
      if (this.clsValue) {
        return this.clsValue;
      }
      value = '';
      for (var i = 0; i < this.cls.length; i++) {
        if (i > 0) {
          value += ' ';
        }
        value += this.prefix + this.cls[i];
      }
      return value;
    };

    function unique(array) {
      var uniqueItems = [];
      var i = array.length, item;
      while (i--) {
        item = array[i];
        if (!item.__checked) {
          uniqueItems.push(item);
          item.__checked = 1;
        }
      }
      i = uniqueItems.length;
      while (i--) {
        delete uniqueItems[i].__checked;
      }
      return uniqueItems;
    }
    var expression = /^([\w\\*]+)?(?:#([\w\-\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i;
    var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g;
    var whiteSpace = /^\s*|\s*$/g;
    var Collection;
    var Selector = global$8.extend({
      init: function (selector) {
        var match = this.match;
        function compileNameFilter(name) {
          if (name) {
            name = name.toLowerCase();
            return function (item) {
              return name === '*' || item.type === name;
            };
          }
        }
        function compileIdFilter(id) {
          if (id) {
            return function (item) {
              return item._name === id;
            };
          }
        }
        function compileClassesFilter(classes) {
          if (classes) {
            classes = classes.split('.');
            return function (item) {
              var i = classes.length;
              while (i--) {
                if (!item.classes.contains(classes[i])) {
                  return false;
                }
              }
              return true;
            };
          }
        }
        function compileAttrFilter(name, cmp, check) {
          if (name) {
            return function (item) {
              var value = item[name] ? item[name]() : '';
              return !cmp ? !!check : cmp === '=' ? value === check : cmp === '*=' ? value.indexOf(check) >= 0 : cmp === '~=' ? (' ' + value + ' ').indexOf(' ' + check + ' ') >= 0 : cmp === '!=' ? value !== check : cmp === '^=' ? value.indexOf(check) === 0 : cmp === '$=' ? value.substr(value.length - check.length) === check : false;
            };
          }
        }
        function compilePsuedoFilter(name) {
          var notSelectors;
          if (name) {
            name = /(?:not\((.+)\))|(.+)/i.exec(name);
            if (!name[1]) {
              name = name[2];
              return function (item, index, length) {
                return name === 'first' ? index === 0 : name === 'last' ? index === length - 1 : name === 'even' ? index % 2 === 0 : name === 'odd' ? index % 2 === 1 : item[name] ? item[name]() : false;
              };
            }
            notSelectors = parseChunks(name[1], []);
            return function (item) {
              return !match(item, notSelectors);
            };
          }
        }
        function compile(selector, filters, direct) {
          var parts;
          function add(filter) {
            if (filter) {
              filters.push(filter);
            }
          }
          parts = expression.exec(selector.replace(whiteSpace, ''));
          add(compileNameFilter(parts[1]));
          add(compileIdFilter(parts[2]));
          add(compileClassesFilter(parts[3]));
          add(compileAttrFilter(parts[4], parts[5], parts[6]));
          add(compilePsuedoFilter(parts[7]));
          filters.pseudo = !!parts[7];
          filters.direct = direct;
          return filters;
        }
        function parseChunks(selector, selectors) {
          var parts = [];
          var extra, matches, i;
          do {
            chunker.exec('');
            matches = chunker.exec(selector);
            if (matches) {
              selector = matches[3];
              parts.push(matches[1]);
              if (matches[2]) {
                extra = matches[3];
                break;
              }
            }
          } while (matches);
          if (extra) {
            parseChunks(extra, selectors);
          }
          selector = [];
          for (i = 0; i < parts.length; i++) {
            if (parts[i] !== '>') {
              selector.push(compile(parts[i], [], parts[i - 1] === '>'));
            }
          }
          selectors.push(selector);
          return selectors;
        }
        this._selectors = parseChunks(selector, []);
      },
      match: function (control, selectors) {
        var i, l, si, sl, selector, fi, fl, filters, index, length, siblings, count, item;
        selectors = selectors || this._selectors;
        for (i = 0, l = selectors.length; i < l; i++) {
          selector = selectors[i];
          sl = selector.length;
          item = control;
          count = 0;
          for (si = sl - 1; si >= 0; si--) {
            filters = selector[si];
            while (item) {
              if (filters.pseudo) {
                siblings = item.parent().items();
                index = length = siblings.length;
                while (index--) {
                  if (siblings[index] === item) {
                    break;
                  }
                }
              }
              for (fi = 0, fl = filters.length; fi < fl; fi++) {
                if (!filters[fi](item, index, length)) {
                  fi = fl + 1;
                  break;
                }
              }
              if (fi === fl) {
                count++;
                break;
              } else {
                if (si === sl - 1) {
                  break;
                }
              }
              item = item.parent();
            }
          }
          if (count === sl) {
            return true;
          }
        }
        return false;
      },
      find: function (container) {
        var matches = [], i, l;
        var selectors = this._selectors;
        function collect(items, selector, index) {
          var i, l, fi, fl, item;
          var filters = selector[index];
          for (i = 0, l = items.length; i < l; i++) {
            item = items[i];
            for (fi = 0, fl = filters.length; fi < fl; fi++) {
              if (!filters[fi](item, i, l)) {
                fi = fl + 1;
                break;
              }
            }
            if (fi === fl) {
              if (index === selector.length - 1) {
                matches.push(item);
              } else {
                if (item.items) {
                  collect(item.items(), selector, index + 1);
                }
              }
            } else if (filters.direct) {
              return;
            }
            if (item.items) {
              collect(item.items(), selector, index);
            }
          }
        }
        if (container.items) {
          for (i = 0, l = selectors.length; i < l; i++) {
            collect(container.items(), selectors[i], 0);
          }
          if (l > 1) {
            matches = unique(matches);
          }
        }
        if (!Collection) {
          Collection = Selector.Collection;
        }
        return new Collection(matches);
      }
    });

    var Collection$1, proto;
    var push = Array.prototype.push, slice = Array.prototype.slice;
    proto = {
      length: 0,
      init: function (items) {
        if (items) {
          this.add(items);
        }
      },
      add: function (items) {
        var self = this;
        if (!global$4.isArray(items)) {
          if (items instanceof Collection$1) {
            self.add(items.toArray());
          } else {
            push.call(self, items);
          }
        } else {
          push.apply(self, items);
        }
        return self;
      },
      set: function (items) {
        var self = this;
        var len = self.length;
        var i;
        self.length = 0;
        self.add(items);
        for (i = self.length; i < len; i++) {
          delete self[i];
        }
        return self;
      },
      filter: function (selector) {
        var self = this;
        var i, l;
        var matches = [];
        var item, match;
        if (typeof selector === 'string') {
          selector = new Selector(selector);
          match = function (item) {
            return selector.match(item);
          };
        } else {
          match = selector;
        }
        for (i = 0, l = self.length; i < l; i++) {
          item = self[i];
          if (match(item)) {
            matches.push(item);
          }
        }
        return new Collection$1(matches);
      },
      slice: function () {
        return new Collection$1(slice.apply(this, arguments));
      },
      eq: function (index) {
        return index === -1 ? this.slice(index) : this.slice(index, +index + 1);
      },
      each: function (callback) {
        global$4.each(this, callback);
        return this;
      },
      toArray: function () {
        return global$4.toArray(this);
      },
      indexOf: function (ctrl) {
        var self = this;
        var i = self.length;
        while (i--) {
          if (self[i] === ctrl) {
            break;
          }
        }
        return i;
      },
      reverse: function () {
        return new Collection$1(global$4.toArray(this).reverse());
      },
      hasClass: function (cls) {
        return this[0] ? this[0].classes.contains(cls) : false;
      },
      prop: function (name, value) {
        var self = this;
        var item;
        if (value !== undefined) {
          self.each(function (item) {
            if (item[name]) {
              item[name](value);
            }
          });
          return self;
        }
        item = self[0];
        if (item && item[name]) {
          return item[name]();
        }
      },
      exec: function (name) {
        var self = this, args = global$4.toArray(arguments).slice(1);
        self.each(function (item) {
          if (item[name]) {
            item[name].apply(item, args);
          }
        });
        return self;
      },
      remove: function () {
        var i = this.length;
        while (i--) {
          this[i].remove();
        }
        return this;
      },
      addClass: function (cls) {
        return this.each(function (item) {
          item.classes.add(cls);
        });
      },
      removeClass: function (cls) {
        return this.each(function (item) {
          item.classes.remove(cls);
        });
      }
    };
    global$4.each('fire on off show hide append prepend before after reflow'.split(' '), function (name) {
      proto[name] = function () {
        var args = global$4.toArray(arguments);
        this.each(function (ctrl) {
          if (name in ctrl) {
            ctrl[name].apply(ctrl, args);
          }
        });
        return this;
      };
    });
    global$4.each('text name disabled active selected checked visible parent value data'.split(' '), function (name) {
      proto[name] = function (value) {
        return this.prop(name, value);
      };
    });
    Collection$1 = global$8.extend(proto);
    Selector.Collection = Collection$1;
    var Collection$2 = Collection$1;

    var Binding = function (settings) {
      this.create = settings.create;
    };
    Binding.create = function (model, name) {
      return new Binding({
        create: function (otherModel, otherName) {
          var bindings;
          var fromSelfToOther = function (e) {
            otherModel.set(otherName, e.value);
          };
          var fromOtherToSelf = function (e) {
            model.set(name, e.value);
          };
          otherModel.on('change:' + otherName, fromOtherToSelf);
          model.on('change:' + name, fromSelfToOther);
          bindings = otherModel._bindings;
          if (!bindings) {
            bindings = otherModel._bindings = [];
            otherModel.on('destroy', function () {
              var i = bindings.length;
              while (i--) {
                bindings[i]();
              }
            });
          }
          bindings.push(function () {
            model.off('change:' + name, fromSelfToOther);
          });
          return model.get(name);
        }
      });
    };

    var global$a = tinymce.util.Tools.resolve('tinymce.util.Observable');

    function isNode(node) {
      return node.nodeType > 0;
    }
    function isEqual(a, b) {
      var k, checked;
      if (a === b) {
        return true;
      }
      if (a === null || b === null) {
        return a === b;
      }
      if (typeof a !== 'object' || typeof b !== 'object') {
        return a === b;
      }
      if (global$4.isArray(b)) {
        if (a.length !== b.length) {
          return false;
        }
        k = a.length;
        while (k--) {
          if (!isEqual(a[k], b[k])) {
            return false;
          }
        }
      }
      if (isNode(a) || isNode(b)) {
        return a === b;
      }
      checked = {};
      for (k in b) {
        if (!isEqual(a[k], b[k])) {
          return false;
        }
        checked[k] = true;
      }
      for (k in a) {
        if (!checked[k] && !isEqual(a[k], b[k])) {
          return false;
        }
      }
      return true;
    }
    var ObservableObject = global$8.extend({
      Mixins: [global$a],
      init: function (data) {
        var name, value;
        data = data || {};
        for (name in data) {
          value = data[name];
          if (value instanceof Binding) {
            data[name] = value.create(this, name);
          }
        }
        this.data = data;
      },
      set: function (name, value) {
        var key, args;
        var oldValue = this.data[name];
        if (value instanceof Binding) {
          value = value.create(this, name);
        }
        if (typeof name === 'object') {
          for (key in name) {
            this.set(key, name[key]);
          }
          return this;
        }
        if (!isEqual(oldValue, value)) {
          this.data[name] = value;
          args = {
            target: this,
            name: name,
            value: value,
            oldValue: oldValue
          };
          this.fire('change:' + name, args);
          this.fire('change', args);
        }
        return this;
      },
      get: function (name) {
        return this.data[name];
      },
      has: function (name) {
        return name in this.data;
      },
      bind: function (name) {
        return Binding.create(this, name);
      },
      destroy: function () {
        this.fire('destroy');
      }
    });

    var dirtyCtrls = {}, animationFrameRequested;
    var ReflowQueue = {
      add: function (ctrl) {
        var parent = ctrl.parent();
        if (parent) {
          if (!parent._layout || parent._layout.isNative()) {
            return;
          }
          if (!dirtyCtrls[parent._id]) {
            dirtyCtrls[parent._id] = parent;
          }
          if (!animationFrameRequested) {
            animationFrameRequested = true;
            global$3.requestAnimationFrame(function () {
              var id, ctrl;
              animationFrameRequested = false;
              for (id in dirtyCtrls) {
                ctrl = dirtyCtrls[id];
                if (ctrl.state.get('rendered')) {
                  ctrl.reflow();
                }
              }
              dirtyCtrls = {};
            }, domGlobals.document.body);
          }
        }
      },
      remove: function (ctrl) {
        if (dirtyCtrls[ctrl._id]) {
          delete dirtyCtrls[ctrl._id];
        }
      }
    };

    var getUiContainerDelta = function (ctrl) {
      var uiContainer = getUiContainer(ctrl);
      if (uiContainer && global$2.DOM.getStyle(uiContainer, 'position', true) !== 'static') {
        var containerPos = global$2.DOM.getPos(uiContainer);
        var dx = uiContainer.scrollLeft - containerPos.x;
        var dy = uiContainer.scrollTop - containerPos.y;
        return Option.some({
          x: dx,
          y: dy
        });
      } else {
        return Option.none();
      }
    };
    var setUiContainer = function (editor, ctrl) {
      var uiContainer = global$2.DOM.select(editor.settings.ui_container)[0];
      ctrl.getRoot().uiContainer = uiContainer;
    };
    var getUiContainer = function (ctrl) {
      return ctrl ? ctrl.getRoot().uiContainer : null;
    };
    var inheritUiContainer = function (fromCtrl, toCtrl) {
      return toCtrl.uiContainer = getUiContainer(fromCtrl);
    };
    var UiContainer = {
      getUiContainerDelta: getUiContainerDelta,
      setUiContainer: setUiContainer,
      getUiContainer: getUiContainer,
      inheritUiContainer: inheritUiContainer
    };

    var hasMouseWheelEventSupport = 'onmousewheel' in domGlobals.document;
    var hasWheelEventSupport = false;
    var classPrefix = 'mce-';
    var Control, idCounter = 0;
    var proto$1 = {
      Statics: { classPrefix: classPrefix },
      isRtl: function () {
        return Control.rtl;
      },
      classPrefix: classPrefix,
      init: function (settings) {
        var self = this;
        var classes, defaultClasses;
        function applyClasses(classes) {
          var i;
          classes = classes.split(' ');
          for (i = 0; i < classes.length; i++) {
            self.classes.add(classes[i]);
          }
        }
        self.settings = settings = global$4.extend({}, self.Defaults, settings);
        self._id = settings.id || 'mceu_' + idCounter++;
        self._aria = { role: settings.role };
        self._elmCache = {};
        self.$ = global$7;
        self.state = new ObservableObject({
          visible: true,
          active: false,
          disabled: false,
          value: ''
        });
        self.data = new ObservableObject(settings.data);
        self.classes = new ClassList(function () {
          if (self.state.get('rendered')) {
            self.getEl().className = this.toString();
          }
        });
        self.classes.prefix = self.classPrefix;
        classes = settings.classes;
        if (classes) {
          if (self.Defaults) {
            defaultClasses = self.Defaults.classes;
            if (defaultClasses && classes !== defaultClasses) {
              applyClasses(defaultClasses);
            }
          }
          applyClasses(classes);
        }
        global$4.each('title text name visible disabled active value'.split(' '), function (name) {
          if (name in settings) {
            self[name](settings[name]);
          }
        });
        self.on('click', function () {
          if (self.disabled()) {
            return false;
          }
        });
        self.settings = settings;
        self.borderBox = BoxUtils.parseBox(settings.border);
        self.paddingBox = BoxUtils.parseBox(settings.padding);
        self.marginBox = BoxUtils.parseBox(settings.margin);
        if (settings.hidden) {
          self.hide();
        }
      },
      Properties: 'parent,name',
      getContainerElm: function () {
        var uiContainer = UiContainer.getUiContainer(this);
        return uiContainer ? uiContainer : funcs.getContainer();
      },
      getParentCtrl: function (elm) {
        var ctrl;
        var lookup = this.getRoot().controlIdLookup;
        while (elm && lookup) {
          ctrl = lookup[elm.id];
          if (ctrl) {
            break;
          }
          elm = elm.parentNode;
        }
        return ctrl;
      },
      initLayoutRect: function () {
        var self = this;
        var settings = self.settings;
        var borderBox, layoutRect;
        var elm = self.getEl();
        var width, height, minWidth, minHeight, autoResize;
        var startMinWidth, startMinHeight, initialSize;
        borderBox = self.borderBox = self.borderBox || BoxUtils.measureBox(elm, 'border');
        self.paddingBox = self.paddingBox || BoxUtils.measureBox(elm, 'padding');
        self.marginBox = self.marginBox || BoxUtils.measureBox(elm, 'margin');
        initialSize = funcs.getSize(elm);
        startMinWidth = settings.minWidth;
        startMinHeight = settings.minHeight;
        minWidth = startMinWidth || initialSize.width;
        minHeight = startMinHeight || initialSize.height;
        width = settings.width;
        height = settings.height;
        autoResize = settings.autoResize;
        autoResize = typeof autoResize !== 'undefined' ? autoResize : !width && !height;
        width = width || minWidth;
        height = height || minHeight;
        var deltaW = borderBox.left + borderBox.right;
        var deltaH = borderBox.top + borderBox.bottom;
        var maxW = settings.maxWidth || 65535;
        var maxH = settings.maxHeight || 65535;
        self._layoutRect = layoutRect = {
          x: settings.x || 0,
          y: settings.y || 0,
          w: width,
          h: height,
          deltaW: deltaW,
          deltaH: deltaH,
          contentW: width - deltaW,
          contentH: height - deltaH,
          innerW: width - deltaW,
          innerH: height - deltaH,
          startMinWidth: startMinWidth || 0,
          startMinHeight: startMinHeight || 0,
          minW: Math.min(minWidth, maxW),
          minH: Math.min(minHeight, maxH),
          maxW: maxW,
          maxH: maxH,
          autoResize: autoResize,
          scrollW: 0
        };
        self._lastLayoutRect = {};
        return layoutRect;
      },
      layoutRect: function (newRect) {
        var self = this;
        var curRect = self._layoutRect, lastLayoutRect, size, deltaWidth, deltaHeight, repaintControls;
        if (!curRect) {
          curRect = self.initLayoutRect();
        }
        if (newRect) {
          deltaWidth = curRect.deltaW;
          deltaHeight = curRect.deltaH;
          if (newRect.x !== undefined) {
            curRect.x = newRect.x;
          }
          if (newRect.y !== undefined) {
            curRect.y = newRect.y;
          }
          if (newRect.minW !== undefined) {
            curRect.minW = newRect.minW;
          }
          if (newRect.minH !== undefined) {
            curRect.minH = newRect.minH;
          }
          size = newRect.w;
          if (size !== undefined) {
            size = size < curRect.minW ? curRect.minW : size;
            size = size > curRect.maxW ? curRect.maxW : size;
            curRect.w = size;
            curRect.innerW = size - deltaWidth;
          }
          size = newRect.h;
          if (size !== undefined) {
            size = size < curRect.minH ? curRect.minH : size;
            size = size > curRect.maxH ? curRect.maxH : size;
            curRect.h = size;
            curRect.innerH = size - deltaHeight;
          }
          size = newRect.innerW;
          if (size !== undefined) {
            size = size < curRect.minW - deltaWidth ? curRect.minW - deltaWidth : size;
            size = size > curRect.maxW - deltaWidth ? curRect.maxW - deltaWidth : size;
            curRect.innerW = size;
            curRect.w = size + deltaWidth;
          }
          size = newRect.innerH;
          if (size !== undefined) {
            size = size < curRect.minH - deltaHeight ? curRect.minH - deltaHeight : size;
            size = size > curRect.maxH - deltaHeight ? curRect.maxH - deltaHeight : size;
            curRect.innerH = size;
            curRect.h = size + deltaHeight;
          }
          if (newRect.contentW !== undefined) {
            curRect.contentW = newRect.contentW;
          }
          if (newRect.contentH !== undefined) {
            curRect.contentH = newRect.contentH;
          }
          lastLayoutRect = self._lastLayoutRect;
          if (lastLayoutRect.x !== curRect.x || lastLayoutRect.y !== curRect.y || lastLayoutRect.w !== curRect.w || lastLayoutRect.h !== curRect.h) {
            repaintControls = Control.repaintControls;
            if (repaintControls) {
              if (repaintControls.map && !repaintControls.map[self._id]) {
                repaintControls.push(self);
                repaintControls.map[self._id] = true;
              }
            }
            lastLayoutRect.x = curRect.x;
            lastLayoutRect.y = curRect.y;
            lastLayoutRect.w = curRect.w;
            lastLayoutRect.h = curRect.h;
          }
          return self;
        }
        return curRect;
      },
      repaint: function () {
        var self = this;
        var style, bodyStyle, bodyElm, rect, borderBox;
        var borderW, borderH, lastRepaintRect, round, value;
        round = !domGlobals.document.createRange ? Math.round : function (value) {
          return value;
        };
        style = self.getEl().style;
        rect = self._layoutRect;
        lastRepaintRect = self._lastRepaintRect || {};
        borderBox = self.borderBox;
        borderW = borderBox.left + borderBox.right;
        borderH = borderBox.top + borderBox.bottom;
        if (rect.x !== lastRepaintRect.x) {
          style.left = round(rect.x) + 'px';
          lastRepaintRect.x = rect.x;
        }
        if (rect.y !== lastRepaintRect.y) {
          style.top = round(rect.y) + 'px';
          lastRepaintRect.y = rect.y;
        }
        if (rect.w !== lastRepaintRect.w) {
          value = round(rect.w - borderW);
          style.width = (value >= 0 ? value : 0) + 'px';
          lastRepaintRect.w = rect.w;
        }
        if (rect.h !== lastRepaintRect.h) {
          value = round(rect.h - borderH);
          style.height = (value >= 0 ? value : 0) + 'px';
          lastRepaintRect.h = rect.h;
        }
        if (self._hasBody && rect.innerW !== lastRepaintRect.innerW) {
          value = round(rect.innerW);
          bodyElm = self.getEl('body');
          if (bodyElm) {
            bodyStyle = bodyElm.style;
            bodyStyle.width = (value >= 0 ? value : 0) + 'px';
          }
          lastRepaintRect.innerW = rect.innerW;
        }
        if (self._hasBody && rect.innerH !== lastRepaintRect.innerH) {
          value = round(rect.innerH);
          bodyElm = bodyElm || self.getEl('body');
          if (bodyElm) {
            bodyStyle = bodyStyle || bodyElm.style;
            bodyStyle.height = (value >= 0 ? value : 0) + 'px';
          }
          lastRepaintRect.innerH = rect.innerH;
        }
        self._lastRepaintRect = lastRepaintRect;
        self.fire('repaint', {}, false);
      },
      updateLayoutRect: function () {
        var self = this;
        self.parent()._lastRect = null;
        funcs.css(self.getEl(), {
          width: '',
          height: ''
        });
        self._layoutRect = self._lastRepaintRect = self._lastLayoutRect = null;
        self.initLayoutRect();
      },
      on: function (name, callback) {
        var self = this;
        function resolveCallbackName(name) {
          var callback, scope;
          if (typeof name !== 'string') {
            return name;
          }
          return function (e) {
            if (!callback) {
              self.parentsAndSelf().each(function (ctrl) {
                var callbacks = ctrl.settings.callbacks;
                if (callbacks && (callback = callbacks[name])) {
                  scope = ctrl;
                  return false;
                }
              });
            }
            if (!callback) {
              e.action = name;
              this.fire('execute', e);
              return;
            }
            return callback.call(scope, e);
          };
        }
        getEventDispatcher(self).on(name, resolveCallbackName(callback));
        return self;
      },
      off: function (name, callback) {
        getEventDispatcher(this).off(name, callback);
        return this;
      },
      fire: function (name, args, bubble) {
        var self = this;
        args = args || {};
        if (!args.control) {
          args.control = self;
        }
        args = getEventDispatcher(self).fire(name, args);
        if (bubble !== false && self.parent) {
          var parent = self.parent();
          while (parent && !args.isPropagationStopped()) {
            parent.fire(name, args, false);
            parent = parent.parent();
          }
        }
        return args;
      },
      hasEventListeners: function (name) {
        return getEventDispatcher(this).has(name);
      },
      parents: function (selector) {
        var self = this;
        var ctrl, parents = new Collection$2();
        for (ctrl = self.parent(); ctrl; ctrl = ctrl.parent()) {
          parents.add(ctrl);
        }
        if (selector) {
          parents = parents.filter(selector);
        }
        return parents;
      },
      parentsAndSelf: function (selector) {
        return new Collection$2(this).add(this.parents(selector));
      },
      next: function () {
        var parentControls = this.parent().items();
        return parentControls[parentControls.indexOf(this) + 1];
      },
      prev: function () {
        var parentControls = this.parent().items();
        return parentControls[parentControls.indexOf(this) - 1];
      },
      innerHtml: function (html) {
        this.$el.html(html);
        return this;
      },
      getEl: function (suffix) {
        var id = suffix ? this._id + '-' + suffix : this._id;
        if (!this._elmCache[id]) {
          this._elmCache[id] = global$7('#' + id)[0];
        }
        return this._elmCache[id];
      },
      show: function () {
        return this.visible(true);
      },
      hide: function () {
        return this.visible(false);
      },
      focus: function () {
        try {
          this.getEl().focus();
        } catch (ex) {
        }
        return this;
      },
      blur: function () {
        this.getEl().blur();
        return this;
      },
      aria: function (name, value) {
        var self = this, elm = self.getEl(self.ariaTarget);
        if (typeof value === 'undefined') {
          return self._aria[name];
        }
        self._aria[name] = value;
        if (self.state.get('rendered')) {
          elm.setAttribute(name === 'role' ? name : 'aria-' + name, value);
        }
        return self;
      },
      encode: function (text, translate) {
        if (translate !== false) {
          text = this.translate(text);
        }
        return (text || '').replace(/[&<>"]/g, function (match) {
          return '&#' + match.charCodeAt(0) + ';';
        });
      },
      translate: function (text) {
        return Control.translate ? Control.translate(text) : text;
      },
      before: function (items) {
        var self = this, parent = self.parent();
        if (parent) {
          parent.insert(items, parent.items().indexOf(self), true);
        }
        return self;
      },
      after: function (items) {
        var self = this, parent = self.parent();
        if (parent) {
          parent.insert(items, parent.items().indexOf(self));
        }
        return self;
      },
      remove: function () {
        var self = this;
        var elm = self.getEl();
        var parent = self.parent();
        var newItems, i;
        if (self.items) {
          var controls = self.items().toArray();
          i = controls.length;
          while (i--) {
            controls[i].remove();
          }
        }
        if (parent && parent.items) {
          newItems = [];
          parent.items().each(function (item) {
            if (item !== self) {
              newItems.push(item);
            }
          });
          parent.items().set(newItems);
          parent._lastRect = null;
        }
        if (self._eventsRoot && self._eventsRoot === self) {
          global$7(elm).off();
        }
        var lookup = self.getRoot().controlIdLookup;
        if (lookup) {
          delete lookup[self._id];
        }
        if (elm && elm.parentNode) {
          elm.parentNode.removeChild(elm);
        }
        self.state.set('rendered', false);
        self.state.destroy();
        self.fire('remove');
        return self;
      },
      renderBefore: function (elm) {
        global$7(elm).before(this.renderHtml());
        this.postRender();
        return this;
      },
      renderTo: function (elm) {
        global$7(elm || this.getContainerElm()).append(this.renderHtml());
        this.postRender();
        return this;
      },
      preRender: function () {
      },
      render: function () {
      },
      renderHtml: function () {
        return '<div id="' + this._id + '" class="' + this.classes + '"></div>';
      },
      postRender: function () {
        var self = this;
        var settings = self.settings;
        var elm, box, parent, name, parentEventsRoot;
        self.$el = global$7(self.getEl());
        self.state.set('rendered', true);
        for (name in settings) {
          if (name.indexOf('on') === 0) {
            self.on(name.substr(2), settings[name]);
          }
        }
        if (self._eventsRoot) {
          for (parent = self.parent(); !parentEventsRoot && parent; parent = parent.parent()) {
            parentEventsRoot = parent._eventsRoot;
          }
          if (parentEventsRoot) {
            for (name in parentEventsRoot._nativeEvents) {
              self._nativeEvents[name] = true;
            }
          }
        }
        bindPendingEvents(self);
        if (settings.style) {
          elm = self.getEl();
          if (elm) {
            elm.setAttribute('style', settings.style);
            elm.style.cssText = settings.style;
          }
        }
        if (self.settings.border) {
          box = self.borderBox;
          self.$el.css({
            'border-top-width': box.top,
            'border-right-width': box.right,
            'border-bottom-width': box.bottom,
            'border-left-width': box.left
          });
        }
        var root = self.getRoot();
        if (!root.controlIdLookup) {
          root.controlIdLookup = {};
        }
        root.controlIdLookup[self._id] = self;
        for (var key in self._aria) {
          self.aria(key, self._aria[key]);
        }
        if (self.state.get('visible') === false) {
          self.getEl().style.display = 'none';
        }
        self.bindStates();
        self.state.on('change:visible', function (e) {
          var state = e.value;
          var parentCtrl;
          if (self.state.get('rendered')) {
            self.getEl().style.display = state === false ? 'none' : '';
            self.getEl().getBoundingClientRect();
          }
          parentCtrl = self.parent();
          if (parentCtrl) {
            parentCtrl._lastRect = null;
          }
          self.fire(state ? 'show' : 'hide');
          ReflowQueue.add(self);
        });
        self.fire('postrender', {}, false);
      },
      bindStates: function () {
      },
      scrollIntoView: function (align) {
        function getOffset(elm, rootElm) {
          var x, y, parent = elm;
          x = y = 0;
          while (parent && parent !== rootElm && parent.nodeType) {
            x += parent.offsetLeft || 0;
            y += parent.offsetTop || 0;
            parent = parent.offsetParent;
          }
          return {
            x: x,
            y: y
          };
        }
        var elm = this.getEl(), parentElm = elm.parentNode;
        var x, y, width, height, parentWidth, parentHeight;
        var pos = getOffset(elm, parentElm);
        x = pos.x;
        y = pos.y;
        width = elm.offsetWidth;
        height = elm.offsetHeight;
        parentWidth = parentElm.clientWidth;
        parentHeight = parentElm.clientHeight;
        if (align === 'end') {
          x -= parentWidth - width;
          y -= parentHeight - height;
        } else if (align === 'center') {
          x -= parentWidth / 2 - width / 2;
          y -= parentHeight / 2 - height / 2;
        }
        parentElm.scrollLeft = x;
        parentElm.scrollTop = y;
        return this;
      },
      getRoot: function () {
        var ctrl = this, rootControl;
        var parents = [];
        while (ctrl) {
          if (ctrl.rootControl) {
            rootControl = ctrl.rootControl;
            break;
          }
          parents.push(ctrl);
          rootControl = ctrl;
          ctrl = ctrl.parent();
        }
        if (!rootControl) {
          rootControl = this;
        }
        var i = parents.length;
        while (i--) {
          parents[i].rootControl = rootControl;
        }
        return rootControl;
      },
      reflow: function () {
        ReflowQueue.remove(this);
        var parent = this.parent();
        if (parent && parent._layout && !parent._layout.isNative()) {
          parent.reflow();
        }
        return this;
      }
    };
    global$4.each('text title visible disabled active value'.split(' '), function (name) {
      proto$1[name] = function (value) {
        if (arguments.length === 0) {
          return this.state.get(name);
        }
        if (typeof value !== 'undefined') {
          this.state.set(name, value);
        }
        return this;
      };
    });
    Control = global$8.extend(proto$1);
    function getEventDispatcher(obj) {
      if (!obj._eventDispatcher) {
        obj._eventDispatcher = new global$9({
          scope: obj,
          toggleEvent: function (name, state) {
            if (state && global$9.isNative(name)) {
              if (!obj._nativeEvents) {
                obj._nativeEvents = {};
              }
              obj._nativeEvents[name] = true;
              if (obj.state.get('rendered')) {
                bindPendingEvents(obj);
              }
            }
          }
        });
      }
      return obj._eventDispatcher;
    }
    function bindPendingEvents(eventCtrl) {
      var i, l, parents, eventRootCtrl, nativeEvents, name;
      function delegate(e) {
        var control = eventCtrl.getParentCtrl(e.target);
        if (control) {
          control.fire(e.type, e);
        }
      }
      function mouseLeaveHandler() {
        var ctrl = eventRootCtrl._lastHoverCtrl;
        if (ctrl) {
          ctrl.fire('mouseleave', { target: ctrl.getEl() });
          ctrl.parents().each(function (ctrl) {
            ctrl.fire('mouseleave', { target: ctrl.getEl() });
          });
          eventRootCtrl._lastHoverCtrl = null;
        }
      }
      function mouseEnterHandler(e) {
        var ctrl = eventCtrl.getParentCtrl(e.target), lastCtrl = eventRootCtrl._lastHoverCtrl, idx = 0, i, parents, lastParents;
        if (ctrl !== lastCtrl) {
          eventRootCtrl._lastHoverCtrl = ctrl;
          parents = ctrl.parents().toArray().reverse();
          parents.push(ctrl);
          if (lastCtrl) {
            lastParents = lastCtrl.parents().toArray().reverse();
            lastParents.push(lastCtrl);
            for (idx = 0; idx < lastParents.length; idx++) {
              if (parents[idx] !== lastParents[idx]) {
                break;
              }
            }
            for (i = lastParents.length - 1; i >= idx; i--) {
              lastCtrl = lastParents[i];
              lastCtrl.fire('mouseleave', { target: lastCtrl.getEl() });
            }
          }
          for (i = idx; i < parents.length; i++) {
            ctrl = parents[i];
            ctrl.fire('mouseenter', { target: ctrl.getEl() });
          }
        }
      }
      function fixWheelEvent(e) {
        e.preventDefault();
        if (e.type === 'mousewheel') {
          e.deltaY = -1 / 40 * e.wheelDelta;
          if (e.wheelDeltaX) {
            e.deltaX = -1 / 40 * e.wheelDeltaX;
          }
        } else {
          e.deltaX = 0;
          e.deltaY = e.detail;
        }
        e = eventCtrl.fire('wheel', e);
      }
      nativeEvents = eventCtrl._nativeEvents;
      if (nativeEvents) {
        parents = eventCtrl.parents().toArray();
        parents.unshift(eventCtrl);
        for (i = 0, l = parents.length; !eventRootCtrl && i < l; i++) {
          eventRootCtrl = parents[i]._eventsRoot;
        }
        if (!eventRootCtrl) {
          eventRootCtrl = parents[parents.length - 1] || eventCtrl;
        }
        eventCtrl._eventsRoot = eventRootCtrl;
        for (l = i, i = 0; i < l; i++) {
          parents[i]._eventsRoot = eventRootCtrl;
        }
        var eventRootDelegates = eventRootCtrl._delegates;
        if (!eventRootDelegates) {
          eventRootDelegates = eventRootCtrl._delegates = {};
        }
        for (name in nativeEvents) {
          if (!nativeEvents) {
            return false;
          }
          if (name === 'wheel' && !hasWheelEventSupport) {
            if (hasMouseWheelEventSupport) {
              global$7(eventCtrl.getEl()).on('mousewheel', fixWheelEvent);
            } else {
              global$7(eventCtrl.getEl()).on('DOMMouseScroll', fixWheelEvent);
            }
            continue;
          }
          if (name === 'mouseenter' || name === 'mouseleave') {
            if (!eventRootCtrl._hasMouseEnter) {
              global$7(eventRootCtrl.getEl()).on('mouseleave', mouseLeaveHandler).on('mouseover', mouseEnterHandler);
              eventRootCtrl._hasMouseEnter = 1;
            }
          } else if (!eventRootDelegates[name]) {
            global$7(eventRootCtrl.getEl()).on(name, delegate);
            eventRootDelegates[name] = true;
          }
          nativeEvents[name] = false;
        }
      }
    }
    var Control$1 = Control;

    var isStatic = function (elm) {
      return funcs.getRuntimeStyle(elm, 'position') === 'static';
    };
    var isFixed = function (ctrl) {
      return ctrl.state.get('fixed');
    };
    function calculateRelativePosition(ctrl, targetElm, rel) {
      var ctrlElm, pos, x, y, selfW, selfH, targetW, targetH, viewport, size;
      viewport = getWindowViewPort();
      pos = funcs.getPos(targetElm, UiContainer.getUiContainer(ctrl));
      x = pos.x;
      y = pos.y;
      if (isFixed(ctrl) && isStatic(domGlobals.document.body)) {
        x -= viewport.x;
        y -= viewport.y;
      }
      ctrlElm = ctrl.getEl();
      size = funcs.getSize(ctrlElm);
      selfW = size.width;
      selfH = size.height;
      size = funcs.getSize(targetElm);
      targetW = size.width;
      targetH = size.height;
      rel = (rel || '').split('');
      if (rel[0] === 'b') {
        y += targetH;
      }
      if (rel[1] === 'r') {
        x += targetW;
      }
      if (rel[0] === 'c') {
        y += Math.round(targetH / 2);
      }
      if (rel[1] === 'c') {
        x += Math.round(targetW / 2);
      }
      if (rel[3] === 'b') {
        y -= selfH;
      }
      if (rel[4] === 'r') {
        x -= selfW;
      }
      if (rel[3] === 'c') {
        y -= Math.round(selfH / 2);
      }
      if (rel[4] === 'c') {
        x -= Math.round(selfW / 2);
      }
      return {
        x: x,
        y: y,
        w: selfW,
        h: selfH
      };
    }
    var getUiContainerViewPort = function (customUiContainer) {
      return {
        x: 0,
        y: 0,
        w: customUiContainer.scrollWidth - 1,
        h: customUiContainer.scrollHeight - 1
      };
    };
    var getWindowViewPort = function () {
      var win = domGlobals.window;
      var x = Math.max(win.pageXOffset, domGlobals.document.body.scrollLeft, domGlobals.document.documentElement.scrollLeft);
      var y = Math.max(win.pageYOffset, domGlobals.document.body.scrollTop, domGlobals.document.documentElement.scrollTop);
      var w = win.innerWidth || domGlobals.document.documentElement.clientWidth;
      var h = win.innerHeight || domGlobals.document.documentElement.clientHeight;
      return {
        x: x,
        y: y,
        w: w,
        h: h
      };
    };
    var getViewPortRect = function (ctrl) {
      var customUiContainer = UiContainer.getUiContainer(ctrl);
      return customUiContainer && !isFixed(ctrl) ? getUiContainerViewPort(customUiContainer) : getWindowViewPort();
    };
    var Movable = {
      testMoveRel: function (elm, rels) {
        var viewPortRect = getViewPortRect(this);
        for (var i = 0; i < rels.length; i++) {
          var pos = calculateRelativePosition(this, elm, rels[i]);
          if (isFixed(this)) {
            if (pos.x > 0 && pos.x + pos.w < viewPortRect.w && pos.y > 0 && pos.y + pos.h < viewPortRect.h) {
              return rels[i];
            }
          } else {
            if (pos.x > viewPortRect.x && pos.x + pos.w < viewPortRect.w + viewPortRect.x && pos.y > viewPortRect.y && pos.y + pos.h < viewPortRect.h + viewPortRect.y) {
              return rels[i];
            }
          }
        }
        return rels[0];
      },
      moveRel: function (elm, rel) {
        if (typeof rel !== 'string') {
          rel = this.testMoveRel(elm, rel);
        }
        var pos = calculateRelativePosition(this, elm, rel);
        return this.moveTo(pos.x, pos.y);
      },
      moveBy: function (dx, dy) {
        var self = this, rect = self.layoutRect();
        self.moveTo(rect.x + dx, rect.y + dy);
        return self;
      },
      moveTo: function (x, y) {
        var self = this;
        function constrain(value, max, size) {
          if (value < 0) {
            return 0;
          }
          if (value + size > max) {
            value = max - size;
            return value < 0 ? 0 : value;
          }
          return value;
        }
        if (self.settings.constrainToViewport) {
          var viewPortRect = getViewPortRect(this);
          var layoutRect = self.layoutRect();
          x = constrain(x, viewPortRect.w + viewPortRect.x, layoutRect.w);
          y = constrain(y, viewPortRect.h + viewPortRect.y, layoutRect.h);
        }
        var uiContainer = UiContainer.getUiContainer(self);
        if (uiContainer && isStatic(uiContainer) && !isFixed(self)) {
          x -= uiContainer.scrollLeft;
          y -= uiContainer.scrollTop;
        }
        if (uiContainer) {
          x += 1;
          y += 1;
        }
        if (self.state.get('rendered')) {
          self.layoutRect({
            x: x,
            y: y
          }).repaint();
        } else {
          self.settings.x = x;
          self.settings.y = y;
        }
        self.fire('move', {
          x: x,
          y: y
        });
        return self;
      }
    };

    var Tooltip = Control$1.extend({
      Mixins: [Movable],
      Defaults: { classes: 'widget tooltip tooltip-n' },
      renderHtml: function () {
        var self = this, prefix = self.classPrefix;
        return '<div id="' + self._id + '" class="' + self.classes + '" role="presentation">' + '<div class="' + prefix + 'tooltip-arrow"></div>' + '<div class="' + prefix + 'tooltip-inner">' + self.encode(self.state.get('text')) + '</div>' + '</div>';
      },
      bindStates: function () {
        var self = this;
        self.state.on('change:text', function (e) {
          self.getEl().lastChild.innerHTML = self.encode(e.value);
        });
        return self._super();
      },
      repaint: function () {
        var self = this;
        var style, rect;
        style = self.getEl().style;
        rect = self._layoutRect;
        style.left = rect.x + 'px';
        style.top = rect.y + 'px';
        style.zIndex = 65535 + 65535;
      }
    });

    var Widget = Control$1.extend({
      init: function (settings) {
        var self = this;
        self._super(settings);
        settings = self.settings;
        self.canFocus = true;
        if (settings.tooltip && Widget.tooltips !== false) {
          self.on('mouseenter', function (e) {
            var tooltip = self.tooltip().moveTo(-65535);
            if (e.control === self) {
              var rel = tooltip.text(settings.tooltip).show().testMoveRel(self.getEl(), [
                'bc-tc',
                'bc-tl',
                'bc-tr'
              ]);
              tooltip.classes.toggle('tooltip-n', rel === 'bc-tc');
              tooltip.classes.toggle('tooltip-nw', rel === 'bc-tl');
              tooltip.classes.toggle('tooltip-ne', rel === 'bc-tr');
              tooltip.moveRel(self.getEl(), rel);
            } else {
              tooltip.hide();
            }
          });
          self.on('mouseleave mousedown click', function () {
            self.tooltip().remove();
            self._tooltip = null;
          });
        }
        self.aria('label', settings.ariaLabel || settings.tooltip);
      },
      tooltip: function () {
        if (!this._tooltip) {
          this._tooltip = new Tooltip({ type: 'tooltip' });
          UiContainer.inheritUiContainer(this, this._tooltip);
          this._tooltip.renderTo();
        }
        return this._tooltip;
      },
      postRender: function () {
        var self = this, settings = self.settings;
        self._super();
        if (!self.parent() && (settings.width || settings.height)) {
          self.initLayoutRect();
          self.repaint();
        }
        if (settings.autofocus) {
          self.focus();
        }
      },
      bindStates: function () {
        var self = this;
        function disable(state) {
          self.aria('disabled', state);
          self.classes.toggle('disabled', state);
        }
        function active(state) {
          self.aria('pressed', state);
          self.classes.toggle('active', state);
        }
        self.state.on('change:disabled', function (e) {
          disable(e.value);
        });
        self.state.on('change:active', function (e) {
          active(e.value);
        });
        if (self.state.get('disabled')) {
          disable(true);
        }
        if (self.state.get('active')) {
          active(true);
        }
        return self._super();
      },
      remove: function () {
        this._super();
        if (this._tooltip) {
          this._tooltip.remove();
          this._tooltip = null;
        }
      }
    });

    var Progress = Widget.extend({
      Defaults: { value: 0 },
      init: function (settings) {
        var self = this;
        self._super(settings);
        self.classes.add('progress');
        if (!self.settings.filter) {
          self.settings.filter = function (value) {
            return Math.round(value);
          };
        }
      },
      renderHtml: function () {
        var self = this, id = self._id, prefix = this.classPrefix;
        return '<div id="' + id + '" class="' + self.classes + '">' + '<div class="' + prefix + 'bar-container">' + '<div class="' + prefix + 'bar"></div>' + '</div>' + '<div class="' + prefix + 'text">0%</div>' + '</div>';
      },
      postRender: function () {
        var self = this;
        self._super();
        self.value(self.settings.value);
        return self;
      },
      bindStates: function () {
        var self = this;
        function setValue(value) {
          value = self.settings.filter(value);
          self.getEl().lastChild.innerHTML = value + '%';
          self.getEl().firstChild.firstChild.style.width = value + '%';
        }
        self.state.on('change:value', function (e) {
          setValue(e.value);
        });
        setValue(self.state.get('value'));
        return self._super();
      }
    });

    var updateLiveRegion = function (ctx, text) {
      ctx.getEl().lastChild.textContent = text + (ctx.progressBar ? ' ' + ctx.progressBar.value() + '%' : '');
    };
    var Notification = Control$1.extend({
      Mixins: [Movable],
      Defaults: { classes: 'widget notification' },
      init: function (settings) {
        var self = this;
        self._super(settings);
        self.maxWidth = settings.maxWidth;
        if (settings.text) {
          self.text(settings.text);
        }
        if (settings.icon) {
          self.icon = settings.icon;
        }
        if (settings.color) {
          self.color = settings.color;
        }
        if (settings.type) {
          self.classes.add('notification-' + settings.type);
        }
        if (settings.timeout && (settings.timeout < 0 || settings.timeout > 0) && !settings.closeButton) {
          self.closeButton = false;
        } else {
          self.classes.add('has-close');
          self.closeButton = true;
        }
        if (settings.progressBar) {
          self.progressBar = new Progress();
        }
        self.on('click', function (e) {
          if (e.target.className.indexOf(self.classPrefix + 'close') !== -1) {
            self.close();
          }
        });
      },
      renderHtml: function () {
        var self = this;
        var prefix = self.classPrefix;
        var icon = '', closeButton = '', progressBar = '', notificationStyle = '';
        if (self.icon) {
          icon = '<i class="' + prefix + 'ico' + ' ' + prefix + 'i-' + self.icon + '"></i>';
        }
        notificationStyle = ' style="max-width: ' + self.maxWidth + 'px;' + (self.color ? 'background-color: ' + self.color + ';"' : '"');
        if (self.closeButton) {
          closeButton = '<button type="button" class="' + prefix + 'close" aria-hidden="true">\xD7</button>';
        }
        if (self.progressBar) {
          progressBar = self.progressBar.renderHtml();
        }
        return '<div id="' + self._id + '" class="' + self.classes + '"' + notificationStyle + ' role="presentation">' + icon + '<div class="' + prefix + 'notification-inner">' + self.state.get('text') + '</div>' + progressBar + closeButton + '<div style="clip: rect(1px, 1px, 1px, 1px);height: 1px;overflow: hidden;position: absolute;width: 1px;"' + ' aria-live="assertive" aria-relevant="additions" aria-atomic="true"></div>' + '</div>';
      },
      postRender: function () {
        var self = this;
        global$3.setTimeout(function () {
          self.$el.addClass(self.classPrefix + 'in');
          updateLiveRegion(self, self.state.get('text'));
        }, 100);
        return self._super();
      },
      bindStates: function () {
        var self = this;
        self.state.on('change:text', function (e) {
          self.getEl().firstChild.innerHTML = e.value;
          updateLiveRegion(self, e.value);
        });
        if (self.progressBar) {
          self.progressBar.bindStates();
          self.progressBar.state.on('change:value', function (e) {
            updateLiveRegion(self, self.state.get('text'));
          });
        }
        return self._super();
      },
      close: function () {
        var self = this;
        if (!self.fire('close').isDefaultPrevented()) {
          self.remove();
        }
        return self;
      },
      repaint: function () {
        var self = this;
        var style, rect;
        style = self.getEl().style;
        rect = self._layoutRect;
        style.left = rect.x + 'px';
        style.top = rect.y + 'px';
        style.zIndex = 65535 - 1;
      }
    });

    function NotificationManagerImpl (editor) {
      var getEditorContainer = function (editor) {
        return editor.inline ? editor.getElement() : editor.getContentAreaContainer();
      };
      var getContainerWidth = function () {
        var container = getEditorContainer(editor);
        return funcs.getSize(container).width;
      };
      var prePositionNotifications = function (notifications) {
        each(notifications, function (notification) {
          notification.moveTo(0, 0);
        });
      };
      var positionNotifications = function (notifications) {
        if (notifications.length > 0) {
          var firstItem = notifications.slice(0, 1)[0];
          var container = getEditorContainer(editor);
          firstItem.moveRel(container, 'tc-tc');
          each(notifications, function (notification, index) {
            if (index > 0) {
              notification.moveRel(notifications[index - 1].getEl(), 'bc-tc');
            }
          });
        }
      };
      var reposition = function (notifications) {
        prePositionNotifications(notifications);
        positionNotifications(notifications);
      };
      var open = function (args, closeCallback) {
        var extendedArgs = global$4.extend(args, { maxWidth: getContainerWidth() });
        var notif = new Notification(extendedArgs);
        notif.args = extendedArgs;
        if (extendedArgs.timeout > 0) {
          notif.timer = setTimeout(function () {
            notif.close();
            closeCallback();
          }, extendedArgs.timeout);
        }
        notif.on('close', function () {
          closeCallback();
        });
        notif.renderTo();
        return notif;
      };
      var close = function (notification) {
        notification.close();
      };
      var getArgs = function (notification) {
        return notification.args;
      };
      return {
        open: open,
        close: close,
        reposition: reposition,
        getArgs: getArgs
      };
    }

    function getDocumentSize(doc) {
      var documentElement, body, scrollWidth, clientWidth;
      var offsetWidth, scrollHeight, clientHeight, offsetHeight;
      var max = Math.max;
      documentElement = doc.documentElement;
      body = doc.body;
      scrollWidth = max(documentElement.scrollWidth, body.scrollWidth);
      clientWidth = max(documentElement.clientWidth, body.clientWidth);
      offsetWidth = max(documentElement.offsetWidth, body.offsetWidth);
      scrollHeight = max(documentElement.scrollHeight, body.scrollHeight);
      clientHeight = max(documentElement.clientHeight, body.clientHeight);
      offsetHeight = max(documentElement.offsetHeight, body.offsetHeight);
      return {
        width: scrollWidth < offsetWidth ? clientWidth : scrollWidth,
        height: scrollHeight < offsetHeight ? clientHeight : scrollHeight
      };
    }
    function updateWithTouchData(e) {
      var keys, i;
      if (e.changedTouches) {
        keys = 'screenX screenY pageX pageY clientX clientY'.split(' ');
        for (i = 0; i < keys.length; i++) {
          e[keys[i]] = e.changedTouches[0][keys[i]];
        }
      }
    }
    function DragHelper (id, settings) {
      var $eventOverlay;
      var doc = settings.document || domGlobals.document;
      var downButton;
      var start, stop, drag, startX, startY;
      settings = settings || {};
      var handleElement = doc.getElementById(settings.handle || id);
      start = function (e) {
        var docSize = getDocumentSize(doc);
        var handleElm, cursor;
        updateWithTouchData(e);
        e.preventDefault();
        downButton = e.button;
        handleElm = handleElement;
        startX = e.screenX;
        startY = e.screenY;
        if (domGlobals.window.getComputedStyle) {
          cursor = domGlobals.window.getComputedStyle(handleElm, null).getPropertyValue('cursor');
        } else {
          cursor = handleElm.runtimeStyle.cursor;
        }
        $eventOverlay = global$7('<div></div>').css({
          position: 'absolute',
          top: 0,
          left: 0,
          width: docSize.width,
          height: docSize.height,
          zIndex: 2147483647,
          opacity: 0.0001,
          cursor: cursor
        }).appendTo(doc.body);
        global$7(doc).on('mousemove touchmove', drag).on('mouseup touchend', stop);
        settings.start(e);
      };
      drag = function (e) {
        updateWithTouchData(e);
        if (e.button !== downButton) {
          return stop(e);
        }
        e.deltaX = e.screenX - startX;
        e.deltaY = e.screenY - startY;
        e.preventDefault();
        settings.drag(e);
      };
      stop = function (e) {
        updateWithTouchData(e);
        global$7(doc).off('mousemove touchmove', drag).off('mouseup touchend', stop);
        $eventOverlay.remove();
        if (settings.stop) {
          settings.stop(e);
        }
      };
      this.destroy = function () {
        global$7(handleElement).off();
      };
      global$7(handleElement).on('mousedown touchstart', start);
    }

    var global$b = tinymce.util.Tools.resolve('tinymce.ui.Factory');

    var hasTabstopData = function (elm) {
      return elm.getAttribute('data-mce-tabstop') ? true : false;
    };
    function KeyboardNavigation (settings) {
      var root = settings.root;
      var focusedElement, focusedControl;
      function isElement(node) {
        return node && node.nodeType === 1;
      }
      try {
        focusedElement = domGlobals.document.activeElement;
      } catch (ex) {
        focusedElement = domGlobals.document.body;
      }
      focusedControl = root.getParentCtrl(focusedElement);
      function getRole(elm) {
        elm = elm || focusedElement;
        if (isElement(elm)) {
          return elm.getAttribute('role');
        }
        return null;
      }
      function getParentRole(elm) {
        var role, parent = elm || focusedElement;
        while (parent = parent.parentNode) {
          if (role = getRole(parent)) {
            return role;
          }
        }
      }
      function getAriaProp(name) {
        var elm = focusedElement;
        if (isElement(elm)) {
          return elm.getAttribute('aria-' + name);
        }
      }
      function isTextInputElement(elm) {
        var tagName = elm.tagName.toUpperCase();
        return tagName === 'INPUT' || tagName === 'TEXTAREA' || tagName === 'SELECT';
      }
      function canFocus(elm) {
        if (isTextInputElement(elm) && !elm.hidden) {
          return true;
        }
        if (hasTabstopData(elm)) {
          return true;
        }
        if (/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(getRole(elm))) {
          return true;
        }
        return false;
      }
      function getFocusElements(elm) {
        var elements = [];
        function collect(elm) {
          if (elm.nodeType !== 1 || elm.style.display === 'none' || elm.disabled) {
            return;
          }
          if (canFocus(elm)) {
            elements.push(elm);
          }
          for (var i = 0; i < elm.childNodes.length; i++) {
            collect(elm.childNodes[i]);
          }
        }
        collect(elm || root.getEl());
        return elements;
      }
      function getNavigationRoot(targetControl) {
        var navigationRoot, controls;
        targetControl = targetControl || focusedControl;
        controls = targetControl.parents().toArray();
        controls.unshift(targetControl);
        for (var i = 0; i < controls.length; i++) {
          navigationRoot = controls[i];
          if (navigationRoot.settings.ariaRoot) {
            break;
          }
        }
        return navigationRoot;
      }
      function focusFirst(targetControl) {
        var navigationRoot = getNavigationRoot(targetControl);
        var focusElements = getFocusElements(navigationRoot.getEl());
        if (navigationRoot.settings.ariaRemember && 'lastAriaIndex' in navigationRoot) {
          moveFocusToIndex(navigationRoot.lastAriaIndex, focusElements);
        } else {
          moveFocusToIndex(0, focusElements);
        }
      }
      function moveFocusToIndex(idx, elements) {
        if (idx < 0) {
          idx = elements.length - 1;
        } else if (idx >= elements.length) {
          idx = 0;
        }
        if (elements[idx]) {
          elements[idx].focus();
        }
        return idx;
      }
      function moveFocus(dir, elements) {
        var idx = -1;
        var navigationRoot = getNavigationRoot();
        elements = elements || getFocusElements(navigationRoot.getEl());
        for (var i = 0; i < elements.length; i++) {
          if (elements[i] === focusedElement) {
            idx = i;
          }
        }
        idx += dir;
        navigationRoot.lastAriaIndex = moveFocusToIndex(idx, elements);
      }
      function left() {
        var parentRole = getParentRole();
        if (parentRole === 'tablist') {
          moveFocus(-1, getFocusElements(focusedElement.parentNode));
        } else if (focusedControl.parent().submenu) {
          cancel();
        } else {
          moveFocus(-1);
        }
      }
      function right() {
        var role = getRole(), parentRole = getParentRole();
        if (parentRole === 'tablist') {
          moveFocus(1, getFocusElements(focusedElement.parentNode));
        } else if (role === 'menuitem' && parentRole === 'menu' && getAriaProp('haspopup')) {
          enter();
        } else {
          moveFocus(1);
        }
      }
      function up() {
        moveFocus(-1);
      }
      function down() {
        var role = getRole(), parentRole = getParentRole();
        if (role === 'menuitem' && parentRole === 'menubar') {
          enter();
        } else if (role === 'button' && getAriaProp('haspopup')) {
          enter({ key: 'down' });
        } else {
          moveFocus(1);
        }
      }
      function tab(e) {
        var parentRole = getParentRole();
        if (parentRole === 'tablist') {
          var elm = getFocusElements(focusedControl.getEl('body'))[0];
          if (elm) {
            elm.focus();
          }
        } else {
          moveFocus(e.shiftKey ? -1 : 1);
        }
      }
      function cancel() {
        focusedControl.fire('cancel');
      }
      function enter(aria) {
        aria = aria || {};
        focusedControl.fire('click', {
          target: focusedElement,
          aria: aria
        });
      }
      root.on('keydown', function (e) {
        function handleNonTabOrEscEvent(e, handler) {
          if (isTextInputElement(focusedElement) || hasTabstopData(focusedElement)) {
            return;
          }
          if (getRole(focusedElement) === 'slider') {
            return;
          }
          if (handler(e) !== false) {
            e.preventDefault();
          }
        }
        if (e.isDefaultPrevented()) {
          return;
        }
        switch (e.keyCode) {
        case 37:
          handleNonTabOrEscEvent(e, left);
          break;
        case 39:
          handleNonTabOrEscEvent(e, right);
          break;
        case 38:
          handleNonTabOrEscEvent(e, up);
          break;
        case 40:
          handleNonTabOrEscEvent(e, down);
          break;
        case 27:
          cancel();
          break;
        case 14:
        case 13:
        case 32:
          handleNonTabOrEscEvent(e, enter);
          break;
        case 9:
          tab(e);
          e.preventDefault();
          break;
        }
      });
      root.on('focusin', function (e) {
        focusedElement = e.target;
        focusedControl = e.control;
      });
      return { focusFirst: focusFirst };
    }

    var selectorCache = {};
    var Container = Control$1.extend({
      init: function (settings) {
        var self = this;
        self._super(settings);
        settings = self.settings;
        if (settings.fixed) {
          self.state.set('fixed', true);
        }
        self._items = new Collection$2();
        if (self.isRtl()) {
          self.classes.add('rtl');
        }
        self.bodyClasses = new ClassList(function () {
          if (self.state.get('rendered')) {
            self.getEl('body').className = this.toString();
          }
        });
        self.bodyClasses.prefix = self.classPrefix;
        self.classes.add('container');
        self.bodyClasses.add('container-body');
        if (settings.containerCls) {
          self.classes.add(settings.containerCls);
        }
        self._layout = global$b.create((settings.layout || '') + 'layout');
        if (self.settings.items) {
          self.add(self.settings.items);
        } else {
          self.add(self.render());
        }
        self._hasBody = true;
      },
      items: function () {
        return this._items;
      },
      find: function (selector) {
        selector = selectorCache[selector] = selectorCache[selector] || new Selector(selector);
        return selector.find(this);
      },
      add: function (items) {
        var self = this;
        self.items().add(self.create(items)).parent(self);
        return self;
      },
      focus: function (keyboard) {
        var self = this;
        var focusCtrl, keyboardNav, items;
        if (keyboard) {
          keyboardNav = self.keyboardNav || self.parents().eq(-1)[0].keyboardNav;
          if (keyboardNav) {
            keyboardNav.focusFirst(self);
            return;
          }
        }
        items = self.find('*');
        if (self.statusbar) {
          items.add(self.statusbar.items());
        }
        items.each(function (ctrl) {
          if (ctrl.settings.autofocus) {
            focusCtrl = null;
            return false;
          }
          if (ctrl.canFocus) {
            focusCtrl = focusCtrl || ctrl;
          }
        });
        if (focusCtrl) {
          focusCtrl.focus();
        }
        return self;
      },
      replace: function (oldItem, newItem) {
        var ctrlElm;
        var items = this.items();
        var i = items.length;
        while (i--) {
          if (items[i] === oldItem) {
            items[i] = newItem;
            break;
          }
        }
        if (i >= 0) {
          ctrlElm = newItem.getEl();
          if (ctrlElm) {
            ctrlElm.parentNode.removeChild(ctrlElm);
          }
          ctrlElm = oldItem.getEl();
          if (ctrlElm) {
            ctrlElm.parentNode.removeChild(ctrlElm);
          }
        }
        newItem.parent(this);
      },
      create: function (items) {
        var self = this;
        var settings;
        var ctrlItems = [];
        if (!global$4.isArray(items)) {
          items = [items];
        }
        global$4.each(items, function (item) {
          if (item) {
            if (!(item instanceof Control$1)) {
              if (typeof item === 'string') {
                item = { type: item };
              }
              settings = global$4.extend({}, self.settings.defaults, item);
              item.type = settings.type = settings.type || item.type || self.settings.defaultType || (settings.defaults ? settings.defaults.type : null);
              item = global$b.create(settings);
            }
            ctrlItems.push(item);
          }
        });
        return ctrlItems;
      },
      renderNew: function () {
        var self = this;
        self.items().each(function (ctrl, index) {
          var containerElm;
          ctrl.parent(self);
          if (!ctrl.state.get('rendered')) {
            containerElm = self.getEl('body');
            if (containerElm.hasChildNodes() && index <= containerElm.childNodes.length - 1) {
              global$7(containerElm.childNodes[index]).before(ctrl.renderHtml());
            } else {
              global$7(containerElm).append(ctrl.renderHtml());
            }
            ctrl.postRender();
            ReflowQueue.add(ctrl);
          }
        });
        self._layout.applyClasses(self.items().filter(':visible'));
        self._lastRect = null;
        return self;
      },
      append: function (items) {
        return this.add(items).renderNew();
      },
      prepend: function (items) {
        var self = this;
        self.items().set(self.create(items).concat(self.items().toArray()));
        return self.renderNew();
      },
      insert: function (items, index, before) {
        var self = this;
        var curItems, beforeItems, afterItems;
        items = self.create(items);
        curItems = self.items();
        if (!before && index < curItems.length - 1) {
          index += 1;
        }
        if (index >= 0 && index < curItems.length) {
          beforeItems = curItems.slice(0, index).toArray();
          afterItems = curItems.slice(index).toArray();
          curItems.set(beforeItems.concat(items, afterItems));
        }
        return self.renderNew();
      },
      fromJSON: function (data) {
        var self = this;
        for (var name in data) {
          self.find('#' + name).value(data[name]);
        }
        return self;
      },
      toJSON: function () {
        var self = this, data = {};
        self.find('*').each(function (ctrl) {
          var name = ctrl.name(), value = ctrl.value();
          if (name && typeof value !== 'undefined') {
            data[name] = value;
          }
        });
        return data;
      },
      renderHtml: function () {
        var self = this, layout = self._layout, role = this.settings.role;
        self.preRender();
        layout.preRender(self);
        return '<div id="' + self._id + '" class="' + self.classes + '"' + (role ? ' role="' + this.settings.role + '"' : '') + '>' + '<div id="' + self._id + '-body" class="' + self.bodyClasses + '">' + (self.settings.html || '') + layout.renderHtml(self) + '</div>' + '</div>';
      },
      postRender: function () {
        var self = this;
        var box;
        self.items().exec('postRender');
        self._super();
        self._layout.postRender(self);
        self.state.set('rendered', true);
        if (self.settings.style) {
          self.$el.css(self.settings.style);
        }
        if (self.settings.border) {
          box = self.borderBox;
          self.$el.css({
            'border-top-width': box.top,
            'border-right-width': box.right,
            'border-bottom-width': box.bottom,
            'border-left-width': box.left
          });
        }
        if (!self.parent()) {
          self.keyboardNav = KeyboardNavigation({ root: self });
        }
        return self;
      },
      initLayoutRect: function () {
        var self = this, layoutRect = self._super();
        self._layout.recalc(self);
        return layoutRect;
      },
      recalc: function () {
        var self = this;
        var rect = self._layoutRect;
        var lastRect = self._lastRect;
        if (!lastRect || lastRect.w !== rect.w || lastRect.h !== rect.h) {
          self._layout.recalc(self);
          rect = self.layoutRect();
          self._lastRect = {
            x: rect.x,
            y: rect.y,
            w: rect.w,
            h: rect.h
          };
          return true;
        }
      },
      reflow: function () {
        var i;
        ReflowQueue.remove(this);
        if (this.visible()) {
          Control$1.repaintControls = [];
          Control$1.repaintControls.map = {};
          this.recalc();
          i = Control$1.repaintControls.length;
          while (i--) {
            Control$1.repaintControls[i].repaint();
          }
          if (this.settings.layout !== 'flow' && this.settings.layout !== 'stack') {
            this.repaint();
          }
          Control$1.repaintControls = [];
        }
        return this;
      }
    });

    var Scrollable = {
      init: function () {
        var self = this;
        self.on('repaint', self.renderScroll);
      },
      renderScroll: function () {
        var self = this, margin = 2;
        function repaintScroll() {
          var hasScrollH, hasScrollV, bodyElm;
          function repaintAxis(axisName, posName, sizeName, contentSizeName, hasScroll, ax) {
            var containerElm, scrollBarElm, scrollThumbElm;
            var containerSize, scrollSize, ratio, rect;
            var posNameLower, sizeNameLower;
            scrollBarElm = self.getEl('scroll' + axisName);
            if (scrollBarElm) {
              posNameLower = posName.toLowerCase();
              sizeNameLower = sizeName.toLowerCase();
              global$7(self.getEl('absend')).css(posNameLower, self.layoutRect()[contentSizeName] - 1);
              if (!hasScroll) {
                global$7(scrollBarElm).css('display', 'none');
                return;
              }
              global$7(scrollBarElm).css('display', 'block');
              containerElm = self.getEl('body');
              scrollThumbElm = self.getEl('scroll' + axisName + 't');
              containerSize = containerElm['client' + sizeName] - margin * 2;
              containerSize -= hasScrollH && hasScrollV ? scrollBarElm['client' + ax] : 0;
              scrollSize = containerElm['scroll' + sizeName];
              ratio = containerSize / scrollSize;
              rect = {};
              rect[posNameLower] = containerElm['offset' + posName] + margin;
              rect[sizeNameLower] = containerSize;
              global$7(scrollBarElm).css(rect);
              rect = {};
              rect[posNameLower] = containerElm['scroll' + posName] * ratio;
              rect[sizeNameLower] = containerSize * ratio;
              global$7(scrollThumbElm).css(rect);
            }
          }
          bodyElm = self.getEl('body');
          hasScrollH = bodyElm.scrollWidth > bodyElm.clientWidth;
          hasScrollV = bodyElm.scrollHeight > bodyElm.clientHeight;
          repaintAxis('h', 'Left', 'Width', 'contentW', hasScrollH, 'Height');
          repaintAxis('v', 'Top', 'Height', 'contentH', hasScrollV, 'Width');
        }
        function addScroll() {
          function addScrollAxis(axisName, posName, sizeName, deltaPosName, ax) {
            var scrollStart;
            var axisId = self._id + '-scroll' + axisName, prefix = self.classPrefix;
            global$7(self.getEl()).append('<div id="' + axisId + '" class="' + prefix + 'scrollbar ' + prefix + 'scrollbar-' + axisName + '">' + '<div id="' + axisId + 't" class="' + prefix + 'scrollbar-thumb"></div>' + '</div>');
            self.draghelper = new DragHelper(axisId + 't', {
              start: function () {
                scrollStart = self.getEl('body')['scroll' + posName];
                global$7('#' + axisId).addClass(prefix + 'active');
              },
              drag: function (e) {
                var ratio, hasScrollH, hasScrollV, containerSize;
                var layoutRect = self.layoutRect();
                hasScrollH = layoutRect.contentW > layoutRect.innerW;
                hasScrollV = layoutRect.contentH > layoutRect.innerH;
                containerSize = self.getEl('body')['client' + sizeName] - margin * 2;
                containerSize -= hasScrollH && hasScrollV ? self.getEl('scroll' + axisName)['client' + ax] : 0;
                ratio = containerSize / self.getEl('body')['scroll' + sizeName];
                self.getEl('body')['scroll' + posName] = scrollStart + e['delta' + deltaPosName] / ratio;
              },
              stop: function () {
                global$7('#' + axisId).removeClass(prefix + 'active');
              }
            });
          }
          self.classes.add('scroll');
          addScrollAxis('v', 'Top', 'Height', 'Y', 'Width');
          addScrollAxis('h', 'Left', 'Width', 'X', 'Height');
        }
        if (self.settings.autoScroll) {
          if (!self._hasScroll) {
            self._hasScroll = true;
            addScroll();
            self.on('wheel', function (e) {
              var bodyEl = self.getEl('body');
              bodyEl.scrollLeft += (e.deltaX || 0) * 10;
              bodyEl.scrollTop += e.deltaY * 10;
              repaintScroll();
            });
            global$7(self.getEl('body')).on('scroll', repaintScroll);
          }
          repaintScroll();
        }
      }
    };

    var Panel = Container.extend({
      Defaults: {
        layout: 'fit',
        containerCls: 'panel'
      },
      Mixins: [Scrollable],
      renderHtml: function () {
        var self = this;
        var layout = self._layout;
        var innerHtml = self.settings.html;
        self.preRender();
        layout.preRender(self);
        if (typeof innerHtml === 'undefined') {
          innerHtml = '<div id="' + self._id + '-body" class="' + self.bodyClasses + '">' + layout.renderHtml(self) + '</div>';
        } else {
          if (typeof innerHtml === 'function') {
            innerHtml = innerHtml.call(self);
          }
          self._hasBody = false;
        }
        return '<div id="' + self._id + '" class="' + self.classes + '" hidefocus="1" tabindex="-1" role="group">' + (self._preBodyHtml || '') + innerHtml + '</div>';
      }
    });

    var Resizable = {
      resizeToContent: function () {
        this._layoutRect.autoResize = true;
        this._lastRect = null;
        this.reflow();
      },
      resizeTo: function (w, h) {
        if (w <= 1 || h <= 1) {
          var rect = funcs.getWindowSize();
          w = w <= 1 ? w * rect.w : w;
          h = h <= 1 ? h * rect.h : h;
        }
        this._layoutRect.autoResize = false;
        return this.layoutRect({
          minW: w,
          minH: h,
          w: w,
          h: h
        }).reflow();
      },
      resizeBy: function (dw, dh) {
        var self = this, rect = self.layoutRect();
        return self.resizeTo(rect.w + dw, rect.h + dh);
      }
    };

    var documentClickHandler, documentScrollHandler, windowResizeHandler;
    var visiblePanels = [];
    var zOrder = [];
    var hasModal;
    function isChildOf(ctrl, parent) {
      while (ctrl) {
        if (ctrl === parent) {
          return true;
        }
        ctrl = ctrl.parent();
      }
    }
    function skipOrHidePanels(e) {
      var i = visiblePanels.length;
      while (i--) {
        var panel = visiblePanels[i], clickCtrl = panel.getParentCtrl(e.target);
        if (panel.settings.autohide) {
          if (clickCtrl) {
            if (isChildOf(clickCtrl, panel) || panel.parent() === clickCtrl) {
              continue;
            }
          }
          e = panel.fire('autohide', { target: e.target });
          if (!e.isDefaultPrevented()) {
            panel.hide();
          }
        }
      }
    }
    function bindDocumentClickHandler() {
      if (!documentClickHandler) {
        documentClickHandler = function (e) {
          if (e.button === 2) {
            return;
          }
          skipOrHidePanels(e);
        };
        global$7(domGlobals.document).on('click touchstart', documentClickHandler);
      }
    }
    function bindDocumentScrollHandler() {
      if (!documentScrollHandler) {
        documentScrollHandler = function () {
          var i;
          i = visiblePanels.length;
          while (i--) {
            repositionPanel$1(visiblePanels[i]);
          }
        };
        global$7(domGlobals.window).on('scroll', documentScrollHandler);
      }
    }
    function bindWindowResizeHandler() {
      if (!windowResizeHandler) {
        var docElm_1 = domGlobals.document.documentElement;
        var clientWidth_1 = docElm_1.clientWidth, clientHeight_1 = docElm_1.clientHeight;
        windowResizeHandler = function () {
          if (!domGlobals.document.all || clientWidth_1 !== docElm_1.clientWidth || clientHeight_1 !== docElm_1.clientHeight) {
            clientWidth_1 = docElm_1.clientWidth;
            clientHeight_1 = docElm_1.clientHeight;
            FloatPanel.hideAll();
          }
        };
        global$7(domGlobals.window).on('resize', windowResizeHandler);
      }
    }
    function repositionPanel$1(panel) {
      var scrollY = funcs.getViewPort().y;
      function toggleFixedChildPanels(fixed, deltaY) {
        var parent;
        for (var i = 0; i < visiblePanels.length; i++) {
          if (visiblePanels[i] !== panel) {
            parent = visiblePanels[i].parent();
            while (parent && (parent = parent.parent())) {
              if (parent === panel) {
                visiblePanels[i].fixed(fixed).moveBy(0, deltaY).repaint();
              }
            }
          }
        }
      }
      if (panel.settings.autofix) {
        if (!panel.state.get('fixed')) {
          panel._autoFixY = panel.layoutRect().y;
          if (panel._autoFixY < scrollY) {
            panel.fixed(true).layoutRect({ y: 0 }).repaint();
            toggleFixedChildPanels(true, scrollY - panel._autoFixY);
          }
        } else {
          if (panel._autoFixY > scrollY) {
            panel.fixed(false).layoutRect({ y: panel._autoFixY }).repaint();
            toggleFixedChildPanels(false, panel._autoFixY - scrollY);
          }
        }
      }
    }
    function addRemove(add, ctrl) {
      var i, zIndex = FloatPanel.zIndex || 65535, topModal;
      if (add) {
        zOrder.push(ctrl);
      } else {
        i = zOrder.length;
        while (i--) {
          if (zOrder[i] === ctrl) {
            zOrder.splice(i, 1);
          }
        }
      }
      if (zOrder.length) {
        for (i = 0; i < zOrder.length; i++) {
          if (zOrder[i].modal) {
            zIndex++;
            topModal = zOrder[i];
          }
          zOrder[i].getEl().style.zIndex = zIndex;
          zOrder[i].zIndex = zIndex;
          zIndex++;
        }
      }
      var modalBlockEl = global$7('#' + ctrl.classPrefix + 'modal-block', ctrl.getContainerElm())[0];
      if (topModal) {
        global$7(modalBlockEl).css('z-index', topModal.zIndex - 1);
      } else if (modalBlockEl) {
        modalBlockEl.parentNode.removeChild(modalBlockEl);
        hasModal = false;
      }
      FloatPanel.currentZIndex = zIndex;
    }
    var FloatPanel = Panel.extend({
      Mixins: [
        Movable,
        Resizable
      ],
      init: function (settings) {
        var self = this;
        self._super(settings);
        self._eventsRoot = self;
        self.classes.add('floatpanel');
        if (settings.autohide) {
          bindDocumentClickHandler();
          bindWindowResizeHandler();
          visiblePanels.push(self);
        }
        if (settings.autofix) {
          bindDocumentScrollHandler();
          self.on('move', function () {
            repositionPanel$1(this);
          });
        }
        self.on('postrender show', function (e) {
          if (e.control === self) {
            var $modalBlockEl_1;
            var prefix_1 = self.classPrefix;
            if (self.modal && !hasModal) {
              $modalBlockEl_1 = global$7('#' + prefix_1 + 'modal-block', self.getContainerElm());
              if (!$modalBlockEl_1[0]) {
                $modalBlockEl_1 = global$7('<div id="' + prefix_1 + 'modal-block" class="' + prefix_1 + 'reset ' + prefix_1 + 'fade"></div>').appendTo(self.getContainerElm());
              }
              global$3.setTimeout(function () {
                $modalBlockEl_1.addClass(prefix_1 + 'in');
                global$7(self.getEl()).addClass(prefix_1 + 'in');
              });
              hasModal = true;
            }
            addRemove(true, self);
          }
        });
        self.on('show', function () {
          self.parents().each(function (ctrl) {
            if (ctrl.state.get('fixed')) {
              self.fixed(true);
              return false;
            }
          });
        });
        if (settings.popover) {
          self._preBodyHtml = '<div class="' + self.classPrefix + 'arrow"></div>';
          self.classes.add('popover').add('bottom').add(self.isRtl() ? 'end' : 'start');
        }
        self.aria('label', settings.ariaLabel);
        self.aria('labelledby', self._id);
        self.aria('describedby', self.describedBy || self._id + '-none');
      },
      fixed: function (state) {
        var self = this;
        if (self.state.get('fixed') !== state) {
          if (self.state.get('rendered')) {
            var viewport = funcs.getViewPort();
            if (state) {
              self.layoutRect().y -= viewport.y;
            } else {
              self.layoutRect().y += viewport.y;
            }
          }
          self.classes.toggle('fixed', state);
          self.state.set('fixed', state);
        }
        return self;
      },
      show: function () {
        var self = this;
        var i;
        var state = self._super();
        i = visiblePanels.length;
        while (i--) {
          if (visiblePanels[i] === self) {
            break;
          }
        }
        if (i === -1) {
          visiblePanels.push(self);
        }
        return state;
      },
      hide: function () {
        removeVisiblePanel(this);
        addRemove(false, this);
        return this._super();
      },
      hideAll: function () {
        FloatPanel.hideAll();
      },
      close: function () {
        var self = this;
        if (!self.fire('close').isDefaultPrevented()) {
          self.remove();
          addRemove(false, self);
        }
        return self;
      },
      remove: function () {
        removeVisiblePanel(this);
        this._super();
      },
      postRender: function () {
        var self = this;
        if (self.settings.bodyRole) {
          this.getEl('body').setAttribute('role', self.settings.bodyRole);
        }
        return self._super();
      }
    });
    FloatPanel.hideAll = function () {
      var i = visiblePanels.length;
      while (i--) {
        var panel = visiblePanels[i];
        if (panel && panel.settings.autohide) {
          panel.hide();
          visiblePanels.splice(i, 1);
        }
      }
    };
    function removeVisiblePanel(panel) {
      var i;
      i = visiblePanels.length;
      while (i--) {
        if (visiblePanels[i] === panel) {
          visiblePanels.splice(i, 1);
        }
      }
      i = zOrder.length;
      while (i--) {
        if (zOrder[i] === panel) {
          zOrder.splice(i, 1);
        }
      }
    }

    var windows = [];
    var oldMetaValue = '';
    function toggleFullScreenState(state) {
      var noScaleMetaValue = 'width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0';
      var viewport = global$7('meta[name=viewport]')[0], contentValue;
      if (global$1.overrideViewPort === false) {
        return;
      }
      if (!viewport) {
        viewport = domGlobals.document.createElement('meta');
        viewport.setAttribute('name', 'viewport');
        domGlobals.document.getElementsByTagName('head')[0].appendChild(viewport);
      }
      contentValue = viewport.getAttribute('content');
      if (contentValue && typeof oldMetaValue !== 'undefined') {
        oldMetaValue = contentValue;
      }
      viewport.setAttribute('content', state ? noScaleMetaValue : oldMetaValue);
    }
    function toggleBodyFullScreenClasses(classPrefix, state) {
      if (checkFullscreenWindows() && state === false) {
        global$7([
          domGlobals.document.documentElement,
          domGlobals.document.body
        ]).removeClass(classPrefix + 'fullscreen');
      }
    }
    function checkFullscreenWindows() {
      for (var i = 0; i < windows.length; i++) {
        if (windows[i]._fullscreen) {
          return true;
        }
      }
      return false;
    }
    function handleWindowResize() {
      if (!global$1.desktop) {
        var lastSize_1 = {
          w: domGlobals.window.innerWidth,
          h: domGlobals.window.innerHeight
        };
        global$3.setInterval(function () {
          var w = domGlobals.window.innerWidth, h = domGlobals.window.innerHeight;
          if (lastSize_1.w !== w || lastSize_1.h !== h) {
            lastSize_1 = {
              w: w,
              h: h
            };
            global$7(domGlobals.window).trigger('resize');
          }
        }, 100);
      }
      function reposition() {
        var i;
        var rect = funcs.getWindowSize();
        var layoutRect;
        for (i = 0; i < windows.length; i++) {
          layoutRect = windows[i].layoutRect();
          windows[i].moveTo(windows[i].settings.x || Math.max(0, rect.w / 2 - layoutRect.w / 2), windows[i].settings.y || Math.max(0, rect.h / 2 - layoutRect.h / 2));
        }
      }
      global$7(domGlobals.window).on('resize', reposition);
    }
    var Window = FloatPanel.extend({
      modal: true,
      Defaults: {
        border: 1,
        layout: 'flex',
        containerCls: 'panel',
        role: 'dialog',
        callbacks: {
          submit: function () {
            this.fire('submit', { data: this.toJSON() });
          },
          close: function () {
            this.close();
          }
        }
      },
      init: function (settings) {
        var self = this;
        self._super(settings);
        if (self.isRtl()) {
          self.classes.add('rtl');
        }
        self.classes.add('window');
        self.bodyClasses.add('window-body');
        self.state.set('fixed', true);
        if (settings.buttons) {
          self.statusbar = new Panel({
            layout: 'flex',
            border: '1 0 0 0',
            spacing: 3,
            padding: 10,
            align: 'center',
            pack: self.isRtl() ? 'start' : 'end',
            defaults: { type: 'button' },
            items: settings.buttons
          });
          self.statusbar.classes.add('foot');
          self.statusbar.parent(self);
        }
        self.on('click', function (e) {
          var closeClass = self.classPrefix + 'close';
          if (funcs.hasClass(e.target, closeClass) || funcs.hasClass(e.target.parentNode, closeClass)) {
            self.close();
          }
        });
        self.on('cancel', function () {
          self.close();
        });
        self.on('move', function (e) {
          if (e.control === self) {
            FloatPanel.hideAll();
          }
        });
        self.aria('describedby', self.describedBy || self._id + '-none');
        self.aria('label', settings.title);
        self._fullscreen = false;
      },
      recalc: function () {
        var self = this;
        var statusbar = self.statusbar;
        var layoutRect, width, x, needsRecalc;
        if (self._fullscreen) {
          self.layoutRect(funcs.getWindowSize());
          self.layoutRect().contentH = self.layoutRect().innerH;
        }
        self._super();
        layoutRect = self.layoutRect();
        if (self.settings.title && !self._fullscreen) {
          width = layoutRect.headerW;
          if (width > layoutRect.w) {
            x = layoutRect.x - Math.max(0, width / 2);
            self.layoutRect({
              w: width,
              x: x
            });
            needsRecalc = true;
          }
        }
        if (statusbar) {
          statusbar.layoutRect({ w: self.layoutRect().innerW }).recalc();
          width = statusbar.layoutRect().minW + layoutRect.deltaW;
          if (width > layoutRect.w) {
            x = layoutRect.x - Math.max(0, width - layoutRect.w);
            self.layoutRect({
              w: width,
              x: x
            });
            needsRecalc = true;
          }
        }
        if (needsRecalc) {
          self.recalc();
        }
      },
      initLayoutRect: function () {
        var self = this;
        var layoutRect = self._super();
        var deltaH = 0, headEl;
        if (self.settings.title && !self._fullscreen) {
          headEl = self.getEl('head');
          var size = funcs.getSize(headEl);
          layoutRect.headerW = size.width;
          layoutRect.headerH = size.height;
          deltaH += layoutRect.headerH;
        }
        if (self.statusbar) {
          deltaH += self.statusbar.layoutRect().h;
        }
        layoutRect.deltaH += deltaH;
        layoutRect.minH += deltaH;
        layoutRect.h += deltaH;
        var rect = funcs.getWindowSize();
        layoutRect.x = self.settings.x || Math.max(0, rect.w / 2 - layoutRect.w / 2);
        layoutRect.y = self.settings.y || Math.max(0, rect.h / 2 - layoutRect.h / 2);
        return layoutRect;
      },
      renderHtml: function () {
        var self = this, layout = self._layout, id = self._id, prefix = self.classPrefix;
        var settings = self.settings;
        var headerHtml = '', footerHtml = '', html = settings.html;
        self.preRender();
        layout.preRender(self);
        if (settings.title) {
          headerHtml = '<div id="' + id + '-head" class="' + prefix + 'window-head">' + '<div id="' + id + '-title" class="' + prefix + 'title">' + self.encode(settings.title) + '</div>' + '<div id="' + id + '-dragh" class="' + prefix + 'dragh"></div>' + '<button type="button" class="' + prefix + 'close" aria-hidden="true">' + '<i class="mce-ico mce-i-remove"></i>' + '</button>' + '</div>';
        }
        if (settings.url) {
          html = '<iframe src="' + settings.url + '" tabindex="-1"></iframe>';
        }
        if (typeof html === 'undefined') {
          html = layout.renderHtml(self);
        }
        if (self.statusbar) {
          footerHtml = self.statusbar.renderHtml();
        }
        return '<div id="' + id + '" class="' + self.classes + '" hidefocus="1">' + '<div class="' + self.classPrefix + 'reset" role="application">' + headerHtml + '<div id="' + id + '-body" class="' + self.bodyClasses + '">' + html + '</div>' + footerHtml + '</div>' + '</div>';
      },
      fullscreen: function (state) {
        var self = this;
        var documentElement = domGlobals.document.documentElement;
        var slowRendering;
        var prefix = self.classPrefix;
        var layoutRect;
        if (state !== self._fullscreen) {
          global$7(domGlobals.window).on('resize', function () {
            var time;
            if (self._fullscreen) {
              if (!slowRendering) {
                time = new Date().getTime();
                var rect = funcs.getWindowSize();
                self.moveTo(0, 0).resizeTo(rect.w, rect.h);
                if (new Date().getTime() - time > 50) {
                  slowRendering = true;
                }
              } else {
                if (!self._timer) {
                  self._timer = global$3.setTimeout(function () {
                    var rect = funcs.getWindowSize();
                    self.moveTo(0, 0).resizeTo(rect.w, rect.h);
                    self._timer = 0;
                  }, 50);
                }
              }
            }
          });
          layoutRect = self.layoutRect();
          self._fullscreen = state;
          if (!state) {
            self.borderBox = BoxUtils.parseBox(self.settings.border);
            self.getEl('head').style.display = '';
            layoutRect.deltaH += layoutRect.headerH;
            global$7([
              documentElement,
              domGlobals.document.body
            ]).removeClass(prefix + 'fullscreen');
            self.classes.remove('fullscreen');
            self.moveTo(self._initial.x, self._initial.y).resizeTo(self._initial.w, self._initial.h);
          } else {
            self._initial = {
              x: layoutRect.x,
              y: layoutRect.y,
              w: layoutRect.w,
              h: layoutRect.h
            };
            self.borderBox = BoxUtils.parseBox('0');
            self.getEl('head').style.display = 'none';
            layoutRect.deltaH -= layoutRect.headerH + 2;
            global$7([
              documentElement,
              domGlobals.document.body
            ]).addClass(prefix + 'fullscreen');
            self.classes.add('fullscreen');
            var rect = funcs.getWindowSize();
            self.moveTo(0, 0).resizeTo(rect.w, rect.h);
          }
        }
        return self.reflow();
      },
      postRender: function () {
        var self = this;
        var startPos;
        setTimeout(function () {
          self.classes.add('in');
          self.fire('open');
        }, 0);
        self._super();
        if (self.statusbar) {
          self.statusbar.postRender();
        }
        self.focus();
        this.dragHelper = new DragHelper(self._id + '-dragh', {
          start: function () {
            startPos = {
              x: self.layoutRect().x,
              y: self.layoutRect().y
            };
          },
          drag: function (e) {
            self.moveTo(startPos.x + e.deltaX, startPos.y + e.deltaY);
          }
        });
        self.on('submit', function (e) {
          if (!e.isDefaultPrevented()) {
            self.close();
          }
        });
        windows.push(self);
        toggleFullScreenState(true);
      },
      submit: function () {
        return this.fire('submit', { data: this.toJSON() });
      },
      remove: function () {
        var self = this;
        var i;
        self.dragHelper.destroy();
        self._super();
        if (self.statusbar) {
          this.statusbar.remove();
        }
        toggleBodyFullScreenClasses(self.classPrefix, false);
        i = windows.length;
        while (i--) {
          if (windows[i] === self) {
            windows.splice(i, 1);
          }
        }
        toggleFullScreenState(windows.length > 0);
      },
      getContentWindow: function () {
        var ifr = this.getEl().getElementsByTagName('iframe')[0];
        return ifr ? ifr.contentWindow : null;
      }
    });
    handleWindowResize();

    var MessageBox = Window.extend({
      init: function (settings) {
        settings = {
          border: 1,
          padding: 20,
          layout: 'flex',
          pack: 'center',
          align: 'center',
          containerCls: 'panel',
          autoScroll: true,
          buttons: {
            type: 'button',
            text: 'Ok',
            action: 'ok'
          },
          items: {
            type: 'label',
            multiline: true,
            maxWidth: 500,
            maxHeight: 200
          }
        };
        this._super(settings);
      },
      Statics: {
        OK: 1,
        OK_CANCEL: 2,
        YES_NO: 3,
        YES_NO_CANCEL: 4,
        msgBox: function (settings) {
          var buttons;
          var callback = settings.callback || function () {
          };
          function createButton(text, status, primary) {
            return {
              type: 'button',
              text: text,
              subtype: primary ? 'primary' : '',
              onClick: function (e) {
                e.control.parents()[1].close();
                callback(status);
              }
            };
          }
          switch (settings.buttons) {
          case MessageBox.OK_CANCEL:
            buttons = [
              createButton('Ok', true, true),
              createButton('Cancel', false)
            ];
            break;
          case MessageBox.YES_NO:
          case MessageBox.YES_NO_CANCEL:
            buttons = [
              createButton('Yes', 1, true),
              createButton('No', 0)
            ];
            if (settings.buttons === MessageBox.YES_NO_CANCEL) {
              buttons.push(createButton('Cancel', -1));
            }
            break;
          default:
            buttons = [createButton('Ok', true, true)];
            break;
          }
          return new Window({
            padding: 20,
            x: settings.x,
            y: settings.y,
            minWidth: 300,
            minHeight: 100,
            layout: 'flex',
            pack: 'center',
            align: 'center',
            buttons: buttons,
            title: settings.title,
            role: 'alertdialog',
            items: {
              type: 'label',
              multiline: true,
              maxWidth: 500,
              maxHeight: 200,
              text: settings.text
            },
            onPostRender: function () {
              this.aria('describedby', this.items()[0]._id);
            },
            onClose: settings.onClose,
            onCancel: function () {
              callback(false);
            }
          }).renderTo(domGlobals.document.body).reflow();
        },
        alert: function (settings, callback) {
          if (typeof settings === 'string') {
            settings = { text: settings };
          }
          settings.callback = callback;
          return MessageBox.msgBox(settings);
        },
        confirm: function (settings, callback) {
          if (typeof settings === 'string') {
            settings = { text: settings };
          }
          settings.callback = callback;
          settings.buttons = MessageBox.OK_CANCEL;
          return MessageBox.msgBox(settings);
        }
      }
    });

    function WindowManagerImpl (editor) {
      var open = function (args, params, closeCallback) {
        var win;
        args.title = args.title || ' ';
        args.url = args.url || args.file;
        if (args.url) {
          args.width = parseInt(args.width || 320, 10);
          args.height = parseInt(args.height || 240, 10);
        }
        if (args.body) {
          args.items = {
            defaults: args.defaults,
            type: args.bodyType || 'form',
            items: args.body,
            data: args.data,
            callbacks: args.commands
          };
        }
        if (!args.url && !args.buttons) {
          args.buttons = [
            {
              text: 'Ok',
              subtype: 'primary',
              onclick: function () {
                win.find('form')[0].submit();
              }
            },
            {
              text: 'Cancel',
              onclick: function () {
                win.close();
              }
            }
          ];
        }
        win = new Window(args);
        win.on('close', function () {
          closeCallback(win);
        });
        if (args.data) {
          win.on('postRender', function () {
            this.find('*').each(function (ctrl) {
              var name = ctrl.name();
              if (name in args.data) {
                ctrl.value(args.data[name]);
              }
            });
          });
        }
        win.features = args || {};
        win.params = params || {};
        win = win.renderTo(domGlobals.document.body).reflow();
        return win;
      };
      var alert = function (message, choiceCallback, closeCallback) {
        var win;
        win = MessageBox.alert(message, function () {
          choiceCallback();
        });
        win.on('close', function () {
          closeCallback(win);
        });
        return win;
      };
      var confirm = function (message, choiceCallback, closeCallback) {
        var win;
        win = MessageBox.confirm(message, function (state) {
          choiceCallback(state);
        });
        win.on('close', function () {
          closeCallback(win);
        });
        return win;
      };
      var close = function (window) {
        window.close();
      };
      var getParams = function (window) {
        return window.params;
      };
      var setParams = function (window, params) {
        window.params = params;
      };
      return {
        open: open,
        alert: alert,
        confirm: confirm,
        close: close,
        getParams: getParams,
        setParams: setParams
      };
    }

    var get = function (editor, panel) {
      var renderUI = function () {
        return Render.renderUI(editor, panel);
      };
      return {
        renderUI: renderUI,
        getNotificationManagerImpl: function () {
          return NotificationManagerImpl(editor);
        },
        getWindowManagerImpl: function () {
          return WindowManagerImpl();
        }
      };
    };
    var ThemeApi = { get: get };

    var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();

    var path = function (parts, scope) {
      var o = scope !== undefined && scope !== null ? scope : Global;
      for (var i = 0; i < parts.length && o !== undefined && o !== null; ++i) {
        o = o[parts[i]];
      }
      return o;
    };
    var resolve = function (p, scope) {
      var parts = p.split('.');
      return path(parts, scope);
    };

    var unsafe = function (name, scope) {
      return resolve(name, scope);
    };
    var getOrDie = function (name, scope) {
      var actual = unsafe(name, scope);
      if (actual === undefined || actual === null) {
        throw new Error(name + ' not available on this browser');
      }
      return actual;
    };
    var Global$1 = { getOrDie: getOrDie };

    function FileReader () {
      var f = Global$1.getOrDie('FileReader');
      return new f();
    }

    var global$c = tinymce.util.Tools.resolve('tinymce.util.Promise');

    var blobToBase64 = function (blob) {
      return new global$c(function (resolve) {
        var reader = FileReader();
        reader.onloadend = function () {
          resolve(reader.result.split(',')[1]);
        };
        reader.readAsDataURL(blob);
      });
    };
    var Conversions = { blobToBase64: blobToBase64 };

    var pickFile = function () {
      return new global$c(function (resolve) {
        var fileInput;
        fileInput = domGlobals.document.createElement('input');
        fileInput.type = 'file';
        fileInput.style.position = 'fixed';
        fileInput.style.left = 0;
        fileInput.style.top = 0;
        fileInput.style.opacity = 0.001;
        domGlobals.document.body.appendChild(fileInput);
        fileInput.onchange = function (e) {
          resolve(Array.prototype.slice.call(e.target.files));
        };
        fileInput.click();
        fileInput.parentNode.removeChild(fileInput);
      });
    };
    var Picker = { pickFile: pickFile };

    var count$1 = 0;
    var seed = function () {
      var rnd = function () {
        return Math.round(Math.random() * 4294967295).toString(36);
      };
      return 's' + Date.now().toString(36) + rnd() + rnd() + rnd();
    };
    var uuid = function (prefix) {
      return prefix + count$1++ + seed();
    };
    var Uuid = { uuid: uuid };

    var create$1 = function (dom, rng) {
      var bookmark = {};
      function setupEndPoint(start) {
        var offsetNode, container, offset;
        container = rng[start ? 'startContainer' : 'endContainer'];
        offset = rng[start ? 'startOffset' : 'endOffset'];
        if (container.nodeType === 1) {
          offsetNode = dom.create('span', { 'data-mce-type': 'bookmark' });
          if (container.hasChildNodes()) {
            offset = Math.min(offset, container.childNodes.length - 1);
            if (start) {
              container.insertBefore(offsetNode, container.childNodes[offset]);
            } else {
              dom.insertAfter(offsetNode, container.childNodes[offset]);
            }
          } else {
            container.appendChild(offsetNode);
          }
          container = offsetNode;
          offset = 0;
        }
        bookmark[start ? 'startContainer' : 'endContainer'] = container;
        bookmark[start ? 'startOffset' : 'endOffset'] = offset;
      }
      setupEndPoint(true);
      if (!rng.collapsed) {
        setupEndPoint();
      }
      return bookmark;
    };
    var resolve$1 = function (dom, bookmark) {
      function restoreEndPoint(start) {
        var container, offset, node;
        function nodeIndex(container) {
          var node = container.parentNode.firstChild, idx = 0;
          while (node) {
            if (node === container) {
              return idx;
            }
            if (node.nodeType !== 1 || node.getAttribute('data-mce-type') !== 'bookmark') {
              idx++;
            }
            node = node.nextSibling;
          }
          return -1;
        }
        container = node = bookmark[start ? 'startContainer' : 'endContainer'];
        offset = bookmark[start ? 'startOffset' : 'endOffset'];
        if (!container) {
          return;
        }
        if (container.nodeType === 1) {
          offset = nodeIndex(container);
          container = container.parentNode;
          dom.remove(node);
        }
        bookmark[start ? 'startContainer' : 'endContainer'] = container;
        bookmark[start ? 'startOffset' : 'endOffset'] = offset;
      }
      restoreEndPoint(true);
      restoreEndPoint();
      var rng = dom.createRng();
      rng.setStart(bookmark.startContainer, bookmark.startOffset);
      if (bookmark.endContainer) {
        rng.setEnd(bookmark.endContainer, bookmark.endOffset);
      }
      return rng;
    };
    var Bookmark = {
      create: create$1,
      resolve: resolve$1
    };

    var global$d = tinymce.util.Tools.resolve('tinymce.dom.TreeWalker');

    var global$e = tinymce.util.Tools.resolve('tinymce.dom.RangeUtils');

    var getSelectedElements = function (rootElm, startNode, endNode) {
      var walker, node;
      var elms = [];
      walker = new global$d(startNode, rootElm);
      for (node = startNode; node; node = walker.next()) {
        if (node.nodeType === 1) {
          elms.push(node);
        }
        if (node === endNode) {
          break;
        }
      }
      return elms;
    };
    var unwrapElements = function (editor, elms) {
      var bookmark, dom, selection;
      dom = editor.dom;
      selection = editor.selection;
      bookmark = Bookmark.create(dom, selection.getRng());
      global$4.each(elms, function (elm) {
        editor.dom.remove(elm, true);
      });
      selection.setRng(Bookmark.resolve(dom, bookmark));
    };
    var isLink = function (elm) {
      return elm.nodeName === 'A' && elm.hasAttribute('href');
    };
    var getParentAnchorOrSelf = function (dom, elm) {
      var anchorElm = dom.getParent(elm, isLink);
      return anchorElm ? anchorElm : elm;
    };
    var getSelectedAnchors = function (editor) {
      var startElm, endElm, rootElm, anchorElms, selection, dom, rng;
      selection = editor.selection;
      dom = editor.dom;
      rng = selection.getRng();
      startElm = getParentAnchorOrSelf(dom, global$e.getNode(rng.startContainer, rng.startOffset));
      endElm = global$e.getNode(rng.endContainer, rng.endOffset);
      rootElm = editor.getBody();
      anchorElms = global$4.grep(getSelectedElements(rootElm, startElm, endElm), isLink);
      return anchorElms;
    };
    var unlinkSelection = function (editor) {
      unwrapElements(editor, getSelectedAnchors(editor));
    };
    var Unlink = { unlinkSelection: unlinkSelection };

    var createTableHtml = function (cols, rows) {
      var x, y, html;
      html = '<table data-mce-id="mce" style="width: 100%">';
      html += '<tbody>';
      for (y = 0; y < rows; y++) {
        html += '<tr>';
        for (x = 0; x < cols; x++) {
          html += '<td><br></td>';
        }
        html += '</tr>';
      }
      html += '</tbody>';
      html += '</table>';
      return html;
    };
    var getInsertedElement = function (editor) {
      var elms = editor.dom.select('*[data-mce-id]');
      return elms[0];
    };
    var insertTableHtml = function (editor, cols, rows) {
      editor.undoManager.transact(function () {
        var tableElm, cellElm;
        editor.insertContent(createTableHtml(cols, rows));
        tableElm = getInsertedElement(editor);
        tableElm.removeAttribute('data-mce-id');
        cellElm = editor.dom.select('td,th', tableElm);
        editor.selection.setCursorLocation(cellElm[0], 0);
      });
    };
    var insertTable = function (editor, cols, rows) {
      editor.plugins.table ? editor.plugins.table.insertTable(cols, rows) : insertTableHtml(editor, cols, rows);
    };
    var formatBlock = function (editor, formatName) {
      editor.execCommand('FormatBlock', false, formatName);
    };
    var insertBlob = function (editor, base64, blob) {
      var blobCache, blobInfo;
      blobCache = editor.editorUpload.blobCache;
      blobInfo = blobCache.create(Uuid.uuid('mceu'), blob, base64);
      blobCache.add(blobInfo);
      editor.insertContent(editor.dom.createHTML('img', { src: blobInfo.blobUri() }));
    };
    var collapseSelectionToEnd = function (editor) {
      editor.selection.collapse(false);
    };
    var unlink = function (editor) {
      editor.focus();
      Unlink.unlinkSelection(editor);
      collapseSelectionToEnd(editor);
    };
    var changeHref = function (editor, elm, url) {
      editor.focus();
      editor.dom.setAttrib(elm, 'href', url);
      collapseSelectionToEnd(editor);
    };
    var insertLink = function (editor, url) {
      editor.execCommand('mceInsertLink', false, { href: url });
      collapseSelectionToEnd(editor);
    };
    var updateOrInsertLink = function (editor, url) {
      var elm = editor.dom.getParent(editor.selection.getStart(), 'a[href]');
      elm ? changeHref(editor, elm, url) : insertLink(editor, url);
    };
    var createLink = function (editor, url) {
      url.trim().length === 0 ? unlink(editor) : updateOrInsertLink(editor, url);
    };
    var Actions = {
      insertTable: insertTable,
      formatBlock: formatBlock,
      insertBlob: insertBlob,
      createLink: createLink,
      unlink: unlink
    };

    var addHeaderButtons = function (editor) {
      var formatBlock = function (name) {
        return function () {
          Actions.formatBlock(editor, name);
        };
      };
      for (var i = 1; i < 6; i++) {
        var name = 'h' + i;
        editor.addButton(name, {
          text: name.toUpperCase(),
          tooltip: 'Heading ' + i,
          stateSelector: name,
          onclick: formatBlock(name),
          onPostRender: function () {
            var span = this.getEl().firstChild.firstChild;
            span.style.fontWeight = 'bold';
          }
        });
      }
    };
    var addToEditor = function (editor, panel) {
      editor.addButton('quicklink', {
        icon: 'link',
        tooltip: 'Insert/Edit link',
        stateSelector: 'a[href]',
        onclick: function () {
          panel.showForm(editor, 'quicklink');
        }
      });
      editor.addButton('quickimage', {
        icon: 'image',
        tooltip: 'Insert image',
        onclick: function () {
          Picker.pickFile().then(function (files) {
            var blob = files[0];
            Conversions.blobToBase64(blob).then(function (base64) {
              Actions.insertBlob(editor, base64, blob);
            });
          });
        }
      });
      editor.addButton('quicktable', {
        icon: 'table',
        tooltip: 'Insert table',
        onclick: function () {
          panel.hide();
          Actions.insertTable(editor, 2, 2);
        }
      });
      addHeaderButtons(editor);
    };
    var Buttons = { addToEditor: addToEditor };

    var getUiContainerDelta$1 = function () {
      var uiContainer = global$1.container;
      if (uiContainer && global$2.DOM.getStyle(uiContainer, 'position', true) !== 'static') {
        var containerPos = global$2.DOM.getPos(uiContainer);
        var dx = containerPos.x - uiContainer.scrollLeft;
        var dy = containerPos.y - uiContainer.scrollTop;
        return Option.some({
          x: dx,
          y: dy
        });
      } else {
        return Option.none();
      }
    };
    var UiContainer$1 = { getUiContainerDelta: getUiContainerDelta$1 };

    var isDomainLike = function (href) {
      return /^www\.|\.(com|org|edu|gov|uk|net|ca|de|jp|fr|au|us|ru|ch|it|nl|se|no|es|mil)$/i.test(href.trim());
    };
    var isAbsolute = function (href) {
      return /^https?:\/\//.test(href.trim());
    };
    var UrlType = {
      isDomainLike: isDomainLike,
      isAbsolute: isAbsolute
    };

    var focusFirstTextBox = function (form) {
      form.find('textbox').eq(0).each(function (ctrl) {
        ctrl.focus();
      });
    };
    var createForm = function (name, spec) {
      var form = global$b.create(global$4.extend({
        type: 'form',
        layout: 'flex',
        direction: 'row',
        padding: 5,
        name: name,
        spacing: 3
      }, spec));
      form.on('show', function () {
        focusFirstTextBox(form);
      });
      return form;
    };
    var toggleVisibility = function (ctrl, state) {
      return state ? ctrl.show() : ctrl.hide();
    };
    var askAboutPrefix = function (editor, href) {
      return new global$c(function (resolve) {
        editor.windowManager.confirm('The URL you entered seems to be an external link. Do you want to add the required http:// prefix?', function (result) {
          var output = result === true ? 'http://' + href : href;
          resolve(output);
        });
      });
    };
    var convertLinkToAbsolute = function (editor, href) {
      return !UrlType.isAbsolute(href) && UrlType.isDomainLike(href) ? askAboutPrefix(editor, href) : global$c.resolve(href);
    };
    var createQuickLinkForm = function (editor, hide) {
      var attachState = {};
      var unlink = function () {
        editor.focus();
        Actions.unlink(editor);
        hide();
      };
      var onChangeHandler = function (e) {
        var meta = e.meta;
        if (meta && meta.attach) {
          attachState = {
            href: this.value(),
            attach: meta.attach
          };
        }
      };
      var onShowHandler = function (e) {
        if (e.control === this) {
          var elm = void 0, linkurl = '';
          elm = editor.dom.getParent(editor.selection.getStart(), 'a[href]');
          if (elm) {
            linkurl = editor.dom.getAttrib(elm, 'href');
          }
          this.fromJSON({ linkurl: linkurl });
          toggleVisibility(this.find('#unlink'), elm);
          this.find('#linkurl')[0].focus();
        }
      };
      return createForm('quicklink', {
        items: [
          {
            type: 'button',
            name: 'unlink',
            icon: 'unlink',
            onclick: unlink,
            tooltip: 'Remove link'
          },
          {
            type: 'filepicker',
            name: 'linkurl',
            placeholder: 'Paste or type a link',
            filetype: 'file',
            onchange: onChangeHandler
          },
          {
            type: 'button',
            icon: 'checkmark',
            subtype: 'primary',
            tooltip: 'Ok',
            onclick: 'submit'
          }
        ],
        onshow: onShowHandler,
        onsubmit: function (e) {
          convertLinkToAbsolute(editor, e.data.linkurl).then(function (url) {
            editor.undoManager.transact(function () {
              if (url === attachState.href) {
                attachState.attach();
                attachState = {};
              }
              Actions.createLink(editor, url);
            });
            hide();
          });
        }
      });
    };
    var Forms = { createQuickLinkForm: createQuickLinkForm };

    var getSelectorStateResult = function (itemName, item) {
      var result = function (selector, handler) {
        return {
          selector: selector,
          handler: handler
        };
      };
      var activeHandler = function (state) {
        item.active(state);
      };
      var disabledHandler = function (state) {
        item.disabled(state);
      };
      if (item.settings.stateSelector) {
        return result(item.settings.stateSelector, activeHandler);
      }
      if (item.settings.disabledStateSelector) {
        return result(item.settings.disabledStateSelector, disabledHandler);
      }
      return null;
    };
    var bindSelectorChanged = function (editor, itemName, item) {
      return function () {
        var result = getSelectorStateResult(itemName, item);
        if (result !== null) {
          editor.selection.selectorChanged(result.selector, result.handler);
        }
      };
    };
    var itemsToArray$1 = function (items) {
      if (Type.isArray(items)) {
        return items;
      } else if (Type.isString(items)) {
        return items.split(/[ ,]/);
      }
      return [];
    };
    var create$2 = function (editor, name, items) {
      var toolbarItems = [];
      var buttonGroup;
      if (!items) {
        return;
      }
      global$4.each(itemsToArray$1(items), function (item) {
        if (item === '|') {
          buttonGroup = null;
        } else {
          if (editor.buttons[item]) {
            if (!buttonGroup) {
              buttonGroup = {
                type: 'buttongroup',
                items: []
              };
              toolbarItems.push(buttonGroup);
            }
            var button = editor.buttons[item];
            if (Type.isFunction(button)) {
              button = button();
            }
            button.type = button.type || 'button';
            button = global$b.create(button);
            button.on('postRender', bindSelectorChanged(editor, item, button));
            buttonGroup.items.push(button);
          }
        }
      });
      return global$b.create({
        type: 'toolbar',
        layout: 'flow',
        name: name,
        items: toolbarItems
      });
    };
    var Toolbar = { create: create$2 };

    var create$3 = function () {
      var panel, currentRect;
      var createToolbars = function (editor, toolbars) {
        return global$4.map(toolbars, function (toolbar) {
          return Toolbar.create(editor, toolbar.id, toolbar.items);
        });
      };
      var hasToolbarItems = function (toolbar) {
        return toolbar.items().length > 0;
      };
      var create = function (editor, toolbars) {
        var items = createToolbars(editor, toolbars).concat([
          Toolbar.create(editor, 'text', Settings.getTextSelectionToolbarItems(editor)),
          Toolbar.create(editor, 'insert', Settings.getInsertToolbarItems(editor)),
          Forms.createQuickLinkForm(editor, hide)
        ]);
        return global$b.create({
          type: 'floatpanel',
          role: 'dialog',
          classes: 'tinymce tinymce-inline arrow',
          ariaLabel: 'Inline toolbar',
          layout: 'flex',
          direction: 'column',
          align: 'stretch',
          autohide: false,
          autofix: true,
          fixed: true,
          border: 1,
          items: global$4.grep(items, hasToolbarItems),
          oncancel: function () {
            editor.focus();
          }
        });
      };
      var showPanel = function (panel) {
        if (panel) {
          panel.show();
        }
      };
      var movePanelTo = function (panel, pos) {
        panel.moveTo(pos.x, pos.y);
      };
      var togglePositionClass = function (panel, relPos) {
        relPos = relPos ? relPos.substr(0, 2) : '';
        global$4.each({
          t: 'down',
          b: 'up',
          c: 'center'
        }, function (cls, pos) {
          panel.classes.toggle('arrow-' + cls, pos === relPos.substr(0, 1));
        });
        if (relPos === 'cr') {
          panel.classes.toggle('arrow-left', true);
          panel.classes.toggle('arrow-right', false);
        } else if (relPos === 'cl') {
          panel.classes.toggle('arrow-left', false);
          panel.classes.toggle('arrow-right', true);
        } else {
          global$4.each({
            l: 'left',
            r: 'right'
          }, function (cls, pos) {
            panel.classes.toggle('arrow-' + cls, pos === relPos.substr(1, 1));
          });
        }
      };
      var showToolbar = function (panel, id) {
        var toolbars = panel.items().filter('#' + id);
        if (toolbars.length > 0) {
          toolbars[0].show();
          panel.reflow();
          return true;
        }
        return false;
      };
      var repositionPanelAt = function (panel, id, editor, targetRect) {
        var contentAreaRect, panelRect, result, userConstainHandler;
        userConstainHandler = Settings.getPositionHandler(editor);
        contentAreaRect = Measure.getContentAreaRect(editor);
        panelRect = global$2.DOM.getRect(panel.getEl());
        if (id === 'insert') {
          result = Layout.calcInsert(targetRect, contentAreaRect, panelRect);
        } else {
          result = Layout.calc(targetRect, contentAreaRect, panelRect);
        }
        if (result) {
          var delta = UiContainer$1.getUiContainerDelta().getOr({
            x: 0,
            y: 0
          });
          var transposedPanelRect = {
            x: result.rect.x - delta.x,
            y: result.rect.y - delta.y,
            w: result.rect.w,
            h: result.rect.h
          };
          currentRect = targetRect;
          movePanelTo(panel, Layout.userConstrain(userConstainHandler, targetRect, contentAreaRect, transposedPanelRect));
          togglePositionClass(panel, result.position);
          return true;
        } else {
          return false;
        }
      };
      var showPanelAt = function (panel, id, editor, targetRect) {
        showPanel(panel);
        panel.items().hide();
        if (!showToolbar(panel, id)) {
          hide();
          return;
        }
        if (repositionPanelAt(panel, id, editor, targetRect) === false) {
          hide();
        }
      };
      var hasFormVisible = function () {
        return panel.items().filter('form:visible').length > 0;
      };
      var showForm = function (editor, id) {
        if (panel) {
          panel.items().hide();
          if (!showToolbar(panel, id)) {
            hide();
            return;
          }
          var contentAreaRect = void 0, panelRect = void 0, result = void 0, userConstainHandler = void 0;
          showPanel(panel);
          panel.items().hide();
          showToolbar(panel, id);
          userConstainHandler = Settings.getPositionHandler(editor);
          contentAreaRect = Measure.getContentAreaRect(editor);
          panelRect = global$2.DOM.getRect(panel.getEl());
          result = Layout.calc(currentRect, contentAreaRect, panelRect);
          if (result) {
            panelRect = result.rect;
            movePanelTo(panel, Layout.userConstrain(userConstainHandler, currentRect, contentAreaRect, panelRect));
            togglePositionClass(panel, result.position);
          }
        }
      };
      var show = function (editor, id, targetRect, toolbars) {
        if (!panel) {
          Events.fireBeforeRenderUI(editor);
          panel = create(editor, toolbars);
          panel.renderTo().reflow().moveTo(targetRect.x, targetRect.y);
          editor.nodeChanged();
        }
        showPanelAt(panel, id, editor, targetRect);
      };
      var reposition = function (editor, id, targetRect) {
        if (panel) {
          repositionPanelAt(panel, id, editor, targetRect);
        }
      };
      var hide = function () {
        if (panel) {
          panel.hide();
        }
      };
      var focus = function () {
        if (panel) {
          panel.find('toolbar:visible').eq(0).each(function (item) {
            item.focus(true);
          });
        }
      };
      var remove = function () {
        if (panel) {
          panel.remove();
          panel = null;
        }
      };
      var inForm = function () {
        return panel && panel.visible() && hasFormVisible();
      };
      return {
        show: show,
        showForm: showForm,
        reposition: reposition,
        inForm: inForm,
        hide: hide,
        focus: focus,
        remove: remove
      };
    };

    var Layout$1 = global$8.extend({
      Defaults: {
        firstControlClass: 'first',
        lastControlClass: 'last'
      },
      init: function (settings) {
        this.settings = global$4.extend({}, this.Defaults, settings);
      },
      preRender: function (container) {
        container.bodyClasses.add(this.settings.containerClass);
      },
      applyClasses: function (items) {
        var self = this;
        var settings = self.settings;
        var firstClass, lastClass, firstItem, lastItem;
        firstClass = settings.firstControlClass;
        lastClass = settings.lastControlClass;
        items.each(function (item) {
          item.classes.remove(firstClass).remove(lastClass).add(settings.controlClass);
          if (item.visible()) {
            if (!firstItem) {
              firstItem = item;
            }
            lastItem = item;
          }
        });
        if (firstItem) {
          firstItem.classes.add(firstClass);
        }
        if (lastItem) {
          lastItem.classes.add(lastClass);
        }
      },
      renderHtml: function (container) {
        var self = this;
        var html = '';
        self.applyClasses(container.items());
        container.items().each(function (item) {
          html += item.renderHtml();
        });
        return html;
      },
      recalc: function () {
      },
      postRender: function () {
      },
      isNative: function () {
        return false;
      }
    });

    var AbsoluteLayout = Layout$1.extend({
      Defaults: {
        containerClass: 'abs-layout',
        controlClass: 'abs-layout-item'
      },
      recalc: function (container) {
        container.items().filter(':visible').each(function (ctrl) {
          var settings = ctrl.settings;
          ctrl.layoutRect({
            x: settings.x,
            y: settings.y,
            w: settings.w,
            h: settings.h
          });
          if (ctrl.recalc) {
            ctrl.recalc();
          }
        });
      },
      renderHtml: function (container) {
        return '<div id="' + container._id + '-absend" class="' + container.classPrefix + 'abs-end"></div>' + this._super(container);
      }
    });

    var Button = Widget.extend({
      Defaults: {
        classes: 'widget btn',
        role: 'button'
      },
      init: function (settings) {
        var self = this;
        var size;
        self._super(settings);
        settings = self.settings;
        size = self.settings.size;
        self.on('click mousedown', function (e) {
          e.preventDefault();
        });
        self.on('touchstart', function (e) {
          self.fire('click', e);
          e.preventDefault();
        });
        if (settings.subtype) {
          self.classes.add(settings.subtype);
        }
        if (size) {
          self.classes.add('btn-' + size);
        }
        if (settings.icon) {
          self.icon(settings.icon);
        }
      },
      icon: function (icon) {
        if (!arguments.length) {
          return this.state.get('icon');
        }
        this.state.set('icon', icon);
        return this;
      },
      repaint: function () {
        var btnElm = this.getEl().firstChild;
        var btnStyle;
        if (btnElm) {
          btnStyle = btnElm.style;
          btnStyle.width = btnStyle.height = '100%';
        }
        this._super();
      },
      renderHtml: function () {
        var self = this, id = self._id, prefix = self.classPrefix;
        var icon = self.state.get('icon'), image;
        var text = self.state.get('text');
        var textHtml = '';
        var ariaPressed;
        var settings = self.settings;
        image = settings.image;
        if (image) {
          icon = 'none';
          if (typeof image !== 'string') {
            image = domGlobals.window.getSelection ? image[0] : image[1];
          }
          image = ' style="background-image: url(\'' + image + '\')"';
        } else {
          image = '';
        }
        if (text) {
          self.classes.add('btn-has-text');
          textHtml = '<span class="' + prefix + 'txt">' + self.encode(text) + '</span>';
        }
        icon = icon ? prefix + 'ico ' + prefix + 'i-' + icon : '';
        ariaPressed = typeof settings.active === 'boolean' ? ' aria-pressed="' + settings.active + '"' : '';
        return '<div id="' + id + '" class="' + self.classes + '" tabindex="-1"' + ariaPressed + '>' + '<button id="' + id + '-button" role="presentation" type="button" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + '></i>' : '') + textHtml + '</button>' + '</div>';
      },
      bindStates: function () {
        var self = this, $ = self.$, textCls = self.classPrefix + 'txt';
        function setButtonText(text) {
          var $span = $('span.' + textCls, self.getEl());
          if (text) {
            if (!$span[0]) {
              $('button:first', self.getEl()).append('<span class="' + textCls + '"></span>');
              $span = $('span.' + textCls, self.getEl());
            }
            $span.html(self.encode(text));
          } else {
            $span.remove();
          }
          self.classes.toggle('btn-has-text', !!text);
        }
        self.state.on('change:text', function (e) {
          setButtonText(e.value);
        });
        self.state.on('change:icon', function (e) {
          var icon = e.value;
          var prefix = self.classPrefix;
          self.settings.icon = icon;
          icon = icon ? prefix + 'ico ' + prefix + 'i-' + self.settings.icon : '';
          var btnElm = self.getEl().firstChild;
          var iconElm = btnElm.getElementsByTagName('i')[0];
          if (icon) {
            if (!iconElm || iconElm !== btnElm.firstChild) {
              iconElm = domGlobals.document.createElement('i');
              btnElm.insertBefore(iconElm, btnElm.firstChild);
            }
            iconElm.className = icon;
          } else if (iconElm) {
            btnElm.removeChild(iconElm);
          }
          setButtonText(self.state.get('text'));
        });
        return self._super();
      }
    });

    var BrowseButton = Button.extend({
      init: function (settings) {
        var self = this;
        settings = global$4.extend({
          text: 'Browse...',
          multiple: false,
          accept: null
        }, settings);
        self._super(settings);
        self.classes.add('browsebutton');
        if (settings.multiple) {
          self.classes.add('multiple');
        }
      },
      postRender: function () {
        var self = this;
        var input = funcs.create('input', {
          type: 'file',
          id: self._id + '-browse',
          accept: self.settings.accept
        });
        self._super();
        global$7(input).on('change', function (e) {
          var files = e.target.files;
          self.value = function () {
            if (!files.length) {
              return null;
            } else if (self.settings.multiple) {
              return files;
            } else {
              return files[0];
            }
          };
          e.preventDefault();
          if (files.length) {
            self.fire('change', e);
          }
        });
        global$7(input).on('click', function (e) {
          e.stopPropagation();
        });
        global$7(self.getEl('button')).on('click touchstart', function (e) {
          e.stopPropagation();
          input.click();
          e.preventDefault();
        });
        self.getEl().appendChild(input);
      },
      remove: function () {
        global$7(this.getEl('button')).off();
        global$7(this.getEl('input')).off();
        this._super();
      }
    });

    var ButtonGroup = Container.extend({
      Defaults: {
        defaultType: 'button',
        role: 'group'
      },
      renderHtml: function () {
        var self = this, layout = self._layout;
        self.classes.add('btn-group');
        self.preRender();
        layout.preRender(self);
        return '<div id="' + self._id + '" class="' + self.classes + '">' + '<div id="' + self._id + '-body">' + (self.settings.html || '') + layout.renderHtml(self) + '</div>' + '</div>';
      }
    });

    var Checkbox = Widget.extend({
      Defaults: {
        classes: 'checkbox',
        role: 'checkbox',
        checked: false
      },
      init: function (settings) {
        var self = this;
        self._super(settings);
        self.on('click mousedown', function (e) {
          e.preventDefault();
        });
        self.on('click', function (e) {
          e.preventDefault();
          if (!self.disabled()) {
            self.checked(!self.checked());
          }
        });
        self.checked(self.settings.checked);
      },
      checked: function (state) {
        if (!arguments.length) {
          return this.state.get('checked');
        }
        this.state.set('checked', state);
        return this;
      },
      value: function (state) {
        if (!arguments.length) {
          return this.checked();
        }
        return this.checked(state);
      },
      renderHtml: function () {
        var self = this, id = self._id, prefix = self.classPrefix;
        return '<div id="' + id + '" class="' + self.classes + '" unselectable="on" aria-labelledby="' + id + '-al" tabindex="-1">' + '<i class="' + prefix + 'ico ' + prefix + 'i-checkbox"></i>' + '<span id="' + id + '-al" class="' + prefix + 'label">' + self.encode(self.state.get('text')) + '</span>' + '</div>';
      },
      bindStates: function () {
        var self = this;
        function checked(state) {
          self.classes.toggle('checked', state);
          self.aria('checked', state);
        }
        self.state.on('change:text', function (e) {
          self.getEl('al').firstChild.data = self.translate(e.value);
        });
        self.state.on('change:checked change:value', function (e) {
          self.fire('change');
          checked(e.value);
        });
        self.state.on('change:icon', function (e) {
          var icon = e.value;
          var prefix = self.classPrefix;
          if (typeof icon === 'undefined') {
            return self.settings.icon;
          }
          self.settings.icon = icon;
          icon = icon ? prefix + 'ico ' + prefix + 'i-' + self.settings.icon : '';
          var btnElm = self.getEl().firstChild;
          var iconElm = btnElm.getElementsByTagName('i')[0];
          if (icon) {
            if (!iconElm || iconElm !== btnElm.firstChild) {
              iconElm = domGlobals.document.createElement('i');
              btnElm.insertBefore(iconElm, btnElm.firstChild);
            }
            iconElm.className = icon;
          } else if (iconElm) {
            btnElm.removeChild(iconElm);
          }
        });
        if (self.state.get('checked')) {
          checked(true);
        }
        return self._super();
      }
    });

    var global$f = tinymce.util.Tools.resolve('tinymce.util.VK');

    var ComboBox = Widget.extend({
      init: function (settings) {
        var self = this;
        self._super(settings);
        settings = self.settings;
        self.classes.add('combobox');
        self.subinput = true;
        self.ariaTarget = 'inp';
        settings.menu = settings.menu || settings.values;
        if (settings.menu) {
          settings.icon = 'caret';
        }
        self.on('click', function (e) {
          var elm = e.target;
          var root = self.getEl();
          if (!global$7.contains(root, elm) && elm !== root) {
            return;
          }
          while (elm && elm !== root) {
            if (elm.id && elm.id.indexOf('-open') !== -1) {
              self.fire('action');
              if (settings.menu) {
                self.showMenu();
                if (e.aria) {
                  self.menu.items()[0].focus();
                }
              }
            }
            elm = elm.parentNode;
          }
        });
        self.on('keydown', function (e) {
          var rootControl;
          if (e.keyCode === 13 && e.target.nodeName === 'INPUT') {
            e.preventDefault();
            self.parents().reverse().each(function (ctrl) {
              if (ctrl.toJSON) {
                rootControl = ctrl;
                return false;
              }
            });
            self.fire('submit', { data: rootControl.toJSON() });
          }
        });
        self.on('keyup', function (e) {
          if (e.target.nodeName === 'INPUT') {
            var oldValue = self.state.get('value');
            var newValue = e.target.value;
            if (newValue !== oldValue) {
              self.state.set('value', newValue);
              self.fire('autocomplete', e);
            }
          }
        });
        self.on('mouseover', function (e) {
          var tooltip = self.tooltip().moveTo(-65535);
          if (self.statusLevel() && e.target.className.indexOf(self.classPrefix + 'status') !== -1) {
            var statusMessage = self.statusMessage() || 'Ok';
            var rel = tooltip.text(statusMessage).show().testMoveRel(e.target, [
              'bc-tc',
              'bc-tl',
              'bc-tr'
            ]);
            tooltip.classes.toggle('tooltip-n', rel === 'bc-tc');
            tooltip.classes.toggle('tooltip-nw', rel === 'bc-tl');
            tooltip.classes.toggle('tooltip-ne', rel === 'bc-tr');
            tooltip.moveRel(e.target, rel);
          }
        });
      },
      statusLevel: function (value) {
        if (arguments.length > 0) {
          this.state.set('statusLevel', value);
        }
        return this.state.get('statusLevel');
      },
      statusMessage: function (value) {
        if (arguments.length > 0) {
          this.state.set('statusMessage', value);
        }
        return this.state.get('statusMessage');
      },
      showMenu: function () {
        var self = this;
        var settings = self.settings;
        var menu;
        if (!self.menu) {
          menu = settings.menu || [];
          if (menu.length) {
            menu = {
              type: 'menu',
              items: menu
            };
          } else {
            menu.type = menu.type || 'menu';
          }
          self.menu = global$b.create(menu).parent(self).renderTo(self.getContainerElm());
          self.fire('createmenu');
          self.menu.reflow();
          self.menu.on('cancel', function (e) {
            if (e.control === self.menu) {
              self.focus();
            }
          });
          self.menu.on('show hide', function (e) {
            e.control.items().each(function (ctrl) {
              ctrl.active(ctrl.value() === self.value());
            });
          }).fire('show');
          self.menu.on('select', function (e) {
            self.value(e.control.value());
          });
          self.on('focusin', function (e) {
            if (e.target.tagName.toUpperCase() === 'INPUT') {
              self.menu.hide();
            }
          });
          self.aria('expanded', true);
        }
        self.menu.show();
        self.menu.layoutRect({ w: self.layoutRect().w });
        self.menu.moveRel(self.getEl(), self.isRtl() ? [
          'br-tr',
          'tr-br'
        ] : [
          'bl-tl',
          'tl-bl'
        ]);
      },
      focus: function () {
        this.getEl('inp').focus();
      },
      repaint: function () {
        var self = this, elm = self.getEl(), openElm = self.getEl('open'), rect = self.layoutRect();
        var width, lineHeight, innerPadding = 0;
        var inputElm = elm.firstChild;
        if (self.statusLevel() && self.statusLevel() !== 'none') {
          innerPadding = parseInt(funcs.getRuntimeStyle(inputElm, 'padding-right'), 10) - parseInt(funcs.getRuntimeStyle(inputElm, 'padding-left'), 10);
        }
        if (openElm) {
          width = rect.w - funcs.getSize(openElm).width - 10;
        } else {
          width = rect.w - 10;
        }
        var doc = domGlobals.document;
        if (doc.all && (!doc.documentMode || doc.documentMode <= 8)) {
          lineHeight = self.layoutRect().h - 2 + 'px';
        }
        global$7(inputElm).css({
          width: width - innerPadding,
          lineHeight: lineHeight
        });
        self._super();
        return self;
      },
      postRender: function () {
        var self = this;
        global$7(this.getEl('inp')).on('change', function (e) {
          self.state.set('value', e.target.value);
          self.fire('change', e);
        });
        return self._super();
      },
      renderHtml: function () {
        var self = this, id = self._id, settings = self.settings, prefix = self.classPrefix;
        var value = self.state.get('value') || '';
        var icon, text, openBtnHtml = '', extraAttrs = '', statusHtml = '';
        if ('spellcheck' in settings) {
          extraAttrs += ' spellcheck="' + settings.spellcheck + '"';
        }
        if (settings.maxLength) {
          extraAttrs += ' maxlength="' + settings.maxLength + '"';
        }
        if (settings.size) {
          extraAttrs += ' size="' + settings.size + '"';
        }
        if (settings.subtype) {
          extraAttrs += ' type="' + settings.subtype + '"';
        }
        statusHtml = '<i id="' + id + '-status" class="mce-status mce-ico" style="display: none"></i>';
        if (self.disabled()) {
          extraAttrs += ' disabled="disabled"';
        }
        icon = settings.icon;
        if (icon && icon !== 'caret') {
          icon = prefix + 'ico ' + prefix + 'i-' + settings.icon;
        }
        text = self.state.get('text');
        if (icon || text) {
          openBtnHtml = '<div id="' + id + '-open" class="' + prefix + 'btn ' + prefix + 'open" tabIndex="-1" role="button">' + '<button id="' + id + '-action" type="button" hidefocus="1" tabindex="-1">' + (icon !== 'caret' ? '<i class="' + icon + '"></i>' : '<i class="' + prefix + 'caret"></i>') + (text ? (icon ? ' ' : '') + text : '') + '</button>' + '</div>';
          self.classes.add('has-open');
        }
        return '<div id="' + id + '" class="' + self.classes + '">' + '<input id="' + id + '-inp" class="' + prefix + 'textbox" value="' + self.encode(value, false) + '" hidefocus="1"' + extraAttrs + ' placeholder="' + self.encode(settings.placeholder) + '" />' + statusHtml + openBtnHtml + '</div>';
      },
      value: function (value) {
        if (arguments.length) {
          this.state.set('value', value);
          return this;
        }
        if (this.state.get('rendered')) {
          this.state.set('value', this.getEl('inp').value);
        }
        return this.state.get('value');
      },
      showAutoComplete: function (items, term) {
        var self = this;
        if (items.length === 0) {
          self.hideMenu();
          return;
        }
        var insert = function (value, title) {
          return function () {
            self.fire('selectitem', {
              title: title,
              value: value
            });
          };
        };
        if (self.menu) {
          self.menu.items().remove();
        } else {
          self.menu = global$b.create({
            type: 'menu',
            classes: 'combobox-menu',
            layout: 'flow'
          }).parent(self).renderTo();
        }
        global$4.each(items, function (item) {
          self.menu.add({
            text: item.title,
            url: item.previewUrl,
            match: term,
            classes: 'menu-item-ellipsis',
            onclick: insert(item.value, item.title)
          });
        });
        self.menu.renderNew();
        self.hideMenu();
        self.menu.on('cancel', function (e) {
          if (e.control.parent() === self.menu) {
            e.stopPropagation();
            self.focus();
            self.hideMenu();
          }
        });
        self.menu.on('select', function () {
          self.focus();
        });
        var maxW = self.layoutRect().w;
        self.menu.layoutRect({
          w: maxW,
          minW: 0,
          maxW: maxW
        });
        self.menu.repaint();
        self.menu.reflow();
        self.menu.show();
        self.menu.moveRel(self.getEl(), self.isRtl() ? [
          'br-tr',
          'tr-br'
        ] : [
          'bl-tl',
          'tl-bl'
        ]);
      },
      hideMenu: function () {
        if (this.menu) {
          this.menu.hide();
        }
      },
      bindStates: function () {
        var self = this;
        self.state.on('change:value', function (e) {
          if (self.getEl('inp').value !== e.value) {
            self.getEl('inp').value = e.value;
          }
        });
        self.state.on('change:disabled', function (e) {
          self.getEl('inp').disabled = e.value;
        });
        self.state.on('change:statusLevel', function (e) {
          var statusIconElm = self.getEl('status');
          var prefix = self.classPrefix, value = e.value;
          funcs.css(statusIconElm, 'display', value === 'none' ? 'none' : '');
          funcs.toggleClass(statusIconElm, prefix + 'i-checkmark', value === 'ok');
          funcs.toggleClass(statusIconElm, prefix + 'i-warning', value === 'warn');
          funcs.toggleClass(statusIconElm, prefix + 'i-error', value === 'error');
          self.classes.toggle('has-status', value !== 'none');
          self.repaint();
        });
        funcs.on(self.getEl('status'), 'mouseleave', function () {
          self.tooltip().hide();
        });
        self.on('cancel', function (e) {
          if (self.menu && self.menu.visible()) {
            e.stopPropagation();
            self.hideMenu();
          }
        });
        var focusIdx = function (idx, menu) {
          if (menu && menu.items().length > 0) {
            menu.items().eq(idx)[0].focus();
          }
        };
        self.on('keydown', function (e) {
          var keyCode = e.keyCode;
          if (e.target.nodeName === 'INPUT') {
            if (keyCode === global$f.DOWN) {
              e.preventDefault();
              self.fire('autocomplete');
              focusIdx(0, self.menu);
            } else if (keyCode === global$f.UP) {
              e.preventDefault();
              focusIdx(-1, self.menu);
            }
          }
        });
        return self._super();
      },
      remove: function () {
        global$7(this.getEl('inp')).off();
        if (this.menu) {
          this.menu.remove();
        }
        this._super();
      }
    });

    var ColorBox = ComboBox.extend({
      init: function (settings) {
        var self = this;
        settings.spellcheck = false;
        if (settings.onaction) {
          settings.icon = 'none';
        }
        self._super(settings);
        self.classes.add('colorbox');
        self.on('change keyup postrender', function () {
          self.repaintColor(self.value());
        });
      },
      repaintColor: function (value) {
        var openElm = this.getEl('open');
        var elm = openElm ? openElm.getElementsByTagName('i')[0] : null;
        if (elm) {
          try {
            elm.style.background = value;
          } catch (ex) {
          }
        }
      },
      bindStates: function () {
        var self = this;
        self.state.on('change:value', function (e) {
          if (self.state.get('rendered')) {
            self.repaintColor(e.value);
          }
        });
        return self._super();
      }
    });

    var PanelButton = Button.extend({
      showPanel: function () {
        var self = this, settings = self.settings;
        self.classes.add('opened');
        if (!self.panel) {
          var panelSettings = settings.panel;
          if (panelSettings.type) {
            panelSettings = {
              layout: 'grid',
              items: panelSettings
            };
          }
          panelSettings.role = panelSettings.role || 'dialog';
          panelSettings.popover = true;
          panelSettings.autohide = true;
          panelSettings.ariaRoot = true;
          self.panel = new FloatPanel(panelSettings).on('hide', function () {
            self.classes.remove('opened');
          }).on('cancel', function (e) {
            e.stopPropagation();
            self.focus();
            self.hidePanel();
          }).parent(self).renderTo(self.getContainerElm());
          self.panel.fire('show');
          self.panel.reflow();
        } else {
          self.panel.show();
        }
        var rtlRels = [
          'bc-tc',
          'bc-tl',
          'bc-tr'
        ];
        var ltrRels = [
          'bc-tc',
          'bc-tr',
          'bc-tl',
          'tc-bc',
          'tc-br',
          'tc-bl'
        ];
        var rel = self.panel.testMoveRel(self.getEl(), settings.popoverAlign || (self.isRtl() ? rtlRels : ltrRels));
        self.panel.classes.toggle('start', rel.substr(-1) === 'l');
        self.panel.classes.toggle('end', rel.substr(-1) === 'r');
        var isTop = rel.substr(0, 1) === 't';
        self.panel.classes.toggle('bottom', !isTop);
        self.panel.classes.toggle('top', isTop);
        self.panel.moveRel(self.getEl(), rel);
      },
      hidePanel: function () {
        var self = this;
        if (self.panel) {
          self.panel.hide();
        }
      },
      postRender: function () {
        var self = this;
        self.aria('haspopup', true);
        self.on('click', function (e) {
          if (e.control === self) {
            if (self.panel && self.panel.visible()) {
              self.hidePanel();
            } else {
              self.showPanel();
              self.panel.focus(!!e.aria);
            }
          }
        });
        return self._super();
      },
      remove: function () {
        if (this.panel) {
          this.panel.remove();
          this.panel = null;
        }
        return this._super();
      }
    });

    var DOM = global$2.DOM;
    var ColorButton = PanelButton.extend({
      init: function (settings) {
        this._super(settings);
        this.classes.add('splitbtn');
        this.classes.add('colorbutton');
      },
      color: function (color) {
        if (color) {
          this._color = color;
          this.getEl('preview').style.backgroundColor = color;
          return this;
        }
        return this._color;
      },
      resetColor: function () {
        this._color = null;
        this.getEl('preview').style.backgroundColor = null;
        return this;
      },
      renderHtml: function () {
        var self = this, id = self._id, prefix = self.classPrefix, text = self.state.get('text');
        var icon = self.settings.icon ? prefix + 'ico ' + prefix + 'i-' + self.settings.icon : '';
        var image = self.settings.image ? ' style="background-image: url(\'' + self.settings.image + '\')"' : '';
        var textHtml = '';
        if (text) {
          self.classes.add('btn-has-text');
          textHtml = '<span class="' + prefix + 'txt">' + self.encode(text) + '</span>';
        }
        return '<div id="' + id + '" class="' + self.classes + '" role="button" tabindex="-1" aria-haspopup="true">' + '<button role="presentation" hidefocus="1" type="button" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + '></i>' : '') + '<span id="' + id + '-preview" class="' + prefix + 'preview"></span>' + textHtml + '</button>' + '<button type="button" class="' + prefix + 'open" hidefocus="1" tabindex="-1">' + ' <i class="' + prefix + 'caret"></i>' + '</button>' + '</div>';
      },
      postRender: function () {
        var self = this, onClickHandler = self.settings.onclick;
        self.on('click', function (e) {
          if (e.aria && e.aria.key === 'down') {
            return;
          }
          if (e.control === self && !DOM.getParent(e.target, '.' + self.classPrefix + 'open')) {
            e.stopImmediatePropagation();
            onClickHandler.call(self, e);
          }
        });
        delete self.settings.onclick;
        return self._super();
      }
    });

    var global$g = tinymce.util.Tools.resolve('tinymce.util.Color');

    var ColorPicker = Widget.extend({
      Defaults: { classes: 'widget colorpicker' },
      init: function (settings) {
        this._super(settings);
      },
      postRender: function () {
        var self = this;
        var color = self.color();
        var hsv, hueRootElm, huePointElm, svRootElm, svPointElm;
        hueRootElm = self.getEl('h');
        huePointElm = self.getEl('hp');
        svRootElm = self.getEl('sv');
        svPointElm = self.getEl('svp');
        function getPos(elm, event) {
          var pos = funcs.getPos(elm);
          var x, y;
          x = event.pageX - pos.x;
          y = event.pageY - pos.y;
          x = Math.max(0, Math.min(x / elm.clientWidth, 1));
          y = Math.max(0, Math.min(y / elm.clientHeight, 1));
          return {
            x: x,
            y: y
          };
        }
        function updateColor(hsv, hueUpdate) {
          var hue = (360 - hsv.h) / 360;
          funcs.css(huePointElm, { top: hue * 100 + '%' });
          if (!hueUpdate) {
            funcs.css(svPointElm, {
              left: hsv.s + '%',
              top: 100 - hsv.v + '%'
            });
          }
          svRootElm.style.background = global$g({
            s: 100,
            v: 100,
            h: hsv.h
          }).toHex();
          self.color().parse({
            s: hsv.s,
            v: hsv.v,
            h: hsv.h
          });
        }
        function updateSaturationAndValue(e) {
          var pos;
          pos = getPos(svRootElm, e);
          hsv.s = pos.x * 100;
          hsv.v = (1 - pos.y) * 100;
          updateColor(hsv);
          self.fire('change');
        }
        function updateHue(e) {
          var pos;
          pos = getPos(hueRootElm, e);
          hsv = color.toHsv();
          hsv.h = (1 - pos.y) * 360;
          updateColor(hsv, true);
          self.fire('change');
        }
        self._repaint = function () {
          hsv = color.toHsv();
          updateColor(hsv);
        };
        self._super();
        self._svdraghelper = new DragHelper(self._id + '-sv', {
          start: updateSaturationAndValue,
          drag: updateSaturationAndValue
        });
        self._hdraghelper = new DragHelper(self._id + '-h', {
          start: updateHue,
          drag: updateHue
        });
        self._repaint();
      },
      rgb: function () {
        return this.color().toRgb();
      },
      value: function (value) {
        var self = this;
        if (arguments.length) {
          self.color().parse(value);
          if (self._rendered) {
            self._repaint();
          }
        } else {
          return self.color().toHex();
        }
      },
      color: function () {
        if (!this._color) {
          this._color = global$g();
        }
        return this._color;
      },
      renderHtml: function () {
        var self = this;
        var id = self._id;
        var prefix = self.classPrefix;
        var hueHtml;
        var stops = '#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000';
        function getOldIeFallbackHtml() {
          var i, l, html = '', gradientPrefix, stopsList;
          gradientPrefix = 'filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=';
          stopsList = stops.split(',');
          for (i = 0, l = stopsList.length - 1; i < l; i++) {
            html += '<div class="' + prefix + 'colorpicker-h-chunk" style="' + 'height:' + 100 / l + '%;' + gradientPrefix + stopsList[i] + ',endColorstr=' + stopsList[i + 1] + ');' + '-ms-' + gradientPrefix + stopsList[i] + ',endColorstr=' + stopsList[i + 1] + ')' + '"></div>';
          }
          return html;
        }
        var gradientCssText = 'background: -ms-linear-gradient(top,' + stops + ');' + 'background: linear-gradient(to bottom,' + stops + ');';
        hueHtml = '<div id="' + id + '-h" class="' + prefix + 'colorpicker-h" style="' + gradientCssText + '">' + getOldIeFallbackHtml() + '<div id="' + id + '-hp" class="' + prefix + 'colorpicker-h-marker"></div>' + '</div>';
        return '<div id="' + id + '" class="' + self.classes + '">' + '<div id="' + id + '-sv" class="' + prefix + 'colorpicker-sv">' + '<div class="' + prefix + 'colorpicker-overlay1">' + '<div class="' + prefix + 'colorpicker-overlay2">' + '<div id="' + id + '-svp" class="' + prefix + 'colorpicker-selector1">' + '<div class="' + prefix + 'colorpicker-selector2"></div>' + '</div>' + '</div>' + '</div>' + '</div>' + hueHtml + '</div>';
      }
    });

    var DropZone = Widget.extend({
      init: function (settings) {
        var self = this;
        settings = global$4.extend({
          height: 100,
          text: 'Drop an image here',
          multiple: false,
          accept: null
        }, settings);
        self._super(settings);
        self.classes.add('dropzone');
        if (settings.multiple) {
          self.classes.add('multiple');
        }
      },
      renderHtml: function () {
        var self = this;
        var attrs, elm;
        var cfg = self.settings;
        attrs = {
          id: self._id,
          hidefocus: '1'
        };
        elm = funcs.create('div', attrs, '<span>' + this.translate(cfg.text) + '</span>');
        if (cfg.height) {
          funcs.css(elm, 'height', cfg.height + 'px');
        }
        if (cfg.width) {
          funcs.css(elm, 'width', cfg.width + 'px');
        }
        elm.className = self.classes;
        return elm.outerHTML;
      },
      postRender: function () {
        var self = this;
        var toggleDragClass = function (e) {
          e.preventDefault();
          self.classes.toggle('dragenter');
          self.getEl().className = self.classes;
        };
        var filter = function (files) {
          var accept = self.settings.accept;
          if (typeof accept !== 'string') {
            return files;
          }
          var re = new RegExp('(' + accept.split(/\s*,\s*/).join('|') + ')$', 'i');
          return global$4.grep(files, function (file) {
            return re.test(file.name);
          });
        };
        self._super();
        self.$el.on('dragover', function (e) {
          e.preventDefault();
        });
        self.$el.on('dragenter', toggleDragClass);
        self.$el.on('dragleave', toggleDragClass);
        self.$el.on('drop', function (e) {
          e.preventDefault();
          if (self.state.get('disabled')) {
            return;
          }
          var files = filter(e.dataTransfer.files);
          self.value = function () {
            if (!files.length) {
              return null;
            } else if (self.settings.multiple) {
              return files;
            } else {
              return files[0];
            }
          };
          if (files.length) {
            self.fire('change', e);
          }
        });
      },
      remove: function () {
        this.$el.off();
        this._super();
      }
    });

    var Path = Widget.extend({
      init: function (settings) {
        var self = this;
        if (!settings.delimiter) {
          settings.delimiter = '\xBB';
        }
        self._super(settings);
        self.classes.add('path');
        self.canFocus = true;
        self.on('click', function (e) {
          var index;
          var target = e.target;
          if (index = target.getAttribute('data-index')) {
            self.fire('select', {
              value: self.row()[index],
              index: index
            });
          }
        });
        self.row(self.settings.row);
      },
      focus: function () {
        var self = this;
        self.getEl().firstChild.focus();
        return self;
      },
      row: function (row) {
        if (!arguments.length) {
          return this.state.get('row');
        }
        this.state.set('row', row);
        return this;
      },
      renderHtml: function () {
        var self = this;
        return '<div id="' + self._id + '" class="' + self.classes + '">' + self._getDataPathHtml(self.state.get('row')) + '</div>';
      },
      bindStates: function () {
        var self = this;
        self.state.on('change:row', function (e) {
          self.innerHtml(self._getDataPathHtml(e.value));
        });
        return self._super();
      },
      _getDataPathHtml: function (data) {
        var self = this;
        var parts = data || [];
        var i, l, html = '';
        var prefix = self.classPrefix;
        for (i = 0, l = parts.length; i < l; i++) {
          html += (i > 0 ? '<div class="' + prefix + 'divider" aria-hidden="true"> ' + self.settings.delimiter + ' </div>' : '') + '<div role="button" class="' + prefix + 'path-item' + (i === l - 1 ? ' ' + prefix + 'last' : '') + '" data-index="' + i + '" tabindex="-1" id="' + self._id + '-' + i + '" aria-level="' + (i + 1) + '">' + parts[i].name + '</div>';
        }
        if (!html) {
          html = '<div class="' + prefix + 'path-item">\xA0</div>';
        }
        return html;
      }
    });

    var ElementPath = Path.extend({
      postRender: function () {
        var self = this, editor = self.settings.editor;
        function isHidden(elm) {
          if (elm.nodeType === 1) {
            if (elm.nodeName === 'BR' || !!elm.getAttribute('data-mce-bogus')) {
              return true;
            }
            if (elm.getAttribute('data-mce-type') === 'bookmark') {
              return true;
            }
          }
          return false;
        }
        if (editor.settings.elementpath !== false) {
          self.on('select', function (e) {
            editor.focus();
            editor.selection.select(this.row()[e.index].element);
            editor.nodeChanged();
          });
          editor.on('nodeChange', function (e) {
            var outParents = [];
            var parents = e.parents;
            var i = parents.length;
            while (i--) {
              if (parents[i].nodeType === 1 && !isHidden(parents[i])) {
                var args = editor.fire('ResolveName', {
                  name: parents[i].nodeName.toLowerCase(),
                  target: parents[i]
                });
                if (!args.isDefaultPrevented()) {
                  outParents.push({
                    name: args.name,
                    element: parents[i]
                  });
                }
                if (args.isPropagationStopped()) {
                  break;
                }
              }
            }
            self.row(outParents);
          });
        }
        return self._super();
      }
    });

    var FormItem = Container.extend({
      Defaults: {
        layout: 'flex',
        align: 'center',
        defaults: { flex: 1 }
      },
      renderHtml: function () {
        var self = this, layout = self._layout, prefix = self.classPrefix;
        self.classes.add('formitem');
        layout.preRender(self);
        return '<div id="' + self._id + '" class="' + self.classes + '" hidefocus="1" tabindex="-1">' + (self.settings.title ? '<div id="' + self._id + '-title" class="' + prefix + 'title">' + self.settings.title + '</div>' : '') + '<div id="' + self._id + '-body" class="' + self.bodyClasses + '">' + (self.settings.html || '') + layout.renderHtml(self) + '</div>' + '</div>';
      }
    });

    var Form = Container.extend({
      Defaults: {
        containerCls: 'form',
        layout: 'flex',
        direction: 'column',
        align: 'stretch',
        flex: 1,
        padding: 15,
        labelGap: 30,
        spacing: 10,
        callbacks: {
          submit: function () {
            this.submit();
          }
        }
      },
      preRender: function () {
        var self = this, items = self.items();
        if (!self.settings.formItemDefaults) {
          self.settings.formItemDefaults = {
            layout: 'flex',
            autoResize: 'overflow',
            defaults: { flex: 1 }
          };
        }
        items.each(function (ctrl) {
          var formItem;
          var label = ctrl.settings.label;
          if (label) {
            formItem = new FormItem(global$4.extend({
              items: {
                type: 'label',
                id: ctrl._id + '-l',
                text: label,
                flex: 0,
                forId: ctrl._id,
                disabled: ctrl.disabled()
              }
            }, self.settings.formItemDefaults));
            formItem.type = 'formitem';
            ctrl.aria('labelledby', ctrl._id + '-l');
            if (typeof ctrl.settings.flex === 'undefined') {
              ctrl.settings.flex = 1;
            }
            self.replace(ctrl, formItem);
            formItem.add(ctrl);
          }
        });
      },
      submit: function () {
        return this.fire('submit', { data: this.toJSON() });
      },
      postRender: function () {
        var self = this;
        self._super();
        self.fromJSON(self.settings.data);
      },
      bindStates: function () {
        var self = this;
        self._super();
        function recalcLabels() {
          var maxLabelWidth = 0;
          var labels = [];
          var i, labelGap, items;
          if (self.settings.labelGapCalc === false) {
            return;
          }
          if (self.settings.labelGapCalc === 'children') {
            items = self.find('formitem');
          } else {
            items = self.items();
          }
          items.filter('formitem').each(function (item) {
            var labelCtrl = item.items()[0], labelWidth = labelCtrl.getEl().clientWidth;
            maxLabelWidth = labelWidth > maxLabelWidth ? labelWidth : maxLabelWidth;
            labels.push(labelCtrl);
          });
          labelGap = self.settings.labelGap || 0;
          i = labels.length;
          while (i--) {
            labels[i].settings.minWidth = maxLabelWidth + labelGap;
          }
        }
        self.on('show', recalcLabels);
        recalcLabels();
      }
    });

    var FieldSet = Form.extend({
      Defaults: {
        containerCls: 'fieldset',
        layout: 'flex',
        direction: 'column',
        align: 'stretch',
        flex: 1,
        padding: '25 15 5 15',
        labelGap: 30,
        spacing: 10,
        border: 1
      },
      renderHtml: function () {
        var self = this, layout = self._layout, prefix = self.classPrefix;
        self.preRender();
        layout.preRender(self);
        return '<fieldset id="' + self._id + '" class="' + self.classes + '" hidefocus="1" tabindex="-1">' + (self.settings.title ? '<legend id="' + self._id + '-title" class="' + prefix + 'fieldset-title">' + self.settings.title + '</legend>' : '') + '<div id="' + self._id + '-body" class="' + self.bodyClasses + '">' + (self.settings.html || '') + layout.renderHtml(self) + '</div>' + '</fieldset>';
      }
    });

    var unique$1 = 0;
    var generate = function (prefix) {
      var date = new Date();
      var time = date.getTime();
      var random = Math.floor(Math.random() * 1000000000);
      unique$1++;
      return prefix + '_' + random + unique$1 + String(time);
    };

    var fromHtml = function (html, scope) {
      var doc = scope || domGlobals.document;
      var div = doc.createElement('div');
      div.innerHTML = html;
      if (!div.hasChildNodes() || div.childNodes.length > 1) {
        domGlobals.console.error('HTML does not have a single root node', html);
        throw new Error('HTML must have a single root node');
      }
      return fromDom(div.childNodes[0]);
    };
    var fromTag = function (tag, scope) {
      var doc = scope || domGlobals.document;
      var node = doc.createElement(tag);
      return fromDom(node);
    };
    var fromText = function (text, scope) {
      var doc = scope || domGlobals.document;
      var node = doc.createTextNode(text);
      return fromDom(node);
    };
    var fromDom = function (node) {
      if (node === null || node === undefined) {
        throw new Error('Node cannot be null or undefined');
      }
      return { dom: constant(node) };
    };
    var fromPoint = function (docElm, x, y) {
      var doc = docElm.dom();
      return Option.from(doc.elementFromPoint(x, y)).map(fromDom);
    };
    var Element = {
      fromHtml: fromHtml,
      fromTag: fromTag,
      fromText: fromText,
      fromDom: fromDom,
      fromPoint: fromPoint
    };

    var cached = function (f) {
      var called = false;
      var r;
      return function () {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
          args[_i] = arguments[_i];
        }
        if (!called) {
          called = true;
          r = f.apply(null, args);
        }
        return r;
      };
    };

    var ATTRIBUTE = domGlobals.Node.ATTRIBUTE_NODE;
    var CDATA_SECTION = domGlobals.Node.CDATA_SECTION_NODE;
    var COMMENT = domGlobals.Node.COMMENT_NODE;
    var DOCUMENT = domGlobals.Node.DOCUMENT_NODE;
    var DOCUMENT_TYPE = domGlobals.Node.DOCUMENT_TYPE_NODE;
    var DOCUMENT_FRAGMENT = domGlobals.Node.DOCUMENT_FRAGMENT_NODE;
    var ELEMENT = domGlobals.Node.ELEMENT_NODE;
    var TEXT = domGlobals.Node.TEXT_NODE;
    var PROCESSING_INSTRUCTION = domGlobals.Node.PROCESSING_INSTRUCTION_NODE;
    var ENTITY_REFERENCE = domGlobals.Node.ENTITY_REFERENCE_NODE;
    var ENTITY = domGlobals.Node.ENTITY_NODE;
    var NOTATION = domGlobals.Node.NOTATION_NODE;

    var Immutable = function () {
      var fields = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        fields[_i] = arguments[_i];
      }
      return function () {
        var values = [];
        for (var _i = 0; _i < arguments.length; _i++) {
          values[_i] = arguments[_i];
        }
        if (fields.length !== values.length) {
          throw new Error('Wrong number of arguments to struct. Expected "[' + fields.length + ']", got ' + values.length + ' arguments');
        }
        var struct = {};
        each(fields, function (name, i) {
          struct[name] = constant(values[i]);
        });
        return struct;
      };
    };

    var node = function () {
      var f = Global$1.getOrDie('Node');
      return f;
    };
    var compareDocumentPosition = function (a, b, match) {
      return (a.compareDocumentPosition(b) & match) !== 0;
    };
    var documentPositionPreceding = function (a, b) {
      return compareDocumentPosition(a, b, node().DOCUMENT_POSITION_PRECEDING);
    };
    var documentPositionContainedBy = function (a, b) {
      return compareDocumentPosition(a, b, node().DOCUMENT_POSITION_CONTAINED_BY);
    };
    var Node = {
      documentPositionPreceding: documentPositionPreceding,
      documentPositionContainedBy: documentPositionContainedBy
    };

    var firstMatch = function (regexes, s) {
      for (var i = 0; i < regexes.length; i++) {
        var x = regexes[i];
        if (x.test(s)) {
          return x;
        }
      }
      return undefined;
    };
    var find$1 = function (regexes, agent) {
      var r = firstMatch(regexes, agent);
      if (!r) {
        return {
          major: 0,
          minor: 0
        };
      }
      var group = function (i) {
        return Number(agent.replace(r, '$' + i));
      };
      return nu(group(1), group(2));
    };
    var detect = function (versionRegexes, agent) {
      var cleanedAgent = String(agent).toLowerCase();
      if (versionRegexes.length === 0) {
        return unknown();
      }
      return find$1(versionRegexes, cleanedAgent);
    };
    var unknown = function () {
      return nu(0, 0);
    };
    var nu = function (major, minor) {
      return {
        major: major,
        minor: minor
      };
    };
    var Version = {
      nu: nu,
      detect: detect,
      unknown: unknown
    };

    var edge = 'Edge';
    var chrome = 'Chrome';
    var ie = 'IE';
    var opera = 'Opera';
    var firefox = 'Firefox';
    var safari = 'Safari';
    var isBrowser = function (name, current) {
      return function () {
        return current === name;
      };
    };
    var unknown$1 = function () {
      return nu$1({
        current: undefined,
        version: Version.unknown()
      });
    };
    var nu$1 = function (info) {
      var current = info.current;
      var version = info.version;
      return {
        current: current,
        version: version,
        isEdge: isBrowser(edge, current),
        isChrome: isBrowser(chrome, current),
        isIE: isBrowser(ie, current),
        isOpera: isBrowser(opera, current),
        isFirefox: isBrowser(firefox, current),
        isSafari: isBrowser(safari, current)
      };
    };
    var Browser = {
      unknown: unknown$1,
      nu: nu$1,
      edge: constant(edge),
      chrome: constant(chrome),
      ie: constant(ie),
      opera: constant(opera),
      firefox: constant(firefox),
      safari: constant(safari)
    };

    var windows$1 = 'Windows';
    var ios = 'iOS';
    var android = 'Android';
    var linux = 'Linux';
    var osx = 'OSX';
    var solaris = 'Solaris';
    var freebsd = 'FreeBSD';
    var isOS = function (name, current) {
      return function () {
        return current === name;
      };
    };
    var unknown$2 = function () {
      return nu$2({
        current: undefined,
        version: Version.unknown()
      });
    };
    var nu$2 = function (info) {
      var current = info.current;
      var version = info.version;
      return {
        current: current,
        version: version,
        isWindows: isOS(windows$1, current),
        isiOS: isOS(ios, current),
        isAndroid: isOS(android, current),
        isOSX: isOS(osx, current),
        isLinux: isOS(linux, current),
        isSolaris: isOS(solaris, current),
        isFreeBSD: isOS(freebsd, current)
      };
    };
    var OperatingSystem = {
      unknown: unknown$2,
      nu: nu$2,
      windows: constant(windows$1),
      ios: constant(ios),
      android: constant(android),
      linux: constant(linux),
      osx: constant(osx),
      solaris: constant(solaris),
      freebsd: constant(freebsd)
    };

    var DeviceType = function (os, browser, userAgent) {
      var isiPad = os.isiOS() && /ipad/i.test(userAgent) === true;
      var isiPhone = os.isiOS() && !isiPad;
      var isAndroid3 = os.isAndroid() && os.version.major === 3;
      var isAndroid4 = os.isAndroid() && os.version.major === 4;
      var isTablet = isiPad || isAndroid3 || isAndroid4 && /mobile/i.test(userAgent) === true;
      var isTouch = os.isiOS() || os.isAndroid();
      var isPhone = isTouch && !isTablet;
      var iOSwebview = browser.isSafari() && os.isiOS() && /safari/i.test(userAgent) === false;
      return {
        isiPad: constant(isiPad),
        isiPhone: constant(isiPhone),
        isTablet: constant(isTablet),
        isPhone: constant(isPhone),
        isTouch: constant(isTouch),
        isAndroid: os.isAndroid,
        isiOS: os.isiOS,
        isWebView: constant(iOSwebview)
      };
    };

    var detect$1 = function (candidates, userAgent) {
      var agent = String(userAgent).toLowerCase();
      return find(candidates, function (candidate) {
        return candidate.search(agent);
      });
    };
    var detectBrowser = function (browsers, userAgent) {
      return detect$1(browsers, userAgent).map(function (browser) {
        var version = Version.detect(browser.versionRegexes, userAgent);
        return {
          current: browser.name,
          version: version
        };
      });
    };
    var detectOs = function (oses, userAgent) {
      return detect$1(oses, userAgent).map(function (os) {
        var version = Version.detect(os.versionRegexes, userAgent);
        return {
          current: os.name,
          version: version
        };
      });
    };
    var UaString = {
      detectBrowser: detectBrowser,
      detectOs: detectOs
    };

    var contains = function (str, substr) {
      return str.indexOf(substr) !== -1;
    };

    var normalVersionRegex = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/;
    var checkContains = function (target) {
      return function (uastring) {
        return contains(uastring, target);
      };
    };
    var browsers = [
      {
        name: 'Edge',
        versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],
        search: function (uastring) {
          return contains(uastring, 'edge/') && contains(uastring, 'chrome') && contains(uastring, 'safari') && contains(uastring, 'applewebkit');
        }
      },
      {
        name: 'Chrome',
        versionRegexes: [
          /.*?chrome\/([0-9]+)\.([0-9]+).*/,
          normalVersionRegex
        ],
        search: function (uastring) {
          return contains(uastring, 'chrome') && !contains(uastring, 'chromeframe');
        }
      },
      {
        name: 'IE',
        versionRegexes: [
          /.*?msie\ ?([0-9]+)\.([0-9]+).*/,
          /.*?rv:([0-9]+)\.([0-9]+).*/
        ],
        search: function (uastring) {
          return contains(uastring, 'msie') || contains(uastring, 'trident');
        }
      },
      {
        name: 'Opera',
        versionRegexes: [
          normalVersionRegex,
          /.*?opera\/([0-9]+)\.([0-9]+).*/
        ],
        search: checkContains('opera')
      },
      {
        name: 'Firefox',
        versionRegexes: [/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],
        search: checkContains('firefox')
      },
      {
        name: 'Safari',
        versionRegexes: [
          normalVersionRegex,
          /.*?cpu os ([0-9]+)_([0-9]+).*/
        ],
        search: function (uastring) {
          return (contains(uastring, 'safari') || contains(uastring, 'mobile/')) && contains(uastring, 'applewebkit');
        }
      }
    ];
    var oses = [
      {
        name: 'Windows',
        search: checkContains('win'),
        versionRegexes: [/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]
      },
      {
        name: 'iOS',
        search: function (uastring) {
          return contains(uastring, 'iphone') || contains(uastring, 'ipad');
        },
        versionRegexes: [
          /.*?version\/\ ?([0-9]+)\.([0-9]+).*/,
          /.*cpu os ([0-9]+)_([0-9]+).*/,
          /.*cpu iphone os ([0-9]+)_([0-9]+).*/
        ]
      },
      {
        name: 'Android',
        search: checkContains('android'),
        versionRegexes: [/.*?android\ ?([0-9]+)\.([0-9]+).*/]
      },
      {
        name: 'OSX',
        search: checkContains('os x'),
        versionRegexes: [/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]
      },
      {
        name: 'Linux',
        search: checkContains('linux'),
        versionRegexes: []
      },
      {
        name: 'Solaris',
        search: checkContains('sunos'),
        versionRegexes: []
      },
      {
        name: 'FreeBSD',
        search: checkContains('freebsd'),
        versionRegexes: []
      }
    ];
    var PlatformInfo = {
      browsers: constant(browsers),
      oses: constant(oses)
    };

    var detect$2 = function (userAgent) {
      var browsers = PlatformInfo.browsers();
      var oses = PlatformInfo.oses();
      var browser = UaString.detectBrowser(browsers, userAgent).fold(Browser.unknown, Browser.nu);
      var os = UaString.detectOs(oses, userAgent).fold(OperatingSystem.unknown, OperatingSystem.nu);
      var deviceType = DeviceType(os, browser, userAgent);
      return {
        browser: browser,
        os: os,
        deviceType: deviceType
      };
    };
    var PlatformDetection = { detect: detect$2 };

    var detect$3 = cached(function () {
      var userAgent = domGlobals.navigator.userAgent;
      return PlatformDetection.detect(userAgent);
    });
    var PlatformDetection$1 = { detect: detect$3 };

    var ELEMENT$1 = ELEMENT;
    var DOCUMENT$1 = DOCUMENT;
    var bypassSelector = function (dom) {
      return dom.nodeType !== ELEMENT$1 && dom.nodeType !== DOCUMENT$1 || dom.childElementCount === 0;
    };
    var all = function (selector, scope) {
      var base = scope === undefined ? domGlobals.document : scope.dom();
      return bypassSelector(base) ? [] : map(base.querySelectorAll(selector), Element.fromDom);
    };
    var one = function (selector, scope) {
      var base = scope === undefined ? domGlobals.document : scope.dom();
      return bypassSelector(base) ? Option.none() : Option.from(base.querySelector(selector)).map(Element.fromDom);
    };

    var regularContains = function (e1, e2) {
      var d1 = e1.dom();
      var d2 = e2.dom();
      return d1 === d2 ? false : d1.contains(d2);
    };
    var ieContains = function (e1, e2) {
      return Node.documentPositionContainedBy(e1.dom(), e2.dom());
    };
    var browser = PlatformDetection$1.detect().browser;
    var contains$1 = browser.isIE() ? ieContains : regularContains;

    var spot = Immutable('element', 'offset');

    var descendants = function (scope, selector) {
      return all(selector, scope);
    };

    var trim = global$4.trim;
    var hasContentEditableState = function (value) {
      return function (node) {
        if (node && node.nodeType === 1) {
          if (node.contentEditable === value) {
            return true;
          }
          if (node.getAttribute('data-mce-contenteditable') === value) {
            return true;
          }
        }
        return false;
      };
    };
    var isContentEditableTrue = hasContentEditableState('true');
    var isContentEditableFalse = hasContentEditableState('false');
    var create$4 = function (type, title, url, level, attach) {
      return {
        type: type,
        title: title,
        url: url,
        level: level,
        attach: attach
      };
    };
    var isChildOfContentEditableTrue = function (node) {
      while (node = node.parentNode) {
        var value = node.contentEditable;
        if (value && value !== 'inherit') {
          return isContentEditableTrue(node);
        }
      }
      return false;
    };
    var select = function (selector, root) {
      return map(descendants(Element.fromDom(root), selector), function (element) {
        return element.dom();
      });
    };
    var getElementText = function (elm) {
      return elm.innerText || elm.textContent;
    };
    var getOrGenerateId = function (elm) {
      return elm.id ? elm.id : generate('h');
    };
    var isAnchor = function (elm) {
      return elm && elm.nodeName === 'A' && (elm.id || elm.name);
    };
    var isValidAnchor = function (elm) {
      return isAnchor(elm) && isEditable(elm);
    };
    var isHeader = function (elm) {
      return elm && /^(H[1-6])$/.test(elm.nodeName);
    };
    var isEditable = function (elm) {
      return isChildOfContentEditableTrue(elm) && !isContentEditableFalse(elm);
    };
    var isValidHeader = function (elm) {
      return isHeader(elm) && isEditable(elm);
    };
    var getLevel = function (elm) {
      return isHeader(elm) ? parseInt(elm.nodeName.substr(1), 10) : 0;
    };
    var headerTarget = function (elm) {
      var headerId = getOrGenerateId(elm);
      var attach = function () {
        elm.id = headerId;
      };
      return create$4('header', getElementText(elm), '#' + headerId, getLevel(elm), attach);
    };
    var anchorTarget = function (elm) {
      var anchorId = elm.id || elm.name;
      var anchorText = getElementText(elm);
      return create$4('anchor', anchorText ? anchorText : '#' + anchorId, '#' + anchorId, 0, noop);
    };
    var getHeaderTargets = function (elms) {
      return map(filter(elms, isValidHeader), headerTarget);
    };
    var getAnchorTargets = function (elms) {
      return map(filter(elms, isValidAnchor), anchorTarget);
    };
    var getTargetElements = function (elm) {
      var elms = select('h1,h2,h3,h4,h5,h6,a:not([href])', elm);
      return elms;
    };
    var hasTitle = function (target) {
      return trim(target.title).length > 0;
    };
    var find$2 = function (elm) {
      var elms = getTargetElements(elm);
      return filter(getHeaderTargets(elms).concat(getAnchorTargets(elms)), hasTitle);
    };
    var LinkTargets = { find: find$2 };

    var getActiveEditor = function () {
      return window.tinymce ? window.tinymce.activeEditor : global$5.activeEditor;
    };
    var history = {};
    var HISTORY_LENGTH = 5;
    var clearHistory = function () {
      history = {};
    };
    var toMenuItem = function (target) {
      return {
        title: target.title,
        value: {
          title: { raw: target.title },
          url: target.url,
          attach: target.attach
        }
      };
    };
    var toMenuItems = function (targets) {
      return global$4.map(targets, toMenuItem);
    };
    var staticMenuItem = function (title, url) {
      return {
        title: title,
        value: {
          title: title,
          url: url,
          attach: noop
        }
      };
    };
    var isUniqueUrl = function (url, targets) {
      var foundTarget = exists(targets, function (target) {
        return target.url === url;
      });
      return !foundTarget;
    };
    var getSetting = function (editorSettings, name, defaultValue) {
      var value = name in editorSettings ? editorSettings[name] : defaultValue;
      return value === false ? null : value;
    };
    var createMenuItems = function (term, targets, fileType, editorSettings) {
      var separator = { title: '-' };
      var fromHistoryMenuItems = function (history) {
        var historyItems = history.hasOwnProperty(fileType) ? history[fileType] : [];
        var uniqueHistory = filter(historyItems, function (url) {
          return isUniqueUrl(url, targets);
        });
        return global$4.map(uniqueHistory, function (url) {
          return {
            title: url,
            value: {
              title: url,
              url: url,
              attach: noop
            }
          };
        });
      };
      var fromMenuItems = function (type) {
        var filteredTargets = filter(targets, function (target) {
          return target.type === type;
        });
        return toMenuItems(filteredTargets);
      };
      var anchorMenuItems = function () {
        var anchorMenuItems = fromMenuItems('anchor');
        var topAnchor = getSetting(editorSettings, 'anchor_top', '#top');
        var bottomAchor = getSetting(editorSettings, 'anchor_bottom', '#bottom');
        if (topAnchor !== null) {
          anchorMenuItems.unshift(staticMenuItem('<top>', topAnchor));
        }
        if (bottomAchor !== null) {
          anchorMenuItems.push(staticMenuItem('<bottom>', bottomAchor));
        }
        return anchorMenuItems;
      };
      var join = function (items) {
        return foldl(items, function (a, b) {
          var bothEmpty = a.length === 0 || b.length === 0;
          return bothEmpty ? a.concat(b) : a.concat(separator, b);
        }, []);
      };
      if (editorSettings.typeahead_urls === false) {
        return [];
      }
      return fileType === 'file' ? join([
        filterByQuery(term, fromHistoryMenuItems(history)),
        filterByQuery(term, fromMenuItems('header')),
        filterByQuery(term, anchorMenuItems())
      ]) : filterByQuery(term, fromHistoryMenuItems(history));
    };
    var addToHistory = function (url, fileType) {
      var items = history[fileType];
      if (!/^https?/.test(url)) {
        return;
      }
      if (items) {
        if (indexOf(items, url).isNone()) {
          history[fileType] = items.slice(0, HISTORY_LENGTH).concat(url);
        }
      } else {
        history[fileType] = [url];
      }
    };
    var filterByQuery = function (term, menuItems) {
      var lowerCaseTerm = term.toLowerCase();
      var result = global$4.grep(menuItems, function (item) {
        return item.title.toLowerCase().indexOf(lowerCaseTerm) !== -1;
      });
      return result.length === 1 && result[0].title === term ? [] : result;
    };
    var getTitle = function (linkDetails) {
      var title = linkDetails.title;
      return title.raw ? title.raw : title;
    };
    var setupAutoCompleteHandler = function (ctrl, editorSettings, bodyElm, fileType) {
      var autocomplete = function (term) {
        var linkTargets = LinkTargets.find(bodyElm);
        var menuItems = createMenuItems(term, linkTargets, fileType, editorSettings);
        ctrl.showAutoComplete(menuItems, term);
      };
      ctrl.on('autocomplete', function () {
        autocomplete(ctrl.value());
      });
      ctrl.on('selectitem', function (e) {
        var linkDetails = e.value;
        ctrl.value(linkDetails.url);
        var title = getTitle(linkDetails);
        if (fileType === 'image') {
          ctrl.fire('change', {
            meta: {
              alt: title,
              attach: linkDetails.attach
            }
          });
        } else {
          ctrl.fire('change', {
            meta: {
              text: title,
              attach: linkDetails.attach
            }
          });
        }
        ctrl.focus();
      });
      ctrl.on('click', function (e) {
        if (ctrl.value().length === 0 && e.target.nodeName === 'INPUT') {
          autocomplete('');
        }
      });
      ctrl.on('PostRender', function () {
        ctrl.getRoot().on('submit', function (e) {
          if (!e.isDefaultPrevented()) {
            addToHistory(ctrl.value(), fileType);
          }
        });
      });
    };
    var statusToUiState = function (result) {
      var status = result.status, message = result.message;
      if (status === 'valid') {
        return {
          status: 'ok',
          message: message
        };
      } else if (status === 'unknown') {
        return {
          status: 'warn',
          message: message
        };
      } else if (status === 'invalid') {
        return {
          status: 'warn',
          message: message
        };
      } else {
        return {
          status: 'none',
          message: ''
        };
      }
    };
    var setupLinkValidatorHandler = function (ctrl, editorSettings, fileType) {
      var validatorHandler = editorSettings.filepicker_validator_handler;
      if (validatorHandler) {
        var validateUrl_1 = function (url) {
          if (url.length === 0) {
            ctrl.statusLevel('none');
            return;
          }
          validatorHandler({
            url: url,
            type: fileType
          }, function (result) {
            var uiState = statusToUiState(result);
            ctrl.statusMessage(uiState.message);
            ctrl.statusLevel(uiState.status);
          });
        };
        ctrl.state.on('change:value', function (e) {
          validateUrl_1(e.value);
        });
      }
    };
    var FilePicker = ComboBox.extend({
      Statics: { clearHistory: clearHistory },
      init: function (settings) {
        var self = this, editor = getActiveEditor(), editorSettings = editor.settings;
        var actionCallback, fileBrowserCallback, fileBrowserCallbackTypes;
        var fileType = settings.filetype;
        settings.spellcheck = false;
        fileBrowserCallbackTypes = editorSettings.file_picker_types || editorSettings.file_browser_callback_types;
        if (fileBrowserCallbackTypes) {
          fileBrowserCallbackTypes = global$4.makeMap(fileBrowserCallbackTypes, /[, ]/);
        }
        if (!fileBrowserCallbackTypes || fileBrowserCallbackTypes[fileType]) {
          fileBrowserCallback = editorSettings.file_picker_callback;
          if (fileBrowserCallback && (!fileBrowserCallbackTypes || fileBrowserCallbackTypes[fileType])) {
            actionCallback = function () {
              var meta = self.fire('beforecall').meta;
              meta = global$4.extend({ filetype: fileType }, meta);
              fileBrowserCallback.call(editor, function (value, meta) {
                self.value(value).fire('change', { meta: meta });
              }, self.value(), meta);
            };
          } else {
            fileBrowserCallback = editorSettings.file_browser_callback;
            if (fileBrowserCallback && (!fileBrowserCallbackTypes || fileBrowserCallbackTypes[fileType])) {
              actionCallback = function () {
                fileBrowserCallback(self.getEl('inp').id, self.value(), fileType, window);
              };
            }
          }
        }
        if (actionCallback) {
          settings.icon = 'browse';
          settings.onaction = actionCallback;
        }
        self._super(settings);
        self.classes.add('filepicker');
        setupAutoCompleteHandler(self, editorSettings, editor.getBody(), fileType);
        setupLinkValidatorHandler(self, editorSettings, fileType);
      }
    });

    var FitLayout = AbsoluteLayout.extend({
      recalc: function (container) {
        var contLayoutRect = container.layoutRect(), paddingBox = container.paddingBox;
        container.items().filter(':visible').each(function (ctrl) {
          ctrl.layoutRect({
            x: paddingBox.left,
            y: paddingBox.top,
            w: contLayoutRect.innerW - paddingBox.right - paddingBox.left,
            h: contLayoutRect.innerH - paddingBox.top - paddingBox.bottom
          });
          if (ctrl.recalc) {
            ctrl.recalc();
          }
        });
      }
    });

    var FlexLayout = AbsoluteLayout.extend({
      recalc: function (container) {
        var i, l, items, contLayoutRect, contPaddingBox, contSettings, align, pack, spacing, totalFlex, availableSpace, direction;
        var ctrl, ctrlLayoutRect, ctrlSettings, flex;
        var maxSizeItems = [];
        var size, maxSize, ratio, rect, pos, maxAlignEndPos;
        var sizeName, minSizeName, posName, maxSizeName, beforeName, innerSizeName, deltaSizeName, contentSizeName;
        var alignAxisName, alignInnerSizeName, alignSizeName, alignMinSizeName, alignBeforeName, alignAfterName;
        var alignDeltaSizeName, alignContentSizeName;
        var max = Math.max, min = Math.min;
        items = container.items().filter(':visible');
        contLayoutRect = container.layoutRect();
        contPaddingBox = container.paddingBox;
        contSettings = container.settings;
        direction = container.isRtl() ? contSettings.direction || 'row-reversed' : contSettings.direction;
        align = contSettings.align;
        pack = container.isRtl() ? contSettings.pack || 'end' : contSettings.pack;
        spacing = contSettings.spacing || 0;
        if (direction === 'row-reversed' || direction === 'column-reverse') {
          items = items.set(items.toArray().reverse());
          direction = direction.split('-')[0];
        }
        if (direction === 'column') {
          posName = 'y';
          sizeName = 'h';
          minSizeName = 'minH';
          maxSizeName = 'maxH';
          innerSizeName = 'innerH';
          beforeName = 'top';
          deltaSizeName = 'deltaH';
          contentSizeName = 'contentH';
          alignBeforeName = 'left';
          alignSizeName = 'w';
          alignAxisName = 'x';
          alignInnerSizeName = 'innerW';
          alignMinSizeName = 'minW';
          alignAfterName = 'right';
          alignDeltaSizeName = 'deltaW';
          alignContentSizeName = 'contentW';
        } else {
          posName = 'x';
          sizeName = 'w';
          minSizeName = 'minW';
          maxSizeName = 'maxW';
          innerSizeName = 'innerW';
          beforeName = 'left';
          deltaSizeName = 'deltaW';
          contentSizeName = 'contentW';
          alignBeforeName = 'top';
          alignSizeName = 'h';
          alignAxisName = 'y';
          alignInnerSizeName = 'innerH';
          alignMinSizeName = 'minH';
          alignAfterName = 'bottom';
          alignDeltaSizeName = 'deltaH';
          alignContentSizeName = 'contentH';
        }
        availableSpace = contLayoutRect[innerSizeName] - contPaddingBox[beforeName] - contPaddingBox[beforeName];
        maxAlignEndPos = totalFlex = 0;
        for (i = 0, l = items.length; i < l; i++) {
          ctrl = items[i];
          ctrlLayoutRect = ctrl.layoutRect();
          ctrlSettings = ctrl.settings;
          flex = ctrlSettings.flex;
          availableSpace -= i < l - 1 ? spacing : 0;
          if (flex > 0) {
            totalFlex += flex;
            if (ctrlLayoutRect[maxSizeName]) {
              maxSizeItems.push(ctrl);
            }
            ctrlLayoutRect.flex = flex;
          }
          availableSpace -= ctrlLayoutRect[minSizeName];
          size = contPaddingBox[alignBeforeName] + ctrlLayoutRect[alignMinSizeName] + contPaddingBox[alignAfterName];
          if (size > maxAlignEndPos) {
            maxAlignEndPos = size;
          }
        }
        rect = {};
        if (availableSpace < 0) {
          rect[minSizeName] = contLayoutRect[minSizeName] - availableSpace + contLayoutRect[deltaSizeName];
        } else {
          rect[minSizeName] = contLayoutRect[innerSizeName] - availableSpace + contLayoutRect[deltaSizeName];
        }
        rect[alignMinSizeName] = maxAlignEndPos + contLayoutRect[alignDeltaSizeName];
        rect[contentSizeName] = contLayoutRect[innerSizeName] - availableSpace;
        rect[alignContentSizeName] = maxAlignEndPos;
        rect.minW = min(rect.minW, contLayoutRect.maxW);
        rect.minH = min(rect.minH, contLayoutRect.maxH);
        rect.minW = max(rect.minW, contLayoutRect.startMinWidth);
        rect.minH = max(rect.minH, contLayoutRect.startMinHeight);
        if (contLayoutRect.autoResize && (rect.minW !== contLayoutRect.minW || rect.minH !== contLayoutRect.minH)) {
          rect.w = rect.minW;
          rect.h = rect.minH;
          container.layoutRect(rect);
          this.recalc(container);
          if (container._lastRect === null) {
            var parentCtrl = container.parent();
            if (parentCtrl) {
              parentCtrl._lastRect = null;
              parentCtrl.recalc();
            }
          }
          return;
        }
        ratio = availableSpace / totalFlex;
        for (i = 0, l = maxSizeItems.length; i < l; i++) {
          ctrl = maxSizeItems[i];
          ctrlLayoutRect = ctrl.layoutRect();
          maxSize = ctrlLayoutRect[maxSizeName];
          size = ctrlLayoutRect[minSizeName] + ctrlLayoutRect.flex * ratio;
          if (size > maxSize) {
            availableSpace -= ctrlLayoutRect[maxSizeName] - ctrlLayoutRect[minSizeName];
            totalFlex -= ctrlLayoutRect.flex;
            ctrlLayoutRect.flex = 0;
            ctrlLayoutRect.maxFlexSize = maxSize;
          } else {
            ctrlLayoutRect.maxFlexSize = 0;
          }
        }
        ratio = availableSpace / totalFlex;
        pos = contPaddingBox[beforeName];
        rect = {};
        if (totalFlex === 0) {
          if (pack === 'end') {
            pos = availableSpace + contPaddingBox[beforeName];
          } else if (pack === 'center') {
            pos = Math.round(contLayoutRect[innerSizeName] / 2 - (contLayoutRect[innerSizeName] - availableSpace) / 2) + contPaddingBox[beforeName];
            if (pos < 0) {
              pos = contPaddingBox[beforeName];
            }
          } else if (pack === 'justify') {
            pos = contPaddingBox[beforeName];
            spacing = Math.floor(availableSpace / (items.length - 1));
          }
        }
        rect[alignAxisName] = contPaddingBox[alignBeforeName];
        for (i = 0, l = items.length; i < l; i++) {
          ctrl = items[i];
          ctrlLayoutRect = ctrl.layoutRect();
          size = ctrlLayoutRect.maxFlexSize || ctrlLayoutRect[minSizeName];
          if (align === 'center') {
            rect[alignAxisName] = Math.round(contLayoutRect[alignInnerSizeName] / 2 - ctrlLayoutRect[alignSizeName] / 2);
          } else if (align === 'stretch') {
            rect[alignSizeName] = max(ctrlLayoutRect[alignMinSizeName] || 0, contLayoutRect[alignInnerSizeName] - contPaddingBox[alignBeforeName] - contPaddingBox[alignAfterName]);
            rect[alignAxisName] = contPaddingBox[alignBeforeName];
          } else if (align === 'end') {
            rect[alignAxisName] = contLayoutRect[alignInnerSizeName] - ctrlLayoutRect[alignSizeName] - contPaddingBox.top;
          }
          if (ctrlLayoutRect.flex > 0) {
            size += ctrlLayoutRect.flex * ratio;
          }
          rect[sizeName] = size;
          rect[posName] = pos;
          ctrl.layoutRect(rect);
          if (ctrl.recalc) {
            ctrl.recalc();
          }
          pos += size + spacing;
        }
      }
    });

    var FlowLayout = Layout$1.extend({
      Defaults: {
        containerClass: 'flow-layout',
        controlClass: 'flow-layout-item',
        endClass: 'break'
      },
      recalc: function (container) {
        container.items().filter(':visible').each(function (ctrl) {
          if (ctrl.recalc) {
            ctrl.recalc();
          }
        });
      },
      isNative: function () {
        return true;
      }
    });

    var descendant = function (scope, selector) {
      return one(selector, scope);
    };

    var toggleFormat = function (editor, fmt) {
      return function () {
        editor.execCommand('mceToggleFormat', false, fmt);
      };
    };
    var addFormatChangedListener = function (editor, name, changed) {
      var handler = function (state) {
        changed(state, name);
      };
      if (editor.formatter) {
        editor.formatter.formatChanged(name, handler);
      } else {
        editor.on('init', function () {
          editor.formatter.formatChanged(name, handler);
        });
      }
    };
    var postRenderFormatToggle = function (editor, name) {
      return function (e) {
        addFormatChangedListener(editor, name, function (state) {
          e.control.active(state);
        });
      };
    };

    var register = function (editor) {
      var alignFormats = [
        'alignleft',
        'aligncenter',
        'alignright',
        'alignjustify'
      ];
      var defaultAlign = 'alignleft';
      var alignMenuItems = [
        {
          text: 'Left',
          icon: 'alignleft',
          onclick: toggleFormat(editor, 'alignleft')
        },
        {
          text: 'Center',
          icon: 'aligncenter',
          onclick: toggleFormat(editor, 'aligncenter')
        },
        {
          text: 'Right',
          icon: 'alignright',
          onclick: toggleFormat(editor, 'alignright')
        },
        {
          text: 'Justify',
          icon: 'alignjustify',
          onclick: toggleFormat(editor, 'alignjustify')
        }
      ];
      editor.addMenuItem('align', {
        text: 'Align',
        menu: alignMenuItems
      });
      editor.addButton('align', {
        type: 'menubutton',
        icon: defaultAlign,
        menu: alignMenuItems,
        onShowMenu: function (e) {
          var menu = e.control.menu;
          global$4.each(alignFormats, function (formatName, idx) {
            menu.items().eq(idx).each(function (item) {
              return item.active(editor.formatter.match(formatName));
            });
          });
        },
        onPostRender: function (e) {
          var ctrl = e.control;
          global$4.each(alignFormats, function (formatName, idx) {
            addFormatChangedListener(editor, formatName, function (state) {
              ctrl.icon(defaultAlign);
              if (state) {
                ctrl.icon(formatName);
              }
            });
          });
        }
      });
      global$4.each({
        alignleft: [
          'Align left',
          'JustifyLeft'
        ],
        aligncenter: [
          'Align center',
          'JustifyCenter'
        ],
        alignright: [
          'Align right',
          'JustifyRight'
        ],
        alignjustify: [
          'Justify',
          'JustifyFull'
        ],
        alignnone: [
          'No alignment',
          'JustifyNone'
        ]
      }, function (item, name) {
        editor.addButton(name, {
          active: false,
          tooltip: item[0],
          cmd: item[1],
          onPostRender: postRenderFormatToggle(editor, name)
        });
      });
    };
    var Align = { register: register };

    var getFirstFont = function (fontFamily) {
      return fontFamily ? fontFamily.split(',')[0] : '';
    };
    var findMatchingValue = function (items, fontFamily) {
      var font = fontFamily ? fontFamily.toLowerCase() : '';
      var value;
      global$4.each(items, function (item) {
        if (item.value.toLowerCase() === font) {
          value = item.value;
        }
      });
      global$4.each(items, function (item) {
        if (!value && getFirstFont(item.value).toLowerCase() === getFirstFont(font).toLowerCase()) {
          value = item.value;
        }
      });
      return value;
    };
    var createFontNameListBoxChangeHandler = function (editor, items) {
      return function () {
        var self = this;
        self.state.set('value', null);
        editor.on('init nodeChange', function (e) {
          var fontFamily = editor.queryCommandValue('FontName');
          var match = findMatchingValue(items, fontFamily);
          self.value(match ? match : null);
          if (!match && fontFamily) {
            self.text(getFirstFont(fontFamily));
          }
        });
      };
    };
    var createFormats = function (formats) {
      formats = formats.replace(/;$/, '').split(';');
      var i = formats.length;
      while (i--) {
        formats[i] = formats[i].split('=');
      }
      return formats;
    };
    var getFontItems = function (editor) {
      var defaultFontsFormats = 'Andale Mono=andale mono,monospace;' + 'Arial=arial,helvetica,sans-serif;' + 'Arial Black=arial black,sans-serif;' + 'Book Antiqua=book antiqua,palatino,serif;' + 'Comic Sans MS=comic sans ms,sans-serif;' + 'Courier New=courier new,courier,monospace;' + 'Georgia=georgia,palatino,serif;' + 'Helvetica=helvetica,arial,sans-serif;' + 'Impact=impact,sans-serif;' + 'Symbol=symbol;' + 'Tahoma=tahoma,arial,helvetica,sans-serif;' + 'Terminal=terminal,monaco,monospace;' + 'Times New Roman=times new roman,times,serif;' + 'Trebuchet MS=trebuchet ms,geneva,sans-serif;' + 'Verdana=verdana,geneva,sans-serif;' + 'Webdings=webdings;' + 'Wingdings=wingdings,zapf dingbats';
      var fonts = createFormats(editor.settings.font_formats || defaultFontsFormats);
      return global$4.map(fonts, function (font) {
        return {
          text: { raw: font[0] },
          value: font[1],
          textStyle: font[1].indexOf('dings') === -1 ? 'font-family:' + font[1] : ''
        };
      });
    };
    var registerButtons = function (editor) {
      editor.addButton('fontselect', function () {
        var items = getFontItems(editor);
        return {
          type: 'listbox',
          text: 'Font Family',
          tooltip: 'Font Family',
          values: items,
          fixedWidth: true,
          onPostRender: createFontNameListBoxChangeHandler(editor, items),
          onselect: function (e) {
            if (e.control.settings.value) {
              editor.execCommand('FontName', false, e.control.settings.value);
            }
          }
        };
      });
    };
    var register$1 = function (editor) {
      registerButtons(editor);
    };
    var FontSelect = { register: register$1 };

    var round = function (number, precision) {
      var factor = Math.pow(10, precision);
      return Math.round(number * factor) / factor;
    };
    var toPt = function (fontSize, precision) {
      if (/[0-9.]+px$/.test(fontSize)) {
        return round(parseInt(fontSize, 10) * 72 / 96, precision || 0) + 'pt';
      }
      return fontSize;
    };
    var findMatchingValue$1 = function (items, pt, px) {
      var value;
      global$4.each(items, function (item) {
        if (item.value === px) {
          value = px;
        } else if (item.value === pt) {
          value = pt;
        }
      });
      return value;
    };
    var createFontSizeListBoxChangeHandler = function (editor, items) {
      return function () {
        var self = this;
        editor.on('init nodeChange', function (e) {
          var px, pt, precision, match;
          px = editor.queryCommandValue('FontSize');
          if (px) {
            for (precision = 3; !match && precision >= 0; precision--) {
              pt = toPt(px, precision);
              match = findMatchingValue$1(items, pt, px);
            }
          }
          self.value(match ? match : null);
          if (!match) {
            self.text(pt);
          }
        });
      };
    };
    var getFontSizeItems = function (editor) {
      var defaultFontsizeFormats = '8pt 10pt 12pt 14pt 18pt 24pt 36pt';
      var fontsizeFormats = editor.settings.fontsize_formats || defaultFontsizeFormats;
      return global$4.map(fontsizeFormats.split(' '), function (item) {
        var text = item, value = item;
        var values = item.split('=');
        if (values.length > 1) {
          text = values[0];
          value = values[1];
        }
        return {
          text: text,
          value: value
        };
      });
    };
    var registerButtons$1 = function (editor) {
      editor.addButton('fontsizeselect', function () {
        var items = getFontSizeItems(editor);
        return {
          type: 'listbox',
          text: 'Font Sizes',
          tooltip: 'Font Sizes',
          values: items,
          fixedWidth: true,
          onPostRender: createFontSizeListBoxChangeHandler(editor, items),
          onclick: function (e) {
            if (e.control.settings.value) {
              editor.execCommand('FontSize', false, e.control.settings.value);
            }
          }
        };
      });
    };
    var register$2 = function (editor) {
      registerButtons$1(editor);
    };
    var FontSizeSelect = { register: register$2 };

    var hideMenuObjects = function (editor, menu) {
      var count = menu.length;
      global$4.each(menu, function (item) {
        if (item.menu) {
          item.hidden = hideMenuObjects(editor, item.menu) === 0;
        }
        var formatName = item.format;
        if (formatName) {
          item.hidden = !editor.formatter.canApply(formatName);
        }
        if (item.hidden) {
          count--;
        }
      });
      return count;
    };
    var hideFormatMenuItems = function (editor, menu) {
      var count = menu.items().length;
      menu.items().each(function (item) {
        if (item.menu) {
          item.visible(hideFormatMenuItems(editor, item.menu) > 0);
        }
        if (!item.menu && item.settings.menu) {
          item.visible(hideMenuObjects(editor, item.settings.menu) > 0);
        }
        var formatName = item.settings.format;
        if (formatName) {
          item.visible(editor.formatter.canApply(formatName));
        }
        if (!item.visible()) {
          count--;
        }
      });
      return count;
    };
    var createFormatMenu = function (editor) {
      var count = 0;
      var newFormats = [];
      var defaultStyleFormats = [
        {
          title: 'Headings',
          items: [
            {
              title: 'Heading 1',
              format: 'h1'
            },
            {
              title: 'Heading 2',
              format: 'h2'
            },
            {
              title: 'Heading 3',
              format: 'h3'
            },
            {
              title: 'Heading 4',
              format: 'h4'
            },
            {
              title: 'Heading 5',
              format: 'h5'
            },
            {
              title: 'Heading 6',
              format: 'h6'
            }
          ]
        },
        {
          title: 'Inline',
          items: [
            {
              title: 'Bold',
              icon: 'bold',
              format: 'bold'
            },
            {
              title: 'Italic',
              icon: 'italic',
              format: 'italic'
            },
            {
              title: 'Underline',
              icon: 'underline',
              format: 'underline'
            },
            {
              title: 'Strikethrough',
              icon: 'strikethrough',
              format: 'strikethrough'
            },
            {
              title: 'Superscript',
              icon: 'superscript',
              format: 'superscript'
            },
            {
              title: 'Subscript',
              icon: 'subscript',
              format: 'subscript'
            },
            {
              title: 'Code',
              icon: 'code',
              format: 'code'
            }
          ]
        },
        {
          title: 'Blocks',
          items: [
            {
              title: 'Paragraph',
              format: 'p'
            },
            {
              title: 'Blockquote',
              format: 'blockquote'
            },
            {
              title: 'Div',
              format: 'div'
            },
            {
              title: 'Pre',
              format: 'pre'
            }
          ]
        },
        {
          title: 'Alignment',
          items: [
            {
              title: 'Left',
              icon: 'alignleft',
              format: 'alignleft'
            },
            {
              title: 'Center',
              icon: 'aligncenter',
              format: 'aligncenter'
            },
            {
              title: 'Right',
              icon: 'alignright',
              format: 'alignright'
            },
            {
              title: 'Justify',
              icon: 'alignjustify',
              format: 'alignjustify'
            }
          ]
        }
      ];
      var createMenu = function (formats) {
        var menu = [];
        if (!formats) {
          return;
        }
        global$4.each(formats, function (format) {
          var menuItem = {
            text: format.title,
            icon: format.icon
          };
          if (format.items) {
            menuItem.menu = createMenu(format.items);
          } else {
            var formatName = format.format || 'custom' + count++;
            if (!format.format) {
              format.name = formatName;
              newFormats.push(format);
            }
            menuItem.format = formatName;
            menuItem.cmd = format.cmd;
          }
          menu.push(menuItem);
        });
        return menu;
      };
      var createStylesMenu = function () {
        var menu;
        if (editor.settings.style_formats_merge) {
          if (editor.settings.style_formats) {
            menu = createMenu(defaultStyleFormats.concat(editor.settings.style_formats));
          } else {
            menu = createMenu(defaultStyleFormats);
          }
        } else {
          menu = createMenu(editor.settings.style_formats || defaultStyleFormats);
        }
        return menu;
      };
      editor.on('init', function () {
        global$4.each(newFormats, function (format) {
          editor.formatter.register(format.name, format);
        });
      });
      return {
        type: 'menu',
        items: createStylesMenu(),
        onPostRender: function (e) {
          editor.fire('renderFormatsMenu', { control: e.control });
        },
        itemDefaults: {
          preview: true,
          textStyle: function () {
            if (this.settings.format) {
              return editor.formatter.getCssText(this.settings.format);
            }
          },
          onPostRender: function () {
            var self = this;
            self.parent().on('show', function () {
              var formatName, command;
              formatName = self.settings.format;
              if (formatName) {
                self.disabled(!editor.formatter.canApply(formatName));
                self.active(editor.formatter.match(formatName));
              }
              command = self.settings.cmd;
              if (command) {
                self.active(editor.queryCommandState(command));
              }
            });
          },
          onclick: function () {
            if (this.settings.format) {
              toggleFormat(editor, this.settings.format)();
            }
            if (this.settings.cmd) {
              editor.execCommand(this.settings.cmd);
            }
          }
        }
      };
    };
    var registerMenuItems = function (editor, formatMenu) {
      editor.addMenuItem('formats', {
        text: 'Formats',
        menu: formatMenu
      });
    };
    var registerButtons$2 = function (editor, formatMenu) {
      editor.addButton('styleselect', {
        type: 'menubutton',
        text: 'Formats',
        menu: formatMenu,
        onShowMenu: function () {
          if (editor.settings.style_formats_autohide) {
            hideFormatMenuItems(editor, this.menu);
          }
        }
      });
    };
    var register$3 = function (editor) {
      var formatMenu = createFormatMenu(editor);
      registerMenuItems(editor, formatMenu);
      registerButtons$2(editor, formatMenu);
    };
    var Formats = { register: register$3 };

    var defaultBlocks = 'Paragraph=p;' + 'Heading 1=h1;' + 'Heading 2=h2;' + 'Heading 3=h3;' + 'Heading 4=h4;' + 'Heading 5=h5;' + 'Heading 6=h6;' + 'Preformatted=pre';
    var createFormats$1 = function (formats) {
      formats = formats.replace(/;$/, '').split(';');
      var i = formats.length;
      while (i--) {
        formats[i] = formats[i].split('=');
      }
      return formats;
    };
    var createListBoxChangeHandler = function (editor, items, formatName) {
      return function () {
        var self = this;
        editor.on('nodeChange', function (e) {
          var formatter = editor.formatter;
          var value = null;
          global$4.each(e.parents, function (node) {
            global$4.each(items, function (item) {
              if (formatName) {
                if (formatter.matchNode(node, formatName, { value: item.value })) {
                  value = item.value;
                }
              } else {
                if (formatter.matchNode(node, item.value)) {
                  value = item.value;
                }
              }
              if (value) {
                return false;
              }
            });
            if (value) {
              return false;
            }
          });
          self.value(value);
        });
      };
    };
    var lazyFormatSelectBoxItems = function (editor, blocks) {
      return function () {
        var items = [];
        global$4.each(blocks, function (block) {
          items.push({
            text: block[0],
            value: block[1],
            textStyle: function () {
              return editor.formatter.getCssText(block[1]);
            }
          });
        });
        return {
          type: 'listbox',
          text: blocks[0][0],
          values: items,
          fixedWidth: true,
          onselect: function (e) {
            if (e.control) {
              var fmt = e.control.value();
              toggleFormat(editor, fmt)();
            }
          },
          onPostRender: createListBoxChangeHandler(editor, items)
        };
      };
    };
    var buildMenuItems = function (editor, blocks) {
      return global$4.map(blocks, function (block) {
        return {
          text: block[0],
          onclick: toggleFormat(editor, block[1]),
          textStyle: function () {
            return editor.formatter.getCssText(block[1]);
          }
        };
      });
    };
    var register$4 = function (editor) {
      var blocks = createFormats$1(editor.settings.block_formats || defaultBlocks);
      editor.addMenuItem('blockformats', {
        text: 'Blocks',
        menu: buildMenuItems(editor, blocks)
      });
      editor.addButton('formatselect', lazyFormatSelectBoxItems(editor, blocks));
    };
    var FormatSelect = { register: register$4 };

    var createCustomMenuItems = function (editor, names) {
      var items, nameList;
      if (typeof names === 'string') {
        nameList = names.split(' ');
      } else if (global$4.isArray(names)) {
        return flatten$1(global$4.map(names, function (names) {
          return createCustomMenuItems(editor, names);
        }));
      }
      items = global$4.grep(nameList, function (name) {
        return name === '|' || name in editor.menuItems;
      });
      return global$4.map(items, function (name) {
        return name === '|' ? { text: '-' } : editor.menuItems[name];
      });
    };
    var isSeparator = function (menuItem) {
      return menuItem && menuItem.text === '-';
    };
    var trimMenuItems = function (menuItems) {
      var menuItems2 = filter(menuItems, function (menuItem, i) {
        return !isSeparator(menuItem) || !isSeparator(menuItems[i - 1]);
      });
      return filter(menuItems2, function (menuItem, i) {
        return !isSeparator(menuItem) || i > 0 && i < menuItems2.length - 1;
      });
    };
    var createContextMenuItems = function (editor, context) {
      var outputMenuItems = [{ text: '-' }];
      var menuItems = global$4.grep(editor.menuItems, function (menuItem) {
        return menuItem.context === context;
      });
      global$4.each(menuItems, function (menuItem) {
        if (menuItem.separator === 'before') {
          outputMenuItems.push({ text: '|' });
        }
        if (menuItem.prependToContext) {
          outputMenuItems.unshift(menuItem);
        } else {
          outputMenuItems.push(menuItem);
        }
        if (menuItem.separator === 'after') {
          outputMenuItems.push({ text: '|' });
        }
      });
      return outputMenuItems;
    };
    var createInsertMenu = function (editor) {
      var insertButtonItems = editor.settings.insert_button_items;
      if (insertButtonItems) {
        return trimMenuItems(createCustomMenuItems(editor, insertButtonItems));
      } else {
        return trimMenuItems(createContextMenuItems(editor, 'insert'));
      }
    };
    var registerButtons$3 = function (editor) {
      editor.addButton('insert', {
        type: 'menubutton',
        icon: 'insert',
        menu: [],
        oncreatemenu: function () {
          this.menu.add(createInsertMenu(editor));
          this.menu.renderNew();
        }
      });
    };
    var register$5 = function (editor) {
      registerButtons$3(editor);
    };
    var InsertButton = { register: register$5 };

    var registerFormatButtons = function (editor) {
      global$4.each({
        bold: 'Bold',
        italic: 'Italic',
        underline: 'Underline',
        strikethrough: 'Strikethrough',
        subscript: 'Subscript',
        superscript: 'Superscript'
      }, function (text, name) {
        editor.addButton(name, {
          active: false,
          tooltip: text,
          onPostRender: postRenderFormatToggle(editor, name),
          onclick: toggleFormat(editor, name)
        });
      });
    };
    var registerCommandButtons = function (editor) {
      global$4.each({
        outdent: [
          'Decrease indent',
          'Outdent'
        ],
        indent: [
          'Increase indent',
          'Indent'
        ],
        cut: [
          'Cut',
          'Cut'
        ],
        copy: [
          'Copy',
          'Copy'
        ],
        paste: [
          'Paste',
          'Paste'
        ],
        help: [
          'Help',
          'mceHelp'
        ],
        selectall: [
          'Select all',
          'SelectAll'
        ],
        visualaid: [
          'Visual aids',
          'mceToggleVisualAid'
        ],
        newdocument: [
          'New document',
          'mceNewDocument'
        ],
        removeformat: [
          'Clear formatting',
          'RemoveFormat'
        ],
        remove: [
          'Remove',
          'Delete'
        ]
      }, function (item, name) {
        editor.addButton(name, {
          tooltip: item[0],
          cmd: item[1]
        });
      });
    };
    var registerCommandToggleButtons = function (editor) {
      global$4.each({
        blockquote: [
          'Blockquote',
          'mceBlockQuote'
        ],
        subscript: [
          'Subscript',
          'Subscript'
        ],
        superscript: [
          'Superscript',
          'Superscript'
        ]
      }, function (item, name) {
        editor.addButton(name, {
          active: false,
          tooltip: item[0],
          cmd: item[1],
          onPostRender: postRenderFormatToggle(editor, name)
        });
      });
    };
    var registerButtons$4 = function (editor) {
      registerFormatButtons(editor);
      registerCommandButtons(editor);
      registerCommandToggleButtons(editor);
    };
    var registerMenuItems$1 = function (editor) {
      global$4.each({
        bold: [
          'Bold',
          'Bold',
          'Meta+B'
        ],
        italic: [
          'Italic',
          'Italic',
          'Meta+I'
        ],
        underline: [
          'Underline',
          'Underline',
          'Meta+U'
        ],
        strikethrough: [
          'Strikethrough',
          'Strikethrough'
        ],
        subscript: [
          'Subscript',
          'Subscript'
        ],
        superscript: [
          'Superscript',
          'Superscript'
        ],
        removeformat: [
          'Clear formatting',
          'RemoveFormat'
        ],
        newdocument: [
          'New document',
          'mceNewDocument'
        ],
        cut: [
          'Cut',
          'Cut',
          'Meta+X'
        ],
        copy: [
          'Copy',
          'Copy',
          'Meta+C'
        ],
        paste: [
          'Paste',
          'Paste',
          'Meta+V'
        ],
        selectall: [
          'Select all',
          'SelectAll',
          'Meta+A'
        ]
      }, function (item, name) {
        editor.addMenuItem(name, {
          text: item[0],
          icon: name,
          shortcut: item[2],
          cmd: item[1]
        });
      });
      editor.addMenuItem('codeformat', {
        text: 'Code',
        icon: 'code',
        onclick: toggleFormat(editor, 'code')
      });
    };
    var register$6 = function (editor) {
      registerButtons$4(editor);
      registerMenuItems$1(editor);
    };
    var SimpleControls = { register: register$6 };

    var toggleUndoRedoState = function (editor, type) {
      return function () {
        var self = this;
        var checkState = function () {
          var typeFn = type === 'redo' ? 'hasRedo' : 'hasUndo';
          return editor.undoManager ? editor.undoManager[typeFn]() : false;
        };
        self.disabled(!checkState());
        editor.on('Undo Redo AddUndo TypingUndo ClearUndos SwitchMode', function () {
          self.disabled(editor.readonly || !checkState());
        });
      };
    };
    var registerMenuItems$2 = function (editor) {
      editor.addMenuItem('undo', {
        text: 'Undo',
        icon: 'undo',
        shortcut: 'Meta+Z',
        onPostRender: toggleUndoRedoState(editor, 'undo'),
        cmd: 'undo'
      });
      editor.addMenuItem('redo', {
        text: 'Redo',
        icon: 'redo',
        shortcut: 'Meta+Y',
        onPostRender: toggleUndoRedoState(editor, 'redo'),
        cmd: 'redo'
      });
    };
    var registerButtons$5 = function (editor) {
      editor.addButton('undo', {
        tooltip: 'Undo',
        onPostRender: toggleUndoRedoState(editor, 'undo'),
        cmd: 'undo'
      });
      editor.addButton('redo', {
        tooltip: 'Redo',
        onPostRender: toggleUndoRedoState(editor, 'redo'),
        cmd: 'redo'
      });
    };
    var register$7 = function (editor) {
      registerMenuItems$2(editor);
      registerButtons$5(editor);
    };
    var UndoRedo = { register: register$7 };

    var toggleVisualAidState = function (editor) {
      return function () {
        var self = this;
        editor.on('VisualAid', function (e) {
          self.active(e.hasVisual);
        });
        self.active(editor.hasVisual);
      };
    };
    var registerMenuItems$3 = function (editor) {
      editor.addMenuItem('visualaid', {
        text: 'Visual aids',
        selectable: true,
        onPostRender: toggleVisualAidState(editor),
        cmd: 'mceToggleVisualAid'
      });
    };
    var register$8 = function (editor) {
      registerMenuItems$3(editor);
    };
    var VisualAid = { register: register$8 };

    var setupEnvironment = function () {
      Widget.tooltips = !global$1.iOS;
      Control$1.translate = function (text) {
        return global$5.translate(text);
      };
    };
    var setupUiContainer = function (editor) {
      if (editor.settings.ui_container) {
        global$1.container = descendant(Element.fromDom(domGlobals.document.body), editor.settings.ui_container).fold(constant(null), function (elm) {
          return elm.dom();
        });
      }
    };
    var setupRtlMode = function (editor) {
      if (editor.rtl) {
        Control$1.rtl = true;
      }
    };
    var setupHideFloatPanels = function (editor) {
      editor.on('mousedown progressstate', function () {
        FloatPanel.hideAll();
      });
    };
    var setup = function (editor) {
      setupRtlMode(editor);
      setupHideFloatPanels(editor);
      setupUiContainer(editor);
      setupEnvironment();
      FormatSelect.register(editor);
      Align.register(editor);
      SimpleControls.register(editor);
      UndoRedo.register(editor);
      FontSizeSelect.register(editor);
      FontSelect.register(editor);
      Formats.register(editor);
      VisualAid.register(editor);
      InsertButton.register(editor);
    };
    var FormatControls = { setup: setup };

    var GridLayout = AbsoluteLayout.extend({
      recalc: function (container) {
        var settings, rows, cols, items, contLayoutRect, width, height, rect, ctrlLayoutRect, ctrl, x, y, posX, posY, ctrlSettings, contPaddingBox, align, spacingH, spacingV, alignH, alignV, maxX, maxY;
        var colWidths = [];
        var rowHeights = [];
        var ctrlMinWidth, ctrlMinHeight, availableWidth, availableHeight, reverseRows, idx;
        settings = container.settings;
        items = container.items().filter(':visible');
        contLayoutRect = container.layoutRect();
        cols = settings.columns || Math.ceil(Math.sqrt(items.length));
        rows = Math.ceil(items.length / cols);
        spacingH = settings.spacingH || settings.spacing || 0;
        spacingV = settings.spacingV || settings.spacing || 0;
        alignH = settings.alignH || settings.align;
        alignV = settings.alignV || settings.align;
        contPaddingBox = container.paddingBox;
        reverseRows = 'reverseRows' in settings ? settings.reverseRows : container.isRtl();
        if (alignH && typeof alignH === 'string') {
          alignH = [alignH];
        }
        if (alignV && typeof alignV === 'string') {
          alignV = [alignV];
        }
        for (x = 0; x < cols; x++) {
          colWidths.push(0);
        }
        for (y = 0; y < rows; y++) {
          rowHeights.push(0);
        }
        for (y = 0; y < rows; y++) {
          for (x = 0; x < cols; x++) {
            ctrl = items[y * cols + x];
            if (!ctrl) {
              break;
            }
            ctrlLayoutRect = ctrl.layoutRect();
            ctrlMinWidth = ctrlLayoutRect.minW;
            ctrlMinHeight = ctrlLayoutRect.minH;
            colWidths[x] = ctrlMinWidth > colWidths[x] ? ctrlMinWidth : colWidths[x];
            rowHeights[y] = ctrlMinHeight > rowHeights[y] ? ctrlMinHeight : rowHeights[y];
          }
        }
        availableWidth = contLayoutRect.innerW - contPaddingBox.left - contPaddingBox.right;
        for (maxX = 0, x = 0; x < cols; x++) {
          maxX += colWidths[x] + (x > 0 ? spacingH : 0);
          availableWidth -= (x > 0 ? spacingH : 0) + colWidths[x];
        }
        availableHeight = contLayoutRect.innerH - contPaddingBox.top - contPaddingBox.bottom;
        for (maxY = 0, y = 0; y < rows; y++) {
          maxY += rowHeights[y] + (y > 0 ? spacingV : 0);
          availableHeight -= (y > 0 ? spacingV : 0) + rowHeights[y];
        }
        maxX += contPaddingBox.left + contPaddingBox.right;
        maxY += contPaddingBox.top + contPaddingBox.bottom;
        rect = {};
        rect.minW = maxX + (contLayoutRect.w - contLayoutRect.innerW);
        rect.minH = maxY + (contLayoutRect.h - contLayoutRect.innerH);
        rect.contentW = rect.minW - contLayoutRect.deltaW;
        rect.contentH = rect.minH - contLayoutRect.deltaH;
        rect.minW = Math.min(rect.minW, contLayoutRect.maxW);
        rect.minH = Math.min(rect.minH, contLayoutRect.maxH);
        rect.minW = Math.max(rect.minW, contLayoutRect.startMinWidth);
        rect.minH = Math.max(rect.minH, contLayoutRect.startMinHeight);
        if (contLayoutRect.autoResize && (rect.minW !== contLayoutRect.minW || rect.minH !== contLayoutRect.minH)) {
          rect.w = rect.minW;
          rect.h = rect.minH;
          container.layoutRect(rect);
          this.recalc(container);
          if (container._lastRect === null) {
            var parentCtrl = container.parent();
            if (parentCtrl) {
              parentCtrl._lastRect = null;
              parentCtrl.recalc();
            }
          }
          return;
        }
        if (contLayoutRect.autoResize) {
          rect = container.layoutRect(rect);
          rect.contentW = rect.minW - contLayoutRect.deltaW;
          rect.contentH = rect.minH - contLayoutRect.deltaH;
        }
        var flexV;
        if (settings.packV === 'start') {
          flexV = 0;
        } else {
          flexV = availableHeight > 0 ? Math.floor(availableHeight / rows) : 0;
        }
        var totalFlex = 0;
        var flexWidths = settings.flexWidths;
        if (flexWidths) {
          for (x = 0; x < flexWidths.length; x++) {
            totalFlex += flexWidths[x];
          }
        } else {
          totalFlex = cols;
        }
        var ratio = availableWidth / totalFlex;
        for (x = 0; x < cols; x++) {
          colWidths[x] += flexWidths ? flexWidths[x] * ratio : ratio;
        }
        posY = contPaddingBox.top;
        for (y = 0; y < rows; y++) {
          posX = contPaddingBox.left;
          height = rowHeights[y] + flexV;
          for (x = 0; x < cols; x++) {
            if (reverseRows) {
              idx = y * cols + cols - 1 - x;
            } else {
              idx = y * cols + x;
            }
            ctrl = items[idx];
            if (!ctrl) {
              break;
            }
            ctrlSettings = ctrl.settings;
            ctrlLayoutRect = ctrl.layoutRect();
            width = Math.max(colWidths[x], ctrlLayoutRect.startMinWidth);
            ctrlLayoutRect.x = posX;
            ctrlLayoutRect.y = posY;
            align = ctrlSettings.alignH || (alignH ? alignH[x] || alignH[0] : null);
            if (align === 'center') {
              ctrlLayoutRect.x = posX + width / 2 - ctrlLayoutRect.w / 2;
            } else if (align === 'right') {
              ctrlLayoutRect.x = posX + width - ctrlLayoutRect.w;
            } else if (align === 'stretch') {
              ctrlLayoutRect.w = width;
            }
            align = ctrlSettings.alignV || (alignV ? alignV[x] || alignV[0] : null);
            if (align === 'center') {
              ctrlLayoutRect.y = posY + height / 2 - ctrlLayoutRect.h / 2;
            } else if (align === 'bottom') {
              ctrlLayoutRect.y = posY + height - ctrlLayoutRect.h;
            } else if (align === 'stretch') {
              ctrlLayoutRect.h = height;
            }
            ctrl.layoutRect(ctrlLayoutRect);
            posX += width + spacingH;
            if (ctrl.recalc) {
              ctrl.recalc();
            }
          }
          posY += height + spacingV;
        }
      }
    });

    var Iframe = Widget.extend({
      renderHtml: function () {
        var self = this;
        self.classes.add('iframe');
        self.canFocus = false;
        return '<iframe id="' + self._id + '" class="' + self.classes + '" tabindex="-1" src="' + (self.settings.url || 'javascript:\'\'') + '" frameborder="0"></iframe>';
      },
      src: function (src) {
        this.getEl().src = src;
      },
      html: function (html, callback) {
        var self = this, body = this.getEl().contentWindow.document.body;
        if (!body) {
          global$3.setTimeout(function () {
            self.html(html);
          });
        } else {
          body.innerHTML = html;
          if (callback) {
            callback();
          }
        }
        return this;
      }
    });

    var InfoBox = Widget.extend({
      init: function (settings) {
        var self = this;
        self._super(settings);
        self.classes.add('widget').add('infobox');
        self.canFocus = false;
      },
      severity: function (level) {
        this.classes.remove('error');
        this.classes.remove('warning');
        this.classes.remove('success');
        this.classes.add(level);
      },
      help: function (state) {
        this.state.set('help', state);
      },
      renderHtml: function () {
        var self = this, prefix = self.classPrefix;
        return '<div id="' + self._id + '" class="' + self.classes + '">' + '<div id="' + self._id + '-body">' + self.encode(self.state.get('text')) + '<button role="button" tabindex="-1">' + '<i class="' + prefix + 'ico ' + prefix + 'i-help"></i>' + '</button>' + '</div>' + '</div>';
      },
      bindStates: function () {
        var self = this;
        self.state.on('change:text', function (e) {
          self.getEl('body').firstChild.data = self.encode(e.value);
          if (self.state.get('rendered')) {
            self.updateLayoutRect();
          }
        });
        self.state.on('change:help', function (e) {
          self.classes.toggle('has-help', e.value);
          if (self.state.get('rendered')) {
            self.updateLayoutRect();
          }
        });
        return self._super();
      }
    });

    var Label = Widget.extend({
      init: function (settings) {
        var self = this;
        self._super(settings);
        self.classes.add('widget').add('label');
        self.canFocus = false;
        if (settings.multiline) {
          self.classes.add('autoscroll');
        }
        if (settings.strong) {
          self.classes.add('strong');
        }
      },
      initLayoutRect: function () {
        var self = this, layoutRect = self._super();
        if (self.settings.multiline) {
          var size = funcs.getSize(self.getEl());
          if (size.width > layoutRect.maxW) {
            layoutRect.minW = layoutRect.maxW;
            self.classes.add('multiline');
          }
          self.getEl().style.width = layoutRect.minW + 'px';
          layoutRect.startMinH = layoutRect.h = layoutRect.minH = Math.min(layoutRect.maxH, funcs.getSize(self.getEl()).height);
        }
        return layoutRect;
      },
      repaint: function () {
        var self = this;
        if (!self.settings.multiline) {
          self.getEl().style.lineHeight = self.layoutRect().h + 'px';
        }
        return self._super();
      },
      severity: function (level) {
        this.classes.remove('error');
        this.classes.remove('warning');
        this.classes.remove('success');
        this.classes.add(level);
      },
      renderHtml: function () {
        var self = this;
        var targetCtrl, forName, forId = self.settings.forId;
        var text = self.settings.html ? self.settings.html : self.encode(self.state.get('text'));
        if (!forId && (forName = self.settings.forName)) {
          targetCtrl = self.getRoot().find('#' + forName)[0];
          if (targetCtrl) {
            forId = targetCtrl._id;
          }
        }
        if (forId) {
          return '<label id="' + self._id + '" class="' + self.classes + '"' + (forId ? ' for="' + forId + '"' : '') + '>' + text + '</label>';
        }
        return '<span id="' + self._id + '" class="' + self.classes + '">' + text + '</span>';
      },
      bindStates: function () {
        var self = this;
        self.state.on('change:text', function (e) {
          self.innerHtml(self.encode(e.value));
          if (self.state.get('rendered')) {
            self.updateLayoutRect();
          }
        });
        return self._super();
      }
    });

    var Toolbar$1 = Container.extend({
      Defaults: {
        role: 'toolbar',
        layout: 'flow'
      },
      init: function (settings) {
        var self = this;
        self._super(settings);
        self.classes.add('toolbar');
      },
      postRender: function () {
        var self = this;
        self.items().each(function (ctrl) {
          ctrl.classes.add('toolbar-item');
        });
        return self._super();
      }
    });

    var MenuBar = Toolbar$1.extend({
      Defaults: {
        role: 'menubar',
        containerCls: 'menubar',
        ariaRoot: true,
        defaults: { type: 'menubutton' }
      }
    });

    function isChildOf$1(node, parent) {
      while (node) {
        if (parent === node) {
          return true;
        }
        node = node.parentNode;
      }
      return false;
    }
    var MenuButton = Button.extend({
      init: function (settings) {
        var self = this;
        self._renderOpen = true;
        self._super(settings);
        settings = self.settings;
        self.classes.add('menubtn');
        if (settings.fixedWidth) {
          self.classes.add('fixed-width');
        }
        self.aria('haspopup', true);
        self.state.set('menu', settings.menu || self.render());
      },
      showMenu: function (toggle) {
        var self = this;
        var menu;
        if (self.menu && self.menu.visible() && toggle !== false) {
          return self.hideMenu();
        }
        if (!self.menu) {
          menu = self.state.get('menu') || [];
          self.classes.add('opened');
          if (menu.length) {
            menu = {
              type: 'menu',
              animate: true,
              items: menu
            };
          } else {
            menu.type = menu.type || 'menu';
            menu.animate = true;
          }
          if (!menu.renderTo) {
            self.menu = global$b.create(menu).parent(self).renderTo();
          } else {
            self.menu = menu.parent(self).show().renderTo();
          }
          self.fire('createmenu');
          self.menu.reflow();
          self.menu.on('cancel', function (e) {
            if (e.control.parent() === self.menu) {
              e.stopPropagation();
              self.focus();
              self.hideMenu();
            }
          });
          self.menu.on('select', function () {
            self.focus();
          });
          self.menu.on('show hide', function (e) {
            if (e.type === 'hide' && e.control.parent() === self) {
              self.classes.remove('opened-under');
            }
            if (e.control === self.menu) {
              self.activeMenu(e.type === 'show');
              self.classes.toggle('opened', e.type === 'show');
            }
            self.aria('expanded', e.type === 'show');
          }).fire('show');
        }
        self.menu.show();
        self.menu.layoutRect({ w: self.layoutRect().w });
        self.menu.repaint();
        self.menu.moveRel(self.getEl(), self.isRtl() ? [
          'br-tr',
          'tr-br'
        ] : [
          'bl-tl',
          'tl-bl'
        ]);
        var menuLayoutRect = self.menu.layoutRect();
        var selfBottom = self.$el.offset().top + self.layoutRect().h;
        if (selfBottom > menuLayoutRect.y && selfBottom < menuLayoutRect.y + menuLayoutRect.h) {
          self.classes.add('opened-under');
        }
        self.fire('showmenu');
      },
      hideMenu: function () {
        var self = this;
        if (self.menu) {
          self.menu.items().each(function (item) {
            if (item.hideMenu) {
              item.hideMenu();
            }
          });
          self.menu.hide();
        }
      },
      activeMenu: function (state) {
        this.classes.toggle('active', state);
      },
      renderHtml: function () {
        var self = this, id = self._id, prefix = self.classPrefix;
        var icon = self.settings.icon, image;
        var text = self.state.get('text');
        var textHtml = '';
        image = self.settings.image;
        if (image) {
          icon = 'none';
          if (typeof image !== 'string') {
            image = domGlobals.window.getSelection ? image[0] : image[1];
          }
          image = ' style="background-image: url(\'' + image + '\')"';
        } else {
          image = '';
        }
        if (text) {
          self.classes.add('btn-has-text');
          textHtml = '<span class="' + prefix + 'txt">' + self.encode(text) + '</span>';
        }
        icon = self.settings.icon ? prefix + 'ico ' + prefix + 'i-' + icon : '';
        self.aria('role', self.parent() instanceof MenuBar ? 'menuitem' : 'button');
        return '<div id="' + id + '" class="' + self.classes + '" tabindex="-1" aria-labelledby="' + id + '">' + '<button id="' + id + '-open" role="presentation" type="button" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + '></i>' : '') + textHtml + ' <i class="' + prefix + 'caret"></i>' + '</button>' + '</div>';
      },
      postRender: function () {
        var self = this;
        self.on('click', function (e) {
          if (e.control === self && isChildOf$1(e.target, self.getEl())) {
            self.focus();
            self.showMenu(!e.aria);
            if (e.aria) {
              self.menu.items().filter(':visible')[0].focus();
            }
          }
        });
        self.on('mouseenter', function (e) {
          var overCtrl = e.control;
          var parent = self.parent();
          var hasVisibleSiblingMenu;
          if (overCtrl && parent && overCtrl instanceof MenuButton && overCtrl.parent() === parent) {
            parent.items().filter('MenuButton').each(function (ctrl) {
              if (ctrl.hideMenu && ctrl !== overCtrl) {
                if (ctrl.menu && ctrl.menu.visible()) {
                  hasVisibleSiblingMenu = true;
                }
                ctrl.hideMenu();
              }
            });
            if (hasVisibleSiblingMenu) {
              overCtrl.focus();
              overCtrl.showMenu();
            }
          }
        });
        return self._super();
      },
      bindStates: function () {
        var self = this;
        self.state.on('change:menu', function () {
          if (self.menu) {
            self.menu.remove();
          }
          self.menu = null;
        });
        return self._super();
      },
      remove: function () {
        this._super();
        if (this.menu) {
          this.menu.remove();
        }
      }
    });

    function Throbber (elm, inline) {
      var self = this;
      var state;
      var classPrefix = Control$1.classPrefix;
      var timer;
      self.show = function (time, callback) {
        function render() {
          if (state) {
            global$7(elm).append('<div class="' + classPrefix + 'throbber' + (inline ? ' ' + classPrefix + 'throbber-inline' : '') + '"></div>');
            if (callback) {
              callback();
            }
          }
        }
        self.hide();
        state = true;
        if (time) {
          timer = global$3.setTimeout(render, time);
        } else {
          render();
        }
        return self;
      };
      self.hide = function () {
        var child = elm.lastChild;
        global$3.clearTimeout(timer);
        if (child && child.className.indexOf('throbber') !== -1) {
          child.parentNode.removeChild(child);
        }
        state = false;
        return self;
      };
    }

    var Menu = FloatPanel.extend({
      Defaults: {
        defaultType: 'menuitem',
        border: 1,
        layout: 'stack',
        role: 'application',
        bodyRole: 'menu',
        ariaRoot: true
      },
      init: function (settings) {
        var self = this;
        settings.autohide = true;
        settings.constrainToViewport = true;
        if (typeof settings.items === 'function') {
          settings.itemsFactory = settings.items;
          settings.items = [];
        }
        if (settings.itemDefaults) {
          var items = settings.items;
          var i = items.length;
          while (i--) {
            items[i] = global$4.extend({}, settings.itemDefaults, items[i]);
          }
        }
        self._super(settings);
        self.classes.add('menu');
        if (settings.animate && global$1.ie !== 11) {
          self.classes.add('animate');
        }
      },
      repaint: function () {
        this.classes.toggle('menu-align', true);
        this._super();
        this.getEl().style.height = '';
        this.getEl('body').style.height = '';
        return this;
      },
      cancel: function () {
        var self = this;
        self.hideAll();
        self.fire('select');
      },
      load: function () {
        var self = this;
        var time, factory;
        function hideThrobber() {
          if (self.throbber) {
            self.throbber.hide();
            self.throbber = null;
          }
        }
        factory = self.settings.itemsFactory;
        if (!factory) {
          return;
        }
        if (!self.throbber) {
          self.throbber = new Throbber(self.getEl('body'), true);
          if (self.items().length === 0) {
            self.throbber.show();
            self.fire('loading');
          } else {
            self.throbber.show(100, function () {
              self.items().remove();
              self.fire('loading');
            });
          }
          self.on('hide close', hideThrobber);
        }
        self.requestTime = time = new Date().getTime();
        self.settings.itemsFactory(function (items) {
          if (items.length === 0) {
            self.hide();
            return;
          }
          if (self.requestTime !== time) {
            return;
          }
          self.getEl().style.width = '';
          self.getEl('body').style.width = '';
          hideThrobber();
          self.items().remove();
          self.getEl('body').innerHTML = '';
          self.add(items);
          self.renderNew();
          self.fire('loaded');
        });
      },
      hideAll: function () {
        var self = this;
        this.find('menuitem').exec('hideMenu');
        return self._super();
      },
      preRender: function () {
        var self = this;
        self.items().each(function (ctrl) {
          var settings = ctrl.settings;
          if (settings.icon || settings.image || settings.selectable) {
            self._hasIcons = true;
            return false;
          }
        });
        if (self.settings.itemsFactory) {
          self.on('postrender', function () {
            if (self.settings.itemsFactory) {
              self.load();
            }
          });
        }
        self.on('show hide', function (e) {
          if (e.control === self) {
            if (e.type === 'show') {
              global$3.setTimeout(function () {
                self.classes.add('in');
              }, 0);
            } else {
              self.classes.remove('in');
            }
          }
        });
        return self._super();
      }
    });

    var ListBox = MenuButton.extend({
      init: function (settings) {
        var self = this;
        var values, selected, selectedText, lastItemCtrl;
        function setSelected(menuValues) {
          for (var i = 0; i < menuValues.length; i++) {
            selected = menuValues[i].selected || settings.value === menuValues[i].value;
            if (selected) {
              selectedText = selectedText || menuValues[i].text;
              self.state.set('value', menuValues[i].value);
              return true;
            }
            if (menuValues[i].menu) {
              if (setSelected(menuValues[i].menu)) {
                return true;
              }
            }
          }
        }
        self._super(settings);
        settings = self.settings;
        self._values = values = settings.values;
        if (values) {
          if (typeof settings.value !== 'undefined') {
            setSelected(values);
          }
          if (!selected && values.length > 0) {
            selectedText = values[0].text;
            self.state.set('value', values[0].value);
          }
          self.state.set('menu', values);
        }
        self.state.set('text', settings.text || selectedText);
        self.classes.add('listbox');
        self.on('select', function (e) {
          var ctrl = e.control;
          if (lastItemCtrl) {
            e.lastControl = lastItemCtrl;
          }
          if (settings.multiple) {
            ctrl.active(!ctrl.active());
          } else {
            self.value(e.control.value());
          }
          lastItemCtrl = ctrl;
        });
      },
      value: function (value) {
        if (arguments.length === 0) {
          return this.state.get('value');
        }
        if (typeof value === 'undefined') {
          return this;
        }
        function valueExists(values) {
          return exists(values, function (a) {
            return a.menu ? valueExists(a.menu) : a.value === value;
          });
        }
        if (this.settings.values) {
          if (valueExists(this.settings.values)) {
            this.state.set('value', value);
          } else if (value === null) {
            this.state.set('value', null);
          }
        } else {
          this.state.set('value', value);
        }
        return this;
      },
      bindStates: function () {
        var self = this;
        function activateMenuItemsByValue(menu, value) {
          if (menu instanceof Menu) {
            menu.items().each(function (ctrl) {
              if (!ctrl.hasMenus()) {
                ctrl.active(ctrl.value() === value);
              }
            });
          }
        }
        function getSelectedItem(menuValues, value) {
          var selectedItem;
          if (!menuValues) {
            return;
          }
          for (var i = 0; i < menuValues.length; i++) {
            if (menuValues[i].value === value) {
              return menuValues[i];
            }
            if (menuValues[i].menu) {
              selectedItem = getSelectedItem(menuValues[i].menu, value);
              if (selectedItem) {
                return selectedItem;
              }
            }
          }
        }
        self.on('show', function (e) {
          activateMenuItemsByValue(e.control, self.value());
        });
        self.state.on('change:value', function (e) {
          var selectedItem = getSelectedItem(self.state.get('menu'), e.value);
          if (selectedItem) {
            self.text(selectedItem.text);
          } else {
            self.text(self.settings.text);
          }
        });
        return self._super();
      }
    });

    var toggleTextStyle = function (ctrl, state) {
      var textStyle = ctrl._textStyle;
      if (textStyle) {
        var textElm = ctrl.getEl('text');
        textElm.setAttribute('style', textStyle);
        if (state) {
          textElm.style.color = '';
          textElm.style.backgroundColor = '';
        }
      }
    };
    var MenuItem = Widget.extend({
      Defaults: {
        border: 0,
        role: 'menuitem'
      },
      init: function (settings) {
        var self = this;
        var text;
        self._super(settings);
        settings = self.settings;
        self.classes.add('menu-item');
        if (settings.menu) {
          self.classes.add('menu-item-expand');
        }
        if (settings.preview) {
          self.classes.add('menu-item-preview');
        }
        text = self.state.get('text');
        if (text === '-' || text === '|') {
          self.classes.add('menu-item-sep');
          self.aria('role', 'separator');
          self.state.set('text', '-');
        }
        if (settings.selectable) {
          self.aria('role', 'menuitemcheckbox');
          self.classes.add('menu-item-checkbox');
          settings.icon = 'selected';
        }
        if (!settings.preview && !settings.selectable) {
          self.classes.add('menu-item-normal');
        }
        self.on('mousedown', function (e) {
          e.preventDefault();
        });
        if (settings.menu && !settings.ariaHideMenu) {
          self.aria('haspopup', true);
        }
      },
      hasMenus: function () {
        return !!this.settings.menu;
      },
      showMenu: function () {
        var self = this;
        var settings = self.settings;
        var menu;
        var parent = self.parent();
        parent.items().each(function (ctrl) {
          if (ctrl !== self) {
            ctrl.hideMenu();
          }
        });
        if (settings.menu) {
          menu = self.menu;
          if (!menu) {
            menu = settings.menu;
            if (menu.length) {
              menu = {
                type: 'menu',
                items: menu
              };
            } else {
              menu.type = menu.type || 'menu';
            }
            if (parent.settings.itemDefaults) {
              menu.itemDefaults = parent.settings.itemDefaults;
            }
            menu = self.menu = global$b.create(menu).parent(self).renderTo();
            menu.reflow();
            menu.on('cancel', function (e) {
              e.stopPropagation();
              self.focus();
              menu.hide();
            });
            menu.on('show hide', function (e) {
              if (e.control.items) {
                e.control.items().each(function (ctrl) {
                  ctrl.active(ctrl.settings.selected);
                });
              }
            }).fire('show');
            menu.on('hide', function (e) {
              if (e.control === menu) {
                self.classes.remove('selected');
              }
            });
            menu.submenu = true;
          } else {
            menu.show();
          }
          menu._parentMenu = parent;
          menu.classes.add('menu-sub');
          var rel = menu.testMoveRel(self.getEl(), self.isRtl() ? [
            'tl-tr',
            'bl-br',
            'tr-tl',
            'br-bl'
          ] : [
            'tr-tl',
            'br-bl',
            'tl-tr',
            'bl-br'
          ]);
          menu.moveRel(self.getEl(), rel);
          menu.rel = rel;
          rel = 'menu-sub-' + rel;
          menu.classes.remove(menu._lastRel).add(rel);
          menu._lastRel = rel;
          self.classes.add('selected');
          self.aria('expanded', true);
        }
      },
      hideMenu: function () {
        var self = this;
        if (self.menu) {
          self.menu.items().each(function (item) {
            if (item.hideMenu) {
              item.hideMenu();
            }
          });
          self.menu.hide();
          self.aria('expanded', false);
        }
        return self;
      },
      renderHtml: function () {
        var self = this;
        var id = self._id;
        var settings = self.settings;
        var prefix = self.classPrefix;
        var text = self.state.get('text');
        var icon = self.settings.icon, image = '', shortcut = settings.shortcut;
        var url = self.encode(settings.url), iconHtml = '';
        function convertShortcut(shortcut) {
          var i, value, replace = {};
          if (global$1.mac) {
            replace = {
              alt: '&#x2325;',
              ctrl: '&#x2318;',
              shift: '&#x21E7;',
              meta: '&#x2318;'
            };
          } else {
            replace = { meta: 'Ctrl' };
          }
          shortcut = shortcut.split('+');
          for (i = 0; i < shortcut.length; i++) {
            value = replace[shortcut[i].toLowerCase()];
            if (value) {
              shortcut[i] = value;
            }
          }
          return shortcut.join('+');
        }
        function escapeRegExp(str) {
          return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
        }
        function markMatches(text) {
          var match = settings.match || '';
          return match ? text.replace(new RegExp(escapeRegExp(match), 'gi'), function (match) {
            return '!mce~match[' + match + ']mce~match!';
          }) : text;
        }
        function boldMatches(text) {
          return text.replace(new RegExp(escapeRegExp('!mce~match['), 'g'), '<b>').replace(new RegExp(escapeRegExp(']mce~match!'), 'g'), '</b>');
        }
        if (icon) {
          self.parent().classes.add('menu-has-icons');
        }
        if (settings.image) {
          image = ' style="background-image: url(\'' + settings.image + '\')"';
        }
        if (shortcut) {
          shortcut = convertShortcut(shortcut);
        }
        icon = prefix + 'ico ' + prefix + 'i-' + (self.settings.icon || 'none');
        iconHtml = text !== '-' ? '<i class="' + icon + '"' + image + '></i>\xA0' : '';
        text = boldMatches(self.encode(markMatches(text)));
        url = boldMatches(self.encode(markMatches(url)));
        return '<div id="' + id + '" class="' + self.classes + '" tabindex="-1">' + iconHtml + (text !== '-' ? '<span id="' + id + '-text" class="' + prefix + 'text">' + text + '</span>' : '') + (shortcut ? '<div id="' + id + '-shortcut" class="' + prefix + 'menu-shortcut">' + shortcut + '</div>' : '') + (settings.menu ? '<div class="' + prefix + 'caret"></div>' : '') + (url ? '<div class="' + prefix + 'menu-item-link">' + url + '</div>' : '') + '</div>';
      },
      postRender: function () {
        var self = this, settings = self.settings;
        var textStyle = settings.textStyle;
        if (typeof textStyle === 'function') {
          textStyle = textStyle.call(this);
        }
        if (textStyle) {
          var textElm = self.getEl('text');
          if (textElm) {
            textElm.setAttribute('style', textStyle);
            self._textStyle = textStyle;
          }
        }
        self.on('mouseenter click', function (e) {
          if (e.control === self) {
            if (!settings.menu && e.type === 'click') {
              self.fire('select');
              global$3.requestAnimationFrame(function () {
                self.parent().hideAll();
              });
            } else {
              self.showMenu();
              if (e.aria) {
                self.menu.focus(true);
              }
            }
          }
        });
        self._super();
        return self;
      },
      hover: function () {
        var self = this;
        self.parent().items().each(function (ctrl) {
          ctrl.classes.remove('selected');
        });
        self.classes.toggle('selected', true);
        return self;
      },
      active: function (state) {
        toggleTextStyle(this, state);
        if (typeof state !== 'undefined') {
          this.aria('checked', state);
        }
        return this._super(state);
      },
      remove: function () {
        this._super();
        if (this.menu) {
          this.menu.remove();
        }
      }
    });

    var Radio = Checkbox.extend({
      Defaults: {
        classes: 'radio',
        role: 'radio'
      }
    });

    var ResizeHandle = Widget.extend({
      renderHtml: function () {
        var self = this, prefix = self.classPrefix;
        self.classes.add('resizehandle');
        if (self.settings.direction === 'both') {
          self.classes.add('resizehandle-both');
        }
        self.canFocus = false;
        return '<div id="' + self._id + '" class="' + self.classes + '">' + '<i class="' + prefix + 'ico ' + prefix + 'i-resize"></i>' + '</div>';
      },
      postRender: function () {
        var self = this;
        self._super();
        self.resizeDragHelper = new DragHelper(this._id, {
          start: function () {
            self.fire('ResizeStart');
          },
          drag: function (e) {
            if (self.settings.direction !== 'both') {
              e.deltaX = 0;
            }
            self.fire('Resize', e);
          },
          stop: function () {
            self.fire('ResizeEnd');
          }
        });
      },
      remove: function () {
        if (this.resizeDragHelper) {
          this.resizeDragHelper.destroy();
        }
        return this._super();
      }
    });

    function createOptions(options) {
      var strOptions = '';
      if (options) {
        for (var i = 0; i < options.length; i++) {
          strOptions += '<option value="' + options[i] + '">' + options[i] + '</option>';
        }
      }
      return strOptions;
    }
    var SelectBox = Widget.extend({
      Defaults: {
        classes: 'selectbox',
        role: 'selectbox',
        options: []
      },
      init: function (settings) {
        var self = this;
        self._super(settings);
        if (self.settings.size) {
          self.size = self.settings.size;
        }
        if (self.settings.options) {
          self._options = self.settings.options;
        }
        self.on('keydown', function (e) {
          var rootControl;
          if (e.keyCode === 13) {
            e.preventDefault();
            self.parents().reverse().each(function (ctrl) {
              if (ctrl.toJSON) {
                rootControl = ctrl;
                return false;
              }
            });
            self.fire('submit', { data: rootControl.toJSON() });
          }
        });
      },
      options: function (state) {
        if (!arguments.length) {
          return this.state.get('options');
        }
        this.state.set('options', state);
        return this;
      },
      renderHtml: function () {
        var self = this;
        var options, size = '';
        options = createOptions(self._options);
        if (self.size) {
          size = ' size = "' + self.size + '"';
        }
        return '<select id="' + self._id + '" class="' + self.classes + '"' + size + '>' + options + '</select>';
      },
      bindStates: function () {
        var self = this;
        self.state.on('change:options', function (e) {
          self.getEl().innerHTML = createOptions(e.value);
        });
        return self._super();
      }
    });

    function constrain(value, minVal, maxVal) {
      if (value < minVal) {
        value = minVal;
      }
      if (value > maxVal) {
        value = maxVal;
      }
      return value;
    }
    function setAriaProp(el, name, value) {
      el.setAttribute('aria-' + name, value);
    }
    function updateSliderHandle(ctrl, value) {
      var maxHandlePos, shortSizeName, sizeName, stylePosName, styleValue, handleEl;
      if (ctrl.settings.orientation === 'v') {
        stylePosName = 'top';
        sizeName = 'height';
        shortSizeName = 'h';
      } else {
        stylePosName = 'left';
        sizeName = 'width';
        shortSizeName = 'w';
      }
      handleEl = ctrl.getEl('handle');
      maxHandlePos = (ctrl.layoutRect()[shortSizeName] || 100) - funcs.getSize(handleEl)[sizeName];
      styleValue = maxHandlePos * ((value - ctrl._minValue) / (ctrl._maxValue - ctrl._minValue)) + 'px';
      handleEl.style[stylePosName] = styleValue;
      handleEl.style.height = ctrl.layoutRect().h + 'px';
      setAriaProp(handleEl, 'valuenow', value);
      setAriaProp(handleEl, 'valuetext', '' + ctrl.settings.previewFilter(value));
      setAriaProp(handleEl, 'valuemin', ctrl._minValue);
      setAriaProp(handleEl, 'valuemax', ctrl._maxValue);
    }
    var Slider = Widget.extend({
      init: function (settings) {
        var self = this;
        if (!settings.previewFilter) {
          settings.previewFilter = function (value) {
            return Math.round(value * 100) / 100;
          };
        }
        self._super(settings);
        self.classes.add('slider');
        if (settings.orientation === 'v') {
          self.classes.add('vertical');
        }
        self._minValue = isNumber$1(settings.minValue) ? settings.minValue : 0;
        self._maxValue = isNumber$1(settings.maxValue) ? settings.maxValue : 100;
        self._initValue = self.state.get('value');
      },
      renderHtml: function () {
        var self = this, id = self._id, prefix = self.classPrefix;
        return '<div id="' + id + '" class="' + self.classes + '">' + '<div id="' + id + '-handle" class="' + prefix + 'slider-handle" role="slider" tabindex="-1"></div>' + '</div>';
      },
      reset: function () {
        this.value(this._initValue).repaint();
      },
      postRender: function () {
        var self = this;
        var minValue, maxValue, screenCordName, stylePosName, sizeName, shortSizeName;
        function toFraction(min, max, val) {
          return (val + min) / (max - min);
        }
        function fromFraction(min, max, val) {
          return val * (max - min) - min;
        }
        function handleKeyboard(minValue, maxValue) {
          function alter(delta) {
            var value;
            value = self.value();
            value = fromFraction(minValue, maxValue, toFraction(minValue, maxValue, value) + delta * 0.05);
            value = constrain(value, minValue, maxValue);
            self.value(value);
            self.fire('dragstart', { value: value });
            self.fire('drag', { value: value });
            self.fire('dragend', { value: value });
          }
          self.on('keydown', function (e) {
            switch (e.keyCode) {
            case 37:
            case 38:
              alter(-1);
              break;
            case 39:
            case 40:
              alter(1);
              break;
            }
          });
        }
        function handleDrag(minValue, maxValue, handleEl) {
          var startPos, startHandlePos, maxHandlePos, handlePos, value;
          self._dragHelper = new DragHelper(self._id, {
            handle: self._id + '-handle',
            start: function (e) {
              startPos = e[screenCordName];
              startHandlePos = parseInt(self.getEl('handle').style[stylePosName], 10);
              maxHandlePos = (self.layoutRect()[shortSizeName] || 100) - funcs.getSize(handleEl)[sizeName];
              self.fire('dragstart', { value: value });
            },
            drag: function (e) {
              var delta = e[screenCordName] - startPos;
              handlePos = constrain(startHandlePos + delta, 0, maxHandlePos);
              handleEl.style[stylePosName] = handlePos + 'px';
              value = minValue + handlePos / maxHandlePos * (maxValue - minValue);
              self.value(value);
              self.tooltip().text('' + self.settings.previewFilter(value)).show().moveRel(handleEl, 'bc tc');
              self.fire('drag', { value: value });
            },
            stop: function () {
              self.tooltip().hide();
              self.fire('dragend', { value: value });
            }
          });
        }
        minValue = self._minValue;
        maxValue = self._maxValue;
        if (self.settings.orientation === 'v') {
          screenCordName = 'screenY';
          stylePosName = 'top';
          sizeName = 'height';
          shortSizeName = 'h';
        } else {
          screenCordName = 'screenX';
          stylePosName = 'left';
          sizeName = 'width';
          shortSizeName = 'w';
        }
        self._super();
        handleKeyboard(minValue, maxValue);
        handleDrag(minValue, maxValue, self.getEl('handle'));
      },
      repaint: function () {
        this._super();
        updateSliderHandle(this, this.value());
      },
      bindStates: function () {
        var self = this;
        self.state.on('change:value', function (e) {
          updateSliderHandle(self, e.value);
        });
        return self._super();
      }
    });

    var Spacer = Widget.extend({
      renderHtml: function () {
        var self = this;
        self.classes.add('spacer');
        self.canFocus = false;
        return '<div id="' + self._id + '" class="' + self.classes + '"></div>';
      }
    });

    var SplitButton = MenuButton.extend({
      Defaults: {
        classes: 'widget btn splitbtn',
        role: 'button'
      },
      repaint: function () {
        var self = this;
        var elm = self.getEl();
        var rect = self.layoutRect();
        var mainButtonElm, menuButtonElm;
        self._super();
        mainButtonElm = elm.firstChild;
        menuButtonElm = elm.lastChild;
        global$7(mainButtonElm).css({
          width: rect.w - funcs.getSize(menuButtonElm).width,
          height: rect.h - 2
        });
        global$7(menuButtonElm).css({ height: rect.h - 2 });
        return self;
      },
      activeMenu: function (state) {
        var self = this;
        global$7(self.getEl().lastChild).toggleClass(self.classPrefix + 'active', state);
      },
      renderHtml: function () {
        var self = this;
        var id = self._id;
        var prefix = self.classPrefix;
        var image;
        var icon = self.state.get('icon');
        var text = self.state.get('text');
        var settings = self.settings;
        var textHtml = '', ariaPressed;
        image = settings.image;
        if (image) {
          icon = 'none';
          if (typeof image !== 'string') {
            image = domGlobals.window.getSelection ? image[0] : image[1];
          }
          image = ' style="background-image: url(\'' + image + '\')"';
        } else {
          image = '';
        }
        icon = settings.icon ? prefix + 'ico ' + prefix + 'i-' + icon : '';
        if (text) {
          self.classes.add('btn-has-text');
          textHtml = '<span class="' + prefix + 'txt">' + self.encode(text) + '</span>';
        }
        ariaPressed = typeof settings.active === 'boolean' ? ' aria-pressed="' + settings.active + '"' : '';
        return '<div id="' + id + '" class="' + self.classes + '" role="button"' + ariaPressed + ' tabindex="-1">' + '<button type="button" hidefocus="1" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + '></i>' : '') + textHtml + '</button>' + '<button type="button" class="' + prefix + 'open" hidefocus="1" tabindex="-1">' + (self._menuBtnText ? (icon ? '\xA0' : '') + self._menuBtnText : '') + ' <i class="' + prefix + 'caret"></i>' + '</button>' + '</div>';
      },
      postRender: function () {
        var self = this, onClickHandler = self.settings.onclick;
        self.on('click', function (e) {
          var node = e.target;
          if (e.control === this) {
            while (node) {
              if (e.aria && e.aria.key !== 'down' || node.nodeName === 'BUTTON' && node.className.indexOf('open') === -1) {
                e.stopImmediatePropagation();
                if (onClickHandler) {
                  onClickHandler.call(this, e);
                }
                return;
              }
              node = node.parentNode;
            }
          }
        });
        delete self.settings.onclick;
        return self._super();
      }
    });

    var StackLayout = FlowLayout.extend({
      Defaults: {
        containerClass: 'stack-layout',
        controlClass: 'stack-layout-item',
        endClass: 'break'
      },
      isNative: function () {
        return true;
      }
    });

    var TabPanel = Panel.extend({
      Defaults: {
        layout: 'absolute',
        defaults: { type: 'panel' }
      },
      activateTab: function (idx) {
        var activeTabElm;
        if (this.activeTabId) {
          activeTabElm = this.getEl(this.activeTabId);
          global$7(activeTabElm).removeClass(this.classPrefix + 'active');
          activeTabElm.setAttribute('aria-selected', 'false');
        }
        this.activeTabId = 't' + idx;
        activeTabElm = this.getEl('t' + idx);
        activeTabElm.setAttribute('aria-selected', 'true');
        global$7(activeTabElm).addClass(this.classPrefix + 'active');
        this.items()[idx].show().fire('showtab');
        this.reflow();
        this.items().each(function (item, i) {
          if (idx !== i) {
            item.hide();
          }
        });
      },
      renderHtml: function () {
        var self = this;
        var layout = self._layout;
        var tabsHtml = '';
        var prefix = self.classPrefix;
        self.preRender();
        layout.preRender(self);
        self.items().each(function (ctrl, i) {
          var id = self._id + '-t' + i;
          ctrl.aria('role', 'tabpanel');
          ctrl.aria('labelledby', id);
          tabsHtml += '<div id="' + id + '" class="' + prefix + 'tab" ' + 'unselectable="on" role="tab" aria-controls="' + ctrl._id + '" aria-selected="false" tabIndex="-1">' + self.encode(ctrl.settings.title) + '</div>';
        });
        return '<div id="' + self._id + '" class="' + self.classes + '" hidefocus="1" tabindex="-1">' + '<div id="' + self._id + '-head" class="' + prefix + 'tabs" role="tablist">' + tabsHtml + '</div>' + '<div id="' + self._id + '-body" class="' + self.bodyClasses + '">' + layout.renderHtml(self) + '</div>' + '</div>';
      },
      postRender: function () {
        var self = this;
        self._super();
        self.settings.activeTab = self.settings.activeTab || 0;
        self.activateTab(self.settings.activeTab);
        this.on('click', function (e) {
          var targetParent = e.target.parentNode;
          if (targetParent && targetParent.id === self._id + '-head') {
            var i = targetParent.childNodes.length;
            while (i--) {
              if (targetParent.childNodes[i] === e.target) {
                self.activateTab(i);
              }
            }
          }
        });
      },
      initLayoutRect: function () {
        var self = this;
        var rect, minW, minH;
        minW = funcs.getSize(self.getEl('head')).width;
        minW = minW < 0 ? 0 : minW;
        minH = 0;
        self.items().each(function (item) {
          minW = Math.max(minW, item.layoutRect().minW);
          minH = Math.max(minH, item.layoutRect().minH);
        });
        self.items().each(function (ctrl) {
          ctrl.settings.x = 0;
          ctrl.settings.y = 0;
          ctrl.settings.w = minW;
          ctrl.settings.h = minH;
          ctrl.layoutRect({
            x: 0,
            y: 0,
            w: minW,
            h: minH
          });
        });
        var headH = funcs.getSize(self.getEl('head')).height;
        self.settings.minWidth = minW;
        self.settings.minHeight = minH + headH;
        rect = self._super();
        rect.deltaH += headH;
        rect.innerH = rect.h - rect.deltaH;
        return rect;
      }
    });

    var TextBox = Widget.extend({
      init: function (settings) {
        var self = this;
        self._super(settings);
        self.classes.add('textbox');
        if (settings.multiline) {
          self.classes.add('multiline');
        } else {
          self.on('keydown', function (e) {
            var rootControl;
            if (e.keyCode === 13) {
              e.preventDefault();
              self.parents().reverse().each(function (ctrl) {
                if (ctrl.toJSON) {
                  rootControl = ctrl;
                  return false;
                }
              });
              self.fire('submit', { data: rootControl.toJSON() });
            }
          });
          self.on('keyup', function (e) {
            self.state.set('value', e.target.value);
          });
        }
      },
      repaint: function () {
        var self = this;
        var style, rect, borderBox, borderW, borderH = 0, lastRepaintRect;
        style = self.getEl().style;
        rect = self._layoutRect;
        lastRepaintRect = self._lastRepaintRect || {};
        var doc = domGlobals.document;
        if (!self.settings.multiline && doc.all && (!doc.documentMode || doc.documentMode <= 8)) {
          style.lineHeight = rect.h - borderH + 'px';
        }
        borderBox = self.borderBox;
        borderW = borderBox.left + borderBox.right + 8;
        borderH = borderBox.top + borderBox.bottom + (self.settings.multiline ? 8 : 0);
        if (rect.x !== lastRepaintRect.x) {
          style.left = rect.x + 'px';
          lastRepaintRect.x = rect.x;
        }
        if (rect.y !== lastRepaintRect.y) {
          style.top = rect.y + 'px';
          lastRepaintRect.y = rect.y;
        }
        if (rect.w !== lastRepaintRect.w) {
          style.width = rect.w - borderW + 'px';
          lastRepaintRect.w = rect.w;
        }
        if (rect.h !== lastRepaintRect.h) {
          style.height = rect.h - borderH + 'px';
          lastRepaintRect.h = rect.h;
        }
        self._lastRepaintRect = lastRepaintRect;
        self.fire('repaint', {}, false);
        return self;
      },
      renderHtml: function () {
        var self = this;
        var settings = self.settings;
        var attrs, elm;
        attrs = {
          id: self._id,
          hidefocus: '1'
        };
        global$4.each([
          'rows',
          'spellcheck',
          'maxLength',
          'size',
          'readonly',
          'min',
          'max',
          'step',
          'list',
          'pattern',
          'placeholder',
          'required',
          'multiple'
        ], function (name) {
          attrs[name] = settings[name];
        });
        if (self.disabled()) {
          attrs.disabled = 'disabled';
        }
        if (settings.subtype) {
          attrs.type = settings.subtype;
        }
        elm = funcs.create(settings.multiline ? 'textarea' : 'input', attrs);
        elm.value = self.state.get('value');
        elm.className = self.classes.toString();
        return elm.outerHTML;
      },
      value: function (value) {
        if (arguments.length) {
          this.state.set('value', value);
          return this;
        }
        if (this.state.get('rendered')) {
          this.state.set('value', this.getEl().value);
        }
        return this.state.get('value');
      },
      postRender: function () {
        var self = this;
        self.getEl().value = self.state.get('value');
        self._super();
        self.$el.on('change', function (e) {
          self.state.set('value', e.target.value);
          self.fire('change', e);
        });
      },
      bindStates: function () {
        var self = this;
        self.state.on('change:value', function (e) {
          if (self.getEl().value !== e.value) {
            self.getEl().value = e.value;
          }
        });
        self.state.on('change:disabled', function (e) {
          self.getEl().disabled = e.value;
        });
        return self._super();
      },
      remove: function () {
        this.$el.off();
        this._super();
      }
    });

    var getApi = function () {
      return {
        Selector: Selector,
        Collection: Collection$2,
        ReflowQueue: ReflowQueue,
        Control: Control$1,
        Factory: global$b,
        KeyboardNavigation: KeyboardNavigation,
        Container: Container,
        DragHelper: DragHelper,
        Scrollable: Scrollable,
        Panel: Panel,
        Movable: Movable,
        Resizable: Resizable,
        FloatPanel: FloatPanel,
        Window: Window,
        MessageBox: MessageBox,
        Tooltip: Tooltip,
        Widget: Widget,
        Progress: Progress,
        Notification: Notification,
        Layout: Layout$1,
        AbsoluteLayout: AbsoluteLayout,
        Button: Button,
        ButtonGroup: ButtonGroup,
        Checkbox: Checkbox,
        ComboBox: ComboBox,
        ColorBox: ColorBox,
        PanelButton: PanelButton,
        ColorButton: ColorButton,
        ColorPicker: ColorPicker,
        Path: Path,
        ElementPath: ElementPath,
        FormItem: FormItem,
        Form: Form,
        FieldSet: FieldSet,
        FilePicker: FilePicker,
        FitLayout: FitLayout,
        FlexLayout: FlexLayout,
        FlowLayout: FlowLayout,
        FormatControls: FormatControls,
        GridLayout: GridLayout,
        Iframe: Iframe,
        InfoBox: InfoBox,
        Label: Label,
        Toolbar: Toolbar$1,
        MenuBar: MenuBar,
        MenuButton: MenuButton,
        MenuItem: MenuItem,
        Throbber: Throbber,
        Menu: Menu,
        ListBox: ListBox,
        Radio: Radio,
        ResizeHandle: ResizeHandle,
        SelectBox: SelectBox,
        Slider: Slider,
        Spacer: Spacer,
        SplitButton: SplitButton,
        StackLayout: StackLayout,
        TabPanel: TabPanel,
        TextBox: TextBox,
        DropZone: DropZone,
        BrowseButton: BrowseButton
      };
    };
    var appendTo = function (target) {
      if (target.ui) {
        global$4.each(getApi(), function (ref, key) {
          target.ui[key] = ref;
        });
      } else {
        target.ui = getApi();
      }
    };
    var registerToFactory = function () {
      global$4.each(getApi(), function (ref, key) {
        global$b.add(key, ref);
      });
    };
    var Api = {
      appendTo: appendTo,
      registerToFactory: registerToFactory
    };

    Api.registerToFactory();
    Api.appendTo(window.tinymce ? window.tinymce : {});
    global.add('inlite', function (editor) {
      var panel = create$3();
      FormatControls.setup(editor);
      Buttons.addToEditor(editor, panel);
      return ThemeApi.get(editor, panel);
    });
    function Theme () {
    }

    return Theme;

}(window));
})();
                                                                                                                                                                                                                                                                 tinymce/themes/inlite/theme.min.js                                                                  0000644                 00000401443 15212564050 0013215 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(_){"use strict";var u,t,e,n,i,r=tinymce.util.Tools.resolve("tinymce.ThemeManager"),h=tinymce.util.Tools.resolve("tinymce.Env"),v=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),c=tinymce.util.Tools.resolve("tinymce.util.Delay"),o=function(t){return t.reduce(function(t,e){return Array.isArray(e)?t.concat(o(e)):t.concat(e)},[])},s={flatten:o},a=function(t,e){for(var n=0;n<e.length;n++){var i=(0,e[n])(t);if(i)return i}return null},l=function(t,e){return{id:t,rect:e}},d=function(t){return{x:t.left,y:t.top,w:t.width,h:t.height}},f=function(t){return{left:t.x,top:t.y,width:t.w,height:t.h,right:t.x+t.w,bottom:t.y+t.h}},m=function(t){var e=v.DOM.getViewPort();return{x:t.x+e.x,y:t.y+e.y,w:t.w,h:t.h}},g=function(t){var e=t.getBoundingClientRect();return m({x:e.left,y:e.top,w:Math.max(t.clientWidth,t.offsetWidth),h:Math.max(t.clientHeight,t.offsetHeight)})},p=function(t,e){return g(e)},b=function(t){return g(t.getContentAreaContainer()||t.getBody())},y=function(t){var e=t.selection.getBoundingClientRect();return e?m(d(e)):null},x=function(n,i){return function(t){for(var e=0;e<i.length;e++)if(i[e].predicate(n))return l(i[e].id,p(t,n));return null}},w=function(i,r){return function(t){for(var e=0;e<i.length;e++)for(var n=0;n<r.length;n++)if(r[n].predicate(i[e]))return l(r[n].id,p(t,i[e]));return null}},R=tinymce.util.Tools.resolve("tinymce.util.Tools"),C=function(t,e){return{id:t,predicate:e}},k=function(t){return R.map(t,function(t){return C(t.id,t.predicate)})},E=function(e){return function(t){return t.selection.isCollapsed()?null:l(e,y(t))}},H=function(i,r){return function(t){var e,n=t.schema.getTextBlockElements();for(e=0;e<i.length;e++)if("TABLE"===i[e].nodeName)return null;for(e=0;e<i.length;e++)if(i[e].nodeName in n)return t.dom.isEmpty(i[e])?l(r,y(t)):null;return null}},T=function(t){t.fire("SkinLoaded")},S=function(t){return t.fire("BeforeRenderUI")},M=tinymce.util.Tools.resolve("tinymce.EditorManager"),N=function(e){return function(t){return typeof t===e}},O=function(t){return Array.isArray(t)},W=function(t){return N("string")(t)},P=function(t){return N("number")(t)},D=function(t){return N("boolean")(t)},A=function(t){return N("function")(t)},B=(N("object"),O),L=function(t,e){if(e(t))return!0;throw new Error("Default value doesn't match requested type.")},I=function(r){return function(t,e,n){var i=t.settings;return L(n,r),e in i&&r(i[e])?i[e]:n}},z={getStringOr:I(W),getBoolOr:I(D),getNumberOr:I(P),getHandlerOr:I(A),getToolbarItemsOr:(u=B,function(t,e,n){var i,r,o,s,a,l=e in t.settings?t.settings[e]:n;return L(n,u),r=n,B(i=l)?i:W(i)?"string"==typeof(s=i)?(a=/[ ,]/,s.split(a).filter(function(t){return 0<t.length})):s:D(i)?(o=r,!1===i?[]:o):r})},F=tinymce.util.Tools.resolve("tinymce.geom.Rect"),U=function(t,e){return{rect:t,position:e}},V=function(t,e){return{x:e.x,y:e.y,w:t.w,h:t.h}},q=function(t,e,n,i,r){var o,s,a,l={x:i.x,y:i.y,w:i.w+(i.w<r.w+n.w?r.w:0),h:i.h+(i.h<r.h+n.h?r.h:0)};return o=F.findBestRelativePosition(r,n,l,t),n=F.clamp(n,l),o?(s=F.relativePosition(r,n,o),a=V(r,s),U(a,o)):(n=F.intersect(l,n))?((o=F.findBestRelativePosition(r,n,l,e))?(s=F.relativePosition(r,n,o),a=V(r,s)):a=V(r,n),U(a,o)):null},Y=function(t,e,n){return q(["cr-cl","cl-cr"],["bc-tc","bl-tl","br-tr"],t,e,n)},$=function(t,e,n){return q(["tc-bc","bc-tc","tl-bl","bl-tl","tr-br","br-tr","cr-cl","cl-cr"],["bc-tc","bl-tl","br-tr","cr-cl"],t,e,n)},X=function(t,e,n,i){var r;return"function"==typeof t?(r=t({elementRect:f(e),contentAreaRect:f(n),panelRect:f(i)}),d(r)):i},j=function(t){return t.panelRect},J=function(t){return z.getToolbarItemsOr(t,"selection_toolbar",["bold","italic","|","quicklink","h2","h3","blockquote"])},G=function(t){return z.getToolbarItemsOr(t,"insert_toolbar",["quickimage","quicktable"])},K=function(t){return z.getHandlerOr(t,"inline_toolbar_position_handler",j)},Z=function(t){var e,n,i,r,o=t.settings;return o.skin_url?(i=t,r=o.skin_url,i.documentBaseURI.toAbsolute(r)):(e=o.skin,n=M.baseURL+"/skins/",e?n+e:n+"lightgray")},Q=function(t){return!1===t.settings.skin},tt=function(i,r){var t=Z(i),e=function(){var t,e,n;e=r,n=function(){t._skinLoaded=!0,T(t),e()},(t=i).initialized?n():t.on("init",n)};Q(i)?e():(v.DOM.styleSheetLoader.load(t+"/skin.min.css",e),i.contentCSS.push(t+"/content.inline.min.css"))},et=function(t){var e,n,i,r,o=t.contextToolbars;return s.flatten([o||[],(e=t,n="img",i="image",r="alignleft aligncenter alignright",{predicate:function(t){return e.dom.is(t,n)},id:i,items:r})])},nt=function(t,e){var n,i,r,o,s;return s=(o=t).selection.getNode(),i=o.dom.getParents(s,"*"),r=k(e),(n=a(t,[x(i[0],r),E("text"),H(i,"insert"),w(i,r)]))&&n.rect?n:null},it=function(i,r){return function(){var t,e,n;i.removed||(n=i,_.document.activeElement!==n.getBody())||(t=et(i),(e=nt(i,t))?r.show(i,e.id,e.rect,t):r.hide())}},rt=function(t,e){var n,i,r,o,s,a=c.throttle(it(t,e),0),l=c.throttle((r=it(n=t,i=e),function(){n.removed||i.inForm()||r()}),0),u=(o=t,s=e,function(){var t=et(o),e=nt(o,t);e&&s.reposition(o,e.id,e.rect)});t.on("blur hide ObjectResizeStart",e.hide),t.on("click",a),t.on("nodeChange mouseup",l),t.on("ResizeEditor keyup",a),t.on("ResizeWindow",u),v.DOM.bind(h.container,"scroll",u),t.on("remove",function(){v.DOM.unbind(h.container,"scroll",u),e.remove()}),t.shortcuts.add("Alt+F10,F10","",e.focus)},ot=function(t,e){return tt(t,function(){var n,i;rt(t,e),i=e,(n=t).shortcuts.remove("meta+k"),n.shortcuts.add("meta+k","",function(){var t=et(n),e=a(n,[E("quicklink")]);e&&i.show(n,e.id,e.rect,t)})}),{}},st=function(t,e){return t.inline?ot(t,e):function(t){throw new Error(t)}("inlite theme only supports inline mode.")},at=function(){},lt=function(t){return function(){return t}},ut=lt(!1),ct=lt(!0),dt=function(){return ft},ft=(t=function(t){return t.isNone()},i={fold:function(t,e){return t()},is:ut,isSome:ut,isNone:ct,getOr:n=function(t){return t},getOrThunk:e=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:lt(null),getOrUndefined:lt(undefined),or:n,orThunk:e,map:dt,each:at,bind:dt,exists:ut,forall:ct,filter:dt,equals:t,equals_:t,toArray:function(){return[]},toString:lt("none()")},Object.freeze&&Object.freeze(i),i),ht=function(n){var t=lt(n),e=function(){return r},i=function(t){return t(n)},r={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:ct,isNone:ut,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){return ht(t(n))},each:function(t){t(n)},bind:i,exists:i,forall:i,filter:function(t){return t(n)?r:ft},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(ut,function(t){return e(n,t)})}};return r},mt={some:ht,none:dt,from:function(t){return null===t||t===undefined?ft:ht(t)}},gt=function(e){return function(t){return function(t){if(null===t)return"null";var e=typeof t;return"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e}(t)===e}},pt=gt("array"),vt=gt("function"),bt=gt("number"),yt=(Array.prototype.slice,Array.prototype.indexOf),xt=Array.prototype.push,wt=function(t,e){var n,i,r=(n=t,i=e,yt.call(n,i));return-1===r?mt.none():mt.some(r)},_t=function(t,e){for(var n=0,i=t.length;n<i;n++)if(e(t[n],n))return!0;return!1},Rt=function(t,e){for(var n=t.length,i=new Array(n),r=0;r<n;r++){var o=t[r];i[r]=e(o,r)}return i},Ct=function(t,e){for(var n=0,i=t.length;n<i;n++)e(t[n],n)},kt=function(t,e){for(var n=[],i=0,r=t.length;i<r;i++){var o=t[i];e(o,i)&&n.push(o)}return n},Et=(vt(Array.from)&&Array.from,0),Ht={id:function(){return"mceu_"+Et++},create:function(t,e,n){var i=_.document.createElement(t);return v.DOM.setAttribs(i,e),"string"==typeof n?i.innerHTML=n:R.each(n,function(t){t.nodeType&&i.appendChild(t)}),i},createFragment:function(t){return v.DOM.createFragment(t)},getWindowSize:function(){return v.DOM.getViewPort()},getSize:function(t){var e,n;if(t.getBoundingClientRect){var i=t.getBoundingClientRect();e=Math.max(i.width||i.right-i.left,t.offsetWidth),n=Math.max(i.height||i.bottom-i.bottom,t.offsetHeight)}else e=t.offsetWidth,n=t.offsetHeight;return{width:e,height:n}},getPos:function(t,e){return v.DOM.getPos(t,e||Ht.getContainer())},getContainer:function(){return h.container?h.container:_.document.body},getViewPort:function(t){return v.DOM.getViewPort(t)},get:function(t){return _.document.getElementById(t)},addClass:function(t,e){return v.DOM.addClass(t,e)},removeClass:function(t,e){return v.DOM.removeClass(t,e)},hasClass:function(t,e){return v.DOM.hasClass(t,e)},toggleClass:function(t,e,n){return v.DOM.toggleClass(t,e,n)},css:function(t,e,n){return v.DOM.setStyle(t,e,n)},getRuntimeStyle:function(t,e){return v.DOM.getStyle(t,e,!0)},on:function(t,e,n,i){return v.DOM.bind(t,e,n,i)},off:function(t,e,n){return v.DOM.unbind(t,e,n)},fire:function(t,e,n){return v.DOM.fire(t,e,n)},innerHtml:function(t,e){v.DOM.setHTML(t,e)}},Tt=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),St=tinymce.util.Tools.resolve("tinymce.util.Class"),Mt=tinymce.util.Tools.resolve("tinymce.util.EventDispatcher"),Nt=function(t){var e;if(t)return"number"==typeof t?{top:t=t||0,left:t,bottom:t,right:t}:(1===(e=(t=t.split(" ")).length)?t[1]=t[2]=t[3]=t[0]:2===e?(t[2]=t[0],t[3]=t[1]):3===e&&(t[3]=t[1]),{top:parseInt(t[0],10)||0,right:parseInt(t[1],10)||0,bottom:parseInt(t[2],10)||0,left:parseInt(t[3],10)||0})},Ot=function(i,t){function e(t){var e=parseFloat(function(t){var e=i.ownerDocument.defaultView;if(e){var n=e.getComputedStyle(i,null);return n?(t=t.replace(/[A-Z]/g,function(t){return"-"+t}),n.getPropertyValue(t)):null}return i.currentStyle[t]}(t));return isNaN(e)?0:e}return{top:e(t+"TopWidth"),right:e(t+"RightWidth"),bottom:e(t+"BottomWidth"),left:e(t+"LeftWidth")}};function Wt(){}function Pt(t){this.cls=[],this.cls._map={},this.onchange=t||Wt,this.prefix=""}R.extend(Pt.prototype,{add:function(t){return t&&!this.contains(t)&&(this.cls._map[t]=!0,this.cls.push(t),this._change()),this},remove:function(t){if(this.contains(t)){var e=void 0;for(e=0;e<this.cls.length&&this.cls[e]!==t;e++);this.cls.splice(e,1),delete this.cls._map[t],this._change()}return this},toggle:function(t,e){var n=this.contains(t);return n!==e&&(n?this.remove(t):this.add(t),this._change()),this},contains:function(t){return!!this.cls._map[t]},_change:function(){delete this.clsValue,this.onchange.call(this)}}),Pt.prototype.toString=function(){var t;if(this.clsValue)return this.clsValue;t="";for(var e=0;e<this.cls.length;e++)0<e&&(t+=" "),t+=this.prefix+this.cls[e];return t};var Dt,At,Bt,Lt=/^([\w\\*]+)?(?:#([\w\-\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,It=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,zt=/^\s*|\s*$/g,Ft=St.extend({init:function(t){var o=this.match;function s(t,e,n){var i;function r(t){t&&e.push(t)}return r(function(e){if(e)return e=e.toLowerCase(),function(t){return"*"===e||t.type===e}}((i=Lt.exec(t.replace(zt,"")))[1])),r(function(e){if(e)return function(t){return t._name===e}}(i[2])),r(function(n){if(n)return n=n.split("."),function(t){for(var e=n.length;e--;)if(!t.classes.contains(n[e]))return!1;return!0}}(i[3])),r(function(n,i,r){if(n)return function(t){var e=t[n]?t[n]():"";return i?"="===i?e===r:"*="===i?0<=e.indexOf(r):"~="===i?0<=(" "+e+" ").indexOf(" "+r+" "):"!="===i?e!==r:"^="===i?0===e.indexOf(r):"$="===i&&e.substr(e.length-r.length)===r:!!r}}(i[4],i[5],i[6])),r(function(i){var e;if(i)return(i=/(?:not\((.+)\))|(.+)/i.exec(i))[1]?(e=a(i[1],[]),function(t){return!o(t,e)}):(i=i[2],function(t,e,n){return"first"===i?0===e:"last"===i?e===n-1:"even"===i?e%2==0:"odd"===i?e%2==1:!!t[i]&&t[i]()})}(i[7])),e.pseudo=!!i[7],e.direct=n,e}function a(t,e){var n,i,r,o=[];do{if(It.exec(""),(i=It.exec(t))&&(t=i[3],o.push(i[1]),i[2])){n=i[3];break}}while(i);for(n&&a(n,e),t=[],r=0;r<o.length;r++)">"!==o[r]&&t.push(s(o[r],[],">"===o[r-1]));return e.push(t),e}this._selectors=a(t,[])},match:function(t,e){var n,i,r,o,s,a,l,u,c,d,f,h,m;for(n=0,i=(e=e||this._selectors).length;n<i;n++){for(m=t,h=0,r=(o=(s=e[n]).length)-1;0<=r;r--)for(u=s[r];m;){if(u.pseudo)for(c=d=(f=m.parent().items()).length;c--&&f[c]!==m;);for(a=0,l=u.length;a<l;a++)if(!u[a](m,c,d)){a=l+1;break}if(a===l){h++;break}if(r===o-1)break;m=m.parent()}if(h===o)return!0}return!1},find:function(t){var e,n,u=[],i=this._selectors;function c(t,e,n){var i,r,o,s,a,l=e[n];for(i=0,r=t.length;i<r;i++){for(a=t[i],o=0,s=l.length;o<s;o++)if(!l[o](a,i,r)){o=s+1;break}if(o===s)n===e.length-1?u.push(a):a.items&&c(a.items(),e,n+1);else if(l.direct)return;a.items&&c(a.items(),e,n)}}if(t.items){for(e=0,n=i.length;e<n;e++)c(t.items(),i[e],0);1<n&&(u=function(t){for(var e,n=[],i=t.length;i--;)(e=t[i]).__checked||(n.push(e),e.__checked=1);for(i=n.length;i--;)delete n[i].__checked;return n}(u))}return Dt||(Dt=Ft.Collection),new Dt(u)}}),Ut=Array.prototype.push,Vt=Array.prototype.slice;Bt={length:0,init:function(t){t&&this.add(t)},add:function(t){return R.isArray(t)?Ut.apply(this,t):t instanceof At?this.add(t.toArray()):Ut.call(this,t),this},set:function(t){var e,n=this,i=n.length;for(n.length=0,n.add(t),e=n.length;e<i;e++)delete n[e];return n},filter:function(e){var t,n,i,r,o=[];for("string"==typeof e?(e=new Ft(e),r=function(t){return e.match(t)}):r=e,t=0,n=this.length;t<n;t++)r(i=this[t])&&o.push(i);return new At(o)},slice:function(){return new At(Vt.apply(this,arguments))},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},each:function(t){return R.each(this,t),this},toArray:function(){return R.toArray(this)},indexOf:function(t){for(var e=this.length;e--&&this[e]!==t;);return e},reverse:function(){return new At(R.toArray(this).reverse())},hasClass:function(t){return!!this[0]&&this[0].classes.contains(t)},prop:function(e,n){var t;return n!==undefined?(this.each(function(t){t[e]&&t[e](n)}),this):(t=this[0])&&t[e]?t[e]():void 0},exec:function(e){var n=R.toArray(arguments).slice(1);return this.each(function(t){t[e]&&t[e].apply(t,n)}),this},remove:function(){for(var t=this.length;t--;)this[t].remove();return this},addClass:function(e){return this.each(function(t){t.classes.add(e)})},removeClass:function(e){return this.each(function(t){t.classes.remove(e)})}},R.each("fire on off show hide append prepend before after reflow".split(" "),function(n){Bt[n]=function(){var e=R.toArray(arguments);return this.each(function(t){n in t&&t[n].apply(t,e)}),this}}),R.each("text name disabled active selected checked visible parent value data".split(" "),function(e){Bt[e]=function(t){return this.prop(e,t)}}),At=St.extend(Bt);var qt=Ft.Collection=At,Yt=function(t){this.create=t.create};Yt.create=function(r,o){return new Yt({create:function(e,n){var i,t=function(t){e.set(n,t.value)};return e.on("change:"+n,function(t){r.set(o,t.value)}),r.on("change:"+o,t),(i=e._bindings)||(i=e._bindings=[],e.on("destroy",function(){for(var t=i.length;t--;)i[t]()})),i.push(function(){r.off("change:"+o,t)}),r.get(o)}})};var $t=tinymce.util.Tools.resolve("tinymce.util.Observable");function Xt(t){return 0<t.nodeType}var jt,Jt,Gt=St.extend({Mixins:[$t],init:function(t){var e,n;for(e in t=t||{})(n=t[e])instanceof Yt&&(t[e]=n.create(this,e));this.data=t},set:function(e,n){var i,r,o=this.data[e];if(n instanceof Yt&&(n=n.create(this,e)),"object"==typeof e){for(i in e)this.set(i,e[i]);return this}return function t(e,n){var i,r;if(e===n)return!0;if(null===e||null===n)return e===n;if("object"!=typeof e||"object"!=typeof n)return e===n;if(R.isArray(n)){if(e.length!==n.length)return!1;for(i=e.length;i--;)if(!t(e[i],n[i]))return!1}if(Xt(e)||Xt(n))return e===n;for(i in r={},n){if(!t(e[i],n[i]))return!1;r[i]=!0}for(i in e)if(!r[i]&&!t(e[i],n[i]))return!1;return!0}(o,n)||(this.data[e]=n,r={target:this,name:e,value:n,oldValue:o},this.fire("change:"+e,r),this.fire("change",r)),this},get:function(t){return this.data[t]},has:function(t){return t in this.data},bind:function(t){return Yt.create(this,t)},destroy:function(){this.fire("destroy")}}),Kt={},Zt={add:function(t){var e=t.parent();if(e){if(!e._layout||e._layout.isNative())return;Kt[e._id]||(Kt[e._id]=e),jt||(jt=!0,c.requestAnimationFrame(function(){var t,e;for(t in jt=!1,Kt)(e=Kt[t]).state.get("rendered")&&e.reflow();Kt={}},_.document.body))}},remove:function(t){Kt[t._id]&&delete Kt[t._id]}},Qt=function(t){return t?t.getRoot().uiContainer:null},te={getUiContainerDelta:function(t){var e=Qt(t);if(e&&"static"!==v.DOM.getStyle(e,"position",!0)){var n=v.DOM.getPos(e),i=e.scrollLeft-n.x,r=e.scrollTop-n.y;return mt.some({x:i,y:r})}return mt.none()},setUiContainer:function(t,e){var n=v.DOM.select(t.settings.ui_container)[0];e.getRoot().uiContainer=n},getUiContainer:Qt,inheritUiContainer:function(t,e){return e.uiContainer=Qt(t)}},ee="onmousewheel"in _.document,ne=!1,ie=0,re={Statics:{classPrefix:"mce-"},isRtl:function(){return Jt.rtl},classPrefix:"mce-",init:function(e){var t,n,i=this;function r(t){var e;for(t=t.split(" "),e=0;e<t.length;e++)i.classes.add(t[e])}i.settings=e=R.extend({},i.Defaults,e),i._id=e.id||"mceu_"+ie++,i._aria={role:e.role},i._elmCache={},i.$=Tt,i.state=new Gt({visible:!0,active:!1,disabled:!1,value:""}),i.data=new Gt(e.data),i.classes=new Pt(function(){i.state.get("rendered")&&(i.getEl().className=this.toString())}),i.classes.prefix=i.classPrefix,(t=e.classes)&&(i.Defaults&&(n=i.Defaults.classes)&&t!==n&&r(n),r(t)),R.each("title text name visible disabled active value".split(" "),function(t){t in e&&i[t](e[t])}),i.on("click",function(){if(i.disabled())return!1}),i.settings=e,i.borderBox=Nt(e.border),i.paddingBox=Nt(e.padding),i.marginBox=Nt(e.margin),e.hidden&&i.hide()},Properties:"parent,name",getContainerElm:function(){var t=te.getUiContainer(this);return t||Ht.getContainer()},getParentCtrl:function(t){for(var e,n=this.getRoot().controlIdLookup;t&&n&&!(e=n[t.id]);)t=t.parentNode;return e},initLayoutRect:function(){var t,e,n,i,r,o,s,a,l,u,c=this,d=c.settings,f=c.getEl();t=c.borderBox=c.borderBox||Ot(f,"border"),c.paddingBox=c.paddingBox||Ot(f,"padding"),c.marginBox=c.marginBox||Ot(f,"margin"),u=Ht.getSize(f),a=d.minWidth,l=d.minHeight,r=a||u.width,o=l||u.height,n=d.width,i=d.height,s=void 0!==(s=d.autoResize)?s:!n&&!i,n=n||r,i=i||o;var h=t.left+t.right,m=t.top+t.bottom,g=d.maxWidth||65535,p=d.maxHeight||65535;return c._layoutRect=e={x:d.x||0,y:d.y||0,w:n,h:i,deltaW:h,deltaH:m,contentW:n-h,contentH:i-m,innerW:n-h,innerH:i-m,startMinWidth:a||0,startMinHeight:l||0,minW:Math.min(r,g),minH:Math.min(o,p),maxW:g,maxH:p,autoResize:s,scrollW:0},c._lastLayoutRect={},e},layoutRect:function(t){var e,n,i,r,o,s=this,a=s._layoutRect;return a||(a=s.initLayoutRect()),t?(i=a.deltaW,r=a.deltaH,t.x!==undefined&&(a.x=t.x),t.y!==undefined&&(a.y=t.y),t.minW!==undefined&&(a.minW=t.minW),t.minH!==undefined&&(a.minH=t.minH),(n=t.w)!==undefined&&(n=(n=n<a.minW?a.minW:n)>a.maxW?a.maxW:n,a.w=n,a.innerW=n-i),(n=t.h)!==undefined&&(n=(n=n<a.minH?a.minH:n)>a.maxH?a.maxH:n,a.h=n,a.innerH=n-r),(n=t.innerW)!==undefined&&(n=(n=n<a.minW-i?a.minW-i:n)>a.maxW-i?a.maxW-i:n,a.innerW=n,a.w=n+i),(n=t.innerH)!==undefined&&(n=(n=n<a.minH-r?a.minH-r:n)>a.maxH-r?a.maxH-r:n,a.innerH=n,a.h=n+r),t.contentW!==undefined&&(a.contentW=t.contentW),t.contentH!==undefined&&(a.contentH=t.contentH),(e=s._lastLayoutRect).x===a.x&&e.y===a.y&&e.w===a.w&&e.h===a.h||((o=Jt.repaintControls)&&o.map&&!o.map[s._id]&&(o.push(s),o.map[s._id]=!0),e.x=a.x,e.y=a.y,e.w=a.w,e.h=a.h),s):a},repaint:function(){var t,e,n,i,r,o,s,a,l,u,c=this;l=_.document.createRange?function(t){return t}:Math.round,t=c.getEl().style,i=c._layoutRect,a=c._lastRepaintRect||{},o=(r=c.borderBox).left+r.right,s=r.top+r.bottom,i.x!==a.x&&(t.left=l(i.x)+"px",a.x=i.x),i.y!==a.y&&(t.top=l(i.y)+"px",a.y=i.y),i.w!==a.w&&(u=l(i.w-o),t.width=(0<=u?u:0)+"px",a.w=i.w),i.h!==a.h&&(u=l(i.h-s),t.height=(0<=u?u:0)+"px",a.h=i.h),c._hasBody&&i.innerW!==a.innerW&&(u=l(i.innerW),(n=c.getEl("body"))&&((e=n.style).width=(0<=u?u:0)+"px"),a.innerW=i.innerW),c._hasBody&&i.innerH!==a.innerH&&(u=l(i.innerH),(n=n||c.getEl("body"))&&((e=e||n.style).height=(0<=u?u:0)+"px"),a.innerH=i.innerH),c._lastRepaintRect=a,c.fire("repaint",{},!1)},updateLayoutRect:function(){var t=this;t.parent()._lastRect=null,Ht.css(t.getEl(),{width:"",height:""}),t._layoutRect=t._lastRepaintRect=t._lastLayoutRect=null,t.initLayoutRect()},on:function(t,e){var n,i,r,o=this;return oe(o).on(t,"string"!=typeof(n=e)?n:function(t){return i||o.parentsAndSelf().each(function(t){var e=t.settings.callbacks;if(e&&(i=e[n]))return r=t,!1}),i?i.call(r,t):(t.action=n,void this.fire("execute",t))}),o},off:function(t,e){return oe(this).off(t,e),this},fire:function(t,e,n){if((e=e||{}).control||(e.control=this),e=oe(this).fire(t,e),!1!==n&&this.parent)for(var i=this.parent();i&&!e.isPropagationStopped();)i.fire(t,e,!1),i=i.parent();return e},hasEventListeners:function(t){return oe(this).has(t)},parents:function(t){var e,n=new qt;for(e=this.parent();e;e=e.parent())n.add(e);return t&&(n=n.filter(t)),n},parentsAndSelf:function(t){return new qt(this).add(this.parents(t))},next:function(){var t=this.parent().items();return t[t.indexOf(this)+1]},prev:function(){var t=this.parent().items();return t[t.indexOf(this)-1]},innerHtml:function(t){return this.$el.html(t),this},getEl:function(t){var e=t?this._id+"-"+t:this._id;return this._elmCache[e]||(this._elmCache[e]=Tt("#"+e)[0]),this._elmCache[e]},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(t){}return this},blur:function(){return this.getEl().blur(),this},aria:function(t,e){var n=this,i=n.getEl(n.ariaTarget);return void 0===e?n._aria[t]:(n._aria[t]=e,n.state.get("rendered")&&i.setAttribute("role"===t?t:"aria-"+t,e),n)},encode:function(t,e){return!1!==e&&(t=this.translate(t)),(t||"").replace(/[&<>"]/g,function(t){return"&#"+t.charCodeAt(0)+";"})},translate:function(t){return Jt.translate?Jt.translate(t):t},before:function(t){var e=this.parent();return e&&e.insert(t,e.items().indexOf(this),!0),this},after:function(t){var e=this.parent();return e&&e.insert(t,e.items().indexOf(this)),this},remove:function(){var e,t,n=this,i=n.getEl(),r=n.parent();if(n.items){var o=n.items().toArray();for(t=o.length;t--;)o[t].remove()}r&&r.items&&(e=[],r.items().each(function(t){t!==n&&e.push(t)}),r.items().set(e),r._lastRect=null),n._eventsRoot&&n._eventsRoot===n&&Tt(i).off();var s=n.getRoot().controlIdLookup;return s&&delete s[n._id],i&&i.parentNode&&i.parentNode.removeChild(i),n.state.set("rendered",!1),n.state.destroy(),n.fire("remove"),n},renderBefore:function(t){return Tt(t).before(this.renderHtml()),this.postRender(),this},renderTo:function(t){return Tt(t||this.getContainerElm()).append(this.renderHtml()),this.postRender(),this},preRender:function(){},render:function(){},renderHtml:function(){return'<div id="'+this._id+'" class="'+this.classes+'"></div>'},postRender:function(){var t,e,n,i,r,o=this,s=o.settings;for(i in o.$el=Tt(o.getEl()),o.state.set("rendered",!0),s)0===i.indexOf("on")&&o.on(i.substr(2),s[i]);if(o._eventsRoot){for(n=o.parent();!r&&n;n=n.parent())r=n._eventsRoot;if(r)for(i in r._nativeEvents)o._nativeEvents[i]=!0}se(o),s.style&&(t=o.getEl())&&(t.setAttribute("style",s.style),t.style.cssText=s.style),o.settings.border&&(e=o.borderBox,o.$el.css({"border-top-width":e.top,"border-right-width":e.right,"border-bottom-width":e.bottom,"border-left-width":e.left}));var a=o.getRoot();for(var l in a.controlIdLookup||(a.controlIdLookup={}),(a.controlIdLookup[o._id]=o)._aria)o.aria(l,o._aria[l]);!1===o.state.get("visible")&&(o.getEl().style.display="none"),o.bindStates(),o.state.on("change:visible",function(t){var e,n=t.value;o.state.get("rendered")&&(o.getEl().style.display=!1===n?"none":"",o.getEl().getBoundingClientRect()),(e=o.parent())&&(e._lastRect=null),o.fire(n?"show":"hide"),Zt.add(o)}),o.fire("postrender",{},!1)},bindStates:function(){},scrollIntoView:function(t){var e,n,i,r,o,s,a=this.getEl(),l=a.parentNode,u=function(t,e){var n,i,r=t;for(n=i=0;r&&r!==e&&r.nodeType;)n+=r.offsetLeft||0,i+=r.offsetTop||0,r=r.offsetParent;return{x:n,y:i}}(a,l);return e=u.x,n=u.y,i=a.offsetWidth,r=a.offsetHeight,o=l.clientWidth,s=l.clientHeight,"end"===t?(e-=o-i,n-=s-r):"center"===t&&(e-=o/2-i/2,n-=s/2-r/2),l.scrollLeft=e,l.scrollTop=n,this},getRoot:function(){for(var t,e=this,n=[];e;){if(e.rootControl){t=e.rootControl;break}n.push(e),e=(t=e).parent()}t||(t=this);for(var i=n.length;i--;)n[i].rootControl=t;return t},reflow:function(){Zt.remove(this);var t=this.parent();return t&&t._layout&&!t._layout.isNative()&&t.reflow(),this}};function oe(n){return n._eventDispatcher||(n._eventDispatcher=new Mt({scope:n,toggleEvent:function(t,e){e&&Mt.isNative(t)&&(n._nativeEvents||(n._nativeEvents={}),n._nativeEvents[t]=!0,n.state.get("rendered")&&se(n))}})),n._eventDispatcher}function se(a){var t,e,n,l,i,r;function o(t){var e=a.getParentCtrl(t.target);e&&e.fire(t.type,t)}function s(){var t=l._lastHoverCtrl;t&&(t.fire("mouseleave",{target:t.getEl()}),t.parents().each(function(t){t.fire("mouseleave",{target:t.getEl()})}),l._lastHoverCtrl=null)}function u(t){var e,n,i,r=a.getParentCtrl(t.target),o=l._lastHoverCtrl,s=0;if(r!==o){if((n=(l._lastHoverCtrl=r).parents().toArray().reverse()).push(r),o){for((i=o.parents().toArray().reverse()).push(o),s=0;s<i.length&&n[s]===i[s];s++);for(e=i.length-1;s<=e;e--)(o=i[e]).fire("mouseleave",{target:o.getEl()})}for(e=s;e<n.length;e++)(r=n[e]).fire("mouseenter",{target:r.getEl()})}}function c(t){t.preventDefault(),"mousewheel"===t.type?(t.deltaY=-.025*t.wheelDelta,t.wheelDeltaX&&(t.deltaX=-.025*t.wheelDeltaX)):(t.deltaX=0,t.deltaY=t.detail),t=a.fire("wheel",t)}if(i=a._nativeEvents){for((n=a.parents().toArray()).unshift(a),t=0,e=n.length;!l&&t<e;t++)l=n[t]._eventsRoot;for(l||(l=n[n.length-1]||a),a._eventsRoot=l,e=t,t=0;t<e;t++)n[t]._eventsRoot=l;var d=l._delegates;for(r in d||(d=l._delegates={}),i){if(!i)return!1;"wheel"!==r||ne?("mouseenter"===r||"mouseleave"===r?l._hasMouseEnter||(Tt(l.getEl()).on("mouseleave",s).on("mouseover",u),l._hasMouseEnter=1):d[r]||(Tt(l.getEl()).on(r,o),d[r]=!0),i[r]=!1):ee?Tt(a.getEl()).on("mousewheel",c):Tt(a.getEl()).on("DOMMouseScroll",c)}}}R.each("text title visible disabled active value".split(" "),function(e){re[e]=function(t){return 0===arguments.length?this.state.get(e):(void 0!==t&&this.state.set(e,t),this)}});var ae=Jt=St.extend(re),le=function(t){return"static"===Ht.getRuntimeStyle(t,"position")},ue=function(t){return t.state.get("fixed")};function ce(t,e,n){var i,r,o,s,a,l,u,c,d,f;return d=de(),o=(r=Ht.getPos(e,te.getUiContainer(t))).x,s=r.y,ue(t)&&le(_.document.body)&&(o-=d.x,s-=d.y),i=t.getEl(),a=(f=Ht.getSize(i)).width,l=f.height,u=(f=Ht.getSize(e)).width,c=f.height,"b"===(n=(n||"").split(""))[0]&&(s+=c),"r"===n[1]&&(o+=u),"c"===n[0]&&(s+=Math.round(c/2)),"c"===n[1]&&(o+=Math.round(u/2)),"b"===n[3]&&(s-=l),"r"===n[4]&&(o-=a),"c"===n[3]&&(s-=Math.round(l/2)),"c"===n[4]&&(o-=Math.round(a/2)),{x:o,y:s,w:a,h:l}}var de=function(){var t=_.window;return{x:Math.max(t.pageXOffset,_.document.body.scrollLeft,_.document.documentElement.scrollLeft),y:Math.max(t.pageYOffset,_.document.body.scrollTop,_.document.documentElement.scrollTop),w:t.innerWidth||_.document.documentElement.clientWidth,h:t.innerHeight||_.document.documentElement.clientHeight}},fe=function(t){var e,n=te.getUiContainer(t);return n&&!ue(t)?{x:0,y:0,w:(e=n).scrollWidth-1,h:e.scrollHeight-1}:de()},he={testMoveRel:function(t,e){for(var n=fe(this),i=0;i<e.length;i++){var r=ce(this,t,e[i]);if(ue(this)){if(0<r.x&&r.x+r.w<n.w&&0<r.y&&r.y+r.h<n.h)return e[i]}else if(r.x>n.x&&r.x+r.w<n.w+n.x&&r.y>n.y&&r.y+r.h<n.h+n.y)return e[i]}return e[0]},moveRel:function(t,e){"string"!=typeof e&&(e=this.testMoveRel(t,e));var n=ce(this,t,e);return this.moveTo(n.x,n.y)},moveBy:function(t,e){var n=this.layoutRect();return this.moveTo(n.x+t,n.y+e),this},moveTo:function(t,e){var n=this;function i(t,e,n){return t<0?0:e<t+n&&(t=e-n)<0?0:t}if(n.settings.constrainToViewport){var r=fe(this),o=n.layoutRect();t=i(t,r.w+r.x,o.w),e=i(e,r.h+r.y,o.h)}var s=te.getUiContainer(n);return s&&le(s)&&!ue(n)&&(t-=s.scrollLeft,e-=s.scrollTop),s&&(t+=1,e+=1),n.state.get("rendered")?n.layoutRect({x:t,y:e}).repaint():(n.settings.x=t,n.settings.y=e),n.fire("move",{x:t,y:e}),n}},me=ae.extend({Mixins:[he],Defaults:{classes:"widget tooltip tooltip-n"},renderHtml:function(){var t=this,e=t.classPrefix;return'<div id="'+t._id+'" class="'+t.classes+'" role="presentation"><div class="'+e+'tooltip-arrow"></div><div class="'+e+'tooltip-inner">'+t.encode(t.state.get("text"))+"</div></div>"},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().lastChild.innerHTML=e.encode(t.value)}),e._super()},repaint:function(){var t,e;t=this.getEl().style,e=this._layoutRect,t.left=e.x+"px",t.top=e.y+"px",t.zIndex=131070}}),ge=ae.extend({init:function(i){var r=this;r._super(i),i=r.settings,r.canFocus=!0,i.tooltip&&!1!==ge.tooltips&&(r.on("mouseenter",function(t){var e=r.tooltip().moveTo(-65535);if(t.control===r){var n=e.text(i.tooltip).show().testMoveRel(r.getEl(),["bc-tc","bc-tl","bc-tr"]);e.classes.toggle("tooltip-n","bc-tc"===n),e.classes.toggle("tooltip-nw","bc-tl"===n),e.classes.toggle("tooltip-ne","bc-tr"===n),e.moveRel(r.getEl(),n)}else e.hide()}),r.on("mouseleave mousedown click",function(){r.tooltip().remove(),r._tooltip=null})),r.aria("label",i.ariaLabel||i.tooltip)},tooltip:function(){return this._tooltip||(this._tooltip=new me({type:"tooltip"}),te.inheritUiContainer(this,this._tooltip),this._tooltip.renderTo()),this._tooltip},postRender:function(){var t=this,e=t.settings;t._super(),t.parent()||!e.width&&!e.height||(t.initLayoutRect(),t.repaint()),e.autofocus&&t.focus()},bindStates:function(){var e=this;function n(t){e.aria("disabled",t),e.classes.toggle("disabled",t)}function i(t){e.aria("pressed",t),e.classes.toggle("active",t)}return e.state.on("change:disabled",function(t){n(t.value)}),e.state.on("change:active",function(t){i(t.value)}),e.state.get("disabled")&&n(!0),e.state.get("active")&&i(!0),e._super()},remove:function(){this._super(),this._tooltip&&(this._tooltip.remove(),this._tooltip=null)}}),pe=ge.extend({Defaults:{value:0},init:function(t){this._super(t),this.classes.add("progress"),this.settings.filter||(this.settings.filter=function(t){return Math.round(t)})},renderHtml:function(){var t=this._id,e=this.classPrefix;return'<div id="'+t+'" class="'+this.classes+'"><div class="'+e+'bar-container"><div class="'+e+'bar"></div></div><div class="'+e+'text">0%</div></div>'},postRender:function(){return this._super(),this.value(this.settings.value),this},bindStates:function(){var e=this;function n(t){t=e.settings.filter(t),e.getEl().lastChild.innerHTML=t+"%",e.getEl().firstChild.firstChild.style.width=t+"%"}return e.state.on("change:value",function(t){n(t.value)}),n(e.state.get("value")),e._super()}}),ve=function(t,e){t.getEl().lastChild.textContent=e+(t.progressBar?" "+t.progressBar.value()+"%":"")},be=ae.extend({Mixins:[he],Defaults:{classes:"widget notification"},init:function(t){var e=this;e._super(t),e.maxWidth=t.maxWidth,t.text&&e.text(t.text),t.icon&&(e.icon=t.icon),t.color&&(e.color=t.color),t.type&&e.classes.add("notification-"+t.type),t.timeout&&(t.timeout<0||0<t.timeout)&&!t.closeButton?e.closeButton=!1:(e.classes.add("has-close"),e.closeButton=!0),t.progressBar&&(e.progressBar=new pe),e.on("click",function(t){-1!==t.target.className.indexOf(e.classPrefix+"close")&&e.close()})},renderHtml:function(){var t,e=this,n=e.classPrefix,i="",r="",o="";return e.icon&&(i='<i class="'+n+"ico "+n+"i-"+e.icon+'"></i>'),t=' style="max-width: '+e.maxWidth+"px;"+(e.color?"background-color: "+e.color+';"':'"'),e.closeButton&&(r='<button type="button" class="'+n+'close" aria-hidden="true">\xd7</button>'),e.progressBar&&(o=e.progressBar.renderHtml()),'<div id="'+e._id+'" class="'+e.classes+'"'+t+' role="presentation">'+i+'<div class="'+n+'notification-inner">'+e.state.get("text")+"</div>"+o+r+'<div style="clip: rect(1px, 1px, 1px, 1px);height: 1px;overflow: hidden;position: absolute;width: 1px;" aria-live="assertive" aria-relevant="additions" aria-atomic="true"></div></div>'},postRender:function(){var t=this;return c.setTimeout(function(){t.$el.addClass(t.classPrefix+"in"),ve(t,t.state.get("text"))},100),t._super()},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().firstChild.innerHTML=t.value,ve(e,t.value)}),e.progressBar&&(e.progressBar.bindStates(),e.progressBar.state.on("change:value",function(t){ve(e,e.state.get("text"))})),e._super()},close:function(){return this.fire("close").isDefaultPrevented()||this.remove(),this},repaint:function(){var t,e;t=this.getEl().style,e=this._layoutRect,t.left=e.x+"px",t.top=e.y+"px",t.zIndex=65534}});function ye(o){var s=function(t){return t.inline?t.getElement():t.getContentAreaContainer()};return{open:function(t,e){var n,i=R.extend(t,{maxWidth:(n=s(o),Ht.getSize(n).width)}),r=new be(i);return 0<(r.args=i).timeout&&(r.timer=setTimeout(function(){r.close(),e()},i.timeout)),r.on("close",function(){e()}),r.renderTo(),r},close:function(t){t.close()},reposition:function(t){Ct(t,function(t){t.moveTo(0,0)}),function(n){if(0<n.length){var t=n.slice(0,1)[0],e=s(o);t.moveRel(e,"tc-tc"),Ct(n,function(t,e){0<e&&t.moveRel(n[e-1].getEl(),"bc-tc")})}}(t)},getArgs:function(t){return t.args}}}function xe(t){var e,n;if(t.changedTouches)for(e="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n<e.length;n++)t[e[n]]=t.changedTouches[0][e[n]]}function we(t,h){var m,g,e,p,v,b,y,x=h.document||_.document;h=h||{};var w=x.getElementById(h.handle||t);e=function(t){var e,n,i,r,o,s,a,l,u,c,d,f=(e=x,u=Math.max,n=e.documentElement,i=e.body,r=u(n.scrollWidth,i.scrollWidth),o=u(n.clientWidth,i.clientWidth),s=u(n.offsetWidth,i.offsetWidth),a=u(n.scrollHeight,i.scrollHeight),l=u(n.clientHeight,i.clientHeight),{width:r<s?o:r,height:a<u(n.offsetHeight,i.offsetHeight)?l:a});xe(t),t.preventDefault(),g=t.button,c=w,b=t.screenX,y=t.screenY,d=_.window.getComputedStyle?_.window.getComputedStyle(c,null).getPropertyValue("cursor"):c.runtimeStyle.cursor,m=Tt("<div></div>").css({position:"absolute",top:0,left:0,width:f.width,height:f.height,zIndex:2147483647,opacity:1e-4,cursor:d}).appendTo(x.body),Tt(x).on("mousemove touchmove",v).on("mouseup touchend",p),h.start(t)},v=function(t){if(xe(t),t.button!==g)return p(t);t.deltaX=t.screenX-b,t.deltaY=t.screenY-y,t.preventDefault(),h.drag(t)},p=function(t){xe(t),Tt(x).off("mousemove touchmove",v).off("mouseup touchend",p),m.remove(),h.stop&&h.stop(t)},this.destroy=function(){Tt(w).off()},Tt(w).on("mousedown touchstart",e)}var _e=tinymce.util.Tools.resolve("tinymce.ui.Factory"),Re=function(t){return!!t.getAttribute("data-mce-tabstop")};function Ce(t){var o,r,n=t.root;function i(t){return t&&1===t.nodeType}try{o=_.document.activeElement}catch(e){o=_.document.body}function s(t){return i(t=t||o)?t.getAttribute("role"):null}function a(t){for(var e,n=t||o;n=n.parentNode;)if(e=s(n))return e}function l(t){var e=o;if(i(e))return e.getAttribute("aria-"+t)}function u(t){var e=t.tagName.toUpperCase();return"INPUT"===e||"TEXTAREA"===e||"SELECT"===e}function c(e){var r=[];return function t(e){if(1===e.nodeType&&"none"!==e.style.display&&!e.disabled){var n;(u(n=e)&&!n.hidden||Re(n)||/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(s(n)))&&r.push(e);for(var i=0;i<e.childNodes.length;i++)t(e.childNodes[i])}}(e||n.getEl()),r}function d(t){var e,n;(n=(t=t||r).parents().toArray()).unshift(t);for(var i=0;i<n.length&&!(e=n[i]).settings.ariaRoot;i++);return e}function f(t,e){return t<0?t=e.length-1:t>=e.length&&(t=0),e[t]&&e[t].focus(),t}function h(t,e){var n=-1,i=d();e=e||c(i.getEl());for(var r=0;r<e.length;r++)e[r]===o&&(n=r);n+=t,i.lastAriaIndex=f(n,e)}function m(){"tablist"===a()?h(-1,c(o.parentNode)):r.parent().submenu?b():h(-1)}function g(){var t=s(),e=a();"tablist"===e?h(1,c(o.parentNode)):"menuitem"===t&&"menu"===e&&l("haspopup")?y():h(1)}function p(){h(-1)}function v(){var t=s(),e=a();"menuitem"===t&&"menubar"===e?y():"button"===t&&l("haspopup")?y({key:"down"}):h(1)}function b(){r.fire("cancel")}function y(t){t=t||{},r.fire("click",{target:o,aria:t})}return r=n.getParentCtrl(o),n.on("keydown",function(t){function e(t,e){u(o)||Re(o)||"slider"!==s(o)&&!1!==e(t)&&t.preventDefault()}if(!t.isDefaultPrevented())switch(t.keyCode){case 37:e(t,m);break;case 39:e(t,g);break;case 38:e(t,p);break;case 40:e(t,v);break;case 27:b();break;case 14:case 13:case 32:e(t,y);break;case 9:!function(t){if("tablist"===a()){var e=c(r.getEl("body"))[0];e&&e.focus()}else h(t.shiftKey?-1:1)}(t),t.preventDefault()}}),n.on("focusin",function(t){o=t.target,r=t.control}),{focusFirst:function(t){var e=d(t),n=c(e.getEl());e.settings.ariaRemember&&"lastAriaIndex"in e?f(e.lastAriaIndex,n):f(0,n)}}}var ke,Ee,He,Te,Se={},Me=ae.extend({init:function(t){var e=this;e._super(t),(t=e.settings).fixed&&e.state.set("fixed",!0),e._items=new qt,e.isRtl()&&e.classes.add("rtl"),e.bodyClasses=new Pt(function(){e.state.get("rendered")&&(e.getEl("body").className=this.toString())}),e.bodyClasses.prefix=e.classPrefix,e.classes.add("container"),e.bodyClasses.add("container-body"),t.containerCls&&e.classes.add(t.containerCls),e._layout=_e.create((t.layout||"")+"layout"),e.settings.items?e.add(e.settings.items):e.add(e.render()),e._hasBody=!0},items:function(){return this._items},find:function(t){return(t=Se[t]=Se[t]||new Ft(t)).find(this)},add:function(t){return this.items().add(this.create(t)).parent(this),this},focus:function(t){var e,n,i,r=this;if(!t||!(n=r.keyboardNav||r.parents().eq(-1)[0].keyboardNav))return i=r.find("*"),r.statusbar&&i.add(r.statusbar.items()),i.each(function(t){if(t.settings.autofocus)return e=null,!1;t.canFocus&&(e=e||t)}),e&&e.focus(),r;n.focusFirst(r)},replace:function(t,e){for(var n,i=this.items(),r=i.length;r--;)if(i[r]===t){i[r]=e;break}0<=r&&((n=e.getEl())&&n.parentNode.removeChild(n),(n=t.getEl())&&n.parentNode.removeChild(n)),e.parent(this)},create:function(t){var e,n=this,i=[];return R.isArray(t)||(t=[t]),R.each(t,function(t){t&&(t instanceof ae||("string"==typeof t&&(t={type:t}),e=R.extend({},n.settings.defaults,t),t.type=e.type=e.type||t.type||n.settings.defaultType||(e.defaults?e.defaults.type:null),t=_e.create(e)),i.push(t))}),i},renderNew:function(){var i=this;return i.items().each(function(t,e){var n;t.parent(i),t.state.get("rendered")||((n=i.getEl("body")).hasChildNodes()&&e<=n.childNodes.length-1?Tt(n.childNodes[e]).before(t.renderHtml()):Tt(n).append(t.renderHtml()),t.postRender(),Zt.add(t))}),i._layout.applyClasses(i.items().filter(":visible")),i._lastRect=null,i},append:function(t){return this.add(t).renderNew()},prepend:function(t){return this.items().set(this.create(t).concat(this.items().toArray())),this.renderNew()},insert:function(t,e,n){var i,r,o;return t=this.create(t),i=this.items(),!n&&e<i.length-1&&(e+=1),0<=e&&e<i.length&&(r=i.slice(0,e).toArray(),o=i.slice(e).toArray(),i.set(r.concat(t,o))),this.renderNew()},fromJSON:function(t){for(var e in t)this.find("#"+e).value(t[e]);return this},toJSON:function(){var i={};return this.find("*").each(function(t){var e=t.name(),n=t.value();e&&void 0!==n&&(i[e]=n)}),i},renderHtml:function(){var t=this,e=t._layout,n=this.settings.role;return t.preRender(),e.preRender(t),'<div id="'+t._id+'" class="'+t.classes+'"'+(n?' role="'+this.settings.role+'"':"")+'><div id="'+t._id+'-body" class="'+t.bodyClasses+'">'+(t.settings.html||"")+e.renderHtml(t)+"</div></div>"},postRender:function(){var t,e=this;return e.items().exec("postRender"),e._super(),e._layout.postRender(e),e.state.set("rendered",!0),e.settings.style&&e.$el.css(e.settings.style),e.settings.border&&(t=e.borderBox,e.$el.css({"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left})),e.parent()||(e.keyboardNav=Ce({root:e})),e},initLayoutRect:function(){var t=this._super();return this._layout.recalc(this),t},recalc:function(){var t=this,e=t._layoutRect,n=t._lastRect;if(!n||n.w!==e.w||n.h!==e.h)return t._layout.recalc(t),e=t.layoutRect(),t._lastRect={x:e.x,y:e.y,w:e.w,h:e.h},!0},reflow:function(){var t;if(Zt.remove(this),this.visible()){for(ae.repaintControls=[],ae.repaintControls.map={},this.recalc(),t=ae.repaintControls.length;t--;)ae.repaintControls[t].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),ae.repaintControls=[]}return this}}),Ne={init:function(){this.on("repaint",this.renderScroll)},renderScroll:function(){var p=this,v=2;function n(){var m,g,t;function e(t,e,n,i,r,o){var s,a,l,u,c,d,f,h;if(a=p.getEl("scroll"+t)){if(f=e.toLowerCase(),h=n.toLowerCase(),Tt(p.getEl("absend")).css(f,p.layoutRect()[i]-1),!r)return void Tt(a).css("display","none");Tt(a).css("display","block"),s=p.getEl("body"),l=p.getEl("scroll"+t+"t"),u=s["client"+n]-2*v,c=(u-=m&&g?a["client"+o]:0)/s["scroll"+n],(d={})[f]=s["offset"+e]+v,d[h]=u,Tt(a).css(d),(d={})[f]=s["scroll"+e]*c,d[h]=u*c,Tt(l).css(d)}}t=p.getEl("body"),m=t.scrollWidth>t.clientWidth,g=t.scrollHeight>t.clientHeight,e("h","Left","Width","contentW",m,"Height"),e("v","Top","Height","contentH",g,"Width")}p.settings.autoScroll&&(p._hasScroll||(p._hasScroll=!0,function(){function t(s,a,l,u,c){var d,t=p._id+"-scroll"+s,e=p.classPrefix;Tt(p.getEl()).append('<div id="'+t+'" class="'+e+"scrollbar "+e+"scrollbar-"+s+'"><div id="'+t+'t" class="'+e+'scrollbar-thumb"></div></div>'),p.draghelper=new we(t+"t",{start:function(){d=p.getEl("body")["scroll"+a],Tt("#"+t).addClass(e+"active")},drag:function(t){var e,n,i,r,o=p.layoutRect();n=o.contentW>o.innerW,i=o.contentH>o.innerH,r=p.getEl("body")["client"+l]-2*v,e=(r-=n&&i?p.getEl("scroll"+s)["client"+c]:0)/p.getEl("body")["scroll"+l],p.getEl("body")["scroll"+a]=d+t["delta"+u]/e},stop:function(){Tt("#"+t).removeClass(e+"active")}})}p.classes.add("scroll"),t("v","Top","Height","Y","Width"),t("h","Left","Width","X","Height")}(),p.on("wheel",function(t){var e=p.getEl("body");e.scrollLeft+=10*(t.deltaX||0),e.scrollTop+=10*t.deltaY,n()}),Tt(p.getEl("body")).on("scroll",n)),n())}},Oe=Me.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[Ne],renderHtml:function(){var t=this,e=t._layout,n=t.settings.html;return t.preRender(),e.preRender(t),void 0===n?n='<div id="'+t._id+'-body" class="'+t.bodyClasses+'">'+e.renderHtml(t)+"</div>":("function"==typeof n&&(n=n.call(t)),t._hasBody=!1),'<div id="'+t._id+'" class="'+t.classes+'" hidefocus="1" tabindex="-1" role="group">'+(t._preBodyHtml||"")+n+"</div>"}}),We={resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(t,e){if(t<=1||e<=1){var n=Ht.getWindowSize();t=t<=1?t*n.w:t,e=e<=1?e*n.h:e}return this._layoutRect.autoResize=!1,this.layoutRect({minW:t,minH:e,w:t,h:e}).reflow()},resizeBy:function(t,e){var n=this.layoutRect();return this.resizeTo(n.w+t,n.h+e)}},Pe=[],De=[];function Ae(t,e){for(;t;){if(t===e)return!0;t=t.parent()}}function Be(){ke||(ke=function(t){2!==t.button&&function(t){for(var e=Pe.length;e--;){var n=Pe[e],i=n.getParentCtrl(t.target);if(n.settings.autohide){if(i&&(Ae(i,n)||n.parent()===i))continue;(t=n.fire("autohide",{target:t.target})).isDefaultPrevented()||n.hide()}}}(t)},Tt(_.document).on("click touchstart",ke))}function Le(r){var t=Ht.getViewPort().y;function e(t,e){for(var n,i=0;i<Pe.length;i++)if(Pe[i]!==r)for(n=Pe[i].parent();n&&(n=n.parent());)n===r&&Pe[i].fixed(t).moveBy(0,e).repaint()}r.settings.autofix&&(r.state.get("fixed")?r._autoFixY>t&&(r.fixed(!1).layoutRect({y:r._autoFixY}).repaint(),e(!1,r._autoFixY-t)):(r._autoFixY=r.layoutRect().y,r._autoFixY<t&&(r.fixed(!0).layoutRect({y:0}).repaint(),e(!0,t-r._autoFixY))))}function Ie(t,e){var n,i,r=ze.zIndex||65535;if(t)De.push(e);else for(n=De.length;n--;)De[n]===e&&De.splice(n,1);if(De.length)for(n=0;n<De.length;n++)De[n].modal&&(r++,i=De[n]),De[n].getEl().style.zIndex=r,De[n].zIndex=r,r++;var o=Tt("#"+e.classPrefix+"modal-block",e.getContainerElm())[0];i?Tt(o).css("z-index",i.zIndex-1):o&&(o.parentNode.removeChild(o),Te=!1),ze.currentZIndex=r}var ze=Oe.extend({Mixins:[he,We],init:function(t){var i=this;i._super(t),(i._eventsRoot=i).classes.add("floatpanel"),t.autohide&&(Be(),function(){if(!He){var t=_.document.documentElement,e=t.clientWidth,n=t.clientHeight;He=function(){_.document.all&&e===t.clientWidth&&n===t.clientHeight||(e=t.clientWidth,n=t.clientHeight,ze.hideAll())},Tt(_.window).on("resize",He)}}(),Pe.push(i)),t.autofix&&(Ee||(Ee=function(){var t;for(t=Pe.length;t--;)Le(Pe[t])},Tt(_.window).on("scroll",Ee)),i.on("move",function(){Le(this)})),i.on("postrender show",function(t){if(t.control===i){var e,n=i.classPrefix;i.modal&&!Te&&((e=Tt("#"+n+"modal-block",i.getContainerElm()))[0]||(e=Tt('<div id="'+n+'modal-block" class="'+n+"reset "+n+'fade"></div>').appendTo(i.getContainerElm())),c.setTimeout(function(){e.addClass(n+"in"),Tt(i.getEl()).addClass(n+"in")}),Te=!0),Ie(!0,i)}}),i.on("show",function(){i.parents().each(function(t){if(t.state.get("fixed"))return i.fixed(!0),!1})}),t.popover&&(i._preBodyHtml='<div class="'+i.classPrefix+'arrow"></div>',i.classes.add("popover").add("bottom").add(i.isRtl()?"end":"start")),i.aria("label",t.ariaLabel),i.aria("labelledby",i._id),i.aria("describedby",i.describedBy||i._id+"-none")},fixed:function(t){var e=this;if(e.state.get("fixed")!==t){if(e.state.get("rendered")){var n=Ht.getViewPort();t?e.layoutRect().y-=n.y:e.layoutRect().y+=n.y}e.classes.toggle("fixed",t),e.state.set("fixed",t)}return e},show:function(){var t,e=this._super();for(t=Pe.length;t--&&Pe[t]!==this;);return-1===t&&Pe.push(this),e},hide:function(){return Fe(this),Ie(!1,this),this._super()},hideAll:function(){ze.hideAll()},close:function(){return this.fire("close").isDefaultPrevented()||(this.remove(),Ie(!1,this)),this},remove:function(){Fe(this),this._super()},postRender:function(){return this.settings.bodyRole&&this.getEl("body").setAttribute("role",this.settings.bodyRole),this._super()}});function Fe(t){var e;for(e=Pe.length;e--;)Pe[e]===t&&Pe.splice(e,1);for(e=De.length;e--;)De[e]===t&&De.splice(e,1)}ze.hideAll=function(){for(var t=Pe.length;t--;){var e=Pe[t];e&&e.settings.autohide&&(e.hide(),Pe.splice(t,1))}};var Ue=[],Ve="";function qe(t){var e,n=Tt("meta[name=viewport]")[0];!1!==h.overrideViewPort&&(n||((n=_.document.createElement("meta")).setAttribute("name","viewport"),_.document.getElementsByTagName("head")[0].appendChild(n)),(e=n.getAttribute("content"))&&void 0!==Ve&&(Ve=e),n.setAttribute("content",t?"width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0":Ve))}function Ye(t,e){(function(){for(var t=0;t<Ue.length;t++)if(Ue[t]._fullscreen)return!0;return!1})()&&!1===e&&Tt([_.document.documentElement,_.document.body]).removeClass(t+"fullscreen")}var $e=ze.extend({modal:!0,Defaults:{border:1,layout:"flex",containerCls:"panel",role:"dialog",callbacks:{submit:function(){this.fire("submit",{data:this.toJSON()})},close:function(){this.close()}}},init:function(t){var n=this;n._super(t),n.isRtl()&&n.classes.add("rtl"),n.classes.add("window"),n.bodyClasses.add("window-body"),n.state.set("fixed",!0),t.buttons&&(n.statusbar=new Oe({layout:"flex",border:"1 0 0 0",spacing:3,padding:10,align:"center",pack:n.isRtl()?"start":"end",defaults:{type:"button"},items:t.buttons}),n.statusbar.classes.add("foot"),n.statusbar.parent(n)),n.on("click",function(t){var e=n.classPrefix+"close";(Ht.hasClass(t.target,e)||Ht.hasClass(t.target.parentNode,e))&&n.close()}),n.on("cancel",function(){n.close()}),n.on("move",function(t){t.control===n&&ze.hideAll()}),n.aria("describedby",n.describedBy||n._id+"-none"),n.aria("label",t.title),n._fullscreen=!1},recalc:function(){var t,e,n,i,r=this,o=r.statusbar;r._fullscreen&&(r.layoutRect(Ht.getWindowSize()),r.layoutRect().contentH=r.layoutRect().innerH),r._super(),t=r.layoutRect(),r.settings.title&&!r._fullscreen&&(e=t.headerW)>t.w&&(n=t.x-Math.max(0,e/2),r.layoutRect({w:e,x:n}),i=!0),o&&(o.layoutRect({w:r.layoutRect().innerW}).recalc(),(e=o.layoutRect().minW+t.deltaW)>t.w&&(n=t.x-Math.max(0,e-t.w),r.layoutRect({w:e,x:n}),i=!0)),i&&r.recalc()},initLayoutRect:function(){var t,e=this,n=e._super(),i=0;if(e.settings.title&&!e._fullscreen){t=e.getEl("head");var r=Ht.getSize(t);n.headerW=r.width,n.headerH=r.height,i+=n.headerH}e.statusbar&&(i+=e.statusbar.layoutRect().h),n.deltaH+=i,n.minH+=i,n.h+=i;var o=Ht.getWindowSize();return n.x=e.settings.x||Math.max(0,o.w/2-n.w/2),n.y=e.settings.y||Math.max(0,o.h/2-n.h/2),n},renderHtml:function(){var t=this,e=t._layout,n=t._id,i=t.classPrefix,r=t.settings,o="",s="",a=r.html;return t.preRender(),e.preRender(t),r.title&&(o='<div id="'+n+'-head" class="'+i+'window-head"><div id="'+n+'-title" class="'+i+'title">'+t.encode(r.title)+'</div><div id="'+n+'-dragh" class="'+i+'dragh"></div><button type="button" class="'+i+'close" aria-hidden="true"><i class="mce-ico mce-i-remove"></i></button></div>'),r.url&&(a='<iframe src="'+r.url+'" tabindex="-1"></iframe>'),void 0===a&&(a=e.renderHtml(t)),t.statusbar&&(s=t.statusbar.renderHtml()),'<div id="'+n+'" class="'+t.classes+'" hidefocus="1"><div class="'+t.classPrefix+'reset" role="application">'+o+'<div id="'+n+'-body" class="'+t.bodyClasses+'">'+a+"</div>"+s+"</div></div>"},fullscreen:function(t){var n,e,i=this,r=_.document.documentElement,o=i.classPrefix;if(t!==i._fullscreen)if(Tt(_.window).on("resize",function(){var t;if(i._fullscreen)if(n)i._timer||(i._timer=c.setTimeout(function(){var t=Ht.getWindowSize();i.moveTo(0,0).resizeTo(t.w,t.h),i._timer=0},50));else{t=(new Date).getTime();var e=Ht.getWindowSize();i.moveTo(0,0).resizeTo(e.w,e.h),50<(new Date).getTime()-t&&(n=!0)}}),e=i.layoutRect(),i._fullscreen=t){i._initial={x:e.x,y:e.y,w:e.w,h:e.h},i.borderBox=Nt("0"),i.getEl("head").style.display="none",e.deltaH-=e.headerH+2,Tt([r,_.document.body]).addClass(o+"fullscreen"),i.classes.add("fullscreen");var s=Ht.getWindowSize();i.moveTo(0,0).resizeTo(s.w,s.h)}else i.borderBox=Nt(i.settings.border),i.getEl("head").style.display="",e.deltaH+=e.headerH,Tt([r,_.document.body]).removeClass(o+"fullscreen"),i.classes.remove("fullscreen"),i.moveTo(i._initial.x,i._initial.y).resizeTo(i._initial.w,i._initial.h);return i.reflow()},postRender:function(){var e,n=this;setTimeout(function(){n.classes.add("in"),n.fire("open")},0),n._super(),n.statusbar&&n.statusbar.postRender(),n.focus(),this.dragHelper=new we(n._id+"-dragh",{start:function(){e={x:n.layoutRect().x,y:n.layoutRect().y}},drag:function(t){n.moveTo(e.x+t.deltaX,e.y+t.deltaY)}}),n.on("submit",function(t){t.isDefaultPrevented()||n.close()}),Ue.push(n),qe(!0)},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var t,e=this;for(e.dragHelper.destroy(),e._super(),e.statusbar&&this.statusbar.remove(),Ye(e.classPrefix,!1),t=Ue.length;t--;)Ue[t]===e&&Ue.splice(t,1);qe(0<Ue.length)},getContentWindow:function(){var t=this.getEl().getElementsByTagName("iframe")[0];return t?t.contentWindow:null}});!function(){if(!h.desktop){var n={w:_.window.innerWidth,h:_.window.innerHeight};c.setInterval(function(){var t=_.window.innerWidth,e=_.window.innerHeight;n.w===t&&n.h===e||(n={w:t,h:e},Tt(_.window).trigger("resize"))},100)}Tt(_.window).on("resize",function(){var t,e,n=Ht.getWindowSize();for(t=0;t<Ue.length;t++)e=Ue[t].layoutRect(),Ue[t].moveTo(Ue[t].settings.x||Math.max(0,n.w/2-e.w/2),Ue[t].settings.y||Math.max(0,n.h/2-e.h/2))})}();var Xe,je,Je,Ge=$e.extend({init:function(t){t={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(t)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(t){var e,i=t.callback||function(){};function n(t,e,n){return{type:"button",text:t,subtype:n?"primary":"",onClick:function(t){t.control.parents()[1].close(),i(e)}}}switch(t.buttons){case Ge.OK_CANCEL:e=[n("Ok",!0,!0),n("Cancel",!1)];break;case Ge.YES_NO:case Ge.YES_NO_CANCEL:e=[n("Yes",1,!0),n("No",0)],t.buttons===Ge.YES_NO_CANCEL&&e.push(n("Cancel",-1));break;default:e=[n("Ok",!0,!0)]}return new $e({padding:20,x:t.x,y:t.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:e,title:t.title,role:"alertdialog",items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:t.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:t.onClose,onCancel:function(){i(!1)}}).renderTo(_.document.body).reflow()},alert:function(t,e){return"string"==typeof t&&(t={text:t}),t.callback=e,Ge.msgBox(t)},confirm:function(t,e){return"string"==typeof t&&(t={text:t}),t.callback=e,t.buttons=Ge.OK_CANCEL,Ge.msgBox(t)}}}),Ke=function(t,e){return{renderUI:function(){return st(t,e)},getNotificationManagerImpl:function(){return ye(t)},getWindowManagerImpl:function(){return{open:function(n,t,e){var i;return n.title=n.title||" ",n.url=n.url||n.file,n.url&&(n.width=parseInt(n.width||320,10),n.height=parseInt(n.height||240,10)),n.body&&(n.items={defaults:n.defaults,type:n.bodyType||"form",items:n.body,data:n.data,callbacks:n.commands}),n.url||n.buttons||(n.buttons=[{text:"Ok",subtype:"primary",onclick:function(){i.find("form")[0].submit()}},{text:"Cancel",onclick:function(){i.close()}}]),(i=new $e(n)).on("close",function(){e(i)}),n.data&&i.on("postRender",function(){this.find("*").each(function(t){var e=t.name();e in n.data&&t.value(n.data[e])})}),i.features=n||{},i.params=t||{},i=i.renderTo(_.document.body).reflow()},alert:function(t,e,n){var i;return(i=Ge.alert(t,function(){e()})).on("close",function(){n(i)}),i},confirm:function(t,e,n){var i;return(i=Ge.confirm(t,function(t){e(t)})).on("close",function(){n(i)}),i},close:function(t){t.close()},getParams:function(t){return t.params},setParams:function(t,e){t.params=e}}}}},Ze="undefined"!=typeof _.window?_.window:Function("return this;")(),Qe=function(t,e){return function(t,e){for(var n=e!==undefined&&null!==e?e:Ze,i=0;i<t.length&&n!==undefined&&null!==n;++i)n=n[t[i]];return n}(t.split("."),e)},tn=function(t,e){var n=Qe(t,e);if(n===undefined||null===n)throw new Error(t+" not available on this browser");return n},en=tinymce.util.Tools.resolve("tinymce.util.Promise"),nn=function(n){return new en(function(t){var e=new(tn("FileReader"));e.onloadend=function(){t(e.result.split(",")[1])},e.readAsDataURL(n)})},rn=function(){return new en(function(e){var t;(t=_.document.createElement("input")).type="file",t.style.position="fixed",t.style.left=0,t.style.top=0,t.style.opacity=.001,_.document.body.appendChild(t),t.onchange=function(t){e(Array.prototype.slice.call(t.target.files))},t.click(),t.parentNode.removeChild(t)})},on=0,sn=function(t){return t+on+++(e=function(){return Math.round(4294967295*Math.random()).toString(36)},"s"+Date.now().toString(36)+e()+e()+e());var e},an=function(r,o){var s={};function t(t){var e,n,i;n=o[t?"startContainer":"endContainer"],i=o[t?"startOffset":"endOffset"],1===n.nodeType&&(e=r.create("span",{"data-mce-type":"bookmark"}),n.hasChildNodes()?(i=Math.min(i,n.childNodes.length-1),t?n.insertBefore(e,n.childNodes[i]):r.insertAfter(e,n.childNodes[i])):n.appendChild(e),n=e,i=0),s[t?"startContainer":"endContainer"]=n,s[t?"startOffset":"endOffset"]=i}return t(!0),o.collapsed||t(),s},ln=function(r,o){function t(t){var e,n,i;e=i=o[t?"startContainer":"endContainer"],n=o[t?"startOffset":"endOffset"],e&&(1===e.nodeType&&(n=function(t){for(var e=t.parentNode.firstChild,n=0;e;){if(e===t)return n;1===e.nodeType&&"bookmark"===e.getAttribute("data-mce-type")||n++,e=e.nextSibling}return-1}(e),e=e.parentNode,r.remove(i)),o[t?"startContainer":"endContainer"]=e,o[t?"startOffset":"endOffset"]=n)}t(!0),t();var e=r.createRng();return e.setStart(o.startContainer,o.startOffset),o.endContainer&&e.setEnd(o.endContainer,o.endOffset),e},un=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),cn=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),dn=function(t){return"A"===t.nodeName&&t.hasAttribute("href")},fn=function(t){var e,n,i,r,o,s,a,l;return r=t.selection,o=t.dom,s=r.getRng(),a=o,l=cn.getNode(s.startContainer,s.startOffset),e=a.getParent(l,dn)||l,n=cn.getNode(s.endContainer,s.endOffset),i=t.getBody(),R.grep(function(t,e,n){var i,r,o=[];for(i=new un(e,t),r=e;r&&(1===r.nodeType&&o.push(r),r!==n);r=i.next());return o}(i,e,n),dn)},hn=function(t){var e,n,i,r,o;n=fn(e=t),r=e.dom,o=e.selection,i=an(r,o.getRng()),R.each(n,function(t){e.dom.remove(t,!0)}),o.setRng(ln(r,i))},mn=function(t){t.selection.collapse(!1)},gn=function(t){t.focus(),hn(t),mn(t)},pn=function(t,e){var n,i,r,o,s,a=t.dom.getParent(t.selection.getStart(),"a[href]");a?(o=a,s=e,(r=t).focus(),r.dom.setAttrib(o,"href",s),mn(r)):(i=e,(n=t).execCommand("mceInsertLink",!1,{href:i}),mn(n))},vn=function(t,e,n){var i,r,o;t.plugins.table?t.plugins.table.insertTable(e,n):(r=e,o=n,(i=t).undoManager.transact(function(){var t,e;i.insertContent(function(t,e){var n,i,r;for(r='<table data-mce-id="mce" style="width: 100%">',r+="<tbody>",i=0;i<e;i++){for(r+="<tr>",n=0;n<t;n++)r+="<td><br></td>";r+="</tr>"}return r+="</tbody>",r+="</table>"}(r,o)),(t=i.dom.select("*[data-mce-id]")[0]).removeAttribute("data-mce-id"),e=i.dom.select("td,th",t),i.selection.setCursorLocation(e[0],0)}))},bn=function(t,e){t.execCommand("FormatBlock",!1,e)},yn=function(t,e,n){var i,r;r=(i=t.editorUpload.blobCache).create(sn("mceu"),n,e),i.add(r),t.insertContent(t.dom.createHTML("img",{src:r.blobUri()}))},xn=function(t,e){0===e.trim().length?gn(t):pn(t,e)},wn=gn,_n=function(n,t){n.addButton("quicklink",{icon:"link",tooltip:"Insert/Edit link",stateSelector:"a[href]",onclick:function(){t.showForm(n,"quicklink")}}),n.addButton("quickimage",{icon:"image",tooltip:"Insert image",onclick:function(){rn().then(function(t){var e=t[0];nn(e).then(function(t){yn(n,t,e)})})}}),n.addButton("quicktable",{icon:"table",tooltip:"Insert table",onclick:function(){t.hide(),vn(n,2,2)}}),function(e){for(var t=function(t){return function(){bn(e,t)}},n=1;n<6;n++){var i="h"+n;e.addButton(i,{text:i.toUpperCase(),tooltip:"Heading "+n,stateSelector:i,onclick:t(i),onPostRender:function(){this.getEl().firstChild.firstChild.style.fontWeight="bold"}})}}(n)},Rn=function(){var t=h.container;if(t&&"static"!==v.DOM.getStyle(t,"position",!0)){var e=v.DOM.getPos(t),n=e.x-t.scrollLeft,i=e.y-t.scrollTop;return mt.some({x:n,y:i})}return mt.none()},Cn=function(t){return/^www\.|\.(com|org|edu|gov|uk|net|ca|de|jp|fr|au|us|ru|ch|it|nl|se|no|es|mil)$/i.test(t.trim())},kn=function(t){return/^https?:\/\//.test(t.trim())},En=function(t,e){return!kn(e)&&Cn(e)?(n=t,i=e,new en(function(e){n.windowManager.confirm("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(t){e(!0===t?"http://"+i:i)})})):en.resolve(e);var n,i},Hn=function(r,e){var t,n,i,o={};return t="quicklink",n={items:[{type:"button",name:"unlink",icon:"unlink",onclick:function(){r.focus(),wn(r),e()},tooltip:"Remove link"},{type:"filepicker",name:"linkurl",placeholder:"Paste or type a link",filetype:"file",onchange:function(t){var e=t.meta;e&&e.attach&&(o={href:this.value(),attach:e.attach})}},{type:"button",icon:"checkmark",subtype:"primary",tooltip:"Ok",onclick:"submit"}],onshow:function(t){if(t.control===this){var e,n="";(e=r.dom.getParent(r.selection.getStart(),"a[href]"))&&(n=r.dom.getAttrib(e,"href")),this.fromJSON({linkurl:n}),i=this.find("#unlink"),e?i.show():i.hide(),this.find("#linkurl")[0].focus()}var i},onsubmit:function(t){En(r,t.data.linkurl).then(function(t){r.undoManager.transact(function(){t===o.href&&(o.attach(),o={}),xn(r,t)}),e()})}},(i=_e.create(R.extend({type:"form",layout:"flex",direction:"row",padding:5,name:t,spacing:3},n))).on("show",function(){i.find("textbox").eq(0).each(function(t){t.focus()})}),i},Tn=function(n,t,e){var o,i,s=[];if(e)return R.each(B(i=e)?i:W(i)?i.split(/[ ,]/):[],function(t){if("|"===t)o=null;else if(n.buttons[t]){o||(o={type:"buttongroup",items:[]},s.push(o));var e=n.buttons[t];A(e)&&(e=e()),e.type=e.type||"button",(e=_e.create(e)).on("postRender",(i=n,r=e,function(){var e,t,n=(t=function(t,e){return{selector:t,handler:e}},(e=r).settings.stateSelector?t(e.settings.stateSelector,function(t){e.active(t)}):e.settings.disabledStateSelector?t(e.settings.disabledStateSelector,function(t){e.disabled(t)}):null);null!==n&&i.selection.selectorChanged(n.selector,n.handler)})),o.items.push(e)}var i,r}),_e.create({type:"toolbar",layout:"flow",name:t,items:s})},Sn=function(){var l,c,o=function(t){return 0<t.items().length},u=function(t,e){var n,i,r=(n=t,i=e,R.map(i,function(t){return Tn(n,t.id,t.items)})).concat([Tn(t,"text",J(t)),Tn(t,"insert",G(t)),Hn(t,p)]);return _e.create({type:"floatpanel",role:"dialog",classes:"tinymce tinymce-inline arrow",ariaLabel:"Inline toolbar",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!0,border:1,items:R.grep(r,o),oncancel:function(){t.focus()}})},d=function(t){t&&t.show()},f=function(t,e){t.moveTo(e.x,e.y)},h=function(n,i){i=i?i.substr(0,2):"",R.each({t:"down",b:"up",c:"center"},function(t,e){n.classes.toggle("arrow-"+t,e===i.substr(0,1))}),"cr"===i?(n.classes.toggle("arrow-left",!0),n.classes.toggle("arrow-right",!1)):"cl"===i?(n.classes.toggle("arrow-left",!1),n.classes.toggle("arrow-right",!0)):R.each({l:"left",r:"right"},function(t,e){n.classes.toggle("arrow-"+t,e===i.substr(1,1))})},m=function(t,e){var n=t.items().filter("#"+e);return 0<n.length&&(n[0].show(),t.reflow(),!0)},g=function(t,e,n,i){var r,o,s,a;if(a=K(n),r=b(n),o=v.DOM.getRect(t.getEl()),s="insert"===e?Y(i,r,o):$(i,r,o)){var l=Rn().getOr({x:0,y:0}),u={x:s.rect.x-l.x,y:s.rect.y-l.y,w:s.rect.w,h:s.rect.h};return f(t,X(a,c=i,r,u)),h(t,s.position),!0}return!1},p=function(){l&&l.hide()};return{show:function(t,e,n,i){var r,o,s,a;l||(S(t),(l=u(t,i)).renderTo().reflow().moveTo(n.x,n.y),t.nodeChanged()),o=e,s=t,a=n,d(r=l),r.items().hide(),m(r,o)?!1===g(r,o,s,a)&&p():p()},showForm:function(t,e){if(l){if(l.items().hide(),!m(l,e))return void p();var n,i,r,o=void 0;d(l),l.items().hide(),m(l,e),r=K(t),n=b(t),o=v.DOM.getRect(l.getEl()),(i=$(c,n,o))&&(o=i.rect,f(l,X(r,c,n,o)),h(l,i.position))}},reposition:function(t,e,n){l&&g(l,e,t,n)},inForm:function(){return l&&l.visible()&&0<l.items().filter("form:visible").length},hide:p,focus:function(){l&&l.find("toolbar:visible").eq(0).each(function(t){t.focus(!0)})},remove:function(){l&&(l.remove(),l=null)}}},Mn=St.extend({Defaults:{firstControlClass:"first",lastControlClass:"last"},init:function(t){this.settings=R.extend({},this.Defaults,t)},preRender:function(t){t.bodyClasses.add(this.settings.containerClass)},applyClasses:function(t){var e,n,i,r,o=this.settings;e=o.firstControlClass,n=o.lastControlClass,t.each(function(t){t.classes.remove(e).remove(n).add(o.controlClass),t.visible()&&(i||(i=t),r=t)}),i&&i.classes.add(e),r&&r.classes.add(n)},renderHtml:function(t){var e="";return this.applyClasses(t.items()),t.items().each(function(t){e+=t.renderHtml()}),e},recalc:function(){},postRender:function(){},isNative:function(){return!1}}),Nn=Mn.extend({Defaults:{containerClass:"abs-layout",controlClass:"abs-layout-item"},recalc:function(t){t.items().filter(":visible").each(function(t){var e=t.settings;t.layoutRect({x:e.x,y:e.y,w:e.w,h:e.h}),t.recalc&&t.recalc()})},renderHtml:function(t){return'<div id="'+t._id+'-absend" class="'+t.classPrefix+'abs-end"></div>'+this._super(t)}}),On=ge.extend({Defaults:{classes:"widget btn",role:"button"},init:function(t){var e,n=this;n._super(t),t=n.settings,e=n.settings.size,n.on("click mousedown",function(t){t.preventDefault()}),n.on("touchstart",function(t){n.fire("click",t),t.preventDefault()}),t.subtype&&n.classes.add(t.subtype),e&&n.classes.add("btn-"+e),t.icon&&n.icon(t.icon)},icon:function(t){return arguments.length?(this.state.set("icon",t),this):this.state.get("icon")},repaint:function(){var t,e=this.getEl().firstChild;e&&((t=e.style).width=t.height="100%"),this._super()},renderHtml:function(){var t,e,n=this,i=n._id,r=n.classPrefix,o=n.state.get("icon"),s=n.state.get("text"),a="",l=n.settings;return(t=l.image)?(o="none","string"!=typeof t&&(t=_.window.getSelection?t[0]:t[1]),t=" style=\"background-image: url('"+t+"')\""):t="",s&&(n.classes.add("btn-has-text"),a='<span class="'+r+'txt">'+n.encode(s)+"</span>"),o=o?r+"ico "+r+"i-"+o:"",e="boolean"==typeof l.active?' aria-pressed="'+l.active+'"':"",'<div id="'+i+'" class="'+n.classes+'" tabindex="-1"'+e+'><button id="'+i+'-button" role="presentation" type="button" tabindex="-1">'+(o?'<i class="'+o+'"'+t+"></i>":"")+a+"</button></div>"},bindStates:function(){var o=this,n=o.$,i=o.classPrefix+"txt";function s(t){var e=n("span."+i,o.getEl());t?(e[0]||(n("button:first",o.getEl()).append('<span class="'+i+'"></span>'),e=n("span."+i,o.getEl())),e.html(o.encode(t))):e.remove(),o.classes.toggle("btn-has-text",!!t)}return o.state.on("change:text",function(t){s(t.value)}),o.state.on("change:icon",function(t){var e=t.value,n=o.classPrefix;e=(o.settings.icon=e)?n+"ico "+n+"i-"+o.settings.icon:"";var i=o.getEl().firstChild,r=i.getElementsByTagName("i")[0];e?(r&&r===i.firstChild||(r=_.document.createElement("i"),i.insertBefore(r,i.firstChild)),r.className=e):r&&i.removeChild(r),s(o.state.get("text"))}),o._super()}}),Wn=On.extend({init:function(t){t=R.extend({text:"Browse...",multiple:!1,accept:null},t),this._super(t),this.classes.add("browsebutton"),t.multiple&&this.classes.add("multiple")},postRender:function(){var n=this,e=Ht.create("input",{type:"file",id:n._id+"-browse",accept:n.settings.accept});n._super(),Tt(e).on("change",function(t){var e=t.target.files;n.value=function(){return e.length?n.settings.multiple?e:e[0]:null},t.preventDefault(),e.length&&n.fire("change",t)}),Tt(e).on("click",function(t){t.stopPropagation()}),Tt(n.getEl("button")).on("click touchstart",function(t){t.stopPropagation(),e.click(),t.preventDefault()}),n.getEl().appendChild(e)},remove:function(){Tt(this.getEl("button")).off(),Tt(this.getEl("input")).off(),this._super()}}),Pn=Me.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var t=this,e=t._layout;return t.classes.add("btn-group"),t.preRender(),e.preRender(t),'<div id="'+t._id+'" class="'+t.classes+'"><div id="'+t._id+'-body">'+(t.settings.html||"")+e.renderHtml(t)+"</div></div>"}}),Dn=ge.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(t){var e=this;e._super(t),e.on("click mousedown",function(t){t.preventDefault()}),e.on("click",function(t){t.preventDefault(),e.disabled()||e.checked(!e.checked())}),e.checked(e.settings.checked)},checked:function(t){return arguments.length?(this.state.set("checked",t),this):this.state.get("checked")},value:function(t){return arguments.length?this.checked(t):this.checked()},renderHtml:function(){var t=this,e=t._id,n=t.classPrefix;return'<div id="'+e+'" class="'+t.classes+'" unselectable="on" aria-labelledby="'+e+'-al" tabindex="-1"><i class="'+n+"ico "+n+'i-checkbox"></i><span id="'+e+'-al" class="'+n+'label">'+t.encode(t.state.get("text"))+"</span></div>"},bindStates:function(){var o=this;function e(t){o.classes.toggle("checked",t),o.aria("checked",t)}return o.state.on("change:text",function(t){o.getEl("al").firstChild.data=o.translate(t.value)}),o.state.on("change:checked change:value",function(t){o.fire("change"),e(t.value)}),o.state.on("change:icon",function(t){var e=t.value,n=o.classPrefix;if(void 0===e)return o.settings.icon;e=(o.settings.icon=e)?n+"ico "+n+"i-"+o.settings.icon:"";var i=o.getEl().firstChild,r=i.getElementsByTagName("i")[0];e?(r&&r===i.firstChild||(r=_.document.createElement("i"),i.insertBefore(r,i.firstChild)),r.className=e):r&&i.removeChild(r)}),o.state.get("checked")&&e(!0),o._super()}}),An=tinymce.util.Tools.resolve("tinymce.util.VK"),Bn=ge.extend({init:function(i){var r=this;r._super(i),i=r.settings,r.classes.add("combobox"),r.subinput=!0,r.ariaTarget="inp",i.menu=i.menu||i.values,i.menu&&(i.icon="caret"),r.on("click",function(t){var e=t.target,n=r.getEl();if(Tt.contains(n,e)||e===n)for(;e&&e!==n;)e.id&&-1!==e.id.indexOf("-open")&&(r.fire("action"),i.menu&&(r.showMenu(),t.aria&&r.menu.items()[0].focus())),e=e.parentNode}),r.on("keydown",function(t){var e;13===t.keyCode&&"INPUT"===t.target.nodeName&&(t.preventDefault(),r.parents().reverse().each(function(t){if(t.toJSON)return e=t,!1}),r.fire("submit",{data:e.toJSON()}))}),r.on("keyup",function(t){if("INPUT"===t.target.nodeName){var e=r.state.get("value"),n=t.target.value;n!==e&&(r.state.set("value",n),r.fire("autocomplete",t))}}),r.on("mouseover",function(t){var e=r.tooltip().moveTo(-65535);if(r.statusLevel()&&-1!==t.target.className.indexOf(r.classPrefix+"status")){var n=r.statusMessage()||"Ok",i=e.text(n).show().testMoveRel(t.target,["bc-tc","bc-tl","bc-tr"]);e.classes.toggle("tooltip-n","bc-tc"===i),e.classes.toggle("tooltip-nw","bc-tl"===i),e.classes.toggle("tooltip-ne","bc-tr"===i),e.moveRel(t.target,i)}})},statusLevel:function(t){return 0<arguments.length&&this.state.set("statusLevel",t),this.state.get("statusLevel")},statusMessage:function(t){return 0<arguments.length&&this.state.set("statusMessage",t),this.state.get("statusMessage")},showMenu:function(){var t,e=this,n=e.settings;e.menu||((t=n.menu||[]).length?t={type:"menu",items:t}:t.type=t.type||"menu",e.menu=_e.create(t).parent(e).renderTo(e.getContainerElm()),e.fire("createmenu"),e.menu.reflow(),e.menu.on("cancel",function(t){t.control===e.menu&&e.focus()}),e.menu.on("show hide",function(t){t.control.items().each(function(t){t.active(t.value()===e.value())})}).fire("show"),e.menu.on("select",function(t){e.value(t.control.value())}),e.on("focusin",function(t){"INPUT"===t.target.tagName.toUpperCase()&&e.menu.hide()}),e.aria("expanded",!0)),e.menu.show(),e.menu.layoutRect({w:e.layoutRect().w}),e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},focus:function(){this.getEl("inp").focus()},repaint:function(){var t,e,n=this,i=n.getEl(),r=n.getEl("open"),o=n.layoutRect(),s=0,a=i.firstChild;n.statusLevel()&&"none"!==n.statusLevel()&&(s=parseInt(Ht.getRuntimeStyle(a,"padding-right"),10)-parseInt(Ht.getRuntimeStyle(a,"padding-left"),10)),t=r?o.w-Ht.getSize(r).width-10:o.w-10;var l=_.document;return l.all&&(!l.documentMode||l.documentMode<=8)&&(e=n.layoutRect().h-2+"px"),Tt(a).css({width:t-s,lineHeight:e}),n._super(),n},postRender:function(){var e=this;return Tt(this.getEl("inp")).on("change",function(t){e.state.set("value",t.target.value),e.fire("change",t)}),e._super()},renderHtml:function(){var t,e,n,i=this,r=i._id,o=i.settings,s=i.classPrefix,a=i.state.get("value")||"",l="",u="";return"spellcheck"in o&&(u+=' spellcheck="'+o.spellcheck+'"'),o.maxLength&&(u+=' maxlength="'+o.maxLength+'"'),o.size&&(u+=' size="'+o.size+'"'),o.subtype&&(u+=' type="'+o.subtype+'"'),n='<i id="'+r+'-status" class="mce-status mce-ico" style="display: none"></i>',i.disabled()&&(u+=' disabled="disabled"'),(t=o.icon)&&"caret"!==t&&(t=s+"ico "+s+"i-"+o.icon),e=i.state.get("text"),(t||e)&&(l='<div id="'+r+'-open" class="'+s+"btn "+s+'open" tabIndex="-1" role="button"><button id="'+r+'-action" type="button" hidefocus="1" tabindex="-1">'+("caret"!==t?'<i class="'+t+'"></i>':'<i class="'+s+'caret"></i>')+(e?(t?" ":"")+e:"")+"</button></div>",i.classes.add("has-open")),'<div id="'+r+'" class="'+i.classes+'"><input id="'+r+'-inp" class="'+s+'textbox" value="'+i.encode(a,!1)+'" hidefocus="1"'+u+' placeholder="'+i.encode(o.placeholder)+'" />'+n+l+"</div>"},value:function(t){return arguments.length?(this.state.set("value",t),this):(this.state.get("rendered")&&this.state.set("value",this.getEl("inp").value),this.state.get("value"))},showAutoComplete:function(t,i){var r=this;if(0!==t.length){r.menu?r.menu.items().remove():r.menu=_e.create({type:"menu",classes:"combobox-menu",layout:"flow"}).parent(r).renderTo(),R.each(t,function(t){var e,n;r.menu.add({text:t.title,url:t.previewUrl,match:i,classes:"menu-item-ellipsis",onclick:(e=t.value,n=t.title,function(){r.fire("selectitem",{title:n,value:e})})})}),r.menu.renderNew(),r.hideMenu(),r.menu.on("cancel",function(t){t.control.parent()===r.menu&&(t.stopPropagation(),r.focus(),r.hideMenu())}),r.menu.on("select",function(){r.focus()});var e=r.layoutRect().w;r.menu.layoutRect({w:e,minW:0,maxW:e}),r.menu.repaint(),r.menu.reflow(),r.menu.show(),r.menu.moveRel(r.getEl(),r.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])}else r.hideMenu()},hideMenu:function(){this.menu&&this.menu.hide()},bindStates:function(){var r=this;r.state.on("change:value",function(t){r.getEl("inp").value!==t.value&&(r.getEl("inp").value=t.value)}),r.state.on("change:disabled",function(t){r.getEl("inp").disabled=t.value}),r.state.on("change:statusLevel",function(t){var e=r.getEl("status"),n=r.classPrefix,i=t.value;Ht.css(e,"display","none"===i?"none":""),Ht.toggleClass(e,n+"i-checkmark","ok"===i),Ht.toggleClass(e,n+"i-warning","warn"===i),Ht.toggleClass(e,n+"i-error","error"===i),r.classes.toggle("has-status","none"!==i),r.repaint()}),Ht.on(r.getEl("status"),"mouseleave",function(){r.tooltip().hide()}),r.on("cancel",function(t){r.menu&&r.menu.visible()&&(t.stopPropagation(),r.hideMenu())});var n=function(t,e){e&&0<e.items().length&&e.items().eq(t)[0].focus()};return r.on("keydown",function(t){var e=t.keyCode;"INPUT"===t.target.nodeName&&(e===An.DOWN?(t.preventDefault(),r.fire("autocomplete"),n(0,r.menu)):e===An.UP&&(t.preventDefault(),n(-1,r.menu)))}),r._super()},remove:function(){Tt(this.getEl("inp")).off(),this.menu&&this.menu.remove(),this._super()}}),Ln=Bn.extend({init:function(t){var e=this;t.spellcheck=!1,t.onaction&&(t.icon="none"),e._super(t),e.classes.add("colorbox"),e.on("change keyup postrender",function(){e.repaintColor(e.value())})},repaintColor:function(t){var e=this.getEl("open"),n=e?e.getElementsByTagName("i")[0]:null;if(n)try{n.style.background=t}catch(i){}},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.state.get("rendered")&&e.repaintColor(t.value)}),e._super()}}),In=On.extend({showPanel:function(){var e=this,t=e.settings;if(e.classes.add("opened"),e.panel)e.panel.show();else{var n=t.panel;n.type&&(n={layout:"grid",items:n}),n.role=n.role||"dialog",n.popover=!0,n.autohide=!0,n.ariaRoot=!0,e.panel=new ze(n).on("hide",function(){e.classes.remove("opened")}).on("cancel",function(t){t.stopPropagation(),e.focus(),e.hidePanel()}).parent(e).renderTo(e.getContainerElm()),e.panel.fire("show"),e.panel.reflow()}var i=e.panel.testMoveRel(e.getEl(),t.popoverAlign||(e.isRtl()?["bc-tc","bc-tl","bc-tr"]:["bc-tc","bc-tr","bc-tl","tc-bc","tc-br","tc-bl"]));e.panel.classes.toggle("start","l"===i.substr(-1)),e.panel.classes.toggle("end","r"===i.substr(-1));var r="t"===i.substr(0,1);e.panel.classes.toggle("bottom",!r),e.panel.classes.toggle("top",r),e.panel.moveRel(e.getEl(),i)},hidePanel:function(){this.panel&&this.panel.hide()},postRender:function(){var e=this;return e.aria("haspopup",!0),e.on("click",function(t){t.control===e&&(e.panel&&e.panel.visible()?e.hidePanel():(e.showPanel(),e.panel.focus(!!t.aria)))}),e._super()},remove:function(){return this.panel&&(this.panel.remove(),this.panel=null),this._super()}}),zn=v.DOM,Fn=In.extend({init:function(t){this._super(t),this.classes.add("splitbtn"),this.classes.add("colorbutton")},color:function(t){return t?(this._color=t,this.getEl("preview").style.backgroundColor=t,this):this._color},resetColor:function(){return this._color=null,this.getEl("preview").style.backgroundColor=null,this},renderHtml:function(){var t=this,e=t._id,n=t.classPrefix,i=t.state.get("text"),r=t.settings.icon?n+"ico "+n+"i-"+t.settings.icon:"",o=t.settings.image?" style=\"background-image: url('"+t.settings.image+"')\"":"",s="";return i&&(t.classes.add("btn-has-text"),s='<span class="'+n+'txt">'+t.encode(i)+"</span>"),'<div id="'+e+'" class="'+t.classes+'" role="button" tabindex="-1" aria-haspopup="true"><button role="presentation" hidefocus="1" type="button" tabindex="-1">'+(r?'<i class="'+r+'"'+o+"></i>":"")+'<span id="'+e+'-preview" class="'+n+'preview"></span>'+s+'</button><button type="button" class="'+n+'open" hidefocus="1" tabindex="-1"> <i class="'+n+'caret"></i></button></div>'},postRender:function(){var e=this,n=e.settings.onclick;return e.on("click",function(t){t.aria&&"down"===t.aria.key||t.control!==e||zn.getParent(t.target,"."+e.classPrefix+"open")||(t.stopImmediatePropagation(),n.call(e,t))}),delete e.settings.onclick,e._super()}}),Un=tinymce.util.Tools.resolve("tinymce.util.Color"),Vn=ge.extend({Defaults:{classes:"widget colorpicker"},init:function(t){this._super(t)},postRender:function(){var n,i,r,o,s,a=this,l=a.color();function u(t,e){var n,i,r=Ht.getPos(t);return n=e.pageX-r.x,i=e.pageY-r.y,{x:n=Math.max(0,Math.min(n/t.clientWidth,1)),y:i=Math.max(0,Math.min(i/t.clientHeight,1))}}function c(t,e){var n=(360-t.h)/360;Ht.css(r,{top:100*n+"%"}),e||Ht.css(s,{left:t.s+"%",top:100-t.v+"%"}),o.style.background=Un({s:100,v:100,h:t.h}).toHex(),a.color().parse({s:t.s,v:t.v,h:t.h})}function t(t){var e;e=u(o,t),n.s=100*e.x,n.v=100*(1-e.y),c(n),a.fire("change")}function e(t){var e;e=u(i,t),(n=l.toHsv()).h=360*(1-e.y),c(n,!0),a.fire("change")}i=a.getEl("h"),r=a.getEl("hp"),o=a.getEl("sv"),s=a.getEl("svp"),a._repaint=function(){c(n=l.toHsv())},a._super(),a._svdraghelper=new we(a._id+"-sv",{start:t,drag:t}),a._hdraghelper=new we(a._id+"-h",{start:e,drag:e}),a._repaint()},rgb:function(){return this.color().toRgb()},value:function(t){if(!arguments.length)return this.color().toHex();this.color().parse(t),this._rendered&&this._repaint()},color:function(){return this._color||(this._color=Un()),this._color},renderHtml:function(){var t,e=this._id,o=this.classPrefix,s="#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000";return t='<div id="'+e+'-h" class="'+o+'colorpicker-h" style="background: -ms-linear-gradient(top,'+s+");background: linear-gradient(to bottom,"+s+');">'+function(){var t,e,n,i,r="";for(n="filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=",t=0,e=(i=s.split(",")).length-1;t<e;t++)r+='<div class="'+o+'colorpicker-h-chunk" style="height:'+100/e+"%;"+n+i[t]+",endColorstr="+i[t+1]+");-ms-"+n+i[t]+",endColorstr="+i[t+1]+')"></div>';return r}()+'<div id="'+e+'-hp" class="'+o+'colorpicker-h-marker"></div></div>','<div id="'+e+'" class="'+this.classes+'"><div id="'+e+'-sv" class="'+o+'colorpicker-sv"><div class="'+o+'colorpicker-overlay1"><div class="'+o+'colorpicker-overlay2"><div id="'+e+'-svp" class="'+o+'colorpicker-selector1"><div class="'+o+'colorpicker-selector2"></div></div></div></div></div>'+t+"</div>"}}),qn=ge.extend({init:function(t){t=R.extend({height:100,text:"Drop an image here",multiple:!1,accept:null},t),this._super(t),this.classes.add("dropzone"),t.multiple&&this.classes.add("multiple")},renderHtml:function(){var t,e,n=this.settings;return t={id:this._id,hidefocus:"1"},e=Ht.create("div",t,"<span>"+this.translate(n.text)+"</span>"),n.height&&Ht.css(e,"height",n.height+"px"),n.width&&Ht.css(e,"width",n.width+"px"),e.className=this.classes,e.outerHTML},postRender:function(){var i=this,t=function(t){t.preventDefault(),i.classes.toggle("dragenter"),i.getEl().className=i.classes};i._super(),i.$el.on("dragover",function(t){t.preventDefault()}),i.$el.on("dragenter",t),i.$el.on("dragleave",t),i.$el.on("drop",function(t){if(t.preventDefault(),!i.state.get("disabled")){var e=function(t){var e=i.settings.accept;if("string"!=typeof e)return t;var n=new RegExp("("+e.split(/\s*,\s*/).join("|")+")$","i");return R.grep(t,function(t){return n.test(t.name)})}(t.dataTransfer.files);i.value=function(){return e.length?i.settings.multiple?e:e[0]:null},e.length&&i.fire("change",t)}})},remove:function(){this.$el.off(),this._super()}}),Yn=ge.extend({init:function(t){var n=this;t.delimiter||(t.delimiter="\xbb"),n._super(t),n.classes.add("path"),n.canFocus=!0,n.on("click",function(t){var e;(e=t.target.getAttribute("data-index"))&&n.fire("select",{value:n.row()[e],index:e})}),n.row(n.settings.row)},focus:function(){return this.getEl().firstChild.focus(),this},row:function(t){return arguments.length?(this.state.set("row",t),this):this.state.get("row")},renderHtml:function(){return'<div id="'+this._id+'" class="'+this.classes+'">'+this._getDataPathHtml(this.state.get("row"))+"</div>"},bindStates:function(){var e=this;return e.state.on("change:row",function(t){e.innerHtml(e._getDataPathHtml(t.value))}),e._super()},_getDataPathHtml:function(t){var e,n,i=t||[],r="",o=this.classPrefix;for(e=0,n=i.length;e<n;e++)r+=(0<e?'<div class="'+o+'divider" aria-hidden="true"> '+this.settings.delimiter+" </div>":"")+'<div role="button" class="'+o+"path-item"+(e===n-1?" "+o+"last":"")+'" data-index="'+e+'" tabindex="-1" id="'+this._id+"-"+e+'" aria-level="'+(e+1)+'">'+i[e].name+"</div>";return r||(r='<div class="'+o+'path-item">\xa0</div>'),r}}),$n=Yn.extend({postRender:function(){var o=this,s=o.settings.editor;function a(t){if(1===t.nodeType){if("BR"===t.nodeName||t.getAttribute("data-mce-bogus"))return!0;if("bookmark"===t.getAttribute("data-mce-type"))return!0}return!1}return!1!==s.settings.elementpath&&(o.on("select",function(t){s.focus(),s.selection.select(this.row()[t.index].element),s.nodeChanged()}),s.on("nodeChange",function(t){for(var e=[],n=t.parents,i=n.length;i--;)if(1===n[i].nodeType&&!a(n[i])){var r=s.fire("ResolveName",{name:n[i].nodeName.toLowerCase(),target:n[i]});if(r.isDefaultPrevented()||e.push({name:r.name,element:n[i]}),r.isPropagationStopped())break}o.row(e)})),o._super()}}),Xn=Me.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var t=this,e=t._layout,n=t.classPrefix;return t.classes.add("formitem"),e.preRender(t),'<div id="'+t._id+'" class="'+t.classes+'" hidefocus="1" tabindex="-1">'+(t.settings.title?'<div id="'+t._id+'-title" class="'+n+'title">'+t.settings.title+"</div>":"")+'<div id="'+t._id+'-body" class="'+t.bodyClasses+'">'+(t.settings.html||"")+e.renderHtml(t)+"</div></div>"}}),jn=Me.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:15,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var i=this,t=i.items();i.settings.formItemDefaults||(i.settings.formItemDefaults={layout:"flex",autoResize:"overflow",defaults:{flex:1}}),t.each(function(t){var e,n=t.settings.label;n&&((e=new Xn(R.extend({items:{type:"label",id:t._id+"-l",text:n,flex:0,forId:t._id,disabled:t.disabled()}},i.settings.formItemDefaults))).type="formitem",t.aria("labelledby",t._id+"-l"),"undefined"==typeof t.settings.flex&&(t.settings.flex=1),i.replace(t,e),e.add(t))})},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){this._super(),this.fromJSON(this.settings.data)},bindStates:function(){var n=this;function t(){var t,e,i=0,r=[];if(!1!==n.settings.labelGapCalc)for(("children"===n.settings.labelGapCalc?n.find("formitem"):n.items()).filter("formitem").each(function(t){var e=t.items()[0],n=e.getEl().clientWidth;i=i<n?n:i,r.push(e)}),e=n.settings.labelGap||0,t=r.length;t--;)r[t].settings.minWidth=i+e}n._super(),n.on("show",t),t()}}),Jn=jn.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var t=this,e=t._layout,n=t.classPrefix;return t.preRender(),e.preRender(t),'<fieldset id="'+t._id+'" class="'+t.classes+'" hidefocus="1" tabindex="-1">'+(t.settings.title?'<legend id="'+t._id+'-title" class="'+n+'fieldset-title">'+t.settings.title+"</legend>":"")+'<div id="'+t._id+'-body" class="'+t.bodyClasses+'">'+(t.settings.html||"")+e.renderHtml(t)+"</div></fieldset>"}}),Gn=0,Kn=function(t){if(null===t||t===undefined)throw new Error("Node cannot be null or undefined");return{dom:lt(t)}},Zn={fromHtml:function(t,e){var n=(e||_.document).createElement("div");if(n.innerHTML=t,!n.hasChildNodes()||1<n.childNodes.length)throw _.console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return Kn(n.childNodes[0])},fromTag:function(t,e){var n=(e||_.document).createElement(t);return Kn(n)},fromText:function(t,e){var n=(e||_.document).createTextNode(t);return Kn(n)},fromDom:Kn,fromPoint:function(t,e,n){var i=t.dom();return mt.from(i.elementFromPoint(e,n)).map(Kn)}},Qn=(_.Node.ATTRIBUTE_NODE,_.Node.CDATA_SECTION_NODE,_.Node.COMMENT_NODE,_.Node.DOCUMENT_NODE),ti=(_.Node.DOCUMENT_TYPE_NODE,_.Node.DOCUMENT_FRAGMENT_NODE,_.Node.ELEMENT_NODE),ei=(_.Node.TEXT_NODE,_.Node.PROCESSING_INSTRUCTION_NODE,_.Node.ENTITY_REFERENCE_NODE,_.Node.ENTITY_NODE,_.Node.NOTATION_NODE,function(t,e){var n=function(t,e){for(var n=0;n<t.length;n++){var i=t[n];if(i.test(e))return i}return undefined}(t,e);if(!n)return{major:0,minor:0};var i=function(t){return Number(e.replace(n,"$"+t))};return ii(i(1),i(2))}),ni=function(){return ii(0,0)},ii=function(t,e){return{major:t,minor:e}},ri={nu:ii,detect:function(t,e){var n=String(e).toLowerCase();return 0===t.length?ni():ei(t,n)},unknown:ni},oi="Firefox",si=function(t,e){return function(){return e===t}},ai=function(t){var e=t.current;return{current:e,version:t.version,isEdge:si("Edge",e),isChrome:si("Chrome",e),isIE:si("IE",e),isOpera:si("Opera",e),isFirefox:si(oi,e),isSafari:si("Safari",e)}},li={unknown:function(){return ai({current:undefined,version:ri.unknown()})},nu:ai,edge:lt("Edge"),chrome:lt("Chrome"),ie:lt("IE"),opera:lt("Opera"),firefox:lt(oi),safari:lt("Safari")},ui="Windows",ci="Android",di="Solaris",fi="FreeBSD",hi=function(t,e){return function(){return e===t}},mi=function(t){var e=t.current;return{current:e,version:t.version,isWindows:hi(ui,e),isiOS:hi("iOS",e),isAndroid:hi(ci,e),isOSX:hi("OSX",e),isLinux:hi("Linux",e),isSolaris:hi(di,e),isFreeBSD:hi(fi,e)}},gi={unknown:function(){return mi({current:undefined,version:ri.unknown()})},nu:mi,windows:lt(ui),ios:lt("iOS"),android:lt(ci),linux:lt("Linux"),osx:lt("OSX"),solaris:lt(di),freebsd:lt(fi)},pi=function(t,e){var n=String(e).toLowerCase();return function(t,e){for(var n=0,i=t.length;n<i;n++){var r=t[n];if(e(r,n))return mt.some(r)}return mt.none()}(t,function(t){return t.search(n)})},vi=function(t,n){return pi(t,n).map(function(t){var e=ri.detect(t.versionRegexes,n);return{current:t.name,version:e}})},bi=function(t,n){return pi(t,n).map(function(t){var e=ri.detect(t.versionRegexes,n);return{current:t.name,version:e}})},yi=function(t,e){return-1!==t.indexOf(e)},xi=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,wi=function(e){return function(t){return yi(t,e)}},_i=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return yi(t,"edge/")&&yi(t,"chrome")&&yi(t,"safari")&&yi(t,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,xi],search:function(t){return yi(t,"chrome")&&!yi(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return yi(t,"msie")||yi(t,"trident")}},{name:"Opera",versionRegexes:[xi,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:wi("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:wi("firefox")},{name:"Safari",versionRegexes:[xi,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(yi(t,"safari")||yi(t,"mobile/"))&&yi(t,"applewebkit")}}],Ri=[{name:"Windows",search:wi("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return yi(t,"iphone")||yi(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:wi("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:wi("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:wi("linux"),versionRegexes:[]},{name:"Solaris",search:wi("sunos"),versionRegexes:[]},{name:"FreeBSD",search:wi("freebsd"),versionRegexes:[]}],Ci={browsers:lt(_i),oses:lt(Ri)},ki=function(t){var e,n,i,r,o,s,a,l,u,c,d,f=Ci.browsers(),h=Ci.oses(),m=vi(f,t).fold(li.unknown,li.nu),g=bi(h,t).fold(gi.unknown,gi.nu);return{browser:m,os:g,deviceType:(n=m,i=t,r=(e=g).isiOS()&&!0===/ipad/i.test(i),o=e.isiOS()&&!r,s=e.isAndroid()&&3===e.version.major,a=e.isAndroid()&&4===e.version.major,l=r||s||a&&!0===/mobile/i.test(i),u=e.isiOS()||e.isAndroid(),c=u&&!l,d=n.isSafari()&&e.isiOS()&&!1===/safari/i.test(i),{isiPad:lt(r),isiPhone:lt(o),isTablet:lt(l),isPhone:lt(c),isTouch:lt(u),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:lt(d)})}},Ei=(Je=!(Xe=function(){var t=_.navigator.userAgent;return ki(t)}),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Je||(Je=!0,je=Xe.apply(null,t)),je}),Hi=ti,Ti=Qn,Si=function(t){return t.nodeType!==Hi&&t.nodeType!==Ti||0===t.childElementCount},Mi=(Ei().browser.isIE(),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]}("element","offset"),R.trim),Ni=function(e){return function(t){if(t&&1===t.nodeType){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}return!1}},Oi=Ni("true"),Wi=Ni("false"),Pi=function(t,e,n,i,r){return{type:t,title:e,url:n,level:i,attach:r}},Di=function(t){return t.innerText||t.textContent},Ai=function(t){return t.id?t.id:(e="h",n=(new Date).getTime(),e+"_"+Math.floor(1e9*Math.random())+ ++Gn+String(n));var e,n},Bi=function(t){return(e=t)&&"A"===e.nodeName&&(e.id||e.name)&&Ii(t);var e},Li=function(t){return t&&/^(H[1-6])$/.test(t.nodeName)},Ii=function(t){return function(t){for(;t=t.parentNode;){var e=t.contentEditable;if(e&&"inherit"!==e)return Oi(t)}return!1}(t)&&!Wi(t)},zi=function(t){return Li(t)&&Ii(t)},Fi=function(t){var e,n=Ai(t);return Pi("header",Di(t),"#"+n,Li(e=t)?parseInt(e.nodeName.substr(1),10):0,function(){t.id=n})},Ui=function(t){var e=t.id||t.name,n=Di(t);return Pi("anchor",n||"#"+e,"#"+e,0,at)},Vi=function(t){var e,n,i,r,o,s;return e="h1,h2,h3,h4,h5,h6,a:not([href])",n=t,Rt((Ei().browser.isIE(),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]}("element","offset"),i=Zn.fromDom(n),r=e,s=(o=i)===undefined?_.document:o.dom(),Si(s)?[]:Rt(s.querySelectorAll(r),Zn.fromDom)),function(t){return t.dom()})},qi=function(t){return 0<Mi(t.title).length},Yi=function(t){var e,n=Vi(t);return kt((e=n,Rt(kt(e,zi),Fi)).concat(Rt(kt(n,Bi),Ui)),qi)},$i={},Xi=function(t){return{title:t.title,value:{title:{raw:t.title},url:t.url,attach:t.attach}}},ji=function(t,e){return{title:t,value:{title:t,url:e,attach:at}}},Ji=function(t,e,n){var i=e in t?t[e]:n;return!1===i?null:i},Gi=function(t,i,r,e){var n,o,s,a,l,u,c={title:"-"},d=function(t){var e=t.hasOwnProperty(r)?t[r]:[],n=kt(e,function(t){return e=t,!_t(i,function(t){return t.url===e});var e});return R.map(n,function(t){return{title:t,value:{title:t,url:t,attach:at}}})},f=function(e){var t,n=kt(i,function(t){return t.type===e});return t=n,R.map(t,Xi)};return!1===e.typeahead_urls?[]:"file"===r?(n=[Ki(t,d($i)),Ki(t,f("header")),Ki(t,(a=f("anchor"),l=Ji(e,"anchor_top","#top"),u=Ji(e,"anchor_bottom","#bottom"),null!==l&&a.unshift(ji("<top>",l)),null!==u&&a.push(ji("<bottom>",u)),a))],o=function(t,e){return 0===t.length||0===e.length?t.concat(e):t.concat(c,e)},s=[],Ct(n,function(t){s=o(s,t)}),s):Ki(t,d($i))},Ki=function(t,e){var n=t.toLowerCase(),i=R.grep(e,function(t){return-1!==t.title.toLowerCase().indexOf(n)});return 1===i.length&&i[0].title===t?[]:i},Zi=function(r,i,o,s){var e=function(t){var e=Yi(o),n=Gi(t,e,s,i);r.showAutoComplete(n,t)};r.on("autocomplete",function(){e(r.value())}),r.on("selectitem",function(t){var e=t.value;r.value(e.url);var n,i=(n=e.title).raw?n.raw:n;"image"===s?r.fire("change",{meta:{alt:i,attach:e.attach}}):r.fire("change",{meta:{text:i,attach:e.attach}}),r.focus()}),r.on("click",function(t){0===r.value().length&&"INPUT"===t.target.nodeName&&e("")}),r.on("PostRender",function(){r.getRoot().on("submit",function(t){var e,n,i;t.isDefaultPrevented()||(e=r.value(),i=$i[n=s],/^https?/.test(e)&&(i?wt(i,e).isNone()&&($i[n]=i.slice(0,5).concat(e)):$i[n]=[e]))})})},Qi=function(o,t,n){var i=t.filepicker_validator_handler;i&&o.state.on("change:value",function(t){var e;0!==(e=t.value).length?i({url:e,type:n},function(t){var e,n,i,r=(n=(e=t).status,i=e.message,"valid"===n?{status:"ok",message:i}:"unknown"===n?{status:"warn",message:i}:"invalid"===n?{status:"warn",message:i}:{status:"none",message:""});o.statusMessage(r.message),o.statusLevel(r.status)}):o.statusLevel("none")})},tr=Bn.extend({Statics:{clearHistory:function(){$i={}}},init:function(t){var e,n,i,r=this,o=window.tinymce?window.tinymce.activeEditor:M.activeEditor,s=o.settings,a=t.filetype;t.spellcheck=!1,(i=s.file_picker_types||s.file_browser_callback_types)&&(i=R.makeMap(i,/[, ]/)),i&&!i[a]||(!(n=s.file_picker_callback)||i&&!i[a]?!(n=s.file_browser_callback)||i&&!i[a]||(e=function(){n(r.getEl("inp").id,r.value(),a,window)}):e=function(){var t=r.fire("beforecall").meta;t=R.extend({filetype:a},t),n.call(o,function(t,e){r.value(t).fire("change",{meta:e})},r.value(),t)}),e&&(t.icon="browse",t.onaction=e),r._super(t),r.classes.add("filepicker"),Zi(r,s,o.getBody(),a),Qi(r,s,a)}}),er=Nn.extend({recalc:function(t){var e=t.layoutRect(),n=t.paddingBox;t.items().filter(":visible").each(function(t){t.layoutRect({x:n.left,y:n.top,w:e.innerW-n.right-n.left,h:e.innerH-n.top-n.bottom}),t.recalc&&t.recalc()})}}),nr=Nn.extend({recalc:function(t){var e,n,i,r,o,s,a,l,u,c,d,f,h,m,g,p,v,b,y,x,w,_,R,C,k,E,H,T,S,M,N,O,W,P,D,A,B,L=[],I=Math.max,z=Math.min;for(i=t.items().filter(":visible"),r=t.layoutRect(),o=t.paddingBox,s=t.settings,f=t.isRtl()?s.direction||"row-reversed":s.direction,a=s.align,l=t.isRtl()?s.pack||"end":s.pack,u=s.spacing||0,"row-reversed"!==f&&"column-reverse"!==f||(i=i.set(i.toArray().reverse()),f=f.split("-")[0]),"column"===f?(C="y",_="h",R="minH",k="maxH",H="innerH",E="top",T="deltaH",S="contentH",P="left",O="w",M="x",N="innerW",W="minW",D="right",A="deltaW",B="contentW"):(C="x",_="w",R="minW",k="maxW",H="innerW",E="left",T="deltaW",S="contentW",P="top",O="h",M="y",N="innerH",W="minH",D="bottom",A="deltaH",B="contentH"),d=r[H]-o[E]-o[E],w=c=0,e=0,n=i.length;e<n;e++)m=(h=i[e]).layoutRect(),d-=e<n-1?u:0,0<(g=h.settings.flex)&&(c+=g,m[k]&&L.push(h),m.flex=g),d-=m[R],w<(p=o[P]+m[W]+o[D])&&(w=p);if((y={})[R]=d<0?r[R]-d+r[T]:r[H]-d+r[T],y[W]=w+r[A],y[S]=r[H]-d,y[B]=w,y.minW=z(y.minW,r.maxW),y.minH=z(y.minH,r.maxH),y.minW=I(y.minW,r.startMinWidth),y.minH=I(y.minH,r.startMinHeight),!r.autoResize||y.minW===r.minW&&y.minH===r.minH){for(b=d/c,e=0,n=L.length;e<n;e++)(v=(m=(h=L[e]).layoutRect())[k])<(p=m[R]+m.flex*b)?(d-=m[k]-m[R],c-=m.flex,m.flex=0,m.maxFlexSize=v):m.maxFlexSize=0;for(b=d/c,x=o[E],y={},0===c&&("end"===l?x=d+o[E]:"center"===l?(x=Math.round(r[H]/2-(r[H]-d)/2)+o[E])<0&&(x=o[E]):"justify"===l&&(x=o[E],u=Math.floor(d/(i.length-1)))),y[M]=o[P],e=0,n=i.length;e<n;e++)p=(m=(h=i[e]).layoutRect()).maxFlexSize||m[R],"center"===a?y[M]=Math.round(r[N]/2-m[O]/2):"stretch"===a?(y[O]=I(m[W]||0,r[N]-o[P]-o[D]),y[M]=o[P]):"end"===a&&(y[M]=r[N]-m[O]-o.top),0<m.flex&&(p+=m.flex*b),y[_]=p,y[C]=x,h.layoutRect(y),h.recalc&&h.recalc(),x+=p+u}else if(y.w=y.minW,y.h=y.minH,t.layoutRect(y),this.recalc(t),null===t._lastRect){var F=t.parent();F&&(F._lastRect=null,F.recalc())}}}),ir=Mn.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(t){t.items().filter(":visible").each(function(t){t.recalc&&t.recalc()})},isNative:function(){return!0}}),rr=function(t,e){return n=e,r=(i=t)===undefined?_.document:i.dom(),Si(r)?mt.none():mt.from(r.querySelector(n)).map(Zn.fromDom);var n,i,r},or=function(t,e){return function(){t.execCommand("mceToggleFormat",!1,e)}},sr=function(t,e,n){var i=function(t){n(t,e)};t.formatter?t.formatter.formatChanged(e,i):t.on("init",function(){t.formatter.formatChanged(e,i)})},ar=function(t,n){return function(e){sr(t,n,function(t){e.control.active(t)})}},lr=function(i){var e=["alignleft","aligncenter","alignright","alignjustify"],r="alignleft",t=[{text:"Left",icon:"alignleft",onclick:or(i,"alignleft")},{text:"Center",icon:"aligncenter",onclick:or(i,"aligncenter")},{text:"Right",icon:"alignright",onclick:or(i,"alignright")},{text:"Justify",icon:"alignjustify",onclick:or(i,"alignjustify")}];i.addMenuItem("align",{text:"Align",menu:t}),i.addButton("align",{type:"menubutton",icon:r,menu:t,onShowMenu:function(t){var n=t.control.menu;R.each(e,function(e,t){n.items().eq(t).each(function(t){return t.active(i.formatter.match(e))})})},onPostRender:function(t){var n=t.control;R.each(e,function(e,t){sr(i,e,function(t){n.icon(r),t&&n.icon(e)})})}}),R.each({alignleft:["Align left","JustifyLeft"],aligncenter:["Align center","JustifyCenter"],alignright:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"],alignnone:["No alignment","JustifyNone"]},function(t,e){i.addButton(e,{active:!1,tooltip:t[0],cmd:t[1],onPostRender:ar(i,e)})})},ur=function(t){return t?t.split(",")[0]:""},cr=function(l,u){return function(){var a=this;a.state.set("value",null),l.on("init nodeChange",function(t){var e,n,i,r,o=l.queryCommandValue("FontName"),s=(e=u,r=(n=o)?n.toLowerCase():"",R.each(e,function(t){t.value.toLowerCase()===r&&(i=t.value)}),R.each(e,function(t){i||ur(t.value).toLowerCase()!==ur(r).toLowerCase()||(i=t.value)}),i);a.value(s||null),!s&&o&&a.text(ur(o))})}},dr=function(n){n.addButton("fontselect",function(){var t,e=(t=function(t){for(var e=(t=t.replace(/;$/,"").split(";")).length;e--;)t[e]=t[e].split("=");return t}(n.settings.font_formats||"Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats"),R.map(t,function(t){return{text:{raw:t[0]},value:t[1],textStyle:-1===t[1].indexOf("dings")?"font-family:"+t[1]:""}}));return{type:"listbox",text:"Font Family",tooltip:"Font Family",values:e,fixedWidth:!0,onPostRender:cr(n,e),onselect:function(t){t.control.settings.value&&n.execCommand("FontName",!1,t.control.settings.value)}}})},fr=function(t){dr(t)},hr=function(t,e){return/[0-9.]+px$/.test(t)?(n=72*parseInt(t,10)/96,i=e||0,r=Math.pow(10,i),Math.round(n*r)/r+"pt"):t;var n,i,r},mr=function(t,e,n){var i;return R.each(t,function(t){t.value===n?i=n:t.value===e&&(i=e)}),i},gr=function(n){n.addButton("fontsizeselect",function(){var t,s,a,e=(t=n.settings.fontsize_formats||"8pt 10pt 12pt 14pt 18pt 24pt 36pt",R.map(t.split(" "),function(t){var e=t,n=t,i=t.split("=");return 1<i.length&&(e=i[0],n=i[1]),{text:e,value:n}}));return{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:e,fixedWidth:!0,onPostRender:(s=n,a=e,function(){var o=this;s.on("init nodeChange",function(t){var e,n,i,r;if(e=s.queryCommandValue("FontSize"))for(i=3;!r&&0<=i;i--)n=hr(e,i),r=mr(a,n,e);o.value(r||null),r||o.text(n)})}),onclick:function(t){t.control.settings.value&&n.execCommand("FontSize",!1,t.control.settings.value)}}})},pr=function(t){gr(t)},vr=function(n,t){var i=t.length;return R.each(t,function(t){t.menu&&(t.hidden=0===vr(n,t.menu));var e=t.format;e&&(t.hidden=!n.formatter.canApply(e)),t.hidden&&i--}),i},br=function(n,t){var i=t.items().length;return t.items().each(function(t){t.menu&&t.visible(0<br(n,t.menu)),!t.menu&&t.settings.menu&&t.visible(0<vr(n,t.settings.menu));var e=t.settings.format;e&&t.visible(n.formatter.canApply(e)),t.visible()||i--}),i},yr=function(t){var i,r,o,e,s,n,a,l,u=(r=0,o=[],e=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}],s=function(t){var i=[];if(t)return R.each(t,function(t){var e={text:t.title,icon:t.icon};if(t.items)e.menu=s(t.items);else{var n=t.format||"custom"+r++;t.format||(t.name=n,o.push(t)),e.format=n,e.cmd=t.cmd}i.push(e)}),i},(i=t).on("init",function(){R.each(o,function(t){i.formatter.register(t.name,t)})}),{type:"menu",items:i.settings.style_formats_merge?i.settings.style_formats?s(e.concat(i.settings.style_formats)):s(e):s(i.settings.style_formats||e),onPostRender:function(t){i.fire("renderFormatsMenu",{control:t.control})},itemDefaults:{preview:!0,textStyle:function(){if(this.settings.format)return i.formatter.getCssText(this.settings.format)},onPostRender:function(){var n=this;n.parent().on("show",function(){var t,e;(t=n.settings.format)&&(n.disabled(!i.formatter.canApply(t)),n.active(i.formatter.match(t))),(e=n.settings.cmd)&&n.active(i.queryCommandState(e))})},onclick:function(){this.settings.format&&or(i,this.settings.format)(),this.settings.cmd&&i.execCommand(this.settings.cmd)}}});n=u,t.addMenuItem("formats",{text:"Formats",menu:n}),l=u,(a=t).addButton("styleselect",{type:"menubutton",text:"Formats",menu:l,onShowMenu:function(){a.settings.style_formats_autohide&&br(a,this.menu)}})},xr=function(n,t){return function(){var r,o,s,e=[];return R.each(t,function(t){e.push({text:t[0],value:t[1],textStyle:function(){return n.formatter.getCssText(t[1])}})}),{type:"listbox",text:t[0][0],values:e,fixedWidth:!0,onselect:function(t){if(t.control){var e=t.control.value();or(n,e)()}},onPostRender:(r=n,o=e,function(){var e=this;r.on("nodeChange",function(t){var n=r.formatter,i=null;R.each(t.parents,function(e){if(R.each(o,function(t){if(s?n.matchNode(e,s,{value:t.value})&&(i=t.value):n.matchNode(e,t.value)&&(i=t.value),i)return!1}),i)return!1}),e.value(i)})})}}},wr=function(t){var e,n,i=function(t){for(var e=(t=t.replace(/;$/,"").split(";")).length;e--;)t[e]=t[e].split("=");return t}(t.settings.block_formats||"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre");t.addMenuItem("blockformats",{text:"Blocks",menu:(e=t,n=i,R.map(n,function(t){return{text:t[0],onclick:or(e,t[1]),textStyle:function(){return e.formatter.getCssText(t[1])}}}))}),t.addButton("formatselect",xr(t,i))},_r=function(e,t){var n,i;if("string"==typeof t)i=t.split(" ");else if(R.isArray(t))return function(t){for(var e=[],n=0,i=t.length;n<i;++n){if(!pt(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);xt.apply(e,t[n])}return e}(R.map(t,function(t){return _r(e,t)}));return n=R.grep(i,function(t){return"|"===t||t in e.menuItems}),R.map(n,function(t){return"|"===t?{text:"-"}:e.menuItems[t]})},Rr=function(t){return t&&"-"===t.text},Cr=function(n){var i=kt(n,function(t,e){return!Rr(t)||!Rr(n[e-1])});return kt(i,function(t,e){return!Rr(t)||0<e&&e<i.length-1})},kr=function(t){var e,n,i,r,o=t.settings.insert_button_items;return Cr(o?_r(t,o):(e=t,n="insert",i=[{text:"-"}],r=R.grep(e.menuItems,function(t){return t.context===n}),R.each(r,function(t){"before"===t.separator&&i.push({text:"|"}),t.prependToContext?i.unshift(t):i.push(t),"after"===t.separator&&i.push({text:"|"})}),i))},Er=function(t){var e;(e=t).addButton("insert",{type:"menubutton",icon:"insert",menu:[],oncreatemenu:function(){this.menu.add(kr(e)),this.menu.renderNew()}})},Hr=function(t){var n,i,r;n=t,R.each({bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript"},function(t,e){n.addButton(e,{active:!1,tooltip:t,onPostRender:ar(n,e),onclick:or(n,e)})}),i=t,R.each({outdent:["Decrease indent","Outdent"],indent:["Increase indent","Indent"],cut:["Cut","Cut"],copy:["Copy","Copy"],paste:["Paste","Paste"],help:["Help","mceHelp"],selectall:["Select all","SelectAll"],visualaid:["Visual aids","mceToggleVisualAid"],newdocument:["New document","mceNewDocument"],removeformat:["Clear formatting","RemoveFormat"],remove:["Remove","Delete"]},function(t,e){i.addButton(e,{tooltip:t[0],cmd:t[1]})}),r=t,R.each({blockquote:["Blockquote","mceBlockQuote"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"]},function(t,e){r.addButton(e,{active:!1,tooltip:t[0],cmd:t[1],onPostRender:ar(r,e)})})},Tr=function(t){var n;Hr(t),n=t,R.each({bold:["Bold","Bold","Meta+B"],italic:["Italic","Italic","Meta+I"],underline:["Underline","Underline","Meta+U"],strikethrough:["Strikethrough","Strikethrough"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],removeformat:["Clear formatting","RemoveFormat"],newdocument:["New document","mceNewDocument"],cut:["Cut","Cut","Meta+X"],copy:["Copy","Copy","Meta+C"],paste:["Paste","Paste","Meta+V"],selectall:["Select all","SelectAll","Meta+A"]},function(t,e){n.addMenuItem(e,{text:t[0],icon:e,shortcut:t[2],cmd:t[1]})}),n.addMenuItem("codeformat",{text:"Code",icon:"code",onclick:or(n,"code")})},Sr=function(n,i){return function(){var t=this,e=function(){var t="redo"===i?"hasRedo":"hasUndo";return!!n.undoManager&&n.undoManager[t]()};t.disabled(!e()),n.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",function(){t.disabled(n.readonly||!e())})}},Mr=function(t){var e,n;(e=t).addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onPostRender:Sr(e,"undo"),cmd:"undo"}),e.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onPostRender:Sr(e,"redo"),cmd:"redo"}),(n=t).addButton("undo",{tooltip:"Undo",onPostRender:Sr(n,"undo"),cmd:"undo"}),n.addButton("redo",{tooltip:"Redo",onPostRender:Sr(n,"redo"),cmd:"redo"})},Nr=function(t){var e,n;(e=t).addMenuItem("visualaid",{text:"Visual aids",selectable:!0,onPostRender:(n=e,function(){var e=this;n.on("VisualAid",function(t){e.active(t.hasVisual)}),e.active(n.hasVisual)}),cmd:"mceToggleVisualAid"})},Or={setup:function(t){var e;t.rtl&&(ae.rtl=!0),t.on("mousedown progressstate",function(){ze.hideAll()}),(e=t).settings.ui_container&&(h.container=rr(Zn.fromDom(_.document.body),e.settings.ui_container).fold(lt(null),function(t){return t.dom()})),ge.tooltips=!h.iOS,ae.translate=function(t){return M.translate(t)},wr(t),lr(t),Tr(t),Mr(t),pr(t),fr(t),yr(t),Nr(t),Er(t)}},Wr=Nn.extend({recalc:function(t){var e,n,i,r,o,s,a,l,u,c,d,f,h,m,g,p,v,b,y,x,w,_,R,C,k,E,H,T,S=[],M=[];e=t.settings,r=t.items().filter(":visible"),o=t.layoutRect(),i=e.columns||Math.ceil(Math.sqrt(r.length)),n=Math.ceil(r.length/i),b=e.spacingH||e.spacing||0,y=e.spacingV||e.spacing||0,x=e.alignH||e.align,w=e.alignV||e.align,p=t.paddingBox,T="reverseRows"in e?e.reverseRows:t.isRtl(),x&&"string"==typeof x&&(x=[x]),w&&"string"==typeof w&&(w=[w]);for(d=0;d<i;d++)S.push(0);for(f=0;f<n;f++)M.push(0);for(f=0;f<n;f++)for(d=0;d<i&&(c=r[f*i+d]);d++)C=(u=c.layoutRect()).minW,k=u.minH,S[d]=C>S[d]?C:S[d],M[f]=k>M[f]?k:M[f];for(E=o.innerW-p.left-p.right,d=_=0;d<i;d++)_+=S[d]+(0<d?b:0),E-=(0<d?b:0)+S[d];for(H=o.innerH-p.top-p.bottom,f=R=0;f<n;f++)R+=M[f]+(0<f?y:0),H-=(0<f?y:0)+M[f];if(_+=p.left+p.right,R+=p.top+p.bottom,(l={}).minW=_+(o.w-o.innerW),l.minH=R+(o.h-o.innerH),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH,l.minW=Math.min(l.minW,o.maxW),l.minH=Math.min(l.minH,o.maxH),l.minW=Math.max(l.minW,o.startMinWidth),l.minH=Math.max(l.minH,o.startMinHeight),!o.autoResize||l.minW===o.minW&&l.minH===o.minH){var N;o.autoResize&&((l=t.layoutRect(l)).contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH),N="start"===e.packV?0:0<H?Math.floor(H/n):0;var O=0,W=e.flexWidths;if(W)for(d=0;d<W.length;d++)O+=W[d];else O=i;var P=E/O;for(d=0;d<i;d++)S[d]+=W?W[d]*P:P;for(m=p.top,f=0;f<n;f++){for(h=p.left,a=M[f]+N,d=0;d<i&&(c=r[T?f*i+i-1-d:f*i+d]);d++)g=c.settings,u=c.layoutRect(),s=Math.max(S[d],u.startMinWidth),u.x=h,u.y=m,"center"===(v=g.alignH||(x?x[d]||x[0]:null))?u.x=h+s/2-u.w/2:"right"===v?u.x=h+s-u.w:"stretch"===v&&(u.w=s),"center"===(v=g.alignV||(w?w[d]||w[0]:null))?u.y=m+a/2-u.h/2:"bottom"===v?u.y=m+a-u.h:"stretch"===v&&(u.h=a),c.layoutRect(u),h+=s+b,c.recalc&&c.recalc();m+=a+y}}else if(l.w=l.minW,l.h=l.minH,t.layoutRect(l),this.recalc(t),null===t._lastRect){var D=t.parent();D&&(D._lastRect=null,D.recalc())}}}),Pr=ge.extend({renderHtml:function(){var t=this;return t.classes.add("iframe"),t.canFocus=!1,'<iframe id="'+t._id+'" class="'+t.classes+'" tabindex="-1" src="'+(t.settings.url||"javascript:''")+'" frameborder="0"></iframe>'},src:function(t){this.getEl().src=t},html:function(t,e){var n=this,i=this.getEl().contentWindow.document.body;return i?(i.innerHTML=t,e&&e()):c.setTimeout(function(){n.html(t)}),this}}),Dr=ge.extend({init:function(t){this._super(t),this.classes.add("widget").add("infobox"),this.canFocus=!1},severity:function(t){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(t)},help:function(t){this.state.set("help",t)},renderHtml:function(){var t=this,e=t.classPrefix;return'<div id="'+t._id+'" class="'+t.classes+'"><div id="'+t._id+'-body">'+t.encode(t.state.get("text"))+'<button role="button" tabindex="-1"><i class="'+e+"ico "+e+'i-help"></i></button></div></div>'},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl("body").firstChild.data=e.encode(t.value),e.state.get("rendered")&&e.updateLayoutRect()}),e.state.on("change:help",function(t){e.classes.toggle("has-help",t.value),e.state.get("rendered")&&e.updateLayoutRect()}),e._super()}}),Ar=ge.extend({init:function(t){var e=this;e._super(t),e.classes.add("widget").add("label"),e.canFocus=!1,t.multiline&&e.classes.add("autoscroll"),t.strong&&e.classes.add("strong")},initLayoutRect:function(){var t=this,e=t._super();return t.settings.multiline&&(Ht.getSize(t.getEl()).width>e.maxW&&(e.minW=e.maxW,t.classes.add("multiline")),t.getEl().style.width=e.minW+"px",e.startMinH=e.h=e.minH=Math.min(e.maxH,Ht.getSize(t.getEl()).height)),e},repaint:function(){return this.settings.multiline||(this.getEl().style.lineHeight=this.layoutRect().h+"px"),this._super()},severity:function(t){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(t)},renderHtml:function(){var t,e,n=this,i=n.settings.forId,r=n.settings.html?n.settings.html:n.encode(n.state.get("text"));return!i&&(e=n.settings.forName)&&(t=n.getRoot().find("#"+e)[0])&&(i=t._id),i?'<label id="'+n._id+'" class="'+n.classes+'"'+(i?' for="'+i+'"':"")+">"+r+"</label>":'<span id="'+n._id+'" class="'+n.classes+'">'+r+"</span>"},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.innerHtml(e.encode(t.value)),e.state.get("rendered")&&e.updateLayoutRect()}),e._super()}}),Br=Me.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(t){this._super(t),this.classes.add("toolbar")},postRender:function(){return this.items().each(function(t){t.classes.add("toolbar-item")}),this._super()}}),Lr=Br.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}}),Ir=On.extend({init:function(t){var e=this;e._renderOpen=!0,e._super(t),t=e.settings,e.classes.add("menubtn"),t.fixedWidth&&e.classes.add("fixed-width"),e.aria("haspopup",!0),e.state.set("menu",t.menu||e.render())},showMenu:function(t){var e,n=this;if(n.menu&&n.menu.visible()&&!1!==t)return n.hideMenu();n.menu||(e=n.state.get("menu")||[],n.classes.add("opened"),e.length?e={type:"menu",animate:!0,items:e}:(e.type=e.type||"menu",e.animate=!0),e.renderTo?n.menu=e.parent(n).show().renderTo():n.menu=_e.create(e).parent(n).renderTo(),n.fire("createmenu"),n.menu.reflow(),n.menu.on("cancel",function(t){t.control.parent()===n.menu&&(t.stopPropagation(),n.focus(),n.hideMenu())}),n.menu.on("select",function(){n.focus()}),n.menu.on("show hide",function(t){"hide"===t.type&&t.control.parent()===n&&n.classes.remove("opened-under"),t.control===n.menu&&(n.activeMenu("show"===t.type),n.classes.toggle("opened","show"===t.type)),n.aria("expanded","show"===t.type)}).fire("show")),n.menu.show(),n.menu.layoutRect({w:n.layoutRect().w}),n.menu.repaint(),n.menu.moveRel(n.getEl(),n.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"]);var i=n.menu.layoutRect(),r=n.$el.offset().top+n.layoutRect().h;r>i.y&&r<i.y+i.h&&n.classes.add("opened-under"),n.fire("showmenu")},hideMenu:function(){this.menu&&(this.menu.items().each(function(t){t.hideMenu&&t.hideMenu()}),this.menu.hide())},activeMenu:function(t){this.classes.toggle("active",t)},renderHtml:function(){var t,e=this,n=e._id,i=e.classPrefix,r=e.settings.icon,o=e.state.get("text"),s="";return(t=e.settings.image)?(r="none","string"!=typeof t&&(t=_.window.getSelection?t[0]:t[1]),t=" style=\"background-image: url('"+t+"')\""):t="",o&&(e.classes.add("btn-has-text"),s='<span class="'+i+'txt">'+e.encode(o)+"</span>"),r=e.settings.icon?i+"ico "+i+"i-"+r:"",e.aria("role",e.parent()instanceof Lr?"menuitem":"button"),'<div id="'+n+'" class="'+e.classes+'" tabindex="-1" aria-labelledby="'+n+'"><button id="'+n+'-open" role="presentation" type="button" tabindex="-1">'+(r?'<i class="'+r+'"'+t+"></i>":"")+s+' <i class="'+i+'caret"></i></button></div>'},postRender:function(){var r=this;return r.on("click",function(t){t.control===r&&function(t,e){for(;t;){if(e===t)return!0;t=t.parentNode}return!1}(t.target,r.getEl())&&(r.focus(),r.showMenu(!t.aria),t.aria&&r.menu.items().filter(":visible")[0].focus())}),r.on("mouseenter",function(t){var e,n=t.control,i=r.parent();n&&i&&n instanceof Ir&&n.parent()===i&&(i.items().filter("MenuButton").each(function(t){t.hideMenu&&t!==n&&(t.menu&&t.menu.visible()&&(e=!0),t.hideMenu())}),e&&(n.focus(),n.showMenu()))}),r._super()},bindStates:function(){var t=this;return t.state.on("change:menu",function(){t.menu&&t.menu.remove(),t.menu=null}),t._super()},remove:function(){this._super(),this.menu&&this.menu.remove()}});function zr(i,r){var o,s,a=this,l=ae.classPrefix;a.show=function(t,e){function n(){o&&(Tt(i).append('<div class="'+l+"throbber"+(r?" "+l+"throbber-inline":"")+'"></div>'),e&&e())}return a.hide(),o=!0,t?s=c.setTimeout(n,t):n(),a},a.hide=function(){var t=i.lastChild;return c.clearTimeout(s),t&&-1!==t.className.indexOf("throbber")&&t.parentNode.removeChild(t),o=!1,a}}var Fr=ze.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(t){if(t.autohide=!0,t.constrainToViewport=!0,"function"==typeof t.items&&(t.itemsFactory=t.items,t.items=[]),t.itemDefaults)for(var e=t.items,n=e.length;n--;)e[n]=R.extend({},t.itemDefaults,e[n]);this._super(t),this.classes.add("menu"),t.animate&&11!==h.ie&&this.classes.add("animate")},repaint:function(){return this.classes.toggle("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){this.hideAll(),this.fire("select")},load:function(){var e,n=this;function i(){n.throbber&&(n.throbber.hide(),n.throbber=null)}n.settings.itemsFactory&&(n.throbber||(n.throbber=new zr(n.getEl("body"),!0),0===n.items().length?(n.throbber.show(),n.fire("loading")):n.throbber.show(100,function(){n.items().remove(),n.fire("loading")}),n.on("hide close",i)),n.requestTime=e=(new Date).getTime(),n.settings.itemsFactory(function(t){0!==t.length?n.requestTime===e&&(n.getEl().style.width="",n.getEl("body").style.width="",i(),n.items().remove(),n.getEl("body").innerHTML="",n.add(t),n.renderNew(),n.fire("loaded")):n.hide()}))},hideAll:function(){return this.find("menuitem").exec("hideMenu"),this._super()},preRender:function(){var n=this;return n.items().each(function(t){var e=t.settings;if(e.icon||e.image||e.selectable)return!(n._hasIcons=!0)}),n.settings.itemsFactory&&n.on("postrender",function(){n.settings.itemsFactory&&n.load()}),n.on("show hide",function(t){t.control===n&&("show"===t.type?c.setTimeout(function(){n.classes.add("in")},0):n.classes.remove("in"))}),n._super()}}),Ur=Ir.extend({init:function(i){var e,r,o,n,s=this;s._super(i),i=s.settings,s._values=e=i.values,e&&("undefined"!=typeof i.value&&function t(e){for(var n=0;n<e.length;n++){if(r=e[n].selected||i.value===e[n].value)return o=o||e[n].text,s.state.set("value",e[n].value),!0;if(e[n].menu&&t(e[n].menu))return!0}}(e),!r&&0<e.length&&(o=e[0].text,s.state.set("value",e[0].value)),s.state.set("menu",e)),s.state.set("text",i.text||o),s.classes.add("listbox"),s.on("select",function(t){var e=t.control;n&&(t.lastControl=n),i.multiple?e.active(!e.active()):s.value(t.control.value()),n=e})},value:function(n){return 0===arguments.length?this.state.get("value"):(void 0===n||(this.settings.values&&!function e(t){return _t(t,function(t){return t.menu?e(t.menu):t.value===n})}(this.settings.values)?null===n&&this.state.set("value",null):this.state.set("value",n)),this)},bindStates:function(){var i=this;return i.on("show",function(t){var e,n;e=t.control,n=i.value(),e instanceof Fr&&e.items().each(function(t){t.hasMenus()||t.active(t.value()===n)})}),i.state.on("change:value",function(e){var n=function t(e,n){var i;if(e)for(var r=0;r<e.length;r++){if(e[r].value===n)return e[r];if(e[r].menu&&(i=t(e[r].menu,n)))return i}}(i.state.get("menu"),e.value);n?i.text(n.text):i.text(i.settings.text)}),i._super()}}),Vr=ge.extend({Defaults:{border:0,role:"menuitem"},init:function(t){var e,n=this;n._super(t),t=n.settings,n.classes.add("menu-item"),t.menu&&n.classes.add("menu-item-expand"),t.preview&&n.classes.add("menu-item-preview"),"-"!==(e=n.state.get("text"))&&"|"!==e||(n.classes.add("menu-item-sep"),n.aria("role","separator"),n.state.set("text","-")),t.selectable&&(n.aria("role","menuitemcheckbox"),n.classes.add("menu-item-checkbox"),t.icon="selected"),t.preview||t.selectable||n.classes.add("menu-item-normal"),n.on("mousedown",function(t){t.preventDefault()}),t.menu&&!t.ariaHideMenu&&n.aria("haspopup",!0)},hasMenus:function(){return!!this.settings.menu},showMenu:function(){var e,n=this,t=n.settings,i=n.parent();if(i.items().each(function(t){t!==n&&t.hideMenu()}),t.menu){(e=n.menu)?e.show():((e=t.menu).length?e={type:"menu",items:e}:e.type=e.type||"menu",i.settings.itemDefaults&&(e.itemDefaults=i.settings.itemDefaults),(e=n.menu=_e.create(e).parent(n).renderTo()).reflow(),e.on("cancel",function(t){t.stopPropagation(),n.focus(),e.hide()}),e.on("show hide",function(t){t.control.items&&t.control.items().each(function(t){t.active(t.settings.selected)})}).fire("show"),e.on("hide",function(t){t.control===e&&n.classes.remove("selected")}),e.submenu=!0),e._parentMenu=i,e.classes.add("menu-sub");var r=e.testMoveRel(n.getEl(),n.isRtl()?["tl-tr","bl-br","tr-tl","br-bl"]:["tr-tl","br-bl","tl-tr","bl-br"]);e.moveRel(n.getEl(),r),r="menu-sub-"+(e.rel=r),e.classes.remove(e._lastRel).add(r),e._lastRel=r,n.classes.add("selected"),n.aria("expanded",!0)}},hideMenu:function(){var t=this;return t.menu&&(t.menu.items().each(function(t){t.hideMenu&&t.hideMenu()}),t.menu.hide(),t.aria("expanded",!1)),t},renderHtml:function(){var t,e=this,n=e._id,i=e.settings,r=e.classPrefix,o=e.state.get("text"),s=e.settings.icon,a="",l=i.shortcut,u=e.encode(i.url);function c(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function d(t){var e=i.match||"";return e?t.replace(new RegExp(c(e),"gi"),function(t){return"!mce~match["+t+"]mce~match!"}):t}function f(t){return t.replace(new RegExp(c("!mce~match["),"g"),"<b>").replace(new RegExp(c("]mce~match!"),"g"),"</b>")}return s&&e.parent().classes.add("menu-has-icons"),i.image&&(a=" style=\"background-image: url('"+i.image+"')\""),l&&(l=function(t){var e,n,i={};for(i=h.mac?{alt:"&#x2325;",ctrl:"&#x2318;",shift:"&#x21E7;",meta:"&#x2318;"}:{meta:"Ctrl"},t=t.split("+"),e=0;e<t.length;e++)(n=i[t[e].toLowerCase()])&&(t[e]=n);return t.join("+")}(l)),s=r+"ico "+r+"i-"+(e.settings.icon||"none"),t="-"!==o?'<i class="'+s+'"'+a+"></i>\xa0":"",o=f(e.encode(d(o))),u=f(e.encode(d(u))),'<div id="'+n+'" class="'+e.classes+'" tabindex="-1">'+t+("-"!==o?'<span id="'+n+'-text" class="'+r+'text">'+o+"</span>":"")+(l?'<div id="'+n+'-shortcut" class="'+r+'menu-shortcut">'+l+"</div>":"")+(i.menu?'<div class="'+r+'caret"></div>':"")+(u?'<div class="'+r+'menu-item-link">'+u+"</div>":"")+"</div>"},postRender:function(){var e=this,n=e.settings,t=n.textStyle;if("function"==typeof t&&(t=t.call(this)),t){var i=e.getEl("text");i&&(i.setAttribute("style",t),e._textStyle=t)}return e.on("mouseenter click",function(t){t.control===e&&(n.menu||"click"!==t.type?(e.showMenu(),t.aria&&e.menu.focus(!0)):(e.fire("select"),c.requestAnimationFrame(function(){e.parent().hideAll()})))}),e._super(),e},hover:function(){return this.parent().items().each(function(t){t.classes.remove("selected")}),this.classes.toggle("selected",!0),this},active:function(t){return function(t,e){var n=t._textStyle;if(n){var i=t.getEl("text");i.setAttribute("style",n),e&&(i.style.color="",i.style.backgroundColor="")}}(this,t),void 0!==t&&this.aria("checked",t),this._super(t)},remove:function(){this._super(),this.menu&&this.menu.remove()}}),qr=Dn.extend({Defaults:{classes:"radio",role:"radio"}}),Yr=ge.extend({renderHtml:function(){var t=this,e=t.classPrefix;return t.classes.add("resizehandle"),"both"===t.settings.direction&&t.classes.add("resizehandle-both"),t.canFocus=!1,'<div id="'+t._id+'" class="'+t.classes+'"><i class="'+e+"ico "+e+'i-resize"></i></div>'},postRender:function(){var e=this;e._super(),e.resizeDragHelper=new we(this._id,{start:function(){e.fire("ResizeStart")},drag:function(t){"both"!==e.settings.direction&&(t.deltaX=0),e.fire("Resize",t)},stop:function(){e.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}});function $r(t){var e="";if(t)for(var n=0;n<t.length;n++)e+='<option value="'+t[n]+'">'+t[n]+"</option>";return e}var Xr=ge.extend({Defaults:{classes:"selectbox",role:"selectbox",options:[]},init:function(t){var n=this;n._super(t),n.settings.size&&(n.size=n.settings.size),n.settings.options&&(n._options=n.settings.options),n.on("keydown",function(t){var e;13===t.keyCode&&(t.preventDefault(),n.parents().reverse().each(function(t){if(t.toJSON)return e=t,!1}),n.fire("submit",{data:e.toJSON()}))})},options:function(t){return arguments.length?(this.state.set("options",t),this):this.state.get("options")},renderHtml:function(){var t,e=this,n="";return t=$r(e._options),e.size&&(n=' size = "'+e.size+'"'),'<select id="'+e._id+'" class="'+e.classes+'"'+n+">"+t+"</select>"},bindStates:function(){var e=this;return e.state.on("change:options",function(t){e.getEl().innerHTML=$r(t.value)}),e._super()}});function jr(t,e,n){return t<e&&(t=e),n<t&&(t=n),t}function Jr(t,e,n){t.setAttribute("aria-"+e,n)}function Gr(t,e){var n,i,r,o,s;"v"===t.settings.orientation?(r="top",i="height",n="h"):(r="left",i="width",n="w"),s=t.getEl("handle"),o=((t.layoutRect()[n]||100)-Ht.getSize(s)[i])*((e-t._minValue)/(t._maxValue-t._minValue))+"px",s.style[r]=o,s.style.height=t.layoutRect().h+"px",Jr(s,"valuenow",e),Jr(s,"valuetext",""+t.settings.previewFilter(e)),Jr(s,"valuemin",t._minValue),Jr(s,"valuemax",t._maxValue)}var Kr=ge.extend({init:function(t){var e=this;t.previewFilter||(t.previewFilter=function(t){return Math.round(100*t)/100}),e._super(t),e.classes.add("slider"),"v"===t.orientation&&e.classes.add("vertical"),e._minValue=bt(t.minValue)?t.minValue:0,e._maxValue=bt(t.maxValue)?t.maxValue:100,e._initValue=e.state.get("value")},renderHtml:function(){var t=this._id,e=this.classPrefix;return'<div id="'+t+'" class="'+this.classes+'"><div id="'+t+'-handle" class="'+e+'slider-handle" role="slider" tabindex="-1"></div></div>'},reset:function(){this.value(this._initValue).repaint()},postRender:function(){var t,e,n,i,r,o,s,a,l,u,c,d,f,h,m=this;t=m._minValue,e=m._maxValue,"v"===m.settings.orientation?(n="screenY",i="top",r="height",o="h"):(n="screenX",i="left",r="width",o="w"),m._super(),function(o,s){function e(t){var e,n,i,r;e=jr(e=(((e=m.value())+(r=n=o))/((i=s)-r)+.05*t)*(i-n)-n,o,s),m.value(e),m.fire("dragstart",{value:e}),m.fire("drag",{value:e}),m.fire("dragend",{value:e})}m.on("keydown",function(t){switch(t.keyCode){case 37:case 38:e(-1);break;case 39:case 40:e(1)}})}(t,e),s=t,a=e,l=m.getEl("handle"),m._dragHelper=new we(m._id,{handle:m._id+"-handle",start:function(t){u=t[n],c=parseInt(m.getEl("handle").style[i],10),d=(m.layoutRect()[o]||100)-Ht.getSize(l)[r],m.fire("dragstart",{value:h})},drag:function(t){var e=t[n]-u;f=jr(c+e,0,d),l.style[i]=f+"px",h=s+f/d*(a-s),m.value(h),m.tooltip().text(""+m.settings.previewFilter(h)).show().moveRel(l,"bc tc"),m.fire("drag",{value:h})},stop:function(){m.tooltip().hide(),m.fire("dragend",{value:h})}})},repaint:function(){this._super(),Gr(this,this.value())},bindStates:function(){var e=this;return e.state.on("change:value",function(t){Gr(e,t.value)}),e._super()}}),Zr=ge.extend({renderHtml:function(){return this.classes.add("spacer"),this.canFocus=!1,'<div id="'+this._id+'" class="'+this.classes+'"></div>'}}),Qr=Ir.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var t,e,n=this.getEl(),i=this.layoutRect();return this._super(),t=n.firstChild,e=n.lastChild,Tt(t).css({width:i.w-Ht.getSize(e).width,height:i.h-2}),Tt(e).css({height:i.h-2}),this},activeMenu:function(t){Tt(this.getEl().lastChild).toggleClass(this.classPrefix+"active",t)},renderHtml:function(){var t,e,n=this,i=n._id,r=n.classPrefix,o=n.state.get("icon"),s=n.state.get("text"),a=n.settings,l="";return(t=a.image)?(o="none","string"!=typeof t&&(t=_.window.getSelection?t[0]:t[1]),t=" style=\"background-image: url('"+t+"')\""):t="",o=a.icon?r+"ico "+r+"i-"+o:"",s&&(n.classes.add("btn-has-text"),l='<span class="'+r+'txt">'+n.encode(s)+"</span>"),e="boolean"==typeof a.active?' aria-pressed="'+a.active+'"':"",'<div id="'+i+'" class="'+n.classes+'" role="button"'+e+' tabindex="-1"><button type="button" hidefocus="1" tabindex="-1">'+(o?'<i class="'+o+'"'+t+"></i>":"")+l+'</button><button type="button" class="'+r+'open" hidefocus="1" tabindex="-1">'+(n._menuBtnText?(o?"\xa0":"")+n._menuBtnText:"")+' <i class="'+r+'caret"></i></button></div>'},postRender:function(){var n=this.settings.onclick;return this.on("click",function(t){var e=t.target;if(t.control===this)for(;e;){if(t.aria&&"down"!==t.aria.key||"BUTTON"===e.nodeName&&-1===e.className.indexOf("open"))return t.stopImmediatePropagation(),void(n&&n.call(this,t));e=e.parentNode}}),delete this.settings.onclick,this._super()}}),to=ir.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"},isNative:function(){return!0}}),eo=Oe.extend({Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(n){var t;this.activeTabId&&(t=this.getEl(this.activeTabId),Tt(t).removeClass(this.classPrefix+"active"),t.setAttribute("aria-selected","false")),this.activeTabId="t"+n,(t=this.getEl("t"+n)).setAttribute("aria-selected","true"),Tt(t).addClass(this.classPrefix+"active"),this.items()[n].show().fire("showtab"),this.reflow(),this.items().each(function(t,e){n!==e&&t.hide()})},renderHtml:function(){var i=this,t=i._layout,r="",o=i.classPrefix;return i.preRender(),t.preRender(i),i.items().each(function(t,e){var n=i._id+"-t"+e;t.aria("role","tabpanel"),t.aria("labelledby",n),r+='<div id="'+n+'" class="'+o+'tab" unselectable="on" role="tab" aria-controls="'+t._id+'" aria-selected="false" tabIndex="-1">'+i.encode(t.settings.title)+"</div>"}),'<div id="'+i._id+'" class="'+i.classes+'" hidefocus="1" tabindex="-1"><div id="'+i._id+'-head" class="'+o+'tabs" role="tablist">'+r+'</div><div id="'+i._id+'-body" class="'+i.bodyClasses+'">'+t.renderHtml(i)+"</div></div>"},postRender:function(){var i=this;i._super(),i.settings.activeTab=i.settings.activeTab||0,i.activateTab(i.settings.activeTab),this.on("click",function(t){var e=t.target.parentNode;if(e&&e.id===i._id+"-head")for(var n=e.childNodes.length;n--;)e.childNodes[n]===t.target&&i.activateTab(n)})},initLayoutRect:function(){var t,e,n,i=this;e=(e=Ht.getSize(i.getEl("head")).width)<0?0:e,n=0,i.items().each(function(t){e=Math.max(e,t.layoutRect().minW),n=Math.max(n,t.layoutRect().minH)}),i.items().each(function(t){t.settings.x=0,t.settings.y=0,t.settings.w=e,t.settings.h=n,t.layoutRect({x:0,y:0,w:e,h:n})});var r=Ht.getSize(i.getEl("head")).height;return i.settings.minWidth=e,i.settings.minHeight=n+r,(t=i._super()).deltaH+=r,t.innerH=t.h-t.deltaH,t}}),no=ge.extend({init:function(t){var n=this;n._super(t),n.classes.add("textbox"),t.multiline?n.classes.add("multiline"):(n.on("keydown",function(t){var e;13===t.keyCode&&(t.preventDefault(),n.parents().reverse().each(function(t){if(t.toJSON)return e=t,!1}),n.fire("submit",{data:e.toJSON()}))}),n.on("keyup",function(t){n.state.set("value",t.target.value)}))},repaint:function(){var t,e,n,i,r,o=this,s=0;t=o.getEl().style,e=o._layoutRect,r=o._lastRepaintRect||{};var a=_.document;return!o.settings.multiline&&a.all&&(!a.documentMode||a.documentMode<=8)&&(t.lineHeight=e.h-s+"px"),i=(n=o.borderBox).left+n.right+8,s=n.top+n.bottom+(o.settings.multiline?8:0),e.x!==r.x&&(t.left=e.x+"px",r.x=e.x),e.y!==r.y&&(t.top=e.y+"px",r.y=e.y),e.w!==r.w&&(t.width=e.w-i+"px",r.w=e.w),e.h!==r.h&&(t.height=e.h-s+"px",r.h=e.h),o._lastRepaintRect=r,o.fire("repaint",{},!1),o},renderHtml:function(){var e,t,n=this,i=n.settings;return e={id:n._id,hidefocus:"1"},R.each(["rows","spellcheck","maxLength","size","readonly","min","max","step","list","pattern","placeholder","required","multiple"],function(t){e[t]=i[t]}),n.disabled()&&(e.disabled="disabled"),i.subtype&&(e.type=i.subtype),(t=Ht.create(i.multiline?"textarea":"input",e)).value=n.state.get("value"),t.className=n.classes.toString(),t.outerHTML},value:function(t){return arguments.length?(this.state.set("value",t),this):(this.state.get("rendered")&&this.state.set("value",this.getEl().value),this.state.get("value"))},postRender:function(){var e=this;e.getEl().value=e.state.get("value"),e._super(),e.$el.on("change",function(t){e.state.set("value",t.target.value),e.fire("change",t)})},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.getEl().value!==t.value&&(e.getEl().value=t.value)}),e.state.on("change:disabled",function(t){e.getEl().disabled=t.value}),e._super()},remove:function(){this.$el.off(),this._super()}}),io=function(){return{Selector:Ft,Collection:qt,ReflowQueue:Zt,Control:ae,Factory:_e,KeyboardNavigation:Ce,Container:Me,DragHelper:we,Scrollable:Ne,Panel:Oe,Movable:he,Resizable:We,FloatPanel:ze,Window:$e,MessageBox:Ge,Tooltip:me,Widget:ge,Progress:pe,Notification:be,Layout:Mn,AbsoluteLayout:Nn,Button:On,ButtonGroup:Pn,Checkbox:Dn,ComboBox:Bn,ColorBox:Ln,PanelButton:In,ColorButton:Fn,ColorPicker:Vn,Path:Yn,ElementPath:$n,FormItem:Xn,Form:jn,FieldSet:Jn,FilePicker:tr,FitLayout:er,FlexLayout:nr,FlowLayout:ir,FormatControls:Or,GridLayout:Wr,Iframe:Pr,InfoBox:Dr,Label:Ar,Toolbar:Br,MenuBar:Lr,MenuButton:Ir,MenuItem:Vr,Throbber:zr,Menu:Fr,ListBox:Ur,Radio:qr,ResizeHandle:Yr,SelectBox:Xr,Slider:Kr,Spacer:Zr,SplitButton:Qr,StackLayout:to,TabPanel:eo,TextBox:no,DropZone:qn,BrowseButton:Wn}},ro=function(n){n.ui?R.each(io(),function(t,e){n.ui[e]=t}):n.ui=io()};R.each(io(),function(t,e){_e.add(e,t)}),ro(window.tinymce?window.tinymce:{}),r.add("inlite",function(t){var e=Sn();return Or.setup(t),_n(t,e),Ke(t,e)})}(window);                                                                                                                                                                                                                             tinymce/themes/modern/theme.js                                                                      0000644                 00001150123 15212564050 0012430 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       (function () {
var modern = (function (domGlobals) {
    'use strict';

    var global = tinymce.util.Tools.resolve('tinymce.ThemeManager');

    var global$1 = tinymce.util.Tools.resolve('tinymce.EditorManager');

    var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');

    var isBrandingEnabled = function (editor) {
      return editor.getParam('branding', true, 'boolean');
    };
    var hasMenubar = function (editor) {
      return getMenubar(editor) !== false;
    };
    var getMenubar = function (editor) {
      return editor.getParam('menubar');
    };
    var hasStatusbar = function (editor) {
      return editor.getParam('statusbar', true, 'boolean');
    };
    var getToolbarSize = function (editor) {
      return editor.getParam('toolbar_items_size');
    };
    var isReadOnly = function (editor) {
      return editor.getParam('readonly', false, 'boolean');
    };
    var getFixedToolbarContainer = function (editor) {
      return editor.getParam('fixed_toolbar_container');
    };
    var getInlineToolbarPositionHandler = function (editor) {
      return editor.getParam('inline_toolbar_position_handler');
    };
    var getMenu = function (editor) {
      return editor.getParam('menu');
    };
    var getRemovedMenuItems = function (editor) {
      return editor.getParam('removed_menuitems', '');
    };
    var getMinWidth = function (editor) {
      return editor.getParam('min_width', 100, 'number');
    };
    var getMinHeight = function (editor) {
      return editor.getParam('min_height', 100, 'number');
    };
    var getMaxWidth = function (editor) {
      return editor.getParam('max_width', 65535, 'number');
    };
    var getMaxHeight = function (editor) {
      return editor.getParam('max_height', 65535, 'number');
    };
    var isSkinDisabled = function (editor) {
      return editor.settings.skin === false;
    };
    var isInline = function (editor) {
      return editor.getParam('inline', false, 'boolean');
    };
    var getResize = function (editor) {
      var resize = editor.getParam('resize', 'vertical');
      if (resize === false) {
        return 'none';
      } else if (resize === 'both') {
        return 'both';
      } else {
        return 'vertical';
      }
    };
    var getSkinUrl = function (editor) {
      var settings = editor.settings;
      var skin = settings.skin;
      var skinUrl = settings.skin_url;
      if (skin !== false) {
        var skinName = skin ? skin : 'lightgray';
        if (skinUrl) {
          skinUrl = editor.documentBaseURI.toAbsolute(skinUrl);
        } else {
          skinUrl = global$1.baseURL + '/skins/' + skinName;
        }
      }
      return skinUrl;
    };
    var getIndexedToolbars = function (settings, defaultToolbar) {
      var toolbars = [];
      for (var i = 1; i < 10; i++) {
        var toolbar = settings['toolbar' + i];
        if (!toolbar) {
          break;
        }
        toolbars.push(toolbar);
      }
      var mainToolbar = settings.toolbar ? [settings.toolbar] : [defaultToolbar];
      return toolbars.length > 0 ? toolbars : mainToolbar;
    };
    var getToolbars = function (editor) {
      var toolbar = editor.getParam('toolbar');
      var defaultToolbar = 'undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image';
      if (toolbar === false) {
        return [];
      } else if (global$2.isArray(toolbar)) {
        return global$2.grep(toolbar, function (toolbar) {
          return toolbar.length > 0;
        });
      } else {
        return getIndexedToolbars(editor.settings, defaultToolbar);
      }
    };

    var global$3 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');

    var global$4 = tinymce.util.Tools.resolve('tinymce.ui.Factory');

    var global$5 = tinymce.util.Tools.resolve('tinymce.util.I18n');

    var fireSkinLoaded = function (editor) {
      return editor.fire('SkinLoaded');
    };
    var fireResizeEditor = function (editor) {
      return editor.fire('ResizeEditor');
    };
    var fireBeforeRenderUI = function (editor) {
      return editor.fire('BeforeRenderUI');
    };
    var Events = {
      fireSkinLoaded: fireSkinLoaded,
      fireResizeEditor: fireResizeEditor,
      fireBeforeRenderUI: fireBeforeRenderUI
    };

    var focus = function (panel, type) {
      return function () {
        var item = panel.find(type)[0];
        if (item) {
          item.focus(true);
        }
      };
    };
    var addKeys = function (editor, panel) {
      editor.shortcuts.add('Alt+F9', '', focus(panel, 'menubar'));
      editor.shortcuts.add('Alt+F10,F10', '', focus(panel, 'toolbar'));
      editor.shortcuts.add('Alt+F11', '', focus(panel, 'elementpath'));
      panel.on('cancel', function () {
        editor.focus();
      });
    };
    var A11y = { addKeys: addKeys };

    var global$6 = tinymce.util.Tools.resolve('tinymce.geom.Rect');

    var global$7 = tinymce.util.Tools.resolve('tinymce.util.Delay');

    var noop = function () {
    };
    var constant = function (value) {
      return function () {
        return value;
      };
    };
    var never = constant(false);
    var always = constant(true);

    var none = function () {
      return NONE;
    };
    var NONE = function () {
      var eq = function (o) {
        return o.isNone();
      };
      var call = function (thunk) {
        return thunk();
      };
      var id = function (n) {
        return n;
      };
      var me = {
        fold: function (n, s) {
          return n();
        },
        is: never,
        isSome: never,
        isNone: always,
        getOr: id,
        getOrThunk: call,
        getOrDie: function (msg) {
          throw new Error(msg || 'error: getOrDie called on none.');
        },
        getOrNull: constant(null),
        getOrUndefined: constant(undefined),
        or: id,
        orThunk: call,
        map: none,
        each: noop,
        bind: none,
        exists: never,
        forall: always,
        filter: none,
        equals: eq,
        equals_: eq,
        toArray: function () {
          return [];
        },
        toString: constant('none()')
      };
      if (Object.freeze) {
        Object.freeze(me);
      }
      return me;
    }();
    var some = function (a) {
      var constant_a = constant(a);
      var self = function () {
        return me;
      };
      var bind = function (f) {
        return f(a);
      };
      var me = {
        fold: function (n, s) {
          return s(a);
        },
        is: function (v) {
          return a === v;
        },
        isSome: always,
        isNone: never,
        getOr: constant_a,
        getOrThunk: constant_a,
        getOrDie: constant_a,
        getOrNull: constant_a,
        getOrUndefined: constant_a,
        or: self,
        orThunk: self,
        map: function (f) {
          return some(f(a));
        },
        each: function (f) {
          f(a);
        },
        bind: bind,
        exists: bind,
        forall: bind,
        filter: function (f) {
          return f(a) ? me : NONE;
        },
        toArray: function () {
          return [a];
        },
        toString: function () {
          return 'some(' + a + ')';
        },
        equals: function (o) {
          return o.is(a);
        },
        equals_: function (o, elementEq) {
          return o.fold(never, function (b) {
            return elementEq(a, b);
          });
        }
      };
      return me;
    };
    var from = function (value) {
      return value === null || value === undefined ? NONE : some(value);
    };
    var Option = {
      some: some,
      none: none,
      from: from
    };

    var getUiContainerDelta = function (ctrl) {
      var uiContainer = getUiContainer(ctrl);
      if (uiContainer && global$3.DOM.getStyle(uiContainer, 'position', true) !== 'static') {
        var containerPos = global$3.DOM.getPos(uiContainer);
        var dx = uiContainer.scrollLeft - containerPos.x;
        var dy = uiContainer.scrollTop - containerPos.y;
        return Option.some({
          x: dx,
          y: dy
        });
      } else {
        return Option.none();
      }
    };
    var setUiContainer = function (editor, ctrl) {
      var uiContainer = global$3.DOM.select(editor.settings.ui_container)[0];
      ctrl.getRoot().uiContainer = uiContainer;
    };
    var getUiContainer = function (ctrl) {
      return ctrl ? ctrl.getRoot().uiContainer : null;
    };
    var inheritUiContainer = function (fromCtrl, toCtrl) {
      return toCtrl.uiContainer = getUiContainer(fromCtrl);
    };
    var UiContainer = {
      getUiContainerDelta: getUiContainerDelta,
      setUiContainer: setUiContainer,
      getUiContainer: getUiContainer,
      inheritUiContainer: inheritUiContainer
    };

    var createToolbar = function (editor, items, size) {
      var toolbarItems = [];
      var buttonGroup;
      if (!items) {
        return;
      }
      global$2.each(items.split(/[ ,]/), function (item) {
        var itemName;
        var bindSelectorChanged = function () {
          var selection = editor.selection;
          if (item.settings.stateSelector) {
            selection.selectorChanged(item.settings.stateSelector, function (state) {
              item.active(state);
            }, true);
          }
          if (item.settings.disabledStateSelector) {
            selection.selectorChanged(item.settings.disabledStateSelector, function (state) {
              item.disabled(state);
            });
          }
        };
        if (item === '|') {
          buttonGroup = null;
        } else {
          if (!buttonGroup) {
            buttonGroup = {
              type: 'buttongroup',
              items: []
            };
            toolbarItems.push(buttonGroup);
          }
          if (editor.buttons[item]) {
            itemName = item;
            item = editor.buttons[itemName];
            if (typeof item === 'function') {
              item = item();
            }
            item.type = item.type || 'button';
            item.size = size;
            item = global$4.create(item);
            buttonGroup.items.push(item);
            if (editor.initialized) {
              bindSelectorChanged();
            } else {
              editor.on('init', bindSelectorChanged);
            }
          }
        }
      });
      return {
        type: 'toolbar',
        layout: 'flow',
        items: toolbarItems
      };
    };
    var createToolbars = function (editor, size) {
      var toolbars = [];
      var addToolbar = function (items) {
        if (items) {
          toolbars.push(createToolbar(editor, items, size));
        }
      };
      global$2.each(getToolbars(editor), function (toolbar) {
        addToolbar(toolbar);
      });
      if (toolbars.length) {
        return {
          type: 'panel',
          layout: 'stack',
          classes: 'toolbar-grp',
          ariaRoot: true,
          ariaRemember: true,
          items: toolbars
        };
      }
    };
    var Toolbar = {
      createToolbar: createToolbar,
      createToolbars: createToolbars
    };

    var DOM = global$3.DOM;
    var toClientRect = function (geomRect) {
      return {
        left: geomRect.x,
        top: geomRect.y,
        width: geomRect.w,
        height: geomRect.h,
        right: geomRect.x + geomRect.w,
        bottom: geomRect.y + geomRect.h
      };
    };
    var hideAllFloatingPanels = function (editor) {
      global$2.each(editor.contextToolbars, function (toolbar) {
        if (toolbar.panel) {
          toolbar.panel.hide();
        }
      });
    };
    var movePanelTo = function (panel, pos) {
      panel.moveTo(pos.left, pos.top);
    };
    var togglePositionClass = function (panel, relPos, predicate) {
      relPos = relPos ? relPos.substr(0, 2) : '';
      global$2.each({
        t: 'down',
        b: 'up'
      }, function (cls, pos) {
        panel.classes.toggle('arrow-' + cls, predicate(pos, relPos.substr(0, 1)));
      });
      global$2.each({
        l: 'left',
        r: 'right'
      }, function (cls, pos) {
        panel.classes.toggle('arrow-' + cls, predicate(pos, relPos.substr(1, 1)));
      });
    };
    var userConstrain = function (handler, x, y, elementRect, contentAreaRect, panelRect) {
      panelRect = toClientRect({
        x: x,
        y: y,
        w: panelRect.w,
        h: panelRect.h
      });
      if (handler) {
        panelRect = handler({
          elementRect: toClientRect(elementRect),
          contentAreaRect: toClientRect(contentAreaRect),
          panelRect: panelRect
        });
      }
      return panelRect;
    };
    var addContextualToolbars = function (editor) {
      var scrollContainer;
      var getContextToolbars = function () {
        return editor.contextToolbars || [];
      };
      var getElementRect = function (elm) {
        var pos, targetRect, root;
        pos = DOM.getPos(editor.getContentAreaContainer());
        targetRect = editor.dom.getRect(elm);
        root = editor.dom.getRoot();
        if (root.nodeName === 'BODY') {
          targetRect.x -= root.ownerDocument.documentElement.scrollLeft || root.scrollLeft;
          targetRect.y -= root.ownerDocument.documentElement.scrollTop || root.scrollTop;
        }
        targetRect.x += pos.x;
        targetRect.y += pos.y;
        return targetRect;
      };
      var reposition = function (match, shouldShow) {
        var relPos, panelRect, elementRect, contentAreaRect, panel, relRect, testPositions, smallElementWidthThreshold;
        var handler = getInlineToolbarPositionHandler(editor);
        if (editor.removed) {
          return;
        }
        if (!match || !match.toolbar.panel) {
          hideAllFloatingPanels(editor);
          return;
        }
        testPositions = [
          'bc-tc',
          'tc-bc',
          'tl-bl',
          'bl-tl',
          'tr-br',
          'br-tr'
        ];
        panel = match.toolbar.panel;
        if (shouldShow) {
          panel.show();
        }
        elementRect = getElementRect(match.element);
        panelRect = DOM.getRect(panel.getEl());
        contentAreaRect = DOM.getRect(editor.getContentAreaContainer() || editor.getBody());
        var delta = UiContainer.getUiContainerDelta(panel).getOr({
          x: 0,
          y: 0
        });
        elementRect.x += delta.x;
        elementRect.y += delta.y;
        panelRect.x += delta.x;
        panelRect.y += delta.y;
        contentAreaRect.x += delta.x;
        contentAreaRect.y += delta.y;
        smallElementWidthThreshold = 25;
        if (DOM.getStyle(match.element, 'display', true) !== 'inline') {
          var clientRect = match.element.getBoundingClientRect();
          elementRect.w = clientRect.width;
          elementRect.h = clientRect.height;
        }
        if (!editor.inline) {
          contentAreaRect.w = editor.getDoc().documentElement.offsetWidth;
        }
        if (editor.selection.controlSelection.isResizable(match.element) && elementRect.w < smallElementWidthThreshold) {
          elementRect = global$6.inflate(elementRect, 0, 8);
        }
        relPos = global$6.findBestRelativePosition(panelRect, elementRect, contentAreaRect, testPositions);
        elementRect = global$6.clamp(elementRect, contentAreaRect);
        if (relPos) {
          relRect = global$6.relativePosition(panelRect, elementRect, relPos);
          movePanelTo(panel, userConstrain(handler, relRect.x, relRect.y, elementRect, contentAreaRect, panelRect));
        } else {
          contentAreaRect.h += panelRect.h;
          elementRect = global$6.intersect(contentAreaRect, elementRect);
          if (elementRect) {
            relPos = global$6.findBestRelativePosition(panelRect, elementRect, contentAreaRect, [
              'bc-tc',
              'bl-tl',
              'br-tr'
            ]);
            if (relPos) {
              relRect = global$6.relativePosition(panelRect, elementRect, relPos);
              movePanelTo(panel, userConstrain(handler, relRect.x, relRect.y, elementRect, contentAreaRect, panelRect));
            } else {
              movePanelTo(panel, userConstrain(handler, elementRect.x, elementRect.y, elementRect, contentAreaRect, panelRect));
            }
          } else {
            panel.hide();
          }
        }
        togglePositionClass(panel, relPos, function (pos1, pos2) {
          return pos1 === pos2;
        });
      };
      var repositionHandler = function (show) {
        return function () {
          var execute = function () {
            if (editor.selection) {
              reposition(findFrontMostMatch(editor.selection.getNode()), show);
            }
          };
          global$7.requestAnimationFrame(execute);
        };
      };
      var bindScrollEvent = function (panel) {
        if (!scrollContainer) {
          var reposition_1 = repositionHandler(true);
          var uiContainer_1 = UiContainer.getUiContainer(panel);
          scrollContainer = editor.selection.getScrollContainer() || editor.getWin();
          DOM.bind(scrollContainer, 'scroll', reposition_1);
          DOM.bind(uiContainer_1, 'scroll', reposition_1);
          editor.on('remove', function () {
            DOM.unbind(scrollContainer, 'scroll', reposition_1);
            DOM.unbind(uiContainer_1, 'scroll', reposition_1);
          });
        }
      };
      var showContextToolbar = function (match) {
        var panel;
        if (match.toolbar.panel) {
          match.toolbar.panel.show();
          reposition(match);
          return;
        }
        panel = global$4.create({
          type: 'floatpanel',
          role: 'dialog',
          classes: 'tinymce tinymce-inline arrow',
          ariaLabel: 'Inline toolbar',
          layout: 'flex',
          direction: 'column',
          align: 'stretch',
          autohide: false,
          autofix: true,
          fixed: true,
          border: 1,
          items: Toolbar.createToolbar(editor, match.toolbar.items),
          oncancel: function () {
            editor.focus();
          }
        });
        UiContainer.setUiContainer(editor, panel);
        bindScrollEvent(panel);
        match.toolbar.panel = panel;
        panel.renderTo().reflow();
        reposition(match);
      };
      var hideAllContextToolbars = function () {
        global$2.each(getContextToolbars(), function (toolbar) {
          if (toolbar.panel) {
            toolbar.panel.hide();
          }
        });
      };
      var findFrontMostMatch = function (targetElm) {
        var i, y, parentsAndSelf;
        var toolbars = getContextToolbars();
        parentsAndSelf = editor.$(targetElm).parents().add(targetElm);
        for (i = parentsAndSelf.length - 1; i >= 0; i--) {
          for (y = toolbars.length - 1; y >= 0; y--) {
            if (toolbars[y].predicate(parentsAndSelf[i])) {
              return {
                toolbar: toolbars[y],
                element: parentsAndSelf[i]
              };
            }
          }
        }
        return null;
      };
      editor.on('click keyup setContent ObjectResized', function (e) {
        if (e.type === 'setcontent' && !e.selection) {
          return;
        }
        global$7.setEditorTimeout(editor, function () {
          var match;
          match = findFrontMostMatch(editor.selection.getNode());
          if (match) {
            hideAllContextToolbars();
            showContextToolbar(match);
          } else {
            hideAllContextToolbars();
          }
        });
      });
      editor.on('blur hide contextmenu', hideAllContextToolbars);
      editor.on('ObjectResizeStart', function () {
        var match = findFrontMostMatch(editor.selection.getNode());
        if (match && match.toolbar.panel) {
          match.toolbar.panel.hide();
        }
      });
      editor.on('ResizeEditor ResizeWindow', repositionHandler(true));
      editor.on('nodeChange', repositionHandler(false));
      editor.on('remove', function () {
        global$2.each(getContextToolbars(), function (toolbar) {
          if (toolbar.panel) {
            toolbar.panel.remove();
          }
        });
        editor.contextToolbars = {};
      });
      editor.shortcuts.add('ctrl+F9', '', function () {
        var match = findFrontMostMatch(editor.selection.getNode());
        if (match && match.toolbar.panel) {
          match.toolbar.panel.items()[0].focus();
        }
      });
    };
    var ContextToolbars = { addContextualToolbars: addContextualToolbars };

    var typeOf = function (x) {
      if (x === null) {
        return 'null';
      }
      var t = typeof x;
      if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
        return 'array';
      }
      if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
        return 'string';
      }
      return t;
    };
    var isType = function (type) {
      return function (value) {
        return typeOf(value) === type;
      };
    };
    var isArray = isType('array');
    var isFunction = isType('function');
    var isNumber = isType('number');

    var nativeSlice = Array.prototype.slice;
    var nativeIndexOf = Array.prototype.indexOf;
    var nativePush = Array.prototype.push;
    var rawIndexOf = function (ts, t) {
      return nativeIndexOf.call(ts, t);
    };
    var indexOf = function (xs, x) {
      var r = rawIndexOf(xs, x);
      return r === -1 ? Option.none() : Option.some(r);
    };
    var exists = function (xs, pred) {
      for (var i = 0, len = xs.length; i < len; i++) {
        var x = xs[i];
        if (pred(x, i)) {
          return true;
        }
      }
      return false;
    };
    var map = function (xs, f) {
      var len = xs.length;
      var r = new Array(len);
      for (var i = 0; i < len; i++) {
        var x = xs[i];
        r[i] = f(x, i);
      }
      return r;
    };
    var each = function (xs, f) {
      for (var i = 0, len = xs.length; i < len; i++) {
        var x = xs[i];
        f(x, i);
      }
    };
    var filter = function (xs, pred) {
      var r = [];
      for (var i = 0, len = xs.length; i < len; i++) {
        var x = xs[i];
        if (pred(x, i)) {
          r.push(x);
        }
      }
      return r;
    };
    var foldl = function (xs, f, acc) {
      each(xs, function (x) {
        acc = f(acc, x);
      });
      return acc;
    };
    var find = function (xs, pred) {
      for (var i = 0, len = xs.length; i < len; i++) {
        var x = xs[i];
        if (pred(x, i)) {
          return Option.some(x);
        }
      }
      return Option.none();
    };
    var findIndex = function (xs, pred) {
      for (var i = 0, len = xs.length; i < len; i++) {
        var x = xs[i];
        if (pred(x, i)) {
          return Option.some(i);
        }
      }
      return Option.none();
    };
    var flatten = function (xs) {
      var r = [];
      for (var i = 0, len = xs.length; i < len; ++i) {
        if (!isArray(xs[i])) {
          throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
        }
        nativePush.apply(r, xs[i]);
      }
      return r;
    };
    var from$1 = isFunction(Array.from) ? Array.from : function (x) {
      return nativeSlice.call(x);
    };

    var defaultMenus = {
      file: {
        title: 'File',
        items: 'newdocument restoredraft | preview | print'
      },
      edit: {
        title: 'Edit',
        items: 'undo redo | cut copy paste pastetext | selectall'
      },
      view: {
        title: 'View',
        items: 'code | visualaid visualchars visualblocks | spellchecker | preview fullscreen'
      },
      insert: {
        title: 'Insert',
        items: 'image link media template codesample inserttable | charmap hr | pagebreak nonbreaking anchor toc | insertdatetime'
      },
      format: {
        title: 'Format',
        items: 'bold italic underline strikethrough superscript subscript codeformat | blockformats align | removeformat'
      },
      tools: {
        title: 'Tools',
        items: 'spellchecker spellcheckerlanguage | a11ycheck code'
      },
      table: { title: 'Table' },
      help: { title: 'Help' }
    };
    var delimiterMenuNamePair = function () {
      return {
        name: '|',
        item: { text: '|' }
      };
    };
    var createMenuNameItemPair = function (name, item) {
      var menuItem = item ? {
        name: name,
        item: item
      } : null;
      return name === '|' ? delimiterMenuNamePair() : menuItem;
    };
    var hasItemName = function (namedMenuItems, name) {
      return findIndex(namedMenuItems, function (namedMenuItem) {
        return namedMenuItem.name === name;
      }).isSome();
    };
    var isSeparator = function (namedMenuItem) {
      return namedMenuItem && namedMenuItem.item.text === '|';
    };
    var cleanupMenu = function (namedMenuItems, removedMenuItems) {
      var menuItemsPass1 = filter(namedMenuItems, function (namedMenuItem) {
        return removedMenuItems.hasOwnProperty(namedMenuItem.name) === false;
      });
      var menuItemsPass2 = filter(menuItemsPass1, function (namedMenuItem, i) {
        return !isSeparator(namedMenuItem) || !isSeparator(menuItemsPass1[i - 1]);
      });
      return filter(menuItemsPass2, function (namedMenuItem, i) {
        return !isSeparator(namedMenuItem) || i > 0 && i < menuItemsPass2.length - 1;
      });
    };
    var createMenu = function (editorMenuItems, menus, removedMenuItems, context) {
      var menuButton, menu, namedMenuItems, isUserDefined;
      if (menus) {
        menu = menus[context];
        isUserDefined = true;
      } else {
        menu = defaultMenus[context];
      }
      if (menu) {
        menuButton = { text: menu.title };
        namedMenuItems = [];
        global$2.each((menu.items || '').split(/[ ,]/), function (name) {
          var namedMenuItem = createMenuNameItemPair(name, editorMenuItems[name]);
          if (namedMenuItem) {
            namedMenuItems.push(namedMenuItem);
          }
        });
        if (!isUserDefined) {
          global$2.each(editorMenuItems, function (item, name) {
            if (item.context === context && !hasItemName(namedMenuItems, name)) {
              if (item.separator === 'before') {
                namedMenuItems.push(delimiterMenuNamePair());
              }
              if (item.prependToContext) {
                namedMenuItems.unshift(createMenuNameItemPair(name, item));
              } else {
                namedMenuItems.push(createMenuNameItemPair(name, item));
              }
              if (item.separator === 'after') {
                namedMenuItems.push(delimiterMenuNamePair());
              }
            }
          });
        }
        menuButton.menu = map(cleanupMenu(namedMenuItems, removedMenuItems), function (menuItem) {
          return menuItem.item;
        });
        if (!menuButton.menu.length) {
          return null;
        }
      }
      return menuButton;
    };
    var getDefaultMenubar = function (editor) {
      var name;
      var defaultMenuBar = [];
      var menu = getMenu(editor);
      if (menu) {
        for (name in menu) {
          defaultMenuBar.push(name);
        }
      } else {
        for (name in defaultMenus) {
          defaultMenuBar.push(name);
        }
      }
      return defaultMenuBar;
    };
    var createMenuButtons = function (editor) {
      var menuButtons = [];
      var defaultMenuBar = getDefaultMenubar(editor);
      var removedMenuItems = global$2.makeMap(getRemovedMenuItems(editor).split(/[ ,]/));
      var menubar = getMenubar(editor);
      var enabledMenuNames = typeof menubar === 'string' ? menubar.split(/[ ,]/) : defaultMenuBar;
      for (var i = 0; i < enabledMenuNames.length; i++) {
        var menuItems = enabledMenuNames[i];
        var menu = createMenu(editor.menuItems, getMenu(editor), removedMenuItems, menuItems);
        if (menu) {
          menuButtons.push(menu);
        }
      }
      return menuButtons;
    };
    var Menubar = { createMenuButtons: createMenuButtons };

    var DOM$1 = global$3.DOM;
    var getSize = function (elm) {
      return {
        width: elm.clientWidth,
        height: elm.clientHeight
      };
    };
    var resizeTo = function (editor, width, height) {
      var containerElm, iframeElm, containerSize, iframeSize;
      containerElm = editor.getContainer();
      iframeElm = editor.getContentAreaContainer().firstChild;
      containerSize = getSize(containerElm);
      iframeSize = getSize(iframeElm);
      if (width !== null) {
        width = Math.max(getMinWidth(editor), width);
        width = Math.min(getMaxWidth(editor), width);
        DOM$1.setStyle(containerElm, 'width', width + (containerSize.width - iframeSize.width));
        DOM$1.setStyle(iframeElm, 'width', width);
      }
      height = Math.max(getMinHeight(editor), height);
      height = Math.min(getMaxHeight(editor), height);
      DOM$1.setStyle(iframeElm, 'height', height);
      Events.fireResizeEditor(editor);
    };
    var resizeBy = function (editor, dw, dh) {
      var elm = editor.getContentAreaContainer();
      resizeTo(editor, elm.clientWidth + dw, elm.clientHeight + dh);
    };
    var Resize = {
      resizeTo: resizeTo,
      resizeBy: resizeBy
    };

    var global$8 = tinymce.util.Tools.resolve('tinymce.Env');

    var api = function (elm) {
      return {
        element: function () {
          return elm;
        }
      };
    };
    var trigger = function (sidebar, panel, callbackName) {
      var callback = sidebar.settings[callbackName];
      if (callback) {
        callback(api(panel.getEl('body')));
      }
    };
    var hidePanels = function (name, container, sidebars) {
      global$2.each(sidebars, function (sidebar) {
        var panel = container.items().filter('#' + sidebar.name)[0];
        if (panel && panel.visible() && sidebar.name !== name) {
          trigger(sidebar, panel, 'onhide');
          panel.visible(false);
        }
      });
    };
    var deactivateButtons = function (toolbar) {
      toolbar.items().each(function (ctrl) {
        ctrl.active(false);
      });
    };
    var findSidebar = function (sidebars, name) {
      return global$2.grep(sidebars, function (sidebar) {
        return sidebar.name === name;
      })[0];
    };
    var showPanel = function (editor, name, sidebars) {
      return function (e) {
        var btnCtrl = e.control;
        var container = btnCtrl.parents().filter('panel')[0];
        var panel = container.find('#' + name)[0];
        var sidebar = findSidebar(sidebars, name);
        hidePanels(name, container, sidebars);
        deactivateButtons(btnCtrl.parent());
        if (panel && panel.visible()) {
          trigger(sidebar, panel, 'onhide');
          panel.hide();
          btnCtrl.active(false);
        } else {
          if (panel) {
            panel.show();
            trigger(sidebar, panel, 'onshow');
          } else {
            panel = global$4.create({
              type: 'container',
              name: name,
              layout: 'stack',
              classes: 'sidebar-panel',
              html: ''
            });
            container.prepend(panel);
            trigger(sidebar, panel, 'onrender');
            trigger(sidebar, panel, 'onshow');
          }
          btnCtrl.active(true);
        }
        Events.fireResizeEditor(editor);
      };
    };
    var isModernBrowser = function () {
      return !global$8.ie || global$8.ie >= 11;
    };
    var hasSidebar = function (editor) {
      return isModernBrowser() && editor.sidebars ? editor.sidebars.length > 0 : false;
    };
    var createSidebar = function (editor) {
      var buttons = global$2.map(editor.sidebars, function (sidebar) {
        var settings = sidebar.settings;
        return {
          type: 'button',
          icon: settings.icon,
          image: settings.image,
          tooltip: settings.tooltip,
          onclick: showPanel(editor, sidebar.name, editor.sidebars)
        };
      });
      return {
        type: 'panel',
        name: 'sidebar',
        layout: 'stack',
        classes: 'sidebar',
        items: [{
            type: 'toolbar',
            layout: 'stack',
            classes: 'sidebar-toolbar',
            items: buttons
          }]
      };
    };
    var Sidebar = {
      hasSidebar: hasSidebar,
      createSidebar: createSidebar
    };

    var fireSkinLoaded$1 = function (editor) {
      var done = function () {
        editor._skinLoaded = true;
        Events.fireSkinLoaded(editor);
      };
      return function () {
        if (editor.initialized) {
          done();
        } else {
          editor.on('init', done);
        }
      };
    };
    var SkinLoaded = { fireSkinLoaded: fireSkinLoaded$1 };

    var DOM$2 = global$3.DOM;
    var switchMode = function (panel) {
      return function (e) {
        panel.find('*').disabled(e.mode === 'readonly');
      };
    };
    var editArea = function (border) {
      return {
        type: 'panel',
        name: 'iframe',
        layout: 'stack',
        classes: 'edit-area',
        border: border,
        html: ''
      };
    };
    var editAreaContainer = function (editor) {
      return {
        type: 'panel',
        layout: 'stack',
        classes: 'edit-aria-container',
        border: '1 0 0 0',
        items: [
          editArea('0'),
          Sidebar.createSidebar(editor)
        ]
      };
    };
    var render = function (editor, theme, args) {
      var panel, resizeHandleCtrl, startSize;
      if (isSkinDisabled(editor) === false && args.skinUiCss) {
        DOM$2.styleSheetLoader.load(args.skinUiCss, SkinLoaded.fireSkinLoaded(editor));
      } else {
        SkinLoaded.fireSkinLoaded(editor)();
      }
      panel = theme.panel = global$4.create({
        type: 'panel',
        role: 'application',
        classes: 'tinymce',
        style: 'visibility: hidden',
        layout: 'stack',
        border: 1,
        items: [
          {
            type: 'container',
            classes: 'top-part',
            items: [
              hasMenubar(editor) === false ? null : {
                type: 'menubar',
                border: '0 0 1 0',
                items: Menubar.createMenuButtons(editor)
              },
              Toolbar.createToolbars(editor, getToolbarSize(editor))
            ]
          },
          Sidebar.hasSidebar(editor) ? editAreaContainer(editor) : editArea('1 0 0 0')
        ]
      });
      UiContainer.setUiContainer(editor, panel);
      if (getResize(editor) !== 'none') {
        resizeHandleCtrl = {
          type: 'resizehandle',
          direction: getResize(editor),
          onResizeStart: function () {
            var elm = editor.getContentAreaContainer().firstChild;
            startSize = {
              width: elm.clientWidth,
              height: elm.clientHeight
            };
          },
          onResize: function (e) {
            if (getResize(editor) === 'both') {
              Resize.resizeTo(editor, startSize.width + e.deltaX, startSize.height + e.deltaY);
            } else {
              Resize.resizeTo(editor, null, startSize.height + e.deltaY);
            }
          }
        };
      }
      if (hasStatusbar(editor)) {
        var linkHtml = '<a href="https://www.tiny.cloud/?utm_campaign=editor_referral&amp;utm_medium=poweredby&amp;utm_source=tinymce" rel="noopener" target="_blank" role="presentation" tabindex="-1">Tiny</a>';
        var html = global$5.translate([
          'Powered by {0}',
          linkHtml
        ]);
        var brandingLabel = isBrandingEnabled(editor) ? {
          type: 'label',
          classes: 'branding',
          html: ' ' + html
        } : null;
        panel.add({
          type: 'panel',
          name: 'statusbar',
          classes: 'statusbar',
          layout: 'flow',
          border: '1 0 0 0',
          ariaRoot: true,
          items: [
            {
              type: 'elementpath',
              editor: editor
            },
            resizeHandleCtrl,
            brandingLabel
          ]
        });
      }
      Events.fireBeforeRenderUI(editor);
      editor.on('SwitchMode', switchMode(panel));
      panel.renderBefore(args.targetNode).reflow();
      if (isReadOnly(editor)) {
        editor.setMode('readonly');
      }
      if (args.width) {
        DOM$2.setStyle(panel.getEl(), 'width', args.width);
      }
      editor.on('remove', function () {
        panel.remove();
        panel = null;
      });
      A11y.addKeys(editor, panel);
      ContextToolbars.addContextualToolbars(editor);
      return {
        iframeContainer: panel.find('#iframe')[0].getEl(),
        editorContainer: panel.getEl()
      };
    };
    var Iframe = { render: render };

    var global$9 = tinymce.util.Tools.resolve('tinymce.dom.DomQuery');

    var count = 0;
    var funcs = {
      id: function () {
        return 'mceu_' + count++;
      },
      create: function (name, attrs, children) {
        var elm = domGlobals.document.createElement(name);
        global$3.DOM.setAttribs(elm, attrs);
        if (typeof children === 'string') {
          elm.innerHTML = children;
        } else {
          global$2.each(children, function (child) {
            if (child.nodeType) {
              elm.appendChild(child);
            }
          });
        }
        return elm;
      },
      createFragment: function (html) {
        return global$3.DOM.createFragment(html);
      },
      getWindowSize: function () {
        return global$3.DOM.getViewPort();
      },
      getSize: function (elm) {
        var width, height;
        if (elm.getBoundingClientRect) {
          var rect = elm.getBoundingClientRect();
          width = Math.max(rect.width || rect.right - rect.left, elm.offsetWidth);
          height = Math.max(rect.height || rect.bottom - rect.bottom, elm.offsetHeight);
        } else {
          width = elm.offsetWidth;
          height = elm.offsetHeight;
        }
        return {
          width: width,
          height: height
        };
      },
      getPos: function (elm, root) {
        return global$3.DOM.getPos(elm, root || funcs.getContainer());
      },
      getContainer: function () {
        return global$8.container ? global$8.container : domGlobals.document.body;
      },
      getViewPort: function (win) {
        return global$3.DOM.getViewPort(win);
      },
      get: function (id) {
        return domGlobals.document.getElementById(id);
      },
      addClass: function (elm, cls) {
        return global$3.DOM.addClass(elm, cls);
      },
      removeClass: function (elm, cls) {
        return global$3.DOM.removeClass(elm, cls);
      },
      hasClass: function (elm, cls) {
        return global$3.DOM.hasClass(elm, cls);
      },
      toggleClass: function (elm, cls, state) {
        return global$3.DOM.toggleClass(elm, cls, state);
      },
      css: function (elm, name, value) {
        return global$3.DOM.setStyle(elm, name, value);
      },
      getRuntimeStyle: function (elm, name) {
        return global$3.DOM.getStyle(elm, name, true);
      },
      on: function (target, name, callback, scope) {
        return global$3.DOM.bind(target, name, callback, scope);
      },
      off: function (target, name, callback) {
        return global$3.DOM.unbind(target, name, callback);
      },
      fire: function (target, name, args) {
        return global$3.DOM.fire(target, name, args);
      },
      innerHtml: function (elm, html) {
        global$3.DOM.setHTML(elm, html);
      }
    };

    var isStatic = function (elm) {
      return funcs.getRuntimeStyle(elm, 'position') === 'static';
    };
    var isFixed = function (ctrl) {
      return ctrl.state.get('fixed');
    };
    function calculateRelativePosition(ctrl, targetElm, rel) {
      var ctrlElm, pos, x, y, selfW, selfH, targetW, targetH, viewport, size;
      viewport = getWindowViewPort();
      pos = funcs.getPos(targetElm, UiContainer.getUiContainer(ctrl));
      x = pos.x;
      y = pos.y;
      if (isFixed(ctrl) && isStatic(domGlobals.document.body)) {
        x -= viewport.x;
        y -= viewport.y;
      }
      ctrlElm = ctrl.getEl();
      size = funcs.getSize(ctrlElm);
      selfW = size.width;
      selfH = size.height;
      size = funcs.getSize(targetElm);
      targetW = size.width;
      targetH = size.height;
      rel = (rel || '').split('');
      if (rel[0] === 'b') {
        y += targetH;
      }
      if (rel[1] === 'r') {
        x += targetW;
      }
      if (rel[0] === 'c') {
        y += Math.round(targetH / 2);
      }
      if (rel[1] === 'c') {
        x += Math.round(targetW / 2);
      }
      if (rel[3] === 'b') {
        y -= selfH;
      }
      if (rel[4] === 'r') {
        x -= selfW;
      }
      if (rel[3] === 'c') {
        y -= Math.round(selfH / 2);
      }
      if (rel[4] === 'c') {
        x -= Math.round(selfW / 2);
      }
      return {
        x: x,
        y: y,
        w: selfW,
        h: selfH
      };
    }
    var getUiContainerViewPort = function (customUiContainer) {
      return {
        x: 0,
        y: 0,
        w: customUiContainer.scrollWidth - 1,
        h: customUiContainer.scrollHeight - 1
      };
    };
    var getWindowViewPort = function () {
      var win = domGlobals.window;
      var x = Math.max(win.pageXOffset, domGlobals.document.body.scrollLeft, domGlobals.document.documentElement.scrollLeft);
      var y = Math.max(win.pageYOffset, domGlobals.document.body.scrollTop, domGlobals.document.documentElement.scrollTop);
      var w = win.innerWidth || domGlobals.document.documentElement.clientWidth;
      var h = win.innerHeight || domGlobals.document.documentElement.clientHeight;
      return {
        x: x,
        y: y,
        w: w,
        h: h
      };
    };
    var getViewPortRect = function (ctrl) {
      var customUiContainer = UiContainer.getUiContainer(ctrl);
      return customUiContainer && !isFixed(ctrl) ? getUiContainerViewPort(customUiContainer) : getWindowViewPort();
    };
    var Movable = {
      testMoveRel: function (elm, rels) {
        var viewPortRect = getViewPortRect(this);
        for (var i = 0; i < rels.length; i++) {
          var pos = calculateRelativePosition(this, elm, rels[i]);
          if (isFixed(this)) {
            if (pos.x > 0 && pos.x + pos.w < viewPortRect.w && pos.y > 0 && pos.y + pos.h < viewPortRect.h) {
              return rels[i];
            }
          } else {
            if (pos.x > viewPortRect.x && pos.x + pos.w < viewPortRect.w + viewPortRect.x && pos.y > viewPortRect.y && pos.y + pos.h < viewPortRect.h + viewPortRect.y) {
              return rels[i];
            }
          }
        }
        return rels[0];
      },
      moveRel: function (elm, rel) {
        if (typeof rel !== 'string') {
          rel = this.testMoveRel(elm, rel);
        }
        var pos = calculateRelativePosition(this, elm, rel);
        return this.moveTo(pos.x, pos.y);
      },
      moveBy: function (dx, dy) {
        var self = this, rect = self.layoutRect();
        self.moveTo(rect.x + dx, rect.y + dy);
        return self;
      },
      moveTo: function (x, y) {
        var self = this;
        function constrain(value, max, size) {
          if (value < 0) {
            return 0;
          }
          if (value + size > max) {
            value = max - size;
            return value < 0 ? 0 : value;
          }
          return value;
        }
        if (self.settings.constrainToViewport) {
          var viewPortRect = getViewPortRect(this);
          var layoutRect = self.layoutRect();
          x = constrain(x, viewPortRect.w + viewPortRect.x, layoutRect.w);
          y = constrain(y, viewPortRect.h + viewPortRect.y, layoutRect.h);
        }
        var uiContainer = UiContainer.getUiContainer(self);
        if (uiContainer && isStatic(uiContainer) && !isFixed(self)) {
          x -= uiContainer.scrollLeft;
          y -= uiContainer.scrollTop;
        }
        if (uiContainer) {
          x += 1;
          y += 1;
        }
        if (self.state.get('rendered')) {
          self.layoutRect({
            x: x,
            y: y
          }).repaint();
        } else {
          self.settings.x = x;
          self.settings.y = y;
        }
        self.fire('move', {
          x: x,
          y: y
        });
        return self;
      }
    };

    var global$a = tinymce.util.Tools.resolve('tinymce.util.Class');

    var global$b = tinymce.util.Tools.resolve('tinymce.util.EventDispatcher');

    var BoxUtils = {
      parseBox: function (value) {
        var len;
        var radix = 10;
        if (!value) {
          return;
        }
        if (typeof value === 'number') {
          value = value || 0;
          return {
            top: value,
            left: value,
            bottom: value,
            right: value
          };
        }
        value = value.split(' ');
        len = value.length;
        if (len === 1) {
          value[1] = value[2] = value[3] = value[0];
        } else if (len === 2) {
          value[2] = value[0];
          value[3] = value[1];
        } else if (len === 3) {
          value[3] = value[1];
        }
        return {
          top: parseInt(value[0], radix) || 0,
          right: parseInt(value[1], radix) || 0,
          bottom: parseInt(value[2], radix) || 0,
          left: parseInt(value[3], radix) || 0
        };
      },
      measureBox: function (elm, prefix) {
        function getStyle(name) {
          var defaultView = elm.ownerDocument.defaultView;
          if (defaultView) {
            var computedStyle = defaultView.getComputedStyle(elm, null);
            if (computedStyle) {
              name = name.replace(/[A-Z]/g, function (a) {
                return '-' + a;
              });
              return computedStyle.getPropertyValue(name);
            } else {
              return null;
            }
          }
          return elm.currentStyle[name];
        }
        function getSide(name) {
          var val = parseFloat(getStyle(name));
          return isNaN(val) ? 0 : val;
        }
        return {
          top: getSide(prefix + 'TopWidth'),
          right: getSide(prefix + 'RightWidth'),
          bottom: getSide(prefix + 'BottomWidth'),
          left: getSide(prefix + 'LeftWidth')
        };
      }
    };

    function noop$1() {
    }
    function ClassList(onchange) {
      this.cls = [];
      this.cls._map = {};
      this.onchange = onchange || noop$1;
      this.prefix = '';
    }
    global$2.extend(ClassList.prototype, {
      add: function (cls) {
        if (cls && !this.contains(cls)) {
          this.cls._map[cls] = true;
          this.cls.push(cls);
          this._change();
        }
        return this;
      },
      remove: function (cls) {
        if (this.contains(cls)) {
          var i = void 0;
          for (i = 0; i < this.cls.length; i++) {
            if (this.cls[i] === cls) {
              break;
            }
          }
          this.cls.splice(i, 1);
          delete this.cls._map[cls];
          this._change();
        }
        return this;
      },
      toggle: function (cls, state) {
        var curState = this.contains(cls);
        if (curState !== state) {
          if (curState) {
            this.remove(cls);
          } else {
            this.add(cls);
          }
          this._change();
        }
        return this;
      },
      contains: function (cls) {
        return !!this.cls._map[cls];
      },
      _change: function () {
        delete this.clsValue;
        this.onchange.call(this);
      }
    });
    ClassList.prototype.toString = function () {
      var value;
      if (this.clsValue) {
        return this.clsValue;
      }
      value = '';
      for (var i = 0; i < this.cls.length; i++) {
        if (i > 0) {
          value += ' ';
        }
        value += this.prefix + this.cls[i];
      }
      return value;
    };

    function unique(array) {
      var uniqueItems = [];
      var i = array.length, item;
      while (i--) {
        item = array[i];
        if (!item.__checked) {
          uniqueItems.push(item);
          item.__checked = 1;
        }
      }
      i = uniqueItems.length;
      while (i--) {
        delete uniqueItems[i].__checked;
      }
      return uniqueItems;
    }
    var expression = /^([\w\\*]+)?(?:#([\w\-\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i;
    var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g;
    var whiteSpace = /^\s*|\s*$/g;
    var Collection;
    var Selector = global$a.extend({
      init: function (selector) {
        var match = this.match;
        function compileNameFilter(name) {
          if (name) {
            name = name.toLowerCase();
            return function (item) {
              return name === '*' || item.type === name;
            };
          }
        }
        function compileIdFilter(id) {
          if (id) {
            return function (item) {
              return item._name === id;
            };
          }
        }
        function compileClassesFilter(classes) {
          if (classes) {
            classes = classes.split('.');
            return function (item) {
              var i = classes.length;
              while (i--) {
                if (!item.classes.contains(classes[i])) {
                  return false;
                }
              }
              return true;
            };
          }
        }
        function compileAttrFilter(name, cmp, check) {
          if (name) {
            return function (item) {
              var value = item[name] ? item[name]() : '';
              return !cmp ? !!check : cmp === '=' ? value === check : cmp === '*=' ? value.indexOf(check) >= 0 : cmp === '~=' ? (' ' + value + ' ').indexOf(' ' + check + ' ') >= 0 : cmp === '!=' ? value !== check : cmp === '^=' ? value.indexOf(check) === 0 : cmp === '$=' ? value.substr(value.length - check.length) === check : false;
            };
          }
        }
        function compilePsuedoFilter(name) {
          var notSelectors;
          if (name) {
            name = /(?:not\((.+)\))|(.+)/i.exec(name);
            if (!name[1]) {
              name = name[2];
              return function (item, index, length) {
                return name === 'first' ? index === 0 : name === 'last' ? index === length - 1 : name === 'even' ? index % 2 === 0 : name === 'odd' ? index % 2 === 1 : item[name] ? item[name]() : false;
              };
            }
            notSelectors = parseChunks(name[1], []);
            return function (item) {
              return !match(item, notSelectors);
            };
          }
        }
        function compile(selector, filters, direct) {
          var parts;
          function add(filter) {
            if (filter) {
              filters.push(filter);
            }
          }
          parts = expression.exec(selector.replace(whiteSpace, ''));
          add(compileNameFilter(parts[1]));
          add(compileIdFilter(parts[2]));
          add(compileClassesFilter(parts[3]));
          add(compileAttrFilter(parts[4], parts[5], parts[6]));
          add(compilePsuedoFilter(parts[7]));
          filters.pseudo = !!parts[7];
          filters.direct = direct;
          return filters;
        }
        function parseChunks(selector, selectors) {
          var parts = [];
          var extra, matches, i;
          do {
            chunker.exec('');
            matches = chunker.exec(selector);
            if (matches) {
              selector = matches[3];
              parts.push(matches[1]);
              if (matches[2]) {
                extra = matches[3];
                break;
              }
            }
          } while (matches);
          if (extra) {
            parseChunks(extra, selectors);
          }
          selector = [];
          for (i = 0; i < parts.length; i++) {
            if (parts[i] !== '>') {
              selector.push(compile(parts[i], [], parts[i - 1] === '>'));
            }
          }
          selectors.push(selector);
          return selectors;
        }
        this._selectors = parseChunks(selector, []);
      },
      match: function (control, selectors) {
        var i, l, si, sl, selector, fi, fl, filters, index, length, siblings, count, item;
        selectors = selectors || this._selectors;
        for (i = 0, l = selectors.length; i < l; i++) {
          selector = selectors[i];
          sl = selector.length;
          item = control;
          count = 0;
          for (si = sl - 1; si >= 0; si--) {
            filters = selector[si];
            while (item) {
              if (filters.pseudo) {
                siblings = item.parent().items();
                index = length = siblings.length;
                while (index--) {
                  if (siblings[index] === item) {
                    break;
                  }
                }
              }
              for (fi = 0, fl = filters.length; fi < fl; fi++) {
                if (!filters[fi](item, index, length)) {
                  fi = fl + 1;
                  break;
                }
              }
              if (fi === fl) {
                count++;
                break;
              } else {
                if (si === sl - 1) {
                  break;
                }
              }
              item = item.parent();
            }
          }
          if (count === sl) {
            return true;
          }
        }
        return false;
      },
      find: function (container) {
        var matches = [], i, l;
        var selectors = this._selectors;
        function collect(items, selector, index) {
          var i, l, fi, fl, item;
          var filters = selector[index];
          for (i = 0, l = items.length; i < l; i++) {
            item = items[i];
            for (fi = 0, fl = filters.length; fi < fl; fi++) {
              if (!filters[fi](item, i, l)) {
                fi = fl + 1;
                break;
              }
            }
            if (fi === fl) {
              if (index === selector.length - 1) {
                matches.push(item);
              } else {
                if (item.items) {
                  collect(item.items(), selector, index + 1);
                }
              }
            } else if (filters.direct) {
              return;
            }
            if (item.items) {
              collect(item.items(), selector, index);
            }
          }
        }
        if (container.items) {
          for (i = 0, l = selectors.length; i < l; i++) {
            collect(container.items(), selectors[i], 0);
          }
          if (l > 1) {
            matches = unique(matches);
          }
        }
        if (!Collection) {
          Collection = Selector.Collection;
        }
        return new Collection(matches);
      }
    });

    var Collection$1, proto;
    var push = Array.prototype.push, slice = Array.prototype.slice;
    proto = {
      length: 0,
      init: function (items) {
        if (items) {
          this.add(items);
        }
      },
      add: function (items) {
        var self = this;
        if (!global$2.isArray(items)) {
          if (items instanceof Collection$1) {
            self.add(items.toArray());
          } else {
            push.call(self, items);
          }
        } else {
          push.apply(self, items);
        }
        return self;
      },
      set: function (items) {
        var self = this;
        var len = self.length;
        var i;
        self.length = 0;
        self.add(items);
        for (i = self.length; i < len; i++) {
          delete self[i];
        }
        return self;
      },
      filter: function (selector) {
        var self = this;
        var i, l;
        var matches = [];
        var item, match;
        if (typeof selector === 'string') {
          selector = new Selector(selector);
          match = function (item) {
            return selector.match(item);
          };
        } else {
          match = selector;
        }
        for (i = 0, l = self.length; i < l; i++) {
          item = self[i];
          if (match(item)) {
            matches.push(item);
          }
        }
        return new Collection$1(matches);
      },
      slice: function () {
        return new Collection$1(slice.apply(this, arguments));
      },
      eq: function (index) {
        return index === -1 ? this.slice(index) : this.slice(index, +index + 1);
      },
      each: function (callback) {
        global$2.each(this, callback);
        return this;
      },
      toArray: function () {
        return global$2.toArray(this);
      },
      indexOf: function (ctrl) {
        var self = this;
        var i = self.length;
        while (i--) {
          if (self[i] === ctrl) {
            break;
          }
        }
        return i;
      },
      reverse: function () {
        return new Collection$1(global$2.toArray(this).reverse());
      },
      hasClass: function (cls) {
        return this[0] ? this[0].classes.contains(cls) : false;
      },
      prop: function (name, value) {
        var self = this;
        var item;
        if (value !== undefined) {
          self.each(function (item) {
            if (item[name]) {
              item[name](value);
            }
          });
          return self;
        }
        item = self[0];
        if (item && item[name]) {
          return item[name]();
        }
      },
      exec: function (name) {
        var self = this, args = global$2.toArray(arguments).slice(1);
        self.each(function (item) {
          if (item[name]) {
            item[name].apply(item, args);
          }
        });
        return self;
      },
      remove: function () {
        var i = this.length;
        while (i--) {
          this[i].remove();
        }
        return this;
      },
      addClass: function (cls) {
        return this.each(function (item) {
          item.classes.add(cls);
        });
      },
      removeClass: function (cls) {
        return this.each(function (item) {
          item.classes.remove(cls);
        });
      }
    };
    global$2.each('fire on off show hide append prepend before after reflow'.split(' '), function (name) {
      proto[name] = function () {
        var args = global$2.toArray(arguments);
        this.each(function (ctrl) {
          if (name in ctrl) {
            ctrl[name].apply(ctrl, args);
          }
        });
        return this;
      };
    });
    global$2.each('text name disabled active selected checked visible parent value data'.split(' '), function (name) {
      proto[name] = function (value) {
        return this.prop(name, value);
      };
    });
    Collection$1 = global$a.extend(proto);
    Selector.Collection = Collection$1;
    var Collection$2 = Collection$1;

    var Binding = function (settings) {
      this.create = settings.create;
    };
    Binding.create = function (model, name) {
      return new Binding({
        create: function (otherModel, otherName) {
          var bindings;
          var fromSelfToOther = function (e) {
            otherModel.set(otherName, e.value);
          };
          var fromOtherToSelf = function (e) {
            model.set(name, e.value);
          };
          otherModel.on('change:' + otherName, fromOtherToSelf);
          model.on('change:' + name, fromSelfToOther);
          bindings = otherModel._bindings;
          if (!bindings) {
            bindings = otherModel._bindings = [];
            otherModel.on('destroy', function () {
              var i = bindings.length;
              while (i--) {
                bindings[i]();
              }
            });
          }
          bindings.push(function () {
            model.off('change:' + name, fromSelfToOther);
          });
          return model.get(name);
        }
      });
    };

    var global$c = tinymce.util.Tools.resolve('tinymce.util.Observable');

    function isNode(node) {
      return node.nodeType > 0;
    }
    function isEqual(a, b) {
      var k, checked;
      if (a === b) {
        return true;
      }
      if (a === null || b === null) {
        return a === b;
      }
      if (typeof a !== 'object' || typeof b !== 'object') {
        return a === b;
      }
      if (global$2.isArray(b)) {
        if (a.length !== b.length) {
          return false;
        }
        k = a.length;
        while (k--) {
          if (!isEqual(a[k], b[k])) {
            return false;
          }
        }
      }
      if (isNode(a) || isNode(b)) {
        return a === b;
      }
      checked = {};
      for (k in b) {
        if (!isEqual(a[k], b[k])) {
          return false;
        }
        checked[k] = true;
      }
      for (k in a) {
        if (!checked[k] && !isEqual(a[k], b[k])) {
          return false;
        }
      }
      return true;
    }
    var ObservableObject = global$a.extend({
      Mixins: [global$c],
      init: function (data) {
        var name, value;
        data = data || {};
        for (name in data) {
          value = data[name];
          if (value instanceof Binding) {
            data[name] = value.create(this, name);
          }
        }
        this.data = data;
      },
      set: function (name, value) {
        var key, args;
        var oldValue = this.data[name];
        if (value instanceof Binding) {
          value = value.create(this, name);
        }
        if (typeof name === 'object') {
          for (key in name) {
            this.set(key, name[key]);
          }
          return this;
        }
        if (!isEqual(oldValue, value)) {
          this.data[name] = value;
          args = {
            target: this,
            name: name,
            value: value,
            oldValue: oldValue
          };
          this.fire('change:' + name, args);
          this.fire('change', args);
        }
        return this;
      },
      get: function (name) {
        return this.data[name];
      },
      has: function (name) {
        return name in this.data;
      },
      bind: function (name) {
        return Binding.create(this, name);
      },
      destroy: function () {
        this.fire('destroy');
      }
    });

    var dirtyCtrls = {}, animationFrameRequested;
    var ReflowQueue = {
      add: function (ctrl) {
        var parent = ctrl.parent();
        if (parent) {
          if (!parent._layout || parent._layout.isNative()) {
            return;
          }
          if (!dirtyCtrls[parent._id]) {
            dirtyCtrls[parent._id] = parent;
          }
          if (!animationFrameRequested) {
            animationFrameRequested = true;
            global$7.requestAnimationFrame(function () {
              var id, ctrl;
              animationFrameRequested = false;
              for (id in dirtyCtrls) {
                ctrl = dirtyCtrls[id];
                if (ctrl.state.get('rendered')) {
                  ctrl.reflow();
                }
              }
              dirtyCtrls = {};
            }, domGlobals.document.body);
          }
        }
      },
      remove: function (ctrl) {
        if (dirtyCtrls[ctrl._id]) {
          delete dirtyCtrls[ctrl._id];
        }
      }
    };

    var hasMouseWheelEventSupport = 'onmousewheel' in domGlobals.document;
    var hasWheelEventSupport = false;
    var classPrefix = 'mce-';
    var Control, idCounter = 0;
    var proto$1 = {
      Statics: { classPrefix: classPrefix },
      isRtl: function () {
        return Control.rtl;
      },
      classPrefix: classPrefix,
      init: function (settings) {
        var self = this;
        var classes, defaultClasses;
        function applyClasses(classes) {
          var i;
          classes = classes.split(' ');
          for (i = 0; i < classes.length; i++) {
            self.classes.add(classes[i]);
          }
        }
        self.settings = settings = global$2.extend({}, self.Defaults, settings);
        self._id = settings.id || 'mceu_' + idCounter++;
        self._aria = { role: settings.role };
        self._elmCache = {};
        self.$ = global$9;
        self.state = new ObservableObject({
          visible: true,
          active: false,
          disabled: false,
          value: ''
        });
        self.data = new ObservableObject(settings.data);
        self.classes = new ClassList(function () {
          if (self.state.get('rendered')) {
            self.getEl().className = this.toString();
          }
        });
        self.classes.prefix = self.classPrefix;
        classes = settings.classes;
        if (classes) {
          if (self.Defaults) {
            defaultClasses = self.Defaults.classes;
            if (defaultClasses && classes !== defaultClasses) {
              applyClasses(defaultClasses);
            }
          }
          applyClasses(classes);
        }
        global$2.each('title text name visible disabled active value'.split(' '), function (name) {
          if (name in settings) {
            self[name](settings[name]);
          }
        });
        self.on('click', function () {
          if (self.disabled()) {
            return false;
          }
        });
        self.settings = settings;
        self.borderBox = BoxUtils.parseBox(settings.border);
        self.paddingBox = BoxUtils.parseBox(settings.padding);
        self.marginBox = BoxUtils.parseBox(settings.margin);
        if (settings.hidden) {
          self.hide();
        }
      },
      Properties: 'parent,name',
      getContainerElm: function () {
        var uiContainer = UiContainer.getUiContainer(this);
        return uiContainer ? uiContainer : funcs.getContainer();
      },
      getParentCtrl: function (elm) {
        var ctrl;
        var lookup = this.getRoot().controlIdLookup;
        while (elm && lookup) {
          ctrl = lookup[elm.id];
          if (ctrl) {
            break;
          }
          elm = elm.parentNode;
        }
        return ctrl;
      },
      initLayoutRect: function () {
        var self = this;
        var settings = self.settings;
        var borderBox, layoutRect;
        var elm = self.getEl();
        var width, height, minWidth, minHeight, autoResize;
        var startMinWidth, startMinHeight, initialSize;
        borderBox = self.borderBox = self.borderBox || BoxUtils.measureBox(elm, 'border');
        self.paddingBox = self.paddingBox || BoxUtils.measureBox(elm, 'padding');
        self.marginBox = self.marginBox || BoxUtils.measureBox(elm, 'margin');
        initialSize = funcs.getSize(elm);
        startMinWidth = settings.minWidth;
        startMinHeight = settings.minHeight;
        minWidth = startMinWidth || initialSize.width;
        minHeight = startMinHeight || initialSize.height;
        width = settings.width;
        height = settings.height;
        autoResize = settings.autoResize;
        autoResize = typeof autoResize !== 'undefined' ? autoResize : !width && !height;
        width = width || minWidth;
        height = height || minHeight;
        var deltaW = borderBox.left + borderBox.right;
        var deltaH = borderBox.top + borderBox.bottom;
        var maxW = settings.maxWidth || 65535;
        var maxH = settings.maxHeight || 65535;
        self._layoutRect = layoutRect = {
          x: settings.x || 0,
          y: settings.y || 0,
          w: width,
          h: height,
          deltaW: deltaW,
          deltaH: deltaH,
          contentW: width - deltaW,
          contentH: height - deltaH,
          innerW: width - deltaW,
          innerH: height - deltaH,
          startMinWidth: startMinWidth || 0,
          startMinHeight: startMinHeight || 0,
          minW: Math.min(minWidth, maxW),
          minH: Math.min(minHeight, maxH),
          maxW: maxW,
          maxH: maxH,
          autoResize: autoResize,
          scrollW: 0
        };
        self._lastLayoutRect = {};
        return layoutRect;
      },
      layoutRect: function (newRect) {
        var self = this;
        var curRect = self._layoutRect, lastLayoutRect, size, deltaWidth, deltaHeight, repaintControls;
        if (!curRect) {
          curRect = self.initLayoutRect();
        }
        if (newRect) {
          deltaWidth = curRect.deltaW;
          deltaHeight = curRect.deltaH;
          if (newRect.x !== undefined) {
            curRect.x = newRect.x;
          }
          if (newRect.y !== undefined) {
            curRect.y = newRect.y;
          }
          if (newRect.minW !== undefined) {
            curRect.minW = newRect.minW;
          }
          if (newRect.minH !== undefined) {
            curRect.minH = newRect.minH;
          }
          size = newRect.w;
          if (size !== undefined) {
            size = size < curRect.minW ? curRect.minW : size;
            size = size > curRect.maxW ? curRect.maxW : size;
            curRect.w = size;
            curRect.innerW = size - deltaWidth;
          }
          size = newRect.h;
          if (size !== undefined) {
            size = size < curRect.minH ? curRect.minH : size;
            size = size > curRect.maxH ? curRect.maxH : size;
            curRect.h = size;
            curRect.innerH = size - deltaHeight;
          }
          size = newRect.innerW;
          if (size !== undefined) {
            size = size < curRect.minW - deltaWidth ? curRect.minW - deltaWidth : size;
            size = size > curRect.maxW - deltaWidth ? curRect.maxW - deltaWidth : size;
            curRect.innerW = size;
            curRect.w = size + deltaWidth;
          }
          size = newRect.innerH;
          if (size !== undefined) {
            size = size < curRect.minH - deltaHeight ? curRect.minH - deltaHeight : size;
            size = size > curRect.maxH - deltaHeight ? curRect.maxH - deltaHeight : size;
            curRect.innerH = size;
            curRect.h = size + deltaHeight;
          }
          if (newRect.contentW !== undefined) {
            curRect.contentW = newRect.contentW;
          }
          if (newRect.contentH !== undefined) {
            curRect.contentH = newRect.contentH;
          }
          lastLayoutRect = self._lastLayoutRect;
          if (lastLayoutRect.x !== curRect.x || lastLayoutRect.y !== curRect.y || lastLayoutRect.w !== curRect.w || lastLayoutRect.h !== curRect.h) {
            repaintControls = Control.repaintControls;
            if (repaintControls) {
              if (repaintControls.map && !repaintControls.map[self._id]) {
                repaintControls.push(self);
                repaintControls.map[self._id] = true;
              }
            }
            lastLayoutRect.x = curRect.x;
            lastLayoutRect.y = curRect.y;
            lastLayoutRect.w = curRect.w;
            lastLayoutRect.h = curRect.h;
          }
          return self;
        }
        return curRect;
      },
      repaint: function () {
        var self = this;
        var style, bodyStyle, bodyElm, rect, borderBox;
        var borderW, borderH, lastRepaintRect, round, value;
        round = !domGlobals.document.createRange ? Math.round : function (value) {
          return value;
        };
        style = self.getEl().style;
        rect = self._layoutRect;
        lastRepaintRect = self._lastRepaintRect || {};
        borderBox = self.borderBox;
        borderW = borderBox.left + borderBox.right;
        borderH = borderBox.top + borderBox.bottom;
        if (rect.x !== lastRepaintRect.x) {
          style.left = round(rect.x) + 'px';
          lastRepaintRect.x = rect.x;
        }
        if (rect.y !== lastRepaintRect.y) {
          style.top = round(rect.y) + 'px';
          lastRepaintRect.y = rect.y;
        }
        if (rect.w !== lastRepaintRect.w) {
          value = round(rect.w - borderW);
          style.width = (value >= 0 ? value : 0) + 'px';
          lastRepaintRect.w = rect.w;
        }
        if (rect.h !== lastRepaintRect.h) {
          value = round(rect.h - borderH);
          style.height = (value >= 0 ? value : 0) + 'px';
          lastRepaintRect.h = rect.h;
        }
        if (self._hasBody && rect.innerW !== lastRepaintRect.innerW) {
          value = round(rect.innerW);
          bodyElm = self.getEl('body');
          if (bodyElm) {
            bodyStyle = bodyElm.style;
            bodyStyle.width = (value >= 0 ? value : 0) + 'px';
          }
          lastRepaintRect.innerW = rect.innerW;
        }
        if (self._hasBody && rect.innerH !== lastRepaintRect.innerH) {
          value = round(rect.innerH);
          bodyElm = bodyElm || self.getEl('body');
          if (bodyElm) {
            bodyStyle = bodyStyle || bodyElm.style;
            bodyStyle.height = (value >= 0 ? value : 0) + 'px';
          }
          lastRepaintRect.innerH = rect.innerH;
        }
        self._lastRepaintRect = lastRepaintRect;
        self.fire('repaint', {}, false);
      },
      updateLayoutRect: function () {
        var self = this;
        self.parent()._lastRect = null;
        funcs.css(self.getEl(), {
          width: '',
          height: ''
        });
        self._layoutRect = self._lastRepaintRect = self._lastLayoutRect = null;
        self.initLayoutRect();
      },
      on: function (name, callback) {
        var self = this;
        function resolveCallbackName(name) {
          var callback, scope;
          if (typeof name !== 'string') {
            return name;
          }
          return function (e) {
            if (!callback) {
              self.parentsAndSelf().each(function (ctrl) {
                var callbacks = ctrl.settings.callbacks;
                if (callbacks && (callback = callbacks[name])) {
                  scope = ctrl;
                  return false;
                }
              });
            }
            if (!callback) {
              e.action = name;
              this.fire('execute', e);
              return;
            }
            return callback.call(scope, e);
          };
        }
        getEventDispatcher(self).on(name, resolveCallbackName(callback));
        return self;
      },
      off: function (name, callback) {
        getEventDispatcher(this).off(name, callback);
        return this;
      },
      fire: function (name, args, bubble) {
        var self = this;
        args = args || {};
        if (!args.control) {
          args.control = self;
        }
        args = getEventDispatcher(self).fire(name, args);
        if (bubble !== false && self.parent) {
          var parent = self.parent();
          while (parent && !args.isPropagationStopped()) {
            parent.fire(name, args, false);
            parent = parent.parent();
          }
        }
        return args;
      },
      hasEventListeners: function (name) {
        return getEventDispatcher(this).has(name);
      },
      parents: function (selector) {
        var self = this;
        var ctrl, parents = new Collection$2();
        for (ctrl = self.parent(); ctrl; ctrl = ctrl.parent()) {
          parents.add(ctrl);
        }
        if (selector) {
          parents = parents.filter(selector);
        }
        return parents;
      },
      parentsAndSelf: function (selector) {
        return new Collection$2(this).add(this.parents(selector));
      },
      next: function () {
        var parentControls = this.parent().items();
        return parentControls[parentControls.indexOf(this) + 1];
      },
      prev: function () {
        var parentControls = this.parent().items();
        return parentControls[parentControls.indexOf(this) - 1];
      },
      innerHtml: function (html) {
        this.$el.html(html);
        return this;
      },
      getEl: function (suffix) {
        var id = suffix ? this._id + '-' + suffix : this._id;
        if (!this._elmCache[id]) {
          this._elmCache[id] = global$9('#' + id)[0];
        }
        return this._elmCache[id];
      },
      show: function () {
        return this.visible(true);
      },
      hide: function () {
        return this.visible(false);
      },
      focus: function () {
        try {
          this.getEl().focus();
        } catch (ex) {
        }
        return this;
      },
      blur: function () {
        this.getEl().blur();
        return this;
      },
      aria: function (name, value) {
        var self = this, elm = self.getEl(self.ariaTarget);
        if (typeof value === 'undefined') {
          return self._aria[name];
        }
        self._aria[name] = value;
        if (self.state.get('rendered')) {
          elm.setAttribute(name === 'role' ? name : 'aria-' + name, value);
        }
        return self;
      },
      encode: function (text, translate) {
        if (translate !== false) {
          text = this.translate(text);
        }
        return (text || '').replace(/[&<>"]/g, function (match) {
          return '&#' + match.charCodeAt(0) + ';';
        });
      },
      translate: function (text) {
        return Control.translate ? Control.translate(text) : text;
      },
      before: function (items) {
        var self = this, parent = self.parent();
        if (parent) {
          parent.insert(items, parent.items().indexOf(self), true);
        }
        return self;
      },
      after: function (items) {
        var self = this, parent = self.parent();
        if (parent) {
          parent.insert(items, parent.items().indexOf(self));
        }
        return self;
      },
      remove: function () {
        var self = this;
        var elm = self.getEl();
        var parent = self.parent();
        var newItems, i;
        if (self.items) {
          var controls = self.items().toArray();
          i = controls.length;
          while (i--) {
            controls[i].remove();
          }
        }
        if (parent && parent.items) {
          newItems = [];
          parent.items().each(function (item) {
            if (item !== self) {
              newItems.push(item);
            }
          });
          parent.items().set(newItems);
          parent._lastRect = null;
        }
        if (self._eventsRoot && self._eventsRoot === self) {
          global$9(elm).off();
        }
        var lookup = self.getRoot().controlIdLookup;
        if (lookup) {
          delete lookup[self._id];
        }
        if (elm && elm.parentNode) {
          elm.parentNode.removeChild(elm);
        }
        self.state.set('rendered', false);
        self.state.destroy();
        self.fire('remove');
        return self;
      },
      renderBefore: function (elm) {
        global$9(elm).before(this.renderHtml());
        this.postRender();
        return this;
      },
      renderTo: function (elm) {
        global$9(elm || this.getContainerElm()).append(this.renderHtml());
        this.postRender();
        return this;
      },
      preRender: function () {
      },
      render: function () {
      },
      renderHtml: function () {
        return '<div id="' + this._id + '" class="' + this.classes + '"></div>';
      },
      postRender: function () {
        var self = this;
        var settings = self.settings;
        var elm, box, parent, name, parentEventsRoot;
        self.$el = global$9(self.getEl());
        self.state.set('rendered', true);
        for (name in settings) {
          if (name.indexOf('on') === 0) {
            self.on(name.substr(2), settings[name]);
          }
        }
        if (self._eventsRoot) {
          for (parent = self.parent(); !parentEventsRoot && parent; parent = parent.parent()) {
            parentEventsRoot = parent._eventsRoot;
          }
          if (parentEventsRoot) {
            for (name in parentEventsRoot._nativeEvents) {
              self._nativeEvents[name] = true;
            }
          }
        }
        bindPendingEvents(self);
        if (settings.style) {
          elm = self.getEl();
          if (elm) {
            elm.setAttribute('style', settings.style);
            elm.style.cssText = settings.style;
          }
        }
        if (self.settings.border) {
          box = self.borderBox;
          self.$el.css({
            'border-top-width': box.top,
            'border-right-width': box.right,
            'border-bottom-width': box.bottom,
            'border-left-width': box.left
          });
        }
        var root = self.getRoot();
        if (!root.controlIdLookup) {
          root.controlIdLookup = {};
        }
        root.controlIdLookup[self._id] = self;
        for (var key in self._aria) {
          self.aria(key, self._aria[key]);
        }
        if (self.state.get('visible') === false) {
          self.getEl().style.display = 'none';
        }
        self.bindStates();
        self.state.on('change:visible', function (e) {
          var state = e.value;
          var parentCtrl;
          if (self.state.get('rendered')) {
            self.getEl().style.display = state === false ? 'none' : '';
            self.getEl().getBoundingClientRect();
          }
          parentCtrl = self.parent();
          if (parentCtrl) {
            parentCtrl._lastRect = null;
          }
          self.fire(state ? 'show' : 'hide');
          ReflowQueue.add(self);
        });
        self.fire('postrender', {}, false);
      },
      bindStates: function () {
      },
      scrollIntoView: function (align) {
        function getOffset(elm, rootElm) {
          var x, y, parent = elm;
          x = y = 0;
          while (parent && parent !== rootElm && parent.nodeType) {
            x += parent.offsetLeft || 0;
            y += parent.offsetTop || 0;
            parent = parent.offsetParent;
          }
          return {
            x: x,
            y: y
          };
        }
        var elm = this.getEl(), parentElm = elm.parentNode;
        var x, y, width, height, parentWidth, parentHeight;
        var pos = getOffset(elm, parentElm);
        x = pos.x;
        y = pos.y;
        width = elm.offsetWidth;
        height = elm.offsetHeight;
        parentWidth = parentElm.clientWidth;
        parentHeight = parentElm.clientHeight;
        if (align === 'end') {
          x -= parentWidth - width;
          y -= parentHeight - height;
        } else if (align === 'center') {
          x -= parentWidth / 2 - width / 2;
          y -= parentHeight / 2 - height / 2;
        }
        parentElm.scrollLeft = x;
        parentElm.scrollTop = y;
        return this;
      },
      getRoot: function () {
        var ctrl = this, rootControl;
        var parents = [];
        while (ctrl) {
          if (ctrl.rootControl) {
            rootControl = ctrl.rootControl;
            break;
          }
          parents.push(ctrl);
          rootControl = ctrl;
          ctrl = ctrl.parent();
        }
        if (!rootControl) {
          rootControl = this;
        }
        var i = parents.length;
        while (i--) {
          parents[i].rootControl = rootControl;
        }
        return rootControl;
      },
      reflow: function () {
        ReflowQueue.remove(this);
        var parent = this.parent();
        if (parent && parent._layout && !parent._layout.isNative()) {
          parent.reflow();
        }
        return this;
      }
    };
    global$2.each('text title visible disabled active value'.split(' '), function (name) {
      proto$1[name] = function (value) {
        if (arguments.length === 0) {
          return this.state.get(name);
        }
        if (typeof value !== 'undefined') {
          this.state.set(name, value);
        }
        return this;
      };
    });
    Control = global$a.extend(proto$1);
    function getEventDispatcher(obj) {
      if (!obj._eventDispatcher) {
        obj._eventDispatcher = new global$b({
          scope: obj,
          toggleEvent: function (name, state) {
            if (state && global$b.isNative(name)) {
              if (!obj._nativeEvents) {
                obj._nativeEvents = {};
              }
              obj._nativeEvents[name] = true;
              if (obj.state.get('rendered')) {
                bindPendingEvents(obj);
              }
            }
          }
        });
      }
      return obj._eventDispatcher;
    }
    function bindPendingEvents(eventCtrl) {
      var i, l, parents, eventRootCtrl, nativeEvents, name;
      function delegate(e) {
        var control = eventCtrl.getParentCtrl(e.target);
        if (control) {
          control.fire(e.type, e);
        }
      }
      function mouseLeaveHandler() {
        var ctrl = eventRootCtrl._lastHoverCtrl;
        if (ctrl) {
          ctrl.fire('mouseleave', { target: ctrl.getEl() });
          ctrl.parents().each(function (ctrl) {
            ctrl.fire('mouseleave', { target: ctrl.getEl() });
          });
          eventRootCtrl._lastHoverCtrl = null;
        }
      }
      function mouseEnterHandler(e) {
        var ctrl = eventCtrl.getParentCtrl(e.target), lastCtrl = eventRootCtrl._lastHoverCtrl, idx = 0, i, parents, lastParents;
        if (ctrl !== lastCtrl) {
          eventRootCtrl._lastHoverCtrl = ctrl;
          parents = ctrl.parents().toArray().reverse();
          parents.push(ctrl);
          if (lastCtrl) {
            lastParents = lastCtrl.parents().toArray().reverse();
            lastParents.push(lastCtrl);
            for (idx = 0; idx < lastParents.length; idx++) {
              if (parents[idx] !== lastParents[idx]) {
                break;
              }
            }
            for (i = lastParents.length - 1; i >= idx; i--) {
              lastCtrl = lastParents[i];
              lastCtrl.fire('mouseleave', { target: lastCtrl.getEl() });
            }
          }
          for (i = idx; i < parents.length; i++) {
            ctrl = parents[i];
            ctrl.fire('mouseenter', { target: ctrl.getEl() });
          }
        }
      }
      function fixWheelEvent(e) {
        e.preventDefault();
        if (e.type === 'mousewheel') {
          e.deltaY = -1 / 40 * e.wheelDelta;
          if (e.wheelDeltaX) {
            e.deltaX = -1 / 40 * e.wheelDeltaX;
          }
        } else {
          e.deltaX = 0;
          e.deltaY = e.detail;
        }
        e = eventCtrl.fire('wheel', e);
      }
      nativeEvents = eventCtrl._nativeEvents;
      if (nativeEvents) {
        parents = eventCtrl.parents().toArray();
        parents.unshift(eventCtrl);
        for (i = 0, l = parents.length; !eventRootCtrl && i < l; i++) {
          eventRootCtrl = parents[i]._eventsRoot;
        }
        if (!eventRootCtrl) {
          eventRootCtrl = parents[parents.length - 1] || eventCtrl;
        }
        eventCtrl._eventsRoot = eventRootCtrl;
        for (l = i, i = 0; i < l; i++) {
          parents[i]._eventsRoot = eventRootCtrl;
        }
        var eventRootDelegates = eventRootCtrl._delegates;
        if (!eventRootDelegates) {
          eventRootDelegates = eventRootCtrl._delegates = {};
        }
        for (name in nativeEvents) {
          if (!nativeEvents) {
            return false;
          }
          if (name === 'wheel' && !hasWheelEventSupport) {
            if (hasMouseWheelEventSupport) {
              global$9(eventCtrl.getEl()).on('mousewheel', fixWheelEvent);
            } else {
              global$9(eventCtrl.getEl()).on('DOMMouseScroll', fixWheelEvent);
            }
            continue;
          }
          if (name === 'mouseenter' || name === 'mouseleave') {
            if (!eventRootCtrl._hasMouseEnter) {
              global$9(eventRootCtrl.getEl()).on('mouseleave', mouseLeaveHandler).on('mouseover', mouseEnterHandler);
              eventRootCtrl._hasMouseEnter = 1;
            }
          } else if (!eventRootDelegates[name]) {
            global$9(eventRootCtrl.getEl()).on(name, delegate);
            eventRootDelegates[name] = true;
          }
          nativeEvents[name] = false;
        }
      }
    }
    var Control$1 = Control;

    var hasTabstopData = function (elm) {
      return elm.getAttribute('data-mce-tabstop') ? true : false;
    };
    function KeyboardNavigation (settings) {
      var root = settings.root;
      var focusedElement, focusedControl;
      function isElement(node) {
        return node && node.nodeType === 1;
      }
      try {
        focusedElement = domGlobals.document.activeElement;
      } catch (ex) {
        focusedElement = domGlobals.document.body;
      }
      focusedControl = root.getParentCtrl(focusedElement);
      function getRole(elm) {
        elm = elm || focusedElement;
        if (isElement(elm)) {
          return elm.getAttribute('role');
        }
        return null;
      }
      function getParentRole(elm) {
        var role, parent = elm || focusedElement;
        while (parent = parent.parentNode) {
          if (role = getRole(parent)) {
            return role;
          }
        }
      }
      function getAriaProp(name) {
        var elm = focusedElement;
        if (isElement(elm)) {
          return elm.getAttribute('aria-' + name);
        }
      }
      function isTextInputElement(elm) {
        var tagName = elm.tagName.toUpperCase();
        return tagName === 'INPUT' || tagName === 'TEXTAREA' || tagName === 'SELECT';
      }
      function canFocus(elm) {
        if (isTextInputElement(elm) && !elm.hidden) {
          return true;
        }
        if (hasTabstopData(elm)) {
          return true;
        }
        if (/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(getRole(elm))) {
          return true;
        }
        return false;
      }
      function getFocusElements(elm) {
        var elements = [];
        function collect(elm) {
          if (elm.nodeType !== 1 || elm.style.display === 'none' || elm.disabled) {
            return;
          }
          if (canFocus(elm)) {
            elements.push(elm);
          }
          for (var i = 0; i < elm.childNodes.length; i++) {
            collect(elm.childNodes[i]);
          }
        }
        collect(elm || root.getEl());
        return elements;
      }
      function getNavigationRoot(targetControl) {
        var navigationRoot, controls;
        targetControl = targetControl || focusedControl;
        controls = targetControl.parents().toArray();
        controls.unshift(targetControl);
        for (var i = 0; i < controls.length; i++) {
          navigationRoot = controls[i];
          if (navigationRoot.settings.ariaRoot) {
            break;
          }
        }
        return navigationRoot;
      }
      function focusFirst(targetControl) {
        var navigationRoot = getNavigationRoot(targetControl);
        var focusElements = getFocusElements(navigationRoot.getEl());
        if (navigationRoot.settings.ariaRemember && 'lastAriaIndex' in navigationRoot) {
          moveFocusToIndex(navigationRoot.lastAriaIndex, focusElements);
        } else {
          moveFocusToIndex(0, focusElements);
        }
      }
      function moveFocusToIndex(idx, elements) {
        if (idx < 0) {
          idx = elements.length - 1;
        } else if (idx >= elements.length) {
          idx = 0;
        }
        if (elements[idx]) {
          elements[idx].focus();
        }
        return idx;
      }
      function moveFocus(dir, elements) {
        var idx = -1;
        var navigationRoot = getNavigationRoot();
        elements = elements || getFocusElements(navigationRoot.getEl());
        for (var i = 0; i < elements.length; i++) {
          if (elements[i] === focusedElement) {
            idx = i;
          }
        }
        idx += dir;
        navigationRoot.lastAriaIndex = moveFocusToIndex(idx, elements);
      }
      function left() {
        var parentRole = getParentRole();
        if (parentRole === 'tablist') {
          moveFocus(-1, getFocusElements(focusedElement.parentNode));
        } else if (focusedControl.parent().submenu) {
          cancel();
        } else {
          moveFocus(-1);
        }
      }
      function right() {
        var role = getRole(), parentRole = getParentRole();
        if (parentRole === 'tablist') {
          moveFocus(1, getFocusElements(focusedElement.parentNode));
        } else if (role === 'menuitem' && parentRole === 'menu' && getAriaProp('haspopup')) {
          enter();
        } else {
          moveFocus(1);
        }
      }
      function up() {
        moveFocus(-1);
      }
      function down() {
        var role = getRole(), parentRole = getParentRole();
        if (role === 'menuitem' && parentRole === 'menubar') {
          enter();
        } else if (role === 'button' && getAriaProp('haspopup')) {
          enter({ key: 'down' });
        } else {
          moveFocus(1);
        }
      }
      function tab(e) {
        var parentRole = getParentRole();
        if (parentRole === 'tablist') {
          var elm = getFocusElements(focusedControl.getEl('body'))[0];
          if (elm) {
            elm.focus();
          }
        } else {
          moveFocus(e.shiftKey ? -1 : 1);
        }
      }
      function cancel() {
        focusedControl.fire('cancel');
      }
      function enter(aria) {
        aria = aria || {};
        focusedControl.fire('click', {
          target: focusedElement,
          aria: aria
        });
      }
      root.on('keydown', function (e) {
        function handleNonTabOrEscEvent(e, handler) {
          if (isTextInputElement(focusedElement) || hasTabstopData(focusedElement)) {
            return;
          }
          if (getRole(focusedElement) === 'slider') {
            return;
          }
          if (handler(e) !== false) {
            e.preventDefault();
          }
        }
        if (e.isDefaultPrevented()) {
          return;
        }
        switch (e.keyCode) {
        case 37:
          handleNonTabOrEscEvent(e, left);
          break;
        case 39:
          handleNonTabOrEscEvent(e, right);
          break;
        case 38:
          handleNonTabOrEscEvent(e, up);
          break;
        case 40:
          handleNonTabOrEscEvent(e, down);
          break;
        case 27:
          cancel();
          break;
        case 14:
        case 13:
        case 32:
          handleNonTabOrEscEvent(e, enter);
          break;
        case 9:
          tab(e);
          e.preventDefault();
          break;
        }
      });
      root.on('focusin', function (e) {
        focusedElement = e.target;
        focusedControl = e.control;
      });
      return { focusFirst: focusFirst };
    }

    var selectorCache = {};
    var Container = Control$1.extend({
      init: function (settings) {
        var self = this;
        self._super(settings);
        settings = self.settings;
        if (settings.fixed) {
          self.state.set('fixed', true);
        }
        self._items = new Collection$2();
        if (self.isRtl()) {
          self.classes.add('rtl');
        }
        self.bodyClasses = new ClassList(function () {
          if (self.state.get('rendered')) {
            self.getEl('body').className = this.toString();
          }
        });
        self.bodyClasses.prefix = self.classPrefix;
        self.classes.add('container');
        self.bodyClasses.add('container-body');
        if (settings.containerCls) {
          self.classes.add(settings.containerCls);
        }
        self._layout = global$4.create((settings.layout || '') + 'layout');
        if (self.settings.items) {
          self.add(self.settings.items);
        } else {
          self.add(self.render());
        }
        self._hasBody = true;
      },
      items: function () {
        return this._items;
      },
      find: function (selector) {
        selector = selectorCache[selector] = selectorCache[selector] || new Selector(selector);
        return selector.find(this);
      },
      add: function (items) {
        var self = this;
        self.items().add(self.create(items)).parent(self);
        return self;
      },
      focus: function (keyboard) {
        var self = this;
        var focusCtrl, keyboardNav, items;
        if (keyboard) {
          keyboardNav = self.keyboardNav || self.parents().eq(-1)[0].keyboardNav;
          if (keyboardNav) {
            keyboardNav.focusFirst(self);
            return;
          }
        }
        items = self.find('*');
        if (self.statusbar) {
          items.add(self.statusbar.items());
        }
        items.each(function (ctrl) {
          if (ctrl.settings.autofocus) {
            focusCtrl = null;
            return false;
          }
          if (ctrl.canFocus) {
            focusCtrl = focusCtrl || ctrl;
          }
        });
        if (focusCtrl) {
          focusCtrl.focus();
        }
        return self;
      },
      replace: function (oldItem, newItem) {
        var ctrlElm;
        var items = this.items();
        var i = items.length;
        while (i--) {
          if (items[i] === oldItem) {
            items[i] = newItem;
            break;
          }
        }
        if (i >= 0) {
          ctrlElm = newItem.getEl();
          if (ctrlElm) {
            ctrlElm.parentNode.removeChild(ctrlElm);
          }
          ctrlElm = oldItem.getEl();
          if (ctrlElm) {
            ctrlElm.parentNode.removeChild(ctrlElm);
          }
        }
        newItem.parent(this);
      },
      create: function (items) {
        var self = this;
        var settings;
        var ctrlItems = [];
        if (!global$2.isArray(items)) {
          items = [items];
        }
        global$2.each(items, function (item) {
          if (item) {
            if (!(item instanceof Control$1)) {
              if (typeof item === 'string') {
                item = { type: item };
              }
              settings = global$2.extend({}, self.settings.defaults, item);
              item.type = settings.type = settings.type || item.type || self.settings.defaultType || (settings.defaults ? settings.defaults.type : null);
              item = global$4.create(settings);
            }
            ctrlItems.push(item);
          }
        });
        return ctrlItems;
      },
      renderNew: function () {
        var self = this;
        self.items().each(function (ctrl, index) {
          var containerElm;
          ctrl.parent(self);
          if (!ctrl.state.get('rendered')) {
            containerElm = self.getEl('body');
            if (containerElm.hasChildNodes() && index <= containerElm.childNodes.length - 1) {
              global$9(containerElm.childNodes[index]).before(ctrl.renderHtml());
            } else {
              global$9(containerElm).append(ctrl.renderHtml());
            }
            ctrl.postRender();
            ReflowQueue.add(ctrl);
          }
        });
        self._layout.applyClasses(self.items().filter(':visible'));
        self._lastRect = null;
        return self;
      },
      append: function (items) {
        return this.add(items).renderNew();
      },
      prepend: function (items) {
        var self = this;
        self.items().set(self.create(items).concat(self.items().toArray()));
        return self.renderNew();
      },
      insert: function (items, index, before) {
        var self = this;
        var curItems, beforeItems, afterItems;
        items = self.create(items);
        curItems = self.items();
        if (!before && index < curItems.length - 1) {
          index += 1;
        }
        if (index >= 0 && index < curItems.length) {
          beforeItems = curItems.slice(0, index).toArray();
          afterItems = curItems.slice(index).toArray();
          curItems.set(beforeItems.concat(items, afterItems));
        }
        return self.renderNew();
      },
      fromJSON: function (data) {
        var self = this;
        for (var name in data) {
          self.find('#' + name).value(data[name]);
        }
        return self;
      },
      toJSON: function () {
        var self = this, data = {};
        self.find('*').each(function (ctrl) {
          var name = ctrl.name(), value = ctrl.value();
          if (name && typeof value !== 'undefined') {
            data[name] = value;
          }
        });
        return data;
      },
      renderHtml: function () {
        var self = this, layout = self._layout, role = this.settings.role;
        self.preRender();
        layout.preRender(self);
        return '<div id="' + self._id + '" class="' + self.classes + '"' + (role ? ' role="' + this.settings.role + '"' : '') + '>' + '<div id="' + self._id + '-body" class="' + self.bodyClasses + '">' + (self.settings.html || '') + layout.renderHtml(self) + '</div>' + '</div>';
      },
      postRender: function () {
        var self = this;
        var box;
        self.items().exec('postRender');
        self._super();
        self._layout.postRender(self);
        self.state.set('rendered', true);
        if (self.settings.style) {
          self.$el.css(self.settings.style);
        }
        if (self.settings.border) {
          box = self.borderBox;
          self.$el.css({
            'border-top-width': box.top,
            'border-right-width': box.right,
            'border-bottom-width': box.bottom,
            'border-left-width': box.left
          });
        }
        if (!self.parent()) {
          self.keyboardNav = KeyboardNavigation({ root: self });
        }
        return self;
      },
      initLayoutRect: function () {
        var self = this, layoutRect = self._super();
        self._layout.recalc(self);
        return layoutRect;
      },
      recalc: function () {
        var self = this;
        var rect = self._layoutRect;
        var lastRect = self._lastRect;
        if (!lastRect || lastRect.w !== rect.w || lastRect.h !== rect.h) {
          self._layout.recalc(self);
          rect = self.layoutRect();
          self._lastRect = {
            x: rect.x,
            y: rect.y,
            w: rect.w,
            h: rect.h
          };
          return true;
        }
      },
      reflow: function () {
        var i;
        ReflowQueue.remove(this);
        if (this.visible()) {
          Control$1.repaintControls = [];
          Control$1.repaintControls.map = {};
          this.recalc();
          i = Control$1.repaintControls.length;
          while (i--) {
            Control$1.repaintControls[i].repaint();
          }
          if (this.settings.layout !== 'flow' && this.settings.layout !== 'stack') {
            this.repaint();
          }
          Control$1.repaintControls = [];
        }
        return this;
      }
    });

    function getDocumentSize(doc) {
      var documentElement, body, scrollWidth, clientWidth;
      var offsetWidth, scrollHeight, clientHeight, offsetHeight;
      var max = Math.max;
      documentElement = doc.documentElement;
      body = doc.body;
      scrollWidth = max(documentElement.scrollWidth, body.scrollWidth);
      clientWidth = max(documentElement.clientWidth, body.clientWidth);
      offsetWidth = max(documentElement.offsetWidth, body.offsetWidth);
      scrollHeight = max(documentElement.scrollHeight, body.scrollHeight);
      clientHeight = max(documentElement.clientHeight, body.clientHeight);
      offsetHeight = max(documentElement.offsetHeight, body.offsetHeight);
      return {
        width: scrollWidth < offsetWidth ? clientWidth : scrollWidth,
        height: scrollHeight < offsetHeight ? clientHeight : scrollHeight
      };
    }
    function updateWithTouchData(e) {
      var keys, i;
      if (e.changedTouches) {
        keys = 'screenX screenY pageX pageY clientX clientY'.split(' ');
        for (i = 0; i < keys.length; i++) {
          e[keys[i]] = e.changedTouches[0][keys[i]];
        }
      }
    }
    function DragHelper (id, settings) {
      var $eventOverlay;
      var doc = settings.document || domGlobals.document;
      var downButton;
      var start, stop, drag, startX, startY;
      settings = settings || {};
      var handleElement = doc.getElementById(settings.handle || id);
      start = function (e) {
        var docSize = getDocumentSize(doc);
        var handleElm, cursor;
        updateWithTouchData(e);
        e.preventDefault();
        downButton = e.button;
        handleElm = handleElement;
        startX = e.screenX;
        startY = e.screenY;
        if (domGlobals.window.getComputedStyle) {
          cursor = domGlobals.window.getComputedStyle(handleElm, null).getPropertyValue('cursor');
        } else {
          cursor = handleElm.runtimeStyle.cursor;
        }
        $eventOverlay = global$9('<div></div>').css({
          position: 'absolute',
          top: 0,
          left: 0,
          width: docSize.width,
          height: docSize.height,
          zIndex: 2147483647,
          opacity: 0.0001,
          cursor: cursor
        }).appendTo(doc.body);
        global$9(doc).on('mousemove touchmove', drag).on('mouseup touchend', stop);
        settings.start(e);
      };
      drag = function (e) {
        updateWithTouchData(e);
        if (e.button !== downButton) {
          return stop(e);
        }
        e.deltaX = e.screenX - startX;
        e.deltaY = e.screenY - startY;
        e.preventDefault();
        settings.drag(e);
      };
      stop = function (e) {
        updateWithTouchData(e);
        global$9(doc).off('mousemove touchmove', drag).off('mouseup touchend', stop);
        $eventOverlay.remove();
        if (settings.stop) {
          settings.stop(e);
        }
      };
      this.destroy = function () {
        global$9(handleElement).off();
      };
      global$9(handleElement).on('mousedown touchstart', start);
    }

    var Scrollable = {
      init: function () {
        var self = this;
        self.on('repaint', self.renderScroll);
      },
      renderScroll: function () {
        var self = this, margin = 2;
        function repaintScroll() {
          var hasScrollH, hasScrollV, bodyElm;
          function repaintAxis(axisName, posName, sizeName, contentSizeName, hasScroll, ax) {
            var containerElm, scrollBarElm, scrollThumbElm;
            var containerSize, scrollSize, ratio, rect;
            var posNameLower, sizeNameLower;
            scrollBarElm = self.getEl('scroll' + axisName);
            if (scrollBarElm) {
              posNameLower = posName.toLowerCase();
              sizeNameLower = sizeName.toLowerCase();
              global$9(self.getEl('absend')).css(posNameLower, self.layoutRect()[contentSizeName] - 1);
              if (!hasScroll) {
                global$9(scrollBarElm).css('display', 'none');
                return;
              }
              global$9(scrollBarElm).css('display', 'block');
              containerElm = self.getEl('body');
              scrollThumbElm = self.getEl('scroll' + axisName + 't');
              containerSize = containerElm['client' + sizeName] - margin * 2;
              containerSize -= hasScrollH && hasScrollV ? scrollBarElm['client' + ax] : 0;
              scrollSize = containerElm['scroll' + sizeName];
              ratio = containerSize / scrollSize;
              rect = {};
              rect[posNameLower] = containerElm['offset' + posName] + margin;
              rect[sizeNameLower] = containerSize;
              global$9(scrollBarElm).css(rect);
              rect = {};
              rect[posNameLower] = containerElm['scroll' + posName] * ratio;
              rect[sizeNameLower] = containerSize * ratio;
              global$9(scrollThumbElm).css(rect);
            }
          }
          bodyElm = self.getEl('body');
          hasScrollH = bodyElm.scrollWidth > bodyElm.clientWidth;
          hasScrollV = bodyElm.scrollHeight > bodyElm.clientHeight;
          repaintAxis('h', 'Left', 'Width', 'contentW', hasScrollH, 'Height');
          repaintAxis('v', 'Top', 'Height', 'contentH', hasScrollV, 'Width');
        }
        function addScroll() {
          function addScrollAxis(axisName, posName, sizeName, deltaPosName, ax) {
            var scrollStart;
            var axisId = self._id + '-scroll' + axisName, prefix = self.classPrefix;
            global$9(self.getEl()).append('<div id="' + axisId + '" class="' + prefix + 'scrollbar ' + prefix + 'scrollbar-' + axisName + '">' + '<div id="' + axisId + 't" class="' + prefix + 'scrollbar-thumb"></div>' + '</div>');
            self.draghelper = new DragHelper(axisId + 't', {
              start: function () {
                scrollStart = self.getEl('body')['scroll' + posName];
                global$9('#' + axisId).addClass(prefix + 'active');
              },
              drag: function (e) {
                var ratio, hasScrollH, hasScrollV, containerSize;
                var layoutRect = self.layoutRect();
                hasScrollH = layoutRect.contentW > layoutRect.innerW;
                hasScrollV = layoutRect.contentH > layoutRect.innerH;
                containerSize = self.getEl('body')['client' + sizeName] - margin * 2;
                containerSize -= hasScrollH && hasScrollV ? self.getEl('scroll' + axisName)['client' + ax] : 0;
                ratio = containerSize / self.getEl('body')['scroll' + sizeName];
                self.getEl('body')['scroll' + posName] = scrollStart + e['delta' + deltaPosName] / ratio;
              },
              stop: function () {
                global$9('#' + axisId).removeClass(prefix + 'active');
              }
            });
          }
          self.classes.add('scroll');
          addScrollAxis('v', 'Top', 'Height', 'Y', 'Width');
          addScrollAxis('h', 'Left', 'Width', 'X', 'Height');
        }
        if (self.settings.autoScroll) {
          if (!self._hasScroll) {
            self._hasScroll = true;
            addScroll();
            self.on('wheel', function (e) {
              var bodyEl = self.getEl('body');
              bodyEl.scrollLeft += (e.deltaX || 0) * 10;
              bodyEl.scrollTop += e.deltaY * 10;
              repaintScroll();
            });
            global$9(self.getEl('body')).on('scroll', repaintScroll);
          }
          repaintScroll();
        }
      }
    };

    var Panel = Container.extend({
      Defaults: {
        layout: 'fit',
        containerCls: 'panel'
      },
      Mixins: [Scrollable],
      renderHtml: function () {
        var self = this;
        var layout = self._layout;
        var innerHtml = self.settings.html;
        self.preRender();
        layout.preRender(self);
        if (typeof innerHtml === 'undefined') {
          innerHtml = '<div id="' + self._id + '-body" class="' + self.bodyClasses + '">' + layout.renderHtml(self) + '</div>';
        } else {
          if (typeof innerHtml === 'function') {
            innerHtml = innerHtml.call(self);
          }
          self._hasBody = false;
        }
        return '<div id="' + self._id + '" class="' + self.classes + '" hidefocus="1" tabindex="-1" role="group">' + (self._preBodyHtml || '') + innerHtml + '</div>';
      }
    });

    var Resizable = {
      resizeToContent: function () {
        this._layoutRect.autoResize = true;
        this._lastRect = null;
        this.reflow();
      },
      resizeTo: function (w, h) {
        if (w <= 1 || h <= 1) {
          var rect = funcs.getWindowSize();
          w = w <= 1 ? w * rect.w : w;
          h = h <= 1 ? h * rect.h : h;
        }
        this._layoutRect.autoResize = false;
        return this.layoutRect({
          minW: w,
          minH: h,
          w: w,
          h: h
        }).reflow();
      },
      resizeBy: function (dw, dh) {
        var self = this, rect = self.layoutRect();
        return self.resizeTo(rect.w + dw, rect.h + dh);
      }
    };

    var documentClickHandler, documentScrollHandler, windowResizeHandler;
    var visiblePanels = [];
    var zOrder = [];
    var hasModal;
    function isChildOf(ctrl, parent) {
      while (ctrl) {
        if (ctrl === parent) {
          return true;
        }
        ctrl = ctrl.parent();
      }
    }
    function skipOrHidePanels(e) {
      var i = visiblePanels.length;
      while (i--) {
        var panel = visiblePanels[i], clickCtrl = panel.getParentCtrl(e.target);
        if (panel.settings.autohide) {
          if (clickCtrl) {
            if (isChildOf(clickCtrl, panel) || panel.parent() === clickCtrl) {
              continue;
            }
          }
          e = panel.fire('autohide', { target: e.target });
          if (!e.isDefaultPrevented()) {
            panel.hide();
          }
        }
      }
    }
    function bindDocumentClickHandler() {
      if (!documentClickHandler) {
        documentClickHandler = function (e) {
          if (e.button === 2) {
            return;
          }
          skipOrHidePanels(e);
        };
        global$9(domGlobals.document).on('click touchstart', documentClickHandler);
      }
    }
    function bindDocumentScrollHandler() {
      if (!documentScrollHandler) {
        documentScrollHandler = function () {
          var i;
          i = visiblePanels.length;
          while (i--) {
            repositionPanel(visiblePanels[i]);
          }
        };
        global$9(domGlobals.window).on('scroll', documentScrollHandler);
      }
    }
    function bindWindowResizeHandler() {
      if (!windowResizeHandler) {
        var docElm_1 = domGlobals.document.documentElement;
        var clientWidth_1 = docElm_1.clientWidth, clientHeight_1 = docElm_1.clientHeight;
        windowResizeHandler = function () {
          if (!domGlobals.document.all || clientWidth_1 !== docElm_1.clientWidth || clientHeight_1 !== docElm_1.clientHeight) {
            clientWidth_1 = docElm_1.clientWidth;
            clientHeight_1 = docElm_1.clientHeight;
            FloatPanel.hideAll();
          }
        };
        global$9(domGlobals.window).on('resize', windowResizeHandler);
      }
    }
    function repositionPanel(panel) {
      var scrollY = funcs.getViewPort().y;
      function toggleFixedChildPanels(fixed, deltaY) {
        var parent;
        for (var i = 0; i < visiblePanels.length; i++) {
          if (visiblePanels[i] !== panel) {
            parent = visiblePanels[i].parent();
            while (parent && (parent = parent.parent())) {
              if (parent === panel) {
                visiblePanels[i].fixed(fixed).moveBy(0, deltaY).repaint();
              }
            }
          }
        }
      }
      if (panel.settings.autofix) {
        if (!panel.state.get('fixed')) {
          panel._autoFixY = panel.layoutRect().y;
          if (panel._autoFixY < scrollY) {
            panel.fixed(true).layoutRect({ y: 0 }).repaint();
            toggleFixedChildPanels(true, scrollY - panel._autoFixY);
          }
        } else {
          if (panel._autoFixY > scrollY) {
            panel.fixed(false).layoutRect({ y: panel._autoFixY }).repaint();
            toggleFixedChildPanels(false, panel._autoFixY - scrollY);
          }
        }
      }
    }
    function addRemove(add, ctrl) {
      var i, zIndex = FloatPanel.zIndex || 65535, topModal;
      if (add) {
        zOrder.push(ctrl);
      } else {
        i = zOrder.length;
        while (i--) {
          if (zOrder[i] === ctrl) {
            zOrder.splice(i, 1);
          }
        }
      }
      if (zOrder.length) {
        for (i = 0; i < zOrder.length; i++) {
          if (zOrder[i].modal) {
            zIndex++;
            topModal = zOrder[i];
          }
          zOrder[i].getEl().style.zIndex = zIndex;
          zOrder[i].zIndex = zIndex;
          zIndex++;
        }
      }
      var modalBlockEl = global$9('#' + ctrl.classPrefix + 'modal-block', ctrl.getContainerElm())[0];
      if (topModal) {
        global$9(modalBlockEl).css('z-index', topModal.zIndex - 1);
      } else if (modalBlockEl) {
        modalBlockEl.parentNode.removeChild(modalBlockEl);
        hasModal = false;
      }
      FloatPanel.currentZIndex = zIndex;
    }
    var FloatPanel = Panel.extend({
      Mixins: [
        Movable,
        Resizable
      ],
      init: function (settings) {
        var self = this;
        self._super(settings);
        self._eventsRoot = self;
        self.classes.add('floatpanel');
        if (settings.autohide) {
          bindDocumentClickHandler();
          bindWindowResizeHandler();
          visiblePanels.push(self);
        }
        if (settings.autofix) {
          bindDocumentScrollHandler();
          self.on('move', function () {
            repositionPanel(this);
          });
        }
        self.on('postrender show', function (e) {
          if (e.control === self) {
            var $modalBlockEl_1;
            var prefix_1 = self.classPrefix;
            if (self.modal && !hasModal) {
              $modalBlockEl_1 = global$9('#' + prefix_1 + 'modal-block', self.getContainerElm());
              if (!$modalBlockEl_1[0]) {
                $modalBlockEl_1 = global$9('<div id="' + prefix_1 + 'modal-block" class="' + prefix_1 + 'reset ' + prefix_1 + 'fade"></div>').appendTo(self.getContainerElm());
              }
              global$7.setTimeout(function () {
                $modalBlockEl_1.addClass(prefix_1 + 'in');
                global$9(self.getEl()).addClass(prefix_1 + 'in');
              });
              hasModal = true;
            }
            addRemove(true, self);
          }
        });
        self.on('show', function () {
          self.parents().each(function (ctrl) {
            if (ctrl.state.get('fixed')) {
              self.fixed(true);
              return false;
            }
          });
        });
        if (settings.popover) {
          self._preBodyHtml = '<div class="' + self.classPrefix + 'arrow"></div>';
          self.classes.add('popover').add('bottom').add(self.isRtl() ? 'end' : 'start');
        }
        self.aria('label', settings.ariaLabel);
        self.aria('labelledby', self._id);
        self.aria('describedby', self.describedBy || self._id + '-none');
      },
      fixed: function (state) {
        var self = this;
        if (self.state.get('fixed') !== state) {
          if (self.state.get('rendered')) {
            var viewport = funcs.getViewPort();
            if (state) {
              self.layoutRect().y -= viewport.y;
            } else {
              self.layoutRect().y += viewport.y;
            }
          }
          self.classes.toggle('fixed', state);
          self.state.set('fixed', state);
        }
        return self;
      },
      show: function () {
        var self = this;
        var i;
        var state = self._super();
        i = visiblePanels.length;
        while (i--) {
          if (visiblePanels[i] === self) {
            break;
          }
        }
        if (i === -1) {
          visiblePanels.push(self);
        }
        return state;
      },
      hide: function () {
        removeVisiblePanel(this);
        addRemove(false, this);
        return this._super();
      },
      hideAll: function () {
        FloatPanel.hideAll();
      },
      close: function () {
        var self = this;
        if (!self.fire('close').isDefaultPrevented()) {
          self.remove();
          addRemove(false, self);
        }
        return self;
      },
      remove: function () {
        removeVisiblePanel(this);
        this._super();
      },
      postRender: function () {
        var self = this;
        if (self.settings.bodyRole) {
          this.getEl('body').setAttribute('role', self.settings.bodyRole);
        }
        return self._super();
      }
    });
    FloatPanel.hideAll = function () {
      var i = visiblePanels.length;
      while (i--) {
        var panel = visiblePanels[i];
        if (panel && panel.settings.autohide) {
          panel.hide();
          visiblePanels.splice(i, 1);
        }
      }
    };
    function removeVisiblePanel(panel) {
      var i;
      i = visiblePanels.length;
      while (i--) {
        if (visiblePanels[i] === panel) {
          visiblePanels.splice(i, 1);
        }
      }
      i = zOrder.length;
      while (i--) {
        if (zOrder[i] === panel) {
          zOrder.splice(i, 1);
        }
      }
    }

    var isFixed$1 = function (inlineToolbarContainer, editor) {
      return !!(inlineToolbarContainer && !editor.settings.ui_container);
    };
    var render$1 = function (editor, theme, args) {
      var panel, inlineToolbarContainer;
      var DOM = global$3.DOM;
      var fixedToolbarContainer = getFixedToolbarContainer(editor);
      if (fixedToolbarContainer) {
        inlineToolbarContainer = DOM.select(fixedToolbarContainer)[0];
      }
      var reposition = function () {
        if (panel && panel.moveRel && panel.visible() && !panel._fixed) {
          var scrollContainer = editor.selection.getScrollContainer(), body = editor.getBody();
          var deltaX = 0, deltaY = 0;
          if (scrollContainer) {
            var bodyPos = DOM.getPos(body), scrollContainerPos = DOM.getPos(scrollContainer);
            deltaX = Math.max(0, scrollContainerPos.x - bodyPos.x);
            deltaY = Math.max(0, scrollContainerPos.y - bodyPos.y);
          }
          panel.fixed(false).moveRel(body, editor.rtl ? [
            'tr-br',
            'br-tr'
          ] : [
            'tl-bl',
            'bl-tl',
            'tr-br'
          ]).moveBy(deltaX, deltaY);
        }
      };
      var show = function () {
        if (panel) {
          panel.show();
          reposition();
          DOM.addClass(editor.getBody(), 'mce-edit-focus');
        }
      };
      var hide = function () {
        if (panel) {
          panel.hide();
          FloatPanel.hideAll();
          DOM.removeClass(editor.getBody(), 'mce-edit-focus');
        }
      };
      var render = function () {
        if (panel) {
          if (!panel.visible()) {
            show();
          }
          return;
        }
        panel = theme.panel = global$4.create({
          type: inlineToolbarContainer ? 'panel' : 'floatpanel',
          role: 'application',
          classes: 'tinymce tinymce-inline',
          layout: 'flex',
          direction: 'column',
          align: 'stretch',
          autohide: false,
          autofix: true,
          fixed: isFixed$1(inlineToolbarContainer, editor),
          border: 1,
          items: [
            hasMenubar(editor) === false ? null : {
              type: 'menubar',
              border: '0 0 1 0',
              items: Menubar.createMenuButtons(editor)
            },
            Toolbar.createToolbars(editor, getToolbarSize(editor))
          ]
        });
        UiContainer.setUiContainer(editor, panel);
        Events.fireBeforeRenderUI(editor);
        if (inlineToolbarContainer) {
          panel.renderTo(inlineToolbarContainer).reflow();
        } else {
          panel.renderTo().reflow();
        }
        A11y.addKeys(editor, panel);
        show();
        ContextToolbars.addContextualToolbars(editor);
        editor.on('nodeChange', reposition);
        editor.on('ResizeWindow', reposition);
        editor.on('activate', show);
        editor.on('deactivate', hide);
        editor.nodeChanged();
      };
      editor.settings.content_editable = true;
      editor.on('focus', function () {
        if (isSkinDisabled(editor) === false && args.skinUiCss) {
          DOM.styleSheetLoader.load(args.skinUiCss, render, render);
        } else {
          render();
        }
      });
      editor.on('blur hide', hide);
      editor.on('remove', function () {
        if (panel) {
          panel.remove();
          panel = null;
        }
      });
      if (isSkinDisabled(editor) === false && args.skinUiCss) {
        DOM.styleSheetLoader.load(args.skinUiCss, SkinLoaded.fireSkinLoaded(editor));
      } else {
        SkinLoaded.fireSkinLoaded(editor)();
      }
      return {};
    };
    var Inline = { render: render$1 };

    function Throbber (elm, inline) {
      var self = this;
      var state;
      var classPrefix = Control$1.classPrefix;
      var timer;
      self.show = function (time, callback) {
        function render() {
          if (state) {
            global$9(elm).append('<div class="' + classPrefix + 'throbber' + (inline ? ' ' + classPrefix + 'throbber-inline' : '') + '"></div>');
            if (callback) {
              callback();
            }
          }
        }
        self.hide();
        state = true;
        if (time) {
          timer = global$7.setTimeout(render, time);
        } else {
          render();
        }
        return self;
      };
      self.hide = function () {
        var child = elm.lastChild;
        global$7.clearTimeout(timer);
        if (child && child.className.indexOf('throbber') !== -1) {
          child.parentNode.removeChild(child);
        }
        state = false;
        return self;
      };
    }

    var setup = function (editor, theme) {
      var throbber;
      editor.on('ProgressState', function (e) {
        throbber = throbber || new Throbber(theme.panel.getEl('body'));
        if (e.state) {
          throbber.show(e.time);
        } else {
          throbber.hide();
        }
      });
    };
    var ProgressState = { setup: setup };

    var renderUI = function (editor, theme, args) {
      var skinUrl = getSkinUrl(editor);
      if (skinUrl) {
        args.skinUiCss = skinUrl + '/skin.min.css';
        editor.contentCSS.push(skinUrl + '/content' + (editor.inline ? '.inline' : '') + '.min.css');
      }
      ProgressState.setup(editor, theme);
      return isInline(editor) ? Inline.render(editor, theme, args) : Iframe.render(editor, theme, args);
    };
    var Render = { renderUI: renderUI };

    var Tooltip = Control$1.extend({
      Mixins: [Movable],
      Defaults: { classes: 'widget tooltip tooltip-n' },
      renderHtml: function () {
        var self = this, prefix = self.classPrefix;
        return '<div id="' + self._id + '" class="' + self.classes + '" role="presentation">' + '<div class="' + prefix + 'tooltip-arrow"></div>' + '<div class="' + prefix + 'tooltip-inner">' + self.encode(self.state.get('text')) + '</div>' + '</div>';
      },
      bindStates: function () {
        var self = this;
        self.state.on('change:text', function (e) {
          self.getEl().lastChild.innerHTML = self.encode(e.value);
        });
        return self._super();
      },
      repaint: function () {
        var self = this;
        var style, rect;
        style = self.getEl().style;
        rect = self._layoutRect;
        style.left = rect.x + 'px';
        style.top = rect.y + 'px';
        style.zIndex = 65535 + 65535;
      }
    });

    var Widget = Control$1.extend({
      init: function (settings) {
        var self = this;
        self._super(settings);
        settings = self.settings;
        self.canFocus = true;
        if (settings.tooltip && Widget.tooltips !== false) {
          self.on('mouseenter', function (e) {
            var tooltip = self.tooltip().moveTo(-65535);
            if (e.control === self) {
              var rel = tooltip.text(settings.tooltip).show().testMoveRel(self.getEl(), [
                'bc-tc',
                'bc-tl',
                'bc-tr'
              ]);
              tooltip.classes.toggle('tooltip-n', rel === 'bc-tc');
              tooltip.classes.toggle('tooltip-nw', rel === 'bc-tl');
              tooltip.classes.toggle('tooltip-ne', rel === 'bc-tr');
              tooltip.moveRel(self.getEl(), rel);
            } else {
              tooltip.hide();
            }
          });
          self.on('mouseleave mousedown click', function () {
            self.tooltip().remove();
            self._tooltip = null;
          });
        }
        self.aria('label', settings.ariaLabel || settings.tooltip);
      },
      tooltip: function () {
        if (!this._tooltip) {
          this._tooltip = new Tooltip({ type: 'tooltip' });
          UiContainer.inheritUiContainer(this, this._tooltip);
          this._tooltip.renderTo();
        }
        return this._tooltip;
      },
      postRender: function () {
        var self = this, settings = self.settings;
        self._super();
        if (!self.parent() && (settings.width || settings.height)) {
          self.initLayoutRect();
          self.repaint();
        }
        if (settings.autofocus) {
          self.focus();
        }
      },
      bindStates: function () {
        var self = this;
        function disable(state) {
          self.aria('disabled', state);
          self.classes.toggle('disabled', state);
        }
        function active(state) {
          self.aria('pressed', state);
          self.classes.toggle('active', state);
        }
        self.state.on('change:disabled', function (e) {
          disable(e.value);
        });
        self.state.on('change:active', function (e) {
          active(e.value);
        });
        if (self.state.get('disabled')) {
          disable(true);
        }
        if (self.state.get('active')) {
          active(true);
        }
        return self._super();
      },
      remove: function () {
        this._super();
        if (this._tooltip) {
          this._tooltip.remove();
          this._tooltip = null;
        }
      }
    });

    var Progress = Widget.extend({
      Defaults: { value: 0 },
      init: function (settings) {
        var self = this;
        self._super(settings);
        self.classes.add('progress');
        if (!self.settings.filter) {
          self.settings.filter = function (value) {
            return Math.round(value);
          };
        }
      },
      renderHtml: function () {
        var self = this, id = self._id, prefix = this.classPrefix;
        return '<div id="' + id + '" class="' + self.classes + '">' + '<div class="' + prefix + 'bar-container">' + '<div class="' + prefix + 'bar"></div>' + '</div>' + '<div class="' + prefix + 'text">0%</div>' + '</div>';
      },
      postRender: function () {
        var self = this;
        self._super();
        self.value(self.settings.value);
        return self;
      },
      bindStates: function () {
        var self = this;
        function setValue(value) {
          value = self.settings.filter(value);
          self.getEl().lastChild.innerHTML = value + '%';
          self.getEl().firstChild.firstChild.style.width = value + '%';
        }
        self.state.on('change:value', function (e) {
          setValue(e.value);
        });
        setValue(self.state.get('value'));
        return self._super();
      }
    });

    var updateLiveRegion = function (ctx, text) {
      ctx.getEl().lastChild.textContent = text + (ctx.progressBar ? ' ' + ctx.progressBar.value() + '%' : '');
    };
    var Notification = Control$1.extend({
      Mixins: [Movable],
      Defaults: { classes: 'widget notification' },
      init: function (settings) {
        var self = this;
        self._super(settings);
        self.maxWidth = settings.maxWidth;
        if (settings.text) {
          self.text(settings.text);
        }
        if (settings.icon) {
          self.icon = settings.icon;
        }
        if (settings.color) {
          self.color = settings.color;
        }
        if (settings.type) {
          self.classes.add('notification-' + settings.type);
        }
        if (settings.timeout && (settings.timeout < 0 || settings.timeout > 0) && !settings.closeButton) {
          self.closeButton = false;
        } else {
          self.classes.add('has-close');
          self.closeButton = true;
        }
        if (settings.progressBar) {
          self.progressBar = new Progress();
        }
        self.on('click', function (e) {
          if (e.target.className.indexOf(self.classPrefix + 'close') !== -1) {
            self.close();
          }
        });
      },
      renderHtml: function () {
        var self = this;
        var prefix = self.classPrefix;
        var icon = '', closeButton = '', progressBar = '', notificationStyle = '';
        if (self.icon) {
          icon = '<i class="' + prefix + 'ico' + ' ' + prefix + 'i-' + self.icon + '"></i>';
        }
        notificationStyle = ' style="max-width: ' + self.maxWidth + 'px;' + (self.color ? 'background-color: ' + self.color + ';"' : '"');
        if (self.closeButton) {
          closeButton = '<button type="button" class="' + prefix + 'close" aria-hidden="true">\xD7</button>';
        }
        if (self.progressBar) {
          progressBar = self.progressBar.renderHtml();
        }
        return '<div id="' + self._id + '" class="' + self.classes + '"' + notificationStyle + ' role="presentation">' + icon + '<div class="' + prefix + 'notification-inner">' + self.state.get('text') + '</div>' + progressBar + closeButton + '<div style="clip: rect(1px, 1px, 1px, 1px);height: 1px;overflow: hidden;position: absolute;width: 1px;"' + ' aria-live="assertive" aria-relevant="additions" aria-atomic="true"></div>' + '</div>';
      },
      postRender: function () {
        var self = this;
        global$7.setTimeout(function () {
          self.$el.addClass(self.classPrefix + 'in');
          updateLiveRegion(self, self.state.get('text'));
        }, 100);
        return self._super();
      },
      bindStates: function () {
        var self = this;
        self.state.on('change:text', function (e) {
          self.getEl().firstChild.innerHTML = e.value;
          updateLiveRegion(self, e.value);
        });
        if (self.progressBar) {
          self.progressBar.bindStates();
          self.progressBar.state.on('change:value', function (e) {
            updateLiveRegion(self, self.state.get('text'));
          });
        }
        return self._super();
      },
      close: function () {
        var self = this;
        if (!self.fire('close').isDefaultPrevented()) {
          self.remove();
        }
        return self;
      },
      repaint: function () {
        var self = this;
        var style, rect;
        style = self.getEl().style;
        rect = self._layoutRect;
        style.left = rect.x + 'px';
        style.top = rect.y + 'px';
        style.zIndex = 65535 - 1;
      }
    });

    function NotificationManagerImpl (editor) {
      var getEditorContainer = function (editor) {
        return editor.inline ? editor.getElement() : editor.getContentAreaContainer();
      };
      var getContainerWidth = function () {
        var container = getEditorContainer(editor);
        return funcs.getSize(container).width;
      };
      var prePositionNotifications = function (notifications) {
        each(notifications, function (notification) {
          notification.moveTo(0, 0);
        });
      };
      var positionNotifications = function (notifications) {
        if (notifications.length > 0) {
          var firstItem = notifications.slice(0, 1)[0];
          var container = getEditorContainer(editor);
          firstItem.moveRel(container, 'tc-tc');
          each(notifications, function (notification, index) {
            if (index > 0) {
              notification.moveRel(notifications[index - 1].getEl(), 'bc-tc');
            }
          });
        }
      };
      var reposition = function (notifications) {
        prePositionNotifications(notifications);
        positionNotifications(notifications);
      };
      var open = function (args, closeCallback) {
        var extendedArgs = global$2.extend(args, { maxWidth: getContainerWidth() });
        var notif = new Notification(extendedArgs);
        notif.args = extendedArgs;
        if (extendedArgs.timeout > 0) {
          notif.timer = setTimeout(function () {
            notif.close();
            closeCallback();
          }, extendedArgs.timeout);
        }
        notif.on('close', function () {
          closeCallback();
        });
        notif.renderTo();
        return notif;
      };
      var close = function (notification) {
        notification.close();
      };
      var getArgs = function (notification) {
        return notification.args;
      };
      return {
        open: open,
        close: close,
        reposition: reposition,
        getArgs: getArgs
      };
    }

    var windows = [];
    var oldMetaValue = '';
    function toggleFullScreenState(state) {
      var noScaleMetaValue = 'width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0';
      var viewport = global$9('meta[name=viewport]')[0], contentValue;
      if (global$8.overrideViewPort === false) {
        return;
      }
      if (!viewport) {
        viewport = domGlobals.document.createElement('meta');
        viewport.setAttribute('name', 'viewport');
        domGlobals.document.getElementsByTagName('head')[0].appendChild(viewport);
      }
      contentValue = viewport.getAttribute('content');
      if (contentValue && typeof oldMetaValue !== 'undefined') {
        oldMetaValue = contentValue;
      }
      viewport.setAttribute('content', state ? noScaleMetaValue : oldMetaValue);
    }
    function toggleBodyFullScreenClasses(classPrefix, state) {
      if (checkFullscreenWindows() && state === false) {
        global$9([
          domGlobals.document.documentElement,
          domGlobals.document.body
        ]).removeClass(classPrefix + 'fullscreen');
      }
    }
    function checkFullscreenWindows() {
      for (var i = 0; i < windows.length; i++) {
        if (windows[i]._fullscreen) {
          return true;
        }
      }
      return false;
    }
    function handleWindowResize() {
      if (!global$8.desktop) {
        var lastSize_1 = {
          w: domGlobals.window.innerWidth,
          h: domGlobals.window.innerHeight
        };
        global$7.setInterval(function () {
          var w = domGlobals.window.innerWidth, h = domGlobals.window.innerHeight;
          if (lastSize_1.w !== w || lastSize_1.h !== h) {
            lastSize_1 = {
              w: w,
              h: h
            };
            global$9(domGlobals.window).trigger('resize');
          }
        }, 100);
      }
      function reposition() {
        var i;
        var rect = funcs.getWindowSize();
        var layoutRect;
        for (i = 0; i < windows.length; i++) {
          layoutRect = windows[i].layoutRect();
          windows[i].moveTo(windows[i].settings.x || Math.max(0, rect.w / 2 - layoutRect.w / 2), windows[i].settings.y || Math.max(0, rect.h / 2 - layoutRect.h / 2));
        }
      }
      global$9(domGlobals.window).on('resize', reposition);
    }
    var Window = FloatPanel.extend({
      modal: true,
      Defaults: {
        border: 1,
        layout: 'flex',
        containerCls: 'panel',
        role: 'dialog',
        callbacks: {
          submit: function () {
            this.fire('submit', { data: this.toJSON() });
          },
          close: function () {
            this.close();
          }
        }
      },
      init: function (settings) {
        var self = this;
        self._super(settings);
        if (self.isRtl()) {
          self.classes.add('rtl');
        }
        self.classes.add('window');
        self.bodyClasses.add('window-body');
        self.state.set('fixed', true);
        if (settings.buttons) {
          self.statusbar = new Panel({
            layout: 'flex',
            border: '1 0 0 0',
            spacing: 3,
            padding: 10,
            align: 'center',
            pack: self.isRtl() ? 'start' : 'end',
            defaults: { type: 'button' },
            items: settings.buttons
          });
          self.statusbar.classes.add('foot');
          self.statusbar.parent(self);
        }
        self.on('click', function (e) {
          var closeClass = self.classPrefix + 'close';
          if (funcs.hasClass(e.target, closeClass) || funcs.hasClass(e.target.parentNode, closeClass)) {
            self.close();
          }
        });
        self.on('cancel', function () {
          self.close();
        });
        self.on('move', function (e) {
          if (e.control === self) {
            FloatPanel.hideAll();
          }
        });
        self.aria('describedby', self.describedBy || self._id + '-none');
        self.aria('label', settings.title);
        self._fullscreen = false;
      },
      recalc: function () {
        var self = this;
        var statusbar = self.statusbar;
        var layoutRect, width, x, needsRecalc;
        if (self._fullscreen) {
          self.layoutRect(funcs.getWindowSize());
          self.layoutRect().contentH = self.layoutRect().innerH;
        }
        self._super();
        layoutRect = self.layoutRect();
        if (self.settings.title && !self._fullscreen) {
          width = layoutRect.headerW;
          if (width > layoutRect.w) {
            x = layoutRect.x - Math.max(0, width / 2);
            self.layoutRect({
              w: width,
              x: x
            });
            needsRecalc = true;
          }
        }
        if (statusbar) {
          statusbar.layoutRect({ w: self.layoutRect().innerW }).recalc();
          width = statusbar.layoutRect().minW + layoutRect.deltaW;
          if (width > layoutRect.w) {
            x = layoutRect.x - Math.max(0, width - layoutRect.w);
            self.layoutRect({
              w: width,
              x: x
            });
            needsRecalc = true;
          }
        }
        if (needsRecalc) {
          self.recalc();
        }
      },
      initLayoutRect: function () {
        var self = this;
        var layoutRect = self._super();
        var deltaH = 0, headEl;
        if (self.settings.title && !self._fullscreen) {
          headEl = self.getEl('head');
          var size = funcs.getSize(headEl);
          layoutRect.headerW = size.width;
          layoutRect.headerH = size.height;
          deltaH += layoutRect.headerH;
        }
        if (self.statusbar) {
          deltaH += self.statusbar.layoutRect().h;
        }
        layoutRect.deltaH += deltaH;
        layoutRect.minH += deltaH;
        layoutRect.h += deltaH;
        var rect = funcs.getWindowSize();
        layoutRect.x = self.settings.x || Math.max(0, rect.w / 2 - layoutRect.w / 2);
        layoutRect.y = self.settings.y || Math.max(0, rect.h / 2 - layoutRect.h / 2);
        return layoutRect;
      },
      renderHtml: function () {
        var self = this, layout = self._layout, id = self._id, prefix = self.classPrefix;
        var settings = self.settings;
        var headerHtml = '', footerHtml = '', html = settings.html;
        self.preRender();
        layout.preRender(self);
        if (settings.title) {
          headerHtml = '<div id="' + id + '-head" class="' + prefix + 'window-head">' + '<div id="' + id + '-title" class="' + prefix + 'title">' + self.encode(settings.title) + '</div>' + '<div id="' + id + '-dragh" class="' + prefix + 'dragh"></div>' + '<button type="button" class="' + prefix + 'close" aria-hidden="true">' + '<i class="mce-ico mce-i-remove"></i>' + '</button>' + '</div>';
        }
        if (settings.url) {
          html = '<iframe src="' + settings.url + '" tabindex="-1"></iframe>';
        }
        if (typeof html === 'undefined') {
          html = layout.renderHtml(self);
        }
        if (self.statusbar) {
          footerHtml = self.statusbar.renderHtml();
        }
        return '<div id="' + id + '" class="' + self.classes + '" hidefocus="1">' + '<div class="' + self.classPrefix + 'reset" role="application">' + headerHtml + '<div id="' + id + '-body" class="' + self.bodyClasses + '">' + html + '</div>' + footerHtml + '</div>' + '</div>';
      },
      fullscreen: function (state) {
        var self = this;
        var documentElement = domGlobals.document.documentElement;
        var slowRendering;
        var prefix = self.classPrefix;
        var layoutRect;
        if (state !== self._fullscreen) {
          global$9(domGlobals.window).on('resize', function () {
            var time;
            if (self._fullscreen) {
              if (!slowRendering) {
                time = new Date().getTime();
                var rect = funcs.getWindowSize();
                self.moveTo(0, 0).resizeTo(rect.w, rect.h);
                if (new Date().getTime() - time > 50) {
                  slowRendering = true;
                }
              } else {
                if (!self._timer) {
                  self._timer = global$7.setTimeout(function () {
                    var rect = funcs.getWindowSize();
                    self.moveTo(0, 0).resizeTo(rect.w, rect.h);
                    self._timer = 0;
                  }, 50);
                }
              }
            }
          });
          layoutRect = self.layoutRect();
          self._fullscreen = state;
          if (!state) {
            self.borderBox = BoxUtils.parseBox(self.settings.border);
            self.getEl('head').style.display = '';
            layoutRect.deltaH += layoutRect.headerH;
            global$9([
              documentElement,
              domGlobals.document.body
            ]).removeClass(prefix + 'fullscreen');
            self.classes.remove('fullscreen');
            self.moveTo(self._initial.x, self._initial.y).resizeTo(self._initial.w, self._initial.h);
          } else {
            self._initial = {
              x: layoutRect.x,
              y: layoutRect.y,
              w: layoutRect.w,
              h: layoutRect.h
            };
            self.borderBox = BoxUtils.parseBox('0');
            self.getEl('head').style.display = 'none';
            layoutRect.deltaH -= layoutRect.headerH + 2;
            global$9([
              documentElement,
              domGlobals.document.body
            ]).addClass(prefix + 'fullscreen');
            self.classes.add('fullscreen');
            var rect = funcs.getWindowSize();
            self.moveTo(0, 0).resizeTo(rect.w, rect.h);
          }
        }
        return self.reflow();
      },
      postRender: function () {
        var self = this;
        var startPos;
        setTimeout(function () {
          self.classes.add('in');
          self.fire('open');
        }, 0);
        self._super();
        if (self.statusbar) {
          self.statusbar.postRender();
        }
        self.focus();
        this.dragHelper = new DragHelper(self._id + '-dragh', {
          start: function () {
            startPos = {
              x: self.layoutRect().x,
              y: self.layoutRect().y
            };
          },
          drag: function (e) {
            self.moveTo(startPos.x + e.deltaX, startPos.y + e.deltaY);
          }
        });
        self.on('submit', function (e) {
          if (!e.isDefaultPrevented()) {
            self.close();
          }
        });
        windows.push(self);
        toggleFullScreenState(true);
      },
      submit: function () {
        return this.fire('submit', { data: this.toJSON() });
      },
      remove: function () {
        var self = this;
        var i;
        self.dragHelper.destroy();
        self._super();
        if (self.statusbar) {
          this.statusbar.remove();
        }
        toggleBodyFullScreenClasses(self.classPrefix, false);
        i = windows.length;
        while (i--) {
          if (windows[i] === self) {
            windows.splice(i, 1);
          }
        }
        toggleFullScreenState(windows.length > 0);
      },
      getContentWindow: function () {
        var ifr = this.getEl().getElementsByTagName('iframe')[0];
        return ifr ? ifr.contentWindow : null;
      }
    });
    handleWindowResize();

    var MessageBox = Window.extend({
      init: function (settings) {
        settings = {
          border: 1,
          padding: 20,
          layout: 'flex',
          pack: 'center',
          align: 'center',
          containerCls: 'panel',
          autoScroll: true,
          buttons: {
            type: 'button',
            text: 'Ok',
            action: 'ok'
          },
          items: {
            type: 'label',
            multiline: true,
            maxWidth: 500,
            maxHeight: 200
          }
        };
        this._super(settings);
      },
      Statics: {
        OK: 1,
        OK_CANCEL: 2,
        YES_NO: 3,
        YES_NO_CANCEL: 4,
        msgBox: function (settings) {
          var buttons;
          var callback = settings.callback || function () {
          };
          function createButton(text, status, primary) {
            return {
              type: 'button',
              text: text,
              subtype: primary ? 'primary' : '',
              onClick: function (e) {
                e.control.parents()[1].close();
                callback(status);
              }
            };
          }
          switch (settings.buttons) {
          case MessageBox.OK_CANCEL:
            buttons = [
              createButton('Ok', true, true),
              createButton('Cancel', false)
            ];
            break;
          case MessageBox.YES_NO:
          case MessageBox.YES_NO_CANCEL:
            buttons = [
              createButton('Yes', 1, true),
              createButton('No', 0)
            ];
            if (settings.buttons === MessageBox.YES_NO_CANCEL) {
              buttons.push(createButton('Cancel', -1));
            }
            break;
          default:
            buttons = [createButton('Ok', true, true)];
            break;
          }
          return new Window({
            padding: 20,
            x: settings.x,
            y: settings.y,
            minWidth: 300,
            minHeight: 100,
            layout: 'flex',
            pack: 'center',
            align: 'center',
            buttons: buttons,
            title: settings.title,
            role: 'alertdialog',
            items: {
              type: 'label',
              multiline: true,
              maxWidth: 500,
              maxHeight: 200,
              text: settings.text
            },
            onPostRender: function () {
              this.aria('describedby', this.items()[0]._id);
            },
            onClose: settings.onClose,
            onCancel: function () {
              callback(false);
            }
          }).renderTo(domGlobals.document.body).reflow();
        },
        alert: function (settings, callback) {
          if (typeof settings === 'string') {
            settings = { text: settings };
          }
          settings.callback = callback;
          return MessageBox.msgBox(settings);
        },
        confirm: function (settings, callback) {
          if (typeof settings === 'string') {
            settings = { text: settings };
          }
          settings.callback = callback;
          settings.buttons = MessageBox.OK_CANCEL;
          return MessageBox.msgBox(settings);
        }
      }
    });

    function WindowManagerImpl (editor) {
      var open = function (args, params, closeCallback) {
        var win;
        args.title = args.title || ' ';
        args.url = args.url || args.file;
        if (args.url) {
          args.width = parseInt(args.width || 320, 10);
          args.height = parseInt(args.height || 240, 10);
        }
        if (args.body) {
          args.items = {
            defaults: args.defaults,
            type: args.bodyType || 'form',
            items: args.body,
            data: args.data,
            callbacks: args.commands
          };
        }
        if (!args.url && !args.buttons) {
          args.buttons = [
            {
              text: 'Ok',
              subtype: 'primary',
              onclick: function () {
                win.find('form')[0].submit();
              }
            },
            {
              text: 'Cancel',
              onclick: function () {
                win.close();
              }
            }
          ];
        }
        win = new Window(args);
        win.on('close', function () {
          closeCallback(win);
        });
        if (args.data) {
          win.on('postRender', function () {
            this.find('*').each(function (ctrl) {
              var name = ctrl.name();
              if (name in args.data) {
                ctrl.value(args.data[name]);
              }
            });
          });
        }
        win.features = args || {};
        win.params = params || {};
        win = win.renderTo(domGlobals.document.body).reflow();
        return win;
      };
      var alert = function (message, choiceCallback, closeCallback) {
        var win;
        win = MessageBox.alert(message, function () {
          choiceCallback();
        });
        win.on('close', function () {
          closeCallback(win);
        });
        return win;
      };
      var confirm = function (message, choiceCallback, closeCallback) {
        var win;
        win = MessageBox.confirm(message, function (state) {
          choiceCallback(state);
        });
        win.on('close', function () {
          closeCallback(win);
        });
        return win;
      };
      var close = function (window) {
        window.close();
      };
      var getParams = function (window) {
        return window.params;
      };
      var setParams = function (window, params) {
        window.params = params;
      };
      return {
        open: open,
        alert: alert,
        confirm: confirm,
        close: close,
        getParams: getParams,
        setParams: setParams
      };
    }

    var get = function (editor) {
      var renderUI = function (args) {
        return Render.renderUI(editor, this, args);
      };
      var resizeTo = function (w, h) {
        return Resize.resizeTo(editor, w, h);
      };
      var resizeBy = function (dw, dh) {
        return Resize.resizeBy(editor, dw, dh);
      };
      var getNotificationManagerImpl = function () {
        return NotificationManagerImpl(editor);
      };
      var getWindowManagerImpl = function () {
        return WindowManagerImpl();
      };
      return {
        renderUI: renderUI,
        resizeTo: resizeTo,
        resizeBy: resizeBy,
        getNotificationManagerImpl: getNotificationManagerImpl,
        getWindowManagerImpl: getWindowManagerImpl
      };
    };
    var ThemeApi = { get: get };

    var Layout = global$a.extend({
      Defaults: {
        firstControlClass: 'first',
        lastControlClass: 'last'
      },
      init: function (settings) {
        this.settings = global$2.extend({}, this.Defaults, settings);
      },
      preRender: function (container) {
        container.bodyClasses.add(this.settings.containerClass);
      },
      applyClasses: function (items) {
        var self = this;
        var settings = self.settings;
        var firstClass, lastClass, firstItem, lastItem;
        firstClass = settings.firstControlClass;
        lastClass = settings.lastControlClass;
        items.each(function (item) {
          item.classes.remove(firstClass).remove(lastClass).add(settings.controlClass);
          if (item.visible()) {
            if (!firstItem) {
              firstItem = item;
            }
            lastItem = item;
          }
        });
        if (firstItem) {
          firstItem.classes.add(firstClass);
        }
        if (lastItem) {
          lastItem.classes.add(lastClass);
        }
      },
      renderHtml: function (container) {
        var self = this;
        var html = '';
        self.applyClasses(container.items());
        container.items().each(function (item) {
          html += item.renderHtml();
        });
        return html;
      },
      recalc: function () {
      },
      postRender: function () {
      },
      isNative: function () {
        return false;
      }
    });

    var AbsoluteLayout = Layout.extend({
      Defaults: {
        containerClass: 'abs-layout',
        controlClass: 'abs-layout-item'
      },
      recalc: function (container) {
        container.items().filter(':visible').each(function (ctrl) {
          var settings = ctrl.settings;
          ctrl.layoutRect({
            x: settings.x,
            y: settings.y,
            w: settings.w,
            h: settings.h
          });
          if (ctrl.recalc) {
            ctrl.recalc();
          }
        });
      },
      renderHtml: function (container) {
        return '<div id="' + container._id + '-absend" class="' + container.classPrefix + 'abs-end"></div>' + this._super(container);
      }
    });

    var Button = Widget.extend({
      Defaults: {
        classes: 'widget btn',
        role: 'button'
      },
      init: function (settings) {
        var self = this;
        var size;
        self._super(settings);
        settings = self.settings;
        size = self.settings.size;
        self.on('click mousedown', function (e) {
          e.preventDefault();
        });
        self.on('touchstart', function (e) {
          self.fire('click', e);
          e.preventDefault();
        });
        if (settings.subtype) {
          self.classes.add(settings.subtype);
        }
        if (size) {
          self.classes.add('btn-' + size);
        }
        if (settings.icon) {
          self.icon(settings.icon);
        }
      },
      icon: function (icon) {
        if (!arguments.length) {
          return this.state.get('icon');
        }
        this.state.set('icon', icon);
        return this;
      },
      repaint: function () {
        var btnElm = this.getEl().firstChild;
        var btnStyle;
        if (btnElm) {
          btnStyle = btnElm.style;
          btnStyle.width = btnStyle.height = '100%';
        }
        this._super();
      },
      renderHtml: function () {
        var self = this, id = self._id, prefix = self.classPrefix;
        var icon = self.state.get('icon'), image;
        var text = self.state.get('text');
        var textHtml = '';
        var ariaPressed;
        var settings = self.settings;
        image = settings.image;
        if (image) {
          icon = 'none';
          if (typeof image !== 'string') {
            image = domGlobals.window.getSelection ? image[0] : image[1];
          }
          image = ' style="background-image: url(\'' + image + '\')"';
        } else {
          image = '';
        }
        if (text) {
          self.classes.add('btn-has-text');
          textHtml = '<span class="' + prefix + 'txt">' + self.encode(text) + '</span>';
        }
        icon = icon ? prefix + 'ico ' + prefix + 'i-' + icon : '';
        ariaPressed = typeof settings.active === 'boolean' ? ' aria-pressed="' + settings.active + '"' : '';
        return '<div id="' + id + '" class="' + self.classes + '" tabindex="-1"' + ariaPressed + '>' + '<button id="' + id + '-button" role="presentation" type="button" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + '></i>' : '') + textHtml + '</button>' + '</div>';
      },
      bindStates: function () {
        var self = this, $ = self.$, textCls = self.classPrefix + 'txt';
        function setButtonText(text) {
          var $span = $('span.' + textCls, self.getEl());
          if (text) {
            if (!$span[0]) {
              $('button:first', self.getEl()).append('<span class="' + textCls + '"></span>');
              $span = $('span.' + textCls, self.getEl());
            }
            $span.html(self.encode(text));
          } else {
            $span.remove();
          }
          self.classes.toggle('btn-has-text', !!text);
        }
        self.state.on('change:text', function (e) {
          setButtonText(e.value);
        });
        self.state.on('change:icon', function (e) {
          var icon = e.value;
          var prefix = self.classPrefix;
          self.settings.icon = icon;
          icon = icon ? prefix + 'ico ' + prefix + 'i-' + self.settings.icon : '';
          var btnElm = self.getEl().firstChild;
          var iconElm = btnElm.getElementsByTagName('i')[0];
          if (icon) {
            if (!iconElm || iconElm !== btnElm.firstChild) {
              iconElm = domGlobals.document.createElement('i');
              btnElm.insertBefore(iconElm, btnElm.firstChild);
            }
            iconElm.className = icon;
          } else if (iconElm) {
            btnElm.removeChild(iconElm);
          }
          setButtonText(self.state.get('text'));
        });
        return self._super();
      }
    });

    var BrowseButton = Button.extend({
      init: function (settings) {
        var self = this;
        settings = global$2.extend({
          text: 'Browse...',
          multiple: false,
          accept: null
        }, settings);
        self._super(settings);
        self.classes.add('browsebutton');
        if (settings.multiple) {
          self.classes.add('multiple');
        }
      },
      postRender: function () {
        var self = this;
        var input = funcs.create('input', {
          type: 'file',
          id: self._id + '-browse',
          accept: self.settings.accept
        });
        self._super();
        global$9(input).on('change', function (e) {
          var files = e.target.files;
          self.value = function () {
            if (!files.length) {
              return null;
            } else if (self.settings.multiple) {
              return files;
            } else {
              return files[0];
            }
          };
          e.preventDefault();
          if (files.length) {
            self.fire('change', e);
          }
        });
        global$9(input).on('click', function (e) {
          e.stopPropagation();
        });
        global$9(self.getEl('button')).on('click touchstart', function (e) {
          e.stopPropagation();
          input.click();
          e.preventDefault();
        });
        self.getEl().appendChild(input);
      },
      remove: function () {
        global$9(this.getEl('button')).off();
        global$9(this.getEl('input')).off();
        this._super();
      }
    });

    var ButtonGroup = Container.extend({
      Defaults: {
        defaultType: 'button',
        role: 'group'
      },
      renderHtml: function () {
        var self = this, layout = self._layout;
        self.classes.add('btn-group');
        self.preRender();
        layout.preRender(self);
        return '<div id="' + self._id + '" class="' + self.classes + '">' + '<div id="' + self._id + '-body">' + (self.settings.html || '') + layout.renderHtml(self) + '</div>' + '</div>';
      }
    });

    var Checkbox = Widget.extend({
      Defaults: {
        classes: 'checkbox',
        role: 'checkbox',
        checked: false
      },
      init: function (settings) {
        var self = this;
        self._super(settings);
        self.on('click mousedown', function (e) {
          e.preventDefault();
        });
        self.on('click', function (e) {
          e.preventDefault();
          if (!self.disabled()) {
            self.checked(!self.checked());
          }
        });
        self.checked(self.settings.checked);
      },
      checked: function (state) {
        if (!arguments.length) {
          return this.state.get('checked');
        }
        this.state.set('checked', state);
        return this;
      },
      value: function (state) {
        if (!arguments.length) {
          return this.checked();
        }
        return this.checked(state);
      },
      renderHtml: function () {
        var self = this, id = self._id, prefix = self.classPrefix;
        return '<div id="' + id + '" class="' + self.classes + '" unselectable="on" aria-labelledby="' + id + '-al" tabindex="-1">' + '<i class="' + prefix + 'ico ' + prefix + 'i-checkbox"></i>' + '<span id="' + id + '-al" class="' + prefix + 'label">' + self.encode(self.state.get('text')) + '</span>' + '</div>';
      },
      bindStates: function () {
        var self = this;
        function checked(state) {
          self.classes.toggle('checked', state);
          self.aria('checked', state);
        }
        self.state.on('change:text', function (e) {
          self.getEl('al').firstChild.data = self.translate(e.value);
        });
        self.state.on('change:checked change:value', function (e) {
          self.fire('change');
          checked(e.value);
        });
        self.state.on('change:icon', function (e) {
          var icon = e.value;
          var prefix = self.classPrefix;
          if (typeof icon === 'undefined') {
            return self.settings.icon;
          }
          self.settings.icon = icon;
          icon = icon ? prefix + 'ico ' + prefix + 'i-' + self.settings.icon : '';
          var btnElm = self.getEl().firstChild;
          var iconElm = btnElm.getElementsByTagName('i')[0];
          if (icon) {
            if (!iconElm || iconElm !== btnElm.firstChild) {
              iconElm = domGlobals.document.createElement('i');
              btnElm.insertBefore(iconElm, btnElm.firstChild);
            }
            iconElm.className = icon;
          } else if (iconElm) {
            btnElm.removeChild(iconElm);
          }
        });
        if (self.state.get('checked')) {
          checked(true);
        }
        return self._super();
      }
    });

    var global$d = tinymce.util.Tools.resolve('tinymce.util.VK');

    var ComboBox = Widget.extend({
      init: function (settings) {
        var self = this;
        self._super(settings);
        settings = self.settings;
        self.classes.add('combobox');
        self.subinput = true;
        self.ariaTarget = 'inp';
        settings.menu = settings.menu || settings.values;
        if (settings.menu) {
          settings.icon = 'caret';
        }
        self.on('click', function (e) {
          var elm = e.target;
          var root = self.getEl();
          if (!global$9.contains(root, elm) && elm !== root) {
            return;
          }
          while (elm && elm !== root) {
            if (elm.id && elm.id.indexOf('-open') !== -1) {
              self.fire('action');
              if (settings.menu) {
                self.showMenu();
                if (e.aria) {
                  self.menu.items()[0].focus();
                }
              }
            }
            elm = elm.parentNode;
          }
        });
        self.on('keydown', function (e) {
          var rootControl;
          if (e.keyCode === 13 && e.target.nodeName === 'INPUT') {
            e.preventDefault();
            self.parents().reverse().each(function (ctrl) {
              if (ctrl.toJSON) {
                rootControl = ctrl;
                return false;
              }
            });
            self.fire('submit', { data: rootControl.toJSON() });
          }
        });
        self.on('keyup', function (e) {
          if (e.target.nodeName === 'INPUT') {
            var oldValue = self.state.get('value');
            var newValue = e.target.value;
            if (newValue !== oldValue) {
              self.state.set('value', newValue);
              self.fire('autocomplete', e);
            }
          }
        });
        self.on('mouseover', function (e) {
          var tooltip = self.tooltip().moveTo(-65535);
          if (self.statusLevel() && e.target.className.indexOf(self.classPrefix + 'status') !== -1) {
            var statusMessage = self.statusMessage() || 'Ok';
            var rel = tooltip.text(statusMessage).show().testMoveRel(e.target, [
              'bc-tc',
              'bc-tl',
              'bc-tr'
            ]);
            tooltip.classes.toggle('tooltip-n', rel === 'bc-tc');
            tooltip.classes.toggle('tooltip-nw', rel === 'bc-tl');
            tooltip.classes.toggle('tooltip-ne', rel === 'bc-tr');
            tooltip.moveRel(e.target, rel);
          }
        });
      },
      statusLevel: function (value) {
        if (arguments.length > 0) {
          this.state.set('statusLevel', value);
        }
        return this.state.get('statusLevel');
      },
      statusMessage: function (value) {
        if (arguments.length > 0) {
          this.state.set('statusMessage', value);
        }
        return this.state.get('statusMessage');
      },
      showMenu: function () {
        var self = this;
        var settings = self.settings;
        var menu;
        if (!self.menu) {
          menu = settings.menu || [];
          if (menu.length) {
            menu = {
              type: 'menu',
              items: menu
            };
          } else {
            menu.type = menu.type || 'menu';
          }
          self.menu = global$4.create(menu).parent(self).renderTo(self.getContainerElm());
          self.fire('createmenu');
          self.menu.reflow();
          self.menu.on('cancel', function (e) {
            if (e.control === self.menu) {
              self.focus();
            }
          });
          self.menu.on('show hide', function (e) {
            e.control.items().each(function (ctrl) {
              ctrl.active(ctrl.value() === self.value());
            });
          }).fire('show');
          self.menu.on('select', function (e) {
            self.value(e.control.value());
          });
          self.on('focusin', function (e) {
            if (e.target.tagName.toUpperCase() === 'INPUT') {
              self.menu.hide();
            }
          });
          self.aria('expanded', true);
        }
        self.menu.show();
        self.menu.layoutRect({ w: self.layoutRect().w });
        self.menu.moveRel(self.getEl(), self.isRtl() ? [
          'br-tr',
          'tr-br'
        ] : [
          'bl-tl',
          'tl-bl'
        ]);
      },
      focus: function () {
        this.getEl('inp').focus();
      },
      repaint: function () {
        var self = this, elm = self.getEl(), openElm = self.getEl('open'), rect = self.layoutRect();
        var width, lineHeight, innerPadding = 0;
        var inputElm = elm.firstChild;
        if (self.statusLevel() && self.statusLevel() !== 'none') {
          innerPadding = parseInt(funcs.getRuntimeStyle(inputElm, 'padding-right'), 10) - parseInt(funcs.getRuntimeStyle(inputElm, 'padding-left'), 10);
        }
        if (openElm) {
          width = rect.w - funcs.getSize(openElm).width - 10;
        } else {
          width = rect.w - 10;
        }
        var doc = domGlobals.document;
        if (doc.all && (!doc.documentMode || doc.documentMode <= 8)) {
          lineHeight = self.layoutRect().h - 2 + 'px';
        }
        global$9(inputElm).css({
          width: width - innerPadding,
          lineHeight: lineHeight
        });
        self._super();
        return self;
      },
      postRender: function () {
        var self = this;
        global$9(this.getEl('inp')).on('change', function (e) {
          self.state.set('value', e.target.value);
          self.fire('change', e);
        });
        return self._super();
      },
      renderHtml: function () {
        var self = this, id = self._id, settings = self.settings, prefix = self.classPrefix;
        var value = self.state.get('value') || '';
        var icon, text, openBtnHtml = '', extraAttrs = '', statusHtml = '';
        if ('spellcheck' in settings) {
          extraAttrs += ' spellcheck="' + settings.spellcheck + '"';
        }
        if (settings.maxLength) {
          extraAttrs += ' maxlength="' + settings.maxLength + '"';
        }
        if (settings.size) {
          extraAttrs += ' size="' + settings.size + '"';
        }
        if (settings.subtype) {
          extraAttrs += ' type="' + settings.subtype + '"';
        }
        statusHtml = '<i id="' + id + '-status" class="mce-status mce-ico" style="display: none"></i>';
        if (self.disabled()) {
          extraAttrs += ' disabled="disabled"';
        }
        icon = settings.icon;
        if (icon && icon !== 'caret') {
          icon = prefix + 'ico ' + prefix + 'i-' + settings.icon;
        }
        text = self.state.get('text');
        if (icon || text) {
          openBtnHtml = '<div id="' + id + '-open" class="' + prefix + 'btn ' + prefix + 'open" tabIndex="-1" role="button">' + '<button id="' + id + '-action" type="button" hidefocus="1" tabindex="-1">' + (icon !== 'caret' ? '<i class="' + icon + '"></i>' : '<i class="' + prefix + 'caret"></i>') + (text ? (icon ? ' ' : '') + text : '') + '</button>' + '</div>';
          self.classes.add('has-open');
        }
        return '<div id="' + id + '" class="' + self.classes + '">' + '<input id="' + id + '-inp" class="' + prefix + 'textbox" value="' + self.encode(value, false) + '" hidefocus="1"' + extraAttrs + ' placeholder="' + self.encode(settings.placeholder) + '" />' + statusHtml + openBtnHtml + '</div>';
      },
      value: function (value) {
        if (arguments.length) {
          this.state.set('value', value);
          return this;
        }
        if (this.state.get('rendered')) {
          this.state.set('value', this.getEl('inp').value);
        }
        return this.state.get('value');
      },
      showAutoComplete: function (items, term) {
        var self = this;
        if (items.length === 0) {
          self.hideMenu();
          return;
        }
        var insert = function (value, title) {
          return function () {
            self.fire('selectitem', {
              title: title,
              value: value
            });
          };
        };
        if (self.menu) {
          self.menu.items().remove();
        } else {
          self.menu = global$4.create({
            type: 'menu',
            classes: 'combobox-menu',
            layout: 'flow'
          }).parent(self).renderTo();
        }
        global$2.each(items, function (item) {
          self.menu.add({
            text: item.title,
            url: item.previewUrl,
            match: term,
            classes: 'menu-item-ellipsis',
            onclick: insert(item.value, item.title)
          });
        });
        self.menu.renderNew();
        self.hideMenu();
        self.menu.on('cancel', function (e) {
          if (e.control.parent() === self.menu) {
            e.stopPropagation();
            self.focus();
            self.hideMenu();
          }
        });
        self.menu.on('select', function () {
          self.focus();
        });
        var maxW = self.layoutRect().w;
        self.menu.layoutRect({
          w: maxW,
          minW: 0,
          maxW: maxW
        });
        self.menu.repaint();
        self.menu.reflow();
        self.menu.show();
        self.menu.moveRel(self.getEl(), self.isRtl() ? [
          'br-tr',
          'tr-br'
        ] : [
          'bl-tl',
          'tl-bl'
        ]);
      },
      hideMenu: function () {
        if (this.menu) {
          this.menu.hide();
        }
      },
      bindStates: function () {
        var self = this;
        self.state.on('change:value', function (e) {
          if (self.getEl('inp').value !== e.value) {
            self.getEl('inp').value = e.value;
          }
        });
        self.state.on('change:disabled', function (e) {
          self.getEl('inp').disabled = e.value;
        });
        self.state.on('change:statusLevel', function (e) {
          var statusIconElm = self.getEl('status');
          var prefix = self.classPrefix, value = e.value;
          funcs.css(statusIconElm, 'display', value === 'none' ? 'none' : '');
          funcs.toggleClass(statusIconElm, prefix + 'i-checkmark', value === 'ok');
          funcs.toggleClass(statusIconElm, prefix + 'i-warning', value === 'warn');
          funcs.toggleClass(statusIconElm, prefix + 'i-error', value === 'error');
          self.classes.toggle('has-status', value !== 'none');
          self.repaint();
        });
        funcs.on(self.getEl('status'), 'mouseleave', function () {
          self.tooltip().hide();
        });
        self.on('cancel', function (e) {
          if (self.menu && self.menu.visible()) {
            e.stopPropagation();
            self.hideMenu();
          }
        });
        var focusIdx = function (idx, menu) {
          if (menu && menu.items().length > 0) {
            menu.items().eq(idx)[0].focus();
          }
        };
        self.on('keydown', function (e) {
          var keyCode = e.keyCode;
          if (e.target.nodeName === 'INPUT') {
            if (keyCode === global$d.DOWN) {
              e.preventDefault();
              self.fire('autocomplete');
              focusIdx(0, self.menu);
            } else if (keyCode === global$d.UP) {
              e.preventDefault();
              focusIdx(-1, self.menu);
            }
          }
        });
        return self._super();
      },
      remove: function () {
        global$9(this.getEl('inp')).off();
        if (this.menu) {
          this.menu.remove();
        }
        this._super();
      }
    });

    var ColorBox = ComboBox.extend({
      init: function (settings) {
        var self = this;
        settings.spellcheck = false;
        if (settings.onaction) {
          settings.icon = 'none';
        }
        self._super(settings);
        self.classes.add('colorbox');
        self.on('change keyup postrender', function () {
          self.repaintColor(self.value());
        });
      },
      repaintColor: function (value) {
        var openElm = this.getEl('open');
        var elm = openElm ? openElm.getElementsByTagName('i')[0] : null;
        if (elm) {
          try {
            elm.style.background = value;
          } catch (ex) {
          }
        }
      },
      bindStates: function () {
        var self = this;
        self.state.on('change:value', function (e) {
          if (self.state.get('rendered')) {
            self.repaintColor(e.value);
          }
        });
        return self._super();
      }
    });

    var PanelButton = Button.extend({
      showPanel: function () {
        var self = this, settings = self.settings;
        self.classes.add('opened');
        if (!self.panel) {
          var panelSettings = settings.panel;
          if (panelSettings.type) {
            panelSettings = {
              layout: 'grid',
              items: panelSettings
            };
          }
          panelSettings.role = panelSettings.role || 'dialog';
          panelSettings.popover = true;
          panelSettings.autohide = true;
          panelSettings.ariaRoot = true;
          self.panel = new FloatPanel(panelSettings).on('hide', function () {
            self.classes.remove('opened');
          }).on('cancel', function (e) {
            e.stopPropagation();
            self.focus();
            self.hidePanel();
          }).parent(self).renderTo(self.getContainerElm());
          self.panel.fire('show');
          self.panel.reflow();
        } else {
          self.panel.show();
        }
        var rtlRels = [
          'bc-tc',
          'bc-tl',
          'bc-tr'
        ];
        var ltrRels = [
          'bc-tc',
          'bc-tr',
          'bc-tl',
          'tc-bc',
          'tc-br',
          'tc-bl'
        ];
        var rel = self.panel.testMoveRel(self.getEl(), settings.popoverAlign || (self.isRtl() ? rtlRels : ltrRels));
        self.panel.classes.toggle('start', rel.substr(-1) === 'l');
        self.panel.classes.toggle('end', rel.substr(-1) === 'r');
        var isTop = rel.substr(0, 1) === 't';
        self.panel.classes.toggle('bottom', !isTop);
        self.panel.classes.toggle('top', isTop);
        self.panel.moveRel(self.getEl(), rel);
      },
      hidePanel: function () {
        var self = this;
        if (self.panel) {
          self.panel.hide();
        }
      },
      postRender: function () {
        var self = this;
        self.aria('haspopup', true);
        self.on('click', function (e) {
          if (e.control === self) {
            if (self.panel && self.panel.visible()) {
              self.hidePanel();
            } else {
              self.showPanel();
              self.panel.focus(!!e.aria);
            }
          }
        });
        return self._super();
      },
      remove: function () {
        if (this.panel) {
          this.panel.remove();
          this.panel = null;
        }
        return this._super();
      }
    });

    var DOM$3 = global$3.DOM;
    var ColorButton = PanelButton.extend({
      init: function (settings) {
        this._super(settings);
        this.classes.add('splitbtn');
        this.classes.add('colorbutton');
      },
      color: function (color) {
        if (color) {
          this._color = color;
          this.getEl('preview').style.backgroundColor = color;
          return this;
        }
        return this._color;
      },
      resetColor: function () {
        this._color = null;
        this.getEl('preview').style.backgroundColor = null;
        return this;
      },
      renderHtml: function () {
        var self = this, id = self._id, prefix = self.classPrefix, text = self.state.get('text');
        var icon = self.settings.icon ? prefix + 'ico ' + prefix + 'i-' + self.settings.icon : '';
        var image = self.settings.image ? ' style="background-image: url(\'' + self.settings.image + '\')"' : '';
        var textHtml = '';
        if (text) {
          self.classes.add('btn-has-text');
          textHtml = '<span class="' + prefix + 'txt">' + self.encode(text) + '</span>';
        }
        return '<div id="' + id + '" class="' + self.classes + '" role="button" tabindex="-1" aria-haspopup="true">' + '<button role="presentation" hidefocus="1" type="button" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + '></i>' : '') + '<span id="' + id + '-preview" class="' + prefix + 'preview"></span>' + textHtml + '</button>' + '<button type="button" class="' + prefix + 'open" hidefocus="1" tabindex="-1">' + ' <i class="' + prefix + 'caret"></i>' + '</button>' + '</div>';
      },
      postRender: function () {
        var self = this, onClickHandler = self.settings.onclick;
        self.on('click', function (e) {
          if (e.aria && e.aria.key === 'down') {
            return;
          }
          if (e.control === self && !DOM$3.getParent(e.target, '.' + self.classPrefix + 'open')) {
            e.stopImmediatePropagation();
            onClickHandler.call(self, e);
          }
        });
        delete self.settings.onclick;
        return self._super();
      }
    });

    var global$e = tinymce.util.Tools.resolve('tinymce.util.Color');

    var ColorPicker = Widget.extend({
      Defaults: { classes: 'widget colorpicker' },
      init: function (settings) {
        this._super(settings);
      },
      postRender: function () {
        var self = this;
        var color = self.color();
        var hsv, hueRootElm, huePointElm, svRootElm, svPointElm;
        hueRootElm = self.getEl('h');
        huePointElm = self.getEl('hp');
        svRootElm = self.getEl('sv');
        svPointElm = self.getEl('svp');
        function getPos(elm, event) {
          var pos = funcs.getPos(elm);
          var x, y;
          x = event.pageX - pos.x;
          y = event.pageY - pos.y;
          x = Math.max(0, Math.min(x / elm.clientWidth, 1));
          y = Math.max(0, Math.min(y / elm.clientHeight, 1));
          return {
            x: x,
            y: y
          };
        }
        function updateColor(hsv, hueUpdate) {
          var hue = (360 - hsv.h) / 360;
          funcs.css(huePointElm, { top: hue * 100 + '%' });
          if (!hueUpdate) {
            funcs.css(svPointElm, {
              left: hsv.s + '%',
              top: 100 - hsv.v + '%'
            });
          }
          svRootElm.style.background = global$e({
            s: 100,
            v: 100,
            h: hsv.h
          }).toHex();
          self.color().parse({
            s: hsv.s,
            v: hsv.v,
            h: hsv.h
          });
        }
        function updateSaturationAndValue(e) {
          var pos;
          pos = getPos(svRootElm, e);
          hsv.s = pos.x * 100;
          hsv.v = (1 - pos.y) * 100;
          updateColor(hsv);
          self.fire('change');
        }
        function updateHue(e) {
          var pos;
          pos = getPos(hueRootElm, e);
          hsv = color.toHsv();
          hsv.h = (1 - pos.y) * 360;
          updateColor(hsv, true);
          self.fire('change');
        }
        self._repaint = function () {
          hsv = color.toHsv();
          updateColor(hsv);
        };
        self._super();
        self._svdraghelper = new DragHelper(self._id + '-sv', {
          start: updateSaturationAndValue,
          drag: updateSaturationAndValue
        });
        self._hdraghelper = new DragHelper(self._id + '-h', {
          start: updateHue,
          drag: updateHue
        });
        self._repaint();
      },
      rgb: function () {
        return this.color().toRgb();
      },
      value: function (value) {
        var self = this;
        if (arguments.length) {
          self.color().parse(value);
          if (self._rendered) {
            self._repaint();
          }
        } else {
          return self.color().toHex();
        }
      },
      color: function () {
        if (!this._color) {
          this._color = global$e();
        }
        return this._color;
      },
      renderHtml: function () {
        var self = this;
        var id = self._id;
        var prefix = self.classPrefix;
        var hueHtml;
        var stops = '#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000';
        function getOldIeFallbackHtml() {
          var i, l, html = '', gradientPrefix, stopsList;
          gradientPrefix = 'filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=';
          stopsList = stops.split(',');
          for (i = 0, l = stopsList.length - 1; i < l; i++) {
            html += '<div class="' + prefix + 'colorpicker-h-chunk" style="' + 'height:' + 100 / l + '%;' + gradientPrefix + stopsList[i] + ',endColorstr=' + stopsList[i + 1] + ');' + '-ms-' + gradientPrefix + stopsList[i] + ',endColorstr=' + stopsList[i + 1] + ')' + '"></div>';
          }
          return html;
        }
        var gradientCssText = 'background: -ms-linear-gradient(top,' + stops + ');' + 'background: linear-gradient(to bottom,' + stops + ');';
        hueHtml = '<div id="' + id + '-h" class="' + prefix + 'colorpicker-h" style="' + gradientCssText + '">' + getOldIeFallbackHtml() + '<div id="' + id + '-hp" class="' + prefix + 'colorpicker-h-marker"></div>' + '</div>';
        return '<div id="' + id + '" class="' + self.classes + '">' + '<div id="' + id + '-sv" class="' + prefix + 'colorpicker-sv">' + '<div class="' + prefix + 'colorpicker-overlay1">' + '<div class="' + prefix + 'colorpicker-overlay2">' + '<div id="' + id + '-svp" class="' + prefix + 'colorpicker-selector1">' + '<div class="' + prefix + 'colorpicker-selector2"></div>' + '</div>' + '</div>' + '</div>' + '</div>' + hueHtml + '</div>';
      }
    });

    var DropZone = Widget.extend({
      init: function (settings) {
        var self = this;
        settings = global$2.extend({
          height: 100,
          text: 'Drop an image here',
          multiple: false,
          accept: null
        }, settings);
        self._super(settings);
        self.classes.add('dropzone');
        if (settings.multiple) {
          self.classes.add('multiple');
        }
      },
      renderHtml: function () {
        var self = this;
        var attrs, elm;
        var cfg = self.settings;
        attrs = {
          id: self._id,
          hidefocus: '1'
        };
        elm = funcs.create('div', attrs, '<span>' + this.translate(cfg.text) + '</span>');
        if (cfg.height) {
          funcs.css(elm, 'height', cfg.height + 'px');
        }
        if (cfg.width) {
          funcs.css(elm, 'width', cfg.width + 'px');
        }
        elm.className = self.classes;
        return elm.outerHTML;
      },
      postRender: function () {
        var self = this;
        var toggleDragClass = function (e) {
          e.preventDefault();
          self.classes.toggle('dragenter');
          self.getEl().className = self.classes;
        };
        var filter = function (files) {
          var accept = self.settings.accept;
          if (typeof accept !== 'string') {
            return files;
          }
          var re = new RegExp('(' + accept.split(/\s*,\s*/).join('|') + ')$', 'i');
          return global$2.grep(files, function (file) {
            return re.test(file.name);
          });
        };
        self._super();
        self.$el.on('dragover', function (e) {
          e.preventDefault();
        });
        self.$el.on('dragenter', toggleDragClass);
        self.$el.on('dragleave', toggleDragClass);
        self.$el.on('drop', function (e) {
          e.preventDefault();
          if (self.state.get('disabled')) {
            return;
          }
          var files = filter(e.dataTransfer.files);
          self.value = function () {
            if (!files.length) {
              return null;
            } else if (self.settings.multiple) {
              return files;
            } else {
              return files[0];
            }
          };
          if (files.length) {
            self.fire('change', e);
          }
        });
      },
      remove: function () {
        this.$el.off();
        this._super();
      }
    });

    var Path = Widget.extend({
      init: function (settings) {
        var self = this;
        if (!settings.delimiter) {
          settings.delimiter = '\xBB';
        }
        self._super(settings);
        self.classes.add('path');
        self.canFocus = true;
        self.on('click', function (e) {
          var index;
          var target = e.target;
          if (index = target.getAttribute('data-index')) {
            self.fire('select', {
              value: self.row()[index],
              index: index
            });
          }
        });
        self.row(self.settings.row);
      },
      focus: function () {
        var self = this;
        self.getEl().firstChild.focus();
        return self;
      },
      row: function (row) {
        if (!arguments.length) {
          return this.state.get('row');
        }
        this.state.set('row', row);
        return this;
      },
      renderHtml: function () {
        var self = this;
        return '<div id="' + self._id + '" class="' + self.classes + '">' + self._getDataPathHtml(self.state.get('row')) + '</div>';
      },
      bindStates: function () {
        var self = this;
        self.state.on('change:row', function (e) {
          self.innerHtml(self._getDataPathHtml(e.value));
        });
        return self._super();
      },
      _getDataPathHtml: function (data) {
        var self = this;
        var parts = data || [];
        var i, l, html = '';
        var prefix = self.classPrefix;
        for (i = 0, l = parts.length; i < l; i++) {
          html += (i > 0 ? '<div class="' + prefix + 'divider" aria-hidden="true"> ' + self.settings.delimiter + ' </div>' : '') + '<div role="button" class="' + prefix + 'path-item' + (i === l - 1 ? ' ' + prefix + 'last' : '') + '" data-index="' + i + '" tabindex="-1" id="' + self._id + '-' + i + '" aria-level="' + (i + 1) + '">' + parts[i].name + '</div>';
        }
        if (!html) {
          html = '<div class="' + prefix + 'path-item">\xA0</div>';
        }
        return html;
      }
    });

    var ElementPath = Path.extend({
      postRender: function () {
        var self = this, editor = self.settings.editor;
        function isHidden(elm) {
          if (elm.nodeType === 1) {
            if (elm.nodeName === 'BR' || !!elm.getAttribute('data-mce-bogus')) {
              return true;
            }
            if (elm.getAttribute('data-mce-type') === 'bookmark') {
              return true;
            }
          }
          return false;
        }
        if (editor.settings.elementpath !== false) {
          self.on('select', function (e) {
            editor.focus();
            editor.selection.select(this.row()[e.index].element);
            editor.nodeChanged();
          });
          editor.on('nodeChange', function (e) {
            var outParents = [];
            var parents = e.parents;
            var i = parents.length;
            while (i--) {
              if (parents[i].nodeType === 1 && !isHidden(parents[i])) {
                var args = editor.fire('ResolveName', {
                  name: parents[i].nodeName.toLowerCase(),
                  target: parents[i]
                });
                if (!args.isDefaultPrevented()) {
                  outParents.push({
                    name: args.name,
                    element: parents[i]
                  });
                }
                if (args.isPropagationStopped()) {
                  break;
                }
              }
            }
            self.row(outParents);
          });
        }
        return self._super();
      }
    });

    var FormItem = Container.extend({
      Defaults: {
        layout: 'flex',
        align: 'center',
        defaults: { flex: 1 }
      },
      renderHtml: function () {
        var self = this, layout = self._layout, prefix = self.classPrefix;
        self.classes.add('formitem');
        layout.preRender(self);
        return '<div id="' + self._id + '" class="' + self.classes + '" hidefocus="1" tabindex="-1">' + (self.settings.title ? '<div id="' + self._id + '-title" class="' + prefix + 'title">' + self.settings.title + '</div>' : '') + '<div id="' + self._id + '-body" class="' + self.bodyClasses + '">' + (self.settings.html || '') + layout.renderHtml(self) + '</div>' + '</div>';
      }
    });

    var Form = Container.extend({
      Defaults: {
        containerCls: 'form',
        layout: 'flex',
        direction: 'column',
        align: 'stretch',
        flex: 1,
        padding: 15,
        labelGap: 30,
        spacing: 10,
        callbacks: {
          submit: function () {
            this.submit();
          }
        }
      },
      preRender: function () {
        var self = this, items = self.items();
        if (!self.settings.formItemDefaults) {
          self.settings.formItemDefaults = {
            layout: 'flex',
            autoResize: 'overflow',
            defaults: { flex: 1 }
          };
        }
        items.each(function (ctrl) {
          var formItem;
          var label = ctrl.settings.label;
          if (label) {
            formItem = new FormItem(global$2.extend({
              items: {
                type: 'label',
                id: ctrl._id + '-l',
                text: label,
                flex: 0,
                forId: ctrl._id,
                disabled: ctrl.disabled()
              }
            }, self.settings.formItemDefaults));
            formItem.type = 'formitem';
            ctrl.aria('labelledby', ctrl._id + '-l');
            if (typeof ctrl.settings.flex === 'undefined') {
              ctrl.settings.flex = 1;
            }
            self.replace(ctrl, formItem);
            formItem.add(ctrl);
          }
        });
      },
      submit: function () {
        return this.fire('submit', { data: this.toJSON() });
      },
      postRender: function () {
        var self = this;
        self._super();
        self.fromJSON(self.settings.data);
      },
      bindStates: function () {
        var self = this;
        self._super();
        function recalcLabels() {
          var maxLabelWidth = 0;
          var labels = [];
          var i, labelGap, items;
          if (self.settings.labelGapCalc === false) {
            return;
          }
          if (self.settings.labelGapCalc === 'children') {
            items = self.find('formitem');
          } else {
            items = self.items();
          }
          items.filter('formitem').each(function (item) {
            var labelCtrl = item.items()[0], labelWidth = labelCtrl.getEl().clientWidth;
            maxLabelWidth = labelWidth > maxLabelWidth ? labelWidth : maxLabelWidth;
            labels.push(labelCtrl);
          });
          labelGap = self.settings.labelGap || 0;
          i = labels.length;
          while (i--) {
            labels[i].settings.minWidth = maxLabelWidth + labelGap;
          }
        }
        self.on('show', recalcLabels);
        recalcLabels();
      }
    });

    var FieldSet = Form.extend({
      Defaults: {
        containerCls: 'fieldset',
        layout: 'flex',
        direction: 'column',
        align: 'stretch',
        flex: 1,
        padding: '25 15 5 15',
        labelGap: 30,
        spacing: 10,
        border: 1
      },
      renderHtml: function () {
        var self = this, layout = self._layout, prefix = self.classPrefix;
        self.preRender();
        layout.preRender(self);
        return '<fieldset id="' + self._id + '" class="' + self.classes + '" hidefocus="1" tabindex="-1">' + (self.settings.title ? '<legend id="' + self._id + '-title" class="' + prefix + 'fieldset-title">' + self.settings.title + '</legend>' : '') + '<div id="' + self._id + '-body" class="' + self.bodyClasses + '">' + (self.settings.html || '') + layout.renderHtml(self) + '</div>' + '</fieldset>';
      }
    });

    var unique$1 = 0;
    var generate = function (prefix) {
      var date = new Date();
      var time = date.getTime();
      var random = Math.floor(Math.random() * 1000000000);
      unique$1++;
      return prefix + '_' + random + unique$1 + String(time);
    };

    var fromHtml = function (html, scope) {
      var doc = scope || domGlobals.document;
      var div = doc.createElement('div');
      div.innerHTML = html;
      if (!div.hasChildNodes() || div.childNodes.length > 1) {
        domGlobals.console.error('HTML does not have a single root node', html);
        throw new Error('HTML must have a single root node');
      }
      return fromDom(div.childNodes[0]);
    };
    var fromTag = function (tag, scope) {
      var doc = scope || domGlobals.document;
      var node = doc.createElement(tag);
      return fromDom(node);
    };
    var fromText = function (text, scope) {
      var doc = scope || domGlobals.document;
      var node = doc.createTextNode(text);
      return fromDom(node);
    };
    var fromDom = function (node) {
      if (node === null || node === undefined) {
        throw new Error('Node cannot be null or undefined');
      }
      return { dom: constant(node) };
    };
    var fromPoint = function (docElm, x, y) {
      var doc = docElm.dom();
      return Option.from(doc.elementFromPoint(x, y)).map(fromDom);
    };
    var Element = {
      fromHtml: fromHtml,
      fromTag: fromTag,
      fromText: fromText,
      fromDom: fromDom,
      fromPoint: fromPoint
    };

    var cached = function (f) {
      var called = false;
      var r;
      return function () {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
          args[_i] = arguments[_i];
        }
        if (!called) {
          called = true;
          r = f.apply(null, args);
        }
        return r;
      };
    };

    var ATTRIBUTE = domGlobals.Node.ATTRIBUTE_NODE;
    var CDATA_SECTION = domGlobals.Node.CDATA_SECTION_NODE;
    var COMMENT = domGlobals.Node.COMMENT_NODE;
    var DOCUMENT = domGlobals.Node.DOCUMENT_NODE;
    var DOCUMENT_TYPE = domGlobals.Node.DOCUMENT_TYPE_NODE;
    var DOCUMENT_FRAGMENT = domGlobals.Node.DOCUMENT_FRAGMENT_NODE;
    var ELEMENT = domGlobals.Node.ELEMENT_NODE;
    var TEXT = domGlobals.Node.TEXT_NODE;
    var PROCESSING_INSTRUCTION = domGlobals.Node.PROCESSING_INSTRUCTION_NODE;
    var ENTITY_REFERENCE = domGlobals.Node.ENTITY_REFERENCE_NODE;
    var ENTITY = domGlobals.Node.ENTITY_NODE;
    var NOTATION = domGlobals.Node.NOTATION_NODE;

    var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();

    var path = function (parts, scope) {
      var o = scope !== undefined && scope !== null ? scope : Global;
      for (var i = 0; i < parts.length && o !== undefined && o !== null; ++i) {
        o = o[parts[i]];
      }
      return o;
    };
    var resolve = function (p, scope) {
      var parts = p.split('.');
      return path(parts, scope);
    };

    var unsafe = function (name, scope) {
      return resolve(name, scope);
    };
    var getOrDie = function (name, scope) {
      var actual = unsafe(name, scope);
      if (actual === undefined || actual === null) {
        throw new Error(name + ' not available on this browser');
      }
      return actual;
    };
    var Global$1 = { getOrDie: getOrDie };

    var Immutable = function () {
      var fields = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        fields[_i] = arguments[_i];
      }
      return function () {
        var values = [];
        for (var _i = 0; _i < arguments.length; _i++) {
          values[_i] = arguments[_i];
        }
        if (fields.length !== values.length) {
          throw new Error('Wrong number of arguments to struct. Expected "[' + fields.length + ']", got ' + values.length + ' arguments');
        }
        var struct = {};
        each(fields, function (name, i) {
          struct[name] = constant(values[i]);
        });
        return struct;
      };
    };

    var node = function () {
      var f = Global$1.getOrDie('Node');
      return f;
    };
    var compareDocumentPosition = function (a, b, match) {
      return (a.compareDocumentPosition(b) & match) !== 0;
    };
    var documentPositionPreceding = function (a, b) {
      return compareDocumentPosition(a, b, node().DOCUMENT_POSITION_PRECEDING);
    };
    var documentPositionContainedBy = function (a, b) {
      return compareDocumentPosition(a, b, node().DOCUMENT_POSITION_CONTAINED_BY);
    };
    var Node = {
      documentPositionPreceding: documentPositionPreceding,
      documentPositionContainedBy: documentPositionContainedBy
    };

    var firstMatch = function (regexes, s) {
      for (var i = 0; i < regexes.length; i++) {
        var x = regexes[i];
        if (x.test(s)) {
          return x;
        }
      }
      return undefined;
    };
    var find$1 = function (regexes, agent) {
      var r = firstMatch(regexes, agent);
      if (!r) {
        return {
          major: 0,
          minor: 0
        };
      }
      var group = function (i) {
        return Number(agent.replace(r, '$' + i));
      };
      return nu(group(1), group(2));
    };
    var detect = function (versionRegexes, agent) {
      var cleanedAgent = String(agent).toLowerCase();
      if (versionRegexes.length === 0) {
        return unknown();
      }
      return find$1(versionRegexes, cleanedAgent);
    };
    var unknown = function () {
      return nu(0, 0);
    };
    var nu = function (major, minor) {
      return {
        major: major,
        minor: minor
      };
    };
    var Version = {
      nu: nu,
      detect: detect,
      unknown: unknown
    };

    var edge = 'Edge';
    var chrome = 'Chrome';
    var ie = 'IE';
    var opera = 'Opera';
    var firefox = 'Firefox';
    var safari = 'Safari';
    var isBrowser = function (name, current) {
      return function () {
        return current === name;
      };
    };
    var unknown$1 = function () {
      return nu$1({
        current: undefined,
        version: Version.unknown()
      });
    };
    var nu$1 = function (info) {
      var current = info.current;
      var version = info.version;
      return {
        current: current,
        version: version,
        isEdge: isBrowser(edge, current),
        isChrome: isBrowser(chrome, current),
        isIE: isBrowser(ie, current),
        isOpera: isBrowser(opera, current),
        isFirefox: isBrowser(firefox, current),
        isSafari: isBrowser(safari, current)
      };
    };
    var Browser = {
      unknown: unknown$1,
      nu: nu$1,
      edge: constant(edge),
      chrome: constant(chrome),
      ie: constant(ie),
      opera: constant(opera),
      firefox: constant(firefox),
      safari: constant(safari)
    };

    var windows$1 = 'Windows';
    var ios = 'iOS';
    var android = 'Android';
    var linux = 'Linux';
    var osx = 'OSX';
    var solaris = 'Solaris';
    var freebsd = 'FreeBSD';
    var isOS = function (name, current) {
      return function () {
        return current === name;
      };
    };
    var unknown$2 = function () {
      return nu$2({
        current: undefined,
        version: Version.unknown()
      });
    };
    var nu$2 = function (info) {
      var current = info.current;
      var version = info.version;
      return {
        current: current,
        version: version,
        isWindows: isOS(windows$1, current),
        isiOS: isOS(ios, current),
        isAndroid: isOS(android, current),
        isOSX: isOS(osx, current),
        isLinux: isOS(linux, current),
        isSolaris: isOS(solaris, current),
        isFreeBSD: isOS(freebsd, current)
      };
    };
    var OperatingSystem = {
      unknown: unknown$2,
      nu: nu$2,
      windows: constant(windows$1),
      ios: constant(ios),
      android: constant(android),
      linux: constant(linux),
      osx: constant(osx),
      solaris: constant(solaris),
      freebsd: constant(freebsd)
    };

    var DeviceType = function (os, browser, userAgent) {
      var isiPad = os.isiOS() && /ipad/i.test(userAgent) === true;
      var isiPhone = os.isiOS() && !isiPad;
      var isAndroid3 = os.isAndroid() && os.version.major === 3;
      var isAndroid4 = os.isAndroid() && os.version.major === 4;
      var isTablet = isiPad || isAndroid3 || isAndroid4 && /mobile/i.test(userAgent) === true;
      var isTouch = os.isiOS() || os.isAndroid();
      var isPhone = isTouch && !isTablet;
      var iOSwebview = browser.isSafari() && os.isiOS() && /safari/i.test(userAgent) === false;
      return {
        isiPad: constant(isiPad),
        isiPhone: constant(isiPhone),
        isTablet: constant(isTablet),
        isPhone: constant(isPhone),
        isTouch: constant(isTouch),
        isAndroid: os.isAndroid,
        isiOS: os.isiOS,
        isWebView: constant(iOSwebview)
      };
    };

    var detect$1 = function (candidates, userAgent) {
      var agent = String(userAgent).toLowerCase();
      return find(candidates, function (candidate) {
        return candidate.search(agent);
      });
    };
    var detectBrowser = function (browsers, userAgent) {
      return detect$1(browsers, userAgent).map(function (browser) {
        var version = Version.detect(browser.versionRegexes, userAgent);
        return {
          current: browser.name,
          version: version
        };
      });
    };
    var detectOs = function (oses, userAgent) {
      return detect$1(oses, userAgent).map(function (os) {
        var version = Version.detect(os.versionRegexes, userAgent);
        return {
          current: os.name,
          version: version
        };
      });
    };
    var UaString = {
      detectBrowser: detectBrowser,
      detectOs: detectOs
    };

    var contains = function (str, substr) {
      return str.indexOf(substr) !== -1;
    };

    var normalVersionRegex = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/;
    var checkContains = function (target) {
      return function (uastring) {
        return contains(uastring, target);
      };
    };
    var browsers = [
      {
        name: 'Edge',
        versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],
        search: function (uastring) {
          return contains(uastring, 'edge/') && contains(uastring, 'chrome') && contains(uastring, 'safari') && contains(uastring, 'applewebkit');
        }
      },
      {
        name: 'Chrome',
        versionRegexes: [
          /.*?chrome\/([0-9]+)\.([0-9]+).*/,
          normalVersionRegex
        ],
        search: function (uastring) {
          return contains(uastring, 'chrome') && !contains(uastring, 'chromeframe');
        }
      },
      {
        name: 'IE',
        versionRegexes: [
          /.*?msie\ ?([0-9]+)\.([0-9]+).*/,
          /.*?rv:([0-9]+)\.([0-9]+).*/
        ],
        search: function (uastring) {
          return contains(uastring, 'msie') || contains(uastring, 'trident');
        }
      },
      {
        name: 'Opera',
        versionRegexes: [
          normalVersionRegex,
          /.*?opera\/([0-9]+)\.([0-9]+).*/
        ],
        search: checkContains('opera')
      },
      {
        name: 'Firefox',
        versionRegexes: [/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],
        search: checkContains('firefox')
      },
      {
        name: 'Safari',
        versionRegexes: [
          normalVersionRegex,
          /.*?cpu os ([0-9]+)_([0-9]+).*/
        ],
        search: function (uastring) {
          return (contains(uastring, 'safari') || contains(uastring, 'mobile/')) && contains(uastring, 'applewebkit');
        }
      }
    ];
    var oses = [
      {
        name: 'Windows',
        search: checkContains('win'),
        versionRegexes: [/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]
      },
      {
        name: 'iOS',
        search: function (uastring) {
          return contains(uastring, 'iphone') || contains(uastring, 'ipad');
        },
        versionRegexes: [
          /.*?version\/\ ?([0-9]+)\.([0-9]+).*/,
          /.*cpu os ([0-9]+)_([0-9]+).*/,
          /.*cpu iphone os ([0-9]+)_([0-9]+).*/
        ]
      },
      {
        name: 'Android',
        search: checkContains('android'),
        versionRegexes: [/.*?android\ ?([0-9]+)\.([0-9]+).*/]
      },
      {
        name: 'OSX',
        search: checkContains('os x'),
        versionRegexes: [/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]
      },
      {
        name: 'Linux',
        search: checkContains('linux'),
        versionRegexes: []
      },
      {
        name: 'Solaris',
        search: checkContains('sunos'),
        versionRegexes: []
      },
      {
        name: 'FreeBSD',
        search: checkContains('freebsd'),
        versionRegexes: []
      }
    ];
    var PlatformInfo = {
      browsers: constant(browsers),
      oses: constant(oses)
    };

    var detect$2 = function (userAgent) {
      var browsers = PlatformInfo.browsers();
      var oses = PlatformInfo.oses();
      var browser = UaString.detectBrowser(browsers, userAgent).fold(Browser.unknown, Browser.nu);
      var os = UaString.detectOs(oses, userAgent).fold(OperatingSystem.unknown, OperatingSystem.nu);
      var deviceType = DeviceType(os, browser, userAgent);
      return {
        browser: browser,
        os: os,
        deviceType: deviceType
      };
    };
    var PlatformDetection = { detect: detect$2 };

    var detect$3 = cached(function () {
      var userAgent = domGlobals.navigator.userAgent;
      return PlatformDetection.detect(userAgent);
    });
    var PlatformDetection$1 = { detect: detect$3 };

    var ELEMENT$1 = ELEMENT;
    var DOCUMENT$1 = DOCUMENT;
    var bypassSelector = function (dom) {
      return dom.nodeType !== ELEMENT$1 && dom.nodeType !== DOCUMENT$1 || dom.childElementCount === 0;
    };
    var all = function (selector, scope) {
      var base = scope === undefined ? domGlobals.document : scope.dom();
      return bypassSelector(base) ? [] : map(base.querySelectorAll(selector), Element.fromDom);
    };
    var one = function (selector, scope) {
      var base = scope === undefined ? domGlobals.document : scope.dom();
      return bypassSelector(base) ? Option.none() : Option.from(base.querySelector(selector)).map(Element.fromDom);
    };

    var regularContains = function (e1, e2) {
      var d1 = e1.dom();
      var d2 = e2.dom();
      return d1 === d2 ? false : d1.contains(d2);
    };
    var ieContains = function (e1, e2) {
      return Node.documentPositionContainedBy(e1.dom(), e2.dom());
    };
    var browser = PlatformDetection$1.detect().browser;
    var contains$1 = browser.isIE() ? ieContains : regularContains;

    var spot = Immutable('element', 'offset');

    var descendants = function (scope, selector) {
      return all(selector, scope);
    };

    var trim = global$2.trim;
    var hasContentEditableState = function (value) {
      return function (node) {
        if (node && node.nodeType === 1) {
          if (node.contentEditable === value) {
            return true;
          }
          if (node.getAttribute('data-mce-contenteditable') === value) {
            return true;
          }
        }
        return false;
      };
    };
    var isContentEditableTrue = hasContentEditableState('true');
    var isContentEditableFalse = hasContentEditableState('false');
    var create = function (type, title, url, level, attach) {
      return {
        type: type,
        title: title,
        url: url,
        level: level,
        attach: attach
      };
    };
    var isChildOfContentEditableTrue = function (node) {
      while (node = node.parentNode) {
        var value = node.contentEditable;
        if (value && value !== 'inherit') {
          return isContentEditableTrue(node);
        }
      }
      return false;
    };
    var select = function (selector, root) {
      return map(descendants(Element.fromDom(root), selector), function (element) {
        return element.dom();
      });
    };
    var getElementText = function (elm) {
      return elm.innerText || elm.textContent;
    };
    var getOrGenerateId = function (elm) {
      return elm.id ? elm.id : generate('h');
    };
    var isAnchor = function (elm) {
      return elm && elm.nodeName === 'A' && (elm.id || elm.name);
    };
    var isValidAnchor = function (elm) {
      return isAnchor(elm) && isEditable(elm);
    };
    var isHeader = function (elm) {
      return elm && /^(H[1-6])$/.test(elm.nodeName);
    };
    var isEditable = function (elm) {
      return isChildOfContentEditableTrue(elm) && !isContentEditableFalse(elm);
    };
    var isValidHeader = function (elm) {
      return isHeader(elm) && isEditable(elm);
    };
    var getLevel = function (elm) {
      return isHeader(elm) ? parseInt(elm.nodeName.substr(1), 10) : 0;
    };
    var headerTarget = function (elm) {
      var headerId = getOrGenerateId(elm);
      var attach = function () {
        elm.id = headerId;
      };
      return create('header', getElementText(elm), '#' + headerId, getLevel(elm), attach);
    };
    var anchorTarget = function (elm) {
      var anchorId = elm.id || elm.name;
      var anchorText = getElementText(elm);
      return create('anchor', anchorText ? anchorText : '#' + anchorId, '#' + anchorId, 0, noop);
    };
    var getHeaderTargets = function (elms) {
      return map(filter(elms, isValidHeader), headerTarget);
    };
    var getAnchorTargets = function (elms) {
      return map(filter(elms, isValidAnchor), anchorTarget);
    };
    var getTargetElements = function (elm) {
      var elms = select('h1,h2,h3,h4,h5,h6,a:not([href])', elm);
      return elms;
    };
    var hasTitle = function (target) {
      return trim(target.title).length > 0;
    };
    var find$2 = function (elm) {
      var elms = getTargetElements(elm);
      return filter(getHeaderTargets(elms).concat(getAnchorTargets(elms)), hasTitle);
    };
    var LinkTargets = { find: find$2 };

    var getActiveEditor = function () {
      return window.tinymce ? window.tinymce.activeEditor : global$1.activeEditor;
    };
    var history = {};
    var HISTORY_LENGTH = 5;
    var clearHistory = function () {
      history = {};
    };
    var toMenuItem = function (target) {
      return {
        title: target.title,
        value: {
          title: { raw: target.title },
          url: target.url,
          attach: target.attach
        }
      };
    };
    var toMenuItems = function (targets) {
      return global$2.map(targets, toMenuItem);
    };
    var staticMenuItem = function (title, url) {
      return {
        title: title,
        value: {
          title: title,
          url: url,
          attach: noop
        }
      };
    };
    var isUniqueUrl = function (url, targets) {
      var foundTarget = exists(targets, function (target) {
        return target.url === url;
      });
      return !foundTarget;
    };
    var getSetting = function (editorSettings, name, defaultValue) {
      var value = name in editorSettings ? editorSettings[name] : defaultValue;
      return value === false ? null : value;
    };
    var createMenuItems = function (term, targets, fileType, editorSettings) {
      var separator = { title: '-' };
      var fromHistoryMenuItems = function (history) {
        var historyItems = history.hasOwnProperty(fileType) ? history[fileType] : [];
        var uniqueHistory = filter(historyItems, function (url) {
          return isUniqueUrl(url, targets);
        });
        return global$2.map(uniqueHistory, function (url) {
          return {
            title: url,
            value: {
              title: url,
              url: url,
              attach: noop
            }
          };
        });
      };
      var fromMenuItems = function (type) {
        var filteredTargets = filter(targets, function (target) {
          return target.type === type;
        });
        return toMenuItems(filteredTargets);
      };
      var anchorMenuItems = function () {
        var anchorMenuItems = fromMenuItems('anchor');
        var topAnchor = getSetting(editorSettings, 'anchor_top', '#top');
        var bottomAchor = getSetting(editorSettings, 'anchor_bottom', '#bottom');
        if (topAnchor !== null) {
          anchorMenuItems.unshift(staticMenuItem('<top>', topAnchor));
        }
        if (bottomAchor !== null) {
          anchorMenuItems.push(staticMenuItem('<bottom>', bottomAchor));
        }
        return anchorMenuItems;
      };
      var join = function (items) {
        return foldl(items, function (a, b) {
          var bothEmpty = a.length === 0 || b.length === 0;
          return bothEmpty ? a.concat(b) : a.concat(separator, b);
        }, []);
      };
      if (editorSettings.typeahead_urls === false) {
        return [];
      }
      return fileType === 'file' ? join([
        filterByQuery(term, fromHistoryMenuItems(history)),
        filterByQuery(term, fromMenuItems('header')),
        filterByQuery(term, anchorMenuItems())
      ]) : filterByQuery(term, fromHistoryMenuItems(history));
    };
    var addToHistory = function (url, fileType) {
      var items = history[fileType];
      if (!/^https?/.test(url)) {
        return;
      }
      if (items) {
        if (indexOf(items, url).isNone()) {
          history[fileType] = items.slice(0, HISTORY_LENGTH).concat(url);
        }
      } else {
        history[fileType] = [url];
      }
    };
    var filterByQuery = function (term, menuItems) {
      var lowerCaseTerm = term.toLowerCase();
      var result = global$2.grep(menuItems, function (item) {
        return item.title.toLowerCase().indexOf(lowerCaseTerm) !== -1;
      });
      return result.length === 1 && result[0].title === term ? [] : result;
    };
    var getTitle = function (linkDetails) {
      var title = linkDetails.title;
      return title.raw ? title.raw : title;
    };
    var setupAutoCompleteHandler = function (ctrl, editorSettings, bodyElm, fileType) {
      var autocomplete = function (term) {
        var linkTargets = LinkTargets.find(bodyElm);
        var menuItems = createMenuItems(term, linkTargets, fileType, editorSettings);
        ctrl.showAutoComplete(menuItems, term);
      };
      ctrl.on('autocomplete', function () {
        autocomplete(ctrl.value());
      });
      ctrl.on('selectitem', function (e) {
        var linkDetails = e.value;
        ctrl.value(linkDetails.url);
        var title = getTitle(linkDetails);
        if (fileType === 'image') {
          ctrl.fire('change', {
            meta: {
              alt: title,
              attach: linkDetails.attach
            }
          });
        } else {
          ctrl.fire('change', {
            meta: {
              text: title,
              attach: linkDetails.attach
            }
          });
        }
        ctrl.focus();
      });
      ctrl.on('click', function (e) {
        if (ctrl.value().length === 0 && e.target.nodeName === 'INPUT') {
          autocomplete('');
        }
      });
      ctrl.on('PostRender', function () {
        ctrl.getRoot().on('submit', function (e) {
          if (!e.isDefaultPrevented()) {
            addToHistory(ctrl.value(), fileType);
          }
        });
      });
    };
    var statusToUiState = function (result) {
      var status = result.status, message = result.message;
      if (status === 'valid') {
        return {
          status: 'ok',
          message: message
        };
      } else if (status === 'unknown') {
        return {
          status: 'warn',
          message: message
        };
      } else if (status === 'invalid') {
        return {
          status: 'warn',
          message: message
        };
      } else {
        return {
          status: 'none',
          message: ''
        };
      }
    };
    var setupLinkValidatorHandler = function (ctrl, editorSettings, fileType) {
      var validatorHandler = editorSettings.filepicker_validator_handler;
      if (validatorHandler) {
        var validateUrl_1 = function (url) {
          if (url.length === 0) {
            ctrl.statusLevel('none');
            return;
          }
          validatorHandler({
            url: url,
            type: fileType
          }, function (result) {
            var uiState = statusToUiState(result);
            ctrl.statusMessage(uiState.message);
            ctrl.statusLevel(uiState.status);
          });
        };
        ctrl.state.on('change:value', function (e) {
          validateUrl_1(e.value);
        });
      }
    };
    var FilePicker = ComboBox.extend({
      Statics: { clearHistory: clearHistory },
      init: function (settings) {
        var self = this, editor = getActiveEditor(), editorSettings = editor.settings;
        var actionCallback, fileBrowserCallback, fileBrowserCallbackTypes;
        var fileType = settings.filetype;
        settings.spellcheck = false;
        fileBrowserCallbackTypes = editorSettings.file_picker_types || editorSettings.file_browser_callback_types;
        if (fileBrowserCallbackTypes) {
          fileBrowserCallbackTypes = global$2.makeMap(fileBrowserCallbackTypes, /[, ]/);
        }
        if (!fileBrowserCallbackTypes || fileBrowserCallbackTypes[fileType]) {
          fileBrowserCallback = editorSettings.file_picker_callback;
          if (fileBrowserCallback && (!fileBrowserCallbackTypes || fileBrowserCallbackTypes[fileType])) {
            actionCallback = function () {
              var meta = self.fire('beforecall').meta;
              meta = global$2.extend({ filetype: fileType }, meta);
              fileBrowserCallback.call(editor, function (value, meta) {
                self.value(value).fire('change', { meta: meta });
              }, self.value(), meta);
            };
          } else {
            fileBrowserCallback = editorSettings.file_browser_callback;
            if (fileBrowserCallback && (!fileBrowserCallbackTypes || fileBrowserCallbackTypes[fileType])) {
              actionCallback = function () {
                fileBrowserCallback(self.getEl('inp').id, self.value(), fileType, window);
              };
            }
          }
        }
        if (actionCallback) {
          settings.icon = 'browse';
          settings.onaction = actionCallback;
        }
        self._super(settings);
        self.classes.add('filepicker');
        setupAutoCompleteHandler(self, editorSettings, editor.getBody(), fileType);
        setupLinkValidatorHandler(self, editorSettings, fileType);
      }
    });

    var FitLayout = AbsoluteLayout.extend({
      recalc: function (container) {
        var contLayoutRect = container.layoutRect(), paddingBox = container.paddingBox;
        container.items().filter(':visible').each(function (ctrl) {
          ctrl.layoutRect({
            x: paddingBox.left,
            y: paddingBox.top,
            w: contLayoutRect.innerW - paddingBox.right - paddingBox.left,
            h: contLayoutRect.innerH - paddingBox.top - paddingBox.bottom
          });
          if (ctrl.recalc) {
            ctrl.recalc();
          }
        });
      }
    });

    var FlexLayout = AbsoluteLayout.extend({
      recalc: function (container) {
        var i, l, items, contLayoutRect, contPaddingBox, contSettings, align, pack, spacing, totalFlex, availableSpace, direction;
        var ctrl, ctrlLayoutRect, ctrlSettings, flex;
        var maxSizeItems = [];
        var size, maxSize, ratio, rect, pos, maxAlignEndPos;
        var sizeName, minSizeName, posName, maxSizeName, beforeName, innerSizeName, deltaSizeName, contentSizeName;
        var alignAxisName, alignInnerSizeName, alignSizeName, alignMinSizeName, alignBeforeName, alignAfterName;
        var alignDeltaSizeName, alignContentSizeName;
        var max = Math.max, min = Math.min;
        items = container.items().filter(':visible');
        contLayoutRect = container.layoutRect();
        contPaddingBox = container.paddingBox;
        contSettings = container.settings;
        direction = container.isRtl() ? contSettings.direction || 'row-reversed' : contSettings.direction;
        align = contSettings.align;
        pack = container.isRtl() ? contSettings.pack || 'end' : contSettings.pack;
        spacing = contSettings.spacing || 0;
        if (direction === 'row-reversed' || direction === 'column-reverse') {
          items = items.set(items.toArray().reverse());
          direction = direction.split('-')[0];
        }
        if (direction === 'column') {
          posName = 'y';
          sizeName = 'h';
          minSizeName = 'minH';
          maxSizeName = 'maxH';
          innerSizeName = 'innerH';
          beforeName = 'top';
          deltaSizeName = 'deltaH';
          contentSizeName = 'contentH';
          alignBeforeName = 'left';
          alignSizeName = 'w';
          alignAxisName = 'x';
          alignInnerSizeName = 'innerW';
          alignMinSizeName = 'minW';
          alignAfterName = 'right';
          alignDeltaSizeName = 'deltaW';
          alignContentSizeName = 'contentW';
        } else {
          posName = 'x';
          sizeName = 'w';
          minSizeName = 'minW';
          maxSizeName = 'maxW';
          innerSizeName = 'innerW';
          beforeName = 'left';
          deltaSizeName = 'deltaW';
          contentSizeName = 'contentW';
          alignBeforeName = 'top';
          alignSizeName = 'h';
          alignAxisName = 'y';
          alignInnerSizeName = 'innerH';
          alignMinSizeName = 'minH';
          alignAfterName = 'bottom';
          alignDeltaSizeName = 'deltaH';
          alignContentSizeName = 'contentH';
        }
        availableSpace = contLayoutRect[innerSizeName] - contPaddingBox[beforeName] - contPaddingBox[beforeName];
        maxAlignEndPos = totalFlex = 0;
        for (i = 0, l = items.length; i < l; i++) {
          ctrl = items[i];
          ctrlLayoutRect = ctrl.layoutRect();
          ctrlSettings = ctrl.settings;
          flex = ctrlSettings.flex;
          availableSpace -= i < l - 1 ? spacing : 0;
          if (flex > 0) {
            totalFlex += flex;
            if (ctrlLayoutRect[maxSizeName]) {
              maxSizeItems.push(ctrl);
            }
            ctrlLayoutRect.flex = flex;
          }
          availableSpace -= ctrlLayoutRect[minSizeName];
          size = contPaddingBox[alignBeforeName] + ctrlLayoutRect[alignMinSizeName] + contPaddingBox[alignAfterName];
          if (size > maxAlignEndPos) {
            maxAlignEndPos = size;
          }
        }
        rect = {};
        if (availableSpace < 0) {
          rect[minSizeName] = contLayoutRect[minSizeName] - availableSpace + contLayoutRect[deltaSizeName];
        } else {
          rect[minSizeName] = contLayoutRect[innerSizeName] - availableSpace + contLayoutRect[deltaSizeName];
        }
        rect[alignMinSizeName] = maxAlignEndPos + contLayoutRect[alignDeltaSizeName];
        rect[contentSizeName] = contLayoutRect[innerSizeName] - availableSpace;
        rect[alignContentSizeName] = maxAlignEndPos;
        rect.minW = min(rect.minW, contLayoutRect.maxW);
        rect.minH = min(rect.minH, contLayoutRect.maxH);
        rect.minW = max(rect.minW, contLayoutRect.startMinWidth);
        rect.minH = max(rect.minH, contLayoutRect.startMinHeight);
        if (contLayoutRect.autoResize && (rect.minW !== contLayoutRect.minW || rect.minH !== contLayoutRect.minH)) {
          rect.w = rect.minW;
          rect.h = rect.minH;
          container.layoutRect(rect);
          this.recalc(container);
          if (container._lastRect === null) {
            var parentCtrl = container.parent();
            if (parentCtrl) {
              parentCtrl._lastRect = null;
              parentCtrl.recalc();
            }
          }
          return;
        }
        ratio = availableSpace / totalFlex;
        for (i = 0, l = maxSizeItems.length; i < l; i++) {
          ctrl = maxSizeItems[i];
          ctrlLayoutRect = ctrl.layoutRect();
          maxSize = ctrlLayoutRect[maxSizeName];
          size = ctrlLayoutRect[minSizeName] + ctrlLayoutRect.flex * ratio;
          if (size > maxSize) {
            availableSpace -= ctrlLayoutRect[maxSizeName] - ctrlLayoutRect[minSizeName];
            totalFlex -= ctrlLayoutRect.flex;
            ctrlLayoutRect.flex = 0;
            ctrlLayoutRect.maxFlexSize = maxSize;
          } else {
            ctrlLayoutRect.maxFlexSize = 0;
          }
        }
        ratio = availableSpace / totalFlex;
        pos = contPaddingBox[beforeName];
        rect = {};
        if (totalFlex === 0) {
          if (pack === 'end') {
            pos = availableSpace + contPaddingBox[beforeName];
          } else if (pack === 'center') {
            pos = Math.round(contLayoutRect[innerSizeName] / 2 - (contLayoutRect[innerSizeName] - availableSpace) / 2) + contPaddingBox[beforeName];
            if (pos < 0) {
              pos = contPaddingBox[beforeName];
            }
          } else if (pack === 'justify') {
            pos = contPaddingBox[beforeName];
            spacing = Math.floor(availableSpace / (items.length - 1));
          }
        }
        rect[alignAxisName] = contPaddingBox[alignBeforeName];
        for (i = 0, l = items.length; i < l; i++) {
          ctrl = items[i];
          ctrlLayoutRect = ctrl.layoutRect();
          size = ctrlLayoutRect.maxFlexSize || ctrlLayoutRect[minSizeName];
          if (align === 'center') {
            rect[alignAxisName] = Math.round(contLayoutRect[alignInnerSizeName] / 2 - ctrlLayoutRect[alignSizeName] / 2);
          } else if (align === 'stretch') {
            rect[alignSizeName] = max(ctrlLayoutRect[alignMinSizeName] || 0, contLayoutRect[alignInnerSizeName] - contPaddingBox[alignBeforeName] - contPaddingBox[alignAfterName]);
            rect[alignAxisName] = contPaddingBox[alignBeforeName];
          } else if (align === 'end') {
            rect[alignAxisName] = contLayoutRect[alignInnerSizeName] - ctrlLayoutRect[alignSizeName] - contPaddingBox.top;
          }
          if (ctrlLayoutRect.flex > 0) {
            size += ctrlLayoutRect.flex * ratio;
          }
          rect[sizeName] = size;
          rect[posName] = pos;
          ctrl.layoutRect(rect);
          if (ctrl.recalc) {
            ctrl.recalc();
          }
          pos += size + spacing;
        }
      }
    });

    var FlowLayout = Layout.extend({
      Defaults: {
        containerClass: 'flow-layout',
        controlClass: 'flow-layout-item',
        endClass: 'break'
      },
      recalc: function (container) {
        container.items().filter(':visible').each(function (ctrl) {
          if (ctrl.recalc) {
            ctrl.recalc();
          }
        });
      },
      isNative: function () {
        return true;
      }
    });

    var descendant = function (scope, selector) {
      return one(selector, scope);
    };

    var toggleFormat = function (editor, fmt) {
      return function () {
        editor.execCommand('mceToggleFormat', false, fmt);
      };
    };
    var addFormatChangedListener = function (editor, name, changed) {
      var handler = function (state) {
        changed(state, name);
      };
      if (editor.formatter) {
        editor.formatter.formatChanged(name, handler);
      } else {
        editor.on('init', function () {
          editor.formatter.formatChanged(name, handler);
        });
      }
    };
    var postRenderFormatToggle = function (editor, name) {
      return function (e) {
        addFormatChangedListener(editor, name, function (state) {
          e.control.active(state);
        });
      };
    };

    var register = function (editor) {
      var alignFormats = [
        'alignleft',
        'aligncenter',
        'alignright',
        'alignjustify'
      ];
      var defaultAlign = 'alignleft';
      var alignMenuItems = [
        {
          text: 'Left',
          icon: 'alignleft',
          onclick: toggleFormat(editor, 'alignleft')
        },
        {
          text: 'Center',
          icon: 'aligncenter',
          onclick: toggleFormat(editor, 'aligncenter')
        },
        {
          text: 'Right',
          icon: 'alignright',
          onclick: toggleFormat(editor, 'alignright')
        },
        {
          text: 'Justify',
          icon: 'alignjustify',
          onclick: toggleFormat(editor, 'alignjustify')
        }
      ];
      editor.addMenuItem('align', {
        text: 'Align',
        menu: alignMenuItems
      });
      editor.addButton('align', {
        type: 'menubutton',
        icon: defaultAlign,
        menu: alignMenuItems,
        onShowMenu: function (e) {
          var menu = e.control.menu;
          global$2.each(alignFormats, function (formatName, idx) {
            menu.items().eq(idx).each(function (item) {
              return item.active(editor.formatter.match(formatName));
            });
          });
        },
        onPostRender: function (e) {
          var ctrl = e.control;
          global$2.each(alignFormats, function (formatName, idx) {
            addFormatChangedListener(editor, formatName, function (state) {
              ctrl.icon(defaultAlign);
              if (state) {
                ctrl.icon(formatName);
              }
            });
          });
        }
      });
      global$2.each({
        alignleft: [
          'Align left',
          'JustifyLeft'
        ],
        aligncenter: [
          'Align center',
          'JustifyCenter'
        ],
        alignright: [
          'Align right',
          'JustifyRight'
        ],
        alignjustify: [
          'Justify',
          'JustifyFull'
        ],
        alignnone: [
          'No alignment',
          'JustifyNone'
        ]
      }, function (item, name) {
        editor.addButton(name, {
          active: false,
          tooltip: item[0],
          cmd: item[1],
          onPostRender: postRenderFormatToggle(editor, name)
        });
      });
    };
    var Align = { register: register };

    var getFirstFont = function (fontFamily) {
      return fontFamily ? fontFamily.split(',')[0] : '';
    };
    var findMatchingValue = function (items, fontFamily) {
      var font = fontFamily ? fontFamily.toLowerCase() : '';
      var value;
      global$2.each(items, function (item) {
        if (item.value.toLowerCase() === font) {
          value = item.value;
        }
      });
      global$2.each(items, function (item) {
        if (!value && getFirstFont(item.value).toLowerCase() === getFirstFont(font).toLowerCase()) {
          value = item.value;
        }
      });
      return value;
    };
    var createFontNameListBoxChangeHandler = function (editor, items) {
      return function () {
        var self = this;
        self.state.set('value', null);
        editor.on('init nodeChange', function (e) {
          var fontFamily = editor.queryCommandValue('FontName');
          var match = findMatchingValue(items, fontFamily);
          self.value(match ? match : null);
          if (!match && fontFamily) {
            self.text(getFirstFont(fontFamily));
          }
        });
      };
    };
    var createFormats = function (formats) {
      formats = formats.replace(/;$/, '').split(';');
      var i = formats.length;
      while (i--) {
        formats[i] = formats[i].split('=');
      }
      return formats;
    };
    var getFontItems = function (editor) {
      var defaultFontsFormats = 'Andale Mono=andale mono,monospace;' + 'Arial=arial,helvetica,sans-serif;' + 'Arial Black=arial black,sans-serif;' + 'Book Antiqua=book antiqua,palatino,serif;' + 'Comic Sans MS=comic sans ms,sans-serif;' + 'Courier New=courier new,courier,monospace;' + 'Georgia=georgia,palatino,serif;' + 'Helvetica=helvetica,arial,sans-serif;' + 'Impact=impact,sans-serif;' + 'Symbol=symbol;' + 'Tahoma=tahoma,arial,helvetica,sans-serif;' + 'Terminal=terminal,monaco,monospace;' + 'Times New Roman=times new roman,times,serif;' + 'Trebuchet MS=trebuchet ms,geneva,sans-serif;' + 'Verdana=verdana,geneva,sans-serif;' + 'Webdings=webdings;' + 'Wingdings=wingdings,zapf dingbats';
      var fonts = createFormats(editor.settings.font_formats || defaultFontsFormats);
      return global$2.map(fonts, function (font) {
        return {
          text: { raw: font[0] },
          value: font[1],
          textStyle: font[1].indexOf('dings') === -1 ? 'font-family:' + font[1] : ''
        };
      });
    };
    var registerButtons = function (editor) {
      editor.addButton('fontselect', function () {
        var items = getFontItems(editor);
        return {
          type: 'listbox',
          text: 'Font Family',
          tooltip: 'Font Family',
          values: items,
          fixedWidth: true,
          onPostRender: createFontNameListBoxChangeHandler(editor, items),
          onselect: function (e) {
            if (e.control.settings.value) {
              editor.execCommand('FontName', false, e.control.settings.value);
            }
          }
        };
      });
    };
    var register$1 = function (editor) {
      registerButtons(editor);
    };
    var FontSelect = { register: register$1 };

    var round = function (number, precision) {
      var factor = Math.pow(10, precision);
      return Math.round(number * factor) / factor;
    };
    var toPt = function (fontSize, precision) {
      if (/[0-9.]+px$/.test(fontSize)) {
        return round(parseInt(fontSize, 10) * 72 / 96, precision || 0) + 'pt';
      }
      return fontSize;
    };
    var findMatchingValue$1 = function (items, pt, px) {
      var value;
      global$2.each(items, function (item) {
        if (item.value === px) {
          value = px;
        } else if (item.value === pt) {
          value = pt;
        }
      });
      return value;
    };
    var createFontSizeListBoxChangeHandler = function (editor, items) {
      return function () {
        var self = this;
        editor.on('init nodeChange', function (e) {
          var px, pt, precision, match;
          px = editor.queryCommandValue('FontSize');
          if (px) {
            for (precision = 3; !match && precision >= 0; precision--) {
              pt = toPt(px, precision);
              match = findMatchingValue$1(items, pt, px);
            }
          }
          self.value(match ? match : null);
          if (!match) {
            self.text(pt);
          }
        });
      };
    };
    var getFontSizeItems = function (editor) {
      var defaultFontsizeFormats = '8pt 10pt 12pt 14pt 18pt 24pt 36pt';
      var fontsizeFormats = editor.settings.fontsize_formats || defaultFontsizeFormats;
      return global$2.map(fontsizeFormats.split(' '), function (item) {
        var text = item, value = item;
        var values = item.split('=');
        if (values.length > 1) {
          text = values[0];
          value = values[1];
        }
        return {
          text: text,
          value: value
        };
      });
    };
    var registerButtons$1 = function (editor) {
      editor.addButton('fontsizeselect', function () {
        var items = getFontSizeItems(editor);
        return {
          type: 'listbox',
          text: 'Font Sizes',
          tooltip: 'Font Sizes',
          values: items,
          fixedWidth: true,
          onPostRender: createFontSizeListBoxChangeHandler(editor, items),
          onclick: function (e) {
            if (e.control.settings.value) {
              editor.execCommand('FontSize', false, e.control.settings.value);
            }
          }
        };
      });
    };
    var register$2 = function (editor) {
      registerButtons$1(editor);
    };
    var FontSizeSelect = { register: register$2 };

    var hideMenuObjects = function (editor, menu) {
      var count = menu.length;
      global$2.each(menu, function (item) {
        if (item.menu) {
          item.hidden = hideMenuObjects(editor, item.menu) === 0;
        }
        var formatName = item.format;
        if (formatName) {
          item.hidden = !editor.formatter.canApply(formatName);
        }
        if (item.hidden) {
          count--;
        }
      });
      return count;
    };
    var hideFormatMenuItems = function (editor, menu) {
      var count = menu.items().length;
      menu.items().each(function (item) {
        if (item.menu) {
          item.visible(hideFormatMenuItems(editor, item.menu) > 0);
        }
        if (!item.menu && item.settings.menu) {
          item.visible(hideMenuObjects(editor, item.settings.menu) > 0);
        }
        var formatName = item.settings.format;
        if (formatName) {
          item.visible(editor.formatter.canApply(formatName));
        }
        if (!item.visible()) {
          count--;
        }
      });
      return count;
    };
    var createFormatMenu = function (editor) {
      var count = 0;
      var newFormats = [];
      var defaultStyleFormats = [
        {
          title: 'Headings',
          items: [
            {
              title: 'Heading 1',
              format: 'h1'
            },
            {
              title: 'Heading 2',
              format: 'h2'
            },
            {
              title: 'Heading 3',
              format: 'h3'
            },
            {
              title: 'Heading 4',
              format: 'h4'
            },
            {
              title: 'Heading 5',
              format: 'h5'
            },
            {
              title: 'Heading 6',
              format: 'h6'
            }
          ]
        },
        {
          title: 'Inline',
          items: [
            {
              title: 'Bold',
              icon: 'bold',
              format: 'bold'
            },
            {
              title: 'Italic',
              icon: 'italic',
              format: 'italic'
            },
            {
              title: 'Underline',
              icon: 'underline',
              format: 'underline'
            },
            {
              title: 'Strikethrough',
              icon: 'strikethrough',
              format: 'strikethrough'
            },
            {
              title: 'Superscript',
              icon: 'superscript',
              format: 'superscript'
            },
            {
              title: 'Subscript',
              icon: 'subscript',
              format: 'subscript'
            },
            {
              title: 'Code',
              icon: 'code',
              format: 'code'
            }
          ]
        },
        {
          title: 'Blocks',
          items: [
            {
              title: 'Paragraph',
              format: 'p'
            },
            {
              title: 'Blockquote',
              format: 'blockquote'
            },
            {
              title: 'Div',
              format: 'div'
            },
            {
              title: 'Pre',
              format: 'pre'
            }
          ]
        },
        {
          title: 'Alignment',
          items: [
            {
              title: 'Left',
              icon: 'alignleft',
              format: 'alignleft'
            },
            {
              title: 'Center',
              icon: 'aligncenter',
              format: 'aligncenter'
            },
            {
              title: 'Right',
              icon: 'alignright',
              format: 'alignright'
            },
            {
              title: 'Justify',
              icon: 'alignjustify',
              format: 'alignjustify'
            }
          ]
        }
      ];
      var createMenu = function (formats) {
        var menu = [];
        if (!formats) {
          return;
        }
        global$2.each(formats, function (format) {
          var menuItem = {
            text: format.title,
            icon: format.icon
          };
          if (format.items) {
            menuItem.menu = createMenu(format.items);
          } else {
            var formatName = format.format || 'custom' + count++;
            if (!format.format) {
              format.name = formatName;
              newFormats.push(format);
            }
            menuItem.format = formatName;
            menuItem.cmd = format.cmd;
          }
          menu.push(menuItem);
        });
        return menu;
      };
      var createStylesMenu = function () {
        var menu;
        if (editor.settings.style_formats_merge) {
          if (editor.settings.style_formats) {
            menu = createMenu(defaultStyleFormats.concat(editor.settings.style_formats));
          } else {
            menu = createMenu(defaultStyleFormats);
          }
        } else {
          menu = createMenu(editor.settings.style_formats || defaultStyleFormats);
        }
        return menu;
      };
      editor.on('init', function () {
        global$2.each(newFormats, function (format) {
          editor.formatter.register(format.name, format);
        });
      });
      return {
        type: 'menu',
        items: createStylesMenu(),
        onPostRender: function (e) {
          editor.fire('renderFormatsMenu', { control: e.control });
        },
        itemDefaults: {
          preview: true,
          textStyle: function () {
            if (this.settings.format) {
              return editor.formatter.getCssText(this.settings.format);
            }
          },
          onPostRender: function () {
            var self = this;
            self.parent().on('show', function () {
              var formatName, command;
              formatName = self.settings.format;
              if (formatName) {
                self.disabled(!editor.formatter.canApply(formatName));
                self.active(editor.formatter.match(formatName));
              }
              command = self.settings.cmd;
              if (command) {
                self.active(editor.queryCommandState(command));
              }
            });
          },
          onclick: function () {
            if (this.settings.format) {
              toggleFormat(editor, this.settings.format)();
            }
            if (this.settings.cmd) {
              editor.execCommand(this.settings.cmd);
            }
          }
        }
      };
    };
    var registerMenuItems = function (editor, formatMenu) {
      editor.addMenuItem('formats', {
        text: 'Formats',
        menu: formatMenu
      });
    };
    var registerButtons$2 = function (editor, formatMenu) {
      editor.addButton('styleselect', {
        type: 'menubutton',
        text: 'Formats',
        menu: formatMenu,
        onShowMenu: function () {
          if (editor.settings.style_formats_autohide) {
            hideFormatMenuItems(editor, this.menu);
          }
        }
      });
    };
    var register$3 = function (editor) {
      var formatMenu = createFormatMenu(editor);
      registerMenuItems(editor, formatMenu);
      registerButtons$2(editor, formatMenu);
    };
    var Formats = { register: register$3 };

    var defaultBlocks = 'Paragraph=p;' + 'Heading 1=h1;' + 'Heading 2=h2;' + 'Heading 3=h3;' + 'Heading 4=h4;' + 'Heading 5=h5;' + 'Heading 6=h6;' + 'Preformatted=pre';
    var createFormats$1 = function (formats) {
      formats = formats.replace(/;$/, '').split(';');
      var i = formats.length;
      while (i--) {
        formats[i] = formats[i].split('=');
      }
      return formats;
    };
    var createListBoxChangeHandler = function (editor, items, formatName) {
      return function () {
        var self = this;
        editor.on('nodeChange', function (e) {
          var formatter = editor.formatter;
          var value = null;
          global$2.each(e.parents, function (node) {
            global$2.each(items, function (item) {
              if (formatName) {
                if (formatter.matchNode(node, formatName, { value: item.value })) {
                  value = item.value;
                }
              } else {
                if (formatter.matchNode(node, item.value)) {
                  value = item.value;
                }
              }
              if (value) {
                return false;
              }
            });
            if (value) {
              return false;
            }
          });
          self.value(value);
        });
      };
    };
    var lazyFormatSelectBoxItems = function (editor, blocks) {
      return function () {
        var items = [];
        global$2.each(blocks, function (block) {
          items.push({
            text: block[0],
            value: block[1],
            textStyle: function () {
              return editor.formatter.getCssText(block[1]);
            }
          });
        });
        return {
          type: 'listbox',
          text: blocks[0][0],
          values: items,
          fixedWidth: true,
          onselect: function (e) {
            if (e.control) {
              var fmt = e.control.value();
              toggleFormat(editor, fmt)();
            }
          },
          onPostRender: createListBoxChangeHandler(editor, items)
        };
      };
    };
    var buildMenuItems = function (editor, blocks) {
      return global$2.map(blocks, function (block) {
        return {
          text: block[0],
          onclick: toggleFormat(editor, block[1]),
          textStyle: function () {
            return editor.formatter.getCssText(block[1]);
          }
        };
      });
    };
    var register$4 = function (editor) {
      var blocks = createFormats$1(editor.settings.block_formats || defaultBlocks);
      editor.addMenuItem('blockformats', {
        text: 'Blocks',
        menu: buildMenuItems(editor, blocks)
      });
      editor.addButton('formatselect', lazyFormatSelectBoxItems(editor, blocks));
    };
    var FormatSelect = { register: register$4 };

    var createCustomMenuItems = function (editor, names) {
      var items, nameList;
      if (typeof names === 'string') {
        nameList = names.split(' ');
      } else if (global$2.isArray(names)) {
        return flatten(global$2.map(names, function (names) {
          return createCustomMenuItems(editor, names);
        }));
      }
      items = global$2.grep(nameList, function (name) {
        return name === '|' || name in editor.menuItems;
      });
      return global$2.map(items, function (name) {
        return name === '|' ? { text: '-' } : editor.menuItems[name];
      });
    };
    var isSeparator$1 = function (menuItem) {
      return menuItem && menuItem.text === '-';
    };
    var trimMenuItems = function (menuItems) {
      var menuItems2 = filter(menuItems, function (menuItem, i) {
        return !isSeparator$1(menuItem) || !isSeparator$1(menuItems[i - 1]);
      });
      return filter(menuItems2, function (menuItem, i) {
        return !isSeparator$1(menuItem) || i > 0 && i < menuItems2.length - 1;
      });
    };
    var createContextMenuItems = function (editor, context) {
      var outputMenuItems = [{ text: '-' }];
      var menuItems = global$2.grep(editor.menuItems, function (menuItem) {
        return menuItem.context === context;
      });
      global$2.each(menuItems, function (menuItem) {
        if (menuItem.separator === 'before') {
          outputMenuItems.push({ text: '|' });
        }
        if (menuItem.prependToContext) {
          outputMenuItems.unshift(menuItem);
        } else {
          outputMenuItems.push(menuItem);
        }
        if (menuItem.separator === 'after') {
          outputMenuItems.push({ text: '|' });
        }
      });
      return outputMenuItems;
    };
    var createInsertMenu = function (editor) {
      var insertButtonItems = editor.settings.insert_button_items;
      if (insertButtonItems) {
        return trimMenuItems(createCustomMenuItems(editor, insertButtonItems));
      } else {
        return trimMenuItems(createContextMenuItems(editor, 'insert'));
      }
    };
    var registerButtons$3 = function (editor) {
      editor.addButton('insert', {
        type: 'menubutton',
        icon: 'insert',
        menu: [],
        oncreatemenu: function () {
          this.menu.add(createInsertMenu(editor));
          this.menu.renderNew();
        }
      });
    };
    var register$5 = function (editor) {
      registerButtons$3(editor);
    };
    var InsertButton = { register: register$5 };

    var registerFormatButtons = function (editor) {
      global$2.each({
        bold: 'Bold',
        italic: 'Italic',
        underline: 'Underline',
        strikethrough: 'Strikethrough',
        subscript: 'Subscript',
        superscript: 'Superscript'
      }, function (text, name) {
        editor.addButton(name, {
          active: false,
          tooltip: text,
          onPostRender: postRenderFormatToggle(editor, name),
          onclick: toggleFormat(editor, name)
        });
      });
    };
    var registerCommandButtons = function (editor) {
      global$2.each({
        outdent: [
          'Decrease indent',
          'Outdent'
        ],
        indent: [
          'Increase indent',
          'Indent'
        ],
        cut: [
          'Cut',
          'Cut'
        ],
        copy: [
          'Copy',
          'Copy'
        ],
        paste: [
          'Paste',
          'Paste'
        ],
        help: [
          'Help',
          'mceHelp'
        ],
        selectall: [
          'Select all',
          'SelectAll'
        ],
        visualaid: [
          'Visual aids',
          'mceToggleVisualAid'
        ],
        newdocument: [
          'New document',
          'mceNewDocument'
        ],
        removeformat: [
          'Clear formatting',
          'RemoveFormat'
        ],
        remove: [
          'Remove',
          'Delete'
        ]
      }, function (item, name) {
        editor.addButton(name, {
          tooltip: item[0],
          cmd: item[1]
        });
      });
    };
    var registerCommandToggleButtons = function (editor) {
      global$2.each({
        blockquote: [
          'Blockquote',
          'mceBlockQuote'
        ],
        subscript: [
          'Subscript',
          'Subscript'
        ],
        superscript: [
          'Superscript',
          'Superscript'
        ]
      }, function (item, name) {
        editor.addButton(name, {
          active: false,
          tooltip: item[0],
          cmd: item[1],
          onPostRender: postRenderFormatToggle(editor, name)
        });
      });
    };
    var registerButtons$4 = function (editor) {
      registerFormatButtons(editor);
      registerCommandButtons(editor);
      registerCommandToggleButtons(editor);
    };
    var registerMenuItems$1 = function (editor) {
      global$2.each({
        bold: [
          'Bold',
          'Bold',
          'Meta+B'
        ],
        italic: [
          'Italic',
          'Italic',
          'Meta+I'
        ],
        underline: [
          'Underline',
          'Underline',
          'Meta+U'
        ],
        strikethrough: [
          'Strikethrough',
          'Strikethrough'
        ],
        subscript: [
          'Subscript',
          'Subscript'
        ],
        superscript: [
          'Superscript',
          'Superscript'
        ],
        removeformat: [
          'Clear formatting',
          'RemoveFormat'
        ],
        newdocument: [
          'New document',
          'mceNewDocument'
        ],
        cut: [
          'Cut',
          'Cut',
          'Meta+X'
        ],
        copy: [
          'Copy',
          'Copy',
          'Meta+C'
        ],
        paste: [
          'Paste',
          'Paste',
          'Meta+V'
        ],
        selectall: [
          'Select all',
          'SelectAll',
          'Meta+A'
        ]
      }, function (item, name) {
        editor.addMenuItem(name, {
          text: item[0],
          icon: name,
          shortcut: item[2],
          cmd: item[1]
        });
      });
      editor.addMenuItem('codeformat', {
        text: 'Code',
        icon: 'code',
        onclick: toggleFormat(editor, 'code')
      });
    };
    var register$6 = function (editor) {
      registerButtons$4(editor);
      registerMenuItems$1(editor);
    };
    var SimpleControls = { register: register$6 };

    var toggleUndoRedoState = function (editor, type) {
      return function () {
        var self = this;
        var checkState = function () {
          var typeFn = type === 'redo' ? 'hasRedo' : 'hasUndo';
          return editor.undoManager ? editor.undoManager[typeFn]() : false;
        };
        self.disabled(!checkState());
        editor.on('Undo Redo AddUndo TypingUndo ClearUndos SwitchMode', function () {
          self.disabled(editor.readonly || !checkState());
        });
      };
    };
    var registerMenuItems$2 = function (editor) {
      editor.addMenuItem('undo', {
        text: 'Undo',
        icon: 'undo',
        shortcut: 'Meta+Z',
        onPostRender: toggleUndoRedoState(editor, 'undo'),
        cmd: 'undo'
      });
      editor.addMenuItem('redo', {
        text: 'Redo',
        icon: 'redo',
        shortcut: 'Meta+Y',
        onPostRender: toggleUndoRedoState(editor, 'redo'),
        cmd: 'redo'
      });
    };
    var registerButtons$5 = function (editor) {
      editor.addButton('undo', {
        tooltip: 'Undo',
        onPostRender: toggleUndoRedoState(editor, 'undo'),
        cmd: 'undo'
      });
      editor.addButton('redo', {
        tooltip: 'Redo',
        onPostRender: toggleUndoRedoState(editor, 'redo'),
        cmd: 'redo'
      });
    };
    var register$7 = function (editor) {
      registerMenuItems$2(editor);
      registerButtons$5(editor);
    };
    var UndoRedo = { register: register$7 };

    var toggleVisualAidState = function (editor) {
      return function () {
        var self = this;
        editor.on('VisualAid', function (e) {
          self.active(e.hasVisual);
        });
        self.active(editor.hasVisual);
      };
    };
    var registerMenuItems$3 = function (editor) {
      editor.addMenuItem('visualaid', {
        text: 'Visual aids',
        selectable: true,
        onPostRender: toggleVisualAidState(editor),
        cmd: 'mceToggleVisualAid'
      });
    };
    var register$8 = function (editor) {
      registerMenuItems$3(editor);
    };
    var VisualAid = { register: register$8 };

    var setupEnvironment = function () {
      Widget.tooltips = !global$8.iOS;
      Control$1.translate = function (text) {
        return global$1.translate(text);
      };
    };
    var setupUiContainer = function (editor) {
      if (editor.settings.ui_container) {
        global$8.container = descendant(Element.fromDom(domGlobals.document.body), editor.settings.ui_container).fold(constant(null), function (elm) {
          return elm.dom();
        });
      }
    };
    var setupRtlMode = function (editor) {
      if (editor.rtl) {
        Control$1.rtl = true;
      }
    };
    var setupHideFloatPanels = function (editor) {
      editor.on('mousedown progressstate', function () {
        FloatPanel.hideAll();
      });
    };
    var setup$1 = function (editor) {
      setupRtlMode(editor);
      setupHideFloatPanels(editor);
      setupUiContainer(editor);
      setupEnvironment();
      FormatSelect.register(editor);
      Align.register(editor);
      SimpleControls.register(editor);
      UndoRedo.register(editor);
      FontSizeSelect.register(editor);
      FontSelect.register(editor);
      Formats.register(editor);
      VisualAid.register(editor);
      InsertButton.register(editor);
    };
    var FormatControls = { setup: setup$1 };

    var GridLayout = AbsoluteLayout.extend({
      recalc: function (container) {
        var settings, rows, cols, items, contLayoutRect, width, height, rect, ctrlLayoutRect, ctrl, x, y, posX, posY, ctrlSettings, contPaddingBox, align, spacingH, spacingV, alignH, alignV, maxX, maxY;
        var colWidths = [];
        var rowHeights = [];
        var ctrlMinWidth, ctrlMinHeight, availableWidth, availableHeight, reverseRows, idx;
        settings = container.settings;
        items = container.items().filter(':visible');
        contLayoutRect = container.layoutRect();
        cols = settings.columns || Math.ceil(Math.sqrt(items.length));
        rows = Math.ceil(items.length / cols);
        spacingH = settings.spacingH || settings.spacing || 0;
        spacingV = settings.spacingV || settings.spacing || 0;
        alignH = settings.alignH || settings.align;
        alignV = settings.alignV || settings.align;
        contPaddingBox = container.paddingBox;
        reverseRows = 'reverseRows' in settings ? settings.reverseRows : container.isRtl();
        if (alignH && typeof alignH === 'string') {
          alignH = [alignH];
        }
        if (alignV && typeof alignV === 'string') {
          alignV = [alignV];
        }
        for (x = 0; x < cols; x++) {
          colWidths.push(0);
        }
        for (y = 0; y < rows; y++) {
          rowHeights.push(0);
        }
        for (y = 0; y < rows; y++) {
          for (x = 0; x < cols; x++) {
            ctrl = items[y * cols + x];
            if (!ctrl) {
              break;
            }
            ctrlLayoutRect = ctrl.layoutRect();
            ctrlMinWidth = ctrlLayoutRect.minW;
            ctrlMinHeight = ctrlLayoutRect.minH;
            colWidths[x] = ctrlMinWidth > colWidths[x] ? ctrlMinWidth : colWidths[x];
            rowHeights[y] = ctrlMinHeight > rowHeights[y] ? ctrlMinHeight : rowHeights[y];
          }
        }
        availableWidth = contLayoutRect.innerW - contPaddingBox.left - contPaddingBox.right;
        for (maxX = 0, x = 0; x < cols; x++) {
          maxX += colWidths[x] + (x > 0 ? spacingH : 0);
          availableWidth -= (x > 0 ? spacingH : 0) + colWidths[x];
        }
        availableHeight = contLayoutRect.innerH - contPaddingBox.top - contPaddingBox.bottom;
        for (maxY = 0, y = 0; y < rows; y++) {
          maxY += rowHeights[y] + (y > 0 ? spacingV : 0);
          availableHeight -= (y > 0 ? spacingV : 0) + rowHeights[y];
        }
        maxX += contPaddingBox.left + contPaddingBox.right;
        maxY += contPaddingBox.top + contPaddingBox.bottom;
        rect = {};
        rect.minW = maxX + (contLayoutRect.w - contLayoutRect.innerW);
        rect.minH = maxY + (contLayoutRect.h - contLayoutRect.innerH);
        rect.contentW = rect.minW - contLayoutRect.deltaW;
        rect.contentH = rect.minH - contLayoutRect.deltaH;
        rect.minW = Math.min(rect.minW, contLayoutRect.maxW);
        rect.minH = Math.min(rect.minH, contLayoutRect.maxH);
        rect.minW = Math.max(rect.minW, contLayoutRect.startMinWidth);
        rect.minH = Math.max(rect.minH, contLayoutRect.startMinHeight);
        if (contLayoutRect.autoResize && (rect.minW !== contLayoutRect.minW || rect.minH !== contLayoutRect.minH)) {
          rect.w = rect.minW;
          rect.h = rect.minH;
          container.layoutRect(rect);
          this.recalc(container);
          if (container._lastRect === null) {
            var parentCtrl = container.parent();
            if (parentCtrl) {
              parentCtrl._lastRect = null;
              parentCtrl.recalc();
            }
          }
          return;
        }
        if (contLayoutRect.autoResize) {
          rect = container.layoutRect(rect);
          rect.contentW = rect.minW - contLayoutRect.deltaW;
          rect.contentH = rect.minH - contLayoutRect.deltaH;
        }
        var flexV;
        if (settings.packV === 'start') {
          flexV = 0;
        } else {
          flexV = availableHeight > 0 ? Math.floor(availableHeight / rows) : 0;
        }
        var totalFlex = 0;
        var flexWidths = settings.flexWidths;
        if (flexWidths) {
          for (x = 0; x < flexWidths.length; x++) {
            totalFlex += flexWidths[x];
          }
        } else {
          totalFlex = cols;
        }
        var ratio = availableWidth / totalFlex;
        for (x = 0; x < cols; x++) {
          colWidths[x] += flexWidths ? flexWidths[x] * ratio : ratio;
        }
        posY = contPaddingBox.top;
        for (y = 0; y < rows; y++) {
          posX = contPaddingBox.left;
          height = rowHeights[y] + flexV;
          for (x = 0; x < cols; x++) {
            if (reverseRows) {
              idx = y * cols + cols - 1 - x;
            } else {
              idx = y * cols + x;
            }
            ctrl = items[idx];
            if (!ctrl) {
              break;
            }
            ctrlSettings = ctrl.settings;
            ctrlLayoutRect = ctrl.layoutRect();
            width = Math.max(colWidths[x], ctrlLayoutRect.startMinWidth);
            ctrlLayoutRect.x = posX;
            ctrlLayoutRect.y = posY;
            align = ctrlSettings.alignH || (alignH ? alignH[x] || alignH[0] : null);
            if (align === 'center') {
              ctrlLayoutRect.x = posX + width / 2 - ctrlLayoutRect.w / 2;
            } else if (align === 'right') {
              ctrlLayoutRect.x = posX + width - ctrlLayoutRect.w;
            } else if (align === 'stretch') {
              ctrlLayoutRect.w = width;
            }
            align = ctrlSettings.alignV || (alignV ? alignV[x] || alignV[0] : null);
            if (align === 'center') {
              ctrlLayoutRect.y = posY + height / 2 - ctrlLayoutRect.h / 2;
            } else if (align === 'bottom') {
              ctrlLayoutRect.y = posY + height - ctrlLayoutRect.h;
            } else if (align === 'stretch') {
              ctrlLayoutRect.h = height;
            }
            ctrl.layoutRect(ctrlLayoutRect);
            posX += width + spacingH;
            if (ctrl.recalc) {
              ctrl.recalc();
            }
          }
          posY += height + spacingV;
        }
      }
    });

    var Iframe$1 = Widget.extend({
      renderHtml: function () {
        var self = this;
        self.classes.add('iframe');
        self.canFocus = false;
        return '<iframe id="' + self._id + '" class="' + self.classes + '" tabindex="-1" src="' + (self.settings.url || 'javascript:\'\'') + '" frameborder="0"></iframe>';
      },
      src: function (src) {
        this.getEl().src = src;
      },
      html: function (html, callback) {
        var self = this, body = this.getEl().contentWindow.document.body;
        if (!body) {
          global$7.setTimeout(function () {
            self.html(html);
          });
        } else {
          body.innerHTML = html;
          if (callback) {
            callback();
          }
        }
        return this;
      }
    });

    var InfoBox = Widget.extend({
      init: function (settings) {
        var self = this;
        self._super(settings);
        self.classes.add('widget').add('infobox');
        self.canFocus = false;
      },
      severity: function (level) {
        this.classes.remove('error');
        this.classes.remove('warning');
        this.classes.remove('success');
        this.classes.add(level);
      },
      help: function (state) {
        this.state.set('help', state);
      },
      renderHtml: function () {
        var self = this, prefix = self.classPrefix;
        return '<div id="' + self._id + '" class="' + self.classes + '">' + '<div id="' + self._id + '-body">' + self.encode(self.state.get('text')) + '<button role="button" tabindex="-1">' + '<i class="' + prefix + 'ico ' + prefix + 'i-help"></i>' + '</button>' + '</div>' + '</div>';
      },
      bindStates: function () {
        var self = this;
        self.state.on('change:text', function (e) {
          self.getEl('body').firstChild.data = self.encode(e.value);
          if (self.state.get('rendered')) {
            self.updateLayoutRect();
          }
        });
        self.state.on('change:help', function (e) {
          self.classes.toggle('has-help', e.value);
          if (self.state.get('rendered')) {
            self.updateLayoutRect();
          }
        });
        return self._super();
      }
    });

    var Label = Widget.extend({
      init: function (settings) {
        var self = this;
        self._super(settings);
        self.classes.add('widget').add('label');
        self.canFocus = false;
        if (settings.multiline) {
          self.classes.add('autoscroll');
        }
        if (settings.strong) {
          self.classes.add('strong');
        }
      },
      initLayoutRect: function () {
        var self = this, layoutRect = self._super();
        if (self.settings.multiline) {
          var size = funcs.getSize(self.getEl());
          if (size.width > layoutRect.maxW) {
            layoutRect.minW = layoutRect.maxW;
            self.classes.add('multiline');
          }
          self.getEl().style.width = layoutRect.minW + 'px';
          layoutRect.startMinH = layoutRect.h = layoutRect.minH = Math.min(layoutRect.maxH, funcs.getSize(self.getEl()).height);
        }
        return layoutRect;
      },
      repaint: function () {
        var self = this;
        if (!self.settings.multiline) {
          self.getEl().style.lineHeight = self.layoutRect().h + 'px';
        }
        return self._super();
      },
      severity: function (level) {
        this.classes.remove('error');
        this.classes.remove('warning');
        this.classes.remove('success');
        this.classes.add(level);
      },
      renderHtml: function () {
        var self = this;
        var targetCtrl, forName, forId = self.settings.forId;
        var text = self.settings.html ? self.settings.html : self.encode(self.state.get('text'));
        if (!forId && (forName = self.settings.forName)) {
          targetCtrl = self.getRoot().find('#' + forName)[0];
          if (targetCtrl) {
            forId = targetCtrl._id;
          }
        }
        if (forId) {
          return '<label id="' + self._id + '" class="' + self.classes + '"' + (forId ? ' for="' + forId + '"' : '') + '>' + text + '</label>';
        }
        return '<span id="' + self._id + '" class="' + self.classes + '">' + text + '</span>';
      },
      bindStates: function () {
        var self = this;
        self.state.on('change:text', function (e) {
          self.innerHtml(self.encode(e.value));
          if (self.state.get('rendered')) {
            self.updateLayoutRect();
          }
        });
        return self._super();
      }
    });

    var Toolbar$1 = Container.extend({
      Defaults: {
        role: 'toolbar',
        layout: 'flow'
      },
      init: function (settings) {
        var self = this;
        self._super(settings);
        self.classes.add('toolbar');
      },
      postRender: function () {
        var self = this;
        self.items().each(function (ctrl) {
          ctrl.classes.add('toolbar-item');
        });
        return self._super();
      }
    });

    var MenuBar = Toolbar$1.extend({
      Defaults: {
        role: 'menubar',
        containerCls: 'menubar',
        ariaRoot: true,
        defaults: { type: 'menubutton' }
      }
    });

    function isChildOf$1(node, parent) {
      while (node) {
        if (parent === node) {
          return true;
        }
        node = node.parentNode;
      }
      return false;
    }
    var MenuButton = Button.extend({
      init: function (settings) {
        var self = this;
        self._renderOpen = true;
        self._super(settings);
        settings = self.settings;
        self.classes.add('menubtn');
        if (settings.fixedWidth) {
          self.classes.add('fixed-width');
        }
        self.aria('haspopup', true);
        self.state.set('menu', settings.menu || self.render());
      },
      showMenu: function (toggle) {
        var self = this;
        var menu;
        if (self.menu && self.menu.visible() && toggle !== false) {
          return self.hideMenu();
        }
        if (!self.menu) {
          menu = self.state.get('menu') || [];
          self.classes.add('opened');
          if (menu.length) {
            menu = {
              type: 'menu',
              animate: true,
              items: menu
            };
          } else {
            menu.type = menu.type || 'menu';
            menu.animate = true;
          }
          if (!menu.renderTo) {
            self.menu = global$4.create(menu).parent(self).renderTo();
          } else {
            self.menu = menu.parent(self).show().renderTo();
          }
          self.fire('createmenu');
          self.menu.reflow();
          self.menu.on('cancel', function (e) {
            if (e.control.parent() === self.menu) {
              e.stopPropagation();
              self.focus();
              self.hideMenu();
            }
          });
          self.menu.on('select', function () {
            self.focus();
          });
          self.menu.on('show hide', function (e) {
            if (e.type === 'hide' && e.control.parent() === self) {
              self.classes.remove('opened-under');
            }
            if (e.control === self.menu) {
              self.activeMenu(e.type === 'show');
              self.classes.toggle('opened', e.type === 'show');
            }
            self.aria('expanded', e.type === 'show');
          }).fire('show');
        }
        self.menu.show();
        self.menu.layoutRect({ w: self.layoutRect().w });
        self.menu.repaint();
        self.menu.moveRel(self.getEl(), self.isRtl() ? [
          'br-tr',
          'tr-br'
        ] : [
          'bl-tl',
          'tl-bl'
        ]);
        var menuLayoutRect = self.menu.layoutRect();
        var selfBottom = self.$el.offset().top + self.layoutRect().h;
        if (selfBottom > menuLayoutRect.y && selfBottom < menuLayoutRect.y + menuLayoutRect.h) {
          self.classes.add('opened-under');
        }
        self.fire('showmenu');
      },
      hideMenu: function () {
        var self = this;
        if (self.menu) {
          self.menu.items().each(function (item) {
            if (item.hideMenu) {
              item.hideMenu();
            }
          });
          self.menu.hide();
        }
      },
      activeMenu: function (state) {
        this.classes.toggle('active', state);
      },
      renderHtml: function () {
        var self = this, id = self._id, prefix = self.classPrefix;
        var icon = self.settings.icon, image;
        var text = self.state.get('text');
        var textHtml = '';
        image = self.settings.image;
        if (image) {
          icon = 'none';
          if (typeof image !== 'string') {
            image = domGlobals.window.getSelection ? image[0] : image[1];
          }
          image = ' style="background-image: url(\'' + image + '\')"';
        } else {
          image = '';
        }
        if (text) {
          self.classes.add('btn-has-text');
          textHtml = '<span class="' + prefix + 'txt">' + self.encode(text) + '</span>';
        }
        icon = self.settings.icon ? prefix + 'ico ' + prefix + 'i-' + icon : '';
        self.aria('role', self.parent() instanceof MenuBar ? 'menuitem' : 'button');
        return '<div id="' + id + '" class="' + self.classes + '" tabindex="-1" aria-labelledby="' + id + '">' + '<button id="' + id + '-open" role="presentation" type="button" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + '></i>' : '') + textHtml + ' <i class="' + prefix + 'caret"></i>' + '</button>' + '</div>';
      },
      postRender: function () {
        var self = this;
        self.on('click', function (e) {
          if (e.control === self && isChildOf$1(e.target, self.getEl())) {
            self.focus();
            self.showMenu(!e.aria);
            if (e.aria) {
              self.menu.items().filter(':visible')[0].focus();
            }
          }
        });
        self.on('mouseenter', function (e) {
          var overCtrl = e.control;
          var parent = self.parent();
          var hasVisibleSiblingMenu;
          if (overCtrl && parent && overCtrl instanceof MenuButton && overCtrl.parent() === parent) {
            parent.items().filter('MenuButton').each(function (ctrl) {
              if (ctrl.hideMenu && ctrl !== overCtrl) {
                if (ctrl.menu && ctrl.menu.visible()) {
                  hasVisibleSiblingMenu = true;
                }
                ctrl.hideMenu();
              }
            });
            if (hasVisibleSiblingMenu) {
              overCtrl.focus();
              overCtrl.showMenu();
            }
          }
        });
        return self._super();
      },
      bindStates: function () {
        var self = this;
        self.state.on('change:menu', function () {
          if (self.menu) {
            self.menu.remove();
          }
          self.menu = null;
        });
        return self._super();
      },
      remove: function () {
        this._super();
        if (this.menu) {
          this.menu.remove();
        }
      }
    });

    var Menu = FloatPanel.extend({
      Defaults: {
        defaultType: 'menuitem',
        border: 1,
        layout: 'stack',
        role: 'application',
        bodyRole: 'menu',
        ariaRoot: true
      },
      init: function (settings) {
        var self = this;
        settings.autohide = true;
        settings.constrainToViewport = true;
        if (typeof settings.items === 'function') {
          settings.itemsFactory = settings.items;
          settings.items = [];
        }
        if (settings.itemDefaults) {
          var items = settings.items;
          var i = items.length;
          while (i--) {
            items[i] = global$2.extend({}, settings.itemDefaults, items[i]);
          }
        }
        self._super(settings);
        self.classes.add('menu');
        if (settings.animate && global$8.ie !== 11) {
          self.classes.add('animate');
        }
      },
      repaint: function () {
        this.classes.toggle('menu-align', true);
        this._super();
        this.getEl().style.height = '';
        this.getEl('body').style.height = '';
        return this;
      },
      cancel: function () {
        var self = this;
        self.hideAll();
        self.fire('select');
      },
      load: function () {
        var self = this;
        var time, factory;
        function hideThrobber() {
          if (self.throbber) {
            self.throbber.hide();
            self.throbber = null;
          }
        }
        factory = self.settings.itemsFactory;
        if (!factory) {
          return;
        }
        if (!self.throbber) {
          self.throbber = new Throbber(self.getEl('body'), true);
          if (self.items().length === 0) {
            self.throbber.show();
            self.fire('loading');
          } else {
            self.throbber.show(100, function () {
              self.items().remove();
              self.fire('loading');
            });
          }
          self.on('hide close', hideThrobber);
        }
        self.requestTime = time = new Date().getTime();
        self.settings.itemsFactory(function (items) {
          if (items.length === 0) {
            self.hide();
            return;
          }
          if (self.requestTime !== time) {
            return;
          }
          self.getEl().style.width = '';
          self.getEl('body').style.width = '';
          hideThrobber();
          self.items().remove();
          self.getEl('body').innerHTML = '';
          self.add(items);
          self.renderNew();
          self.fire('loaded');
        });
      },
      hideAll: function () {
        var self = this;
        this.find('menuitem').exec('hideMenu');
        return self._super();
      },
      preRender: function () {
        var self = this;
        self.items().each(function (ctrl) {
          var settings = ctrl.settings;
          if (settings.icon || settings.image || settings.selectable) {
            self._hasIcons = true;
            return false;
          }
        });
        if (self.settings.itemsFactory) {
          self.on('postrender', function () {
            if (self.settings.itemsFactory) {
              self.load();
            }
          });
        }
        self.on('show hide', function (e) {
          if (e.control === self) {
            if (e.type === 'show') {
              global$7.setTimeout(function () {
                self.classes.add('in');
              }, 0);
            } else {
              self.classes.remove('in');
            }
          }
        });
        return self._super();
      }
    });

    var ListBox = MenuButton.extend({
      init: function (settings) {
        var self = this;
        var values, selected, selectedText, lastItemCtrl;
        function setSelected(menuValues) {
          for (var i = 0; i < menuValues.length; i++) {
            selected = menuValues[i].selected || settings.value === menuValues[i].value;
            if (selected) {
              selectedText = selectedText || menuValues[i].text;
              self.state.set('value', menuValues[i].value);
              return true;
            }
            if (menuValues[i].menu) {
              if (setSelected(menuValues[i].menu)) {
                return true;
              }
            }
          }
        }
        self._super(settings);
        settings = self.settings;
        self._values = values = settings.values;
        if (values) {
          if (typeof settings.value !== 'undefined') {
            setSelected(values);
          }
          if (!selected && values.length > 0) {
            selectedText = values[0].text;
            self.state.set('value', values[0].value);
          }
          self.state.set('menu', values);
        }
        self.state.set('text', settings.text || selectedText);
        self.classes.add('listbox');
        self.on('select', function (e) {
          var ctrl = e.control;
          if (lastItemCtrl) {
            e.lastControl = lastItemCtrl;
          }
          if (settings.multiple) {
            ctrl.active(!ctrl.active());
          } else {
            self.value(e.control.value());
          }
          lastItemCtrl = ctrl;
        });
      },
      value: function (value) {
        if (arguments.length === 0) {
          return this.state.get('value');
        }
        if (typeof value === 'undefined') {
          return this;
        }
        function valueExists(values) {
          return exists(values, function (a) {
            return a.menu ? valueExists(a.menu) : a.value === value;
          });
        }
        if (this.settings.values) {
          if (valueExists(this.settings.values)) {
            this.state.set('value', value);
          } else if (value === null) {
            this.state.set('value', null);
          }
        } else {
          this.state.set('value', value);
        }
        return this;
      },
      bindStates: function () {
        var self = this;
        function activateMenuItemsByValue(menu, value) {
          if (menu instanceof Menu) {
            menu.items().each(function (ctrl) {
              if (!ctrl.hasMenus()) {
                ctrl.active(ctrl.value() === value);
              }
            });
          }
        }
        function getSelectedItem(menuValues, value) {
          var selectedItem;
          if (!menuValues) {
            return;
          }
          for (var i = 0; i < menuValues.length; i++) {
            if (menuValues[i].value === value) {
              return menuValues[i];
            }
            if (menuValues[i].menu) {
              selectedItem = getSelectedItem(menuValues[i].menu, value);
              if (selectedItem) {
                return selectedItem;
              }
            }
          }
        }
        self.on('show', function (e) {
          activateMenuItemsByValue(e.control, self.value());
        });
        self.state.on('change:value', function (e) {
          var selectedItem = getSelectedItem(self.state.get('menu'), e.value);
          if (selectedItem) {
            self.text(selectedItem.text);
          } else {
            self.text(self.settings.text);
          }
        });
        return self._super();
      }
    });

    var toggleTextStyle = function (ctrl, state) {
      var textStyle = ctrl._textStyle;
      if (textStyle) {
        var textElm = ctrl.getEl('text');
        textElm.setAttribute('style', textStyle);
        if (state) {
          textElm.style.color = '';
          textElm.style.backgroundColor = '';
        }
      }
    };
    var MenuItem = Widget.extend({
      Defaults: {
        border: 0,
        role: 'menuitem'
      },
      init: function (settings) {
        var self = this;
        var text;
        self._super(settings);
        settings = self.settings;
        self.classes.add('menu-item');
        if (settings.menu) {
          self.classes.add('menu-item-expand');
        }
        if (settings.preview) {
          self.classes.add('menu-item-preview');
        }
        text = self.state.get('text');
        if (text === '-' || text === '|') {
          self.classes.add('menu-item-sep');
          self.aria('role', 'separator');
          self.state.set('text', '-');
        }
        if (settings.selectable) {
          self.aria('role', 'menuitemcheckbox');
          self.classes.add('menu-item-checkbox');
          settings.icon = 'selected';
        }
        if (!settings.preview && !settings.selectable) {
          self.classes.add('menu-item-normal');
        }
        self.on('mousedown', function (e) {
          e.preventDefault();
        });
        if (settings.menu && !settings.ariaHideMenu) {
          self.aria('haspopup', true);
        }
      },
      hasMenus: function () {
        return !!this.settings.menu;
      },
      showMenu: function () {
        var self = this;
        var settings = self.settings;
        var menu;
        var parent = self.parent();
        parent.items().each(function (ctrl) {
          if (ctrl !== self) {
            ctrl.hideMenu();
          }
        });
        if (settings.menu) {
          menu = self.menu;
          if (!menu) {
            menu = settings.menu;
            if (menu.length) {
              menu = {
                type: 'menu',
                items: menu
              };
            } else {
              menu.type = menu.type || 'menu';
            }
            if (parent.settings.itemDefaults) {
              menu.itemDefaults = parent.settings.itemDefaults;
            }
            menu = self.menu = global$4.create(menu).parent(self).renderTo();
            menu.reflow();
            menu.on('cancel', function (e) {
              e.stopPropagation();
              self.focus();
              menu.hide();
            });
            menu.on('show hide', function (e) {
              if (e.control.items) {
                e.control.items().each(function (ctrl) {
                  ctrl.active(ctrl.settings.selected);
                });
              }
            }).fire('show');
            menu.on('hide', function (e) {
              if (e.control === menu) {
                self.classes.remove('selected');
              }
            });
            menu.submenu = true;
          } else {
            menu.show();
          }
          menu._parentMenu = parent;
          menu.classes.add('menu-sub');
          var rel = menu.testMoveRel(self.getEl(), self.isRtl() ? [
            'tl-tr',
            'bl-br',
            'tr-tl',
            'br-bl'
          ] : [
            'tr-tl',
            'br-bl',
            'tl-tr',
            'bl-br'
          ]);
          menu.moveRel(self.getEl(), rel);
          menu.rel = rel;
          rel = 'menu-sub-' + rel;
          menu.classes.remove(menu._lastRel).add(rel);
          menu._lastRel = rel;
          self.classes.add('selected');
          self.aria('expanded', true);
        }
      },
      hideMenu: function () {
        var self = this;
        if (self.menu) {
          self.menu.items().each(function (item) {
            if (item.hideMenu) {
              item.hideMenu();
            }
          });
          self.menu.hide();
          self.aria('expanded', false);
        }
        return self;
      },
      renderHtml: function () {
        var self = this;
        var id = self._id;
        var settings = self.settings;
        var prefix = self.classPrefix;
        var text = self.state.get('text');
        var icon = self.settings.icon, image = '', shortcut = settings.shortcut;
        var url = self.encode(settings.url), iconHtml = '';
        function convertShortcut(shortcut) {
          var i, value, replace = {};
          if (global$8.mac) {
            replace = {
              alt: '&#x2325;',
              ctrl: '&#x2318;',
              shift: '&#x21E7;',
              meta: '&#x2318;'
            };
          } else {
            replace = { meta: 'Ctrl' };
          }
          shortcut = shortcut.split('+');
          for (i = 0; i < shortcut.length; i++) {
            value = replace[shortcut[i].toLowerCase()];
            if (value) {
              shortcut[i] = value;
            }
          }
          return shortcut.join('+');
        }
        function escapeRegExp(str) {
          return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
        }
        function markMatches(text) {
          var match = settings.match || '';
          return match ? text.replace(new RegExp(escapeRegExp(match), 'gi'), function (match) {
            return '!mce~match[' + match + ']mce~match!';
          }) : text;
        }
        function boldMatches(text) {
          return text.replace(new RegExp(escapeRegExp('!mce~match['), 'g'), '<b>').replace(new RegExp(escapeRegExp(']mce~match!'), 'g'), '</b>');
        }
        if (icon) {
          self.parent().classes.add('menu-has-icons');
        }
        if (settings.image) {
          image = ' style="background-image: url(\'' + settings.image + '\')"';
        }
        if (shortcut) {
          shortcut = convertShortcut(shortcut);
        }
        icon = prefix + 'ico ' + prefix + 'i-' + (self.settings.icon || 'none');
        iconHtml = text !== '-' ? '<i class="' + icon + '"' + image + '></i>\xA0' : '';
        text = boldMatches(self.encode(markMatches(text)));
        url = boldMatches(self.encode(markMatches(url)));
        return '<div id="' + id + '" class="' + self.classes + '" tabindex="-1">' + iconHtml + (text !== '-' ? '<span id="' + id + '-text" class="' + prefix + 'text">' + text + '</span>' : '') + (shortcut ? '<div id="' + id + '-shortcut" class="' + prefix + 'menu-shortcut">' + shortcut + '</div>' : '') + (settings.menu ? '<div class="' + prefix + 'caret"></div>' : '') + (url ? '<div class="' + prefix + 'menu-item-link">' + url + '</div>' : '') + '</div>';
      },
      postRender: function () {
        var self = this, settings = self.settings;
        var textStyle = settings.textStyle;
        if (typeof textStyle === 'function') {
          textStyle = textStyle.call(this);
        }
        if (textStyle) {
          var textElm = self.getEl('text');
          if (textElm) {
            textElm.setAttribute('style', textStyle);
            self._textStyle = textStyle;
          }
        }
        self.on('mouseenter click', function (e) {
          if (e.control === self) {
            if (!settings.menu && e.type === 'click') {
              self.fire('select');
              global$7.requestAnimationFrame(function () {
                self.parent().hideAll();
              });
            } else {
              self.showMenu();
              if (e.aria) {
                self.menu.focus(true);
              }
            }
          }
        });
        self._super();
        return self;
      },
      hover: function () {
        var self = this;
        self.parent().items().each(function (ctrl) {
          ctrl.classes.remove('selected');
        });
        self.classes.toggle('selected', true);
        return self;
      },
      active: function (state) {
        toggleTextStyle(this, state);
        if (typeof state !== 'undefined') {
          this.aria('checked', state);
        }
        return this._super(state);
      },
      remove: function () {
        this._super();
        if (this.menu) {
          this.menu.remove();
        }
      }
    });

    var Radio = Checkbox.extend({
      Defaults: {
        classes: 'radio',
        role: 'radio'
      }
    });

    var ResizeHandle = Widget.extend({
      renderHtml: function () {
        var self = this, prefix = self.classPrefix;
        self.classes.add('resizehandle');
        if (self.settings.direction === 'both') {
          self.classes.add('resizehandle-both');
        }
        self.canFocus = false;
        return '<div id="' + self._id + '" class="' + self.classes + '">' + '<i class="' + prefix + 'ico ' + prefix + 'i-resize"></i>' + '</div>';
      },
      postRender: function () {
        var self = this;
        self._super();
        self.resizeDragHelper = new DragHelper(this._id, {
          start: function () {
            self.fire('ResizeStart');
          },
          drag: function (e) {
            if (self.settings.direction !== 'both') {
              e.deltaX = 0;
            }
            self.fire('Resize', e);
          },
          stop: function () {
            self.fire('ResizeEnd');
          }
        });
      },
      remove: function () {
        if (this.resizeDragHelper) {
          this.resizeDragHelper.destroy();
        }
        return this._super();
      }
    });

    function createOptions(options) {
      var strOptions = '';
      if (options) {
        for (var i = 0; i < options.length; i++) {
          strOptions += '<option value="' + options[i] + '">' + options[i] + '</option>';
        }
      }
      return strOptions;
    }
    var SelectBox = Widget.extend({
      Defaults: {
        classes: 'selectbox',
        role: 'selectbox',
        options: []
      },
      init: function (settings) {
        var self = this;
        self._super(settings);
        if (self.settings.size) {
          self.size = self.settings.size;
        }
        if (self.settings.options) {
          self._options = self.settings.options;
        }
        self.on('keydown', function (e) {
          var rootControl;
          if (e.keyCode === 13) {
            e.preventDefault();
            self.parents().reverse().each(function (ctrl) {
              if (ctrl.toJSON) {
                rootControl = ctrl;
                return false;
              }
            });
            self.fire('submit', { data: rootControl.toJSON() });
          }
        });
      },
      options: function (state) {
        if (!arguments.length) {
          return this.state.get('options');
        }
        this.state.set('options', state);
        return this;
      },
      renderHtml: function () {
        var self = this;
        var options, size = '';
        options = createOptions(self._options);
        if (self.size) {
          size = ' size = "' + self.size + '"';
        }
        return '<select id="' + self._id + '" class="' + self.classes + '"' + size + '>' + options + '</select>';
      },
      bindStates: function () {
        var self = this;
        self.state.on('change:options', function (e) {
          self.getEl().innerHTML = createOptions(e.value);
        });
        return self._super();
      }
    });

    function constrain(value, minVal, maxVal) {
      if (value < minVal) {
        value = minVal;
      }
      if (value > maxVal) {
        value = maxVal;
      }
      return value;
    }
    function setAriaProp(el, name, value) {
      el.setAttribute('aria-' + name, value);
    }
    function updateSliderHandle(ctrl, value) {
      var maxHandlePos, shortSizeName, sizeName, stylePosName, styleValue, handleEl;
      if (ctrl.settings.orientation === 'v') {
        stylePosName = 'top';
        sizeName = 'height';
        shortSizeName = 'h';
      } else {
        stylePosName = 'left';
        sizeName = 'width';
        shortSizeName = 'w';
      }
      handleEl = ctrl.getEl('handle');
      maxHandlePos = (ctrl.layoutRect()[shortSizeName] || 100) - funcs.getSize(handleEl)[sizeName];
      styleValue = maxHandlePos * ((value - ctrl._minValue) / (ctrl._maxValue - ctrl._minValue)) + 'px';
      handleEl.style[stylePosName] = styleValue;
      handleEl.style.height = ctrl.layoutRect().h + 'px';
      setAriaProp(handleEl, 'valuenow', value);
      setAriaProp(handleEl, 'valuetext', '' + ctrl.settings.previewFilter(value));
      setAriaProp(handleEl, 'valuemin', ctrl._minValue);
      setAriaProp(handleEl, 'valuemax', ctrl._maxValue);
    }
    var Slider = Widget.extend({
      init: function (settings) {
        var self = this;
        if (!settings.previewFilter) {
          settings.previewFilter = function (value) {
            return Math.round(value * 100) / 100;
          };
        }
        self._super(settings);
        self.classes.add('slider');
        if (settings.orientation === 'v') {
          self.classes.add('vertical');
        }
        self._minValue = isNumber(settings.minValue) ? settings.minValue : 0;
        self._maxValue = isNumber(settings.maxValue) ? settings.maxValue : 100;
        self._initValue = self.state.get('value');
      },
      renderHtml: function () {
        var self = this, id = self._id, prefix = self.classPrefix;
        return '<div id="' + id + '" class="' + self.classes + '">' + '<div id="' + id + '-handle" class="' + prefix + 'slider-handle" role="slider" tabindex="-1"></div>' + '</div>';
      },
      reset: function () {
        this.value(this._initValue).repaint();
      },
      postRender: function () {
        var self = this;
        var minValue, maxValue, screenCordName, stylePosName, sizeName, shortSizeName;
        function toFraction(min, max, val) {
          return (val + min) / (max - min);
        }
        function fromFraction(min, max, val) {
          return val * (max - min) - min;
        }
        function handleKeyboard(minValue, maxValue) {
          function alter(delta) {
            var value;
            value = self.value();
            value = fromFraction(minValue, maxValue, toFraction(minValue, maxValue, value) + delta * 0.05);
            value = constrain(value, minValue, maxValue);
            self.value(value);
            self.fire('dragstart', { value: value });
            self.fire('drag', { value: value });
            self.fire('dragend', { value: value });
          }
          self.on('keydown', function (e) {
            switch (e.keyCode) {
            case 37:
            case 38:
              alter(-1);
              break;
            case 39:
            case 40:
              alter(1);
              break;
            }
          });
        }
        function handleDrag(minValue, maxValue, handleEl) {
          var startPos, startHandlePos, maxHandlePos, handlePos, value;
          self._dragHelper = new DragHelper(self._id, {
            handle: self._id + '-handle',
            start: function (e) {
              startPos = e[screenCordName];
              startHandlePos = parseInt(self.getEl('handle').style[stylePosName], 10);
              maxHandlePos = (self.layoutRect()[shortSizeName] || 100) - funcs.getSize(handleEl)[sizeName];
              self.fire('dragstart', { value: value });
            },
            drag: function (e) {
              var delta = e[screenCordName] - startPos;
              handlePos = constrain(startHandlePos + delta, 0, maxHandlePos);
              handleEl.style[stylePosName] = handlePos + 'px';
              value = minValue + handlePos / maxHandlePos * (maxValue - minValue);
              self.value(value);
              self.tooltip().text('' + self.settings.previewFilter(value)).show().moveRel(handleEl, 'bc tc');
              self.fire('drag', { value: value });
            },
            stop: function () {
              self.tooltip().hide();
              self.fire('dragend', { value: value });
            }
          });
        }
        minValue = self._minValue;
        maxValue = self._maxValue;
        if (self.settings.orientation === 'v') {
          screenCordName = 'screenY';
          stylePosName = 'top';
          sizeName = 'height';
          shortSizeName = 'h';
        } else {
          screenCordName = 'screenX';
          stylePosName = 'left';
          sizeName = 'width';
          shortSizeName = 'w';
        }
        self._super();
        handleKeyboard(minValue, maxValue);
        handleDrag(minValue, maxValue, self.getEl('handle'));
      },
      repaint: function () {
        this._super();
        updateSliderHandle(this, this.value());
      },
      bindStates: function () {
        var self = this;
        self.state.on('change:value', function (e) {
          updateSliderHandle(self, e.value);
        });
        return self._super();
      }
    });

    var Spacer = Widget.extend({
      renderHtml: function () {
        var self = this;
        self.classes.add('spacer');
        self.canFocus = false;
        return '<div id="' + self._id + '" class="' + self.classes + '"></div>';
      }
    });

    var SplitButton = MenuButton.extend({
      Defaults: {
        classes: 'widget btn splitbtn',
        role: 'button'
      },
      repaint: function () {
        var self = this;
        var elm = self.getEl();
        var rect = self.layoutRect();
        var mainButtonElm, menuButtonElm;
        self._super();
        mainButtonElm = elm.firstChild;
        menuButtonElm = elm.lastChild;
        global$9(mainButtonElm).css({
          width: rect.w - funcs.getSize(menuButtonElm).width,
          height: rect.h - 2
        });
        global$9(menuButtonElm).css({ height: rect.h - 2 });
        return self;
      },
      activeMenu: function (state) {
        var self = this;
        global$9(self.getEl().lastChild).toggleClass(self.classPrefix + 'active', state);
      },
      renderHtml: function () {
        var self = this;
        var id = self._id;
        var prefix = self.classPrefix;
        var image;
        var icon = self.state.get('icon');
        var text = self.state.get('text');
        var settings = self.settings;
        var textHtml = '', ariaPressed;
        image = settings.image;
        if (image) {
          icon = 'none';
          if (typeof image !== 'string') {
            image = domGlobals.window.getSelection ? image[0] : image[1];
          }
          image = ' style="background-image: url(\'' + image + '\')"';
        } else {
          image = '';
        }
        icon = settings.icon ? prefix + 'ico ' + prefix + 'i-' + icon : '';
        if (text) {
          self.classes.add('btn-has-text');
          textHtml = '<span class="' + prefix + 'txt">' + self.encode(text) + '</span>';
        }
        ariaPressed = typeof settings.active === 'boolean' ? ' aria-pressed="' + settings.active + '"' : '';
        return '<div id="' + id + '" class="' + self.classes + '" role="button"' + ariaPressed + ' tabindex="-1">' + '<button type="button" hidefocus="1" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + '></i>' : '') + textHtml + '</button>' + '<button type="button" class="' + prefix + 'open" hidefocus="1" tabindex="-1">' + (self._menuBtnText ? (icon ? '\xA0' : '') + self._menuBtnText : '') + ' <i class="' + prefix + 'caret"></i>' + '</button>' + '</div>';
      },
      postRender: function () {
        var self = this, onClickHandler = self.settings.onclick;
        self.on('click', function (e) {
          var node = e.target;
          if (e.control === this) {
            while (node) {
              if (e.aria && e.aria.key !== 'down' || node.nodeName === 'BUTTON' && node.className.indexOf('open') === -1) {
                e.stopImmediatePropagation();
                if (onClickHandler) {
                  onClickHandler.call(this, e);
                }
                return;
              }
              node = node.parentNode;
            }
          }
        });
        delete self.settings.onclick;
        return self._super();
      }
    });

    var StackLayout = FlowLayout.extend({
      Defaults: {
        containerClass: 'stack-layout',
        controlClass: 'stack-layout-item',
        endClass: 'break'
      },
      isNative: function () {
        return true;
      }
    });

    var TabPanel = Panel.extend({
      Defaults: {
        layout: 'absolute',
        defaults: { type: 'panel' }
      },
      activateTab: function (idx) {
        var activeTabElm;
        if (this.activeTabId) {
          activeTabElm = this.getEl(this.activeTabId);
          global$9(activeTabElm).removeClass(this.classPrefix + 'active');
          activeTabElm.setAttribute('aria-selected', 'false');
        }
        this.activeTabId = 't' + idx;
        activeTabElm = this.getEl('t' + idx);
        activeTabElm.setAttribute('aria-selected', 'true');
        global$9(activeTabElm).addClass(this.classPrefix + 'active');
        this.items()[idx].show().fire('showtab');
        this.reflow();
        this.items().each(function (item, i) {
          if (idx !== i) {
            item.hide();
          }
        });
      },
      renderHtml: function () {
        var self = this;
        var layout = self._layout;
        var tabsHtml = '';
        var prefix = self.classPrefix;
        self.preRender();
        layout.preRender(self);
        self.items().each(function (ctrl, i) {
          var id = self._id + '-t' + i;
          ctrl.aria('role', 'tabpanel');
          ctrl.aria('labelledby', id);
          tabsHtml += '<div id="' + id + '" class="' + prefix + 'tab" ' + 'unselectable="on" role="tab" aria-controls="' + ctrl._id + '" aria-selected="false" tabIndex="-1">' + self.encode(ctrl.settings.title) + '</div>';
        });
        return '<div id="' + self._id + '" class="' + self.classes + '" hidefocus="1" tabindex="-1">' + '<div id="' + self._id + '-head" class="' + prefix + 'tabs" role="tablist">' + tabsHtml + '</div>' + '<div id="' + self._id + '-body" class="' + self.bodyClasses + '">' + layout.renderHtml(self) + '</div>' + '</div>';
      },
      postRender: function () {
        var self = this;
        self._super();
        self.settings.activeTab = self.settings.activeTab || 0;
        self.activateTab(self.settings.activeTab);
        this.on('click', function (e) {
          var targetParent = e.target.parentNode;
          if (targetParent && targetParent.id === self._id + '-head') {
            var i = targetParent.childNodes.length;
            while (i--) {
              if (targetParent.childNodes[i] === e.target) {
                self.activateTab(i);
              }
            }
          }
        });
      },
      initLayoutRect: function () {
        var self = this;
        var rect, minW, minH;
        minW = funcs.getSize(self.getEl('head')).width;
        minW = minW < 0 ? 0 : minW;
        minH = 0;
        self.items().each(function (item) {
          minW = Math.max(minW, item.layoutRect().minW);
          minH = Math.max(minH, item.layoutRect().minH);
        });
        self.items().each(function (ctrl) {
          ctrl.settings.x = 0;
          ctrl.settings.y = 0;
          ctrl.settings.w = minW;
          ctrl.settings.h = minH;
          ctrl.layoutRect({
            x: 0,
            y: 0,
            w: minW,
            h: minH
          });
        });
        var headH = funcs.getSize(self.getEl('head')).height;
        self.settings.minWidth = minW;
        self.settings.minHeight = minH + headH;
        rect = self._super();
        rect.deltaH += headH;
        rect.innerH = rect.h - rect.deltaH;
        return rect;
      }
    });

    var TextBox = Widget.extend({
      init: function (settings) {
        var self = this;
        self._super(settings);
        self.classes.add('textbox');
        if (settings.multiline) {
          self.classes.add('multiline');
        } else {
          self.on('keydown', function (e) {
            var rootControl;
            if (e.keyCode === 13) {
              e.preventDefault();
              self.parents().reverse().each(function (ctrl) {
                if (ctrl.toJSON) {
                  rootControl = ctrl;
                  return false;
                }
              });
              self.fire('submit', { data: rootControl.toJSON() });
            }
          });
          self.on('keyup', function (e) {
            self.state.set('value', e.target.value);
          });
        }
      },
      repaint: function () {
        var self = this;
        var style, rect, borderBox, borderW, borderH = 0, lastRepaintRect;
        style = self.getEl().style;
        rect = self._layoutRect;
        lastRepaintRect = self._lastRepaintRect || {};
        var doc = domGlobals.document;
        if (!self.settings.multiline && doc.all && (!doc.documentMode || doc.documentMode <= 8)) {
          style.lineHeight = rect.h - borderH + 'px';
        }
        borderBox = self.borderBox;
        borderW = borderBox.left + borderBox.right + 8;
        borderH = borderBox.top + borderBox.bottom + (self.settings.multiline ? 8 : 0);
        if (rect.x !== lastRepaintRect.x) {
          style.left = rect.x + 'px';
          lastRepaintRect.x = rect.x;
        }
        if (rect.y !== lastRepaintRect.y) {
          style.top = rect.y + 'px';
          lastRepaintRect.y = rect.y;
        }
        if (rect.w !== lastRepaintRect.w) {
          style.width = rect.w - borderW + 'px';
          lastRepaintRect.w = rect.w;
        }
        if (rect.h !== lastRepaintRect.h) {
          style.height = rect.h - borderH + 'px';
          lastRepaintRect.h = rect.h;
        }
        self._lastRepaintRect = lastRepaintRect;
        self.fire('repaint', {}, false);
        return self;
      },
      renderHtml: function () {
        var self = this;
        var settings = self.settings;
        var attrs, elm;
        attrs = {
          id: self._id,
          hidefocus: '1'
        };
        global$2.each([
          'rows',
          'spellcheck',
          'maxLength',
          'size',
          'readonly',
          'min',
          'max',
          'step',
          'list',
          'pattern',
          'placeholder',
          'required',
          'multiple'
        ], function (name) {
          attrs[name] = settings[name];
        });
        if (self.disabled()) {
          attrs.disabled = 'disabled';
        }
        if (settings.subtype) {
          attrs.type = settings.subtype;
        }
        elm = funcs.create(settings.multiline ? 'textarea' : 'input', attrs);
        elm.value = self.state.get('value');
        elm.className = self.classes.toString();
        return elm.outerHTML;
      },
      value: function (value) {
        if (arguments.length) {
          this.state.set('value', value);
          return this;
        }
        if (this.state.get('rendered')) {
          this.state.set('value', this.getEl().value);
        }
        return this.state.get('value');
      },
      postRender: function () {
        var self = this;
        self.getEl().value = self.state.get('value');
        self._super();
        self.$el.on('change', function (e) {
          self.state.set('value', e.target.value);
          self.fire('change', e);
        });
      },
      bindStates: function () {
        var self = this;
        self.state.on('change:value', function (e) {
          if (self.getEl().value !== e.value) {
            self.getEl().value = e.value;
          }
        });
        self.state.on('change:disabled', function (e) {
          self.getEl().disabled = e.value;
        });
        return self._super();
      },
      remove: function () {
        this.$el.off();
        this._super();
      }
    });

    var getApi = function () {
      return {
        Selector: Selector,
        Collection: Collection$2,
        ReflowQueue: ReflowQueue,
        Control: Control$1,
        Factory: global$4,
        KeyboardNavigation: KeyboardNavigation,
        Container: Container,
        DragHelper: DragHelper,
        Scrollable: Scrollable,
        Panel: Panel,
        Movable: Movable,
        Resizable: Resizable,
        FloatPanel: FloatPanel,
        Window: Window,
        MessageBox: MessageBox,
        Tooltip: Tooltip,
        Widget: Widget,
        Progress: Progress,
        Notification: Notification,
        Layout: Layout,
        AbsoluteLayout: AbsoluteLayout,
        Button: Button,
        ButtonGroup: ButtonGroup,
        Checkbox: Checkbox,
        ComboBox: ComboBox,
        ColorBox: ColorBox,
        PanelButton: PanelButton,
        ColorButton: ColorButton,
        ColorPicker: ColorPicker,
        Path: Path,
        ElementPath: ElementPath,
        FormItem: FormItem,
        Form: Form,
        FieldSet: FieldSet,
        FilePicker: FilePicker,
        FitLayout: FitLayout,
        FlexLayout: FlexLayout,
        FlowLayout: FlowLayout,
        FormatControls: FormatControls,
        GridLayout: GridLayout,
        Iframe: Iframe$1,
        InfoBox: InfoBox,
        Label: Label,
        Toolbar: Toolbar$1,
        MenuBar: MenuBar,
        MenuButton: MenuButton,
        MenuItem: MenuItem,
        Throbber: Throbber,
        Menu: Menu,
        ListBox: ListBox,
        Radio: Radio,
        ResizeHandle: ResizeHandle,
        SelectBox: SelectBox,
        Slider: Slider,
        Spacer: Spacer,
        SplitButton: SplitButton,
        StackLayout: StackLayout,
        TabPanel: TabPanel,
        TextBox: TextBox,
        DropZone: DropZone,
        BrowseButton: BrowseButton
      };
    };
    var appendTo = function (target) {
      if (target.ui) {
        global$2.each(getApi(), function (ref, key) {
          target.ui[key] = ref;
        });
      } else {
        target.ui = getApi();
      }
    };
    var registerToFactory = function () {
      global$2.each(getApi(), function (ref, key) {
        global$4.add(key, ref);
      });
    };
    var Api = {
      appendTo: appendTo,
      registerToFactory: registerToFactory
    };

    Api.registerToFactory();
    Api.appendTo(window.tinymce ? window.tinymce : {});
    global.add('modern', function (editor) {
      FormatControls.setup(editor);
      return ThemeApi.get(editor);
    });
    function Theme () {
    }

    return Theme;

}(window));
})();
                                                                                                                                                                                                                                                                                                                                                                                                                                             tinymce/themes/modern/theme.min.js                                                                  0000644                 00000377272 15212564050 0013231 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       !function(_){"use strict";var e,t,n,i,r=tinymce.util.Tools.resolve("tinymce.ThemeManager"),l=tinymce.util.Tools.resolve("tinymce.EditorManager"),w=tinymce.util.Tools.resolve("tinymce.util.Tools"),d=function(e){return!1!==c(e)},c=function(e){return e.getParam("menubar")},f=function(e){return e.getParam("toolbar_items_size")},h=function(e){return e.getParam("menu")},m=function(e){return!1===e.settings.skin},g=function(e){var t=e.getParam("resize","vertical");return!1===t?"none":"both"===t?"both":"vertical"},p=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),v=tinymce.util.Tools.resolve("tinymce.ui.Factory"),b=tinymce.util.Tools.resolve("tinymce.util.I18n"),o=function(e){return e.fire("SkinLoaded")},y=function(e){return e.fire("ResizeEditor")},x=function(e){return e.fire("BeforeRenderUI")},s=function(t,n){return function(){var e=t.find(n)[0];e&&e.focus(!0)}},R=function(e,t){e.shortcuts.add("Alt+F9","",s(t,"menubar")),e.shortcuts.add("Alt+F10,F10","",s(t,"toolbar")),e.shortcuts.add("Alt+F11","",s(t,"elementpath")),t.on("cancel",function(){e.focus()})},C=tinymce.util.Tools.resolve("tinymce.geom.Rect"),u=tinymce.util.Tools.resolve("tinymce.util.Delay"),E=function(){},k=function(e){return function(){return e}},a=k(!1),H=k(!0),S=function(){return T},T=(e=function(e){return e.isNone()},i={fold:function(e,t){return e()},is:a,isSome:a,isNone:H,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:k(null),getOrUndefined:k(undefined),or:n,orThunk:t,map:S,each:E,bind:S,exists:a,forall:H,filter:S,equals:e,equals_:e,toArray:function(){return[]},toString:k("none()")},Object.freeze&&Object.freeze(i),i),M=function(n){var e=k(n),t=function(){return r},i=function(e){return e(n)},r={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:H,isNone:a,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return M(e(n))},each:function(e){e(n)},bind:i,exists:i,forall:i,filter:function(e){return e(n)?r:T},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(a,function(e){return t(n,e)})}};return r},N={some:M,none:S,from:function(e){return null===e||e===undefined?T:M(e)}},P=function(e){return e?e.getRoot().uiContainer:null},W={getUiContainerDelta:function(e){var t=P(e);if(t&&"static"!==p.DOM.getStyle(t,"position",!0)){var n=p.DOM.getPos(t),i=t.scrollLeft-n.x,r=t.scrollTop-n.y;return N.some({x:i,y:r})}return N.none()},setUiContainer:function(e,t){var n=p.DOM.select(e.settings.ui_container)[0];t.getRoot().uiContainer=n},getUiContainer:P,inheritUiContainer:function(e,t){return t.uiContainer=P(e)}},D=function(i,e,r){var o,s=[];if(e)return w.each(e.split(/[ ,]/),function(t){var e,n=function(){var e=i.selection;t.settings.stateSelector&&e.selectorChanged(t.settings.stateSelector,function(e){t.active(e)},!0),t.settings.disabledStateSelector&&e.selectorChanged(t.settings.disabledStateSelector,function(e){t.disabled(e)})};"|"===t?o=null:(o||(o={type:"buttongroup",items:[]},s.push(o)),i.buttons[t]&&(e=t,"function"==typeof(t=i.buttons[e])&&(t=t()),t.type=t.type||"button",t.size=r,t=v.create(t),o.items.push(t),i.initialized?n():i.on("init",n)))}),{type:"toolbar",layout:"flow",items:s}},O=D,A=function(n,i){var e,t,r=[];if(w.each(!1===(t=(e=n).getParam("toolbar"))?[]:w.isArray(t)?w.grep(t,function(e){return 0<e.length}):function(e,t){for(var n=[],i=1;i<10;i++){var r=e["toolbar"+i];if(!r)break;n.push(r)}var o=e.toolbar?[e.toolbar]:[t];return 0<n.length?n:o}(e.settings,"undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"),function(e){var t;(t=e)&&r.push(D(n,t,i))}),r.length)return{type:"panel",layout:"stack",classes:"toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:r}},B=p.DOM,L=function(e){return{left:e.x,top:e.y,width:e.w,height:e.h,right:e.x+e.w,bottom:e.y+e.h}},z=function(e,t){e.moveTo(t.left,t.top)},I=function(e,t,n,i,r,o){return o=L({x:t,y:n,w:o.w,h:o.h}),e&&(o=e({elementRect:L(i),contentAreaRect:L(r),panelRect:o})),o},F=function(x){var i,o=function(){return x.contextToolbars||[]},n=function(e,t){var n,i,r,o,s,a,l,u=x.getParam("inline_toolbar_position_handler");if(!x.removed){if(!e||!e.toolbar.panel)return c=x,void w.each(c.contextToolbars,function(e){e.panel&&e.panel.hide()});var c,d,f,h,m;l=["bc-tc","tc-bc","tl-bl","bl-tl","tr-br","br-tr"],s=e.toolbar.panel,t&&s.show(),d=e.element,f=B.getPos(x.getContentAreaContainer()),h=x.dom.getRect(d),"BODY"===(m=x.dom.getRoot()).nodeName&&(h.x-=m.ownerDocument.documentElement.scrollLeft||m.scrollLeft,h.y-=m.ownerDocument.documentElement.scrollTop||m.scrollTop),h.x+=f.x,h.y+=f.y,r=h,i=B.getRect(s.getEl()),o=B.getRect(x.getContentAreaContainer()||x.getBody());var g,p,v,b=W.getUiContainerDelta(s).getOr({x:0,y:0});if(r.x+=b.x,r.y+=b.y,i.x+=b.x,i.y+=b.y,o.x+=b.x,o.y+=b.y,"inline"!==B.getStyle(e.element,"display",!0)){var y=e.element.getBoundingClientRect();r.w=y.width,r.h=y.height}x.inline||(o.w=x.getDoc().documentElement.offsetWidth),x.selection.controlSelection.isResizable(e.element)&&r.w<25&&(r=C.inflate(r,0,8)),n=C.findBestRelativePosition(i,r,o,l),r=C.clamp(r,o),n?(a=C.relativePosition(i,r,n),z(s,I(u,a.x,a.y,r,o,i))):(o.h+=i.h,(r=C.intersect(o,r))?(n=C.findBestRelativePosition(i,r,o,["bc-tc","bl-tl","br-tr"]))?(a=C.relativePosition(i,r,n),z(s,I(u,a.x,a.y,r,o,i))):z(s,I(u,r.x,r.y,r,o,i)):s.hide()),g=s,v=function(e,t){return e===t},p=(p=n)?p.substr(0,2):"",w.each({t:"down",b:"up"},function(e,t){g.classes.toggle("arrow-"+e,v(t,p.substr(0,1)))}),w.each({l:"left",r:"right"},function(e,t){g.classes.toggle("arrow-"+e,v(t,p.substr(1,1)))})}},r=function(e){return function(){u.requestAnimationFrame(function(){x.selection&&n(a(x.selection.getNode()),e)})}},t=function(e){var t;if(e.toolbar.panel)return e.toolbar.panel.show(),void n(e);t=v.create({type:"floatpanel",role:"dialog",classes:"tinymce tinymce-inline arrow",ariaLabel:"Inline toolbar",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!0,border:1,items:O(x,e.toolbar.items),oncancel:function(){x.focus()}}),W.setUiContainer(x,t),function(e){if(!i){var t=r(!0),n=W.getUiContainer(e);i=x.selection.getScrollContainer()||x.getWin(),B.bind(i,"scroll",t),B.bind(n,"scroll",t),x.on("remove",function(){B.unbind(i,"scroll",t),B.unbind(n,"scroll",t)})}}(t),(e.toolbar.panel=t).renderTo().reflow(),n(e)},s=function(){w.each(o(),function(e){e.panel&&e.panel.hide()})},a=function(e){var t,n,i,r=o();for(t=(i=x.$(e).parents().add(e)).length-1;0<=t;t--)for(n=r.length-1;0<=n;n--)if(r[n].predicate(i[t]))return{toolbar:r[n],element:i[t]};return null};x.on("click keyup setContent ObjectResized",function(e){("setcontent"!==e.type||e.selection)&&u.setEditorTimeout(x,function(){var e;(e=a(x.selection.getNode()))?(s(),t(e)):s()})}),x.on("blur hide contextmenu",s),x.on("ObjectResizeStart",function(){var e=a(x.selection.getNode());e&&e.toolbar.panel&&e.toolbar.panel.hide()}),x.on("ResizeEditor ResizeWindow",r(!0)),x.on("nodeChange",r(!1)),x.on("remove",function(){w.each(o(),function(e){e.panel&&e.panel.remove()}),x.contextToolbars={}}),x.shortcuts.add("ctrl+F9","",function(){var e=a(x.selection.getNode());e&&e.toolbar.panel&&e.toolbar.panel.items()[0].focus()})},U=function(t){return function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t}(e)===t}},V=U("array"),Y=U("function"),$=U("number"),q=(Array.prototype.slice,Array.prototype.indexOf),X=Array.prototype.push,j=function(e,t){var n,i,r=(n=e,i=t,q.call(n,i));return-1===r?N.none():N.some(r)},J=function(e,t){for(var n=0,i=e.length;n<i;n++)if(t(e[n],n))return!0;return!1},G=function(e,t){for(var n=e.length,i=new Array(n),r=0;r<n;r++){var o=e[r];i[r]=t(o,r)}return i},K=function(e,t){for(var n=0,i=e.length;n<i;n++)t(e[n],n)},Z=function(e,t){for(var n=[],i=0,r=e.length;i<r;i++){var o=e[i];t(o,i)&&n.push(o)}return n},Q=(Y(Array.from)&&Array.from,{file:{title:"File",items:"newdocument restoredraft | preview | print"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall"},view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen"},insert:{title:"Insert",items:"image link media template codesample inserttable | charmap hr | pagebreak nonbreaking anchor toc | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | blockformats align | removeformat"},tools:{title:"Tools",items:"spellchecker spellcheckerlanguage | a11ycheck code"},table:{title:"Table"},help:{title:"Help"}}),ee=function(e,t){return"|"===e?{name:"|",item:{text:"|"}}:t?{name:e,item:t}:null},te=function(e,t){return function(e,t){for(var n=0,i=e.length;n<i;n++)if(t(e[n],n))return N.some(n);return N.none()}(e,function(e){return e.name===t}).isSome()},ne=function(e){return e&&"|"===e.item.text},ie=function(n,e,t,i){var r,o,s,a,l,u,c;return e?(o=e[i],a=!0):o=Q[i],o&&(r={text:o.title},s=[],w.each((o.items||"").split(/[ ,]/),function(e){var t=ee(e,n[e]);t&&s.push(t)}),a||w.each(n,function(e,t){e.context!==i||te(s,t)||("before"===e.separator&&s.push({name:"|",item:{text:"|"}}),e.prependToContext?s.unshift(ee(t,e)):s.push(ee(t,e)),"after"===e.separator&&s.push({name:"|",item:{text:"|"}}))}),r.menu=G((l=t,u=Z(s,function(e){return!1===l.hasOwnProperty(e.name)}),c=Z(u,function(e,t){return!ne(e)||!ne(u[t-1])}),Z(c,function(e,t){return!ne(e)||0<t&&t<c.length-1})),function(e){return e.item}),!r.menu.length)?null:r},re=function(e){for(var t,n=[],i=function(e){var t,n=[],i=h(e);if(i)for(t in i)n.push(t);else for(t in Q)n.push(t);return n}(e),r=w.makeMap((t=e,t.getParam("removed_menuitems","")).split(/[ ,]/)),o=c(e),s="string"==typeof o?o.split(/[ ,]/):i,a=0;a<s.length;a++){var l=s[a],u=ie(e.menuItems,h(e),r,l);u&&n.push(u)}return n},oe=p.DOM,se=function(e){return{width:e.clientWidth,height:e.clientHeight}},ae=function(e,t,n){var i,r,o,s;i=e.getContainer(),r=e.getContentAreaContainer().firstChild,o=se(i),s=se(r),null!==t&&(t=Math.max(e.getParam("min_width",100,"number"),t),t=Math.min(e.getParam("max_width",65535,"number"),t),oe.setStyle(i,"width",t+(o.width-s.width)),oe.setStyle(r,"width",t)),n=Math.max(e.getParam("min_height",100,"number"),n),n=Math.min(e.getParam("max_height",65535,"number"),n),oe.setStyle(r,"height",n),y(e)},le=ae,ue=function(e,t,n){var i=e.getContentAreaContainer();ae(e,i.clientWidth+t,i.clientHeight+n)},ce=tinymce.util.Tools.resolve("tinymce.Env"),de=function(e,t,n){var i,r=e.settings[n];r&&r((i=t.getEl("body"),{element:function(){return i}}))},fe=function(c,d,f){return function(e){var t,n,i,r,o,s=e.control,a=s.parents().filter("panel")[0],l=a.find("#"+d)[0],u=(t=f,n=d,w.grep(t,function(e){return e.name===n})[0]);i=d,r=a,o=f,w.each(o,function(e){var t=r.items().filter("#"+e.name)[0];t&&t.visible()&&e.name!==i&&(de(e,t,"onhide"),t.visible(!1))}),s.parent().items().each(function(e){e.active(!1)}),l&&l.visible()?(de(u,l,"onhide"),l.hide(),s.active(!1)):(l?l.show():(l=v.create({type:"container",name:d,layout:"stack",classes:"sidebar-panel",html:""}),a.prepend(l),de(u,l,"onrender")),de(u,l,"onshow"),s.active(!0)),y(c)}},he=function(e){return!(ce.ie&&!(11<=ce.ie)||!e.sidebars)&&0<e.sidebars.length},me=function(n){return{type:"panel",name:"sidebar",layout:"stack",classes:"sidebar",items:[{type:"toolbar",layout:"stack",classes:"sidebar-toolbar",items:w.map(n.sidebars,function(e){var t=e.settings;return{type:"button",icon:t.icon,image:t.image,tooltip:t.tooltip,onclick:fe(n,e.name,n.sidebars)}})}]}},ge=function(e){var t=function(){e._skinLoaded=!0,o(e)};return function(){e.initialized?t():e.on("init",t)}},pe=p.DOM,ve=function(e){return{type:"panel",name:"iframe",layout:"stack",classes:"edit-area",border:e,html:""}},be=function(t,e,n){var i,r,o,s,a;if(!1===m(t)&&n.skinUiCss?pe.styleSheetLoader.load(n.skinUiCss,ge(t)):ge(t)(),i=e.panel=v.create({type:"panel",role:"application",classes:"tinymce",style:"visibility: hidden",layout:"stack",border:1,items:[{type:"container",classes:"top-part",items:[!1===d(t)?null:{type:"menubar",border:"0 0 1 0",items:re(t)},A(t,f(t))]},he(t)?(s=t,{type:"panel",layout:"stack",classes:"edit-aria-container",border:"1 0 0 0",items:[ve("0"),me(s)]}):ve("1 0 0 0")]}),W.setUiContainer(t,i),"none"!==g(t)&&(r={type:"resizehandle",direction:g(t),onResizeStart:function(){var e=t.getContentAreaContainer().firstChild;o={width:e.clientWidth,height:e.clientHeight}},onResize:function(e){"both"===g(t)?le(t,o.width+e.deltaX,o.height+e.deltaY):le(t,null,o.height+e.deltaY)}}),t.getParam("statusbar",!0,"boolean")){var l=b.translate(["Powered by {0}",'<a href="https://www.tiny.cloud/?utm_campaign=editor_referral&amp;utm_medium=poweredby&amp;utm_source=tinymce" rel="noopener" target="_blank" role="presentation" tabindex="-1">Tiny</a>']),u=t.getParam("branding",!0,"boolean")?{type:"label",classes:"branding",html:" "+l}:null;i.add({type:"panel",name:"statusbar",classes:"statusbar",layout:"flow",border:"1 0 0 0",ariaRoot:!0,items:[{type:"elementpath",editor:t},r,u]})}return x(t),t.on("SwitchMode",(a=i,function(e){a.find("*").disabled("readonly"===e.mode)})),i.renderBefore(n.targetNode).reflow(),t.getParam("readonly",!1,"boolean")&&t.setMode("readonly"),n.width&&pe.setStyle(i.getEl(),"width",n.width),t.on("remove",function(){i.remove(),i=null}),R(t,i),F(t),{iframeContainer:i.find("#iframe")[0].getEl(),editorContainer:i.getEl()}},ye=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),xe=0,we={id:function(){return"mceu_"+xe++},create:function(e,t,n){var i=_.document.createElement(e);return p.DOM.setAttribs(i,t),"string"==typeof n?i.innerHTML=n:w.each(n,function(e){e.nodeType&&i.appendChild(e)}),i},createFragment:function(e){return p.DOM.createFragment(e)},getWindowSize:function(){return p.DOM.getViewPort()},getSize:function(e){var t,n;if(e.getBoundingClientRect){var i=e.getBoundingClientRect();t=Math.max(i.width||i.right-i.left,e.offsetWidth),n=Math.max(i.height||i.bottom-i.bottom,e.offsetHeight)}else t=e.offsetWidth,n=e.offsetHeight;return{width:t,height:n}},getPos:function(e,t){return p.DOM.getPos(e,t||we.getContainer())},getContainer:function(){return ce.container?ce.container:_.document.body},getViewPort:function(e){return p.DOM.getViewPort(e)},get:function(e){return _.document.getElementById(e)},addClass:function(e,t){return p.DOM.addClass(e,t)},removeClass:function(e,t){return p.DOM.removeClass(e,t)},hasClass:function(e,t){return p.DOM.hasClass(e,t)},toggleClass:function(e,t,n){return p.DOM.toggleClass(e,t,n)},css:function(e,t,n){return p.DOM.setStyle(e,t,n)},getRuntimeStyle:function(e,t){return p.DOM.getStyle(e,t,!0)},on:function(e,t,n,i){return p.DOM.bind(e,t,n,i)},off:function(e,t,n){return p.DOM.unbind(e,t,n)},fire:function(e,t,n){return p.DOM.fire(e,t,n)},innerHtml:function(e,t){p.DOM.setHTML(e,t)}},_e=function(e){return"static"===we.getRuntimeStyle(e,"position")},Re=function(e){return e.state.get("fixed")};function Ce(e,t,n){var i,r,o,s,a,l,u,c,d,f;return d=Ee(),o=(r=we.getPos(t,W.getUiContainer(e))).x,s=r.y,Re(e)&&_e(_.document.body)&&(o-=d.x,s-=d.y),i=e.getEl(),a=(f=we.getSize(i)).width,l=f.height,u=(f=we.getSize(t)).width,c=f.height,"b"===(n=(n||"").split(""))[0]&&(s+=c),"r"===n[1]&&(o+=u),"c"===n[0]&&(s+=Math.round(c/2)),"c"===n[1]&&(o+=Math.round(u/2)),"b"===n[3]&&(s-=l),"r"===n[4]&&(o-=a),"c"===n[3]&&(s-=Math.round(l/2)),"c"===n[4]&&(o-=Math.round(a/2)),{x:o,y:s,w:a,h:l}}var Ee=function(){var e=_.window;return{x:Math.max(e.pageXOffset,_.document.body.scrollLeft,_.document.documentElement.scrollLeft),y:Math.max(e.pageYOffset,_.document.body.scrollTop,_.document.documentElement.scrollTop),w:e.innerWidth||_.document.documentElement.clientWidth,h:e.innerHeight||_.document.documentElement.clientHeight}},ke=function(e){var t,n=W.getUiContainer(e);return n&&!Re(e)?{x:0,y:0,w:(t=n).scrollWidth-1,h:t.scrollHeight-1}:Ee()},He={testMoveRel:function(e,t){for(var n=ke(this),i=0;i<t.length;i++){var r=Ce(this,e,t[i]);if(Re(this)){if(0<r.x&&r.x+r.w<n.w&&0<r.y&&r.y+r.h<n.h)return t[i]}else if(r.x>n.x&&r.x+r.w<n.w+n.x&&r.y>n.y&&r.y+r.h<n.h+n.y)return t[i]}return t[0]},moveRel:function(e,t){"string"!=typeof t&&(t=this.testMoveRel(e,t));var n=Ce(this,e,t);return this.moveTo(n.x,n.y)},moveBy:function(e,t){var n=this.layoutRect();return this.moveTo(n.x+e,n.y+t),this},moveTo:function(e,t){var n=this;function i(e,t,n){return e<0?0:t<e+n&&(e=t-n)<0?0:e}if(n.settings.constrainToViewport){var r=ke(this),o=n.layoutRect();e=i(e,r.w+r.x,o.w),t=i(t,r.h+r.y,o.h)}var s=W.getUiContainer(n);return s&&_e(s)&&!Re(n)&&(e-=s.scrollLeft,t-=s.scrollTop),s&&(e+=1,t+=1),n.state.get("rendered")?n.layoutRect({x:e,y:t}).repaint():(n.settings.x=e,n.settings.y=t),n.fire("move",{x:e,y:t}),n}},Se=tinymce.util.Tools.resolve("tinymce.util.Class"),Te=tinymce.util.Tools.resolve("tinymce.util.EventDispatcher"),Me=function(e){var t;if(e)return"number"==typeof e?{top:e=e||0,left:e,bottom:e,right:e}:(1===(t=(e=e.split(" ")).length)?e[1]=e[2]=e[3]=e[0]:2===t?(e[2]=e[0],e[3]=e[1]):3===t&&(e[3]=e[1]),{top:parseInt(e[0],10)||0,right:parseInt(e[1],10)||0,bottom:parseInt(e[2],10)||0,left:parseInt(e[3],10)||0})},Ne=function(i,e){function t(e){var t=parseFloat(function(e){var t=i.ownerDocument.defaultView;if(t){var n=t.getComputedStyle(i,null);return n?(e=e.replace(/[A-Z]/g,function(e){return"-"+e}),n.getPropertyValue(e)):null}return i.currentStyle[e]}(e));return isNaN(t)?0:t}return{top:t(e+"TopWidth"),right:t(e+"RightWidth"),bottom:t(e+"BottomWidth"),left:t(e+"LeftWidth")}};function Pe(){}function We(e){this.cls=[],this.cls._map={},this.onchange=e||Pe,this.prefix=""}w.extend(We.prototype,{add:function(e){return e&&!this.contains(e)&&(this.cls._map[e]=!0,this.cls.push(e),this._change()),this},remove:function(e){if(this.contains(e)){var t=void 0;for(t=0;t<this.cls.length&&this.cls[t]!==e;t++);this.cls.splice(t,1),delete this.cls._map[e],this._change()}return this},toggle:function(e,t){var n=this.contains(e);return n!==t&&(n?this.remove(e):this.add(e),this._change()),this},contains:function(e){return!!this.cls._map[e]},_change:function(){delete this.clsValue,this.onchange.call(this)}}),We.prototype.toString=function(){var e;if(this.clsValue)return this.clsValue;e="";for(var t=0;t<this.cls.length;t++)0<t&&(e+=" "),e+=this.prefix+this.cls[t];return e};var De,Oe,Ae,Be=/^([\w\\*]+)?(?:#([\w\-\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,Le=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,ze=/^\s*|\s*$/g,Ie=Se.extend({init:function(e){var o=this.match;function s(e,t,n){var i;function r(e){e&&t.push(e)}return r(function(t){if(t)return t=t.toLowerCase(),function(e){return"*"===t||e.type===t}}((i=Be.exec(e.replace(ze,"")))[1])),r(function(t){if(t)return function(e){return e._name===t}}(i[2])),r(function(n){if(n)return n=n.split("."),function(e){for(var t=n.length;t--;)if(!e.classes.contains(n[t]))return!1;return!0}}(i[3])),r(function(n,i,r){if(n)return function(e){var t=e[n]?e[n]():"";return i?"="===i?t===r:"*="===i?0<=t.indexOf(r):"~="===i?0<=(" "+t+" ").indexOf(" "+r+" "):"!="===i?t!==r:"^="===i?0===t.indexOf(r):"$="===i&&t.substr(t.length-r.length)===r:!!r}}(i[4],i[5],i[6])),r(function(i){var t;if(i)return(i=/(?:not\((.+)\))|(.+)/i.exec(i))[1]?(t=a(i[1],[]),function(e){return!o(e,t)}):(i=i[2],function(e,t,n){return"first"===i?0===t:"last"===i?t===n-1:"even"===i?t%2==0:"odd"===i?t%2==1:!!e[i]&&e[i]()})}(i[7])),t.pseudo=!!i[7],t.direct=n,t}function a(e,t){var n,i,r,o=[];do{if(Le.exec(""),(i=Le.exec(e))&&(e=i[3],o.push(i[1]),i[2])){n=i[3];break}}while(i);for(n&&a(n,t),e=[],r=0;r<o.length;r++)">"!==o[r]&&e.push(s(o[r],[],">"===o[r-1]));return t.push(e),t}this._selectors=a(e,[])},match:function(e,t){var n,i,r,o,s,a,l,u,c,d,f,h,m;for(n=0,i=(t=t||this._selectors).length;n<i;n++){for(m=e,h=0,r=(o=(s=t[n]).length)-1;0<=r;r--)for(u=s[r];m;){if(u.pseudo)for(c=d=(f=m.parent().items()).length;c--&&f[c]!==m;);for(a=0,l=u.length;a<l;a++)if(!u[a](m,c,d)){a=l+1;break}if(a===l){h++;break}if(r===o-1)break;m=m.parent()}if(h===o)return!0}return!1},find:function(e){var t,n,u=[],i=this._selectors;function c(e,t,n){var i,r,o,s,a,l=t[n];for(i=0,r=e.length;i<r;i++){for(a=e[i],o=0,s=l.length;o<s;o++)if(!l[o](a,i,r)){o=s+1;break}if(o===s)n===t.length-1?u.push(a):a.items&&c(a.items(),t,n+1);else if(l.direct)return;a.items&&c(a.items(),t,n)}}if(e.items){for(t=0,n=i.length;t<n;t++)c(e.items(),i[t],0);1<n&&(u=function(e){for(var t,n=[],i=e.length;i--;)(t=e[i]).__checked||(n.push(t),t.__checked=1);for(i=n.length;i--;)delete n[i].__checked;return n}(u))}return De||(De=Ie.Collection),new De(u)}}),Fe=Array.prototype.push,Ue=Array.prototype.slice;Ae={length:0,init:function(e){e&&this.add(e)},add:function(e){return w.isArray(e)?Fe.apply(this,e):e instanceof Oe?this.add(e.toArray()):Fe.call(this,e),this},set:function(e){var t,n=this,i=n.length;for(n.length=0,n.add(e),t=n.length;t<i;t++)delete n[t];return n},filter:function(t){var e,n,i,r,o=[];for("string"==typeof t?(t=new Ie(t),r=function(e){return t.match(e)}):r=t,e=0,n=this.length;e<n;e++)r(i=this[e])&&o.push(i);return new Oe(o)},slice:function(){return new Oe(Ue.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},each:function(e){return w.each(this,e),this},toArray:function(){return w.toArray(this)},indexOf:function(e){for(var t=this.length;t--&&this[t]!==e;);return t},reverse:function(){return new Oe(w.toArray(this).reverse())},hasClass:function(e){return!!this[0]&&this[0].classes.contains(e)},prop:function(t,n){var e;return n!==undefined?(this.each(function(e){e[t]&&e[t](n)}),this):(e=this[0])&&e[t]?e[t]():void 0},exec:function(t){var n=w.toArray(arguments).slice(1);return this.each(function(e){e[t]&&e[t].apply(e,n)}),this},remove:function(){for(var e=this.length;e--;)this[e].remove();return this},addClass:function(t){return this.each(function(e){e.classes.add(t)})},removeClass:function(t){return this.each(function(e){e.classes.remove(t)})}},w.each("fire on off show hide append prepend before after reflow".split(" "),function(n){Ae[n]=function(){var t=w.toArray(arguments);return this.each(function(e){n in e&&e[n].apply(e,t)}),this}}),w.each("text name disabled active selected checked visible parent value data".split(" "),function(t){Ae[t]=function(e){return this.prop(t,e)}}),Oe=Se.extend(Ae);var Ve=Ie.Collection=Oe,Ye=function(e){this.create=e.create};Ye.create=function(r,o){return new Ye({create:function(t,n){var i,e=function(e){t.set(n,e.value)};return t.on("change:"+n,function(e){r.set(o,e.value)}),r.on("change:"+o,e),(i=t._bindings)||(i=t._bindings=[],t.on("destroy",function(){for(var e=i.length;e--;)i[e]()})),i.push(function(){r.off("change:"+o,e)}),r.get(o)}})};var $e=tinymce.util.Tools.resolve("tinymce.util.Observable");function qe(e){return 0<e.nodeType}var Xe,je,Je=Se.extend({Mixins:[$e],init:function(e){var t,n;for(t in e=e||{})(n=e[t])instanceof Ye&&(e[t]=n.create(this,t));this.data=e},set:function(t,n){var i,r,o=this.data[t];if(n instanceof Ye&&(n=n.create(this,t)),"object"==typeof t){for(i in t)this.set(i,t[i]);return this}return function e(t,n){var i,r;if(t===n)return!0;if(null===t||null===n)return t===n;if("object"!=typeof t||"object"!=typeof n)return t===n;if(w.isArray(n)){if(t.length!==n.length)return!1;for(i=t.length;i--;)if(!e(t[i],n[i]))return!1}if(qe(t)||qe(n))return t===n;for(i in r={},n){if(!e(t[i],n[i]))return!1;r[i]=!0}for(i in t)if(!r[i]&&!e(t[i],n[i]))return!1;return!0}(o,n)||(this.data[t]=n,r={target:this,name:t,value:n,oldValue:o},this.fire("change:"+t,r),this.fire("change",r)),this},get:function(e){return this.data[e]},has:function(e){return e in this.data},bind:function(e){return Ye.create(this,e)},destroy:function(){this.fire("destroy")}}),Ge={},Ke={add:function(e){var t=e.parent();if(t){if(!t._layout||t._layout.isNative())return;Ge[t._id]||(Ge[t._id]=t),Xe||(Xe=!0,u.requestAnimationFrame(function(){var e,t;for(e in Xe=!1,Ge)(t=Ge[e]).state.get("rendered")&&t.reflow();Ge={}},_.document.body))}},remove:function(e){Ge[e._id]&&delete Ge[e._id]}},Ze="onmousewheel"in _.document,Qe=!1,et=0,tt={Statics:{classPrefix:"mce-"},isRtl:function(){return je.rtl},classPrefix:"mce-",init:function(t){var e,n,i=this;function r(e){var t;for(e=e.split(" "),t=0;t<e.length;t++)i.classes.add(e[t])}i.settings=t=w.extend({},i.Defaults,t),i._id=t.id||"mceu_"+et++,i._aria={role:t.role},i._elmCache={},i.$=ye,i.state=new Je({visible:!0,active:!1,disabled:!1,value:""}),i.data=new Je(t.data),i.classes=new We(function(){i.state.get("rendered")&&(i.getEl().className=this.toString())}),i.classes.prefix=i.classPrefix,(e=t.classes)&&(i.Defaults&&(n=i.Defaults.classes)&&e!==n&&r(n),r(e)),w.each("title text name visible disabled active value".split(" "),function(e){e in t&&i[e](t[e])}),i.on("click",function(){if(i.disabled())return!1}),i.settings=t,i.borderBox=Me(t.border),i.paddingBox=Me(t.padding),i.marginBox=Me(t.margin),t.hidden&&i.hide()},Properties:"parent,name",getContainerElm:function(){var e=W.getUiContainer(this);return e||we.getContainer()},getParentCtrl:function(e){for(var t,n=this.getRoot().controlIdLookup;e&&n&&!(t=n[e.id]);)e=e.parentNode;return t},initLayoutRect:function(){var e,t,n,i,r,o,s,a,l,u,c=this,d=c.settings,f=c.getEl();e=c.borderBox=c.borderBox||Ne(f,"border"),c.paddingBox=c.paddingBox||Ne(f,"padding"),c.marginBox=c.marginBox||Ne(f,"margin"),u=we.getSize(f),a=d.minWidth,l=d.minHeight,r=a||u.width,o=l||u.height,n=d.width,i=d.height,s=void 0!==(s=d.autoResize)?s:!n&&!i,n=n||r,i=i||o;var h=e.left+e.right,m=e.top+e.bottom,g=d.maxWidth||65535,p=d.maxHeight||65535;return c._layoutRect=t={x:d.x||0,y:d.y||0,w:n,h:i,deltaW:h,deltaH:m,contentW:n-h,contentH:i-m,innerW:n-h,innerH:i-m,startMinWidth:a||0,startMinHeight:l||0,minW:Math.min(r,g),minH:Math.min(o,p),maxW:g,maxH:p,autoResize:s,scrollW:0},c._lastLayoutRect={},t},layoutRect:function(e){var t,n,i,r,o,s=this,a=s._layoutRect;return a||(a=s.initLayoutRect()),e?(i=a.deltaW,r=a.deltaH,e.x!==undefined&&(a.x=e.x),e.y!==undefined&&(a.y=e.y),e.minW!==undefined&&(a.minW=e.minW),e.minH!==undefined&&(a.minH=e.minH),(n=e.w)!==undefined&&(n=(n=n<a.minW?a.minW:n)>a.maxW?a.maxW:n,a.w=n,a.innerW=n-i),(n=e.h)!==undefined&&(n=(n=n<a.minH?a.minH:n)>a.maxH?a.maxH:n,a.h=n,a.innerH=n-r),(n=e.innerW)!==undefined&&(n=(n=n<a.minW-i?a.minW-i:n)>a.maxW-i?a.maxW-i:n,a.innerW=n,a.w=n+i),(n=e.innerH)!==undefined&&(n=(n=n<a.minH-r?a.minH-r:n)>a.maxH-r?a.maxH-r:n,a.innerH=n,a.h=n+r),e.contentW!==undefined&&(a.contentW=e.contentW),e.contentH!==undefined&&(a.contentH=e.contentH),(t=s._lastLayoutRect).x===a.x&&t.y===a.y&&t.w===a.w&&t.h===a.h||((o=je.repaintControls)&&o.map&&!o.map[s._id]&&(o.push(s),o.map[s._id]=!0),t.x=a.x,t.y=a.y,t.w=a.w,t.h=a.h),s):a},repaint:function(){var e,t,n,i,r,o,s,a,l,u,c=this;l=_.document.createRange?function(e){return e}:Math.round,e=c.getEl().style,i=c._layoutRect,a=c._lastRepaintRect||{},o=(r=c.borderBox).left+r.right,s=r.top+r.bottom,i.x!==a.x&&(e.left=l(i.x)+"px",a.x=i.x),i.y!==a.y&&(e.top=l(i.y)+"px",a.y=i.y),i.w!==a.w&&(u=l(i.w-o),e.width=(0<=u?u:0)+"px",a.w=i.w),i.h!==a.h&&(u=l(i.h-s),e.height=(0<=u?u:0)+"px",a.h=i.h),c._hasBody&&i.innerW!==a.innerW&&(u=l(i.innerW),(n=c.getEl("body"))&&((t=n.style).width=(0<=u?u:0)+"px"),a.innerW=i.innerW),c._hasBody&&i.innerH!==a.innerH&&(u=l(i.innerH),(n=n||c.getEl("body"))&&((t=t||n.style).height=(0<=u?u:0)+"px"),a.innerH=i.innerH),c._lastRepaintRect=a,c.fire("repaint",{},!1)},updateLayoutRect:function(){var e=this;e.parent()._lastRect=null,we.css(e.getEl(),{width:"",height:""}),e._layoutRect=e._lastRepaintRect=e._lastLayoutRect=null,e.initLayoutRect()},on:function(e,t){var n,i,r,o=this;return nt(o).on(e,"string"!=typeof(n=t)?n:function(e){return i||o.parentsAndSelf().each(function(e){var t=e.settings.callbacks;if(t&&(i=t[n]))return r=e,!1}),i?i.call(r,e):(e.action=n,void this.fire("execute",e))}),o},off:function(e,t){return nt(this).off(e,t),this},fire:function(e,t,n){if((t=t||{}).control||(t.control=this),t=nt(this).fire(e,t),!1!==n&&this.parent)for(var i=this.parent();i&&!t.isPropagationStopped();)i.fire(e,t,!1),i=i.parent();return t},hasEventListeners:function(e){return nt(this).has(e)},parents:function(e){var t,n=new Ve;for(t=this.parent();t;t=t.parent())n.add(t);return e&&(n=n.filter(e)),n},parentsAndSelf:function(e){return new Ve(this).add(this.parents(e))},next:function(){var e=this.parent().items();return e[e.indexOf(this)+1]},prev:function(){var e=this.parent().items();return e[e.indexOf(this)-1]},innerHtml:function(e){return this.$el.html(e),this},getEl:function(e){var t=e?this._id+"-"+e:this._id;return this._elmCache[t]||(this._elmCache[t]=ye("#"+t)[0]),this._elmCache[t]},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(e){}return this},blur:function(){return this.getEl().blur(),this},aria:function(e,t){var n=this,i=n.getEl(n.ariaTarget);return void 0===t?n._aria[e]:(n._aria[e]=t,n.state.get("rendered")&&i.setAttribute("role"===e?e:"aria-"+e,t),n)},encode:function(e,t){return!1!==t&&(e=this.translate(e)),(e||"").replace(/[&<>"]/g,function(e){return"&#"+e.charCodeAt(0)+";"})},translate:function(e){return je.translate?je.translate(e):e},before:function(e){var t=this.parent();return t&&t.insert(e,t.items().indexOf(this),!0),this},after:function(e){var t=this.parent();return t&&t.insert(e,t.items().indexOf(this)),this},remove:function(){var t,e,n=this,i=n.getEl(),r=n.parent();if(n.items){var o=n.items().toArray();for(e=o.length;e--;)o[e].remove()}r&&r.items&&(t=[],r.items().each(function(e){e!==n&&t.push(e)}),r.items().set(t),r._lastRect=null),n._eventsRoot&&n._eventsRoot===n&&ye(i).off();var s=n.getRoot().controlIdLookup;return s&&delete s[n._id],i&&i.parentNode&&i.parentNode.removeChild(i),n.state.set("rendered",!1),n.state.destroy(),n.fire("remove"),n},renderBefore:function(e){return ye(e).before(this.renderHtml()),this.postRender(),this},renderTo:function(e){return ye(e||this.getContainerElm()).append(this.renderHtml()),this.postRender(),this},preRender:function(){},render:function(){},renderHtml:function(){return'<div id="'+this._id+'" class="'+this.classes+'"></div>'},postRender:function(){var e,t,n,i,r,o=this,s=o.settings;for(i in o.$el=ye(o.getEl()),o.state.set("rendered",!0),s)0===i.indexOf("on")&&o.on(i.substr(2),s[i]);if(o._eventsRoot){for(n=o.parent();!r&&n;n=n.parent())r=n._eventsRoot;if(r)for(i in r._nativeEvents)o._nativeEvents[i]=!0}it(o),s.style&&(e=o.getEl())&&(e.setAttribute("style",s.style),e.style.cssText=s.style),o.settings.border&&(t=o.borderBox,o.$el.css({"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left}));var a=o.getRoot();for(var l in a.controlIdLookup||(a.controlIdLookup={}),(a.controlIdLookup[o._id]=o)._aria)o.aria(l,o._aria[l]);!1===o.state.get("visible")&&(o.getEl().style.display="none"),o.bindStates(),o.state.on("change:visible",function(e){var t,n=e.value;o.state.get("rendered")&&(o.getEl().style.display=!1===n?"none":"",o.getEl().getBoundingClientRect()),(t=o.parent())&&(t._lastRect=null),o.fire(n?"show":"hide"),Ke.add(o)}),o.fire("postrender",{},!1)},bindStates:function(){},scrollIntoView:function(e){var t,n,i,r,o,s,a=this.getEl(),l=a.parentNode,u=function(e,t){var n,i,r=e;for(n=i=0;r&&r!==t&&r.nodeType;)n+=r.offsetLeft||0,i+=r.offsetTop||0,r=r.offsetParent;return{x:n,y:i}}(a,l);return t=u.x,n=u.y,i=a.offsetWidth,r=a.offsetHeight,o=l.clientWidth,s=l.clientHeight,"end"===e?(t-=o-i,n-=s-r):"center"===e&&(t-=o/2-i/2,n-=s/2-r/2),l.scrollLeft=t,l.scrollTop=n,this},getRoot:function(){for(var e,t=this,n=[];t;){if(t.rootControl){e=t.rootControl;break}n.push(t),t=(e=t).parent()}e||(e=this);for(var i=n.length;i--;)n[i].rootControl=e;return e},reflow:function(){Ke.remove(this);var e=this.parent();return e&&e._layout&&!e._layout.isNative()&&e.reflow(),this}};function nt(n){return n._eventDispatcher||(n._eventDispatcher=new Te({scope:n,toggleEvent:function(e,t){t&&Te.isNative(e)&&(n._nativeEvents||(n._nativeEvents={}),n._nativeEvents[e]=!0,n.state.get("rendered")&&it(n))}})),n._eventDispatcher}function it(a){var e,t,n,l,i,r;function o(e){var t=a.getParentCtrl(e.target);t&&t.fire(e.type,e)}function s(){var e=l._lastHoverCtrl;e&&(e.fire("mouseleave",{target:e.getEl()}),e.parents().each(function(e){e.fire("mouseleave",{target:e.getEl()})}),l._lastHoverCtrl=null)}function u(e){var t,n,i,r=a.getParentCtrl(e.target),o=l._lastHoverCtrl,s=0;if(r!==o){if((n=(l._lastHoverCtrl=r).parents().toArray().reverse()).push(r),o){for((i=o.parents().toArray().reverse()).push(o),s=0;s<i.length&&n[s]===i[s];s++);for(t=i.length-1;s<=t;t--)(o=i[t]).fire("mouseleave",{target:o.getEl()})}for(t=s;t<n.length;t++)(r=n[t]).fire("mouseenter",{target:r.getEl()})}}function c(e){e.preventDefault(),"mousewheel"===e.type?(e.deltaY=-.025*e.wheelDelta,e.wheelDeltaX&&(e.deltaX=-.025*e.wheelDeltaX)):(e.deltaX=0,e.deltaY=e.detail),e=a.fire("wheel",e)}if(i=a._nativeEvents){for((n=a.parents().toArray()).unshift(a),e=0,t=n.length;!l&&e<t;e++)l=n[e]._eventsRoot;for(l||(l=n[n.length-1]||a),a._eventsRoot=l,t=e,e=0;e<t;e++)n[e]._eventsRoot=l;var d=l._delegates;for(r in d||(d=l._delegates={}),i){if(!i)return!1;"wheel"!==r||Qe?("mouseenter"===r||"mouseleave"===r?l._hasMouseEnter||(ye(l.getEl()).on("mouseleave",s).on("mouseover",u),l._hasMouseEnter=1):d[r]||(ye(l.getEl()).on(r,o),d[r]=!0),i[r]=!1):Ze?ye(a.getEl()).on("mousewheel",c):ye(a.getEl()).on("DOMMouseScroll",c)}}}w.each("text title visible disabled active value".split(" "),function(t){tt[t]=function(e){return 0===arguments.length?this.state.get(t):(void 0!==e&&this.state.set(t,e),this)}});var rt=je=Se.extend(tt),ot=function(e){return!!e.getAttribute("data-mce-tabstop")};function st(e){var o,r,n=e.root;function i(e){return e&&1===e.nodeType}try{o=_.document.activeElement}catch(t){o=_.document.body}function s(e){return i(e=e||o)?e.getAttribute("role"):null}function a(e){for(var t,n=e||o;n=n.parentNode;)if(t=s(n))return t}function l(e){var t=o;if(i(t))return t.getAttribute("aria-"+e)}function u(e){var t=e.tagName.toUpperCase();return"INPUT"===t||"TEXTAREA"===t||"SELECT"===t}function c(t){var r=[];return function e(t){if(1===t.nodeType&&"none"!==t.style.display&&!t.disabled){var n;(u(n=t)&&!n.hidden||ot(n)||/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(s(n)))&&r.push(t);for(var i=0;i<t.childNodes.length;i++)e(t.childNodes[i])}}(t||n.getEl()),r}function d(e){var t,n;(n=(e=e||r).parents().toArray()).unshift(e);for(var i=0;i<n.length&&!(t=n[i]).settings.ariaRoot;i++);return t}function f(e,t){return e<0?e=t.length-1:e>=t.length&&(e=0),t[e]&&t[e].focus(),e}function h(e,t){var n=-1,i=d();t=t||c(i.getEl());for(var r=0;r<t.length;r++)t[r]===o&&(n=r);n+=e,i.lastAriaIndex=f(n,t)}function m(){"tablist"===a()?h(-1,c(o.parentNode)):r.parent().submenu?b():h(-1)}function g(){var e=s(),t=a();"tablist"===t?h(1,c(o.parentNode)):"menuitem"===e&&"menu"===t&&l("haspopup")?y():h(1)}function p(){h(-1)}function v(){var e=s(),t=a();"menuitem"===e&&"menubar"===t?y():"button"===e&&l("haspopup")?y({key:"down"}):h(1)}function b(){r.fire("cancel")}function y(e){e=e||{},r.fire("click",{target:o,aria:e})}return r=n.getParentCtrl(o),n.on("keydown",function(e){function t(e,t){u(o)||ot(o)||"slider"!==s(o)&&!1!==t(e)&&e.preventDefault()}if(!e.isDefaultPrevented())switch(e.keyCode){case 37:t(e,m);break;case 39:t(e,g);break;case 38:t(e,p);break;case 40:t(e,v);break;case 27:b();break;case 14:case 13:case 32:t(e,y);break;case 9:!function(e){if("tablist"===a()){var t=c(r.getEl("body"))[0];t&&t.focus()}else h(e.shiftKey?-1:1)}(e),e.preventDefault()}}),n.on("focusin",function(e){o=e.target,r=e.control}),{focusFirst:function(e){var t=d(e),n=c(t.getEl());t.settings.ariaRemember&&"lastAriaIndex"in t?f(t.lastAriaIndex,n):f(0,n)}}}var at={},lt=rt.extend({init:function(e){var t=this;t._super(e),(e=t.settings).fixed&&t.state.set("fixed",!0),t._items=new Ve,t.isRtl()&&t.classes.add("rtl"),t.bodyClasses=new We(function(){t.state.get("rendered")&&(t.getEl("body").className=this.toString())}),t.bodyClasses.prefix=t.classPrefix,t.classes.add("container"),t.bodyClasses.add("container-body"),e.containerCls&&t.classes.add(e.containerCls),t._layout=v.create((e.layout||"")+"layout"),t.settings.items?t.add(t.settings.items):t.add(t.render()),t._hasBody=!0},items:function(){return this._items},find:function(e){return(e=at[e]=at[e]||new Ie(e)).find(this)},add:function(e){return this.items().add(this.create(e)).parent(this),this},focus:function(e){var t,n,i,r=this;if(!e||!(n=r.keyboardNav||r.parents().eq(-1)[0].keyboardNav))return i=r.find("*"),r.statusbar&&i.add(r.statusbar.items()),i.each(function(e){if(e.settings.autofocus)return t=null,!1;e.canFocus&&(t=t||e)}),t&&t.focus(),r;n.focusFirst(r)},replace:function(e,t){for(var n,i=this.items(),r=i.length;r--;)if(i[r]===e){i[r]=t;break}0<=r&&((n=t.getEl())&&n.parentNode.removeChild(n),(n=e.getEl())&&n.parentNode.removeChild(n)),t.parent(this)},create:function(e){var t,n=this,i=[];return w.isArray(e)||(e=[e]),w.each(e,function(e){e&&(e instanceof rt||("string"==typeof e&&(e={type:e}),t=w.extend({},n.settings.defaults,e),e.type=t.type=t.type||e.type||n.settings.defaultType||(t.defaults?t.defaults.type:null),e=v.create(t)),i.push(e))}),i},renderNew:function(){var i=this;return i.items().each(function(e,t){var n;e.parent(i),e.state.get("rendered")||((n=i.getEl("body")).hasChildNodes()&&t<=n.childNodes.length-1?ye(n.childNodes[t]).before(e.renderHtml()):ye(n).append(e.renderHtml()),e.postRender(),Ke.add(e))}),i._layout.applyClasses(i.items().filter(":visible")),i._lastRect=null,i},append:function(e){return this.add(e).renderNew()},prepend:function(e){return this.items().set(this.create(e).concat(this.items().toArray())),this.renderNew()},insert:function(e,t,n){var i,r,o;return e=this.create(e),i=this.items(),!n&&t<i.length-1&&(t+=1),0<=t&&t<i.length&&(r=i.slice(0,t).toArray(),o=i.slice(t).toArray(),i.set(r.concat(e,o))),this.renderNew()},fromJSON:function(e){for(var t in e)this.find("#"+t).value(e[t]);return this},toJSON:function(){var i={};return this.find("*").each(function(e){var t=e.name(),n=e.value();t&&void 0!==n&&(i[t]=n)}),i},renderHtml:function(){var e=this,t=e._layout,n=this.settings.role;return e.preRender(),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes+'"'+(n?' role="'+this.settings.role+'"':"")+'><div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"},postRender:function(){var e,t=this;return t.items().exec("postRender"),t._super(),t._layout.postRender(t),t.state.set("rendered",!0),t.settings.style&&t.$el.css(t.settings.style),t.settings.border&&(e=t.borderBox,t.$el.css({"border-top-width":e.top,"border-right-width":e.right,"border-bottom-width":e.bottom,"border-left-width":e.left})),t.parent()||(t.keyboardNav=st({root:t})),t},initLayoutRect:function(){var e=this._super();return this._layout.recalc(this),e},recalc:function(){var e=this,t=e._layoutRect,n=e._lastRect;if(!n||n.w!==t.w||n.h!==t.h)return e._layout.recalc(e),t=e.layoutRect(),e._lastRect={x:t.x,y:t.y,w:t.w,h:t.h},!0},reflow:function(){var e;if(Ke.remove(this),this.visible()){for(rt.repaintControls=[],rt.repaintControls.map={},this.recalc(),e=rt.repaintControls.length;e--;)rt.repaintControls[e].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),rt.repaintControls=[]}return this}});function ut(e){var t,n;if(e.changedTouches)for(t="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n<t.length;n++)e[t[n]]=e.changedTouches[0][t[n]]}function ct(e,h){var m,g,t,p,v,b,y,x=h.document||_.document;h=h||{};var w=x.getElementById(h.handle||e);t=function(e){var t,n,i,r,o,s,a,l,u,c,d,f=(t=x,u=Math.max,n=t.documentElement,i=t.body,r=u(n.scrollWidth,i.scrollWidth),o=u(n.clientWidth,i.clientWidth),s=u(n.offsetWidth,i.offsetWidth),a=u(n.scrollHeight,i.scrollHeight),l=u(n.clientHeight,i.clientHeight),{width:r<s?o:r,height:a<u(n.offsetHeight,i.offsetHeight)?l:a});ut(e),e.preventDefault(),g=e.button,c=w,b=e.screenX,y=e.screenY,d=_.window.getComputedStyle?_.window.getComputedStyle(c,null).getPropertyValue("cursor"):c.runtimeStyle.cursor,m=ye("<div></div>").css({position:"absolute",top:0,left:0,width:f.width,height:f.height,zIndex:2147483647,opacity:1e-4,cursor:d}).appendTo(x.body),ye(x).on("mousemove touchmove",v).on("mouseup touchend",p),h.start(e)},v=function(e){if(ut(e),e.button!==g)return p(e);e.deltaX=e.screenX-b,e.deltaY=e.screenY-y,e.preventDefault(),h.drag(e)},p=function(e){ut(e),ye(x).off("mousemove touchmove",v).off("mouseup touchend",p),m.remove(),h.stop&&h.stop(e)},this.destroy=function(){ye(w).off()},ye(w).on("mousedown touchstart",t)}var dt,ft,ht,mt,gt={init:function(){this.on("repaint",this.renderScroll)},renderScroll:function(){var p=this,v=2;function n(){var m,g,e;function t(e,t,n,i,r,o){var s,a,l,u,c,d,f,h;if(a=p.getEl("scroll"+e)){if(f=t.toLowerCase(),h=n.toLowerCase(),ye(p.getEl("absend")).css(f,p.layoutRect()[i]-1),!r)return void ye(a).css("display","none");ye(a).css("display","block"),s=p.getEl("body"),l=p.getEl("scroll"+e+"t"),u=s["client"+n]-2*v,c=(u-=m&&g?a["client"+o]:0)/s["scroll"+n],(d={})[f]=s["offset"+t]+v,d[h]=u,ye(a).css(d),(d={})[f]=s["scroll"+t]*c,d[h]=u*c,ye(l).css(d)}}e=p.getEl("body"),m=e.scrollWidth>e.clientWidth,g=e.scrollHeight>e.clientHeight,t("h","Left","Width","contentW",m,"Height"),t("v","Top","Height","contentH",g,"Width")}p.settings.autoScroll&&(p._hasScroll||(p._hasScroll=!0,function(){function e(s,a,l,u,c){var d,e=p._id+"-scroll"+s,t=p.classPrefix;ye(p.getEl()).append('<div id="'+e+'" class="'+t+"scrollbar "+t+"scrollbar-"+s+'"><div id="'+e+'t" class="'+t+'scrollbar-thumb"></div></div>'),p.draghelper=new ct(e+"t",{start:function(){d=p.getEl("body")["scroll"+a],ye("#"+e).addClass(t+"active")},drag:function(e){var t,n,i,r,o=p.layoutRect();n=o.contentW>o.innerW,i=o.contentH>o.innerH,r=p.getEl("body")["client"+l]-2*v,t=(r-=n&&i?p.getEl("scroll"+s)["client"+c]:0)/p.getEl("body")["scroll"+l],p.getEl("body")["scroll"+a]=d+e["delta"+u]/t},stop:function(){ye("#"+e).removeClass(t+"active")}})}p.classes.add("scroll"),e("v","Top","Height","Y","Width"),e("h","Left","Width","X","Height")}(),p.on("wheel",function(e){var t=p.getEl("body");t.scrollLeft+=10*(e.deltaX||0),t.scrollTop+=10*e.deltaY,n()}),ye(p.getEl("body")).on("scroll",n)),n())}},pt=lt.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[gt],renderHtml:function(){var e=this,t=e._layout,n=e.settings.html;return e.preRender(),t.preRender(e),void 0===n?n='<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+t.renderHtml(e)+"</div>":("function"==typeof n&&(n=n.call(e)),e._hasBody=!1),'<div id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1" role="group">'+(e._preBodyHtml||"")+n+"</div>"}}),vt={resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(e,t){if(e<=1||t<=1){var n=we.getWindowSize();e=e<=1?e*n.w:e,t=t<=1?t*n.h:t}return this._layoutRect.autoResize=!1,this.layoutRect({minW:e,minH:t,w:e,h:t}).reflow()},resizeBy:function(e,t){var n=this.layoutRect();return this.resizeTo(n.w+e,n.h+t)}},bt=[],yt=[];function xt(e,t){for(;e;){if(e===t)return!0;e=e.parent()}}function wt(){dt||(dt=function(e){2!==e.button&&function(e){for(var t=bt.length;t--;){var n=bt[t],i=n.getParentCtrl(e.target);if(n.settings.autohide){if(i&&(xt(i,n)||n.parent()===i))continue;(e=n.fire("autohide",{target:e.target})).isDefaultPrevented()||n.hide()}}}(e)},ye(_.document).on("click touchstart",dt))}function _t(r){var e=we.getViewPort().y;function t(e,t){for(var n,i=0;i<bt.length;i++)if(bt[i]!==r)for(n=bt[i].parent();n&&(n=n.parent());)n===r&&bt[i].fixed(e).moveBy(0,t).repaint()}r.settings.autofix&&(r.state.get("fixed")?r._autoFixY>e&&(r.fixed(!1).layoutRect({y:r._autoFixY}).repaint(),t(!1,r._autoFixY-e)):(r._autoFixY=r.layoutRect().y,r._autoFixY<e&&(r.fixed(!0).layoutRect({y:0}).repaint(),t(!0,e-r._autoFixY))))}function Rt(e,t){var n,i,r=Ct.zIndex||65535;if(e)yt.push(t);else for(n=yt.length;n--;)yt[n]===t&&yt.splice(n,1);if(yt.length)for(n=0;n<yt.length;n++)yt[n].modal&&(r++,i=yt[n]),yt[n].getEl().style.zIndex=r,yt[n].zIndex=r,r++;var o=ye("#"+t.classPrefix+"modal-block",t.getContainerElm())[0];i?ye(o).css("z-index",i.zIndex-1):o&&(o.parentNode.removeChild(o),mt=!1),Ct.currentZIndex=r}var Ct=pt.extend({Mixins:[He,vt],init:function(e){var i=this;i._super(e),(i._eventsRoot=i).classes.add("floatpanel"),e.autohide&&(wt(),function(){if(!ht){var e=_.document.documentElement,t=e.clientWidth,n=e.clientHeight;ht=function(){_.document.all&&t===e.clientWidth&&n===e.clientHeight||(t=e.clientWidth,n=e.clientHeight,Ct.hideAll())},ye(_.window).on("resize",ht)}}(),bt.push(i)),e.autofix&&(ft||(ft=function(){var e;for(e=bt.length;e--;)_t(bt[e])},ye(_.window).on("scroll",ft)),i.on("move",function(){_t(this)})),i.on("postrender show",function(e){if(e.control===i){var t,n=i.classPrefix;i.modal&&!mt&&((t=ye("#"+n+"modal-block",i.getContainerElm()))[0]||(t=ye('<div id="'+n+'modal-block" class="'+n+"reset "+n+'fade"></div>').appendTo(i.getContainerElm())),u.setTimeout(function(){t.addClass(n+"in"),ye(i.getEl()).addClass(n+"in")}),mt=!0),Rt(!0,i)}}),i.on("show",function(){i.parents().each(function(e){if(e.state.get("fixed"))return i.fixed(!0),!1})}),e.popover&&(i._preBodyHtml='<div class="'+i.classPrefix+'arrow"></div>',i.classes.add("popover").add("bottom").add(i.isRtl()?"end":"start")),i.aria("label",e.ariaLabel),i.aria("labelledby",i._id),i.aria("describedby",i.describedBy||i._id+"-none")},fixed:function(e){var t=this;if(t.state.get("fixed")!==e){if(t.state.get("rendered")){var n=we.getViewPort();e?t.layoutRect().y-=n.y:t.layoutRect().y+=n.y}t.classes.toggle("fixed",e),t.state.set("fixed",e)}return t},show:function(){var e,t=this._super();for(e=bt.length;e--&&bt[e]!==this;);return-1===e&&bt.push(this),t},hide:function(){return Et(this),Rt(!1,this),this._super()},hideAll:function(){Ct.hideAll()},close:function(){return this.fire("close").isDefaultPrevented()||(this.remove(),Rt(!1,this)),this},remove:function(){Et(this),this._super()},postRender:function(){return this.settings.bodyRole&&this.getEl("body").setAttribute("role",this.settings.bodyRole),this._super()}});function Et(e){var t;for(t=bt.length;t--;)bt[t]===e&&bt.splice(t,1);for(t=yt.length;t--;)yt[t]===e&&yt.splice(t,1)}Ct.hideAll=function(){for(var e=bt.length;e--;){var t=bt[e];t&&t.settings.autohide&&(t.hide(),bt.splice(e,1))}};var kt=function(s,n,e){var a,i,l=p.DOM,t=s.getParam("fixed_toolbar_container");t&&(i=l.select(t)[0]);var r=function(){if(a&&a.moveRel&&a.visible()&&!a._fixed){var e=s.selection.getScrollContainer(),t=s.getBody(),n=0,i=0;if(e){var r=l.getPos(t),o=l.getPos(e);n=Math.max(0,o.x-r.x),i=Math.max(0,o.y-r.y)}a.fixed(!1).moveRel(t,s.rtl?["tr-br","br-tr"]:["tl-bl","bl-tl","tr-br"]).moveBy(n,i)}},o=function(){a&&(a.show(),r(),l.addClass(s.getBody(),"mce-edit-focus"))},u=function(){a&&(a.hide(),Ct.hideAll(),l.removeClass(s.getBody(),"mce-edit-focus"))},c=function(){var e,t;a?a.visible()||o():(a=n.panel=v.create({type:i?"panel":"floatpanel",role:"application",classes:"tinymce tinymce-inline",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:(e=i,t=s,!(!e||t.settings.ui_container)),border:1,items:[!1===d(s)?null:{type:"menubar",border:"0 0 1 0",items:re(s)},A(s,f(s))]}),W.setUiContainer(s,a),x(s),i?a.renderTo(i).reflow():a.renderTo().reflow(),R(s,a),o(),F(s),s.on("nodeChange",r),s.on("ResizeWindow",r),s.on("activate",o),s.on("deactivate",u),s.nodeChanged())};return s.settings.content_editable=!0,s.on("focus",function(){!1===m(s)&&e.skinUiCss?l.styleSheetLoader.load(e.skinUiCss,c,c):c()}),s.on("blur hide",u),s.on("remove",function(){a&&(a.remove(),a=null)}),!1===m(s)&&e.skinUiCss?l.styleSheetLoader.load(e.skinUiCss,ge(s)):ge(s)(),{}};function Ht(i,r){var o,s,a=this,l=rt.classPrefix;a.show=function(e,t){function n(){o&&(ye(i).append('<div class="'+l+"throbber"+(r?" "+l+"throbber-inline":"")+'"></div>'),t&&t())}return a.hide(),o=!0,e?s=u.setTimeout(n,e):n(),a},a.hide=function(){var e=i.lastChild;return u.clearTimeout(s),e&&-1!==e.className.indexOf("throbber")&&e.parentNode.removeChild(e),o=!1,a}}var St=function(e,t){var n;e.on("ProgressState",function(e){n=n||new Ht(t.panel.getEl("body")),e.state?n.show(e.time):n.hide()})},Tt=function(e,t,n){var i=function(e){var t=e.settings,n=t.skin,i=t.skin_url;if(!1!==n){var r=n||"lightgray";i=i?e.documentBaseURI.toAbsolute(i):l.baseURL+"/skins/"+r}return i}(e);return i&&(n.skinUiCss=i+"/skin.min.css",e.contentCSS.push(i+"/content"+(e.inline?".inline":"")+".min.css")),St(e,t),e.getParam("inline",!1,"boolean")?kt(e,t,n):be(e,t,n)},Mt=rt.extend({Mixins:[He],Defaults:{classes:"widget tooltip tooltip-n"},renderHtml:function(){var e=this,t=e.classPrefix;return'<div id="'+e._id+'" class="'+e.classes+'" role="presentation"><div class="'+t+'tooltip-arrow"></div><div class="'+t+'tooltip-inner">'+e.encode(e.state.get("text"))+"</div></div>"},bindStates:function(){var t=this;return t.state.on("change:text",function(e){t.getEl().lastChild.innerHTML=t.encode(e.value)}),t._super()},repaint:function(){var e,t;e=this.getEl().style,t=this._layoutRect,e.left=t.x+"px",e.top=t.y+"px",e.zIndex=131070}}),Nt=rt.extend({init:function(i){var r=this;r._super(i),i=r.settings,r.canFocus=!0,i.tooltip&&!1!==Nt.tooltips&&(r.on("mouseenter",function(e){var t=r.tooltip().moveTo(-65535);if(e.control===r){var n=t.text(i.tooltip).show().testMoveRel(r.getEl(),["bc-tc","bc-tl","bc-tr"]);t.classes.toggle("tooltip-n","bc-tc"===n),t.classes.toggle("tooltip-nw","bc-tl"===n),t.classes.toggle("tooltip-ne","bc-tr"===n),t.moveRel(r.getEl(),n)}else t.hide()}),r.on("mouseleave mousedown click",function(){r.tooltip().remove(),r._tooltip=null})),r.aria("label",i.ariaLabel||i.tooltip)},tooltip:function(){return this._tooltip||(this._tooltip=new Mt({type:"tooltip"}),W.inheritUiContainer(this,this._tooltip),this._tooltip.renderTo()),this._tooltip},postRender:function(){var e=this,t=e.settings;e._super(),e.parent()||!t.width&&!t.height||(e.initLayoutRect(),e.repaint()),t.autofocus&&e.focus()},bindStates:function(){var t=this;function n(e){t.aria("disabled",e),t.classes.toggle("disabled",e)}function i(e){t.aria("pressed",e),t.classes.toggle("active",e)}return t.state.on("change:disabled",function(e){n(e.value)}),t.state.on("change:active",function(e){i(e.value)}),t.state.get("disabled")&&n(!0),t.state.get("active")&&i(!0),t._super()},remove:function(){this._super(),this._tooltip&&(this._tooltip.remove(),this._tooltip=null)}}),Pt=Nt.extend({Defaults:{value:0},init:function(e){this._super(e),this.classes.add("progress"),this.settings.filter||(this.settings.filter=function(e){return Math.round(e)})},renderHtml:function(){var e=this._id,t=this.classPrefix;return'<div id="'+e+'" class="'+this.classes+'"><div class="'+t+'bar-container"><div class="'+t+'bar"></div></div><div class="'+t+'text">0%</div></div>'},postRender:function(){return this._super(),this.value(this.settings.value),this},bindStates:function(){var t=this;function n(e){e=t.settings.filter(e),t.getEl().lastChild.innerHTML=e+"%",t.getEl().firstChild.firstChild.style.width=e+"%"}return t.state.on("change:value",function(e){n(e.value)}),n(t.state.get("value")),t._super()}}),Wt=function(e,t){e.getEl().lastChild.textContent=t+(e.progressBar?" "+e.progressBar.value()+"%":"")},Dt=rt.extend({Mixins:[He],Defaults:{classes:"widget notification"},init:function(e){var t=this;t._super(e),t.maxWidth=e.maxWidth,e.text&&t.text(e.text),e.icon&&(t.icon=e.icon),e.color&&(t.color=e.color),e.type&&t.classes.add("notification-"+e.type),e.timeout&&(e.timeout<0||0<e.timeout)&&!e.closeButton?t.closeButton=!1:(t.classes.add("has-close"),t.closeButton=!0),e.progressBar&&(t.progressBar=new Pt),t.on("click",function(e){-1!==e.target.className.indexOf(t.classPrefix+"close")&&t.close()})},renderHtml:function(){var e,t=this,n=t.classPrefix,i="",r="",o="";return t.icon&&(i='<i class="'+n+"ico "+n+"i-"+t.icon+'"></i>'),e=' style="max-width: '+t.maxWidth+"px;"+(t.color?"background-color: "+t.color+';"':'"'),t.closeButton&&(r='<button type="button" class="'+n+'close" aria-hidden="true">\xd7</button>'),t.progressBar&&(o=t.progressBar.renderHtml()),'<div id="'+t._id+'" class="'+t.classes+'"'+e+' role="presentation">'+i+'<div class="'+n+'notification-inner">'+t.state.get("text")+"</div>"+o+r+'<div style="clip: rect(1px, 1px, 1px, 1px);height: 1px;overflow: hidden;position: absolute;width: 1px;" aria-live="assertive" aria-relevant="additions" aria-atomic="true"></div></div>'},postRender:function(){var e=this;return u.setTimeout(function(){e.$el.addClass(e.classPrefix+"in"),Wt(e,e.state.get("text"))},100),e._super()},bindStates:function(){var t=this;return t.state.on("change:text",function(e){t.getEl().firstChild.innerHTML=e.value,Wt(t,e.value)}),t.progressBar&&(t.progressBar.bindStates(),t.progressBar.state.on("change:value",function(e){Wt(t,t.state.get("text"))})),t._super()},close:function(){return this.fire("close").isDefaultPrevented()||this.remove(),this},repaint:function(){var e,t;e=this.getEl().style,t=this._layoutRect,e.left=t.x+"px",e.top=t.y+"px",e.zIndex=65534}});function Ot(o){var s=function(e){return e.inline?e.getElement():e.getContentAreaContainer()};return{open:function(e,t){var n,i=w.extend(e,{maxWidth:(n=s(o),we.getSize(n).width)}),r=new Dt(i);return 0<(r.args=i).timeout&&(r.timer=setTimeout(function(){r.close(),t()},i.timeout)),r.on("close",function(){t()}),r.renderTo(),r},close:function(e){e.close()},reposition:function(e){K(e,function(e){e.moveTo(0,0)}),function(n){if(0<n.length){var e=n.slice(0,1)[0],t=s(o);e.moveRel(t,"tc-tc"),K(n,function(e,t){0<t&&e.moveRel(n[t-1].getEl(),"bc-tc")})}}(e)},getArgs:function(e){return e.args}}}var At=[],Bt="";function Lt(e){var t,n=ye("meta[name=viewport]")[0];!1!==ce.overrideViewPort&&(n||((n=_.document.createElement("meta")).setAttribute("name","viewport"),_.document.getElementsByTagName("head")[0].appendChild(n)),(t=n.getAttribute("content"))&&void 0!==Bt&&(Bt=t),n.setAttribute("content",e?"width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0":Bt))}function zt(e,t){(function(){for(var e=0;e<At.length;e++)if(At[e]._fullscreen)return!0;return!1})()&&!1===t&&ye([_.document.documentElement,_.document.body]).removeClass(e+"fullscreen")}var It=Ct.extend({modal:!0,Defaults:{border:1,layout:"flex",containerCls:"panel",role:"dialog",callbacks:{submit:function(){this.fire("submit",{data:this.toJSON()})},close:function(){this.close()}}},init:function(e){var n=this;n._super(e),n.isRtl()&&n.classes.add("rtl"),n.classes.add("window"),n.bodyClasses.add("window-body"),n.state.set("fixed",!0),e.buttons&&(n.statusbar=new pt({layout:"flex",border:"1 0 0 0",spacing:3,padding:10,align:"center",pack:n.isRtl()?"start":"end",defaults:{type:"button"},items:e.buttons}),n.statusbar.classes.add("foot"),n.statusbar.parent(n)),n.on("click",function(e){var t=n.classPrefix+"close";(we.hasClass(e.target,t)||we.hasClass(e.target.parentNode,t))&&n.close()}),n.on("cancel",function(){n.close()}),n.on("move",function(e){e.control===n&&Ct.hideAll()}),n.aria("describedby",n.describedBy||n._id+"-none"),n.aria("label",e.title),n._fullscreen=!1},recalc:function(){var e,t,n,i,r=this,o=r.statusbar;r._fullscreen&&(r.layoutRect(we.getWindowSize()),r.layoutRect().contentH=r.layoutRect().innerH),r._super(),e=r.layoutRect(),r.settings.title&&!r._fullscreen&&(t=e.headerW)>e.w&&(n=e.x-Math.max(0,t/2),r.layoutRect({w:t,x:n}),i=!0),o&&(o.layoutRect({w:r.layoutRect().innerW}).recalc(),(t=o.layoutRect().minW+e.deltaW)>e.w&&(n=e.x-Math.max(0,t-e.w),r.layoutRect({w:t,x:n}),i=!0)),i&&r.recalc()},initLayoutRect:function(){var e,t=this,n=t._super(),i=0;if(t.settings.title&&!t._fullscreen){e=t.getEl("head");var r=we.getSize(e);n.headerW=r.width,n.headerH=r.height,i+=n.headerH}t.statusbar&&(i+=t.statusbar.layoutRect().h),n.deltaH+=i,n.minH+=i,n.h+=i;var o=we.getWindowSize();return n.x=t.settings.x||Math.max(0,o.w/2-n.w/2),n.y=t.settings.y||Math.max(0,o.h/2-n.h/2),n},renderHtml:function(){var e=this,t=e._layout,n=e._id,i=e.classPrefix,r=e.settings,o="",s="",a=r.html;return e.preRender(),t.preRender(e),r.title&&(o='<div id="'+n+'-head" class="'+i+'window-head"><div id="'+n+'-title" class="'+i+'title">'+e.encode(r.title)+'</div><div id="'+n+'-dragh" class="'+i+'dragh"></div><button type="button" class="'+i+'close" aria-hidden="true"><i class="mce-ico mce-i-remove"></i></button></div>'),r.url&&(a='<iframe src="'+r.url+'" tabindex="-1"></iframe>'),void 0===a&&(a=t.renderHtml(e)),e.statusbar&&(s=e.statusbar.renderHtml()),'<div id="'+n+'" class="'+e.classes+'" hidefocus="1"><div class="'+e.classPrefix+'reset" role="application">'+o+'<div id="'+n+'-body" class="'+e.bodyClasses+'">'+a+"</div>"+s+"</div></div>"},fullscreen:function(e){var n,t,i=this,r=_.document.documentElement,o=i.classPrefix;if(e!==i._fullscreen)if(ye(_.window).on("resize",function(){var e;if(i._fullscreen)if(n)i._timer||(i._timer=u.setTimeout(function(){var e=we.getWindowSize();i.moveTo(0,0).resizeTo(e.w,e.h),i._timer=0},50));else{e=(new Date).getTime();var t=we.getWindowSize();i.moveTo(0,0).resizeTo(t.w,t.h),50<(new Date).getTime()-e&&(n=!0)}}),t=i.layoutRect(),i._fullscreen=e){i._initial={x:t.x,y:t.y,w:t.w,h:t.h},i.borderBox=Me("0"),i.getEl("head").style.display="none",t.deltaH-=t.headerH+2,ye([r,_.document.body]).addClass(o+"fullscreen"),i.classes.add("fullscreen");var s=we.getWindowSize();i.moveTo(0,0).resizeTo(s.w,s.h)}else i.borderBox=Me(i.settings.border),i.getEl("head").style.display="",t.deltaH+=t.headerH,ye([r,_.document.body]).removeClass(o+"fullscreen"),i.classes.remove("fullscreen"),i.moveTo(i._initial.x,i._initial.y).resizeTo(i._initial.w,i._initial.h);return i.reflow()},postRender:function(){var t,n=this;setTimeout(function(){n.classes.add("in"),n.fire("open")},0),n._super(),n.statusbar&&n.statusbar.postRender(),n.focus(),this.dragHelper=new ct(n._id+"-dragh",{start:function(){t={x:n.layoutRect().x,y:n.layoutRect().y}},drag:function(e){n.moveTo(t.x+e.deltaX,t.y+e.deltaY)}}),n.on("submit",function(e){e.isDefaultPrevented()||n.close()}),At.push(n),Lt(!0)},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var e,t=this;for(t.dragHelper.destroy(),t._super(),t.statusbar&&this.statusbar.remove(),zt(t.classPrefix,!1),e=At.length;e--;)At[e]===t&&At.splice(e,1);Lt(0<At.length)},getContentWindow:function(){var e=this.getEl().getElementsByTagName("iframe")[0];return e?e.contentWindow:null}});!function(){if(!ce.desktop){var n={w:_.window.innerWidth,h:_.window.innerHeight};u.setInterval(function(){var e=_.window.innerWidth,t=_.window.innerHeight;n.w===e&&n.h===t||(n={w:e,h:t},ye(_.window).trigger("resize"))},100)}ye(_.window).on("resize",function(){var e,t,n=we.getWindowSize();for(e=0;e<At.length;e++)t=At[e].layoutRect(),At[e].moveTo(At[e].settings.x||Math.max(0,n.w/2-t.w/2),At[e].settings.y||Math.max(0,n.h/2-t.h/2))})}();var Ft,Ut,Vt,Yt=It.extend({init:function(e){e={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(e)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(e){var t,i=e.callback||function(){};function n(e,t,n){return{type:"button",text:e,subtype:n?"primary":"",onClick:function(e){e.control.parents()[1].close(),i(t)}}}switch(e.buttons){case Yt.OK_CANCEL:t=[n("Ok",!0,!0),n("Cancel",!1)];break;case Yt.YES_NO:case Yt.YES_NO_CANCEL:t=[n("Yes",1,!0),n("No",0)],e.buttons===Yt.YES_NO_CANCEL&&t.push(n("Cancel",-1));break;default:t=[n("Ok",!0,!0)]}return new It({padding:20,x:e.x,y:e.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:t,title:e.title,role:"alertdialog",items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:e.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:e.onClose,onCancel:function(){i(!1)}}).renderTo(_.document.body).reflow()},alert:function(e,t){return"string"==typeof e&&(e={text:e}),e.callback=t,Yt.msgBox(e)},confirm:function(e,t){return"string"==typeof e&&(e={text:e}),e.callback=t,e.buttons=Yt.OK_CANCEL,Yt.msgBox(e)}}}),$t=function(n){return{renderUI:function(e){return Tt(n,this,e)},resizeTo:function(e,t){return le(n,e,t)},resizeBy:function(e,t){return ue(n,e,t)},getNotificationManagerImpl:function(){return Ot(n)},getWindowManagerImpl:function(){return{open:function(n,e,t){var i;return n.title=n.title||" ",n.url=n.url||n.file,n.url&&(n.width=parseInt(n.width||320,10),n.height=parseInt(n.height||240,10)),n.body&&(n.items={defaults:n.defaults,type:n.bodyType||"form",items:n.body,data:n.data,callbacks:n.commands}),n.url||n.buttons||(n.buttons=[{text:"Ok",subtype:"primary",onclick:function(){i.find("form")[0].submit()}},{text:"Cancel",onclick:function(){i.close()}}]),(i=new It(n)).on("close",function(){t(i)}),n.data&&i.on("postRender",function(){this.find("*").each(function(e){var t=e.name();t in n.data&&e.value(n.data[t])})}),i.features=n||{},i.params=e||{},i=i.renderTo(_.document.body).reflow()},alert:function(e,t,n){var i;return(i=Yt.alert(e,function(){t()})).on("close",function(){n(i)}),i},confirm:function(e,t,n){var i;return(i=Yt.confirm(e,function(e){t(e)})).on("close",function(){n(i)}),i},close:function(e){e.close()},getParams:function(e){return e.params},setParams:function(e,t){e.params=t}}}}},qt=Se.extend({Defaults:{firstControlClass:"first",lastControlClass:"last"},init:function(e){this.settings=w.extend({},this.Defaults,e)},preRender:function(e){e.bodyClasses.add(this.settings.containerClass)},applyClasses:function(e){var t,n,i,r,o=this.settings;t=o.firstControlClass,n=o.lastControlClass,e.each(function(e){e.classes.remove(t).remove(n).add(o.controlClass),e.visible()&&(i||(i=e),r=e)}),i&&i.classes.add(t),r&&r.classes.add(n)},renderHtml:function(e){var t="";return this.applyClasses(e.items()),e.items().each(function(e){t+=e.renderHtml()}),t},recalc:function(){},postRender:function(){},isNative:function(){return!1}}),Xt=qt.extend({Defaults:{containerClass:"abs-layout",controlClass:"abs-layout-item"},recalc:function(e){e.items().filter(":visible").each(function(e){var t=e.settings;e.layoutRect({x:t.x,y:t.y,w:t.w,h:t.h}),e.recalc&&e.recalc()})},renderHtml:function(e){return'<div id="'+e._id+'-absend" class="'+e.classPrefix+'abs-end"></div>'+this._super(e)}}),jt=Nt.extend({Defaults:{classes:"widget btn",role:"button"},init:function(e){var t,n=this;n._super(e),e=n.settings,t=n.settings.size,n.on("click mousedown",function(e){e.preventDefault()}),n.on("touchstart",function(e){n.fire("click",e),e.preventDefault()}),e.subtype&&n.classes.add(e.subtype),t&&n.classes.add("btn-"+t),e.icon&&n.icon(e.icon)},icon:function(e){return arguments.length?(this.state.set("icon",e),this):this.state.get("icon")},repaint:function(){var e,t=this.getEl().firstChild;t&&((e=t.style).width=e.height="100%"),this._super()},renderHtml:function(){var e,t,n=this,i=n._id,r=n.classPrefix,o=n.state.get("icon"),s=n.state.get("text"),a="",l=n.settings;return(e=l.image)?(o="none","string"!=typeof e&&(e=_.window.getSelection?e[0]:e[1]),e=" style=\"background-image: url('"+e+"')\""):e="",s&&(n.classes.add("btn-has-text"),a='<span class="'+r+'txt">'+n.encode(s)+"</span>"),o=o?r+"ico "+r+"i-"+o:"",t="boolean"==typeof l.active?' aria-pressed="'+l.active+'"':"",'<div id="'+i+'" class="'+n.classes+'" tabindex="-1"'+t+'><button id="'+i+'-button" role="presentation" type="button" tabindex="-1">'+(o?'<i class="'+o+'"'+e+"></i>":"")+a+"</button></div>"},bindStates:function(){var o=this,n=o.$,i=o.classPrefix+"txt";function s(e){var t=n("span."+i,o.getEl());e?(t[0]||(n("button:first",o.getEl()).append('<span class="'+i+'"></span>'),t=n("span."+i,o.getEl())),t.html(o.encode(e))):t.remove(),o.classes.toggle("btn-has-text",!!e)}return o.state.on("change:text",function(e){s(e.value)}),o.state.on("change:icon",function(e){var t=e.value,n=o.classPrefix;t=(o.settings.icon=t)?n+"ico "+n+"i-"+o.settings.icon:"";var i=o.getEl().firstChild,r=i.getElementsByTagName("i")[0];t?(r&&r===i.firstChild||(r=_.document.createElement("i"),i.insertBefore(r,i.firstChild)),r.className=t):r&&i.removeChild(r),s(o.state.get("text"))}),o._super()}}),Jt=jt.extend({init:function(e){e=w.extend({text:"Browse...",multiple:!1,accept:null},e),this._super(e),this.classes.add("browsebutton"),e.multiple&&this.classes.add("multiple")},postRender:function(){var n=this,t=we.create("input",{type:"file",id:n._id+"-browse",accept:n.settings.accept});n._super(),ye(t).on("change",function(e){var t=e.target.files;n.value=function(){return t.length?n.settings.multiple?t:t[0]:null},e.preventDefault(),t.length&&n.fire("change",e)}),ye(t).on("click",function(e){e.stopPropagation()}),ye(n.getEl("button")).on("click touchstart",function(e){e.stopPropagation(),t.click(),e.preventDefault()}),n.getEl().appendChild(t)},remove:function(){ye(this.getEl("button")).off(),ye(this.getEl("input")).off(),this._super()}}),Gt=lt.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var e=this,t=e._layout;return e.classes.add("btn-group"),e.preRender(),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes+'"><div id="'+e._id+'-body">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"}}),Kt=Nt.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(e){var t=this;t._super(e),t.on("click mousedown",function(e){e.preventDefault()}),t.on("click",function(e){e.preventDefault(),t.disabled()||t.checked(!t.checked())}),t.checked(t.settings.checked)},checked:function(e){return arguments.length?(this.state.set("checked",e),this):this.state.get("checked")},value:function(e){return arguments.length?this.checked(e):this.checked()},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'<div id="'+t+'" class="'+e.classes+'" unselectable="on" aria-labelledby="'+t+'-al" tabindex="-1"><i class="'+n+"ico "+n+'i-checkbox"></i><span id="'+t+'-al" class="'+n+'label">'+e.encode(e.state.get("text"))+"</span></div>"},bindStates:function(){var o=this;function t(e){o.classes.toggle("checked",e),o.aria("checked",e)}return o.state.on("change:text",function(e){o.getEl("al").firstChild.data=o.translate(e.value)}),o.state.on("change:checked change:value",function(e){o.fire("change"),t(e.value)}),o.state.on("change:icon",function(e){var t=e.value,n=o.classPrefix;if(void 0===t)return o.settings.icon;t=(o.settings.icon=t)?n+"ico "+n+"i-"+o.settings.icon:"";var i=o.getEl().firstChild,r=i.getElementsByTagName("i")[0];t?(r&&r===i.firstChild||(r=_.document.createElement("i"),i.insertBefore(r,i.firstChild)),r.className=t):r&&i.removeChild(r)}),o.state.get("checked")&&t(!0),o._super()}}),Zt=tinymce.util.Tools.resolve("tinymce.util.VK"),Qt=Nt.extend({init:function(i){var r=this;r._super(i),i=r.settings,r.classes.add("combobox"),r.subinput=!0,r.ariaTarget="inp",i.menu=i.menu||i.values,i.menu&&(i.icon="caret"),r.on("click",function(e){var t=e.target,n=r.getEl();if(ye.contains(n,t)||t===n)for(;t&&t!==n;)t.id&&-1!==t.id.indexOf("-open")&&(r.fire("action"),i.menu&&(r.showMenu(),e.aria&&r.menu.items()[0].focus())),t=t.parentNode}),r.on("keydown",function(e){var t;13===e.keyCode&&"INPUT"===e.target.nodeName&&(e.preventDefault(),r.parents().reverse().each(function(e){if(e.toJSON)return t=e,!1}),r.fire("submit",{data:t.toJSON()}))}),r.on("keyup",function(e){if("INPUT"===e.target.nodeName){var t=r.state.get("value"),n=e.target.value;n!==t&&(r.state.set("value",n),r.fire("autocomplete",e))}}),r.on("mouseover",function(e){var t=r.tooltip().moveTo(-65535);if(r.statusLevel()&&-1!==e.target.className.indexOf(r.classPrefix+"status")){var n=r.statusMessage()||"Ok",i=t.text(n).show().testMoveRel(e.target,["bc-tc","bc-tl","bc-tr"]);t.classes.toggle("tooltip-n","bc-tc"===i),t.classes.toggle("tooltip-nw","bc-tl"===i),t.classes.toggle("tooltip-ne","bc-tr"===i),t.moveRel(e.target,i)}})},statusLevel:function(e){return 0<arguments.length&&this.state.set("statusLevel",e),this.state.get("statusLevel")},statusMessage:function(e){return 0<arguments.length&&this.state.set("statusMessage",e),this.state.get("statusMessage")},showMenu:function(){var e,t=this,n=t.settings;t.menu||((e=n.menu||[]).length?e={type:"menu",items:e}:e.type=e.type||"menu",t.menu=v.create(e).parent(t).renderTo(t.getContainerElm()),t.fire("createmenu"),t.menu.reflow(),t.menu.on("cancel",function(e){e.control===t.menu&&t.focus()}),t.menu.on("show hide",function(e){e.control.items().each(function(e){e.active(e.value()===t.value())})}).fire("show"),t.menu.on("select",function(e){t.value(e.control.value())}),t.on("focusin",function(e){"INPUT"===e.target.tagName.toUpperCase()&&t.menu.hide()}),t.aria("expanded",!0)),t.menu.show(),t.menu.layoutRect({w:t.layoutRect().w}),t.menu.moveRel(t.getEl(),t.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},focus:function(){this.getEl("inp").focus()},repaint:function(){var e,t,n=this,i=n.getEl(),r=n.getEl("open"),o=n.layoutRect(),s=0,a=i.firstChild;n.statusLevel()&&"none"!==n.statusLevel()&&(s=parseInt(we.getRuntimeStyle(a,"padding-right"),10)-parseInt(we.getRuntimeStyle(a,"padding-left"),10)),e=r?o.w-we.getSize(r).width-10:o.w-10;var l=_.document;return l.all&&(!l.documentMode||l.documentMode<=8)&&(t=n.layoutRect().h-2+"px"),ye(a).css({width:e-s,lineHeight:t}),n._super(),n},postRender:function(){var t=this;return ye(this.getEl("inp")).on("change",function(e){t.state.set("value",e.target.value),t.fire("change",e)}),t._super()},renderHtml:function(){var e,t,n,i=this,r=i._id,o=i.settings,s=i.classPrefix,a=i.state.get("value")||"",l="",u="";return"spellcheck"in o&&(u+=' spellcheck="'+o.spellcheck+'"'),o.maxLength&&(u+=' maxlength="'+o.maxLength+'"'),o.size&&(u+=' size="'+o.size+'"'),o.subtype&&(u+=' type="'+o.subtype+'"'),n='<i id="'+r+'-status" class="mce-status mce-ico" style="display: none"></i>',i.disabled()&&(u+=' disabled="disabled"'),(e=o.icon)&&"caret"!==e&&(e=s+"ico "+s+"i-"+o.icon),t=i.state.get("text"),(e||t)&&(l='<div id="'+r+'-open" class="'+s+"btn "+s+'open" tabIndex="-1" role="button"><button id="'+r+'-action" type="button" hidefocus="1" tabindex="-1">'+("caret"!==e?'<i class="'+e+'"></i>':'<i class="'+s+'caret"></i>')+(t?(e?" ":"")+t:"")+"</button></div>",i.classes.add("has-open")),'<div id="'+r+'" class="'+i.classes+'"><input id="'+r+'-inp" class="'+s+'textbox" value="'+i.encode(a,!1)+'" hidefocus="1"'+u+' placeholder="'+i.encode(o.placeholder)+'" />'+n+l+"</div>"},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl("inp").value),this.state.get("value"))},showAutoComplete:function(e,i){var r=this;if(0!==e.length){r.menu?r.menu.items().remove():r.menu=v.create({type:"menu",classes:"combobox-menu",layout:"flow"}).parent(r).renderTo(),w.each(e,function(e){var t,n;r.menu.add({text:e.title,url:e.previewUrl,match:i,classes:"menu-item-ellipsis",onclick:(t=e.value,n=e.title,function(){r.fire("selectitem",{title:n,value:t})})})}),r.menu.renderNew(),r.hideMenu(),r.menu.on("cancel",function(e){e.control.parent()===r.menu&&(e.stopPropagation(),r.focus(),r.hideMenu())}),r.menu.on("select",function(){r.focus()});var t=r.layoutRect().w;r.menu.layoutRect({w:t,minW:0,maxW:t}),r.menu.repaint(),r.menu.reflow(),r.menu.show(),r.menu.moveRel(r.getEl(),r.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])}else r.hideMenu()},hideMenu:function(){this.menu&&this.menu.hide()},bindStates:function(){var r=this;r.state.on("change:value",function(e){r.getEl("inp").value!==e.value&&(r.getEl("inp").value=e.value)}),r.state.on("change:disabled",function(e){r.getEl("inp").disabled=e.value}),r.state.on("change:statusLevel",function(e){var t=r.getEl("status"),n=r.classPrefix,i=e.value;we.css(t,"display","none"===i?"none":""),we.toggleClass(t,n+"i-checkmark","ok"===i),we.toggleClass(t,n+"i-warning","warn"===i),we.toggleClass(t,n+"i-error","error"===i),r.classes.toggle("has-status","none"!==i),r.repaint()}),we.on(r.getEl("status"),"mouseleave",function(){r.tooltip().hide()}),r.on("cancel",function(e){r.menu&&r.menu.visible()&&(e.stopPropagation(),r.hideMenu())});var n=function(e,t){t&&0<t.items().length&&t.items().eq(e)[0].focus()};return r.on("keydown",function(e){var t=e.keyCode;"INPUT"===e.target.nodeName&&(t===Zt.DOWN?(e.preventDefault(),r.fire("autocomplete"),n(0,r.menu)):t===Zt.UP&&(e.preventDefault(),n(-1,r.menu)))}),r._super()},remove:function(){ye(this.getEl("inp")).off(),this.menu&&this.menu.remove(),this._super()}}),en=Qt.extend({init:function(e){var t=this;e.spellcheck=!1,e.onaction&&(e.icon="none"),t._super(e),t.classes.add("colorbox"),t.on("change keyup postrender",function(){t.repaintColor(t.value())})},repaintColor:function(e){var t=this.getEl("open"),n=t?t.getElementsByTagName("i")[0]:null;if(n)try{n.style.background=e}catch(i){}},bindStates:function(){var t=this;return t.state.on("change:value",function(e){t.state.get("rendered")&&t.repaintColor(e.value)}),t._super()}}),tn=jt.extend({showPanel:function(){var t=this,e=t.settings;if(t.classes.add("opened"),t.panel)t.panel.show();else{var n=e.panel;n.type&&(n={layout:"grid",items:n}),n.role=n.role||"dialog",n.popover=!0,n.autohide=!0,n.ariaRoot=!0,t.panel=new Ct(n).on("hide",function(){t.classes.remove("opened")}).on("cancel",function(e){e.stopPropagation(),t.focus(),t.hidePanel()}).parent(t).renderTo(t.getContainerElm()),t.panel.fire("show"),t.panel.reflow()}var i=t.panel.testMoveRel(t.getEl(),e.popoverAlign||(t.isRtl()?["bc-tc","bc-tl","bc-tr"]:["bc-tc","bc-tr","bc-tl","tc-bc","tc-br","tc-bl"]));t.panel.classes.toggle("start","l"===i.substr(-1)),t.panel.classes.toggle("end","r"===i.substr(-1));var r="t"===i.substr(0,1);t.panel.classes.toggle("bottom",!r),t.panel.classes.toggle("top",r),t.panel.moveRel(t.getEl(),i)},hidePanel:function(){this.panel&&this.panel.hide()},postRender:function(){var t=this;return t.aria("haspopup",!0),t.on("click",function(e){e.control===t&&(t.panel&&t.panel.visible()?t.hidePanel():(t.showPanel(),t.panel.focus(!!e.aria)))}),t._super()},remove:function(){return this.panel&&(this.panel.remove(),this.panel=null),this._super()}}),nn=p.DOM,rn=tn.extend({init:function(e){this._super(e),this.classes.add("splitbtn"),this.classes.add("colorbutton")},color:function(e){return e?(this._color=e,this.getEl("preview").style.backgroundColor=e,this):this._color},resetColor:function(){return this._color=null,this.getEl("preview").style.backgroundColor=null,this},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,i=e.state.get("text"),r=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"",o=e.settings.image?" style=\"background-image: url('"+e.settings.image+"')\"":"",s="";return i&&(e.classes.add("btn-has-text"),s='<span class="'+n+'txt">'+e.encode(i)+"</span>"),'<div id="'+t+'" class="'+e.classes+'" role="button" tabindex="-1" aria-haspopup="true"><button role="presentation" hidefocus="1" type="button" tabindex="-1">'+(r?'<i class="'+r+'"'+o+"></i>":"")+'<span id="'+t+'-preview" class="'+n+'preview"></span>'+s+'</button><button type="button" class="'+n+'open" hidefocus="1" tabindex="-1"> <i class="'+n+'caret"></i></button></div>'},postRender:function(){var t=this,n=t.settings.onclick;return t.on("click",function(e){e.aria&&"down"===e.aria.key||e.control!==t||nn.getParent(e.target,"."+t.classPrefix+"open")||(e.stopImmediatePropagation(),n.call(t,e))}),delete t.settings.onclick,t._super()}}),on=tinymce.util.Tools.resolve("tinymce.util.Color"),sn=Nt.extend({Defaults:{classes:"widget colorpicker"},init:function(e){this._super(e)},postRender:function(){var n,i,r,o,s,a=this,l=a.color();function u(e,t){var n,i,r=we.getPos(e);return n=t.pageX-r.x,i=t.pageY-r.y,{x:n=Math.max(0,Math.min(n/e.clientWidth,1)),y:i=Math.max(0,Math.min(i/e.clientHeight,1))}}function c(e,t){var n=(360-e.h)/360;we.css(r,{top:100*n+"%"}),t||we.css(s,{left:e.s+"%",top:100-e.v+"%"}),o.style.background=on({s:100,v:100,h:e.h}).toHex(),a.color().parse({s:e.s,v:e.v,h:e.h})}function e(e){var t;t=u(o,e),n.s=100*t.x,n.v=100*(1-t.y),c(n),a.fire("change")}function t(e){var t;t=u(i,e),(n=l.toHsv()).h=360*(1-t.y),c(n,!0),a.fire("change")}i=a.getEl("h"),r=a.getEl("hp"),o=a.getEl("sv"),s=a.getEl("svp"),a._repaint=function(){c(n=l.toHsv())},a._super(),a._svdraghelper=new ct(a._id+"-sv",{start:e,drag:e}),a._hdraghelper=new ct(a._id+"-h",{start:t,drag:t}),a._repaint()},rgb:function(){return this.color().toRgb()},value:function(e){if(!arguments.length)return this.color().toHex();this.color().parse(e),this._rendered&&this._repaint()},color:function(){return this._color||(this._color=on()),this._color},renderHtml:function(){var e,t=this._id,o=this.classPrefix,s="#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000";return e='<div id="'+t+'-h" class="'+o+'colorpicker-h" style="background: -ms-linear-gradient(top,'+s+");background: linear-gradient(to bottom,"+s+');">'+function(){var e,t,n,i,r="";for(n="filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=",e=0,t=(i=s.split(",")).length-1;e<t;e++)r+='<div class="'+o+'colorpicker-h-chunk" style="height:'+100/t+"%;"+n+i[e]+",endColorstr="+i[e+1]+");-ms-"+n+i[e]+",endColorstr="+i[e+1]+')"></div>';return r}()+'<div id="'+t+'-hp" class="'+o+'colorpicker-h-marker"></div></div>','<div id="'+t+'" class="'+this.classes+'"><div id="'+t+'-sv" class="'+o+'colorpicker-sv"><div class="'+o+'colorpicker-overlay1"><div class="'+o+'colorpicker-overlay2"><div id="'+t+'-svp" class="'+o+'colorpicker-selector1"><div class="'+o+'colorpicker-selector2"></div></div></div></div></div>'+e+"</div>"}}),an=Nt.extend({init:function(e){e=w.extend({height:100,text:"Drop an image here",multiple:!1,accept:null},e),this._super(e),this.classes.add("dropzone"),e.multiple&&this.classes.add("multiple")},renderHtml:function(){var e,t,n=this.settings;return e={id:this._id,hidefocus:"1"},t=we.create("div",e,"<span>"+this.translate(n.text)+"</span>"),n.height&&we.css(t,"height",n.height+"px"),n.width&&we.css(t,"width",n.width+"px"),t.className=this.classes,t.outerHTML},postRender:function(){var i=this,e=function(e){e.preventDefault(),i.classes.toggle("dragenter"),i.getEl().className=i.classes};i._super(),i.$el.on("dragover",function(e){e.preventDefault()}),i.$el.on("dragenter",e),i.$el.on("dragleave",e),i.$el.on("drop",function(e){if(e.preventDefault(),!i.state.get("disabled")){var t=function(e){var t=i.settings.accept;if("string"!=typeof t)return e;var n=new RegExp("("+t.split(/\s*,\s*/).join("|")+")$","i");return w.grep(e,function(e){return n.test(e.name)})}(e.dataTransfer.files);i.value=function(){return t.length?i.settings.multiple?t:t[0]:null},t.length&&i.fire("change",e)}})},remove:function(){this.$el.off(),this._super()}}),ln=Nt.extend({init:function(e){var n=this;e.delimiter||(e.delimiter="\xbb"),n._super(e),n.classes.add("path"),n.canFocus=!0,n.on("click",function(e){var t;(t=e.target.getAttribute("data-index"))&&n.fire("select",{value:n.row()[t],index:t})}),n.row(n.settings.row)},focus:function(){return this.getEl().firstChild.focus(),this},row:function(e){return arguments.length?(this.state.set("row",e),this):this.state.get("row")},renderHtml:function(){return'<div id="'+this._id+'" class="'+this.classes+'">'+this._getDataPathHtml(this.state.get("row"))+"</div>"},bindStates:function(){var t=this;return t.state.on("change:row",function(e){t.innerHtml(t._getDataPathHtml(e.value))}),t._super()},_getDataPathHtml:function(e){var t,n,i=e||[],r="",o=this.classPrefix;for(t=0,n=i.length;t<n;t++)r+=(0<t?'<div class="'+o+'divider" aria-hidden="true"> '+this.settings.delimiter+" </div>":"")+'<div role="button" class="'+o+"path-item"+(t===n-1?" "+o+"last":"")+'" data-index="'+t+'" tabindex="-1" id="'+this._id+"-"+t+'" aria-level="'+(t+1)+'">'+i[t].name+"</div>";return r||(r='<div class="'+o+'path-item">\xa0</div>'),r}}),un=ln.extend({postRender:function(){var o=this,s=o.settings.editor;function a(e){if(1===e.nodeType){if("BR"===e.nodeName||e.getAttribute("data-mce-bogus"))return!0;if("bookmark"===e.getAttribute("data-mce-type"))return!0}return!1}return!1!==s.settings.elementpath&&(o.on("select",function(e){s.focus(),s.selection.select(this.row()[e.index].element),s.nodeChanged()}),s.on("nodeChange",function(e){for(var t=[],n=e.parents,i=n.length;i--;)if(1===n[i].nodeType&&!a(n[i])){var r=s.fire("ResolveName",{name:n[i].nodeName.toLowerCase(),target:n[i]});if(r.isDefaultPrevented()||t.push({name:r.name,element:n[i]}),r.isPropagationStopped())break}o.row(t)})),o._super()}}),cn=lt.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.classes.add("formitem"),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1">'+(e.settings.title?'<div id="'+e._id+'-title" class="'+n+'title">'+e.settings.title+"</div>":"")+'<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"}}),dn=lt.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:15,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var i=this,e=i.items();i.settings.formItemDefaults||(i.settings.formItemDefaults={layout:"flex",autoResize:"overflow",defaults:{flex:1}}),e.each(function(e){var t,n=e.settings.label;n&&((t=new cn(w.extend({items:{type:"label",id:e._id+"-l",text:n,flex:0,forId:e._id,disabled:e.disabled()}},i.settings.formItemDefaults))).type="formitem",e.aria("labelledby",e._id+"-l"),"undefined"==typeof e.settings.flex&&(e.settings.flex=1),i.replace(e,t),t.add(e))})},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){this._super(),this.fromJSON(this.settings.data)},bindStates:function(){var n=this;function e(){var e,t,i=0,r=[];if(!1!==n.settings.labelGapCalc)for(("children"===n.settings.labelGapCalc?n.find("formitem"):n.items()).filter("formitem").each(function(e){var t=e.items()[0],n=t.getEl().clientWidth;i=i<n?n:i,r.push(t)}),t=n.settings.labelGap||0,e=r.length;e--;)r[e].settings.minWidth=i+t}n._super(),n.on("show",e),e()}}),fn=dn.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.preRender(),t.preRender(e),'<fieldset id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1">'+(e.settings.title?'<legend id="'+e._id+'-title" class="'+n+'fieldset-title">'+e.settings.title+"</legend>":"")+'<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></fieldset>"}}),hn=0,mn=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:k(e)}},gn={fromHtml:function(e,t){var n=(t||_.document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw _.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return mn(n.childNodes[0])},fromTag:function(e,t){var n=(t||_.document).createElement(e);return mn(n)},fromText:function(e,t){var n=(t||_.document).createTextNode(e);return mn(n)},fromDom:mn,fromPoint:function(e,t,n){var i=e.dom();return N.from(i.elementFromPoint(t,n)).map(mn)}},pn=(_.Node.ATTRIBUTE_NODE,_.Node.CDATA_SECTION_NODE,_.Node.COMMENT_NODE,_.Node.DOCUMENT_NODE),vn=(_.Node.DOCUMENT_TYPE_NODE,_.Node.DOCUMENT_FRAGMENT_NODE,_.Node.ELEMENT_NODE),bn=(_.Node.TEXT_NODE,_.Node.PROCESSING_INSTRUCTION_NODE,_.Node.ENTITY_REFERENCE_NODE,_.Node.ENTITY_NODE,_.Node.NOTATION_NODE,"undefined"!=typeof _.window?_.window:Function("return this;")(),function(e,t){var n=function(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(i.test(t))return i}return undefined}(e,t);if(!n)return{major:0,minor:0};var i=function(e){return Number(t.replace(n,"$"+e))};return xn(i(1),i(2))}),yn=function(){return xn(0,0)},xn=function(e,t){return{major:e,minor:t}},wn={nu:xn,detect:function(e,t){var n=String(t).toLowerCase();return 0===e.length?yn():bn(e,n)},unknown:yn},_n="Firefox",Rn=function(e,t){return function(){return t===e}},Cn=function(e){var t=e.current;return{current:t,version:e.version,isEdge:Rn("Edge",t),isChrome:Rn("Chrome",t),isIE:Rn("IE",t),isOpera:Rn("Opera",t),isFirefox:Rn(_n,t),isSafari:Rn("Safari",t)}},En={unknown:function(){return Cn({current:undefined,version:wn.unknown()})},nu:Cn,edge:k("Edge"),chrome:k("Chrome"),ie:k("IE"),opera:k("Opera"),firefox:k(_n),safari:k("Safari")},kn="Windows",Hn="Android",Sn="Solaris",Tn="FreeBSD",Mn=function(e,t){return function(){return t===e}},Nn=function(e){var t=e.current;return{current:t,version:e.version,isWindows:Mn(kn,t),isiOS:Mn("iOS",t),isAndroid:Mn(Hn,t),isOSX:Mn("OSX",t),isLinux:Mn("Linux",t),isSolaris:Mn(Sn,t),isFreeBSD:Mn(Tn,t)}},Pn={unknown:function(){return Nn({current:undefined,version:wn.unknown()})},nu:Nn,windows:k(kn),ios:k("iOS"),android:k(Hn),linux:k("Linux"),osx:k("OSX"),solaris:k(Sn),freebsd:k(Tn)},Wn=function(e,t){var n=String(t).toLowerCase();return function(e,t){for(var n=0,i=e.length;n<i;n++){var r=e[n];if(t(r,n))return N.some(r)}return N.none()}(e,function(e){return e.search(n)})},Dn=function(e,n){return Wn(e,n).map(function(e){var t=wn.detect(e.versionRegexes,n);return{current:e.name,version:t}})},On=function(e,n){return Wn(e,n).map(function(e){var t=wn.detect(e.versionRegexes,n);return{current:e.name,version:t}})},An=function(e,t){return-1!==e.indexOf(t)},Bn=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Ln=function(t){return function(e){return An(e,t)}},zn=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return An(e,"edge/")&&An(e,"chrome")&&An(e,"safari")&&An(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Bn],search:function(e){return An(e,"chrome")&&!An(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return An(e,"msie")||An(e,"trident")}},{name:"Opera",versionRegexes:[Bn,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Ln("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Ln("firefox")},{name:"Safari",versionRegexes:[Bn,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(An(e,"safari")||An(e,"mobile/"))&&An(e,"applewebkit")}}],In=[{name:"Windows",search:Ln("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return An(e,"iphone")||An(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Ln("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Ln("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Ln("linux"),versionRegexes:[]},{name:"Solaris",search:Ln("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Ln("freebsd"),versionRegexes:[]}],Fn={browsers:k(zn),oses:k(In)},Un=function(e){var t,n,i,r,o,s,a,l,u,c,d,f=Fn.browsers(),h=Fn.oses(),m=Dn(f,e).fold(En.unknown,En.nu),g=On(h,e).fold(Pn.unknown,Pn.nu);return{browser:m,os:g,deviceType:(n=m,i=e,r=(t=g).isiOS()&&!0===/ipad/i.test(i),o=t.isiOS()&&!r,s=t.isAndroid()&&3===t.version.major,a=t.isAndroid()&&4===t.version.major,l=r||s||a&&!0===/mobile/i.test(i),u=t.isiOS()||t.isAndroid(),c=u&&!l,d=n.isSafari()&&t.isiOS()&&!1===/safari/i.test(i),{isiPad:k(r),isiPhone:k(o),isTablet:k(l),isPhone:k(c),isTouch:k(u),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:k(d)})}},Vn=(Vt=!(Ft=function(){var e=_.navigator.userAgent;return Un(e)}),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Vt||(Vt=!0,Ut=Ft.apply(null,e)),Ut}),Yn=vn,$n=pn,qn=function(e){return e.nodeType!==Yn&&e.nodeType!==$n||0===e.childElementCount},Xn=(Vn().browser.isIE(),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}("element","offset"),w.trim),jn=function(t){return function(e){if(e&&1===e.nodeType){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}},Jn=jn("true"),Gn=jn("false"),Kn=function(e,t,n,i,r){return{type:e,title:t,url:n,level:i,attach:r}},Zn=function(e){return e.innerText||e.textContent},Qn=function(e){return e.id?e.id:(t="h",n=(new Date).getTime(),t+"_"+Math.floor(1e9*Math.random())+ ++hn+String(n));var t,n},ei=function(e){return(t=e)&&"A"===t.nodeName&&(t.id||t.name)&&ni(e);var t},ti=function(e){return e&&/^(H[1-6])$/.test(e.nodeName)},ni=function(e){return function(e){for(;e=e.parentNode;){var t=e.contentEditable;if(t&&"inherit"!==t)return Jn(e)}return!1}(e)&&!Gn(e)},ii=function(e){return ti(e)&&ni(e)},ri=function(e){var t,n=Qn(e);return Kn("header",Zn(e),"#"+n,ti(t=e)?parseInt(t.nodeName.substr(1),10):0,function(){e.id=n})},oi=function(e){var t=e.id||e.name,n=Zn(e);return Kn("anchor",n||"#"+t,"#"+t,0,E)},si=function(e){var t,n,i,r,o,s;return t="h1,h2,h3,h4,h5,h6,a:not([href])",n=e,G((Vn().browser.isIE(),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}("element","offset"),i=gn.fromDom(n),r=t,s=(o=i)===undefined?_.document:o.dom(),qn(s)?[]:G(s.querySelectorAll(r),gn.fromDom)),function(e){return e.dom()})},ai=function(e){return 0<Xn(e.title).length},li=function(e){var t,n=si(e);return Z((t=n,G(Z(t,ii),ri)).concat(G(Z(n,ei),oi)),ai)},ui={},ci=function(e){return{title:e.title,value:{title:{raw:e.title},url:e.url,attach:e.attach}}},di=function(e,t){return{title:e,value:{title:e,url:t,attach:E}}},fi=function(e,t,n){var i=t in e?e[t]:n;return!1===i?null:i},hi=function(e,i,r,t){var n,o,s,a,l,u,c={title:"-"},d=function(e){var t=e.hasOwnProperty(r)?e[r]:[],n=Z(t,function(e){return t=e,!J(i,function(e){return e.url===t});var t});return w.map(n,function(e){return{title:e,value:{title:e,url:e,attach:E}}})},f=function(t){var e,n=Z(i,function(e){return e.type===t});return e=n,w.map(e,ci)};return!1===t.typeahead_urls?[]:"file"===r?(n=[mi(e,d(ui)),mi(e,f("header")),mi(e,(a=f("anchor"),l=fi(t,"anchor_top","#top"),u=fi(t,"anchor_bottom","#bottom"),null!==l&&a.unshift(di("<top>",l)),null!==u&&a.push(di("<bottom>",u)),a))],o=function(e,t){return 0===e.length||0===t.length?e.concat(t):e.concat(c,t)},s=[],K(n,function(e){s=o(s,e)}),s):mi(e,d(ui))},mi=function(e,t){var n=e.toLowerCase(),i=w.grep(t,function(e){return-1!==e.title.toLowerCase().indexOf(n)});return 1===i.length&&i[0].title===e?[]:i},gi=function(r,i,o,s){var t=function(e){var t=li(o),n=hi(e,t,s,i);r.showAutoComplete(n,e)};r.on("autocomplete",function(){t(r.value())}),r.on("selectitem",function(e){var t=e.value;r.value(t.url);var n,i=(n=t.title).raw?n.raw:n;"image"===s?r.fire("change",{meta:{alt:i,attach:t.attach}}):r.fire("change",{meta:{text:i,attach:t.attach}}),r.focus()}),r.on("click",function(e){0===r.value().length&&"INPUT"===e.target.nodeName&&t("")}),r.on("PostRender",function(){r.getRoot().on("submit",function(e){var t,n,i;e.isDefaultPrevented()||(t=r.value(),i=ui[n=s],/^https?/.test(t)&&(i?j(i,t).isNone()&&(ui[n]=i.slice(0,5).concat(t)):ui[n]=[t]))})})},pi=function(o,e,n){var i=e.filepicker_validator_handler;i&&o.state.on("change:value",function(e){var t;0!==(t=e.value).length?i({url:t,type:n},function(e){var t,n,i,r=(n=(t=e).status,i=t.message,"valid"===n?{status:"ok",message:i}:"unknown"===n?{status:"warn",message:i}:"invalid"===n?{status:"warn",message:i}:{status:"none",message:""});o.statusMessage(r.message),o.statusLevel(r.status)}):o.statusLevel("none")})},vi=Qt.extend({Statics:{clearHistory:function(){ui={}}},init:function(e){var t,n,i,r=this,o=window.tinymce?window.tinymce.activeEditor:l.activeEditor,s=o.settings,a=e.filetype;e.spellcheck=!1,(i=s.file_picker_types||s.file_browser_callback_types)&&(i=w.makeMap(i,/[, ]/)),i&&!i[a]||(!(n=s.file_picker_callback)||i&&!i[a]?!(n=s.file_browser_callback)||i&&!i[a]||(t=function(){n(r.getEl("inp").id,r.value(),a,window)}):t=function(){var e=r.fire("beforecall").meta;e=w.extend({filetype:a},e),n.call(o,function(e,t){r.value(e).fire("change",{meta:t})},r.value(),e)}),t&&(e.icon="browse",e.onaction=t),r._super(e),r.classes.add("filepicker"),gi(r,s,o.getBody(),a),pi(r,s,a)}}),bi=Xt.extend({recalc:function(e){var t=e.layoutRect(),n=e.paddingBox;e.items().filter(":visible").each(function(e){e.layoutRect({x:n.left,y:n.top,w:t.innerW-n.right-n.left,h:t.innerH-n.top-n.bottom}),e.recalc&&e.recalc()})}}),yi=Xt.extend({recalc:function(e){var t,n,i,r,o,s,a,l,u,c,d,f,h,m,g,p,v,b,y,x,w,_,R,C,E,k,H,S,T,M,N,P,W,D,O,A,B,L=[],z=Math.max,I=Math.min;for(i=e.items().filter(":visible"),r=e.layoutRect(),o=e.paddingBox,s=e.settings,f=e.isRtl()?s.direction||"row-reversed":s.direction,a=s.align,l=e.isRtl()?s.pack||"end":s.pack,u=s.spacing||0,"row-reversed"!==f&&"column-reverse"!==f||(i=i.set(i.toArray().reverse()),f=f.split("-")[0]),"column"===f?(C="y",_="h",R="minH",E="maxH",H="innerH",k="top",S="deltaH",T="contentH",D="left",P="w",M="x",N="innerW",W="minW",O="right",A="deltaW",B="contentW"):(C="x",_="w",R="minW",E="maxW",H="innerW",k="left",S="deltaW",T="contentW",D="top",P="h",M="y",N="innerH",W="minH",O="bottom",A="deltaH",B="contentH"),d=r[H]-o[k]-o[k],w=c=0,t=0,n=i.length;t<n;t++)m=(h=i[t]).layoutRect(),d-=t<n-1?u:0,0<(g=h.settings.flex)&&(c+=g,m[E]&&L.push(h),m.flex=g),d-=m[R],w<(p=o[D]+m[W]+o[O])&&(w=p);if((y={})[R]=d<0?r[R]-d+r[S]:r[H]-d+r[S],y[W]=w+r[A],y[T]=r[H]-d,y[B]=w,y.minW=I(y.minW,r.maxW),y.minH=I(y.minH,r.maxH),y.minW=z(y.minW,r.startMinWidth),y.minH=z(y.minH,r.startMinHeight),!r.autoResize||y.minW===r.minW&&y.minH===r.minH){for(b=d/c,t=0,n=L.length;t<n;t++)(v=(m=(h=L[t]).layoutRect())[E])<(p=m[R]+m.flex*b)?(d-=m[E]-m[R],c-=m.flex,m.flex=0,m.maxFlexSize=v):m.maxFlexSize=0;for(b=d/c,x=o[k],y={},0===c&&("end"===l?x=d+o[k]:"center"===l?(x=Math.round(r[H]/2-(r[H]-d)/2)+o[k])<0&&(x=o[k]):"justify"===l&&(x=o[k],u=Math.floor(d/(i.length-1)))),y[M]=o[D],t=0,n=i.length;t<n;t++)p=(m=(h=i[t]).layoutRect()).maxFlexSize||m[R],"center"===a?y[M]=Math.round(r[N]/2-m[P]/2):"stretch"===a?(y[P]=z(m[W]||0,r[N]-o[D]-o[O]),y[M]=o[D]):"end"===a&&(y[M]=r[N]-m[P]-o.top),0<m.flex&&(p+=m.flex*b),y[_]=p,y[C]=x,h.layoutRect(y),h.recalc&&h.recalc(),x+=p+u}else if(y.w=y.minW,y.h=y.minH,e.layoutRect(y),this.recalc(e),null===e._lastRect){var F=e.parent();F&&(F._lastRect=null,F.recalc())}}}),xi=qt.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(e){e.items().filter(":visible").each(function(e){e.recalc&&e.recalc()})},isNative:function(){return!0}}),wi=function(e,t){return n=t,r=(i=e)===undefined?_.document:i.dom(),qn(r)?N.none():N.from(r.querySelector(n)).map(gn.fromDom);var n,i,r},_i=function(e,t){return function(){e.execCommand("mceToggleFormat",!1,t)}},Ri=function(e,t,n){var i=function(e){n(e,t)};e.formatter?e.formatter.formatChanged(t,i):e.on("init",function(){e.formatter.formatChanged(t,i)})},Ci=function(e,n){return function(t){Ri(e,n,function(e){t.control.active(e)})}},Ei=function(i){var t=["alignleft","aligncenter","alignright","alignjustify"],r="alignleft",e=[{text:"Left",icon:"alignleft",onclick:_i(i,"alignleft")},{text:"Center",icon:"aligncenter",onclick:_i(i,"aligncenter")},{text:"Right",icon:"alignright",onclick:_i(i,"alignright")},{text:"Justify",icon:"alignjustify",onclick:_i(i,"alignjustify")}];i.addMenuItem("align",{text:"Align",menu:e}),i.addButton("align",{type:"menubutton",icon:r,menu:e,onShowMenu:function(e){var n=e.control.menu;w.each(t,function(t,e){n.items().eq(e).each(function(e){return e.active(i.formatter.match(t))})})},onPostRender:function(e){var n=e.control;w.each(t,function(t,e){Ri(i,t,function(e){n.icon(r),e&&n.icon(t)})})}}),w.each({alignleft:["Align left","JustifyLeft"],aligncenter:["Align center","JustifyCenter"],alignright:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"],alignnone:["No alignment","JustifyNone"]},function(e,t){i.addButton(t,{active:!1,tooltip:e[0],cmd:e[1],onPostRender:Ci(i,t)})})},ki=function(e){return e?e.split(",")[0]:""},Hi=function(l,u){return function(){var a=this;a.state.set("value",null),l.on("init nodeChange",function(e){var t,n,i,r,o=l.queryCommandValue("FontName"),s=(t=u,r=(n=o)?n.toLowerCase():"",w.each(t,function(e){e.value.toLowerCase()===r&&(i=e.value)}),w.each(t,function(e){i||ki(e.value).toLowerCase()!==ki(r).toLowerCase()||(i=e.value)}),i);a.value(s||null),!s&&o&&a.text(ki(o))})}},Si=function(n){n.addButton("fontselect",function(){var e,t=(e=function(e){for(var t=(e=e.replace(/;$/,"").split(";")).length;t--;)e[t]=e[t].split("=");return e}(n.settings.font_formats||"Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats"),w.map(e,function(e){return{text:{raw:e[0]},value:e[1],textStyle:-1===e[1].indexOf("dings")?"font-family:"+e[1]:""}}));return{type:"listbox",text:"Font Family",tooltip:"Font Family",values:t,fixedWidth:!0,onPostRender:Hi(n,t),onselect:function(e){e.control.settings.value&&n.execCommand("FontName",!1,e.control.settings.value)}}})},Ti=function(e){Si(e)},Mi=function(e,t){return/[0-9.]+px$/.test(e)?(n=72*parseInt(e,10)/96,i=t||0,r=Math.pow(10,i),Math.round(n*r)/r+"pt"):e;var n,i,r},Ni=function(e,t,n){var i;return w.each(e,function(e){e.value===n?i=n:e.value===t&&(i=t)}),i},Pi=function(n){n.addButton("fontsizeselect",function(){var e,s,a,t=(e=n.settings.fontsize_formats||"8pt 10pt 12pt 14pt 18pt 24pt 36pt",w.map(e.split(" "),function(e){var t=e,n=e,i=e.split("=");return 1<i.length&&(t=i[0],n=i[1]),{text:t,value:n}}));return{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:t,fixedWidth:!0,onPostRender:(s=n,a=t,function(){var o=this;s.on("init nodeChange",function(e){var t,n,i,r;if(t=s.queryCommandValue("FontSize"))for(i=3;!r&&0<=i;i--)n=Mi(t,i),r=Ni(a,n,t);o.value(r||null),r||o.text(n)})}),onclick:function(e){e.control.settings.value&&n.execCommand("FontSize",!1,e.control.settings.value)}}})},Wi=function(e){Pi(e)},Di=function(n,e){var i=e.length;return w.each(e,function(e){e.menu&&(e.hidden=0===Di(n,e.menu));var t=e.format;t&&(e.hidden=!n.formatter.canApply(t)),e.hidden&&i--}),i},Oi=function(n,e){var i=e.items().length;return e.items().each(function(e){e.menu&&e.visible(0<Oi(n,e.menu)),!e.menu&&e.settings.menu&&e.visible(0<Di(n,e.settings.menu));var t=e.settings.format;t&&e.visible(n.formatter.canApply(t)),e.visible()||i--}),i},Ai=function(e){var i,r,o,t,s,n,a,l,u=(r=0,o=[],t=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}],s=function(e){var i=[];if(e)return w.each(e,function(e){var t={text:e.title,icon:e.icon};if(e.items)t.menu=s(e.items);else{var n=e.format||"custom"+r++;e.format||(e.name=n,o.push(e)),t.format=n,t.cmd=e.cmd}i.push(t)}),i},(i=e).on("init",function(){w.each(o,function(e){i.formatter.register(e.name,e)})}),{type:"menu",items:i.settings.style_formats_merge?i.settings.style_formats?s(t.concat(i.settings.style_formats)):s(t):s(i.settings.style_formats||t),onPostRender:function(e){i.fire("renderFormatsMenu",{control:e.control})},itemDefaults:{preview:!0,textStyle:function(){if(this.settings.format)return i.formatter.getCssText(this.settings.format)},onPostRender:function(){var n=this;n.parent().on("show",function(){var e,t;(e=n.settings.format)&&(n.disabled(!i.formatter.canApply(e)),n.active(i.formatter.match(e))),(t=n.settings.cmd)&&n.active(i.queryCommandState(t))})},onclick:function(){this.settings.format&&_i(i,this.settings.format)(),this.settings.cmd&&i.execCommand(this.settings.cmd)}}});n=u,e.addMenuItem("formats",{text:"Formats",menu:n}),l=u,(a=e).addButton("styleselect",{type:"menubutton",text:"Formats",menu:l,onShowMenu:function(){a.settings.style_formats_autohide&&Oi(a,this.menu)}})},Bi=function(n,e){return function(){var r,o,s,t=[];return w.each(e,function(e){t.push({text:e[0],value:e[1],textStyle:function(){return n.formatter.getCssText(e[1])}})}),{type:"listbox",text:e[0][0],values:t,fixedWidth:!0,onselect:function(e){if(e.control){var t=e.control.value();_i(n,t)()}},onPostRender:(r=n,o=t,function(){var t=this;r.on("nodeChange",function(e){var n=r.formatter,i=null;w.each(e.parents,function(t){if(w.each(o,function(e){if(s?n.matchNode(t,s,{value:e.value})&&(i=e.value):n.matchNode(t,e.value)&&(i=e.value),i)return!1}),i)return!1}),t.value(i)})})}}},Li=function(e){var t,n,i=function(e){for(var t=(e=e.replace(/;$/,"").split(";")).length;t--;)e[t]=e[t].split("=");return e}(e.settings.block_formats||"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre");e.addMenuItem("blockformats",{text:"Blocks",menu:(t=e,n=i,w.map(n,function(e){return{text:e[0],onclick:_i(t,e[1]),textStyle:function(){return t.formatter.getCssText(e[1])}}}))}),e.addButton("formatselect",Bi(e,i))},zi=function(t,e){var n,i;if("string"==typeof e)i=e.split(" ");else if(w.isArray(e))return function(e){for(var t=[],n=0,i=e.length;n<i;++n){if(!V(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);X.apply(t,e[n])}return t}(w.map(e,function(e){return zi(t,e)}));return n=w.grep(i,function(e){return"|"===e||e in t.menuItems}),w.map(n,function(e){return"|"===e?{text:"-"}:t.menuItems[e]})},Ii=function(e){return e&&"-"===e.text},Fi=function(n){var i=Z(n,function(e,t){return!Ii(e)||!Ii(n[t-1])});return Z(i,function(e,t){return!Ii(e)||0<t&&t<i.length-1})},Ui=function(e){var t,n,i,r,o=e.settings.insert_button_items;return Fi(o?zi(e,o):(t=e,n="insert",i=[{text:"-"}],r=w.grep(t.menuItems,function(e){return e.context===n}),w.each(r,function(e){"before"===e.separator&&i.push({text:"|"}),e.prependToContext?i.unshift(e):i.push(e),"after"===e.separator&&i.push({text:"|"})}),i))},Vi=function(e){var t;(t=e).addButton("insert",{type:"menubutton",icon:"insert",menu:[],oncreatemenu:function(){this.menu.add(Ui(t)),this.menu.renderNew()}})},Yi=function(e){var n,i,r;n=e,w.each({bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript"},function(e,t){n.addButton(t,{active:!1,tooltip:e,onPostRender:Ci(n,t),onclick:_i(n,t)})}),i=e,w.each({outdent:["Decrease indent","Outdent"],indent:["Increase indent","Indent"],cut:["Cut","Cut"],copy:["Copy","Copy"],paste:["Paste","Paste"],help:["Help","mceHelp"],selectall:["Select all","SelectAll"],visualaid:["Visual aids","mceToggleVisualAid"],newdocument:["New document","mceNewDocument"],removeformat:["Clear formatting","RemoveFormat"],remove:["Remove","Delete"]},function(e,t){i.addButton(t,{tooltip:e[0],cmd:e[1]})}),r=e,w.each({blockquote:["Blockquote","mceBlockQuote"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"]},function(e,t){r.addButton(t,{active:!1,tooltip:e[0],cmd:e[1],onPostRender:Ci(r,t)})})},$i=function(e){var n;Yi(e),n=e,w.each({bold:["Bold","Bold","Meta+B"],italic:["Italic","Italic","Meta+I"],underline:["Underline","Underline","Meta+U"],strikethrough:["Strikethrough","Strikethrough"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],removeformat:["Clear formatting","RemoveFormat"],newdocument:["New document","mceNewDocument"],cut:["Cut","Cut","Meta+X"],copy:["Copy","Copy","Meta+C"],paste:["Paste","Paste","Meta+V"],selectall:["Select all","SelectAll","Meta+A"]},function(e,t){n.addMenuItem(t,{text:e[0],icon:t,shortcut:e[2],cmd:e[1]})}),n.addMenuItem("codeformat",{text:"Code",icon:"code",onclick:_i(n,"code")})},qi=function(n,i){return function(){var e=this,t=function(){var e="redo"===i?"hasRedo":"hasUndo";return!!n.undoManager&&n.undoManager[e]()};e.disabled(!t()),n.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",function(){e.disabled(n.readonly||!t())})}},Xi=function(e){var t,n;(t=e).addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onPostRender:qi(t,"undo"),cmd:"undo"}),t.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onPostRender:qi(t,"redo"),cmd:"redo"}),(n=e).addButton("undo",{tooltip:"Undo",onPostRender:qi(n,"undo"),cmd:"undo"}),n.addButton("redo",{tooltip:"Redo",onPostRender:qi(n,"redo"),cmd:"redo"})},ji=function(e){var t,n;(t=e).addMenuItem("visualaid",{text:"Visual aids",selectable:!0,onPostRender:(n=t,function(){var t=this;n.on("VisualAid",function(e){t.active(e.hasVisual)}),t.active(n.hasVisual)}),cmd:"mceToggleVisualAid"})},Ji={setup:function(e){var t;e.rtl&&(rt.rtl=!0),e.on("mousedown progressstate",function(){Ct.hideAll()}),(t=e).settings.ui_container&&(ce.container=wi(gn.fromDom(_.document.body),t.settings.ui_container).fold(k(null),function(e){return e.dom()})),Nt.tooltips=!ce.iOS,rt.translate=function(e){return l.translate(e)},Li(e),Ei(e),$i(e),Xi(e),Wi(e),Ti(e),Ai(e),ji(e),Vi(e)}},Gi=Xt.extend({recalc:function(e){var t,n,i,r,o,s,a,l,u,c,d,f,h,m,g,p,v,b,y,x,w,_,R,C,E,k,H,S,T=[],M=[];t=e.settings,r=e.items().filter(":visible"),o=e.layoutRect(),i=t.columns||Math.ceil(Math.sqrt(r.length)),n=Math.ceil(r.length/i),b=t.spacingH||t.spacing||0,y=t.spacingV||t.spacing||0,x=t.alignH||t.align,w=t.alignV||t.align,p=e.paddingBox,S="reverseRows"in t?t.reverseRows:e.isRtl(),x&&"string"==typeof x&&(x=[x]),w&&"string"==typeof w&&(w=[w]);for(d=0;d<i;d++)T.push(0);for(f=0;f<n;f++)M.push(0);for(f=0;f<n;f++)for(d=0;d<i&&(c=r[f*i+d]);d++)C=(u=c.layoutRect()).minW,E=u.minH,T[d]=C>T[d]?C:T[d],M[f]=E>M[f]?E:M[f];for(k=o.innerW-p.left-p.right,d=_=0;d<i;d++)_+=T[d]+(0<d?b:0),k-=(0<d?b:0)+T[d];for(H=o.innerH-p.top-p.bottom,f=R=0;f<n;f++)R+=M[f]+(0<f?y:0),H-=(0<f?y:0)+M[f];if(_+=p.left+p.right,R+=p.top+p.bottom,(l={}).minW=_+(o.w-o.innerW),l.minH=R+(o.h-o.innerH),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH,l.minW=Math.min(l.minW,o.maxW),l.minH=Math.min(l.minH,o.maxH),l.minW=Math.max(l.minW,o.startMinWidth),l.minH=Math.max(l.minH,o.startMinHeight),!o.autoResize||l.minW===o.minW&&l.minH===o.minH){var N;o.autoResize&&((l=e.layoutRect(l)).contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH),N="start"===t.packV?0:0<H?Math.floor(H/n):0;var P=0,W=t.flexWidths;if(W)for(d=0;d<W.length;d++)P+=W[d];else P=i;var D=k/P;for(d=0;d<i;d++)T[d]+=W?W[d]*D:D;for(m=p.top,f=0;f<n;f++){for(h=p.left,a=M[f]+N,d=0;d<i&&(c=r[S?f*i+i-1-d:f*i+d]);d++)g=c.settings,u=c.layoutRect(),s=Math.max(T[d],u.startMinWidth),u.x=h,u.y=m,"center"===(v=g.alignH||(x?x[d]||x[0]:null))?u.x=h+s/2-u.w/2:"right"===v?u.x=h+s-u.w:"stretch"===v&&(u.w=s),"center"===(v=g.alignV||(w?w[d]||w[0]:null))?u.y=m+a/2-u.h/2:"bottom"===v?u.y=m+a-u.h:"stretch"===v&&(u.h=a),c.layoutRect(u),h+=s+b,c.recalc&&c.recalc();m+=a+y}}else if(l.w=l.minW,l.h=l.minH,e.layoutRect(l),this.recalc(e),null===e._lastRect){var O=e.parent();O&&(O._lastRect=null,O.recalc())}}}),Ki=Nt.extend({renderHtml:function(){var e=this;return e.classes.add("iframe"),e.canFocus=!1,'<iframe id="'+e._id+'" class="'+e.classes+'" tabindex="-1" src="'+(e.settings.url||"javascript:''")+'" frameborder="0"></iframe>'},src:function(e){this.getEl().src=e},html:function(e,t){var n=this,i=this.getEl().contentWindow.document.body;return i?(i.innerHTML=e,t&&t()):u.setTimeout(function(){n.html(e)}),this}}),Zi=Nt.extend({init:function(e){this._super(e),this.classes.add("widget").add("infobox"),this.canFocus=!1},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},help:function(e){this.state.set("help",e)},renderHtml:function(){var e=this,t=e.classPrefix;return'<div id="'+e._id+'" class="'+e.classes+'"><div id="'+e._id+'-body">'+e.encode(e.state.get("text"))+'<button role="button" tabindex="-1"><i class="'+t+"ico "+t+'i-help"></i></button></div></div>'},bindStates:function(){var t=this;return t.state.on("change:text",function(e){t.getEl("body").firstChild.data=t.encode(e.value),t.state.get("rendered")&&t.updateLayoutRect()}),t.state.on("change:help",function(e){t.classes.toggle("has-help",e.value),t.state.get("rendered")&&t.updateLayoutRect()}),t._super()}}),Qi=Nt.extend({init:function(e){var t=this;t._super(e),t.classes.add("widget").add("label"),t.canFocus=!1,e.multiline&&t.classes.add("autoscroll"),e.strong&&t.classes.add("strong")},initLayoutRect:function(){var e=this,t=e._super();return e.settings.multiline&&(we.getSize(e.getEl()).width>t.maxW&&(t.minW=t.maxW,e.classes.add("multiline")),e.getEl().style.width=t.minW+"px",t.startMinH=t.h=t.minH=Math.min(t.maxH,we.getSize(e.getEl()).height)),t},repaint:function(){return this.settings.multiline||(this.getEl().style.lineHeight=this.layoutRect().h+"px"),this._super()},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},renderHtml:function(){var e,t,n=this,i=n.settings.forId,r=n.settings.html?n.settings.html:n.encode(n.state.get("text"));return!i&&(t=n.settings.forName)&&(e=n.getRoot().find("#"+t)[0])&&(i=e._id),i?'<label id="'+n._id+'" class="'+n.classes+'"'+(i?' for="'+i+'"':"")+">"+r+"</label>":'<span id="'+n._id+'" class="'+n.classes+'">'+r+"</span>"},bindStates:function(){var t=this;return t.state.on("change:text",function(e){t.innerHtml(t.encode(e.value)),t.state.get("rendered")&&t.updateLayoutRect()}),t._super()}}),er=lt.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(e){this._super(e),this.classes.add("toolbar")},postRender:function(){return this.items().each(function(e){e.classes.add("toolbar-item")}),this._super()}}),tr=er.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}}),nr=jt.extend({init:function(e){var t=this;t._renderOpen=!0,t._super(e),e=t.settings,t.classes.add("menubtn"),e.fixedWidth&&t.classes.add("fixed-width"),t.aria("haspopup",!0),t.state.set("menu",e.menu||t.render())},showMenu:function(e){var t,n=this;if(n.menu&&n.menu.visible()&&!1!==e)return n.hideMenu();n.menu||(t=n.state.get("menu")||[],n.classes.add("opened"),t.length?t={type:"menu",animate:!0,items:t}:(t.type=t.type||"menu",t.animate=!0),t.renderTo?n.menu=t.parent(n).show().renderTo():n.menu=v.create(t).parent(n).renderTo(),n.fire("createmenu"),n.menu.reflow(),n.menu.on("cancel",function(e){e.control.parent()===n.menu&&(e.stopPropagation(),n.focus(),n.hideMenu())}),n.menu.on("select",function(){n.focus()}),n.menu.on("show hide",function(e){"hide"===e.type&&e.control.parent()===n&&n.classes.remove("opened-under"),e.control===n.menu&&(n.activeMenu("show"===e.type),n.classes.toggle("opened","show"===e.type)),n.aria("expanded","show"===e.type)}).fire("show")),n.menu.show(),n.menu.layoutRect({w:n.layoutRect().w}),n.menu.repaint(),n.menu.moveRel(n.getEl(),n.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"]);var i=n.menu.layoutRect(),r=n.$el.offset().top+n.layoutRect().h;r>i.y&&r<i.y+i.h&&n.classes.add("opened-under"),n.fire("showmenu")},hideMenu:function(){this.menu&&(this.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),this.menu.hide())},activeMenu:function(e){this.classes.toggle("active",e)},renderHtml:function(){var e,t=this,n=t._id,i=t.classPrefix,r=t.settings.icon,o=t.state.get("text"),s="";return(e=t.settings.image)?(r="none","string"!=typeof e&&(e=_.window.getSelection?e[0]:e[1]),e=" style=\"background-image: url('"+e+"')\""):e="",o&&(t.classes.add("btn-has-text"),s='<span class="'+i+'txt">'+t.encode(o)+"</span>"),r=t.settings.icon?i+"ico "+i+"i-"+r:"",t.aria("role",t.parent()instanceof tr?"menuitem":"button"),'<div id="'+n+'" class="'+t.classes+'" tabindex="-1" aria-labelledby="'+n+'"><button id="'+n+'-open" role="presentation" type="button" tabindex="-1">'+(r?'<i class="'+r+'"'+e+"></i>":"")+s+' <i class="'+i+'caret"></i></button></div>'},postRender:function(){var r=this;return r.on("click",function(e){e.control===r&&function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1}(e.target,r.getEl())&&(r.focus(),r.showMenu(!e.aria),e.aria&&r.menu.items().filter(":visible")[0].focus())}),r.on("mouseenter",function(e){var t,n=e.control,i=r.parent();n&&i&&n instanceof nr&&n.parent()===i&&(i.items().filter("MenuButton").each(function(e){e.hideMenu&&e!==n&&(e.menu&&e.menu.visible()&&(t=!0),e.hideMenu())}),t&&(n.focus(),n.showMenu()))}),r._super()},bindStates:function(){var e=this;return e.state.on("change:menu",function(){e.menu&&e.menu.remove(),e.menu=null}),e._super()},remove:function(){this._super(),this.menu&&this.menu.remove()}}),ir=Ct.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(e){if(e.autohide=!0,e.constrainToViewport=!0,"function"==typeof e.items&&(e.itemsFactory=e.items,e.items=[]),e.itemDefaults)for(var t=e.items,n=t.length;n--;)t[n]=w.extend({},e.itemDefaults,t[n]);this._super(e),this.classes.add("menu"),e.animate&&11!==ce.ie&&this.classes.add("animate")},repaint:function(){return this.classes.toggle("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){this.hideAll(),this.fire("select")},load:function(){var t,n=this;function i(){n.throbber&&(n.throbber.hide(),n.throbber=null)}n.settings.itemsFactory&&(n.throbber||(n.throbber=new Ht(n.getEl("body"),!0),0===n.items().length?(n.throbber.show(),n.fire("loading")):n.throbber.show(100,function(){n.items().remove(),n.fire("loading")}),n.on("hide close",i)),n.requestTime=t=(new Date).getTime(),n.settings.itemsFactory(function(e){0!==e.length?n.requestTime===t&&(n.getEl().style.width="",n.getEl("body").style.width="",i(),n.items().remove(),n.getEl("body").innerHTML="",n.add(e),n.renderNew(),n.fire("loaded")):n.hide()}))},hideAll:function(){return this.find("menuitem").exec("hideMenu"),this._super()},preRender:function(){var n=this;return n.items().each(function(e){var t=e.settings;if(t.icon||t.image||t.selectable)return!(n._hasIcons=!0)}),n.settings.itemsFactory&&n.on("postrender",function(){n.settings.itemsFactory&&n.load()}),n.on("show hide",function(e){e.control===n&&("show"===e.type?u.setTimeout(function(){n.classes.add("in")},0):n.classes.remove("in"))}),n._super()}}),rr=nr.extend({init:function(i){var t,r,o,n,s=this;s._super(i),i=s.settings,s._values=t=i.values,t&&("undefined"!=typeof i.value&&function e(t){for(var n=0;n<t.length;n++){if(r=t[n].selected||i.value===t[n].value)return o=o||t[n].text,s.state.set("value",t[n].value),!0;if(t[n].menu&&e(t[n].menu))return!0}}(t),!r&&0<t.length&&(o=t[0].text,s.state.set("value",t[0].value)),s.state.set("menu",t)),s.state.set("text",i.text||o),s.classes.add("listbox"),s.on("select",function(e){var t=e.control;n&&(e.lastControl=n),i.multiple?t.active(!t.active()):s.value(e.control.value()),n=t})},value:function(n){return 0===arguments.length?this.state.get("value"):(void 0===n||(this.settings.values&&!function t(e){return J(e,function(e){return e.menu?t(e.menu):e.value===n})}(this.settings.values)?null===n&&this.state.set("value",null):this.state.set("value",n)),this)},bindStates:function(){var i=this;return i.on("show",function(e){var t,n;t=e.control,n=i.value(),t instanceof ir&&t.items().each(function(e){e.hasMenus()||e.active(e.value()===n)})}),i.state.on("change:value",function(t){var n=function e(t,n){var i;if(t)for(var r=0;r<t.length;r++){if(t[r].value===n)return t[r];if(t[r].menu&&(i=e(t[r].menu,n)))return i}}(i.state.get("menu"),t.value);n?i.text(n.text):i.text(i.settings.text)}),i._super()}}),or=Nt.extend({Defaults:{border:0,role:"menuitem"},init:function(e){var t,n=this;n._super(e),e=n.settings,n.classes.add("menu-item"),e.menu&&n.classes.add("menu-item-expand"),e.preview&&n.classes.add("menu-item-preview"),"-"!==(t=n.state.get("text"))&&"|"!==t||(n.classes.add("menu-item-sep"),n.aria("role","separator"),n.state.set("text","-")),e.selectable&&(n.aria("role","menuitemcheckbox"),n.classes.add("menu-item-checkbox"),e.icon="selected"),e.preview||e.selectable||n.classes.add("menu-item-normal"),n.on("mousedown",function(e){e.preventDefault()}),e.menu&&!e.ariaHideMenu&&n.aria("haspopup",!0)},hasMenus:function(){return!!this.settings.menu},showMenu:function(){var t,n=this,e=n.settings,i=n.parent();if(i.items().each(function(e){e!==n&&e.hideMenu()}),e.menu){(t=n.menu)?t.show():((t=e.menu).length?t={type:"menu",items:t}:t.type=t.type||"menu",i.settings.itemDefaults&&(t.itemDefaults=i.settings.itemDefaults),(t=n.menu=v.create(t).parent(n).renderTo()).reflow(),t.on("cancel",function(e){e.stopPropagation(),n.focus(),t.hide()}),t.on("show hide",function(e){e.control.items&&e.control.items().each(function(e){e.active(e.settings.selected)})}).fire("show"),t.on("hide",function(e){e.control===t&&n.classes.remove("selected")}),t.submenu=!0),t._parentMenu=i,t.classes.add("menu-sub");var r=t.testMoveRel(n.getEl(),n.isRtl()?["tl-tr","bl-br","tr-tl","br-bl"]:["tr-tl","br-bl","tl-tr","bl-br"]);t.moveRel(n.getEl(),r),r="menu-sub-"+(t.rel=r),t.classes.remove(t._lastRel).add(r),t._lastRel=r,n.classes.add("selected"),n.aria("expanded",!0)}},hideMenu:function(){var e=this;return e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide(),e.aria("expanded",!1)),e},renderHtml:function(){var e,t=this,n=t._id,i=t.settings,r=t.classPrefix,o=t.state.get("text"),s=t.settings.icon,a="",l=i.shortcut,u=t.encode(i.url);function c(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function d(e){var t=i.match||"";return t?e.replace(new RegExp(c(t),"gi"),function(e){return"!mce~match["+e+"]mce~match!"}):e}function f(e){return e.replace(new RegExp(c("!mce~match["),"g"),"<b>").replace(new RegExp(c("]mce~match!"),"g"),"</b>")}return s&&t.parent().classes.add("menu-has-icons"),i.image&&(a=" style=\"background-image: url('"+i.image+"')\""),l&&(l=function(e){var t,n,i={};for(i=ce.mac?{alt:"&#x2325;",ctrl:"&#x2318;",shift:"&#x21E7;",meta:"&#x2318;"}:{meta:"Ctrl"},e=e.split("+"),t=0;t<e.length;t++)(n=i[e[t].toLowerCase()])&&(e[t]=n);return e.join("+")}(l)),s=r+"ico "+r+"i-"+(t.settings.icon||"none"),e="-"!==o?'<i class="'+s+'"'+a+"></i>\xa0":"",o=f(t.encode(d(o))),u=f(t.encode(d(u))),'<div id="'+n+'" class="'+t.classes+'" tabindex="-1">'+e+("-"!==o?'<span id="'+n+'-text" class="'+r+'text">'+o+"</span>":"")+(l?'<div id="'+n+'-shortcut" class="'+r+'menu-shortcut">'+l+"</div>":"")+(i.menu?'<div class="'+r+'caret"></div>':"")+(u?'<div class="'+r+'menu-item-link">'+u+"</div>":"")+"</div>"},postRender:function(){var t=this,n=t.settings,e=n.textStyle;if("function"==typeof e&&(e=e.call(this)),e){var i=t.getEl("text");i&&(i.setAttribute("style",e),t._textStyle=e)}return t.on("mouseenter click",function(e){e.control===t&&(n.menu||"click"!==e.type?(t.showMenu(),e.aria&&t.menu.focus(!0)):(t.fire("select"),u.requestAnimationFrame(function(){t.parent().hideAll()})))}),t._super(),t},hover:function(){return this.parent().items().each(function(e){e.classes.remove("selected")}),this.classes.toggle("selected",!0),this},active:function(e){return function(e,t){var n=e._textStyle;if(n){var i=e.getEl("text");i.setAttribute("style",n),t&&(i.style.color="",i.style.backgroundColor="")}}(this,e),void 0!==e&&this.aria("checked",e),this._super(e)},remove:function(){this._super(),this.menu&&this.menu.remove()}}),sr=Kt.extend({Defaults:{classes:"radio",role:"radio"}}),ar=Nt.extend({renderHtml:function(){var e=this,t=e.classPrefix;return e.classes.add("resizehandle"),"both"===e.settings.direction&&e.classes.add("resizehandle-both"),e.canFocus=!1,'<div id="'+e._id+'" class="'+e.classes+'"><i class="'+t+"ico "+t+'i-resize"></i></div>'},postRender:function(){var t=this;t._super(),t.resizeDragHelper=new ct(this._id,{start:function(){t.fire("ResizeStart")},drag:function(e){"both"!==t.settings.direction&&(e.deltaX=0),t.fire("Resize",e)},stop:function(){t.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}});function lr(e){var t="";if(e)for(var n=0;n<e.length;n++)t+='<option value="'+e[n]+'">'+e[n]+"</option>";return t}var ur=Nt.extend({Defaults:{classes:"selectbox",role:"selectbox",options:[]},init:function(e){var n=this;n._super(e),n.settings.size&&(n.size=n.settings.size),n.settings.options&&(n._options=n.settings.options),n.on("keydown",function(e){var t;13===e.keyCode&&(e.preventDefault(),n.parents().reverse().each(function(e){if(e.toJSON)return t=e,!1}),n.fire("submit",{data:t.toJSON()}))})},options:function(e){return arguments.length?(this.state.set("options",e),this):this.state.get("options")},renderHtml:function(){var e,t=this,n="";return e=lr(t._options),t.size&&(n=' size = "'+t.size+'"'),'<select id="'+t._id+'" class="'+t.classes+'"'+n+">"+e+"</select>"},bindStates:function(){var t=this;return t.state.on("change:options",function(e){t.getEl().innerHTML=lr(e.value)}),t._super()}});function cr(e,t,n){return e<t&&(e=t),n<e&&(e=n),e}function dr(e,t,n){e.setAttribute("aria-"+t,n)}function fr(e,t){var n,i,r,o,s;"v"===e.settings.orientation?(r="top",i="height",n="h"):(r="left",i="width",n="w"),s=e.getEl("handle"),o=((e.layoutRect()[n]||100)-we.getSize(s)[i])*((t-e._minValue)/(e._maxValue-e._minValue))+"px",s.style[r]=o,s.style.height=e.layoutRect().h+"px",dr(s,"valuenow",t),dr(s,"valuetext",""+e.settings.previewFilter(t)),dr(s,"valuemin",e._minValue),dr(s,"valuemax",e._maxValue)}var hr=Nt.extend({init:function(e){var t=this;e.previewFilter||(e.previewFilter=function(e){return Math.round(100*e)/100}),t._super(e),t.classes.add("slider"),"v"===e.orientation&&t.classes.add("vertical"),t._minValue=$(e.minValue)?e.minValue:0,t._maxValue=$(e.maxValue)?e.maxValue:100,t._initValue=t.state.get("value")},renderHtml:function(){var e=this._id,t=this.classPrefix;return'<div id="'+e+'" class="'+this.classes+'"><div id="'+e+'-handle" class="'+t+'slider-handle" role="slider" tabindex="-1"></div></div>'},reset:function(){this.value(this._initValue).repaint()},postRender:function(){var e,t,n,i,r,o,s,a,l,u,c,d,f,h,m=this;e=m._minValue,t=m._maxValue,"v"===m.settings.orientation?(n="screenY",i="top",r="height",o="h"):(n="screenX",i="left",r="width",o="w"),m._super(),function(o,s){function t(e){var t,n,i,r;t=cr(t=(((t=m.value())+(r=n=o))/((i=s)-r)+.05*e)*(i-n)-n,o,s),m.value(t),m.fire("dragstart",{value:t}),m.fire("drag",{value:t}),m.fire("dragend",{value:t})}m.on("keydown",function(e){switch(e.keyCode){case 37:case 38:t(-1);break;case 39:case 40:t(1)}})}(e,t),s=e,a=t,l=m.getEl("handle"),m._dragHelper=new ct(m._id,{handle:m._id+"-handle",start:function(e){u=e[n],c=parseInt(m.getEl("handle").style[i],10),d=(m.layoutRect()[o]||100)-we.getSize(l)[r],m.fire("dragstart",{value:h})},drag:function(e){var t=e[n]-u;f=cr(c+t,0,d),l.style[i]=f+"px",h=s+f/d*(a-s),m.value(h),m.tooltip().text(""+m.settings.previewFilter(h)).show().moveRel(l,"bc tc"),m.fire("drag",{value:h})},stop:function(){m.tooltip().hide(),m.fire("dragend",{value:h})}})},repaint:function(){this._super(),fr(this,this.value())},bindStates:function(){var t=this;return t.state.on("change:value",function(e){fr(t,e.value)}),t._super()}}),mr=Nt.extend({renderHtml:function(){return this.classes.add("spacer"),this.canFocus=!1,'<div id="'+this._id+'" class="'+this.classes+'"></div>'}}),gr=nr.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var e,t,n=this.getEl(),i=this.layoutRect();return this._super(),e=n.firstChild,t=n.lastChild,ye(e).css({width:i.w-we.getSize(t).width,height:i.h-2}),ye(t).css({height:i.h-2}),this},activeMenu:function(e){ye(this.getEl().lastChild).toggleClass(this.classPrefix+"active",e)},renderHtml:function(){var e,t,n=this,i=n._id,r=n.classPrefix,o=n.state.get("icon"),s=n.state.get("text"),a=n.settings,l="";return(e=a.image)?(o="none","string"!=typeof e&&(e=_.window.getSelection?e[0]:e[1]),e=" style=\"background-image: url('"+e+"')\""):e="",o=a.icon?r+"ico "+r+"i-"+o:"",s&&(n.classes.add("btn-has-text"),l='<span class="'+r+'txt">'+n.encode(s)+"</span>"),t="boolean"==typeof a.active?' aria-pressed="'+a.active+'"':"",'<div id="'+i+'" class="'+n.classes+'" role="button"'+t+' tabindex="-1"><button type="button" hidefocus="1" tabindex="-1">'+(o?'<i class="'+o+'"'+e+"></i>":"")+l+'</button><button type="button" class="'+r+'open" hidefocus="1" tabindex="-1">'+(n._menuBtnText?(o?"\xa0":"")+n._menuBtnText:"")+' <i class="'+r+'caret"></i></button></div>'},postRender:function(){var n=this.settings.onclick;return this.on("click",function(e){var t=e.target;if(e.control===this)for(;t;){if(e.aria&&"down"!==e.aria.key||"BUTTON"===t.nodeName&&-1===t.className.indexOf("open"))return e.stopImmediatePropagation(),void(n&&n.call(this,e));t=t.parentNode}}),delete this.settings.onclick,this._super()}}),pr=xi.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"},isNative:function(){return!0}}),vr=pt.extend({Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(n){var e;this.activeTabId&&(e=this.getEl(this.activeTabId),ye(e).removeClass(this.classPrefix+"active"),e.setAttribute("aria-selected","false")),this.activeTabId="t"+n,(e=this.getEl("t"+n)).setAttribute("aria-selected","true"),ye(e).addClass(this.classPrefix+"active"),this.items()[n].show().fire("showtab"),this.reflow(),this.items().each(function(e,t){n!==t&&e.hide()})},renderHtml:function(){var i=this,e=i._layout,r="",o=i.classPrefix;return i.preRender(),e.preRender(i),i.items().each(function(e,t){var n=i._id+"-t"+t;e.aria("role","tabpanel"),e.aria("labelledby",n),r+='<div id="'+n+'" class="'+o+'tab" unselectable="on" role="tab" aria-controls="'+e._id+'" aria-selected="false" tabIndex="-1">'+i.encode(e.settings.title)+"</div>"}),'<div id="'+i._id+'" class="'+i.classes+'" hidefocus="1" tabindex="-1"><div id="'+i._id+'-head" class="'+o+'tabs" role="tablist">'+r+'</div><div id="'+i._id+'-body" class="'+i.bodyClasses+'">'+e.renderHtml(i)+"</div></div>"},postRender:function(){var i=this;i._super(),i.settings.activeTab=i.settings.activeTab||0,i.activateTab(i.settings.activeTab),this.on("click",function(e){var t=e.target.parentNode;if(t&&t.id===i._id+"-head")for(var n=t.childNodes.length;n--;)t.childNodes[n]===e.target&&i.activateTab(n)})},initLayoutRect:function(){var e,t,n,i=this;t=(t=we.getSize(i.getEl("head")).width)<0?0:t,n=0,i.items().each(function(e){t=Math.max(t,e.layoutRect().minW),n=Math.max(n,e.layoutRect().minH)}),i.items().each(function(e){e.settings.x=0,e.settings.y=0,e.settings.w=t,e.settings.h=n,e.layoutRect({x:0,y:0,w:t,h:n})});var r=we.getSize(i.getEl("head")).height;return i.settings.minWidth=t,i.settings.minHeight=n+r,(e=i._super()).deltaH+=r,e.innerH=e.h-e.deltaH,e}}),br=Nt.extend({init:function(e){var n=this;n._super(e),n.classes.add("textbox"),e.multiline?n.classes.add("multiline"):(n.on("keydown",function(e){var t;13===e.keyCode&&(e.preventDefault(),n.parents().reverse().each(function(e){if(e.toJSON)return t=e,!1}),n.fire("submit",{data:t.toJSON()}))}),n.on("keyup",function(e){n.state.set("value",e.target.value)}))},repaint:function(){var e,t,n,i,r,o=this,s=0;e=o.getEl().style,t=o._layoutRect,r=o._lastRepaintRect||{};var a=_.document;return!o.settings.multiline&&a.all&&(!a.documentMode||a.documentMode<=8)&&(e.lineHeight=t.h-s+"px"),i=(n=o.borderBox).left+n.right+8,s=n.top+n.bottom+(o.settings.multiline?8:0),t.x!==r.x&&(e.left=t.x+"px",r.x=t.x),t.y!==r.y&&(e.top=t.y+"px",r.y=t.y),t.w!==r.w&&(e.width=t.w-i+"px",r.w=t.w),t.h!==r.h&&(e.height=t.h-s+"px",r.h=t.h),o._lastRepaintRect=r,o.fire("repaint",{},!1),o},renderHtml:function(){var t,e,n=this,i=n.settings;return t={id:n._id,hidefocus:"1"},w.each(["rows","spellcheck","maxLength","size","readonly","min","max","step","list","pattern","placeholder","required","multiple"],function(e){t[e]=i[e]}),n.disabled()&&(t.disabled="disabled"),i.subtype&&(t.type=i.subtype),(e=we.create(i.multiline?"textarea":"input",t)).value=n.state.get("value"),e.className=n.classes.toString(),e.outerHTML},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl().value),this.state.get("value"))},postRender:function(){var t=this;t.getEl().value=t.state.get("value"),t._super(),t.$el.on("change",function(e){t.state.set("value",e.target.value),t.fire("change",e)})},bindStates:function(){var t=this;return t.state.on("change:value",function(e){t.getEl().value!==e.value&&(t.getEl().value=e.value)}),t.state.on("change:disabled",function(e){t.getEl().disabled=e.value}),t._super()},remove:function(){this.$el.off(),this._super()}}),yr=function(){return{Selector:Ie,Collection:Ve,ReflowQueue:Ke,Control:rt,Factory:v,KeyboardNavigation:st,Container:lt,DragHelper:ct,Scrollable:gt,Panel:pt,Movable:He,Resizable:vt,FloatPanel:Ct,Window:It,MessageBox:Yt,Tooltip:Mt,Widget:Nt,Progress:Pt,Notification:Dt,Layout:qt,AbsoluteLayout:Xt,Button:jt,ButtonGroup:Gt,Checkbox:Kt,ComboBox:Qt,ColorBox:en,PanelButton:tn,ColorButton:rn,ColorPicker:sn,Path:ln,ElementPath:un,FormItem:cn,Form:dn,FieldSet:fn,FilePicker:vi,FitLayout:bi,FlexLayout:yi,FlowLayout:xi,FormatControls:Ji,GridLayout:Gi,Iframe:Ki,InfoBox:Zi,Label:Qi,Toolbar:er,MenuBar:tr,MenuButton:nr,MenuItem:or,Throbber:Ht,Menu:ir,ListBox:rr,Radio:sr,ResizeHandle:ar,SelectBox:ur,Slider:hr,Spacer:mr,SplitButton:gr,StackLayout:pr,TabPanel:vr,TextBox:br,DropZone:an,BrowseButton:Jt}},xr=function(n){n.ui?w.each(yr(),function(e,t){n.ui[t]=e}):n.ui=yr()};w.each(yr(),function(e,t){v.add(t,e)}),xr(window.tinymce?window.tinymce:{}),r.add("modern",function(e){return Ji.setup(e),$t(e)})}(window);                                                                                                                                                                                                                                                                                                                                      tinymce/tiny_mce_popup.js                                                                           0000644                 00000037164 15212564050 0011617 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * tinymce_mce_popup.js
 *
 * Released under LGPL License.
 * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
 *
 * License: http://www.tinymce.com/license
 * Contributing: http://www.tinymce.com/contributing
 */

var tinymce, tinyMCE;

/**
 * TinyMCE popup/dialog helper class. This gives you easy access to the
 * parent editor instance and a bunch of other things. It's higly recommended
 * that you load this script into your dialogs.
 *
 * @static
 * @class tinyMCEPopup
 */
var tinyMCEPopup = {
  /**
   * Initializes the popup this will be called automatically.
   *
   * @method init
   */
  init: function () {
    var self = this, parentWin, settings, uiWindow;

    // Find window & API
    parentWin = self.getWin();
    tinymce = tinyMCE = parentWin.tinymce;
    self.editor = tinymce.EditorManager.activeEditor;
    self.params = self.editor.windowManager.getParams();

    uiWindow = self.editor.windowManager.windows[self.editor.windowManager.windows.length - 1];
    self.features = uiWindow.features;
    self.uiWindow = uiWindow;

    settings = self.editor.settings;

    // Setup popup CSS path(s)
    if (settings.popup_css !== false) {
      if (settings.popup_css) {
        settings.popup_css = self.editor.documentBaseURI.toAbsolute(settings.popup_css);
      } else {
        settings.popup_css = self.editor.baseURI.toAbsolute("plugins/compat3x/css/dialog.css");
      }
    }

    if (settings.popup_css_add) {
      settings.popup_css += ',' + self.editor.documentBaseURI.toAbsolute(settings.popup_css_add);
    }

    // Setup local DOM
    self.dom = self.editor.windowManager.createInstance('tinymce.dom.DOMUtils', document, {
      ownEvents: true,
      proxy: tinyMCEPopup._eventProxy
    });

    self.dom.bind(window, 'ready', self._onDOMLoaded, self);

    // Enables you to skip loading the default css
    if (self.features.popup_css !== false) {
      self.dom.loadCSS(self.features.popup_css || self.editor.settings.popup_css);
    }

    // Setup on init listeners
    self.listeners = [];

    /**
     * Fires when the popup is initialized.
     *
     * @event onInit
     * @param {tinymce.Editor} editor Editor instance.
     * @example
     * // Alerts the selected contents when the dialog is loaded
     * tinyMCEPopup.onInit.add(function(ed) {
     *     alert(ed.selection.getContent());
     * });
     *
     * // Executes the init method on page load in some object using the SomeObject scope
     * tinyMCEPopup.onInit.add(SomeObject.init, SomeObject);
     */
    self.onInit = {
      add: function (func, scope) {
        self.listeners.push({ func: func, scope: scope });
      }
    };

    self.isWindow = !self.getWindowArg('mce_inline');
    self.id = self.getWindowArg('mce_window_id');
  },

  /**
   * Returns the reference to the parent window that opened the dialog.
   *
   * @method getWin
   * @return {Window} Reference to the parent window that opened the dialog.
   */
  getWin: function () {
    // Added frameElement check to fix bug: #2817583
    return (!window.frameElement && window.dialogArguments) || opener || parent || top;
  },

  /**
   * Returns a window argument/parameter by name.
   *
   * @method getWindowArg
   * @param {String} name Name of the window argument to retrieve.
   * @param {String} defaultValue Optional default value to return.
   * @return {String} Argument value or default value if it wasn't found.
   */
  getWindowArg: function (name, defaultValue) {
    var value = this.params[name];

    return tinymce.is(value) ? value : defaultValue;
  },

  /**
   * Returns a editor parameter/config option value.
   *
   * @method getParam
   * @param {String} name Name of the editor config option to retrieve.
   * @param {String} defaultValue Optional default value to return.
   * @return {String} Parameter value or default value if it wasn't found.
   */
  getParam: function (name, defaultValue) {
    return this.editor.getParam(name, defaultValue);
  },

  /**
   * Returns a language item by key.
   *
   * @method getLang
   * @param {String} name Language item like mydialog.something.
   * @param {String} defaultValue Optional default value to return.
   * @return {String} Language value for the item like "my string" or the default value if it wasn't found.
   */
  getLang: function (name, defaultValue) {
    return this.editor.getLang(name, defaultValue);
  },

  /**
   * Executed a command on editor that opened the dialog/popup.
   *
   * @method execCommand
   * @param {String} cmd Command to execute.
   * @param {Boolean} ui Optional boolean value if the UI for the command should be presented or not.
   * @param {Object} val Optional value to pass with the comman like an URL.
   * @param {Object} a Optional arguments object.
   */
  execCommand: function (cmd, ui, val, args) {
    args = args || {};
    args.skip_focus = 1;

    this.restoreSelection();
    return this.editor.execCommand(cmd, ui, val, args);
  },

  /**
   * Resizes the dialog to the inner size of the window. This is needed since various browsers
   * have different border sizes on windows.
   *
   * @method resizeToInnerSize
   */
  resizeToInnerSize: function () {
    /*var self = this;

    // Detach it to workaround a Chrome specific bug
    // https://sourceforge.net/tracker/?func=detail&atid=635682&aid=2926339&group_id=103281
    setTimeout(function() {
      var vp = self.dom.getViewPort(window);

      self.editor.windowManager.resizeBy(
        self.getWindowArg('mce_width') - vp.w,
        self.getWindowArg('mce_height') - vp.h,
        self.id || window
      );
    }, 10);*/
  },

  /**
   * Will executed the specified string when the page has been loaded. This function
   * was added for compatibility with the 2.x branch.
   *
   * @method executeOnLoad
   * @param {String} evil String to evalutate on init.
   */
  executeOnLoad: function (evil) {
    this.onInit.add(function () {
      eval(evil);
    });
  },

  /**
   * Stores the current editor selection for later restoration. This can be useful since some browsers
   * looses it's selection if a control element is selected/focused inside the dialogs.
   *
   * @method storeSelection
   */
  storeSelection: function () {
    this.editor.windowManager.bookmark = tinyMCEPopup.editor.selection.getBookmark(1);
  },

  /**
   * Restores any stored selection. This can be useful since some browsers
   * looses it's selection if a control element is selected/focused inside the dialogs.
   *
   * @method restoreSelection
   */
  restoreSelection: function () {
    var self = tinyMCEPopup;

    if (!self.isWindow && tinymce.isIE) {
      self.editor.selection.moveToBookmark(self.editor.windowManager.bookmark);
    }
  },

  /**
   * Loads a specific dialog language pack. If you pass in plugin_url as a argument
   * when you open the window it will load the <plugin url>/langs/<code>_dlg.js lang pack file.
   *
   * @method requireLangPack
   */
  requireLangPack: function () {
    var self = this, url = self.getWindowArg('plugin_url') || self.getWindowArg('theme_url'), settings = self.editor.settings, lang;

    if (settings.language !== false) {
      lang = settings.language || "en";
    }

    if (url && lang && self.features.translate_i18n !== false && settings.language_load !== false) {
      url += '/langs/' + lang + '_dlg.js';

      if (!tinymce.ScriptLoader.isDone(url)) {
        document.write('<script type="text/javascript" src="' + url + '"></script>');
        tinymce.ScriptLoader.markDone(url);
      }
    }
  },

  /**
   * Executes a color picker on the specified element id. When the user
   * then selects a color it will be set as the value of the specified element.
   *
   * @method pickColor
   * @param {DOMEvent} e DOM event object.
   * @param {string} element_id Element id to be filled with the color value from the picker.
   */
  pickColor: function (e, element_id) {
    var el = document.getElementById(element_id), colorPickerCallback = this.editor.settings.color_picker_callback;
    if (colorPickerCallback) {
      colorPickerCallback.call(
        this.editor,
        function (value) {
          el.value = value;
          try {
            el.onchange();
          } catch (ex) {
            // Try fire event, ignore errors
          }
        },
        el.value
      );
    }
  },

  /**
   * Opens a filebrowser/imagebrowser this will set the output value from
   * the browser as a value on the specified element.
   *
   * @method openBrowser
   * @param {string} element_id Id of the element to set value in.
   * @param {string} type Type of browser to open image/file/flash.
   * @param {string} option Option name to get the file_broswer_callback function name from.
   */
  openBrowser: function (element_id, type) {
    tinyMCEPopup.restoreSelection();
    this.editor.execCallback('file_browser_callback', element_id, document.getElementById(element_id).value, type, window);
  },

  /**
   * Creates a confirm dialog. Please don't use the blocking behavior of this
   * native version use the callback method instead then it can be extended.
   *
   * @method confirm
   * @param {String} t Title for the new confirm dialog.
   * @param {function} cb Callback function to be executed after the user has selected ok or cancel.
   * @param {Object} s Optional scope to execute the callback in.
   */
  confirm: function (t, cb, s) {
    this.editor.windowManager.confirm(t, cb, s, window);
  },

  /**
   * Creates a alert dialog. Please don't use the blocking behavior of this
   * native version use the callback method instead then it can be extended.
   *
   * @method alert
   * @param {String} tx Title for the new alert dialog.
   * @param {function} cb Callback function to be executed after the user has selected ok.
   * @param {Object} s Optional scope to execute the callback in.
   */
  alert: function (tx, cb, s) {
    this.editor.windowManager.alert(tx, cb, s, window);
  },

  /**
   * Closes the current window.
   *
   * @method close
   */
  close: function () {
    var t = this;

    // To avoid domain relaxing issue in Opera
    function close() {
      t.editor.windowManager.close(window);
      tinymce = tinyMCE = t.editor = t.params = t.dom = t.dom.doc = null; // Cleanup
    }

    if (tinymce.isOpera) {
      t.getWin().setTimeout(close, 0);
    } else {
      close();
    }
  },

  // Internal functions

  _restoreSelection: function () {
    var e = window.event.srcElement;

    if (e.nodeName == 'INPUT' && (e.type == 'submit' || e.type == 'button')) {
      tinyMCEPopup.restoreSelection();
    }
  },

  /* _restoreSelection : function() {
      var e = window.event.srcElement;

      // If user focus a non text input or textarea
      if ((e.nodeName != 'INPUT' && e.nodeName != 'TEXTAREA') || e.type != 'text')
        tinyMCEPopup.restoreSelection();
    },*/

  _onDOMLoaded: function () {
    var t = tinyMCEPopup, ti = document.title, h, nv;

    // Translate page
    if (t.features.translate_i18n !== false) {
      var map = {
        "update": "Ok",
        "insert": "Ok",
        "cancel": "Cancel",
        "not_set": "--",
        "class_name": "Class name",
        "browse": "Browse"
      };

      var langCode = (tinymce.settings ? tinymce.settings : t.editor.settings).language || 'en';
      for (var key in map) {
        tinymce.i18n.data[langCode + "." + key] = tinymce.i18n.translate(map[key]);
      }

      h = document.body.innerHTML;

      // Replace a=x with a="x" in IE
      if (tinymce.isIE) {
        h = h.replace(/ (value|title|alt)=([^"][^\s>]+)/gi, ' $1="$2"');
      }

      document.dir = t.editor.getParam('directionality', '');

      if ((nv = t.editor.translate(h)) && nv != h) {
        document.body.innerHTML = nv;
      }

      if ((nv = t.editor.translate(ti)) && nv != ti) {
        document.title = ti = nv;
      }
    }

    if (!t.editor.getParam('browser_preferred_colors', false) || !t.isWindow) {
      t.dom.addClass(document.body, 'forceColors');
    }

    document.body.style.display = '';

    // Restore selection in IE when focus is placed on a non textarea or input element of the type text
    if (tinymce.Env.ie) {
      if (tinymce.Env.ie < 11) {
        document.attachEvent('onmouseup', tinyMCEPopup._restoreSelection);

        // Add base target element for it since it would fail with modal dialogs
        t.dom.add(t.dom.select('head')[0], 'base', { target: '_self' });
      } else {
        document.addEventListener('mouseup', tinyMCEPopup._restoreSelection, false);
      }
    }

    t.restoreSelection();
    t.resizeToInnerSize();

    // Set inline title
    if (!t.isWindow) {
      t.editor.windowManager.setTitle(window, ti);
    } else {
      window.focus();
    }

    if (!tinymce.isIE && !t.isWindow) {
      t.dom.bind(document, 'focus', function () {
        t.editor.windowManager.focus(t.id);
      });
    }

    // Patch for accessibility
    tinymce.each(t.dom.select('select'), function (e) {
      e.onkeydown = tinyMCEPopup._accessHandler;
    });

    // Call onInit
    // Init must be called before focus so the selection won't get lost by the focus call
    tinymce.each(t.listeners, function (o) {
      o.func.call(o.scope, t.editor);
    });

    // Move focus to window
    if (t.getWindowArg('mce_auto_focus', true)) {
      window.focus();

      // Focus element with mceFocus class
      tinymce.each(document.forms, function (f) {
        tinymce.each(f.elements, function (e) {
          if (t.dom.hasClass(e, 'mceFocus') && !e.disabled) {
            e.focus();
            return false; // Break loop
          }
        });
      });
    }

    document.onkeyup = tinyMCEPopup._closeWinKeyHandler;

    if ('textContent' in document) {
      t.uiWindow.getEl('head').firstChild.textContent = document.title;
    } else {
      t.uiWindow.getEl('head').firstChild.innerText = document.title;
    }
  },

  _accessHandler: function (e) {
    e = e || window.event;

    if (e.keyCode == 13 || e.keyCode == 32) {
      var elm = e.target || e.srcElement;

      if (elm.onchange) {
        elm.onchange();
      }

      return tinymce.dom.Event.cancel(e);
    }
  },

  _closeWinKeyHandler: function (e) {
    e = e || window.event;

    if (e.keyCode == 27) {
      tinyMCEPopup.close();
    }
  },

  _eventProxy: function (id) {
    return function (evt) {
      tinyMCEPopup.dom.events.callNativeHandler(id, evt);
    };
  }
};

tinyMCEPopup.init();

tinymce.util.Dispatcher = function (scope) {
  this.scope = scope || this;
  this.listeners = [];

  this.add = function (callback, scope) {
    this.listeners.push({ cb: callback, scope: scope || this.scope });

    return callback;
  };

  this.addToTop = function (callback, scope) {
    var self = this, listener = { cb: callback, scope: scope || self.scope };

    // Create new listeners if addToTop is executed in a dispatch loop
    if (self.inDispatch) {
      self.listeners = [listener].concat(self.listeners);
    } else {
      self.listeners.unshift(listener);
    }

    return callback;
  };

  this.remove = function (callback) {
    var listeners = this.listeners, output = null;

    tinymce.each(listeners, function (listener, i) {
      if (callback == listener.cb) {
        output = listener;
        listeners.splice(i, 1);
        return false;
      }
    });

    return output;
  };

  this.dispatch = function () {
    var self = this, returnValue, args = arguments, i, listeners = self.listeners, listener;

    self.inDispatch = true;

    // Needs to be a real loop since the listener count might change while looping
    // And this is also more efficient
    for (i = 0; i < listeners.length; i++) {
      listener = listeners[i];
      returnValue = listener.cb.apply(listener.scope, args.length > 0 ? args : [listener.scope]);

      if (returnValue === false) {
        break;
      }
    }

    self.inDispatch = false;

    return returnValue;
  };
};
                                                                                                                                                                                                                                                                                                                                                                                                            tinymce/tinymce.min.js                                                                              0000644                 00001312002 15212564050 0011003 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       // 4.9.11 (2020-07-13)
!function(V){"use strict";var o=function(){},H=function(n,r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n(r.apply(null,e))}},q=function(e){return function(){return e}},$=function(e){return e};function d(r){for(var o=[],e=1;e<arguments.length;e++)o[e-1]=arguments[e];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=o.concat(e);return r.apply(null,n)}}var e,t,n,r,i,a,u,s,c,l,f,m,g,p,h,v,y=function(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return!n.apply(null,e)}},b=q(!1),C=q(!0),x=function(){return w},w=(e=function(e){return e.isNone()},r={fold:function(e,t){return e()},is:b,isSome:b,isNone:C,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:q(null),getOrUndefined:q(undefined),or:n,orThunk:t,map:x,each:o,bind:x,exists:b,forall:C,filter:x,equals:e,equals_:e,toArray:function(){return[]},toString:q("none()")},Object.freeze&&Object.freeze(r),r),N=function(n){var e=q(n),t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:C,isNone:b,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return N(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?o:w},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(b,function(e){return t(n,e)})}};return o},_={some:N,none:x,from:function(e){return null===e||e===undefined?w:N(e)}},E=function(t){return function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t}(e)===t}},S=E("string"),T=E("object"),k=E("array"),A=E("null"),R=E("boolean"),D=E("function"),O=E("number"),B=Array.prototype.slice,P=Array.prototype.indexOf,I=Array.prototype.push,L=function(e,t){return P.call(e,t)},F=function(e,t){return-1<L(e,t)},M=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return!0;return!1},W=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r},z=function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)},K=function(e,t){for(var n=[],r=[],o=0,i=e.length;o<i;o++){var a=e[o];(t(a,o)?n:r).push(a)}return{pass:n,fail:r}},U=function(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r)&&n.push(i)}return n},j=function(e,t,n){return z(e,function(e){n=t(n,e)}),n},X=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n))return _.some(o)}return _.none()},Y=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return _.some(n);return _.none()},G=function(e,t){return function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!k(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);I.apply(t,e[n])}return t}(W(e,t))},J=function(e,t){for(var n=0,r=e.length;n<r;++n)if(!0!==t(e[n],n))return!1;return!0},Q=function(e,t){return U(e,function(e){return!F(t,e)})},Z=function(e){return 0===e.length?_.none():_.some(e[0])},ee=function(e){return 0===e.length?_.none():_.some(e[e.length-1])},te=D(Array.from)?Array.from:function(e){return B.call(e)},ne="undefined"!=typeof V.window?V.window:Function("return this;")(),re=function(e,t){return function(e,t){for(var n=t!==undefined&&null!==t?t:ne,r=0;r<e.length&&n!==undefined&&null!==n;++r)n=n[e[r]];return n}(e.split("."),t)},oe={getOrDie:function(e,t){var n=re(e,t);if(n===undefined||null===n)throw new Error(e+" not available on this browser");return n}},ie=function(){return oe.getOrDie("URL")},ae={createObjectURL:function(e){return ie().createObjectURL(e)},revokeObjectURL:function(e){ie().revokeObjectURL(e)}},ue=V.navigator,se=ue.userAgent,ce=function(e){return"matchMedia"in V.window&&V.matchMedia(e).matches};m=/Android/.test(se),a=(a=!(i=/WebKit/.test(se))&&/MSIE/gi.test(se)&&/Explorer/gi.test(ue.appName))&&/MSIE (\w+)\./.exec(se)[1],u=-1!==se.indexOf("Trident/")&&(-1!==se.indexOf("rv:")||-1!==ue.appName.indexOf("Netscape"))&&11,s=-1!==se.indexOf("Edge/")&&!a&&!u&&12,a=a||u||s,c=!i&&!u&&/Gecko/.test(se),l=-1!==se.indexOf("Mac"),f=/(iPad|iPhone)/.test(se),g="FormData"in V.window&&"FileReader"in V.window&&"URL"in V.window&&!!ae.createObjectURL,p=ce("only screen and (max-device-width: 480px)")&&(m||f),h=ce("only screen and (min-width: 800px)")&&(m||f),v=-1!==se.indexOf("Windows Phone"),s&&(i=!1);var le,fe={opera:!1,webkit:i,ie:a,gecko:c,mac:l,iOS:f,android:m,contentEditable:!f||g||534<=parseInt(se.match(/AppleWebKit\/(\d*)/)[1],10),transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!==a,range:V.window.getSelection&&"Range"in V.window,documentMode:a&&!s?V.document.documentMode||7:10,fileApi:g,ceFalse:!1===a||8<a,cacheSuffix:null,container:null,overrideViewPort:null,experimentalShadowDom:!1,canHaveCSP:!1===a||11<a,desktop:!p&&!h,windowsPhone:v},de=window.Promise?window.Promise:function(){function r(e,t){return function(){e.apply(t,arguments)}}var e=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=function(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],l(e,r(o,this),r(u,this))},t=i.immediateFn||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,1)};function a(r){var o=this;null!==this._state?t(function(){var e=o._state?r.onFulfilled:r.onRejected;if(null!==e){var t;try{t=e(o._value)}catch(n){return void r.reject(n)}r.resolve(t)}else(o._state?r.resolve:r.reject)(o._value)}):this._deferreds.push(r)}function o(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void l(r(t,e),r(o,this),r(u,this))}this._state=!0,this._value=e,s.call(this)}catch(n){u.call(this,n)}}function u(e){this._state=!1,this._value=e,s.call(this)}function s(){for(var e=0,t=this._deferreds.length;e<t;e++)a.call(this,this._deferreds[e]);this._deferreds=null}function c(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}function l(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(o){if(r)return;r=!0,n(o)}}return i.prototype["catch"]=function(e){return this.then(null,e)},i.prototype.then=function(n,r){var o=this;return new i(function(e,t){a.call(o,new c(n,r,e,t))})},i.all=function(){var s=Array.prototype.slice.call(1===arguments.length&&e(arguments[0])?arguments[0]:arguments);return new i(function(o,i){if(0===s.length)return o([]);var a=s.length;function u(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){u(t,e)},i)}s[t]=e,0==--a&&o(s)}catch(r){i(r)}}for(var e=0;e<s.length;e++)u(e,s[e])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(e){e(t)})},i.reject=function(n){return new i(function(e,t){t(n)})},i.race=function(o){return new i(function(e,t){for(var n=0,r=o.length;n<r;n++)o[n].then(e,t)})},i}(),me=function(e,t){return"number"!=typeof t&&(t=0),setTimeout(e,t)},ge=function(e,t){return"number"!=typeof t&&(t=1),setInterval(e,t)},pe=function(t,n){var r,e;return(e=function(){var e=arguments;clearTimeout(r),r=me(function(){t.apply(this,e)},n)}).stop=function(){clearTimeout(r)},e},he={requestAnimationFrame:function(e,t){le?le.then(e):le=new de(function(e){t||(t=V.document.body),function(e,t){var n,r=V.window.requestAnimationFrame,o=["ms","moz","webkit"];for(n=0;n<o.length&&!r;n++)r=V.window[o[n]+"RequestAnimationFrame"];r||(r=function(e){V.window.setTimeout(e,0)}),r(e,t)}(e,t)}).then(e)},setTimeout:me,setInterval:ge,setEditorTimeout:function(e,t,n){return me(function(){e.removed||t()},n)},setEditorInterval:function(e,t,n){var r;return r=ge(function(){e.removed?clearInterval(r):t()},n)},debounce:pe,throttle:pe,clearInterval:function(e){return clearInterval(e)},clearTimeout:function(e){return clearTimeout(e)}},ve=/^(?:mouse|contextmenu)|click/,ye={keyLocation:1,layerX:1,layerY:1,returnValue:1,webkitMovementX:1,webkitMovementY:1,keyIdentifier:1},be=function(){return!1},Ce=function(){return!0},xe=function(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent&&e.attachEvent("on"+t,n)},we=function(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r||!1):e.detachEvent&&e.detachEvent("on"+t,n)},Ne=function(e,t){var n,r,o=t||{};for(n in e)ye[n]||(o[n]=e[n]);if(o.target||(o.target=o.srcElement||V.document),fe.experimentalShadowDom&&(o.target=function(e,t){if(e.composedPath){var n=e.composedPath();if(n&&0<n.length)return n[0]}return t}(e,o.target)),e&&ve.test(e.type)&&e.pageX===undefined&&e.clientX!==undefined){var i=o.target.ownerDocument||V.document,a=i.documentElement,u=i.body;o.pageX=e.clientX+(a&&a.scrollLeft||u&&u.scrollLeft||0)-(a&&a.clientLeft||u&&u.clientLeft||0),o.pageY=e.clientY+(a&&a.scrollTop||u&&u.scrollTop||0)-(a&&a.clientTop||u&&u.clientTop||0)}return o.preventDefault=function(){o.isDefaultPrevented=Ce,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},o.stopPropagation=function(){o.isPropagationStopped=Ce,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},!(o.stopImmediatePropagation=function(){o.isImmediatePropagationStopped=Ce,o.stopPropagation()})==((r=o).isDefaultPrevented===Ce||r.isDefaultPrevented===be)&&(o.isDefaultPrevented=be,o.isPropagationStopped=be,o.isImmediatePropagationStopped=be),"undefined"==typeof o.metaKey&&(o.metaKey=!1),o},Ee=function(e,t,n){var r=e.document,o={type:"ready"};if(n.domLoaded)t(o);else{var i=function(){return"complete"===r.readyState||"interactive"===r.readyState&&r.body},a=function(){n.domLoaded||(n.domLoaded=!0,t(o))},u=function(){i()&&(we(r,"readystatechange",u),a())},s=function(){try{r.documentElement.doScroll("left")}catch(e){return void he.setTimeout(s)}a()};!r.addEventListener||fe.ie&&fe.ie<11?(xe(r,"readystatechange",u),r.documentElement.doScroll&&e.self===e.top&&s()):i()?a():xe(e,"DOMContentLoaded",a),xe(e,"load",a)}},Se=function(){var m,g,p,h,v,y=this,b={};g="mce-data-"+(+new Date).toString(32),h="onmouseenter"in V.document.documentElement,p="onfocusin"in V.document.documentElement,v={mouseenter:"mouseover",mouseleave:"mouseout"},m=1,y.domLoaded=!1,y.events=b;var C=function(e,t){var n,r,o,i,a=b[t];if(n=a&&a[e.type])for(r=0,o=n.length;r<o;r++)if((i=n[r])&&!1===i.func.call(i.scope,e)&&e.preventDefault(),e.isImmediatePropagationStopped())return};y.bind=function(e,t,n,r){var o,i,a,u,s,c,l,f=V.window,d=function(e){C(Ne(e||f.event),o)};if(e&&3!==e.nodeType&&8!==e.nodeType){for(e[g]?o=e[g]:(o=m++,e[g]=o,b[o]={}),r=r||e,a=(t=t.split(" ")).length;a--;)c=d,s=l=!1,"DOMContentLoaded"===(u=t[a])&&(u="ready"),y.domLoaded&&"ready"===u&&"complete"===e.readyState?n.call(r,Ne({type:u})):(h||(s=v[u])&&(c=function(e){var t,n;if(t=e.currentTarget,(n=e.relatedTarget)&&t.contains)n=t.contains(n);else for(;n&&n!==t;)n=n.parentNode;n||((e=Ne(e||f.event)).type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=t,C(e,o))}),p||"focusin"!==u&&"focusout"!==u||(l=!0,s="focusin"===u?"focus":"blur",c=function(e){(e=Ne(e||f.event)).type="focus"===e.type?"focusin":"focusout",C(e,o)}),(i=b[o][u])?"ready"===u&&y.domLoaded?n({type:u}):i.push({func:n,scope:r}):(b[o][u]=i=[{func:n,scope:r}],i.fakeName=s,i.capture=l,i.nativeHandler=c,"ready"===u?Ee(e,c,y):xe(e,s||u,c,l)));return e=i=0,n}},y.unbind=function(e,t,n){var r,o,i,a,u,s;if(!e||3===e.nodeType||8===e.nodeType)return y;if(r=e[g]){if(s=b[r],t){for(i=(t=t.split(" ")).length;i--;)if(o=s[u=t[i]]){if(n)for(a=o.length;a--;)if(o[a].func===n){var c=o.nativeHandler,l=o.fakeName,f=o.capture;(o=o.slice(0,a).concat(o.slice(a+1))).nativeHandler=c,o.fakeName=l,o.capture=f,s[u]=o}n&&0!==o.length||(delete s[u],we(e,o.fakeName||u,o.nativeHandler,o.capture))}}else{for(u in s)o=s[u],we(e,o.fakeName||u,o.nativeHandler,o.capture);s={}}for(u in s)return y;delete b[r];try{delete e[g]}catch(d){e[g]=null}}return y},y.fire=function(e,t,n){var r;if(!e||3===e.nodeType||8===e.nodeType)return y;for((n=Ne(null,n)).type=t,n.target=e;(r=e[g])&&C(n,r),(e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow)&&!n.isPropagationStopped(););return y},y.clean=function(e){var t,n,r=y.unbind;if(!e||3===e.nodeType||8===e.nodeType)return y;if(e[g]&&r(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(r(e),t=(n=e.getElementsByTagName("*")).length;t--;)(e=n[t])[g]&&r(e);return y},y.destroy=function(){b={}},y.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}};Se.Event=new Se,Se.Event.bind(V.window,"ready",function(){});var Te,ke,_e,Ae,Re,De,Oe,Be,Pe,Ie,Le,Fe,Me,ze,Ue,je,Ve,He,qe="sizzle"+-new Date,$e=V.window.document,We=0,Ke=0,Xe=Tt(),Ye=Tt(),Ge=Tt(),Je=function(e,t){return e===t&&(Le=!0),0},Qe=typeof undefined,Ze={}.hasOwnProperty,et=[],tt=et.pop,nt=et.push,rt=et.push,ot=et.slice,it=et.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},at="[\\x20\\t\\r\\n\\f]",ut="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",st="\\["+at+"*("+ut+")(?:"+at+"*([*^$|!~]?=)"+at+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ut+"))|)"+at+"*\\]",ct=":("+ut+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+st+")*)|.*)\\)|)",lt=new RegExp("^"+at+"+|((?:^|[^\\\\])(?:\\\\.)*)"+at+"+$","g"),ft=new RegExp("^"+at+"*,"+at+"*"),dt=new RegExp("^"+at+"*([>+~]|"+at+")"+at+"*"),mt=new RegExp("="+at+"*([^\\]'\"]*?)"+at+"*\\]","g"),gt=new RegExp(ct),pt=new RegExp("^"+ut+"$"),ht={ID:new RegExp("^#("+ut+")"),CLASS:new RegExp("^\\.("+ut+")"),TAG:new RegExp("^("+ut+"|[*])"),ATTR:new RegExp("^"+st),PSEUDO:new RegExp("^"+ct),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+at+"*(even|odd|(([+-]|)(\\d*)n|)"+at+"*(?:([+-]|)"+at+"*(\\d+)|))"+at+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+at+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+at+"*((?:-\\d)?\\d*)"+at+"*\\)|)(?=[^-]|$)","i")},vt=/^(?:input|select|textarea|button)$/i,yt=/^h\d$/i,bt=/^[^{]+\{\s*\[native \w/,Ct=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,xt=/[+~]/,wt=/'|\\/g,Nt=new RegExp("\\\\([\\da-f]{1,6}"+at+"?|("+at+")|.)","ig"),Et=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{rt.apply(et=ot.call($e.childNodes),$e.childNodes),et[$e.childNodes.length].nodeType}catch(iE){rt={apply:et.length?function(e,t){nt.apply(e,ot.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}var St=function(e,t,n,r){var o,i,a,u,s,c,l,f,d,m;if((t?t.ownerDocument||t:$e)!==Me&&Fe(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(u=(t=t||Me).nodeType)&&9!==u)return[];if(Ue&&!r){if(o=Ct.exec(e))if(a=o[1]){if(9===u){if(!(i=t.getElementById(a))||!i.parentNode)return n;if(i.id===a)return n.push(i),n}else if(t.ownerDocument&&(i=t.ownerDocument.getElementById(a))&&He(t,i)&&i.id===a)return n.push(i),n}else{if(o[2])return rt.apply(n,t.getElementsByTagName(e)),n;if((a=o[3])&&ke.getElementsByClassName)return rt.apply(n,t.getElementsByClassName(a)),n}if(ke.qsa&&(!je||!je.test(e))){if(f=l=qe,d=t,m=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){for(c=De(e),(l=t.getAttribute("id"))?f=l.replace(wt,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",s=c.length;s--;)c[s]=f+Pt(c[s]);d=xt.test(e)&&Ot(t.parentNode)||t,m=c.join(",")}if(m)try{return rt.apply(n,d.querySelectorAll(m)),n}catch(g){}finally{l||t.removeAttribute("id")}}}return Be(e.replace(lt,"$1"),t,n,r)};function Tt(){var r=[];return function e(t,n){return r.push(t+" ")>_e.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function kt(e){return e[qe]=!0,e}function _t(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function At(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function Rt(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function Dt(a){return kt(function(i){return i=+i,kt(function(e,t){for(var n,r=a([],e.length,i),o=r.length;o--;)e[n=r[o]]&&(e[n]=!(t[n]=e[n]))})})}function Ot(e){return e&&typeof e.getElementsByTagName!==Qe&&e}for(Te in ke=St.support={},Re=St.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},Fe=St.setDocument=function(e){var t,s=e?e.ownerDocument||e:$e,n=s.defaultView;return s!==Me&&9===s.nodeType&&s.documentElement?(ze=(Me=s).documentElement,Ue=!Re(s),n&&n!==function(e){try{return e.top}catch(t){}return null}(n)&&(n.addEventListener?n.addEventListener("unload",function(){Fe()},!1):n.attachEvent&&n.attachEvent("onunload",function(){Fe()})),ke.attributes=!0,ke.getElementsByTagName=!0,ke.getElementsByClassName=bt.test(s.getElementsByClassName),ke.getById=!0,_e.find.ID=function(e,t){if(typeof t.getElementById!==Qe&&Ue){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},_e.filter.ID=function(e){var t=e.replace(Nt,Et);return function(e){return e.getAttribute("id")===t}},_e.find.TAG=ke.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==Qe)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},_e.find.CLASS=ke.getElementsByClassName&&function(e,t){if(Ue)return t.getElementsByClassName(e)},Ve=[],je=[],ke.disconnectedMatch=!0,je=je.length&&new RegExp(je.join("|")),Ve=Ve.length&&new RegExp(Ve.join("|")),t=bt.test(ze.compareDocumentPosition),He=t||bt.test(ze.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Je=t?function(e,t){if(e===t)return Le=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!ke.sortDetached&&t.compareDocumentPosition(e)===n?e===s||e.ownerDocument===$e&&He($e,e)?-1:t===s||t.ownerDocument===$e&&He($e,t)?1:Ie?it.call(Ie,e)-it.call(Ie,t):0:4&n?-1:1)}:function(e,t){if(e===t)return Le=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],u=[t];if(!o||!i)return e===s?-1:t===s?1:o?-1:i?1:Ie?it.call(Ie,e)-it.call(Ie,t):0;if(o===i)return _t(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?_t(a[r],u[r]):a[r]===$e?-1:u[r]===$e?1:0},s):Me},St.matches=function(e,t){return St(e,null,null,t)},St.matchesSelector=function(e,t){if((e.ownerDocument||e)!==Me&&Fe(e),t=t.replace(mt,"='$1']"),ke.matchesSelector&&Ue&&(!Ve||!Ve.test(t))&&(!je||!je.test(t)))try{var n=(void 0).call(e,t);if(n||ke.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(iE){}return 0<St(t,Me,null,[e]).length},St.contains=function(e,t){return(e.ownerDocument||e)!==Me&&Fe(e),He(e,t)},St.attr=function(e,t){(e.ownerDocument||e)!==Me&&Fe(e);var n=_e.attrHandle[t.toLowerCase()],r=n&&Ze.call(_e.attrHandle,t.toLowerCase())?n(e,t,!Ue):undefined;return r!==undefined?r:ke.attributes||!Ue?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},St.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},St.uniqueSort=function(e){var t,n=[],r=0,o=0;if(Le=!ke.detectDuplicates,Ie=!ke.sortStable&&e.slice(0),e.sort(Je),Le){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return Ie=null,e},Ae=St.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=Ae(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=Ae(t);return n},(_e=St.selectors={cacheLength:50,createPseudo:kt,match:ht,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Nt,Et),e[3]=(e[3]||e[4]||e[5]||"").replace(Nt,Et),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||St.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&St.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return ht.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&gt.test(n)&&(t=De(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Nt,Et).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=Xe[e+" "];return t||(t=new RegExp("(^|"+at+")"+e+"("+at+"|$)"))&&Xe(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Qe&&e.getAttribute("class")||"")})},ATTR:function(n,r,o){return function(e){var t=St.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===o:"!="===r?t!==o:"^="===r?o&&0===t.indexOf(o):"*="===r?o&&-1<t.indexOf(o):"$="===r?o&&t.slice(-o.length)===o:"~="===r?-1<(" "+t+" ").indexOf(o):"|="===r&&(t===o||t.slice(0,o.length+1)===o+"-"))}},CHILD:function(m,e,t,g,p){var h="nth"!==m.slice(0,3),v="last"!==m.slice(-4),y="of-type"===e;return 1===g&&0===p?function(e){return!!e.parentNode}:function(e,t,n){var r,o,i,a,u,s,c=h!==v?"nextSibling":"previousSibling",l=e.parentNode,f=y&&e.nodeName.toLowerCase(),d=!n&&!y;if(l){if(h){for(;c;){for(i=e;i=i[c];)if(y?i.nodeName.toLowerCase()===f:1===i.nodeType)return!1;s=c="only"===m&&!s&&"nextSibling"}return!0}if(s=[v?l.firstChild:l.lastChild],v&&d){for(u=(r=(o=l[qe]||(l[qe]={}))[m]||[])[0]===We&&r[1],a=r[0]===We&&r[2],i=u&&l.childNodes[u];i=++u&&i&&i[c]||(a=u=0)||s.pop();)if(1===i.nodeType&&++a&&i===e){o[m]=[We,u,a];break}}else if(d&&(r=(e[qe]||(e[qe]={}))[m])&&r[0]===We)a=r[1];else for(;(i=++u&&i&&i[c]||(a=u=0)||s.pop())&&((y?i.nodeName.toLowerCase()!==f:1!==i.nodeType)||!++a||(d&&((i[qe]||(i[qe]={}))[m]=[We,a]),i!==e)););return(a-=p)===g||a%g==0&&0<=a/g}}},PSEUDO:function(e,i){var t,a=_e.pseudos[e]||_e.setFilters[e.toLowerCase()]||St.error("unsupported pseudo: "+e);return a[qe]?a(i):1<a.length?(t=[e,e,"",i],_e.setFilters.hasOwnProperty(e.toLowerCase())?kt(function(e,t){for(var n,r=a(e,i),o=r.length;o--;)e[n=it.call(e,r[o])]=!(t[n]=r[o])}):function(e){return a(e,0,t)}):a}},pseudos:{not:kt(function(e){var r=[],o=[],u=Oe(e.replace(lt,"$1"));return u[qe]?kt(function(e,t,n,r){for(var o,i=u(e,null,r,[]),a=e.length;a--;)(o=i[a])&&(e[a]=!(t[a]=o))}):function(e,t,n){return r[0]=e,u(r,null,n,o),!o.pop()}}),has:kt(function(t){return function(e){return 0<St(t,e).length}}),contains:kt(function(t){return t=t.replace(Nt,Et),function(e){return-1<(e.textContent||e.innerText||Ae(e)).indexOf(t)}}),lang:kt(function(n){return pt.test(n||"")||St.error("unsupported lang: "+n),n=n.replace(Nt,Et).toLowerCase(),function(e){var t;do{if(t=Ue?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=V.window.location&&V.window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===ze},focus:function(e){return e===Me.activeElement&&(!Me.hasFocus||Me.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!_e.pseudos.empty(e)},header:function(e){return yt.test(e.nodeName)},input:function(e){return vt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:Dt(function(){return[0]}),last:Dt(function(e,t){return[t-1]}),eq:Dt(function(e,t,n){return[n<0?n+t:n]}),even:Dt(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:Dt(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:Dt(function(e,t,n){for(var r=n<0?n+t:n;0<=--r;)e.push(r);return e}),gt:Dt(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=_e.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})_e.pseudos[Te]=At(Te);for(Te in{submit:!0,reset:!0})_e.pseudos[Te]=Rt(Te);function Bt(){}function Pt(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function It(a,e,t){var u=e.dir,s=t&&"parentNode"===u,c=Ke++;return e.first?function(e,t,n){for(;e=e[u];)if(1===e.nodeType||s)return a(e,t,n)}:function(e,t,n){var r,o,i=[We,c];if(n){for(;e=e[u];)if((1===e.nodeType||s)&&a(e,t,n))return!0}else for(;e=e[u];)if(1===e.nodeType||s){if((r=(o=e[qe]||(e[qe]={}))[u])&&r[0]===We&&r[1]===c)return i[2]=r[2];if((o[u]=i)[2]=a(e,t,n))return!0}}}function Lt(o){return 1<o.length?function(e,t,n){for(var r=o.length;r--;)if(!o[r](e,t,n))return!1;return!0}:o[0]}function Ft(e,t,n,r,o){for(var i,a=[],u=0,s=e.length,c=null!=t;u<s;u++)(i=e[u])&&(n&&!n(i,r,o)||(a.push(i),c&&t.push(u)));return a}function Mt(m,g,p,h,v,e){return h&&!h[qe]&&(h=Mt(h)),v&&!v[qe]&&(v=Mt(v,e)),kt(function(e,t,n,r){var o,i,a,u=[],s=[],c=t.length,l=e||function(e,t,n){for(var r=0,o=t.length;r<o;r++)St(e,t[r],n);return n}(g||"*",n.nodeType?[n]:n,[]),f=!m||!e&&g?l:Ft(l,u,m,n,r),d=p?v||(e?m:c||h)?[]:t:f;if(p&&p(f,d,n,r),h)for(o=Ft(d,s),h(o,[],n,r),i=o.length;i--;)(a=o[i])&&(d[s[i]]=!(f[s[i]]=a));if(e){if(v||m){if(v){for(o=[],i=d.length;i--;)(a=d[i])&&o.push(f[i]=a);v(null,d=[],o,r)}for(i=d.length;i--;)(a=d[i])&&-1<(o=v?it.call(e,a):u[i])&&(e[o]=!(t[o]=a))}}else d=Ft(d===t?d.splice(c,d.length):d),v?v(null,t,d,r):rt.apply(t,d)})}function zt(e){for(var r,t,n,o=e.length,i=_e.relative[e[0].type],a=i||_e.relative[" "],u=i?1:0,s=It(function(e){return e===r},a,!0),c=It(function(e){return-1<it.call(r,e)},a,!0),l=[function(e,t,n){return!i&&(n||t!==Pe)||((r=t).nodeType?s(e,t,n):c(e,t,n))}];u<o;u++)if(t=_e.relative[e[u].type])l=[It(Lt(l),t)];else{if((t=_e.filter[e[u].type].apply(null,e[u].matches))[qe]){for(n=++u;n<o&&!_e.relative[e[n].type];n++);return Mt(1<u&&Lt(l),1<u&&Pt(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(lt,"$1"),t,u<n&&zt(e.slice(u,n)),n<o&&zt(e=e.slice(n)),n<o&&Pt(e))}l.push(t)}return Lt(l)}Bt.prototype=_e.filters=_e.pseudos,_e.setFilters=new Bt,De=St.tokenize=function(e,t){var n,r,o,i,a,u,s,c=Ye[e+" "];if(c)return t?0:c.slice(0);for(a=e,u=[],s=_e.preFilter;a;){for(i in n&&!(r=ft.exec(a))||(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),n=!1,(r=dt.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(lt," ")}),a=a.slice(n.length)),_e.filter)!(r=ht[i].exec(a))||s[i]&&!(r=s[i](r))||(n=r.shift(),o.push({value:n,type:i,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?St.error(e):Ye(e,u).slice(0)},Oe=St.compile=function(e,t){var n,h,v,y,b,r,o=[],i=[],a=Ge[e+" "];if(!a){for(t||(t=De(e)),n=t.length;n--;)(a=zt(t[n]))[qe]?o.push(a):i.push(a);(a=Ge(e,(h=i,y=0<(v=o).length,b=0<h.length,r=function(e,t,n,r,o){var i,a,u,s=0,c="0",l=e&&[],f=[],d=Pe,m=e||b&&_e.find.TAG("*",o),g=We+=null==d?1:Math.random()||.1,p=m.length;for(o&&(Pe=t!==Me&&t);c!==p&&null!=(i=m[c]);c++){if(b&&i){for(a=0;u=h[a++];)if(u(i,t,n)){r.push(i);break}o&&(We=g)}y&&((i=!u&&i)&&s--,e&&l.push(i))}if(s+=c,y&&c!==s){for(a=0;u=v[a++];)u(l,f,t,n);if(e){if(0<s)for(;c--;)l[c]||f[c]||(f[c]=tt.call(r));f=Ft(f)}rt.apply(r,f),o&&!e&&0<f.length&&1<s+v.length&&St.uniqueSort(r)}return o&&(We=g,Pe=d),l},y?kt(r):r))).selector=e}return a},Be=St.select=function(e,t,n,r){var o,i,a,u,s,c="function"==typeof e&&e,l=!r&&De(e=c.selector||e);if(n=n||[],1===l.length){if(2<(i=l[0]=l[0].slice(0)).length&&"ID"===(a=i[0]).type&&ke.getById&&9===t.nodeType&&Ue&&_e.relative[i[1].type]){if(!(t=(_e.find.ID(a.matches[0].replace(Nt,Et),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=ht.needsContext.test(e)?0:i.length;o--&&(a=i[o],!_e.relative[u=a.type]);)if((s=_e.find[u])&&(r=s(a.matches[0].replace(Nt,Et),xt.test(i[0].type)&&Ot(t.parentNode)||t))){if(i.splice(o,1),!(e=r.length&&Pt(i)))return rt.apply(n,r),n;break}}return(c||Oe(e,l))(r,t,!Ue,n,xt.test(e)&&Ot(t.parentNode)||t),n},ke.sortStable=qe.split("").sort(Je).join("")===qe,ke.detectDuplicates=!!Le,Fe(),ke.sortDetached=!0;var Ut=Array.isArray,jt=function(e,t,n){var r,o;if(!e)return 0;if(n=n||e,e.length!==undefined){for(r=0,o=e.length;r<o;r++)if(!1===t.call(n,e[r],r,e))return 0}else for(r in e)if(e.hasOwnProperty(r)&&!1===t.call(n,e[r],r,e))return 0;return 1},Vt=function(e,t,n){var r,o;for(r=0,o=e.length;r<o;r++)if(t.call(n,e[r],r,e))return r;return-1},Ht={isArray:Ut,toArray:function(e){var t,n,r=e;if(!Ut(e))for(r=[],t=0,n=e.length;t<n;t++)r[t]=e[t];return r},each:jt,map:function(n,r){var o=[];return jt(n,function(e,t){o.push(r(e,t,n))}),o},filter:function(n,r){var o=[];return jt(n,function(e,t){r&&!r(e,t,n)||o.push(e)}),o},indexOf:function(e,t){var n,r;if(e)for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},reduce:function(e,t,n,r){var o=0;for(arguments.length<3&&(n=e[0]);o<e.length;o++)n=t.call(r,n,e[o],o);return n},findIndex:Vt,find:function(e,t,n){var r=Vt(e,t,n);return-1!==r?e[r]:undefined},last:function(e){return e[e.length-1]}},qt=/^\s*|\s*$/g,$t=function(e){return null===e||e===undefined?"":(""+e).replace(qt,"")},Wt=function(e,t){return t?!("array"!==t||!Ht.isArray(e))||typeof e===t:e!==undefined},Kt=function(e,n,r,o){o=o||this,e&&(r&&(e=e[r]),Ht.each(e,function(e,t){if(!1===n.call(o,e,t,r))return!1;Kt(e,n,r,o)}))},Xt={trim:$t,isArray:Ht.isArray,is:Wt,toArray:Ht.toArray,makeMap:function(e,t,n){var r;for(t=t||",","string"==typeof(e=e||[])&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n},each:Ht.each,map:Ht.map,grep:Ht.filter,inArray:Ht.indexOf,hasOwn:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},extend:function(e,t){for(var n,r,o,i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var u,s=arguments;for(n=1,r=s.length;n<r;n++)for(o in t=s[n])t.hasOwnProperty(o)&&(u=t[o])!==undefined&&(e[o]=u);return e},create:function(e,t,n){var r,o,i,a,u,s=this,c=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),i=e[3].match(/(^|\.)(\w+)$/i)[2],!(o=s.createNS(e[3].replace(/\.\w+$/,""),n))[i]){if("static"===e[2])return o[i]=t,void(this.onCreate&&this.onCreate(e[2],e[3],o[i]));t[i]||(t[i]=function(){},c=1),o[i]=t[i],s.extend(o[i].prototype,t),e[5]&&(r=s.resolve(e[5]).prototype,a=e[5].match(/\.(\w+)$/i)[1],u=o[i],o[i]=c?function(){return r[a].apply(this,arguments)}:function(){return this.parent=r[a],u.apply(this,arguments)},o[i].prototype[i]=o[i],s.each(r,function(e,t){o[i].prototype[t]=r[t]}),s.each(t,function(e,t){r[t]?o[i].prototype[t]=function(){return this.parent=r[t],e.apply(this,arguments)}:t!==i&&(o[i].prototype[t]=e)})),s.each(t["static"],function(e,t){o[i][t]=e})}},walk:Kt,createNS:function(e,t){var n,r;for(t=t||V.window,e=e.split("."),n=0;n<e.length;n++)t[r=e[n]]||(t[r]={}),t=t[r];return t},resolve:function(e,t){var n,r;for(t=t||V.window,n=0,r=(e=e.split(".")).length;n<r&&(t=t[e[n]]);n++);return t},explode:function(e,t){return!e||Wt(e,"array")?e:Ht.map(e.split(t||","),$t)},_addCacheSuffix:function(e){var t=fe.cacheSuffix;return t&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}},Yt=V.document,Gt=Array.prototype.push,Jt=Array.prototype.slice,Qt=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,Zt=Se.Event,en=Xt.makeMap("children,contents,next,prev"),tn=function(e){return void 0!==e},nn=function(e){return"string"==typeof e},rn=function(e,t){var n,r,o;for(o=(t=t||Yt).createElement("div"),n=t.createDocumentFragment(),o.innerHTML=e;r=o.firstChild;)n.appendChild(r);return n},on=function(e,t,n,r){var o;if(nn(t))t=rn(t,bn(e[0]));else if(t.length&&!t.nodeType){if(t=gn.makeArray(t),r)for(o=t.length-1;0<=o;o--)on(e,t[o],n,r);else for(o=0;o<t.length;o++)on(e,t[o],n,r);return e}if(t.nodeType)for(o=e.length;o--;)n.call(e[o],t);return e},an=function(e,t){return e&&t&&-1!==(" "+e.className+" ").indexOf(" "+t+" ")},un=function(e,t,n){var r,o;return t=gn(t)[0],e.each(function(){var e=this;n&&r===e.parentNode||(r=e.parentNode,o=t.cloneNode(!1),e.parentNode.insertBefore(o,e)),o.appendChild(e)}),e},sn=Xt.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),cn=Xt.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),ln={"for":"htmlFor","class":"className",readonly:"readOnly"},fn={"float":"cssFloat"},dn={},mn={},gn=function(e,t){return new gn.fn.init(e,t)},pn=/^\s*|\s*$/g,hn=function(e){return null===e||e===undefined?"":(""+e).replace(pn,"")},vn=function(e,t){var n,r,o,i;if(e)if((n=e.length)===undefined){for(r in e)if(e.hasOwnProperty(r)&&(i=e[r],!1===t.call(i,r,i)))break}else for(o=0;o<n&&(i=e[o],!1!==t.call(i,o,i));o++);return e},yn=function(e,n){var r=[];return vn(e,function(e,t){n(t,e)&&r.push(t)}),r},bn=function(e){return e?9===e.nodeType?e:e.ownerDocument:Yt};gn.fn=gn.prototype={constructor:gn,selector:"",context:null,length:0,init:function(e,t){var n,r,o=this;if(!e)return o;if(e.nodeType)return o.context=o[0]=e,o.length=1,o;if(t&&t.nodeType)o.context=t;else{if(t)return gn(e).attr(t);o.context=t=V.document}if(nn(e)){if(!(n="<"===(o.selector=e).charAt(0)&&">"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:Qt.exec(e)))return gn(t).find(e);if(n[1])for(r=rn(e,bn(t)).firstChild;r;)Gt.call(o,r),r=r.nextSibling;else{if(!(r=bn(t).getElementById(n[2])))return o;if(r.id!==n[2])return o.find(e);o.length=1,o[0]=r}}else this.add(e,!1);return o},toArray:function(){return Xt.toArray(this)},add:function(e,t){var n,r,o=this;if(nn(e))return o.add(gn(e));if(!1!==t)for(n=gn.unique(o.toArray().concat(gn.makeArray(e))),o.length=n.length,r=0;r<n.length;r++)o[r]=n[r];else Gt.apply(o,gn.makeArray(e));return o},attr:function(t,n){var e,r=this;if("object"==typeof t)vn(t,function(e,t){r.attr(e,t)});else{if(!tn(n)){if(r[0]&&1===r[0].nodeType){if((e=dn[t])&&e.get)return e.get(r[0],t);if(cn[t])return r.prop(t)?t:undefined;null===(n=r[0].getAttribute(t,2))&&(n=undefined)}return n}this.each(function(){var e;if(1===this.nodeType){if((e=dn[t])&&e.set)return void e.set(this,n);null===n?this.removeAttribute(t,2):this.setAttribute(t,n,2)}})}return r},removeAttr:function(e){return this.attr(e,null)},prop:function(e,t){var n=this;if("object"==typeof(e=ln[e]||e))vn(e,function(e,t){n.prop(e,t)});else{if(!tn(t))return n[0]&&n[0].nodeType&&e in n[0]?n[0][e]:t;this.each(function(){1===this.nodeType&&(this[e]=t)})}return n},css:function(n,r){var e,o,i=this,t=function(e){return e.replace(/-(\D)/g,function(e,t){return t.toUpperCase()})},a=function(e){return e.replace(/[A-Z]/g,function(e){return"-"+e})};if("object"==typeof n)vn(n,function(e,t){i.css(e,t)});else if(tn(r))n=t(n),"number"!=typeof r||sn[n]||(r=r.toString()+"px"),i.each(function(){var e=this.style;if((o=mn[n])&&o.set)o.set(this,r);else{try{this.style[fn[n]||n]=r}catch(t){}null!==r&&""!==r||(e.removeProperty?e.removeProperty(a(n)):e.removeAttribute(n))}});else{if(e=i[0],(o=mn[n])&&o.get)return o.get(e);if(!e.ownerDocument.defaultView)return e.currentStyle?e.currentStyle[t(n)]:"";try{return e.ownerDocument.defaultView.getComputedStyle(e,null).getPropertyValue(a(n))}catch(u){return undefined}}return i},remove:function(){for(var e,t=this.length;t--;)e=this[t],Zt.clean(e),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var e,t=this.length;t--;)for(e=this[t];e.firstChild;)e.removeChild(e.firstChild);return this},html:function(e){var t,n=this;if(tn(e)){t=n.length;try{for(;t--;)n[t].innerHTML=e}catch(r){gn(n[t]).empty().append(e)}return n}return n[0]?n[0].innerHTML:""},text:function(e){var t,n=this;if(tn(e)){for(t=n.length;t--;)"innerText"in n[t]?n[t].innerText=e:n[0].textContent=e;return n}return n[0]?n[0].innerText||n[0].textContent:""},append:function(){return on(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(e)})},prepend:function(){return on(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(e,this.firstChild)},!0)},before:function(){return this[0]&&this[0].parentNode?on(this,arguments,function(e){this.parentNode.insertBefore(e,this)}):this},after:function(){return this[0]&&this[0].parentNode?on(this,arguments,function(e){this.parentNode.insertBefore(e,this.nextSibling)},!0):this},appendTo:function(e){return gn(e).append(this),this},prependTo:function(e){return gn(e).prepend(this),this},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){return un(this,e)},wrapAll:function(e){return un(this,e,!0)},wrapInner:function(e){return this.each(function(){gn(this).contents().wrapAll(e)}),this},unwrap:function(){return this.parent().each(function(){gn(this).replaceWith(this.childNodes)})},clone:function(){var e=[];return this.each(function(){e.push(this.cloneNode(!0))}),gn(e)},addClass:function(e){return this.toggleClass(e,!0)},removeClass:function(e){return this.toggleClass(e,!1)},toggleClass:function(o,i){var e=this;return"string"!=typeof o||(-1!==o.indexOf(" ")?vn(o.split(" "),function(){e.toggleClass(this,i)}):e.each(function(e,t){var n,r;(r=an(t,o))!==i&&(n=t.className,r?t.className=hn((" "+n+" ").replace(" "+o+" "," ")):t.className+=n?" "+o:o)})),e},hasClass:function(e){return an(this[0],e)},each:function(e){return vn(this,e)},on:function(e,t){return this.each(function(){Zt.bind(this,e,t)})},off:function(e,t){return this.each(function(){Zt.unbind(this,e,t)})},trigger:function(e){return this.each(function(){"object"==typeof e?Zt.fire(this,e.type,e):Zt.fire(this,e)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new gn(Jt.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(e){var t,n,r=[];for(t=0,n=this.length;t<n;t++)gn.find(e,this[t],r);return gn(r)},filter:function(n){return gn("function"==typeof n?yn(this.toArray(),function(e,t){return n(t,e)}):gn.filter(n,this.toArray()))},closest:function(n){var r=[];return n instanceof gn&&(n=n[0]),this.each(function(e,t){for(;t;){if("string"==typeof n&&gn(t).is(n)){r.push(t);break}if(t===n){r.push(t);break}t=t.parentNode}}),gn(r)},offset:function(e){var t,n,r,o,i=0,a=0;return e?this.css(e):((t=this[0])&&(r=(n=t.ownerDocument).documentElement,t.getBoundingClientRect&&(i=(o=t.getBoundingClientRect()).left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,a=o.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:a})},push:Gt,sort:[].sort,splice:[].splice},Xt.extend(gn,{extend:Xt.extend,makeArray:function(e){return(t=e)&&t===t.window||e.nodeType?[e]:Xt.toArray(e);var t},inArray:function(e,t){var n;if(t.indexOf)return t.indexOf(e);for(n=t.length;n--;)if(t[n]===e)return n;return-1},isArray:Xt.isArray,each:vn,trim:hn,grep:yn,find:St,expr:St.selectors,unique:St.uniqueSort,text:St.getText,contains:St.contains,filter:function(e,t,n){var r=t.length;for(n&&(e=":not("+e+")");r--;)1!==t[r].nodeType&&t.splice(r,1);return t=1===t.length?gn.find.matchesSelector(t[0],e)?[t[0]]:[]:gn.find.matches(e,t)}});var Cn=function(e,t,n){var r=[],o=e[t];for("string"!=typeof n&&n instanceof gn&&(n=n[0]);o&&9!==o.nodeType;){if(n!==undefined){if(o===n)break;if("string"==typeof n&&gn(o).is(n))break}1===o.nodeType&&r.push(o),o=o[t]}return r},xn=function(e,t,n,r){var o=[];for(r instanceof gn&&(r=r[0]);e;e=e[t])if(!n||e.nodeType===n){if(r!==undefined){if(e===r)break;if("string"==typeof r&&gn(e).is(r))break}o.push(e)}return o},wn=function(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType===n)return e;return null};vn({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Cn(e,"parentNode")},next:function(e){return wn(e,"nextSibling",1)},prev:function(e){return wn(e,"previousSibling",1)},children:function(e){return xn(e.firstChild,"nextSibling",1)},contents:function(e){return Xt.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,r){gn.fn[e]=function(t){var n=[];return this.each(function(){var e=r.call(n,this,t,n);e&&(gn.isArray(e)?n.push.apply(n,e):n.push(e))}),1<this.length&&(en[e]||(n=gn.unique(n)),0===e.indexOf("parents")&&(n=n.reverse())),n=gn(n),t?n.filter(t):n}}),vn({parentsUntil:function(e,t){return Cn(e,"parentNode",t)},nextUntil:function(e,t){return xn(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return xn(e,"previousSibling",1,t).slice(1)}},function(r,o){gn.fn[r]=function(t,e){var n=[];return this.each(function(){var e=o.call(n,this,t,n);e&&(gn.isArray(e)?n.push.apply(n,e):n.push(e))}),1<this.length&&(n=gn.unique(n),0!==r.indexOf("parents")&&"prevUntil"!==r||(n=n.reverse())),n=gn(n),e?n.filter(e):n}}),gn.fn.is=function(e){return!!e&&0<this.filter(e).length},gn.fn.init.prototype=gn.fn,gn.overrideDefaults=function(n){var r,o=function(e,t){return r=r||n(),0===arguments.length&&(e=r.element),t||(t=r.context),new o.fn.init(e,t)};return gn.extend(o,this),o};var Nn=function(n,r,e){vn(e,function(e,t){n[e]=n[e]||{},n[e][r]=t})};fe.ie&&fe.ie<8&&(Nn(dn,"get",{maxlength:function(e){var t=e.maxLength;return 2147483647===t?undefined:t},size:function(e){var t=e.size;return 20===t?undefined:t},"class":function(e){return e.className},style:function(e){var t=e.style.cssText;return 0===t.length?undefined:t}}),Nn(dn,"set",{"class":function(e,t){e.className=t},style:function(e,t){e.style.cssText=t}})),fe.ie&&fe.ie<9&&(fn["float"]="styleFloat",Nn(mn,"set",{opacity:function(e,t){var n=e.style;null===t||""===t?n.removeAttribute("filter"):(n.zoom=1,n.filter="alpha(opacity="+100*t+")")}})),gn.attrHooks=dn,gn.cssHooks=mn;var En,Sn,Tn,kn,_n,An,Rn,Dn=function(e,t){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}return undefined}(e,t);if(!n)return{major:0,minor:0};var r=function(e){return Number(t.replace(n,"$"+e))};return Bn(r(1),r(2))},On=function(){return Bn(0,0)},Bn=function(e,t){return{major:e,minor:t}},Pn={nu:Bn,detect:function(e,t){var n=String(t).toLowerCase();return 0===e.length?On():Dn(e,n)},unknown:On},In="Firefox",Ln=function(e,t){return function(){return t===e}},Fn=function(e){var t=e.current;return{current:t,version:e.version,isEdge:Ln("Edge",t),isChrome:Ln("Chrome",t),isIE:Ln("IE",t),isOpera:Ln("Opera",t),isFirefox:Ln(In,t),isSafari:Ln("Safari",t)}},Mn={unknown:function(){return Fn({current:undefined,version:Pn.unknown()})},nu:Fn,edge:q("Edge"),chrome:q("Chrome"),ie:q("IE"),opera:q("Opera"),firefox:q(In),safari:q("Safari")},zn="Windows",Un="Android",jn="Solaris",Vn="FreeBSD",Hn=function(e,t){return function(){return t===e}},qn=function(e){var t=e.current;return{current:t,version:e.version,isWindows:Hn(zn,t),isiOS:Hn("iOS",t),isAndroid:Hn(Un,t),isOSX:Hn("OSX",t),isLinux:Hn("Linux",t),isSolaris:Hn(jn,t),isFreeBSD:Hn(Vn,t)}},$n={unknown:function(){return qn({current:undefined,version:Pn.unknown()})},nu:qn,windows:q(zn),ios:q("iOS"),android:q(Un),linux:q("Linux"),osx:q("OSX"),solaris:q(jn),freebsd:q(Vn)},Wn=function(e,t){var n=String(t).toLowerCase();return X(e,function(e){return e.search(n)})},Kn=function(e,n){return Wn(e,n).map(function(e){var t=Pn.detect(e.versionRegexes,n);return{current:e.name,version:t}})},Xn=function(e,n){return Wn(e,n).map(function(e){var t=Pn.detect(e.versionRegexes,n);return{current:e.name,version:t}})},Yn=function(e,t){return-1!==e.indexOf(t)},Gn=function(e){return e.replace(/^\s+|\s+$/g,"")},Jn=function(e){return e.replace(/\s+$/g,"")},Qn=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Zn=function(t){return function(e){return Yn(e,t)}},er=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return Yn(e,"edge/")&&Yn(e,"chrome")&&Yn(e,"safari")&&Yn(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Qn],search:function(e){return Yn(e,"chrome")&&!Yn(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return Yn(e,"msie")||Yn(e,"trident")}},{name:"Opera",versionRegexes:[Qn,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Zn("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Zn("firefox")},{name:"Safari",versionRegexes:[Qn,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(Yn(e,"safari")||Yn(e,"mobile/"))&&Yn(e,"applewebkit")}}],tr=[{name:"Windows",search:Zn("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return Yn(e,"iphone")||Yn(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Zn("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Zn("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Zn("linux"),versionRegexes:[]},{name:"Solaris",search:Zn("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Zn("freebsd"),versionRegexes:[]}],nr={browsers:q(er),oses:q(tr)},rr=function(e){var t,n,r,o,i,a,u,s,c,l,f,d=nr.browsers(),m=nr.oses(),g=Kn(d,e).fold(Mn.unknown,Mn.nu),p=Xn(m,e).fold($n.unknown,$n.nu);return{browser:g,os:p,deviceType:(n=g,r=e,o=(t=p).isiOS()&&!0===/ipad/i.test(r),i=t.isiOS()&&!o,a=t.isAndroid()&&3===t.version.major,u=t.isAndroid()&&4===t.version.major,s=o||a||u&&!0===/mobile/i.test(r),c=t.isiOS()||t.isAndroid(),l=c&&!s,f=n.isSafari()&&t.isiOS()&&!1===/safari/i.test(r),{isiPad:q(o),isiPhone:q(i),isTablet:q(s),isPhone:q(l),isTouch:q(c),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:q(f)})}},or={detect:(En=function(){var e=V.navigator.userAgent;return rr(e)},Tn=!1,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Tn||(Tn=!0,Sn=En.apply(null,e)),Sn})},ir=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:q(e)}},ar={fromHtml:function(e,t){var n=(t||V.document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw V.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return ir(n.childNodes[0])},fromTag:function(e,t){var n=(t||V.document).createElement(e);return ir(n)},fromText:function(e,t){var n=(t||V.document).createTextNode(e);return ir(n)},fromDom:ir,fromPoint:function(e,t,n){var r=e.dom();return _.from(r.elementFromPoint(t,n)).map(ir)}},ur=(V.Node.ATTRIBUTE_NODE,V.Node.CDATA_SECTION_NODE,V.Node.COMMENT_NODE,V.Node.DOCUMENT_NODE),sr=(V.Node.DOCUMENT_TYPE_NODE,V.Node.DOCUMENT_FRAGMENT_NODE,V.Node.ELEMENT_NODE),cr=V.Node.TEXT_NODE,lr=(V.Node.PROCESSING_INSTRUCTION_NODE,V.Node.ENTITY_REFERENCE_NODE,V.Node.ENTITY_NODE,V.Node.NOTATION_NODE,function(e){return e.dom().nodeName.toLowerCase()}),fr=function(t){return function(e){return e.dom().nodeType===t}},dr=fr(sr),mr=fr(cr),gr=Object.keys,pr=Object.hasOwnProperty,hr=function(e,t){for(var n=gr(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i)}},vr=function(e,r){var o={};return hr(e,function(e,t){var n=r(e,t);o[n.k]=n.v}),o},yr=function(e,n){var r={},o={};return hr(e,function(e,t){(n(e,t)?r:o)[t]=e}),{t:r,f:o}},br=function(e,t){return pr.call(e,t)},Cr=function(e){return e.style!==undefined&&D(e.style.getPropertyValue)},xr=function(e,t,n){if(!(S(n)||R(n)||O(n)))throw V.console.error("Invalid call to Attr.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")},wr=function(e,t,n){xr(e.dom(),t,n)},Nr=function(e,t){var n=e.dom();hr(t,function(e,t){xr(n,t,e)})},Er=function(e,t){var n=e.dom().getAttribute(t);return null===n?undefined:n},Sr=function(e,t){e.dom().removeAttribute(t)},Tr=function(e,t){var n=e.dom();hr(t,function(e,t){!function(e,t,n){if(!S(n))throw V.console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);Cr(e)&&e.style.setProperty(t,n)}(n,t,e)})},kr=function(e,t){var n,r,o=e.dom(),i=V.window.getComputedStyle(o).getPropertyValue(t),a=""!==i||(r=mr(n=e)?n.dom().parentNode:n.dom())!==undefined&&null!==r&&r.ownerDocument.body.contains(r)?i:_r(o,t);return null===a?undefined:a},_r=function(e,t){return Cr(e)?e.style.getPropertyValue(t):""},Ar=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];if(t.length!==n.length)throw new Error('Wrong number of arguments to struct. Expected "['+t.length+']", got '+n.length+" arguments");var r={};return z(t,function(e,t){r[e]=q(n[t])}),r}},Rr=function(e,t){for(var n=[],r=function(e){return n.push(e),t(e)},o=t(e);(o=o.bind(r)).isSome(););return n},Dr=function(){return oe.getOrDie("Node")},Or=function(e,t,n){return 0!=(e.compareDocumentPosition(t)&n)},Br=function(e,t){return Or(e,t,Dr().DOCUMENT_POSITION_CONTAINED_BY)},Pr=sr,Ir=ur,Lr=function(e,t){var n=e.dom();if(n.nodeType!==Pr)return!1;var r=n;if(r.matches!==undefined)return r.matches(t);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(t);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(t);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},Fr=function(e){return e.nodeType!==Pr&&e.nodeType!==Ir||0===e.childElementCount},Mr=function(e,t){return e.dom()===t.dom()},zr=or.detect().browser.isIE()?function(e,t){return Br(e.dom(),t.dom())}:function(e,t){var n=e.dom(),r=t.dom();return n!==r&&n.contains(r)},Ur=function(e){return ar.fromDom(e.dom().ownerDocument)},jr=function(e){return ar.fromDom(e.dom().ownerDocument.defaultView)},Vr=function(e){return _.from(e.dom().parentNode).map(ar.fromDom)},Hr=function(e){return _.from(e.dom().previousSibling).map(ar.fromDom)},qr=function(e){return _.from(e.dom().nextSibling).map(ar.fromDom)},$r=function(e){return t=Rr(e,Hr),(n=B.call(t,0)).reverse(),n;var t,n},Wr=function(e){return Rr(e,qr)},Kr=function(e){return W(e.dom().childNodes,ar.fromDom)},Xr=function(e,t){var n=e.dom().childNodes;return _.from(n[t]).map(ar.fromDom)},Yr=function(e){return Xr(e,0)},Gr=function(e){return Xr(e,e.dom().childNodes.length-1)},Jr=(Ar("element","offset"),or.detect().browser),Qr=function(e){return X(e,dr)},Zr={getPos:function(e,t,n){var r,o,i,a=0,u=0,s=e.ownerDocument;if(n=n||e,t){if(n===e&&t.getBoundingClientRect&&"static"===kr(ar.fromDom(e),"position"))return{x:a=(o=t.getBoundingClientRect()).left+(s.documentElement.scrollLeft||e.scrollLeft)-s.documentElement.clientLeft,y:u=o.top+(s.documentElement.scrollTop||e.scrollTop)-s.documentElement.clientTop};for(r=t;r&&r!==n&&r.nodeType;)a+=r.offsetLeft||0,u+=r.offsetTop||0,r=r.offsetParent;for(r=t.parentNode;r&&r!==n&&r.nodeType;)a-=r.scrollLeft||0,u-=r.scrollTop||0,r=r.parentNode;u+=(i=ar.fromDom(t),Jr.isFirefox()&&"table"===lr(i)?Qr(Kr(i)).filter(function(e){return"caption"===lr(e)}).bind(function(o){return Qr(Wr(o)).map(function(e){var t=e.dom().offsetTop,n=o.dom().offsetTop,r=o.dom().offsetHeight;return t<=n?-r:0})}).getOr(0):0)}return{x:a,y:u}}},eo={},to={exports:eo};kn=undefined,_n=eo,An=to,Rn=undefined,function(e){"object"==typeof _n&&void 0!==An?An.exports=e():"function"==typeof kn&&kn.amd?kn([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=e()}(function(){return function i(a,u,s){function c(t,e){if(!u[t]){if(!a[t]){var n="function"==typeof Rn&&Rn;if(!e&&n)return n(t,!0);if(l)return l(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var o=u[t]={exports:{}};a[t][0].call(o.exports,function(e){return c(a[t][1][e]||e)},o,o.exports,i,a,u,s)}return u[t].exports}for(var l="function"==typeof Rn&&Rn,e=0;e<s.length;e++)c(s[e]);return c}({1:[function(e,t,n){var r,o,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(iE){try{return r.call(null,e,0)}catch(iE){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(iE){r=a}try{o="function"==typeof clearTimeout?clearTimeout:u}catch(iE){o=u}}();var c,l=[],f=!1,d=-1;function m(){f&&c&&(f=!1,c.length?l=c.concat(l):d=-1,l.length&&g())}function g(){if(!f){var e=s(m);f=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,f=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===u||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(iE){try{return o.call(null,e)}catch(iE){return o.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function h(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new p(e,t)),1!==l.length||f||s(g)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(e,f,t){(function(n){!function(e){var t=setTimeout;function r(){}function i(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],l(e,this)}function o(n,r){for(;3===n._state;)n=n._value;0!==n._state?(n._handled=!0,i._immediateFn(function(){var e=1===n._state?r.onFulfilled:r.onRejected;if(null!==e){var t;try{t=e(n._value)}catch(iE){return void u(r.promise,iE)}a(r.promise,t)}else(1===n._state?a:u)(r.promise,n._value)})):n._deferreds.push(r)}function a(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof i)return e._state=3,e._value=t,void s(e);if("function"==typeof n)return void l((r=n,o=t,function(){r.apply(o,arguments)}),e)}e._state=1,e._value=t,s(e)}catch(iE){u(e,iE)}var r,o}function u(e,t){e._state=2,e._value=t,s(e)}function s(e){2===e._state&&0===e._deferreds.length&&i._immediateFn(function(){e._handled||i._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)o(e,e._deferreds[t]);e._deferreds=null}function c(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function l(e,t){var n=!1;try{e(function(e){n||(n=!0,a(t,e))},function(e){n||(n=!0,u(t,e))})}catch(r){if(n)return;n=!0,u(t,r)}}i.prototype["catch"]=function(e){return this.then(null,e)},i.prototype.then=function(e,t){var n=new this.constructor(r);return o(this,new c(e,t,n)),n},i.all=function(e){var s=Array.prototype.slice.call(e);return new i(function(o,i){if(0===s.length)return o([]);var a=s.length;function u(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){u(t,e)},i)}s[t]=e,0==--a&&o(s)}catch(r){i(r)}}for(var e=0;e<s.length;e++)u(e,s[e])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(e){e(t)})},i.reject=function(n){return new i(function(e,t){t(n)})},i.race=function(o){return new i(function(e,t){for(var n=0,r=o.length;n<r;n++)o[n].then(e,t)})},i._immediateFn="function"==typeof n?function(e){n(e)}:function(e){t(e,0)},i._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},i._setImmediateFn=function(e){i._immediateFn=e},i._setUnhandledRejectionFn=function(e){i._unhandledRejectionFn=e},void 0!==f&&f.exports?f.exports=i:e.Promise||(e.Promise=i)}(this)}).call(this,e("timers").setImmediate)},{timers:3}],3:[function(s,e,c){(function(e,t){var r=s("process/browser.js").nextTick,n=Function.prototype.apply,o=Array.prototype.slice,i={},a=0;function u(e,t){this._id=e,this._clearFn=t}c.setTimeout=function(){return new u(n.call(setTimeout,window,arguments),clearTimeout)},c.setInterval=function(){return new u(n.call(setInterval,window,arguments),clearInterval)},c.clearTimeout=c.clearInterval=function(e){e.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id)},c.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},c.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},c._unrefActive=c.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},c.setImmediate="function"==typeof e?e:function(e){var t=a++,n=!(arguments.length<2)&&o.call(arguments,1);return i[t]=!0,r(function(){i[t]&&(n?e.apply(null,n):e.call(null),c.clearImmediate(t))}),t},c.clearImmediate="function"==typeof t?t:function(e){delete i[e]}}).call(this,s("timers").setImmediate,s("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(e,t,n){var r=e("promise-polyfill"),o="undefined"!=typeof window?window:Function("return this;")();t.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)});var no=to.exports.boltExport,ro=function(e){var n=_.none(),t=[],r=function(e){o()?a(e):t.push(e)},o=function(){return n.isSome()},i=function(e){z(e,a)},a=function(t){n.each(function(e){V.setTimeout(function(){t(e)},0)})};return e(function(e){n=_.some(e),i(t),t=[]}),{get:r,map:function(n){return ro(function(t){r(function(e){t(n(e))})})},isReady:o}},oo={nu:ro,pure:function(t){return ro(function(e){e(t)})}},io=function(e){V.setTimeout(function(){throw e},0)},ao=function(n){var e=function(e){n().then(e,io)};return{map:function(e){return ao(function(){return n().then(e)})},bind:function(t){return ao(function(){return n().then(function(e){return t(e).toPromise()})})},anonBind:function(e){return ao(function(){return n().then(function(){return e.toPromise()})})},toLazy:function(){return oo.nu(e)},toCached:function(){var e=null;return ao(function(){return null===e&&(e=n()),e})},toPromise:n,get:e}},uo={nu:function(e){return ao(function(){return new no(e)})},pure:function(e){return ao(function(){return no.resolve(e)})}},so=function(a,e){return e(function(r){var o=[],i=0;0===a.length?r([]):z(a,function(e,t){var n;e.get((n=t,function(e){o[n]=e,++i>=a.length&&r(o)}))})})},co=function(e){return so(e,uo.nu)},lo=function(n){return{is:function(e){return n===e},isValue:C,isError:b,getOr:q(n),getOrThunk:q(n),getOrDie:q(n),or:function(e){return lo(n)},orThunk:function(e){return lo(n)},fold:function(e,t){return t(n)},map:function(e){return lo(e(n))},mapError:function(e){return lo(n)},each:function(e){e(n)},bind:function(e){return e(n)},exists:function(e){return e(n)},forall:function(e){return e(n)},toOption:function(){return _.some(n)}}},fo=function(n){return{is:b,isValue:b,isError:C,getOr:$,getOrThunk:function(e){return e()},getOrDie:function(){return e=String(n),function(){throw new Error(e)}();var e},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,t){return e(n)},map:function(e){return fo(n)},mapError:function(e){return fo(e(n))},each:o,bind:function(e){return fo(n)},exists:b,forall:C,toOption:_.none}},mo={value:lo,error:fo,fromOption:function(e,t){return e.fold(function(){return fo(t)},lo)}};function go(e,u){var t=e,n=function(e,t,n,r){var o,i;if(e){if(!r&&e[t])return e[t];if(e!==u){if(o=e[n])return o;for(i=e.parentNode;i&&i!==u;i=i.parentNode)if(o=i[n])return o}}};this.current=function(){return t},this.next=function(e){return t=n(t,"firstChild","nextSibling",e)},this.prev=function(e){return t=n(t,"lastChild","previousSibling",e)},this.prev2=function(e){return t=function(e,t,n,r){var o,i,a;if(e){if(o=e[n],u&&o===u)return;if(o){if(!r)for(a=o[t];a;a=a[t])if(!a[t])return a;return o}if((i=e.parentNode)&&i!==u)return i}}(t,"lastChild","previousSibling",e)}}var po,ho,vo,yo=function(t){var n;return function(e){return(n=n||function(e,t){for(var n={},r=0,o=e.length;r<o;r++){var i=e[r];n[String(i)]=t(i,r)}return n}(t,q(!0))).hasOwnProperty(lr(e))}},bo=yo(["h1","h2","h3","h4","h5","h6"]),Co=yo(["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"]),xo=function(e){return dr(e)&&!Co(e)},wo=function(e){return dr(e)&&"br"===lr(e)},No=yo(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),Eo=yo(["ul","ol","dl"]),So=yo(["li","dd","dt"]),To=yo(["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param","embed","source","wbr","track"]),ko=yo(["thead","tbody","tfoot"]),_o=yo(["td","th"]),Ao=yo(["pre","script","textarea","style"]),Ro=function(t){return function(e){return!!e&&e.nodeType===t}},Do=Ro(1),Oo=function(e){var r=e.toLowerCase().split(" ");return function(e){var t,n;if(e&&e.nodeType)for(n=e.nodeName.toLowerCase(),t=0;t<r.length;t++)if(n===r[t])return!0;return!1}},Bo=function(t){return function(e){if(Do(e)){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}},Po=Ro(3),Io=Ro(8),Lo=Ro(9),Fo=Ro(11),Mo=Oo("br"),zo=Bo("true"),Uo=Bo("false"),jo={isText:Po,isElement:Do,isComment:Io,isDocument:Lo,isDocumentFragment:Fo,isBr:Mo,isContentEditableTrue:zo,isContentEditableFalse:Uo,isRestrictedNode:function(e){return!!e&&!Object.getPrototypeOf(e)},matchNodeNames:Oo,hasPropValue:function(t,n){return function(e){return Do(e)&&e[t]===n}},hasAttribute:function(t,e){return function(e){return Do(e)&&e.hasAttribute(t)}},hasAttributeValue:function(t,n){return function(e){return Do(e)&&e.getAttribute(t)===n}},matchStyleValues:function(r,e){var o=e.toLowerCase().split(" ");return function(e){var t;if(Do(e))for(t=0;t<o.length;t++){var n=e.ownerDocument.defaultView.getComputedStyle(e,null);if((n?n.getPropertyValue(r):null)===o[t])return!0}return!1}},isBogus:function(e){return Do(e)&&e.hasAttribute("data-mce-bogus")},isBogusAll:function(e){return Do(e)&&"all"===e.getAttribute("data-mce-bogus")},isTable:function(e){return Do(e)&&"TABLE"===e.tagName}},Vo=function(e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},Ho=function(e,t){var n,r=t.childNodes;if(!jo.isElement(t)||!Vo(t)){for(n=r.length-1;0<=n;n--)Ho(e,r[n]);if(!1===jo.isDocument(t)){if(jo.isText(t)&&0<t.nodeValue.length){var o=Xt.trim(t.nodeValue).length;if(e.isBlock(t.parentNode)||0<o)return;if(0===o&&(a=(i=t).previousSibling&&"SPAN"===i.previousSibling.nodeName,u=i.nextSibling&&"SPAN"===i.nextSibling.nodeName,a&&u))return}else if(jo.isElement(t)&&(1===(r=t.childNodes).length&&Vo(r[0])&&t.parentNode.insertBefore(r[0],t),r.length||To(ar.fromDom(t))))return;e.remove(t)}var i,a,u;return t}},qo={trimNode:Ho},$o=Xt.makeMap,Wo=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ko=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Xo=/[<>&\"\']/g,Yo=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,Go={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};ho={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},vo={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"};var Jo=function(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n<e.length;n+=2)r=String.fromCharCode(parseInt(e[n],t)),ho[r]||(o="&"+e[n+1]+";",i[r]=o,i[o]=r);return i}};po=Jo("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);var Qo=function(e,t){return e.replace(t?Wo:Ko,function(e){return ho[e]||e})},Zo=function(e,t){return e.replace(t?Wo:Ko,function(e){return 1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":ho[e]||"&#"+e.charCodeAt(0)+";"})},ei=function(e,t,n){return n=n||po,e.replace(t?Wo:Ko,function(e){return ho[e]||n[e]||e})},ti={encodeRaw:Qo,encodeAllRaw:function(e){return(""+e).replace(Xo,function(e){return ho[e]||e})},encodeNumeric:Zo,encodeNamed:ei,getEncodeFunc:function(e,t){var n=Jo(t)||po,r=$o(e.replace(/\+/g,","));return r.named&&r.numeric?function(e,t){return e.replace(t?Wo:Ko,function(e){return ho[e]!==undefined?ho[e]:n[e]!==undefined?n[e]:1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":"&#"+e.charCodeAt(0)+";"})}:r.named?t?function(e,t){return ei(e,t,n)}:ei:r.numeric?Zo:Qo},decode:function(e){return e.replace(Yo,function(e,t){return t?65535<(t="x"===t.charAt(0).toLowerCase()?parseInt(t.substr(1),16):parseInt(t,10))?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):Go[t]||String.fromCharCode(t):vo[e]||po[e]||(n=e,(r=ar.fromTag("div").dom()).innerHTML=n,r.textContent||r.innerText||n);var n,r})}},ni={},ri={},oi=Xt.makeMap,ii=Xt.each,ai=Xt.extend,ui=Xt.explode,si=Xt.inArray,ci=function(e,t){return(e=Xt.trim(e))?e.split(t||" "):[]},li=function(e){var u,t,n,r,o,i,s={},a=function(e,t,n){var r,o,i,a=function(e,t){var n,r,o={};for(n=0,r=e.length;n<r;n++)o[e[n]]=t||{};return o};for(t=t||"","string"==typeof(n=n||[])&&(n=ci(n)),r=(e=ci(e)).length;r--;)i={attributes:a(o=ci([u,t].join(" "))),attributesOrder:o,children:a(n,ri)},s[e[r]]=i},c=function(e,t){var n,r,o,i;for(n=(e=ci(e)).length,t=ci(t);n--;)for(r=s[e[n]],o=0,i=t.length;o<i;o++)r.attributes[t[o]]={},r.attributesOrder.push(t[o])};return ni[e]?ni[e]:(u="id accesskey class dir lang style tabindex title role",t="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",n="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment","html4"!==e&&(u+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",t+=" article aside details dialog figure main header footer hgroup section nav",n+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!==e&&(u+=" xml:lang",n=[n,i="acronym applet basefont big font strike tt"].join(" "),ii(ci(i),function(e){a(e,"",n)}),t=[t,o="center dir isindex noframes"].join(" "),r=[t,n].join(" "),ii(ci(o),function(e){a(e,"",r)})),r=r||[t,n].join(" "),a("html","manifest","head body"),a("head","","base command link meta noscript script style title"),a("title hr noscript br"),a("base","href target"),a("link","href rel media hreflang type sizes hreflang"),a("meta","name http-equiv content charset"),a("style","media type scoped"),a("script","src async defer type charset"),a("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",r),a("address dt dd div caption","",r),a("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",n),a("blockquote","cite",r),a("ol","reversed start type","li"),a("ul","","li"),a("li","value",r),a("dl","","dt dd"),a("a","href target rel media hreflang type",n),a("q","cite",n),a("ins del","cite datetime",r),a("img","src sizes srcset alt usemap ismap width height"),a("iframe","src name width height",r),a("embed","src type width height"),a("object","data type typemustmatch name usemap form width height",[r,"param"].join(" ")),a("param","name value"),a("map","name",[r,"area"].join(" ")),a("area","alt coords shape href target rel media hreflang type"),a("table","border","caption colgroup thead tfoot tbody tr"+("html4"===e?" col":"")),a("colgroup","span","col"),a("col","span"),a("tbody thead tfoot","","tr"),a("tr","","td th"),a("td","colspan rowspan headers",r),a("th","colspan rowspan headers scope abbr",r),a("form","accept-charset action autocomplete enctype method name novalidate target",r),a("fieldset","disabled form name",[r,"legend"].join(" ")),a("label","form for",n),a("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),a("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===e?r:n),a("select","disabled form multiple name required size","option optgroup"),a("optgroup","disabled label","option"),a("option","disabled label selected value"),a("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),a("menu","type label",[r,"li"].join(" ")),a("noscript","",r),"html4"!==e&&(a("wbr"),a("ruby","",[n,"rt rp"].join(" ")),a("figcaption","",r),a("mark rt rp summary bdi","",n),a("canvas","width height",r),a("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[r,"track source"].join(" ")),a("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[r,"track source"].join(" ")),a("picture","","img source"),a("source","src srcset type media sizes"),a("track","kind src srclang label default"),a("datalist","",[n,"option"].join(" ")),a("article section nav aside main header footer","",r),a("hgroup","","h1 h2 h3 h4 h5 h6"),a("figure","",[r,"figcaption"].join(" ")),a("time","datetime",n),a("dialog","open",r),a("command","type label icon disabled checked radiogroup command"),a("output","for form name",n),a("progress","value max",n),a("meter","value min max low high optimum",n),a("details","open",[r,"summary"].join(" ")),a("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!==e&&(c("script","language xml:space"),c("style","xml:space"),c("object","declare classid code codebase codetype archive standby align border hspace vspace"),c("embed","align name hspace vspace"),c("param","valuetype type"),c("a","charset name rev shape coords"),c("br","clear"),c("applet","codebase archive code object alt name width height align hspace vspace"),c("img","name longdesc align border hspace vspace"),c("iframe","longdesc frameborder marginwidth marginheight scrolling align"),c("font basefont","size color face"),c("input","usemap align"),c("select","onchange"),c("textarea"),c("h1 h2 h3 h4 h5 h6 div p legend caption","align"),c("ul","type compact"),c("li","type"),c("ol dl menu dir","compact"),c("pre","width xml:space"),c("hr","align noshade size width"),c("isindex","prompt"),c("table","summary width frame rules cellspacing cellpadding align bgcolor"),c("col","width align char charoff valign"),c("colgroup","width align char charoff valign"),c("thead","align char charoff valign"),c("tr","align char charoff valign bgcolor"),c("th","axis align char charoff valign nowrap bgcolor width height"),c("form","accept"),c("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),c("tfoot","align char charoff valign"),c("tbody","align char charoff valign"),c("area","nohref"),c("body","background bgcolor text link vlink alink")),"html4"!==e&&(c("input button select textarea","autofocus"),c("input textarea","placeholder"),c("a","download"),c("link script img","crossorigin"),c("iframe","sandbox seamless allowfullscreen")),ii(ci("a form meter progress dfn"),function(e){s[e]&&delete s[e].children[e]}),delete s.caption.children.table,delete s.script,ni[e]=s)},fi=function(e,n){var r;return e&&(r={},"string"==typeof e&&(e={"*":e}),ii(e,function(e,t){r[t]=r[t.toUpperCase()]="map"===n?oi(e,/[, ]/):ui(e,/[, ]/)})),r};function di(i){var e,t,n,r,o,a,u,s,c,l,f,d,m,N={},g={},E=[],p={},h={},v=function(e,t,n){var r=i[e];return r?r=oi(r,/[, ]/,oi(r.toUpperCase(),/[, ]/)):(r=ni[e])||(r=oi(t," ",oi(t.toUpperCase()," ")),r=ai(r,n),ni[e]=r),r};n=li((i=i||{}).schema),!1===i.verify_html&&(i.valid_elements="*[*]"),e=fi(i.valid_styles),t=fi(i.invalid_styles,"map"),s=fi(i.valid_classes,"map"),r=v("whitespace_elements","pre script noscript style textarea video audio iframe object code"),o=v("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),a=v("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),u=v("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),l=v("non_empty_elements","td th iframe video audio object script pre code",a),f=v("move_caret_before_on_enter_elements","table",l),d=v("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),c=v("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary",d),m=v("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),ii((i.special||"script noscript iframe noframes noembed title style textarea xmp").split(" "),function(e){h[e]=new RegExp("</"+e+"[^>]*>","gi")});var S=function(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")},y=function(e){var t,n,r,o,i,a,u,s,c,l,f,d,m,g,p,h,v,y,b,C=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,x=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,w=/[*?+]/;if(e)for(e=ci(e,","),N["@"]&&(h=N["@"].attributes,v=N["@"].attributesOrder),t=0,n=e.length;t<n;t++)if(i=C.exec(e[t])){if(g=i[1],c=i[2],p=i[3],s=i[5],a={attributes:d={},attributesOrder:m=[]},"#"===g&&(a.paddEmpty=!0),"-"===g&&(a.removeEmpty=!0),"!"===i[4]&&(a.removeEmptyAttrs=!0),h){for(y in h)d[y]=h[y];m.push.apply(m,v)}if(s)for(r=0,o=(s=ci(s,"|")).length;r<o;r++)if(i=x.exec(s[r])){if(u={},f=i[1],l=i[2].replace(/[\\:]:/g,":"),g=i[3],b=i[4],"!"===f&&(a.attributesRequired=a.attributesRequired||[],a.attributesRequired.push(l),u.required=!0),"-"===f){delete d[l],m.splice(si(m,l),1);continue}g&&("="===g&&(a.attributesDefault=a.attributesDefault||[],a.attributesDefault.push({name:l,value:b}),u.defaultValue=b),":"===g&&(a.attributesForced=a.attributesForced||[],a.attributesForced.push({name:l,value:b}),u.forcedValue=b),"<"===g&&(u.validValues=oi(b,"?"))),w.test(l)?(a.attributePatterns=a.attributePatterns||[],u.pattern=S(l),a.attributePatterns.push(u)):(d[l]||m.push(l),d[l]=u)}h||"@"!==c||(h=d,v=m),p&&(a.outputName=c,N[p]=a),w.test(c)?(a.pattern=S(c),E.push(a)):N[c]=a}},b=function(e){N={},E=[],y(e),ii(n,function(e,t){g[t]=e.children})},C=function(e){var a=/^(~)?(.+)$/;e&&(ni.text_block_elements=ni.block_elements=null,ii(ci(e,","),function(e){var t=a.exec(e),n="~"===t[1],r=n?"span":"div",o=t[2];if(g[o]=g[r],p[o]=r,n||(c[o.toUpperCase()]={},c[o]={}),!N[o]){var i=N[r];delete(i=ai({},i)).removeEmptyAttrs,delete i.removeEmpty,N[o]=i}ii(g,function(e,t){e[r]&&(g[t]=e=ai({},g[t]),e[o]=e[r])})}))},x=function(e){var o=/^([+\-]?)(\w+)\[([^\]]+)\]$/;ni[i.schema]=null,e&&ii(ci(e,","),function(e){var t,n,r=o.exec(e);r&&(n=r[1],t=n?g[r[2]]:g[r[2]]={"#comment":{}},t=g[r[2]],ii(ci(r[3],"|"),function(e){"-"===n?delete t[e]:t[e]={}}))})},w=function(e){var t,n=N[e];if(n)return n;for(t=E.length;t--;)if((n=E[t]).pattern.test(e))return n};return i.valid_elements?b(i.valid_elements):(ii(n,function(e,t){N[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},g[t]=e.children}),"html5"!==i.schema&&ii(ci("strong/b em/i"),function(e){e=ci(e,"/"),N[e[1]].outputName=e[0]}),ii(ci("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){N[e]&&(N[e].removeEmpty=!0)}),ii(ci("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),function(e){N[e].paddEmpty=!0}),ii(ci("span"),function(e){N[e].removeEmptyAttrs=!0})),C(i.custom_elements),x(i.valid_children),y(i.extended_valid_elements),x("+ol[ul|ol],+ul[ul|ol]"),ii({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},function(e,t){N[t]&&(N[t].parentsRequired=ci(e))}),i.invalid_elements&&ii(ui(i.invalid_elements),function(e){N[e]&&delete N[e]}),w("span")||y("span[!data-mce-type|*]"),{children:g,elements:N,getValidStyles:function(){return e},getValidClasses:function(){return s},getBlockElements:function(){return c},getInvalidStyles:function(){return t},getShortEndedElements:function(){return a},getTextBlockElements:function(){return d},getTextInlineElements:function(){return m},getBoolAttrs:function(){return u},getElementRule:w,getSelfClosingElements:function(){return o},getNonEmptyElements:function(){return l},getMoveCaretBeforeOnEnterElements:function(){return f},getWhiteSpaceElements:function(){return r},getSpecialElements:function(){return h},isValidChild:function(e,t){var n=g[e.toLowerCase()];return!(!n||!n[t.toLowerCase()])},isValid:function(e,t){var n,r,o=w(e);if(o){if(!t)return!0;if(o.attributes[t])return!0;if(n=o.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},getCustomElements:function(){return p},addValidElements:y,setValidElements:b,addCustomElements:C,addValidChildren:x}}var mi=function(e,t,n,r){var o=function(e){return 1<(e=parseInt(e,10).toString(16)).length?e:"0"+e};return"#"+o(t)+o(n)+o(r)};function gi(b,e){var C,t,c,l,x=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,w=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,N=/\s*([^:]+):\s*([^;]+);?/g,E=/\s+$/,S={},T="\ufeff";for(b=b||{},e&&(c=e.getValidStyles(),l=e.getInvalidStyles()),t=("\\\" \\' \\; \\: ; : "+T).split(" "),C=0;C<t.length;C++)S[t[C]]=T+C,S[T+C]=t[C];return{toHex:function(e){return e.replace(x,mi)},parse:function(e){var t,n,r,o,i,a,u,s,c={},l=b.url_converter,f=b.url_converter_scope||this,d=function(e,t,n){var r,o,i,a;if((r=c[e+"-top"+t])&&(o=c[e+"-right"+t])&&(i=c[e+"-bottom"+t])&&(a=c[e+"-left"+t])){var u=[r,o,i,a];for(C=u.length-1;C--&&u[C]===u[C+1];);-1<C&&n||(c[e+t]=-1===C?u[0]:u.join(" "),delete c[e+"-top"+t],delete c[e+"-right"+t],delete c[e+"-bottom"+t],delete c[e+"-left"+t])}},m=function(e){var t,n=c[e];if(n){for(t=(n=n.split(" ")).length;t--;)if(n[t]!==n[0])return!1;return c[e]=n[0],!0}},g=function(e){return o=!0,S[e]},p=function(e,t){return o&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return S[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e},h=function(e){return String.fromCharCode(parseInt(e.slice(1),16))},v=function(e){return e.replace(/\\[0-9a-f]+/gi,h)},y=function(e,t,n,r,o,i){if(o=o||i)return"'"+(o=p(o)).replace(/\'/g,"\\'")+"'";if(t=p(t||n||r),!b.allow_script_urls){var a=t.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(a))return"";if(!b.allow_svg_data_urls&&/^data:image\/svg/i.test(a))return""}return l&&(t=l.call(f,t,"style")),"url('"+t.replace(/\'/g,"\\'")+"')"};if(e){for(e=(e=e.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,g).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,g)});t=N.exec(e);)if(N.lastIndex=t.index+t[0].length,n=t[1].replace(E,"").toLowerCase(),r=t[2].replace(E,""),n&&r){if(n=v(n),r=v(r),-1!==n.indexOf(T)||-1!==n.indexOf('"'))continue;if(!b.allow_script_urls&&("behavior"===n||/expression\s*\(|\/\*|\*\//.test(r)))continue;"font-weight"===n&&"700"===r?r="bold":"color"!==n&&"background-color"!==n||(r=r.toLowerCase()),r=(r=r.replace(x,mi)).replace(w,y),c[n]=o?p(r,!0):r}d("border","",!0),d("border","-width"),d("border","-color"),d("border","-style"),d("padding",""),d("margin",""),i="border",u="border-style",s="border-color",m(a="border-width")&&m(u)&&m(s)&&(c[i]=c[a]+" "+c[u]+" "+c[s],delete c[a],delete c[u],delete c[s]),"medium none"===c.border&&delete c.border,"none"===c["border-image"]&&delete c["border-image"]}return c},serialize:function(i,e){var t,n,r,o,a,u="",s=function(e){var t,n,r,o;if(t=c[e])for(n=0,r=t.length;n<r;n++)e=t[n],(o=i[e])&&(u+=(0<u.length?" ":"")+e+": "+o+";")};if(e&&c)s("*"),s(e);else for(t in i)!(n=i[t])||l&&(r=t,o=e,a=void 0,(a=l["*"])&&a[r]||(a=l[o])&&a[r])||(u+=(0<u.length?" ":"")+t+": "+n+";");return u}}}var pi,hi=Xt.each,vi=Xt.grep,yi=fe.ie,bi=/^([a-z0-9],?)+$/i,Ci=/^[ \t\r\n]*$/,xi=function(n,r,o){var e={},i=r.keep_values,t={set:function(e,t,n){r.url_converter&&(t=r.url_converter.call(r.url_converter_scope||o(),t,n,e[0])),e.attr("data-mce-"+n,t).attr(n,t)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}};return e={style:{set:function(e,t){null===t||"object"!=typeof t?(i&&e.attr("data-mce-style",t),e.attr("style",t)):e.css(t)},get:function(e){var t=e.attr("data-mce-style")||e.attr("style");return t=n.serialize(n.parse(t),e[0].nodeName)}}},i&&(e.href=e.src=t),e},wi=function(e,t){var n=t.attr("style"),r=e.serialize(e.parse(n),t[0].nodeName);r||(r=null),t.attr("data-mce-style",r)},Ni=function(e,t){var n,r,o=0;if(e)for(n=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)r=e.nodeType,(!t||3!==r||r!==n&&e.nodeValue.length)&&(o++,n=r);return o};function Ei(a,u){var s,c=this;void 0===u&&(u={});var r={},i=V.window,o={},t=0,e=function(m,g){void 0===g&&(g={});var p,h=0,v={};p=g.maxLoadTime||5e3;var y=function(e){m.getElementsByTagName("head")[0].appendChild(e)},n=function(e,t,n){var o,r,i,a,u=function(){for(var e=a.passed,t=e.length;t--;)e[t]();a.status=2,a.passed=[],a.failed=[]},s=function(){for(var e=a.failed,t=e.length;t--;)e[t]();a.status=3,a.passed=[],a.failed=[]},c=function(e,t){e()||((new Date).getTime()-i<p?he.setTimeout(t):s())},l=function(){c(function(){for(var e,t,n=m.styleSheets,r=n.length;r--;)if((t=(e=n[r]).ownerNode?e.ownerNode:e.owningElement)&&t.id===o.id)return u(),!0},l)},f=function(){c(function(){try{var e=r.sheet.cssRules;return u(),!!e}catch(t){}},f)};if(e=Xt._addCacheSuffix(e),v[e]?a=v[e]:(a={passed:[],failed:[]},v[e]=a),t&&a.passed.push(t),n&&a.failed.push(n),1!==a.status)if(2!==a.status)if(3!==a.status){if(a.status=1,(o=m.createElement("link")).rel="stylesheet",o.type="text/css",o.id="u"+h++,o.async=!1,o.defer=!1,i=(new Date).getTime(),g.contentCssCors&&(o.crossOrigin="anonymous"),"onload"in o&&!((d=V.navigator.userAgent.match(/WebKit\/(\d*)/))&&parseInt(d[1],10)<536))o.onload=l,o.onerror=s;else{if(0<V.navigator.userAgent.indexOf("Firefox"))return(r=m.createElement("style")).textContent='@import "'+e+'"',f(),void y(r);l()}var d;y(o),o.href=e}else s();else u()},t=function(t){return uo.nu(function(e){n(t,H(e,q(mo.value(t))),H(e,q(mo.error(t))))})},o=function(e){return e.fold($,$)};return{load:n,loadAll:function(e,n,r){co(W(e,t)).get(function(e){var t=K(e,function(e){return e.isValue()});0<t.fail.length?r(t.fail.map(o)):n(t.pass.map(o))})}}}(a,{contentCssCors:u.contentCssCors}),l=[],f=u.schema?u.schema:di({}),d=gi({url_converter:u.url_converter,url_converter_scope:u.url_converter_scope},u.schema),m=u.ownEvents?new Se(u.proxy):Se.Event,n=f.getBlockElements(),g=gn.overrideDefaults(function(){return{context:a,element:j.getRoot()}}),p=function(e){if(e&&a&&"string"==typeof e){var t=a.getElementById(e);return t&&t.id!==e?a.getElementsByName(e)[1]:t}return e},h=function(e){return"string"==typeof e&&(e=p(e)),g(e)},v=function(e,t,n){var r,o,i=h(e);return i.length&&(o=(r=s[t])&&r.get?r.get(i,t):i.attr(t)),void 0===o&&(o=n||""),o},y=function(e){var t=p(e);return t?t.attributes:[]},b=function(e,t,n){var r,o;""===n&&(n=null);var i=h(e);r=i.attr(t),i.length&&((o=s[t])&&o.set?o.set(i,n,t):i.attr(t,n),r!==n&&u.onSetAttrib&&u.onSetAttrib({attrElm:i,attrName:t,attrValue:n}))},C=function(){return u.root_element||a.body},x=function(e,t){return Zr.getPos(a.body,p(e),t)},w=function(e,t,n){var r=h(e);return n?r.css(t):("float"===(t=t.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}))&&(t=fe.ie&&fe.ie<12?"styleFloat":"cssFloat"),r[0]&&r[0].style?r[0].style[t]:undefined)},N=function(e){var t,n;return e=p(e),t=w(e,"width"),n=w(e,"height"),-1===t.indexOf("px")&&(t=0),-1===n.indexOf("px")&&(n=0),{w:parseInt(t,10)||e.offsetWidth||e.clientWidth,h:parseInt(n,10)||e.offsetHeight||e.clientHeight}},E=function(e,t){var n;if(!e)return!1;if(!Array.isArray(e)){if("*"===t)return 1===e.nodeType;if(bi.test(t)){var r=t.toLowerCase().split(/,/),o=e.nodeName.toLowerCase();for(n=r.length-1;0<=n;n--)if(r[n]===o)return!0;return!1}if(e.nodeType&&1!==e.nodeType)return!1}var i=Array.isArray(e)?e:[e];return 0<St(t,i[0].ownerDocument||i[0],null,i).length},S=function(e,t,n,r){var o,i=[],a=p(e);for(r=r===undefined,n=n||("BODY"!==C().nodeName?C().parentNode:null),Xt.is(t,"string")&&(t="*"===(o=t)?function(e){return 1===e.nodeType}:function(e){return E(e,o)});a&&a!==n&&a.nodeType&&9!==a.nodeType;){if(!t||"function"==typeof t&&t(a)){if(!r)return[a];i.push(a)}a=a.parentNode}return r?i:null},T=function(e,t,n){var r=t;if(e)for("string"==typeof t&&(r=function(e){return E(e,t)}),e=e[n];e;e=e[n])if("function"==typeof r&&r(e))return e;return null},k=function(e,n,r){var o,t="string"==typeof e?p(e):e;if(!t)return!1;if(Xt.isArray(t)&&(t.length||0===t.length))return o=[],hi(t,function(e,t){e&&("string"==typeof e&&(e=p(e)),o.push(n.call(r,e,t)))}),o;var i=r||c;return n.call(i,t)},_=function(e,t){h(e).each(function(e,n){hi(t,function(e,t){b(n,t,e)})})},A=function(e,r){var t=h(e);yi?t.each(function(e,t){if(!1!==t.canHaveHTML){for(;t.firstChild;)t.removeChild(t.firstChild);try{t.innerHTML="<br>"+r,t.removeChild(t.firstChild)}catch(n){gn("<div></div>").html("<br>"+r).contents().slice(1).appendTo(t)}return r}}):t.html(r)},R=function(e,n,r,o,i){return k(e,function(e){var t="string"==typeof n?a.createElement(n):n;return _(t,r),o&&("string"!=typeof o&&o.nodeType?t.appendChild(o):"string"==typeof o&&A(t,o)),i?t:e.appendChild(t)})},D=function(e,t,n){return R(a.createElement(e),e,t,n,!0)},O=ti.decode,B=ti.encodeAllRaw,P=function(e,t){var n=h(e);return t?n.each(function(){for(var e;e=this.firstChild;)3===e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():n.remove(),1<n.length?n.toArray():n[0]},I=function(e,t,n){h(e).toggleClass(t,n).each(function(){""===this.className&&gn(this).attr("class",null)})},L=function(t,e,n){return k(e,function(e){return Xt.is(e,"array")&&(t=t.cloneNode(!0)),n&&hi(vi(e.childNodes),function(e){t.appendChild(e)}),e.parentNode.replaceChild(t,e)})},F=function(){return a.createRange()},M=function(e,t,n,r){if(Xt.isArray(e)){for(var o=e.length;o--;)e[o]=M(e[o],t,n,r);return e}return!u.collect||e!==a&&e!==i||l.push([e,t,n,r]),m.bind(e,t,n,r||j)},z=function(e,t,n){var r;if(Xt.isArray(e)){for(r=e.length;r--;)e[r]=z(e[r],t,n);return e}if(l&&(e===a||e===i))for(r=l.length;r--;){var o=l[r];e!==o[0]||t&&t!==o[1]||n&&n!==o[2]||m.unbind(o[0],o[1],o[2])}return m.unbind(e,t,n)},U=function(e){if(e&&jo.isElement(e)){var t=e.getAttribute("data-mce-contenteditable");return t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null}return null},j={doc:a,settings:u,win:i,files:o,stdMode:!0,boxModel:!0,styleSheetLoader:e,boundEvents:l,styles:d,schema:f,events:m,isBlock:function(e){if("string"==typeof e)return!!n[e];if(e){var t=e.nodeType;if(t)return!(1!==t||!n[e.nodeName])}return!1},$:g,$$:h,root:null,clone:function(t,e){if(!yi||1!==t.nodeType||e)return t.cloneNode(e);if(!e){var n=a.createElement(t.nodeName);return hi(y(t),function(e){b(n,e.nodeName,v(t,e.nodeName))}),n}return null},getRoot:C,getViewPort:function(e){var t=e||i,n=t.document.documentElement;return{x:t.pageXOffset||n.scrollLeft,y:t.pageYOffset||n.scrollTop,w:t.innerWidth||n.clientWidth,h:t.innerHeight||n.clientHeight}},getRect:function(e){var t,n;return e=p(e),t=x(e),n=N(e),{x:t.x,y:t.y,w:n.w,h:n.h}},getSize:N,getParent:function(e,t,n){var r=S(e,t,n,!1);return r&&0<r.length?r[0]:null},getParents:S,get:p,getNext:function(e,t){return T(e,t,"nextSibling")},getPrev:function(e,t){return T(e,t,"previousSibling")},select:function(e,t){return St(e,p(t)||u.root_element||a,[])},is:E,add:R,create:D,createHTML:function(e,t,n){var r,o="";for(r in o+="<"+e,t)t.hasOwnProperty(r)&&null!==t[r]&&"undefined"!=typeof t[r]&&(o+=" "+r+'="'+B(t[r])+'"');return void 0!==n?o+">"+n+"</"+e+">":o+" />"},createFragment:function(e){var t,n=a.createElement("div"),r=a.createDocumentFragment();for(r.appendChild(n),e&&(n.innerHTML=e);t=n.firstChild;)r.appendChild(t);return r.removeChild(n),r},remove:P,setStyle:function(e,t,n){var r=h(e).css(t,n);u.update_styles&&wi(d,r)},getStyle:w,setStyles:function(e,t){var n=h(e).css(t);u.update_styles&&wi(d,n)},removeAllAttribs:function(e){return k(e,function(e){var t,n=e.attributes;for(t=n.length-1;0<=t;t--)e.removeAttributeNode(n.item(t))})},setAttrib:b,setAttribs:_,getAttrib:v,getPos:x,parseStyle:function(e){return d.parse(e)},serializeStyle:function(e,t){return d.serialize(e,t)},addStyle:function(e){var t,n;if(j!==Ei.DOM&&a===V.document){if(r[e])return;r[e]=!0}(n=a.getElementById("mceDefaultStyles"))||((n=a.createElement("style")).id="mceDefaultStyles",n.type="text/css",(t=a.getElementsByTagName("head")[0]).firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(a.createTextNode(e))},loadCSS:function(e){var n;j===Ei.DOM||a!==V.document?(e||(e=""),n=a.getElementsByTagName("head")[0],hi(e.split(","),function(e){var t;e=Xt._addCacheSuffix(e),o[e]||(o[e]=!0,t=D("link",{rel:"stylesheet",href:e}),n.appendChild(t))})):Ei.DOM.loadCSS(e)},addClass:function(e,t){h(e).addClass(t)},removeClass:function(e,t){I(e,t,!1)},hasClass:function(e,t){return h(e).hasClass(t)},toggleClass:I,show:function(e){h(e).show()},hide:function(e){h(e).hide()},isHidden:function(e){return"none"===h(e).css("display")},uniqueId:function(e){return(e||"mce_")+t++},setHTML:A,getOuterHTML:function(e){var t="string"==typeof e?p(e):e;return jo.isElement(t)?t.outerHTML:gn("<div></div>").append(gn(t).clone()).html()},setOuterHTML:function(e,t){h(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}P(gn(this).html(t),!0)})},decode:O,encode:B,insertAfter:function(e,t){var r=p(t);return k(e,function(e){var t,n;return t=r.parentNode,(n=r.nextSibling)?t.insertBefore(e,n):t.appendChild(e),e})},replace:L,rename:function(t,e){var n;return t.nodeName!==e.toUpperCase()&&(n=D(e),hi(y(t),function(e){b(n,e.nodeName,v(t,e.nodeName))}),L(n,t,!0)),n||t},findCommonAncestor:function(e,t){for(var n,r=e;r;){for(n=t;n&&r!==n;)n=n.parentNode;if(r===n)break;r=r.parentNode}return!r&&e.ownerDocument?e.ownerDocument.documentElement:r},toHex:function(e){return d.toHex(Xt.trim(e))},run:k,getAttribs:y,isEmpty:function(e,t){var n,r,o,i,a,u,s=0;if(e=e.firstChild){a=new go(e,e.parentNode),t=t||(f?f.getNonEmptyElements():null),i=f?f.getWhiteSpaceElements():{};do{if(o=e.nodeType,jo.isElement(e)){var c=e.getAttribute("data-mce-bogus");if(c){e=a.next("all"===c);continue}if(u=e.nodeName.toLowerCase(),t&&t[u]){if("br"===u){s++,e=a.next();continue}return!1}for(n=(r=y(e)).length;n--;)if("name"===(u=r[n].nodeName)||"data-mce-bookmark"===u)return!1}if(8===o)return!1;if(3===o&&!Ci.test(e.nodeValue))return!1;if(3===o&&e.parentNode&&i[e.parentNode.nodeName]&&Ci.test(e.nodeValue))return!1;e=a.next()}while(e)}return s<=1},createRng:F,nodeIndex:Ni,split:function(e,t,n){var r,o,i,a=F();if(e&&t)return a.setStart(e.parentNode,Ni(e)),a.setEnd(t.parentNode,Ni(t)),r=a.extractContents(),(a=F()).setStart(t.parentNode,Ni(t)+1),a.setEnd(e.parentNode,Ni(e)+1),o=a.extractContents(),(i=e.parentNode).insertBefore(qo.trimNode(j,r),e),n?i.insertBefore(n,e):i.insertBefore(t,e),i.insertBefore(qo.trimNode(j,o),e),P(e),n||t},bind:M,unbind:z,fire:function(e,t,n){return m.fire(e,t,n)},getContentEditable:U,getContentEditableParent:function(e){for(var t=C(),n=null;e&&e!==t&&null===(n=U(e));e=e.parentNode);return n},destroy:function(){if(l)for(var e=l.length;e--;){var t=l[e];m.unbind(t[0],t[1],t[2])}St.setDocument&&St.setDocument()},isChildOf:function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset}};return s=xi(d,u,function(){return j}),j}(pi=Ei||(Ei={})).DOM=pi(V.document),pi.nodeIndex=Ni;var Si=Ei,Ti=Si.DOM,ki=Xt.each,_i=Xt.grep,Ai=function(e){return"function"==typeof e},Ri=function(){var l={},o=[],i={},a=[],f=0;this.isDone=function(e){return 2===l[e]},this.markDone=function(e){l[e]=2},this.add=this.load=function(e,t,n,r){l[e]===undefined&&(o.push(e),l[e]=0),t&&(i[e]||(i[e]=[]),i[e].push({success:t,failure:r,scope:n||this}))},this.remove=function(e){delete l[e],delete i[e]},this.loadQueue=function(e,t,n){this.loadScripts(o,e,t,n)},this.loadScripts=function(n,e,t,r){var u,s=[],c=function(t,e){ki(i[e],function(e){Ai(e[t])&&e[t].call(e.scope)}),i[e]=undefined};a.push({success:e,failure:r,scope:t||this}),(u=function(){var e=_i(n);if(n.length=0,ki(e,function(e){var t,n,r,o,i,a;2!==l[e]?3!==l[e]?1!==l[e]&&(l[e]=1,f++,t=e,n=function(){l[e]=2,f--,c("success",e),u()},r=function(){l[e]=3,f--,s.push(e),c("failure",e),u()},i=(a=Ti).uniqueId(),(o=V.document.createElement("script")).id=i,o.type="text/javascript",o.src=Xt._addCacheSuffix(t),o.onload=function(){a.remove(i),o&&(o.onreadystatechange=o.onload=o=null),n()},o.onerror=function(){Ai(r)?r():"undefined"!=typeof console&&console.log&&console.log("Failed to load script: "+t)},(V.document.getElementsByTagName("head")[0]||V.document.body).appendChild(o)):c("failure",e):c("success",e)}),!f){var t=a.slice(0);a.length=0,ki(t,function(e){0===s.length?Ai(e.success)&&e.success.call(e.scope):Ai(e.failure)&&e.failure.call(e.scope,s)})}})()}};Ri.ScriptLoader=new Ri;var Di,Oi=Xt.each;function Bi(){var r=this,o=[],a={},u={},i=[],s=function(e){var t;return u[e]&&(t=u[e].dependencies),t||[]},c=function(e,t){return"object"==typeof t?t:"string"==typeof e?{prefix:"",resource:t,suffix:""}:{prefix:e.prefix,resource:t,suffix:e.suffix}},l=function(e,n,t,r){var o=s(e);Oi(o,function(e){var t=c(n,e);f(t.resource,t,undefined,undefined)}),t&&(r?t.call(r):t.call(Ri))},f=function(e,t,n,r,o){if(!a[e]){var i="string"==typeof t?t:t.prefix+t.resource+t.suffix;0!==i.indexOf("/")&&-1===i.indexOf("://")&&(i=Bi.baseURL+"/"+i),a[e]=i.substring(0,i.lastIndexOf("/")),u[e]?l(e,t,n,r):Ri.ScriptLoader.add(i,function(){return l(e,t,n,r)},r,o)}};return{items:o,urls:a,lookup:u,_listeners:i,get:function(e){return u[e]?u[e].instance:undefined},dependencies:s,requireLangPack:function(e,t){var n=Bi.language;if(n&&!1!==Bi.languageLoad){if(t)if(-1!==(t=","+t+",").indexOf(","+n.substr(0,2)+","))n=n.substr(0,2);else if(-1===t.indexOf(","+n+","))return;Ri.ScriptLoader.add(a[e]+"/langs/"+n+".js")}},add:function(t,e,n){o.push(e),u[t]={instance:e,dependencies:n};var r=K(i,function(e){return e.name===t});return i=r.fail,Oi(r.pass,function(e){e.callback()}),e},remove:function(e){delete a[e],delete u[e]},createUrl:c,addComponents:function(e,t){var n=r.urls[e];Oi(t,function(e){Ri.ScriptLoader.add(n+"/"+e)})},load:f,waitFor:function(e,t){u.hasOwnProperty(e)?t():i.push({name:e,callback:t})}}}(Di=Bi||(Bi={})).PluginManager=Di(),Di.ThemeManager=Di();var Pi=function(t,n){Vr(t).each(function(e){e.dom().insertBefore(n.dom(),t.dom())})},Ii=function(e,t){qr(e).fold(function(){Vr(e).each(function(e){Fi(e,t)})},function(e){Pi(e,t)})},Li=function(t,n){Yr(t).fold(function(){Fi(t,n)},function(e){t.dom().insertBefore(n.dom(),e.dom())})},Fi=function(e,t){e.dom().appendChild(t.dom())},Mi=function(t,e){z(e,function(e){Fi(t,e)})},zi=function(e){e.dom().textContent="",z(Kr(e),function(e){Ui(e)})},Ui=function(e){var t=e.dom();null!==t.parentNode&&t.parentNode.removeChild(t)},ji=function(e){var t,n=Kr(e);0<n.length&&(t=e,z(n,function(e){Pi(t,e)})),Ui(e)},Vi=function(n,r){var o=null;return{cancel:function(){null!==o&&(V.clearTimeout(o),o=null)},throttle:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];null===o&&(o=V.setTimeout(function(){n.apply(null,e),o=null},r))}}},Hi=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return Hi(n())}}},qi=function(e,t){var n=Er(e,t);return n===undefined||""===n?[]:n.split(" ")},$i=function(e){return e.dom().classList!==undefined},Wi=function(e,t){return o=t,i=qi(n=e,r="class").concat([o]),wr(n,r,i.join(" ")),!0;var n,r,o,i},Ki=function(e,t){return o=t,0<(i=U(qi(n=e,r="class"),function(e){return e!==o})).length?wr(n,r,i.join(" ")):Sr(n,r),!1;var n,r,o,i},Xi=function(e,t){$i(e)?e.dom().classList.add(t):Wi(e,t)},Yi=function(e){0===($i(e)?e.dom().classList:qi(e,"class")).length&&Sr(e,"class")},Gi=function(e,t){return $i(e)&&e.dom().classList.contains(t)},Ji=function(e,t){var n=[];return z(Kr(e),function(e){t(e)&&(n=n.concat([e])),n=n.concat(Ji(e,t))}),n},Qi=function(e,t){return n=t,o=(r=e)===undefined?V.document:r.dom(),Fr(o)?[]:W(o.querySelectorAll(n),ar.fromDom);var n,r,o};function Zi(e,t,n,r,o){return e(n,r)?_.some(n):D(o)&&o(n)?_.none():t(n,r,o)}var ea,ta=function(e,t,n){for(var r=e.dom(),o=D(n)?n:q(!1);r.parentNode;){r=r.parentNode;var i=ar.fromDom(r);if(t(i))return _.some(i);if(o(i))break}return _.none()},na=function(e,t,n){return Zi(function(e,t){return t(e)},ta,e,t,n)},ra=function(e,t,n){return ta(e,function(e){return Lr(e,t)},n)},oa=function(e,t){return n=t,o=(r=e)===undefined?V.document:r.dom(),Fr(o)?_.none():_.from(o.querySelector(n)).map(ar.fromDom);var n,r,o},ia=function(e,t,n){return Zi(Lr,ra,e,t,n)},aa=q("mce-annotation"),ua=q("data-mce-annotation"),sa=q("data-mce-annotation-uid"),ca=function(r,e){var t=r.selection.getRng(),n=ar.fromDom(t.startContainer),o=ar.fromDom(r.getBody()),i=e.fold(function(){return"."+aa()},function(e){return"["+ua()+'="'+e+'"]'}),a=Xr(n,t.startOffset).getOr(n),u=ia(a,i,function(e){return Mr(e,o)}),s=function(e,t){return n=t,(r=e.dom())&&r.hasAttribute&&r.hasAttribute(n)?_.some(Er(e,t)):_.none();var n,r};return u.bind(function(e){return s(e,""+sa()).bind(function(n){return s(e,""+ua()).map(function(e){var t=la(r,n);return{uid:n,name:e,elements:t}})})})},la=function(e,t){var n=ar.fromDom(e.getBody());return Qi(n,"["+sa()+'="'+t+'"]')},fa=function(i,e){var n,r,o,a=Hi({}),c=function(e,t){u(e,function(e){return t(e),e})},u=function(e,t){var n=a.get(),r=t(n.hasOwnProperty(e)?n[e]:{listeners:[],previous:Hi(_.none())});n[e]=r,a.set(n)},t=(n=function(){var e,t,n,r=a.get(),o=(e=gr(r),(n=B.call(e,0)).sort(t),n);z(o,function(e){u(e,function(u){var s=u.previous.get();return ca(i,_.some(e)).fold(function(){var t;s.isSome()&&(c(t=e,function(e){z(e.listeners,function(e){return e(!1,t)})}),u.previous.set(_.none()))},function(e){var t,n,r,o=e.uid,i=e.name,a=e.elements;s.is(o)||(n=o,r=a,c(t=i,function(e){z(e.listeners,function(e){return e(!0,t,{uid:n,nodes:W(r,function(e){return e.dom()})})})}),u.previous.set(_.some(o)))}),{previous:u.previous,listeners:u.listeners}})})},r=30,o=null,{cancel:function(){null!==o&&(V.clearTimeout(o),o=null)},throttle:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];null!==o&&V.clearTimeout(o),o=V.setTimeout(function(){n.apply(null,e),o=null},r)}});return i.on("remove",function(){t.cancel()}),i.on("nodeChange",function(){t.throttle()}),{addListener:function(e,t){u(e,function(e){return{previous:e.previous,listeners:e.listeners.concat([t])}})}}},da=function(e,n){e.on("init",function(){e.serializer.addNodeFilter("span",function(e){z(e,function(t){var e;(e=t,_.from(e.attributes.map[ua()]).bind(n.lookup)).each(function(e){!1===e.persistent&&t.unwrap()})})})})},ma=function(){return(ma=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ga=0,pa=function(e,t){return ar.fromDom(e.dom().cloneNode(t))},ha=function(e){return pa(e,!1)},va=function(e){return pa(e,!0)},ya=function(e,t){var n,r,o=Ur(e).dom(),i=ar.fromDom(o.createDocumentFragment()),a=(n=t,(r=(o||V.document).createElement("div")).innerHTML=n,Kr(ar.fromDom(r)));Mi(i,a),zi(e),Fi(e,i)},ba="\ufeff",Ca=function(e){return e===ba},xa=ba,wa=function(e){return e.replace(new RegExp(ba,"g"),"")},Na=jo.isElement,Ea=jo.isText,Sa=function(e){return Ea(e)&&(e=e.parentNode),Na(e)&&e.hasAttribute("data-mce-caret")},Ta=function(e){return Ea(e)&&Ca(e.data)},ka=function(e){return Sa(e)||Ta(e)},_a=function(e){return e.firstChild!==e.lastChild||!jo.isBr(e.firstChild)},Aa=function(e){var t=e.container();return!(!e||!jo.isText(t))&&(t.data.charAt(e.offset())===xa||e.isAtStart()&&Ta(t.previousSibling))},Ra=function(e){var t=e.container();return!(!e||!jo.isText(t))&&(t.data.charAt(e.offset()-1)===xa||e.isAtEnd()&&Ta(t.nextSibling))},Da=function(e,t,n){var r,o,i;return(r=t.ownerDocument.createElement(e)).setAttribute("data-mce-caret",n?"before":"after"),r.setAttribute("data-mce-bogus","all"),r.appendChild(((i=V.document.createElement("br")).setAttribute("data-mce-bogus","1"),i)),o=t.parentNode,n?o.insertBefore(r,t):t.nextSibling?o.insertBefore(r,t.nextSibling):o.appendChild(r),r},Oa=function(e){return Ea(e)&&e.data[0]===xa},Ba=function(e){return Ea(e)&&e.data[e.data.length-1]===xa},Pa=function(e){return e&&e.hasAttribute("data-mce-caret")?(t=e.getElementsByTagName("br"),n=t[t.length-1],jo.isBogus(n)&&n.parentNode.removeChild(n),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("_moz_abspos"),e):null;var t,n},Ia=jo.isContentEditableTrue,La=jo.isContentEditableFalse,Fa=jo.isBr,Ma=jo.isText,za=jo.matchNodeNames("script style textarea"),Ua=jo.matchNodeNames("img input textarea hr iframe video audio object"),ja=jo.matchNodeNames("table"),Va=ka,Ha=function(e){return!Va(e)&&(Ma(e)?!za(e.parentNode):Ua(e)||Fa(e)||ja(e)||qa(e))},qa=function(e){return!1===(t=e,jo.isElement(t)&&"true"===t.getAttribute("unselectable"))&&La(e);var t},$a=function(e,t){return Ha(e)&&function(e,t){for(e=e.parentNode;e&&e!==t;e=e.parentNode){if(qa(e))return!1;if(Ia(e))return!0}return!0}(e,t)},Wa=Math.round,Ka=function(e){return e?{left:Wa(e.left),top:Wa(e.top),bottom:Wa(e.bottom),right:Wa(e.right),width:Wa(e.width),height:Wa(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}},Xa=function(e,t){return e=Ka(e),t||(e.left=e.left+e.width),e.right=e.left,e.width=0,e},Ya=function(e,t,n){return 0<=e&&e<=Math.min(t.height,n.height)/2},Ga=function(e,t){var n=Math.min(t.height/2,e.height/2);return e.bottom-n<t.top||!(e.top>t.bottom)&&Ya(t.top-e.bottom,e,t)},Ja=function(e,t){return e.top>t.bottom||!(e.bottom<t.top)&&Ya(t.bottom-e.top,e,t)},Qa=function(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom},Za=function(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset===n+1?t.childNodes[n]:null},eu=function(e,t){return 1===e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e},tu=new RegExp("[\u0300-\u036f\u0483-\u0487\u0488-\u0489\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62-\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c00\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0c81\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc-\u0ccd\u0cd5-\u0cd6\u0ce2-\u0ce3\u0d01\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62-\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1abe\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab-\u1bad\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8-\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u200c-\u200d\u20d0-\u20dc\u20dd-\u20e0\u20e1\u20e2-\u20e4\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u302e-\u302f\u3099-\u309a\ua66f\ua670-\ua672\ua674-\ua67d\ua69e-\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\ua9e5\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\uff9e-\uff9f]"),nu=function(e){return"string"==typeof e&&768<=e.charCodeAt(0)&&tu.test(e)},ru=function(e,t,n){return e.isSome()&&t.isSome()?_.some(n(e.getOrDie(),t.getOrDie())):_.none()},ou=[].slice,iu=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=ou.call(arguments);return function(e){for(var t=0;t<n.length;t++)if(!n[t](e))return!1;return!0}},au=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=ou.call(arguments);return function(e){for(var t=0;t<n.length;t++)if(n[t](e))return!0;return!1}},uu=jo.isElement,su=Ha,cu=jo.matchStyleValues("display","block table"),lu=jo.matchStyleValues("float","left right"),fu=iu(uu,su,y(lu)),du=y(jo.matchStyleValues("white-space","pre pre-line pre-wrap")),mu=jo.isText,gu=jo.isBr,pu=Si.nodeIndex,hu=eu,vu=function(e){return"createRange"in e?e.createRange():Si.DOM.createRng()},yu=function(e){return e&&/[\r\n\t ]/.test(e)},bu=function(e){return!!e.setStart&&!!e.setEnd},Cu=function(e){var t,n=e.startContainer,r=e.startOffset;return!!(yu(e.toString())&&du(n.parentNode)&&jo.isText(n)&&(t=n.data,yu(t[r-1])||yu(t[r+1])))},xu=function(e){return 0===e.left&&0===e.right&&0===e.top&&0===e.bottom},wu=function(e){var t,n,r,o,i,a,u,s;return t=0<(n=e.getClientRects()).length?Ka(n[0]):Ka(e.getBoundingClientRect()),!bu(e)&&gu(e)&&xu(t)?(i=(r=e).ownerDocument,a=vu(i),u=i.createTextNode("\xa0"),(s=r.parentNode).insertBefore(u,r),a.setStart(u,0),a.setEnd(u,1),o=Ka(a.getBoundingClientRect()),s.removeChild(u),o):xu(t)&&bu(e)?function(e){var t=e.startContainer,n=e.endContainer,r=e.startOffset,o=e.endOffset;if(t===n&&jo.isText(n)&&0===r&&1===o){var i=e.cloneRange();return i.setEndAfter(n),wu(i)}return null}(e):t},Nu=function(e,t){var n=Xa(e,t);return n.width=1,n.right=n.left+1,n},Eu=function(e){var t,n,r=[],o=function(e){var t,n;0!==e.height&&(0<r.length&&(t=e,n=r[r.length-1],t.left===n.left&&t.top===n.top&&t.bottom===n.bottom&&t.right===n.right)||r.push(e))},i=function(e,t){var n=vu(e.ownerDocument);if(t<e.data.length){if(nu(e.data[t]))return r;if(nu(e.data[t-1])&&(n.setStart(e,t),n.setEnd(e,t+1),!Cu(n)))return o(Nu(wu(n),!1)),r}0<t&&(n.setStart(e,t-1),n.setEnd(e,t),Cu(n)||o(Nu(wu(n),!1))),t<e.data.length&&(n.setStart(e,t),n.setEnd(e,t+1),Cu(n)||o(Nu(wu(n),!0)))};if(mu(e.container()))return i(e.container(),e.offset()),r;if(uu(e.container()))if(e.isAtEnd())n=hu(e.container(),e.offset()),mu(n)&&i(n,n.data.length),fu(n)&&!gu(n)&&o(Nu(wu(n),!1));else{if(n=hu(e.container(),e.offset()),mu(n)&&i(n,0),fu(n)&&e.isAtEnd())return o(Nu(wu(n),!1)),r;t=hu(e.container(),e.offset()-1),fu(t)&&!gu(t)&&(cu(t)||cu(n)||!fu(n))&&o(Nu(wu(t),!1)),fu(n)&&o(Nu(wu(n),!0))}return r};function Su(t,n,e){var r=function(){return e||(e=Eu(Su(t,n))),e};return{container:q(t),offset:q(n),toRange:function(){var e;return(e=vu(t.ownerDocument)).setStart(t,n),e.setEnd(t,n),e},getClientRects:r,isVisible:function(){return 0<r().length},isAtStart:function(){return mu(t),0===n},isAtEnd:function(){return mu(t)?n>=t.data.length:n>=t.childNodes.length},isEqual:function(e){return e&&t===e.container()&&n===e.offset()},getNode:function(e){return hu(t,e?n-1:n)}}}(ea=Su||(Su={})).fromRangeStart=function(e){return ea(e.startContainer,e.startOffset)},ea.fromRangeEnd=function(e){return ea(e.endContainer,e.endOffset)},ea.after=function(e){return ea(e.parentNode,pu(e)+1)},ea.before=function(e){return ea(e.parentNode,pu(e))},ea.isAbove=function(e,t){return ru(Z(t.getClientRects()),ee(e.getClientRects()),Ga).getOr(!1)},ea.isBelow=function(e,t){return ru(ee(t.getClientRects()),Z(e.getClientRects()),Ja).getOr(!1)},ea.isAtStart=function(e){return!!e&&e.isAtStart()},ea.isAtEnd=function(e){return!!e&&e.isAtEnd()},ea.isTextPosition=function(e){return!!e&&jo.isText(e.container())},ea.isElementPosition=function(e){return!1===ea.isTextPosition(e)};var Tu,ku,_u=Su,Au=jo.isText,Ru=jo.isBogus,Du=Si.nodeIndex,Ou=function(e){var t=e.parentNode;return Ru(t)?Ou(t):t},Bu=function(e){return e?Ht.reduce(e.childNodes,function(e,t){return Ru(t)&&"BR"!==t.nodeName?e=e.concat(Bu(t)):e.push(t),e},[]):[]},Pu=function(t){return function(e){return t===e}},Iu=function(e){var t,r,n,o;return(Au(e)?"text()":e.nodeName.toLowerCase())+"["+(r=Bu(Ou(t=e)),n=Ht.findIndex(r,Pu(t),t),r=r.slice(0,n+1),o=Ht.reduce(r,function(e,t,n){return Au(t)&&Au(r[n-1])&&e++,e},0),r=Ht.filter(r,jo.matchNodeNames(t.nodeName)),(n=Ht.findIndex(r,Pu(t),t))-o)+"]"},Lu=function(e,t){var n,r,o,i,a,u=[];return n=t.container(),r=t.offset(),Au(n)?o=function(e,t){for(;(e=e.previousSibling)&&Au(e);)t+=e.data.length;return t}(n,r):(r>=(i=n.childNodes).length?(o="after",r=i.length-1):o="before",n=i[r]),u.push(Iu(n)),a=function(e,t,n){var r=[];for(t=t.parentNode;!(t===e||n&&n(t));t=t.parentNode)r.push(t);return r}(e,n),a=Ht.filter(a,y(jo.isBogus)),(u=u.concat(Ht.map(a,function(e){return Iu(e)}))).reverse().join("/")+","+o},Fu=function(e,t){var n,r,o;return t?(t=(n=t.split(","))[0].split("/"),o=1<n.length?n[1]:"before",(r=Ht.reduce(t,function(e,t){return(t=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t))?("text()"===t[1]&&(t[1]="#text"),n=e,r=t[1],o=parseInt(t[2],10),i=Bu(n),i=Ht.filter(i,function(e,t){return!Au(e)||!Au(i[t-1])}),(i=Ht.filter(i,jo.matchNodeNames(r)))[o]):null;var n,r,o,i},e))?Au(r)?function(e,t){for(var n,r=e,o=0;Au(r);){if(n=r.data.length,o<=t&&t<=o+n){e=r,t-=o;break}if(!Au(r.nextSibling)){e=r,t=n;break}o+=n,r=r.nextSibling}return Au(e)&&t>e.data.length&&(t=e.data.length),_u(e,t)}(r,parseInt(o,10)):(o="after"===o?Du(r)+1:Du(r),_u(r.parentNode,o)):null):null},Mu=function(e,t){jo.isText(t)&&0===t.data.length&&e.remove(t)},zu=function(e,t,n){var r,o,i,a,u,s,c;jo.isDocumentFragment(n)?(i=e,a=t,u=n,s=_.from(u.firstChild),c=_.from(u.lastChild),a.insertNode(u),s.each(function(e){return Mu(i,e.previousSibling)}),c.each(function(e){return Mu(i,e.nextSibling)})):(r=e,o=n,t.insertNode(o),Mu(r,o.previousSibling),Mu(r,o.nextSibling))},Uu=jo.isContentEditableFalse,ju=function(e,t,n,r,o){var i,a=r[o?"startContainer":"endContainer"],u=r[o?"startOffset":"endOffset"],s=[],c=0,l=e.getRoot();for(jo.isText(a)?s.push(n?function(e,t,n){var r,o;for(o=e(t.data.slice(0,n)).length,r=t.previousSibling;r&&jo.isText(r);r=r.previousSibling)o+=e(r.data).length;return o}(t,a,u):u):(u>=(i=a.childNodes).length&&i.length&&(c=1,u=Math.max(0,i.length-1)),s.push(e.nodeIndex(i[u],n)+c));a&&a!==l;a=a.parentNode)s.push(e.nodeIndex(a,n));return s},Vu=function(e,t,n){var r=0;return Xt.each(e.select(t),function(e){if("all"!==e.getAttribute("data-mce-bogus"))return e!==n&&void r++}),r},Hu=function(e,t){var n,r,o,i=t?"start":"end";n=e[i+"Container"],r=e[i+"Offset"],jo.isElement(n)&&"TR"===n.nodeName&&(n=(o=n.childNodes)[Math.min(t?r:r-1,o.length-1)])&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r))},qu=function(e){return Hu(e,!0),Hu(e,!1),e},$u=function(e,t){var n;if(jo.isElement(e)&&(e=eu(e,t),Uu(e)))return e;if(ka(e)){if(jo.isText(e)&&Sa(e)&&(e=e.parentNode),n=e.previousSibling,Uu(n))return n;if(n=e.nextSibling,Uu(n))return n}},Wu=function(e,t,n){var r=n.getNode(),o=r?r.nodeName:null,i=n.getRng();if(Uu(r)||"IMG"===o)return{name:o,index:Vu(n.dom,o,r)};var a,u,s,c,l,f,d,m=$u((a=i).startContainer,a.startOffset)||$u(a.endContainer,a.endOffset);return m?{name:o=m.tagName,index:Vu(n.dom,o,m)}:(u=e,c=t,l=i,f=(s=n).dom,(d={}).start=ju(f,u,c,l,!0),s.isCollapsed()||(d.end=ju(f,u,c,l,!1)),d)},Ku=function(e,t,n){var r={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return n?e.create("span",r,"&#xFEFF;"):e.create("span",r)},Xu=function(e,t){var n=e.dom,r=e.getRng(),o=n.uniqueId(),i=e.isCollapsed(),a=e.getNode(),u=a.nodeName;if("IMG"===u)return{name:u,index:Vu(n,u,a)};var s=qu(r.cloneRange());if(!i){s.collapse(!1);var c=Ku(n,o+"_end",t);zu(n,s,c)}(r=qu(r)).collapse(!0);var l=Ku(n,o+"_start",t);return zu(n,r,l),e.moveToBookmark({id:o,keep:1}),{id:o}},Yu={getBookmark:function(e,t,n){return 2===t?Wu(wa,n,e):3===t?(o=(r=e).getRng(),{start:Lu(r.dom.getRoot(),_u.fromRangeStart(o)),end:Lu(r.dom.getRoot(),_u.fromRangeEnd(o))}):t?{rng:e.getRng()}:Xu(e,!1);var r,o},getUndoBookmark:d(Wu,$,!0),getPersistentBookmark:Xu},Gu="_mce_caret",Ju=function(e){return jo.isElement(e)&&e.id===Gu},Qu=function(e,t){for(;t&&t!==e;){if(t.id===Gu)return t;t=t.parentNode}return null},Zu=jo.isElement,es=jo.isText,ts=function(e){var t=e.parentNode;t&&t.removeChild(e)},ns=function(e,t){0===t.length?ts(e):e.nodeValue=t},rs=function(e){var t=wa(e);return{count:e.length-t.length,text:t}},os=function(e,t){return us(e),t},is=function(e,t){var n,r,o,i=t.container(),a=(n=te(i.childNodes),r=e,o=L(n,r),-1===o?_.none():_.some(o)).map(function(e){return e<t.offset()?_u(i,t.offset()-1):t}).getOr(t);return us(e),a},as=function(e,t){return es(e)&&t.container()===e?(r=t,o=rs((n=e).data.substr(0,r.offset())),i=rs(n.data.substr(r.offset())),0<(a=o.text+i.text).length?(ns(n,a),_u(n,r.offset()-o.count)):r):os(e,t);var n,r,o,i,a},us=function(e){if(Zu(e)&&ka(e)&&(_a(e)?e.removeAttribute("data-mce-caret"):ts(e)),es(e)){var t=wa(function(e){try{return e.nodeValue}catch(t){return""}}(e));ns(e,t)}},ss={removeAndReposition:function(e,t){return _u.isTextPosition(t)?as(e,t):(n=e,(r=t).container()===n.parentNode?is(n,r):os(n,r));var n,r},remove:us},cs=or.detect().browser,ls=jo.isContentEditableFalse,fs=function(e,t,n){var r,o,i,a,u,s=Xa(t.getBoundingClientRect(),n);return"BODY"===e.tagName?(r=e.ownerDocument.documentElement,o=e.scrollLeft||r.scrollLeft,i=e.scrollTop||r.scrollTop):(u=e.getBoundingClientRect(),o=e.scrollLeft-u.left,i=e.scrollTop-u.top),s.left+=o,s.right+=o,s.top+=i,s.bottom+=i,s.width=1,0<(a=t.offsetWidth-t.clientWidth)&&(n&&(a*=-1),s.left+=a,s.right+=a),s},ds=function(a,u,e){var t,s,c=Hi(_.none()),l=function(){!function(e){var t,n,r,o,i;for(t=gn("*[contentEditable=false]",e),o=0;o<t.length;o++)r=(n=t[o]).previousSibling,Ba(r)&&(1===(i=r.data).length?r.parentNode.removeChild(r):r.deleteData(i.length-1,1)),r=n.nextSibling,Oa(r)&&(1===(i=r.data).length?r.parentNode.removeChild(r):r.deleteData(0,1))}(a),s&&(ss.remove(s),s=null),c.get().each(function(e){gn(e.caret).remove(),c.set(_.none())}),clearInterval(t)},f=function(){t=he.setInterval(function(){e()?gn("div.mce-visual-caret",a).toggleClass("mce-visual-caret-hidden"):gn("div.mce-visual-caret",a).addClass("mce-visual-caret-hidden")},500)};return{show:function(t,e){var n,r,o;if(l(),o=e,jo.isElement(o)&&/^(TD|TH)$/i.test(o.tagName))return null;if(!u(e))return s=function(e,t){var n,r,o;if(r=e.ownerDocument.createTextNode(xa),o=e.parentNode,t){if(n=e.previousSibling,Ea(n)){if(ka(n))return n;if(Ba(n))return n.splitText(n.data.length-1)}o.insertBefore(r,e)}else{if(n=e.nextSibling,Ea(n)){if(ka(n))return n;if(Oa(n))return n.splitText(1),n}e.nextSibling?o.insertBefore(r,e.nextSibling):o.appendChild(r)}return r}(e,t),r=e.ownerDocument.createRange(),ls(s.nextSibling)?(r.setStart(s,0),r.setEnd(s,0)):(r.setStart(s,1),r.setEnd(s,1)),r;s=Da("p",e,t),n=fs(a,e,t),gn(s).css("top",n.top);var i=gn('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(n).appendTo(a)[0];return c.set(_.some({caret:i,element:e,before:t})),c.get().each(function(e){t&&gn(e.caret).addClass("mce-visual-caret-before")}),f(),(r=e.ownerDocument.createRange()).setStart(s,0),r.setEnd(s,0),r},hide:l,getCss:function(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"},reposition:function(){c.get().each(function(e){var t=fs(a,e.element,e.before);gn(e.caret).css(t)})},destroy:function(){return he.clearInterval(t)}}},ms=function(){return cs.isIE()||cs.isEdge()||cs.isFirefox()},gs=function(e){return ls(e)||jo.isTable(e)&&ms()},ps=jo.isContentEditableFalse,hs=jo.matchStyleValues("display","block table table-cell table-caption list-item"),vs=ka,ys=Sa,bs=jo.isElement,Cs=Ha,xs=function(e){return 0<e},ws=function(e){return e<0},Ns=function(e,t){for(var n;n=e(t);)if(!ys(n))return n;return null},Es=function(e,t,n,r,o){var i=new go(e,r);if(ws(t)){if((ps(e)||ys(e))&&n(e=Ns(i.prev,!0)))return e;for(;e=Ns(i.prev,o);)if(n(e))return e}if(xs(t)){if((ps(e)||ys(e))&&n(e=Ns(i.next,!0)))return e;for(;e=Ns(i.next,o);)if(n(e))return e}return null},Ss=function(e,t){for(;e&&e!==t;){if(hs(e))return e;e=e.parentNode}return null},Ts=function(e,t,n){return Ss(e.container(),n)===Ss(t.container(),n)},ks=function(e,t){var n,r;return t?(n=t.container(),r=t.offset(),bs(n)?n.childNodes[r+e]:null):null},_s=function(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n},As=function(e,t,n){var r,o,i,a;for(o=e?"previousSibling":"nextSibling";n&&n!==t;){if(r=n[o],vs(r)&&(r=r[o]),ps(r)){if(a=n,Ss(r,i=t)===Ss(a,i))return r;break}if(Cs(r))break;n=n.parentNode}return null},Rs=d(_s,!0),Ds=d(_s,!1),Os=function(e,t,n){var r,o,i,a,u=d(As,!0,t),s=d(As,!1,t);if(o=n.startContainer,i=n.startOffset,Sa(o)){if(bs(o)||(o=o.parentNode),"before"===(a=o.getAttribute("data-mce-caret"))&&(r=o.nextSibling,gs(r)))return Rs(r);if("after"===a&&(r=o.previousSibling,gs(r)))return Ds(r)}if(!n.collapsed)return n;if(jo.isText(o)){if(vs(o)){if(1===e){if(r=s(o))return Rs(r);if(r=u(o))return Ds(r)}if(-1===e){if(r=u(o))return Ds(r);if(r=s(o))return Rs(r)}return n}if(Ba(o)&&i>=o.data.length-1)return 1===e&&(r=s(o))?Rs(r):n;if(Oa(o)&&i<=1)return-1===e&&(r=u(o))?Ds(r):n;if(i===o.data.length)return(r=s(o))?Rs(r):n;if(0===i)return(r=u(o))?Ds(r):n}return n},Bs=function(e,t){return _.from(ks(e?0:-1,t)).filter(ps)},Ps=function(e,t,n){var r=Os(e,t,n);return-1===e?Su.fromRangeStart(r):Su.fromRangeEnd(r)},Is=function(e){return _.from(e.getNode()).map(ar.fromDom)},Ls=function(e,t){for(;t=e(t);)if(t.isVisible())return t;return t},Fs=function(e,t){var n=Ts(e,t);return!(n||!jo.isBr(e.getNode()))||n};(ku=Tu||(Tu={}))[ku.Backwards=-1]="Backwards",ku[ku.Forwards=1]="Forwards";var Ms,zs,Us,js=jo.isContentEditableFalse,Vs=jo.isText,Hs=jo.isElement,qs=jo.isBr,$s=Ha,Ws=function(e){return Ua(e)||!!qa(t=e)&&!0!==j(te(t.getElementsByTagName("*")),function(e,t){return e||Ia(t)},!1);var t},Ks=$a,Xs=function(e,t){return e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null},Ys=function(e,t){if(xs(e)){if($s(t.previousSibling)&&!Vs(t.previousSibling))return _u.before(t);if(Vs(t))return _u(t,0)}if(ws(e)){if($s(t.nextSibling)&&!Vs(t.nextSibling))return _u.after(t);if(Vs(t))return _u(t,t.data.length)}return ws(e)?qs(t)?_u.before(t):_u.after(t):_u.before(t)},Gs=function(e,t,n){var r,o,i,a,u;if(!Hs(n)||!t)return null;if(t.isEqual(_u.after(n))&&n.lastChild){if(u=_u.after(n.lastChild),ws(e)&&$s(n.lastChild)&&Hs(n.lastChild))return qs(n.lastChild)?_u.before(n.lastChild):u}else u=t;var s,c,l,f=u.container(),d=u.offset();if(Vs(f)){if(ws(e)&&0<d)return _u(f,--d);if(xs(e)&&d<f.length)return _u(f,++d);r=f}else{if(ws(e)&&0<d&&(o=Xs(f,d-1),$s(o)))return!Ws(o)&&(i=Es(o,e,Ks,o))?Vs(i)?_u(i,i.data.length):_u.after(i):Vs(o)?_u(o,o.data.length):_u.before(o);if(xs(e)&&d<f.childNodes.length&&(o=Xs(f,d),$s(o)))return qs(o)?(s=n,(l=(c=o).nextSibling)&&$s(l)?Vs(l)?_u(l,0):_u.before(l):Gs(Tu.Forwards,_u.after(c),s)):!Ws(o)&&(i=Es(o,e,Ks,o))?Vs(i)?_u(i,0):_u.before(i):Vs(o)?_u(o,0):_u.after(o);r=o||u.getNode()}return(xs(e)&&u.isAtEnd()||ws(e)&&u.isAtStart())&&(r=Es(r,e,q(!0),n,!0),Ks(r,n))?Ys(e,r):(o=Es(r,e,Ks,n),!(a=Ht.last(U(function(e,t){for(var n=[];e&&e!==t;)n.push(e),e=e.parentNode;return n}(f,n),js)))||o&&a.contains(o)?o?Ys(e,o):null:u=xs(e)?_u.after(a):_u.before(a))},Js=function(t){return{next:function(e){return Gs(Tu.Forwards,e,t)},prev:function(e){return Gs(Tu.Backwards,e,t)}}},Qs=function(e){return _u.isTextPosition(e)?0===e.offset():Ha(e.getNode())},Zs=function(e){if(_u.isTextPosition(e)){var t=e.container();return e.offset()===t.data.length}return Ha(e.getNode(!0))},ec=function(e,t){return!_u.isTextPosition(e)&&!_u.isTextPosition(t)&&e.getNode()===t.getNode(!0)},tc=function(e,t,n){return e?!ec(t,n)&&(r=t,!(!_u.isTextPosition(r)&&jo.isBr(r.getNode())))&&Zs(t)&&Qs(n):!ec(n,t)&&Qs(t)&&Zs(n);var r},nc=function(e,t,n){var r=Js(t);return _.from(e?r.next(n):r.prev(n))},rc=function(t,n,r){return nc(t,n,r).bind(function(e){return Ts(r,e,n)&&tc(t,r,e)?nc(t,n,e):_.some(e)})},oc=function(t,n,e,r){return rc(t,n,e).bind(function(e){return r(e)?oc(t,n,e,r):_.some(e)})},ic=function(e,t){var n,r,o,i,a,u=e?t.firstChild:t.lastChild;return jo.isText(u)?_.some(_u(u,e?0:u.data.length)):u?Ha(u)?_.some(e?_u.before(u):(a=u,jo.isBr(a)?_u.before(a):_u.after(a))):(r=t,o=u,i=(n=e)?_u.before(o):_u.after(o),nc(n,r,i)):_.none()},ac=d(nc,!0),uc=d(nc,!1),sc={fromPosition:nc,nextPosition:ac,prevPosition:uc,navigate:rc,navigateIgnore:oc,positionIn:ic,firstPositionIn:d(ic,!0),lastPositionIn:d(ic,!1)},cc=function(e,t){return jo.isElement(t)&&e.isBlock(t)&&!t.innerHTML&&!fe.ie&&(t.innerHTML='<br data-mce-bogus="1" />'),t},lc=function(e,t){return sc.lastPositionIn(e).fold(function(){return!1},function(e){return t.setStart(e.container(),e.offset()),t.setEnd(e.container(),e.offset()),!0})},fc=function(e,t,n){return!(!1!==t.hasChildNodes()||!Qu(e,t)||(o=n,i=(r=t).ownerDocument.createTextNode(xa),r.appendChild(i),o.setStart(i,0),o.setEnd(i,0),0));var r,o,i},dc=function(e,t,n,r){var o,i,a,u,s=n[t?"start":"end"],c=e.getRoot();if(s){for(a=s[0],i=c,o=s.length-1;1<=o;o--){if(u=i.childNodes,fc(c,i,r))return!0;if(s[o]>u.length-1)return!!fc(c,i,r)||lc(i,r);i=u[s[o]]}3===i.nodeType&&(a=Math.min(s[0],i.nodeValue.length)),1===i.nodeType&&(a=Math.min(s[0],i.childNodes.length)),t?r.setStart(i,a):r.setEnd(i,a)}return!0},mc=function(e){return jo.isText(e)&&0<e.data.length},gc=function(e,t,n){var r,o,i,a,u,s,c=e.get(n.id+"_"+t),l=n.keep;if(c){if(r=c.parentNode,"start"===t?l?c.hasChildNodes()?(r=c.firstChild,o=1):mc(c.nextSibling)?(r=c.nextSibling,o=0):mc(c.previousSibling)?(r=c.previousSibling,o=c.previousSibling.data.length):(r=c.parentNode,o=e.nodeIndex(c)+1):o=e.nodeIndex(c):l?c.hasChildNodes()?(r=c.firstChild,o=1):mc(c.previousSibling)?(r=c.previousSibling,o=c.previousSibling.data.length):(r=c.parentNode,o=e.nodeIndex(c)):o=e.nodeIndex(c),u=r,s=o,!l){for(a=c.previousSibling,i=c.nextSibling,Xt.each(Xt.grep(c.childNodes),function(e){jo.isText(e)&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});c=e.get(n.id+"_"+t);)e.remove(c,!0);a&&i&&a.nodeType===i.nodeType&&jo.isText(a)&&!fe.opera&&(o=a.nodeValue.length,a.appendData(i.nodeValue),e.remove(i),u=a,s=o)}return _.some(_u(u,s))}return _.none()},pc=function(e,t){var n,r,o,i,a,u,s,c,l,f,d,m,g,p,h,v,y=e.dom;if(t){if(v=t,Xt.isArray(v.start))return p=t,h=(g=y).createRng(),dc(g,!0,p,h)&&dc(g,!1,p,h)?_.some(h):_.none();if("string"==typeof t.start)return _.some((f=t,d=(l=y).createRng(),m=Fu(l.getRoot(),f.start),d.setStart(m.container(),m.offset()),m=Fu(l.getRoot(),f.end),d.setEnd(m.container(),m.offset()),d));if(t.hasOwnProperty("id"))return s=gc(o=y,"start",i=t),c=gc(o,"end",i),ru(s,(u=s,(a=c).isSome()?a:u),function(e,t){var n=o.createRng();return n.setStart(cc(o,e.container()),e.offset()),n.setEnd(cc(o,t.container()),t.offset()),n});if(t.hasOwnProperty("name"))return n=y,r=t,_.from(n.select(r.name)[r.index]).map(function(e){var t=n.createRng();return t.selectNode(e),t});if(t.hasOwnProperty("rng"))return _.some(t.rng)}return _.none()},hc=function(e,t,n){return Yu.getBookmark(e,t,n)},vc=function(t,e){pc(t,e).each(function(e){t.setRng(e)})},yc=function(e){return jo.isElement(e)&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},bc=function(e){return e&&/^(IMG)$/.test(e.nodeName)},Cc=function(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)},xc=function(e,t,n){return"color"!==n&&"backgroundColor"!==n||(t=e.toHex(t)),"fontWeight"===n&&700===t&&(t="bold"),"fontFamily"===n&&(t=t.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+t},wc={isInlineBlock:bc,moveStart:function(e,t,n){var r,o,i,a=n.startOffset,u=n.startContainer;if((n.startContainer!==n.endContainer||!bc(n.startContainer.childNodes[n.startOffset]))&&1===u.nodeType)for(a<(i=u.childNodes).length?r=new go(u=i[a],e.getParent(u,e.isBlock)):(r=new go(u=i[i.length-1],e.getParent(u,e.isBlock))).next(!0),o=r.current();o;o=r.next())if(3===o.nodeType&&!Cc(o))return n.setStart(o,0),void t.setRng(n)},getNonWhiteSpaceSibling:function(e,t,n){if(e)for(t=t?"nextSibling":"previousSibling",e=n?e:e[t];e;e=e[t])if(1===e.nodeType||!Cc(e))return e},isTextBlock:function(e,t){return t.nodeType&&(t=t.nodeName),!!e.schema.getTextBlockElements()[t.toLowerCase()]},isValid:function(e,t,n){return e.schema.isValidChild(t,n)},isWhiteSpaceNode:Cc,replaceVars:function(e,n){return"string"!=typeof e?e=e(n):n&&(e=e.replace(/%(\w+)/g,function(e,t){return n[t]||e})),e},isEq:function(e,t){return t=t||"",e=""+((e=e||"").nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()===t.toLowerCase()},normalizeStyleValue:xc,getStyle:function(e,t,n){return xc(e,e.getStyle(t,n),n)},getTextDecoration:function(t,e){var n;return t.getParent(e,function(e){return(n=t.getStyle(e,"text-decoration"))&&"none"!==n}),n},getParents:function(e,t,n){return e.getParents(t,n,e.getRoot())}},Nc=yc,Ec=wc.getParents,Sc=wc.isWhiteSpaceNode,Tc=wc.isTextBlock,kc=function(e,t){for(void 0===t&&(t=3===e.nodeType?e.length:e.childNodes.length);e&&e.hasChildNodes();)(e=e.childNodes[t])&&(t=3===e.nodeType?e.length:e.childNodes.length);return{node:e,offset:t}},_c=function(e,t){for(var n=t;n;){if(1===n.nodeType&&e.getContentEditable(n))return"false"===e.getContentEditable(n)?n:t;n=n.parentNode}return t},Ac=function(e,t,n,r){var o,i,a=n.nodeValue;return void 0===r&&(r=e?a.length:0),e?(o=a.lastIndexOf(" ",r),-1!==(o=(i=a.lastIndexOf("\xa0",r))<o?o:i)&&!t&&(o<r||!e)&&o<=a.length&&o++):(o=a.indexOf(" ",r),i=a.indexOf("\xa0",r),o=-1!==o&&(-1===i||o<i)?o:i),o},Rc=function(e,t,n,r,o,i){var a,u,s,c;if(3===n.nodeType){if(-1!==(s=Ac(o,i,n,r)))return{container:n,offset:s};c=n}for(a=new go(n,e.getParent(n,e.isBlock)||t);u=a[o?"prev":"next"]();)if(3!==u.nodeType||Nc(u.parentNode)){if(e.isBlock(u)||wc.isEq(u,"BR"))break}else if(-1!==(s=Ac(o,i,c=u)))return{container:u,offset:s};if(c)return{container:c,offset:r=o?0:c.length}},Dc=function(e,t,n,r,o){var i,a,u,s;for(3===r.nodeType&&0===r.nodeValue.length&&r[o]&&(r=r[o]),i=Ec(e,r),a=0;a<i.length;a++)for(u=0;u<t.length;u++)if(!("collapsed"in(s=t[u])&&s.collapsed!==n.collapsed)&&e.is(i[a],s.selector))return i[a];return r},Oc=function(t,e,n,r){var o,i=t.dom,a=i.getRoot();if(e[0].wrapper||(o=i.getParent(n,e[0].block,a)),!o){var u=i.getParent(n,"LI,TD,TH");o=i.getParent(3===n.nodeType?n.parentNode:n,function(e){return e!==a&&Tc(t,e)},u)}if(o&&e[0].wrapper&&(o=Ec(i,o,"ul,ol").reverse()[0]||o),!o)for(o=n;o[r]&&!i.isBlock(o[r])&&(o=o[r],!wc.isEq(o,"br")););return o||n},Bc=function(e,t,n,r,o,i,a){var u,s,c,l,f,d;if(u=s=a?n:o,l=a?"previousSibling":"nextSibling",f=e.getRoot(),3===u.nodeType&&!Sc(u)&&(a?0<r:i<u.nodeValue.length))return u;for(;;){if(!t[0].block_expand&&e.isBlock(s))return s;for(c=s[l];c;c=c[l])if(!Nc(c)&&!Sc(c)&&("BR"!==(d=c).nodeName||!d.getAttribute("data-mce-bogus")||d.nextSibling))return s;if(s===f||s.parentNode===f){u=s;break}s=s.parentNode}return u},Pc=function(e,t,n,r){var o,i=t.startContainer,a=t.startOffset,u=t.endContainer,s=t.endOffset,c=e.dom;return 1===i.nodeType&&i.hasChildNodes()&&3===(i=eu(i,a)).nodeType&&(a=0),1===u.nodeType&&u.hasChildNodes()&&3===(u=eu(u,t.collapsed?s:s-1)).nodeType&&(s=u.nodeValue.length),i=_c(c,i),u=_c(c,u),(Nc(i.parentNode)||Nc(i))&&(i=Nc(i)?i:i.parentNode,3===(i=t.collapsed?i.previousSibling||i:i.nextSibling||i).nodeType&&(a=t.collapsed?i.length:0)),(Nc(u.parentNode)||Nc(u))&&(u=Nc(u)?u:u.parentNode,3===(u=t.collapsed?u.nextSibling||u:u.previousSibling||u).nodeType&&(s=t.collapsed?0:u.length)),t.collapsed&&((o=Rc(c,e.getBody(),i,a,!0,r))&&(i=o.container,a=o.offset),(o=Rc(c,e.getBody(),u,s,!1,r))&&(u=o.container,s=o.offset)),n[0].inline&&(u=r?u:function(e,t){var n=kc(e,t);if(n.node){for(;n.node&&0===n.offset&&n.node.previousSibling;)n=kc(n.node.previousSibling);n.node&&0<n.offset&&3===n.node.nodeType&&" "===n.node.nodeValue.charAt(n.offset-1)&&1<n.offset&&(e=n.node).splitText(n.offset-1)}return e}(u,s)),(n[0].inline||n[0].block_expand)&&(n[0].inline&&3===i.nodeType&&0!==a||(i=Bc(c,n,i,a,u,s,!0)),n[0].inline&&3===u.nodeType&&s!==u.nodeValue.length||(u=Bc(c,n,i,a,u,s,!1))),n[0].selector&&!1!==n[0].expand&&!n[0].inline&&(i=Dc(c,n,t,i,"previousSibling"),u=Dc(c,n,t,u,"nextSibling")),(n[0].block||n[0].selector)&&(i=Oc(e,n,i,"previousSibling"),u=Oc(e,n,u,"nextSibling"),n[0].block&&(c.isBlock(i)||(i=Bc(c,n,i,a,u,s,!0)),c.isBlock(u)||(u=Bc(c,n,i,a,u,s,!1)))),1===i.nodeType&&(a=c.nodeIndex(i),i=i.parentNode),1===u.nodeType&&(s=c.nodeIndex(u)+1,u=u.parentNode),{startContainer:i,startOffset:a,endContainer:u,endOffset:s}},Ic=Xt.each,Lc=function(e,t,o){var n,r,i,a,u,s,c,l=t.startContainer,f=t.startOffset,d=t.endContainer,m=t.endOffset;if(0<(c=e.select("td[data-mce-selected],th[data-mce-selected]")).length)Ic(c,function(e){o([e])});else{var g,p,h,v=function(e){var t;return 3===(t=e[0]).nodeType&&t===l&&f>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===m&&0<e.length&&t===d&&3===t.nodeType&&e.splice(e.length-1,1),e},y=function(e,t,n){for(var r=[];e&&e!==n;e=e[t])r.push(e);return r},b=function(e,t){do{if(e.parentNode===t)return e;e=e.parentNode}while(e)},C=function(e,t,n){var r=n?"nextSibling":"previousSibling";for(u=(a=e).parentNode;a&&a!==t;a=u)u=a.parentNode,(s=y(a===e?a:a[r],r)).length&&(n||s.reverse(),o(v(s)))};if(1===l.nodeType&&l.hasChildNodes()&&(l=l.childNodes[f]),1===d.nodeType&&d.hasChildNodes()&&(p=m,h=(g=d).childNodes,--p>h.length-1?p=h.length-1:p<0&&(p=0),d=h[p]||g),l===d)return o(v([l]));for(n=e.findCommonAncestor(l,d),a=l;a;a=a.parentNode){if(a===d)return C(l,n,!0);if(a===n)break}for(a=d;a;a=a.parentNode){if(a===l)return C(d,n);if(a===n)break}r=b(l,n)||l,i=b(d,n)||d,C(l,r,!0),(s=y(r===l?r:r.nextSibling,"nextSibling",i===d?i.nextSibling:i)).length&&o(v(s)),C(d,i)}},Fc=(Ms=mr,zs="text",{get:function(e){if(!Ms(e))throw new Error("Can only get "+zs+" value of a "+zs+" node");return Us(e).getOr("")},getOption:Us=function(e){return Ms(e)?_.from(e.dom().nodeValue):_.none()},set:function(e,t){if(!Ms(e))throw new Error("Can only set raw "+zs+" value of a "+zs+" node");e.dom().nodeValue=t}}),Mc=function(e){return Fc.get(e)},zc=function(r,o,i,a){return Vr(o).fold(function(){return"skipping"},function(e){return"br"===a||mr(n=o)&&"\ufeff"===Mc(n)?"valid":dr(t=o)&&Gi(t,aa())?"existing":Ju(o)?"caret":wc.isValid(r,i,a)&&wc.isValid(r,lr(e),i)?"valid":"invalid-child";var t,n})},Uc=function(e,t,n,r){var o,i,a=t.uid,u=void 0===a?(o="mce-annotation",i=(new Date).getTime(),o+"_"+Math.floor(1e9*Math.random())+ ++ga+String(i)):a,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["uid"]),c=ar.fromTag("span",e);Xi(c,aa()),wr(c,""+sa(),u),wr(c,""+ua(),n);var l,f=r(u,s),d=f.attributes,m=void 0===d?{}:d,g=f.classes,p=void 0===g?[]:g;return Nr(c,m),l=c,z(p,function(e){Xi(l,e)}),c},jc=function(i,e,t,n,r){var a=[],u=Uc(i.getDoc(),r,t,n),s=Hi(_.none()),c=function(){s.set(_.none())},l=function(e){z(e,o)},o=function(e){var t,n;switch(zc(i,e,"span",lr(e))){case"invalid-child":c();var r=Kr(e);l(r),c();break;case"valid":var o=s.get().getOrThunk(function(){var e=ha(u);return a.push(e),s.set(_.some(e)),e});Pi(t=e,n=o),Fi(n,t)}};return Lc(i.dom,e,function(e){var t;c(),t=W(e,ar.fromDom),l(t)}),a},Vc=function(s,c,l,f){s.undoManager.transact(function(){var e,t,n,r,o=s.selection.getRng();if(o.collapsed&&(r=Pc(e=s,t=o,[{inline:!0}],3===(n=t).startContainer.nodeType&&n.startContainer.nodeValue.length>=n.startOffset&&"\xa0"===n.startContainer.nodeValue[n.startOffset]),t.setStart(r.startContainer,r.startOffset),t.setEnd(r.endContainer,r.endOffset),e.selection.setRng(t)),s.selection.getRng().collapsed){var i=Uc(s.getDoc(),f,c,l.decorate);ya(i,"\xa0"),s.selection.getRng().insertNode(i.dom()),s.selection.select(i.dom())}else{var a=Yu.getPersistentBookmark(s.selection,!1),u=s.selection.getRng();jc(s,u,c,l.decorate,f),s.selection.moveToBookmark(a)}})};function Hc(s){var n,r=(n={},{register:function(e,t){n[e]={name:e,settings:t}},lookup:function(e){return n.hasOwnProperty(e)?_.from(n[e]).map(function(e){return e.settings}):_.none()}});da(s,r);var o=fa(s);return{register:function(e,t){r.register(e,t)},annotate:function(t,n){r.lookup(t).each(function(e){Vc(s,t,e,n)})},annotationChanged:function(e,t){o.addListener(e,t)},remove:function(e){ca(s,_.some(e)).each(function(e){var t=e.elements;z(t,ji)})},getAll:function(e){var t,n,r,o,i,a,u=(t=s,n=e,r=ar.fromDom(t.getBody()),o=Qi(r,"["+ua()+'="'+n+'"]'),i={},z(o,function(e){var t=Er(e,sa()),n=i.hasOwnProperty(t)?i[t]:[];i[t]=n.concat([e])}),i);return a=function(e){return W(e,function(e){return e.dom()})},vr(u,function(e,t){return{k:t,v:a(e,t)}})}}}var qc=function(e){return Xt.grep(e.childNodes,function(e){return"LI"===e.nodeName})},$c=function(e){return e&&e.firstChild&&e.firstChild===e.lastChild&&("\xa0"===(t=e.firstChild).data||jo.isBr(t));var t},Wc=function(e){return 0<e.length&&(!(t=e[e.length-1]).firstChild||$c(t))?e.slice(0,-1):e;var t},Kc=function(e,t){var n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null},Xc=function(e,t){var n=_u.after(e),r=Js(t).prev(n);return r?r.toRange():null},Yc=function(t,e,n){var r,o,i,a,u=t.parentNode;return Xt.each(e,function(e){u.insertBefore(e,t)}),r=t,o=n,i=_u.before(r),(a=Js(o).next(i))?a.toRange():null},Gc=function(e,t){var n,r,o,i,a,u,s=t.firstChild,c=t.lastChild;return s&&"meta"===s.name&&(s=s.next),c&&"mce_marker"===c.attr("id")&&(c=c.prev),r=c,u=(n=e).getNonEmptyElements(),r&&(r.isEmpty(u)||(o=r,n.getBlockElements()[o.name]&&(a=o).firstChild&&a.firstChild===a.lastChild&&("br"===(i=o.firstChild).name||"\xa0"===i.value)))&&(c=c.prev),!(!s||s!==c||"ul"!==s.name&&"ol"!==s.name)},Jc=function(e,o,i,t){var n,r,a,u,s,c,l,f,d,m,g,p,h,v,y,b,C,x,w,N=(n=o,r=t,c=e.serialize(r),l=n.createFragment(c),u=(a=l).firstChild,s=a.lastChild,u&&"META"===u.nodeName&&u.parentNode.removeChild(u),s&&"mce_marker"===s.id&&s.parentNode.removeChild(s),a),E=Kc(o,i.startContainer),S=Wc(qc(N.firstChild)),T=o.getRoot(),k=function(e){var t=_u.fromRangeStart(i),n=Js(o.getRoot()),r=1===e?n.prev(t):n.next(t);return!r||Kc(o,r.getNode())!==E};return k(1)?Yc(E,S,T):k(2)?(f=E,d=S,m=T,o.insertAfter(d.reverse(),f),Xc(d[0],m)):(p=S,h=T,v=g=E,b=(y=i).cloneRange(),C=y.cloneRange(),b.setStartBefore(v),C.setEndAfter(v),x=[b.cloneContents(),C.cloneContents()],(w=g.parentNode).insertBefore(x[0],g),Xt.each(p,function(e){w.insertBefore(e,g)}),w.insertBefore(x[1],g),w.removeChild(g),Xc(p[p.length-1],h))},Qc=function(e,t){return!!Kc(e,t)},Zc=Xt.each,el=function(o){this.compare=function(e,t){if(e.nodeName!==t.nodeName)return!1;var n=function(n){var r={};return Zc(o.getAttribs(n),function(e){var t=e.nodeName.toLowerCase();0!==t.indexOf("_")&&"style"!==t&&0!==t.indexOf("data-")&&(r[t]=o.getAttrib(n,t))}),r},r=function(e,t){var n,r;for(r in e)if(e.hasOwnProperty(r)){if(void 0===(n=t[r]))return!1;if(e[r]!==n)return!1;delete t[r]}for(r in t)if(t.hasOwnProperty(r))return!1;return!0};return!(!r(n(e),n(t))||!r(o.parseStyle(o.getAttrib(e,"style")),o.parseStyle(o.getAttrib(t,"style")))||yc(e)||yc(t))}},tl=function(e){var t=Qi(e,"br"),n=U(function(e){for(var t=[],n=e.dom();n;)t.push(ar.fromDom(n)),n=n.lastChild;return t}(e).slice(-1),wo);t.length===n.length&&z(n,Ui)},nl=function(e){zi(e),Fi(e,ar.fromHtml('<br data-mce-bogus="1">'))},rl=function(n){Gr(n).each(function(t){Hr(t).each(function(e){Co(n)&&wo(t)&&Co(e)&&Ui(t)})})},ol=Xt.makeMap;function il(e){var u,s,c,l,f,d=[];return u=(e=e||{}).indent,s=ol(e.indent_before||""),c=ol(e.indent_after||""),l=ti.getEncodeFunc(e.entity_encoding||"raw",e.entities),f="html"===e.element_format,{start:function(e,t,n){var r,o,i,a;if(u&&s[e]&&0<d.length&&0<(a=d[d.length-1]).length&&"\n"!==a&&d.push("\n"),d.push("<",e),t)for(r=0,o=t.length;r<o;r++)i=t[r],d.push(" ",i.name,'="',l(i.value,!0),'"');d[d.length]=!n||f?">":" />",n&&u&&c[e]&&0<d.length&&0<(a=d[d.length-1]).length&&"\n"!==a&&d.push("\n")},end:function(e){var t;d.push("</",e,">"),u&&c[e]&&0<d.length&&0<(t=d[d.length-1]).length&&"\n"!==t&&d.push("\n")},text:function(e,t){0<e.length&&(d[d.length]=t?e:l(e))},cdata:function(e){d.push("<![CDATA[",e,"]]>")},comment:function(e){d.push("\x3c!--",e,"--\x3e")},pi:function(e,t){t?d.push("<?",e," ",l(t),"?>"):d.push("<?",e,"?>"),u&&d.push("\n")},doctype:function(e){d.push("<!DOCTYPE",e,">",u?"\n":"")},reset:function(){d.length=0},getContent:function(){return d.join("").replace(/\n$/,"")}}}function al(t,g){void 0===g&&(g=di());var p=il(t);return(t=t||{}).validate=!("validate"in t)||t.validate,{serialize:function(e){var f,d;d=t.validate,f={3:function(e){p.text(e.value,e.raw)},8:function(e){p.comment(e.value)},7:function(e){p.pi(e.name,e.value)},10:function(e){p.doctype(e.value)},4:function(e){p.cdata(e.value)},11:function(e){if(e=e.firstChild)for(;m(e),e=e.next;);}},p.reset();var m=function(e){var t,n,r,o,i,a,u,s,c,l=f[e.type];if(l)l(e);else{if(t=e.name,n=e.shortEnded,r=e.attributes,d&&r&&1<r.length&&((a=[]).map={},c=g.getElementRule(e.name))){for(u=0,s=c.attributesOrder.length;u<s;u++)(o=c.attributesOrder[u])in r.map&&(i=r.map[o],a.map[o]=i,a.push({name:o,value:i}));for(u=0,s=r.length;u<s;u++)(o=r[u].name)in a.map||(i=r.map[o],a.map[o]=i,a.push({name:o,value:i}));r=a}if(p.start(e.name,r,n),!n){if(e=e.firstChild)for(;m(e),e=e.next;);p.end(t)}}};return 1!==e.type||t.inner?f[11](e):m(e),p.getContent()}}}var ul,sl=function(a){var u=_u.fromRangeStart(a),s=_u.fromRangeEnd(a),c=a.commonAncestorContainer;return sc.fromPosition(!1,c,s).map(function(e){return!Ts(u,s,c)&&Ts(u,e,c)?(t=u.container(),n=u.offset(),r=e.container(),o=e.offset(),(i=V.document.createRange()).setStart(t,n),i.setEnd(r,o),i):a;var t,n,r,o,i}).getOr(a)},cl=function(e){return e.collapsed?e:sl(e)},ll=jo.matchNodeNames("td th"),fl=function(e,t){var n,r,o=e.selection.getRng(),i=o.startContainer,a=o.startOffset;o.collapsed&&(n=i,r=a,jo.isText(n)&&"\xa0"===n.nodeValue[r-1])&&jo.isText(i)&&(i.insertData(a-1," "),i.deleteData(a,1),o.setStart(i,a),o.setEnd(i,a),e.selection.setRng(o)),e.selection.setContent(t)},dl=function(e,t,n){var r,o,i,a,u,s,c,l,f,d,m,g=e.selection,p=e.dom;if(/^ | $/.test(t)&&(t=function(e,t){var n,r;n=e.startContainer,r=e.startOffset;var o=function(e){return n[e]&&3===n[e].nodeType};return 3===n.nodeType&&(0<r?t=t.replace(/^&nbsp;/," "):o("previousSibling")||(t=t.replace(/^ /,"&nbsp;")),r<n.length?t=t.replace(/&nbsp;(<br>|)$/," "):o("nextSibling")||(t=t.replace(/(&nbsp;| )(<br>|)$/,"&nbsp;"))),t}(g.getRng(),t)),r=e.parser,m=n.merge,o=al({validate:e.settings.validate},e.schema),d='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>',s={content:t,format:"html",selection:!0,paste:n.paste},(s=e.fire("BeforeSetContent",s)).isDefaultPrevented())e.fire("SetContent",{content:s.content,format:"html",selection:!0,paste:n.paste});else{-1===(t=s.content).indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,d);var h,v,y,b,C,x,w=(l=g.getRng()).startContainer||(l.parentElement?l.parentElement():null),N=e.getBody();w===N&&g.isCollapsed()&&p.isBlock(N.firstChild)&&(h=e,(v=N.firstChild)&&!h.schema.getShortEndedElements()[v.nodeName])&&p.isEmpty(N.firstChild)&&((l=p.createRng()).setStart(N.firstChild,0),l.setEnd(N.firstChild,0),g.setRng(l)),g.isCollapsed()||(e.selection.setRng(cl(e.selection.getRng())),e.getDoc().execCommand("Delete",!1,null),y=e.selection.getRng(),b=t,C=y.startContainer,x=y.startOffset,3===C.nodeType&&y.collapsed&&("\xa0"===C.data[x]?(C.deleteData(x,1),/[\u00a0| ]$/.test(b)||(b+=" ")):"\xa0"===C.data[x-1]&&(C.deleteData(x-1,1),/[\u00a0| ]$/.test(b)||(b=" "+b))),t=b);var E,S,T,k={context:(i=g.getNode()).nodeName.toLowerCase(),data:n.data,insert:!0};if(u=r.parse(t,k),!0===n.paste&&Gc(e.schema,u)&&Qc(p,i))return l=Jc(o,p,e.selection.getRng(),u),e.selection.setRng(l),void e.fire("SetContent",s);if(function(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}(u),"mce_marker"===(f=u.lastChild).attr("id"))for(f=(c=f).prev;f;f=f.walk(!0))if(3===f.type||!p.isBlock(f.name)){e.schema.isValidChild(f.parent.name,"span")&&f.parent.insert(c,f,"br"===f.name);break}if(e._selectionOverrides.showBlockCaretContainer(i),k.invalid){for(fl(e,d),i=g.getNode(),a=e.getBody(),9===i.nodeType?i=f=a:f=i;f!==a;)f=(i=f).parentNode;t=i===a?a.innerHTML:p.getOuterHTML(i),t=o.serialize(r.parse(t.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return o.serialize(u)}))),i===a?p.setHTML(a,t):p.setOuterHTML(i,t)}else!function(e,t,n){if("all"===n.getAttribute("data-mce-bogus"))n.parentNode.insertBefore(e.dom.createFragment(t),n);else{var r=n.firstChild,o=n.lastChild;!r||r===o&&"BR"===r.nodeName?e.dom.setHTML(n,t):fl(e,t)}}(e,t=o.serialize(u),i);!function(e,t){var n=e.schema.getTextInlineElements(),r=e.dom;if(t){var o=e.getBody(),i=new el(r);Xt.each(r.select("*[data-mce-fragment]"),function(e){for(var t=e.parentNode;t&&t!==o;t=t.parentNode)n[e.nodeName.toLowerCase()]&&i.compare(t,e)&&r.remove(e,!0)})}}(e,m),function(n,e){var t,r,o,i,a,u=n.dom,s=n.selection;if(e){if(n.selection.scrollIntoView(e),t=function(e){for(var t=n.getBody();e&&e!==t;e=e.parentNode)if("false"===n.dom.getContentEditable(e))return e;return null}(e))return u.remove(e),s.select(t);var c=u.createRng();(i=e.previousSibling)&&3===i.nodeType?(c.setStart(i,i.nodeValue.length),fe.ie||(a=e.nextSibling)&&3===a.nodeType&&(i.appendData(a.data),a.parentNode.removeChild(a))):(c.setStartBefore(e),c.setEndBefore(e)),r=u.getParent(e,u.isBlock),u.remove(e),r&&u.isEmpty(r)&&(n.$(r).empty(),c.setStart(r,0),c.setEnd(r,0),ll(r)||r.getAttribute("data-mce-fragment")||!(o=function(e){var t=_u.fromRangeStart(e);if(t=Js(n.getBody()).next(t))return t.toRange()}(c))?u.add(r,u.create("br",{"data-mce-bogus":"1"})):(c=o,u.remove(r))),s.setRng(c)}}(e,p.get("mce_marker")),E=e.getBody(),Xt.each(E.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")}),S=e.dom,T=e.selection.getStart(),_.from(S.getParent(T,"td,th")).map(ar.fromDom).each(rl),e.fire("SetContent",s),e.addVisual()}},ml=function(e,t){var n,r,o="string"!=typeof(n=t)?(r=Xt.extend({paste:n.paste,data:{paste:n.paste}},n),{content:n.content,details:r}):{content:n,details:{}};dl(e,o.content,o.details)},gl=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,pl=function(e,t,n){var r=e.getParam(t,n);if(-1!==r.indexOf("=")){var o=e.getParam(t,"","hash");return o.hasOwnProperty(e.id)?o[e.id]:n}return r},hl=function(e){return e.getParam("iframe_attrs",{})},vl=function(e){return e.getParam("doctype","<!DOCTYPE html>")},yl=function(e){return e.getParam("document_base_url","")},bl=function(e){return pl(e,"body_id","tinymce")},Cl=function(e){return pl(e,"body_class","")},xl=function(e){return e.getParam("content_security_policy","")},wl=function(e){return e.getParam("br_in_pre",!0)},Nl=function(e){if(e.getParam("force_p_newlines",!1))return"p";var t=e.getParam("forced_root_block","p");return!1===t?"":t},El=function(e){return e.getParam("forced_root_block_attrs",{})},Sl=function(e){return e.getParam("br_newline_selector",".mce-toc h2,figcaption,caption")},Tl=function(e){return e.getParam("no_newline_selector","")},kl=function(e){return e.getParam("keep_styles",!0)},_l=function(e){return e.getParam("end_container_on_empty_block",!1)},Al=function(e){return Xt.explode(e.getParam("font_size_style_values",""))},Rl=function(e){return Xt.explode(e.getParam("font_size_classes",""))},Dl=function(e){return e.getParam("images_dataimg_filter",q(!0),"function")},Ol=function(e){return e.getParam("automatic_uploads",!0,"boolean")},Bl=function(e){return e.getParam("images_reuse_filename",!1,"boolean")},Pl=function(e){return e.getParam("images_replace_blob_uris",!0,"boolean")},Il=function(e){return e.getParam("images_upload_url","","string")},Ll=function(e){return e.getParam("images_upload_base_path","","string")},Fl=function(e){return e.getParam("images_upload_credentials",!1,"boolean")},Ml=function(e){return e.getParam("images_upload_handler",null,"function")},zl=function(e){return e.getParam("content_css_cors",!1,"boolean")},Ul=function(e){return e.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string")},jl=function(e,t){if(!t)return t;var n=t.container(),r=t.offset();return e?Ta(n)?jo.isText(n.nextSibling)?_u(n.nextSibling,0):_u.after(n):Aa(t)?_u(n,r+1):t:Ta(n)?jo.isText(n.previousSibling)?_u(n.previousSibling,n.previousSibling.data.length):_u.before(n):Ra(t)?_u(n,r-1):t},Vl={isInlineTarget:function(e,t){return Lr(ar.fromDom(t),Ul(e))},findRootInline:function(e,t,n){var r,o,i,a=(r=e,o=t,i=n,U(Si.DOM.getParents(i.container(),"*",o),r));return _.from(a[a.length-1])},isRtl:function(e){return"rtl"===Si.DOM.getStyle(e,"direction",!0)||(t=e.textContent,gl.test(t));var t},isAtZwsp:function(e){return Aa(e)||Ra(e)},normalizePosition:jl,normalizeForwards:d(jl,!0),normalizeBackwards:d(jl,!1),hasSameParentBlock:function(e,t,n){var r=Ss(t,e),o=Ss(n,e);return r&&r===o}},Hl=function(e,t){return zr(e,t)?na(t,function(e){return No(e)||So(e)},(n=e,function(e){return Mr(n,ar.fromDom(e.dom().parentNode))})):_.none();var n},ql=function(e){var t,n,r;e.dom.isEmpty(e.getBody())&&(e.setContent(""),n=(t=e).getBody(),r=n.firstChild&&t.dom.isBlock(n.firstChild)?n.firstChild:n,t.selection.setCursorLocation(r,0))},$l=function(i,a,u){return ru(sc.firstPositionIn(u),sc.lastPositionIn(u),function(e,t){var n=Vl.normalizePosition(!0,e),r=Vl.normalizePosition(!1,t),o=Vl.normalizePosition(!1,a);return i?sc.nextPosition(u,o).map(function(e){return e.isEqual(r)&&a.isEqual(n)}).getOr(!1):sc.prevPosition(u,o).map(function(e){return e.isEqual(n)&&a.isEqual(r)}).getOr(!1)}).getOr(!0)},Wl=function(e,t){var n,r,o,i=ar.fromDom(e),a=ar.fromDom(t);return n=a,r="pre,code",o=d(Mr,i),ra(n,r,o).isSome()},Kl=function(e,t){return Ha(t)&&!1===(r=e,o=t,jo.isText(o)&&/^[ \t\r\n]*$/.test(o.data)&&!1===Wl(r,o))||(n=t,jo.isElement(n)&&"A"===n.nodeName&&n.hasAttribute("name"))||Xl(t);var n,r,o},Xl=jo.hasAttribute("data-mce-bookmark"),Yl=jo.hasAttribute("data-mce-bogus"),Gl=jo.hasAttributeValue("data-mce-bogus","all"),Jl=function(e){return function(e){var t,n,r=0;if(Kl(e,e))return!1;if(!(n=e.firstChild))return!0;t=new go(n,e);do{if(Gl(n))n=t.next(!0);else if(Yl(n))n=t.next();else if(jo.isBr(n))r++,n=t.next();else{if(Kl(e,n))return!1;n=t.next()}}while(n);return r<=1}(e.dom())},Ql=Ar("block","position"),Zl=Ar("from","to"),ef=function(e,t){var n=ar.fromDom(e),r=ar.fromDom(t.container());return Hl(n,r).map(function(e){return Ql(e,t)})},tf=function(o,i,e){var t=ef(o,_u.fromRangeStart(e)),n=t.bind(function(e){return sc.fromPosition(i,o,e.position()).bind(function(e){return ef(o,e).map(function(e){return t=o,n=i,r=e,jo.isBr(r.position().getNode())&&!1===Jl(r.block())?sc.positionIn(!1,r.block().dom()).bind(function(e){return e.isEqual(r.position())?sc.fromPosition(n,t,e).bind(function(e){return ef(t,e)}):_.some(r)}).getOr(r):r;var t,n,r})})});return ru(t,n,Zl).filter(function(e){return!1===Mr((r=e).from().block(),r.to().block())&&Vr((n=e).from().block()).bind(function(t){return Vr(n.to().block()).filter(function(e){return Mr(t,e)})}).isSome()&&(t=e,!1===jo.isContentEditableFalse(t.from().block().dom())&&!1===jo.isContentEditableFalse(t.to().block().dom()));var t,n,r})},nf=function(e,t,n){return n.collapsed?tf(e,t,n):_.none()},rf=function(e,t,n){return zr(t,e)?function(e,t){for(var n=D(t)?t:b,r=e.dom(),o=[];null!==r.parentNode&&r.parentNode!==undefined;){var i=r.parentNode,a=ar.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o}(e,function(e){return n(e)||Mr(e,t)}).slice(0,-1):[]},of=function(e,t){return rf(e,t,q(!1))},af=of,uf=function(e,t){return[e].concat(of(e,t))},sf=function(e){var t,n=(t=Kr(e),Y(t,Co).fold(function(){return t},function(e){return t.slice(0,e)}));return z(n,Ui),n},cf=function(e,t){var n=uf(t,e);return X(n.reverse(),Jl).each(Ui)},lf=function(e,t,n,r){if(Jl(n))return nl(n),sc.firstPositionIn(n.dom());0===U($r(r),function(e){return!Jl(e)}).length&&Jl(t)&&Pi(r,ar.fromTag("br"));var o=sc.prevPosition(n.dom(),_u.before(r.dom()));return z(sf(t),function(e){Pi(r,e)}),cf(e,t),o},ff=function(e,t,n){if(Jl(n))return Ui(n),Jl(t)&&nl(t),sc.firstPositionIn(t.dom());var r=sc.lastPositionIn(n.dom());return z(sf(t),function(e){Fi(n,e)}),cf(e,t),r},df=function(e,t){return zr(t,e)?(n=uf(e,t),_.from(n[n.length-1])):_.none();var n},mf=function(e,t){sc.positionIn(e,t.dom()).map(function(e){return e.getNode()}).map(ar.fromDom).filter(wo).each(Ui)},gf=function(e,t,n){return mf(!0,t),mf(!1,n),df(t,n).fold(d(ff,e,t,n),d(lf,e,t,n))},pf=function(e,t,n,r){return t?gf(e,r,n):gf(e,n,r)},hf=function(t,n){var e,r=ar.fromDom(t.getBody());return(e=nf(r.dom(),n,t.selection.getRng()).bind(function(e){return pf(r,n,e.from().block(),e.to().block())})).each(function(e){t.selection.setRng(e.toRange())}),e.isSome()},vf=function(e,t){var n=ar.fromDom(t),r=d(Mr,e);return ta(n,_o,r).isSome()},yf=function(e,t){var n,r,o=sc.prevPosition(e.dom(),_u.fromRangeStart(t)).isNone(),i=sc.nextPosition(e.dom(),_u.fromRangeEnd(t)).isNone();return!(vf(n=e,(r=t).startContainer)||vf(n,r.endContainer))&&o&&i},bf=function(e){var n,r,o,t,i=ar.fromDom(e.getBody()),a=e.selection.getRng();return yf(i,a)?((t=e).setContent(""),t.selection.setCursorLocation(),!0):(n=i,r=e.selection,o=r.getRng(),ru(Hl(n,ar.fromDom(o.startContainer)),Hl(n,ar.fromDom(o.endContainer)),function(e,t){return!1===Mr(e,t)&&(o.deleteContents(),pf(n,!0,e,t).each(function(e){r.setRng(e.toRange())}),!0)}).getOr(!1))},Cf=function(e,t){return!e.selection.isCollapsed()&&bf(e)},xf=function(a){if(!k(a))throw new Error("cases must be an array");if(0===a.length)throw new Error("there must be at least one case");var u=[],n={};return z(a,function(e,r){var t=gr(e);if(1!==t.length)throw new Error("one and only one name per case");var o=t[0],i=e[o];if(n[o]!==undefined)throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!k(i))throw new Error("case arguments must be an array");u.push(o),n[o]=function(){var e=arguments.length;if(e!==i.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+i.length+" ("+i+"), got "+e);for(var n=new Array(e),t=0;t<n.length;t++)n[t]=arguments[t];return{fold:function(){if(arguments.length!==a.length)throw new Error("Wrong number of arguments to fold. Expected "+a.length+", got "+arguments.length);return arguments[r].apply(null,n)},match:function(e){var t=gr(e);if(u.length!==t.length)throw new Error("Wrong number of arguments to match. Expected: "+u.join(",")+"\nActual: "+t.join(","));if(!J(u,function(e){return F(t,e)}))throw new Error("Not all branches were specified when using match. Specified: "+t.join(", ")+"\nRequired: "+u.join(", "));return e[o].apply(null,n)},log:function(e){V.console.log(e,{constructors:u,constructor:o,params:n})}}}}),n},wf=function(e){return Is(e).exists(wo)},Nf=function(e,t,n){var r=U(uf(ar.fromDom(n.container()),t),Co),o=Z(r).getOr(t);return sc.fromPosition(e,o.dom(),n).filter(wf)},Ef=function(e,t){return Is(t).exists(wo)||Nf(!0,e,t).isSome()},Sf=function(e,t){return(n=t,_.from(n.getNode(!0)).map(ar.fromDom)).exists(wo)||Nf(!1,e,t).isSome();var n},Tf=d(Nf,!1),kf=d(Nf,!0),_f=(ul="\xa0",function(e){return ul===e}),Af=function(e){return/^[\r\n\t ]$/.test(e)},Rf=function(e){return!Af(e)&&!_f(e)},Df=function(n,r,o){return _.from(o.container()).filter(jo.isText).exists(function(e){var t=n?0:-1;return r(e.data.charAt(o.offset()+t))})},Of=d(Df,!0,Af),Bf=d(Df,!1,Af),Pf=function(e){var t=e.container();return jo.isText(t)&&0===t.data.length},If=function(e,t){var n=ks(e,t);return jo.isContentEditableFalse(n)&&!jo.isBogusAll(n)},Lf=d(If,0),Ff=d(If,-1),Mf=function(e,t){return jo.isTable(ks(e,t))},zf=d(Mf,0),Uf=d(Mf,-1),jf=xf([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),Vf=function(e,t,n,r){var o=r.getNode(!1===t);return Hl(ar.fromDom(e),ar.fromDom(n.getNode())).map(function(e){return Jl(e)?jf.remove(e.dom()):jf.moveToElement(o)}).orThunk(function(){return _.some(jf.moveToElement(o))})},Hf=function(u,s,c){return sc.fromPosition(s,u,c).bind(function(e){return a=e.getNode(),_o(ar.fromDom(a))||So(ar.fromDom(a))?_.none():(t=u,o=e,i=function(e){return xo(ar.fromDom(e))&&!Ts(r,o,t)},Bs(!(n=s),r=c).fold(function(){return Bs(n,o).fold(q(!1),i)},i)?_.none():s&&jo.isContentEditableFalse(e.getNode())?Vf(u,s,c,e):!1===s&&jo.isContentEditableFalse(e.getNode(!0))?Vf(u,s,c,e):s&&Ff(c)?_.some(jf.moveToPosition(e)):!1===s&&Lf(c)?_.some(jf.moveToPosition(e)):_.none());var t,n,r,o,i,a})},qf=function(r,e,o){return i=e,a=o.getNode(!1===i),u=i?"after":"before",jo.isElement(a)&&a.getAttribute("data-mce-caret")===u?(t=e,n=o.getNode(!1===e),t&&jo.isContentEditableFalse(n.nextSibling)?_.some(jf.moveToElement(n.nextSibling)):!1===t&&jo.isContentEditableFalse(n.previousSibling)?_.some(jf.moveToElement(n.previousSibling)):_.none()).fold(function(){return Hf(r,e,o)},_.some):Hf(r,e,o).bind(function(e){return t=r,n=o,e.fold(function(e){return _.some(jf.remove(e))},function(e){return _.some(jf.moveToElement(e))},function(e){return Ts(n,e,t)?_.none():_.some(jf.moveToPosition(e))});var t,n});var t,n,i,a,u},$f=function(e,t,n){if(0!==n){var r,o,i,a=e.data.slice(t,t+n),u=t+n>=e.data.length,s=0===t;e.replaceData(t,n,(o=s,i=u,j((r=a).split(""),function(e,t){return-1!==" \f\n\r\t\x0B".indexOf(t)||"\xa0"===t?e.previousCharIsSpace||""===e.str&&o||e.str.length===r.length-1&&i?{previousCharIsSpace:!1,str:e.str+"\xa0"}:{previousCharIsSpace:!0,str:e.str+" "}:{previousCharIsSpace:!1,str:e.str+t}},{previousCharIsSpace:!1,str:""}).str))}},Wf=function(e,t){var n,r=e.data.slice(t),o=r.length-(n=r,n.replace(/^\s+/g,"")).length;return $f(e,t,o)},Kf=function(e,t){return r=e,o=(n=t).container(),i=n.offset(),!1===_u.isTextPosition(n)&&o===r.parentNode&&i>_u.before(r).offset()?_u(t.container(),t.offset()-1):t;var n,r,o,i},Xf=function(e){return Ha(e.previousSibling)?_.some((t=e.previousSibling,jo.isText(t)?_u(t,t.data.length):_u.after(t))):e.previousSibling?sc.lastPositionIn(e.previousSibling):_.none();var t},Yf=function(e){return Ha(e.nextSibling)?_.some((t=e.nextSibling,jo.isText(t)?_u(t,0):_u.before(t))):e.nextSibling?sc.firstPositionIn(e.nextSibling):_.none();var t},Gf=function(r,o){return Xf(o).orThunk(function(){return Yf(o)}).orThunk(function(){return e=r,t=o,n=_u.before(t.previousSibling?t.previousSibling:t.parentNode),sc.prevPosition(e,n).fold(function(){return sc.nextPosition(e,_u.after(t))},_.some);var e,t,n})},Jf=function(n,r){return Yf(r).orThunk(function(){return Xf(r)}).orThunk(function(){return e=n,t=r,sc.nextPosition(e,_u.after(t)).fold(function(){return sc.prevPosition(e,_u.before(t))},_.some);var e,t})},Qf=function(e,t,n){return(r=e,o=t,i=n,r?Jf(o,i):Gf(o,i)).map(d(Kf,n));var r,o,i},Zf=function(t,n,e){e.fold(function(){t.focus()},function(e){t.selection.setRng(e.toRange(),n)})},ed=function(e,t){return t&&e.schema.getBlockElements().hasOwnProperty(lr(t))},td=function(e){if(Jl(e)){var t=ar.fromHtml('<br data-mce-bogus="1">');return zi(e),Fi(e,t),_.some(_u.before(t.dom()))}return _.none()},nd=function(e,t,l){var n,r,o,i,a=Hr(e).filter(mr),u=qr(e).filter(mr);return Ui(e),(n=a,r=u,o=t,i=function(e,t,n){var r,o,i,a,u=e.dom(),s=t.dom(),c=u.data.length;return o=s,i=l,a=Jn((r=u).data).length,r.appendData(o.data),Ui(ar.fromDom(o)),i&&Wf(r,a),n.container()===s?_u(u,c):n},n.isSome()&&r.isSome()&&o.isSome()?_.some(i(n.getOrDie(),r.getOrDie(),o.getOrDie())):_.none()).orThunk(function(){return l&&(a.each(function(e){return t=e.dom(),n=e.dom().length,r=t.data.slice(0,n),o=r.length-Jn(r).length,$f(t,n-o,o);var t,n,r,o}),u.each(function(e){return Wf(e.dom(),0)})),t})},rd=function(t,n,e,r){void 0===r&&(r=!0);var o,i,a=Qf(n,t.getBody(),e.dom()),u=ta(e,d(ed,t),(o=t.getBody(),function(e){return e.dom()===o})),s=nd(e,a,(i=e,br(t.schema.getTextInlineElements(),lr(i))));t.dom.isEmpty(t.getBody())?(t.setContent(""),t.selection.setCursorLocation()):u.bind(td).fold(function(){r&&Zf(t,n,s)},function(e){r&&Zf(t,n,_.some(e))})},od=function(a,u){var e,t,n,r,o,i;return(e=a.getBody(),t=u,n=a.selection.getRng(),r=Os(t?1:-1,e,n),o=_u.fromRangeStart(r),i=ar.fromDom(e),!1===t&&Ff(o)?_.some(jf.remove(o.getNode(!0))):t&&Lf(o)?_.some(jf.remove(o.getNode())):!1===t&&Lf(o)&&Sf(i,o)?Tf(i,o).map(function(e){return jf.remove(e.getNode())}):t&&Ff(o)&&Ef(i,o)?kf(i,o).map(function(e){return jf.remove(e.getNode())}):qf(e,t,o)).map(function(e){return e.fold((o=a,i=u,function(e){return o._selectionOverrides.hideFakeCaret(),rd(o,i,ar.fromDom(e)),!0}),(n=a,r=u,function(e){var t=r?_u.before(e):_u.after(e);return n.selection.setRng(t.toRange()),!0}),(t=a,function(e){return t.selection.setRng(e.toRange()),!0}));var t,n,r,o,i}).getOr(!1)},id=function(e,t){var n,r=e.selection.getNode();return!!jo.isContentEditableFalse(r)&&(n=ar.fromDom(e.getBody()),z(Qi(n,".mce-offscreen-selection"),Ui),rd(e,t,ar.fromDom(e.selection.getNode())),ql(e),!0)},ad=function(e,t){return e.selection.isCollapsed()?od(e,t):id(e,t)},ud=function(e){var t,n=function(e,t){for(;t&&t!==e;){if(jo.isContentEditableTrue(t)||jo.isContentEditableFalse(t))return t;t=t.parentNode}return null}(e.getBody(),e.selection.getNode());return jo.isContentEditableTrue(n)&&e.dom.isBlock(n)&&e.dom.isEmpty(n)&&(t=e.dom.create("br",{"data-mce-bogus":"1"}),e.dom.setHTML(n,""),n.appendChild(t),e.selection.setRng(_u.before(t).toRange())),!0},sd=jo.isText,cd=function(e){return sd(e)&&e.data[0]===xa},ld=function(e){return sd(e)&&e.data[e.data.length-1]===xa},fd=function(e){return e.ownerDocument.createTextNode(xa)},dd=function(e,t){return e?function(e){if(sd(e.previousSibling))return ld(e.previousSibling)||e.previousSibling.appendData(xa),e.previousSibling;if(sd(e))return cd(e)||e.insertData(0,xa),e;var t=fd(e);return e.parentNode.insertBefore(t,e),t}(t):function(e){if(sd(e.nextSibling))return cd(e.nextSibling)||e.nextSibling.insertData(0,xa),e.nextSibling;if(sd(e))return ld(e)||e.appendData(xa),e;var t=fd(e);return e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t}(t)},md=d(dd,!0),gd=d(dd,!1),pd=function(e,t){return jo.isText(e.container())?dd(t,e.container()):dd(t,e.getNode())},hd=function(e,t){var n=t.get();return n&&e.container()===n&&Ta(n)},vd=function(n,e){return e.fold(function(e){ss.remove(n.get());var t=md(e);return n.set(t),_.some(_u(t,t.length-1))},function(e){return sc.firstPositionIn(e).map(function(e){if(hd(e,n))return _u(n.get(),1);ss.remove(n.get());var t=pd(e,!0);return n.set(t),_u(t,1)})},function(e){return sc.lastPositionIn(e).map(function(e){if(hd(e,n))return _u(n.get(),n.get().length-1);ss.remove(n.get());var t=pd(e,!1);return n.set(t),_u(t,t.length-1)})},function(e){ss.remove(n.get());var t=gd(e);return n.set(t),_.some(_u(t,1))})},yd=function(e,t){for(var n=0;n<e.length;n++){var r=e[n].apply(null,t);if(r.isSome())return r}return _.none()},bd=xf([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),Cd=function(e,t){var n=Ss(t,e);return n||e},xd=function(e,t,n){var r=Vl.normalizeForwards(n),o=Cd(t,r.container());return Vl.findRootInline(e,o,r).fold(function(){return sc.nextPosition(o,r).bind(d(Vl.findRootInline,e,o)).map(function(e){return bd.before(e)})},_.none)},wd=function(e,t){return null===Qu(e,t)},Nd=function(e,t,n){return Vl.findRootInline(e,t,n).filter(d(wd,t))},Ed=function(e,t,n){var r=Vl.normalizeBackwards(n);return Nd(e,t,r).bind(function(e){return sc.prevPosition(e,r).isNone()?_.some(bd.start(e)):_.none()})},Sd=function(e,t,n){var r=Vl.normalizeForwards(n);return Nd(e,t,r).bind(function(e){return sc.nextPosition(e,r).isNone()?_.some(bd.end(e)):_.none()})},Td=function(e,t,n){var r=Vl.normalizeBackwards(n),o=Cd(t,r.container());return Vl.findRootInline(e,o,r).fold(function(){return sc.prevPosition(o,r).bind(d(Vl.findRootInline,e,o)).map(function(e){return bd.after(e)})},_.none)},kd=function(e){return!1===Vl.isRtl(Ad(e))},_d=function(e,t,n){return yd([xd,Ed,Sd,Td],[e,t,n]).filter(kd)},Ad=function(e){return e.fold($,$,$,$)},Rd=function(e){return e.fold(q("before"),q("start"),q("end"),q("after"))},Dd=function(e){return e.fold(bd.before,bd.before,bd.after,bd.after)},Od=function(n,e,r,t,o,i){return ru(Vl.findRootInline(e,r,t),Vl.findRootInline(e,r,o),function(e,t){return e!==t&&Vl.hasSameParentBlock(r,e,t)?bd.after(n?e:t):i}).getOr(i)},Bd=function(e,r){return e.fold(q(!0),function(e){return n=r,!(Rd(t=e)===Rd(n)&&Ad(t)===Ad(n));var t,n})},Pd=function(e,t){return e?t.fold(H(_.some,bd.start),_.none,H(_.some,bd.after),_.none):t.fold(_.none,H(_.some,bd.before),_.none,H(_.some,bd.end))},Id=function(a,u,s,c){var e=Vl.normalizePosition(a,c),l=_d(u,s,e);return _d(u,s,e).bind(d(Pd,a)).orThunk(function(){return t=a,n=u,r=s,o=l,e=c,i=Vl.normalizePosition(t,e),sc.fromPosition(t,r,i).map(d(Vl.normalizePosition,t)).fold(function(){return o.map(Dd)},function(e){return _d(n,r,e).map(d(Od,t,n,r,i,e)).filter(d(Bd,o))}).filter(kd);var t,n,r,o,e,i})},Ld=_d,Fd=Id,Md=(d(Id,!1),d(Id,!0),Dd),zd=function(e){return e.fold(bd.start,bd.start,bd.end,bd.end)},Ud=function(e){return D(e.selection.getSel().modify)},jd=function(e,t,n){var r=e?1:-1;return t.setRng(_u(n.container(),n.offset()+r).toRange()),t.getSel().modify("move",e?"forward":"backward","word"),!0},Vd=function(e,t){var n=t.selection.getRng(),r=e?_u.fromRangeEnd(n):_u.fromRangeStart(n);return!!Ud(t)&&(e&&Aa(r)?jd(!0,t.selection,r):!(e||!Ra(r))&&jd(!1,t.selection,r))},Hd=function(e,t){var n=e.dom.createRng();n.setStart(t.container(),t.offset()),n.setEnd(t.container(),t.offset()),e.selection.setRng(n)},qd=function(e){return!1!==e.settings.inline_boundaries},$d=function(e,t){e?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")},Wd=function(t,e,n){return vd(e,n).map(function(e){return Hd(t,e),n})},Kd=function(e,t,n){return function(){return!!qd(t)&&Vd(e,t)}},Xd={move:function(a,u,s){return function(){return!!qd(a)&&(t=a,n=u,e=s,r=t.getBody(),o=_u.fromRangeStart(t.selection.getRng()),i=d(Vl.isInlineTarget,t),Fd(e,i,r,o).bind(function(e){return Wd(t,n,e)})).isSome();var t,n,e,r,o,i}},moveNextWord:d(Kd,!0),movePrevWord:d(Kd,!1),setupSelectedState:function(a){var u=Hi(null),s=d(Vl.isInlineTarget,a);return a.on("NodeChange",function(e){var t,n,r,o,i;qd(a)&&(t=s,n=a.dom,r=e.parents,o=U(n.select('*[data-mce-selected="inline-boundary"]'),t),i=U(r,t),z(Q(o,i),d($d,!1)),z(Q(i,o),d($d,!0)),function(e,t){if(e.selection.isCollapsed()&&!0!==e.composing&&t.get()){var n=_u.fromRangeStart(e.selection.getRng());_u.isTextPosition(n)&&!1===Vl.isAtZwsp(n)&&(Hd(e,ss.removeAndReposition(t.get(),n)),t.set(null))}}(a,u),function(n,r,o,e){if(r.selection.isCollapsed()){var t=U(e,n);z(t,function(e){var t=_u.fromRangeStart(r.selection.getRng());Ld(n,r.getBody(),t).bind(function(e){return Wd(r,o,e)})})}}(s,a,u,e.parents))}),u},setCaretPosition:Hd},Yd=function(t,n){return function(e){return vd(n,e).map(function(e){return Xd.setCaretPosition(t,e),!0}).getOr(!1)}},Gd=function(r,o,i,a){var u=r.getBody(),s=d(Vl.isInlineTarget,r);r.undoManager.ignore(function(){var e,t,n;r.selection.setRng((e=i,t=a,(n=V.document.createRange()).setStart(e.container(),e.offset()),n.setEnd(t.container(),t.offset()),n)),r.execCommand("Delete"),Ld(s,u,_u.fromRangeStart(r.selection.getRng())).map(zd).map(Yd(r,o))}),r.nodeChanged()},Jd=function(n,r,i,o){var e,t,a=(e=n.getBody(),t=o.container(),Ss(t,e)||e),u=d(Vl.isInlineTarget,n),s=Ld(u,a,o);return s.bind(function(e){return i?e.fold(q(_.some(zd(e))),_.none,q(_.some(Md(e))),_.none):e.fold(_.none,q(_.some(Md(e))),_.none,q(_.some(zd(e))))}).map(Yd(n,r)).getOrThunk(function(){var t=sc.navigate(i,a,o),e=t.bind(function(e){return Ld(u,a,e)});return s.isSome()&&e.isSome()?Vl.findRootInline(u,a,o).map(function(e){return o=e,!!ru(sc.firstPositionIn(o),sc.lastPositionIn(o),function(e,t){var n=Vl.normalizePosition(!0,e),r=Vl.normalizePosition(!1,t);return sc.nextPosition(o,n).map(function(e){return e.isEqual(r)}).getOr(!0)}).getOr(!0)&&(rd(n,i,ar.fromDom(e)),!0);var o}).getOr(!1):e.bind(function(e){return t.map(function(e){return i?Gd(n,r,o,e):Gd(n,r,e,o),!0})}).getOr(!1)})},Qd=function(e,t,n){if(e.selection.isCollapsed()&&!1!==e.settings.inline_boundaries){var r=_u.fromRangeStart(e.selection.getRng());return Jd(e,t,n,r)}return!1},Zd=Ar("start","end"),em=Ar("rng","table","cells"),tm=xf([{removeTable:["element"]},{emptyCells:["cells"]}]),nm=function(e,t){return ia(ar.fromDom(e),"td,th",t)},rm=function(e,t){return ra(e,"table",t)},om=function(e){return!1===Mr(e.start(),e.end())},im=function(e,n){return rm(e.start(),n).bind(function(t){return rm(e.end(),n).bind(function(e){return Mr(t,e)?_.some(t):_.none()})})},am=function(e){return Qi(e,"td,th")},um=function(r,e){var t=nm(e.startContainer,r),n=nm(e.endContainer,r);return e.collapsed?_.none():ru(t,n,Zd).fold(function(){return t.fold(function(){return n.bind(function(t){return rm(t,r).bind(function(e){return Z(am(e)).map(function(e){return Zd(e,t)})})})},function(t){return rm(t,r).bind(function(e){return ee(am(e)).map(function(e){return Zd(t,e)})})})},function(e){return sm(r,e)?_.none():(n=r,rm((t=e).start(),n).bind(function(e){return ee(am(e)).map(function(e){return Zd(t.start(),e)})}));var t,n})},sm=function(e,t){return im(t,e).isSome()},cm=function(e,t){var n,r,o,i,a=d(Mr,e);return(n=t,r=a,o=nm(n.startContainer,r),i=nm(n.endContainer,r),ru(o,i,Zd).filter(om).filter(function(e){return sm(r,e)}).orThunk(function(){return um(r,n)})).bind(function(e){return im(t=e,a).map(function(e){return em(t,e,am(e))});var t})},lm=function(e,t){return Y(e,function(e){return Mr(e,t)})},fm=function(n){return(r=n,ru(lm(r.cells(),r.rng().start()),lm(r.cells(),r.rng().end()),function(e,t){return r.cells().slice(e,t+1)})).map(function(e){var t=n.cells();return e.length===t.length?tm.removeTable(n.table()):tm.emptyCells(e)});var r},dm=function(e,t){return cm(e,t).bind(fm)},mm=function(e){var t=[];if(e)for(var n=0;n<e.rangeCount;n++)t.push(e.getRangeAt(n));return t},gm=mm,pm=function(e){return G(e,function(e){var t=Za(e);return t?[ar.fromDom(t)]:[]})},hm=function(e){return 1<mm(e).length},vm=function(e){return U(pm(e),_o)},ym=function(e){return Qi(e,"td[data-mce-selected],th[data-mce-selected]")},bm=function(e,t){var n=ym(t),r=vm(e);return 0<n.length?n:r},Cm=bm,xm=function(e){return bm(gm(e.selection.getSel()),ar.fromDom(e.getBody()))},wm=function(e,t){return z(t,nl),e.selection.setCursorLocation(t[0].dom(),0),!0},Nm=function(e,t){return rd(e,!1,t),!0},Em=function(n,e,r,t){return Tm(e,t).fold(function(){return t=n,dm(e,r).map(function(e){return e.fold(d(Nm,t),d(wm,t))});var t},function(e){return km(n,e)}).getOr(!1)},Sm=function(e,t){return X(uf(t,e),_o)},Tm=function(e,t){return X(uf(t,e),function(e){return"caption"===lr(e)})},km=function(e,t){return nl(t),e.selection.setCursorLocation(t.dom(),0),_.some(!0)},_m=function(u,s,c,l,f){return sc.navigate(c,u.getBody(),f).bind(function(e){return r=l,o=c,i=f,a=e,sc.firstPositionIn(r.dom()).bind(function(t){return sc.lastPositionIn(r.dom()).map(function(e){return o?i.isEqual(t)&&a.isEqual(e):i.isEqual(e)&&a.isEqual(t)})}).getOr(!0)?km(u,l):(t=l,n=e,Tm(s,ar.fromDom(n.getNode())).map(function(e){return!1===Mr(e,t)}));var t,n,r,o,i,a}).or(_.some(!0))},Am=function(a,u,s,e){var c=_u.fromRangeStart(a.selection.getRng());return Sm(s,e).bind(function(e){return Jl(e)?km(a,e):(t=a,n=s,r=u,o=e,i=c,sc.navigate(r,t.getBody(),i).bind(function(e){return Sm(n,ar.fromDom(e.getNode())).map(function(e){return!1===Mr(e,o)})}));var t,n,r,o,i})},Rm=function(a,u,e){var s=ar.fromDom(a.getBody());return Tm(s,e).fold(function(){return Am(a,u,s,e)},function(e){return t=a,n=u,r=s,o=e,i=_u.fromRangeStart(t.selection.getRng()),Jl(o)?km(t,o):_m(t,r,n,o,i);var t,n,r,o,i}).getOr(!1)},Dm=function(e,t){var n,r,o,i,a,u=ar.fromDom(e.selection.getStart(!0)),s=xm(e);return e.selection.isCollapsed()&&0===s.length?Rm(e,t,u):(n=e,r=u,o=ar.fromDom(n.getBody()),i=n.selection.getRng(),0!==(a=xm(n)).length?wm(n,a):Em(n,o,i,r))},Om=wc.isEq,Bm=function(e,t,n){var r=e.formatter.get(n);if(r)for(var o=0;o<r.length;o++)if(!1===r[o].inherit&&e.dom.is(t,r[o].selector))return!0;return!1},Pm=function(t,e,n,r){var o=t.dom.getRoot();return e!==o&&(e=t.dom.getParent(e,function(e){return!!Bm(t,e,n)||e.parentNode===o||!!Fm(t,e,n,r,!0)}),Fm(t,e,n,r))},Im=function(e,t,n){return!!Om(t,n.inline)||!!Om(t,n.block)||(n.selector?1===t.nodeType&&e.is(t,n.selector):void 0)},Lm=function(e,t,n,r,o,i){var a,u,s,c=n[r];if(n.onmatch)return n.onmatch(t,n,r);if(c)if("undefined"==typeof c.length){for(a in c)if(c.hasOwnProperty(a)){if(u="attributes"===r?e.getAttrib(t,a):wc.getStyle(e,t,a),o&&!u&&!n.exact)return;if((!o||n.exact)&&!Om(u,wc.normalizeStyleValue(e,wc.replaceVars(c[a],i),a)))return}}else for(s=0;s<c.length;s++)if("attributes"===r?e.getAttrib(t,c[s]):wc.getStyle(e,t,c[s]))return n;return n},Fm=function(e,t,n,r,o){var i,a,u,s,c=e.formatter.get(n),l=e.dom;if(c&&t)for(a=0;a<c.length;a++)if(i=c[a],Im(e.dom,t,i)&&Lm(l,t,i,"attributes",o,r)&&Lm(l,t,i,"styles",o,r)){if(s=i.classes)for(u=0;u<s.length;u++)if(!e.dom.hasClass(t,s[u]))return;return i}},Mm={matchNode:Fm,matchName:Im,match:function(e,t,n,r){var o;return r?Pm(e,r,t,n):(r=e.selection.getNode(),!!Pm(e,r,t,n)||!((o=e.selection.getStart())===r||!Pm(e,o,t,n)))},matchAll:function(r,o,i){var e,a=[],u={};return e=r.selection.getStart(),r.dom.getParent(e,function(e){var t,n;for(t=0;t<o.length;t++)n=o[t],!u[n]&&Fm(r,e,n,i)&&(u[n]=!0,a.push(n))},r.dom.getRoot()),a},canApply:function(e,t){var n,r,o,i,a,u=e.formatter.get(t),s=e.dom;if(u)for(n=e.selection.getStart(),r=wc.getParents(s,n),i=u.length-1;0<=i;i--){if(!(a=u[i].selector)||u[i].defaultBlock)return!0;for(o=r.length-1;0<=o;o--)if(s.is(r[o],a))return!0}return!1},matchesUnInheritedFormatSelector:Bm},zm=function(e,t){return e.splitText(t)},Um=function(e){var t=e.startContainer,n=e.startOffset,r=e.endContainer,o=e.endOffset;return t===r&&jo.isText(t)?0<n&&n<t.nodeValue.length&&(t=(r=zm(t,n)).previousSibling,n<o?(t=r=zm(r,o-=n).previousSibling,o=r.nodeValue.length,n=0):o=0):(jo.isText(t)&&0<n&&n<t.nodeValue.length&&(t=zm(t,n),n=0),jo.isText(r)&&0<o&&o<r.nodeValue.length&&(o=(r=zm(r,o).previousSibling).nodeValue.length)),{startContainer:t,startOffset:n,endContainer:r,endOffset:o}},jm=xa,Vm="_mce_caret",Hm=function(e){return 0<function(e){for(var t=[];e;){if(3===e.nodeType&&e.nodeValue!==jm||1<e.childNodes.length)return[];1===e.nodeType&&t.push(e),e=e.firstChild}return t}(e).length},qm=function(e){var t;if(e)for(e=(t=new go(e,e)).current();e;e=t.next())if(3===e.nodeType)return e;return null},$m=function(e){var t=ar.fromTag("span");return Nr(t,{id:Vm,"data-mce-bogus":"1","data-mce-type":"format-caret"}),e&&Fi(t,ar.fromText(jm)),t},Wm=function(e,t,n){void 0===n&&(n=!0);var r,o=e.dom,i=e.selection;if(Hm(t))rd(e,!1,ar.fromDom(t),n);else{var a=i.getRng(),u=o.getParent(t,o.isBlock),s=((r=qm(t))&&r.nodeValue.charAt(0)===jm&&r.deleteData(0,1),r);a.startContainer===s&&0<a.startOffset&&a.setStart(s,a.startOffset-1),a.endContainer===s&&0<a.endOffset&&a.setEnd(s,a.endOffset-1),o.remove(t,!0),u&&o.isEmpty(u)&&nl(ar.fromDom(u)),i.setRng(a)}},Km=function(e,t,n){void 0===n&&(n=!0);var r=e.dom,o=e.selection;if(t)Wm(e,t,n);else if(!(t=Qu(e.getBody(),o.getStart())))for(;t=r.get(Vm);)Wm(e,t,!1)},Xm=function(e,t,n){var r=e.dom,o=r.getParent(n,d(wc.isTextBlock,e));o&&r.isEmpty(o)?n.parentNode.replaceChild(t,n):(tl(ar.fromDom(n)),r.isEmpty(n)?n.parentNode.replaceChild(t,n):r.insertAfter(t,n))},Ym=function(e,t){return e.appendChild(t),t},Gm=function(e,t){var n,r,o=(n=function(e,t){return Ym(e,t.cloneNode(!1))},r=t,function(e,t){for(var n=e.length-1;0<=n;n--)t(e[n],n)}(e,function(e){r=n(r,e)}),r);return Ym(o,o.ownerDocument.createTextNode(jm))},Jm=function(i){i.on("mouseup keydown",function(e){var t,n,r,o;t=i,n=e.keyCode,r=t.selection,o=t.getBody(),Km(t,null,!1),8!==n&&46!==n||!r.isCollapsed()||r.getStart().innerHTML!==jm||Km(t,Qu(o,r.getStart())),37!==n&&39!==n||Km(t,Qu(o,r.getStart()))})},Qm=function(e,t){return e.schema.getTextInlineElements().hasOwnProperty(lr(t))&&!Ju(t.dom())&&!jo.isBogus(t.dom())},Zm=function(e){return 1===Kr(e).length},eg=function(e,t,n,r){var o,i,a,u,s=d(Qm,t),c=W(U(r,s),function(e){return e.dom()});if(0===c.length)rd(t,e,n);else{var l=(o=n.dom(),i=c,a=$m(!1),u=Gm(i,a.dom()),Pi(ar.fromDom(o),a),Ui(ar.fromDom(o)),_u(u,0));t.selection.setRng(l.toRange())}},tg=function(r,o){var t,e=ar.fromDom(r.getBody()),n=ar.fromDom(r.selection.getStart()),i=U((t=uf(n,e),Y(t,Co).fold(q(t),function(e){return t.slice(0,e)})),Zm);return ee(i).map(function(e){var t,n=_u.fromRangeStart(r.selection.getRng());return!(!$l(o,n,e.dom())||Ju((t=e).dom())&&Hm(t.dom())||(eg(o,r,e,i),0))}).getOr(!1)},ng=function(e,t){return!!e.selection.isCollapsed()&&tg(e,t)},rg=function(e){for(var t=0,n=0,r=e;r&&r.nodeType;)t+=r.offsetLeft||0,n+=r.offsetTop||0,r=r.offsetParent;return{x:t,y:n}},og=function(e,t,n){var r,o,i,a,u,s=e.dom,c=s.getRoot(),l=0;if(u={elm:t,alignToTop:n},e.fire("scrollIntoView",u),!u.isDefaultPrevented()&&jo.isElement(t)){if(!1===n&&(l=t.offsetHeight),"BODY"!==c.nodeName){var f=e.selection.getScrollContainer();if(f)return r=rg(t).y-rg(f).y+l,a=f.clientHeight,void((r<(i=f.scrollTop)||i+a<r+25)&&(f.scrollTop=r<i?r:r-a+25))}o=s.getViewPort(e.getWin()),r=s.getPos(t).y+l,i=o.y,a=o.h,(r<o.y||i+a<r+25)&&e.getWin().scrollTo(0,r<i?r:r-a+25)}},ig=function(d,e){Z(Su.fromRangeStart(e).getClientRects()).each(function(e){var t,n,r,o,i,a,u,s,c,l=function(e){if(e.inline)return e.getBody().getBoundingClientRect();var t=e.getWin();return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight,width:t.innerWidth,height:t.innerHeight}}(d),f={x:(i=t=l,a=n=e,a.left>i.left&&a.right<i.right?0:a.left<i.left?a.left-i.left:a.right-i.right),y:(r=t,o=n,o.top>r.top&&o.bottom<r.bottom?0:o.top<r.top?o.top-r.top:o.bottom-r.bottom)};s=0!==f.x?0<f.x?f.x+4:f.x-4:0,c=0!==f.y?0<f.y?f.y+4:f.y-4:0,(u=d).inline?(u.getBody().scrollLeft+=s,u.getBody().scrollTop+=c):u.getWin().scrollBy(s,c)})},ag=jo.isContentEditableTrue,ug=jo.isContentEditableFalse,sg=function(e,t,n,r,o){return t._selectionOverrides.showCaret(e,n,r,o)},cg=function(e,t){var n,r;return e.fire("BeforeObjectSelected",{target:t}).isDefaultPrevented()?null:((r=(n=t).ownerDocument.createRange()).selectNode(n),r)},lg=function(e,t,n){var r=Os(1,e.getBody(),t),o=_u.fromRangeStart(r),i=o.getNode();if(ug(i))return sg(1,e,i,!o.isAtEnd(),!1);var a=o.getNode(!0);if(ug(a))return sg(1,e,a,!1,!1);var u=e.dom.getParent(o.getNode(),function(e){return ug(e)||ag(e)});return ug(u)?sg(1,e,u,!1,n):null},fg=function(e,t,n){if(!t||!t.collapsed)return t;var r=lg(e,t,n);return r||t},dg=function(e,t){e.selection.setRng(t),ig(e,e.selection.getRng())},mg=function(e,t,n,r,o,i){var a,u,s=sg(r,e,i.getNode(!o),o,!0);if(t.collapsed){var c=t.cloneRange();o?c.setEnd(s.startContainer,s.startOffset):c.setStart(s.endContainer,s.endOffset),c.deleteContents()}else t.deleteContents();return e.selection.setRng(s),a=e.dom,u=n,jo.isText(u)&&0===u.data.length&&a.remove(u),!0},gg=function(e,t){return function(e,t){var n=e.selection.getRng();if(!jo.isText(n.commonAncestorContainer))return!1;var r=t?Tu.Forwards:Tu.Backwards,o=Js(e.getBody()),i=d(Ls,o.next),a=d(Ls,o.prev),u=t?i:a,s=t?Lf:Ff,c=Ps(r,e.getBody(),n),l=Vl.normalizePosition(t,u(c));if(!l)return!1;if(s(l))return mg(e,n,c.getNode(),r,t,l);var f=u(l);return!!(f&&s(f)&&Fs(l,f))&&mg(e,n,c.getNode(),r,t,f)}(e,t)},pg=function(e,t){e.getDoc().execCommand(t,!1,null)},hg=function(e){ad(e,!1)||gg(e,!1)||Qd(e,!1)||hf(e,!1)||Dm(e)||Cf(e,!1)||ng(e,!1)||(pg(e,"Delete"),ql(e))},vg=function(e){ad(e,!0)||gg(e,!0)||Qd(e,!0)||hf(e,!0)||Dm(e)||Cf(e,!0)||ng(e,!0)||pg(e,"ForwardDelete")},yg=function(o,t,e){var n=function(e){return t=o,n=e.dom(),r=_r(n,t),_.from(r).filter(function(e){return 0<e.length});var t,n,r};return na(ar.fromDom(e),function(e){return n(e).isSome()},function(e){return Mr(ar.fromDom(t),e)}).bind(n)},bg=function(o){return function(r,e){return _.from(e).map(ar.fromDom).filter(dr).bind(function(e){return yg(o,r,e.dom()).or((t=o,n=e.dom(),_.from(Si.DOM.getStyle(n,t,!0))));var t,n}).getOr("")}},Cg={getFontSize:bg("font-size"),getFontFamily:H(function(e){return e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")},bg("font-family")),toPt:function(e,t){return/[0-9.]+px$/.test(e)?(n=72*parseInt(e,10)/96,r=t||0,o=Math.pow(10,r),Math.round(n*o)/o+"pt"):e;var n,r,o}},xg=function(e){return sc.firstPositionIn(e.getBody()).map(function(e){var t=e.container();return jo.isText(t)?t.parentNode:t})},wg=function(o){return _.from(o.selection.getRng()).bind(function(e){var t,n,r=o.getBody();return n=r,(t=e).startContainer===n&&0===t.startOffset?_.none():_.from(o.selection.getStart(!0))})},Ng=function(e,t){if(/^[0-9\.]+$/.test(t)){var n=parseInt(t,10);if(1<=n&&n<=7){var r=Al(e),o=Rl(e);return o?o[n-1]||t:r[n-1]||t}return t}return t},Eg=function(e,t){return e&&t&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset},Sg=function(e,t,n){return null!==function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(e,t,n)},Tg=function(e,t,n){return Sg(e,t,function(e){return e.nodeName===n})},kg=function(e){return e&&"TABLE"===e.nodeName},_g=function(e,t,n){for(var r=new go(t,e.getParent(t.parentNode,e.isBlock)||e.getRoot());t=r[n?"prev":"next"]();)if(jo.isBr(t))return!0},Ag=function(e,t,n,r,o){var i,a,u,s,c,l,f=e.getRoot(),d=e.schema.getNonEmptyElements();if(u=e.getParent(o.parentNode,e.isBlock)||f,r&&jo.isBr(o)&&t&&e.isEmpty(u))return _.some(Su(o.parentNode,e.nodeIndex(o)));for(i=new go(o,u);s=i[r?"prev":"next"]();){if("false"===e.getContentEditableParent(s)||(l=f,ka(c=s)&&!1===Sg(c,l,Ju)))return _.none();if(jo.isText(s)&&0<s.nodeValue.length)return!1===Tg(s,f,"A")?_.some(Su(s,r?s.nodeValue.length:0)):_.none();if(e.isBlock(s)||d[s.nodeName.toLowerCase()])return _.none();a=s}return n&&a?_.some(Su(a,0)):_.none()},Rg=function(e,t,n,r){var o,i,a,u,s,c,l,f,d,m,g=e.getRoot(),p=!1;if(o=r[(n?"start":"end")+"Container"],i=r[(n?"start":"end")+"Offset"],l=jo.isElement(o)&&i===o.childNodes.length,s=e.schema.getNonEmptyElements(),c=n,ka(o))return _.none();if(jo.isElement(o)&&i>o.childNodes.length-1&&(c=!1),jo.isDocument(o)&&(o=g,i=0),o===g){if(c&&(u=o.childNodes[0<i?i-1:0])){if(ka(u))return _.none();if(s[u.nodeName]||kg(u))return _.none()}if(o.hasChildNodes()){if(i=Math.min(!c&&0<i?i-1:i,o.childNodes.length-1),o=o.childNodes[i],i=jo.isText(o)&&l?o.data.length:0,!t&&o===g.lastChild&&kg(o))return _.none();if(function(e,t){for(;t&&t!==e;){if(jo.isContentEditableFalse(t))return!0;t=t.parentNode}return!1}(g,o)||ka(o))return _.none();if(o.hasChildNodes()&&!1===kg(o)){a=new go(u=o,g);do{if(jo.isContentEditableFalse(u)||ka(u)){p=!1;break}if(jo.isText(u)&&0<u.nodeValue.length){i=c?0:u.nodeValue.length,o=u,p=!0;break}if(s[u.nodeName.toLowerCase()]&&(!(f=u)||!/^(TD|TH|CAPTION)$/.test(f.nodeName))){i=e.nodeIndex(u),o=u.parentNode,c||i++,p=!0;break}}while(u=c?a.next():a.prev())}}}return t&&(jo.isText(o)&&0===i&&Ag(e,l,t,!0,o).each(function(e){o=e.container(),i=e.offset(),p=!0}),jo.isElement(o)&&((u=o.childNodes[i])||(u=o.childNodes[i-1]),!u||!jo.isBr(u)||(m="A",(d=u).previousSibling&&d.previousSibling.nodeName===m)||_g(e,u,!1)||_g(e,u,!0)||Ag(e,l,t,!0,u).each(function(e){o=e.container(),i=e.offset(),p=!0}))),c&&!t&&jo.isText(o)&&i===o.nodeValue.length&&Ag(e,l,t,!1,o).each(function(e){o=e.container(),i=e.offset(),p=!0}),p?_.some(Su(o,i)):_.none()},Dg=function(e,t){var n=t.collapsed,r=t.cloneRange(),o=Su.fromRangeStart(t);return Rg(e,n,!0,r).each(function(e){n&&Su.isAbove(o,e)||r.setStart(e.container(),e.offset())}),n||Rg(e,n,!1,r).each(function(e){r.setEnd(e.container(),e.offset())}),n&&r.collapse(!0),Eg(t,r)?_.none():_.some(r)},Og=function(e,t,n){var r=e.create("span",{},"&nbsp;");n.parentNode.insertBefore(r,n),t.scrollIntoView(r),e.remove(r)},Bg=function(e,t,n,r){var o=e.createRng();r?(o.setStartBefore(n),o.setEndBefore(n)):(o.setStartAfter(n),o.setEndAfter(n)),t.setRng(o)},Pg=function(e,t){var n,r,o=e.selection,i=e.dom,a=o.getRng();Dg(i,a).each(function(e){a.setStart(e.startContainer,e.startOffset),a.setEnd(e.endContainer,e.endOffset)});var u=a.startOffset,s=a.startContainer;if(1===s.nodeType&&s.hasChildNodes()){var c=u>s.childNodes.length-1;s=s.childNodes[Math.min(u,s.childNodes.length-1)]||s,u=c&&3===s.nodeType?s.nodeValue.length:0}var l=i.getParent(s,i.isBlock),f=l?i.getParent(l.parentNode,i.isBlock):null,d=f?f.nodeName.toUpperCase():"",m=t&&t.ctrlKey;"LI"!==d||m||(l=f),s&&3===s.nodeType&&u>=s.nodeValue.length&&(function(e,t,n){for(var r,o=new go(t,n),i=e.getNonEmptyElements();r=o.next();)if(i[r.nodeName.toLowerCase()]||0<r.length)return!0}(e.schema,s,l)||(n=i.create("br"),a.insertNode(n),a.setStartAfter(n),a.setEndAfter(n),r=!0)),n=i.create("br"),zu(i,a,n),Og(i,o,n),Bg(i,o,n,r),e.undoManager.add()},Ig=function(e,t){var n=ar.fromTag("br");Pi(ar.fromDom(t),n),e.undoManager.add()},Lg=function(e,t){Fg(e.getBody(),t)||Ii(ar.fromDom(t),ar.fromTag("br"));var n=ar.fromTag("br");Ii(ar.fromDom(t),n),Og(e.dom,e.selection,n.dom()),Bg(e.dom,e.selection,n.dom(),!1),e.undoManager.add()},Fg=function(e,t){return n=_u.after(t),!!jo.isBr(n.getNode())||sc.nextPosition(e,_u.after(t)).map(function(e){return jo.isBr(e.getNode())}).getOr(!1);var n},Mg=function(e){return e&&"A"===e.nodeName&&"href"in e},zg=function(e){return e.fold(q(!1),Mg,Mg,q(!1))},Ug=function(e,t){t.fold(o,d(Ig,e),d(Lg,e),o)},jg=function(e,t){var n,r,o,i=(n=e,r=d(Vl.isInlineTarget,n),o=_u.fromRangeStart(n.selection.getRng()),Ld(r,n.getBody(),o).filter(zg));i.isSome()?i.each(d(Ug,e)):Pg(e,t)},Vg={create:Ar("start","soffset","finish","foffset")},Hg=xf([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),qg=(Hg.before,Hg.on,Hg.after,function(e){return e.fold($,$,$)}),$g=xf([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Wg={domRange:$g.domRange,relative:$g.relative,exact:$g.exact,exactFromRange:function(e){return $g.exact(e.start(),e.soffset(),e.finish(),e.foffset())},getWin:function(e){var t=e.match({domRange:function(e){return ar.fromDom(e.startContainer)},relative:function(e,t){return qg(e)},exact:function(e,t,n,r){return e}});return jr(t)},range:Vg.create},Kg=or.detect().browser,Xg=function(e,t){var n=mr(t)?Mc(t).length:Kr(t).length+1;return n<e?n:e<0?0:e},Yg=function(e){return Wg.range(e.start(),Xg(e.soffset(),e.start()),e.finish(),Xg(e.foffset(),e.finish()))},Gg=function(e,t){return!jo.isRestrictedNode(t.dom())&&(zr(e,t)||Mr(e,t))},Jg=function(t){return function(e){return Gg(t,e.start())&&Gg(t,e.finish())}},Qg=function(e){return!0===e.inline||Kg.isIE()},Zg=function(e){return Wg.range(ar.fromDom(e.startContainer),e.startOffset,ar.fromDom(e.endContainer),e.endOffset)},ep=function(e){var t=e.getSelection();return(t&&0!==t.rangeCount?_.from(t.getRangeAt(0)):_.none()).map(Zg)},tp=function(e){var t=jr(e);return ep(t.dom()).filter(Jg(e))},np=function(e,t){return _.from(t).filter(Jg(e)).map(Yg)},rp=function(e){var t=V.document.createRange();try{return t.setStart(e.start().dom(),e.soffset()),t.setEnd(e.finish().dom(),e.foffset()),_.some(t)}catch(n){return _.none()}},op=function(e){return(e.bookmark?e.bookmark:_.none()).bind(d(np,ar.fromDom(e.getBody()))).bind(rp)},ip=function(e){var t=Qg(e)?tp(ar.fromDom(e.getBody())):_.none();e.bookmark=t.isSome()?t:e.bookmark},ap=function(t){op(t).each(function(e){t.selection.setRng(e)})},up=op,sp=function(e){return Eo(e)||So(e)},cp=function(e){return U(W(e.selection.getSelectedBlocks(),ar.fromDom),function(e){return!sp(e)&&!Vr(e).map(sp).getOr(!1)})},lp=function(e,t){var n=e.settings,r=e.dom,o=e.selection,i=e.formatter,a=/[a-z%]+$/i.exec(n.indentation)[0],u=parseInt(n.indentation,10),s=e.getParam("indent_use_margin",!1);e.queryCommandState("InsertUnorderedList")||e.queryCommandState("InsertOrderedList")||n.forced_root_block||r.getParent(o.getNode(),r.isBlock)||i.apply("div"),z(cp(e),function(e){!function(e,t,n,r,o,i){if("false"!==e.getContentEditable(i)){var a=n?"margin":"padding";if(a="TABLE"===i.nodeName?"margin":a,a+="rtl"===e.getStyle(i,"direction",!0)?"Right":"Left","outdent"===t){var u=Math.max(0,parseInt(i.style[a]||0,10)-r);e.setStyle(i,a,u?u+o:"")}else u=parseInt(i.style[a]||0,10)+r+o,e.setStyle(i,a,u)}}(r,t,s,u,a,e.dom())})},fp=Xt.each,dp=Xt.extend,mp=Xt.map,gp=Xt.inArray;function pp(s){var o,i,a,t,c={state:{},exec:{},value:{}},n=s.settings;s.on("PreInit",function(){o=s.dom,i=s.selection,n=s.settings,a=s.formatter});var r=function(e){var t;if(!s.quirks.isHidden()&&!s.removed){if(e=e.toLowerCase(),t=c.state[e])return t(e);try{return s.getDoc().queryCommandState(e)}catch(n){}return!1}},e=function(e,n){n=n||"exec",fp(e,function(t,e){fp(e.toLowerCase().split(","),function(e){c[n][e]=t})})},u=function(e,t,n){e=e.toLowerCase(),c.value[e]=function(){return t.call(n||s)}};dp(this,{execCommand:function(t,n,r,e){var o,i,a=!1;if(!s.removed){if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(t)||e&&e.skip_focus?ap(s):s.focus(),(e=s.fire("BeforeExecCommand",{command:t,ui:n,value:r})).isDefaultPrevented())return!1;if(i=t.toLowerCase(),o=c.exec[i])return o(i,n,r),s.fire("ExecCommand",{command:t,ui:n,value:r}),!0;if(fp(s.plugins,function(e){if(e.execCommand&&e.execCommand(t,n,r))return s.fire("ExecCommand",{command:t,ui:n,value:r}),!(a=!0)}),a)return a;if(s.theme&&s.theme.execCommand&&s.theme.execCommand(t,n,r))return s.fire("ExecCommand",{command:t,ui:n,value:r}),!0;try{a=s.getDoc().execCommand(t,n,r)}catch(u){}return!!a&&(s.fire("ExecCommand",{command:t,ui:n,value:r}),!0)}},queryCommandState:r,queryCommandValue:function(e){var t;if(!s.quirks.isHidden()&&!s.removed){if(e=e.toLowerCase(),t=c.value[e])return t(e);try{return s.getDoc().queryCommandValue(e)}catch(n){}}},queryCommandSupported:function(e){if(e=e.toLowerCase(),c.exec[e])return!0;try{return s.getDoc().queryCommandSupported(e)}catch(t){}return!1},addCommands:e,addCommand:function(e,o,i){e=e.toLowerCase(),c.exec[e]=function(e,t,n,r){return o.call(i||s,t,n,r)}},addQueryStateHandler:function(e,t,n){e=e.toLowerCase(),c.state[e]=function(){return t.call(n||s)}},addQueryValueHandler:u,hasCustomCommand:function(e){return e=e.toLowerCase(),!!c.exec[e]}});var l=function(e,t,n){return t===undefined&&(t=!1),n===undefined&&(n=null),s.getDoc().execCommand(e,t,n)},f=function(e){return a.match(e)},d=function(e,t){a.toggle(e,t?{value:t}:undefined),s.nodeChanged()},m=function(e){t=i.getBookmark(e)},g=function(){i.moveToBookmark(t)};e({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){s.undoManager.add()},"Cut,Copy,Paste":function(e){var t,n=s.getDoc();try{l(e)}catch(o){t=!0}if("paste"!==e||n.queryCommandEnabled(e)||(t=!0),t||!n.queryCommandSupported(e)){var r=s.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");fe.mac&&(r=r.replace(/Ctrl\+/g,"\u2318+")),s.notificationManager.open({text:r,type:"error"})}},unlink:function(){if(i.isCollapsed()){var e=s.dom.getParent(s.selection.getStart(),"a");e&&s.dom.remove(e,!0)}else a.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(e){var t=e.substring(7);"full"===t&&(t="justify"),fp("left,center,right,justify".split(","),function(e){t!==e&&a.remove("align"+e)}),"none"!==t&&d("align"+t)},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;l(e),(t=o.getParent(i.getNode(),"ol,ul"))&&(n=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)&&(m(),o.split(n,t),g()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){d(e)},"ForeColor,HiliteColor":function(e,t,n){d(e,n)},FontName:function(e,t,n){var r,o;o=n,(r=s).formatter.toggle("fontname",{value:Ng(r,o)}),r.nodeChanged()},FontSize:function(e,t,n){var r,o;o=n,(r=s).formatter.toggle("fontsize",{value:Ng(r,o)}),r.nodeChanged()},RemoveFormat:function(e){a.remove(e)},mceBlockQuote:function(){d("blockquote")},FormatBlock:function(e,t,n){return d(n||"p")},mceCleanup:function(){var e=i.getBookmark();s.setContent(s.getContent()),i.moveToBookmark(e)},mceRemoveNode:function(e,t,n){var r=n||i.getNode();r!==s.getBody()&&(m(),s.dom.remove(r,!0),g())},mceSelectNodeDepth:function(e,t,n){var r=0;o.getParent(i.getNode(),function(e){if(1===e.nodeType&&r++===n)return i.select(e),!1},s.getBody())},mceSelectNode:function(e,t,n){i.select(n)},mceInsertContent:function(e,t,n){ml(s,n)},mceInsertRawHTML:function(e,t,n){i.setContent("tiny_mce_marker");var r=s.getContent();s.setContent(r.replace(/tiny_mce_marker/g,function(){return n}))},mceToggleFormat:function(e,t,n){d(n)},mceSetContent:function(e,t,n){s.setContent(n)},"Indent,Outdent":function(e){lp(s,e)},mceRepaint:function(){},InsertHorizontalRule:function(){s.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){s.hasVisual=!s.hasVisual,s.addVisual()},mceReplaceContent:function(e,t,n){s.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,i.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=o.getParent(i.getNode(),"a"),n.href=n.href.replace(" ","%20"),r&&n.href||a.remove("link"),n.href&&a.apply("link",n,r)},selectAll:function(){var e=o.getParent(i.getStart(),jo.isContentEditableTrue);if(e){var t=o.createRng();t.selectNodeContents(e),i.setRng(t)}},"delete":function(){hg(s)},forwardDelete:function(){vg(s)},mceNewDocument:function(){s.setContent("")},InsertLineBreak:function(e,t,n){return jg(s,n),!0}});var p=function(n){return function(){var e=i.isCollapsed()?[o.getParent(i.getNode(),o.isBlock)]:i.getSelectedBlocks(),t=mp(e,function(e){return!!a.matchNode(e,n)});return-1!==gp(t,!0)}};e({JustifyLeft:p("alignleft"),JustifyCenter:p("aligncenter"),JustifyRight:p("alignright"),JustifyFull:p("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return f(e)},mceBlockQuote:function(){return f("blockquote")},Outdent:function(){var e;if(n.inline_styles){if((e=o.getParent(i.getStart(),o.isBlock))&&0<parseInt(e.style.paddingLeft,10))return!0;if((e=o.getParent(i.getEnd(),o.isBlock))&&0<parseInt(e.style.paddingLeft,10))return!0}return r("InsertUnorderedList")||r("InsertOrderedList")||!n.inline_styles&&!!o.getParent(i.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var t=o.getParent(i.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),e({Undo:function(){s.undoManager.undo()},Redo:function(){s.undoManager.redo()}}),u("FontName",function(){return wg(t=s).fold(function(){return xg(t).map(function(e){return Cg.getFontFamily(t.getBody(),e)}).getOr("")},function(e){return Cg.getFontFamily(t.getBody(),e)});var t},this),u("FontSize",function(){return wg(t=s).fold(function(){return xg(t).map(function(e){return Cg.getFontSize(t.getBody(),e)}).getOr("")},function(e){return Cg.getFontSize(t.getBody(),e)});var t},this)}var hp=Xt.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend"," "),vp=function(a){var u,s,c=this,l={},f=function(){return!1},d=function(){return!0};u=(a=a||{}).scope||c,s=a.toggleEvent||f;var r=function(e,t,n,r){var o,i,a;if(!1===t&&(t=f),t)for(t={func:t},r&&Xt.extend(t,r),a=(i=e.toLowerCase().split(" ")).length;a--;)e=i[a],(o=l[e])||(o=l[e]=[],s(e,!0)),n?o.unshift(t):o.push(t);return c},m=function(e,t){var n,r,o,i,a;if(e)for(n=(i=e.toLowerCase().split(" ")).length;n--;){if(e=i[n],r=l[e],!e){for(o in l)s(o,!1),delete l[o];return c}if(r){if(t)for(a=r.length;a--;)r[a].func===t&&(r=r.slice(0,a).concat(r.slice(a+1)),l[e]=r);else r.length=0;r.length||(s(e,!1),delete l[e])}}else{for(e in l)s(e,!1);l={}}return c};c.fire=function(e,t){var n,r,o,i;if(e=e.toLowerCase(),(t=t||{}).type=e,t.target||(t.target=u),t.preventDefault||(t.preventDefault=function(){t.isDefaultPrevented=d},t.stopPropagation=function(){t.isPropagationStopped=d},t.stopImmediatePropagation=function(){t.isImmediatePropagationStopped=d},t.isDefaultPrevented=f,t.isPropagationStopped=f,t.isImmediatePropagationStopped=f),a.beforeFire&&a.beforeFire(t),n=l[e])for(r=0,o=n.length;r<o;r++){if((i=n[r]).once&&m(e,i.func),t.isImmediatePropagationStopped())return t.stopPropagation(),t;if(!1===i.func.call(u,t))return t.preventDefault(),t}return t},c.on=r,c.off=m,c.once=function(e,t,n){return r(e,t,n,{once:!0})},c.has=function(e){return e=e.toLowerCase(),!(!l[e]||0===l[e].length)}};vp.isNative=function(e){return!!hp[e.toLowerCase()]};var yp,bp=function(n){return n._eventDispatcher||(n._eventDispatcher=new vp({scope:n,toggleEvent:function(e,t){vp.isNative(e)&&n.toggleNativeEvent&&n.toggleNativeEvent(e,t)}})),n._eventDispatcher},Cp={fire:function(e,t,n){if(this.removed&&"remove"!==e&&"detach"!==e)return t;if(t=bp(this).fire(e,t,n),!1!==n&&this.parent)for(var r=this.parent();r&&!t.isPropagationStopped();)r.fire(e,t,!1),r=r.parent();return t},on:function(e,t,n){return bp(this).on(e,t,n)},off:function(e,t){return bp(this).off(e,t)},once:function(e,t){return bp(this).once(e,t)},hasEventListeners:function(e){return bp(this).has(e)}},xp=function(e,t){return e.fire("PreProcess",t)},wp=function(e,t){return e.fire("PostProcess",t)},Np=function(e){return e.fire("remove")},Ep=function(e){return e.fire("detach")},Sp=function(e,t){return e.fire("SwitchMode",{mode:t})},Tp=function(e,t,n,r){e.fire("ObjectResizeStart",{target:t,width:n,height:r})},kp=function(e,t,n,r){e.fire("ObjectResized",{target:t,width:n,height:r})},_p=function(e,t,n){try{e.getDoc().execCommand(t,!1,n)}catch(r){}},Ap=function(e,t,n){var r,o;Gi(e,t)&&!1===n?(o=t,$i(r=e)?r.dom().classList.remove(o):Ki(r,o),Yi(r)):n&&Xi(e,t)},Rp=function(e,t){Ap(ar.fromDom(e.getBody()),"mce-content-readonly",t),t?(e.selection.controlSelection.hideResizeRect(),e.readonly=!0,e.getBody().contentEditable="false"):(e.readonly=!1,e.getBody().contentEditable="true",_p(e,"StyleWithCSS",!1),_p(e,"enableInlineTableEditing",!1),_p(e,"enableObjectResizing",!1),e.focus(),e.nodeChanged())},Dp=function(e){return e.readonly?"readonly":"design"},Op=Si.DOM,Bp=function(e,t){return"selectionchange"===t?e.getDoc():!e.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(t)?e.getDoc().documentElement:e.settings.event_root?(e.eventRoot||(e.eventRoot=Op.select(e.settings.event_root)[0]),e.eventRoot):e.getBody()},Pp=function(e,t,n){var r;(r=e).hidden||r.readonly?!0===e.readonly&&n.preventDefault():e.fire(t,n)},Ip=function(i,a){var e,t;if(i.delegates||(i.delegates={}),!i.delegates[a]&&!i.removed)if(e=Bp(i,a),i.settings.event_root){if(yp||(yp={},i.editorManager.on("removeEditor",function(){var e;if(!i.editorManager.activeEditor&&yp){for(e in yp)i.dom.unbind(Bp(i,e));yp=null}})),yp[a])return;t=function(e){for(var t=e.target,n=i.editorManager.get(),r=n.length;r--;){var o=n[r].getBody();(o===t||Op.isChildOf(t,o))&&Pp(n[r],a,e)}},yp[a]=t,Op.bind(e,a,t)}else t=function(e){Pp(i,a,e)},Op.bind(e,a,t),i.delegates[a]=t},Lp={bindPendingEventDelegates:function(){var t=this;Xt.each(t._pendingNativeEvents,function(e){Ip(t,e)})},toggleNativeEvent:function(e,t){var n=this;"focus"!==e&&"blur"!==e&&(t?n.initialized?Ip(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&(n.dom.unbind(Bp(n,e),e,n.delegates[e]),delete n.delegates[e]))},unbindAllNativeEvents:function(){var e,t=this,n=t.getBody(),r=t.dom;if(t.delegates){for(e in t.delegates)t.dom.unbind(Bp(t,e),e,t.delegates[e]);delete t.delegates}!t.inline&&n&&r&&(n.onload=null,r.unbind(t.getWin()),r.unbind(t.getDoc())),r&&(r.unbind(n),r.unbind(t.getContainer()))}},Fp=Lp=Xt.extend({},Cp,Lp),Mp=Ar("sections","settings"),zp=or.detect().deviceType.isTouch(),Up=["lists","autolink","autosave"],jp={theme:"mobile"},Vp=function(e){var t=k(e)?e.join(" "):e,n=W(S(t)?t.split(" "):[],Gn);return U(n,function(e){return 0<e.length})},Hp=function(e,t){return e.sections().hasOwnProperty(t)},qp=function(e,t,n,r){var o,i=Vp(n.forced_plugins),a=Vp(r.plugins),u=e&&Hp(t,"mobile")?U(a,d(F,Up)):a,s=(o=u,[].concat(Vp(i)).concat(Vp(o)));return Xt.extend(r,{plugins:s.join(" ")})},$p=function(e,t,n,r){var o,i,a,u,s,c,l,f,d,m,g,p,h=(o=["mobile"],i=yr(r,function(e,t){return F(o,t)}),Mp(i.t,i.f)),v=Xt.extend(t,n,h.settings(),(m=e,p=(g=h).settings().inline,m&&Hp(g,"mobile")&&!p?(c="mobile",l=jp,f=h.sections(),d=f.hasOwnProperty(c)?f[c]:{},Xt.extend({},l,d)):{}),{validate:!0,content_editable:h.settings().inline,external_plugins:(a=n,u=h.settings(),s=u.external_plugins?u.external_plugins:{},a&&a.external_plugins?Xt.extend({},a.external_plugins,s):s)});return qp(e,h,n,v)},Wp=function(e,t,n){return _.from(t.settings[n]).filter(e)},Kp=function(e,t,n,r){var o,i,a,u=t in e.settings?e.settings[t]:n;return"hash"===r?(a={},"string"==typeof(i=u)?z(0<i.indexOf("=")?i.split(/[;,](?![^=;,]*(?:[;,]|$))/):i.split(","),function(e){var t=e.split("=");1<t.length?a[Xt.trim(t[0])]=Xt.trim(t[1]):a[Xt.trim(t[0])]=Xt.trim(t)}):a=i,a):"string"===r?Wp(S,e,t).getOr(n):"number"===r?Wp(O,e,t).getOr(n):"boolean"===r?Wp(R,e,t).getOr(n):"object"===r?Wp(T,e,t).getOr(n):"array"===r?Wp(k,e,t).getOr(n):"string[]"===r?Wp((o=S,function(e){return k(e)&&J(e,o)}),e,t).getOr(n):"function"===r?Wp(D,e,t).getOr(n):u},Xp=Xt.each,Yp=Xt.explode,Gp={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},Jp=Xt.makeMap("alt,ctrl,shift,meta,access");function Qp(i){var a={},r=[],u=function(e){var t,n,r={};for(n in Xp(Yp(e,"+"),function(e){e in Jp?r[e]=!0:/^[0-9]{2,}$/.test(e)?r.keyCode=parseInt(e,10):(r.charCode=e.charCodeAt(0),r.keyCode=Gp[e]||e.toUpperCase().charCodeAt(0))}),t=[r.keyCode],Jp)r[n]?t.push(n):r[n]=!1;return r.id=t.join(","),r.access&&(r.alt=!0,fe.mac?r.ctrl=!0:r.shift=!0),r.meta&&(fe.mac?r.meta=!0:(r.ctrl=!0,r.meta=!1)),r},s=function(e,t,n,r){var o;return(o=Xt.map(Yp(e,">"),u))[o.length-1]=Xt.extend(o[o.length-1],{func:n,scope:r||i}),Xt.extend(o[0],{desc:i.translate(t),subpatterns:o.slice(1)})},o=function(e,t){return!!t&&t.ctrl===e.ctrlKey&&t.meta===e.metaKey&&t.alt===e.altKey&&t.shift===e.shiftKey&&!!(e.keyCode===t.keyCode||e.charCode&&e.charCode===t.charCode)&&(e.preventDefault(),!0)},c=function(e){return e.func?e.func.call(e.scope):null};i.on("keyup keypress keydown",function(t){var e,n;((n=t).altKey||n.ctrlKey||n.metaKey||"keydown"===(e=t).type&&112<=e.keyCode&&e.keyCode<=123)&&!t.isDefaultPrevented()&&(Xp(a,function(e){if(o(t,e))return r=e.subpatterns.slice(0),"keydown"===t.type&&c(e),!0}),o(t,r[0])&&(1===r.length&&"keydown"===t.type&&c(r[0]),r.shift()))}),this.add=function(e,n,r,o){var t;return"string"==typeof(t=r)?r=function(){i.execCommand(t,!1,null)}:Xt.isArray(t)&&(r=function(){i.execCommand(t[0],t[1],t[2])}),Xp(Yp(Xt.trim(e.toLowerCase())),function(e){var t=s(e,n,r,o);a[t.id]=t}),!0},this.remove=function(e){var t=s(e);return!!a[t.id]&&(delete a[t.id],!0)}}var Zp=function(e){var t=Ur(e).dom();return e.dom()===t.activeElement},eh=function(t){return(e=Ur(t),n=e!==undefined?e.dom():V.document,_.from(n.activeElement).map(ar.fromDom)).filter(function(e){return t.dom().contains(e.dom())});var e,n},th=function(t,e){return(n=e,n.collapsed?_.from(eu(n.startContainer,n.startOffset)).map(ar.fromDom):_.none()).bind(function(e){return ko(e)?_.some(e):!1===zr(t,e)?_.some(t):_.none()});var n},nh=function(t,e){th(ar.fromDom(t.getBody()),e).bind(function(e){return sc.firstPositionIn(e.dom())}).fold(function(){t.selection.normalize()},function(e){return t.selection.setRng(e.toRange())})},rh=function(e){if(e.setActive)try{e.setActive()}catch(t){e.focus()}else e.focus()},oh=function(e){var t,n=e.getBody();return n&&(t=ar.fromDom(n),Zp(t)||eh(t).isSome())},ih=function(e){return e.inline?oh(e):(t=e).iframeElement&&Zp(ar.fromDom(t.iframeElement));var t},ah=function(e){return e.editorManager.setActive(e)},uh=function(e,t){e.removed||(t?ah(e):function(t){var e=t.selection,n=t.settings.content_editable,r=t.getBody(),o=e.getRng();t.quirks.refreshContentEditable();var i,a,u=(i=t,a=e.getNode(),i.dom.getParent(a,function(e){return"true"===i.dom.getContentEditable(e)}));if(t.$.contains(r,u))return rh(u),nh(t,o),ah(t);t.bookmark!==undefined&&!1===ih(t)&&up(t).each(function(e){t.selection.setRng(e),o=e}),n||(fe.opera||rh(r),t.getWin().focus()),(fe.gecko||n)&&(rh(r),nh(t,o)),ah(t)}(e))},sh=ih,ch=function(e,t){return t.dom()[e]},lh=function(e,t){return parseInt(kr(t,e),10)},fh=d(ch,"clientWidth"),dh=d(ch,"clientHeight"),mh=d(lh,"margin-top"),gh=d(lh,"margin-left"),ph=function(e,t,n){var r,o,i,a,u,s,c,l,f,d,m,g=ar.fromDom(e.getBody()),p=e.inline?g:(r=g,ar.fromDom(r.dom().ownerDocument.documentElement)),h=(o=e.inline,a=t,u=n,s=(i=p).dom().getBoundingClientRect(),{x:a-(o?s.left+i.dom().clientLeft+gh(i):0),y:u-(o?s.top+i.dom().clientTop+mh(i):0)});return l=h.x,f=h.y,d=fh(c=p),m=dh(c),0<=l&&0<=f&&l<=d&&f<=m},hh=function(e){var t,n=e.inline?e.getBody():e.getContentAreaContainer();return(t=n,_.from(t).map(ar.fromDom)).map(function(e){return zr(Ur(e),e)}).getOr(!1)};function vh(n){var t,o=[],i=function(){var e,t=n.theme;return t&&t.getNotificationManagerImpl?t.getNotificationManagerImpl():{open:e=function(){throw new Error("Theme did not provide a NotificationManager implementation.")},close:e,reposition:e,getArgs:e}},a=function(){0<o.length&&i().reposition(o)},u=function(t){Y(o,function(e){return e===t}).each(function(e){o.splice(e,1)})},r=function(r){if(!n.removed&&hh(n))return X(o,function(e){return t=i().getArgs(e),n=r,!(t.type!==n.type||t.text!==n.text||t.progressBar||t.timeout||n.progressBar||n.timeout);var t,n}).getOrThunk(function(){n.editorManager.setActive(n);var e,t=i().open(r,function(){u(t),a()});return e=t,o.push(e),a(),t})};return(t=n).on("SkinLoaded",function(){var e=t.settings.service_message;e&&r({text:e,type:"warning",timeout:0,icon:""})}),t.on("ResizeEditor ResizeWindow",function(){he.requestAnimationFrame(a)}),t.on("remove",function(){z(o.slice(),function(e){i().close(e)})}),{open:r,close:function(){_.from(o[0]).each(function(e){i().close(e),u(e),a()})},getNotifications:function(){return o}}}function yh(r){var o=[],i=function(){var e,t=r.theme;return t&&t.getWindowManagerImpl?t.getWindowManagerImpl():{open:e=function(){throw new Error("Theme did not provide a WindowManager implementation.")},alert:e,confirm:e,close:e,getParams:e,setParams:e}},a=function(e,t){return function(){return t?t.apply(e,arguments):undefined}},u=function(e){var t;o.push(e),t=e,r.fire("OpenWindow",{win:t})},s=function(n){Y(o,function(e){return e===n}).each(function(e){var t;o.splice(e,1),t=n,r.fire("CloseWindow",{win:t}),0===o.length&&r.focus()})},e=function(){return _.from(o[o.length-1])};return r.on("remove",function(){z(o.slice(0),function(e){i().close(e)})}),{windows:o,open:function(e,t){r.editorManager.setActive(r),ip(r);var n=i().open(e,t,s);return u(n),n},alert:function(e,t,n){var r=i().alert(e,a(n||this,t),s);u(r)},confirm:function(e,t,n){var r=i().confirm(e,a(n||this,t),s);u(r)},close:function(){e().each(function(e){i().close(e),s(e)})},getParams:function(){return e().map(i().getParams).getOr(null)},setParams:function(t){e().each(function(e){i().setParams(e,t)})},getWindows:function(){return o}}}var bh={},Ch="en",xh={setCode:function(e){e&&(Ch=e,this.rtl=!!this.data[e]&&"rtl"===this.data[e]._dir)},getCode:function(){return Ch},rtl:!1,add:function(e,t){var n=bh[e];for(var r in n||(bh[e]=n={}),t)n[r]=t[r];this.setCode(e)},translate:function(e){var t=bh[Ch]||{},n=function(e){return Xt.is(e,"function")?Object.prototype.toString.call(e):r(e)?"":""+e},r=function(e){return""===e||null===e||Xt.is(e,"undefined")},o=function(e){return e=n(e),Xt.hasOwn(t,e)?n(t[e]):e};if(r(e))return"";if(Xt.is(e,"object")&&Xt.hasOwn(e,"raw"))return n(e.raw);if(Xt.is(e,"array")){var i=e.slice(1);e=o(e[0]).replace(/\{([0-9]+)\}/g,function(e,t){return Xt.hasOwn(i,t)?n(i[t]):e})}return o(e).replace(/{context:\w+}$/,"")},data:bh},wh=Bi.PluginManager,Nh=function(e,t){var n=function(e,t){for(var n in wh.urls)if(wh.urls[n]+"/plugin"+t+".js"===e)return n;return null}(t,e.suffix);return n?xh.translate(["Failed to load plugin: {0} from url {1}",n,t]):xh.translate(["Failed to load plugin url: {0}",t])},Eh=function(e,t){e.notificationManager.open({type:"error",text:t})},Sh=function(e,t){e._skinLoaded?Eh(e,t):e.on("SkinLoaded",function(){Eh(e,t)})},Th=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=V.window.console;r&&(r.error?r.error.apply(r,arguments):r.log.apply(r,arguments))},kh={pluginLoadError:function(e,t){Sh(e,Nh(e,t))},pluginInitError:function(e,t,n){var r=xh.translate(["Failed to initialize plugin: {0}",t]);Th(r,n),Sh(e,r)},uploadError:function(e,t){Sh(e,xh.translate(["Failed to upload image: {0}",t]))},displayError:Sh,initError:Th},_h=Bi.PluginManager,Ah=Bi.ThemeManager;function Rh(){return new(oe.getOrDie("XMLHttpRequest"))}function Dh(u,s){var r={},n=function(e,r,o,t){var i,n;(i=Rh()).open("POST",s.url),i.withCredentials=s.credentials,i.upload.onprogress=function(e){t(e.loaded/e.total*100)},i.onerror=function(){o("Image upload failed due to a XHR Transport error. Code: "+i.status)},i.onload=function(){var e,t,n;i.status<200||300<=i.status?o("HTTP Error: "+i.status):(e=JSON.parse(i.responseText))&&"string"==typeof e.location?r((t=s.basePath,n=e.location,t?t.replace(/\/$/,"")+"/"+n.replace(/^\//,""):n)):o("Invalid JSON: "+i.responseText)},(n=new V.FormData).append("file",e.blob(),e.filename()),i.send(n)},c=function(e,t){return{url:t,blobInfo:e,status:!0}},l=function(e,t){return{url:"",blobInfo:e,status:!1,error:t}},f=function(e,t){Xt.each(r[e],function(e){e(t)}),delete r[e]},o=function(e,n){return e=Xt.grep(e,function(e){return!u.isUploaded(e.blobUri())}),de.all(Xt.map(e,function(e){return u.isPending(e.blobUri())?(t=e.blobUri(),new de(function(e){r[t]=r[t]||[],r[t].push(e)})):(o=e,i=s.handler,a=n,u.markPending(o.blobUri()),new de(function(t){var n;try{var r=function(){n&&n.close()};i(o,function(e){r(),u.markUploaded(o.blobUri(),e),f(o.blobUri(),c(o,e)),t(c(o,e))},function(e){r(),u.removeFailed(o.blobUri()),f(o.blobUri(),l(o,e)),t(l(o,e))},function(e){e<0||100<e||(n||(n=a()),n.progressBar.value(e))})}catch(e){t(l(o,e.message))}}));var o,i,a,t}))};return!1===D(s.handler)&&(s.handler=n),{upload:function(e,t){return s.url||s.handler!==n?o(e,t):new de(function(e){e([])})}}}var Oh=function(e){return oe.getOrDie("atob")(e)},Bh=function(e){var t,n,r=decodeURIComponent(e).split(",");return(n=/data:([^;]+)/.exec(r[0]))&&(t=n[1]),{type:t,data:r[1]}},Ph=function(a){return new de(function(e){var t,n,r,o,i=Bh(a);try{t=Oh(i.data)}catch(iE){return void e(new V.Blob([]))}for(o=t.length,n=new(oe.getOrDie("Uint8Array"))(o),r=0;r<n.length;r++)n[r]=t.charCodeAt(r);e(new V.Blob([n],{type:i.type}))})},Ih=function(e){return 0===e.indexOf("blob:")?(i=e,new de(function(e,t){var n=function(){t("Cannot convert "+i+" to Blob. Resource might not exist or is inaccessible.")};try{var r=Rh();r.open("GET",i,!0),r.responseType="blob",r.onload=function(){200===this.status?e(this.response):n()},r.onerror=n,r.send()}catch(o){n()}})):0===e.indexOf("data:")?Ph(e):null;var i},Lh=function(n){return new de(function(e){var t=new(oe.getOrDie("FileReader"));t.onloadend=function(){e(t.result)},t.readAsDataURL(n)})},Fh=Bh,Mh=0,zh=function(e){return(e||"blobid")+Mh++},Uh=function(n,r,o,t){var i,a;0!==r.src.indexOf("blob:")?(i=Fh(r.src).data,(a=n.findFirst(function(e){return e.base64()===i}))?o({image:r,blobInfo:a}):Ih(r.src).then(function(e){a=n.create(zh(),e,i),n.add(a),o({image:r,blobInfo:a})},function(e){t(e)})):(a=n.getByUri(r.src))?o({image:r,blobInfo:a}):Ih(r.src).then(function(t){Lh(t).then(function(e){i=Fh(e).data,a=n.create(zh(),t,i),n.add(a),o({image:r,blobInfo:a})})},function(e){t(e)})},jh=function(e){return e?te(e.getElementsByTagName("img")):[]},Vh=0,Hh={uuid:function(e){return e+Vh+++(t=function(){return Math.round(4294967295*Math.random()).toString(36)},"s"+(new Date).getTime().toString(36)+t()+t()+t());var t}};function qh(u){var n,o,t,e,i,r,a,s,c,l=(n=[],o=function(e){var t,n,r;if(!e.blob||!e.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");return t=e.id||Hh.uuid("blobid"),n=e.name||t,{id:q(t),name:q(n),filename:q(n+"."+(r=e.blob.type,{"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"}[r.toLowerCase()]||"dat")),blob:q(e.blob),base64:q(e.base64),blobUri:q(e.blobUri||ae.createObjectURL(e.blob)),uri:q(e.uri)}},{create:function(e,t,n,r){if(S(e))return o({id:e,name:r,blob:t,base64:n});if(T(e))return o(e);throw new Error("Unknown input type")},add:function(e){t(e.id())||n.push(e)},get:t=function(t){return e(function(e){return e.id()===t})},getByUri:function(t){return e(function(e){return e.blobUri()===t})},findFirst:e=function(e){return U(n,e)[0]},removeByUri:function(t){n=U(n,function(e){return e.blobUri()!==t||(ae.revokeObjectURL(e.blobUri()),!1)})},destroy:function(){z(n,function(e){ae.revokeObjectURL(e.blobUri())}),n=[]}}),f=(a={},s=function(e,t){return{status:e,resultUri:t}},{hasBlobUri:c=function(e){return e in a},getResultUri:function(e){var t=a[e];return t?t.resultUri:null},isPending:function(e){return!!c(e)&&1===a[e].status},isUploaded:function(e){return!!c(e)&&2===a[e].status},markPending:function(e){a[e]=s(1,null)},markUploaded:function(e,t){a[e]=s(2,t)},removeFailed:function(e){delete a[e]},destroy:function(){a={}}}),d=[],m=function(t){return function(e){return u.selection?t(e):[]}},g=function(e,t,n){for(var r=0;-1!==(r=e.indexOf(t,r))&&(e=e.substring(0,r)+n+e.substr(r+t.length),r+=n.length-t.length+1),-1!==r;);return e},p=function(e,t,n){return e=g(e,'src="'+t+'"','src="'+n+'"'),e=g(e,'data-mce-src="'+t+'"','data-mce-src="'+n+'"')},h=function(t,n){z(u.undoManager.data,function(e){"fragmented"===e.type?e.fragments=W(e.fragments,function(e){return p(e,t,n)}):e.content=p(e.content,t,n)})},v=function(){return u.notificationManager.open({text:u.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})},y=function(e,t){l.removeByUri(e.src),h(e.src,t),u.$(e).attr({src:Bl(u)?t+"?"+(new Date).getTime():t,"data-mce-src":u.convertURL(t,"src")})},b=function(n){return i||(i=Dh(f,{url:Il(u),basePath:Ll(u),credentials:Fl(u),handler:Ml(u)})),w().then(m(function(r){var e;return e=W(r,function(e){return e.blobInfo}),i.upload(e,v).then(m(function(e){var t=W(e,function(e,t){var n=r[t].image;return e.status&&Pl(u)?y(n,e.url):e.error&&kh.uploadError(u,e.error),{element:n,status:e.status}});return n&&n(t),t}))}))},C=function(e){if(Ol(u))return b(e)},x=function(t){return!1!==J(d,function(e){return e(t)})&&(0!==t.getAttribute("src").indexOf("data:")||Dl(u)(t))},w=function(){var o,i,a;return r||(o=f,i=l,a={},r={findAll:function(e,n){var t;n||(n=q(!0)),t=U(jh(e),function(e){var t=e.src;return!!fe.fileApi&&!e.hasAttribute("data-mce-bogus")&&!e.hasAttribute("data-mce-placeholder")&&!(!t||t===fe.transparentSrc)&&(0===t.indexOf("blob:")?!o.isUploaded(t)&&n(e):0===t.indexOf("data:")&&n(e))});var r=W(t,function(n){if(a[n.src])return new de(function(t){a[n.src].then(function(e){if("string"==typeof e)return e;t({image:n,blobInfo:e.blobInfo})})});var e=new de(function(e,t){Uh(i,n,e,t)}).then(function(e){return delete a[e.image.src],e})["catch"](function(e){return delete a[n.src],e});return a[n.src]=e});return de.all(r)}}),r.findAll(u.getBody(),x).then(m(function(e){return e=U(e,function(e){return"string"!=typeof e||(kh.displayError(u,e),!1)}),z(e,function(e){h(e.image.src,e.blobInfo.blobUri()),e.image.src=e.blobInfo.blobUri(),e.image.removeAttribute("data-mce-src")}),e}))},N=function(e){return e.replace(/src="(blob:[^"]+)"/g,function(e,n){var t=f.getResultUri(n);if(t)return'src="'+t+'"';var r=l.getByUri(n);return r||(r=j(u.editorManager.get(),function(e,t){return e||t.editorUpload&&t.editorUpload.blobCache.getByUri(n)},null)),r?'src="data:'+r.blob().type+";base64,"+r.base64()+'"':e})};return u.on("setContent",function(){Ol(u)?C():w()}),u.on("RawSaveContent",function(e){e.content=N(e.content)}),u.on("getContent",function(e){e.source_view||"raw"===e.format||(e.content=N(e.content))}),u.on("PostRender",function(){u.parser.addNodeFilter("img",function(e){z(e,function(e){var t=e.attr("src");if(!l.getByUri(t)){var n=f.getResultUri(t);n&&e.attr("src",n)}})})}),{blobCache:l,addFilter:function(e){d.push(e)},uploadImages:b,uploadImagesAuto:C,scanForImages:w,destroy:function(){l.destroy(),f.destroy(),r=i=null}}}var $h=function(e,t){return e.hasOwnProperty(t.nodeName)},Wh=function(e,t){if(jo.isText(t)){if(0===t.nodeValue.length)return!0;if(/^\s+$/.test(t.nodeValue)&&(!t.nextSibling||$h(e,t.nextSibling)))return!0}return!1},Kh=function(e){var t,n,r,o,i,a,u,s,c,l,f,d=e.settings,m=e.dom,g=e.selection,p=e.schema,h=p.getBlockElements(),v=g.getStart(),y=e.getBody();if(f=d.forced_root_block,v&&jo.isElement(v)&&f&&(l=y.nodeName.toLowerCase(),p.isValidChild(l,f.toLowerCase())&&(b=h,C=y,x=v,!M(af(ar.fromDom(x),ar.fromDom(C)),function(e){return $h(b,e.dom())})))){var b,C,x,w,N;for(n=(t=g.getRng()).startContainer,r=t.startOffset,o=t.endContainer,i=t.endOffset,c=sh(e),v=y.firstChild;v;)if(w=h,N=v,jo.isText(N)||jo.isElement(N)&&!$h(w,N)&&!yc(N)){if(Wh(h,v)){v=(u=v).nextSibling,m.remove(u);continue}a||(a=m.create(f,e.settings.forced_root_block_attrs),v.parentNode.insertBefore(a,v),s=!0),v=(u=v).nextSibling,a.appendChild(u)}else a=null,v=v.nextSibling;s&&c&&(t.setStart(n,r),t.setEnd(o,i),g.setRng(t),e.nodeChanged())}},Xh=function(e){e.settings.forced_root_block&&e.on("NodeChange",d(Kh,e))},Yh=function(t){return Yr(t).fold(q([t]),function(e){return[t].concat(Yh(e))})},Gh=function(t){return Gr(t).fold(q([t]),function(e){return"br"===lr(e)?Hr(e).map(function(e){return[t].concat(Gh(e))}).getOr([]):[t].concat(Gh(e))})},Jh=function(o,e){return ru((i=e,a=i.startContainer,u=i.startOffset,jo.isText(a)?0===u?_.some(ar.fromDom(a)):_.none():_.from(a.childNodes[u]).map(ar.fromDom)),(t=e,n=t.endContainer,r=t.endOffset,jo.isText(n)?r===n.data.length?_.some(ar.fromDom(n)):_.none():_.from(n.childNodes[r-1]).map(ar.fromDom)),function(e,t){var n=X(Yh(o),d(Mr,e)),r=X(Gh(o),d(Mr,t));return n.isSome()&&r.isSome()}).getOr(!1);var t,n,r,i,a,u},Qh=function(e,t,n,r){var o=n,i=new go(n,o),a=e.schema.getNonEmptyElements();do{if(3===n.nodeType&&0!==Xt.trim(n.nodeValue).length)return void(r?t.setStart(n,0):t.setEnd(n,n.nodeValue.length));if(a[n.nodeName]&&!/^(TD|TH)$/.test(n.nodeName))return void(r?t.setStartBefore(n):"BR"===n.nodeName?t.setEndBefore(n):t.setEndAfter(n));if(fe.ie&&fe.ie<11&&e.isBlock(n)&&e.isEmpty(n))return void(r?t.setStart(n,0):t.setEnd(n,0))}while(n=r?i.next():i.prev());"BODY"===o.nodeName&&(r?t.setStart(o,0):t.setEnd(o,o.childNodes.length))},Zh=function(e){var t=e.selection.getSel();return t&&0<t.rangeCount};function ev(i){var r,o=[];"onselectionchange"in i.getDoc()||i.on("NodeChange Click MouseUp KeyUp Focus",function(e){var t,n;n={startContainer:(t=i.selection.getRng()).startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset},"nodechange"!==e.type&&Eg(n,r)||i.fire("SelectionChange"),r=n}),i.on("contextmenu",function(){i.fire("SelectionChange")}),i.on("SelectionChange",function(){var e=i.selection.getStart(!0);!e||!fe.range&&i.selection.isCollapsed()||Zh(i)&&!function(e){var t,n;if((n=i.$(e).parentsUntil(i.getBody()).add(e)).length===o.length){for(t=n.length;0<=t&&n[t]===o[t];t--);if(-1===t)return o=n,!0}return o=n,!1}(e)&&i.dom.isChildOf(e,i.getBody())&&i.nodeChanged({selectionChange:!0})}),i.on("MouseUp",function(e){!e.isDefaultPrevented()&&Zh(i)&&("IMG"===i.selection.getNode().nodeName?he.setEditorTimeout(i,function(){i.nodeChanged()}):i.nodeChanged())}),this.nodeChanged=function(e){var t,n,r,o=i.selection;i.initialized&&o&&!i.settings.disable_nodechange&&!i.readonly&&(r=i.getBody(),(t=o.getStart(!0)||r).ownerDocument===i.getDoc()&&i.dom.isChildOf(t,r)||(t=r),n=[],i.dom.getParent(t,function(e){if(e===r)return!0;n.push(e)}),(e=e||{}).element=t,e.parents=n,i.fire("NodeChange",e))}}var tv,nv,rv={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,END:35,HOME:36,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||this.metaKeyPressed(e)},metaKeyPressed:function(e){return fe.mac?e.metaKey:e.ctrlKey&&!e.altKey}},ov=function(e){return j(e,function(e,t){return e.concat(function(t){var e=function(e){return W(e,function(e){return(e=Ka(e)).node=t,e})};if(jo.isElement(t))return e(t.getClientRects());if(jo.isText(t)){var n=t.ownerDocument.createRange();return n.setStart(t,0),n.setEnd(t,t.data.length),e(n.getClientRects())}}(t))},[])};(nv=tv||(tv={}))[nv.Up=-1]="Up",nv[nv.Down=1]="Down";var iv=function(o,i,a,e,u,t){var n,s,c=0,l=[],r=function(e){var t,n,r;for(r=ov([e]),-1===o&&(r=r.reverse()),t=0;t<r.length;t++)if(n=r[t],!a(n,s)){if(0<l.length&&i(n,Ht.last(l))&&c++,n.line=c,u(n))return!0;l.push(n)}};return(s=Ht.last(t.getClientRects()))&&(r(n=t.getNode()),function(e,t,n,r){for(;r=Es(r,e,$a,t);)if(n(r))return}(o,e,r,n)),l},av=d(iv,tv.Up,Ga,Ja),uv=d(iv,tv.Down,Ja,Ga),sv=function(n){return function(e){return t=n,e.line>t;var t}},cv=function(n){return function(e){return t=n,e.line===t;var t}},lv=jo.isContentEditableFalse,fv=Es,dv=function(e,t){return Math.abs(e.left-t)},mv=function(e,t){return Math.abs(e.right-t)},gv=function(e,t){return e>=t.left&&e<=t.right},pv=function(e,o){return Ht.reduce(e,function(e,t){var n,r;return n=Math.min(dv(e,o),mv(e,o)),r=Math.min(dv(t,o),mv(t,o)),gv(o,t)?t:gv(o,e)?e:r===n&&lv(t.node)?t:r<n?t:e})},hv=function(e,t,n,r){for(;r=fv(r,e,$a,t);)if(n(r))return},vv=function(e,t,n){var r,o,i,a,u,s,c,l=ov(U(te(e.getElementsByTagName("*")),gs)),f=U(l,function(e){return n>=e.top&&n<=e.bottom});return(r=pv(f,t))&&(r=pv((a=e,c=function(t,e){var n;return n=U(ov([e]),function(e){return!t(e,u)}),s=s.concat(n),0===n.length},(s=[]).push(u=r),hv(tv.Up,a,d(c,Ga),u.node),hv(tv.Down,a,d(c,Ja),u.node),s),t))&&gs(r.node)?(i=t,{node:(o=r).node,before:dv(o,i)<mv(o,i)}):null},yv=function(t,n,e){if(e.collapsed)return!1;if(fe.ie&&fe.ie<=11&&e.startOffset===e.endOffset-1&&e.startContainer===e.endContainer){var r=e.startContainer.childNodes[e.startOffset];if(jo.isElement(r))return M(r.getClientRects(),function(e){return Qa(e,t,n)})}return M(e.getClientRects(),function(e){return Qa(e,t,n)})},bv=function(e){var t,n,r,o;return o=e.getBoundingClientRect(),n=(t=e.ownerDocument).documentElement,r=t.defaultView,{top:o.top+r.pageYOffset-n.clientTop,left:o.left+r.pageXOffset-n.clientLeft}},Cv=function(e,t){return n=(u=e).inline?bv(u.getBody()):{left:0,top:0},a=(i=e).getBody(),r=i.inline?{left:a.scrollLeft,top:a.scrollTop}:{left:0,top:0},{pageX:(o=function(e,t){if(t.target.ownerDocument!==e.getDoc()){var n=bv(e.getContentAreaContainer()),r=(i=(o=e).getBody(),a=o.getDoc().documentElement,u={left:i.scrollLeft,top:i.scrollTop},s={left:i.scrollLeft||a.scrollLeft,top:i.scrollTop||a.scrollTop},o.inline?u:s);return{left:t.pageX-n.left+r.left,top:t.pageY-n.top+r.top}}var o,i,a,u,s;return{left:t.pageX,top:t.pageY}}(e,t)).left-n.left+r.left,pageY:o.top-n.top+r.top};var n,r,o,i,a,u},xv=jo.isContentEditableFalse,wv=jo.isContentEditableTrue,Nv=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},Ev=function(u,s){return function(e){if(0===e.button){var t=X(s.dom.getParents(e.target),au(xv,wv)).getOr(null);if(i=s.getBody(),xv(a=t)&&a!==i){var n=s.dom.getPos(t),r=s.getBody(),o=s.getDoc().documentElement;u.element=t,u.screenX=e.screenX,u.screenY=e.screenY,u.maxX=(s.inline?r.scrollWidth:o.offsetWidth)-2,u.maxY=(s.inline?r.scrollHeight:o.offsetHeight)-2,u.relX=e.pageX-n.x,u.relY=e.pageY-n.y,u.width=t.offsetWidth,u.height=t.offsetHeight,u.ghost=function(e,t,n,r){var o=t.cloneNode(!0);e.dom.setStyles(o,{width:n,height:r}),e.dom.setAttrib(o,"data-mce-selected",null);var i=e.dom.create("div",{"class":"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return e.dom.setStyles(i,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:r}),e.dom.setStyles(o,{margin:0,boxSizing:"border-box"}),i.appendChild(o),i}(s,t,u.width,u.height)}}var i,a}},Sv=function(l,f){return function(e){if(l.dragging&&(s=(i=f).selection,c=s.getSel().getRangeAt(0).startContainer,a=3===c.nodeType?c.parentNode:c,u=l.element,a!==u&&!i.dom.isChildOf(a,u)&&!xv(a))){var t=(r=l.element,(o=r.cloneNode(!0)).removeAttribute("data-mce-selected"),o),n=f.fire("drop",{targetClone:t,clientX:e.clientX,clientY:e.clientY});n.isDefaultPrevented()||(t=n.targetClone,f.undoManager.transact(function(){Nv(l.element),f.insertContent(f.dom.getOuterHTML(t)),f._selectionOverrides.hideFakeCaret()}))}var r,o,i,a,u,s,c;Tv(l)}},Tv=function(e){e.dragging=!1,e.element=null,Nv(e.ghost)},kv=function(e){var t,n,r,o,i,a,p,h,v,u,s,c={};t=Si.DOM,a=V.document,n=Ev(c,e),p=c,h=e,v=he.throttle(function(e,t){h._selectionOverrides.hideFakeCaret(),h.selection.placeCaretAt(e,t)},0),r=function(e){var t,n,r,o,i,a,u,s,c,l,f,d,m=Math.max(Math.abs(e.screenX-p.screenX),Math.abs(e.screenY-p.screenY));if(p.element&&!p.dragging&&10<m){if(h.fire("dragstart",{target:p.element}).isDefaultPrevented())return;p.dragging=!0,h.focus()}if(p.dragging){var g=(f=p,{pageX:(d=Cv(h,e)).pageX-f.relX,pageY:d.pageY+5});c=p.ghost,l=h.getBody(),c.parentNode!==l&&l.appendChild(c),t=p.ghost,n=g,r=p.width,o=p.height,i=p.maxX,a=p.maxY,s=u=0,t.style.left=n.pageX+"px",t.style.top=n.pageY+"px",n.pageX+r>i&&(u=n.pageX+r-i),n.pageY+o>a&&(s=n.pageY+o-a),t.style.width=r-u+"px",t.style.height=o-s+"px",v(e.clientX,e.clientY)}},o=Sv(c,e),u=c,i=function(){u.dragging&&s.fire("dragend"),Tv(u)},(s=e).on("mousedown",n),e.on("mousemove",r),e.on("mouseup",o),t.bind(a,"mousemove",r),t.bind(a,"mouseup",i),e.on("remove",function(){t.unbind(a,"mousemove",r),t.unbind(a,"mouseup",i)})},_v=function(e){var n;kv(e),(n=e).on("drop",function(e){var t="undefined"!=typeof e.clientX?n.getDoc().elementFromPoint(e.clientX,e.clientY):null;(xv(t)||xv(n.dom.getContentEditableParent(t)))&&e.preventDefault()})},Av=function(t){var e=Vi(function(){if(!t.removed&&t.selection.getRng().collapsed){var e=fg(t,t.selection.getRng(),!1);t.selection.setRng(e)}},0);t.on("focus",function(){e.throttle()}),t.on("blur",function(){e.cancel()})},Rv=jo.isContentEditableTrue,Dv=jo.isContentEditableFalse,Ov=function(e,t){for(var n=e.getBody();t&&t!==n;){if(Rv(t)||Dv(t))return t;t=t.parentNode}return null},Bv=function(g){var p,e,t,a=g.getBody(),o=ds(g.getBody(),function(e){return g.dom.isBlock(e)},function(){return sh(g)}),h="sel-"+g.dom.uniqueId(),u=function(e){e&&g.selection.setRng(e)},s=function(){return g.selection.getRng()},v=function(e,t,n,r){return void 0===r&&(r=!0),g.fire("ShowCaret",{target:t,direction:e,before:n}).isDefaultPrevented()?null:(r&&g.selection.scrollIntoView(t,-1===e),o.show(n,t))},y=function(e,t){return t=Os(e,a,t),-1===e?_u.fromRangeStart(t):_u.fromRangeEnd(t)},n=function(e){return ka(e)||Oa(e)||Ba(e)},b=function(e){return n(e.startContainer)||n(e.endContainer)},c=function(e){var t=g.schema.getShortEndedElements(),n=g.dom.createRng(),r=e.startContainer,o=e.startOffset,i=e.endContainer,a=e.endOffset;return br(t,r.nodeName.toLowerCase())?0===o?n.setStartBefore(r):n.setStartAfter(r):n.setStart(r,o),br(t,i.nodeName.toLowerCase())?0===a?n.setEndBefore(i):n.setEndAfter(i):n.setEnd(i,a),n},l=function(e,t){var n,r,o,i,a,u,s,c,l,f,d=g.$,m=g.dom;if(!e)return null;if(e.collapsed){if(!b(e))if(!1===t){if(c=y(-1,e),gs(c.getNode(!0)))return v(-1,c.getNode(!0),!1,!1);if(gs(c.getNode()))return v(-1,c.getNode(),!c.isAtEnd(),!1)}else{if(c=y(1,e),gs(c.getNode()))return v(1,c.getNode(),!c.isAtEnd(),!1);if(gs(c.getNode(!0)))return v(1,c.getNode(!0),!1,!1)}return null}return i=e.startContainer,a=e.startOffset,u=e.endOffset,3===i.nodeType&&0===a&&Dv(i.parentNode)&&(i=i.parentNode,a=m.nodeIndex(i),i=i.parentNode),1!==i.nodeType?null:(u===a+1&&i===e.endContainer&&(n=i.childNodes[a]),Dv(n)?(l=f=n.cloneNode(!0),(s=g.fire("ObjectSelected",{target:n,targetClone:l})).isDefaultPrevented()?null:(r=oa(ar.fromDom(g.getBody()),"#"+h).fold(function(){return d([])},function(e){return d([e.dom()])}),l=s.targetClone,0===r.length&&(r=d('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",h)).appendTo(g.getBody()),e=g.dom.createRng(),l===f&&fe.ie?(r.empty().append('<p style="font-size: 0" data-mce-bogus="all">\xa0</p>').append(l),e.setStartAfter(r[0].firstChild.firstChild),e.setEndAfter(l)):(r.empty().append("\xa0").append(l).append("\xa0"),e.setStart(r[0].firstChild,1),e.setEnd(r[0].lastChild,0)),r.css({top:m.getPos(n,g.getBody()).y}),r[0].focus(),(o=g.selection.getSel()).removeAllRanges(),o.addRange(e),z(Qi(ar.fromDom(g.getBody()),"*[data-mce-selected]"),function(e){Sr(e,"data-mce-selected")}),n.setAttribute("data-mce-selected","1"),p=n,C(),e)):null)},f=function(){p&&(p.removeAttribute("data-mce-selected"),oa(ar.fromDom(g.getBody()),"#"+h).each(Ui),p=null),oa(ar.fromDom(g.getBody()),"#"+h).each(Ui),p=null},C=function(){o.hide()};return fe.ceFalse&&(function(){g.on("mouseup",function(e){var t=s();t.collapsed&&ph(g,e.clientX,e.clientY)&&u(lg(g,t,!1))}),g.on("click",function(e){var t;(t=Ov(g,e.target))&&(Dv(t)&&(e.preventDefault(),g.focus()),Rv(t)&&g.dom.isChildOf(t,g.selection.getNode())&&f())}),g.on("blur NewBlock",function(){f()}),g.on("ResizeWindow FullscreenStateChanged",function(){return o.reposition()});var n,r,i=function(e,t){var n,r,o=g.dom.getParent(e,g.dom.isBlock),i=g.dom.getParent(t,g.dom.isBlock);return!(!o||!g.dom.isChildOf(o,i)||!1!==Dv(Ov(g,o)))||o&&(n=o,r=i,!(g.dom.getParent(n,g.dom.isBlock)===g.dom.getParent(r,g.dom.isBlock)))&&function(e){var t=Js(e);if(!e.firstChild)return!1;var n=_u.before(e.firstChild),r=t.next(n);return r&&!Lf(r)&&!Ff(r)}(o)};r=!1,(n=g).on("touchstart",function(){r=!1}),n.on("touchmove",function(){r=!0}),n.on("touchend",function(e){var t=Ov(n,e.target);Dv(t)&&(r||(e.preventDefault(),l(cg(n,t))))}),g.on("mousedown",function(e){var t,n=e.target;if((n===a||"HTML"===n.nodeName||g.dom.isChildOf(n,a))&&!1!==ph(g,e.clientX,e.clientY))if(t=Ov(g,n))Dv(t)?(e.preventDefault(),l(cg(g,t))):(f(),Rv(t)&&e.shiftKey||yv(e.clientX,e.clientY,g.selection.getRng())||(C(),g.selection.placeCaretAt(e.clientX,e.clientY)));else if(!1===gs(n)){f(),C();var r=vv(a,e.clientX,e.clientY);if(r&&!i(e.target,r.node)){e.preventDefault();var o=v(1,r.node,r.before,!1);g.getBody().focus(),u(o)}}}),g.on("keypress",function(e){rv.modifierPressed(e)||(e.keyCode,Dv(g.selection.getNode())&&e.preventDefault())}),g.on("getSelectionRange",function(e){var t=e.range;if(p){if(!p.parentNode)return void(p=null);(t=t.cloneRange()).selectNode(p),e.range=t}}),g.on("setSelectionRange",function(e){e.range=c(e.range);var t=l(e.range,e.forward);t&&(e.range=t)}),g.on("AfterSetSelectionRange",function(e){var t,n=e.range;b(n)||"mcepastebin"===n.startContainer.parentNode.id||C(),t=n.startContainer.parentNode,g.dom.hasClass(t,"mce-offscreen-selection")||f()}),g.on("copy",function(e){var t,n=e.clipboardData;if(!e.isDefaultPrevented()&&e.clipboardData&&!fe.ie){var r=(t=g.dom.get(h))?t.getElementsByTagName("*")[0]:t;r&&(e.preventDefault(),n.clearData(),n.setData("text/html",r.outerHTML),n.setData("text/plain",r.outerText))}}),_v(g),Av(g)}(),e=g.contentStyles,t=".mce-content-body",e.push(o.getCss()),e.push(t+" .mce-offscreen-selection {position: absolute;left: -9999999999px;max-width: 1000000px;}"+t+" *[contentEditable=false] {cursor: default;}"+t+" *[contentEditable=true] {cursor: text;}")),{showCaret:v,showBlockCaretContainer:function(e){e.hasAttribute("data-mce-caret")&&(Pa(e),u(s()),g.selection.scrollIntoView(e[0]))},hideFakeCaret:C,destroy:function(){o.destroy(),p=null}}},Pv=function(e){for(var t=e;/<!--|--!?>/g.test(t);)t=t.replace(/<!--|--!?>/g,"");return t},Iv=function(e,t,n){var r,o,i,a,u=1;for(a=e.getShortEndedElements(),(i=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g).lastIndex=r=n;o=i.exec(t);){if(r=i.lastIndex,"/"===o[1])u--;else if(!o[1]){if(o[2]in a)continue;u++}if(0===u)break}return r},Lv=function(e,t){var n=e.exec(t);if(n){var r=n[1],o=n[2];return"string"==typeof r&&"data-mce-bogus"===r.toLowerCase()?o:null}return null};function Fv(z,U){void 0===U&&(U=di());var e=function(){};!1!==(z=z||{}).fix_self_closing&&(z.fix_self_closing=!0);var j=z.comment?z.comment:e,V=z.cdata?z.cdata:e,H=z.text?z.text:e,q=z.start?z.start:e,$=z.end?z.end:e,W=z.pi?z.pi:e,K=z.doctype?z.doctype:e;return{parse:function(e){var t,n,r,d,o,i,a,m,u,s,g,c,p,l,f,h,v,y,b,C,x,w,N,E,S,T,k,_,A,R=0,D=[],O=0,B=ti.decode,P=Xt.makeMap("src,href,data,background,formaction,poster,xlink:href"),I=/((java|vb)script|mhtml):/i,L=function(e){var t,n;for(t=D.length;t--&&D[t].name!==e;);if(0<=t){for(n=D.length-1;t<=n;n--)(e=D[n]).valid&&$(e.name);D.length=t}},F=function(e,t,n,r,o){var i,a,u,s,c;if(n=(t=t.toLowerCase())in g?t:B(n||r||o||""),p&&!m&&0==(0===(u=t).indexOf("data-")||0===u.indexOf("aria-"))){if(!(i=y[t])&&b){for(a=b.length;a--&&!(i=b[a]).pattern.test(t););-1===a&&(i=null)}if(!i)return;if(i.validValues&&!(n in i.validValues))return}if(P[t]&&!z.allow_script_urls){var l=n.replace(/[\s\u0000-\u001F]+/g,"");try{l=decodeURIComponent(l)}catch(f){l=unescape(l)}if(I.test(l))return;if(c=l,!(s=z).allow_html_data_urls&&(/^data:image\//i.test(c)?!1===s.allow_svg_data_urls&&/^data:image\/svg\+xml/i.test(c):/^data:/i.test(c)))return}m&&(t in P||0===t.indexOf("on"))||(d.map[t]=n,d.push({name:t,value:n}))};for(S=new RegExp("<(?:(?:!--([\\w\\W]*?)--!?>)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),T=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,s=U.getShortEndedElements(),E=z.self_closing_elements||U.getSelfClosingElements(),g=U.getBoolAttrs(),p=z.validate,u=z.remove_internals,A=z.fix_self_closing,k=U.getSpecialElements(),N=e+">";t=S.exec(N);){if(R<t.index&&H(B(e.substr(R,t.index-R))),n=t[6])":"===(n=n.toLowerCase()).charAt(0)&&(n=n.substr(1)),L(n);else if(n=t[7]){if(t.index+t[0].length>e.length){H(B(e.substr(t.index))),R=t.index+t[0].length;continue}":"===(n=n.toLowerCase()).charAt(0)&&(n=n.substr(1)),c=n in s,A&&E[n]&&0<D.length&&D[D.length-1].name===n&&L(n);var M=Lv(T,t[8]);if(null!==M){if("all"===M){R=Iv(U,e,S.lastIndex),S.lastIndex=R;continue}f=!1}if(!p||(l=U.getElementRule(n))){if(f=!0,p&&(y=l.attributes,b=l.attributePatterns),(v=t[8])?((m=-1!==v.indexOf("data-mce-type"))&&u&&(f=!1),(d=[]).map={},v.replace(T,F)):(d=[]).map={},p&&!m){if(C=l.attributesRequired,x=l.attributesDefault,w=l.attributesForced,l.removeEmptyAttrs&&!d.length&&(f=!1),w)for(o=w.length;o--;)a=(h=w[o]).name,"{$uid}"===(_=h.value)&&(_="mce_"+O++),d.map[a]=_,d.push({name:a,value:_});if(x)for(o=x.length;o--;)(a=(h=x[o]).name)in d.map||("{$uid}"===(_=h.value)&&(_="mce_"+O++),d.map[a]=_,d.push({name:a,value:_}));if(C){for(o=C.length;o--&&!(C[o]in d.map););-1===o&&(f=!1)}if(h=d.map["data-mce-bogus"]){if("all"===h){R=Iv(U,e,S.lastIndex),S.lastIndex=R;continue}f=!1}}f&&q(n,d,c)}else f=!1;if(r=k[n]){r.lastIndex=R=t.index+t[0].length,(t=r.exec(e))?(f&&(i=e.substr(R,t.index-R)),R=t.index+t[0].length):(i=e.substr(R),R=e.length),f&&(0<i.length&&H(i,!0),$(n)),S.lastIndex=R;continue}c||(v&&v.indexOf("/")===v.length-1?f&&$(n):D.push({name:n,valid:f}))}else(n=t[1])?(">"===n.charAt(0)&&(n=" "+n),z.allow_conditional_comments||"[if"!==n.substr(0,3).toLowerCase()||(n=" "+n),j(n)):(n=t[2])?V(Pv(n)):(n=t[3])?K(n):(n=t[4])&&W(n,t[5]);R=t.index+t[0].length}for(R<e.length&&H(B(e.substr(R))),o=D.length-1;0<=o;o--)(n=D[o]).valid&&$(n.name)}}}(Fv||(Fv={})).findEndTag=Iv;var Mv=Fv,zv=function(e,t){var n,r,o,i,a,u,s,c,l=t,f=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,d=e.schema;for(u=e.getTempAttrs(),s=l,c=new RegExp(["\\s?("+u.join("|")+')="[^"]+"'].join("|"),"gi"),l=s.replace(c,""),a=d.getShortEndedElements();i=f.exec(l);)r=f.lastIndex,o=i[0].length,n=a[i[1]]?r:Mv.findEndTag(d,l,r),l=l.substring(0,r-o)+l.substring(n),f.lastIndex=r-o;return wa(l)},Uv={trimExternal:zv,trimInternal:zv},jv=0,Vv=2,Hv=1,qv=function(g,p){var e=g.length+p.length+2,h=new Array(e),v=new Array(e),c=function(e,t,n,r,o){var i=l(e,t,n,r);if(null===i||i.start===t&&i.diag===t-r||i.end===e&&i.diag===e-n)for(var a=e,u=n;a<t||u<r;)a<t&&u<r&&g[a]===p[u]?(o.push([0,g[a]]),++a,++u):r-n<t-e?(o.push([2,g[a]]),++a):(o.push([1,p[u]]),++u);else{c(e,i.start,n,i.start-i.diag,o);for(var s=i.start;s<i.end;++s)o.push([0,g[s]]);c(i.end,t,i.end-i.diag,r,o)}},y=function(e,t,n,r){for(var o=e;o-t<r&&o<n&&g[o]===p[o-t];)++o;return{start:e,end:o,diag:t}},l=function(e,t,n,r){var o=t-e,i=r-n;if(0===o||0===i)return null;var a,u,s,c,l,f=o-i,d=i+o,m=(d%2==0?d:d+1)/2;for(h[1+m]=e,v[1+m]=t+1,a=0;a<=m;++a){for(u=-a;u<=a;u+=2){for(s=u+m,u===-a||u!==a&&h[s-1]<h[s+1]?h[s]=h[s+1]:h[s]=h[s-1]+1,l=(c=h[s])-e+n-u;c<t&&l<r&&g[c]===p[l];)h[s]=++c,++l;if(f%2!=0&&f-a<=u&&u<=f+a&&v[s-f]<=h[s])return y(v[s-f],u+e-n,t,r)}for(u=f-a;u<=f+a;u+=2){for(s=u+m-f,u===f-a||u!==f+a&&v[s+1]<=v[s-1]?v[s]=v[s+1]-1:v[s]=v[s-1],l=(c=v[s]-1)-e+n-u;e<=c&&n<=l&&g[c]===p[l];)v[s]=c--,l--;if(f%2==0&&-a<=u&&u<=a&&v[s]<=h[s+f])return y(v[s],u+e-n,t,r)}}},t=[];return c(0,g.length,0,p.length,t),t},$v=function(e){return jo.isElement(e)?e.outerHTML:jo.isText(e)?ti.encodeRaw(e.data,!1):jo.isComment(e)?"\x3c!--"+e.data+"--\x3e":""},Wv=function(e,t,n){var r=function(e){var t,n,r;for(r=V.document.createElement("div"),t=V.document.createDocumentFragment(),e&&(r.innerHTML=e);n=r.firstChild;)t.appendChild(n);return t}(t);if(e.hasChildNodes()&&n<e.childNodes.length){var o=e.childNodes[n];o.parentNode.insertBefore(r,o)}else e.appendChild(r)},Kv=function(e){return U(W(te(e.childNodes),$v),function(e){return 0<e.length})},Xv=function(e,t){var n,r,o,i=W(te(t.childNodes),$v);return n=qv(i,e),r=t,o=0,z(n,function(e){e[0]===jv?o++:e[0]===Hv?(Wv(r,e[1],o),o++):e[0]===Vv&&function(e,t){if(e.hasChildNodes()&&t<e.childNodes.length){var n=e.childNodes[t];n.parentNode.removeChild(n)}}(r,o)}),t},Yv=Hi(_.none()),Gv=function(e){return{type:"fragmented",fragments:e,content:"",bookmark:null,beforeBookmark:null}},Jv=function(e){return{type:"complete",fragments:null,content:e,bookmark:null,beforeBookmark:null}},Qv=function(e){return"fragmented"===e.type?e.fragments.join(""):e.content},Zv=function(e){var t=ar.fromTag("body",Yv.get().getOrThunk(function(){var e=V.document.implementation.createHTMLDocument("undo");return Yv.set(_.some(e)),e}));return ya(t,Qv(e)),z(Qi(t,"*[data-mce-bogus]"),ji),t.dom().innerHTML},ey=function(n){var e,t,r;return e=Kv(n.getBody()),-1!==(t=(r=G(e,function(e){var t=Uv.trimInternal(n.serializer,e);return 0<t.length?[t]:[]})).join("")).indexOf("</iframe>")?Gv(r):Jv(t)},ty=function(e,t,n){"fragmented"===t.type?Xv(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(n?t.beforeBookmark:t.bookmark)},ny=function(e,t){return!(!e||!t)&&(r=t,Qv(e)===Qv(r)||(n=t,Zv(e)===Zv(n)));var n,r};function ry(u){var s,r,o=this,c=0,l=[],t=0,f=function(){return 0===t},i=function(e){f()&&(o.typing=e)},d=function(e){u.setDirty(e)},a=function(e){i(!1),o.add({},e)},n=function(){o.typing&&(i(!1),o.add())};return u.on("init",function(){o.add()}),u.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&(n(),o.beforeChange())}),u.on("ExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&a(e)}),u.on("ObjectResizeStart Cut",function(){o.beforeChange()}),u.on("SaveContent ObjectResized blur",a),u.on("DragEnd",a),u.on("KeyUp",function(e){var t=e.keyCode;e.isDefaultPrevented()||((33<=t&&t<=36||37<=t&&t<=40||45===t||e.ctrlKey)&&(a(),u.nodeChanged()),46!==t&&8!==t||u.nodeChanged(),r&&o.typing&&!1===ny(ey(u),l[0])&&(!1===u.isDirty()&&(d(!0),u.fire("change",{level:l[0],lastLevel:null})),u.fire("TypingUndo"),r=!1,u.nodeChanged()))}),u.on("KeyDown",function(e){var t=e.keyCode;if(!e.isDefaultPrevented())if(33<=t&&t<=36||37<=t&&t<=40||45===t)o.typing&&a(e);else{var n=e.ctrlKey&&!e.altKey||e.metaKey;!(t<16||20<t)||224===t||91===t||o.typing||n||(o.beforeChange(),i(!0),o.add({},e),r=!0)}}),u.on("MouseDown",function(e){o.typing&&a(e)}),u.on("input",function(e){var t;e.inputType&&("insertReplacementText"===e.inputType||"insertText"===(t=e).inputType&&null===t.data)&&a(e)}),u.addShortcut("meta+z","","Undo"),u.addShortcut("meta+y,meta+shift+z","","Redo"),u.on("AddUndo Undo Redo ClearUndos",function(e){e.isDefaultPrevented()||u.nodeChanged()}),o={data:l,typing:!1,beforeChange:function(){f()&&(s=Yu.getUndoBookmark(u.selection))},add:function(e,t){var n,r,o,i=u.settings;if(o=ey(u),e=e||{},e=Xt.extend(e,o),!1===f()||u.removed)return null;if(r=l[c],u.fire("BeforeAddUndo",{level:e,lastLevel:r,originalEvent:t}).isDefaultPrevented())return null;if(r&&ny(r,e))return null;if(l[c]&&(l[c].beforeBookmark=s),i.custom_undo_redo_levels&&l.length>i.custom_undo_redo_levels){for(n=0;n<l.length-1;n++)l[n]=l[n+1];l.length--,c=l.length}e.bookmark=Yu.getUndoBookmark(u.selection),c<l.length-1&&(l.length=c+1),l.push(e),c=l.length-1;var a={level:e,lastLevel:r,originalEvent:t};return u.fire("AddUndo",a),0<c&&(d(!0),u.fire("change",a)),e},undo:function(){var e;return o.typing&&(o.add(),o.typing=!1,i(!1)),0<c&&(e=l[--c],ty(u,e,!0),d(!0),u.fire("undo",{level:e})),e},redo:function(){var e;return c<l.length-1&&(e=l[++c],ty(u,e,!1),d(!0),u.fire("redo",{level:e})),e},clear:function(){l=[],c=0,o.typing=!1,o.data=l,u.fire("ClearUndos")},hasUndo:function(){return 0<c||o.typing&&l[0]&&!ny(ey(u),l[0])},hasRedo:function(){return c<l.length-1&&!o.typing},transact:function(e){return n(),o.beforeChange(),o.ignore(e),o.add()},ignore:function(e){try{t++,e()}finally{t--}},extra:function(e,t){var n,r;o.transact(e)&&(r=l[c].bookmark,n=l[c-1],ty(u,n,!0),o.transact(t)&&(l[c-1].beforeBookmark=r))}}}var oy,iy,ay={},uy=Ht.filter,sy=Ht.each;iy=function(e){var t,n,r=e.selection.getRng();t=jo.matchNodeNames("pre"),r.collapsed||(n=e.selection.getSelectedBlocks(),sy(uy(uy(n,t),function(e){return t(e.previousSibling)&&-1!==Ht.indexOf(n,e.previousSibling)}),function(e){var t,n;t=e.previousSibling,gn(n=e).remove(),gn(t).append("<br><br>").append(n.childNodes)}))},ay[oy="pre"]||(ay[oy]=[]),ay[oy].push(iy);var cy=function(e,t){sy(ay[e],function(e){e(t)})},ly=/^(src|href|style)$/,fy=Xt.each,dy=wc.isEq,my=function(e,t,n){return e.isChildOf(t,n)&&t!==n&&!e.isBlock(n)},gy=function(e,t,n){var r,o,i;return r=t[n?"startContainer":"endContainer"],o=t[n?"startOffset":"endOffset"],jo.isElement(r)&&(i=r.childNodes.length-1,!n&&o&&o--,r=r.childNodes[i<o?i:o]),jo.isText(r)&&n&&o>=r.nodeValue.length&&(r=new go(r,e.getBody()).next()||r),jo.isText(r)&&!n&&0===o&&(r=new go(r,e.getBody()).prev()||r),r},py=function(e,t,n,r){var o=e.create(n,r);return t.parentNode.insertBefore(o,t),o.appendChild(t),o},hy=function(e,t,n,r,o){var i=ar.fromDom(t),a=ar.fromDom(e.create(r,o)),u=n?Wr(i):$r(i);return Mi(a,u),n?(Pi(i,a),Li(a,i)):(Ii(i,a),Fi(a,i)),a.dom()},vy=function(e,t,n,r){return!(t=wc.getNonWhiteSpaceSibling(t,n,r))||"BR"===t.nodeName||e.isBlock(t)},yy=function(e,n,r,o,i){var t,a,u,s,c,l,f,d,m,g,p,h,v,y,b=e.dom;if(c=b,!(dy(l=o,(f=n).inline)||dy(l,f.block)||(f.selector?jo.isElement(l)&&c.is(l,f.selector):void 0)||(s=o,n.links&&"A"===s.tagName)))return!1;if("all"!==n.remove)for(fy(n.styles,function(e,t){e=wc.normalizeStyleValue(b,wc.replaceVars(e,r),t),"number"==typeof t&&(t=e,i=0),(n.remove_similar||!i||dy(wc.getStyle(b,i,t),e))&&b.setStyle(o,t,""),u=1}),u&&""===b.getAttrib(o,"style")&&(o.removeAttribute("style"),o.removeAttribute("data-mce-style")),fy(n.attributes,function(e,t){var n;if(e=wc.replaceVars(e,r),"number"==typeof t&&(t=e,i=0),!i||dy(b.getAttrib(i,t),e)){if("class"===t&&(e=b.getAttrib(o,t))&&(n="",fy(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(n+=(n?" ":"")+e)}),n))return void b.setAttrib(o,t,n);"class"===t&&o.removeAttribute("className"),ly.test(t)&&o.removeAttribute("data-mce-"+t),o.removeAttribute(t)}}),fy(n.classes,function(e){e=wc.replaceVars(e,r),i&&!b.hasClass(i,e)||b.removeClass(o,e)}),a=b.getAttribs(o),t=0;t<a.length;t++){var C=a[t].nodeName;if(0!==C.indexOf("_")&&0!==C.indexOf("data-"))return!1}return"none"!==n.remove?(d=e,g=n,h=(m=o).parentNode,v=d.dom,y=d.settings.forced_root_block,g.block&&(y?h===v.getRoot()&&(g.list_block&&dy(m,g.list_block)||fy(Xt.grep(m.childNodes),function(e){wc.isValid(d,y,e.nodeName.toLowerCase())?p?p.appendChild(e):(p=py(v,e,y),v.setAttribs(p,d.settings.forced_root_block_attrs)):p=0})):v.isBlock(m)&&!v.isBlock(h)&&(vy(v,m,!1)||vy(v,m.firstChild,!0,1)||m.insertBefore(v.create("br"),m.firstChild),vy(v,m,!0)||vy(v,m.lastChild,!1,1)||m.appendChild(v.create("br")))),g.selector&&g.inline&&!dy(g.inline,m)||v.remove(m,1),!0):void 0},by=yy,Cy=function(s,c,l,e,f){var t,n,d=s.formatter.get(c),m=d[0],a=!0,u=s.dom,r=s.selection,i=function(e){var n,t,r,o,i,a,u=(n=s,t=e,r=c,o=l,i=f,fy(wc.getParents(n.dom,t.parentNode).reverse(),function(e){var t;a||"_start"===e.id||"_end"===e.id||(t=Mm.matchNode(n,e,r,o,i))&&!1!==t.split&&(a=e)}),a);return function(e,t,n,r,o,i,a,u){var s,c,l,f,d,m,g=e.dom;if(n){for(m=n.parentNode,s=r.parentNode;s&&s!==m;s=s.parentNode){for(c=g.clone(s,!1),d=0;d<t.length;d++)if(yy(e,t[d],u,c,c)){c=0;break}c&&(l&&c.appendChild(l),f||(f=c),l=c)}!i||a.mixed&&g.isBlock(n)||(r=g.split(n,r)),l&&(o.parentNode.insertBefore(l,o),f.appendChild(o))}return r}(s,d,u,e,e,!0,m,l)},g=function(e){var t,n,r,o,i;if(jo.isElement(e)&&u.getContentEditable(e)&&(o=a,a="true"===u.getContentEditable(e),i=!0),t=Xt.grep(e.childNodes),a&&!i)for(n=0,r=d.length;n<r&&!yy(s,d[n],l,e,e);n++);if(m.deep&&t.length){for(n=0,r=t.length;n<r;n++)g(t[n]);i&&(a=o)}},p=function(e){var t,n=u.get(e?"_start":"_end"),r=n[e?"firstChild":"lastChild"];return yc(t=r)&&jo.isElement(t)&&("_start"===t.id||"_end"===t.id)&&(r=r[e?"firstChild":"lastChild"]),jo.isText(r)&&0===r.data.length&&(r=e?n.previousSibling||n.nextSibling:n.nextSibling||n.previousSibling),u.remove(n,!0),r},o=function(e){var t,n,r=e.commonAncestorContainer;if(e=Pc(s,e,d,!0),m.split){if(e=Um(e),(t=gy(s,e,!0))!==(n=gy(s,e))){if(/^(TR|TH|TD)$/.test(t.nodeName)&&t.firstChild&&(t="TR"===t.nodeName?t.firstChild.firstChild||t:t.firstChild||t),r&&/^T(HEAD|BODY|FOOT|R)$/.test(r.nodeName)&&/^(TH|TD)$/.test(n.nodeName)&&n.firstChild&&(n=n.firstChild||n),my(u,t,n)){var o=_.from(t.firstChild).getOr(t);return i(hy(u,o,!0,"span",{id:"_start","data-mce-type":"bookmark"})),void p(!0)}if(my(u,n,t))return o=_.from(n.lastChild).getOr(n),i(hy(u,o,!1,"span",{id:"_end","data-mce-type":"bookmark"})),void p(!1);t=py(u,t,"span",{id:"_start","data-mce-type":"bookmark"}),n=py(u,n,"span",{id:"_end","data-mce-type":"bookmark"}),i(t),i(n),t=p(!0),n=p()}else t=n=i(t);e.startContainer=t.parentNode?t.parentNode:t,e.startOffset=u.nodeIndex(t),e.endContainer=n.parentNode?n.parentNode:n,e.endOffset=u.nodeIndex(n)+1}Lc(u,e,function(e){fy(e,function(e){g(e),jo.isElement(e)&&"underline"===s.dom.getStyle(e,"text-decoration")&&e.parentNode&&"underline"===wc.getTextDecoration(u,e.parentNode)&&yy(s,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,e)})})};if(e)e.nodeType?((n=u.createRng()).setStartBefore(e),n.setEndAfter(e),o(n)):o(e);else if("false"!==u.getContentEditable(r.getNode()))r.isCollapsed()&&m.inline&&!u.select("td[data-mce-selected],th[data-mce-selected]").length?function(e,t,n,r){var o,i,a,u,s,c,l,f=e.dom,d=e.selection,m=[],g=d.getRng();for(o=g.startContainer,i=g.startOffset,3===(s=o).nodeType&&(i!==o.nodeValue.length&&(u=!0),s=s.parentNode);s;){if(Mm.matchNode(e,s,t,n,r)){c=s;break}s.nextSibling&&(u=!0),m.push(s),s=s.parentNode}if(c)if(u){a=d.getBookmark(),g.collapse(!0);var p=Pc(e,g,e.formatter.get(t),!0);p=Um(p),e.formatter.remove(t,n,p),d.moveToBookmark(a)}else{l=Qu(e.getBody(),c);var h=$m(!1).dom(),v=Gm(m,h);Xm(e,h,l||c),Wm(e,l,!1),d.setCursorLocation(v,1),f.isEmpty(c)&&f.remove(c)}}(s,c,l,f):(t=Yu.getPersistentBookmark(s.selection,!0),o(r.getRng()),r.moveToBookmark(t),m.inline&&Mm.match(s,c,l,r.getStart())&&wc.moveStart(u,r,r.getRng()),s.nodeChanged());else{e=r.getNode();for(var h=0,v=d.length;h<v&&(!d[h].ceFalseOverride||!yy(s,d[h],l,e,e));h++);}},xy=Xt.each,wy=function(e){return e&&1===e.nodeType&&!yc(e)&&!Ju(e)&&!jo.isBogus(e)},Ny=function(e,t){var n;for(n=e;n;n=n[t]){if(3===n.nodeType&&0!==n.nodeValue.length)return e;if(1===n.nodeType&&!yc(n))return n}return e},Ey=function(e,t,n){var r,o,i=new el(e);if(t&&n&&(t=Ny(t,"previousSibling"),n=Ny(n,"nextSibling"),i.compare(t,n))){for(r=t.nextSibling;r&&r!==n;)r=(o=r).nextSibling,t.appendChild(o);return e.remove(n),Xt.each(Xt.grep(n.childNodes),function(e){t.appendChild(e)}),t}return n},Sy=function(e,t,n){xy(e.childNodes,function(e){wy(e)&&(t(e)&&n(e),e.hasChildNodes()&&Sy(e,t,n))})},Ty=function(n,e){return d(function(e,t){return!(!t||!wc.getStyle(n,t,e))},e)},ky=function(r,e,t){return d(function(e,t,n){r.setStyle(n,e,t),""===n.getAttribute("style")&&n.removeAttribute("style"),_y(r,n)},e,t)},_y=function(e,t){"SPAN"===t.nodeName&&0===e.getAttribs(t).length&&e.remove(t,!0)},Ay=function(e,t){var n;1===t.nodeType&&t.parentNode&&1===t.parentNode.nodeType&&(n=wc.getTextDecoration(e,t.parentNode),e.getStyle(t,"color")&&n?e.setStyle(t,"text-decoration",n):e.getStyle(t,"text-decoration")===n&&e.setStyle(t,"text-decoration",null))},Ry=function(n,e,r,o){xy(e,function(t){xy(n.dom.select(t.inline,o),function(e){wy(e)&&by(n,t,r,e,t.exact?e:null)}),function(r,e,t){if(e.clear_child_styles){var n=e.links?"*:not(a)":"*";xy(r.select(n,t),function(n){wy(n)&&xy(e.styles,function(e,t){r.setStyle(n,t,"")})})}}(n.dom,t,o)})},Dy=function(e,t,n,r){(t.styles.color||t.styles.textDecoration)&&(Xt.walk(r,d(Ay,e),"childNodes"),Ay(e,r))},Oy=function(e,t,n,r){t.styles&&t.styles.backgroundColor&&Sy(r,Ty(e,"fontSize"),ky(e,"backgroundColor",wc.replaceVars(t.styles.backgroundColor,n)))},By=function(e,t,n,r){"sub"!==t.inline&&"sup"!==t.inline||(Sy(r,Ty(e,"fontSize"),ky(e,"fontSize","")),e.remove(e.select("sup"===t.inline?"sub":"sup",r),!0))},Py=function(e,t,n,r){r&&!1!==t.merge_siblings&&(r=Ey(e,wc.getNonWhiteSpaceSibling(r),r),r=Ey(e,r,wc.getNonWhiteSpaceSibling(r,!0)))},Iy=function(t,n,r,o,i){Mm.matchNode(t,i.parentNode,r,o)&&by(t,n,o,i)||n.merge_with_parents&&t.dom.getParent(i.parentNode,function(e){if(Mm.matchNode(t,e,r,o))return by(t,n,o,i),!0})},Ly=Xt.each,Fy=function(g,p,h,r){var e,t,v=g.formatter.get(p),y=v[0],o=!r&&g.selection.isCollapsed(),i=g.dom,n=g.selection,b=function(n,e){if(e=e||y,n){if(e.onformat&&e.onformat(n,e,h,r),Ly(e.styles,function(e,t){i.setStyle(n,t,wc.replaceVars(e,h))}),e.styles){var t=i.getAttrib(n,"style");t&&n.setAttribute("data-mce-style",t)}Ly(e.attributes,function(e,t){i.setAttrib(n,t,wc.replaceVars(e,h))}),Ly(e.classes,function(e){e=wc.replaceVars(e,h),i.hasClass(n,e)||i.addClass(n,e)})}},C=function(e,t){var n=!1;return!!y.selector&&(Ly(e,function(e){if(!("collapsed"in e&&e.collapsed!==o))return i.is(t,e.selector)&&!Ju(t)?(b(t,e),!(n=!0)):void 0}),n)},a=function(s,e,t,c){var l,f,d=[],m=!0;l=y.inline||y.block,f=s.create(l),b(f),Lc(s,e,function(e){var a,u=function(e){var t,n,r,o;if(o=m,t=e.nodeName.toLowerCase(),n=e.parentNode.nodeName.toLowerCase(),1===e.nodeType&&s.getContentEditable(e)&&(o=m,m="true"===s.getContentEditable(e),r=!0),wc.isEq(t,"br"))return a=0,void(y.block&&s.remove(e));if(y.wrapper&&Mm.matchNode(g,e,p,h))a=0;else{if(m&&!r&&y.block&&!y.wrapper&&wc.isTextBlock(g,t)&&wc.isValid(g,n,l))return e=s.rename(e,l),b(e),d.push(e),void(a=0);if(y.selector){var i=C(v,e);if(!y.inline||i)return void(a=0)}!m||r||!wc.isValid(g,l,t)||!wc.isValid(g,n,l)||!c&&3===e.nodeType&&1===e.nodeValue.length&&65279===e.nodeValue.charCodeAt(0)||Ju(e)||y.inline&&s.isBlock(e)?(a=0,Ly(Xt.grep(e.childNodes),u),r&&(m=o),a=0):(a||(a=s.clone(f,!1),e.parentNode.insertBefore(a,e),d.push(a)),a.appendChild(e))}};Ly(e,u)}),!0===y.links&&Ly(d,function(e){var t=function(e){"A"===e.nodeName&&b(e,y),Ly(Xt.grep(e.childNodes),t)};t(e)}),Ly(d,function(e){var t,n,r,o,i,a=function(e){var n=!1;return Ly(e.childNodes,function(e){if((t=e)&&1===t.nodeType&&!yc(t)&&!Ju(t)&&!jo.isBogus(t))return n=e,!1;var t}),n};n=0,Ly(e.childNodes,function(e){wc.isWhiteSpaceNode(e)||yc(e)||n++}),t=n,!(1<d.length)&&s.isBlock(e)||0!==t?(y.inline||y.wrapper)&&(y.exact||1!==t||((o=a(r=e))&&!yc(o)&&Mm.matchName(s,o,y)&&(i=s.clone(o,!1),b(i),s.replace(i,r,!0),s.remove(o,1)),e=i||r),Ry(g,v,h,e),Iy(g,y,p,h,e),Oy(s,y,h,e),By(s,y,h,e),Py(s,y,h,e)):s.remove(e,1)})};if("false"!==i.getContentEditable(n.getNode())){if(y){if(r)r.nodeType?C(v,r)||((t=i.createRng()).setStartBefore(r),t.setEndAfter(r),a(i,Pc(g,t,v),0,!0)):a(i,r,0,!0);else if(o&&y.inline&&!i.select("td[data-mce-selected],th[data-mce-selected]").length)!function(e,t,n){var r,o,i,a,u,s,c=e.selection;a=(r=c.getRng(!0)).startOffset,s=r.startContainer.nodeValue,(o=Qu(e.getBody(),c.getStart()))&&(i=qm(o));var l,f,d=/[^\s\u00a0\u00ad\u200b\ufeff]/;s&&0<a&&a<s.length&&d.test(s.charAt(a))&&d.test(s.charAt(a-1))?(u=c.getBookmark(),r.collapse(!0),r=Pc(e,r,e.formatter.get(t)),r=Um(r),e.formatter.apply(t,n,r),c.moveToBookmark(u)):(o&&i.nodeValue===jm||(l=e.getDoc(),f=$m(!0).dom(),i=(o=l.importNode(f,!0)).firstChild,r.insertNode(o),a=1),e.formatter.apply(t,n,o),c.setCursorLocation(i,a))}(g,p,h);else{var u=g.selection.getNode();g.settings.forced_root_block||!v[0].defaultBlock||i.getParent(u,i.isBlock)||Fy(g,v[0].defaultBlock),g.selection.setRng(cl(g.selection.getRng())),e=Yu.getPersistentBookmark(g.selection,!0),a(i,Pc(g,n.getRng(),v)),y.styles&&Dy(i,y,h,u),n.moveToBookmark(e),wc.moveStart(i,n,n.getRng()),g.nodeChanged()}cy(p,g)}}else{r=n.getNode();for(var s=0,c=v.length;s<c;s++)if(v[s].ceFalseOverride&&i.is(r,v[s].selector))return void b(r,v[s])}},My={applyFormat:Fy},zy=Xt.each,Uy=function(e,t,n,r,o){var i,a,u,s,c,l,f,d;null===t.get()&&(a=e,u={},(i=t).set({}),a.on("NodeChange",function(n){var r=wc.getParents(a.dom,n.element),o={};r=Xt.grep(r,function(e){return 1===e.nodeType&&!e.getAttribute("data-mce-bogus")}),zy(i.get(),function(e,n){zy(r,function(t){return a.formatter.matchNode(t,n,{},e.similar)?(u[n]||(zy(e,function(e){e(!0,{node:t,format:n,parents:r})}),u[n]=e),o[n]=e,!1):!Mm.matchesUnInheritedFormatSelector(a,t,n)&&void 0})}),zy(u,function(e,t){o[t]||(delete u[t],zy(e,function(e){e(!1,{node:n.element,format:t,parents:r})}))})})),c=n,l=r,f=o,d=(s=t).get(),zy(c.split(","),function(e){d[e]||(d[e]=[],d[e].similar=f),d[e].push(l)}),s.set(d)},jy={get:function(r){var t={valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,preview:!1,defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"left"},preview:"font-family font-size"}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"right"},preview:"font-family font-size"}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div",preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},fontname:{inline:"span",toggle:!1,styles:{fontFamily:"%value"},clear_child_styles:!0},fontsize:{inline:"span",toggle:!1,styles:{fontSize:"%value"},clear_child_styles:!0},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(){return!0},onformat:function(n,e,t){Xt.each(t,function(e,t){r.setAttrib(n,t,e)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]};return Xt.each("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(e){t[e]={block:e,remove:"all"}}),t}},Vy=Xt.each,Hy=Si.DOM,qy=function(e,t){var n,o,r,m=t&&t.schema||di({}),g=function(e){var t,n,r;return o="string"==typeof e?{name:e,classes:[],attrs:{}}:e,t=Hy.create(o.name),n=t,(r=o).classes.length&&Hy.addClass(n,r.classes.join(" ")),Hy.setAttribs(n,r.attrs),t},p=function(n,e,t){var r,o,i,a,u,s,c,l,f=0<e.length&&e[0],d=f&&f.name;if(u=d,s="string"!=typeof(a=n)?a.nodeName.toLowerCase():a,c=m.getElementRule(s),i=!(!(l=c&&c.parentsRequired)||!l.length)&&(u&&-1!==Xt.inArray(l,u)?u:l[0]))d===i?(o=e[0],e=e.slice(1)):o=i;else if(f)o=e[0],e=e.slice(1);else if(!t)return n;return o&&(r=g(o)).appendChild(n),t&&(r||(r=Hy.create("div")).appendChild(n),Xt.each(t,function(e){var t=g(e);r.insertBefore(t,n)})),p(r,e,o&&o.siblings)};return e&&e.length?(o=e[0],n=g(o),(r=Hy.create("div")).appendChild(p(n,e.slice(1),o.siblings)),r):""},$y=function(e){var t,a={classes:[],attrs:{}};return"*"!==(e=a.selector=Xt.trim(e))&&(t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,function(e,t,n,r,o){switch(t){case"#":a.attrs.id=n;break;case".":a.classes.push(n);break;case":":-1!==Xt.inArray("checked disabled enabled read-only required".split(" "),n)&&(a.attrs[n]=n)}if("["===r){var i=o.match(/([\w\-]+)(?:\=\"([^\"]+))?/);i&&(a.attrs[i[1]]=i[2])}return""})),a.name=t||"div",a},Wy=function(e){return e&&"string"==typeof e?(e=(e=e.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),Xt.map(e.split(/(?:>|\s+(?![^\[\]]+\]))/),function(e){var t=Xt.map(e.split(/(?:~\+|~|\+)/),$y),n=t.pop();return t.length&&(n.siblings=t),n}).reverse()):[]},Ky=function(n,e){var t,r,o,i,a,u,s="";if(!1===(u=n.settings.preview_styles))return"";"string"!=typeof u&&(u="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow");var c=function(e){return e.replace(/%(\w+)/g,"")};if("string"==typeof e){if(!(e=n.formatter.get(e)))return;e=e[0]}return"preview"in e&&!1===(u=e.preview)?"":(t=e.block||e.inline||"span",(i=Wy(e.selector)).length?(i[0].name||(i[0].name=t),t=e.selector,r=qy(i,n)):r=qy([t],n),o=Hy.select(t,r)[0]||r.firstChild,Vy(e.styles,function(e,t){(e=c(e))&&Hy.setStyle(o,t,e)}),Vy(e.attributes,function(e,t){(e=c(e))&&Hy.setAttrib(o,t,e)}),Vy(e.classes,function(e){e=c(e),Hy.hasClass(o,e)||Hy.addClass(o,e)}),n.fire("PreviewFormats"),Hy.setStyles(r,{position:"absolute",left:-65535}),n.getBody().appendChild(r),a=Hy.getStyle(n.getBody(),"fontSize",!0),a=/px$/.test(a)?parseInt(a,10):0,Vy(u.split(" "),function(e){var t=Hy.getStyle(o,e,!0);if(!("background-color"===e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)&&(t=Hy.getStyle(n.getBody(),e,!0),"#ffffff"===Hy.toHex(t).toLowerCase())||"color"===e&&"#000000"===Hy.toHex(t).toLowerCase())){if("font-size"===e&&/em|%$/.test(t)){if(0===a)return;t=parseFloat(t)/(/%$/.test(t)?100:1)*a+"px"}"border"===e&&t&&(s+="padding:0 2px;"),s+=e+":"+t+";"}}),n.fire("AfterPreviewFormats"),Hy.remove(r),s)},Xy=function(e,t,n,r,o){var i=t.get(n);!Mm.match(e,n,r,o)||"toggle"in i[0]&&!i[0].toggle?My.applyFormat(e,n,r,o):Cy(e,n,r,o)},Yy=function(e){e.addShortcut("meta+b","","Bold"),e.addShortcut("meta+i","","Italic"),e.addShortcut("meta+u","","Underline");for(var t=1;t<=6;t++)e.addShortcut("access+"+t,"",["FormatBlock",!1,"h"+t]);e.addShortcut("access+7","",["FormatBlock",!1,"p"]),e.addShortcut("access+8","",["FormatBlock",!1,"div"]),e.addShortcut("access+9","",["FormatBlock",!1,"address"])};function Gy(e){var t,n,r,o=(t=e,n={},(r=function(e,t){e&&("string"!=typeof e?Xt.each(e,function(e,t){r(t,e)}):(t=t.length?t:[t],Xt.each(t,function(e){"undefined"==typeof e.deep&&(e.deep=!e.selector),"undefined"==typeof e.split&&(e.split=!e.selector||e.inline),"undefined"==typeof e.remove&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))}),n[e]=t))})(jy.get(t.dom)),r(t.settings.formats),{get:function(e){return e?n[e]:n},register:r,unregister:function(e){return e&&n[e]&&delete n[e],n}}),i=Hi(null);return Yy(e),Jm(e),{get:o.get,register:o.register,unregister:o.unregister,apply:d(My.applyFormat,e),remove:d(Cy,e),toggle:d(Xy,e,o),match:d(Mm.match,e),matchAll:d(Mm.matchAll,e),matchNode:d(Mm.matchNode,e),canApply:d(Mm.canApply,e),formatChanged:d(Uy,e,i),getCssText:d(Ky,e)}}var Jy,Qy=Object.prototype.hasOwnProperty,Zy=(Jy=function(e,t){return t},function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var o=e[r];for(var i in o)Qy.call(o,i)&&(n[i]=Jy(n[i],o[i]))}return n}),eb={register:function(t,s,c){t.addAttributeFilter("data-mce-tabindex",function(e,t){for(var n,r=e.length;r--;)(n=e[r]).attr("tabindex",n.attributes.map["data-mce-tabindex"]),n.attr(t,null)}),t.addAttributeFilter("src,href,style",function(e,t){for(var n,r,o=e.length,i="data-mce-"+t,a=s.url_converter,u=s.url_converter_scope;o--;)(r=(n=e[o]).attributes.map[i])!==undefined?(n.attr(t,0<r.length?r:null),n.attr(i,null)):(r=n.attributes.map[t],"style"===t?r=c.serializeStyle(c.parseStyle(r),n.name):a&&(r=a.call(u,r,t,n.name)),n.attr(t,0<r.length?r:null))}),t.addAttributeFilter("class",function(e){for(var t,n,r=e.length;r--;)(n=(t=e[r]).attr("class"))&&(n=t.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),t.attr("class",0<n.length?n:null))}),t.addAttributeFilter("data-mce-type",function(e,t,n){for(var r,o=e.length;o--;)"bookmark"!==(r=e[o]).attributes.map["data-mce-type"]||n.cleanup||(_.from(r.firstChild).exists(function(e){return!Ca(e.value)})?r.unwrap():r.remove())}),t.addNodeFilter("noscript",function(e){for(var t,n=e.length;n--;)(t=e[n].firstChild)&&(t.value=ti.decode(t.value))}),t.addNodeFilter("script,style",function(e,t){for(var n,r,o,i=e.length,a=function(e){return e.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")};i--;)r=(n=e[i]).firstChild?n.firstChild.value:"","script"===t?((o=n.attr("type"))&&n.attr("type","mce-no/type"===o?null:o.replace(/^mce\-/,"")),"xhtml"===s.element_format&&0<r.length&&(n.firstChild.value="// <![CDATA[\n"+a(r)+"\n// ]]>")):"xhtml"===s.element_format&&0<r.length&&(n.firstChild.value="\x3c!--\n"+a(r)+"\n--\x3e")}),t.addNodeFilter("#comment",function(e){for(var t,n=e.length;n--;)0===(t=e[n]).value.indexOf("[CDATA[")?(t.name="#cdata",t.type=4,t.value=t.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===t.value.indexOf("mce:protected ")&&(t.name="#text",t.type=3,t.raw=!0,t.value=unescape(t.value).substr(14))}),t.addNodeFilter("xml:namespace,input",function(e,t){for(var n,r=e.length;r--;)7===(n=e[r]).type?n.remove():1===n.type&&("input"!==t||"type"in n.attributes.map||n.attr("type","text"))}),t.addAttributeFilter("data-mce-type",function(e){z(e,function(e){"format-caret"===e.attr("data-mce-type")&&(e.isEmpty(t.schema.getNonEmptyElements())?e.remove():e.unwrap())})}),t.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)})},trimTrailingBr:function(e){var t,n,r=function(e){return e&&"br"===e.name};r(t=e.lastChild)&&r(n=t.prev)&&(t.remove(),n.remove())}},tb={process:function(e,t,n){return f=n,(l=e)&&l.hasEventListeners("PreProcess")&&!f.no_events?(o=t,i=n,c=(r=e).dom,o=o.cloneNode(!0),(a=V.document.implementation).createHTMLDocument&&(u=a.createHTMLDocument(""),Xt.each("BODY"===o.nodeName?o.childNodes:[o],function(e){u.body.appendChild(u.importNode(e,!0))}),o="BODY"!==o.nodeName?u.body.firstChild:u.body,s=c.doc,c.doc=u),xp(r,Zy(i,{node:o})),s&&(c.doc=s),o):t;var r,o,i,a,u,s,c,l,f}},nb=function(e,a,u){e.addNodeFilter("font",function(e){z(e,function(e){var t,n=a.parse(e.attr("style")),r=e.attr("color"),o=e.attr("face"),i=e.attr("size");r&&(n.color=r),o&&(n["font-family"]=o),i&&(n["font-size"]=u[parseInt(e.attr("size"),10)-1]),e.name="span",e.attr("style",a.serialize(n)),t=e,z(["color","face","size"],function(e){t.attr(e,null)})})})},rb=function(e,t){var n,r=gi();t.convert_fonts_to_spans&&nb(e,r,Xt.explode(t.font_size_legacy_values)),n=r,e.addNodeFilter("strike",function(e){z(e,function(e){var t=n.parse(e.attr("style"));t["text-decoration"]="line-through",e.name="span",e.attr("style",n.serialize(t))})})},ob={register:function(e,t){t.inline_styles&&rb(e,t)}},ib=/^[ \t\r\n]*$/,ab={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},ub=function(e,t,n){var r,o,i=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[i])return e[i];if(e!==t){if(r=e[a])return r;for(o=e.parent;o&&o!==t;o=o.parent)if(r=o[a])return r}},sb=function(){function a(e,t){this.name=e,1===(this.type=t)&&(this.attributes=[],this.attributes.map={})}return a.create=function(e,t){var n,r;if(n=new a(e,ab[e]||1),t)for(r in t)n.attr(r,t[r]);return n},a.prototype.replace=function(e){return e.parent&&e.remove(),this.insert(e,this),this.remove(),this},a.prototype.attr=function(e,t){var n,r;if("string"!=typeof e){for(r in e)this.attr(r,e[r]);return this}if(n=this.attributes){if(t!==undefined){if(null===t){if(e in n.map)for(delete n.map[e],r=n.length;r--;)if(n[r].name===e)return n=n.splice(r,1),this;return this}if(e in n.map){for(r=n.length;r--;)if(n[r].name===e){n[r].value=t;break}}else n.push({name:e,value:t});return n.map[e]=t,this}return n.map[e]}},a.prototype.clone=function(){var e,t,n,r,o,i=new a(this.name,this.type);if(n=this.attributes){for((o=[]).map={},e=0,t=n.length;e<t;e++)"id"!==(r=n[e]).name&&(o[o.length]={name:r.name,value:r.value},o.map[r.name]=r.value);i.attributes=o}return i.value=this.value,i.shortEnded=this.shortEnded,i},a.prototype.wrap=function(e){return this.parent.insert(e,this),e.append(this),this},a.prototype.unwrap=function(){var e,t;for(e=this.firstChild;e;)t=e.next,this.insert(e,this,!0),e=t;this.remove()},a.prototype.remove=function(){var e=this.parent,t=this.next,n=this.prev;return e&&(e.firstChild===this?(e.firstChild=t)&&(t.prev=null):n.next=t,e.lastChild===this?(e.lastChild=n)&&(n.next=null):t.prev=n,this.parent=this.next=this.prev=null),this},a.prototype.append=function(e){var t;return e.parent&&e.remove(),(t=this.lastChild)?((t.next=e).prev=t,this.lastChild=e):this.lastChild=this.firstChild=e,e.parent=this,e},a.prototype.insert=function(e,t,n){var r;return e.parent&&e.remove(),r=t.parent||this,n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,(e.next=t).prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,(e.prev=t).next=e),e.parent=r,e},a.prototype.getAll=function(e){var t,n=[];for(t=this.firstChild;t;t=ub(t,this))t.name===e&&n.push(t);return n},a.prototype.empty=function(){var e,t,n;if(this.firstChild){for(e=[],n=this.firstChild;n;n=ub(n,this))e.push(n);for(t=e.length;t--;)(n=e[t]).parent=n.firstChild=n.lastChild=n.next=n.prev=null}return this.firstChild=this.lastChild=null,this},a.prototype.isEmpty=function(e,t,n){var r,o,i=this.firstChild;if(t=t||{},i)do{if(1===i.type){if(i.attributes.map["data-mce-bogus"])continue;if(e[i.name])return!1;for(r=i.attributes.length;r--;)if("name"===(o=i.attributes[r].name)||0===o.indexOf("data-mce-bookmark"))return!1}if(8===i.type)return!1;if(3===i.type&&!ib.test(i.value))return!1;if(3===i.type&&i.parent&&t[i.parent.name]&&ib.test(i.value))return!1;if(n&&n(i))return!1}while(i=ub(i,this));return!0},a.prototype.walk=function(e){return ub(this,null,e)},a}(),cb=function(e,t,n,r){(e.padd_empty_with_br||t.insert)&&n[r.name]?r.empty().append(new sb("br",1)).shortEnded=!0:r.empty().append(new sb("#text",3)).value="\xa0"},lb=function(e){return fb(e,"#text")&&"\xa0"===e.firstChild.value},fb=function(e,t){return e&&e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.name===t},db=function(r,e,t,n){return n.isEmpty(e,t,function(e){return t=e,(n=r.getElementRule(t.name))&&n.paddEmpty;var t,n})},mb=function(e,t){return e&&(t[e.name]||"br"===e.name)},gb=function(e,p){var h=e.schema;p.remove_trailing_brs&&e.addNodeFilter("br",function(e,t,n){var r,o,i,a,u,s,c,l,f=e.length,d=Xt.extend({},h.getBlockElements()),m=h.getNonEmptyElements(),g=h.getWhiteSpaceElements();for(d.body=1,r=0;r<f;r++)if(i=(o=e[r]).parent,d[o.parent.name]&&o===i.lastChild){for(u=o.prev;u;){if("span"!==(s=u.name)||"bookmark"!==u.attr("data-mce-type")){if("br"!==s)break;if("br"===s){o=null;break}}u=u.prev}o&&(o.remove(),db(h,m,g,i)&&(c=h.getElementRule(i.name))&&(c.removeEmpty?i.remove():c.paddEmpty&&cb(p,n,d,i)))}else{for(a=o;i&&i.firstChild===a&&i.lastChild===a&&!d[(a=i).name];)i=i.parent;a===i&&!0!==p.padd_empty_with_br&&((l=new sb("#text",3)).value="\xa0",o.replace(l))}}),e.addAttributeFilter("href",function(e){var t,n,r,o=e.length;if(!p.allow_unsafe_link_target)for(;o--;)"a"===(t=e[o]).name&&"_blank"===t.attr("target")&&t.attr("rel",(n=t.attr("rel"),r=n?Xt.trim(n):"",/\b(noopener)\b/g.test(r)?r:r.split(" ").filter(function(e){return 0<e.length}).concat(["noopener"]).sort().join(" ")))}),p.allow_html_in_named_anchor||e.addAttributeFilter("id,name",function(e){for(var t,n,r,o,i=e.length;i--;)if("a"===(o=e[i]).name&&o.firstChild&&!o.attr("href"))for(r=o.parent,t=o.lastChild;n=t.prev,r.insert(t,o),t=n;);}),p.fix_list_elements&&e.addNodeFilter("ul,ol",function(e){for(var t,n,r=e.length;r--;)if("ul"===(n=(t=e[r]).parent).name||"ol"===n.name)if(t.prev&&"li"===t.prev.name)t.prev.append(t);else{var o=new sb("li",1);o.attr("style","list-style-type: none"),t.wrap(o)}}),p.validate&&h.getValidClasses()&&e.addAttributeFilter("class",function(e){for(var t,n,r,o,i,a,u,s=e.length,c=h.getValidClasses();s--;){for(n=(t=e[s]).attr("class").split(" "),i="",r=0;r<n.length;r++)o=n[r],u=!1,(a=c["*"])&&a[o]&&(u=!0),a=c[t.name],!u&&a&&a[o]&&(u=!0),u&&(i&&(i+=" "),i+=o);i.length||(i=null),t.attr("class",i)}})},pb=Xt.makeMap,hb=Xt.each,vb=Xt.explode,yb=Xt.extend;function bb(T,k){void 0===k&&(k=di());var _={},A=[],R={},D={};(T=T||{}).validate=!("validate"in T)||T.validate,T.root_name=T.root_name||"body";var O=function(e){var t,n,r;(n=e.name)in _&&((r=R[n])?r.push(e):R[n]=[e]),t=A.length;for(;t--;)(n=A[t].name)in e.attributes.map&&((r=D[n])?r.push(e):D[n]=[e]);return e},e={schema:k,addAttributeFilter:function(e,n){hb(vb(e),function(e){var t;for(t=0;t<A.length;t++)if(A[t].name===e)return void A[t].callbacks.push(n);A.push({name:e,callbacks:[n]})})},getAttributeFilters:function(){return[].concat(A)},addNodeFilter:function(e,n){hb(vb(e),function(e){var t=_[e];t||(_[e]=t=[]),t.push(n)})},getNodeFilters:function(){var e=[];for(var t in _)_.hasOwnProperty(t)&&e.push({name:t,callbacks:_[t]});return e},filterNode:O,parse:function(e,a){var t,n,r,o,i,u,s,c,l,f,d,m=[];a=a||{},R={},D={},l=yb(pb("script,style,head,html,body,title,meta,param"),k.getBlockElements());var g=k.getNonEmptyElements(),p=k.children,h=T.validate,v="forced_root_block"in a?a.forced_root_block:T.forced_root_block,y=k.getWhiteSpaceElements(),b=/^[ \t\r\n]+/,C=/[ \t\r\n]+$/,x=/[ \t\r\n]+/g,w=/^[ \t\r\n]+$/;f=y.hasOwnProperty(a.context)||y.hasOwnProperty(T.root_name);var N=function(e,t){var n,r=new sb(e,t);return e in _&&((n=R[e])?n.push(r):R[e]=[r]),r},E=function(e){var t,n,r,o,i=k.getBlockElements();for(t=e.prev;t&&3===t.type;){if(0<(r=t.value.replace(C,"")).length)return void(t.value=r);if(n=t.next){if(3===n.type&&n.value.length){t=t.prev;continue}if(!i[n.name]&&"script"!==n.name&&"style"!==n.name){t=t.prev;continue}}o=t.prev,t.remove(),t=o}};t=Mv({validate:h,allow_script_urls:T.allow_script_urls,allow_conditional_comments:T.allow_conditional_comments,self_closing_elements:function(e){var t,n={};for(t in e)"li"!==t&&"p"!==t&&(n[t]=e[t]);return n}(k.getSelfClosingElements()),cdata:function(e){d.append(N("#cdata",4)).value=e},text:function(e,t){var n;f||(e=e.replace(x," "),mb(d.lastChild,l)&&(e=e.replace(b,""))),0!==e.length&&((n=N("#text",3)).raw=!!t,d.append(n).value=e)},comment:function(e){d.append(N("#comment",8)).value=e},pi:function(e,t){d.append(N(e,7)).value=t,E(d)},doctype:function(e){d.append(N("#doctype",10)).value=e,E(d)},start:function(e,t,n){var r,o,i,a,u;if(i=h?k.getElementRule(e):{}){for((r=N(i.outputName||e,1)).attributes=t,r.shortEnded=n,d.append(r),(u=p[d.name])&&p[r.name]&&!u[r.name]&&m.push(r),o=A.length;o--;)(a=A[o].name)in t.map&&((s=D[a])?s.push(r):D[a]=[r]);l[e]&&E(r),n||(d=r),!f&&y[e]&&(f=!0)}},end:function(e){var t,n,r,o,i;if(n=h?k.getElementRule(e):{}){if(l[e]&&!f){if((t=d.firstChild)&&3===t.type)if(0<(r=t.value.replace(b,"")).length)t.value=r,t=t.next;else for(o=t.next,t.remove(),t=o;t&&3===t.type;)r=t.value,o=t.next,(0===r.length||w.test(r))&&(t.remove(),t=o),t=o;if((t=d.lastChild)&&3===t.type)if(0<(r=t.value.replace(C,"")).length)t.value=r,t=t.prev;else for(o=t.prev,t.remove(),t=o;t&&3===t.type;)r=t.value,o=t.prev,(0===r.length||w.test(r))&&(t.remove(),t=o),t=o}if(f&&y[e]&&(f=!1),n.removeEmpty&&db(k,g,y,d)&&!d.attributes.map.name&&!d.attr("id"))return i=d.parent,l[d.name]?d.empty().remove():d.unwrap(),void(d=i);n.paddEmpty&&(lb(d)||db(k,g,y,d))&&cb(T,a,l,d),d=d.parent}}},k);var S=d=new sb(a.context||T.root_name,11);if(t.parse(e),h&&m.length&&(a.context?a.invalid=!0:function(e){var t,n,r,o,i,a,u,s,c,l,f,d,m,g,p,h;for(d=pb("tr,td,th,tbody,thead,tfoot,table"),l=k.getNonEmptyElements(),f=k.getWhiteSpaceElements(),m=k.getTextBlockElements(),g=k.getSpecialElements(),t=0;t<e.length;t++)if((n=e[t]).parent&&!n.fixed)if(m[n.name]&&"li"===n.parent.name){for(p=n.next;p&&m[p.name];)p.name="li",p.fixed=!0,n.parent.insert(p,n.parent),p=p.next;n.unwrap(n)}else{for(o=[n],r=n.parent;r&&!k.isValidChild(r.name,n.name)&&!d[r.name];r=r.parent)o.push(r);if(r&&1<o.length){for(o.reverse(),i=a=O(o[0].clone()),c=0;c<o.length-1;c++){for(k.isValidChild(a.name,o[c].name)?(u=O(o[c].clone()),a.append(u)):u=a,s=o[c].firstChild;s&&s!==o[c+1];)h=s.next,u.append(s),s=h;a=u}db(k,l,f,i)?r.insert(n,o[0],!0):(r.insert(i,o[0],!0),r.insert(n,i)),r=o[0],(db(k,l,f,r)||fb(r,"br"))&&r.empty().remove()}else if(n.parent){if("li"===n.name){if((p=n.prev)&&("ul"===p.name||"ul"===p.name)){p.append(n);continue}if((p=n.next)&&("ul"===p.name||"ul"===p.name)){p.insert(n,p.firstChild,!0);continue}n.wrap(O(new sb("ul",1)));continue}k.isValidChild(n.parent.name,"div")&&k.isValidChild("div",n.name)?n.wrap(O(new sb("div",1))):g[n.name]?n.empty().remove():n.unwrap()}}}(m)),v&&("body"===S.name||a.isRootContent)&&function(){var e,t,n=S.firstChild,r=function(e){e&&((n=e.firstChild)&&3===n.type&&(n.value=n.value.replace(b,"")),(n=e.lastChild)&&3===n.type&&(n.value=n.value.replace(C,"")))};if(k.isValidChild(S.name,v.toLowerCase())){for(;n;)e=n.next,3===n.type||1===n.type&&"p"!==n.name&&!l[n.name]&&!n.attr("data-mce-type")?(t||((t=N(v,1)).attr(T.forced_root_block_attrs),S.insert(t,n)),t.append(n)):(r(t),t=null),n=e;r(t)}}(),!a.invalid){for(c in R){for(s=_[c],i=(n=R[c]).length;i--;)n[i].parent||n.splice(i,1);for(r=0,o=s.length;r<o;r++)s[r](n,c,a)}for(r=0,o=A.length;r<o;r++)if((s=A[r]).name in D){for(i=(n=D[s.name]).length;i--;)n[i].parent||n.splice(i,1);for(i=0,u=s.callbacks.length;i<u;i++)s.callbacks[i](n,s.name,a)}}return S}};return gb(e,T),ob.register(e,T),e}var Cb=function(e,t,n){-1===Xt.inArray(t,n)&&(e.addAttributeFilter(n,function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),t.push(n))},xb=function(e,t,n){var r=wa(n.getInner?t.innerHTML:e.getOuterHTML(t));return n.selection||Ao(ar.fromDom(t))?r:Xt.trim(r)},wb=function(e,t,n){var r=n.selection?Zy({forced_root_block:!1},n):n,o=e.parse(t,r);return eb.trimTrailingBr(o),o},Nb=function(e,t,n,r,o){var i,a,u,s,c=(i=r,al(t,n).serialize(i));return a=e,s=c,!(u=o).no_events&&a?wp(a,Zy(u,{content:s})).content:s};function Eb(e,t){var a,u,s,c,l,n,r=(a=e,n=["data-mce-selected"],s=(u=t)&&u.dom?u.dom:Si.DOM,c=u&&u.schema?u.schema:di(a),a.entity_encoding=a.entity_encoding||"named",a.remove_trailing_brs=!("remove_trailing_brs"in a)||a.remove_trailing_brs,l=bb(a,c),eb.register(l,a,s),{schema:c,addNodeFilter:l.addNodeFilter,addAttributeFilter:l.addAttributeFilter,serialize:function(e,t){var n=Zy({format:"html"},t||{}),r=tb.process(u,e,n),o=xb(s,r,n),i=wb(l,o,n);return"tree"===n.format?i:Nb(u,a,c,i,n)},addRules:function(e){c.addValidElements(e)},setRules:function(e){c.setValidElements(e)},addTempAttr:d(Cb,l,n),getTempAttrs:function(){return n}});return{schema:r.schema,addNodeFilter:r.addNodeFilter,addAttributeFilter:r.addAttributeFilter,serialize:r.serialize,addRules:r.addRules,setRules:r.setRules,addTempAttr:r.addTempAttr,getTempAttrs:r.getTempAttrs}}function Sb(e){return{getBookmark:d(hc,e),moveToBookmark:d(vc,e)}}(Sb||(Sb={})).isBookmarkNode=yc;var Tb,kb,_b=Sb,Ab=jo.isContentEditableFalse,Rb=jo.isContentEditableTrue,Db=function(r,a){var u,s,c,l,f,d,m,g,p,h,v,y,i,b,C,x,w,N=a.dom,E=Xt.each,S=a.getDoc(),T=V.document,k=Math.abs,_=Math.round,A=a.getBody();l={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var e=".mce-content-body";a.contentStyles.push(e+" div.mce-resizehandle {position: absolute;border: 1px solid black;box-sizing: content-box;background: #FFF;width: 7px;height: 7px;z-index: 10000}"+e+" .mce-resizehandle:hover {background: #000}"+e+" img[data-mce-selected],"+e+" hr[data-mce-selected] {outline: 1px solid black;resize: none}"+e+" .mce-clonedresizable {position: absolute;"+(fe.gecko?"":"outline: 1px dashed black;")+"opacity: .5;filter: alpha(opacity=50);z-index: 10000}"+e+" .mce-resize-helper {background: #555;background: rgba(0,0,0,0.75);border-radius: 3px;border: 1px;color: white;display: none;font-family: sans-serif;font-size: 12px;white-space: nowrap;line-height: 14px;margin: 5px 10px;padding: 5px;position: absolute;z-index: 10001}");var R=function(e){return e&&("IMG"===e.nodeName||a.dom.is(e,"figure.image"))},n=function(e){var t,n,r=e.target;t=e,n=a.selection.getRng(),!R(t.target)||yv(t.clientX,t.clientY,n)||e.isDefaultPrevented()||a.selection.select(r)},D=function(e){return a.dom.is(e,"figure.image")?e.querySelector("img"):e},O=function(e){var t=a.settings.object_resizing;return!1!==t&&!fe.iOS&&("string"!=typeof t&&(t="table,img,figure.image,div"),"false"!==e.getAttribute("data-mce-resize")&&e!==a.getBody()&&Lr(ar.fromDom(e),t))},B=function(e){var t,n,r,o;t=e.screenX-d,n=e.screenY-m,b=t*f[2]+h,C=n*f[3]+v,b=b<5?5:b,C=C<5?5:C,(R(u)&&!1!==a.settings.resize_img_proportional?!rv.modifierPressed(e):rv.modifierPressed(e)||R(u)&&f[2]*f[3]!=0)&&(k(t)>k(n)?(C=_(b*y),b=_(C/y)):(b=_(C/y),C=_(b*y))),N.setStyles(D(s),{width:b,height:C}),r=0<(r=f.startPos.x+t)?r:0,o=0<(o=f.startPos.y+n)?o:0,N.setStyles(c,{left:r,top:o,display:"block"}),c.innerHTML=b+" &times; "+C,f[2]<0&&s.clientWidth<=b&&N.setStyle(s,"left",g+(h-b)),f[3]<0&&s.clientHeight<=C&&N.setStyle(s,"top",p+(v-C)),(t=A.scrollWidth-x)+(n=A.scrollHeight-w)!=0&&N.setStyles(c,{left:r-t,top:o-n}),i||(Tp(a,u,h,v),i=!0)},P=function(){i=!1;var e=function(e,t){t&&(u.style[e]||!a.schema.isValid(u.nodeName.toLowerCase(),e)?N.setStyle(D(u),e,t):N.setAttrib(D(u),e,t))};e("width",b),e("height",C),N.unbind(S,"mousemove",B),N.unbind(S,"mouseup",P),T!==S&&(N.unbind(T,"mousemove",B),N.unbind(T,"mouseup",P)),N.remove(s),N.remove(c),o(u),kp(a,u,b,C),N.setAttrib(u,"style",N.getAttrib(u,"style")),a.nodeChanged()},o=function(e){var t,r,o,n,i;I(),M(),t=N.getPos(e,A),g=t.x,p=t.y,i=e.getBoundingClientRect(),r=i.width||i.right-i.left,o=i.height||i.bottom-i.top,u!==e&&(u=e,b=C=0),n=a.fire("ObjectSelected",{target:e}),O(e)&&!n.isDefaultPrevented()?E(l,function(n,e){var t;(t=N.get("mceResizeHandle"+e))&&N.remove(t),t=N.add(A,"div",{id:"mceResizeHandle"+e,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+e+"-resize; margin:0; padding:0"}),11===fe.ie&&(t.contentEditable=!1),N.bind(t,"mousedown",function(e){var t;e.stopImmediatePropagation(),e.preventDefault(),d=(t=e).screenX,m=t.screenY,h=D(u).clientWidth,v=D(u).clientHeight,y=v/h,(f=n).startPos={x:r*n[0]+g,y:o*n[1]+p},x=A.scrollWidth,w=A.scrollHeight,s=u.cloneNode(!0),N.addClass(s,"mce-clonedresizable"),N.setAttrib(s,"data-mce-bogus","all"),s.contentEditable=!1,s.unSelectabe=!0,N.setStyles(s,{left:g,top:p,margin:0}),s.removeAttribute("data-mce-selected"),A.appendChild(s),N.bind(S,"mousemove",B),N.bind(S,"mouseup",P),T!==S&&(N.bind(T,"mousemove",B),N.bind(T,"mouseup",P)),c=N.add(A,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},h+" &times; "+v)}),n.elm=t,N.setStyles(t,{left:r*n[0]+g-t.offsetWidth/2,top:o*n[1]+p-t.offsetHeight/2})}):I(),u.setAttribute("data-mce-selected","1")},I=function(){var e,t;for(e in M(),u&&u.removeAttribute("data-mce-selected"),l)(t=N.get("mceResizeHandle"+e))&&(N.unbind(t),N.remove(t))},L=function(e){var t,n=function(e,t){if(e)do{if(e===t)return!0}while(e=e.parentNode)};i||a.removed||(E(N.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),t="mousedown"===e.type?e.target:r.getNode(),n(t=N.$(t).closest("table,img,figure.image,hr")[0],A)&&(z(),n(r.getStart(!0),t)&&n(r.getEnd(!0),t))?o(t):I())},F=function(e){return Ab(function(e,t){for(;t&&t!==e;){if(Rb(t)||Ab(t))return t;t=t.parentNode}return null}(a.getBody(),e))},M=function(){for(var e in l){var t=l[e];t.elm&&(N.unbind(t.elm),delete t.elm)}},z=function(){try{a.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}};return a.on("init",function(){z(),fe.ie&&11<=fe.ie&&(a.on("mousedown click",function(e){var t=e.target,n=t.nodeName;i||!/^(TABLE|IMG|HR)$/.test(n)||F(t)||(2!==e.button&&a.selection.select(t,"TABLE"===n),"mousedown"===e.type&&a.nodeChanged())}),a.dom.bind(A,"mscontrolselect",function(e){var t=function(e){he.setEditorTimeout(a,function(){a.selection.select(e)})};if(F(e.target))return e.preventDefault(),void t(e.target);/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"===e.target.tagName&&t(e.target))}));var t=he.throttle(function(e){a.composing||L(e)});a.on("nodechange ResizeEditor ResizeWindow drop FullscreenStateChanged",t),a.on("keyup compositionend",function(e){u&&"TABLE"===u.nodeName&&t(e)}),a.on("hide blur",I),a.on("contextmenu",n)}),a.on("remove",M),{isResizable:O,showResizeRect:o,hideResizeRect:I,updateResizeRect:L,destroy:function(){u=s=null}}},Ob=function(e){return jo.isContentEditableTrue(e)||jo.isContentEditableFalse(e)},Bb=function(e,t,n){var r,o,i,a,u,s=n;if(s.caretPositionFromPoint)(o=s.caretPositionFromPoint(e,t))&&((r=n.createRange()).setStart(o.offsetNode,o.offset),r.collapse(!0));else if(n.caretRangeFromPoint)r=n.caretRangeFromPoint(e,t);else if(s.body.createTextRange){r=s.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch(c){r=function(e,n,t){var r,o,i;if(r=t.elementFromPoint(e,n),o=t.body.createTextRange(),r&&"HTML"!==r.tagName||(r=t.body),o.moveToElementText(r),0<(i=(i=Xt.toArray(o.getClientRects())).sort(function(e,t){return(e=Math.abs(Math.max(e.top-n,e.bottom-n)))-(t=Math.abs(Math.max(t.top-n,t.bottom-n)))})).length){n=(i[0].bottom+i[0].top)/2;try{return o.moveToPoint(e,n),o.collapse(!0),o}catch(a){}}return null}(e,t,n)}return i=r,a=n.body,u=i&&i.parentElement?i.parentElement():null,jo.isContentEditableFalse(function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(u,a,Ob))?null:i}return r},Pb=function(n,e){return W(e,function(e){var t=n.fire("GetSelectionRange",{range:e});return t.range!==e?t.range:e})},Ib=function(e,t){var n=(t||V.document).createDocumentFragment();return z(e,function(e){n.appendChild(e.dom())}),ar.fromDom(n)},Lb=Ar("element","width","rows"),Fb=Ar("element","cells"),Mb=Ar("x","y"),zb=function(e,t){var n=parseInt(Er(e,t),10);return isNaN(n)?1:n},Ub=function(e){return j(e,function(e,t){return t.cells().length>e?t.cells().length:e},0)},jb=function(e,t){for(var n=e.rows(),r=0;r<n.length;r++)for(var o=n[r].cells(),i=0;i<o.length;i++)if(Mr(o[i],t))return _.some(Mb(i,r));return _.none()},Vb=function(e,t,n,r,o){for(var i=[],a=e.rows(),u=n;u<=o;u++){var s=a[u].cells(),c=t<r?s.slice(t,r+1):s.slice(r,t+1);i.push(Fb(a[u].element(),c))}return i},Hb=function(e){var o=Lb(ha(e),0,[]);return z(Qi(e,"tr"),function(n,r){z(Qi(n,"td,th"),function(e,t){!function(e,t,n,r,o){for(var i=zb(o,"rowspan"),a=zb(o,"colspan"),u=e.rows(),s=n;s<n+i;s++){u[s]||(u[s]=Fb(va(r),[]));for(var c=t;c<t+a;c++)u[s].cells()[c]=s===n&&c===t?o:ha(o)}}(o,function(e,t,n){for(;r=t,o=n,i=void 0,((i=e.rows())[o]?i[o].cells():[])[r];)t++;var r,o,i;return t}(o,t,r),r,n,e)})}),Lb(o.element(),Ub(o.rows()),o.rows())},qb=function(e){return n=W((t=e).rows(),function(e){var t=W(e.cells(),function(e){var t=va(e);return Sr(t,"colspan"),Sr(t,"rowspan"),t}),n=ha(e.element());return Mi(n,t),n}),r=ha(t.element()),o=ar.fromTag("tbody"),Mi(o,n),Fi(r,o),r;var t,n,r,o},$b=function(l,e,t){return jb(l,e).bind(function(c){return jb(l,t).map(function(e){return t=l,r=e,o=(n=c).x(),i=n.y(),a=r.x(),u=r.y(),s=i<u?Vb(t,o,i,a,u):Vb(t,o,u,a,i),Lb(t.element(),Ub(s),s);var t,n,r,o,i,a,u,s})})},Wb=function(n,t){return X(n,function(e){return"li"===lr(e)&&Jh(e,t)}).fold(q([]),function(e){return(t=n,X(t,function(e){return"ul"===lr(e)||"ol"===lr(e)})).map(function(e){return[ar.fromTag("li"),ar.fromTag(lr(e))]}).getOr([]);var t})},Kb=function(e,t){var n,r=ar.fromDom(t.commonAncestorContainer),o=uf(r,e),i=U(o,function(e){return xo(e)||bo(e)}),a=Wb(o,t),u=i.concat(a.length?a:So(n=r)?Vr(n).filter(Eo).fold(q([]),function(e){return[n,e]}):Eo(n)?[n]:[]);return W(u,ha)},Xb=function(){return Ib([])},Yb=function(e,t){return n=ar.fromDom(t.cloneContents()),r=Kb(e,t),o=j(r,function(e,t){return Fi(t,e),t},n),0<r.length?Ib([o]):o;var n,r,o},Gb=function(e,o){return(t=e,n=o[0],ra(n,"table",d(Mr,t))).bind(function(e){var t=o[0],n=o[o.length-1],r=Hb(e);return $b(r,t,n).map(function(e){return Ib([qb(e)])})}).getOrThunk(Xb);var t,n},Jb=function(e,t){var n,r,o=Cm(t,e);return 0<o.length?Gb(e,o):(n=e,0<(r=t).length&&r[0].collapsed?Xb():Yb(n,r[0]))},Qb=function(e,t){if(void 0===t&&(t={}),t.get=!0,t.format=t.format||"html",t.selection=!0,(t=e.fire("BeforeGetContent",t)).isDefaultPrevented())return e.fire("GetContent",t),t.content;if("text"===t.format)return c=e,_.from(c.selection.getRng()).map(function(e){var t=c.dom.add(c.getBody(),"div",{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},e.cloneContents()),n=wa(t.innerText);return c.dom.remove(t),n}).getOr("");t.getInner=!0;var n,r,o,i,a,u,s,c,l=(r=t,i=(n=e).selection.getRng(),a=n.dom.create("body"),u=n.selection.getSel(),s=Pb(n,gm(u)),(o=r.contextual?Jb(ar.fromDom(n.getBody()),s).dom():i.cloneContents())&&a.appendChild(o),n.selection.serializer.serialize(a,r));return"tree"===t.format?l:(t.content=e.selection.isCollapsed()?"":l,e.fire("GetContent",t),t.content)},Zb=function(e,t,n){var r,o,i,a,u=(r=t,ma(ma({format:"html"},n),{set:!0,selection:!0,content:r})),s=e.selection.getRng(),c=e.getDoc();if(u.no_events||!(u=e.fire("BeforeSetContent",u)).isDefaultPrevented()){if(t=function(e,t){if("raw"!==t.format){var n=e.parser.parse(t.content,ma({isRootContent:!0,forced_root_block:!1},t));return al({validate:e.validate},e.schema).serialize(n)}return t.content}(e,u),s.insertNode){t+='<span id="__caret">_</span>',s.startContainer===c&&s.endContainer===c?c.body.innerHTML=t:(s.deleteContents(),0===c.body.childNodes.length?c.body.innerHTML=t:s.createContextualFragment?s.insertNode(s.createContextualFragment(t)):(i=c.createDocumentFragment(),a=c.createElement("div"),i.appendChild(a),a.outerHTML=t,s.insertNode(i))),o=e.dom.get("__caret"),(s=c.createRange()).setStartBefore(o),s.setEndBefore(o),e.selection.setRng(s),e.dom.remove("__caret");try{e.selection.setRng(s)}catch(f){}}else{var l=s;l.item&&(c.execCommand("Delete",!1,null),l=e.selection.getRng()),/^\s+/.test(t)?(l.pasteHTML('<span id="__mce_tmp">_</span>'+t),e.dom.remove("__mce_tmp")):l.pasteHTML(t)}u.no_events||e.fire("SetContent",u)}else e.fire("SetContent",u)},eC=function(e,t,n,r,o){var i=n?t.startContainer:t.endContainer,a=n?t.startOffset:t.endOffset;return _.from(i).map(ar.fromDom).map(function(e){return r&&t.collapsed?e:Xr(e,o(e,a)).getOr(e)}).bind(function(e){return dr(e)?_.some(e):Vr(e)}).map(function(e){return e.dom()}).getOr(e)},tC=function(e,t,n){return eC(e,t,!0,n,function(e,t){return Math.min(e.dom().childNodes.length,t)})},nC=function(e,t,n){return eC(e,t,!1,n,function(e,t){return 0<t?t-1:t})},rC=function(e,t){for(var n=e;e&&jo.isText(e)&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n},oC=Xt.each,iC=function(e){return!!e.select},aC=function(e){return!(!e||!e.ownerDocument)&&zr(ar.fromDom(e.ownerDocument),ar.fromDom(e))},uC=function(u,s,e,c){var n,t,l,f,a,r=function(e,t){return Zb(c,e,t)},o=function(e){var t=m();t.collapse(!!e),i(t)},d=function(){return s.getSelection?s.getSelection():s.document.selection},m=function(){var e,t,n,r,o=function(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(r){return-1}};if(!s)return null;if(null==(r=s.document))return null;if(c.bookmark!==undefined&&!1===sh(c)){var i=up(c);if(i.isSome())return i.map(function(e){return Pb(c,[e])[0]}).getOr(r.createRange())}try{(e=d())&&!jo.isRestrictedNode(e.anchorNode)&&(t=0<e.rangeCount?e.getRangeAt(0):e.createRange?e.createRange():r.createRange())}catch(a){}return(t=Pb(c,[t])[0])||(t=r.createRange?r.createRange():r.body.createTextRange()),t.setStart&&9===t.startContainer.nodeType&&t.collapsed&&(n=u.getRoot(),t.setStart(n,0),t.setEnd(n,0)),l&&f&&(0===o(t.START_TO_START,t,l)&&0===o(t.END_TO_END,t,l)?t=f:f=l=null),t},i=function(e,t){var n,r;if((o=e)&&(iC(o)||aC(o.startContainer)&&aC(o.endContainer))){var o,i=iC(e)?e:null;if(i){f=null;try{i.select()}catch(a){}}else{if(n=d(),e=c.fire("SetSelectionRange",{range:e,forward:t}).range,n){f=e;try{n.removeAllRanges(),n.addRange(e)}catch(a){}!1===t&&n.extend&&(n.collapse(e.endContainer,e.endOffset),n.extend(e.startContainer,e.startOffset)),l=0<n.rangeCount?n.getRangeAt(0):null}e.collapsed||e.startContainer!==e.endContainer||!n.setBaseAndExtent||fe.ie||e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()&&(r=e.startContainer.childNodes[e.startOffset])&&"IMG"===r.tagName&&(n.setBaseAndExtent(e.startContainer,e.startOffset,e.endContainer,e.endOffset),n.anchorNode===e.startContainer&&n.focusNode===e.endContainer||n.setBaseAndExtent(r,0,r,1)),c.fire("AfterSetSelectionRange",{range:e,forward:t})}}},g=function(){var e,t,n=d();return!(n&&n.anchorNode&&n.focusNode)||((e=u.createRng()).setStart(n.anchorNode,n.anchorOffset),e.collapse(!0),(t=u.createRng()).setStart(n.focusNode,n.focusOffset),t.collapse(!0),e.compareBoundaryPoints(e.START_TO_START,t)<=0)},p={bookmarkManager:null,controlSelection:null,dom:u,win:s,serializer:e,editor:c,collapse:o,setCursorLocation:function(e,t){var n=u.createRng();e?(n.setStart(e,t),n.setEnd(e,t),i(n),o(!1)):(Qh(u,n,c.getBody(),!0),i(n))},getContent:function(e){return Qb(c,e)},setContent:r,getBookmark:function(e,t){return n.getBookmark(e,t)},moveToBookmark:function(e){return n.moveToBookmark(e)},select:function(e,t){var r,n,o;return(r=u,n=e,o=t,_.from(n).map(function(e){var t=r.nodeIndex(e),n=r.createRng();return n.setStart(e.parentNode,t),n.setEnd(e.parentNode,t+1),o&&(Qh(r,n,e,!0),Qh(r,n,e,!1)),n})).each(i),e},isCollapsed:function(){var e=m(),t=d();return!(!e||e.item)&&(e.compareEndPoints?0===e.compareEndPoints("StartToEnd",e):!t||e.collapsed)},isForward:g,setNode:function(e){return r(u.getOuterHTML(e)),e},getNode:function(){return e=c.getBody(),(t=m())?(r=t.startContainer,o=t.endContainer,i=t.startOffset,a=t.endOffset,n=t.commonAncestorContainer,!t.collapsed&&(r===o&&a-i<2&&r.hasChildNodes()&&(n=r.childNodes[i]),3===r.nodeType&&3===o.nodeType&&(r=r.length===i?rC(r.nextSibling,!0):r.parentNode,o=0===a?rC(o.previousSibling,!1):o.parentNode,r&&r===o))?r:n&&3===n.nodeType?n.parentNode:n):e;var e,t,n,r,o,i,a},getSel:d,setRng:i,getRng:m,getStart:function(e){return tC(c.getBody(),m(),e)},getEnd:function(e){return nC(c.getBody(),m(),e)},getSelectedBlocks:function(e,t){return function(e,t,n,r){var o,i,a=[];if(i=e.getRoot(),n=e.getParent(n||tC(i,t,t.collapsed),e.isBlock),r=e.getParent(r||nC(i,t,t.collapsed),e.isBlock),n&&n!==i&&a.push(n),n&&r&&n!==r)for(var u=new go(o=n,i);(o=u.next())&&o!==r;)e.isBlock(o)&&a.push(o);return r&&n!==r&&r!==i&&a.push(r),a}(u,m(),e,t)},normalize:function(){var e=m(),t=d();if(!hm(t)&&Zh(c)){var n=Dg(u,e);return n.each(function(e){i(e,g())}),n.getOr(e)}return e},selectorChanged:function(e,t){var i;return a||(a={},i={},c.on("NodeChange",function(e){var n=e.element,r=u.getParents(n,null,u.getRoot()),o={};oC(a,function(e,n){oC(r,function(t){if(u.is(t,n))return i[n]||(oC(e,function(e){e(!0,{node:t,selector:n,parents:r})}),i[n]=e),o[n]=e,!1})}),oC(i,function(e,t){o[t]||(delete i[t],oC(e,function(e){e(!1,{node:n,selector:t,parents:r})}))})})),a[e]||(a[e]=[]),a[e].push(t),p},getScrollContainer:function(){for(var e,t=u.getRoot();t&&"BODY"!==t.nodeName;){if(t.scrollHeight>t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e,t){return og(c,e,t)},placeCaretAt:function(e,t){return i(Bb(e,t,c.getDoc()))},getBoundingClientRect:function(){var e=m();return e.collapsed?_u.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){s=l=f=null,t.destroy()}};return n=_b(p),t=Db(p,c),p.bookmarkManager=n,p.controlSelection=t,p};(kb=Tb||(Tb={}))[kb.Br=0]="Br",kb[kb.Block=1]="Block",kb[kb.Wrap=2]="Wrap",kb[kb.Eol=3]="Eol";var sC=function(e,t){return e===Tu.Backwards?t.reverse():t},cC=function(e,t,n,r){for(var o,i,a,u,s,c,l=Js(n),f=r,d=[];f&&(s=l,c=f,o=t===Tu.Forwards?s.next(c):s.prev(c));){if(jo.isBr(o.getNode(!1)))return t===Tu.Forwards?{positions:sC(t,d).concat([o]),breakType:Tb.Br,breakAt:_.some(o)}:{positions:sC(t,d),breakType:Tb.Br,breakAt:_.some(o)};if(o.isVisible()){if(e(f,o)){var m=(i=t,a=f,u=o,jo.isBr(u.getNode(i===Tu.Forwards))?Tb.Br:!1===Ts(a,u)?Tb.Block:Tb.Wrap);return{positions:sC(t,d),breakType:m,breakAt:_.some(o)}}d.push(o),f=o}else f=o}return{positions:sC(t,d),breakType:Tb.Eol,breakAt:_.none()}},lC=function(n,r,o,e){return r(o,e).breakAt.map(function(e){var t=r(o,e).positions;return n===Tu.Backwards?t.concat(e):[e].concat(t)}).getOr([])},fC=function(e,i){return j(e,function(e,o){return e.fold(function(){return _.some(o)},function(r){return ru(Z(r.getClientRects()),Z(o.getClientRects()),function(e,t){var n=Math.abs(i-e.left);return Math.abs(i-t.left)<=n?o:r}).or(e)})},_.none())},dC=function(t,e){return Z(e.getClientRects()).bind(function(e){return fC(t,e.left)})},mC=d(cC,Su.isAbove,-1),gC=d(cC,Su.isBelow,1),pC=d(lC,-1,mC),hC=d(lC,1,gC),vC=jo.isContentEditableFalse,yC=Za,bC=function(e,t,n,r){var o=e===Tu.Forwards,i=o?Lf:Ff;if(!r.collapsed){var a=yC(r);if(vC(a))return sg(e,t,a,e===Tu.Backwards,!0)}var u=Sa(r.startContainer),s=Ps(e,t.getBody(),r);if(i(s))return cg(t,s.getNode(!o));var c=Vl.normalizePosition(o,n(s));if(!c)return u?r:null;if(i(c))return sg(e,t,c.getNode(!o),o,!0);var l=n(c);return l&&i(l)&&Fs(c,l)?sg(e,t,l.getNode(!o),o,!0):u?fg(t,c.toRange(),!0):null},CC=function(e,t,n,r){var o,i,a,u,s,c,l,f,d;if(d=yC(r),o=Ps(e,t.getBody(),r),i=n(t.getBody(),sv(1),o),a=U(i,cv(1)),s=Ht.last(o.getClientRects()),(Lf(o)||zf(o))&&(d=o.getNode()),(Ff(o)||Uf(o))&&(d=o.getNode(!0)),!s)return null;if(c=s.left,(u=pv(a,c))&&vC(u.node))return l=Math.abs(c-u.left),f=Math.abs(c-u.right),sg(e,t,u.node,l<f,!0);if(d){var m=function(e,t,n,r){var o,i,a,u,s,c,l=Js(t),f=[],d=0,m=function(e){return Ht.last(e.getClientRects())};1===e?(o=l.next,i=Ja,a=Ga,u=_u.after(r)):(o=l.prev,i=Ga,a=Ja,u=_u.before(r)),c=m(u);do{if(u.isVisible()&&!a(s=m(u),c)){if(0<f.length&&i(s,Ht.last(f))&&d++,(s=Ka(s)).position=u,s.line=d,n(s))return f;f.push(s)}}while(u=o(u));return f}(e,t.getBody(),sv(1),d);if(u=pv(U(m,cv(1)),c))return fg(t,u.position.toRange(),!0);if(u=Ht.last(U(m,cv(0))))return fg(t,u.position.toRange(),!0)}},xC=function(e,t,n){var r,o,i,a,u=Js(e.getBody()),s=d(Ls,u.next),c=d(Ls,u.prev);if(n.collapsed&&e.settings.forced_root_block){if(!(r=e.dom.getParent(n.startContainer,"PRE")))return;(1===t?s(_u.fromRangeStart(n)):c(_u.fromRangeStart(n)))||(a=(i=e).dom.create(Nl(i)),(!fe.ie||11<=fe.ie)&&(a.innerHTML='<br data-mce-bogus="1">'),o=a,1===t?e.$(r).after(o):e.$(r).before(o),e.selection.select(o,!0),e.selection.collapse())}},wC=function(l,f){return function(){var e,t,n,r,o,i,a,u,s,c=(t=f,r=Js((e=l).getBody()),o=d(Ls,r.next),i=d(Ls,r.prev),a=t?Tu.Forwards:Tu.Backwards,u=t?o:i,s=e.selection.getRng(),(n=bC(a,e,u,s))?n:(n=xC(e,a,s))||null);return!!c&&(dg(l,c),!0)}},NC=function(u,s){return function(){var e,t,n,r,o,i,a=(r=(t=s)?1:-1,o=t?uv:av,i=(e=u).selection.getRng(),(n=CC(r,e,o,i))?n:(n=xC(e,r,i))||null);return!!a&&(dg(u,a),!0)}},EC=function(r,o){return function(){var t,e=o?_u.fromRangeEnd(r.selection.getRng()):_u.fromRangeStart(r.selection.getRng()),n=o?gC(r.getBody(),e):mC(r.getBody(),e);return(o?ee(n.positions):Z(n.positions)).filter((t=o,function(e){return t?Ff(e):Lf(e)})).fold(q(!1),function(e){return r.selection.setRng(e.toRange()),!0})}},SC=function(e,t,n,r,o){var i,a,u,s,c=Qi(ar.fromDom(n),"td,th,caption").map(function(e){return e.dom()}),l=U((i=e,G(c,function(e){var t,n,r=(t=Ka(e.getBoundingClientRect()),n=-1,{left:t.left-n,top:t.top-n,right:t.right+2*n,bottom:t.bottom+2*n,width:t.width+n,height:t.height+n});return[{x:r.left,y:i(r),cell:e},{x:r.right,y:i(r),cell:e}]})),function(e){return t(e,o)});return(a=l,u=r,s=o,j(a,function(e,r){return e.fold(function(){return _.some(r)},function(e){var t=Math.sqrt(Math.abs(e.x-u)+Math.abs(e.y-s)),n=Math.sqrt(Math.abs(r.x-u)+Math.abs(r.y-s));return _.some(n<t?r:e)})},_.none())).map(function(e){return e.cell})},TC=d(SC,function(e){return e.bottom},function(e,t){return e.y<t}),kC=d(SC,function(e){return e.top},function(e,t){return e.y>t}),_C=function(t,n){return Z(n.getClientRects()).bind(function(e){return TC(t,e.left,e.top)}).bind(function(e){return dC((t=e,sc.lastPositionIn(t).map(function(e){return mC(t,e).positions.concat(e)}).getOr([])),n);var t})},AC=function(t,n){return ee(n.getClientRects()).bind(function(e){return kC(t,e.left,e.top)}).bind(function(e){return dC((t=e,sc.firstPositionIn(t).map(function(e){return[e].concat(gC(t,e).positions)}).getOr([])),n);var t})},RC=function(e,t,n){var r,o,i,a,u=e(t,n);return(a=u).breakType===Tb.Wrap&&0===a.positions.length||!jo.isBr(n.getNode())&&(i=u).breakType===Tb.Br&&1===i.positions.length?(r=e,o=t,!u.breakAt.map(function(e){return r(o,e).breakAt.isSome()}).getOr(!1)):u.breakAt.isNone()},DC=d(RC,mC),OC=d(RC,gC),BC=function(e,t,n,r){var o,i,a,u,s=e.selection.getRng(),c=t?1:-1;if(ms()&&(o=t,i=s,a=n,u=_u.fromRangeStart(i),sc.positionIn(!o,a).map(function(e){return e.isEqual(u)}).getOr(!1))){var l=sg(c,e,n,!t,!0);return dg(e,l),!0}return!1},PC=function(e,t){var n=t.getNode(e);return jo.isElement(n)&&"TABLE"===n.nodeName?_.some(n):_.none()},IC=function(u,s,c){var e=PC(!!s,c),t=!1===s;e.fold(function(){return dg(u,c.toRange())},function(a){return sc.positionIn(t,u.getBody()).filter(function(e){return e.isEqual(c)}).fold(function(){return dg(u,c.toRange())},function(e){return n=s,o=a,t=c,void((i=Nl(r=u))?r.undoManager.transact(function(){var e=ar.fromTag(i);Nr(e,El(r)),Fi(e,ar.fromTag("br")),n?Ii(ar.fromDom(o),e):Pi(ar.fromDom(o),e);var t=r.dom.createRng();t.setStart(e.dom(),0),t.setEnd(e.dom(),0),dg(r,t)}):dg(r,t.toRange()));var n,r,o,t,i})})},LC=function(e,t,n,r){var o,i,a,u,s,c,l=e.selection.getRng(),f=_u.fromRangeStart(l),d=e.getBody();if(!t&&DC(r,f)){var m=(u=d,_C(s=n,c=f).orThunk(function(){return Z(c.getClientRects()).bind(function(e){return fC(pC(u,_u.before(s)),e.left)})}).getOr(_u.before(s)));return IC(e,t,m),!0}return!(!t||!OC(r,f))&&(o=d,m=AC(i=n,a=f).orThunk(function(){return Z(a.getClientRects()).bind(function(e){return fC(hC(o,_u.after(i)),e.left)})}).getOr(_u.after(i)),IC(e,t,m),!0)},FC=function(t,n){return function(){return _.from(t.dom.getParent(t.selection.getNode(),"td,th")).bind(function(e){return _.from(t.dom.getParent(e,"table")).map(function(e){return BC(t,n,e)})}).getOr(!1)}},MC=function(n,r){return function(){return _.from(n.dom.getParent(n.selection.getNode(),"td,th")).bind(function(t){return _.from(n.dom.getParent(t,"table")).map(function(e){return LC(n,r,e,t)})}).getOr(!1)}},zC=function(e){return F(["figcaption"],lr(e))},UC=function(e){var t=V.document.createRange();return t.setStartBefore(e.dom()),t.setEndBefore(e.dom()),t},jC=function(e,t,n){n?Fi(e,t):Li(e,t)},VC=function(e,t,n,r){return""===t?(l=e,f=r,d=ar.fromTag("br"),jC(l,d,f),UC(d)):(o=e,i=r,a=t,u=n,s=ar.fromTag(a),c=ar.fromTag("br"),Nr(s,u),Fi(s,c),jC(o,s,i),UC(c));var o,i,a,u,s,c,l,f,d},HC=function(e,t,n){return t?(o=e.dom(),gC(o,n).breakAt.isNone()):(r=e.dom(),mC(r,n).breakAt.isNone());var r,o},qC=function(t,n){var e,r,o,i=ar.fromDom(t.getBody()),a=_u.fromRangeStart(t.selection.getRng()),u=Nl(t),s=El(t);return(e=a,r=i,o=d(Mr,r),na(ar.fromDom(e.container()),Co,o).filter(zC)).exists(function(){if(HC(i,n,a)){var e=VC(i,u,s,n);return t.selection.setRng(e),!0}return!1})},$C=function(e,t){return function(){return!!e.selection.isCollapsed()&&qC(e,t)}},WC=function(e,r){return G(W(e,function(e){return Zy({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:o},e)}),function(e){return t=e,(n=r).keyCode===t.keyCode&&n.shiftKey===t.shiftKey&&n.altKey===t.altKey&&n.ctrlKey===t.ctrlKey&&n.metaKey===t.metaKey?[e]:[];var t,n})},KC=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,r)}},XC=function(e,t){return X(WC(e,t),function(e){return e.action()})},YC=function(i,a){i.on("keydown",function(e){var t,n,r,o;!1===e.isDefaultPrevented()&&(t=i,n=a,r=e,o=or.detect().os,XC([{keyCode:rv.RIGHT,action:wC(t,!0)},{keyCode:rv.LEFT,action:wC(t,!1)},{keyCode:rv.UP,action:NC(t,!1)},{keyCode:rv.DOWN,action:NC(t,!0)},{keyCode:rv.RIGHT,action:FC(t,!0)},{keyCode:rv.LEFT,action:FC(t,!1)},{keyCode:rv.UP,action:MC(t,!1)},{keyCode:rv.DOWN,action:MC(t,!0)},{keyCode:rv.RIGHT,action:Xd.move(t,n,!0)},{keyCode:rv.LEFT,action:Xd.move(t,n,!1)},{keyCode:rv.RIGHT,ctrlKey:!o.isOSX(),altKey:o.isOSX(),action:Xd.moveNextWord(t,n)},{keyCode:rv.LEFT,ctrlKey:!o.isOSX(),altKey:o.isOSX(),action:Xd.movePrevWord(t,n)},{keyCode:rv.UP,action:$C(t,!1)},{keyCode:rv.DOWN,action:$C(t,!0)}],r).each(function(e){r.preventDefault()}))})},GC=function(o,i){o.on("keydown",function(e){var t,n,r;!1===e.isDefaultPrevented()&&(t=o,n=i,r=e,XC([{keyCode:rv.BACKSPACE,action:KC(ad,t,!1)},{keyCode:rv.DELETE,action:KC(ad,t,!0)},{keyCode:rv.BACKSPACE,action:KC(gg,t,!1)},{keyCode:rv.DELETE,action:KC(gg,t,!0)},{keyCode:rv.BACKSPACE,action:KC(Qd,t,n,!1)},{keyCode:rv.DELETE,action:KC(Qd,t,n,!0)},{keyCode:rv.BACKSPACE,action:KC(Dm,t,!1)},{keyCode:rv.DELETE,action:KC(Dm,t,!0)},{keyCode:rv.BACKSPACE,action:KC(Cf,t,!1)},{keyCode:rv.DELETE,action:KC(Cf,t,!0)},{keyCode:rv.BACKSPACE,action:KC(hf,t,!1)},{keyCode:rv.DELETE,action:KC(hf,t,!0)},{keyCode:rv.BACKSPACE,action:KC(ng,t,!1)},{keyCode:rv.DELETE,action:KC(ng,t,!0)}],r).each(function(e){r.preventDefault()}))}),o.on("keyup",function(e){var t,n;!1===e.isDefaultPrevented()&&(t=o,n=e,XC([{keyCode:rv.BACKSPACE,action:KC(ud,t)},{keyCode:rv.DELETE,action:KC(ud,t)}],n))})},JC=function(e){return _.from(e.dom.getParent(e.selection.getStart(!0),e.dom.isBlock))},QC=function(e,t){var n,r,o,i=t,a=e.dom,u=e.schema.getMoveCaretBeforeOnEnterElements();if(t){if(/^(LI|DT|DD)$/.test(t.nodeName)){var s=function(e){for(;e;){if(1===e.nodeType||3===e.nodeType&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}}(t.firstChild);s&&/^(UL|OL|DL)$/.test(s.nodeName)&&t.insertBefore(a.doc.createTextNode("\xa0"),t.firstChild)}if(o=a.createRng(),t.normalize(),t.hasChildNodes()){for(n=new go(t,t);r=n.current();){if(jo.isText(r)){o.setStart(r,0),o.setEnd(r,0);break}if(u[r.nodeName.toLowerCase()]){o.setStartBefore(r),o.setEndBefore(r);break}i=r,r=n.next()}r||(o.setStart(i,0),o.setEnd(i,0))}else jo.isBr(t)?t.nextSibling&&a.isBlock(t.nextSibling)?(o.setStartBefore(t),o.setEndBefore(t)):(o.setStartAfter(t),o.setEndAfter(t)):(o.setStart(t,0),o.setEnd(t,0));e.selection.setRng(o),a.remove(void 0),e.selection.scrollIntoView(t)}},ZC=function(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},ex=JC,tx=function(e){return JC(e).fold(q(""),function(e){return e.nodeName.toUpperCase()})},nx=function(e){return JC(e).filter(function(e){return So(ar.fromDom(e))}).isSome()},rx=function(e,t){return e&&e.parentNode&&e.parentNode.nodeName===t},ox=function(e){return e&&/^(OL|UL|LI)$/.test(e.nodeName)},ix=function(e){var t=e.parentNode;return/^(LI|DT|DD)$/.test(t.nodeName)?t:e},ax=function(e,t,n){for(var r=e[n?"firstChild":"lastChild"];r&&!jo.isElement(r);)r=r[n?"nextSibling":"previousSibling"];return r===t},ux=function(e,t,n,r,o){var i=e.dom,a=e.selection.getRng();if(n!==e.getBody()){var u;ox(u=n)&&ox(u.parentNode)&&(o="LI");var s,c,l=o?t(o):i.create("BR");if(ax(n,r,!0)&&ax(n,r,!1))rx(n,"LI")?i.insertAfter(l,ix(n)):i.replace(l,n);else if(ax(n,r,!0))rx(n,"LI")?(i.insertAfter(l,ix(n)),l.appendChild(i.doc.createTextNode(" ")),l.appendChild(n)):n.parentNode.insertBefore(l,n);else if(ax(n,r,!1))i.insertAfter(l,ix(n));else{n=ix(n);var f=a.cloneRange();f.setStartAfter(r),f.setEndAfter(n);var d=f.extractContents();"LI"===o&&(c="LI",(s=d).firstChild&&s.firstChild.nodeName===c)?(l=d.firstChild,i.insertAfter(d,n)):(i.insertAfter(d,n),i.insertAfter(l,n))}i.remove(r),QC(e,l)}},sx=function(e){e.innerHTML='<br data-mce-bogus="1">'},cx=function(e,t){return e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t},lx=function(e,t){return t&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&"true"!==e.getContentEditable(t)},fx=function(e,t,n){return!1===jo.isText(t)?n:e?1===n&&t.data.charAt(n-1)===xa?0:n:n===t.data.length-1&&t.data.charAt(n)===xa?t.data.length:n},dx=function(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},mx=function(o,i,e){_.from(e.style).map(o.dom.parseStyle).each(function(e){var t=function(e){var t={},n=e.dom();if(Cr(n))for(var r=0;r<n.style.length;r++){var o=n.style.item(r);t[o]=n.style[o]}return t}(ar.fromDom(i)),n=ma(ma({},t),e);o.dom.setStyles(i,n)});var t=_.from(e["class"]).map(function(e){return e.split(/\s+/)}),n=_.from(i.className).map(function(e){return U(e.split(/\s+/),function(e){return""!==e})});ru(t,n,function(t,e){var n=U(e,function(e){return!F(t,e)}),r=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}(t,n);o.dom.setAttrib(i,"class",r.join(" "))});var r=["style","class"],a=yr(e,function(e,t){return!F(r,t)}).t;o.dom.setAttribs(i,a)},gx=function(e,t){var n=Nl(e);if(n&&n.toLowerCase()===t.tagName.toLowerCase()){var r=El(e);mx(e,t,r)}},px=function(a,e){var t,u,s,i,c,n,r,o,l,f,d,m,g,p,h,v,y,b,C,x=a.dom,w=a.schema,N=w.getNonEmptyElements(),E=a.selection.getRng(),S=function(e){var t,n,r,o=s,i=w.getTextInlineElements();if(r=t=e||"TABLE"===f||"HR"===f?x.create(e||m):c.cloneNode(!1),!1===kl(a))x.setAttrib(t,"style",null),x.setAttrib(t,"class",null);else do{if(i[o.nodeName]){if(Ju(o)||yc(o))continue;n=o.cloneNode(!1),x.setAttrib(n,"id",""),t.hasChildNodes()?n.appendChild(t.firstChild):r=n,t.appendChild(n)}}while((o=o.parentNode)&&o!==u);return gx(a,t),sx(r),t},T=function(e){var t,n,r,o;if(o=fx(e,s,i),jo.isText(s)&&(e?0<o:o<s.nodeValue.length))return!1;if(s.parentNode===c&&g&&!e)return!0;if(e&&jo.isElement(s)&&s===c.firstChild)return!0;if(cx(s,"TABLE")||cx(s,"HR"))return g&&!e||!g&&e;for(t=new go(s,c),jo.isText(s)&&(e&&0===o?t.prev():e||o!==s.nodeValue.length||t.next());n=t.current();){if(jo.isElement(n)){if(!n.getAttribute("data-mce-bogus")&&(r=n.nodeName.toLowerCase(),N[r]&&"br"!==r))return!1}else if(jo.isText(n)&&!/^[ \t\r\n]*$/.test(n.nodeValue))return!1;e?t.prev():t.next()}return!0},k=function(){r=/^(H[1-6]|PRE|FIGURE)$/.test(f)&&"HGROUP"!==d?S(m):S(),_l(a)&&lx(x,l)&&x.isEmpty(c)?r=x.split(l,c):x.insertAfter(r,c),QC(a,r)};Dg(x,E).each(function(e){E.setStart(e.startContainer,e.startOffset),E.setEnd(e.endContainer,e.endOffset)}),s=E.startContainer,i=E.startOffset,m=Nl(a),n=e.shiftKey,jo.isElement(s)&&s.hasChildNodes()&&(g=i>s.childNodes.length-1,s=s.childNodes[Math.min(i,s.childNodes.length-1)]||s,i=g&&jo.isText(s)?s.nodeValue.length:0),(u=dx(x,s))&&((m&&!n||!m&&n)&&(s=function(e,t,n,r,o){var i,a,u,s,c,l,f,d=t||"P",m=e.dom,g=dx(m,r);if(!(a=m.getParent(r,m.isBlock))||!lx(m,a)){if(l=(a=a||g)===e.getBody()||(f=a)&&/^(TD|TH|CAPTION)$/.test(f.nodeName)?a.nodeName.toLowerCase():a.parentNode.nodeName.toLowerCase(),!a.hasChildNodes())return i=m.create(d),gx(e,i),a.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;for(s=r;s.parentNode!==a;)s=s.parentNode;for(;s&&!m.isBlock(s);)s=(u=s).previousSibling;if(u&&e.schema.isValidChild(l,d.toLowerCase())){for(i=m.create(d),gx(e,i),u.parentNode.insertBefore(i,u),s=u;s&&!m.isBlock(s);)c=s.nextSibling,i.appendChild(s),s=c;n.setStart(r,o),n.setEnd(r,o)}}return r}(a,m,E,s,i)),c=x.getParent(s,x.isBlock),l=c?x.getParent(c.parentNode,x.isBlock):null,f=c?c.nodeName.toUpperCase():"","LI"!==(d=l?l.nodeName.toUpperCase():"")||e.ctrlKey||(l=(c=l).parentNode,f=d),/^(LI|DT|DD)$/.test(f)&&x.isEmpty(c)?ux(a,S,l,c,m):m&&c===a.getBody()||(m=m||"P",Sa(c)?(r=Pa(c),x.isEmpty(c)&&sx(c),gx(a,r),QC(a,r)):T()?k():T(!0)?(r=c.parentNode.insertBefore(S(),c),QC(a,cx(c,"HR")?r:c)):((t=(b=E,C=b.cloneRange(),C.setStart(b.startContainer,fx(!0,b.startContainer,b.startOffset)),C.setEnd(b.endContainer,fx(!1,b.endContainer,b.endOffset)),C).cloneRange()).setEndAfter(c),o=t.extractContents(),y=o,z(Ji(ar.fromDom(y),mr),function(e){var t=e.dom();t.nodeValue=wa(t.nodeValue)}),function(e){for(;jo.isText(e)&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;);}(o),r=o.firstChild,x.insertAfter(o,c),function(e,t,n){var r,o=n,i=[];if(o){for(;o=o.firstChild;){if(e.isBlock(o))return;jo.isElement(o)&&!t[o.nodeName.toLowerCase()]&&i.push(o)}for(r=i.length;r--;)!(o=i[r]).hasChildNodes()||o.firstChild===o.lastChild&&""===o.firstChild.nodeValue?e.remove(o):(a=e,(u=o)&&"A"===u.nodeName&&a.isEmpty(u)&&e.remove(o));var a,u}}(x,N,r),p=x,(h=c).normalize(),(v=h.lastChild)&&!/^(left|right)$/gi.test(p.getStyle(v,"float",!0))||p.add(h,"br"),x.isEmpty(c)&&sx(c),r.normalize(),x.isEmpty(r)?(x.remove(r),k()):(gx(a,r),QC(a,r))),x.setAttrib(r,"id",""),a.fire("NewBlock",{newBlock:r})))},hx=function(e,t){return ex(e).filter(function(e){return 0<t.length&&Lr(ar.fromDom(e),t)}).isSome()},vx=function(e){return hx(e,Sl(e))},yx=function(e){return hx(e,Tl(e))},bx=xf([{br:[]},{block:[]},{none:[]}]),Cx=function(e,t){return yx(e)},xx=function(n){return function(e,t){return""===Nl(e)===n}},wx=function(n){return function(e,t){return nx(e)===n}},Nx=function(n,r){return function(e,t){return tx(e)===n.toUpperCase()===r}},Ex=function(e){return Nx("pre",e)},Sx=function(n){return function(e,t){return wl(e)===n}},Tx=function(e,t){return vx(e)},kx=function(e,t){return t},_x=function(e){var t=Nl(e),n=ZC(e.dom,e.selection.getStart());return n&&e.schema.isValidChild(n.nodeName,t||"P")},Ax=function(e,t){return function(n,r){return j(e,function(e,t){return e&&t(n,r)},!0)?_.some(t):_.none()}},Rx=function(e,t){return yd([Ax([Cx],bx.none()),Ax([Nx("summary",!0)],bx.br()),Ax([Ex(!0),Sx(!1),kx],bx.br()),Ax([Ex(!0),Sx(!1)],bx.block()),Ax([Ex(!0),Sx(!0),kx],bx.block()),Ax([Ex(!0),Sx(!0)],bx.br()),Ax([wx(!0),kx],bx.br()),Ax([wx(!0)],bx.block()),Ax([xx(!0),kx,_x],bx.block()),Ax([xx(!0)],bx.br()),Ax([Tx],bx.br()),Ax([xx(!1),kx],bx.br()),Ax([_x],bx.block())],[e,t.shiftKey]).getOr(bx.none())},Dx=function(e,t){Rx(e,t).fold(function(){jg(e,t)},function(){px(e,t)},o)},Ox=function(o){o.on("keydown",function(e){var t,n,r;e.keyCode===rv.ENTER&&(t=o,(n=e).isDefaultPrevented()||(n.preventDefault(),(r=t.undoManager).typing&&(r.typing=!1,r.add()),t.undoManager.transact(function(){!1===t.selection.isCollapsed()&&t.execCommand("Delete"),Dx(t,n)})))})},Bx=function(n,r){var e=r.container(),t=r.offset();return jo.isText(e)?(e.insertData(t,n),_.some(Su(e,t+n.length))):Is(r).map(function(e){var t=ar.fromText(n);return r.isAtEnd()?Ii(e,t):Pi(e,t),Su(t.dom(),n.length)})},Px=d(Bx,"\xa0"),Ix=d(Bx," "),Lx=function(e,t,n){return sc.navigateIgnore(e,t,n,Pf)},Fx=function(e,t){return X(uf(ar.fromDom(t.container()),e),Co)},Mx=function(e,n,r){return Lx(e,n.dom(),r).forall(function(t){return Fx(n,r).fold(function(){return!1===Ts(t,r,n.dom())},function(e){return!1===Ts(t,r,n.dom())&&zr(e,ar.fromDom(t.container()))})})},zx=function(t,n,r){return Fx(n,r).fold(function(){return Lx(t,n.dom(),r).forall(function(e){return!1===Ts(e,r,n.dom())})},function(e){return Lx(t,e.dom(),r).isNone()})},Ux=d(zx,!1),jx=d(zx,!0),Vx=d(Mx,!1),Hx=d(Mx,!0),qx=function(e){return Su.isTextPosition(e)&&!e.isAtStart()&&!e.isAtEnd()},$x=function(e,t){var n=U(uf(ar.fromDom(t.container()),e),Co);return Z(n).getOr(e)},Wx=function(e,t){return qx(t)?Bf(t):Bf(t)||sc.prevPosition($x(e,t).dom(),t).exists(Bf)},Kx=function(e,t){return qx(t)?Of(t):Of(t)||sc.nextPosition($x(e,t).dom(),t).exists(Of)},Xx=function(e){return Is(e).bind(function(e){return na(e,dr)}).exists(function(e){return t=kr(e,"white-space"),F(["pre","pre-wrap"],t);var t})},Yx=function(e,t){return o=e,i=t,sc.prevPosition(o.dom(),i).isNone()||(n=e,r=t,sc.nextPosition(n.dom(),r).isNone())||Ux(e,t)||jx(e,t)||Sf(e,t)||Ef(e,t);var n,r,o,i},Gx=function(e,t){var n,r,o,i=(r=(n=t).container(),o=n.offset(),jo.isText(r)&&o<r.data.length?Su(r,o+1):n);return!Xx(i)&&(jx(e,i)||Hx(e,i)||Ef(e,i)||Kx(e,i))},Jx=function(e,t){return n=e,!Xx(r=t)&&(Ux(n,r)||Vx(n,r)||Sf(n,r)||Wx(n,r))||Gx(e,t);var n,r},Qx=function(e,t){return _f(e.charAt(t))},Zx=function(e){var t=e.container();return jo.isText(t)&&Yn(t.data,"\xa0")},ew=function(e){var n,t=e.data,r=(n=t.split(""),W(n,function(e,t){return _f(e)&&0<t&&t<n.length-1&&Rf(n[t-1])&&Rf(n[t+1])?" ":e}).join(""));return r!==t&&(e.data=r,!0)},tw=function(l,e){return _.some(e).filter(Zx).bind(function(e){var t,n,r,o,i,a,u,s,c=e.container();return i=l,u=(a=c).data,s=Su(a,0),Qx(u,0)&&!Jx(i,s)&&(a.data=" "+u.slice(1),1)||ew(c)||(t=l,r=(n=c).data,o=Su(n,r.length-1),Qx(r,r.length-1)&&!Jx(t,o)&&(n.data=r.slice(0,-1)+" ",1))?_.some(e):_.none()})},nw=function(t){var e=ar.fromDom(t.getBody());t.selection.isCollapsed()&&tw(e,Su.fromRangeStart(t.selection.getRng())).each(function(e){t.selection.setRng(e.toRange())})},rw=function(r,o){return function(e){return t=r,!Xx(n=e)&&(Yx(t,n)||Wx(t,n)||Kx(t,n))?Px(o):Ix(o);var t,n}},ow=function(e){var t,n,r=_u.fromRangeStart(e.selection.getRng()),o=ar.fromDom(e.getBody());if(e.selection.isCollapsed()){var i=d(Vl.isInlineTarget,e),a=_u.fromRangeStart(e.selection.getRng());return Ld(i,e.getBody(),a).bind((n=o,function(e){return e.fold(function(e){return sc.prevPosition(n.dom(),_u.before(e))},function(e){return sc.firstPositionIn(e)},function(e){return sc.lastPositionIn(e)},function(e){return sc.nextPosition(n.dom(),_u.after(e))})})).bind(rw(o,r)).exists((t=e,function(e){return t.selection.setRng(e.toRange()),t.nodeChanged(),!0}))}return!1},iw=function(r){r.on("keydown",function(e){var t,n;!1===e.isDefaultPrevented()&&(t=r,n=e,XC([{keyCode:rv.SPACEBAR,action:KC(ow,t)}],n).each(function(e){n.preventDefault()}))})},aw=function(e,t){var n;t.hasAttribute("data-mce-caret")&&(Pa(t),(n=e).selection.setRng(n.selection.getRng()),e.selection.scrollIntoView(t))},uw=function(e,t){var n,r=(n=e,oa(ar.fromDom(n.getBody()),"*[data-mce-caret]").fold(q(null),function(e){return e.dom()}));if(r)return"compositionstart"===t.type?(t.preventDefault(),t.stopPropagation(),void aw(e,r)):void(_a(r)&&(aw(e,r),e.undoManager.add()))},sw=function(e){e.on("keyup compositionstart",d(uw,e))},cw=or.detect().browser,lw=function(t){var e,n;e=t,n=Vi(function(){e.composing||nw(e)},0),cw.isIE()&&(e.on("keypress",function(e){n.throttle()}),e.on("remove",function(e){n.cancel()})),t.on("input",function(e){!1===e.isComposing&&nw(t)})},fw=function(r){r.on("keydown",function(e){var t,n;!1===e.isDefaultPrevented()&&(t=r,n=e,XC([{keyCode:rv.END,action:EC(t,!0)},{keyCode:rv.HOME,action:EC(t,!1)}],n).each(function(e){n.preventDefault()}))})},dw=function(e){var t=Xd.setupSelectedState(e);sw(e),YC(e,t),GC(e,t),Ox(e),iw(e),lw(e),fw(e)};function mw(u){var s,n,r,o=Xt.each,c=rv.BACKSPACE,l=rv.DELETE,f=u.dom,d=u.selection,e=u.settings,t=u.parser,i=fe.gecko,a=fe.ie,m=fe.webkit,g="data:text/mce-internal,",p=a?"Text":"URL",h=function(e,t){try{u.getDoc().execCommand(e,!1,t)}catch(n){}},v=function(e){return e.isDefaultPrevented()},y=function(){u.shortcuts.add("meta+a",null,"SelectAll")},b=function(){u.on("keydown",function(e){if(!v(e)&&e.keyCode===c&&d.isCollapsed()&&0===d.getRng().startOffset){var t=d.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})},C=function(){u.inline||(u.contentStyles.push("body {min-height: 150px}"),u.on("click",function(e){var t;if("HTML"===e.target.nodeName){if(11<fe.ie)return void u.getBody().focus();t=u.selection.getRng(),u.getBody().focus(),u.selection.setRng(t),u.selection.normalize(),u.nodeChanged()}}))};return u.on("keydown",function(e){var t,n,r,o,i;if(!v(e)&&e.keyCode===rv.BACKSPACE&&(n=(t=d.getRng()).startContainer,r=t.startOffset,o=f.getRoot(),i=n,t.collapsed&&0===r)){for(;i&&i.parentNode&&i.parentNode.firstChild===i&&i.parentNode!==o;)i=i.parentNode;"BLOCKQUOTE"===i.tagName&&(u.formatter.toggle("blockquote",null,i),(t=f.createRng()).setStart(n,0),t.setEnd(n,0),d.setRng(t))}}),s=function(e){var t=f.create("body"),n=e.cloneContents();return t.appendChild(n),d.serializer.serialize(t,{format:"html"})},u.on("keydown",function(e){var t,n,r,o,i,a=e.keyCode;if(!v(e)&&(a===l||a===c)){if(t=u.selection.isCollapsed(),n=u.getBody(),t&&!f.isEmpty(n))return;if(!t&&(r=u.selection.getRng(),o=s(r),(i=f.createRng()).selectNode(u.getBody()),o!==s(i)))return;e.preventDefault(),u.setContent(""),n.firstChild&&f.isBlock(n.firstChild)?u.selection.setCursorLocation(n.firstChild,0):u.selection.setCursorLocation(n,0),u.nodeChanged()}}),fe.windowsPhone||u.on("keyup focusin mouseup",function(e){rv.modifierPressed(e)||d.normalize()},!0),m&&(u.settings.content_editable||f.bind(u.getDoc(),"mousedown mouseup",function(e){var t;if(e.target===u.getDoc().documentElement)if(t=d.getRng(),u.getBody().focus(),"mousedown"===e.type){if(ka(t.startContainer))return;d.placeCaretAt(e.clientX,e.clientY)}else d.setRng(t)}),u.on("click",function(e){var t=e.target;/^(IMG|HR)$/.test(t.nodeName)&&"false"!==f.getContentEditableParent(t)&&(e.preventDefault(),u.selection.select(t),u.nodeChanged()),"A"===t.nodeName&&f.hasClass(t,"mce-item-anchor")&&(e.preventDefault(),d.select(t))}),e.forced_root_block&&u.on("init",function(){h("DefaultParagraphSeparator",e.forced_root_block)}),u.on("init",function(){u.dom.bind(u.getBody(),"submit",function(e){e.preventDefault()})}),b(),t.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"===e[t].attr("class")&&e[t].remove()}),fe.iOS?(u.inline||u.on("keydown",function(){V.document.activeElement===V.document.body&&u.getWin().focus()}),C(),u.on("click",function(e){var t=e.target;do{if("A"===t.tagName)return void e.preventDefault()}while(t=t.parentNode)}),u.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")):y()),11<=fe.ie&&(C(),b()),fe.ie&&(y(),h("AutoUrlDetect",!1),u.on("dragstart",function(e){var t,n,r;(t=e).dataTransfer&&(u.selection.isCollapsed()&&"IMG"===t.target.tagName&&d.select(t.target),0<(n=u.selection.getContent()).length&&(r=g+escape(u.id)+","+escape(n),t.dataTransfer.setData(p,r)))}),u.on("drop",function(e){if(!v(e)){var t=(i=e).dataTransfer&&(a=i.dataTransfer.getData(p))&&0<=a.indexOf(g)?(a=a.substr(g.length).split(","),{id:unescape(a[0]),html:unescape(a[1])}):null;if(t&&t.id!==u.id){e.preventDefault();var n=Bb(e.x,e.y,u.getDoc());d.setRng(n),r=t.html,o=!0,u.queryCommandSupported("mceInsertClipboardContent")?u.execCommand("mceInsertClipboardContent",!1,{content:r,internal:o}):u.execCommand("mceInsertContent",!1,r)}}var r,o,i,a})),i&&(u.on("keydown",function(e){if(!v(e)&&e.keyCode===c){if(!u.getBody().getElementsByTagName("hr").length)return;if(d.isCollapsed()&&0===d.getRng().startOffset){var t=d.getNode(),n=t.previousSibling;if("HR"===t.nodeName)return f.remove(t),void e.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(f.remove(n),e.preventDefault())}}}),V.Range.prototype.getClientRects||u.on("mousedown",function(e){if(!v(e)&&"HTML"===e.target.nodeName){var t=u.getBody();t.blur(),he.setEditorTimeout(u,function(){t.focus()})}}),n=function(){var e=f.getAttribs(d.getStart().cloneNode(!1));return function(){var t=d.getStart();t!==u.getBody()&&(f.setAttrib(t,"style",null),o(e,function(e){t.setAttributeNode(e.cloneNode(!0))}))}},r=function(){return!d.isCollapsed()&&f.getParent(d.getStart(),f.isBlock)!==f.getParent(d.getEnd(),f.isBlock)},u.on("keypress",function(e){var t;if(!v(e)&&(8===e.keyCode||46===e.keyCode)&&r())return t=n(),u.getDoc().execCommand("delete",!1,null),t(),e.preventDefault(),!1}),f.bind(u.getDoc(),"cut",function(e){var t;!v(e)&&r()&&(t=n(),he.setEditorTimeout(u,function(){t()}))}),e.readonly||u.on("BeforeExecCommand MouseDown",function(){h("StyleWithCSS",!1),h("enableInlineTableEditing",!1),e.object_resizing||h("enableObjectResizing",!1)}),u.on("SetContent ExecCommand",function(e){"setcontent"!==e.type&&"mceInsertLink"!==e.command||o(f.select("a"),function(e){var t=e.parentNode,n=f.getRoot();if(t.lastChild===e){for(;t&&!f.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}f.add(t,"br",{"data-mce-bogus":1})}})}),u.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"),fe.mac&&u.on("keydown",function(e){!rv.metaKeyPressed(e)||e.shiftKey||37!==e.keyCode&&39!==e.keyCode||(e.preventDefault(),u.selection.getSel().modify("move",37===e.keyCode?"backward":"forward","lineboundary"))}),b()),{refreshContentEditable:function(){},isHidden:function(){var e;return!i||u.removed?0:!(e=u.selection.getSel())||!e.rangeCount||0===e.rangeCount}}}var gw=function(e){return jo.isElement(e)&&No(ar.fromDom(e))},pw=function(t){t.on("click",function(e){3<=e.detail&&function(e){var t=e.selection.getRng(),n=Su.fromRangeStart(t),r=Su.fromRangeEnd(t);if(Su.isElementPosition(n)){var o=n.container();gw(o)&&sc.firstPositionIn(o).each(function(e){return t.setStart(e.container(),e.offset())})}Su.isElementPosition(r)&&(o=n.container(),gw(o)&&sc.lastPositionIn(o).each(function(e){return t.setEnd(e.container(),e.offset())})),e.selection.setRng(cl(t))}(t)})},hw=function(e){var t,n;(t=e).on("click",function(e){t.dom.getParent(e.target,"details")&&e.preventDefault()}),(n=e).parser.addNodeFilter("details",function(e){z(e,function(e){e.attr("data-mce-open",e.attr("open")),e.attr("open","open")})}),n.serializer.addNodeFilter("details",function(e){z(e,function(e){var t=e.attr("data-mce-open");e.attr("open",S(t)?t:null),e.attr("data-mce-open",null)})})},vw=Si.DOM,yw=function(e){var t;e.bindPendingEventDelegates(),e.initialized=!0,e.fire("init"),e.focus(!0),e.nodeChanged({initial:!0}),e.execCallback("init_instance_callback",e),(t=e).settings.auto_focus&&he.setEditorTimeout(t,function(){var e;(e=!0===t.settings.auto_focus?t:t.editorManager.get(t.settings.auto_focus)).destroyed||e.focus()},100)},bw=function(t,e){var n,r,u,o,i,a,s,c,l,f=t.settings,d=t.getElement(),m=t.getDoc();f.inline||(t.getElement().style.visibility=t.orgVisibility),e||f.content_editable||(m.open(),m.write(t.iframeHTML),m.close()),f.content_editable&&(t.on("remove",function(){var e=this.getBody();vw.removeClass(e,"mce-content-body"),vw.removeClass(e,"mce-edit-focus"),vw.setAttrib(e,"contentEditable",null)}),vw.addClass(d,"mce-content-body"),t.contentDocument=m=f.content_document||V.document,t.contentWindow=f.content_window||V.window,t.bodyElement=d,f.content_document=f.content_window=null,f.root_name=d.nodeName.toLowerCase()),(n=t.getBody()).disabled=!0,t.readonly=f.readonly,t.readonly||(t.inline&&"static"===vw.getStyle(n,"position",!0)&&(n.style.position="relative"),n.contentEditable=t.getParam("content_editable_state",!0)),n.disabled=!1,t.editorUpload=qh(t),t.schema=di(f),t.dom=Si(m,{keep_values:!0,url_converter:t.convertURL,url_converter_scope:t,hex_colors:f.force_hex_style_colors,class_filter:f.class_filter,update_styles:!0,root_element:t.inline?t.getBody():null,collect:f.content_editable,schema:t.schema,contentCssCors:zl(t),onSetAttrib:function(e){t.fire("SetAttrib",e)}}),t.parser=((o=bb((u=t).settings,u.schema)).addAttributeFilter("src,href,style,tabindex",function(e,t){for(var n,r,o,i=e.length,a=u.dom;i--;)if(r=(n=e[i]).attr(t),o="data-mce-"+t,!n.attributes.map[o]){if(0===r.indexOf("data:")||0===r.indexOf("blob:"))continue;"style"===t?((r=a.serializeStyle(a.parseStyle(r),n.name)).length||(r=null),n.attr(o,r),n.attr(t,r)):"tabindex"===t?(n.attr(o,r),n.attr(t,null)):n.attr(o,u.convertURL(r,t,n.name))}}),o.addNodeFilter("script",function(e){for(var t,n,r=e.length;r--;)0!==(n=(t=e[r]).attr("type")||"no/type").indexOf("mce-")&&t.attr("type","mce-"+n)}),o.addNodeFilter("#cdata",function(e){for(var t,n=e.length;n--;)(t=e[n]).type=8,t.name="#comment",t.value="[CDATA["+t.value+"]]"}),o.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t,n=e.length,r=u.schema.getNonEmptyElements();n--;)(t=e[n]).isEmpty(r)&&0===t.getAll("br").length&&(t.append(new sb("br",1)).shortEnded=!0)}),o),t.serializer=Eb(f,t),t.selection=uC(t.dom,t.getWin(),t.serializer,t),t.annotator=Hc(t),t.formatter=Gy(t),t.undoManager=ry(t),t._nodeChangeDispatcher=new ev(t),t._selectionOverrides=Bv(t),hw(t),pw(t),dw(t),Xh(t),t.fire("PreInit"),f.browser_spellcheck||f.gecko_spellcheck||(m.body.spellcheck=!1,vw.setAttrib(n,"spellcheck","false")),t.quirks=mw(t),t.fire("PostRender"),f.directionality&&(n.dir=f.directionality),f.nowrap&&(n.style.whiteSpace="nowrap"),f.protect&&t.on("BeforeSetContent",function(t){Xt.each(f.protect,function(e){t.content=t.content.replace(e,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})})}),t.on("SetContent",function(){t.addVisual(t.getBody())}),t.load({initial:!0,format:"html"}),t.startContent=t.getContent({format:"raw"}),t.on("compositionstart compositionend",function(e){t.composing="compositionstart"===e.type}),0<t.contentStyles.length&&(r="",Xt.each(t.contentStyles,function(e){r+=e+"\r\n"}),t.dom.addStyle(r)),(i=t,i.inline?vw.styleSheetLoader:i.dom.styleSheetLoader).loadAll(t.contentCSS,function(e){yw(t)},function(e){yw(t)}),f.content_style&&(a=t,s=f.content_style,c=ar.fromDom(a.getDoc().head),l=ar.fromTag("style"),wr(l,"type","text/css"),Fi(l,ar.fromText(s)),Fi(c,l))},Cw=Si.DOM,xw=function(e,t){var n,r,o,i,a,u,s,c=e.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),l=(n=e.id,r=c,o=t.height,i=hl(e),s=ar.fromTag("iframe"),Nr(s,i),Nr(s,{id:n+"_ifr",frameBorder:"0",allowTransparency:"true",title:r}),Tr(s,{width:"100%",height:(a=o,u="number"==typeof a?a+"px":a,u||""),display:"block"}),s).dom();l.onload=function(){l.onload=null,e.fire("load")};var f,d,m,g,p=function(e,t){if(V.document.domain!==V.window.location.hostname&&fe.ie&&fe.ie<12){var n=Hh.uuid("mce");e[n]=function(){bw(e)};var r='javascript:(function(){document.open();document.domain="'+V.document.domain+'";var ed = window.parent.tinymce.get("'+e.id+'");document.write(ed.iframeHTML);document.close();ed.'+n+"(true);})()";return Cw.setAttrib(t,"src",r),!0}return!1}(e,l);return e.contentAreaContainer=t.iframeContainer,e.iframeElement=l,e.iframeHTML=(g=vl(f=e)+"<html><head>",yl(f)!==f.documentBaseUrl&&(g+='<base href="'+f.documentBaseURI.getURI()+'" />'),g+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',d=bl(f),m=Cl(f),xl(f)&&(g+='<meta http-equiv="Content-Security-Policy" content="'+xl(f)+'" />'),g+='</head><body id="'+d+'" class="mce-content-body '+m+'" data-id="'+f.id+'"><br></body></html>'),Cw.add(t.iframeContainer,l),p},ww=function(e,t){var n=xw(e,t);t.editorContainer&&(Cw.get(t.editorContainer).style.display=e.orgDisplay,e.hidden=Cw.isHidden(t.editorContainer)),e.getElement().style.display="none",Cw.setAttrib(e.id,"aria-hidden","true"),n||bw(e)},Nw=Si.DOM,Ew=function(t,n,e){var r=_h.get(e),o=_h.urls[e]||t.documentBaseUrl.replace(/\/$/,"");if(e=Xt.trim(e),r&&-1===Xt.inArray(n,e)){if(Xt.each(_h.dependencies(e),function(e){Ew(t,n,e)}),t.plugins[e])return;try{var i=new r(t,o,t.$);(t.plugins[e]=i).init&&(i.init(t,o),n.push(e))}catch(iE){kh.pluginInitError(t,e,iE)}}},Sw=function(e){return e.replace(/^\-/,"")},Tw=function(e){return{editorContainer:e,iframeContainer:e}},kw=function(e){var t,n,r=e.getElement();return e.inline?Tw(null):(t=r,n=Nw.create("div"),Nw.insertAfter(n,t),Tw(n))},_w=function(e){var t,n,r,o,i,a,u,s,c,l,f,d=e.settings,m=e.getElement();return e.orgDisplay=m.style.display,S(d.theme)?(l=(o=e).settings,f=o.getElement(),i=l.width||Nw.getStyle(f,"width")||"100%",a=l.height||Nw.getStyle(f,"height")||f.offsetHeight,u=l.min_height||100,(s=/^[0-9\.]+(|px)$/i).test(""+i)&&(i=Math.max(parseInt(i,10),100)),s.test(""+a)&&(a=Math.max(parseInt(a,10),u)),c=o.theme.renderUI({targetNode:f,width:i,height:a,deltaWidth:l.delta_width,deltaHeight:l.delta_height}),l.content_editable||(a=(c.iframeHeight||a)+("number"==typeof a?c.deltaHeight||0:""))<u&&(a=u),c.height=a,c):D(d.theme)?(r=(t=e).getElement(),(n=t.settings.theme(t,r)).editorContainer.nodeType&&(n.editorContainer.id=n.editorContainer.id||t.id+"_parent"),n.iframeContainer&&n.iframeContainer.nodeType&&(n.iframeContainer.id=n.iframeContainer.id||t.id+"_iframecontainer"),n.height=n.iframeHeight?n.iframeHeight:r.offsetHeight,n):kw(e)},Aw=function(t){var e,n,r,o,i,a,u=t.settings,s=t.getElement();return t.rtl=u.rtl_ui||t.editorManager.i18n.rtl,t.editorManager.i18n.setCode(u.language),u.aria_label=u.aria_label||Nw.getAttrib(s,"aria-label",t.getLang("aria.rich_text_area")),t.fire("ScriptsLoaded"),o=(n=t).settings.theme,S(o)?(n.settings.theme=Sw(o),r=Ah.get(o),n.theme=new r(n,Ah.urls[o]),n.theme.init&&n.theme.init(n,Ah.urls[o]||n.documentBaseUrl.replace(/\/$/,""),n.$)):n.theme={},i=t,a=[],Xt.each(i.settings.plugins.split(/[ ,]/),function(e){Ew(i,a,Sw(e))}),e=_w(t),t.editorContainer=e.editorContainer?e.editorContainer:null,u.content_css&&Xt.each(Xt.explode(u.content_css),function(e){t.contentCSS.push(t.documentBaseURI.toAbsolute(e))}),u.content_editable?bw(t):ww(t,e)},Rw=Si.DOM,Dw=function(e){return"-"===e.charAt(0)},Ow=function(i,a){var u=Ri.ScriptLoader;!function(e,t,n,r){var o=t.settings,i=o.theme;if(S(i)){if(!Dw(i)&&!Ah.urls.hasOwnProperty(i)){var a=o.theme_url;a?Ah.load(i,t.documentBaseURI.toAbsolute(a)):Ah.load(i,"themes/"+i+"/theme"+n+".js")}e.loadQueue(function(){Ah.waitFor(i,r)})}else r()}(u,i,a,function(){var e,t,n,r,o;e=u,(n=(t=i).settings).language&&"en"!==n.language&&!n.language_url&&(n.language_url=t.editorManager.baseURL+"/langs/"+n.language+".js"),n.language_url&&!t.editorManager.i18n.data[n.language]&&e.add(n.language_url),r=i.settings,o=a,Xt.isArray(r.plugins)&&(r.plugins=r.plugins.join(" ")),Xt.each(r.external_plugins,function(e,t){_h.load(t,e),r.plugins+=" "+t}),Xt.each(r.plugins.split(/[ ,]/),function(e){if((e=Xt.trim(e))&&!_h.urls[e])if(Dw(e)){e=e.substr(1,e.length);var t=_h.dependencies(e);Xt.each(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"};e=_h.createUrl(t,e),_h.load(e.resource,e)})}else _h.load(e,{prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"})}),u.loadQueue(function(){i.removed||Aw(i)},i,function(e){kh.pluginLoadError(i,e[0]),i.removed||Aw(i)})})},Bw=function(t){var e=t.settings,n=t.id,r=function(){Rw.unbind(V.window,"ready",r),t.render()};if(Se.Event.domLoaded){if(t.getElement()&&fe.contentEditable){e.inline?t.inline=!0:(t.orgVisibility=t.getElement().style.visibility,t.getElement().style.visibility="hidden");var o=t.getElement().form||Rw.getParent(n,"form");o&&(t.formElement=o,e.hidden_input&&!/TEXTAREA|INPUT/i.test(t.getElement().nodeName)&&(Rw.insertAfter(Rw.create("input",{type:"hidden",name:n}),n),t.hasHiddenInput=!0),t.formEventDelegate=function(e){t.fire(e.type,e)},Rw.bind(o,"submit reset",t.formEventDelegate),t.on("reset",function(){t.setContent(t.startContent,{format:"raw"})}),!e.submit_patch||o.submit.nodeType||o.submit.length||o._mceOldSubmit||(o._mceOldSubmit=o.submit,o.submit=function(){return t.editorManager.triggerSave(),t.setDirty(!1),o._mceOldSubmit(o)})),t.windowManager=yh(t),t.notificationManager=vh(t),"xml"===e.encoding&&t.on("GetContent",function(e){e.save&&(e.content=Rw.encode(e.content))}),e.add_form_submit_trigger&&t.on("submit",function(){t.initialized&&t.save()}),e.add_unload_trigger&&(t._beforeUnload=function(){!t.initialized||t.destroyed||t.isHidden()||t.save({format:"raw",no_events:!0,set_dirty:!1})},t.editorManager.on("BeforeUnload",t._beforeUnload)),t.editorManager.add(t),Ow(t,t.suffix)}}else Rw.bind(V.window,"ready",r)},Pw=function(e,t,n){var r=e.sidebars?e.sidebars:[];r.push({name:t,settings:n}),e.sidebars=r},Iw=Xt.each,Lw=Xt.trim,Fw="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),Mw={ftp:21,http:80,https:443,mailto:25},zw=function(r,e){var t,n,o=this;if(r=Lw(r),t=(e=o.settings=e||{}).base_uri,/^([\w\-]+):([^\/]{2})/i.test(r)||/^\s*#/.test(r))o.source=r;else{var i=0===r.indexOf("//");0!==r.indexOf("/")||i||(r=(t&&t.protocol||"http")+"://mce_host"+r),/^[\w\-]*:?\/\//.test(r)||(n=e.base_uri?e.base_uri.path:new zw(V.document.location.href).directory,""==e.base_uri.protocol?r="//mce_host"+o.toAbsPath(n,r):(r=/([^#?]*)([#?]?.*)/.exec(r),r=(t&&t.protocol||"http")+"://mce_host"+o.toAbsPath(n,r[1])+r[2])),r=r.replace(/@@/g,"(mce_at)"),r=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(r),Iw(Fw,function(e,t){var n=r[t];n&&(n=n.replace(/\(mce_at\)/g,"@@")),o[e]=n}),t&&(o.protocol||(o.protocol=t.protocol),o.userInfo||(o.userInfo=t.userInfo),o.port||"mce_host"!==o.host||(o.port=t.port),o.host&&"mce_host"!==o.host||(o.host=t.host),o.source=""),i&&(o.protocol="")}};zw.prototype={setPath:function(e){e=/^(.*?)\/?(\w+)?$/.exec(e),this.path=e[0],this.directory=e[1],this.file=e[2],this.source="",this.getURI()},toRelative:function(e){var t;if("./"===e)return e;if("mce_host"!==(e=new zw(e,{base_uri:this})).host&&this.host!==e.host&&e.host||this.port!==e.port||this.protocol!==e.protocol&&""!==e.protocol)return e.getURI();var n=this.getURI(),r=e.getURI();return n===r||"/"===n.charAt(n.length-1)&&n.substr(0,n.length-1)===r?n:(t=this.toRelPath(this.path,e.path),e.query&&(t+="?"+e.query),e.anchor&&(t+="#"+e.anchor),t)},toAbsolute:function(e,t){return(e=new zw(e,{base_uri:this})).getURI(t&&this.isSameOrigin(e))},isSameOrigin:function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=Mw[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},toRelPath:function(e,t){var n,r,o,i=0,a="";if(e=(e=e.substring(0,e.lastIndexOf("/"))).split("/"),n=t.split("/"),e.length>=n.length)for(r=0,o=e.length;r<o;r++)if(r>=n.length||e[r]!==n[r]){i=r+1;break}if(e.length<n.length)for(r=0,o=n.length;r<o;r++)if(r>=e.length||e[r]!==n[r]){i=r+1;break}if(1===i)return t;for(r=0,o=e.length-(i-1);r<o;r++)a+="../";for(r=i-1,o=n.length;r<o;r++)a+=r!==i-1?"/"+n[r]:n[r];return a},toAbsPath:function(e,t){var n,r,o,i=0,a=[];for(r=/\/$/.test(t)?"/":"",e=e.split("/"),t=t.split("/"),Iw(e,function(e){e&&a.push(e)}),e=a,n=t.length-1,a=[];0<=n;n--)0!==t[n].length&&"."!==t[n]&&(".."!==t[n]?0<i?i--:a.push(t[n]):i++);return 0!==(o=(n=e.length-i)<=0?a.reverse().join("/"):e.slice(0,n).join("/")+"/"+a.reverse().join("/")).indexOf("/")&&(o="/"+o),r&&o.lastIndexOf("/")!==o.length-1&&(o+=r),o},getURI:function(e){var t,n=this;return n.source&&!e||(t="",e||(n.protocol?t+=n.protocol+"://":t+="//",n.userInfo&&(t+=n.userInfo+"@"),n.host&&(t+=n.host),n.port&&(t+=":"+n.port)),n.path&&(t+=n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),n.source=t),n.source}},zw.parseDataUri=function(e){var t,n;return e=decodeURIComponent(e).split(","),(n=/data:([^;]+)/.exec(e[0]))&&(t=n[1]),{type:t,data:e[1]}},zw.getDocumentBaseUrl=function(e){var t;return t=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?e.href:e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),t};var Uw=function(e,t,n){var r,o,i,a,u;if(t.format=t.format?t.format:"html",t.get=!0,t.getInner=!0,t.no_events||e.fire("BeforeGetContent",t),"raw"===t.format)r=Xt.trim(Uv.trimExternal(e.serializer,n.innerHTML));else if("text"===t.format)r=wa(n.innerText||n.textContent);else{if("tree"===t.format)return e.serializer.serialize(n,t);i=(o=e).serializer.serialize(n,t),a=Nl(o),u=new RegExp("^(<"+a+"[^>]*>(&nbsp;|&#160;|\\s|\xa0|<br \\/>|)<\\/"+a+">[\r\n]*|<br \\/>[\r\n]*)$"),r=i.replace(u,"")}return"text"===t.format||Ao(ar.fromDom(n))?t.content=r:t.content=Xt.trim(r),t.no_events||e.fire("GetContent",t),t.content},jw=function(e,t){t(e),e.firstChild&&jw(e.firstChild,t),e.next&&jw(e.next,t)},Vw=function(e,t,n){var r=function(e,n,t){var r={},o={},i=[];for(var a in t.firstChild&&jw(t.firstChild,function(t){z(e,function(e){e.name===t.name&&(r[e.name]?r[e.name].nodes.push(t):r[e.name]={filter:e,nodes:[t]})}),z(n,function(e){"string"==typeof t.attr(e.name)&&(o[e.name]?o[e.name].nodes.push(t):o[e.name]={filter:e,nodes:[t]})})}),r)r.hasOwnProperty(a)&&i.push(r[a]);for(var a in o)o.hasOwnProperty(a)&&i.push(o[a]);return i}(e,t,n);z(r,function(t){z(t.filter.callbacks,function(e){e(t.nodes,t.filter.name,{})})})},Hw=function(e){return e instanceof sb},qw=function(e,t){var r;e.dom.setHTML(e.getBody(),t),sh(r=e)&&sc.firstPositionIn(r.getBody()).each(function(e){var t=e.getNode(),n=jo.isTable(t)?sc.firstPositionIn(t).getOr(e):e;r.selection.setRng(n.toRange())})},$w=function(u,s,c){return void 0===c&&(c={}),c.format=c.format?c.format:"html",c.set=!0,c.content=Hw(s)?"":s,Hw(s)||c.no_events||(u.fire("BeforeSetContent",c),s=c.content),_.from(u.getBody()).fold(q(s),function(e){return Hw(s)?function(e,t,n,r){Vw(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),n);var o=al({validate:e.validate},e.schema).serialize(n);return r.content=Ao(ar.fromDom(t))?o:Xt.trim(o),qw(e,r.content),r.no_events||e.fire("SetContent",r),n}(u,e,s,c):(t=u,n=e,o=c,0===(r=s).length||/^\s+$/.test(r)?(a='<br data-mce-bogus="1">',"TABLE"===n.nodeName?r="<tr><td>"+a+"</td></tr>":/^(UL|OL)$/.test(n.nodeName)&&(r="<li>"+a+"</li>"),(i=Nl(t))&&t.schema.isValidChild(n.nodeName.toLowerCase(),i.toLowerCase())?(r=a,r=t.dom.createHTML(i,t.settings.forced_root_block_attrs,r)):r||(r='<br data-mce-bogus="1">'),qw(t,r),t.fire("SetContent",o)):("raw"!==o.format&&(r=al({validate:t.validate},t.schema).serialize(t.parser.parse(r,{isRootContent:!0,insert:!0}))),o.content=Ao(ar.fromDom(n))?r:Xt.trim(r),qw(t,o.content),o.no_events||t.fire("SetContent",o)),o.content);var t,n,r,o,i,a})},Ww=Si.DOM,Kw=function(e){return _.from(e).each(function(e){return e.destroy()})},Xw=function(e){if(!e.removed){var t=e._selectionOverrides,n=e.editorUpload,r=e.getBody(),o=e.getElement();r&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&o&&Ww.remove(o.nextSibling),Np(e),e.editorManager.remove(e),!e.inline&&r&&(i=e,Ww.setStyle(i.id,"display",i.orgDisplay)),Ep(e),Ww.remove(e.getContainer()),Kw(t),Kw(n),e.destroy()}var i},Yw=function(e,t){var n,r,o,i=e.selection,a=e.dom;e.destroyed||(t||e.removed?(t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),Kw(i),Kw(a)),(r=(n=e).formElement)&&(r._mceOldSubmit&&(r.submit=r._mceOldSubmit,r._mceOldSubmit=null),Ww.unbind(r,"submit reset",n.formEventDelegate)),(o=e).contentAreaContainer=o.formElement=o.container=o.editorContainer=null,o.bodyElement=o.contentDocument=o.contentWindow=null,o.iframeElement=o.targetElm=null,o.selection&&(o.selection=o.selection.win=o.selection.dom=o.selection.dom.doc=null),e.destroyed=!0):e.remove())},Gw=Si.DOM,Jw=Xt.extend,Qw=Xt.each,Zw=Xt.resolve,eN=fe.ie,tN=function(e,t,n){var r,o,i,a,u,s,c,l=this,f=l.documentBaseUrl=n.documentBaseURL,d=n.baseURI;r=l,o=e,i=f,a=n.defaultSettings,u=t,c={id:o,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:i,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"<!DOCTYPE html>",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,render_ui:!0,indentation:"40px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:(s=r).convertURL,url_converter_scope:s,ie7_compat:!0},t=$p(zp,c,a,u),l.settings=t,Bi.language=t.language||"en",Bi.languageLoad=t.language_load,Bi.baseURL=n.baseURL,l.id=e,l.setDirty(!1),l.plugins={},l.documentBaseURI=new zw(t.document_base_url,{base_uri:d}),l.baseURI=d,l.contentCSS=[],l.contentStyles=[],l.shortcuts=new Qp(l),l.loadedCSS={},l.editorCommands=new pp(l),l.suffix=n.suffix,l.editorManager=n,l.inline=t.inline,l.buttons={},l.menuItems={},t.cache_suffix&&(fe.cacheSuffix=t.cache_suffix.replace(/^[\?\&]+/,"")),!1===t.override_viewport&&(fe.overrideViewPort=!1),n.fire("SetupEditor",{editor:l}),l.execCallback("setup",l),l.$=gn.overrideDefaults(function(){return{context:l.inline?l.getBody():l.getDoc(),element:l.getBody()}})};Jw(tN.prototype={render:function(){Bw(this)},focus:function(e){uh(this,e)},hasFocus:function(){return sh(this)},execCallback:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r,o=this.settings[e];if(o)return this.callbackLookup&&(r=this.callbackLookup[e])&&(o=r.func,r=r.scope),"string"==typeof o&&(r=(r=o.replace(/\.\w+$/,""))?Zw(r):0,o=Zw(o),this.callbackLookup=this.callbackLookup||{},this.callbackLookup[e]={func:o,scope:r}),o.apply(r||this,Array.prototype.slice.call(arguments,1))},translate:function(e){if(e&&Xt.is(e,"string")){var n=this.settings.language||"en",r=this.editorManager.i18n;e=r.data[n+"."+e]||e.replace(/\{\#([^\}]+)\}/g,function(e,t){return r.data[n+"."+t]||"{#"+t+"}"})}return this.editorManager.translate(e)},getLang:function(e,t){return this.editorManager.i18n.data[(this.settings.language||"en")+"."+e]||(t!==undefined?t:"{#"+e+"}")},getParam:function(e,t,n){return Kp(this,e,t,n)},nodeChanged:function(e){this._nodeChangeDispatcher.nodeChanged(e)},addButton:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),t.stateSelector&&"undefined"==typeof t.active&&(t.active=!1),t.text||t.icon||(t.icon=e),t.tooltip=t.tooltip||t.title,n.buttons[e]=t},addSidebar:function(e,t){return Pw(this,e,t)},addMenuItem:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.menuItems[e]=t},addContextToolbar:function(e,t){var n,r=this;r.contextToolbars=r.contextToolbars||[],"string"==typeof e&&(n=e,e=function(e){return r.dom.is(e,n)}),r.contextToolbars.push({id:Hh.uuid("mcet"),predicate:e,items:t})},addCommand:function(e,t,n){this.editorCommands.addCommand(e,t,n)},addQueryStateHandler:function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},addQueryValueHandler:function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},addShortcut:function(e,t,n,r){this.shortcuts.add(e,t,n,r)},execCommand:function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},queryCommandState:function(e){return this.editorCommands.queryCommandState(e)},queryCommandValue:function(e){return this.editorCommands.queryCommandValue(e)},queryCommandSupported:function(e){return this.editorCommands.queryCommandSupported(e)},show:function(){this.hidden&&(this.hidden=!1,this.inline?this.getBody().contentEditable=!0:(Gw.show(this.getContainer()),Gw.hide(this.id)),this.load(),this.fire("show"))},hide:function(){var e=this,t=e.getDoc();e.hidden||(eN&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable=!1,e===e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(Gw.hide(e.getContainer()),Gw.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},isHidden:function(){return!!this.hidden},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var t,n=this.getElement();return this.removed?"":n?((e=e||{}).load=!0,t=this.setContent(n.value!==undefined?n.value:n.innerHTML,e),e.element=n,e.no_events||this.fire("LoadContent",e),e.element=n=null,t):void 0},save:function(e){var t,n,r=this,o=r.getElement();if(o&&r.initialized&&!r.removed)return(e=e||{}).save=!0,e.element=o,e.content=r.getContent(e),e.no_events||r.fire("SaveContent",e),"raw"===e.format&&r.fire("RawSaveContent",e),t=e.content,/TEXTAREA|INPUT/i.test(o.nodeName)?o.value=t:(!e.is_removing&&r.inline||(o.innerHTML=t),(n=Gw.getParent(r.id,"form"))&&Qw(n.elements,function(e){if(e.name===r.id)return e.value=t,!1})),e.element=o=null,!1!==e.set_dirty&&r.setDirty(!1),t},setContent:function(e,t){return $w(this,e,t)},getContent:function(e){return t=this,void 0===(n=e)&&(n={}),_.from(t.getBody()).fold(q("tree"===n.format?new sb("body",11):""),function(e){return Uw(t,n,e)});var t,n},insertContent:function(e,t){t&&(e=Jw({content:e},t)),this.execCommand("mceInsertContent",!1,e)},isDirty:function(){return!this.isNotDirty},setDirty:function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!==t&&this.fire("dirty")},setMode:function(e){var t,n;(n=e)!==Dp(t=this)&&(t.initialized?Rp(t,"readonly"===n):t.on("init",function(){Rp(t,"readonly"===n)}),Sp(t,n))},getContainer:function(){return this.container||(this.container=Gw.get(this.editorContainer||this.id+"_parent")),this.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return this.targetElm||(this.targetElm=Gw.get(this.id)),this.targetElm},getWin:function(){var e;return this.contentWindow||(e=this.iframeElement)&&(this.contentWindow=e.contentWindow),this.contentWindow},getDoc:function(){var e;return this.contentDocument||(e=this.getWin())&&(this.contentDocument=e.document),this.contentDocument},getBody:function(){var e=this.getDoc();return this.bodyElement||(e?e.body:null)},convertURL:function(e,t,n){var r=this.settings;return r.urlconverter_callback?this.execCallback("urlconverter_callback",e,n,!0,t):!r.convert_urls||n&&"LINK"===n.nodeName||0===e.indexOf("file:")||0===e.length?e:r.relative_urls?this.documentBaseURI.toRelative(e):e=this.documentBaseURI.toAbsolute(e,r.remove_script_host)},addVisual:function(e){var n,r=this,o=r.settings,i=r.dom;e=e||r.getBody(),r.hasVisual===undefined&&(r.hasVisual=o.visual),Qw(i.select("table,a",e),function(e){var t;switch(e.nodeName){case"TABLE":return n=o.visual_table_class||"mce-item-table",void((t=i.getAttrib(e,"border"))&&"0"!==t||!r.hasVisual?i.removeClass(e,n):i.addClass(e,n));case"A":return void(i.getAttrib(e,"href")||(t=i.getAttrib(e,"name")||e.id,n=o.visual_anchor_class||"mce-item-anchor",t&&r.hasVisual?i.addClass(e,n):i.removeClass(e,n)))}}),r.fire("VisualAid",{element:e,hasVisual:r.hasVisual})},remove:function(){Xw(this)},destroy:function(e){Yw(this,e)},uploadImages:function(e){return this.editorUpload.uploadImages(e)},_scanForImages:function(){return this.editorUpload.scanForImages()}},Fp);var nN,rN,oN,iN={isEditorUIElement:function(e){return-1!==e.className.toString().indexOf("mce-")}},aN=function(n,e){var t,r;or.detect().browser.isIE()?(r=n).on("focusout",function(){ip(r)}):(t=e,n.on("mouseup touchend",function(e){t.throttle()})),n.on("keyup nodechange",function(e){var t;"nodechange"===(t=e).type&&t.selectionChange||ip(n)})},uN=function(e){var t,n,r,o=Vi(function(){ip(e)},0);e.inline&&(t=e,n=o,r=function(){n.throttle()},Si.DOM.bind(V.document,"mouseup",r),t.on("remove",function(){Si.DOM.unbind(V.document,"mouseup",r)})),e.on("init",function(){aN(e,o)}),e.on("remove",function(){o.cancel()})},sN=Si.DOM,cN=function(e){return iN.isEditorUIElement(e)},lN=function(t,e){var n=t?t.settings.custom_ui_selector:"";return null!==sN.getParent(e,function(e){return cN(e)||!!n&&t.dom.is(e,n)})},fN=function(r,e){var t=e.editor;uN(t),t.on("focusin",function(){var e=r.focusedEditor;e!==this&&(e&&e.fire("blur",{focusedEditor:this}),r.setActive(this),(r.focusedEditor=this).fire("focus",{blurredEditor:e}),this.focus(!0))}),t.on("focusout",function(){var t=this;he.setEditorTimeout(t,function(){var e=r.focusedEditor;lN(t,function(){try{return V.document.activeElement}catch(e){return V.document.body}}())||e!==t||(t.fire("blur",{focusedEditor:null}),r.focusedEditor=null)})}),nN||(nN=function(e){var t,n=r.activeEditor;t=e.target,n&&t.ownerDocument===V.document&&(t===V.document.body||lN(n,t)||r.focusedEditor!==n||(n.fire("blur",{focusedEditor:null}),r.focusedEditor=null))},sN.bind(V.document,"focusin",nN))},dN=function(e,t){e.focusedEditor===t.editor&&(e.focusedEditor=null),e.activeEditor||(sN.unbind(V.document,"focusin",nN),nN=null)},mN=function(e){e.on("AddEditor",d(fN,e)),e.on("RemoveEditor",d(dN,e))},gN=Si.DOM,pN=Xt.explode,hN=Xt.each,vN=Xt.extend,yN=0,bN=!1,CN=[],xN=[],wN=function(t){var n=t.type;hN(oN.get(),function(e){switch(n){case"scroll":e.fire("ScrollWindow",t);break;case"resize":e.fire("ResizeWindow",t)}})},NN=function(e){e!==bN&&(e?gn(window).on("resize scroll",wN):gn(window).off("resize scroll",wN),bN=e)},EN=function(t){var e=xN;delete CN[t.id];for(var n=0;n<CN.length;n++)if(CN[n]===t){CN.splice(n,1);break}return xN=U(xN,function(e){return t!==e}),oN.activeEditor===t&&(oN.activeEditor=0<xN.length?xN[0]:null),oN.focusedEditor===t&&(oN.focusedEditor=null),e.length!==xN.length};vN(oN={defaultSettings:{},$:gn,majorVersion:"4",minorVersion:"9.11",releaseDate:"2020-07-13",editors:CN,i18n:xh,activeEditor:null,settings:{},setup:function(){var e,t,n="";t=zw.getDocumentBaseUrl(V.document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/"));var r=window.tinymce||window.tinyMCEPreInit;if(r)e=r.base||r.baseURL,n=r.suffix;else{for(var o=V.document.getElementsByTagName("script"),i=0;i<o.length;i++){var a;if(""!==(a=o[i].src||"")){var u=a.substring(a.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(a)){-1!==u.indexOf(".min")&&(n=".min"),e=a.substring(0,a.lastIndexOf("/"));break}}}!e&&V.document.currentScript&&(-1!==(a=V.document.currentScript.src).indexOf(".min")&&(n=".min"),e=a.substring(0,a.lastIndexOf("/")))}this.baseURL=new zw(t).toAbsolute(e),this.documentBaseURL=t,this.baseURI=new zw(this.baseURL),this.suffix=n,mN(this)},overrideDefaults:function(e){var t,n;(t=e.base_url)&&(this.baseURL=new zw(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new zw(this.baseURL)),n=e.suffix,e.suffix&&(this.suffix=n);var r=(this.defaultSettings=e).plugin_base_urls;for(var o in r)Bi.PluginManager.urls[o]=r[o]},init:function(r){var n,u,s=this;u=Xt.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option tbody tfoot thead tr script noscript style textarea video audio iframe object menu"," ");var c=function(e){var t=e.id;return t||(t=(t=e.name)&&!gN.get(t)?e.name:gN.uniqueId(),e.setAttribute("id",t)),t},l=function(e,t){return t.constructor===RegExp?t.test(e.className):gN.hasClass(e,t)},f=function(e){n=e},e=function(){var o,i=0,a=[],n=function(e,t,n){var r=new tN(e,t,s);a.push(r),r.on("init",function(){++i===o.length&&f(a)}),r.targetElm=r.targetElm||n,r.render()};gN.unbind(window,"ready",e),function(e){var t=r[e];t&&t.apply(s,Array.prototype.slice.call(arguments,2))}("onpageload"),o=gn.unique(function(t){var e,n=[];if(fe.ie&&fe.ie<11)return kh.initError("TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tinymce.com/docs/get-started/system-requirements/"),[];if(t.types)return hN(t.types,function(e){n=n.concat(gN.select(e.selector))}),n;if(t.selector)return gN.select(t.selector);if(t.target)return[t.target];switch(t.mode){case"exact":0<(e=t.elements||"").length&&hN(pN(e),function(t){var e;(e=gN.get(t))?n.push(e):hN(V.document.forms,function(e){hN(e.elements,function(e){e.name===t&&(t="mce_editor_"+yN++,gN.setAttrib(e,"id",t),n.push(e))})})});break;case"textareas":case"specific_textareas":hN(gN.select("textarea"),function(e){t.editor_deselector&&l(e,t.editor_deselector)||t.editor_selector&&!l(e,t.editor_selector)||n.push(e)})}return n}(r)),r.types?hN(r.types,function(t){Xt.each(o,function(e){return!gN.is(e,t.selector)||(n(c(e),vN({},r,t),e),!1)})}):(Xt.each(o,function(e){var t;(t=s.get(e.id))&&t.initialized&&!(t.getContainer()||t.getBody()).parentNode&&(EN(t),t.unbindAllNativeEvents(),t.destroy(!0),t.removed=!0,t=null)}),0===(o=Xt.grep(o,function(e){return!s.get(e.id)})).length?f([]):hN(o,function(e){var t;t=e,r.inline&&t.tagName.toLowerCase()in u?kh.initError("Could not initialize inline editor on invalid inline target element",e):n(c(e),r,e)}))};return s.settings=r,gN.bind(window,"ready",e),new de(function(t){n?t(n):f=function(e){t(e)}})},get:function(t){return 0===arguments.length?xN.slice(0):S(t)?X(xN,function(e){return e.id===t}).getOr(null):O(t)&&xN[t]?xN[t]:null},add:function(e){var t=this;return CN[e.id]===e||(null===t.get(e.id)&&("length"!==e.id&&(CN[e.id]=e),CN.push(e),xN.push(e)),NN(!0),t.activeEditor=e,t.fire("AddEditor",{editor:e}),rN||(rN=function(){t.fire("BeforeUnload")},gN.bind(window,"beforeunload",rN))),e},createEditor:function(e,t){return this.add(new tN(e,t,this))},remove:function(e){var t,n,r=this;if(e){if(!S(e))return n=e,A(r.get(n.id))?null:(EN(n)&&r.fire("RemoveEditor",{editor:n}),0===xN.length&&gN.unbind(window,"beforeunload",rN),n.remove(),NN(0<xN.length),n);hN(gN.select(e),function(e){(n=r.get(e.id))&&r.remove(n)})}else for(t=xN.length-1;0<=t;t--)r.remove(xN[t])},execCommand:function(e,t,n){var r=this.get(n);switch(e){case"mceAddEditor":return this.get(n)||new tN(n,this.settings,this).render(),!0;case"mceRemoveEditor":return r&&r.remove(),!0;case"mceToggleEditor":return r?r.isHidden()?r.show():r.hide():this.execCommand("mceAddEditor",0,n),!0}return!!this.activeEditor&&this.activeEditor.execCommand(e,t,n)},triggerSave:function(){hN(xN,function(e){e.save()})},addI18n:function(e,t){xh.add(e,t)},translate:function(e){return xh.translate(e)},setActive:function(e){var t=this.activeEditor;this.activeEditor!==e&&(t&&t.fire("deactivate",{relatedTarget:e}),e.fire("activate",{relatedTarget:t})),this.activeEditor=e}},Cp),oN.setup();var SN,TN=oN;function kN(n){return{walk:function(e,t){return Lc(n,e,t)},split:Um,normalize:function(t){return Dg(n,t).fold(q(!1),function(e){return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),!0})}}}(SN=kN||(kN={})).compareRanges=Eg,SN.getCaretRangeFromPoint=Bb,SN.getSelectedNode=Za,SN.getNode=eu;var _N,AN,RN=kN,DN=Math.min,ON=Math.max,BN=Math.round,PN=function(e,t,n){var r,o,i,a,u,s;return r=t.x,o=t.y,i=e.w,a=e.h,u=t.w,s=t.h,"b"===(n=(n||"").split(""))[0]&&(o+=s),"r"===n[1]&&(r+=u),"c"===n[0]&&(o+=BN(s/2)),"c"===n[1]&&(r+=BN(u/2)),"b"===n[3]&&(o-=a),"r"===n[4]&&(r-=i),"c"===n[3]&&(o-=BN(a/2)),"c"===n[4]&&(r-=BN(i/2)),IN(r,o,i,a)},IN=function(e,t,n,r){return{x:e,y:t,w:n,h:r}},LN={inflate:function(e,t,n){return IN(e.x-t,e.y-n,e.w+2*t,e.h+2*n)},relativePosition:PN,findBestRelativePosition:function(e,t,n,r){var o,i;for(i=0;i<r.length;i++)if((o=PN(e,t,r[i])).x>=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},intersect:function(e,t){var n,r,o,i;return n=ON(e.x,t.x),r=ON(e.y,t.y),o=DN(e.x+e.w,t.x+t.w),i=DN(e.y+e.h,t.y+t.h),o-n<0||i-r<0?null:IN(n,r,o-n,i-r)},clamp:function(e,t,n){var r,o,i,a,u,s,c,l,f,d;return u=e.x,s=e.y,c=e.x+e.w,l=e.y+e.h,f=t.x+t.w,d=t.y+t.h,r=ON(0,t.x-u),o=ON(0,t.y-s),i=ON(0,c-f),a=ON(0,l-d),u+=r,s+=o,n&&(c+=r,l+=o,u-=i,s-=a),IN(u,s,(c-=i)-u,(l-=a)-s)},create:IN,fromClientRect:function(e){return IN(e.left,e.top,e.width,e.height)}},FN={},MN={add:function(e,t){FN[e.toLowerCase()]=t},has:function(e){return!!FN[e.toLowerCase()]},get:function(e){var t=e.toLowerCase(),n=FN.hasOwnProperty(t)?FN[t]:null;if(null===n)throw new Error("Could not find module for type: "+e);return n},create:function(e,t){var n;if("string"==typeof e?(t=t||{}).type=e:e=(t=e).type,e=e.toLowerCase(),!(n=FN[e]))throw new Error("Could not find control by type: "+e);return(n=new n(t)).type=e,n}},zN=Xt.each,UN=Xt.extend,jN=function(){};jN.extend=_N=function(n){var e,t,r,o=this.prototype,i=function(){var e,t,n;if(!AN&&(this.init&&this.init.apply(this,arguments),t=this.Mixins))for(e=t.length;e--;)(n=t[e]).init&&n.init.apply(this,arguments)},a=function(){return this},u=function(n,r){return function(){var e,t=this._super;return this._super=o[n],e=r.apply(this,arguments),this._super=t,e}};for(t in AN=!0,e=new this,AN=!1,n.Mixins&&(zN(n.Mixins,function(e){for(var t in e)"init"!==t&&(n[t]=e[t])}),o.Mixins&&(n.Mixins=o.Mixins.concat(n.Mixins))),n.Methods&&zN(n.Methods.split(","),function(e){n[e]=a}),n.Properties&&zN(n.Properties.split(","),function(e){var t="_"+e;n[e]=function(e){return e!==undefined?(this[t]=e,this):this[t]}}),n.Statics&&zN(n.Statics,function(e,t){i[t]=e}),n.Defaults&&o.Defaults&&(n.Defaults=UN({},o.Defaults,n.Defaults)),n)"function"==typeof(r=n[t])&&o[t]?e[t]=u(t,r):e[t]=r;return i.prototype=e,(i.constructor=i).extend=_N,i};var VN=Math.min,HN=Math.max,qN=Math.round,$N=function(e,n){var r,o,t,i;if(n=n||'"',null===e)return"null";if("string"==(t=typeof e))return o="\bb\tt\nn\ff\rr\"\"''\\\\",n+e.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(r=o.indexOf(t))+1?"\\"+o.charAt(r+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e)})+n;if("object"===t){if(e.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(e)){for(r=0,o="[";r<e.length;r++)o+=(0<r?",":"")+$N(e[r],n);return o+"]"}for(i in o="{",e)e.hasOwnProperty(i)&&(o+="function"!=typeof e[i]?(1<o.length?","+n:n)+i+n+":"+$N(e[i],n):"");return o+"}"}return""+e},WN={serialize:$N,parse:function(e){try{return JSON.parse(e)}catch(t){}}},KN={callbacks:{},count:0,send:function(t){var n=this,r=Si.DOM,o=t.count!==undefined?t.count:n.count,i="tinymce_jsonp_"+o;n.callbacks[o]=function(e){r.remove(i),delete n.callbacks[o],t.callback(e)},r.add(r.doc.body,"script",{id:i,src:t.url,type:"text/javascript"}),n.count++}},XN={send:function(e){var t,n=0,r=function(){!e.async||4===t.readyState||1e4<n++?(e.success&&n<1e4&&200===t.status?e.success.call(e.success_scope,""+t.responseText,t,e):e.error&&e.error.call(e.error_scope,1e4<n?"TIMED_OUT":"GENERAL",t,e),t=null):setTimeout(r,10)};if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=!1!==e.async,e.data=e.data||"",XN.fire("beforeInitialize",{settings:e}),t=Rh()){if(t.overrideMimeType&&t.overrideMimeType(e.content_type),t.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(t.withCredentials=!0),e.content_type&&t.setRequestHeader("Content-Type",e.content_type),e.requestheaders&&Xt.each(e.requestheaders,function(e){t.setRequestHeader(e.key,e.value)}),t.setRequestHeader("X-Requested-With","XMLHttpRequest"),(t=XN.fire("beforeSend",{xhr:t,settings:e}).xhr).send(e.data),!e.async)return r();setTimeout(r,10)}}};Xt.extend(XN,Cp);var YN,GN,JN,QN,ZN=Xt.extend,eE=function(e){this.settings=ZN({},e),this.count=0};eE.sendRPC=function(e){return(new eE).send(e)},eE.prototype={send:function(n){var r=n.error,o=n.success;(n=ZN(this.settings,n)).success=function(e,t){void 0===(e=WN.parse(e))&&(e={error:"JSON Parse error."}),e.error?r.call(n.error_scope||n.scope,e.error,t):o.call(n.success_scope||n.scope,e.result)},n.error=function(e,t){r&&r.call(n.error_scope||n.scope,e,t)},n.data=WN.serialize({id:n.id||"c"+this.count++,method:n.method,params:n.params}),n.content_type="application/json",XN.send(n)}};try{YN=V.window.localStorage}catch(iE){GN={},JN=[],QN={getItem:function(e){var t=GN[e];return t||null},setItem:function(e,t){JN.push(e),GN[e]=String(t)},key:function(e){return JN[e]},removeItem:function(t){JN=JN.filter(function(e){return e===t}),delete GN[t]},clear:function(){JN=[],GN={}},length:0},Object.defineProperty(QN,"length",{get:function(){return JN.length},configurable:!1,enumerable:!1}),YN=QN}var tE,nE=TN,rE={geom:{Rect:LN},util:{Promise:de,Delay:he,Tools:Xt,VK:rv,URI:zw,Class:jN,EventDispatcher:vp,Observable:Cp,I18n:xh,XHR:XN,JSON:WN,JSONRequest:eE,JSONP:KN,LocalStorage:YN,Color:function(e){var n={},u=0,s=0,c=0,t=function(e){var t;return"object"==typeof e?"r"in e?(u=e.r,s=e.g,c=e.b):"v"in e&&function(e,t,n){var r,o,i,a;if(e=(parseInt(e,10)||0)%360,t=parseInt(t,10)/100,n=parseInt(n,10)/100,t=HN(0,VN(t,1)),n=HN(0,VN(n,1)),0!==t){switch(r=e/60,i=(o=n*t)*(1-Math.abs(r%2-1)),a=n-o,Math.floor(r)){case 0:u=o,s=i,c=0;break;case 1:u=i,s=o,c=0;break;case 2:u=0,s=o,c=i;break;case 3:u=0,s=i,c=o;break;case 4:u=i,s=0,c=o;break;case 5:u=o,s=0,c=i;break;default:u=s=c=0}u=qN(255*(u+a)),s=qN(255*(s+a)),c=qN(255*(c+a))}else u=s=c=qN(255*n)}(e.h,e.s,e.v):(t=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(u=parseInt(t[1],10),s=parseInt(t[2],10),c=parseInt(t[3],10)):(t=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(u=parseInt(t[1],16),s=parseInt(t[2],16),c=parseInt(t[3],16)):(t=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(u=parseInt(t[1]+t[1],16),s=parseInt(t[2]+t[2],16),c=parseInt(t[3]+t[3],16)),u=u<0?0:255<u?255:u,s=s<0?0:255<s?255:s,c=c<0?0:255<c?255:c,n};return e&&t(e),n.toRgb=function(){return{r:u,g:s,b:c}},n.toHsv=function(){return e=u,t=s,n=c,o=0,(i=VN(e/=255,VN(t/=255,n/=255)))===(a=HN(e,HN(t,n)))?{h:0,s:0,v:100*(o=i)}:(r=(a-i)/a,{h:qN(60*((e===i?3:n===i?1:5)-(e===i?t-n:n===i?e-t:n-e)/((o=a)-i))),s:qN(100*r),v:qN(100*o)});var e,t,n,r,o,i,a},n.toHex=function(){var e=function(e){return 1<(e=parseInt(e,10).toString(16)).length?e:"0"+e};return"#"+e(u)+e(s)+e(c)},n.parse=t,n}},dom:{EventUtils:Se,Sizzle:St,DomQuery:gn,TreeWalker:go,DOMUtils:Si,ScriptLoader:Ri,RangeUtils:RN,Serializer:Eb,ControlSelection:Db,BookmarkManager:_b,Selection:uC,Event:Se.Event},html:{Styles:gi,Entities:ti,Node:sb,Schema:di,SaxParser:Mv,DomParser:bb,Writer:il,Serializer:al},ui:{Factory:MN},Env:fe,AddOnManager:Bi,Annotator:Hc,Formatter:Gy,UndoManager:ry,EditorCommands:pp,WindowManager:yh,NotificationManager:vh,EditorObservable:Fp,Shortcuts:Qp,Editor:tN,FocusManager:iN,EditorManager:TN,DOM:Si.DOM,ScriptLoader:Ri.ScriptLoader,PluginManager:Bi.PluginManager,ThemeManager:Bi.ThemeManager,trim:Xt.trim,isArray:Xt.isArray,is:Xt.is,toArray:Xt.toArray,makeMap:Xt.makeMap,each:Xt.each,map:Xt.map,grep:Xt.grep,inArray:Xt.inArray,extend:Xt.extend,create:Xt.create,walk:Xt.walk,createNS:Xt.createNS,resolve:Xt.resolve,explode:Xt.explode,_addCacheSuffix:Xt._addCacheSuffix,isOpera:fe.opera,isWebKit:fe.webkit,isIE:fe.ie,isGecko:fe.gecko,isMac:fe.mac},oE=nE=Xt.extend(nE,rE);tE=oE,window.tinymce=tE,window.tinyMCE=tE,function(e){if("object"==typeof module)try{module.exports=e}catch(t){}}(oE)}(window);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              tinymce/utils/editable_selects.js                                                                   0000644                 00000004115 15212564050 0013206 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * editable_selects.js
 *
 * Released under LGPL License.
 * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
 *
 * License: http://www.tinymce.com/license
 * Contributing: http://www.tinymce.com/contributing
 */

var TinyMCE_EditableSelects = {
  editSelectElm : null,

  init : function () {
    var nl = document.getElementsByTagName("select"), i, d = document, o;

    for (i = 0; i < nl.length; i++) {
      if (nl[i].className.indexOf('mceEditableSelect') != -1) {
        o = new Option(tinyMCEPopup.editor.translate('value'), '__mce_add_custom__');

        o.className = 'mceAddSelectValue';

        nl[i].options[nl[i].options.length] = o;
        nl[i].onchange = TinyMCE_EditableSelects.onChangeEditableSelect;
      }
    }
  },

  onChangeEditableSelect : function (e) {
    var d = document, ne, se = window.event ? window.event.srcElement : e.target;

    if (se.options[se.selectedIndex].value == '__mce_add_custom__') {
      ne = d.createElement("input");
      ne.id = se.id + "_custom";
      ne.name = se.name + "_custom";
      ne.type = "text";

      ne.style.width = se.offsetWidth + 'px';
      se.parentNode.insertBefore(ne, se);
      se.style.display = 'none';
      ne.focus();
      ne.onblur = TinyMCE_EditableSelects.onBlurEditableSelectInput;
      ne.onkeydown = TinyMCE_EditableSelects.onKeyDown;
      TinyMCE_EditableSelects.editSelectElm = se;
    }
  },

  onBlurEditableSelectInput : function () {
    var se = TinyMCE_EditableSelects.editSelectElm;

    if (se) {
      if (se.previousSibling.value != '') {
        addSelectValue(document.forms[0], se.id, se.previousSibling.value, se.previousSibling.value);
        selectByValue(document.forms[0], se.id, se.previousSibling.value);
      } else {
        selectByValue(document.forms[0], se.id, '');
      }

      se.style.display = 'inline';
      se.parentNode.removeChild(se.previousSibling);
      TinyMCE_EditableSelects.editSelectElm = null;
    }
  },

  onKeyDown : function (e) {
    e = e || window.event;

    if (e.keyCode == 13) {
      TinyMCE_EditableSelects.onBlurEditableSelectInput();
    }
  }
};
                                                                                                                                                                                                                                                                                                                                                                                                                                                   tinymce/utils/form_utils.js                                                                         0000644                 00000013673 15212564050 0012107 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * form_utils.js
 *
 * Released under LGPL License.
 * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
 *
 * License: http://www.tinymce.com/license
 * Contributing: http://www.tinymce.com/contributing
 */

var themeBaseURL = tinyMCEPopup.editor.baseURI.toAbsolute('themes/' + tinyMCEPopup.getParam("theme"));

function getColorPickerHTML(id, target_form_element) {
  var h = "", dom = tinyMCEPopup.dom;

  if (label = dom.select('label[for=' + target_form_element + ']')[0]) {
    label.id = label.id || dom.uniqueId();
  }

  h += '<a role="button" aria-labelledby="' + id + '_label" id="' + id + '_link" href="javascript:;" onclick="tinyMCEPopup.pickColor(event,\'' + target_form_element + '\');" onmousedown="return false;" class="pickcolor">';
  h += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '">&nbsp;<span id="' + id + '_label" class="mceVoiceLabel mceIconOnly" style="display:none;">' + tinyMCEPopup.getLang('browse') + '</span></span></a>';

  return h;
}

function updateColor(img_id, form_element_id) {
  document.getElementById(img_id).style.backgroundColor = document.forms[0].elements[form_element_id].value;
}

function setBrowserDisabled(id, state) {
  var img = document.getElementById(id);
  var lnk = document.getElementById(id + "_link");

  if (lnk) {
    if (state) {
      lnk.setAttribute("realhref", lnk.getAttribute("href"));
      lnk.removeAttribute("href");
      tinyMCEPopup.dom.addClass(img, 'disabled');
    } else {
      if (lnk.getAttribute("realhref")) {
        lnk.setAttribute("href", lnk.getAttribute("realhref"));
      }

      tinyMCEPopup.dom.removeClass(img, 'disabled');
    }
  }
}

function getBrowserHTML(id, target_form_element, type, prefix) {
  var option = prefix + "_" + type + "_browser_callback", cb, html;

  cb = tinyMCEPopup.getParam(option, tinyMCEPopup.getParam("file_browser_callback"));

  if (!cb) {
    return "";
  }

  html = "";
  html += '<a id="' + id + '_link" href="javascript:openBrowser(\'' + id + '\',\'' + target_form_element + '\', \'' + type + '\',\'' + option + '\');" onmousedown="return false;" class="browse">';
  html += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '">&nbsp;</span></a>';

  return html;
}

function openBrowser(img_id, target_form_element, type, option) {
  var img = document.getElementById(img_id);

  if (img.className != "mceButtonDisabled") {
    tinyMCEPopup.openBrowser(target_form_element, type, option);
  }
}

function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
  if (!form_obj || !form_obj.elements[field_name]) {
    return;
  }

  if (!value) {
    value = "";
  }

  var sel = form_obj.elements[field_name];

  var found = false;
  for (var i = 0; i < sel.options.length; i++) {
    var option = sel.options[i];

    if (option.value == value || (ignore_case && option.value.toLowerCase() == value.toLowerCase())) {
      option.selected = true;
      found = true;
    } else {
      option.selected = false;
    }
  }

  if (!found && add_custom && value != '') {
    var option = new Option(value, value);
    option.selected = true;
    sel.options[sel.options.length] = option;
    sel.selectedIndex = sel.options.length - 1;
  }

  return found;
}

function getSelectValue(form_obj, field_name) {
  var elm = form_obj.elements[field_name];

  if (elm == null || elm.options == null || elm.selectedIndex === -1) {
    return "";
  }

  return elm.options[elm.selectedIndex].value;
}

function addSelectValue(form_obj, field_name, name, value) {
  var s = form_obj.elements[field_name];
  var o = new Option(name, value);
  s.options[s.options.length] = o;
}

function addClassesToList(list_id, specific_option) {
  // Setup class droplist
  var styleSelectElm = document.getElementById(list_id);
  var styles = tinyMCEPopup.getParam('theme_advanced_styles', false);
  styles = tinyMCEPopup.getParam(specific_option, styles);

  if (styles) {
    var stylesAr = styles.split(';');

    for (var i = 0; i < stylesAr.length; i++) {
      if (stylesAr != "") {
        var key, value;

        key = stylesAr[i].split('=')[0];
        value = stylesAr[i].split('=')[1];

        styleSelectElm.options[styleSelectElm.length] = new Option(key, value);
      }
    }
  } else {
    /*tinymce.each(tinyMCEPopup.editor.dom.getClasses(), function(o) {
    styleSelectElm.options[styleSelectElm.length] = new Option(o.title || o['class'], o['class']);
    });*/
  }
}

function isVisible(element_id) {
  var elm = document.getElementById(element_id);

  return elm && elm.style.display != "none";
}

function convertRGBToHex(col) {
  var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");

  var rgb = col.replace(re, "$1,$2,$3").split(',');
  if (rgb.length == 3) {
    r = parseInt(rgb[0]).toString(16);
    g = parseInt(rgb[1]).toString(16);
    b = parseInt(rgb[2]).toString(16);

    r = r.length == 1 ? '0' + r : r;
    g = g.length == 1 ? '0' + g : g;
    b = b.length == 1 ? '0' + b : b;

    return "#" + r + g + b;
  }

  return col;
}

function convertHexToRGB(col) {
  if (col.indexOf('#') != -1) {
    col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');

    r = parseInt(col.substring(0, 2), 16);
    g = parseInt(col.substring(2, 4), 16);
    b = parseInt(col.substring(4, 6), 16);

    return "rgb(" + r + "," + g + "," + b + ")";
  }

  return col;
}

function trimSize(size) {
  return size.replace(/([0-9\.]+)(px|%|in|cm|mm|em|ex|pt|pc)/i, '$1$2');
}

function getCSSSize(size) {
  size = trimSize(size);

  if (size == "") {
    return "";
  }

  // Add px
  if (/^[0-9]+$/.test(size)) {
    size += 'px';
  }
  // Confidence check, IE doesn't like broken values
  else if (!(/^[0-9\.]+(px|%|in|cm|mm|em|ex|pt|pc)$/i.test(size))) {
    return "";
  }

  return size;
}

function getStyle(elm, attrib, style) {
  var val = tinyMCEPopup.dom.getAttrib(elm, attrib);

  if (val != '') {
    return '' + val;
  }

  if (typeof (style) == 'undefined') {
    style = attrib;
  }

  return tinyMCEPopup.dom.getStyle(elm, style);
}
                                                                     tinymce/utils/mctabs.js                                                                             0000644                 00000010100 15212564050 0011153 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * mctabs.js
 *
 * Released under LGPL License.
 * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
 *
 * License: http://www.tinymce.com/license
 * Contributing: http://www.tinymce.com/contributing
 */

/*jshint globals: tinyMCEPopup */

function MCTabs() {
  this.settings = [];
  this.onChange = tinyMCEPopup.editor.windowManager.createInstance('tinymce.util.Dispatcher');
}

MCTabs.prototype.init = function (settings) {
  this.settings = settings;
};

MCTabs.prototype.getParam = function (name, default_value) {
  var value = null;

  value = (typeof (this.settings[name]) == "undefined") ? default_value : this.settings[name];

  // Fix bool values
  if (value == "true" || value == "false") {
    return (value == "true");
  }

  return value;
};

MCTabs.prototype.showTab = function (tab) {
  tab.className = 'current';
  tab.setAttribute("aria-selected", true);
  tab.setAttribute("aria-expanded", true);
  tab.tabIndex = 0;
};

MCTabs.prototype.hideTab = function (tab) {
  var t = this;

  tab.className = '';
  tab.setAttribute("aria-selected", false);
  tab.setAttribute("aria-expanded", false);
  tab.tabIndex = -1;
};

MCTabs.prototype.showPanel = function (panel) {
  panel.className = 'current';
  panel.setAttribute("aria-hidden", false);
};

MCTabs.prototype.hidePanel = function (panel) {
  panel.className = 'panel';
  panel.setAttribute("aria-hidden", true);
};

MCTabs.prototype.getPanelForTab = function (tabElm) {
  return tinyMCEPopup.dom.getAttrib(tabElm, "aria-controls");
};

MCTabs.prototype.displayTab = function (tab_id, panel_id, avoid_focus) {
  var panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i, t = this;

  tabElm = document.getElementById(tab_id);

  if (panel_id === undefined) {
    panel_id = t.getPanelForTab(tabElm);
  }

  panelElm = document.getElementById(panel_id);
  panelContainerElm = panelElm ? panelElm.parentNode : null;
  tabContainerElm = tabElm ? tabElm.parentNode : null;
  selectionClass = t.getParam('selection_class', 'current');

  if (tabElm && tabContainerElm) {
    nodes = tabContainerElm.childNodes;

    // Hide all other tabs
    for (i = 0; i < nodes.length; i++) {
      if (nodes[i].nodeName == "LI") {
        t.hideTab(nodes[i]);
      }
    }

    // Show selected tab
    t.showTab(tabElm);
  }

  if (panelElm && panelContainerElm) {
    nodes = panelContainerElm.childNodes;

    // Hide all other panels
    for (i = 0; i < nodes.length; i++) {
      if (nodes[i].nodeName == "DIV") {
        t.hidePanel(nodes[i]);
      }
    }

    if (!avoid_focus) {
      tabElm.focus();
    }

    // Show selected panel
    t.showPanel(panelElm);
  }
};

MCTabs.prototype.getAnchor = function () {
  var pos, url = document.location.href;

  if ((pos = url.lastIndexOf('#')) != -1) {
    return url.substring(pos + 1);
  }

  return "";
};


//Global instance
var mcTabs = new MCTabs();

tinyMCEPopup.onInit.add(function () {
  var tinymce = tinyMCEPopup.getWin().tinymce, dom = tinyMCEPopup.dom, each = tinymce.each;

  each(dom.select('div.tabs'), function (tabContainerElm) {
    //var keyNav;

    dom.setAttrib(tabContainerElm, "role", "tablist");

    var items = tinyMCEPopup.dom.select('li', tabContainerElm);
    var action = function (id) {
      mcTabs.displayTab(id, mcTabs.getPanelForTab(id));
      mcTabs.onChange.dispatch(id);
    };

    each(items, function (item) {
      dom.setAttrib(item, 'role', 'tab');
      dom.bind(item, 'click', function (evt) {
        action(item.id);
      });
    });

    dom.bind(dom.getRoot(), 'keydown', function (evt) {
      if (evt.keyCode === 9 && evt.ctrlKey && !evt.altKey) { // Tab
        //keyNav.moveFocus(evt.shiftKey ? -1 : 1);
        tinymce.dom.Event.cancel(evt);
      }
    });

    each(dom.select('a', tabContainerElm), function (a) {
      dom.setAttrib(a, 'tabindex', '-1');
    });

    /*keyNav = tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
      root: tabContainerElm,
      items: items,
      onAction: action,
      actOnFocus: true,
      enableLeftRight: true,
      enableUpDown: true
    }, tinyMCEPopup.dom);*/
  }
);
});                                                                                                                                                                                                                                                                                                                                                                                                                                                                tinymce/utils/validate.js                                                                           0000644                 00000014502 15212564050 0011505 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * validate.js
 *
 * Released under LGPL License.
 * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
 *
 * License: http://www.tinymce.com/license
 * Contributing: http://www.tinymce.com/contributing
 */

/**
  // String validation:

  if (!Validator.isEmail('myemail'))
    alert('Invalid email.');

  // Form validation:

  var f = document.forms['myform'];

  if (!Validator.isEmail(f.myemail))
    alert('Invalid email.');
*/

var Validator = {
  isEmail : function (s) {
    return this.test(s, '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$');
  },

  isAbsUrl : function (s) {
    return this.test(s, '^(news|telnet|nttp|file|http|ftp|https)://[-A-Za-z0-9\\.]+\\/?.*$');
  },

  isSize : function (s) {
    return this.test(s, '^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)?$');
  },

  isId : function (s) {
    return this.test(s, '^[A-Za-z_]([A-Za-z0-9_])*$');
  },

  isEmpty : function (s) {
    var nl, i;

    if (s.nodeName == 'SELECT' && s.selectedIndex < 1) {
      return true;
    }

    if (s.type == 'checkbox' && !s.checked) {
      return true;
    }

    if (s.type == 'radio') {
      for (i = 0, nl = s.form.elements; i < nl.length; i++) {
        if (nl[i].type == "radio" && nl[i].name == s.name && nl[i].checked) {
          return false;
        }
      }

      return true;
    }

    return new RegExp('^\\s*$').test(s.nodeType == 1 ? s.value : s);
  },

  isNumber : function (s, d) {
    return !isNaN(s.nodeType == 1 ? s.value : s) && (!d || !this.test(s, '^-?[0-9]*\\.[0-9]*$'));
  },

  test : function (s, p) {
    s = s.nodeType == 1 ? s.value : s;

    return s == '' || new RegExp(p).test(s);
  }
};

var AutoValidator = {
  settings : {
    id_cls : 'id',
    int_cls : 'int',
    url_cls : 'url',
    number_cls : 'number',
    email_cls : 'email',
    size_cls : 'size',
    required_cls : 'required',
    invalid_cls : 'invalid',
    min_cls : 'min',
    max_cls : 'max'
  },

  init : function (s) {
    var n;

    for (n in s) {
      this.settings[n] = s[n];
    }
  },

  validate : function (f) {
    var i, nl, s = this.settings, c = 0;

    nl = this.tags(f, 'label');
    for (i = 0; i < nl.length; i++) {
      this.removeClass(nl[i], s.invalid_cls);
      nl[i].setAttribute('aria-invalid', false);
    }

    c += this.validateElms(f, 'input');
    c += this.validateElms(f, 'select');
    c += this.validateElms(f, 'textarea');

    return c == 3;
  },

  invalidate : function (n) {
    this.mark(n.form, n);
  },

  getErrorMessages : function (f) {
    var nl, i, s = this.settings, field, msg, values, messages = [], ed = tinyMCEPopup.editor;
    nl = this.tags(f, "label");
    for (i = 0; i < nl.length; i++) {
      if (this.hasClass(nl[i], s.invalid_cls)) {
        field = document.getElementById(nl[i].getAttribute("for"));
        values = { field: nl[i].textContent };
        if (this.hasClass(field, s.min_cls, true)) {
          message = ed.getLang('invalid_data_min');
          values.min = this.getNum(field, s.min_cls);
        } else if (this.hasClass(field, s.number_cls)) {
          message = ed.getLang('invalid_data_number');
        } else if (this.hasClass(field, s.size_cls)) {
          message = ed.getLang('invalid_data_size');
        } else {
          message = ed.getLang('invalid_data');
        }

        message = message.replace(/{\#([^}]+)\}/g, function (a, b) {
          return values[b] || '{#' + b + '}';
        });
        messages.push(message);
      }
    }
    return messages;
  },

  reset : function (e) {
    var t = ['label', 'input', 'select', 'textarea'];
    var i, j, nl, s = this.settings;

    if (e == null) {
      return;
    }

    for (i = 0; i < t.length; i++) {
      nl = this.tags(e.form ? e.form : e, t[i]);
      for (j = 0; j < nl.length; j++) {
        this.removeClass(nl[j], s.invalid_cls);
        nl[j].setAttribute('aria-invalid', false);
      }
    }
  },

  validateElms : function (f, e) {
    var nl, i, n, s = this.settings, st = true, va = Validator, v;

    nl = this.tags(f, e);
    for (i = 0; i < nl.length; i++) {
      n = nl[i];

      this.removeClass(n, s.invalid_cls);

      if (this.hasClass(n, s.required_cls) && va.isEmpty(n)) {
        st = this.mark(f, n);
      }

      if (this.hasClass(n, s.number_cls) && !va.isNumber(n)) {
        st = this.mark(f, n);
      }

      if (this.hasClass(n, s.int_cls) && !va.isNumber(n, true)) {
        st = this.mark(f, n);
      }

      if (this.hasClass(n, s.url_cls) && !va.isAbsUrl(n)) {
        st = this.mark(f, n);
      }

      if (this.hasClass(n, s.email_cls) && !va.isEmail(n)) {
        st = this.mark(f, n);
      }

      if (this.hasClass(n, s.size_cls) && !va.isSize(n)) {
        st = this.mark(f, n);
      }

      if (this.hasClass(n, s.id_cls) && !va.isId(n)) {
        st = this.mark(f, n);
      }

      if (this.hasClass(n, s.min_cls, true)) {
        v = this.getNum(n, s.min_cls);

        if (isNaN(v) || parseInt(n.value) < parseInt(v)) {
          st = this.mark(f, n);
        }
      }

      if (this.hasClass(n, s.max_cls, true)) {
        v = this.getNum(n, s.max_cls);

        if (isNaN(v) || parseInt(n.value) > parseInt(v)) {
          st = this.mark(f, n);
        }
      }
    }

    return st;
  },

  hasClass : function (n, c, d) {
    return new RegExp('\\b' + c + (d ? '[0-9]+' : '') + '\\b', 'g').test(n.className);
  },

  getNum : function (n, c) {
    c = n.className.match(new RegExp('\\b' + c + '([0-9]+)\\b', 'g'))[0];
    c = c.replace(/[^0-9]/g, '');

    return c;
  },

  addClass : function (n, c, b) {
    var o = this.removeClass(n, c);
    n.className = b ? c + (o !== '' ? (' ' + o) : '') : (o !== '' ? (o + ' ') : '') + c;
  },

  removeClass : function (n, c) {
    c = n.className.replace(new RegExp("(^|\\s+)" + c + "(\\s+|$)"), ' ');
    return n.className = c !== ' ' ? c : '';
  },

  tags : function (f, s) {
    return f.getElementsByTagName(s);
  },

  mark : function (f, n) {
    var s = this.settings;

    this.addClass(n, s.invalid_cls);
    n.setAttribute('aria-invalid', 'true');
    this.markLabels(f, n, s.invalid_cls);

    return false;
  },

  markLabels : function (f, n, ic) {
    var nl, i;

    nl = this.tags(f, "label");
    for (i = 0; i < nl.length; i++) {
      if (nl[i].getAttribute("for") == n.id || nl[i].htmlFor == n.id) {
        this.addClass(nl[i], ic);
      }
    }

    return null;
  }
};
                                                                                                                                                                                              tinymce/wp-tinymce.js                                                                               0000644                 00002437311 15212564050 0010661 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       // Source: wp-includes/js/tinymce/tinymce.min.js
// 4.9.11 (2020-07-13)
!function(V){"use strict";var o=function(){},H=function(n,r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n(r.apply(null,e))}},q=function(e){return function(){return e}},$=function(e){return e};function d(r){for(var o=[],e=1;e<arguments.length;e++)o[e-1]=arguments[e];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=o.concat(e);return r.apply(null,n)}}var e,t,n,r,i,a,u,s,c,l,f,m,g,p,h,v,y=function(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return!n.apply(null,e)}},b=q(!1),C=q(!0),x=function(){return w},w=(e=function(e){return e.isNone()},r={fold:function(e,t){return e()},is:b,isSome:b,isNone:C,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:q(null),getOrUndefined:q(undefined),or:n,orThunk:t,map:x,each:o,bind:x,exists:b,forall:C,filter:x,equals:e,equals_:e,toArray:function(){return[]},toString:q("none()")},Object.freeze&&Object.freeze(r),r),N=function(n){var e=q(n),t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:C,isNone:b,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return N(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?o:w},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(b,function(e){return t(n,e)})}};return o},_={some:N,none:x,from:function(e){return null===e||e===undefined?w:N(e)}},E=function(t){return function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t}(e)===t}},S=E("string"),T=E("object"),k=E("array"),A=E("null"),R=E("boolean"),D=E("function"),O=E("number"),B=Array.prototype.slice,P=Array.prototype.indexOf,I=Array.prototype.push,L=function(e,t){return P.call(e,t)},F=function(e,t){return-1<L(e,t)},M=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return!0;return!1},W=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r},z=function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)},K=function(e,t){for(var n=[],r=[],o=0,i=e.length;o<i;o++){var a=e[o];(t(a,o)?n:r).push(a)}return{pass:n,fail:r}},U=function(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r)&&n.push(i)}return n},j=function(e,t,n){return z(e,function(e){n=t(n,e)}),n},X=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n))return _.some(o)}return _.none()},Y=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return _.some(n);return _.none()},G=function(e,t){return function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!k(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);I.apply(t,e[n])}return t}(W(e,t))},J=function(e,t){for(var n=0,r=e.length;n<r;++n)if(!0!==t(e[n],n))return!1;return!0},Q=function(e,t){return U(e,function(e){return!F(t,e)})},Z=function(e){return 0===e.length?_.none():_.some(e[0])},ee=function(e){return 0===e.length?_.none():_.some(e[e.length-1])},te=D(Array.from)?Array.from:function(e){return B.call(e)},ne="undefined"!=typeof V.window?V.window:Function("return this;")(),re=function(e,t){return function(e,t){for(var n=t!==undefined&&null!==t?t:ne,r=0;r<e.length&&n!==undefined&&null!==n;++r)n=n[e[r]];return n}(e.split("."),t)},oe={getOrDie:function(e,t){var n=re(e,t);if(n===undefined||null===n)throw new Error(e+" not available on this browser");return n}},ie=function(){return oe.getOrDie("URL")},ae={createObjectURL:function(e){return ie().createObjectURL(e)},revokeObjectURL:function(e){ie().revokeObjectURL(e)}},ue=V.navigator,se=ue.userAgent,ce=function(e){return"matchMedia"in V.window&&V.matchMedia(e).matches};m=/Android/.test(se),a=(a=!(i=/WebKit/.test(se))&&/MSIE/gi.test(se)&&/Explorer/gi.test(ue.appName))&&/MSIE (\w+)\./.exec(se)[1],u=-1!==se.indexOf("Trident/")&&(-1!==se.indexOf("rv:")||-1!==ue.appName.indexOf("Netscape"))&&11,s=-1!==se.indexOf("Edge/")&&!a&&!u&&12,a=a||u||s,c=!i&&!u&&/Gecko/.test(se),l=-1!==se.indexOf("Mac"),f=/(iPad|iPhone)/.test(se),g="FormData"in V.window&&"FileReader"in V.window&&"URL"in V.window&&!!ae.createObjectURL,p=ce("only screen and (max-device-width: 480px)")&&(m||f),h=ce("only screen and (min-width: 800px)")&&(m||f),v=-1!==se.indexOf("Windows Phone"),s&&(i=!1);var le,fe={opera:!1,webkit:i,ie:a,gecko:c,mac:l,iOS:f,android:m,contentEditable:!f||g||534<=parseInt(se.match(/AppleWebKit\/(\d*)/)[1],10),transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!==a,range:V.window.getSelection&&"Range"in V.window,documentMode:a&&!s?V.document.documentMode||7:10,fileApi:g,ceFalse:!1===a||8<a,cacheSuffix:null,container:null,overrideViewPort:null,experimentalShadowDom:!1,canHaveCSP:!1===a||11<a,desktop:!p&&!h,windowsPhone:v},de=window.Promise?window.Promise:function(){function r(e,t){return function(){e.apply(t,arguments)}}var e=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=function(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],l(e,r(o,this),r(u,this))},t=i.immediateFn||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,1)};function a(r){var o=this;null!==this._state?t(function(){var e=o._state?r.onFulfilled:r.onRejected;if(null!==e){var t;try{t=e(o._value)}catch(n){return void r.reject(n)}r.resolve(t)}else(o._state?r.resolve:r.reject)(o._value)}):this._deferreds.push(r)}function o(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void l(r(t,e),r(o,this),r(u,this))}this._state=!0,this._value=e,s.call(this)}catch(n){u.call(this,n)}}function u(e){this._state=!1,this._value=e,s.call(this)}function s(){for(var e=0,t=this._deferreds.length;e<t;e++)a.call(this,this._deferreds[e]);this._deferreds=null}function c(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}function l(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(o){if(r)return;r=!0,n(o)}}return i.prototype["catch"]=function(e){return this.then(null,e)},i.prototype.then=function(n,r){var o=this;return new i(function(e,t){a.call(o,new c(n,r,e,t))})},i.all=function(){var s=Array.prototype.slice.call(1===arguments.length&&e(arguments[0])?arguments[0]:arguments);return new i(function(o,i){if(0===s.length)return o([]);var a=s.length;function u(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){u(t,e)},i)}s[t]=e,0==--a&&o(s)}catch(r){i(r)}}for(var e=0;e<s.length;e++)u(e,s[e])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(e){e(t)})},i.reject=function(n){return new i(function(e,t){t(n)})},i.race=function(o){return new i(function(e,t){for(var n=0,r=o.length;n<r;n++)o[n].then(e,t)})},i}(),me=function(e,t){return"number"!=typeof t&&(t=0),setTimeout(e,t)},ge=function(e,t){return"number"!=typeof t&&(t=1),setInterval(e,t)},pe=function(t,n){var r,e;return(e=function(){var e=arguments;clearTimeout(r),r=me(function(){t.apply(this,e)},n)}).stop=function(){clearTimeout(r)},e},he={requestAnimationFrame:function(e,t){le?le.then(e):le=new de(function(e){t||(t=V.document.body),function(e,t){var n,r=V.window.requestAnimationFrame,o=["ms","moz","webkit"];for(n=0;n<o.length&&!r;n++)r=V.window[o[n]+"RequestAnimationFrame"];r||(r=function(e){V.window.setTimeout(e,0)}),r(e,t)}(e,t)}).then(e)},setTimeout:me,setInterval:ge,setEditorTimeout:function(e,t,n){return me(function(){e.removed||t()},n)},setEditorInterval:function(e,t,n){var r;return r=ge(function(){e.removed?clearInterval(r):t()},n)},debounce:pe,throttle:pe,clearInterval:function(e){return clearInterval(e)},clearTimeout:function(e){return clearTimeout(e)}},ve=/^(?:mouse|contextmenu)|click/,ye={keyLocation:1,layerX:1,layerY:1,returnValue:1,webkitMovementX:1,webkitMovementY:1,keyIdentifier:1},be=function(){return!1},Ce=function(){return!0},xe=function(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent&&e.attachEvent("on"+t,n)},we=function(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r||!1):e.detachEvent&&e.detachEvent("on"+t,n)},Ne=function(e,t){var n,r,o=t||{};for(n in e)ye[n]||(o[n]=e[n]);if(o.target||(o.target=o.srcElement||V.document),fe.experimentalShadowDom&&(o.target=function(e,t){if(e.composedPath){var n=e.composedPath();if(n&&0<n.length)return n[0]}return t}(e,o.target)),e&&ve.test(e.type)&&e.pageX===undefined&&e.clientX!==undefined){var i=o.target.ownerDocument||V.document,a=i.documentElement,u=i.body;o.pageX=e.clientX+(a&&a.scrollLeft||u&&u.scrollLeft||0)-(a&&a.clientLeft||u&&u.clientLeft||0),o.pageY=e.clientY+(a&&a.scrollTop||u&&u.scrollTop||0)-(a&&a.clientTop||u&&u.clientTop||0)}return o.preventDefault=function(){o.isDefaultPrevented=Ce,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},o.stopPropagation=function(){o.isPropagationStopped=Ce,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},!(o.stopImmediatePropagation=function(){o.isImmediatePropagationStopped=Ce,o.stopPropagation()})==((r=o).isDefaultPrevented===Ce||r.isDefaultPrevented===be)&&(o.isDefaultPrevented=be,o.isPropagationStopped=be,o.isImmediatePropagationStopped=be),"undefined"==typeof o.metaKey&&(o.metaKey=!1),o},Ee=function(e,t,n){var r=e.document,o={type:"ready"};if(n.domLoaded)t(o);else{var i=function(){return"complete"===r.readyState||"interactive"===r.readyState&&r.body},a=function(){n.domLoaded||(n.domLoaded=!0,t(o))},u=function(){i()&&(we(r,"readystatechange",u),a())},s=function(){try{r.documentElement.doScroll("left")}catch(e){return void he.setTimeout(s)}a()};!r.addEventListener||fe.ie&&fe.ie<11?(xe(r,"readystatechange",u),r.documentElement.doScroll&&e.self===e.top&&s()):i()?a():xe(e,"DOMContentLoaded",a),xe(e,"load",a)}},Se=function(){var m,g,p,h,v,y=this,b={};g="mce-data-"+(+new Date).toString(32),h="onmouseenter"in V.document.documentElement,p="onfocusin"in V.document.documentElement,v={mouseenter:"mouseover",mouseleave:"mouseout"},m=1,y.domLoaded=!1,y.events=b;var C=function(e,t){var n,r,o,i,a=b[t];if(n=a&&a[e.type])for(r=0,o=n.length;r<o;r++)if((i=n[r])&&!1===i.func.call(i.scope,e)&&e.preventDefault(),e.isImmediatePropagationStopped())return};y.bind=function(e,t,n,r){var o,i,a,u,s,c,l,f=V.window,d=function(e){C(Ne(e||f.event),o)};if(e&&3!==e.nodeType&&8!==e.nodeType){for(e[g]?o=e[g]:(o=m++,e[g]=o,b[o]={}),r=r||e,a=(t=t.split(" ")).length;a--;)c=d,s=l=!1,"DOMContentLoaded"===(u=t[a])&&(u="ready"),y.domLoaded&&"ready"===u&&"complete"===e.readyState?n.call(r,Ne({type:u})):(h||(s=v[u])&&(c=function(e){var t,n;if(t=e.currentTarget,(n=e.relatedTarget)&&t.contains)n=t.contains(n);else for(;n&&n!==t;)n=n.parentNode;n||((e=Ne(e||f.event)).type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=t,C(e,o))}),p||"focusin"!==u&&"focusout"!==u||(l=!0,s="focusin"===u?"focus":"blur",c=function(e){(e=Ne(e||f.event)).type="focus"===e.type?"focusin":"focusout",C(e,o)}),(i=b[o][u])?"ready"===u&&y.domLoaded?n({type:u}):i.push({func:n,scope:r}):(b[o][u]=i=[{func:n,scope:r}],i.fakeName=s,i.capture=l,i.nativeHandler=c,"ready"===u?Ee(e,c,y):xe(e,s||u,c,l)));return e=i=0,n}},y.unbind=function(e,t,n){var r,o,i,a,u,s;if(!e||3===e.nodeType||8===e.nodeType)return y;if(r=e[g]){if(s=b[r],t){for(i=(t=t.split(" ")).length;i--;)if(o=s[u=t[i]]){if(n)for(a=o.length;a--;)if(o[a].func===n){var c=o.nativeHandler,l=o.fakeName,f=o.capture;(o=o.slice(0,a).concat(o.slice(a+1))).nativeHandler=c,o.fakeName=l,o.capture=f,s[u]=o}n&&0!==o.length||(delete s[u],we(e,o.fakeName||u,o.nativeHandler,o.capture))}}else{for(u in s)o=s[u],we(e,o.fakeName||u,o.nativeHandler,o.capture);s={}}for(u in s)return y;delete b[r];try{delete e[g]}catch(d){e[g]=null}}return y},y.fire=function(e,t,n){var r;if(!e||3===e.nodeType||8===e.nodeType)return y;for((n=Ne(null,n)).type=t,n.target=e;(r=e[g])&&C(n,r),(e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow)&&!n.isPropagationStopped(););return y},y.clean=function(e){var t,n,r=y.unbind;if(!e||3===e.nodeType||8===e.nodeType)return y;if(e[g]&&r(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(r(e),t=(n=e.getElementsByTagName("*")).length;t--;)(e=n[t])[g]&&r(e);return y},y.destroy=function(){b={}},y.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}};Se.Event=new Se,Se.Event.bind(V.window,"ready",function(){});var Te,ke,_e,Ae,Re,De,Oe,Be,Pe,Ie,Le,Fe,Me,ze,Ue,je,Ve,He,qe="sizzle"+-new Date,$e=V.window.document,We=0,Ke=0,Xe=Tt(),Ye=Tt(),Ge=Tt(),Je=function(e,t){return e===t&&(Le=!0),0},Qe=typeof undefined,Ze={}.hasOwnProperty,et=[],tt=et.pop,nt=et.push,rt=et.push,ot=et.slice,it=et.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},at="[\\x20\\t\\r\\n\\f]",ut="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",st="\\["+at+"*("+ut+")(?:"+at+"*([*^$|!~]?=)"+at+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ut+"))|)"+at+"*\\]",ct=":("+ut+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+st+")*)|.*)\\)|)",lt=new RegExp("^"+at+"+|((?:^|[^\\\\])(?:\\\\.)*)"+at+"+$","g"),ft=new RegExp("^"+at+"*,"+at+"*"),dt=new RegExp("^"+at+"*([>+~]|"+at+")"+at+"*"),mt=new RegExp("="+at+"*([^\\]'\"]*?)"+at+"*\\]","g"),gt=new RegExp(ct),pt=new RegExp("^"+ut+"$"),ht={ID:new RegExp("^#("+ut+")"),CLASS:new RegExp("^\\.("+ut+")"),TAG:new RegExp("^("+ut+"|[*])"),ATTR:new RegExp("^"+st),PSEUDO:new RegExp("^"+ct),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+at+"*(even|odd|(([+-]|)(\\d*)n|)"+at+"*(?:([+-]|)"+at+"*(\\d+)|))"+at+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+at+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+at+"*((?:-\\d)?\\d*)"+at+"*\\)|)(?=[^-]|$)","i")},vt=/^(?:input|select|textarea|button)$/i,yt=/^h\d$/i,bt=/^[^{]+\{\s*\[native \w/,Ct=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,xt=/[+~]/,wt=/'|\\/g,Nt=new RegExp("\\\\([\\da-f]{1,6}"+at+"?|("+at+")|.)","ig"),Et=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{rt.apply(et=ot.call($e.childNodes),$e.childNodes),et[$e.childNodes.length].nodeType}catch(iE){rt={apply:et.length?function(e,t){nt.apply(e,ot.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}var St=function(e,t,n,r){var o,i,a,u,s,c,l,f,d,m;if((t?t.ownerDocument||t:$e)!==Me&&Fe(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(u=(t=t||Me).nodeType)&&9!==u)return[];if(Ue&&!r){if(o=Ct.exec(e))if(a=o[1]){if(9===u){if(!(i=t.getElementById(a))||!i.parentNode)return n;if(i.id===a)return n.push(i),n}else if(t.ownerDocument&&(i=t.ownerDocument.getElementById(a))&&He(t,i)&&i.id===a)return n.push(i),n}else{if(o[2])return rt.apply(n,t.getElementsByTagName(e)),n;if((a=o[3])&&ke.getElementsByClassName)return rt.apply(n,t.getElementsByClassName(a)),n}if(ke.qsa&&(!je||!je.test(e))){if(f=l=qe,d=t,m=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){for(c=De(e),(l=t.getAttribute("id"))?f=l.replace(wt,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",s=c.length;s--;)c[s]=f+Pt(c[s]);d=xt.test(e)&&Ot(t.parentNode)||t,m=c.join(",")}if(m)try{return rt.apply(n,d.querySelectorAll(m)),n}catch(g){}finally{l||t.removeAttribute("id")}}}return Be(e.replace(lt,"$1"),t,n,r)};function Tt(){var r=[];return function e(t,n){return r.push(t+" ")>_e.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function kt(e){return e[qe]=!0,e}function _t(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function At(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function Rt(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function Dt(a){return kt(function(i){return i=+i,kt(function(e,t){for(var n,r=a([],e.length,i),o=r.length;o--;)e[n=r[o]]&&(e[n]=!(t[n]=e[n]))})})}function Ot(e){return e&&typeof e.getElementsByTagName!==Qe&&e}for(Te in ke=St.support={},Re=St.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},Fe=St.setDocument=function(e){var t,s=e?e.ownerDocument||e:$e,n=s.defaultView;return s!==Me&&9===s.nodeType&&s.documentElement?(ze=(Me=s).documentElement,Ue=!Re(s),n&&n!==function(e){try{return e.top}catch(t){}return null}(n)&&(n.addEventListener?n.addEventListener("unload",function(){Fe()},!1):n.attachEvent&&n.attachEvent("onunload",function(){Fe()})),ke.attributes=!0,ke.getElementsByTagName=!0,ke.getElementsByClassName=bt.test(s.getElementsByClassName),ke.getById=!0,_e.find.ID=function(e,t){if(typeof t.getElementById!==Qe&&Ue){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},_e.filter.ID=function(e){var t=e.replace(Nt,Et);return function(e){return e.getAttribute("id")===t}},_e.find.TAG=ke.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==Qe)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},_e.find.CLASS=ke.getElementsByClassName&&function(e,t){if(Ue)return t.getElementsByClassName(e)},Ve=[],je=[],ke.disconnectedMatch=!0,je=je.length&&new RegExp(je.join("|")),Ve=Ve.length&&new RegExp(Ve.join("|")),t=bt.test(ze.compareDocumentPosition),He=t||bt.test(ze.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Je=t?function(e,t){if(e===t)return Le=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!ke.sortDetached&&t.compareDocumentPosition(e)===n?e===s||e.ownerDocument===$e&&He($e,e)?-1:t===s||t.ownerDocument===$e&&He($e,t)?1:Ie?it.call(Ie,e)-it.call(Ie,t):0:4&n?-1:1)}:function(e,t){if(e===t)return Le=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],u=[t];if(!o||!i)return e===s?-1:t===s?1:o?-1:i?1:Ie?it.call(Ie,e)-it.call(Ie,t):0;if(o===i)return _t(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?_t(a[r],u[r]):a[r]===$e?-1:u[r]===$e?1:0},s):Me},St.matches=function(e,t){return St(e,null,null,t)},St.matchesSelector=function(e,t){if((e.ownerDocument||e)!==Me&&Fe(e),t=t.replace(mt,"='$1']"),ke.matchesSelector&&Ue&&(!Ve||!Ve.test(t))&&(!je||!je.test(t)))try{var n=(void 0).call(e,t);if(n||ke.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(iE){}return 0<St(t,Me,null,[e]).length},St.contains=function(e,t){return(e.ownerDocument||e)!==Me&&Fe(e),He(e,t)},St.attr=function(e,t){(e.ownerDocument||e)!==Me&&Fe(e);var n=_e.attrHandle[t.toLowerCase()],r=n&&Ze.call(_e.attrHandle,t.toLowerCase())?n(e,t,!Ue):undefined;return r!==undefined?r:ke.attributes||!Ue?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},St.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},St.uniqueSort=function(e){var t,n=[],r=0,o=0;if(Le=!ke.detectDuplicates,Ie=!ke.sortStable&&e.slice(0),e.sort(Je),Le){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return Ie=null,e},Ae=St.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=Ae(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=Ae(t);return n},(_e=St.selectors={cacheLength:50,createPseudo:kt,match:ht,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Nt,Et),e[3]=(e[3]||e[4]||e[5]||"").replace(Nt,Et),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||St.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&St.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return ht.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&gt.test(n)&&(t=De(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Nt,Et).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=Xe[e+" "];return t||(t=new RegExp("(^|"+at+")"+e+"("+at+"|$)"))&&Xe(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Qe&&e.getAttribute("class")||"")})},ATTR:function(n,r,o){return function(e){var t=St.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===o:"!="===r?t!==o:"^="===r?o&&0===t.indexOf(o):"*="===r?o&&-1<t.indexOf(o):"$="===r?o&&t.slice(-o.length)===o:"~="===r?-1<(" "+t+" ").indexOf(o):"|="===r&&(t===o||t.slice(0,o.length+1)===o+"-"))}},CHILD:function(m,e,t,g,p){var h="nth"!==m.slice(0,3),v="last"!==m.slice(-4),y="of-type"===e;return 1===g&&0===p?function(e){return!!e.parentNode}:function(e,t,n){var r,o,i,a,u,s,c=h!==v?"nextSibling":"previousSibling",l=e.parentNode,f=y&&e.nodeName.toLowerCase(),d=!n&&!y;if(l){if(h){for(;c;){for(i=e;i=i[c];)if(y?i.nodeName.toLowerCase()===f:1===i.nodeType)return!1;s=c="only"===m&&!s&&"nextSibling"}return!0}if(s=[v?l.firstChild:l.lastChild],v&&d){for(u=(r=(o=l[qe]||(l[qe]={}))[m]||[])[0]===We&&r[1],a=r[0]===We&&r[2],i=u&&l.childNodes[u];i=++u&&i&&i[c]||(a=u=0)||s.pop();)if(1===i.nodeType&&++a&&i===e){o[m]=[We,u,a];break}}else if(d&&(r=(e[qe]||(e[qe]={}))[m])&&r[0]===We)a=r[1];else for(;(i=++u&&i&&i[c]||(a=u=0)||s.pop())&&((y?i.nodeName.toLowerCase()!==f:1!==i.nodeType)||!++a||(d&&((i[qe]||(i[qe]={}))[m]=[We,a]),i!==e)););return(a-=p)===g||a%g==0&&0<=a/g}}},PSEUDO:function(e,i){var t,a=_e.pseudos[e]||_e.setFilters[e.toLowerCase()]||St.error("unsupported pseudo: "+e);return a[qe]?a(i):1<a.length?(t=[e,e,"",i],_e.setFilters.hasOwnProperty(e.toLowerCase())?kt(function(e,t){for(var n,r=a(e,i),o=r.length;o--;)e[n=it.call(e,r[o])]=!(t[n]=r[o])}):function(e){return a(e,0,t)}):a}},pseudos:{not:kt(function(e){var r=[],o=[],u=Oe(e.replace(lt,"$1"));return u[qe]?kt(function(e,t,n,r){for(var o,i=u(e,null,r,[]),a=e.length;a--;)(o=i[a])&&(e[a]=!(t[a]=o))}):function(e,t,n){return r[0]=e,u(r,null,n,o),!o.pop()}}),has:kt(function(t){return function(e){return 0<St(t,e).length}}),contains:kt(function(t){return t=t.replace(Nt,Et),function(e){return-1<(e.textContent||e.innerText||Ae(e)).indexOf(t)}}),lang:kt(function(n){return pt.test(n||"")||St.error("unsupported lang: "+n),n=n.replace(Nt,Et).toLowerCase(),function(e){var t;do{if(t=Ue?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=V.window.location&&V.window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===ze},focus:function(e){return e===Me.activeElement&&(!Me.hasFocus||Me.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!_e.pseudos.empty(e)},header:function(e){return yt.test(e.nodeName)},input:function(e){return vt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:Dt(function(){return[0]}),last:Dt(function(e,t){return[t-1]}),eq:Dt(function(e,t,n){return[n<0?n+t:n]}),even:Dt(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:Dt(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:Dt(function(e,t,n){for(var r=n<0?n+t:n;0<=--r;)e.push(r);return e}),gt:Dt(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=_e.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})_e.pseudos[Te]=At(Te);for(Te in{submit:!0,reset:!0})_e.pseudos[Te]=Rt(Te);function Bt(){}function Pt(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function It(a,e,t){var u=e.dir,s=t&&"parentNode"===u,c=Ke++;return e.first?function(e,t,n){for(;e=e[u];)if(1===e.nodeType||s)return a(e,t,n)}:function(e,t,n){var r,o,i=[We,c];if(n){for(;e=e[u];)if((1===e.nodeType||s)&&a(e,t,n))return!0}else for(;e=e[u];)if(1===e.nodeType||s){if((r=(o=e[qe]||(e[qe]={}))[u])&&r[0]===We&&r[1]===c)return i[2]=r[2];if((o[u]=i)[2]=a(e,t,n))return!0}}}function Lt(o){return 1<o.length?function(e,t,n){for(var r=o.length;r--;)if(!o[r](e,t,n))return!1;return!0}:o[0]}function Ft(e,t,n,r,o){for(var i,a=[],u=0,s=e.length,c=null!=t;u<s;u++)(i=e[u])&&(n&&!n(i,r,o)||(a.push(i),c&&t.push(u)));return a}function Mt(m,g,p,h,v,e){return h&&!h[qe]&&(h=Mt(h)),v&&!v[qe]&&(v=Mt(v,e)),kt(function(e,t,n,r){var o,i,a,u=[],s=[],c=t.length,l=e||function(e,t,n){for(var r=0,o=t.length;r<o;r++)St(e,t[r],n);return n}(g||"*",n.nodeType?[n]:n,[]),f=!m||!e&&g?l:Ft(l,u,m,n,r),d=p?v||(e?m:c||h)?[]:t:f;if(p&&p(f,d,n,r),h)for(o=Ft(d,s),h(o,[],n,r),i=o.length;i--;)(a=o[i])&&(d[s[i]]=!(f[s[i]]=a));if(e){if(v||m){if(v){for(o=[],i=d.length;i--;)(a=d[i])&&o.push(f[i]=a);v(null,d=[],o,r)}for(i=d.length;i--;)(a=d[i])&&-1<(o=v?it.call(e,a):u[i])&&(e[o]=!(t[o]=a))}}else d=Ft(d===t?d.splice(c,d.length):d),v?v(null,t,d,r):rt.apply(t,d)})}function zt(e){for(var r,t,n,o=e.length,i=_e.relative[e[0].type],a=i||_e.relative[" "],u=i?1:0,s=It(function(e){return e===r},a,!0),c=It(function(e){return-1<it.call(r,e)},a,!0),l=[function(e,t,n){return!i&&(n||t!==Pe)||((r=t).nodeType?s(e,t,n):c(e,t,n))}];u<o;u++)if(t=_e.relative[e[u].type])l=[It(Lt(l),t)];else{if((t=_e.filter[e[u].type].apply(null,e[u].matches))[qe]){for(n=++u;n<o&&!_e.relative[e[n].type];n++);return Mt(1<u&&Lt(l),1<u&&Pt(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(lt,"$1"),t,u<n&&zt(e.slice(u,n)),n<o&&zt(e=e.slice(n)),n<o&&Pt(e))}l.push(t)}return Lt(l)}Bt.prototype=_e.filters=_e.pseudos,_e.setFilters=new Bt,De=St.tokenize=function(e,t){var n,r,o,i,a,u,s,c=Ye[e+" "];if(c)return t?0:c.slice(0);for(a=e,u=[],s=_e.preFilter;a;){for(i in n&&!(r=ft.exec(a))||(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),n=!1,(r=dt.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(lt," ")}),a=a.slice(n.length)),_e.filter)!(r=ht[i].exec(a))||s[i]&&!(r=s[i](r))||(n=r.shift(),o.push({value:n,type:i,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?St.error(e):Ye(e,u).slice(0)},Oe=St.compile=function(e,t){var n,h,v,y,b,r,o=[],i=[],a=Ge[e+" "];if(!a){for(t||(t=De(e)),n=t.length;n--;)(a=zt(t[n]))[qe]?o.push(a):i.push(a);(a=Ge(e,(h=i,y=0<(v=o).length,b=0<h.length,r=function(e,t,n,r,o){var i,a,u,s=0,c="0",l=e&&[],f=[],d=Pe,m=e||b&&_e.find.TAG("*",o),g=We+=null==d?1:Math.random()||.1,p=m.length;for(o&&(Pe=t!==Me&&t);c!==p&&null!=(i=m[c]);c++){if(b&&i){for(a=0;u=h[a++];)if(u(i,t,n)){r.push(i);break}o&&(We=g)}y&&((i=!u&&i)&&s--,e&&l.push(i))}if(s+=c,y&&c!==s){for(a=0;u=v[a++];)u(l,f,t,n);if(e){if(0<s)for(;c--;)l[c]||f[c]||(f[c]=tt.call(r));f=Ft(f)}rt.apply(r,f),o&&!e&&0<f.length&&1<s+v.length&&St.uniqueSort(r)}return o&&(We=g,Pe=d),l},y?kt(r):r))).selector=e}return a},Be=St.select=function(e,t,n,r){var o,i,a,u,s,c="function"==typeof e&&e,l=!r&&De(e=c.selector||e);if(n=n||[],1===l.length){if(2<(i=l[0]=l[0].slice(0)).length&&"ID"===(a=i[0]).type&&ke.getById&&9===t.nodeType&&Ue&&_e.relative[i[1].type]){if(!(t=(_e.find.ID(a.matches[0].replace(Nt,Et),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=ht.needsContext.test(e)?0:i.length;o--&&(a=i[o],!_e.relative[u=a.type]);)if((s=_e.find[u])&&(r=s(a.matches[0].replace(Nt,Et),xt.test(i[0].type)&&Ot(t.parentNode)||t))){if(i.splice(o,1),!(e=r.length&&Pt(i)))return rt.apply(n,r),n;break}}return(c||Oe(e,l))(r,t,!Ue,n,xt.test(e)&&Ot(t.parentNode)||t),n},ke.sortStable=qe.split("").sort(Je).join("")===qe,ke.detectDuplicates=!!Le,Fe(),ke.sortDetached=!0;var Ut=Array.isArray,jt=function(e,t,n){var r,o;if(!e)return 0;if(n=n||e,e.length!==undefined){for(r=0,o=e.length;r<o;r++)if(!1===t.call(n,e[r],r,e))return 0}else for(r in e)if(e.hasOwnProperty(r)&&!1===t.call(n,e[r],r,e))return 0;return 1},Vt=function(e,t,n){var r,o;for(r=0,o=e.length;r<o;r++)if(t.call(n,e[r],r,e))return r;return-1},Ht={isArray:Ut,toArray:function(e){var t,n,r=e;if(!Ut(e))for(r=[],t=0,n=e.length;t<n;t++)r[t]=e[t];return r},each:jt,map:function(n,r){var o=[];return jt(n,function(e,t){o.push(r(e,t,n))}),o},filter:function(n,r){var o=[];return jt(n,function(e,t){r&&!r(e,t,n)||o.push(e)}),o},indexOf:function(e,t){var n,r;if(e)for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},reduce:function(e,t,n,r){var o=0;for(arguments.length<3&&(n=e[0]);o<e.length;o++)n=t.call(r,n,e[o],o);return n},findIndex:Vt,find:function(e,t,n){var r=Vt(e,t,n);return-1!==r?e[r]:undefined},last:function(e){return e[e.length-1]}},qt=/^\s*|\s*$/g,$t=function(e){return null===e||e===undefined?"":(""+e).replace(qt,"")},Wt=function(e,t){return t?!("array"!==t||!Ht.isArray(e))||typeof e===t:e!==undefined},Kt=function(e,n,r,o){o=o||this,e&&(r&&(e=e[r]),Ht.each(e,function(e,t){if(!1===n.call(o,e,t,r))return!1;Kt(e,n,r,o)}))},Xt={trim:$t,isArray:Ht.isArray,is:Wt,toArray:Ht.toArray,makeMap:function(e,t,n){var r;for(t=t||",","string"==typeof(e=e||[])&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n},each:Ht.each,map:Ht.map,grep:Ht.filter,inArray:Ht.indexOf,hasOwn:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},extend:function(e,t){for(var n,r,o,i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var u,s=arguments;for(n=1,r=s.length;n<r;n++)for(o in t=s[n])t.hasOwnProperty(o)&&(u=t[o])!==undefined&&(e[o]=u);return e},create:function(e,t,n){var r,o,i,a,u,s=this,c=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),i=e[3].match(/(^|\.)(\w+)$/i)[2],!(o=s.createNS(e[3].replace(/\.\w+$/,""),n))[i]){if("static"===e[2])return o[i]=t,void(this.onCreate&&this.onCreate(e[2],e[3],o[i]));t[i]||(t[i]=function(){},c=1),o[i]=t[i],s.extend(o[i].prototype,t),e[5]&&(r=s.resolve(e[5]).prototype,a=e[5].match(/\.(\w+)$/i)[1],u=o[i],o[i]=c?function(){return r[a].apply(this,arguments)}:function(){return this.parent=r[a],u.apply(this,arguments)},o[i].prototype[i]=o[i],s.each(r,function(e,t){o[i].prototype[t]=r[t]}),s.each(t,function(e,t){r[t]?o[i].prototype[t]=function(){return this.parent=r[t],e.apply(this,arguments)}:t!==i&&(o[i].prototype[t]=e)})),s.each(t["static"],function(e,t){o[i][t]=e})}},walk:Kt,createNS:function(e,t){var n,r;for(t=t||V.window,e=e.split("."),n=0;n<e.length;n++)t[r=e[n]]||(t[r]={}),t=t[r];return t},resolve:function(e,t){var n,r;for(t=t||V.window,n=0,r=(e=e.split(".")).length;n<r&&(t=t[e[n]]);n++);return t},explode:function(e,t){return!e||Wt(e,"array")?e:Ht.map(e.split(t||","),$t)},_addCacheSuffix:function(e){var t=fe.cacheSuffix;return t&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}},Yt=V.document,Gt=Array.prototype.push,Jt=Array.prototype.slice,Qt=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,Zt=Se.Event,en=Xt.makeMap("children,contents,next,prev"),tn=function(e){return void 0!==e},nn=function(e){return"string"==typeof e},rn=function(e,t){var n,r,o;for(o=(t=t||Yt).createElement("div"),n=t.createDocumentFragment(),o.innerHTML=e;r=o.firstChild;)n.appendChild(r);return n},on=function(e,t,n,r){var o;if(nn(t))t=rn(t,bn(e[0]));else if(t.length&&!t.nodeType){if(t=gn.makeArray(t),r)for(o=t.length-1;0<=o;o--)on(e,t[o],n,r);else for(o=0;o<t.length;o++)on(e,t[o],n,r);return e}if(t.nodeType)for(o=e.length;o--;)n.call(e[o],t);return e},an=function(e,t){return e&&t&&-1!==(" "+e.className+" ").indexOf(" "+t+" ")},un=function(e,t,n){var r,o;return t=gn(t)[0],e.each(function(){var e=this;n&&r===e.parentNode||(r=e.parentNode,o=t.cloneNode(!1),e.parentNode.insertBefore(o,e)),o.appendChild(e)}),e},sn=Xt.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),cn=Xt.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),ln={"for":"htmlFor","class":"className",readonly:"readOnly"},fn={"float":"cssFloat"},dn={},mn={},gn=function(e,t){return new gn.fn.init(e,t)},pn=/^\s*|\s*$/g,hn=function(e){return null===e||e===undefined?"":(""+e).replace(pn,"")},vn=function(e,t){var n,r,o,i;if(e)if((n=e.length)===undefined){for(r in e)if(e.hasOwnProperty(r)&&(i=e[r],!1===t.call(i,r,i)))break}else for(o=0;o<n&&(i=e[o],!1!==t.call(i,o,i));o++);return e},yn=function(e,n){var r=[];return vn(e,function(e,t){n(t,e)&&r.push(t)}),r},bn=function(e){return e?9===e.nodeType?e:e.ownerDocument:Yt};gn.fn=gn.prototype={constructor:gn,selector:"",context:null,length:0,init:function(e,t){var n,r,o=this;if(!e)return o;if(e.nodeType)return o.context=o[0]=e,o.length=1,o;if(t&&t.nodeType)o.context=t;else{if(t)return gn(e).attr(t);o.context=t=V.document}if(nn(e)){if(!(n="<"===(o.selector=e).charAt(0)&&">"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:Qt.exec(e)))return gn(t).find(e);if(n[1])for(r=rn(e,bn(t)).firstChild;r;)Gt.call(o,r),r=r.nextSibling;else{if(!(r=bn(t).getElementById(n[2])))return o;if(r.id!==n[2])return o.find(e);o.length=1,o[0]=r}}else this.add(e,!1);return o},toArray:function(){return Xt.toArray(this)},add:function(e,t){var n,r,o=this;if(nn(e))return o.add(gn(e));if(!1!==t)for(n=gn.unique(o.toArray().concat(gn.makeArray(e))),o.length=n.length,r=0;r<n.length;r++)o[r]=n[r];else Gt.apply(o,gn.makeArray(e));return o},attr:function(t,n){var e,r=this;if("object"==typeof t)vn(t,function(e,t){r.attr(e,t)});else{if(!tn(n)){if(r[0]&&1===r[0].nodeType){if((e=dn[t])&&e.get)return e.get(r[0],t);if(cn[t])return r.prop(t)?t:undefined;null===(n=r[0].getAttribute(t,2))&&(n=undefined)}return n}this.each(function(){var e;if(1===this.nodeType){if((e=dn[t])&&e.set)return void e.set(this,n);null===n?this.removeAttribute(t,2):this.setAttribute(t,n,2)}})}return r},removeAttr:function(e){return this.attr(e,null)},prop:function(e,t){var n=this;if("object"==typeof(e=ln[e]||e))vn(e,function(e,t){n.prop(e,t)});else{if(!tn(t))return n[0]&&n[0].nodeType&&e in n[0]?n[0][e]:t;this.each(function(){1===this.nodeType&&(this[e]=t)})}return n},css:function(n,r){var e,o,i=this,t=function(e){return e.replace(/-(\D)/g,function(e,t){return t.toUpperCase()})},a=function(e){return e.replace(/[A-Z]/g,function(e){return"-"+e})};if("object"==typeof n)vn(n,function(e,t){i.css(e,t)});else if(tn(r))n=t(n),"number"!=typeof r||sn[n]||(r=r.toString()+"px"),i.each(function(){var e=this.style;if((o=mn[n])&&o.set)o.set(this,r);else{try{this.style[fn[n]||n]=r}catch(t){}null!==r&&""!==r||(e.removeProperty?e.removeProperty(a(n)):e.removeAttribute(n))}});else{if(e=i[0],(o=mn[n])&&o.get)return o.get(e);if(!e.ownerDocument.defaultView)return e.currentStyle?e.currentStyle[t(n)]:"";try{return e.ownerDocument.defaultView.getComputedStyle(e,null).getPropertyValue(a(n))}catch(u){return undefined}}return i},remove:function(){for(var e,t=this.length;t--;)e=this[t],Zt.clean(e),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var e,t=this.length;t--;)for(e=this[t];e.firstChild;)e.removeChild(e.firstChild);return this},html:function(e){var t,n=this;if(tn(e)){t=n.length;try{for(;t--;)n[t].innerHTML=e}catch(r){gn(n[t]).empty().append(e)}return n}return n[0]?n[0].innerHTML:""},text:function(e){var t,n=this;if(tn(e)){for(t=n.length;t--;)"innerText"in n[t]?n[t].innerText=e:n[0].textContent=e;return n}return n[0]?n[0].innerText||n[0].textContent:""},append:function(){return on(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(e)})},prepend:function(){return on(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(e,this.firstChild)},!0)},before:function(){return this[0]&&this[0].parentNode?on(this,arguments,function(e){this.parentNode.insertBefore(e,this)}):this},after:function(){return this[0]&&this[0].parentNode?on(this,arguments,function(e){this.parentNode.insertBefore(e,this.nextSibling)},!0):this},appendTo:function(e){return gn(e).append(this),this},prependTo:function(e){return gn(e).prepend(this),this},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){return un(this,e)},wrapAll:function(e){return un(this,e,!0)},wrapInner:function(e){return this.each(function(){gn(this).contents().wrapAll(e)}),this},unwrap:function(){return this.parent().each(function(){gn(this).replaceWith(this.childNodes)})},clone:function(){var e=[];return this.each(function(){e.push(this.cloneNode(!0))}),gn(e)},addClass:function(e){return this.toggleClass(e,!0)},removeClass:function(e){return this.toggleClass(e,!1)},toggleClass:function(o,i){var e=this;return"string"!=typeof o||(-1!==o.indexOf(" ")?vn(o.split(" "),function(){e.toggleClass(this,i)}):e.each(function(e,t){var n,r;(r=an(t,o))!==i&&(n=t.className,r?t.className=hn((" "+n+" ").replace(" "+o+" "," ")):t.className+=n?" "+o:o)})),e},hasClass:function(e){return an(this[0],e)},each:function(e){return vn(this,e)},on:function(e,t){return this.each(function(){Zt.bind(this,e,t)})},off:function(e,t){return this.each(function(){Zt.unbind(this,e,t)})},trigger:function(e){return this.each(function(){"object"==typeof e?Zt.fire(this,e.type,e):Zt.fire(this,e)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new gn(Jt.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(e){var t,n,r=[];for(t=0,n=this.length;t<n;t++)gn.find(e,this[t],r);return gn(r)},filter:function(n){return gn("function"==typeof n?yn(this.toArray(),function(e,t){return n(t,e)}):gn.filter(n,this.toArray()))},closest:function(n){var r=[];return n instanceof gn&&(n=n[0]),this.each(function(e,t){for(;t;){if("string"==typeof n&&gn(t).is(n)){r.push(t);break}if(t===n){r.push(t);break}t=t.parentNode}}),gn(r)},offset:function(e){var t,n,r,o,i=0,a=0;return e?this.css(e):((t=this[0])&&(r=(n=t.ownerDocument).documentElement,t.getBoundingClientRect&&(i=(o=t.getBoundingClientRect()).left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,a=o.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:a})},push:Gt,sort:[].sort,splice:[].splice},Xt.extend(gn,{extend:Xt.extend,makeArray:function(e){return(t=e)&&t===t.window||e.nodeType?[e]:Xt.toArray(e);var t},inArray:function(e,t){var n;if(t.indexOf)return t.indexOf(e);for(n=t.length;n--;)if(t[n]===e)return n;return-1},isArray:Xt.isArray,each:vn,trim:hn,grep:yn,find:St,expr:St.selectors,unique:St.uniqueSort,text:St.getText,contains:St.contains,filter:function(e,t,n){var r=t.length;for(n&&(e=":not("+e+")");r--;)1!==t[r].nodeType&&t.splice(r,1);return t=1===t.length?gn.find.matchesSelector(t[0],e)?[t[0]]:[]:gn.find.matches(e,t)}});var Cn=function(e,t,n){var r=[],o=e[t];for("string"!=typeof n&&n instanceof gn&&(n=n[0]);o&&9!==o.nodeType;){if(n!==undefined){if(o===n)break;if("string"==typeof n&&gn(o).is(n))break}1===o.nodeType&&r.push(o),o=o[t]}return r},xn=function(e,t,n,r){var o=[];for(r instanceof gn&&(r=r[0]);e;e=e[t])if(!n||e.nodeType===n){if(r!==undefined){if(e===r)break;if("string"==typeof r&&gn(e).is(r))break}o.push(e)}return o},wn=function(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType===n)return e;return null};vn({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Cn(e,"parentNode")},next:function(e){return wn(e,"nextSibling",1)},prev:function(e){return wn(e,"previousSibling",1)},children:function(e){return xn(e.firstChild,"nextSibling",1)},contents:function(e){return Xt.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,r){gn.fn[e]=function(t){var n=[];return this.each(function(){var e=r.call(n,this,t,n);e&&(gn.isArray(e)?n.push.apply(n,e):n.push(e))}),1<this.length&&(en[e]||(n=gn.unique(n)),0===e.indexOf("parents")&&(n=n.reverse())),n=gn(n),t?n.filter(t):n}}),vn({parentsUntil:function(e,t){return Cn(e,"parentNode",t)},nextUntil:function(e,t){return xn(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return xn(e,"previousSibling",1,t).slice(1)}},function(r,o){gn.fn[r]=function(t,e){var n=[];return this.each(function(){var e=o.call(n,this,t,n);e&&(gn.isArray(e)?n.push.apply(n,e):n.push(e))}),1<this.length&&(n=gn.unique(n),0!==r.indexOf("parents")&&"prevUntil"!==r||(n=n.reverse())),n=gn(n),e?n.filter(e):n}}),gn.fn.is=function(e){return!!e&&0<this.filter(e).length},gn.fn.init.prototype=gn.fn,gn.overrideDefaults=function(n){var r,o=function(e,t){return r=r||n(),0===arguments.length&&(e=r.element),t||(t=r.context),new o.fn.init(e,t)};return gn.extend(o,this),o};var Nn=function(n,r,e){vn(e,function(e,t){n[e]=n[e]||{},n[e][r]=t})};fe.ie&&fe.ie<8&&(Nn(dn,"get",{maxlength:function(e){var t=e.maxLength;return 2147483647===t?undefined:t},size:function(e){var t=e.size;return 20===t?undefined:t},"class":function(e){return e.className},style:function(e){var t=e.style.cssText;return 0===t.length?undefined:t}}),Nn(dn,"set",{"class":function(e,t){e.className=t},style:function(e,t){e.style.cssText=t}})),fe.ie&&fe.ie<9&&(fn["float"]="styleFloat",Nn(mn,"set",{opacity:function(e,t){var n=e.style;null===t||""===t?n.removeAttribute("filter"):(n.zoom=1,n.filter="alpha(opacity="+100*t+")")}})),gn.attrHooks=dn,gn.cssHooks=mn;var En,Sn,Tn,kn,_n,An,Rn,Dn=function(e,t){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}return undefined}(e,t);if(!n)return{major:0,minor:0};var r=function(e){return Number(t.replace(n,"$"+e))};return Bn(r(1),r(2))},On=function(){return Bn(0,0)},Bn=function(e,t){return{major:e,minor:t}},Pn={nu:Bn,detect:function(e,t){var n=String(t).toLowerCase();return 0===e.length?On():Dn(e,n)},unknown:On},In="Firefox",Ln=function(e,t){return function(){return t===e}},Fn=function(e){var t=e.current;return{current:t,version:e.version,isEdge:Ln("Edge",t),isChrome:Ln("Chrome",t),isIE:Ln("IE",t),isOpera:Ln("Opera",t),isFirefox:Ln(In,t),isSafari:Ln("Safari",t)}},Mn={unknown:function(){return Fn({current:undefined,version:Pn.unknown()})},nu:Fn,edge:q("Edge"),chrome:q("Chrome"),ie:q("IE"),opera:q("Opera"),firefox:q(In),safari:q("Safari")},zn="Windows",Un="Android",jn="Solaris",Vn="FreeBSD",Hn=function(e,t){return function(){return t===e}},qn=function(e){var t=e.current;return{current:t,version:e.version,isWindows:Hn(zn,t),isiOS:Hn("iOS",t),isAndroid:Hn(Un,t),isOSX:Hn("OSX",t),isLinux:Hn("Linux",t),isSolaris:Hn(jn,t),isFreeBSD:Hn(Vn,t)}},$n={unknown:function(){return qn({current:undefined,version:Pn.unknown()})},nu:qn,windows:q(zn),ios:q("iOS"),android:q(Un),linux:q("Linux"),osx:q("OSX"),solaris:q(jn),freebsd:q(Vn)},Wn=function(e,t){var n=String(t).toLowerCase();return X(e,function(e){return e.search(n)})},Kn=function(e,n){return Wn(e,n).map(function(e){var t=Pn.detect(e.versionRegexes,n);return{current:e.name,version:t}})},Xn=function(e,n){return Wn(e,n).map(function(e){var t=Pn.detect(e.versionRegexes,n);return{current:e.name,version:t}})},Yn=function(e,t){return-1!==e.indexOf(t)},Gn=function(e){return e.replace(/^\s+|\s+$/g,"")},Jn=function(e){return e.replace(/\s+$/g,"")},Qn=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Zn=function(t){return function(e){return Yn(e,t)}},er=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return Yn(e,"edge/")&&Yn(e,"chrome")&&Yn(e,"safari")&&Yn(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Qn],search:function(e){return Yn(e,"chrome")&&!Yn(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return Yn(e,"msie")||Yn(e,"trident")}},{name:"Opera",versionRegexes:[Qn,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Zn("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Zn("firefox")},{name:"Safari",versionRegexes:[Qn,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(Yn(e,"safari")||Yn(e,"mobile/"))&&Yn(e,"applewebkit")}}],tr=[{name:"Windows",search:Zn("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return Yn(e,"iphone")||Yn(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Zn("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Zn("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Zn("linux"),versionRegexes:[]},{name:"Solaris",search:Zn("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Zn("freebsd"),versionRegexes:[]}],nr={browsers:q(er),oses:q(tr)},rr=function(e){var t,n,r,o,i,a,u,s,c,l,f,d=nr.browsers(),m=nr.oses(),g=Kn(d,e).fold(Mn.unknown,Mn.nu),p=Xn(m,e).fold($n.unknown,$n.nu);return{browser:g,os:p,deviceType:(n=g,r=e,o=(t=p).isiOS()&&!0===/ipad/i.test(r),i=t.isiOS()&&!o,a=t.isAndroid()&&3===t.version.major,u=t.isAndroid()&&4===t.version.major,s=o||a||u&&!0===/mobile/i.test(r),c=t.isiOS()||t.isAndroid(),l=c&&!s,f=n.isSafari()&&t.isiOS()&&!1===/safari/i.test(r),{isiPad:q(o),isiPhone:q(i),isTablet:q(s),isPhone:q(l),isTouch:q(c),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:q(f)})}},or={detect:(En=function(){var e=V.navigator.userAgent;return rr(e)},Tn=!1,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Tn||(Tn=!0,Sn=En.apply(null,e)),Sn})},ir=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:q(e)}},ar={fromHtml:function(e,t){var n=(t||V.document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw V.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return ir(n.childNodes[0])},fromTag:function(e,t){var n=(t||V.document).createElement(e);return ir(n)},fromText:function(e,t){var n=(t||V.document).createTextNode(e);return ir(n)},fromDom:ir,fromPoint:function(e,t,n){var r=e.dom();return _.from(r.elementFromPoint(t,n)).map(ir)}},ur=(V.Node.ATTRIBUTE_NODE,V.Node.CDATA_SECTION_NODE,V.Node.COMMENT_NODE,V.Node.DOCUMENT_NODE),sr=(V.Node.DOCUMENT_TYPE_NODE,V.Node.DOCUMENT_FRAGMENT_NODE,V.Node.ELEMENT_NODE),cr=V.Node.TEXT_NODE,lr=(V.Node.PROCESSING_INSTRUCTION_NODE,V.Node.ENTITY_REFERENCE_NODE,V.Node.ENTITY_NODE,V.Node.NOTATION_NODE,function(e){return e.dom().nodeName.toLowerCase()}),fr=function(t){return function(e){return e.dom().nodeType===t}},dr=fr(sr),mr=fr(cr),gr=Object.keys,pr=Object.hasOwnProperty,hr=function(e,t){for(var n=gr(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i)}},vr=function(e,r){var o={};return hr(e,function(e,t){var n=r(e,t);o[n.k]=n.v}),o},yr=function(e,n){var r={},o={};return hr(e,function(e,t){(n(e,t)?r:o)[t]=e}),{t:r,f:o}},br=function(e,t){return pr.call(e,t)},Cr=function(e){return e.style!==undefined&&D(e.style.getPropertyValue)},xr=function(e,t,n){if(!(S(n)||R(n)||O(n)))throw V.console.error("Invalid call to Attr.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")},wr=function(e,t,n){xr(e.dom(),t,n)},Nr=function(e,t){var n=e.dom();hr(t,function(e,t){xr(n,t,e)})},Er=function(e,t){var n=e.dom().getAttribute(t);return null===n?undefined:n},Sr=function(e,t){e.dom().removeAttribute(t)},Tr=function(e,t){var n=e.dom();hr(t,function(e,t){!function(e,t,n){if(!S(n))throw V.console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);Cr(e)&&e.style.setProperty(t,n)}(n,t,e)})},kr=function(e,t){var n,r,o=e.dom(),i=V.window.getComputedStyle(o).getPropertyValue(t),a=""!==i||(r=mr(n=e)?n.dom().parentNode:n.dom())!==undefined&&null!==r&&r.ownerDocument.body.contains(r)?i:_r(o,t);return null===a?undefined:a},_r=function(e,t){return Cr(e)?e.style.getPropertyValue(t):""},Ar=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];if(t.length!==n.length)throw new Error('Wrong number of arguments to struct. Expected "['+t.length+']", got '+n.length+" arguments");var r={};return z(t,function(e,t){r[e]=q(n[t])}),r}},Rr=function(e,t){for(var n=[],r=function(e){return n.push(e),t(e)},o=t(e);(o=o.bind(r)).isSome(););return n},Dr=function(){return oe.getOrDie("Node")},Or=function(e,t,n){return 0!=(e.compareDocumentPosition(t)&n)},Br=function(e,t){return Or(e,t,Dr().DOCUMENT_POSITION_CONTAINED_BY)},Pr=sr,Ir=ur,Lr=function(e,t){var n=e.dom();if(n.nodeType!==Pr)return!1;var r=n;if(r.matches!==undefined)return r.matches(t);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(t);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(t);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},Fr=function(e){return e.nodeType!==Pr&&e.nodeType!==Ir||0===e.childElementCount},Mr=function(e,t){return e.dom()===t.dom()},zr=or.detect().browser.isIE()?function(e,t){return Br(e.dom(),t.dom())}:function(e,t){var n=e.dom(),r=t.dom();return n!==r&&n.contains(r)},Ur=function(e){return ar.fromDom(e.dom().ownerDocument)},jr=function(e){return ar.fromDom(e.dom().ownerDocument.defaultView)},Vr=function(e){return _.from(e.dom().parentNode).map(ar.fromDom)},Hr=function(e){return _.from(e.dom().previousSibling).map(ar.fromDom)},qr=function(e){return _.from(e.dom().nextSibling).map(ar.fromDom)},$r=function(e){return t=Rr(e,Hr),(n=B.call(t,0)).reverse(),n;var t,n},Wr=function(e){return Rr(e,qr)},Kr=function(e){return W(e.dom().childNodes,ar.fromDom)},Xr=function(e,t){var n=e.dom().childNodes;return _.from(n[t]).map(ar.fromDom)},Yr=function(e){return Xr(e,0)},Gr=function(e){return Xr(e,e.dom().childNodes.length-1)},Jr=(Ar("element","offset"),or.detect().browser),Qr=function(e){return X(e,dr)},Zr={getPos:function(e,t,n){var r,o,i,a=0,u=0,s=e.ownerDocument;if(n=n||e,t){if(n===e&&t.getBoundingClientRect&&"static"===kr(ar.fromDom(e),"position"))return{x:a=(o=t.getBoundingClientRect()).left+(s.documentElement.scrollLeft||e.scrollLeft)-s.documentElement.clientLeft,y:u=o.top+(s.documentElement.scrollTop||e.scrollTop)-s.documentElement.clientTop};for(r=t;r&&r!==n&&r.nodeType;)a+=r.offsetLeft||0,u+=r.offsetTop||0,r=r.offsetParent;for(r=t.parentNode;r&&r!==n&&r.nodeType;)a-=r.scrollLeft||0,u-=r.scrollTop||0,r=r.parentNode;u+=(i=ar.fromDom(t),Jr.isFirefox()&&"table"===lr(i)?Qr(Kr(i)).filter(function(e){return"caption"===lr(e)}).bind(function(o){return Qr(Wr(o)).map(function(e){var t=e.dom().offsetTop,n=o.dom().offsetTop,r=o.dom().offsetHeight;return t<=n?-r:0})}).getOr(0):0)}return{x:a,y:u}}},eo={},to={exports:eo};kn=undefined,_n=eo,An=to,Rn=undefined,function(e){"object"==typeof _n&&void 0!==An?An.exports=e():"function"==typeof kn&&kn.amd?kn([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=e()}(function(){return function i(a,u,s){function c(t,e){if(!u[t]){if(!a[t]){var n="function"==typeof Rn&&Rn;if(!e&&n)return n(t,!0);if(l)return l(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var o=u[t]={exports:{}};a[t][0].call(o.exports,function(e){return c(a[t][1][e]||e)},o,o.exports,i,a,u,s)}return u[t].exports}for(var l="function"==typeof Rn&&Rn,e=0;e<s.length;e++)c(s[e]);return c}({1:[function(e,t,n){var r,o,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(iE){try{return r.call(null,e,0)}catch(iE){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(iE){r=a}try{o="function"==typeof clearTimeout?clearTimeout:u}catch(iE){o=u}}();var c,l=[],f=!1,d=-1;function m(){f&&c&&(f=!1,c.length?l=c.concat(l):d=-1,l.length&&g())}function g(){if(!f){var e=s(m);f=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,f=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===u||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(iE){try{return o.call(null,e)}catch(iE){return o.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function h(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new p(e,t)),1!==l.length||f||s(g)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(e,f,t){(function(n){!function(e){var t=setTimeout;function r(){}function i(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],l(e,this)}function o(n,r){for(;3===n._state;)n=n._value;0!==n._state?(n._handled=!0,i._immediateFn(function(){var e=1===n._state?r.onFulfilled:r.onRejected;if(null!==e){var t;try{t=e(n._value)}catch(iE){return void u(r.promise,iE)}a(r.promise,t)}else(1===n._state?a:u)(r.promise,n._value)})):n._deferreds.push(r)}function a(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof i)return e._state=3,e._value=t,void s(e);if("function"==typeof n)return void l((r=n,o=t,function(){r.apply(o,arguments)}),e)}e._state=1,e._value=t,s(e)}catch(iE){u(e,iE)}var r,o}function u(e,t){e._state=2,e._value=t,s(e)}function s(e){2===e._state&&0===e._deferreds.length&&i._immediateFn(function(){e._handled||i._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)o(e,e._deferreds[t]);e._deferreds=null}function c(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function l(e,t){var n=!1;try{e(function(e){n||(n=!0,a(t,e))},function(e){n||(n=!0,u(t,e))})}catch(r){if(n)return;n=!0,u(t,r)}}i.prototype["catch"]=function(e){return this.then(null,e)},i.prototype.then=function(e,t){var n=new this.constructor(r);return o(this,new c(e,t,n)),n},i.all=function(e){var s=Array.prototype.slice.call(e);return new i(function(o,i){if(0===s.length)return o([]);var a=s.length;function u(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){u(t,e)},i)}s[t]=e,0==--a&&o(s)}catch(r){i(r)}}for(var e=0;e<s.length;e++)u(e,s[e])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(e){e(t)})},i.reject=function(n){return new i(function(e,t){t(n)})},i.race=function(o){return new i(function(e,t){for(var n=0,r=o.length;n<r;n++)o[n].then(e,t)})},i._immediateFn="function"==typeof n?function(e){n(e)}:function(e){t(e,0)},i._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},i._setImmediateFn=function(e){i._immediateFn=e},i._setUnhandledRejectionFn=function(e){i._unhandledRejectionFn=e},void 0!==f&&f.exports?f.exports=i:e.Promise||(e.Promise=i)}(this)}).call(this,e("timers").setImmediate)},{timers:3}],3:[function(s,e,c){(function(e,t){var r=s("process/browser.js").nextTick,n=Function.prototype.apply,o=Array.prototype.slice,i={},a=0;function u(e,t){this._id=e,this._clearFn=t}c.setTimeout=function(){return new u(n.call(setTimeout,window,arguments),clearTimeout)},c.setInterval=function(){return new u(n.call(setInterval,window,arguments),clearInterval)},c.clearTimeout=c.clearInterval=function(e){e.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id)},c.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},c.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},c._unrefActive=c.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},c.setImmediate="function"==typeof e?e:function(e){var t=a++,n=!(arguments.length<2)&&o.call(arguments,1);return i[t]=!0,r(function(){i[t]&&(n?e.apply(null,n):e.call(null),c.clearImmediate(t))}),t},c.clearImmediate="function"==typeof t?t:function(e){delete i[e]}}).call(this,s("timers").setImmediate,s("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(e,t,n){var r=e("promise-polyfill"),o="undefined"!=typeof window?window:Function("return this;")();t.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)});var no=to.exports.boltExport,ro=function(e){var n=_.none(),t=[],r=function(e){o()?a(e):t.push(e)},o=function(){return n.isSome()},i=function(e){z(e,a)},a=function(t){n.each(function(e){V.setTimeout(function(){t(e)},0)})};return e(function(e){n=_.some(e),i(t),t=[]}),{get:r,map:function(n){return ro(function(t){r(function(e){t(n(e))})})},isReady:o}},oo={nu:ro,pure:function(t){return ro(function(e){e(t)})}},io=function(e){V.setTimeout(function(){throw e},0)},ao=function(n){var e=function(e){n().then(e,io)};return{map:function(e){return ao(function(){return n().then(e)})},bind:function(t){return ao(function(){return n().then(function(e){return t(e).toPromise()})})},anonBind:function(e){return ao(function(){return n().then(function(){return e.toPromise()})})},toLazy:function(){return oo.nu(e)},toCached:function(){var e=null;return ao(function(){return null===e&&(e=n()),e})},toPromise:n,get:e}},uo={nu:function(e){return ao(function(){return new no(e)})},pure:function(e){return ao(function(){return no.resolve(e)})}},so=function(a,e){return e(function(r){var o=[],i=0;0===a.length?r([]):z(a,function(e,t){var n;e.get((n=t,function(e){o[n]=e,++i>=a.length&&r(o)}))})})},co=function(e){return so(e,uo.nu)},lo=function(n){return{is:function(e){return n===e},isValue:C,isError:b,getOr:q(n),getOrThunk:q(n),getOrDie:q(n),or:function(e){return lo(n)},orThunk:function(e){return lo(n)},fold:function(e,t){return t(n)},map:function(e){return lo(e(n))},mapError:function(e){return lo(n)},each:function(e){e(n)},bind:function(e){return e(n)},exists:function(e){return e(n)},forall:function(e){return e(n)},toOption:function(){return _.some(n)}}},fo=function(n){return{is:b,isValue:b,isError:C,getOr:$,getOrThunk:function(e){return e()},getOrDie:function(){return e=String(n),function(){throw new Error(e)}();var e},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,t){return e(n)},map:function(e){return fo(n)},mapError:function(e){return fo(e(n))},each:o,bind:function(e){return fo(n)},exists:b,forall:C,toOption:_.none}},mo={value:lo,error:fo,fromOption:function(e,t){return e.fold(function(){return fo(t)},lo)}};function go(e,u){var t=e,n=function(e,t,n,r){var o,i;if(e){if(!r&&e[t])return e[t];if(e!==u){if(o=e[n])return o;for(i=e.parentNode;i&&i!==u;i=i.parentNode)if(o=i[n])return o}}};this.current=function(){return t},this.next=function(e){return t=n(t,"firstChild","nextSibling",e)},this.prev=function(e){return t=n(t,"lastChild","previousSibling",e)},this.prev2=function(e){return t=function(e,t,n,r){var o,i,a;if(e){if(o=e[n],u&&o===u)return;if(o){if(!r)for(a=o[t];a;a=a[t])if(!a[t])return a;return o}if((i=e.parentNode)&&i!==u)return i}}(t,"lastChild","previousSibling",e)}}var po,ho,vo,yo=function(t){var n;return function(e){return(n=n||function(e,t){for(var n={},r=0,o=e.length;r<o;r++){var i=e[r];n[String(i)]=t(i,r)}return n}(t,q(!0))).hasOwnProperty(lr(e))}},bo=yo(["h1","h2","h3","h4","h5","h6"]),Co=yo(["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"]),xo=function(e){return dr(e)&&!Co(e)},wo=function(e){return dr(e)&&"br"===lr(e)},No=yo(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),Eo=yo(["ul","ol","dl"]),So=yo(["li","dd","dt"]),To=yo(["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param","embed","source","wbr","track"]),ko=yo(["thead","tbody","tfoot"]),_o=yo(["td","th"]),Ao=yo(["pre","script","textarea","style"]),Ro=function(t){return function(e){return!!e&&e.nodeType===t}},Do=Ro(1),Oo=function(e){var r=e.toLowerCase().split(" ");return function(e){var t,n;if(e&&e.nodeType)for(n=e.nodeName.toLowerCase(),t=0;t<r.length;t++)if(n===r[t])return!0;return!1}},Bo=function(t){return function(e){if(Do(e)){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}},Po=Ro(3),Io=Ro(8),Lo=Ro(9),Fo=Ro(11),Mo=Oo("br"),zo=Bo("true"),Uo=Bo("false"),jo={isText:Po,isElement:Do,isComment:Io,isDocument:Lo,isDocumentFragment:Fo,isBr:Mo,isContentEditableTrue:zo,isContentEditableFalse:Uo,isRestrictedNode:function(e){return!!e&&!Object.getPrototypeOf(e)},matchNodeNames:Oo,hasPropValue:function(t,n){return function(e){return Do(e)&&e[t]===n}},hasAttribute:function(t,e){return function(e){return Do(e)&&e.hasAttribute(t)}},hasAttributeValue:function(t,n){return function(e){return Do(e)&&e.getAttribute(t)===n}},matchStyleValues:function(r,e){var o=e.toLowerCase().split(" ");return function(e){var t;if(Do(e))for(t=0;t<o.length;t++){var n=e.ownerDocument.defaultView.getComputedStyle(e,null);if((n?n.getPropertyValue(r):null)===o[t])return!0}return!1}},isBogus:function(e){return Do(e)&&e.hasAttribute("data-mce-bogus")},isBogusAll:function(e){return Do(e)&&"all"===e.getAttribute("data-mce-bogus")},isTable:function(e){return Do(e)&&"TABLE"===e.tagName}},Vo=function(e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},Ho=function(e,t){var n,r=t.childNodes;if(!jo.isElement(t)||!Vo(t)){for(n=r.length-1;0<=n;n--)Ho(e,r[n]);if(!1===jo.isDocument(t)){if(jo.isText(t)&&0<t.nodeValue.length){var o=Xt.trim(t.nodeValue).length;if(e.isBlock(t.parentNode)||0<o)return;if(0===o&&(a=(i=t).previousSibling&&"SPAN"===i.previousSibling.nodeName,u=i.nextSibling&&"SPAN"===i.nextSibling.nodeName,a&&u))return}else if(jo.isElement(t)&&(1===(r=t.childNodes).length&&Vo(r[0])&&t.parentNode.insertBefore(r[0],t),r.length||To(ar.fromDom(t))))return;e.remove(t)}var i,a,u;return t}},qo={trimNode:Ho},$o=Xt.makeMap,Wo=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ko=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Xo=/[<>&\"\']/g,Yo=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,Go={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};ho={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},vo={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"};var Jo=function(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n<e.length;n+=2)r=String.fromCharCode(parseInt(e[n],t)),ho[r]||(o="&"+e[n+1]+";",i[r]=o,i[o]=r);return i}};po=Jo("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);var Qo=function(e,t){return e.replace(t?Wo:Ko,function(e){return ho[e]||e})},Zo=function(e,t){return e.replace(t?Wo:Ko,function(e){return 1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":ho[e]||"&#"+e.charCodeAt(0)+";"})},ei=function(e,t,n){return n=n||po,e.replace(t?Wo:Ko,function(e){return ho[e]||n[e]||e})},ti={encodeRaw:Qo,encodeAllRaw:function(e){return(""+e).replace(Xo,function(e){return ho[e]||e})},encodeNumeric:Zo,encodeNamed:ei,getEncodeFunc:function(e,t){var n=Jo(t)||po,r=$o(e.replace(/\+/g,","));return r.named&&r.numeric?function(e,t){return e.replace(t?Wo:Ko,function(e){return ho[e]!==undefined?ho[e]:n[e]!==undefined?n[e]:1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":"&#"+e.charCodeAt(0)+";"})}:r.named?t?function(e,t){return ei(e,t,n)}:ei:r.numeric?Zo:Qo},decode:function(e){return e.replace(Yo,function(e,t){return t?65535<(t="x"===t.charAt(0).toLowerCase()?parseInt(t.substr(1),16):parseInt(t,10))?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):Go[t]||String.fromCharCode(t):vo[e]||po[e]||(n=e,(r=ar.fromTag("div").dom()).innerHTML=n,r.textContent||r.innerText||n);var n,r})}},ni={},ri={},oi=Xt.makeMap,ii=Xt.each,ai=Xt.extend,ui=Xt.explode,si=Xt.inArray,ci=function(e,t){return(e=Xt.trim(e))?e.split(t||" "):[]},li=function(e){var u,t,n,r,o,i,s={},a=function(e,t,n){var r,o,i,a=function(e,t){var n,r,o={};for(n=0,r=e.length;n<r;n++)o[e[n]]=t||{};return o};for(t=t||"","string"==typeof(n=n||[])&&(n=ci(n)),r=(e=ci(e)).length;r--;)i={attributes:a(o=ci([u,t].join(" "))),attributesOrder:o,children:a(n,ri)},s[e[r]]=i},c=function(e,t){var n,r,o,i;for(n=(e=ci(e)).length,t=ci(t);n--;)for(r=s[e[n]],o=0,i=t.length;o<i;o++)r.attributes[t[o]]={},r.attributesOrder.push(t[o])};return ni[e]?ni[e]:(u="id accesskey class dir lang style tabindex title role",t="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",n="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment","html4"!==e&&(u+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",t+=" article aside details dialog figure main header footer hgroup section nav",n+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!==e&&(u+=" xml:lang",n=[n,i="acronym applet basefont big font strike tt"].join(" "),ii(ci(i),function(e){a(e,"",n)}),t=[t,o="center dir isindex noframes"].join(" "),r=[t,n].join(" "),ii(ci(o),function(e){a(e,"",r)})),r=r||[t,n].join(" "),a("html","manifest","head body"),a("head","","base command link meta noscript script style title"),a("title hr noscript br"),a("base","href target"),a("link","href rel media hreflang type sizes hreflang"),a("meta","name http-equiv content charset"),a("style","media type scoped"),a("script","src async defer type charset"),a("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",r),a("address dt dd div caption","",r),a("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",n),a("blockquote","cite",r),a("ol","reversed start type","li"),a("ul","","li"),a("li","value",r),a("dl","","dt dd"),a("a","href target rel media hreflang type",n),a("q","cite",n),a("ins del","cite datetime",r),a("img","src sizes srcset alt usemap ismap width height"),a("iframe","src name width height",r),a("embed","src type width height"),a("object","data type typemustmatch name usemap form width height",[r,"param"].join(" ")),a("param","name value"),a("map","name",[r,"area"].join(" ")),a("area","alt coords shape href target rel media hreflang type"),a("table","border","caption colgroup thead tfoot tbody tr"+("html4"===e?" col":"")),a("colgroup","span","col"),a("col","span"),a("tbody thead tfoot","","tr"),a("tr","","td th"),a("td","colspan rowspan headers",r),a("th","colspan rowspan headers scope abbr",r),a("form","accept-charset action autocomplete enctype method name novalidate target",r),a("fieldset","disabled form name",[r,"legend"].join(" ")),a("label","form for",n),a("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),a("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===e?r:n),a("select","disabled form multiple name required size","option optgroup"),a("optgroup","disabled label","option"),a("option","disabled label selected value"),a("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),a("menu","type label",[r,"li"].join(" ")),a("noscript","",r),"html4"!==e&&(a("wbr"),a("ruby","",[n,"rt rp"].join(" ")),a("figcaption","",r),a("mark rt rp summary bdi","",n),a("canvas","width height",r),a("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[r,"track source"].join(" ")),a("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[r,"track source"].join(" ")),a("picture","","img source"),a("source","src srcset type media sizes"),a("track","kind src srclang label default"),a("datalist","",[n,"option"].join(" ")),a("article section nav aside main header footer","",r),a("hgroup","","h1 h2 h3 h4 h5 h6"),a("figure","",[r,"figcaption"].join(" ")),a("time","datetime",n),a("dialog","open",r),a("command","type label icon disabled checked radiogroup command"),a("output","for form name",n),a("progress","value max",n),a("meter","value min max low high optimum",n),a("details","open",[r,"summary"].join(" ")),a("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!==e&&(c("script","language xml:space"),c("style","xml:space"),c("object","declare classid code codebase codetype archive standby align border hspace vspace"),c("embed","align name hspace vspace"),c("param","valuetype type"),c("a","charset name rev shape coords"),c("br","clear"),c("applet","codebase archive code object alt name width height align hspace vspace"),c("img","name longdesc align border hspace vspace"),c("iframe","longdesc frameborder marginwidth marginheight scrolling align"),c("font basefont","size color face"),c("input","usemap align"),c("select","onchange"),c("textarea"),c("h1 h2 h3 h4 h5 h6 div p legend caption","align"),c("ul","type compact"),c("li","type"),c("ol dl menu dir","compact"),c("pre","width xml:space"),c("hr","align noshade size width"),c("isindex","prompt"),c("table","summary width frame rules cellspacing cellpadding align bgcolor"),c("col","width align char charoff valign"),c("colgroup","width align char charoff valign"),c("thead","align char charoff valign"),c("tr","align char charoff valign bgcolor"),c("th","axis align char charoff valign nowrap bgcolor width height"),c("form","accept"),c("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),c("tfoot","align char charoff valign"),c("tbody","align char charoff valign"),c("area","nohref"),c("body","background bgcolor text link vlink alink")),"html4"!==e&&(c("input button select textarea","autofocus"),c("input textarea","placeholder"),c("a","download"),c("link script img","crossorigin"),c("iframe","sandbox seamless allowfullscreen")),ii(ci("a form meter progress dfn"),function(e){s[e]&&delete s[e].children[e]}),delete s.caption.children.table,delete s.script,ni[e]=s)},fi=function(e,n){var r;return e&&(r={},"string"==typeof e&&(e={"*":e}),ii(e,function(e,t){r[t]=r[t.toUpperCase()]="map"===n?oi(e,/[, ]/):ui(e,/[, ]/)})),r};function di(i){var e,t,n,r,o,a,u,s,c,l,f,d,m,N={},g={},E=[],p={},h={},v=function(e,t,n){var r=i[e];return r?r=oi(r,/[, ]/,oi(r.toUpperCase(),/[, ]/)):(r=ni[e])||(r=oi(t," ",oi(t.toUpperCase()," ")),r=ai(r,n),ni[e]=r),r};n=li((i=i||{}).schema),!1===i.verify_html&&(i.valid_elements="*[*]"),e=fi(i.valid_styles),t=fi(i.invalid_styles,"map"),s=fi(i.valid_classes,"map"),r=v("whitespace_elements","pre script noscript style textarea video audio iframe object code"),o=v("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),a=v("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),u=v("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),l=v("non_empty_elements","td th iframe video audio object script pre code",a),f=v("move_caret_before_on_enter_elements","table",l),d=v("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),c=v("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary",d),m=v("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),ii((i.special||"script noscript iframe noframes noembed title style textarea xmp").split(" "),function(e){h[e]=new RegExp("</"+e+"[^>]*>","gi")});var S=function(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")},y=function(e){var t,n,r,o,i,a,u,s,c,l,f,d,m,g,p,h,v,y,b,C=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,x=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,w=/[*?+]/;if(e)for(e=ci(e,","),N["@"]&&(h=N["@"].attributes,v=N["@"].attributesOrder),t=0,n=e.length;t<n;t++)if(i=C.exec(e[t])){if(g=i[1],c=i[2],p=i[3],s=i[5],a={attributes:d={},attributesOrder:m=[]},"#"===g&&(a.paddEmpty=!0),"-"===g&&(a.removeEmpty=!0),"!"===i[4]&&(a.removeEmptyAttrs=!0),h){for(y in h)d[y]=h[y];m.push.apply(m,v)}if(s)for(r=0,o=(s=ci(s,"|")).length;r<o;r++)if(i=x.exec(s[r])){if(u={},f=i[1],l=i[2].replace(/[\\:]:/g,":"),g=i[3],b=i[4],"!"===f&&(a.attributesRequired=a.attributesRequired||[],a.attributesRequired.push(l),u.required=!0),"-"===f){delete d[l],m.splice(si(m,l),1);continue}g&&("="===g&&(a.attributesDefault=a.attributesDefault||[],a.attributesDefault.push({name:l,value:b}),u.defaultValue=b),":"===g&&(a.attributesForced=a.attributesForced||[],a.attributesForced.push({name:l,value:b}),u.forcedValue=b),"<"===g&&(u.validValues=oi(b,"?"))),w.test(l)?(a.attributePatterns=a.attributePatterns||[],u.pattern=S(l),a.attributePatterns.push(u)):(d[l]||m.push(l),d[l]=u)}h||"@"!==c||(h=d,v=m),p&&(a.outputName=c,N[p]=a),w.test(c)?(a.pattern=S(c),E.push(a)):N[c]=a}},b=function(e){N={},E=[],y(e),ii(n,function(e,t){g[t]=e.children})},C=function(e){var a=/^(~)?(.+)$/;e&&(ni.text_block_elements=ni.block_elements=null,ii(ci(e,","),function(e){var t=a.exec(e),n="~"===t[1],r=n?"span":"div",o=t[2];if(g[o]=g[r],p[o]=r,n||(c[o.toUpperCase()]={},c[o]={}),!N[o]){var i=N[r];delete(i=ai({},i)).removeEmptyAttrs,delete i.removeEmpty,N[o]=i}ii(g,function(e,t){e[r]&&(g[t]=e=ai({},g[t]),e[o]=e[r])})}))},x=function(e){var o=/^([+\-]?)(\w+)\[([^\]]+)\]$/;ni[i.schema]=null,e&&ii(ci(e,","),function(e){var t,n,r=o.exec(e);r&&(n=r[1],t=n?g[r[2]]:g[r[2]]={"#comment":{}},t=g[r[2]],ii(ci(r[3],"|"),function(e){"-"===n?delete t[e]:t[e]={}}))})},w=function(e){var t,n=N[e];if(n)return n;for(t=E.length;t--;)if((n=E[t]).pattern.test(e))return n};return i.valid_elements?b(i.valid_elements):(ii(n,function(e,t){N[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},g[t]=e.children}),"html5"!==i.schema&&ii(ci("strong/b em/i"),function(e){e=ci(e,"/"),N[e[1]].outputName=e[0]}),ii(ci("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){N[e]&&(N[e].removeEmpty=!0)}),ii(ci("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),function(e){N[e].paddEmpty=!0}),ii(ci("span"),function(e){N[e].removeEmptyAttrs=!0})),C(i.custom_elements),x(i.valid_children),y(i.extended_valid_elements),x("+ol[ul|ol],+ul[ul|ol]"),ii({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},function(e,t){N[t]&&(N[t].parentsRequired=ci(e))}),i.invalid_elements&&ii(ui(i.invalid_elements),function(e){N[e]&&delete N[e]}),w("span")||y("span[!data-mce-type|*]"),{children:g,elements:N,getValidStyles:function(){return e},getValidClasses:function(){return s},getBlockElements:function(){return c},getInvalidStyles:function(){return t},getShortEndedElements:function(){return a},getTextBlockElements:function(){return d},getTextInlineElements:function(){return m},getBoolAttrs:function(){return u},getElementRule:w,getSelfClosingElements:function(){return o},getNonEmptyElements:function(){return l},getMoveCaretBeforeOnEnterElements:function(){return f},getWhiteSpaceElements:function(){return r},getSpecialElements:function(){return h},isValidChild:function(e,t){var n=g[e.toLowerCase()];return!(!n||!n[t.toLowerCase()])},isValid:function(e,t){var n,r,o=w(e);if(o){if(!t)return!0;if(o.attributes[t])return!0;if(n=o.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},getCustomElements:function(){return p},addValidElements:y,setValidElements:b,addCustomElements:C,addValidChildren:x}}var mi=function(e,t,n,r){var o=function(e){return 1<(e=parseInt(e,10).toString(16)).length?e:"0"+e};return"#"+o(t)+o(n)+o(r)};function gi(b,e){var C,t,c,l,x=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,w=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,N=/\s*([^:]+):\s*([^;]+);?/g,E=/\s+$/,S={},T="\ufeff";for(b=b||{},e&&(c=e.getValidStyles(),l=e.getInvalidStyles()),t=("\\\" \\' \\; \\: ; : "+T).split(" "),C=0;C<t.length;C++)S[t[C]]=T+C,S[T+C]=t[C];return{toHex:function(e){return e.replace(x,mi)},parse:function(e){var t,n,r,o,i,a,u,s,c={},l=b.url_converter,f=b.url_converter_scope||this,d=function(e,t,n){var r,o,i,a;if((r=c[e+"-top"+t])&&(o=c[e+"-right"+t])&&(i=c[e+"-bottom"+t])&&(a=c[e+"-left"+t])){var u=[r,o,i,a];for(C=u.length-1;C--&&u[C]===u[C+1];);-1<C&&n||(c[e+t]=-1===C?u[0]:u.join(" "),delete c[e+"-top"+t],delete c[e+"-right"+t],delete c[e+"-bottom"+t],delete c[e+"-left"+t])}},m=function(e){var t,n=c[e];if(n){for(t=(n=n.split(" ")).length;t--;)if(n[t]!==n[0])return!1;return c[e]=n[0],!0}},g=function(e){return o=!0,S[e]},p=function(e,t){return o&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return S[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e},h=function(e){return String.fromCharCode(parseInt(e.slice(1),16))},v=function(e){return e.replace(/\\[0-9a-f]+/gi,h)},y=function(e,t,n,r,o,i){if(o=o||i)return"'"+(o=p(o)).replace(/\'/g,"\\'")+"'";if(t=p(t||n||r),!b.allow_script_urls){var a=t.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(a))return"";if(!b.allow_svg_data_urls&&/^data:image\/svg/i.test(a))return""}return l&&(t=l.call(f,t,"style")),"url('"+t.replace(/\'/g,"\\'")+"')"};if(e){for(e=(e=e.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,g).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,g)});t=N.exec(e);)if(N.lastIndex=t.index+t[0].length,n=t[1].replace(E,"").toLowerCase(),r=t[2].replace(E,""),n&&r){if(n=v(n),r=v(r),-1!==n.indexOf(T)||-1!==n.indexOf('"'))continue;if(!b.allow_script_urls&&("behavior"===n||/expression\s*\(|\/\*|\*\//.test(r)))continue;"font-weight"===n&&"700"===r?r="bold":"color"!==n&&"background-color"!==n||(r=r.toLowerCase()),r=(r=r.replace(x,mi)).replace(w,y),c[n]=o?p(r,!0):r}d("border","",!0),d("border","-width"),d("border","-color"),d("border","-style"),d("padding",""),d("margin",""),i="border",u="border-style",s="border-color",m(a="border-width")&&m(u)&&m(s)&&(c[i]=c[a]+" "+c[u]+" "+c[s],delete c[a],delete c[u],delete c[s]),"medium none"===c.border&&delete c.border,"none"===c["border-image"]&&delete c["border-image"]}return c},serialize:function(i,e){var t,n,r,o,a,u="",s=function(e){var t,n,r,o;if(t=c[e])for(n=0,r=t.length;n<r;n++)e=t[n],(o=i[e])&&(u+=(0<u.length?" ":"")+e+": "+o+";")};if(e&&c)s("*"),s(e);else for(t in i)!(n=i[t])||l&&(r=t,o=e,a=void 0,(a=l["*"])&&a[r]||(a=l[o])&&a[r])||(u+=(0<u.length?" ":"")+t+": "+n+";");return u}}}var pi,hi=Xt.each,vi=Xt.grep,yi=fe.ie,bi=/^([a-z0-9],?)+$/i,Ci=/^[ \t\r\n]*$/,xi=function(n,r,o){var e={},i=r.keep_values,t={set:function(e,t,n){r.url_converter&&(t=r.url_converter.call(r.url_converter_scope||o(),t,n,e[0])),e.attr("data-mce-"+n,t).attr(n,t)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}};return e={style:{set:function(e,t){null===t||"object"!=typeof t?(i&&e.attr("data-mce-style",t),e.attr("style",t)):e.css(t)},get:function(e){var t=e.attr("data-mce-style")||e.attr("style");return t=n.serialize(n.parse(t),e[0].nodeName)}}},i&&(e.href=e.src=t),e},wi=function(e,t){var n=t.attr("style"),r=e.serialize(e.parse(n),t[0].nodeName);r||(r=null),t.attr("data-mce-style",r)},Ni=function(e,t){var n,r,o=0;if(e)for(n=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)r=e.nodeType,(!t||3!==r||r!==n&&e.nodeValue.length)&&(o++,n=r);return o};function Ei(a,u){var s,c=this;void 0===u&&(u={});var r={},i=V.window,o={},t=0,e=function(m,g){void 0===g&&(g={});var p,h=0,v={};p=g.maxLoadTime||5e3;var y=function(e){m.getElementsByTagName("head")[0].appendChild(e)},n=function(e,t,n){var o,r,i,a,u=function(){for(var e=a.passed,t=e.length;t--;)e[t]();a.status=2,a.passed=[],a.failed=[]},s=function(){for(var e=a.failed,t=e.length;t--;)e[t]();a.status=3,a.passed=[],a.failed=[]},c=function(e,t){e()||((new Date).getTime()-i<p?he.setTimeout(t):s())},l=function(){c(function(){for(var e,t,n=m.styleSheets,r=n.length;r--;)if((t=(e=n[r]).ownerNode?e.ownerNode:e.owningElement)&&t.id===o.id)return u(),!0},l)},f=function(){c(function(){try{var e=r.sheet.cssRules;return u(),!!e}catch(t){}},f)};if(e=Xt._addCacheSuffix(e),v[e]?a=v[e]:(a={passed:[],failed:[]},v[e]=a),t&&a.passed.push(t),n&&a.failed.push(n),1!==a.status)if(2!==a.status)if(3!==a.status){if(a.status=1,(o=m.createElement("link")).rel="stylesheet",o.type="text/css",o.id="u"+h++,o.async=!1,o.defer=!1,i=(new Date).getTime(),g.contentCssCors&&(o.crossOrigin="anonymous"),"onload"in o&&!((d=V.navigator.userAgent.match(/WebKit\/(\d*)/))&&parseInt(d[1],10)<536))o.onload=l,o.onerror=s;else{if(0<V.navigator.userAgent.indexOf("Firefox"))return(r=m.createElement("style")).textContent='@import "'+e+'"',f(),void y(r);l()}var d;y(o),o.href=e}else s();else u()},t=function(t){return uo.nu(function(e){n(t,H(e,q(mo.value(t))),H(e,q(mo.error(t))))})},o=function(e){return e.fold($,$)};return{load:n,loadAll:function(e,n,r){co(W(e,t)).get(function(e){var t=K(e,function(e){return e.isValue()});0<t.fail.length?r(t.fail.map(o)):n(t.pass.map(o))})}}}(a,{contentCssCors:u.contentCssCors}),l=[],f=u.schema?u.schema:di({}),d=gi({url_converter:u.url_converter,url_converter_scope:u.url_converter_scope},u.schema),m=u.ownEvents?new Se(u.proxy):Se.Event,n=f.getBlockElements(),g=gn.overrideDefaults(function(){return{context:a,element:j.getRoot()}}),p=function(e){if(e&&a&&"string"==typeof e){var t=a.getElementById(e);return t&&t.id!==e?a.getElementsByName(e)[1]:t}return e},h=function(e){return"string"==typeof e&&(e=p(e)),g(e)},v=function(e,t,n){var r,o,i=h(e);return i.length&&(o=(r=s[t])&&r.get?r.get(i,t):i.attr(t)),void 0===o&&(o=n||""),o},y=function(e){var t=p(e);return t?t.attributes:[]},b=function(e,t,n){var r,o;""===n&&(n=null);var i=h(e);r=i.attr(t),i.length&&((o=s[t])&&o.set?o.set(i,n,t):i.attr(t,n),r!==n&&u.onSetAttrib&&u.onSetAttrib({attrElm:i,attrName:t,attrValue:n}))},C=function(){return u.root_element||a.body},x=function(e,t){return Zr.getPos(a.body,p(e),t)},w=function(e,t,n){var r=h(e);return n?r.css(t):("float"===(t=t.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}))&&(t=fe.ie&&fe.ie<12?"styleFloat":"cssFloat"),r[0]&&r[0].style?r[0].style[t]:undefined)},N=function(e){var t,n;return e=p(e),t=w(e,"width"),n=w(e,"height"),-1===t.indexOf("px")&&(t=0),-1===n.indexOf("px")&&(n=0),{w:parseInt(t,10)||e.offsetWidth||e.clientWidth,h:parseInt(n,10)||e.offsetHeight||e.clientHeight}},E=function(e,t){var n;if(!e)return!1;if(!Array.isArray(e)){if("*"===t)return 1===e.nodeType;if(bi.test(t)){var r=t.toLowerCase().split(/,/),o=e.nodeName.toLowerCase();for(n=r.length-1;0<=n;n--)if(r[n]===o)return!0;return!1}if(e.nodeType&&1!==e.nodeType)return!1}var i=Array.isArray(e)?e:[e];return 0<St(t,i[0].ownerDocument||i[0],null,i).length},S=function(e,t,n,r){var o,i=[],a=p(e);for(r=r===undefined,n=n||("BODY"!==C().nodeName?C().parentNode:null),Xt.is(t,"string")&&(t="*"===(o=t)?function(e){return 1===e.nodeType}:function(e){return E(e,o)});a&&a!==n&&a.nodeType&&9!==a.nodeType;){if(!t||"function"==typeof t&&t(a)){if(!r)return[a];i.push(a)}a=a.parentNode}return r?i:null},T=function(e,t,n){var r=t;if(e)for("string"==typeof t&&(r=function(e){return E(e,t)}),e=e[n];e;e=e[n])if("function"==typeof r&&r(e))return e;return null},k=function(e,n,r){var o,t="string"==typeof e?p(e):e;if(!t)return!1;if(Xt.isArray(t)&&(t.length||0===t.length))return o=[],hi(t,function(e,t){e&&("string"==typeof e&&(e=p(e)),o.push(n.call(r,e,t)))}),o;var i=r||c;return n.call(i,t)},_=function(e,t){h(e).each(function(e,n){hi(t,function(e,t){b(n,t,e)})})},A=function(e,r){var t=h(e);yi?t.each(function(e,t){if(!1!==t.canHaveHTML){for(;t.firstChild;)t.removeChild(t.firstChild);try{t.innerHTML="<br>"+r,t.removeChild(t.firstChild)}catch(n){gn("<div></div>").html("<br>"+r).contents().slice(1).appendTo(t)}return r}}):t.html(r)},R=function(e,n,r,o,i){return k(e,function(e){var t="string"==typeof n?a.createElement(n):n;return _(t,r),o&&("string"!=typeof o&&o.nodeType?t.appendChild(o):"string"==typeof o&&A(t,o)),i?t:e.appendChild(t)})},D=function(e,t,n){return R(a.createElement(e),e,t,n,!0)},O=ti.decode,B=ti.encodeAllRaw,P=function(e,t){var n=h(e);return t?n.each(function(){for(var e;e=this.firstChild;)3===e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():n.remove(),1<n.length?n.toArray():n[0]},I=function(e,t,n){h(e).toggleClass(t,n).each(function(){""===this.className&&gn(this).attr("class",null)})},L=function(t,e,n){return k(e,function(e){return Xt.is(e,"array")&&(t=t.cloneNode(!0)),n&&hi(vi(e.childNodes),function(e){t.appendChild(e)}),e.parentNode.replaceChild(t,e)})},F=function(){return a.createRange()},M=function(e,t,n,r){if(Xt.isArray(e)){for(var o=e.length;o--;)e[o]=M(e[o],t,n,r);return e}return!u.collect||e!==a&&e!==i||l.push([e,t,n,r]),m.bind(e,t,n,r||j)},z=function(e,t,n){var r;if(Xt.isArray(e)){for(r=e.length;r--;)e[r]=z(e[r],t,n);return e}if(l&&(e===a||e===i))for(r=l.length;r--;){var o=l[r];e!==o[0]||t&&t!==o[1]||n&&n!==o[2]||m.unbind(o[0],o[1],o[2])}return m.unbind(e,t,n)},U=function(e){if(e&&jo.isElement(e)){var t=e.getAttribute("data-mce-contenteditable");return t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null}return null},j={doc:a,settings:u,win:i,files:o,stdMode:!0,boxModel:!0,styleSheetLoader:e,boundEvents:l,styles:d,schema:f,events:m,isBlock:function(e){if("string"==typeof e)return!!n[e];if(e){var t=e.nodeType;if(t)return!(1!==t||!n[e.nodeName])}return!1},$:g,$$:h,root:null,clone:function(t,e){if(!yi||1!==t.nodeType||e)return t.cloneNode(e);if(!e){var n=a.createElement(t.nodeName);return hi(y(t),function(e){b(n,e.nodeName,v(t,e.nodeName))}),n}return null},getRoot:C,getViewPort:function(e){var t=e||i,n=t.document.documentElement;return{x:t.pageXOffset||n.scrollLeft,y:t.pageYOffset||n.scrollTop,w:t.innerWidth||n.clientWidth,h:t.innerHeight||n.clientHeight}},getRect:function(e){var t,n;return e=p(e),t=x(e),n=N(e),{x:t.x,y:t.y,w:n.w,h:n.h}},getSize:N,getParent:function(e,t,n){var r=S(e,t,n,!1);return r&&0<r.length?r[0]:null},getParents:S,get:p,getNext:function(e,t){return T(e,t,"nextSibling")},getPrev:function(e,t){return T(e,t,"previousSibling")},select:function(e,t){return St(e,p(t)||u.root_element||a,[])},is:E,add:R,create:D,createHTML:function(e,t,n){var r,o="";for(r in o+="<"+e,t)t.hasOwnProperty(r)&&null!==t[r]&&"undefined"!=typeof t[r]&&(o+=" "+r+'="'+B(t[r])+'"');return void 0!==n?o+">"+n+"</"+e+">":o+" />"},createFragment:function(e){var t,n=a.createElement("div"),r=a.createDocumentFragment();for(r.appendChild(n),e&&(n.innerHTML=e);t=n.firstChild;)r.appendChild(t);return r.removeChild(n),r},remove:P,setStyle:function(e,t,n){var r=h(e).css(t,n);u.update_styles&&wi(d,r)},getStyle:w,setStyles:function(e,t){var n=h(e).css(t);u.update_styles&&wi(d,n)},removeAllAttribs:function(e){return k(e,function(e){var t,n=e.attributes;for(t=n.length-1;0<=t;t--)e.removeAttributeNode(n.item(t))})},setAttrib:b,setAttribs:_,getAttrib:v,getPos:x,parseStyle:function(e){return d.parse(e)},serializeStyle:function(e,t){return d.serialize(e,t)},addStyle:function(e){var t,n;if(j!==Ei.DOM&&a===V.document){if(r[e])return;r[e]=!0}(n=a.getElementById("mceDefaultStyles"))||((n=a.createElement("style")).id="mceDefaultStyles",n.type="text/css",(t=a.getElementsByTagName("head")[0]).firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(a.createTextNode(e))},loadCSS:function(e){var n;j===Ei.DOM||a!==V.document?(e||(e=""),n=a.getElementsByTagName("head")[0],hi(e.split(","),function(e){var t;e=Xt._addCacheSuffix(e),o[e]||(o[e]=!0,t=D("link",{rel:"stylesheet",href:e}),n.appendChild(t))})):Ei.DOM.loadCSS(e)},addClass:function(e,t){h(e).addClass(t)},removeClass:function(e,t){I(e,t,!1)},hasClass:function(e,t){return h(e).hasClass(t)},toggleClass:I,show:function(e){h(e).show()},hide:function(e){h(e).hide()},isHidden:function(e){return"none"===h(e).css("display")},uniqueId:function(e){return(e||"mce_")+t++},setHTML:A,getOuterHTML:function(e){var t="string"==typeof e?p(e):e;return jo.isElement(t)?t.outerHTML:gn("<div></div>").append(gn(t).clone()).html()},setOuterHTML:function(e,t){h(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}P(gn(this).html(t),!0)})},decode:O,encode:B,insertAfter:function(e,t){var r=p(t);return k(e,function(e){var t,n;return t=r.parentNode,(n=r.nextSibling)?t.insertBefore(e,n):t.appendChild(e),e})},replace:L,rename:function(t,e){var n;return t.nodeName!==e.toUpperCase()&&(n=D(e),hi(y(t),function(e){b(n,e.nodeName,v(t,e.nodeName))}),L(n,t,!0)),n||t},findCommonAncestor:function(e,t){for(var n,r=e;r;){for(n=t;n&&r!==n;)n=n.parentNode;if(r===n)break;r=r.parentNode}return!r&&e.ownerDocument?e.ownerDocument.documentElement:r},toHex:function(e){return d.toHex(Xt.trim(e))},run:k,getAttribs:y,isEmpty:function(e,t){var n,r,o,i,a,u,s=0;if(e=e.firstChild){a=new go(e,e.parentNode),t=t||(f?f.getNonEmptyElements():null),i=f?f.getWhiteSpaceElements():{};do{if(o=e.nodeType,jo.isElement(e)){var c=e.getAttribute("data-mce-bogus");if(c){e=a.next("all"===c);continue}if(u=e.nodeName.toLowerCase(),t&&t[u]){if("br"===u){s++,e=a.next();continue}return!1}for(n=(r=y(e)).length;n--;)if("name"===(u=r[n].nodeName)||"data-mce-bookmark"===u)return!1}if(8===o)return!1;if(3===o&&!Ci.test(e.nodeValue))return!1;if(3===o&&e.parentNode&&i[e.parentNode.nodeName]&&Ci.test(e.nodeValue))return!1;e=a.next()}while(e)}return s<=1},createRng:F,nodeIndex:Ni,split:function(e,t,n){var r,o,i,a=F();if(e&&t)return a.setStart(e.parentNode,Ni(e)),a.setEnd(t.parentNode,Ni(t)),r=a.extractContents(),(a=F()).setStart(t.parentNode,Ni(t)+1),a.setEnd(e.parentNode,Ni(e)+1),o=a.extractContents(),(i=e.parentNode).insertBefore(qo.trimNode(j,r),e),n?i.insertBefore(n,e):i.insertBefore(t,e),i.insertBefore(qo.trimNode(j,o),e),P(e),n||t},bind:M,unbind:z,fire:function(e,t,n){return m.fire(e,t,n)},getContentEditable:U,getContentEditableParent:function(e){for(var t=C(),n=null;e&&e!==t&&null===(n=U(e));e=e.parentNode);return n},destroy:function(){if(l)for(var e=l.length;e--;){var t=l[e];m.unbind(t[0],t[1],t[2])}St.setDocument&&St.setDocument()},isChildOf:function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset}};return s=xi(d,u,function(){return j}),j}(pi=Ei||(Ei={})).DOM=pi(V.document),pi.nodeIndex=Ni;var Si=Ei,Ti=Si.DOM,ki=Xt.each,_i=Xt.grep,Ai=function(e){return"function"==typeof e},Ri=function(){var l={},o=[],i={},a=[],f=0;this.isDone=function(e){return 2===l[e]},this.markDone=function(e){l[e]=2},this.add=this.load=function(e,t,n,r){l[e]===undefined&&(o.push(e),l[e]=0),t&&(i[e]||(i[e]=[]),i[e].push({success:t,failure:r,scope:n||this}))},this.remove=function(e){delete l[e],delete i[e]},this.loadQueue=function(e,t,n){this.loadScripts(o,e,t,n)},this.loadScripts=function(n,e,t,r){var u,s=[],c=function(t,e){ki(i[e],function(e){Ai(e[t])&&e[t].call(e.scope)}),i[e]=undefined};a.push({success:e,failure:r,scope:t||this}),(u=function(){var e=_i(n);if(n.length=0,ki(e,function(e){var t,n,r,o,i,a;2!==l[e]?3!==l[e]?1!==l[e]&&(l[e]=1,f++,t=e,n=function(){l[e]=2,f--,c("success",e),u()},r=function(){l[e]=3,f--,s.push(e),c("failure",e),u()},i=(a=Ti).uniqueId(),(o=V.document.createElement("script")).id=i,o.type="text/javascript",o.src=Xt._addCacheSuffix(t),o.onload=function(){a.remove(i),o&&(o.onreadystatechange=o.onload=o=null),n()},o.onerror=function(){Ai(r)?r():"undefined"!=typeof console&&console.log&&console.log("Failed to load script: "+t)},(V.document.getElementsByTagName("head")[0]||V.document.body).appendChild(o)):c("failure",e):c("success",e)}),!f){var t=a.slice(0);a.length=0,ki(t,function(e){0===s.length?Ai(e.success)&&e.success.call(e.scope):Ai(e.failure)&&e.failure.call(e.scope,s)})}})()}};Ri.ScriptLoader=new Ri;var Di,Oi=Xt.each;function Bi(){var r=this,o=[],a={},u={},i=[],s=function(e){var t;return u[e]&&(t=u[e].dependencies),t||[]},c=function(e,t){return"object"==typeof t?t:"string"==typeof e?{prefix:"",resource:t,suffix:""}:{prefix:e.prefix,resource:t,suffix:e.suffix}},l=function(e,n,t,r){var o=s(e);Oi(o,function(e){var t=c(n,e);f(t.resource,t,undefined,undefined)}),t&&(r?t.call(r):t.call(Ri))},f=function(e,t,n,r,o){if(!a[e]){var i="string"==typeof t?t:t.prefix+t.resource+t.suffix;0!==i.indexOf("/")&&-1===i.indexOf("://")&&(i=Bi.baseURL+"/"+i),a[e]=i.substring(0,i.lastIndexOf("/")),u[e]?l(e,t,n,r):Ri.ScriptLoader.add(i,function(){return l(e,t,n,r)},r,o)}};return{items:o,urls:a,lookup:u,_listeners:i,get:function(e){return u[e]?u[e].instance:undefined},dependencies:s,requireLangPack:function(e,t){var n=Bi.language;if(n&&!1!==Bi.languageLoad){if(t)if(-1!==(t=","+t+",").indexOf(","+n.substr(0,2)+","))n=n.substr(0,2);else if(-1===t.indexOf(","+n+","))return;Ri.ScriptLoader.add(a[e]+"/langs/"+n+".js")}},add:function(t,e,n){o.push(e),u[t]={instance:e,dependencies:n};var r=K(i,function(e){return e.name===t});return i=r.fail,Oi(r.pass,function(e){e.callback()}),e},remove:function(e){delete a[e],delete u[e]},createUrl:c,addComponents:function(e,t){var n=r.urls[e];Oi(t,function(e){Ri.ScriptLoader.add(n+"/"+e)})},load:f,waitFor:function(e,t){u.hasOwnProperty(e)?t():i.push({name:e,callback:t})}}}(Di=Bi||(Bi={})).PluginManager=Di(),Di.ThemeManager=Di();var Pi=function(t,n){Vr(t).each(function(e){e.dom().insertBefore(n.dom(),t.dom())})},Ii=function(e,t){qr(e).fold(function(){Vr(e).each(function(e){Fi(e,t)})},function(e){Pi(e,t)})},Li=function(t,n){Yr(t).fold(function(){Fi(t,n)},function(e){t.dom().insertBefore(n.dom(),e.dom())})},Fi=function(e,t){e.dom().appendChild(t.dom())},Mi=function(t,e){z(e,function(e){Fi(t,e)})},zi=function(e){e.dom().textContent="",z(Kr(e),function(e){Ui(e)})},Ui=function(e){var t=e.dom();null!==t.parentNode&&t.parentNode.removeChild(t)},ji=function(e){var t,n=Kr(e);0<n.length&&(t=e,z(n,function(e){Pi(t,e)})),Ui(e)},Vi=function(n,r){var o=null;return{cancel:function(){null!==o&&(V.clearTimeout(o),o=null)},throttle:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];null===o&&(o=V.setTimeout(function(){n.apply(null,e),o=null},r))}}},Hi=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return Hi(n())}}},qi=function(e,t){var n=Er(e,t);return n===undefined||""===n?[]:n.split(" ")},$i=function(e){return e.dom().classList!==undefined},Wi=function(e,t){return o=t,i=qi(n=e,r="class").concat([o]),wr(n,r,i.join(" ")),!0;var n,r,o,i},Ki=function(e,t){return o=t,0<(i=U(qi(n=e,r="class"),function(e){return e!==o})).length?wr(n,r,i.join(" ")):Sr(n,r),!1;var n,r,o,i},Xi=function(e,t){$i(e)?e.dom().classList.add(t):Wi(e,t)},Yi=function(e){0===($i(e)?e.dom().classList:qi(e,"class")).length&&Sr(e,"class")},Gi=function(e,t){return $i(e)&&e.dom().classList.contains(t)},Ji=function(e,t){var n=[];return z(Kr(e),function(e){t(e)&&(n=n.concat([e])),n=n.concat(Ji(e,t))}),n},Qi=function(e,t){return n=t,o=(r=e)===undefined?V.document:r.dom(),Fr(o)?[]:W(o.querySelectorAll(n),ar.fromDom);var n,r,o};function Zi(e,t,n,r,o){return e(n,r)?_.some(n):D(o)&&o(n)?_.none():t(n,r,o)}var ea,ta=function(e,t,n){for(var r=e.dom(),o=D(n)?n:q(!1);r.parentNode;){r=r.parentNode;var i=ar.fromDom(r);if(t(i))return _.some(i);if(o(i))break}return _.none()},na=function(e,t,n){return Zi(function(e,t){return t(e)},ta,e,t,n)},ra=function(e,t,n){return ta(e,function(e){return Lr(e,t)},n)},oa=function(e,t){return n=t,o=(r=e)===undefined?V.document:r.dom(),Fr(o)?_.none():_.from(o.querySelector(n)).map(ar.fromDom);var n,r,o},ia=function(e,t,n){return Zi(Lr,ra,e,t,n)},aa=q("mce-annotation"),ua=q("data-mce-annotation"),sa=q("data-mce-annotation-uid"),ca=function(r,e){var t=r.selection.getRng(),n=ar.fromDom(t.startContainer),o=ar.fromDom(r.getBody()),i=e.fold(function(){return"."+aa()},function(e){return"["+ua()+'="'+e+'"]'}),a=Xr(n,t.startOffset).getOr(n),u=ia(a,i,function(e){return Mr(e,o)}),s=function(e,t){return n=t,(r=e.dom())&&r.hasAttribute&&r.hasAttribute(n)?_.some(Er(e,t)):_.none();var n,r};return u.bind(function(e){return s(e,""+sa()).bind(function(n){return s(e,""+ua()).map(function(e){var t=la(r,n);return{uid:n,name:e,elements:t}})})})},la=function(e,t){var n=ar.fromDom(e.getBody());return Qi(n,"["+sa()+'="'+t+'"]')},fa=function(i,e){var n,r,o,a=Hi({}),c=function(e,t){u(e,function(e){return t(e),e})},u=function(e,t){var n=a.get(),r=t(n.hasOwnProperty(e)?n[e]:{listeners:[],previous:Hi(_.none())});n[e]=r,a.set(n)},t=(n=function(){var e,t,n,r=a.get(),o=(e=gr(r),(n=B.call(e,0)).sort(t),n);z(o,function(e){u(e,function(u){var s=u.previous.get();return ca(i,_.some(e)).fold(function(){var t;s.isSome()&&(c(t=e,function(e){z(e.listeners,function(e){return e(!1,t)})}),u.previous.set(_.none()))},function(e){var t,n,r,o=e.uid,i=e.name,a=e.elements;s.is(o)||(n=o,r=a,c(t=i,function(e){z(e.listeners,function(e){return e(!0,t,{uid:n,nodes:W(r,function(e){return e.dom()})})})}),u.previous.set(_.some(o)))}),{previous:u.previous,listeners:u.listeners}})})},r=30,o=null,{cancel:function(){null!==o&&(V.clearTimeout(o),o=null)},throttle:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];null!==o&&V.clearTimeout(o),o=V.setTimeout(function(){n.apply(null,e),o=null},r)}});return i.on("remove",function(){t.cancel()}),i.on("nodeChange",function(){t.throttle()}),{addListener:function(e,t){u(e,function(e){return{previous:e.previous,listeners:e.listeners.concat([t])}})}}},da=function(e,n){e.on("init",function(){e.serializer.addNodeFilter("span",function(e){z(e,function(t){var e;(e=t,_.from(e.attributes.map[ua()]).bind(n.lookup)).each(function(e){!1===e.persistent&&t.unwrap()})})})})},ma=function(){return(ma=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ga=0,pa=function(e,t){return ar.fromDom(e.dom().cloneNode(t))},ha=function(e){return pa(e,!1)},va=function(e){return pa(e,!0)},ya=function(e,t){var n,r,o=Ur(e).dom(),i=ar.fromDom(o.createDocumentFragment()),a=(n=t,(r=(o||V.document).createElement("div")).innerHTML=n,Kr(ar.fromDom(r)));Mi(i,a),zi(e),Fi(e,i)},ba="\ufeff",Ca=function(e){return e===ba},xa=ba,wa=function(e){return e.replace(new RegExp(ba,"g"),"")},Na=jo.isElement,Ea=jo.isText,Sa=function(e){return Ea(e)&&(e=e.parentNode),Na(e)&&e.hasAttribute("data-mce-caret")},Ta=function(e){return Ea(e)&&Ca(e.data)},ka=function(e){return Sa(e)||Ta(e)},_a=function(e){return e.firstChild!==e.lastChild||!jo.isBr(e.firstChild)},Aa=function(e){var t=e.container();return!(!e||!jo.isText(t))&&(t.data.charAt(e.offset())===xa||e.isAtStart()&&Ta(t.previousSibling))},Ra=function(e){var t=e.container();return!(!e||!jo.isText(t))&&(t.data.charAt(e.offset()-1)===xa||e.isAtEnd()&&Ta(t.nextSibling))},Da=function(e,t,n){var r,o,i;return(r=t.ownerDocument.createElement(e)).setAttribute("data-mce-caret",n?"before":"after"),r.setAttribute("data-mce-bogus","all"),r.appendChild(((i=V.document.createElement("br")).setAttribute("data-mce-bogus","1"),i)),o=t.parentNode,n?o.insertBefore(r,t):t.nextSibling?o.insertBefore(r,t.nextSibling):o.appendChild(r),r},Oa=function(e){return Ea(e)&&e.data[0]===xa},Ba=function(e){return Ea(e)&&e.data[e.data.length-1]===xa},Pa=function(e){return e&&e.hasAttribute("data-mce-caret")?(t=e.getElementsByTagName("br"),n=t[t.length-1],jo.isBogus(n)&&n.parentNode.removeChild(n),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("_moz_abspos"),e):null;var t,n},Ia=jo.isContentEditableTrue,La=jo.isContentEditableFalse,Fa=jo.isBr,Ma=jo.isText,za=jo.matchNodeNames("script style textarea"),Ua=jo.matchNodeNames("img input textarea hr iframe video audio object"),ja=jo.matchNodeNames("table"),Va=ka,Ha=function(e){return!Va(e)&&(Ma(e)?!za(e.parentNode):Ua(e)||Fa(e)||ja(e)||qa(e))},qa=function(e){return!1===(t=e,jo.isElement(t)&&"true"===t.getAttribute("unselectable"))&&La(e);var t},$a=function(e,t){return Ha(e)&&function(e,t){for(e=e.parentNode;e&&e!==t;e=e.parentNode){if(qa(e))return!1;if(Ia(e))return!0}return!0}(e,t)},Wa=Math.round,Ka=function(e){return e?{left:Wa(e.left),top:Wa(e.top),bottom:Wa(e.bottom),right:Wa(e.right),width:Wa(e.width),height:Wa(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}},Xa=function(e,t){return e=Ka(e),t||(e.left=e.left+e.width),e.right=e.left,e.width=0,e},Ya=function(e,t,n){return 0<=e&&e<=Math.min(t.height,n.height)/2},Ga=function(e,t){var n=Math.min(t.height/2,e.height/2);return e.bottom-n<t.top||!(e.top>t.bottom)&&Ya(t.top-e.bottom,e,t)},Ja=function(e,t){return e.top>t.bottom||!(e.bottom<t.top)&&Ya(t.bottom-e.top,e,t)},Qa=function(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom},Za=function(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset===n+1?t.childNodes[n]:null},eu=function(e,t){return 1===e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e},tu=new RegExp("[\u0300-\u036f\u0483-\u0487\u0488-\u0489\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62-\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c00\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0c81\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc-\u0ccd\u0cd5-\u0cd6\u0ce2-\u0ce3\u0d01\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62-\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1abe\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab-\u1bad\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8-\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u200c-\u200d\u20d0-\u20dc\u20dd-\u20e0\u20e1\u20e2-\u20e4\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u302e-\u302f\u3099-\u309a\ua66f\ua670-\ua672\ua674-\ua67d\ua69e-\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\ua9e5\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\uff9e-\uff9f]"),nu=function(e){return"string"==typeof e&&768<=e.charCodeAt(0)&&tu.test(e)},ru=function(e,t,n){return e.isSome()&&t.isSome()?_.some(n(e.getOrDie(),t.getOrDie())):_.none()},ou=[].slice,iu=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=ou.call(arguments);return function(e){for(var t=0;t<n.length;t++)if(!n[t](e))return!1;return!0}},au=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=ou.call(arguments);return function(e){for(var t=0;t<n.length;t++)if(n[t](e))return!0;return!1}},uu=jo.isElement,su=Ha,cu=jo.matchStyleValues("display","block table"),lu=jo.matchStyleValues("float","left right"),fu=iu(uu,su,y(lu)),du=y(jo.matchStyleValues("white-space","pre pre-line pre-wrap")),mu=jo.isText,gu=jo.isBr,pu=Si.nodeIndex,hu=eu,vu=function(e){return"createRange"in e?e.createRange():Si.DOM.createRng()},yu=function(e){return e&&/[\r\n\t ]/.test(e)},bu=function(e){return!!e.setStart&&!!e.setEnd},Cu=function(e){var t,n=e.startContainer,r=e.startOffset;return!!(yu(e.toString())&&du(n.parentNode)&&jo.isText(n)&&(t=n.data,yu(t[r-1])||yu(t[r+1])))},xu=function(e){return 0===e.left&&0===e.right&&0===e.top&&0===e.bottom},wu=function(e){var t,n,r,o,i,a,u,s;return t=0<(n=e.getClientRects()).length?Ka(n[0]):Ka(e.getBoundingClientRect()),!bu(e)&&gu(e)&&xu(t)?(i=(r=e).ownerDocument,a=vu(i),u=i.createTextNode("\xa0"),(s=r.parentNode).insertBefore(u,r),a.setStart(u,0),a.setEnd(u,1),o=Ka(a.getBoundingClientRect()),s.removeChild(u),o):xu(t)&&bu(e)?function(e){var t=e.startContainer,n=e.endContainer,r=e.startOffset,o=e.endOffset;if(t===n&&jo.isText(n)&&0===r&&1===o){var i=e.cloneRange();return i.setEndAfter(n),wu(i)}return null}(e):t},Nu=function(e,t){var n=Xa(e,t);return n.width=1,n.right=n.left+1,n},Eu=function(e){var t,n,r=[],o=function(e){var t,n;0!==e.height&&(0<r.length&&(t=e,n=r[r.length-1],t.left===n.left&&t.top===n.top&&t.bottom===n.bottom&&t.right===n.right)||r.push(e))},i=function(e,t){var n=vu(e.ownerDocument);if(t<e.data.length){if(nu(e.data[t]))return r;if(nu(e.data[t-1])&&(n.setStart(e,t),n.setEnd(e,t+1),!Cu(n)))return o(Nu(wu(n),!1)),r}0<t&&(n.setStart(e,t-1),n.setEnd(e,t),Cu(n)||o(Nu(wu(n),!1))),t<e.data.length&&(n.setStart(e,t),n.setEnd(e,t+1),Cu(n)||o(Nu(wu(n),!0)))};if(mu(e.container()))return i(e.container(),e.offset()),r;if(uu(e.container()))if(e.isAtEnd())n=hu(e.container(),e.offset()),mu(n)&&i(n,n.data.length),fu(n)&&!gu(n)&&o(Nu(wu(n),!1));else{if(n=hu(e.container(),e.offset()),mu(n)&&i(n,0),fu(n)&&e.isAtEnd())return o(Nu(wu(n),!1)),r;t=hu(e.container(),e.offset()-1),fu(t)&&!gu(t)&&(cu(t)||cu(n)||!fu(n))&&o(Nu(wu(t),!1)),fu(n)&&o(Nu(wu(n),!0))}return r};function Su(t,n,e){var r=function(){return e||(e=Eu(Su(t,n))),e};return{container:q(t),offset:q(n),toRange:function(){var e;return(e=vu(t.ownerDocument)).setStart(t,n),e.setEnd(t,n),e},getClientRects:r,isVisible:function(){return 0<r().length},isAtStart:function(){return mu(t),0===n},isAtEnd:function(){return mu(t)?n>=t.data.length:n>=t.childNodes.length},isEqual:function(e){return e&&t===e.container()&&n===e.offset()},getNode:function(e){return hu(t,e?n-1:n)}}}(ea=Su||(Su={})).fromRangeStart=function(e){return ea(e.startContainer,e.startOffset)},ea.fromRangeEnd=function(e){return ea(e.endContainer,e.endOffset)},ea.after=function(e){return ea(e.parentNode,pu(e)+1)},ea.before=function(e){return ea(e.parentNode,pu(e))},ea.isAbove=function(e,t){return ru(Z(t.getClientRects()),ee(e.getClientRects()),Ga).getOr(!1)},ea.isBelow=function(e,t){return ru(ee(t.getClientRects()),Z(e.getClientRects()),Ja).getOr(!1)},ea.isAtStart=function(e){return!!e&&e.isAtStart()},ea.isAtEnd=function(e){return!!e&&e.isAtEnd()},ea.isTextPosition=function(e){return!!e&&jo.isText(e.container())},ea.isElementPosition=function(e){return!1===ea.isTextPosition(e)};var Tu,ku,_u=Su,Au=jo.isText,Ru=jo.isBogus,Du=Si.nodeIndex,Ou=function(e){var t=e.parentNode;return Ru(t)?Ou(t):t},Bu=function(e){return e?Ht.reduce(e.childNodes,function(e,t){return Ru(t)&&"BR"!==t.nodeName?e=e.concat(Bu(t)):e.push(t),e},[]):[]},Pu=function(t){return function(e){return t===e}},Iu=function(e){var t,r,n,o;return(Au(e)?"text()":e.nodeName.toLowerCase())+"["+(r=Bu(Ou(t=e)),n=Ht.findIndex(r,Pu(t),t),r=r.slice(0,n+1),o=Ht.reduce(r,function(e,t,n){return Au(t)&&Au(r[n-1])&&e++,e},0),r=Ht.filter(r,jo.matchNodeNames(t.nodeName)),(n=Ht.findIndex(r,Pu(t),t))-o)+"]"},Lu=function(e,t){var n,r,o,i,a,u=[];return n=t.container(),r=t.offset(),Au(n)?o=function(e,t){for(;(e=e.previousSibling)&&Au(e);)t+=e.data.length;return t}(n,r):(r>=(i=n.childNodes).length?(o="after",r=i.length-1):o="before",n=i[r]),u.push(Iu(n)),a=function(e,t,n){var r=[];for(t=t.parentNode;!(t===e||n&&n(t));t=t.parentNode)r.push(t);return r}(e,n),a=Ht.filter(a,y(jo.isBogus)),(u=u.concat(Ht.map(a,function(e){return Iu(e)}))).reverse().join("/")+","+o},Fu=function(e,t){var n,r,o;return t?(t=(n=t.split(","))[0].split("/"),o=1<n.length?n[1]:"before",(r=Ht.reduce(t,function(e,t){return(t=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t))?("text()"===t[1]&&(t[1]="#text"),n=e,r=t[1],o=parseInt(t[2],10),i=Bu(n),i=Ht.filter(i,function(e,t){return!Au(e)||!Au(i[t-1])}),(i=Ht.filter(i,jo.matchNodeNames(r)))[o]):null;var n,r,o,i},e))?Au(r)?function(e,t){for(var n,r=e,o=0;Au(r);){if(n=r.data.length,o<=t&&t<=o+n){e=r,t-=o;break}if(!Au(r.nextSibling)){e=r,t=n;break}o+=n,r=r.nextSibling}return Au(e)&&t>e.data.length&&(t=e.data.length),_u(e,t)}(r,parseInt(o,10)):(o="after"===o?Du(r)+1:Du(r),_u(r.parentNode,o)):null):null},Mu=function(e,t){jo.isText(t)&&0===t.data.length&&e.remove(t)},zu=function(e,t,n){var r,o,i,a,u,s,c;jo.isDocumentFragment(n)?(i=e,a=t,u=n,s=_.from(u.firstChild),c=_.from(u.lastChild),a.insertNode(u),s.each(function(e){return Mu(i,e.previousSibling)}),c.each(function(e){return Mu(i,e.nextSibling)})):(r=e,o=n,t.insertNode(o),Mu(r,o.previousSibling),Mu(r,o.nextSibling))},Uu=jo.isContentEditableFalse,ju=function(e,t,n,r,o){var i,a=r[o?"startContainer":"endContainer"],u=r[o?"startOffset":"endOffset"],s=[],c=0,l=e.getRoot();for(jo.isText(a)?s.push(n?function(e,t,n){var r,o;for(o=e(t.data.slice(0,n)).length,r=t.previousSibling;r&&jo.isText(r);r=r.previousSibling)o+=e(r.data).length;return o}(t,a,u):u):(u>=(i=a.childNodes).length&&i.length&&(c=1,u=Math.max(0,i.length-1)),s.push(e.nodeIndex(i[u],n)+c));a&&a!==l;a=a.parentNode)s.push(e.nodeIndex(a,n));return s},Vu=function(e,t,n){var r=0;return Xt.each(e.select(t),function(e){if("all"!==e.getAttribute("data-mce-bogus"))return e!==n&&void r++}),r},Hu=function(e,t){var n,r,o,i=t?"start":"end";n=e[i+"Container"],r=e[i+"Offset"],jo.isElement(n)&&"TR"===n.nodeName&&(n=(o=n.childNodes)[Math.min(t?r:r-1,o.length-1)])&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r))},qu=function(e){return Hu(e,!0),Hu(e,!1),e},$u=function(e,t){var n;if(jo.isElement(e)&&(e=eu(e,t),Uu(e)))return e;if(ka(e)){if(jo.isText(e)&&Sa(e)&&(e=e.parentNode),n=e.previousSibling,Uu(n))return n;if(n=e.nextSibling,Uu(n))return n}},Wu=function(e,t,n){var r=n.getNode(),o=r?r.nodeName:null,i=n.getRng();if(Uu(r)||"IMG"===o)return{name:o,index:Vu(n.dom,o,r)};var a,u,s,c,l,f,d,m=$u((a=i).startContainer,a.startOffset)||$u(a.endContainer,a.endOffset);return m?{name:o=m.tagName,index:Vu(n.dom,o,m)}:(u=e,c=t,l=i,f=(s=n).dom,(d={}).start=ju(f,u,c,l,!0),s.isCollapsed()||(d.end=ju(f,u,c,l,!1)),d)},Ku=function(e,t,n){var r={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return n?e.create("span",r,"&#xFEFF;"):e.create("span",r)},Xu=function(e,t){var n=e.dom,r=e.getRng(),o=n.uniqueId(),i=e.isCollapsed(),a=e.getNode(),u=a.nodeName;if("IMG"===u)return{name:u,index:Vu(n,u,a)};var s=qu(r.cloneRange());if(!i){s.collapse(!1);var c=Ku(n,o+"_end",t);zu(n,s,c)}(r=qu(r)).collapse(!0);var l=Ku(n,o+"_start",t);return zu(n,r,l),e.moveToBookmark({id:o,keep:1}),{id:o}},Yu={getBookmark:function(e,t,n){return 2===t?Wu(wa,n,e):3===t?(o=(r=e).getRng(),{start:Lu(r.dom.getRoot(),_u.fromRangeStart(o)),end:Lu(r.dom.getRoot(),_u.fromRangeEnd(o))}):t?{rng:e.getRng()}:Xu(e,!1);var r,o},getUndoBookmark:d(Wu,$,!0),getPersistentBookmark:Xu},Gu="_mce_caret",Ju=function(e){return jo.isElement(e)&&e.id===Gu},Qu=function(e,t){for(;t&&t!==e;){if(t.id===Gu)return t;t=t.parentNode}return null},Zu=jo.isElement,es=jo.isText,ts=function(e){var t=e.parentNode;t&&t.removeChild(e)},ns=function(e,t){0===t.length?ts(e):e.nodeValue=t},rs=function(e){var t=wa(e);return{count:e.length-t.length,text:t}},os=function(e,t){return us(e),t},is=function(e,t){var n,r,o,i=t.container(),a=(n=te(i.childNodes),r=e,o=L(n,r),-1===o?_.none():_.some(o)).map(function(e){return e<t.offset()?_u(i,t.offset()-1):t}).getOr(t);return us(e),a},as=function(e,t){return es(e)&&t.container()===e?(r=t,o=rs((n=e).data.substr(0,r.offset())),i=rs(n.data.substr(r.offset())),0<(a=o.text+i.text).length?(ns(n,a),_u(n,r.offset()-o.count)):r):os(e,t);var n,r,o,i,a},us=function(e){if(Zu(e)&&ka(e)&&(_a(e)?e.removeAttribute("data-mce-caret"):ts(e)),es(e)){var t=wa(function(e){try{return e.nodeValue}catch(t){return""}}(e));ns(e,t)}},ss={removeAndReposition:function(e,t){return _u.isTextPosition(t)?as(e,t):(n=e,(r=t).container()===n.parentNode?is(n,r):os(n,r));var n,r},remove:us},cs=or.detect().browser,ls=jo.isContentEditableFalse,fs=function(e,t,n){var r,o,i,a,u,s=Xa(t.getBoundingClientRect(),n);return"BODY"===e.tagName?(r=e.ownerDocument.documentElement,o=e.scrollLeft||r.scrollLeft,i=e.scrollTop||r.scrollTop):(u=e.getBoundingClientRect(),o=e.scrollLeft-u.left,i=e.scrollTop-u.top),s.left+=o,s.right+=o,s.top+=i,s.bottom+=i,s.width=1,0<(a=t.offsetWidth-t.clientWidth)&&(n&&(a*=-1),s.left+=a,s.right+=a),s},ds=function(a,u,e){var t,s,c=Hi(_.none()),l=function(){!function(e){var t,n,r,o,i;for(t=gn("*[contentEditable=false]",e),o=0;o<t.length;o++)r=(n=t[o]).previousSibling,Ba(r)&&(1===(i=r.data).length?r.parentNode.removeChild(r):r.deleteData(i.length-1,1)),r=n.nextSibling,Oa(r)&&(1===(i=r.data).length?r.parentNode.removeChild(r):r.deleteData(0,1))}(a),s&&(ss.remove(s),s=null),c.get().each(function(e){gn(e.caret).remove(),c.set(_.none())}),clearInterval(t)},f=function(){t=he.setInterval(function(){e()?gn("div.mce-visual-caret",a).toggleClass("mce-visual-caret-hidden"):gn("div.mce-visual-caret",a).addClass("mce-visual-caret-hidden")},500)};return{show:function(t,e){var n,r,o;if(l(),o=e,jo.isElement(o)&&/^(TD|TH)$/i.test(o.tagName))return null;if(!u(e))return s=function(e,t){var n,r,o;if(r=e.ownerDocument.createTextNode(xa),o=e.parentNode,t){if(n=e.previousSibling,Ea(n)){if(ka(n))return n;if(Ba(n))return n.splitText(n.data.length-1)}o.insertBefore(r,e)}else{if(n=e.nextSibling,Ea(n)){if(ka(n))return n;if(Oa(n))return n.splitText(1),n}e.nextSibling?o.insertBefore(r,e.nextSibling):o.appendChild(r)}return r}(e,t),r=e.ownerDocument.createRange(),ls(s.nextSibling)?(r.setStart(s,0),r.setEnd(s,0)):(r.setStart(s,1),r.setEnd(s,1)),r;s=Da("p",e,t),n=fs(a,e,t),gn(s).css("top",n.top);var i=gn('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(n).appendTo(a)[0];return c.set(_.some({caret:i,element:e,before:t})),c.get().each(function(e){t&&gn(e.caret).addClass("mce-visual-caret-before")}),f(),(r=e.ownerDocument.createRange()).setStart(s,0),r.setEnd(s,0),r},hide:l,getCss:function(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"},reposition:function(){c.get().each(function(e){var t=fs(a,e.element,e.before);gn(e.caret).css(t)})},destroy:function(){return he.clearInterval(t)}}},ms=function(){return cs.isIE()||cs.isEdge()||cs.isFirefox()},gs=function(e){return ls(e)||jo.isTable(e)&&ms()},ps=jo.isContentEditableFalse,hs=jo.matchStyleValues("display","block table table-cell table-caption list-item"),vs=ka,ys=Sa,bs=jo.isElement,Cs=Ha,xs=function(e){return 0<e},ws=function(e){return e<0},Ns=function(e,t){for(var n;n=e(t);)if(!ys(n))return n;return null},Es=function(e,t,n,r,o){var i=new go(e,r);if(ws(t)){if((ps(e)||ys(e))&&n(e=Ns(i.prev,!0)))return e;for(;e=Ns(i.prev,o);)if(n(e))return e}if(xs(t)){if((ps(e)||ys(e))&&n(e=Ns(i.next,!0)))return e;for(;e=Ns(i.next,o);)if(n(e))return e}return null},Ss=function(e,t){for(;e&&e!==t;){if(hs(e))return e;e=e.parentNode}return null},Ts=function(e,t,n){return Ss(e.container(),n)===Ss(t.container(),n)},ks=function(e,t){var n,r;return t?(n=t.container(),r=t.offset(),bs(n)?n.childNodes[r+e]:null):null},_s=function(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n},As=function(e,t,n){var r,o,i,a;for(o=e?"previousSibling":"nextSibling";n&&n!==t;){if(r=n[o],vs(r)&&(r=r[o]),ps(r)){if(a=n,Ss(r,i=t)===Ss(a,i))return r;break}if(Cs(r))break;n=n.parentNode}return null},Rs=d(_s,!0),Ds=d(_s,!1),Os=function(e,t,n){var r,o,i,a,u=d(As,!0,t),s=d(As,!1,t);if(o=n.startContainer,i=n.startOffset,Sa(o)){if(bs(o)||(o=o.parentNode),"before"===(a=o.getAttribute("data-mce-caret"))&&(r=o.nextSibling,gs(r)))return Rs(r);if("after"===a&&(r=o.previousSibling,gs(r)))return Ds(r)}if(!n.collapsed)return n;if(jo.isText(o)){if(vs(o)){if(1===e){if(r=s(o))return Rs(r);if(r=u(o))return Ds(r)}if(-1===e){if(r=u(o))return Ds(r);if(r=s(o))return Rs(r)}return n}if(Ba(o)&&i>=o.data.length-1)return 1===e&&(r=s(o))?Rs(r):n;if(Oa(o)&&i<=1)return-1===e&&(r=u(o))?Ds(r):n;if(i===o.data.length)return(r=s(o))?Rs(r):n;if(0===i)return(r=u(o))?Ds(r):n}return n},Bs=function(e,t){return _.from(ks(e?0:-1,t)).filter(ps)},Ps=function(e,t,n){var r=Os(e,t,n);return-1===e?Su.fromRangeStart(r):Su.fromRangeEnd(r)},Is=function(e){return _.from(e.getNode()).map(ar.fromDom)},Ls=function(e,t){for(;t=e(t);)if(t.isVisible())return t;return t},Fs=function(e,t){var n=Ts(e,t);return!(n||!jo.isBr(e.getNode()))||n};(ku=Tu||(Tu={}))[ku.Backwards=-1]="Backwards",ku[ku.Forwards=1]="Forwards";var Ms,zs,Us,js=jo.isContentEditableFalse,Vs=jo.isText,Hs=jo.isElement,qs=jo.isBr,$s=Ha,Ws=function(e){return Ua(e)||!!qa(t=e)&&!0!==j(te(t.getElementsByTagName("*")),function(e,t){return e||Ia(t)},!1);var t},Ks=$a,Xs=function(e,t){return e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null},Ys=function(e,t){if(xs(e)){if($s(t.previousSibling)&&!Vs(t.previousSibling))return _u.before(t);if(Vs(t))return _u(t,0)}if(ws(e)){if($s(t.nextSibling)&&!Vs(t.nextSibling))return _u.after(t);if(Vs(t))return _u(t,t.data.length)}return ws(e)?qs(t)?_u.before(t):_u.after(t):_u.before(t)},Gs=function(e,t,n){var r,o,i,a,u;if(!Hs(n)||!t)return null;if(t.isEqual(_u.after(n))&&n.lastChild){if(u=_u.after(n.lastChild),ws(e)&&$s(n.lastChild)&&Hs(n.lastChild))return qs(n.lastChild)?_u.before(n.lastChild):u}else u=t;var s,c,l,f=u.container(),d=u.offset();if(Vs(f)){if(ws(e)&&0<d)return _u(f,--d);if(xs(e)&&d<f.length)return _u(f,++d);r=f}else{if(ws(e)&&0<d&&(o=Xs(f,d-1),$s(o)))return!Ws(o)&&(i=Es(o,e,Ks,o))?Vs(i)?_u(i,i.data.length):_u.after(i):Vs(o)?_u(o,o.data.length):_u.before(o);if(xs(e)&&d<f.childNodes.length&&(o=Xs(f,d),$s(o)))return qs(o)?(s=n,(l=(c=o).nextSibling)&&$s(l)?Vs(l)?_u(l,0):_u.before(l):Gs(Tu.Forwards,_u.after(c),s)):!Ws(o)&&(i=Es(o,e,Ks,o))?Vs(i)?_u(i,0):_u.before(i):Vs(o)?_u(o,0):_u.after(o);r=o||u.getNode()}return(xs(e)&&u.isAtEnd()||ws(e)&&u.isAtStart())&&(r=Es(r,e,q(!0),n,!0),Ks(r,n))?Ys(e,r):(o=Es(r,e,Ks,n),!(a=Ht.last(U(function(e,t){for(var n=[];e&&e!==t;)n.push(e),e=e.parentNode;return n}(f,n),js)))||o&&a.contains(o)?o?Ys(e,o):null:u=xs(e)?_u.after(a):_u.before(a))},Js=function(t){return{next:function(e){return Gs(Tu.Forwards,e,t)},prev:function(e){return Gs(Tu.Backwards,e,t)}}},Qs=function(e){return _u.isTextPosition(e)?0===e.offset():Ha(e.getNode())},Zs=function(e){if(_u.isTextPosition(e)){var t=e.container();return e.offset()===t.data.length}return Ha(e.getNode(!0))},ec=function(e,t){return!_u.isTextPosition(e)&&!_u.isTextPosition(t)&&e.getNode()===t.getNode(!0)},tc=function(e,t,n){return e?!ec(t,n)&&(r=t,!(!_u.isTextPosition(r)&&jo.isBr(r.getNode())))&&Zs(t)&&Qs(n):!ec(n,t)&&Qs(t)&&Zs(n);var r},nc=function(e,t,n){var r=Js(t);return _.from(e?r.next(n):r.prev(n))},rc=function(t,n,r){return nc(t,n,r).bind(function(e){return Ts(r,e,n)&&tc(t,r,e)?nc(t,n,e):_.some(e)})},oc=function(t,n,e,r){return rc(t,n,e).bind(function(e){return r(e)?oc(t,n,e,r):_.some(e)})},ic=function(e,t){var n,r,o,i,a,u=e?t.firstChild:t.lastChild;return jo.isText(u)?_.some(_u(u,e?0:u.data.length)):u?Ha(u)?_.some(e?_u.before(u):(a=u,jo.isBr(a)?_u.before(a):_u.after(a))):(r=t,o=u,i=(n=e)?_u.before(o):_u.after(o),nc(n,r,i)):_.none()},ac=d(nc,!0),uc=d(nc,!1),sc={fromPosition:nc,nextPosition:ac,prevPosition:uc,navigate:rc,navigateIgnore:oc,positionIn:ic,firstPositionIn:d(ic,!0),lastPositionIn:d(ic,!1)},cc=function(e,t){return jo.isElement(t)&&e.isBlock(t)&&!t.innerHTML&&!fe.ie&&(t.innerHTML='<br data-mce-bogus="1" />'),t},lc=function(e,t){return sc.lastPositionIn(e).fold(function(){return!1},function(e){return t.setStart(e.container(),e.offset()),t.setEnd(e.container(),e.offset()),!0})},fc=function(e,t,n){return!(!1!==t.hasChildNodes()||!Qu(e,t)||(o=n,i=(r=t).ownerDocument.createTextNode(xa),r.appendChild(i),o.setStart(i,0),o.setEnd(i,0),0));var r,o,i},dc=function(e,t,n,r){var o,i,a,u,s=n[t?"start":"end"],c=e.getRoot();if(s){for(a=s[0],i=c,o=s.length-1;1<=o;o--){if(u=i.childNodes,fc(c,i,r))return!0;if(s[o]>u.length-1)return!!fc(c,i,r)||lc(i,r);i=u[s[o]]}3===i.nodeType&&(a=Math.min(s[0],i.nodeValue.length)),1===i.nodeType&&(a=Math.min(s[0],i.childNodes.length)),t?r.setStart(i,a):r.setEnd(i,a)}return!0},mc=function(e){return jo.isText(e)&&0<e.data.length},gc=function(e,t,n){var r,o,i,a,u,s,c=e.get(n.id+"_"+t),l=n.keep;if(c){if(r=c.parentNode,"start"===t?l?c.hasChildNodes()?(r=c.firstChild,o=1):mc(c.nextSibling)?(r=c.nextSibling,o=0):mc(c.previousSibling)?(r=c.previousSibling,o=c.previousSibling.data.length):(r=c.parentNode,o=e.nodeIndex(c)+1):o=e.nodeIndex(c):l?c.hasChildNodes()?(r=c.firstChild,o=1):mc(c.previousSibling)?(r=c.previousSibling,o=c.previousSibling.data.length):(r=c.parentNode,o=e.nodeIndex(c)):o=e.nodeIndex(c),u=r,s=o,!l){for(a=c.previousSibling,i=c.nextSibling,Xt.each(Xt.grep(c.childNodes),function(e){jo.isText(e)&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});c=e.get(n.id+"_"+t);)e.remove(c,!0);a&&i&&a.nodeType===i.nodeType&&jo.isText(a)&&!fe.opera&&(o=a.nodeValue.length,a.appendData(i.nodeValue),e.remove(i),u=a,s=o)}return _.some(_u(u,s))}return _.none()},pc=function(e,t){var n,r,o,i,a,u,s,c,l,f,d,m,g,p,h,v,y=e.dom;if(t){if(v=t,Xt.isArray(v.start))return p=t,h=(g=y).createRng(),dc(g,!0,p,h)&&dc(g,!1,p,h)?_.some(h):_.none();if("string"==typeof t.start)return _.some((f=t,d=(l=y).createRng(),m=Fu(l.getRoot(),f.start),d.setStart(m.container(),m.offset()),m=Fu(l.getRoot(),f.end),d.setEnd(m.container(),m.offset()),d));if(t.hasOwnProperty("id"))return s=gc(o=y,"start",i=t),c=gc(o,"end",i),ru(s,(u=s,(a=c).isSome()?a:u),function(e,t){var n=o.createRng();return n.setStart(cc(o,e.container()),e.offset()),n.setEnd(cc(o,t.container()),t.offset()),n});if(t.hasOwnProperty("name"))return n=y,r=t,_.from(n.select(r.name)[r.index]).map(function(e){var t=n.createRng();return t.selectNode(e),t});if(t.hasOwnProperty("rng"))return _.some(t.rng)}return _.none()},hc=function(e,t,n){return Yu.getBookmark(e,t,n)},vc=function(t,e){pc(t,e).each(function(e){t.setRng(e)})},yc=function(e){return jo.isElement(e)&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},bc=function(e){return e&&/^(IMG)$/.test(e.nodeName)},Cc=function(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)},xc=function(e,t,n){return"color"!==n&&"backgroundColor"!==n||(t=e.toHex(t)),"fontWeight"===n&&700===t&&(t="bold"),"fontFamily"===n&&(t=t.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+t},wc={isInlineBlock:bc,moveStart:function(e,t,n){var r,o,i,a=n.startOffset,u=n.startContainer;if((n.startContainer!==n.endContainer||!bc(n.startContainer.childNodes[n.startOffset]))&&1===u.nodeType)for(a<(i=u.childNodes).length?r=new go(u=i[a],e.getParent(u,e.isBlock)):(r=new go(u=i[i.length-1],e.getParent(u,e.isBlock))).next(!0),o=r.current();o;o=r.next())if(3===o.nodeType&&!Cc(o))return n.setStart(o,0),void t.setRng(n)},getNonWhiteSpaceSibling:function(e,t,n){if(e)for(t=t?"nextSibling":"previousSibling",e=n?e:e[t];e;e=e[t])if(1===e.nodeType||!Cc(e))return e},isTextBlock:function(e,t){return t.nodeType&&(t=t.nodeName),!!e.schema.getTextBlockElements()[t.toLowerCase()]},isValid:function(e,t,n){return e.schema.isValidChild(t,n)},isWhiteSpaceNode:Cc,replaceVars:function(e,n){return"string"!=typeof e?e=e(n):n&&(e=e.replace(/%(\w+)/g,function(e,t){return n[t]||e})),e},isEq:function(e,t){return t=t||"",e=""+((e=e||"").nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()===t.toLowerCase()},normalizeStyleValue:xc,getStyle:function(e,t,n){return xc(e,e.getStyle(t,n),n)},getTextDecoration:function(t,e){var n;return t.getParent(e,function(e){return(n=t.getStyle(e,"text-decoration"))&&"none"!==n}),n},getParents:function(e,t,n){return e.getParents(t,n,e.getRoot())}},Nc=yc,Ec=wc.getParents,Sc=wc.isWhiteSpaceNode,Tc=wc.isTextBlock,kc=function(e,t){for(void 0===t&&(t=3===e.nodeType?e.length:e.childNodes.length);e&&e.hasChildNodes();)(e=e.childNodes[t])&&(t=3===e.nodeType?e.length:e.childNodes.length);return{node:e,offset:t}},_c=function(e,t){for(var n=t;n;){if(1===n.nodeType&&e.getContentEditable(n))return"false"===e.getContentEditable(n)?n:t;n=n.parentNode}return t},Ac=function(e,t,n,r){var o,i,a=n.nodeValue;return void 0===r&&(r=e?a.length:0),e?(o=a.lastIndexOf(" ",r),-1!==(o=(i=a.lastIndexOf("\xa0",r))<o?o:i)&&!t&&(o<r||!e)&&o<=a.length&&o++):(o=a.indexOf(" ",r),i=a.indexOf("\xa0",r),o=-1!==o&&(-1===i||o<i)?o:i),o},Rc=function(e,t,n,r,o,i){var a,u,s,c;if(3===n.nodeType){if(-1!==(s=Ac(o,i,n,r)))return{container:n,offset:s};c=n}for(a=new go(n,e.getParent(n,e.isBlock)||t);u=a[o?"prev":"next"]();)if(3!==u.nodeType||Nc(u.parentNode)){if(e.isBlock(u)||wc.isEq(u,"BR"))break}else if(-1!==(s=Ac(o,i,c=u)))return{container:u,offset:s};if(c)return{container:c,offset:r=o?0:c.length}},Dc=function(e,t,n,r,o){var i,a,u,s;for(3===r.nodeType&&0===r.nodeValue.length&&r[o]&&(r=r[o]),i=Ec(e,r),a=0;a<i.length;a++)for(u=0;u<t.length;u++)if(!("collapsed"in(s=t[u])&&s.collapsed!==n.collapsed)&&e.is(i[a],s.selector))return i[a];return r},Oc=function(t,e,n,r){var o,i=t.dom,a=i.getRoot();if(e[0].wrapper||(o=i.getParent(n,e[0].block,a)),!o){var u=i.getParent(n,"LI,TD,TH");o=i.getParent(3===n.nodeType?n.parentNode:n,function(e){return e!==a&&Tc(t,e)},u)}if(o&&e[0].wrapper&&(o=Ec(i,o,"ul,ol").reverse()[0]||o),!o)for(o=n;o[r]&&!i.isBlock(o[r])&&(o=o[r],!wc.isEq(o,"br")););return o||n},Bc=function(e,t,n,r,o,i,a){var u,s,c,l,f,d;if(u=s=a?n:o,l=a?"previousSibling":"nextSibling",f=e.getRoot(),3===u.nodeType&&!Sc(u)&&(a?0<r:i<u.nodeValue.length))return u;for(;;){if(!t[0].block_expand&&e.isBlock(s))return s;for(c=s[l];c;c=c[l])if(!Nc(c)&&!Sc(c)&&("BR"!==(d=c).nodeName||!d.getAttribute("data-mce-bogus")||d.nextSibling))return s;if(s===f||s.parentNode===f){u=s;break}s=s.parentNode}return u},Pc=function(e,t,n,r){var o,i=t.startContainer,a=t.startOffset,u=t.endContainer,s=t.endOffset,c=e.dom;return 1===i.nodeType&&i.hasChildNodes()&&3===(i=eu(i,a)).nodeType&&(a=0),1===u.nodeType&&u.hasChildNodes()&&3===(u=eu(u,t.collapsed?s:s-1)).nodeType&&(s=u.nodeValue.length),i=_c(c,i),u=_c(c,u),(Nc(i.parentNode)||Nc(i))&&(i=Nc(i)?i:i.parentNode,3===(i=t.collapsed?i.previousSibling||i:i.nextSibling||i).nodeType&&(a=t.collapsed?i.length:0)),(Nc(u.parentNode)||Nc(u))&&(u=Nc(u)?u:u.parentNode,3===(u=t.collapsed?u.nextSibling||u:u.previousSibling||u).nodeType&&(s=t.collapsed?0:u.length)),t.collapsed&&((o=Rc(c,e.getBody(),i,a,!0,r))&&(i=o.container,a=o.offset),(o=Rc(c,e.getBody(),u,s,!1,r))&&(u=o.container,s=o.offset)),n[0].inline&&(u=r?u:function(e,t){var n=kc(e,t);if(n.node){for(;n.node&&0===n.offset&&n.node.previousSibling;)n=kc(n.node.previousSibling);n.node&&0<n.offset&&3===n.node.nodeType&&" "===n.node.nodeValue.charAt(n.offset-1)&&1<n.offset&&(e=n.node).splitText(n.offset-1)}return e}(u,s)),(n[0].inline||n[0].block_expand)&&(n[0].inline&&3===i.nodeType&&0!==a||(i=Bc(c,n,i,a,u,s,!0)),n[0].inline&&3===u.nodeType&&s!==u.nodeValue.length||(u=Bc(c,n,i,a,u,s,!1))),n[0].selector&&!1!==n[0].expand&&!n[0].inline&&(i=Dc(c,n,t,i,"previousSibling"),u=Dc(c,n,t,u,"nextSibling")),(n[0].block||n[0].selector)&&(i=Oc(e,n,i,"previousSibling"),u=Oc(e,n,u,"nextSibling"),n[0].block&&(c.isBlock(i)||(i=Bc(c,n,i,a,u,s,!0)),c.isBlock(u)||(u=Bc(c,n,i,a,u,s,!1)))),1===i.nodeType&&(a=c.nodeIndex(i),i=i.parentNode),1===u.nodeType&&(s=c.nodeIndex(u)+1,u=u.parentNode),{startContainer:i,startOffset:a,endContainer:u,endOffset:s}},Ic=Xt.each,Lc=function(e,t,o){var n,r,i,a,u,s,c,l=t.startContainer,f=t.startOffset,d=t.endContainer,m=t.endOffset;if(0<(c=e.select("td[data-mce-selected],th[data-mce-selected]")).length)Ic(c,function(e){o([e])});else{var g,p,h,v=function(e){var t;return 3===(t=e[0]).nodeType&&t===l&&f>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===m&&0<e.length&&t===d&&3===t.nodeType&&e.splice(e.length-1,1),e},y=function(e,t,n){for(var r=[];e&&e!==n;e=e[t])r.push(e);return r},b=function(e,t){do{if(e.parentNode===t)return e;e=e.parentNode}while(e)},C=function(e,t,n){var r=n?"nextSibling":"previousSibling";for(u=(a=e).parentNode;a&&a!==t;a=u)u=a.parentNode,(s=y(a===e?a:a[r],r)).length&&(n||s.reverse(),o(v(s)))};if(1===l.nodeType&&l.hasChildNodes()&&(l=l.childNodes[f]),1===d.nodeType&&d.hasChildNodes()&&(p=m,h=(g=d).childNodes,--p>h.length-1?p=h.length-1:p<0&&(p=0),d=h[p]||g),l===d)return o(v([l]));for(n=e.findCommonAncestor(l,d),a=l;a;a=a.parentNode){if(a===d)return C(l,n,!0);if(a===n)break}for(a=d;a;a=a.parentNode){if(a===l)return C(d,n);if(a===n)break}r=b(l,n)||l,i=b(d,n)||d,C(l,r,!0),(s=y(r===l?r:r.nextSibling,"nextSibling",i===d?i.nextSibling:i)).length&&o(v(s)),C(d,i)}},Fc=(Ms=mr,zs="text",{get:function(e){if(!Ms(e))throw new Error("Can only get "+zs+" value of a "+zs+" node");return Us(e).getOr("")},getOption:Us=function(e){return Ms(e)?_.from(e.dom().nodeValue):_.none()},set:function(e,t){if(!Ms(e))throw new Error("Can only set raw "+zs+" value of a "+zs+" node");e.dom().nodeValue=t}}),Mc=function(e){return Fc.get(e)},zc=function(r,o,i,a){return Vr(o).fold(function(){return"skipping"},function(e){return"br"===a||mr(n=o)&&"\ufeff"===Mc(n)?"valid":dr(t=o)&&Gi(t,aa())?"existing":Ju(o)?"caret":wc.isValid(r,i,a)&&wc.isValid(r,lr(e),i)?"valid":"invalid-child";var t,n})},Uc=function(e,t,n,r){var o,i,a=t.uid,u=void 0===a?(o="mce-annotation",i=(new Date).getTime(),o+"_"+Math.floor(1e9*Math.random())+ ++ga+String(i)):a,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["uid"]),c=ar.fromTag("span",e);Xi(c,aa()),wr(c,""+sa(),u),wr(c,""+ua(),n);var l,f=r(u,s),d=f.attributes,m=void 0===d?{}:d,g=f.classes,p=void 0===g?[]:g;return Nr(c,m),l=c,z(p,function(e){Xi(l,e)}),c},jc=function(i,e,t,n,r){var a=[],u=Uc(i.getDoc(),r,t,n),s=Hi(_.none()),c=function(){s.set(_.none())},l=function(e){z(e,o)},o=function(e){var t,n;switch(zc(i,e,"span",lr(e))){case"invalid-child":c();var r=Kr(e);l(r),c();break;case"valid":var o=s.get().getOrThunk(function(){var e=ha(u);return a.push(e),s.set(_.some(e)),e});Pi(t=e,n=o),Fi(n,t)}};return Lc(i.dom,e,function(e){var t;c(),t=W(e,ar.fromDom),l(t)}),a},Vc=function(s,c,l,f){s.undoManager.transact(function(){var e,t,n,r,o=s.selection.getRng();if(o.collapsed&&(r=Pc(e=s,t=o,[{inline:!0}],3===(n=t).startContainer.nodeType&&n.startContainer.nodeValue.length>=n.startOffset&&"\xa0"===n.startContainer.nodeValue[n.startOffset]),t.setStart(r.startContainer,r.startOffset),t.setEnd(r.endContainer,r.endOffset),e.selection.setRng(t)),s.selection.getRng().collapsed){var i=Uc(s.getDoc(),f,c,l.decorate);ya(i,"\xa0"),s.selection.getRng().insertNode(i.dom()),s.selection.select(i.dom())}else{var a=Yu.getPersistentBookmark(s.selection,!1),u=s.selection.getRng();jc(s,u,c,l.decorate,f),s.selection.moveToBookmark(a)}})};function Hc(s){var n,r=(n={},{register:function(e,t){n[e]={name:e,settings:t}},lookup:function(e){return n.hasOwnProperty(e)?_.from(n[e]).map(function(e){return e.settings}):_.none()}});da(s,r);var o=fa(s);return{register:function(e,t){r.register(e,t)},annotate:function(t,n){r.lookup(t).each(function(e){Vc(s,t,e,n)})},annotationChanged:function(e,t){o.addListener(e,t)},remove:function(e){ca(s,_.some(e)).each(function(e){var t=e.elements;z(t,ji)})},getAll:function(e){var t,n,r,o,i,a,u=(t=s,n=e,r=ar.fromDom(t.getBody()),o=Qi(r,"["+ua()+'="'+n+'"]'),i={},z(o,function(e){var t=Er(e,sa()),n=i.hasOwnProperty(t)?i[t]:[];i[t]=n.concat([e])}),i);return a=function(e){return W(e,function(e){return e.dom()})},vr(u,function(e,t){return{k:t,v:a(e,t)}})}}}var qc=function(e){return Xt.grep(e.childNodes,function(e){return"LI"===e.nodeName})},$c=function(e){return e&&e.firstChild&&e.firstChild===e.lastChild&&("\xa0"===(t=e.firstChild).data||jo.isBr(t));var t},Wc=function(e){return 0<e.length&&(!(t=e[e.length-1]).firstChild||$c(t))?e.slice(0,-1):e;var t},Kc=function(e,t){var n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null},Xc=function(e,t){var n=_u.after(e),r=Js(t).prev(n);return r?r.toRange():null},Yc=function(t,e,n){var r,o,i,a,u=t.parentNode;return Xt.each(e,function(e){u.insertBefore(e,t)}),r=t,o=n,i=_u.before(r),(a=Js(o).next(i))?a.toRange():null},Gc=function(e,t){var n,r,o,i,a,u,s=t.firstChild,c=t.lastChild;return s&&"meta"===s.name&&(s=s.next),c&&"mce_marker"===c.attr("id")&&(c=c.prev),r=c,u=(n=e).getNonEmptyElements(),r&&(r.isEmpty(u)||(o=r,n.getBlockElements()[o.name]&&(a=o).firstChild&&a.firstChild===a.lastChild&&("br"===(i=o.firstChild).name||"\xa0"===i.value)))&&(c=c.prev),!(!s||s!==c||"ul"!==s.name&&"ol"!==s.name)},Jc=function(e,o,i,t){var n,r,a,u,s,c,l,f,d,m,g,p,h,v,y,b,C,x,w,N=(n=o,r=t,c=e.serialize(r),l=n.createFragment(c),u=(a=l).firstChild,s=a.lastChild,u&&"META"===u.nodeName&&u.parentNode.removeChild(u),s&&"mce_marker"===s.id&&s.parentNode.removeChild(s),a),E=Kc(o,i.startContainer),S=Wc(qc(N.firstChild)),T=o.getRoot(),k=function(e){var t=_u.fromRangeStart(i),n=Js(o.getRoot()),r=1===e?n.prev(t):n.next(t);return!r||Kc(o,r.getNode())!==E};return k(1)?Yc(E,S,T):k(2)?(f=E,d=S,m=T,o.insertAfter(d.reverse(),f),Xc(d[0],m)):(p=S,h=T,v=g=E,b=(y=i).cloneRange(),C=y.cloneRange(),b.setStartBefore(v),C.setEndAfter(v),x=[b.cloneContents(),C.cloneContents()],(w=g.parentNode).insertBefore(x[0],g),Xt.each(p,function(e){w.insertBefore(e,g)}),w.insertBefore(x[1],g),w.removeChild(g),Xc(p[p.length-1],h))},Qc=function(e,t){return!!Kc(e,t)},Zc=Xt.each,el=function(o){this.compare=function(e,t){if(e.nodeName!==t.nodeName)return!1;var n=function(n){var r={};return Zc(o.getAttribs(n),function(e){var t=e.nodeName.toLowerCase();0!==t.indexOf("_")&&"style"!==t&&0!==t.indexOf("data-")&&(r[t]=o.getAttrib(n,t))}),r},r=function(e,t){var n,r;for(r in e)if(e.hasOwnProperty(r)){if(void 0===(n=t[r]))return!1;if(e[r]!==n)return!1;delete t[r]}for(r in t)if(t.hasOwnProperty(r))return!1;return!0};return!(!r(n(e),n(t))||!r(o.parseStyle(o.getAttrib(e,"style")),o.parseStyle(o.getAttrib(t,"style")))||yc(e)||yc(t))}},tl=function(e){var t=Qi(e,"br"),n=U(function(e){for(var t=[],n=e.dom();n;)t.push(ar.fromDom(n)),n=n.lastChild;return t}(e).slice(-1),wo);t.length===n.length&&z(n,Ui)},nl=function(e){zi(e),Fi(e,ar.fromHtml('<br data-mce-bogus="1">'))},rl=function(n){Gr(n).each(function(t){Hr(t).each(function(e){Co(n)&&wo(t)&&Co(e)&&Ui(t)})})},ol=Xt.makeMap;function il(e){var u,s,c,l,f,d=[];return u=(e=e||{}).indent,s=ol(e.indent_before||""),c=ol(e.indent_after||""),l=ti.getEncodeFunc(e.entity_encoding||"raw",e.entities),f="html"===e.element_format,{start:function(e,t,n){var r,o,i,a;if(u&&s[e]&&0<d.length&&0<(a=d[d.length-1]).length&&"\n"!==a&&d.push("\n"),d.push("<",e),t)for(r=0,o=t.length;r<o;r++)i=t[r],d.push(" ",i.name,'="',l(i.value,!0),'"');d[d.length]=!n||f?">":" />",n&&u&&c[e]&&0<d.length&&0<(a=d[d.length-1]).length&&"\n"!==a&&d.push("\n")},end:function(e){var t;d.push("</",e,">"),u&&c[e]&&0<d.length&&0<(t=d[d.length-1]).length&&"\n"!==t&&d.push("\n")},text:function(e,t){0<e.length&&(d[d.length]=t?e:l(e))},cdata:function(e){d.push("<![CDATA[",e,"]]>")},comment:function(e){d.push("\x3c!--",e,"--\x3e")},pi:function(e,t){t?d.push("<?",e," ",l(t),"?>"):d.push("<?",e,"?>"),u&&d.push("\n")},doctype:function(e){d.push("<!DOCTYPE",e,">",u?"\n":"")},reset:function(){d.length=0},getContent:function(){return d.join("").replace(/\n$/,"")}}}function al(t,g){void 0===g&&(g=di());var p=il(t);return(t=t||{}).validate=!("validate"in t)||t.validate,{serialize:function(e){var f,d;d=t.validate,f={3:function(e){p.text(e.value,e.raw)},8:function(e){p.comment(e.value)},7:function(e){p.pi(e.name,e.value)},10:function(e){p.doctype(e.value)},4:function(e){p.cdata(e.value)},11:function(e){if(e=e.firstChild)for(;m(e),e=e.next;);}},p.reset();var m=function(e){var t,n,r,o,i,a,u,s,c,l=f[e.type];if(l)l(e);else{if(t=e.name,n=e.shortEnded,r=e.attributes,d&&r&&1<r.length&&((a=[]).map={},c=g.getElementRule(e.name))){for(u=0,s=c.attributesOrder.length;u<s;u++)(o=c.attributesOrder[u])in r.map&&(i=r.map[o],a.map[o]=i,a.push({name:o,value:i}));for(u=0,s=r.length;u<s;u++)(o=r[u].name)in a.map||(i=r.map[o],a.map[o]=i,a.push({name:o,value:i}));r=a}if(p.start(e.name,r,n),!n){if(e=e.firstChild)for(;m(e),e=e.next;);p.end(t)}}};return 1!==e.type||t.inner?f[11](e):m(e),p.getContent()}}}var ul,sl=function(a){var u=_u.fromRangeStart(a),s=_u.fromRangeEnd(a),c=a.commonAncestorContainer;return sc.fromPosition(!1,c,s).map(function(e){return!Ts(u,s,c)&&Ts(u,e,c)?(t=u.container(),n=u.offset(),r=e.container(),o=e.offset(),(i=V.document.createRange()).setStart(t,n),i.setEnd(r,o),i):a;var t,n,r,o,i}).getOr(a)},cl=function(e){return e.collapsed?e:sl(e)},ll=jo.matchNodeNames("td th"),fl=function(e,t){var n,r,o=e.selection.getRng(),i=o.startContainer,a=o.startOffset;o.collapsed&&(n=i,r=a,jo.isText(n)&&"\xa0"===n.nodeValue[r-1])&&jo.isText(i)&&(i.insertData(a-1," "),i.deleteData(a,1),o.setStart(i,a),o.setEnd(i,a),e.selection.setRng(o)),e.selection.setContent(t)},dl=function(e,t,n){var r,o,i,a,u,s,c,l,f,d,m,g=e.selection,p=e.dom;if(/^ | $/.test(t)&&(t=function(e,t){var n,r;n=e.startContainer,r=e.startOffset;var o=function(e){return n[e]&&3===n[e].nodeType};return 3===n.nodeType&&(0<r?t=t.replace(/^&nbsp;/," "):o("previousSibling")||(t=t.replace(/^ /,"&nbsp;")),r<n.length?t=t.replace(/&nbsp;(<br>|)$/," "):o("nextSibling")||(t=t.replace(/(&nbsp;| )(<br>|)$/,"&nbsp;"))),t}(g.getRng(),t)),r=e.parser,m=n.merge,o=al({validate:e.settings.validate},e.schema),d='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>',s={content:t,format:"html",selection:!0,paste:n.paste},(s=e.fire("BeforeSetContent",s)).isDefaultPrevented())e.fire("SetContent",{content:s.content,format:"html",selection:!0,paste:n.paste});else{-1===(t=s.content).indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,d);var h,v,y,b,C,x,w=(l=g.getRng()).startContainer||(l.parentElement?l.parentElement():null),N=e.getBody();w===N&&g.isCollapsed()&&p.isBlock(N.firstChild)&&(h=e,(v=N.firstChild)&&!h.schema.getShortEndedElements()[v.nodeName])&&p.isEmpty(N.firstChild)&&((l=p.createRng()).setStart(N.firstChild,0),l.setEnd(N.firstChild,0),g.setRng(l)),g.isCollapsed()||(e.selection.setRng(cl(e.selection.getRng())),e.getDoc().execCommand("Delete",!1,null),y=e.selection.getRng(),b=t,C=y.startContainer,x=y.startOffset,3===C.nodeType&&y.collapsed&&("\xa0"===C.data[x]?(C.deleteData(x,1),/[\u00a0| ]$/.test(b)||(b+=" ")):"\xa0"===C.data[x-1]&&(C.deleteData(x-1,1),/[\u00a0| ]$/.test(b)||(b=" "+b))),t=b);var E,S,T,k={context:(i=g.getNode()).nodeName.toLowerCase(),data:n.data,insert:!0};if(u=r.parse(t,k),!0===n.paste&&Gc(e.schema,u)&&Qc(p,i))return l=Jc(o,p,e.selection.getRng(),u),e.selection.setRng(l),void e.fire("SetContent",s);if(function(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}(u),"mce_marker"===(f=u.lastChild).attr("id"))for(f=(c=f).prev;f;f=f.walk(!0))if(3===f.type||!p.isBlock(f.name)){e.schema.isValidChild(f.parent.name,"span")&&f.parent.insert(c,f,"br"===f.name);break}if(e._selectionOverrides.showBlockCaretContainer(i),k.invalid){for(fl(e,d),i=g.getNode(),a=e.getBody(),9===i.nodeType?i=f=a:f=i;f!==a;)f=(i=f).parentNode;t=i===a?a.innerHTML:p.getOuterHTML(i),t=o.serialize(r.parse(t.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return o.serialize(u)}))),i===a?p.setHTML(a,t):p.setOuterHTML(i,t)}else!function(e,t,n){if("all"===n.getAttribute("data-mce-bogus"))n.parentNode.insertBefore(e.dom.createFragment(t),n);else{var r=n.firstChild,o=n.lastChild;!r||r===o&&"BR"===r.nodeName?e.dom.setHTML(n,t):fl(e,t)}}(e,t=o.serialize(u),i);!function(e,t){var n=e.schema.getTextInlineElements(),r=e.dom;if(t){var o=e.getBody(),i=new el(r);Xt.each(r.select("*[data-mce-fragment]"),function(e){for(var t=e.parentNode;t&&t!==o;t=t.parentNode)n[e.nodeName.toLowerCase()]&&i.compare(t,e)&&r.remove(e,!0)})}}(e,m),function(n,e){var t,r,o,i,a,u=n.dom,s=n.selection;if(e){if(n.selection.scrollIntoView(e),t=function(e){for(var t=n.getBody();e&&e!==t;e=e.parentNode)if("false"===n.dom.getContentEditable(e))return e;return null}(e))return u.remove(e),s.select(t);var c=u.createRng();(i=e.previousSibling)&&3===i.nodeType?(c.setStart(i,i.nodeValue.length),fe.ie||(a=e.nextSibling)&&3===a.nodeType&&(i.appendData(a.data),a.parentNode.removeChild(a))):(c.setStartBefore(e),c.setEndBefore(e)),r=u.getParent(e,u.isBlock),u.remove(e),r&&u.isEmpty(r)&&(n.$(r).empty(),c.setStart(r,0),c.setEnd(r,0),ll(r)||r.getAttribute("data-mce-fragment")||!(o=function(e){var t=_u.fromRangeStart(e);if(t=Js(n.getBody()).next(t))return t.toRange()}(c))?u.add(r,u.create("br",{"data-mce-bogus":"1"})):(c=o,u.remove(r))),s.setRng(c)}}(e,p.get("mce_marker")),E=e.getBody(),Xt.each(E.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")}),S=e.dom,T=e.selection.getStart(),_.from(S.getParent(T,"td,th")).map(ar.fromDom).each(rl),e.fire("SetContent",s),e.addVisual()}},ml=function(e,t){var n,r,o="string"!=typeof(n=t)?(r=Xt.extend({paste:n.paste,data:{paste:n.paste}},n),{content:n.content,details:r}):{content:n,details:{}};dl(e,o.content,o.details)},gl=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,pl=function(e,t,n){var r=e.getParam(t,n);if(-1!==r.indexOf("=")){var o=e.getParam(t,"","hash");return o.hasOwnProperty(e.id)?o[e.id]:n}return r},hl=function(e){return e.getParam("iframe_attrs",{})},vl=function(e){return e.getParam("doctype","<!DOCTYPE html>")},yl=function(e){return e.getParam("document_base_url","")},bl=function(e){return pl(e,"body_id","tinymce")},Cl=function(e){return pl(e,"body_class","")},xl=function(e){return e.getParam("content_security_policy","")},wl=function(e){return e.getParam("br_in_pre",!0)},Nl=function(e){if(e.getParam("force_p_newlines",!1))return"p";var t=e.getParam("forced_root_block","p");return!1===t?"":t},El=function(e){return e.getParam("forced_root_block_attrs",{})},Sl=function(e){return e.getParam("br_newline_selector",".mce-toc h2,figcaption,caption")},Tl=function(e){return e.getParam("no_newline_selector","")},kl=function(e){return e.getParam("keep_styles",!0)},_l=function(e){return e.getParam("end_container_on_empty_block",!1)},Al=function(e){return Xt.explode(e.getParam("font_size_style_values",""))},Rl=function(e){return Xt.explode(e.getParam("font_size_classes",""))},Dl=function(e){return e.getParam("images_dataimg_filter",q(!0),"function")},Ol=function(e){return e.getParam("automatic_uploads",!0,"boolean")},Bl=function(e){return e.getParam("images_reuse_filename",!1,"boolean")},Pl=function(e){return e.getParam("images_replace_blob_uris",!0,"boolean")},Il=function(e){return e.getParam("images_upload_url","","string")},Ll=function(e){return e.getParam("images_upload_base_path","","string")},Fl=function(e){return e.getParam("images_upload_credentials",!1,"boolean")},Ml=function(e){return e.getParam("images_upload_handler",null,"function")},zl=function(e){return e.getParam("content_css_cors",!1,"boolean")},Ul=function(e){return e.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string")},jl=function(e,t){if(!t)return t;var n=t.container(),r=t.offset();return e?Ta(n)?jo.isText(n.nextSibling)?_u(n.nextSibling,0):_u.after(n):Aa(t)?_u(n,r+1):t:Ta(n)?jo.isText(n.previousSibling)?_u(n.previousSibling,n.previousSibling.data.length):_u.before(n):Ra(t)?_u(n,r-1):t},Vl={isInlineTarget:function(e,t){return Lr(ar.fromDom(t),Ul(e))},findRootInline:function(e,t,n){var r,o,i,a=(r=e,o=t,i=n,U(Si.DOM.getParents(i.container(),"*",o),r));return _.from(a[a.length-1])},isRtl:function(e){return"rtl"===Si.DOM.getStyle(e,"direction",!0)||(t=e.textContent,gl.test(t));var t},isAtZwsp:function(e){return Aa(e)||Ra(e)},normalizePosition:jl,normalizeForwards:d(jl,!0),normalizeBackwards:d(jl,!1),hasSameParentBlock:function(e,t,n){var r=Ss(t,e),o=Ss(n,e);return r&&r===o}},Hl=function(e,t){return zr(e,t)?na(t,function(e){return No(e)||So(e)},(n=e,function(e){return Mr(n,ar.fromDom(e.dom().parentNode))})):_.none();var n},ql=function(e){var t,n,r;e.dom.isEmpty(e.getBody())&&(e.setContent(""),n=(t=e).getBody(),r=n.firstChild&&t.dom.isBlock(n.firstChild)?n.firstChild:n,t.selection.setCursorLocation(r,0))},$l=function(i,a,u){return ru(sc.firstPositionIn(u),sc.lastPositionIn(u),function(e,t){var n=Vl.normalizePosition(!0,e),r=Vl.normalizePosition(!1,t),o=Vl.normalizePosition(!1,a);return i?sc.nextPosition(u,o).map(function(e){return e.isEqual(r)&&a.isEqual(n)}).getOr(!1):sc.prevPosition(u,o).map(function(e){return e.isEqual(n)&&a.isEqual(r)}).getOr(!1)}).getOr(!0)},Wl=function(e,t){var n,r,o,i=ar.fromDom(e),a=ar.fromDom(t);return n=a,r="pre,code",o=d(Mr,i),ra(n,r,o).isSome()},Kl=function(e,t){return Ha(t)&&!1===(r=e,o=t,jo.isText(o)&&/^[ \t\r\n]*$/.test(o.data)&&!1===Wl(r,o))||(n=t,jo.isElement(n)&&"A"===n.nodeName&&n.hasAttribute("name"))||Xl(t);var n,r,o},Xl=jo.hasAttribute("data-mce-bookmark"),Yl=jo.hasAttribute("data-mce-bogus"),Gl=jo.hasAttributeValue("data-mce-bogus","all"),Jl=function(e){return function(e){var t,n,r=0;if(Kl(e,e))return!1;if(!(n=e.firstChild))return!0;t=new go(n,e);do{if(Gl(n))n=t.next(!0);else if(Yl(n))n=t.next();else if(jo.isBr(n))r++,n=t.next();else{if(Kl(e,n))return!1;n=t.next()}}while(n);return r<=1}(e.dom())},Ql=Ar("block","position"),Zl=Ar("from","to"),ef=function(e,t){var n=ar.fromDom(e),r=ar.fromDom(t.container());return Hl(n,r).map(function(e){return Ql(e,t)})},tf=function(o,i,e){var t=ef(o,_u.fromRangeStart(e)),n=t.bind(function(e){return sc.fromPosition(i,o,e.position()).bind(function(e){return ef(o,e).map(function(e){return t=o,n=i,r=e,jo.isBr(r.position().getNode())&&!1===Jl(r.block())?sc.positionIn(!1,r.block().dom()).bind(function(e){return e.isEqual(r.position())?sc.fromPosition(n,t,e).bind(function(e){return ef(t,e)}):_.some(r)}).getOr(r):r;var t,n,r})})});return ru(t,n,Zl).filter(function(e){return!1===Mr((r=e).from().block(),r.to().block())&&Vr((n=e).from().block()).bind(function(t){return Vr(n.to().block()).filter(function(e){return Mr(t,e)})}).isSome()&&(t=e,!1===jo.isContentEditableFalse(t.from().block().dom())&&!1===jo.isContentEditableFalse(t.to().block().dom()));var t,n,r})},nf=function(e,t,n){return n.collapsed?tf(e,t,n):_.none()},rf=function(e,t,n){return zr(t,e)?function(e,t){for(var n=D(t)?t:b,r=e.dom(),o=[];null!==r.parentNode&&r.parentNode!==undefined;){var i=r.parentNode,a=ar.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o}(e,function(e){return n(e)||Mr(e,t)}).slice(0,-1):[]},of=function(e,t){return rf(e,t,q(!1))},af=of,uf=function(e,t){return[e].concat(of(e,t))},sf=function(e){var t,n=(t=Kr(e),Y(t,Co).fold(function(){return t},function(e){return t.slice(0,e)}));return z(n,Ui),n},cf=function(e,t){var n=uf(t,e);return X(n.reverse(),Jl).each(Ui)},lf=function(e,t,n,r){if(Jl(n))return nl(n),sc.firstPositionIn(n.dom());0===U($r(r),function(e){return!Jl(e)}).length&&Jl(t)&&Pi(r,ar.fromTag("br"));var o=sc.prevPosition(n.dom(),_u.before(r.dom()));return z(sf(t),function(e){Pi(r,e)}),cf(e,t),o},ff=function(e,t,n){if(Jl(n))return Ui(n),Jl(t)&&nl(t),sc.firstPositionIn(t.dom());var r=sc.lastPositionIn(n.dom());return z(sf(t),function(e){Fi(n,e)}),cf(e,t),r},df=function(e,t){return zr(t,e)?(n=uf(e,t),_.from(n[n.length-1])):_.none();var n},mf=function(e,t){sc.positionIn(e,t.dom()).map(function(e){return e.getNode()}).map(ar.fromDom).filter(wo).each(Ui)},gf=function(e,t,n){return mf(!0,t),mf(!1,n),df(t,n).fold(d(ff,e,t,n),d(lf,e,t,n))},pf=function(e,t,n,r){return t?gf(e,r,n):gf(e,n,r)},hf=function(t,n){var e,r=ar.fromDom(t.getBody());return(e=nf(r.dom(),n,t.selection.getRng()).bind(function(e){return pf(r,n,e.from().block(),e.to().block())})).each(function(e){t.selection.setRng(e.toRange())}),e.isSome()},vf=function(e,t){var n=ar.fromDom(t),r=d(Mr,e);return ta(n,_o,r).isSome()},yf=function(e,t){var n,r,o=sc.prevPosition(e.dom(),_u.fromRangeStart(t)).isNone(),i=sc.nextPosition(e.dom(),_u.fromRangeEnd(t)).isNone();return!(vf(n=e,(r=t).startContainer)||vf(n,r.endContainer))&&o&&i},bf=function(e){var n,r,o,t,i=ar.fromDom(e.getBody()),a=e.selection.getRng();return yf(i,a)?((t=e).setContent(""),t.selection.setCursorLocation(),!0):(n=i,r=e.selection,o=r.getRng(),ru(Hl(n,ar.fromDom(o.startContainer)),Hl(n,ar.fromDom(o.endContainer)),function(e,t){return!1===Mr(e,t)&&(o.deleteContents(),pf(n,!0,e,t).each(function(e){r.setRng(e.toRange())}),!0)}).getOr(!1))},Cf=function(e,t){return!e.selection.isCollapsed()&&bf(e)},xf=function(a){if(!k(a))throw new Error("cases must be an array");if(0===a.length)throw new Error("there must be at least one case");var u=[],n={};return z(a,function(e,r){var t=gr(e);if(1!==t.length)throw new Error("one and only one name per case");var o=t[0],i=e[o];if(n[o]!==undefined)throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!k(i))throw new Error("case arguments must be an array");u.push(o),n[o]=function(){var e=arguments.length;if(e!==i.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+i.length+" ("+i+"), got "+e);for(var n=new Array(e),t=0;t<n.length;t++)n[t]=arguments[t];return{fold:function(){if(arguments.length!==a.length)throw new Error("Wrong number of arguments to fold. Expected "+a.length+", got "+arguments.length);return arguments[r].apply(null,n)},match:function(e){var t=gr(e);if(u.length!==t.length)throw new Error("Wrong number of arguments to match. Expected: "+u.join(",")+"\nActual: "+t.join(","));if(!J(u,function(e){return F(t,e)}))throw new Error("Not all branches were specified when using match. Specified: "+t.join(", ")+"\nRequired: "+u.join(", "));return e[o].apply(null,n)},log:function(e){V.console.log(e,{constructors:u,constructor:o,params:n})}}}}),n},wf=function(e){return Is(e).exists(wo)},Nf=function(e,t,n){var r=U(uf(ar.fromDom(n.container()),t),Co),o=Z(r).getOr(t);return sc.fromPosition(e,o.dom(),n).filter(wf)},Ef=function(e,t){return Is(t).exists(wo)||Nf(!0,e,t).isSome()},Sf=function(e,t){return(n=t,_.from(n.getNode(!0)).map(ar.fromDom)).exists(wo)||Nf(!1,e,t).isSome();var n},Tf=d(Nf,!1),kf=d(Nf,!0),_f=(ul="\xa0",function(e){return ul===e}),Af=function(e){return/^[\r\n\t ]$/.test(e)},Rf=function(e){return!Af(e)&&!_f(e)},Df=function(n,r,o){return _.from(o.container()).filter(jo.isText).exists(function(e){var t=n?0:-1;return r(e.data.charAt(o.offset()+t))})},Of=d(Df,!0,Af),Bf=d(Df,!1,Af),Pf=function(e){var t=e.container();return jo.isText(t)&&0===t.data.length},If=function(e,t){var n=ks(e,t);return jo.isContentEditableFalse(n)&&!jo.isBogusAll(n)},Lf=d(If,0),Ff=d(If,-1),Mf=function(e,t){return jo.isTable(ks(e,t))},zf=d(Mf,0),Uf=d(Mf,-1),jf=xf([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),Vf=function(e,t,n,r){var o=r.getNode(!1===t);return Hl(ar.fromDom(e),ar.fromDom(n.getNode())).map(function(e){return Jl(e)?jf.remove(e.dom()):jf.moveToElement(o)}).orThunk(function(){return _.some(jf.moveToElement(o))})},Hf=function(u,s,c){return sc.fromPosition(s,u,c).bind(function(e){return a=e.getNode(),_o(ar.fromDom(a))||So(ar.fromDom(a))?_.none():(t=u,o=e,i=function(e){return xo(ar.fromDom(e))&&!Ts(r,o,t)},Bs(!(n=s),r=c).fold(function(){return Bs(n,o).fold(q(!1),i)},i)?_.none():s&&jo.isContentEditableFalse(e.getNode())?Vf(u,s,c,e):!1===s&&jo.isContentEditableFalse(e.getNode(!0))?Vf(u,s,c,e):s&&Ff(c)?_.some(jf.moveToPosition(e)):!1===s&&Lf(c)?_.some(jf.moveToPosition(e)):_.none());var t,n,r,o,i,a})},qf=function(r,e,o){return i=e,a=o.getNode(!1===i),u=i?"after":"before",jo.isElement(a)&&a.getAttribute("data-mce-caret")===u?(t=e,n=o.getNode(!1===e),t&&jo.isContentEditableFalse(n.nextSibling)?_.some(jf.moveToElement(n.nextSibling)):!1===t&&jo.isContentEditableFalse(n.previousSibling)?_.some(jf.moveToElement(n.previousSibling)):_.none()).fold(function(){return Hf(r,e,o)},_.some):Hf(r,e,o).bind(function(e){return t=r,n=o,e.fold(function(e){return _.some(jf.remove(e))},function(e){return _.some(jf.moveToElement(e))},function(e){return Ts(n,e,t)?_.none():_.some(jf.moveToPosition(e))});var t,n});var t,n,i,a,u},$f=function(e,t,n){if(0!==n){var r,o,i,a=e.data.slice(t,t+n),u=t+n>=e.data.length,s=0===t;e.replaceData(t,n,(o=s,i=u,j((r=a).split(""),function(e,t){return-1!==" \f\n\r\t\x0B".indexOf(t)||"\xa0"===t?e.previousCharIsSpace||""===e.str&&o||e.str.length===r.length-1&&i?{previousCharIsSpace:!1,str:e.str+"\xa0"}:{previousCharIsSpace:!0,str:e.str+" "}:{previousCharIsSpace:!1,str:e.str+t}},{previousCharIsSpace:!1,str:""}).str))}},Wf=function(e,t){var n,r=e.data.slice(t),o=r.length-(n=r,n.replace(/^\s+/g,"")).length;return $f(e,t,o)},Kf=function(e,t){return r=e,o=(n=t).container(),i=n.offset(),!1===_u.isTextPosition(n)&&o===r.parentNode&&i>_u.before(r).offset()?_u(t.container(),t.offset()-1):t;var n,r,o,i},Xf=function(e){return Ha(e.previousSibling)?_.some((t=e.previousSibling,jo.isText(t)?_u(t,t.data.length):_u.after(t))):e.previousSibling?sc.lastPositionIn(e.previousSibling):_.none();var t},Yf=function(e){return Ha(e.nextSibling)?_.some((t=e.nextSibling,jo.isText(t)?_u(t,0):_u.before(t))):e.nextSibling?sc.firstPositionIn(e.nextSibling):_.none();var t},Gf=function(r,o){return Xf(o).orThunk(function(){return Yf(o)}).orThunk(function(){return e=r,t=o,n=_u.before(t.previousSibling?t.previousSibling:t.parentNode),sc.prevPosition(e,n).fold(function(){return sc.nextPosition(e,_u.after(t))},_.some);var e,t,n})},Jf=function(n,r){return Yf(r).orThunk(function(){return Xf(r)}).orThunk(function(){return e=n,t=r,sc.nextPosition(e,_u.after(t)).fold(function(){return sc.prevPosition(e,_u.before(t))},_.some);var e,t})},Qf=function(e,t,n){return(r=e,o=t,i=n,r?Jf(o,i):Gf(o,i)).map(d(Kf,n));var r,o,i},Zf=function(t,n,e){e.fold(function(){t.focus()},function(e){t.selection.setRng(e.toRange(),n)})},ed=function(e,t){return t&&e.schema.getBlockElements().hasOwnProperty(lr(t))},td=function(e){if(Jl(e)){var t=ar.fromHtml('<br data-mce-bogus="1">');return zi(e),Fi(e,t),_.some(_u.before(t.dom()))}return _.none()},nd=function(e,t,l){var n,r,o,i,a=Hr(e).filter(mr),u=qr(e).filter(mr);return Ui(e),(n=a,r=u,o=t,i=function(e,t,n){var r,o,i,a,u=e.dom(),s=t.dom(),c=u.data.length;return o=s,i=l,a=Jn((r=u).data).length,r.appendData(o.data),Ui(ar.fromDom(o)),i&&Wf(r,a),n.container()===s?_u(u,c):n},n.isSome()&&r.isSome()&&o.isSome()?_.some(i(n.getOrDie(),r.getOrDie(),o.getOrDie())):_.none()).orThunk(function(){return l&&(a.each(function(e){return t=e.dom(),n=e.dom().length,r=t.data.slice(0,n),o=r.length-Jn(r).length,$f(t,n-o,o);var t,n,r,o}),u.each(function(e){return Wf(e.dom(),0)})),t})},rd=function(t,n,e,r){void 0===r&&(r=!0);var o,i,a=Qf(n,t.getBody(),e.dom()),u=ta(e,d(ed,t),(o=t.getBody(),function(e){return e.dom()===o})),s=nd(e,a,(i=e,br(t.schema.getTextInlineElements(),lr(i))));t.dom.isEmpty(t.getBody())?(t.setContent(""),t.selection.setCursorLocation()):u.bind(td).fold(function(){r&&Zf(t,n,s)},function(e){r&&Zf(t,n,_.some(e))})},od=function(a,u){var e,t,n,r,o,i;return(e=a.getBody(),t=u,n=a.selection.getRng(),r=Os(t?1:-1,e,n),o=_u.fromRangeStart(r),i=ar.fromDom(e),!1===t&&Ff(o)?_.some(jf.remove(o.getNode(!0))):t&&Lf(o)?_.some(jf.remove(o.getNode())):!1===t&&Lf(o)&&Sf(i,o)?Tf(i,o).map(function(e){return jf.remove(e.getNode())}):t&&Ff(o)&&Ef(i,o)?kf(i,o).map(function(e){return jf.remove(e.getNode())}):qf(e,t,o)).map(function(e){return e.fold((o=a,i=u,function(e){return o._selectionOverrides.hideFakeCaret(),rd(o,i,ar.fromDom(e)),!0}),(n=a,r=u,function(e){var t=r?_u.before(e):_u.after(e);return n.selection.setRng(t.toRange()),!0}),(t=a,function(e){return t.selection.setRng(e.toRange()),!0}));var t,n,r,o,i}).getOr(!1)},id=function(e,t){var n,r=e.selection.getNode();return!!jo.isContentEditableFalse(r)&&(n=ar.fromDom(e.getBody()),z(Qi(n,".mce-offscreen-selection"),Ui),rd(e,t,ar.fromDom(e.selection.getNode())),ql(e),!0)},ad=function(e,t){return e.selection.isCollapsed()?od(e,t):id(e,t)},ud=function(e){var t,n=function(e,t){for(;t&&t!==e;){if(jo.isContentEditableTrue(t)||jo.isContentEditableFalse(t))return t;t=t.parentNode}return null}(e.getBody(),e.selection.getNode());return jo.isContentEditableTrue(n)&&e.dom.isBlock(n)&&e.dom.isEmpty(n)&&(t=e.dom.create("br",{"data-mce-bogus":"1"}),e.dom.setHTML(n,""),n.appendChild(t),e.selection.setRng(_u.before(t).toRange())),!0},sd=jo.isText,cd=function(e){return sd(e)&&e.data[0]===xa},ld=function(e){return sd(e)&&e.data[e.data.length-1]===xa},fd=function(e){return e.ownerDocument.createTextNode(xa)},dd=function(e,t){return e?function(e){if(sd(e.previousSibling))return ld(e.previousSibling)||e.previousSibling.appendData(xa),e.previousSibling;if(sd(e))return cd(e)||e.insertData(0,xa),e;var t=fd(e);return e.parentNode.insertBefore(t,e),t}(t):function(e){if(sd(e.nextSibling))return cd(e.nextSibling)||e.nextSibling.insertData(0,xa),e.nextSibling;if(sd(e))return ld(e)||e.appendData(xa),e;var t=fd(e);return e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t}(t)},md=d(dd,!0),gd=d(dd,!1),pd=function(e,t){return jo.isText(e.container())?dd(t,e.container()):dd(t,e.getNode())},hd=function(e,t){var n=t.get();return n&&e.container()===n&&Ta(n)},vd=function(n,e){return e.fold(function(e){ss.remove(n.get());var t=md(e);return n.set(t),_.some(_u(t,t.length-1))},function(e){return sc.firstPositionIn(e).map(function(e){if(hd(e,n))return _u(n.get(),1);ss.remove(n.get());var t=pd(e,!0);return n.set(t),_u(t,1)})},function(e){return sc.lastPositionIn(e).map(function(e){if(hd(e,n))return _u(n.get(),n.get().length-1);ss.remove(n.get());var t=pd(e,!1);return n.set(t),_u(t,t.length-1)})},function(e){ss.remove(n.get());var t=gd(e);return n.set(t),_.some(_u(t,1))})},yd=function(e,t){for(var n=0;n<e.length;n++){var r=e[n].apply(null,t);if(r.isSome())return r}return _.none()},bd=xf([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),Cd=function(e,t){var n=Ss(t,e);return n||e},xd=function(e,t,n){var r=Vl.normalizeForwards(n),o=Cd(t,r.container());return Vl.findRootInline(e,o,r).fold(function(){return sc.nextPosition(o,r).bind(d(Vl.findRootInline,e,o)).map(function(e){return bd.before(e)})},_.none)},wd=function(e,t){return null===Qu(e,t)},Nd=function(e,t,n){return Vl.findRootInline(e,t,n).filter(d(wd,t))},Ed=function(e,t,n){var r=Vl.normalizeBackwards(n);return Nd(e,t,r).bind(function(e){return sc.prevPosition(e,r).isNone()?_.some(bd.start(e)):_.none()})},Sd=function(e,t,n){var r=Vl.normalizeForwards(n);return Nd(e,t,r).bind(function(e){return sc.nextPosition(e,r).isNone()?_.some(bd.end(e)):_.none()})},Td=function(e,t,n){var r=Vl.normalizeBackwards(n),o=Cd(t,r.container());return Vl.findRootInline(e,o,r).fold(function(){return sc.prevPosition(o,r).bind(d(Vl.findRootInline,e,o)).map(function(e){return bd.after(e)})},_.none)},kd=function(e){return!1===Vl.isRtl(Ad(e))},_d=function(e,t,n){return yd([xd,Ed,Sd,Td],[e,t,n]).filter(kd)},Ad=function(e){return e.fold($,$,$,$)},Rd=function(e){return e.fold(q("before"),q("start"),q("end"),q("after"))},Dd=function(e){return e.fold(bd.before,bd.before,bd.after,bd.after)},Od=function(n,e,r,t,o,i){return ru(Vl.findRootInline(e,r,t),Vl.findRootInline(e,r,o),function(e,t){return e!==t&&Vl.hasSameParentBlock(r,e,t)?bd.after(n?e:t):i}).getOr(i)},Bd=function(e,r){return e.fold(q(!0),function(e){return n=r,!(Rd(t=e)===Rd(n)&&Ad(t)===Ad(n));var t,n})},Pd=function(e,t){return e?t.fold(H(_.some,bd.start),_.none,H(_.some,bd.after),_.none):t.fold(_.none,H(_.some,bd.before),_.none,H(_.some,bd.end))},Id=function(a,u,s,c){var e=Vl.normalizePosition(a,c),l=_d(u,s,e);return _d(u,s,e).bind(d(Pd,a)).orThunk(function(){return t=a,n=u,r=s,o=l,e=c,i=Vl.normalizePosition(t,e),sc.fromPosition(t,r,i).map(d(Vl.normalizePosition,t)).fold(function(){return o.map(Dd)},function(e){return _d(n,r,e).map(d(Od,t,n,r,i,e)).filter(d(Bd,o))}).filter(kd);var t,n,r,o,e,i})},Ld=_d,Fd=Id,Md=(d(Id,!1),d(Id,!0),Dd),zd=function(e){return e.fold(bd.start,bd.start,bd.end,bd.end)},Ud=function(e){return D(e.selection.getSel().modify)},jd=function(e,t,n){var r=e?1:-1;return t.setRng(_u(n.container(),n.offset()+r).toRange()),t.getSel().modify("move",e?"forward":"backward","word"),!0},Vd=function(e,t){var n=t.selection.getRng(),r=e?_u.fromRangeEnd(n):_u.fromRangeStart(n);return!!Ud(t)&&(e&&Aa(r)?jd(!0,t.selection,r):!(e||!Ra(r))&&jd(!1,t.selection,r))},Hd=function(e,t){var n=e.dom.createRng();n.setStart(t.container(),t.offset()),n.setEnd(t.container(),t.offset()),e.selection.setRng(n)},qd=function(e){return!1!==e.settings.inline_boundaries},$d=function(e,t){e?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")},Wd=function(t,e,n){return vd(e,n).map(function(e){return Hd(t,e),n})},Kd=function(e,t,n){return function(){return!!qd(t)&&Vd(e,t)}},Xd={move:function(a,u,s){return function(){return!!qd(a)&&(t=a,n=u,e=s,r=t.getBody(),o=_u.fromRangeStart(t.selection.getRng()),i=d(Vl.isInlineTarget,t),Fd(e,i,r,o).bind(function(e){return Wd(t,n,e)})).isSome();var t,n,e,r,o,i}},moveNextWord:d(Kd,!0),movePrevWord:d(Kd,!1),setupSelectedState:function(a){var u=Hi(null),s=d(Vl.isInlineTarget,a);return a.on("NodeChange",function(e){var t,n,r,o,i;qd(a)&&(t=s,n=a.dom,r=e.parents,o=U(n.select('*[data-mce-selected="inline-boundary"]'),t),i=U(r,t),z(Q(o,i),d($d,!1)),z(Q(i,o),d($d,!0)),function(e,t){if(e.selection.isCollapsed()&&!0!==e.composing&&t.get()){var n=_u.fromRangeStart(e.selection.getRng());_u.isTextPosition(n)&&!1===Vl.isAtZwsp(n)&&(Hd(e,ss.removeAndReposition(t.get(),n)),t.set(null))}}(a,u),function(n,r,o,e){if(r.selection.isCollapsed()){var t=U(e,n);z(t,function(e){var t=_u.fromRangeStart(r.selection.getRng());Ld(n,r.getBody(),t).bind(function(e){return Wd(r,o,e)})})}}(s,a,u,e.parents))}),u},setCaretPosition:Hd},Yd=function(t,n){return function(e){return vd(n,e).map(function(e){return Xd.setCaretPosition(t,e),!0}).getOr(!1)}},Gd=function(r,o,i,a){var u=r.getBody(),s=d(Vl.isInlineTarget,r);r.undoManager.ignore(function(){var e,t,n;r.selection.setRng((e=i,t=a,(n=V.document.createRange()).setStart(e.container(),e.offset()),n.setEnd(t.container(),t.offset()),n)),r.execCommand("Delete"),Ld(s,u,_u.fromRangeStart(r.selection.getRng())).map(zd).map(Yd(r,o))}),r.nodeChanged()},Jd=function(n,r,i,o){var e,t,a=(e=n.getBody(),t=o.container(),Ss(t,e)||e),u=d(Vl.isInlineTarget,n),s=Ld(u,a,o);return s.bind(function(e){return i?e.fold(q(_.some(zd(e))),_.none,q(_.some(Md(e))),_.none):e.fold(_.none,q(_.some(Md(e))),_.none,q(_.some(zd(e))))}).map(Yd(n,r)).getOrThunk(function(){var t=sc.navigate(i,a,o),e=t.bind(function(e){return Ld(u,a,e)});return s.isSome()&&e.isSome()?Vl.findRootInline(u,a,o).map(function(e){return o=e,!!ru(sc.firstPositionIn(o),sc.lastPositionIn(o),function(e,t){var n=Vl.normalizePosition(!0,e),r=Vl.normalizePosition(!1,t);return sc.nextPosition(o,n).map(function(e){return e.isEqual(r)}).getOr(!0)}).getOr(!0)&&(rd(n,i,ar.fromDom(e)),!0);var o}).getOr(!1):e.bind(function(e){return t.map(function(e){return i?Gd(n,r,o,e):Gd(n,r,e,o),!0})}).getOr(!1)})},Qd=function(e,t,n){if(e.selection.isCollapsed()&&!1!==e.settings.inline_boundaries){var r=_u.fromRangeStart(e.selection.getRng());return Jd(e,t,n,r)}return!1},Zd=Ar("start","end"),em=Ar("rng","table","cells"),tm=xf([{removeTable:["element"]},{emptyCells:["cells"]}]),nm=function(e,t){return ia(ar.fromDom(e),"td,th",t)},rm=function(e,t){return ra(e,"table",t)},om=function(e){return!1===Mr(e.start(),e.end())},im=function(e,n){return rm(e.start(),n).bind(function(t){return rm(e.end(),n).bind(function(e){return Mr(t,e)?_.some(t):_.none()})})},am=function(e){return Qi(e,"td,th")},um=function(r,e){var t=nm(e.startContainer,r),n=nm(e.endContainer,r);return e.collapsed?_.none():ru(t,n,Zd).fold(function(){return t.fold(function(){return n.bind(function(t){return rm(t,r).bind(function(e){return Z(am(e)).map(function(e){return Zd(e,t)})})})},function(t){return rm(t,r).bind(function(e){return ee(am(e)).map(function(e){return Zd(t,e)})})})},function(e){return sm(r,e)?_.none():(n=r,rm((t=e).start(),n).bind(function(e){return ee(am(e)).map(function(e){return Zd(t.start(),e)})}));var t,n})},sm=function(e,t){return im(t,e).isSome()},cm=function(e,t){var n,r,o,i,a=d(Mr,e);return(n=t,r=a,o=nm(n.startContainer,r),i=nm(n.endContainer,r),ru(o,i,Zd).filter(om).filter(function(e){return sm(r,e)}).orThunk(function(){return um(r,n)})).bind(function(e){return im(t=e,a).map(function(e){return em(t,e,am(e))});var t})},lm=function(e,t){return Y(e,function(e){return Mr(e,t)})},fm=function(n){return(r=n,ru(lm(r.cells(),r.rng().start()),lm(r.cells(),r.rng().end()),function(e,t){return r.cells().slice(e,t+1)})).map(function(e){var t=n.cells();return e.length===t.length?tm.removeTable(n.table()):tm.emptyCells(e)});var r},dm=function(e,t){return cm(e,t).bind(fm)},mm=function(e){var t=[];if(e)for(var n=0;n<e.rangeCount;n++)t.push(e.getRangeAt(n));return t},gm=mm,pm=function(e){return G(e,function(e){var t=Za(e);return t?[ar.fromDom(t)]:[]})},hm=function(e){return 1<mm(e).length},vm=function(e){return U(pm(e),_o)},ym=function(e){return Qi(e,"td[data-mce-selected],th[data-mce-selected]")},bm=function(e,t){var n=ym(t),r=vm(e);return 0<n.length?n:r},Cm=bm,xm=function(e){return bm(gm(e.selection.getSel()),ar.fromDom(e.getBody()))},wm=function(e,t){return z(t,nl),e.selection.setCursorLocation(t[0].dom(),0),!0},Nm=function(e,t){return rd(e,!1,t),!0},Em=function(n,e,r,t){return Tm(e,t).fold(function(){return t=n,dm(e,r).map(function(e){return e.fold(d(Nm,t),d(wm,t))});var t},function(e){return km(n,e)}).getOr(!1)},Sm=function(e,t){return X(uf(t,e),_o)},Tm=function(e,t){return X(uf(t,e),function(e){return"caption"===lr(e)})},km=function(e,t){return nl(t),e.selection.setCursorLocation(t.dom(),0),_.some(!0)},_m=function(u,s,c,l,f){return sc.navigate(c,u.getBody(),f).bind(function(e){return r=l,o=c,i=f,a=e,sc.firstPositionIn(r.dom()).bind(function(t){return sc.lastPositionIn(r.dom()).map(function(e){return o?i.isEqual(t)&&a.isEqual(e):i.isEqual(e)&&a.isEqual(t)})}).getOr(!0)?km(u,l):(t=l,n=e,Tm(s,ar.fromDom(n.getNode())).map(function(e){return!1===Mr(e,t)}));var t,n,r,o,i,a}).or(_.some(!0))},Am=function(a,u,s,e){var c=_u.fromRangeStart(a.selection.getRng());return Sm(s,e).bind(function(e){return Jl(e)?km(a,e):(t=a,n=s,r=u,o=e,i=c,sc.navigate(r,t.getBody(),i).bind(function(e){return Sm(n,ar.fromDom(e.getNode())).map(function(e){return!1===Mr(e,o)})}));var t,n,r,o,i})},Rm=function(a,u,e){var s=ar.fromDom(a.getBody());return Tm(s,e).fold(function(){return Am(a,u,s,e)},function(e){return t=a,n=u,r=s,o=e,i=_u.fromRangeStart(t.selection.getRng()),Jl(o)?km(t,o):_m(t,r,n,o,i);var t,n,r,o,i}).getOr(!1)},Dm=function(e,t){var n,r,o,i,a,u=ar.fromDom(e.selection.getStart(!0)),s=xm(e);return e.selection.isCollapsed()&&0===s.length?Rm(e,t,u):(n=e,r=u,o=ar.fromDom(n.getBody()),i=n.selection.getRng(),0!==(a=xm(n)).length?wm(n,a):Em(n,o,i,r))},Om=wc.isEq,Bm=function(e,t,n){var r=e.formatter.get(n);if(r)for(var o=0;o<r.length;o++)if(!1===r[o].inherit&&e.dom.is(t,r[o].selector))return!0;return!1},Pm=function(t,e,n,r){var o=t.dom.getRoot();return e!==o&&(e=t.dom.getParent(e,function(e){return!!Bm(t,e,n)||e.parentNode===o||!!Fm(t,e,n,r,!0)}),Fm(t,e,n,r))},Im=function(e,t,n){return!!Om(t,n.inline)||!!Om(t,n.block)||(n.selector?1===t.nodeType&&e.is(t,n.selector):void 0)},Lm=function(e,t,n,r,o,i){var a,u,s,c=n[r];if(n.onmatch)return n.onmatch(t,n,r);if(c)if("undefined"==typeof c.length){for(a in c)if(c.hasOwnProperty(a)){if(u="attributes"===r?e.getAttrib(t,a):wc.getStyle(e,t,a),o&&!u&&!n.exact)return;if((!o||n.exact)&&!Om(u,wc.normalizeStyleValue(e,wc.replaceVars(c[a],i),a)))return}}else for(s=0;s<c.length;s++)if("attributes"===r?e.getAttrib(t,c[s]):wc.getStyle(e,t,c[s]))return n;return n},Fm=function(e,t,n,r,o){var i,a,u,s,c=e.formatter.get(n),l=e.dom;if(c&&t)for(a=0;a<c.length;a++)if(i=c[a],Im(e.dom,t,i)&&Lm(l,t,i,"attributes",o,r)&&Lm(l,t,i,"styles",o,r)){if(s=i.classes)for(u=0;u<s.length;u++)if(!e.dom.hasClass(t,s[u]))return;return i}},Mm={matchNode:Fm,matchName:Im,match:function(e,t,n,r){var o;return r?Pm(e,r,t,n):(r=e.selection.getNode(),!!Pm(e,r,t,n)||!((o=e.selection.getStart())===r||!Pm(e,o,t,n)))},matchAll:function(r,o,i){var e,a=[],u={};return e=r.selection.getStart(),r.dom.getParent(e,function(e){var t,n;for(t=0;t<o.length;t++)n=o[t],!u[n]&&Fm(r,e,n,i)&&(u[n]=!0,a.push(n))},r.dom.getRoot()),a},canApply:function(e,t){var n,r,o,i,a,u=e.formatter.get(t),s=e.dom;if(u)for(n=e.selection.getStart(),r=wc.getParents(s,n),i=u.length-1;0<=i;i--){if(!(a=u[i].selector)||u[i].defaultBlock)return!0;for(o=r.length-1;0<=o;o--)if(s.is(r[o],a))return!0}return!1},matchesUnInheritedFormatSelector:Bm},zm=function(e,t){return e.splitText(t)},Um=function(e){var t=e.startContainer,n=e.startOffset,r=e.endContainer,o=e.endOffset;return t===r&&jo.isText(t)?0<n&&n<t.nodeValue.length&&(t=(r=zm(t,n)).previousSibling,n<o?(t=r=zm(r,o-=n).previousSibling,o=r.nodeValue.length,n=0):o=0):(jo.isText(t)&&0<n&&n<t.nodeValue.length&&(t=zm(t,n),n=0),jo.isText(r)&&0<o&&o<r.nodeValue.length&&(o=(r=zm(r,o).previousSibling).nodeValue.length)),{startContainer:t,startOffset:n,endContainer:r,endOffset:o}},jm=xa,Vm="_mce_caret",Hm=function(e){return 0<function(e){for(var t=[];e;){if(3===e.nodeType&&e.nodeValue!==jm||1<e.childNodes.length)return[];1===e.nodeType&&t.push(e),e=e.firstChild}return t}(e).length},qm=function(e){var t;if(e)for(e=(t=new go(e,e)).current();e;e=t.next())if(3===e.nodeType)return e;return null},$m=function(e){var t=ar.fromTag("span");return Nr(t,{id:Vm,"data-mce-bogus":"1","data-mce-type":"format-caret"}),e&&Fi(t,ar.fromText(jm)),t},Wm=function(e,t,n){void 0===n&&(n=!0);var r,o=e.dom,i=e.selection;if(Hm(t))rd(e,!1,ar.fromDom(t),n);else{var a=i.getRng(),u=o.getParent(t,o.isBlock),s=((r=qm(t))&&r.nodeValue.charAt(0)===jm&&r.deleteData(0,1),r);a.startContainer===s&&0<a.startOffset&&a.setStart(s,a.startOffset-1),a.endContainer===s&&0<a.endOffset&&a.setEnd(s,a.endOffset-1),o.remove(t,!0),u&&o.isEmpty(u)&&nl(ar.fromDom(u)),i.setRng(a)}},Km=function(e,t,n){void 0===n&&(n=!0);var r=e.dom,o=e.selection;if(t)Wm(e,t,n);else if(!(t=Qu(e.getBody(),o.getStart())))for(;t=r.get(Vm);)Wm(e,t,!1)},Xm=function(e,t,n){var r=e.dom,o=r.getParent(n,d(wc.isTextBlock,e));o&&r.isEmpty(o)?n.parentNode.replaceChild(t,n):(tl(ar.fromDom(n)),r.isEmpty(n)?n.parentNode.replaceChild(t,n):r.insertAfter(t,n))},Ym=function(e,t){return e.appendChild(t),t},Gm=function(e,t){var n,r,o=(n=function(e,t){return Ym(e,t.cloneNode(!1))},r=t,function(e,t){for(var n=e.length-1;0<=n;n--)t(e[n],n)}(e,function(e){r=n(r,e)}),r);return Ym(o,o.ownerDocument.createTextNode(jm))},Jm=function(i){i.on("mouseup keydown",function(e){var t,n,r,o;t=i,n=e.keyCode,r=t.selection,o=t.getBody(),Km(t,null,!1),8!==n&&46!==n||!r.isCollapsed()||r.getStart().innerHTML!==jm||Km(t,Qu(o,r.getStart())),37!==n&&39!==n||Km(t,Qu(o,r.getStart()))})},Qm=function(e,t){return e.schema.getTextInlineElements().hasOwnProperty(lr(t))&&!Ju(t.dom())&&!jo.isBogus(t.dom())},Zm=function(e){return 1===Kr(e).length},eg=function(e,t,n,r){var o,i,a,u,s=d(Qm,t),c=W(U(r,s),function(e){return e.dom()});if(0===c.length)rd(t,e,n);else{var l=(o=n.dom(),i=c,a=$m(!1),u=Gm(i,a.dom()),Pi(ar.fromDom(o),a),Ui(ar.fromDom(o)),_u(u,0));t.selection.setRng(l.toRange())}},tg=function(r,o){var t,e=ar.fromDom(r.getBody()),n=ar.fromDom(r.selection.getStart()),i=U((t=uf(n,e),Y(t,Co).fold(q(t),function(e){return t.slice(0,e)})),Zm);return ee(i).map(function(e){var t,n=_u.fromRangeStart(r.selection.getRng());return!(!$l(o,n,e.dom())||Ju((t=e).dom())&&Hm(t.dom())||(eg(o,r,e,i),0))}).getOr(!1)},ng=function(e,t){return!!e.selection.isCollapsed()&&tg(e,t)},rg=function(e){for(var t=0,n=0,r=e;r&&r.nodeType;)t+=r.offsetLeft||0,n+=r.offsetTop||0,r=r.offsetParent;return{x:t,y:n}},og=function(e,t,n){var r,o,i,a,u,s=e.dom,c=s.getRoot(),l=0;if(u={elm:t,alignToTop:n},e.fire("scrollIntoView",u),!u.isDefaultPrevented()&&jo.isElement(t)){if(!1===n&&(l=t.offsetHeight),"BODY"!==c.nodeName){var f=e.selection.getScrollContainer();if(f)return r=rg(t).y-rg(f).y+l,a=f.clientHeight,void((r<(i=f.scrollTop)||i+a<r+25)&&(f.scrollTop=r<i?r:r-a+25))}o=s.getViewPort(e.getWin()),r=s.getPos(t).y+l,i=o.y,a=o.h,(r<o.y||i+a<r+25)&&e.getWin().scrollTo(0,r<i?r:r-a+25)}},ig=function(d,e){Z(Su.fromRangeStart(e).getClientRects()).each(function(e){var t,n,r,o,i,a,u,s,c,l=function(e){if(e.inline)return e.getBody().getBoundingClientRect();var t=e.getWin();return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight,width:t.innerWidth,height:t.innerHeight}}(d),f={x:(i=t=l,a=n=e,a.left>i.left&&a.right<i.right?0:a.left<i.left?a.left-i.left:a.right-i.right),y:(r=t,o=n,o.top>r.top&&o.bottom<r.bottom?0:o.top<r.top?o.top-r.top:o.bottom-r.bottom)};s=0!==f.x?0<f.x?f.x+4:f.x-4:0,c=0!==f.y?0<f.y?f.y+4:f.y-4:0,(u=d).inline?(u.getBody().scrollLeft+=s,u.getBody().scrollTop+=c):u.getWin().scrollBy(s,c)})},ag=jo.isContentEditableTrue,ug=jo.isContentEditableFalse,sg=function(e,t,n,r,o){return t._selectionOverrides.showCaret(e,n,r,o)},cg=function(e,t){var n,r;return e.fire("BeforeObjectSelected",{target:t}).isDefaultPrevented()?null:((r=(n=t).ownerDocument.createRange()).selectNode(n),r)},lg=function(e,t,n){var r=Os(1,e.getBody(),t),o=_u.fromRangeStart(r),i=o.getNode();if(ug(i))return sg(1,e,i,!o.isAtEnd(),!1);var a=o.getNode(!0);if(ug(a))return sg(1,e,a,!1,!1);var u=e.dom.getParent(o.getNode(),function(e){return ug(e)||ag(e)});return ug(u)?sg(1,e,u,!1,n):null},fg=function(e,t,n){if(!t||!t.collapsed)return t;var r=lg(e,t,n);return r||t},dg=function(e,t){e.selection.setRng(t),ig(e,e.selection.getRng())},mg=function(e,t,n,r,o,i){var a,u,s=sg(r,e,i.getNode(!o),o,!0);if(t.collapsed){var c=t.cloneRange();o?c.setEnd(s.startContainer,s.startOffset):c.setStart(s.endContainer,s.endOffset),c.deleteContents()}else t.deleteContents();return e.selection.setRng(s),a=e.dom,u=n,jo.isText(u)&&0===u.data.length&&a.remove(u),!0},gg=function(e,t){return function(e,t){var n=e.selection.getRng();if(!jo.isText(n.commonAncestorContainer))return!1;var r=t?Tu.Forwards:Tu.Backwards,o=Js(e.getBody()),i=d(Ls,o.next),a=d(Ls,o.prev),u=t?i:a,s=t?Lf:Ff,c=Ps(r,e.getBody(),n),l=Vl.normalizePosition(t,u(c));if(!l)return!1;if(s(l))return mg(e,n,c.getNode(),r,t,l);var f=u(l);return!!(f&&s(f)&&Fs(l,f))&&mg(e,n,c.getNode(),r,t,f)}(e,t)},pg=function(e,t){e.getDoc().execCommand(t,!1,null)},hg=function(e){ad(e,!1)||gg(e,!1)||Qd(e,!1)||hf(e,!1)||Dm(e)||Cf(e,!1)||ng(e,!1)||(pg(e,"Delete"),ql(e))},vg=function(e){ad(e,!0)||gg(e,!0)||Qd(e,!0)||hf(e,!0)||Dm(e)||Cf(e,!0)||ng(e,!0)||pg(e,"ForwardDelete")},yg=function(o,t,e){var n=function(e){return t=o,n=e.dom(),r=_r(n,t),_.from(r).filter(function(e){return 0<e.length});var t,n,r};return na(ar.fromDom(e),function(e){return n(e).isSome()},function(e){return Mr(ar.fromDom(t),e)}).bind(n)},bg=function(o){return function(r,e){return _.from(e).map(ar.fromDom).filter(dr).bind(function(e){return yg(o,r,e.dom()).or((t=o,n=e.dom(),_.from(Si.DOM.getStyle(n,t,!0))));var t,n}).getOr("")}},Cg={getFontSize:bg("font-size"),getFontFamily:H(function(e){return e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")},bg("font-family")),toPt:function(e,t){return/[0-9.]+px$/.test(e)?(n=72*parseInt(e,10)/96,r=t||0,o=Math.pow(10,r),Math.round(n*o)/o+"pt"):e;var n,r,o}},xg=function(e){return sc.firstPositionIn(e.getBody()).map(function(e){var t=e.container();return jo.isText(t)?t.parentNode:t})},wg=function(o){return _.from(o.selection.getRng()).bind(function(e){var t,n,r=o.getBody();return n=r,(t=e).startContainer===n&&0===t.startOffset?_.none():_.from(o.selection.getStart(!0))})},Ng=function(e,t){if(/^[0-9\.]+$/.test(t)){var n=parseInt(t,10);if(1<=n&&n<=7){var r=Al(e),o=Rl(e);return o?o[n-1]||t:r[n-1]||t}return t}return t},Eg=function(e,t){return e&&t&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset},Sg=function(e,t,n){return null!==function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(e,t,n)},Tg=function(e,t,n){return Sg(e,t,function(e){return e.nodeName===n})},kg=function(e){return e&&"TABLE"===e.nodeName},_g=function(e,t,n){for(var r=new go(t,e.getParent(t.parentNode,e.isBlock)||e.getRoot());t=r[n?"prev":"next"]();)if(jo.isBr(t))return!0},Ag=function(e,t,n,r,o){var i,a,u,s,c,l,f=e.getRoot(),d=e.schema.getNonEmptyElements();if(u=e.getParent(o.parentNode,e.isBlock)||f,r&&jo.isBr(o)&&t&&e.isEmpty(u))return _.some(Su(o.parentNode,e.nodeIndex(o)));for(i=new go(o,u);s=i[r?"prev":"next"]();){if("false"===e.getContentEditableParent(s)||(l=f,ka(c=s)&&!1===Sg(c,l,Ju)))return _.none();if(jo.isText(s)&&0<s.nodeValue.length)return!1===Tg(s,f,"A")?_.some(Su(s,r?s.nodeValue.length:0)):_.none();if(e.isBlock(s)||d[s.nodeName.toLowerCase()])return _.none();a=s}return n&&a?_.some(Su(a,0)):_.none()},Rg=function(e,t,n,r){var o,i,a,u,s,c,l,f,d,m,g=e.getRoot(),p=!1;if(o=r[(n?"start":"end")+"Container"],i=r[(n?"start":"end")+"Offset"],l=jo.isElement(o)&&i===o.childNodes.length,s=e.schema.getNonEmptyElements(),c=n,ka(o))return _.none();if(jo.isElement(o)&&i>o.childNodes.length-1&&(c=!1),jo.isDocument(o)&&(o=g,i=0),o===g){if(c&&(u=o.childNodes[0<i?i-1:0])){if(ka(u))return _.none();if(s[u.nodeName]||kg(u))return _.none()}if(o.hasChildNodes()){if(i=Math.min(!c&&0<i?i-1:i,o.childNodes.length-1),o=o.childNodes[i],i=jo.isText(o)&&l?o.data.length:0,!t&&o===g.lastChild&&kg(o))return _.none();if(function(e,t){for(;t&&t!==e;){if(jo.isContentEditableFalse(t))return!0;t=t.parentNode}return!1}(g,o)||ka(o))return _.none();if(o.hasChildNodes()&&!1===kg(o)){a=new go(u=o,g);do{if(jo.isContentEditableFalse(u)||ka(u)){p=!1;break}if(jo.isText(u)&&0<u.nodeValue.length){i=c?0:u.nodeValue.length,o=u,p=!0;break}if(s[u.nodeName.toLowerCase()]&&(!(f=u)||!/^(TD|TH|CAPTION)$/.test(f.nodeName))){i=e.nodeIndex(u),o=u.parentNode,c||i++,p=!0;break}}while(u=c?a.next():a.prev())}}}return t&&(jo.isText(o)&&0===i&&Ag(e,l,t,!0,o).each(function(e){o=e.container(),i=e.offset(),p=!0}),jo.isElement(o)&&((u=o.childNodes[i])||(u=o.childNodes[i-1]),!u||!jo.isBr(u)||(m="A",(d=u).previousSibling&&d.previousSibling.nodeName===m)||_g(e,u,!1)||_g(e,u,!0)||Ag(e,l,t,!0,u).each(function(e){o=e.container(),i=e.offset(),p=!0}))),c&&!t&&jo.isText(o)&&i===o.nodeValue.length&&Ag(e,l,t,!1,o).each(function(e){o=e.container(),i=e.offset(),p=!0}),p?_.some(Su(o,i)):_.none()},Dg=function(e,t){var n=t.collapsed,r=t.cloneRange(),o=Su.fromRangeStart(t);return Rg(e,n,!0,r).each(function(e){n&&Su.isAbove(o,e)||r.setStart(e.container(),e.offset())}),n||Rg(e,n,!1,r).each(function(e){r.setEnd(e.container(),e.offset())}),n&&r.collapse(!0),Eg(t,r)?_.none():_.some(r)},Og=function(e,t,n){var r=e.create("span",{},"&nbsp;");n.parentNode.insertBefore(r,n),t.scrollIntoView(r),e.remove(r)},Bg=function(e,t,n,r){var o=e.createRng();r?(o.setStartBefore(n),o.setEndBefore(n)):(o.setStartAfter(n),o.setEndAfter(n)),t.setRng(o)},Pg=function(e,t){var n,r,o=e.selection,i=e.dom,a=o.getRng();Dg(i,a).each(function(e){a.setStart(e.startContainer,e.startOffset),a.setEnd(e.endContainer,e.endOffset)});var u=a.startOffset,s=a.startContainer;if(1===s.nodeType&&s.hasChildNodes()){var c=u>s.childNodes.length-1;s=s.childNodes[Math.min(u,s.childNodes.length-1)]||s,u=c&&3===s.nodeType?s.nodeValue.length:0}var l=i.getParent(s,i.isBlock),f=l?i.getParent(l.parentNode,i.isBlock):null,d=f?f.nodeName.toUpperCase():"",m=t&&t.ctrlKey;"LI"!==d||m||(l=f),s&&3===s.nodeType&&u>=s.nodeValue.length&&(function(e,t,n){for(var r,o=new go(t,n),i=e.getNonEmptyElements();r=o.next();)if(i[r.nodeName.toLowerCase()]||0<r.length)return!0}(e.schema,s,l)||(n=i.create("br"),a.insertNode(n),a.setStartAfter(n),a.setEndAfter(n),r=!0)),n=i.create("br"),zu(i,a,n),Og(i,o,n),Bg(i,o,n,r),e.undoManager.add()},Ig=function(e,t){var n=ar.fromTag("br");Pi(ar.fromDom(t),n),e.undoManager.add()},Lg=function(e,t){Fg(e.getBody(),t)||Ii(ar.fromDom(t),ar.fromTag("br"));var n=ar.fromTag("br");Ii(ar.fromDom(t),n),Og(e.dom,e.selection,n.dom()),Bg(e.dom,e.selection,n.dom(),!1),e.undoManager.add()},Fg=function(e,t){return n=_u.after(t),!!jo.isBr(n.getNode())||sc.nextPosition(e,_u.after(t)).map(function(e){return jo.isBr(e.getNode())}).getOr(!1);var n},Mg=function(e){return e&&"A"===e.nodeName&&"href"in e},zg=function(e){return e.fold(q(!1),Mg,Mg,q(!1))},Ug=function(e,t){t.fold(o,d(Ig,e),d(Lg,e),o)},jg=function(e,t){var n,r,o,i=(n=e,r=d(Vl.isInlineTarget,n),o=_u.fromRangeStart(n.selection.getRng()),Ld(r,n.getBody(),o).filter(zg));i.isSome()?i.each(d(Ug,e)):Pg(e,t)},Vg={create:Ar("start","soffset","finish","foffset")},Hg=xf([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),qg=(Hg.before,Hg.on,Hg.after,function(e){return e.fold($,$,$)}),$g=xf([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Wg={domRange:$g.domRange,relative:$g.relative,exact:$g.exact,exactFromRange:function(e){return $g.exact(e.start(),e.soffset(),e.finish(),e.foffset())},getWin:function(e){var t=e.match({domRange:function(e){return ar.fromDom(e.startContainer)},relative:function(e,t){return qg(e)},exact:function(e,t,n,r){return e}});return jr(t)},range:Vg.create},Kg=or.detect().browser,Xg=function(e,t){var n=mr(t)?Mc(t).length:Kr(t).length+1;return n<e?n:e<0?0:e},Yg=function(e){return Wg.range(e.start(),Xg(e.soffset(),e.start()),e.finish(),Xg(e.foffset(),e.finish()))},Gg=function(e,t){return!jo.isRestrictedNode(t.dom())&&(zr(e,t)||Mr(e,t))},Jg=function(t){return function(e){return Gg(t,e.start())&&Gg(t,e.finish())}},Qg=function(e){return!0===e.inline||Kg.isIE()},Zg=function(e){return Wg.range(ar.fromDom(e.startContainer),e.startOffset,ar.fromDom(e.endContainer),e.endOffset)},ep=function(e){var t=e.getSelection();return(t&&0!==t.rangeCount?_.from(t.getRangeAt(0)):_.none()).map(Zg)},tp=function(e){var t=jr(e);return ep(t.dom()).filter(Jg(e))},np=function(e,t){return _.from(t).filter(Jg(e)).map(Yg)},rp=function(e){var t=V.document.createRange();try{return t.setStart(e.start().dom(),e.soffset()),t.setEnd(e.finish().dom(),e.foffset()),_.some(t)}catch(n){return _.none()}},op=function(e){return(e.bookmark?e.bookmark:_.none()).bind(d(np,ar.fromDom(e.getBody()))).bind(rp)},ip=function(e){var t=Qg(e)?tp(ar.fromDom(e.getBody())):_.none();e.bookmark=t.isSome()?t:e.bookmark},ap=function(t){op(t).each(function(e){t.selection.setRng(e)})},up=op,sp=function(e){return Eo(e)||So(e)},cp=function(e){return U(W(e.selection.getSelectedBlocks(),ar.fromDom),function(e){return!sp(e)&&!Vr(e).map(sp).getOr(!1)})},lp=function(e,t){var n=e.settings,r=e.dom,o=e.selection,i=e.formatter,a=/[a-z%]+$/i.exec(n.indentation)[0],u=parseInt(n.indentation,10),s=e.getParam("indent_use_margin",!1);e.queryCommandState("InsertUnorderedList")||e.queryCommandState("InsertOrderedList")||n.forced_root_block||r.getParent(o.getNode(),r.isBlock)||i.apply("div"),z(cp(e),function(e){!function(e,t,n,r,o,i){if("false"!==e.getContentEditable(i)){var a=n?"margin":"padding";if(a="TABLE"===i.nodeName?"margin":a,a+="rtl"===e.getStyle(i,"direction",!0)?"Right":"Left","outdent"===t){var u=Math.max(0,parseInt(i.style[a]||0,10)-r);e.setStyle(i,a,u?u+o:"")}else u=parseInt(i.style[a]||0,10)+r+o,e.setStyle(i,a,u)}}(r,t,s,u,a,e.dom())})},fp=Xt.each,dp=Xt.extend,mp=Xt.map,gp=Xt.inArray;function pp(s){var o,i,a,t,c={state:{},exec:{},value:{}},n=s.settings;s.on("PreInit",function(){o=s.dom,i=s.selection,n=s.settings,a=s.formatter});var r=function(e){var t;if(!s.quirks.isHidden()&&!s.removed){if(e=e.toLowerCase(),t=c.state[e])return t(e);try{return s.getDoc().queryCommandState(e)}catch(n){}return!1}},e=function(e,n){n=n||"exec",fp(e,function(t,e){fp(e.toLowerCase().split(","),function(e){c[n][e]=t})})},u=function(e,t,n){e=e.toLowerCase(),c.value[e]=function(){return t.call(n||s)}};dp(this,{execCommand:function(t,n,r,e){var o,i,a=!1;if(!s.removed){if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(t)||e&&e.skip_focus?ap(s):s.focus(),(e=s.fire("BeforeExecCommand",{command:t,ui:n,value:r})).isDefaultPrevented())return!1;if(i=t.toLowerCase(),o=c.exec[i])return o(i,n,r),s.fire("ExecCommand",{command:t,ui:n,value:r}),!0;if(fp(s.plugins,function(e){if(e.execCommand&&e.execCommand(t,n,r))return s.fire("ExecCommand",{command:t,ui:n,value:r}),!(a=!0)}),a)return a;if(s.theme&&s.theme.execCommand&&s.theme.execCommand(t,n,r))return s.fire("ExecCommand",{command:t,ui:n,value:r}),!0;try{a=s.getDoc().execCommand(t,n,r)}catch(u){}return!!a&&(s.fire("ExecCommand",{command:t,ui:n,value:r}),!0)}},queryCommandState:r,queryCommandValue:function(e){var t;if(!s.quirks.isHidden()&&!s.removed){if(e=e.toLowerCase(),t=c.value[e])return t(e);try{return s.getDoc().queryCommandValue(e)}catch(n){}}},queryCommandSupported:function(e){if(e=e.toLowerCase(),c.exec[e])return!0;try{return s.getDoc().queryCommandSupported(e)}catch(t){}return!1},addCommands:e,addCommand:function(e,o,i){e=e.toLowerCase(),c.exec[e]=function(e,t,n,r){return o.call(i||s,t,n,r)}},addQueryStateHandler:function(e,t,n){e=e.toLowerCase(),c.state[e]=function(){return t.call(n||s)}},addQueryValueHandler:u,hasCustomCommand:function(e){return e=e.toLowerCase(),!!c.exec[e]}});var l=function(e,t,n){return t===undefined&&(t=!1),n===undefined&&(n=null),s.getDoc().execCommand(e,t,n)},f=function(e){return a.match(e)},d=function(e,t){a.toggle(e,t?{value:t}:undefined),s.nodeChanged()},m=function(e){t=i.getBookmark(e)},g=function(){i.moveToBookmark(t)};e({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){s.undoManager.add()},"Cut,Copy,Paste":function(e){var t,n=s.getDoc();try{l(e)}catch(o){t=!0}if("paste"!==e||n.queryCommandEnabled(e)||(t=!0),t||!n.queryCommandSupported(e)){var r=s.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");fe.mac&&(r=r.replace(/Ctrl\+/g,"\u2318+")),s.notificationManager.open({text:r,type:"error"})}},unlink:function(){if(i.isCollapsed()){var e=s.dom.getParent(s.selection.getStart(),"a");e&&s.dom.remove(e,!0)}else a.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(e){var t=e.substring(7);"full"===t&&(t="justify"),fp("left,center,right,justify".split(","),function(e){t!==e&&a.remove("align"+e)}),"none"!==t&&d("align"+t)},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;l(e),(t=o.getParent(i.getNode(),"ol,ul"))&&(n=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)&&(m(),o.split(n,t),g()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){d(e)},"ForeColor,HiliteColor":function(e,t,n){d(e,n)},FontName:function(e,t,n){var r,o;o=n,(r=s).formatter.toggle("fontname",{value:Ng(r,o)}),r.nodeChanged()},FontSize:function(e,t,n){var r,o;o=n,(r=s).formatter.toggle("fontsize",{value:Ng(r,o)}),r.nodeChanged()},RemoveFormat:function(e){a.remove(e)},mceBlockQuote:function(){d("blockquote")},FormatBlock:function(e,t,n){return d(n||"p")},mceCleanup:function(){var e=i.getBookmark();s.setContent(s.getContent()),i.moveToBookmark(e)},mceRemoveNode:function(e,t,n){var r=n||i.getNode();r!==s.getBody()&&(m(),s.dom.remove(r,!0),g())},mceSelectNodeDepth:function(e,t,n){var r=0;o.getParent(i.getNode(),function(e){if(1===e.nodeType&&r++===n)return i.select(e),!1},s.getBody())},mceSelectNode:function(e,t,n){i.select(n)},mceInsertContent:function(e,t,n){ml(s,n)},mceInsertRawHTML:function(e,t,n){i.setContent("tiny_mce_marker");var r=s.getContent();s.setContent(r.replace(/tiny_mce_marker/g,function(){return n}))},mceToggleFormat:function(e,t,n){d(n)},mceSetContent:function(e,t,n){s.setContent(n)},"Indent,Outdent":function(e){lp(s,e)},mceRepaint:function(){},InsertHorizontalRule:function(){s.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){s.hasVisual=!s.hasVisual,s.addVisual()},mceReplaceContent:function(e,t,n){s.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,i.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=o.getParent(i.getNode(),"a"),n.href=n.href.replace(" ","%20"),r&&n.href||a.remove("link"),n.href&&a.apply("link",n,r)},selectAll:function(){var e=o.getParent(i.getStart(),jo.isContentEditableTrue);if(e){var t=o.createRng();t.selectNodeContents(e),i.setRng(t)}},"delete":function(){hg(s)},forwardDelete:function(){vg(s)},mceNewDocument:function(){s.setContent("")},InsertLineBreak:function(e,t,n){return jg(s,n),!0}});var p=function(n){return function(){var e=i.isCollapsed()?[o.getParent(i.getNode(),o.isBlock)]:i.getSelectedBlocks(),t=mp(e,function(e){return!!a.matchNode(e,n)});return-1!==gp(t,!0)}};e({JustifyLeft:p("alignleft"),JustifyCenter:p("aligncenter"),JustifyRight:p("alignright"),JustifyFull:p("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return f(e)},mceBlockQuote:function(){return f("blockquote")},Outdent:function(){var e;if(n.inline_styles){if((e=o.getParent(i.getStart(),o.isBlock))&&0<parseInt(e.style.paddingLeft,10))return!0;if((e=o.getParent(i.getEnd(),o.isBlock))&&0<parseInt(e.style.paddingLeft,10))return!0}return r("InsertUnorderedList")||r("InsertOrderedList")||!n.inline_styles&&!!o.getParent(i.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var t=o.getParent(i.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),e({Undo:function(){s.undoManager.undo()},Redo:function(){s.undoManager.redo()}}),u("FontName",function(){return wg(t=s).fold(function(){return xg(t).map(function(e){return Cg.getFontFamily(t.getBody(),e)}).getOr("")},function(e){return Cg.getFontFamily(t.getBody(),e)});var t},this),u("FontSize",function(){return wg(t=s).fold(function(){return xg(t).map(function(e){return Cg.getFontSize(t.getBody(),e)}).getOr("")},function(e){return Cg.getFontSize(t.getBody(),e)});var t},this)}var hp=Xt.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend"," "),vp=function(a){var u,s,c=this,l={},f=function(){return!1},d=function(){return!0};u=(a=a||{}).scope||c,s=a.toggleEvent||f;var r=function(e,t,n,r){var o,i,a;if(!1===t&&(t=f),t)for(t={func:t},r&&Xt.extend(t,r),a=(i=e.toLowerCase().split(" ")).length;a--;)e=i[a],(o=l[e])||(o=l[e]=[],s(e,!0)),n?o.unshift(t):o.push(t);return c},m=function(e,t){var n,r,o,i,a;if(e)for(n=(i=e.toLowerCase().split(" ")).length;n--;){if(e=i[n],r=l[e],!e){for(o in l)s(o,!1),delete l[o];return c}if(r){if(t)for(a=r.length;a--;)r[a].func===t&&(r=r.slice(0,a).concat(r.slice(a+1)),l[e]=r);else r.length=0;r.length||(s(e,!1),delete l[e])}}else{for(e in l)s(e,!1);l={}}return c};c.fire=function(e,t){var n,r,o,i;if(e=e.toLowerCase(),(t=t||{}).type=e,t.target||(t.target=u),t.preventDefault||(t.preventDefault=function(){t.isDefaultPrevented=d},t.stopPropagation=function(){t.isPropagationStopped=d},t.stopImmediatePropagation=function(){t.isImmediatePropagationStopped=d},t.isDefaultPrevented=f,t.isPropagationStopped=f,t.isImmediatePropagationStopped=f),a.beforeFire&&a.beforeFire(t),n=l[e])for(r=0,o=n.length;r<o;r++){if((i=n[r]).once&&m(e,i.func),t.isImmediatePropagationStopped())return t.stopPropagation(),t;if(!1===i.func.call(u,t))return t.preventDefault(),t}return t},c.on=r,c.off=m,c.once=function(e,t,n){return r(e,t,n,{once:!0})},c.has=function(e){return e=e.toLowerCase(),!(!l[e]||0===l[e].length)}};vp.isNative=function(e){return!!hp[e.toLowerCase()]};var yp,bp=function(n){return n._eventDispatcher||(n._eventDispatcher=new vp({scope:n,toggleEvent:function(e,t){vp.isNative(e)&&n.toggleNativeEvent&&n.toggleNativeEvent(e,t)}})),n._eventDispatcher},Cp={fire:function(e,t,n){if(this.removed&&"remove"!==e&&"detach"!==e)return t;if(t=bp(this).fire(e,t,n),!1!==n&&this.parent)for(var r=this.parent();r&&!t.isPropagationStopped();)r.fire(e,t,!1),r=r.parent();return t},on:function(e,t,n){return bp(this).on(e,t,n)},off:function(e,t){return bp(this).off(e,t)},once:function(e,t){return bp(this).once(e,t)},hasEventListeners:function(e){return bp(this).has(e)}},xp=function(e,t){return e.fire("PreProcess",t)},wp=function(e,t){return e.fire("PostProcess",t)},Np=function(e){return e.fire("remove")},Ep=function(e){return e.fire("detach")},Sp=function(e,t){return e.fire("SwitchMode",{mode:t})},Tp=function(e,t,n,r){e.fire("ObjectResizeStart",{target:t,width:n,height:r})},kp=function(e,t,n,r){e.fire("ObjectResized",{target:t,width:n,height:r})},_p=function(e,t,n){try{e.getDoc().execCommand(t,!1,n)}catch(r){}},Ap=function(e,t,n){var r,o;Gi(e,t)&&!1===n?(o=t,$i(r=e)?r.dom().classList.remove(o):Ki(r,o),Yi(r)):n&&Xi(e,t)},Rp=function(e,t){Ap(ar.fromDom(e.getBody()),"mce-content-readonly",t),t?(e.selection.controlSelection.hideResizeRect(),e.readonly=!0,e.getBody().contentEditable="false"):(e.readonly=!1,e.getBody().contentEditable="true",_p(e,"StyleWithCSS",!1),_p(e,"enableInlineTableEditing",!1),_p(e,"enableObjectResizing",!1),e.focus(),e.nodeChanged())},Dp=function(e){return e.readonly?"readonly":"design"},Op=Si.DOM,Bp=function(e,t){return"selectionchange"===t?e.getDoc():!e.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(t)?e.getDoc().documentElement:e.settings.event_root?(e.eventRoot||(e.eventRoot=Op.select(e.settings.event_root)[0]),e.eventRoot):e.getBody()},Pp=function(e,t,n){var r;(r=e).hidden||r.readonly?!0===e.readonly&&n.preventDefault():e.fire(t,n)},Ip=function(i,a){var e,t;if(i.delegates||(i.delegates={}),!i.delegates[a]&&!i.removed)if(e=Bp(i,a),i.settings.event_root){if(yp||(yp={},i.editorManager.on("removeEditor",function(){var e;if(!i.editorManager.activeEditor&&yp){for(e in yp)i.dom.unbind(Bp(i,e));yp=null}})),yp[a])return;t=function(e){for(var t=e.target,n=i.editorManager.get(),r=n.length;r--;){var o=n[r].getBody();(o===t||Op.isChildOf(t,o))&&Pp(n[r],a,e)}},yp[a]=t,Op.bind(e,a,t)}else t=function(e){Pp(i,a,e)},Op.bind(e,a,t),i.delegates[a]=t},Lp={bindPendingEventDelegates:function(){var t=this;Xt.each(t._pendingNativeEvents,function(e){Ip(t,e)})},toggleNativeEvent:function(e,t){var n=this;"focus"!==e&&"blur"!==e&&(t?n.initialized?Ip(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&(n.dom.unbind(Bp(n,e),e,n.delegates[e]),delete n.delegates[e]))},unbindAllNativeEvents:function(){var e,t=this,n=t.getBody(),r=t.dom;if(t.delegates){for(e in t.delegates)t.dom.unbind(Bp(t,e),e,t.delegates[e]);delete t.delegates}!t.inline&&n&&r&&(n.onload=null,r.unbind(t.getWin()),r.unbind(t.getDoc())),r&&(r.unbind(n),r.unbind(t.getContainer()))}},Fp=Lp=Xt.extend({},Cp,Lp),Mp=Ar("sections","settings"),zp=or.detect().deviceType.isTouch(),Up=["lists","autolink","autosave"],jp={theme:"mobile"},Vp=function(e){var t=k(e)?e.join(" "):e,n=W(S(t)?t.split(" "):[],Gn);return U(n,function(e){return 0<e.length})},Hp=function(e,t){return e.sections().hasOwnProperty(t)},qp=function(e,t,n,r){var o,i=Vp(n.forced_plugins),a=Vp(r.plugins),u=e&&Hp(t,"mobile")?U(a,d(F,Up)):a,s=(o=u,[].concat(Vp(i)).concat(Vp(o)));return Xt.extend(r,{plugins:s.join(" ")})},$p=function(e,t,n,r){var o,i,a,u,s,c,l,f,d,m,g,p,h=(o=["mobile"],i=yr(r,function(e,t){return F(o,t)}),Mp(i.t,i.f)),v=Xt.extend(t,n,h.settings(),(m=e,p=(g=h).settings().inline,m&&Hp(g,"mobile")&&!p?(c="mobile",l=jp,f=h.sections(),d=f.hasOwnProperty(c)?f[c]:{},Xt.extend({},l,d)):{}),{validate:!0,content_editable:h.settings().inline,external_plugins:(a=n,u=h.settings(),s=u.external_plugins?u.external_plugins:{},a&&a.external_plugins?Xt.extend({},a.external_plugins,s):s)});return qp(e,h,n,v)},Wp=function(e,t,n){return _.from(t.settings[n]).filter(e)},Kp=function(e,t,n,r){var o,i,a,u=t in e.settings?e.settings[t]:n;return"hash"===r?(a={},"string"==typeof(i=u)?z(0<i.indexOf("=")?i.split(/[;,](?![^=;,]*(?:[;,]|$))/):i.split(","),function(e){var t=e.split("=");1<t.length?a[Xt.trim(t[0])]=Xt.trim(t[1]):a[Xt.trim(t[0])]=Xt.trim(t)}):a=i,a):"string"===r?Wp(S,e,t).getOr(n):"number"===r?Wp(O,e,t).getOr(n):"boolean"===r?Wp(R,e,t).getOr(n):"object"===r?Wp(T,e,t).getOr(n):"array"===r?Wp(k,e,t).getOr(n):"string[]"===r?Wp((o=S,function(e){return k(e)&&J(e,o)}),e,t).getOr(n):"function"===r?Wp(D,e,t).getOr(n):u},Xp=Xt.each,Yp=Xt.explode,Gp={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},Jp=Xt.makeMap("alt,ctrl,shift,meta,access");function Qp(i){var a={},r=[],u=function(e){var t,n,r={};for(n in Xp(Yp(e,"+"),function(e){e in Jp?r[e]=!0:/^[0-9]{2,}$/.test(e)?r.keyCode=parseInt(e,10):(r.charCode=e.charCodeAt(0),r.keyCode=Gp[e]||e.toUpperCase().charCodeAt(0))}),t=[r.keyCode],Jp)r[n]?t.push(n):r[n]=!1;return r.id=t.join(","),r.access&&(r.alt=!0,fe.mac?r.ctrl=!0:r.shift=!0),r.meta&&(fe.mac?r.meta=!0:(r.ctrl=!0,r.meta=!1)),r},s=function(e,t,n,r){var o;return(o=Xt.map(Yp(e,">"),u))[o.length-1]=Xt.extend(o[o.length-1],{func:n,scope:r||i}),Xt.extend(o[0],{desc:i.translate(t),subpatterns:o.slice(1)})},o=function(e,t){return!!t&&t.ctrl===e.ctrlKey&&t.meta===e.metaKey&&t.alt===e.altKey&&t.shift===e.shiftKey&&!!(e.keyCode===t.keyCode||e.charCode&&e.charCode===t.charCode)&&(e.preventDefault(),!0)},c=function(e){return e.func?e.func.call(e.scope):null};i.on("keyup keypress keydown",function(t){var e,n;((n=t).altKey||n.ctrlKey||n.metaKey||"keydown"===(e=t).type&&112<=e.keyCode&&e.keyCode<=123)&&!t.isDefaultPrevented()&&(Xp(a,function(e){if(o(t,e))return r=e.subpatterns.slice(0),"keydown"===t.type&&c(e),!0}),o(t,r[0])&&(1===r.length&&"keydown"===t.type&&c(r[0]),r.shift()))}),this.add=function(e,n,r,o){var t;return"string"==typeof(t=r)?r=function(){i.execCommand(t,!1,null)}:Xt.isArray(t)&&(r=function(){i.execCommand(t[0],t[1],t[2])}),Xp(Yp(Xt.trim(e.toLowerCase())),function(e){var t=s(e,n,r,o);a[t.id]=t}),!0},this.remove=function(e){var t=s(e);return!!a[t.id]&&(delete a[t.id],!0)}}var Zp=function(e){var t=Ur(e).dom();return e.dom()===t.activeElement},eh=function(t){return(e=Ur(t),n=e!==undefined?e.dom():V.document,_.from(n.activeElement).map(ar.fromDom)).filter(function(e){return t.dom().contains(e.dom())});var e,n},th=function(t,e){return(n=e,n.collapsed?_.from(eu(n.startContainer,n.startOffset)).map(ar.fromDom):_.none()).bind(function(e){return ko(e)?_.some(e):!1===zr(t,e)?_.some(t):_.none()});var n},nh=function(t,e){th(ar.fromDom(t.getBody()),e).bind(function(e){return sc.firstPositionIn(e.dom())}).fold(function(){t.selection.normalize()},function(e){return t.selection.setRng(e.toRange())})},rh=function(e){if(e.setActive)try{e.setActive()}catch(t){e.focus()}else e.focus()},oh=function(e){var t,n=e.getBody();return n&&(t=ar.fromDom(n),Zp(t)||eh(t).isSome())},ih=function(e){return e.inline?oh(e):(t=e).iframeElement&&Zp(ar.fromDom(t.iframeElement));var t},ah=function(e){return e.editorManager.setActive(e)},uh=function(e,t){e.removed||(t?ah(e):function(t){var e=t.selection,n=t.settings.content_editable,r=t.getBody(),o=e.getRng();t.quirks.refreshContentEditable();var i,a,u=(i=t,a=e.getNode(),i.dom.getParent(a,function(e){return"true"===i.dom.getContentEditable(e)}));if(t.$.contains(r,u))return rh(u),nh(t,o),ah(t);t.bookmark!==undefined&&!1===ih(t)&&up(t).each(function(e){t.selection.setRng(e),o=e}),n||(fe.opera||rh(r),t.getWin().focus()),(fe.gecko||n)&&(rh(r),nh(t,o)),ah(t)}(e))},sh=ih,ch=function(e,t){return t.dom()[e]},lh=function(e,t){return parseInt(kr(t,e),10)},fh=d(ch,"clientWidth"),dh=d(ch,"clientHeight"),mh=d(lh,"margin-top"),gh=d(lh,"margin-left"),ph=function(e,t,n){var r,o,i,a,u,s,c,l,f,d,m,g=ar.fromDom(e.getBody()),p=e.inline?g:(r=g,ar.fromDom(r.dom().ownerDocument.documentElement)),h=(o=e.inline,a=t,u=n,s=(i=p).dom().getBoundingClientRect(),{x:a-(o?s.left+i.dom().clientLeft+gh(i):0),y:u-(o?s.top+i.dom().clientTop+mh(i):0)});return l=h.x,f=h.y,d=fh(c=p),m=dh(c),0<=l&&0<=f&&l<=d&&f<=m},hh=function(e){var t,n=e.inline?e.getBody():e.getContentAreaContainer();return(t=n,_.from(t).map(ar.fromDom)).map(function(e){return zr(Ur(e),e)}).getOr(!1)};function vh(n){var t,o=[],i=function(){var e,t=n.theme;return t&&t.getNotificationManagerImpl?t.getNotificationManagerImpl():{open:e=function(){throw new Error("Theme did not provide a NotificationManager implementation.")},close:e,reposition:e,getArgs:e}},a=function(){0<o.length&&i().reposition(o)},u=function(t){Y(o,function(e){return e===t}).each(function(e){o.splice(e,1)})},r=function(r){if(!n.removed&&hh(n))return X(o,function(e){return t=i().getArgs(e),n=r,!(t.type!==n.type||t.text!==n.text||t.progressBar||t.timeout||n.progressBar||n.timeout);var t,n}).getOrThunk(function(){n.editorManager.setActive(n);var e,t=i().open(r,function(){u(t),a()});return e=t,o.push(e),a(),t})};return(t=n).on("SkinLoaded",function(){var e=t.settings.service_message;e&&r({text:e,type:"warning",timeout:0,icon:""})}),t.on("ResizeEditor ResizeWindow",function(){he.requestAnimationFrame(a)}),t.on("remove",function(){z(o.slice(),function(e){i().close(e)})}),{open:r,close:function(){_.from(o[0]).each(function(e){i().close(e),u(e),a()})},getNotifications:function(){return o}}}function yh(r){var o=[],i=function(){var e,t=r.theme;return t&&t.getWindowManagerImpl?t.getWindowManagerImpl():{open:e=function(){throw new Error("Theme did not provide a WindowManager implementation.")},alert:e,confirm:e,close:e,getParams:e,setParams:e}},a=function(e,t){return function(){return t?t.apply(e,arguments):undefined}},u=function(e){var t;o.push(e),t=e,r.fire("OpenWindow",{win:t})},s=function(n){Y(o,function(e){return e===n}).each(function(e){var t;o.splice(e,1),t=n,r.fire("CloseWindow",{win:t}),0===o.length&&r.focus()})},e=function(){return _.from(o[o.length-1])};return r.on("remove",function(){z(o.slice(0),function(e){i().close(e)})}),{windows:o,open:function(e,t){r.editorManager.setActive(r),ip(r);var n=i().open(e,t,s);return u(n),n},alert:function(e,t,n){var r=i().alert(e,a(n||this,t),s);u(r)},confirm:function(e,t,n){var r=i().confirm(e,a(n||this,t),s);u(r)},close:function(){e().each(function(e){i().close(e),s(e)})},getParams:function(){return e().map(i().getParams).getOr(null)},setParams:function(t){e().each(function(e){i().setParams(e,t)})},getWindows:function(){return o}}}var bh={},Ch="en",xh={setCode:function(e){e&&(Ch=e,this.rtl=!!this.data[e]&&"rtl"===this.data[e]._dir)},getCode:function(){return Ch},rtl:!1,add:function(e,t){var n=bh[e];for(var r in n||(bh[e]=n={}),t)n[r]=t[r];this.setCode(e)},translate:function(e){var t=bh[Ch]||{},n=function(e){return Xt.is(e,"function")?Object.prototype.toString.call(e):r(e)?"":""+e},r=function(e){return""===e||null===e||Xt.is(e,"undefined")},o=function(e){return e=n(e),Xt.hasOwn(t,e)?n(t[e]):e};if(r(e))return"";if(Xt.is(e,"object")&&Xt.hasOwn(e,"raw"))return n(e.raw);if(Xt.is(e,"array")){var i=e.slice(1);e=o(e[0]).replace(/\{([0-9]+)\}/g,function(e,t){return Xt.hasOwn(i,t)?n(i[t]):e})}return o(e).replace(/{context:\w+}$/,"")},data:bh},wh=Bi.PluginManager,Nh=function(e,t){var n=function(e,t){for(var n in wh.urls)if(wh.urls[n]+"/plugin"+t+".js"===e)return n;return null}(t,e.suffix);return n?xh.translate(["Failed to load plugin: {0} from url {1}",n,t]):xh.translate(["Failed to load plugin url: {0}",t])},Eh=function(e,t){e.notificationManager.open({type:"error",text:t})},Sh=function(e,t){e._skinLoaded?Eh(e,t):e.on("SkinLoaded",function(){Eh(e,t)})},Th=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=V.window.console;r&&(r.error?r.error.apply(r,arguments):r.log.apply(r,arguments))},kh={pluginLoadError:function(e,t){Sh(e,Nh(e,t))},pluginInitError:function(e,t,n){var r=xh.translate(["Failed to initialize plugin: {0}",t]);Th(r,n),Sh(e,r)},uploadError:function(e,t){Sh(e,xh.translate(["Failed to upload image: {0}",t]))},displayError:Sh,initError:Th},_h=Bi.PluginManager,Ah=Bi.ThemeManager;function Rh(){return new(oe.getOrDie("XMLHttpRequest"))}function Dh(u,s){var r={},n=function(e,r,o,t){var i,n;(i=Rh()).open("POST",s.url),i.withCredentials=s.credentials,i.upload.onprogress=function(e){t(e.loaded/e.total*100)},i.onerror=function(){o("Image upload failed due to a XHR Transport error. Code: "+i.status)},i.onload=function(){var e,t,n;i.status<200||300<=i.status?o("HTTP Error: "+i.status):(e=JSON.parse(i.responseText))&&"string"==typeof e.location?r((t=s.basePath,n=e.location,t?t.replace(/\/$/,"")+"/"+n.replace(/^\//,""):n)):o("Invalid JSON: "+i.responseText)},(n=new V.FormData).append("file",e.blob(),e.filename()),i.send(n)},c=function(e,t){return{url:t,blobInfo:e,status:!0}},l=function(e,t){return{url:"",blobInfo:e,status:!1,error:t}},f=function(e,t){Xt.each(r[e],function(e){e(t)}),delete r[e]},o=function(e,n){return e=Xt.grep(e,function(e){return!u.isUploaded(e.blobUri())}),de.all(Xt.map(e,function(e){return u.isPending(e.blobUri())?(t=e.blobUri(),new de(function(e){r[t]=r[t]||[],r[t].push(e)})):(o=e,i=s.handler,a=n,u.markPending(o.blobUri()),new de(function(t){var n;try{var r=function(){n&&n.close()};i(o,function(e){r(),u.markUploaded(o.blobUri(),e),f(o.blobUri(),c(o,e)),t(c(o,e))},function(e){r(),u.removeFailed(o.blobUri()),f(o.blobUri(),l(o,e)),t(l(o,e))},function(e){e<0||100<e||(n||(n=a()),n.progressBar.value(e))})}catch(e){t(l(o,e.message))}}));var o,i,a,t}))};return!1===D(s.handler)&&(s.handler=n),{upload:function(e,t){return s.url||s.handler!==n?o(e,t):new de(function(e){e([])})}}}var Oh=function(e){return oe.getOrDie("atob")(e)},Bh=function(e){var t,n,r=decodeURIComponent(e).split(",");return(n=/data:([^;]+)/.exec(r[0]))&&(t=n[1]),{type:t,data:r[1]}},Ph=function(a){return new de(function(e){var t,n,r,o,i=Bh(a);try{t=Oh(i.data)}catch(iE){return void e(new V.Blob([]))}for(o=t.length,n=new(oe.getOrDie("Uint8Array"))(o),r=0;r<n.length;r++)n[r]=t.charCodeAt(r);e(new V.Blob([n],{type:i.type}))})},Ih=function(e){return 0===e.indexOf("blob:")?(i=e,new de(function(e,t){var n=function(){t("Cannot convert "+i+" to Blob. Resource might not exist or is inaccessible.")};try{var r=Rh();r.open("GET",i,!0),r.responseType="blob",r.onload=function(){200===this.status?e(this.response):n()},r.onerror=n,r.send()}catch(o){n()}})):0===e.indexOf("data:")?Ph(e):null;var i},Lh=function(n){return new de(function(e){var t=new(oe.getOrDie("FileReader"));t.onloadend=function(){e(t.result)},t.readAsDataURL(n)})},Fh=Bh,Mh=0,zh=function(e){return(e||"blobid")+Mh++},Uh=function(n,r,o,t){var i,a;0!==r.src.indexOf("blob:")?(i=Fh(r.src).data,(a=n.findFirst(function(e){return e.base64()===i}))?o({image:r,blobInfo:a}):Ih(r.src).then(function(e){a=n.create(zh(),e,i),n.add(a),o({image:r,blobInfo:a})},function(e){t(e)})):(a=n.getByUri(r.src))?o({image:r,blobInfo:a}):Ih(r.src).then(function(t){Lh(t).then(function(e){i=Fh(e).data,a=n.create(zh(),t,i),n.add(a),o({image:r,blobInfo:a})})},function(e){t(e)})},jh=function(e){return e?te(e.getElementsByTagName("img")):[]},Vh=0,Hh={uuid:function(e){return e+Vh+++(t=function(){return Math.round(4294967295*Math.random()).toString(36)},"s"+(new Date).getTime().toString(36)+t()+t()+t());var t}};function qh(u){var n,o,t,e,i,r,a,s,c,l=(n=[],o=function(e){var t,n,r;if(!e.blob||!e.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");return t=e.id||Hh.uuid("blobid"),n=e.name||t,{id:q(t),name:q(n),filename:q(n+"."+(r=e.blob.type,{"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"}[r.toLowerCase()]||"dat")),blob:q(e.blob),base64:q(e.base64),blobUri:q(e.blobUri||ae.createObjectURL(e.blob)),uri:q(e.uri)}},{create:function(e,t,n,r){if(S(e))return o({id:e,name:r,blob:t,base64:n});if(T(e))return o(e);throw new Error("Unknown input type")},add:function(e){t(e.id())||n.push(e)},get:t=function(t){return e(function(e){return e.id()===t})},getByUri:function(t){return e(function(e){return e.blobUri()===t})},findFirst:e=function(e){return U(n,e)[0]},removeByUri:function(t){n=U(n,function(e){return e.blobUri()!==t||(ae.revokeObjectURL(e.blobUri()),!1)})},destroy:function(){z(n,function(e){ae.revokeObjectURL(e.blobUri())}),n=[]}}),f=(a={},s=function(e,t){return{status:e,resultUri:t}},{hasBlobUri:c=function(e){return e in a},getResultUri:function(e){var t=a[e];return t?t.resultUri:null},isPending:function(e){return!!c(e)&&1===a[e].status},isUploaded:function(e){return!!c(e)&&2===a[e].status},markPending:function(e){a[e]=s(1,null)},markUploaded:function(e,t){a[e]=s(2,t)},removeFailed:function(e){delete a[e]},destroy:function(){a={}}}),d=[],m=function(t){return function(e){return u.selection?t(e):[]}},g=function(e,t,n){for(var r=0;-1!==(r=e.indexOf(t,r))&&(e=e.substring(0,r)+n+e.substr(r+t.length),r+=n.length-t.length+1),-1!==r;);return e},p=function(e,t,n){return e=g(e,'src="'+t+'"','src="'+n+'"'),e=g(e,'data-mce-src="'+t+'"','data-mce-src="'+n+'"')},h=function(t,n){z(u.undoManager.data,function(e){"fragmented"===e.type?e.fragments=W(e.fragments,function(e){return p(e,t,n)}):e.content=p(e.content,t,n)})},v=function(){return u.notificationManager.open({text:u.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})},y=function(e,t){l.removeByUri(e.src),h(e.src,t),u.$(e).attr({src:Bl(u)?t+"?"+(new Date).getTime():t,"data-mce-src":u.convertURL(t,"src")})},b=function(n){return i||(i=Dh(f,{url:Il(u),basePath:Ll(u),credentials:Fl(u),handler:Ml(u)})),w().then(m(function(r){var e;return e=W(r,function(e){return e.blobInfo}),i.upload(e,v).then(m(function(e){var t=W(e,function(e,t){var n=r[t].image;return e.status&&Pl(u)?y(n,e.url):e.error&&kh.uploadError(u,e.error),{element:n,status:e.status}});return n&&n(t),t}))}))},C=function(e){if(Ol(u))return b(e)},x=function(t){return!1!==J(d,function(e){return e(t)})&&(0!==t.getAttribute("src").indexOf("data:")||Dl(u)(t))},w=function(){var o,i,a;return r||(o=f,i=l,a={},r={findAll:function(e,n){var t;n||(n=q(!0)),t=U(jh(e),function(e){var t=e.src;return!!fe.fileApi&&!e.hasAttribute("data-mce-bogus")&&!e.hasAttribute("data-mce-placeholder")&&!(!t||t===fe.transparentSrc)&&(0===t.indexOf("blob:")?!o.isUploaded(t)&&n(e):0===t.indexOf("data:")&&n(e))});var r=W(t,function(n){if(a[n.src])return new de(function(t){a[n.src].then(function(e){if("string"==typeof e)return e;t({image:n,blobInfo:e.blobInfo})})});var e=new de(function(e,t){Uh(i,n,e,t)}).then(function(e){return delete a[e.image.src],e})["catch"](function(e){return delete a[n.src],e});return a[n.src]=e});return de.all(r)}}),r.findAll(u.getBody(),x).then(m(function(e){return e=U(e,function(e){return"string"!=typeof e||(kh.displayError(u,e),!1)}),z(e,function(e){h(e.image.src,e.blobInfo.blobUri()),e.image.src=e.blobInfo.blobUri(),e.image.removeAttribute("data-mce-src")}),e}))},N=function(e){return e.replace(/src="(blob:[^"]+)"/g,function(e,n){var t=f.getResultUri(n);if(t)return'src="'+t+'"';var r=l.getByUri(n);return r||(r=j(u.editorManager.get(),function(e,t){return e||t.editorUpload&&t.editorUpload.blobCache.getByUri(n)},null)),r?'src="data:'+r.blob().type+";base64,"+r.base64()+'"':e})};return u.on("setContent",function(){Ol(u)?C():w()}),u.on("RawSaveContent",function(e){e.content=N(e.content)}),u.on("getContent",function(e){e.source_view||"raw"===e.format||(e.content=N(e.content))}),u.on("PostRender",function(){u.parser.addNodeFilter("img",function(e){z(e,function(e){var t=e.attr("src");if(!l.getByUri(t)){var n=f.getResultUri(t);n&&e.attr("src",n)}})})}),{blobCache:l,addFilter:function(e){d.push(e)},uploadImages:b,uploadImagesAuto:C,scanForImages:w,destroy:function(){l.destroy(),f.destroy(),r=i=null}}}var $h=function(e,t){return e.hasOwnProperty(t.nodeName)},Wh=function(e,t){if(jo.isText(t)){if(0===t.nodeValue.length)return!0;if(/^\s+$/.test(t.nodeValue)&&(!t.nextSibling||$h(e,t.nextSibling)))return!0}return!1},Kh=function(e){var t,n,r,o,i,a,u,s,c,l,f,d=e.settings,m=e.dom,g=e.selection,p=e.schema,h=p.getBlockElements(),v=g.getStart(),y=e.getBody();if(f=d.forced_root_block,v&&jo.isElement(v)&&f&&(l=y.nodeName.toLowerCase(),p.isValidChild(l,f.toLowerCase())&&(b=h,C=y,x=v,!M(af(ar.fromDom(x),ar.fromDom(C)),function(e){return $h(b,e.dom())})))){var b,C,x,w,N;for(n=(t=g.getRng()).startContainer,r=t.startOffset,o=t.endContainer,i=t.endOffset,c=sh(e),v=y.firstChild;v;)if(w=h,N=v,jo.isText(N)||jo.isElement(N)&&!$h(w,N)&&!yc(N)){if(Wh(h,v)){v=(u=v).nextSibling,m.remove(u);continue}a||(a=m.create(f,e.settings.forced_root_block_attrs),v.parentNode.insertBefore(a,v),s=!0),v=(u=v).nextSibling,a.appendChild(u)}else a=null,v=v.nextSibling;s&&c&&(t.setStart(n,r),t.setEnd(o,i),g.setRng(t),e.nodeChanged())}},Xh=function(e){e.settings.forced_root_block&&e.on("NodeChange",d(Kh,e))},Yh=function(t){return Yr(t).fold(q([t]),function(e){return[t].concat(Yh(e))})},Gh=function(t){return Gr(t).fold(q([t]),function(e){return"br"===lr(e)?Hr(e).map(function(e){return[t].concat(Gh(e))}).getOr([]):[t].concat(Gh(e))})},Jh=function(o,e){return ru((i=e,a=i.startContainer,u=i.startOffset,jo.isText(a)?0===u?_.some(ar.fromDom(a)):_.none():_.from(a.childNodes[u]).map(ar.fromDom)),(t=e,n=t.endContainer,r=t.endOffset,jo.isText(n)?r===n.data.length?_.some(ar.fromDom(n)):_.none():_.from(n.childNodes[r-1]).map(ar.fromDom)),function(e,t){var n=X(Yh(o),d(Mr,e)),r=X(Gh(o),d(Mr,t));return n.isSome()&&r.isSome()}).getOr(!1);var t,n,r,i,a,u},Qh=function(e,t,n,r){var o=n,i=new go(n,o),a=e.schema.getNonEmptyElements();do{if(3===n.nodeType&&0!==Xt.trim(n.nodeValue).length)return void(r?t.setStart(n,0):t.setEnd(n,n.nodeValue.length));if(a[n.nodeName]&&!/^(TD|TH)$/.test(n.nodeName))return void(r?t.setStartBefore(n):"BR"===n.nodeName?t.setEndBefore(n):t.setEndAfter(n));if(fe.ie&&fe.ie<11&&e.isBlock(n)&&e.isEmpty(n))return void(r?t.setStart(n,0):t.setEnd(n,0))}while(n=r?i.next():i.prev());"BODY"===o.nodeName&&(r?t.setStart(o,0):t.setEnd(o,o.childNodes.length))},Zh=function(e){var t=e.selection.getSel();return t&&0<t.rangeCount};function ev(i){var r,o=[];"onselectionchange"in i.getDoc()||i.on("NodeChange Click MouseUp KeyUp Focus",function(e){var t,n;n={startContainer:(t=i.selection.getRng()).startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset},"nodechange"!==e.type&&Eg(n,r)||i.fire("SelectionChange"),r=n}),i.on("contextmenu",function(){i.fire("SelectionChange")}),i.on("SelectionChange",function(){var e=i.selection.getStart(!0);!e||!fe.range&&i.selection.isCollapsed()||Zh(i)&&!function(e){var t,n;if((n=i.$(e).parentsUntil(i.getBody()).add(e)).length===o.length){for(t=n.length;0<=t&&n[t]===o[t];t--);if(-1===t)return o=n,!0}return o=n,!1}(e)&&i.dom.isChildOf(e,i.getBody())&&i.nodeChanged({selectionChange:!0})}),i.on("MouseUp",function(e){!e.isDefaultPrevented()&&Zh(i)&&("IMG"===i.selection.getNode().nodeName?he.setEditorTimeout(i,function(){i.nodeChanged()}):i.nodeChanged())}),this.nodeChanged=function(e){var t,n,r,o=i.selection;i.initialized&&o&&!i.settings.disable_nodechange&&!i.readonly&&(r=i.getBody(),(t=o.getStart(!0)||r).ownerDocument===i.getDoc()&&i.dom.isChildOf(t,r)||(t=r),n=[],i.dom.getParent(t,function(e){if(e===r)return!0;n.push(e)}),(e=e||{}).element=t,e.parents=n,i.fire("NodeChange",e))}}var tv,nv,rv={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,END:35,HOME:36,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||this.metaKeyPressed(e)},metaKeyPressed:function(e){return fe.mac?e.metaKey:e.ctrlKey&&!e.altKey}},ov=function(e){return j(e,function(e,t){return e.concat(function(t){var e=function(e){return W(e,function(e){return(e=Ka(e)).node=t,e})};if(jo.isElement(t))return e(t.getClientRects());if(jo.isText(t)){var n=t.ownerDocument.createRange();return n.setStart(t,0),n.setEnd(t,t.data.length),e(n.getClientRects())}}(t))},[])};(nv=tv||(tv={}))[nv.Up=-1]="Up",nv[nv.Down=1]="Down";var iv=function(o,i,a,e,u,t){var n,s,c=0,l=[],r=function(e){var t,n,r;for(r=ov([e]),-1===o&&(r=r.reverse()),t=0;t<r.length;t++)if(n=r[t],!a(n,s)){if(0<l.length&&i(n,Ht.last(l))&&c++,n.line=c,u(n))return!0;l.push(n)}};return(s=Ht.last(t.getClientRects()))&&(r(n=t.getNode()),function(e,t,n,r){for(;r=Es(r,e,$a,t);)if(n(r))return}(o,e,r,n)),l},av=d(iv,tv.Up,Ga,Ja),uv=d(iv,tv.Down,Ja,Ga),sv=function(n){return function(e){return t=n,e.line>t;var t}},cv=function(n){return function(e){return t=n,e.line===t;var t}},lv=jo.isContentEditableFalse,fv=Es,dv=function(e,t){return Math.abs(e.left-t)},mv=function(e,t){return Math.abs(e.right-t)},gv=function(e,t){return e>=t.left&&e<=t.right},pv=function(e,o){return Ht.reduce(e,function(e,t){var n,r;return n=Math.min(dv(e,o),mv(e,o)),r=Math.min(dv(t,o),mv(t,o)),gv(o,t)?t:gv(o,e)?e:r===n&&lv(t.node)?t:r<n?t:e})},hv=function(e,t,n,r){for(;r=fv(r,e,$a,t);)if(n(r))return},vv=function(e,t,n){var r,o,i,a,u,s,c,l=ov(U(te(e.getElementsByTagName("*")),gs)),f=U(l,function(e){return n>=e.top&&n<=e.bottom});return(r=pv(f,t))&&(r=pv((a=e,c=function(t,e){var n;return n=U(ov([e]),function(e){return!t(e,u)}),s=s.concat(n),0===n.length},(s=[]).push(u=r),hv(tv.Up,a,d(c,Ga),u.node),hv(tv.Down,a,d(c,Ja),u.node),s),t))&&gs(r.node)?(i=t,{node:(o=r).node,before:dv(o,i)<mv(o,i)}):null},yv=function(t,n,e){if(e.collapsed)return!1;if(fe.ie&&fe.ie<=11&&e.startOffset===e.endOffset-1&&e.startContainer===e.endContainer){var r=e.startContainer.childNodes[e.startOffset];if(jo.isElement(r))return M(r.getClientRects(),function(e){return Qa(e,t,n)})}return M(e.getClientRects(),function(e){return Qa(e,t,n)})},bv=function(e){var t,n,r,o;return o=e.getBoundingClientRect(),n=(t=e.ownerDocument).documentElement,r=t.defaultView,{top:o.top+r.pageYOffset-n.clientTop,left:o.left+r.pageXOffset-n.clientLeft}},Cv=function(e,t){return n=(u=e).inline?bv(u.getBody()):{left:0,top:0},a=(i=e).getBody(),r=i.inline?{left:a.scrollLeft,top:a.scrollTop}:{left:0,top:0},{pageX:(o=function(e,t){if(t.target.ownerDocument!==e.getDoc()){var n=bv(e.getContentAreaContainer()),r=(i=(o=e).getBody(),a=o.getDoc().documentElement,u={left:i.scrollLeft,top:i.scrollTop},s={left:i.scrollLeft||a.scrollLeft,top:i.scrollTop||a.scrollTop},o.inline?u:s);return{left:t.pageX-n.left+r.left,top:t.pageY-n.top+r.top}}var o,i,a,u,s;return{left:t.pageX,top:t.pageY}}(e,t)).left-n.left+r.left,pageY:o.top-n.top+r.top};var n,r,o,i,a,u},xv=jo.isContentEditableFalse,wv=jo.isContentEditableTrue,Nv=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},Ev=function(u,s){return function(e){if(0===e.button){var t=X(s.dom.getParents(e.target),au(xv,wv)).getOr(null);if(i=s.getBody(),xv(a=t)&&a!==i){var n=s.dom.getPos(t),r=s.getBody(),o=s.getDoc().documentElement;u.element=t,u.screenX=e.screenX,u.screenY=e.screenY,u.maxX=(s.inline?r.scrollWidth:o.offsetWidth)-2,u.maxY=(s.inline?r.scrollHeight:o.offsetHeight)-2,u.relX=e.pageX-n.x,u.relY=e.pageY-n.y,u.width=t.offsetWidth,u.height=t.offsetHeight,u.ghost=function(e,t,n,r){var o=t.cloneNode(!0);e.dom.setStyles(o,{width:n,height:r}),e.dom.setAttrib(o,"data-mce-selected",null);var i=e.dom.create("div",{"class":"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return e.dom.setStyles(i,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:r}),e.dom.setStyles(o,{margin:0,boxSizing:"border-box"}),i.appendChild(o),i}(s,t,u.width,u.height)}}var i,a}},Sv=function(l,f){return function(e){if(l.dragging&&(s=(i=f).selection,c=s.getSel().getRangeAt(0).startContainer,a=3===c.nodeType?c.parentNode:c,u=l.element,a!==u&&!i.dom.isChildOf(a,u)&&!xv(a))){var t=(r=l.element,(o=r.cloneNode(!0)).removeAttribute("data-mce-selected"),o),n=f.fire("drop",{targetClone:t,clientX:e.clientX,clientY:e.clientY});n.isDefaultPrevented()||(t=n.targetClone,f.undoManager.transact(function(){Nv(l.element),f.insertContent(f.dom.getOuterHTML(t)),f._selectionOverrides.hideFakeCaret()}))}var r,o,i,a,u,s,c;Tv(l)}},Tv=function(e){e.dragging=!1,e.element=null,Nv(e.ghost)},kv=function(e){var t,n,r,o,i,a,p,h,v,u,s,c={};t=Si.DOM,a=V.document,n=Ev(c,e),p=c,h=e,v=he.throttle(function(e,t){h._selectionOverrides.hideFakeCaret(),h.selection.placeCaretAt(e,t)},0),r=function(e){var t,n,r,o,i,a,u,s,c,l,f,d,m=Math.max(Math.abs(e.screenX-p.screenX),Math.abs(e.screenY-p.screenY));if(p.element&&!p.dragging&&10<m){if(h.fire("dragstart",{target:p.element}).isDefaultPrevented())return;p.dragging=!0,h.focus()}if(p.dragging){var g=(f=p,{pageX:(d=Cv(h,e)).pageX-f.relX,pageY:d.pageY+5});c=p.ghost,l=h.getBody(),c.parentNode!==l&&l.appendChild(c),t=p.ghost,n=g,r=p.width,o=p.height,i=p.maxX,a=p.maxY,s=u=0,t.style.left=n.pageX+"px",t.style.top=n.pageY+"px",n.pageX+r>i&&(u=n.pageX+r-i),n.pageY+o>a&&(s=n.pageY+o-a),t.style.width=r-u+"px",t.style.height=o-s+"px",v(e.clientX,e.clientY)}},o=Sv(c,e),u=c,i=function(){u.dragging&&s.fire("dragend"),Tv(u)},(s=e).on("mousedown",n),e.on("mousemove",r),e.on("mouseup",o),t.bind(a,"mousemove",r),t.bind(a,"mouseup",i),e.on("remove",function(){t.unbind(a,"mousemove",r),t.unbind(a,"mouseup",i)})},_v=function(e){var n;kv(e),(n=e).on("drop",function(e){var t="undefined"!=typeof e.clientX?n.getDoc().elementFromPoint(e.clientX,e.clientY):null;(xv(t)||xv(n.dom.getContentEditableParent(t)))&&e.preventDefault()})},Av=function(t){var e=Vi(function(){if(!t.removed&&t.selection.getRng().collapsed){var e=fg(t,t.selection.getRng(),!1);t.selection.setRng(e)}},0);t.on("focus",function(){e.throttle()}),t.on("blur",function(){e.cancel()})},Rv=jo.isContentEditableTrue,Dv=jo.isContentEditableFalse,Ov=function(e,t){for(var n=e.getBody();t&&t!==n;){if(Rv(t)||Dv(t))return t;t=t.parentNode}return null},Bv=function(g){var p,e,t,a=g.getBody(),o=ds(g.getBody(),function(e){return g.dom.isBlock(e)},function(){return sh(g)}),h="sel-"+g.dom.uniqueId(),u=function(e){e&&g.selection.setRng(e)},s=function(){return g.selection.getRng()},v=function(e,t,n,r){return void 0===r&&(r=!0),g.fire("ShowCaret",{target:t,direction:e,before:n}).isDefaultPrevented()?null:(r&&g.selection.scrollIntoView(t,-1===e),o.show(n,t))},y=function(e,t){return t=Os(e,a,t),-1===e?_u.fromRangeStart(t):_u.fromRangeEnd(t)},n=function(e){return ka(e)||Oa(e)||Ba(e)},b=function(e){return n(e.startContainer)||n(e.endContainer)},c=function(e){var t=g.schema.getShortEndedElements(),n=g.dom.createRng(),r=e.startContainer,o=e.startOffset,i=e.endContainer,a=e.endOffset;return br(t,r.nodeName.toLowerCase())?0===o?n.setStartBefore(r):n.setStartAfter(r):n.setStart(r,o),br(t,i.nodeName.toLowerCase())?0===a?n.setEndBefore(i):n.setEndAfter(i):n.setEnd(i,a),n},l=function(e,t){var n,r,o,i,a,u,s,c,l,f,d=g.$,m=g.dom;if(!e)return null;if(e.collapsed){if(!b(e))if(!1===t){if(c=y(-1,e),gs(c.getNode(!0)))return v(-1,c.getNode(!0),!1,!1);if(gs(c.getNode()))return v(-1,c.getNode(),!c.isAtEnd(),!1)}else{if(c=y(1,e),gs(c.getNode()))return v(1,c.getNode(),!c.isAtEnd(),!1);if(gs(c.getNode(!0)))return v(1,c.getNode(!0),!1,!1)}return null}return i=e.startContainer,a=e.startOffset,u=e.endOffset,3===i.nodeType&&0===a&&Dv(i.parentNode)&&(i=i.parentNode,a=m.nodeIndex(i),i=i.parentNode),1!==i.nodeType?null:(u===a+1&&i===e.endContainer&&(n=i.childNodes[a]),Dv(n)?(l=f=n.cloneNode(!0),(s=g.fire("ObjectSelected",{target:n,targetClone:l})).isDefaultPrevented()?null:(r=oa(ar.fromDom(g.getBody()),"#"+h).fold(function(){return d([])},function(e){return d([e.dom()])}),l=s.targetClone,0===r.length&&(r=d('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",h)).appendTo(g.getBody()),e=g.dom.createRng(),l===f&&fe.ie?(r.empty().append('<p style="font-size: 0" data-mce-bogus="all">\xa0</p>').append(l),e.setStartAfter(r[0].firstChild.firstChild),e.setEndAfter(l)):(r.empty().append("\xa0").append(l).append("\xa0"),e.setStart(r[0].firstChild,1),e.setEnd(r[0].lastChild,0)),r.css({top:m.getPos(n,g.getBody()).y}),r[0].focus(),(o=g.selection.getSel()).removeAllRanges(),o.addRange(e),z(Qi(ar.fromDom(g.getBody()),"*[data-mce-selected]"),function(e){Sr(e,"data-mce-selected")}),n.setAttribute("data-mce-selected","1"),p=n,C(),e)):null)},f=function(){p&&(p.removeAttribute("data-mce-selected"),oa(ar.fromDom(g.getBody()),"#"+h).each(Ui),p=null),oa(ar.fromDom(g.getBody()),"#"+h).each(Ui),p=null},C=function(){o.hide()};return fe.ceFalse&&(function(){g.on("mouseup",function(e){var t=s();t.collapsed&&ph(g,e.clientX,e.clientY)&&u(lg(g,t,!1))}),g.on("click",function(e){var t;(t=Ov(g,e.target))&&(Dv(t)&&(e.preventDefault(),g.focus()),Rv(t)&&g.dom.isChildOf(t,g.selection.getNode())&&f())}),g.on("blur NewBlock",function(){f()}),g.on("ResizeWindow FullscreenStateChanged",function(){return o.reposition()});var n,r,i=function(e,t){var n,r,o=g.dom.getParent(e,g.dom.isBlock),i=g.dom.getParent(t,g.dom.isBlock);return!(!o||!g.dom.isChildOf(o,i)||!1!==Dv(Ov(g,o)))||o&&(n=o,r=i,!(g.dom.getParent(n,g.dom.isBlock)===g.dom.getParent(r,g.dom.isBlock)))&&function(e){var t=Js(e);if(!e.firstChild)return!1;var n=_u.before(e.firstChild),r=t.next(n);return r&&!Lf(r)&&!Ff(r)}(o)};r=!1,(n=g).on("touchstart",function(){r=!1}),n.on("touchmove",function(){r=!0}),n.on("touchend",function(e){var t=Ov(n,e.target);Dv(t)&&(r||(e.preventDefault(),l(cg(n,t))))}),g.on("mousedown",function(e){var t,n=e.target;if((n===a||"HTML"===n.nodeName||g.dom.isChildOf(n,a))&&!1!==ph(g,e.clientX,e.clientY))if(t=Ov(g,n))Dv(t)?(e.preventDefault(),l(cg(g,t))):(f(),Rv(t)&&e.shiftKey||yv(e.clientX,e.clientY,g.selection.getRng())||(C(),g.selection.placeCaretAt(e.clientX,e.clientY)));else if(!1===gs(n)){f(),C();var r=vv(a,e.clientX,e.clientY);if(r&&!i(e.target,r.node)){e.preventDefault();var o=v(1,r.node,r.before,!1);g.getBody().focus(),u(o)}}}),g.on("keypress",function(e){rv.modifierPressed(e)||(e.keyCode,Dv(g.selection.getNode())&&e.preventDefault())}),g.on("getSelectionRange",function(e){var t=e.range;if(p){if(!p.parentNode)return void(p=null);(t=t.cloneRange()).selectNode(p),e.range=t}}),g.on("setSelectionRange",function(e){e.range=c(e.range);var t=l(e.range,e.forward);t&&(e.range=t)}),g.on("AfterSetSelectionRange",function(e){var t,n=e.range;b(n)||"mcepastebin"===n.startContainer.parentNode.id||C(),t=n.startContainer.parentNode,g.dom.hasClass(t,"mce-offscreen-selection")||f()}),g.on("copy",function(e){var t,n=e.clipboardData;if(!e.isDefaultPrevented()&&e.clipboardData&&!fe.ie){var r=(t=g.dom.get(h))?t.getElementsByTagName("*")[0]:t;r&&(e.preventDefault(),n.clearData(),n.setData("text/html",r.outerHTML),n.setData("text/plain",r.outerText))}}),_v(g),Av(g)}(),e=g.contentStyles,t=".mce-content-body",e.push(o.getCss()),e.push(t+" .mce-offscreen-selection {position: absolute;left: -9999999999px;max-width: 1000000px;}"+t+" *[contentEditable=false] {cursor: default;}"+t+" *[contentEditable=true] {cursor: text;}")),{showCaret:v,showBlockCaretContainer:function(e){e.hasAttribute("data-mce-caret")&&(Pa(e),u(s()),g.selection.scrollIntoView(e[0]))},hideFakeCaret:C,destroy:function(){o.destroy(),p=null}}},Pv=function(e){for(var t=e;/<!--|--!?>/g.test(t);)t=t.replace(/<!--|--!?>/g,"");return t},Iv=function(e,t,n){var r,o,i,a,u=1;for(a=e.getShortEndedElements(),(i=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g).lastIndex=r=n;o=i.exec(t);){if(r=i.lastIndex,"/"===o[1])u--;else if(!o[1]){if(o[2]in a)continue;u++}if(0===u)break}return r},Lv=function(e,t){var n=e.exec(t);if(n){var r=n[1],o=n[2];return"string"==typeof r&&"data-mce-bogus"===r.toLowerCase()?o:null}return null};function Fv(z,U){void 0===U&&(U=di());var e=function(){};!1!==(z=z||{}).fix_self_closing&&(z.fix_self_closing=!0);var j=z.comment?z.comment:e,V=z.cdata?z.cdata:e,H=z.text?z.text:e,q=z.start?z.start:e,$=z.end?z.end:e,W=z.pi?z.pi:e,K=z.doctype?z.doctype:e;return{parse:function(e){var t,n,r,d,o,i,a,m,u,s,g,c,p,l,f,h,v,y,b,C,x,w,N,E,S,T,k,_,A,R=0,D=[],O=0,B=ti.decode,P=Xt.makeMap("src,href,data,background,formaction,poster,xlink:href"),I=/((java|vb)script|mhtml):/i,L=function(e){var t,n;for(t=D.length;t--&&D[t].name!==e;);if(0<=t){for(n=D.length-1;t<=n;n--)(e=D[n]).valid&&$(e.name);D.length=t}},F=function(e,t,n,r,o){var i,a,u,s,c;if(n=(t=t.toLowerCase())in g?t:B(n||r||o||""),p&&!m&&0==(0===(u=t).indexOf("data-")||0===u.indexOf("aria-"))){if(!(i=y[t])&&b){for(a=b.length;a--&&!(i=b[a]).pattern.test(t););-1===a&&(i=null)}if(!i)return;if(i.validValues&&!(n in i.validValues))return}if(P[t]&&!z.allow_script_urls){var l=n.replace(/[\s\u0000-\u001F]+/g,"");try{l=decodeURIComponent(l)}catch(f){l=unescape(l)}if(I.test(l))return;if(c=l,!(s=z).allow_html_data_urls&&(/^data:image\//i.test(c)?!1===s.allow_svg_data_urls&&/^data:image\/svg\+xml/i.test(c):/^data:/i.test(c)))return}m&&(t in P||0===t.indexOf("on"))||(d.map[t]=n,d.push({name:t,value:n}))};for(S=new RegExp("<(?:(?:!--([\\w\\W]*?)--!?>)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),T=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,s=U.getShortEndedElements(),E=z.self_closing_elements||U.getSelfClosingElements(),g=U.getBoolAttrs(),p=z.validate,u=z.remove_internals,A=z.fix_self_closing,k=U.getSpecialElements(),N=e+">";t=S.exec(N);){if(R<t.index&&H(B(e.substr(R,t.index-R))),n=t[6])":"===(n=n.toLowerCase()).charAt(0)&&(n=n.substr(1)),L(n);else if(n=t[7]){if(t.index+t[0].length>e.length){H(B(e.substr(t.index))),R=t.index+t[0].length;continue}":"===(n=n.toLowerCase()).charAt(0)&&(n=n.substr(1)),c=n in s,A&&E[n]&&0<D.length&&D[D.length-1].name===n&&L(n);var M=Lv(T,t[8]);if(null!==M){if("all"===M){R=Iv(U,e,S.lastIndex),S.lastIndex=R;continue}f=!1}if(!p||(l=U.getElementRule(n))){if(f=!0,p&&(y=l.attributes,b=l.attributePatterns),(v=t[8])?((m=-1!==v.indexOf("data-mce-type"))&&u&&(f=!1),(d=[]).map={},v.replace(T,F)):(d=[]).map={},p&&!m){if(C=l.attributesRequired,x=l.attributesDefault,w=l.attributesForced,l.removeEmptyAttrs&&!d.length&&(f=!1),w)for(o=w.length;o--;)a=(h=w[o]).name,"{$uid}"===(_=h.value)&&(_="mce_"+O++),d.map[a]=_,d.push({name:a,value:_});if(x)for(o=x.length;o--;)(a=(h=x[o]).name)in d.map||("{$uid}"===(_=h.value)&&(_="mce_"+O++),d.map[a]=_,d.push({name:a,value:_}));if(C){for(o=C.length;o--&&!(C[o]in d.map););-1===o&&(f=!1)}if(h=d.map["data-mce-bogus"]){if("all"===h){R=Iv(U,e,S.lastIndex),S.lastIndex=R;continue}f=!1}}f&&q(n,d,c)}else f=!1;if(r=k[n]){r.lastIndex=R=t.index+t[0].length,(t=r.exec(e))?(f&&(i=e.substr(R,t.index-R)),R=t.index+t[0].length):(i=e.substr(R),R=e.length),f&&(0<i.length&&H(i,!0),$(n)),S.lastIndex=R;continue}c||(v&&v.indexOf("/")===v.length-1?f&&$(n):D.push({name:n,valid:f}))}else(n=t[1])?(">"===n.charAt(0)&&(n=" "+n),z.allow_conditional_comments||"[if"!==n.substr(0,3).toLowerCase()||(n=" "+n),j(n)):(n=t[2])?V(Pv(n)):(n=t[3])?K(n):(n=t[4])&&W(n,t[5]);R=t.index+t[0].length}for(R<e.length&&H(B(e.substr(R))),o=D.length-1;0<=o;o--)(n=D[o]).valid&&$(n.name)}}}(Fv||(Fv={})).findEndTag=Iv;var Mv=Fv,zv=function(e,t){var n,r,o,i,a,u,s,c,l=t,f=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,d=e.schema;for(u=e.getTempAttrs(),s=l,c=new RegExp(["\\s?("+u.join("|")+')="[^"]+"'].join("|"),"gi"),l=s.replace(c,""),a=d.getShortEndedElements();i=f.exec(l);)r=f.lastIndex,o=i[0].length,n=a[i[1]]?r:Mv.findEndTag(d,l,r),l=l.substring(0,r-o)+l.substring(n),f.lastIndex=r-o;return wa(l)},Uv={trimExternal:zv,trimInternal:zv},jv=0,Vv=2,Hv=1,qv=function(g,p){var e=g.length+p.length+2,h=new Array(e),v=new Array(e),c=function(e,t,n,r,o){var i=l(e,t,n,r);if(null===i||i.start===t&&i.diag===t-r||i.end===e&&i.diag===e-n)for(var a=e,u=n;a<t||u<r;)a<t&&u<r&&g[a]===p[u]?(o.push([0,g[a]]),++a,++u):r-n<t-e?(o.push([2,g[a]]),++a):(o.push([1,p[u]]),++u);else{c(e,i.start,n,i.start-i.diag,o);for(var s=i.start;s<i.end;++s)o.push([0,g[s]]);c(i.end,t,i.end-i.diag,r,o)}},y=function(e,t,n,r){for(var o=e;o-t<r&&o<n&&g[o]===p[o-t];)++o;return{start:e,end:o,diag:t}},l=function(e,t,n,r){var o=t-e,i=r-n;if(0===o||0===i)return null;var a,u,s,c,l,f=o-i,d=i+o,m=(d%2==0?d:d+1)/2;for(h[1+m]=e,v[1+m]=t+1,a=0;a<=m;++a){for(u=-a;u<=a;u+=2){for(s=u+m,u===-a||u!==a&&h[s-1]<h[s+1]?h[s]=h[s+1]:h[s]=h[s-1]+1,l=(c=h[s])-e+n-u;c<t&&l<r&&g[c]===p[l];)h[s]=++c,++l;if(f%2!=0&&f-a<=u&&u<=f+a&&v[s-f]<=h[s])return y(v[s-f],u+e-n,t,r)}for(u=f-a;u<=f+a;u+=2){for(s=u+m-f,u===f-a||u!==f+a&&v[s+1]<=v[s-1]?v[s]=v[s+1]-1:v[s]=v[s-1],l=(c=v[s]-1)-e+n-u;e<=c&&n<=l&&g[c]===p[l];)v[s]=c--,l--;if(f%2==0&&-a<=u&&u<=a&&v[s]<=h[s+f])return y(v[s],u+e-n,t,r)}}},t=[];return c(0,g.length,0,p.length,t),t},$v=function(e){return jo.isElement(e)?e.outerHTML:jo.isText(e)?ti.encodeRaw(e.data,!1):jo.isComment(e)?"\x3c!--"+e.data+"--\x3e":""},Wv=function(e,t,n){var r=function(e){var t,n,r;for(r=V.document.createElement("div"),t=V.document.createDocumentFragment(),e&&(r.innerHTML=e);n=r.firstChild;)t.appendChild(n);return t}(t);if(e.hasChildNodes()&&n<e.childNodes.length){var o=e.childNodes[n];o.parentNode.insertBefore(r,o)}else e.appendChild(r)},Kv=function(e){return U(W(te(e.childNodes),$v),function(e){return 0<e.length})},Xv=function(e,t){var n,r,o,i=W(te(t.childNodes),$v);return n=qv(i,e),r=t,o=0,z(n,function(e){e[0]===jv?o++:e[0]===Hv?(Wv(r,e[1],o),o++):e[0]===Vv&&function(e,t){if(e.hasChildNodes()&&t<e.childNodes.length){var n=e.childNodes[t];n.parentNode.removeChild(n)}}(r,o)}),t},Yv=Hi(_.none()),Gv=function(e){return{type:"fragmented",fragments:e,content:"",bookmark:null,beforeBookmark:null}},Jv=function(e){return{type:"complete",fragments:null,content:e,bookmark:null,beforeBookmark:null}},Qv=function(e){return"fragmented"===e.type?e.fragments.join(""):e.content},Zv=function(e){var t=ar.fromTag("body",Yv.get().getOrThunk(function(){var e=V.document.implementation.createHTMLDocument("undo");return Yv.set(_.some(e)),e}));return ya(t,Qv(e)),z(Qi(t,"*[data-mce-bogus]"),ji),t.dom().innerHTML},ey=function(n){var e,t,r;return e=Kv(n.getBody()),-1!==(t=(r=G(e,function(e){var t=Uv.trimInternal(n.serializer,e);return 0<t.length?[t]:[]})).join("")).indexOf("</iframe>")?Gv(r):Jv(t)},ty=function(e,t,n){"fragmented"===t.type?Xv(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(n?t.beforeBookmark:t.bookmark)},ny=function(e,t){return!(!e||!t)&&(r=t,Qv(e)===Qv(r)||(n=t,Zv(e)===Zv(n)));var n,r};function ry(u){var s,r,o=this,c=0,l=[],t=0,f=function(){return 0===t},i=function(e){f()&&(o.typing=e)},d=function(e){u.setDirty(e)},a=function(e){i(!1),o.add({},e)},n=function(){o.typing&&(i(!1),o.add())};return u.on("init",function(){o.add()}),u.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&(n(),o.beforeChange())}),u.on("ExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&a(e)}),u.on("ObjectResizeStart Cut",function(){o.beforeChange()}),u.on("SaveContent ObjectResized blur",a),u.on("DragEnd",a),u.on("KeyUp",function(e){var t=e.keyCode;e.isDefaultPrevented()||((33<=t&&t<=36||37<=t&&t<=40||45===t||e.ctrlKey)&&(a(),u.nodeChanged()),46!==t&&8!==t||u.nodeChanged(),r&&o.typing&&!1===ny(ey(u),l[0])&&(!1===u.isDirty()&&(d(!0),u.fire("change",{level:l[0],lastLevel:null})),u.fire("TypingUndo"),r=!1,u.nodeChanged()))}),u.on("KeyDown",function(e){var t=e.keyCode;if(!e.isDefaultPrevented())if(33<=t&&t<=36||37<=t&&t<=40||45===t)o.typing&&a(e);else{var n=e.ctrlKey&&!e.altKey||e.metaKey;!(t<16||20<t)||224===t||91===t||o.typing||n||(o.beforeChange(),i(!0),o.add({},e),r=!0)}}),u.on("MouseDown",function(e){o.typing&&a(e)}),u.on("input",function(e){var t;e.inputType&&("insertReplacementText"===e.inputType||"insertText"===(t=e).inputType&&null===t.data)&&a(e)}),u.addShortcut("meta+z","","Undo"),u.addShortcut("meta+y,meta+shift+z","","Redo"),u.on("AddUndo Undo Redo ClearUndos",function(e){e.isDefaultPrevented()||u.nodeChanged()}),o={data:l,typing:!1,beforeChange:function(){f()&&(s=Yu.getUndoBookmark(u.selection))},add:function(e,t){var n,r,o,i=u.settings;if(o=ey(u),e=e||{},e=Xt.extend(e,o),!1===f()||u.removed)return null;if(r=l[c],u.fire("BeforeAddUndo",{level:e,lastLevel:r,originalEvent:t}).isDefaultPrevented())return null;if(r&&ny(r,e))return null;if(l[c]&&(l[c].beforeBookmark=s),i.custom_undo_redo_levels&&l.length>i.custom_undo_redo_levels){for(n=0;n<l.length-1;n++)l[n]=l[n+1];l.length--,c=l.length}e.bookmark=Yu.getUndoBookmark(u.selection),c<l.length-1&&(l.length=c+1),l.push(e),c=l.length-1;var a={level:e,lastLevel:r,originalEvent:t};return u.fire("AddUndo",a),0<c&&(d(!0),u.fire("change",a)),e},undo:function(){var e;return o.typing&&(o.add(),o.typing=!1,i(!1)),0<c&&(e=l[--c],ty(u,e,!0),d(!0),u.fire("undo",{level:e})),e},redo:function(){var e;return c<l.length-1&&(e=l[++c],ty(u,e,!1),d(!0),u.fire("redo",{level:e})),e},clear:function(){l=[],c=0,o.typing=!1,o.data=l,u.fire("ClearUndos")},hasUndo:function(){return 0<c||o.typing&&l[0]&&!ny(ey(u),l[0])},hasRedo:function(){return c<l.length-1&&!o.typing},transact:function(e){return n(),o.beforeChange(),o.ignore(e),o.add()},ignore:function(e){try{t++,e()}finally{t--}},extra:function(e,t){var n,r;o.transact(e)&&(r=l[c].bookmark,n=l[c-1],ty(u,n,!0),o.transact(t)&&(l[c-1].beforeBookmark=r))}}}var oy,iy,ay={},uy=Ht.filter,sy=Ht.each;iy=function(e){var t,n,r=e.selection.getRng();t=jo.matchNodeNames("pre"),r.collapsed||(n=e.selection.getSelectedBlocks(),sy(uy(uy(n,t),function(e){return t(e.previousSibling)&&-1!==Ht.indexOf(n,e.previousSibling)}),function(e){var t,n;t=e.previousSibling,gn(n=e).remove(),gn(t).append("<br><br>").append(n.childNodes)}))},ay[oy="pre"]||(ay[oy]=[]),ay[oy].push(iy);var cy=function(e,t){sy(ay[e],function(e){e(t)})},ly=/^(src|href|style)$/,fy=Xt.each,dy=wc.isEq,my=function(e,t,n){return e.isChildOf(t,n)&&t!==n&&!e.isBlock(n)},gy=function(e,t,n){var r,o,i;return r=t[n?"startContainer":"endContainer"],o=t[n?"startOffset":"endOffset"],jo.isElement(r)&&(i=r.childNodes.length-1,!n&&o&&o--,r=r.childNodes[i<o?i:o]),jo.isText(r)&&n&&o>=r.nodeValue.length&&(r=new go(r,e.getBody()).next()||r),jo.isText(r)&&!n&&0===o&&(r=new go(r,e.getBody()).prev()||r),r},py=function(e,t,n,r){var o=e.create(n,r);return t.parentNode.insertBefore(o,t),o.appendChild(t),o},hy=function(e,t,n,r,o){var i=ar.fromDom(t),a=ar.fromDom(e.create(r,o)),u=n?Wr(i):$r(i);return Mi(a,u),n?(Pi(i,a),Li(a,i)):(Ii(i,a),Fi(a,i)),a.dom()},vy=function(e,t,n,r){return!(t=wc.getNonWhiteSpaceSibling(t,n,r))||"BR"===t.nodeName||e.isBlock(t)},yy=function(e,n,r,o,i){var t,a,u,s,c,l,f,d,m,g,p,h,v,y,b=e.dom;if(c=b,!(dy(l=o,(f=n).inline)||dy(l,f.block)||(f.selector?jo.isElement(l)&&c.is(l,f.selector):void 0)||(s=o,n.links&&"A"===s.tagName)))return!1;if("all"!==n.remove)for(fy(n.styles,function(e,t){e=wc.normalizeStyleValue(b,wc.replaceVars(e,r),t),"number"==typeof t&&(t=e,i=0),(n.remove_similar||!i||dy(wc.getStyle(b,i,t),e))&&b.setStyle(o,t,""),u=1}),u&&""===b.getAttrib(o,"style")&&(o.removeAttribute("style"),o.removeAttribute("data-mce-style")),fy(n.attributes,function(e,t){var n;if(e=wc.replaceVars(e,r),"number"==typeof t&&(t=e,i=0),!i||dy(b.getAttrib(i,t),e)){if("class"===t&&(e=b.getAttrib(o,t))&&(n="",fy(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(n+=(n?" ":"")+e)}),n))return void b.setAttrib(o,t,n);"class"===t&&o.removeAttribute("className"),ly.test(t)&&o.removeAttribute("data-mce-"+t),o.removeAttribute(t)}}),fy(n.classes,function(e){e=wc.replaceVars(e,r),i&&!b.hasClass(i,e)||b.removeClass(o,e)}),a=b.getAttribs(o),t=0;t<a.length;t++){var C=a[t].nodeName;if(0!==C.indexOf("_")&&0!==C.indexOf("data-"))return!1}return"none"!==n.remove?(d=e,g=n,h=(m=o).parentNode,v=d.dom,y=d.settings.forced_root_block,g.block&&(y?h===v.getRoot()&&(g.list_block&&dy(m,g.list_block)||fy(Xt.grep(m.childNodes),function(e){wc.isValid(d,y,e.nodeName.toLowerCase())?p?p.appendChild(e):(p=py(v,e,y),v.setAttribs(p,d.settings.forced_root_block_attrs)):p=0})):v.isBlock(m)&&!v.isBlock(h)&&(vy(v,m,!1)||vy(v,m.firstChild,!0,1)||m.insertBefore(v.create("br"),m.firstChild),vy(v,m,!0)||vy(v,m.lastChild,!1,1)||m.appendChild(v.create("br")))),g.selector&&g.inline&&!dy(g.inline,m)||v.remove(m,1),!0):void 0},by=yy,Cy=function(s,c,l,e,f){var t,n,d=s.formatter.get(c),m=d[0],a=!0,u=s.dom,r=s.selection,i=function(e){var n,t,r,o,i,a,u=(n=s,t=e,r=c,o=l,i=f,fy(wc.getParents(n.dom,t.parentNode).reverse(),function(e){var t;a||"_start"===e.id||"_end"===e.id||(t=Mm.matchNode(n,e,r,o,i))&&!1!==t.split&&(a=e)}),a);return function(e,t,n,r,o,i,a,u){var s,c,l,f,d,m,g=e.dom;if(n){for(m=n.parentNode,s=r.parentNode;s&&s!==m;s=s.parentNode){for(c=g.clone(s,!1),d=0;d<t.length;d++)if(yy(e,t[d],u,c,c)){c=0;break}c&&(l&&c.appendChild(l),f||(f=c),l=c)}!i||a.mixed&&g.isBlock(n)||(r=g.split(n,r)),l&&(o.parentNode.insertBefore(l,o),f.appendChild(o))}return r}(s,d,u,e,e,!0,m,l)},g=function(e){var t,n,r,o,i;if(jo.isElement(e)&&u.getContentEditable(e)&&(o=a,a="true"===u.getContentEditable(e),i=!0),t=Xt.grep(e.childNodes),a&&!i)for(n=0,r=d.length;n<r&&!yy(s,d[n],l,e,e);n++);if(m.deep&&t.length){for(n=0,r=t.length;n<r;n++)g(t[n]);i&&(a=o)}},p=function(e){var t,n=u.get(e?"_start":"_end"),r=n[e?"firstChild":"lastChild"];return yc(t=r)&&jo.isElement(t)&&("_start"===t.id||"_end"===t.id)&&(r=r[e?"firstChild":"lastChild"]),jo.isText(r)&&0===r.data.length&&(r=e?n.previousSibling||n.nextSibling:n.nextSibling||n.previousSibling),u.remove(n,!0),r},o=function(e){var t,n,r=e.commonAncestorContainer;if(e=Pc(s,e,d,!0),m.split){if(e=Um(e),(t=gy(s,e,!0))!==(n=gy(s,e))){if(/^(TR|TH|TD)$/.test(t.nodeName)&&t.firstChild&&(t="TR"===t.nodeName?t.firstChild.firstChild||t:t.firstChild||t),r&&/^T(HEAD|BODY|FOOT|R)$/.test(r.nodeName)&&/^(TH|TD)$/.test(n.nodeName)&&n.firstChild&&(n=n.firstChild||n),my(u,t,n)){var o=_.from(t.firstChild).getOr(t);return i(hy(u,o,!0,"span",{id:"_start","data-mce-type":"bookmark"})),void p(!0)}if(my(u,n,t))return o=_.from(n.lastChild).getOr(n),i(hy(u,o,!1,"span",{id:"_end","data-mce-type":"bookmark"})),void p(!1);t=py(u,t,"span",{id:"_start","data-mce-type":"bookmark"}),n=py(u,n,"span",{id:"_end","data-mce-type":"bookmark"}),i(t),i(n),t=p(!0),n=p()}else t=n=i(t);e.startContainer=t.parentNode?t.parentNode:t,e.startOffset=u.nodeIndex(t),e.endContainer=n.parentNode?n.parentNode:n,e.endOffset=u.nodeIndex(n)+1}Lc(u,e,function(e){fy(e,function(e){g(e),jo.isElement(e)&&"underline"===s.dom.getStyle(e,"text-decoration")&&e.parentNode&&"underline"===wc.getTextDecoration(u,e.parentNode)&&yy(s,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,e)})})};if(e)e.nodeType?((n=u.createRng()).setStartBefore(e),n.setEndAfter(e),o(n)):o(e);else if("false"!==u.getContentEditable(r.getNode()))r.isCollapsed()&&m.inline&&!u.select("td[data-mce-selected],th[data-mce-selected]").length?function(e,t,n,r){var o,i,a,u,s,c,l,f=e.dom,d=e.selection,m=[],g=d.getRng();for(o=g.startContainer,i=g.startOffset,3===(s=o).nodeType&&(i!==o.nodeValue.length&&(u=!0),s=s.parentNode);s;){if(Mm.matchNode(e,s,t,n,r)){c=s;break}s.nextSibling&&(u=!0),m.push(s),s=s.parentNode}if(c)if(u){a=d.getBookmark(),g.collapse(!0);var p=Pc(e,g,e.formatter.get(t),!0);p=Um(p),e.formatter.remove(t,n,p),d.moveToBookmark(a)}else{l=Qu(e.getBody(),c);var h=$m(!1).dom(),v=Gm(m,h);Xm(e,h,l||c),Wm(e,l,!1),d.setCursorLocation(v,1),f.isEmpty(c)&&f.remove(c)}}(s,c,l,f):(t=Yu.getPersistentBookmark(s.selection,!0),o(r.getRng()),r.moveToBookmark(t),m.inline&&Mm.match(s,c,l,r.getStart())&&wc.moveStart(u,r,r.getRng()),s.nodeChanged());else{e=r.getNode();for(var h=0,v=d.length;h<v&&(!d[h].ceFalseOverride||!yy(s,d[h],l,e,e));h++);}},xy=Xt.each,wy=function(e){return e&&1===e.nodeType&&!yc(e)&&!Ju(e)&&!jo.isBogus(e)},Ny=function(e,t){var n;for(n=e;n;n=n[t]){if(3===n.nodeType&&0!==n.nodeValue.length)return e;if(1===n.nodeType&&!yc(n))return n}return e},Ey=function(e,t,n){var r,o,i=new el(e);if(t&&n&&(t=Ny(t,"previousSibling"),n=Ny(n,"nextSibling"),i.compare(t,n))){for(r=t.nextSibling;r&&r!==n;)r=(o=r).nextSibling,t.appendChild(o);return e.remove(n),Xt.each(Xt.grep(n.childNodes),function(e){t.appendChild(e)}),t}return n},Sy=function(e,t,n){xy(e.childNodes,function(e){wy(e)&&(t(e)&&n(e),e.hasChildNodes()&&Sy(e,t,n))})},Ty=function(n,e){return d(function(e,t){return!(!t||!wc.getStyle(n,t,e))},e)},ky=function(r,e,t){return d(function(e,t,n){r.setStyle(n,e,t),""===n.getAttribute("style")&&n.removeAttribute("style"),_y(r,n)},e,t)},_y=function(e,t){"SPAN"===t.nodeName&&0===e.getAttribs(t).length&&e.remove(t,!0)},Ay=function(e,t){var n;1===t.nodeType&&t.parentNode&&1===t.parentNode.nodeType&&(n=wc.getTextDecoration(e,t.parentNode),e.getStyle(t,"color")&&n?e.setStyle(t,"text-decoration",n):e.getStyle(t,"text-decoration")===n&&e.setStyle(t,"text-decoration",null))},Ry=function(n,e,r,o){xy(e,function(t){xy(n.dom.select(t.inline,o),function(e){wy(e)&&by(n,t,r,e,t.exact?e:null)}),function(r,e,t){if(e.clear_child_styles){var n=e.links?"*:not(a)":"*";xy(r.select(n,t),function(n){wy(n)&&xy(e.styles,function(e,t){r.setStyle(n,t,"")})})}}(n.dom,t,o)})},Dy=function(e,t,n,r){(t.styles.color||t.styles.textDecoration)&&(Xt.walk(r,d(Ay,e),"childNodes"),Ay(e,r))},Oy=function(e,t,n,r){t.styles&&t.styles.backgroundColor&&Sy(r,Ty(e,"fontSize"),ky(e,"backgroundColor",wc.replaceVars(t.styles.backgroundColor,n)))},By=function(e,t,n,r){"sub"!==t.inline&&"sup"!==t.inline||(Sy(r,Ty(e,"fontSize"),ky(e,"fontSize","")),e.remove(e.select("sup"===t.inline?"sub":"sup",r),!0))},Py=function(e,t,n,r){r&&!1!==t.merge_siblings&&(r=Ey(e,wc.getNonWhiteSpaceSibling(r),r),r=Ey(e,r,wc.getNonWhiteSpaceSibling(r,!0)))},Iy=function(t,n,r,o,i){Mm.matchNode(t,i.parentNode,r,o)&&by(t,n,o,i)||n.merge_with_parents&&t.dom.getParent(i.parentNode,function(e){if(Mm.matchNode(t,e,r,o))return by(t,n,o,i),!0})},Ly=Xt.each,Fy=function(g,p,h,r){var e,t,v=g.formatter.get(p),y=v[0],o=!r&&g.selection.isCollapsed(),i=g.dom,n=g.selection,b=function(n,e){if(e=e||y,n){if(e.onformat&&e.onformat(n,e,h,r),Ly(e.styles,function(e,t){i.setStyle(n,t,wc.replaceVars(e,h))}),e.styles){var t=i.getAttrib(n,"style");t&&n.setAttribute("data-mce-style",t)}Ly(e.attributes,function(e,t){i.setAttrib(n,t,wc.replaceVars(e,h))}),Ly(e.classes,function(e){e=wc.replaceVars(e,h),i.hasClass(n,e)||i.addClass(n,e)})}},C=function(e,t){var n=!1;return!!y.selector&&(Ly(e,function(e){if(!("collapsed"in e&&e.collapsed!==o))return i.is(t,e.selector)&&!Ju(t)?(b(t,e),!(n=!0)):void 0}),n)},a=function(s,e,t,c){var l,f,d=[],m=!0;l=y.inline||y.block,f=s.create(l),b(f),Lc(s,e,function(e){var a,u=function(e){var t,n,r,o;if(o=m,t=e.nodeName.toLowerCase(),n=e.parentNode.nodeName.toLowerCase(),1===e.nodeType&&s.getContentEditable(e)&&(o=m,m="true"===s.getContentEditable(e),r=!0),wc.isEq(t,"br"))return a=0,void(y.block&&s.remove(e));if(y.wrapper&&Mm.matchNode(g,e,p,h))a=0;else{if(m&&!r&&y.block&&!y.wrapper&&wc.isTextBlock(g,t)&&wc.isValid(g,n,l))return e=s.rename(e,l),b(e),d.push(e),void(a=0);if(y.selector){var i=C(v,e);if(!y.inline||i)return void(a=0)}!m||r||!wc.isValid(g,l,t)||!wc.isValid(g,n,l)||!c&&3===e.nodeType&&1===e.nodeValue.length&&65279===e.nodeValue.charCodeAt(0)||Ju(e)||y.inline&&s.isBlock(e)?(a=0,Ly(Xt.grep(e.childNodes),u),r&&(m=o),a=0):(a||(a=s.clone(f,!1),e.parentNode.insertBefore(a,e),d.push(a)),a.appendChild(e))}};Ly(e,u)}),!0===y.links&&Ly(d,function(e){var t=function(e){"A"===e.nodeName&&b(e,y),Ly(Xt.grep(e.childNodes),t)};t(e)}),Ly(d,function(e){var t,n,r,o,i,a=function(e){var n=!1;return Ly(e.childNodes,function(e){if((t=e)&&1===t.nodeType&&!yc(t)&&!Ju(t)&&!jo.isBogus(t))return n=e,!1;var t}),n};n=0,Ly(e.childNodes,function(e){wc.isWhiteSpaceNode(e)||yc(e)||n++}),t=n,!(1<d.length)&&s.isBlock(e)||0!==t?(y.inline||y.wrapper)&&(y.exact||1!==t||((o=a(r=e))&&!yc(o)&&Mm.matchName(s,o,y)&&(i=s.clone(o,!1),b(i),s.replace(i,r,!0),s.remove(o,1)),e=i||r),Ry(g,v,h,e),Iy(g,y,p,h,e),Oy(s,y,h,e),By(s,y,h,e),Py(s,y,h,e)):s.remove(e,1)})};if("false"!==i.getContentEditable(n.getNode())){if(y){if(r)r.nodeType?C(v,r)||((t=i.createRng()).setStartBefore(r),t.setEndAfter(r),a(i,Pc(g,t,v),0,!0)):a(i,r,0,!0);else if(o&&y.inline&&!i.select("td[data-mce-selected],th[data-mce-selected]").length)!function(e,t,n){var r,o,i,a,u,s,c=e.selection;a=(r=c.getRng(!0)).startOffset,s=r.startContainer.nodeValue,(o=Qu(e.getBody(),c.getStart()))&&(i=qm(o));var l,f,d=/[^\s\u00a0\u00ad\u200b\ufeff]/;s&&0<a&&a<s.length&&d.test(s.charAt(a))&&d.test(s.charAt(a-1))?(u=c.getBookmark(),r.collapse(!0),r=Pc(e,r,e.formatter.get(t)),r=Um(r),e.formatter.apply(t,n,r),c.moveToBookmark(u)):(o&&i.nodeValue===jm||(l=e.getDoc(),f=$m(!0).dom(),i=(o=l.importNode(f,!0)).firstChild,r.insertNode(o),a=1),e.formatter.apply(t,n,o),c.setCursorLocation(i,a))}(g,p,h);else{var u=g.selection.getNode();g.settings.forced_root_block||!v[0].defaultBlock||i.getParent(u,i.isBlock)||Fy(g,v[0].defaultBlock),g.selection.setRng(cl(g.selection.getRng())),e=Yu.getPersistentBookmark(g.selection,!0),a(i,Pc(g,n.getRng(),v)),y.styles&&Dy(i,y,h,u),n.moveToBookmark(e),wc.moveStart(i,n,n.getRng()),g.nodeChanged()}cy(p,g)}}else{r=n.getNode();for(var s=0,c=v.length;s<c;s++)if(v[s].ceFalseOverride&&i.is(r,v[s].selector))return void b(r,v[s])}},My={applyFormat:Fy},zy=Xt.each,Uy=function(e,t,n,r,o){var i,a,u,s,c,l,f,d;null===t.get()&&(a=e,u={},(i=t).set({}),a.on("NodeChange",function(n){var r=wc.getParents(a.dom,n.element),o={};r=Xt.grep(r,function(e){return 1===e.nodeType&&!e.getAttribute("data-mce-bogus")}),zy(i.get(),function(e,n){zy(r,function(t){return a.formatter.matchNode(t,n,{},e.similar)?(u[n]||(zy(e,function(e){e(!0,{node:t,format:n,parents:r})}),u[n]=e),o[n]=e,!1):!Mm.matchesUnInheritedFormatSelector(a,t,n)&&void 0})}),zy(u,function(e,t){o[t]||(delete u[t],zy(e,function(e){e(!1,{node:n.element,format:t,parents:r})}))})})),c=n,l=r,f=o,d=(s=t).get(),zy(c.split(","),function(e){d[e]||(d[e]=[],d[e].similar=f),d[e].push(l)}),s.set(d)},jy={get:function(r){var t={valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,preview:!1,defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"left"},preview:"font-family font-size"}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"right"},preview:"font-family font-size"}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div",preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},fontname:{inline:"span",toggle:!1,styles:{fontFamily:"%value"},clear_child_styles:!0},fontsize:{inline:"span",toggle:!1,styles:{fontSize:"%value"},clear_child_styles:!0},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(){return!0},onformat:function(n,e,t){Xt.each(t,function(e,t){r.setAttrib(n,t,e)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]};return Xt.each("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(e){t[e]={block:e,remove:"all"}}),t}},Vy=Xt.each,Hy=Si.DOM,qy=function(e,t){var n,o,r,m=t&&t.schema||di({}),g=function(e){var t,n,r;return o="string"==typeof e?{name:e,classes:[],attrs:{}}:e,t=Hy.create(o.name),n=t,(r=o).classes.length&&Hy.addClass(n,r.classes.join(" ")),Hy.setAttribs(n,r.attrs),t},p=function(n,e,t){var r,o,i,a,u,s,c,l,f=0<e.length&&e[0],d=f&&f.name;if(u=d,s="string"!=typeof(a=n)?a.nodeName.toLowerCase():a,c=m.getElementRule(s),i=!(!(l=c&&c.parentsRequired)||!l.length)&&(u&&-1!==Xt.inArray(l,u)?u:l[0]))d===i?(o=e[0],e=e.slice(1)):o=i;else if(f)o=e[0],e=e.slice(1);else if(!t)return n;return o&&(r=g(o)).appendChild(n),t&&(r||(r=Hy.create("div")).appendChild(n),Xt.each(t,function(e){var t=g(e);r.insertBefore(t,n)})),p(r,e,o&&o.siblings)};return e&&e.length?(o=e[0],n=g(o),(r=Hy.create("div")).appendChild(p(n,e.slice(1),o.siblings)),r):""},$y=function(e){var t,a={classes:[],attrs:{}};return"*"!==(e=a.selector=Xt.trim(e))&&(t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,function(e,t,n,r,o){switch(t){case"#":a.attrs.id=n;break;case".":a.classes.push(n);break;case":":-1!==Xt.inArray("checked disabled enabled read-only required".split(" "),n)&&(a.attrs[n]=n)}if("["===r){var i=o.match(/([\w\-]+)(?:\=\"([^\"]+))?/);i&&(a.attrs[i[1]]=i[2])}return""})),a.name=t||"div",a},Wy=function(e){return e&&"string"==typeof e?(e=(e=e.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),Xt.map(e.split(/(?:>|\s+(?![^\[\]]+\]))/),function(e){var t=Xt.map(e.split(/(?:~\+|~|\+)/),$y),n=t.pop();return t.length&&(n.siblings=t),n}).reverse()):[]},Ky=function(n,e){var t,r,o,i,a,u,s="";if(!1===(u=n.settings.preview_styles))return"";"string"!=typeof u&&(u="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow");var c=function(e){return e.replace(/%(\w+)/g,"")};if("string"==typeof e){if(!(e=n.formatter.get(e)))return;e=e[0]}return"preview"in e&&!1===(u=e.preview)?"":(t=e.block||e.inline||"span",(i=Wy(e.selector)).length?(i[0].name||(i[0].name=t),t=e.selector,r=qy(i,n)):r=qy([t],n),o=Hy.select(t,r)[0]||r.firstChild,Vy(e.styles,function(e,t){(e=c(e))&&Hy.setStyle(o,t,e)}),Vy(e.attributes,function(e,t){(e=c(e))&&Hy.setAttrib(o,t,e)}),Vy(e.classes,function(e){e=c(e),Hy.hasClass(o,e)||Hy.addClass(o,e)}),n.fire("PreviewFormats"),Hy.setStyles(r,{position:"absolute",left:-65535}),n.getBody().appendChild(r),a=Hy.getStyle(n.getBody(),"fontSize",!0),a=/px$/.test(a)?parseInt(a,10):0,Vy(u.split(" "),function(e){var t=Hy.getStyle(o,e,!0);if(!("background-color"===e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)&&(t=Hy.getStyle(n.getBody(),e,!0),"#ffffff"===Hy.toHex(t).toLowerCase())||"color"===e&&"#000000"===Hy.toHex(t).toLowerCase())){if("font-size"===e&&/em|%$/.test(t)){if(0===a)return;t=parseFloat(t)/(/%$/.test(t)?100:1)*a+"px"}"border"===e&&t&&(s+="padding:0 2px;"),s+=e+":"+t+";"}}),n.fire("AfterPreviewFormats"),Hy.remove(r),s)},Xy=function(e,t,n,r,o){var i=t.get(n);!Mm.match(e,n,r,o)||"toggle"in i[0]&&!i[0].toggle?My.applyFormat(e,n,r,o):Cy(e,n,r,o)},Yy=function(e){e.addShortcut("meta+b","","Bold"),e.addShortcut("meta+i","","Italic"),e.addShortcut("meta+u","","Underline");for(var t=1;t<=6;t++)e.addShortcut("access+"+t,"",["FormatBlock",!1,"h"+t]);e.addShortcut("access+7","",["FormatBlock",!1,"p"]),e.addShortcut("access+8","",["FormatBlock",!1,"div"]),e.addShortcut("access+9","",["FormatBlock",!1,"address"])};function Gy(e){var t,n,r,o=(t=e,n={},(r=function(e,t){e&&("string"!=typeof e?Xt.each(e,function(e,t){r(t,e)}):(t=t.length?t:[t],Xt.each(t,function(e){"undefined"==typeof e.deep&&(e.deep=!e.selector),"undefined"==typeof e.split&&(e.split=!e.selector||e.inline),"undefined"==typeof e.remove&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))}),n[e]=t))})(jy.get(t.dom)),r(t.settings.formats),{get:function(e){return e?n[e]:n},register:r,unregister:function(e){return e&&n[e]&&delete n[e],n}}),i=Hi(null);return Yy(e),Jm(e),{get:o.get,register:o.register,unregister:o.unregister,apply:d(My.applyFormat,e),remove:d(Cy,e),toggle:d(Xy,e,o),match:d(Mm.match,e),matchAll:d(Mm.matchAll,e),matchNode:d(Mm.matchNode,e),canApply:d(Mm.canApply,e),formatChanged:d(Uy,e,i),getCssText:d(Ky,e)}}var Jy,Qy=Object.prototype.hasOwnProperty,Zy=(Jy=function(e,t){return t},function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var o=e[r];for(var i in o)Qy.call(o,i)&&(n[i]=Jy(n[i],o[i]))}return n}),eb={register:function(t,s,c){t.addAttributeFilter("data-mce-tabindex",function(e,t){for(var n,r=e.length;r--;)(n=e[r]).attr("tabindex",n.attributes.map["data-mce-tabindex"]),n.attr(t,null)}),t.addAttributeFilter("src,href,style",function(e,t){for(var n,r,o=e.length,i="data-mce-"+t,a=s.url_converter,u=s.url_converter_scope;o--;)(r=(n=e[o]).attributes.map[i])!==undefined?(n.attr(t,0<r.length?r:null),n.attr(i,null)):(r=n.attributes.map[t],"style"===t?r=c.serializeStyle(c.parseStyle(r),n.name):a&&(r=a.call(u,r,t,n.name)),n.attr(t,0<r.length?r:null))}),t.addAttributeFilter("class",function(e){for(var t,n,r=e.length;r--;)(n=(t=e[r]).attr("class"))&&(n=t.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),t.attr("class",0<n.length?n:null))}),t.addAttributeFilter("data-mce-type",function(e,t,n){for(var r,o=e.length;o--;)"bookmark"!==(r=e[o]).attributes.map["data-mce-type"]||n.cleanup||(_.from(r.firstChild).exists(function(e){return!Ca(e.value)})?r.unwrap():r.remove())}),t.addNodeFilter("noscript",function(e){for(var t,n=e.length;n--;)(t=e[n].firstChild)&&(t.value=ti.decode(t.value))}),t.addNodeFilter("script,style",function(e,t){for(var n,r,o,i=e.length,a=function(e){return e.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")};i--;)r=(n=e[i]).firstChild?n.firstChild.value:"","script"===t?((o=n.attr("type"))&&n.attr("type","mce-no/type"===o?null:o.replace(/^mce\-/,"")),"xhtml"===s.element_format&&0<r.length&&(n.firstChild.value="// <![CDATA[\n"+a(r)+"\n// ]]>")):"xhtml"===s.element_format&&0<r.length&&(n.firstChild.value="\x3c!--\n"+a(r)+"\n--\x3e")}),t.addNodeFilter("#comment",function(e){for(var t,n=e.length;n--;)0===(t=e[n]).value.indexOf("[CDATA[")?(t.name="#cdata",t.type=4,t.value=t.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===t.value.indexOf("mce:protected ")&&(t.name="#text",t.type=3,t.raw=!0,t.value=unescape(t.value).substr(14))}),t.addNodeFilter("xml:namespace,input",function(e,t){for(var n,r=e.length;r--;)7===(n=e[r]).type?n.remove():1===n.type&&("input"!==t||"type"in n.attributes.map||n.attr("type","text"))}),t.addAttributeFilter("data-mce-type",function(e){z(e,function(e){"format-caret"===e.attr("data-mce-type")&&(e.isEmpty(t.schema.getNonEmptyElements())?e.remove():e.unwrap())})}),t.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)})},trimTrailingBr:function(e){var t,n,r=function(e){return e&&"br"===e.name};r(t=e.lastChild)&&r(n=t.prev)&&(t.remove(),n.remove())}},tb={process:function(e,t,n){return f=n,(l=e)&&l.hasEventListeners("PreProcess")&&!f.no_events?(o=t,i=n,c=(r=e).dom,o=o.cloneNode(!0),(a=V.document.implementation).createHTMLDocument&&(u=a.createHTMLDocument(""),Xt.each("BODY"===o.nodeName?o.childNodes:[o],function(e){u.body.appendChild(u.importNode(e,!0))}),o="BODY"!==o.nodeName?u.body.firstChild:u.body,s=c.doc,c.doc=u),xp(r,Zy(i,{node:o})),s&&(c.doc=s),o):t;var r,o,i,a,u,s,c,l,f}},nb=function(e,a,u){e.addNodeFilter("font",function(e){z(e,function(e){var t,n=a.parse(e.attr("style")),r=e.attr("color"),o=e.attr("face"),i=e.attr("size");r&&(n.color=r),o&&(n["font-family"]=o),i&&(n["font-size"]=u[parseInt(e.attr("size"),10)-1]),e.name="span",e.attr("style",a.serialize(n)),t=e,z(["color","face","size"],function(e){t.attr(e,null)})})})},rb=function(e,t){var n,r=gi();t.convert_fonts_to_spans&&nb(e,r,Xt.explode(t.font_size_legacy_values)),n=r,e.addNodeFilter("strike",function(e){z(e,function(e){var t=n.parse(e.attr("style"));t["text-decoration"]="line-through",e.name="span",e.attr("style",n.serialize(t))})})},ob={register:function(e,t){t.inline_styles&&rb(e,t)}},ib=/^[ \t\r\n]*$/,ab={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},ub=function(e,t,n){var r,o,i=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[i])return e[i];if(e!==t){if(r=e[a])return r;for(o=e.parent;o&&o!==t;o=o.parent)if(r=o[a])return r}},sb=function(){function a(e,t){this.name=e,1===(this.type=t)&&(this.attributes=[],this.attributes.map={})}return a.create=function(e,t){var n,r;if(n=new a(e,ab[e]||1),t)for(r in t)n.attr(r,t[r]);return n},a.prototype.replace=function(e){return e.parent&&e.remove(),this.insert(e,this),this.remove(),this},a.prototype.attr=function(e,t){var n,r;if("string"!=typeof e){for(r in e)this.attr(r,e[r]);return this}if(n=this.attributes){if(t!==undefined){if(null===t){if(e in n.map)for(delete n.map[e],r=n.length;r--;)if(n[r].name===e)return n=n.splice(r,1),this;return this}if(e in n.map){for(r=n.length;r--;)if(n[r].name===e){n[r].value=t;break}}else n.push({name:e,value:t});return n.map[e]=t,this}return n.map[e]}},a.prototype.clone=function(){var e,t,n,r,o,i=new a(this.name,this.type);if(n=this.attributes){for((o=[]).map={},e=0,t=n.length;e<t;e++)"id"!==(r=n[e]).name&&(o[o.length]={name:r.name,value:r.value},o.map[r.name]=r.value);i.attributes=o}return i.value=this.value,i.shortEnded=this.shortEnded,i},a.prototype.wrap=function(e){return this.parent.insert(e,this),e.append(this),this},a.prototype.unwrap=function(){var e,t;for(e=this.firstChild;e;)t=e.next,this.insert(e,this,!0),e=t;this.remove()},a.prototype.remove=function(){var e=this.parent,t=this.next,n=this.prev;return e&&(e.firstChild===this?(e.firstChild=t)&&(t.prev=null):n.next=t,e.lastChild===this?(e.lastChild=n)&&(n.next=null):t.prev=n,this.parent=this.next=this.prev=null),this},a.prototype.append=function(e){var t;return e.parent&&e.remove(),(t=this.lastChild)?((t.next=e).prev=t,this.lastChild=e):this.lastChild=this.firstChild=e,e.parent=this,e},a.prototype.insert=function(e,t,n){var r;return e.parent&&e.remove(),r=t.parent||this,n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,(e.next=t).prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,(e.prev=t).next=e),e.parent=r,e},a.prototype.getAll=function(e){var t,n=[];for(t=this.firstChild;t;t=ub(t,this))t.name===e&&n.push(t);return n},a.prototype.empty=function(){var e,t,n;if(this.firstChild){for(e=[],n=this.firstChild;n;n=ub(n,this))e.push(n);for(t=e.length;t--;)(n=e[t]).parent=n.firstChild=n.lastChild=n.next=n.prev=null}return this.firstChild=this.lastChild=null,this},a.prototype.isEmpty=function(e,t,n){var r,o,i=this.firstChild;if(t=t||{},i)do{if(1===i.type){if(i.attributes.map["data-mce-bogus"])continue;if(e[i.name])return!1;for(r=i.attributes.length;r--;)if("name"===(o=i.attributes[r].name)||0===o.indexOf("data-mce-bookmark"))return!1}if(8===i.type)return!1;if(3===i.type&&!ib.test(i.value))return!1;if(3===i.type&&i.parent&&t[i.parent.name]&&ib.test(i.value))return!1;if(n&&n(i))return!1}while(i=ub(i,this));return!0},a.prototype.walk=function(e){return ub(this,null,e)},a}(),cb=function(e,t,n,r){(e.padd_empty_with_br||t.insert)&&n[r.name]?r.empty().append(new sb("br",1)).shortEnded=!0:r.empty().append(new sb("#text",3)).value="\xa0"},lb=function(e){return fb(e,"#text")&&"\xa0"===e.firstChild.value},fb=function(e,t){return e&&e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.name===t},db=function(r,e,t,n){return n.isEmpty(e,t,function(e){return t=e,(n=r.getElementRule(t.name))&&n.paddEmpty;var t,n})},mb=function(e,t){return e&&(t[e.name]||"br"===e.name)},gb=function(e,p){var h=e.schema;p.remove_trailing_brs&&e.addNodeFilter("br",function(e,t,n){var r,o,i,a,u,s,c,l,f=e.length,d=Xt.extend({},h.getBlockElements()),m=h.getNonEmptyElements(),g=h.getWhiteSpaceElements();for(d.body=1,r=0;r<f;r++)if(i=(o=e[r]).parent,d[o.parent.name]&&o===i.lastChild){for(u=o.prev;u;){if("span"!==(s=u.name)||"bookmark"!==u.attr("data-mce-type")){if("br"!==s)break;if("br"===s){o=null;break}}u=u.prev}o&&(o.remove(),db(h,m,g,i)&&(c=h.getElementRule(i.name))&&(c.removeEmpty?i.remove():c.paddEmpty&&cb(p,n,d,i)))}else{for(a=o;i&&i.firstChild===a&&i.lastChild===a&&!d[(a=i).name];)i=i.parent;a===i&&!0!==p.padd_empty_with_br&&((l=new sb("#text",3)).value="\xa0",o.replace(l))}}),e.addAttributeFilter("href",function(e){var t,n,r,o=e.length;if(!p.allow_unsafe_link_target)for(;o--;)"a"===(t=e[o]).name&&"_blank"===t.attr("target")&&t.attr("rel",(n=t.attr("rel"),r=n?Xt.trim(n):"",/\b(noopener)\b/g.test(r)?r:r.split(" ").filter(function(e){return 0<e.length}).concat(["noopener"]).sort().join(" ")))}),p.allow_html_in_named_anchor||e.addAttributeFilter("id,name",function(e){for(var t,n,r,o,i=e.length;i--;)if("a"===(o=e[i]).name&&o.firstChild&&!o.attr("href"))for(r=o.parent,t=o.lastChild;n=t.prev,r.insert(t,o),t=n;);}),p.fix_list_elements&&e.addNodeFilter("ul,ol",function(e){for(var t,n,r=e.length;r--;)if("ul"===(n=(t=e[r]).parent).name||"ol"===n.name)if(t.prev&&"li"===t.prev.name)t.prev.append(t);else{var o=new sb("li",1);o.attr("style","list-style-type: none"),t.wrap(o)}}),p.validate&&h.getValidClasses()&&e.addAttributeFilter("class",function(e){for(var t,n,r,o,i,a,u,s=e.length,c=h.getValidClasses();s--;){for(n=(t=e[s]).attr("class").split(" "),i="",r=0;r<n.length;r++)o=n[r],u=!1,(a=c["*"])&&a[o]&&(u=!0),a=c[t.name],!u&&a&&a[o]&&(u=!0),u&&(i&&(i+=" "),i+=o);i.length||(i=null),t.attr("class",i)}})},pb=Xt.makeMap,hb=Xt.each,vb=Xt.explode,yb=Xt.extend;function bb(T,k){void 0===k&&(k=di());var _={},A=[],R={},D={};(T=T||{}).validate=!("validate"in T)||T.validate,T.root_name=T.root_name||"body";var O=function(e){var t,n,r;(n=e.name)in _&&((r=R[n])?r.push(e):R[n]=[e]),t=A.length;for(;t--;)(n=A[t].name)in e.attributes.map&&((r=D[n])?r.push(e):D[n]=[e]);return e},e={schema:k,addAttributeFilter:function(e,n){hb(vb(e),function(e){var t;for(t=0;t<A.length;t++)if(A[t].name===e)return void A[t].callbacks.push(n);A.push({name:e,callbacks:[n]})})},getAttributeFilters:function(){return[].concat(A)},addNodeFilter:function(e,n){hb(vb(e),function(e){var t=_[e];t||(_[e]=t=[]),t.push(n)})},getNodeFilters:function(){var e=[];for(var t in _)_.hasOwnProperty(t)&&e.push({name:t,callbacks:_[t]});return e},filterNode:O,parse:function(e,a){var t,n,r,o,i,u,s,c,l,f,d,m=[];a=a||{},R={},D={},l=yb(pb("script,style,head,html,body,title,meta,param"),k.getBlockElements());var g=k.getNonEmptyElements(),p=k.children,h=T.validate,v="forced_root_block"in a?a.forced_root_block:T.forced_root_block,y=k.getWhiteSpaceElements(),b=/^[ \t\r\n]+/,C=/[ \t\r\n]+$/,x=/[ \t\r\n]+/g,w=/^[ \t\r\n]+$/;f=y.hasOwnProperty(a.context)||y.hasOwnProperty(T.root_name);var N=function(e,t){var n,r=new sb(e,t);return e in _&&((n=R[e])?n.push(r):R[e]=[r]),r},E=function(e){var t,n,r,o,i=k.getBlockElements();for(t=e.prev;t&&3===t.type;){if(0<(r=t.value.replace(C,"")).length)return void(t.value=r);if(n=t.next){if(3===n.type&&n.value.length){t=t.prev;continue}if(!i[n.name]&&"script"!==n.name&&"style"!==n.name){t=t.prev;continue}}o=t.prev,t.remove(),t=o}};t=Mv({validate:h,allow_script_urls:T.allow_script_urls,allow_conditional_comments:T.allow_conditional_comments,self_closing_elements:function(e){var t,n={};for(t in e)"li"!==t&&"p"!==t&&(n[t]=e[t]);return n}(k.getSelfClosingElements()),cdata:function(e){d.append(N("#cdata",4)).value=e},text:function(e,t){var n;f||(e=e.replace(x," "),mb(d.lastChild,l)&&(e=e.replace(b,""))),0!==e.length&&((n=N("#text",3)).raw=!!t,d.append(n).value=e)},comment:function(e){d.append(N("#comment",8)).value=e},pi:function(e,t){d.append(N(e,7)).value=t,E(d)},doctype:function(e){d.append(N("#doctype",10)).value=e,E(d)},start:function(e,t,n){var r,o,i,a,u;if(i=h?k.getElementRule(e):{}){for((r=N(i.outputName||e,1)).attributes=t,r.shortEnded=n,d.append(r),(u=p[d.name])&&p[r.name]&&!u[r.name]&&m.push(r),o=A.length;o--;)(a=A[o].name)in t.map&&((s=D[a])?s.push(r):D[a]=[r]);l[e]&&E(r),n||(d=r),!f&&y[e]&&(f=!0)}},end:function(e){var t,n,r,o,i;if(n=h?k.getElementRule(e):{}){if(l[e]&&!f){if((t=d.firstChild)&&3===t.type)if(0<(r=t.value.replace(b,"")).length)t.value=r,t=t.next;else for(o=t.next,t.remove(),t=o;t&&3===t.type;)r=t.value,o=t.next,(0===r.length||w.test(r))&&(t.remove(),t=o),t=o;if((t=d.lastChild)&&3===t.type)if(0<(r=t.value.replace(C,"")).length)t.value=r,t=t.prev;else for(o=t.prev,t.remove(),t=o;t&&3===t.type;)r=t.value,o=t.prev,(0===r.length||w.test(r))&&(t.remove(),t=o),t=o}if(f&&y[e]&&(f=!1),n.removeEmpty&&db(k,g,y,d)&&!d.attributes.map.name&&!d.attr("id"))return i=d.parent,l[d.name]?d.empty().remove():d.unwrap(),void(d=i);n.paddEmpty&&(lb(d)||db(k,g,y,d))&&cb(T,a,l,d),d=d.parent}}},k);var S=d=new sb(a.context||T.root_name,11);if(t.parse(e),h&&m.length&&(a.context?a.invalid=!0:function(e){var t,n,r,o,i,a,u,s,c,l,f,d,m,g,p,h;for(d=pb("tr,td,th,tbody,thead,tfoot,table"),l=k.getNonEmptyElements(),f=k.getWhiteSpaceElements(),m=k.getTextBlockElements(),g=k.getSpecialElements(),t=0;t<e.length;t++)if((n=e[t]).parent&&!n.fixed)if(m[n.name]&&"li"===n.parent.name){for(p=n.next;p&&m[p.name];)p.name="li",p.fixed=!0,n.parent.insert(p,n.parent),p=p.next;n.unwrap(n)}else{for(o=[n],r=n.parent;r&&!k.isValidChild(r.name,n.name)&&!d[r.name];r=r.parent)o.push(r);if(r&&1<o.length){for(o.reverse(),i=a=O(o[0].clone()),c=0;c<o.length-1;c++){for(k.isValidChild(a.name,o[c].name)?(u=O(o[c].clone()),a.append(u)):u=a,s=o[c].firstChild;s&&s!==o[c+1];)h=s.next,u.append(s),s=h;a=u}db(k,l,f,i)?r.insert(n,o[0],!0):(r.insert(i,o[0],!0),r.insert(n,i)),r=o[0],(db(k,l,f,r)||fb(r,"br"))&&r.empty().remove()}else if(n.parent){if("li"===n.name){if((p=n.prev)&&("ul"===p.name||"ul"===p.name)){p.append(n);continue}if((p=n.next)&&("ul"===p.name||"ul"===p.name)){p.insert(n,p.firstChild,!0);continue}n.wrap(O(new sb("ul",1)));continue}k.isValidChild(n.parent.name,"div")&&k.isValidChild("div",n.name)?n.wrap(O(new sb("div",1))):g[n.name]?n.empty().remove():n.unwrap()}}}(m)),v&&("body"===S.name||a.isRootContent)&&function(){var e,t,n=S.firstChild,r=function(e){e&&((n=e.firstChild)&&3===n.type&&(n.value=n.value.replace(b,"")),(n=e.lastChild)&&3===n.type&&(n.value=n.value.replace(C,"")))};if(k.isValidChild(S.name,v.toLowerCase())){for(;n;)e=n.next,3===n.type||1===n.type&&"p"!==n.name&&!l[n.name]&&!n.attr("data-mce-type")?(t||((t=N(v,1)).attr(T.forced_root_block_attrs),S.insert(t,n)),t.append(n)):(r(t),t=null),n=e;r(t)}}(),!a.invalid){for(c in R){for(s=_[c],i=(n=R[c]).length;i--;)n[i].parent||n.splice(i,1);for(r=0,o=s.length;r<o;r++)s[r](n,c,a)}for(r=0,o=A.length;r<o;r++)if((s=A[r]).name in D){for(i=(n=D[s.name]).length;i--;)n[i].parent||n.splice(i,1);for(i=0,u=s.callbacks.length;i<u;i++)s.callbacks[i](n,s.name,a)}}return S}};return gb(e,T),ob.register(e,T),e}var Cb=function(e,t,n){-1===Xt.inArray(t,n)&&(e.addAttributeFilter(n,function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),t.push(n))},xb=function(e,t,n){var r=wa(n.getInner?t.innerHTML:e.getOuterHTML(t));return n.selection||Ao(ar.fromDom(t))?r:Xt.trim(r)},wb=function(e,t,n){var r=n.selection?Zy({forced_root_block:!1},n):n,o=e.parse(t,r);return eb.trimTrailingBr(o),o},Nb=function(e,t,n,r,o){var i,a,u,s,c=(i=r,al(t,n).serialize(i));return a=e,s=c,!(u=o).no_events&&a?wp(a,Zy(u,{content:s})).content:s};function Eb(e,t){var a,u,s,c,l,n,r=(a=e,n=["data-mce-selected"],s=(u=t)&&u.dom?u.dom:Si.DOM,c=u&&u.schema?u.schema:di(a),a.entity_encoding=a.entity_encoding||"named",a.remove_trailing_brs=!("remove_trailing_brs"in a)||a.remove_trailing_brs,l=bb(a,c),eb.register(l,a,s),{schema:c,addNodeFilter:l.addNodeFilter,addAttributeFilter:l.addAttributeFilter,serialize:function(e,t){var n=Zy({format:"html"},t||{}),r=tb.process(u,e,n),o=xb(s,r,n),i=wb(l,o,n);return"tree"===n.format?i:Nb(u,a,c,i,n)},addRules:function(e){c.addValidElements(e)},setRules:function(e){c.setValidElements(e)},addTempAttr:d(Cb,l,n),getTempAttrs:function(){return n}});return{schema:r.schema,addNodeFilter:r.addNodeFilter,addAttributeFilter:r.addAttributeFilter,serialize:r.serialize,addRules:r.addRules,setRules:r.setRules,addTempAttr:r.addTempAttr,getTempAttrs:r.getTempAttrs}}function Sb(e){return{getBookmark:d(hc,e),moveToBookmark:d(vc,e)}}(Sb||(Sb={})).isBookmarkNode=yc;var Tb,kb,_b=Sb,Ab=jo.isContentEditableFalse,Rb=jo.isContentEditableTrue,Db=function(r,a){var u,s,c,l,f,d,m,g,p,h,v,y,i,b,C,x,w,N=a.dom,E=Xt.each,S=a.getDoc(),T=V.document,k=Math.abs,_=Math.round,A=a.getBody();l={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var e=".mce-content-body";a.contentStyles.push(e+" div.mce-resizehandle {position: absolute;border: 1px solid black;box-sizing: content-box;background: #FFF;width: 7px;height: 7px;z-index: 10000}"+e+" .mce-resizehandle:hover {background: #000}"+e+" img[data-mce-selected],"+e+" hr[data-mce-selected] {outline: 1px solid black;resize: none}"+e+" .mce-clonedresizable {position: absolute;"+(fe.gecko?"":"outline: 1px dashed black;")+"opacity: .5;filter: alpha(opacity=50);z-index: 10000}"+e+" .mce-resize-helper {background: #555;background: rgba(0,0,0,0.75);border-radius: 3px;border: 1px;color: white;display: none;font-family: sans-serif;font-size: 12px;white-space: nowrap;line-height: 14px;margin: 5px 10px;padding: 5px;position: absolute;z-index: 10001}");var R=function(e){return e&&("IMG"===e.nodeName||a.dom.is(e,"figure.image"))},n=function(e){var t,n,r=e.target;t=e,n=a.selection.getRng(),!R(t.target)||yv(t.clientX,t.clientY,n)||e.isDefaultPrevented()||a.selection.select(r)},D=function(e){return a.dom.is(e,"figure.image")?e.querySelector("img"):e},O=function(e){var t=a.settings.object_resizing;return!1!==t&&!fe.iOS&&("string"!=typeof t&&(t="table,img,figure.image,div"),"false"!==e.getAttribute("data-mce-resize")&&e!==a.getBody()&&Lr(ar.fromDom(e),t))},B=function(e){var t,n,r,o;t=e.screenX-d,n=e.screenY-m,b=t*f[2]+h,C=n*f[3]+v,b=b<5?5:b,C=C<5?5:C,(R(u)&&!1!==a.settings.resize_img_proportional?!rv.modifierPressed(e):rv.modifierPressed(e)||R(u)&&f[2]*f[3]!=0)&&(k(t)>k(n)?(C=_(b*y),b=_(C/y)):(b=_(C/y),C=_(b*y))),N.setStyles(D(s),{width:b,height:C}),r=0<(r=f.startPos.x+t)?r:0,o=0<(o=f.startPos.y+n)?o:0,N.setStyles(c,{left:r,top:o,display:"block"}),c.innerHTML=b+" &times; "+C,f[2]<0&&s.clientWidth<=b&&N.setStyle(s,"left",g+(h-b)),f[3]<0&&s.clientHeight<=C&&N.setStyle(s,"top",p+(v-C)),(t=A.scrollWidth-x)+(n=A.scrollHeight-w)!=0&&N.setStyles(c,{left:r-t,top:o-n}),i||(Tp(a,u,h,v),i=!0)},P=function(){i=!1;var e=function(e,t){t&&(u.style[e]||!a.schema.isValid(u.nodeName.toLowerCase(),e)?N.setStyle(D(u),e,t):N.setAttrib(D(u),e,t))};e("width",b),e("height",C),N.unbind(S,"mousemove",B),N.unbind(S,"mouseup",P),T!==S&&(N.unbind(T,"mousemove",B),N.unbind(T,"mouseup",P)),N.remove(s),N.remove(c),o(u),kp(a,u,b,C),N.setAttrib(u,"style",N.getAttrib(u,"style")),a.nodeChanged()},o=function(e){var t,r,o,n,i;I(),M(),t=N.getPos(e,A),g=t.x,p=t.y,i=e.getBoundingClientRect(),r=i.width||i.right-i.left,o=i.height||i.bottom-i.top,u!==e&&(u=e,b=C=0),n=a.fire("ObjectSelected",{target:e}),O(e)&&!n.isDefaultPrevented()?E(l,function(n,e){var t;(t=N.get("mceResizeHandle"+e))&&N.remove(t),t=N.add(A,"div",{id:"mceResizeHandle"+e,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+e+"-resize; margin:0; padding:0"}),11===fe.ie&&(t.contentEditable=!1),N.bind(t,"mousedown",function(e){var t;e.stopImmediatePropagation(),e.preventDefault(),d=(t=e).screenX,m=t.screenY,h=D(u).clientWidth,v=D(u).clientHeight,y=v/h,(f=n).startPos={x:r*n[0]+g,y:o*n[1]+p},x=A.scrollWidth,w=A.scrollHeight,s=u.cloneNode(!0),N.addClass(s,"mce-clonedresizable"),N.setAttrib(s,"data-mce-bogus","all"),s.contentEditable=!1,s.unSelectabe=!0,N.setStyles(s,{left:g,top:p,margin:0}),s.removeAttribute("data-mce-selected"),A.appendChild(s),N.bind(S,"mousemove",B),N.bind(S,"mouseup",P),T!==S&&(N.bind(T,"mousemove",B),N.bind(T,"mouseup",P)),c=N.add(A,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},h+" &times; "+v)}),n.elm=t,N.setStyles(t,{left:r*n[0]+g-t.offsetWidth/2,top:o*n[1]+p-t.offsetHeight/2})}):I(),u.setAttribute("data-mce-selected","1")},I=function(){var e,t;for(e in M(),u&&u.removeAttribute("data-mce-selected"),l)(t=N.get("mceResizeHandle"+e))&&(N.unbind(t),N.remove(t))},L=function(e){var t,n=function(e,t){if(e)do{if(e===t)return!0}while(e=e.parentNode)};i||a.removed||(E(N.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),t="mousedown"===e.type?e.target:r.getNode(),n(t=N.$(t).closest("table,img,figure.image,hr")[0],A)&&(z(),n(r.getStart(!0),t)&&n(r.getEnd(!0),t))?o(t):I())},F=function(e){return Ab(function(e,t){for(;t&&t!==e;){if(Rb(t)||Ab(t))return t;t=t.parentNode}return null}(a.getBody(),e))},M=function(){for(var e in l){var t=l[e];t.elm&&(N.unbind(t.elm),delete t.elm)}},z=function(){try{a.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}};return a.on("init",function(){z(),fe.ie&&11<=fe.ie&&(a.on("mousedown click",function(e){var t=e.target,n=t.nodeName;i||!/^(TABLE|IMG|HR)$/.test(n)||F(t)||(2!==e.button&&a.selection.select(t,"TABLE"===n),"mousedown"===e.type&&a.nodeChanged())}),a.dom.bind(A,"mscontrolselect",function(e){var t=function(e){he.setEditorTimeout(a,function(){a.selection.select(e)})};if(F(e.target))return e.preventDefault(),void t(e.target);/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"===e.target.tagName&&t(e.target))}));var t=he.throttle(function(e){a.composing||L(e)});a.on("nodechange ResizeEditor ResizeWindow drop FullscreenStateChanged",t),a.on("keyup compositionend",function(e){u&&"TABLE"===u.nodeName&&t(e)}),a.on("hide blur",I),a.on("contextmenu",n)}),a.on("remove",M),{isResizable:O,showResizeRect:o,hideResizeRect:I,updateResizeRect:L,destroy:function(){u=s=null}}},Ob=function(e){return jo.isContentEditableTrue(e)||jo.isContentEditableFalse(e)},Bb=function(e,t,n){var r,o,i,a,u,s=n;if(s.caretPositionFromPoint)(o=s.caretPositionFromPoint(e,t))&&((r=n.createRange()).setStart(o.offsetNode,o.offset),r.collapse(!0));else if(n.caretRangeFromPoint)r=n.caretRangeFromPoint(e,t);else if(s.body.createTextRange){r=s.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch(c){r=function(e,n,t){var r,o,i;if(r=t.elementFromPoint(e,n),o=t.body.createTextRange(),r&&"HTML"!==r.tagName||(r=t.body),o.moveToElementText(r),0<(i=(i=Xt.toArray(o.getClientRects())).sort(function(e,t){return(e=Math.abs(Math.max(e.top-n,e.bottom-n)))-(t=Math.abs(Math.max(t.top-n,t.bottom-n)))})).length){n=(i[0].bottom+i[0].top)/2;try{return o.moveToPoint(e,n),o.collapse(!0),o}catch(a){}}return null}(e,t,n)}return i=r,a=n.body,u=i&&i.parentElement?i.parentElement():null,jo.isContentEditableFalse(function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(u,a,Ob))?null:i}return r},Pb=function(n,e){return W(e,function(e){var t=n.fire("GetSelectionRange",{range:e});return t.range!==e?t.range:e})},Ib=function(e,t){var n=(t||V.document).createDocumentFragment();return z(e,function(e){n.appendChild(e.dom())}),ar.fromDom(n)},Lb=Ar("element","width","rows"),Fb=Ar("element","cells"),Mb=Ar("x","y"),zb=function(e,t){var n=parseInt(Er(e,t),10);return isNaN(n)?1:n},Ub=function(e){return j(e,function(e,t){return t.cells().length>e?t.cells().length:e},0)},jb=function(e,t){for(var n=e.rows(),r=0;r<n.length;r++)for(var o=n[r].cells(),i=0;i<o.length;i++)if(Mr(o[i],t))return _.some(Mb(i,r));return _.none()},Vb=function(e,t,n,r,o){for(var i=[],a=e.rows(),u=n;u<=o;u++){var s=a[u].cells(),c=t<r?s.slice(t,r+1):s.slice(r,t+1);i.push(Fb(a[u].element(),c))}return i},Hb=function(e){var o=Lb(ha(e),0,[]);return z(Qi(e,"tr"),function(n,r){z(Qi(n,"td,th"),function(e,t){!function(e,t,n,r,o){for(var i=zb(o,"rowspan"),a=zb(o,"colspan"),u=e.rows(),s=n;s<n+i;s++){u[s]||(u[s]=Fb(va(r),[]));for(var c=t;c<t+a;c++)u[s].cells()[c]=s===n&&c===t?o:ha(o)}}(o,function(e,t,n){for(;r=t,o=n,i=void 0,((i=e.rows())[o]?i[o].cells():[])[r];)t++;var r,o,i;return t}(o,t,r),r,n,e)})}),Lb(o.element(),Ub(o.rows()),o.rows())},qb=function(e){return n=W((t=e).rows(),function(e){var t=W(e.cells(),function(e){var t=va(e);return Sr(t,"colspan"),Sr(t,"rowspan"),t}),n=ha(e.element());return Mi(n,t),n}),r=ha(t.element()),o=ar.fromTag("tbody"),Mi(o,n),Fi(r,o),r;var t,n,r,o},$b=function(l,e,t){return jb(l,e).bind(function(c){return jb(l,t).map(function(e){return t=l,r=e,o=(n=c).x(),i=n.y(),a=r.x(),u=r.y(),s=i<u?Vb(t,o,i,a,u):Vb(t,o,u,a,i),Lb(t.element(),Ub(s),s);var t,n,r,o,i,a,u,s})})},Wb=function(n,t){return X(n,function(e){return"li"===lr(e)&&Jh(e,t)}).fold(q([]),function(e){return(t=n,X(t,function(e){return"ul"===lr(e)||"ol"===lr(e)})).map(function(e){return[ar.fromTag("li"),ar.fromTag(lr(e))]}).getOr([]);var t})},Kb=function(e,t){var n,r=ar.fromDom(t.commonAncestorContainer),o=uf(r,e),i=U(o,function(e){return xo(e)||bo(e)}),a=Wb(o,t),u=i.concat(a.length?a:So(n=r)?Vr(n).filter(Eo).fold(q([]),function(e){return[n,e]}):Eo(n)?[n]:[]);return W(u,ha)},Xb=function(){return Ib([])},Yb=function(e,t){return n=ar.fromDom(t.cloneContents()),r=Kb(e,t),o=j(r,function(e,t){return Fi(t,e),t},n),0<r.length?Ib([o]):o;var n,r,o},Gb=function(e,o){return(t=e,n=o[0],ra(n,"table",d(Mr,t))).bind(function(e){var t=o[0],n=o[o.length-1],r=Hb(e);return $b(r,t,n).map(function(e){return Ib([qb(e)])})}).getOrThunk(Xb);var t,n},Jb=function(e,t){var n,r,o=Cm(t,e);return 0<o.length?Gb(e,o):(n=e,0<(r=t).length&&r[0].collapsed?Xb():Yb(n,r[0]))},Qb=function(e,t){if(void 0===t&&(t={}),t.get=!0,t.format=t.format||"html",t.selection=!0,(t=e.fire("BeforeGetContent",t)).isDefaultPrevented())return e.fire("GetContent",t),t.content;if("text"===t.format)return c=e,_.from(c.selection.getRng()).map(function(e){var t=c.dom.add(c.getBody(),"div",{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},e.cloneContents()),n=wa(t.innerText);return c.dom.remove(t),n}).getOr("");t.getInner=!0;var n,r,o,i,a,u,s,c,l=(r=t,i=(n=e).selection.getRng(),a=n.dom.create("body"),u=n.selection.getSel(),s=Pb(n,gm(u)),(o=r.contextual?Jb(ar.fromDom(n.getBody()),s).dom():i.cloneContents())&&a.appendChild(o),n.selection.serializer.serialize(a,r));return"tree"===t.format?l:(t.content=e.selection.isCollapsed()?"":l,e.fire("GetContent",t),t.content)},Zb=function(e,t,n){var r,o,i,a,u=(r=t,ma(ma({format:"html"},n),{set:!0,selection:!0,content:r})),s=e.selection.getRng(),c=e.getDoc();if(u.no_events||!(u=e.fire("BeforeSetContent",u)).isDefaultPrevented()){if(t=function(e,t){if("raw"!==t.format){var n=e.parser.parse(t.content,ma({isRootContent:!0,forced_root_block:!1},t));return al({validate:e.validate},e.schema).serialize(n)}return t.content}(e,u),s.insertNode){t+='<span id="__caret">_</span>',s.startContainer===c&&s.endContainer===c?c.body.innerHTML=t:(s.deleteContents(),0===c.body.childNodes.length?c.body.innerHTML=t:s.createContextualFragment?s.insertNode(s.createContextualFragment(t)):(i=c.createDocumentFragment(),a=c.createElement("div"),i.appendChild(a),a.outerHTML=t,s.insertNode(i))),o=e.dom.get("__caret"),(s=c.createRange()).setStartBefore(o),s.setEndBefore(o),e.selection.setRng(s),e.dom.remove("__caret");try{e.selection.setRng(s)}catch(f){}}else{var l=s;l.item&&(c.execCommand("Delete",!1,null),l=e.selection.getRng()),/^\s+/.test(t)?(l.pasteHTML('<span id="__mce_tmp">_</span>'+t),e.dom.remove("__mce_tmp")):l.pasteHTML(t)}u.no_events||e.fire("SetContent",u)}else e.fire("SetContent",u)},eC=function(e,t,n,r,o){var i=n?t.startContainer:t.endContainer,a=n?t.startOffset:t.endOffset;return _.from(i).map(ar.fromDom).map(function(e){return r&&t.collapsed?e:Xr(e,o(e,a)).getOr(e)}).bind(function(e){return dr(e)?_.some(e):Vr(e)}).map(function(e){return e.dom()}).getOr(e)},tC=function(e,t,n){return eC(e,t,!0,n,function(e,t){return Math.min(e.dom().childNodes.length,t)})},nC=function(e,t,n){return eC(e,t,!1,n,function(e,t){return 0<t?t-1:t})},rC=function(e,t){for(var n=e;e&&jo.isText(e)&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n},oC=Xt.each,iC=function(e){return!!e.select},aC=function(e){return!(!e||!e.ownerDocument)&&zr(ar.fromDom(e.ownerDocument),ar.fromDom(e))},uC=function(u,s,e,c){var n,t,l,f,a,r=function(e,t){return Zb(c,e,t)},o=function(e){var t=m();t.collapse(!!e),i(t)},d=function(){return s.getSelection?s.getSelection():s.document.selection},m=function(){var e,t,n,r,o=function(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(r){return-1}};if(!s)return null;if(null==(r=s.document))return null;if(c.bookmark!==undefined&&!1===sh(c)){var i=up(c);if(i.isSome())return i.map(function(e){return Pb(c,[e])[0]}).getOr(r.createRange())}try{(e=d())&&!jo.isRestrictedNode(e.anchorNode)&&(t=0<e.rangeCount?e.getRangeAt(0):e.createRange?e.createRange():r.createRange())}catch(a){}return(t=Pb(c,[t])[0])||(t=r.createRange?r.createRange():r.body.createTextRange()),t.setStart&&9===t.startContainer.nodeType&&t.collapsed&&(n=u.getRoot(),t.setStart(n,0),t.setEnd(n,0)),l&&f&&(0===o(t.START_TO_START,t,l)&&0===o(t.END_TO_END,t,l)?t=f:f=l=null),t},i=function(e,t){var n,r;if((o=e)&&(iC(o)||aC(o.startContainer)&&aC(o.endContainer))){var o,i=iC(e)?e:null;if(i){f=null;try{i.select()}catch(a){}}else{if(n=d(),e=c.fire("SetSelectionRange",{range:e,forward:t}).range,n){f=e;try{n.removeAllRanges(),n.addRange(e)}catch(a){}!1===t&&n.extend&&(n.collapse(e.endContainer,e.endOffset),n.extend(e.startContainer,e.startOffset)),l=0<n.rangeCount?n.getRangeAt(0):null}e.collapsed||e.startContainer!==e.endContainer||!n.setBaseAndExtent||fe.ie||e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()&&(r=e.startContainer.childNodes[e.startOffset])&&"IMG"===r.tagName&&(n.setBaseAndExtent(e.startContainer,e.startOffset,e.endContainer,e.endOffset),n.anchorNode===e.startContainer&&n.focusNode===e.endContainer||n.setBaseAndExtent(r,0,r,1)),c.fire("AfterSetSelectionRange",{range:e,forward:t})}}},g=function(){var e,t,n=d();return!(n&&n.anchorNode&&n.focusNode)||((e=u.createRng()).setStart(n.anchorNode,n.anchorOffset),e.collapse(!0),(t=u.createRng()).setStart(n.focusNode,n.focusOffset),t.collapse(!0),e.compareBoundaryPoints(e.START_TO_START,t)<=0)},p={bookmarkManager:null,controlSelection:null,dom:u,win:s,serializer:e,editor:c,collapse:o,setCursorLocation:function(e,t){var n=u.createRng();e?(n.setStart(e,t),n.setEnd(e,t),i(n),o(!1)):(Qh(u,n,c.getBody(),!0),i(n))},getContent:function(e){return Qb(c,e)},setContent:r,getBookmark:function(e,t){return n.getBookmark(e,t)},moveToBookmark:function(e){return n.moveToBookmark(e)},select:function(e,t){var r,n,o;return(r=u,n=e,o=t,_.from(n).map(function(e){var t=r.nodeIndex(e),n=r.createRng();return n.setStart(e.parentNode,t),n.setEnd(e.parentNode,t+1),o&&(Qh(r,n,e,!0),Qh(r,n,e,!1)),n})).each(i),e},isCollapsed:function(){var e=m(),t=d();return!(!e||e.item)&&(e.compareEndPoints?0===e.compareEndPoints("StartToEnd",e):!t||e.collapsed)},isForward:g,setNode:function(e){return r(u.getOuterHTML(e)),e},getNode:function(){return e=c.getBody(),(t=m())?(r=t.startContainer,o=t.endContainer,i=t.startOffset,a=t.endOffset,n=t.commonAncestorContainer,!t.collapsed&&(r===o&&a-i<2&&r.hasChildNodes()&&(n=r.childNodes[i]),3===r.nodeType&&3===o.nodeType&&(r=r.length===i?rC(r.nextSibling,!0):r.parentNode,o=0===a?rC(o.previousSibling,!1):o.parentNode,r&&r===o))?r:n&&3===n.nodeType?n.parentNode:n):e;var e,t,n,r,o,i,a},getSel:d,setRng:i,getRng:m,getStart:function(e){return tC(c.getBody(),m(),e)},getEnd:function(e){return nC(c.getBody(),m(),e)},getSelectedBlocks:function(e,t){return function(e,t,n,r){var o,i,a=[];if(i=e.getRoot(),n=e.getParent(n||tC(i,t,t.collapsed),e.isBlock),r=e.getParent(r||nC(i,t,t.collapsed),e.isBlock),n&&n!==i&&a.push(n),n&&r&&n!==r)for(var u=new go(o=n,i);(o=u.next())&&o!==r;)e.isBlock(o)&&a.push(o);return r&&n!==r&&r!==i&&a.push(r),a}(u,m(),e,t)},normalize:function(){var e=m(),t=d();if(!hm(t)&&Zh(c)){var n=Dg(u,e);return n.each(function(e){i(e,g())}),n.getOr(e)}return e},selectorChanged:function(e,t){var i;return a||(a={},i={},c.on("NodeChange",function(e){var n=e.element,r=u.getParents(n,null,u.getRoot()),o={};oC(a,function(e,n){oC(r,function(t){if(u.is(t,n))return i[n]||(oC(e,function(e){e(!0,{node:t,selector:n,parents:r})}),i[n]=e),o[n]=e,!1})}),oC(i,function(e,t){o[t]||(delete i[t],oC(e,function(e){e(!1,{node:n,selector:t,parents:r})}))})})),a[e]||(a[e]=[]),a[e].push(t),p},getScrollContainer:function(){for(var e,t=u.getRoot();t&&"BODY"!==t.nodeName;){if(t.scrollHeight>t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e,t){return og(c,e,t)},placeCaretAt:function(e,t){return i(Bb(e,t,c.getDoc()))},getBoundingClientRect:function(){var e=m();return e.collapsed?_u.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){s=l=f=null,t.destroy()}};return n=_b(p),t=Db(p,c),p.bookmarkManager=n,p.controlSelection=t,p};(kb=Tb||(Tb={}))[kb.Br=0]="Br",kb[kb.Block=1]="Block",kb[kb.Wrap=2]="Wrap",kb[kb.Eol=3]="Eol";var sC=function(e,t){return e===Tu.Backwards?t.reverse():t},cC=function(e,t,n,r){for(var o,i,a,u,s,c,l=Js(n),f=r,d=[];f&&(s=l,c=f,o=t===Tu.Forwards?s.next(c):s.prev(c));){if(jo.isBr(o.getNode(!1)))return t===Tu.Forwards?{positions:sC(t,d).concat([o]),breakType:Tb.Br,breakAt:_.some(o)}:{positions:sC(t,d),breakType:Tb.Br,breakAt:_.some(o)};if(o.isVisible()){if(e(f,o)){var m=(i=t,a=f,u=o,jo.isBr(u.getNode(i===Tu.Forwards))?Tb.Br:!1===Ts(a,u)?Tb.Block:Tb.Wrap);return{positions:sC(t,d),breakType:m,breakAt:_.some(o)}}d.push(o),f=o}else f=o}return{positions:sC(t,d),breakType:Tb.Eol,breakAt:_.none()}},lC=function(n,r,o,e){return r(o,e).breakAt.map(function(e){var t=r(o,e).positions;return n===Tu.Backwards?t.concat(e):[e].concat(t)}).getOr([])},fC=function(e,i){return j(e,function(e,o){return e.fold(function(){return _.some(o)},function(r){return ru(Z(r.getClientRects()),Z(o.getClientRects()),function(e,t){var n=Math.abs(i-e.left);return Math.abs(i-t.left)<=n?o:r}).or(e)})},_.none())},dC=function(t,e){return Z(e.getClientRects()).bind(function(e){return fC(t,e.left)})},mC=d(cC,Su.isAbove,-1),gC=d(cC,Su.isBelow,1),pC=d(lC,-1,mC),hC=d(lC,1,gC),vC=jo.isContentEditableFalse,yC=Za,bC=function(e,t,n,r){var o=e===Tu.Forwards,i=o?Lf:Ff;if(!r.collapsed){var a=yC(r);if(vC(a))return sg(e,t,a,e===Tu.Backwards,!0)}var u=Sa(r.startContainer),s=Ps(e,t.getBody(),r);if(i(s))return cg(t,s.getNode(!o));var c=Vl.normalizePosition(o,n(s));if(!c)return u?r:null;if(i(c))return sg(e,t,c.getNode(!o),o,!0);var l=n(c);return l&&i(l)&&Fs(c,l)?sg(e,t,l.getNode(!o),o,!0):u?fg(t,c.toRange(),!0):null},CC=function(e,t,n,r){var o,i,a,u,s,c,l,f,d;if(d=yC(r),o=Ps(e,t.getBody(),r),i=n(t.getBody(),sv(1),o),a=U(i,cv(1)),s=Ht.last(o.getClientRects()),(Lf(o)||zf(o))&&(d=o.getNode()),(Ff(o)||Uf(o))&&(d=o.getNode(!0)),!s)return null;if(c=s.left,(u=pv(a,c))&&vC(u.node))return l=Math.abs(c-u.left),f=Math.abs(c-u.right),sg(e,t,u.node,l<f,!0);if(d){var m=function(e,t,n,r){var o,i,a,u,s,c,l=Js(t),f=[],d=0,m=function(e){return Ht.last(e.getClientRects())};1===e?(o=l.next,i=Ja,a=Ga,u=_u.after(r)):(o=l.prev,i=Ga,a=Ja,u=_u.before(r)),c=m(u);do{if(u.isVisible()&&!a(s=m(u),c)){if(0<f.length&&i(s,Ht.last(f))&&d++,(s=Ka(s)).position=u,s.line=d,n(s))return f;f.push(s)}}while(u=o(u));return f}(e,t.getBody(),sv(1),d);if(u=pv(U(m,cv(1)),c))return fg(t,u.position.toRange(),!0);if(u=Ht.last(U(m,cv(0))))return fg(t,u.position.toRange(),!0)}},xC=function(e,t,n){var r,o,i,a,u=Js(e.getBody()),s=d(Ls,u.next),c=d(Ls,u.prev);if(n.collapsed&&e.settings.forced_root_block){if(!(r=e.dom.getParent(n.startContainer,"PRE")))return;(1===t?s(_u.fromRangeStart(n)):c(_u.fromRangeStart(n)))||(a=(i=e).dom.create(Nl(i)),(!fe.ie||11<=fe.ie)&&(a.innerHTML='<br data-mce-bogus="1">'),o=a,1===t?e.$(r).after(o):e.$(r).before(o),e.selection.select(o,!0),e.selection.collapse())}},wC=function(l,f){return function(){var e,t,n,r,o,i,a,u,s,c=(t=f,r=Js((e=l).getBody()),o=d(Ls,r.next),i=d(Ls,r.prev),a=t?Tu.Forwards:Tu.Backwards,u=t?o:i,s=e.selection.getRng(),(n=bC(a,e,u,s))?n:(n=xC(e,a,s))||null);return!!c&&(dg(l,c),!0)}},NC=function(u,s){return function(){var e,t,n,r,o,i,a=(r=(t=s)?1:-1,o=t?uv:av,i=(e=u).selection.getRng(),(n=CC(r,e,o,i))?n:(n=xC(e,r,i))||null);return!!a&&(dg(u,a),!0)}},EC=function(r,o){return function(){var t,e=o?_u.fromRangeEnd(r.selection.getRng()):_u.fromRangeStart(r.selection.getRng()),n=o?gC(r.getBody(),e):mC(r.getBody(),e);return(o?ee(n.positions):Z(n.positions)).filter((t=o,function(e){return t?Ff(e):Lf(e)})).fold(q(!1),function(e){return r.selection.setRng(e.toRange()),!0})}},SC=function(e,t,n,r,o){var i,a,u,s,c=Qi(ar.fromDom(n),"td,th,caption").map(function(e){return e.dom()}),l=U((i=e,G(c,function(e){var t,n,r=(t=Ka(e.getBoundingClientRect()),n=-1,{left:t.left-n,top:t.top-n,right:t.right+2*n,bottom:t.bottom+2*n,width:t.width+n,height:t.height+n});return[{x:r.left,y:i(r),cell:e},{x:r.right,y:i(r),cell:e}]})),function(e){return t(e,o)});return(a=l,u=r,s=o,j(a,function(e,r){return e.fold(function(){return _.some(r)},function(e){var t=Math.sqrt(Math.abs(e.x-u)+Math.abs(e.y-s)),n=Math.sqrt(Math.abs(r.x-u)+Math.abs(r.y-s));return _.some(n<t?r:e)})},_.none())).map(function(e){return e.cell})},TC=d(SC,function(e){return e.bottom},function(e,t){return e.y<t}),kC=d(SC,function(e){return e.top},function(e,t){return e.y>t}),_C=function(t,n){return Z(n.getClientRects()).bind(function(e){return TC(t,e.left,e.top)}).bind(function(e){return dC((t=e,sc.lastPositionIn(t).map(function(e){return mC(t,e).positions.concat(e)}).getOr([])),n);var t})},AC=function(t,n){return ee(n.getClientRects()).bind(function(e){return kC(t,e.left,e.top)}).bind(function(e){return dC((t=e,sc.firstPositionIn(t).map(function(e){return[e].concat(gC(t,e).positions)}).getOr([])),n);var t})},RC=function(e,t,n){var r,o,i,a,u=e(t,n);return(a=u).breakType===Tb.Wrap&&0===a.positions.length||!jo.isBr(n.getNode())&&(i=u).breakType===Tb.Br&&1===i.positions.length?(r=e,o=t,!u.breakAt.map(function(e){return r(o,e).breakAt.isSome()}).getOr(!1)):u.breakAt.isNone()},DC=d(RC,mC),OC=d(RC,gC),BC=function(e,t,n,r){var o,i,a,u,s=e.selection.getRng(),c=t?1:-1;if(ms()&&(o=t,i=s,a=n,u=_u.fromRangeStart(i),sc.positionIn(!o,a).map(function(e){return e.isEqual(u)}).getOr(!1))){var l=sg(c,e,n,!t,!0);return dg(e,l),!0}return!1},PC=function(e,t){var n=t.getNode(e);return jo.isElement(n)&&"TABLE"===n.nodeName?_.some(n):_.none()},IC=function(u,s,c){var e=PC(!!s,c),t=!1===s;e.fold(function(){return dg(u,c.toRange())},function(a){return sc.positionIn(t,u.getBody()).filter(function(e){return e.isEqual(c)}).fold(function(){return dg(u,c.toRange())},function(e){return n=s,o=a,t=c,void((i=Nl(r=u))?r.undoManager.transact(function(){var e=ar.fromTag(i);Nr(e,El(r)),Fi(e,ar.fromTag("br")),n?Ii(ar.fromDom(o),e):Pi(ar.fromDom(o),e);var t=r.dom.createRng();t.setStart(e.dom(),0),t.setEnd(e.dom(),0),dg(r,t)}):dg(r,t.toRange()));var n,r,o,t,i})})},LC=function(e,t,n,r){var o,i,a,u,s,c,l=e.selection.getRng(),f=_u.fromRangeStart(l),d=e.getBody();if(!t&&DC(r,f)){var m=(u=d,_C(s=n,c=f).orThunk(function(){return Z(c.getClientRects()).bind(function(e){return fC(pC(u,_u.before(s)),e.left)})}).getOr(_u.before(s)));return IC(e,t,m),!0}return!(!t||!OC(r,f))&&(o=d,m=AC(i=n,a=f).orThunk(function(){return Z(a.getClientRects()).bind(function(e){return fC(hC(o,_u.after(i)),e.left)})}).getOr(_u.after(i)),IC(e,t,m),!0)},FC=function(t,n){return function(){return _.from(t.dom.getParent(t.selection.getNode(),"td,th")).bind(function(e){return _.from(t.dom.getParent(e,"table")).map(function(e){return BC(t,n,e)})}).getOr(!1)}},MC=function(n,r){return function(){return _.from(n.dom.getParent(n.selection.getNode(),"td,th")).bind(function(t){return _.from(n.dom.getParent(t,"table")).map(function(e){return LC(n,r,e,t)})}).getOr(!1)}},zC=function(e){return F(["figcaption"],lr(e))},UC=function(e){var t=V.document.createRange();return t.setStartBefore(e.dom()),t.setEndBefore(e.dom()),t},jC=function(e,t,n){n?Fi(e,t):Li(e,t)},VC=function(e,t,n,r){return""===t?(l=e,f=r,d=ar.fromTag("br"),jC(l,d,f),UC(d)):(o=e,i=r,a=t,u=n,s=ar.fromTag(a),c=ar.fromTag("br"),Nr(s,u),Fi(s,c),jC(o,s,i),UC(c));var o,i,a,u,s,c,l,f,d},HC=function(e,t,n){return t?(o=e.dom(),gC(o,n).breakAt.isNone()):(r=e.dom(),mC(r,n).breakAt.isNone());var r,o},qC=function(t,n){var e,r,o,i=ar.fromDom(t.getBody()),a=_u.fromRangeStart(t.selection.getRng()),u=Nl(t),s=El(t);return(e=a,r=i,o=d(Mr,r),na(ar.fromDom(e.container()),Co,o).filter(zC)).exists(function(){if(HC(i,n,a)){var e=VC(i,u,s,n);return t.selection.setRng(e),!0}return!1})},$C=function(e,t){return function(){return!!e.selection.isCollapsed()&&qC(e,t)}},WC=function(e,r){return G(W(e,function(e){return Zy({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:o},e)}),function(e){return t=e,(n=r).keyCode===t.keyCode&&n.shiftKey===t.shiftKey&&n.altKey===t.altKey&&n.ctrlKey===t.ctrlKey&&n.metaKey===t.metaKey?[e]:[];var t,n})},KC=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,r)}},XC=function(e,t){return X(WC(e,t),function(e){return e.action()})},YC=function(i,a){i.on("keydown",function(e){var t,n,r,o;!1===e.isDefaultPrevented()&&(t=i,n=a,r=e,o=or.detect().os,XC([{keyCode:rv.RIGHT,action:wC(t,!0)},{keyCode:rv.LEFT,action:wC(t,!1)},{keyCode:rv.UP,action:NC(t,!1)},{keyCode:rv.DOWN,action:NC(t,!0)},{keyCode:rv.RIGHT,action:FC(t,!0)},{keyCode:rv.LEFT,action:FC(t,!1)},{keyCode:rv.UP,action:MC(t,!1)},{keyCode:rv.DOWN,action:MC(t,!0)},{keyCode:rv.RIGHT,action:Xd.move(t,n,!0)},{keyCode:rv.LEFT,action:Xd.move(t,n,!1)},{keyCode:rv.RIGHT,ctrlKey:!o.isOSX(),altKey:o.isOSX(),action:Xd.moveNextWord(t,n)},{keyCode:rv.LEFT,ctrlKey:!o.isOSX(),altKey:o.isOSX(),action:Xd.movePrevWord(t,n)},{keyCode:rv.UP,action:$C(t,!1)},{keyCode:rv.DOWN,action:$C(t,!0)}],r).each(function(e){r.preventDefault()}))})},GC=function(o,i){o.on("keydown",function(e){var t,n,r;!1===e.isDefaultPrevented()&&(t=o,n=i,r=e,XC([{keyCode:rv.BACKSPACE,action:KC(ad,t,!1)},{keyCode:rv.DELETE,action:KC(ad,t,!0)},{keyCode:rv.BACKSPACE,action:KC(gg,t,!1)},{keyCode:rv.DELETE,action:KC(gg,t,!0)},{keyCode:rv.BACKSPACE,action:KC(Qd,t,n,!1)},{keyCode:rv.DELETE,action:KC(Qd,t,n,!0)},{keyCode:rv.BACKSPACE,action:KC(Dm,t,!1)},{keyCode:rv.DELETE,action:KC(Dm,t,!0)},{keyCode:rv.BACKSPACE,action:KC(Cf,t,!1)},{keyCode:rv.DELETE,action:KC(Cf,t,!0)},{keyCode:rv.BACKSPACE,action:KC(hf,t,!1)},{keyCode:rv.DELETE,action:KC(hf,t,!0)},{keyCode:rv.BACKSPACE,action:KC(ng,t,!1)},{keyCode:rv.DELETE,action:KC(ng,t,!0)}],r).each(function(e){r.preventDefault()}))}),o.on("keyup",function(e){var t,n;!1===e.isDefaultPrevented()&&(t=o,n=e,XC([{keyCode:rv.BACKSPACE,action:KC(ud,t)},{keyCode:rv.DELETE,action:KC(ud,t)}],n))})},JC=function(e){return _.from(e.dom.getParent(e.selection.getStart(!0),e.dom.isBlock))},QC=function(e,t){var n,r,o,i=t,a=e.dom,u=e.schema.getMoveCaretBeforeOnEnterElements();if(t){if(/^(LI|DT|DD)$/.test(t.nodeName)){var s=function(e){for(;e;){if(1===e.nodeType||3===e.nodeType&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}}(t.firstChild);s&&/^(UL|OL|DL)$/.test(s.nodeName)&&t.insertBefore(a.doc.createTextNode("\xa0"),t.firstChild)}if(o=a.createRng(),t.normalize(),t.hasChildNodes()){for(n=new go(t,t);r=n.current();){if(jo.isText(r)){o.setStart(r,0),o.setEnd(r,0);break}if(u[r.nodeName.toLowerCase()]){o.setStartBefore(r),o.setEndBefore(r);break}i=r,r=n.next()}r||(o.setStart(i,0),o.setEnd(i,0))}else jo.isBr(t)?t.nextSibling&&a.isBlock(t.nextSibling)?(o.setStartBefore(t),o.setEndBefore(t)):(o.setStartAfter(t),o.setEndAfter(t)):(o.setStart(t,0),o.setEnd(t,0));e.selection.setRng(o),a.remove(void 0),e.selection.scrollIntoView(t)}},ZC=function(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},ex=JC,tx=function(e){return JC(e).fold(q(""),function(e){return e.nodeName.toUpperCase()})},nx=function(e){return JC(e).filter(function(e){return So(ar.fromDom(e))}).isSome()},rx=function(e,t){return e&&e.parentNode&&e.parentNode.nodeName===t},ox=function(e){return e&&/^(OL|UL|LI)$/.test(e.nodeName)},ix=function(e){var t=e.parentNode;return/^(LI|DT|DD)$/.test(t.nodeName)?t:e},ax=function(e,t,n){for(var r=e[n?"firstChild":"lastChild"];r&&!jo.isElement(r);)r=r[n?"nextSibling":"previousSibling"];return r===t},ux=function(e,t,n,r,o){var i=e.dom,a=e.selection.getRng();if(n!==e.getBody()){var u;ox(u=n)&&ox(u.parentNode)&&(o="LI");var s,c,l=o?t(o):i.create("BR");if(ax(n,r,!0)&&ax(n,r,!1))rx(n,"LI")?i.insertAfter(l,ix(n)):i.replace(l,n);else if(ax(n,r,!0))rx(n,"LI")?(i.insertAfter(l,ix(n)),l.appendChild(i.doc.createTextNode(" ")),l.appendChild(n)):n.parentNode.insertBefore(l,n);else if(ax(n,r,!1))i.insertAfter(l,ix(n));else{n=ix(n);var f=a.cloneRange();f.setStartAfter(r),f.setEndAfter(n);var d=f.extractContents();"LI"===o&&(c="LI",(s=d).firstChild&&s.firstChild.nodeName===c)?(l=d.firstChild,i.insertAfter(d,n)):(i.insertAfter(d,n),i.insertAfter(l,n))}i.remove(r),QC(e,l)}},sx=function(e){e.innerHTML='<br data-mce-bogus="1">'},cx=function(e,t){return e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t},lx=function(e,t){return t&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&"true"!==e.getContentEditable(t)},fx=function(e,t,n){return!1===jo.isText(t)?n:e?1===n&&t.data.charAt(n-1)===xa?0:n:n===t.data.length-1&&t.data.charAt(n)===xa?t.data.length:n},dx=function(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},mx=function(o,i,e){_.from(e.style).map(o.dom.parseStyle).each(function(e){var t=function(e){var t={},n=e.dom();if(Cr(n))for(var r=0;r<n.style.length;r++){var o=n.style.item(r);t[o]=n.style[o]}return t}(ar.fromDom(i)),n=ma(ma({},t),e);o.dom.setStyles(i,n)});var t=_.from(e["class"]).map(function(e){return e.split(/\s+/)}),n=_.from(i.className).map(function(e){return U(e.split(/\s+/),function(e){return""!==e})});ru(t,n,function(t,e){var n=U(e,function(e){return!F(t,e)}),r=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}(t,n);o.dom.setAttrib(i,"class",r.join(" "))});var r=["style","class"],a=yr(e,function(e,t){return!F(r,t)}).t;o.dom.setAttribs(i,a)},gx=function(e,t){var n=Nl(e);if(n&&n.toLowerCase()===t.tagName.toLowerCase()){var r=El(e);mx(e,t,r)}},px=function(a,e){var t,u,s,i,c,n,r,o,l,f,d,m,g,p,h,v,y,b,C,x=a.dom,w=a.schema,N=w.getNonEmptyElements(),E=a.selection.getRng(),S=function(e){var t,n,r,o=s,i=w.getTextInlineElements();if(r=t=e||"TABLE"===f||"HR"===f?x.create(e||m):c.cloneNode(!1),!1===kl(a))x.setAttrib(t,"style",null),x.setAttrib(t,"class",null);else do{if(i[o.nodeName]){if(Ju(o)||yc(o))continue;n=o.cloneNode(!1),x.setAttrib(n,"id",""),t.hasChildNodes()?n.appendChild(t.firstChild):r=n,t.appendChild(n)}}while((o=o.parentNode)&&o!==u);return gx(a,t),sx(r),t},T=function(e){var t,n,r,o;if(o=fx(e,s,i),jo.isText(s)&&(e?0<o:o<s.nodeValue.length))return!1;if(s.parentNode===c&&g&&!e)return!0;if(e&&jo.isElement(s)&&s===c.firstChild)return!0;if(cx(s,"TABLE")||cx(s,"HR"))return g&&!e||!g&&e;for(t=new go(s,c),jo.isText(s)&&(e&&0===o?t.prev():e||o!==s.nodeValue.length||t.next());n=t.current();){if(jo.isElement(n)){if(!n.getAttribute("data-mce-bogus")&&(r=n.nodeName.toLowerCase(),N[r]&&"br"!==r))return!1}else if(jo.isText(n)&&!/^[ \t\r\n]*$/.test(n.nodeValue))return!1;e?t.prev():t.next()}return!0},k=function(){r=/^(H[1-6]|PRE|FIGURE)$/.test(f)&&"HGROUP"!==d?S(m):S(),_l(a)&&lx(x,l)&&x.isEmpty(c)?r=x.split(l,c):x.insertAfter(r,c),QC(a,r)};Dg(x,E).each(function(e){E.setStart(e.startContainer,e.startOffset),E.setEnd(e.endContainer,e.endOffset)}),s=E.startContainer,i=E.startOffset,m=Nl(a),n=e.shiftKey,jo.isElement(s)&&s.hasChildNodes()&&(g=i>s.childNodes.length-1,s=s.childNodes[Math.min(i,s.childNodes.length-1)]||s,i=g&&jo.isText(s)?s.nodeValue.length:0),(u=dx(x,s))&&((m&&!n||!m&&n)&&(s=function(e,t,n,r,o){var i,a,u,s,c,l,f,d=t||"P",m=e.dom,g=dx(m,r);if(!(a=m.getParent(r,m.isBlock))||!lx(m,a)){if(l=(a=a||g)===e.getBody()||(f=a)&&/^(TD|TH|CAPTION)$/.test(f.nodeName)?a.nodeName.toLowerCase():a.parentNode.nodeName.toLowerCase(),!a.hasChildNodes())return i=m.create(d),gx(e,i),a.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;for(s=r;s.parentNode!==a;)s=s.parentNode;for(;s&&!m.isBlock(s);)s=(u=s).previousSibling;if(u&&e.schema.isValidChild(l,d.toLowerCase())){for(i=m.create(d),gx(e,i),u.parentNode.insertBefore(i,u),s=u;s&&!m.isBlock(s);)c=s.nextSibling,i.appendChild(s),s=c;n.setStart(r,o),n.setEnd(r,o)}}return r}(a,m,E,s,i)),c=x.getParent(s,x.isBlock),l=c?x.getParent(c.parentNode,x.isBlock):null,f=c?c.nodeName.toUpperCase():"","LI"!==(d=l?l.nodeName.toUpperCase():"")||e.ctrlKey||(l=(c=l).parentNode,f=d),/^(LI|DT|DD)$/.test(f)&&x.isEmpty(c)?ux(a,S,l,c,m):m&&c===a.getBody()||(m=m||"P",Sa(c)?(r=Pa(c),x.isEmpty(c)&&sx(c),gx(a,r),QC(a,r)):T()?k():T(!0)?(r=c.parentNode.insertBefore(S(),c),QC(a,cx(c,"HR")?r:c)):((t=(b=E,C=b.cloneRange(),C.setStart(b.startContainer,fx(!0,b.startContainer,b.startOffset)),C.setEnd(b.endContainer,fx(!1,b.endContainer,b.endOffset)),C).cloneRange()).setEndAfter(c),o=t.extractContents(),y=o,z(Ji(ar.fromDom(y),mr),function(e){var t=e.dom();t.nodeValue=wa(t.nodeValue)}),function(e){for(;jo.isText(e)&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;);}(o),r=o.firstChild,x.insertAfter(o,c),function(e,t,n){var r,o=n,i=[];if(o){for(;o=o.firstChild;){if(e.isBlock(o))return;jo.isElement(o)&&!t[o.nodeName.toLowerCase()]&&i.push(o)}for(r=i.length;r--;)!(o=i[r]).hasChildNodes()||o.firstChild===o.lastChild&&""===o.firstChild.nodeValue?e.remove(o):(a=e,(u=o)&&"A"===u.nodeName&&a.isEmpty(u)&&e.remove(o));var a,u}}(x,N,r),p=x,(h=c).normalize(),(v=h.lastChild)&&!/^(left|right)$/gi.test(p.getStyle(v,"float",!0))||p.add(h,"br"),x.isEmpty(c)&&sx(c),r.normalize(),x.isEmpty(r)?(x.remove(r),k()):(gx(a,r),QC(a,r))),x.setAttrib(r,"id",""),a.fire("NewBlock",{newBlock:r})))},hx=function(e,t){return ex(e).filter(function(e){return 0<t.length&&Lr(ar.fromDom(e),t)}).isSome()},vx=function(e){return hx(e,Sl(e))},yx=function(e){return hx(e,Tl(e))},bx=xf([{br:[]},{block:[]},{none:[]}]),Cx=function(e,t){return yx(e)},xx=function(n){return function(e,t){return""===Nl(e)===n}},wx=function(n){return function(e,t){return nx(e)===n}},Nx=function(n,r){return function(e,t){return tx(e)===n.toUpperCase()===r}},Ex=function(e){return Nx("pre",e)},Sx=function(n){return function(e,t){return wl(e)===n}},Tx=function(e,t){return vx(e)},kx=function(e,t){return t},_x=function(e){var t=Nl(e),n=ZC(e.dom,e.selection.getStart());return n&&e.schema.isValidChild(n.nodeName,t||"P")},Ax=function(e,t){return function(n,r){return j(e,function(e,t){return e&&t(n,r)},!0)?_.some(t):_.none()}},Rx=function(e,t){return yd([Ax([Cx],bx.none()),Ax([Nx("summary",!0)],bx.br()),Ax([Ex(!0),Sx(!1),kx],bx.br()),Ax([Ex(!0),Sx(!1)],bx.block()),Ax([Ex(!0),Sx(!0),kx],bx.block()),Ax([Ex(!0),Sx(!0)],bx.br()),Ax([wx(!0),kx],bx.br()),Ax([wx(!0)],bx.block()),Ax([xx(!0),kx,_x],bx.block()),Ax([xx(!0)],bx.br()),Ax([Tx],bx.br()),Ax([xx(!1),kx],bx.br()),Ax([_x],bx.block())],[e,t.shiftKey]).getOr(bx.none())},Dx=function(e,t){Rx(e,t).fold(function(){jg(e,t)},function(){px(e,t)},o)},Ox=function(o){o.on("keydown",function(e){var t,n,r;e.keyCode===rv.ENTER&&(t=o,(n=e).isDefaultPrevented()||(n.preventDefault(),(r=t.undoManager).typing&&(r.typing=!1,r.add()),t.undoManager.transact(function(){!1===t.selection.isCollapsed()&&t.execCommand("Delete"),Dx(t,n)})))})},Bx=function(n,r){var e=r.container(),t=r.offset();return jo.isText(e)?(e.insertData(t,n),_.some(Su(e,t+n.length))):Is(r).map(function(e){var t=ar.fromText(n);return r.isAtEnd()?Ii(e,t):Pi(e,t),Su(t.dom(),n.length)})},Px=d(Bx,"\xa0"),Ix=d(Bx," "),Lx=function(e,t,n){return sc.navigateIgnore(e,t,n,Pf)},Fx=function(e,t){return X(uf(ar.fromDom(t.container()),e),Co)},Mx=function(e,n,r){return Lx(e,n.dom(),r).forall(function(t){return Fx(n,r).fold(function(){return!1===Ts(t,r,n.dom())},function(e){return!1===Ts(t,r,n.dom())&&zr(e,ar.fromDom(t.container()))})})},zx=function(t,n,r){return Fx(n,r).fold(function(){return Lx(t,n.dom(),r).forall(function(e){return!1===Ts(e,r,n.dom())})},function(e){return Lx(t,e.dom(),r).isNone()})},Ux=d(zx,!1),jx=d(zx,!0),Vx=d(Mx,!1),Hx=d(Mx,!0),qx=function(e){return Su.isTextPosition(e)&&!e.isAtStart()&&!e.isAtEnd()},$x=function(e,t){var n=U(uf(ar.fromDom(t.container()),e),Co);return Z(n).getOr(e)},Wx=function(e,t){return qx(t)?Bf(t):Bf(t)||sc.prevPosition($x(e,t).dom(),t).exists(Bf)},Kx=function(e,t){return qx(t)?Of(t):Of(t)||sc.nextPosition($x(e,t).dom(),t).exists(Of)},Xx=function(e){return Is(e).bind(function(e){return na(e,dr)}).exists(function(e){return t=kr(e,"white-space"),F(["pre","pre-wrap"],t);var t})},Yx=function(e,t){return o=e,i=t,sc.prevPosition(o.dom(),i).isNone()||(n=e,r=t,sc.nextPosition(n.dom(),r).isNone())||Ux(e,t)||jx(e,t)||Sf(e,t)||Ef(e,t);var n,r,o,i},Gx=function(e,t){var n,r,o,i=(r=(n=t).container(),o=n.offset(),jo.isText(r)&&o<r.data.length?Su(r,o+1):n);return!Xx(i)&&(jx(e,i)||Hx(e,i)||Ef(e,i)||Kx(e,i))},Jx=function(e,t){return n=e,!Xx(r=t)&&(Ux(n,r)||Vx(n,r)||Sf(n,r)||Wx(n,r))||Gx(e,t);var n,r},Qx=function(e,t){return _f(e.charAt(t))},Zx=function(e){var t=e.container();return jo.isText(t)&&Yn(t.data,"\xa0")},ew=function(e){var n,t=e.data,r=(n=t.split(""),W(n,function(e,t){return _f(e)&&0<t&&t<n.length-1&&Rf(n[t-1])&&Rf(n[t+1])?" ":e}).join(""));return r!==t&&(e.data=r,!0)},tw=function(l,e){return _.some(e).filter(Zx).bind(function(e){var t,n,r,o,i,a,u,s,c=e.container();return i=l,u=(a=c).data,s=Su(a,0),Qx(u,0)&&!Jx(i,s)&&(a.data=" "+u.slice(1),1)||ew(c)||(t=l,r=(n=c).data,o=Su(n,r.length-1),Qx(r,r.length-1)&&!Jx(t,o)&&(n.data=r.slice(0,-1)+" ",1))?_.some(e):_.none()})},nw=function(t){var e=ar.fromDom(t.getBody());t.selection.isCollapsed()&&tw(e,Su.fromRangeStart(t.selection.getRng())).each(function(e){t.selection.setRng(e.toRange())})},rw=function(r,o){return function(e){return t=r,!Xx(n=e)&&(Yx(t,n)||Wx(t,n)||Kx(t,n))?Px(o):Ix(o);var t,n}},ow=function(e){var t,n,r=_u.fromRangeStart(e.selection.getRng()),o=ar.fromDom(e.getBody());if(e.selection.isCollapsed()){var i=d(Vl.isInlineTarget,e),a=_u.fromRangeStart(e.selection.getRng());return Ld(i,e.getBody(),a).bind((n=o,function(e){return e.fold(function(e){return sc.prevPosition(n.dom(),_u.before(e))},function(e){return sc.firstPositionIn(e)},function(e){return sc.lastPositionIn(e)},function(e){return sc.nextPosition(n.dom(),_u.after(e))})})).bind(rw(o,r)).exists((t=e,function(e){return t.selection.setRng(e.toRange()),t.nodeChanged(),!0}))}return!1},iw=function(r){r.on("keydown",function(e){var t,n;!1===e.isDefaultPrevented()&&(t=r,n=e,XC([{keyCode:rv.SPACEBAR,action:KC(ow,t)}],n).each(function(e){n.preventDefault()}))})},aw=function(e,t){var n;t.hasAttribute("data-mce-caret")&&(Pa(t),(n=e).selection.setRng(n.selection.getRng()),e.selection.scrollIntoView(t))},uw=function(e,t){var n,r=(n=e,oa(ar.fromDom(n.getBody()),"*[data-mce-caret]").fold(q(null),function(e){return e.dom()}));if(r)return"compositionstart"===t.type?(t.preventDefault(),t.stopPropagation(),void aw(e,r)):void(_a(r)&&(aw(e,r),e.undoManager.add()))},sw=function(e){e.on("keyup compositionstart",d(uw,e))},cw=or.detect().browser,lw=function(t){var e,n;e=t,n=Vi(function(){e.composing||nw(e)},0),cw.isIE()&&(e.on("keypress",function(e){n.throttle()}),e.on("remove",function(e){n.cancel()})),t.on("input",function(e){!1===e.isComposing&&nw(t)})},fw=function(r){r.on("keydown",function(e){var t,n;!1===e.isDefaultPrevented()&&(t=r,n=e,XC([{keyCode:rv.END,action:EC(t,!0)},{keyCode:rv.HOME,action:EC(t,!1)}],n).each(function(e){n.preventDefault()}))})},dw=function(e){var t=Xd.setupSelectedState(e);sw(e),YC(e,t),GC(e,t),Ox(e),iw(e),lw(e),fw(e)};function mw(u){var s,n,r,o=Xt.each,c=rv.BACKSPACE,l=rv.DELETE,f=u.dom,d=u.selection,e=u.settings,t=u.parser,i=fe.gecko,a=fe.ie,m=fe.webkit,g="data:text/mce-internal,",p=a?"Text":"URL",h=function(e,t){try{u.getDoc().execCommand(e,!1,t)}catch(n){}},v=function(e){return e.isDefaultPrevented()},y=function(){u.shortcuts.add("meta+a",null,"SelectAll")},b=function(){u.on("keydown",function(e){if(!v(e)&&e.keyCode===c&&d.isCollapsed()&&0===d.getRng().startOffset){var t=d.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})},C=function(){u.inline||(u.contentStyles.push("body {min-height: 150px}"),u.on("click",function(e){var t;if("HTML"===e.target.nodeName){if(11<fe.ie)return void u.getBody().focus();t=u.selection.getRng(),u.getBody().focus(),u.selection.setRng(t),u.selection.normalize(),u.nodeChanged()}}))};return u.on("keydown",function(e){var t,n,r,o,i;if(!v(e)&&e.keyCode===rv.BACKSPACE&&(n=(t=d.getRng()).startContainer,r=t.startOffset,o=f.getRoot(),i=n,t.collapsed&&0===r)){for(;i&&i.parentNode&&i.parentNode.firstChild===i&&i.parentNode!==o;)i=i.parentNode;"BLOCKQUOTE"===i.tagName&&(u.formatter.toggle("blockquote",null,i),(t=f.createRng()).setStart(n,0),t.setEnd(n,0),d.setRng(t))}}),s=function(e){var t=f.create("body"),n=e.cloneContents();return t.appendChild(n),d.serializer.serialize(t,{format:"html"})},u.on("keydown",function(e){var t,n,r,o,i,a=e.keyCode;if(!v(e)&&(a===l||a===c)){if(t=u.selection.isCollapsed(),n=u.getBody(),t&&!f.isEmpty(n))return;if(!t&&(r=u.selection.getRng(),o=s(r),(i=f.createRng()).selectNode(u.getBody()),o!==s(i)))return;e.preventDefault(),u.setContent(""),n.firstChild&&f.isBlock(n.firstChild)?u.selection.setCursorLocation(n.firstChild,0):u.selection.setCursorLocation(n,0),u.nodeChanged()}}),fe.windowsPhone||u.on("keyup focusin mouseup",function(e){rv.modifierPressed(e)||d.normalize()},!0),m&&(u.settings.content_editable||f.bind(u.getDoc(),"mousedown mouseup",function(e){var t;if(e.target===u.getDoc().documentElement)if(t=d.getRng(),u.getBody().focus(),"mousedown"===e.type){if(ka(t.startContainer))return;d.placeCaretAt(e.clientX,e.clientY)}else d.setRng(t)}),u.on("click",function(e){var t=e.target;/^(IMG|HR)$/.test(t.nodeName)&&"false"!==f.getContentEditableParent(t)&&(e.preventDefault(),u.selection.select(t),u.nodeChanged()),"A"===t.nodeName&&f.hasClass(t,"mce-item-anchor")&&(e.preventDefault(),d.select(t))}),e.forced_root_block&&u.on("init",function(){h("DefaultParagraphSeparator",e.forced_root_block)}),u.on("init",function(){u.dom.bind(u.getBody(),"submit",function(e){e.preventDefault()})}),b(),t.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"===e[t].attr("class")&&e[t].remove()}),fe.iOS?(u.inline||u.on("keydown",function(){V.document.activeElement===V.document.body&&u.getWin().focus()}),C(),u.on("click",function(e){var t=e.target;do{if("A"===t.tagName)return void e.preventDefault()}while(t=t.parentNode)}),u.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")):y()),11<=fe.ie&&(C(),b()),fe.ie&&(y(),h("AutoUrlDetect",!1),u.on("dragstart",function(e){var t,n,r;(t=e).dataTransfer&&(u.selection.isCollapsed()&&"IMG"===t.target.tagName&&d.select(t.target),0<(n=u.selection.getContent()).length&&(r=g+escape(u.id)+","+escape(n),t.dataTransfer.setData(p,r)))}),u.on("drop",function(e){if(!v(e)){var t=(i=e).dataTransfer&&(a=i.dataTransfer.getData(p))&&0<=a.indexOf(g)?(a=a.substr(g.length).split(","),{id:unescape(a[0]),html:unescape(a[1])}):null;if(t&&t.id!==u.id){e.preventDefault();var n=Bb(e.x,e.y,u.getDoc());d.setRng(n),r=t.html,o=!0,u.queryCommandSupported("mceInsertClipboardContent")?u.execCommand("mceInsertClipboardContent",!1,{content:r,internal:o}):u.execCommand("mceInsertContent",!1,r)}}var r,o,i,a})),i&&(u.on("keydown",function(e){if(!v(e)&&e.keyCode===c){if(!u.getBody().getElementsByTagName("hr").length)return;if(d.isCollapsed()&&0===d.getRng().startOffset){var t=d.getNode(),n=t.previousSibling;if("HR"===t.nodeName)return f.remove(t),void e.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(f.remove(n),e.preventDefault())}}}),V.Range.prototype.getClientRects||u.on("mousedown",function(e){if(!v(e)&&"HTML"===e.target.nodeName){var t=u.getBody();t.blur(),he.setEditorTimeout(u,function(){t.focus()})}}),n=function(){var e=f.getAttribs(d.getStart().cloneNode(!1));return function(){var t=d.getStart();t!==u.getBody()&&(f.setAttrib(t,"style",null),o(e,function(e){t.setAttributeNode(e.cloneNode(!0))}))}},r=function(){return!d.isCollapsed()&&f.getParent(d.getStart(),f.isBlock)!==f.getParent(d.getEnd(),f.isBlock)},u.on("keypress",function(e){var t;if(!v(e)&&(8===e.keyCode||46===e.keyCode)&&r())return t=n(),u.getDoc().execCommand("delete",!1,null),t(),e.preventDefault(),!1}),f.bind(u.getDoc(),"cut",function(e){var t;!v(e)&&r()&&(t=n(),he.setEditorTimeout(u,function(){t()}))}),e.readonly||u.on("BeforeExecCommand MouseDown",function(){h("StyleWithCSS",!1),h("enableInlineTableEditing",!1),e.object_resizing||h("enableObjectResizing",!1)}),u.on("SetContent ExecCommand",function(e){"setcontent"!==e.type&&"mceInsertLink"!==e.command||o(f.select("a"),function(e){var t=e.parentNode,n=f.getRoot();if(t.lastChild===e){for(;t&&!f.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}f.add(t,"br",{"data-mce-bogus":1})}})}),u.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"),fe.mac&&u.on("keydown",function(e){!rv.metaKeyPressed(e)||e.shiftKey||37!==e.keyCode&&39!==e.keyCode||(e.preventDefault(),u.selection.getSel().modify("move",37===e.keyCode?"backward":"forward","lineboundary"))}),b()),{refreshContentEditable:function(){},isHidden:function(){var e;return!i||u.removed?0:!(e=u.selection.getSel())||!e.rangeCount||0===e.rangeCount}}}var gw=function(e){return jo.isElement(e)&&No(ar.fromDom(e))},pw=function(t){t.on("click",function(e){3<=e.detail&&function(e){var t=e.selection.getRng(),n=Su.fromRangeStart(t),r=Su.fromRangeEnd(t);if(Su.isElementPosition(n)){var o=n.container();gw(o)&&sc.firstPositionIn(o).each(function(e){return t.setStart(e.container(),e.offset())})}Su.isElementPosition(r)&&(o=n.container(),gw(o)&&sc.lastPositionIn(o).each(function(e){return t.setEnd(e.container(),e.offset())})),e.selection.setRng(cl(t))}(t)})},hw=function(e){var t,n;(t=e).on("click",function(e){t.dom.getParent(e.target,"details")&&e.preventDefault()}),(n=e).parser.addNodeFilter("details",function(e){z(e,function(e){e.attr("data-mce-open",e.attr("open")),e.attr("open","open")})}),n.serializer.addNodeFilter("details",function(e){z(e,function(e){var t=e.attr("data-mce-open");e.attr("open",S(t)?t:null),e.attr("data-mce-open",null)})})},vw=Si.DOM,yw=function(e){var t;e.bindPendingEventDelegates(),e.initialized=!0,e.fire("init"),e.focus(!0),e.nodeChanged({initial:!0}),e.execCallback("init_instance_callback",e),(t=e).settings.auto_focus&&he.setEditorTimeout(t,function(){var e;(e=!0===t.settings.auto_focus?t:t.editorManager.get(t.settings.auto_focus)).destroyed||e.focus()},100)},bw=function(t,e){var n,r,u,o,i,a,s,c,l,f=t.settings,d=t.getElement(),m=t.getDoc();f.inline||(t.getElement().style.visibility=t.orgVisibility),e||f.content_editable||(m.open(),m.write(t.iframeHTML),m.close()),f.content_editable&&(t.on("remove",function(){var e=this.getBody();vw.removeClass(e,"mce-content-body"),vw.removeClass(e,"mce-edit-focus"),vw.setAttrib(e,"contentEditable",null)}),vw.addClass(d,"mce-content-body"),t.contentDocument=m=f.content_document||V.document,t.contentWindow=f.content_window||V.window,t.bodyElement=d,f.content_document=f.content_window=null,f.root_name=d.nodeName.toLowerCase()),(n=t.getBody()).disabled=!0,t.readonly=f.readonly,t.readonly||(t.inline&&"static"===vw.getStyle(n,"position",!0)&&(n.style.position="relative"),n.contentEditable=t.getParam("content_editable_state",!0)),n.disabled=!1,t.editorUpload=qh(t),t.schema=di(f),t.dom=Si(m,{keep_values:!0,url_converter:t.convertURL,url_converter_scope:t,hex_colors:f.force_hex_style_colors,class_filter:f.class_filter,update_styles:!0,root_element:t.inline?t.getBody():null,collect:f.content_editable,schema:t.schema,contentCssCors:zl(t),onSetAttrib:function(e){t.fire("SetAttrib",e)}}),t.parser=((o=bb((u=t).settings,u.schema)).addAttributeFilter("src,href,style,tabindex",function(e,t){for(var n,r,o,i=e.length,a=u.dom;i--;)if(r=(n=e[i]).attr(t),o="data-mce-"+t,!n.attributes.map[o]){if(0===r.indexOf("data:")||0===r.indexOf("blob:"))continue;"style"===t?((r=a.serializeStyle(a.parseStyle(r),n.name)).length||(r=null),n.attr(o,r),n.attr(t,r)):"tabindex"===t?(n.attr(o,r),n.attr(t,null)):n.attr(o,u.convertURL(r,t,n.name))}}),o.addNodeFilter("script",function(e){for(var t,n,r=e.length;r--;)0!==(n=(t=e[r]).attr("type")||"no/type").indexOf("mce-")&&t.attr("type","mce-"+n)}),o.addNodeFilter("#cdata",function(e){for(var t,n=e.length;n--;)(t=e[n]).type=8,t.name="#comment",t.value="[CDATA["+t.value+"]]"}),o.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t,n=e.length,r=u.schema.getNonEmptyElements();n--;)(t=e[n]).isEmpty(r)&&0===t.getAll("br").length&&(t.append(new sb("br",1)).shortEnded=!0)}),o),t.serializer=Eb(f,t),t.selection=uC(t.dom,t.getWin(),t.serializer,t),t.annotator=Hc(t),t.formatter=Gy(t),t.undoManager=ry(t),t._nodeChangeDispatcher=new ev(t),t._selectionOverrides=Bv(t),hw(t),pw(t),dw(t),Xh(t),t.fire("PreInit"),f.browser_spellcheck||f.gecko_spellcheck||(m.body.spellcheck=!1,vw.setAttrib(n,"spellcheck","false")),t.quirks=mw(t),t.fire("PostRender"),f.directionality&&(n.dir=f.directionality),f.nowrap&&(n.style.whiteSpace="nowrap"),f.protect&&t.on("BeforeSetContent",function(t){Xt.each(f.protect,function(e){t.content=t.content.replace(e,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})})}),t.on("SetContent",function(){t.addVisual(t.getBody())}),t.load({initial:!0,format:"html"}),t.startContent=t.getContent({format:"raw"}),t.on("compositionstart compositionend",function(e){t.composing="compositionstart"===e.type}),0<t.contentStyles.length&&(r="",Xt.each(t.contentStyles,function(e){r+=e+"\r\n"}),t.dom.addStyle(r)),(i=t,i.inline?vw.styleSheetLoader:i.dom.styleSheetLoader).loadAll(t.contentCSS,function(e){yw(t)},function(e){yw(t)}),f.content_style&&(a=t,s=f.content_style,c=ar.fromDom(a.getDoc().head),l=ar.fromTag("style"),wr(l,"type","text/css"),Fi(l,ar.fromText(s)),Fi(c,l))},Cw=Si.DOM,xw=function(e,t){var n,r,o,i,a,u,s,c=e.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),l=(n=e.id,r=c,o=t.height,i=hl(e),s=ar.fromTag("iframe"),Nr(s,i),Nr(s,{id:n+"_ifr",frameBorder:"0",allowTransparency:"true",title:r}),Tr(s,{width:"100%",height:(a=o,u="number"==typeof a?a+"px":a,u||""),display:"block"}),s).dom();l.onload=function(){l.onload=null,e.fire("load")};var f,d,m,g,p=function(e,t){if(V.document.domain!==V.window.location.hostname&&fe.ie&&fe.ie<12){var n=Hh.uuid("mce");e[n]=function(){bw(e)};var r='javascript:(function(){document.open();document.domain="'+V.document.domain+'";var ed = window.parent.tinymce.get("'+e.id+'");document.write(ed.iframeHTML);document.close();ed.'+n+"(true);})()";return Cw.setAttrib(t,"src",r),!0}return!1}(e,l);return e.contentAreaContainer=t.iframeContainer,e.iframeElement=l,e.iframeHTML=(g=vl(f=e)+"<html><head>",yl(f)!==f.documentBaseUrl&&(g+='<base href="'+f.documentBaseURI.getURI()+'" />'),g+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',d=bl(f),m=Cl(f),xl(f)&&(g+='<meta http-equiv="Content-Security-Policy" content="'+xl(f)+'" />'),g+='</head><body id="'+d+'" class="mce-content-body '+m+'" data-id="'+f.id+'"><br></body></html>'),Cw.add(t.iframeContainer,l),p},ww=function(e,t){var n=xw(e,t);t.editorContainer&&(Cw.get(t.editorContainer).style.display=e.orgDisplay,e.hidden=Cw.isHidden(t.editorContainer)),e.getElement().style.display="none",Cw.setAttrib(e.id,"aria-hidden","true"),n||bw(e)},Nw=Si.DOM,Ew=function(t,n,e){var r=_h.get(e),o=_h.urls[e]||t.documentBaseUrl.replace(/\/$/,"");if(e=Xt.trim(e),r&&-1===Xt.inArray(n,e)){if(Xt.each(_h.dependencies(e),function(e){Ew(t,n,e)}),t.plugins[e])return;try{var i=new r(t,o,t.$);(t.plugins[e]=i).init&&(i.init(t,o),n.push(e))}catch(iE){kh.pluginInitError(t,e,iE)}}},Sw=function(e){return e.replace(/^\-/,"")},Tw=function(e){return{editorContainer:e,iframeContainer:e}},kw=function(e){var t,n,r=e.getElement();return e.inline?Tw(null):(t=r,n=Nw.create("div"),Nw.insertAfter(n,t),Tw(n))},_w=function(e){var t,n,r,o,i,a,u,s,c,l,f,d=e.settings,m=e.getElement();return e.orgDisplay=m.style.display,S(d.theme)?(l=(o=e).settings,f=o.getElement(),i=l.width||Nw.getStyle(f,"width")||"100%",a=l.height||Nw.getStyle(f,"height")||f.offsetHeight,u=l.min_height||100,(s=/^[0-9\.]+(|px)$/i).test(""+i)&&(i=Math.max(parseInt(i,10),100)),s.test(""+a)&&(a=Math.max(parseInt(a,10),u)),c=o.theme.renderUI({targetNode:f,width:i,height:a,deltaWidth:l.delta_width,deltaHeight:l.delta_height}),l.content_editable||(a=(c.iframeHeight||a)+("number"==typeof a?c.deltaHeight||0:""))<u&&(a=u),c.height=a,c):D(d.theme)?(r=(t=e).getElement(),(n=t.settings.theme(t,r)).editorContainer.nodeType&&(n.editorContainer.id=n.editorContainer.id||t.id+"_parent"),n.iframeContainer&&n.iframeContainer.nodeType&&(n.iframeContainer.id=n.iframeContainer.id||t.id+"_iframecontainer"),n.height=n.iframeHeight?n.iframeHeight:r.offsetHeight,n):kw(e)},Aw=function(t){var e,n,r,o,i,a,u=t.settings,s=t.getElement();return t.rtl=u.rtl_ui||t.editorManager.i18n.rtl,t.editorManager.i18n.setCode(u.language),u.aria_label=u.aria_label||Nw.getAttrib(s,"aria-label",t.getLang("aria.rich_text_area")),t.fire("ScriptsLoaded"),o=(n=t).settings.theme,S(o)?(n.settings.theme=Sw(o),r=Ah.get(o),n.theme=new r(n,Ah.urls[o]),n.theme.init&&n.theme.init(n,Ah.urls[o]||n.documentBaseUrl.replace(/\/$/,""),n.$)):n.theme={},i=t,a=[],Xt.each(i.settings.plugins.split(/[ ,]/),function(e){Ew(i,a,Sw(e))}),e=_w(t),t.editorContainer=e.editorContainer?e.editorContainer:null,u.content_css&&Xt.each(Xt.explode(u.content_css),function(e){t.contentCSS.push(t.documentBaseURI.toAbsolute(e))}),u.content_editable?bw(t):ww(t,e)},Rw=Si.DOM,Dw=function(e){return"-"===e.charAt(0)},Ow=function(i,a){var u=Ri.ScriptLoader;!function(e,t,n,r){var o=t.settings,i=o.theme;if(S(i)){if(!Dw(i)&&!Ah.urls.hasOwnProperty(i)){var a=o.theme_url;a?Ah.load(i,t.documentBaseURI.toAbsolute(a)):Ah.load(i,"themes/"+i+"/theme"+n+".js")}e.loadQueue(function(){Ah.waitFor(i,r)})}else r()}(u,i,a,function(){var e,t,n,r,o;e=u,(n=(t=i).settings).language&&"en"!==n.language&&!n.language_url&&(n.language_url=t.editorManager.baseURL+"/langs/"+n.language+".js"),n.language_url&&!t.editorManager.i18n.data[n.language]&&e.add(n.language_url),r=i.settings,o=a,Xt.isArray(r.plugins)&&(r.plugins=r.plugins.join(" ")),Xt.each(r.external_plugins,function(e,t){_h.load(t,e),r.plugins+=" "+t}),Xt.each(r.plugins.split(/[ ,]/),function(e){if((e=Xt.trim(e))&&!_h.urls[e])if(Dw(e)){e=e.substr(1,e.length);var t=_h.dependencies(e);Xt.each(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"};e=_h.createUrl(t,e),_h.load(e.resource,e)})}else _h.load(e,{prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"})}),u.loadQueue(function(){i.removed||Aw(i)},i,function(e){kh.pluginLoadError(i,e[0]),i.removed||Aw(i)})})},Bw=function(t){var e=t.settings,n=t.id,r=function(){Rw.unbind(V.window,"ready",r),t.render()};if(Se.Event.domLoaded){if(t.getElement()&&fe.contentEditable){e.inline?t.inline=!0:(t.orgVisibility=t.getElement().style.visibility,t.getElement().style.visibility="hidden");var o=t.getElement().form||Rw.getParent(n,"form");o&&(t.formElement=o,e.hidden_input&&!/TEXTAREA|INPUT/i.test(t.getElement().nodeName)&&(Rw.insertAfter(Rw.create("input",{type:"hidden",name:n}),n),t.hasHiddenInput=!0),t.formEventDelegate=function(e){t.fire(e.type,e)},Rw.bind(o,"submit reset",t.formEventDelegate),t.on("reset",function(){t.setContent(t.startContent,{format:"raw"})}),!e.submit_patch||o.submit.nodeType||o.submit.length||o._mceOldSubmit||(o._mceOldSubmit=o.submit,o.submit=function(){return t.editorManager.triggerSave(),t.setDirty(!1),o._mceOldSubmit(o)})),t.windowManager=yh(t),t.notificationManager=vh(t),"xml"===e.encoding&&t.on("GetContent",function(e){e.save&&(e.content=Rw.encode(e.content))}),e.add_form_submit_trigger&&t.on("submit",function(){t.initialized&&t.save()}),e.add_unload_trigger&&(t._beforeUnload=function(){!t.initialized||t.destroyed||t.isHidden()||t.save({format:"raw",no_events:!0,set_dirty:!1})},t.editorManager.on("BeforeUnload",t._beforeUnload)),t.editorManager.add(t),Ow(t,t.suffix)}}else Rw.bind(V.window,"ready",r)},Pw=function(e,t,n){var r=e.sidebars?e.sidebars:[];r.push({name:t,settings:n}),e.sidebars=r},Iw=Xt.each,Lw=Xt.trim,Fw="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),Mw={ftp:21,http:80,https:443,mailto:25},zw=function(r,e){var t,n,o=this;if(r=Lw(r),t=(e=o.settings=e||{}).base_uri,/^([\w\-]+):([^\/]{2})/i.test(r)||/^\s*#/.test(r))o.source=r;else{var i=0===r.indexOf("//");0!==r.indexOf("/")||i||(r=(t&&t.protocol||"http")+"://mce_host"+r),/^[\w\-]*:?\/\//.test(r)||(n=e.base_uri?e.base_uri.path:new zw(V.document.location.href).directory,""==e.base_uri.protocol?r="//mce_host"+o.toAbsPath(n,r):(r=/([^#?]*)([#?]?.*)/.exec(r),r=(t&&t.protocol||"http")+"://mce_host"+o.toAbsPath(n,r[1])+r[2])),r=r.replace(/@@/g,"(mce_at)"),r=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(r),Iw(Fw,function(e,t){var n=r[t];n&&(n=n.replace(/\(mce_at\)/g,"@@")),o[e]=n}),t&&(o.protocol||(o.protocol=t.protocol),o.userInfo||(o.userInfo=t.userInfo),o.port||"mce_host"!==o.host||(o.port=t.port),o.host&&"mce_host"!==o.host||(o.host=t.host),o.source=""),i&&(o.protocol="")}};zw.prototype={setPath:function(e){e=/^(.*?)\/?(\w+)?$/.exec(e),this.path=e[0],this.directory=e[1],this.file=e[2],this.source="",this.getURI()},toRelative:function(e){var t;if("./"===e)return e;if("mce_host"!==(e=new zw(e,{base_uri:this})).host&&this.host!==e.host&&e.host||this.port!==e.port||this.protocol!==e.protocol&&""!==e.protocol)return e.getURI();var n=this.getURI(),r=e.getURI();return n===r||"/"===n.charAt(n.length-1)&&n.substr(0,n.length-1)===r?n:(t=this.toRelPath(this.path,e.path),e.query&&(t+="?"+e.query),e.anchor&&(t+="#"+e.anchor),t)},toAbsolute:function(e,t){return(e=new zw(e,{base_uri:this})).getURI(t&&this.isSameOrigin(e))},isSameOrigin:function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=Mw[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},toRelPath:function(e,t){var n,r,o,i=0,a="";if(e=(e=e.substring(0,e.lastIndexOf("/"))).split("/"),n=t.split("/"),e.length>=n.length)for(r=0,o=e.length;r<o;r++)if(r>=n.length||e[r]!==n[r]){i=r+1;break}if(e.length<n.length)for(r=0,o=n.length;r<o;r++)if(r>=e.length||e[r]!==n[r]){i=r+1;break}if(1===i)return t;for(r=0,o=e.length-(i-1);r<o;r++)a+="../";for(r=i-1,o=n.length;r<o;r++)a+=r!==i-1?"/"+n[r]:n[r];return a},toAbsPath:function(e,t){var n,r,o,i=0,a=[];for(r=/\/$/.test(t)?"/":"",e=e.split("/"),t=t.split("/"),Iw(e,function(e){e&&a.push(e)}),e=a,n=t.length-1,a=[];0<=n;n--)0!==t[n].length&&"."!==t[n]&&(".."!==t[n]?0<i?i--:a.push(t[n]):i++);return 0!==(o=(n=e.length-i)<=0?a.reverse().join("/"):e.slice(0,n).join("/")+"/"+a.reverse().join("/")).indexOf("/")&&(o="/"+o),r&&o.lastIndexOf("/")!==o.length-1&&(o+=r),o},getURI:function(e){var t,n=this;return n.source&&!e||(t="",e||(n.protocol?t+=n.protocol+"://":t+="//",n.userInfo&&(t+=n.userInfo+"@"),n.host&&(t+=n.host),n.port&&(t+=":"+n.port)),n.path&&(t+=n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),n.source=t),n.source}},zw.parseDataUri=function(e){var t,n;return e=decodeURIComponent(e).split(","),(n=/data:([^;]+)/.exec(e[0]))&&(t=n[1]),{type:t,data:e[1]}},zw.getDocumentBaseUrl=function(e){var t;return t=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?e.href:e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),t};var Uw=function(e,t,n){var r,o,i,a,u;if(t.format=t.format?t.format:"html",t.get=!0,t.getInner=!0,t.no_events||e.fire("BeforeGetContent",t),"raw"===t.format)r=Xt.trim(Uv.trimExternal(e.serializer,n.innerHTML));else if("text"===t.format)r=wa(n.innerText||n.textContent);else{if("tree"===t.format)return e.serializer.serialize(n,t);i=(o=e).serializer.serialize(n,t),a=Nl(o),u=new RegExp("^(<"+a+"[^>]*>(&nbsp;|&#160;|\\s|\xa0|<br \\/>|)<\\/"+a+">[\r\n]*|<br \\/>[\r\n]*)$"),r=i.replace(u,"")}return"text"===t.format||Ao(ar.fromDom(n))?t.content=r:t.content=Xt.trim(r),t.no_events||e.fire("GetContent",t),t.content},jw=function(e,t){t(e),e.firstChild&&jw(e.firstChild,t),e.next&&jw(e.next,t)},Vw=function(e,t,n){var r=function(e,n,t){var r={},o={},i=[];for(var a in t.firstChild&&jw(t.firstChild,function(t){z(e,function(e){e.name===t.name&&(r[e.name]?r[e.name].nodes.push(t):r[e.name]={filter:e,nodes:[t]})}),z(n,function(e){"string"==typeof t.attr(e.name)&&(o[e.name]?o[e.name].nodes.push(t):o[e.name]={filter:e,nodes:[t]})})}),r)r.hasOwnProperty(a)&&i.push(r[a]);for(var a in o)o.hasOwnProperty(a)&&i.push(o[a]);return i}(e,t,n);z(r,function(t){z(t.filter.callbacks,function(e){e(t.nodes,t.filter.name,{})})})},Hw=function(e){return e instanceof sb},qw=function(e,t){var r;e.dom.setHTML(e.getBody(),t),sh(r=e)&&sc.firstPositionIn(r.getBody()).each(function(e){var t=e.getNode(),n=jo.isTable(t)?sc.firstPositionIn(t).getOr(e):e;r.selection.setRng(n.toRange())})},$w=function(u,s,c){return void 0===c&&(c={}),c.format=c.format?c.format:"html",c.set=!0,c.content=Hw(s)?"":s,Hw(s)||c.no_events||(u.fire("BeforeSetContent",c),s=c.content),_.from(u.getBody()).fold(q(s),function(e){return Hw(s)?function(e,t,n,r){Vw(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),n);var o=al({validate:e.validate},e.schema).serialize(n);return r.content=Ao(ar.fromDom(t))?o:Xt.trim(o),qw(e,r.content),r.no_events||e.fire("SetContent",r),n}(u,e,s,c):(t=u,n=e,o=c,0===(r=s).length||/^\s+$/.test(r)?(a='<br data-mce-bogus="1">',"TABLE"===n.nodeName?r="<tr><td>"+a+"</td></tr>":/^(UL|OL)$/.test(n.nodeName)&&(r="<li>"+a+"</li>"),(i=Nl(t))&&t.schema.isValidChild(n.nodeName.toLowerCase(),i.toLowerCase())?(r=a,r=t.dom.createHTML(i,t.settings.forced_root_block_attrs,r)):r||(r='<br data-mce-bogus="1">'),qw(t,r),t.fire("SetContent",o)):("raw"!==o.format&&(r=al({validate:t.validate},t.schema).serialize(t.parser.parse(r,{isRootContent:!0,insert:!0}))),o.content=Ao(ar.fromDom(n))?r:Xt.trim(r),qw(t,o.content),o.no_events||t.fire("SetContent",o)),o.content);var t,n,r,o,i,a})},Ww=Si.DOM,Kw=function(e){return _.from(e).each(function(e){return e.destroy()})},Xw=function(e){if(!e.removed){var t=e._selectionOverrides,n=e.editorUpload,r=e.getBody(),o=e.getElement();r&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&o&&Ww.remove(o.nextSibling),Np(e),e.editorManager.remove(e),!e.inline&&r&&(i=e,Ww.setStyle(i.id,"display",i.orgDisplay)),Ep(e),Ww.remove(e.getContainer()),Kw(t),Kw(n),e.destroy()}var i},Yw=function(e,t){var n,r,o,i=e.selection,a=e.dom;e.destroyed||(t||e.removed?(t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),Kw(i),Kw(a)),(r=(n=e).formElement)&&(r._mceOldSubmit&&(r.submit=r._mceOldSubmit,r._mceOldSubmit=null),Ww.unbind(r,"submit reset",n.formEventDelegate)),(o=e).contentAreaContainer=o.formElement=o.container=o.editorContainer=null,o.bodyElement=o.contentDocument=o.contentWindow=null,o.iframeElement=o.targetElm=null,o.selection&&(o.selection=o.selection.win=o.selection.dom=o.selection.dom.doc=null),e.destroyed=!0):e.remove())},Gw=Si.DOM,Jw=Xt.extend,Qw=Xt.each,Zw=Xt.resolve,eN=fe.ie,tN=function(e,t,n){var r,o,i,a,u,s,c,l=this,f=l.documentBaseUrl=n.documentBaseURL,d=n.baseURI;r=l,o=e,i=f,a=n.defaultSettings,u=t,c={id:o,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:i,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"<!DOCTYPE html>",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,render_ui:!0,indentation:"40px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:(s=r).convertURL,url_converter_scope:s,ie7_compat:!0},t=$p(zp,c,a,u),l.settings=t,Bi.language=t.language||"en",Bi.languageLoad=t.language_load,Bi.baseURL=n.baseURL,l.id=e,l.setDirty(!1),l.plugins={},l.documentBaseURI=new zw(t.document_base_url,{base_uri:d}),l.baseURI=d,l.contentCSS=[],l.contentStyles=[],l.shortcuts=new Qp(l),l.loadedCSS={},l.editorCommands=new pp(l),l.suffix=n.suffix,l.editorManager=n,l.inline=t.inline,l.buttons={},l.menuItems={},t.cache_suffix&&(fe.cacheSuffix=t.cache_suffix.replace(/^[\?\&]+/,"")),!1===t.override_viewport&&(fe.overrideViewPort=!1),n.fire("SetupEditor",{editor:l}),l.execCallback("setup",l),l.$=gn.overrideDefaults(function(){return{context:l.inline?l.getBody():l.getDoc(),element:l.getBody()}})};Jw(tN.prototype={render:function(){Bw(this)},focus:function(e){uh(this,e)},hasFocus:function(){return sh(this)},execCallback:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r,o=this.settings[e];if(o)return this.callbackLookup&&(r=this.callbackLookup[e])&&(o=r.func,r=r.scope),"string"==typeof o&&(r=(r=o.replace(/\.\w+$/,""))?Zw(r):0,o=Zw(o),this.callbackLookup=this.callbackLookup||{},this.callbackLookup[e]={func:o,scope:r}),o.apply(r||this,Array.prototype.slice.call(arguments,1))},translate:function(e){if(e&&Xt.is(e,"string")){var n=this.settings.language||"en",r=this.editorManager.i18n;e=r.data[n+"."+e]||e.replace(/\{\#([^\}]+)\}/g,function(e,t){return r.data[n+"."+t]||"{#"+t+"}"})}return this.editorManager.translate(e)},getLang:function(e,t){return this.editorManager.i18n.data[(this.settings.language||"en")+"."+e]||(t!==undefined?t:"{#"+e+"}")},getParam:function(e,t,n){return Kp(this,e,t,n)},nodeChanged:function(e){this._nodeChangeDispatcher.nodeChanged(e)},addButton:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),t.stateSelector&&"undefined"==typeof t.active&&(t.active=!1),t.text||t.icon||(t.icon=e),t.tooltip=t.tooltip||t.title,n.buttons[e]=t},addSidebar:function(e,t){return Pw(this,e,t)},addMenuItem:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.menuItems[e]=t},addContextToolbar:function(e,t){var n,r=this;r.contextToolbars=r.contextToolbars||[],"string"==typeof e&&(n=e,e=function(e){return r.dom.is(e,n)}),r.contextToolbars.push({id:Hh.uuid("mcet"),predicate:e,items:t})},addCommand:function(e,t,n){this.editorCommands.addCommand(e,t,n)},addQueryStateHandler:function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},addQueryValueHandler:function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},addShortcut:function(e,t,n,r){this.shortcuts.add(e,t,n,r)},execCommand:function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},queryCommandState:function(e){return this.editorCommands.queryCommandState(e)},queryCommandValue:function(e){return this.editorCommands.queryCommandValue(e)},queryCommandSupported:function(e){return this.editorCommands.queryCommandSupported(e)},show:function(){this.hidden&&(this.hidden=!1,this.inline?this.getBody().contentEditable=!0:(Gw.show(this.getContainer()),Gw.hide(this.id)),this.load(),this.fire("show"))},hide:function(){var e=this,t=e.getDoc();e.hidden||(eN&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable=!1,e===e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(Gw.hide(e.getContainer()),Gw.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},isHidden:function(){return!!this.hidden},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var t,n=this.getElement();return this.removed?"":n?((e=e||{}).load=!0,t=this.setContent(n.value!==undefined?n.value:n.innerHTML,e),e.element=n,e.no_events||this.fire("LoadContent",e),e.element=n=null,t):void 0},save:function(e){var t,n,r=this,o=r.getElement();if(o&&r.initialized&&!r.removed)return(e=e||{}).save=!0,e.element=o,e.content=r.getContent(e),e.no_events||r.fire("SaveContent",e),"raw"===e.format&&r.fire("RawSaveContent",e),t=e.content,/TEXTAREA|INPUT/i.test(o.nodeName)?o.value=t:(!e.is_removing&&r.inline||(o.innerHTML=t),(n=Gw.getParent(r.id,"form"))&&Qw(n.elements,function(e){if(e.name===r.id)return e.value=t,!1})),e.element=o=null,!1!==e.set_dirty&&r.setDirty(!1),t},setContent:function(e,t){return $w(this,e,t)},getContent:function(e){return t=this,void 0===(n=e)&&(n={}),_.from(t.getBody()).fold(q("tree"===n.format?new sb("body",11):""),function(e){return Uw(t,n,e)});var t,n},insertContent:function(e,t){t&&(e=Jw({content:e},t)),this.execCommand("mceInsertContent",!1,e)},isDirty:function(){return!this.isNotDirty},setDirty:function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!==t&&this.fire("dirty")},setMode:function(e){var t,n;(n=e)!==Dp(t=this)&&(t.initialized?Rp(t,"readonly"===n):t.on("init",function(){Rp(t,"readonly"===n)}),Sp(t,n))},getContainer:function(){return this.container||(this.container=Gw.get(this.editorContainer||this.id+"_parent")),this.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return this.targetElm||(this.targetElm=Gw.get(this.id)),this.targetElm},getWin:function(){var e;return this.contentWindow||(e=this.iframeElement)&&(this.contentWindow=e.contentWindow),this.contentWindow},getDoc:function(){var e;return this.contentDocument||(e=this.getWin())&&(this.contentDocument=e.document),this.contentDocument},getBody:function(){var e=this.getDoc();return this.bodyElement||(e?e.body:null)},convertURL:function(e,t,n){var r=this.settings;return r.urlconverter_callback?this.execCallback("urlconverter_callback",e,n,!0,t):!r.convert_urls||n&&"LINK"===n.nodeName||0===e.indexOf("file:")||0===e.length?e:r.relative_urls?this.documentBaseURI.toRelative(e):e=this.documentBaseURI.toAbsolute(e,r.remove_script_host)},addVisual:function(e){var n,r=this,o=r.settings,i=r.dom;e=e||r.getBody(),r.hasVisual===undefined&&(r.hasVisual=o.visual),Qw(i.select("table,a",e),function(e){var t;switch(e.nodeName){case"TABLE":return n=o.visual_table_class||"mce-item-table",void((t=i.getAttrib(e,"border"))&&"0"!==t||!r.hasVisual?i.removeClass(e,n):i.addClass(e,n));case"A":return void(i.getAttrib(e,"href")||(t=i.getAttrib(e,"name")||e.id,n=o.visual_anchor_class||"mce-item-anchor",t&&r.hasVisual?i.addClass(e,n):i.removeClass(e,n)))}}),r.fire("VisualAid",{element:e,hasVisual:r.hasVisual})},remove:function(){Xw(this)},destroy:function(e){Yw(this,e)},uploadImages:function(e){return this.editorUpload.uploadImages(e)},_scanForImages:function(){return this.editorUpload.scanForImages()}},Fp);var nN,rN,oN,iN={isEditorUIElement:function(e){return-1!==e.className.toString().indexOf("mce-")}},aN=function(n,e){var t,r;or.detect().browser.isIE()?(r=n).on("focusout",function(){ip(r)}):(t=e,n.on("mouseup touchend",function(e){t.throttle()})),n.on("keyup nodechange",function(e){var t;"nodechange"===(t=e).type&&t.selectionChange||ip(n)})},uN=function(e){var t,n,r,o=Vi(function(){ip(e)},0);e.inline&&(t=e,n=o,r=function(){n.throttle()},Si.DOM.bind(V.document,"mouseup",r),t.on("remove",function(){Si.DOM.unbind(V.document,"mouseup",r)})),e.on("init",function(){aN(e,o)}),e.on("remove",function(){o.cancel()})},sN=Si.DOM,cN=function(e){return iN.isEditorUIElement(e)},lN=function(t,e){var n=t?t.settings.custom_ui_selector:"";return null!==sN.getParent(e,function(e){return cN(e)||!!n&&t.dom.is(e,n)})},fN=function(r,e){var t=e.editor;uN(t),t.on("focusin",function(){var e=r.focusedEditor;e!==this&&(e&&e.fire("blur",{focusedEditor:this}),r.setActive(this),(r.focusedEditor=this).fire("focus",{blurredEditor:e}),this.focus(!0))}),t.on("focusout",function(){var t=this;he.setEditorTimeout(t,function(){var e=r.focusedEditor;lN(t,function(){try{return V.document.activeElement}catch(e){return V.document.body}}())||e!==t||(t.fire("blur",{focusedEditor:null}),r.focusedEditor=null)})}),nN||(nN=function(e){var t,n=r.activeEditor;t=e.target,n&&t.ownerDocument===V.document&&(t===V.document.body||lN(n,t)||r.focusedEditor!==n||(n.fire("blur",{focusedEditor:null}),r.focusedEditor=null))},sN.bind(V.document,"focusin",nN))},dN=function(e,t){e.focusedEditor===t.editor&&(e.focusedEditor=null),e.activeEditor||(sN.unbind(V.document,"focusin",nN),nN=null)},mN=function(e){e.on("AddEditor",d(fN,e)),e.on("RemoveEditor",d(dN,e))},gN=Si.DOM,pN=Xt.explode,hN=Xt.each,vN=Xt.extend,yN=0,bN=!1,CN=[],xN=[],wN=function(t){var n=t.type;hN(oN.get(),function(e){switch(n){case"scroll":e.fire("ScrollWindow",t);break;case"resize":e.fire("ResizeWindow",t)}})},NN=function(e){e!==bN&&(e?gn(window).on("resize scroll",wN):gn(window).off("resize scroll",wN),bN=e)},EN=function(t){var e=xN;delete CN[t.id];for(var n=0;n<CN.length;n++)if(CN[n]===t){CN.splice(n,1);break}return xN=U(xN,function(e){return t!==e}),oN.activeEditor===t&&(oN.activeEditor=0<xN.length?xN[0]:null),oN.focusedEditor===t&&(oN.focusedEditor=null),e.length!==xN.length};vN(oN={defaultSettings:{},$:gn,majorVersion:"4",minorVersion:"9.11",releaseDate:"2020-07-13",editors:CN,i18n:xh,activeEditor:null,settings:{},setup:function(){var e,t,n="";t=zw.getDocumentBaseUrl(V.document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/"));var r=window.tinymce||window.tinyMCEPreInit;if(r)e=r.base||r.baseURL,n=r.suffix;else{for(var o=V.document.getElementsByTagName("script"),i=0;i<o.length;i++){var a;if(""!==(a=o[i].src||"")){var u=a.substring(a.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(a)){-1!==u.indexOf(".min")&&(n=".min"),e=a.substring(0,a.lastIndexOf("/"));break}}}!e&&V.document.currentScript&&(-1!==(a=V.document.currentScript.src).indexOf(".min")&&(n=".min"),e=a.substring(0,a.lastIndexOf("/")))}this.baseURL=new zw(t).toAbsolute(e),this.documentBaseURL=t,this.baseURI=new zw(this.baseURL),this.suffix=n,mN(this)},overrideDefaults:function(e){var t,n;(t=e.base_url)&&(this.baseURL=new zw(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new zw(this.baseURL)),n=e.suffix,e.suffix&&(this.suffix=n);var r=(this.defaultSettings=e).plugin_base_urls;for(var o in r)Bi.PluginManager.urls[o]=r[o]},init:function(r){var n,u,s=this;u=Xt.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option tbody tfoot thead tr script noscript style textarea video audio iframe object menu"," ");var c=function(e){var t=e.id;return t||(t=(t=e.name)&&!gN.get(t)?e.name:gN.uniqueId(),e.setAttribute("id",t)),t},l=function(e,t){return t.constructor===RegExp?t.test(e.className):gN.hasClass(e,t)},f=function(e){n=e},e=function(){var o,i=0,a=[],n=function(e,t,n){var r=new tN(e,t,s);a.push(r),r.on("init",function(){++i===o.length&&f(a)}),r.targetElm=r.targetElm||n,r.render()};gN.unbind(window,"ready",e),function(e){var t=r[e];t&&t.apply(s,Array.prototype.slice.call(arguments,2))}("onpageload"),o=gn.unique(function(t){var e,n=[];if(fe.ie&&fe.ie<11)return kh.initError("TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tinymce.com/docs/get-started/system-requirements/"),[];if(t.types)return hN(t.types,function(e){n=n.concat(gN.select(e.selector))}),n;if(t.selector)return gN.select(t.selector);if(t.target)return[t.target];switch(t.mode){case"exact":0<(e=t.elements||"").length&&hN(pN(e),function(t){var e;(e=gN.get(t))?n.push(e):hN(V.document.forms,function(e){hN(e.elements,function(e){e.name===t&&(t="mce_editor_"+yN++,gN.setAttrib(e,"id",t),n.push(e))})})});break;case"textareas":case"specific_textareas":hN(gN.select("textarea"),function(e){t.editor_deselector&&l(e,t.editor_deselector)||t.editor_selector&&!l(e,t.editor_selector)||n.push(e)})}return n}(r)),r.types?hN(r.types,function(t){Xt.each(o,function(e){return!gN.is(e,t.selector)||(n(c(e),vN({},r,t),e),!1)})}):(Xt.each(o,function(e){var t;(t=s.get(e.id))&&t.initialized&&!(t.getContainer()||t.getBody()).parentNode&&(EN(t),t.unbindAllNativeEvents(),t.destroy(!0),t.removed=!0,t=null)}),0===(o=Xt.grep(o,function(e){return!s.get(e.id)})).length?f([]):hN(o,function(e){var t;t=e,r.inline&&t.tagName.toLowerCase()in u?kh.initError("Could not initialize inline editor on invalid inline target element",e):n(c(e),r,e)}))};return s.settings=r,gN.bind(window,"ready",e),new de(function(t){n?t(n):f=function(e){t(e)}})},get:function(t){return 0===arguments.length?xN.slice(0):S(t)?X(xN,function(e){return e.id===t}).getOr(null):O(t)&&xN[t]?xN[t]:null},add:function(e){var t=this;return CN[e.id]===e||(null===t.get(e.id)&&("length"!==e.id&&(CN[e.id]=e),CN.push(e),xN.push(e)),NN(!0),t.activeEditor=e,t.fire("AddEditor",{editor:e}),rN||(rN=function(){t.fire("BeforeUnload")},gN.bind(window,"beforeunload",rN))),e},createEditor:function(e,t){return this.add(new tN(e,t,this))},remove:function(e){var t,n,r=this;if(e){if(!S(e))return n=e,A(r.get(n.id))?null:(EN(n)&&r.fire("RemoveEditor",{editor:n}),0===xN.length&&gN.unbind(window,"beforeunload",rN),n.remove(),NN(0<xN.length),n);hN(gN.select(e),function(e){(n=r.get(e.id))&&r.remove(n)})}else for(t=xN.length-1;0<=t;t--)r.remove(xN[t])},execCommand:function(e,t,n){var r=this.get(n);switch(e){case"mceAddEditor":return this.get(n)||new tN(n,this.settings,this).render(),!0;case"mceRemoveEditor":return r&&r.remove(),!0;case"mceToggleEditor":return r?r.isHidden()?r.show():r.hide():this.execCommand("mceAddEditor",0,n),!0}return!!this.activeEditor&&this.activeEditor.execCommand(e,t,n)},triggerSave:function(){hN(xN,function(e){e.save()})},addI18n:function(e,t){xh.add(e,t)},translate:function(e){return xh.translate(e)},setActive:function(e){var t=this.activeEditor;this.activeEditor!==e&&(t&&t.fire("deactivate",{relatedTarget:e}),e.fire("activate",{relatedTarget:t})),this.activeEditor=e}},Cp),oN.setup();var SN,TN=oN;function kN(n){return{walk:function(e,t){return Lc(n,e,t)},split:Um,normalize:function(t){return Dg(n,t).fold(q(!1),function(e){return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),!0})}}}(SN=kN||(kN={})).compareRanges=Eg,SN.getCaretRangeFromPoint=Bb,SN.getSelectedNode=Za,SN.getNode=eu;var _N,AN,RN=kN,DN=Math.min,ON=Math.max,BN=Math.round,PN=function(e,t,n){var r,o,i,a,u,s;return r=t.x,o=t.y,i=e.w,a=e.h,u=t.w,s=t.h,"b"===(n=(n||"").split(""))[0]&&(o+=s),"r"===n[1]&&(r+=u),"c"===n[0]&&(o+=BN(s/2)),"c"===n[1]&&(r+=BN(u/2)),"b"===n[3]&&(o-=a),"r"===n[4]&&(r-=i),"c"===n[3]&&(o-=BN(a/2)),"c"===n[4]&&(r-=BN(i/2)),IN(r,o,i,a)},IN=function(e,t,n,r){return{x:e,y:t,w:n,h:r}},LN={inflate:function(e,t,n){return IN(e.x-t,e.y-n,e.w+2*t,e.h+2*n)},relativePosition:PN,findBestRelativePosition:function(e,t,n,r){var o,i;for(i=0;i<r.length;i++)if((o=PN(e,t,r[i])).x>=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},intersect:function(e,t){var n,r,o,i;return n=ON(e.x,t.x),r=ON(e.y,t.y),o=DN(e.x+e.w,t.x+t.w),i=DN(e.y+e.h,t.y+t.h),o-n<0||i-r<0?null:IN(n,r,o-n,i-r)},clamp:function(e,t,n){var r,o,i,a,u,s,c,l,f,d;return u=e.x,s=e.y,c=e.x+e.w,l=e.y+e.h,f=t.x+t.w,d=t.y+t.h,r=ON(0,t.x-u),o=ON(0,t.y-s),i=ON(0,c-f),a=ON(0,l-d),u+=r,s+=o,n&&(c+=r,l+=o,u-=i,s-=a),IN(u,s,(c-=i)-u,(l-=a)-s)},create:IN,fromClientRect:function(e){return IN(e.left,e.top,e.width,e.height)}},FN={},MN={add:function(e,t){FN[e.toLowerCase()]=t},has:function(e){return!!FN[e.toLowerCase()]},get:function(e){var t=e.toLowerCase(),n=FN.hasOwnProperty(t)?FN[t]:null;if(null===n)throw new Error("Could not find module for type: "+e);return n},create:function(e,t){var n;if("string"==typeof e?(t=t||{}).type=e:e=(t=e).type,e=e.toLowerCase(),!(n=FN[e]))throw new Error("Could not find control by type: "+e);return(n=new n(t)).type=e,n}},zN=Xt.each,UN=Xt.extend,jN=function(){};jN.extend=_N=function(n){var e,t,r,o=this.prototype,i=function(){var e,t,n;if(!AN&&(this.init&&this.init.apply(this,arguments),t=this.Mixins))for(e=t.length;e--;)(n=t[e]).init&&n.init.apply(this,arguments)},a=function(){return this},u=function(n,r){return function(){var e,t=this._super;return this._super=o[n],e=r.apply(this,arguments),this._super=t,e}};for(t in AN=!0,e=new this,AN=!1,n.Mixins&&(zN(n.Mixins,function(e){for(var t in e)"init"!==t&&(n[t]=e[t])}),o.Mixins&&(n.Mixins=o.Mixins.concat(n.Mixins))),n.Methods&&zN(n.Methods.split(","),function(e){n[e]=a}),n.Properties&&zN(n.Properties.split(","),function(e){var t="_"+e;n[e]=function(e){return e!==undefined?(this[t]=e,this):this[t]}}),n.Statics&&zN(n.Statics,function(e,t){i[t]=e}),n.Defaults&&o.Defaults&&(n.Defaults=UN({},o.Defaults,n.Defaults)),n)"function"==typeof(r=n[t])&&o[t]?e[t]=u(t,r):e[t]=r;return i.prototype=e,(i.constructor=i).extend=_N,i};var VN=Math.min,HN=Math.max,qN=Math.round,$N=function(e,n){var r,o,t,i;if(n=n||'"',null===e)return"null";if("string"==(t=typeof e))return o="\bb\tt\nn\ff\rr\"\"''\\\\",n+e.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(r=o.indexOf(t))+1?"\\"+o.charAt(r+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e)})+n;if("object"===t){if(e.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(e)){for(r=0,o="[";r<e.length;r++)o+=(0<r?",":"")+$N(e[r],n);return o+"]"}for(i in o="{",e)e.hasOwnProperty(i)&&(o+="function"!=typeof e[i]?(1<o.length?","+n:n)+i+n+":"+$N(e[i],n):"");return o+"}"}return""+e},WN={serialize:$N,parse:function(e){try{return JSON.parse(e)}catch(t){}}},KN={callbacks:{},count:0,send:function(t){var n=this,r=Si.DOM,o=t.count!==undefined?t.count:n.count,i="tinymce_jsonp_"+o;n.callbacks[o]=function(e){r.remove(i),delete n.callbacks[o],t.callback(e)},r.add(r.doc.body,"script",{id:i,src:t.url,type:"text/javascript"}),n.count++}},XN={send:function(e){var t,n=0,r=function(){!e.async||4===t.readyState||1e4<n++?(e.success&&n<1e4&&200===t.status?e.success.call(e.success_scope,""+t.responseText,t,e):e.error&&e.error.call(e.error_scope,1e4<n?"TIMED_OUT":"GENERAL",t,e),t=null):setTimeout(r,10)};if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=!1!==e.async,e.data=e.data||"",XN.fire("beforeInitialize",{settings:e}),t=Rh()){if(t.overrideMimeType&&t.overrideMimeType(e.content_type),t.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(t.withCredentials=!0),e.content_type&&t.setRequestHeader("Content-Type",e.content_type),e.requestheaders&&Xt.each(e.requestheaders,function(e){t.setRequestHeader(e.key,e.value)}),t.setRequestHeader("X-Requested-With","XMLHttpRequest"),(t=XN.fire("beforeSend",{xhr:t,settings:e}).xhr).send(e.data),!e.async)return r();setTimeout(r,10)}}};Xt.extend(XN,Cp);var YN,GN,JN,QN,ZN=Xt.extend,eE=function(e){this.settings=ZN({},e),this.count=0};eE.sendRPC=function(e){return(new eE).send(e)},eE.prototype={send:function(n){var r=n.error,o=n.success;(n=ZN(this.settings,n)).success=function(e,t){void 0===(e=WN.parse(e))&&(e={error:"JSON Parse error."}),e.error?r.call(n.error_scope||n.scope,e.error,t):o.call(n.success_scope||n.scope,e.result)},n.error=function(e,t){r&&r.call(n.error_scope||n.scope,e,t)},n.data=WN.serialize({id:n.id||"c"+this.count++,method:n.method,params:n.params}),n.content_type="application/json",XN.send(n)}};try{YN=V.window.localStorage}catch(iE){GN={},JN=[],QN={getItem:function(e){var t=GN[e];return t||null},setItem:function(e,t){JN.push(e),GN[e]=String(t)},key:function(e){return JN[e]},removeItem:function(t){JN=JN.filter(function(e){return e===t}),delete GN[t]},clear:function(){JN=[],GN={}},length:0},Object.defineProperty(QN,"length",{get:function(){return JN.length},configurable:!1,enumerable:!1}),YN=QN}var tE,nE=TN,rE={geom:{Rect:LN},util:{Promise:de,Delay:he,Tools:Xt,VK:rv,URI:zw,Class:jN,EventDispatcher:vp,Observable:Cp,I18n:xh,XHR:XN,JSON:WN,JSONRequest:eE,JSONP:KN,LocalStorage:YN,Color:function(e){var n={},u=0,s=0,c=0,t=function(e){var t;return"object"==typeof e?"r"in e?(u=e.r,s=e.g,c=e.b):"v"in e&&function(e,t,n){var r,o,i,a;if(e=(parseInt(e,10)||0)%360,t=parseInt(t,10)/100,n=parseInt(n,10)/100,t=HN(0,VN(t,1)),n=HN(0,VN(n,1)),0!==t){switch(r=e/60,i=(o=n*t)*(1-Math.abs(r%2-1)),a=n-o,Math.floor(r)){case 0:u=o,s=i,c=0;break;case 1:u=i,s=o,c=0;break;case 2:u=0,s=o,c=i;break;case 3:u=0,s=i,c=o;break;case 4:u=i,s=0,c=o;break;case 5:u=o,s=0,c=i;break;default:u=s=c=0}u=qN(255*(u+a)),s=qN(255*(s+a)),c=qN(255*(c+a))}else u=s=c=qN(255*n)}(e.h,e.s,e.v):(t=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(u=parseInt(t[1],10),s=parseInt(t[2],10),c=parseInt(t[3],10)):(t=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(u=parseInt(t[1],16),s=parseInt(t[2],16),c=parseInt(t[3],16)):(t=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(u=parseInt(t[1]+t[1],16),s=parseInt(t[2]+t[2],16),c=parseInt(t[3]+t[3],16)),u=u<0?0:255<u?255:u,s=s<0?0:255<s?255:s,c=c<0?0:255<c?255:c,n};return e&&t(e),n.toRgb=function(){return{r:u,g:s,b:c}},n.toHsv=function(){return e=u,t=s,n=c,o=0,(i=VN(e/=255,VN(t/=255,n/=255)))===(a=HN(e,HN(t,n)))?{h:0,s:0,v:100*(o=i)}:(r=(a-i)/a,{h:qN(60*((e===i?3:n===i?1:5)-(e===i?t-n:n===i?e-t:n-e)/((o=a)-i))),s:qN(100*r),v:qN(100*o)});var e,t,n,r,o,i,a},n.toHex=function(){var e=function(e){return 1<(e=parseInt(e,10).toString(16)).length?e:"0"+e};return"#"+e(u)+e(s)+e(c)},n.parse=t,n}},dom:{EventUtils:Se,Sizzle:St,DomQuery:gn,TreeWalker:go,DOMUtils:Si,ScriptLoader:Ri,RangeUtils:RN,Serializer:Eb,ControlSelection:Db,BookmarkManager:_b,Selection:uC,Event:Se.Event},html:{Styles:gi,Entities:ti,Node:sb,Schema:di,SaxParser:Mv,DomParser:bb,Writer:il,Serializer:al},ui:{Factory:MN},Env:fe,AddOnManager:Bi,Annotator:Hc,Formatter:Gy,UndoManager:ry,EditorCommands:pp,WindowManager:yh,NotificationManager:vh,EditorObservable:Fp,Shortcuts:Qp,Editor:tN,FocusManager:iN,EditorManager:TN,DOM:Si.DOM,ScriptLoader:Ri.ScriptLoader,PluginManager:Bi.PluginManager,ThemeManager:Bi.ThemeManager,trim:Xt.trim,isArray:Xt.isArray,is:Xt.is,toArray:Xt.toArray,makeMap:Xt.makeMap,each:Xt.each,map:Xt.map,grep:Xt.grep,inArray:Xt.inArray,extend:Xt.extend,create:Xt.create,walk:Xt.walk,createNS:Xt.createNS,resolve:Xt.resolve,explode:Xt.explode,_addCacheSuffix:Xt._addCacheSuffix,isOpera:fe.opera,isWebKit:fe.webkit,isIE:fe.ie,isGecko:fe.gecko,isMac:fe.mac},oE=nE=Xt.extend(nE,rE);tE=oE,window.tinymce=tE,window.tinyMCE=tE,function(e){if("object"==typeof module)try{module.exports=e}catch(t){}}(oE)}(window);
// Source: wp-includes/js/tinymce/themes/modern/theme.min.js
!function(_){"use strict";var e,t,n,i,r=tinymce.util.Tools.resolve("tinymce.ThemeManager"),l=tinymce.util.Tools.resolve("tinymce.EditorManager"),w=tinymce.util.Tools.resolve("tinymce.util.Tools"),d=function(e){return!1!==c(e)},c=function(e){return e.getParam("menubar")},f=function(e){return e.getParam("toolbar_items_size")},h=function(e){return e.getParam("menu")},m=function(e){return!1===e.settings.skin},g=function(e){var t=e.getParam("resize","vertical");return!1===t?"none":"both"===t?"both":"vertical"},p=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),v=tinymce.util.Tools.resolve("tinymce.ui.Factory"),b=tinymce.util.Tools.resolve("tinymce.util.I18n"),o=function(e){return e.fire("SkinLoaded")},y=function(e){return e.fire("ResizeEditor")},x=function(e){return e.fire("BeforeRenderUI")},s=function(t,n){return function(){var e=t.find(n)[0];e&&e.focus(!0)}},R=function(e,t){e.shortcuts.add("Alt+F9","",s(t,"menubar")),e.shortcuts.add("Alt+F10,F10","",s(t,"toolbar")),e.shortcuts.add("Alt+F11","",s(t,"elementpath")),t.on("cancel",function(){e.focus()})},C=tinymce.util.Tools.resolve("tinymce.geom.Rect"),u=tinymce.util.Tools.resolve("tinymce.util.Delay"),E=function(){},k=function(e){return function(){return e}},a=k(!1),H=k(!0),S=function(){return T},T=(e=function(e){return e.isNone()},i={fold:function(e,t){return e()},is:a,isSome:a,isNone:H,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:k(null),getOrUndefined:k(undefined),or:n,orThunk:t,map:S,each:E,bind:S,exists:a,forall:H,filter:S,equals:e,equals_:e,toArray:function(){return[]},toString:k("none()")},Object.freeze&&Object.freeze(i),i),M=function(n){var e=k(n),t=function(){return r},i=function(e){return e(n)},r={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:H,isNone:a,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return M(e(n))},each:function(e){e(n)},bind:i,exists:i,forall:i,filter:function(e){return e(n)?r:T},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(a,function(e){return t(n,e)})}};return r},N={some:M,none:S,from:function(e){return null===e||e===undefined?T:M(e)}},P=function(e){return e?e.getRoot().uiContainer:null},W={getUiContainerDelta:function(e){var t=P(e);if(t&&"static"!==p.DOM.getStyle(t,"position",!0)){var n=p.DOM.getPos(t),i=t.scrollLeft-n.x,r=t.scrollTop-n.y;return N.some({x:i,y:r})}return N.none()},setUiContainer:function(e,t){var n=p.DOM.select(e.settings.ui_container)[0];t.getRoot().uiContainer=n},getUiContainer:P,inheritUiContainer:function(e,t){return t.uiContainer=P(e)}},D=function(i,e,r){var o,s=[];if(e)return w.each(e.split(/[ ,]/),function(t){var e,n=function(){var e=i.selection;t.settings.stateSelector&&e.selectorChanged(t.settings.stateSelector,function(e){t.active(e)},!0),t.settings.disabledStateSelector&&e.selectorChanged(t.settings.disabledStateSelector,function(e){t.disabled(e)})};"|"===t?o=null:(o||(o={type:"buttongroup",items:[]},s.push(o)),i.buttons[t]&&(e=t,"function"==typeof(t=i.buttons[e])&&(t=t()),t.type=t.type||"button",t.size=r,t=v.create(t),o.items.push(t),i.initialized?n():i.on("init",n)))}),{type:"toolbar",layout:"flow",items:s}},O=D,A=function(n,i){var e,t,r=[];if(w.each(!1===(t=(e=n).getParam("toolbar"))?[]:w.isArray(t)?w.grep(t,function(e){return 0<e.length}):function(e,t){for(var n=[],i=1;i<10;i++){var r=e["toolbar"+i];if(!r)break;n.push(r)}var o=e.toolbar?[e.toolbar]:[t];return 0<n.length?n:o}(e.settings,"undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"),function(e){var t;(t=e)&&r.push(D(n,t,i))}),r.length)return{type:"panel",layout:"stack",classes:"toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:r}},B=p.DOM,L=function(e){return{left:e.x,top:e.y,width:e.w,height:e.h,right:e.x+e.w,bottom:e.y+e.h}},z=function(e,t){e.moveTo(t.left,t.top)},I=function(e,t,n,i,r,o){return o=L({x:t,y:n,w:o.w,h:o.h}),e&&(o=e({elementRect:L(i),contentAreaRect:L(r),panelRect:o})),o},F=function(x){var i,o=function(){return x.contextToolbars||[]},n=function(e,t){var n,i,r,o,s,a,l,u=x.getParam("inline_toolbar_position_handler");if(!x.removed){if(!e||!e.toolbar.panel)return c=x,void w.each(c.contextToolbars,function(e){e.panel&&e.panel.hide()});var c,d,f,h,m;l=["bc-tc","tc-bc","tl-bl","bl-tl","tr-br","br-tr"],s=e.toolbar.panel,t&&s.show(),d=e.element,f=B.getPos(x.getContentAreaContainer()),h=x.dom.getRect(d),"BODY"===(m=x.dom.getRoot()).nodeName&&(h.x-=m.ownerDocument.documentElement.scrollLeft||m.scrollLeft,h.y-=m.ownerDocument.documentElement.scrollTop||m.scrollTop),h.x+=f.x,h.y+=f.y,r=h,i=B.getRect(s.getEl()),o=B.getRect(x.getContentAreaContainer()||x.getBody());var g,p,v,b=W.getUiContainerDelta(s).getOr({x:0,y:0});if(r.x+=b.x,r.y+=b.y,i.x+=b.x,i.y+=b.y,o.x+=b.x,o.y+=b.y,"inline"!==B.getStyle(e.element,"display",!0)){var y=e.element.getBoundingClientRect();r.w=y.width,r.h=y.height}x.inline||(o.w=x.getDoc().documentElement.offsetWidth),x.selection.controlSelection.isResizable(e.element)&&r.w<25&&(r=C.inflate(r,0,8)),n=C.findBestRelativePosition(i,r,o,l),r=C.clamp(r,o),n?(a=C.relativePosition(i,r,n),z(s,I(u,a.x,a.y,r,o,i))):(o.h+=i.h,(r=C.intersect(o,r))?(n=C.findBestRelativePosition(i,r,o,["bc-tc","bl-tl","br-tr"]))?(a=C.relativePosition(i,r,n),z(s,I(u,a.x,a.y,r,o,i))):z(s,I(u,r.x,r.y,r,o,i)):s.hide()),g=s,v=function(e,t){return e===t},p=(p=n)?p.substr(0,2):"",w.each({t:"down",b:"up"},function(e,t){g.classes.toggle("arrow-"+e,v(t,p.substr(0,1)))}),w.each({l:"left",r:"right"},function(e,t){g.classes.toggle("arrow-"+e,v(t,p.substr(1,1)))})}},r=function(e){return function(){u.requestAnimationFrame(function(){x.selection&&n(a(x.selection.getNode()),e)})}},t=function(e){var t;if(e.toolbar.panel)return e.toolbar.panel.show(),void n(e);t=v.create({type:"floatpanel",role:"dialog",classes:"tinymce tinymce-inline arrow",ariaLabel:"Inline toolbar",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!0,border:1,items:O(x,e.toolbar.items),oncancel:function(){x.focus()}}),W.setUiContainer(x,t),function(e){if(!i){var t=r(!0),n=W.getUiContainer(e);i=x.selection.getScrollContainer()||x.getWin(),B.bind(i,"scroll",t),B.bind(n,"scroll",t),x.on("remove",function(){B.unbind(i,"scroll",t),B.unbind(n,"scroll",t)})}}(t),(e.toolbar.panel=t).renderTo().reflow(),n(e)},s=function(){w.each(o(),function(e){e.panel&&e.panel.hide()})},a=function(e){var t,n,i,r=o();for(t=(i=x.$(e).parents().add(e)).length-1;0<=t;t--)for(n=r.length-1;0<=n;n--)if(r[n].predicate(i[t]))return{toolbar:r[n],element:i[t]};return null};x.on("click keyup setContent ObjectResized",function(e){("setcontent"!==e.type||e.selection)&&u.setEditorTimeout(x,function(){var e;(e=a(x.selection.getNode()))?(s(),t(e)):s()})}),x.on("blur hide contextmenu",s),x.on("ObjectResizeStart",function(){var e=a(x.selection.getNode());e&&e.toolbar.panel&&e.toolbar.panel.hide()}),x.on("ResizeEditor ResizeWindow",r(!0)),x.on("nodeChange",r(!1)),x.on("remove",function(){w.each(o(),function(e){e.panel&&e.panel.remove()}),x.contextToolbars={}}),x.shortcuts.add("ctrl+F9","",function(){var e=a(x.selection.getNode());e&&e.toolbar.panel&&e.toolbar.panel.items()[0].focus()})},U=function(t){return function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t}(e)===t}},V=U("array"),Y=U("function"),$=U("number"),q=(Array.prototype.slice,Array.prototype.indexOf),X=Array.prototype.push,j=function(e,t){var n,i,r=(n=e,i=t,q.call(n,i));return-1===r?N.none():N.some(r)},J=function(e,t){for(var n=0,i=e.length;n<i;n++)if(t(e[n],n))return!0;return!1},G=function(e,t){for(var n=e.length,i=new Array(n),r=0;r<n;r++){var o=e[r];i[r]=t(o,r)}return i},K=function(e,t){for(var n=0,i=e.length;n<i;n++)t(e[n],n)},Z=function(e,t){for(var n=[],i=0,r=e.length;i<r;i++){var o=e[i];t(o,i)&&n.push(o)}return n},Q=(Y(Array.from)&&Array.from,{file:{title:"File",items:"newdocument restoredraft | preview | print"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall"},view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen"},insert:{title:"Insert",items:"image link media template codesample inserttable | charmap hr | pagebreak nonbreaking anchor toc | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | blockformats align | removeformat"},tools:{title:"Tools",items:"spellchecker spellcheckerlanguage | a11ycheck code"},table:{title:"Table"},help:{title:"Help"}}),ee=function(e,t){return"|"===e?{name:"|",item:{text:"|"}}:t?{name:e,item:t}:null},te=function(e,t){return function(e,t){for(var n=0,i=e.length;n<i;n++)if(t(e[n],n))return N.some(n);return N.none()}(e,function(e){return e.name===t}).isSome()},ne=function(e){return e&&"|"===e.item.text},ie=function(n,e,t,i){var r,o,s,a,l,u,c;return e?(o=e[i],a=!0):o=Q[i],o&&(r={text:o.title},s=[],w.each((o.items||"").split(/[ ,]/),function(e){var t=ee(e,n[e]);t&&s.push(t)}),a||w.each(n,function(e,t){e.context!==i||te(s,t)||("before"===e.separator&&s.push({name:"|",item:{text:"|"}}),e.prependToContext?s.unshift(ee(t,e)):s.push(ee(t,e)),"after"===e.separator&&s.push({name:"|",item:{text:"|"}}))}),r.menu=G((l=t,u=Z(s,function(e){return!1===l.hasOwnProperty(e.name)}),c=Z(u,function(e,t){return!ne(e)||!ne(u[t-1])}),Z(c,function(e,t){return!ne(e)||0<t&&t<c.length-1})),function(e){return e.item}),!r.menu.length)?null:r},re=function(e){for(var t,n=[],i=function(e){var t,n=[],i=h(e);if(i)for(t in i)n.push(t);else for(t in Q)n.push(t);return n}(e),r=w.makeMap((t=e,t.getParam("removed_menuitems","")).split(/[ ,]/)),o=c(e),s="string"==typeof o?o.split(/[ ,]/):i,a=0;a<s.length;a++){var l=s[a],u=ie(e.menuItems,h(e),r,l);u&&n.push(u)}return n},oe=p.DOM,se=function(e){return{width:e.clientWidth,height:e.clientHeight}},ae=function(e,t,n){var i,r,o,s;i=e.getContainer(),r=e.getContentAreaContainer().firstChild,o=se(i),s=se(r),null!==t&&(t=Math.max(e.getParam("min_width",100,"number"),t),t=Math.min(e.getParam("max_width",65535,"number"),t),oe.setStyle(i,"width",t+(o.width-s.width)),oe.setStyle(r,"width",t)),n=Math.max(e.getParam("min_height",100,"number"),n),n=Math.min(e.getParam("max_height",65535,"number"),n),oe.setStyle(r,"height",n),y(e)},le=ae,ue=function(e,t,n){var i=e.getContentAreaContainer();ae(e,i.clientWidth+t,i.clientHeight+n)},ce=tinymce.util.Tools.resolve("tinymce.Env"),de=function(e,t,n){var i,r=e.settings[n];r&&r((i=t.getEl("body"),{element:function(){return i}}))},fe=function(c,d,f){return function(e){var t,n,i,r,o,s=e.control,a=s.parents().filter("panel")[0],l=a.find("#"+d)[0],u=(t=f,n=d,w.grep(t,function(e){return e.name===n})[0]);i=d,r=a,o=f,w.each(o,function(e){var t=r.items().filter("#"+e.name)[0];t&&t.visible()&&e.name!==i&&(de(e,t,"onhide"),t.visible(!1))}),s.parent().items().each(function(e){e.active(!1)}),l&&l.visible()?(de(u,l,"onhide"),l.hide(),s.active(!1)):(l?l.show():(l=v.create({type:"container",name:d,layout:"stack",classes:"sidebar-panel",html:""}),a.prepend(l),de(u,l,"onrender")),de(u,l,"onshow"),s.active(!0)),y(c)}},he=function(e){return!(ce.ie&&!(11<=ce.ie)||!e.sidebars)&&0<e.sidebars.length},me=function(n){return{type:"panel",name:"sidebar",layout:"stack",classes:"sidebar",items:[{type:"toolbar",layout:"stack",classes:"sidebar-toolbar",items:w.map(n.sidebars,function(e){var t=e.settings;return{type:"button",icon:t.icon,image:t.image,tooltip:t.tooltip,onclick:fe(n,e.name,n.sidebars)}})}]}},ge=function(e){var t=function(){e._skinLoaded=!0,o(e)};return function(){e.initialized?t():e.on("init",t)}},pe=p.DOM,ve=function(e){return{type:"panel",name:"iframe",layout:"stack",classes:"edit-area",border:e,html:""}},be=function(t,e,n){var i,r,o,s,a;if(!1===m(t)&&n.skinUiCss?pe.styleSheetLoader.load(n.skinUiCss,ge(t)):ge(t)(),i=e.panel=v.create({type:"panel",role:"application",classes:"tinymce",style:"visibility: hidden",layout:"stack",border:1,items:[{type:"container",classes:"top-part",items:[!1===d(t)?null:{type:"menubar",border:"0 0 1 0",items:re(t)},A(t,f(t))]},he(t)?(s=t,{type:"panel",layout:"stack",classes:"edit-aria-container",border:"1 0 0 0",items:[ve("0"),me(s)]}):ve("1 0 0 0")]}),W.setUiContainer(t,i),"none"!==g(t)&&(r={type:"resizehandle",direction:g(t),onResizeStart:function(){var e=t.getContentAreaContainer().firstChild;o={width:e.clientWidth,height:e.clientHeight}},onResize:function(e){"both"===g(t)?le(t,o.width+e.deltaX,o.height+e.deltaY):le(t,null,o.height+e.deltaY)}}),t.getParam("statusbar",!0,"boolean")){var l=b.translate(["Powered by {0}",'<a href="https://www.tiny.cloud/?utm_campaign=editor_referral&amp;utm_medium=poweredby&amp;utm_source=tinymce" rel="noopener" target="_blank" role="presentation" tabindex="-1">Tiny</a>']),u=t.getParam("branding",!0,"boolean")?{type:"label",classes:"branding",html:" "+l}:null;i.add({type:"panel",name:"statusbar",classes:"statusbar",layout:"flow",border:"1 0 0 0",ariaRoot:!0,items:[{type:"elementpath",editor:t},r,u]})}return x(t),t.on("SwitchMode",(a=i,function(e){a.find("*").disabled("readonly"===e.mode)})),i.renderBefore(n.targetNode).reflow(),t.getParam("readonly",!1,"boolean")&&t.setMode("readonly"),n.width&&pe.setStyle(i.getEl(),"width",n.width),t.on("remove",function(){i.remove(),i=null}),R(t,i),F(t),{iframeContainer:i.find("#iframe")[0].getEl(),editorContainer:i.getEl()}},ye=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),xe=0,we={id:function(){return"mceu_"+xe++},create:function(e,t,n){var i=_.document.createElement(e);return p.DOM.setAttribs(i,t),"string"==typeof n?i.innerHTML=n:w.each(n,function(e){e.nodeType&&i.appendChild(e)}),i},createFragment:function(e){return p.DOM.createFragment(e)},getWindowSize:function(){return p.DOM.getViewPort()},getSize:function(e){var t,n;if(e.getBoundingClientRect){var i=e.getBoundingClientRect();t=Math.max(i.width||i.right-i.left,e.offsetWidth),n=Math.max(i.height||i.bottom-i.bottom,e.offsetHeight)}else t=e.offsetWidth,n=e.offsetHeight;return{width:t,height:n}},getPos:function(e,t){return p.DOM.getPos(e,t||we.getContainer())},getContainer:function(){return ce.container?ce.container:_.document.body},getViewPort:function(e){return p.DOM.getViewPort(e)},get:function(e){return _.document.getElementById(e)},addClass:function(e,t){return p.DOM.addClass(e,t)},removeClass:function(e,t){return p.DOM.removeClass(e,t)},hasClass:function(e,t){return p.DOM.hasClass(e,t)},toggleClass:function(e,t,n){return p.DOM.toggleClass(e,t,n)},css:function(e,t,n){return p.DOM.setStyle(e,t,n)},getRuntimeStyle:function(e,t){return p.DOM.getStyle(e,t,!0)},on:function(e,t,n,i){return p.DOM.bind(e,t,n,i)},off:function(e,t,n){return p.DOM.unbind(e,t,n)},fire:function(e,t,n){return p.DOM.fire(e,t,n)},innerHtml:function(e,t){p.DOM.setHTML(e,t)}},_e=function(e){return"static"===we.getRuntimeStyle(e,"position")},Re=function(e){return e.state.get("fixed")};function Ce(e,t,n){var i,r,o,s,a,l,u,c,d,f;return d=Ee(),o=(r=we.getPos(t,W.getUiContainer(e))).x,s=r.y,Re(e)&&_e(_.document.body)&&(o-=d.x,s-=d.y),i=e.getEl(),a=(f=we.getSize(i)).width,l=f.height,u=(f=we.getSize(t)).width,c=f.height,"b"===(n=(n||"").split(""))[0]&&(s+=c),"r"===n[1]&&(o+=u),"c"===n[0]&&(s+=Math.round(c/2)),"c"===n[1]&&(o+=Math.round(u/2)),"b"===n[3]&&(s-=l),"r"===n[4]&&(o-=a),"c"===n[3]&&(s-=Math.round(l/2)),"c"===n[4]&&(o-=Math.round(a/2)),{x:o,y:s,w:a,h:l}}var Ee=function(){var e=_.window;return{x:Math.max(e.pageXOffset,_.document.body.scrollLeft,_.document.documentElement.scrollLeft),y:Math.max(e.pageYOffset,_.document.body.scrollTop,_.document.documentElement.scrollTop),w:e.innerWidth||_.document.documentElement.clientWidth,h:e.innerHeight||_.document.documentElement.clientHeight}},ke=function(e){var t,n=W.getUiContainer(e);return n&&!Re(e)?{x:0,y:0,w:(t=n).scrollWidth-1,h:t.scrollHeight-1}:Ee()},He={testMoveRel:function(e,t){for(var n=ke(this),i=0;i<t.length;i++){var r=Ce(this,e,t[i]);if(Re(this)){if(0<r.x&&r.x+r.w<n.w&&0<r.y&&r.y+r.h<n.h)return t[i]}else if(r.x>n.x&&r.x+r.w<n.w+n.x&&r.y>n.y&&r.y+r.h<n.h+n.y)return t[i]}return t[0]},moveRel:function(e,t){"string"!=typeof t&&(t=this.testMoveRel(e,t));var n=Ce(this,e,t);return this.moveTo(n.x,n.y)},moveBy:function(e,t){var n=this.layoutRect();return this.moveTo(n.x+e,n.y+t),this},moveTo:function(e,t){var n=this;function i(e,t,n){return e<0?0:t<e+n&&(e=t-n)<0?0:e}if(n.settings.constrainToViewport){var r=ke(this),o=n.layoutRect();e=i(e,r.w+r.x,o.w),t=i(t,r.h+r.y,o.h)}var s=W.getUiContainer(n);return s&&_e(s)&&!Re(n)&&(e-=s.scrollLeft,t-=s.scrollTop),s&&(e+=1,t+=1),n.state.get("rendered")?n.layoutRect({x:e,y:t}).repaint():(n.settings.x=e,n.settings.y=t),n.fire("move",{x:e,y:t}),n}},Se=tinymce.util.Tools.resolve("tinymce.util.Class"),Te=tinymce.util.Tools.resolve("tinymce.util.EventDispatcher"),Me=function(e){var t;if(e)return"number"==typeof e?{top:e=e||0,left:e,bottom:e,right:e}:(1===(t=(e=e.split(" ")).length)?e[1]=e[2]=e[3]=e[0]:2===t?(e[2]=e[0],e[3]=e[1]):3===t&&(e[3]=e[1]),{top:parseInt(e[0],10)||0,right:parseInt(e[1],10)||0,bottom:parseInt(e[2],10)||0,left:parseInt(e[3],10)||0})},Ne=function(i,e){function t(e){var t=parseFloat(function(e){var t=i.ownerDocument.defaultView;if(t){var n=t.getComputedStyle(i,null);return n?(e=e.replace(/[A-Z]/g,function(e){return"-"+e}),n.getPropertyValue(e)):null}return i.currentStyle[e]}(e));return isNaN(t)?0:t}return{top:t(e+"TopWidth"),right:t(e+"RightWidth"),bottom:t(e+"BottomWidth"),left:t(e+"LeftWidth")}};function Pe(){}function We(e){this.cls=[],this.cls._map={},this.onchange=e||Pe,this.prefix=""}w.extend(We.prototype,{add:function(e){return e&&!this.contains(e)&&(this.cls._map[e]=!0,this.cls.push(e),this._change()),this},remove:function(e){if(this.contains(e)){var t=void 0;for(t=0;t<this.cls.length&&this.cls[t]!==e;t++);this.cls.splice(t,1),delete this.cls._map[e],this._change()}return this},toggle:function(e,t){var n=this.contains(e);return n!==t&&(n?this.remove(e):this.add(e),this._change()),this},contains:function(e){return!!this.cls._map[e]},_change:function(){delete this.clsValue,this.onchange.call(this)}}),We.prototype.toString=function(){var e;if(this.clsValue)return this.clsValue;e="";for(var t=0;t<this.cls.length;t++)0<t&&(e+=" "),e+=this.prefix+this.cls[t];return e};var De,Oe,Ae,Be=/^([\w\\*]+)?(?:#([\w\-\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,Le=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,ze=/^\s*|\s*$/g,Ie=Se.extend({init:function(e){var o=this.match;function s(e,t,n){var i;function r(e){e&&t.push(e)}return r(function(t){if(t)return t=t.toLowerCase(),function(e){return"*"===t||e.type===t}}((i=Be.exec(e.replace(ze,"")))[1])),r(function(t){if(t)return function(e){return e._name===t}}(i[2])),r(function(n){if(n)return n=n.split("."),function(e){for(var t=n.length;t--;)if(!e.classes.contains(n[t]))return!1;return!0}}(i[3])),r(function(n,i,r){if(n)return function(e){var t=e[n]?e[n]():"";return i?"="===i?t===r:"*="===i?0<=t.indexOf(r):"~="===i?0<=(" "+t+" ").indexOf(" "+r+" "):"!="===i?t!==r:"^="===i?0===t.indexOf(r):"$="===i&&t.substr(t.length-r.length)===r:!!r}}(i[4],i[5],i[6])),r(function(i){var t;if(i)return(i=/(?:not\((.+)\))|(.+)/i.exec(i))[1]?(t=a(i[1],[]),function(e){return!o(e,t)}):(i=i[2],function(e,t,n){return"first"===i?0===t:"last"===i?t===n-1:"even"===i?t%2==0:"odd"===i?t%2==1:!!e[i]&&e[i]()})}(i[7])),t.pseudo=!!i[7],t.direct=n,t}function a(e,t){var n,i,r,o=[];do{if(Le.exec(""),(i=Le.exec(e))&&(e=i[3],o.push(i[1]),i[2])){n=i[3];break}}while(i);for(n&&a(n,t),e=[],r=0;r<o.length;r++)">"!==o[r]&&e.push(s(o[r],[],">"===o[r-1]));return t.push(e),t}this._selectors=a(e,[])},match:function(e,t){var n,i,r,o,s,a,l,u,c,d,f,h,m;for(n=0,i=(t=t||this._selectors).length;n<i;n++){for(m=e,h=0,r=(o=(s=t[n]).length)-1;0<=r;r--)for(u=s[r];m;){if(u.pseudo)for(c=d=(f=m.parent().items()).length;c--&&f[c]!==m;);for(a=0,l=u.length;a<l;a++)if(!u[a](m,c,d)){a=l+1;break}if(a===l){h++;break}if(r===o-1)break;m=m.parent()}if(h===o)return!0}return!1},find:function(e){var t,n,u=[],i=this._selectors;function c(e,t,n){var i,r,o,s,a,l=t[n];for(i=0,r=e.length;i<r;i++){for(a=e[i],o=0,s=l.length;o<s;o++)if(!l[o](a,i,r)){o=s+1;break}if(o===s)n===t.length-1?u.push(a):a.items&&c(a.items(),t,n+1);else if(l.direct)return;a.items&&c(a.items(),t,n)}}if(e.items){for(t=0,n=i.length;t<n;t++)c(e.items(),i[t],0);1<n&&(u=function(e){for(var t,n=[],i=e.length;i--;)(t=e[i]).__checked||(n.push(t),t.__checked=1);for(i=n.length;i--;)delete n[i].__checked;return n}(u))}return De||(De=Ie.Collection),new De(u)}}),Fe=Array.prototype.push,Ue=Array.prototype.slice;Ae={length:0,init:function(e){e&&this.add(e)},add:function(e){return w.isArray(e)?Fe.apply(this,e):e instanceof Oe?this.add(e.toArray()):Fe.call(this,e),this},set:function(e){var t,n=this,i=n.length;for(n.length=0,n.add(e),t=n.length;t<i;t++)delete n[t];return n},filter:function(t){var e,n,i,r,o=[];for("string"==typeof t?(t=new Ie(t),r=function(e){return t.match(e)}):r=t,e=0,n=this.length;e<n;e++)r(i=this[e])&&o.push(i);return new Oe(o)},slice:function(){return new Oe(Ue.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},each:function(e){return w.each(this,e),this},toArray:function(){return w.toArray(this)},indexOf:function(e){for(var t=this.length;t--&&this[t]!==e;);return t},reverse:function(){return new Oe(w.toArray(this).reverse())},hasClass:function(e){return!!this[0]&&this[0].classes.contains(e)},prop:function(t,n){var e;return n!==undefined?(this.each(function(e){e[t]&&e[t](n)}),this):(e=this[0])&&e[t]?e[t]():void 0},exec:function(t){var n=w.toArray(arguments).slice(1);return this.each(function(e){e[t]&&e[t].apply(e,n)}),this},remove:function(){for(var e=this.length;e--;)this[e].remove();return this},addClass:function(t){return this.each(function(e){e.classes.add(t)})},removeClass:function(t){return this.each(function(e){e.classes.remove(t)})}},w.each("fire on off show hide append prepend before after reflow".split(" "),function(n){Ae[n]=function(){var t=w.toArray(arguments);return this.each(function(e){n in e&&e[n].apply(e,t)}),this}}),w.each("text name disabled active selected checked visible parent value data".split(" "),function(t){Ae[t]=function(e){return this.prop(t,e)}}),Oe=Se.extend(Ae);var Ve=Ie.Collection=Oe,Ye=function(e){this.create=e.create};Ye.create=function(r,o){return new Ye({create:function(t,n){var i,e=function(e){t.set(n,e.value)};return t.on("change:"+n,function(e){r.set(o,e.value)}),r.on("change:"+o,e),(i=t._bindings)||(i=t._bindings=[],t.on("destroy",function(){for(var e=i.length;e--;)i[e]()})),i.push(function(){r.off("change:"+o,e)}),r.get(o)}})};var $e=tinymce.util.Tools.resolve("tinymce.util.Observable");function qe(e){return 0<e.nodeType}var Xe,je,Je=Se.extend({Mixins:[$e],init:function(e){var t,n;for(t in e=e||{})(n=e[t])instanceof Ye&&(e[t]=n.create(this,t));this.data=e},set:function(t,n){var i,r,o=this.data[t];if(n instanceof Ye&&(n=n.create(this,t)),"object"==typeof t){for(i in t)this.set(i,t[i]);return this}return function e(t,n){var i,r;if(t===n)return!0;if(null===t||null===n)return t===n;if("object"!=typeof t||"object"!=typeof n)return t===n;if(w.isArray(n)){if(t.length!==n.length)return!1;for(i=t.length;i--;)if(!e(t[i],n[i]))return!1}if(qe(t)||qe(n))return t===n;for(i in r={},n){if(!e(t[i],n[i]))return!1;r[i]=!0}for(i in t)if(!r[i]&&!e(t[i],n[i]))return!1;return!0}(o,n)||(this.data[t]=n,r={target:this,name:t,value:n,oldValue:o},this.fire("change:"+t,r),this.fire("change",r)),this},get:function(e){return this.data[e]},has:function(e){return e in this.data},bind:function(e){return Ye.create(this,e)},destroy:function(){this.fire("destroy")}}),Ge={},Ke={add:function(e){var t=e.parent();if(t){if(!t._layout||t._layout.isNative())return;Ge[t._id]||(Ge[t._id]=t),Xe||(Xe=!0,u.requestAnimationFrame(function(){var e,t;for(e in Xe=!1,Ge)(t=Ge[e]).state.get("rendered")&&t.reflow();Ge={}},_.document.body))}},remove:function(e){Ge[e._id]&&delete Ge[e._id]}},Ze="onmousewheel"in _.document,Qe=!1,et=0,tt={Statics:{classPrefix:"mce-"},isRtl:function(){return je.rtl},classPrefix:"mce-",init:function(t){var e,n,i=this;function r(e){var t;for(e=e.split(" "),t=0;t<e.length;t++)i.classes.add(e[t])}i.settings=t=w.extend({},i.Defaults,t),i._id=t.id||"mceu_"+et++,i._aria={role:t.role},i._elmCache={},i.$=ye,i.state=new Je({visible:!0,active:!1,disabled:!1,value:""}),i.data=new Je(t.data),i.classes=new We(function(){i.state.get("rendered")&&(i.getEl().className=this.toString())}),i.classes.prefix=i.classPrefix,(e=t.classes)&&(i.Defaults&&(n=i.Defaults.classes)&&e!==n&&r(n),r(e)),w.each("title text name visible disabled active value".split(" "),function(e){e in t&&i[e](t[e])}),i.on("click",function(){if(i.disabled())return!1}),i.settings=t,i.borderBox=Me(t.border),i.paddingBox=Me(t.padding),i.marginBox=Me(t.margin),t.hidden&&i.hide()},Properties:"parent,name",getContainerElm:function(){var e=W.getUiContainer(this);return e||we.getContainer()},getParentCtrl:function(e){for(var t,n=this.getRoot().controlIdLookup;e&&n&&!(t=n[e.id]);)e=e.parentNode;return t},initLayoutRect:function(){var e,t,n,i,r,o,s,a,l,u,c=this,d=c.settings,f=c.getEl();e=c.borderBox=c.borderBox||Ne(f,"border"),c.paddingBox=c.paddingBox||Ne(f,"padding"),c.marginBox=c.marginBox||Ne(f,"margin"),u=we.getSize(f),a=d.minWidth,l=d.minHeight,r=a||u.width,o=l||u.height,n=d.width,i=d.height,s=void 0!==(s=d.autoResize)?s:!n&&!i,n=n||r,i=i||o;var h=e.left+e.right,m=e.top+e.bottom,g=d.maxWidth||65535,p=d.maxHeight||65535;return c._layoutRect=t={x:d.x||0,y:d.y||0,w:n,h:i,deltaW:h,deltaH:m,contentW:n-h,contentH:i-m,innerW:n-h,innerH:i-m,startMinWidth:a||0,startMinHeight:l||0,minW:Math.min(r,g),minH:Math.min(o,p),maxW:g,maxH:p,autoResize:s,scrollW:0},c._lastLayoutRect={},t},layoutRect:function(e){var t,n,i,r,o,s=this,a=s._layoutRect;return a||(a=s.initLayoutRect()),e?(i=a.deltaW,r=a.deltaH,e.x!==undefined&&(a.x=e.x),e.y!==undefined&&(a.y=e.y),e.minW!==undefined&&(a.minW=e.minW),e.minH!==undefined&&(a.minH=e.minH),(n=e.w)!==undefined&&(n=(n=n<a.minW?a.minW:n)>a.maxW?a.maxW:n,a.w=n,a.innerW=n-i),(n=e.h)!==undefined&&(n=(n=n<a.minH?a.minH:n)>a.maxH?a.maxH:n,a.h=n,a.innerH=n-r),(n=e.innerW)!==undefined&&(n=(n=n<a.minW-i?a.minW-i:n)>a.maxW-i?a.maxW-i:n,a.innerW=n,a.w=n+i),(n=e.innerH)!==undefined&&(n=(n=n<a.minH-r?a.minH-r:n)>a.maxH-r?a.maxH-r:n,a.innerH=n,a.h=n+r),e.contentW!==undefined&&(a.contentW=e.contentW),e.contentH!==undefined&&(a.contentH=e.contentH),(t=s._lastLayoutRect).x===a.x&&t.y===a.y&&t.w===a.w&&t.h===a.h||((o=je.repaintControls)&&o.map&&!o.map[s._id]&&(o.push(s),o.map[s._id]=!0),t.x=a.x,t.y=a.y,t.w=a.w,t.h=a.h),s):a},repaint:function(){var e,t,n,i,r,o,s,a,l,u,c=this;l=_.document.createRange?function(e){return e}:Math.round,e=c.getEl().style,i=c._layoutRect,a=c._lastRepaintRect||{},o=(r=c.borderBox).left+r.right,s=r.top+r.bottom,i.x!==a.x&&(e.left=l(i.x)+"px",a.x=i.x),i.y!==a.y&&(e.top=l(i.y)+"px",a.y=i.y),i.w!==a.w&&(u=l(i.w-o),e.width=(0<=u?u:0)+"px",a.w=i.w),i.h!==a.h&&(u=l(i.h-s),e.height=(0<=u?u:0)+"px",a.h=i.h),c._hasBody&&i.innerW!==a.innerW&&(u=l(i.innerW),(n=c.getEl("body"))&&((t=n.style).width=(0<=u?u:0)+"px"),a.innerW=i.innerW),c._hasBody&&i.innerH!==a.innerH&&(u=l(i.innerH),(n=n||c.getEl("body"))&&((t=t||n.style).height=(0<=u?u:0)+"px"),a.innerH=i.innerH),c._lastRepaintRect=a,c.fire("repaint",{},!1)},updateLayoutRect:function(){var e=this;e.parent()._lastRect=null,we.css(e.getEl(),{width:"",height:""}),e._layoutRect=e._lastRepaintRect=e._lastLayoutRect=null,e.initLayoutRect()},on:function(e,t){var n,i,r,o=this;return nt(o).on(e,"string"!=typeof(n=t)?n:function(e){return i||o.parentsAndSelf().each(function(e){var t=e.settings.callbacks;if(t&&(i=t[n]))return r=e,!1}),i?i.call(r,e):(e.action=n,void this.fire("execute",e))}),o},off:function(e,t){return nt(this).off(e,t),this},fire:function(e,t,n){if((t=t||{}).control||(t.control=this),t=nt(this).fire(e,t),!1!==n&&this.parent)for(var i=this.parent();i&&!t.isPropagationStopped();)i.fire(e,t,!1),i=i.parent();return t},hasEventListeners:function(e){return nt(this).has(e)},parents:function(e){var t,n=new Ve;for(t=this.parent();t;t=t.parent())n.add(t);return e&&(n=n.filter(e)),n},parentsAndSelf:function(e){return new Ve(this).add(this.parents(e))},next:function(){var e=this.parent().items();return e[e.indexOf(this)+1]},prev:function(){var e=this.parent().items();return e[e.indexOf(this)-1]},innerHtml:function(e){return this.$el.html(e),this},getEl:function(e){var t=e?this._id+"-"+e:this._id;return this._elmCache[t]||(this._elmCache[t]=ye("#"+t)[0]),this._elmCache[t]},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(e){}return this},blur:function(){return this.getEl().blur(),this},aria:function(e,t){var n=this,i=n.getEl(n.ariaTarget);return void 0===t?n._aria[e]:(n._aria[e]=t,n.state.get("rendered")&&i.setAttribute("role"===e?e:"aria-"+e,t),n)},encode:function(e,t){return!1!==t&&(e=this.translate(e)),(e||"").replace(/[&<>"]/g,function(e){return"&#"+e.charCodeAt(0)+";"})},translate:function(e){return je.translate?je.translate(e):e},before:function(e){var t=this.parent();return t&&t.insert(e,t.items().indexOf(this),!0),this},after:function(e){var t=this.parent();return t&&t.insert(e,t.items().indexOf(this)),this},remove:function(){var t,e,n=this,i=n.getEl(),r=n.parent();if(n.items){var o=n.items().toArray();for(e=o.length;e--;)o[e].remove()}r&&r.items&&(t=[],r.items().each(function(e){e!==n&&t.push(e)}),r.items().set(t),r._lastRect=null),n._eventsRoot&&n._eventsRoot===n&&ye(i).off();var s=n.getRoot().controlIdLookup;return s&&delete s[n._id],i&&i.parentNode&&i.parentNode.removeChild(i),n.state.set("rendered",!1),n.state.destroy(),n.fire("remove"),n},renderBefore:function(e){return ye(e).before(this.renderHtml()),this.postRender(),this},renderTo:function(e){return ye(e||this.getContainerElm()).append(this.renderHtml()),this.postRender(),this},preRender:function(){},render:function(){},renderHtml:function(){return'<div id="'+this._id+'" class="'+this.classes+'"></div>'},postRender:function(){var e,t,n,i,r,o=this,s=o.settings;for(i in o.$el=ye(o.getEl()),o.state.set("rendered",!0),s)0===i.indexOf("on")&&o.on(i.substr(2),s[i]);if(o._eventsRoot){for(n=o.parent();!r&&n;n=n.parent())r=n._eventsRoot;if(r)for(i in r._nativeEvents)o._nativeEvents[i]=!0}it(o),s.style&&(e=o.getEl())&&(e.setAttribute("style",s.style),e.style.cssText=s.style),o.settings.border&&(t=o.borderBox,o.$el.css({"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left}));var a=o.getRoot();for(var l in a.controlIdLookup||(a.controlIdLookup={}),(a.controlIdLookup[o._id]=o)._aria)o.aria(l,o._aria[l]);!1===o.state.get("visible")&&(o.getEl().style.display="none"),o.bindStates(),o.state.on("change:visible",function(e){var t,n=e.value;o.state.get("rendered")&&(o.getEl().style.display=!1===n?"none":"",o.getEl().getBoundingClientRect()),(t=o.parent())&&(t._lastRect=null),o.fire(n?"show":"hide"),Ke.add(o)}),o.fire("postrender",{},!1)},bindStates:function(){},scrollIntoView:function(e){var t,n,i,r,o,s,a=this.getEl(),l=a.parentNode,u=function(e,t){var n,i,r=e;for(n=i=0;r&&r!==t&&r.nodeType;)n+=r.offsetLeft||0,i+=r.offsetTop||0,r=r.offsetParent;return{x:n,y:i}}(a,l);return t=u.x,n=u.y,i=a.offsetWidth,r=a.offsetHeight,o=l.clientWidth,s=l.clientHeight,"end"===e?(t-=o-i,n-=s-r):"center"===e&&(t-=o/2-i/2,n-=s/2-r/2),l.scrollLeft=t,l.scrollTop=n,this},getRoot:function(){for(var e,t=this,n=[];t;){if(t.rootControl){e=t.rootControl;break}n.push(t),t=(e=t).parent()}e||(e=this);for(var i=n.length;i--;)n[i].rootControl=e;return e},reflow:function(){Ke.remove(this);var e=this.parent();return e&&e._layout&&!e._layout.isNative()&&e.reflow(),this}};function nt(n){return n._eventDispatcher||(n._eventDispatcher=new Te({scope:n,toggleEvent:function(e,t){t&&Te.isNative(e)&&(n._nativeEvents||(n._nativeEvents={}),n._nativeEvents[e]=!0,n.state.get("rendered")&&it(n))}})),n._eventDispatcher}function it(a){var e,t,n,l,i,r;function o(e){var t=a.getParentCtrl(e.target);t&&t.fire(e.type,e)}function s(){var e=l._lastHoverCtrl;e&&(e.fire("mouseleave",{target:e.getEl()}),e.parents().each(function(e){e.fire("mouseleave",{target:e.getEl()})}),l._lastHoverCtrl=null)}function u(e){var t,n,i,r=a.getParentCtrl(e.target),o=l._lastHoverCtrl,s=0;if(r!==o){if((n=(l._lastHoverCtrl=r).parents().toArray().reverse()).push(r),o){for((i=o.parents().toArray().reverse()).push(o),s=0;s<i.length&&n[s]===i[s];s++);for(t=i.length-1;s<=t;t--)(o=i[t]).fire("mouseleave",{target:o.getEl()})}for(t=s;t<n.length;t++)(r=n[t]).fire("mouseenter",{target:r.getEl()})}}function c(e){e.preventDefault(),"mousewheel"===e.type?(e.deltaY=-.025*e.wheelDelta,e.wheelDeltaX&&(e.deltaX=-.025*e.wheelDeltaX)):(e.deltaX=0,e.deltaY=e.detail),e=a.fire("wheel",e)}if(i=a._nativeEvents){for((n=a.parents().toArray()).unshift(a),e=0,t=n.length;!l&&e<t;e++)l=n[e]._eventsRoot;for(l||(l=n[n.length-1]||a),a._eventsRoot=l,t=e,e=0;e<t;e++)n[e]._eventsRoot=l;var d=l._delegates;for(r in d||(d=l._delegates={}),i){if(!i)return!1;"wheel"!==r||Qe?("mouseenter"===r||"mouseleave"===r?l._hasMouseEnter||(ye(l.getEl()).on("mouseleave",s).on("mouseover",u),l._hasMouseEnter=1):d[r]||(ye(l.getEl()).on(r,o),d[r]=!0),i[r]=!1):Ze?ye(a.getEl()).on("mousewheel",c):ye(a.getEl()).on("DOMMouseScroll",c)}}}w.each("text title visible disabled active value".split(" "),function(t){tt[t]=function(e){return 0===arguments.length?this.state.get(t):(void 0!==e&&this.state.set(t,e),this)}});var rt=je=Se.extend(tt),ot=function(e){return!!e.getAttribute("data-mce-tabstop")};function st(e){var o,r,n=e.root;function i(e){return e&&1===e.nodeType}try{o=_.document.activeElement}catch(t){o=_.document.body}function s(e){return i(e=e||o)?e.getAttribute("role"):null}function a(e){for(var t,n=e||o;n=n.parentNode;)if(t=s(n))return t}function l(e){var t=o;if(i(t))return t.getAttribute("aria-"+e)}function u(e){var t=e.tagName.toUpperCase();return"INPUT"===t||"TEXTAREA"===t||"SELECT"===t}function c(t){var r=[];return function e(t){if(1===t.nodeType&&"none"!==t.style.display&&!t.disabled){var n;(u(n=t)&&!n.hidden||ot(n)||/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(s(n)))&&r.push(t);for(var i=0;i<t.childNodes.length;i++)e(t.childNodes[i])}}(t||n.getEl()),r}function d(e){var t,n;(n=(e=e||r).parents().toArray()).unshift(e);for(var i=0;i<n.length&&!(t=n[i]).settings.ariaRoot;i++);return t}function f(e,t){return e<0?e=t.length-1:e>=t.length&&(e=0),t[e]&&t[e].focus(),e}function h(e,t){var n=-1,i=d();t=t||c(i.getEl());for(var r=0;r<t.length;r++)t[r]===o&&(n=r);n+=e,i.lastAriaIndex=f(n,t)}function m(){"tablist"===a()?h(-1,c(o.parentNode)):r.parent().submenu?b():h(-1)}function g(){var e=s(),t=a();"tablist"===t?h(1,c(o.parentNode)):"menuitem"===e&&"menu"===t&&l("haspopup")?y():h(1)}function p(){h(-1)}function v(){var e=s(),t=a();"menuitem"===e&&"menubar"===t?y():"button"===e&&l("haspopup")?y({key:"down"}):h(1)}function b(){r.fire("cancel")}function y(e){e=e||{},r.fire("click",{target:o,aria:e})}return r=n.getParentCtrl(o),n.on("keydown",function(e){function t(e,t){u(o)||ot(o)||"slider"!==s(o)&&!1!==t(e)&&e.preventDefault()}if(!e.isDefaultPrevented())switch(e.keyCode){case 37:t(e,m);break;case 39:t(e,g);break;case 38:t(e,p);break;case 40:t(e,v);break;case 27:b();break;case 14:case 13:case 32:t(e,y);break;case 9:!function(e){if("tablist"===a()){var t=c(r.getEl("body"))[0];t&&t.focus()}else h(e.shiftKey?-1:1)}(e),e.preventDefault()}}),n.on("focusin",function(e){o=e.target,r=e.control}),{focusFirst:function(e){var t=d(e),n=c(t.getEl());t.settings.ariaRemember&&"lastAriaIndex"in t?f(t.lastAriaIndex,n):f(0,n)}}}var at={},lt=rt.extend({init:function(e){var t=this;t._super(e),(e=t.settings).fixed&&t.state.set("fixed",!0),t._items=new Ve,t.isRtl()&&t.classes.add("rtl"),t.bodyClasses=new We(function(){t.state.get("rendered")&&(t.getEl("body").className=this.toString())}),t.bodyClasses.prefix=t.classPrefix,t.classes.add("container"),t.bodyClasses.add("container-body"),e.containerCls&&t.classes.add(e.containerCls),t._layout=v.create((e.layout||"")+"layout"),t.settings.items?t.add(t.settings.items):t.add(t.render()),t._hasBody=!0},items:function(){return this._items},find:function(e){return(e=at[e]=at[e]||new Ie(e)).find(this)},add:function(e){return this.items().add(this.create(e)).parent(this),this},focus:function(e){var t,n,i,r=this;if(!e||!(n=r.keyboardNav||r.parents().eq(-1)[0].keyboardNav))return i=r.find("*"),r.statusbar&&i.add(r.statusbar.items()),i.each(function(e){if(e.settings.autofocus)return t=null,!1;e.canFocus&&(t=t||e)}),t&&t.focus(),r;n.focusFirst(r)},replace:function(e,t){for(var n,i=this.items(),r=i.length;r--;)if(i[r]===e){i[r]=t;break}0<=r&&((n=t.getEl())&&n.parentNode.removeChild(n),(n=e.getEl())&&n.parentNode.removeChild(n)),t.parent(this)},create:function(e){var t,n=this,i=[];return w.isArray(e)||(e=[e]),w.each(e,function(e){e&&(e instanceof rt||("string"==typeof e&&(e={type:e}),t=w.extend({},n.settings.defaults,e),e.type=t.type=t.type||e.type||n.settings.defaultType||(t.defaults?t.defaults.type:null),e=v.create(t)),i.push(e))}),i},renderNew:function(){var i=this;return i.items().each(function(e,t){var n;e.parent(i),e.state.get("rendered")||((n=i.getEl("body")).hasChildNodes()&&t<=n.childNodes.length-1?ye(n.childNodes[t]).before(e.renderHtml()):ye(n).append(e.renderHtml()),e.postRender(),Ke.add(e))}),i._layout.applyClasses(i.items().filter(":visible")),i._lastRect=null,i},append:function(e){return this.add(e).renderNew()},prepend:function(e){return this.items().set(this.create(e).concat(this.items().toArray())),this.renderNew()},insert:function(e,t,n){var i,r,o;return e=this.create(e),i=this.items(),!n&&t<i.length-1&&(t+=1),0<=t&&t<i.length&&(r=i.slice(0,t).toArray(),o=i.slice(t).toArray(),i.set(r.concat(e,o))),this.renderNew()},fromJSON:function(e){for(var t in e)this.find("#"+t).value(e[t]);return this},toJSON:function(){var i={};return this.find("*").each(function(e){var t=e.name(),n=e.value();t&&void 0!==n&&(i[t]=n)}),i},renderHtml:function(){var e=this,t=e._layout,n=this.settings.role;return e.preRender(),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes+'"'+(n?' role="'+this.settings.role+'"':"")+'><div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"},postRender:function(){var e,t=this;return t.items().exec("postRender"),t._super(),t._layout.postRender(t),t.state.set("rendered",!0),t.settings.style&&t.$el.css(t.settings.style),t.settings.border&&(e=t.borderBox,t.$el.css({"border-top-width":e.top,"border-right-width":e.right,"border-bottom-width":e.bottom,"border-left-width":e.left})),t.parent()||(t.keyboardNav=st({root:t})),t},initLayoutRect:function(){var e=this._super();return this._layout.recalc(this),e},recalc:function(){var e=this,t=e._layoutRect,n=e._lastRect;if(!n||n.w!==t.w||n.h!==t.h)return e._layout.recalc(e),t=e.layoutRect(),e._lastRect={x:t.x,y:t.y,w:t.w,h:t.h},!0},reflow:function(){var e;if(Ke.remove(this),this.visible()){for(rt.repaintControls=[],rt.repaintControls.map={},this.recalc(),e=rt.repaintControls.length;e--;)rt.repaintControls[e].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),rt.repaintControls=[]}return this}});function ut(e){var t,n;if(e.changedTouches)for(t="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n<t.length;n++)e[t[n]]=e.changedTouches[0][t[n]]}function ct(e,h){var m,g,t,p,v,b,y,x=h.document||_.document;h=h||{};var w=x.getElementById(h.handle||e);t=function(e){var t,n,i,r,o,s,a,l,u,c,d,f=(t=x,u=Math.max,n=t.documentElement,i=t.body,r=u(n.scrollWidth,i.scrollWidth),o=u(n.clientWidth,i.clientWidth),s=u(n.offsetWidth,i.offsetWidth),a=u(n.scrollHeight,i.scrollHeight),l=u(n.clientHeight,i.clientHeight),{width:r<s?o:r,height:a<u(n.offsetHeight,i.offsetHeight)?l:a});ut(e),e.preventDefault(),g=e.button,c=w,b=e.screenX,y=e.screenY,d=_.window.getComputedStyle?_.window.getComputedStyle(c,null).getPropertyValue("cursor"):c.runtimeStyle.cursor,m=ye("<div></div>").css({position:"absolute",top:0,left:0,width:f.width,height:f.height,zIndex:2147483647,opacity:1e-4,cursor:d}).appendTo(x.body),ye(x).on("mousemove touchmove",v).on("mouseup touchend",p),h.start(e)},v=function(e){if(ut(e),e.button!==g)return p(e);e.deltaX=e.screenX-b,e.deltaY=e.screenY-y,e.preventDefault(),h.drag(e)},p=function(e){ut(e),ye(x).off("mousemove touchmove",v).off("mouseup touchend",p),m.remove(),h.stop&&h.stop(e)},this.destroy=function(){ye(w).off()},ye(w).on("mousedown touchstart",t)}var dt,ft,ht,mt,gt={init:function(){this.on("repaint",this.renderScroll)},renderScroll:function(){var p=this,v=2;function n(){var m,g,e;function t(e,t,n,i,r,o){var s,a,l,u,c,d,f,h;if(a=p.getEl("scroll"+e)){if(f=t.toLowerCase(),h=n.toLowerCase(),ye(p.getEl("absend")).css(f,p.layoutRect()[i]-1),!r)return void ye(a).css("display","none");ye(a).css("display","block"),s=p.getEl("body"),l=p.getEl("scroll"+e+"t"),u=s["client"+n]-2*v,c=(u-=m&&g?a["client"+o]:0)/s["scroll"+n],(d={})[f]=s["offset"+t]+v,d[h]=u,ye(a).css(d),(d={})[f]=s["scroll"+t]*c,d[h]=u*c,ye(l).css(d)}}e=p.getEl("body"),m=e.scrollWidth>e.clientWidth,g=e.scrollHeight>e.clientHeight,t("h","Left","Width","contentW",m,"Height"),t("v","Top","Height","contentH",g,"Width")}p.settings.autoScroll&&(p._hasScroll||(p._hasScroll=!0,function(){function e(s,a,l,u,c){var d,e=p._id+"-scroll"+s,t=p.classPrefix;ye(p.getEl()).append('<div id="'+e+'" class="'+t+"scrollbar "+t+"scrollbar-"+s+'"><div id="'+e+'t" class="'+t+'scrollbar-thumb"></div></div>'),p.draghelper=new ct(e+"t",{start:function(){d=p.getEl("body")["scroll"+a],ye("#"+e).addClass(t+"active")},drag:function(e){var t,n,i,r,o=p.layoutRect();n=o.contentW>o.innerW,i=o.contentH>o.innerH,r=p.getEl("body")["client"+l]-2*v,t=(r-=n&&i?p.getEl("scroll"+s)["client"+c]:0)/p.getEl("body")["scroll"+l],p.getEl("body")["scroll"+a]=d+e["delta"+u]/t},stop:function(){ye("#"+e).removeClass(t+"active")}})}p.classes.add("scroll"),e("v","Top","Height","Y","Width"),e("h","Left","Width","X","Height")}(),p.on("wheel",function(e){var t=p.getEl("body");t.scrollLeft+=10*(e.deltaX||0),t.scrollTop+=10*e.deltaY,n()}),ye(p.getEl("body")).on("scroll",n)),n())}},pt=lt.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[gt],renderHtml:function(){var e=this,t=e._layout,n=e.settings.html;return e.preRender(),t.preRender(e),void 0===n?n='<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+t.renderHtml(e)+"</div>":("function"==typeof n&&(n=n.call(e)),e._hasBody=!1),'<div id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1" role="group">'+(e._preBodyHtml||"")+n+"</div>"}}),vt={resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(e,t){if(e<=1||t<=1){var n=we.getWindowSize();e=e<=1?e*n.w:e,t=t<=1?t*n.h:t}return this._layoutRect.autoResize=!1,this.layoutRect({minW:e,minH:t,w:e,h:t}).reflow()},resizeBy:function(e,t){var n=this.layoutRect();return this.resizeTo(n.w+e,n.h+t)}},bt=[],yt=[];function xt(e,t){for(;e;){if(e===t)return!0;e=e.parent()}}function wt(){dt||(dt=function(e){2!==e.button&&function(e){for(var t=bt.length;t--;){var n=bt[t],i=n.getParentCtrl(e.target);if(n.settings.autohide){if(i&&(xt(i,n)||n.parent()===i))continue;(e=n.fire("autohide",{target:e.target})).isDefaultPrevented()||n.hide()}}}(e)},ye(_.document).on("click touchstart",dt))}function _t(r){var e=we.getViewPort().y;function t(e,t){for(var n,i=0;i<bt.length;i++)if(bt[i]!==r)for(n=bt[i].parent();n&&(n=n.parent());)n===r&&bt[i].fixed(e).moveBy(0,t).repaint()}r.settings.autofix&&(r.state.get("fixed")?r._autoFixY>e&&(r.fixed(!1).layoutRect({y:r._autoFixY}).repaint(),t(!1,r._autoFixY-e)):(r._autoFixY=r.layoutRect().y,r._autoFixY<e&&(r.fixed(!0).layoutRect({y:0}).repaint(),t(!0,e-r._autoFixY))))}function Rt(e,t){var n,i,r=Ct.zIndex||65535;if(e)yt.push(t);else for(n=yt.length;n--;)yt[n]===t&&yt.splice(n,1);if(yt.length)for(n=0;n<yt.length;n++)yt[n].modal&&(r++,i=yt[n]),yt[n].getEl().style.zIndex=r,yt[n].zIndex=r,r++;var o=ye("#"+t.classPrefix+"modal-block",t.getContainerElm())[0];i?ye(o).css("z-index",i.zIndex-1):o&&(o.parentNode.removeChild(o),mt=!1),Ct.currentZIndex=r}var Ct=pt.extend({Mixins:[He,vt],init:function(e){var i=this;i._super(e),(i._eventsRoot=i).classes.add("floatpanel"),e.autohide&&(wt(),function(){if(!ht){var e=_.document.documentElement,t=e.clientWidth,n=e.clientHeight;ht=function(){_.document.all&&t===e.clientWidth&&n===e.clientHeight||(t=e.clientWidth,n=e.clientHeight,Ct.hideAll())},ye(_.window).on("resize",ht)}}(),bt.push(i)),e.autofix&&(ft||(ft=function(){var e;for(e=bt.length;e--;)_t(bt[e])},ye(_.window).on("scroll",ft)),i.on("move",function(){_t(this)})),i.on("postrender show",function(e){if(e.control===i){var t,n=i.classPrefix;i.modal&&!mt&&((t=ye("#"+n+"modal-block",i.getContainerElm()))[0]||(t=ye('<div id="'+n+'modal-block" class="'+n+"reset "+n+'fade"></div>').appendTo(i.getContainerElm())),u.setTimeout(function(){t.addClass(n+"in"),ye(i.getEl()).addClass(n+"in")}),mt=!0),Rt(!0,i)}}),i.on("show",function(){i.parents().each(function(e){if(e.state.get("fixed"))return i.fixed(!0),!1})}),e.popover&&(i._preBodyHtml='<div class="'+i.classPrefix+'arrow"></div>',i.classes.add("popover").add("bottom").add(i.isRtl()?"end":"start")),i.aria("label",e.ariaLabel),i.aria("labelledby",i._id),i.aria("describedby",i.describedBy||i._id+"-none")},fixed:function(e){var t=this;if(t.state.get("fixed")!==e){if(t.state.get("rendered")){var n=we.getViewPort();e?t.layoutRect().y-=n.y:t.layoutRect().y+=n.y}t.classes.toggle("fixed",e),t.state.set("fixed",e)}return t},show:function(){var e,t=this._super();for(e=bt.length;e--&&bt[e]!==this;);return-1===e&&bt.push(this),t},hide:function(){return Et(this),Rt(!1,this),this._super()},hideAll:function(){Ct.hideAll()},close:function(){return this.fire("close").isDefaultPrevented()||(this.remove(),Rt(!1,this)),this},remove:function(){Et(this),this._super()},postRender:function(){return this.settings.bodyRole&&this.getEl("body").setAttribute("role",this.settings.bodyRole),this._super()}});function Et(e){var t;for(t=bt.length;t--;)bt[t]===e&&bt.splice(t,1);for(t=yt.length;t--;)yt[t]===e&&yt.splice(t,1)}Ct.hideAll=function(){for(var e=bt.length;e--;){var t=bt[e];t&&t.settings.autohide&&(t.hide(),bt.splice(e,1))}};var kt=function(s,n,e){var a,i,l=p.DOM,t=s.getParam("fixed_toolbar_container");t&&(i=l.select(t)[0]);var r=function(){if(a&&a.moveRel&&a.visible()&&!a._fixed){var e=s.selection.getScrollContainer(),t=s.getBody(),n=0,i=0;if(e){var r=l.getPos(t),o=l.getPos(e);n=Math.max(0,o.x-r.x),i=Math.max(0,o.y-r.y)}a.fixed(!1).moveRel(t,s.rtl?["tr-br","br-tr"]:["tl-bl","bl-tl","tr-br"]).moveBy(n,i)}},o=function(){a&&(a.show(),r(),l.addClass(s.getBody(),"mce-edit-focus"))},u=function(){a&&(a.hide(),Ct.hideAll(),l.removeClass(s.getBody(),"mce-edit-focus"))},c=function(){var e,t;a?a.visible()||o():(a=n.panel=v.create({type:i?"panel":"floatpanel",role:"application",classes:"tinymce tinymce-inline",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:(e=i,t=s,!(!e||t.settings.ui_container)),border:1,items:[!1===d(s)?null:{type:"menubar",border:"0 0 1 0",items:re(s)},A(s,f(s))]}),W.setUiContainer(s,a),x(s),i?a.renderTo(i).reflow():a.renderTo().reflow(),R(s,a),o(),F(s),s.on("nodeChange",r),s.on("ResizeWindow",r),s.on("activate",o),s.on("deactivate",u),s.nodeChanged())};return s.settings.content_editable=!0,s.on("focus",function(){!1===m(s)&&e.skinUiCss?l.styleSheetLoader.load(e.skinUiCss,c,c):c()}),s.on("blur hide",u),s.on("remove",function(){a&&(a.remove(),a=null)}),!1===m(s)&&e.skinUiCss?l.styleSheetLoader.load(e.skinUiCss,ge(s)):ge(s)(),{}};function Ht(i,r){var o,s,a=this,l=rt.classPrefix;a.show=function(e,t){function n(){o&&(ye(i).append('<div class="'+l+"throbber"+(r?" "+l+"throbber-inline":"")+'"></div>'),t&&t())}return a.hide(),o=!0,e?s=u.setTimeout(n,e):n(),a},a.hide=function(){var e=i.lastChild;return u.clearTimeout(s),e&&-1!==e.className.indexOf("throbber")&&e.parentNode.removeChild(e),o=!1,a}}var St=function(e,t){var n;e.on("ProgressState",function(e){n=n||new Ht(t.panel.getEl("body")),e.state?n.show(e.time):n.hide()})},Tt=function(e,t,n){var i=function(e){var t=e.settings,n=t.skin,i=t.skin_url;if(!1!==n){var r=n||"lightgray";i=i?e.documentBaseURI.toAbsolute(i):l.baseURL+"/skins/"+r}return i}(e);return i&&(n.skinUiCss=i+"/skin.min.css",e.contentCSS.push(i+"/content"+(e.inline?".inline":"")+".min.css")),St(e,t),e.getParam("inline",!1,"boolean")?kt(e,t,n):be(e,t,n)},Mt=rt.extend({Mixins:[He],Defaults:{classes:"widget tooltip tooltip-n"},renderHtml:function(){var e=this,t=e.classPrefix;return'<div id="'+e._id+'" class="'+e.classes+'" role="presentation"><div class="'+t+'tooltip-arrow"></div><div class="'+t+'tooltip-inner">'+e.encode(e.state.get("text"))+"</div></div>"},bindStates:function(){var t=this;return t.state.on("change:text",function(e){t.getEl().lastChild.innerHTML=t.encode(e.value)}),t._super()},repaint:function(){var e,t;e=this.getEl().style,t=this._layoutRect,e.left=t.x+"px",e.top=t.y+"px",e.zIndex=131070}}),Nt=rt.extend({init:function(i){var r=this;r._super(i),i=r.settings,r.canFocus=!0,i.tooltip&&!1!==Nt.tooltips&&(r.on("mouseenter",function(e){var t=r.tooltip().moveTo(-65535);if(e.control===r){var n=t.text(i.tooltip).show().testMoveRel(r.getEl(),["bc-tc","bc-tl","bc-tr"]);t.classes.toggle("tooltip-n","bc-tc"===n),t.classes.toggle("tooltip-nw","bc-tl"===n),t.classes.toggle("tooltip-ne","bc-tr"===n),t.moveRel(r.getEl(),n)}else t.hide()}),r.on("mouseleave mousedown click",function(){r.tooltip().remove(),r._tooltip=null})),r.aria("label",i.ariaLabel||i.tooltip)},tooltip:function(){return this._tooltip||(this._tooltip=new Mt({type:"tooltip"}),W.inheritUiContainer(this,this._tooltip),this._tooltip.renderTo()),this._tooltip},postRender:function(){var e=this,t=e.settings;e._super(),e.parent()||!t.width&&!t.height||(e.initLayoutRect(),e.repaint()),t.autofocus&&e.focus()},bindStates:function(){var t=this;function n(e){t.aria("disabled",e),t.classes.toggle("disabled",e)}function i(e){t.aria("pressed",e),t.classes.toggle("active",e)}return t.state.on("change:disabled",function(e){n(e.value)}),t.state.on("change:active",function(e){i(e.value)}),t.state.get("disabled")&&n(!0),t.state.get("active")&&i(!0),t._super()},remove:function(){this._super(),this._tooltip&&(this._tooltip.remove(),this._tooltip=null)}}),Pt=Nt.extend({Defaults:{value:0},init:function(e){this._super(e),this.classes.add("progress"),this.settings.filter||(this.settings.filter=function(e){return Math.round(e)})},renderHtml:function(){var e=this._id,t=this.classPrefix;return'<div id="'+e+'" class="'+this.classes+'"><div class="'+t+'bar-container"><div class="'+t+'bar"></div></div><div class="'+t+'text">0%</div></div>'},postRender:function(){return this._super(),this.value(this.settings.value),this},bindStates:function(){var t=this;function n(e){e=t.settings.filter(e),t.getEl().lastChild.innerHTML=e+"%",t.getEl().firstChild.firstChild.style.width=e+"%"}return t.state.on("change:value",function(e){n(e.value)}),n(t.state.get("value")),t._super()}}),Wt=function(e,t){e.getEl().lastChild.textContent=t+(e.progressBar?" "+e.progressBar.value()+"%":"")},Dt=rt.extend({Mixins:[He],Defaults:{classes:"widget notification"},init:function(e){var t=this;t._super(e),t.maxWidth=e.maxWidth,e.text&&t.text(e.text),e.icon&&(t.icon=e.icon),e.color&&(t.color=e.color),e.type&&t.classes.add("notification-"+e.type),e.timeout&&(e.timeout<0||0<e.timeout)&&!e.closeButton?t.closeButton=!1:(t.classes.add("has-close"),t.closeButton=!0),e.progressBar&&(t.progressBar=new Pt),t.on("click",function(e){-1!==e.target.className.indexOf(t.classPrefix+"close")&&t.close()})},renderHtml:function(){var e,t=this,n=t.classPrefix,i="",r="",o="";return t.icon&&(i='<i class="'+n+"ico "+n+"i-"+t.icon+'"></i>'),e=' style="max-width: '+t.maxWidth+"px;"+(t.color?"background-color: "+t.color+';"':'"'),t.closeButton&&(r='<button type="button" class="'+n+'close" aria-hidden="true">\xd7</button>'),t.progressBar&&(o=t.progressBar.renderHtml()),'<div id="'+t._id+'" class="'+t.classes+'"'+e+' role="presentation">'+i+'<div class="'+n+'notification-inner">'+t.state.get("text")+"</div>"+o+r+'<div style="clip: rect(1px, 1px, 1px, 1px);height: 1px;overflow: hidden;position: absolute;width: 1px;" aria-live="assertive" aria-relevant="additions" aria-atomic="true"></div></div>'},postRender:function(){var e=this;return u.setTimeout(function(){e.$el.addClass(e.classPrefix+"in"),Wt(e,e.state.get("text"))},100),e._super()},bindStates:function(){var t=this;return t.state.on("change:text",function(e){t.getEl().firstChild.innerHTML=e.value,Wt(t,e.value)}),t.progressBar&&(t.progressBar.bindStates(),t.progressBar.state.on("change:value",function(e){Wt(t,t.state.get("text"))})),t._super()},close:function(){return this.fire("close").isDefaultPrevented()||this.remove(),this},repaint:function(){var e,t;e=this.getEl().style,t=this._layoutRect,e.left=t.x+"px",e.top=t.y+"px",e.zIndex=65534}});function Ot(o){var s=function(e){return e.inline?e.getElement():e.getContentAreaContainer()};return{open:function(e,t){var n,i=w.extend(e,{maxWidth:(n=s(o),we.getSize(n).width)}),r=new Dt(i);return 0<(r.args=i).timeout&&(r.timer=setTimeout(function(){r.close(),t()},i.timeout)),r.on("close",function(){t()}),r.renderTo(),r},close:function(e){e.close()},reposition:function(e){K(e,function(e){e.moveTo(0,0)}),function(n){if(0<n.length){var e=n.slice(0,1)[0],t=s(o);e.moveRel(t,"tc-tc"),K(n,function(e,t){0<t&&e.moveRel(n[t-1].getEl(),"bc-tc")})}}(e)},getArgs:function(e){return e.args}}}var At=[],Bt="";function Lt(e){var t,n=ye("meta[name=viewport]")[0];!1!==ce.overrideViewPort&&(n||((n=_.document.createElement("meta")).setAttribute("name","viewport"),_.document.getElementsByTagName("head")[0].appendChild(n)),(t=n.getAttribute("content"))&&void 0!==Bt&&(Bt=t),n.setAttribute("content",e?"width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0":Bt))}function zt(e,t){(function(){for(var e=0;e<At.length;e++)if(At[e]._fullscreen)return!0;return!1})()&&!1===t&&ye([_.document.documentElement,_.document.body]).removeClass(e+"fullscreen")}var It=Ct.extend({modal:!0,Defaults:{border:1,layout:"flex",containerCls:"panel",role:"dialog",callbacks:{submit:function(){this.fire("submit",{data:this.toJSON()})},close:function(){this.close()}}},init:function(e){var n=this;n._super(e),n.isRtl()&&n.classes.add("rtl"),n.classes.add("window"),n.bodyClasses.add("window-body"),n.state.set("fixed",!0),e.buttons&&(n.statusbar=new pt({layout:"flex",border:"1 0 0 0",spacing:3,padding:10,align:"center",pack:n.isRtl()?"start":"end",defaults:{type:"button"},items:e.buttons}),n.statusbar.classes.add("foot"),n.statusbar.parent(n)),n.on("click",function(e){var t=n.classPrefix+"close";(we.hasClass(e.target,t)||we.hasClass(e.target.parentNode,t))&&n.close()}),n.on("cancel",function(){n.close()}),n.on("move",function(e){e.control===n&&Ct.hideAll()}),n.aria("describedby",n.describedBy||n._id+"-none"),n.aria("label",e.title),n._fullscreen=!1},recalc:function(){var e,t,n,i,r=this,o=r.statusbar;r._fullscreen&&(r.layoutRect(we.getWindowSize()),r.layoutRect().contentH=r.layoutRect().innerH),r._super(),e=r.layoutRect(),r.settings.title&&!r._fullscreen&&(t=e.headerW)>e.w&&(n=e.x-Math.max(0,t/2),r.layoutRect({w:t,x:n}),i=!0),o&&(o.layoutRect({w:r.layoutRect().innerW}).recalc(),(t=o.layoutRect().minW+e.deltaW)>e.w&&(n=e.x-Math.max(0,t-e.w),r.layoutRect({w:t,x:n}),i=!0)),i&&r.recalc()},initLayoutRect:function(){var e,t=this,n=t._super(),i=0;if(t.settings.title&&!t._fullscreen){e=t.getEl("head");var r=we.getSize(e);n.headerW=r.width,n.headerH=r.height,i+=n.headerH}t.statusbar&&(i+=t.statusbar.layoutRect().h),n.deltaH+=i,n.minH+=i,n.h+=i;var o=we.getWindowSize();return n.x=t.settings.x||Math.max(0,o.w/2-n.w/2),n.y=t.settings.y||Math.max(0,o.h/2-n.h/2),n},renderHtml:function(){var e=this,t=e._layout,n=e._id,i=e.classPrefix,r=e.settings,o="",s="",a=r.html;return e.preRender(),t.preRender(e),r.title&&(o='<div id="'+n+'-head" class="'+i+'window-head"><div id="'+n+'-title" class="'+i+'title">'+e.encode(r.title)+'</div><div id="'+n+'-dragh" class="'+i+'dragh"></div><button type="button" class="'+i+'close" aria-hidden="true"><i class="mce-ico mce-i-remove"></i></button></div>'),r.url&&(a='<iframe src="'+r.url+'" tabindex="-1"></iframe>'),void 0===a&&(a=t.renderHtml(e)),e.statusbar&&(s=e.statusbar.renderHtml()),'<div id="'+n+'" class="'+e.classes+'" hidefocus="1"><div class="'+e.classPrefix+'reset" role="application">'+o+'<div id="'+n+'-body" class="'+e.bodyClasses+'">'+a+"</div>"+s+"</div></div>"},fullscreen:function(e){var n,t,i=this,r=_.document.documentElement,o=i.classPrefix;if(e!==i._fullscreen)if(ye(_.window).on("resize",function(){var e;if(i._fullscreen)if(n)i._timer||(i._timer=u.setTimeout(function(){var e=we.getWindowSize();i.moveTo(0,0).resizeTo(e.w,e.h),i._timer=0},50));else{e=(new Date).getTime();var t=we.getWindowSize();i.moveTo(0,0).resizeTo(t.w,t.h),50<(new Date).getTime()-e&&(n=!0)}}),t=i.layoutRect(),i._fullscreen=e){i._initial={x:t.x,y:t.y,w:t.w,h:t.h},i.borderBox=Me("0"),i.getEl("head").style.display="none",t.deltaH-=t.headerH+2,ye([r,_.document.body]).addClass(o+"fullscreen"),i.classes.add("fullscreen");var s=we.getWindowSize();i.moveTo(0,0).resizeTo(s.w,s.h)}else i.borderBox=Me(i.settings.border),i.getEl("head").style.display="",t.deltaH+=t.headerH,ye([r,_.document.body]).removeClass(o+"fullscreen"),i.classes.remove("fullscreen"),i.moveTo(i._initial.x,i._initial.y).resizeTo(i._initial.w,i._initial.h);return i.reflow()},postRender:function(){var t,n=this;setTimeout(function(){n.classes.add("in"),n.fire("open")},0),n._super(),n.statusbar&&n.statusbar.postRender(),n.focus(),this.dragHelper=new ct(n._id+"-dragh",{start:function(){t={x:n.layoutRect().x,y:n.layoutRect().y}},drag:function(e){n.moveTo(t.x+e.deltaX,t.y+e.deltaY)}}),n.on("submit",function(e){e.isDefaultPrevented()||n.close()}),At.push(n),Lt(!0)},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var e,t=this;for(t.dragHelper.destroy(),t._super(),t.statusbar&&this.statusbar.remove(),zt(t.classPrefix,!1),e=At.length;e--;)At[e]===t&&At.splice(e,1);Lt(0<At.length)},getContentWindow:function(){var e=this.getEl().getElementsByTagName("iframe")[0];return e?e.contentWindow:null}});!function(){if(!ce.desktop){var n={w:_.window.innerWidth,h:_.window.innerHeight};u.setInterval(function(){var e=_.window.innerWidth,t=_.window.innerHeight;n.w===e&&n.h===t||(n={w:e,h:t},ye(_.window).trigger("resize"))},100)}ye(_.window).on("resize",function(){var e,t,n=we.getWindowSize();for(e=0;e<At.length;e++)t=At[e].layoutRect(),At[e].moveTo(At[e].settings.x||Math.max(0,n.w/2-t.w/2),At[e].settings.y||Math.max(0,n.h/2-t.h/2))})}();var Ft,Ut,Vt,Yt=It.extend({init:function(e){e={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(e)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(e){var t,i=e.callback||function(){};function n(e,t,n){return{type:"button",text:e,subtype:n?"primary":"",onClick:function(e){e.control.parents()[1].close(),i(t)}}}switch(e.buttons){case Yt.OK_CANCEL:t=[n("Ok",!0,!0),n("Cancel",!1)];break;case Yt.YES_NO:case Yt.YES_NO_CANCEL:t=[n("Yes",1,!0),n("No",0)],e.buttons===Yt.YES_NO_CANCEL&&t.push(n("Cancel",-1));break;default:t=[n("Ok",!0,!0)]}return new It({padding:20,x:e.x,y:e.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:t,title:e.title,role:"alertdialog",items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:e.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:e.onClose,onCancel:function(){i(!1)}}).renderTo(_.document.body).reflow()},alert:function(e,t){return"string"==typeof e&&(e={text:e}),e.callback=t,Yt.msgBox(e)},confirm:function(e,t){return"string"==typeof e&&(e={text:e}),e.callback=t,e.buttons=Yt.OK_CANCEL,Yt.msgBox(e)}}}),$t=function(n){return{renderUI:function(e){return Tt(n,this,e)},resizeTo:function(e,t){return le(n,e,t)},resizeBy:function(e,t){return ue(n,e,t)},getNotificationManagerImpl:function(){return Ot(n)},getWindowManagerImpl:function(){return{open:function(n,e,t){var i;return n.title=n.title||" ",n.url=n.url||n.file,n.url&&(n.width=parseInt(n.width||320,10),n.height=parseInt(n.height||240,10)),n.body&&(n.items={defaults:n.defaults,type:n.bodyType||"form",items:n.body,data:n.data,callbacks:n.commands}),n.url||n.buttons||(n.buttons=[{text:"Ok",subtype:"primary",onclick:function(){i.find("form")[0].submit()}},{text:"Cancel",onclick:function(){i.close()}}]),(i=new It(n)).on("close",function(){t(i)}),n.data&&i.on("postRender",function(){this.find("*").each(function(e){var t=e.name();t in n.data&&e.value(n.data[t])})}),i.features=n||{},i.params=e||{},i=i.renderTo(_.document.body).reflow()},alert:function(e,t,n){var i;return(i=Yt.alert(e,function(){t()})).on("close",function(){n(i)}),i},confirm:function(e,t,n){var i;return(i=Yt.confirm(e,function(e){t(e)})).on("close",function(){n(i)}),i},close:function(e){e.close()},getParams:function(e){return e.params},setParams:function(e,t){e.params=t}}}}},qt=Se.extend({Defaults:{firstControlClass:"first",lastControlClass:"last"},init:function(e){this.settings=w.extend({},this.Defaults,e)},preRender:function(e){e.bodyClasses.add(this.settings.containerClass)},applyClasses:function(e){var t,n,i,r,o=this.settings;t=o.firstControlClass,n=o.lastControlClass,e.each(function(e){e.classes.remove(t).remove(n).add(o.controlClass),e.visible()&&(i||(i=e),r=e)}),i&&i.classes.add(t),r&&r.classes.add(n)},renderHtml:function(e){var t="";return this.applyClasses(e.items()),e.items().each(function(e){t+=e.renderHtml()}),t},recalc:function(){},postRender:function(){},isNative:function(){return!1}}),Xt=qt.extend({Defaults:{containerClass:"abs-layout",controlClass:"abs-layout-item"},recalc:function(e){e.items().filter(":visible").each(function(e){var t=e.settings;e.layoutRect({x:t.x,y:t.y,w:t.w,h:t.h}),e.recalc&&e.recalc()})},renderHtml:function(e){return'<div id="'+e._id+'-absend" class="'+e.classPrefix+'abs-end"></div>'+this._super(e)}}),jt=Nt.extend({Defaults:{classes:"widget btn",role:"button"},init:function(e){var t,n=this;n._super(e),e=n.settings,t=n.settings.size,n.on("click mousedown",function(e){e.preventDefault()}),n.on("touchstart",function(e){n.fire("click",e),e.preventDefault()}),e.subtype&&n.classes.add(e.subtype),t&&n.classes.add("btn-"+t),e.icon&&n.icon(e.icon)},icon:function(e){return arguments.length?(this.state.set("icon",e),this):this.state.get("icon")},repaint:function(){var e,t=this.getEl().firstChild;t&&((e=t.style).width=e.height="100%"),this._super()},renderHtml:function(){var e,t,n=this,i=n._id,r=n.classPrefix,o=n.state.get("icon"),s=n.state.get("text"),a="",l=n.settings;return(e=l.image)?(o="none","string"!=typeof e&&(e=_.window.getSelection?e[0]:e[1]),e=" style=\"background-image: url('"+e+"')\""):e="",s&&(n.classes.add("btn-has-text"),a='<span class="'+r+'txt">'+n.encode(s)+"</span>"),o=o?r+"ico "+r+"i-"+o:"",t="boolean"==typeof l.active?' aria-pressed="'+l.active+'"':"",'<div id="'+i+'" class="'+n.classes+'" tabindex="-1"'+t+'><button id="'+i+'-button" role="presentation" type="button" tabindex="-1">'+(o?'<i class="'+o+'"'+e+"></i>":"")+a+"</button></div>"},bindStates:function(){var o=this,n=o.$,i=o.classPrefix+"txt";function s(e){var t=n("span."+i,o.getEl());e?(t[0]||(n("button:first",o.getEl()).append('<span class="'+i+'"></span>'),t=n("span."+i,o.getEl())),t.html(o.encode(e))):t.remove(),o.classes.toggle("btn-has-text",!!e)}return o.state.on("change:text",function(e){s(e.value)}),o.state.on("change:icon",function(e){var t=e.value,n=o.classPrefix;t=(o.settings.icon=t)?n+"ico "+n+"i-"+o.settings.icon:"";var i=o.getEl().firstChild,r=i.getElementsByTagName("i")[0];t?(r&&r===i.firstChild||(r=_.document.createElement("i"),i.insertBefore(r,i.firstChild)),r.className=t):r&&i.removeChild(r),s(o.state.get("text"))}),o._super()}}),Jt=jt.extend({init:function(e){e=w.extend({text:"Browse...",multiple:!1,accept:null},e),this._super(e),this.classes.add("browsebutton"),e.multiple&&this.classes.add("multiple")},postRender:function(){var n=this,t=we.create("input",{type:"file",id:n._id+"-browse",accept:n.settings.accept});n._super(),ye(t).on("change",function(e){var t=e.target.files;n.value=function(){return t.length?n.settings.multiple?t:t[0]:null},e.preventDefault(),t.length&&n.fire("change",e)}),ye(t).on("click",function(e){e.stopPropagation()}),ye(n.getEl("button")).on("click touchstart",function(e){e.stopPropagation(),t.click(),e.preventDefault()}),n.getEl().appendChild(t)},remove:function(){ye(this.getEl("button")).off(),ye(this.getEl("input")).off(),this._super()}}),Gt=lt.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var e=this,t=e._layout;return e.classes.add("btn-group"),e.preRender(),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes+'"><div id="'+e._id+'-body">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"}}),Kt=Nt.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(e){var t=this;t._super(e),t.on("click mousedown",function(e){e.preventDefault()}),t.on("click",function(e){e.preventDefault(),t.disabled()||t.checked(!t.checked())}),t.checked(t.settings.checked)},checked:function(e){return arguments.length?(this.state.set("checked",e),this):this.state.get("checked")},value:function(e){return arguments.length?this.checked(e):this.checked()},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'<div id="'+t+'" class="'+e.classes+'" unselectable="on" aria-labelledby="'+t+'-al" tabindex="-1"><i class="'+n+"ico "+n+'i-checkbox"></i><span id="'+t+'-al" class="'+n+'label">'+e.encode(e.state.get("text"))+"</span></div>"},bindStates:function(){var o=this;function t(e){o.classes.toggle("checked",e),o.aria("checked",e)}return o.state.on("change:text",function(e){o.getEl("al").firstChild.data=o.translate(e.value)}),o.state.on("change:checked change:value",function(e){o.fire("change"),t(e.value)}),o.state.on("change:icon",function(e){var t=e.value,n=o.classPrefix;if(void 0===t)return o.settings.icon;t=(o.settings.icon=t)?n+"ico "+n+"i-"+o.settings.icon:"";var i=o.getEl().firstChild,r=i.getElementsByTagName("i")[0];t?(r&&r===i.firstChild||(r=_.document.createElement("i"),i.insertBefore(r,i.firstChild)),r.className=t):r&&i.removeChild(r)}),o.state.get("checked")&&t(!0),o._super()}}),Zt=tinymce.util.Tools.resolve("tinymce.util.VK"),Qt=Nt.extend({init:function(i){var r=this;r._super(i),i=r.settings,r.classes.add("combobox"),r.subinput=!0,r.ariaTarget="inp",i.menu=i.menu||i.values,i.menu&&(i.icon="caret"),r.on("click",function(e){var t=e.target,n=r.getEl();if(ye.contains(n,t)||t===n)for(;t&&t!==n;)t.id&&-1!==t.id.indexOf("-open")&&(r.fire("action"),i.menu&&(r.showMenu(),e.aria&&r.menu.items()[0].focus())),t=t.parentNode}),r.on("keydown",function(e){var t;13===e.keyCode&&"INPUT"===e.target.nodeName&&(e.preventDefault(),r.parents().reverse().each(function(e){if(e.toJSON)return t=e,!1}),r.fire("submit",{data:t.toJSON()}))}),r.on("keyup",function(e){if("INPUT"===e.target.nodeName){var t=r.state.get("value"),n=e.target.value;n!==t&&(r.state.set("value",n),r.fire("autocomplete",e))}}),r.on("mouseover",function(e){var t=r.tooltip().moveTo(-65535);if(r.statusLevel()&&-1!==e.target.className.indexOf(r.classPrefix+"status")){var n=r.statusMessage()||"Ok",i=t.text(n).show().testMoveRel(e.target,["bc-tc","bc-tl","bc-tr"]);t.classes.toggle("tooltip-n","bc-tc"===i),t.classes.toggle("tooltip-nw","bc-tl"===i),t.classes.toggle("tooltip-ne","bc-tr"===i),t.moveRel(e.target,i)}})},statusLevel:function(e){return 0<arguments.length&&this.state.set("statusLevel",e),this.state.get("statusLevel")},statusMessage:function(e){return 0<arguments.length&&this.state.set("statusMessage",e),this.state.get("statusMessage")},showMenu:function(){var e,t=this,n=t.settings;t.menu||((e=n.menu||[]).length?e={type:"menu",items:e}:e.type=e.type||"menu",t.menu=v.create(e).parent(t).renderTo(t.getContainerElm()),t.fire("createmenu"),t.menu.reflow(),t.menu.on("cancel",function(e){e.control===t.menu&&t.focus()}),t.menu.on("show hide",function(e){e.control.items().each(function(e){e.active(e.value()===t.value())})}).fire("show"),t.menu.on("select",function(e){t.value(e.control.value())}),t.on("focusin",function(e){"INPUT"===e.target.tagName.toUpperCase()&&t.menu.hide()}),t.aria("expanded",!0)),t.menu.show(),t.menu.layoutRect({w:t.layoutRect().w}),t.menu.moveRel(t.getEl(),t.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},focus:function(){this.getEl("inp").focus()},repaint:function(){var e,t,n=this,i=n.getEl(),r=n.getEl("open"),o=n.layoutRect(),s=0,a=i.firstChild;n.statusLevel()&&"none"!==n.statusLevel()&&(s=parseInt(we.getRuntimeStyle(a,"padding-right"),10)-parseInt(we.getRuntimeStyle(a,"padding-left"),10)),e=r?o.w-we.getSize(r).width-10:o.w-10;var l=_.document;return l.all&&(!l.documentMode||l.documentMode<=8)&&(t=n.layoutRect().h-2+"px"),ye(a).css({width:e-s,lineHeight:t}),n._super(),n},postRender:function(){var t=this;return ye(this.getEl("inp")).on("change",function(e){t.state.set("value",e.target.value),t.fire("change",e)}),t._super()},renderHtml:function(){var e,t,n,i=this,r=i._id,o=i.settings,s=i.classPrefix,a=i.state.get("value")||"",l="",u="";return"spellcheck"in o&&(u+=' spellcheck="'+o.spellcheck+'"'),o.maxLength&&(u+=' maxlength="'+o.maxLength+'"'),o.size&&(u+=' size="'+o.size+'"'),o.subtype&&(u+=' type="'+o.subtype+'"'),n='<i id="'+r+'-status" class="mce-status mce-ico" style="display: none"></i>',i.disabled()&&(u+=' disabled="disabled"'),(e=o.icon)&&"caret"!==e&&(e=s+"ico "+s+"i-"+o.icon),t=i.state.get("text"),(e||t)&&(l='<div id="'+r+'-open" class="'+s+"btn "+s+'open" tabIndex="-1" role="button"><button id="'+r+'-action" type="button" hidefocus="1" tabindex="-1">'+("caret"!==e?'<i class="'+e+'"></i>':'<i class="'+s+'caret"></i>')+(t?(e?" ":"")+t:"")+"</button></div>",i.classes.add("has-open")),'<div id="'+r+'" class="'+i.classes+'"><input id="'+r+'-inp" class="'+s+'textbox" value="'+i.encode(a,!1)+'" hidefocus="1"'+u+' placeholder="'+i.encode(o.placeholder)+'" />'+n+l+"</div>"},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl("inp").value),this.state.get("value"))},showAutoComplete:function(e,i){var r=this;if(0!==e.length){r.menu?r.menu.items().remove():r.menu=v.create({type:"menu",classes:"combobox-menu",layout:"flow"}).parent(r).renderTo(),w.each(e,function(e){var t,n;r.menu.add({text:e.title,url:e.previewUrl,match:i,classes:"menu-item-ellipsis",onclick:(t=e.value,n=e.title,function(){r.fire("selectitem",{title:n,value:t})})})}),r.menu.renderNew(),r.hideMenu(),r.menu.on("cancel",function(e){e.control.parent()===r.menu&&(e.stopPropagation(),r.focus(),r.hideMenu())}),r.menu.on("select",function(){r.focus()});var t=r.layoutRect().w;r.menu.layoutRect({w:t,minW:0,maxW:t}),r.menu.repaint(),r.menu.reflow(),r.menu.show(),r.menu.moveRel(r.getEl(),r.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])}else r.hideMenu()},hideMenu:function(){this.menu&&this.menu.hide()},bindStates:function(){var r=this;r.state.on("change:value",function(e){r.getEl("inp").value!==e.value&&(r.getEl("inp").value=e.value)}),r.state.on("change:disabled",function(e){r.getEl("inp").disabled=e.value}),r.state.on("change:statusLevel",function(e){var t=r.getEl("status"),n=r.classPrefix,i=e.value;we.css(t,"display","none"===i?"none":""),we.toggleClass(t,n+"i-checkmark","ok"===i),we.toggleClass(t,n+"i-warning","warn"===i),we.toggleClass(t,n+"i-error","error"===i),r.classes.toggle("has-status","none"!==i),r.repaint()}),we.on(r.getEl("status"),"mouseleave",function(){r.tooltip().hide()}),r.on("cancel",function(e){r.menu&&r.menu.visible()&&(e.stopPropagation(),r.hideMenu())});var n=function(e,t){t&&0<t.items().length&&t.items().eq(e)[0].focus()};return r.on("keydown",function(e){var t=e.keyCode;"INPUT"===e.target.nodeName&&(t===Zt.DOWN?(e.preventDefault(),r.fire("autocomplete"),n(0,r.menu)):t===Zt.UP&&(e.preventDefault(),n(-1,r.menu)))}),r._super()},remove:function(){ye(this.getEl("inp")).off(),this.menu&&this.menu.remove(),this._super()}}),en=Qt.extend({init:function(e){var t=this;e.spellcheck=!1,e.onaction&&(e.icon="none"),t._super(e),t.classes.add("colorbox"),t.on("change keyup postrender",function(){t.repaintColor(t.value())})},repaintColor:function(e){var t=this.getEl("open"),n=t?t.getElementsByTagName("i")[0]:null;if(n)try{n.style.background=e}catch(i){}},bindStates:function(){var t=this;return t.state.on("change:value",function(e){t.state.get("rendered")&&t.repaintColor(e.value)}),t._super()}}),tn=jt.extend({showPanel:function(){var t=this,e=t.settings;if(t.classes.add("opened"),t.panel)t.panel.show();else{var n=e.panel;n.type&&(n={layout:"grid",items:n}),n.role=n.role||"dialog",n.popover=!0,n.autohide=!0,n.ariaRoot=!0,t.panel=new Ct(n).on("hide",function(){t.classes.remove("opened")}).on("cancel",function(e){e.stopPropagation(),t.focus(),t.hidePanel()}).parent(t).renderTo(t.getContainerElm()),t.panel.fire("show"),t.panel.reflow()}var i=t.panel.testMoveRel(t.getEl(),e.popoverAlign||(t.isRtl()?["bc-tc","bc-tl","bc-tr"]:["bc-tc","bc-tr","bc-tl","tc-bc","tc-br","tc-bl"]));t.panel.classes.toggle("start","l"===i.substr(-1)),t.panel.classes.toggle("end","r"===i.substr(-1));var r="t"===i.substr(0,1);t.panel.classes.toggle("bottom",!r),t.panel.classes.toggle("top",r),t.panel.moveRel(t.getEl(),i)},hidePanel:function(){this.panel&&this.panel.hide()},postRender:function(){var t=this;return t.aria("haspopup",!0),t.on("click",function(e){e.control===t&&(t.panel&&t.panel.visible()?t.hidePanel():(t.showPanel(),t.panel.focus(!!e.aria)))}),t._super()},remove:function(){return this.panel&&(this.panel.remove(),this.panel=null),this._super()}}),nn=p.DOM,rn=tn.extend({init:function(e){this._super(e),this.classes.add("splitbtn"),this.classes.add("colorbutton")},color:function(e){return e?(this._color=e,this.getEl("preview").style.backgroundColor=e,this):this._color},resetColor:function(){return this._color=null,this.getEl("preview").style.backgroundColor=null,this},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,i=e.state.get("text"),r=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"",o=e.settings.image?" style=\"background-image: url('"+e.settings.image+"')\"":"",s="";return i&&(e.classes.add("btn-has-text"),s='<span class="'+n+'txt">'+e.encode(i)+"</span>"),'<div id="'+t+'" class="'+e.classes+'" role="button" tabindex="-1" aria-haspopup="true"><button role="presentation" hidefocus="1" type="button" tabindex="-1">'+(r?'<i class="'+r+'"'+o+"></i>":"")+'<span id="'+t+'-preview" class="'+n+'preview"></span>'+s+'</button><button type="button" class="'+n+'open" hidefocus="1" tabindex="-1"> <i class="'+n+'caret"></i></button></div>'},postRender:function(){var t=this,n=t.settings.onclick;return t.on("click",function(e){e.aria&&"down"===e.aria.key||e.control!==t||nn.getParent(e.target,"."+t.classPrefix+"open")||(e.stopImmediatePropagation(),n.call(t,e))}),delete t.settings.onclick,t._super()}}),on=tinymce.util.Tools.resolve("tinymce.util.Color"),sn=Nt.extend({Defaults:{classes:"widget colorpicker"},init:function(e){this._super(e)},postRender:function(){var n,i,r,o,s,a=this,l=a.color();function u(e,t){var n,i,r=we.getPos(e);return n=t.pageX-r.x,i=t.pageY-r.y,{x:n=Math.max(0,Math.min(n/e.clientWidth,1)),y:i=Math.max(0,Math.min(i/e.clientHeight,1))}}function c(e,t){var n=(360-e.h)/360;we.css(r,{top:100*n+"%"}),t||we.css(s,{left:e.s+"%",top:100-e.v+"%"}),o.style.background=on({s:100,v:100,h:e.h}).toHex(),a.color().parse({s:e.s,v:e.v,h:e.h})}function e(e){var t;t=u(o,e),n.s=100*t.x,n.v=100*(1-t.y),c(n),a.fire("change")}function t(e){var t;t=u(i,e),(n=l.toHsv()).h=360*(1-t.y),c(n,!0),a.fire("change")}i=a.getEl("h"),r=a.getEl("hp"),o=a.getEl("sv"),s=a.getEl("svp"),a._repaint=function(){c(n=l.toHsv())},a._super(),a._svdraghelper=new ct(a._id+"-sv",{start:e,drag:e}),a._hdraghelper=new ct(a._id+"-h",{start:t,drag:t}),a._repaint()},rgb:function(){return this.color().toRgb()},value:function(e){if(!arguments.length)return this.color().toHex();this.color().parse(e),this._rendered&&this._repaint()},color:function(){return this._color||(this._color=on()),this._color},renderHtml:function(){var e,t=this._id,o=this.classPrefix,s="#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000";return e='<div id="'+t+'-h" class="'+o+'colorpicker-h" style="background: -ms-linear-gradient(top,'+s+");background: linear-gradient(to bottom,"+s+');">'+function(){var e,t,n,i,r="";for(n="filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=",e=0,t=(i=s.split(",")).length-1;e<t;e++)r+='<div class="'+o+'colorpicker-h-chunk" style="height:'+100/t+"%;"+n+i[e]+",endColorstr="+i[e+1]+");-ms-"+n+i[e]+",endColorstr="+i[e+1]+')"></div>';return r}()+'<div id="'+t+'-hp" class="'+o+'colorpicker-h-marker"></div></div>','<div id="'+t+'" class="'+this.classes+'"><div id="'+t+'-sv" class="'+o+'colorpicker-sv"><div class="'+o+'colorpicker-overlay1"><div class="'+o+'colorpicker-overlay2"><div id="'+t+'-svp" class="'+o+'colorpicker-selector1"><div class="'+o+'colorpicker-selector2"></div></div></div></div></div>'+e+"</div>"}}),an=Nt.extend({init:function(e){e=w.extend({height:100,text:"Drop an image here",multiple:!1,accept:null},e),this._super(e),this.classes.add("dropzone"),e.multiple&&this.classes.add("multiple")},renderHtml:function(){var e,t,n=this.settings;return e={id:this._id,hidefocus:"1"},t=we.create("div",e,"<span>"+this.translate(n.text)+"</span>"),n.height&&we.css(t,"height",n.height+"px"),n.width&&we.css(t,"width",n.width+"px"),t.className=this.classes,t.outerHTML},postRender:function(){var i=this,e=function(e){e.preventDefault(),i.classes.toggle("dragenter"),i.getEl().className=i.classes};i._super(),i.$el.on("dragover",function(e){e.preventDefault()}),i.$el.on("dragenter",e),i.$el.on("dragleave",e),i.$el.on("drop",function(e){if(e.preventDefault(),!i.state.get("disabled")){var t=function(e){var t=i.settings.accept;if("string"!=typeof t)return e;var n=new RegExp("("+t.split(/\s*,\s*/).join("|")+")$","i");return w.grep(e,function(e){return n.test(e.name)})}(e.dataTransfer.files);i.value=function(){return t.length?i.settings.multiple?t:t[0]:null},t.length&&i.fire("change",e)}})},remove:function(){this.$el.off(),this._super()}}),ln=Nt.extend({init:function(e){var n=this;e.delimiter||(e.delimiter="\xbb"),n._super(e),n.classes.add("path"),n.canFocus=!0,n.on("click",function(e){var t;(t=e.target.getAttribute("data-index"))&&n.fire("select",{value:n.row()[t],index:t})}),n.row(n.settings.row)},focus:function(){return this.getEl().firstChild.focus(),this},row:function(e){return arguments.length?(this.state.set("row",e),this):this.state.get("row")},renderHtml:function(){return'<div id="'+this._id+'" class="'+this.classes+'">'+this._getDataPathHtml(this.state.get("row"))+"</div>"},bindStates:function(){var t=this;return t.state.on("change:row",function(e){t.innerHtml(t._getDataPathHtml(e.value))}),t._super()},_getDataPathHtml:function(e){var t,n,i=e||[],r="",o=this.classPrefix;for(t=0,n=i.length;t<n;t++)r+=(0<t?'<div class="'+o+'divider" aria-hidden="true"> '+this.settings.delimiter+" </div>":"")+'<div role="button" class="'+o+"path-item"+(t===n-1?" "+o+"last":"")+'" data-index="'+t+'" tabindex="-1" id="'+this._id+"-"+t+'" aria-level="'+(t+1)+'">'+i[t].name+"</div>";return r||(r='<div class="'+o+'path-item">\xa0</div>'),r}}),un=ln.extend({postRender:function(){var o=this,s=o.settings.editor;function a(e){if(1===e.nodeType){if("BR"===e.nodeName||e.getAttribute("data-mce-bogus"))return!0;if("bookmark"===e.getAttribute("data-mce-type"))return!0}return!1}return!1!==s.settings.elementpath&&(o.on("select",function(e){s.focus(),s.selection.select(this.row()[e.index].element),s.nodeChanged()}),s.on("nodeChange",function(e){for(var t=[],n=e.parents,i=n.length;i--;)if(1===n[i].nodeType&&!a(n[i])){var r=s.fire("ResolveName",{name:n[i].nodeName.toLowerCase(),target:n[i]});if(r.isDefaultPrevented()||t.push({name:r.name,element:n[i]}),r.isPropagationStopped())break}o.row(t)})),o._super()}}),cn=lt.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.classes.add("formitem"),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1">'+(e.settings.title?'<div id="'+e._id+'-title" class="'+n+'title">'+e.settings.title+"</div>":"")+'<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"}}),dn=lt.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:15,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var i=this,e=i.items();i.settings.formItemDefaults||(i.settings.formItemDefaults={layout:"flex",autoResize:"overflow",defaults:{flex:1}}),e.each(function(e){var t,n=e.settings.label;n&&((t=new cn(w.extend({items:{type:"label",id:e._id+"-l",text:n,flex:0,forId:e._id,disabled:e.disabled()}},i.settings.formItemDefaults))).type="formitem",e.aria("labelledby",e._id+"-l"),"undefined"==typeof e.settings.flex&&(e.settings.flex=1),i.replace(e,t),t.add(e))})},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){this._super(),this.fromJSON(this.settings.data)},bindStates:function(){var n=this;function e(){var e,t,i=0,r=[];if(!1!==n.settings.labelGapCalc)for(("children"===n.settings.labelGapCalc?n.find("formitem"):n.items()).filter("formitem").each(function(e){var t=e.items()[0],n=t.getEl().clientWidth;i=i<n?n:i,r.push(t)}),t=n.settings.labelGap||0,e=r.length;e--;)r[e].settings.minWidth=i+t}n._super(),n.on("show",e),e()}}),fn=dn.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.preRender(),t.preRender(e),'<fieldset id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1">'+(e.settings.title?'<legend id="'+e._id+'-title" class="'+n+'fieldset-title">'+e.settings.title+"</legend>":"")+'<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></fieldset>"}}),hn=0,mn=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:k(e)}},gn={fromHtml:function(e,t){var n=(t||_.document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw _.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return mn(n.childNodes[0])},fromTag:function(e,t){var n=(t||_.document).createElement(e);return mn(n)},fromText:function(e,t){var n=(t||_.document).createTextNode(e);return mn(n)},fromDom:mn,fromPoint:function(e,t,n){var i=e.dom();return N.from(i.elementFromPoint(t,n)).map(mn)}},pn=(_.Node.ATTRIBUTE_NODE,_.Node.CDATA_SECTION_NODE,_.Node.COMMENT_NODE,_.Node.DOCUMENT_NODE),vn=(_.Node.DOCUMENT_TYPE_NODE,_.Node.DOCUMENT_FRAGMENT_NODE,_.Node.ELEMENT_NODE),bn=(_.Node.TEXT_NODE,_.Node.PROCESSING_INSTRUCTION_NODE,_.Node.ENTITY_REFERENCE_NODE,_.Node.ENTITY_NODE,_.Node.NOTATION_NODE,"undefined"!=typeof _.window?_.window:Function("return this;")(),function(e,t){var n=function(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(i.test(t))return i}return undefined}(e,t);if(!n)return{major:0,minor:0};var i=function(e){return Number(t.replace(n,"$"+e))};return xn(i(1),i(2))}),yn=function(){return xn(0,0)},xn=function(e,t){return{major:e,minor:t}},wn={nu:xn,detect:function(e,t){var n=String(t).toLowerCase();return 0===e.length?yn():bn(e,n)},unknown:yn},_n="Firefox",Rn=function(e,t){return function(){return t===e}},Cn=function(e){var t=e.current;return{current:t,version:e.version,isEdge:Rn("Edge",t),isChrome:Rn("Chrome",t),isIE:Rn("IE",t),isOpera:Rn("Opera",t),isFirefox:Rn(_n,t),isSafari:Rn("Safari",t)}},En={unknown:function(){return Cn({current:undefined,version:wn.unknown()})},nu:Cn,edge:k("Edge"),chrome:k("Chrome"),ie:k("IE"),opera:k("Opera"),firefox:k(_n),safari:k("Safari")},kn="Windows",Hn="Android",Sn="Solaris",Tn="FreeBSD",Mn=function(e,t){return function(){return t===e}},Nn=function(e){var t=e.current;return{current:t,version:e.version,isWindows:Mn(kn,t),isiOS:Mn("iOS",t),isAndroid:Mn(Hn,t),isOSX:Mn("OSX",t),isLinux:Mn("Linux",t),isSolaris:Mn(Sn,t),isFreeBSD:Mn(Tn,t)}},Pn={unknown:function(){return Nn({current:undefined,version:wn.unknown()})},nu:Nn,windows:k(kn),ios:k("iOS"),android:k(Hn),linux:k("Linux"),osx:k("OSX"),solaris:k(Sn),freebsd:k(Tn)},Wn=function(e,t){var n=String(t).toLowerCase();return function(e,t){for(var n=0,i=e.length;n<i;n++){var r=e[n];if(t(r,n))return N.some(r)}return N.none()}(e,function(e){return e.search(n)})},Dn=function(e,n){return Wn(e,n).map(function(e){var t=wn.detect(e.versionRegexes,n);return{current:e.name,version:t}})},On=function(e,n){return Wn(e,n).map(function(e){var t=wn.detect(e.versionRegexes,n);return{current:e.name,version:t}})},An=function(e,t){return-1!==e.indexOf(t)},Bn=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Ln=function(t){return function(e){return An(e,t)}},zn=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return An(e,"edge/")&&An(e,"chrome")&&An(e,"safari")&&An(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Bn],search:function(e){return An(e,"chrome")&&!An(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return An(e,"msie")||An(e,"trident")}},{name:"Opera",versionRegexes:[Bn,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Ln("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Ln("firefox")},{name:"Safari",versionRegexes:[Bn,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(An(e,"safari")||An(e,"mobile/"))&&An(e,"applewebkit")}}],In=[{name:"Windows",search:Ln("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return An(e,"iphone")||An(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Ln("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Ln("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Ln("linux"),versionRegexes:[]},{name:"Solaris",search:Ln("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Ln("freebsd"),versionRegexes:[]}],Fn={browsers:k(zn),oses:k(In)},Un=function(e){var t,n,i,r,o,s,a,l,u,c,d,f=Fn.browsers(),h=Fn.oses(),m=Dn(f,e).fold(En.unknown,En.nu),g=On(h,e).fold(Pn.unknown,Pn.nu);return{browser:m,os:g,deviceType:(n=m,i=e,r=(t=g).isiOS()&&!0===/ipad/i.test(i),o=t.isiOS()&&!r,s=t.isAndroid()&&3===t.version.major,a=t.isAndroid()&&4===t.version.major,l=r||s||a&&!0===/mobile/i.test(i),u=t.isiOS()||t.isAndroid(),c=u&&!l,d=n.isSafari()&&t.isiOS()&&!1===/safari/i.test(i),{isiPad:k(r),isiPhone:k(o),isTablet:k(l),isPhone:k(c),isTouch:k(u),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:k(d)})}},Vn=(Vt=!(Ft=function(){var e=_.navigator.userAgent;return Un(e)}),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Vt||(Vt=!0,Ut=Ft.apply(null,e)),Ut}),Yn=vn,$n=pn,qn=function(e){return e.nodeType!==Yn&&e.nodeType!==$n||0===e.childElementCount},Xn=(Vn().browser.isIE(),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}("element","offset"),w.trim),jn=function(t){return function(e){if(e&&1===e.nodeType){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}},Jn=jn("true"),Gn=jn("false"),Kn=function(e,t,n,i,r){return{type:e,title:t,url:n,level:i,attach:r}},Zn=function(e){return e.innerText||e.textContent},Qn=function(e){return e.id?e.id:(t="h",n=(new Date).getTime(),t+"_"+Math.floor(1e9*Math.random())+ ++hn+String(n));var t,n},ei=function(e){return(t=e)&&"A"===t.nodeName&&(t.id||t.name)&&ni(e);var t},ti=function(e){return e&&/^(H[1-6])$/.test(e.nodeName)},ni=function(e){return function(e){for(;e=e.parentNode;){var t=e.contentEditable;if(t&&"inherit"!==t)return Jn(e)}return!1}(e)&&!Gn(e)},ii=function(e){return ti(e)&&ni(e)},ri=function(e){var t,n=Qn(e);return Kn("header",Zn(e),"#"+n,ti(t=e)?parseInt(t.nodeName.substr(1),10):0,function(){e.id=n})},oi=function(e){var t=e.id||e.name,n=Zn(e);return Kn("anchor",n||"#"+t,"#"+t,0,E)},si=function(e){var t,n,i,r,o,s;return t="h1,h2,h3,h4,h5,h6,a:not([href])",n=e,G((Vn().browser.isIE(),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}("element","offset"),i=gn.fromDom(n),r=t,s=(o=i)===undefined?_.document:o.dom(),qn(s)?[]:G(s.querySelectorAll(r),gn.fromDom)),function(e){return e.dom()})},ai=function(e){return 0<Xn(e.title).length},li=function(e){var t,n=si(e);return Z((t=n,G(Z(t,ii),ri)).concat(G(Z(n,ei),oi)),ai)},ui={},ci=function(e){return{title:e.title,value:{title:{raw:e.title},url:e.url,attach:e.attach}}},di=function(e,t){return{title:e,value:{title:e,url:t,attach:E}}},fi=function(e,t,n){var i=t in e?e[t]:n;return!1===i?null:i},hi=function(e,i,r,t){var n,o,s,a,l,u,c={title:"-"},d=function(e){var t=e.hasOwnProperty(r)?e[r]:[],n=Z(t,function(e){return t=e,!J(i,function(e){return e.url===t});var t});return w.map(n,function(e){return{title:e,value:{title:e,url:e,attach:E}}})},f=function(t){var e,n=Z(i,function(e){return e.type===t});return e=n,w.map(e,ci)};return!1===t.typeahead_urls?[]:"file"===r?(n=[mi(e,d(ui)),mi(e,f("header")),mi(e,(a=f("anchor"),l=fi(t,"anchor_top","#top"),u=fi(t,"anchor_bottom","#bottom"),null!==l&&a.unshift(di("<top>",l)),null!==u&&a.push(di("<bottom>",u)),a))],o=function(e,t){return 0===e.length||0===t.length?e.concat(t):e.concat(c,t)},s=[],K(n,function(e){s=o(s,e)}),s):mi(e,d(ui))},mi=function(e,t){var n=e.toLowerCase(),i=w.grep(t,function(e){return-1!==e.title.toLowerCase().indexOf(n)});return 1===i.length&&i[0].title===e?[]:i},gi=function(r,i,o,s){var t=function(e){var t=li(o),n=hi(e,t,s,i);r.showAutoComplete(n,e)};r.on("autocomplete",function(){t(r.value())}),r.on("selectitem",function(e){var t=e.value;r.value(t.url);var n,i=(n=t.title).raw?n.raw:n;"image"===s?r.fire("change",{meta:{alt:i,attach:t.attach}}):r.fire("change",{meta:{text:i,attach:t.attach}}),r.focus()}),r.on("click",function(e){0===r.value().length&&"INPUT"===e.target.nodeName&&t("")}),r.on("PostRender",function(){r.getRoot().on("submit",function(e){var t,n,i;e.isDefaultPrevented()||(t=r.value(),i=ui[n=s],/^https?/.test(t)&&(i?j(i,t).isNone()&&(ui[n]=i.slice(0,5).concat(t)):ui[n]=[t]))})})},pi=function(o,e,n){var i=e.filepicker_validator_handler;i&&o.state.on("change:value",function(e){var t;0!==(t=e.value).length?i({url:t,type:n},function(e){var t,n,i,r=(n=(t=e).status,i=t.message,"valid"===n?{status:"ok",message:i}:"unknown"===n?{status:"warn",message:i}:"invalid"===n?{status:"warn",message:i}:{status:"none",message:""});o.statusMessage(r.message),o.statusLevel(r.status)}):o.statusLevel("none")})},vi=Qt.extend({Statics:{clearHistory:function(){ui={}}},init:function(e){var t,n,i,r=this,o=window.tinymce?window.tinymce.activeEditor:l.activeEditor,s=o.settings,a=e.filetype;e.spellcheck=!1,(i=s.file_picker_types||s.file_browser_callback_types)&&(i=w.makeMap(i,/[, ]/)),i&&!i[a]||(!(n=s.file_picker_callback)||i&&!i[a]?!(n=s.file_browser_callback)||i&&!i[a]||(t=function(){n(r.getEl("inp").id,r.value(),a,window)}):t=function(){var e=r.fire("beforecall").meta;e=w.extend({filetype:a},e),n.call(o,function(e,t){r.value(e).fire("change",{meta:t})},r.value(),e)}),t&&(e.icon="browse",e.onaction=t),r._super(e),r.classes.add("filepicker"),gi(r,s,o.getBody(),a),pi(r,s,a)}}),bi=Xt.extend({recalc:function(e){var t=e.layoutRect(),n=e.paddingBox;e.items().filter(":visible").each(function(e){e.layoutRect({x:n.left,y:n.top,w:t.innerW-n.right-n.left,h:t.innerH-n.top-n.bottom}),e.recalc&&e.recalc()})}}),yi=Xt.extend({recalc:function(e){var t,n,i,r,o,s,a,l,u,c,d,f,h,m,g,p,v,b,y,x,w,_,R,C,E,k,H,S,T,M,N,P,W,D,O,A,B,L=[],z=Math.max,I=Math.min;for(i=e.items().filter(":visible"),r=e.layoutRect(),o=e.paddingBox,s=e.settings,f=e.isRtl()?s.direction||"row-reversed":s.direction,a=s.align,l=e.isRtl()?s.pack||"end":s.pack,u=s.spacing||0,"row-reversed"!==f&&"column-reverse"!==f||(i=i.set(i.toArray().reverse()),f=f.split("-")[0]),"column"===f?(C="y",_="h",R="minH",E="maxH",H="innerH",k="top",S="deltaH",T="contentH",D="left",P="w",M="x",N="innerW",W="minW",O="right",A="deltaW",B="contentW"):(C="x",_="w",R="minW",E="maxW",H="innerW",k="left",S="deltaW",T="contentW",D="top",P="h",M="y",N="innerH",W="minH",O="bottom",A="deltaH",B="contentH"),d=r[H]-o[k]-o[k],w=c=0,t=0,n=i.length;t<n;t++)m=(h=i[t]).layoutRect(),d-=t<n-1?u:0,0<(g=h.settings.flex)&&(c+=g,m[E]&&L.push(h),m.flex=g),d-=m[R],w<(p=o[D]+m[W]+o[O])&&(w=p);if((y={})[R]=d<0?r[R]-d+r[S]:r[H]-d+r[S],y[W]=w+r[A],y[T]=r[H]-d,y[B]=w,y.minW=I(y.minW,r.maxW),y.minH=I(y.minH,r.maxH),y.minW=z(y.minW,r.startMinWidth),y.minH=z(y.minH,r.startMinHeight),!r.autoResize||y.minW===r.minW&&y.minH===r.minH){for(b=d/c,t=0,n=L.length;t<n;t++)(v=(m=(h=L[t]).layoutRect())[E])<(p=m[R]+m.flex*b)?(d-=m[E]-m[R],c-=m.flex,m.flex=0,m.maxFlexSize=v):m.maxFlexSize=0;for(b=d/c,x=o[k],y={},0===c&&("end"===l?x=d+o[k]:"center"===l?(x=Math.round(r[H]/2-(r[H]-d)/2)+o[k])<0&&(x=o[k]):"justify"===l&&(x=o[k],u=Math.floor(d/(i.length-1)))),y[M]=o[D],t=0,n=i.length;t<n;t++)p=(m=(h=i[t]).layoutRect()).maxFlexSize||m[R],"center"===a?y[M]=Math.round(r[N]/2-m[P]/2):"stretch"===a?(y[P]=z(m[W]||0,r[N]-o[D]-o[O]),y[M]=o[D]):"end"===a&&(y[M]=r[N]-m[P]-o.top),0<m.flex&&(p+=m.flex*b),y[_]=p,y[C]=x,h.layoutRect(y),h.recalc&&h.recalc(),x+=p+u}else if(y.w=y.minW,y.h=y.minH,e.layoutRect(y),this.recalc(e),null===e._lastRect){var F=e.parent();F&&(F._lastRect=null,F.recalc())}}}),xi=qt.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(e){e.items().filter(":visible").each(function(e){e.recalc&&e.recalc()})},isNative:function(){return!0}}),wi=function(e,t){return n=t,r=(i=e)===undefined?_.document:i.dom(),qn(r)?N.none():N.from(r.querySelector(n)).map(gn.fromDom);var n,i,r},_i=function(e,t){return function(){e.execCommand("mceToggleFormat",!1,t)}},Ri=function(e,t,n){var i=function(e){n(e,t)};e.formatter?e.formatter.formatChanged(t,i):e.on("init",function(){e.formatter.formatChanged(t,i)})},Ci=function(e,n){return function(t){Ri(e,n,function(e){t.control.active(e)})}},Ei=function(i){var t=["alignleft","aligncenter","alignright","alignjustify"],r="alignleft",e=[{text:"Left",icon:"alignleft",onclick:_i(i,"alignleft")},{text:"Center",icon:"aligncenter",onclick:_i(i,"aligncenter")},{text:"Right",icon:"alignright",onclick:_i(i,"alignright")},{text:"Justify",icon:"alignjustify",onclick:_i(i,"alignjustify")}];i.addMenuItem("align",{text:"Align",menu:e}),i.addButton("align",{type:"menubutton",icon:r,menu:e,onShowMenu:function(e){var n=e.control.menu;w.each(t,function(t,e){n.items().eq(e).each(function(e){return e.active(i.formatter.match(t))})})},onPostRender:function(e){var n=e.control;w.each(t,function(t,e){Ri(i,t,function(e){n.icon(r),e&&n.icon(t)})})}}),w.each({alignleft:["Align left","JustifyLeft"],aligncenter:["Align center","JustifyCenter"],alignright:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"],alignnone:["No alignment","JustifyNone"]},function(e,t){i.addButton(t,{active:!1,tooltip:e[0],cmd:e[1],onPostRender:Ci(i,t)})})},ki=function(e){return e?e.split(",")[0]:""},Hi=function(l,u){return function(){var a=this;a.state.set("value",null),l.on("init nodeChange",function(e){var t,n,i,r,o=l.queryCommandValue("FontName"),s=(t=u,r=(n=o)?n.toLowerCase():"",w.each(t,function(e){e.value.toLowerCase()===r&&(i=e.value)}),w.each(t,function(e){i||ki(e.value).toLowerCase()!==ki(r).toLowerCase()||(i=e.value)}),i);a.value(s||null),!s&&o&&a.text(ki(o))})}},Si=function(n){n.addButton("fontselect",function(){var e,t=(e=function(e){for(var t=(e=e.replace(/;$/,"").split(";")).length;t--;)e[t]=e[t].split("=");return e}(n.settings.font_formats||"Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats"),w.map(e,function(e){return{text:{raw:e[0]},value:e[1],textStyle:-1===e[1].indexOf("dings")?"font-family:"+e[1]:""}}));return{type:"listbox",text:"Font Family",tooltip:"Font Family",values:t,fixedWidth:!0,onPostRender:Hi(n,t),onselect:function(e){e.control.settings.value&&n.execCommand("FontName",!1,e.control.settings.value)}}})},Ti=function(e){Si(e)},Mi=function(e,t){return/[0-9.]+px$/.test(e)?(n=72*parseInt(e,10)/96,i=t||0,r=Math.pow(10,i),Math.round(n*r)/r+"pt"):e;var n,i,r},Ni=function(e,t,n){var i;return w.each(e,function(e){e.value===n?i=n:e.value===t&&(i=t)}),i},Pi=function(n){n.addButton("fontsizeselect",function(){var e,s,a,t=(e=n.settings.fontsize_formats||"8pt 10pt 12pt 14pt 18pt 24pt 36pt",w.map(e.split(" "),function(e){var t=e,n=e,i=e.split("=");return 1<i.length&&(t=i[0],n=i[1]),{text:t,value:n}}));return{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:t,fixedWidth:!0,onPostRender:(s=n,a=t,function(){var o=this;s.on("init nodeChange",function(e){var t,n,i,r;if(t=s.queryCommandValue("FontSize"))for(i=3;!r&&0<=i;i--)n=Mi(t,i),r=Ni(a,n,t);o.value(r||null),r||o.text(n)})}),onclick:function(e){e.control.settings.value&&n.execCommand("FontSize",!1,e.control.settings.value)}}})},Wi=function(e){Pi(e)},Di=function(n,e){var i=e.length;return w.each(e,function(e){e.menu&&(e.hidden=0===Di(n,e.menu));var t=e.format;t&&(e.hidden=!n.formatter.canApply(t)),e.hidden&&i--}),i},Oi=function(n,e){var i=e.items().length;return e.items().each(function(e){e.menu&&e.visible(0<Oi(n,e.menu)),!e.menu&&e.settings.menu&&e.visible(0<Di(n,e.settings.menu));var t=e.settings.format;t&&e.visible(n.formatter.canApply(t)),e.visible()||i--}),i},Ai=function(e){var i,r,o,t,s,n,a,l,u=(r=0,o=[],t=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}],s=function(e){var i=[];if(e)return w.each(e,function(e){var t={text:e.title,icon:e.icon};if(e.items)t.menu=s(e.items);else{var n=e.format||"custom"+r++;e.format||(e.name=n,o.push(e)),t.format=n,t.cmd=e.cmd}i.push(t)}),i},(i=e).on("init",function(){w.each(o,function(e){i.formatter.register(e.name,e)})}),{type:"menu",items:i.settings.style_formats_merge?i.settings.style_formats?s(t.concat(i.settings.style_formats)):s(t):s(i.settings.style_formats||t),onPostRender:function(e){i.fire("renderFormatsMenu",{control:e.control})},itemDefaults:{preview:!0,textStyle:function(){if(this.settings.format)return i.formatter.getCssText(this.settings.format)},onPostRender:function(){var n=this;n.parent().on("show",function(){var e,t;(e=n.settings.format)&&(n.disabled(!i.formatter.canApply(e)),n.active(i.formatter.match(e))),(t=n.settings.cmd)&&n.active(i.queryCommandState(t))})},onclick:function(){this.settings.format&&_i(i,this.settings.format)(),this.settings.cmd&&i.execCommand(this.settings.cmd)}}});n=u,e.addMenuItem("formats",{text:"Formats",menu:n}),l=u,(a=e).addButton("styleselect",{type:"menubutton",text:"Formats",menu:l,onShowMenu:function(){a.settings.style_formats_autohide&&Oi(a,this.menu)}})},Bi=function(n,e){return function(){var r,o,s,t=[];return w.each(e,function(e){t.push({text:e[0],value:e[1],textStyle:function(){return n.formatter.getCssText(e[1])}})}),{type:"listbox",text:e[0][0],values:t,fixedWidth:!0,onselect:function(e){if(e.control){var t=e.control.value();_i(n,t)()}},onPostRender:(r=n,o=t,function(){var t=this;r.on("nodeChange",function(e){var n=r.formatter,i=null;w.each(e.parents,function(t){if(w.each(o,function(e){if(s?n.matchNode(t,s,{value:e.value})&&(i=e.value):n.matchNode(t,e.value)&&(i=e.value),i)return!1}),i)return!1}),t.value(i)})})}}},Li=function(e){var t,n,i=function(e){for(var t=(e=e.replace(/;$/,"").split(";")).length;t--;)e[t]=e[t].split("=");return e}(e.settings.block_formats||"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre");e.addMenuItem("blockformats",{text:"Blocks",menu:(t=e,n=i,w.map(n,function(e){return{text:e[0],onclick:_i(t,e[1]),textStyle:function(){return t.formatter.getCssText(e[1])}}}))}),e.addButton("formatselect",Bi(e,i))},zi=function(t,e){var n,i;if("string"==typeof e)i=e.split(" ");else if(w.isArray(e))return function(e){for(var t=[],n=0,i=e.length;n<i;++n){if(!V(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);X.apply(t,e[n])}return t}(w.map(e,function(e){return zi(t,e)}));return n=w.grep(i,function(e){return"|"===e||e in t.menuItems}),w.map(n,function(e){return"|"===e?{text:"-"}:t.menuItems[e]})},Ii=function(e){return e&&"-"===e.text},Fi=function(n){var i=Z(n,function(e,t){return!Ii(e)||!Ii(n[t-1])});return Z(i,function(e,t){return!Ii(e)||0<t&&t<i.length-1})},Ui=function(e){var t,n,i,r,o=e.settings.insert_button_items;return Fi(o?zi(e,o):(t=e,n="insert",i=[{text:"-"}],r=w.grep(t.menuItems,function(e){return e.context===n}),w.each(r,function(e){"before"===e.separator&&i.push({text:"|"}),e.prependToContext?i.unshift(e):i.push(e),"after"===e.separator&&i.push({text:"|"})}),i))},Vi=function(e){var t;(t=e).addButton("insert",{type:"menubutton",icon:"insert",menu:[],oncreatemenu:function(){this.menu.add(Ui(t)),this.menu.renderNew()}})},Yi=function(e){var n,i,r;n=e,w.each({bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript"},function(e,t){n.addButton(t,{active:!1,tooltip:e,onPostRender:Ci(n,t),onclick:_i(n,t)})}),i=e,w.each({outdent:["Decrease indent","Outdent"],indent:["Increase indent","Indent"],cut:["Cut","Cut"],copy:["Copy","Copy"],paste:["Paste","Paste"],help:["Help","mceHelp"],selectall:["Select all","SelectAll"],visualaid:["Visual aids","mceToggleVisualAid"],newdocument:["New document","mceNewDocument"],removeformat:["Clear formatting","RemoveFormat"],remove:["Remove","Delete"]},function(e,t){i.addButton(t,{tooltip:e[0],cmd:e[1]})}),r=e,w.each({blockquote:["Blockquote","mceBlockQuote"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"]},function(e,t){r.addButton(t,{active:!1,tooltip:e[0],cmd:e[1],onPostRender:Ci(r,t)})})},$i=function(e){var n;Yi(e),n=e,w.each({bold:["Bold","Bold","Meta+B"],italic:["Italic","Italic","Meta+I"],underline:["Underline","Underline","Meta+U"],strikethrough:["Strikethrough","Strikethrough"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],removeformat:["Clear formatting","RemoveFormat"],newdocument:["New document","mceNewDocument"],cut:["Cut","Cut","Meta+X"],copy:["Copy","Copy","Meta+C"],paste:["Paste","Paste","Meta+V"],selectall:["Select all","SelectAll","Meta+A"]},function(e,t){n.addMenuItem(t,{text:e[0],icon:t,shortcut:e[2],cmd:e[1]})}),n.addMenuItem("codeformat",{text:"Code",icon:"code",onclick:_i(n,"code")})},qi=function(n,i){return function(){var e=this,t=function(){var e="redo"===i?"hasRedo":"hasUndo";return!!n.undoManager&&n.undoManager[e]()};e.disabled(!t()),n.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",function(){e.disabled(n.readonly||!t())})}},Xi=function(e){var t,n;(t=e).addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onPostRender:qi(t,"undo"),cmd:"undo"}),t.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onPostRender:qi(t,"redo"),cmd:"redo"}),(n=e).addButton("undo",{tooltip:"Undo",onPostRender:qi(n,"undo"),cmd:"undo"}),n.addButton("redo",{tooltip:"Redo",onPostRender:qi(n,"redo"),cmd:"redo"})},ji=function(e){var t,n;(t=e).addMenuItem("visualaid",{text:"Visual aids",selectable:!0,onPostRender:(n=t,function(){var t=this;n.on("VisualAid",function(e){t.active(e.hasVisual)}),t.active(n.hasVisual)}),cmd:"mceToggleVisualAid"})},Ji={setup:function(e){var t;e.rtl&&(rt.rtl=!0),e.on("mousedown progressstate",function(){Ct.hideAll()}),(t=e).settings.ui_container&&(ce.container=wi(gn.fromDom(_.document.body),t.settings.ui_container).fold(k(null),function(e){return e.dom()})),Nt.tooltips=!ce.iOS,rt.translate=function(e){return l.translate(e)},Li(e),Ei(e),$i(e),Xi(e),Wi(e),Ti(e),Ai(e),ji(e),Vi(e)}},Gi=Xt.extend({recalc:function(e){var t,n,i,r,o,s,a,l,u,c,d,f,h,m,g,p,v,b,y,x,w,_,R,C,E,k,H,S,T=[],M=[];t=e.settings,r=e.items().filter(":visible"),o=e.layoutRect(),i=t.columns||Math.ceil(Math.sqrt(r.length)),n=Math.ceil(r.length/i),b=t.spacingH||t.spacing||0,y=t.spacingV||t.spacing||0,x=t.alignH||t.align,w=t.alignV||t.align,p=e.paddingBox,S="reverseRows"in t?t.reverseRows:e.isRtl(),x&&"string"==typeof x&&(x=[x]),w&&"string"==typeof w&&(w=[w]);for(d=0;d<i;d++)T.push(0);for(f=0;f<n;f++)M.push(0);for(f=0;f<n;f++)for(d=0;d<i&&(c=r[f*i+d]);d++)C=(u=c.layoutRect()).minW,E=u.minH,T[d]=C>T[d]?C:T[d],M[f]=E>M[f]?E:M[f];for(k=o.innerW-p.left-p.right,d=_=0;d<i;d++)_+=T[d]+(0<d?b:0),k-=(0<d?b:0)+T[d];for(H=o.innerH-p.top-p.bottom,f=R=0;f<n;f++)R+=M[f]+(0<f?y:0),H-=(0<f?y:0)+M[f];if(_+=p.left+p.right,R+=p.top+p.bottom,(l={}).minW=_+(o.w-o.innerW),l.minH=R+(o.h-o.innerH),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH,l.minW=Math.min(l.minW,o.maxW),l.minH=Math.min(l.minH,o.maxH),l.minW=Math.max(l.minW,o.startMinWidth),l.minH=Math.max(l.minH,o.startMinHeight),!o.autoResize||l.minW===o.minW&&l.minH===o.minH){var N;o.autoResize&&((l=e.layoutRect(l)).contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH),N="start"===t.packV?0:0<H?Math.floor(H/n):0;var P=0,W=t.flexWidths;if(W)for(d=0;d<W.length;d++)P+=W[d];else P=i;var D=k/P;for(d=0;d<i;d++)T[d]+=W?W[d]*D:D;for(m=p.top,f=0;f<n;f++){for(h=p.left,a=M[f]+N,d=0;d<i&&(c=r[S?f*i+i-1-d:f*i+d]);d++)g=c.settings,u=c.layoutRect(),s=Math.max(T[d],u.startMinWidth),u.x=h,u.y=m,"center"===(v=g.alignH||(x?x[d]||x[0]:null))?u.x=h+s/2-u.w/2:"right"===v?u.x=h+s-u.w:"stretch"===v&&(u.w=s),"center"===(v=g.alignV||(w?w[d]||w[0]:null))?u.y=m+a/2-u.h/2:"bottom"===v?u.y=m+a-u.h:"stretch"===v&&(u.h=a),c.layoutRect(u),h+=s+b,c.recalc&&c.recalc();m+=a+y}}else if(l.w=l.minW,l.h=l.minH,e.layoutRect(l),this.recalc(e),null===e._lastRect){var O=e.parent();O&&(O._lastRect=null,O.recalc())}}}),Ki=Nt.extend({renderHtml:function(){var e=this;return e.classes.add("iframe"),e.canFocus=!1,'<iframe id="'+e._id+'" class="'+e.classes+'" tabindex="-1" src="'+(e.settings.url||"javascript:''")+'" frameborder="0"></iframe>'},src:function(e){this.getEl().src=e},html:function(e,t){var n=this,i=this.getEl().contentWindow.document.body;return i?(i.innerHTML=e,t&&t()):u.setTimeout(function(){n.html(e)}),this}}),Zi=Nt.extend({init:function(e){this._super(e),this.classes.add("widget").add("infobox"),this.canFocus=!1},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},help:function(e){this.state.set("help",e)},renderHtml:function(){var e=this,t=e.classPrefix;return'<div id="'+e._id+'" class="'+e.classes+'"><div id="'+e._id+'-body">'+e.encode(e.state.get("text"))+'<button role="button" tabindex="-1"><i class="'+t+"ico "+t+'i-help"></i></button></div></div>'},bindStates:function(){var t=this;return t.state.on("change:text",function(e){t.getEl("body").firstChild.data=t.encode(e.value),t.state.get("rendered")&&t.updateLayoutRect()}),t.state.on("change:help",function(e){t.classes.toggle("has-help",e.value),t.state.get("rendered")&&t.updateLayoutRect()}),t._super()}}),Qi=Nt.extend({init:function(e){var t=this;t._super(e),t.classes.add("widget").add("label"),t.canFocus=!1,e.multiline&&t.classes.add("autoscroll"),e.strong&&t.classes.add("strong")},initLayoutRect:function(){var e=this,t=e._super();return e.settings.multiline&&(we.getSize(e.getEl()).width>t.maxW&&(t.minW=t.maxW,e.classes.add("multiline")),e.getEl().style.width=t.minW+"px",t.startMinH=t.h=t.minH=Math.min(t.maxH,we.getSize(e.getEl()).height)),t},repaint:function(){return this.settings.multiline||(this.getEl().style.lineHeight=this.layoutRect().h+"px"),this._super()},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},renderHtml:function(){var e,t,n=this,i=n.settings.forId,r=n.settings.html?n.settings.html:n.encode(n.state.get("text"));return!i&&(t=n.settings.forName)&&(e=n.getRoot().find("#"+t)[0])&&(i=e._id),i?'<label id="'+n._id+'" class="'+n.classes+'"'+(i?' for="'+i+'"':"")+">"+r+"</label>":'<span id="'+n._id+'" class="'+n.classes+'">'+r+"</span>"},bindStates:function(){var t=this;return t.state.on("change:text",function(e){t.innerHtml(t.encode(e.value)),t.state.get("rendered")&&t.updateLayoutRect()}),t._super()}}),er=lt.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(e){this._super(e),this.classes.add("toolbar")},postRender:function(){return this.items().each(function(e){e.classes.add("toolbar-item")}),this._super()}}),tr=er.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}}),nr=jt.extend({init:function(e){var t=this;t._renderOpen=!0,t._super(e),e=t.settings,t.classes.add("menubtn"),e.fixedWidth&&t.classes.add("fixed-width"),t.aria("haspopup",!0),t.state.set("menu",e.menu||t.render())},showMenu:function(e){var t,n=this;if(n.menu&&n.menu.visible()&&!1!==e)return n.hideMenu();n.menu||(t=n.state.get("menu")||[],n.classes.add("opened"),t.length?t={type:"menu",animate:!0,items:t}:(t.type=t.type||"menu",t.animate=!0),t.renderTo?n.menu=t.parent(n).show().renderTo():n.menu=v.create(t).parent(n).renderTo(),n.fire("createmenu"),n.menu.reflow(),n.menu.on("cancel",function(e){e.control.parent()===n.menu&&(e.stopPropagation(),n.focus(),n.hideMenu())}),n.menu.on("select",function(){n.focus()}),n.menu.on("show hide",function(e){"hide"===e.type&&e.control.parent()===n&&n.classes.remove("opened-under"),e.control===n.menu&&(n.activeMenu("show"===e.type),n.classes.toggle("opened","show"===e.type)),n.aria("expanded","show"===e.type)}).fire("show")),n.menu.show(),n.menu.layoutRect({w:n.layoutRect().w}),n.menu.repaint(),n.menu.moveRel(n.getEl(),n.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"]);var i=n.menu.layoutRect(),r=n.$el.offset().top+n.layoutRect().h;r>i.y&&r<i.y+i.h&&n.classes.add("opened-under"),n.fire("showmenu")},hideMenu:function(){this.menu&&(this.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),this.menu.hide())},activeMenu:function(e){this.classes.toggle("active",e)},renderHtml:function(){var e,t=this,n=t._id,i=t.classPrefix,r=t.settings.icon,o=t.state.get("text"),s="";return(e=t.settings.image)?(r="none","string"!=typeof e&&(e=_.window.getSelection?e[0]:e[1]),e=" style=\"background-image: url('"+e+"')\""):e="",o&&(t.classes.add("btn-has-text"),s='<span class="'+i+'txt">'+t.encode(o)+"</span>"),r=t.settings.icon?i+"ico "+i+"i-"+r:"",t.aria("role",t.parent()instanceof tr?"menuitem":"button"),'<div id="'+n+'" class="'+t.classes+'" tabindex="-1" aria-labelledby="'+n+'"><button id="'+n+'-open" role="presentation" type="button" tabindex="-1">'+(r?'<i class="'+r+'"'+e+"></i>":"")+s+' <i class="'+i+'caret"></i></button></div>'},postRender:function(){var r=this;return r.on("click",function(e){e.control===r&&function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1}(e.target,r.getEl())&&(r.focus(),r.showMenu(!e.aria),e.aria&&r.menu.items().filter(":visible")[0].focus())}),r.on("mouseenter",function(e){var t,n=e.control,i=r.parent();n&&i&&n instanceof nr&&n.parent()===i&&(i.items().filter("MenuButton").each(function(e){e.hideMenu&&e!==n&&(e.menu&&e.menu.visible()&&(t=!0),e.hideMenu())}),t&&(n.focus(),n.showMenu()))}),r._super()},bindStates:function(){var e=this;return e.state.on("change:menu",function(){e.menu&&e.menu.remove(),e.menu=null}),e._super()},remove:function(){this._super(),this.menu&&this.menu.remove()}}),ir=Ct.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(e){if(e.autohide=!0,e.constrainToViewport=!0,"function"==typeof e.items&&(e.itemsFactory=e.items,e.items=[]),e.itemDefaults)for(var t=e.items,n=t.length;n--;)t[n]=w.extend({},e.itemDefaults,t[n]);this._super(e),this.classes.add("menu"),e.animate&&11!==ce.ie&&this.classes.add("animate")},repaint:function(){return this.classes.toggle("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){this.hideAll(),this.fire("select")},load:function(){var t,n=this;function i(){n.throbber&&(n.throbber.hide(),n.throbber=null)}n.settings.itemsFactory&&(n.throbber||(n.throbber=new Ht(n.getEl("body"),!0),0===n.items().length?(n.throbber.show(),n.fire("loading")):n.throbber.show(100,function(){n.items().remove(),n.fire("loading")}),n.on("hide close",i)),n.requestTime=t=(new Date).getTime(),n.settings.itemsFactory(function(e){0!==e.length?n.requestTime===t&&(n.getEl().style.width="",n.getEl("body").style.width="",i(),n.items().remove(),n.getEl("body").innerHTML="",n.add(e),n.renderNew(),n.fire("loaded")):n.hide()}))},hideAll:function(){return this.find("menuitem").exec("hideMenu"),this._super()},preRender:function(){var n=this;return n.items().each(function(e){var t=e.settings;if(t.icon||t.image||t.selectable)return!(n._hasIcons=!0)}),n.settings.itemsFactory&&n.on("postrender",function(){n.settings.itemsFactory&&n.load()}),n.on("show hide",function(e){e.control===n&&("show"===e.type?u.setTimeout(function(){n.classes.add("in")},0):n.classes.remove("in"))}),n._super()}}),rr=nr.extend({init:function(i){var t,r,o,n,s=this;s._super(i),i=s.settings,s._values=t=i.values,t&&("undefined"!=typeof i.value&&function e(t){for(var n=0;n<t.length;n++){if(r=t[n].selected||i.value===t[n].value)return o=o||t[n].text,s.state.set("value",t[n].value),!0;if(t[n].menu&&e(t[n].menu))return!0}}(t),!r&&0<t.length&&(o=t[0].text,s.state.set("value",t[0].value)),s.state.set("menu",t)),s.state.set("text",i.text||o),s.classes.add("listbox"),s.on("select",function(e){var t=e.control;n&&(e.lastControl=n),i.multiple?t.active(!t.active()):s.value(e.control.value()),n=t})},value:function(n){return 0===arguments.length?this.state.get("value"):(void 0===n||(this.settings.values&&!function t(e){return J(e,function(e){return e.menu?t(e.menu):e.value===n})}(this.settings.values)?null===n&&this.state.set("value",null):this.state.set("value",n)),this)},bindStates:function(){var i=this;return i.on("show",function(e){var t,n;t=e.control,n=i.value(),t instanceof ir&&t.items().each(function(e){e.hasMenus()||e.active(e.value()===n)})}),i.state.on("change:value",function(t){var n=function e(t,n){var i;if(t)for(var r=0;r<t.length;r++){if(t[r].value===n)return t[r];if(t[r].menu&&(i=e(t[r].menu,n)))return i}}(i.state.get("menu"),t.value);n?i.text(n.text):i.text(i.settings.text)}),i._super()}}),or=Nt.extend({Defaults:{border:0,role:"menuitem"},init:function(e){var t,n=this;n._super(e),e=n.settings,n.classes.add("menu-item"),e.menu&&n.classes.add("menu-item-expand"),e.preview&&n.classes.add("menu-item-preview"),"-"!==(t=n.state.get("text"))&&"|"!==t||(n.classes.add("menu-item-sep"),n.aria("role","separator"),n.state.set("text","-")),e.selectable&&(n.aria("role","menuitemcheckbox"),n.classes.add("menu-item-checkbox"),e.icon="selected"),e.preview||e.selectable||n.classes.add("menu-item-normal"),n.on("mousedown",function(e){e.preventDefault()}),e.menu&&!e.ariaHideMenu&&n.aria("haspopup",!0)},hasMenus:function(){return!!this.settings.menu},showMenu:function(){var t,n=this,e=n.settings,i=n.parent();if(i.items().each(function(e){e!==n&&e.hideMenu()}),e.menu){(t=n.menu)?t.show():((t=e.menu).length?t={type:"menu",items:t}:t.type=t.type||"menu",i.settings.itemDefaults&&(t.itemDefaults=i.settings.itemDefaults),(t=n.menu=v.create(t).parent(n).renderTo()).reflow(),t.on("cancel",function(e){e.stopPropagation(),n.focus(),t.hide()}),t.on("show hide",function(e){e.control.items&&e.control.items().each(function(e){e.active(e.settings.selected)})}).fire("show"),t.on("hide",function(e){e.control===t&&n.classes.remove("selected")}),t.submenu=!0),t._parentMenu=i,t.classes.add("menu-sub");var r=t.testMoveRel(n.getEl(),n.isRtl()?["tl-tr","bl-br","tr-tl","br-bl"]:["tr-tl","br-bl","tl-tr","bl-br"]);t.moveRel(n.getEl(),r),r="menu-sub-"+(t.rel=r),t.classes.remove(t._lastRel).add(r),t._lastRel=r,n.classes.add("selected"),n.aria("expanded",!0)}},hideMenu:function(){var e=this;return e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide(),e.aria("expanded",!1)),e},renderHtml:function(){var e,t=this,n=t._id,i=t.settings,r=t.classPrefix,o=t.state.get("text"),s=t.settings.icon,a="",l=i.shortcut,u=t.encode(i.url);function c(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function d(e){var t=i.match||"";return t?e.replace(new RegExp(c(t),"gi"),function(e){return"!mce~match["+e+"]mce~match!"}):e}function f(e){return e.replace(new RegExp(c("!mce~match["),"g"),"<b>").replace(new RegExp(c("]mce~match!"),"g"),"</b>")}return s&&t.parent().classes.add("menu-has-icons"),i.image&&(a=" style=\"background-image: url('"+i.image+"')\""),l&&(l=function(e){var t,n,i={};for(i=ce.mac?{alt:"&#x2325;",ctrl:"&#x2318;",shift:"&#x21E7;",meta:"&#x2318;"}:{meta:"Ctrl"},e=e.split("+"),t=0;t<e.length;t++)(n=i[e[t].toLowerCase()])&&(e[t]=n);return e.join("+")}(l)),s=r+"ico "+r+"i-"+(t.settings.icon||"none"),e="-"!==o?'<i class="'+s+'"'+a+"></i>\xa0":"",o=f(t.encode(d(o))),u=f(t.encode(d(u))),'<div id="'+n+'" class="'+t.classes+'" tabindex="-1">'+e+("-"!==o?'<span id="'+n+'-text" class="'+r+'text">'+o+"</span>":"")+(l?'<div id="'+n+'-shortcut" class="'+r+'menu-shortcut">'+l+"</div>":"")+(i.menu?'<div class="'+r+'caret"></div>':"")+(u?'<div class="'+r+'menu-item-link">'+u+"</div>":"")+"</div>"},postRender:function(){var t=this,n=t.settings,e=n.textStyle;if("function"==typeof e&&(e=e.call(this)),e){var i=t.getEl("text");i&&(i.setAttribute("style",e),t._textStyle=e)}return t.on("mouseenter click",function(e){e.control===t&&(n.menu||"click"!==e.type?(t.showMenu(),e.aria&&t.menu.focus(!0)):(t.fire("select"),u.requestAnimationFrame(function(){t.parent().hideAll()})))}),t._super(),t},hover:function(){return this.parent().items().each(function(e){e.classes.remove("selected")}),this.classes.toggle("selected",!0),this},active:function(e){return function(e,t){var n=e._textStyle;if(n){var i=e.getEl("text");i.setAttribute("style",n),t&&(i.style.color="",i.style.backgroundColor="")}}(this,e),void 0!==e&&this.aria("checked",e),this._super(e)},remove:function(){this._super(),this.menu&&this.menu.remove()}}),sr=Kt.extend({Defaults:{classes:"radio",role:"radio"}}),ar=Nt.extend({renderHtml:function(){var e=this,t=e.classPrefix;return e.classes.add("resizehandle"),"both"===e.settings.direction&&e.classes.add("resizehandle-both"),e.canFocus=!1,'<div id="'+e._id+'" class="'+e.classes+'"><i class="'+t+"ico "+t+'i-resize"></i></div>'},postRender:function(){var t=this;t._super(),t.resizeDragHelper=new ct(this._id,{start:function(){t.fire("ResizeStart")},drag:function(e){"both"!==t.settings.direction&&(e.deltaX=0),t.fire("Resize",e)},stop:function(){t.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}});function lr(e){var t="";if(e)for(var n=0;n<e.length;n++)t+='<option value="'+e[n]+'">'+e[n]+"</option>";return t}var ur=Nt.extend({Defaults:{classes:"selectbox",role:"selectbox",options:[]},init:function(e){var n=this;n._super(e),n.settings.size&&(n.size=n.settings.size),n.settings.options&&(n._options=n.settings.options),n.on("keydown",function(e){var t;13===e.keyCode&&(e.preventDefault(),n.parents().reverse().each(function(e){if(e.toJSON)return t=e,!1}),n.fire("submit",{data:t.toJSON()}))})},options:function(e){return arguments.length?(this.state.set("options",e),this):this.state.get("options")},renderHtml:function(){var e,t=this,n="";return e=lr(t._options),t.size&&(n=' size = "'+t.size+'"'),'<select id="'+t._id+'" class="'+t.classes+'"'+n+">"+e+"</select>"},bindStates:function(){var t=this;return t.state.on("change:options",function(e){t.getEl().innerHTML=lr(e.value)}),t._super()}});function cr(e,t,n){return e<t&&(e=t),n<e&&(e=n),e}function dr(e,t,n){e.setAttribute("aria-"+t,n)}function fr(e,t){var n,i,r,o,s;"v"===e.settings.orientation?(r="top",i="height",n="h"):(r="left",i="width",n="w"),s=e.getEl("handle"),o=((e.layoutRect()[n]||100)-we.getSize(s)[i])*((t-e._minValue)/(e._maxValue-e._minValue))+"px",s.style[r]=o,s.style.height=e.layoutRect().h+"px",dr(s,"valuenow",t),dr(s,"valuetext",""+e.settings.previewFilter(t)),dr(s,"valuemin",e._minValue),dr(s,"valuemax",e._maxValue)}var hr=Nt.extend({init:function(e){var t=this;e.previewFilter||(e.previewFilter=function(e){return Math.round(100*e)/100}),t._super(e),t.classes.add("slider"),"v"===e.orientation&&t.classes.add("vertical"),t._minValue=$(e.minValue)?e.minValue:0,t._maxValue=$(e.maxValue)?e.maxValue:100,t._initValue=t.state.get("value")},renderHtml:function(){var e=this._id,t=this.classPrefix;return'<div id="'+e+'" class="'+this.classes+'"><div id="'+e+'-handle" class="'+t+'slider-handle" role="slider" tabindex="-1"></div></div>'},reset:function(){this.value(this._initValue).repaint()},postRender:function(){var e,t,n,i,r,o,s,a,l,u,c,d,f,h,m=this;e=m._minValue,t=m._maxValue,"v"===m.settings.orientation?(n="screenY",i="top",r="height",o="h"):(n="screenX",i="left",r="width",o="w"),m._super(),function(o,s){function t(e){var t,n,i,r;t=cr(t=(((t=m.value())+(r=n=o))/((i=s)-r)+.05*e)*(i-n)-n,o,s),m.value(t),m.fire("dragstart",{value:t}),m.fire("drag",{value:t}),m.fire("dragend",{value:t})}m.on("keydown",function(e){switch(e.keyCode){case 37:case 38:t(-1);break;case 39:case 40:t(1)}})}(e,t),s=e,a=t,l=m.getEl("handle"),m._dragHelper=new ct(m._id,{handle:m._id+"-handle",start:function(e){u=e[n],c=parseInt(m.getEl("handle").style[i],10),d=(m.layoutRect()[o]||100)-we.getSize(l)[r],m.fire("dragstart",{value:h})},drag:function(e){var t=e[n]-u;f=cr(c+t,0,d),l.style[i]=f+"px",h=s+f/d*(a-s),m.value(h),m.tooltip().text(""+m.settings.previewFilter(h)).show().moveRel(l,"bc tc"),m.fire("drag",{value:h})},stop:function(){m.tooltip().hide(),m.fire("dragend",{value:h})}})},repaint:function(){this._super(),fr(this,this.value())},bindStates:function(){var t=this;return t.state.on("change:value",function(e){fr(t,e.value)}),t._super()}}),mr=Nt.extend({renderHtml:function(){return this.classes.add("spacer"),this.canFocus=!1,'<div id="'+this._id+'" class="'+this.classes+'"></div>'}}),gr=nr.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var e,t,n=this.getEl(),i=this.layoutRect();return this._super(),e=n.firstChild,t=n.lastChild,ye(e).css({width:i.w-we.getSize(t).width,height:i.h-2}),ye(t).css({height:i.h-2}),this},activeMenu:function(e){ye(this.getEl().lastChild).toggleClass(this.classPrefix+"active",e)},renderHtml:function(){var e,t,n=this,i=n._id,r=n.classPrefix,o=n.state.get("icon"),s=n.state.get("text"),a=n.settings,l="";return(e=a.image)?(o="none","string"!=typeof e&&(e=_.window.getSelection?e[0]:e[1]),e=" style=\"background-image: url('"+e+"')\""):e="",o=a.icon?r+"ico "+r+"i-"+o:"",s&&(n.classes.add("btn-has-text"),l='<span class="'+r+'txt">'+n.encode(s)+"</span>"),t="boolean"==typeof a.active?' aria-pressed="'+a.active+'"':"",'<div id="'+i+'" class="'+n.classes+'" role="button"'+t+' tabindex="-1"><button type="button" hidefocus="1" tabindex="-1">'+(o?'<i class="'+o+'"'+e+"></i>":"")+l+'</button><button type="button" class="'+r+'open" hidefocus="1" tabindex="-1">'+(n._menuBtnText?(o?"\xa0":"")+n._menuBtnText:"")+' <i class="'+r+'caret"></i></button></div>'},postRender:function(){var n=this.settings.onclick;return this.on("click",function(e){var t=e.target;if(e.control===this)for(;t;){if(e.aria&&"down"!==e.aria.key||"BUTTON"===t.nodeName&&-1===t.className.indexOf("open"))return e.stopImmediatePropagation(),void(n&&n.call(this,e));t=t.parentNode}}),delete this.settings.onclick,this._super()}}),pr=xi.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"},isNative:function(){return!0}}),vr=pt.extend({Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(n){var e;this.activeTabId&&(e=this.getEl(this.activeTabId),ye(e).removeClass(this.classPrefix+"active"),e.setAttribute("aria-selected","false")),this.activeTabId="t"+n,(e=this.getEl("t"+n)).setAttribute("aria-selected","true"),ye(e).addClass(this.classPrefix+"active"),this.items()[n].show().fire("showtab"),this.reflow(),this.items().each(function(e,t){n!==t&&e.hide()})},renderHtml:function(){var i=this,e=i._layout,r="",o=i.classPrefix;return i.preRender(),e.preRender(i),i.items().each(function(e,t){var n=i._id+"-t"+t;e.aria("role","tabpanel"),e.aria("labelledby",n),r+='<div id="'+n+'" class="'+o+'tab" unselectable="on" role="tab" aria-controls="'+e._id+'" aria-selected="false" tabIndex="-1">'+i.encode(e.settings.title)+"</div>"}),'<div id="'+i._id+'" class="'+i.classes+'" hidefocus="1" tabindex="-1"><div id="'+i._id+'-head" class="'+o+'tabs" role="tablist">'+r+'</div><div id="'+i._id+'-body" class="'+i.bodyClasses+'">'+e.renderHtml(i)+"</div></div>"},postRender:function(){var i=this;i._super(),i.settings.activeTab=i.settings.activeTab||0,i.activateTab(i.settings.activeTab),this.on("click",function(e){var t=e.target.parentNode;if(t&&t.id===i._id+"-head")for(var n=t.childNodes.length;n--;)t.childNodes[n]===e.target&&i.activateTab(n)})},initLayoutRect:function(){var e,t,n,i=this;t=(t=we.getSize(i.getEl("head")).width)<0?0:t,n=0,i.items().each(function(e){t=Math.max(t,e.layoutRect().minW),n=Math.max(n,e.layoutRect().minH)}),i.items().each(function(e){e.settings.x=0,e.settings.y=0,e.settings.w=t,e.settings.h=n,e.layoutRect({x:0,y:0,w:t,h:n})});var r=we.getSize(i.getEl("head")).height;return i.settings.minWidth=t,i.settings.minHeight=n+r,(e=i._super()).deltaH+=r,e.innerH=e.h-e.deltaH,e}}),br=Nt.extend({init:function(e){var n=this;n._super(e),n.classes.add("textbox"),e.multiline?n.classes.add("multiline"):(n.on("keydown",function(e){var t;13===e.keyCode&&(e.preventDefault(),n.parents().reverse().each(function(e){if(e.toJSON)return t=e,!1}),n.fire("submit",{data:t.toJSON()}))}),n.on("keyup",function(e){n.state.set("value",e.target.value)}))},repaint:function(){var e,t,n,i,r,o=this,s=0;e=o.getEl().style,t=o._layoutRect,r=o._lastRepaintRect||{};var a=_.document;return!o.settings.multiline&&a.all&&(!a.documentMode||a.documentMode<=8)&&(e.lineHeight=t.h-s+"px"),i=(n=o.borderBox).left+n.right+8,s=n.top+n.bottom+(o.settings.multiline?8:0),t.x!==r.x&&(e.left=t.x+"px",r.x=t.x),t.y!==r.y&&(e.top=t.y+"px",r.y=t.y),t.w!==r.w&&(e.width=t.w-i+"px",r.w=t.w),t.h!==r.h&&(e.height=t.h-s+"px",r.h=t.h),o._lastRepaintRect=r,o.fire("repaint",{},!1),o},renderHtml:function(){var t,e,n=this,i=n.settings;return t={id:n._id,hidefocus:"1"},w.each(["rows","spellcheck","maxLength","size","readonly","min","max","step","list","pattern","placeholder","required","multiple"],function(e){t[e]=i[e]}),n.disabled()&&(t.disabled="disabled"),i.subtype&&(t.type=i.subtype),(e=we.create(i.multiline?"textarea":"input",t)).value=n.state.get("value"),e.className=n.classes.toString(),e.outerHTML},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl().value),this.state.get("value"))},postRender:function(){var t=this;t.getEl().value=t.state.get("value"),t._super(),t.$el.on("change",function(e){t.state.set("value",e.target.value),t.fire("change",e)})},bindStates:function(){var t=this;return t.state.on("change:value",function(e){t.getEl().value!==e.value&&(t.getEl().value=e.value)}),t.state.on("change:disabled",function(e){t.getEl().disabled=e.value}),t._super()},remove:function(){this.$el.off(),this._super()}}),yr=function(){return{Selector:Ie,Collection:Ve,ReflowQueue:Ke,Control:rt,Factory:v,KeyboardNavigation:st,Container:lt,DragHelper:ct,Scrollable:gt,Panel:pt,Movable:He,Resizable:vt,FloatPanel:Ct,Window:It,MessageBox:Yt,Tooltip:Mt,Widget:Nt,Progress:Pt,Notification:Dt,Layout:qt,AbsoluteLayout:Xt,Button:jt,ButtonGroup:Gt,Checkbox:Kt,ComboBox:Qt,ColorBox:en,PanelButton:tn,ColorButton:rn,ColorPicker:sn,Path:ln,ElementPath:un,FormItem:cn,Form:dn,FieldSet:fn,FilePicker:vi,FitLayout:bi,FlexLayout:yi,FlowLayout:xi,FormatControls:Ji,GridLayout:Gi,Iframe:Ki,InfoBox:Zi,Label:Qi,Toolbar:er,MenuBar:tr,MenuButton:nr,MenuItem:or,Throbber:Ht,Menu:ir,ListBox:rr,Radio:sr,ResizeHandle:ar,SelectBox:ur,Slider:hr,Spacer:mr,SplitButton:gr,StackLayout:pr,TabPanel:vr,TextBox:br,DropZone:an,BrowseButton:Jt}},xr=function(n){n.ui?w.each(yr(),function(e,t){n.ui[t]=e}):n.ui=yr()};w.each(yr(),function(e,t){v.add(t,e)}),xr(window.tinymce?window.tinymce:{}),r.add("modern",function(e){return Ji.setup(e),$t(e)})}(window);
// Source: wp-includes/js/tinymce/plugins/charmap/plugin.min.js
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(e,t){return e.fire("insertCustomChar",{chr:t})},l=function(e,t){var a=i(e,t).chr;e.execCommand("mceInsertContent",!1,a)},a=tinymce.util.Tools.resolve("tinymce.util.Tools"),r=function(e){return e.settings.charmap},n=function(e){return e.settings.charmap_append},o=a.isArray,c=function(e){return o(e)?[].concat((t=e,a.grep(t,function(e){return o(e)&&2===e.length}))):"function"==typeof e?e():[];var t},s=function(e){return function(e,t){var a=r(e);a&&(t=c(a));var i=n(e);return i?[].concat(t).concat(c(i)):t}(e,[["160","no-break space"],["173","soft hyphen"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["256","A - macron"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["274","E - macron"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["298","I - macron"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["332","O - macron"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["362","U - macron"],["221","Y - acute"],["376","Y - diaeresis"],["562","Y - macron"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["257","a - macron"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["275","e - macron"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["299","i - macron"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["333","o macron"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["363","u - macron"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["563","y - macron"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"]])},t=function(t){return{getCharMap:function(){return s(t)},insertChar:function(e){l(t,e)}}},u=function(e){var t,a,i,r=Math.min(e.length,25),n=Math.ceil(e.length/r);for(t='<table role="presentation" cellspacing="0" class="mce-charmap"><tbody>',i=0;i<n;i++){for(t+="<tr>",a=0;a<r;a++){var o=i*r+a;if(o<e.length){var l=e[o],c=parseInt(l[0],10),s=l?String.fromCharCode(c):"&nbsp;";t+='<td title="'+l[1]+'"><div tabindex="-1" title="'+l[1]+'" role="button" data-chr="'+c+'">'+s+"</div></td>"}else t+="<td />"}t+="</tr>"}return t+="</tbody></table>"},d=function(e){for(;e;){if("TD"===e.nodeName)return e;e=e.parentNode}},m=function(n){var o,e={type:"container",html:u(s(n)),onclick:function(e){var t=e.target;if(/^(TD|DIV)$/.test(t.nodeName)){var a=d(t).firstChild;if(a&&a.hasAttribute("data-chr")){var i=a.getAttribute("data-chr"),r=parseInt(i,10);isNaN(r)||l(n,String.fromCharCode(r)),e.ctrlKey||o.close()}}},onmouseover:function(e){var t=d(e.target);t&&t.firstChild?(o.find("#preview").text(t.firstChild.firstChild.data),o.find("#previewTitle").text(t.title)):(o.find("#preview").text(" "),o.find("#previewTitle").text(" "))}};o=n.windowManager.open({title:"Special character",spacing:10,padding:10,items:[e,{type:"container",layout:"flex",direction:"column",align:"center",spacing:5,minWidth:160,minHeight:160,items:[{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:140,minHeight:80},{type:"spacer",minHeight:20},{type:"label",name:"previewTitle",text:" ",style:"white-space: pre-wrap;",border:1,minWidth:140}]}],buttons:[{text:"Close",onclick:function(){o.close()}}]})},g=function(e){e.addCommand("mceShowCharmap",function(){m(e)})},p=function(e){e.addButton("charmap",{icon:"charmap",tooltip:"Special character",cmd:"mceShowCharmap"}),e.addMenuItem("charmap",{icon:"charmap",text:"Special character",cmd:"mceShowCharmap",context:"insert"})};e.add("charmap",function(e){return g(e),p(e),t(e)})}();
// Source: wp-includes/js/tinymce/plugins/colorpicker/plugin.min.js
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.util.Color"),a=function(e,n){e.find("#preview")[0].getEl().style.background=n},o=function(e,n){var i=l(n),t=i.toRgb();e.fromJSON({r:t.r,g:t.g,b:t.b,hex:i.toHex().substr(1)}),a(e,i.toHex())},t=function(e,n,i){var t=e.windowManager.open({title:"Color",items:{type:"container",layout:"flex",direction:"row",align:"stretch",padding:5,spacing:10,items:[{type:"colorpicker",value:i,onchange:function(){var e=this.rgb();t&&(t.find("#r").value(e.r),t.find("#g").value(e.g),t.find("#b").value(e.b),t.find("#hex").value(this.value().substr(1)),a(t,this.value()))}},{type:"form",padding:0,labelGap:5,defaults:{type:"textbox",size:7,value:"0",flex:1,spellcheck:!1,onchange:function(){var e,n,i=t.find("colorpicker")[0];if(e=this.name(),n=this.value(),"hex"===e)return o(t,n="#"+n),void i.value(n);n={r:t.find("#r").value(),g:t.find("#g").value(),b:t.find("#b").value()},i.value(n),o(t,n)}},items:[{name:"r",label:"R",autofocus:1},{name:"g",label:"G"},{name:"b",label:"B"},{name:"hex",label:"#",value:"000000"},{name:"preview",type:"container",border:1}]}]},onSubmit:function(){n("#"+t.toJSON().hex)}});o(t,i)};e.add("colorpicker",function(i){i.settings.color_picker_callback||(i.settings.color_picker_callback=function(e,n){t(i,e,n)})})}();
// Source: wp-includes/js/tinymce/plugins/compat3x/plugin.min.js
!function(u){var t;function l(){}function f(e){!t&&window&&window.console&&(t=!0,console.log("Deprecated TinyMCE API call: "+e))}function i(i,a,d,s){i=i||this;var c=[];a?(this.add=function(o,r,e){function t(e){var t=[];if("string"==typeof d&&(d=d.split(" ")),d&&"function"!=typeof d)for(var n=0;n<d.length;n++)t.push(e[d[n]]);("function"!=typeof d||(t=d(a,e,i)))&&(d||(t=[e]),t.unshift(s||i),!1===o.apply(r||s||i,t)&&e.stopImmediatePropagation())}f("<target>.on"+a+".add(..)"),i.on(a,t,e);var n={original:o,patched:t};return c.push(n),t},this.addToTop=function(e,t){this.add(e,t,!0)},this.remove=function(n){return c.forEach(function(e,t){if(e.original===n)return c.splice(t,1),i.off(a,e.patched)}),i.off(a,n)},this.dispatch=function(){return i.fire(a),!0}):this.add=this.addToTop=this.remove=this.dispatch=l}function n(s){function e(e,t){u.each(e.split(" "),function(e){s["on"+e]=new i(s,e,t)})}function n(e,t,n){return[t.level,n]}function o(n){return function(e,t){if(!t.selection&&!n||t.selection==n)return[t]}}if(!s.controlManager){s.controlManager={buttons:{},setDisabled:function(e,t){f("controlManager.setDisabled(..)"),this.buttons[e]&&this.buttons[e].disabled(t)},setActive:function(e,t){f("controlManager.setActive(..)"),this.buttons[e]&&this.buttons[e].active(t)},onAdd:new i,onPostRender:new i,add:function(e){return e},createButton:r,createColorSplitButton:r,createControl:r,createDropMenu:r,createListBox:r,createMenuButton:r,createSeparator:r,createSplitButton:r,createToolbar:r,createToolbarGroup:r,destroy:l,get:l,setControlType:r},e("PreInit BeforeRenderUI PostRender Load Init Remove Activate Deactivate","editor"),e("Click MouseUp MouseDown DblClick KeyDown KeyUp KeyPress ContextMenu Paste Submit Reset"),e("BeforeExecCommand ExecCommand","command ui value args"),e("PreProcess PostProcess LoadContent SaveContent Change"),e("BeforeSetContent BeforeGetContent SetContent GetContent",o(!1)),e("SetProgressState","state time"),e("VisualAid","element hasVisual"),e("Undo Redo",n),e("NodeChange",function(e,t){return[s.controlManager,t.element,s.selection.isCollapsed(),t]});var c=s.addButton;s.addButton=function(e,t){var n,o,r,i;function a(){if(s.controlManager.buttons[e]=this,n)return n.apply(this,arguments)}for(var d in t)"onpostrender"===d.toLowerCase()&&(n=t[d],t.onPostRender=a);return n||(t.onPostRender=a),t.title&&(t.title=(o=t.title,r=[s.settings.language||"en",o].join("."),i=u.i18n.translate(r),r!==i?i:u.i18n.translate(o))),c.call(this,e,t)},s.on("init",function(){var e=s.undoManager,t=s.selection;e.onUndo=new i(s,"Undo",n,null,e),e.onRedo=new i(s,"Redo",n,null,e),e.onBeforeAdd=new i(s,"BeforeAddUndo",null,e),e.onAdd=new i(s,"AddUndo",null,e),t.onBeforeGetContent=new i(s,"BeforeGetContent",o(!0),t),t.onGetContent=new i(s,"GetContent",o(!0),t),t.onBeforeSetContent=new i(s,"BeforeSetContent",o(!0),t),t.onSetContent=new i(s,"SetContent",o(!0),t)}),s.on("BeforeRenderUI",function(){var e=s.windowManager;e.onOpen=new i,e.onClose=new i,e.createInstance=function(e,t,n,o,r,i){return f("windowManager.createInstance(..)"),new(u.resolve(e))(t,n,o,r,i)}})}function r(){var t={};function n(){return r()}return f("editor.controlManager.*"),u.each("add addMenu addSeparator collapse createMenu destroy displayColor expand focus getLength hasMenus hideMenu isActive isCollapsed isDisabled isRendered isSelected mark postRender remove removeAll renderHTML renderMenu renderNode renderTo select selectByIndex setActive setAriaProperty setColor setDisabled setSelected setState showMenu update".split(" "),function(e){t[e]=n}),t}}u.util.Dispatcher=i,u.onBeforeUnload=new i(u,"BeforeUnload"),u.onAddEditor=new i(u,"AddEditor","editor"),u.onRemoveEditor=new i(u,"RemoveEditor","editor"),u.util.Cookie={get:l,getHash:l,remove:l,set:l,setHash:l},u.on("SetupEditor",function(e){n(e.editor)}),u.PluginManager.add("compat3x",n),u.addI18n=function(n,e){var r=u.util.I18n,t=u.each;"string"!=typeof n||-1!==n.indexOf(".")?u.is(n,"string")?t(e,function(e,t){r.data[n+"."+t]=e}):t(n,function(e,o){t(e,function(e,n){t(e,function(e,t){"common"===n?r.data[o+"."+t]=e:r.data[o+"."+n+"."+t]=e})})}):r.add(n,e)}}(tinymce);
// Source: wp-includes/js/tinymce/plugins/directionality/plugin.min.js
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),e=function(t,e){var i,n=t.dom,o=t.selection.getSelectedBlocks();o.length&&(i=n.getAttrib(o[0],"dir"),c.each(o,function(t){n.getParent(t.parentNode,'*[dir="'+e+'"]',n.getRoot())||n.setAttrib(t,"dir",i!==e?e:null)}),t.nodeChanged())},i=function(t){t.addCommand("mceDirectionLTR",function(){e(t,"ltr")}),t.addCommand("mceDirectionRTL",function(){e(t,"rtl")})},n=function(e){var i=[];return c.each("h1 h2 h3 h4 h5 h6 div p".split(" "),function(t){i.push(t+"[dir="+e+"]")}),i.join(",")},o=function(t){t.addButton("ltr",{title:"Left to right",cmd:"mceDirectionLTR",stateSelector:n("ltr")}),t.addButton("rtl",{title:"Right to left",cmd:"mceDirectionRTL",stateSelector:n("rtl")})};t.add("directionality",function(t){i(t),o(t)})}();
// Source: wp-includes/js/tinymce/plugins/fullscreen/plugin.min.js
!function(m){"use strict";var i=function(e){var n=e,t=function(){return n};return{get:t,set:function(e){n=e},clone:function(){return i(t())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e){return{isFullscreen:function(){return null!==e.get()}}},n=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),g=function(e,n){e.fire("FullscreenStateChanged",{state:n})},w=n.DOM,r=function(e,n){var t,r,l,i,o,c,s=m.document.body,u=m.document.documentElement,d=n.get(),a=function(){var e,n,t,i;w.setStyle(l,"height",(t=m.window,i=m.document.body,i.offsetWidth&&(e=i.offsetWidth,n=i.offsetHeight),t.innerWidth&&t.innerHeight&&(e=t.innerWidth,n=t.innerHeight),{w:e,h:n}).h-(r.clientHeight-l.clientHeight))},h=function(){w.unbind(m.window,"resize",a)};if(t=(r=e.getContainer()).style,i=(l=e.getContentAreaContainer().firstChild).style,d)i.width=d.iframeWidth,i.height=d.iframeHeight,d.containerWidth&&(t.width=d.containerWidth),d.containerHeight&&(t.height=d.containerHeight),w.removeClass(s,"mce-fullscreen"),w.removeClass(u,"mce-fullscreen"),w.removeClass(r,"mce-fullscreen"),o=d.scrollPos,m.window.scrollTo(o.x,o.y),w.unbind(m.window,"resize",d.resizeHandler),e.off("remove",d.removeHandler),n.set(null),g(e,!1);else{var f={scrollPos:(c=w.getViewPort(),{x:c.x,y:c.y}),containerWidth:t.width,containerHeight:t.height,iframeWidth:i.width,iframeHeight:i.height,resizeHandler:a,removeHandler:h};i.width=i.height="100%",t.width=t.height="",w.addClass(s,"mce-fullscreen"),w.addClass(u,"mce-fullscreen"),w.addClass(r,"mce-fullscreen"),w.bind(m.window,"resize",a),e.on("remove",h),a(),n.set(f),g(e,!0)}},l=function(e,n){e.addCommand("mceFullScreen",function(){r(e,n)})},o=function(t){return function(e){var n=e.control;t.on("FullscreenStateChanged",function(e){n.active(e.state)})}},c=function(e){e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,cmd:"mceFullScreen",onPostRender:o(e),context:"view"}),e.addButton("fullscreen",{active:!1,tooltip:"Fullscreen",cmd:"mceFullScreen",onPostRender:o(e)})};e.add("fullscreen",function(e){var n=i(null);return e.settings.inline||(l(e,n),c(e),e.addShortcut("Ctrl+Shift+F","","mceFullScreen")),t(n)})}(window);
// Source: wp-includes/js/tinymce/plugins/hr/plugin.min.js
!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(n){n.addCommand("InsertHorizontalRule",function(){n.execCommand("mceInsertContent",!1,"<hr />")})},o=function(n){n.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),n.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})};n.add("hr",function(n){t(n),o(n)})}();
// Source: wp-includes/js/tinymce/plugins/image/plugin.min.js
!function(l){"use strict";var i,e=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=function(e){return!1!==e.settings.image_dimensions},u=function(e){return!0===e.settings.image_advtab},m=function(e){return e.getParam("image_prepend_url","")},n=function(e){return e.getParam("image_class_list")},r=function(e){return!1!==e.settings.image_description},a=function(e){return!0===e.settings.image_title},o=function(e){return!0===e.settings.image_caption},c=function(e){return e.getParam("image_list",!1)},s=function(e){return e.getParam("images_upload_url",!1)},g=function(e){return e.getParam("images_upload_handler",!1)},f=function(e){return e.getParam("images_upload_url")},p=function(e){return e.getParam("images_upload_handler")},h=function(e){return e.getParam("images_upload_base_path")},v=function(e){return e.getParam("images_upload_credentials")},b="undefined"!=typeof l.window?l.window:Function("return this;")(),y=function(e,t){return function(e,t){for(var n=t!==undefined&&null!==t?t:b,r=0;r<e.length&&n!==undefined&&null!==n;++r)n=n[e[r]];return n}(e.split("."),t)},x={getOrDie:function(e,t){var n=y(e,t);if(n===undefined||null===n)throw new Error(e+" not available on this browser");return n}},w=tinymce.util.Tools.resolve("tinymce.util.Promise"),C=tinymce.util.Tools.resolve("tinymce.util.Tools"),S=tinymce.util.Tools.resolve("tinymce.util.XHR"),N=function(e,t){return Math.max(parseInt(e,10),parseInt(t,10))},_=function(e,n){var r=l.document.createElement("img");function t(e,t){r.parentNode&&r.parentNode.removeChild(r),n({width:e,height:t})}r.onload=function(){t(N(r.width,r.clientWidth),N(r.height,r.clientHeight))},r.onerror=function(){t(0,0)};var a=r.style;a.visibility="hidden",a.position="fixed",a.bottom=a.left="0px",a.width=a.height="auto",l.document.body.appendChild(r),r.src=e},T=function(e,a,t){return function n(e,r){return r=r||[],C.each(e,function(e){var t={text:e.text||e.title};e.menu?t.menu=n(e.menu):(t.value=e.value,a(t)),r.push(t)}),r}(e,t||[])},A=function(e){return e&&(e=e.replace(/px$/,"")),e},R=function(e){return 0<e.length&&/^[0-9]+$/.test(e)&&(e+="px"),e},I=function(e){if(e.margin){var t=e.margin.split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e},t=function(e,t){var n=c(e);"string"==typeof n?S.send({url:n,success:function(e){t(JSON.parse(e))}}):"function"==typeof n?n(t):t(n)},O=function(e,t,n){function r(){n.onload=n.onerror=null,e.selection&&(e.selection.select(n),e.nodeChanged())}n.onload=function(){t.width||t.height||!d(e)||e.dom.setAttribs(n,{width:n.clientWidth,height:n.clientHeight}),r()},n.onerror=r},L=function(r){return new w(function(e,t){var n=new(x.getOrDie("FileReader"));n.onload=function(){e(n.result)},n.onerror=function(){t(n.error.message)},n.readAsDataURL(r)})},P=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),U=Object.prototype.hasOwnProperty,E=(i=function(e,t){return t},function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var a=e[r];for(var o in a)U.call(a,o)&&(n[o]=i(n[o],a[o]))}return n}),k=P.DOM,M=function(e){return e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?A(e.style.marginLeft):""},D=function(e){return e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?A(e.style.marginTop):""},z=function(e){return e.style.borderWidth?A(e.style.borderWidth):""},B=function(e,t){return e.hasAttribute(t)?e.getAttribute(t):""},H=function(e,t){return e.style[t]?e.style[t]:""},j=function(e){return null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName},F=function(e,t,n){e.setAttribute(t,n)},W=function(e){var t,n,r,a;j(e)?(a=(r=e).parentNode,k.insertAfter(r,a),k.remove(a)):(t=e,n=k.create("figure",{"class":"image"}),k.insertAfter(n,t),n.appendChild(t),n.appendChild(k.create("figcaption",{contentEditable:!0},"Caption")),n.contentEditable="false")},J=function(e,t){var n=e.getAttribute("style"),r=t(null!==n?n:"");0<r.length?(e.setAttribute("style",r),e.setAttribute("data-mce-style",r)):e.removeAttribute("style")},V=function(e,r){return function(e,t,n){e.style[t]?(e.style[t]=R(n),J(e,r)):F(e,t,n)}},G=function(e,t){return e.style[t]?A(e.style[t]):B(e,t)},$=function(e,t){var n=R(t);e.style.marginLeft=n,e.style.marginRight=n},X=function(e,t){var n=R(t);e.style.marginTop=n,e.style.marginBottom=n},q=function(e,t){var n=R(t);e.style.borderWidth=n},K=function(e,t){e.style.borderStyle=t},Q=function(e){return"FIGURE"===e.nodeName},Y=function(e,t){var n=l.document.createElement("img");return F(n,"style",t.style),(M(n)||""!==t.hspace)&&$(n,t.hspace),(D(n)||""!==t.vspace)&&X(n,t.vspace),(z(n)||""!==t.border)&&q(n,t.border),(H(n,"borderStyle")||""!==t.borderStyle)&&K(n,t.borderStyle),e(n.getAttribute("style"))},Z=function(e,t){return{src:B(t,"src"),alt:B(t,"alt"),title:B(t,"title"),width:G(t,"width"),height:G(t,"height"),"class":B(t,"class"),style:e(B(t,"style")),caption:j(t),hspace:M(t),vspace:D(t),border:z(t),borderStyle:H(t,"borderStyle")}},ee=function(e,t,n,r,a){n[r]!==t[r]&&a(e,r,n[r])},te=function(r,a){return function(e,t,n){r(e,n),J(e,a)}},ne=function(e,t,n){var r=Z(e,n);ee(n,r,t,"caption",function(e,t,n){return W(e)}),ee(n,r,t,"src",F),ee(n,r,t,"alt",F),ee(n,r,t,"title",F),ee(n,r,t,"width",V(0,e)),ee(n,r,t,"height",V(0,e)),ee(n,r,t,"class",F),ee(n,r,t,"style",te(function(e,t){return F(e,"style",t)},e)),ee(n,r,t,"hspace",te($,e)),ee(n,r,t,"vspace",te(X,e)),ee(n,r,t,"border",te(q,e)),ee(n,r,t,"borderStyle",te(K,e))},re=function(e,t){var n=e.dom.styles.parse(t),r=I(n),a=e.dom.styles.parse(e.dom.styles.serialize(r));return e.dom.styles.serialize(a)},ae=function(e){var t=e.selection.getNode(),n=e.dom.getParent(t,"figure.image");return n?e.dom.select("img",n)[0]:t&&("IMG"!==t.nodeName||t.getAttribute("data-mce-object")||t.getAttribute("data-mce-placeholder"))?null:t},oe=function(t,e){var n=t.dom,r=n.getParent(e.parentNode,function(e){return t.schema.getTextBlockElements()[e.nodeName]},t.getBody());return r?n.split(r,e):e},ie=function(t){var e=ae(t);return e?Z(function(e){return re(t,e)},e):{src:"",alt:"",title:"",width:"",height:"","class":"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:""}},le=function(t,e){var n=function(e,t){var n=l.document.createElement("img");if(ne(e,E(t,{caption:!1}),n),F(n,"alt",t.alt),t.caption){var r=k.create("figure",{"class":"image"});return r.appendChild(n),r.appendChild(k.create("figcaption",{contentEditable:!0},"Caption")),r.contentEditable="false",r}return n}(function(e){return re(t,e)},e);t.dom.setAttrib(n,"data-mce-id","__mcenew"),t.focus(),t.selection.setContent(n.outerHTML);var r=t.dom.select('*[data-mce-id="__mcenew"]')[0];if(t.dom.setAttrib(r,"data-mce-id",null),Q(r)){var a=oe(t,r);t.selection.select(a)}else t.selection.select(r)},ue=function(e,t){var n=ae(e);n?t.src?function(t,e){var n,r=ae(t);if(ne(function(e){return re(t,e)},e,r),n=r,t.dom.setAttrib(n,"src",n.getAttribute("src")),Q(r.parentNode)){var a=r.parentNode;oe(t,a),t.selection.select(r.parentNode)}else t.selection.select(r),O(t,e,r)}(e,t):function(e,t){if(t){var n=e.dom.is(t.parentNode,"figure.image")?t.parentNode:t;e.dom.remove(n),e.focus(),e.nodeChanged(),e.dom.isEmpty(e.getBody())&&(e.setContent(""),e.selection.setCursorLocation())}}(e,n):t.src&&le(e,t)},ce=function(n,r){r.find("#style").each(function(e){var t=Y(function(e){return re(n,e)},E({src:"",alt:"",title:"",width:"",height:"","class":"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:""},r.toJSON()));e.value(t)})},se=function(t){return{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox",onchange:(o=t,function(e){var t=o.dom,n=e.control.rootControl;if(u(o)){var r=n.toJSON(),a=t.parseStyle(r.style);n.find("#vspace").value(""),n.find("#hspace").value(""),((a=I(a))["margin-top"]&&a["margin-bottom"]||a["margin-right"]&&a["margin-left"])&&(a["margin-top"]===a["margin-bottom"]?n.find("#vspace").value(A(a["margin-top"])):n.find("#vspace").value(""),a["margin-right"]===a["margin-left"]?n.find("#hspace").value(A(a["margin-right"])):n.find("#hspace").value("")),a["border-width"]?n.find("#border").value(A(a["border-width"])):n.find("#border").value(""),a["border-style"]?n.find("#borderStyle").value(a["border-style"]):n.find("#borderStyle").value(""),n.find("#style").value(t.serializeStyle(t.parseStyle(t.serializeStyle(a))))}})},{type:"form",layout:"grid",packV:"start",columns:2,padding:0,defaults:{type:"textbox",maxWidth:50,onchange:function(e){ce(t,e.control.rootControl)}},items:[{label:"Vertical space",name:"vspace"},{label:"Border width",name:"border"},{label:"Horizontal space",name:"hspace"},{label:"Border style",type:"listbox",name:"borderStyle",width:90,maxWidth:90,onselect:function(e){ce(t,e.control.rootControl)},values:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]};var o},de=function(e,t){e.state.set("oldVal",e.value()),t.state.set("oldVal",t.value())},me=function(e,t){var n=e.find("#width")[0],r=e.find("#height")[0],a=e.find("#constrain")[0];n&&r&&a&&t(n,r,a.checked())},ge=function(e,t,n){var r=e.state.get("oldVal"),a=t.state.get("oldVal"),o=e.value(),i=t.value();n&&r&&a&&o&&i&&(o!==r?(i=Math.round(o/r*i),isNaN(i)||t.value(i)):(o=Math.round(i/a*o),isNaN(o)||e.value(o))),de(e,t)},fe=function(e){me(e,ge)},pe=function(){var e=function(e){fe(e.control.rootControl)};return{type:"container",label:"Dimensions",layout:"flex",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:5,onchange:e,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:5,onchange:e,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}},he=function(e){me(e,de)},ve=fe,be=function(e){e.meta=e.control.rootControl.toJSON()},ye=function(s,e){var t=[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0,onchange:function(e){var t,n,r,a,o,i,l,u,c;n=s,i=(t=e).meta||{},l=t.control,u=l.rootControl,(c=u.find("#image-list")[0])&&c.value(n.convertURL(l.value(),"src")),C.each(i,function(e,t){u.find("#"+t).value(e)}),i.width||i.height||(r=n.convertURL(l.value(),"src"),a=m(n),o=new RegExp("^(?:[a-z]+:)?//","i"),a&&!o.test(r)&&r.substring(0,a.length)!==a&&(r=a+r),l.value(r),_(n.documentBaseURI.toAbsolute(l.value()),function(e){e.width&&e.height&&d(n)&&(u.find("#width").value(e.width),u.find("#height").value(e.height),he(u))}))},onbeforecall:be},e];return r(s)&&t.push({name:"alt",type:"textbox",label:"Image description"}),a(s)&&t.push({name:"title",type:"textbox",label:"Image Title"}),d(s)&&t.push(pe()),n(s)&&t.push({name:"class",type:"listbox",label:"Class",values:T(n(s),function(e){e.value&&(e.textStyle=function(){return s.formatter.getCssText({inline:"img",classes:[e.value]})})})}),o(s)&&t.push({name:"caption",type:"checkbox",label:"Caption"}),t},xe=function(e,t){return{title:"General",type:"form",items:ye(e,t)}},we=ye,Ce=function(){return x.getOrDie("URL")},Se=function(e){return Ce().createObjectURL(e)},Ne=function(e){Ce().revokeObjectURL(e)},_e=tinymce.util.Tools.resolve("tinymce.ui.Factory"),Te=function(){};function Ae(i){var t=function(e,r,a,t){var o,n;(o=new(x.getOrDie("XMLHttpRequest"))).open("POST",i.url),o.withCredentials=i.credentials,o.upload.onprogress=function(e){t(e.loaded/e.total*100)},o.onerror=function(){a("Image upload failed due to a XHR Transport error. Code: "+o.status)},o.onload=function(){var e,t,n;o.status<200||300<=o.status?a("HTTP Error: "+o.status):(e=JSON.parse(o.responseText))&&"string"==typeof e.location?r((t=i.basePath,n=e.location,t?t.replace(/\/$/,"")+"/"+n.replace(/^\//,""):n)):a("Invalid JSON: "+o.responseText)},(n=new l.FormData).append("file",e.blob(),e.filename()),o.send(n)};return i=C.extend({credentials:!1,handler:t},i),{upload:function(e){return i.url||i.handler!==t?(r=e,a=i.handler,new w(function(e,t){try{a(r,e,t,Te)}catch(n){t(n.message)}})):w.reject("Upload url missing from the settings.");var r,a}}}var Re=function(u){return function(e){var t=_e.get("Throbber"),n=e.control.rootControl,r=new t(n.getEl()),a=e.control.value(),o=Se(a),i=Ae({url:f(u),basePath:h(u),credentials:v(u),handler:p(u)}),l=function(){r.hide(),Ne(o)};return r.show(),L(a).then(function(e){var t=u.editorUpload.blobCache.create({blob:a,blobUri:o,name:a.name?a.name.replace(/\.[^\.]+$/,""):null,base64:e.split(",")[1]});return i.upload(t).then(function(e){var t=n.find("#src");return t.value(e),n.find("tabpanel")[0].activateTab(0),t.fire("change"),l(),e})})["catch"](function(e){u.windowManager.alert(e),l()})}},Ie=".jpg,.jpeg,.png,.gif",Oe=function(e){return{title:"Upload",type:"form",layout:"flex",direction:"column",align:"stretch",padding:"20 20 20 20",items:[{type:"container",layout:"flex",direction:"column",align:"center",spacing:10,items:[{text:"Browse for an image",type:"browsebutton",accept:Ie,onchange:Re(e)},{text:"OR",type:"label"}]},{text:"Drop an image here",type:"dropzone",accept:Ie,height:100,onchange:Re(e)}]}};function Le(r){for(var a=[],e=1;e<arguments.length;e++)a[e-1]=arguments[e];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=a.concat(e);return r.apply(null,n)}}var Pe=function(t,e){var n=e.control.getRoot();ve(n),t.undoManager.transact(function(){var e=E(ie(t),n.toJSON());ue(t,e)}),t.editorUpload.uploadImagesAuto()};function Ue(o){function e(e){var n,t,r=ie(o);if(e&&(t={type:"listbox",label:"Image list",name:"image-list",values:T(e,function(e){e.value=o.convertURL(e.value||e.url,"src")},[{text:"None",value:""}]),value:r.src&&o.convertURL(r.src,"src"),onselect:function(e){var t=n.find("#alt");(!t.value()||e.lastControl&&t.value()===e.lastControl.text())&&t.value(e.control.text()),n.find("#src").value(e.control.value()).fire("change")},onPostRender:function(){t=this}}),u(o)||s(o)||g(o)){var a=[xe(o,t)];u(o)&&a.push(se(o)),(s(o)||g(o))&&a.push(Oe(o)),n=o.windowManager.open({title:"Insert/edit image",data:r,bodyType:"tabpanel",body:a,onSubmit:Le(Pe,o)})}else n=o.windowManager.open({title:"Insert/edit image",data:r,body:we(o,t),onSubmit:Le(Pe,o)});he(n)}return{open:function(){t(o,e)}}}var Ee=function(e){e.addCommand("mceImage",Ue(e).open)},ke=function(o){return function(e){for(var t,n,r=e.length,a=function(e){e.attr("contenteditable",o?"true":null)};r--;)t=e[r],(n=t.attr("class"))&&/\bimage\b/.test(n)&&(t.attr("contenteditable",o?"false":null),C.each(t.getAll("figcaption"),a))}},Me=function(e){e.on("preInit",function(){e.parser.addNodeFilter("figure",ke(!0)),e.serializer.addNodeFilter("figure",ke(!1))})},De=function(e){e.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:Ue(e).open,stateSelector:"img:not([data-mce-object],[data-mce-placeholder]),figure.image"}),e.addMenuItem("image",{icon:"image",text:"Image",onclick:Ue(e).open,context:"insert",prependToContext:!0})};e.add("image",function(e){Me(e),De(e),Ee(e)})}(window);
// Source: wp-includes/js/tinymce/plugins/link/plugin.min.js
!function(l){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.util.VK"),e=function(t){return t.target_list},o=function(t){return t.rel_list},i=function(t){return t.link_class_list},p=function(t){return"boolean"==typeof t.link_assume_external_targets&&t.link_assume_external_targets},a=function(t){return"boolean"==typeof t.link_context_toolbar&&t.link_context_toolbar},r=function(t){return t.link_list},k=function(t){return"string"==typeof t.default_link_target},y=function(t){return t.default_link_target},b=e,_=function(t,e){t.settings.target_list=e},w=function(t){return!1!==e(t)},T=o,C=function(t){return o(t)!==undefined},M=i,O=function(t){return i(t)!==undefined},R=function(t){return!1!==t.link_title},N=function(t){return"boolean"==typeof t.allow_unsafe_link_target&&t.allow_unsafe_link_target},u=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),c=tinymce.util.Tools.resolve("tinymce.Env"),s=function(t){if(!c.ie||10<c.ie){var e=l.document.createElement("a");e.target="_blank",e.href=t,e.rel="noreferrer noopener";var n=l.document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,l.window,0,0,0,0,0,!1,!1,!1,!1,0,null),r=e,a=n,l.document.body.appendChild(r),r.dispatchEvent(a),l.document.body.removeChild(r)}else{var o=l.window.open("","_blank");if(o){o.opener=null;var i=o.document;i.open(),i.write('<meta http-equiv="refresh" content="0; url='+u.DOM.encode(t)+'">'),i.close()}}var r,a},A=tinymce.util.Tools.resolve("tinymce.util.Tools"),f=function(t,e){var n,o,i=["noopener"],r=t?t.split(/\s+/):[],a=function(t){return t.filter(function(t){return-1===A.inArray(i,t)})};return(r=e?(n=a(n=r)).length?n.concat(i):i:a(r)).length?(o=r,A.trim(o.sort().join(" "))):null},d=function(t,e){return e=e||t.selection.getNode(),v(e)?t.dom.select("a[href]",e)[0]:t.dom.getParent(e,"a[href]")},m=function(t){return t&&"A"===t.nodeName&&t.href},v=function(t){return t&&"FIGURE"===t.nodeName&&/\bimage\b/i.test(t.className)},g=function(t,e){var n,o;(o=t.dom.select("img",e)[0])&&(n=t.dom.getParents(o,"a[href]",e)[0])&&(n.parentNode.insertBefore(o,n),t.dom.remove(n))},h=function(t,e,n){var o,i;(i=t.dom.select("img",e)[0])&&(o=t.dom.create("a",n),i.parentNode.insertBefore(o,i),o.appendChild(i))},L=function(i,r){return function(o){i.undoManager.transact(function(){var t=i.selection.getNode(),e=d(i,t),n={href:o.href,target:o.target?o.target:null,rel:o.rel?o.rel:null,"class":o["class"]?o["class"]:null,title:o.title?o.title:null};C(i.settings)||!1!==N(i.settings)||(n.rel=f(n.rel,"_blank"===n.target)),o.href===r.href&&(r.attach(),r={}),e?(i.focus(),o.hasOwnProperty("text")&&("innerText"in e?e.innerText=o.text:e.textContent=o.text),i.dom.setAttribs(e,n),i.selection.select(e),i.undoManager.add()):v(t)?h(i,t,n):o.hasOwnProperty("text")?i.insertContent(i.dom.createHTML("a",n,i.dom.encode(o.text))):i.execCommand("mceInsertLink",!1,n)})}},P=function(e){return function(){e.undoManager.transact(function(){var t=e.selection.getNode();v(t)?g(e,t):e.execCommand("unlink")})}},x=m,E=function(t){return 0<A.grep(t,m).length},S=function(t){return!(/</.test(t)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(t)||-1===t.indexOf("href=")))},I=d,K=function(t,e){var n=e?e.innerText||e.textContent:t.getContent({format:"text"});return n.replace(/\uFEFF/g,"")},U=f,D=tinymce.util.Tools.resolve("tinymce.util.Delay"),B=tinymce.util.Tools.resolve("tinymce.util.XHR"),F={},q=function(t,o,e){var i=function(t,n){return n=n||[],A.each(t,function(t){var e={text:t.text||t.title};t.menu?e.menu=i(t.menu):(e.value=t.value,o&&o(e)),n.push(e)}),n};return i(t,e||[])},V=function(e,t,n){var o=e.selection.getRng();D.setEditorTimeout(e,function(){e.windowManager.confirm(t,function(t){e.selection.setRng(o),n(t)})})},z=function(a,t){var e,l,o,u,n,i,r,c,s,f,d,m={},v=a.selection,g=a.dom,h=function(t){var e=o.find("#text");(!e.value()||t.lastControl&&e.value()===t.lastControl.text())&&e.value(t.control.text()),o.find("#href").value(t.control.value())},x=function(){l||!u||m.text||this.parent().parent().find("#text")[0].value(this.value())};u=S(v.getContent()),e=I(a),m.text=l=K(a.selection,e),m.href=e?g.getAttrib(e,"href"):"",e?m.target=g.getAttrib(e,"target"):k(a.settings)&&(m.target=y(a.settings)),(d=g.getAttrib(e,"rel"))&&(m.rel=d),(d=g.getAttrib(e,"class"))&&(m["class"]=d),(d=g.getAttrib(e,"title"))&&(m.title=d),u&&(n={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){m.text=this.value()}}),t&&(i={type:"listbox",label:"Link list",values:q(t,function(t){t.value=a.convertURL(t.value||t.url,"href")},[{text:"None",value:""}]),onselect:h,value:a.convertURL(m.href,"href"),onPostRender:function(){i=this}}),w(a.settings)&&(b(a.settings)===undefined&&_(a,[{text:"None",value:""},{text:"New window",value:"_blank"}]),c={name:"target",type:"listbox",label:"Target",values:q(b(a.settings))}),C(a.settings)&&(r={name:"rel",type:"listbox",label:"Rel",values:q(T(a.settings),function(t){!1===N(a.settings)&&(t.value=U(t.value,"_blank"===m.target))})}),O(a.settings)&&(s={name:"class",type:"listbox",label:"Class",values:q(M(a.settings),function(t){t.value&&(t.textStyle=function(){return a.formatter.getCssText({inline:"a",classes:[t.value]})})})}),R(a.settings)&&(f={name:"title",type:"textbox",label:"Title",value:m.title}),o=a.windowManager.open({title:"Insert link",data:m,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:function(t){var e=t.meta||{};i&&i.value(a.convertURL(this.value(),"href")),A.each(t.meta,function(t,e){var n=o.find("#"+e);"text"===e?0===l.length&&(n.value(t),m.text=t):n.value(t)}),e.attach&&(F={href:this.value(),attach:e.attach}),e.text||x.call(this)},onkeyup:x,onpaste:x,onbeforecall:function(t){t.meta=o.toJSON()}},n,f,function(n){var o=[];if(A.each(a.dom.select("a:not([href])"),function(t){var e=t.name||t.id;e&&o.push({text:e,value:"#"+e,selected:-1!==n.indexOf("#"+e)})}),o.length)return o.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:o,onselect:h}}(m.href),i,r,c,s],onSubmit:function(t){var e=p(a.settings),n=L(a,F),o=P(a),i=A.extend({},m,t.data),r=i.href;r?(u&&i.text!==l||delete i.text,0<r.indexOf("@")&&-1===r.indexOf("//")&&-1===r.indexOf("mailto:")?V(a,"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(t){t&&(i.href="mailto:"+r),n(i)}):!0===e&&!/^\w+:/i.test(r)||!1===e&&/^\s*www[\.|\d\.]/i.test(r)?V(a,"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(t){t&&(i.href="http://"+r),n(i)}):n(i)):o()}})},H=function(t){var e,n,o;n=z,"string"==typeof(o=r((e=t).settings))?B.send({url:o,success:function(t){n(e,JSON.parse(t))}}):"function"==typeof o?o(function(t){n(e,t)}):n(e,o)},J=function(t,e){return t.dom.getParent(e,"a[href]")},$=function(t){return J(t,t.selection.getStart())},j=function(t,e){if(e){var n=(i=e).getAttribute("data-mce-href")||i.getAttribute("href");if(/^#/.test(n)){var o=t.$(n);o.length&&t.selection.scrollIntoView(o[0],!0)}else s(e.href)}var i},G=function(t){return function(){H(t)}},X=function(t){return function(){j(t,$(t))}},Q=function(r){return function(t){var e,n,o,i;return!!(a(r.settings)&&(!(i=r.plugins.contextmenu)||!i.isContextMenuVisible())&&x(t)&&3===(o=(n=(e=r.selection).getRng()).startContainer).nodeType&&e.isCollapsed()&&0<n.startOffset&&n.startOffset<o.data.length)}},W=function(o){o.on("click",function(t){var e=J(o,t.target);e&&n.metaKeyPressed(t)&&(t.preventDefault(),j(o,e))}),o.on("keydown",function(t){var e,n=$(o);n&&13===t.keyCode&&!0===(e=t).altKey&&!1===e.shiftKey&&!1===e.ctrlKey&&!1===e.metaKey&&(t.preventDefault(),j(o,n))})},Y=function(n){return function(){var e=this;n.on("nodechange",function(t){e.active(!n.readonly&&!!I(n,t.element))})}},Z=function(n){return function(){var e=this,t=function(t){E(t.parents)?e.show():e.hide()};E(n.dom.getParents(n.selection.getStart()))||e.hide(),n.on("nodechange",t),e.on("remove",function(){n.off("nodechange",t)})}},tt=function(t){t.addCommand("mceLink",G(t))},et=function(t){t.addShortcut("Meta+K","",G(t))},nt=function(t){t.addButton("link",{active:!1,icon:"link",tooltip:"Insert/edit link",onclick:G(t),onpostrender:Y(t)}),t.addButton("unlink",{active:!1,icon:"unlink",tooltip:"Remove link",onclick:P(t),onpostrender:Y(t)}),t.addContextToolbar&&t.addButton("openlink",{icon:"newtab",tooltip:"Open link",onclick:X(t)})},ot=function(t){t.addMenuItem("openlink",{text:"Open link",icon:"newtab",onclick:X(t),onPostRender:Z(t),prependToContext:!0}),t.addMenuItem("link",{icon:"link",text:"Link",shortcut:"Meta+K",onclick:G(t),stateSelector:"a[href]",context:"insert",prependToContext:!0}),t.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onclick:P(t),stateSelector:"a[href]"})},it=function(t){t.addContextToolbar&&t.addContextToolbar(Q(t),"openlink | link unlink")};t.add("link",function(t){nt(t),ot(t),it(t),W(t),tt(t),et(t)})}(window);
// Source: wp-includes/js/tinymce/plugins/lists/plugin.min.js
!function(u){"use strict";var e,n,t,r,o,i,s,a,c,f=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),l=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),m=tinymce.util.Tools.resolve("tinymce.util.VK"),p=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),g=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),h=function(e){return e&&"BR"===e.nodeName},y=function(e){return e&&3===e.nodeType},N=function(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)},S=function(e){return e&&/^(OL|UL)$/.test(e.nodeName)},C=function(e){return e&&/^(DT|DD)$/.test(e.nodeName)},O=function(e){return e&&/^(LI|DT|DD)$/.test(e.nodeName)},b=function(e){return e&&/^(TH|TD)$/.test(e.nodeName)},T=h,E=function(e,n){return n&&!!e.schema.getTextBlockElements()[n.nodeName]},L=function(e,n){return e&&e.nodeName in n},D=function(e,n){return!!h(n)&&!(!e.isBlock(n.nextSibling)||h(n.previousSibling))},w=function(e,n,t){var r=e.isEmpty(n);return!(t&&0<e.select("span[data-mce-type=bookmark]",n).length)&&r},k=function(e,n){return e.isChildOf(n,e.getRoot())},A=function(e,n){if(y(e))return{container:e,offset:n};var t=d.getNode(e,n);return y(t)?{container:t,offset:n>=e.childNodes.length?t.data.length:0}:t.previousSibling&&y(t.previousSibling)?{container:t.previousSibling,offset:t.previousSibling.data.length}:t.nextSibling&&y(t.nextSibling)?{container:t.nextSibling,offset:0}:{container:e,offset:n}},x=function(e){var n=e.cloneRange(),t=A(e.startContainer,e.startOffset);n.setStart(t.container,t.offset);var r=A(e.endContainer,e.endOffset);return n.setEnd(r.container,r.offset),n},R=g.DOM,I=function(o){var i={},e=function(e){var n,t,r;t=o[e?"startContainer":"endContainer"],r=o[e?"startOffset":"endOffset"],1===t.nodeType&&(n=R.create("span",{"data-mce-type":"bookmark"}),t.hasChildNodes()?(r=Math.min(r,t.childNodes.length-1),e?t.insertBefore(n,t.childNodes[r]):R.insertAfter(n,t.childNodes[r])):t.appendChild(n),t=n,r=0),i[e?"startContainer":"endContainer"]=t,i[e?"startOffset":"endOffset"]=r};return e(!0),o.collapsed||e(),i},_=function(o){function e(e){var n,t,r;n=r=o[e?"startContainer":"endContainer"],t=o[e?"startOffset":"endOffset"],n&&(1===n.nodeType&&(t=function(e){for(var n=e.parentNode.firstChild,t=0;n;){if(n===e)return t;1===n.nodeType&&"bookmark"===n.getAttribute("data-mce-type")||t++,n=n.nextSibling}return-1}(n),n=n.parentNode,R.remove(r),!n.hasChildNodes()&&R.isBlock(n)&&n.appendChild(R.create("br"))),o[e?"startContainer":"endContainer"]=n,o[e?"startOffset":"endOffset"]=t)}e(!0),e();var n=R.createRng();return n.setStart(o.startContainer,o.startOffset),o.endContainer&&n.setEnd(o.endContainer,o.endOffset),x(n)},B=function(){},P=function(e){return function(){return e}},M=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return!t.apply(null,e)}},U=P(!1),F=P(!0),j=function(){return H},H=(e=function(e){return e.isNone()},r={fold:function(e,n){return e()},is:U,isSome:U,isNone:F,getOr:t=function(e){return e},getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:P(null),getOrUndefined:P(undefined),or:t,orThunk:n,map:j,each:B,bind:j,exists:U,forall:F,filter:j,equals:e,equals_:e,toArray:function(){return[]},toString:P("none()")},Object.freeze&&Object.freeze(r),r),$=function(t){var e=P(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:F,isNone:U,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return $(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:H},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(U,function(e){return n(t,e)})}};return o},q={some:$,none:j,from:function(e){return null===e||e===undefined?H:$(e)}},W=function(n){return function(e){return function(e){if(null===e)return"null";var n=typeof e;return"object"===n&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===n&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":n}(e)===n}},V=W("string"),z=W("array"),K=W("boolean"),X=W("function"),Q=W("number"),Y=Array.prototype.slice,G=Array.prototype.push,J=function(e,n){for(var t=e.length,r=new Array(t),o=0;o<t;o++){var i=e[o];r[o]=n(i,o)}return r},Z=function(e,n){for(var t=0,r=e.length;t<r;t++)n(e[t],t)},ee=function(e,n){for(var t=[],r=0,o=e.length;r<o;r++){var i=e[r];n(i,r)&&t.push(i)}return t},ne=function(e,n,t){return Z(e,function(e){t=n(t,e)}),t},te=function(e,n){for(var t=0,r=e.length;t<r;t++){var o=e[t];if(n(o,t))return q.some(o)}return q.none()},re=function(e,n){return function(e){for(var n=[],t=0,r=e.length;t<r;++t){if(!z(e[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+e);G.apply(n,e[t])}return n}(J(e,n))},oe=function(e){return 0===e.length?q.none():q.some(e[0])},ie=function(e){return 0===e.length?q.none():q.some(e[e.length-1])},ue=(X(Array.from)&&Array.from,"undefined"!=typeof u.window?u.window:Function("return this;")()),se=function(e,n){return function(e,n){for(var t=n!==undefined&&null!==n?n:ue,r=0;r<e.length&&t!==undefined&&null!==t;++r)t=t[e[r]];return t}(e.split("."),n)},ae=function(e,n){var t=se(e,n);if(t===undefined||null===t)throw new Error(e+" not available on this browser");return t},ce=function(e){var n,t=se("ownerDocument.defaultView",e);return(n=t,ae("HTMLElement",n)).prototype.isPrototypeOf(e)},fe=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),de=function(e){var n=e.selection.getStart(!0);return e.dom.getParent(n,"OL,UL,DL",me(e,n))},le=function(e){var t,n,r,o=e.selection.getSelectedBlocks();return v.grep((t=e,n=o,r=v.map(n,function(e){var n=t.dom.getParent(e,"li,dd,dt",me(t,e));return n||e}),fe.unique(r)),function(e){return O(e)})},me=function(e,n){var t=e.dom.getParents(n,"TD,TH");return 0<t.length?t[0]:e.getBody()},ge=function(e,n){var t=e.dom.getParents(n,"ol,ul",me(e,n));return ie(t)},pe=function(n,e){var t=J(e,function(e){return ge(n,e).getOr(e)});return fe.unique(t)},ve={isList:function(e){var n=de(e);return ce(n)},getParentList:de,getSelectedSubLists:function(e){var n,t,r,o=de(e),i=e.selection.getSelectedBlocks();return r=i,(t=o)&&1===r.length&&r[0]===t?(n=o,v.grep(n.querySelectorAll("ol,ul,dl"),function(e){return N(e)})):v.grep(i,function(e){return N(e)&&o!==e})},getSelectedListItems:le,getClosestListRootElm:me,getSelectedDlItems:function(e){return ee(le(e),C)},getSelectedListRoots:function(e){var n,t,r,o=(t=ge(n=e,n.selection.getStart()),r=ee(n.selection.getSelectedBlocks(),S),t.toArray().concat(r));return pe(e,o)}},he=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:P(e)}},ye={fromHtml:function(e,n){var t=(n||u.document).createElement("div");if(t.innerHTML=e,!t.hasChildNodes()||1<t.childNodes.length)throw u.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return he(t.childNodes[0])},fromTag:function(e,n){var t=(n||u.document).createElement(e);return he(t)},fromText:function(e,n){var t=(n||u.document).createTextNode(e);return he(t)},fromDom:he,fromPoint:function(e,n,t){var r=e.dom();return q.from(r.elementFromPoint(n,t)).map(he)}},Ne=function(e,n,t){return e.isSome()&&n.isSome()?q.some(t(e.getOrDie(),n.getOrDie())):q.none()},Se=Object.keys,Ce=function(){return ae("Node")},Oe=function(e,n,t){return 0!=(e.compareDocumentPosition(n)&t)},be=function(e,n){return Oe(e,n,Ce().DOCUMENT_POSITION_CONTAINED_BY)},Te=function(e,n){var t=function(e,n){for(var t=0;t<e.length;t++){var r=e[t];if(r.test(n))return r}return undefined}(e,n);if(!t)return{major:0,minor:0};var r=function(e){return Number(n.replace(t,"$"+e))};return Le(r(1),r(2))},Ee=function(){return Le(0,0)},Le=function(e,n){return{major:e,minor:n}},De={nu:Le,detect:function(e,n){var t=String(n).toLowerCase();return 0===e.length?Ee():Te(e,t)},unknown:Ee},we="Firefox",ke=function(e,n){return function(){return n===e}},Ae=function(e){var n=e.current;return{current:n,version:e.version,isEdge:ke("Edge",n),isChrome:ke("Chrome",n),isIE:ke("IE",n),isOpera:ke("Opera",n),isFirefox:ke(we,n),isSafari:ke("Safari",n)}},xe={unknown:function(){return Ae({current:undefined,version:De.unknown()})},nu:Ae,edge:P("Edge"),chrome:P("Chrome"),ie:P("IE"),opera:P("Opera"),firefox:P(we),safari:P("Safari")},Re="Windows",Ie="Android",_e="Solaris",Be="FreeBSD",Pe=function(e,n){return function(){return n===e}},Me=function(e){var n=e.current;return{current:n,version:e.version,isWindows:Pe(Re,n),isiOS:Pe("iOS",n),isAndroid:Pe(Ie,n),isOSX:Pe("OSX",n),isLinux:Pe("Linux",n),isSolaris:Pe(_e,n),isFreeBSD:Pe(Be,n)}},Ue={unknown:function(){return Me({current:undefined,version:De.unknown()})},nu:Me,windows:P(Re),ios:P("iOS"),android:P(Ie),linux:P("Linux"),osx:P("OSX"),solaris:P(_e),freebsd:P(Be)},Fe=function(e,n){var t=String(n).toLowerCase();return te(e,function(e){return e.search(t)})},je=function(e,t){return Fe(e,t).map(function(e){var n=De.detect(e.versionRegexes,t);return{current:e.name,version:n}})},He=function(e,t){return Fe(e,t).map(function(e){var n=De.detect(e.versionRegexes,t);return{current:e.name,version:n}})},$e=function(e,n){return-1!==e.indexOf(n)},qe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,We=function(n){return function(e){return $e(e,n)}},Ve=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return $e(e,"edge/")&&$e(e,"chrome")&&$e(e,"safari")&&$e(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,qe],search:function(e){return $e(e,"chrome")&&!$e(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return $e(e,"msie")||$e(e,"trident")}},{name:"Opera",versionRegexes:[qe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:We("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:We("firefox")},{name:"Safari",versionRegexes:[qe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return($e(e,"safari")||$e(e,"mobile/"))&&$e(e,"applewebkit")}}],ze=[{name:"Windows",search:We("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return $e(e,"iphone")||$e(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:We("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:We("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:We("linux"),versionRegexes:[]},{name:"Solaris",search:We("sunos"),versionRegexes:[]},{name:"FreeBSD",search:We("freebsd"),versionRegexes:[]}],Ke={browsers:P(Ve),oses:P(ze)},Xe=function(e){var n,t,r,o,i,u,s,a,c,f,d,l=Ke.browsers(),m=Ke.oses(),g=je(l,e).fold(xe.unknown,xe.nu),p=He(m,e).fold(Ue.unknown,Ue.nu);return{browser:g,os:p,deviceType:(t=g,r=e,o=(n=p).isiOS()&&!0===/ipad/i.test(r),i=n.isiOS()&&!o,u=n.isAndroid()&&3===n.version.major,s=n.isAndroid()&&4===n.version.major,a=o||u||s&&!0===/mobile/i.test(r),c=n.isiOS()||n.isAndroid(),f=c&&!a,d=t.isSafari()&&n.isiOS()&&!1===/safari/i.test(r),{isiPad:P(o),isiPhone:P(i),isTablet:P(a),isPhone:P(f),isTouch:P(c),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:P(d)})}},Qe={detect:(o=function(){var e=u.navigator.userAgent;return Xe(e)},s=!1,function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return s||(s=!0,i=o.apply(null,e)),i})},Ye=(u.Node.ATTRIBUTE_NODE,u.Node.CDATA_SECTION_NODE,u.Node.COMMENT_NODE,u.Node.DOCUMENT_NODE,u.Node.DOCUMENT_TYPE_NODE,u.Node.DOCUMENT_FRAGMENT_NODE,u.Node.ELEMENT_NODE),Ge=(u.Node.TEXT_NODE,u.Node.PROCESSING_INSTRUCTION_NODE,u.Node.ENTITY_REFERENCE_NODE,u.Node.ENTITY_NODE,u.Node.NOTATION_NODE,Ye),Je=function(e,n){return e.dom()===n.dom()},Ze=Qe.detect().browser.isIE()?function(e,n){return be(e.dom(),n.dom())}:function(e,n){var t=e.dom(),r=n.dom();return t!==r&&t.contains(r)},en=function(e,n){var t=e.dom();if(t.nodeType!==Ge)return!1;var r=t;if(r.matches!==undefined)return r.matches(n);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(n);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(n);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(n);throw new Error("Browser lacks native selectors")},nn=function(e){return q.from(e.dom().parentNode).map(ye.fromDom)},tn=function(e){return J(e.dom().childNodes,ye.fromDom)},rn=function(e,n){var t=e.dom().childNodes;return q.from(t[n]).map(ye.fromDom)},on=function(e){return rn(e,0)},un=function(e){return rn(e,e.dom().childNodes.length-1)},sn=(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n]}("element","offset"),function(n,t){nn(n).each(function(e){e.dom().insertBefore(t.dom(),n.dom())})}),an=function(e,n){e.dom().appendChild(n.dom())},cn=function(n,e){Z(e,function(e){an(n,e)})},fn=function(e){var n=e.dom();null!==n.parentNode&&n.parentNode.removeChild(n)},dn=function(e){return e.dom().nodeName.toLowerCase()},ln=(a=Ye,function(e){return e.dom().nodeType===a}),mn=function(e,n){var t=e.dom();!function(e,n){for(var t=Se(e),r=0,o=t.length;r<o;r++){var i=t[r];n(e[i],i)}}(n,function(e,n){!function(e,n,t){if(!(V(t)||K(t)||Q(t)))throw u.console.error("Invalid call to Attr.set. Key ",n,":: Value ",t,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(n,t+"")}(t,n,e)})},gn=function(e){return ne(e.dom().attributes,function(e,n){return e[n.name]=n.value,e},{})},pn=function(e,n,t){if(!V(t))throw u.console.error("Invalid call to CSS.set. Property ",n,":: Value ",t,":: Element ",e),new Error("CSS value must be a string: "+t);var r;(r=e).style!==undefined&&X(r.style.getPropertyValue)&&e.style.setProperty(n,t)},vn=function(e){return n=e,t=!0,ye.fromDom(n.dom().cloneNode(t));var n,t},hn=function(e,n){var t,r,o,i,u=(t=e,r=n,o=ye.fromTag(r),i=gn(t),mn(o,i),o);sn(e,u);var s=tn(e);return cn(u,s),fn(e),u},yn=function(e,n){an(e.item,n.list)},Nn=function(f,e,d){var n=e.slice(0,d.depth);return ie(n).each(function(e){var n,t,r,o,i,u,s,a,c=(n=f,t=d.itemAttributes,r=d.content,o=ye.fromTag("li",n),mn(o,t),cn(o,r),o);u=c,an((i=e).list,u),i.item=u,a=d,dn((s=e).list)!==a.listType&&(s.list=hn(s.list,a.listType)),mn(s.list,a.listAttributes)}),n},Sn=function(e,n,t){var r,o=function(e,n,t){for(var r,o,i,u=[],s=0;s<t;s++)u.push((r=e,o=n.listType,i={list:ye.fromTag(o,r),item:ye.fromTag("li",r)},an(i.list,i.item),i));return u}(e,t,t.depth-n.length);return function(e){for(var n=1;n<e.length;n++)yn(e[n-1],e[n])}(o),function(e,n){for(var t=0;t<e.length-1;t++)r=e[t].item,o="list-style-type",i="none",u=r.dom(),pn(u,o,i);var r,o,i,u;ie(e).each(function(e){mn(e.list,n.listAttributes),mn(e.item,n.itemAttributes),cn(e.item,n.content)})}(o,t),r=o,Ne(ie(n),oe(r),yn),n.concat(o)},Cn=function(e){return en(e,"OL,UL")},On=function(e){return on(e).map(Cn).getOr(!1)},bn=function(e){return 0<e.depth},Tn=function(e){return e.isSelected},En=function(e){var n=tn(e),t=un(e).map(Cn).getOr(!1)?n.slice(0,-1):n;return J(t,vn)},Ln=Object.prototype.hasOwnProperty,Dn=(c=function(e,n){return n},function(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];if(0===e.length)throw new Error("Can't merge zero objects");for(var t={},r=0;r<e.length;r++){var o=e[r];for(var i in o)Ln.call(o,i)&&(t[i]=c(t[i],o[i]))}return t}),wn=function(n){Z(n,function(r,e){(function(e,n){for(var t=e[n].depth,r=n-1;0<=r;r--){if(e[r].depth===t)return q.some(e[r]);if(e[r].depth<t)break}return q.none()})(n,e).each(function(e){var n,t;t=e,(n=r).listType=t.listType,n.listAttributes=Dn({},t.listAttributes)})})},kn=function(e){var n=e,t=function(){return n};return{get:t,set:function(e){n=e},clone:function(){return kn(t())}}},An=function(i,u,s,a){return on(a).filter(Cn).fold(function(){u.each(function(e){Je(e.start,a)&&s.set(!0)});var n,t,r,e=(n=a,t=i,r=s.get(),nn(n).filter(ln).map(function(e){return{depth:t,isSelected:r,content:En(n),itemAttributes:gn(n),listAttributes:gn(e),listType:dn(e)}}));u.each(function(e){Je(e.end,a)&&s.set(!1)});var o=un(a).filter(Cn).map(function(e){return xn(i,u,s,e)}).getOr([]);return e.toArray().concat(o)},function(e){return xn(i,u,s,e)})},xn=function(n,t,r,e){return re(tn(e),function(e){return(Cn(e)?xn:An)(n+1,t,r,e)})},Rn=tinymce.util.Tools.resolve("tinymce.Env"),In=function(e,n){var t,r,o,i,u=e.dom,s=e.schema.getBlockElements(),a=u.createFragment();if(e.settings.forced_root_block&&(o=e.settings.forced_root_block),o&&((r=u.create(o)).tagName===e.settings.forced_root_block&&u.setAttribs(r,e.settings.forced_root_block_attrs),L(n.firstChild,s)||a.appendChild(r)),n)for(;t=n.firstChild;){var c=t.nodeName;i||"SPAN"===c&&"bookmark"===t.getAttribute("data-mce-type")||(i=!0),L(t,s)?(a.appendChild(t),r=null):o?(r||(r=u.create(o),a.appendChild(r)),r.appendChild(t)):a.appendChild(t)}return e.settings.forced_root_block?i||Rn.ie&&!(10<Rn.ie)||r.appendChild(u.create("br",{"data-mce-bogus":"1"})):a.appendChild(u.create("br")),a},_n=function(i,e){return J(e,function(e){var n,t,r,o=(n=e.content,r=(t||u.document).createDocumentFragment(),Z(n,function(e){r.appendChild(e.dom())}),ye.fromDom(r));return ye.fromDom(In(i,o.dom()))})},Bn=function(e,n){return wn(n),(t=e.contentDocument,r=n,o=ne(r,function(e,n){return n.depth>e.length?Sn(t,e,n):Nn(t,e,n)},[]),oe(o).map(function(e){return e.list})).toArray();var t,r,o},Pn=function(e){var n,t,r=J(ve.getSelectedListItems(e),ye.fromDom);return Ne(te(r,M(On)),te((n=r,(t=Y.call(n,0)).reverse(),t),M(On)),function(e,n){return{start:e,end:n}})},Mn=function(s,e,a){var n,t,r,o=(n=e,t=Pn(s),r=kn(!1),J(n,function(e){return{sourceList:e,entries:xn(0,t,r,e)}}));Z(o,function(e){var n,t,r,o,i,u;n=e.entries,t=a,Z(ee(n,Tn),function(e){return function(e,n){switch(e){case"Indent":n.depth++;break;case"Outdent":n.depth--;break;case"Flatten":n.depth=0}}(t,e)}),r=e.sourceList,i=s,u=e.entries,o=re(function(e,n){if(0===e.length)return[];for(var t=n(e[0]),r=[],o=[],i=0,u=e.length;i<u;i++){var s=e[i],a=n(s);a!==t&&(r.push(o),o=[]),t=a,o.push(s)}return 0!==o.length&&r.push(o),r}(u,bn),function(e){return oe(e).map(bn).getOr(!1)?Bn(i,e):_n(i,e)}),Z(o,function(e){sn(r,e)}),fn(e.sourceList)})},Un=g.DOM,Fn=function(e,n,t){var r,o,i,u,s,a;for(i=Un.select('span[data-mce-type="bookmark"]',n),s=In(e,t),(r=Un.createRng()).setStartAfter(t),r.setEndAfter(n),u=(o=r.extractContents()).firstChild;u;u=u.firstChild)if("LI"===u.nodeName&&e.dom.isEmpty(u)){Un.remove(u);break}e.dom.isEmpty(o)||Un.insertAfter(o,n),Un.insertAfter(s,n),w(e.dom,t.parentNode)&&(a=t.parentNode,v.each(i,function(e){a.parentNode.insertBefore(e,t.parentNode)}),Un.remove(a)),Un.remove(t),w(e.dom,n)&&Un.remove(n)},jn=function(e){en(e,"dt")&&hn(e,"dd")},Hn=function(r,e,n){Z(n,"Indent"===e?jn:function(e){return n=r,void(en(t=e,"dd")?hn(t,"dt"):en(t,"dt")&&nn(t).each(function(e){return Fn(n,e.dom(),t.dom())}));var n,t})},$n=function(e,n){var t=J(ve.getSelectedListRoots(e),ye.fromDom),r=J(ve.getSelectedDlItems(e),ye.fromDom),o=!1;if(t.length||r.length){var i=e.selection.getBookmark();Mn(e,t,n),Hn(e,n,r),e.selection.moveToBookmark(i),e.selection.setRng(x(e.selection.getRng())),e.nodeChanged(),o=!0}return o},qn=function(e){return $n(e,"Indent")},Wn=function(e){return $n(e,"Outdent")},Vn=function(e){return $n(e,"Flatten")},zn=function(t,e){v.each(e,function(e,n){t.setAttribute(n,e)})},Kn=function(e,n,t){var r,o,i,u,s,a,c;r=e,o=n,u=(i=t)["list-style-type"]?i["list-style-type"]:null,r.setStyle(o,"list-style-type",u),s=e,zn(a=n,(c=t)["list-attributes"]),v.each(s.select("li",a),function(e){zn(e,c["list-item-attributes"])})},Xn=function(e,n,t,r){var o,i;for(o=n[t?"startContainer":"endContainer"],i=n[t?"startOffset":"endOffset"],1===o.nodeType&&(o=o.childNodes[Math.min(i,o.childNodes.length-1)]||o),!t&&T(o.nextSibling)&&(o=o.nextSibling);o.parentNode!==r;){if(E(e,o))return o;if(/^(TD|TH)$/.test(o.parentNode.nodeName))return o;o=o.parentNode}return o},Qn=function(f,d,l){void 0===l&&(l={});var e,n=f.selection.getRng(!0),m="LI",t=ve.getClosestListRootElm(f,f.selection.getStart(!0)),g=f.dom;"false"!==g.getContentEditable(f.selection.getNode())&&("DL"===(d=d.toUpperCase())&&(m="DT"),e=I(n),v.each(function(t,e,r){for(var o,i=[],u=t.dom,n=Xn(t,e,!0,r),s=Xn(t,e,!1,r),a=[],c=n;c&&(a.push(c),c!==s);c=c.nextSibling);return v.each(a,function(e){if(E(t,e))return i.push(e),void(o=null);if(u.isBlock(e)||T(e))return T(e)&&u.remove(e),void(o=null);var n=e.nextSibling;p.isBookmarkNode(e)&&(E(t,n)||!n&&e.parentNode===r)?o=null:(o||(o=u.create("p"),e.parentNode.insertBefore(o,e),i.push(o)),o.appendChild(e))}),i}(f,n,t),function(e){var n,t,r,o,i,u,s,a,c;(t=e.previousSibling)&&N(t)&&t.nodeName===d&&(r=t,o=l,i=g.getStyle(r,"list-style-type"),u=o?o["list-style-type"]:"",i===(u=null===u?"":u))?(n=t,e=g.rename(e,m),t.appendChild(e)):(n=g.create(d),e.parentNode.insertBefore(n,e),n.appendChild(e),e=g.rename(e,m)),s=g,a=e,c=["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"],v.each(c,function(e){var n;return s.setStyle(a,((n={})[e]="",n))}),Kn(g,n,l),Gn(f.dom,n)}),f.selection.setRng(_(e)))},Yn=function(e,n,t){return a=t,(s=n)&&a&&N(s)&&s.nodeName===a.nodeName&&(i=n,u=t,(o=e).getStyle(i,"list-style-type",!0)===o.getStyle(u,"list-style-type",!0))&&(r=t,n.className===r.className);var r,o,i,u,s,a},Gn=function(e,n){var t,r;if(t=n.nextSibling,Yn(e,n,t)){for(;r=t.firstChild;)n.appendChild(r);e.remove(t)}if(t=n.previousSibling,Yn(e,n,t)){for(;r=t.lastChild;)n.insertBefore(r,n.firstChild);e.remove(t)}},Jn=function(n,e,t,r,o){if(e.nodeName!==r||Zn(o)){var i=I(n.selection.getRng(!0));v.each([e].concat(t),function(e){!function(e,n,t,r){if(n.nodeName!==t){var o=e.rename(n,t);Kn(e,o,r)}else Kn(e,n,r)}(n.dom,e,r,o)}),n.selection.setRng(_(i))}else Vn(n)},Zn=function(e){return"list-style-type"in e},et={toggleList:function(e,n,t){var r=ve.getParentList(e),o=ve.getSelectedSubLists(e);t=t||{},r&&0<o.length?Jn(e,r,o,n,t):function(e,n,t,r){if(n!==e.getBody())if(n)if(n.nodeName!==t||Zn(r)){var o=I(e.selection.getRng(!0));Kn(e.dom,n,r),Gn(e.dom,e.dom.rename(n,t)),e.selection.setRng(_(o))}else Vn(e);else Qn(e,t,r)}(e,r,n,t)},mergeWithAdjacentLists:Gn},nt=g.DOM,tt=function(e,n){var t,r=n.parentNode;"LI"===r.nodeName&&r.firstChild===n&&((t=r.previousSibling)&&"LI"===t.nodeName?(t.appendChild(n),w(e,r)&&nt.remove(r)):nt.setStyle(r,"listStyleType","none")),N(r)&&(t=r.previousSibling)&&"LI"===t.nodeName&&t.appendChild(n)},rt=function(n,e){v.each(v.grep(n.select("ol,ul",e)),function(e){tt(n,e)})},ot=function(e,n,t,r){var o,i,u=n.startContainer,s=n.startOffset;if(3===u.nodeType&&(t?s<u.data.length:0<s))return u;for(o=e.schema.getNonEmptyElements(),1===u.nodeType&&(u=d.getNode(u,s)),i=new l(u,r),t&&D(e.dom,u)&&i.next();u=i[t?"next":"prev2"]();){if("LI"===u.nodeName&&!u.hasChildNodes())return u;if(o[u.nodeName])return u;if(3===u.nodeType&&0<u.data.length)return u}},it=function(e,n){var t=n.childNodes;return 1===t.length&&!N(t[0])&&e.isBlock(t[0])},ut=function(e,n,t){var r,o,i,u;if(o=it(e,t)?t.firstChild:t,it(i=e,u=n)&&i.remove(u.firstChild,!0),!w(e,n,!0))for(;r=n.firstChild;)o.appendChild(r)},st=function(n,e,t){var r,o,i=e.parentNode;if(k(n,e)&&k(n,t)){N(t.lastChild)&&(o=t.lastChild),i===t.lastChild&&T(i.previousSibling)&&n.remove(i.previousSibling),(r=t.lastChild)&&T(r)&&e.hasChildNodes()&&n.remove(r),w(n,t,!0)&&n.$(t).empty(),ut(n,e,t),o&&t.appendChild(o);var u=Ze(ye.fromDom(t),ye.fromDom(e))?n.getParents(e,N,t):[];n.remove(e),Z(u,function(e){w(n,e)&&e!==n.getRoot()&&n.remove(e)})}},at=function(e,n,t,r){var o,i,u,s=e.dom;if(s.isEmpty(r))i=t,u=r,(o=e).dom.$(u).empty(),st(o.dom,i,u),o.selection.setCursorLocation(u);else{var a=I(n);st(s,t,r),e.selection.setRng(_(a))}},ct=function(e,n){var t,r,o,i=e.dom,u=e.selection,s=u.getStart(),a=ve.getClosestListRootElm(e,s),c=i.getParent(u.getStart(),"LI",a);if(c){if((t=c.parentNode)===e.getBody()&&w(i,t))return!0;if(r=x(u.getRng(!0)),(o=i.getParent(ot(e,r,n,a),"LI",a))&&o!==c)return n?at(e,r,o,c):function(e,n,t,r){var o=I(n);st(e.dom,t,r);var i=_(o);e.selection.setRng(i)}(e,r,c,o),!0;if(!o&&!n)return Vn(e),!0}return!1},ft=function(e,n){return ct(e,n)||function(o,i){var u=o.dom,e=o.selection.getStart(),s=ve.getClosestListRootElm(o,e),a=u.getParent(e,u.isBlock,s);if(a&&u.isEmpty(a)){var n=x(o.selection.getRng(!0)),c=u.getParent(ot(o,n,i,s),"LI",s);if(c)return o.undoManager.transact(function(){var e,n,t,r;n=a,t=s,r=(e=u).getParent(n.parentNode,e.isBlock,t),e.remove(n),r&&e.isEmpty(r)&&e.remove(r),et.mergeWithAdjacentLists(u,c.parentNode),o.selection.select(c,!0),o.selection.collapse(i)}),!0}return!1}(e,n)},dt=function(e,n){return e.selection.isCollapsed()?ft(e,n):(r=(t=e).selection.getStart(),o=ve.getClosestListRootElm(t,r),!!(t.dom.getParent(r,"LI,DT,DD",o)||0<ve.getSelectedListItems(t).length)&&(t.undoManager.transact(function(){t.execCommand("Delete"),rt(t.dom,t.getBody())}),!0));var t,r,o},lt=function(n){n.on("keydown",function(e){e.keyCode===m.BACKSPACE?dt(n,!1)&&e.preventDefault():e.keyCode===m.DELETE&&dt(n,!0)&&e.preventDefault()})},mt=dt,gt=function(n){return{backspaceDelete:function(e){mt(n,e)}}},pt=function(n,t){return function(){var e=n.dom.getParent(n.selection.getStart(),"UL,OL,DL");return e&&e.nodeName===t}},vt=function(t){t.on("BeforeExecCommand",function(e){var n=e.command.toLowerCase();"indent"===n?qn(t):"outdent"===n&&Wn(t)}),t.addCommand("InsertUnorderedList",function(e,n){et.toggleList(t,"UL",n)}),t.addCommand("InsertOrderedList",function(e,n){et.toggleList(t,"OL",n)}),t.addCommand("InsertDefinitionList",function(e,n){et.toggleList(t,"DL",n)}),t.addCommand("RemoveList",function(){Vn(t)}),t.addQueryStateHandler("InsertUnorderedList",pt(t,"UL")),t.addQueryStateHandler("InsertOrderedList",pt(t,"OL")),t.addQueryStateHandler("InsertDefinitionList",pt(t,"DL"))},ht=function(e){return e.getParam("lists_indent_on_tab",!0)},yt=function(e){var n;ht(e)&&(n=e).on("keydown",function(e){e.keyCode!==m.TAB||m.metaKeyPressed(e)||n.undoManager.transact(function(){(e.shiftKey?Wn(n):qn(n))&&e.preventDefault()})}),lt(e)},Nt=function(n,i){return function(e){var o=e.control;n.on("NodeChange",function(e){var n=function(e,n){for(var t=0;t<e.length;t++)if(n(e[t]))return t;return-1}(e.parents,b),t=-1!==n?e.parents.slice(0,n):e.parents,r=v.grep(t,N);o.active(0<r.length&&r[0].nodeName===i)})}},St=function(e){var n,t,r;t="advlist",r=(n=e).settings.plugins?n.settings.plugins:"",-1===v.inArray(r.split(/[ ,]/),t)&&(e.addButton("numlist",{active:!1,title:"Numbered list",cmd:"InsertOrderedList",onPostRender:Nt(e,"OL")}),e.addButton("bullist",{active:!1,title:"Bullet list",cmd:"InsertUnorderedList",onPostRender:Nt(e,"UL")})),e.addButton("indent",{icon:"indent",title:"Increase indent",cmd:"Indent"})};f.add("lists",function(e){return yt(e),St(e),vt(e),gt(e)})}(window);
// Source: wp-includes/js/tinymce/plugins/media/plugin.min.js
!function(){"use strict";var e,t,r,n,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.Env"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),w=function(e){return e.getParam("media_scripts")},b=function(e){return e.getParam("audio_template_callback")},y=function(e){return e.getParam("video_template_callback")},a=function(e){return e.getParam("media_live_embeds",!0)},u=function(e){return e.getParam("media_filter_html",!0)},s=function(e){return e.getParam("media_url_resolver")},m=function(e){return e.getParam("media_alt_source",!0)},d=function(e){return e.getParam("media_poster",!0)},h=function(e){return e.getParam("media_dimensions",!0)},f=function(e){var t=e,r=function(){return t};return{get:r,set:function(e){t=e},clone:function(){return f(r())}}},c=function(){},l=function(e){return function(){return e}},p=l(!1),g=l(!0),x=function(){return O},O=(e=function(e){return e.isNone()},n={fold:function(e,t){return e()},is:p,isSome:p,isNone:g,getOr:r=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:l(null),getOrUndefined:l(undefined),or:r,orThunk:t,map:x,each:c,bind:x,exists:p,forall:g,filter:x,equals:e,equals_:e,toArray:function(){return[]},toString:l("none()")},Object.freeze&&Object.freeze(n),n),j=function(r){var e=l(r),t=function(){return i},n=function(e){return e(r)},i={fold:function(e,t){return t(r)},is:function(e){return r===e},isSome:g,isNone:p,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return j(e(r))},each:function(e){e(r)},bind:n,exists:n,forall:n,filter:function(e){return e(r)?i:O},toArray:function(){return[r]},toString:function(){return"some("+r+")"},equals:function(e){return e.is(r)},equals_:function(e,t){return e.fold(p,function(e){return t(r,e)})}};return i},_=x,S=function(e){return null===e||e===undefined?O:j(e)},k=Object.hasOwnProperty,N=function(e,t){return M(e,t)?S(e[t]):_()},M=function(e,t){return k.call(e,t)},T=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),z=tinymce.util.Tools.resolve("tinymce.html.SaxParser"),A=function(e,t){if(e)for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r].filter))return e[r]},C=T.DOM,$=function(e){return e.replace(/px$/,"")},P=function(a,e){var c=f(!1),u={};return z({validate:!1,allow_conditional_comments:!0,special:"script,noscript",start:function(e,t){if(c.get());else if(M(t.map,"data-ephox-embed-iri"))c.set(!0),i=(n=t).map.style,o=i?C.parseStyle(i):{},u={type:"ephox-embed-iri",source1:n.map["data-ephox-embed-iri"],source2:"",poster:"",width:N(o,"max-width").map($).getOr(""),height:N(o,"max-height").map($).getOr("")};else{if(u.source1||"param"!==e||(u.source1=t.map.movie),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(u.type||(u.type=e),u=v.extend(t.map,u)),"script"===e){var r=A(a,t.map.src);if(!r)return;u={type:"script",source1:t.map.src,width:r.width,height:r.height}}"source"===e&&(u.source1?u.source2||(u.source2=t.map.src):u.source1=t.map.src),"img"!==e||u.poster||(u.poster=t.map.src)}var n,i,o}}).parse(e),u.source1=u.source1||u.src||u.data,u.source2=u.source2||"",u.poster=u.poster||"",u},F=tinymce.util.Tools.resolve("tinymce.util.Promise"),D=function(e){var t={mp3:"audio/mpeg",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"}[e.toLowerCase().split(".").pop()];return t||""},L=tinymce.util.Tools.resolve("tinymce.html.Schema"),E=tinymce.util.Tools.resolve("tinymce.html.Writer"),J=T.DOM,R=function(e){return/^[0-9.]+$/.test(e)?e+"px":e},U=function(e,t){for(var r in t){var n=""+t[r];if(e.map[r])for(var i=e.length;i--;){var o=e[i];o.name===r&&(n?(e.map[r]=n,o.value=n):(delete e.map[r],e.splice(i,1)))}else n&&(e.push({name:r,value:n}),e.map[r]=n)}},W=function(e,c,u){var s,l=E(),m=f(!1),d=0;return z({validate:!1,allow_conditional_comments:!0,special:"script,noscript",comment:function(e){l.comment(e)},cdata:function(e){l.cdata(e)},text:function(e,t){l.text(e,t)},start:function(e,t,r){if(m.get());else if(M(t.map,"data-ephox-embed-iri"))m.set(!0),n=c,o=(i=t).map.style,(a=o?J.parseStyle(o):{})["max-width"]=R(n.width),a["max-height"]=R(n.height),U(i,{style:J.serializeStyle(a)});else{switch(e){case"video":case"object":case"embed":case"img":case"iframe":c.height!==undefined&&c.width!==undefined&&U(t,{width:c.width,height:c.height})}if(u)switch(e){case"video":U(t,{poster:c.poster,src:""}),c.source2&&U(t,{src:""});break;case"iframe":U(t,{src:c.source1});break;case"source":if(++d<=2&&(U(t,{src:c["source"+d],type:c["source"+d+"mime"]}),!c["source"+d]))return;break;case"img":if(!c.poster)return;s=!0}}var n,i,o,a;l.start(e,t,r)},end:function(e){if(!m.get()){if("video"===e&&u)for(var t=1;t<=2;t++)if(c["source"+t]){var r=[];r.map={},d<t&&(U(r,{src:c["source"+t],type:c["source"+t+"mime"]}),l.start("source",r,!0))}if(c.poster&&"object"===e&&u&&!s){var n=[];n.map={},U(n,{src:c.poster,width:c.width,height:c.height}),l.start("img",n,!0)}}l.end(e)}},L({})).parse(e),l.getContent()},H=[{regex:/youtu\.be\/([\w\-_\?&=.]+)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$2?$4",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$2?title=0&amp;byline=0",allowFullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0},{regex:/dai\.ly\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],I=function(r,e){var n=v.extend({},e);if(!n.source1&&(v.extend(n,P(w(r),n.embed)),!n.source1))return"";n.source2||(n.source2=""),n.poster||(n.poster=""),n.source1=r.convertURL(n.source1,"source"),n.source2=r.convertURL(n.source2,"source"),n.source1mime=D(n.source1),n.source2mime=D(n.source2),n.poster=r.convertURL(n.poster,"poster");var t,i,o=(t=n.source1,0<(i=H.filter(function(e){return e.regex.test(t)})).length?v.extend({},i[0],{url:function(e,t){for(var r=e.regex.exec(t),n=e.url,i=function(e){n=n.replace("$"+e,function(){return r[e]?r[e]:""})},o=0;o<r.length;o++)i(o);return n.replace(/\?$/,"")}(i[0],t)}):null);if(o&&(n.source1=o.url,n.type=o.type,n.allowFullscreen=o.allowFullscreen,n.width=n.width||o.w,n.height=n.height||o.h),n.embed)return W(n.embed,n,!0);var a=A(w(r),n.source1);a&&(n.type="script",n.width=a.width,n.height=a.height);var c,u,s,l,m,d,h,f,p=b(r),g=y(r);return n.width=n.width||300,n.height=n.height||150,v.each(n,function(e,t){n[t]=r.dom.encode(e)}),"iframe"===n.type?(f=(h=n).allowFullscreen?' allowFullscreen="1"':"",'<iframe src="'+h.source1+'" width="'+h.width+'" height="'+h.height+'"'+f+"></iframe>"):"application/x-shockwave-flash"===n.source1mime?(d='<object data="'+(m=n).source1+'" width="'+m.width+'" height="'+m.height+'" type="application/x-shockwave-flash">',m.poster&&(d+='<img src="'+m.poster+'" width="'+m.width+'" height="'+m.height+'" />'),d+="</object>"):-1!==n.source1mime.indexOf("audio")?(s=n,(l=p)?l(s):'<audio controls="controls" src="'+s.source1+'">'+(s.source2?'\n<source src="'+s.source2+'"'+(s.source2mime?' type="'+s.source2mime+'"':"")+" />\n":"")+"</audio>"):"script"===n.type?'<script src="'+n.source1+'"><\/script>':(c=n,(u=g)?u(c):'<video width="'+c.width+'" height="'+c.height+'"'+(c.poster?' poster="'+c.poster+'"':"")+' controls="controls">\n<source src="'+c.source1+'"'+(c.source1mime?' type="'+c.source1mime+'"':"")+" />\n"+(c.source2?'<source src="'+c.source2+'"'+(c.source2mime?' type="'+c.source2mime+'"':"")+" />\n":"")+"</video>")},q={},V=function(t){return function(e){return I(t,e)}},B=function(e,t){var r,n,i,o,a,c=s(e);return c?(i=t,o=V(e),a=c,new F(function(t,e){var r=function(e){return e.html&&(q[i.source1]=e),t({url:i.source1,html:e.html?e.html:o(i)})};q[i.source1]?r(q[i.source1]):a({url:i.source1},r,e)})):(r=t,n=V(e),new F(function(e){e({html:n(r),url:r.source1})}))},G=function(e){return q.hasOwnProperty(e)},K=function(t){return function(e){return e?e.style[t].replace(/px$/,""):""}},Q=function(n){return function(e,t){var r;e&&(e.style[n]=/^[0-9.]+$/.test(r=t)?r+"px":r)}},X={getMaxWidth:K("maxWidth"),getMaxHeight:K("maxHeight"),setMaxWidth:Q("maxWidth"),setMaxHeight:Q("maxHeight")},Y=function(e,t){e.state.set("oldVal",e.value()),t.state.set("oldVal",t.value())},Z=function(e,t){var r=e.find("#width")[0],n=e.find("#height")[0],i=e.find("#constrain")[0];r&&n&&i&&t(r,n,i.checked())},ee=function(e,t,r){var n=e.state.get("oldVal"),i=t.state.get("oldVal"),o=e.value(),a=t.value();r&&n&&i&&o&&a&&(o!==n?(a=Math.round(o/n*a),isNaN(a)||t.value(a)):(o=Math.round(a/i*o),isNaN(o)||e.value(o))),Y(e,t)},te=function(e){Z(e,ee)},re=function(e){var t=function(){e(function(e){te(e)})};return{type:"container",label:"Dimensions",layout:"flex",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:5,onchange:t,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:5,onchange:t,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}},ne=function(e){Z(e,Y)},ie=te,oe=o.ie&&o.ie<=8?"onChange":"onInput",ae=function(r){return function(e){var t=e&&e.msg?"Media embed handler error: "+e.msg:"Media embed handler threw unknown error.";r.notificationManager.open({type:"error",text:t})}},ce=function(i,o){return function(e){var t=e.html,r=i.find("#embed")[0],n=v.extend(P(w(o),t),{source1:e.url});i.fromJSON(n),r&&(r.value(t),ie(i))}},ue=function(e,t){var r=e.dom.select("img[data-mce-object]");e.insertContent(t),function(e,t){var r,n,i=e.dom.select("img[data-mce-object]");for(r=0;r<t.length;r++)for(n=i.length-1;0<=n;n--)t[r]===i[n]&&i.splice(n,1);e.selection.select(i[0])}(e,r),e.nodeChanged()},se=function(n){var i,t,e,r,o,a=[{name:"source1",type:"filepicker",filetype:"media",size:40,autofocus:!0,label:"Source",onpaste:function(){setTimeout(function(){B(n,i.toJSON()).then(ce(i,n))["catch"](ae(n))},1)},onchange:function(e){var r,t;B(n,i.toJSON()).then(ce(i,n))["catch"](ae(n)),r=i,t=e.meta,v.each(t,function(e,t){r.find("#"+t).value(e)})},onbeforecall:function(e){e.meta=i.toJSON()}}],c=[];if(m(n)&&c.push({name:"source2",type:"filepicker",filetype:"media",size:40,label:"Alternative source"}),d(n)&&c.push({name:"poster",type:"filepicker",filetype:"image",size:40,label:"Poster"}),h(n)){var u=re(function(e){e(i),t=i.toJSON(),i.find("#embed").value(W(t.embed,t))});a.push(u)}r=(e=n).selection.getNode(),o=r.getAttribute("data-ephox-embed-iri"),t=o?{source1:o,"data-ephox-embed-iri":o,width:X.getMaxWidth(r),height:X.getMaxHeight(r)}:r.getAttribute("data-mce-object")?P(w(e),e.serializer.serialize(r,{selection:!0})):{};var s={id:"mcemediasource",type:"textbox",flex:1,name:"embed",value:function(e){var t=e.selection.getNode();if(t.getAttribute("data-mce-object")||t.getAttribute("data-ephox-embed-iri"))return e.selection.getContent()}(n),multiline:!0,rows:5,label:"Source"};s[oe]=function(){t=v.extend({},P(w(n),this.value())),this.parent().parent().fromJSON(t)};var l=[{title:"General",type:"form",items:a},{title:"Embed",type:"container",layout:"flex",direction:"column",align:"stretch",padding:10,spacing:10,items:[{type:"label",text:"Paste your embed code below:",forId:"mcemediasource"},s]}];0<c.length&&l.push({title:"Advanced",type:"form",items:c}),i=n.windowManager.open({title:"Insert/edit media",data:t,bodyType:"tabpanel",body:l,onSubmit:function(){var t,e;ie(i),t=n,(e=i.toJSON()).embed=W(e.embed,e),e.embed&&G(e.source1)?ue(t,e.embed):B(t,e).then(function(e){ue(t,e.html)})["catch"](ae(t))}}),ne(i)},le=function(e){return{showDialog:function(){se(e)}}},me=function(e){e.addCommand("mceMedia",function(){se(e)})},de=tinymce.util.Tools.resolve("tinymce.html.Node"),he=function(o,e){if(!1===u(o))return e;var a,c=E();return z({validate:!1,allow_conditional_comments:!1,special:"script,noscript",comment:function(e){c.comment(e)},cdata:function(e){c.cdata(e)},text:function(e,t){c.text(e,t)},start:function(e,t,r){if(a=!0,"script"!==e&&"noscript"!==e&&"svg"!==e){for(var n=t.length-1;0<=n;n--){var i=t[n].name;0===i.indexOf("on")&&(delete t.map[i],t.splice(n,1)),"style"===i&&(t[n].value=o.dom.serializeStyle(o.dom.parseStyle(t[n].value),e))}c.start(e,t,r),a=!1}},end:function(e){a||c.end(e)}},L({})).parse(e),c.getContent()},fe=function(e,t){var r,n=t.name;return(r=new de("img",1)).shortEnded=!0,ge(e,t,r),r.attr({width:t.attr("width")||"300",height:t.attr("height")||("audio"===n?"30":"150"),style:t.attr("style"),src:o.transparentSrc,"data-mce-object":n,"class":"mce-object mce-object-"+n}),r},pe=function(e,t){var r,n,i,o=t.name;return(r=new de("span",1)).attr({contentEditable:"false",style:t.attr("style"),"data-mce-object":o,"class":"mce-preview-object mce-object-"+o}),ge(e,t,r),(n=new de(o,1)).attr({src:t.attr("src"),allowfullscreen:t.attr("allowfullscreen"),style:t.attr("style"),"class":t.attr("class"),width:t.attr("width"),height:t.attr("height"),frameborder:"0"}),(i=new de("span",1)).attr("class","mce-shim"),r.append(n),r.append(i),r},ge=function(e,t,r){var n,i,o,a,c;for(a=(o=t.attributes).length;a--;)n=o[a].name,i=o[a].value,"width"!==n&&"height"!==n&&"style"!==n&&("data"!==n&&"src"!==n||(i=e.convertURL(i,n)),r.attr("data-mce-p-"+n,i));(c=t.firstChild&&t.firstChild.value)&&(r.attr("data-mce-html",escape(he(e,c))),r.firstChild=null)},ve=function(e){for(;e=e.parent;)if(e.attr("data-ephox-embed-iri"))return!0;return!1},we=function(i){return function(e){for(var t,r,n=e.length;n--;)(t=e[n]).parent&&(t.parent.attr("data-mce-object")||("script"!==t.name||(r=A(w(i),t.attr("src"))))&&(r&&(r.width&&t.attr("width",r.width.toString()),r.height&&t.attr("height",r.height.toString())),"iframe"===t.name&&a(i)&&o.ceFalse?ve(t)||t.replace(pe(i,t)):ve(t)||t.replace(fe(i,t))))}},be=function(d){d.on("preInit",function(){var t=d.schema.getSpecialElements();v.each("video audio iframe object".split(" "),function(e){t[e]=new RegExp("</"+e+"[^>]*>","gi")});var r=d.schema.getBoolAttrs();v.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(e){r[e]={}}),d.parser.addNodeFilter("iframe,video,audio,object,embed,script",we(d)),d.serializer.addAttributeFilter("data-mce-object",function(e,t){for(var r,n,i,o,a,c,u,s,l=e.length;l--;)if((r=e[l]).parent){for(u=r.attr(t),n=new de(u,1),"audio"!==u&&"script"!==u&&((s=r.attr("class"))&&-1!==s.indexOf("mce-preview-object")?n.attr({width:r.firstChild.attr("width"),height:r.firstChild.attr("height")}):n.attr({width:r.attr("width"),height:r.attr("height")})),n.attr({style:r.attr("style")}),i=(o=r.attributes).length;i--;){var m=o[i].name;0===m.indexOf("data-mce-p-")&&n.attr(m.substr(11),o[i].value)}"script"===u&&n.attr("type","text/javascript"),(a=r.attr("data-mce-html"))&&((c=new de("#text",3)).raw=!0,c.value=he(d,unescape(a)),n.append(c)),r.replace(n)}})}),d.on("setContent",function(){d.$("span.mce-preview-object").each(function(e,t){var r=d.$(t);0===r.find("span.mce-shim",t).length&&r.append('<span class="mce-shim"></span>')})})},ye=function(e){e.on("ResolveName",function(e){var t;1===e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)})},xe=function(t){t.on("click keyup",function(){var e=t.selection.getNode();e&&t.dom.hasClass(e,"mce-preview-object")&&t.dom.getAttrib(e,"data-mce-selected")&&e.setAttribute("data-mce-selected","2")}),t.on("ObjectSelected",function(e){var t=e.target.getAttribute("data-mce-object");"audio"!==t&&"script"!==t||e.preventDefault()}),t.on("objectResized",function(e){var t,r=e.target;r.getAttribute("data-mce-object")&&(t=r.getAttribute("data-mce-html"))&&(t=unescape(t),r.setAttribute("data-mce-html",escape(W(t,{width:e.width,height:e.height}))))})},Oe=function(e){e.addButton("media",{tooltip:"Insert/edit media",cmd:"mceMedia",stateSelector:["img[data-mce-object]","span[data-mce-object]","div[data-ephox-embed-iri]"]}),e.addMenuItem("media",{icon:"media",text:"Media",cmd:"mceMedia",context:"insert",prependToContext:!0})};i.add("media",function(e){return me(e),Oe(e),ye(e),be(e),xe(e),le(e)})}();
// Source: wp-includes/js/tinymce/plugins/paste/plugin.min.js
!function(v){"use strict";var p=function(t){var e=t,n=function(){return e};return{get:n,set:function(t){e=t},clone:function(){return p(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(t){return!(!/(^|[ ,])powerpaste([, ]|$)/.test(t.settings.plugins)||!e.get("powerpaste")||("undefined"!=typeof v.window.console&&v.window.console.log&&v.window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),0))},u=function(t,e){return{clipboard:t,quirks:e}},d=function(t,e,n,r){return t.fire("PastePreProcess",{content:e,internal:n,wordContent:r})},m=function(t,e,n,r){return t.fire("PastePostProcess",{node:e,internal:n,wordContent:r})},s=function(t,e){return t.fire("PastePlainTextToggle",{state:e})},n=function(t,e){return t.fire("paste",{ieFake:e})},g={shouldPlainTextInform:function(t){return t.getParam("paste_plaintext_inform",!0)},shouldBlockDrop:function(t){return t.getParam("paste_block_drop",!1)},shouldPasteDataImages:function(t){return t.getParam("paste_data_images",!1)},shouldFilterDrop:function(t){return t.getParam("paste_filter_drop",!0)},getPreProcess:function(t){return t.getParam("paste_preprocess")},getPostProcess:function(t){return t.getParam("paste_postprocess")},getWebkitStyles:function(t){return t.getParam("paste_webkit_styles")},shouldRemoveWebKitStyles:function(t){return t.getParam("paste_remove_styles_if_webkit",!0)},shouldMergeFormats:function(t){return t.getParam("paste_merge_formats",!0)},isSmartPasteEnabled:function(t){return t.getParam("smart_paste",!0)},isPasteAsTextEnabled:function(t){return t.getParam("paste_as_text",!1)},getRetainStyleProps:function(t){return t.getParam("paste_retain_style_properties")},getWordValidElements:function(t){return t.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody")},shouldConvertWordFakeLists:function(t){return t.getParam("paste_convert_word_fake_lists",!0)},shouldUseDefaultFilters:function(t){return t.getParam("paste_enable_default_filters",!0)}},r=function(t,e,n){var r,o,i;"text"===e.pasteFormat.get()?(e.pasteFormat.set("html"),s(t,!1)):(e.pasteFormat.set("text"),s(t,!0),i=t,!1===n.get()&&g.shouldPlainTextInform(i)&&(o="Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.",(r=t).notificationManager.open({text:r.translate(o),type:"info"}),n.set(!0))),t.focus()},c=function(t,n,e){t.addCommand("mceTogglePlainTextPaste",function(){r(t,n,e)}),t.addCommand("mceInsertClipboardContent",function(t,e){e.content&&n.pasteHtml(e.content,e.internal),e.text&&n.pasteText(e.text)})},h=tinymce.util.Tools.resolve("tinymce.Env"),y=tinymce.util.Tools.resolve("tinymce.util.Delay"),b=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=tinymce.util.Tools.resolve("tinymce.util.VK"),t="x-tinymce/html",i="\x3c!-- "+t+" --\x3e",l=function(t){return i+t},f=function(t){return t.replace(i,"")},w=function(t){return-1!==t.indexOf(i)},x=function(){return t},_=tinymce.util.Tools.resolve("tinymce.html.Entities"),P=function(t){return t.replace(/\r?\n/g,"<br>")},T=function(t,e,n){var r=t.split(/\n\n/),o=function(t,e){var n,r=[],o="<"+t;if("object"==typeof e){for(n in e)e.hasOwnProperty(n)&&r.push(n+'="'+_.encodeAllRaw(e[n])+'"');r.length&&(o+=" "+r.join(" "))}return o+">"}(e,n),i="</"+e+">",a=b.map(r,function(t){return t.split(/\n/).join("<br />")});return 1===a.length?a[0]:b.map(a,function(t){return o+t+i}).join("")},D=function(t){return!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(t)},C=function(t,e,n){return e?T(t,e,n):P(t)},k=tinymce.util.Tools.resolve("tinymce.html.DomParser"),F=tinymce.util.Tools.resolve("tinymce.html.Serializer"),E=tinymce.util.Tools.resolve("tinymce.html.Node"),R=tinymce.util.Tools.resolve("tinymce.html.Schema");function I(e,t){return b.each(t,function(t){e=t.constructor===RegExp?e.replace(t,""):e.replace(t[0],t[1])}),e}var O={filter:I,innerText:function(e){var n=R(),r=k({},n),o="",i=n.getShortEndedElements(),a=b.makeMap("script noscript style textarea video audio iframe object"," "),u=n.getBlockElements();return e=I(e,[/<!\[[^\]]+\]>/g]),function t(e){var n=e.name,r=e;if("br"!==n){if("wbr"!==n)if(i[n]&&(o+=" "),a[n])o+=" ";else{if(3===e.type&&(o+=e.value),!e.shortEnded&&(e=e.firstChild))for(;t(e),e=e.next;);u[n]&&r.next&&(o+="\n","p"===n&&(o+="\n"))}}else o+="\n"}(r.parse(e)),o},trimHtml:function(t){return t=I(t,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function(t,e,n){return e||n?"\xa0":" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])},createIdGenerator:function(t){var e=0;return function(){return t+e++}},isMsEdge:function(){return-1!==v.navigator.userAgent.indexOf(" Edge/")}};function S(e){var n,t;return t=[/^[IVXLMCD]{1,2}\.[ \u00a0]/,/^[ivxlmcd]{1,2}\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],e=e.replace(/^[\u00a0 ]+/,""),b.each(t,function(t){if(t.test(e))return!(n=!0)}),n}function A(t){var i,a,u=1;function n(t){var e="";if(3===t.type)return t.value;if(t=t.firstChild)for(;e+=n(t),t=t.next;);return e}function s(t,e){if(3===t.type&&e.test(t.value))return t.value=t.value.replace(e,""),!1;if(t=t.firstChild)do{if(!s(t,e))return!1}while(t=t.next);return!0}function e(e,n,r){var o=e._listLevel||u;o!==u&&(o<u?i&&(i=i.parent.parent):(a=i,i=null)),i&&i.name===n?i.append(e):(a=a||i,i=new E(n,1),1<r&&i.attr("start",""+r),e.wrap(i)),e.name="li",u<o&&a&&a.lastChild.append(i),u=o,function t(e){if(e._listIgnore)e.remove();else if(e=e.firstChild)for(;t(e),e=e.next;);}(e),s(e,/^\u00a0+/),s(e,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),s(e,/^\u00a0+/)}for(var r=[],o=t.firstChild;null!=o;)if(r.push(o),null!==(o=o.walk()))for(;void 0!==o&&o.parent!==t;)o=o.walk();for(var c=0;c<r.length;c++)if("p"===(t=r[c]).name&&t.firstChild){var l=n(t);if(/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(l)){e(t,"ul");continue}if(S(l)){var f=/([0-9]+)\./.exec(l),d=1;f&&(d=parseInt(f[1],10)),e(t,"ol",d);continue}if(t._listLevel){e(t,"ul",1);continue}i=null}else a=i,i=null}function j(n,r,o,i){var a,u={},t=n.dom.parseStyle(i);return b.each(t,function(t,e){switch(e){case"mso-list":(a=/\w+ \w+([0-9]+)/i.exec(i))&&(o._listLevel=parseInt(a[1],10)),/Ignore/i.test(t)&&o.firstChild&&(o._listIgnore=!0,o.firstChild._listIgnore=!0);break;case"horiz-align":e="text-align";break;case"vert-align":e="vertical-align";break;case"font-color":case"mso-foreground":e="color";break;case"mso-background":case"mso-highlight":e="background";break;case"font-weight":case"font-style":return void("normal"!==t&&(u[e]=t));case"mso-element":if(/^(comment|comment-list)$/i.test(t))return void o.remove()}0!==e.indexOf("mso-comment")?0!==e.indexOf("mso-")&&("all"===g.getRetainStyleProps(n)||r&&r[e])&&(u[e]=t):o.remove()}),/(bold)/i.test(u["font-weight"])&&(delete u["font-weight"],o.wrap(new E("b",1))),/(italic)/i.test(u["font-style"])&&(delete u["font-style"],o.wrap(new E("i",1))),(u=n.dom.serializeStyle(u,o.name))||null}var M,L,N,B,H,$,W,U,z,V={preProcess:function(t,e){return g.shouldUseDefaultFilters(t)?function(r,t){var e,o;(e=g.getRetainStyleProps(r))&&(o=b.makeMap(e.split(/[, ]/))),t=O.filter(t,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi,"\xa0"],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(t,e){return 0<e.length?e.replace(/./," ").slice(Math.floor(e.length/2)).split("").join("\xa0"):""}]]);var n=g.getWordValidElements(r),i=R({valid_elements:n,valid_children:"-li[p]"});b.each(i.elements,function(t){t.attributes["class"]||(t.attributes["class"]={},t.attributesOrder.push("class")),t.attributes.style||(t.attributes.style={},t.attributesOrder.push("style"))});var a=k({},i);a.addAttributeFilter("style",function(t){for(var e,n=t.length;n--;)(e=t[n]).attr("style",j(r,o,e,e.attr("style"))),"span"===e.name&&e.parent&&!e.attributes.length&&e.unwrap()}),a.addAttributeFilter("class",function(t){for(var e,n,r=t.length;r--;)n=(e=t[r]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&e.remove(),e.attr("class",null)}),a.addNodeFilter("del",function(t){for(var e=t.length;e--;)t[e].remove()}),a.addNodeFilter("a",function(t){for(var e,n,r,o=t.length;o--;)if(n=(e=t[o]).attr("href"),r=e.attr("name"),n&&-1!==n.indexOf("#_msocom_"))e.remove();else if(n&&0===n.indexOf("file://")&&(n=n.split("#")[1])&&(n="#"+n),n||r){if(r&&!/^_?(?:toc|edn|ftn)/i.test(r)){e.unwrap();continue}e.attr({href:n,name:r})}else e.unwrap()});var u=a.parse(t);return g.shouldConvertWordFakeLists(r)&&A(u),t=F({validate:r.settings.validate},i).serialize(u)}(t,e):e},isWordContent:function(t){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(t)||/class="OutlineElement/.test(t)||/id="?docs\-internal\-guid\-/.test(t)}},K=function(t,e){return{content:t,cancelled:e}},q=function(t,e,n,r){var o,i,a,u,s,c,l=d(t,e,n,r),f=function(t,e){var n=k({},t.schema);n.addNodeFilter("meta",function(t){b.each(t,function(t){return t.remove()})});var r=n.parse(e,{forced_root_block:!1,isRootContent:!0});return F({validate:t.settings.validate},t.schema).serialize(r)}(t,l.content);return t.hasEventListeners("PastePostProcess")&&!l.isDefaultPrevented()?(i=f,a=n,u=r,s=(o=t).dom.create("div",{style:"display:none"},i),c=m(o,s,a,u),K(c.node.innerHTML,c.isDefaultPrevented())):K(f,l.isDefaultPrevented())},G=function(t,e,n){var r=V.isWordContent(e),o=r?V.preProcess(t,e):e;return q(t,o,n,r)},X=function(t,e){return t.insertContent(e,{merge:g.shouldMergeFormats(t),paste:!0}),!0},Y=function(t){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(t)},Z=function(t){return Y(t)&&/.(gif|jpe?g|png)$/.test(t)},J=function(t,e,n){return!(!1!==t.selection.isCollapsed()||!Y(e)||(o=e,i=n,(r=t).undoManager.extra(function(){i(r,o)},function(){r.execCommand("mceInsertLink",!1,o)}),0));var r,o,i},Q=function(t,e,n){return!!Z(e)&&(o=e,i=n,(r=t).undoManager.extra(function(){i(r,o)},function(){r.insertContent('<img src="'+o+'">')}),!0);var r,o,i},tt=function(t,e){var n,r;!1===g.isSmartPasteEnabled(t)?X(t,e):(n=t,r=e,b.each([J,Q,X],function(t){return!0!==t(n,r,X)}))},et=function(){},nt=function(t){return function(){return t}},rt=nt(!1),ot=nt(!0),it=function(){return at},at=(M=function(t){return t.isNone()},B={fold:function(t,e){return t()},is:rt,isSome:rt,isNone:ot,getOr:N=function(t){return t},getOrThunk:L=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:nt(null),getOrUndefined:nt(undefined),or:N,orThunk:L,map:it,each:et,bind:it,exists:rt,forall:ot,filter:it,equals:M,equals_:M,toArray:function(){return[]},toString:nt("none()")},Object.freeze&&Object.freeze(B),B),ut=function(n){var t=nt(n),e=function(){return o},r=function(t){return t(n)},o={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:ot,isNone:rt,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){return ut(t(n))},each:function(t){t(n)},bind:r,exists:r,forall:r,filter:function(t){return t(n)?o:at},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(rt,function(t){return e(n,t)})}};return o},st={some:ut,none:it,from:function(t){return null===t||t===undefined?at:ut(t)}},ct=(H="function",function(t){return function(t){if(null===t)return"null";var e=typeof t;return"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e}(t)===H}),lt=Array.prototype.slice,ft=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},dt=function(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n)},mt=ct(Array.from)?Array.from:function(t){return lt.call(t)},pt={},gt={exports:pt};$=undefined,W=pt,U=gt,z=undefined,function(t){"object"==typeof W&&void 0!==U?U.exports=t():"function"==typeof $&&$.amd?$([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=t()}(function(){return function i(a,u,s){function c(e,t){if(!u[e]){if(!a[e]){var n="function"==typeof z&&z;if(!t&&n)return n(e,!0);if(l)return l(e,!0);var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}var o=u[e]={exports:{}};a[e][0].call(o.exports,function(t){return c(a[e][1][t]||t)},o,o.exports,i,a,u,s)}return u[e].exports}for(var l="function"==typeof z&&z,t=0;t<s.length;t++)c(s[t]);return c}({1:[function(t,e,n){var r,o,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(t){r=a}try{o="function"==typeof clearTimeout?clearTimeout:u}catch(t){o=u}}();var c,l=[],f=!1,d=-1;function m(){f&&c&&(f=!1,c.length?l=c.concat(l):d=-1,l.length&&p())}function p(){if(!f){var t=s(m);f=!0;for(var e=l.length;e;){for(c=l,l=[];++d<e;)c&&c[d].run();d=-1,e=l.length}c=null,f=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===u||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(t)}}function g(t,e){this.fun=t,this.array=e}function v(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new g(t,e)),1!==l.length||f||s(p)},g.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(t,f,e){(function(n){!function(t){var e=setTimeout;function r(){}function a(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],l(t,this)}function o(r,o){for(;3===r._state;)r=r._value;0!==r._state?(r._handled=!0,a._immediateFn(function(){var t=1===r._state?o.onFulfilled:o.onRejected;if(null!==t){var e;try{e=t(r._value)}catch(n){return void u(o.promise,n)}i(o.promise,e)}else(1===r._state?i:u)(o.promise,r._value)})):r._deferreds.push(o)}function i(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof a)return t._state=3,t._value=e,void s(t);if("function"==typeof n)return void l((r=n,o=e,function(){r.apply(o,arguments)}),t)}t._state=1,t._value=e,s(t)}catch(i){u(t,i)}var r,o}function u(t,e){t._state=2,t._value=e,s(t)}function s(t){2===t._state&&0===t._deferreds.length&&a._immediateFn(function(){t._handled||a._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e<n;e++)o(t,t._deferreds[e]);t._deferreds=null}function c(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function l(t,e){var n=!1;try{t(function(t){n||(n=!0,i(e,t))},function(t){n||(n=!0,u(e,t))})}catch(r){if(n)return;n=!0,u(e,r)}}a.prototype["catch"]=function(t){return this.then(null,t)},a.prototype.then=function(t,e){var n=new this.constructor(r);return o(this,new c(t,e,n)),n},a.all=function(t){var s=Array.prototype.slice.call(t);return new a(function(o,i){if(0===s.length)return o([]);var a=s.length;function u(e,t){try{if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void n.call(t,function(t){u(e,t)},i)}s[e]=t,0==--a&&o(s)}catch(r){i(r)}}for(var t=0;t<s.length;t++)u(t,s[t])})},a.resolve=function(e){return e&&"object"==typeof e&&e.constructor===a?e:new a(function(t){t(e)})},a.reject=function(n){return new a(function(t,e){e(n)})},a.race=function(o){return new a(function(t,e){for(var n=0,r=o.length;n<r;n++)o[n].then(t,e)})},a._immediateFn="function"==typeof n?function(t){n(t)}:function(t){e(t,0)},a._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},a._setImmediateFn=function(t){a._immediateFn=t},a._setUnhandledRejectionFn=function(t){a._unhandledRejectionFn=t},void 0!==f&&f.exports?f.exports=a:t.Promise||(t.Promise=a)}(this)}).call(this,t("timers").setImmediate)},{timers:3}],3:[function(s,t,c){(function(t,e){var r=s("process/browser.js").nextTick,n=Function.prototype.apply,o=Array.prototype.slice,i={},a=0;function u(t,e){this._id=t,this._clearFn=e}c.setTimeout=function(){return new u(n.call(setTimeout,window,arguments),clearTimeout)},c.setInterval=function(){return new u(n.call(setInterval,window,arguments),clearInterval)},c.clearTimeout=c.clearInterval=function(t){t.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id)},c.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},c.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},c._unrefActive=c.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;0<=e&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},c.setImmediate="function"==typeof t?t:function(t){var e=a++,n=!(arguments.length<2)&&o.call(arguments,1);return i[e]=!0,r(function(){i[e]&&(n?t.apply(null,n):t.call(null),c.clearImmediate(e))}),e},c.clearImmediate="function"==typeof e?e:function(t){delete i[t]}}).call(this,s("timers").setImmediate,s("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(t,e,n){var r=t("promise-polyfill"),o="undefined"!=typeof window?window:Function("return this;")();e.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)});var vt=gt.exports.boltExport,ht=function(t){var n=st.none(),e=[],r=function(t){o()?a(t):e.push(t)},o=function(){return n.isSome()},i=function(t){dt(t,a)},a=function(e){n.each(function(t){v.setTimeout(function(){e(t)},0)})};return t(function(t){n=st.some(t),i(e),e=[]}),{get:r,map:function(n){return ht(function(e){r(function(t){e(n(t))})})},isReady:o}},yt={nu:ht,pure:function(e){return ht(function(t){t(e)})}},bt=function(t){v.setTimeout(function(){throw t},0)},wt=function(n){var t=function(t){n().then(t,bt)};return{map:function(t){return wt(function(){return n().then(t)})},bind:function(e){return wt(function(){return n().then(function(t){return e(t).toPromise()})})},anonBind:function(t){return wt(function(){return n().then(function(){return t.toPromise()})})},toLazy:function(){return yt.nu(t)},toCached:function(){var t=null;return wt(function(){return null===t&&(t=n()),t})},toPromise:n,get:t}},xt=function(t){return wt(function(){return new vt(t)})},_t=function(a,t){return t(function(r){var o=[],i=0;0===a.length?r([]):dt(a,function(t,e){var n;t.get((n=e,function(t){o[n]=t,++i>=a.length&&r(o)}))})})},Pt=function(t,e){return n=ft(t,e),_t(n,xt);var n},Tt=function(t,e,n){var r=n||w(e),o=G(t,f(e),r);!1===o.cancelled&&tt(t,o.content)},Dt=function(t,e){e=t.dom.encode(e).replace(/\r\n/g,"\n"),e=C(e,t.settings.forced_root_block,t.settings.forced_root_block_attrs),Tt(t,e,!1)},Ct=function(t){var e={};if(t){if(t.getData){var n=t.getData("Text");n&&0<n.length&&-1===n.indexOf("data:text/mce-internal,")&&(e["text/plain"]=n)}if(t.types)for(var r=0;r<t.types.length;r++){var o=t.types[r];try{e[o]=t.getData(o)}catch(i){e[o]=""}}}return e},kt=function(t,e){return e in t&&0<t[e].length},Ft=function(t){return kt(t,"text/html")||kt(t,"text/plain")},Et=O.createIdGenerator("mceclip"),Rt=function(e,t,n){var r,o,i,a,u="paste"===t.type?t.clipboardData:t.dataTransfer;if(e.settings.paste_data_images&&u){var s=(i=(o=u).items?ft(mt(o.items),function(t){return t.getAsFile()}):[],a=o.files?mt(o.files):[],function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n}(0<i.length?i:a,function(t){return/^image\/(jpeg|png|gif|bmp)$/.test(t.type)}));if(0<s.length)return t.preventDefault(),(r=s,Pt(r,function(r){return xt(function(t){var e=r.getAsFile?r.getAsFile():r,n=new window.FileReader;n.onload=function(){t({blob:e,uri:n.result})},n.readAsDataURL(e)})})).get(function(t){n&&e.selection.setRng(n),dt(t,function(t){!function(t,e){var n,r,o,i,a,u,s,c=(n=e.uri,-1!==(r=n.indexOf(","))?n.substr(r+1):null),l=Et(),f=t.settings.images_reuse_filename&&e.blob.name?(o=t,i=e.blob.name,(a=i.match(/([\s\S]+?)\.(?:jpeg|jpg|png|gif)$/i))?o.dom.encode(a[1]):null):l,d=new v.Image;if(d.src=e.uri,u=t.settings,s=d,!u.images_dataimg_filter||u.images_dataimg_filter(s)){var m,p=t.editorUpload.blobCache,g=void 0;(m=p.findFirst(function(t){return t.base64()===c}))?g=m:(g=p.create(l,e.blob,c,f),p.add(g)),Tt(t,'<img src="'+g.blobUri()+'">',!1)}else Tt(t,'<img src="'+e.uri+'">',!1)}(e,t)})}),!0}return!1},It=function(t){return o.metaKeyPressed(t)&&86===t.keyCode||t.shiftKey&&45===t.keyCode},Ot=function(s,c,l){var e,f,d=(e=p(st.none()),{clear:function(){e.set(st.none())},set:function(t){e.set(st.some(t))},isSet:function(){return e.get().isSome()},on:function(t){e.get().each(t)}});function m(t,e,n,r){var o,i;kt(t,"text/html")?o=t["text/html"]:(o=c.getHtml(),r=r||w(o),c.isDefaultContent(o)&&(n=!0)),o=O.trimHtml(o),c.remove(),i=!1===r&&D(o),o.length&&!i||(n=!0),n&&(o=kt(t,"text/plain")&&i?t["text/plain"]:O.innerText(o)),c.isDefaultContent(o)?e||s.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):n?Dt(s,o):Tt(s,o,r)}s.on("keydown",function(t){function e(t){It(t)&&!t.isDefaultPrevented()&&c.remove()}if(It(t)&&!t.isDefaultPrevented()){if((f=t.shiftKey&&86===t.keyCode)&&h.webkit&&-1!==v.navigator.userAgent.indexOf("Version/"))return;if(t.stopImmediatePropagation(),d.set(t),window.setTimeout(function(){d.clear()},100),h.ie&&f)return t.preventDefault(),void n(s,!0);c.remove(),c.create(),s.once("keyup",e),s.once("paste",function(){s.off("keyup",e)})}}),s.on("paste",function(t){var e,n,r,o=d.isSet(),i=(e=s,n=Ct(t.clipboardData||e.getDoc().dataTransfer),O.isMsEdge()?b.extend(n,{"text/html":""}):n),a="text"===l.get()||f,u=kt(i,x());f=!1,t.isDefaultPrevented()||(r=t.clipboardData,-1!==v.navigator.userAgent.indexOf("Android")&&r&&r.items&&0===r.items.length)?c.remove():Ft(i)||!Rt(s,t,c.getLastRng()||s.selection.getRng())?(o||t.preventDefault(),!h.ie||o&&!t.ieFake||kt(i,"text/html")||(c.create(),s.dom.bind(c.getEl(),"paste",function(t){t.stopPropagation()}),s.getDoc().execCommand("Paste",!1,null),i["text/html"]=c.getHtml()),kt(i,"text/html")?(t.preventDefault(),u||(u=w(i["text/html"])),m(i,o,a,u)):y.setEditorTimeout(s,function(){m(i,o,a,u)},0)):c.remove()})},St=function(t){return h.ie&&t.inline?v.document.body:t.getBody()},At=function(e,t,n){var r;St(r=e)!==r.getBody()&&e.dom.bind(t,"paste keyup",function(t){Lt(e,n)||e.fire("paste")})},jt=function(t){return t.dom.get("mcepastebin")},Mt=function(t,e){return e===t},Lt=function(t,e){var n,r=jt(t);return(n=r)&&"mcepastebin"===n.id&&Mt(e,r.innerHTML)},Nt=function(a){var u=p(null),s="%MCEPASTEBIN%";return{create:function(){return e=u,n=s,o=(t=a).dom,i=t.getBody(),e.set(t.selection.getRng()),r=t.dom.add(St(t),"div",{id:"mcepastebin","class":"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},n),(h.ie||h.gecko)&&o.setStyle(r,"left","rtl"===o.getStyle(i,"direction",!0)?65535:-65535),o.bind(r,"beforedeactivate focusin focusout",function(t){t.stopPropagation()}),At(t,r,n),r.focus(),void t.selection.select(r,!0);var t,e,n,r,o,i},remove:function(){return function(t,e){if(jt(t)){for(var n=void 0,r=e.get();n=t.dom.get("mcepastebin");)t.dom.remove(n),t.dom.unbind(n);r&&t.selection.setRng(r)}e.set(null)}(a,u)},getEl:function(){return jt(a)},getHtml:function(){return function(n){var e,t,r,o,i,a=function(t,e){t.appendChild(e),n.dom.remove(e,!0)};for(t=b.grep(St(n).childNodes,function(t){return"mcepastebin"===t.id}),e=t.shift(),b.each(t,function(t){a(e,t)}),r=(o=n.dom.select("div[id=mcepastebin]",e)).length-1;0<=r;r--)i=n.dom.create("div"),e.insertBefore(i,o[r]),a(i,o[r]);return e?e.innerHTML:""}(a)},getLastRng:function(){return u.get()},isDefault:function(){return Lt(a,s)},isDefaultContent:function(t){return Mt(s,t)}}},Bt=function(n,t){var e=Nt(n);return n.on("preInit",function(){return Ot(a=n,e,t),void a.parser.addNodeFilter("img",function(t,e,n){var r,o=function(t){t.attr("data-mce-object")||u===h.transparentSrc||t.remove()};if(!a.settings.paste_data_images&&(r=n).data&&!0===r.data.paste)for(var i=t.length;i--;)(u=t[i].attributes.map.src)&&(0===u.indexOf("webkit-fake-url")?o(t[i]):a.settings.allow_html_data_urls||0!==u.indexOf("data:")||o(t[i]))});var a,u}),{pasteFormat:t,pasteHtml:function(t,e){return Tt(n,t,e)},pasteText:function(t){return Dt(n,t)},pasteImageData:function(t,e){return Rt(n,t,e)},getDataTransferItems:Ct,hasHtmlOrText:Ft,hasContentType:kt}},Ht=function(){},$t=function(t,e,n){if(r=t,!1!==h.iOS||r===undefined||"function"!=typeof r.setData||!0===O.isMsEdge())return!1;try{return t.clearData(),t.setData("text/html",e),t.setData("text/plain",n),t.setData(x(),e),!0}catch(o){return!1}var r},Wt=function(t,e,n,r){$t(t.clipboardData,e.html,e.text)?(t.preventDefault(),r()):n(e.html,r)},Ut=function(u){return function(t,e){var n=l(t),r=u.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),o=u.dom.create("div",{contenteditable:"true"},n);u.dom.setStyles(r,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),r.appendChild(o),u.dom.add(u.getBody(),r);var i=u.selection.getRng();o.focus();var a=u.dom.createRng();a.selectNodeContents(o),u.selection.setRng(a),setTimeout(function(){u.selection.setRng(i),r.parentNode.removeChild(r),e()},0)}},zt=function(t){return{html:t.selection.getContent({contextual:!0}),text:t.selection.getContent({format:"text"})}},Vt=function(t){return!t.selection.isCollapsed()||!!(e=t).dom.getParent(e.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",e.getBody());var e},Kt=function(t){var e,n;t.on("cut",(e=t,function(t){Vt(e)&&Wt(t,zt(e),Ut(e),function(){setTimeout(function(){e.execCommand("Delete")},0)})})),t.on("copy",(n=t,function(t){Vt(n)&&Wt(t,zt(n),Ut(n),Ht)}))},qt=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),Gt=function(t,e){return qt.getCaretRangeFromPoint(e.clientX,e.clientY,t.getDoc())},Xt=function(t,e){t.focus(),t.selection.setRng(e)},Yt=function(a,u,s){g.shouldBlockDrop(a)&&a.on("dragend dragover draggesture dragdrop drop drag",function(t){t.preventDefault(),t.stopPropagation()}),g.shouldPasteDataImages(a)||a.on("drop",function(t){var e=t.dataTransfer;e&&e.files&&0<e.files.length&&t.preventDefault()}),a.on("drop",function(t){var e,n;if(n=Gt(a,t),!t.isDefaultPrevented()&&!s.get()){e=u.getDataTransferItems(t.dataTransfer);var r,o=u.hasContentType(e,x());if((u.hasHtmlOrText(e)&&(!(r=e["text/plain"])||0!==r.indexOf("file://"))||!u.pasteImageData(t,n))&&n&&g.shouldFilterDrop(a)){var i=e["mce-internal"]||e["text/html"]||e["text/plain"];i&&(t.preventDefault(),y.setEditorTimeout(a,function(){a.undoManager.transact(function(){e["mce-internal"]&&a.execCommand("Delete"),Xt(a,n),i=O.trimHtml(i),e["text/html"]?u.pasteHtml(i,o):u.pasteText(i)})}))}}}),a.on("dragstart",function(t){s.set(!0)}),a.on("dragover dragend",function(t){g.shouldPasteDataImages(a)&&!1===s.get()&&(t.preventDefault(),Xt(a,Gt(a,t))),"dragend"===t.type&&s.set(!1)})},Zt=function(t){var e=t.plugins.paste,n=g.getPreProcess(t);n&&t.on("PastePreProcess",function(t){n.call(e,e,t)});var r=g.getPostProcess(t);r&&t.on("PastePostProcess",function(t){r.call(e,e,t)})};function Jt(e,n){e.on("PastePreProcess",function(t){t.content=n(e,t.content,t.internal,t.wordContent)})}function Qt(t,e){if(!V.isWordContent(e))return e;var n=[];b.each(t.schema.getBlockElements(),function(t,e){n.push(e)});var r=new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+n.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g");return e=O.filter(e,[[r,"$1"]]),e=O.filter(e,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function te(t,e,n,r){if(r||n)return e;var c,o=g.getWebkitStyles(t);if(!1===g.shouldRemoveWebKitStyles(t)||"all"===o)return e;if(o&&(c=o.split(/[, ]/)),c){var l=t.dom,f=t.selection.getNode();e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(t,e,n,r){var o=l.parseStyle(l.decode(n)),i={};if("none"===c)return e+r;for(var a=0;a<c.length;a++){var u=o[c[a]],s=l.getStyle(f,c[a],!0);/color/.test(c[a])&&(u=l.toHex(u),s=l.toHex(s)),s!==u&&(i[c[a]]=u)}return(i=l.serializeStyle(i,"span"))?e+' style="'+i+'"'+r:e+r})}else e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return e=e.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(t,e,n,r){return e+' style="'+n+'"'+r})}function ee(n,t){n.$("a",t).find("font,u").each(function(t,e){n.dom.remove(e,!0)})}var ne=function(t){var e,n;h.webkit&&Jt(t,te),h.ie&&(Jt(t,Qt),n=ee,(e=t).on("PastePostProcess",function(t){n(e,t.node)}))},re=function(t,e,n){var r=n.control;r.active("text"===e.pasteFormat.get()),t.on("PastePlainTextToggle",function(t){r.active(t.state)})},oe=function(t,e){var n=function(r){for(var o=[],t=1;t<arguments.length;t++)o[t-1]=arguments[t];return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=o.concat(t);return r.apply(null,n)}}(re,t,e);t.addButton("pastetext",{active:!1,icon:"pastetext",tooltip:"Paste as text",cmd:"mceTogglePlainTextPaste",onPostRender:n}),t.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:e.pasteFormat,cmd:"mceTogglePlainTextPaste",onPostRender:n})};e.add("paste",function(t){if(!1===a(t)){var e=p(!1),n=p(!1),r=p(g.isPasteAsTextEnabled(t)?"text":"html"),o=Bt(t,r),i=ne(t);return oe(t,o),c(t,o,e),Zt(t),Kt(t),Yt(t,o,n),u(o,i)}})}(window);
// Source: wp-includes/js/tinymce/plugins/tabfocus/plugin.min.js
!function(c){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),s=tinymce.util.Tools.resolve("tinymce.EditorManager"),a=tinymce.util.Tools.resolve("tinymce.Env"),y=tinymce.util.Tools.resolve("tinymce.util.Delay"),f=tinymce.util.Tools.resolve("tinymce.util.Tools"),d=tinymce.util.Tools.resolve("tinymce.util.VK"),m=function(e){return e.getParam("tab_focus",e.getParam("tabfocus_elements",":prev,:next"))},v=t.DOM,n=function(e){e.keyCode!==d.TAB||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()},i=function(r){function e(n){var i,o,e,l;if(!(n.keyCode!==d.TAB||n.ctrlKey||n.altKey||n.metaKey||n.isDefaultPrevented())&&(1===(e=f.explode(m(r))).length&&(e[1]=e[0],e[0]=":prev"),o=n.shiftKey?":prev"===e[0]?u(-1):v.get(e[0]):":next"===e[1]?u(1):v.get(e[1]))){var t=s.get(o.id||o.name);o.id&&t?t.focus():y.setTimeout(function(){a.webkit||c.window.focus(),o.focus()},10),n.preventDefault()}function u(e){function t(t){return/INPUT|TEXTAREA|BUTTON/.test(t.tagName)&&s.get(n.id)&&-1!==t.tabIndex&&function e(t){return"BODY"===t.nodeName||"hidden"!==t.type&&"none"!==t.style.display&&"hidden"!==t.style.visibility&&e(t.parentNode)}(t)}if(o=v.select(":input:enabled,*[tabindex]:not(iframe)"),f.each(o,function(e,t){if(e.id===r.id)return i=t,!1}),0<e){for(l=i+1;l<o.length;l++)if(t(o[l]))return o[l]}else for(l=i-1;0<=l;l--)if(t(o[l]))return o[l];return null}}r.on("init",function(){r.inline&&v.setAttrib(r.getBody(),"tabIndex",null),r.on("keyup",n),a.gecko?r.on("keypress keydown",e):r.on("keydown",e)})};e.add("tabfocus",function(e){i(e)})}(window);
// Source: wp-includes/js/tinymce/plugins/textcolor/plugin.min.js
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(t,o){var r;return t.dom.getParents(t.selection.getStart(),function(t){var e;(e=t.style["forecolor"===o?"color":"background-color"])&&(r=r||e)}),r},g=function(t){var e,o=[];for(e=0;e<t.length;e+=2)o.push({text:t[e+1],color:"#"+t[e]});return o},r=function(t,e,o){t.undoManager.transact(function(){t.focus(),t.formatter.apply(e,{value:o}),t.nodeChanged()})},e=function(t,e){t.undoManager.transact(function(){t.focus(),t.formatter.remove(e,{value:null},null,!0),t.nodeChanged()})},o=function(o){o.addCommand("mceApplyTextcolor",function(t,e){r(o,t,e)}),o.addCommand("mceRemoveTextcolor",function(t){e(o,t)})},F=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","FFFFFF","White","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum"],l=function(t){return t.getParam("textcolor_map",a)},c=function(t){return t.getParam("textcolor_rows",5)},u=function(t){return t.getParam("textcolor_cols",8)},m=function(t){return t.getParam("color_picker_callback",null)},s=function(t){return t.getParam("forecolor_map",l(t))},d=function(t){return t.getParam("backcolor_map",l(t))},f=function(t){return t.getParam("forecolor_rows",c(t))},b=function(t){return t.getParam("backcolor_rows",c(t))},p=function(t){return t.getParam("forecolor_cols",u(t))},C=function(t){return t.getParam("backcolor_cols",u(t))},y=m,v=function(t){return"function"==typeof m(t)},h=tinymce.util.Tools.resolve("tinymce.util.I18n"),P=function(t,e,o,r){var n,a,l,c,i,u,m,s=0,d=F.DOM.uniqueId("mcearia"),f=function(t,e){var o="transparent"===t;return'<td class="mce-grid-cell'+(o?" mce-colorbtn-trans":"")+'"><div id="'+d+"-"+s+++'" data-mce-color="'+(t||"")+'" role="option" tabIndex="-1" style="'+(t?"background-color: "+t:"")+'" title="'+h.translate(e)+'">'+(o?"&#215;":"")+"</div></td>"};for((n=g(o)).push({text:h.translate("No color"),color:"transparent"}),l='<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="list" cellspacing="0"><tbody>',c=n.length-1,u=0;u<e;u++){for(l+="<tr>",i=0;i<t;i++)l+=c<(m=u*t+i)?"<td></td>":f((a=n[m]).color,a.text);l+="</tr>"}if(r){for(l+='<tr><td colspan="'+t+'" class="mce-custom-color-btn"><div id="'+d+'-c" class="mce-widget mce-btn mce-btn-small mce-btn-flat" role="button" tabindex="-1" aria-labelledby="'+d+'-c" style="width: 100%"><button type="button" role="presentation" tabindex="-1">'+h.translate("Custom...")+"</button></div></td></tr>",l+="<tr>",i=0;i<t;i++)l+=f("","Custom color");l+="</tr>"}return l+="</tbody></table>"},k=function(t,e){t.style.background=e,t.setAttribute("data-mce-color",e)},x=function(o){return function(t){var e=t.control;e._color?o.execCommand("mceApplyTextcolor",e.settings.format,e._color):o.execCommand("mceRemoveTextcolor",e.settings.format)}},T=function(r,c){return function(t){var e,a=this.parent(),o=n(r,a.settings.format),l=function(t){r.execCommand("mceApplyTextcolor",a.settings.format,t),a.hidePanel(),a.color(t)};F.DOM.getParent(t.target,".mce-custom-color-btn")&&(a.hidePanel(),y(r).call(r,function(t){var e,o,r,n=a.panel.getEl().getElementsByTagName("table")[0];for(e=i.map(n.rows[n.rows.length-1].childNodes,function(t){return t.firstChild}),r=0;r<e.length&&(o=e[r]).getAttribute("data-mce-color");r++);if(r===c)for(r=0;r<c-1;r++)k(e[r],e[r+1].getAttribute("data-mce-color"));k(o,t),l(t)},o)),(e=t.target.getAttribute("data-mce-color"))?(this.lastId&&F.DOM.get(this.lastId).setAttribute("aria-selected","false"),t.target.setAttribute("aria-selected",!0),this.lastId=t.target.id,"transparent"===e?(r.execCommand("mceRemoveTextcolor",a.settings.format),a.hidePanel(),a.resetColor()):l(e)):null!==e&&a.hidePanel()}},_=function(n,a){return function(){var t=a?p(n):C(n),e=a?f(n):b(n),o=a?s(n):d(n),r=v(n);return P(t,e,o,r)}},A=function(t){t.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",format:"forecolor",panel:{role:"application",ariaRemember:!0,html:_(t,!0),onclick:T(t,p(t))},onclick:x(t)}),t.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",format:"hilitecolor",panel:{role:"application",ariaRemember:!0,html:_(t,!1),onclick:T(t,C(t))},onclick:x(t)})};t.add("textcolor",function(t){o(t),A(t)})}();
// Source: wp-includes/js/tinymce/plugins/wordpress/plugin.min.js
!function(k){(!k.ui.FloatPanel.zIndex||k.ui.FloatPanel.zIndex<100100)&&(k.ui.FloatPanel.zIndex=100100),k.PluginManager.add("wordpress",function(p){var a,t,E=k.DOM,m=k.each,u=p.editorManager.i18n.translate,i=window.jQuery,o=window.wp,r=o&&o.editor&&o.editor.autop&&p.getParam("wpautop",!0),s=!1;function e(n){var e,t,o=0,i=k.$(".block-library-classic__toolbar");"hide"===n?e=!0:i.length&&!i.hasClass("has-advanced-toolbar")&&(i.addClass("has-advanced-toolbar"),n="show"),(t=p.theme.panel?p.theme.panel.find(".toolbar:not(.menubar)"):t)&&1<t.length&&(!n&&t[1].visible()&&(n="hide"),m(t,function(e,t){0<t&&("hide"===n?(e.hide(),o+=34):(e.show(),o-=34))})),o&&!k.Env.iOS&&p.iframeElement&&p.iframeElement.clientHeight&&50<(i=p.iframeElement.clientHeight+o)&&E.setStyle(p.iframeElement,"height",i),e||("hide"===n?(setUserSetting("hidetb","0"),a&&a.active(!1)):(setUserSetting("hidetb","1"),a&&a.active(!0))),p.fire("wp-toolbar-toggle")}function d(e){var t,o,i,n=p.translate(e);return s||(o="Shift+Alt+",i="Ctrl+",s={},k.Env.mac&&(o="\u2303\u2325",i="\u2318"),p.settings.wp_shortcut_labels&&m(p.settings.wp_shortcut_labels,function(e,t){var n=p.translate(t);e=e.replace("access",o).replace("meta",i),s[t]=e,t!==n&&(s[n]=e)})),s.hasOwnProperty(n)?t=s[n]:s.hasOwnProperty(e)&&(t=s[e]),t?n+" ("+t+")":n}function n(){}return i&&i(document).triggerHandler("tinymce-editor-setup",[p]),p.addButton("wp_adv",{tooltip:"Toolbar Toggle",cmd:"WP_Adv",onPostRender:function(){(a=this).active("1"===getUserSetting("hidetb"))}}),p.on("PostRender",function(){p.getParam("wordpress_adv_hidden",!0)&&"0"===getUserSetting("hidetb","0")?e("hide"):k.$(".block-library-classic__toolbar").addClass("has-advanced-toolbar")}),p.addCommand("WP_Adv",function(){e()}),p.on("focus",function(){window.wpActiveEditor=p.id}),p.on("BeforeSetContent",function(e){var n;e.content&&(-1!==e.content.indexOf("\x3c!--more")&&(n=u("Read more..."),e.content=e.content.replace(/<!--more(.*?)-->/g,function(e,t){return'<img src="'+k.Env.transparentSrc+'" data-wp-more="more" data-wp-more-text="'+t+'" class="wp-more-tag mce-wp-more" alt="'+n+'" data-mce-resize="false" data-mce-placeholder="1" />'})),-1!==e.content.indexOf("\x3c!--nextpage--\x3e")&&(n=u("Page break"),e.content=e.content.replace(/<!--nextpage-->/g,'<img src="'+k.Env.transparentSrc+'" data-wp-more="nextpage" class="wp-more-tag mce-wp-nextpage" alt="'+n+'" data-mce-resize="false" data-mce-placeholder="1" />')),e.load&&"raw"!==e.format&&(e.content=r?o.editor.autop(e.content):e.content.replace(/-->\s+<!--/g,"--\x3e\x3c!--")),-1===e.content.indexOf("<script")&&-1===e.content.indexOf("<style")||(e.content=e.content.replace(/<(script|style)[^>]*>[\s\S]*?<\/\1>/g,function(e,t){return'<img src="'+k.Env.transparentSrc+'" data-wp-preserve="'+encodeURIComponent(e)+'" data-mce-resize="false" data-mce-placeholder="1" class="mce-object mce-object-'+t+'" width="20" height="20" alt="&lt;'+t+'&gt;" />'})))}),p.on("setcontent",function(){p.$("p").each(function(e,t){var n;t.innerHTML&&t.innerHTML.length<10&&((n=k.trim(t.innerHTML))&&"&nbsp;"!==n||(t.innerHTML=k.Env.ie&&k.Env.ie<11?"":'<br data-mce-bogus="1">'))})}),p.on("PostProcess",function(e){e.get&&(e.content=e.content.replace(/<img[^>]+>/g,function(e){var t,n,o="";return-1!==e.indexOf('data-wp-more="more"')?n="\x3c!--more"+(o=(t=e.match(/data-wp-more-text="([^"]+)"/))?t[1]:o)+"--\x3e":-1!==e.indexOf('data-wp-more="nextpage"')?n="\x3c!--nextpage--\x3e":-1!==e.indexOf("data-wp-preserve")&&(t=e.match(/ data-wp-preserve="([^"]+)"/))&&(n=decodeURIComponent(t[1])),n||e}))}),p.on("ResolveName",function(e){var t;"IMG"===e.target.nodeName&&(t=p.dom.getAttrib(e.target,"data-wp-more"))&&(e.name=t)}),p.addCommand("WP_More",function(e){var t,n="wp-more-tag",o=p.dom,i=p.selection.getNode(),a=p.getBody();n+=" mce-wp-"+(e=e||"more"),t=u("more"===e?"Read more...":"Next page"),t='<img src="'+k.Env.transparentSrc+'" alt="'+t+'" class="'+n+'" data-wp-more="'+e+'" data-mce-resize="false" data-mce-placeholder="1" />',i===a||"P"===i.nodeName&&i.parentNode===a?p.insertContent(t):(n=o.getParent(i,function(e){return!(!e.parentNode||e.parentNode!==a)},p.getBody()))&&("P"===n.nodeName?n.appendChild(o.create("p",null,t).firstChild):o.insertAfter(o.create("p",null,t),n),p.nodeChanged())}),p.addCommand("WP_Code",function(){p.formatter.toggle("code")}),p.addCommand("WP_Page",function(){p.execCommand("WP_More","nextpage")}),p.addCommand("WP_Help",function(){var e,t=k.Env.mac?u("Ctrl + Alt + letter:"):u("Shift + Alt + letter:"),n=k.Env.mac?u("\u2318 + letter:"):u("Ctrl + letter:"),o=[],i=[],a={},r={},s=0,d=0,l=p.settings.wp_shortcut_labels;function c(e,t){var n="<tr>",o=0;for(t=t||1,m(e,function(e,t){n+="<td><kbd>"+t+"</kbd></td><td>"+u(e)+"</td>",o++});o<t;)n+="<td></td><td></td>",o++;return n+"</tr>"}l&&(m(l,function(e,t){var n;-1!==e.indexOf("meta")?(s++,(n=e.replace("meta","").toLowerCase())&&(a[n]=t,s%2==0)&&(o.push(c(a,2)),a={})):-1!==e.indexOf("access")&&(d++,n=e.replace("access","").toLowerCase())&&(r[n]=t,d%2==0)&&(i.push(c(r,2)),r={})}),0<s%2&&o.push(c(a,2)),0<d%2&&i.push(c(r,2)),l="<tr><th>"+(l=[u("Letter"),u("Action"),u("Letter"),u("Action")]).join("</th><th>")+"</th></tr>",e=(e='<div class="wp-editor-help">')+"<h2>"+u("Default shortcuts,")+" "+n+'</h2><table class="wp-help-th-center fixed">'+l+o.join("")+"</table><h2>"+u("Additional shortcuts,")+" "+t+'</h2><table class="wp-help-th-center fixed">'+l+i.join("")+"</table>",e=(e=p.plugins.wptextpattern&&(!k.Env.ie||8<k.Env.ie)?(e=e+"<h2>"+u("When starting a new paragraph with one of these formatting shortcuts followed by a space, the formatting will be applied automatically. Press Backspace or Escape to undo.")+'</h2><table class="wp-help-th-center fixed">'+c({"*":"Bullet list","1.":"Numbered list"})+c({"-":"Bullet list","1)":"Numbered list"})+"</table>")+"<h2>"+u("The following formatting shortcuts are replaced when pressing Enter. Press Escape or the Undo button to undo.")+'</h2><table class="wp-help-single">'+c({">":"Blockquote"})+c({"##":"Heading 2"})+c({"###":"Heading 3"})+c({"####":"Heading 4"})+c({"#####":"Heading 5"})+c({"######":"Heading 6"})+c({"---":"Horizontal line"})+"</table>":e)+"<h2>"+u("Focus shortcuts:")+'</h2><table class="wp-help-single">'+c({"Alt + F8":"Inline toolbar (when an image, link or preview is selected)"})+c({"Alt + F9":"Editor menu (when enabled)"})+c({"Alt + F10":"Editor toolbar"})+c({"Alt + F11":"Elements path"})+"</table><p>"+u("To move focus to other buttons use Tab or the arrow keys. To return focus to the editor press Escape or use one of the buttons.")+"</p>",(n=p.windowManager.open({title:p.settings.classic_block_editor?"Classic Block Keyboard Shortcuts":"Keyboard Shortcuts",items:{type:"container",classes:"wp-help",html:e+="</div>"},buttons:{text:"Close",onclick:"close"}})).$el)&&(n.$el.find('div[role="application"]').attr("role","document"),(t=n.$el.find(".mce-wp-help"))[0])&&(t.attr("tabindex","0"),t[0].focus(),t.on("keydown",function(e){33<=e.keyCode&&e.keyCode<=40&&e.stopPropagation()}))}),p.addCommand("WP_Medialib",function(){o&&o.media&&o.media.editor&&o.media.editor.open(p.id)}),p.addButton("wp_more",{tooltip:"Insert Read More tag",onclick:function(){p.execCommand("WP_More","more")}}),p.addButton("wp_page",{tooltip:"Page break",onclick:function(){p.execCommand("WP_More","nextpage")}}),p.addButton("wp_help",{tooltip:"Keyboard Shortcuts",cmd:"WP_Help"}),p.addButton("wp_code",{tooltip:"Code",cmd:"WP_Code",stateSelector:"code"}),o&&o.media&&o.media.editor&&(p.addButton("wp_add_media",{tooltip:"Add Media",icon:"dashicon dashicons-admin-media",cmd:"WP_Medialib"}),p.addMenuItem("add_media",{text:"Add Media",icon:"wp-media-library",context:"insert",cmd:"WP_Medialib"})),p.addMenuItem("wp_more",{text:"Insert Read More tag",icon:"wp_more",context:"insert",onclick:function(){p.execCommand("WP_More","more")}}),p.addMenuItem("wp_page",{text:"Page break",icon:"wp_page",context:"insert",onclick:function(){p.execCommand("WP_More","nextpage")}}),p.on("BeforeExecCommand",function(e){!k.Env.webkit||"InsertUnorderedList"!==e.command&&"InsertOrderedList"!==e.command||(t=t||p.dom.create("style",{type:"text/css"},"#tinymce,#tinymce span,#tinymce li,#tinymce li>span,#tinymce p,#tinymce p>span{font:medium sans-serif;color:#000;line-height:normal;}"),p.getDoc().head.appendChild(t))}),p.on("ExecCommand",function(e){k.Env.webkit&&t&&("InsertUnorderedList"===e.command||"InsertOrderedList"===e.command)&&p.dom.remove(t)}),p.on("init",function(){var e=k.Env,t=["mceContentBody"],n=p.getDoc(),o=p.dom;e.iOS&&o.addClass(n.documentElement,"ios"),"rtl"===p.getParam("directionality")&&(t.push("rtl"),o.setAttrib(n.documentElement,"dir","rtl")),o.setAttrib(n.documentElement,"lang",p.getParam("wp_lang_attr")),e.ie?9===parseInt(e.ie,10)?t.push("ie9"):8===parseInt(e.ie,10)?t.push("ie8"):e.ie<8&&t.push("ie7"):e.webkit&&t.push("webkit"),t.push("wp-editor"),m(t,function(e){e&&o.addClass(n.body,e)}),p.on("BeforeSetContent",function(e){e.content&&(e.content=e.content.replace(/<p>\s*<(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre)( [^>]*)?>/gi,"<$1$2>").replace(/<\/(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre)>\s*<\/p>/gi,"</$1>"))}),i&&i(function(){i(document).triggerHandler("tinymce-editor-init",[p])}),window.tinyMCEPreInit&&window.tinyMCEPreInit.dragDropUpload&&o.bind(n,"dragstart dragend dragover drop",function(e){i&&i(document).trigger(new i.Event(e))}),p.getParam("wp_paste_filters",!0)&&(p.on("PastePreProcess",function(e){e.content=e.content.replace(/<br class="?Apple-interchange-newline"?>/gi,""),k.Env.webkit||(e.content=e.content.replace(/(<[^>]+) style="[^"]*"([^>]*>)/gi,"$1$2"),e.content=e.content.replace(/(<[^>]+) data-mce-style=([^>]+>)/gi,"$1 style=$2"))}),p.on("PastePostProcess",function(e){p.$("p",e.node).each(function(e,t){o.isEmpty(t)&&o.remove(t)}),k.isIE&&p.$("a",e.node).find("font, u").each(function(e,t){o.remove(t,!0)})}))}),p.on("SaveContent",function(e){!p.inline&&p.isHidden()?e.content=e.element.value:(e.content=e.content.replace(/<p>(?:<br ?\/?>|\u00a0|\uFEFF| )*<\/p>/g,"<p>&nbsp;</p>"),e.content=r?o.editor.removep(e.content):e.content.replace(/-->\s*<!-- wp:/g,"--\x3e\n\n\x3c!-- wp:"))}),p.on("preInit",function(){p.schema.addValidElements("@[id|accesskey|class|dir|lang|style|tabindex|title|contenteditable|draggable|dropzone|hidden|spellcheck|translate],i,b,script[src|async|defer|type|charset|crossorigin|integrity]"),k.Env.iOS&&(p.settings.height=300),m({c:"JustifyCenter",r:"JustifyRight",l:"JustifyLeft",j:"JustifyFull",q:"mceBlockQuote",u:"InsertUnorderedList",o:"InsertOrderedList",m:"WP_Medialib",t:"WP_More",d:"Strikethrough",p:"WP_Page",x:"WP_Code"},function(e,t){p.shortcuts.add("access+"+t,"",e)}),p.addShortcut("meta+s","",function(){o&&o.autosave&&o.autosave.server.triggerSave()}),p.settings.classic_block_editor||p.addShortcut("access+z","","WP_Adv"),p.on("keydown",function(e){var t=k.Env.mac?e.ctrlKey&&e.altKey&&"KeyH"===e.code:e.shiftKey&&e.altKey&&"KeyH"===e.code;return!t||(p.execCommand("WP_Help"),e.stopPropagation(),e.stopImmediatePropagation(),!1)}),1<window.getUserSetting("editor_plain_text_paste_warning")&&(p.settings.paste_plaintext_inform=!1),k.Env.mac&&k.$(p.iframeElement).attr("title",u("Rich Text Area. Press Control-Option-H for help."))}),p.on("PastePlainTextToggle",function(e){!0===e.state&&(e=parseInt(window.getUserSetting("editor_plain_text_paste_warning"),10)||0)<2&&window.setUserSetting("editor_plain_text_paste_warning",++e)}),p.on("beforerenderui",function(){p.theme.panel&&(m(["button","colorbutton","splitbutton"],function(e){(e=p.theme.panel.find(e))&&m(e,function(e){var t;e&&e.settings.tooltip&&(t=d(e.settings.tooltip),e.settings.tooltip=t,e._aria)&&e._aria.label&&(e._aria.label=t)})}),m(p.theme.panel.find("listbox"),function(e){e&&"Paragraph"===e.settings.text&&m(e.settings.values,function(e){e.text&&s.hasOwnProperty(e.text)&&(e.shortcut="("+s[e.text]+")")})}))}),p.on("preinit",function(){var n,v,t,_,y,P,o,r=k.ui.Factory,s=p.settings,e=p.getContainer(),x=document.getElementById("wpadminbar"),C=document.getElementById(p.id+"_ifr");function i(e){if(n)if(n.tempHide||"hide"===e.type||"blur"===e.type)n.hide(),n=!1;else if(("resizewindow"===e.type||"scrollwindow"===e.type||"resize"===e.type||"scroll"===e.type)&&!n.blockHide){if("resize"===e.type||"resizewindow"===e.type){if(e=(e=p.getWin()).innerHeight+e.innerWidth,!(o=o&&2e3<(new Date).getTime()-o.timestamp?null:o))return void(o={timestamp:(new Date).getTime(),size:e});if(e&&Math.abs(e-o.size)<2)return}clearTimeout(t),t=setTimeout(function(){n&&"function"==typeof n.show&&(n.scrolling=!1,n.show())},250),n.scrolling=!0,n.hide()}}e&&(_=k.$(".mce-toolbar-grp",e)[0],y=k.$(".mce-statusbar",e)[0]),"content"===p.id&&(P=document.getElementById("post-status-info")),p.shortcuts.add("alt+119","",function(){var e;n&&(e=n.find("toolbar")[0])&&e.focus(!0)}),p.on("nodechange",function(e){var t=p.selection.isCollapsed(),e={element:e.element,parents:e.parents,collapsed:t};p.fire("wptoolbar",e),v=e.selection||e.element,n&&n!==e.toolbar&&n.hide(),e.toolbar?(n=e.toolbar).visible()?n.reposition():n.show():n=!1}),p.on("focus",function(){n&&n.show()}),p.inline?(p.on("resizewindow",i),document.addEventListener("scroll",i,!0)):(p.dom.bind(p.getWin(),"resize scroll",i),p.on("resizewindow scrollwindow",i)),p.on("remove",function(){document.removeEventListener("scroll",i,!0),p.off("resizewindow scrollwindow",i),p.dom.unbind(p.getWin(),"resize scroll",i)}),p.on("blur hide",i),p.wp=p.wp||{},p.wp._createToolbar=function(e,t){var n,o,a=[];return m(e,function(i){var t,e;function n(){var e=p.selection;"bullist"===t&&e.selectorChanged("ul > li",function(e,t){for(var n,o=t.parents.length;o--&&"OL"!==(n=t.parents[o].nodeName)&&"UL"!=n;);i.active(e&&"UL"===n)}),"numlist"===t&&e.selectorChanged("ol > li",function(e,t){for(var n,o=t.parents.length;o--&&"OL"!==(n=t.parents[o].nodeName)&&"UL"!==n;);i.active(e&&"OL"===n)}),i.settings.stateSelector&&e.selectorChanged(i.settings.stateSelector,function(e){i.active(e)},!0),i.settings.disabledStateSelector&&e.selectorChanged(i.settings.disabledStateSelector,function(e){i.disabled(e)})}"|"===i?o=null:r.has(i)?(i={type:i},s.toolbar_items_size&&(i.size=s.toolbar_items_size),a.push(i),o=null):(o||(o={type:"buttongroup",items:[]},a.push(o)),p.buttons[i]&&(t=i,(i="function"==typeof(i=p.buttons[t])?i():i).type=i.type||"button",s.toolbar_items_size&&(i.size=s.toolbar_items_size),(e=i.tooltip||i.title)&&(i.tooltip=d(e)),i=r.create(i),o.items.push(i),p.initialized?n():p.on("init",n)))}),(n=r.create({type:"panel",layout:"stack",classes:"toolbar-grp inline-toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:[{type:"toolbar",layout:"flow",items:a}]})).bottom=t,n.on("show",function(){this.reposition()}),n.on("keydown",function(e){27===e.keyCode&&(this.hide(),p.focus())}),p.on("remove",function(){n.remove()}),n.reposition=function(){var e,t,n,o,i,a,r,s,d,l,c,p,m,u,g,h,f,w,b;return v&&(e=window.pageXOffset||document.documentElement.scrollLeft,t=window.pageYOffset||document.documentElement.scrollTop,n=window.innerWidth,u=window.innerHeight,o=C?C.getBoundingClientRect():{top:0,right:n,bottom:u,left:0,width:n,height:u},a=(i=this.getEl()).offsetWidth,r=i.clientHeight,d=((s=v.getBoundingClientRect()).left+s.right)/2,l=r+5,c=x?x.getBoundingClientRect().bottom:0,b=_?_.getBoundingClientRect().bottom:0,p=y?u-y.getBoundingClientRect().top:0,m=P?u-P.getBoundingClientRect().top:0,c=Math.max(0,c,b,o.top),b=Math.max(0,p,m,u-o.bottom),p=s.top+o.top-c,m=u-o.top-s.bottom-b,g="",f=h=0,(u=u-c-b)<=p||u<=m?(this.scrolling=!0,this.hide(),this.scrolling=!1):(k.Env.iOS&&"IMG"===v.nodeName&&(h=54,f=46),this.bottom?l<=m?(g=" mce-arrow-up",w=s.bottom+o.top+t-f):l<=p&&(g=" mce-arrow-down",w=s.top+o.top+t-r+h):l<=p?(g=" mce-arrow-down",w=s.top+o.top+t-r+h):l<=m&&u/2>s.bottom+o.top-c&&(g=" mce-arrow-up",w=s.bottom+o.top+t-f),void 0===w&&(w=t+c+5+f),b=d-a/2+o.left+e,s.left<0||s.right>o.width?b=o.left+e+(o.width-a)/2:n<=a?(g+=" mce-arrow-full",b=0):b<0&&s.left+a>n||n<b+a&&s.right-a<0?b=(n-a)/2:b<o.left+e?(g+=" mce-arrow-left",b=s.left+o.left+e):b+a>o.width+o.left+e&&(g+=" mce-arrow-right",b=s.right-a+o.left+e),k.Env.iOS&&"IMG"===v.nodeName&&(g=g.replace(/ ?mce-arrow-(up|down)/g,"")),i.className=i.className.replace(/ ?mce-arrow-[\w]+/g,"")+g,E.setStyles(i,{left:b,top:w}))),this},n.hide().renderTo(document.body),n}},!0),{_showButtons:n,_hideButtons:n,_setEmbed:n,_getEmbed:n}})}(window.tinymce);
// Source: wp-includes/js/tinymce/plugins/wpautoresize/plugin.min.js
tinymce.PluginManager.add("wpautoresize",function(g){var m=g.settings,h=300,c=!1;function f(e){return parseInt(e,10)||0}function y(e){var t,o,n,i,a,s,l,u,r,d=tinymce.DOM;c&&(o=g.getDoc())&&(e=e||{},t=o.body,o=o.documentElement,n=m.autoresize_min_height,!t||e&&"setcontent"===e.type&&e.initial||g.plugins.fullscreen&&g.plugins.fullscreen.isFullscreen()?t&&o&&(t.style.overflowY="auto",o.style.overflowY="auto"):(i=g.dom.getStyle(t,"margin-top",!0),a=g.dom.getStyle(t,"margin-bottom",!0),s=g.dom.getStyle(t,"padding-top",!0),l=g.dom.getStyle(t,"padding-bottom",!0),u=g.dom.getStyle(t,"border-top-width",!0),r=g.dom.getStyle(t,"border-bottom-width",!0),(i=t.offsetHeight+f(i)+f(a)+f(s)+f(l)+f(u)+f(r))&&i<o.offsetHeight&&(i=o.offsetHeight),(i=isNaN(i)||i<=0?tinymce.Env.ie?t.scrollHeight:tinymce.Env.webkit&&0===t.clientHeight?0:t.offsetHeight:i)>m.autoresize_min_height&&(n=i),m.autoresize_max_height&&i>m.autoresize_max_height?(n=m.autoresize_max_height,t.style.overflowY="auto",o.style.overflowY="auto"):(t.style.overflowY="hidden",o.style.overflowY="hidden",t.scrollTop=0),n!==h&&(a=n-h,d.setStyle(g.iframeElement,"height",n+"px"),h=n,tinymce.isWebKit&&a<0&&y(e),g.fire("wp-autoresize",{height:n,deltaHeight:"nodechange"===e.type?a:null}))))}function n(e,t,o){setTimeout(function(){y(),e--?n(e,t,o):o&&o()},t)}g.settings.inline||tinymce.Env.iOS||(m.autoresize_min_height=parseInt(g.getParam("autoresize_min_height",g.getElement().offsetHeight),10),m.autoresize_max_height=parseInt(g.getParam("autoresize_max_height",0),10),m.wp_autoresize_on&&(c=!0,g.on("init",function(){g.dom.addClass(g.getBody(),"wp-autoresize")}),g.on("nodechange keyup FullscreenStateChanged",y),g.on("setcontent",function(){n(3,100)}),g.getParam("autoresize_on_init",!0))&&g.on("init",function(){n(10,200,function(){n(5,1e3)})}),g.on("show",function(){h=0}),g.addCommand("wpAutoResize",y),g.addCommand("wpAutoResizeOn",function(){g.dom.hasClass(g.getBody(),"wp-autoresize")||(c=!0,g.dom.addClass(g.getBody(),"wp-autoresize"),g.on("nodechange setcontent keyup FullscreenStateChanged",y),y())}),g.addCommand("wpAutoResizeOff",function(){var e;m.wp_autoresize_on||(c=!1,e=g.getDoc(),g.dom.removeClass(g.getBody(),"wp-autoresize"),g.off("nodechange setcontent keyup FullscreenStateChanged",y),e.body.style.overflowY="auto",e.documentElement.style.overflowY="auto",h=0)}))});
// Source: wp-includes/js/tinymce/plugins/wpdialogs/plugin.min.js
tinymce.WPWindowManager=tinymce.InlineWindowManager=function(a){if(this.wp)return this;this.wp={},this.parent=a.windowManager,this.editor=a,tinymce.extend(this,this.parent),this.open=function(e,i){var n,o=this,t=this.wp;if(!e.wpDialog)return this.parent.open.apply(this,arguments);e.id&&("undefined"!=typeof jQuery&&jQuery.wp&&jQuery.wp.wpdialog?(t.$element=n=jQuery("#"+e.id),n.length&&(window.console&&window.console.log&&window.console.log("tinymce.WPWindowManager is deprecated. Use the default editor.windowManager to open dialogs with inline HTML."),t.features=e,t.params=i,a.nodeChanged(),n.data("wpdialog")||n.wpdialog({title:e.title,width:e.width,height:e.height,modal:!0,dialogClass:"wp-dialog",zIndex:3e5}),n.wpdialog("open"),n.on("wpdialogclose",function(){o.wp.$element&&(o.wp={})}))):window.console&&window.console.error&&window.console.error('wpdialog.js is not loaded. Please set "wpdialogs" as dependency for your script when calling wp_enqueue_script(). You may also want to enqueue the "wp-jquery-ui-dialog" stylesheet.'))},this.close=function(){if(!this.wp.features||!this.wp.features.wpDialog)return this.parent.close.apply(this,arguments);this.wp.$element.wpdialog("close")}},tinymce.PluginManager.add("wpdialogs",function(e){e.on("init",function(){e.windowManager=new tinymce.WPWindowManager(e)})});
// Source: wp-includes/js/tinymce/plugins/wpeditimage/plugin.min.js
tinymce.PluginManager.add("wpeditimage",function(g){var r,u,n,c,a,e=tinymce.each,l=tinymce.trim,t=tinymce.Env.iOS;function i(e){return!(!g.dom.getAttrib(e,"data-mce-placeholder")&&!g.dom.getAttrib(e,"data-mce-object"))}function o(e){e=g.$(e).parents("[contenteditable]");return e&&"false"===e.attr("contenteditable")}function d(e){return e.replace(/(?:<p>)?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?/g,function(e,t,n){var a,i,o,r,c,d=t.match(/id=['"]([^'"]*)['"] ?/);return(c=(t=(i=(t=(a=(t=d?t.replace(d[0],""):t).match(/align=['"]([^'"]*)['"] ?/))?t.replace(a[0],""):t).match(/class=['"]([^'"]*)['"] ?/))?t.replace(i[0],""):t).match(/width=['"]([0-9]*)['"] ?/))&&(t=t.replace(c[0],"")),r=(r=(n=l(n)).match(/((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)([\s\S]*)/i))&&r[2]?(o=l(r[2]),l(r[1])):(o=l(t).replace(/caption=['"]/,"").replace(/['"]$/,""),n),d=d&&d[1]?d[1].replace(/[<>&]+/g,""):"",a=a&&a[1]?a[1]:"alignnone",i=i&&i[1]?" "+i[1].replace(/[<>&]+/g,""):"",(c=(c=!c&&r?r.match(/width=['"]([0-9]*)['"]/):c)&&c[1]?c[1]:c)&&o?(c=parseInt(c,10),g.getParam("wpeditimage_html5_captions")||(c+=10),'<div class="mceTemp"><dl id="'+d+'" class="wp-caption '+a+i+'" style="width: '+c+'px"><dt class="wp-caption-dt">'+r+'</dt><dd class="wp-caption-dd">'+o+"</dd></dl></div>"):n})}function s(e){return e.replace(/(?:<div [^>]+mceTemp[^>]+>)?\s*(<dl [^>]+wp-caption[^>]+>[\s\S]+?<\/dl>)\s*(?:<\/div>)?/g,function(e,t){var n="";return-1===t.indexOf("<img ")||-1!==t.indexOf("</p>")?t.replace(/<d[ldt]( [^>]+)?>/g,"").replace(/<\/d[ldt]>/g,""):-1===(n=t.replace(/\s*<dl ([^>]+)>\s*<dt [^>]+>([\s\S]+?)<\/dt>\s*<dd [^>]+>([\s\S]*?)<\/dd>\s*<\/dl>\s*/gi,function(e,t,n,a){var i,o,r=n.match(/width="([0-9]*)"/);return r=r&&r[1]?r[1]:"",o=(i=(i=t.match(/class="([^"]*)"/))&&i[1]?i[1]:"").match(/align[a-z]+/i)||"alignnone",r&&a?'[caption id="'+((t=t.match(/id="([^"]*)"/))&&t[1]?t[1]:"")+'" align="'+o+'" width="'+r+'"'+(i=(i=i.replace(/wp-caption ?|align[a-z]+ ?/gi,""))&&' class="'+i+'"')+"]"+n+" "+(a=(a=a.replace(/\r\n|\r/g,"\n").replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g,function(e){return e.replace(/[\r\n\t]+/," ")})).replace(/\s*\n\s*/g,"<br />"))+"[/caption]":"alignnone"!==o[0]?n.replace(/><img/,' class="'+o[0]+'"><img'):n})).indexOf("[caption")?t.replace(/[\s\S]*?((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)(<p>[\s\S]*<\/p>)?[\s\S]*/gi,"<p>$1</p>$2"):n})}function h(e){return e&&(e.textContent||e.innerText).replace(/\ufeff/g,"")}function m(e){var t=g.dom.getParent(e,"div.mceTemp");(t=t||"IMG"!==e.nodeName?t:g.dom.getParent(e,"a"))?(t.nextSibling?g.selection.select(t.nextSibling):t.previousSibling?g.selection.select(t.previousSibling):g.selection.select(t.parentNode),g.selection.collapse(!0),g.dom.remove(t)):g.dom.remove(e),g.nodeChanged(),g.undoManager.add()}return g.addButton("wp_img_remove",{tooltip:"Remove",icon:"dashicon dashicons-no",onclick:function(){m(g.selection.getNode())}}),g.addButton("wp_img_edit",{tooltip:"Edit|button",icon:"dashicon dashicons-edit",onclick:function(){var e,t,n,p;e=g.selection.getNode(),"undefined"!=typeof wp&&wp.media?(n=function(e){var t,n,a,i,o=[],r=g.dom,c=/^\d+$/;(n={attachment_id:!1,size:"custom",caption:"",align:"none",extraClasses:"",link:!1,linkUrl:"",linkClassName:"",linkTargetBlank:!1,linkRel:"",title:""}).url=r.getAttrib(e,"src"),n.alt=r.getAttrib(e,"alt"),n.title=r.getAttrib(e,"title"),a=r.getAttrib(e,"width"),i=r.getAttrib(e,"height"),(!c.test(a)||parseInt(a,10)<1)&&(a=e.naturalWidth||e.width);(!c.test(i)||parseInt(i,10)<1)&&(i=e.naturalHeight||e.height);n.customWidth=n.width=a,n.customHeight=n.height=i,c=tinymce.explode(e.className," "),t=[],tinymce.each(c,function(e){/^wp-image/.test(e)?n.attachment_id=parseInt(e.replace("wp-image-",""),10):/^align/.test(e)?n.align=e.replace("align",""):/^size/.test(e)?n.size=e.replace("size-",""):t.push(e)}),n.extraClasses=t.join(" "),(a=r.getParents(e,".wp-caption")).length&&(a=a[0],c=a.className.split(" "),tinymce.each(c,function(e){/^align/.test(e)?n.align=e.replace("align",""):e&&"wp-caption"!==e&&o.push(e)}),n.captionClassName=o.join(" "),(i=r.select("dd.wp-caption-dd",a)).length)&&(i=i[0],n.caption=g.serializer.serialize(i).replace(/<br[^>]*>/g,"$&\n").replace(/^<p>/,"").replace(/<\/p>$/,""));e.parentNode&&"A"===e.parentNode.nodeName&&(c=e.parentNode,n.linkUrl=r.getAttrib(c,"href"),n.linkTargetBlank="_blank"===r.getAttrib(c,"target"),n.linkRel=r.getAttrib(c,"rel"),n.linkClassName=c.className);return n}(e),g.$(e).attr("data-wp-editing",1),wp.media.events.trigger("editor:image-edit",{editor:g,metadata:n,image:e}),t=wp.media({frame:"image",state:"image-details",metadata:n}),wp.media.events.trigger("editor:frame-create",{frame:t}),e=function(m){g.undoManager.transact(function(){var e,t,n,a,i,o,r,c,d,l,s;e=p,t=m,s=g.dom,e&&e.length&&(a=e[0],r=(r=tinymce.explode(t.extraClasses," "))||[],t.caption||r.push("align"+t.align),t.attachment_id&&(r.push("wp-image-"+t.attachment_id),t.size)&&"custom"!==t.size&&r.push("size-"+t.size),l=t.width,c=t.height,"custom"===t.size&&(l=t.customWidth,c=t.customHeight),c={src:t.url,width:l||null,height:c||null,title:t.title||null,class:r.join(" ")||null},s.setAttribs(a,c),e.attr("alt",t.alt||""),r={href:t.linkUrl,rel:t.linkRel||null,target:t.linkTargetBlank?"_blank":null,class:t.linkClassName||null},a.parentNode&&"A"===a.parentNode.nodeName&&!h(a.parentNode)?t.linkUrl?s.setAttribs(a.parentNode,r):s.remove(a.parentNode,!0):t.linkUrl&&((c=s.getParent(a,"a"))&&s.insertAfter(a,c),c=s.create("a",r),a.parentNode.insertBefore(c,a),c.appendChild(a)),r=g.dom.getParent(a,".mceTemp"),c=a.parentNode&&"A"===a.parentNode.nodeName&&!h(a.parentNode)?a.parentNode:a,t.caption?(t.caption=function(e){if(!e||-1===e.indexOf("<")&&-1===e.indexOf(">"))return e;u=u||new tinymce.html.Serializer({},g.schema);return u.serialize(g.parser.parse(e,{forced_root_block:!1}))}(t.caption),o=t.attachment_id?"attachment_"+t.attachment_id:null,d="wp-caption "+("align"+(t.align||"none")),t.captionClassName&&(d+=" "+t.captionClassName.replace(/[<>&]+/g,"")),g.getParam("wpeditimage_html5_captions")||(l=parseInt(l,10),l+=10),r?((i=s.select("dl.wp-caption",r)).length&&s.setAttribs(i,{id:o,class:d,style:"width: "+l+"px"}),(i=s.select(".wp-caption-dd",r)).length&&s.setHTML(i[0],t.caption)):(i="<dl "+(o=o?'id="'+o+'" ':"")+'class="'+d+'" style="width: '+l+'px"><dt class="wp-caption-dt"></dt><dd class="wp-caption-dd">'+t.caption+"</dd></dl>",o=s.create("div",{class:"mceTemp"},i),(n=s.getParent(c,"p"))?n.parentNode.insertBefore(o,n):c.parentNode.insertBefore(o,c),g.$(o).find("dt.wp-caption-dt").append(c),n&&s.isEmpty(n)&&s.remove(n))):r&&(n=s.create("p"),r.parentNode.insertBefore(n,r),n.appendChild(c),s.remove(r)),e=g.$(a),d=e.attr("srcset"),l=e.attr("src"),d&&l&&(l=l.replace(/[?#].*/,""),-1===d.indexOf(l))&&e.attr("srcset",null).attr("sizes",null),wp.media.events&&wp.media.events.trigger("editor:image-update",{editor:g,metadata:t,image:a}),g.nodeChanged())}),t.detach()},t.state("image-details").on("update",e),t.state("replace-image").on("replace",e),t.on("close",function(){g.focus(),t.detach(),(p=g.$("img[data-wp-editing]")).removeAttr("data-wp-editing")}),t.open()):g.execCommand("mceImage")}}),e({alignleft:"Align left",aligncenter:"Align center",alignright:"Align right",alignnone:"No alignment"},function(e,n){var t=n.slice(5);g.addButton("wp_img_"+n,{tooltip:e,icon:"dashicon dashicons-align-"+t,cmd:"alignnone"===n?"wpAlignNone":"Justify"+t.slice(0,1).toUpperCase()+t.slice(1),onPostRender:function(){var t=this;g.on("NodeChange",function(e){"IMG"===e.element.nodeName&&(e=g.dom.getParent(e.element,".wp-caption")||e.element,"alignnone"===n?t.active(!/\balign(left|center|right)\b/.test(e.className)):t.active(g.dom.hasClass(e,n)))})}})}),g.once("preinit",function(){g.wp&&g.wp._createToolbar&&(r=g.wp._createToolbar(["wp_img_alignleft","wp_img_aligncenter","wp_img_alignright","wp_img_alignnone","wp_img_edit","wp_img_remove"]))}),g.on("wptoolbar",function(e){"IMG"!==e.element.nodeName||i(e.element)||(e.toolbar=r)}),t&&g.on("init",function(){g.on("touchstart",function(e){"IMG"!==e.target.nodeName||o(e.target)||(n=!0)}),g.dom.bind(g.getDoc(),"touchmove",function(){n=!1}),g.on("touchend",function(e){var t;n&&"IMG"===e.target.nodeName&&!o(e.target)?(t=e.target,n=!1,window.setTimeout(function(){g.selection.select(t),g.nodeChanged()},100)):r&&r.hide()})}),g.on("init",function(){var t=g.dom,e=g.getParam("wpeditimage_html5_captions")?"html5-captions":"html4-captions";t.addClass(g.getBody(),e),tinymce.Env.ie&&10<tinymce.Env.ie&&t.bind(g.getBody(),"mscontrolselect",function(e){"IMG"===e.target.nodeName&&t.getParent(e.target,".wp-caption")?g.getBody().focus():"DL"===e.target.nodeName&&t.hasClass(e.target,"wp-caption")&&e.target.focus()})}),g.on("ObjectResized",function(a){var i=a.target;"IMG"===i.nodeName&&g.undoManager.transact(function(){var e,t,n=g.dom;i.className=i.className.replace(/\bsize-[^ ]+/,""),(e=n.getParent(i,".wp-caption"))&&(t=a.width||n.getAttrib(i,"width"))&&(t=parseInt(t,10),g.getParam("wpeditimage_html5_captions")||(t+=10),n.setStyle(e,"width",t+"px"))})}),g.on("pastePostProcess",function(e){g.dom.getParent(g.selection.getNode(),"dd.wp-caption-dd")&&(g.$("img, audio, video, object, embed, iframe, script, style",e.node).remove(),g.$("*",e.node).each(function(e,t){g.dom.isBlock(t)&&(tinymce.trim(t.textContent||t.innerText)?(g.dom.insertAfter(g.dom.create("br"),t),g.dom.remove(t,!0)):g.dom.remove(t))}),g.$("br",e.node).each(function(e,t){t.nextSibling&&"BR"!==t.nextSibling.nodeName&&t.previousSibling&&"BR"!==t.previousSibling.nodeName||g.dom.remove(t)}),c=!0)}),g.on("BeforeExecCommand",function(e){var t,n,a,i=e.command,o=g.dom;if("mceInsertContent"===i||"Indent"===i||"Outdent"===i){if(t=g.selection.getNode(),a=o.getParent(t,"div.mceTemp")){if("mceInsertContent"!==i)return e.preventDefault(),e.stopImmediatePropagation(),!1;c?c=!1:(n=o.create("p"),o.insertAfter(n,a),g.selection.setCursorLocation(n,0),"IMG"===t.nodeName&&g.$(a).remove(),g.nodeChanged())}}else"JustifyLeft"!==i&&"JustifyRight"!==i&&"JustifyCenter"!==i&&"wpAlignNone"!==i||(t=g.selection.getNode(),o="align"+i.slice(7).toLowerCase(),n=g.dom.getParent(t,".wp-caption"),"IMG"!==t.nodeName&&!n)||(a=g.dom.hasClass(t=n||t,o)?" alignnone":" "+o,t.className=l(t.className.replace(/ ?align(left|center|right|none)/g,"")+a),g.nodeChanged(),e.preventDefault(),r&&r.reposition(),g.fire("ExecCommand",{command:i,ui:e.ui,value:e.value}))}),g.on("keydown",function(e){var t,n,a,i=g.selection,o=e.keyCode,r=g.dom,c=tinymce.util.VK;if(o===c.ENTER)t=i.getNode(),(n=r.getParent(t,"div.mceTemp"))&&(r.events.cancel(e),tinymce.each(r.select("dt, dd",n),function(e){r.isEmpty(e)&&r.remove(e)}),a=tinymce.Env.ie&&tinymce.Env.ie<11?"":'<br data-mce-bogus="1" />',a=r.create("p",null,a),"DD"===t.nodeName?r.insertAfter(a,n):n.parentNode.insertBefore(a,n),g.nodeChanged(),i.setCursorLocation(a,0));else if((o===c.DELETE||o===c.BACKSPACE)&&("DIV"===(t=i.getNode()).nodeName&&r.hasClass(t,"mceTemp")?n=t:"IMG"!==t.nodeName&&"DT"!==t.nodeName&&"A"!==t.nodeName||(n=r.getParent(t,"div.mceTemp")),n))return r.events.cancel(e),m(t),!1}),tinymce.Env.gecko&&g.on("undo redo",function(){"IMG"===g.selection.getNode().nodeName&&g.selection.collapse()}),g.wpSetImgCaption=d,g.wpGetImgCaption=s,g.on("beforeGetContent",function(e){"raw"!==e.format&&g.$('img[id="__wp-temp-img-id"]').removeAttr("id")}),g.on("BeforeSetContent",function(e){"raw"!==e.format&&(e.content=g.wpSetImgCaption(e.content))}),g.on("PostProcess",function(e){e.get&&(e.content=g.wpGetImgCaption(e.content))}),g.on("dragstart",function(){var e=g.selection.getNode();"IMG"!==e.nodeName||(a=g.dom.getParent(e,".mceTemp"))||"A"!==e.parentNode.nodeName||h(e.parentNode)||(a=e.parentNode)}),g.on("drop",function(e){var t=g.dom,n=tinymce.dom.RangeUtils.getCaretRangeFromPoint(e.clientX,e.clientY,g.getDoc());n&&t.getParent(n.startContainer,".mceTemp")?e.preventDefault():a&&(e.preventDefault(),g.undoManager.transact(function(){n&&g.selection.setRng(n),g.selection.setNode(a),t.remove(a)})),a=null}),g.wp=g.wp||{},g.wp.isPlaceholder=i,{_do_shcode:d,_get_shcode:s}});
// Source: wp-includes/js/tinymce/plugins/wpemoji/plugin.min.js
!function(m){m.PluginManager.add("wpemoji",function(n){var t,o=window.wp,e=window._wpemojiSettings,i=m.Env,a=window.navigator.userAgent,w=-1<a.indexOf("Windows"),a=!!((a=a.match(/Windows NT 6\.(\d)/))&&1<a[1]);function d(e){o.emoji.parse(e,{imgAttr:{"data-mce-resize":"false","data-mce-placeholder":"1","data-wp-emoji":"1"}})}function c(e){var t,o;e&&window.twemoji&&window.twemoji.test(e.textContent||e.innerText)&&(i.webkit&&(o=(t=n.selection).getBookmark()),d(e),i.webkit)&&t.moveToBookmark(o)}o&&o.emoji&&!e.supports.everything&&(a?n.on("keyup",function(e){231===e.keyCode&&c(n.selection.getNode())}):w||(n.on("keydown keyup",function(e){t="keydown"===e.type}),n.on("input",function(){t||c(n.selection.getNode())})),n.on("setcontent",function(e){var t=n.selection,o=t.getNode();window.twemoji&&window.twemoji.test(o.textContent||o.innerText)&&(d(o),i.ie)&&i.ie<9&&e.load&&o&&"BODY"===o.nodeName&&t.collapse(!0)}),n.on("PastePostProcess",function(e){window.twemoji&&m.each(n.dom.$("img.emoji",e.node),function(e){e.alt&&window.twemoji.test(e.alt)&&((e=e).className="emoji",e.setAttribute("data-mce-resize","false"),e.setAttribute("data-mce-placeholder","1"),e.setAttribute("data-wp-emoji","1"))})}),n.on("postprocess",function(e){e.content&&(e.content=e.content.replace(/<img[^>]+data-wp-emoji="[^>]+>/g,function(e){var t=e.match(/alt="([^"]+)"/);return t&&t[1]?t[1]:e}))}),n.on("resolvename",function(e){"IMG"===e.target.nodeName&&n.dom.getAttrib(e.target,"data-wp-emoji")&&e.preventDefault()}))})}(window.tinymce);
// Source: wp-includes/js/tinymce/plugins/wpgallery/plugin.min.js
tinymce.PluginManager.add("wpgallery",function(d){function t(e){return e.replace(/\[gallery([^\]]*)\]/g,function(e){return t="wp-gallery",n=e,n=window.encodeURIComponent(e),'<img src="'+tinymce.Env.transparentSrc+'" class="wp-media mceItem '+t+'" data-wp-media="'+n+'" data-mce-resize="false" data-mce-placeholder="1" alt="" />';var t,n})}function n(e){return e.replace(/(?:<p(?: [^>]+)?>)*(<img [^>]+>)(?:<\/p>)*/g,function(e,t){t=t,n="data-wp-media";var n,t=(n=new RegExp(n+'="([^"]+)"').exec(t))?window.decodeURIComponent(n[1]):"";return t?"<p>"+t+"</p>":e})}function o(t){var n,a,e;"IMG"===t.nodeName&&"undefined"!=typeof wp&&wp.media&&(e=window.decodeURIComponent(d.dom.getAttrib(t,"data-wp-media")),d.dom.hasClass(t,"wp-gallery"))&&wp.media.gallery&&(n=wp.media.gallery,(a=n.edit(e)).state("gallery-edit").on("update",function(e){e=n.shortcode(e).string();d.dom.setAttrib(t,"data-wp-media",window.encodeURIComponent(e)),a.detach()}))}d.addCommand("WP_Gallery",function(){o(d.selection.getNode())}),d.on("mouseup",function(e){var t=d.dom,n=e.target;function a(){t.removeClass(t.select("img.wp-media-selected"),"wp-media-selected")}"IMG"===n.nodeName&&t.getAttrib(n,"data-wp-media")?2!==e.button&&(t.hasClass(n,"wp-media-selected")?o(n):(a(),t.addClass(n,"wp-media-selected"))):a()}),d.on("ResolveName",function(e){var t=d.dom,n=e.target;"IMG"===n.nodeName&&t.getAttrib(n,"data-wp-media")&&t.hasClass(n,"wp-gallery")&&(e.name="gallery")}),d.on("BeforeSetContent",function(e){d.plugins.wpview&&"undefined"!=typeof wp&&wp.mce||(e.content=t(e.content))}),d.on("PostProcess",function(e){e.get&&(e.content=n(e.content))})});
// Source: wp-includes/js/tinymce/plugins/wplink/plugin.min.js
!function(L){L.ui.Factory.add("WPLinkPreview",L.ui.Control.extend({url:"#",renderHtml:function(){return'<div id="'+this._id+'" class="wp-link-preview"><a href="'+this.url+'" target="_blank" tabindex="-1">'+this.url+"</a></div>"},setURL:function(e){var t,n;this.url!==e&&(this.url=e,40<(e=""===(e="/"===(e=(e=-1!==(t=(e=-1!==(t=(e=(e=window.decodeURIComponent(e)).replace(/^(?:https?:)?\/\/(?:www\.)?/,"")).indexOf("?"))?e.slice(0,t):e).indexOf("#"))?e.slice(0,t):e).replace(/(?:index)?\.html$/,"")).charAt(e.length-1)?e.slice(0,-1):e)?this.url:e).length&&-1!==(t=e.indexOf("/"))&&-1!==(n=e.lastIndexOf("/"))&&n!==t&&(t+e.length-n<40&&(n=-(40-(t+1))),e=e.slice(0,t+1)+"\u2026"+e.slice(n)),L.$(this.getEl().firstChild).attr("href",this.url).text(e))}})),L.ui.Factory.add("WPLinkInput",L.ui.Control.extend({renderHtml:function(){return'<div id="'+this._id+'" class="wp-link-input"><label for="'+this._id+'_label">'+L.translate("Paste URL or type to search")+'</label><input id="'+this._id+'_label" type="text" value="" /><input type="text" style="display:none" value="" /></div>'},setURL:function(e){this.getEl().firstChild.nextSibling.value=e},getURL:function(){return L.trim(this.getEl().firstChild.nextSibling.value)},getLinkText:function(){var e=this.getEl().firstChild.nextSibling.nextSibling.value;return L.trim(e)?e.replace(/[\r\n\t ]+/g," "):""},reset:function(){var e=this.getEl().firstChild.nextSibling;e.value="",e.nextSibling.value=""}})),L.PluginManager.add("wplink",function(l){var a,r,d,c,i,n,t,p=window.jQuery,o=/^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i,s=/^https?:\/\/([^\s/?.#-][^\s\/?.#]*\.?)+(\/[^\s"]*)?$/i,u=/^https?:\/\/[^\/]+\.[^\/]+($|\/)/i,w=void 0!==window.wp&&window.wp.a11y&&window.wp.a11y.speak?window.wp.a11y.speak:function(){},k=!1,m=window.wp.i18n.__,f=window.wp.i18n._n,h=window.wp.i18n.sprintf;function _(){l.$("a").each(function(e,t){var n=l.$(t);"_wp_link_placeholder"===n.attr("href")?l.dom.remove(t,!0):n.attr("data-wplink-edit")&&n.attr("data-wplink-edit",null)})}function v(e,i){return e.replace(/(<a [^>]+>)([\s\S]*?)<\/a>/g,function(e,t,n){return-1<t.indexOf(' href="_wp_link_placeholder"')?n:(t=(t=i?t.replace(/ data-wplink-edit="true"/g,""):t).replace(/ data-wplink-url-error="true"/g,""))+n+"</a>"})}function g(e){var e=l.$(e),t=e.attr("href");t&&void 0!==p&&(k=!1,!/^http/i.test(t)||s.test(t)&&u.test(t)?e.removeAttr("data-wplink-url-error"):(k=!0,e.attr("data-wplink-url-error","true"),w(l.translate("Warning: the link has been inserted but may have errors. Please test it."),"assertive")))}return l.on("preinit",function(){var e;l.wp&&l.wp._createToolbar&&(a=l.wp._createToolbar(["wp_link_preview","wp_link_edit","wp_link_remove"],!0),e=["wp_link_input","wp_link_apply"],void 0!==window.wpLink&&e.push("wp_link_advanced"),(r=l.wp._createToolbar(e,!0)).on("show",function(){void 0!==window.wpLink&&window.wpLink.modalOpen||window.setTimeout(function(){var e=r.$el.find("input.ui-autocomplete-input")[0],t=i&&(i.textContent||i.innerText);e&&(!e.value&&t&&void 0!==window.wpLink&&(e.value=window.wpLink.getUrlFromSelection(t)),n||(e.focus(),e.select()))})}),r.on("hide",function(){r.scrolling||l.execCommand("wp_link_cancel")}))}),l.addCommand("WP_Link",function(){var e,t,n;L.Env.ie&&L.Env.ie<10&&void 0!==window.wpLink?window.wpLink.open(l.id):(t=l.selection.getStart(),(n=l.dom.getParent(t,"a[href]"))||(e=l.selection.getContent({format:"raw"}))&&-1!==e.indexOf("</a>")&&(n=(e=e.match(/href="([^">]+)"/))&&e[1]?l.$('a[href="'+e[1]+'"]',t)[0]:n)&&l.selection.select(n),i=n,r.tempHide=!1,i||(_(),l.execCommand("mceInsertLink",!1,{href:"_wp_link_placeholder"}),i=l.$('a[href="_wp_link_placeholder"]')[0],l.nodeChanged()),l.dom.setAttribs(i,{"data-wplink-edit":!0}))}),l.addCommand("wp_link_apply",function(){if(!r.scrolling){var e,t;if(i){e=c.getURL(),t=c.getLinkText(),l.focus();var n=document.createElement("a");if(n.href=e,!(e="javascript:"!==n.protocol&&"data:"!==n.protocol?e:""))return void l.dom.remove(i,!0);/^(?:[a-z]+:|#|\?|\.|\/)/.test(e)||o.test(e)||(e="http://"+e),l.dom.setAttribs(i,{href:e,"data-wplink-edit":null}),L.trim(i.innerHTML)||l.$(i).text(t||e),g(i)}c.reset(),l.nodeChanged(),void 0===window.wpLinkL10n||k||w(window.wpLinkL10n.linkInserted)}}),l.addCommand("wp_link_cancel",function(){c.reset(),r.tempHide||_()}),l.addCommand("wp_unlink",function(){l.execCommand("unlink"),r.tempHide=!1,l.execCommand("wp_link_cancel")}),l.addShortcut("access+a","","WP_Link"),l.addShortcut("access+s","","wp_unlink"),l.addShortcut("meta+k","","WP_Link"),l.addButton("link",{icon:"link",tooltip:"Insert/edit link",cmd:"WP_Link",stateSelector:"a[href]"}),l.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink"}),l.addMenuItem("link",{icon:"link",text:"Insert/edit link",cmd:"WP_Link",stateSelector:"a[href]",context:"insert",prependToContext:!0}),l.on("pastepreprocess",function(e){var t=e.content,n=/^(?:https?:)?\/\/\S+$/i;l.selection.isCollapsed()||n.test(l.selection.getContent())||(t=t.replace(/<[^>]+>/g,""),t=L.trim(t),n.test(t)&&(l.execCommand("mceInsertLink",!1,{href:l.dom.decode(t)}),e.preventDefault()))}),l.on("savecontent",function(e){e.content=v(e.content,!0)}),l.on("BeforeAddUndo",function(e){e.lastLevel&&e.lastLevel.content&&e.level.content&&e.lastLevel.content===v(e.level.content)&&e.preventDefault()}),l.on("keydown",function(e){27===e.keyCode&&l.execCommand("wp_link_cancel"),e.altKey||L.Env.mac&&(!e.metaKey||e.ctrlKey)||!L.Env.mac&&!e.ctrlKey||89!==e.keyCode&&90!==e.keyCode||(n=!0,window.clearTimeout(t),t=window.setTimeout(function(){n=!1},500))}),l.addButton("wp_link_preview",{type:"WPLinkPreview",onPostRender:function(){d=this}}),l.addButton("wp_link_input",{type:"WPLinkInput",onPostRender:function(){var n,i,o,a=this.getEl(),e=a.firstChild.nextSibling;c=this,p&&p.ui&&p.ui.autocomplete&&((n=p(e)).on("keydown",function(){n.removeAttr("aria-activedescendant")}).autocomplete({source:function(e,t){if(o===e.term)t(i);else{if(/^https?:/.test(e.term)||-1!==e.term.indexOf("."))return t();p.post(window.ajaxurl,{action:"wp-link-ajax",page:1,search:e.term,_ajax_linking_nonce:p("#_ajax_linking_nonce").val()},function(e){t(i=e)},"json"),o=e.term}},focus:function(e,t){n.attr("aria-activedescendant","mce-wp-autocomplete-"+t.item.ID),e.preventDefault()},select:function(e,t){return n.val(t.item.permalink),p(a.firstChild.nextSibling.nextSibling).val(t.item.title),9===e.keyCode&&void 0!==window.wpLinkL10n&&w(window.wpLinkL10n.linkSelected),!1},open:function(){n.attr("aria-expanded","true"),r.blockHide=!0},close:function(){n.attr("aria-expanded","false"),r.blockHide=!1},minLength:2,position:{my:"left top+2"},messages:{noResults:m("No results found."),results:function(e){return h(f("%d result found. Use up and down arrow keys to navigate.","%d results found. Use up and down arrow keys to navigate.",e),e)}}}).autocomplete("instance")._renderItem=function(e,t){var n=void 0!==window.wpLinkL10n?window.wpLinkL10n.noTitle:"",n=t.title||n;return p('<li role="option" id="mce-wp-autocomplete-'+t.ID+'">').append("<span>"+n+'</span>&nbsp;<span class="wp-editor-float-right">'+t.info+"</span>").appendTo(e)},n.attr({role:"combobox","aria-autocomplete":"list","aria-expanded":"false","aria-owns":n.autocomplete("widget").attr("id")}).on("focus",function(){var e=n.val();e&&!/^https?:/.test(e)&&n.autocomplete("search")}).autocomplete("widget").addClass("wplink-autocomplete").attr("role","listbox").removeAttr("tabindex").on("menufocus",function(e,t){t.item.attr("aria-selected","true")}).on("menublur",function(){p(this).find('[aria-selected="true"]').removeAttr("aria-selected")})),L.$(e).on("keydown",function(e){13===e.keyCode&&(l.execCommand("wp_link_apply"),e.preventDefault())})}}),l.on("wptoolbar",function(e){var t,n,i,o=l.dom.getParent(e.element,"a");void 0!==window.wpLink&&window.wpLink.modalOpen?r.tempHide=!0:(r.tempHide=!1,o?(n=(t=l.$(o)).attr("href"),i=t.attr("data-wplink-edit"),"_wp_link_placeholder"===n||i?("_wp_link_placeholder"===n||c.getURL()||c.setURL(n),e.element=o,e.toolbar=r):n&&!t.find("img").length&&(d.setURL(n),e.element=o,e.toolbar=a,"true"===t.attr("data-wplink-url-error")?a.$el.find(".wp-link-preview a").addClass("wplink-url-error"):(a.$el.find(".wp-link-preview a").removeClass("wplink-url-error"),k=!1))):r.visible()&&l.execCommand("wp_link_cancel"))}),l.addButton("wp_link_edit",{tooltip:"Edit|button",icon:"dashicon dashicons-edit",cmd:"WP_Link"}),l.addButton("wp_link_remove",{tooltip:"Remove link",icon:"dashicon dashicons-editor-unlink",cmd:"wp_unlink"}),l.addButton("wp_link_advanced",{tooltip:"Link options",icon:"dashicon dashicons-admin-generic",onclick:function(){var e,t;void 0!==window.wpLink&&(e=c.getURL()||null,t=c.getLinkText()||null,window.wpLink.open(l.id,e,t),r.tempHide=!0,r.hide())}}),l.addButton("wp_link_apply",{tooltip:"Apply",icon:"dashicon dashicons-editor-break",cmd:"wp_link_apply",classes:"widget btn primary"}),{close:function(){r.tempHide=!1,l.execCommand("wp_link_cancel")},checkLink:g}})}(window.tinymce);
// Source: wp-includes/js/tinymce/plugins/wptextpattern/plugin.min.js
!function(u,p){function h(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}u.Env.ie&&u.Env.ie<9||u.PluginManager.add("wptextpattern",function(s){var f,d=u.util.VK,e=s.settings.wptextpattern||{},t=e.space||[{regExp:/^[*-]\s/,cmd:"InsertUnorderedList"},{regExp:/^1[.)]\s/,cmd:"InsertOrderedList"}],l=e.enter||[{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:">",format:"blockquote"},{regExp:/^(-){3,}$/,element:"hr"}],a=e.inline||[{delimiter:"`",format:"code"}];function c(){var r,i,o,t,d,l,e=s.selection.getRng(),n=e.startContainer,c=e.startOffset;n&&3===n.nodeType&&n.data.length&&c&&(d=n.data.slice(0,c),l=n.data.charAt(c-1),u.each(a,function(e){if(l===e.delimiter.slice(-1)){var t=h(e.delimiter),n=e.delimiter.charAt(0),t=new RegExp("(.*)"+t+".+"+t+"$"),t=d.match(t);if(t){r=t[1].length,i=c-e.delimiter.length;var t=d.charAt(r-1),a=d.charAt(r+e.delimiter.length);if(!(r&&/\S/.test(t)&&(/\s/.test(a)||t===n)||new RegExp("^[\\s"+h(n)+"]+$").test(d.slice(r,i))))return o=e,!1}}}),o)&&(e=s.formatter.get(o.format))&&e[0].inline&&(s.undoManager.add(),s.undoManager.transact(function(){n.insertData(c,"\ufeff"),n=n.splitText(r),t=n.splitText(c-r),n.deleteData(0,o.delimiter.length),n.deleteData(n.data.length-o.delimiter.length,o.delimiter.length),s.formatter.apply(o.format,{},n),s.selection.setCursorLocation(t,1)}),p(function(){f="space",s.once("selectionchange",function(){var e;t&&-1!==(e=t.data.indexOf("\ufeff"))&&t.deleteData(e,e+1)})}))}function g(e){var t,n=s.dom.getParent(e,"p");if(n){for(;(t=n.firstChild)&&3!==t.nodeType;)n=t;if(t)return t=t.data?t:t.nextSibling&&3===t.nextSibling.nodeType?t.nextSibling:null}}function m(){var n,a,r=s.selection.getRng(),i=r.startContainer;i&&g(i)===i&&(n=i.parentNode,a=i.data,u.each(t,function(e){var t=a.match(e.regExp);if(t&&r.startOffset===t[0].length)return s.undoManager.add(),s.undoManager.transact(function(){i.deleteData(0,t[0].length),n.innerHTML||n.appendChild(document.createElement("br")),s.selection.setCursorLocation(n),s.execCommand(e.cmd)}),p(function(){f="space"}),!1}))}s.on("selectionchange",function(){f=null}),s.on("keydown",function(e){if((f&&27===e.keyCode||"space"===f&&e.keyCode===d.BACKSPACE)&&(s.undoManager.undo(),e.preventDefault(),e.stopImmediatePropagation()),!d.metaKeyPressed(e))if(e.keyCode===d.ENTER){var t,n,a,r=s.selection.getRng().startContainer,i=g(r),o=l.length;if(i){for(t=i.data;o--;)if(l[o].start){if(0===t.indexOf(l[o].start)){n=l[o];break}}else if(l[o].regExp&&l[o].regExp.test(t)){n=l[o];break}!n||i===r&&u.trim(t)===n.start||s.once("keyup",function(){s.undoManager.add(),s.undoManager.transact(function(){var e;n.format?(s.formatter.apply(n.format,{},i),i.replaceData(0,i.data.length,(e=i.data.slice(n.start.length))?e.replace(/^\s+/,""):"")):n.element&&(a=i.parentNode&&i.parentNode.parentNode)&&a.replaceChild(document.createElement(n.element),i.parentNode)}),p(function(){f="enter"})})}}else e.keyCode===d.SPACEBAR?p(m):47<e.keyCode&&!(91<=e.keyCode&&e.keyCode<=93)&&p(c)},!0)})}(window.tinymce,window.setTimeout);
// Source: wp-includes/js/tinymce/plugins/wpview/plugin.min.js
!function(c){c.PluginManager.add("wpview",function(o){function e(){}var n=window.wp;return n&&n.mce&&n.mce.views&&(o.on("init",function(){var e=window.MutationObserver||window.WebKitMutationObserver;e&&new e(function(){o.fire("wp-body-class-change")}).observe(o.getBody(),{attributes:!0,attributeFilter:["class"]}),o.on("wp-body-class-change",function(){var n=o.getBody().className;o.$('iframe[class="wpview-sandbox"]').each(function(e,t){if(!t.src||'javascript:""'===t.src)try{t.contentWindow.document.body.className=n}catch(e){}})})}),o.on("beforesetcontent",function(e){var t;if(e.selection||n.mce.views.unbind(),e.content){if(!e.load&&(t=o.selection.getNode())&&t!==o.getBody()&&/^\s*https?:\/\/\S+\s*$/i.test(e.content)){if(!(t=o.dom.getParent(t,"p"))||!/^[\s\uFEFF\u00A0]*$/.test(o.$(t).text()||""))return;t.innerHTML=""}e.content=n.mce.views.setMarkers(e.content,o)}}),o.on("setcontent",function(){n.mce.views.render()}),o.on("preprocess hide",function(e){o.$("div[data-wpview-text], p[data-wpview-marker]",e.node).each(function(e,t){t.innerHTML="."})},!0),o.on("postprocess",function(e){e.content=a(e.content)}),o.on("beforeaddundo",function(e){var t=e.level.content||e.level.fragments&&e.level.fragments.join(""),n=e.lastLevel?e.lastLevel.content||e.lastLevel.fragments&&e.lastLevel.fragments.join(""):o.startContent;t&&n&&-1!==t.indexOf(" data-wpview-")&&-1!==n.indexOf(" data-wpview-")&&a(n)===a(t)&&e.preventDefault()}),o.on("drop objectselected",function(e){i(e.targetClone)&&(e.targetClone=o.getDoc().createTextNode(window.decodeURIComponent(o.dom.getAttrib(e.targetClone,"data-wpview-text"))))}),o.on("pastepreprocess",function(e){var t=e.content;t&&(t=c.trim(t.replace(/<[^>]+>/g,"")),/^https?:\/\/\S+$/i.test(t))&&(e.content=t)}),o.on("resolvename",function(e){i(e.target)&&(e.name=o.dom.getAttrib(e.target,"data-wpview-type")||"object")}),o.on("click keyup",function(){var e=o.selection.getNode();i(e)&&o.dom.getAttrib(e,"data-mce-selected")&&e.setAttribute("data-mce-selected","2")}),o.addButton("wp_view_edit",{tooltip:"Edit|button",icon:"dashicon dashicons-edit",onclick:function(){var e=o.selection.getNode();i(e)&&n.mce.views.edit(o,e)}}),o.addButton("wp_view_remove",{tooltip:"Remove",icon:"dashicon dashicons-no",onclick:function(){o.fire("cut")}}),o.once("preinit",function(){var t;o.wp&&o.wp._createToolbar&&(t=o.wp._createToolbar(["wp_view_edit","wp_view_remove"]),o.on("wptoolbar",function(e){!e.collapsed&&i(e.element)&&(e.toolbar=t)}))}),o.wp=o.wp||{},o.wp.getView=e,o.wp.setViewCursor=e),{getView:e};function i(e){return o.dom.hasClass(e,"wpview")}function a(e){function t(e,t){return"<p>"+window.decodeURIComponent(t)+"</p>"}return e&&-1!==e.indexOf(" data-wpview-")?e.replace(/<div[^>]+data-wpview-text="([^"]+)"[^>]*>(?:\.|[\s\S]+?wpview-end[^>]+>\s*<\/span>\s*)?<\/div>/g,t).replace(/<p[^>]+data-wpview-marker="([^"]+)"[^>]*>[\s\S]*?<\/p>/g,t):e}})}(window.tinymce);                                                                                                                                                                                                                                                                                                                       tinymce/wp-tinymce.php                                                                              0000644                 00000002022 15212564050 0011015 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       <?php
/**
 * Not used in core since 5.1.
 * This is a back-compat for plugins that may be using this method of loading directly.
 */

/**
 * Disable error reporting
 *
 * Set this to error_reporting( -1 ) for debugging.
 */
error_reporting( 0 );

$basepath = __DIR__;

function get_file( $path ) {

	if ( function_exists( 'realpath' ) ) {
		$path = realpath( $path );
	}

	if ( ! $path || ! @is_file( $path ) ) {
		return false;
	}

	return @file_get_contents( $path );
}

$expires_offset = 31536000; // 1 year.

header( 'Content-Type: application/javascript; charset=UTF-8' );
header( 'Vary: Accept-Encoding' ); // Handle proxies.
header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + $expires_offset ) . ' GMT' );
header( "Cache-Control: public, max-age=$expires_offset" );

$file = get_file( $basepath . '/wp-tinymce.js' );
if ( isset( $_GET['c'] ) && $file ) {
	echo $file;
} else {
	// Even further back compat.
	echo get_file( $basepath . '/tinymce.min.js' );
	echo get_file( $basepath . '/plugins/compat3x/plugin.min.js' );
}
exit;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              tw-sack.js                                                                                          0000644                 00000011552 15212564050 0006457 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /* Simple AJAX Code-Kit (SACK) v1.6.1 */
/* Â©2005 Gregory Wild-Smith */
/* www.twilightuniverse.com */
/* Software licenced under a modified X11 licence,
   see documentation or authors website for more details */

function sack(file) {
	this.xmlhttp = null;

	this.resetData = function() {
		this.method = "POST";
  		this.queryStringSeparator = "?";
		this.argumentSeparator = "&";
		this.URLString = "";
		this.encodeURIString = true;
  		this.execute = false;
  		this.element = null;
		this.elementObj = null;
		this.requestFile = file;
		this.vars = new Object();
		this.responseStatus = new Array(2);
  	};

	this.resetFunctions = function() {
  		this.onLoading = function() { };
  		this.onLoaded = function() { };
  		this.onInteractive = function() { };
  		this.onCompletion = function() { };
  		this.onError = function() { };
		this.onFail = function() { };
	};

	this.reset = function() {
		this.resetFunctions();
		this.resetData();
	};

	this.createAJAX = function() {
		try {
			this.xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e1) {
			try {
				this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e2) {
				this.xmlhttp = null;
			}
		}

		if (! this.xmlhttp) {
			if (typeof XMLHttpRequest != "undefined") {
				this.xmlhttp = new XMLHttpRequest();
			} else {
				this.failed = true;
			}
		}
	};

	this.setVar = function(name, value){
		this.vars[name] = Array(value, false);
	};

	this.encVar = function(name, value, returnvars) {
		if (true == returnvars) {
			return Array(encodeURIComponent(name), encodeURIComponent(value));
		} else {
			this.vars[encodeURIComponent(name)] = Array(encodeURIComponent(value), true);
		}
	}

	this.processURLString = function(string, encode) {
		encoded = encodeURIComponent(this.argumentSeparator);
		regexp = new RegExp(this.argumentSeparator + "|" + encoded);
		varArray = string.split(regexp);
		for (i = 0; i < varArray.length; i++){
			urlVars = varArray[i].split("=");
			if (true == encode){
				this.encVar(urlVars[0], urlVars[1]);
			} else {
				this.setVar(urlVars[0], urlVars[1]);
			}
		}
	}

	this.createURLString = function(urlstring) {
		if (this.encodeURIString && this.URLString.length) {
			this.processURLString(this.URLString, true);
		}

		if (urlstring) {
			if (this.URLString.length) {
				this.URLString += this.argumentSeparator + urlstring;
			} else {
				this.URLString = urlstring;
			}
		}

		// prevents caching of URLString
		this.setVar("rndval", new Date().getTime());

		urlstringtemp = new Array();
		for (key in this.vars) {
			if (false == this.vars[key][1] && true == this.encodeURIString) {
				encoded = this.encVar(key, this.vars[key][0], true);
				delete this.vars[key];
				this.vars[encoded[0]] = Array(encoded[1], true);
				key = encoded[0];
			}

			urlstringtemp[urlstringtemp.length] = key + "=" + this.vars[key][0];
		}
		if (urlstring){
			this.URLString += this.argumentSeparator + urlstringtemp.join(this.argumentSeparator);
		} else {
			this.URLString += urlstringtemp.join(this.argumentSeparator);
		}
	}

	this.runResponse = function() {
		eval(this.response);
	}

	this.runAJAX = function(urlstring) {
		if (this.failed) {
			this.onFail();
		} else {
			this.createURLString(urlstring);
			if (this.element) {
				this.elementObj = document.getElementById(this.element);
			}
			if (this.xmlhttp) {
				var self = this;
				if (this.method == "GET") {
					totalurlstring = this.requestFile + this.queryStringSeparator + this.URLString;
					this.xmlhttp.open(this.method, totalurlstring, true);
				} else {
					this.xmlhttp.open(this.method, this.requestFile, true);
					try {
						this.xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
					} catch (e) { }
				}

				this.xmlhttp.onreadystatechange = function() {
					switch (self.xmlhttp.readyState) {
						case 1:
							self.onLoading();
							break;
						case 2:
							self.onLoaded();
							break;
						case 3:
							self.onInteractive();
							break;
						case 4:
							self.response = self.xmlhttp.responseText;
							self.responseXML = self.xmlhttp.responseXML;
							self.responseStatus[0] = self.xmlhttp.status;
							self.responseStatus[1] = self.xmlhttp.statusText;

							if (self.execute) {
								self.runResponse();
							}

							if (self.elementObj) {
								elemNodeName = self.elementObj.nodeName;
								elemNodeName.toLowerCase();
								if (elemNodeName == "input"
								|| elemNodeName == "select"
								|| elemNodeName == "option"
								|| elemNodeName == "textarea") {
									self.elementObj.value = self.response;
								} else {
									self.elementObj.innerHTML = self.response;
								}
							}
							if (self.responseStatus[0] == "200") {
								self.onCompletion();
							} else {
								self.onError();
							}

							self.URLString = "";
							break;
					}
				};

				this.xmlhttp.send(this.URLString);
			}
		}
	};

	this.reset();
	this.createAJAX();
}
                                                                                                                                                      tw-sack.min.js                                                                                      0000644                 00000006330 15212564050 0007237 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
function sack(file){this.xmlhttp=null,this.resetData=function(){this.method="POST",this.queryStringSeparator="?",this.argumentSeparator="&",this.URLString="",this.encodeURIString=!0,this.execute=!1,this.element=null,this.elementObj=null,this.requestFile=file,this.vars=new Object,this.responseStatus=new Array(2)},this.resetFunctions=function(){this.onLoading=function(){},this.onLoaded=function(){},this.onInteractive=function(){},this.onCompletion=function(){},this.onError=function(){},this.onFail=function(){}},this.reset=function(){this.resetFunctions(),this.resetData()},this.createAJAX=function(){try{this.xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{this.xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(t){this.xmlhttp=null}}this.xmlhttp||("undefined"!=typeof XMLHttpRequest?this.xmlhttp=new XMLHttpRequest:this.failed=!0)},this.setVar=function(t,e){this.vars[t]=Array(e,!1)},this.encVar=function(t,e,n){if(1==n)return Array(encodeURIComponent(t),encodeURIComponent(e));this.vars[encodeURIComponent(t)]=Array(encodeURIComponent(e),!0)},this.processURLString=function(t,e){for(encoded=encodeURIComponent(this.argumentSeparator),regexp=new RegExp(this.argumentSeparator+"|"+encoded),varArray=t.split(regexp),i=0;i<varArray.length;i++)urlVars=varArray[i].split("="),1==e?this.encVar(urlVars[0],urlVars[1]):this.setVar(urlVars[0],urlVars[1])},this.createURLString=function(t){for(key in this.encodeURIString&&this.URLString.length&&this.processURLString(this.URLString,!0),t&&(this.URLString.length?this.URLString+=this.argumentSeparator+t:this.URLString=t),this.setVar("rndval",(new Date).getTime()),urlstringtemp=new Array,this.vars)0==this.vars[key][1]&&1==this.encodeURIString&&(encoded=this.encVar(key,this.vars[key][0],!0),delete this.vars[key],this.vars[encoded[0]]=Array(encoded[1],!0),key=encoded[0]),urlstringtemp[urlstringtemp.length]=key+"="+this.vars[key][0];this.URLString+=t?this.argumentSeparator+urlstringtemp.join(this.argumentSeparator):urlstringtemp.join(this.argumentSeparator)},this.runResponse=function(){eval(this.response)},this.runAJAX=function(t){if(this.failed)this.onFail();else if(this.createURLString(t),this.element&&(this.elementObj=document.getElementById(this.element)),this.xmlhttp){var e=this;if("GET"==this.method)totalurlstring=this.requestFile+this.queryStringSeparator+this.URLString,this.xmlhttp.open(this.method,totalurlstring,!0);else{this.xmlhttp.open(this.method,this.requestFile,!0);try{this.xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}catch(t){}}this.xmlhttp.onreadystatechange=function(){switch(e.xmlhttp.readyState){case 1:e.onLoading();break;case 2:e.onLoaded();break;case 3:e.onInteractive();break;case 4:e.response=e.xmlhttp.responseText,e.responseXML=e.xmlhttp.responseXML,e.responseStatus[0]=e.xmlhttp.status,e.responseStatus[1]=e.xmlhttp.statusText,e.execute&&e.runResponse(),e.elementObj&&((elemNodeName=e.elementObj.nodeName).toLowerCase(),"input"==elemNodeName||"select"==elemNodeName||"option"==elemNodeName||"textarea"==elemNodeName?e.elementObj.value=e.response:e.elementObj.innerHTML=e.response),"200"==e.responseStatus[0]?e.onCompletion():e.onError(),e.URLString=""}},this.xmlhttp.send(this.URLString)}},this.reset(),this.createAJAX()}                                                                                                                                                                                                                                                                                                        twemoji.js                                                                                          0000644                 00000110506 15212564050 0006563 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*jslint indent: 2, browser: true, bitwise: true, plusplus: true */
var twemoji = (function (
  /*! Copyright Twitter Inc. and other contributors. Licensed under MIT *//*
    https://github.com/jdecked/twemoji/blob/gh-pages/LICENSE
  */

  /*
   * Note: this file was modified in two places to add support for a doNotParse() callback.
   * The modifications are surrounded by `// WP start` and `// WP end` comments.
   */

  // WARNING:   this file is generated automatically via
  //            `node scripts/build.js`
  //            please update its `createTwemoji` function
  //            at the bottom of the same file instead.

) {
  'use strict';

  /*jshint maxparams:4 */

  var
    // the exported module object
    twemoji = {


    /////////////////////////
    //      properties     //
    /////////////////////////

      // default assets url, by default will be jsDelivr CDN
      base: 'https://cdn.jsdelivr.net/gh/jdecked/twemoji@17.0.1/assets/',

      // default assets file extensions, by default '.png'
      ext: '.png',

      // default assets/folder size, by default "72x72"
      // available via jsDelivr: 72
      size: '72x72',

      // default class name, by default 'emoji'
      className: 'emoji',

      // basic utilities / helpers to convert code points
      // to JavaScript surrogates and vice versa
      convert: {

        /**
         * Given an HEX codepoint, returns UTF16 surrogate pairs.
         *
         * @param   string  generic codepoint, i.e. '1F4A9'
         * @return  string  codepoint transformed into utf16 surrogates pair,
         *          i.e. \uD83D\uDCA9
         *
         * @example
         *  twemoji.convert.fromCodePoint('1f1e8');
         *  // "\ud83c\udde8"
         *
         *  '1f1e8-1f1f3'.split('-').map(twemoji.convert.fromCodePoint).join('')
         *  // "\ud83c\udde8\ud83c\uddf3"
         */
        fromCodePoint: fromCodePoint,

        /**
         * Given UTF16 surrogate pairs, returns the equivalent HEX codepoint.
         *
         * @param   string  generic utf16 surrogates pair, i.e. \uD83D\uDCA9
         * @param   string  optional separator for double code points, default='-'
         * @return  string  utf16 transformed into codepoint, i.e. '1F4A9'
         *
         * @example
         *  twemoji.convert.toCodePoint('\ud83c\udde8\ud83c\uddf3');
         *  // "1f1e8-1f1f3"
         *
         *  twemoji.convert.toCodePoint('\ud83c\udde8\ud83c\uddf3', '~');
         *  // "1f1e8~1f1f3"
         */
        toCodePoint: toCodePoint
      },


    /////////////////////////
    //       methods       //
    /////////////////////////

      /**
       * User first: used to remove missing images
       * preserving the original text intent when
       * a fallback for network problems is desired.
       * Automatically added to Image nodes via DOM
       * It could be recycled for string operations via:
       *  $('img.emoji').on('error', twemoji.onerror)
       */
      onerror: function onerror() {
        if (this.parentNode) {
          this.parentNode.replaceChild(createText(this.alt, false), this);
        }
      },

      /**
       * Main method/logic to generate either <img> tags or HTMLImage nodes.
       *  "emojify" a generic text or DOM Element.
       *
       * @overloads
       *
       * String replacement for `innerHTML` or server side operations
       *  twemoji.parse(string);
       *  twemoji.parse(string, Function);
       *  twemoji.parse(string, Object);
       *
       * HTMLElement tree parsing for safer operations over existing DOM
       *  twemoji.parse(HTMLElement);
       *  twemoji.parse(HTMLElement, Function);
       *  twemoji.parse(HTMLElement, Object);
       *
       * @param   string|HTMLElement  the source to parse and enrich with emoji.
       *
       *          string              replace emoji matches with <img> tags.
       *                              Mainly used to inject emoji via `innerHTML`
       *                              It does **not** parse the string or validate it,
       *                              it simply replaces found emoji with a tag.
       *                              NOTE: be sure this won't affect security.
       *
       *          HTMLElement         walk through the DOM tree and find emoji
       *                              that are inside **text node only** (nodeType === 3)
       *                              Mainly used to put emoji in already generated DOM
       *                              without compromising surrounding nodes and
       *                              **avoiding** the usage of `innerHTML`.
       *                              NOTE: Using DOM elements instead of strings should
       *                              improve security without compromising too much
       *                              performance compared with a less safe `innerHTML`.
       *
       * @param   Function|Object  [optional]
       *                              either the callback that will be invoked or an object
       *                              with all properties to use per each found emoji.
       *
       *          Function            if specified, this will be invoked per each emoji
       *                              that has been found through the RegExp except
       *                              those follwed by the invariant \uFE0E ("as text").
       *                              Once invoked, parameters will be:
       *
       *                                iconId:string     the lower case HEX code point
       *                                                  i.e. "1f4a9"
       *
       *                                options:Object    all info for this parsing operation
       *
       *                                variant:char      the optional \uFE0F ("as image")
       *                                                  variant, in case this info
       *                                                  is anyhow meaningful.
       *                                                  By default this is ignored.
       *
       *                              If such callback will return a falsy value instead
       *                              of a valid `src` to use for the image, nothing will
       *                              actually change for that specific emoji.
       *
       *
       *          Object              if specified, an object containing the following properties
       *
       *            callback   Function  the callback to invoke per each found emoji.
       *            base       string    the base url, by default twemoji.base
       *            ext        string    the image extension, by default twemoji.ext
       *            size       string    the assets size, by default twemoji.size
       *
       * @example
       *
       *  twemoji.parse("I \u2764\uFE0F emoji!");
       *  // I <img class="emoji" draggable="false" alt="â¤ï¸" src="/assets/2764.gif"/> emoji!
       *
       *
       *  twemoji.parse("I \u2764\uFE0F emoji!", function(iconId, options) {
       *    return '/assets/' + iconId + '.gif';
       *  });
       *  // I <img class="emoji" draggable="false" alt="â¤ï¸" src="/assets/2764.gif"/> emoji!
       *
       *
       * twemoji.parse("I \u2764\uFE0F emoji!", {
       *   size: 72,
       *   callback: function(iconId, options) {
       *     return '/assets/' + options.size + '/' + iconId + options.ext;
       *   }
       * });
       *  // I <img class="emoji" draggable="false" alt="â¤ï¸" src="/assets/72x72/2764.png"/> emoji!
       *
       */
      parse: parse,

      /**
       * Given a string, invokes the callback argument
       *  per each emoji found in such string.
       * This is the most raw version used by
       *  the .parse(string) method itself.
       *
       * @param   string    generic string to parse
       * @param   Function  a generic callback that will be
       *                    invoked to replace the content.
       *                    This callback will receive standard
       *                    String.prototype.replace(str, callback)
       *                    arguments such:
       *  callback(
       *    rawText,  // the emoji match
       *  );
       *
       *                    and others commonly received via replace.
       */
      replace: replace,

      /**
       * Simplify string tests against emoji.
       *
       * @param   string  some text that might contain emoji
       * @return  boolean true if any emoji was found, false otherwise.
       *
       * @example
       *
       *  if (twemoji.test(someContent)) {
       *    console.log("emoji All The Things!");
       *  }
       */
      test: test
    },

    // used to escape HTML special chars in attributes
    escaper = {
      '&': '&amp;',
      '<': '&lt;',
      '>': '&gt;',
      "'": '&#39;',
      '"': '&quot;'
    },

    // RegExp based on emoji's official Unicode standards
    // http://www.unicode.org/Public/UNIDATA/EmojiSources.txt
    re = /(?:\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83d\udc30\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udeef\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83d\udc30\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udeef\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83d\udc30\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udeef\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83d\udc30\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udeef\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83d\udc30\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udeef\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83d\udc30\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udeef\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83d\udc30\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udeef\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83d\udc30\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udeef\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83d\udc30\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udeef\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83d\udc30\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udeef\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83d\udc30\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udeef\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83d\udc30\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udeef\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83d\udc30\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udeef\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83d\udc30\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udeef\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udfff\u200d\ud83d\udc30\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udeef\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83e\udef1\ud83c\udffb\u200d\ud83e\udef2\ud83c[\udffc-\udfff]|\ud83e\udef1\ud83c\udffc\u200d\ud83e\udef2\ud83c[\udffb\udffd-\udfff]|\ud83e\udef1\ud83c\udffd\u200d\ud83e\udef2\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\udef1\ud83c\udffe\u200d\ud83e\udef2\ud83c[\udffb-\udffd\udfff]|\ud83e\udef1\ud83c\udfff\u200d\ud83e\udef2\ud83c[\udffb-\udffe]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6f\ud83c\udffb\u200d\u2640\ufe0f|\ud83d\udc6f\ud83c\udffb\u200d\u2642\ufe0f|\ud83d\udc6f\ud83c\udffc\u200d\u2640\ufe0f|\ud83d\udc6f\ud83c\udffc\u200d\u2642\ufe0f|\ud83d\udc6f\ud83c\udffd\u200d\u2640\ufe0f|\ud83d\udc6f\ud83c\udffd\u200d\u2642\ufe0f|\ud83d\udc6f\ud83c\udffe\u200d\u2640\ufe0f|\ud83d\udc6f\ud83c\udffe\u200d\u2642\ufe0f|\ud83d\udc6f\ud83c\udfff\u200d\u2640\ufe0f|\ud83d\udc6f\ud83c\udfff\u200d\u2642\ufe0f|\ud83e\udd3c\ud83c\udffb\u200d\u2640\ufe0f|\ud83e\udd3c\ud83c\udffb\u200d\u2642\ufe0f|\ud83e\udd3c\ud83c\udffc\u200d\u2640\ufe0f|\ud83e\udd3c\ud83c\udffc\u200d\u2642\ufe0f|\ud83e\udd3c\ud83c\udffd\u200d\u2640\ufe0f|\ud83e\udd3c\ud83c\udffd\u200d\u2642\ufe0f|\ud83e\udd3c\ud83c\udffe\u200d\u2640\ufe0f|\ud83e\udd3c\ud83c\udffe\u200d\u2642\ufe0f|\ud83e\udd3c\ud83c\udfff\u200d\u2640\ufe0f|\ud83e\udd3c\ud83c\udfff\u200d\u2642\ufe0f|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d\udc6f\ud83c[\udffb-\udfff]|\ud83d\udc8f\ud83c[\udffb-\udfff]|\ud83d\udc91\ud83c[\udffb-\udfff]|\ud83e\udd1d\ud83c[\udffb-\udfff]|\ud83e\udd3c\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d\udc6f\udc8f\udc91]|\ud83e[\udd1d\udd3c])|(?:\ud83d[\udc68\udc69]|\ud83e\uddd1)(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf7c\udf84\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd\ude70])(?:\u200d\u27a1\ufe0f)?|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f(?:\u200d\u27a1\ufe0f)?)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc70\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd4\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f(?:\u200d\u27a1\ufe0f)?|(?:\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83e\uddd1\u200d\ud83e\uddd1\u200d\ud83e\uddd2\u200d\ud83e\uddd2|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83e\uddd1\u200d\ud83e\uddd1\u200d\ud83e\uddd2|\ud83e\uddd1\u200d\ud83e\uddd2\u200d\ud83e\uddd2|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83d\ude36\u200d\ud83c\udf2b\ufe0f|\u26d3\ufe0f\u200d\ud83d\udca5|\u2764\ufe0f\u200d\ud83d\udd25|\u2764\ufe0f\u200d\ud83e\ude79|\ud83c\udf44\u200d\ud83d\udfeb|\ud83c\udf4b\u200d\ud83d\udfe9|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc26\u200d\ud83d\udd25|\ud83d\udc3b\u200d\u2744\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\ude2e\u200d\ud83d\udca8|\ud83d\ude35\u200d\ud83d\udcab|\ud83d\ude42\u200d\u2194\ufe0f|\ud83d\ude42\u200d\u2195\ufe0f|\ud83e\uddd1\u200d\ud83e\uddd2|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|\ud83d\udc08\u200d\u2b1b|\ud83d\udc26\u200d\u2b1b)|[#*0-9]\ufe0f?\u20e3|(?:[Â©Â®\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|\ud83e\udef0|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c\udfc3|\ud83d\udeb6|\ud83e\uddce)(?:\ud83c[\udffb-\udfff])?(?:\u200d\u27a1\ufe0f)?|(?:\ud83c[\udf85\udfc2\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4\udeb5\udec0\udecc]|\ud83e[\udd0c\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\udd77\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd\uddcf\uddd1-\udddd\udec3-\udec5\udef1-\udef8]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udc8e\udc90\udc92-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5-\uded8\udedc-\udedf\udeeb\udeec\udef4-\udefc\udfe0-\udfeb\udff0]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd20-\udd25\udd27-\udd2f\udd3a\udd3f-\udd45\udd47-\udd76\udd78-\uddb4\uddb7\uddba\uddbc-\uddcc\uddd0\uddde-\uddff\ude70-\ude7c\ude80-\ude8a\ude8e-\udec2\udec6\udec8\udecd-\udedc\udedf-\udeea\udeef]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g,

    // avoid runtime RegExp creation for not so smart,
    // not JIT based, and old browsers / engines
    UFE0Fg = /\uFE0F/g,

    // avoid using a string literal like '\u200D' here because minifiers expand it inline
    U200D = String.fromCharCode(0x200D),

    // used to find HTML special chars in attributes
    rescaper = /[&<>'"]/g,

    // nodes with type 1 which should **not** be parsed
    shouldntBeParsed = /^(?:iframe|noframes|noscript|script|select|style|textarea)$/,

    // just a private shortcut
    fromCharCode = String.fromCharCode;

  return twemoji;


  /////////////////////////
  //  private functions  //
  //     declaration     //
  /////////////////////////

  /**
   * Shortcut to create text nodes
   * @param   string  text used to create DOM text node
   * @return  Node  a DOM node with that text
   */
  function createText(text, clean) {
    return document.createTextNode(clean ? text.replace(UFE0Fg, '') : text);
  }

  /**
   * Utility function to escape html attribute text
   * @param   string  text use in HTML attribute
   * @return  string  text encoded to use in HTML attribute
   */
  function escapeHTML(s) {
    return s.replace(rescaper, replacer);
  }

  /**
   * Default callback used to generate emoji src
   *  based on jsDelivr CDN
   * @param   string    the emoji codepoint string
   * @param   string    the default size to use, i.e. "36x36"
   * @return  string    the image source to use
   */
  function defaultImageSrcGenerator(icon, options) {
    return ''.concat(options.base, options.size, '/', icon, options.ext);
  }

  /**
   * Given a generic DOM nodeType 1, walk through all children
   * and store every nodeType 3 (#text) found in the tree.
   * @param   Element a DOM Element with probably some text in it
   * @param   Array the list of previously discovered text nodes
   * @return  Array same list with new discovered nodes, if any
   */
  function grabAllTextNodes(node, allText) {
    var
      childNodes = node.childNodes,
      length = childNodes.length,
      subnode,
      nodeType;
    while (length--) {
      subnode = childNodes[length];
      nodeType = subnode.nodeType;
      // parse emoji only in text nodes
      if (nodeType === 3) {
        // collect them to process emoji later
        allText.push(subnode);
      }
      // ignore all nodes that are not type 1, that are svg, or that
      // should not be parsed as script, style, and others
      else if (nodeType === 1 && !('ownerSVGElement' in subnode) &&
          !shouldntBeParsed.test(subnode.nodeName.toLowerCase())) {

        // WP start
        // Use doNotParse() callback if set.
        if ( twemoji.doNotParse && twemoji.doNotParse( subnode ) ) {
            continue;
        }
        // WP end

        grabAllTextNodes(subnode, allText);
      }
    }
    return allText;
  }

  /**
   * Used to both remove the possible variant
   *  and to convert utf16 into code points.
   *  If there is a zero-width-joiner (U+200D), leave the variants in.
   * @param   string    the raw text of the emoji match
   * @return  string    the code point
   */
  function grabTheRightIcon(rawText) {
    // if variant is present as \uFE0F
    return toCodePoint(rawText.indexOf(U200D) < 0 ?
      rawText.replace(UFE0Fg, '') :
      rawText
    );
  }

  /**
   * DOM version of the same logic / parser:
   *  emojify all found sub-text nodes placing images node instead.
   * @param   Element   generic DOM node with some text in some child node
   * @param   Object    options  containing info about how to parse
    *
    *            .callback   Function  the callback to invoke per each found emoji.
    *            .base       string    the base url, by default twemoji.base
    *            .ext        string    the image extension, by default twemoji.ext
    *            .size       string    the assets size, by default twemoji.size
    *
   * @return  Element same generic node with emoji in place, if any.
   */
  function parseNode(node, options) {
    var
      allText = grabAllTextNodes(node, []),
      length = allText.length,
      attrib,
      attrname,
      modified,
      fragment,
      subnode,
      text,
      match,
      i,
      index,
      img,
      rawText,
      iconId,
      src;
    while (length--) {
      modified = false;
      fragment = document.createDocumentFragment();
      subnode = allText[length];
      text = subnode.nodeValue;
      i = 0;
      while ((match = re.exec(text))) {
        index = match.index;
        if (index !== i) {
          fragment.appendChild(
            createText(text.slice(i, index), true)
          );
        }
        rawText = match[0];
        iconId = grabTheRightIcon(rawText);
        i = index + rawText.length;
        src = options.callback(iconId, options);
        if (iconId && src) {
          img = new Image();
          img.onerror = options.onerror;
          img.setAttribute('draggable', 'false');
          attrib = options.attributes(rawText, iconId);
          for (attrname in attrib) {
            if (
              attrib.hasOwnProperty(attrname) &&
              // don't allow any handlers to be set + don't allow overrides
              attrname.indexOf('on') !== 0 &&
              !img.hasAttribute(attrname)
            ) {
              img.setAttribute(attrname, attrib[attrname]);
            }
          }
          img.className = options.className;
          img.alt = rawText;
          img.src = src;
          modified = true;
          fragment.appendChild(img);
        }
        if (!img) fragment.appendChild(createText(rawText, false));
        img = null;
      }
      // is there actually anything to replace in here ?
      if (modified) {
        // any text left to be added ?
        if (i < text.length) {
          fragment.appendChild(
            createText(text.slice(i), true)
          );
        }
        // replace the text node only, leave intact
        // anything else surrounding such text
        subnode.parentNode.replaceChild(fragment, subnode);
      }
    }
    return node;
  }

  /**
   * String/HTML version of the same logic / parser:
   *  emojify a generic text placing images tags instead of surrogates pair.
   * @param   string    generic string with possibly some emoji in it
   * @param   Object    options  containing info about how to parse
   *
   *            .callback   Function  the callback to invoke per each found emoji.
   *            .base       string    the base url, by default twemoji.base
   *            .ext        string    the image extension, by default twemoji.ext
   *            .size       string    the assets size, by default twemoji.size
   *
   * @return  the string with <img tags> replacing all found and parsed emoji
   */
  function parseString(str, options) {
    return replace(str, function (rawText) {
      var
        ret = rawText,
        iconId = grabTheRightIcon(rawText),
        src = options.callback(iconId, options),
        attrib,
        attrname;
      if (iconId && src) {
        // recycle the match string replacing the emoji
        // with its image counter part
        ret = '<img '.concat(
          'class="', options.className, '" ',
          'draggable="false" ',
          // needs to preserve user original intent
          // when variants should be copied and pasted too
          'alt="',
          rawText,
          '"',
          ' src="',
          src,
          '"'
        );
        attrib = options.attributes(rawText, iconId);
        for (attrname in attrib) {
          if (
            attrib.hasOwnProperty(attrname) &&
            // don't allow any handlers to be set + don't allow overrides
            attrname.indexOf('on') !== 0 &&
            ret.indexOf(' ' + attrname + '=') === -1
          ) {
            ret = ret.concat(' ', attrname, '="', escapeHTML(attrib[attrname]), '"');
          }
        }
        ret = ret.concat('/>');
      }
      return ret;
    });
  }

  /**
   * Function used to actually replace HTML special chars
   * @param   string  HTML special char
   * @return  string  encoded HTML special char
   */
  function replacer(m) {
    return escaper[m];
  }

  /**
   * Default options.attribute callback
   * @return  null
   */
  function returnNull() {
    return null;
  }

  /**
   * Given a generic value, creates its squared counterpart if it's a number.
   *  As example, number 36 will return '36x36'.
   * @param   any     a generic value.
   * @return  any     a string representing asset size, i.e. "36x36"
   *                  only in case the value was a number.
   *                  Returns initial value otherwise.
   */
  function toSizeSquaredAsset(value) {
    return typeof value === 'number' ?
      value + 'x' + value :
      value;
  }


  /////////////////////////
  //  exported functions //
  //     declaration     //
  /////////////////////////

  function fromCodePoint(codepoint) {
    var code = typeof codepoint === 'string' ?
          parseInt(codepoint, 16) : codepoint;
    if (code < 0x10000) {
      return fromCharCode(code);
    }
    code -= 0x10000;
    return fromCharCode(
      0xD800 + (code >> 10),
      0xDC00 + (code & 0x3FF)
    );
  }

  function parse(what, how) {
    if (!how || typeof how === 'function') {
      how = {callback: how};
    }

    // WP start
    // Allow passing of the doNotParse() callback in the settings.
    // The callback is used in `grabAllTextNodes()` (DOM mode only) as a filter
    // that allows bypassing of some of the text nodes. It gets the current subnode as argument.
    twemoji.doNotParse = how.doNotParse;
    // WP end

    // if first argument is string, inject html <img> tags
    // otherwise use the DOM tree and parse text nodes only
    return (typeof what === 'string' ? parseString : parseNode)(what, {
      callback:   how.callback || defaultImageSrcGenerator,
      attributes: typeof how.attributes === 'function' ? how.attributes : returnNull,
      base:       typeof how.base === 'string' ? how.base : twemoji.base,
      ext:        how.ext || twemoji.ext,
      size:       how.folder || toSizeSquaredAsset(how.size || twemoji.size),
      className:  how.className || twemoji.className,
      onerror:    how.onerror || twemoji.onerror
    });
  }

  function replace(text, callback) {
    return String(text).replace(re, callback);
  }

  function test(text) {
    // IE6 needs a reset before too
    re.lastIndex = 0;
    var result = re.test(text);
    re.lastIndex = 0;
    return result;
  }

  function toCodePoint(unicodeSurrogates, sep) {
    var
      r = [],
      c = 0,
      p = 0,
      i = 0;
    while (i < unicodeSurrogates.length) {
      c = unicodeSurrogates.charCodeAt(i++);
      if (p) {
        r.push((0x10000 + ((p - 0xD800) << 10) + (c - 0xDC00)).toString(16));
        p = 0;
      } else if (0xD800 <= c && c <= 0xDBFF) {
        p = c;
      } else {
        r.push(c.toString(16));
      }
    }
    return r.join(sep || '-');
  }

}());
                                                                                                                                                                                          twemoji.min.js                                                                                      0000644                 00000046622 15212564050 0007354 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
var twemoji=function(){"use strict";var h={base:"https://cdn.jsdelivr.net/gh/jdecked/twemoji@17.0.1/assets/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:function(d){d="string"==typeof d?parseInt(d,16):d;if(d<65536)return e(d);return e(55296+((d-=65536)>>10),56320+(1023&d))},toCodePoint:o},onerror:function(){this.parentNode&&this.parentNode.replaceChild(x(this.alt,!1),this)},parse:function(d,u){u&&"function"!=typeof u||(u={callback:u});return h.doNotParse=u.doNotParse,("string"==typeof d?function(d,a){return n(d,function(d){var u,f,c=d,e=N(d),b=a.callback(e,a);if(e&&b){for(f in c="<img ".concat('class="',a.className,'" ','draggable="false" ','alt="',d,'"',' src="',b,'"'),u=a.attributes(d,e))u.hasOwnProperty(f)&&0!==f.indexOf("on")&&-1===c.indexOf(" "+f+"=")&&(c=c.concat(" ",f,'="',u[f].replace(t,r),'"'));c=c.concat("/>")}return c})}:function(d,u){var f,c,e,b,a,t,r,n,o,s,i,l=function d(u,f){var c,e,b=u.childNodes,a=b.length;for(;a--;)c=b[a],3===(e=c.nodeType)?f.push(c):1!==e||"ownerSVGElement"in c||m.test(c.nodeName.toLowerCase())||h.doNotParse&&h.doNotParse(c)||d(c,f);return f}(d,[]),p=l.length;for(;p--;){for(e=!1,b=document.createDocumentFragment(),a=l[p],t=a.nodeValue,r=0;o=g.exec(t);){if((i=o.index)!==r&&b.appendChild(x(t.slice(r,i),!0)),s=N(o=o[0]),r=i+o.length,i=u.callback(s,u),s&&i){for(c in(n=new Image).onerror=u.onerror,n.setAttribute("draggable","false"),f=u.attributes(o,s))f.hasOwnProperty(c)&&0!==c.indexOf("on")&&!n.hasAttribute(c)&&n.setAttribute(c,f[c]);n.className=u.className,n.alt=o,n.src=i,e=!0,b.appendChild(n)}n||b.appendChild(x(o,!1)),n=null}e&&(r<t.length&&b.appendChild(x(t.slice(r),!0)),a.parentNode.replaceChild(b,a))}return d})(d,{callback:u.callback||b,attributes:"function"==typeof u.attributes?u.attributes:a,base:("string"==typeof u.base?u:h).base,ext:u.ext||h.ext,size:u.folder||function(d){return"number"==typeof d?d+"x"+d:d}(u.size||h.size),className:u.className||h.className,onerror:u.onerror||h.onerror})},replace:n,test:function(d){g.lastIndex=0;d=g.test(d);return g.lastIndex=0,d}},u={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},g=/(?:\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83d\udc30\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udeef\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83d\udc30\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udeef\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83d\udc30\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udeef\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83d\udc30\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udeef\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83d\udc30\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udeef\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83d\udc30\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udeef\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83d\udc30\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udeef\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83d\udc30\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udeef\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83d\udc30\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udeef\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83d\udc30\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udeef\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83d\udc30\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udeef\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83d\udc30\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udeef\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83d\udc30\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udeef\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83d\udc30\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udeef\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udfff\u200d\ud83d\udc30\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udeef\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83e\udef1\ud83c\udffb\u200d\ud83e\udef2\ud83c[\udffc-\udfff]|\ud83e\udef1\ud83c\udffc\u200d\ud83e\udef2\ud83c[\udffb\udffd-\udfff]|\ud83e\udef1\ud83c\udffd\u200d\ud83e\udef2\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\udef1\ud83c\udffe\u200d\ud83e\udef2\ud83c[\udffb-\udffd\udfff]|\ud83e\udef1\ud83c\udfff\u200d\ud83e\udef2\ud83c[\udffb-\udffe]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6f\ud83c\udffb\u200d\u2640\ufe0f|\ud83d\udc6f\ud83c\udffb\u200d\u2642\ufe0f|\ud83d\udc6f\ud83c\udffc\u200d\u2640\ufe0f|\ud83d\udc6f\ud83c\udffc\u200d\u2642\ufe0f|\ud83d\udc6f\ud83c\udffd\u200d\u2640\ufe0f|\ud83d\udc6f\ud83c\udffd\u200d\u2642\ufe0f|\ud83d\udc6f\ud83c\udffe\u200d\u2640\ufe0f|\ud83d\udc6f\ud83c\udffe\u200d\u2642\ufe0f|\ud83d\udc6f\ud83c\udfff\u200d\u2640\ufe0f|\ud83d\udc6f\ud83c\udfff\u200d\u2642\ufe0f|\ud83e\udd3c\ud83c\udffb\u200d\u2640\ufe0f|\ud83e\udd3c\ud83c\udffb\u200d\u2642\ufe0f|\ud83e\udd3c\ud83c\udffc\u200d\u2640\ufe0f|\ud83e\udd3c\ud83c\udffc\u200d\u2642\ufe0f|\ud83e\udd3c\ud83c\udffd\u200d\u2640\ufe0f|\ud83e\udd3c\ud83c\udffd\u200d\u2642\ufe0f|\ud83e\udd3c\ud83c\udffe\u200d\u2640\ufe0f|\ud83e\udd3c\ud83c\udffe\u200d\u2642\ufe0f|\ud83e\udd3c\ud83c\udfff\u200d\u2640\ufe0f|\ud83e\udd3c\ud83c\udfff\u200d\u2642\ufe0f|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d\udc6f\ud83c[\udffb-\udfff]|\ud83d\udc8f\ud83c[\udffb-\udfff]|\ud83d\udc91\ud83c[\udffb-\udfff]|\ud83e\udd1d\ud83c[\udffb-\udfff]|\ud83e\udd3c\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d\udc6f\udc8f\udc91]|\ud83e[\udd1d\udd3c])|(?:\ud83d[\udc68\udc69]|\ud83e\uddd1)(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf7c\udf84\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd\ude70])(?:\u200d\u27a1\ufe0f)?|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f(?:\u200d\u27a1\ufe0f)?)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc70\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd4\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f(?:\u200d\u27a1\ufe0f)?|(?:\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83e\uddd1\u200d\ud83e\uddd1\u200d\ud83e\uddd2\u200d\ud83e\uddd2|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83e\uddd1\u200d\ud83e\uddd1\u200d\ud83e\uddd2|\ud83e\uddd1\u200d\ud83e\uddd2\u200d\ud83e\uddd2|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83d\ude36\u200d\ud83c\udf2b\ufe0f|\u26d3\ufe0f\u200d\ud83d\udca5|\u2764\ufe0f\u200d\ud83d\udd25|\u2764\ufe0f\u200d\ud83e\ude79|\ud83c\udf44\u200d\ud83d\udfeb|\ud83c\udf4b\u200d\ud83d\udfe9|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc26\u200d\ud83d\udd25|\ud83d\udc3b\u200d\u2744\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\ude2e\u200d\ud83d\udca8|\ud83d\ude35\u200d\ud83d\udcab|\ud83d\ude42\u200d\u2194\ufe0f|\ud83d\ude42\u200d\u2195\ufe0f|\ud83e\uddd1\u200d\ud83e\uddd2|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|\ud83d\udc08\u200d\u2b1b|\ud83d\udc26\u200d\u2b1b)|[#*0-9]\ufe0f?\u20e3|(?:[\xa9\xae\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|\ud83e\udef0|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c\udfc3|\ud83d\udeb6|\ud83e\uddce)(?:\ud83c[\udffb-\udfff])?(?:\u200d\u27a1\ufe0f)?|(?:\ud83c[\udf85\udfc2\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4\udeb5\udec0\udecc]|\ud83e[\udd0c\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\udd77\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd\uddcf\uddd1-\udddd\udec3-\udec5\udef1-\udef8]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udc8e\udc90\udc92-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5-\uded8\udedc-\udedf\udeeb\udeec\udef4-\udefc\udfe0-\udfeb\udff0]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd20-\udd25\udd27-\udd2f\udd3a\udd3f-\udd45\udd47-\udd76\udd78-\uddb4\uddb7\uddba\uddbc-\uddcc\uddd0\uddde-\uddff\ude70-\ude7c\ude80-\ude8a\ude8e-\udec2\udec6\udec8\udecd-\udedc\udedf-\udeea\udeef]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g,f=/\uFE0F/g,c=String.fromCharCode(8205),t=/[&<>'"]/g,m=/^(?:iframe|noframes|noscript|script|select|style|textarea)$/,e=String.fromCharCode;return h;function x(d,u){return document.createTextNode(u?d.replace(f,""):d)}function b(d,u){return"".concat(u.base,u.size,"/",d,u.ext)}function N(d){return o(d.indexOf(c)<0?d.replace(f,""):d)}function r(d){return u[d]}function a(){return null}function n(d,u){return String(d).replace(g,u)}function o(d,u){for(var f=[],c=0,e=0,b=0;b<d.length;)c=d.charCodeAt(b++),e?(f.push((65536+(e-55296<<10)+(c-56320)).toString(16)),e=0):55296<=c&&c<=56319?e=c:f.push(c.toString(16));return f.join(u||"-")}}();                                                                                                              underscore.js                                                                                       0000644                 00000206411 15212564050 0007257 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       (function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
  typeof define === 'function' && define.amd ? define('underscore', factory) :
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, (function () {
    var current = global._;
    var exports = global._ = factory();
    exports.noConflict = function () { global._ = current; return exports; };
  }()));
}(this, (function () {
  //     Underscore.js 1.13.8
  //     https://underscorejs.org
  //     (c) 2009-2026 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
  //     Underscore may be freely distributed under the MIT license.

  // Current version.
  var VERSION = '1.13.8';

  // Establish the root object, `window` (`self`) in the browser, `global`
  // on the server, or `this` in some virtual machines. We use `self`
  // instead of `window` for `WebWorker` support.
  var root = (typeof self == 'object' && self.self === self && self) ||
            (typeof global == 'object' && global.global === global && global) ||
            Function('return this')() ||
            {};

  // Save bytes in the minified (but not gzipped) version:
  var ArrayProto = Array.prototype, ObjProto = Object.prototype;
  var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;

  // Create quick reference variables for speed access to core prototypes.
  var push = ArrayProto.push,
      slice = ArrayProto.slice,
      toString = ObjProto.toString,
      hasOwnProperty = ObjProto.hasOwnProperty;

  // Modern feature detection.
  var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined',
      supportsDataView = typeof DataView !== 'undefined';

  // All **ECMAScript 5+** native function implementations that we hope to use
  // are declared here.
  var nativeIsArray = Array.isArray,
      nativeKeys = Object.keys,
      nativeCreate = Object.create,
      nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;

  // Create references to these builtin functions because we override them.
  var _isNaN = isNaN,
      _isFinite = isFinite;

  // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.
  var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
  var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
    'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];

  // The largest integer that can be represented exactly.
  var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;

  // Some functions take a variable number of arguments, or a few expected
  // arguments at the beginning and then a variable number of values to operate
  // on. This helper accumulates all remaining arguments past the functionâ€™s
  // argument length (or an explicit `startIndex`), into an array that becomes
  // the last argument. Similar to ES6â€™s "rest parameter".
  function restArguments(func, startIndex) {
    startIndex = startIndex == null ? func.length - 1 : +startIndex;
    return function() {
      var length = Math.max(arguments.length - startIndex, 0),
          rest = Array(length),
          index = 0;
      for (; index < length; index++) {
        rest[index] = arguments[index + startIndex];
      }
      switch (startIndex) {
        case 0: return func.call(this, rest);
        case 1: return func.call(this, arguments[0], rest);
        case 2: return func.call(this, arguments[0], arguments[1], rest);
      }
      var args = Array(startIndex + 1);
      for (index = 0; index < startIndex; index++) {
        args[index] = arguments[index];
      }
      args[startIndex] = rest;
      return func.apply(this, args);
    };
  }

  // Is a given variable an object?
  function isObject(obj) {
    var type = typeof obj;
    return type === 'function' || (type === 'object' && !!obj);
  }

  // Is a given value equal to null?
  function isNull(obj) {
    return obj === null;
  }

  // Is a given variable undefined?
  function isUndefined(obj) {
    return obj === void 0;
  }

  // Is a given value a boolean?
  function isBoolean(obj) {
    return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
  }

  // Is a given value a DOM element?
  function isElement(obj) {
    return !!(obj && obj.nodeType === 1);
  }

  // Internal function for creating a `toString`-based type tester.
  function tagTester(name) {
    var tag = '[object ' + name + ']';
    return function(obj) {
      return toString.call(obj) === tag;
    };
  }

  var isString = tagTester('String');

  var isNumber = tagTester('Number');

  var isDate = tagTester('Date');

  var isRegExp = tagTester('RegExp');

  var isError = tagTester('Error');

  var isSymbol = tagTester('Symbol');

  var isArrayBuffer = tagTester('ArrayBuffer');

  var isFunction = tagTester('Function');

  // Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old
  // v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).
  var nodelist = root.document && root.document.childNodes;
  if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
    isFunction = function(obj) {
      return typeof obj == 'function' || false;
    };
  }

  var isFunction$1 = isFunction;

  var hasObjectTag = tagTester('Object');

  // In IE 10 - Edge 13, `DataView` has string tag `'[object Object]'`.
  // In IE 11, the most common among them, this problem also applies to
  // `Map`, `WeakMap` and `Set`.
  // Also, there are cases where an application can override the native
  // `DataView` object, in cases like that we can't use the constructor
  // safely and should just rely on alternate `DataView` checks
  var hasDataViewBug = (
        supportsDataView && (!/\[native code\]/.test(String(DataView)) || hasObjectTag(new DataView(new ArrayBuffer(8))))
      ),
      isIE11 = (typeof Map !== 'undefined' && hasObjectTag(new Map));

  var isDataView = tagTester('DataView');

  // In IE 10 - Edge 13, we need a different heuristic
  // to determine whether an object is a `DataView`.
  // Also, in cases where the native `DataView` is
  // overridden we can't rely on the tag itself.
  function alternateIsDataView(obj) {
    return obj != null && isFunction$1(obj.getInt8) && isArrayBuffer(obj.buffer);
  }

  var isDataView$1 = (hasDataViewBug ? alternateIsDataView : isDataView);

  // Is a given value an array?
  // Delegates to ECMA5's native `Array.isArray`.
  var isArray = nativeIsArray || tagTester('Array');

  // Internal function to check whether `key` is an own property name of `obj`.
  function has$1(obj, key) {
    return obj != null && hasOwnProperty.call(obj, key);
  }

  var isArguments = tagTester('Arguments');

  // Define a fallback version of the method in browsers (ahem, IE < 9), where
  // there isn't any inspectable "Arguments" type.
  (function() {
    if (!isArguments(arguments)) {
      isArguments = function(obj) {
        return has$1(obj, 'callee');
      };
    }
  }());

  var isArguments$1 = isArguments;

  // Is a given object a finite number?
  function isFinite$1(obj) {
    return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj));
  }

  // Is the given value `NaN`?
  function isNaN$1(obj) {
    return isNumber(obj) && _isNaN(obj);
  }

  // Predicate-generating function. Often useful outside of Underscore.
  function constant(value) {
    return function() {
      return value;
    };
  }

  // Common internal logic for `isArrayLike` and `isBufferLike`.
  function createSizePropertyCheck(getSizeProperty) {
    return function(collection) {
      var sizeProperty = getSizeProperty(collection);
      return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
    }
  }

  // Internal helper to generate a function to obtain property `key` from `obj`.
  function shallowProperty(key) {
    return function(obj) {
      return obj == null ? void 0 : obj[key];
    };
  }

  // Internal helper to obtain the `byteLength` property of an object.
  var getByteLength = shallowProperty('byteLength');

  // Internal helper to determine whether we should spend extensive checks against
  // `ArrayBuffer` et al.
  var isBufferLike = createSizePropertyCheck(getByteLength);

  // Is a given value a typed array?
  var typedArrayPattern = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;
  function isTypedArray(obj) {
    // `ArrayBuffer.isView` is the most future-proof, so use it when available.
    // Otherwise, fall back on the above regular expression.
    return nativeIsView ? (nativeIsView(obj) && !isDataView$1(obj)) :
                  isBufferLike(obj) && typedArrayPattern.test(toString.call(obj));
  }

  var isTypedArray$1 = supportsArrayBuffer ? isTypedArray : constant(false);

  // Internal helper to obtain the `length` property of an object.
  var getLength = shallowProperty('length');

  // Internal helper to create a simple lookup structure.
  // `collectNonEnumProps` used to depend on `_.contains`, but this led to
  // circular imports. `emulatedSet` is a one-off solution that only works for
  // arrays of strings.
  function emulatedSet(keys) {
    var hash = {};
    for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;
    return {
      contains: function(key) { return hash[key] === true; },
      push: function(key) {
        hash[key] = true;
        return keys.push(key);
      }
    };
  }

  // Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't
  // be iterated by `for key in ...` and thus missed. Extends `keys` in place if
  // needed.
  function collectNonEnumProps(obj, keys) {
    keys = emulatedSet(keys);
    var nonEnumIdx = nonEnumerableProps.length;
    var constructor = obj.constructor;
    var proto = (isFunction$1(constructor) && constructor.prototype) || ObjProto;

    // Constructor is a special case.
    var prop = 'constructor';
    if (has$1(obj, prop) && !keys.contains(prop)) keys.push(prop);

    while (nonEnumIdx--) {
      prop = nonEnumerableProps[nonEnumIdx];
      if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {
        keys.push(prop);
      }
    }
  }

  // Retrieve the names of an object's own properties.
  // Delegates to **ECMAScript 5**'s native `Object.keys`.
  function keys(obj) {
    if (!isObject(obj)) return [];
    if (nativeKeys) return nativeKeys(obj);
    var keys = [];
    for (var key in obj) if (has$1(obj, key)) keys.push(key);
    // Ahem, IE < 9.
    if (hasEnumBug) collectNonEnumProps(obj, keys);
    return keys;
  }

  // Is a given array, string, or object empty?
  // An "empty" object has no enumerable own-properties.
  function isEmpty(obj) {
    if (obj == null) return true;
    // Skip the more expensive `toString`-based type checks if `obj` has no
    // `.length`.
    var length = getLength(obj);
    if (typeof length == 'number' && (
      isArray(obj) || isString(obj) || isArguments$1(obj)
    )) return length === 0;
    return getLength(keys(obj)) === 0;
  }

  // Returns whether an object has a given set of `key:value` pairs.
  function isMatch(object, attrs) {
    var _keys = keys(attrs), length = _keys.length;
    if (object == null) return !length;
    var obj = Object(object);
    for (var i = 0; i < length; i++) {
      var key = _keys[i];
      if (attrs[key] !== obj[key] || !(key in obj)) return false;
    }
    return true;
  }

  // If Underscore is called as a function, it returns a wrapped object that can
  // be used OO-style. This wrapper holds altered versions of all functions added
  // through `_.mixin`. Wrapped objects may be chained.
  function _$1(obj) {
    if (obj instanceof _$1) return obj;
    if (!(this instanceof _$1)) return new _$1(obj);
    this._wrapped = obj;
  }

  _$1.VERSION = VERSION;

  // Extracts the result from a wrapped and chained object.
  _$1.prototype.value = function() {
    return this._wrapped;
  };

  // Provide unwrapping proxies for some methods used in engine operations
  // such as arithmetic and JSON stringification.
  _$1.prototype.valueOf = _$1.prototype.toJSON = _$1.prototype.value;

  _$1.prototype.toString = function() {
    return String(this._wrapped);
  };

  // Internal function to wrap or shallow-copy an ArrayBuffer,
  // typed array or DataView to a new view, reusing the buffer.
  function toBufferView(bufferSource) {
    return new Uint8Array(
      bufferSource.buffer || bufferSource,
      bufferSource.byteOffset || 0,
      getByteLength(bufferSource)
    );
  }

  // We use this string twice, so give it a name for minification.
  var tagDataView = '[object DataView]';

  // Perform a deep comparison to check if two objects are equal.
  function isEqual(a, b) {
    var todo = [{a: a, b: b}];
    // Initializing stacks of traversed objects for cycle detection.
    var aStack = [], bStack = [];

    while (todo.length) {
      var frame = todo.pop();
      if (frame === true) {
        // Remove the first object from the stack of traversed objects.
        aStack.pop();
        bStack.pop();
        continue;
      }
      a = frame.a;
      b = frame.b;

      // Identical objects are equal. `0 === -0`, but they aren't identical.
      // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).
      if (a === b) {
        if (a !== 0 || 1 / a === 1 / b) continue;
        return false;
      }
      // `null` or `undefined` only equal to itself (strict comparison).
      if (a == null || b == null) return false;
      // `NaN`s are equivalent, but non-reflexive.
      if (a !== a) {
        if (b !== b) continue;
        return false;
      }
      // Exhaust primitive checks
      var type = typeof a;
      if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;

  // Internal recursive comparison function for `_.isEqual`.
      // Unwrap any wrapped objects.
      if (a instanceof _$1) a = a._wrapped;
      if (b instanceof _$1) b = b._wrapped;
      // Compare `[[Class]]` names.
      var className = toString.call(a);
      if (className !== toString.call(b)) return false;
      // Work around a bug in IE 10 - Edge 13.
      if (hasDataViewBug && className == '[object Object]' && isDataView$1(a)) {
        if (!isDataView$1(b)) return false;
        className = tagDataView;
      }
      switch (className) {
        // These types are compared by value.
      case '[object RegExp]':
        // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
      case '[object String]':
        // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
        // equivalent to `new String("5")`.
        if ('' + a === '' + b) continue;
        return false;
      case '[object Number]':
        todo.push({a: +a, b: +b});
        continue;
      case '[object Date]':
      case '[object Boolean]':
        // Coerce dates and booleans to numeric primitive values. Dates are compared by their
        // millisecond representations. Note that invalid dates with millisecond representations
        // of `NaN` are not equivalent.
        if (+a === +b) continue;
        return false;
      case '[object Symbol]':
        if (SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b)) continue;
        return false;
      case '[object ArrayBuffer]':
      case tagDataView:
        // Coerce to typed array so we can fall through.
        todo.push({a: toBufferView(a), b: toBufferView(b)});
        continue;
      }

      var areArrays = className === '[object Array]';
      if (!areArrays && isTypedArray$1(a)) {
        var byteLength = getByteLength(a);
        if (byteLength !== getByteLength(b)) return false;
        if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) continue;
        areArrays = true;
      }
      if (!areArrays) {
        if (typeof a != 'object' || typeof b != 'object') return false;

        // Objects with different constructors are not equivalent, but `Object`s or `Array`s
        // from different frames are.
        var aCtor = a.constructor, bCtor = b.constructor;
        if (aCtor !== bCtor && !(isFunction$1(aCtor) && aCtor instanceof aCtor &&
                                 isFunction$1(bCtor) && bCtor instanceof bCtor)
            && ('constructor' in a && 'constructor' in b)) {
          return false;
        }
      }

      // Assume equality for cyclic structures. The algorithm for detecting cyclic
      // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.

      var length = aStack.length;
      while (length--) {
        // Linear search. Performance is inversely proportional to the number of
        // unique nested structures.
        if (aStack[length] === a) {
          if (bStack[length] === b) break;
          return false;
        }
      }
      if (length >= 0) continue;

      // Add the first object to the stack of traversed objects.
      aStack.push(a);
      bStack.push(b);
      todo.push(true);

      // Recursively compare objects and arrays.
      if (areArrays) {
        // Compare array lengths to determine if a deep comparison is necessary.
        length = a.length;
        if (length !== b.length) return false;
        // Deep compare the contents, ignoring non-numeric properties.
        while (length--) {
          todo.push({a: a[length], b: b[length]});
        }
      } else {
        // Deep compare objects.
        var _keys = keys(a), key;
        length = _keys.length;
        // Ensure that both objects contain the same number of properties before comparing deep equality.
        if (keys(b).length !== length) return false;
        while (length--) {
          // Deep compare each member
          key = _keys[length];
          if (!has$1(b, key)) return false;
          todo.push({a: a[key], b: b[key]});
        }
      }
    }
    return true;
  }

  // Retrieve all the enumerable property names of an object.
  function allKeys(obj) {
    if (!isObject(obj)) return [];
    var keys = [];
    for (var key in obj) keys.push(key);
    // Ahem, IE < 9.
    if (hasEnumBug) collectNonEnumProps(obj, keys);
    return keys;
  }

  // Since the regular `Object.prototype.toString` type tests don't work for
  // some types in IE 11, we use a fingerprinting heuristic instead, based
  // on the methods. It's not great, but it's the best we got.
  // The fingerprint method lists are defined below.
  function ie11fingerprint(methods) {
    var length = getLength(methods);
    return function(obj) {
      if (obj == null) return false;
      // `Map`, `WeakMap` and `Set` have no enumerable keys.
      var keys = allKeys(obj);
      if (getLength(keys)) return false;
      for (var i = 0; i < length; i++) {
        if (!isFunction$1(obj[methods[i]])) return false;
      }
      // If we are testing against `WeakMap`, we need to ensure that
      // `obj` doesn't have a `forEach` method in order to distinguish
      // it from a regular `Map`.
      return methods !== weakMapMethods || !isFunction$1(obj[forEachName]);
    };
  }

  // In the interest of compact minification, we write
  // each string in the fingerprints only once.
  var forEachName = 'forEach',
      hasName = 'has',
      commonInit = ['clear', 'delete'],
      mapTail = ['get', hasName, 'set'];

  // `Map`, `WeakMap` and `Set` each have slightly different
  // combinations of the above sublists.
  var mapMethods = commonInit.concat(forEachName, mapTail),
      weakMapMethods = commonInit.concat(mapTail),
      setMethods = ['add'].concat(commonInit, forEachName, hasName);

  var isMap = isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map');

  var isWeakMap = isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap');

  var isSet = isIE11 ? ie11fingerprint(setMethods) : tagTester('Set');

  var isWeakSet = tagTester('WeakSet');

  // Retrieve the values of an object's properties.
  function values(obj) {
    var _keys = keys(obj);
    var length = _keys.length;
    var values = Array(length);
    for (var i = 0; i < length; i++) {
      values[i] = obj[_keys[i]];
    }
    return values;
  }

  // Convert an object into a list of `[key, value]` pairs.
  // The opposite of `_.object` with one argument.
  function pairs(obj) {
    var _keys = keys(obj);
    var length = _keys.length;
    var pairs = Array(length);
    for (var i = 0; i < length; i++) {
      pairs[i] = [_keys[i], obj[_keys[i]]];
    }
    return pairs;
  }

  // Invert the keys and values of an object. The values must be serializable.
  function invert(obj) {
    var result = {};
    var _keys = keys(obj);
    for (var i = 0, length = _keys.length; i < length; i++) {
      result[obj[_keys[i]]] = _keys[i];
    }
    return result;
  }

  // Return a sorted list of the function names available on the object.
  function functions(obj) {
    var names = [];
    for (var key in obj) {
      if (isFunction$1(obj[key])) names.push(key);
    }
    return names.sort();
  }

  // An internal function for creating assigner functions.
  function createAssigner(keysFunc, defaults) {
    return function(obj) {
      var length = arguments.length;
      if (defaults) obj = Object(obj);
      if (length < 2 || obj == null) return obj;
      for (var index = 1; index < length; index++) {
        var source = arguments[index],
            keys = keysFunc(source),
            l = keys.length;
        for (var i = 0; i < l; i++) {
          var key = keys[i];
          if (!defaults || obj[key] === void 0) obj[key] = source[key];
        }
      }
      return obj;
    };
  }

  // Extend a given object with all the properties in passed-in object(s).
  var extend = createAssigner(allKeys);

  // Assigns a given object with all the own properties in the passed-in
  // object(s).
  // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
  var extendOwn = createAssigner(keys);

  // Fill in a given object with default properties.
  var defaults = createAssigner(allKeys, true);

  // Create a naked function reference for surrogate-prototype-swapping.
  function ctor() {
    return function(){};
  }

  // An internal function for creating a new object that inherits from another.
  function baseCreate(prototype) {
    if (!isObject(prototype)) return {};
    if (nativeCreate) return nativeCreate(prototype);
    var Ctor = ctor();
    Ctor.prototype = prototype;
    var result = new Ctor;
    Ctor.prototype = null;
    return result;
  }

  // Creates an object that inherits from the given prototype object.
  // If additional properties are provided then they will be added to the
  // created object.
  function create(prototype, props) {
    var result = baseCreate(prototype);
    if (props) extendOwn(result, props);
    return result;
  }

  // Create a (shallow-cloned) duplicate of an object.
  function clone(obj) {
    if (!isObject(obj)) return obj;
    return isArray(obj) ? obj.slice() : extend({}, obj);
  }

  // Invokes `interceptor` with the `obj` and then returns `obj`.
  // The primary purpose of this method is to "tap into" a method chain, in
  // order to perform operations on intermediate results within the chain.
  function tap(obj, interceptor) {
    interceptor(obj);
    return obj;
  }

  // Normalize a (deep) property `path` to array.
  // Like `_.iteratee`, this function can be customized.
  function toPath$1(path) {
    return isArray(path) ? path : [path];
  }
  _$1.toPath = toPath$1;

  // Internal wrapper for `_.toPath` to enable minification.
  // Similar to `cb` for `_.iteratee`.
  function toPath(path) {
    return _$1.toPath(path);
  }

  // Internal function to obtain a nested property in `obj` along `path`.
  function deepGet(obj, path) {
    var length = path.length;
    for (var i = 0; i < length; i++) {
      if (obj == null) return void 0;
      obj = obj[path[i]];
    }
    return length ? obj : void 0;
  }

  // Get the value of the (deep) property on `path` from `object`.
  // If any property in `path` does not exist or if the value is
  // `undefined`, return `defaultValue` instead.
  // The `path` is normalized through `_.toPath`.
  function get(object, path, defaultValue) {
    var value = deepGet(object, toPath(path));
    return isUndefined(value) ? defaultValue : value;
  }

  // Shortcut function for checking if an object has a given property directly on
  // itself (in other words, not on a prototype). Unlike the internal `has`
  // function, this public version can also traverse nested properties.
  function has(obj, path) {
    path = toPath(path);
    var length = path.length;
    for (var i = 0; i < length; i++) {
      var key = path[i];
      if (!has$1(obj, key)) return false;
      obj = obj[key];
    }
    return !!length;
  }

  // Keep the identity function around for default iteratees.
  function identity(value) {
    return value;
  }

  // Returns a predicate for checking whether an object has a given set of
  // `key:value` pairs.
  function matcher(attrs) {
    attrs = extendOwn({}, attrs);
    return function(obj) {
      return isMatch(obj, attrs);
    };
  }

  // Creates a function that, when passed an object, will traverse that objectâ€™s
  // properties down the given `path`, specified as an array of keys or indices.
  function property(path) {
    path = toPath(path);
    return function(obj) {
      return deepGet(obj, path);
    };
  }

  // Internal function that returns an efficient (for current engines) version
  // of the passed-in callback, to be repeatedly applied in other Underscore
  // functions.
  function optimizeCb(func, context, argCount) {
    if (context === void 0) return func;
    switch (argCount == null ? 3 : argCount) {
      case 1: return function(value) {
        return func.call(context, value);
      };
      // The 2-argument case is omitted because weâ€™re not using it.
      case 3: return function(value, index, collection) {
        return func.call(context, value, index, collection);
      };
      case 4: return function(accumulator, value, index, collection) {
        return func.call(context, accumulator, value, index, collection);
      };
    }
    return function() {
      return func.apply(context, arguments);
    };
  }

  // An internal function to generate callbacks that can be applied to each
  // element in a collection, returning the desired result â€” either `_.identity`,
  // an arbitrary callback, a property matcher, or a property accessor.
  function baseIteratee(value, context, argCount) {
    if (value == null) return identity;
    if (isFunction$1(value)) return optimizeCb(value, context, argCount);
    if (isObject(value) && !isArray(value)) return matcher(value);
    return property(value);
  }

  // External wrapper for our callback generator. Users may customize
  // `_.iteratee` if they want additional predicate/iteratee shorthand styles.
  // This abstraction hides the internal-only `argCount` argument.
  function iteratee(value, context) {
    return baseIteratee(value, context, Infinity);
  }
  _$1.iteratee = iteratee;

  // The function we call internally to generate a callback. It invokes
  // `_.iteratee` if overridden, otherwise `baseIteratee`.
  function cb(value, context, argCount) {
    if (_$1.iteratee !== iteratee) return _$1.iteratee(value, context);
    return baseIteratee(value, context, argCount);
  }

  // Returns the results of applying the `iteratee` to each element of `obj`.
  // In contrast to `_.map` it returns an object.
  function mapObject(obj, iteratee, context) {
    iteratee = cb(iteratee, context);
    var _keys = keys(obj),
        length = _keys.length,
        results = {};
    for (var index = 0; index < length; index++) {
      var currentKey = _keys[index];
      results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
    }
    return results;
  }

  // Predicate-generating function. Often useful outside of Underscore.
  function noop(){}

  // Generates a function for a given object that returns a given property.
  function propertyOf(obj) {
    if (obj == null) return noop;
    return function(path) {
      return get(obj, path);
    };
  }

  // Run a function **n** times.
  function times(n, iteratee, context) {
    var accum = Array(Math.max(0, n));
    iteratee = optimizeCb(iteratee, context, 1);
    for (var i = 0; i < n; i++) accum[i] = iteratee(i);
    return accum;
  }

  // Return a random integer between `min` and `max` (inclusive).
  function random(min, max) {
    if (max == null) {
      max = min;
      min = 0;
    }
    return min + Math.floor(Math.random() * (max - min + 1));
  }

  // A (possibly faster) way to get the current timestamp as an integer.
  var now = Date.now || function() {
    return new Date().getTime();
  };

  // Internal helper to generate functions for escaping and unescaping strings
  // to/from HTML interpolation.
  function createEscaper(map) {
    var escaper = function(match) {
      return map[match];
    };
    // Regexes for identifying a key that needs to be escaped.
    var source = '(?:' + keys(map).join('|') + ')';
    var testRegexp = RegExp(source);
    var replaceRegexp = RegExp(source, 'g');
    return function(string) {
      string = string == null ? '' : '' + string;
      return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
    };
  }

  // Internal list of HTML entities for escaping.
  var escapeMap = {
    '&': '&amp;',
    '<': '&lt;',
    '>': '&gt;',
    '"': '&quot;',
    "'": '&#x27;',
    '`': '&#x60;'
  };

  // Function for escaping strings to HTML interpolation.
  var _escape = createEscaper(escapeMap);

  // Internal list of HTML entities for unescaping.
  var unescapeMap = invert(escapeMap);

  // Function for unescaping strings from HTML interpolation.
  var _unescape = createEscaper(unescapeMap);

  // By default, Underscore uses ERB-style template delimiters. Change the
  // following template settings to use alternative delimiters.
  var templateSettings = _$1.templateSettings = {
    evaluate: /<%([\s\S]+?)%>/g,
    interpolate: /<%=([\s\S]+?)%>/g,
    escape: /<%-([\s\S]+?)%>/g
  };

  // When customizing `_.templateSettings`, if you don't want to define an
  // interpolation, evaluation or escaping regex, we need one that is
  // guaranteed not to match.
  var noMatch = /(.)^/;

  // Certain characters need to be escaped so that they can be put into a
  // string literal.
  var escapes = {
    "'": "'",
    '\\': '\\',
    '\r': 'r',
    '\n': 'n',
    '\u2028': 'u2028',
    '\u2029': 'u2029'
  };

  var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;

  function escapeChar(match) {
    return '\\' + escapes[match];
  }

  // In order to prevent third-party code injection through
  // `_.templateSettings.variable`, we test it against the following regular
  // expression. It is intentionally a bit more liberal than just matching valid
  // identifiers, but still prevents possible loopholes through defaults or
  // destructuring assignment.
  var bareIdentifier = /^\s*(\w|\$)+\s*$/;

  // JavaScript micro-templating, similar to John Resig's implementation.
  // Underscore templating handles arbitrary delimiters, preserves whitespace,
  // and correctly escapes quotes within interpolated code.
  // NB: `oldSettings` only exists for backwards compatibility.
  function template(text, settings, oldSettings) {
    if (!settings && oldSettings) settings = oldSettings;
    settings = defaults({}, settings, _$1.templateSettings);

    // Combine delimiters into one regular expression via alternation.
    var matcher = RegExp([
      (settings.escape || noMatch).source,
      (settings.interpolate || noMatch).source,
      (settings.evaluate || noMatch).source
    ].join('|') + '|$', 'g');

    // Compile the template source, escaping string literals appropriately.
    var index = 0;
    var source = "__p+='";
    text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
      source += text.slice(index, offset).replace(escapeRegExp, escapeChar);
      index = offset + match.length;

      if (escape) {
        source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
      } else if (interpolate) {
        source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
      } else if (evaluate) {
        source += "';\n" + evaluate + "\n__p+='";
      }

      // Adobe VMs need the match returned to produce the correct offset.
      return match;
    });
    source += "';\n";

    var argument = settings.variable;
    if (argument) {
      // Insure against third-party code injection. (CVE-2021-23358)
      if (!bareIdentifier.test(argument)) throw new Error(
        'variable is not a bare identifier: ' + argument
      );
    } else {
      // If a variable is not specified, place data values in local scope.
      source = 'with(obj||{}){\n' + source + '}\n';
      argument = 'obj';
    }

    source = "var __t,__p='',__j=Array.prototype.join," +
      "print=function(){__p+=__j.call(arguments,'');};\n" +
      source + 'return __p;\n';

    var render;
    try {
      render = new Function(argument, '_', source);
    } catch (e) {
      e.source = source;
      throw e;
    }

    var template = function(data) {
      return render.call(this, data, _$1);
    };

    // Provide the compiled source as a convenience for precompilation.
    template.source = 'function(' + argument + '){\n' + source + '}';

    return template;
  }

  // Traverses the children of `obj` along `path`. If a child is a function, it
  // is invoked with its parent as context. Returns the value of the final
  // child, or `fallback` if any child is undefined.
  function result(obj, path, fallback) {
    path = toPath(path);
    var length = path.length;
    if (!length) {
      return isFunction$1(fallback) ? fallback.call(obj) : fallback;
    }
    for (var i = 0; i < length; i++) {
      var prop = obj == null ? void 0 : obj[path[i]];
      if (prop === void 0) {
        prop = fallback;
        i = length; // Ensure we don't continue iterating.
      }
      obj = isFunction$1(prop) ? prop.call(obj) : prop;
    }
    return obj;
  }

  // Generate a unique integer id (unique within the entire client session).
  // Useful for temporary DOM ids.
  var idCounter = 0;
  function uniqueId(prefix) {
    var id = ++idCounter + '';
    return prefix ? prefix + id : id;
  }

  // Start chaining a wrapped Underscore object.
  function chain(obj) {
    var instance = _$1(obj);
    instance._chain = true;
    return instance;
  }

  // Internal function to execute `sourceFunc` bound to `context` with optional
  // `args`. Determines whether to execute a function as a constructor or as a
  // normal function.
  function executeBound(sourceFunc, boundFunc, context, callingContext, args) {
    if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
    var self = baseCreate(sourceFunc.prototype);
    var result = sourceFunc.apply(self, args);
    if (isObject(result)) return result;
    return self;
  }

  // Partially apply a function by creating a version that has had some of its
  // arguments pre-filled, without changing its dynamic `this` context. `_` acts
  // as a placeholder by default, allowing any combination of arguments to be
  // pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.
  var partial = restArguments(function(func, boundArgs) {
    var placeholder = partial.placeholder;
    var bound = function() {
      var position = 0, length = boundArgs.length;
      var args = Array(length);
      for (var i = 0; i < length; i++) {
        args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];
      }
      while (position < arguments.length) args.push(arguments[position++]);
      return executeBound(func, bound, this, this, args);
    };
    return bound;
  });

  partial.placeholder = _$1;

  // Create a function bound to a given object (assigning `this`, and arguments,
  // optionally).
  var bind = restArguments(function(func, context, args) {
    if (!isFunction$1(func)) throw new TypeError('Bind must be called on a function');
    var bound = restArguments(function(callArgs) {
      return executeBound(func, bound, context, this, args.concat(callArgs));
    });
    return bound;
  });

  // Internal helper for collection methods to determine whether a collection
  // should be iterated as an array or as an object.
  // Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength
  // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094
  var isArrayLike = createSizePropertyCheck(getLength);

  // Internal implementation of a recursive `flatten` function.
  function flatten$1(input, depth, strict) {
    if (!depth && depth !== 0) depth = Infinity;
    var output = [], idx = 0, i = 0, length = getLength(input) || 0, stack = [];
    while (true) {
      if (i >= length) {
        if (!stack.length) break;
        var frame = stack.pop();
        i = frame.i;
        input = frame.v;
        length = getLength(input);
        continue;
      }
      var value = input[i++];
      if (stack.length >= depth) {
        output[idx++] = value;
      } else if (isArrayLike(value) && (isArray(value) || isArguments$1(value))) {
        // Flatten current level of array or arguments object.
        stack.push({i: i, v: input});
        i = 0;
        input = value;
        length = getLength(input);
      } else if (!strict) {
        output[idx++] = value;
      }
    }
    return output;
  }

  // Bind a number of an object's methods to that object. Remaining arguments
  // are the method names to be bound. Useful for ensuring that all callbacks
  // defined on an object belong to it.
  var bindAll = restArguments(function(obj, keys) {
    keys = flatten$1(keys, false, false);
    var index = keys.length;
    if (index < 1) throw new Error('bindAll must be passed function names');
    while (index--) {
      var key = keys[index];
      obj[key] = bind(obj[key], obj);
    }
    return obj;
  });

  // Memoize an expensive function by storing its results.
  function memoize(func, hasher) {
    var memoize = function(key) {
      var cache = memoize.cache;
      var address = '' + (hasher ? hasher.apply(this, arguments) : key);
      if (!has$1(cache, address)) cache[address] = func.apply(this, arguments);
      return cache[address];
    };
    memoize.cache = {};
    return memoize;
  }

  // Delays a function for the given number of milliseconds, and then calls
  // it with the arguments supplied.
  var delay = restArguments(function(func, wait, args) {
    return setTimeout(function() {
      return func.apply(null, args);
    }, wait);
  });

  // Defers a function, scheduling it to run after the current call stack has
  // cleared.
  var defer = partial(delay, _$1, 1);

  // Returns a function, that, when invoked, will only be triggered at most once
  // during a given window of time. Normally, the throttled function will run
  // as much as it can, without ever going more than once per `wait` duration;
  // but if you'd like to disable the execution on the leading edge, pass
  // `{leading: false}`. To disable execution on the trailing edge, ditto.
  function throttle(func, wait, options) {
    var timeout, context, args, result;
    var previous = 0;
    if (!options) options = {};

    var later = function() {
      previous = options.leading === false ? 0 : now();
      timeout = null;
      result = func.apply(context, args);
      if (!timeout) context = args = null;
    };

    var throttled = function() {
      var _now = now();
      if (!previous && options.leading === false) previous = _now;
      var remaining = wait - (_now - previous);
      context = this;
      args = arguments;
      if (remaining <= 0 || remaining > wait) {
        if (timeout) {
          clearTimeout(timeout);
          timeout = null;
        }
        previous = _now;
        result = func.apply(context, args);
        if (!timeout) context = args = null;
      } else if (!timeout && options.trailing !== false) {
        timeout = setTimeout(later, remaining);
      }
      return result;
    };

    throttled.cancel = function() {
      clearTimeout(timeout);
      previous = 0;
      timeout = context = args = null;
    };

    return throttled;
  }

  // When a sequence of calls of the returned function ends, the argument
  // function is triggered. The end of a sequence is defined by the `wait`
  // parameter. If `immediate` is passed, the argument function will be
  // triggered at the beginning of the sequence instead of at the end.
  function debounce(func, wait, immediate) {
    var timeout, previous, args, result, context;

    var later = function() {
      var passed = now() - previous;
      if (wait > passed) {
        timeout = setTimeout(later, wait - passed);
      } else {
        timeout = null;
        if (!immediate) result = func.apply(context, args);
        // This check is needed because `func` can recursively invoke `debounced`.
        if (!timeout) args = context = null;
      }
    };

    var debounced = restArguments(function(_args) {
      context = this;
      args = _args;
      previous = now();
      if (!timeout) {
        timeout = setTimeout(later, wait);
        if (immediate) result = func.apply(context, args);
      }
      return result;
    });

    debounced.cancel = function() {
      clearTimeout(timeout);
      timeout = args = context = null;
    };

    return debounced;
  }

  // Returns the first function passed as an argument to the second,
  // allowing you to adjust arguments, run code before and after, and
  // conditionally execute the original function.
  function wrap(func, wrapper) {
    return partial(wrapper, func);
  }

  // Returns a negated version of the passed-in predicate.
  function negate(predicate) {
    return function() {
      return !predicate.apply(this, arguments);
    };
  }

  // Returns a function that is the composition of a list of functions, each
  // consuming the return value of the function that follows.
  function compose() {
    var args = arguments;
    var start = args.length - 1;
    return function() {
      var i = start;
      var result = args[start].apply(this, arguments);
      while (i--) result = args[i].call(this, result);
      return result;
    };
  }

  // Returns a function that will only be executed on and after the Nth call.
  function after(times, func) {
    return function() {
      if (--times < 1) {
        return func.apply(this, arguments);
      }
    };
  }

  // Returns a function that will only be executed up to (but not including) the
  // Nth call.
  function before(times, func) {
    var memo;
    return function() {
      if (--times > 0) {
        memo = func.apply(this, arguments);
      }
      if (times <= 1) func = null;
      return memo;
    };
  }

  // Returns a function that will be executed at most one time, no matter how
  // often you call it. Useful for lazy initialization.
  var once = partial(before, 2);

  // Returns the first key on an object that passes a truth test.
  function findKey(obj, predicate, context) {
    predicate = cb(predicate, context);
    var _keys = keys(obj), key;
    for (var i = 0, length = _keys.length; i < length; i++) {
      key = _keys[i];
      if (predicate(obj[key], key, obj)) return key;
    }
  }

  // Internal function to generate `_.findIndex` and `_.findLastIndex`.
  function createPredicateIndexFinder(dir) {
    return function(array, predicate, context) {
      predicate = cb(predicate, context);
      var length = getLength(array);
      var index = dir > 0 ? 0 : length - 1;
      for (; index >= 0 && index < length; index += dir) {
        if (predicate(array[index], index, array)) return index;
      }
      return -1;
    };
  }

  // Returns the first index on an array-like that passes a truth test.
  var findIndex = createPredicateIndexFinder(1);

  // Returns the last index on an array-like that passes a truth test.
  var findLastIndex = createPredicateIndexFinder(-1);

  // Use a comparator function to figure out the smallest index at which
  // an object should be inserted so as to maintain order. Uses binary search.
  function sortedIndex(array, obj, iteratee, context) {
    iteratee = cb(iteratee, context, 1);
    var value = iteratee(obj);
    var low = 0, high = getLength(array);
    while (low < high) {
      var mid = Math.floor((low + high) / 2);
      if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
    }
    return low;
  }

  // Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions.
  function createIndexFinder(dir, predicateFind, sortedIndex) {
    return function(array, item, idx) {
      var i = 0, length = getLength(array);
      if (typeof idx == 'number') {
        if (dir > 0) {
          i = idx >= 0 ? idx : Math.max(idx + length, i);
        } else {
          length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;
        }
      } else if (sortedIndex && idx && length) {
        idx = sortedIndex(array, item);
        return array[idx] === item ? idx : -1;
      }
      if (item !== item) {
        idx = predicateFind(slice.call(array, i, length), isNaN$1);
        return idx >= 0 ? idx + i : -1;
      }
      for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {
        if (array[idx] === item) return idx;
      }
      return -1;
    };
  }

  // Return the position of the first occurrence of an item in an array,
  // or -1 if the item is not included in the array.
  // If the array is large and already in sort order, pass `true`
  // for **isSorted** to use binary search.
  var indexOf = createIndexFinder(1, findIndex, sortedIndex);

  // Return the position of the last occurrence of an item in an array,
  // or -1 if the item is not included in the array.
  var lastIndexOf = createIndexFinder(-1, findLastIndex);

  // Return the first value which passes a truth test.
  function find(obj, predicate, context) {
    var keyFinder = isArrayLike(obj) ? findIndex : findKey;
    var key = keyFinder(obj, predicate, context);
    if (key !== void 0 && key !== -1) return obj[key];
  }

  // Convenience version of a common use case of `_.find`: getting the first
  // object containing specific `key:value` pairs.
  function findWhere(obj, attrs) {
    return find(obj, matcher(attrs));
  }

  // The cornerstone for collection functions, an `each`
  // implementation, aka `forEach`.
  // Handles raw objects in addition to array-likes. Treats all
  // sparse array-likes as if they were dense.
  function each(obj, iteratee, context) {
    iteratee = optimizeCb(iteratee, context);
    var i, length;
    if (isArrayLike(obj)) {
      for (i = 0, length = obj.length; i < length; i++) {
        iteratee(obj[i], i, obj);
      }
    } else {
      var _keys = keys(obj);
      for (i = 0, length = _keys.length; i < length; i++) {
        iteratee(obj[_keys[i]], _keys[i], obj);
      }
    }
    return obj;
  }

  // Return the results of applying the iteratee to each element.
  function map(obj, iteratee, context) {
    iteratee = cb(iteratee, context);
    var _keys = !isArrayLike(obj) && keys(obj),
        length = (_keys || obj).length,
        results = Array(length);
    for (var index = 0; index < length; index++) {
      var currentKey = _keys ? _keys[index] : index;
      results[index] = iteratee(obj[currentKey], currentKey, obj);
    }
    return results;
  }

  // Internal helper to create a reducing function, iterating left or right.
  function createReduce(dir) {
    // Wrap code that reassigns argument variables in a separate function than
    // the one that accesses `arguments.length` to avoid a perf hit. (#1991)
    var reducer = function(obj, iteratee, memo, initial) {
      var _keys = !isArrayLike(obj) && keys(obj),
          length = (_keys || obj).length,
          index = dir > 0 ? 0 : length - 1;
      if (!initial) {
        memo = obj[_keys ? _keys[index] : index];
        index += dir;
      }
      for (; index >= 0 && index < length; index += dir) {
        var currentKey = _keys ? _keys[index] : index;
        memo = iteratee(memo, obj[currentKey], currentKey, obj);
      }
      return memo;
    };

    return function(obj, iteratee, memo, context) {
      var initial = arguments.length >= 3;
      return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);
    };
  }

  // **Reduce** builds up a single result from a list of values, aka `inject`,
  // or `foldl`.
  var reduce = createReduce(1);

  // The right-associative version of reduce, also known as `foldr`.
  var reduceRight = createReduce(-1);

  // Return all the elements that pass a truth test.
  function filter(obj, predicate, context) {
    var results = [];
    predicate = cb(predicate, context);
    each(obj, function(value, index, list) {
      if (predicate(value, index, list)) results.push(value);
    });
    return results;
  }

  // Return all the elements for which a truth test fails.
  function reject(obj, predicate, context) {
    return filter(obj, negate(cb(predicate)), context);
  }

  // Determine whether all of the elements pass a truth test.
  function every(obj, predicate, context) {
    predicate = cb(predicate, context);
    var _keys = !isArrayLike(obj) && keys(obj),
        length = (_keys || obj).length;
    for (var index = 0; index < length; index++) {
      var currentKey = _keys ? _keys[index] : index;
      if (!predicate(obj[currentKey], currentKey, obj)) return false;
    }
    return true;
  }

  // Determine if at least one element in the object passes a truth test.
  function some(obj, predicate, context) {
    predicate = cb(predicate, context);
    var _keys = !isArrayLike(obj) && keys(obj),
        length = (_keys || obj).length;
    for (var index = 0; index < length; index++) {
      var currentKey = _keys ? _keys[index] : index;
      if (predicate(obj[currentKey], currentKey, obj)) return true;
    }
    return false;
  }

  // Determine if the array or object contains a given item (using `===`).
  function contains(obj, item, fromIndex, guard) {
    if (!isArrayLike(obj)) obj = values(obj);
    if (typeof fromIndex != 'number' || guard) fromIndex = 0;
    return indexOf(obj, item, fromIndex) >= 0;
  }

  // Invoke a method (with arguments) on every item in a collection.
  var invoke = restArguments(function(obj, path, args) {
    var contextPath, func;
    if (isFunction$1(path)) {
      func = path;
    } else {
      path = toPath(path);
      contextPath = path.slice(0, -1);
      path = path[path.length - 1];
    }
    return map(obj, function(context) {
      var method = func;
      if (!method) {
        if (contextPath && contextPath.length) {
          context = deepGet(context, contextPath);
        }
        if (context == null) return void 0;
        method = context[path];
      }
      return method == null ? method : method.apply(context, args);
    });
  });

  // Convenience version of a common use case of `_.map`: fetching a property.
  function pluck(obj, key) {
    return map(obj, property(key));
  }

  // Convenience version of a common use case of `_.filter`: selecting only
  // objects containing specific `key:value` pairs.
  function where(obj, attrs) {
    return filter(obj, matcher(attrs));
  }

  // Return the maximum element (or element-based computation).
  function max(obj, iteratee, context) {
    var result = -Infinity, lastComputed = -Infinity,
        value, computed;
    if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) {
      obj = isArrayLike(obj) ? obj : values(obj);
      for (var i = 0, length = obj.length; i < length; i++) {
        value = obj[i];
        if (value != null && value > result) {
          result = value;
        }
      }
    } else {
      iteratee = cb(iteratee, context);
      each(obj, function(v, index, list) {
        computed = iteratee(v, index, list);
        if (computed > lastComputed || (computed === -Infinity && result === -Infinity)) {
          result = v;
          lastComputed = computed;
        }
      });
    }
    return result;
  }

  // Return the minimum element (or element-based computation).
  function min(obj, iteratee, context) {
    var result = Infinity, lastComputed = Infinity,
        value, computed;
    if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) {
      obj = isArrayLike(obj) ? obj : values(obj);
      for (var i = 0, length = obj.length; i < length; i++) {
        value = obj[i];
        if (value != null && value < result) {
          result = value;
        }
      }
    } else {
      iteratee = cb(iteratee, context);
      each(obj, function(v, index, list) {
        computed = iteratee(v, index, list);
        if (computed < lastComputed || (computed === Infinity && result === Infinity)) {
          result = v;
          lastComputed = computed;
        }
      });
    }
    return result;
  }

  // Safely create a real, live array from anything iterable.
  var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;
  function toArray(obj) {
    if (!obj) return [];
    if (isArray(obj)) return slice.call(obj);
    if (isString(obj)) {
      // Keep surrogate pair characters together.
      return obj.match(reStrSymbol);
    }
    if (isArrayLike(obj)) return map(obj, identity);
    return values(obj);
  }

  // Sample **n** random values from a collection using the modern version of the
  // [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisherâ€“Yates_shuffle).
  // If **n** is not specified, returns a single random element.
  // The internal `guard` argument allows it to work with `_.map`.
  function sample(obj, n, guard) {
    if (n == null || guard) {
      if (!isArrayLike(obj)) obj = values(obj);
      return obj[random(obj.length - 1)];
    }
    var sample = toArray(obj);
    var length = getLength(sample);
    n = Math.max(Math.min(n, length), 0);
    var last = length - 1;
    for (var index = 0; index < n; index++) {
      var rand = random(index, last);
      var temp = sample[index];
      sample[index] = sample[rand];
      sample[rand] = temp;
    }
    return sample.slice(0, n);
  }

  // Shuffle a collection.
  function shuffle(obj) {
    return sample(obj, Infinity);
  }

  // Sort the object's values by a criterion produced by an iteratee.
  function sortBy(obj, iteratee, context) {
    var index = 0;
    iteratee = cb(iteratee, context);
    return pluck(map(obj, function(value, key, list) {
      return {
        value: value,
        index: index++,
        criteria: iteratee(value, key, list)
      };
    }).sort(function(left, right) {
      var a = left.criteria;
      var b = right.criteria;
      if (a !== b) {
        if (a > b || a === void 0) return 1;
        if (a < b || b === void 0) return -1;
      }
      return left.index - right.index;
    }), 'value');
  }

  // An internal function used for aggregate "group by" operations.
  function group(behavior, partition) {
    return function(obj, iteratee, context) {
      var result = partition ? [[], []] : {};
      iteratee = cb(iteratee, context);
      each(obj, function(value, index) {
        var key = iteratee(value, index, obj);
        behavior(result, value, key);
      });
      return result;
    };
  }

  // Groups the object's values by a criterion. Pass either a string attribute
  // to group by, or a function that returns the criterion.
  var groupBy = group(function(result, value, key) {
    if (has$1(result, key)) result[key].push(value); else result[key] = [value];
  });

  // Indexes the object's values by a criterion, similar to `_.groupBy`, but for
  // when you know that your index values will be unique.
  var indexBy = group(function(result, value, key) {
    result[key] = value;
  });

  // Counts instances of an object that group by a certain criterion. Pass
  // either a string attribute to count by, or a function that returns the
  // criterion.
  var countBy = group(function(result, value, key) {
    if (has$1(result, key)) result[key]++; else result[key] = 1;
  });

  // Split a collection into two arrays: one whose elements all pass the given
  // truth test, and one whose elements all do not pass the truth test.
  var partition = group(function(result, value, pass) {
    result[pass ? 0 : 1].push(value);
  }, true);

  // Return the number of elements in a collection.
  function size(obj) {
    if (obj == null) return 0;
    return isArrayLike(obj) ? obj.length : keys(obj).length;
  }

  // Internal `_.pick` helper function to determine whether `key` is an enumerable
  // property name of `obj`.
  function keyInObj(value, key, obj) {
    return key in obj;
  }

  // Return a copy of the object only containing the allowed properties.
  var pick = restArguments(function(obj, keys) {
    var result = {}, iteratee = keys[0];
    if (obj == null) return result;
    if (isFunction$1(iteratee)) {
      if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);
      keys = allKeys(obj);
    } else {
      iteratee = keyInObj;
      keys = flatten$1(keys, false, false);
      obj = Object(obj);
    }
    for (var i = 0, length = keys.length; i < length; i++) {
      var key = keys[i];
      var value = obj[key];
      if (iteratee(value, key, obj)) result[key] = value;
    }
    return result;
  });

  // Return a copy of the object without the disallowed properties.
  var omit = restArguments(function(obj, keys) {
    var iteratee = keys[0], context;
    if (isFunction$1(iteratee)) {
      iteratee = negate(iteratee);
      if (keys.length > 1) context = keys[1];
    } else {
      keys = map(flatten$1(keys, false, false), String);
      iteratee = function(value, key) {
        return !contains(keys, key);
      };
    }
    return pick(obj, iteratee, context);
  });

  // Returns everything but the last entry of the array. Especially useful on
  // the arguments object. Passing **n** will return all the values in
  // the array, excluding the last N.
  function initial(array, n, guard) {
    return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
  }

  // Get the first element of an array. Passing **n** will return the first N
  // values in the array. The **guard** check allows it to work with `_.map`.
  function first(array, n, guard) {
    if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
    if (n == null || guard) return array[0];
    return initial(array, array.length - n);
  }

  // Returns everything but the first entry of the `array`. Especially useful on
  // the `arguments` object. Passing an **n** will return the rest N values in the
  // `array`.
  function rest(array, n, guard) {
    return slice.call(array, n == null || guard ? 1 : n);
  }

  // Get the last element of an array. Passing **n** will return the last N
  // values in the array.
  function last(array, n, guard) {
    if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
    if (n == null || guard) return array[array.length - 1];
    return rest(array, Math.max(0, array.length - n));
  }

  // Trim out all falsy values from an array.
  function compact(array) {
    return filter(array, Boolean);
  }

  // Flatten out an array, either recursively (by default), or up to `depth`.
  // Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively.
  function flatten(array, depth) {
    return flatten$1(array, depth, false);
  }

  // Take the difference between one array and a number of other arrays.
  // Only the elements present in just the first array will remain.
  var difference = restArguments(function(array, rest) {
    rest = flatten$1(rest, true, true);
    return filter(array, function(value){
      return !contains(rest, value);
    });
  });

  // Return a version of the array that does not contain the specified value(s).
  var without = restArguments(function(array, otherArrays) {
    return difference(array, otherArrays);
  });

  // Produce a duplicate-free version of the array. If the array has already
  // been sorted, you have the option of using a faster algorithm.
  // The faster algorithm will not work with an iteratee if the iteratee
  // is not a one-to-one function, so providing an iteratee will disable
  // the faster algorithm.
  function uniq(array, isSorted, iteratee, context) {
    if (!isBoolean(isSorted)) {
      context = iteratee;
      iteratee = isSorted;
      isSorted = false;
    }
    if (iteratee != null) iteratee = cb(iteratee, context);
    var result = [];
    var seen = [];
    for (var i = 0, length = getLength(array); i < length; i++) {
      var value = array[i],
          computed = iteratee ? iteratee(value, i, array) : value;
      if (isSorted && !iteratee) {
        if (!i || seen !== computed) result.push(value);
        seen = computed;
      } else if (iteratee) {
        if (!contains(seen, computed)) {
          seen.push(computed);
          result.push(value);
        }
      } else if (!contains(result, value)) {
        result.push(value);
      }
    }
    return result;
  }

  // Produce an array that contains the union: each distinct element from all of
  // the passed-in arrays.
  var union = restArguments(function(arrays) {
    return uniq(flatten$1(arrays, true, true));
  });

  // Produce an array that contains every item shared between all the
  // passed-in arrays.
  function intersection(array) {
    var result = [];
    var argsLength = arguments.length;
    for (var i = 0, length = getLength(array); i < length; i++) {
      var item = array[i];
      if (contains(result, item)) continue;
      var j;
      for (j = 1; j < argsLength; j++) {
        if (!contains(arguments[j], item)) break;
      }
      if (j === argsLength) result.push(item);
    }
    return result;
  }

  // Complement of zip. Unzip accepts an array of arrays and groups
  // each array's elements on shared indices.
  function unzip(array) {
    var length = (array && max(array, getLength).length) || 0;
    var result = Array(length);

    for (var index = 0; index < length; index++) {
      result[index] = pluck(array, index);
    }
    return result;
  }

  // Zip together multiple lists into a single array -- elements that share
  // an index go together.
  var zip = restArguments(unzip);

  // Converts lists into objects. Pass either a single array of `[key, value]`
  // pairs, or two parallel arrays of the same length -- one of keys, and one of
  // the corresponding values. Passing by pairs is the reverse of `_.pairs`.
  function object(list, values) {
    var result = {};
    for (var i = 0, length = getLength(list); i < length; i++) {
      if (values) {
        result[list[i]] = values[i];
      } else {
        result[list[i][0]] = list[i][1];
      }
    }
    return result;
  }

  // Generate an integer Array containing an arithmetic progression. A port of
  // the native Python `range()` function. See
  // [the Python documentation](https://docs.python.org/library/functions.html#range).
  function range(start, stop, step) {
    if (stop == null) {
      stop = start || 0;
      start = 0;
    }
    if (!step) {
      step = stop < start ? -1 : 1;
    }

    var length = Math.max(Math.ceil((stop - start) / step), 0);
    var range = Array(length);

    for (var idx = 0; idx < length; idx++, start += step) {
      range[idx] = start;
    }

    return range;
  }

  // Chunk a single array into multiple arrays, each containing `count` or fewer
  // items.
  function chunk(array, count) {
    if (count == null || count < 1) return [];
    var result = [];
    var i = 0, length = array.length;
    while (i < length) {
      result.push(slice.call(array, i, i += count));
    }
    return result;
  }

  // Helper function to continue chaining intermediate results.
  function chainResult(instance, obj) {
    return instance._chain ? _$1(obj).chain() : obj;
  }

  // Add your own custom functions to the Underscore object.
  function mixin(obj) {
    each(functions(obj), function(name) {
      var func = _$1[name] = obj[name];
      _$1.prototype[name] = function() {
        var args = [this._wrapped];
        push.apply(args, arguments);
        return chainResult(this, func.apply(_$1, args));
      };
    });
    return _$1;
  }

  // Add all mutator `Array` functions to the wrapper.
  each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
    var method = ArrayProto[name];
    _$1.prototype[name] = function() {
      var obj = this._wrapped;
      if (obj != null) {
        method.apply(obj, arguments);
        if ((name === 'shift' || name === 'splice') && obj.length === 0) {
          delete obj[0];
        }
      }
      return chainResult(this, obj);
    };
  });

  // Add all accessor `Array` functions to the wrapper.
  each(['concat', 'join', 'slice'], function(name) {
    var method = ArrayProto[name];
    _$1.prototype[name] = function() {
      var obj = this._wrapped;
      if (obj != null) obj = method.apply(obj, arguments);
      return chainResult(this, obj);
    };
  });

  // Named Exports

  var allExports = {
    __proto__: null,
    VERSION: VERSION,
    restArguments: restArguments,
    isObject: isObject,
    isNull: isNull,
    isUndefined: isUndefined,
    isBoolean: isBoolean,
    isElement: isElement,
    isString: isString,
    isNumber: isNumber,
    isDate: isDate,
    isRegExp: isRegExp,
    isError: isError,
    isSymbol: isSymbol,
    isArrayBuffer: isArrayBuffer,
    isDataView: isDataView$1,
    isArray: isArray,
    isFunction: isFunction$1,
    isArguments: isArguments$1,
    isFinite: isFinite$1,
    isNaN: isNaN$1,
    isTypedArray: isTypedArray$1,
    isEmpty: isEmpty,
    isMatch: isMatch,
    isEqual: isEqual,
    isMap: isMap,
    isWeakMap: isWeakMap,
    isSet: isSet,
    isWeakSet: isWeakSet,
    keys: keys,
    allKeys: allKeys,
    values: values,
    pairs: pairs,
    invert: invert,
    functions: functions,
    methods: functions,
    extend: extend,
    extendOwn: extendOwn,
    assign: extendOwn,
    defaults: defaults,
    create: create,
    clone: clone,
    tap: tap,
    get: get,
    has: has,
    mapObject: mapObject,
    identity: identity,
    constant: constant,
    noop: noop,
    toPath: toPath$1,
    property: property,
    propertyOf: propertyOf,
    matcher: matcher,
    matches: matcher,
    times: times,
    random: random,
    now: now,
    escape: _escape,
    unescape: _unescape,
    templateSettings: templateSettings,
    template: template,
    result: result,
    uniqueId: uniqueId,
    chain: chain,
    iteratee: iteratee,
    partial: partial,
    bind: bind,
    bindAll: bindAll,
    memoize: memoize,
    delay: delay,
    defer: defer,
    throttle: throttle,
    debounce: debounce,
    wrap: wrap,
    negate: negate,
    compose: compose,
    after: after,
    before: before,
    once: once,
    findKey: findKey,
    findIndex: findIndex,
    findLastIndex: findLastIndex,
    sortedIndex: sortedIndex,
    indexOf: indexOf,
    lastIndexOf: lastIndexOf,
    find: find,
    detect: find,
    findWhere: findWhere,
    each: each,
    forEach: each,
    map: map,
    collect: map,
    reduce: reduce,
    foldl: reduce,
    inject: reduce,
    reduceRight: reduceRight,
    foldr: reduceRight,
    filter: filter,
    select: filter,
    reject: reject,
    every: every,
    all: every,
    some: some,
    any: some,
    contains: contains,
    includes: contains,
    include: contains,
    invoke: invoke,
    pluck: pluck,
    where: where,
    max: max,
    min: min,
    shuffle: shuffle,
    sample: sample,
    sortBy: sortBy,
    groupBy: groupBy,
    indexBy: indexBy,
    countBy: countBy,
    partition: partition,
    toArray: toArray,
    size: size,
    pick: pick,
    omit: omit,
    first: first,
    head: first,
    take: first,
    initial: initial,
    last: last,
    rest: rest,
    tail: rest,
    drop: rest,
    compact: compact,
    flatten: flatten,
    without: without,
    uniq: uniq,
    unique: uniq,
    union: union,
    intersection: intersection,
    difference: difference,
    unzip: unzip,
    transpose: unzip,
    zip: zip,
    object: object,
    range: range,
    chunk: chunk,
    mixin: mixin,
    'default': _$1
  };

  // Default Export

  // Add all of the Underscore functions to the wrapper object.
  var _ = mixin(allExports);
  // Legacy Node.js API.
  _._ = _;

  return _;

})));
                                                                                                                                                                                                                                                       underscore.min.js                                                                                   0000644                 00000045104 15212564050 0010041 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(n,t){var r,e;"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("underscore",t):(n="undefined"!=typeof globalThis?globalThis:n||self,r=n._,(e=n._=t()).noConflict=function(){return n._=r,e})}(this,function(){var n="1.13.8",t="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},e=Array.prototype,V=Object.prototype,F="undefined"!=typeof Symbol?Symbol.prototype:null,P=e.push,f=e.slice,s=V.toString,q=V.hasOwnProperty,r="undefined"!=typeof ArrayBuffer,u="undefined"!=typeof DataView,U=Array.isArray,W=Object.keys,z=Object.create,L=r&&ArrayBuffer.isView,$=isNaN,C=isFinite,K=!{toString:null}.propertyIsEnumerable("toString"),J=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],G=Math.pow(2,53)-1;function l(u,i){return i=null==i?u.length-1:+i,function(){for(var n=Math.max(arguments.length-i,0),t=Array(n),r=0;r<n;r++)t[r]=arguments[r+i];switch(i){case 0:return u.call(this,t);case 1:return u.call(this,arguments[0],t);case 2:return u.call(this,arguments[0],arguments[1],t)}for(var e=Array(i+1),r=0;r<i;r++)e[r]=arguments[r];return e[i]=t,u.apply(this,e)}}function i(n){var t=typeof n;return"function"==t||"object"==t&&!!n}function H(n){return void 0===n}function Q(n){return!0===n||!1===n||"[object Boolean]"===s.call(n)}function o(n){var t="[object "+n+"]";return function(n){return s.call(n)===t}}var X=o("String"),Y=o("Number"),Z=o("Date"),nn=o("RegExp"),tn=o("Error"),rn=o("Symbol"),en=o("ArrayBuffer"),a=o("Function"),t=t.document&&t.document.childNodes,p=a="function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof t?function(n){return"function"==typeof n||!1}:a,t=o("Object"),un=u&&(!/\[native code\]/.test(String(DataView))||t(new DataView(new ArrayBuffer(8)))),a="undefined"!=typeof Map&&t(new Map),u=o("DataView");var h=un?function(n){return null!=n&&p(n.getInt8)&&en(n.buffer)}:u,c=U||o("Array");function v(n,t){return null!=n&&q.call(n,t)}var on=o("Arguments"),an=(!function(){on(arguments)||(on=function(n){return v(n,"callee")})}(),on);function fn(n){return Y(n)&&$(n)}function cn(n){return function(){return n}}function ln(t){return function(n){n=t(n);return"number"==typeof n&&0<=n&&n<=G}}function sn(t){return function(n){return null==n?void 0:n[t]}}var y=sn("byteLength"),pn=ln(y),hn=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var vn=r?function(n){return L?L(n)&&!h(n):pn(n)&&hn.test(s.call(n))}:cn(!1),d=sn("length");function yn(n,t){t=function(t){for(var r={},n=t.length,e=0;e<n;++e)r[t[e]]=!0;return{contains:function(n){return!0===r[n]},push:function(n){return r[n]=!0,t.push(n)}}}(t);var r=J.length,e=n.constructor,u=p(e)&&e.prototype||V,i="constructor";for(v(n,i)&&!t.contains(i)&&t.push(i);r--;)(i=J[r])in n&&n[i]!==u[i]&&!t.contains(i)&&t.push(i)}function g(n){if(!i(n))return[];if(W)return W(n);var t,r=[];for(t in n)v(n,t)&&r.push(t);return K&&yn(n,r),r}function dn(n,t){var r=g(t),e=r.length;if(null==n)return!e;for(var u=Object(n),i=0;i<e;i++){var o=r[i];if(t[o]!==u[o]||!(o in u))return!1}return!0}function b(n){return n instanceof b?n:this instanceof b?void(this._wrapped=n):new b(n)}function gn(n){return new Uint8Array(n.buffer||n,n.byteOffset||0,y(n))}b.VERSION=n,b.prototype.valueOf=b.prototype.toJSON=b.prototype.value=function(){return this._wrapped},b.prototype.toString=function(){return String(this._wrapped)};var bn="[object DataView]";function m(n){if(!i(n))return[];var t,r=[];for(t in n)r.push(t);return K&&yn(n,r),r}function mn(e){var u=d(e);return function(n){if(null==n)return!1;var t=m(n);if(d(t))return!1;for(var r=0;r<u;r++)if(!p(n[e[r]]))return!1;return e!==wn||!p(n[jn])}}var jn="forEach",t=["clear","delete"],u=["get","has","set"],U=t.concat(jn,u),wn=t.concat(u),r=["add"].concat(t,jn,"has"),u=a?mn(U):o("Map"),t=a?mn(wn):o("WeakMap"),U=a?mn(r):o("Set"),a=o("WeakSet");function j(n){for(var t=g(n),r=t.length,e=Array(r),u=0;u<r;u++)e[u]=n[t[u]];return e}function _n(n){for(var t={},r=g(n),e=0,u=r.length;e<u;e++)t[n[r[e]]]=r[e];return t}function An(n){var t,r=[];for(t in n)p(n[t])&&r.push(t);return r.sort()}function xn(f,c){return function(n){var t=arguments.length;if(c&&(n=Object(n)),!(t<2||null==n))for(var r=1;r<t;r++)for(var e=arguments[r],u=f(e),i=u.length,o=0;o<i;o++){var a=u[o];c&&void 0!==n[a]||(n[a]=e[a])}return n}}var Sn=xn(m),w=xn(g),On=xn(m,!0);function Mn(n){var t;return i(n)?z?z(n):((t=function(){}).prototype=n,n=new t,t.prototype=null,n):{}}function En(n){return c(n)?n:[n]}function _(n){return b.toPath(n)}function Bn(n,t){for(var r=t.length,e=0;e<r;e++){if(null==n)return;n=n[t[e]]}return r?n:void 0}function Nn(n,t,r){n=Bn(n,_(t));return H(n)?r:n}function kn(n){return n}function A(t){return t=w({},t),function(n){return dn(n,t)}}function In(t){return t=_(t),function(n){return Bn(n,t)}}function x(u,i,n){if(void 0===i)return u;switch(null==n?3:n){case 1:return function(n){return u.call(i,n)};case 3:return function(n,t,r){return u.call(i,n,t,r)};case 4:return function(n,t,r,e){return u.call(i,n,t,r,e)}}return function(){return u.apply(i,arguments)}}function Tn(n,t,r){return null==n?kn:p(n)?x(n,t,r):(i(n)&&!c(n)?A:In)(n)}function Dn(n,t){return Tn(n,t,1/0)}function S(n,t,r){return b.iteratee!==Dn?b.iteratee(n,t):Tn(n,t,r)}function Rn(){}function Vn(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))}b.toPath=En,b.iteratee=Dn;var O=Date.now||function(){return(new Date).getTime()};function Fn(t){function r(n){return t[n]}var n="(?:"+g(t).join("|")+")",e=RegExp(n),u=RegExp(n,"g");return function(n){return e.test(n=null==n?"":""+n)?n.replace(u,r):n}}var r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},Pn=Fn(r),r=Fn(_n(r)),qn=b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Un=/(.)^/,Wn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},zn=/\\|'|\r|\n|\u2028|\u2029/g;function Ln(n){return"\\"+Wn[n]}var $n=/^\s*(\w|\$)+\s*$/;var Cn=0;function Kn(n,t,r,e,u){return e instanceof t?(e=Mn(n.prototype),i(t=n.apply(e,u))?t:e):n.apply(r,u)}var M=l(function(u,i){function o(){for(var n=0,t=i.length,r=Array(t),e=0;e<t;e++)r[e]=i[e]===a?arguments[n++]:i[e];for(;n<arguments.length;)r.push(arguments[n++]);return Kn(u,o,this,this,r)}var a=M.placeholder;return o}),Jn=(M.placeholder=b,l(function(t,r,e){var u;if(p(t))return u=l(function(n){return Kn(t,u,r,this,e.concat(n))});throw new TypeError("Bind must be called on a function")})),E=ln(d);function B(n,t,r){t||0===t||(t=1/0);for(var e=[],u=0,i=0,o=d(n)||0,a=[];;){if(o<=i){if(a.length){var f=a.pop(),i=f.i,o=d(n=f.v);continue}break}f=n[i++];t<=a.length?e[u++]=f:E(f)&&(c(f)||an(f))?(a.push({i:i,v:n}),i=0,o=d(n=f)):r||(e[u++]=f)}return e}var Gn=l(function(n,t){var r=(t=B(t,!1,!1)).length;if(r<1)throw new Error("bindAll must be passed function names");for(;r--;){var e=t[r];n[e]=Jn(n[e],n)}return n});var Hn=l(function(n,t,r){return setTimeout(function(){return n.apply(null,r)},t)}),Qn=M(Hn,b,1);function Xn(n){return function(){return!n.apply(this,arguments)}}function Yn(n,t){var r;return function(){return 0<--n&&(r=t.apply(this,arguments)),n<=1&&(t=null),r}}var Zn=M(Yn,2);function nt(n,t,r){t=S(t,r);for(var e,u=g(n),i=0,o=u.length;i<o;i++)if(t(n[e=u[i]],e,n))return e}function tt(i){return function(n,t,r){t=S(t,r);for(var e=d(n),u=0<i?0:e-1;0<=u&&u<e;u+=i)if(t(n[u],u,n))return u;return-1}}var rt=tt(1),et=tt(-1);function ut(n,t,r,e){for(var u=(r=S(r,e,1))(t),i=0,o=d(n);i<o;){var a=Math.floor((i+o)/2);r(n[a])<u?i=a+1:o=a}return i}function it(i,o,a){return function(n,t,r){var e=0,u=d(n);if("number"==typeof r)0<i?e=0<=r?r:Math.max(r+u,e):u=0<=r?Math.min(r+1,u):r+u+1;else if(a&&r&&u)return n[r=a(n,t)]===t?r:-1;if(t!=t)return 0<=(r=o(f.call(n,e,u),fn))?r+e:-1;for(r=0<i?e:u-1;0<=r&&r<u;r+=i)if(n[r]===t)return r;return-1}}var ot=it(1,rt,ut),at=it(-1,et);function ft(n,t,r){t=(E(n)?rt:nt)(n,t,r);if(void 0!==t&&-1!==t)return n[t]}function N(n,t,r){if(t=x(t,r),E(n))for(u=0,i=n.length;u<i;u++)t(n[u],u,n);else for(var e=g(n),u=0,i=e.length;u<i;u++)t(n[e[u]],e[u],n);return n}function k(n,t,r){t=S(t,r);for(var e=!E(n)&&g(n),u=(e||n).length,i=Array(u),o=0;o<u;o++){var a=e?e[o]:o;i[o]=t(n[a],a,n)}return i}function ct(f){return function(n,t,r,e){var u=3<=arguments.length;return function(n,t,r,e){var u=!E(n)&&g(n),i=(u||n).length,o=0<f?0:i-1;for(e||(r=n[u?u[o]:o],o+=f);0<=o&&o<i;o+=f){var a=u?u[o]:o;r=t(r,n[a],a,n)}return r}(n,x(t,e,4),r,u)}}var lt=ct(1),st=ct(-1);function I(n,e,t){var u=[];return e=S(e,t),N(n,function(n,t,r){e(n,t,r)&&u.push(n)}),u}function pt(n,t,r){t=S(t,r);for(var e=!E(n)&&g(n),u=(e||n).length,i=0;i<u;i++){var o=e?e[i]:i;if(!t(n[o],o,n))return!1}return!0}function ht(n,t,r){t=S(t,r);for(var e=!E(n)&&g(n),u=(e||n).length,i=0;i<u;i++){var o=e?e[i]:i;if(t(n[o],o,n))return!0}return!1}function T(n,t,r,e){return E(n)||(n=j(n)),0<=ot(n,t,r="number"==typeof r&&!e?r:0)}var vt=l(function(n,r,e){var u,i;return p(r)?i=r:(r=_(r),u=r.slice(0,-1),r=r[r.length-1]),k(n,function(n){var t=i;if(!t){if(null==(n=u&&u.length?Bn(n,u):n))return;t=n[r]}return null==t?t:t.apply(n,e)})});function yt(n,t){return k(n,In(t))}function dt(n,e,t){var r,u,i=-1/0,o=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=E(n)?n:j(n)).length;a<f;a++)null!=(r=n[a])&&i<r&&(i=r);else e=S(e,t),N(n,function(n,t,r){u=e(n,t,r),(o<u||u===-1/0&&i===-1/0)&&(i=n,o=u)});return i}var gt=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function bt(n){return n?c(n)?f.call(n):X(n)?n.match(gt):E(n)?k(n,kn):j(n):[]}function mt(n,t,r){if(null==t||r)return(n=E(n)?n:j(n))[Vn(n.length-1)];for(var e=bt(n),r=d(e),u=(t=Math.max(Math.min(t,r),0),r-1),i=0;i<t;i++){var o=Vn(i,u),a=e[i];e[i]=e[o],e[o]=a}return e.slice(0,t)}function D(i,t){return function(r,e,n){var u=t?[[],[]]:{};return e=S(e,n),N(r,function(n,t){t=e(n,t,r);i(u,n,t)}),u}}var jt=D(function(n,t,r){v(n,r)?n[r].push(t):n[r]=[t]}),wt=D(function(n,t,r){n[r]=t}),_t=D(function(n,t,r){v(n,r)?n[r]++:n[r]=1}),At=D(function(n,t,r){n[r?0:1].push(t)},!0);function xt(n,t,r){return t in r}var St=l(function(n,t){var r={},e=t[0];if(null!=n){p(e)?(1<t.length&&(e=x(e,t[1])),t=m(n)):(e=xt,t=B(t,!1,!1),n=Object(n));for(var u=0,i=t.length;u<i;u++){var o=t[u],a=n[o];e(a,o,n)&&(r[o]=a)}}return r}),Ot=l(function(n,r){var t,e=r[0];return p(e)?(e=Xn(e),1<r.length&&(t=r[1])):(r=k(B(r,!1,!1),String),e=function(n,t){return!T(r,t)}),St(n,e,t)});function Mt(n,t,r){return f.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))}function Et(n,t,r){return null==n||n.length<1?null==t||r?void 0:[]:null==t||r?n[0]:Mt(n,n.length-t)}function R(n,t,r){return f.call(n,null==t||r?1:t)}var Bt=l(function(n,t){return t=B(t,!0,!0),I(n,function(n){return!T(t,n)})}),Nt=l(function(n,t){return Bt(n,t)});function kt(n,t,r,e){Q(t)||(e=r,r=t,t=!1),null!=r&&(r=S(r,e));for(var u=[],i=[],o=0,a=d(n);o<a;o++){var f=n[o],c=r?r(f,o,n):f;t&&!r?(o&&i===c||u.push(f),i=c):r?T(i,c)||(i.push(c),u.push(f)):T(u,f)||u.push(f)}return u}var It=l(function(n){return kt(B(n,!0,!0))});function Tt(n){for(var t=n&&dt(n,d).length||0,r=Array(t),e=0;e<t;e++)r[e]=yt(n,e);return r}var Dt=l(Tt);function Rt(n,t){return n._chain?b(t).chain():t}function Vt(r){return N(An(r),function(n){var t=b[n]=r[n];b.prototype[n]=function(){var n=[this._wrapped];return P.apply(n,arguments),Rt(this,t.apply(b,n))}}),b}N(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var r=e[t];b.prototype[t]=function(){var n=this._wrapped;return null!=n&&(r.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0]),Rt(this,n)}}),N(["concat","join","slice"],function(n){var t=e[n];b.prototype[n]=function(){var n=this._wrapped;return Rt(this,n=null!=n?t.apply(n,arguments):n)}});n=Vt({__proto__:null,VERSION:n,restArguments:l,isObject:i,isNull:function(n){return null===n},isUndefined:H,isBoolean:Q,isElement:function(n){return!(!n||1!==n.nodeType)},isString:X,isNumber:Y,isDate:Z,isRegExp:nn,isError:tn,isSymbol:rn,isArrayBuffer:en,isDataView:h,isArray:c,isFunction:p,isArguments:an,isFinite:function(n){return!rn(n)&&C(n)&&!isNaN(parseFloat(n))},isNaN:fn,isTypedArray:vn,isEmpty:function(n){var t;return null==n||("number"==typeof(t=d(n))&&(c(n)||X(n)||an(n))?0===t:0===d(g(n)))},isMatch:dn,isEqual:function(n,t){for(var r=[{a:n,b:t}],e=[],u=[];r.length;){var i=r.pop();if(!0===i)e.pop(),u.pop();else{if((n=i.a)===(t=i.b)){if(0!==n||1/n==1/t)continue;return!1}if(null==n||null==t)return!1;if(n!=n){if(t!=t)continue;return!1}i=typeof n;if("function"!=i&&"object"!=i&&"object"!=typeof t)return!1;n instanceof b&&(n=n._wrapped),t instanceof b&&(t=t._wrapped);i=s.call(n);if(i!==s.call(t))return!1;if(un&&"[object Object]"==i&&h(n)){if(!h(t))return!1;i=bn}switch(i){case"[object RegExp]":case"[object String]":if(""+n==""+t)continue;return!1;case"[object Number]":r.push({a:+n,b:+t});continue;case"[object Date]":case"[object Boolean]":if(+n==+t)continue;return!1;case"[object Symbol]":if(F.valueOf.call(n)===F.valueOf.call(t))continue;return!1;case"[object ArrayBuffer]":case bn:r.push({a:gn(n),b:gn(t)});continue}i="[object Array]"===i;if(!i&&vn(n)){if(y(n)!==y(t))return!1;if(n.buffer===t.buffer&&n.byteOffset===t.byteOffset)continue;i=!0}if(!i){if("object"!=typeof n||"object"!=typeof t)return!1;var o=n.constructor,a=t.constructor;if(o!==a&&!(p(o)&&o instanceof o&&p(a)&&a instanceof a)&&"constructor"in n&&"constructor"in t)return!1}for(var f=e.length;f--;)if(e[f]===n){if(u[f]===t)break;return!1}if(!(0<=f))if(e.push(n),u.push(t),r.push(!0),i){if((f=n.length)!==t.length)return!1;for(;f--;)r.push({a:n[f],b:t[f]})}else{var c,l=g(n),f=l.length;if(g(t).length!==f)return!1;for(;f--;){if(!v(t,c=l[f]))return!1;r.push({a:n[c],b:t[c]})}}}}return!0},isMap:u,isWeakMap:t,isSet:U,isWeakSet:a,keys:g,allKeys:m,values:j,pairs:function(n){for(var t=g(n),r=t.length,e=Array(r),u=0;u<r;u++)e[u]=[t[u],n[t[u]]];return e},invert:_n,functions:An,methods:An,extend:Sn,extendOwn:w,assign:w,defaults:On,create:function(n,t){return n=Mn(n),t&&w(n,t),n},clone:function(n){return i(n)?c(n)?n.slice():Sn({},n):n},tap:function(n,t){return t(n),n},get:Nn,has:function(n,t){for(var r=(t=_(t)).length,e=0;e<r;e++){var u=t[e];if(!v(n,u))return!1;n=n[u]}return!!r},mapObject:function(n,t,r){t=S(t,r);for(var e=g(n),u=e.length,i={},o=0;o<u;o++){var a=e[o];i[a]=t(n[a],a,n)}return i},identity:kn,constant:cn,noop:Rn,toPath:En,property:In,propertyOf:function(t){return null==t?Rn:function(n){return Nn(t,n)}},matcher:A,matches:A,times:function(n,t,r){var e=Array(Math.max(0,n));t=x(t,r,1);for(var u=0;u<n;u++)e[u]=t(u);return e},random:Vn,now:O,escape:Pn,unescape:r,templateSettings:qn,template:function(i,n,t){n=On({},n=!n&&t?t:n,b.templateSettings);var r,t=RegExp([(n.escape||Un).source,(n.interpolate||Un).source,(n.evaluate||Un).source].join("|")+"|$","g"),o=0,a="__p+='";if(i.replace(t,function(n,t,r,e,u){return a+=i.slice(o,u).replace(zn,Ln),o=u+n.length,t?a+="'+\n((__t=("+t+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":e&&(a+="';\n"+e+"\n__p+='"),n}),a+="';\n",t=n.variable){if(!$n.test(t))throw new Error("variable is not a bare identifier: "+t)}else a="with(obj||{}){\n"+a+"}\n",t="obj";a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{r=new Function(t,"_",a)}catch(n){throw n.source=a,n}function e(n){return r.call(this,n,b)}return e.source="function("+t+"){\n"+a+"}",e},result:function(n,t,r){var e=(t=_(t)).length;if(!e)return p(r)?r.call(n):r;for(var u=0;u<e;u++){var i=null==n?void 0:n[t[u]];void 0===i&&(i=r,u=e),n=p(i)?i.call(n):i}return n},uniqueId:function(n){var t=++Cn+"";return n?n+t:t},chain:function(n){return(n=b(n))._chain=!0,n},iteratee:Dn,partial:M,bind:Jn,bindAll:Gn,memoize:function(e,u){function i(n){var t=i.cache,r=""+(u?u.apply(this,arguments):n);return v(t,r)||(t[r]=e.apply(this,arguments)),t[r]}return i.cache={},i},delay:Hn,defer:Qn,throttle:function(r,e,u){function i(){l=!1===u.leading?0:O(),o=null,c=r.apply(a,f),o||(a=f=null)}function n(){var n=O(),t=(l||!1!==u.leading||(l=n),e-(n-l));return a=this,f=arguments,t<=0||e<t?(o&&(clearTimeout(o),o=null),l=n,c=r.apply(a,f),o||(a=f=null)):o||!1===u.trailing||(o=setTimeout(i,t)),c}var o,a,f,c,l=0;return u=u||{},n.cancel=function(){clearTimeout(o),l=0,o=a=f=null},n},debounce:function(t,r,e){function u(){var n=O()-o;n<r?i=setTimeout(u,r-n):(i=null,e||(f=t.apply(c,a)),i||(a=c=null))}var i,o,a,f,c,n=l(function(n){return c=this,a=n,o=O(),i||(i=setTimeout(u,r),e&&(f=t.apply(c,a))),f});return n.cancel=function(){clearTimeout(i),i=a=c=null},n},wrap:function(n,t){return M(t,n)},negate:Xn,compose:function(){var r=arguments,e=r.length-1;return function(){for(var n=e,t=r[e].apply(this,arguments);n--;)t=r[n].call(this,t);return t}},after:function(n,t){return function(){if(--n<1)return t.apply(this,arguments)}},before:Yn,once:Zn,findKey:nt,findIndex:rt,findLastIndex:et,sortedIndex:ut,indexOf:ot,lastIndexOf:at,find:ft,detect:ft,findWhere:function(n,t){return ft(n,A(t))},each:N,forEach:N,map:k,collect:k,reduce:lt,foldl:lt,inject:lt,reduceRight:st,foldr:st,filter:I,select:I,reject:function(n,t,r){return I(n,Xn(S(t)),r)},every:pt,all:pt,some:ht,any:ht,contains:T,includes:T,include:T,invoke:vt,pluck:yt,where:function(n,t){return I(n,A(t))},max:dt,min:function(n,e,t){var r,u,i=1/0,o=1/0;if(null==e||"number"==typeof e&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=E(n)?n:j(n)).length;a<f;a++)null!=(r=n[a])&&r<i&&(i=r);else e=S(e,t),N(n,function(n,t,r){((u=e(n,t,r))<o||u===1/0&&i===1/0)&&(i=n,o=u)});return i},shuffle:function(n){return mt(n,1/0)},sample:mt,sortBy:function(n,e,t){var u=0;return e=S(e,t),yt(k(n,function(n,t,r){return{value:n,index:u++,criteria:e(n,t,r)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(e<r||void 0===r)return 1;if(r<e||void 0===e)return-1}return n.index-t.index}),"value")},groupBy:jt,indexBy:wt,countBy:_t,partition:At,toArray:bt,size:function(n){return null==n?0:(E(n)?n:g(n)).length},pick:St,omit:Ot,first:Et,head:Et,take:Et,initial:Mt,last:function(n,t,r){return null==n||n.length<1?null==t||r?void 0:[]:null==t||r?n[n.length-1]:R(n,Math.max(0,n.length-t))},rest:R,tail:R,drop:R,compact:function(n){return I(n,Boolean)},flatten:function(n,t){return B(n,t,!1)},without:Nt,uniq:kt,unique:kt,union:It,intersection:function(n){for(var t=[],r=arguments.length,e=0,u=d(n);e<u;e++){var i=n[e];if(!T(t,i)){for(var o=1;o<r&&T(arguments[o],i);o++);o===r&&t.push(i)}}return t},difference:Bt,unzip:Tt,transpose:Tt,zip:Dt,object:function(n,t){for(var r={},e=0,u=d(n);e<u;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},range:function(n,t,r){null==t&&(t=n||0,n=0),r=r||(t<n?-1:1);for(var e=Math.max(Math.ceil((t-n)/r),0),u=Array(e),i=0;i<e;i++,n+=r)u[i]=n;return u},chunk:function(n,t){if(null==t||t<1)return[];for(var r=[],e=0,u=n.length;e<u;)r.push(f.call(n,e,e+=t));return r},mixin:Vt,default:b});return n._=n});                                                                                                                                                                                                                                                                                                                                                                                                                                                            utils.js                                                                                            0000644                 00000011071 15212564050 0006242 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * Cookie functions.
 *
 * @output wp-includes/js/utils.js
 */

/* global userSettings, getAllUserSettings, wpCookies, setUserSetting */
/* exported getUserSetting, setUserSetting, deleteUserSetting */

window.wpCookies = {
// The following functions are from Cookie.js class in TinyMCE 3, Moxiecode, used under LGPL.

	each: function( obj, cb, scope ) {
		var n, l;

		if ( ! obj ) {
			return 0;
		}

		scope = scope || obj;

		if ( typeof( obj.length ) !== 'undefined' ) {
			for ( n = 0, l = obj.length; n < l; n++ ) {
				if ( cb.call( scope, obj[n], n, obj ) === false ) {
					return 0;
				}
			}
		} else {
			for ( n in obj ) {
				if ( obj.hasOwnProperty(n) ) {
					if ( cb.call( scope, obj[n], n, obj ) === false ) {
						return 0;
					}
				}
			}
		}
		return 1;
	},

	/**
	 * Get a multi-values cookie.
	 * Returns a JS object with the name: 'value' pairs.
	 */
	getHash: function( name ) {
		var cookie = this.get( name ), values;

		if ( cookie ) {
			this.each( cookie.split('&'), function( pair ) {
				pair = pair.split('=');
				values = values || {};
				values[pair[0]] = pair[1];
			});
		}

		return values;
	},

	/**
	 * Set a multi-values cookie.
	 *
	 * 'values_obj' is the JS object that is stored. It is encoded as URI in wpCookies.set().
	 */
	setHash: function( name, values_obj, expires, path, domain, secure ) {
		var str = '';

		this.each( values_obj, function( val, key ) {
			str += ( ! str ? '' : '&' ) + key + '=' + val;
		});

		this.set( name, str, expires, path, domain, secure );
	},

	/**
	 * Get a cookie.
	 */
	get: function( name ) {
		var e, b,
			cookie = document.cookie,
			p = name + '=';

		if ( ! cookie ) {
			return;
		}

		b = cookie.indexOf( '; ' + p );

		if ( b === -1 ) {
			b = cookie.indexOf(p);

			if ( b !== 0 ) {
				return null;
			}
		} else {
			b += 2;
		}

		e = cookie.indexOf( ';', b );

		if ( e === -1 ) {
			e = cookie.length;
		}

		return decodeURIComponent( cookie.substring( b + p.length, e ) );
	},

	/**
	 * Set a cookie.
	 *
	 * The 'expires' arg can be either a JS Date() object set to the expiration date (back-compat)
	 * or the number of seconds until expiration
	 */
	set: function( name, value, expires, path, domain, secure ) {
		var d = new Date();

		if ( typeof( expires ) === 'object' && expires.toGMTString ) {
			expires = expires.toGMTString();
		} else if ( parseInt( expires, 10 ) ) {
			d.setTime( d.getTime() + ( parseInt( expires, 10 ) * 1000 ) ); // Time must be in milliseconds.
			expires = d.toGMTString();
		} else {
			expires = '';
		}

		document.cookie = name + '=' + encodeURIComponent( value ) +
			( expires ? '; expires=' + expires : '' ) +
			( path    ? '; path=' + path       : '' ) +
			( domain  ? '; domain=' + domain   : '' ) +
			( secure  ? '; secure'             : '' );
	},

	/**
	 * Remove a cookie.
	 *
	 * This is done by setting it to an empty value and setting the expiration time in the past.
	 */
	remove: function( name, path, domain, secure ) {
		this.set( name, '', -1000, path, domain, secure );
	}
};

// Returns the value as string. Second arg or empty string is returned when value is not set.
window.getUserSetting = function( name, def ) {
	var settings = getAllUserSettings();

	if ( settings.hasOwnProperty( name ) ) {
		return settings[name];
	}

	if ( typeof def !== 'undefined' ) {
		return def;
	}

	return '';
};

/*
 * Both name and value must be only ASCII letters, numbers or underscore
 * and the shorter, the better (cookies can store maximum 4KB). Not suitable to store text.
 * The value is converted and stored as string.
 */
window.setUserSetting = function( name, value, _del ) {
	if ( 'object' !== typeof userSettings ) {
		return false;
	}

	var uid = userSettings.uid,
		settings = wpCookies.getHash( 'wp-settings-' + uid ),
		path = userSettings.url,
		secure = !! userSettings.secure;

	name = name.toString().replace( /[^A-Za-z0-9_-]/g, '' );

	if ( typeof value === 'number' ) {
		value = parseInt( value, 10 );
	} else {
		value = value.toString().replace( /[^A-Za-z0-9_-]/g, '' );
	}

	settings = settings || {};

	if ( _del ) {
		delete settings[name];
	} else {
		settings[name] = value;
	}

	wpCookies.setHash( 'wp-settings-' + uid, settings, 31536000, path, '', secure );
	wpCookies.set( 'wp-settings-time-' + uid, userSettings.time, 31536000, path, '', secure );

	return name;
};

window.deleteUserSetting = function( name ) {
	return setUserSetting( name, '', 1 );
};

// Returns all settings as JS object.
window.getAllUserSettings = function() {
	if ( 'object' !== typeof userSettings ) {
		return {};
	}

	return wpCookies.getHash( 'wp-settings-' + userSettings.uid ) || {};
};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                       utils.min.js                                                                                        0000644                 00000003510 15212564050 0007023 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
window.wpCookies={each:function(e,t,n){var i,s;if(!e)return 0;if(n=n||e,void 0!==e.length){for(i=0,s=e.length;i<s;i++)if(!1===t.call(n,e[i],i,e))return 0}else for(i in e)if(e.hasOwnProperty(i)&&!1===t.call(n,e[i],i,e))return 0;return 1},getHash:function(e){var t,e=this.get(e);return e&&this.each(e.split("&"),function(e){e=e.split("="),(t=t||{})[e[0]]=e[1]}),t},setHash:function(e,t,n,i,s,r){var o="";this.each(t,function(e,t){o+=(o?"&":"")+t+"="+e}),this.set(e,o,n,i,s,r)},get:function(e){var t,n,i=document.cookie,e=e+"=";if(i){if(-1===(n=i.indexOf("; "+e))){if(0!==(n=i.indexOf(e)))return null}else n+=2;return-1===(t=i.indexOf(";",n))&&(t=i.length),decodeURIComponent(i.substring(n+e.length,t))}},set:function(e,t,n,i,s,r){var o=new Date;n="object"==typeof n&&n.toGMTString?n.toGMTString():parseInt(n,10)?(o.setTime(o.getTime()+1e3*parseInt(n,10)),o.toGMTString()):"",document.cookie=e+"="+encodeURIComponent(t)+(n?"; expires="+n:"")+(i?"; path="+i:"")+(s?"; domain="+s:"")+(r?"; secure":"")},remove:function(e,t,n,i){this.set(e,"",-1e3,t,n,i)}},window.getUserSetting=function(e,t){var n=getAllUserSettings();return n.hasOwnProperty(e)?n[e]:void 0!==t?t:""},window.setUserSetting=function(e,t,n){var i,s,r,o;return"object"==typeof userSettings&&(i=userSettings.uid,s=wpCookies.getHash("wp-settings-"+i),r=userSettings.url,o=!!userSettings.secure,e=e.toString().replace(/[^A-Za-z0-9_-]/g,""),t="number"==typeof t?parseInt(t,10):t.toString().replace(/[^A-Za-z0-9_-]/g,""),s=s||{},n?delete s[e]:s[e]=t,wpCookies.setHash("wp-settings-"+i,s,31536e3,r,"",o),wpCookies.set("wp-settings-time-"+i,userSettings.time,31536e3,r,"",o),e)},window.deleteUserSetting=function(e){return setUserSetting(e,"",1)},window.getAllUserSettings=function(){return"object"==typeof userSettings&&wpCookies.getHash("wp-settings-"+userSettings.uid)||{}};                                                                                                                                                                                        wp-ajax-response.js                                                                                 0000644                 00000007477 15212564050 0010324 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/wp-ajax-response.js
 */

 /* global wpAjax */

window.wpAjax = jQuery.extend( {
	unserialize: function( s ) {
		var r = {}, q, pp, i, p;
		if ( !s ) { return r; }
		q = s.split('?'); if ( q[1] ) { s = q[1]; }
		pp = s.split('&');
		for ( i in pp ) {
			if ( typeof pp.hasOwnProperty === 'function' && !pp.hasOwnProperty(i) ) { continue; }
			p = pp[i].split('=');
			r[p[0]] = p[1];
		}
		return r;
	},
	parseAjaxResponse: function( x, r, e ) { // 1 = good, 0 = strange (bad data?), -1 = you lack permission.
		var parsed = {}, re = jQuery('#' + r).empty(), err = '', noticeMessage = '';

		if ( x && typeof x === 'object' && x.getElementsByTagName('wp_ajax') ) {
			parsed.responses = [];
			parsed.errors = false;
			jQuery('response', x).each( function() {
				var th = jQuery(this), child = jQuery(this.firstChild), response;
				response = { action: th.attr('action'), what: child.get(0).nodeName, id: child.attr('id'), oldId: child.attr('old_id'), position: child.attr('position') };
				response.data = jQuery( 'response_data', child ).text();
				response.supplemental = {};
				if ( !jQuery( 'supplemental', child ).children().each( function() {

					if ( this.nodeName === 'notice' ) {
						noticeMessage += jQuery(this).text();
						return;
					}

					response.supplemental[this.nodeName] = jQuery(this).text();
				} ).length ) { response.supplemental = false; }
				response.errors = [];
				if ( !jQuery('wp_error', child).each( function() {
					var code = jQuery(this).attr('code'), anError, errorData, formField;
					anError = { code: code, message: this.firstChild.nodeValue, data: false };
					errorData = jQuery('wp_error_data[code="' + code + '"]', x);
					if ( errorData ) { anError.data = errorData.get(); }
					formField = jQuery( 'form-field', errorData ).text();
					if ( formField ) { code = formField; }
					if ( e ) { wpAjax.invalidateForm( jQuery('#' + e + ' :input[name="' + code + '"]' ).parents('.form-field:first') ); }
					err += '<p>' + anError.message + '</p>';
					response.errors.push( anError );
					parsed.errors = true;
				} ).length ) { response.errors = false; }
				parsed.responses.push( response );
			} );
			if ( err.length ) {
				re.html( '<div class="notice notice-error" role="alert">' + err + '</div>' );
				wp.a11y.speak( err );
			} else if ( noticeMessage.length ) {
				re.html( '<div class="notice notice-success is-dismissible" role="alert"><p>' + noticeMessage + '</p></div>');
				jQuery(document).trigger( 'wp-updates-notice-added' );
				wp.a11y.speak( noticeMessage );
			}
			return parsed;
		}
		if ( isNaN( x ) ) {
			wp.a11y.speak( x );
			return ! re.html( '<div class="notice notice-error" role="alert"><p>' + x + '</p></div>' );
		}
		x = parseInt( x, 10 );
		if ( -1 === x ) {
			wp.a11y.speak( wpAjax.noPerm );
			return ! re.html( '<div class="notice notice-error" role="alert"><p>' + wpAjax.noPerm + '</p></div>' );
		} else if ( 0 === x ) {
			wp.a11y.speak( wpAjax.broken );
			return ! re.html( '<div class="notice notice-error" role="alert"><p>' + wpAjax.broken  + '</p></div>' );
		}
		return true;
	},
	invalidateForm: function ( selector ) {
		return jQuery( selector ).addClass( 'form-invalid' ).find('input').one( 'change wp-check-valid-field', function() { jQuery(this).closest('.form-invalid').removeClass( 'form-invalid' ); } );
	},
	validateForm: function( selector ) {
		selector = jQuery( selector );
		return !wpAjax.invalidateForm( selector.find('.form-required').filter( function() { return jQuery('input:visible', this).val() === ''; } ) ).length;
	}
}, wpAjax || { noPerm: 'Sorry, you are not allowed to do that.', broken: 'An error occurred while processing your request. Please refresh the page and try again.' } );

// Basic form validation.
jQuery( function($){
	$('form.validate').on( 'submit', function() { return wpAjax.validateForm( $(this) ); } );
});
                                                                                                                                                                                                 wp-ajax-response.min.js                                                                             0000644                 00000005013 15212564050 0011066 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
window.wpAjax=jQuery.extend({unserialize:function(e){var r,t,a,i,n={};if(e)for(a in t=(e=(r=e.split("?"))[1]?r[1]:e).split("&"))"function"==typeof t.hasOwnProperty&&!t.hasOwnProperty(a)||(n[(i=t[a].split("="))[0]]=i[1]);return n},parseAjaxResponse:function(i,e,n){var o={},e=jQuery("#"+e).empty(),s="",t="";return i&&"object"==typeof i&&i.getElementsByTagName("wp_ajax")?(o.responses=[],o.errors=!1,jQuery("response",i).each(function(){var e=jQuery(this),r=jQuery(this.firstChild),a={action:e.attr("action"),what:r.get(0).nodeName,id:r.attr("id"),oldId:r.attr("old_id"),position:r.attr("position")};a.data=jQuery("response_data",r).text(),a.supplemental={},jQuery("supplemental",r).children().each(function(){"notice"===this.nodeName?t+=jQuery(this).text():a.supplemental[this.nodeName]=jQuery(this).text()}).length||(a.supplemental=!1),a.errors=[],jQuery("wp_error",r).each(function(){var e=jQuery(this).attr("code"),r={code:e,message:this.firstChild.nodeValue,data:!1},t=jQuery('wp_error_data[code="'+e+'"]',i);t&&(r.data=t.get()),(t=jQuery("form-field",t).text())&&(e=t),n&&wpAjax.invalidateForm(jQuery("#"+n+' :input[name="'+e+'"]').parents(".form-field:first")),s+="<p>"+r.message+"</p>",a.errors.push(r),o.errors=!0}).length||(a.errors=!1),o.responses.push(a)}),s.length?(e.html('<div class="notice notice-error" role="alert">'+s+"</div>"),wp.a11y.speak(s)):t.length&&(e.html('<div class="notice notice-success is-dismissible" role="alert"><p>'+t+"</p></div>"),jQuery(document).trigger("wp-updates-notice-added"),wp.a11y.speak(t)),o):isNaN(i)?(wp.a11y.speak(i),!e.html('<div class="notice notice-error" role="alert"><p>'+i+"</p></div>")):-1===(i=parseInt(i,10))?(wp.a11y.speak(wpAjax.noPerm),!e.html('<div class="notice notice-error" role="alert"><p>'+wpAjax.noPerm+"</p></div>")):0!==i||(wp.a11y.speak(wpAjax.broken),!e.html('<div class="notice notice-error" role="alert"><p>'+wpAjax.broken+"</p></div>"))},invalidateForm:function(e){return jQuery(e).addClass("form-invalid").find("input").one("change wp-check-valid-field",function(){jQuery(this).closest(".form-invalid").removeClass("form-invalid")})},validateForm:function(e){return e=jQuery(e),!wpAjax.invalidateForm(e.find(".form-required").filter(function(){return""===jQuery("input:visible",this).val()})).length}},wpAjax||{noPerm:"Sorry, you are not allowed to do that.",broken:"An error occurred while processing your request. Please refresh the page and try again."}),jQuery(function(e){e("form.validate").on("submit",function(){return wpAjax.validateForm(e(this))})});                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     wp-api.js                                                                                           0000644                 00000133607 15212564050 0006311 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/wp-api.js
 */

(function( window, undefined ) {

	'use strict';

	/**
	 * Initialize the WP_API.
	 */
	function WP_API() {
		/** @namespace wp.api.models */
		this.models = {};
		/** @namespace wp.api.collections */
		this.collections = {};
		/** @namespace wp.api.views */
		this.views = {};
	}

	/** @namespace wp */
	window.wp            = window.wp || {};
	/** @namespace wp.api */
	wp.api               = wp.api || new WP_API();
	wp.api.versionString = wp.api.versionString || 'wp/v2/';

	// Alias _includes to _.contains, ensuring it is available if lodash is used.
	if ( ! _.isFunction( _.includes ) && _.isFunction( _.contains ) ) {
	  _.includes = _.contains;
	}

})( window );

(function( window, undefined ) {

	'use strict';

	var pad, r;

	/** @namespace wp */
	window.wp = window.wp || {};
	/** @namespace wp.api */
	wp.api = wp.api || {};
	/** @namespace wp.api.utils */
	wp.api.utils = wp.api.utils || {};

	/**
	 * Determine model based on API route.
	 *
	 * @param {string} route    The API route.
	 *
	 * @return {Backbone Model} The model found at given route. Undefined if not found.
	 */
	wp.api.getModelByRoute = function( route ) {
		return _.find( wp.api.models, function( model ) {
			return model.prototype.route && route === model.prototype.route.index;
		} );
	};

	/**
	 * Determine collection based on API route.
	 *
	 * @param {string} route    The API route.
	 *
	 * @return {Backbone Model} The collection found at given route. Undefined if not found.
	 */
	wp.api.getCollectionByRoute = function( route ) {
		return _.find( wp.api.collections, function( collection ) {
			return collection.prototype.route && route === collection.prototype.route.index;
		} );
	};


	/**
	 * ECMAScript 5 shim, adapted from MDN.
	 * @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString
	 */
	if ( ! Date.prototype.toISOString ) {
		pad = function( number ) {
			r = String( number );
			if ( 1 === r.length ) {
				r = '0' + r;
			}

			return r;
		};

		Date.prototype.toISOString = function() {
			return this.getUTCFullYear() +
				'-' + pad( this.getUTCMonth() + 1 ) +
				'-' + pad( this.getUTCDate() ) +
				'T' + pad( this.getUTCHours() ) +
				':' + pad( this.getUTCMinutes() ) +
				':' + pad( this.getUTCSeconds() ) +
				'.' + String( ( this.getUTCMilliseconds() / 1000 ).toFixed( 3 ) ).slice( 2, 5 ) +
				'Z';
		};
	}

	/**
	 * Parse date into ISO8601 format.
	 *
	 * @param {Date} date.
	 */
	wp.api.utils.parseISO8601 = function( date ) {
		var timestamp, struct, i, k,
			minutesOffset = 0,
			numericKeys = [ 1, 4, 5, 6, 7, 10, 11 ];

		/*
		 * ES5 Â§15.9.4.2 states that the string should attempt to be parsed as a Date Time String Format string
		 * before falling back to any implementation-specific date parsing, so thatâ€™s what we do, even if native
		 * implementations could be faster.
		 */
		//              1 YYYY                2 MM       3 DD           4 HH    5 mm       6 ss        7 msec        8 Z 9 Â±    10 tzHH    11 tzmm
		if ( ( struct = /^(\d{4}|[+\-]\d{6})(?:-(\d{2})(?:-(\d{2}))?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/.exec( date ) ) ) {

			// Avoid NaN timestamps caused by â€œundefinedâ€ values being passed to Date.UTC.
			for ( i = 0; ( k = numericKeys[i] ); ++i ) {
				struct[k] = +struct[k] || 0;
			}

			// Allow undefined days and months.
			struct[2] = ( +struct[2] || 1 ) - 1;
			struct[3] = +struct[3] || 1;

			if ( 'Z' !== struct[8]  && undefined !== struct[9] ) {
				minutesOffset = struct[10] * 60 + struct[11];

				if ( '+' === struct[9] ) {
					minutesOffset = 0 - minutesOffset;
				}
			}

			timestamp = Date.UTC( struct[1], struct[2], struct[3], struct[4], struct[5] + minutesOffset, struct[6], struct[7] );
		} else {
			timestamp = Date.parse ? Date.parse( date ) : NaN;
		}

		return timestamp;
	};

	/**
	 * Helper function for getting the root URL.
	 * @return {[type]} [description]
	 */
	wp.api.utils.getRootUrl = function() {
		return window.location.origin ?
			window.location.origin + '/' :
			window.location.protocol + '//' + window.location.host + '/';
	};

	/**
	 * Helper for capitalizing strings.
	 */
	wp.api.utils.capitalize = function( str ) {
		if ( _.isUndefined( str ) ) {
			return str;
		}
		return str.charAt( 0 ).toUpperCase() + str.slice( 1 );
	};

	/**
	 * Helper function that capitalizes the first word and camel cases any words starting
	 * after dashes, removing the dashes.
	 */
	wp.api.utils.capitalizeAndCamelCaseDashes = function( str ) {
		if ( _.isUndefined( str ) ) {
			return str;
		}
		str = wp.api.utils.capitalize( str );

		return wp.api.utils.camelCaseDashes( str );
	};

	/**
	 * Helper function to camel case the letter after dashes, removing the dashes.
	 */
	wp.api.utils.camelCaseDashes = function( str ) {
		return str.replace( /-([a-z])/g, function( g ) {
			return g[ 1 ].toUpperCase();
		} );
	};

	/**
	 * Extract a route part based on negative index.
	 *
	 * @param {string}   route          The endpoint route.
	 * @param {number}   part           The number of parts from the end of the route to retrieve. Default 1.
	 *                                  Example route `/a/b/c`: part 1 is `c`, part 2 is `b`, part 3 is `a`.
	 * @param {string}  [versionString] Version string, defaults to `wp.api.versionString`.
	 * @param {boolean} [reverse]       Whether to reverse the order when extracting the route part. Optional, default false.
	 */
	wp.api.utils.extractRoutePart = function( route, part, versionString, reverse ) {
		var routeParts;

		part = part || 1;
		versionString = versionString || wp.api.versionString;

		// Remove versions string from route to avoid returning it.
		if ( 0 === route.indexOf( '/' + versionString ) ) {
			route = route.substr( versionString.length + 1 );
		}

		routeParts = route.split( '/' );
		if ( reverse ) {
			routeParts = routeParts.reverse();
		}
		if ( _.isUndefined( routeParts[ --part ] ) ) {
			return '';
		}
		return routeParts[ part ];
	};

	/**
	 * Extract a parent name from a passed route.
	 *
	 * @param {string} route The route to extract a name from.
	 */
	wp.api.utils.extractParentName = function( route ) {
		var name,
			lastSlash = route.lastIndexOf( '_id>[\\d]+)/' );

		if ( lastSlash < 0 ) {
			return '';
		}
		name = route.substr( 0, lastSlash - 1 );
		name = name.split( '/' );
		name.pop();
		name = name.pop();
		return name;
	};

	/**
	 * Add args and options to a model prototype from a route's endpoints.
	 *
	 * @param {Array}  routeEndpoints Array of route endpoints.
	 * @param {Object} modelInstance  An instance of the model (or collection)
	 *                                to add the args to.
	 */
	wp.api.utils.decorateFromRoute = function( routeEndpoints, modelInstance ) {

		/**
		 * Build the args based on route endpoint data.
		 */
		_.each( routeEndpoints, function( routeEndpoint ) {

			// Add post and edit endpoints as model args.
			if ( _.includes( routeEndpoint.methods, 'POST' ) || _.includes( routeEndpoint.methods, 'PUT' ) ) {

				// Add any non-empty args, merging them into the args object.
				if ( ! _.isEmpty( routeEndpoint.args ) ) {

					// Set as default if no args yet.
					if ( _.isEmpty( modelInstance.prototype.args ) ) {
						modelInstance.prototype.args = routeEndpoint.args;
					} else {

						// We already have args, merge these new args in.
						modelInstance.prototype.args = _.extend( modelInstance.prototype.args, routeEndpoint.args );
					}
				}
			} else {

				// Add GET method as model options.
				if ( _.includes( routeEndpoint.methods, 'GET' ) ) {

					// Add any non-empty args, merging them into the defaults object.
					if ( ! _.isEmpty( routeEndpoint.args ) ) {

						// Set as default if no defaults yet.
						if ( _.isEmpty( modelInstance.prototype.options ) ) {
							modelInstance.prototype.options = routeEndpoint.args;
						} else {

							// We already have options, merge these new args in.
							modelInstance.prototype.options = _.extend( modelInstance.prototype.options, routeEndpoint.args );
						}
					}

				}
			}

		} );

	};

	/**
	 * Add mixins and helpers to models depending on their defaults.
	 *
	 * @param {Backbone Model} model          The model to attach helpers and mixins to.
	 * @param {string}         modelClassName The classname of the constructed model.
	 * @param {Object} 	       loadingObjects An object containing the models and collections we are building.
	 */
	wp.api.utils.addMixinsAndHelpers = function( model, modelClassName, loadingObjects ) {

		var hasDate = false,

			/**
			 * Array of parseable dates.
			 *
			 * @type {string[]}.
			 */
			parseableDates = [ 'date', 'modified', 'date_gmt', 'modified_gmt' ],

			/**
			 * Mixin for all content that is time stamped.
			 *
			 * This mixin converts between mysql timestamps and JavaScript Dates when syncing a model
			 * to or from the server. For example, a date stored as `2015-12-27T21:22:24` on the server
			 * gets expanded to `Sun Dec 27 2015 14:22:24 GMT-0700 (MST)` when the model is fetched.
			 *
			 * @type {{toJSON: toJSON, parse: parse}}.
			 */
			TimeStampedMixin = {

				/**
				 * Prepare a JavaScript Date for transmitting to the server.
				 *
				 * This helper function accepts a field and Date object. It converts the passed Date
				 * to an ISO string and sets that on the model field.
				 *
				 * @param {Date}   date   A JavaScript date object. WordPress expects dates in UTC.
				 * @param {string} field  The date field to set. One of 'date', 'date_gmt', 'date_modified'
				 *                        or 'date_modified_gmt'. Optional, defaults to 'date'.
				 */
				setDate: function( date, field ) {
					var theField = field || 'date';

					// Don't alter non-parsable date fields.
					if ( _.indexOf( parseableDates, theField ) < 0 ) {
						return false;
					}

					this.set( theField, date.toISOString() );
				},

				/**
				 * Get a JavaScript Date from the passed field.
				 *
				 * WordPress returns 'date' and 'date_modified' in the timezone of the server as well as
				 * UTC dates as 'date_gmt' and 'date_modified_gmt'. Draft posts do not include UTC dates.
				 *
				 * @param {string} field  The date field to set. One of 'date', 'date_gmt', 'date_modified'
				 *                        or 'date_modified_gmt'. Optional, defaults to 'date'.
				 */
				getDate: function( field ) {
					var theField   = field || 'date',
						theISODate = this.get( theField );

					// Only get date fields and non-null values.
					if ( _.indexOf( parseableDates, theField ) < 0 || _.isNull( theISODate ) ) {
						return false;
					}

					return new Date( wp.api.utils.parseISO8601( theISODate ) );
				}
			},

			/**
			 * Build a helper function to retrieve related model.
			 *
			 * @param {string} parentModel      The parent model.
			 * @param {number} modelId          The model ID if the object to request
			 * @param {string} modelName        The model name to use when constructing the model.
			 * @param {string} embedSourcePoint Where to check the embedded object for _embed data.
			 * @param {string} embedCheckField  Which model field to check to see if the model has data.
			 *
			 * @return {Deferred.promise}        A promise which resolves to the constructed model.
			 */
			buildModelGetter = function( parentModel, modelId, modelName, embedSourcePoint, embedCheckField ) {
				var getModel, embeddedObjects, attributes, deferred;

				deferred        = jQuery.Deferred();
				embeddedObjects = parentModel.get( '_embedded' ) || {};

				// Verify that we have a valid object id.
				if ( ! _.isNumber( modelId ) || 0 === modelId ) {
					deferred.reject();
					return deferred;
				}

				// If we have embedded object data, use that when constructing the getModel.
				if ( embeddedObjects[ embedSourcePoint ] ) {
					attributes = _.findWhere( embeddedObjects[ embedSourcePoint ], { id: modelId } );
				}

				// Otherwise use the modelId.
				if ( ! attributes ) {
					attributes = { id: modelId };
				}

				// Create the new getModel model.
				getModel = new wp.api.models[ modelName ]( attributes );

				if ( ! getModel.get( embedCheckField ) ) {
					getModel.fetch( {
						success: function( getModel ) {
							deferred.resolve( getModel );
						},
						error: function( getModel, response ) {
							deferred.reject( response );
						}
					} );
				} else {
					// Resolve with the embedded model.
					deferred.resolve( getModel );
				}

				// Return a promise.
				return deferred.promise();
			},

			/**
			 * Build a helper to retrieve a collection.
			 *
			 * @param {string} parentModel      The parent model.
			 * @param {string} collectionName   The name to use when constructing the collection.
			 * @param {string} embedSourcePoint Where to check the embedded object for _embed data.
			 * @param {string} embedIndex       An additional optional index for the _embed data.
			 *
			 * @return {Deferred.promise} A promise which resolves to the constructed collection.
			 */
			buildCollectionGetter = function( parentModel, collectionName, embedSourcePoint, embedIndex ) {
				/**
				 * Returns a promise that resolves to the requested collection
				 *
				 * Uses the embedded data if available, otherwise fetches the
				 * data from the server.
				 *
				 * @return {Deferred.promise} promise Resolves to a wp.api.collections[ collectionName ]
				 * collection.
				 */
				var postId, embeddedObjects, getObjects,
					classProperties = '',
					properties      = '',
					deferred        = jQuery.Deferred();

				postId          = parentModel.get( 'id' );
				embeddedObjects = parentModel.get( '_embedded' ) || {};

				// Verify that we have a valid post ID.
				if ( ! _.isNumber( postId ) || 0 === postId ) {
					deferred.reject();
					return deferred;
				}

				// If we have embedded getObjects data, use that when constructing the getObjects.
				if ( ! _.isUndefined( embedSourcePoint ) && ! _.isUndefined( embeddedObjects[ embedSourcePoint ] ) ) {

					// Some embeds also include an index offset, check for that.
					if ( _.isUndefined( embedIndex ) ) {

						// Use the embed source point directly.
						properties = embeddedObjects[ embedSourcePoint ];
					} else {

						// Add the index to the embed source point.
						properties = embeddedObjects[ embedSourcePoint ][ embedIndex ];
					}
				} else {

					// Otherwise use the postId.
					classProperties = { parent: postId };
				}

				// Create the new getObjects collection.
				getObjects = new wp.api.collections[ collectionName ]( properties, classProperties );

				// If we didnâ€™t have embedded getObjects, fetch the getObjects data.
				if ( _.isUndefined( getObjects.models[0] ) ) {
					getObjects.fetch( {
						success: function( getObjects ) {

							// Add a helper 'parent_post' attribute onto the model.
							setHelperParentPost( getObjects, postId );
							deferred.resolve( getObjects );
						},
						error: function( getModel, response ) {
							deferred.reject( response );
						}
					} );
				} else {

					// Add a helper 'parent_post' attribute onto the model.
					setHelperParentPost( getObjects, postId );
					deferred.resolve( getObjects );
				}

				// Return a promise.
				return deferred.promise();

			},

			/**
			 * Set the model post parent.
			 */
			setHelperParentPost = function( collection, postId ) {

				// Attach post_parent id to the collection.
				_.each( collection.models, function( model ) {
					model.set( 'parent_post', postId );
				} );
			},

			/**
			 * Add a helper function to handle post Meta.
			 */
			MetaMixin = {

				/**
				 * Get meta by key for a post.
				 *
				 * @param {string} key The meta key.
				 *
				 * @return {Object} The post meta value.
				 */
				getMeta: function( key ) {
					var metas = this.get( 'meta' );
					return metas[ key ];
				},

				/**
				 * Get all meta key/values for a post.
				 *
				 * @return {Object} The post metas, as a key value pair object.
				 */
				getMetas: function() {
					return this.get( 'meta' );
				},

				/**
				 * Set a group of meta key/values for a post.
				 *
				 * @param {Object} meta The post meta to set, as key/value pairs.
				 */
				setMetas: function( meta ) {
					var metas = this.get( 'meta' );
					_.extend( metas, meta );
					this.set( 'meta', metas );
				},

				/**
				 * Set a single meta value for a post, by key.
				 *
				 * @param {string} key   The meta key.
				 * @param {Object} value The meta value.
				 */
				setMeta: function( key, value ) {
					var metas = this.get( 'meta' );
					metas[ key ] = value;
					this.set( 'meta', metas );
				}
			},

			/**
			 * Add a helper function to handle post Revisions.
			 */
			RevisionsMixin = {
				getRevisions: function() {
					return buildCollectionGetter( this, 'PostRevisions' );
				}
			},

			/**
			 * Add a helper function to handle post Tags.
			 */
			TagsMixin = {

				/**
				 * Get the tags for a post.
				 *
				 * @return {Deferred.promise} promise Resolves to an array of tags.
				 */
				getTags: function() {
					var tagIds = this.get( 'tags' ),
						tags  = new wp.api.collections.Tags();

					// Resolve with an empty array if no tags.
					if ( _.isEmpty( tagIds ) ) {
						return jQuery.Deferred().resolve( [] );
					}

					return tags.fetch( { data: { include: tagIds } } );
				},

				/**
				 * Set the tags for a post.
				 *
				 * Accepts an array of tag slugs, or a Tags collection.
				 *
				 * @param {Array|Backbone.Collection} tags The tags to set on the post.
				 *
				 */
				setTags: function( tags ) {
					var allTags, newTag,
						self = this,
						newTags = [];

					if ( _.isString( tags ) ) {
						return false;
					}

					// If this is an array of slugs, build a collection.
					if ( _.isArray( tags ) ) {

						// Get all the tags.
						allTags = new wp.api.collections.Tags();
						allTags.fetch( {
							data:    { per_page: 100 },
							success: function( alltags ) {

								// Find the passed tags and set them up.
								_.each( tags, function( tag ) {
									newTag = new wp.api.models.Tag( alltags.findWhere( { slug: tag } ) );

									// Tie the new tag to the post.
									newTag.set( 'parent_post', self.get( 'id' ) );

									// Add the new tag to the collection.
									newTags.push( newTag );
								} );
								tags = new wp.api.collections.Tags( newTags );
								self.setTagsWithCollection( tags );
							}
						} );

					} else {
						this.setTagsWithCollection( tags );
					}
				},

				/**
				 * Set the tags for a post.
				 *
				 * Accepts a Tags collection.
				 *
				 * @param {Array|Backbone.Collection} tags The tags to set on the post.
				 *
				 */
				setTagsWithCollection: function( tags ) {

					// Pluck out the category IDs.
					this.set( 'tags', tags.pluck( 'id' ) );
					return this.save();
				}
			},

			/**
			 * Add a helper function to handle post Categories.
			 */
			CategoriesMixin = {

				/**
				 * Get a the categories for a post.
				 *
				 * @return {Deferred.promise} promise Resolves to an array of categories.
				 */
				getCategories: function() {
					var categoryIds = this.get( 'categories' ),
						categories  = new wp.api.collections.Categories();

					// Resolve with an empty array if no categories.
					if ( _.isEmpty( categoryIds ) ) {
						return jQuery.Deferred().resolve( [] );
					}

					return categories.fetch( { data: { include: categoryIds } } );
				},

				/**
				 * Set the categories for a post.
				 *
				 * Accepts an array of category slugs, or a Categories collection.
				 *
				 * @param {Array|Backbone.Collection} categories The categories to set on the post.
				 *
				 */
				setCategories: function( categories ) {
					var allCategories, newCategory,
						self = this,
						newCategories = [];

					if ( _.isString( categories ) ) {
						return false;
					}

					// If this is an array of slugs, build a collection.
					if ( _.isArray( categories ) ) {

						// Get all the categories.
						allCategories = new wp.api.collections.Categories();
						allCategories.fetch( {
							data:    { per_page: 100 },
							success: function( allcats ) {

								// Find the passed categories and set them up.
								_.each( categories, function( category ) {
									newCategory = new wp.api.models.Category( allcats.findWhere( { slug: category } ) );

									// Tie the new category to the post.
									newCategory.set( 'parent_post', self.get( 'id' ) );

									// Add the new category to the collection.
									newCategories.push( newCategory );
								} );
								categories = new wp.api.collections.Categories( newCategories );
								self.setCategoriesWithCollection( categories );
							}
						} );

					} else {
						this.setCategoriesWithCollection( categories );
					}

				},

				/**
				 * Set the categories for a post.
				 *
				 * Accepts Categories collection.
				 *
				 * @param {Array|Backbone.Collection} categories The categories to set on the post.
				 *
				 */
				setCategoriesWithCollection: function( categories ) {

					// Pluck out the category IDs.
					this.set( 'categories', categories.pluck( 'id' ) );
					return this.save();
				}
			},

			/**
			 * Add a helper function to retrieve the author user model.
			 */
			AuthorMixin = {
				getAuthorUser: function() {
					return buildModelGetter( this, this.get( 'author' ), 'User', 'author', 'name' );
				}
			},

			/**
			 * Add a helper function to retrieve the featured media.
			 */
			FeaturedMediaMixin = {
				getFeaturedMedia: function() {
					return buildModelGetter( this, this.get( 'featured_media' ), 'Media', 'wp:featuredmedia', 'source_url' );
				}
			};

		// Exit if we don't have valid model defaults.
		if ( _.isUndefined( model.prototype.args ) ) {
			return model;
		}

		// Go thru the parsable date fields, if our model contains any of them it gets the TimeStampedMixin.
		_.each( parseableDates, function( theDateKey ) {
			if ( ! _.isUndefined( model.prototype.args[ theDateKey ] ) ) {
				hasDate = true;
			}
		} );

		// Add the TimeStampedMixin for models that contain a date field.
		if ( hasDate ) {
			model = model.extend( TimeStampedMixin );
		}

		// Add the AuthorMixin for models that contain an author.
		if ( ! _.isUndefined( model.prototype.args.author ) ) {
			model = model.extend( AuthorMixin );
		}

		// Add the FeaturedMediaMixin for models that contain a featured_media.
		if ( ! _.isUndefined( model.prototype.args.featured_media ) ) {
			model = model.extend( FeaturedMediaMixin );
		}

		// Add the CategoriesMixin for models that support categories collections.
		if ( ! _.isUndefined( model.prototype.args.categories ) ) {
			model = model.extend( CategoriesMixin );
		}

		// Add the MetaMixin for models that support meta.
		if ( ! _.isUndefined( model.prototype.args.meta ) ) {
			model = model.extend( MetaMixin );
		}

		// Add the TagsMixin for models that support tags collections.
		if ( ! _.isUndefined( model.prototype.args.tags ) ) {
			model = model.extend( TagsMixin );
		}

		// Add the RevisionsMixin for models that support revisions collections.
		if ( ! _.isUndefined( loadingObjects.collections[ modelClassName + 'Revisions' ] ) ) {
			model = model.extend( RevisionsMixin );
		}

		return model;
	};

})( window );

/* global wpApiSettings:false */

// Suppress warning about parse function's unused "options" argument:
/* jshint unused:false */
(function() {

	'use strict';

	var wpApiSettings = window.wpApiSettings || {},
	trashableTypes    = [ 'Comment', 'Media', 'Comment', 'Post', 'Page', 'Status', 'Taxonomy', 'Type' ];

	/**
	 * Backbone base model for all models.
	 */
	wp.api.WPApiBaseModel = Backbone.Model.extend(
		/** @lends WPApiBaseModel.prototype  */
		{

			// Initialize the model.
			initialize: function() {

				/**
				* Types that don't support trashing require passing ?force=true to delete.
				*
				*/
				if ( -1 === _.indexOf( trashableTypes, this.name ) ) {
					this.requireForceForDelete = true;
				}
			},

			/**
			 * Set nonce header before every Backbone sync.
			 *
			 * @param {string} method.
			 * @param {Backbone.Model} model.
			 * @param {{beforeSend}, *} options.
			 * @return {*}.
			 */
			sync: function( method, model, options ) {
				var beforeSend;

				options = options || {};

				// Remove date_gmt if null.
				if ( _.isNull( model.get( 'date_gmt' ) ) ) {
					model.unset( 'date_gmt' );
				}

				// Remove slug if empty.
				if ( _.isEmpty( model.get( 'slug' ) ) ) {
					model.unset( 'slug' );
				}

				if ( _.isFunction( model.nonce ) && ! _.isEmpty( model.nonce() ) ) {
					beforeSend = options.beforeSend;

					// @todo Enable option for jsonp endpoints.
					// options.dataType = 'jsonp';

					// Include the nonce with requests.
					options.beforeSend = function( xhr ) {
						xhr.setRequestHeader( 'X-WP-Nonce', model.nonce() );

						if ( beforeSend ) {
							return beforeSend.apply( this, arguments );
						}
					};

					// Update the nonce when a new nonce is returned with the response.
					options.complete = function( xhr ) {
						var returnedNonce = xhr.getResponseHeader( 'X-WP-Nonce' );

						if ( returnedNonce && _.isFunction( model.nonce ) && model.nonce() !== returnedNonce ) {
							model.endpointModel.set( 'nonce', returnedNonce );
						}
					};
				}

				// Add '?force=true' to use delete method when required.
				if ( this.requireForceForDelete && 'delete' === method ) {
					model.url = model.url() + '?force=true';
				}
				return Backbone.sync( method, model, options );
			},

			/**
			 * Save is only allowed when the PUT OR POST methods are available for the endpoint.
			 */
			save: function( attrs, options ) {

				// Do we have the put method, then execute the save.
				if ( _.includes( this.methods, 'PUT' ) || _.includes( this.methods, 'POST' ) ) {

					// Proxy the call to the original save function.
					return Backbone.Model.prototype.save.call( this, attrs, options );
				} else {

					// Otherwise bail, disallowing action.
					return false;
				}
			},

			/**
			 * Delete is only allowed when the DELETE method is available for the endpoint.
			 */
			destroy: function( options ) {

				// Do we have the DELETE method, then execute the destroy.
				if ( _.includes( this.methods, 'DELETE' ) ) {

					// Proxy the call to the original save function.
					return Backbone.Model.prototype.destroy.call( this, options );
				} else {

					// Otherwise bail, disallowing action.
					return false;
				}
			}

		}
	);

	/**
	 * API Schema model. Contains meta information about the API.
	 */
	wp.api.models.Schema = wp.api.WPApiBaseModel.extend(
		/** @lends Schema.prototype  */
		{
			defaults: {
				_links: {},
				namespace: null,
				routes: {}
			},

			initialize: function( attributes, options ) {
				var model = this;
				options = options || {};

				wp.api.WPApiBaseModel.prototype.initialize.call( model, attributes, options );

				model.apiRoot = options.apiRoot || wpApiSettings.root;
				model.versionString = options.versionString || wpApiSettings.versionString;
			},

			url: function() {
				return this.apiRoot + this.versionString;
			}
		}
	);
})();

( function() {

	'use strict';

	var wpApiSettings = window.wpApiSettings || {};

	/**
	 * Contains basic collection functionality such as pagination.
	 */
	wp.api.WPApiBaseCollection = Backbone.Collection.extend(
		/** @lends BaseCollection.prototype  */
		{

			/**
			 * Setup default state.
			 */
			initialize: function( models, options ) {
				this.state = {
					data: {},
					currentPage: null,
					totalPages: null,
					totalObjects: null
				};
				if ( _.isUndefined( options ) ) {
					this.parent = '';
				} else {
					this.parent = options.parent;
				}
			},

			/**
			 * Extend Backbone.Collection.sync to add nince and pagination support.
			 *
			 * Set nonce header before every Backbone sync.
			 *
			 * @param {string} method.
			 * @param {Backbone.Model} model.
			 * @param {{success}, *} options.
			 * @return {*}.
			 */
			sync: function( method, model, options ) {
				var beforeSend, success,
					self = this;

				options = options || {};

				if ( _.isFunction( model.nonce ) && ! _.isEmpty( model.nonce() ) ) {
					beforeSend = options.beforeSend;

					// Include the nonce with requests.
					options.beforeSend = function( xhr ) {
						xhr.setRequestHeader( 'X-WP-Nonce', model.nonce() );

						if ( beforeSend ) {
							return beforeSend.apply( self, arguments );
						}
					};

					// Update the nonce when a new nonce is returned with the response.
					options.complete = function( xhr ) {
						var returnedNonce = xhr.getResponseHeader( 'X-WP-Nonce' );

						if ( returnedNonce && _.isFunction( model.nonce ) && model.nonce() !== returnedNonce ) {
							model.endpointModel.set( 'nonce', returnedNonce );
						}
					};
				}

				// When reading, add pagination data.
				if ( 'read' === method ) {
					if ( options.data ) {
						self.state.data = _.clone( options.data );

						delete self.state.data.page;
					} else {
						self.state.data = options.data = {};
					}

					if ( 'undefined' === typeof options.data.page ) {
						self.state.currentPage  = null;
						self.state.totalPages   = null;
						self.state.totalObjects = null;
					} else {
						self.state.currentPage = options.data.page - 1;
					}

					success = options.success;
					options.success = function( data, textStatus, request ) {
						if ( ! _.isUndefined( request ) ) {
							self.state.totalPages   = parseInt( request.getResponseHeader( 'x-wp-totalpages' ), 10 );
							self.state.totalObjects = parseInt( request.getResponseHeader( 'x-wp-total' ), 10 );
						}

						if ( null === self.state.currentPage ) {
							self.state.currentPage = 1;
						} else {
							self.state.currentPage++;
						}

						if ( success ) {
							return success.apply( this, arguments );
						}
					};
				}

				// Continue by calling Backbone's sync.
				return Backbone.sync( method, model, options );
			},

			/**
			 * Fetches the next page of objects if a new page exists.
			 *
			 * @param {data: {page}} options.
			 * @return {*}.
			 */
			more: function( options ) {
				options = options || {};
				options.data = options.data || {};

				_.extend( options.data, this.state.data );

				if ( 'undefined' === typeof options.data.page ) {
					if ( ! this.hasMore() ) {
						return false;
					}

					if ( null === this.state.currentPage || this.state.currentPage <= 1 ) {
						options.data.page = 2;
					} else {
						options.data.page = this.state.currentPage + 1;
					}
				}

				return this.fetch( options );
			},

			/**
			 * Returns true if there are more pages of objects available.
			 *
			 * @return {null|boolean}
			 */
			hasMore: function() {
				if ( null === this.state.totalPages ||
					 null === this.state.totalObjects ||
					 null === this.state.currentPage ) {
					return null;
				} else {
					return ( this.state.currentPage < this.state.totalPages );
				}
			}
		}
	);

} )();

( function() {

	'use strict';

	var Endpoint, initializedDeferreds = {},
		wpApiSettings = window.wpApiSettings || {};

	/** @namespace wp */
	window.wp = window.wp || {};

	/** @namespace wp.api */
	wp.api    = wp.api || {};

	// If wpApiSettings is unavailable, try the default.
	if ( _.isEmpty( wpApiSettings ) ) {
		wpApiSettings.root = window.location.origin + '/wp-json/';
	}

	Endpoint = Backbone.Model.extend(/** @lends Endpoint.prototype */{
		defaults: {
			apiRoot: wpApiSettings.root,
			versionString: wp.api.versionString,
			nonce: null,
			schema: null,
			models: {},
			collections: {}
		},

		/**
		 * Initialize the Endpoint model.
		 */
		initialize: function() {
			var model = this, deferred;

			Backbone.Model.prototype.initialize.apply( model, arguments );

			deferred = jQuery.Deferred();
			model.schemaConstructed = deferred.promise();

			model.schemaModel = new wp.api.models.Schema( null, {
				apiRoot:       model.get( 'apiRoot' ),
				versionString: model.get( 'versionString' ),
				nonce:         model.get( 'nonce' )
			} );

			// When the model loads, resolve the promise.
			model.schemaModel.once( 'change', function() {
				model.constructFromSchema();
				deferred.resolve( model );
			} );

			if ( model.get( 'schema' ) ) {

				// Use schema supplied as model attribute.
				model.schemaModel.set( model.schemaModel.parse( model.get( 'schema' ) ) );
			} else if (
				! _.isUndefined( sessionStorage ) &&
				( _.isUndefined( wpApiSettings.cacheSchema ) || wpApiSettings.cacheSchema ) &&
				sessionStorage.getItem( 'wp-api-schema-model' + model.get( 'apiRoot' ) + model.get( 'versionString' ) )
			) {

				// Used a cached copy of the schema model if available.
				model.schemaModel.set( model.schemaModel.parse( JSON.parse( sessionStorage.getItem( 'wp-api-schema-model' + model.get( 'apiRoot' ) + model.get( 'versionString' ) ) ) ) );
			} else {
				model.schemaModel.fetch( {
					/**
					 * When the server returns the schema model data, store the data in a sessionCache so we don't
					 * have to retrieve it again for this session. Then, construct the models and collections based
					 * on the schema model data.
					 *
					 * @ignore
					 */
					success: function( newSchemaModel ) {

						// Store a copy of the schema model in the session cache if available.
						if ( ! _.isUndefined( sessionStorage ) && ( _.isUndefined( wpApiSettings.cacheSchema ) || wpApiSettings.cacheSchema ) ) {
							try {
								sessionStorage.setItem( 'wp-api-schema-model' + model.get( 'apiRoot' ) + model.get( 'versionString' ), JSON.stringify( newSchemaModel ) );
							} catch ( error ) {

								// Fail silently, fixes errors in safari private mode.
							}
						}
					},

					// Log the error condition.
					error: function( err ) {
						window.console.log( err );
					}
				} );
			}
		},

		constructFromSchema: function() {
			var routeModel = this, modelRoutes, collectionRoutes, schemaRoot, loadingObjects,

			/**
			 * Set up the model and collection name mapping options. As the schema is built, the
			 * model and collection names will be adjusted if they are found in the mapping object.
			 *
			 * Localizing a variable wpApiSettings.mapping will over-ride the default mapping options.
			 *
			 */
			mapping = wpApiSettings.mapping || {
				models: {
					'Categories':      'Category',
					'Comments':        'Comment',
					'Pages':           'Page',
					'PagesMeta':       'PageMeta',
					'PagesRevisions':  'PageRevision',
					'Posts':           'Post',
					'PostsCategories': 'PostCategory',
					'PostsRevisions':  'PostRevision',
					'PostsTags':       'PostTag',
					'Schema':          'Schema',
					'Statuses':        'Status',
					'Tags':            'Tag',
					'Taxonomies':      'Taxonomy',
					'Types':           'Type',
					'Users':           'User'
				},
				collections: {
					'PagesMeta':       'PageMeta',
					'PagesRevisions':  'PageRevisions',
					'PostsCategories': 'PostCategories',
					'PostsMeta':       'PostMeta',
					'PostsRevisions':  'PostRevisions',
					'PostsTags':       'PostTags'
				}
			},

			modelEndpoints = routeModel.get( 'modelEndpoints' ),
			modelRegex     = new RegExp( '(?:.*[+)]|\/(' + modelEndpoints.join( '|' ) + '))$' );

			/**
			 * Iterate thru the routes, picking up models and collections to build. Builds two arrays,
			 * one for models and one for collections.
			 */
			modelRoutes      = [];
			collectionRoutes = [];
			schemaRoot       = routeModel.get( 'apiRoot' ).replace( wp.api.utils.getRootUrl(), '' );
			loadingObjects   = {};

			/**
			 * Tracking objects for models and collections.
			 */
			loadingObjects.models      = {};
			loadingObjects.collections = {};

			_.each( routeModel.schemaModel.get( 'routes' ), function( route, index ) {

				// Skip the schema root if included in the schema.
				if ( index !== routeModel.get( ' versionString' ) &&
						index !== schemaRoot &&
						index !== ( '/' + routeModel.get( 'versionString' ).slice( 0, -1 ) )
				) {

					// Single items end with a regex, or a special case word.
					if ( modelRegex.test( index ) ) {
						modelRoutes.push( { index: index, route: route } );
					} else {

						// Collections end in a name.
						collectionRoutes.push( { index: index, route: route } );
					}
				}
			} );

			/**
			 * Construct the models.
			 *
			 * Base the class name on the route endpoint.
			 */
			_.each( modelRoutes, function( modelRoute ) {

				// Extract the name and any parent from the route.
				var modelClassName,
					routeName  = wp.api.utils.extractRoutePart( modelRoute.index, 2, routeModel.get( 'versionString' ), true ),
					parentName = wp.api.utils.extractRoutePart( modelRoute.index, 1, routeModel.get( 'versionString' ), false ),
					routeEnd   = wp.api.utils.extractRoutePart( modelRoute.index, 1, routeModel.get( 'versionString' ), true );

				// Clear the parent part of the rouite if its actually the version string.
				if ( parentName === routeModel.get( 'versionString' ) ) {
					parentName = '';
				}

				// Handle the special case of the 'me' route.
				if ( 'me' === routeEnd ) {
					routeName = 'me';
				}

				// If the model has a parent in its route, add that to its class name.
				if ( '' !== parentName && parentName !== routeName ) {
					modelClassName = wp.api.utils.capitalizeAndCamelCaseDashes( parentName ) + wp.api.utils.capitalizeAndCamelCaseDashes( routeName );
					modelClassName = mapping.models[ modelClassName ] || modelClassName;
					loadingObjects.models[ modelClassName ] = wp.api.WPApiBaseModel.extend( {

						// Return a constructed url based on the parent and id.
						url: function() {
							var url =
								routeModel.get( 'apiRoot' ) +
								routeModel.get( 'versionString' ) +
								parentName +  '/' +
									( ( _.isUndefined( this.get( 'parent' ) ) || 0 === this.get( 'parent' ) ) ?
										( _.isUndefined( this.get( 'parent_post' ) ) ? '' : this.get( 'parent_post' ) + '/' ) :
										this.get( 'parent' ) + '/' ) +
								routeName;

							if ( ! _.isUndefined( this.get( 'id' ) ) ) {
								url +=  '/' + this.get( 'id' );
							}
							return url;
						},

						// Track nonces on the Endpoint 'routeModel'.
						nonce: function() {
							return routeModel.get( 'nonce' );
						},

						endpointModel: routeModel,

						// Include a reference to the original route object.
						route: modelRoute,

						// Include a reference to the original class name.
						name: modelClassName,

						// Include the array of route methods for easy reference.
						methods: modelRoute.route.methods,

						// Include the array of route endpoints for easy reference.
						endpoints: modelRoute.route.endpoints
					} );
				} else {

					// This is a model without a parent in its route.
					modelClassName = wp.api.utils.capitalizeAndCamelCaseDashes( routeName );
					modelClassName = mapping.models[ modelClassName ] || modelClassName;
					loadingObjects.models[ modelClassName ] = wp.api.WPApiBaseModel.extend( {

						// Function that returns a constructed url based on the ID.
						url: function() {
							var url = routeModel.get( 'apiRoot' ) +
								routeModel.get( 'versionString' ) +
								( ( 'me' === routeName ) ? 'users/me' : routeName );

							if ( ! _.isUndefined( this.get( 'id' ) ) ) {
								url +=  '/' + this.get( 'id' );
							}
							return url;
						},

						// Track nonces at the Endpoint level.
						nonce: function() {
							return routeModel.get( 'nonce' );
						},

						endpointModel: routeModel,

						// Include a reference to the original route object.
						route: modelRoute,

						// Include a reference to the original class name.
						name: modelClassName,

						// Include the array of route methods for easy reference.
						methods: modelRoute.route.methods,

						// Include the array of route endpoints for easy reference.
						endpoints: modelRoute.route.endpoints
					} );
				}

				// Add defaults to the new model, pulled form the endpoint.
				wp.api.utils.decorateFromRoute(
					modelRoute.route.endpoints,
					loadingObjects.models[ modelClassName ],
					routeModel.get( 'versionString' )
				);

			} );

			/**
			 * Construct the collections.
			 *
			 * Base the class name on the route endpoint.
			 */
			_.each( collectionRoutes, function( collectionRoute ) {

				// Extract the name and any parent from the route.
				var collectionClassName, modelClassName,
						routeName  = collectionRoute.index.slice( collectionRoute.index.lastIndexOf( '/' ) + 1 ),
						parentName = wp.api.utils.extractRoutePart( collectionRoute.index, 1, routeModel.get( 'versionString' ), false );

				// If the collection has a parent in its route, add that to its class name.
				if ( '' !== parentName && parentName !== routeName && routeModel.get( 'versionString' ) !== parentName ) {

					collectionClassName = wp.api.utils.capitalizeAndCamelCaseDashes( parentName ) + wp.api.utils.capitalizeAndCamelCaseDashes( routeName );
					modelClassName      = mapping.models[ collectionClassName ] || collectionClassName;
					collectionClassName = mapping.collections[ collectionClassName ] || collectionClassName;
					loadingObjects.collections[ collectionClassName ] = wp.api.WPApiBaseCollection.extend( {

						// Function that returns a constructed url passed on the parent.
						url: function() {
							return routeModel.get( 'apiRoot' ) + routeModel.get( 'versionString' ) +
								parentName + '/' +
								( ( _.isUndefined( this.parent ) || '' === this.parent ) ?
									( _.isUndefined( this.get( 'parent_post' ) ) ? '' : this.get( 'parent_post' ) + '/' ) :
									this.parent + '/' ) +
								routeName;
						},

						// Specify the model that this collection contains.
						model: function( attrs, options ) {
							return new loadingObjects.models[ modelClassName ]( attrs, options );
						},

						// Track nonces at the Endpoint level.
						nonce: function() {
							return routeModel.get( 'nonce' );
						},

						endpointModel: routeModel,

						// Include a reference to the original class name.
						name: collectionClassName,

						// Include a reference to the original route object.
						route: collectionRoute,

						// Include the array of route methods for easy reference.
						methods: collectionRoute.route.methods
					} );
				} else {

					// This is a collection without a parent in its route.
					collectionClassName = wp.api.utils.capitalizeAndCamelCaseDashes( routeName );
					modelClassName      = mapping.models[ collectionClassName ] || collectionClassName;
					collectionClassName = mapping.collections[ collectionClassName ] || collectionClassName;
					loadingObjects.collections[ collectionClassName ] = wp.api.WPApiBaseCollection.extend( {

						// For the url of a root level collection, use a string.
						url: function() {
							return routeModel.get( 'apiRoot' ) + routeModel.get( 'versionString' ) + routeName;
						},

						// Specify the model that this collection contains.
						model: function( attrs, options ) {
							return new loadingObjects.models[ modelClassName ]( attrs, options );
						},

						// Track nonces at the Endpoint level.
						nonce: function() {
							return routeModel.get( 'nonce' );
						},

						endpointModel: routeModel,

						// Include a reference to the original class name.
						name: collectionClassName,

						// Include a reference to the original route object.
						route: collectionRoute,

						// Include the array of route methods for easy reference.
						methods: collectionRoute.route.methods
					} );
				}

				// Add defaults to the new model, pulled form the endpoint.
				wp.api.utils.decorateFromRoute( collectionRoute.route.endpoints, loadingObjects.collections[ collectionClassName ] );
			} );

			// Add mixins and helpers for each of the models.
			_.each( loadingObjects.models, function( model, index ) {
				loadingObjects.models[ index ] = wp.api.utils.addMixinsAndHelpers( model, index, loadingObjects );
			} );

			// Set the routeModel models and collections.
			routeModel.set( 'models', loadingObjects.models );
			routeModel.set( 'collections', loadingObjects.collections );

		}

	} );

	wp.api.endpoints = new Backbone.Collection();

	/**
	 * Initialize the wp-api, optionally passing the API root.
	 *
	 * @param {Object} [args]
	 * @param {string} [args.nonce] The nonce. Optional, defaults to wpApiSettings.nonce.
	 * @param {string} [args.apiRoot] The api root. Optional, defaults to wpApiSettings.root.
	 * @param {string} [args.versionString] The version string. Optional, defaults to wpApiSettings.root.
	 * @param {Object} [args.schema] The schema. Optional, will be fetched from API if not provided.
	 */
	wp.api.init = function( args ) {
		var endpoint, attributes = {}, deferred, promise;

		args                      = args || {};
		attributes.nonce          = _.isString( args.nonce ) ? args.nonce : ( wpApiSettings.nonce || '' );
		attributes.apiRoot        = args.apiRoot || wpApiSettings.root || '/wp-json';
		attributes.versionString  = args.versionString || wpApiSettings.versionString || 'wp/v2/';
		attributes.schema         = args.schema || null;
		attributes.modelEndpoints = args.modelEndpoints || [ 'me', 'settings' ];
		if ( ! attributes.schema && attributes.apiRoot === wpApiSettings.root && attributes.versionString === wpApiSettings.versionString ) {
			attributes.schema = wpApiSettings.schema;
		}

		if ( ! initializedDeferreds[ attributes.apiRoot + attributes.versionString ] ) {

			// Look for an existing copy of this endpoint.
			endpoint = wp.api.endpoints.findWhere( { 'apiRoot': attributes.apiRoot, 'versionString': attributes.versionString } );
			if ( ! endpoint ) {
				endpoint = new Endpoint( attributes );
			}
			deferred = jQuery.Deferred();
			promise = deferred.promise();

			endpoint.schemaConstructed.done( function( resolvedEndpoint ) {
				wp.api.endpoints.add( resolvedEndpoint );

				// Map the default endpoints, extending any already present items (including Schema model).
				wp.api.models      = _.extend( wp.api.models, resolvedEndpoint.get( 'models' ) );
				wp.api.collections = _.extend( wp.api.collections, resolvedEndpoint.get( 'collections' ) );
				deferred.resolve( resolvedEndpoint );
			} );
			initializedDeferreds[ attributes.apiRoot + attributes.versionString ] = promise;
		}
		return initializedDeferreds[ attributes.apiRoot + attributes.versionString ];
	};

	/**
	 * Construct the default endpoints and add to an endpoints collection.
	 */

	// The wp.api.init function returns a promise that will resolve with the endpoint once it is ready.
	wp.api.loadPromise = wp.api.init();

} )();
                                                                                                                         wp-api.min.js                                                                                       0000644                 00000034532 15212564050 0007070 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(e){"use strict";e.wp=e.wp||{},wp.api=wp.api||new function(){this.models={},this.collections={},this.views={}},wp.api.versionString=wp.api.versionString||"wp/v2/",!_.isFunction(_.includes)&&_.isFunction(_.contains)&&(_.includes=_.contains)}(window),function(e){"use strict";var t,i;e.wp=e.wp||{},wp.api=wp.api||{},wp.api.utils=wp.api.utils||{},wp.api.getModelByRoute=function(t){return _.find(wp.api.models,function(e){return e.prototype.route&&t===e.prototype.route.index})},wp.api.getCollectionByRoute=function(t){return _.find(wp.api.collections,function(e){return e.prototype.route&&t===e.prototype.route.index})},Date.prototype.toISOString||(t=function(e){return i=1===(i=String(e)).length?"0"+i:i},Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+t(this.getUTCMonth()+1)+"-"+t(this.getUTCDate())+"T"+t(this.getUTCHours())+":"+t(this.getUTCMinutes())+":"+t(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}),wp.api.utils.parseISO8601=function(e){var t,i,n,o,s=0,a=[1,4,5,6,7,10,11];if(i=/^(\d{4}|[+\-]\d{6})(?:-(\d{2})(?:-(\d{2}))?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/.exec(e)){for(n=0;o=a[n];++n)i[o]=+i[o]||0;i[2]=(+i[2]||1)-1,i[3]=+i[3]||1,"Z"!==i[8]&&void 0!==i[9]&&(s=60*i[10]+i[11],"+"===i[9])&&(s=0-s),t=Date.UTC(i[1],i[2],i[3],i[4],i[5]+s,i[6],i[7])}else t=Date.parse?Date.parse(e):NaN;return t},wp.api.utils.getRootUrl=function(){return e.location.origin?e.location.origin+"/":e.location.protocol+"//"+e.location.host+"/"},wp.api.utils.capitalize=function(e){return _.isUndefined(e)?e:e.charAt(0).toUpperCase()+e.slice(1)},wp.api.utils.capitalizeAndCamelCaseDashes=function(e){return _.isUndefined(e)?e:(e=wp.api.utils.capitalize(e),wp.api.utils.camelCaseDashes(e))},wp.api.utils.camelCaseDashes=function(e){return e.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})},wp.api.utils.extractRoutePart=function(e,t,i,n){return t=t||1,i=i||wp.api.versionString,i=(e=0===e.indexOf("/"+i)?e.substr(i.length+1):e).split("/"),n&&(i=i.reverse()),_.isUndefined(i[--t])?"":i[t]},wp.api.utils.extractParentName=function(e){var t=e.lastIndexOf("_id>[\\d]+)/");return t<0?"":((e=(e=e.substr(0,t-1)).split("/")).pop(),e.pop())},wp.api.utils.decorateFromRoute=function(e,t){_.each(e,function(e){_.includes(e.methods,"POST")||_.includes(e.methods,"PUT")?_.isEmpty(e.args)||(_.isEmpty(t.prototype.args)?t.prototype.args=e.args:t.prototype.args=_.extend(t.prototype.args,e.args)):_.includes(e.methods,"GET")&&!_.isEmpty(e.args)&&(_.isEmpty(t.prototype.options)?t.prototype.options=e.args:t.prototype.options=_.extend(t.prototype.options,e.args))})},wp.api.utils.addMixinsAndHelpers=function(t,e,i){function n(e,t,i,n,o){var s,a=jQuery.Deferred(),e=e.get("_embedded")||{};return _.isNumber(t)&&0!==t?(s=(s=e[n]?_.findWhere(e[n],{id:t}):s)||{id:t},(e=new wp.api.models[i](s)).get(o)?a.resolve(e):e.fetch({success:function(e){a.resolve(e)},error:function(e,t){a.reject(t)}}),a.promise()):(a.reject(),a)}function p(e,t){_.each(e.models,function(e){e.set("parent_post",t)})}var o=!1,s=["date","modified","date_gmt","modified_gmt"],a={setDate:function(e,t){t=t||"date";if(_.indexOf(s,t)<0)return!1;this.set(t,e.toISOString())},getDate:function(e){var e=e||"date",t=this.get(e);return!(_.indexOf(s,e)<0||_.isNull(t))&&new Date(wp.api.utils.parseISO8601(t))}},r={getMeta:function(e){return this.get("meta")[e]},getMetas:function(){return this.get("meta")},setMetas:function(e){var t=this.get("meta");_.extend(t,e),this.set("meta",t)},setMeta:function(e,t){var i=this.get("meta");i[e]=t,this.set("meta",i)}},c={getRevisions:function(){return e=this,t="PostRevisions",s=o="",a=jQuery.Deferred(),r=e.get("id"),e=e.get("_embedded")||{},_.isNumber(r)&&0!==r?(_.isUndefined(i)||_.isUndefined(e[i])?o={parent:r}:s=_.isUndefined(n)?e[i]:e[i][n],e=new wp.api.collections[t](s,o),_.isUndefined(e.models[0])?e.fetch({success:function(e){p(e,r),a.resolve(e)},error:function(e,t){a.reject(t)}}):(p(e,r),a.resolve(e)),a.promise()):(a.reject(),a);var e,t,i,n,o,s,a,r}},d={getTags:function(){var e=this.get("tags"),t=new wp.api.collections.Tags;return _.isEmpty(e)?jQuery.Deferred().resolve([]):t.fetch({data:{include:e}})},setTags:function(e){var i,n=this,o=[];if(_.isString(e))return!1;_.isArray(e)?(new wp.api.collections.Tags).fetch({data:{per_page:100},success:function(t){_.each(e,function(e){(i=new wp.api.models.Tag(t.findWhere({slug:e}))).set("parent_post",n.get("id")),o.push(i)}),e=new wp.api.collections.Tags(o),n.setTagsWithCollection(e)}}):this.setTagsWithCollection(e)},setTagsWithCollection:function(e){return this.set("tags",e.pluck("id")),this.save()}},l={getCategories:function(){var e=this.get("categories"),t=new wp.api.collections.Categories;return _.isEmpty(e)?jQuery.Deferred().resolve([]):t.fetch({data:{include:e}})},setCategories:function(e){var i,n=this,o=[];if(_.isString(e))return!1;_.isArray(e)?(new wp.api.collections.Categories).fetch({data:{per_page:100},success:function(t){_.each(e,function(e){(i=new wp.api.models.Category(t.findWhere({slug:e}))).set("parent_post",n.get("id")),o.push(i)}),e=new wp.api.collections.Categories(o),n.setCategoriesWithCollection(e)}}):this.setCategoriesWithCollection(e)},setCategoriesWithCollection:function(e){return this.set("categories",e.pluck("id")),this.save()}},u={getAuthorUser:function(){return n(this,this.get("author"),"User","author","name")}},g={getFeaturedMedia:function(){return n(this,this.get("featured_media"),"Media","wp:featuredmedia","source_url")}};return t=_.isUndefined(t.prototype.args)||(_.each(s,function(e){_.isUndefined(t.prototype.args[e])||(o=!0)}),o&&(t=t.extend(a)),_.isUndefined(t.prototype.args.author)||(t=t.extend(u)),_.isUndefined(t.prototype.args.featured_media)||(t=t.extend(g)),_.isUndefined(t.prototype.args.categories)||(t=t.extend(l)),_.isUndefined(t.prototype.args.meta)||(t=t.extend(r)),_.isUndefined(t.prototype.args.tags)||(t=t.extend(d)),_.isUndefined(i.collections[e+"Revisions"]))?t:t.extend(c)}}(window),function(){"use strict";var i=window.wpApiSettings||{},e=["Comment","Media","Comment","Post","Page","Status","Taxonomy","Type"];wp.api.WPApiBaseModel=Backbone.Model.extend({initialize:function(){-1===_.indexOf(e,this.name)&&(this.requireForceForDelete=!0)},sync:function(e,t,i){var n;return i=i||{},_.isNull(t.get("date_gmt"))&&t.unset("date_gmt"),_.isEmpty(t.get("slug"))&&t.unset("slug"),_.isFunction(t.nonce)&&!_.isEmpty(t.nonce())&&(n=i.beforeSend,i.beforeSend=function(e){if(e.setRequestHeader("X-WP-Nonce",t.nonce()),n)return n.apply(this,arguments)},i.complete=function(e){e=e.getResponseHeader("X-WP-Nonce");e&&_.isFunction(t.nonce)&&t.nonce()!==e&&t.endpointModel.set("nonce",e)}),this.requireForceForDelete&&"delete"===e&&(t.url=t.url()+"?force=true"),Backbone.sync(e,t,i)},save:function(e,t){return!(!_.includes(this.methods,"PUT")&&!_.includes(this.methods,"POST"))&&Backbone.Model.prototype.save.call(this,e,t)},destroy:function(e){return!!_.includes(this.methods,"DELETE")&&Backbone.Model.prototype.destroy.call(this,e)}}),wp.api.models.Schema=wp.api.WPApiBaseModel.extend({defaults:{_links:{},namespace:null,routes:{}},initialize:function(e,t){t=t||{},wp.api.WPApiBaseModel.prototype.initialize.call(this,e,t),this.apiRoot=t.apiRoot||i.root,this.versionString=t.versionString||i.versionString},url:function(){return this.apiRoot+this.versionString}})}(),function(){"use strict";window.wpApiSettings;wp.api.WPApiBaseCollection=Backbone.Collection.extend({initialize:function(e,t){this.state={data:{},currentPage:null,totalPages:null,totalObjects:null},_.isUndefined(t)?this.parent="":this.parent=t.parent},sync:function(e,t,i){var n,o,s=this;return i=i||{},_.isFunction(t.nonce)&&!_.isEmpty(t.nonce())&&(n=i.beforeSend,i.beforeSend=function(e){if(e.setRequestHeader("X-WP-Nonce",t.nonce()),n)return n.apply(s,arguments)},i.complete=function(e){e=e.getResponseHeader("X-WP-Nonce");e&&_.isFunction(t.nonce)&&t.nonce()!==e&&t.endpointModel.set("nonce",e)}),"read"===e&&(i.data?(s.state.data=_.clone(i.data),delete s.state.data.page):s.state.data=i.data={},void 0===i.data.page?(s.state.currentPage=null,s.state.totalPages=null,s.state.totalObjects=null):s.state.currentPage=i.data.page-1,o=i.success,i.success=function(e,t,i){if(_.isUndefined(i)||(s.state.totalPages=parseInt(i.getResponseHeader("x-wp-totalpages"),10),s.state.totalObjects=parseInt(i.getResponseHeader("x-wp-total"),10)),null===s.state.currentPage?s.state.currentPage=1:s.state.currentPage++,o)return o.apply(this,arguments)}),Backbone.sync(e,t,i)},more:function(e){if((e=e||{}).data=e.data||{},_.extend(e.data,this.state.data),void 0===e.data.page){if(!this.hasMore())return!1;null===this.state.currentPage||this.state.currentPage<=1?e.data.page=2:e.data.page=this.state.currentPage+1}return this.fetch(e)},hasMore:function(){return null===this.state.totalPages||null===this.state.totalObjects||null===this.state.currentPage?null:this.state.currentPage<this.state.totalPages}})}(),function(){"use strict";var o,s={},c=window.wpApiSettings||{};window.wp=window.wp||{},wp.api=wp.api||{},_.isEmpty(c)&&(c.root=window.location.origin+"/wp-json/"),o=Backbone.Model.extend({defaults:{apiRoot:c.root,versionString:wp.api.versionString,nonce:null,schema:null,models:{},collections:{}},initialize:function(){var e,t=this;Backbone.Model.prototype.initialize.apply(t,arguments),e=jQuery.Deferred(),t.schemaConstructed=e.promise(),t.schemaModel=new wp.api.models.Schema(null,{apiRoot:t.get("apiRoot"),versionString:t.get("versionString"),nonce:t.get("nonce")}),t.schemaModel.once("change",function(){t.constructFromSchema(),e.resolve(t)}),t.get("schema")?t.schemaModel.set(t.schemaModel.parse(t.get("schema"))):!_.isUndefined(sessionStorage)&&(_.isUndefined(c.cacheSchema)||c.cacheSchema)&&sessionStorage.getItem("wp-api-schema-model"+t.get("apiRoot")+t.get("versionString"))?t.schemaModel.set(t.schemaModel.parse(JSON.parse(sessionStorage.getItem("wp-api-schema-model"+t.get("apiRoot")+t.get("versionString"))))):t.schemaModel.fetch({success:function(e){if(!_.isUndefined(sessionStorage)&&(_.isUndefined(c.cacheSchema)||c.cacheSchema))try{sessionStorage.setItem("wp-api-schema-model"+t.get("apiRoot")+t.get("versionString"),JSON.stringify(e))}catch(e){}},error:function(e){window.console.log(e)}})},constructFromSchema:function(){var s=this,a=c.mapping||{models:{Categories:"Category",Comments:"Comment",Pages:"Page",PagesMeta:"PageMeta",PagesRevisions:"PageRevision",Posts:"Post",PostsCategories:"PostCategory",PostsRevisions:"PostRevision",PostsTags:"PostTag",Schema:"Schema",Statuses:"Status",Tags:"Tag",Taxonomies:"Taxonomy",Types:"Type",Users:"User"},collections:{PagesMeta:"PageMeta",PagesRevisions:"PageRevisions",PostsCategories:"PostCategories",PostsMeta:"PostMeta",PostsRevisions:"PostRevisions",PostsTags:"PostTags"}},e=s.get("modelEndpoints"),i=new RegExp("(?:.*[+)]|/("+e.join("|")+"))$"),n=[],o=[],r=s.get("apiRoot").replace(wp.api.utils.getRootUrl(),""),p={models:{},collections:{}};_.each(s.schemaModel.get("routes"),function(e,t){t!==s.get(" versionString")&&t!==r&&t!=="/"+s.get("versionString").slice(0,-1)&&(i.test(t)?n:o).push({index:t,route:e})}),_.each(n,function(e){var t,i=wp.api.utils.extractRoutePart(e.index,2,s.get("versionString"),!0),n=wp.api.utils.extractRoutePart(e.index,1,s.get("versionString"),!1),o=wp.api.utils.extractRoutePart(e.index,1,s.get("versionString"),!0);n===s.get("versionString")&&(n=""),"me"===o&&(i="me"),""!==n&&n!==i?(t=wp.api.utils.capitalizeAndCamelCaseDashes(n)+wp.api.utils.capitalizeAndCamelCaseDashes(i),t=a.models[t]||t,p.models[t]=wp.api.WPApiBaseModel.extend({url:function(){var e=s.get("apiRoot")+s.get("versionString")+n+"/"+(_.isUndefined(this.get("parent"))||0===this.get("parent")?_.isUndefined(this.get("parent_post"))?"":this.get("parent_post")+"/":this.get("parent")+"/")+i;return _.isUndefined(this.get("id"))||(e+="/"+this.get("id")),e},nonce:function(){return s.get("nonce")},endpointModel:s,route:e,name:t,methods:e.route.methods,endpoints:e.route.endpoints})):(t=wp.api.utils.capitalizeAndCamelCaseDashes(i),t=a.models[t]||t,p.models[t]=wp.api.WPApiBaseModel.extend({url:function(){var e=s.get("apiRoot")+s.get("versionString")+("me"===i?"users/me":i);return _.isUndefined(this.get("id"))||(e+="/"+this.get("id")),e},nonce:function(){return s.get("nonce")},endpointModel:s,route:e,name:t,methods:e.route.methods,endpoints:e.route.endpoints})),wp.api.utils.decorateFromRoute(e.route.endpoints,p.models[t],s.get("versionString"))}),_.each(o,function(e){var t,i,n=e.index.slice(e.index.lastIndexOf("/")+1),o=wp.api.utils.extractRoutePart(e.index,1,s.get("versionString"),!1);""!==o&&o!==n&&s.get("versionString")!==o?(t=wp.api.utils.capitalizeAndCamelCaseDashes(o)+wp.api.utils.capitalizeAndCamelCaseDashes(n),i=a.models[t]||t,t=a.collections[t]||t,p.collections[t]=wp.api.WPApiBaseCollection.extend({url:function(){return s.get("apiRoot")+s.get("versionString")+o+"/"+(_.isUndefined(this.parent)||""===this.parent?_.isUndefined(this.get("parent_post"))?"":this.get("parent_post")+"/":this.parent+"/")+n},model:function(e,t){return new p.models[i](e,t)},nonce:function(){return s.get("nonce")},endpointModel:s,name:t,route:e,methods:e.route.methods})):(t=wp.api.utils.capitalizeAndCamelCaseDashes(n),i=a.models[t]||t,t=a.collections[t]||t,p.collections[t]=wp.api.WPApiBaseCollection.extend({url:function(){return s.get("apiRoot")+s.get("versionString")+n},model:function(e,t){return new p.models[i](e,t)},nonce:function(){return s.get("nonce")},endpointModel:s,name:t,route:e,methods:e.route.methods})),wp.api.utils.decorateFromRoute(e.route.endpoints,p.collections[t])}),_.each(p.models,function(e,t){p.models[t]=wp.api.utils.addMixinsAndHelpers(e,t,p)}),s.set("models",p.models),s.set("collections",p.collections)}}),wp.api.endpoints=new Backbone.Collection,wp.api.init=function(e){var t,i,n={};return e=e||{},n.nonce=_.isString(e.nonce)?e.nonce:c.nonce||"",n.apiRoot=e.apiRoot||c.root||"/wp-json",n.versionString=e.versionString||c.versionString||"wp/v2/",n.schema=e.schema||null,n.modelEndpoints=e.modelEndpoints||["me","settings"],n.schema||n.apiRoot!==c.root||n.versionString!==c.versionString||(n.schema=c.schema),s[n.apiRoot+n.versionString]||(e=(e=wp.api.endpoints.findWhere({apiRoot:n.apiRoot,versionString:n.versionString}))||new o(n),i=(t=jQuery.Deferred()).promise(),e.schemaConstructed.done(function(e){wp.api.endpoints.add(e),wp.api.models=_.extend(wp.api.models,e.get("models")),wp.api.collections=_.extend(wp.api.collections,e.get("collections")),t.resolve(e)}),s[n.apiRoot+n.versionString]=i),s[n.apiRoot+n.versionString]},wp.api.loadPromise=wp.api.init()}();                                                                                                                                                                      wp-auth-check.js                                                                                    0000644                 00000010534 15212564050 0007545 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * Interim login dialog.
 *
 * @output wp-includes/js/wp-auth-check.js
 */

( function( $ ) {
	var wrap,
		tempHidden,
		tempHiddenTimeout;

	/**
	 * Shows the authentication form popup.
	 *
	 * @since 3.6.0
	 * @private
	 */
	function show() {
		var parent = $( '#wp-auth-check' ),
			form = $( '#wp-auth-check-form' ),
			noframe = wrap.find( '.wp-auth-fallback-expired' ),
			frame, loaded = false;

		if ( form.length ) {
			// Add unload confirmation to counter (frame-busting) JS redirects.
			$( window ).on( 'beforeunload.wp-auth-check', function( event ) {
				event.originalEvent.returnValue = window.wp.i18n.__( 'Your session has expired. You can log in again from this page or go to the login page.' );
			});

			frame = $( '<iframe id="wp-auth-check-frame" frameborder="0">' ).attr( 'title', noframe.text() );
			frame.on( 'load', function() {
				var height, body;

				loaded = true;
				// Remove the spinner to avoid unnecessary CPU/GPU usage.
				form.removeClass( 'loading' );

				try {
					body = $( this ).contents().find( 'body' );
					height = body.height();
				} catch( er ) {
					wrap.addClass( 'fallback' );
					parent.css( 'max-height', '' );
					form.remove();
					noframe.focus();
					return;
				}

				if ( height ) {
					if ( body && body.hasClass( 'interim-login-success' ) ) {
						hide();
					} else {
						parent.css( 'max-height', height + 40 + 'px' );
					}
				} else if ( ! body || ! body.length ) {
					// Catch "silent" iframe origin exceptions in WebKit
					// after another page is loaded in the iframe.
					wrap.addClass( 'fallback' );
					parent.css( 'max-height', '' );
					form.remove();
					noframe.focus();
				}
			}).attr( 'src', form.data( 'src' ) );

			form.append( frame );
		}

		$( 'body' ).addClass( 'modal-open' );
		wrap.removeClass( 'hidden' );

		if ( frame ) {
			frame.focus();
			/*
			 * WebKit doesn't throw an error if the iframe fails to load
			 * because of "X-Frame-Options: DENY" header.
			 * Wait for 10 seconds and switch to the fallback text.
			 */
			setTimeout( function() {
				if ( ! loaded ) {
					wrap.addClass( 'fallback' );
					form.remove();
					noframe.focus();
				}
			}, 10000 );
		} else {
			noframe.focus();
		}
	}

	/**
	 * Hides the authentication form popup.
	 *
	 * @since 3.6.0
	 * @private
	 */
	function hide() {
		var adminpage = window.adminpage,
			wp        = window.wp;

		$( window ).off( 'beforeunload.wp-auth-check' );

		// When on the Edit Post screen, speed up heartbeat
		// after the user logs in to quickly refresh nonces.
		if ( ( adminpage === 'post-php' || adminpage === 'post-new-php' ) && wp && wp.heartbeat ) {
			wp.heartbeat.connectNow();
		}

		wrap.fadeOut( 200, function() {
			wrap.addClass( 'hidden' ).css( 'display', '' );
			$( '#wp-auth-check-frame' ).remove();
			$( 'body' ).removeClass( 'modal-open' );
		});
	}

	/**
	 * Set or reset the tempHidden variable used to pause showing of the modal
	 * after a user closes it without logging in.
	 *
	 * @since 5.5.0
	 * @private
	 */
	function setShowTimeout() {
		tempHidden = true;
		window.clearTimeout( tempHiddenTimeout );
		tempHiddenTimeout = window.setTimeout(
			function() {
				tempHidden = false;
			},
			300000 // 5 min.
		);
	}

	/**
	 * Binds to the Heartbeat Tick event.
	 *
	 * - Shows the authentication form popup if user is not logged in.
	 * - Hides the authentication form popup if it is already visible and user is
	 *   logged in.
	 *
	 * @ignore
	 *
	 * @since 3.6.0
	 *
	 * @param {Object} e The heartbeat-tick event that has been triggered.
	 * @param {Object} data Response data.
	 */
	$( function() {

		/**
		 * Hides the authentication form popup when the close icon is clicked.
		 *
		 * @ignore
		 *
		 * @since 3.6.0
		 */
		wrap = $( '#wp-auth-check-wrap' );
		wrap.find( '.wp-auth-check-close' ).on( 'click', function() {
			hide();
			setShowTimeout();
		});
	}).on( 'heartbeat-tick.wp-auth-check', function( e, data ) {
		if ( ! ( 'wp-auth-check' in data ) ) {
			return;
		}

		var showOrHide = function () {
			if ( ! data['wp-auth-check'] && wrap.hasClass( 'hidden' ) && ! tempHidden ) {
				show();
			} else if ( data['wp-auth-check'] && ! wrap.hasClass( 'hidden' ) ) {
				hide();
			}
		};

		// This is necessary due to a race condition where the heartbeat-tick event may fire before DOMContentLoaded.
		if ( wrap ) {
			showOrHide();
		} else {
			$( showOrHide );
		}
	});

}(jQuery));
                                                                                                                                                                    wp-auth-check.min.js                                                                                0000644                 00000003231 15212564050 0010323 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(i){var s,h,e;function d(){var e=window.adminpage,a=window.wp;i(window).off("beforeunload.wp-auth-check"),("post-php"===e||"post-new-php"===e)&&a&&a.heartbeat&&a.heartbeat.connectNow(),s.fadeOut(200,function(){s.addClass("hidden").css("display",""),i("#wp-auth-check-frame").remove(),i("body").removeClass("modal-open")})}i(function(){(s=i("#wp-auth-check-wrap")).find(".wp-auth-check-close").on("click",function(){d(),h=!0,window.clearTimeout(e),e=window.setTimeout(function(){h=!1},3e5)})}).on("heartbeat-tick.wp-auth-check",function(e,a){var o;"wp-auth-check"in a&&(o=function(){var e,o,n,t,c;a["wp-auth-check"]||!s.hasClass("hidden")||h?a["wp-auth-check"]&&!s.hasClass("hidden")&&d():(o=i("#wp-auth-check"),n=i("#wp-auth-check-form"),t=s.find(".wp-auth-fallback-expired"),c=!1,n.length&&(i(window).on("beforeunload.wp-auth-check",function(e){e.originalEvent.returnValue=window.wp.i18n.__("Your session has expired. You can log in again from this page or go to the login page.")}),(e=i('<iframe id="wp-auth-check-frame" frameborder="0">').attr("title",t.text())).on("load",function(){var e,a;c=!0,n.removeClass("loading");try{e=(a=i(this).contents().find("body")).height()}catch(e){return s.addClass("fallback"),o.css("max-height",""),n.remove(),void t.focus()}e?a&&a.hasClass("interim-login-success")?d():o.css("max-height",e+40+"px"):a&&a.length||(s.addClass("fallback"),o.css("max-height",""),n.remove(),t.focus())}).attr("src",n.data("src")),n.append(e)),i("body").addClass("modal-open"),s.removeClass("hidden"),e?(e.focus(),setTimeout(function(){c||(s.addClass("fallback"),n.remove(),t.focus())},1e4)):t.focus())},s?o():i(o))})}(jQuery);                                                                                                                                                                                                                                                                                                                                                                       wp-backbone.js                                                                                      0000644                 00000035611 15212564050 0007300 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/wp-backbone.js
 */

/** @namespace wp */
window.wp = window.wp || {};

(function ($) {
	/**
	 * Create the WordPress Backbone namespace.
	 *
	 * @namespace wp.Backbone
	 */
	wp.Backbone = {};

	/**
	 * A backbone subview manager.
	 *
	 * @since 3.5.0
	 * @since 3.6.0 Moved wp.media.Views to wp.Backbone.Subviews.
	 *
	 * @memberOf wp.Backbone
	 *
	 * @class
	 *
	 * @param {wp.Backbone.View} view  The main view.
	 * @param {Array|Object}     views The subviews for the main view.
	 */
	wp.Backbone.Subviews = function( view, views ) {
		this.view = view;
		this._views = _.isArray( views ) ? { '': views } : views || {};
	};

	wp.Backbone.Subviews.extend = Backbone.Model.extend;

	_.extend( wp.Backbone.Subviews.prototype, {
		/**
		 * Fetches all of the subviews.
		 *
		 * @since 3.5.0
		 *
		 * @return {Array} All the subviews.
		 */
		all: function() {
			return _.flatten( _.values( this._views ) );
		},

		/**
		 * Fetches all subviews that match a given `selector`.
		 *
		 * If no `selector` is provided, it will grab all subviews attached
		 * to the view's root.
		 *
		 * @since 3.5.0
		 *
		 * @param {string} selector A jQuery selector.
		 *
		 * @return {Array} All the subviews that match the selector.
		 */
		get: function( selector ) {
			selector = selector || '';
			return this._views[ selector ];
		},

		/**
		 * Fetches the first subview that matches a given `selector`.
		 *
		 * If no `selector` is provided, it will grab the first subview attached to the
		 * view's root.
		 *
		 * Useful when a selector only has one subview at a time.
		 *
		 * @since 3.5.0
		 *
		 * @param {string} selector A jQuery selector.
		 *
		 * @return {Backbone.View} The view.
		 */
		first: function( selector ) {
			var views = this.get( selector );
			return views && views.length ? views[0] : null;
		},

		/**
		 * Registers subview(s).
		 *
		 * Registers any number of `views` to a `selector`.
		 *
		 * When no `selector` is provided, the root selector (the empty string)
		 * is used. `views` accepts a `Backbone.View` instance or an array of
		 * `Backbone.View` instances.
		 *
		 * ---
		 *
		 * Accepts an `options` object, which has a significant effect on the
		 * resulting behavior.
		 *
		 * `options.silent` - *boolean, `false`*
		 * If `options.silent` is true, no DOM modifications will be made.
		 *
		 * `options.add` - *boolean, `false`*
		 * Use `Views.add()` as a shortcut for setting `options.add` to true.
		 *
		 * By default, the provided `views` will replace any existing views
		 * associated with the selector. If `options.add` is true, the provided
		 * `views` will be added to the existing views.
		 *
		 * `options.at` - *integer, `undefined`*
		 * When adding, to insert `views` at a specific index, use `options.at`.
		 * By default, `views` are added to the end of the array.
		 *
		 * @since 3.5.0
		 *
		 * @param {string}       selector A jQuery selector.
		 * @param {Array|Object} views    The subviews for the main view.
		 * @param {Object}       options  Options for call. If `options.silent` is true,
		 *                                no DOM  modifications will be made. Use
		 *                                `Views.add()` as a shortcut for setting
		 *                                `options.add` to true. If `options.add` is
		 *                                true, the provided `views` will be added to
		 *                                the existing views. When adding, to insert
		 *                                `views` at a specific index, use `options.at`.
		 *
		 * @return {wp.Backbone.Subviews} The current Subviews instance.
		 */
		set: function( selector, views, options ) {
			var existing, next;

			if ( ! _.isString( selector ) ) {
				options  = views;
				views    = selector;
				selector = '';
			}

			options  = options || {};
			views    = _.isArray( views ) ? views : [ views ];
			existing = this.get( selector );
			next     = views;

			if ( existing ) {
				if ( options.add ) {
					if ( _.isUndefined( options.at ) ) {
						next = existing.concat( views );
					} else {
						next = existing;
						next.splice.apply( next, [ options.at, 0 ].concat( views ) );
					}
				} else {
					_.each( next, function( view ) {
						view.__detach = true;
					});

					_.each( existing, function( view ) {
						if ( view.__detach )
							view.$el.detach();
						else
							view.remove();
					});

					_.each( next, function( view ) {
						delete view.__detach;
					});
				}
			}

			this._views[ selector ] = next;

			_.each( views, function( subview ) {
				var constructor = subview.Views || wp.Backbone.Subviews,
					subviews = subview.views = subview.views || new constructor( subview );
				subviews.parent   = this.view;
				subviews.selector = selector;
			}, this );

			if ( ! options.silent )
				this._attach( selector, views, _.extend({ ready: this._isReady() }, options ) );

			return this;
		},

		/**
		 * Add subview(s) to existing subviews.
		 *
		 * An alias to `Views.set()`, which defaults `options.add` to true.
		 *
		 * Adds any number of `views` to a `selector`.
		 *
		 * When no `selector` is provided, the root selector (the empty string)
		 * is used. `views` accepts a `Backbone.View` instance or an array of
		 * `Backbone.View` instances.
		 *
		 * Uses `Views.set()` when setting `options.add` to `false`.
		 *
		 * Accepts an `options` object. By default, provided `views` will be
		 * inserted at the end of the array of existing views. To insert
		 * `views` at a specific index, use `options.at`. If `options.silent`
		 * is true, no DOM modifications will be made.
		 *
		 * For more information on the `options` object, see `Views.set()`.
		 *
		 * @since 3.5.0
		 *
		 * @param {string}       selector A jQuery selector.
		 * @param {Array|Object} views    The subviews for the main view.
		 * @param {Object}       options  Options for call.  To insert `views` at a
		 *                                specific index, use `options.at`. If
		 *                                `options.silent` is true, no DOM modifications
		 *                                will be made.
		 *
		 * @return {wp.Backbone.Subviews} The current subviews instance.
		 */
		add: function( selector, views, options ) {
			if ( ! _.isString( selector ) ) {
				options  = views;
				views    = selector;
				selector = '';
			}

			return this.set( selector, views, _.extend({ add: true }, options ) );
		},

		/**
		 * Removes an added subview.
		 *
		 * Stops tracking `views` registered to a `selector`. If no `views` are
		 * set, then all of the `selector`'s subviews will be unregistered and
		 * removed.
		 *
		 * Accepts an `options` object. If `options.silent` is set, `remove`
		 * will *not* be triggered on the unregistered views.
		 *
		 * @since 3.5.0
		 *
		 * @param {string}       selector A jQuery selector.
		 * @param {Array|Object} views    The subviews for the main view.
		 * @param {Object}       options  Options for call. If `options.silent` is set,
		 *                                `remove` will *not* be triggered on the
		 *                                unregistered views.
		 *
		 * @return {wp.Backbone.Subviews} The current Subviews instance.
		 */
		unset: function( selector, views, options ) {
			var existing;

			if ( ! _.isString( selector ) ) {
				options = views;
				views = selector;
				selector = '';
			}

			views = views || [];

			if ( existing = this.get( selector ) ) {
				views = _.isArray( views ) ? views : [ views ];
				this._views[ selector ] = views.length ? _.difference( existing, views ) : [];
			}

			if ( ! options || ! options.silent )
				_.invoke( views, 'remove' );

			return this;
		},

		/**
		 * Detaches all subviews.
		 *
		 * Helps to preserve all subview events when re-rendering the master
		 * view. Used in conjunction with `Views.render()`.
		 *
		 * @since 3.5.0
		 *
		 * @return {wp.Backbone.Subviews} The current Subviews instance.
		 */
		detach: function() {
			$( _.pluck( this.all(), 'el' ) ).detach();
			return this;
		},

		/**
		 * Renders all subviews.
		 *
		 * Used in conjunction with `Views.detach()`.
		 *
		 * @since 3.5.0
		 *
		 * @return {wp.Backbone.Subviews} The current Subviews instance.
		*/
		render: function() {
			var options = {
					ready: this._isReady()
				};

			_.each( this._views, function( views, selector ) {
				this._attach( selector, views, options );
			}, this );

			this.rendered = true;
			return this;
		},

		/**
		 * Removes all subviews.
		 *
		 * Triggers the `remove()` method on all subviews. Detaches the master
		 * view from its parent. Resets the internals of the views manager.
		 *
		 * Accepts an `options` object. If `options.silent` is set, `unset`
		 * will *not* be triggered on the master view's parent.
		 *
		 * @since 3.6.0
		 *
		 * @param {Object}  options        Options for call.
		 * @param {boolean} options.silent If true, `unset` will *not* be triggered on
		 *                                 the master views' parent.
		 *
		 * @return {wp.Backbone.Subviews} The current Subviews instance.
		*/
		remove: function( options ) {
			if ( ! options || ! options.silent ) {
				if ( this.parent && this.parent.views )
					this.parent.views.unset( this.selector, this.view, { silent: true });
				delete this.parent;
				delete this.selector;
			}

			_.invoke( this.all(), 'remove' );
			this._views = [];
			return this;
		},

		/**
		 * Replaces a selector's subviews
		 *
		 * By default, sets the `$target` selector's html to the subview `els`.
		 *
		 * Can be overridden in subclasses.
		 *
		 * @since 3.5.0
		 *
		 * @param {string} $target Selector where to put the elements.
		 * @param {*} els HTML or elements to put into the selector's HTML.
		 *
		 * @return {wp.Backbone.Subviews} The current Subviews instance.
		 */
		replace: function( $target, els ) {
			$target.html( els );
			return this;
		},

		/**
		 * Insert subviews into a selector.
		 *
		 * By default, appends the subview `els` to the end of the `$target`
		 * selector. If `options.at` is set, inserts the subview `els` at the
		 * provided index.
		 *
		 * Can be overridden in subclasses.
		 *
		 * @since 3.5.0
		 *
		 * @param {string}  $target    Selector where to put the elements.
		 * @param {*}       els        HTML or elements to put at the end of the
		 *                             $target.
		 * @param {?Object} options    Options for call.
		 * @param {?number} options.at At which index to put the elements.
		 *
		 * @return {wp.Backbone.Subviews} The current Subviews instance.
		 */
		insert: function( $target, els, options ) {
			var at = options && options.at,
				$children;

			if ( _.isNumber( at ) && ($children = $target.children()).length > at )
				$children.eq( at ).before( els );
			else
				$target.append( els );

			return this;
		},

		/**
		 * Triggers the ready event.
		 *
		 * Only use this method if you know what you're doing. For performance reasons,
		 * this method does not check if the view is actually attached to the DOM. It's
		 * taking your word for it.
		 *
		 * Fires the ready event on the current view and all attached subviews.
		 *
		 * @since 3.5.0
		 */
		ready: function() {
			this.view.trigger('ready');

			// Find all attached subviews, and call ready on them.
			_.chain( this.all() ).map( function( view ) {
				return view.views;
			}).flatten().where({ attached: true }).invoke('ready');
		},
		/**
		 * Attaches a series of views to a selector. Internal.
		 *
		 * Checks to see if a matching selector exists, renders the views,
		 * performs the proper DOM operation, and then checks if the view is
		 * attached to the document.
		 *
		 * @since 3.5.0
		 *
		 * @private
		 *
		 * @param {string}       selector    A jQuery selector.
		 * @param {Array|Object} views       The subviews for the main view.
		 * @param {Object}       options     Options for call.
		 * @param {boolean}      options.add If true the provided views will be added.
		 *
		 * @return {wp.Backbone.Subviews} The current Subviews instance.
		 */
		_attach: function( selector, views, options ) {
			var $selector = selector ? this.view.$( selector ) : this.view.$el,
				managers;

			// Check if we found a location to attach the views.
			if ( ! $selector.length )
				return this;

			managers = _.chain( views ).pluck('views').flatten().value();

			// Render the views if necessary.
			_.each( managers, function( manager ) {
				if ( manager.rendered )
					return;

				manager.view.render();
				manager.rendered = true;
			}, this );

			// Insert or replace the views.
			this[ options.add ? 'insert' : 'replace' ]( $selector, _.pluck( views, 'el' ), options );

			/*
			 * Set attached and trigger ready if the current view is already
			 * attached to the DOM.
			 */
			_.each( managers, function( manager ) {
				manager.attached = true;

				if ( options.ready )
					manager.ready();
			}, this );

			return this;
		},

		/**
		 * Determines whether or not the current view is in the DOM.
		 *
		 * @since 3.5.0
		 *
		 * @private
		 *
		 * @return {boolean} Whether or not the current view is in the DOM.
		 */
		_isReady: function() {
			var node = this.view.el;
			while ( node ) {
				if ( node === document.body )
					return true;
				node = node.parentNode;
			}

			return false;
		}
	});

	wp.Backbone.View = Backbone.View.extend({

		// The constructor for the `Views` manager.
		Subviews: wp.Backbone.Subviews,

		/**
		 * The base view class.
		 *
		 * This extends the backbone view to have a build-in way to use subviews. This
		 * makes it easier to have nested views.
		 *
		 * @since 3.5.0
		 * @since 3.6.0 Moved wp.media.View to wp.Backbone.View
		 *
		 * @constructs
		 * @augments Backbone.View
		 *
		 * @memberOf wp.Backbone
		 *
		 *
		 * @param {Object} options The options for this view.
		 */
		constructor: function( options ) {
			this.views = new this.Subviews( this, this.views );
			this.on( 'ready', this.ready, this );

			this.options = options || {};

			Backbone.View.apply( this, arguments );
		},

		/**
		 * Removes this view and all subviews.
		 *
		 * @since 3.5.0
		 *
		 * @return {wp.Backbone.Subviews} The current Subviews instance.
		 */
		remove: function() {
			var result = Backbone.View.prototype.remove.apply( this, arguments );

			// Recursively remove child views.
			if ( this.views )
				this.views.remove();

			return result;
		},

		/**
		 * Renders this view and all subviews.
		 *
		 * @since 3.5.0
		 *
		 * @return {wp.Backbone.View} The current instance of the view.
		 */
		render: function() {
			var options;

			if ( this.prepare )
				options = this.prepare();

			this.views.detach();

			if ( this.template ) {
				options = options || {};
				this.trigger( 'prepare', options );
				this.$el.html( this.template( options ) );
			}

			this.views.render();
			return this;
		},

		/**
		 * Returns the options for this view.
		 *
		 * @since 3.5.0
		 *
		 * @return {Object} The options for this view.
		 */
		prepare: function() {
			return this.options;
		},

		/**
		 * Method that is called when the ready event is triggered.
		 *
		 * @since 3.5.0
		 */
		ready: function() {}
	});
}(jQuery));
                                                                                                                       wp-backbone.min.js                                                                                  0000644                 00000005737 15212564050 0010070 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
window.wp=window.wp||{},function(e){wp.Backbone={},wp.Backbone.Subviews=function(e,t){this.view=e,this._views=_.isArray(t)?{"":t}:t||{}},wp.Backbone.Subviews.extend=Backbone.Model.extend,_.extend(wp.Backbone.Subviews.prototype,{all:function(){return _.flatten(_.values(this._views))},get:function(e){return this._views[e=e||""]},first:function(e){e=this.get(e);return e&&e.length?e[0]:null},set:function(i,e,t){var n,s;return _.isString(i)||(t=e,e=i,i=""),t=t||{},s=e=_.isArray(e)?e:[e],(n=this.get(i))&&(t.add?_.isUndefined(t.at)?s=n.concat(e):(s=n).splice.apply(s,[t.at,0].concat(e)):(_.each(s,function(e){e.__detach=!0}),_.each(n,function(e){e.__detach?e.$el.detach():e.remove()}),_.each(s,function(e){delete e.__detach}))),this._views[i]=s,_.each(e,function(e){var t=e.Views||wp.Backbone.Subviews,t=e.views=e.views||new t(e);t.parent=this.view,t.selector=i},this),t.silent||this._attach(i,e,_.extend({ready:this._isReady()},t)),this},add:function(e,t,i){return _.isString(e)||(i=t,t=e,e=""),this.set(e,t,_.extend({add:!0},i))},unset:function(e,t,i){var n;return _.isString(e)||(i=t,t=e,e=""),t=t||[],(n=this.get(e))&&(t=_.isArray(t)?t:[t],this._views[e]=t.length?_.difference(n,t):[]),i&&i.silent||_.invoke(t,"remove"),this},detach:function(){return e(_.pluck(this.all(),"el")).detach(),this},render:function(){var i={ready:this._isReady()};return _.each(this._views,function(e,t){this._attach(t,e,i)},this),this.rendered=!0,this},remove:function(e){return e&&e.silent||(this.parent&&this.parent.views&&this.parent.views.unset(this.selector,this.view,{silent:!0}),delete this.parent,delete this.selector),_.invoke(this.all(),"remove"),this._views=[],this},replace:function(e,t){return e.html(t),this},insert:function(e,t,i){var n,i=i&&i.at;return _.isNumber(i)&&(n=e.children()).length>i?n.eq(i).before(t):e.append(t),this},ready:function(){this.view.trigger("ready"),_.chain(this.all()).map(function(e){return e.views}).flatten().where({attached:!0}).invoke("ready")},_attach:function(e,t,i){var n,e=e?this.view.$(e):this.view.$el;return e.length&&(n=_.chain(t).pluck("views").flatten().value(),_.each(n,function(e){e.rendered||(e.view.render(),e.rendered=!0)},this),this[i.add?"insert":"replace"](e,_.pluck(t,"el"),i),_.each(n,function(e){e.attached=!0,i.ready&&e.ready()},this)),this},_isReady:function(){for(var e=this.view.el;e;){if(e===document.body)return!0;e=e.parentNode}return!1}}),wp.Backbone.View=Backbone.View.extend({Subviews:wp.Backbone.Subviews,constructor:function(e){this.views=new this.Subviews(this,this.views),this.on("ready",this.ready,this),this.options=e||{},Backbone.View.apply(this,arguments)},remove:function(){var e=Backbone.View.prototype.remove.apply(this,arguments);return this.views&&this.views.remove(),e},render:function(){var e;return this.prepare&&(e=this.prepare()),this.views.detach(),this.template&&(this.trigger("prepare",e=e||{}),this.$el.html(this.template(e))),this.views.render(),this},prepare:function(){return this.options},ready:function(){}})}(jQuery);                                 wp-custom-header.js                                                                                 0000644                 00000024341 15212564050 0010272 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/wp-custom-header.js
 */

/* global YT */
(function( window, settings ) {

	var NativeHandler, YouTubeHandler;

	/** @namespace wp */
	window.wp = window.wp || {};

	// Fail gracefully in unsupported browsers.
	if ( ! ( 'addEventListener' in window ) ) {
		return;
	}

	/**
	 * Trigger an event.
	 *
	 * @param {Element} target HTML element to dispatch the event on.
	 * @param {string} name Event name.
	 */
	function trigger( target, name ) {
		var evt;

		if ( 'function' === typeof window.Event ) {
			evt = new Event( name );
		} else {
			evt = document.createEvent( 'Event' );
			evt.initEvent( name, true, true );
		}

		target.dispatchEvent( evt );
	}

	/**
	 * Create a custom header instance.
	 *
	 * @memberOf wp
	 *
	 * @class
	 */
	function CustomHeader() {
		this.handlers = {
			nativeVideo: new NativeHandler(),
			youtube: new YouTubeHandler()
		};
	}

	CustomHeader.prototype = {
		/**
		 * Initialize the custom header.
		 *
		 * If the environment supports video, loops through registered handlers
		 * until one is found that can handle the video.
		 */
		initialize: function() {
			if ( this.supportsVideo() ) {
				for ( var id in this.handlers ) {
					var handler = this.handlers[ id ];

					if ( 'test' in handler && handler.test( settings ) ) {
						this.activeHandler = handler.initialize.call( handler, settings );

						// Dispatch custom event when the video is loaded.
						trigger( document, 'wp-custom-header-video-loaded' );
						break;
					}
				}
			}
		},

		/**
		 * Determines if the current environment supports video.
		 *
		 * Themes and plugins can override this method to change the criteria.
		 *
		 * @return {boolean}
		 */
		supportsVideo: function() {
			// Don't load video on small screens. @todo Consider bandwidth and other factors.
			if ( window.innerWidth < settings.minWidth || window.innerHeight < settings.minHeight ) {
				return false;
			}

			return true;
		},

		/**
		 * Base handler for custom handlers to extend.
		 *
		 * @type {BaseHandler}
		 */
		BaseVideoHandler: BaseHandler
	};

	/**
	 * Create a video handler instance.
	 *
	 * @memberOf wp
	 *
	 * @class
	 */
	function BaseHandler() {}

	BaseHandler.prototype = {
		/**
		 * Initialize the video handler.
		 *
		 * @param {Object} settings Video settings.
		 */
		initialize: function( settings ) {
			var handler = this,
				button = document.createElement( 'button' );

			this.settings = settings;
			this.container = document.getElementById( 'wp-custom-header' );
			this.button = button;

			button.setAttribute( 'type', 'button' );
			button.setAttribute( 'id', 'wp-custom-header-video-button' );
			button.setAttribute( 'class', 'wp-custom-header-video-button wp-custom-header-video-play' );
			button.innerHTML = settings.l10n.play;

			// Toggle video playback when the button is clicked.
			button.addEventListener( 'click', function() {
				if ( handler.isPaused() ) {
					handler.play();
				} else {
					handler.pause();
				}
			});

			// Update the button class and text when the video state changes.
			this.container.addEventListener( 'play', function() {
				button.className = 'wp-custom-header-video-button wp-custom-header-video-play';
				button.innerHTML = settings.l10n.pause;
				if ( 'a11y' in window.wp ) {
					window.wp.a11y.speak( settings.l10n.playSpeak);
				}
			});

			this.container.addEventListener( 'pause', function() {
				button.className = 'wp-custom-header-video-button wp-custom-header-video-pause';
				button.innerHTML = settings.l10n.play;
				if ( 'a11y' in window.wp ) {
					window.wp.a11y.speak( settings.l10n.pauseSpeak);
				}
			});

			this.ready();
		},

		/**
		 * Ready method called after a handler is initialized.
		 *
		 * @abstract
		 */
		ready: function() {},

		/**
		 * Whether the video is paused.
		 *
		 * @abstract
		 * @return {boolean}
		 */
		isPaused: function() {},

		/**
		 * Pause the video.
		 *
		 * @abstract
		 */
		pause: function() {},

		/**
		 * Play the video.
		 *
		 * @abstract
		 */
		play: function() {},

		/**
		 * Append a video node to the header container.
		 *
		 * @param {Element} node HTML element.
		 */
		setVideo: function( node ) {
			var editShortcutNode,
				editShortcut = this.container.getElementsByClassName( 'customize-partial-edit-shortcut' );

			if ( editShortcut.length ) {
				editShortcutNode = this.container.removeChild( editShortcut[0] );
			}

			this.container.innerHTML = '';
			this.container.appendChild( node );

			if ( editShortcutNode ) {
				this.container.appendChild( editShortcutNode );
			}
		},

		/**
		 * Show the video controls.
		 *
		 * Appends a play/pause button to header container.
		 */
		showControls: function() {
			if ( ! this.container.contains( this.button ) ) {
				this.container.appendChild( this.button );
			}
		},

		/**
		 * Whether the handler can process a video.
		 *
		 * @abstract
		 * @param {Object} settings Video settings.
		 * @return {boolean}
		 */
		test: function() {
			return false;
		},

		/**
		 * Trigger an event on the header container.
		 *
		 * @param {string} name Event name.
		 */
		trigger: function( name ) {
			trigger( this.container, name );
		}
	};

	/**
	 * Create a custom handler.
	 *
	 * @memberOf wp
	 *
	 * @param {Object} protoProps Properties to apply to the prototype.
	 * @return CustomHandler The subclass.
	 */
	BaseHandler.extend = function( protoProps ) {
		var prop;

		function CustomHandler() {
			var result = BaseHandler.apply( this, arguments );
			return result;
		}

		CustomHandler.prototype = Object.create( BaseHandler.prototype );
		CustomHandler.prototype.constructor = CustomHandler;

		for ( prop in protoProps ) {
			CustomHandler.prototype[ prop ] = protoProps[ prop ];
		}

		return CustomHandler;
	};

	/**
	 * Native video handler.
	 *
	 * @memberOf wp
	 *
	 * @class
	 */
	NativeHandler = BaseHandler.extend(/** @lends wp.NativeHandler.prototype */{
		/**
		 * Whether the native handler supports a video.
		 *
		 * @param {Object} settings Video settings.
		 * @return {boolean}
		 */
		test: function( settings ) {
			var video = document.createElement( 'video' );
			return video.canPlayType( settings.mimeType );
		},

		/**
		 * Set up a native video element.
		 */
		ready: function() {
			var handler = this,
				video = document.createElement( 'video' );

			video.id = 'wp-custom-header-video';
			video.autoplay = true;
			video.loop = true;
			video.muted = true;
			video.playsInline = true;
			video.width = this.settings.width;
			video.height = this.settings.height;

			video.addEventListener( 'play', function() {
				handler.trigger( 'play' );
			});

			video.addEventListener( 'pause', function() {
				handler.trigger( 'pause' );
			});

			video.addEventListener( 'canplay', function() {
				handler.showControls();
			});

			this.video = video;
			handler.setVideo( video );
			video.src = this.settings.videoUrl;
		},

		/**
		 * Whether the video is paused.
		 *
		 * @return {boolean}
		 */
		isPaused: function() {
			return this.video.paused;
		},

		/**
		 * Pause the video.
		 */
		pause: function() {
			this.video.pause();
		},

		/**
		 * Play the video.
		 */
		play: function() {
			this.video.play();
		}
	});

	/**
	 * YouTube video handler.
	 *
	 * @memberOf wp
	 *
	 * @class wp.YouTubeHandler
	 */
	YouTubeHandler = BaseHandler.extend(/** @lends wp.YouTubeHandler.prototype */{
		/**
		 * Whether the handler supports a video.
		 *
		 * @param {Object} settings Video settings.
		 * @return {boolean}
		 */
		test: function( settings ) {
			return 'video/x-youtube' === settings.mimeType;
		},

		/**
		 * Set up a YouTube iframe.
		 *
		 * Loads the YouTube IFrame API if the 'YT' global doesn't exist.
		 */
		ready: function() {
			var handler = this;

			if ( 'YT' in window ) {
				YT.ready( handler.loadVideo.bind( handler ) );
			} else {
				var tag = document.createElement( 'script' );
				tag.src = 'https://www.youtube.com/iframe_api';
				tag.onload = function () {
					YT.ready( handler.loadVideo.bind( handler ) );
				};

				document.getElementsByTagName( 'head' )[0].appendChild( tag );
			}
		},

		/**
		 * Load a YouTube video.
		 */
		loadVideo: function() {
			var handler = this,
				video = document.createElement( 'div' ),
				// @link http://stackoverflow.com/a/27728417
				VIDEO_ID_REGEX = /^.*(?:(?:youtu\.be\/|v\/|vi\/|u\/\w\/|embed\/)|(?:(?:watch)?\?v(?:i)?=|\&v(?:i)?=))([^#\&\?]*).*/;

			video.id = 'wp-custom-header-video';
			handler.setVideo( video );

			handler.player = new YT.Player( video, {
				height: this.settings.height,
				width: this.settings.width,
				videoId: this.settings.videoUrl.match( VIDEO_ID_REGEX )[1],
				events: {
					onReady: function( e ) {
						e.target.mute();
						handler.showControls();
					},
					onStateChange: function( e ) {
						if ( YT.PlayerState.PLAYING === e.data ) {
							handler.trigger( 'play' );
						} else if ( YT.PlayerState.PAUSED === e.data ) {
							handler.trigger( 'pause' );
						} else if ( YT.PlayerState.ENDED === e.data ) {
							e.target.playVideo();
						}
					}
				},
				playerVars: {
					autoplay: 1,
					controls: 0,
					disablekb: 1,
					fs: 0,
					iv_load_policy: 3,
					loop: 1,
					modestbranding: 1,
					playsinline: 1,
					rel: 0,
					showinfo: 0
				}
			});
		},

		/**
		 * Whether the video is paused.
		 *
		 * @return {boolean}
		 */
		isPaused: function() {
			return YT.PlayerState.PAUSED === this.player.getPlayerState();
		},

		/**
		 * Pause the video.
		 */
		pause: function() {
			this.player.pauseVideo();
		},

		/**
		 * Play the video.
		 */
		play: function() {
			this.player.playVideo();
		}
	});

	// Initialize the custom header when the DOM is ready.
	window.wp.customHeader = new CustomHeader();
	document.addEventListener( 'DOMContentLoaded', window.wp.customHeader.initialize.bind( window.wp.customHeader ), false );

	// Selective refresh support in the Customizer.
	if ( 'customize' in window.wp ) {
		window.wp.customize.selectiveRefresh.bind( 'render-partials-response', function( response ) {
			if ( 'custom_header_settings' in response ) {
				settings = response.custom_header_settings;
			}
		});

		window.wp.customize.selectiveRefresh.bind( 'partial-content-rendered', function( placement ) {
			if ( 'custom_header' === placement.partial.id ) {
				window.wp.customHeader.initialize();
			}
		});
	}

})( window, window._wpCustomHeaderSettings || {} );
                                                                                                                                                                                                                                                                                               wp-custom-header.min.js                                                                             0000644                 00000010532 15212564050 0011051 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(i,t){var e,n;function a(e,t){var n;"function"==typeof i.Event?n=new Event(t):(n=document.createEvent("Event")).initEvent(t,!0,!0),e.dispatchEvent(n)}function o(){this.handlers={nativeVideo:new e,youtube:new n}}function s(){}i.wp=i.wp||{},"addEventListener"in i&&(o.prototype={initialize:function(){if(this.supportsVideo())for(var e in this.handlers){e=this.handlers[e];if("test"in e&&e.test(t)){this.activeHandler=e.initialize.call(e,t),a(document,"wp-custom-header-video-loaded");break}}},supportsVideo:function(){return!(i.innerWidth<t.minWidth||i.innerHeight<t.minHeight)},BaseVideoHandler:s},s.prototype={initialize:function(e){var t=this,n=document.createElement("button");this.settings=e,this.container=document.getElementById("wp-custom-header"),(this.button=n).setAttribute("type","button"),n.setAttribute("id","wp-custom-header-video-button"),n.setAttribute("class","wp-custom-header-video-button wp-custom-header-video-play"),n.innerHTML=e.l10n.play,n.addEventListener("click",function(){t.isPaused()?t.play():t.pause()}),this.container.addEventListener("play",function(){n.className="wp-custom-header-video-button wp-custom-header-video-play",n.innerHTML=e.l10n.pause,"a11y"in i.wp&&i.wp.a11y.speak(e.l10n.playSpeak)}),this.container.addEventListener("pause",function(){n.className="wp-custom-header-video-button wp-custom-header-video-pause",n.innerHTML=e.l10n.play,"a11y"in i.wp&&i.wp.a11y.speak(e.l10n.pauseSpeak)}),this.ready()},ready:function(){},isPaused:function(){},pause:function(){},play:function(){},setVideo:function(e){var t,n=this.container.getElementsByClassName("customize-partial-edit-shortcut");n.length&&(t=this.container.removeChild(n[0])),this.container.innerHTML="",this.container.appendChild(e),t&&this.container.appendChild(t)},showControls:function(){this.container.contains(this.button)||this.container.appendChild(this.button)},test:function(){return!1},trigger:function(e){a(this.container,e)}},e=(s.extend=function(e){function t(){return s.apply(this,arguments)}for(var n in(t.prototype=Object.create(s.prototype)).constructor=t,e)t.prototype[n]=e[n];return t})({test:function(e){return document.createElement("video").canPlayType(e.mimeType)},ready:function(){var e=this,t=document.createElement("video");t.id="wp-custom-header-video",t.autoplay=!0,t.loop=!0,t.muted=!0,t.playsInline=!0,t.width=this.settings.width,t.height=this.settings.height,t.addEventListener("play",function(){e.trigger("play")}),t.addEventListener("pause",function(){e.trigger("pause")}),t.addEventListener("canplay",function(){e.showControls()}),this.video=t,e.setVideo(t),t.src=this.settings.videoUrl},isPaused:function(){return this.video.paused},pause:function(){this.video.pause()},play:function(){this.video.play()}}),n=s.extend({test:function(e){return"video/x-youtube"===e.mimeType},ready:function(){var e,t=this;"YT"in i?YT.ready(t.loadVideo.bind(t)):((e=document.createElement("script")).src="https://www.youtube.com/iframe_api",e.onload=function(){YT.ready(t.loadVideo.bind(t))},document.getElementsByTagName("head")[0].appendChild(e))},loadVideo:function(){var t=this,e=document.createElement("div");e.id="wp-custom-header-video",t.setVideo(e),t.player=new YT.Player(e,{height:this.settings.height,width:this.settings.width,videoId:this.settings.videoUrl.match(/^.*(?:(?:youtu\.be\/|v\/|vi\/|u\/\w\/|embed\/)|(?:(?:watch)?\?v(?:i)?=|\&v(?:i)?=))([^#\&\?]*).*/)[1],events:{onReady:function(e){e.target.mute(),t.showControls()},onStateChange:function(e){YT.PlayerState.PLAYING===e.data?t.trigger("play"):YT.PlayerState.PAUSED===e.data?t.trigger("pause"):YT.PlayerState.ENDED===e.data&&e.target.playVideo()}},playerVars:{autoplay:1,controls:0,disablekb:1,fs:0,iv_load_policy:3,loop:1,modestbranding:1,playsinline:1,rel:0,showinfo:0}})},isPaused:function(){return YT.PlayerState.PAUSED===this.player.getPlayerState()},pause:function(){this.player.pauseVideo()},play:function(){this.player.playVideo()}}),i.wp.customHeader=new o,document.addEventListener("DOMContentLoaded",i.wp.customHeader.initialize.bind(i.wp.customHeader),!1),"customize"in i.wp)&&(i.wp.customize.selectiveRefresh.bind("render-partials-response",function(e){"custom_header_settings"in e&&(t=e.custom_header_settings)}),i.wp.customize.selectiveRefresh.bind("partial-content-rendered",function(e){"custom_header"===e.partial.id&&i.wp.customHeader.initialize()}))}(window,window._wpCustomHeaderSettings||{});                                                                                                                                                                      wp-embed-template.js                                                                                0000644                 00000015173 15212564050 0010422 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/wp-embed-template.js
 */
(function ( window, document ) {
	'use strict';

	var supportedBrowser = ( document.querySelector && window.addEventListener ),
		loaded = false,
		secret,
		secretTimeout,
		resizing;

	function sendEmbedMessage( message, value ) {
		window.parent.postMessage( {
			message: message,
			value: value,
			secret: secret
		}, '*' );
	}

	/**
	 * Send the height message to the parent window.
	 */
	function sendHeightMessage() {
		sendEmbedMessage( 'height', Math.ceil( document.body.getBoundingClientRect().height ) );
	}

	function onLoad() {
		if ( loaded ) {
			return;
		}
		loaded = true;

		var share_dialog = document.querySelector( '.wp-embed-share-dialog' ),
			share_dialog_open = document.querySelector( '.wp-embed-share-dialog-open' ),
			share_dialog_close = document.querySelector( '.wp-embed-share-dialog-close' ),
			share_input = document.querySelectorAll( '.wp-embed-share-input' ),
			share_dialog_tabs = document.querySelectorAll( '.wp-embed-share-tab-button button' ),
			featured_image = document.querySelector( '.wp-embed-featured-image img' ),
			i;

		if ( share_input ) {
			for ( i = 0; i < share_input.length; i++ ) {
				share_input[ i ].addEventListener( 'click', function ( e ) {
					e.target.select();
				} );
			}
		}

		function openSharingDialog() {
			share_dialog.className = share_dialog.className.replace( 'hidden', '' );
			// Initial focus should go on the currently selected tab in the dialog.
			document.querySelector( '.wp-embed-share-tab-button [aria-selected="true"]' ).focus();
		}

		function closeSharingDialog() {
			share_dialog.className += ' hidden';
			document.querySelector( '.wp-embed-share-dialog-open' ).focus();
		}

		if ( share_dialog_open ) {
			share_dialog_open.addEventListener( 'click', function () {
				openSharingDialog();
			} );
		}

		if ( share_dialog_close ) {
			share_dialog_close.addEventListener( 'click', function () {
				closeSharingDialog();
			} );
		}

		function shareClickHandler( e ) {
			var currentTab = document.querySelector( '.wp-embed-share-tab-button [aria-selected="true"]' );
			currentTab.setAttribute( 'aria-selected', 'false' );
			document.querySelector( '#' + currentTab.getAttribute( 'aria-controls' ) ).setAttribute( 'aria-hidden', 'true' );

			e.target.setAttribute( 'aria-selected', 'true' );
			document.querySelector( '#' + e.target.getAttribute( 'aria-controls' ) ).setAttribute( 'aria-hidden', 'false' );
		}

		function shareKeyHandler( e ) {
			var target = e.target,
				previousSibling = target.parentElement.previousElementSibling,
				nextSibling = target.parentElement.nextElementSibling,
				newTab, newTabChild;

			if ( 37 === e.keyCode ) {
				newTab = previousSibling;
			} else if ( 39 === e.keyCode ) {
				newTab = nextSibling;
			} else {
				return false;
			}

			if ( 'rtl' === document.documentElement.getAttribute( 'dir' ) ) {
				newTab = ( newTab === previousSibling ) ? nextSibling : previousSibling;
			}

			if ( newTab ) {
				newTabChild = newTab.firstElementChild;

				target.setAttribute( 'tabindex', '-1' );
				target.setAttribute( 'aria-selected', false );
				document.querySelector( '#' + target.getAttribute( 'aria-controls' ) ).setAttribute( 'aria-hidden', 'true' );

				newTabChild.setAttribute( 'tabindex', '0' );
				newTabChild.setAttribute( 'aria-selected', 'true' );
				newTabChild.focus();
				document.querySelector( '#' + newTabChild.getAttribute( 'aria-controls' ) ).setAttribute( 'aria-hidden', 'false' );
			}
		}

		if ( share_dialog_tabs ) {
			for ( i = 0; i < share_dialog_tabs.length; i++ ) {
				share_dialog_tabs[ i ].addEventListener( 'click', shareClickHandler );

				share_dialog_tabs[ i ].addEventListener( 'keydown', shareKeyHandler );
			}
		}

		document.addEventListener( 'keydown', function ( e ) {
			if ( 27 === e.keyCode && -1 === share_dialog.className.indexOf( 'hidden' ) ) {
				closeSharingDialog();
			} else if ( 9 === e.keyCode ) {
				constrainTabbing( e );
			}
		}, false );

		function constrainTabbing( e ) {
			// Need to re-get the selected tab each time.
			var firstFocusable = document.querySelector( '.wp-embed-share-tab-button [aria-selected="true"]' );

			if ( share_dialog_close === e.target && ! e.shiftKey ) {
				firstFocusable.focus();
				e.preventDefault();
			} else if ( firstFocusable === e.target && e.shiftKey ) {
				share_dialog_close.focus();
				e.preventDefault();
			}
		}

		if ( window.self === window.top ) {
			return;
		}

		// Send this document's height to the parent (embedding) site.
		sendHeightMessage();

		// Send the document's height again after the featured image has been loaded.
		if ( featured_image ) {
			featured_image.addEventListener( 'load', sendHeightMessage );
		}

		/**
		 * Detect clicks to external (_top) links.
		 */
		function linkClickHandler( e ) {
			var target = e.target,
				href;
			if ( target.hasAttribute( 'href' ) ) {
				href = target.getAttribute( 'href' );
			} else {
				href = target.parentElement.getAttribute( 'href' );
			}

			// Only catch clicks from the primary mouse button, without any modifiers.
			if ( event.altKey || event.ctrlKey || event.metaKey || event.shiftKey ) {
				return;
			}

			// Send link target to the parent (embedding) site.
			if ( href ) {
				sendEmbedMessage( 'link', href );
				e.preventDefault();
			}
		}

		document.addEventListener( 'click', linkClickHandler );
	}

	/**
	 * Iframe resize handler.
	 */
	function onResize() {
		if ( window.self === window.top ) {
			return;
		}

		clearTimeout( resizing );

		resizing = setTimeout( sendHeightMessage, 100 );
	}

	/**
	 * Message handler.
	 *
	 * @param {MessageEvent} event
	 */
	function onMessage( event ) {
		var data = event.data;

		if ( ! data ) {
			return;
		}

		if ( event.source !== window.parent ) {
			return;
		}

		if ( ! ( data.secret || data.message ) ) {
			return;
		}

		if ( data.secret !== secret ) {
			return;
		}

		if ( 'ready' === data.message ) {
			sendHeightMessage();
		}
	}

	/**
	 * Re-get the secret when it was added later on.
	 */
	function getSecret() {
		if ( window.self === window.top || !!secret ) {
			return;
		}

		secret = window.location.hash.replace( /.*secret=([\d\w]{10}).*/, '$1' );

		clearTimeout( secretTimeout );

		secretTimeout = setTimeout( function () {
			getSecret();
		}, 100 );
	}

	if ( supportedBrowser ) {
		getSecret();
		document.documentElement.className = document.documentElement.className.replace( /\bno-js\b/, '' ) + ' js';
		document.addEventListener( 'DOMContentLoaded', onLoad, false );
		window.addEventListener( 'load', onLoad, false );
		window.addEventListener( 'resize', onResize, false );
		window.addEventListener( 'message', onMessage, false );
	}
})( window, document );
                                                                                                                                                                                                                                                                                                                                                                                                     wp-embed-template.min.js                                                                            0000644                 00000006146 15212564050 0011204 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(c,u){"use strict";var r,t,e,a=u.querySelector&&c.addEventListener,f=!1;function b(e,t){c.parent.postMessage({message:e,value:t,secret:r},"*")}function m(){b("height",Math.ceil(u.body.getBoundingClientRect().height))}function n(){if(!f){f=!0;var e,r=u.querySelector(".wp-embed-share-dialog"),t=u.querySelector(".wp-embed-share-dialog-open"),a=u.querySelector(".wp-embed-share-dialog-close"),n=u.querySelectorAll(".wp-embed-share-input"),i=u.querySelectorAll(".wp-embed-share-tab-button button"),s=u.querySelector(".wp-embed-featured-image img");if(n)for(e=0;e<n.length;e++)n[e].addEventListener("click",function(e){e.target.select()});if(t&&t.addEventListener("click",function(){r.className=r.className.replace("hidden",""),u.querySelector('.wp-embed-share-tab-button [aria-selected="true"]').focus()}),a&&a.addEventListener("click",function(){o()}),i)for(e=0;e<i.length;e++)i[e].addEventListener("click",d),i[e].addEventListener("keydown",l);u.addEventListener("keydown",function(e){var t;27===e.keyCode&&-1===r.className.indexOf("hidden")?o():9===e.keyCode&&(e=e,t=u.querySelector('.wp-embed-share-tab-button [aria-selected="true"]'),a!==e.target||e.shiftKey?t===e.target&&e.shiftKey&&(a.focus(),e.preventDefault()):(t.focus(),e.preventDefault()))},!1),c.self!==c.top&&(m(),s&&s.addEventListener("load",m),u.addEventListener("click",function(e){var t=((t=e.target).hasAttribute("href")?t:t.parentElement).getAttribute("href");event.altKey||event.ctrlKey||event.metaKey||event.shiftKey||t&&(b("link",t),e.preventDefault())}))}function o(){r.className+=" hidden",u.querySelector(".wp-embed-share-dialog-open").focus()}function d(e){var t=u.querySelector('.wp-embed-share-tab-button [aria-selected="true"]');t.setAttribute("aria-selected","false"),u.querySelector("#"+t.getAttribute("aria-controls")).setAttribute("aria-hidden","true"),e.target.setAttribute("aria-selected","true"),u.querySelector("#"+e.target.getAttribute("aria-controls")).setAttribute("aria-hidden","false")}function l(e){var t,r=e.target,a=r.parentElement.previousElementSibling,n=r.parentElement.nextElementSibling;if(37===e.keyCode)t=a;else{if(39!==e.keyCode)return!1;t=n}(t="rtl"===u.documentElement.getAttribute("dir")?t===a?n:a:t)&&(e=t.firstElementChild,r.setAttribute("tabindex","-1"),r.setAttribute("aria-selected",!1),u.querySelector("#"+r.getAttribute("aria-controls")).setAttribute("aria-hidden","true"),e.setAttribute("tabindex","0"),e.setAttribute("aria-selected","true"),e.focus(),u.querySelector("#"+e.getAttribute("aria-controls")).setAttribute("aria-hidden","false"))}}a&&(!function e(){c.self===c.top||r||(r=c.location.hash.replace(/.*secret=([\d\w]{10}).*/,"$1"),clearTimeout(t),t=setTimeout(function(){e()},100))}(),u.documentElement.className=u.documentElement.className.replace(/\bno-js\b/,"")+" js",u.addEventListener("DOMContentLoaded",n,!1),c.addEventListener("load",n,!1),c.addEventListener("resize",function(){c.self!==c.top&&(clearTimeout(e),e=setTimeout(m,100))},!1),c.addEventListener("message",function(e){var t=e.data;t&&e.source===c.parent&&(t.secret||t.message)&&t.secret===r&&"ready"===t.message&&m()},!1))}(window,document);                                                                                                                                                                                                                                                                                                                                                                                                                          wp-embed.js                                                                                         0000644                 00000006216 15212564050 0006607 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * WordPress inline HTML embed
 *
 * @since 4.4.0
 * @output wp-includes/js/wp-embed.js
 *
 * Single line comments should not be used since they will break
 * the script when inlined in get_post_embed_html(), specifically
 * when the comments are not stripped out due to SCRIPT_DEBUG
 * being turned on.
 */
(function ( window, document ) {
	'use strict';

	/* Abort for ancient browsers. */
	if ( ! document.querySelector || ! window.addEventListener || typeof URL === 'undefined' ) {
		return;
	}

	/** @namespace wp */
	window.wp = window.wp || {};

	/* Abort if script was already executed. */
	if ( !! window.wp.receiveEmbedMessage ) {
		return;
	}

	/**
	 * Receive embed message.
	 *
	 * @param {MessageEvent} e
	 */
	window.wp.receiveEmbedMessage = function( e ) {
		var data = e.data;

		/* Verify shape of message. */
		if (
			! ( data || data.secret || data.message || data.value ) ||
			/[^a-zA-Z0-9]/.test( data.secret )
		) {
			return;
		}

		var iframes = document.querySelectorAll( 'iframe[data-secret="' + data.secret + '"]' ),
			blockquotes = document.querySelectorAll( 'blockquote[data-secret="' + data.secret + '"]' ),
			allowedProtocols = new RegExp( '^https?:$', 'i' ),
			i, source, height, sourceURL, targetURL;

		for ( i = 0; i < blockquotes.length; i++ ) {
			blockquotes[ i ].style.display = 'none';
		}

		for ( i = 0; i < iframes.length; i++ ) {
			source = iframes[ i ];

			if ( e.source !== source.contentWindow ) {
				continue;
			}

			source.removeAttribute( 'style' );

			if ( 'height' === data.message ) {
				/* Resize the iframe on request. */
				height = parseInt( data.value, 10 );
				if ( height > 1000 ) {
					height = 1000;
				} else if ( ~~height < 200 ) {
					height = 200;
				}

				source.height = height;
			} else if ( 'link' === data.message ) {
				/* Link to a specific URL on request. */
				sourceURL = new URL( source.getAttribute( 'src' ) );
				targetURL = new URL( data.value );

				if (
					allowedProtocols.test( targetURL.protocol ) &&
					targetURL.host === sourceURL.host &&
					document.activeElement === source
				) {
					window.top.location.href = data.value;
				}
			}
		}
	};

	function onLoad() {
		var iframes = document.querySelectorAll( 'iframe.wp-embedded-content' ),
			i, source, secret;

		for ( i = 0; i < iframes.length; i++ ) {
			/** @var {IframeElement} */
			source = iframes[ i ];

			secret = source.getAttribute( 'data-secret' );
			if ( ! secret ) {
				/* Add secret to iframe */
				secret = Math.random().toString( 36 ).substring( 2, 12 );
				source.src += '#?secret=' + secret;
				source.setAttribute( 'data-secret', secret );
			}

			/*
			 * Let post embed window know that the parent is ready for receiving the height message, in case the iframe
			 * loaded before wp-embed.js was loaded. When the ready message is received by the post embed window, the
			 * window will then (re-)send the height message right away.
			 */
			source.contentWindow.postMessage( {
				message: 'ready',
				secret: secret
			}, '*' );
		}
	}

	window.addEventListener( 'message', window.wp.receiveEmbedMessage, false );
	document.addEventListener( 'DOMContentLoaded', onLoad, false );
})( window, document );
                                                                                                                                                                                                                                                                                                                                                                                  wp-embed.min.js                                                                                     0000644                 00000002343 15212564050 0007366 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(d,l){"use strict";l.querySelector&&d.addEventListener&&"undefined"!=typeof URL&&(d.wp=d.wp||{},d.wp.receiveEmbedMessage||(d.wp.receiveEmbedMessage=function(e){var t=e.data;if((t||t.secret||t.message||t.value)&&!/[^a-zA-Z0-9]/.test(t.secret)){for(var s,r,n,a=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),o=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),c=new RegExp("^https?:$","i"),i=0;i<o.length;i++)o[i].style.display="none";for(i=0;i<a.length;i++)s=a[i],e.source===s.contentWindow&&(s.removeAttribute("style"),"height"===t.message?(1e3<(r=parseInt(t.value,10))?r=1e3:~~r<200&&(r=200),s.height=r):"link"===t.message&&(r=new URL(s.getAttribute("src")),n=new URL(t.value),c.test(n.protocol))&&n.host===r.host&&l.activeElement===s&&(d.top.location.href=t.value))}},d.addEventListener("message",d.wp.receiveEmbedMessage,!1),l.addEventListener("DOMContentLoaded",function(){for(var e,t,s=l.querySelectorAll("iframe.wp-embedded-content"),r=0;r<s.length;r++)(t=(e=s[r]).getAttribute("data-secret"))||(t=Math.random().toString(36).substring(2,12),e.src+="#?secret="+t,e.setAttribute("data-secret",t)),e.contentWindow.postMessage({message:"ready",secret:t},"*")},!1)))}(window,document);                                                                                                                                                                                                                                                                                             wp-emoji-loader.js                                                                                  0000644                 00000031623 15212564050 0010102 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/wp-emoji-loader.js
 */

/* eslint-env es6 */

// Note: This is loaded as a script module, so there is no need for an IIFE to prevent pollution of the global scope.

/**
 * Emoji Settings as exported in PHP via _print_emoji_detection_script().
 * @typedef WPEmojiSettings
 * @type {object}
 * @property {?object} source
 * @property {?string} source.concatemoji
 * @property {?string} source.twemoji
 * @property {?string} source.wpemoji
 */

const settings = /** @type {WPEmojiSettings} */ (
	JSON.parse( document.getElementById( 'wp-emoji-settings' ).textContent )
);

// For compatibility with other scripts that read from this global, in particular wp-includes/js/wp-emoji.js (source file: js/_enqueues/wp/emoji.js).
window._wpemojiSettings = settings;

/**
 * Support tests.
 * @typedef SupportTests
 * @type {object}
 * @property {?boolean} flag
 * @property {?boolean} emoji
 */

const sessionStorageKey = 'wpEmojiSettingsSupports';
const tests = [ 'flag', 'emoji' ];

/**
 * Checks whether the browser supports offloading to a Worker.
 *
 * @since 6.3.0
 *
 * @private
 *
 * @returns {boolean}
 */
function supportsWorkerOffloading() {
	return (
		typeof Worker !== 'undefined' &&
		typeof OffscreenCanvas !== 'undefined' &&
		typeof URL !== 'undefined' &&
		URL.createObjectURL &&
		typeof Blob !== 'undefined'
	);
}

/**
 * @typedef SessionSupportTests
 * @type {object}
 * @property {number} timestamp
 * @property {SupportTests} supportTests
 */

/**
 * Get support tests from session.
 *
 * @since 6.3.0
 *
 * @private
 *
 * @returns {?SupportTests} Support tests, or null if not set or older than 1 week.
 */
function getSessionSupportTests() {
	try {
		/** @type {SessionSupportTests} */
		const item = JSON.parse(
			sessionStorage.getItem( sessionStorageKey )
		);
		if (
			typeof item === 'object' &&
			typeof item.timestamp === 'number' &&
			new Date().valueOf() < item.timestamp + 604800 && // Note: Number is a week in seconds.
			typeof item.supportTests === 'object'
		) {
			return item.supportTests;
		}
	} catch ( e ) {}
	return null;
}

/**
 * Persist the supports in session storage.
 *
 * @since 6.3.0
 *
 * @private
 *
 * @param {SupportTests} supportTests Support tests.
 */
function setSessionSupportTests( supportTests ) {
	try {
		/** @type {SessionSupportTests} */
		const item = {
			supportTests: supportTests,
			timestamp: new Date().valueOf()
		};

		sessionStorage.setItem(
			sessionStorageKey,
			JSON.stringify( item )
		);
	} catch ( e ) {}
}

/**
 * Checks if two sets of Emoji characters render the same visually.
 *
 * This is used to determine if the browser is rendering an emoji with multiple data points
 * correctly. set1 is the emoji in the correct form, using a zero-width joiner. set2 is the emoji
 * in the incorrect form, using a zero-width space. If the two sets render the same, then the browser
 * does not support the emoji correctly.
 *
 * This function may be serialized to run in a Worker. Therefore, it cannot refer to variables from the containing
 * scope. Everything must be passed by parameters.
 *
 * @since 4.9.0
 *
 * @private
 *
 * @param {CanvasRenderingContext2D} context 2D Context.
 * @param {string} set1 Set of Emoji to test.
 * @param {string} set2 Set of Emoji to test.
 *
 * @return {boolean} True if the two sets render the same.
 */
function emojiSetsRenderIdentically( context, set1, set2 ) {
	// Cleanup from previous test.
	context.clearRect( 0, 0, context.canvas.width, context.canvas.height );
	context.fillText( set1, 0, 0 );
	const rendered1 = new Uint32Array(
		context.getImageData(
			0,
			0,
			context.canvas.width,
			context.canvas.height
		).data
	);

	// Cleanup from previous test.
	context.clearRect( 0, 0, context.canvas.width, context.canvas.height );
	context.fillText( set2, 0, 0 );
	const rendered2 = new Uint32Array(
		context.getImageData(
			0,
			0,
			context.canvas.width,
			context.canvas.height
		).data
	);

	return rendered1.every( ( rendered2Data, index ) => {
		return rendered2Data === rendered2[ index ];
	} );
}

/**
 * Checks if the center point of a single emoji is empty.
 *
 * This is used to determine if the browser is rendering an emoji with a single data point
 * correctly. The center point of an incorrectly rendered emoji will be empty. A correctly
 * rendered emoji will have a non-zero value at the center point.
 *
 * This function may be serialized to run in a Worker. Therefore, it cannot refer to variables from the containing
 * scope. Everything must be passed by parameters.
 *
 * @since 6.8.2
 *
 * @private
 *
 * @param {CanvasRenderingContext2D} context 2D Context.
 * @param {string} emoji Emoji to test.
 *
 * @return {boolean} True if the center point is empty.
 */
function emojiRendersEmptyCenterPoint( context, emoji ) {
	// Cleanup from previous test.
	context.clearRect( 0, 0, context.canvas.width, context.canvas.height );
	context.fillText( emoji, 0, 0 );

	// Test if the center point (16, 16) is empty (0,0,0,0).
	const centerPoint = context.getImageData(16, 16, 1, 1);
	for ( let i = 0; i < centerPoint.data.length; i++ ) {
		if ( centerPoint.data[ i ] !== 0 ) {
			// Stop checking the moment it's known not to be empty.
			return false;
		}
	}

	return true;
}

/**
 * Determines if the browser properly renders Emoji that Twemoji can supplement.
 *
 * This function may be serialized to run in a Worker. Therefore, it cannot refer to variables from the containing
 * scope. Everything must be passed by parameters.
 *
 * @since 4.2.0
 *
 * @private
 *
 * @param {CanvasRenderingContext2D} context 2D Context.
 * @param {string} type Whether to test for support of "flag" or "emoji".
 * @param {Function} emojiSetsRenderIdentically Reference to emojiSetsRenderIdentically function, needed due to minification.
 * @param {Function} emojiRendersEmptyCenterPoint Reference to emojiRendersEmptyCenterPoint function, needed due to minification.
 *
 * @return {boolean} True if the browser can render emoji, false if it cannot.
 */
function browserSupportsEmoji( context, type, emojiSetsRenderIdentically, emojiRendersEmptyCenterPoint ) {
	let isIdentical;

	switch ( type ) {
		case 'flag':
			/*
			 * Test for Transgender flag compatibility. Added in Unicode 13.
			 *
			 * To test for support, we try to render it, and compare the rendering to how it would look if
			 * the browser doesn't render it correctly (white flag emoji + transgender symbol).
			 */
			isIdentical = emojiSetsRenderIdentically(
				context,
				'\uD83C\uDFF3\uFE0F\u200D\u26A7\uFE0F', // as a zero-width joiner sequence
				'\uD83C\uDFF3\uFE0F\u200B\u26A7\uFE0F' // separated by a zero-width space
			);

			if ( isIdentical ) {
				return false;
			}

			/*
			 * Test for Sark flag compatibility. This is the least supported of the letter locale flags,
			 * so gives us an easy test for full support.
			 *
			 * To test for support, we try to render it, and compare the rendering to how it would look if
			 * the browser doesn't render it correctly ([C] + [Q]).
			 */
			isIdentical = emojiSetsRenderIdentically(
				context,
				'\uD83C\uDDE8\uD83C\uDDF6', // as the sequence of two code points
				'\uD83C\uDDE8\u200B\uD83C\uDDF6' // as the two code points separated by a zero-width space
			);

			if ( isIdentical ) {
				return false;
			}

			/*
			 * Test for English flag compatibility. England is a country in the United Kingdom, it
			 * does not have a two letter locale code but rather a five letter sub-division code.
			 *
			 * To test for support, we try to render it, and compare the rendering to how it would look if
			 * the browser doesn't render it correctly (black flag emoji + [G] + [B] + [E] + [N] + [G]).
			 */
			isIdentical = emojiSetsRenderIdentically(
				context,
				// as the flag sequence
				'\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67\uDB40\uDC7F',
				// with each code point separated by a zero-width space
				'\uD83C\uDFF4\u200B\uDB40\uDC67\u200B\uDB40\uDC62\u200B\uDB40\uDC65\u200B\uDB40\uDC6E\u200B\uDB40\uDC67\u200B\uDB40\uDC7F'
			);

			return ! isIdentical;
		case 'emoji':
			/*
			 * Is there a large, hairy, humanoid mythical creature living in the browser?
			 *
			 * To test for Emoji 17.0 support, try to render a new emoji: Hairy Creature.
			 *
			 * The hairy creature emoji is a single code point emoji. Testing for browser
			 * support required testing the center point of the emoji to see if it is empty.
			 *
			 * 0xD83E 0x1FAC8 (\uD83E\u1FAC8) == ðŸ«ˆ Hairy creature.
			 *
			 * When updating this test, please ensure that the emoji is either a single code point
			 * or switch to using the emojiSetsRenderIdentically function and testing with a zero-width
			 * joiner vs a zero-width space.
			 */
			const notSupported = emojiRendersEmptyCenterPoint( context, '\uD83E\u1FAC8' );
			return ! notSupported;
	}

	return false;
}

/**
 * Checks emoji support tests.
 *
 * This function may be serialized to run in a Worker. Therefore, it cannot refer to variables from the containing
 * scope. Everything must be passed by parameters.
 *
 * @since 6.3.0
 *
 * @private
 *
 * @param {string[]} tests Tests.
 * @param {Function} browserSupportsEmoji Reference to browserSupportsEmoji function, needed due to minification.
 * @param {Function} emojiSetsRenderIdentically Reference to emojiSetsRenderIdentically function, needed due to minification.
 * @param {Function} emojiRendersEmptyCenterPoint Reference to emojiRendersEmptyCenterPoint function, needed due to minification.
 *
 * @return {SupportTests} Support tests.
 */
function testEmojiSupports( tests, browserSupportsEmoji, emojiSetsRenderIdentically, emojiRendersEmptyCenterPoint ) {
	let canvas;
	if (
		typeof WorkerGlobalScope !== 'undefined' &&
		self instanceof WorkerGlobalScope
	) {
		canvas = new OffscreenCanvas( 300, 150 ); // Dimensions are default for HTMLCanvasElement.
	} else {
		canvas = document.createElement( 'canvas' );
	}

	const context = canvas.getContext( '2d', { willReadFrequently: true } );

	/*
	 * Chrome on OS X added native emoji rendering in M41. Unfortunately,
	 * it doesn't work when the font is bolder than 500 weight. So, we
	 * check for bold rendering support to avoid invisible emoji in Chrome.
	 */
	context.textBaseline = 'top';
	context.font = '600 32px Arial';

	const supports = {};
	tests.forEach( ( test ) => {
		supports[ test ] = browserSupportsEmoji( context, test, emojiSetsRenderIdentically, emojiRendersEmptyCenterPoint );
	} );
	return supports;
}

/**
 * Adds a script to the head of the document.
 *
 * @ignore
 *
 * @since 4.2.0
 *
 * @param {string} src The url where the script is located.
 *
 * @return {void}
 */
function addScript( src ) {
	const script = document.createElement( 'script' );
	script.src = src;
	script.defer = true;
	document.head.appendChild( script );
}

settings.supports = {
	everything: true,
	everythingExceptFlag: true
};

// Obtain the emoji support from the browser, asynchronously when possible.
new Promise( ( resolve ) => {
	let supportTests = getSessionSupportTests();
	if ( supportTests ) {
		resolve( supportTests );
		return;
	}

	if ( supportsWorkerOffloading() ) {
		try {
			// Note that the functions are being passed as arguments due to minification.
			const workerScript =
				'postMessage(' +
				testEmojiSupports.toString() +
				'(' +
				[
					JSON.stringify( tests ),
					browserSupportsEmoji.toString(),
					emojiSetsRenderIdentically.toString(),
					emojiRendersEmptyCenterPoint.toString()
				].join( ',' ) +
				'));';
			const blob = new Blob( [ workerScript ], {
				type: 'text/javascript'
			} );
			const worker = new Worker( URL.createObjectURL( blob ), { name: 'wpTestEmojiSupports' } );
			worker.onmessage = ( event ) => {
				supportTests = event.data;
				setSessionSupportTests( supportTests );
				worker.terminate();
				resolve( supportTests );
			};
			return;
		} catch ( e ) {}
	}

	supportTests = testEmojiSupports( tests, browserSupportsEmoji, emojiSetsRenderIdentically, emojiRendersEmptyCenterPoint );
	setSessionSupportTests( supportTests );
	resolve( supportTests );
} )
	// Once the browser emoji support has been obtained from the session, finalize the settings.
	.then( ( supportTests ) => {
		/*
		 * Tests the browser support for flag emojis and other emojis, and adjusts the
		 * support settings accordingly.
		 */
		for ( const test in supportTests ) {
			settings.supports[ test ] = supportTests[ test ];

			settings.supports.everything =
				settings.supports.everything && settings.supports[ test ];

			if ( 'flag' !== test ) {
				settings.supports.everythingExceptFlag =
					settings.supports.everythingExceptFlag &&
					settings.supports[ test ];
			}
		}

		settings.supports.everythingExceptFlag =
			settings.supports.everythingExceptFlag &&
			! settings.supports.flag;

		// When the browser can not render everything we need to load a polyfill.
		if ( ! settings.supports.everything ) {
			const src = settings.source || {};

			if ( src.concatemoji ) {
				addScript( src.concatemoji );
			} else if ( src.wpemoji && src.twemoji ) {
				addScript( src.twemoji );
				addScript( src.wpemoji );
			}
		}
	} );
                                                                                                             wp-emoji-loader.min.js                                                                              0000644                 00000005512 15212564050 0010662 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
const a=JSON.parse(document.getElementById("wp-emoji-settings").textContent),o=(window._wpemojiSettings=a,"wpEmojiSettingsSupports"),s=["flag","emoji"];function i(e){try{var t={supportTests:e,timestamp:(new Date).valueOf()};sessionStorage.setItem(o,JSON.stringify(t))}catch(e){}}function c(e,t,n){e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(t,0,0);t=new Uint32Array(e.getImageData(0,0,e.canvas.width,e.canvas.height).data);e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(n,0,0);const a=new Uint32Array(e.getImageData(0,0,e.canvas.width,e.canvas.height).data);return t.every((e,t)=>e===a[t])}function p(e,t){e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(t,0,0);var n=e.getImageData(16,16,1,1);for(let e=0;e<n.data.length;e++)if(0!==n.data[e])return!1;return!0}function u(e,t,n,a){switch(t){case"flag":return n(e,"\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f","\ud83c\udff3\ufe0f\u200b\u26a7\ufe0f")?!1:!n(e,"\ud83c\udde8\ud83c\uddf6","\ud83c\udde8\u200b\ud83c\uddf6")&&!n(e,"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f","\ud83c\udff4\u200b\udb40\udc67\u200b\udb40\udc62\u200b\udb40\udc65\u200b\udb40\udc6e\u200b\udb40\udc67\u200b\udb40\udc7f");case"emoji":return!a(e,"\ud83e\u1fac8")}return!1}function f(e,t,n,a){let r;const o=(r="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?new OffscreenCanvas(300,150):document.createElement("canvas")).getContext("2d",{willReadFrequently:!0}),s=(o.textBaseline="top",o.font="600 32px Arial",{});return e.forEach(e=>{s[e]=t(o,e,n,a)}),s}function r(e){var t=document.createElement("script");t.src=e,t.defer=!0,document.head.appendChild(t)}a.supports={everything:!0,everythingExceptFlag:!0},new Promise(t=>{let n=function(){try{var e=JSON.parse(sessionStorage.getItem(o));if("object"==typeof e&&"number"==typeof e.timestamp&&(new Date).valueOf()<e.timestamp+604800&&"object"==typeof e.supportTests)return e.supportTests}catch(e){}return null}();if(!n){if("undefined"!=typeof Worker&&"undefined"!=typeof OffscreenCanvas&&"undefined"!=typeof URL&&URL.createObjectURL&&"undefined"!=typeof Blob)try{var e="postMessage("+f.toString()+"("+[JSON.stringify(s),u.toString(),c.toString(),p.toString()].join(",")+"));",a=new Blob([e],{type:"text/javascript"});const r=new Worker(URL.createObjectURL(a),{name:"wpTestEmojiSupports"});return void(r.onmessage=e=>{i(n=e.data),r.terminate(),t(n)})}catch(e){}i(n=f(s,u,c,p))}t(n)}).then(e=>{for(const n in e)a.supports[n]=e[n],a.supports.everything=a.supports.everything&&a.supports[n],"flag"!==n&&(a.supports.everythingExceptFlag=a.supports.everythingExceptFlag&&a.supports[n]);var t;a.supports.everythingExceptFlag=a.supports.everythingExceptFlag&&!a.supports.flag,a.supports.everything||((t=a.source||{}).concatemoji?r(t.concatemoji):t.wpemoji&&t.twemoji&&(r(t.twemoji),r(t.wpemoji)))});                                                                                                                                                                                      wp-emoji-release.min.js                                                                             0000644                 00000054352 15212564050 0011042 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
// Source: wp-includes/js/twemoji.min.js
var twemoji=function(){"use strict";var h={base:"https://cdn.jsdelivr.net/gh/jdecked/twemoji@17.0.1/assets/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:function(d){d="string"==typeof d?parseInt(d,16):d;if(d<65536)return e(d);return e(55296+((d-=65536)>>10),56320+(1023&d))},toCodePoint:o},onerror:function(){this.parentNode&&this.parentNode.replaceChild(x(this.alt,!1),this)},parse:function(d,u){u&&"function"!=typeof u||(u={callback:u});return h.doNotParse=u.doNotParse,("string"==typeof d?function(d,a){return n(d,function(d){var u,f,c=d,e=N(d),b=a.callback(e,a);if(e&&b){for(f in c="<img ".concat('class="',a.className,'" ','draggable="false" ','alt="',d,'"',' src="',b,'"'),u=a.attributes(d,e))u.hasOwnProperty(f)&&0!==f.indexOf("on")&&-1===c.indexOf(" "+f+"=")&&(c=c.concat(" ",f,'="',u[f].replace(t,r),'"'));c=c.concat("/>")}return c})}:function(d,u){var f,c,e,b,a,t,r,n,o,s,i,l=function d(u,f){var c,e,b=u.childNodes,a=b.length;for(;a--;)c=b[a],3===(e=c.nodeType)?f.push(c):1!==e||"ownerSVGElement"in c||m.test(c.nodeName.toLowerCase())||h.doNotParse&&h.doNotParse(c)||d(c,f);return f}(d,[]),p=l.length;for(;p--;){for(e=!1,b=document.createDocumentFragment(),a=l[p],t=a.nodeValue,r=0;o=g.exec(t);){if((i=o.index)!==r&&b.appendChild(x(t.slice(r,i),!0)),s=N(o=o[0]),r=i+o.length,i=u.callback(s,u),s&&i){for(c in(n=new Image).onerror=u.onerror,n.setAttribute("draggable","false"),f=u.attributes(o,s))f.hasOwnProperty(c)&&0!==c.indexOf("on")&&!n.hasAttribute(c)&&n.setAttribute(c,f[c]);n.className=u.className,n.alt=o,n.src=i,e=!0,b.appendChild(n)}n||b.appendChild(x(o,!1)),n=null}e&&(r<t.length&&b.appendChild(x(t.slice(r),!0)),a.parentNode.replaceChild(b,a))}return d})(d,{callback:u.callback||b,attributes:"function"==typeof u.attributes?u.attributes:a,base:("string"==typeof u.base?u:h).base,ext:u.ext||h.ext,size:u.folder||function(d){return"number"==typeof d?d+"x"+d:d}(u.size||h.size),className:u.className||h.className,onerror:u.onerror||h.onerror})},replace:n,test:function(d){g.lastIndex=0;d=g.test(d);return g.lastIndex=0,d}},u={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},g=/(?:\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83d\udc30\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udeef\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83d\udc30\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udeef\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83d\udc30\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udeef\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83d\udc30\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udeef\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83d\udc30\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udeef\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83d\udc30\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udeef\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83d\udc30\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udeef\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83d\udc30\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udeef\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83d\udc30\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udeef\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83d\udc30\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udeef\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83d\udc30\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udeef\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83d\udc30\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udeef\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83d\udc30\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udeef\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83d\udc30\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udeef\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udfff\u200d\ud83d\udc30\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udeef\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83e\udef1\ud83c\udffb\u200d\ud83e\udef2\ud83c[\udffc-\udfff]|\ud83e\udef1\ud83c\udffc\u200d\ud83e\udef2\ud83c[\udffb\udffd-\udfff]|\ud83e\udef1\ud83c\udffd\u200d\ud83e\udef2\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\udef1\ud83c\udffe\u200d\ud83e\udef2\ud83c[\udffb-\udffd\udfff]|\ud83e\udef1\ud83c\udfff\u200d\ud83e\udef2\ud83c[\udffb-\udffe]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6f\ud83c\udffb\u200d\u2640\ufe0f|\ud83d\udc6f\ud83c\udffb\u200d\u2642\ufe0f|\ud83d\udc6f\ud83c\udffc\u200d\u2640\ufe0f|\ud83d\udc6f\ud83c\udffc\u200d\u2642\ufe0f|\ud83d\udc6f\ud83c\udffd\u200d\u2640\ufe0f|\ud83d\udc6f\ud83c\udffd\u200d\u2642\ufe0f|\ud83d\udc6f\ud83c\udffe\u200d\u2640\ufe0f|\ud83d\udc6f\ud83c\udffe\u200d\u2642\ufe0f|\ud83d\udc6f\ud83c\udfff\u200d\u2640\ufe0f|\ud83d\udc6f\ud83c\udfff\u200d\u2642\ufe0f|\ud83e\udd3c\ud83c\udffb\u200d\u2640\ufe0f|\ud83e\udd3c\ud83c\udffb\u200d\u2642\ufe0f|\ud83e\udd3c\ud83c\udffc\u200d\u2640\ufe0f|\ud83e\udd3c\ud83c\udffc\u200d\u2642\ufe0f|\ud83e\udd3c\ud83c\udffd\u200d\u2640\ufe0f|\ud83e\udd3c\ud83c\udffd\u200d\u2642\ufe0f|\ud83e\udd3c\ud83c\udffe\u200d\u2640\ufe0f|\ud83e\udd3c\ud83c\udffe\u200d\u2642\ufe0f|\ud83e\udd3c\ud83c\udfff\u200d\u2640\ufe0f|\ud83e\udd3c\ud83c\udfff\u200d\u2642\ufe0f|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d\udc6f\ud83c[\udffb-\udfff]|\ud83d\udc8f\ud83c[\udffb-\udfff]|\ud83d\udc91\ud83c[\udffb-\udfff]|\ud83e\udd1d\ud83c[\udffb-\udfff]|\ud83e\udd3c\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d\udc6f\udc8f\udc91]|\ud83e[\udd1d\udd3c])|(?:\ud83d[\udc68\udc69]|\ud83e\uddd1)(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf7c\udf84\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd\ude70])(?:\u200d\u27a1\ufe0f)?|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f(?:\u200d\u27a1\ufe0f)?)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc70\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd4\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f(?:\u200d\u27a1\ufe0f)?|(?:\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83e\uddd1\u200d\ud83e\uddd1\u200d\ud83e\uddd2\u200d\ud83e\uddd2|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83e\uddd1\u200d\ud83e\uddd1\u200d\ud83e\uddd2|\ud83e\uddd1\u200d\ud83e\uddd2\u200d\ud83e\uddd2|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83d\ude36\u200d\ud83c\udf2b\ufe0f|\u26d3\ufe0f\u200d\ud83d\udca5|\u2764\ufe0f\u200d\ud83d\udd25|\u2764\ufe0f\u200d\ud83e\ude79|\ud83c\udf44\u200d\ud83d\udfeb|\ud83c\udf4b\u200d\ud83d\udfe9|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc26\u200d\ud83d\udd25|\ud83d\udc3b\u200d\u2744\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\ude2e\u200d\ud83d\udca8|\ud83d\ude35\u200d\ud83d\udcab|\ud83d\ude42\u200d\u2194\ufe0f|\ud83d\ude42\u200d\u2195\ufe0f|\ud83e\uddd1\u200d\ud83e\uddd2|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|\ud83d\udc08\u200d\u2b1b|\ud83d\udc26\u200d\u2b1b)|[#*0-9]\ufe0f?\u20e3|(?:[\xa9\xae\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|\ud83e\udef0|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c\udfc3|\ud83d\udeb6|\ud83e\uddce)(?:\ud83c[\udffb-\udfff])?(?:\u200d\u27a1\ufe0f)?|(?:\ud83c[\udf85\udfc2\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4\udeb5\udec0\udecc]|\ud83e[\udd0c\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\udd77\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd\uddcf\uddd1-\udddd\udec3-\udec5\udef1-\udef8]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udc8e\udc90\udc92-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5-\uded8\udedc-\udedf\udeeb\udeec\udef4-\udefc\udfe0-\udfeb\udff0]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd20-\udd25\udd27-\udd2f\udd3a\udd3f-\udd45\udd47-\udd76\udd78-\uddb4\uddb7\uddba\uddbc-\uddcc\uddd0\uddde-\uddff\ude70-\ude7c\ude80-\ude8a\ude8e-\udec2\udec6\udec8\udecd-\udedc\udedf-\udeea\udeef]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g,f=/\uFE0F/g,c=String.fromCharCode(8205),t=/[&<>'"]/g,m=/^(?:iframe|noframes|noscript|script|select|style|textarea)$/,e=String.fromCharCode;return h;function x(d,u){return document.createTextNode(u?d.replace(f,""):d)}function b(d,u){return"".concat(u.base,u.size,"/",d,u.ext)}function N(d){return o(d.indexOf(c)<0?d.replace(f,""):d)}function r(d){return u[d]}function a(){return null}function n(d,u){return String(d).replace(g,u)}function o(d,u){for(var f=[],c=0,e=0,b=0;b<d.length;)c=d.charCodeAt(b++),e?(f.push((65536+(e-55296<<10)+(c-56320)).toString(16)),e=0):55296<=c&&c<=56319?e=c:f.push(c.toString(16));return f.join(u||"-")}}();
// Source: wp-includes/js/wp-emoji.min.js
!function(c,l){c.wp=c.wp||{},c.wp.emoji=new function(){var n,e,t=c.MutationObserver||c.WebKitMutationObserver||c.MozMutationObserver,r=c.document,a=!1,o=0,i=0<c.navigator.userAgent.indexOf("Trident/7.0");function s(){return!r.implementation.hasFeature||r.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1")}function d(u){return!!u&&(/[\uDC00-\uDFFF]/.test(u)||/[\u203C\u2049\u20E3\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2300\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692\u2693\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753\u2754\u2755\u2757\u2763\u2764\u2795\u2796\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05\u2B06\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]/.test(u))}function f(u,e){var t;return!l.supports.everything&&n&&u&&("string"==typeof u||u.childNodes&&u.childNodes.length)?(e=e||{},t={base:s()?l.svgUrl:l.baseUrl,ext:s()?l.svgExt:l.ext,className:e.className||"emoji",callback:function(u,e){switch(u){case"a9":case"ae":case"2122":case"2194":case"2660":case"2663":case"2665":case"2666":return!1}return!(l.supports.everythingExceptFlag&&!/^1f1(?:e[6-9a-f]|f[0-9a-f])-1f1(?:e[6-9a-f]|f[0-9a-f])$/.test(u)&&!/^(1f3f3-fe0f-200d-1f308|1f3f4-200d-2620-fe0f)$/.test(u))&&"".concat(e.base,u,e.ext)},attributes:function(){return{role:"img"}},onerror:function(){n.parentNode&&(this.setAttribute("data-error","load-failed"),n.parentNode.replaceChild(r.createTextNode(n.alt),n))},doNotParse:function(u){return!(!u||!u.className||"string"!=typeof u.className||-1===u.className.indexOf("wp-exclude-emoji"))}},"object"==typeof e.imgAttr&&(t.attributes=function(){return e.imgAttr}),n.parse(u,t)):u}return function u(){if(!a){if(void 0===c.twemoji)return 600<o?void 0:(c.clearTimeout(e),e=c.setTimeout(u,50),void o++);n=c.twemoji,a=!0,t&&new t(function(u){for(var e,t,n,r,a=u.length;a--;){if(e=u[a].addedNodes,t=u[a].removedNodes,1===(n=e.length)&&1===t.length&&3===e[0].nodeType&&"IMG"===t[0].nodeName&&e[0].data===t[0].alt&&"load-failed"===t[0].getAttribute("data-error"))return;for(;n--;){if(3===(r=e[n]).nodeType){if(!r.parentNode)continue;if(i)for(;r.nextSibling&&3===r.nextSibling.nodeType;)r.nodeValue=r.nodeValue+r.nextSibling.nodeValue,r.parentNode.removeChild(r.nextSibling);r=r.parentNode}d(r.textContent)&&f(r)}}}).observe(r.body,{childList:!0,subtree:!0}),f(r.body)}}(),{parse:f,test:d}}}(window,window._wpemojiSettings);                                                                                                                                                                                                                                                                                      wp-emoji.js                                                                                         0000644                 00000021130 15212564050 0006626 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * wp-emoji.js is used to replace emoji with images in browsers when the browser
 * doesn't support emoji natively.
 *
 * @output wp-includes/js/wp-emoji.js
 */

( function( window, settings ) {
	/**
	 * Replaces emoji with images when browsers don't support emoji.
	 *
	 * @since 4.2.0
	 * @access private
	 *
	 * @class
	 *
	 * @see  Twitter Emoji library
	 * @link https://github.com/twitter/twemoji
	 *
	 * @return {Object} The wpEmoji parse and test functions.
	 */
	function wpEmoji() {
		var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver,

		// Compression and maintain local scope.
		document = window.document,

		// Private.
		twemoji, timer,
		loaded = false,
		count = 0,
		ie11 = window.navigator.userAgent.indexOf( 'Trident/7.0' ) > 0;

		/**
		 * Detect if the browser supports SVG.
		 *
		 * @since 4.6.0
		 * @private
		 *
		 * @see Modernizr
		 * @link https://github.com/Modernizr/Modernizr/blob/master/feature-detects/svg/asimg.js
		 *
		 * @return {boolean} True if the browser supports svg, false if not.
		 */
		function browserSupportsSvgAsImage() {
			if ( !! document.implementation.hasFeature ) {
				return document.implementation.hasFeature( 'http://www.w3.org/TR/SVG11/feature#Image', '1.1' );
			}

			// document.implementation.hasFeature is deprecated. It can be presumed
			// if future browsers remove it, the browser will support SVGs as images.
			return true;
		}

		/**
		 * Runs when the document load event is fired, so we can do our first parse of
		 * the page.
		 *
		 * Listens to all the DOM mutations and checks for added nodes that contain
		 * emoji characters and replaces those with twitter emoji images.
		 *
		 * @since 4.2.0
		 * @private
		 */
		function load() {
			if ( loaded ) {
				return;
			}

			// Ensure twemoji is available on the global window before proceeding.
			if ( typeof window.twemoji === 'undefined' ) {
				// Break if waiting for longer than 30 seconds.
				if ( count > 600 ) {
					return;
				}

				// Still waiting.
				window.clearTimeout( timer );
				timer = window.setTimeout( load, 50 );
				count++;

				return;
			}

			twemoji = window.twemoji;
			loaded = true;

			// Initialize the mutation observer, which checks all added nodes for
			// replaceable emoji characters.
			if ( MutationObserver ) {
				new MutationObserver( function( mutationRecords ) {
					var i = mutationRecords.length,
						addedNodes, removedNodes, ii, node;

					while ( i-- ) {
						addedNodes = mutationRecords[ i ].addedNodes;
						removedNodes = mutationRecords[ i ].removedNodes;
						ii = addedNodes.length;

						/*
						 * Checks if an image has been replaced by a text element
						 * with the same text as the alternate description of the replaced image.
						 * (presumably because the image could not be loaded).
						 * If it is, do absolutely nothing.
						 *
						 * Node type 3 is a TEXT_NODE.
						 *
						 * @link https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
						 */
						if (
							ii === 1 && removedNodes.length === 1 &&
							addedNodes[0].nodeType === 3 &&
							removedNodes[0].nodeName === 'IMG' &&
							addedNodes[0].data === removedNodes[0].alt &&
							'load-failed' === removedNodes[0].getAttribute( 'data-error' )
						) {
							return;
						}

						// Loop through all the added nodes.
						while ( ii-- ) {
							node = addedNodes[ ii ];

							// Node type 3 is a TEXT_NODE.
							if ( node.nodeType === 3 ) {
								if ( ! node.parentNode ) {
									continue;
								}

								if ( ie11 ) {
									/*
									 * IE 11's implementation of MutationObserver is buggy.
									 * It unnecessarily splits text nodes when it encounters a HTML
									 * template interpolation symbol ( "{{", for example ). So, we
									 * join the text nodes back together as a work-around.
									 *
									 * Node type 3 is a TEXT_NODE.
									 */
									while( node.nextSibling && 3 === node.nextSibling.nodeType ) {
										node.nodeValue = node.nodeValue + node.nextSibling.nodeValue;
										node.parentNode.removeChild( node.nextSibling );
									}
								}

								node = node.parentNode;
							}

							if ( test( node.textContent ) ) {
								parse( node );
							}
						}
					}
				} ).observe( document.body, {
					childList: true,
					subtree: true
				} );
			}

			parse( document.body );
		}

		/**
		 * Tests if a text string contains emoji characters.
		 *
		 * @since 4.3.0
		 *
		 * @memberOf wp.emoji
		 *
		 * @param {string} text The string to test.
		 *
		 * @return {boolean} Whether the string contains emoji characters.
		 */
		function test( text ) {
			// Single char. U+20E3 to detect keycaps. U+00A9 "copyright sign" and U+00AE "registered sign" not included.
			var single = /[\u203C\u2049\u20E3\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2300\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692\u2693\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753\u2754\u2755\u2757\u2763\u2764\u2795\u2796\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05\u2B06\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]/,
			// Surrogate pair range. Only tests for the second half.
			pair = /[\uDC00-\uDFFF]/;

			if ( text ) {
				return  pair.test( text ) || single.test( text );
			}

			return false;
		}

		/**
		 * Parses any emoji characters into Twemoji images.
		 *
		 * - When passed an element the emoji characters are replaced inline.
		 * - When passed a string the emoji characters are replaced and the result is
		 *   returned.
		 *
		 * @since 4.2.0
		 *
		 * @memberOf wp.emoji
		 *
		 * @param {HTMLElement|string} object The element or string to parse.
		 * @param {Object}             args   Additional options for Twemoji.
		 *
		 * @return {HTMLElement|string} A string where all emoji are now image tags of
		 *                              emoji. Or the element that was passed as the first argument.
		 */
		function parse( object, args ) {
			var params;

			/*
			 * If the browser has full support, twemoji is not loaded or our
			 * object is not what was expected, we do not parse anything.
			 */
			if ( settings.supports.everything || ! twemoji || ! object ||
				( 'string' !== typeof object && ( ! object.childNodes || ! object.childNodes.length ) ) ) {

				return object;
			}

			// Compose the params for the twitter emoji library.
			args = args || {};
			params = {
				base: browserSupportsSvgAsImage() ? settings.svgUrl : settings.baseUrl,
				ext:  browserSupportsSvgAsImage() ? settings.svgExt : settings.ext,
				className: args.className || 'emoji',
				callback: function( icon, options ) {
					// Ignore some standard characters that TinyMCE recommends in its character map.
					switch ( icon ) {
						case 'a9':
						case 'ae':
						case '2122':
						case '2194':
						case '2660':
						case '2663':
						case '2665':
						case '2666':
							return false;
					}

					if ( settings.supports.everythingExceptFlag &&
						! /^1f1(?:e[6-9a-f]|f[0-9a-f])-1f1(?:e[6-9a-f]|f[0-9a-f])$/.test( icon ) && // Country flags.
						! /^(1f3f3-fe0f-200d-1f308|1f3f4-200d-2620-fe0f)$/.test( icon )             // Rainbow and pirate flags.
					) {
						return false;
					}

					return ''.concat( options.base, icon, options.ext );
				},
				attributes: function() {
					return {
						role: 'img'
					};
				},
				onerror: function() {
					if ( twemoji.parentNode ) {
						this.setAttribute( 'data-error', 'load-failed' );
						twemoji.parentNode.replaceChild( document.createTextNode( twemoji.alt ), twemoji );
					}
				},
				doNotParse: function( node ) {
					if (
						node &&
						node.className &&
						typeof node.className === 'string' &&
						node.className.indexOf( 'wp-exclude-emoji' ) !== -1
					) {
						// Do not parse this node. Emojis will not be replaced in this node and all sub-nodes.
						return true;
					}

					return false;
				}
			};

			if ( typeof args.imgAttr === 'object' ) {
				params.attributes = function() {
					return args.imgAttr;
				};
			}

			return twemoji.parse( object, params );
		}

		load();

		return {
			parse: parse,
			test: test
		};
	}

	window.wp = window.wp || {};

	/**
	 * @namespace wp.emoji
	 */
	window.wp.emoji = new wpEmoji();

} )( window, window._wpemojiSettings );
                                                                                                                                                                                                                                                                                                                                                                                                                                        wp-emoji.min.js                                                                                     0000644                 00000005447 15212564050 0007425 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(c,l){c.wp=c.wp||{},c.wp.emoji=new function(){var n,e,t=c.MutationObserver||c.WebKitMutationObserver||c.MozMutationObserver,r=c.document,a=!1,o=0,i=0<c.navigator.userAgent.indexOf("Trident/7.0");function s(){return!r.implementation.hasFeature||r.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1")}function d(u){return!!u&&(/[\uDC00-\uDFFF]/.test(u)||/[\u203C\u2049\u20E3\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2300\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692\u2693\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753\u2754\u2755\u2757\u2763\u2764\u2795\u2796\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05\u2B06\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]/.test(u))}function f(u,e){var t;return!l.supports.everything&&n&&u&&("string"==typeof u||u.childNodes&&u.childNodes.length)?(e=e||{},t={base:s()?l.svgUrl:l.baseUrl,ext:s()?l.svgExt:l.ext,className:e.className||"emoji",callback:function(u,e){switch(u){case"a9":case"ae":case"2122":case"2194":case"2660":case"2663":case"2665":case"2666":return!1}return!(l.supports.everythingExceptFlag&&!/^1f1(?:e[6-9a-f]|f[0-9a-f])-1f1(?:e[6-9a-f]|f[0-9a-f])$/.test(u)&&!/^(1f3f3-fe0f-200d-1f308|1f3f4-200d-2620-fe0f)$/.test(u))&&"".concat(e.base,u,e.ext)},attributes:function(){return{role:"img"}},onerror:function(){n.parentNode&&(this.setAttribute("data-error","load-failed"),n.parentNode.replaceChild(r.createTextNode(n.alt),n))},doNotParse:function(u){return!(!u||!u.className||"string"!=typeof u.className||-1===u.className.indexOf("wp-exclude-emoji"))}},"object"==typeof e.imgAttr&&(t.attributes=function(){return e.imgAttr}),n.parse(u,t)):u}return function u(){if(!a){if(void 0===c.twemoji)return 600<o?void 0:(c.clearTimeout(e),e=c.setTimeout(u,50),void o++);n=c.twemoji,a=!0,t&&new t(function(u){for(var e,t,n,r,a=u.length;a--;){if(e=u[a].addedNodes,t=u[a].removedNodes,1===(n=e.length)&&1===t.length&&3===e[0].nodeType&&"IMG"===t[0].nodeName&&e[0].data===t[0].alt&&"load-failed"===t[0].getAttribute("data-error"))return;for(;n--;){if(3===(r=e[n]).nodeType){if(!r.parentNode)continue;if(i)for(;r.nextSibling&&3===r.nextSibling.nodeType;)r.nodeValue=r.nodeValue+r.nextSibling.nodeValue,r.parentNode.removeChild(r.nextSibling);r=r.parentNode}d(r.textContent)&&f(r)}}}).observe(r.body,{childList:!0,subtree:!0}),f(r.body)}}(),{parse:f,test:d}}}(window,window._wpemojiSettings);                                                                                                                                                                                                                         wp-list-revisions.js                                                                                0000644                 00000001712 15212564050 0010521 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/wp-list-revisions.js
 */

(function(w) {
	var init = function() {
		var pr = document.getElementById('post-revisions'),
		inputs = pr ? pr.getElementsByTagName('input') : [];
		pr.onclick = function() {
			var i, checkCount = 0, side;
			for ( i = 0; i < inputs.length; i++ ) {
				checkCount += inputs[i].checked ? 1 : 0;
				side = inputs[i].getAttribute('name');
				if ( ! inputs[i].checked &&
				( 'left' == side && 1 > checkCount || 'right' == side && 1 < checkCount && ( ! inputs[i-1] || ! inputs[i-1].checked ) ) &&
				! ( inputs[i+1] && inputs[i+1].checked && 'right' == inputs[i+1].getAttribute('name') ) )
					inputs[i].style.visibility = 'hidden';
				else if ( 'left' == side || 'right' == side )
					inputs[i].style.visibility = 'visible';
			}
		};
		pr.onclick();
	};
	if ( w && w.addEventListener )
		w.addEventListener('load', init, false);
	else if ( w && w.attachEvent )
		w.attachEvent('onload', init);
})(window);
                                                      wp-list-revisions.min.js                                                                            0000644                 00000001125 15212564050 0011301 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(e){function t(){var e=document.getElementById("post-revisions"),n=e?e.getElementsByTagName("input"):[];e.onclick=function(){for(var e,t=0,i=0;i<n.length;i++)t+=n[i].checked?1:0,e=n[i].getAttribute("name"),n[i].checked||!("left"==e&&t<1||"right"==e&&1<t&&(!n[i-1]||!n[i-1].checked))||n[i+1]&&n[i+1].checked&&"right"==n[i+1].getAttribute("name")?"left"!=e&&"right"!=e||(n[i].style.visibility="visible"):n[i].style.visibility="hidden"},e.onclick()}e&&e.addEventListener?e.addEventListener("load",t,!1):e&&e.attachEvent&&e.attachEvent("onload",t)}(window);                                                                                                                                                                                                                                                                                                                                                                                                                                           wp-lists.js                                                                                         0000644                 00000061343 15212564050 0006673 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/wp-lists.js
 */

/* global ajaxurl, wpAjax */

/**
 * @param {jQuery} $ jQuery object.
 */
( function( $ ) {
var functions = {
	add:     'ajaxAdd',
	del:     'ajaxDel',
	dim:     'ajaxDim',
	process: 'process',
	recolor: 'recolor'
}, wpList;

/**
 * @namespace
 */
wpList = {

	/**
	 * @member {object}
	 */
	settings: {

		/**
		 * URL for Ajax requests.
		 *
		 * @member {string}
		 */
		url: ajaxurl,

		/**
		 * The HTTP method to use for Ajax requests.
		 *
		 * @member {string}
		 */
		type: 'POST',

		/**
		 * ID of the element the parsed Ajax response will be stored in.
		 *
		 * @member {string}
		 */
		response: 'ajax-response',

		/**
		 * The type of list.
		 *
		 * @member {string}
		 */
		what: '',

		/**
		 * CSS class name for alternate styling.
		 *
		 * @member {string}
		 */
		alt: 'alternate',

		/**
		 * Offset to start alternate styling from.
		 *
		 * @member {number}
		 */
		altOffset: 0,

		/**
		 * Color used in animation when adding an element.
		 *
		 * Can be 'none' to disable the animation.
		 *
		 * @member {string}
		 */
		addColor: '#ffff33',

		/**
		 * Color used in animation when deleting an element.
		 *
		 * Can be 'none' to disable the animation.
		 *
		 * @member {string}
		 */
		delColor: '#faafaa',

		/**
		 * Color used in dim add animation.
		 *
		 * Can be 'none' to disable the animation.
		 *
		 * @member {string}
		 */
		dimAddColor: '#ffff33',

		/**
		 * Color used in dim delete animation.
		 *
		 * Can be 'none' to disable the animation.
		 *
		 * @member {string}
		 */
		dimDelColor: '#ff3333',

		/**
		 * Callback that's run before a request is made.
		 *
		 * @callback wpList~confirm
		 * @param {object}      this
		 * @param {HTMLElement} list            The list DOM element.
		 * @param {object}      settings        Settings for the current list.
		 * @param {string}      action          The type of action to perform: 'add', 'delete', or 'dim'.
		 * @param {string}      backgroundColor Background color of the list's DOM element.
		 * @return {boolean} Whether to proceed with the action or not.
		 */
		confirm: null,

		/**
		 * Callback that's run before an item gets added to the list.
		 *
		 * Allows to cancel the request.
		 *
		 * @callback wpList~addBefore
		 * @param {object} settings Settings for the Ajax request.
		 * @return {object|boolean} Settings for the Ajax request or false to abort.
		 */
		addBefore: null,

		/**
		 * Callback that's run after an item got added to the list.
		 *
		 * @callback wpList~addAfter
		 * @param {XML}    returnedResponse Raw response returned from the server.
		 * @param {object} settings         Settings for the Ajax request.
		 * @param {jqXHR}  settings.xml     jQuery XMLHttpRequest object.
		 * @param {string} settings.status  Status of the request: 'success', 'notmodified', 'nocontent', 'error',
		 *                                  'timeout', 'abort', or 'parsererror'.
		 * @param {object} settings.parsed  Parsed response object.
		 */
		addAfter: null,

		/**
		 * Callback that's run before an item gets deleted from the list.
		 *
		 * Allows to cancel the request.
		 *
		 * @callback wpList~delBefore
		 * @param {object}      settings Settings for the Ajax request.
		 * @param {HTMLElement} list     The list DOM element.
		 * @return {object|boolean} Settings for the Ajax request or false to abort.
		 */
		delBefore: null,

		/**
		 * Callback that's run after an item got deleted from the list.
		 *
		 * @callback wpList~delAfter
		 * @param {XML}    returnedResponse Raw response returned from the server.
		 * @param {object} settings         Settings for the Ajax request.
		 * @param {jqXHR}  settings.xml     jQuery XMLHttpRequest object.
		 * @param {string} settings.status  Status of the request: 'success', 'notmodified', 'nocontent', 'error',
		 *                                  'timeout', 'abort', or 'parsererror'.
		 * @param {object} settings.parsed  Parsed response object.
		 */
		delAfter: null,

		/**
		 * Callback that's run before an item gets dim'd.
		 *
		 * Allows to cancel the request.
		 *
		 * @callback wpList~dimBefore
		 * @param {object} settings Settings for the Ajax request.
		 * @return {object|boolean} Settings for the Ajax request or false to abort.
		 */
		dimBefore: null,

		/**
		 * Callback that's run after an item got dim'd.
		 *
		 * @callback wpList~dimAfter
		 * @param {XML}    returnedResponse Raw response returned from the server.
		 * @param {object} settings         Settings for the Ajax request.
		 * @param {jqXHR}  settings.xml     jQuery XMLHttpRequest object.
		 * @param {string} settings.status  Status of the request: 'success', 'notmodified', 'nocontent', 'error',
		 *                                  'timeout', 'abort', or 'parsererror'.
		 * @param {object} settings.parsed  Parsed response object.
		 */
		dimAfter: null
	},

	/**
	 * Finds a nonce.
	 *
	 * 1. Nonce in settings.
	 * 2. `_ajax_nonce` value in element's href attribute.
	 * 3. `_ajax_nonce` input field that is a descendant of element.
	 * 4. `_wpnonce` value in element's href attribute.
	 * 5. `_wpnonce` input field that is a descendant of element.
	 * 6. 0 if none can be found.
	 *
	 * @param {jQuery} element  Element that triggered the request.
	 * @param {Object} settings Settings for the Ajax request.
	 * @return {string|number} Nonce
	 */
	nonce: function( element, settings ) {
		var url      = wpAjax.unserialize( element.attr( 'href' ) ),
			$element = $( '#' + settings.element );

		return settings.nonce || url._ajax_nonce || $element.find( 'input[name="_ajax_nonce"]' ).val() || url._wpnonce || $element.find( 'input[name="_wpnonce"]' ).val() || 0;
	},

	/**
	 * Extract list item data from a DOM element.
	 *
	 * Example 1: data-wp-lists="delete:the-comment-list:comment-{comment_ID}:66cc66:unspam=1"
	 * Example 2: data-wp-lists="dim:the-comment-list:comment-{comment_ID}:unapproved:e7e7d3:e7e7d3:new=approved"
	 *
	 * Returns an unassociative array with the following data:
	 * data[0] - Data identifier: 'list', 'add', 'delete', or 'dim'.
	 * data[1] - ID of the corresponding list. If data[0] is 'list', the type of list ('comment', 'category', etc).
	 * data[2] - ID of the parent element of all inputs necessary for the request.
	 * data[3] - Hex color to be used in this request. If data[0] is 'dim', dim class.
	 * data[4] - Additional arguments in query syntax that are added to the request. Example: 'post_id=1234'.
	 *           If data[0] is 'dim', dim add color.
	 * data[5] - Only available if data[0] is 'dim', dim delete color.
	 * data[6] - Only available if data[0] is 'dim', additional arguments in query syntax that are added to the request.
	 *
	 * Result for Example 1:
	 * data[0] - delete
	 * data[1] - the-comment-list
	 * data[2] - comment-{comment_ID}
	 * data[3] - 66cc66
	 * data[4] - unspam=1
	 *
	 * @param {HTMLElement} element The DOM element.
	 * @param {string}      type    The type of data to look for: 'list', 'add', 'delete', or 'dim'.
	 * @return {Array} Extracted list item data.
	 */
	parseData: function( element, type ) {
		var data = [], wpListsData;

		try {
			wpListsData = $( element ).data( 'wp-lists' ) || '';
			wpListsData = wpListsData.match( new RegExp( type + ':[\\S]+' ) );

			if ( wpListsData ) {
				data = wpListsData[0].split( ':' );
			}
		} catch ( error ) {}

		return data;
	},

	/**
	 * Calls a confirm callback to verify the action that is about to be performed.
	 *
	 * @param {HTMLElement} list     The DOM element.
	 * @param {Object}      settings Settings for this list.
	 * @param {string}      action   The type of action to perform: 'add', 'delete', or 'dim'.
	 * @return {Object|boolean} Settings if confirmed, false if not.
	 */
	pre: function( list, settings, action ) {
		var $element, backgroundColor, confirmed;

		settings = $.extend( {}, this.wpList.settings, {
			element: null,
			nonce:   0,
			target:  list.get( 0 )
		}, settings || {} );

		if ( typeof settings.confirm === 'function' ) {
			$element = $( '#' + settings.element );

			if ( 'add' !== action ) {
				backgroundColor = $element.css( 'backgroundColor' );
				$element.css( 'backgroundColor', '#ff9966' );
			}

			confirmed = settings.confirm.call( this, list, settings, action, backgroundColor );

			if ( 'add' !== action ) {
				$element.css( 'backgroundColor', backgroundColor );
			}

			if ( ! confirmed ) {
				return false;
			}
		}

		return settings;
	},

	/**
	 * Adds an item to the list via Ajax.
	 *
	 * @param {HTMLElement} element  The DOM element.
	 * @param {Object}      settings Settings for this list.
	 * @return {boolean} Whether the item was added.
	 */
	ajaxAdd: function( element, settings ) {
		var list     = this,
			$element = $( element ),
			data     = wpList.parseData( $element, 'add' ),
			formValues, formData, parsedResponse, returnedResponse;

		settings = settings || {};
		settings = wpList.pre.call( list, $element, settings, 'add' );

		settings.element  = data[2] || $element.prop( 'id' ) || settings.element || null;
		settings.addColor = data[3] ? '#' + data[3] : settings.addColor;

		if ( ! settings ) {
			return false;
		}

		if ( ! $element.is( '[id="' + settings.element + '-submit"]' ) ) {
			return ! wpList.add.call( list, $element, settings );
		}

		if ( ! settings.element ) {
			return true;
		}

		settings.action = 'add-' + settings.what;
		settings.nonce  = wpList.nonce( $element, settings );

		if ( ! wpAjax.validateForm( '#' + settings.element ) ) {
			return false;
		}

		settings.data = $.param( $.extend( {
			_ajax_nonce: settings.nonce,
			action:      settings.action
		}, wpAjax.unserialize( data[4] || '' ) ) );

		formValues = $( '#' + settings.element + ' :input' ).not( '[name="_ajax_nonce"], [name="_wpnonce"], [name="action"]' );
		formData   = typeof formValues.fieldSerialize === 'function' ? formValues.fieldSerialize() : formValues.serialize();

		if ( formData ) {
			settings.data += '&' + formData;
		}

		if ( typeof settings.addBefore === 'function' ) {
			settings = settings.addBefore( settings );

			if ( ! settings ) {
				return true;
			}
		}

		if ( ! settings.data.match( /_ajax_nonce=[a-f0-9]+/ ) ) {
			return true;
		}

		settings.success = function( response ) {
			parsedResponse   = wpAjax.parseAjaxResponse( response, settings.response, settings.element );
			returnedResponse = response;

			if ( ! parsedResponse || parsedResponse.errors ) {
				return false;
			}

			if ( true === parsedResponse ) {
				return true;
			}

			$.each( parsedResponse.responses, function() {
				wpList.add.call( list, this.data, $.extend( {}, settings, { // this.firstChild.nodevalue
					position: this.position || 0,
					id:       this.id || 0,
					oldId:    this.oldId || null
				} ) );
			} );

			list.wpList.recolor();
			$( list ).trigger( 'wpListAddEnd', [ settings, list.wpList ] );
			wpList.clear.call( list, '#' + settings.element );
		};

		settings.complete = function( jqXHR, status ) {
			if ( typeof settings.addAfter === 'function' ) {
				settings.addAfter( returnedResponse, $.extend( {
					xml:    jqXHR,
					status: status,
					parsed: parsedResponse
				}, settings ) );
			}
		};

		$.ajax( settings );

		return false;
	},

	/**
	 * Delete an item in the list via Ajax.
	 *
	 * @param {HTMLElement} element  A DOM element containing item data.
	 * @param {Object}      settings Settings for this list.
	 * @return {boolean} Whether the item was deleted.
	 */
	ajaxDel: function( element, settings ) {
		var list     = this,
			$element = $( element ),
			data     = wpList.parseData( $element, 'delete' ),
			$eventTarget, parsedResponse, returnedResponse;

		settings = settings || {};
		settings = wpList.pre.call( list, $element, settings, 'delete' );

		settings.element  = data[2] || settings.element || null;
		settings.delColor = data[3] ? '#' + data[3] : settings.delColor;

		if ( ! settings || ! settings.element ) {
			return false;
		}

		settings.action = 'delete-' + settings.what;
		settings.nonce  = wpList.nonce( $element, settings );

		settings.data = $.extend( {
			_ajax_nonce: settings.nonce,
			action:      settings.action,
			id:          settings.element.split( '-' ).pop()
		}, wpAjax.unserialize( data[4] || '' ) );

		if ( typeof settings.delBefore === 'function' ) {
			settings = settings.delBefore( settings, list );

			if ( ! settings ) {
				return true;
			}
		}

		if ( ! settings.data._ajax_nonce ) {
			return true;
		}

		$eventTarget = $( '#' + settings.element );

		if ( 'none' !== settings.delColor ) {
			$eventTarget.css( 'backgroundColor', settings.delColor ).fadeOut( 350, function() {
				list.wpList.recolor();
				$( list ).trigger( 'wpListDelEnd', [ settings, list.wpList ] );
			} );
		} else {
			list.wpList.recolor();
			$( list ).trigger( 'wpListDelEnd', [ settings, list.wpList ] );
		}

		settings.success = function( response ) {
			parsedResponse   = wpAjax.parseAjaxResponse( response, settings.response, settings.element );
			returnedResponse = response;

			if ( ! parsedResponse || parsedResponse.errors ) {
				$eventTarget.stop().stop().css( 'backgroundColor', '#faa' ).show().queue( function() {
					list.wpList.recolor();
					$( this ).dequeue();
				} );

				return false;
			}
		};

		settings.complete = function( jqXHR, status ) {
			if ( typeof settings.delAfter === 'function' ) {
				$eventTarget.queue( function() {
					settings.delAfter( returnedResponse, $.extend( {
						xml:    jqXHR,
						status: status,
						parsed: parsedResponse
					}, settings ) );
				} ).dequeue();
			}
		};

		$.ajax( settings );

		return false;
	},

	/**
	 * Dim an item in the list via Ajax.
	 *
	 * @param {HTMLElement} element  A DOM element containing item data.
	 * @param {Object}      settings Settings for this list.
	 * @return {boolean} Whether the item was dim'ed.
	 */
	ajaxDim: function( element, settings ) {
		var list     = this,
			$element = $( element ),
			data     = wpList.parseData( $element, 'dim' ),
			$eventTarget, isClass, color, dimColor, parsedResponse, returnedResponse;

		// Prevent hidden links from being clicked by hotkeys.
		if ( 'none' === $element.parent().css( 'display' ) ) {
			return false;
		}

		settings = settings || {};
		settings = wpList.pre.call( list, $element, settings, 'dim' );

		settings.element     = data[2] || settings.element || null;
		settings.dimClass    = data[3] || settings.dimClass || null;
		settings.dimAddColor = data[4] ? '#' + data[4] : settings.dimAddColor;
		settings.dimDelColor = data[5] ? '#' + data[5] : settings.dimDelColor;

		if ( ! settings || ! settings.element || ! settings.dimClass ) {
			return true;
		}

		settings.action = 'dim-' + settings.what;
		settings.nonce  = wpList.nonce( $element, settings );

		settings.data = $.extend( {
			_ajax_nonce: settings.nonce,
			action:      settings.action,
			id:          settings.element.split( '-' ).pop(),
			dimClass:    settings.dimClass
		}, wpAjax.unserialize( data[6] || '' ) );

		if ( typeof settings.dimBefore === 'function' ) {
			settings = settings.dimBefore( settings );

			if ( ! settings ) {
				return true;
			}
		}

		$eventTarget = $( '#' + settings.element );
		isClass      = $eventTarget.toggleClass( settings.dimClass ).is( '.' + settings.dimClass );
		color        = wpList.getColor( $eventTarget );
		dimColor     = isClass ? settings.dimAddColor : settings.dimDelColor;
		$eventTarget.toggleClass( settings.dimClass );

		if ( 'none' !== dimColor ) {
			$eventTarget
				.animate( { backgroundColor: dimColor }, 'fast' )
				.queue( function() {
					$eventTarget.toggleClass( settings.dimClass );
					$( this ).dequeue();
				} )
				.animate( { backgroundColor: color }, {
					complete: function() {
						$( this ).css( 'backgroundColor', '' );
						$( list ).trigger( 'wpListDimEnd', [ settings, list.wpList ] );
					}
				} );
		} else {
			$( list ).trigger( 'wpListDimEnd', [ settings, list.wpList ] );
		}

		if ( ! settings.data._ajax_nonce ) {
			return true;
		}

		settings.success = function( response ) {
			parsedResponse   = wpAjax.parseAjaxResponse( response, settings.response, settings.element );
			returnedResponse = response;

			if ( true === parsedResponse ) {
				return true;
			}

			if ( ! parsedResponse || parsedResponse.errors ) {
				$eventTarget.stop().stop().css( 'backgroundColor', '#ff3333' )[isClass ? 'removeClass' : 'addClass']( settings.dimClass ).show().queue( function() {
					list.wpList.recolor();
					$( this ).dequeue();
				} );

				return false;
			}

			/** @property {string} comment_link Link of the comment to be dimmed. */
			if ( 'undefined' !== typeof parsedResponse.responses[0].supplemental.comment_link ) {
				var $submittedOn = $element.find( '.submitted-on' ),
					$commentLink = $submittedOn.find( 'a' );

				// Comment is approved; link the date field.
				if ( '' !== parsedResponse.responses[0].supplemental.comment_link ) {
					$submittedOn.html( $('<a></a>').text( $submittedOn.text() ).prop( 'href', parsedResponse.responses[0].supplemental.comment_link ) );

				// Comment is not approved; unlink the date field.
				} else if ( $commentLink.length ) {
					$submittedOn.text( $commentLink.text() );
				}
			}
		};

		settings.complete = function( jqXHR, status ) {
			if ( typeof settings.dimAfter === 'function' ) {
				$eventTarget.queue( function() {
					settings.dimAfter( returnedResponse, $.extend( {
						xml:    jqXHR,
						status: status,
						parsed: parsedResponse
					}, settings ) );
				} ).dequeue();
			}
		};

		$.ajax( settings );

		return false;
	},

	/**
	 * Returns the background color of the passed element.
	 *
	 * @param {jQuery|string} element Element to check.
	 * @return {string} Background color value in HEX. Default: '#ffffff'.
	 */
	getColor: function( element ) {
		return $( element ).css( 'backgroundColor' ) || '#ffffff';
	},

	/**
	 * Adds something.
	 *
	 * @param {HTMLElement} element  A DOM element containing item data.
	 * @param {Object}      settings Settings for this list.
	 * @return {boolean} Whether the item was added.
	 */
	add: function( element, settings ) {
		var $list    = $( this ),
			$element = $( element ),
			old      = false,
			position, reference;

		if ( 'string' === typeof settings ) {
			settings = { what: settings };
		}

		settings = $.extend( { position: 0, id: 0, oldId: null }, this.wpList.settings, settings );

		if ( ! $element.length || ! settings.what ) {
			return false;
		}

		if ( settings.oldId ) {
			old = $( '#' + settings.what + '-' + settings.oldId );
		}

		if ( settings.id && ( settings.id !== settings.oldId || ! old || ! old.length ) ) {
			$( '#' + settings.what + '-' + settings.id ).remove();
		}

		if ( old && old.length ) {
			old.before( $element );
			old.remove();

		} else if ( isNaN( settings.position ) ) {
			position = 'after';

			if ( '-' === settings.position.substr( 0, 1 ) ) {
				settings.position = settings.position.substr( 1 );
				position = 'before';
			}

			reference = $list.find( '#' + settings.position );

			if ( 1 === reference.length ) {
				reference[position]( $element );
			} else {
				$list.append( $element );
			}

		} else if ( 'comment' !== settings.what || 0 === $( '#' + settings.element ).length ) {
			if ( settings.position < 0 ) {
				$list.prepend( $element );
			} else {
				$list.append( $element );
			}
		}

		if ( settings.alt ) {
			$element.toggleClass( settings.alt, ( $list.children( ':visible' ).index( $element[0] ) + settings.altOffset ) % 2 );
		}

		if ( 'none' !== settings.addColor ) {
			$element.css( 'backgroundColor', settings.addColor ).animate( { backgroundColor: wpList.getColor( $element ) }, {
				complete: function() {
					$( this ).css( 'backgroundColor', '' );
				}
			} );
		}

		// Add event handlers.
		$list.each( function( index, list ) {
			list.wpList.process( $element );
		} );

		return $element;
	},

	/**
	 * Clears all input fields within the element passed.
	 *
	 * @param {string} elementId ID of the element to check, including leading #.
	 */
	clear: function( elementId ) {
		var list     = this,
			$element = $( elementId ),
			type, tagName;

		// Bail if we're within the list.
		if ( list.wpList && $element.parents( '#' + list.id ).length ) {
			return;
		}

		// Check each input field.
		$element.find( ':input' ).each( function( index, input ) {

			// Bail if the form was marked to not to be cleared.
			if ( $( input ).parents( '.form-no-clear' ).length ) {
				return;
			}

			type    = input.type.toLowerCase();
			tagName = input.tagName.toLowerCase();

			if ( 'text' === type || 'password' === type || 'textarea' === tagName ) {
				input.value = '';

			} else if ( 'checkbox' === type || 'radio' === type ) {
				input.checked = false;

			} else if ( 'select' === tagName ) {
				input.selectedIndex = null;
			}
		} );
	},

	/**
	 * Registers event handlers to add, delete, and dim items.
	 *
	 * @param {string} elementId
	 */
	process: function( elementId ) {
		var list     = this,
			$element = $( elementId || document );

		$element.on( 'submit', 'form[data-wp-lists^="add:' + list.id + ':"]', function() {
			return list.wpList.add( this );
		} );

		$element.on( 'click', '[data-wp-lists^="add:' + list.id + ':"], input[data-wp-lists^="add:' + list.id + ':"]', function() {
			return list.wpList.add( this );
		} );

		$element.on( 'click', '[data-wp-lists^="delete:' + list.id + ':"]', function() {
			return list.wpList.del( this );
		} );

		$element.on( 'click', '[data-wp-lists^="dim:' + list.id + ':"]', function() {
			return list.wpList.dim( this );
		} );
	},

	/**
	 * Updates list item background colors.
	 */
	recolor: function() {
		var list    = this,
			evenOdd = [':even', ':odd'],
			items;

		// Bail if there is no alternate class name specified.
		if ( ! list.wpList.settings.alt ) {
			return;
		}

		items = $( '.list-item:visible', list );

		if ( ! items.length ) {
			items = $( list ).children( ':visible' );
		}

		if ( list.wpList.settings.altOffset % 2 ) {
			evenOdd.reverse();
		}

		items.filter( evenOdd[0] ).addClass( list.wpList.settings.alt ).end();
		items.filter( evenOdd[1] ).removeClass( list.wpList.settings.alt );
	},

	/**
	 * Sets up `process()` and `recolor()` functions.
	 */
	init: function() {
		var $list = this;

		$list.wpList.process = function( element ) {
			$list.each( function() {
				this.wpList.process( element );
			} );
		};

		$list.wpList.recolor = function() {
			$list.each( function() {
				this.wpList.recolor();
			} );
		};
	}
};

/**
 * Initializes wpList object.
 *
 * @param {Object}           settings
 * @param {string}           settings.url         URL for ajax calls. Default: ajaxurl.
 * @param {string}           settings.type        The HTTP method to use for Ajax requests. Default: 'POST'.
 * @param {string}           settings.response    ID of the element the parsed ajax response will be stored in.
 *                                                Default: 'ajax-response'.
 *
 * @param {string}           settings.what        Default: ''.
 * @param {string}           settings.alt         CSS class name for alternate styling. Default: 'alternate'.
 * @param {number}           settings.altOffset   Offset to start alternate styling from. Default: 0.
 * @param {string}           settings.addColor    Hex code or 'none' to disable animation. Default: '#ffff33'.
 * @param {string}           settings.delColor    Hex code or 'none' to disable animation. Default: '#faafaa'.
 * @param {string}           settings.dimAddColor Hex code or 'none' to disable animation. Default: '#ffff33'.
 * @param {string}           settings.dimDelColor Hex code or 'none' to disable animation. Default: '#ff3333'.
 *
 * @param {wpList~confirm}   settings.confirm     Callback that's run before a request is made. Default: null.
 * @param {wpList~addBefore} settings.addBefore   Callback that's run before an item gets added to the list.
 *                                                Default: null.
 * @param {wpList~addAfter}  settings.addAfter    Callback that's run after an item got added to the list.
 *                                                Default: null.
 * @param {wpList~delBefore} settings.delBefore   Callback that's run before an item gets deleted from the list.
 *                                                Default: null.
 * @param {wpList~delAfter}  settings.delAfter    Callback that's run after an item got deleted from the list.
 *                                                Default: null.
 * @param {wpList~dimBefore} settings.dimBefore   Callback that's run before an item gets dim'd. Default: null.
 * @param {wpList~dimAfter}  settings.dimAfter    Callback that's run after an item got dim'd. Default: null.
 * @return {$.fn} wpList API function.
 */
$.fn.wpList = function( settings ) {
	this.each( function( index, list ) {
		list.wpList = {
			settings: $.extend( {}, wpList.settings, { what: wpList.parseData( list, 'list' )[1] || '' }, settings )
		};

		$.each( functions, function( func, callback ) {
			list.wpList[func] = function( element, setting ) {
				return wpList[callback].call( list, element, setting );
			};
		} );
	} );

	wpList.init.call( this );
	this.wpList.process();

	return this;
};
} ) ( jQuery );
                                                                                                                                                                                                                                                                                             wp-lists.min.js                                                                                     0000644                 00000016541 15212564050 0007455 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(d){var n={add:"ajaxAdd",del:"ajaxDel",dim:"ajaxDim",process:"process",recolor:"recolor"},c={settings:{url:ajaxurl,type:"POST",response:"ajax-response",what:"",alt:"alternate",altOffset:0,addColor:"#ffff33",delColor:"#faafaa",dimAddColor:"#ffff33",dimDelColor:"#ff3333",confirm:null,addBefore:null,addAfter:null,delBefore:null,delAfter:null,dimBefore:null,dimAfter:null},nonce:function(e,t){var e=wpAjax.unserialize(e.attr("href")),n=d("#"+t.element);return t.nonce||e._ajax_nonce||n.find('input[name="_ajax_nonce"]').val()||e._wpnonce||n.find('input[name="_wpnonce"]').val()||0},parseData:function(e,t){var n,o=[];try{(n=(n=d(e).data("wp-lists")||"").match(new RegExp(t+":[\\S]+")))&&(o=n[0].split(":"))}catch(e){}return o},pre:function(e,t,n){var o,i;return!("function"==typeof(t=d.extend({},this.wpList.settings,{element:null,nonce:0,target:e.get(0)},t||{})).confirm&&(o=d("#"+t.element),"add"!==n&&(i=o.css("backgroundColor"),o.css("backgroundColor","#ff9966")),e=t.confirm.call(this,e,t,n,i),"add"!==n&&o.css("backgroundColor",i),!e))&&t},ajaxAdd:function(e,n){var o,i,t=this,e=d(e),a=c.parseData(e,"add");if(n=n||{},(n=c.pre.call(t,e,n,"add")).element=a[2]||e.prop("id")||n.element||null,n.addColor=a[3]?"#"+a[3]:n.addColor,n){if(!e.is('[id="'+n.element+'-submit"]'))return!c.add.call(t,e,n);if(!n.element)return!0;if(n.action="add-"+n.what,n.nonce=c.nonce(e,n),wpAjax.validateForm("#"+n.element)){if(n.data=d.param(d.extend({_ajax_nonce:n.nonce,action:n.action},wpAjax.unserialize(a[4]||""))),(a="function"==typeof(e=d("#"+n.element+" :input").not('[name="_ajax_nonce"], [name="_wpnonce"], [name="action"]')).fieldSerialize?e.fieldSerialize():e.serialize())&&(n.data+="&"+a),"function"==typeof n.addBefore&&!(n=n.addBefore(n)))return!0;if(!n.data.match(/_ajax_nonce=[a-f0-9]+/))return!0;n.success=function(e){return o=wpAjax.parseAjaxResponse(e,n.response,n.element),i=e,!(!o||o.errors)&&(!0===o||(d.each(o.responses,function(){c.add.call(t,this.data,d.extend({},n,{position:this.position||0,id:this.id||0,oldId:this.oldId||null}))}),t.wpList.recolor(),d(t).trigger("wpListAddEnd",[n,t.wpList]),void c.clear.call(t,"#"+n.element)))},n.complete=function(e,t){"function"==typeof n.addAfter&&n.addAfter(i,d.extend({xml:e,status:t,parsed:o},n))},d.ajax(n)}}return!1},ajaxDel:function(e,n){var o,i,a,t=this,e=d(e),s=c.parseData(e,"delete");if(n=n||{},(n=c.pre.call(t,e,n,"delete")).element=s[2]||n.element||null,n.delColor=s[3]?"#"+s[3]:n.delColor,n&&n.element){if(n.action="delete-"+n.what,n.nonce=c.nonce(e,n),n.data=d.extend({_ajax_nonce:n.nonce,action:n.action,id:n.element.split("-").pop()},wpAjax.unserialize(s[4]||"")),"function"==typeof n.delBefore&&!(n=n.delBefore(n,t)))return!0;if(!n.data._ajax_nonce)return!0;o=d("#"+n.element),"none"!==n.delColor?o.css("backgroundColor",n.delColor).fadeOut(350,function(){t.wpList.recolor(),d(t).trigger("wpListDelEnd",[n,t.wpList])}):(t.wpList.recolor(),d(t).trigger("wpListDelEnd",[n,t.wpList])),n.success=function(e){if(i=wpAjax.parseAjaxResponse(e,n.response,n.element),a=e,!i||i.errors)return o.stop().stop().css("backgroundColor","#faa").show().queue(function(){t.wpList.recolor(),d(this).dequeue()}),!1},n.complete=function(e,t){"function"==typeof n.delAfter&&o.queue(function(){n.delAfter(a,d.extend({xml:e,status:t,parsed:i},n))}).dequeue()},d.ajax(n)}return!1},ajaxDim:function(e,n){var o,i,t,a,s,r=this,l=d(e),e=c.parseData(l,"dim");if("none"!==l.parent().css("display")){if(n=n||{},(n=c.pre.call(r,l,n,"dim")).element=e[2]||n.element||null,n.dimClass=e[3]||n.dimClass||null,n.dimAddColor=e[4]?"#"+e[4]:n.dimAddColor,n.dimDelColor=e[5]?"#"+e[5]:n.dimDelColor,!n||!n.element||!n.dimClass)return!0;if(n.action="dim-"+n.what,n.nonce=c.nonce(l,n),n.data=d.extend({_ajax_nonce:n.nonce,action:n.action,id:n.element.split("-").pop(),dimClass:n.dimClass},wpAjax.unserialize(e[6]||"")),"function"==typeof n.dimBefore&&!(n=n.dimBefore(n)))return!0;if(o=d("#"+n.element),i=o.toggleClass(n.dimClass).is("."+n.dimClass),e=c.getColor(o),t=i?n.dimAddColor:n.dimDelColor,o.toggleClass(n.dimClass),"none"!==t?o.animate({backgroundColor:t},"fast").queue(function(){o.toggleClass(n.dimClass),d(this).dequeue()}).animate({backgroundColor:e},{complete:function(){d(this).css("backgroundColor",""),d(r).trigger("wpListDimEnd",[n,r.wpList])}}):d(r).trigger("wpListDimEnd",[n,r.wpList]),!n.data._ajax_nonce)return!0;n.success=function(e){var t;return a=wpAjax.parseAjaxResponse(e,n.response,n.element),s=e,!0===a||(!a||a.errors?(o.stop().stop().css("backgroundColor","#ff3333")[i?"removeClass":"addClass"](n.dimClass).show().queue(function(){r.wpList.recolor(),d(this).dequeue()}),!1):void(void 0!==a.responses[0].supplemental.comment_link&&(t=(e=l.find(".submitted-on")).find("a"),""!==a.responses[0].supplemental.comment_link?e.html(d("<a></a>").text(e.text()).prop("href",a.responses[0].supplemental.comment_link)):t.length&&e.text(t.text()))))},n.complete=function(e,t){"function"==typeof n.dimAfter&&o.queue(function(){n.dimAfter(s,d.extend({xml:e,status:t,parsed:a},n))}).dequeue()},d.ajax(n)}return!1},getColor:function(e){return d(e).css("backgroundColor")||"#ffffff"},add:function(e,t){var n,o=d(this),i=d(e),e=!1;return t=d.extend({position:0,id:0,oldId:null},this.wpList.settings,t="string"==typeof t?{what:t}:t),!(!i.length||!t.what)&&(t.oldId&&(e=d("#"+t.what+"-"+t.oldId)),!t.id||t.id===t.oldId&&e&&e.length||d("#"+t.what+"-"+t.id).remove(),e&&e.length?(e.before(i),e.remove()):isNaN(t.position)?(e="after","-"===t.position.substr(0,1)&&(t.position=t.position.substr(1),e="before"),1===(n=o.find("#"+t.position)).length?n[e](i):o.append(i)):"comment"===t.what&&0!==d("#"+t.element).length||(t.position<0?o.prepend(i):o.append(i)),t.alt&&i.toggleClass(t.alt,(o.children(":visible").index(i[0])+t.altOffset)%2),"none"!==t.addColor&&i.css("backgroundColor",t.addColor).animate({backgroundColor:c.getColor(i)},{complete:function(){d(this).css("backgroundColor","")}}),o.each(function(e,t){t.wpList.process(i)}),i)},clear:function(e){var n,o,e=d(e);this.wpList&&e.parents("#"+this.id).length||e.find(":input").each(function(e,t){d(t).parents(".form-no-clear").length||(n=t.type.toLowerCase(),o=t.tagName.toLowerCase(),"text"===n||"password"===n||"textarea"===o?t.value="":"checkbox"===n||"radio"===n?t.checked=!1:"select"===o&&(t.selectedIndex=null))})},process:function(e){var t=this,e=d(e||document);e.on("submit",'form[data-wp-lists^="add:'+t.id+':"]',function(){return t.wpList.add(this)}),e.on("click",'[data-wp-lists^="add:'+t.id+':"], input[data-wp-lists^="add:'+t.id+':"]',function(){return t.wpList.add(this)}),e.on("click",'[data-wp-lists^="delete:'+t.id+':"]',function(){return t.wpList.del(this)}),e.on("click",'[data-wp-lists^="dim:'+t.id+':"]',function(){return t.wpList.dim(this)})},recolor:function(){var e,t=this,n=[":even",":odd"];t.wpList.settings.alt&&((e=d(".list-item:visible",t)).length||(e=d(t).children(":visible")),t.wpList.settings.altOffset%2&&n.reverse(),e.filter(n[0]).addClass(t.wpList.settings.alt).end(),e.filter(n[1]).removeClass(t.wpList.settings.alt))},init:function(){var t=this;t.wpList.process=function(e){t.each(function(){this.wpList.process(e)})},t.wpList.recolor=function(){t.each(function(){this.wpList.recolor()})}}};d.fn.wpList=function(t){return this.each(function(e,o){o.wpList={settings:d.extend({},c.settings,{what:c.parseData(o,"list")[1]||""},t)},d.each(n,function(e,n){o.wpList[e]=function(e,t){return c[n].call(o,e,t)}})}),c.init.call(this),this.wpList.process(),this}}(jQuery);                                                                                                                                                               wp-pointer.js                                                                                       0000644                 00000023771 15212564050 0007220 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/wp-pointer.js
 */

/**
 * Initializes the wp-pointer widget using jQuery UI Widget Factory.
 */
(function($){
	var identifier = 0,
		zindex = 9999;

	$.widget('wp.pointer',/** @lends $.widget.wp.pointer.prototype */{
		options: {
			pointerClass: 'wp-pointer',
			pointerWidth: 320,
			content: function() {
				return $(this).text();
			},
			buttons: function( event, t ) {
				var button = $('<a class="close" href="#"></a>').text( wp.i18n.__( 'Dismiss' ) );

				return button.on( 'click.pointer', function(e) {
					e.preventDefault();
					t.element.pointer('close');
				});
			},
			position: 'top',
			show: function( event, t ) {
				t.pointer.show();
				t.opened();
			},
			hide: function( event, t ) {
				t.pointer.hide();
				t.closed();
			},
			document: document
		},

		/**
		 * A class that represents a WordPress pointer.
		 *
		 * @since 3.3.0
		 * @private
		 *
		 * @constructs $.widget.wp.pointer
		 */
		_create: function() {
			var positioning,
				family;

			this.content = $('<div class="wp-pointer-content"></div>');
			this.arrow   = $('<div class="wp-pointer-arrow"><div class="wp-pointer-arrow-inner"></div></div>');

			family = this.element.parents().add( this.element );
			positioning = 'absolute';

			if ( family.filter(function(){ return 'fixed' === $(this).css('position'); }).length )
				positioning = 'fixed';

			this.pointer = $('<div />')
				.append( this.content )
				.append( this.arrow )
				.attr('id', 'wp-pointer-' + identifier++)
				.addClass( this.options.pointerClass )
				.css({'position': positioning, 'width': this.options.pointerWidth+'px', 'display': 'none'})
				.appendTo( this.options.document.body );
		},

		/**
		 * Sets an option on the pointer instance.
		 *
		 * There are 4 special values that do something extra:
		 *
		 * - `document`     will transfer the pointer to the body of the new document
		 *                  specified by the value.
		 * - `pointerClass` will change the class of the pointer element.
		 * - `position`     will reposition the pointer.
		 * - `content`      will update the content of the pointer.
		 *
		 * @since 3.3.0
		 * @private
		 *
		 * @param {string} key   The key of the option to set.
		 * @param {*}      value The value to set the option to.
		 */
		_setOption: function( key, value ) {
			var o   = this.options,
				tip = this.pointer;

			// Handle document transfer.
			if ( key === 'document' && value !== o.document ) {
				tip.detach().appendTo( value.body );

			// Handle class change.
			} else if ( key === 'pointerClass' ) {
				tip.removeClass( o.pointerClass ).addClass( value );
			}

			// Call super method.
			$.Widget.prototype._setOption.apply( this, arguments );

			// Reposition automatically.
			if ( key === 'position' ) {
				this.reposition();

			// Update content automatically if pointer is open.
			} else if ( key === 'content' && this.active ) {
				this.update();
			}
		},

		/**
		 * Removes the pointer element from of the DOM.
		 *
		 * Makes sure that the widget and all associated bindings are destroyed.
		 *
		 * @since 3.3.0
		 */
		destroy: function() {
			this.pointer.remove();
			$.Widget.prototype.destroy.call( this );
		},

		/**
		 * Returns the pointer element.
		 *
		 * @since 3.3.0
		 *
		 * @return {Object} Pointer The pointer object.
		 */
		widget: function() {
			return this.pointer;
		},

		/**
		 * Updates the content of the pointer.
		 *
		 * This function doesn't update the content of the pointer itself. That is done
		 * by the `_update` method. This method will make sure that the `_update` method
		 * is called with the right content.
		 *
		 * The content in the options can either be a string or a callback. If it is a
		 * callback the result of this callback is used as the content.
		 *
		 * @since 3.3.0
		 *
		 * @param {Object} event The event that caused the update.
		 *
		 * @return {Promise} Resolves when the update has been executed.
		 */
		update: function( event ) {
			var self = this,
				o    = this.options,
				dfd  = $.Deferred(),
				content;

			if ( o.disabled )
				return;

			dfd.done( function( content ) {
				self._update( event, content );
			});

			// Either o.content is a string...
			if ( typeof o.content === 'string' ) {
				content = o.content;

			// ...or o.content is a callback.
			} else {
				content = o.content.call( this.element[0], dfd.resolve, event, this._handoff() );
			}

			// If content is set, then complete the update.
			if ( content )
				dfd.resolve( content );

			return dfd.promise();
		},

		/**
		 * Updates the content of the pointer.
		 *
		 * Will make sure that the pointer is correctly positioned.
		 *
		 * @since 3.3.0
		 * @private
		 *
		 * @param {Object} event   The event that caused the update.
		 * @param {*}      content The content object. Either a string or a jQuery tree.
		 */
		_update: function( event, content ) {
			var buttons,
				o = this.options;

			if ( ! content )
				return;

			// Kill any animations on the pointer.
			this.pointer.stop();
			this.content.html( content );

			buttons = o.buttons.call( this.element[0], event, this._handoff() );
			if ( buttons ) {
				buttons.wrap('<div class="wp-pointer-buttons" />').parent().appendTo( this.content );
			}

			this.reposition();
		},

		/**
		 * Repositions the pointer.
		 *
		 * Makes sure the pointer is the correct size for its content and makes sure it
		 * is positioned to point to the right element.
		 *
		 * @since 3.3.0
		 */
		reposition: function() {
			var position;

			if ( this.options.disabled )
				return;

			position = this._processPosition( this.options.position );

			// Reposition pointer.
			this.pointer.css({
				top: 0,
				left: 0,
				zIndex: zindex++ // Increment the z-index so that it shows above other opened pointers.
			}).show().position($.extend({
				of: this.element,
				collision: 'fit none'
			}, position )); // The object comes before this.options.position so the user can override position.of.

			this.repoint();
		},

		/**
		 * Sets the arrow of the pointer to the correct side of the pointer element.
		 *
		 * @since 3.3.0
		 */
		repoint: function() {
			var o = this.options,
				edge;

			if ( o.disabled )
				return;

			edge = ( typeof o.position == 'string' ) ? o.position : o.position.edge;

			// Remove arrow classes.
			this.pointer[0].className = this.pointer[0].className.replace( /wp-pointer-[^\s'"]*/, '' );

			// Add arrow class.
			this.pointer.addClass( 'wp-pointer-' + edge );
		},

		/**
		 * Calculates the correct position based on a position in the settings.
		 *
		 * @since 3.3.0
		 * @private
		 *
		 * @param {string|Object} position Either a side of a pointer or an object
		 *                                 containing a pointer.
		 *
		 * @return {Object} result  An object containing position related data.
		 */
		_processPosition: function( position ) {
			var opposite = {
					top: 'bottom',
					bottom: 'top',
					left: 'right',
					right: 'left'
				},
				result;

			// If the position object is a string, it is shorthand for position.edge.
			if ( typeof position == 'string' ) {
				result = {
					edge: position + ''
				};
			} else {
				result = $.extend( {}, position );
			}

			if ( ! result.edge )
				return result;

			if ( result.edge == 'top' || result.edge == 'bottom' ) {
				result.align = result.align || 'left';

				result.at = result.at || result.align + ' ' + opposite[ result.edge ];
				result.my = result.my || result.align + ' ' + result.edge;
			} else {
				result.align = result.align || 'top';

				result.at = result.at || opposite[ result.edge ] + ' ' + result.align;
				result.my = result.my || result.edge + ' ' + result.align;
			}

			return result;
		},

		/**
		 * Opens the pointer.
		 *
		 * Only opens the pointer widget in case it is closed and not disabled, and
		 * calls 'update' before doing so. Calling update makes sure that the pointer
		 * is correctly sized and positioned.
		 *
		 * @since 3.3.0
		 *
		 * @param {Object} event The event that triggered the opening of this pointer.
		 */
		open: function( event ) {
			var self = this,
				o    = this.options;

			if ( this.active || o.disabled || this.element.is(':hidden') )
				return;

			this.update().done( function() {
				self._open( event );
			});
		},

		/**
		 * Opens and shows the pointer element.
		 *
		 * @since 3.3.0
		 * @private
		 *
		 * @param {Object} event An event object.
		 */
		_open: function( event ) {
			var self = this,
				o    = this.options;

			if ( this.active || o.disabled || this.element.is(':hidden') )
				return;

			this.active = true;

			this._trigger( 'open', event, this._handoff() );

			this._trigger( 'show', event, this._handoff({
				opened: function() {
					self._trigger( 'opened', event, self._handoff() );
				}
			}));
		},

		/**
		 * Closes and hides the pointer element.
		 *
		 * @since 3.3.0
		 *
		 * @param {Object} event An event object.
		 */
		close: function( event ) {
			if ( !this.active || this.options.disabled )
				return;

			var self = this;
			this.active = false;

			this._trigger( 'close', event, this._handoff() );
			this._trigger( 'hide', event, this._handoff({
				closed: function() {
					self._trigger( 'closed', event, self._handoff() );
				}
			}));
		},

		/**
		 * Puts the pointer on top by increasing the z-index.
		 *
		 * @since 3.3.0
		 */
		sendToTop: function() {
			if ( this.active )
				this.pointer.css( 'z-index', zindex++ );
		},

		/**
		 * Toggles the element between shown and hidden.
		 *
		 * @since 3.3.0
		 *
		 * @param {Object} event An event object.
		 */
		toggle: function( event ) {
			if ( this.pointer.is(':hidden') )
				this.open( event );
			else
				this.close( event );
		},

		/**
		 * Extends the pointer and the widget element with the supplied parameter, which
		 * is either an element or a function.
		 *
		 * @since 3.3.0
		 * @private
		 *
		 * @param {Object} extend The object to be merged into the original object.
		 *
		 * @return {Object} The extended object.
		 */
		_handoff: function( extend ) {
			return $.extend({
				pointer: this.pointer,
				element: this.element
			}, extend);
		}
	});
})(jQuery);
       wp-pointer.min.js                                                                                   0000644                 00000007045 15212564050 0007776 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(o){var i=0,e=9999;o.widget("wp.pointer",{options:{pointerClass:"wp-pointer",pointerWidth:320,content:function(){return o(this).text()},buttons:function(t,i){return o('<a class="close" href="#"></a>').text(wp.i18n.__("Dismiss")).on("click.pointer",function(t){t.preventDefault(),i.element.pointer("close")})},position:"top",show:function(t,i){i.pointer.show(),i.opened()},hide:function(t,i){i.pointer.hide(),i.closed()},document:document},_create:function(){var t;this.content=o('<div class="wp-pointer-content"></div>'),this.arrow=o('<div class="wp-pointer-arrow"><div class="wp-pointer-arrow-inner"></div></div>'),t="absolute",this.element.parents().add(this.element).filter(function(){return"fixed"===o(this).css("position")}).length&&(t="fixed"),this.pointer=o("<div />").append(this.content).append(this.arrow).attr("id","wp-pointer-"+i++).addClass(this.options.pointerClass).css({position:t,width:this.options.pointerWidth+"px",display:"none"}).appendTo(this.options.document.body)},_setOption:function(t,i){var e=this.options,n=this.pointer;"document"===t&&i!==e.document?n.detach().appendTo(i.body):"pointerClass"===t&&n.removeClass(e.pointerClass).addClass(i),o.Widget.prototype._setOption.apply(this,arguments),"position"===t?this.reposition():"content"===t&&this.active&&this.update()},destroy:function(){this.pointer.remove(),o.Widget.prototype.destroy.call(this)},widget:function(){return this.pointer},update:function(i){var e=this,t=this.options,n=o.Deferred();if(!t.disabled)return n.done(function(t){e._update(i,t)}),(t="string"==typeof t.content?t.content:t.content.call(this.element[0],n.resolve,i,this._handoff()))&&n.resolve(t),n.promise()},_update:function(t,i){var e=this.options;i&&(this.pointer.stop(),this.content.html(i),(i=e.buttons.call(this.element[0],t,this._handoff()))&&i.wrap('<div class="wp-pointer-buttons" />').parent().appendTo(this.content),this.reposition())},reposition:function(){var t;this.options.disabled||(t=this._processPosition(this.options.position),this.pointer.css({top:0,left:0,zIndex:e++}).show().position(o.extend({of:this.element,collision:"fit none"},t)),this.repoint())},repoint:function(){var t=this.options;t.disabled||(t="string"==typeof t.position?t.position:t.position.edge,this.pointer[0].className=this.pointer[0].className.replace(/wp-pointer-[^\s'"]*/,""),this.pointer.addClass("wp-pointer-"+t))},_processPosition:function(t){var i={top:"bottom",bottom:"top",left:"right",right:"left"},t="string"==typeof t?{edge:t+""}:o.extend({},t);return t.edge&&("top"==t.edge||"bottom"==t.edge?(t.align=t.align||"left",t.at=t.at||t.align+" "+i[t.edge],t.my=t.my||t.align+" "+t.edge):(t.align=t.align||"top",t.at=t.at||i[t.edge]+" "+t.align,t.my=t.my||t.edge+" "+t.align)),t},open:function(t){var i=this,e=this.options;this.active||e.disabled||this.element.is(":hidden")||this.update().done(function(){i._open(t)})},_open:function(t){var i=this,e=this.options;this.active||e.disabled||this.element.is(":hidden")||(this.active=!0,this._trigger("open",t,this._handoff()),this._trigger("show",t,this._handoff({opened:function(){i._trigger("opened",t,i._handoff())}})))},close:function(t){var i;this.active&&!this.options.disabled&&((i=this).active=!1,this._trigger("close",t,this._handoff()),this._trigger("hide",t,this._handoff({closed:function(){i._trigger("closed",t,i._handoff())}})))},sendToTop:function(){this.active&&this.pointer.css("z-index",e++)},toggle:function(t){this.pointer.is(":hidden")?this.open(t):this.close(t)},_handoff:function(t){return o.extend({pointer:this.pointer,element:this.element},t)}})}(jQuery);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           wp-sanitize.js                                                                                      0000644                 00000003126 15212564050 0007356 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/wp-sanitize.js
 */

/* eslint-env es6 */

( function () {

	window.wp = window.wp || {};

	/**
	 * wp.sanitize
	 *
	 * Helper functions to sanitize strings.
	 */
	wp.sanitize = {

		/**
		 * Strip HTML tags.
		 *
		 * @param {string} text - Text to strip the HTML tags from.
		 *
		 * @return {string} Stripped text.
		 */
		stripTags: function( text ) {
			if ( 'string' !== typeof text ) {
				return '';
			}

			const domParser = new DOMParser();
			const htmlDocument = domParser.parseFromString(
				text,
				'text/html'
			);

			/*
			 * The following self-assignment appears to be a no-op, but it isn't.
			 * It enforces the escaping. Reading the `innerText` property decodes
			 * character references, returning a raw string. When written, however,
			 * the text is re-escaped to ensure that the rendered text replicates
			 * what it's given.
			 *
			 * See <https://github.com/WordPress/wordpress-develop/pull/10536#discussion_r2550615378>.
			 */
			htmlDocument.body.innerText = htmlDocument.body.innerText;

			// Return the text with stripped tags.
			return htmlDocument.body.innerHTML;
		},

		/**
		 * Strip HTML tags and convert HTML entities.
		 *
		 * @param {string} text - Text to strip tags and convert HTML entities.
		 *
		 * @return {string} Sanitized text.
		 */
		stripTagsAndEncodeText: function( text ) {
			let _text = wp.sanitize.stripTags( text ),
				textarea = document.createElement( 'textarea' );

			try {
				textarea.textContent = _text;
				_text = wp.sanitize.stripTags( textarea.value );
			} catch ( er ) {}

			return _text;
		}
	};
}() );
                                                                                                                                                                                                                                                                                                                                                                                                                                          wp-sanitize.min.js                                                                                  0000644                 00000000622 15212564050 0010136 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
window.wp=window.wp||{},wp.sanitize={stripTags:function(t){return"string"!=typeof t?"":((t=(new DOMParser).parseFromString(t,"text/html")).body.innerText=t.body.innerText,t.body.innerHTML)},stripTagsAndEncodeText:function(t){let e=wp.sanitize.stripTags(t),n=document.createElement("textarea");try{n.textContent=e,e=wp.sanitize.stripTags(n.value)}catch(t){}return e}};                                                                                                              wp-util.js                                                                                          0000644                 00000011121 15212564050 0006477 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/wp-util.js
 */

/* global _wpUtilSettings */

/** @namespace wp */
window.wp = window.wp || {};

(function ($) {
	// Check for the utility settings.
	var settings = typeof _wpUtilSettings === 'undefined' ? {} : _wpUtilSettings;

	/**
	 * wp.template( id )
	 *
	 * Fetch a JavaScript template for an id, and return a templating function for it.
	 *
	 * @param {string} id A string that corresponds to a DOM element with an id prefixed with "tmpl-".
	 *                    For example, "attachment" maps to "tmpl-attachment".
	 * @return {function} A function that lazily-compiles the template requested.
	 */
	wp.template = _.memoize(function ( id ) {
		var compiled,
			/*
			 * Underscore's default ERB-style templates are incompatible with PHP
			 * when asp_tags is enabled, so WordPress uses Mustache-inspired templating syntax.
			 *
			 * @see trac ticket #22344.
			 */
			options = {
				evaluate:    /<#([\s\S]+?)#>/g,
				interpolate: /\{\{\{([\s\S]+?)\}\}\}/g,
				escape:      /\{\{([^\}]+?)\}\}(?!\})/g,
				variable:    'data'
			};

		return function ( data ) {
			var el = document.querySelector( 'script#tmpl-' + id );
			if ( ! el ) {
				throw new Error( 'Template not found: ' + '#tmpl-' + id );
			}
			compiled = compiled || _.template( $( el ).html(), options );
			return compiled( data );
		};
	});

	/*
	 * wp.ajax
	 * ------
	 *
	 * Tools for sending ajax requests with JSON responses and built in error handling.
	 * Mirrors and wraps jQuery's ajax APIs.
	 */
	wp.ajax = {
		settings: settings.ajax || {},

		/**
		 * wp.ajax.post( [action], [data] )
		 *
		 * Sends a POST request to WordPress.
		 *
		 * @param {(string|Object)} action The slug of the action to fire in WordPress or options passed
		 *                                 to jQuery.ajax.
		 * @param {Object=}         data   Optional. The data to populate $_POST with.
		 * @return {$.promise} A jQuery promise that represents the request,
		 *                     decorated with an abort() method.
		 */
		post: function( action, data ) {
			return wp.ajax.send({
				data: _.isObject( action ) ? action : _.extend( data || {}, { action: action })
			});
		},

		/**
		 * wp.ajax.send( [action], [options] )
		 *
		 * Sends a POST request to WordPress.
		 *
		 * @param {(string|Object)} action  The slug of the action to fire in WordPress or options passed
		 *                                  to jQuery.ajax.
		 * @param {Object=}         options Optional. The options passed to jQuery.ajax.
		 * @return {$.promise} A jQuery promise that represents the request,
		 *                     decorated with an abort() method.
		 */
		send: function( action, options ) {
			var promise, deferred;
			if ( _.isObject( action ) ) {
				options = action;
			} else {
				options = options || {};
				options.data = _.extend( options.data || {}, { action: action });
			}

			options = _.defaults( options || {}, {
				type:    'POST',
				url:     wp.ajax.settings.url,
				context: this
			});

			deferred = $.Deferred( function( deferred ) {
				// Transfer success/error callbacks.
				if ( options.success ) {
					deferred.done( options.success );
				}

				if ( options.error ) {
					deferred.fail( options.error );
				}

				delete options.success;
				delete options.error;

				// Use with PHP's wp_send_json_success() and wp_send_json_error().
				deferred.jqXHR = $.ajax( options ).done( function( response ) {
					// Treat a response of 1 as successful for backward compatibility with existing handlers.
					if ( response === '1' || response === 1 ) {
						response = { success: true };
					}

					if ( _.isObject( response ) && ! _.isUndefined( response.success ) ) {

						// When handling a media attachments request, get the total attachments from response headers.
						var context = this;
						deferred.done( function() {
							if (
								action &&
								action.data &&
								'query-attachments' === action.data.action &&
								deferred.jqXHR.hasOwnProperty( 'getResponseHeader' ) &&
								deferred.jqXHR.getResponseHeader( 'X-WP-Total' )
							) {
								context.totalAttachments = parseInt( deferred.jqXHR.getResponseHeader( 'X-WP-Total' ), 10 );
							} else {
								context.totalAttachments = 0;
							}
						} );
						deferred[ response.success ? 'resolveWith' : 'rejectWith' ]( this, [response.data] );
					} else {
						deferred.rejectWith( this, [response] );
					}
				}).fail( function() {
					deferred.rejectWith( this, arguments );
				});
			});

			promise = deferred.promise();
			promise.abort = function() {
				deferred.jqXHR.abort();
				return this;
			};

			return promise;
		}
	};

}(jQuery));
                                                                                                                                                                                                                                                                                                                                                                                                                                               wp-util.min.js                                                                                      0000644                 00000002627 15212564050 0007274 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
window.wp=window.wp||{},function(r){var t="undefined"==typeof _wpUtilSettings?{}:_wpUtilSettings;wp.template=_.memoize(function(a){var n,s={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(t){var e=document.querySelector("script#tmpl-"+a);if(e)return(n=n||_.template(r(e).html(),s))(t);throw new Error("Template not found: #tmpl-"+a)}}),wp.ajax={settings:t.ajax||{},post:function(t,e){return wp.ajax.send({data:_.isObject(t)?t:_.extend(e||{},{action:t})})},send:function(n,t){var e,a;return _.isObject(n)?t=n:(t=t||{}).data=_.extend(t.data||{},{action:n}),t=_.defaults(t||{},{type:"POST",url:wp.ajax.settings.url,context:this}),(e=(a=r.Deferred(function(a){t.success&&a.done(t.success),t.error&&a.fail(t.error),delete t.success,delete t.error,a.jqXHR=r.ajax(t).done(function(t){var e;"1"!==t&&1!==t||(t={success:!0}),_.isObject(t)&&!_.isUndefined(t.success)?(e=this,a.done(function(){n&&n.data&&"query-attachments"===n.data.action&&a.jqXHR.hasOwnProperty("getResponseHeader")&&a.jqXHR.getResponseHeader("X-WP-Total")?e.totalAttachments=parseInt(a.jqXHR.getResponseHeader("X-WP-Total"),10):e.totalAttachments=0}),a[t.success?"resolveWith":"rejectWith"](this,[t.data])):a.rejectWith(this,[t])}).fail(function(){a.rejectWith(this,arguments)})})).promise()).abort=function(){return a.jqXHR.abort(),this},e}}}(jQuery);                                                                                                         wpdialog.js                                                                                         0000644                 00000001071 15212564050 0006707 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/wpdialog.js
 */

/*
 * Wrap the jQuery UI Dialog open function remove focus from tinyMCE.
 */
( function($) {
	$.widget('wp.wpdialog', $.ui.dialog, {
		open: function() {
			// Add beforeOpen event.
			if ( this.isOpen() || false === this._trigger('beforeOpen') ) {
				return;
			}

			// Open the dialog.
			this._super();

			// WebKit leaves focus in the TinyMCE editor unless we shift focus.
			this.element.trigger('focus');
			this._trigger('refresh');
		}
	});

	$.wp.wpdialog.prototype.options.closeOnEscape = false;

})(jQuery);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                       wpdialog.min.js                                                                                     0000644                 00000000431 15212564050 0007470 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(e){e.widget("wp.wpdialog",e.ui.dialog,{open:function(){this.isOpen()||!1===this._trigger("beforeOpen")||(this._super(),this.element.trigger("focus"),this._trigger("refresh"))}}),e.wp.wpdialog.prototype.options.closeOnEscape=!1}(jQuery);                                                                                                                                                                                                                                       wplink.js                                                                                           0000644                 00000051370 15212564050 0006414 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/wplink.js
 */

 /* global wpLink */

( function( $, wpLinkL10n, wp ) {
	var editor, searchTimer, River, Query, correctedURL,
		emailRegexp = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,63}$/i,
		urlRegexp = /^(https?|ftp):\/\/[A-Z0-9.-]+\.[A-Z]{2,63}[^ "]*$/i,
		inputs = {},
		rivers = {},
		isTouch = ( 'ontouchend' in document );

	function getLink() {
		if ( editor ) {
			return editor.$( 'a[data-wplink-edit="true"]' );
		}

		return null;
	}

	window.wpLink = {
		timeToTriggerRiver: 150,
		minRiverAJAXDuration: 200,
		riverBottomThreshold: 5,
		keySensitivity: 100,
		lastSearch: '',
		textarea: '',
		modalOpen: false,

		init: function() {
			inputs.wrap = $('#wp-link-wrap');
			inputs.dialog = $( '#wp-link' );
			inputs.backdrop = $( '#wp-link-backdrop' );
			inputs.submit = $( '#wp-link-submit' );
			inputs.close = $( '#wp-link-close' );

			// Input.
			inputs.text = $( '#wp-link-text' );
			inputs.url = $( '#wp-link-url' );
			inputs.nonce = $( '#_ajax_linking_nonce' );
			inputs.openInNewTab = $( '#wp-link-target' );
			inputs.search = $( '#wp-link-search' );

			// Build rivers.
			rivers.search = new River( $( '#search-results' ) );
			rivers.recent = new River( $( '#most-recent-results' ) );
			rivers.elements = inputs.dialog.find( '.query-results' );

			// Get search notice text.
			inputs.queryNotice = $( '#query-notice-message' );
			inputs.queryNoticeTextDefault = inputs.queryNotice.find( '.query-notice-default' );
			inputs.queryNoticeTextHint = inputs.queryNotice.find( '.query-notice-hint' );

			// Bind event handlers.
			inputs.dialog.on( 'keydown', wpLink.keydown );
			inputs.dialog.on( 'keyup', wpLink.keyup );
			inputs.submit.on( 'click', function( event ) {
				event.preventDefault();
				wpLink.update();
			});

			inputs.close.add( inputs.backdrop ).add( '#wp-link-cancel button' ).on( 'click', function( event ) {
				event.preventDefault();
				wpLink.close();
			});

			rivers.elements.on( 'river-select', wpLink.updateFields );

			// Display 'hint' message when search field or 'query-results' box are focused.
			inputs.search.on( 'focus.wplink', function() {
				inputs.queryNoticeTextDefault.hide();
				inputs.queryNoticeTextHint.removeClass( 'screen-reader-text' ).show();
			} ).on( 'blur.wplink', function() {
				inputs.queryNoticeTextDefault.show();
				inputs.queryNoticeTextHint.addClass( 'screen-reader-text' ).hide();
			} );

			inputs.search.on( 'keyup input', function() {
				window.clearTimeout( searchTimer );
				searchTimer = window.setTimeout( function() {
					wpLink.searchInternalLinks();
				}, 500 );
			});

			inputs.url.on( 'paste', function() {
				setTimeout( wpLink.correctURL, 0 );
			} );

			inputs.url.on( 'blur', wpLink.correctURL );
		},

		// If URL wasn't corrected last time and doesn't start with http:, https:, ? # or /, prepend http://.
		correctURL: function () {
			var url = inputs.url.val().trim();

			if ( url && correctedURL !== url && ! /^(?:[a-z]+:|#|\?|\.|\/)/.test( url ) ) {
				inputs.url.val( 'http://' + url );
				correctedURL = url;
			}
		},

		open: function( editorId, url, text ) {
			var ed,
				$body = $( document.body );

			$( '#wpwrap' ).attr( 'aria-hidden', 'true' );
			$body.addClass( 'modal-open' );
			wpLink.modalOpen = true;

			wpLink.range = null;

			if ( editorId ) {
				window.wpActiveEditor = editorId;
			}

			if ( ! window.wpActiveEditor ) {
				return;
			}

			this.textarea = $( '#' + window.wpActiveEditor ).get( 0 );

			if ( typeof window.tinymce !== 'undefined' ) {
				// Make sure the link wrapper is the last element in the body,
				// or the inline editor toolbar may show above the backdrop.
				$body.append( inputs.backdrop, inputs.wrap );

				ed = window.tinymce.get( window.wpActiveEditor );

				if ( ed && ! ed.isHidden() ) {
					editor = ed;
				} else {
					editor = null;
				}
			}

			if ( ! wpLink.isMCE() && document.selection ) {
				this.textarea.focus();
				this.range = document.selection.createRange();
			}

			inputs.wrap.show();
			inputs.backdrop.show();

			wpLink.refresh( url, text );

			$( document ).trigger( 'wplink-open', inputs.wrap );
		},

		isMCE: function() {
			return editor && ! editor.isHidden();
		},

		refresh: function( url, text ) {
			var linkText = '';

			// Refresh rivers (clear links, check visibility).
			rivers.search.refresh();
			rivers.recent.refresh();

			if ( wpLink.isMCE() ) {
				wpLink.mceRefresh( url, text );
			} else {
				// For the Code editor the "Link text" field is always shown.
				if ( ! inputs.wrap.hasClass( 'has-text-field' ) ) {
					inputs.wrap.addClass( 'has-text-field' );
				}

				if ( document.selection ) {
					// Old IE.
					linkText = document.selection.createRange().text || text || '';
				} else if ( typeof this.textarea.selectionStart !== 'undefined' &&
					( this.textarea.selectionStart !== this.textarea.selectionEnd ) ) {
					// W3C.
					text = this.textarea.value.substring( this.textarea.selectionStart, this.textarea.selectionEnd ) || text || '';
				}

				inputs.text.val( text );
				wpLink.setDefaultValues();
			}

			if ( isTouch ) {
				// Close the onscreen keyboard.
				inputs.url.trigger( 'focus' ).trigger( 'blur' );
			} else {
				/*
				 * Focus the URL field and highlight its contents.
				 * If this is moved above the selection changes,
				 * IE will show a flashing cursor over the dialog.
				 */
				window.setTimeout( function() {
					inputs.url[0].select();
					inputs.url.trigger( 'focus' );
				} );
			}

			// Load the most recent results if this is the first time opening the panel.
			if ( ! rivers.recent.ul.children().length ) {
				rivers.recent.ajax();
			}

			correctedURL = inputs.url.val().replace( /^http:\/\//, '' );
		},

		hasSelectedText: function( linkNode ) {
			var node, nodes, i, html = editor.selection.getContent();

			// Partial html and not a fully selected anchor element.
			if ( /</.test( html ) && ( ! /^<a [^>]+>[^<]+<\/a>$/.test( html ) || html.indexOf('href=') === -1 ) ) {
				return false;
			}

			if ( linkNode.length ) {
				nodes = linkNode[0].childNodes;

				if ( ! nodes || ! nodes.length ) {
					return false;
				}

				for ( i = nodes.length - 1; i >= 0; i-- ) {
					node = nodes[i];

					if ( node.nodeType != 3 && ! window.tinymce.dom.BookmarkManager.isBookmarkNode( node ) ) {
						return false;
					}
				}
			}

			return true;
		},

		mceRefresh: function( searchStr, text ) {
			var linkText, href,
				linkNode = getLink(),
				onlyText = this.hasSelectedText( linkNode );

			if ( linkNode.length ) {
				linkText = linkNode.text();
				href = linkNode.attr( 'href' );

				if ( ! linkText.trim() ) {
					linkText = text || '';
				}

				if ( searchStr && ( urlRegexp.test( searchStr ) || emailRegexp.test( searchStr ) ) ) {
					href = searchStr;
				}

				if ( href !== '_wp_link_placeholder' ) {
					inputs.url.val( href );
					inputs.openInNewTab.prop( 'checked', '_blank' === linkNode.attr( 'target' ) );
					inputs.submit.val( wpLinkL10n.update );
				} else {
					this.setDefaultValues( linkText );
				}

				if ( searchStr && searchStr !== href ) {
					// The user has typed something in the inline dialog. Trigger a search with it.
					inputs.search.val( searchStr );
				} else {
					inputs.search.val( '' );
				}

				// Always reset the search.
				window.setTimeout( function() {
					wpLink.searchInternalLinks();
				} );
			} else {
				linkText = editor.selection.getContent({ format: 'text' }) || text || '';
				this.setDefaultValues( linkText );
			}

			if ( onlyText ) {
				inputs.text.val( linkText );
				inputs.wrap.addClass( 'has-text-field' );
			} else {
				inputs.text.val( '' );
				inputs.wrap.removeClass( 'has-text-field' );
			}
		},

		close: function( reset ) {
			$( document.body ).removeClass( 'modal-open' );
			$( '#wpwrap' ).removeAttr( 'aria-hidden' );
			wpLink.modalOpen = false;

			if ( reset !== 'noReset' ) {
				if ( ! wpLink.isMCE() ) {
					wpLink.textarea.focus();

					if ( wpLink.range ) {
						wpLink.range.moveToBookmark( wpLink.range.getBookmark() );
						wpLink.range.select();
					}
				} else {
					if ( editor.plugins.wplink ) {
						editor.plugins.wplink.close();
					}

					editor.focus();
				}
			}

			inputs.backdrop.hide();
			inputs.wrap.hide();

			correctedURL = false;

			$( document ).trigger( 'wplink-close', inputs.wrap );
		},

		getAttrs: function() {
			wpLink.correctURL();

			return {
				href: inputs.url.val().trim(),
				target: inputs.openInNewTab.prop( 'checked' ) ? '_blank' : null
			};
		},

		buildHtml: function(attrs) {
			var html = '<a href="' + attrs.href + '"';

			if ( attrs.target ) {
				html += ' target="' + attrs.target + '"';
			}

			return html + '>';
		},

		update: function() {
			if ( wpLink.isMCE() ) {
				wpLink.mceUpdate();
			} else {
				wpLink.htmlUpdate();
			}
		},

		htmlUpdate: function() {
			var attrs, text, html, begin, end, cursor, selection,
				textarea = wpLink.textarea;

			if ( ! textarea ) {
				return;
			}

			attrs = wpLink.getAttrs();
			text = inputs.text.val();

			var parser = document.createElement( 'a' );
			parser.href = attrs.href;

			if ( 'javascript:' === parser.protocol || 'data:' === parser.protocol ) { // jshint ignore:line
				attrs.href = '';
			}

			// If there's no href, return.
			if ( ! attrs.href ) {
				return;
			}

			html = wpLink.buildHtml(attrs);

			// Insert HTML.
			if ( document.selection && wpLink.range ) {
				// IE.
				// Note: If no text is selected, IE will not place the cursor
				// inside the closing tag.
				textarea.focus();
				wpLink.range.text = html + ( text || wpLink.range.text ) + '</a>';
				wpLink.range.moveToBookmark( wpLink.range.getBookmark() );
				wpLink.range.select();

				wpLink.range = null;
			} else if ( typeof textarea.selectionStart !== 'undefined' ) {
				// W3C.
				begin = textarea.selectionStart;
				end = textarea.selectionEnd;
				selection = text || textarea.value.substring( begin, end );
				html = html + selection + '</a>';
				cursor = begin + html.length;

				// If no text is selected, place the cursor inside the closing tag.
				if ( begin === end && ! selection ) {
					cursor -= 4;
				}

				textarea.value = (
					textarea.value.substring( 0, begin ) +
					html +
					textarea.value.substring( end, textarea.value.length )
				);

				// Update cursor position.
				textarea.selectionStart = textarea.selectionEnd = cursor;
			}

			wpLink.close();
			textarea.focus();
			$( textarea ).trigger( 'change' );

			// Audible confirmation message when a link has been inserted in the Editor.
			wp.a11y.speak( wpLinkL10n.linkInserted );
		},

		mceUpdate: function() {
			var attrs = wpLink.getAttrs(),
				$link, text, hasText;

			var parser = document.createElement( 'a' );
			parser.href = attrs.href;

			if ( 'javascript:' === parser.protocol || 'data:' === parser.protocol ) { // jshint ignore:line
				attrs.href = '';
			}

			if ( ! attrs.href ) {
				editor.execCommand( 'unlink' );
				wpLink.close();
				return;
			}

			$link = getLink();

			editor.undoManager.transact( function() {
				if ( ! $link.length ) {
					editor.execCommand( 'mceInsertLink', false, { href: '_wp_link_placeholder', 'data-wp-temp-link': 1 } );
					$link = editor.$( 'a[data-wp-temp-link="1"]' ).removeAttr( 'data-wp-temp-link' );
					hasText = $link.text().trim();
				}

				if ( ! $link.length ) {
					editor.execCommand( 'unlink' );
				} else {
					if ( inputs.wrap.hasClass( 'has-text-field' ) ) {
						text = inputs.text.val();

						if ( text ) {
							$link.text( text );
						} else if ( ! hasText ) {
							$link.text( attrs.href );
						}
					}

					attrs['data-wplink-edit'] = null;
					attrs['data-mce-href'] = attrs.href;
					$link.attr( attrs );
				}
			} );

			wpLink.close( 'noReset' );
			editor.focus();

			if ( $link.length ) {
				editor.selection.select( $link[0] );

				if ( editor.plugins.wplink ) {
					editor.plugins.wplink.checkLink( $link[0] );
				}
			}

			editor.nodeChanged();

			// Audible confirmation message when a link has been inserted in the Editor.
			wp.a11y.speak( wpLinkL10n.linkInserted );
		},

		updateFields: function( e, li ) {
			inputs.url.val( li.children( '.item-permalink' ).val() );

			if ( inputs.wrap.hasClass( 'has-text-field' ) && ! inputs.text.val() ) {
				inputs.text.val( li.children( '.item-title' ).text() );
			}
		},

		getUrlFromSelection: function( selection ) {
			if ( ! selection ) {
				if ( this.isMCE() ) {
					selection = editor.selection.getContent({ format: 'text' });
				} else if ( document.selection && wpLink.range ) {
					selection = wpLink.range.text;
				} else if ( typeof this.textarea.selectionStart !== 'undefined' ) {
					selection = this.textarea.value.substring( this.textarea.selectionStart, this.textarea.selectionEnd );
				}
			}

			selection = selection || '';
			selection = selection.trim();

			if ( selection && emailRegexp.test( selection ) ) {
				// Selection is email address.
				return 'mailto:' + selection;
			} else if ( selection && urlRegexp.test( selection ) ) {
				// Selection is URL.
				return selection.replace( /&amp;|&#0?38;/gi, '&' );
			}

			return '';
		},

		setDefaultValues: function( selection ) {
			inputs.url.val( this.getUrlFromSelection( selection ) );

			// Empty the search field and swap the "rivers".
			inputs.search.val('');
			wpLink.searchInternalLinks();

			// Update save prompt.
			inputs.submit.val( wpLinkL10n.save );
		},

		searchInternalLinks: function() {
			var waiting,
				search = inputs.search.val() || '',
				minInputLength = parseInt( wpLinkL10n.minInputLength, 10 ) || 3;

			if ( search.length >= minInputLength ) {
				rivers.recent.hide();
				rivers.search.show();

				// Don't search if the keypress didn't change the title.
				if ( wpLink.lastSearch == search )
					return;

				wpLink.lastSearch = search;
				waiting = inputs.search.parent().find( '.spinner' ).addClass( 'is-active' );

				rivers.search.change( search );
				rivers.search.ajax( function() {
					waiting.removeClass( 'is-active' );
				});
			} else {
				rivers.search.hide();
				rivers.recent.show();
			}
		},

		next: function() {
			rivers.search.next();
			rivers.recent.next();
		},

		prev: function() {
			rivers.search.prev();
			rivers.recent.prev();
		},

		keydown: function( event ) {
			var fn, id;

			// Escape key.
			if ( 27 === event.keyCode ) {
				wpLink.close();
				event.stopImmediatePropagation();
			// Tab key.
			} else if ( 9 === event.keyCode ) {
				id = event.target.id;

				// wp-link-submit must always be the last focusable element in the dialog.
				// Following focusable elements will be skipped on keyboard navigation.
				if ( id === 'wp-link-submit' && ! event.shiftKey ) {
					inputs.close.trigger( 'focus' );
					event.preventDefault();
				} else if ( id === 'wp-link-close' && event.shiftKey ) {
					inputs.submit.trigger( 'focus' );
					event.preventDefault();
				}
			}

			// Up Arrow and Down Arrow keys.
			if ( event.shiftKey || ( 38 !== event.keyCode && 40 !== event.keyCode ) ) {
				return;
			}

			if ( document.activeElement &&
				( document.activeElement.id === 'link-title-field' || document.activeElement.id === 'url-field' ) ) {
				return;
			}

			// Up Arrow key.
			fn = 38 === event.keyCode ? 'prev' : 'next';
			clearInterval( wpLink.keyInterval );
			wpLink[ fn ]();
			wpLink.keyInterval = setInterval( wpLink[ fn ], wpLink.keySensitivity );
			event.preventDefault();
		},

		keyup: function( event ) {
			// Up Arrow and Down Arrow keys.
			if ( 38 === event.keyCode || 40 === event.keyCode ) {
				clearInterval( wpLink.keyInterval );
				event.preventDefault();
			}
		},

		delayedCallback: function( func, delay ) {
			var timeoutTriggered, funcTriggered, funcArgs, funcContext;

			if ( ! delay )
				return func;

			setTimeout( function() {
				if ( funcTriggered )
					return func.apply( funcContext, funcArgs );
				// Otherwise, wait.
				timeoutTriggered = true;
			}, delay );

			return function() {
				if ( timeoutTriggered )
					return func.apply( this, arguments );
				// Otherwise, wait.
				funcArgs = arguments;
				funcContext = this;
				funcTriggered = true;
			};
		}
	};

	River = function( element, search ) {
		var self = this;
		this.element = element;
		this.ul = element.children( 'ul' );
		this.contentHeight = element.children( '#link-selector-height' );
		this.waiting = element.find('.river-waiting');

		this.change( search );
		this.refresh();

		$( '#wp-link .query-results, #wp-link #link-selector' ).on( 'scroll', function() {
			self.maybeLoad();
		});
		element.on( 'click', 'li', function( event ) {
			self.select( $( this ), event );
		});
	};

	$.extend( River.prototype, {
		refresh: function() {
			this.deselect();
			this.visible = this.element.is( ':visible' );
		},
		show: function() {
			if ( ! this.visible ) {
				this.deselect();
				this.element.show();
				this.visible = true;
			}
		},
		hide: function() {
			this.element.hide();
			this.visible = false;
		},
		// Selects a list item and triggers the river-select event.
		select: function( li, event ) {
			var liHeight, elHeight, liTop, elTop;

			if ( li.hasClass( 'unselectable' ) || li == this.selected )
				return;

			this.deselect();
			this.selected = li.addClass( 'selected' );
			// Make sure the element is visible.
			liHeight = li.outerHeight();
			elHeight = this.element.height();
			liTop = li.position().top;
			elTop = this.element.scrollTop();

			if ( liTop < 0 ) // Make first visible element.
				this.element.scrollTop( elTop + liTop );
			else if ( liTop + liHeight > elHeight ) // Make last visible element.
				this.element.scrollTop( elTop + liTop - elHeight + liHeight );

			// Trigger the river-select event.
			this.element.trigger( 'river-select', [ li, event, this ] );
		},
		deselect: function() {
			if ( this.selected )
				this.selected.removeClass( 'selected' );
			this.selected = false;
		},
		prev: function() {
			if ( ! this.visible )
				return;

			var to;
			if ( this.selected ) {
				to = this.selected.prev( 'li' );
				if ( to.length )
					this.select( to );
			}
		},
		next: function() {
			if ( ! this.visible )
				return;

			var to = this.selected ? this.selected.next( 'li' ) : $( 'li:not(.unselectable):first', this.element );
			if ( to.length )
				this.select( to );
		},
		ajax: function( callback ) {
			var self = this,
				delay = this.query.page == 1 ? 0 : wpLink.minRiverAJAXDuration,
				response = wpLink.delayedCallback( function( results, params ) {
					self.process( results, params );
					if ( callback )
						callback( results, params );
				}, delay );

			this.query.ajax( response );
		},
		change: function( search ) {
			if ( this.query && this._search == search )
				return;

			this._search = search;
			this.query = new Query( search );
			this.element.scrollTop( 0 );
		},
		process: function( results, params ) {
			var list = '', alt = true, classes = '',
				firstPage = params.page == 1;

			if ( ! results ) {
				if ( firstPage ) {
					list += '<li class="unselectable no-matches-found"><span class="item-title"><em>' +
						wpLinkL10n.noMatchesFound + '</em></span></li>';
				}
			} else {
				$.each( results, function() {
					classes = alt ? 'alternate' : '';
					classes += this.title ? '' : ' no-title';
					list += classes ? '<li class="' + classes + '">' : '<li>';
					list += '<input type="hidden" class="item-permalink" value="' + this.permalink + '" />';
					list += '<span class="item-title">';
					list += this.title ? this.title : wpLinkL10n.noTitle;
					list += '</span><span class="item-info">' + this.info + '</span></li>';
					alt = ! alt;
				});
			}

			this.ul[ firstPage ? 'html' : 'append' ]( list );
		},
		maybeLoad: function() {
			var self = this,
				el = this.element,
				bottom = el.scrollTop() + el.height();

			if ( ! this.query.ready() || bottom < this.contentHeight.height() - wpLink.riverBottomThreshold )
				return;

			setTimeout(function() {
				var newTop = el.scrollTop(),
					newBottom = newTop + el.height();

				if ( ! self.query.ready() || newBottom < self.contentHeight.height() - wpLink.riverBottomThreshold )
					return;

				self.waiting.addClass( 'is-active' );
				el.scrollTop( newTop + self.waiting.outerHeight() );

				self.ajax( function() {
					self.waiting.removeClass( 'is-active' );
				});
			}, wpLink.timeToTriggerRiver );
		}
	});

	Query = function( search ) {
		this.page = 1;
		this.allLoaded = false;
		this.querying = false;
		this.search = search;
	};

	$.extend( Query.prototype, {
		ready: function() {
			return ! ( this.querying || this.allLoaded );
		},
		ajax: function( callback ) {
			var self = this,
				query = {
					action : 'wp-link-ajax',
					page : this.page,
					'_ajax_linking_nonce' : inputs.nonce.val()
				};

			if ( this.search )
				query.search = this.search;

			this.querying = true;

			$.post( window.ajaxurl, query, function( r ) {
				self.page++;
				self.querying = false;
				self.allLoaded = ! r;
				callback( r, query );
			}, 'json' );
		}
	});

	$( wpLink.init );
})( jQuery, window.wpLinkL10n, window.wp );
                                                                                                                                                                                                                                                                        wplink.min.js                                                                                       0000644                 00000026065 15212564050 0007201 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(s,l,o){var c,e,t,n,i,h=/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,63}$/i,u=/^(https?|ftp):\/\/[A-Z0-9.-]+\.[A-Z]{2,63}[^ "]*$/i,p={},a={},r="ontouchend"in document;function d(){return c?c.$('a[data-wplink-edit="true"]'):null}window.wpLink={timeToTriggerRiver:150,minRiverAJAXDuration:200,riverBottomThreshold:5,keySensitivity:100,lastSearch:"",textarea:"",modalOpen:!1,init:function(){p.wrap=s("#wp-link-wrap"),p.dialog=s("#wp-link"),p.backdrop=s("#wp-link-backdrop"),p.submit=s("#wp-link-submit"),p.close=s("#wp-link-close"),p.text=s("#wp-link-text"),p.url=s("#wp-link-url"),p.nonce=s("#_ajax_linking_nonce"),p.openInNewTab=s("#wp-link-target"),p.search=s("#wp-link-search"),a.search=new t(s("#search-results")),a.recent=new t(s("#most-recent-results")),a.elements=p.dialog.find(".query-results"),p.queryNotice=s("#query-notice-message"),p.queryNoticeTextDefault=p.queryNotice.find(".query-notice-default"),p.queryNoticeTextHint=p.queryNotice.find(".query-notice-hint"),p.dialog.on("keydown",wpLink.keydown),p.dialog.on("keyup",wpLink.keyup),p.submit.on("click",function(e){e.preventDefault(),wpLink.update()}),p.close.add(p.backdrop).add("#wp-link-cancel button").on("click",function(e){e.preventDefault(),wpLink.close()}),a.elements.on("river-select",wpLink.updateFields),p.search.on("focus.wplink",function(){p.queryNoticeTextDefault.hide(),p.queryNoticeTextHint.removeClass("screen-reader-text").show()}).on("blur.wplink",function(){p.queryNoticeTextDefault.show(),p.queryNoticeTextHint.addClass("screen-reader-text").hide()}),p.search.on("keyup input",function(){window.clearTimeout(e),e=window.setTimeout(function(){wpLink.searchInternalLinks()},500)}),p.url.on("paste",function(){setTimeout(wpLink.correctURL,0)}),p.url.on("blur",wpLink.correctURL)},correctURL:function(){var e=p.url.val().trim();e&&i!==e&&!/^(?:[a-z]+:|#|\?|\.|\/)/.test(e)&&(p.url.val("http://"+e),i=e)},open:function(e,t,n){var i=s(document.body);s("#wpwrap").attr("aria-hidden","true"),i.addClass("modal-open"),wpLink.modalOpen=!0,wpLink.range=null,e&&(window.wpActiveEditor=e),window.wpActiveEditor&&(this.textarea=s("#"+window.wpActiveEditor).get(0),void 0!==window.tinymce&&(i.append(p.backdrop,p.wrap),e=window.tinymce.get(window.wpActiveEditor),c=e&&!e.isHidden()?e:null),!wpLink.isMCE()&&document.selection&&(this.textarea.focus(),this.range=document.selection.createRange()),p.wrap.show(),p.backdrop.show(),wpLink.refresh(t,n),s(document).trigger("wplink-open",p.wrap))},isMCE:function(){return c&&!c.isHidden()},refresh:function(e,t){a.search.refresh(),a.recent.refresh(),wpLink.isMCE()?wpLink.mceRefresh(e,t):(p.wrap.hasClass("has-text-field")||p.wrap.addClass("has-text-field"),document.selection?document.selection.createRange().text:void 0!==this.textarea.selectionStart&&this.textarea.selectionStart!==this.textarea.selectionEnd&&(t=this.textarea.value.substring(this.textarea.selectionStart,this.textarea.selectionEnd)||t||""),p.text.val(t),wpLink.setDefaultValues()),r?p.url.trigger("focus").trigger("blur"):window.setTimeout(function(){p.url[0].select(),p.url.trigger("focus")}),a.recent.ul.children().length||a.recent.ajax(),i=p.url.val().replace(/^http:\/\//,"")},hasSelectedText:function(e){var t,n,i,a=c.selection.getContent();if(/</.test(a)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(a)||-1===a.indexOf("href=")))return!1;if(e.length){if(!(n=e[0].childNodes)||!n.length)return!1;for(i=n.length-1;0<=i;i--)if(3!=(t=n[i]).nodeType&&!window.tinymce.dom.BookmarkManager.isBookmarkNode(t))return!1}return!0},mceRefresh:function(e,t){var n,i,a=d(),r=this.hasSelectedText(a);a.length?(n=a.text(),i=a.attr("href"),n.trim()||(n=t||""),"_wp_link_placeholder"!==(i=e&&(u.test(e)||h.test(e))?e:i)?(p.url.val(i),p.openInNewTab.prop("checked","_blank"===a.attr("target")),p.submit.val(l.update)):this.setDefaultValues(n),e&&e!==i?p.search.val(e):p.search.val(""),window.setTimeout(function(){wpLink.searchInternalLinks()})):(n=c.selection.getContent({format:"text"})||t||"",this.setDefaultValues(n)),r?(p.text.val(n),p.wrap.addClass("has-text-field")):(p.text.val(""),p.wrap.removeClass("has-text-field"))},close:function(e){s(document.body).removeClass("modal-open"),s("#wpwrap").removeAttr("aria-hidden"),wpLink.modalOpen=!1,"noReset"!==e&&(wpLink.isMCE()?(c.plugins.wplink&&c.plugins.wplink.close(),c.focus()):(wpLink.textarea.focus(),wpLink.range&&(wpLink.range.moveToBookmark(wpLink.range.getBookmark()),wpLink.range.select()))),p.backdrop.hide(),p.wrap.hide(),i=!1,s(document).trigger("wplink-close",p.wrap)},getAttrs:function(){return wpLink.correctURL(),{href:p.url.val().trim(),target:p.openInNewTab.prop("checked")?"_blank":null}},buildHtml:function(e){var t='<a href="'+e.href+'"';return e.target&&(t+=' target="'+e.target+'"'),t+">"},update:function(){wpLink.isMCE()?wpLink.mceUpdate():wpLink.htmlUpdate()},htmlUpdate:function(){var e,t,n,i,a,r=wpLink.textarea;r&&(n=wpLink.getAttrs(),i=p.text.val(),(a=document.createElement("a")).href=n.href,"javascript:"!==a.protocol&&"data:"!==a.protocol||(n.href=""),n.href)&&(a=wpLink.buildHtml(n),document.selection&&wpLink.range?(r.focus(),wpLink.range.text=a+(i||wpLink.range.text)+"</a>",wpLink.range.moveToBookmark(wpLink.range.getBookmark()),wpLink.range.select(),wpLink.range=null):void 0!==r.selectionStart&&(n=r.selectionStart,e=r.selectionEnd,t=n+(a=a+(i=i||r.value.substring(n,e))+"</a>").length,n!==e||i||(t-=4),r.value=r.value.substring(0,n)+a+r.value.substring(e,r.value.length),r.selectionStart=r.selectionEnd=t),wpLink.close(),r.focus(),s(r).trigger("change"),o.a11y.speak(l.linkInserted))},mceUpdate:function(){var e,t,n,i=wpLink.getAttrs(),a=document.createElement("a");a.href=i.href,"javascript:"!==a.protocol&&"data:"!==a.protocol||(i.href=""),i.href?(e=d(),c.undoManager.transact(function(){e.length||(c.execCommand("mceInsertLink",!1,{href:"_wp_link_placeholder","data-wp-temp-link":1}),e=c.$('a[data-wp-temp-link="1"]').removeAttr("data-wp-temp-link"),n=e.text().trim()),e.length?(p.wrap.hasClass("has-text-field")&&((t=p.text.val())?e.text(t):n||e.text(i.href)),i["data-wplink-edit"]=null,i["data-mce-href"]=i.href,e.attr(i)):c.execCommand("unlink")}),wpLink.close("noReset"),c.focus(),e.length&&(c.selection.select(e[0]),c.plugins.wplink)&&c.plugins.wplink.checkLink(e[0]),c.nodeChanged(),o.a11y.speak(l.linkInserted)):(c.execCommand("unlink"),wpLink.close())},updateFields:function(e,t){p.url.val(t.children(".item-permalink").val()),p.wrap.hasClass("has-text-field")&&!p.text.val()&&p.text.val(t.children(".item-title").text())},getUrlFromSelection:function(e){return e||(this.isMCE()?e=c.selection.getContent({format:"text"}):document.selection&&wpLink.range?e=wpLink.range.text:void 0!==this.textarea.selectionStart&&(e=this.textarea.value.substring(this.textarea.selectionStart,this.textarea.selectionEnd))),(e=(e=e||"").trim())&&h.test(e)?"mailto:"+e:e&&u.test(e)?e.replace(/&amp;|&#0?38;/gi,"&"):""},setDefaultValues:function(e){p.url.val(this.getUrlFromSelection(e)),p.search.val(""),wpLink.searchInternalLinks(),p.submit.val(l.save)},searchInternalLinks:function(){var e,t=p.search.val()||"",n=parseInt(l.minInputLength,10)||3;t.length>=n?(a.recent.hide(),a.search.show(),wpLink.lastSearch!=t&&(wpLink.lastSearch=t,e=p.search.parent().find(".spinner").addClass("is-active"),a.search.change(t),a.search.ajax(function(){e.removeClass("is-active")}))):(a.search.hide(),a.recent.show())},next:function(){a.search.next(),a.recent.next()},prev:function(){a.search.prev(),a.recent.prev()},keydown:function(e){var t;27===e.keyCode?(wpLink.close(),e.stopImmediatePropagation()):9===e.keyCode&&("wp-link-submit"!==(t=e.target.id)||e.shiftKey?"wp-link-close"===t&&e.shiftKey&&(p.submit.trigger("focus"),e.preventDefault()):(p.close.trigger("focus"),e.preventDefault())),e.shiftKey||38!==e.keyCode&&40!==e.keyCode||document.activeElement&&("link-title-field"===document.activeElement.id||"url-field"===document.activeElement.id)||(t=38===e.keyCode?"prev":"next",clearInterval(wpLink.keyInterval),wpLink[t](),wpLink.keyInterval=setInterval(wpLink[t],wpLink.keySensitivity),e.preventDefault())},keyup:function(e){38!==e.keyCode&&40!==e.keyCode||(clearInterval(wpLink.keyInterval),e.preventDefault())},delayedCallback:function(e,t){var n,i,a,r;return t?(setTimeout(function(){if(i)return e.apply(r,a);n=!0},t),function(){if(n)return e.apply(this,arguments);a=arguments,r=this,i=!0}):e}},t=function(e,t){var n=this;this.element=e,this.ul=e.children("ul"),this.contentHeight=e.children("#link-selector-height"),this.waiting=e.find(".river-waiting"),this.change(t),this.refresh(),s("#wp-link .query-results, #wp-link #link-selector").on("scroll",function(){n.maybeLoad()}),e.on("click","li",function(e){n.select(s(this),e)})},s.extend(t.prototype,{refresh:function(){this.deselect(),this.visible=this.element.is(":visible")},show:function(){this.visible||(this.deselect(),this.element.show(),this.visible=!0)},hide:function(){this.element.hide(),this.visible=!1},select:function(e,t){var n,i,a,r;e.hasClass("unselectable")||e==this.selected||(this.deselect(),this.selected=e.addClass("selected"),n=e.outerHeight(),i=this.element.height(),a=e.position().top,r=this.element.scrollTop(),a<0?this.element.scrollTop(r+a):i<a+n&&this.element.scrollTop(r+a-i+n),this.element.trigger("river-select",[e,t,this]))},deselect:function(){this.selected&&this.selected.removeClass("selected"),this.selected=!1},prev:function(){var e;this.visible&&this.selected&&(e=this.selected.prev("li")).length&&this.select(e)},next:function(){var e;this.visible&&(e=this.selected?this.selected.next("li"):s("li:not(.unselectable):first",this.element)).length&&this.select(e)},ajax:function(n){var i=this,e=1==this.query.page?0:wpLink.minRiverAJAXDuration,e=wpLink.delayedCallback(function(e,t){i.process(e,t),n&&n(e,t)},e);this.query.ajax(e)},change:function(e){this.query&&this._search==e||(this._search=e,this.query=new n(e),this.element.scrollTop(0))},process:function(e,t){var n,i="",a=!0,t=1==t.page;e?s.each(e,function(){n=a?"alternate":"",n+=this.title?"":" no-title",i=(i=(i=(i+=n?'<li class="'+n+'">':"<li>")+'<input type="hidden" class="item-permalink" value="'+this.permalink+'" /><span class="item-title">')+(this.title||l.noTitle))+'</span><span class="item-info">'+this.info+"</span></li>",a=!a}):t&&(i+='<li class="unselectable no-matches-found"><span class="item-title"><em>'+l.noMatchesFound+"</em></span></li>"),this.ul[t?"html":"append"](i)},maybeLoad:function(){var n=this,i=this.element,e=i.scrollTop()+i.height();!this.query.ready()||e<this.contentHeight.height()-wpLink.riverBottomThreshold||setTimeout(function(){var e=i.scrollTop(),t=e+i.height();!n.query.ready()||t<n.contentHeight.height()-wpLink.riverBottomThreshold||(n.waiting.addClass("is-active"),i.scrollTop(e+n.waiting.outerHeight()),n.ajax(function(){n.waiting.removeClass("is-active")}))},wpLink.timeToTriggerRiver)}}),n=function(e){this.page=1,this.allLoaded=!1,this.querying=!1,this.search=e},s.extend(n.prototype,{ready:function(){return!(this.querying||this.allLoaded)},ajax:function(t){var n=this,i={action:"wp-link-ajax",page:this.page,_ajax_linking_nonce:p.nonce.val()};this.search&&(i.search=this.search),this.querying=!0,s.post(window.ajaxurl,i,function(e){n.page++,n.querying=!1,n.allLoaded=!e,t(e,i)},"json")}}),s(wpLink.init)}(jQuery,window.wpLinkL10n,window.wp);                                                                                                                                                                                                                                                                                                                                                                                                                                                                           zxcvbn-async.js                                                                                     0000644                 00000001465 15212564053 0007540 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /**
 * @output wp-includes/js/zxcvbn-async.js
 */

/* global _zxcvbnSettings */

/**
 * Loads zxcvbn asynchronously by inserting an async script tag before the first
 * script tag on the page.
 *
 * This makes sure zxcvbn isn't blocking loading the page as it is a big
 * library. The source for zxcvbn is read from the _zxcvbnSettings global.
 */
(function() {
  var async_load = function() {
    var first, s;
    s = document.createElement('script');
    s.src = _zxcvbnSettings.src;
    s.type = 'text/javascript';
    s.async = true;
    first = document.getElementsByTagName('script')[0];
    return first.parentNode.insertBefore(s, first);
  };

  if (window.attachEvent != null) {
    window.attachEvent('onload', async_load);
  } else {
    window.addEventListener('load', async_load, false);
  }
}).call(this);
                                                                                                                                                                                                           zxcvbn-async.min.js                                                                                 0000644                 00000000537 15212564053 0010321 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
!function(){function t(){var t,e=document.createElement("script");return e.src=_zxcvbnSettings.src,e.type="text/javascript",e.async=!0,(t=document.getElementsByTagName("script")[0]).parentNode.insertBefore(e,t)}null!=window.attachEvent?window.attachEvent("onload",t):window.addEventListener("load",t,!1)}.call(this);                                                                                                                                                                 zxcvbn.min.js                                                                                       0000644                 00003105735 15212564053 0007217 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       /*! This file is auto-generated */
/*! zxcvbn - v4.4.1
 * realistic password strength estimation
 * https://github.com/dropbox/zxcvbn
 * Copyright (c) 2012 Dropbox, Inc.; Licensed MIT */
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.zxcvbn = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
var adjacency_graphs;adjacency_graphs={qwerty:{"!":["`~",null,null,"2@","qQ",null],'"':[";:","[{","]}",null,null,"/?"],"#":["2@",null,null,"4$","eE","wW"],$:["3#",null,null,"5%","rR","eE"],"%":["4$",null,null,"6^","tT","rR"],"&":["6^",null,null,"8*","uU","yY"],"'":[";:","[{","]}",null,null,"/?"],"(":["8*",null,null,"0)","oO","iI"],")":["9(",null,null,"-_","pP","oO"],"*":["7&",null,null,"9(","iI","uU"],"+":["-_",null,null,null,"]}","[{"],",":["mM","kK","lL",".>",null,null],"-":["0)",null,null,"=+","[{","pP"],".":[",<","lL",";:","/?",null,null],"/":[".>",";:","'\"",null,null,null],0:["9(",null,null,"-_","pP","oO"],1:["`~",null,null,"2@","qQ",null],2:["1!",null,null,"3#","wW","qQ"],3:["2@",null,null,"4$","eE","wW"],4:["3#",null,null,"5%","rR","eE"],5:["4$",null,null,"6^","tT","rR"],6:["5%",null,null,"7&","yY","tT"],7:["6^",null,null,"8*","uU","yY"],8:["7&",null,null,"9(","iI","uU"],9:["8*",null,null,"0)","oO","iI"],":":["lL","pP","[{","'\"","/?",".>"],";":["lL","pP","[{","'\"","/?",".>"],"<":["mM","kK","lL",".>",null,null],"=":["-_",null,null,null,"]}","[{"],">":[",<","lL",";:","/?",null,null],"?":[".>",";:","'\"",null,null,null],"@":["1!",null,null,"3#","wW","qQ"],A:[null,"qQ","wW","sS","zZ",null],B:["vV","gG","hH","nN",null,null],C:["xX","dD","fF","vV",null,null],D:["sS","eE","rR","fF","cC","xX"],E:["wW","3#","4$","rR","dD","sS"],F:["dD","rR","tT","gG","vV","cC"],G:["fF","tT","yY","hH","bB","vV"],H:["gG","yY","uU","jJ","nN","bB"],I:["uU","8*","9(","oO","kK","jJ"],J:["hH","uU","iI","kK","mM","nN"],K:["jJ","iI","oO","lL",",<","mM"],L:["kK","oO","pP",";:",".>",",<"],M:["nN","jJ","kK",",<",null,null],N:["bB","hH","jJ","mM",null,null],O:["iI","9(","0)","pP","lL","kK"],P:["oO","0)","-_","[{",";:","lL"],Q:[null,"1!","2@","wW","aA",null],R:["eE","4$","5%","tT","fF","dD"],S:["aA","wW","eE","dD","xX","zZ"],T:["rR","5%","6^","yY","gG","fF"],U:["yY","7&","8*","iI","jJ","hH"],V:["cC","fF","gG","bB",null,null],W:["qQ","2@","3#","eE","sS","aA"],X:["zZ","sS","dD","cC",null,null],Y:["tT","6^","7&","uU","hH","gG"],Z:[null,"aA","sS","xX",null,null],"[":["pP","-_","=+","]}","'\"",";:"],"\\":["]}",null,null,null,null,null],"]":["[{","=+",null,"\\|",null,"'\""],"^":["5%",null,null,"7&","yY","tT"],_:["0)",null,null,"=+","[{","pP"],"`":[null,null,null,"1!",null,null],a:[null,"qQ","wW","sS","zZ",null],b:["vV","gG","hH","nN",null,null],c:["xX","dD","fF","vV",null,null],d:["sS","eE","rR","fF","cC","xX"],e:["wW","3#","4$","rR","dD","sS"],f:["dD","rR","tT","gG","vV","cC"],g:["fF","tT","yY","hH","bB","vV"],h:["gG","yY","uU","jJ","nN","bB"],i:["uU","8*","9(","oO","kK","jJ"],j:["hH","uU","iI","kK","mM","nN"],k:["jJ","iI","oO","lL",",<","mM"],l:["kK","oO","pP",";:",".>",",<"],m:["nN","jJ","kK",",<",null,null],n:["bB","hH","jJ","mM",null,null],o:["iI","9(","0)","pP","lL","kK"],p:["oO","0)","-_","[{",";:","lL"],q:[null,"1!","2@","wW","aA",null],r:["eE","4$","5%","tT","fF","dD"],s:["aA","wW","eE","dD","xX","zZ"],t:["rR","5%","6^","yY","gG","fF"],u:["yY","7&","8*","iI","jJ","hH"],v:["cC","fF","gG","bB",null,null],w:["qQ","2@","3#","eE","sS","aA"],x:["zZ","sS","dD","cC",null,null],y:["tT","6^","7&","uU","hH","gG"],z:[null,"aA","sS","xX",null,null],"{":["pP","-_","=+","]}","'\"",";:"],"|":["]}",null,null,null,null,null],"}":["[{","=+",null,"\\|",null,"'\""],"~":[null,null,null,"1!",null,null]},dvorak:{"!":["`~",null,null,"2@","'\"",null],'"':[null,"1!","2@",",<","aA",null],"#":["2@",null,null,"4$",".>",",<"],$:["3#",null,null,"5%","pP",".>"],"%":["4$",null,null,"6^","yY","pP"],"&":["6^",null,null,"8*","gG","fF"],"'":[null,"1!","2@",",<","aA",null],"(":["8*",null,null,"0)","rR","cC"],")":["9(",null,null,"[{","lL","rR"],"*":["7&",null,null,"9(","cC","gG"],"+":["/?","]}",null,"\\|",null,"-_"],",":["'\"","2@","3#",".>","oO","aA"],"-":["sS","/?","=+",null,null,"zZ"],".":[",<","3#","4$","pP","eE","oO"],"/":["lL","[{","]}","=+","-_","sS"],0:["9(",null,null,"[{","lL","rR"],1:["`~",null,null,"2@","'\"",null],2:["1!",null,null,"3#",",<","'\""],3:["2@",null,null,"4$",".>",",<"],4:["3#",null,null,"5%","pP",".>"],5:["4$",null,null,"6^","yY","pP"],6:["5%",null,null,"7&","fF","yY"],7:["6^",null,null,"8*","gG","fF"],8:["7&",null,null,"9(","cC","gG"],9:["8*",null,null,"0)","rR","cC"],":":[null,"aA","oO","qQ",null,null],";":[null,"aA","oO","qQ",null,null],"<":["'\"","2@","3#",".>","oO","aA"],"=":["/?","]}",null,"\\|",null,"-_"],">":[",<","3#","4$","pP","eE","oO"],"?":["lL","[{","]}","=+","-_","sS"],"@":["1!",null,null,"3#",",<","'\""],A:[null,"'\"",",<","oO",";:",null],B:["xX","dD","hH","mM",null,null],C:["gG","8*","9(","rR","tT","hH"],D:["iI","fF","gG","hH","bB","xX"],E:["oO",".>","pP","uU","jJ","qQ"],F:["yY","6^","7&","gG","dD","iI"],G:["fF","7&","8*","cC","hH","dD"],H:["dD","gG","cC","tT","mM","bB"],I:["uU","yY","fF","dD","xX","kK"],J:["qQ","eE","uU","kK",null,null],K:["jJ","uU","iI","xX",null,null],L:["rR","0)","[{","/?","sS","nN"],M:["bB","hH","tT","wW",null,null],N:["tT","rR","lL","sS","vV","wW"],O:["aA",",<",".>","eE","qQ",";:"],P:[".>","4$","5%","yY","uU","eE"],Q:[";:","oO","eE","jJ",null,null],R:["cC","9(","0)","lL","nN","tT"],S:["nN","lL","/?","-_","zZ","vV"],T:["hH","cC","rR","nN","wW","mM"],U:["eE","pP","yY","iI","kK","jJ"],V:["wW","nN","sS","zZ",null,null],W:["mM","tT","nN","vV",null,null],X:["kK","iI","dD","bB",null,null],Y:["pP","5%","6^","fF","iI","uU"],Z:["vV","sS","-_",null,null,null],"[":["0)",null,null,"]}","/?","lL"],"\\":["=+",null,null,null,null,null],"]":["[{",null,null,null,"=+","/?"],"^":["5%",null,null,"7&","fF","yY"],_:["sS","/?","=+",null,null,"zZ"],"`":[null,null,null,"1!",null,null],a:[null,"'\"",",<","oO",";:",null],b:["xX","dD","hH","mM",null,null],c:["gG","8*","9(","rR","tT","hH"],d:["iI","fF","gG","hH","bB","xX"],e:["oO",".>","pP","uU","jJ","qQ"],f:["yY","6^","7&","gG","dD","iI"],g:["fF","7&","8*","cC","hH","dD"],h:["dD","gG","cC","tT","mM","bB"],i:["uU","yY","fF","dD","xX","kK"],j:["qQ","eE","uU","kK",null,null],k:["jJ","uU","iI","xX",null,null],l:["rR","0)","[{","/?","sS","nN"],m:["bB","hH","tT","wW",null,null],n:["tT","rR","lL","sS","vV","wW"],o:["aA",",<",".>","eE","qQ",";:"],p:[".>","4$","5%","yY","uU","eE"],q:[";:","oO","eE","jJ",null,null],r:["cC","9(","0)","lL","nN","tT"],s:["nN","lL","/?","-_","zZ","vV"],t:["hH","cC","rR","nN","wW","mM"],u:["eE","pP","yY","iI","kK","jJ"],v:["wW","nN","sS","zZ",null,null],w:["mM","tT","nN","vV",null,null],x:["kK","iI","dD","bB",null,null],y:["pP","5%","6^","fF","iI","uU"],z:["vV","sS","-_",null,null,null],"{":["0)",null,null,"]}","/?","lL"],"|":["=+",null,null,null,null,null],"}":["[{",null,null,null,"=+","/?"],"~":[null,null,null,"1!",null,null]},keypad:{"*":["/",null,null,null,"-","+","9","8"],"+":["9","*","-",null,null,null,null,"6"],"-":["*",null,null,null,null,null,"+","9"],".":["0","2","3",null,null,null,null,null],"/":[null,null,null,null,"*","9","8","7"],0:[null,"1","2","3",".",null,null,null],1:[null,null,"4","5","2","0",null,null],2:["1","4","5","6","3",".","0",null],3:["2","5","6",null,null,null,".","0"],4:[null,null,"7","8","5","2","1",null],5:["4","7","8","9","6","3","2","1"],6:["5","8","9","+",null,null,"3","2"],7:[null,null,null,"/","8","5","4",null],8:["7",null,"/","*","9","6","5","4"],9:["8","/","*","-","+",null,"6","5"]},mac_keypad:{"*":["/",null,null,null,null,null,"-","9"],"+":["6","9","-",null,null,null,null,"3"],"-":["9","/","*",null,null,null,"+","6"],".":["0","2","3",null,null,null,null,null],"/":["=",null,null,null,"*","-","9","8"],0:[null,"1","2","3",".",null,null,null],1:[null,null,"4","5","2","0",null,null],2:["1","4","5","6","3",".","0",null],3:["2","5","6","+",null,null,".","0"],4:[null,null,"7","8","5","2","1",null],5:["4","7","8","9","6","3","2","1"],6:["5","8","9","-","+",null,"3","2"],7:[null,null,null,"=","8","5","4",null],8:["7",null,"=","/","9","6","5","4"],9:["8","=","/","*","-","+","6","5"],"=":[null,null,null,null,"/","9","8","7"]}},module.exports=adjacency_graphs;

},{}],2:[function(require,module,exports){
var feedback,scoring;scoring=require("./scoring"),feedback={default_feedback:{warning:"",suggestions:["Use a few words, avoid common phrases","No need for symbols, digits, or uppercase letters"]},get_feedback:function(e,s){var a,t,r,n,o,i;if(0===s.length)return this.default_feedback;if(e>2)return{warning:"",suggestions:[]};for(n=s[0],i=s.slice(1),t=0,r=i.length;t<r;t++)o=i[t],o.token.length>n.token.length&&(n=o);return feedback=this.get_match_feedback(n,1===s.length),a="Add another word or two. Uncommon words are better.",null!=feedback?(feedback.suggestions.unshift(a),null==feedback.warning&&(feedback.warning="")):feedback={warning:"",suggestions:[a]},feedback},get_match_feedback:function(e,s){var a,t;switch(e.pattern){case"dictionary":return this.get_dictionary_match_feedback(e,s);case"spatial":return a=e.graph.toUpperCase(),t=1===e.turns?"Straight rows of keys are easy to guess":"Short keyboard patterns are easy to guess",{warning:t,suggestions:["Use a longer keyboard pattern with more turns"]};case"repeat":return t=1===e.base_token.length?'Repeats like "aaa" are easy to guess':'Repeats like "abcabcabc" are only slightly harder to guess than "abc"',{warning:t,suggestions:["Avoid repeated words and characters"]};case"sequence":return{warning:"Sequences like abc or 6543 are easy to guess",suggestions:["Avoid sequences"]};case"regex":if("recent_year"===e.regex_name)return{warning:"Recent years are easy to guess",suggestions:["Avoid recent years","Avoid years that are associated with you"]};break;case"date":return{warning:"Dates are often easy to guess",suggestions:["Avoid dates and years that are associated with you"]}}},get_dictionary_match_feedback:function(e,s){var a,t,r,n,o;return n="passwords"===e.dictionary_name?!s||e.l33t||e.reversed?e.guesses_log10<=4?"This is similar to a commonly used password":void 0:e.rank<=10?"This is a top-10 common password":e.rank<=100?"This is a top-100 common password":"This is a very common password":"english"===e.dictionary_name?s?"A word by itself is easy to guess":void 0:"surnames"===(a=e.dictionary_name)||"male_names"===a||"female_names"===a?s?"Names and surnames by themselves are easy to guess":"Common names and surnames are easy to guess":"",r=[],o=e.token,o.match(scoring.START_UPPER)?r.push("Capitalization doesn't help very much"):o.match(scoring.ALL_UPPER)&&o.toLowerCase()!==o&&r.push("All-uppercase is almost as easy to guess as all-lowercase"),e.reversed&&e.token.length>=4&&r.push("Reversed words aren't much harder to guess"),e.l33t&&r.push("Predictable substitutions like '@' instead of 'a' don't help very much"),t={warning:n,suggestions:r}}},module.exports=feedback;

},{"./scoring":6}],3:[function(require,module,exports){
var frequency_lists;frequency_lists={passwords:"123456,cnffjbeq,12345678,djregl,123456789,12345,1234,111111,1234567,qentba,123123,onfronyy,nop123,sbbgonyy,zbaxrl,yrgzrva,funqbj,znfgre,696969,zhfgnat,666666,djreglhvbc,123321,1234567890,chffl,fhcrezna,654321,1dnm2jfk,7777777,shpxlbh,dnmjfk,wbeqna,123djr,000000,xvyyre,gehfgab1,uhagre,uneyrl,mkpioaz,nfqstu,ohfgre,ongzna,fbppre,gvttre,puneyvr,fhafuvar,vybirlbh,shpxzr,enatre,ubpxrl,pbzchgre,fgnejnef,nffubyr,crccre,xynfgre,112233,mkpioa,serrqbz,cevaprff,znttvr,cnff,tvatre,11111111,131313,shpx,ybir,purrfr,159753,fhzzre,puryfrn,qnyynf,ovgrzr,zngevk,lnaxrrf,6969,pbeirggr,nhfgva,npprff,guhaqre,zreyva,frperg,qvnzbaq,uryyb,unzzre,shpxre,1234djre,fvyire,tsuwxz,vagrearg,fnznagun,tbysre,fpbbgre,grfg,benatr,pbbxvr,d1j2r3e4g5,znirevpx,fcnexl,cubravk,zvpxrl,ovtqbt,fabbcl,thvgne,jungrire,puvpxra,pnzneb,zreprqrf,crnahg,sreenev,snypba,pbjobl,jrypbzr,frkl,fnzfhat,fgrryref,fzbxrl,qnxbgn,nefrany,obbzre,rntyrf,gvtref,znevan,anfpne,obbobb,tngrjnl,lryybj,cbefpur,zbafgre,fcvqre,qvnoyb,unaanu,ohyyqbt,whavbe,ybaqba,checyr,pbzcnd,ynxref,vprzna,djre1234,uneqpber,pbjoblf,zbarl,onanan,app1701,obfgba,graavf,d1j2r3e4,pbssrr,fpbbol,123654,avxvgn,lnznun,zbgure,onearl,oenaql,purfgre,shpxbss,byvire,cynlre,sberire,enatref,zvqavtug,puvpntb,ovtqnqql,erqfbk,natry,onqobl,sraqre,wnfcre,fynlre,enoovg,angnfun,znevar,ovtqvpx,jvmneq,zneyobeb,envqref,cevapr,pnfcre,svfuvat,sybjre,wnfzvar,vjnagh,cnagvrf,nqvqnf,jvagre,jvaare,tnaqnys,cnffjbeq1,ragre,tuoqga,1d2j3r4e,tbyqra,pbpnpbyn,wbeqna23,jvafgba,znqvfba,natryf,cnagure,oybjzr,frkfrk,ovtgvgf,fcnaxl,ovgpu,fbcuvr,nfqsnfqs,ubeal,guk1138,gblbgn,gvtre,qvpx,pnanqn,12344321,oybjwbo,8675309,zhssva,yvirecbb,nccyrf,djregl123,cnffj0eq,nopq1234,cbxrzba,123nop,fyvcxabg,dnmkfj,123456n,fpbecvba,djnfmk,ohggre,fgnegerx,envaobj,nfqstuwxy,enmm,arjlbex,erqfxvaf,trzvav,pnzreba,dnmjfkrqp,sybevqn,yvirecbby,ghegyr,fvreen,ivxvat,obbtre,ohggurnq,qbpgbe,ebpxrg,159357,qbycuvaf,pncgnva,onaqvg,wnthne,cnpxref,cbbxvr,crnpurf,789456,nfqs,qbycuva,uryczr,oyhr,gurzna,znkjryy,djreglhv,fuvgurnq,ybiref,znqqbt,tvnagf,aveinan,zrgnyyvp,ubgqbt,ebfrohq,zbhagnva,jneevbe,fghcvq,ryrcunag,fhpxvg,fhpprff,obaq007,wnpxnff,nyrkvf,cbea,yhpxl,fpbecvb,fnzfba,d1j2r3,nmregl,ehfu2112,qevire,serqql,1d2j3r4e5g,flqarl,tngbef,qrkgre,erq123,123456d,12345n,ohoon,perngvir,ibbqbb,tbys,gebhoyr,nzrevpn,avffna,thaare,tnesvryq,ohyyfuvg,nfqstuwx,5150,shpxvat,ncbyyb,1dnmkfj2,2112,rzvarz,yrtraq,nveobear,orne,ornivf,nccyr,oebbxyla,tbqmvyyn,fxvccl,4815162342,ohqql,djreg,xvggra,zntvp,furyol,ornire,cunagbz,nfqnfq,knivre,oenirf,qnexarff,oyvax182,pbccre,cyngvahz,djrdjr,gbzpng,01012011,tveyf,ovtobl,102030,navzny,cbyvpr,bayvar,11223344,iblntre,yvsrunpx,12djnfmk,svfu,favcre,315475,gevavgl,oynmre,urnira,ybire,fabjonyy,cynlobl,ybirzr,ohooyrf,ubbgref,pevpxrg,jvyybj,qbaxrl,gbctha,avagraqb,fnghea,qrfgval,cnxvfgna,chzcxva,qvtvgny,fretrl,erqjvatf,rkcybere,gvgf,cevingr,ehaare,gurebpx,thvaarff,ynfirtnf,orngyrf,789456123,sver,pnffvr,puevfgva,djregl1,prygvp,nfqs1234,naqerl,oebapbf,007007,onoltvey,rpyvcfr,syhssl,pnegzna,zvpuvtna,pnebyvan,grfgvat,nyrknaqr,oveqvr,cnagren,pureel,inzcver,zrkvpb,qvpxurnq,ohssnyb,travhf,zbagnan,orre,zvarpensg,znkvzhf,sylref,ybiryl,fgnyxre,zrgnyyvpn,qbttvr,favpxref,fcrrql,oebapb,yby123,cnenqvfr,lnaxrr,ubefrf,zntahz,qernzf,147258369,ynpebffr,bh812,tbbore,ravtzn,djreglh,fpbggl,cvzcva,obyybpxf,fhesre,pbpx,cbbuorne,trarfvf,fgne,nfq123,djrnfqmkp,enpvat,uryyb1,unjnvv,rntyr1,ivcre,cbbcbb,rvafgrva,obbovrf,12345d,ovgpurf,qebjffnc,fvzcyr,onqtre,nynfxn,npgvba,wrfgre,qehzzre,111222,fcvgsver,sberfg,znelwnar,punzcvba,qvrfry,firgynan,sevqnl,ubgebq,147258,puril,yhpxl1,jrfgfvqr,frphevgl,tbbtyr,onqnff,grfgre,fubegl,guhzcre,uvgzna,zbmneg,mnd12jfk,obbof,erqqbt,010203,yvmneq,n123456,123456789n,ehfyna,rntyr,1232323d,fpnesnpr,djregl12,147852,n12345,ohqqun,cbeab,420420,fcvevg,zbarl1,fgnetngr,djr123,anehgb,zrephel,yvoregl,12345djreg,frzcresv,fhmhxv,cbcpbea,fcbbxl,zneyrl,fpbgynaq,xvggl,purebxrr,ivxvatf,fvzcfbaf,enfpny,djrnfq,uhzzre,ybirlbh,zvpunry1,cngpurf,ehffvn,whcvgre,crathva,cnffvba,phzfubg,isuols,ubaqn,iynqvzve,fnaqzna,cnffcbeg,envqre,onfgneq,123789,vasvavgl,nffzna,ohyyqbtf,snagnfl,fhpxre,1234554321,ubearl,qbzvab,ohqyvtug,qvfarl,vebazna,hfhpxonyym1,fbsgonyy,oehghf,erqehz,ovterq,zaoipkm,sxgepslyu,xnevan,znevarf,qvttre,xnjnfnxv,pbhtne,sverzna,bxfnan,zbaqnl,phag,whfgvpr,avttre,fhcre,jvyqpngf,gvaxre,ybtvgrpu,qnapre,fjbeqsvf,ninyba,riregba,nyrknaqe,zbgbebyn,cngevbgf,uragnv,znqbaan,chffl1,qhpngv,pbybenqb,pbaabe,whiraghf,tnyber,fzbbgu,serrhfre,jnepensg,obbtvr,gvgnavp,jbyireva,ryvmnorg,nevmban,inyragva,fnvagf,nfqst,nppbeq,grfg123,cnffjbeq123,puevfg,lsasvs,fgvaxl,fyhg,fcvqrezn,anhtugl,pubccre,uryyb123,app1701q,rkgerzr,fxlyvar,cbbc,mbzovr,crneywnz,123djrnfq,sebttl,njrfbzr,ivfvba,cvengr,slyugd,qernzre,ohyyrg,cerqngbe,rzcver,123123n,xvevyy,puneyvr1,cnaguref,cravf,fxvccre,arzrfvf,enfqmi3,crrxnobb,ebyygvqr,pneqvany,cflpub,qnatre,zbbxvr,unccl1,jnaxre,puriryyr,znahgq,tboyhr,9379992,uboorf,irtrgn,slspaspom,852456,cvpneq,159951,jvaqbjf,ybireobl,ivpgbel,isepoi,onzonz,frertn,123654789,ghexrl,gjrrgl,tnyvan,uvcubc,ebbfgre,punatrzr,oreyva,gnhehf,fhpxzr,cbyvan,ryrpgevp,ningne,134679,znxfvz,encgbe,nycun1,uraqevk,arjcbeg,ovtpbpx,oenmvy,fcevat,n1o2p3,znqznk,nycun,oevgarl,fhoyvzr,qnexfvqr,ovtzna,jbyscnpx,pynffvp,urephyrf,ebanyqb,yrgzrva1,1d2j3r,741852963,fcvqrezna,oyvmmneq,123456789d,purlraar,pwxlfvew,gvtre1,jbzong,ohoon1,cnaqben,mkp123,ubyvqnl,jvyqpng,qrivyf,ubefr,nynonzn,147852369,pnrfne,12312,ohqql1,obaqntr,chfflpng,cvpxyr,funttl,pngpu22,yrngure,puebavp,n1o2p3q4,nqzva,ddd111,dnm123,nvecynar,xbqvnx,serrcnff,ovyylobo,fhafrg,xngnan,cucoo,pubpbyng,fabjzna,natry1,fgvatenl,sveroveq,jbyirf,mrccryva,qrgebvg,cbagvnp,thaqnz,cnamre,intvan,bhgynj,erqurnq,gneurryf,terraqnl,anfgln,01011980,uneqba,ratvarre,qentba1,uryysver,freravgl,pboen,sveronyy,yvpxzr,qnexfgne,1029384756,01011,zhfgnat1,synfu,124578,fgevxr,ornhgl,cnivyvba,01012000,obonsrgg,qoeawuom,ovtznp,objyvat,puevf1,lgerjd,angnyv,clenzvq,ehyrm,jrypbzr1,qbqtref,ncnpur,fjvzzvat,julabg,grraf,gebbcre,shpxvg,qrsraqre,cerpvbhf,135790,cnpxneq,jrnfry,cbcrlr,yhpvsre,pnapre,vprpernz,142536,enira,fjbeqsvfu,cerfnevb,ivxgbe,ebpxfgne,oybaqr,wnzrf1,jhgnat,fcvxr,cvzc,ngynagn,nvesbepr,gunvynaq,pnfvab,yraaba,zbhfr,741852,unpxre,oyhroveq,unjxrlr,456123,gurbar,pngsvfu,fnvybe,tbyqsvfu,asazmls,gnggbb,creireg,oneovr,znkvzn,avccyrf,znpuvar,gehpxf,jenatyre,ebpxf,gbeanqb,yvtugf,pnqvyynp,ohooyr,crtnfhf,znqzna,ybatubea,oebjaf,gnetrg,666999,rngzr,dnmjfk123,zvpebfbsg,qvyoreg,puevfgvn,onyyre,yrfovna,fubbgre,ksvyrf,frnggyr,dnmdnm,pguhgd,nzngrhe,ceryhqr,pbeban,sernxl,znyvoh,123djrnfqmkp,nffnffva,246810,ngynagvf,vagrten,chffvrf,vybirh,ybarjbys,qentbaf,zbaxrl1,havpbea,fbsgjner,obopng,fgrnygu,crrjrr,bcrahc,753951,fevavinf,mndjfk,inyragvan,fubgtha,gevttre,irebavxn,oehvaf,pblbgr,onolqbyy,wbxre,qbyyne,yrfgng,ebpxl1,ubggvr,enaqbz,ohggresyl,jbeqcnff,fzvyrl,fjrrgl,fanxr,puvccre,jbbql,fnzhenv,qrivyqbt,tvmzb,znqqvr,fbfb123nywt,zvfgerff,serrqbz1,syvccre,rkcerff,uwisves,zbbfr,prffan,cvtyrg,cbynevf,grnpure,zbagerny,pbbxvrf,jbystnat,fphyyl,sngobl,jvpxrq,onyyf,gvpxyr,ohaal,qsitou,sbbone,genafnz,crcfv,srgvfu,bvph812,onfxrgon,gbfuvon,ubgfghss,fhaqnl,obbgl,tnzovg,31415926,vzcnyn,fgrcunav,wrffvpn1,ubbxre,ynapre,xavpxf,funzebpx,shpxlbh2,fgvatre,314159,erqarpx,qrsgbarf,fdhveg,fvrzraf,oynfgre,gehpxre,fhoneh,erartnqr,vonarm,znafba,fjvatre,erncre,oybaqvr,zlybir,tnynkl,oynuoynu,ragrecev,geniry,1234nopq,onolyba5,vaqvnan,fxrrgre,znfgre1,fhtne,svpxra,fzbxr,ovtbar,fjrrgcrn,shpxrq,gesaguols,znevab,rfpbeg,fzvggl,ovtsbbg,onorf,ynevfn,gehzcrg,fcnegna,inyren,onolyba,nfqstuw,lnaxrrf1,ovtobbof,fgbezl,zvfgre,unzyrg,nneqinex,ohggresy,znenguba,cnynqva,pninyvre,znapurfgre,fxngre,vaqvtb,ubearg,ohpxrlrf,01011990,vaqvnaf,xnengr,urfblnz,gbebagb,qvnzbaqf,puvrsf,ohpxrlr,1dnm2jfk3rqp,uvtuynaq,ubgfrk,punetre,erqzna,cnffjbe,znvqra,qecrccre,fgbez,cbeafgne,tneqra,12345678910,crapvy,fureybpx,gvzore,guhtyvsr,vafnar,cvmmn,whatyr,wrfhf1,nentbea,1n2o3p,unzfgre,qnivq1,gevhzcu,grpuab,ybyyby,cvbarre,pngqbt,321654,sxgepgd,zbecurhf,141627,cnfpny,funqbj1,uboovg,jrgchffl,rebgvp,pbafhzre,oynoyn,whfgzr,fgbarf,puevffl,fcnegnx,tbsbevg,ohetre,cvgohyy,nqtwzcgj,vgnyvn,onepryban,uhagvat,pbybef,xvffzr,ivetva,bireybeq,crooyrf,fhaqnapr,rzrenyq,qbttl,enprpne,vevan,ryrzrag,1478963,mvccre,nycvar,onfxrg,tbqqrff,cbvfba,avccyr,fnxhen,puvpuv,uhfxref,13579,chfflf,d12345,hygvzngr,app1701r,oynpxvr,avpbyn,ebzzry,znggurj1,pnfregn,bzrtn,trebavzb,fnzzl1,gebwna,123djr123,cuvyvcf,ahttrg,gnemna,puvpxf,nyrxfnaqe,onffzna,gevkvr,cbeghtny,nanxva,qbqtre,obzore,fhcresyl,znqarff,d1j2r3e4g5l6,ybfre,123nfq,sngpng,loeoas,fbyqvre,jneybpx,jevaxyr1,qrfver,frkhny,onor,frzvabyr,nyrwnaqe,951753,11235813,jrfgunz,naqerv,pbapergr,npprff14,jrrq,yrgzrva2,ynqloht,anxrq,puevfgbc,gebzobar,gvagva,oyhrfxl,euopaols,dnmkfjrqp,barybir,pqgaxsls,juber,isiwkes,gvgnaf,fgnyyvba,gehpx,unafbyb,oyhr22,fzvyrf,orntyr,cnanzn,xvatxbat,syngeba,vasreab,zbatbbfr,pbaarpg,cbvhlg,fangpu,dnjfrq,whvpr,oyrffrq,ebpxre,fanxrf,gheob,oyhrzbba,frk4zr,svatre,wnznvpn,n1234567,zhyqre,orrgyr,shpxlbh1,cnffng,vzzbegny,cynfgvp,123454321,nagubal1,juvfxrl,qvrgpbxr,fhpx,fchaxl,zntvp1,zbavgbe,pnpghf,rkvtra,cynarg,evccre,grra,fclqre,nccyr1,abyvzvg,ubyyljbb,fyhgf,fgvpxl,gehaxf,1234321,14789632,cvpxyrf,fnvyvat,obarurnq,tuoqgaoe,qrygn,puneybgg,ehoore,911911,112358,zbyyl1,lbznzn,ubatxbat,whzcre,jvyyvnz1,vybirfrk,snfgre,haerny,phzzvat,zrzcuvf,1123581321,alybaf,yrtvba,fronfgvn,funybz,cragvhz,trurvz,jrerjbys,shagvzr,sreerg,bevba,phevbhf,555666,avaref,pnagban,fcevgr,cuvyyl,cvengrf,noteglh,ybyyvcbc,rgreavgl,obrvat,fhcre123,fjrrgf,pbbyqhqr,gbggraun,terra1,wnpxbss,fgbpxvat,7895123,zbbzbb,znegvav,ovfphvg,qevmmg,pbyg45,sbffvy,znxniryv,fanccre,fngna666,znavnp,fnyzba,cngevbg,ireongvz,anfgl,funfgn,nfqmkp,funirq,oynpxpng,envfgyva,djregl12345,chaxebpx,pwxljg,01012010,4128,jngreybb,pevzfba,gjvfgre,bksbeq,zhfvpzna,frvasryq,ovttvr,pbaqbe,eniraf,zrtnqrgu,jbyszna,pbfzbf,funexf,onafurr,xrrcre,sbkgebg,ta56ta56,fxljnyxr,iryirg,oynpx1,frfnzr,qbtf,fdhveery,cevirg,fhaevfr,jbyirevar,fhpxf,yrtbynf,teraqry,tubfg,pngf,pneebg,sebfgl,yioauod,oynqrf,fgneqhfg,sebt,dnmjfkrq,121314,pbbyvb,oebjavr,tebbil,gjvyvtug,qnlgban,inaunyra,cvxnpuh,crnahgf,yvpxre,urefurl,wrevpub,vagercvq,avawn,1234567n,mnd123,ybofgre,tboyva,chavfure,fgevqre,fubtha,xnafnf,nznqrhf,frira7,wnfba1,arcghar,fubjgvzr,zhfpyr,byqzna,rxngrevan,esesves,trgfbzr,fubjzr,111222333,bovjna,fxvggyrf,qnaav,gnaxre,znrfgeb,gneurry,nahovf,unaavony,nany,arjyvsr,tbguvp,funex,svtugre,oyhr123,oyhrf,123456m,cevaprf,fyvpx,punbf,guhaqre1,fnovar,1d2j3r4e5g6l,clguba,grfg1,zventr,qrivy,pybire,grdhvyn,puryfrn1,fhesvat,qryrgr,cbgngb,puhool,cnanfbavp,fnaqvrtb,cbegynaq,onttvaf,shfvba,fbbaref,oynpxqbt,ohggbaf,pnyvsbea,zbfpbj,cynlgvzr,zngher,1n2o3p4q,qnttre,qvzn,fgvzcl,nfqs123,tnatfgre,jneevbef,virefba,punetref,olgrzr,fjnyybj,yvdhvq,yhpxl7,qvatqbat,alzrgf,penpxre,zhfuebbz,456852,pehfnqre,ovtthl,zvnzv,qxsyoiou,ohttre,avzebq,gnmzna,fgenatre,arjcnff,qbbqyr,cbjqre,tbgpun,thneqvna,qhoyva,fyncfubg,frcgrzor,147896325,crcfv1,zvynab,tevmmyl,jbbql1,xavtugf,cubgbf,2468,abbxvr,puneyl,enzzfgrva,oenfvy,123321123,fpehssl,zhapuxva,cbbcvr,123098,xvgglpng,yngvab,jnyahg,1701,gurtnzr,ivcre1,1cnffjbe,xbybobx,cvpnffb,eboreg1,onepryba,onananf,genapr,nhohea,pbygenar,rngfuvg,tbbqyhpx,fgnepensg,jurryf,cneebg,cbfgny,oynqr,jvfqbz,cvax,tbevyyn,xngrevan,cnff123,naqerj1,funarl14,qhzonff,bfvevf,shpx_vafvqr,bnxynaq,qvfpbire,enatre1,fcnaxvat,ybarfgne,ovatb,zrevqvna,cvat,urngure1,qbbxvr,fgbarpby,zrtnzna,192837465,ewaglwe,yrqmrc,ybjevqre,25802580,evpuneq1,sversyl,tevssrl,enprek,cnenqbk,tuwpaw,tnatfgn,mnd1kfj2,gnpboryy,jrrmre,fvevhf,unysyvsr,ohssrgg,fuvybu,123698745,iregvtb,fretrv,nyvraf,fbonxn,xrlobneq,xnatnebb,fvaare,fbppre1,0.0.000,obawbhe,fbpengrf,puhpxl,ubgobl,fcevag,0007,fnenu1,fpneyrg,pryvpn,funmnz,sbezhyn1,fbzzre,gerobe,djrenfqs,wrrc,znvyperngrq5240,obyybk,nffubyr1,shpxsnpr,ubaqn1,eroryf,inpngvba,yrkznex,crathvaf,12369874,entanebx,sbezhyn,258456,grzcrfg,isurpm,gnpbzn,djregm,pbybzovn,synzrf,ebpxba,qhpx,cebqvtl,jbbxvr,qbqtrenz,zhfgnatf,123dnm,fvguybeq,fzbxre,freire,onat,vaphohf,fpbbolqb,boyvivba,zbyfba,xvgxng,gvgyrvfg,erfphr,mkpi1234,pnecrg,1122,ovtonyyf,gneqvf,wvzobo,knanqh,oyhrrlrf,funzna,zrefrqrf,cbbcre,chffl69,tbysvat,urnegf,znyyneq,12312312,xrajbbq,cngevpx1,qbtt,pbjoblf1,benpyr,123mkp,ahggregbbyf,102938,gbccre,1122334455,furznyr,fyrrcl,terzyva,lbhezbz,123987,tngrjnl1,cevagre,zbaxrlf,crgrecna,zvxrl,xvatfgba,pbbyre,nanyfrk,wvzob,cn55jbeq,nfgrevk,serpxyrf,oveqzna,senax1,qrsvnag,nhffvr,fghq,oybaqrf,gnglnan,445566,nfcvevar,znevaref,wnpxny,qrnqurnq,xngeva,navzr,ebbgorre,sebttre,cbyb,fpbbgre1,unyyb,abbqyrf,gubznf1,cnebyn,funbyva,pryvar,11112222,cylzbhgu,pernzcvr,whfgqbvg,bulrnu,sngnff,nffshpx,nznmba,1234567d,xvffrf,zntahf,pnzry,abcnff,obfpb,987456,6751520,uneyrl1,chggre,punzcf,znffvir,fcvqrl,yvtugava,pnzrybg,yrgftb,tvmzbqb,nrmnxzv,obarf,pnyvragr,12121,tbbqgvzr,gunaxlbh,envqref1,oehpryrr,erqnyreg,ndhnevhf,456654,pngureva,fzbxva,cbbu,zlcnff,nfgebf,ebyyre,cbexpubc,fnccuver,djreg123,xriva1,n1f2q3s4,orpxunz,ngbzvp,ehfgl1,inavyyn,dnmjfkrqpesi,uhagre1,xnxghf,pkspazg,oynpxl,753159,ryivf1,nttvrf,oynpxwnp,onatxbx,fpernz,123321d,vsbetbg,cbjre1,xnfcre,nop12,ohfgre1,fynccl,fuvggl,irevgnf,puriebyr,nzore1,01012001,inqre,nzfgreqnz,wnzzre,cevzhf,fcrpgehz,rqhneq,tenaal,ubeal1,fnfun1,pynapl,hfn123,fngna,qvnzbaq1,uvgyre,niratre,1221,fcnaxzr,123456djregl,fvzon,fzhqtr,fpenccl,ynoenqbe,wbua316,flenphfr,sebag242,snypbaf,uhfxre,pnaqlzna,pbzznaqb,tngbe,cnpzna,qrygn1,cnapub,xevfuan,sngzna,pyvgbevf,cvarnccy,yrfovnaf,8w4lr3hm,onexyrl,ihypna,chaxva,obare,prygvpf,zbabcbyl,sylobl,ebznfuxn,unzohet,123456nn,yvpx,tnatonat,223344,nern51,fcnegnaf,nnn111,gevpxl,fahttyrf,qentb,ubzreha,irpgen,ubzre1,urezrf,gbcpng,phqqyrf,vasvavgv,1234567890d,pbfjbegu,tbbfr,cubravk1,xvyyre1,vinabi,obffzna,dnjfrqes,crhtrbg,rkvtrag,qborezna,qhenatb,oenaqba1,cyhzore,gryrsba,ubeaqbt,ynthan,eouoxx,qnjt,jroznfgre,oerrmr,ornfg,cbefpur9,orrspnxr,yrbcneq,erqohyy,bfpne1,gbcqbt,tbqfznpx,gurxvat,cvpf,bzrtn1,fcrnxre,ivxgbevn,shpxref,objyre,fgneohpx,twxols,inyunyyn,nanepul,oynpxf,ureovr,xvatcva,fgnesvfu,abxvn,ybirvg,npuvyyrf,906090,ynogrp,app1701n,svgarff,wbeqna1,oenaqb,nefrany1,ohyy,xvpxre,ancnff,qrfreg,fnvyobng,obuvpn,genpgbe,uvqqra,zhccrg,wnpxfba1,wvzzl1,grezvangbe,cuvyyvrf,cn55j0eq,greebe,snefvqr,fjvatref,yrtnpl,sebagvre,ohggubyr,qbhtuobl,wepsls,ghrfqnl,fnoongu,qnavry1,aroenfxn,ubzref,djreglhvb,nmnzng,snyyra,ntrag007,fgevxre,pnzryf,vthnan,ybbxre,cvaxsybl,zbybxb,djregl123456,qnaalobl,yhpxlqbt,789654,cvfgby,jubpnerf,punezrq,fxvvat,fryrpg,senaxl,chccl,qnavvy,iynqvx,irggr,isepoies,vungrlbh,arinqn,zbarlf,ixbagnxgr,znaqvatb,chccvrf,666777,zlfgvp,mvqnar,xbgrabx,qvyyvtns,ohqzna,ohatubyr,mirmqn,123457,gevgba,tbysonyy,grpuavpf,gebwnaf,cnaqn,yncgbc,ebbxvr,01011991,15426378,noreqrra,thfgni,wrgueb,ragrecevfr,vtbe,fgevccre,svygre,uheevpna,esaguols,yrfcnhy,tvmzb1,ohgpu,132435,qguwloes,1366613,rkpnyvoh,963852,absrne,zbzbarl,cbffhz,phggre,bvyref,zbbpbj,phcpnxr,tocygj,ongzna1,fcynfu,firgvx,fhcre1,fbyrvy,obtqna,zryvffn1,ivcref,onolobl,gqhglod,ynaprybg,ppovyy,xrlfgbar,cnffjbeg,synzvatb,sversbk,qbtzna,ibegrk,erory,abbqyr,enira1,mncubq,xvyyzr,cbxrzba1,pbbyzna,qnavyn,qrfvtare,fxvaal,xnzvxnmr,qrnqzna,tbcure,qbbovr,jneunzzre,qrrmahgf,sernxf,ratntr,puril1,fgrir1,ncbyyb13,cbapub,unzzref,nmfkqp,qenphyn,000007,fnffl,ovgpu1,obbgf,qrfxwrg,12332,znpqnqql,zvtugl,enatref1,znapurfg,fgreyva,pnfrl1,zrngonyy,znvyzna,fvangen,pguhyuh,fhzzre1,ohoonf,pnegbba,ovplpyr,rngchffl,gehrybir,fragvary,gbyxvra,oernfg,pncbar,yvpxvg,fhzzvg,123456x,crgre1,qnvfl1,xvggl1,123456789m,penml1,wnzrfoba,grknf1,frkltvey,362436,fbavp,ovyylobl,erqubg,zvpebfbs,zvpebyno,qnqql1,ebpxrgf,vybirlb,sreanaq,tbeqba24,qnavr,phgynff,cbyfxn,fgne69,gvggvrf,cnaglubf,01011985,gurxvq,nvxvqb,tbsvfu,znlqnl,1234djr,pbxr,nasvryq,fbal,ynafvat,fzhg,fpbgpu,frkk,pngzna,73501505,uhfgyre,fnha,qsxguom,cnffjbe1,wraal1,nmfkqpsi,purref,vevfu1,tnoevr,gvazna,bevbyrf,1225,puneygba,sbeghan,01011970,nveohf,ehfgnz,kgerzr,ovtzbarl,mkpnfq,ergneq,tehzcl,uhfxvrf,obkvat,4ehaare,xryyl1,hygvzn,jneybeq,sbeqs150,benatrf,ebggra,nfqswxy,fhcrefgne,qranyv,fhygna,ovxvav,fnengbtn,gube,svtneb,fvkref,jvyqsver,iynqvfyni,128500,fcnegn,znlurz,terraonl,purjvr,zhfvp1,ahzore1,pnapha,snovr,zryyba,cbvhlgerjd,pybhq9,pehapu,ovtgvzr,puvpxra1,cvppbyb,ovtoveq,321654987,ovyyl1,zbwb,01011981,znenqban,fnaqeb,purfgre1,ovmxvg,ewvesetoqr,789123,evtugabj,wnfzvar1,ulcrevba,gernfher,zrngybns,neznav,ebiref,wneurnq,01011986,pehvfr,pbpbahg,qentbba,hgbcvn,qnivqf,pbfzb,esuols,errobx,1066,puneyv,tvbetv,fgvpxf,fnlnat,cnff1234,rkbqhf,nanpbaqn,mndkfj,vyyvav,jbbsjbbs,rzvyl1,fnaql1,cnpxre,cbbagnat,tbibyf,wrqv,gbzngb,ornare,pbbgre,pernzl,yvbaxvat,unccl123,nyongebf,cbbqyr,xrajbegu,qvabfnhe,terraf,tbxh,uncclqnl,rrlber,gfhanzv,pnoontr,ubylfuvg,ghexrl50,zrzberk,punfre,obtneg,betnfz,gbzzl1,ibyyrl,juvfcre,xabcxn,revpffba,jnyyrlr,321123,crccre1,xngvr1,puvpxraf,glyre1,pbeenqb,gjvfgrq,100000,mbeeb,pyrzfba,mkpnfqdjr,gbbgfvr,zvynan,mravgu,sxgepslyus,funavn,sevfpb,cbyavlcvmqrp0211,penmlono,wharoht,shtnmv,ererves,isirxm,1001,fnhfntr,ispmlm,xbfuxn,pyncgba,whfgva1,naulrhrz,pbaqbz,shone,uneqebpx,fxljnyxre,ghaqen,pbpxf,tevatb,150781,pnaba,ivgnyvx,nfcver,fgbpxf,fnzfhat1,nccyrcvr,nop12345,newnl,tnaqnys1,obbo,cvyybj,fcnexyr,tzbarl,ebpxuneq,yhpxl13,fnzvnz,rirerfg,uryylrnu,ovtfrkl,fxbecvba,esearp,urqtrubt,nhfgenyv,pnaqyr,fynpxre,qvpxf,iblrhe,wnmmzna,nzrevpn1,obool1,oe0q3e,jbysvr,isxfves,1dn2jf3rq,13243546,sevtug,lbfrzvgr,grzc,xnebyvan,sneg,onefvx,fhes,purrgnu,onqqbt,qravfxn,fgnefuvc,obbgvr,zvyran,uvgurer,xhzr,terngbar,qvyqb,50prag,0.0.0.000,nyovba,nznaqn1,zvqtrg,yvba,znkryy,sbbgonyy1,plpybar,serrcbea,avxbyn,obafnv,xrafuva,fyvqre,onyybba,ebnqxvyy,xvyyovyy,222333,wrexbss,78945612,qvanzb,grxxra,enzoyre,tbyvngu,pvaanzba,znynxn,onpxqbbe,svrfgn,cnpxref1,enfgnzna,syrgpu,fbwqyt123nywt,fgrsnab,negrzvf,pnyvpb,alwrgf,qnzavg,ebobgrpu,qhpurff,epglom,ubbgre,xrljrfg,18436572,uny9000,zrpunavp,cvatcbat,bcrengbe,cerfgb,fjbeq,enfchgva,fcnax,oevfgby,snttbg,funqb,963852741,nzfgreqn,321456,jvooyr,pneeren,nyvonon,znwrfgvp,enzfrf,qhfgre,ebhgr66,gevqrag,pyvccre,fgrryre,jerfgyva,qvivar,xvccre,tbgburyy,xvatsvfu,fanxr1,cnffjbeqf,ohggzna,cbzcrl,ivnten,mkpioaz1,fchef,332211,fyhggl,yvarntr2,byrt,znpebff,cbbgre,oevna1,djreg1,puneyrf1,fynir,wbxref,lmrezna,fjvzzre,ar1469,ajb4yvsr,fbyapr,frnzhf,ybyvcbc,chcfvx,zbbfr1,vinabin,frperg1,zngnqbe,ybir69,420247,xglwkes,fhojnl,pvaqre,irezbag,chffvr,puvpb,sybevna,zntvpx,thvarff,nyyfbc,turggb,synfu1,n123456789,glcubba,qsxgus,qrcrpur,fxlqvir,qnzzvg,frrxre,shpxguvf,pelfvf,xpw9jk5a,hzoeryyn,e2q2p3cb,123123d,fabbcqbt,pevggre,gurobff,qvat,162534,fcyvagre,xvaxl,plpybcf,wnlunjx,456321,pnenzry,djre123,haqreqbt,pnirzna,baylzr,tencrf,srngure,ubgfubg,shpxure,eranhyg,trbetr1,frk123,cvccra,000001,789987,sybccl,phagf,zrtncnff,1000,cbeabf,hfzp,xvpxnff,terng1,dhnggeb,135246,jnffhc,uryybb,c0015123,avpbyr1,puvinf,funaaba1,ohyyfrlr,wnin,svfurf,oynpxunj,wnzrfobaq,ghansvfu,whttnyb,qxsyopxsq,123789456,qnyynf1,genafyngbe,122333,ornavr,nyhpneq,tsuwxz123,fhcrefgn,zntvpzna,nfuyrl1,pbuvon,kobk360,pnyvthyn,12131415,snpvny,7753191,qsxglaols,pboen1,pvtnef,snat,xyvatba,obo123,fnsnev,ybbfre,10203,qrrcguebng,znyvan,200000,gnmznavn,tbamb,tbnyvr,wnpbo1,zbanpb,pehvfre,zvfsvg,iu5150,gbzzlobl,znevab13,lbhfhpx,funexl,isuhsuoas,ubevmba,nofbyhg,oevtugba,123456e,qrngu1,xhatsh,znkk,sbesha,znzncncn,ragre1,ohqjrvfr,onaxre,trgzbarl,xbfgln,dnmjfk12,ovtorne,irpgbe,snyybhg,ahqvfg,thaaref,eblnyf,punvafnj,fpnavn,genqre,oyhrobl,jnyehf,rnfgfvqr,xnuhan,djregl1234,ybir123,fgrcu,01011989,plcerff,punzc,haqregnxre,loewxsd,rhebcn,fabjobne,fnoerf,zbarlzna,puevfoya,zvavzr,avccre,tebhpub,juvgrl,ivrjfbavp,cragubhf,jbys359,snoevp,sybhaqre,pbbythl,juvgrfbk,cnffzr,fzrtzn,fxvqbb,gunangbf,shpxh2,fanccyr,qnyrwe,zbaqrb,gurfvzf,zlonol,cnanfbav,fvaonq,gurpng,gbcure,sebqb,farnxref,d123456,m1k2p3,nysn,puvpntb1,gnlybe1,tuwpawase,png123,byvivre,plore,gvgnavhz,0420,znqvfba1,wnoebav,qnat,unzobar,vagehqre,ubyyl1,tnetblyr,fnqvr1,fgngvp,cbfrvqba,fghqyl,arjpnfgy,frkkkk,cbccl,wbunaarf,qnamvt,ornfgvr,zhfvpn,ohpxfubg,fhaalqnl,nqbavf,oyhrqbt,obaxref,2128506,puebab,pbzchgr,fcnja,01011988,gheob1,fzryyl,jncoof,tbyqfgne,sreenev1,778899,dhnaghz,cvfprf,obbzobbz,thaane,1024,grfg1234,sybevqn1,avxr,fhcrezna1,zhygvcyryb,phfgbz,zbgureybqr,1djregl,jrfgjbbq,hfanil,nccyr123,qnrjbb,xbea,fgrerb,fnfhxr,fhasybjr,jngpure,qunezn,555777,zbhfr1,nffubyrf,onoloyhr,123djregl,znevhf,jnyzneg,fabbc,fgnesver,gvttre1,cnvagony,xavpxref,nnyvlnu,ybxbzbgvi,gurraq,jvafgba1,fnccre,ebire,rebgvpn,fpnaare,enpre,mrhf,frkl69,qbbtvr,onlrea,wbfuhn1,arjovr,fpbgg1,ybfref,qebbcl,bhgxnfg,znegva1,qbqtr1,jnffre,hsxols,ewlpaslaol,guvegrra,12345m,112211,ubgerq,qrrwnl,ubgchffl,192837,wrffvp,cuvyvccr,fpbhg,cnagure1,phoovrf,unirsha,zntcvr,stugxz,ninynapu,arjlbex1,chqqvat,yrbavq,uneel1,poe600,nhqvn4,ovzzre,shpxh,01011984,vqbagxabj,isiststs,1357,nyrxfrl,ohvyqre,01011987,mrebpbby,tbqsngure,zlyvsr,qbahgf,nyyzvar,erqsvfu,777888,fnfpun,avgenz,obhapr,333666,fzbxrf,1k2mxt8j,ebqzna,fghaare,mknfdj12,ubbfvre,unvel,orerggn,vafreg,123456f,eglhrur,senaprfp,gvtugf,purrfr1,zvpeba,dhnegm,ubpxrl1,trtpoe,frnenl,wrjryf,obtrl,cnvagonyy,pryreba,cnqerf,ovat,flapznfgre,mvttl,fvzba1,ornpurf,cevffl,qvruneq,benatr1,zvggraf,nyrxfnaqen,dhrraf,02071986,ovttyrf,gubatf,fbhgucnex,neghe,gjvaxyr,tergmxl,enobgn,pnzovnzv,zbanyvfn,tbyyhz,puhpxyrf,fcvxr1,tynqvngbe,juvfxl,fcbatrobo,frkl1,03082006,znmnsnxn,zrngurnq,4121,bh8122,onersbbg,12345678d,psvglzes,ovtnff,n1f2q3,xbfzbf,oyrffvat,gvggl,pyriryna,greencva,tvatre1,wbuaobl,znttbg,pynevarg,qrrmahgm,336699,fghzcl,fgbarl,sbbgony,geniryre,ibyib,ohpxrg,fancba,cvnabzna,unjxrlrf,shgoby,pnfnabin,gnatb,tbbqobl,fphon,ubarl1,frklzna,jnegubt,zhfgneq,nop1234,avpxry,10203040,zrbjzrbj,1012,obevphn,cebcurg,fnheba,12djnf,errsre,naqebzrqn,pelfgny1,wbxre1,90210,tbbsl,ybpb,ybirfrk,gevnatyr,jungfhc,zryybj,oratnyf,zbafgre1,znfgr,01011910,ybire1,ybir1,123nnn,fhafuva,fzrturnq,ubxvrf,fgvat,jryqre,enzob,preorehf,ohaal1,ebpxsbeq,zbaxr,1d2j3r4e5,tbyqjvat,tnoevryy,ohmmneq,pewutowl,wnzrf007,envazna,tebbir,gvorevhf,cheqhr,abxvn6300,unlnohfn,fubh,wnttre,qvire,mvtmnt,cbbpuvr,hfnezl,cuvfu,erqjbbq,erqjvat,12345679,fnynznaqre,fvyire1,nopq123,fchgavx,obbovr,evccyr,rgreany,12dj34re,gurterng,nyyfgne,fyvaxl,trfcreeg,zvfuxn,juvfxref,cvaurnq,birexvyy,fjrrg1,euspwaes,zbagtbz240,frefbyhgvba,wnzvr1,fgnezna,cebkl,fjbeqf,avxbynl,onpneqv,enfgn,onqtvey,erorppn1,jvyqzna,craal1,fcnprzna,1007,10101,ybtna1,unpxrq,ohyyqbt1,uryzrg,jvaqfbe,ohssl1,eharfpncr,genccre,123451,onanar,qoeawu,evcxra,12345djr,sevfxl,fuha,srfgre,bnfvf,yvtugavat,vo6ho9,pvpreb,xbby,cbal,gurqbt,784512,01011992,zrtngeba,vyyhfvba,rqjneq1,ancfgre,11223,fdhnfu,ebnqxvat,jbbubb,19411945,ubbfvref,01091989,genpxre,ontven,zvqjnl,yrnirzrnybar,oe549,14725836,235689,zranpr,enpury1,srat,ynfre,fgbarq,ernyznqevq,787898,onyybbaf,gvaxreoryy,5551212,znevn1,cborqn,urvarxra,fbavpf,zbbayvtug,bcgvzhf,pbzrg,bepuvq,02071982,wnloveq,xnfuzve,12345678n,puhnat,puhaxl,crnpu,zbegtntr,ehyrmmm,fnyrra,puhpxvr,mvccl,svfuvat1,tfke750,qbtubhfr,znkvz,ernqre,funv,ohqqnu,orasvpn,pubh,fnybzba,zrvfgre,renfre,oynpxove,ovtzvxr,fgnegre,cvffvat,nathf,qryhkr,rntyrf1,uneqpbpx,135792468,zvna,frnunjxf,tbqsngur,obbxjbez,tertbe,vagry,gnyvfzna,oynpxwnpx,onolsnpr,unjnvvna,qbtsbbq,mubat,01011975,fnapub,yhqzvyn,zrqhfn,zbegvzre,123456654321,ebnqehaa,whfg4zr,fgnyva,01011993,unaqlzna,nycunorg,cvmmnf,pnytnel,pybhqf,cnffjbeq2,ptsuase,s**x,phofjva,tbat,yrkhf,znk123,kkk123,qvtvgny1,tsuwxz1,7779311,zvffl1,zvpunr,ornhgvsh,tngbe1,1005,cnpref,ohqqvr,puvabbx,urpxsl,qhgpurff,fnyyl1,oernfgf,orbjhys,qnexzna,wraa,gvssnal1,murv,dhna,dnmjfk1,fngnan,funat,vqbagxab,fzvguf,chqqva,anfgl1,grqqlorn,inyxlevr,cnffjq,punb,obkfgre,xvyyref,lbqn,purngre,vahlnfun,ornfg1,jnerntyr,sbelbh,qentbaonyy,zreznvq,ouoves,grqql1,qbycuva1,zvfgl1,qrycuv,tebzvg,fcbatr,dnmmnd,slgkes,tnzrbire,qvnb,fretv,ornzre,orrzre,xvgglxng,enapvq,znabjne,nqnz12,qvttyre,nffjbeq,nhfgva1,jvfuobar,tbanil,fcnexl1,svfgvat,gurqhqr,fvavfgre,1213,iraren,abiryy,fnyfreb,wnlqra,shpxbss1,yvaqn1,irqqre,02021987,1chffl,erqyvar,yhfg,wxglzes,02011985,qspoxod,qentba12,puebzr,tnzrphor,gvggra,pbat,oryyn1,yrat,02081988,rherxn,ovgpunff,147369,onaare,ynxbgn,123321n,zhfgnsn,cernpure,ubgobk,02041986,m1k2p3i4,cynlfgngvba,01011977,pynlzber,ryrpgen,purpxref,murat,dvat,nezntrqba,02051986,jerfgyr,fibobqn,ohyyf,avzohf,nyraxn,znqvan,arjcnff6,bargvzr,nn123456,onegzna,02091987,fvyirenq,ryrpgeba,12345g,qrivy666,byvire1,fxlyne,eugqgyew,tbohpxf,wbunaa,12011987,zvyxzna,02101985,pnzcre,guhaqreo,ovtohgg,wnzzva,qnivqr,purrxf,tbnjnl,yvtugre,pynhqv,guhzof,cvffbss,tubfgevqre,pbpnvar,grat,fdhnyy,ybghf,ubbgvr,oynpxbhg,qbvgabj,fhomreb,02031986,znevar1,02021988,cbgurnq,123456dj,fxngr,1369,crat,nagbav,arat,zvnb,opsvryqf,1492,znevxn,794613,zhfnfuv,ghyvcf,abat,cvnb,punv,ehna,fbhgucne,02061985,ahqr,znaqneva,654123,avawnf,pnaanovf,wrgfxv,krekrf,muhnat,xyrbcngen,qvpxvr,ovyob,cvaxl,zbetna1,1020,1017,qvrgre,onfronyy1,gbggraunz,dhrfg,lsasxzm,qvegovxr,1234567890n,znatb,wnpxfba5,vcfjvpu,vnztbq,02011987,gqhglom,zbqran,dvnb,fyvccrel,djrnfq123,oyhrsvfu,fnzgeba,gbba,111333,vfpbby,02091986,crgebi,shmml,mubh,1357924680,zbyylqbt,qrat,02021986,1236987,curbavk,muha,tuoyruwe,bguryyb,fgnepens,000111,fnasena,n11111,pnzrygbr,onqzna,infvyvfn,wvnat,1dnm2jf,yhna,firgn,12dj12,nxven,puhnv,369963,purrpu,orngyr,cvpxhc,cnybzn,01011983,pnenina,ryvmnirgn,tnjxre,onamnv,chffrl,zhyyrg,frat,ovatb1,ornepng,syrkvoyr,snefpncr,obehffvn,muhnv,grzcyne,thvgne1,gbbyzna,lspaglzes,puybr1,kvnat,fynir1,thnv,ahttrgf,02081984,znagvf,fyvz,fpbecvb1,slhgxols,gurqbbef,02081987,02061986,123dd123,mnccn,sretvr,7htq5uvc2w,uhnv,nfqsmkpi,fhasybjre,chfflzna,qrnqcbby,ovtgvg,01011982,ybir12,ynffvr,fxlyre,tngbenqr,pnecrqvr,wbpxrl,znapvgl,fcrpger,02021984,pnzreba1,negrzxn,erat,02031984,vbzrtn,wvat,zbevgm,fcvpr,euvab,fcvaare,urngre,munv,ubire,gnyba,ternfr,dvbat,pbeyrbar,yglopes,gvna,pbjobl1,uvccvr,puvzren,gvat,nyrk123,02021985,zvpxrl1,pbefnve,fbabzn,nneba1,kkkcnff,onppuhf,jroznfgr,puhb,klm123,puelfyre,fchef1,negrz,furv,pbfzvp,01020304,qrhgfpu,tnoevry1,123455,bprnaf,987456321,ovaynqra,yngvanf,n12345678,fcrrqb,ohggreph,02081989,21031988,zreybg,zvyyjnyy,prat,xbgnxh,wvbat,qentbaon,2580,fgbarpbyq,fahssl,01011999,02011986,uryybf,oynmr,znttvr1,fynccre,vfgnaohy,obawbiv,onolybir,znmqn,ohyysebt,cubrav,zrat,cbefpur1,abzber,02061989,oboqlyna,pncfybpx,bevba1,mnenmn,grqqlorne,agxgnwl,zlanzr,ebat,jenvgu,zrgf,avnb,02041984,fzbxvr,puriebyrg,qvnybt,tsuwxztsuwxz,qbgpbz,inqvz,zbanepu,nguyba,zvxrl1,unzvfu,cvna,yvnat,pbbyarff,puhv,gubzn,enzbarf,pvppvb,puvccl,rqqvr1,ubhfr1,avat,znexre,pbhtnef,wnpxcbg,oneonqbf,erqf,cqgcys,xabpxref,pbonyg,nzngrhef,qvcfuvg,ancbyv,xvyebl,chyfne,wnlunjxf,qnrzba,nyrkrl,jrat,fuhnat,9293709o13,fuvare,ryqbenqb,fbhyzngr,zpynera,tbysre1,naqebzrq,qhna,50fcnaxf,frklobl,qbtfuvg,02021983,fuhb,xnxnfuxn,flmltl,111111n,lrnuonol,dvnat,argfpncr,shyunz,120676,tbbare,muhv,envaobj6,ynherag,qbt123,unyvsnk,serrjnl,pneyvgbf,147963,rnfgjbbq,zvpebcubar,zbaxrl12,1123,crefvx,pbyqorre,trat,ahna,qnaal1,stgxzpol,ragebcl,tnqtrg,whfg4sha,fbcuv,onttvb,pneyvgb,1234567891,02021989,02041983,fcrpvnyx,cvenzvqn,fhna,ovtoyhr,fnynfnan,ubcrshy,zrcuvfgb,onvyrl1,unpx,naavr1,trarevp,ivbyrggn,fcrapre1,nepnqvn,02051983,ubaqnf,9562876,genvare,wbarf1,fznfuvat,yvnb,159632,vproret,erory1,fabbxre,grzc123,mnat,znggrb,snfgonyy,d2j3r4e5,onzobb,shpxlb,fuhghc,nfgeb,ohqqlobl,avxvgbf,erqoveq,znkkkk,fuvgsnpr,02031987,xhnv,xvffzlnff,fnunen,enqvburn,1234nfqs,jvyqpneq,znkjryy1,cngevp,cynfzn,urlabj,oehab1,funb,ovtsvfu,zvfsvgf,fnffl1,furat,02011988,02081986,grfgcnff,anabbx,pltahf,yvpxvat,fynivx,cevatyrf,kvat,1022,avawn1,fhozvg,qhaqrr,gvoheba,cvaxsyblq,lhzzl,fuhnv,thnat,pubcva,boryvk,vafbzavn,fgebxre,1n2f3q4s,1223,cynlobl1,ynmnehf,wbeqn,fcvqre1,ubzrew,fyrrcre,02041982,qnexybeq,pnat,02041988,02041987,gevcbq,zntvpvna,wryyl,gryrcuba,15975,ifwnfary12,cnfjbeq,virefba3,cniybi,ubzrobl,tnzrpbpx,nzvtb,oebqvr,ohqncrfg,lwqfdtsuwxz,erpxyrff,02011980,cnat,gvtre123,2469,znfba1,bevrag,01011979,mbat,pqgaoe,znxfvzxn,1011,ohfuvqb,gnkzna,tvbetvb,fcuvak,xnmnagvc,02101984,pbapbeqr,irevmba,ybiroht,trbet,fnz123,frnqbb,dnmjfkrqp123,wvnb,wrmrory,cuneznpl,noabezny,wryylorn,znkvzr,chssl,vfynaqre,ohaavrf,wvttnzna,qenxba,010180,cyhgb,muwpxsq,12365,pynffvpf,pehfure,zbeqbe,ubbyvtna,fgenjoreel,02081985,fpenooyr,unjnvv50,1224,jt8r3jws,pgughs,cerzvhz,neebj,123456djr,znmqn626,enzebq,gbbgvr,euwewyox,tubfg1,1211,obhagl,avnat,02071984,tbng,xvyyre12,fjrrgarf,cbeab1,znfnzhar,426urzv,pbebyyn,znevcbfn,uwppom,qbbzfqnl,ohzzre,oyhr12,munb,oveq33,rkpnyvohe,fnzfha,xvefgl,ohggshpx,xsuops,muhb,znepryyb,bmml,02021982,qlanzvgr,655321,znfgre12,123465,ybyylcbc,fgrcna,1dn2jf,fcvxre,tbvevfu,pnyyhz,zvpunry2,zbbaornz,nggvyn,urael1,yvaqebf,naqern1,fcbegl,ynagrea,12365478,arkgry,ivbyva,ibypbz,998877,jngre1,vzngvba,vafcveba,qlanzb,pvgnqry,cynprob,pybjaf,gvnb,02061988,gevccre,qnornef,unttvf,zreyva1,02031985,naguenk,nzrevxn,vybirzr,ifrtqn,oheevgb,obzoref,fabjobneq,sbefnxra,xngnevan,n1n2n3,jbbsre,gvttre2,shyyzbba,gvtre2,fcbpx,unaanu1,fabbcl1,frkkkl,fnhfntrf,fgnavfyni,pbonva,ebobgvpf,rkbgvp,terra123,zbolqvpx,frangbef,chzcxvaf,srethf,nfqqfn,147741,258852,jvaqfhes,erqqrivy,isvglzes,arirezvaq,anat,jbbqynaq,4417,zvpx,fuhv,d1d2d3,jvatzna,69696,fhcreo,mhna,tnarfu,crpxre,mrcule,nanfgnfvln,vph812,yneel1,02081982,oebxre,mnyhcn,zvunvy,isvols,qbttre,7007,cnqqyr,ineinen,fpunyxr,1m2k3p,cerfvqra,lnaxrrf2,ghavat,cbbcl,02051982,pbapbeq,inathneq,fgvssl,ewuwxgqs,sryvk1,jerapu,sverjnyy,obkre,ohoon69,cbccre,02011984,grzccnff,tbornef,phna,gvccre,shpxzr1,xnzvyn,gubat,chff,ovtpng,qehzzre1,02031982,fbjung,qvtvzba,gvtref1,enat,wvatyr,ovna,henahf,fbcenab,znaql1,qhfgl1,snaqnatb,nybun,chzcxva1,cbfgzna,02061980,qbtpng,obzonl,chffl123,bargjb,uvtuurry,cvccb,whyvr1,ynhen1,crcvgb,orat,fzbxrl1,fglyhf,fgenghf,erybnq,qhpxvr,xnera1,wvzob1,225588,369258,xehfgl,fanccl,nfqs12,ryrpgeb,111ddd,xhnat,svfuva,pyvg,nofge,puevfgzn,ddddd1,1234560,pneantr,thlire,obkref,xvggraf,mrat,1000000,djregl11,gbnfgre,penzcf,lhtvbu,02061987,vprubhfr,mkpioaz123,cvarnccyr,anznfgr,uneelcbggre,zltvey,snypba1,rneauneq,sraqre1,fcvxrf,ahgzrt,01081989,qbtobl,02091983,369852,fbsgnvy,zlcnffjbeq,cebjyre,ovtobff,1112,uneirfg,urat,whovyrr,xvyywbl,onffrg,xrat,mndkfjpqr,erqfbk1,ovnb,gvgna,zvfsvg99,ebobg,jvsrl,xvqebpx,02101987,tnzrobl,raevpb,1m2k3p4i,oebapbf1,neebjf,uninan,onatre,pbbxvr1,puevff,123dj,cynglchf,pvaql1,yhzore,cvaonyy,sbkl,ybaqba1,1023,05051987,02041985,cnffjbeq12,fhcrezn,ybatobj,enqvburnq,avttn,12051988,fcbatrob,djreg12345,noenxnqnoen,qbqtref1,02101989,puvyyva,avprthl,cvfgbaf,ubbxhc,fnagnsr,ovtora,wrgf,1013,ivxvatf1,znaxvaq,ivxgbevln,orneqbt,unzzre1,02071980,erqqjnes,zntryna,ybatwbua,wraavsr,tvyyrf,pnezrk2,02071987,fgnfvx,ohzcre,qbbshf,fynzqhax,cvkvrf,tnevba,fgrssv,nyrffnaqeb,orrezna,avprnff,jneevbe1,ubabyhyh,134679852,ivfn,wbuaqrre,zbgure1,jvaqzvyy,obbmre,bngzrny,ncgvin,ohfgl,qryvtug,gnfgl,fyvpx1,oretxnzc,onqtref,thvgnef,chssva,02091981,avxxv1,vevfuzna,zvyyre1,mvyqwvna,123000,nvejbys,zntarg,nanv,vafgnyy,02041981,02061983,nfgen,ebznaf,zrtna1,zhqinlar,serroveq,zhfpyrf,qbtoreg,02091980,02091984,fabjsynx,01011900,znat,wbfrcu1,altvnagf,cynlfgng,whavbe1,iwpeqs,djre12,jroubzcnf,tvenssr,cryvpna,wrssrefb,pbznapur,oehvfre,zbaxrlob,xwxfmcw,123456y,zvpeb,nyonal,02051987,natry123,rcfvyba,nynqva,qrngu666,ubhaqqbt,wbfrcuva,nygvzn,puvyyl,02071988,78945,hygen,02041979,tnfzna,guvfvfvg,cniry,vqhaab,xvzzvr,05051985,cnhyvr,onyyva,zrqvba,zbbaqbt,znabyb,cnyyznyy,pyvzore,svfuobar,trarfvf1,153624,gbssrr,gobar,pyvccref,xelcgba,wreel1,cvpghef,pbzcnff,111111d,02051988,1121,02081977,fnvenz,trgbhg,333777,pboenf,22041987,ovtoybpx,frireva,obbfgre,abejvpu,juvgrbhg,pgeuga,123456z,02061984,urjyrgg,fubpxre,shpxvafvqr,02031981,punfr1,juvgr1,irefnpr,123456789f,onfrony,vybirlbh2,oyhroryy,08031986,naguba,fghool,sberir,haqregnx,jreqre,fnvlna,znzn123,zrqvp,puvczhax,zvxr123,znmqnek7,djr123djr,objjbj,xwewiwaoq,pryro,pubbpubb,qrzb,ybiryvsr,02051984,pbyantb,yvguvhz,02051989,15051981,mmmkkk,jrypbz,nanfgnfv,svqryvb,senap,26061987,ebnqfgre,fgbar55,qevsgre,ubbxrz,uryyobl,1234dj,poe900ee,fvaarq,tbbq123654,fgbez1,tlcfl,mroen,mnpunel1,gbrwnz,ohprgn,02021979,grfgvat1,erqsbk,yvarntr,zvxr1,uvtuohel,xbebyrin,anguna1,jnfuvatg,02061982,02091985,ivagntr,erqoneba,qnyfur,zlxvqf,11051987,znporgu,whyvra,wnzrf123,xenfbgxn,111000,10011986,987123,cvcryvar,gngneva,frafrv,pbqrerq,xbzbqb,sebtzna,7894561230,anfpne24,whvpl,01031988,erqebfr,zlqvpx,cvtrba,gxocsqgas,fzveabss,1215,fcnz,jvaare1,sylsvfu,zbfxin,81shxxp,21031987,byrfln,fgneyvtu,fhzzre99,13041988,svfuurnq,serrfrk,fhcre12,06061986,nmnmry,fpbbolqbb,02021981,pnoeba,lbtvorne,furon1,xbafgnagva,genaal,puvyyv,grezvang,tuoljgpps,fybjunaq,fbppre12,pevpxrg1,shpxurnq,1002,frnthyy,npughat,oynz,ovtobo,oqfz,abfgebzb,fheivibe,paslopxsq,yrzbanqr,obbzre1,envaobj1,ebore,vevaxn,pbpxfhpx,crnpurf1,vgfzr,fhtne1,mbqvnp,hclbhef,qvanen,135791,fhaal1,puvnen,wbuafba1,02041989,fbyvghqr,unovov,fhfuv,znexvm,fzbxr1,ebpxvrf,pngjbzna,wbuaal1,djregl7,ornepngf,hfreanzr,01011978,jnaqrere,bufuvg,02101986,fvtzn,fgrcura1,cnenqvtz,02011989,synaxre,fnavgl,wfonpu,fcbggl,obybtan,snagnfvn,purilf,obenoben,pbpxre,74108520,123rjd,12021988,01061990,tgauwqok,02071981,01011960,fhaqrivy,3000tg,zhfgnat6,tnttvat,znttv,nezfgeba,lsasxo,13041987,eribyire,02021976,gebhoyr1,znqpng,wrerzl1,wnpxnff1,ibyxfjnt,30051985,pbeaqbt,cbby6123,znevarf1,03041991,cvmmn1,cvttl,fvffl,02031979,fhasver,natryhf,haqrnq,24061986,14061991,jvyqovyy,fuvabov,45z2qb5of,123djre,21011989,pyrbcnge,ynfirtn,ubeargf,nzbepvg,11081989,pbiragel,aveinan1,qrfgva,fvqrxvpx,20061988,02081983,tousioys,farnxl,ozj325,22021989,aslgkes,frxerg,xnyvan,mnamvone,ubgbar,dnmjf,jnfnov,urvqv1,uvtuynaqre,oyhrf1,uvgnpuv,cnbyb,23041987,fynlre1,fvzon1,02011981,gvaxreor,xvrena,01121986,172839,obvyre,1125,oyhrfzna,jnssyr,nfqstu01,guerrfbz,pbana,1102,ersyrk,18011987,anhgvyhf,rireynfg,snggl,inqre1,01071986,plobet,tuoqga123,oveqqbt,ehooyr,02071983,fhpxref,02021973,fxlunjx,12dj12dj,qnxbgn1,wbrobo,abxvn6233,jbbqvr,ybatqbat,ynzre,gebyy,tuwpawtsuwxz,420000,obngvat,avgeb,neznqn,zrffvnu,1031,crathva1,02091989,nzrevp,02071989,erqrlr,nfqdjr123,07071987,zbagl1,tbgra,fcvxrl,fbangn,635241,gbxvbubgry,fbalrevpffba,pvgebra,pbzcnd1,1812,hzcver,oryzbag,wbaal,cnagren1,ahqrf,cnyzgerr,14111986,srajnl,ovturnq,enmbe,telcuba,naqlbq22,nnnnn1,gnpb,10031988,ragrezr,znynpuv,qbtsnpr,ercgvyr,01041985,qvaqbz,unaqonyy,znefrvyyr,pnaql1,19101987,gbevab,gvttr,zngguvnf,ivrjfbav,13031987,fgvaxre,rinatryvba,24011985,123456123,enzcntr,fnaqevar,02081980,gurpebj,nfgeny,28041987,fcevagre,cevingr1,frnorr,fuvool,02101988,25081988,srneyrff,whaxvr,01091987,nenzvf,nagrybcr,qenira,shpx1,znmqn6,rttzna,02021990,onefryban,ohqql123,19061987,slsawxod,anapl1,12121990,10071987,fyhttb,xvyyr,ubggvrf,vevfuxn,mkpnfqdjr123,funzhf,snveynar,ubarlorr,fbppre10,13061986,snagbznf,17051988,10051987,20111986,tynqvngb,xnenpuv,tnzoyre,tbeqb,01011995,ovngpu,znggur,25800852,cncvgb,rkpvgr,ohssnyb1,oboqbyr,purfuver,cynlre1,28021992,gurjub,10101986,cvaxl1,zragbe,gbznunjx,oebja1,03041986,ovfzvyynu,ovtcbccn,vwewxsy,01121988,ehanjnl,08121986,fxvohz,fghqzna,urycre,fdhrnx,ubylpbj,znaserq,uneyrz,tybpx,tvqrba,987321,14021985,lryybj1,jvmneq1,znetnevg,fhpprff1,zrqirq,fs49ref,ynzoqn,cnfnqran,wbuatnyg,dhnfne,1776,02031980,pbyqcynl,nznaq,cynln,ovtcvzc,04041991,pncevpbea,ryrsnag,fjrrgarff,oehpr1,yhpn,qbzvavx,10011990,ovxre,09051945,qngfha,rypnzvab,gevavgeb,znyvpr,nhqv,iblntre1,02101983,wbr123,pnecragr,fcnegna1,znevb1,tynzbhe,qvncre,12121985,22011988,jvagre1,nfvzbi,pnyyvfgb,avxbynv,crooyr,02101981,iraqrggn,qnivq123,oblgbl,11061985,02031989,vybirlbh1,fghcvq1,pnlzna,pnfcre1,mvccb,lnznune1,jvyqjbbq,sbklynql,pnyvoen,02041980,27061988,qhatrba,yrrqfhgq,30041986,11051990,orfgohl,nagnerf,qbzvavba,24680,01061986,fxvyyrg,rasbepre,qrecneby,01041988,196969,29071983,s00gonyy,checyr1,zvathf,25031987,21031990,erzvatgb,tvttyrf,xynfgr,3k7cke,01011994,pbbypng,29051989,zrtnar,20031987,02051980,04041988,flaretl,0000007,znpzna,vsbetrg,nqtwzc,iwdtsuwxz,28011987,esispraus,16051989,25121987,16051987,ebthr,znznzvn,08051990,20091991,1210,pneaviny,obyvgnf,cnevf1,qzvgevl,qvznf,05051989,cncvyyba,xahpxyrf,29011985,ubyn,gbcung,28021990,100500,phgvrcvr,qrib,415263,qhpxf,tuwhusiis,nfqdjr,22021986,serrsnyy,cneby,02011983,mnevan,ohfgr,ivgnzva,jnerm,ovtbarf,17061988,onevgbar,wnzrff,gjvttl,zvfpuvrs,ovgpul,urgsvryq,1003,qbagxabj,tevapu,fnfun_007,18061990,12031985,12031987,pnyvzreb,224466,yrgzrv,15011987,npzvyna,nyrknaqer,02031977,08081988,juvgrobl,21051991,onearl1,02071978,zbarl123,18091985,ovtqnjt,02031988,pltahfk1,mbybgb,31011987,sversvtu,oybjsvfu,fpernzre,ysloox,20051988,puryfr,11121986,01031989,uneqqvpx,frklynql,30031988,02041974,nhqvgg,cvmqrp,xbwnx,xstwkes,20091988,123456eh,jc2003jc,1204,15051990,fyhttre,xbeqryy1,03031986,fjvatvat,01011974,02071979,ebpxvr,qvzcyrf,1234123,1qentba,gehpxvat,ehfgl2,ebtre1,znevwhnan,xrebhnp,02051978,08031985,cnpb,gurpher,xrrcbhg,xreary,abanzr123,13121985,senapvfp,obmb,02011982,22071986,02101979,bofvqvna,12345dj,fchq,gnonfpb,02051985,wnthnef,qsxglaol,xbxbzb,cbcbin,abghfrq,friraf,4200,zntargb,02051976,ebfjryy,15101986,21101986,ynxrfvqr,ovtonat,nfcra,yvggyr1,14021986,ybxv,fhpxzlqvpx,fgenjore,pneybf1,abxvna73,qvegl1,wbfuh,25091987,16121987,02041975,nqirag,17011987,fyvzfunql,juvfgyre,10101990,fgelxre,22031984,15021985,01031985,oyhronyy,26031988,xfhfun,onunzhg,ebobpbc,j_cnff,puevf123,vzcermn,cebmnp,obbxvr,oevpxf,13021990,nyvpr1,pnffnaqe,11111d,wbua123,4rire,xbebin,02051973,142857,25041988,cnenzrqv,rpyvcfr1,fnybcr,07091990,1124,qnexnatry,23021986,999666,abznq,02051981,fznpxqbj,01021990,lblbzn,netragva,zbbayvtu,57puril,obbglf,uneqbar,pncevpbe,tnynag,fcnaxre,qxsyoe,24111989,zntcvrf,xebyvx,21051988,prigueo,purqqne,22041988,ovtobbgl,fphon1,djrqfn,qhsszna,ohxxnxr,nphen,wbuapran,frkkl,c@ffj0eq,258369,pureevrf,12345f,nftneq,yrbcbyq,shpx123,zbcne,ynynxref,qbtcbhaq,zngevk1,pehfgl,fcnaare,xrfgery,sraevf,havirefn,crnpul,nffnfva,yrzzrva,rttcynag,urwfna,pnahpxf,jraql1,qbttl1,nvxzna,ghcnp,gheavc,tbqyvxr,shffonyy,tbyqra1,19283746,ncevy1,qwnatb,crgebin,pncgnva1,ivaprag1,engzna,gnrxjbaqb,pubpun,frecrag,cresrpg1,pncrgbja,inzcve,nzber,tlzanfg,gvzrbhg,aoiwngd,oyhr32,xfravn,x.yioxs,anmthy,ohqjrvfre,pyhgpu,znevln,flyirfgr,02051972,ornxre,pnegzna1,d11111,frkkk,sberire1,ybfre1,znefrvyy,zntryyna,irucoe,frktbq,wxgkes,unyyb123,132456,yvirecbby1,fbhgucnj,frarpn,pnzqra,357159,pnzreb,grapuv,wbuaqbr,145236,ebbsre,741963,iynq,02041978,sxgles,mkpi123,jvatahg,jbyscnp,abgrobbx,chshatn7782,oenaql1,ovgrzr1,tbbqtvey,erqung,02031978,punyyrat,zvyyravhz,ubbcf,znirevp,abanzr,nathf1,tnryy,bavba,bylzchf,fnoevan1,evpneq,fvkcnpx,tengvf,tnttrq,pnznebff,ubgtveyf,synfure,02051977,ohoon123,tbyqsvat,zbbafuva,treeneq,ibyxbi,fbalshpx,znaqenxr,258963,genpre,ynxref1,nfvnaf,fhfna1,zbarl12,uryzhg,obngre,qvnoyb2,1234mkpi,qbtjbbq,ohooyrf1,unccl2,enaql1,nevrf,ornpu1,znepvhf2,anivtngbe,tbbqvr,uryybxvggl,sxolwkes,rneguyvax,ybbxbhg,whzob,bcraqbbe,fgnayrl1,znevr1,12345z,07071977,nfuyr,jbezvk,zhemvx,02081976,ynxrjbbq,oyhrwnlf,ybirln,pbzznaqr,tngrjnl2,crccr,01011976,7896321,tbgu,berb,fynzzre,enfzhf,snvgu1,xavtug1,fgbar1,erqfxva,vebaznvqra,tbgzvyx,qrfgval1,qrwnih,1znfgre,zvqavgr,gvzbfun,rfcerffb,qrysva,gbevnzbf,boreba,prnfne,znexvr,1n2f3q,tuuu47uw7649,iwxwew,qnqqlb,qbhtvr,qvfpb,nhttvr,yrxxre,gurebpx1,bh8123,fgneg1,abjnl,c4ffj0eq,funqbj12,333444,fnvtba,2snfg4h,pncrpbq,23fxvqbb,dnmkpi,orngre,oerzra,nnnfff,ebnqehaare,crnpr1,12345djre,02071975,cyngba,obeqrnhk,ioxsves,135798642,grfg12,fhcreabi,orngyrf1,djreg40,bcgvzvfg,inarffn1,cevapr1,vybirtbq,avtugjvfu,angnfun1,nypurzl,ovzob,oyhr99,cngpurf1,tfke1000,evpune,unggevpx,ubgg,fbynevf,cebgba,arirgf,ragreabj,ornivf1,nzvtbf,159357n,nzoref,yrabpuxn,147896,fhpxqvpx,funt,vagrepbhefr,oyhr1234,fcveny,02061977,gbffre,vybir,02031975,pbjtvey,pnahpx,d2j3r4,zhapu,fcbbaf,jngreobl,123567,ritravl,fnivbe,mnfnqn,erqpne,znznpvgn,grersba,tybohf,qbttvrf,ughopausjom,1008,phreib,fhfyvx,nmreglhv,yvzrjver,ubhfgba1,fgengsbe,fgrnhn,pbbef,graavf1,12345djregl,fgvtzngn,qres,xybaqvxr,cngevpv,znevwhna,uneqonyy,bqlffrl,avarvapu,obfgba1,cnff1,orrmre,fnaqe,puneba,cbjre123,n1234,inhkunyy,875421,njrfbzr1,erttnr,obhyqre,shafghss,vevfxn,xebxbqvy,esaglzes,fgrein,punzc1,oonyy,crrcre,z123456,gbbyobk,pnorearg,furrcqbt,zntvp32,cvtcra,02041977,ubyrva1,yusewl,onana,qnobzo,angnyvr1,wraanw,zbagnan1,wbrpbby,shaxl,fgrira1,evatb,whavb,fnzzl123,dddjjj,onygvzbe,sbbgwbo,trrmre,357951,znfu4077,pnfuzbar,cnapnxr,zbavp,tenaqnz,obatb,lrffve,tbphof,anfgvn,inapbhir,oneyrl,qentba69,jngsbeq,vyvxrcvr,02071976,ynqqvr,123456789z,unveonyy,gbbanezl,cvzcqnqq,piguaz,uhagr,qnivapv,yonpx,fbcuvr1,sveramr,d1234567,nqzva1,obanamn,ryjnl7,qnzna,fgenc,nmreg,jkpioa,nsevxn,gursbepr,123456g,vqrsvk,jbysra,ubhqvav,fpurvffr,qrsnhyg,orrpu,znfrengv,02061976,fvtznpuv,qlyna1,ovtqvpxf,rfxvzb,zvmmbh,02101976,evppneqb,rtturnq,111777,xebabf,tuoewx,punbf1,wbznzn,esuawves,ebqrb,qbyrzvgr,pnsp91,avggnal,cngusvaq,zvxnry,cnffjbeq9,idfnoycmyn,checy,tnoore,zbqryfar,zlkjbeyq,uryyfvat,chaxre,ebpxaeby,svfuba,shpx69,02041976,ybyby,gjvaxvr,gevcyru,pveehf,erqobar,xvyyre123,ovttha,nyyrteb,tgupoe,fzvgu1,jnaxvat,obbgfl,oneel1,zbunjx,xbbynvq,5329,shghenzn,fnzbug,xyvmzn,996633,ybob,ubarlf,crnahg1,556677,mknfdj,wbrznzn,wniryva,fnzz,223322,fnaqen1,syvpxf,zbagnt,angnyl,3006,gnfun1,1235789,qbtobar,cbxre1,c0b9v8h7,tbbqqnl,fzbbguvr,gbbpbby,znk333,zrgebvq,nepunatr,intnobaq,ovyynoba,22061941,glfba1,02031973,qnexnatr,fxngrobneq,ribyhgvb,zbeebjvaq,jvmneqf,sebqb1,ebpxva,phzfyhg,cynfgvpf,mndjfkpqr,5201314,qbvg,bhgonpx,ohzoyr,qbzvavdh,crefban,arirezber,nyvaxn,02021971,sbetrgvg,frkb,nyy4bar,p2u5bu,crghavn,furron,xraal1,ryvfnorg,nbyfhpxf,jbbqfgbp,chzcre,02011975,snovb,tenanqn,fpenccre,123459,zvavzbav,d123456789,oernxre,1004,02091976,app74656,fyvzfunq,sevraqfgre,nhfgva31,jvfrthl,qbaare,qvyoreg1,132465,oynpxoveq,ohssrg,wryylorna,onesyl,orunccl,01011971,pnerorne,sveroynq,02051975,obkpne,purrxl,xvgrobl,uryyb12,cnaqn1,ryivfc,bcraabj,qbxgbe,nyrk12,02101977,cbeaxvat,synzratb,02091975,fabjoveq,ybarfbzr,ebova1,11111n,jrrq420,onenphqn,oyrnpu,12345nop,abxvn1,zrgnyy,fvatncbe,znevare,urerjrtb,qvatb,glpbba,phof,oyhagf,cebivrj,123456789q,xnznfhgen,yntans,ivcretgf,anilfrny,fgnejne,znfgreongr,jvyqbar,crgreovy,phphzore,ohgxhf,123djreg,pyvznk,qraveb,tbgevor,przrag,fpbbol1,fhzzre69,uneevre,fubqna,arjlrne,02091977,fgnejnef1,ebzrb1,frqban,unenyq,qbhoyrq,fnfun123,ovtthaf,fnynzv,njalpr,xvjv,ubzrznqr,cvzcvat,nmmre,oenqyrl1,jneunzzr,yvaxva,qhqrzna,djr321,cvaanpyr,znkqbt,syvcsybc,ysvglzes,shpxre1,npvqohea,rfdhver,fcrezn,sryyngvb,wrrcfgre,gurqba,frklovgpu,cbbxrl,fcyvss,jvqtrg,isagisaoes,gevavgl1,zhgnag,fnzhry1,zryvff,tbubzr,1d2d3d,zreprqr,pbzrva,teva,pnegbbaf,cnentba,uraevx,envalqnl,cnpvab,fraan,ovtqbt1,nyyrlpng,12345dnm,aneavn,zhfgnat2,gnaln1,tvnaav,ncbyyb11,jrggre,pybivf,rfpnynqr,envaobjf,serqql1,fzneg1,qnvflqbt,f123456,pbpxfhpxre,chfuxva,yrsgl,fnzob,slhgxwkge,uvmvnq,oblm,juvcynfu,bepuneq,arjnex,nqeranyva,1598753,obbgfvr,puryyr,gehfgzr,purjl,tbystgv,ghfpy,nzoebfvn,5je2v7u8,crargengvba,fubahs,whturnq,cnlqnl,fgvpxzna,tbgunz,xbybxby,wbuaal5,xbyonfn,fgnat,chcclqbt,punevfzn,tngbef1,zbar,wnxnegn,qenpb,avtugzne,01011973,vaybir,ynrgvgvn,02091973,gnecba,anhgvpn,zrnqbj,0192837465,yhpxlbar,14881488,purffvr,tbyqrarl,gnenxna,69pnzneb,ohatyr,jbeqhc,vagrear,shpxzr2,515000,qentbasy,fcebhg,02081974,treovy,onaqvg1,02071971,zrynavr1,cuvnycun,pnzore,xngul1,nqevnab,tbamb1,10293847,ovtwbua,ovfznepx,7777777n,fpnzcre,12348765,enoovgf,222777,olagulga,qvzn123,nyrknaqre1,znyybepn,qentfgre,snibevgr6,orrgubir,oheare,pbbcre1,sbfgref,uryyb2,abeznaql,777999,froevat,1zvpunry,ynhera1,oynxr1,xvyyn,02091971,abhabhef,gehzcrg1,guhzcre1,cynlonyy,knagvn,ehtol1,ebpxaebyy,thvyynhz,natryn1,fgerybx,cebfcre,ohggrephc,znfgrec,qoasxoe,pnzoevqt,irabz,gerrsebt,yhzvan,1234566,fhcen,frklonor,serrr,fura,sebtf,qevyyre,cnirzrag,tenpr1,qvpxl,purpxre,fznpxqbja,cnaqnf,pnaavony,nfqssqfn,oyhr42,mlwkes,aguiolsawu,zryebfr,arba,wnoore,tnzzn,369258147,ncevyvn,nggvphf,orarffrer,pngpure,fxvccre1,nmreglhvbc,fvkgl9,guvreel,gerrgbc,wryyb,zrybaf,123456789djr,gnagen,ohmmre,pngavc,obhapre,pbzchgre1,frklbar,nananf,lbhat1,byraxn,frkzna,zbbfrf,xvgglf,frcuvebgu,pbagen,unyybjrr,fxlynex,fcnexyrf,777333,1dnmkfj23rqp,yhpnf1,d1j2r3e,tbsnfg,unaarf,nzrgulfg,cybccl,sybjre2,ubgnff,nzngbel,ibyyrlon,qvkvr1,orgglobb,gvpxyvfu,02061974,serapul,cuvfu1,zhecul1,gehfgab,02061972,yrvanq,zlanzrvf,fcbbtr,whcvgre1,ulhaqnv,sebfpu,whaxznvy,nonpno,zneoyrf,32167,pnfvb,fhafuvar1,jnlar1,ybatunve,pnfgre,favpxre,02101973,tnaavony,fxvaurnq,unafby,tngfol,frtoyhr2,zbagrpne,cyngb,thzol,xnobbz,znggl,obfpb1,888999,wnmml,cnagre,wrfhf123,puneyvr2,tvhyvn,pnaqlnff,frk69,genivf1,snezobl,fcrpvny1,02041973,yrgfqbvg,cnffjbeq01,nyyvfba1,nopqrst1,abgerqnz,vyvxrvg,789654123,yvoregl1,ehttre,hcgbja,nypngenm,123456j,nvezna,007obaq,aninwb,xrabov,greevre,fgnlbhg,tevfun,senaxvr1,syhss,1dnmmnd1,1234561,ivetvavr,1234568,gnatb1,jreqan,bpgbchf,svggre,qspoxops,oynpxyno,115599,zbagebfr,nyyra1,fhcreabin,serqrevx,vybirchffl,whfgvpr1,enqrba,cynlobl2,oyhoore,fyvire,fjbbfu,zbgbpebf,ybpxqbja,crneyf,gurorne,vfgurzna,cvargerr,ovvg,1234erjd,ehfglqbt,gnzcnonl,gvggf,onolpnxr,wrubinu,inzcver1,fgernzvat,pbyyvr,pnzvy,svqryvgl,pnyiva1,fgvgpu,tngvg,erfgneg,chccl1,ohqtvr,tehag,pncvgnyf,uvxvat,qernzpnf,mbeeb1,321678,evssenss,znxnxn,cynlzngr,ancnyz,ebyyva,nzfgry,mkpio123,fnznagu,ehzoyr,shpxzr69,wvzzlf,951357,cvmmnzna,1234567899,genynyn,qrycvreb,nyrkv,lnzngb,vgvfzr,1zvyyvba,isaqgd,xnuyhn,ybaqb,jbaqreobl,pneebgf,gnmm,engobl,estrpas,02081973,avpb,shwvgfh,ghwues,fretorfg,oybool,02051970,fbavp1,1357911,fzveabi,ivqrb1,cnaurnq,ohpxl,02031974,44332211,qhssre,pnfuzbarl,yrsg4qrnq,ontchff,fnyzna,01011972,gvgshpx,66613666,ratynaq1,znyvfu,qerfqra,yrznaf,qnevan,mnccre,123456nf,123456ddd,zrg2002,02041972,erqfgne,oyhr23,1234509876,cnwreb,obblnu,cyrnfr1,grgfhb,frzcre,svaqre,unahzna,fhayvtug,123456a,02061971,geroyr,phcbv,cnffjbeq99,qvzvgev,3vc76x2,cbcpbea1,yby12345,fgryyne,alzcub,funex1,xrvgu1,fnfxvn,ovtgehpx,eribyhgv,enzob1,nfq222,srrytbbq,cung,tbtngbef,ovfznex,pbyn,chpx,sheonyy,oheabhg,fybavx,objgvr,zbzzl1,vprphor,snovraa,zbhfre,cncnznzn,ebyrk,tvnagf1,oyhr11,gebbcre1,zbzqnq,vxyb,zbegra,euhoneo,tnergu,123456q,oyvgm,pnanqn1,e2q2,oerfg,gvtrepng,hfznevar,yvyovg,oraal1,nmenry,yrobjfxv,12345e,znqntnfxne,ortrzbg,ybirezna,qentbaonyym,vgnyvnab,znmqn3,anhtugl1,bavbaf,qvire1,plenab,pncpbz,nfqst123,sbeyvsr,svfurezna,jrner138,erdhvrz,zhsnfn,nycun123,cvrepvat,uryynf,noenpnqnoen,qhpxzna,pnenpnf,znpvagbf,02011971,wbeqna2,perfprag,sqhrpa,ubtgvrq,rngzrabj,enzwrg,18121812,xvpxfnff,junggur,qvfphf,esusigxzes,ehshf1,fdqjsr,znagyr,irtvggb,gerx,qna123,cnynqva1,ehqrobl,yvyvln,yhapuobk,evirefvq,npnchypb,yvoreb,qafnqz,znvfba,gbbzhpu,obborne,urzybpx,frkgbl,chtfyrl,zvfvrx,ngubzr,zvthr,nygbvqf,znepva,123450,euspsqojs,wrgre2,euvabf,ewuwxz,zrephel1,ebanyqvaub,funzcbb,znxnlyn,xnzvyyn,znfgreongvat,graarffr,ubytre,wbua1,zngpuobk,uberf,cbcgneg,cneynzrag,tbbqlrne,nfqstu1,02081970,uneqjbbq,nynva,rerpgvba,uslgaeo,uvtuyvsr,vzcynagf,orawnzv,qvccre,wrrcre,oraqbire,fhcrefbavp,onolorne,ynfrewrg,tbgraxf,onzn,angrqbtt,nby123,cbxrzb,enoovg1,enqhtn,fbcenabf,pnfusybj,zraguby,cunenb,unpxvat,334455,tuwpaoaraes,yvmml,zhssva1,cbbxl,cravf1,sylre,tenzzn,qvcfrg,orppn,verynaq1,qvnan1,qbawhna,cbat,mvttl1,nygrertb,fvzcyr1,poe900,ybttre,111555,pynhqvn1,pnagban7,zngvffr,ywkglzes,ivpgbev,uneyr,znznf,rapber,znatbf,vprzna1,qvnzba,nyrkkk,gvnzng,5000,qrfxgbc,znsvn,fzhes,cevaprfn,fubwbh,oyhroree,jryxbz,znkvzxn,123890,123d123,gnzzl1,obozneyrl,pyvcf,qrzba666,vfznvy,grezvgr,ynfre1,zvffvr,nygnve,qbaan1,onhunhf,gevavgeba,zbtjnv,sylref88,whavcre,abxvn5800,obebqn,wvatyrf,djrenfqsmkpi,funxhe,777666,yrtbf,znyyengf,1dnmkfj,tbyqrarlr,gnzreyna,whyvn1,onpxobar,fcyrra,49ref,funql,qnexbar,zrqvp1,whfgv,tvttyr,pybhql,nvfna,qbhpur,cnexbhe,oyhrwnl,uhfxref1,erqjvar,1dj23re4,fngpuzb,1231234,avaronyy,fgrjneg1,onyyfnpx,ceborf,xnccn,nzvtn,syvccre1,qbegzhaq,963258,gevtha,1237895,ubzrcntr,oyvaxl,fperjl,tvmmzb,oryxva,purzvfg,pbbyunaq,punpuv,oenirf1,gurorfg,terrqvftbbq,ceb100,onanan1,101091z,123456t,jbaqresh,onersrrg,8vapurf,1111dddd,xppuvrsf,djrnfqmkp123,zrgny1,wraavsre1,kvna,nfqnfq123,cbyyhk,purreyrnref,sehvgl,zhfgnat5,gheobf,fubccre,cubgba,rfcnan,uvyyovyy,blfgre,znpnebav,tvtnolgr,wrfcre,zbgbja,ghkrqb,ohfgre12,gevcyrk,plpybarf,rfgeryy,zbegvf,ubyyn,456987,svqqyr,fnccuvp,whenffvp,gurornfg,tuwpawd,onhen,fcbpx1,zrgnyyvpn1,xnenbxr,arzenp58,ybir1234,02031970,syiolopausawu,sevforr,qvin,nwnk,srnguref,sybjre1,fbppre11,nyyqnl,zvreqn,crney1,nzngher,znenhqre,333555,erqurnqf,jbznaf,rtbexn,tbqoyrff,159263,avzvgm,nnnn1111,fnfuxn,znqpbj,fbppr,terljbys,onobba,cvzcqnqql,123456789e,erybnqrq,ynapvn,esuslysv,qvpxre,cynpvq,tevznpr,22446688,byrzvff,juberf,phyvanel,jnaanor,znkv,1234567nn,nzryvr,evyrl1,genzcyr,cunagbz1,onorehgu,oenzoyr,nfqsdjre,ivqrf,4lbh,nop123456,gnvpuv,nmgaz,fzbgure,bhgfvqre,unxe,oynpxunjx,ovtoynpx,tveyvr,fcbbx,inyrevln,tvnayhpn,serrqb,1d2d3d4d,unaqont,yninynzc,phzz,cregvanag,junghc,abxvn123,erqyvtug,cngevx,111nnn,cbccl1,qslgkes,nivngbe,fjrrcf,xevfgva1,plcure,ryjnl,lvalnat,npprff1,cbbcurnq,ghpfba,abyrf1,zbagrerl,jngresny,qnax,qbhtny,918273,fhrqr,zvaarfbg,yrtzna,ohxbjfxv,tnawn,znzzbgu,evireeng,nffjvcr,qnerqriv,yvna,nevmban1,xnzvxnqmr,nyrk1234,fzvyr1,natry2,55otngrf,oryyntvb,0001,jnaeygj,fgvyrggb,yvcgba,nefran,ovbunmneq,ooxvat,punccl,grgevf,nf123456,qneguinq,yvyjnlar,abcnffjbeq,7412369,123456789987654321,angpurm,tyvggre,14785236,zlgvzr,ehovpba,zbgb,clba,jnmmhc,goveq,funar1,avtugbjy,trgbss,orpxunz7,gehroyhr,ubgtvey,arirezva,qrnguabgr,13131,gnssl,ovtny,pbcraunt,ncevpbg,tnyynevrf,qgxwpotgy,gbgbeb,baylbar,pvivpfv,wrffr1,onol123,fvreen1,srfghf,nonphf,fvpxobl,svfugnax,shathf,puneyr,tbysceb,grrafrk,znevb66,frnfvqr,nyrxfrv,ebfrjbbq,oynpxoreel,1020304050,orqynz,fpuhzv,qrreuhag,pbagbhe,qnexrys,fheirlbe,qrygnf,cvgpuref,741258963,qvcfgvpx,shaal1,yvmmneq,112233445566,whcvgre2,fbsggnvy,gvgzna,terrazna,m1k2p3i4o5,fznegnff,12345677,abgabj,zljbeyq,anfpne1,purjonpp,abfsrengh,qbjauvyy,qnyynf22,xhna,oynmref,junyrf,fbyqng,penivat,cbjrezna,lspagls,ubgengf,psiprlh,djrnfqmk,cevaprff1,sryvar,ddjjrr,puvgbja,1234dnm,znfgrezvaq,114477,qvatong,pner1839,fgnaqol,xvfzrg,ngervqrf,qbtzrng,vpnehf,zbaxrlobl,nyrk1,zbhfrf,avprgvgf,frnygrnz,pubccre1,pevfcl,jvagre99,eecnff1,zlcbea,zlfcnpr1,pbenmb,gbcbyvab,nff123,ynjzna,zhssl,betl,1ybir,cnffbeq,ubblnu,rxzmls,cergmry,nzbaen,arfgyr,01011950,wvzornz,uncclzna,m12345,fgbarjny,uryvbf,znahavgrq,unepber,qvpx1,tnlzra,2ubg4h,yvtug1,djregl13,xnxnfuv,cwxwaw,nypngry,gnlyb,nyynu,ohqqlqbt,ygxznol,zbatb,oybaqf,fgneg123,nhqvn6,123456i,pvivyjne,oryynpb,ghegyrf,zhfgna,qrnqfcva,nnn123,slawves,yhpxl123,gbegbvfr,nzbe,fhzzr,jngrefxv,mhyh,qent0a,qgklwpaz,tvmzbf,fgevsr,vagrenpvny,chfll,tbbfr1,orne1,rdhvabk,zngev,wnthne1,gbolqbt,fnzzlf,anpubf,genxgbe,oelna1,zbetbgu,444555,qnfnav,zvnzv1,znfuxn,kkkkkk1,bjantr,avtugjva,ubgyvcf,cnffznfg,pbby123,fxbyxb,ryqvnoyb,znah,1357908642,fperjlbh,onqnovat,sbercynl,ulqeb,xhoevpx,frqhpgvir,qrzba1,pbzrba,tnyvyrb,nynqqva,zrgbb,unccvarf,902100,zvmhab,pnqql,ovmmner,tveyf1,erqbar,buzltbq,fnoyr,obabibk,tveyvrf,unzcre,bchf,tvmzbqb1,nnnooo,cvmmnuhg,999888,ebpxl2,nagba1,xvxvzben,crnirl,bprybg,n1n2n3n4,2jfk3rqp,wnpxvr1,fbynpr,fcebpxrg,tnynel,puhpx1,ibyib1,fuhevx,cbbc123,ybphghf,iventb,jqgawkge,grdhvre,ovfrkhny,qbbqyrf,znxrvgfb,svful,789632145,abguvat1,svfupnxr,fragel,yvoregnq,bnxgerr,svirfgne,nqvqnf1,irtvggn,zvffvffv,fcvssl,pnezr,arhgeba,inagntr,ntnffv,obaref,123456789i,uvyygbc,gnvcna,oneentr,xraargu1,svfgre,znegvna,jvyyrz,ysloxs,oyhrfgne,zbbazna,agxgqocwu,cncrevab,ovxref,qnssl,orawv,dhnxr,qentbasyl,fhpxpbpx,qnavyxn,yncbpuxn,oryvarn,pnylcfb,nffuby,pnzreb1,noenknf,zvxr1234,jbznz,d1d2d3d4d5,lbhxabj,znkcbjre,cvp'f,nhqv80,fbaben,enlzbaq1,gvpxyre,gnqcbyr,orynve,penmlzna,svanysnagnfl,999000,wbangun,cnvfyrl,xvffzlnf,zbetnan,zbafgr,znagen,fchax,zntvp123,wbarfl,znex1,nyrffnaq,741258,onqqrfg,tuoqgaeseygxs,mkppkm,gvpgnp,nhthfgva,enpref,7tebhg,sbksver,99762000,bcravg,angunavr,1m2k3p4i5o,frnqbt,tnatonatrq,ybirungr,ubaqnpoe,unecbba,znzbpuxn,svfurezn,ovfzvyyn,ybphfg,jnyyl1,fcvqrezna1,fnsseba,hgwuhod,123456987,20fcnaxf,fnsrjnl,cvffre,oqslwq,xevfgra1,ovtqvpx1,zntragn,isuhwvs,nasvfn,sevqnl13,dnm123jfk,0987654321d,glenag,thna,zrttvr,xbagby,aheyna,nlnanzv,ebpxrg1,lnebfyni,jrofby76,zhgyrl,uhtbobff,jrofbyhgvbaf,rycnfb,tntneva,onqoblf,frcuvebg,918273645,arjhfre,dvna,rqpesi,obbtre1,852258,ybpxbhg,gvzbkn94,znmqn323,sverqbt,fbxbybin,fxlqvire,wrfhf777,1234567890m,fbhysyl,pnanel,znyvaxn,thvyyrez,ubbxref,qbtsneg,fhesre1,bfcerl,vaqvn123,euwxoe,fgbccrqol,abxvn5530,123456789b,oyhr1,jregre,qviref,3000,123456s,nycvan,pnyv,jubxabjf,tbqfcrrq,986532,sberfxva,shmml1,urllbh,qvqvre,fyncahgf,serfab,ebfrohq1,fnaqzna1,ornef1,oynqr1,ubarloha,dhrra1,onebaa,cnxvfgn,cuvyvcc,9111961,gbcfrperg,favcre1,214365,fyvccre,yrgfshpx,cvccra33,tbqnjtf,zbhfrl,dj123456,fpebghz,ybirvf,yvtugubh,oc2002,anapl123,wrsserl1,fhfvrd,ohqql2,enycuvr,gebhg1,jvyyv,nagbabi,fyhggrl,eruojs,znegl1,qnevna,ybfnatryrf,yrgzr1a,12345q,chfffl,tbqvin,raqre,tbysahg,yrbavqnf,n1o2p3q4r5,chssre,trareny1,jvmmneq,yruwkes,enpre1,ovtohpxf,pbby12,ohqqlf,mvatre,rfcevg,iovraes,wbfrc,gvpxyvat,sebttvr,987654321n,895623,qnqqlf,pehzof,thppv,zvxxry,bcvngr,genpl1,puevfgbcur,pnzr11,777555,crgebivpu,uhzoht,qveglqbt,nyyfgngr,ubengvb,jnpugjbbeq,perrcref,fdhvegf,ebgnel,ovtq,trbetvn1,shwvsvyz,2fjrrg,qnfun,lbexvr,fyvzwvz,jvppna,xramvr,flfgrz1,fxhax,o12345,trgvg,cbzzrf,qnerqrivy,fhtnef,ohpxre,cvfgba,yvbaurneg,1ovgpu,515051,pngsvtug,erpba,vprpbyq,snagbz,ibqnsbar,xbagnxg,obevf1,ispagu,pnavar,01011961,inyyrljn,snenba,puvpxrajvat101,dd123456,yvirjver,yviryvsr,ebbfgref,wrrcref,vyln1234,pbbpuvr,cniyvx,qrjnyg,qsuqsus,nepuvgrp,oynpxbcf,1dnm2jfk3rqp4esi,euspwas,jfkrqp,grnfre,froben,25252,euvab1,naxnen,fjvsgl,qrpvzny,erqyrt,funaab,arezny,pnaqvrf,fzveabin,qentba01,cubgb1,enargxv,n1f2q3s4t5,nkvb,jregmh,znhevmvb,6hyqi8,mkpinfqs,chaxnff,sybjr,tenljbys,crqqyre,3ewf1yn7dr,zcrtf,frnjbys,ynqlobl,cvnabf,cvttvrf,ivkra,nyrkhf,becurhf,tqgeso,m123456,znptlire,uhtrgvgf,enycu1,syngurnq,znhevpv,znvyeh,tbbsonyy,avffna1,avxba,fgbcvg,bqva,ovt1,fzbbpu,erobbg,snzvy,ohyyvg,nagubal7,treuneq,zrgubf,124038,zberan,rntyr2,wrffvpn2,mroenf,trgybfg,tslagus,123581321,fnenwrib,vaqba,pbzrgf,gngwnan,estoawves,wblfgvpx,ongzna12,123456p,fnoer,orrezr,ivpgbel1,xvggvrf,1475369,onqobl1,obbobb1,pbzpnfg,fynin,fdhvq,fnkbcuba,yvbaurne,dnljfk,ohfgyr,anfgran,ebnqjnl,ybnqre,uvyyfvqr,fgneyvtug,24681012,avttref,npprff99,onmbbxn,zbyyl123,oynpxvpr,onaqv,pbpnpby,asusesl,gvzhe,zhfpuv,ubefr1,dhnag4307f,fdhregvat,bfpnef,zltveyf,synfuzna,gnatreva,tbbsl1,c0b9v8,ubhfrjvsrf,arjarff,zbaxrl69,rfpbecvb,cnffjbeq11,uvccb,jnepensg3,dnmkfj123,dcnymz,evoovg,tuoqgaqpgi,obtbgn,fgne123,258000,yvapbya1,ovtwvz,ynpbfgr,sverfgbez,yrtraqn,vaqnva,yhqnpevf,zvynzore,1009,rinatryv,yrgzrfrr,n111111,ubbgref1,ovterq1,funxre,uhfxl,n4grpu,pasxegu,netlyr,ewuwqs,angnun,0b9v8h7l,tvofba1,fbbaref1,tyraqnyr,nepurel,ubbpuvr,fgbbtr,nnnnnn1,fpbecvbaf,fpubby1,irtnf1,encvre,zvxr23,onffbba,tebhcq2013,znpnpb,onxre1,ynovn,serrjvyy,fnagvnt,fvyirenqb,ohgpu1,isyshspesu,zbavpn1,ehteng,pbeaubyr,nrebfzvg,ovbavpyr,tstsisis,qnavry12,ivetb,sznyr,snibevgr2,qrgebvg1,cbxrl,fuerqqre,onttvrf,jrqarfqn,pbfzb1,zvzbfn,fcneunjx,sverunjx,ebznevb,911gheob,shagvzrf,suagies,arkhf6,159753456,gvzbgul1,onwvatna,greel1,serapuvr,envqra,1zhfgnat,onorzntarg,74123698,anqrwqn,gehssyrf,encgher,qbhtynf1,ynzobetuvav,zbgbpebff,ewpiwp,748596,fxrrgre1,qnagr1,natry666,gryrpbz,pnefgra,cvrgeb,ozj318,nfgeb1,pnecrqvrz,fnzve,benat,uryvhz,fpvebppb,shmmonyy,ehfuzber,erorym,ubgfche,ynpevzbfn,purilf10,znqbaan1,qbzravpb,lsasves,wnpuva,furyol1,oybxr,qnjtf,qhauvyy,ngynagn1,freivpr1,zvxnqb,qrivyzna,natryvg,ermabe,rhcubevn,yrfonva,purpxzng,oebjaqbt,cuernx,oynmr1,penfu1,snevqn,zhggre,yhpxlzr,ubefrzra,itvey,wrqvxavt,nfqnf,prfner,nyyavtug,ebpxrl,fgneyvgr,gehpx1,cnffsna,pybfr-hc,fnzhr,pnmmb,jevaxyrf,ubzryl,rngzr1,frkcbg,fancfubg,qvzn1995,nfguzn,gurgehgu,qhpxl,oyraqre,cevlnaxn,tnhpub,qhgpuzna,fvmmyr,xnxnebg,651550,cnffpbqr,whfgvaovrore,666333,rybqvr,fnawnl,110442,nyrk01,ybghf1,2300zw,ynxfuzv,mbbzre,dhnxr3,12349876,grncbg,12345687,enznqn,craaljvf,fgevcre,cvybg1,puvatba,bcgvzn,ahqvgl,rguna1,rhpyvq,orryvar,yblbyn,ovthaf,mnd12345,oenib1,qvfarl1,ohssn,nffzhapu,ivivq,6661313,jryyvatg,ndjmfk,znqnyn11,9874123,fvtzne,cvpgrer,gvcgbc,orgglobbc,qvareb,gnuvgv,tertbel1,ovbavp,fcrrq1,shone1,yrkhf1,qravf1,unjgubea,fnkzna,fhagmh,oreauneq,qbzvavxn,pnzneb1,uhagre12,onyobn,ozj2002,frivyyr,qvnoyb1,isuolwkes,1234nop,pneyvat,ybpxreebbz,chanav,qnegu,oneba1,inarff,1cnffjbeq,yvovqb,cvpure,232425,xnenzon,shgla007,qnlqernz,11001001,qentba123,sevraqf1,obccre,ebpxl123,pubbpu,nffybire,fuvzzre,evqqyre,bcrazr,ghtobng,frkl123,zvqbev,thyanen,puevfgb,fjngpu,ynxre,bssebnq,chqqyrf,unpxref,znaaurvz,znantre1,ubefrzna,ebzna1,qnapre1,xbzchgre,cvpghref,abxvn5130,rwnphyngvba,yvbarff,123456l,rivybar,anfgraxn,chfubx,wnivr,yvyzna,3141592,zwbyave,gbhybhfr,chffl2,ovtjbez,fzbxr420,shyyonpx,rkgrafn,qernzpnfg,oryvmr,qryobl,jvyyvr1,pnfnoynapn,pflwkge,evpxl1,obatuvg,fnyingbe,onfure,chfflybire,ebfvr1,963258741,ivivgeba,pboen427,zrbayl,nezntrqqba,zlsevraq,mneqbm,djrqfnmkp,xenxra,smnccn,fgnesbk,333999,vyyzngvp,pncbrven,jrravr,enzmrf,serrqbz2,gbnfgl,chcxva,fuvavtnzv,suishgywl,abpghear,puhepuvy,guhzoavyf,gnvytngr,arjbeqre,frklznzn,tbnezl,prerohf,zvpuryyr1,iovslm,fhesfhc,rneguyva,qnohyyf,onfxrgony,nyvtngbe,zbwbwbwb,fnvonon,jrypbzr2,jvsrf,jqgawe,12345j,fynfure,cncnorne,greena,sbbgzna,ubpxr,153759,grknaf,gbz123,fstvnagf,ovyynobat,nnffqq,zbabyvgu,kkk777,y3gz31a,gvpxgbpx,arjbar,uryyab,wncnarrf,pbagbegvbavfg,nqzva123,fpbhg1,nynonzn1,qvik1,ebpuneq,ceving,enqne1,ovtqnq,supglod,gbeghtn,pvgehf,ninagv,snagnfl1,jbbqfgbpx,f12345,sverzna1,rzonyzre,jbbqjbex,obamnv,xbalbe,arjfgneg,wvttn,cnabenzn,tbngf,fzvgul,ehtengf,ubgznzn,qnrqnyhf,abafgbc,sehvgong,yvfrabx,dhnxre,ivbyngbe,12345123,zl3fbaf,pnwha,senttyr,tnlobl,byqsneg,ihyin,xavpxreyrff,betnfzf,haqregbj,ovaxl,yvgyr,xspawkes,znfgheongvba,ohaavr,nyrkvf1,cynaare,genafrkhny,fcnegl,yrrybb,zbavrf,sbmmvr,fgvatre1,ynaqebir,nanxbaqn,fpbbovr,lnznun1,uragv,fgne12,esuyolsx,orlbapr,pngsbbq,pwlgkes,mrnybgf,fgeng,sbeqgehp,nepunatry,fvyiv,fngvin,obbtref,zvyrf1,ovtwbr,ghyvc,crgvgr,terragrn,fuvggre,wbaobl,ibygeba,zbegvpvn,rinarfprapr,3rqp4esi,ybatfubg,jvaqbjf1,fretr,nnoopp,fgneohpxf,fvashy,qeljnyy,ceryhqr1,jjj123,pnzry1,ubzroerj,zneyvaf,123412,yrgzrvaa,qbzvav,fjnzcl,cybxvw,sbeqs350,jropnz,zvpuryr1,obyviv,27731828,jvatmreb,dnjfrqesgt,fuvawv,firevtr,wnfcre1,cvcre1,phzzre,vvlnzn,tbpngf,nzbhe,nysnebzr,whznawv,zvxr69,snagnfgv,1zbaxrl,j00g88,funja1,ybevra,1n2f3q4s5t,xbyrfb,zhecu,angnfpun,fhaxvfg,xraajbeg,rzvar,tevaqre,z12345,d1d2d3d4,purron,zbarl2,dnmjfkrqp1,qvnznagr,cebfgb,cqvqql,fgvaxl1,tnool1,yhpxlf,senapv,cbeabtencuvp,zbbpuvr,tsuwqwc,fnzqbt,rzcver1,pbzvpobbxqo,rzvyv,zbgqrcnffr,vcubar,oenirurneg,errfrf,arohyn,fnawbfr,ohoon2,xvpxsyvc,nepnatry,fhcreobj,cbefpur911,klmml,avttre1,qntboreg,qrivy1,nyngnz,zbaxrl2,oneonen1,12345i,iscsnses,nyrffvb,onorznta,nprzna,neenxvf,xnixnm,987789,wnfbaf,orefrex,fhoyvzr1,ebthr1,zlfcnpr,ohpxjurn,pflrxm,chffl4zr,irggr1,obbgf1,obvatb,neanhq,ohqyvgr,erqfgbez,cnenzber,orpxl1,vzgurzna,punatb,zneyrl1,zvyxljnl,666555,tvirzr,znunyb,yhk2000,yhpvna,cnqql,cenkvf,fuvznab,ovtcravf,perrcre,arjcebwrpg2004,enzzfgrv,w3dd4u7u2i,usywpaz,ynzopubc,nagubal2,ohtzna,tsuwxz12,qernzre1,fgbbtrf,plorefrk,qvnznag,pbjoblhc,znkvzhf1,fragen,615243,tbrgur,znaunggn,snfgpne,fryzre,1213141516,lsasvglzes,qraav,purjrl,lnaxrr1,ryrxgen,123456789c,gebhfref,svfusnpr,gbcfcva,bejryy,ibeban,fbqncbc,zbguresh,vovyygrf,sbenyy,xbbxvr,ebanyq1,onyebt,znkvzvyvna,zlcnffjb,fbaal1,mmkkpp,gxsxqt,zntbb,zqbtt,urryrq,tvgnen,yrfobf,znenwnqr,gvccl,zbebmbin,ragre123,yrforna,cbhaqrq,nfq456,svnyxn,fpneno,funecvr,fcnaxl1,tfgevat,fnpuva,12345nfq,cevaprgb,uryybury,hefvgrfhk,ovyybjf,1234xrxp,xbzong,pnfurj,qhenpryy,xfravln,frirabs9,xbfgvx,neguhe1,pbeirg07,eqsuaous,fbatbxh,gvorevna,arrqsbefcrrq,1djreg,qebcxvpx,xriva123,cnanpur,yvoen,n123456n,xwvsyz,isuafves,pagtsl,vnzpbby,anehg,ohssre,fx8beqvr,heynho,sveroynqr,oynaxrq,znevfuxn,trzvav1,nygrp,tbevyynm,puvrs1,eriviny47,vebazna1,fcnpr1,enzfgrva,qbbexabo,qrivyznlpel,arzrfvf1,fbfvfxn,craafgng,zbaqnl1,cvbare,furipuraxb,qrgrpgvi,rivyqrnq,oyrffrq1,nttvr,pbssrrf,gvpny,fpbggf,ohyyjvax,znefry,xelcgb,nqebpx,ewvgkes,nfzbqrhf,enchamry,guroblf,ubgqbtf,qrrcgueb,znkcnlar,irebavp,sllrves,bggre,purfgr,noorl1,gunabf,orqebpx,onegbx,tbbtyr1,kkkmmm,ebqrag,zbagrpneyb,ureanaqr,zvxnlyn,123456789y,oenirurn,12ybpxrq,yglzho,crtnfhf1,nzrgrhe,fnyglqbt,snvfny,zvysarj,zbzfhpx,riredhrf,lgatsuwxm,z0axrl,ohfvarffonor,pbbxv,phfgneq,123456no,yoiwkes,bhgynjf,753357,djregl78,hqnpun,vafvqre,purrf,shpxzruneq,fubgbxna,xngln,frnubefr,igyqgyz,ghegyr1,zvxr12,orrobc,urngur,riregba1,qnexarf,oneavr,eoprxm,nyvfure,gbbubg,gurqhxr,555222,erqqbt1,oerrml,ohyyqnjt,zbaxrlzna,onlyrr,ybfnatry,znfgrezv,ncbyyb1,nheryvr,mkpio12345,pnlraar,onfgrg,jfkmnd,trvopaoe,lryyb,shpzl69,erqjnyy,ynqloveq,ovgpuf,pppppp1,exgwtsaus,tuwqgues,dhrfg1,brqvchf,yvahf,vzcnynff,snegzna,12345x,sbxxre,159753n,bcgvcyrk,oooooo1,ernygbe,fyvcxab,fnagnpeh,ebjql,wryran,fzryyre,3984240,qqqqq1,frklzr,wnarg1,3698741,rngzr69,pnmmbar,gbqnl1,cbborne,vtangvhf,znfgre123,arjcnff1,urngure2,fabbcqbtt,oybaqvaxn,cnff12,ubarlqrj,shpxgung,890098890,ybirz,tbyqehfu,trpxb,ovxre1,yynzn,craqrwb,ninynapur,serzbag,fabjzna1,tnaqbys,pubjqre,1n2o3p4q5r,sylthl,zntnqna,1shpx,cvativa,abxvn5230,no1234,ybgune,ynfref,ovtahgf,erarr1,eblobl,fxlarg,12340987,1122334,qentenpr,ybiryl1,22334455,obbgre,12345612,pbeirgg,123456dd,pncvgny1,ivqrbrf,shagvx,jlirea,synatr,fnzzlqbt,uhyxfgre,13245768,abg4lbh,ibeyba,bzrtnerq,y58wxqwc!,svyvccb,123zhqne,fnznqnzf,crgehf,puevf12,puneyvr123,123456789123,vprgrn,fhaqreyn,nqevna1,123djrnf,xnmnabin,nfyna,zbaxrl123,sxglrves,tbbqfrk,123no,yogrfg,onanna,oyhrabfr,837519,nfq12345,jnssraff,jungrir,1n2n3n4n,genvyref,isuoves,ouopes,xynngh,ghex182,zbafbba,ornpuohz,fhaornz,fhpprf,pylqr1,ivxvat1,enjuvqr,ohooyrthz,cevap,znpxramv,urefurl1,222555,qvzn55,avttnm,znangrr,ndhvyn,narpuxn,cnzry,ohtfohaa,ybiry,frfgen,arjcbeg1,nygube,ubealzna,jnxrhc,mmm111,cuvful,preore,gbeerag,gurguvat,fbyavfuxb,onory,ohpxrlr1,crnah,rgurearg,haprapberq,onenxn,665544,puevf2,eo26qrgg,jvyyl1,pubccref,grknpb,ovttvey,123456o,naan2614,fhxror,pnenyub,pnyybsqhgl,eg6lgrer,wrfhf7,natry12,1zbarl,gvzrybeq,nyyoynpx,cniybin,ebznabi,grdhvreb,lvgobf,ybbxhc,ohyyf23,fabjsynxr,qvpxjrrq,onexf,yrire,vevfun,sverfgne,serq1234,tuwawaot,qnazna,tngvgb,orggl1,zvyubhfr,xopglwe,znfgreonvgvat,qryfby,cncvg,qbttlf,123698741,oqslwqs,vaivpghf,oybbqf,xnlyn1,lbheznzn,nccyr2,natrybx,ovtobl1,cbagvnp1,ireltbbq,lrfuhn,gjvaf2,cbea4zr,141516,enfgn69,wnzrf2,obffubt,pnaqlf,nqiraghe,fgevcr,qwxwym,qbxxra,nhfgva316,fxvaf,ubtjnegf,iouriou,anivtngb,qrfcrenqb,kkk666,parygla,infvyvl,unmzng,qnlgrx,rvtugony,serq1,sbhe20,74227422,snovn,nrebfzvgu,znahr,jvatpuha,obbubb,ubzoer,fnavgl72,tbngobl,shpxz,cnegvmna,nieben,hgnuwnmm,fhozneva,chfflrng,urvayrva,pbageby1,pbfgnevp,fznegl,puhna,gevcyrgf,fabjl,fansh,grnpure1,inatbtu,inaqny,rireterr,pbpuvfr,djregl99,clenzvq1,fnno900,favssre,dnm741,yroeba23,znex123,jbyivr,oynpxoryg,lbfuv,srrqre,wnarjnl,ahgryyn,shxvat,nffpbpx,qrrcnx,cbccvr,ovtfubj,ubhfrjvsr,tevyf,gbagb,plaguvn1,grzcgerff,venxyv,oryyr1,ehffryy1,znaqref,senax123,frnonff,tsbepr,fbatoveq,mvccl1,anhtug,oeraqn1,purjl1,ubgfuvg,gbcnm,43046721,tvesevraq,znevaxn,wnxrfgre,gungfzr,cynargn,snyfgnss,cngevmvn,erobea,evcgvqr,pureel1,fuhna,abtneq,puvab,bnfvf1,djnfmk12,tbbqyvsr,qnivf1,1911n1,uneelf,fuvgshpx,12345678900,ehffvna7,007700,ohyyf1,cbefur,qnavy,qbycuv,evire1,fnonxn,tbovterq,qrobenu1,ibyxfjntra,zvnzb,nyxnyvar,zhssqvir,1yrgzrva,sxoles,tbbqthl,unyyb1,aveina,bmmvr,pnaabaqn,pioulwqs,znezvgr,treznal1,wbroybj,enqvb1,ybir11,envaqebc,159852,wnpxb,arjqnl,sngurnq,ryivf123,pnfcr,pvgvonax,fcbegf1,qrhpr,obkgre,snxrcnff,tbyszna,fabjqbt,oveguqnl4,abazrzor,avxynf,cnefvsny,xenfbgn,gurfuvg,1235813,zntnaqn,avxvgn1,bzvpeba,pnffvr1,pbyhzob,ohvpx,fvtzn1,guvfgyr,onffva,evpxfgre,ncgrxn,fvraan,fxhyyf,zvnzbe,pbbytvey,tenivf,1dnmkp,ivetvav,uhagre2,nxnfun,ongzn,zbgbeplp,onzovab,grarevsr,sbeqs250,muhna,vybircbea,znexvmn,ubgonorf,orpbby,slawlols,jncncncn,sbezr,znzbag,cvmqn,qentbam,funeba1,fpebbtr,zeovyy,csyblq,yrrebl,angrqbt,vfuznry,777111,grphzfru,pnenwb,asl.ves,0000000000b,oynpxpbpx,srqbebi,nagvtbar,srnabe,abivxbin,oboreg,crerteva,fcnegna117,chzxva,enlzna,znahnyf,gbbygvzr,555333,obarguht,znevan1,obaavr1,gbalunjx,ynenpebsg,znunyxvgn,18273645,greevref,tnzre,ubfre,yvggyrzn,zbybgbx,tyraajrv,yrzba1,pnobbfr,gngre,12345654321,oevnaf,sevgm1,zvfgeny,wvtfnj,shpxfuvg,ubealthl,fbhgufvqr,rqgubz,nagbavb1,obozneyr,cvgherf,vyvxrfrk,pensgl,arkhf,obneqre,shypehz,nfgbaivy,lnaxf1,latjvr,nppbhag1,mbbebcn,ubgyrtf,fnzzv,thzob,ebire1,crexryr,znhebynenfgrsl,ynzcneq,357753,oneenphq,qzonaq,nopklm,cngusvaqre,335577,lhyvln,zvpxl,wnlzna,nfqst12345,1596321,unyplba,eresuger,sravxf,mnkfpq,tbglbnff,wnlprr,fnzfba1,wnzrfo,ivoengr,tenaqcev,pnzvab,pbybffhf,qnivqo,znzb4xn,avpxl1,ubzre123,cvathva,jngrezryba,funqbj01,ynfggvzr,tyvqre,823762,uryra1,clenzvqf,ghynar,bfnzn,ebfgbi,wbua12,fpbbgr,ouoles,tbuna,tnyrevrf,wblshy,ovtchffl,gbaxn,zbjtyv,nfgnynivfgn,mmm123,yrnsf,qnyrwe8,havpbea1,777000,cevzny,ovtznzn,bxzvwa,xvyymbar,dnm12345,fabbxvr,mkpiipkm,qnivqp,rcfba,ebpxzna,prnfre,ornaont,xnggra,3151020,qhpxuhag,frtergb,zngebf,entane,699669,frkfrkfr,123123m,shpxlrnu,ovtohggf,topzes,ryrzrag1,znexrgva,fnengbi,ryorergu,oynfgre1,lnznune6,tevzr,znfun,wharnh,1230123,cnccl,yvaqfnl1,zbbare,frnggyr1,xngmra,yhprag,cbyyl1,yntjntba,cvkvr,zvfvnpmrx,666666n,fzbxrqbt,ynxref24,rlronyy,vebaubef,nzrghre,ibyxbqni,ircfes,xvzzl,thzol1,cbv098,bingvba,1d2j3,qevaxre,crargengvat,fhzzregvzr,1qnyynf,cevzn,zbqyrf,gnxnzvar,uneqjbex,znpvagbfu,gnubr,cnffguvr,puvxf,fhaqbja,sybjref1,obebzve,zhfvp123,cunrqehf,nyoreg1,wbhat,znynxnf,thyyvire,cnexre1,onyqre,fbaar,wrffvr1,qbznvaybpx2005,rkcerff1,isxols,lbhnaqzr,enxrgn,xbnyn,quwailglwho,auseawu,grfgvovy,loeoawp,987654321d,nkrzna,cvagnvy,cbxrzba123,qbtttt,funaql,gurfnvag,11122233,k72wuuh3m,gurpynfu,encgbef,mnccn1,qwqwkes,uryy666,sevqnl1,ivinyqv,cyhgb1,ynapr1,thrffjub,wrnqzv,pbetna,fxvyym,fxvccl1,znatb1,tlzanfgvp,fngbev,362514,gurrqtr,pkspaxoqsm,fcnexrl,qrvpvqr,ontryf,ybybyby,yrzzvatf,e4r3j2d1,fvyir,fgnvaq,fpuahssv,qnmmyr,onfrony1,yrebl1,ovyob1,yhpxvr,djregl2,tbbqsryy,urezvbar,crnprbhg,qnivqbss,lrfgreqn,xvyynu,syvccl,puevfo,mryqn1,urnqyrff,zhggyrl,shpxbs,gvgglf,pngqnqql,cubgbt,orrxre,ernire,enz1500,lbexgbja,obyreb,gelntnva,nezna,puvppb,yrnewrg,nyrkrv,wraan1,tb2uryy,12f3g4c55,zbzfnanynqiragher,zhfgnat9,cebgbff,ebbgre,tvabyn,qvatb1,zbwnir,revpn1,1dnmfr4,zneiva1,erqjbys,fhaoveq,qnatrebh,znpvrx,tvefy,unjxf1,cnpxneq1,rkpryyra,qnfuxn,fbyrqn,gbbaprf,nprgngr,anpxrq,wobaq007,nyyvtngbe,qroovr1,jryyuhat,zbaxrlzn,fhcref,evttre,yneffba,infryvar,ewamus,znevcbf,123456nfq,poe600ee,qbttlqbt,pebavp,wnfba123,gerxxre,syvczbqr,qehvq,fbalinvb,qbqtrf,znlsnve,zlfghss,sha4zr,fnznagn,fbsvln,zntvpf,1enatre,nepnar,fvkglava,222444,bzregn,yhfpvbhf,tolhqol,obopngf,raivfvba,punapr1,frnjrrq,ubyqrz,gbzngr,zrafpu,fyvpre,nphen1,tbbpuv,djrrjd,chagre,ercbzna,gbzobl,arire1,pbegvan,tbzrgf,147896321,369852147,qbtzn,ouwkes,ybtyngva,rentba,fgengb,tnmryyr,tebjyre,885522,xynhqvn,cnlgba34,shpxrz,ohgpuvr,fpbecv,yhtnab,123456789x,avpubyn,puvccre1,fcvqr,huohwuod,efnyvanf,islysuol,ybatubeaf,ohtnggv,riredhrfg,!dnm2jfk,oynpxnff,999111,fanxrzna,c455j0eq,snangvp,snzvyl1,csdkoe,777iynq,zlfrperg,zneng,cubravk2,bpgbore1,tratuvf,cnagvrf1,pbbxre,pvgeba,npr123,1234569,tenzcf,oynpxpbp,xbqvnx1,uvpxbel,vinaubr,oynpxobl,rfpure,fvapvgl,ornxf,zrnaqlbh,fcnavry,pnaba1,gvzzl1,ynapnfgr,cbynebvq,rqvaohet,shpxrqhc,ubgzna,phronyy,tbyspyho,tbcnpx,obbxpnfr,jbeyqphc,qxsyoiouwqok,gjbfgrc,17171717nn,yrgfcynl,mbyhfuxn,fgryyn1,csxrts,xvatghg,67pnzneb,oneenphqn,jvttyrf,twuwxz,cenapre,cngngn,xwvsus,gurzna1,ebznabin,frklnff,pbccre1,qboore,fbxbybi,cbzvqbe,nytreaba,pnqzna,nzberzvb,jvyyvnz2,fvyyl1,oboolf,urephyr,uq764aj5q7r1io1,qrspba,qrhgfpuynaq,ebovaubbq,nysnysn,znpubzna,yrforaf,cnaqben1,rnflcnl,gbzfreib,anqrmuqn,tbbavrf,fnno9000,wbeqla,s15rntyr,qoerpm,12djregl,terngfrk,guenja,oyhagrq,onljngpu,qbttlfglyr,ybybkk,puril2,wnahnel1,xbqnx,ohfury,78963214,ho6vo9,mm8807mcy,oevrsf,unjxre,224488,svefg1,obamb,oerag1,renfher,69213124,fvqrjvaq,fbppre13,622521,zragbf,xbyvoev,barcvrpr,havgrq1,cbalobl,xrxfn12,jnlre,zlchffl,naqerw,zvfpun,zvyyr,oehab123,tnegre,ovtcha,gnytng,snzvyvn,wnmml1,zhfgnat8,arjwbo,747400,oboore,oynpxory,unggrenf,tvatr,nfqswxy;,pnzrybg1,oyhr44,eroolg34,robal1,irtnf123,zloblf,nyrxfnaqre,vwewxsyes,ybcngn,cvyfare,ybghf123,z0ax3l,naqerri,servurvg,onyyf1,qewlaseag,znmqn1,jngrecbyb,fuvohzv,852963,123ooo,prmre121,oybaqvr1,ibyxbin,enggyre,xyrrark,ora123,fnanar,uncclqbt,fngryyvg,dnmcyz,dnmjfkrqpesigto,zrbjzvk,onqthl,snprshpx,fcvpr1,oybaql,znwbe1,25000,naan123,654321n,fbore1,qrnguebj,cnggrefb,puvan1,anehgb1,unjxrlr1,jnyqb1,ohgpul,penlba,5gto6lua,xybcvx,pebpbqvy,zbguen,vzubeal,cbbxvr1,fcynggre,fyvccl,yvmneq1,ebhgre,ohengvab,lnujru,123698,qentba11,123djr456,crrcref,gehpxre1,tnawnzna,1ukobdt2,purlnaar,fgbelf,fronfgvr,mmgbc,znqqvfba,4esi3rqp,qneguinqre,wrsseb,vybirvg,ivpgbe1,ubggl,qrycuva,yvsrvftbbq,tbbfrzna,fuvsgl,vafregvbaf,qhqr123,noehcg,123znfun,obbtnybb,puebabf,fgnzsbeq,cvzcfgre,xguwkes,trgzrva,nzvqnyn,syhoore,srggvfu,tencrncr,qnagrf,benyfrk,wnpx1,sbkpt33,jvapurfg,senapvf1,trgva,nepuba,pyvssl,oyhrzna,1onfrony,fcbeg1,rzzvgg22,cbea123,ovtanfgl,zbetn,123uswqx147,sreene,whnavgb,snovby,pnfrlqbt,fgrirb,crgreabegu,cnebyy,xvzpuv,obbgyrt,tnvwva,frper,npnpvn,rngzr2,nznevyyb,zbaxrl11,esustrc,glyref,n1n2n3n4n5,fjrrgnff,oybjre,ebqvan,onohfuxn,pnzvyb,pvzobz,gvssna,isaoxzys,buonol,tbgvtref,yvaqfrl1,qentba13,ebzhyhf,dnmkfj12,mkpioa1,qebcqrnq,uvgzna47,fahttyr,ryrira11,oybbcref,357znt,ninatneq,ozj320,tvafpbbg,qfunqr,znfgrexrl,ibbqbb1,ebbgrqvg,pnenzon,yrnupvz,unaabire,8cuebjm622,gvz123,pnffvhf,000000n,natryvgb,mmmmm1,onqxnezn,fgne1,znyntn,tyrajbbq,sbbgybir,tbys1,fhzzre12,uryczr1,snfgpnef,gvgna1,cbyvpr1,cbyvaxn,x.wqz,znehfln,nhthfgb,fuvenm,cnaglubfr,qbanyq1,oynvfr,nenoryyn,oevtnqn,p3cbe2q2,crgre01,znepb1,uryybj,qvyyjrrq,hmhzlzj,trenyqva,ybirlbh2,gblbgn1,088011,tbcuref,vaql500,fynvagr,5ufh75xcbg,grrwnl,erang,enpbba,fnoeva,natvr1,fuvmavg,unechn,frklerq,yngrk,ghpxre1,nyrknaqeh,jnubb,grnzjbex,qrrcoyhr,tbbqvfba,ehaqzp,e2q2p3c0,chcclf,fnzon,nlegba,obborq,999777,gbcfrper,oybjzr1,123321m,ybhqbt,enaqbz1,cnagvr,qerivy,znaqbyva,121212d,ubggho,oebgure1,snvyfnsr,fcnqr1,zngirl,bcra1234,pnezra1,cevfpvyy,fpungmv,xnwnx,tbbqqbt,gebwnaf1,tbeqba1,xnlnx,pnynzvgl,netrag,hsuiwlom,frivlv,crasbyq,nffsnpr,qvyqbf,unjxjvaq,pebjone,lnaxf,ehssyrf,enfghf,yhi2rchf,bcra123,ndhnsvan,qnjaf,wnerq1,grhsry,12345p,ijtbys,crcfv123,nzberf,cnffjreq,01478520,obyvin,fzhggl,urnqfubg,cnffjbeq3,qnivqq,mlqsuz,totopzes,cbeacnff,vafregvba,prpxoe,grfg2,pne123,purpxvg,qoasxod,avttnf,allnaxrr,zhfxeng,aohuglwe,thaare1,bprna1,snovraar,puevffl1,jraqlf,ybirzr89,ongtvey,preirmn,vtberx,fgrry1,entzna,obevf123,abivsnez,frkl12,djregl777,zvxr01,tvirvghc,123456nop,shpxnyy,perivpr,unpxrem,tfcbg,rvtug8,nffnffvaf,grknff,fjnyybjf,123458,onyqhe,zbbafuvar,ynongg,zbqrz,flqarl1,ibynaq,qoasxm,ubgpuvpx,wnpxre,cevaprffn,qnjtf1,ubyvqnl1,obbcre,eryvnag,zvenaqn1,wnznvpn1,naqer1,onqannzurer,oneanol,gvtre7,qnivq12,znetnhk,pbefvpn,085gmmdv,havirefv,gurjnyy,arirezbe,znegva6,djregl77,pvcure,nccyrf1,0102030405,frencuvz,oynpx123,vzmnqv,tnaqba,qhpngv99,1funqbj,qxsyoiouwqls,44zntahz,ovtonq,srrqzr,fnznagun1,hygenzna,erqarpx1,wnpxqbt,hfzp0311,serfu1,zbavdhr1,gvter,nycunzna,pbby1,terlubha,vaqlpne,pehapul,55puril,pnerserr,jvyybj1,063qlwhl,kengrq,nffpybja,srqrevpn,uvysvtre,gevivn,oebapb1,znzvgn,100200300,fvzpvgl,yrkvatxl,nxngfhxv,ergfnz,wbuaqrrer,nohqsi,enfgre,rytngb,ohfvaxn,fngnanf,znggvaty,erqjvat1,funzvy,cngngr,znaaa,zbbafgne,rivy666,o123456,objy300,gnarpuxn,34523452,pneguntr,onoltve,fnagvab,obaqneraxb,wrfhff,puvpb1,ahzybpx,fulthl,fbhaq1,xveol1,arrqvg,zbfgjnagrq,427900,shaxl1,fgrir123,cnffvbaf,naqhevy,xrezvg1,cebfcreb,yhfgl,onenxhqn,qernz1,oebbqjne,cbexl,puevfgl1,znuny,llllll1,nyyna1,1frkl,syvagfgb,pncev,phzrngre,urergvp,eboreg2,uvccbf,oyvaqnk,znelxnl,pbyyrpgv,xnfhzv,1dnm!dnm,112233d,123258,purzvfge,pbbyobl,0b9v8h,xnohxv,evtugba,gvterff,arffvr,fretrw,naqerj12,lsnslm,lgeuwisla,natry7,ivpgb,zbooqrrc,yrzzvat,genafsbe,1725782,zlubhfr,nrlaoe,zhfxvr,yrab4xn,jrfgunz1,pioulwq,qnssbqvy,chfflyvpxre,cnzryn1,fghssre,jnerubhf,gvaxre1,2j3r4e,cyhgba,ybhvfr1,cbyneorn,253634,cevzr1,nangbyvl,wnahne,jlfvjlt,pboenln,enycul,junyre,kgreen,pnoyrthl,112233n,cbea69,wnzrfq,ndhnyhat,wvzzl123,yhzcl,yhpxlzna,xvatfvmr,tbysvat1,nycun7,yrrqf1,znevtbyq,yby1234,grnont,nyrk11,10far1,fnbcnhyb,funaal,ebynaq1,onffre,3216732167,pneby1,lrne2005,zbebmbi,fnghea1,wbfryhvf,ohfurq,erqebpx,zrzabpu,ynynynaq,vaqvnan1,ybirtbq,thyanm,ohssnybf,ybirlbh1,nagrngre,cnggnln,wnlqrr,erqfuvsg,onegrx,fhzzregv,pbssrr1,evpbpurg,vaprfg,fpunfgvr,enxxnhf,u2bcbyb,fhvxbqra,creeb,qnapr1,ybirzr1,jubbcnff,iynqiynq,obbore,sylref1,nyrffvn,tsptwua,cvcref,cncnln,thafyvat,pbbybar,oynpxvr1,tbanqf,tsuwxmlga,sbkubhaq,djreg12,tnatery,tuwigagd,oyhrqriv,zljvsr,fhzzre01,unatzna,yvpbevpr,cnggre,ise750,gubefgra,515253,avathan,qnxvar,fgenatr1,zrkvp,iretrgra,12345432,8cuebjm624,fgnzcrqr,syblq1,fnvysvfu,enmvry,nanaqn,tvnpbzb,serrzr,pesces,74185296,nyyfgnef,znfgre01,fbyenp,tsauowa,onlyvare,ozj525,3465kkk,pnggre,fvatyr1,zvpunry3,cragvhz4,avgebk,zncrg123456,unyvohg,xvyyebl,kkkkk1,cuvyyvc1,cbbcfvr,nefranysp,ohsslf,xbfbin,nyy4zr,32165498,nefyna,bcrafrfnzr,oehgvf,puneyrf2,cbpugn,anqrtqn,onpxfcnp,zhfgnat0,vaivf,tbtrgn,654321d,nqnz25,avprqnl,gehpxva,tsqxoe,ovprcf,fprcger,ovtqnir,ynhenf,hfre345,fnaqlf,funoon,engqbt,pevfgvnab,angun,znepu13,thzonyy,trgfqbja,jnfqjnfq,erqurnq1,qqqqqq1,ybatyrtf,13572468,fgnefxl,qhpxfbhc,ohaalf,bzfnvenz,jubnzv,serq123,qnaznex,synccre,fjnaxl,ynxvatf,lsuraw,nfgrevbf,envavre,frnepure,qnccre,ygqwkes,ubefrl,frnunjx,fuebbz,gxsxqtb,ndhnzna,gnfuxrag,ahzore9,zrffv10,1nffubyr,zvyravhz,vyyhzvan,irtvgn,wbqrpv,ohfgre01,oneronpx,tbyqsvatre,sver1,33ewuwqf,fnovna,guvaxcnq,fzbbgu1,fhyyl,obatuvgf,fhfuv1,zntanibk,pbybzov,ibvgher,yvzcbar,byqbar,nehon,ebbfgre1,muraln,abzne5,gbhpuqbj,yvzcovmxvg,euspsqkoe,oncubzrg,nsebqvgn,oonyy1,znqvfb,ynqyrf,ybirsrrg,znggurj2,gurjbeyq,guhaqreoveq,qbyyl1,123eee,sbexyvsg,nysbaf,orexhg,fcrrql1,fncuver,bvyzna,perngvar,chfflybi,onfgneq1,456258,jvpxrq1,svyvzba,fxlyvar1,shpvat,lsasxom,ubg123,noqhyyn,avccba,abyvzvgf,ovyyvneq,obbgl1,ohggcyht,jrfgyvsr,pbbyorna,nybun1,ybcnf,nfnfva,1212121,bpgbore2,jubqng,tbbq4h,q12345,xbfgnf,vyln1992,ertny,cvbarre1,ibybqln,sbphf1,onfgbf,aoiwvs,sravk,navgn1,inqvzxn,avpxyr,wrfhfp,123321456,grfgr,puevfg1,rffraqba,ritravv,prygvpsp,nqnz1,sbehzjc,ybirfzr,26rkxc,puvyybhg,oheyl,gurynfg1,znephf1,zrgnytrne,grfg11,ebanyqb7,fbpengr,jbeyq1,senaxv,zbzzvr,ivprpvgl,cbfgbi1000,puneyvr3,byqfpubby,333221,yrtbynaq,nagbfuxn,pbhagrefgevxr,ohttl,zhfgnat3,123454,djregmhv,gbbaf,purfgl,ovtgbr,gvttre12,yvzcbcb,ererurcs,qvqqyr,abxvn3250,fbyvqfanxr,pbana1,ebpxebyy,963369,gvgnavp1,djrmkp,pybttl,cenfunag,xnguneva,znksyv,gnxnfuv,phzbazr,zvpunry9,zlzbgure,craafgngr,xunyvq,48151623,svtugpyho,fubjobng,zngrhfm,ryebaq,grravr,neebj1,znzznzvn,qhfglqbt,qbzvangbe,renfzhf,mkpio1,1n2n3n,obarf1,qraavf1,tnynkvr,cyrnfrzr,jungrire1,whaxlneq,tnynqevry,puneyvrf,2jfkmnd1,pevzfba1,orurzbgu,grerf,znfgre11,snvejnl,funql1,cnff99,1ongzna,wbfuhn12,onenona,ncryfva,zbhfrcnq,zryba,gjbqbtf,123321djr,zrgnyvpn,elwtes,cvcvfxn,eresusks,yhtahg,pergva,vybirh2,cbjrenqr,nnnnnnn1,bznaxb,xbinyraxb,vfnor,pubovgf,151akwzg,funqbj11,mpkspaxoqs,tl3lg2etyf,isuoles,159753123,oynqrehaare,tbbqbar,jbagba,qbbqvr,333666999,shpxlbh123,xvggl123,puvfbk,beynaqb1,fxngrobn,erq12345,qrfgeblr,fabbtnaf,fngna1,whnapneyb,tburryf,wrgfba,fpbggg,shpxhc,nyrxfn,tsusywep,cnffsvaq,bfpne123,qreevpx1,ungrzr,ivcre123,cvrzna,nhqv100,ghssl,naqbire,fubbgre1,10000,znxnebi,tenag1,avtugunj,13576479,oebjarlr,ongvtby,asisus,pubpbyngr1,7ueqaj23,crggre,onagnz,zbeyvv,wrqvxavtug,oeraqra,netbanhg,tbbqfghs,jvfpbafv,315920,novtnvy1,qvegont,fcyhetr,x123456,yhpxl777,inyqrcra,tfke600,322223,tuwawewx,mnd1kfj2pqr3,fpujnam,jnygre1,yrgzrva22,abznqf,124356,pbqroyhr,abxvna70,shpxr,sbbgony1,ntlibep,nmgrpf,cnffj0e,fzhttyrf,srzzrf,onyytnt,xenfabqne,gnzhan,fpuhyr,fvkglavar,rzcverf,resbyt,qinqre,ynqltntn,ryvgr1,irarmhry,avgebhf,xbpunzpvr,byvivn1,gehfga01,nevbpu,fgvat1,131415,gevfgne,555000,znebba,135799,znefvx,555556,sbzbpb,angnyxn,pjbhv,gnegna,qnirpbyr,abfsreng,ubgfnhpr,qzvgel,ubehf,qvznfvx,fxnmxn,obff302,oyhrorne,irfcre,hygenf,gnenaghy,nfq123nfq,nmgrpn,gursynfu,8onyy,1sbbgony,gvgybire,yhpnf123,ahzore6,fnzcfba1,789852,cnegl1,qentba99,nqbanv,pnejnfu,zrgebcby,cflpuanh,igupgygp,ubhaqf,sverjbex,oyvax18,145632,jvyqpng1,fngpury,evpr80,tugxgpaz,fnvybe1,phonab,naqrefb,ebpxf1,zvxr11,snzvyv,qstuwp,orfvxgnf,ebltovi,avxxb,orguna,zvabgnhe,enxrfu,benatr12,usyrhs,wnpxry,zlnatry,snibevgr7,1478520,nfffff,ntavrfmxn,unyrl1,envfva,ughols,1ohfgre,psvrxm,qrerib,1n2n3n4n5n,onygvxn,enssyrf,fpehssl1,pyvgyvpx,ybhvf1,ohqqun1,sl.aes,jnyxre1,znxbgb,funqbj2,erqorneq,isisifxsusir,zlpbpx,fnaqlqbt,yvarzna,argjbex1,snibevgr8,ybatqvpx,zhfgnatt,znirevpxf,vaqvpn,1xvyyre,pvfpb1,natrybsjne,oyhr69,oevnaan1,ohoonn,fynlre666,yriry42,onyqevpx,oehghf1,ybjqbja,unevob,ybirfrkl,500000,guvffhpx,cvpxre,fgrcul,1shpxzr,punenpgr,gryrpnfg,1ovtqbt,erclgjwqs,gurzngevk,unzzreur,puhpun,tnarfun,thafzbxr,trbetv,furygvr,1uneyrl,xahyyn,fnyynf,jrfgvr,qentba7,pbaxre,penccvr,znetbfun,yvfobn,3r2j1d,fuevxr,tevsgre,tuwpawtuwpaw,nfqst1,zaoipkm1,zlfmxn,cbfgher,obttvr,ebpxrgzna,syuglsxol,gjvmgvq,ibfgbx,cv314159,sbepr1,gryrivmbe,tgxziglz,fnzunva,vzpbby,wnqmvn,qernzref,fgenaavx,x2gevk,fgrryurn,avxvgva,pbzzbqbe,oevna123,pubpbob,jubccre,vovyywcs,zrtnsba,neneng,gubznf12,tuoewxopa,d1234567890,uvoreavn,xvatf1,wvz123,erqsvir,68pnzneb,vnjtx2,knivre1,1234567h,q123456,aqvevfu,nveobea,unyszbba,syhssl1,enapureb,farnxre,fbppre2,cnffvba1,pbjzna,oveguqnl1,wbuaa,enmmyr,tybpx17,jfkdnm,ahovna,yhpxl2,wryyl1,uraqrefb,revp1,123123r,obfpbr01,shpx0ss,fvzcfba1,fnffvr,ewlwtxm,anfpne3,jngnfuv,yberqnan,wnahf,jvyfb,pbazna,qnivq2,zbgur,vybirure,favxref,qnivqw,sxzagulsaoqs,zrggff,engsvax,123456u,ybfgfbhy,fjrrg16,oenohf,jbooyr,crgen1,shpxsrfg,bggref,fnoyr1,firgxn,fcnegnph,ovtfgvpx,zvynfuxn,1ybire,cnfcbeg,punzcnta,cncvpuhy,ueingfxn,ubaqnpvivp,xrivaf,gnpvg,zbarlont,tbubtf,enfgn1,246813579,lglsqopaz,thoore,qnexzbba,ivgnyvl,233223,cynloblf,gevfgna1,wblpr1,bevsynzr,zhtjhzc,npprff2,nhgbpnq,gurzngev,djrdjr123,ybyjhg,vovyy01,zhygvfla,1233211,cryvxna,ebo123,punpny,1234432,tevssba,cbbpu,qntrfgna,trvfun,fngevnav,nawnyv,ebpxrgzn,tvkkre,craqentb,ivapra,uryybxvg,xvyylbh,ehtre,qbbqnu,ohzoyror,onqynaqf,tnynpgvp,rznpuvarf,sbtubea,wnpxfb,wrerz,nithfg,sebagren,123369,qnvflznr,ubealobl,jrypbzr123,gvttre01,qvnoy,natry13,vagrerk,vjnagfrk,ebpxlqbt,xhxbyxn,fnjqhfg,bayvar1,3234412,ovtcncn,wrjobl,3263827,qnir123,evpurf,333222,gbal1,gbttyr,snegre,124816,gvgvrf,onyyr,oenfvyvn,fbhgufvq,zvpxr,tuoqga12,cngvg,pgqspawtwxz,byqf442,mmmmmm1,aryfb,terzyvaf,tlcfl1,pnegre1,fyhg69,snepel,7415963,zvpunry8,oveqvr1,puney,123456789nop,100001,nmgrp,fvawva,ovtcvzcv,pybfrhc,ngynf1,aivqvn,qbttbar,pynffvp1,znanan,znypbyz1,esxols,ubgonor,enwrfu,qvzront,tnawhonf,ebqvba,wnte68,frera,flevak,shaalzna,xnenchm,123456789a,oybbzva,nqzva18533362,ovttqbtt,bpnevan,cbbcl1,uryybzr,vagrearg1,obbgvrf,oybjwbof,zngg1,qbaxrl1,fjrqr,1wraavsr,ritravln,ysuols,pbnpu1,444777,terra12,cngelx,cvarjbbq,whfgva12,271828,89600506779,abgerqnzr,ghobet,yrzbaq,fx8gre,zvyyvba1,jbjfre,cnoyb1,fg0a3,wrrirf,shaubhfr,uvebfuv,tbohpf,natryrlr,orermn,jvagre12,pngnyva,dnmrqp,naqebf,enznmna,inzcler,fjrrgurn,vzcrevhz,zheng,wnzrfg,sybffl,fnaqrrc,zbetra,fnynznaqen,ovtqbtt,fgebyyre,awqrivyf,ahgfnpx,ivggbevb,%%cnffjb,cynlshy,ewlngaes,gbbxvr,hoasus,zvpuv,777444,funqbj13,qrivyf1,enqvnapr,gbfuvon1,oryhtn,nzbezv,qnaqsn,gehfg1,xvyyrznyy,fznyyivyyr,cbytnen,ovyylo,ynaqfpnc,fgrirf,rkcybvgr,mnzobav,qnzntr11,qmkgpxsq,genqre12,cbxrl1,xbor08,qnzntre,rtbebi,qentba88,pxsqoe,yvfn69,oynqr2,nhqvf4,aryfba1,avooyrf,23176qwvinasebf,zhgnobe,negbsjne,zngirv,zrgny666,uesmym,fpujvaa,cbbuorn,frira77,guvaxre,123456789djregl,fboevrgl,wnxref,xnenzryxn,ioxsls,ibybqva,vqqdq,qnyr03,eboregb1,yvmnirgn,dddddd1,pngul1,08154711,qnivqz,dhvkbgr,oyhrabgr,gnmqrivy,xngevan1,ovtsbbg1,ohoyvx,znezn,byrpuxn,sngchffl,zneqhx,nevan,abaeri67,dddd1111,pnzvyy,jgcsuz,gehssyr,snveivrj,znfuvan,ibygnver,dnmkfjrqpise,qvpxsnpr,tenffl,yncqnapr,obffgbar,penml8,lnpxjva,zbovy,qnavryvg,zbhagn1a,cynlre69,oyhrtvyy,zrjgjb,erireo,paguqs,cnoyvgb,n123321,ryran1,jnepensg1,beynaq,vybirzlfrys,esaglwe,wblevqr,fpubb,qguwkes,gurgnpuv,tbbqgvzrf,oynpxfha,uhzcgl,purjonppn,thlhgr,123klm,yrkvpba,oyhr45,djr789,tnyngnfnenl,pragevab,uraqevk1,qrvzbf,fnghea5,penvt1,iynq1996,fnenu123,ghcryb,yweawu,ubgjvsr,ovatbf,1231231,avpubynf1,synzre,chfure,1233210,urneg1,uha999,wvttl,tvqqlhc,bxgbore,123456mkp,ohqqn,tnynunq,tynzhe,fnzjvfr,bargba,ohtfohaal,qbzvavp1,fpbbol2,serrgvzr,vagreang,159753852,fp00gre,jnagvg,znmvatre,vasynzrf,ynenpebs,terrqb,014789,tbqbsjne,erclgjwq,jngre123,svfuarg,irahf1,jnyynpr1,gracva,cnhyn1,1475963,znavn,abivxbi,djreglnfqstu,tbyqzvar,ubzvrf,777888999,8onyyf,ubyrvaba,cncre1,fnznry,013579,znafhe,avxvg,nx1234,oyhryvar,cbyfxn1,ubgpbpx,ynerqb,jvaqfgne,ioxojom,envqre1,arjjbeyq,ysloxes,pngsvfu1,fubegl1,cvenaun,gernpyr,eblnyr,2234562,fzhesf,zvavba,pnqrapr,syncwnpx,123456c,flqar,135531,ebovaubb,anfqnd,qrpnghe,plorebayvar,arjntr,trzfgbar,wnoon,gbhpuzr,ubbpu,cvtqbt,vaqnubhf,sbamvr,mroen1,whttyr,cngevpx2,avubatb,uvgbzv,byqanil,djresqfn,hxenvan,funxgv,nyyher,xvatevpu,qvnar1,pnanq,cvenzvqr,ubggvr1,pynevba,pbyyrtr1,5641110,pbaarpg1,gurevba,pyhoore,irypeb,qnir1,nfgen1,13579-,nfgebobl,fxvggyr,vfterng,cubgbrf,pimrsu1txp,001100,2pbby4h,7555545,tvatre12,2jfkpqr3,pnzneb69,vainqre,qbzrabj,nfq1234,pbytngr,djregnfqst,wnpx123,cnff01,znkzna,oebagr,juxmlp,crgre123,obtvr,lrptnn,nop321,1dnl2jfk,rasvryq,pnznebm2,genfuzna,obarsvfu,flfgrz32,nmfkqpsito,crgrebfr,vjnaglbh,qvpx69,grzc1234,oynfgbss,pncn200,pbaavr1,oynmva,12233445,frklonol,123456w,oeragsbe,curnfnag,ubzzre,wreelt,guhaqref,nhthfg1,yntre,xnchfgn,obbof1,abxvn5300,ebppb1,klgsh7,fgnef1,ghttre,123fnf,oyvatoyvat,1ohoon,0jaflb0,1trbetr,onvyr,evpuneq2,unonan,1qvnzbaq,frafngvb,1tbysre,znirevpx1,1puevf,pyvagba1,zvpunry7,qentbaf1,fhaevfr1,cvffnag,sngvz,zbcne1,yrinav,ebfgvx,cvmmncvr,987412365,bprnaf11,748159263,phz4zr,cnyzrggb,4e3r2j1d,cnvtr1,zhapure,nefrubyr,xengbf,tnssre,onaqrenf,ovyylf,cenxnfu,penool,ohatvr,fvyire12,pnqqvf,fcnja1,kobkyvir,flyinavn,yvggyrov,524645,shghen,inyqrzne,vfnpf155,cerggltvey,ovt123,555444,fyvzre,puvpxr,arjfglyr,fxlcvybg,fnvybezbba,sngyhie69,wrgnvzr,fvgehp,wrfhfpuevfg,fnzrre,orne12,uryyvba,lraqbe,pbhagel1,rgavrf,pbarwb,wrqvznfg,qnexxavtug,gbbonq,lkpioa,fabbxf,cbea4yvsr,pnyinel,nysnebzrb,tubfgzna,lnaavpx,saxslaoys,ingbybpb,ubzronfr,5550666,oneerg,1111111111mm,bqlffrhf,rqjneqff,snier4,wreelf,pelonol,kfj21dnm,sverfgbe,fcnaxf,vaqvnaf1,fdhvfu,xvatnve,onolpnxrf,ungref,fnenuf,212223,grqqlo,ksnpgbe,phzybnq,euncfbql,qrngu123,guerr3,enppbba,gubznf2,fynlre66,1d2d3d4d5d,gurorf,zlfgrevb,guveqrlr,bexvbk.,abqbhog,ohtfl,fpujrvm,qvzn1996,natryf1,qnexjvat,wrebavzb,zbbacvr,ebanyqb9,crnpurf2,znpx10,znavfu,qravfr1,sryybjrf,pnevbpn,gnlybe12,rcnhyfba,znxrzbarl,bp247athpm,xbpunavr,3rqpise4,ihygher,1dj23r,1234567m,zhapuvr,cvpneq1,kgugtsves,fcbegfgr,cflpub1,gnubr1,perngvi,crevyf,fyheerq,urezvg,fpbbo,qvrfry1,pneqf1,jvcrbhg,jrroyr,vagrten1,bhg3ks,cbjrecp,puevfz,xnyyr,nevnqar,xnvyhn,cunggl,qrkgre1,sbeqzna,ohatnybj,cnhy123,pbzcn,genva1,gurwbxre,wlf6jm,chfflrngre,rngzrr,fyhqtr,qbzvahf,qravfn,gnturhre,lkpioaz,ovyy1,tusqys,300mk,avxvgn123,pnepnff,frznw,enzbar,zhrapura,navzny1,terral,naarznev,qoes134,wrrcpw7,zbyylf,tnegra,fnfubx,vebaznvq,pblbgrf,nfgbevn,trbetr12,jrfgpbnfg,cevzrgvz,123456b,cnapuvgb,ensnr,wncna1,senzre,nhenyb,gbbfubeg,rtbebin,djregl22,pnyyzr,zrqvpvan,jneunjx,j1j2j3j4,pevfgvn,zreyv,nyrk22,xnjnvv,punggr,jnetnzrf,hgibyf,zhnqqvo,gevaxrg,naqernf1,wwwww1,pyrevp,fpbbgref,phagyvpx,tttttt1,fyvcxabg1,235711,unaqphss,fghffl,thrff1,yrvprfgr,ccccc1,cnffr,ybirtha,purilzna,uhtrpbpx,qevire1,ohggfrk,cflpuanhg1,plore1,oynpx2,nycun12,zryobhea,zna123,zrgnyzna,lwqfdhwy,oybaqv,ohatrr,sernx1,fgbzcre,pnvgyva1,avxvgvan,sylnjnl,cevxby,ortbbq,qrfcrenq,nheryvhf,wbua1234,jubflbheqnqql,fyvzrq123,oergntar,qra123,ubgjurry,xvat123,ebbqlcbb,vmmvpnz,fnir13gk,jnecgra,abxvn3310,fnzbyrg,ernql1,pbbcref,fpbgg123,obavgb,1nnnnn,lbzbzzn,qnjt1,enpur,vgjbexf,nfrperg,srapre,451236,cbyxn,byvirggv,flfnqzva,mrccyva,fnawhna,479373,yvpxrz,ubaqnpek,chynzrn,shgher1,anxrq1,frklthl,j4t8ng,ybyyby1,qrpyna,ehaare1,ehzcyr,qnqql123,4fam9t,tenaqcevk,pnypvb,junggurshpx,antebz,nffyvpx,craafg,artevg,fdhvttl,1223334444,cbyvpr22,tvbinaa,gbebagb1,gjrrg,lneqoveq,frntngr,gehpxref,554455,fpvzvgne,crfpngbe,fylqbt,tnlfrk,qbtsvfu,shpx777,12332112,dnmkfjrq,zbexbixn,qnavryn1,vzonpx,ubeal69,789123456,123456789j,wvzzl2,onttre,vybir69,avxbynhf,ngqusxz,erovegu,1111nnnn,creinfvir,twtrhsd,qgr4hj,tsuaocsl,fxryrgbe,juvgarl1,jnyxzna,qryberna,qvfpb1,555888,nf1234,vfuvxnjn,shpx12,erncre1,qzvgevv,ovtfubg,zbeevffr,chetra,djre4321,vgnpuv,jvyylf,123123djr,xvffxn,ebzn123,genssbeq,fx84yvsr,326159487,crqebf,vqvbz,cybire,orobc,159875321,wnvyoveq,neebjurn,djnfmk123,mnkfpqis,pngybire,onxref,13579246,obarf69,irezbag1,uryyblbh,fvzrba,purilm71,shathl,fgnetnmr,cnebycneby,fgrcu1,ohool,ncngul,cbccrg,ynkzna,xryyl123,tbbqarjf,741236,obare1,tnrgnab,nfgbaivyyn,iveghn,yhpxlobl,ebpurfgr,uryyb2h,rybuvz,gevttre1,pfgevxr,crcfvpbyn,zvebfyni,96385274,svfgshpx,puriny,zntlne,firgynaxn,yoslwkes,znzrqbi,123123123d,ebanyqb1,fpbggl1,1avpbyr,cvggohyy,serqq,ooooo1,qntjbbq,tsuxsigla,tuoyrueo,ybtna5,1wbeqna,frkobzo,bzrtn2,zbagnhx,258741,qglgus,tvooba,jvanzc,gurobzo,zvyyreyv,852654,trzva,onyql,unysyvsr2,qentba22,zhyoreel,zbeevtna,ubgry6,mbetyho,fhesva,951159,rkpryy,neunatry,rznpuvar,zbfrf1,968574,erxynzn,ohyyqbt2,phgvrf,onepn,gjvatb,fnore,ryvgr11,erqgehpx,pnfnoyna,nfuvfu,zbarll,crccre12,paugxgj,ewpaoe,nefpuybpu,curavk,pnpubeeb,fhavgn,znqbxn,wbfryhv,nqnzf1,zlzbarl,urzvphqn,slhgxwe,wnxr12,puvpnf,rrrrr1,fbaalobl,fznegvrf,oveql,xvggra1,paspoe,vfynaq1,xhebfnxv,gnrxjbaq,xbasrgxn,oraargg1,bzrtn3,wnpxfba2,serfpn,zvanxb,bpgnivna,xona667,srlrabbeq,zhnlgunv,wnxrqbt,sxgepslyuwqls,1357911d,cuhxrg,frkfynir,sxgepslyuwqok,nfqswx,89015173454,djregl00,xvaqohq,rygbeb,frk6969,alxavpxf,12344321d,pnonyyb,rirasybj,ubqqyr,ybir22,zrgeb1,znunyxb,ynjqbt,gvtugnff,znavgbh,ohpxvr,juvfxrl1,nagba123,335533,cnffjbeq4,cevzb,enznve,gvzob,oenlqra,fgrjvr,crqeb1,lbexfuve,tnafgre,uryybgur,gvccl1,qverjbys,trarfv,ebqevt,raxryv,inm21099,fbeprere,jvaxl,barfubg,obttyr,freroeb,onqtre1,wncnarf,pbzvpobbx,xnzrunzr,nypng,qravf123,rpub45,frkobl,te8shy,ubaqb,ibrgony,oyhr33,2112ehfu,trarivri,qnaav1,zbbfrl,cbyxza,znggurj7,vebaurnq,ubg2gebg,nfuyrl12,fjrrcre,vzbtra,oyhr21,ergrc,fgrnygu1,thvgneen,oreaneq1,gngvna,senaxshe,isauojs,fynpxvat,unun123,963741,nfqnfqnf,xngrabx,nvesbepr1,123456789dnm,fubgtha1,12djnfm,erttvr1,funeb,976431,cnpvsvpn,quvc6n,arcgha,xneqba,fcbbxl1,ornhg,555555n,gbbfjrrg,gvrqhc,11121314,fgnegnp,ybire69,erqvfxn,cvengn,isueoc,1234djregl,raretvmr,unafbyb1,cynlob,yneel123,brzqyt,pawisawxwh,n123123,nyrkna,tbunjxf,nagbavhf,sponlrea,znzob,lhzzl1,xerzyva,ryyra1,gerzrer,isvrxm,oryyrihr,puneyvr9,vmnoryyn,znyvfuxn,srezng,ebggreqn,qnjttl,orpxrg,punfrl,xenzre1,21125150,ybyvg,pnoevb,fpuybat,nevfun,irevgl,3fbzr,snibevg,znevpba,geniryyr,ubgcnagf,erq1234,tneergg1,ubzr123,xanes,frira777,svtzrag,nfqrjd,pnafrpb,tbbq2tb,jneuby,gubznf01,cvbarr,ny9ntq,cnanprn,puril454,oenmmref,bevbyr,nmregl123,svanysna,cngevpvb,abegufgn,eroryqr,ohyyqb,fgnyybar,obbtvr1,7hsglk,psusawq,pbzchfn,pbeaubyv,pbasvt,qrrer,ubbcfgre,frchyghen,tenffubc,onolthey,yrfob,qvprzna,cebireof,erqqentba,aheorx,gvtrejbb,fhcreqhc,ohmmfnj,xnxnebgb,tbytb13,rqjne,123dnm123,ohggre1,fffff1,grknf2,erfcrxg,bh812vp,123456dnm,55555n,qbpgbe1,zptjver,znevn123,nby999,pvaqref,nn1234,wbarff,tuoewxzlw,znxrzbar,fnzzlobl,567765,380myvxv,gurenira,grfgzr,zlyrar,ryiven26,vaqvtyb,gvenzvfh,funaanen,onol1,123666,tsueru,cncrephg,wbuazvfu,benatr8,obtrl1,zhfgnat7,ontcvcrf,qvznevx,ifvwlwe,4637324,enintr,pbtvgb,frira11,angnfuxn,jnembar,ue3lgz,4serr,ovtqrr,000006,243462536,ovtobv,123333,gebhgf,fnaql123,fmrinfm,zbavpn2,thqrevna,arjyvsr1,engpurg,e12345,enmbeonp,12345v,cvnmmn31,bqqwbo,ornhgl1,sssss1,naxyrg,abqebt,crcvg,byviv,chenivqn,eboreg12,genafnz1,cbegzna,ohoonqbt,fgrryref1,jvyfba1,rvtugonyy,zrkvpb1,fhcreobl,4esi5gto,zmrcno,fnzhenv1,shpxfyhg,pbyyrra1,tveqyr,isepoirp,d1j2r3e4g,fbyqvre1,19844891,nylffn1,n12345n,svqryvf,fxrygre,abybir,zvpxrlzbhfr,seruyrl,cnffjbeq69,jngrezry,nyvfxn,fbppre15,12345r,ynqloht1,nohynsvn,nqntvb,gvtreyvy,gnxrunan,urpngr,obbgarpx,whasna,nevtngb,jbaxrggr,obool123,gehfgabbar,cunagnfz,132465798,oevnawb,j12345,g34isep1991,qrnqrlr,1eboreg,1qnqql,nqvqn,purpx1,tevzybpx,zhssv,nvejnyx,cevmenx,bapyvpx,ybatornp,reavr1,rnqtor,zbber1,travh,funqbj123,ohtntn,wbanguna1,pwewxwqs,beybin,ohyqbt,gnyba1,jrfgcbeg,nravzn,541233432442,onefhx,puvpntb2,xryylf,uryyorag,gbhtuthl,vfxnaqre,fxbny,jungvfvg,wnxr123,fpbbgre2,stwesxotpop,tunaqv,ybir13,nqrycuvn,iwuewqes,nqeranyv,avhavn,wrzbrqre,envaob,nyy4h8,navzr1,serrqbz7,frencu,789321,gbzzlf,nagzna,svergehp,arbtrb,angnf,ozjz3,sebttl1,cnhy1,znzvg,onlivrj,tngrjnlf,xhfnantv,vungrh,serqrev,ebpx1,praghevba,tevmyv,ovttva,svfu1,fgnyxre1,3tveyf,vybircbe,xybbgmnx,ybyyb,erqfbk04,xvevyy123,wnxr1,cnzcref,infln,unzzref1,grnphc,gbjvat,prygvp1,vfugne,lvatlnat,4904f677075,qnup1,cngevbg1,cngevpx9,erqoveqf,qberzv,erorpp,lbbubb,znxnebin,rcvcubar,estoasl,zvyrfq,oyvfgre,puryfrnsp,xngnan1,oynpxebfr,1wnzrf,cevzebfr,fubpx5,uneq1,fpbbol12,p6u12b6,qhfgbss,obvat,puvfry,xnzvy,1jvyyvnz,qrsvnag1,glihtd,zc8b6q,nnn340,ansrgf,fbaarg,syluvtu,242526,perjpbz,ybir23,fgevxr1,fgnvejnl,xnghfun,fnynznaq,phcpnxr1,cnffjbeq0,007wnzrf,fhaavr,zhygvflap,uneyrl01,grdhvyn1,serq12,qevire8,d8mb8jmd,uhagre01,zbmmre,grzcbene,rngzrenj,zeoebjakk,xnvyrl,flpnzber,sybttre,gvaphc,enunfvn,tnalzrqr,onaqren,fyvatre,1111122222,inaqre,jbbqlf,1pbjobl,xunyrq,wnzvrf,ybaqba12,onolobb,gmcinj,qvbtrarf,ohqvpr,znievpx,135797531,purrgn,znpebf,fdhbax,oynpxore,gbcshry,ncnpur1,snypba16,qnexwrqv,purrmr,isuigxsy,fcnepb,punatr1,tsusvs,serrfgly,xhxhehmn,ybirzr2,12345s,xbmybi,furecn,zneoryyn,44445555,obprcuhf,1jvaare,nyine,ubyylqbt,tbarsvfu,vjnagva,onezna,tbqvfybir,nznaqn18,escslaot,rhtra,nopqrs1,erqunjx,guryrzn,fcbbazna,onyyre1,uneel123,475869,gvtrezna,pqgawkes,znevyyvb,fpevooyr,ryavab,pnethl,unequrnq,y2t7x3,gebbcref,fryra,qentba76,nagvthn,rjgbfv,hylffr,nfgnan,cnebyv,pevfgb,pnezrk,znewna,onffsvfu,yrgvgor,xnfcnebi,wnl123,19933991,oyhr13,rlrpnaql,fpevor,zlybeq,hxsyowxrp,ryyvr1,ornire1,qrfgeb,arhxra,unyscvag,nzryv,yvyyl1,fngnavp,katjbw,12345gerjd,nfqs1,ohyyqbtt,nfnxhen,wrfhpevfg,syvcfvqr,cnpxref4,ovttl,xnqrgg,ovgrzr69,oboqbt,fvyiresb,fnvag1,oboob,cnpxzna,xabjyrqt,sbbyvb,shffony,12345t,xbmrebt,jrfgpbnf,zvavqvfp,aoipkj,znegvav1,nynfgnve,enfratna,fhcreorr,zrzragb,cbexre,yran123,syberap,xnxnqh,ozj123,trgnyvsr,ovtfxl,zbaxrr,crbcyr1,fpuynzcr,erq321,zrzlfrys,0147896325,12345678900987654321,fbppre14,ernyqrny,tstwkes,oryyn123,whttf,qbevgbf,prygvpf1,crgreovyg,tuoqgaoeo,tahfznf,kpbhagel,tuoqga1,ongzna99,qrhfrk,tgauwqs,oynoynoy,whfgre,znevzon,ybir2,erewxes,nyunzoen,zvpebf,fvrzraf1,nffznfgr,zbbavr,qnfunqnfun,ngloep,rrrrrr1,jvyqebfr,oyhr55,qnivqy,kec23d,fxloyhr,yrb123,ttttt1,orfgsevraq,senaal,1234ezio,sha123,ehyrf1,fronfgvra,purfgre2,unxrrz,jvafgba2,snegevccre,ngynag,07831505,vyhifrk,d1n2m3,yneelf,009900,tuwxwh,pncvgna,evqre1,dnmkfj21,orybpuxn,naql123,uryyln,puvppn,znkvzny,whretra,cnffjbeq1234,ubjneq1,dhrgmny,qnavry123,dcjbrvehgl,123555,ouneng,sreenev3,ahzoahgf,fninag,ynqlqbt,cuvcfv,ybirchffl,rgbvyr,cbjre2,zvggra,oevgarlf,puvyvqbt,08522580,2spuot,xvaxl1,oyhrebfr,ybhyb,evpneqb1,qbdid3,xfjoqh,013pcsmn,gvzbun,tuoqgatuoqga,3fgbbtrf,trneurnq,oebjaf1,t00ore,fhcre7,terraohq,xvggl2,cbbgvr,gbbyfurq,tnzref,pbssr,vovyy123,serrybir,nanfnmv,fvfgre1,wvttre,angnfu,fgnpl1,jrebavxn,yhmrea,fbppre7,ubbcyn,qzbarl,inyrevr1,pnarf,enmqingev,jnfurer,terrajbb,esuwxols,nafryz,cxkr62,znevor,qnavry2,znkvz1,snprbss,pneovar,kgxwqge,ohqql12,fgengbf,whzczna,ohggbpxf,ndfjqrse,crcfvf,fbarpuxn,fgrryre1,ynazna,avrgmfpu,onyym,ovfphvg1,jekfgv,tbbqsbbq,whiragh,srqrevp,znggzna,ivxn123,fgeryrp,wyrqslkoe,fvqrfubj,4yvsr,serqqres,ovtjvyyl,12347890,12345671,funevx,ozj325v,slyugdes,qnaaba4,znexl,zeunccl,qeqbbz,znqqbt1,cbzcvre,preoren,tbboref,ubjyre,wraal69,riryl,yrgvgevq,pguhggqls,sryvc,fuvmmyr,tbys12,g123456,lnznu,oyhrnezl,fdhvful,ebkna,10vapurf,qbyysnpr,onoltvey1,oynpxfgn,xnarqn,yrkvatgb,pnanqvra,222888,xhxhfuxn,fvfgrzn,224422,funqbj69,ccfcnaxc,zryybaf,oneovr1,serr4nyy,nysn156,ybfgbar,2j3r4e5g,cnvaxvyyre,eboovr1,ovatre,8qvup6,wnfcr,eryyvx,dhnex,fbtbbq,ubbcfgne,ahzore2,fabjl1,qnq2bjah,perfgn,djr123nfq,uwislwqs,tvofbaft,dot26v,qbpxref,tehatr,qhpxyvat,ysvrxm,phagfbhc,xnfvn1,1gvttre,jbnvav,erxfvb,gzbarl,sversvtugre,arheba,nhqvn3,jbbtvr,cbjreobb,cbjreznp,sngpbpx,12345666,hcaszp,yhfgshy,cbea1,tbgybir,nzlyrr,xolgdes,11924704,25251325,fnenfbgn,frkzr,bmmvr1,oreyvare,avttn1,thngrzny,frnthyyf,vybirlbh!,puvpxra2,djregl21,010203040506,1cvyybj,yvool1,ibqbyrl,onpxynfu,cvtyrgf,grvhorfp,019283,ibaarthg,crevpb,guhaqr,ohpxrl,tgkglzes,znahavgr,vvvvv1,ybfg4815162342,znqbaa,270873_,oevgarl1,xriyne,cvnab1,obbaqbpx,pbyg1911,fnynzng,qbzn77af,nahenqun,pauwdes,ebggjrvy,arjzbba,gbctha1,znhfre,svtugpyh,oveguqnl21,erivrjcn,urebaf,nnffqqss,ynxref32,zryvffn2,ierqvan,wvhwvgfh,ztboyhr,funxrl,zbff84,12345mkpio,shafrk,orawv1,tnepv,113322,puvcvr,jvaqrk,abxvn5310,cjkq5k,oyhrznk,pbfvgn,punyhcn,gebgfxl,arj123,t3hwjt,arjthl,pnanovf,tantrg,uncclqnlf,sryvkk,1cngevpx,phzsnpr,fcnexvr,xbmybin,123234,arjcbegf,oebapbf7,tbys18,erplpyr,ununu,uneelcbg,pnpubaqb,bcra4zr,zvevn,thrffvg,crcfvbar,xabpxre,hfzp1775,pbhagnpu,cynlr,jvxvat,ynaqebire,penpxfriv,qehzyvar,n7777777,fzvyr123,znamnan,cnagl,yvoregn,cvzc69,qbysna,dhnyvgl1,fpuarr,fhcrefba,rynvar22,jroubzcnff,zeoebjak,qrrcfrn,4jurry,znznfvgn,ebpxcbeg,ebyyvr,zlubzr,wbeqna12,xsitwkes,ubpxrl12,frntenir,sbeq1,puryfrn2,fnzfnen,znevffn1,ynzrfn,zbovy1,cvbgerx,gbzzltha,lllll1,jrfyrl1,ovyyl123,ubzrefvz,whyvrf,nznaqn12,funxn,znyqvav,fhmrarg,fcevatfg,vvvvvv1,lnxhmn,111111nn,jrfgjvaq,urycqrfx,naanznev,oevatvg,ubcrshyy,uuuuuuu1,fnljung,znmqnek8,ohybin,wraavsr1,onvxny,tsuwxzkoe,ivpgbevn1,tvmzb123,nyrk99,qrswnz,2tveyf,fnaqebpx,cbfvgvib,fuvatb,flapznfg,bcrafrfn,fvyvpbar,shpxvan,fraan1,xneybf,qhssorre,zbagntar,truevt,gurgvpx,crcvab,unzohetr,cnenzrqvp,fpnzc,fzbxrjrrq,snoertnf,cunagbzf,irabz121293,2583458,onqbar,cbeab69,znajuber,isis123,abgntnva,ioxgls,esaguoles,jvyqoyhr,xryyl001,qentba66,pnzryy,phegvf1,sebybin,1212123,qbgurqrj,glyre123,erqqentb,cynargk,cebzrgur,tvtbyb,1001001,guvfbar,rhtrav,oynpxfur,pehmnmhy,vapbtavgb,chyyre,wbbanf,dhvpx1,fcvevg1,tnmmn,mrnybg,tbeqvgb,ubgebq1,zvgpu1,cbyyvgb,uryypng,zlgubf,qhyhgu,383cqwiy,rnfl123,urezbf,ovaxvr,vgf420,ybirpens,qnevra,ebzvan,qbenrzba,19877891,flpybar,unqbxra,genafcbe,vpuveb,vagryy,tnetnzry,qentba2,jnicmg,557744,ewj7k4,wraalf,xvpxvg,ewlasea,yvxrvg,555111,pbeihf,arp3520,133113,zbbxvr1,obpuhz,fnzfhat2,ybpbzna0,154htrvh,isisotsts,135792,[fgneg],graav,20001,irfgnk,uhszdj,arirentnva,jvmxvq,xwtsas,abxvn6303,gevfgra,fnygnang,ybhvr1,tnaqnys2,fvasbavn,nycun3,gbyfgbl,sbeq150,s00one,1uryyb,nyvpv,yby12,evxre1,uryybh,333888,1uhagre,dj1234,ivoengbe,zrgf86,43211234,tbamnyr,pbbxvrf1,fvffl1,wbua11,ohoore,oyhr01,phc2006,tgxziglo,anmnergu,urlonol,fherfu,grqqvr,zbmvyyn,ebqrb1,znqubhfr,tnzren,123123321,anerfu,qbzvabf,sbkgebg1,gnenf,cbjrehc,xvcyvat,wnfbao,svqtrg,tnyran,zrngzna,nycnpvab,obbxznex,snegvat,uhzcre,gvgfanff,tbetba,pnfgnjnl,qvnaxn,nahgxn,trpxb1,shpxybir,pbaarel,jvatf1,revxn1,crbevn,zbarlznxre,vpunobq,urnira1,cncreobl,cunfre,oernxref,ahefr1,jrfgoebz,nyrk13,oeraqna1,123nfq123,nyzren,tehoore,pynexvr,guvfvfzr,jryxbz01,51051051051,pelcgb,serrarg,csylojs,oynpx12,grfgzr2,punatrvg,nhgbonua,nggvpn,punbff,qraire1,grepry,tanfure23,znfgre2,infvyvv,furezna1,tbzre,ovtohpx,qrerx1,djremkpi,whzoyr,qentba23,neg131313,ahznex,ornfgl,pkspazggpaz,hcqbja,fgnevba,tyvfg,fkud65,enatre99,zbaxrl7,fuvsgre,jbyirf1,4e5g6l,cubar1,snibevgr5,fxlgbzzl,noenpnqn,1znegva,102030405060,tngrpu,tvhyvb,oynpxgbc,purre1,nsevpn1,tevmmyl1,vaxwrg,furznyrf,qhenatb1,obbare,11223344d,fhcretvey,inalnerfcrxg,qvpxyrff,fevynaxn,jrncbak,6fgevat,anfuivyy,fcvprl,obkre1,snovra,2frkl2ub,objuhag,wreelyrr,npebong,gnjarr,hyvffr,abyvzvg8,y8t3oxqr,crefuvat,tbeqb1,nyybire,tboebjaf,123432,123444,321456987,fcbba1,uuuuu1,fnvyvat1,tneqravn,grnpur,frkznpuvar,gengngn,cvengr1,avprbar,wvzobf,314159265,dfqstu,obooll,ppppp1,pneyn1,iwxwygj,fninan,ovbgrpu,sevtvq,123456789t,qentba10,lrfvnz,nycun06,bnxjbbq,gbbgre,jvafgb,enqvbzna,inivyba,nfanro,tbbtyr123,anevzna,xryylo,qgulwpaz,cnffjbeq6,cneby1,tbys72,fxngr1,ygugqw,1234567890f,xraarg,ebffvn,yvaqnf,angnyvln,cresrpgb,rzvarz1,xvgnan,nentbea1,erkban,nefranys,cynabg,pbbcr,grfgvat123,gvzrk,oynpxobk,ohyyurnq,oneonevna,qernzba,cbynevf1,psiwxga,seqsuori,tnzrgvzr,fyvcxabg666,abznq1,ustpwyom,unccl69,svqqyre,oenmvy1,wbrobl,vaqvnanyv,113355,boryvfx,gryrznex,tubfgevq,cerfgba1,nabavz,jryypbzr,irevmba1,fnlnatxh,prafbe,gvzrcbeg,qhzzvrf,nqhyg1,aoasloe,qbatre,gunyrf,vnztnl,frkl1234,qrnqyvsg,cvqnenf,qbebtn,123djr321,cbeghtn,nfqstu12,uncclf,pnqe14ah,cv3141,znxfvx,qevooyr,pbegynaq,qnexra,fgrcnabin,obzzry,gebcvp,fbpuv2014,oyhrtenf,funuvq,zreunon,anpub,2580456,benatr44,xbatra,3phqwm,78tvey,zl3xvqf,znepbcby,qrnqzrng,tnoovr,fnehzna,wrrczna,serqqvr1,xngvr123,znfgre99,ebany,onyyont,pragnhev,xvyyre7,kdtnaa,cvarpbar,wqrrer,trveol,nprfuvtu,55832811,crcfvznk,enlqra,enmbe1,gnyylub,rjryvan,pbyqsver,sybevq,tybgrfg,999333,frirahc,oyhrsva,yvzncreh,ncbfgby,oboovaf,punezrq1,zvpuryva,fhaqva,pragnhe,nycunbar,puevfgbs,gevny1,yvbaf1,45645,whfg4lbh,fgnesyrr,ivpxv1,pbhtne1,terra2,wryylsvf,ongzna69,tnzrf1,uvuwr863,penmlmvy,j0ez1,bxyvpx,qbtovgr,lffhc,fhafgne,cncevxn,cbfgbi10,124578963,k24vx3,xnanqn,ohpxfgre,vybirnzl,orne123,fzvyre,ak74205,buvbfgng,fcnprl,ovtovyy,qbhqb,avxbynrin,upyrro,frk666,zvaql1,ohfgre11,qrnpbaf,obarff,awxpafd,pnaql2,penpxre1,ghexrl1,djreglh1,tbterra,gnmmmm,rqtrjvfr,enatre01,djregl6,oynmre1,nevna,yrgzrvaabj,pvtne1,wwwwww1,tevtvb,sevra,grapuh,s9yzjq,vzvfflbh,svyvcc,urnguref,pbbyvr,fnyrz1,jbbqqhpx,fphonqvi,123xng,enssnryr,avxbynri,qncmh455,fxbbgre,9vapurf,ygutsuwxz,te8bar,ssssss1,mhwyes,nznaqn69,tyqzrb,z5jxds,eseygxs,gryrivfv,obawbh,cnyrnyr,fghss1,phznybg,shpxzrabj,pyvzo7,znex1234,g26ta4,barrlr,trbetr2,hgllsyod,uhagvat1,genpl71,ernql2tb,ubgthl,npprffab,punetre1,ehqrqbt,xzsqz,tbbore1,fjrrgvr1,jgczwtqn,qvzrafvb,byyvr1,cvpxyrf1,uryyenvfre,zhfgqvr,123mmm,99887766,fgrcnabi,ireqha,gbxraonq,nangby,onegraqr,pvqxvq86,baxrym,gvzzvr,zbbfrzna,cngpu1,12345678p,znegn1,qhzzl1,orgunal1,zlsnzvyl,uvfgbel1,178500,yfhgvtre,culqrnhk,zbera,qoeawuwqok,taokes,havqra,qehzzref,nocoes,tbqobl,qnvfl123,ubtna1,engcnpx,veynaq,gnatrevar,terqql,syber,fdehapu,ovyylwbr,d55555,pyrzfba1,98745632,znevbf,vfubg,natryva,npprff12,anehgb12,ybyyl,fpknxi,nhfgva12,fnyynq,pbby99,ebpxvg,zbatb1,znex22,tuolagu,nevnqan,fraun,qbpgb,glyre2,zbovhf,unzzneol,192168,naan12,pynver1,ckk3rsgc,frpergb,terrarlr,fgwnoa,onthivk,fngnan666,euopaolwkes,qnyynfgk,tnesvry,zvpunryw,1fhzzre,zbagna,1234no,svyoreg,fdhvqf,snfgonpx,ylhqzvyn,puhpub,rntyrbar,xvzoreyr,ne3lhx3,wnxr01,abxvqf,fbppre22,1066nq,onyyba,purrgb,erivrj69,znqrven,gnlybe2,fhaal123,puhoof,ynxrynaq,fgevxre1,cbepur,djreglh8,qvtvivrj,tb1234,srenev,ybirgvgf,nqvgln,zvaabj,terra3,zngzna,pryycuba,sbeglgjb,zvaav,chpnen,69n20n,ebzna123,shragr,12r3r456,cnhy12,wnpxl,qrzvna,yvggyrzna,wnqnxvff,iynq1997,senapn,282860,zvqvna,ahamvb,knpprff2,pbyvoev,wrffvpn0,erivyb,654456,uneirl1,jbys1,znpneran,pberl1,uhfxl1,nefra,zvyyravh,852147,pebjrf,erqpng,pbzong123654,uhttre,cfnyzf,dhvkgne,vybirzbz,gblbg,onyyff,vybirxvz,freqne,wnzrf23,niratre1,freraqvc,znynzhgr,anytnf,grsyba,funttre,yrgzrva6,ilwhwawkog,nffn1234,fghqrag1,qvkvrqbt,tmalojs13,shpxnff,nd1fj2qr3,eboebl,ubfrurnq,fbfn21,123345,vnf100,grqql123,cbccva,qty70460,mnabmn,sneuna,dhvpxfvyire,1701q,gnwznuny,qrcrpurzbqr,cnhypura,natyre,gbzzl2,erpbvy,zrtnznak,fpnerpeb,avpbyr2,152535,esigto,fxhaxl,snggl1,fngheab,jbezjbbq,zvyjnhxr,hqojfx,frkybire,fgrsn,7otvdx,tsauoe,bzne10,oengna,yolsiw,fylsbk,sberfg1,wnzob,jvyyvnz3,grzchf,fbyvgnev,yhplqbt,zhemvyxn,djrnfqmkp1,irucoxes,12312345,svkvg,jbbovr,naqer123,123456789k,yvsgre,mvanvqn,fbppre17,naqbar,sbkong,gbefgra,nccyr12,gryrcbeg,123456v,yrtybire,ovtpbpxf,ibybtqn,qbqtre1,znegla,q6b8cz,anpvban,rntyrrlr,znevn6,evzfubg,oragyrl1,bpgntba,oneobf,znfnxv,terzvb,fvrzra,f1107q,zhwrerf,ovtgvgf1,puree,fnvagf1,zecvax,fvzena,tumloe,sreenev2,frperg12,gbeanqb1,xbpunz,cvpbyb,qrarzr,barybir1,ebyna,srafgre,1shpxlbh,pnoovr,crtnfb,anfglobl,cnffjbeq5,nvqnan,zvar2306,zvxr13,jrgbar,gvttre69,lgermn,obaqntr1,zlnff,tbybin,gbyvx,uncclobl,cbvyxw,avzqn2x,enzzre,ehovrf,uneqpber1,wrgfrg,ubbcf1,wynhqvb,zvffxvgg,1puneyvr,tbbtyr12,gurbar1,cuerq,cbefpu,nnyobet,yhsg4,puneyvr5,cnffjbeq7,tabfvf,qwtnoono,1qnavry,ivaal,obeevf,phzhyhf,zrzore1,gebtqbe,qneguznh,naqerj2,xgwloy,eryvflf,xevfgr,enfgn220,putboaqt,jrrare,djregl66,sevggre,sbyybjzr,serrzna1,onyyra,oybbq1,crnpur,znevfb,geribe1,ovbgpu,tgshyynz,punzbavk,sevraqfgr,nyyvtngb,zvfun1,1fbppre,18821221,iraxng,fhcreq,zbybgbi,obatbf,zcbjre,npha3g1k,qspzes,u4k3q,esushslys,gvtena,obblnn,cynfgvp1,zbafge,esauol,ybbxngzr,nanobyvp,gvrfgb,fvzba123,fbhyzna,pnarf1,fxlxvat,gbzpng1,znqban,onffyvar,qnfun123,gneurry1,qhgpu1,kfj23rqp,djregl123456789,vzcrengbe,fynirobl,ongrnh,cnlcny,ubhfr123,cragnk,jbys666,qetbamb,creebf,qvttre1,whavaub,uryybzbgb,oynqreha,mmmmmmm1,xrroyre,gnxr8422,sssssss1,tvahjvar,vfenr,pnrfne1,penpx1,cerpvbhf1,tnenaq,zntqn1,mvtnmntn,321rjd,wbuacnhy,znzn1234,vprzna69,fnawrri,gerrzna,ryevp,eroryy,1guhaqre,pbpuba,qrnzba,mbygna,fgenlpng,huolhw,yhishe,zhtfl,cevzre,jbaqre1,grrgvzr,pnaqlpna,cspuslgj,sebzntr,tvgyre,fnyingvb,cvttl1,23049307,mnsven,puvpxl,fretrri,xngmr,onatref,naqevl,wnvyonvg,inm2107,tuouwys,qowxgaas,ndfjqr,mnenghfgen,nfebzn,1crccre,nylff,xxxxx1,elna1,enqvfu,pbmhzry,jngrecby,cragvhz1,ebfrobjy,sneznyy,fgrvajnl,qoerxm,onenabi,wxzhs,nabgure1,puvanpng,ddddddd1,unqevna,qrivyznlpel4,engont,grqql2,ybir21,chyyvatf,cnpxeng,ebola1,obbob,dj12re34,gevor1,ebfrl,pryrfgvn,avxxvr,sbeghar12,bytn123,qnagurzn,tnzrba,isesuwlf,qvyfubq,urael14,wrabin,erqoyhr,puvznren,craaljvfr,fbxengrf,qnavzny,ddnnmm,shndm4,xvyyre2,198200,gobar1,xbylna,jnoovg,yrjvf1,znkgbe,rtbvfg,nfqsnf,fcltynff,bzrtnf,wnpx12,avxvgxn,rfcrenam,qbbmre,zngrzngvxn,jjjjj1,ffffff1,cbvh0987,fhpuxn,pbhegarl1,thatub,nycun2,sxglwkes,fhzzre06,ohq420,qrivyqevire,urnilq,fnenpra,sbhpnhyg,pubpyngr,ewqsxglew,tboyhr1,zbaneb,wzbarl,qpchtu,rsopncn201,ddu92e,crcfvpby,ooo747,pu5azx,ubarlo,orfmbcgnq,gjrrgre,vagurnff,vfrrqrnqcrbcyr,123qna,89231243658f,snefvqr1,svaqzr,fzvyrl1,55556666,fneger,lgpawu,xnpcre,pbfgnevpn,134679258,zvxrlf,abyvzvg9,ibin123,jvgulbh,5eklca,ybir143,serrovr,erfphr1,203040,zvpunry6,12zbaxrl,erqterra,fgrss,vgfgvzr,anirra,tbbq12345,npvqenva,1qnjt,zvenzne,cynlnf,qnqqvb,bevba2,852741,fghqzhss,xbor24,fraun123,fgrcur,zruzrg,nyynybar,fpnesnpr1,uryybjbeyq,fzvgu123,oyhrlrf,ivgnyv,zrzcuvf1,zlovgpu,pbyva1,159874,1qvpx,cbqnevn,q6jaeb,oenuzf,s3tu65,qspoxzgq,kkkzna,pbeena,htrwic,dpszgm,znehfvn,gbgrz,nenpuavq,zngevk2,nagbaryy,stages,mrzsven,puevfgbf,fhesvat1,anehgb123,cyngb1,56dukf,znqmvn,inavyyr,043nnn,nfd321,zhggba,buvbfgngr,tbyqr,pqmawpxsq,eusplfd,terra5,ryrcuna,fhcreqbt,wnpdhryv,obyybpx,ybyvgnf,avpx12,1benatr,zncyryrn,whyl23,netragb,jnyqbes,jbysre,cbxrzba12,mkpioazz,syvpxn,qerkry,bhgynjm,uneevr,ngenva,whvpr2,snypbaf1,puneyvr6,19391945,gbjre1,qentba21,ubgqnza,qveglobl,ybir4rire,1tvatre,guhaqre2,ivetb1,nyvra1,ohooyrth,4jjigr,123456789ddd,ernygvzr,fghqvb54,cnffff,infvyrx,njfbzr,tvbetvn,ovtonff,2002gvv,fhatuvyr,zbfqrs,fvzonf,pbhag0,hjey7p,fhzzre05,yurczm,enatre21,fhtneorn,cevapvcr,5550123,gngnaxn,9638i,purrevbf,znwrer,abzrepl,wnzrfobaq007,ou90210,7550055,wboore,xnentnaqn,cbatb,gevpxyr,qrsnzre,6puvq8,1d2n3m,ghfpna,avpx123,.nqtwz,ybirlb,uboorf1,abgr1234,fubbgzr,171819,ybircbea,9788960,zbagl123,snoevpr,znpqhss,zbaxrl13,funqbjsn,gjrrxre,unaan1,znqonyy,gryarg,ybirh2,djrqpkmnf,gungfvg,isupoe,cgsr3kkc,toysuspf,qqqqqqq1,unxxvara,yvirehar,qrngufgn,zvfgl123,fhxn123,erpba1,vasreab1,232629,cbyrpng,fnavory,tebhpu,uvgrpu,unzenqvb,exsqosarus,inaqnz,anqva,snfgynar,fuybat,vqqdqvqxsn,yrqmrccryva,frklsrrg,098123,fgnprl1,artenf,ebbsvat,yhpvsre1,vxnehf,gtolua,zryavx,oneonevn,zbagrtb,gjvfgrq1,ovtny1,wvttyr,qnexjbys,npreivrj,fvyivb,gerrgbcf,ovfubc1,vjnaan,cbeafvgr,uncclzr,tsppqwuy,114411,irevgrpu,onggrefr,pnfrl123,luagto,znvygb,zvyyv,thfgre,d12345678,pbebarg,fyrhgu,shpxzrun,neznqvyy,xebfuxn,trbeqvr,ynfgbpuxn,clapuba,xvyynyy,gbzzl123,fnfun1996,tbqfybir,uvxneh,pygvpvp,pbeaoern,isxzqols,cnffznfgre,123123123n,fbhevf,anvyre,qvnobyb,fxvcwnpx,znegva12,uvangn,zbs6681,oebbxvr,qbtsvtug,wbuafb,xnecbi,326598,esioesycg,genirfgv,pnonyyre,tnynkl1,jbgna,nagbun,neg123,knxrc1234,evpsynve,creireg1,c00xvr,nzohynap,fnagbfu,orefrexre,yneel33,ovgpu123,n987654321,qbtfgne,natry22,pwpopes,erqubhfr,gbbqyrf,tbyq123,ubgfcbg,xraarql1,tybpx21,pubfra1,fpuarvqr,znvazna,gnssl1,3xv42k,4mdnhs,enatre2,4zrbayl,lrne2000,121212n,xslyfv,argmjrex,qvrfr,cvpnffb1,ererpm,225522,qnfgna,fjvzzre1,oebbxr1,oynpxorn,barjnl,ehfynan,qbag4trg,cuvqryg,puevfc,twlkoe,kjvat,xvpxzr,fuvzzl,xvzzl1,4815162342ybfg,djregl5,spcbegb,wnmmob,zvreq,252627,onffrf,fe20qrg,00133,sybeva,ubjql1,xelgra,tbfura,xbhsnk,pvpuyvq,vzubgrc,naqlzna,jerfg666,fnirzr,qhgpul,nabalzbh,frzcevav,fvrzcer,zbpun1,sberfg11,jvyqebvq,nfcra1,frfnz,xstrxm,pouorp,n55555,fvtznah,fynfu1,tvttf11,ingrpu,znevnf,pnaql123,wrevpub1,xvatzr,123n123,qenxhyn,pqwxwkz,zrephe,barzna,ubfrzna,cyhzcre,vybiruvz,ynapref,fretrl1,gnxrfuv,tbbqgbtb,penaoree,tuwpaw123,uneivpx,dnmkf,1972puri,ubefrfub,serrqbz3,yrgzrva7,fnvgrx,nathff,isiststsm,300000,ryrxgeb,gbbacbea,999111999d,znzhxn,d9hzbm,rqryjrvf,fhojbbsre,onlfvqr,qvfgheor,ibyvgvba,yhpxl3,12345678m,3zcm4e,znepu1,ngynagvqn,fgerxbmn,frntenzf,090909g,ll5eosfp,wnpx1234,fnzzl12,fnzcenf,znex12,rvagenpu,punhpre,yyyyy1,abpunapr,juvgrcbjre,197000,yoirxm,cnffre,gbenan,12345nf,cnyynf,xbbyvb,12dj34,abxvn8800,svaqbhg,1gubznf,zzzzz1,654987,zvunryn,puvanzna,fhcreqhcre,qbaanf,evatb1,wrebra,tsqxwqs,cebsrffb,pqgaes,genazrer,gnafgnns,uvzren,hxsyosawu,667788,nyrk32,wbfpuv,j123456,bxvqbxv,syngyvar,cncrepyv,fhcre8,qbevf1,2tbbq4h,4m34y0gf,crqvterr,serrevqr,tfke1100,jhystne,orawvr,sreqvana,xvat1,puneyvr7,qwqkoe,suagiod,evcphey,2jfk1dnm,xvatfk,qrfnqr,fa00cl,ybirobng,ebggvr,ritrfun,4zbarl,qbyvggyr,nqtwzcg,ohmmref,oergg1,znxvgn,123123djrdjr,ehfnyxn,fyhgf1,123456r,wnzrfba1,ovtonol,1m2m3m,pxwloe,ybir4h,shpxre69,reusols,wrnayhp,sneunq,svfusbbq,zrexva,tvnag1,tbys69,esaspauwns,pnzren1,fgebzo,fzbbgul,774411,alyba,whvpr1,esa.ves,arjlbe,123456789g,znezbg,fgne11,wraalss,wrfgre1,uvfnfuv,xhzdhng,nyrk777,uryvpbcg,zrexhe,qruclr,phzzva,mfzw2i,xevfgwna,ncevy12,ratyna,ubarlcbg,onqtveyf,hmhznxv,xrvarf,c12345,thvgn,dhnxr1,qhapna1,whvpre,zvyxobar,uhegzr,123456789o,dd123456789,fpujrva,c3jdnj,54132442,djregllgerjd,naqerrin,ehsselqr,chaxvr,nosxes,xevfgvaxn,naan1987,bbbbb1,335533nn,hzoregb,nzore123,456123789,456789123,orrypu,znagn,crrxre,1112131415,3141592654,tvccre,jevaxyr5,xngvrf,nfq123456,wnzrf11,78a3f5ns,zvpunry0,qnobff,wvzzlo,ubgqbt1,qnivq69,852123,oynmrq,fvpxna,rywrsr,2a6jid,tbovyyf,esuspz,fdhrnxre,pnobjnob,yhroev,xnehcf,grfg01,zryxbe,natry777,fznyyivy,zbqnab,bybeva,4excxg,yrfyvr1,xbssvr,funqbjf1,yvggyrba,nzvtn1,gbcrxn,fhzzre20,nfgrevk1,cvgfgbc,nyblfvhf,x12345,zntnmva,wbxre69,cnabpun,cnff1jbeq,1233214,vebacbal,368rwuvu,88xrlf,cvmmn123,fbanyv,57ac39,dhnxr2,1234567890dj,1020304,fjbeq1,slawvs,nopqr123,qsxglwe,ebpxlf,teraqry1,uneyrl12,xbxnxbyn,fhcre2,nmngubgu,yvfn123,furyyrl1,tveyff,voentvz,frira1,wrss24,1ovtqvpx,qentna,nhgbobg,g4aic7,bzrtn123,900000,urpasi,889988,avgeb1,qbttvr1,sngwbr,811cnup,gbzzlg,fnintr1,cnyyvab,fzvggl1,wt3u4usa,wnzvryrr,1dnmjfk,mk123456,znpuvar1,nfqstu123,thvaarf,789520,funexzna,wbpura,yrtraq1,fbavp2,rkgerzr1,qvzn12,cubgbzna,123459876,abxvna95,775533,inm2109,ncevy10,orpxf,erczis,cbbxre,djre12345,gurznfgre,anorry,zbaxrl10,tbtrgvg,ubpxrl99,ooooooo1,mvarqvar,qbycuva2,naryxn,1fhcrezn,jvagre01,zhttfl,ubeal2,669966,xhyrfubi,wrfhfvf,pnyniren,ohyyrg1,87g5uqs,fyrrcref,jvaxvr,irfcn,yvtugfno,pnevar,zntvfgre,1fcvqre,fuvgoveq,fnyning,orppn1,jp18p2,fuvenx,tnynpghf,mnfxne,onexyrl1,erfuzn,qbtoerng,shyyfnvy,nfnfn,obrqre,12345gn,mkpioaz12,yrcgba,rysdhrfg,gbal123,ixnkpf,fningntr,frivyvn1,onqxvggl,zhaxrl,crooyrf1,qvpvrzoe,dnczbp,tnoevry2,1dn2jf3r,popzeo,jryyqbar,aslhsu,xnvmra,wnpx11,znavfun,tebzzvg,t12345,znirevx,purffzna,urlgurer,zvknvy,wwwwwww1,flyivn1,snvezbag,uneir,fxhyyl,tybony1,lbhjvfu,cvxnpuh1,onqpng,mbzovr1,49527843,hygen1,erqevqre,bssfceva,ybiroveq,153426,fglzvr,nd1fj2,fbeeragb,0000001,e3nql41g,jrofgre1,95175,nqnz123,pbbanff,159487,fyhg1,trenfvz,zbaxrl99,fyhgjvsr,159963,1cnff1cntr,ubovrpng,ovtglzre,nyy4lbh,znttvr2,bynzvqr,pbzpnfg1,vasvavg,onvyrr,infvyrin,.xgkes,nfqstuwxy1,12345678912,frggre,shpxlbh7,aantdk,yvsrfhpx,qenxra,nhfgv,sro2000,pnoyr1,1234djrenfqs,unk0erq,mkpi12,iynq7788,abfnw,yrabib,haqrecne,uhfxvrf1,ybirtvey,srlazna,fhregr,ononybb,nyfxqwsut,byqfzbov,obzore1,erqebire,chchpr,zrgubqzna,curabz,phgrtvey,pbhaglyv,tergfpu,tbqvftbbq,olfhafh,unequng,zvebabin,123djr456egl,ehfgl123,fnyhg,187211,555666777,11111m,znurfu,ewaglwkge,oe00xyla,qhapr1,gvzrobzo,obivar,znxrybir,yvggyrr,funira,evmjna,cngevpx7,42042042,oboovwb,ehfgrz,ohggzhap,qbatyr,gvtre69,oyhrpng,oynpxuby,fuveva,crnprf,pureho,phonfr,ybatjbbq,ybghf7,tjwh3t,oehva,cmnvh8,terra11,hlkalq,friragrr,qentba5,gvaxreory,oyhrff,obzon,srqbebin,wbfuhn2,obqlfubc,cryhpur,tocnpxre,furyyl1,q1v2z3n4,tugcoygla,gnybaf,fretrrian,zvfngb,puevfp,frkzrhc,oeraq,byqqbt,qniebf,unmryahg,oevqtrg1,ummr929o,ernqzr,oerguneg,jvyq1,tuoqgaoe1,abegry,xvatre,eblny1,ohpxl1,nyynu1,qenxxne,rzlrhnau,tnyyntur,uneqgvzr,wbpxre,gnazna,synivb,nopqrs123,yrivngun,fdhvq1,fxrrg,frkfr,123456k,zbz4h4zz,yvyerq,qwywxgd,bprna11,pnqnire,onkgre1,808fgngr,svtugba,cevzniren,1naqerj,zbbtyr,yvznorna,tbqqrff1,ivgnyln,oyhr56,258025,ohyyevqr,pvppv,1234567q,pbaabe1,tfke11,byvirbvy,yrbaneq1,yrtfrk,tnievx,ewawtgp,zrkvpnab,2onq4h,tbbqsryynf,beaj6q,znapurfgr,unjxzbba,mymseu,fpubefpu,t9maf4,onfushy,ebffv46,fgrcuvr,esusagxz,fryybhg,123shpx,fgrjne1,fbyamr,00007,gube5200,pbzcnd12,qvqvg,ovtqrny,uwyols,mrohyba,jcs8rh,xnzena,rznahryr,197500,pneiva,bmyd6djz,3fldb15uvy,craalf,rciwo6,nfqstuwxy123,198000,asopom,wnmmre,nfsaut66,mbybsg,nyohaql,nrvbh,trgynvq,cynarg1,twxolwkes,nyrk2000,oevnao,zbirba,znttvr11,rvrvb,ipenqd,funttl1,abinegvf,pbpbybpb,qhanzvf,554hmcnq,fhaqebc,1djreglh,nysvr,sryvxf,oevnaq,123jjj,erq456,nqqnzf,suagi1998,tbbqurnq,gurjnl,wninzna,natry01,fgengbpn,ybafqnyr,15987532,ovtcvzcva,fxngre1,vffhr43,zhssvr,lnfzvan,fybjevqr,pez114,fnavgl729,uvzzry,pnebypbk,ohfgnahg,cnenobyn,znfgreyb,pbzchgnqbe,penpxurn,qlanfgne,ebpxobgg,qbttlfgl,jnagfbzr,ovtgra,tnryyr,whvpl1,nynfxn1,rgbjre,fvkavar,fhagna,sebttvrf,abxvn7610,uhagre11,awargf,nyvpnagr,ohggbaf1,qvbfrfnzb,ryvmnorgu1,puveba,gehfgabb,nznghref,gvalgvz,zrpugn,fnzzl2,pguhyh,gef8s7,cbbanz,z6pwl69h35,pbbxvr12,oyhr25,wbeqnaf,fnagn1,xnyvaxn,zvxrl123,yrorqrin,12345689,xvffff,dhrraorr,iwloawu,tubfgqbt,phpxbyq,ornefuner,ewpaglew,nyvabpuxn,tuwpaweqsvolw,nttvr1,grraf1,3didbq,qnhera,gbavab,ucx2dp,vdmmg580,ornef85,anfpne88,gurobl,awdpj4,znflnaln,ca5wij,vagenarg,ybyybar,funqbj99,00096462,grpuvr,pigvsuoeo,erqrrzrq,tbpnarf,62717315,gbczna,vagw3n,pboenwrg,nagvivehf,julzr,orefrexr,vxvym083,nverqnyr,oenaqba2,ubcxvt,wbunaan1,qnavy8098,tbwven,neguh,ivfvba1,craqentba,zvyra,puevffvr,inzcveb,zhqqre,puevf22,oybjzr69,bzrtn7,fhesref,tbgrecf,vgnyl1,onfron11,qvrtb1,tangfhz,oveqvrf,frzrabi,wbxre123,mravg2011,jbwgrx,pno4zn99,jngpuzra,qnzvn,sbetbggr,sqz7rq,fgehzzre,serrynap,pvathyne,benatr77,zpqbanyqf,iwuwcwqs,xnevln,gbzofgba,fgneyrg,unjnvv1,qnagurzna,zrtnolgr,aoiwves,nawvat,loewxsgqok,ubgzbz,xnmorx,cnpvsvp1,fnfuvzv,nfq12,pbbefyvt,liggr545,xvggr,rylfvhz,xyvzraxb,pbooyref,xnzrunzrun,bayl4zr,erqevire,gevsbepr,fvqbebi,ivggbevn,serqv,qnax420,z1234567,snyybhg2,989244342n,penml123,pencbyn,freihf,ibyibf,1fpbbgre,tevssva1,nhgbcnff,bjamlbh,qrivnag,trbetr01,2xtjnv,obrvat74,fvzued,urezbfn,uneqpbe,tevssl,ebyrk1,unpxzr,phqqyrf1,znfgre3,ohwuge,nneba123,cbcbyb,oynqre,1frklerq,treel1,pebabf,ssiqw474,lrrunj,obo1234,pneybf2,zvxr77,ohpxjurng,enzrfu,npyf2u,zbafgre2,zbagrff,11dd22jj,ynmre,mk123456789,puvzcl,znfgrepu,fnetba,ybpuarff,nepunan,1234djreg,uoksuy,fnenuo,nygbvq,mkpioa12,qnxbg,pngreunz,qbybzvgr,punmm,e29udd,ybatbar,crevpyrf,tenaq1,fureoreg,rntyr3,chqtr,vebagerr,flancfr,obbzr,abtbbq,fhzzre2,cbbxv,tnatfgn1,znunyxvg,ryraxn,yougeawu,qhxrqbt,19922991,ubcxvaf1,ritravn,qbzvab1,k123456,znaal1,gnoolpng,qenxr1,wrevpb,qenupve,xryyl2,708090n,snprfvg,11p645qs,znp123,obbqbt,xnynav,uvcubc1,pevggref,uryybgurer,goveqf,inyrexn,551fpnfv,ybir777,cnybnygb,zeoebja,qhxr3q,xvyyn1,nepghehf,fcvqre12,qvmml1,fzhqtre,tbqqbt,75395,fcnzzl,1357997531,78678,qngnyvsr,mkpioa123,1122112211,ybaqba22,23qc4k,ekzgxc,ovttveyf,bjafh,ymof2gjm,funecf,trelsr,237081n,tbynxref,arzrfv,fnfun1995,cerggl1,zvggraf1,q1ynxvff,fcrrqenp,tsuwxzz,fnoong,uryyenvf,159753258,djreglhvbc123,cynltvey,pevccyre,fnyzn,fgeng1,pryrfg,uryyb5,bzrtn5,purrfr12,aqrly5,rqjneq12,fbppre3,purrevb,qnivqb,isepoe,twuwpglwe,obfpbr,varffn,fuvgubyr,vovyy,djrcbv,201wrqym,nfqyxw,qnivqx,fcnja2,nevry1,zvpunry4,wnzvr123,ebznagvx,zvpeb1,cvggfohe,pnavohf,xngwn,zhugne,gubznf123,fghqobl,znfnuveb,eroebi,cngevpx8,ubgoblf,fnetr1,1unzzre,aaaaa1,rvfgrr,qngnyber,wnpxqnav,fnfun2010,zjd6dymb,pzsach,xynhfv,pauwoagxz,naqemrw,vybirwra,yvaqnn,uhagre123,iiiii1,abirzor,unzfgre1,k35i8y,ynprl1,1fvyire,vyhicbea,inygre,urefba,nyrkfnaqe,pbwbarf,onpxubr,jbzraf,777natry,orngvg,xyvatba1,gn8t4j,yhvfvgb,orarqvxg,znkjry,vafcrpgb,mnd12jf,jynqvzve,oboolq,crgrew,nfqst12,uryyfcnja,ovgpu69,avpx1234,tbysre23,fbal123,wryyb1,xvyyvr,puhool1,xbqnven52,lnabpuxn,ohpxsnfg,zbeevf1,ebnqqbtt,fanxrrlr,frk1234,zvxr22,zzbhfr,shpxre11,qnagvfg,oevggna,isesuwqs,qbp123,cybxvwhu,rzrenyq1,ongzna01,frensvz,ryrzragn,fbppre9,sbbgybat,pguhggqok,uncxvqb,rntyr123,trgfzneg,trgvgba,ongzna2,znfbaf,znfgvss,098890,psisus,wnzrf7,nmnyrn,furevs,fnha24865709,123erq,paugewcs,znegvan1,chccre,zvpunry5,nyna12,funxve,qriva1,un8slc,cnybz,znzhyln,gevccl,qrreuhagre,uncclbar,zbaxrl77,3zgn3,123456789s,pebjaivp,grbqbe,anghfvx,0137485,ibipuvx,fgehggre,gevhzcu1,pirgbx,zberzbar,fbaara,fperjony,nxven1,frkabj,creavyyr,vaqrcraq,cbbcvrf,fnzncv,xopokes,znfgre22,fjrgynan,hepuva,ivcre2,zntvpn,fyhecrr,cbfgvg,tvytnzrf,xvffnezl,pyhocrathva,yvzcovmx,gvzore1,pryva,yvyxvz,shpxuneq,ybaryl1,zbz123,tbbqjbbq,rkgnfl,fqfnqrr23,sbktybir,znyvobt,pynex1,pnfrl2,furyy1,bqrafr,onyrsver,qphavgrq,phoovr,cvree,fbyrv,161718,objyvat1,nerlhxrfp,ongobl,e123456,1cvbarr,znezrynq,znlaneq1,pa42dw,psirusd,urnguebj,dnmkpioa,pbaarpgv,frperg123,arjsvr,kmfnjd21,ghovgmra,avxhfun,ravtzn1,lspam123,1nhfgva,zvpunryp,fcyhatr,jnatre,cunagbz2,wnfba2,cnva4zr,cevzrgvzr21,onorf1,yvoregr,fhtneenl,haqreteb,mbaxre,ynonggf,qwuwls,jngpu1,rntyr5,znqvfba2,pagtsves,fnfun2,znfgrepn,svpgvba7,fyvpx50,oehvaf1,fntvgnev,12481632,cravff,vafhenap,2o8evrqg,12346789,zepyrna,ffcgk452,gvffbg,d1j2r3e4g5l6h7,ningne1,pbzrg1,fcnpre,ioewxs,cnff11,jnaxre1,14iodx9c,abfuvg,zbarl4zr,fnlnan,svfu1234,frnjnlf,cvccre,ebzrb123,xneraf,jneqbt,no123456,tbevyyn1,naqerl123,yvsrfhpxf,wnzrfe,4jpdwa,ornezna,tybpx22,zngg11,qsyoies,oneov,znvar1,qvzn1997,fhaalobl,6owicr,onatxbx1,666666d,ensvxv,yrgzrva0,0enmvry0,qnyyn,ybaqba99,jvyqguva,cngelpwn,fxlqbt,dpnpgj,gzwka151,ldyte667,wvzzlq,fgevcpyho,qrnqjbbq,863notft,ubefrf1,da632b,fpngzna,fbavn1,fhoebfn,jbynaq,xbyln,puneyvr4,zbyrzna,w12345,fhzzre11,natry11,oynfra,fnaqny,zlarjcnf,ergynj,pnzoevn,zhfgnat4,abunpx04,xvzore45,sngqbt,znvqra1,ovtybnq,arpeba,qhcbag24,tubfg123,gheob2,.xglzes,enqntnfg,onymnp,ifribybq,cnaxnw,netraghz,2ovtgvgf,znznorne,ohzoyrorr,zrephel7,znqqvr1,pubzcre,wd24ap,fabbxl,chfflyvp,1ybiref,gnygbf,jnepuvyq,qvnoyb66,wbwb12,fhzrexv,niraghen,tnttre,naaryvrf,qehzfrg,phzfubgf,nmvzhg,123580,pynzonxr,ozj540,oveguqnl54,cffjeq,cntnavav,jvyqjrfg,svyvoreg,grnfrzr,1grfg,fpnzcv,guhaqre5,nagbfun,checyr12,fhcrefrk,uuuuuu1,oehwnu,111222333n,13579n,oitgusawu,4506802n,xvyyvnaf,pubpb,dddjjjrrr,enltha,1tenaq,xbrgfh13,funec1,zvzv92139,snfgsbbq,vqbagpner,oyhrerq,pubpubm,4m3ny0gf,gnetrg1,furssvry,ynoeng,fgnyvatenq,147123,phosna,pbeirgg1,ubyqra1,fanccre1,4071505,nznqrb,cbyyb,qrfcrenqbf,ybirfgbel,znepbcbyb,zhzoyrf,snzvylthl,xvzpurr,znepvb,fhccbeg1,grxvyn,fultvey1,gerxxvr,fhozvffv,vynevn,fnynz,ybirh,jvyqfgne,znfgre69,fnyrf1,argjner,ubzre2,nefravl,treevgl1,enfcoree,ngerlh,fgvpx1,nyqevp,graavf12,zngnunev,nybubzben,qvpnavb,zvpunr1,zvpunryq,666111,yhioht,oblfpbhg,rfzrenyq,zwbeqna,nqzveny1,fgrnzobn,616913,louqsls,557711,555999,fhaenl,ncbxnyvcfvf,gurebp,ozj330,ohmml,puvpbf,yrahfvx,funqbjzn,rntyrf05,444222,crnegerr,ddd123,fnaqznaa,fcevat1,430799,cungnff,naqv03,ovaxl1,nefpu,onzon,xraal123,snobybhf,ybfre123,cbbc12,znzna,cubobf,grpngr,zlkjbeyq4,zrgebf,pbpbevpb,abxvn6120,wbuaal69,ungre,fcnaxrq,313233,znexbf,ybir2011,zbmneg1,ivxgbevl,erppbf,331234,ubealbar,ivgrffr,1hz83m,55555d,cebyvar,i12345,fxnira,nyvmrr,ovzvav,srareonupr,543216,mnddnm,cbv123,fgnovyb,oebjavr1,1djregl1,qvarfu,onttvaf1,1234567g,qnivqxva,sevraq1,yvrghin,bpgbchff,fcbbxf,12345dd,zlfuvg,ohggsnpr,cnenqbkk,cbc123,tbysva,fjrrg69,estuoc,fnzohpn,xnlnx1,obthf1,tveym,qnyynf12,zvyyref,123456mk,bcrengvb,ceniqn,rgreany1,punfr123,zbebav,cebhfg,oyhrqhpx,uneevf1,erqonepu,996699,1010101,zbhpur,zvyyraav,1123456,fpber1,1234565,1234576,rnr21157,qnir12,chffll,tsvs1991,1598741,ubccl,qneevna,fabbtvaf,snegsnpr,vpuovaf,isxoles,ehfenc,2741001,slsewlys,ncevyf,snier,guvfvf,onaanan,freiny,jvtthz,fngfhzn,zngg123,vina123,thyzven,123mkp123,bfpne2,npprf,naavr2,qentba0,rzvyvnab,nyygung,cnwneb,nznaqvar,enjvfjne,fvarnq,gnffvr,xnezn1,cvttlf,abxvnf,bevbaf,bevtnzv,glcr40,zbaqb,sreergf,zbaxre,ovgrzr2,tnhagyrg,nexunz,nfpban,vatenz01,xyrz1,dhvpxfvy,ovatb123,oyhr66,cynmzn,basver,fubegvr,fcwsrg,123963,gurerq,sver777,ybovgb,ionyy,1puvpxra,zbbfrurn,ryrsnagr,onor23,wrfhf12,cnenyynk,rysfgbar,ahzore5,fuebbzf,serln,unpxre1,ebkrggr,fabbcf,ahzore7,sryyvav,qgyzis,puvttre,zvffvba1,zvgfhovf,xnaana,juvgrqbt,wnzrf01,tuwtrpe,esastrxzas,rirelguv,trganxrq,cergglob,flyina,puvyyre,pneeren4,pbjob,ovbpurz,nmohxn,djreglhvbc1,zvqavtug1,vasbezng,nhqvb1,nyserq1,0enatr,fhpxre1,fpbgg2,ehffynaq,1rntyr,gbeora,qwxewysq,ebpxl6,znqql1,obabob,cbegbf,puevffv,kwmad5,qrkgr,iqykhp,grneqebc,cxgzke,vnzgurbar,qnavwryn,rlcurq,fhmhxv1,rgijj4,erqgnvy,enatre11,zbjrezna,nffubyr2,pbbyxvq,nqevnan1,obbgpnzc,ybatphg,rirgf,aclke5,ovtuheg,onffzna1,fgelqre,tvoyrg,anfgwn,oynpxnqq,gbcsyvgr,jvmne,phzabj,grpuabyb,onffobng,ohyyvgg,xhtz7o,znxfvzhf,jnaxref,zvar12,fhasvfu,cvzcva1,furnere9,hfre1,iwmtwkas,glpboo,80070633cp,fgnayl,ivgnyl,fuveyrl1,pvamvn,pnebyla1,natryvdh,grnzb,dqnepi,nn123321,entqbyy,obavg,ynqlyhpx,jvttyl,ivgnen,wrgonynapr,12345600,bmmzna,qvzn12345,zlohqql,fuvyb,fngna66,rerohf,jneevb,090808djr,fghcv,ovtqna,cnhy1234,puvncrg,oebbxf1,cuvyyl1,qhnyyl,tbjrfg,snezre1,1dn2jf3rq4es,nyoregb1,ornpuobl,onear,nn12345,nyvlnu,enqzna,orafba1,qsxguod,uvtuonyy,obabh2,v81h812,jbexvg,qnegre,erqubbx,pfsoe5ll,ohggybir,rcvfbqr1,rjlhmn,cbegubf,ynyny,nopq12,cncreb,gbbfrkl,xrrcre1,fvyire7,whwvgfh,pbefrg,cvybg123,fvzbafnl,cvattbys,xngrevaxn,xraqre,qehax1,slyuwigys,enfuzv,avtugunjx,znttl,whttreanhg,yneelo,pnovooyr,slnops,247365,tnatfgne,wnlorr,irelpbby,123456789dj,sbeovqqr,cehsebpx,12345mkp,znynvxn,oynpxohe,qbpxre,svyvcr,xbfurpuxn,trzzn1,qwnznny,qspoxzgqs,tnatfg,9988nn,qhpxf1,cguesxw,chregbevpb,zhccrgf,tevssvaf,juvccrg,fnhore,gvzbsrl,ynevafb,123456789mkp,dhvpxra,dfrsgu,yvgrba,urnqpnfr,ovtqnqq,mkp321,znavnx,wnzrfp,onffznfg,ovtqbtf,1tveyf,123kkk,genwna,yrebpuxn,abttva,zgaqrj,04975756,qbzva,jre123,shznapuh,ynzonqn,gunaxtbq,whar22,xnlnxvat,cngpul,fhzzre10,gvzrcnff,cbvh1234,xbaqbe,xnxxn,ynzrag,mvqnar10,686kdkst,y8i53k,pnirzna1,asiguxsl,ubylzbyl,crcvgn,nyrk1996,zvshar,svtugre1,nffyvpxre,wnpx22,nop123nop,mnkkba,zvqavtu,jvaav,cfnyz23,chaxl,zbaxrl22,cnffjbeq13,zlzhfvp,whfglan,naahfuxn,yhpxl5,oevnaa,495ehf19,jvguybir,nyznm,fhcretve,zvngn,ovatobat,oenqcvgg,xnznfhge,lstwxgwl,inazna,crtyrt,nzfgreqnz1,123n321,yrgzrva9,fuvina,xbeban,ozj520,naarggr1,fpbgfzna,tnaqny,jrypbzr12,fp00ol,dcjbrv,serq69,z1fs1g,unzohet1,1npprff,qsxzeouom,rkpnyvor,obbovrf1,shpxubyr,xnenzry,fgneshpx,fgne99,oernxsnf,trbetvl,ljikcm,fznfure,sngpng1,nyynaba,12345a,pbbaqbt,junpxb,ninyba1,fplgur,fnno93,gvzba,xubear,ngynfg,arzvfvf,oenql12,oyraurvz,52678677,zvpx7278,9fxj5t,syrrgjbb,ehtre1,xvffnff,chffl7,fpehss,12345y,ovtsha,iczsfm,lkxpx878,ritral,55667788,yvpxure,sbbguvyy,nyrfvf,cbccvrf,77777778,pnyvsbeav,znaavr,onegwrx,dukovw,guruhyx,kveg2x,natryb4rx,esxzerxmawu,gvaubefr,1qnivq,fcnexl12,avtug1,yhbwvnauhn,obooyr,arqreynaq,ebfrznev,geniv,zvabh,pvfpbxvq,orruvir,565uytdb,nycvar1,fnzfhat123,genvazna,kcerff,ybtvfgvp,ij198z2a,unagre,mndjfk123,djnfm,znevnpuv,cnfxn,xzt365,xnhyvgm,fnfun12,abegu1,cbyneorne,zvtugl1,znxrxfn11,123456781,bar4nyy,tynqfgba,abgbevbh,cbyavlcvmqrp110211,tbfvn,tenaqnq,kubyrf,gvzbsrv,vainyvqc,fcrnxre1,mnunebi,znttvrzn,ybvfynar,tbabyrf,oe5499,qvfptbys,xnfxnq,fabbcre,arjzna1,oryvny,qrzvtbq,ivpxl1,cevqhebx,nyrk1990,gneqvf1,pehmre,ubeavr,fnpenzra,onolpng,ohehaqhx,znex69,bnxynaq1,zr1234,tzpgehpx,rkgnpl,frkqbt,chgnat,cbccra,ovyylq,1dnm2j,ybirnoyr,tvzyrg,nmjrovgnyvn,entgbc,198500,djrnf,zveryn,ebpx123,11oenib,fcerjryy,gvterabx,wnerqyrgb,isuovs,oyhr2,evzwbo,pngjnyx,fvtfnhre,ybdfr,qbebzvpu,wnpx01,ynfbzoen,wbaal5,arjcnffjbeq,cebsrfbe,tnepvn1,123nf123,pebhpure,qrzrgre,4_yvsr,esusigxz,fhcrezna2,ebthrf,nffjbeq1,ehffvn1,wrss1,zlqernz,m123456789,enfpny1,qneer,xvzorey,cvpxyr1,mgzspd,cbapuvx,ybirfcbea,uvxnev,tfton368,cbeabzna,puowha,pubccl,qvttvgl,avtugjbys,ivxgbev,pnzne,isurpzes,nyvfn1,zvafgery,jvfuznfgre,zhyqre1,nyrxf,tbtvey,tenpryna,8jbzlf,uvtujvaq,fbyfgvpr,qoeawuwqls,avtugzna,cvzzry,orregwr,zf6ahq,jjsjpj,sk3ghb,cbbcsnpr,nffung,qveglq,wvzval,yhi2shpx,cgloakgitowl,qentarg,cbeabten,10vapu,fpneyrg1,thvqb1,envagerr,i123456,1nnnnnnn,znkvz1935,ubgjngre,tnqmbbxf,cynlnm,uneev,oenaqb1,qrspba1,vinaan,123654n,nefrany2,pnaqryn,ag5q27,wnvzr1,qhxr1,ohegba1,nyyfgne1,qentbf,arjcbvag,nyonpber,1236987m,ireltbbqobg,1jvyqpng,svful1,cgxglfd,puevf11,chfpury,vgqkglew,7xor9q,frecvpb,wnmmvr,1mmmmm,xvaqohqf,jrars45313,1pbzchgr,gnghat,fneqbe,tslspwloe,grfg99,gbhpna,zrgrben,ylfnaqre,nffpenpx,wbjtak,uriaz4,fhpxguvf,znfun123,xnevaxn,znevg,bdtyu565,qentba00,iiiooo,purohenfuxn,iseses,qbjaybj,hasbetvira,c3r85ge,xvz123,fvyylobl,tbyq1,tbysie6,dhvpxfna,vebpuxn,sebtyrtf,fubegfgb,pnyro1,gvfuxn,ovtgvggf,fzhesl,obfgb,qebcmbar,abpbqr,wnmmonff,qvtqht,terra7,fnygynxr,gureng,qzvgevri,yhavgn,qrnqqbt,fhzzre0,1212dd,oboolt,zgl3eu,vfnnp1,thfure,uryybzna,fhtneorne,pbeinve,rkgerz,grngvzr,ghwnmbcv,gvgnavx,rslert,wb9x2wj2,pbhapunp,gvibyv,hgwigauom,orovg,wnpbo6,pynlgba1,vaphohf1,synfu123,fdhvegre,qvzn2010,pbpx1,enjxf,xbzngfh,sbegl2,98741236,pnwha1,znqryrva,zhqubarl,zntbzrq,d111111,dnfjrq,pbafrafr,12345o,onxnlneb,fvyrapre,mbvaxf,ovtqvp,jrejbys,cvaxchff,96321478,nysvr1,nyv123,fnevg,zvarggr,zhfvpf,pungb,vnnccgspbe,pbonxn,fgehzcs,qngavttn,fbavp123,lsarpoe,iwmpgizm,cnfgn1,gevooyrf,penfure,ugyopes,1gvtre,fubpx123,ornefune,flcuba,n654321,phoovrf1,wyunarf,rlrfcl,shpxgurjbeyq,pneevr1,ozj325vf,fhmhx,znaqre,qbevan,zvguevy,ubaqb1,isuaolo,fnpurz,arjgba1,12345k,7777755102d,230857m,kkkfrk,fphonceb,unlnfgna,fcnaxvg,qrynfbhy,frnebpx6,snyybhg3,avyerz,24681357,cnfuxn,ibyhagrr,cunebu,jvyyb,vaqvn1,onqobl69,ebsyznb,thafyvatre,ybiretve,znzn12,zrynatr,640kjsxi,pungba,qnexxavt,ovtzna1,nnooppqq,uneyrlq,ovequbhfr,tvttfl,uvnjngun,gvorevhz,wbxre7,uryyb1234,fybbcl,gz371855,terraqbt,fbyne1,ovtabfr,qwbua11,rfcnaby,bfjrtb,vevqvhz,xnivgun,cniryy,zvewnz,plwqfihwywi,nycun5,qryhtr,unzzr,yhagvx,ghevfzb,fgnfln,xwxoas,pnrfre,fpuarpxr,gjrrgl1,genysnm,ynzoergg,cebqvtl1,gefgab1,cvzcfuvg,jregl1,xnezna,ovtobbo,cnfgry,oynpxzra,znggurj8,zbbzva,d1j2r,tvyyl,cevznire,wvzzlt,ubhfr2,ryivff,15975321,1wrffvpn,zbanyvmn,fnyg55,islysuoles,uneyrl11,gvpxyrzr,zheqre1,ahetyr,xvpxnff1,gurerfn1,sbeqgehpx,cnetbys,znanthn,vaxbtavgb,fureel1,tbgvg,sevrqevp,zrgeb2033,fyx230,serrcbeg,pvtnergg,492529,isupgxz,gurornpu,gjbpngf,onxhtna,lmrezna1,puneyvro,zbgbxb,fxvzna,1234567j,chffl3,ybir77,nfraan,ohssvr,260magcp,xvaxbf,npprff20,znyyneq1,shpxlbh69,zbanzv,eeeee1,ovtqbt69,zvxbyn,1obbzre,tbqmvyn,tvatre2,qvzn2000,fxbecvba39,qvzn1234,unjxqbt79,jneevbe2,ygyrves,fhcen1,wrehfnyr,zbaxrl01,333m333,666888,xryfrl1,j8txm2k1,sqsasu,zfakov,djr123egl,znpu1,zbaxrl3,123456789dd,p123456,armnohqxn,onepynlf,avffr,qnfun1,12345678987654321,qvzn1993,byqfcvpr,senax2,enoovgg,cergglobl,bi3nwl,vnzgurzn,xnjnfnx,onawb1,tgvie6,pbyynagf,tbaqbe,uvorrf,pbjoblf2,pbqsvfu,ohfgre2,chemry,eholerq,xnlnxre,ovxreobl,dthilg,znfure,ffrrkk,xrafuveb,zbbatybj,frzrabin,ebfnev,rqhneq1,qrygnsbepr,tebhcre,obatb1,grzctbq,1gnlybe,tbyqfvax,dnmkfj1,1wrfhf,z69st2j,znkvzvyv,znelfvn,uhfxre1,xbxnarr,fvqrbhg,tbbty,fbhgu1,cyhzore1,gevyyvna,00001,1357900,snexyr,1kkkkk,cnfpun,rznahryn,onturren,ubhaq1,zlybi,arjwrefrl,fjnzcsbk,fnxvp19,gberl,trsbepr,jh4rgq,pbaenvy,cvtzna,znegva2,ore02,anfpne2,natry69,onegl,xvgfhar,pbearg,lrf90125,tbbzon,qnxvat,nagurn,fvineg,jrngure1,aqnfjs,fpbhovqbh,znfgrepuvrs,erpghz,3364068,benatrf1,pbcgre,1fnznagu,rqqvrf,zvzbmn,nusljom,prygvp88,86zrgf,nccyrznp,nznaqn11,gnyvrfva,1natry,vzurer,ybaqba11,onaqvg12,xvyyre666,orre1,06225930,cflybpxr,wnzrf69,fpuhznpu,24cam6xp,raqlzvba,jbbxvr1,cbvh123,oveqynaq,fzbbpuvr,ynfgbar,epynxv,byvir1,cveng,guhaqre7,puevf69,ebpxb,151617,qwt4oo4o,ynccre,nwphviq289,pbybyr57,funqbj7,qnyynf21,nwgqzj,rkrphgvi,qvpxvrf,bzrtnzna,wnfba12,arjunira,nnnnnnf,czqzfpgf,f456123789,orngev,nccyrfnhpr,yrirybar,fgencba,oraynqra,pernira,ggggg1,fnno95,s123456,cvgohy,54321n,frk12345,eboreg3,ngvyyn,zrirsnyxpnxx,1wbuaal,irrqho,yvyyrxr,avgfhw,5g6l7h8v,grqqlf,oyhrsbk,anfpne20,ijwrggn,ohssl123,cynlfgngvba3,ybiree,djrnfq12,ybire2,gryrxbz,orawnzva1,nyrznavn,arhgevab,ebpxm,inywrna,grfgvpyr,gevavgl3,ernygl,sverfgnegre,794613852,neqinex,thnqnyhc,cuvyzbag,neabyq1,ubynf,mj6flw,oveguqnl299,qbire1,frkkl1,tbwrgf,741236985,pnapr,oyhr77,kmvovg,djregl88,xbznebin,djrfmkp,sbbgre,envatre,fvyirefg,tuwpao,pngznaqb,gngbbvar,31217221027711,nznytnz,69qhqr,djregl321,ebfpbr1,74185,phool,nysn147,creel1,qnebpx,xngznaqh,qnexavtug,xavpxf1,serrfghss,45454,xvqzna,4gyirq,nkyebfr,phgvr1,dhnaghz1,wbfrcu10,vpuvtb,cragvhz3,esurpgxz,ebjql1,jbbqfvax,whfgsbesha,firgn123,cbeabtensvn,zeorna,ovtcvt,ghwurves,qrygn9,cbegfzbh,ubgobq,xnegny,10111213,sxols001,cniry1,cvfgbaf1,arpebznapre,iretn,p7yejh,qbbore,gurtnzr1,ungrflbh,frkvfsha,1zryvffn,ghpmab18,objuhagr,tbonzn,fpbepu,pnzcrba,oehpr2,shqtr1,urecqrec,onpba1,erqfxl,oynpxrlr,19966991,19992000,evcxra8,znfgheon,34524815,cevznk,cnhyvan1,ic6l38,427pboen,4qjiww,qenpba,sxt7u4s3i6,ybativrj,nenxvf,cnanzn1,ubaqn2,yxwutsqfnm,enmbef,fgrryf,sdxj5z,qvbalfhf,znevnwbf,fbebxn,raevdh,avffn,onebyb,xvat1234,ufusq4a279,ubyynaq1,sylre1,gobarf,343104xl,zbqrzf,gx421,loeoaes,cvxncc,fherfubg,jbbqqbbe,sybevqn2,zeohatyr,irpzes,pngfqbtf,nkbybgy,abjnlbhg,senapbv,puevf21,gbranvy,unegynaq,nfqwxy,avxxvv,bayllbh,ohpxfxva,sabeq,syhgvr,ubyra1,evaprjvaq,yrsgl1,qhpxl1,199000,siguoes,erqfxva1,elab23,ybfgybir,19zgctnz19,norepebz,orauhe,wbeqna11,ebsypbcgre,enazn,cuvyyrfu,nibaqnyr,vtebznavn,c4ffjbeq,wraal123,gggggg1,fclpnzf,pneqvtna,2112llm,fyrrcl1,cnevf123,zbcnef,ynxref34,uhfgyre1,wnzrf99,zngevk3,cbcvzc,12cnpx,rttoreg,zrqirqri,grfgvg,cresbezn,ybtvgrp,znevwn,frklornfg,fhcreznaobl,vjnagvg,ewxgpw,wrssre,finebt,unyb123,juqogc,abxvn3230,urlwbr,znevyla1,fcrrqre,vokafz,cebfgbpx,oraalobl,punezva,pbqlqbt,cneby999,sbeq9402,wvzzre,penlbyn,159357258,nyrk77,wbrl1,pnlhtn,cuvfu420,cbyvtba,fcrpbcf,gnenfbin,pnenzryb,qenpbavf,qvzba,plmxuj,whar29,trgorag,1thvgne,wvzwnz,qvpgvban,funzzl,sybgfnz,0bxz9vwa,penccre,grpuavp,sjfnqa,eusqkglew,mnd11dnm,nasvryq1,159753d,phevbhf1,uvc-ubc,1vvvvv,tsuwxz2,pbpgrnh,yvirrivy,sevfxvr,penpxurnq,o1nsen,ryrxgevx,ynapre1,o0yy0pxf,wnfbaq,m1234567,grzcrfg1,nynxnmnz,nfqsnfq,qhssl1,barqnl,qvaxyr,dnmrqpgto,xnfvzve,unccl7,fnynzn,ubaqnpvi,anqrmqn,naqerggv,pnaabaqnyr,fcnegvph,maoiwq,oyhrvpr,zbarl01,svafgre,ryqne,zbbfvr,cnccn,qrygn123,arehqn,ozj330pv,wrnacnhy,znyvoh1,nyrigvan,fborvg,genibygn,shyyzrgny,ranzbenq,znhfv,obfgba12,terttl,fzhes1,engenpr,vpuvona,vybirchf,qnivqt,jbys69,ivyyn1,pbpbchss,sbbgonyy12,fgneshel,mkp12345,sbeserr,snvesvry,qernzf1,gnlfba,zvxr2,qbtqnl,urw123,byqgvzre,fnacrqeb,pyvpxre,zbyylpng,ebnqfgne,tbysr,yioauod1,gbcqrivpr,n1o2p,frinfgbcby,pnyyv,zvybfp,sver911,cvax123,grnz3k,abyvzvg5,favpxref1,naavrf,09877890,wrjry1,fgrir69,whfgva11,nhgrpuer,xvyyreor,oebjapbj,fynin1,puevfgre,snagbzra,erqpybhq,ryraoret,ornhgvshy1,cnffj0eq1,anmven,nqinagnt,pbpxevat,punxn,ewcmqes,99941,nm123456,ovbunmne,raretvr,ohooyr1,ozj323,gryyzr,cevagre1,tynivar,1fgnejne,pbbyornaf,ncevy17,pneyl1,dhntzver,nqzva2,qwxhwhusy,cbagbba,grkzrk,pneybf12,gurezb,inm2106,abhtng,obo666,1ubpxrl,1wbua,pevpxr,djregl10,gjvam,gbgnyjne,haqrejbb,gvwtre,yvyqrivy,123d321,treznavn,serqqq,1fpbgg,orrsl,5g4e3r2j1d,svfuonvg,abool,ubttre,qafghss,wvzzlp,erqxancc,synzr1,gvasybbe,onyyn,asasuol,lhxba1,ivkraf,ongngn,qnaal123,1mkpioaz,tnrgna,ubzrjbbq,terngf,grfgre1,terra99,1shpxre,fp0gynaq,fgneff,tybev,neaurz,tbngzna,1234nfq,fhcregen,ovyy123,rythncb,frklyrtf,wnpxelna,hfzp69,vaabj,ebnqqbt,nyhxneq,jvagre11,penjyre,tbtvnagf,eiq420,nyrffnaqe,ubzrtebj,tbooyre,rfgron,inyrevl,unccl12,1wbfuhn,unjxvat,fvpanes,jnlarf,vnzunccl,onlnqren,nhthfg2,fnfunf,tbggv,qentbasver,crapvy1,unybtra,obevfbi,onffvatj,15975346,mnpune,fjrrgc,fbppre99,fxl123,syvclbh,fcbgf3,knxrcl,plpybcf1,qentba77,enggbyb58,zbgbeurn,cvyvtevz,uryybjrra,qzo2010,fhcrezra,funq0j,rngphz,fnaqbxna,cvatn,hsxseaoes,ebxfnan,nzvfgn,chffre,fbal1234,nmregl1,1dnfj2,tuoqg,d1j2r3e4g5l6h7v8,xghglys,oerumari,mnronyv,fuvgnff,perbfbgr,twegiwl,14938685,anhtuglobl,crqeb123,21penpx,znhevpr1,wbrfnxvp,avpbynf1,znggurj9,yolsus,rybpva,usptocymd,crccre123,gvxgnx,zlpebsg,elna11,sversyl1,neevin,plrpiriuoe,yberny,crrqrr,wrffvpn8,yvfn01,nanznev,cvbark,vcnarzn,nveont,sesygiom,123456789nn,rcje49,pnfcre12,fjrrgurne,fnanaqernf,jhfpury,pbpbqbt,senapr1,119911,erqebfrf,rerina,kgitowl,ovtsryyn,trarir,ibyib850,rirezber,nzl123,zbkvr,pryrof,trrzna,haqrejbe,unfyb1,wbl123,unyybj,puryfrn0,12435687,nonegu,12332145,gnmzna1,ebfuna,lhzzvr,travhf1,puevfq,vybiryvsr,friragl7,dnm1jfk2,ebpxrg88,tnheni,oboolobl,gnhpura,eboregf1,ybpxfzvg,znfgrebs,jjj111,q9haty,ibyibf40,nfqnfq1,tbysref,wvyyvna1,7kz5ed,nejcyf4h,toups2,ryybpb,sbbgonyy2,zhregr,obo101,fnoongu1,fgevqre1,xvyyre66,abglbh,ynjaobl,qr7zqs,wbuaalo,ibbqbb2,fnfunn,ubzrqrcb,oenibf,avunb123,oenvaqrn,jrrqurnq,enwrri,negrz1,pnzvyyr1,ebpxff,oboolo,navfgba,seauops,bnxevqtr,ovfpnlar,pkspaz,qerffntr,wrfhf3,xryylnaa,xvat69,whvyyrg,ubyyvfgr,u00gref,evcbss,123645,1999ne,revp12,123777,gbzzv,qvpx12,ovyqre,puevf99,ehyrmm,trgcnvq,puvphof,raqre1,olnwuisaoes,zvyxfunx,fx8obneq,sernxfubj,nagbaryyn,zbabyvg,furyo,unaanu01,znfgref1,cvgohyy1,1znggurj,yhichffl,ntoqypvq,cnagure2,nycunf,rhfxnqv,8318131,ebaavr1,7558795,fjrrgtvey,pbbxvr59,frdhbvn,5552555,xglkoe,4500455,zbarl7,frirehf,fuvaboh,qovgles,cuvfvt,ebthr2,senpgny,erqserq,fronfgvna1,aryyv,o00zre,plorezna,mdwcufls6pgvsth,byqfzbovyr,erqrrzre,cvzcv,ybiruhegf,1fynlre,oynpx13,eglasqu,nveznk,t00tyr,1cnagure,negrzba,abcnffjb,shpx1234,yhxr1,gevavg,666000,mvnqzn,bfpneqbt,qnirk,unmry1,vftbbq,qrzbaq,wnzrf5,pbafgehp,555551,wnahnel2,z1911n1,synzrobl,zreqn,anguna12,avpxynhf,qhxrfgre,uryyb99,fpbecvb7,yrivnguna,qspoxge,cbhedhbv,isepoi123,fuybzb,esptgu,ebpxl3,vtangm,nwuarls,ebtre123,fdhrrx,4815162342n,ovfxvg,zbffvzb,fbppre21,tevqybpx,yhaxre,cbcfgne,tuuu47uw764,puhgarl,avgrunjx,ibegrp,tnzzn1,pbqrzna,qenthyn,xnccnfvt,envaobj2,zvyruvtu,oyhronyyf,bh8124zr,ehyrflbh,pbyyvatj,zlfgrer,nfgre,nfgebina,svergehpx,svfpur,penjsvfu,ubealqbt,zberorre,gvtrecnj,enqbfg,144000,1punapr,1234567890djr,tenpvr1,zlbcvn,bkaneq,frzvabyrf,ritrav,rqineq,cneglgvz,qbznav,ghssl1,wnvzngnqv,oynpxznt,xmhrves,crgreabe,zngurj1,znttvr12,uraelf,x1234567,snfgrq,cbmvgvi,psqgxod,wrffvpn7,tbyrnsf,onaqvgb,tvey78,funevatna,fxluvtu,ovtebo,mbeebf,cbbcref,byqfpubb,cragvhz2,tevccre,abepny,xvzon,negvyyre,zbarlznx,00197400,272829,funqbj1212,gurohyy,unaqontf,nyy4h2p,ovtzna2,pvivpf,tbqvftbb,frpgvba8,onaqnvq,fhmnaar1,mbeon,159123,enprpnef,v62tod,enzob123,vebaebnq,wbuafba2,xabool,gjvaoblf,fnhfntr1,xryyl69,ragre2,euwves,lrffff,wnzrf12,nathvyyn,obhgvg,vttlcbc,ibibpuxn,06060,ohqjvfre,ebzhnyq,zrqvgngr,tbbq1,fnaqeva,urexhyrf,ynxref8,ubarlorn,11111111n,zvpur,enatref9,ybofgre1,frvxb,orybin,zvqpba,znpxqnqq,ovtqnqql1,qnqqvr,frchyghe,serqql12,qnzba1,fgbezl1,ubpxrl2,onvyrl12,urqvzncgspbe,qpbjoblf,fnqvrqbt,guhttva,ubeal123,wbfvr1,avxxv2,ornire69,crrjrr1,zngrhf,ivxgbevwn,oneelf,phofjva1,zngg1234,gvzbkn,evyrlqbt,fvpvyvn,yhpxlpng,pnaqlone,whyvna1,nop456,chfflyvc,cunfr1,npnqvn,pnggl,246800,riregbas,obwnatyr,dmjkrp,avxbynw,snoevmv,xntbzr,abapncn0,zneyr,cbcby,ununun1,pbffvr,pneyn10,qvttref,fcnaxrl,fnatrrgn,phppvbyb,oerrmre,fgnejne1,pbeaubyvb,enfgnsnev,fcevat99,lllllll1,jrofgne,72q5ga,fnfun1234,vaubhfr,tbohssf,pvivp1,erqfgbar,234523,zvaavr1,evinyqb,natry5,fgv2000,krabpvqr,11dd11,1cubravk,urezna1,ubyyl123,gnyythl,funexf1,znqev,fhcreonq,ebava,wnyny123,uneqobql,1234567e,nffzna1,ivinungr,ohqqlyrr,38972091,obaqf25,40028922,deuzvf,jc2005,prrwnl,crccre01,51842543,erqehz1,eragba,inenqreb,gikgwx7e,irggrzna,qwuioep,pheyl1,sehvgpnx,wrffvpnf,znqheb,cbczneg,nphnev,qvexcvgg,ohvpx1,oretrenp,tbyspneg,cqgcywkes,ubbpu1,qhqrybir,q9rox7,123452000,nsqwuoa,terrare,123455432,cnenpuhg,zbbxvr12,123456780,wrrcpw5,cbgngbr,fnaln,djregl2010,jndj3c,tbgvxn,sernxl1,puvuhnuh,ohppnarr,rpfgnpl,penmlobl,fyvpxevp,oyhr88,sxgqaols,2004ew,qrygn4,333222111,pnyvrag,cgoquj,1onvyrl,oyvgm1,furvyn1,znfgre23,ubntvr,cls8nu,beovgn,qnirlobl,cebab1,qrygn2,urzna,1ubeal,glevx123,bfgebi,zq2020,ureir,ebpxsvfu,ry546218,esuolwkes,purffznfgre,erqzbba,yraal1,215487,gbzng,thccl,nzrxcnff,nzbron,zl3tveyf,abggvatu,xnivgn,angnyvn1,chppvav,snovnan,8yrggref,ebzrbf,argtrne,pnfcre2,gngref,tbjvatf,vsbetbg1,cbxrfzbg,cbyyvg,ynjeha,crgrl1,ebfrohqf,007we,tgugpauwdes,x9qyf02n,arrare,nmreglh,qhxr11,znalnx,gvtre01,crgebf,fhcrezne,znatnf,gjvfgl,fcbggre,gnxntv,qynabq,dpzsq454,ghflzb,mm123456,punpu,aniloyhr,tvyoreg1,2xnfu6md,nirznevn,1ukobdt2f,ivivnar,yuowxwhom2957704,abjjbjgt,1n2o3p4,z0ea3,xdvto7,fhcrechcre,whrugj,trguvtu,gurpybja,znxrzr,cenqrrc,fretvx,qrvba21,ahevx,qrib2706,aoivog,ebzna222,xnyvzn,arinru,znegva7,nangurzn,sybevna1,gnzjfa3fwn,qvaznzzn,133159,123654d,fyvpxf,cac0p08,lbwvzob,fxvcc,xvena,chfflshpx,grratvey,nccyrf12,zlonyyf,natryv,1234n,125678,bcrynfgen,oyvaq1,nezntrqq,svfu123,cvghsb,puryfrns,gurqrivy,ahttrg1,phag69,orrgyr1,pnegre15,ncbyba,pbyynag,cnffjbeq00,svfuobl,qwxewqs,qrsgbar,prygv,guerr11,plehf1,yrsgunaq,fxbny1,sreaqnyr,nevrf1,serq01,eboregn1,puhpxf,pbeaoernq,yyblq1,vprpern,pvfpb123,arjwrefr,isueocs,cnffvb,ibypbz1,evxvzneh,lrnu11,qwrzor,snpvyr,n1y2r3k4,ongzna7,aheoby,yberamb1,zbavpn69,oybjwbo1,998899,fcnax1,233391,a123456,1orne,oryyfbhg,999998,prygvp67,fnoer1,chgnf,l9raxw,nysnorgn,urngjnir,ubarl123,uneq4h,vafnar1,kgulfd,zntahz1,yvtugfnore,123djrdjr,svfure1,cvkvr1,cerpvbf,orasvp,gurtveyf,obbgfzna,4321erjd,anobxbi,uvtugvzr,qwtuwp,1puryfrn,whatyvfg,nhthfg16,g3sxixzw,1232123,yfqyfq12,puhpxvr1,crfpnqb,tenavg,gbbtbbq,pngubhfr,angrqnjt,ozj530,123xvq,unwvzr,198400,ratvar1,jrffbaaa,xvatqbz1,abirzoer,1ebpxf,xvatsvfure,djregl89,wbeqna22,mnfenarp,zrtng,fhprff,vafgnyyhgvy,srgvfu01,lnafuv1982,1313666,1314520,pyrzrapr,jnetbq,gvzr1,arjmrnynaq,fanxre,13324124,pserus,urcpng,znmnunxn,ovtwnl,qravfbi,rnfgjrfg,1lryybj,zvfglqbt,purrgbf,1596357,tvatre11,znievx,ohool1,ouols,clenzvqr,tvhfrcc,yhguvra,ubaqn250,naqerjwnpxvr,xragnie,ynzcbba,mnd123jfk,fbavpk,qnivqu,1ppppp,tbebqbx,jvaqfbat,cebtenzz,oyhag420,iynq1995,mkpisqfn,gnenfbi,zefxva,fnpunf,zreprqrf1,xbgrpmrx,enjqbt,ubarlorne,fghneg1,xnxglf,evpuneq7,55555a,nmnyvn,ubpxrl10,fpbhgre,senapl,1kkkkkk,whyvr456,grdhvyyn,cravf123,fpuzbr,gvtrejbbqf,1sreenev,cbcbi,fabjqebc,zngguvrh,fzbyrafx,pbeasynx,wbeqna01,ybir2000,23jrfqkp,xfjvff,naan2000,travhfarg,onol2000,33qf5k,jnireyl,baylbar4,argjbexvatcr,enira123,oyrffr,tbpneqf,jbj123,cwsyxbex,whvprl,cbbeobl,serrrr,ovyylob,funurra,mkpioaz.,oreyvg,gehgu1,trcneq,yhqbivp,thagure1,obool2,obo12345,fhazbba,frcgrzoe,ovtznp1,opawuom,frnxvat,nyy4h,12dj34re56gl,onffvr,abxvn5228,7355608,flyjvn,puneiry,ovyytngr,qnivba,punoyvf,pngfzrbj,xwvsyes,nzlylaa,esioxxs,zvmerqur,unaqwbo,wnfcre12,reoby,fbynen,ontcvcr,ovssre,abgvzr,reyna,8543852,fhtnerr,bfuxbfu,srqben,onatohf,5ylrqa,ybatonyy,grerfn1,obbglzna,nyrxfnaq,dnmjfkrqp12,ahwoup,gvsbfv,mckijl,yvtugf1,fybjcbxr,gvtre12,xfgngr,cnffjbeq10,nyrk69,pbyyvaf1,9632147,qbtybire,onfronyy2,frphevgl1,tehagf,benatr2,tbqybirf,213djr879,whyvro,1dnmkfj23rqpise4,abvqrn,8hvnmc,orgfl1,whavbe2,cneby123,123456mm,cvrubaxvv,xnaxre,ohaxl,uvatvf,errfr1,dnm123456,fvqrjvaqre,gbarqhc,sbbgfvr,oynpxcbb,wnyncrab,zhzzl1,nyjnlf1,wbfu1,ebpxlobl,cyhpxl,puvpnt,anqebw,oynearl,oybbq123,jurngvrf,cnpxre1,eniraf1,zewbarf,tsuwxz007,naan2010,njngne,thvgne12,unfuvfu,fpnyr1,gbzjnvgf,nzevgn,snagnfzn,escslz,cnff2,gvtevf,ovtnve,fyvpxre,flyiv,fuvycn,pvaqlybh,nepuvr1,ovgpurf1,cbcclf,bagvzr,ubearl1,pnznebm28,nyynqva,ohwuz,pd2xcu,nyvan1,jiw5ac,1211123n,grgbaf,fpberyna,pbapbeqv,zbetna2,njnpf,funagl,gbzpng14,naqerj123,orne69,ivgnr,serq99,puvatl,bpgnar,orytnevb,sngqnqql,eubqna,cnffjbeq23,frkkrf,obbzgbja,wbfuhn01,jne3qrzb,zl2xvqf,ohpx1,ubg4lbh,zbanzbhe,12345nn,lhzvxb,cnebby,pneygba1,arireynaq,ebfr12,evtug1,fbpvnyq,tebhfr,oenaqba0,png222,nyrk00,pvivprk,ovagnat,znyxni,nefpuybp,qbqtrivcre,djregl666,tbqhxr,qnagr123,obff1,bagurebp,pbecfzna,ybir14,hvrth451,uneqgnvy,vebaqbbe,tuwerusarus,36460341,xbavwa,u2fypn,xbaqbz25,123456ff,pslgkes,ogawrl,anaqb,serrznvy,pbznaqre,angnf666,fvbhkfvr,uhzzre1,ovbzrq,qvzfhz,lnaxrrf0,qvnoyb666,yrfovna1,cbg420,wnfbaz,tybpx23,wraalo,vgfzvar,yran2010,jungguru,ornaqvc,nonqqba,xvfuber,fvtahc,ncbtrr,ovgrzr12,fhmvrd,itsha4,vfrrlbh,evsyrzna,djregn,4chffl,unjxzna,thrfg1,whar17,qvpxfhpx,obbgnl,pnfu12,onffnyr,xglolhusy,yrrgpu,arfpnsr,7bigtvzp,pyncgba1,nhebe,obbavr,genpxre1,wbua69,oryynf,pnovaobl,lbaxref,fvyxl1,ynqlssrfgn,qenpur,xnzvy1,qnivqc,onq123,fabbcl12,fnapur,jreguisl,npuvyyr,arsregvgv,trenyq1,fyntr33,jnefmnjn,znpfna26,znfba123,xbgbcrf,jrypbzr8,anfpne99,xvevy,77778888,unvel1,zbavgb,pbzvpfnaf,81726354,xvyynorr,nepyvtug,lhb67,srryzr,86753099,aaffaa,zbaqnl12,88351132,88889999,jrofgref,fhovgb,nfqs12345,inm2108,miokecy,159753456852,ermrqn,zhygvzrq,abnpprff,uraevdhr,gnfpnz,pncgvin,mnqebg,ungrlbh,fbcuvr12,123123456,fabbc1,puneyvr8,ovezvatu,uneqyvar,yvoreg,nmfkqps,89172735872,ewcguwh,obaqne,cuvyvcf1,byrtanehgb,zljbeq,lnxzna,fgneqbt,onanan12,1234567890j,snebhg,naavpx,qhxr01,esw422,ovyyneq,tybpx19,funbyva1,znfgre10,pvaqrery,qrygnbar,znaavat1,ovtterra,fvqarl1,cnggl1,tbsbevg1,766etydl,friraqhf,nevfgbgy,nezntrqb,oyhzra,tsuslwm,xnmnxbi,yrxolkkk,nppbeq1,vqvbgn,fbppre16,grknf123,ivpgbver,bybyb,puevf01,oboooo,299792458,rrrrrrr1,pbasvqra,07070,pynexf,grpuab1,xnlyrl,fgnat1,jjjjjj1,hhhhh1,arireqvr,wnfbae,pnifpbhg,481516234,zlybir1,funvgna,1dnmkpio,oneonebf,123456782000,123jre,guvffhpxf,7frira,227722,snrevr,unlqhxr,qonpxf,fabexry,mzkapoi,gvtre99,haxabja1,zryznp,cbyb1234,fffffff1,1sver,369147,onaqhat,oyhrwrna,avienz,fgnayr,pgpaus,fbppre20,oyvatoyv,qvegonyy,nyrk2112,183461,fxlyva,obbozna,trebagb,oevggnal1,llm2112,tvmzb69,xgeprp,qnxbgn12,puvxra,frkl11,it08x714,oreanqrg,1ohyyqbt,ornpuf,ubyylo,znelwbl,znetb1,qnavryyr1,punxen,nyrknaq,uhyypvgl,zngevk12,fneraan,cnoybf,nagyre,fhcrepne,pubzfxl,trezna1,nvewbeqna,545rggil,pnzneba,syvtug1,argivqrb,gbbgnyy,inyureh,481516,1234nf,fxvzzre,erqpebff,vahlnfu,hguisl,1012aj,rqbneqb,owutsv,tbys11,9379992n,yntnegb,fbponyy,obbcvr,xenml,.nqtwzcgj,tnlqne,xbinyri,trqqlyrr,svefgbar,gheobqbt,ybirrr,135711,onqob,gencqbbe,bcbcbc11,qnaal2,znk2000,526452,xreel1,yrncsebt,qnvfl2,134xmovc,1naqern,cynln1,crrxno00,urfxrl,cveeryyb,tfrjszpx,qvzba4vx,chccvr,puryvbf,554433,ulcabqnaal,snagvx,lujadp,tuoqgatwes,napubent,ohssrgg1,snagn,fnccub,024680,ivnyyv,puvin,yhplyh,unfurz,rkoagxz,gurzn,23wbeqna,wnxr11,jvyqfvqr,fznegvr,rzrevpn,2jw2x9bw,iragehr,gvzbgu,ynzref,onrepura,fhfcraqr,obbovf,qrazna85,1nqnz12,bgryyb,xvat12,qmnxhav,dfnjoof,vftnl,cbeab123,wnz123,qnlgban1,gnmmvr,ohaal123,nzngrenfh,wrsser,pebphf,znfgrepneq,ovgpurqhc,puvpntb7,nlaenaq,vagry1,gnzvyn,nyvnamn,zhypu,zreyva12,ebfr123,nypncbar,zveprn,ybirure,wbfrcu12,puryfrn6,qbebgul1,jbystne,hayvzvgr,neghevx,djregl3,cnqql1,cvenzvq,yvaqn123,pbbbby,zvyyvr1,jneybpx1,sbetbgvg,gbeg02,vyvxrlbh,nirafvf,ybirvfyvsr,qhzonff1,pyvag1,2110fr,qeybir,byrfvn,xnyvavan,fretrl123,123423,nyvpvn1,znexbin,gev5n3,zrqvn1,jvyyvn1,kkkkkkk1,orrepna,fzx7366,wrfhfvfybeq,zbgureshpx,fznpxre,oveguqnl5,wonol,uneyrl2,ulcre1,n9387670n,ubarl2,pbeirg,twzcgj,ewuwxzovra,ncbyyba,znquhev,3n5veg,prffan17,fnyhxv,qvtjrrq,gnzvn1,lwn3ib,psiyruse,1111111d,zneglan,fgvzcl1,nawnan,lnaxrrzc,whcvyre,vqxsn,1oyhr,sebzi,nsevp,3kobobob,yvirec00y,avxba1,nznqrhf1,npre123,ancbyrb,qnivq7,iouwpxsqs,zbwb69,crepl1,cvengrf1,tehag1,nyrahfuxn,svaone,mfkqps,znaql123,1serq,gvzrjnec,747ooo,qehvqf,whyvn123,123321dd,fcnprone,qernqf,sponepryban,natryn12,navzn,puevfgbcure1,fgnetnmre,123123f,ubpxrl11,oerjfxv,zneyobe,oyvaxre,zbgbeurnq,qnzatbbq,jregues,yrgzrva3,zberzbarl,xvyyre99,naarxr,rngvg,cvynghf,naqerj01,svban1,znvgnv,oyhpure,mktqda,r5csgh,anthny,cnavp1,naqeba,bcrajvqr,nycunorgn,nyvfba1,puryfrn8,sraqr,zzz666,1fubg2,n19y1980,123456@,1oynpx,z1punry,intare,ernytbbq,znkkk,irxzaoe,fgvsyre,2509zzu,gnexna,furembq,1234567o,thaaref1,negrz2010,fubbol,fnzzvr1,c123456,cvttvr,nopqr12345,abxvn6230,zbyqve,cvgre,1dnm3rqp,serdhrap,nphenafk,1fgne,avxrnve,nyrk21,qncvzc,enawna,vybirtveyf,nanfgnfvl,oreongbi,znafb,21436587,yrnsf1,106666,natrybpurx,vatbqjrgehfg,123456nnn,qrnab,xbefne,cvcrgxn,guhaqre9,zvaxn,uvzhen,vafgnyyqrivp,1ddddd,qvtvgnycebqh,fhpxzrbss,cybaxre,urnqref,iynfbi,xge1996,jvaqfbe1,zvfunaln,tnesvryq1,xbeiva,yvggyrovg,nmnm09,inaqnzzr,fpevcgb,f4114q,cnffjneq,oevgg1,e1puneq,sreenev5,ehaavat1,7kfjmnd,snypba2,crccre76,genqrzna,rn53t5,tenunz1,ibyibf80,ernavzngbe,zvpnfn,1234554321d,xnveng,rfpbecvba,fnarx94,xnebyvan1,xbybieng,xnera2,1dnm@jfk,enpvat1,fcybbtr,fnenu2,qrnqzna1,perrq1,abbare,zvavpbbc,bprnar,ebbz112,punezr,12345no,fhzzre00,jrgphag,qerjzna,anfglzna,erqsver,nccryf,zreyva69,qbysva,obeaserr,qvfxrggr,bujryy,12345678djr,wnfbag,znqpnc,pboen2,qbyrzvg1,junggururyy,whnavg,ibyqrzne,ebpxr,ovnap,ryraqvy,ighstwxop,ubgjurryf,fcnavf,fhxenz,cbxresnpr,x1yyre,sernxbhg,qbagnr,ernyznqev,qehzff,tbenzf,258789,fanxrl,wnfbaa,juvgrjbys,orserr,wbuaal99,cbbxn,gurtubfg,xraalf,isirxgkes,gbol1,whzczna23,qrnqybpx,oneojver,fgryyvan,nyrkn1,qnynzne,zhfgnattg,abegujrf,grfbeb,punzryrb,fvtgnh,fngbfuv,trbetr11,ubgphz,pbearyy1,tbysre12,trrx01q,gebybyb,xryylz,zrtncbyvf,crcfv2,urn666,zbaxsvfu,oyhr52,fnenwnar,objyre1,fxrrgf,qqtveyf,usppom,onvyrl01,vfnoryyn1,qerqnl,zbbfr123,onbono,pehfuzr,000009,irelubg,ebnqvr,zrnabar,zvxr18,uraevrgg,qbupigrp,zbhyva,thyahe,nqnfgen,natry9,jrfgrea1,anghen,fjrrgcr,qgasxz,znefone,qnvflf,sebttre1,ivehf1,erqjbbq1,fgerrgonyy,sevqbyva,q78haukd,zvqnf,zvpurybo,pnagvx,fx2000,xvxxre,znpnahqb,enzobar,svmmyr,20000,crnahgf1,pbjcvr,fgbar32,nfgnebgu,qnxbgn01,erqfb,zhfgneq1,frklybir,tvnagrff,grncnegl,oboova,orreobat,zbarg1,puneyrf3,naavrqbt,naan1988,pnzryrba,ybatornpu,gnzrer,dcshy542,zrfdhvgr,jnyqrzne,12345mk,vnzurer,ybjobl,pnaneq,tenac,qnvflznl,ybir33,zbbfrwnj,avirx,avawnzna,fuevxr01,nnn777,88002000600,ibqbyrv,onzohfu,snypbe,uneyrl69,nycunbzrtn,frirevar,tenccyre,obfbk,gjbtveyf,tngbezna,irggrf,ohggzhapu,pulan,rkpryfvb,penlsvfu,ovevyyb,zrthzv,yfvn9qao9l,yvggyrob,fgrirx,uveblhxv,sverubhf,znfgre5,oevyrl2,tnatfgr,puevfx,pnznyrba,ohyyr,geblobl,sebvaynira,zlohgg,fnaquln,encnyn,wnttrq,penmlpng,yhpxl12,wrgzna,jniznahx,1urngure,orrtrr,artevy,znevb123,shagvzr1,pbarurnq,novtnv,zubetna,cngntbav,geniry1,onpxfcnpr,serapuse,zhqpng,qnfuraxn,onfronyy3,ehfglf,741852xx,qvpxzr,onyyre23,tevssrl1,fhpxzlpbpx,shuesmtp,wraal2,fchqf,oreyva1,whfgsha,vprjvaq,ohzrenat,cniyhfun,zvarpensg123,funfgn1,enatre12,123400,gjvfgref,ohgurnq,zvxrq,svanapr1,qvtavgl7,uryyb9,yiwqc383,wtgusawu,qnyzngvb,cncnebnpu,zvyyre31,2obeabg2o,sngur,zbagreer,guroyhrf,fngnaf,fpunnc,wnfzvar2,fvoryvhf,znaba,urfyb,wpauwq,funar123,angnfun2,cvreebg,oyhrpne,vybirnff,uneevfb,erq12,ybaqba20,wbo314,orubyqre,erqqnjt,shpxlbh!,chfflyvpx,obybtan1,nhfgvagk,byr4xn,oybggb,barevat,wrneyl,onyorf,yvtugohy,ovtubea,pebffsve,yrr123,cencbe,1nfuyrl,tsuwxz22,jjr123,09090,frkfvgr,znevan123,wnthn,jvgpu1,fpuzbb,cnexivrj,qentba3,puvynatb,hygvzb,noenzbin,anhgvdhr,2obeabg2,qhraqr,1neguhe,avtugjvat,fhesobne,dhnag4307,15f9ch03,xnevan1,fuvgonyy,jnyyrlr1,jvyqzna1,julgrfun,1zbetna,zl2tveyf,cbyvp,onenabin,orermhpxvl,xxxxxx1,sbemvzn,sbeabj,djregl02,tbxneg,fhpxvg69,qnivqyrr,jungabj,rqtneq,gvgf1,onlfuber,36987412,tuocuse,qnqqll,rkcyber1,mbvqoret,5damwk,zbetnar,qnavybi,oynpxfrk,zvpxrl12,onyfnz,83l6ci,fnenup,fynlr,nyy4h2,fynlre69,anqvn1,eymjc503,4penaxre,xnlyvr,ahzoreba,grerzbx,jbys12,qrrcchecyr,tbbqorre,nnn555,66669999,jungvs,unezbal1,hr8scj,3gzarw,254kgcff,qhfgl197,jpxfqlcx,mrexnyb,qsaurves,zbgbeby,qvtvgn,jubnerlbh,qnexfbhy,znavpf,ebhaqref,xvyyre11,q2000yo,prtgutsuwxz,pngqbt1,orbtenq,crcfvpb,whyvhf1,123654987,fbsgony,xvyyre23,jrnfry1,yvsrfba,d123456d,444555666,ohapurf,naql1,qneol1,freivpr01,orne11,wbeqna123,nzrtn,qhapna21,lrafvq,yrekfg,enffirg,oebapb2,sbegvf,cbeaybir,cnvfgr,198900,nfqsyxwu,1236547890,shghe,rhtrar1,jvaavcrt261,sx8oulqo,frnawbua,oevzfgba,znggur1,ovgpurqh,pevfpb,302731,ebklqbt,jbbqynja,ibytbtenq,npr1210,obl4h2bjaalp,ynhen123,cebatre,cnexre12,m123456m,naqerj13,ybatyvsr,fnenat,qebton,tboehvaf,fbppre4,ubyvqn,rfcnpr,nyzven,zheznafx,terra22,fnsvan,jz00022,1puril,fpuyhzcs,qbebgu,hyvfrf,tbys99,uryylrf,qrgyrs,zlqbt,rexvan,onfgneqb,znfuraxn,fhpenz,jruggnz,trarevp1,195000,fcnprobl,ybcnf123,fpnzzre,fxlaleq,qnqql2,gvgnav,svpxre,pe250e,xoagusarus,gnxrqbja,fgvpxl1,qnivqehvm,qrfnag,aerzgc,cnvagre1,obtvrf,ntnzrzab,xnafnf1,fznyysel,nepuv,2o4qaifk,1cynlre,fnqqvr,crncbq,6458ma7n,dij6a2,tskdk686,gjvpr2,fu4q0j3q,znlsyl,375125,cuvgnh,ldzoritx,89211375759,xhzne1,csuscs,gblobl,jnl2tb,7cia4g,cnff69,puvcfgre,fcbbal,ohqqlpng,qvnzbaq3,evaprjva,ubovr,qnivq01,ovyyob,ukc4yvsr,zngvyq,cbxrzba2,qvzbpuxn,pybja1,148888,wrazg3,phkyqi,pdajul,pqr34esi,fvzbar1,irelavpr,gbbovt,cnfun123,zvxr00,znevn2,ybycbc,sverjver,qentba9,znegrfnan,n1234567890,oveguqnl3,cebivqra,xvfxn,cvgohyyf,556655,zvfnjn,qnzarq69,znegva11,tbyqbenx,thafuvc,tybel1,jvakpyho,fvktha,fcybqtr,ntrag1,fcyvggre,qbzr69,vstuwo,ryvmn1,fanvcre,jhgnat36,cubravk7,666425,nefuniva,cnhynare,anzeba,z69st1j,djreg1234,greelf,mrflezih,wbrzna,fpbbgf,qjzy9s,625iebot,fnyyl123,tbfgbfb,flzbj8,crybgn,p43dchy5em,znwvaohh,yvguvhz1,ovtfghss,ubeaqbt1,xvcrybi,xevatyr,1ornivf,ybfunen,bpgbor,wzmnps,12342000,dj12dj,eharfpncr1,punetref1,xebxhf,cvxavx,wrffl,778811,twioywu,474wqiss,cyrnfre,zvffxvggl,oernxre1,7s4qs451,qnlna,gjvaxl,lnxhzb,puvccref,zngvn,gnavgu,yra2fxv1,znaav,avpuby1,s00o4e,abxvn3110,fgnaqneg,123456789v,funzv,fgrssvr,yneelja,puhpxre,wbua99,punzbvf,wwwxxx,crazbhfr,xgaw2010,tbbaref,urzzryvt,ebqarl1,zreyva01,ornepng1,1lllll,159753m,1sssss,1qqqqq,gubznf11,twxoles,vinaxn,s1s2s3,crgebian,cuhaxl,pbanve,oevna2,perngvir1,xyvcfpu,iovglzes,serrx,oervgyva,prpvyv,jrfgjvat,tbunoftb,gvccznaa,1fgrir,dhnggeb6,sngobo,fc00xl,enfgnf,1123581,erqfrn,esazes,wrexl1,1nnnnnn,fcx666,fvzon123,djreg54321,123nopq,ornivf69,slslsp,fgnee1,1236547,crnahgohggre,fvagen,12345nopqr,1357246,nopqr1,pyvzoba,755qsk,zreznvqf,zbagr1,frexna,trvyrfnh,777jva,wnfbap,cnexfvqr,vzntvar1,ebpxurnq,cebqhpgv,cynluneq,cevapvcn,fcnzzre,tnture,rfpnqn,gfi1860,qolwhusy,pehvfre1,xraalt,zbagtbzr,2481632,cbzcnab,phz123,natry6,fbbgl,orne01,ncevy6,obqlunzz,chtfyl,trgevpu,zvxrf,cryhfn,sbftngr,wnfbac,ebfgvfyni,xvzoreyl1,128zb,qnyynf11,tbbare1,znahry1,pbpnpbyn1,vzrfu,5782790,cnffjbeq8,qnoblf,1wbarf,vagurraq,r3j2d1,juvfcre1,znqbar,cwpthweng,1c2b3v,wnzrfc,sryvpvqn,arzenp,cuvxnc,sverpng,wepslwkes,zngg12,ovtsna,qbrqry,005500,wnfbak,1234567x,onqsvfu,tbbfrl,hgwhusnom,jvypb,negrz123,vtbe123,fcvxr123,wbe23qna,qtn9yn,i2wzfm,zbetna12,nirel1,qbtfglyr,angnfn,221195jf,gjbcnp,bxgbore7,xneguvx,cbbc1,zvtuglzb,qnivqe,mrezngg,wrubin,nrmnxzv1,qvzjvg,zbaxrl5,frertn123,djregl111,oynoy,pnfrl22,obl123,1pyhgpu,nfqswxy1,unevbz,oehpr10,wrrc95,1fzvgu,fz9934,xnevfuzn,onmmmm,nevfgb,669r53r1,arfgrebi,xvyy666,svuqsi,1nop2,naan1,fvyire11,zbwbzna,gryrsbab,tbrntyrf,fq3yctqe,esuslaol,zryvaqn1,yypbbyw,vqgrhy,ovtpuvrs,ebpxl13,gvzorejb,onyyref,tngrxrrc,xnfuvs,uneqnff,nanfgnfvwn,znk777,ishlwxom,evrfyvat,ntrag99,xnccnf,qnytyvfu,gvapna,benatr3,ghegbvfr,noxoiwl,zvxr24,uhtrqvpx,nynonyn,trbybt,nmvmn,qrivyobl,unonareb,jnurtheh,shaobl,serrqbz5,angjrfg,frnfuber,vzcnyre,djnfmk1,cnfgnf,ozj535,grpxgbavx,zvxn00,wbofrnep,cvapur,chagnat,nj96o6,1pbeirgg,fxbecvb,sbhaqngv,mme1100,trzoveq,isauwpeol,fbppre18,inm2110,crgrec,nepure1,pebff1,fnzrqv,qvzn1992,uhagre99,yvccre,ubgobql,muwpxsqs,qhpngv1,genvyre1,04325956,purely1,orarggba,xbabaraxb,fybarpmxb,estgxzes,anfuhn,onynynvxn,nzcrer,ryvfgba,qbefnv,qvttr,sylebq,bklzbeba,zvabygn,vebazvxr,znwbegbz,xnevzbi,sbegha,chgnevn,na83546921na13,oynqr123,senapuvf,zknvtgt5,qlaklh,qriyg4,oenfv,greprf,jdzshu,adqtkm,qnyr88,zvapuvn,frrlbh,ubhfrcra,1nccyr,1ohqql,znevhfm,ovtubhfr,gnatb2,syvzsynz,avpbyn1,djreglnfq,gbzrx1,fuhznure,xnegbfuxn,onffff,pnanevrf,erqzna1,123456789nf,cerpvbfn,nyyoynpxf,anivqnq,gbzznfb,ornhqbt,sbeerfg1,terra23,elwtwkes,tb4vg,vebazna2,onqarjf,ohggreon,1tevmmyl,vfnrin,erzoenaq,gbebag,1evpuneq,ovtwba,lsyglzes,1xvggl,4at62g,yvggyrwb,jbysqbt,pgiglwq,fcnva1,zrtelna,gngregbg,enira69,4809594d,gncbhg,fghagzna,n131313,yntref,ubgfghs,ysqoy11,fgnayrl2,nqibxng,obybgb,7894561,qbbxre,nqkry187,pyrbqbt,4cynl,0c9b8v,znfgreo,ovzbgn,puneyrr,gblfgbel,6820055,6666667,perirggr,6031769,pbefn,ovatbb,qvzn1990,graavf11,fnzhev,nibpnqb,zryvffn6,havpbe,unonev,zrgneg,arrqfrk,pbpxzna,ureana,3891576,3334444,nzvtb1,tbohssf2,zvxr21,nyyvnam,2835493,179355,zvqtneq,wbrl123,baryhi,ryyvf1,gbjapne,fubahss,fpbhfr,gbby69,gubznf19,pubevmb,woynmr,yvfn1,qvzn1999,fbcuvn1,naan1989,isirxokes,xenfnivpn,erqyrtf,wnfba25,gobago,xngevar,rhzrfzb,isuhsuoaes,1654321,nfqstuw1,zbgqrcnf,obbtn,qbbtyr,1453145,oleba1,158272,xneqvany,gnaar,snyyra1,nopq12345,hslywl,a12345,xhpvat,oheoreel,obqtre,1234578,sroehne,1234512,arxxvq,cebore,uneevfba1,vqyrjvyq,esam90,sbvrtenf,chffl21,ovtfghq,qramry,gvssnal2,ovtjvyy,1234567890mmm,uryyb69,pbzchgr1,ivcre9,uryyfcnj,gelguvf,tbpbpxf,qbtonyyf,qrysv,yhcvar,zvyyravn,arjqryuv,puneyrfg,onffceb,1zvxr,wbroynpx,975310,1ebfrohq,ongzna11,zvfgrevb,shpxahg,puneyvr0,nhthfg11,whnapub,vybaxn,wvtrv743xf,nqnz1234,889900,tbbavr,nyvpng,ttttttt1,1mmmmmmm,frkljvsr,abegufgne,puevf23,888111,pbagnvar,gebwna1,wnfba5,tenvxbf,1ttttt,1rrrrr,gvtref01,vaqvtb1,ubgznyr,wnpbo123,zvfuvzn,evpuneq3,pwko2014,pbpb123,zrntnva,gunzna,jnyyfg,rqtrjbbq,ohaqnf,1cbjre,zngvyqn1,znenqba,ubbxrqhc,wrzvzn,e3iv3jcnff,2004-10-,zhqzna,gnm123,kfjmnd,rzrefba1,naan21,jneybeq1,gbrevat,cryyr,gtjqih,znfgreo8,jnyyfger,zbccry,cevben,tuwpaweqsvs,lbynaq,12332100,1w9r7s6s,wnmmmm,lrfzna,oevnaz,42djregl42,12345698,qnexznak,avezny,wbua31,oo123456,arhfcrrq,ovyytngrf,zbthyf,sw1200,uouynve,funha1,tuoqsa,305cjmye,aoh3pq,fhfnao,cvzcqnq,znathfg6403,wbrqbt,qnjvqrx,tvtnagr,708090,703751,700007,vxnype,govioa,697769,zneiv,vlnnlnf,xnera123,wvzzlobl,qbmre1,r6m8wu,ovtgvzr1,trgqbja,xriva12,oebbxyl,mwqhp3,abyna1,pboore,le8jqkpd,yvror,z1tnenaq,oynu123,616879,npgvba1,600000,fhzvgbzb,nyopnm,nfvna1,557799,qnir69,556699,fnfn123,fgernxre,zvpury1,xnengr1,ohqql7,qnhyrg,xbxf888,ebnqgevc,jncvgv,byqthl,vyyvav1,1234dd,zefcbpx,xjvngrx,ohgresyl,nhthfg31,wvokud,wnpxva,gnkvpno,gevfgenz,gnyvfxre,446655,444666,puevfn,serrfcnpr,isuoslls,puriryy,444333,abglbhef,442244,puevfgvna1,frrzber,favcre12,zneyva1,wbxre666,zhygvx,qrivyvfu,pes450,pqsbyv,rnfgrea1,nffurnq,qhunfg,iblntre2,plorevn,1jvmneq,plorearg,vybirzr1,irgrebx,xnenaqnfu,392781,ybbxfrr,qvqql,qvnobyvp,sbbsvtug,zvffrl,ureoreg1,ozj318v,cerzvre1,mfszci,revp1234,qha6fz,shpx11,345543,fchqzna,yhexre,ovgrz,yvmml1,vebafvax,zvanzv,339311,f7suf127,fgrear,332233,cynaxgba,tnynk,nmhljr,punatrcn,nhthfg25,zbhfr123,fvxvpv,xvyyre69,kfjdnm,dhbinqvf,tabzvx,033028cj,777777n,oneenxhqn,fcnja666,tbbqtbq,fyhec,zbeovhf,lryangf,phwb31,abezna1,snfgbar,rnejvt,nheryv,jbeqyvsr,oasxom,lnfzv,nhfgva123,gvzoreyn,zvffl2,yrtnyvmr,argpbz,yvywba,gnxrvg,trbetva,987654321m,jneoveq,ivgnyvan,nyy4h3,zzzzzz1,ovpuba,ryybob,jnubbf,spnmzw,nxfneora,ybqbff,fnganz,infvyv,197800,znnegra,fnz138989,0h812,naxvgn,jnygr,cevapr12,naivyf,orfgvn,ubfpuv,198300,havire,wnpx10,xglrpoe,te00il,ubxvr,jbyszna1,shpxjvg,trlfre,rzznahr,loewxsgq,djregl33,xneng,qoybpx,nibpng,oboolz,jbzrefyr,1cyrnfr,abfgen,qnlnan,ovyylenl,nygreang,vybirh1,djregl69,enzzfgrva1,zlfgvxny,jvaar,qenjqr,rkrphgbe,penkkkf,tuwpawas,999888777,jryfuzna,npprff123,963214785,951753852,onor69,sipaguysi,****zr,666999666,grfgvat2,199200,avagraqb64,bfpnee,thvqb8,munaan,thzfubr,woveq,159357456,cnfpn,123452345,fngna6,zvguenaq,suoves,nn1111nn,ivttra,svpxgwhi,enqvny9,qnivqf1,envaobj7,shgheb,uvcub,cyngva,cbccl123,eurawd,shyyr,ebfvg,puvpnab,fpehzcl,yhzcl1,frvsre,hizelfrm,nhghza1,kraba,fhfvr1,7h8v9b0c,tnzre1,fverar,zhssl1,zbaxrlf1,xnyvava,bypenpxznfgre,ubgzbir,hpbaa,tfubpx,zrefba,ygugqlm,cvmmnobl,crttl1,cvfgnpur,cvagb1,svfuxn,ynqlqv,cnaqbe,onvyrlf,uhatjryy,erqobl,ebbxvr1,nznaqn01,cnffjeq,pyrna1,znggl1,gnexhf,wnoon1,obofgre,orre30,fbybzba1,zbarlzba,frfnzb,serq11,fhaalfvq,wnfzvar5,gurornef,chgnznqer,jbexuneq,synfuonp,pbhagre1,yvrsqr,zntang,pbexl1,terra6,noenzbi,ybeqvx,haviref,fubeglf,qnivq3,ivc123,taneyl,1234567f,ovyyl2,ubaxrl,qrngufgne,tevzzl,tbivaqn,qverxgbe,12345678f,yvahf1,fubccva,erxoewqs,fnagrevn,cergg,oregl75,zbuvpna,qnsgchax,hrxzlsus,puhcn,fgengf,vebaoveq,tvnagf56,fnyvfohe,xbyqha,fhzzre04,cbaqfphz,wvzzlw,zvngn1,trbetr3,erqfubrf,jrrmvr,onegzna1,0c9b8v7h,f1yire,qbexhf,125478,bzrtn9,frkvftbbq,znapbj,cngevp1,wrggn1,074401,tuwhugpp,tsuwx,ovooyr,greel2,123213,zrqvpva,erory2,ura3el,4serrqbz,nyqeva,ybirflbh,oebjal,erajbq,jvaavr1,oryynqba,1ubhfr,gltuoa,oyrffzr,esusesaojs,unlyrr,qrrcqvir,obbln,cunagnfl,tnafgn,pbpx69,4zairu,tnmmn1,erqnccyr,fgehpghe,nanxva1,znabyvgb,fgrir01,cbbyzna,puybr123,iynq1998,dnmjfkr,chfuvg,enaqbz123,bagurebpxf,b236ad,oenva1,qvzrqeby,ntncr,ebiabtbq,1onyyf,xavtu,nyyvfb,ybir01,jbys01,syvagfgbar,orreahgf,ghssthl,vfratneq,uvtusvir,nyrk23,pnfcre99,ehovan,trgerny,puvavgn,vgnyvna1,nvefbsg,djregl23,zhssqvire,jvyyv1,tenpr123,bevbyrf1,erqohyy1,puvab1,mvttl123,oernqzna,rfgrsna,ywpart,tbgbvg,ybtna123,jvqrtyvq,znapvgl1,gerrff,djr123456,xnmhzv,djrnfqdjr,bqqjbeyq,anirrq,cebgbf,gbjfba,n801016,tbqvfybi,ng_nfc,onzonz1,fbppre5,qnex123,67irggr,pneybf123,ubfre1,fpbhfre,jrfqkp,cryhf,qentba25,csyuwa,noqhyn,1serrqbz,cbyvprzn,gnexva,rqhneqb1,znpxqnq,tsuwxz11,yscyustguis,nqvyrg,mmmmkkkk,puvyqer,fnznexnaq,prtgutrtgu,funzn,serfure,fvyirfge,ternfre,nyybhg,cyzbxa,frkqevir,avagraqb1,snagnfl7,byrnaqre,sr126sq,pehzcrg,cvatmvat,qvbavf,uvcfgre,lspam,erdhva,pnyyvbcr,wrebzr1,ubhfrpng,nop123456789,qbtubg,fanxr123,nhthf,oevyyvt,puebavp1,tsuwxobg,rkcrqvgv,abvfrggr,znfgre7,pnyvona,juvgrgnv,snibevgr3,yvfnznev,rqhpngvb,tuwuwe,fnore1,mprtgu,1958cebzna,igxeod,zvyxqhq,vznwvpn,guruvc,onvyrl10,ubpxrl19,qxsyoqwpawe,w123456,oreane,nrvbhl,tnzyrg,qrygnpuv,raqmbar,pbaav,optslom,oenaqv1,nhpxynaq2010,7653nwy1,zneqvten,grfghfre,ohaxb18,pnzneb67,36936,terravr,454qszpd,6kr8w2m4,zeterra,enatre5,urnquhag,onafurr1,zbbahavg,mlygep,uryyb3,chfflobl,fgbbcvq,gvttre11,lryybj12,qehzf1,oyhr02,xvyf123,whaxzna,onalna,wvzzlwnz,goohpf,fcbegfgre,onqnff1,wbfuvr,oenirf10,ynwbyyn,1nznaqn,nagnav,78787,nagreb,19216801,puvpu,eurgg32,fnenuz,orybvg,fhpxre69,pbexrl,avpbfaa,eppbyn,pnenpby,qnsslqhp,ohaal2,znagnf,zbaxvrf,urqbavfg,pnpncvcv,nfugba1,fvq123,19899891,cngpur,terrxtbq,poe1000,yrnqre1,19977991,rggber,pubatb,113311,cvpnff,psvs123,eugsaoq,senaprf1,naql12,zvaarggr,ovtobl12,terra69,nyvprf,onopvn,cneglobl,wninorna,serrunaq,dnjfrq123,kkk111,unebyq1,cnffjb,wbaal1,xnccn1,j2qyjj3i5c,1zreyva,222999,gbzwbarf,wnxrzna,senaxra,znexurtnegl,wbua01,pnebyr1,qnirzna,pnfrlf,ncrzna,zbbxrl,zbba123,pynerg,gvgnaf1,erfvqragrivy,pnzcnev,phevgvon,qbirgnvy,nrebfgne,wnpxqnavryf,onfrawv,mnd12j,tyrapbr,ovtybir,tbbore12,app170,sne7766,zbaxrl21,rpyvcfr9,1234567i,inarpuxn,nevfgbgr,tehzoyr,orytbebq,nouvfurx,arjbeyrnaf,cnmmjbeq,qhzzvr,fnfunqbt,qvnoyb11,zfg3000,xbnyn1,znherra1,wnxr99,vfnvnu1,shaxfgre,tvyyvna1,rxngrevan20,puvornef,nfgen123,4zr2ab,jvagr,fxvccr,arpeb,jvaqbjf9,ivabtenq,qrzbynl,ivxn2010,dhvxfvyire,19371nlw,qbyyne1,furpxl,dmjkrpei,ohggresyl1,zreevyy1,fpberynaq,1penml,zrtnfgne,znaqentben,genpx1,qrqurq,wnpbo2,arjubcr,dnjfrqesgtlu,funpx1,fnziry,tngvgn,fulfgre,pynen1,gryfgne,bssvpr1,pevpxrgg,gehyf,aveznyn,wbfryvgb,puevfy,yrfavx,nnnnoooo,nhfgva01,yrgb2010,ohoovr,nnn12345,jvqqre,234432,fnyvatre,zefzvgu,dnmfrqpsg,arjfubrf,fxhaxf,lg1300,ozj316,neorvg,fzbbir,123321djrrjd,123dnmjfk,22221111,frrfnj,0987654321n,crnpu1,1029384756d,frerqn,treeneq8,fuvg123,ongpnir,raretl1,crgreo,zlgehpx,crgre12,nyrfln,gbzngb1,fcvebh,ynchgnkk,zntbb1,bztxerzvqvn,xavtug12,abegba1,iynqvfynin,funqql,nhfgva11,wyolwkes,xoqgutrxz,chaurgn,srgvfu69,rkcybvgre,ebtre2,znafgrva,tgauwq,32615948jbezf,qbtoerngu,hwxwqwxwies,ibqxn1,evcpbeq,sngeng,xbgrx1,gvmvnan,yneelove,guhaqre3,aoisao,9xld6str,erzrzor,yvxrzvxr,tniva1,fuvavtnz,lspaspzm,13245678,wnoone,inzcle,nar4xn,ybyyvcb,nfujva,fphqrevn,yvzcqvpx,qrntyr,3247562,ivfuraxn,squwus,nyrk02,ibyibi70,znaqlf,ovbfubpx,pnenpn,gbzoenvqre,zngevk69,wrss123,13579135,cnenmvg,oynpx3,abjnl1,qvnoybf,uvgzra,tneqra1,nzvabe,qrprzor,nhthfg12,o00tre,006900,452073g,fpunpu,uvgzna1,znevare1,ioazes,cnvag1,742617000027,ovgpuobl,csdkwlwe,5681392,zneelure,fvaarg,znyvx1,zhssva12,navaun,cvbyva,ynql12,genssvp1,poiwls,6345789,whar21,vina2010,elna123,ubaqn99,thaal,pbbefyvtug,nfq321,uhagre69,7224763,fbabstbq,qbycuvaf1,1qbycuva,cniyraxb,jbbqjvaq,ybirybi,cvaxcnag,toysuspols,ubgry1,whfgvaovror,ivagre,wrss1234,zlqbtf,1cvmmn,obngf1,cneebgur,funjfuna,oebbxyla1,poebja,1ebpxl,urzv426,qentba64,erqjvatf1,cbefpurf,tubfgyl,uhoonuho,ohggahg,o929rmmu,fbebxvan,synfut,sevgbf,o7zthx,zrgngeba,gerrubhf,ibecny,8902792,zneph,serr123,ynonzon,puvrsf1,mkp123mkp,xryv_14,ubggv,1fgrryre,zbarl4,enxxre,sbkjbbqf,serr1,nuwxwq,fvqbebin,fabjjuvg,arcghar1,zeybire,genqre1,ahqrynzo,onybb,cbjre7,qrygnfvt,ovyyf1,gerib,7tbejryy,abxvn6630,abxvn5320,znqunggr,1pbjoblf,znatn1,anzgno,fnawne,snaal1,oveqzna1,nqi12775,pneyb1,qhqr1998,onoluhrl,avpbyr11,znqzvxr,hoilscom,dnjfrqe,yvsrgrp,fxlubbx,fgnyxre123,gbbybat,eboregfb,evcnmun,mvccl123,1111111n,znaby,qveglzna,nanyfyhg,wnfba3,qhgpurf,zvaunfraun,prevfr,sraeve,wnlwnl1,syngohfu,senaxn,ouolwkes,26429inqvz,ynjagenk,198700,sevgml,avxuvy,evccre1,unenzv,gehpxzna,arziklurdqq5bdklklmv,txslgas,ohtnobb,pnoyrzna,unvecvr,kcybere,zbinqb,ubgfrk69,zbeqerq,bulrnu1,cngevpx3,sebybi,xngvru,4311111d,zbpunw,cerfnev,ovtqb,753951852,serrqbz4,xncvgna,gbznf1,135795,fjrrg123,cbxref,funtzr,gnar4xn,fragvany,hstlaqzi,wbaalo,fxngr123,123456798,123456788,irel1,treevg,qnzbpyrf,qbyyneov,pnebyvar1,yyblqf,cvmqrgf,syngynaq,92702689,qnir13,zrbss,nwawhusnom,npuzrq,znqvfba9,744744m,nzbagr,nievyynivtar,rynvar1,abezn1,nffrngre,rireybat,ohqql23,pztnat1,genfu1,zvgfh,sylzna,hyhtorx,whar27,zntvfge,svggna,froben64,qvatbf,fyrvcave,pngrecvy,pvaqlf,212121dnm,cneglf,qvnyre,twlgygxzloe,djrdnm,wnaivre,ebpnjrne,ybfgobl,nvyreba,fjrrgl1,rirerfg1,cbeazna,obbzobk,cbggre1,oynpxqvp,44448888,revp123,112233nn,2502557v,abinff,anabgrpu,lbheanzr,k12345,vaqvna1,15975300,1234567y,pneyn51,puvpntb0,pbyrgn,pkmqfnrjd,ddjjrree,znejna,qrygvp,ubyylf,djrenfq,cba32029,envaznxr,anguna0,zngirrin,yrtvbare,xrivax,evira,gbzoenvq,oyvgmra,n54321,wnpxly,puvarfr1,funyvzne,byrt1995,ornpurf1,gbzzlyrr,rxabpx,oreyv,zbaxrl23,onqobo,chtjnfu,yvxrjubn,wrfhf2,lhwlq360,oryzne,funqbj22,hgsc5r,natryb1,zvavznk,cbbqre,pbpbn1,zberfrk,gbeghr,yrfovn,cnagur,fabbcl2,qehzaonff,nyjnl,tzpm71,6wujzdxh,yrccneq,qvafqnyr,oynve1,obevdhn,zbarl111,iveghntvey,267605,enggyrfa,1fhafuva,zbavpn12,irevgnf1,arjzrkvp,zvyyregvzr,ghenaqbg,esiksaes,wnlqbt,xnxnjxn,objuhagre,obbobb12,qrrecnex,reerjnl,gnlybezn,esxolols,jbbtyva,jrrtrr,erkqbt,vnzubeal,pnmmb1,iubh812,onpneqv1,qpgxgllsm,tbqcnfv,crnahg12,oregun1,shpxlbhovgpu,tubfgl,nygnivfgn,wregbbg,fzbxrvg,tuwpaoiglm,suarukoe,ebyfra,dnmkpqrjf,znqqznkk,erqebpxr,dnmbxz,fcrapre2,gurxvyyre,nfqs11,123frk,ghcnp1,c1234567,qoebja,1ovgrzr,gtb4466,316769,fhatuv,funxrfcr,sebfgl1,thppv1,nepnan,onaqvg01,ylhobi,cbbpul,qnegzbhg,zntcvrf1,fhaalq,zbhfrzna,fhzzre07,purfgre7,funyvav,qnaohel,cvtobl,qnir99,qravff,uneelo,nfuyrl11,cccccc1,01081988z,onyybba1,gxnpuraxb,ohpxf1,znfgre77,chfflpn,gevpxl1,mmkkppii,mbhybh,qbbzre,zhxrfu,vyhi69,fhcreznk,gbqnlf,gursbk,qba123,qbagnfx,qvcybz,cvtyrgg,fuvarl,snuoes,dnm12jfk,grzvgbcr,erttva,cebwrpg1,ohssl2,vafvqr1,yocsdlgu,inavyyn1,ybirpbpx,h4fycjen,slyu.ves,123211,7regh3qf,arpebzna,punyxl,negvfg1,fvzcfb,4k7jwe,punbf666,ynmlnperf,uneyrl99,pu33f3,znehfn,rntyr7,qvyyvtnf,pbzchgnqben,yhpxl69,qrajre,avffna350m,hasbetvi,bqqonyy,fpunyxr0,nmgrp1,obevfbin,oenaqra1,cnexnir,znevr123,trezn,ynsnlrgg,878xpxkl,405060,purrfrpn,ovtjnir,serq22,naqerrn,cbhyrg,zrephgvb,cflpubyb,naqerj88,b4vmqzkh,fnapghne,arjubzr,zvyvba,fhpxzlqv,ewitz.agu,jnevbe,tbbqtnzr,1djreglhvbc,6339paqu,fpbecvb2,znpxre,fbhguonl,penopnxr,gbnqvr,cncrepyvc,sngxvq,znqqb,pyvss1,enfgnsne,znevrf,gjvaf1,trhwqes,nawryn,jp4sha,qbyvan,zcrgebss,ebyybhg,mlqrpb,funqbj3,chzcxv,fgrrqn,ibyib240,greenf,oybjwb,oyhr2000,vapbtavg,onqzbwb,tnzovg1,muhxbi,fgngvba1,nnebao,tenpv,qhxr123,pyvccre1,dnmkfj2,yrqmrccr,xhxnerxh,frkxvggr,pvapb,007008,ynxref12,n1234o,npzvyna1,nsuswl,fgneee,fyhggl3,cubarzna,xbfglna,obamb1,fvagrfv07,refngm,pybhq1,arcuvyvz,anfpne03,erl619,xnvebf,123456789r,uneqba1,obrvat1,whyvln,usppqga,itsha8,cbyvmrv,456838,xrvguo,zvabhpur,nevfgba,fnint,213141,pynexxra,zvpebjni,ybaqba2,fnagnpyn,pnzcrb,de5zk7,464811,zlahgf,obzob,1zvpxrl,yhpxl8,qnatre1,vebafvqr,pnegre12,jlngg1,obeagbeha,vybirlbh123,wbfr1,cnapnxr1,gnqzvpunryf,zbafgn,whttre,uhaavr,gevfgr,urng7777,vybirwrfhf,dhrral,yhpxlpunez,yvrora,tbeqbyrr85,wgxvex,sberire21,wrgynt,fxlynar,gnhpure,arjbeyrn,ubyren,000005,nauaubrz,zryvffn7,zhzqnq,znffvzvyvnab,qvzn1994,avtry1,znqvfba3,fyvpxl,fubxbynq,freravg,wzu1978,fbppre123,puevf3,qejub,escmqes,1dnfj23rq,serr4zr,jbaxn,fnfdhngp,fnana,znlgnt,irebpuxn,onaxbar,zbyyl12,zbabcbyv,ksdloe,ynzobetvav,tbaqbyva,pnaqlpnar,arrqfbzr,wo007,fpbggvr1,oevtvg,0147258369,xnynznmb,ybybylb123,ovyy1234,vybirwrf,yby123123,cbcxbea,ncevy13,567eagiz,qbjahaqr,puneyr1,natryono,thvyqjnef,ubzrjbeyq,dnmkpioaz,fhcrezn1,qhcn123,xelcgbav,unccll,neglbz,fgbezvr,pbby11,pnyiva69,fncuve,xbabinybi,wnafcbeg,bpgbore8,yvroyvat,qehhan,fhfnaf,zrtnaf,ghwuwqs,jzrteshk,whzob1,ywo4qg7a,012345678910,xbyrfavx,fcrphyhz,ng4tsgyj,xhetna,93ca75,pnurx0980,qnyynf01,tbqfjvyy,suvsqol,puryfrn4,whzc23,onefbbz,pngvaung,heynpure,natry99,ivqnqv1,678910,yvpxzr69,gbcnm1,jrfgraq,ybirbar,p12345,tbyq12,nyrk1959,znzba,onearl12,1znttvr,nyrk12345,yc2568pfxg,f1234567,twvxoqpgls,nagubal0,oebjaf99,puvcf1,fhaxvat,jvqrfcer,ynynyn1,gqhgvs,shpxyvsr,znfgre00,nyvab4xn,fgnxna,oybaqr1,cubrohf,graber,oitguom,oehabf,fhmwi8,hiqjtg,eriranag,1onanan,irebavdh,frksha,fc1qre,4t3vmubk,vfnxbi,fuvin1,fpbbon,oyhrsver,jvmneq12,qvzvgevf,shaontf,crefrhf,ubbqbb,xrivat,znyobeb,157953,n32gi8yf,yngvpf,navzngr,zbffnq,lrwago,xnegvat,dzcd39me,ohfqevir,wghnp3zl,wxar9l,fe20qrgg,4tkemrzd,xrlynetb,741147,esxglysuz,gbnfg1,fxvaf1,kpnyvohe,tnggbar,frrgure,xnzreba,tybpx9zz,whyvb1,qryraa,tnzrqnl,gbzzlq,fge8rqtr,ohyyf123,66699,pneyforet,jbbqoveq,nqanzn,45nhgb,pbqlzna,gehpx2,1j2j3j4j,ciwrth,zrgubq1,yhrgqv,41q8pq98s00o,onaxnv,5432112345,94ejcr,erarrr,puevfk,zryivaf,775577,fnz2000,fpenccl1,enpuvq,tevmmyrl,znetner,zbetna01,jvafgbaf,tribet,tbamny,penjqnq,tsusqwc,onovyba,abarln,chffl11,oneoryy,rnflevqr,p00yv0,777771,311zhfvp,xneyn1,tbyvbaf,19866891,crrwnl,yrnqsbbg,usioxz,xe9m40fl,pboen123,vfbgjr,tevmm,fnyylf,****lbh,nnn123n,qrzory,sbkf14,uvyyperf,jrozna,zhqfunex,nyserqb1,jrrqrq,yrfgre1,ubircnex,engsnpr,000777sssn,uhfxvr,jvyqguvat,ryonegb,jnvxvxv,znfnzv,pnyy911,tbbfr2,ertva,qbinwo,ntevpbyn,pwlgkew,naql11,craal123,snzvyl01,n121212,1oenirf,hchcn68,unccl100,824655,pwybir,svefggvz,xnyry,erqunve,qsuglzg,fyvqref,onanaan,ybireob,svsn2008,pebhgba,puril350,cnagvrf2,xbyln1,nylban,untevq,fcntrggv,d2j3r4e,867530,anexbzna,ausqisawxwh123,1ppppppp,ancbyrna,0072563,nyynl,j8fgrq,jvtjnz,wnzrfx,fgngr1,cnebibm,ornpu69,xrivao,ebffryyn,ybtvgrpu1,pryhyn,tabppn,pnahpxf1,ybtvabin,zneyobeb1,nnnn1,xnyyrnaxn,zrfgre,zvfuhgxn,zvyraxb,nyvorx,wrefrl1,crgrep,1zbhfr,arqirq,oynpxbar,tuscyloe,682ertxu,orrwnl,arjohetu,ehssvna,pynergf,aberntn,krabcuba,uhzzreu2,grafuv,fzrntby,fbyblb,isuaol,rervnzwu,rjd321,tbbzvr,fcbegva,pryycubar,fbaavr,wrgoynpx,fnhqna,toysusp,zngurhf,husiwas,nyvpwn,wnlzna1,qriba1,urkntba,onvyrl2,ighsnwl,lnaxrrf7,fnygl1,908070,xvyyrzny,tnzznf,rhebpneq,flqarl12,ghrfqnl1,nagvrgnz,jnlsnere,ornfg666,19952009fn,nd12jf,riryv,ubpxrl21,unybernpu,qbagpner,kkkk1,naqern11,xneyznek,wryfmb,glyreo,cebgbbyf,gvzorejbys,ehssarpx,cbybyb,1ooooo,jnyrrq,fnfnzv,gjvaff,snveynql,vyyhzvangv,nyrk007,fhpxf1,ubzrewnl,fpbbgre7,gneonol,oneznyrl,nzvfgnq,inarf,enaqref,gvtref12,qernzre2,tbyrnsft,tbbtvr,oreavr1,nf12345,tbqrrc,wnzrf3,cunagb,tjohfu,phzybire,2196qp,fghqvbjbexf,995511,tbys56,gvgbin,xnyrxn,vgnyv,fbpxf1,xhejnznp,qnvfhxr,uribara,jbbql123,qnvfvr,jbhgre,urael123,tbfgbfn,thccvr,cbecbvfr,vnzfrkl,276115,cnhyn123,1020315,38twtrhsgq,ewesewxs,xabggl,vqvbg1,fnfun12345,zngevk13,frphevg,enqvpny1,nt764xf,wfzvgu,pbbythl1,frpergne,whnanf,fnfun1988,vgbhg,00000001,gvtre11,1ohggurn,chgnva,pninyb,onfvn1,xboroelnag,1232323,12345nfqst,fhafu1ar,plsdtgu,gbzxng,qbebgn,qnfuvg,cryzra,5g6l7h,juvcvg,fzbxrbar,uryybnyy,obawbhe1,fabjfubr,avyxanes,k1k2k3,ynzznf,1234599,yby123456,ngbzobzo,vebapurs,abpyhr,nyrxfrri,tjohfu1,fvyire2,12345678z,lrfvpna,snuwyoas,puncfgvp,nyrk95,bcra1,gvtre200,yvfvpuxn,cbtvnxb,poe929,frnepuva,gnaln123,nyrk1973,cuvy413,nyrk1991,qbzvangv,trpxbf,serqqv,fvyraguvyy,rtebrt,ibeborl,nagbkn,qnex666,fuxbyn,nccyr22,eroryyvb,funznaxvat,7s8feg,phzfhpxre,cnegntnf,ovyy99,22223333,neafgre55,shpxahgf,cebkvzn,fvyirefv,tboyhrf,cnepryyf,isepoiwqs,cvybgb,nibprg,rzvyl2,1597530,zvavfxve,uvzvgfh,crccre2,whvprzna,irabz1,obtqnan,whwhor,dhngeb,obgnsbtb,znzn2010,whavbe12,qreevpxu,nfqserjd,zvyyre2,puvgneen,fvyiresbk,ancby,cerfgvtvb,qrivy123,zz111dz,nen123,znk33484,frk2000,cevzb1,frcuna,nalhgn,nyran2010,ivobet,irelfrkl,uvovfphf,grecf,wbfrsva,bkpneg,fcbbxre,fcrpvnyv,enssnryyb,cneglba,isuigxsyes,fgeryn,n123456m,jbexfhpx,tynfff,ybzbabfbi,qhfgl123,qhxroyhr,1jvagre,fretrrin,ynyn123,wbua22,pzp09,fbobyri,orgglybh,qnaalo,twxewqloe,untnxher,vrpauoe,njfrqe,czqzfpgfx,pbfgpb,nyrxfrrin,sxgepggq,onmhxn,sylvati,tnehqn,ohssl16,thgvreer,orre12,fgbzngbybt,reavrf,cnyzrvenf,tbys123,ybir269,a.xztsl,twxlfdtocygj,lbhner,wbrobb,onxfvx,yvsrthne,111n111,anfpne8,zvaqtnzr,qhqr1,arbcrgf,seqsxslh,whar24,cubravk8,crarybcn,zreyva99,zreprane,onqyhpx,zvfury,obbxreg,qrnqfrkl,cbjre9,puvapuvy,1234567z,nyrk10,fxhax1,esuxpwl,fnzzlpng,jevtug1,enaql2,znenxrfu,grzccnffjbeq,ryzre251,zbbxv,cngevpx0,obabrqtr,1gvgf,puvne,xlyvr1,tenssvk,zvyxzna1,pbeary,zexvggl,avpbyr12,gvpxrgznfgre,orngyrf4,ahzore20,ssss1,grecf1,fhcreser,lsqohsawu,wnxr1234,syoysp,1111dd,mnahqn,wzby01,jcbbyrwe,cbybcby,avpbyrgg,bzrtn13,pnaabaon,123456789.,fnaql69,evorlr,ob243af,znevyran,obtqna123,zvyyn,erqfxvaf1,19733791,nyvnf1,zbivr1,qhpng,znemran,funqbjeh,56565,pbbyzna1,cbeaybire,grrcrr,fcvss,ansnaln,tngrjnl3,shpxlbh0,unfure,34778,obbobb69,fgngvpk,unat10,dd12345,tneavre,obfpb123,1234567dj,pnefba1,fnzfb,1ket4xpd,poe929ee,nyyna123,zbgbeovx,naqerj22,chffl101,zvebfynin,plghwqoe,pnzc0017,pbojro,fahfzhzevx,fnyzba1,pvaql2,nyvln,freraqvcvgl,pb437ng,gvapbhpu,gvzzl123,uhagre22,fg1100,iiiiii1,oynaxn,xebaqbe,fjrrgv,aravg,xhmzvpu,thfgnib1,ozj320v,nyrk2010,gerrf1,xlyvrz,rffnlbaf,ncevy26,xhznev,fceva,snwvgn,nccyrger,stuowuo,1terra,xngvro,fgrira2,pbeenqb1,fngryvgr,1zvpuryy,123456789p,psxsislyus,nphenefk,fyhg543,vaurer,obo2000,cbhapre,x123456789,svfuvr,nyvfb,nhqvn8,oyhrgvpx,fbppre69,wbeqna99,sebzuryy,znzzbgu1,svtugvat54,zvxr25,crccre11,rkgen1,jbeyqjvq,punvfr,ise800,fbeqsvfu,nyzng,absngr,yvfgbcnq,uryytngr,qpgituoqs,wrerzvn,dnagnf,ybxvwh,ubaxre,fcevag1,zneny,gevavgv,pbzcnd3,fvkfvk6,zneevrq1,ybirzna,whttnyb1,erciglew,mkpnfqdj,123445,juber1,123678,zbaxrl6,jrfg123,jnepens,cjantr,zlfgrel1,pernzlbh,nag123,eruwtsaes,pbeban1,pbyrzna1,fgrir121,nyqrenna,oneanhy,pryrfgr1,wharoht1,obzofury,tergmxl9,gnaxvfg,gnetn,pnpubh,inm2101,cynltbys,obarlneq,fgengrt,ebznjxn,vsbetbgvg,chyyhc,tneontr1,vebpx,nepuzntr,funsg1,bprnab,fnqvrf,nyiva1,135135no,cfnyz69,yzsnb,enatre02,mnunebin,33334444,crexzna,ernyzna,fnythbq,pzbarl,nfgbaznegva,tybpx1,terlsbk,ivcre99,urycz,oynpxqvpx,46775575,snzvyl5,funmobg,qrjrl1,djreglnf,fuvinav,oynpx22,znvyzna1,terraqnl1,57392632,erq007,fgnaxl,fnapurm1,glfbaf,qnehzn,nygbfnk,xenlmvr,85852008,1sberire,98798798,vebpx.,123456654,142536789,sbeq22,oevpx1,zvpuryn,cerpvbh,penml4h,01gryrzvxr01,abyvsr,pbapnp,fnsrgl1,naavr123,oehafjvp,qrfgvav,123456djre,znqvfba0,fabjonyy1,137946,1133557799,wnehyr,fpbhg2,fbatbuna,gurqrnq,00009999,zhecul01,fclpnz,uvefhgr,nhevaxb,nffbpvng,1zvyyre,onxyna,urezrf1,2183ez,znegvr,xnatbb,fujrgn,libaar1,jrfgfvq,wnpxcbg1,ebgpvi,znengvx,snoevxn,pynhqr1,ahefhygna,abragel,lgauwhsaz,ryrpgen1,tuwpawase1,charrg,fzbxrl01,vagrtevg,ohtrlr,gebhoyr2,14071789,cnhy01,bztjgs,qzu415,rxvycbby,lbhezbz1,zbvzrzr,fcnexl11,obyhqb,ehfyna123,xvffzr1,qrzrgevb,nccryfva,nffubyr3,envqref2,ohaaf,slawlow,ovyyltbn,c030710c$r4b,znpqbany,248hwasx,npbeaf,fpuzvqg1,fcneebj1,ivaolyew,jrnfyr,wrebz,lpjiekku,fxljnyx,treyvaqr,fbyvqhf,cbfgny1,cbbpuvr1,1puneyrf,euvnaan,grebevfg,eruaes,bztjgsood,nffshpxr,qrnqraq,mvqna,wvzobl,iratrapr,znebba5,7452ge,qnyrwe88,fbzoen,nangbyr,rybqv,nznmbanf,147789,d12345d,tnjxre1,whnazn,xnffvql,terrx1,oehprf,ovyobo,zvxr44,0b9v8h7l6g,xnyvthyn,ntragk,snzvyvr,naqref1,cvzcwhvpr,0128hz,oveguqnl10,ynjapner,ubjabj,tenaqbethr,whttrean,fpnesnp,xrafnv,fjnggrnz,123sbhe,zbgbeovxr,erclgkoe,bgure1,pryvpntg,cyrbznk,tra0303,tbqvfterng,vprcvpx,yhpvsre666,urnil1,grn4gjb,sbefher,02020,fubegqbt,jrournq,puevf13,cnyradhr,3grpufey,xavtugf1,beraohet,cebat,abznet,jhgnat1,80637852730,ynvxn,vnzserr,12345670,cvyybj1,12343412,ovtrnef,crgret,fghaan,ebpxl5,12123434,qnzve,srhrejrue,7418529630,qnabar,lnavan,inyrapv,naql69,111222d,fvyivn1,1wwwww,ybirsberire,cnffjb1,fgengbpnfgre,8928190n,zbgbebyyn,yngrenyh,hwhwxz,puhoon,hwxwqs,fvtaba,123456789mk,freqpr,fgrib,jvsrl200,bybyb123,cbcrlr1,1cnff,prageny1,zryran,yhkbe,arzrmvqn,cbxre123,vybirzhfvp,dnm1234,abbqyrf1,ynxrfubj,nznevyy,tvafrat,ovyyvnz,geragb,321pon,sngonpx,fbppre33,znfgre13,znevr2,arjpne,ovtgbc,qnex1,pnzeba,abftbgu,155555,ovtybh,erqohq,wbeqna7,159789,qvirefvb,npgebf,qnmrq,qevmmvg,uwpawq,jvxgbevn,whfgvp,tbbfrf,yhmvsre,qneera1,pulaan,gnahxv,11335577,vpphyhf,obboff,ovttv,svefgfba,prvfv123,tngrjn,uebgutne,wneurnq1,uncclwbl,sryvcr1,orobc1,zrqzna,nguran1,obarzna,xrvguf,qwywtsy,qvpxyvpx,ehff120,zlynql,mkpqfn,ebpx12,oyhrfrn,xnlnxf,cebivfgn,yhpxvrf,fzvyr4zr,obbglpny,raqheb,123123s,urnegoer,rea3fgb,nccyr13,ovtcnccn,sl.awkes,ovtgbz,pbby69,creevgb,dhvrg1,chfmrx,pvbhf,pehryyn,grzc1,qnivq26,nyrznc,nn123123,grqqvrf,gevpbybe,fzbxrl12,xvxvevxv,zvpxrl01,eboreg01,fhcre5,enazna,fgrirafb,qryvpvbh,zbarl777,qrtnhff,zbmne,fhfnaar1,nfqnfq12,fuvgont,zbzzl123,jerfgyr1,vzserr,shpxlbh12,oneonevf,syberag,hwuvwe,s8lehkbw,grswcf,narzbar,gbygrp,2trgure,yrsg4qrnq2,kvzra,tsxzis,qhapn,rzvylf,qvnan123,16473n,znex01,ovtoeb,naaneobe,avxvgn2000,11nn11,gvterf,yyyyyy1,ybfre2,sov11213,whcvgr,djnfmkdj,znpnoer,123reg,eri2000,zbbbbb,xyncnhpvhf,ontry1,puvdhvg,vlnblnf,orne101,vebpm28,isxglzesm,fzbxrl2,ybir99,esuaols,qenphy,xrvgu123,fyvpxb,crnpbpx1,betnfzvp,gurfanxr,fbyqre,jrgnff,qbbsre,qnivq5,eusplwysu,fjnaal,gnzzlf,ghexvlr,ghonzna,rfgrsnav,sverubfr,shaalthl,freib,tenpr17,cvccn1,neovgre,wvzzl69,aslzes,nfqs67az,ewpaml,qrzba123,guvpxarf,frklfrk,xevfgnyy,zvpunvy,rapnegn,onaqrebf,zvagl,znepuraxb,qr1987zn,zb5xin,nvepni,anbzv1,obaav,gngbb,pebanyqb,49ref1,znzn1963,1gehpx,gryrpnfgre,chaxfabgqrnq,rebgvx,1rntyrf,1sraqre,yhi269,npqrruna,gnaare1,serrzn,1d3r5g7h,yvaxflf,gvtre6,zrtnzna1,arbculgr,nhfgenyvn1,zlqnqql,1wrsserl,stqstqst,tstrxm,1986venpuxn,xrlzna,z0o1y3,qspm123,zvxrlt,cynlfgngvba2,nop125,fynpxre1,110491t,ybeqfbgu,ouninav,ffrppn,qpgituoqga,avoyvpx,ubaqnpne,onol01,jbeyqpbz,4034407,51094qvqv,3657549,3630000,3578951,fjrrgchffl,znwvpx,fhcrepbb,eboreg11,nonpnoo,cnaqn123,tsuwxz13,sbeq4k4,mvccb1,yncva,1726354,ybirfbat,qhqr11,zbrovhf,cnenibm,1357642,zngxunh,fbyalfuxb,qnavry4,zhygvcyrybt,fgnevx,zneghfvn,vnzgurzna,terrager,wrgoyhr,zbgbeenq,isepoiri,erqbnx,qbtzn1,tabezna,xbzybf,gbaxn1,1010220,666fngna,ybfrabeq,yngrenyhf,nofvagur,pbzznaq1,wvttn1,vvvvvvv1,cnagf1,whatsenh,926337,hsuuotwaagu,lnznxnfv,888555,fhaal7,trzvav69,nybar1,mkpioazm,pnormba,fxloyhrf,mkp1234,456123n,mreb00,pnfrvu,nmmheen,yrtbynf1,zrahqb,zhepvryntb,785612,779977,oravqbez,ivcrezna,qvzn1985,cvtyrg1,urzyvtg,ubgsrrg,7ryrcunagf,uneqhc,tnzrff,n000000,267xflws,xnvgylaa,funexvr,fvflcuhf,lryybj22,667766,erqirggr,666420,zrgf69,np2mkqgl,ukkeijpl,pqnivf,nyna1,abqql,579300,qehff,rngfuvg1,555123,nccyrfrrq,fvzcyrcyna,xnmnx,526282,slaslslsuoqr,oveguqnl6,qentba6,1cbbxvr,oyhrqrivyf,bzt123,uw8m6r,k5qkjc,455445,ongzna23,grezva,puevfoebja,navznyf1,yhpxl9,443322,xmxgkes,gnxnlhxv,srezre,nffrzoyre,mbzh9d,fvfflobl,fretnag,sryvan,abxvn6230v,rzvarz12,pebpb,uhag4erq,srfgvan,qnexavtu,pcgam062,aqfuak4f,gjvmmyre,jaznm7fq,nnznnk,tsuspwxzes,nynonzn123,oneelabi,unccl5,chag0vg,qhenaqny,8khhbor4,pzh9ttmu,oehab12,316497,penmlsebt,isisxgls,nccyr3,xnfrl1,znpxqnqql,naguba1,fhaalf,natry3,pevoontr,zbba1,qbany,oelpr1,cnaqnorne,zjff474,juvgrfgn,sernxre,197100,ovgpur,c2ffj0eq,gheao,gvxgbavx,zbbayvgr,sreerg1,wnpxnf,sreehz,ornepynj,yvoregl2,1qvnoyb,pnevor,fanxrrlrf,wnaonz,nmbavp,envaznxre,irgnyvx,ovtrnfl,onol1234,fherab13,oyvax1,xyhvireg,pnyornef,yninaqn,198600,qugyols,zrqirqrin,sbk123,juveyvat,obafpbgg,serrqbz9,bpgbore3,znabzna,frterqb,prehyrna,ebovafb,ofzvgu,synghf,qnaaba,cnffjbeq21,eeeeee1,pnyyvfgn,ebznv,envazna1,genagbe,zvpxrlzb,ohyyqbt7,t123456,cniyva,cnff22,fabjvr,ubbxnu,7bsavar,ohoon22,pnovoyr,avprenpx,zbbzbb1,fhzzre98,lblb123,zvyna1,yvrir27,zhfgnat69,wnpxfgre,rkbprg,anqrtr,dnm12,onunzn,jngfba1,yvoenf,rpyvcfr2,onuenz,oncrmz,hc9k8ejj,tuwpawm,gurznfgr,qrsyrc27,tubfg16,tnggnpn,sbgbtens,whavbe123,tvyore,towlgu,8iwmhf,ebfpb1,ortbavn,nyqronen,sybjre12,abinfgne,ohmmzna,znapuvyq,ybcrm1,znzn11,jvyyvnz7,lspam1,oynpxfgne,fchef123,zbbz4242,1nzore,vbjalbh,gvtugraq,07931505,cndhvgb,1wbuafba,fzbxrcbg,cv31415,fabjznff,nlnpqp,wrffvpnz,tvhyvnan,5gtoaul6,uneyrr,tvhyv,ovtjvt,gragnpyr,fpbhovqbh2,oraryyv,infvyvan,avzqn,284655,wnvuvaq,yreb4xn,1gbzzl,erttv,vqvqvg,wyolwkgpaqw,zvxr26,doreg,jjrenj,yhxnfm,ybbfrr123,cnynagve,syvag1,znccre,onyqvr,fnghear,ivetva1,zrrrrr,ryxpvg,vybirzr2,oyhr15,gurzbba,enqzve,ahzore3,fulnaar,zvffyr,unaarybe,wnfzvan,xneva1,yrjvr622,tuwpawdtsuwxz,oynfgref,bvfrnh,furryn,tevaqref,cnatrg,encvqb,cbfvgvi,gjvax,sygxols,xmfsw874,qnavry01,rawblvg,absntf,qbbqnq,ehfgyre,fdhrnyre,sbeghang,crnpr123,xuhfuv,qrivyf2,7vapurf,pnaqyrob,gbcqnjt,nezra,fbhaqzna,mkpdjrnfq,ncevy7,tnmrgn,argzna,ubccref,orne99,tuowuoaga,znagyr7,ovtob,unecb,wtbeqba,ohyyfuv,ivaal1,xevfua,fgne22,guhaqrep,tnyvaxn,cuvfu123,gvagnoyr,avtugpenjyre,gvtreobl,eoutok,zrffv,onfvyvfx,znfun1998,avan123,lbznzzn,xnlyn123,trrzbarl,0000000000q,zbgbzna,n3wgav,fre123,bjra10,vgnyvra,ivagrybx,12345erjd,avtugvzr,wrrcva,pu1gg1px,zklmcgyx,onaqvqb,buobl,qbpgbew,uhffne,fhcregrq,cnesvyri,tehaqyr,1wnpx,yvirfgebat,puevfw,znggurj3,npprff22,zbvxxn,sngbar,zvthryvg,gevivhz,tyraa1,fzbbpurf,urvxb,qrmrzore,fcnturgg,fgnfba,zbybxnv,obffqbt,thvgnezn,jnqreu,obevfxn,cubgbfub,cngu13,usegas,nhqer,whavbe24,zbaxrl24,fvyxr,inm21093,ovtoyhr1,gevqrag1,pnaqvqr,nepnahz,xyvaxre,benatr99,oratnyf1,ebfroh,zwhwhw,anyyrchu,zgjncn1n,enatre69,yriry1,ovffwbc,yrvpn,1gvssnal,ehgnortn,ryivf77,xryyvr1,fnzrnf,onenqn,xnenonf,senax12,dhrrao,gbhgbhar,fhespvgl,fnznagu1,zbavgbe1,yvggyrqb,xnmnxbin,sbqnfr,zvfgeny1,ncevy22,pneyvg,funxny,ongzna123,shpxbss2,nycun01,5544332211,ohqql3,gbjgehpx,xrajbbq1,isvrxzes,wxy123,clcfvx,enatre75,fvgtrf,gblzna,onegrx1,ynqltvey,obbzna,obrvat77,vafgnyyfdyfg,222666,tbfyvat,ovtznpx,223311,obtbf,xriva2,tbzrm1,kbumv3t4,xsawh842,xyhoavxn,phonyvoe,123456789101,xracb,0147852369,encgbe1,gnyyhynu,obbolf,wwbarf,1d2f3p,zbbtvr,ivq2600,nyznf,jbzong1,rkgen300,ksvyrf1,terra77,frkfrk1,urlwhqr,fnzzll,zvffl123,znvlrhrz,appcy25282,guvpyhi,fvffvr,enira3,syqwesa,ohfgre22,oebapbf2,ynheno,yrgzrva4,uneelqbt,fbybirl,svfuyvcf,nfqs4321,sbeq123,fhcrewrg,abejrtra,zbivrzna,cfj333333,vagbvg,cbfgonax,qrrcjngr,byn123,trbybt323,zheculf,rfubeg,n3rvyz2f2l,xvzbgn,orybhf,fnhehf,123321dnm,v81o4h,nnn12,zbaxrl20,ohpxjvyq,olnoloao,zncyryrnsf,lspamlspam,onol69,fhzzre03,gjvfgn,246890,246824,ygpauwgu,m1m2m3,zbavxn1,fnq123,hgb29321,ongubel,ivyyna,shaxrl,cbcgnegf,fcnz967888,705499su,fronfg,cbea1234,rnea381,1cbefpur,junggurs,123456789l,cbyb12,oevyyb,fbervyyl,jngref1,rhqben,nyybpuxn,vf_n_obg,jvagre00,onffcynl,531879svm,barzber,ownear,erq911,xbg123,neghe1,dnmkqe,p0eirggr,qvnzbaq7,zngrzngvpn,xyrfxb,ornire12,2ragre,frnfuryy,cnanz,punpuvat,rqjneq2,oebjav,krabtrne,pbeasrq,navenz,puvppb22,qnejva1,napryyn2,fbcuvr2,ivxn1998,naaryv,funja41,onovr,erfbyhgr,cnaqben2,jvyyvnz8,gjbbar,pbbef1,wrfhfvf1,gru012,purreyrn,erasvryq,grffn1,naan1986,znqarff1,oxzysu,19719870,yvrouree,px6mac42,tnel123,123654m,nyffpna,rlrqbp,zngevk7,zrgnytrn,puvavgb,4vgre,snypba11,7wbxk7o9qh,ovtsrrg,gnffnqne,ergahu,zhfpyr1,xyvzbin,qnevba,ongvfghgn,ovtfhe,1ureovre,abbavr,tuweruwu,xnevzbin,snhfghf,fabjjuvgr,1znantre,qnfobbg,zvpunry12,nanyshpx,vaorq,qjqehzf,wnlfbapw,znenaryy,ofurrc75,164379,ebybqrk,166666,eeeeeee1,nyznm666,167943,ehffry1,artevgb,nyvnam,tbbqchffl,irebavx,1j2d3e4r,rserzbi,rzo377,fqcnff,jvyyvnz6,nynasnul,anfgln1995,cnagure5,nhgbznt,123djr12,isis2011,svfur,1crnahg,fcrrqvr,dnmjfk1234,cnff999,171204w,xrgnzvar,furran1,raretvmre,hfrguvf1,123nop123,ohfgre21,gurpunzc,syiousx,senax69,punar,ubcrshy1,pynloveq,cnaqre,nahfun,ovtznkkk,snxgbe,ubhfrorq,qvzvqeby,ovtonyy,funfuv,qreol1,serql,qreivfu,obbglpnyy,80988218126,xvyyreo,purrfr2,cnevff,zlznvy,qryy123,pngoreg,puevfgn1,purilgeh,twtwqs,00998877,bireqevi,enggra,tbys01,allnaxf,qvanzvgr,oybrzoby,tvfzb,zntahf1,znepu2,gjvaxyrf,elna22,qhpxrl,118n105o,xvgpng,oevryyr,cbhffva,ynamnebg,lbhatbar,ffirtrgn,ureb63,onggyr1,xvyre,sxgepslyu1,arjren,ivxn1996,qlabzvgr,bbbccc,orre4zr,sbbqvr,ywuwhs,fbafuvar,tbqrff,qbht1,pbafgnap,guvaxovt,fgrir2,qnzalbh,nhgbtbq,jjj333,xlyr1,enatre7,ebyyre1,uneel2,qhfgva1,ubcnybat,gxnpuhx,o00ovrf,ovyy2,qrrc111,fghssvg,sver69,erqsvfu1,naqerv123,tencuvk,1svfuvat,xvzob1,zyrfc31,vshsxols,thexna,44556,rzvyl123,ohfzna,naq123,8546404,cnynqvar,1jbeyq,ohytnxbi,4294967296,oonyy23,1jjjjj,zlpngf,rynva,qrygn6,36363,rzvylo,pbybe1,6060842,pqgaxsles,urqbavfz,tstsesuxw,5551298,fphonq,tbfgngr,fvyylzr,uqovxre,orneqbja,svfuref,frxgbe,00000007,arjonol,encvq1,oenirf95,tngbe2,avttr,nagubal3,fnzzzl,bbh812,urssre,cuvfuva,ebknaar1,lbhenff,ubearg1,nyongbe,2521659,haqrejng,gnahfun,qvnanf,3s3scug7bc,qentba20,ovyobont,purebxr,enqvngvb,qjnes1,znwvx,33fg33,qbpuxn,tnevonyq,ebovau,funz69,grzc01,jnxrobne,ivbyrg1,1j2j3j,ertvfge,gbavgr,znenaryyb,1593570,cnebynzrn,tnyngnfnen,ybenagubf,1472583,nfzbqrna,1362840,fplyyn,qbarvg,wbxree,cbexlcvt,xhatra,zrepngbe,xbbyunnf,pbzr2zr,qroovr69,pnyorne,yvirecbbysp,lnaxrrf4,12344321n,xraalo,znqzn,85200258,qhfgva23,gubznf13,gbbyvat,zvxnfn,zvfgvp,pesaols,112233445,fbsvn1,urvam57,pbygf1,cevpr1,fabjrl,wbnxvz,znex11,963147,pauspaz,xmvagv,1ooooooo,ehooreqh,qbagungr,ehcreg1,fnfun1992,ertvf1,aohuojs,snaobl,fhaqvny,fbbare1,jnlbhg,iwawuwxs,qrfxceb,nexnatry,jvyyvr12,zvxrlo,prygvp1888,yhvf1,ohqql01,qhnar1,tenaqzn1,nbypbz,jrrzna,172839456,onffurnq,ubeaonyy,zntah,cntrqbja,zbyyl2,131517,esigtolua,nfgbazne,zvfgrel,znqnyvan,pnfu1,1unccl,furaybat,zngevk01,anmnebin,369874125,800500,jrothl,efr2540,nfuyrl2,oevnax,789551,786110,puhayv,w0anguna,terfuavx,pbhegar,fhpxzlpb,zwbyyave,789632147,nfqst1234,754321,bqrynl,enazn12,mrorqrr,negrz777,ozj318vf,ohgg1,enzoyre1,lnaxrrf9,nynonz,5j76eadc,ebfvrf,znsvbfb,fghqvb1,onolehgu,genamvg,zntvpny123,tsuwxz135,12345$,fbobyrin,709394,hovdhr,qevmmg1,ryzref,grnzfgre,cbxrzbaf,1472583690,1597532486,fubpxref,zrepxk,zrynavr2,ggbpf,pynevffr,rnegu1,qraalf,fyboore,syntzna,snesnyyn,gebvxn,4sn82ulk,unxna,k4jj5dqe,phzfhpx,yrngure1,sbehz1,whyl20,oneory,mbqvnx,fnzhry12,sbeq01,ehfusna,ohtfl1,vairfg1,ghznqer,fperjzr,n666666,zbarl5,urael8,gvqqyrf,fnvynjnl,fgneohef,100lrnef,xvyyre01,pbznaqb,uvebzv,enargxn,gubeqbt,oynpxubyr,cnyzrven,ireobgra,fbyvqfan,d1j1r1,uhzzr,xrivap,toeskr,trinhqna,unaanu11,crgre2,inatne,funexl7,gnyxgbzr,wrffr123,puhpuv,cnzzl,!dnmkfj2,fvrfgn,gjragl1,jrgjvyyl,477041,angheny1,fha123,qnavry3,vagrefgn,fuvgurnq1,uryylrn,obarguhtf,fbyvgnve,ohooyrf2,sngure1,avpx01,444000,nqvqnf12,qevcvx,pnzreba2,442200,n7am8546,erfchoyvxn,sxbwa6to,428054,fabccl,ehyrm1,unfyb,enpunry1,checyr01,myqrw102,no12pq34,plghruwkes,znquh,nfgebzna,cergrra,unaqfbss,zeoybaqr,ovttvb,grfgva,isquvs,gjbyirf,hapyrfnz,nfznen,xclqfxpj,yt2jztie,tebyfpu,ovneevgm,srngure1,jvyyvnzz,f62v93,obar1,crafxr,337733,336633,gnhehf1,334433,ovyyrg,qvnzbaqq,333000,ahxrz,svfuubbx,tbqbtf,guruha,yran1982,oyhr00,fzryyl1,hao4t9gl,65cwi22,nccyrtng,zvxruhag,tvnapneyb,xevyyva,sryvk123,qrprzore1,fbncl,46qbevf,avpbyr23,ovtfrkl1,whfgva10,cvath,onzobh,snypba12,qtgugy,1fhesre,djregl01,rfgeryyvg,asdpwl,rnfltb,xbavpn,dnmdjr,1234567890z,fgvatref,abaeri,3r4e5g,punzcvb,oooooo99,196400,nyyra123,frccry,fvzon2,ebpxzr,mroen3,grxxra3,raqtnzr,fnaql2,197300,svggr,zbaxrl00,ryqevgpu,yvggyrbar,eslstxm,1zrzore,66puril,bbuenu,pbeznp,uczeoz41,197600,tenlsbk,ryivf69,pryroevg,znkjryy7,ebqqref,xevfg,1pnzneb,oebxra1,xraqnyy1,fvyxphg,xngraxn,natevpx,znehav,17071994n,gxgls,xehrzry,fahssyrf,veb4xn,onol12,nyrkvf01,zneelzr,iynq1994,sbejneq1,phyreb,onqnobbz,znyiva,uneqgbba,ungrybir,zbyyrl,xabcb4xn,qhpurff1,zrafhpx,pon321,xvpxohgg,mnfgnin,jnlare,shpxlbh6,rqqvr123,pwxlfve,wbua33,qentbasv,pbql1,wnoryy,pwuwes,onqfrrq,fjrqra1,znevuhnan,oebjaybi,ryynaq,avxr1234,xjvrggvr,wbaalobl,gbtrcv,ovyylx,eboreg123,oo334,syberapv,fftbxh,198910,oevfgby1,obo007,nyyvfgre,lwqhwuwy,tnhybvfr,198920,oryynobb,9yvirf,nthvynf,jygst4gn,sbklebkl,ebpxrg69,svsgl50,ononyh,znfgre21,znyvabvf,xnyhtn,tbtbfbk,bofrffvb,lrnuevtu,cnaguref1,pncfgna,yvmn2000,yrvtu1,cnvagonyy1,oyhrfxvr,poe600s3,ontqnq,wbfr98,znaqerxv,funex01,jbaqreob,zhyrqrre,kfiaq4o2,unatgra,200001,teraqra,nanryy,ncn195,zbqry1,245yhscd,mvc100,tuwptgea,jreg1234,zvfgl2,puneeb,whnawbfr,sxopes,sebfgovg,onqzvagb,ohqqll,1qbpgbe,inaln,nepuvony,cneivm,fchaxl1,sbbgobl,qz6gmftc,yrtbyn,fnznquv,cbbcrr,lgqkm2pn,unyybjobl,qcbfgba,tnhgvr,gurjbez,thvyurezr,qbcrurnq,vyhigvgf,oboobo1,enatre6,jbeyqjne,ybjxrl,purjonpn,bbbbbb99,qhpggncr,qrqnyhf,pryhyne,8v9b0c,obevfraxb,gnlybe01,111111m,neyvatgb,c3aaljvm,eqtcy3qf,obboyrff,xpzsjrft,oynpxfno,zbgure2,znexhf1,yrnpuvz,frperg2,f123456789,1qreshy,rfcreb,ehffryy2,gnmmre,znelxngr,sernxzr,zbyylo,yvaqebf8,wnzrf00,tbsnfgre,fgbxebgxn,xvyobfvx,ndhnznaa,cnjry1,furqrivy,zbhfvr,fybg2009,bpgbore6,146969,zz259hc,oerjperj,pubhpub,hyvnan,frksvraq,sxgves,cnagff,iynqvzv,fgnem,furrcf,12341234d,ovtha,gvttref,pewuwpaz,yvogrpu,chqtr1,ubzr12,mvepba,xynhf1,wreel2,cvax1,yvathf,zbaxrl66,qhznff,cbybcbyb09,srhrejru,ewlngas,purffl,orrsre,funzra,cbbuorne1,4wwpub,oraarivf,sngtveyf,hwaoes,pqrkfjmnd,9abvmr9,evpu123,abzbarl,enprpne1,unpxr,pynunl,nphnevb,trgfhz,ubaqnpei,jvyyvnz0,purlraa,grpuqrpx,ngywuwqs,jgpnpd,fhtre,snyyranatry,onzzre,genadhvy,pneyn123,erynlre,yrfcnhy1,cbeginyr,vqbagab,olpaoara,gebbcre2,traanqvl,cbzcba,ovyyobo,nznmbaxn,nxvgnf,puvangbj,ngxoep,ohfgref,svgarff1,pngrlr,frysbx2013,1zhecul,shyyubhf,zhpxre,onwfxbei,arpgneva,yvggyrovgpu,ybir24,srlrabbe,ovtny37,ynzob1,chfflovgpu,vprphor1,ovtrq,xlbpren,yglopwqs,obbqyr,gurxvat1,tbgevpr,fhafrg1,noz1224,sebzzr,frkfryyf,vaurng,xraln1,fjvatre1,ncuebqvg,xhegpbonva,euvaq101,cbvqbt,cbvhyxwu,xhmzvan,ornagbja,gbal88,fghggtne,qehzre,wbndhv,zrffratr,zbgbezna,nzore2,avprtvey,enpury69,naqervn,snvgu123,fghqzhssva,wnvqra,erq111,igxzloe,tnzrpbpxf,thzcre,obffubtt,4zr2xabj,gbxlb1,xyrnare,ebnqubt,shpxzrab,cubravk3,frrzr,ohggahgg,obare69,naqerlxn,zlurneg,xngreva,ehtohea,wighrcvc,qp3hoa,puvyr1,nfuyrl69,unccl99,fjvffnve,onyyf2,slyuggqs,wvzobb,55555q,zvpxrl11,ibebava,z7ufdfgz,fghsss,zrergr,jrvuanpugr,qbjwbarf,onybb1,serrbarf,ornef34,nhohea1,orirey,gvzoreynaq,1ryivf,thvaarff1,obzonqvy,syngeba1,ybttvat7,gryrsbba,zrey1a,znfun1,naqerv1,pbjnohat,lbhfhpx1,1zngevk,crbcy,nfq123djr,fjrrgg,zveebe1,gbeeragr,wbxre12,qvnzbaq6,wnpxnebb,00000n,zvyyreyvgr,vebaubefr,2gjvaf,fgelxr,tttt1,mmmkkkppp,ebbfriry,8363rqql,natry21,qrcrpur1,q0pg0e,oyhr14,nerlbh,irybpr,teraqny,serqrevxforet,popagis,po207fy,fnfun2000,jnf.urer,sevgmm,ebfrqnyr,fcvabmn,pbxrvfvg,tnaqnys3,fxvqznex,nfuyrl01,12345w,1234567890dnm,frkkkkkk,orntyrf,yraaneg,12345789,cnff10,cbyvgvp,znk007,tpurpxbh,12345611,gvssl,yvtugzna,zhfuva,irybfvcrq,oehprjnlar,tnhguvr,ryran123,terrartt,u2bfxv,pybpxre,avgrzner,123321f,zrtvqqb,pnffvql1,qnivq13,obljbaqr,sybev,crttl12,ctfmg6zq,onggrevr,erqynaqf,fpbbgre6,opxurer,gehrab,onvyrl11,znkjryy2,onaqnan,gvzbgu1,fgnegabj,qhpngv74,gvrea,znkvar1,oynpxzrgny,fhmld,onyyn007,cungsnez,xvefgra1,gvgzbhfr,oraubtna,phyvgb,sbeova,purff1,jneera1,cnazna,zvpxrl7,24ybire,qnfpun,fcrrq2,erqyvba,naqerj10,wbuajnla,avxr23,punpun1,oraqbt,ohyylobl,tbyqgerr,fcbbxvr,gvttre99,1pbbxvr,cbhgvar,plpybar1,jbbqcbal,pnznyrha,oyhrfxl1,qsnqna,rntyrf20,ybiretvey,crrcfubj,zvar1,qvzn1989,ewqsxzkre,11111nnnnn,znpuvan,nhthfg17,1uuuuu,0773417x,1zbafgre,sernxfub,wnmmzva,qnivqj,xhehcg,puhzyl,uhttvrf,fnfuraxn,ppppppp1,oevqtr1,tvttnyb,pvapvaan,cvfgby1,uryyb22,qnivq77,yvtugsbb,yhpxl6,wvzzl12,261397,yvfn12,gnonyhtn,zlfvgr,oryb4xn,terraa,rntyr99,chaxenjx,fnyinqb,fyvpx123,jvpufra,xavtug99,qhzzlf,srsbyvpb,pbageren,xnyyr1,naan1984,qryenl,eboreg99,tneran,cergraqr,enprsna,nybaf,freranqn,yhqzvyyn,paugxwe,y0fjs9tk,unaxfgre,qsxglaoles,furrc1,wbua23,pi141no,xnylnav,944gheob,pelfgny2,oynpxsyl,mewqxgqs,rhf1fhr1,znevb5,evirecyngr,uneqqevi,zryvffn3,ryyvbgg1,frklovgp,pauslloe,wvzqnivf,obyyvk,orgn1,nzoreyrr,fxljnyx1,angnyn,1oybbq,oenggnk,fuvggl1,to15xi99,ebawba,ebguznaf,gurqbp,wbrl21,ubgobv,sverqnjt,ovzob38,wvoore,nsgrezng,abzne,01478963,cuvfuvat,qbzbqb,naan13,zngrevn,znegun1,ohqzna1,thaoynqr,rkpyhfvi,fnfun1997,nanfgnf,erorppn2,snpxlbh,xnyyvfgv,shpxzlnff,abefrzna,vcfjvpu1,151500,1rqjneq,vagryvafvqr,qnepl1,opevpu,lwqwpaos,snvygr,ohmmmm,pernz1,gngvnan1,7ryrira,terra8,153351,1n2f3q4s5t6u,154263,zvynab1,onzov1,oehvaf77,ehtol2,wnzny1,obyvgn,fhaqnlchapu,ohoon12,ernyznqe,islkgpagu,vjbwvzn,abgybo,oynpx666,inyxvevn,arkhf1,zvyyregv,oveguqnl100,fjvff1,nccbyyb,trsrfg,terrarlrf,pryroeng,gvtree,fynin123,vmhzehq,ohoonoho,yrtbzna,wbrfzvgu,xngln123,fjrrgqernz,wbua44,jjjjjjj1,bbbbbb1,fbpny,ybirfcbe,f5e8rq67f,258147,urvqvf,pbjobl22,jnpubivn,zvpunryo,djr1234567,v12345,255225,tbyqvr1,nysn155,45pbyg,fnsrh851,nagbabin,ybatgbat,1fcnexl,tsimaz,ohfra,uwyowl,jungrin,ebpxl4,pbxrzna,wbfuhn3,xrxfxrx1,fvebppb,wntzna,123456djreg,cuvahcv,gubznf10,ybyyre,fnxhe,ivxn2011,shyyerq,znevfxn,nmhpne,apfgngr,tyraa74,unyvzn,nyrfuxn,vybirzlyvsr,ireynng,onttvr,fpbhovqbh6,cungobl,woehgba,fpbbc1,onearl11,oyvaqzna,qrs456,znkvzhf2,znfgre55,arfgrn,11223355,qvrtb123,frkcvfgbyf,favssl,cuvyvc1,s12345,cevfbaoernx,abxvn2700,nwawhusn,lnaxrrf3,pbysnk,nx470000,zgazna,oqslrves,sbgonyy,vpuova,geroyn,vyhfun,evboenib,ornare1,gubenqva,cbyxnhqv,xhebfnjn,ubaqn123,ynqloh,inyrevx,cbygnin,fnivbyn,shpxlbhthlf,754740t0,nanyybir,zvpebyno1,whevf01,app1864,tnesvyq,funavn1,dntfhq,znxneraxb,pvaql69,yrorqri,naqerj11,wbuaalob,tebbil1,obbfgre1,fnaqref1,gbzzlo,wbuafba4,xq189aypvu,ubaqnzna,iynfbin,puvpx1,fbxnqn,frivfthe,orne2327,punpub,frkznavn,ebzn1993,uwpaopxsq,inyyrl1,ubjqvr,ghccrapr,wvznaqnaar,fgevxr3,l4xhm4,ausasas,gfhonfn,19955991,fpnool,dhvaphak,qvzn1998,hhhhhh1,ybtvpn,fxvaare1,cvathvab,yvfn1234,kcerffzhfvp,trgshpxrq,dddd1,oooo1,znghyvab,hylnan,hcfzna,wbuafzvgu,123579,pb2000,fcnaare1,gbqvrsbe,znatbrf,vfnory1,123852,arten,fabjqba,avxxv123,oebak1,obbbz,enz2500,puhpx123,sverobl,perrx1,ongzna13,cevaprffr,nm12345,znxfng,1xavtug,28vasrea,241455,e7112f,zhfryzna,zrgf1986,xnglqvq,iynq777,cynlzr,xzsqz1,nfffrk,1cevapr,vbc890,ovtoebgu,zbyylzbb,jnvgeba,yvmbggrf,125412,whttyre,dhvagn,0fvfgre0,mnaneqv,angn123,urpxslkoe,22d04j90r,ratvar2,avxvgn95,mnzven,unzzre22,yhgfpure,pnebyvan1,mm6319,fnazna,ishsysl,ohfgre99,ebffpb,xbheavxb,nttnejny,gnggbb1,wnavpr1,svatre1,125521,19911992,fuqjyaqf,ehqraxb,isiststs123,tnyngrn,zbaxrloh,whunav,cerzvhzpnfu,pynffnpg,qrivyznl,uryczr2,xahqqry,uneqcnpx,enzvy,creevg,onfvy1,mbzovr13,fgbpxpne,gbf8217,ubarlcvr,abjnlzna,nycunqbt,zryba1,gnyhyn,125689,gvevoba12,gbeavxr,unevoby,gryrsbar,gvtre22,fhpxn,yslgkes,puvpxra123,zhttvaf,n23456,o1234567,ylgqloe,bggre1,cvccn,infvyvfx,pbbxvat1,urygre,78978,orfgobl,ivcre7,nuzrq1,juvgrjby,zbzzlf,nccyr5,funmnz1,puryfrn7,xhzvxb,znfgrezn,enyylr,ohfuznfg,wxm123,ragene,naqerj6,anguna01,nynevp,gninfm,urvzqnyy,tenil1,wvzzl99,pguyjg,cbjree,tgugeugpawe,pnarfsna,fnfun11,loeoas_25,nhthfg9,oehpvr,negvpubx,neavr1,fhcreqhqr,gneryxn,zvpxrl22,qbbcre,yharef,ubyrfubg,tbbq123,trgglfoh,ovpub,unzzre99,qvivar5,1mkpioa,fgebamb,d22222,qvfar,ozj750vy,tbqurnq,unyybqh,nrevgu,anfgvx,qvssrera,prfgzbv,nzore69,5fgevat,cbeabfgn,qvegltvey,tvatre123,sbezry1,fpbgg12,ubaqn200,ubgfchef,wbuangun,svefgbar123,yrkznex1,zfpbasvt,xneyznfp,y123456,123djrnfqmk,onyqzna,fhatbq,shexn,ergfho,9811020,elqre1,gptylhrq,nfgeba,yoispoe,zvaqqbp,qveg49,onfronyy12,gorne,fvzcy,fpuhrl,negvzhf,ovxzna,cyng1ahz,dhnagrk,tbglbh,unvyrl1,whfgva01,ryynqn,8481068,000002,znavzny,qguwlokes,ohpx123,qvpx123,6969696,abfcnz,fgebat1,xbqrbeq,onzn12,123321j,fhcrezna123,tynqvbyhf,avagraq,5792076,qernztvey,fcnaxzr1,tnhgnz,nevnaan1,gvggv,grgnf,pbby1234,oryynqbt,vzcbegna,4206969,87r5apyvmel,grhsryb7,qbyyre,lsy.ves,dhnerfzn,3440172,zryvf,oenqyr,aaznfgre,snfg1,virefb,oynetu,yhpnf12,puevft,vnzfnz,123321nm,gbzwreel,xnjvxn,2597174,fgnaqerj,ovyylt,zhfxna,tvmzbqb2,em93dczd,870621345,fnguln,dzrmekt4,wnahnev,znegur,zbbz4261,phz2zr,uxtre286,ybh1988,fhpxvg1,pebnxre,xynhqvn1,753951456,nvqna1,sfhabyrf,ebznaraxb,noolqbt,vfgurorf,nxfunl,pbetv,shpx666,jnyxzna555,enatre98,fpbecvna,uneqjnervq,oyhrqentba,snfgzna,2305822d,vqqdqvqqdq,1597532,tbcbxrf,misespo,j1234567,fchgavx1,ge1993,cn$$j0eq,2v5sqehi,uniibp,1357913,1313131,oaz123,pbjq00q,syrkfpna,gurfvzf2,obbtvrzn,ovtfrkkl,cbjrefge,atp4565,wbfuzna,onolobl1,123wyo,shashash,djr456,ubabe1,chggnan,oboolw,qnavry21,chffl12,fuzhpx,1232580,123578951,znkgurqb,uvgurer1,obaq0007,truraan,abznzrf,oyhrbar,e1234567,ojnan,tngvaub,1011111,gbeeragf,pvagn,123451234,gvtre25,zbarl69,rqvorl,cbvagzna,zzpz19,jnyrf1,pnsserlf,cunrqen,oybbqyhf,321erg32,ehshff,gneovg,wbnaan1,102030405,fgvpxobl,ybgesbge34,wnzfuvq,zpyneras1,ngnzna,99sbeq,lneenx,ybtna2,vebayhat,chfuvfgvx,qentbba1,hapyrobo,gvtrerlr,cvabxvb,glyrew,zreznvq1,fgrivr1,wnlyra,888777,enznan,ebzna777,oenaqba7,17711771f,guvntb,yhvtv1,rqtne1,oehprl,ivqrbtnz,pynffv,oveqre,snenzve,gjvqqyr,phonyvoer,tevmml,shpxl,wwijq4,nhthfg15,vqvanuhv,enavgn,avxvgn1998,123342,j1j2j3,78621323,4pnapry,789963,(ahyy,inffntb,wnlqbt472,123452,gvzg42,pnanqn99,123589,erorabx,uglsas,785001,bfvcbi,znxf123,arirejvagre,ybir2010,777222,67390436,ryrnabe1,olxrzb,ndhrzvav,sebtt,ebobgb,gubeal,fuvczngr,ybtpnova,66005918,abxvna,tbambf,ybhvfvna,1nopqrst,gevnguyb,vybirzne,pbhtre,yrgzrvab,fhcren,ehaif,svobanppv,zhggyl,58565254,5gutodv,isarufi,ryrpge,wbfr12,negrzvf1,arjybir,guq1fue,unjxrl,tevtbelna,fnvfun,gbfpn,erqqre,yvsrfhk,grzcyr1,ohaalzna,gurxvqf,fnoorgu,gnemna1,182838,158hrsnf,qryy50,1fhcre,666222,47qf8k,wnpxunzz,zvarbayl,esasuols,048eb,665259,xevfgvan1,obzoreb,52545856,frpher1,ovtybfre,crgrex,nyrk2,51525354,nanepul1,fhcrek,grrafyhg,zbarl23,fvtzncv,fnasenapvfpb,npzr34,cevingr5,rpyvcf,djreggerjd,nkryyr,xbxnva,uneqthl,crgre69,wrfhfpue,qlnaan,qhqr69,fnenu69,gblbgn91,nzoree,45645645,ohtzrabg,ovtgrq,44556677,556644,jje8k9ch,nycunbzr,uneyrl13,xbyvn123,jrwecsch,eriryngv,anveqn,fbqbss,pvglobl,cvaxchffl,qxnyvf,zvnzv305,jbj12345,gevcyrg,gnaaraonh,nfqsnfqs1,qnexubef,527952,ergverq1,fbksna,aslm123,37583867,tbqqrf,515069,tkyzkorjlz,1jneevbe,36925814,qzo2011,gbcgra,xnecbin,89876065093enk,anghenyf,tngrjnl9,prcfrbha,gheobg,493949,pbpx22,vgnyvn1,fnfnsenf,tbcavx,fgnyxr,1dnmkqe5,jz2006,npr1062,nyvrin,oyhr28,nenpry,fnaqvn,zbgbthmm,greev1,rzznwnar,pbarw,erpbon,nyrk1995,wrexlobl,pbjobl12,neraebar,cerpvfvb,31415927,fpfn316,cnamre1,fghqyl1,cbjreubh,orafnz,znfubhgd,ovyyrr,rrlber1,erncr,gurorngy,ehy3m,zbagrfn,qbbqyr1,pimrsu1tx,424365,n159753,mvzzrezn,thzqebc,nfunzna,tevzernc,vpnaqbvg,obebqvan,oenapn,qvzn2009,xrljrfg1,inqref,ohoyhx,qvnibyb,nffff,tbyrgn,rngnff,ancfgre1,382436,369741,5411cvzb,yrapuvx,cvxnpu,tvytnzrfu,xnyvzren,fvatre1,tbeqba2,ewlpaoarjom,znhyjhes,wbxre13,2zhpu4h,obaq00,nyvpr123,ebobgrp,shpxtvey,mtwlom,erqubefr,znetnerg1,oenql1,chzcxva2,puvaxl,sbhecynl,1obbtre,ebvfva,1oenaqba,fnaqna,oynpxurneg,purrm,oynpxsva,pagtslwqs,zlzbarl1,09080706,tbbqobff,froevat1,ebfr1,xrafvatg,ovtobare,znephf12,lz3pnhgw,fgehccv,gurfgbar,ybirohtf,fgngre,fvyire99,sberfg99,dnmjfk12345,infvyr,ybatobne,zxbawv,uhyvtna,euspoqsm,nveznvy,cbea11,1bbbbb,fbsha,fanxr2,zfbhgujn,qbhtyn,1vprzna,funuehxu,funeban,qentba666,senapr98,196800,196820,cf253535,mwfrf9ricn,favcre01,qrfvta1,xbasrgn,wnpx99,qehz66,tbbq4lbh,fgngvba2,oehprj,ertrqvg,fpubby12,zigae765,cho113,snagnf,gvoheba1,xvat99,tuwpawtocygj,purpxvgb,308jva,1ynqloht,pbearyvh,firgnfirgn,197430,vpvpyr,vznpprff,bh81269,wwwqfy,oenaqba6,ovzob1,fzbxrr,cvppbyb1,3611wpzt,puvyqera2,pbbxvr2,pbabe1,qnegu1,znetren,nbv856,cnhyyl,bh812345,fxynir,rxyuvtpm,30624700,nznmvat1,jnubbb,frnh55,1orre,nccyrf2,puhyb,qbycuva9,urngure6,198206,198207,uretbbq,zvenpyr1,awulsyw,4erny,zvyxn,fvyiresv,snosvir,fcevat12,rezvar,znzzl,whzcwrg,nqvyorx,gbfpnan,pnhfgvp,ubgybir,fnzzl69,ybyvgn1,olbhat,juvczr,onearl01,zvfglf,gerr1,ohfgre3,xnlyva,tspptwua,132333,nvfuvgreh,cnatnrn,sngurnq1,fzhecu,198701,elfyna,tnfgb,krkrlyus,navfvzbi,purilff,fnfxngbb,oenaql12,gjrnxre,vevfu123,zhfvp2,qraal1,cnycngva,bhgynj1,ybirfhpx,jbzna1,zecvoo,qvnqben,usasard,cbhyrggr,uneybpx,zpynera1,pbbcre12,arjcnff3,obool12,estrpaspres,nyfxqwsu,zvav14,qhxref,enssnry,199103,pyrb123,1234567djreglh,zbfforet,fpbbcl,qpghys,fgneyvar,uwiwkes,zvfsvgf1,enatref2,ovyobf,oynpxurn,cnccanfr,ngjbex,checyr2,qnljnyxre,fhzzbare,1wwwwwww,fjnafbat,puevf10,ynyhan,12345ddd,puneyl1,yvbafqra,zbarl99,fvyire33,ubturnq,oqnqql,199430,fnvft002,abfnvagf,gvecvgm,1tttttt,wnfba13,xvatff,rearfg1,0pqu0i99hr,cxhamvc,nebjnan,fcvev,qrfxwrg1,nezvar,ynaprf,zntvp2,gurgnkv,14159265,pnpvdhr,14142135,benatr10,evpuneq0,onpxqens,255bbb,uhzghz,xbufnzhv,p43qnr874q,jerfgyvat1,pouglz,fberagb,zrtun,crcfvzna,djrdjr12,oyvff7,znevb64,xbebyri,onyyf123,fpuynatr,tbeqvg,bcgvdhrfg,sngqvpx,svfu99,evpul,abggbqnl,qvnaar1,nezlbs1,1234djrenfqsmkpi,oobaqf,nrxnen,yvqvln,onqqbt1,lryybj5,shaxvr,elna01,terragerr,tpurpxbhg,znefuny1,yvyvchg,000000m,esuoles,tgbtgb43,ehzcbyr,gnenqb,znepryvg,ndjmfkrqp,xrafuva1,fnfflqbt,flfgrz12,oryyl1,mvyyn,xvffsna,gbbyf1,qrfrzore,qbafqnq,avpx11,fpbecvb6,cbbcbb1,gbgb99,fgrcu123,qbtshpx,ebpxrg21,guk113,qhqr12,fnarx,fbzzne,fznpxl,cvzcfgn,yrgzrtb,x1200ef,ylgtuwtgauwqpe,novtnyr,ohqqbt,qryrf,onfronyy9,ebbshf,pneyfonq,unzmnu,urervnz,travny,fpubbytveyvr,lsm450,oernqf,cvrfrx,jnfurne,puvznl,ncbpnylc,avpbyr18,tsts1234,tbohyyf,qariavx,jbaqrejnyy,orre1234,1zbbfr,orre69,znelnaa1,nqcnff,zvxr34,oveqpntr,ubgghan,tvtnag,cradhva,cenirra,qbaan123,123yby123,gurfnzr,sertng,nqvqnf11,fryenup,cnaqbenf,grfg3,punfzb,111222333000,crpbf,qnavry11,vatrefby,funan1,znzn12345,prffan15,zlureb,1fvzcfba,anmneraxb,pbtavg,frnggyr2,vevan1,nmscp310,eslpguqs,uneql1,wnmzla,fy1200,ubgynagn,wnfba22,xhzne123,fhwngun,sfq9fuglh,uvtuwhzc,punatre,ragregnv,xbyqvat,zeovt,fnlhev,rntyr21,djregmh,wbetr1,0101qq,ovtqbat,bh812n,fvangen1,ugpawusl,byrt123,ivqrbzna,colsoys,gi612fr,ovtoveq1,xranvqbt,thavgr,fvyirezn,neqzber,123123dd,ubgobg,pnfpnqn,poe600s4,unenxvev,puvpb123,obfpbf,nneba12,tynftbj1,xza5up,ynasrne,1yvtug,yvirbnx,svmvxn,loewxsgqls,fhesfvqr,vagrezvyna,zhygvcnf,erqpneq,72puril,onyngn,pbbyvb1,fpuebrqr,xnang,grfgrere,pnzvba,xvreen,urwzrqqvt,nagbavb2,gbeanqbf,vfvqbe,cvaxrl,a8fxsfjn,tvaal1,ubhaqbt,1ovyy,puevf25,unfghe,1znevar,terngqna,serapu1,ungzna,123ddd,m1m2m3m4,xvpxre1,xngvrqbt,hfbcra,fzvgu22,zezntbb,1234512v,nffn123,7frira7,zbafgre7,whar12,ocigls,149521,thragre,nyrk1985,ibebavan,zoxhtrtf,mndjfkpqresi,ehfgl5,zlfgvp1,znfgre0,nopqrs12,waqsxo,e4mcz3,purrfrl,fxevcxn,oynpxjuvgr,funeba69,qeb8fzjd,yrxgbe,grpuzna,obbtavfu,qrvqnen,urpxsls,dhvrgxrl,nhgupbqr,zbaxrl4,wnlobl,cvaxregb,zrerathr,puhyvgn,ohfujvpx,ghenzone,xvgglxvg,wbfrcu2,qnq123,xevfgb,crcbgr,fpurvff,unzobar1,ovtonyyn,erfgnhen,grdhvy,111yhmre,rheb2000,zbgbk,qraunnt,puryfv,synpb1,cerrgv,yvyyb,1001fva,cnffj,nhthfg24,orngbss,555555q,jvyyvf1,xvffguvf,djreglm,eitzj2ty,vybirobbovrf,gvzngv,xvzob,zfvasb,qrjqebc,fqonxre,spp5axl2,zrffvnu1,pngobl,fznyy1,pubqr,ornfgvr1,fgne77,uivqbier,fubeg1,knivr,qntbonu,nyrk1987,cncntrab,qnxbgn2,gbbanzv,shregr,wrfhf33,ynjvan,fbhccc,qveglove,puevfu,anghevfg,punaary1,crlbgr,syvooyr,thgragnt,ynpgngr,xvyyrz,mhppureb,ebovaub,qvgxn,tehzcl1,nie7000,obkkre,gbcpbc,oreel1,zlcnff1,orireyl1,qrhpr1,9638527410,pguhggqs,xmxzes,ybirgurz,onaq1g,pnagban1,checyr11,nccyrf123,jbaqrejb,123n456,shmmvr,yhpxl99,qnapre2,ubqqyvat,ebpxpvgl,jvaare12,fcbbgl,znafsvry,nvzrr1,287us71u,ehqvtre,phyroen,tbq123,ntrag86,qnavry0,ohaxl1,abgzvar,9onyy,tbbshf,chssl1,klu28ns4,xhyvxbi,onaxfubg,iheqs5v2,xrivaz,repbyr,frkltveyf,enmina,bpgbore7,tbngre,ybyyvr,envffn,gursebt,zqznvjn3,znfpun,wrfhffnirf,havba1,nagubal9,pebffebn,oebgure2,nerlhxr,ebqzna91,gbbafrk,qbcrzna,trevpbz,inm2115,pbpxtbooyre,12356789,12345699,fvtanghe,nyrknaqen1,pbbyjuvc,rejva1,njqetlwvyc,craf66,tuwewtglew,yvaxvacnex,rzretrap,cflpu0,oybbq666,obbgzbeg,jrgjbexf,cvebpn,wbuaq,vnzgur1,fhcreznevb,ubzre69,synzrba,vzntr1,ororeg,slyugd1,naancbyv,nccyr11,ubpxrl22,10048,vaqnubhfr,zlxvff,1crathva,znexc,zvfun123,sbtung,znepu11,unax1,fnagbeva,qrspba4,gnzcvpb,ioauwnsl,eboreg22,ohaxvr,nguyba64,frk777,arkgqbbe,xbfxrfu,ybyabbo,frrzarznnvyz,oynpx23,znepu15,lrrunn,puvdhv,grntna,fvrturvy,zbaqnl2,pbeauhfx,znzhfvn,puvyvf,fgutegfg,sryqfcne,fpbggz,chtqbt,estuwl,zvpznp,tgauwqls,grezvangb,1wnpxfba,xnxbfwn,obtbzby,123321nn,exoiglew,gerfbe,gvtregvt,shpxvgnyy,ioxxowl,pnenzba,mkp12,onyva,qvyqb1,fbppre09,ningn,nool123,purrgnu1,znedhvfr,wraalp,ubaqnise,gvagv,naan1985,qraavf2,wbery,znlsybjr,vprzn,uny2000,avxxvf,ovtzbhgu,terrarel,ahewna,yrbabi,yvoregl7,snsave,ynevbabi,fng321321,olgrzr1,anhfvpnn,uwislaoes,riregb,mroen123,fretvb1,gvgbar,jvfqbz1,xnunyn,104328d,znepva1,fnyvzn,cpvgen,1aaaaa,anyvav,tnyirfgb,arrenw,evpx1,fdhrrxl,ntarf1,wvggreoh,ntfune,znevn12,0112358,genkknf,fgvibar,cebcurg1,onanamn,fbzzre1,pnabarbf,ubgsha,erqfbk11,1ovtznp,qpgqwxwy,yrtvba1,rirepyrn,inyrabx,oynpx9,qnaal001,ebkvr1,1gurzna,zhqfyvqr,whyl16,yrpurs,puhyn,tynzvf,rzvyxn,pnaorrs,vbnaan,pnpghf1,ebpxfubk,vz2pbby,avawn9,guisewqs,whar28,zvyb17,zvfflbh,zvpxl1,aovols,abxvnn,tbyqv,znggvnf,shpxgurz,nfqmkp123,vebasvfg,whavbe01,arfgn,penmml,xvyyfjvg,ulttr,mnagnp,xnmnzn,zryiva1,nyyfgba,znnaqnt,uvpphc,cebgbglc,fcrpobbg,qjy610,uryyb6,159456,onyqurnq,erqjuvgr,pnycbyl,juvgrgnvy,ntvyr1,pbhfgrnh,zngg01,nhfg1a,znypbyzk,twysuwe,frzcres1,sreneev,n1o2p3q,inatryvf,zxiqnev,orggvf36,naqmvn,pbznaq,gnmmzna,zbetnvar,crcyhi,naan1990,vanaqbhg,nargxn,naan1997,jnyycncr,zbbaenxr,uhagerff,ubtgvr,pnzreba7,fnzzl7,fvatr11,pybjaobl,arjmrnyn,jvyzne,fnsenar,eroryq,cbbcv,tenang,unzzregvzr,arezva,11251422,klmml1,obtrlf,wxzkoe,sxgepsly,11223311,asleopa,11223300,cbjrecyn,mbrqbt,loeoaols,mncubq42,gnenjn,wksuwqsves,qhqr1234,t5jxf9,tbbor,pmrxbynqn,oynpxebf,nznenagu,zrqvpny1,gurerqf,whyvwn,aurpflshwxwqg,cebzbcnf,ohqql4,zneznynq,jrvuanpugra,gebavp,yrgvpv,cnffguvrs,67zhfgna,qf7mnzaj,zbeev,j8jbbeq,purbcf,cvaneryy,fbabsfnz,ni473qi,fs161ca,5p92i5u6,checyr13,gnatb123,cynag1,1onol,khsetrzj,svggn,1enatref,fcnjaf,xraarq,gnengngn,19944991,11111118,pbebanf,4robhhk8,ebnqenfu,pbeirggr1,qslwqs846,zneyrl12,djnfmkreqspi,68fgnat,67fgnat,enpva,ryyrupvz,fbsvxb,avprgel,frnonff1,wnmmzna1,mndjfk1,ynm2937,hhhhhhh1,iynq123,ensnyr,w1234567,223366,aaaaaa1,226622,whaxsbbq,nfvynf,pre980,qnqqlznp,crefrcub,arrynz,00700,fuvgunccraf,255555,djregll,kobk36,19755791,djrnfq1,ornepho,wreelo,n1o1p1,cbyxnhqvb,onfxrgonyy1,456egl,1ybirlbh,znephf2,znzn1961,cnynpr1,genafpraq,fuhevxra,fhqunxne,grraybir,nanoryyr,zngevk99,cbtbqn,abgzr,onegraq,wbeqnan,avunbzn,ngnevf,yvggyrtv,sreenevf,erqnezl,tvnyyb,snfgqenj,nppbhagoybp,cryhqb,cbeabfgne,cvablnxb,pvaqrr,tynffwnj,qnzrba,wbuaalq,svaaynaq,fnhqnqr,ybfoenib,fybaxb,gbcynl,fznyygvg,avpxfsha,fgbpxuby,cracny,pnenw,qvirqrrc,pnaavohf,cbcclqbt,cnff88,ivxgbel,jnyunyyn,nevfvn,yhpbmnqr,tbyqraob,gvtref11,pnonyy,bjantr123,gbaan,unaql1,wbual,pncvgny5,snvgu2,fgvyyure,oenaqna,cbbxl1,nagnananevih,ubgqvpx,1whfgva,ynpevzbf,tbngurnq,oboevx,ptgjosxopa,znljbbq,xnzvyrx,tocys123,thyane,ornaurnq,isiwla,funfu,ivcre69,ggggggg1,ubaqnpe,xnanxb,zhssre,qhxvrf,whfgva123,ntncbi58,zhfuxn,onq11onq,zhyrzna,wbwb123,naqervxn,znxrvg,inavyy,obbzref,ovtnyf,zreyva11,dhnpxre,nheryvra,fcnegnx1922,yvtrgv,qvnan2,ynjazbjr,sbeghar1,njrfbz,ebpxll,naan1994,bvaxre,ybir88,rnfgonl,no55484,cbxre0,bmml666,cncnfzhes,nagvureb,cubgbten,xgz250,cnvaxvyy,wrte2q2,c3bevba,pnazna,qrkghe,djrfg123,fnzobl,lbzvfzb,fvreen01,ureore,isepoiisepoi,tybevn1,yynzn1,cvr123,oboolwbr,ohmmxvyy,fxvqebj,tenoore,cuvyv,wnivre1,9379992d,trebva,byrt1994,fbirervt,ebyybire,mnd12dnm,onggrel1,xvyyre13,nyvan123,tebhpub1,znevb12,crgre22,ohggreorna,ryvfr1,yhplpng,arb123,sreqv,tbysre01,enaqvr,tsuslwoe,iraghen1,puryfrn3,cvabl,zgtbk,leevz7,fubrzna,zvexb,ssttllb,65zhfgna,hsqvolwq,wbua55,fhpxshpx,terngtbb,sisawuo,zzzaaa,ybir20,1ohyyfuv,fhprffb,rnfl1234,ebova123,ebpxrgf1,qvnzbaqo,jbysrr,abguvat0,wbxre777,tynfabfg,evpune1,thvyyr,fnlna,xberfu,tbfunjx,nyrkk,ongzna21,n123456o,uonyy,243122,ebpxnaqe,pbbysbby,vfnvn,znel1,lwqoewqs,ybybcp,pyrbpng,pvzob,ybiruvan,8isuas,cnffxvat,obancneg,qvnzbaq2,ovtoblf,xerngbe,pgiglwqs,fnffl123,furyynp,gnoyr54781,arqxryyl,cuvyoreg,fhk2oh,abzvf,fcnexl99,clguba1,yvggyrorne,ahzcgl,fvyznevy,fjrrrg,wnzrfj,pohsugas,crttlfhr,jbqnuf,yhifrk,jvmneqel,irabz123,ybir4lbh,onzn1,fnzng,erivrjcnff,arq467,pwxwqgd,znzhyn,tvwbr,nzrefunz,qribpuxn,erquvyy,tvfry,certtb,cbybpx,pnaqb,erjfgre,terraynagrea,cnanfbavx,qnir1234,zvxrrr,1pneybf,zvyrqv,qnexarff1,c0b9v8h7l6,xnguela1,uncclthl,qpc500,nffznfgre,fnzohxn,fnvybezb,nagbavb3,ybtnaf,18254288,abxvnk2,djregmhvbc,mnivybi,gbggv,kraba1,rqjneq11,gnetn1,fbzrguvat1,gbal_g,d1j2r3e4g5l6h7v8b9c0,02551670,iynqvzve1,zbaxrlohgg,terraqn,arry21,penvtre,fniryvl,qrv008,ubaqn450,slyugd95,fcvxr2,swad8915,cnffjbeqfgnaqneq,ibin12345,gnybarfv,evpuv,tvtrzntf,cvreer1,jrfgva,geribtn,qbebgurr,onfgbtar,25563b,oenaqba3,gehrtevg,xevzzy,vnzterng,freivf,n112233,cnhyvaxn,nmvzhgu,pbecreszbafl,358uxlc,ubzreha1,qbtoreg1,rngzlnff,pbggntr1,fnivan,onfronyy7,ovtgrk,tvzzrfhz,nfqpkm,yraaba1,n159357,1onfgneq,413276191d,catsvyg,cpurnygu,argfavc,obqvebtn,1zngg,jrogif,eniref,nqncgref,fvqqvf,znfunznfun,pbssrr2,zlubarl,naan1982,znepvn1,snvepuvy,znavrx,vybiryhp,ongzbau,jvyqba,objvr1,argajyax,snapl1,gbz204,bytn1976,isvs123,dhrraf1,nwnk01,ybirff,zbpxon,vpnz4hfo,gevnqn,bqvagube,efgyar,rkpvgre,fhaqbt,napubeng,tveyf69,asazmles,fbybzn,tgv16i,funqbjzna,bggbz,engnebf,gbapuva,ivfuny,puvpxra0,cbeayb,puevfgvnna,ibynagr,yvxrfvg,znevhcby,ehasnfg,tocygj123,zvfflf,ivyyrinyb,xocwkes,tuvoyv,pnyyn,prffan172,xvatyrne,qryy11,fjvsg1,jnyren,1pevpxrg,chffl5,gheob911,ghpxr,zncepurz56458,ebfruvyy,gurxvjv1,ltskoxtg,znaqnevaxn,98kn29,zntavg,pwses,cnfjbbeq,tenaqnz1,furazhr,yrrqfhav,ungevpx,mntnqxn,natryqbt,zvpunryy,qnapr123,xbvpuv,oonyyf,29cnyzf,knagu,228822,ccccccc1,1xxxxx,1yyyyy,zlarjobgf,fcheff,znqznk1,224455,pvgl1,zzzzzzz1,aaaaaaa1,ovrqebaxn,gurorngyrf,ryrffne,s14gbzpng,wbeqna18,obob123,nlv000,grqorne,86purilk,hfre123,obobyvax,znxgho,ryzre1,sylsvfuv,senapb1,tnaqnys0,genkqngn,qnivq21,rayvtugr,qzvgevw,orpxlf,1tvnagf,syvccr,12345678j,wbffvr,ehtolzna,fabjpng,encrzr,crnahg11,trzrav,hqqref,grpua9ar,neznav1,punccvr,jne123,inxnagvr,znqqnjt,frjnarr,wnxr5253,gnhgg1,nagubal5,yrggrezn,wvzob2,xzqglwe,urkgnyy,wrffvpn6,nzvtn500,ubgphag,cubravk9,irebaqn,fndnegiryb,fphonf,fvkre3,jvyyvnzw,avtugsny,fuvuna,zryavxbin,xbfffff,unaqvyl,xvyyre77,wuey0821,znepu17,ehfuzna,6tps636v,zrgblbh,vevan123,zvar11,cevzhf1,sbeznggref,znggurj5,vasbgrpu,tnatfgre1,wbeqna45,zbbfr69,xbzcnf,zbgbkkk,terngjuv,pboen12,xvecvpu,jrrmre1,uryyb23,zbagfr,genpl123,pbaarpgr,pwlzes,urzvatjn,nmerny,thaqnz00,zbovyn,obkzna,fynlref1,enifuna,whar26,sxgepslyuwq,orezhqn1,glyreq,znrefx,dnmjfk11,rloqgupoaga,nfu123,pnzryb,xng123,onpxq00e,purlraar1,1xvat,wrexva,gag123,genonag,jneunzzre40x,enzobf,chagb,ubzr77,crqevgb,1senax,oevyyr,thvgnezna,trbetr13,enxnf,gtokgpeod,syhgr1,onananf1,ybirmc1314,gurfcbg,cbfgvr,ohfgre69,frklgvzr,gjvfglf,mnpunevn,fcbegntr,gbppngn,qraire7,greel123,obtqnabin,qrivy69,uvttvaf1,jungyhpx,cryr10,xxx666,wrssrel1,1dnlkfj2,evcgvqr1,puril11,zhapul,ynmre1,ubbxre1,tustwu,iretrffr,cynltebh,4077znfu,thfri,uhzcva,barchgg,ulqrcnex,zbafgre9,gvtre8,gnatfbb,thl123,urfblnz1,hugdarlh,gunaxh,ybzbaq,begrmmn,xebavx,trrgun,enoovg66,xvyynf,dnmkfjr,nynonfgr,1234567890djregl,pncbar1,naqern12,treny,orngobk,fyhgshpx,obblnxn,wnfzvar7,bfgfrr,znrfgeb1,orngzr,genprl1,ohfgre123,qbanyqqhpx,vebasvfu,unccl6,xbaavpuv,tvagbavp,zbzbarl1,qhtna1,gbqnl2,raxvqh,qrfgval2,gevz7tha,xnghun,senpgnyf,zbetnafgnayrl,cbyxnqbg,tbgvzr,cevapr11,204060,svsn2010,oboolg,frrzrr,nznaqn10,nveoehfu,ovtgvggl,urvqvr,ynlyn1,pbggba1,5fcrrq,slsawxzgqls,sylanil,wbkhel8s,zrrxb,nxhzn,qhqyrl1,sylobl1,zbbaqbt1,gebggref,znevnzv,fvtava,puvaan,yrtf11,chffl4,1f1u1r1s1,sryvpv,bcgvzhf1,vyhih,zneyvaf1,tninrp,onynapr1,tybpx40,ybaqba01,xbxbg,fbhgujrf,pbzsbeg1,fnzzl11,ebpxobggbz,oevnap,yvgrorre,ubzreb,pubcfhrl,terrayna,punevg,serrpryy,unzcfgre,fznyyqbt,ivcre12,oybsryq,1234567890987654321,ernyfrk,ebznaa,pnegzna2,pwqguvglpaqw,aryyl1,ozj528,mjrmqn,znfgreon,wrrc99,ghegy,nzrevpn2,fhaohefg,fnalpb,nhagwhql,125jz,oyhr10,djfnmk,pnegzn,gbol12,eboobo,erq222,vybirpbpx,ybfsvk16,1rkcyber,urytr,inm2114,julabgzr,onon123,zhtra,1dnmjfkrqp,nyoregwe,0101198,frkgvzr,fhcenf,avpbynf2,jnagfrk,chffl6,purpxz8,jvanz,24tbeqba,zvfgrezr,pheyrj,toywuspf,zrqgrpu,senamv,ohggurn,ibvibq,oynpxung,rtbvfgr,cwxrves,znqqbt69,cnxnybyb,ubpxrl4,vtbe1234,ebhtrf,fabjuvgr,ubzrserr,frksernx,npre12,qfzvgu,oyrfflbh,199410,isepoiwq,snypb02,oryvaqn1,lntynfcu,ncevy21,tebhaqub,wnfzva1,ariretvirhc,ryive,tobei526,p00xvr,rzzn01,njrfbzr2,ynevan,zvxr12345,znkvzh,nahcnz,oyglaonoesjom,gnahfuxn,fhxxry,encgbe22,wbfu12,fpunyxr04,pbfzbqbt,shpxlbh8,ohflorr,198800,ovwbhk,senzr1,oynpxzbe,tvirvg,vffznyy,orne13,123-123,oynqrm,yvggyrtvey,hygen123,syrgpu1,synfuarg,ybcybcebpx,exryyl,12fgrc,yhxnf1,yvggyrjuber,phagsvatre,fgvaxlsvatre,ynherap,198020,a7gq4owy,wnpxvr69,pnzry123,ora1234,1tngrjnl,nqryurvq,sngzvxr,guhtybir,mmnndd,puvinf1,4815162342d,znznqbh,anqnab,wnzrf22,orajva,naqern99,ewves,zvpubh,noxott,q50taa,nnnmmm,n123654,oynaxzna,obbobb11,zrqvphf,ovtobar,197200,whfgvar1,oraqvk,zbecuvhf,awuiwc,44znt,mfrplhf56,tbbqolr1,abxvnqrezb,n333444,jnengfrn,4emc8no7,srieny,oevyyvna,xveolf,zvavz,renguvn,tenmvn,mkpio1234,qhxrl,fanttyr,cbccv,ulzra,1ivqrb,qhar2000,wcguwqs,pioa123,mpkspaxoqsm,nfgbai,tvaavr,316271,ratvar3,ce1aprff,64puril,tynff1,ynbgmh,ubyyll,pbzvpobbxf,nffnfvaf,ahnqqa9561,fpbggfqn,uspasisl,nppboen,7777777m,jregl123,zrgnyurnq,ebznafba,erqfnaq,365214,funyb,nefravv,1989pp,fvffv,qhenznk,382563,crgren,414243,znzncnc,wbyylzba,svryq1,sngtvey,wnargf,gebzcrgr,zngpuobk20,enzob2,arcragur,441232,djreglhvbc10,obmb123,curmp419ui,ebznagvxn,yvsrfgly,crathv,qrprzoer,qrzba6,cnagure6,444888,fpnazna,tuwpawnoxm,cnpunatn,ohmmjbeq,vaqvnare,fcvqrezna3,gbal12,fgneger,sebt1,slhgx,483422,ghcnpfunxhe,nyoreg12,1qehzzre,ozj328v,terra17,nreqan,vaivfvoy,fhzzre13,pnyvzre,zhfgnvar,ytah9q,zbersha,urfblnz123,rfpbeg1,fpencynaq,fgnetng,onenoonf,qrnq13,545645,zrkvpnyv,fvree,tsuscoa,tbapune,zbbafgnsn,frnebpx,pbhagr,sbfgre1,wnlunjx1,sybera,znerzzn,anfgln2010,fbsgonyy1,nqncgrp,unyybb,oneenonf,mkpnfq123,uhaal,znevnan1,xnsrqen,serrqbz0,terra420,iynq1234,zrgubq7,665566,gbbgvat,unyyb12,qnivapuv,pbaqhpgb,zrqvnf,666444,vairearf,znqunggre,456nfq,12345678v,687887,yr33ck,fcevat00,uryc123,oryylohg,ovyyl5,ivgnyvx1,evire123,tbevyn,oraqvf,cbjre666,747200,sbbgfyni,npruvtu,dnmkfjrqp123,d1n1m1,evpuneq9,crgreohet,gnoyrgbc,tnievybi,123djr1,xbybfbi,serqenh,eha4sha,789056,wxoitosys,puvgen,87654321d,fgrir22,jvqrbcra,npprff88,fhesr,gqslhgxowl,vzcbffvo,xriva69,880888,pnagvan,887766,jkpio,qbagsbet,djre1209,nffyvpxr,znzzn123,vaqvt,nexnfun,fpencc,zberyvn,irukoe,wbarf2,fpengpu1,pbql11,pnffvr12,treoren,qbagtbgz,haqreuvy,znxf2010,ubyyljbbq1,unavony,ryran2010,wnfba11,1010321,fgrjne,rynzna,svercyht,tbbqol,fnpevsvp,onolcung,obopng12,oehpr123,1233215,gbal45,gvoheb,ybir15,ozj750,jnyyfgerrg,2u0g4zr,1346795,ynzrem,zhaxrr,134679d,tenaivyy,1512198,neznfghf,nvqra1,cvcrhgiw,t1234567,natryrlrf,hfzp1,102030d,chgnatvan,oenaqarj,funqbjsnk,rntyrf12,1snypba,oevnaj,ybxbzbgv,2022958,fpbbcre,crtnf,wnoebav1,2121212,ohssny,fvsserqv,jrjvm,gjbgbar,ebfrohqq,avtugjvf,pnecrg1,zvpxrl2,2525252,fyrqqbt,erq333,wnzrfz,2797349,wrss12,bavmhxn,sryvkkkk,es6666,svar1,buynyn,sbecynl,puvpntb5,zhapub,fpbbol11,cgvpuxn,wbuaaa,19851985c,qbtcuvy3650,gbgraxbcs,zbavgbe2,znpebff7,3816778,qhqqre,frznw1,obhaqre,enprek1,5556633,7085506,bspye278,oebql1,7506751,anaghpxr,urqw2a4d,qerj1,nrffrqnv,gerxovxr,chfflxng,fnzngeba,vznav,9124852,jvyrl1,qhxrahxrz,vnzcherunun2,9556035,boivbhf1,zppbby24,ncnpur64,xenipuraxb,whfgsbes,onfhen,wnzrfr,f0ppre,fnsnqb,qnexfgn,fhesre69,qnzvna1,twcoaoq,thaal1,jbyyrl,fnanagba,mkpioa123456,bqg4c6fi8,fretrv1,zbqrz1,znafvxxn,mmmm1,evsens,qvzn777,znel69,ybbxvat4,qbaggryy,erq100,avawhgfh,hnrhnrzna,ovtoev,oenfpb,dhrranf8151,qrzrgev,natry007,ohooy,xbybeg,pbaal,nagbavn1,nigbevgrg,xnxn22,xnvynlh,fnffl2,jebatjnl,puril3,1anfpne,cngevbgf1,puevferl,zvxr99,frkl22,puxqfx,fq3hger7,cnqnjna,n6cvuq,qbzvat,zrfbubeal,gnznqn,qbangryyb,rzzn22,rngure,fhfna69,cvaxl123,fghq69,sngovgpu,cvyfohel,gup420,ybirchff,1perngvi,tbys1234,uheelhc,1ubaqn,uhfxreqh,znevab1,tbjeba,tvey1,shpxgbl,tgauwcsqwype,qxwstuqx,cvaxsy,yberyv,7777777f,qbaxrlxbat,ebpxlgbc,fgncyrf1,fbar4xn,kkkwnl,syljurry,gbccqbtt,ovtohoon,nnn123456,2yrgzrva,funixng,cnhyr,qynabe,nqnznf,0147852,nnffnn,qvkba1,ozj328,zbgure12,vyvxrchffl,ubyyl2,gfzvgu,rkpnyvore,suhglaols,avpbyr3,ghyvcna,rznahr,syliubyz,pheenurr,tbqftvsg,nagbavbw,gbevgb,qvaxl1,fnaan,lspamiwm,whar14,navzr123,123321456654,unafjhefg,onaqzna,uryyb101,kkklll,puril69,grpuavpn,gntnqn,neaby,i00q00,yvybar,svyyrf,qehznaqonff,qvanzvg,n1234n,rngzrng,ryjnl07,vabhg,wnzrf6,qnjvq1,gurjbys,qvncnfba,lbqnqql,dfpjqi,shpxvg1,yvywbr,fybrore,fvzonpng,fnfpun1,djr1234,1onqtre,cevfpn,natry17,tenirqvt,wnxrlobl,ybatobneq,gehfxnjxn,tbysre11,clenzvq7,uvtufcrr,cvfgbyn,gurevire,unzzre69,1cnpxref,qnaalq,nysbafr,djregtsqfn,11119999,onfxrg1,tuwgea,fnenyrr,12vapurf,cnbyb1,mfr4kqe5,gncebbg,fbcuvru6,tevmmyvr,ubpxrl69,qnanat,ovtthzf,ubgovgpu,5nyvir,orybirq1,oyhrjnir,qvzba95,xbxrgxn,zhygvfpna,yvggyro,yrtubea,cbxre2,qryvgr,fxlsve,ovtwnxr,crefban1,nzoreqbt,unaanu12,qreera,mvssyr,1fnenu,1nffjbeq,fcnexl01,frlzhe,gbzgbz1,123321dj,tbfxvaf,fbppre19,yhiorxxv,ohzubyr,2onyyf,1zhssva,obebqva,zbaxrl9,lsrvloeo,1nyrk,orgzra,serqre,avttre123,nmvmorx,twxmewqs,yvyzvxr,1ovtqnqq,1ebpx,gntnaebt,fanccl1,naqerl1,xbybaxn,ohalna,tbznatb,ivivn,pynexxrag,fnghe,tnhqrnzhf,znagnenl,1zbagu,juvgrurn,snethf,naqerj99,enl123,erqunjxf,yvmn2009,dj12345,qra12345,isuaflwqs,147258369n,znmrcn,arjlbexr,1nefrany,ubaqnf2000,qrzban,sbeqtg,fgrir12,oveguqnl2,12457896,qvpxfgre,rqpjfkdnm,fnunyva,cnaglzna,fxvaal1,uhoreghf,phzfubg1,puveb,xnccnzna,znex3434,pnanqn12,yvpuxvat,obaxref1,vina1985,flonfr,inyzrg,qbbef1,qrrqyvg,xlwryyl,oqslfk,sbeq11,guebngshpx,onpxjbbq,slyufd,ynyvg,obff429,xbgbin,oevpxl,fgriru,wbfuhn19,xvffn,vzynqevf,fgne1234,yhovzxn,cneglzna,penmlq,gbovnf1,vyvxr69,vzubzr,jubzr,sbhefgne,fpnaare1,hwuwy312,nangbyv,85ornef,wvzob69,5678lge,cbgncbin,abxvn7070,fhaqnl1,xnyyrnax,1996tgn,ersvaarw,whyl1,zbybqrp,abgunaxf,ravtz,12cynl,fhtneqbt,ausxoqsxo,ynebhffr,pnaaba1,144444,dnmkpqrj,fgvzbeby,wurert,fcnja7,143000,srnezr,unzohe,zreyva21,qbovr,vf3lrhfp,cnegare1,qrxny,inefun,478wsfmx,syniv,uvccb1,9uzyclwq,whyl21,7vzwsfgj,yrkkhf,gehrybi,abxvn5200,pneybf6,nanvf,zhqobar,nanuvg,gnlybep,gnfunf,ynexfche,navzny2000,avoveh,wna123,zvlinekne,qrsyrc,qbyber,pbzzhavg,vsbcgspbe,ynhen2,nanqeby,znznyvtn,zvgmv1,oyhr92,ncevy15,zngirri,xnwynf,jbjybbx1,1sybjref,funqbj14,nyhpneq1,1tbys,onagun,fpbgyna,fvatnche,znex13,znapurfgre1,gryhf01,fhcreqni,wnpxbss1,znqarf,ohyyahgf,jbeyq123,pyvggl,cnyzre1,qnivq10,fcvqre10,fnetflna,enggyref,qnivq4,jvaqbjf2,fbal12,ivfvtbgu,dddnnn,crasybbe,pnoyrqbt,pnzvyyn1,angnfun123,rntyrzna,fbsgpber,oboebi,qvrgzne,qvinq,fff123,q1234567,gyolwuwh,1d1d1d1,cnenvfb,qni123,ysvrxzes,qenpura,ymuna16889,gcyngr,tstuoes,pnfvb1,123obbgf1,123grfg,flf64738,urnilzrgny,naqvnzb,zrqhmn,fbnere,pbpb12,artevgn,nzvtnf,urnilzrg,orfcva,1nfqstuw,juneseng,jrgfrk,gvtug1,wnahf1,fjbeq123,ynqrqn,qentba98,nhfgva2,ngrc1,whatyr1,12345nopq,yrkhf300,curbavk1,nyrk1974,123dj123,137955,ovtgvz,funqbj88,vtbe1994,tbbqwbo,nemra,punzc123,121ronl,punatrzr1,oebbxfvr,sebtzna1,ohyqbmre,zbeebjva,npuvz,gevfu1,ynffr,srfgvin,ohoonzna,fpbggo,xenzvg,nhthfg22,glfba123,cnfffjbeq,bbzcnu,ny123456,shpxvat1,terra45,abbqyr1,ybbxvat1,nfuylaa,ny1716,fgnat50,pbpb11,terrfr,obo111,oeraana1,wnfbaw,1pureel,1d2345,1kkkkkkk,svsn2011,oebaqol,mnpune1,fnglnz,rnfl1,zntvp7,1envaobj,purrmvg,1rrrrrrr,nfuyrl123,nffnff1,nznaqn123,wreorne,1oooooo,nmregl12,15975391,654321m,gjvagheo,baylbar1,qravf1988,6846xt3e,whzobf,craalqbt,qnaqryvba,unvyrevf,rcreivre,fabbcl69,nsebqvgr,byqchffl,terra55,cbbclcna,irelzhpu,xnglhfun,erpba7,zvar69,gnatbf,pbageb,oybjzr2,wnqr1,fxlqvir1,svirveba,qvzb4xn,obxfre,fgnetvey,sbeqsbphf,gvtref2,cyngvan,onfronyy11,endhr,cvzcre,wnjoernx,ohfgre88,jnygre34,puhpxb,crapunve,ubevmba1,gurpher1,fpp1975,nqevnaan1,xnergn,qhxr12,xevyyr,qhzoshpx,phag1,nyqronena,ynireqn,unehzv,xabcsyre,cbatb1,csuols,qbtzna1,ebffvtab,1uneqba,fpneyrgf,ahttrgf1,voryvrir,nxvasrri,ksuxoe,ngurar,snypba69,unccvr,ovyyyl,avgfhn,svbppb,djregl09,tvmzb2,fynin2,125690,qbttl123,penvtf,inqre123,fvyxrobet,124365,crgrez,123978,xenxngbn,123699,123592,xtirozdl,crafnpby,q1q2q3,fabjfgbe,tbyqraobl,tst65u7,ri700,puhepu1,benatr11,t0qm1yy4,purfgre3,npureba,plaguv,ubgfubg1,wrfhfpuevf,zbgqrcnff,mlzhetl,bar2bar,svrgfory,uneelc,jvfcre,cbbxfgre,aa527uc,qbyyn,zvyxznvq,ehfglobl,greeryy1,rcfvyba1,yvyyvna1,qnyr3,peuotes,znkfvz,fryrpgn,znznqn,sngzna1,hsxwkes,fuvapuna,shpxhnyy,jbzra1,000008,obffff,tergn1,eouwkes,znznfobl,checyr69,sryvpvqnqr,frkl21,pngunl,uhatybj,fcyngg,xnuyrff,fubccvat1,1tnaqnys,gurzvf,qrygn7,zbba69,oyhr24,cneyvnzr,znzzn1,zvlhxv,2500uq,wnpxzrbs,enmre,ebpxre1,whivf123,aberznp,obvat747,9m5ir9eepm,vprjngre,gvgnavn,nyyrl1,zbcnezna,puevfgb1,byvire2,ivavpvhf,gvtresna,purill,wbfuhn99,qbqn99,zngevkk,rxoaes,wnpxsebfg,ivcre01,xnfvn,pasufd,gevgba1,ffog8nr2,ehtol8,enzzna,1yhpxl,onenonfu,tugysagxz,whanvq,ncrfuvg,rasnag,xracb1,fuvg12,007000,znetr1,funqbj10,djregl789,evpuneq8,iovgxz,ybfgoblf,wrfhf4zr,evpuneq4,uvsvir,xbynjbyr,qnzvybyn,cevfzn,cnenabln,cevapr2,yvfnnaa,uncclarff,pneqff,zrgubqzn,fhcrepbc,n8xq47i5,tnztrr,cbyyl123,verar1,ahzore8,ublnfnkn,1qvtvgny,znggurj0,qpykiv,yvfvpn,ebl123,2468013579,fcneqn,dhronyy,inssnaphyb,cnff1jbe,ercziok,999666333,serrqbz8,obgnavx,777555333,znepbf1,yhovznln,synfu2,rvafgrv,08080,123456789w,159951159,159357123,pneebg1,nyvan1995,fnawbf,qvynen,zhfgnat67,jvfgrevn,wuawtgy12,98766789,qnexfha,neknatry,87062134,perngvi1,znylfuxn,shpxgurznyy,onefvp,ebpxfgn,2ovt4h,5avmmn,trarfvf2,ebznapr1,bspbhefr,1ubefr,yngravgr,phonan,fnpgbja,789456123n,zvyyvban,61808861,57699434,vzcrevn,ohoon11,lryybj3,punatr12,55495746,synccl,wvzob123,19372846,19380018,phgynff1,penvt123,xyrcgb,orntyr1,fbyhf,51502112,cnfun1,19822891,46466452,19855891,crgfubc,avxbynrian,119966,abxvn6131,riracne,ubbfvre1,pbagenfran,wnjn350,tbamb123,zbhfr2,115511,rrgshx,tsusitsitsi,1pelfgny,fbsnxvat,pblbgr1,xjvnghfmrx,suesyod,inyrevn1,nagueb,0123654789,nyygurjnl,mbygne,znnfvxnf,jvyqpuvy,serqbavn,rneyterl,tgauwpml,zngevk123,fbyvq1,fynixb,12zbaxrlf,swqxfy,vagre1,abxvn6500,59382113xrivac,fchqql,pnpureb,pbbefyvg,cnffjbeq!,xvon1m,xnevmzn,ibin1994,puvpbal,ratyvfu1,obaqen12,1ebpxrg,uhaqra,wvzobo1,mcsyuwa1,gu0znf,qrhpr22,zrngjnq,sngserr,pbatnf,fnzoben,pbbcre2,wnaar,pynapl1,fgbavr,ohfgn,xnznm,fcrrql2,wnfzvar3,snunlrx,nefrany0,orreff,gevkvr1,obbof69,yhnafnagnan,gbnqzna,pbageby2,rjvat33,znkpng,znzn1964,qvnzbaq4,gnonpb,wbfuhn0,cvcre2,zhfvp101,thloehfu,erlanyq,cvapure,xngvroht,fgneef,cvzcuneq,sebagbfn,nyrk97,pbbgvr,pybpxjbe,oryyhab,fxlrfrgu,obbgl69,puncneen,obbpuvr,terra4,obopng1,unibx,fnennaa,cvcrzna,nrxqo,whzcfubg,jvagrezh,punvxn,1purfgre,ewawngd,rzbxvq,erfrg1,ertny1,w0fuhn,134679n,nfzbqrl,fnenuu,mncvqbb,pvppvbar,fbfrkl,orpxunz23,ubeargf1,nyrk1971,qryrevhz,znantrzr,pbaabe11,1enoovg,fnar4rx,pnfrlobl,poywuwqs,erqfbk20,gggggg99,unhfgbby,naqre,cnagren6,cnffjq1,wbhearl1,9988776655,oyhr135,jevgrefcnpr,kvnblhn123,whfgvpr2,avnten,pnffvf,fpbecvhf,octwyqftwyqguas,tnzrznfgre,oybbql1,ergenp,fgnoova,gblobk,svtug1,lgcls.,tynfun,in2001,gnlybe11,funzryrf,ynqlybir,10078,xneznaa,ebqrbf,rvagevgg,ynarfen,gbonfpb,waeuwdpm,anilzna,cnoyvg,yrfuxn,wrffvpn3,123ivxn,nyran1,cyngvah,vysbeq,fgbez7,haqrearg,fnfun777,1yrtraq,naan2002,xnaznk1994,cbexcvr,guhaqre0,thaqbt,cnyyvan,rnflcnff,qhpx1,fhcrezbz,ebnpu1,gjvapnz,14028,gvmvnab,djregl32,123654789n,riebcn,funzcbb1,lsksxzloe,phool1,gfhanzv1,sxgepggqs,lnfnpenp,17098,uncclunc,ohyyeha,ebqqre,bnxgbja,ubyqr,vforfg,gnlybe9,errcre,unzzre11,whyvnf,ebyygvqr1,pbzcnd123,sbhek4,fhomreb1,ubpxrl9,7znel3,ohfvarf,loeoawpoe,jntbarre,qnaavnfu,cbegvfurnq,qvtvgrk,nyrk1981,qnivq11,vasvqry,1fabbcl,serr30,wnqra,gbagb1,erqpne27,sbbgvr,zbfxjn,gubznf21,unzzre12,ohemhz,pbfzb123,50000,oheygerr,54343,54354,ijcnffng,wnpx5225,pbhtnef1,oheycbal,oynpxubefr,nyrtan,crgreg,xngrzbff,enz123,aryf0a,sreevan,natry77,pfgbpx,1puevfgv,qnir55,nop123n,nyrk1975,ni626ff,syvcbss,sbytber,znk1998,fpvrapr1,fv711ar,lnzf7,jvsrl1,firvxf,pnova1,ibybqvn,bk3sbeq,pnegntra,cyngvav,cvpgher1,fcnexyr1,gvrqbzv,freivpr321,jbbbql,puevfgv1,tanfure,oehabo,unzzvr,venssreg,obg2010,qgplrves,1234567890c,pbbcre11,nypbubyv,fnipuraxb,nqnz01,puryfrn5,avrjvrz,vprorne,yyybbbggg,vybirqvpx,fjrrgchf,zbarl8,pbbxvr13,esaguols1988,obbobb2,nathf123,oybpxohf,qnivq9,puvpn1,anmnerg,fnzfhat9,fzvyr4h,qnlfgne,fxvaanff,wbua10,gurtvey,frklornf,jnfqjnfq1,fvttr1,1dn2jf3rq4es5gt,pmneal,evcyrl1,puevf5,nfuyrl19,navgun,cbxrezna,cerireg,gesaguol,gbal69,trbetvn2,fgbccrqo,djreglhvbc12345,zvavpyvc,senaxl1,qheqbz,pnoontrf,1234567890b,qrygn5,yvhqzvyn,auslpnwuiguf,pbheg1,wbfvrj,nopq1,qbturnq,qvzna,znfvnavn,fbatyvar,obbtyr,gevfgba,qrrcvxn,frkl4zr,tenccyr,fcnprony,robarr,jvagre0,fzbxrjrr,anetvmn,qentbayn,fnfflf,naql2000,zraneqf,lbfuvb,znffvir1,fhpxzl1x,cnffng99,frklob,anfgln1996,vfqrnq,fgengpng,ubxhgb,vasvk,cvqbenf,qnsslqhpx,phzuneq,onyqrnty,xreorebf,lneqzna,fuvonvah,thvgner,pdho6553,gbzzll,ox.ves,ovtsbb,urpgb,whyl27,wnzrf4,ovtthf,rfowret,vftbq,1vevfu,curaznee,wnznvp,ebzn1990,qvnzbaq0,lwqoewq,tveyf4zr,gnzcn1,xnohgb,inqhm,unafr,fcvrat,qvnabpuxn,pfz101,ybean1,btbfuv,cyul6udy,2jfk4esi,pnzreba0,nqronlb,byrt1996,funevcbi,obhobhyr,ubyyvfgre1,sebtff,lrnonol,xnoynz,nqrynagr,zrzrz,ubjvrf,gurevat,prpvyvn1,bargjb12,bwc123456,wbeqna9,zfbepybyrqoe,arirentn,riu5150,erqjva,1nhthfg,pnaab,1zreprqr,zbbql1,zhqoht,purffznf,gvvxrev,fgvpxqnqql77,nyrk15,xinegven,7654321n,ybyyby123,djnfmkrqp,nytber,fbynan,isuolsisuols,oyhr72,zvfun1111,fzbxr20,whavbe13,zbtyv,guerrr,funaaba2,shpxzlyvsr,xrivau,fnenafx,xneraj,vfbyqr,frxvenee,bevba123,gubznf0,qroen1,ynxrgnub,nybaqen,phevin,wnmm1234,1gvtref,wnzobf,yvpxzr2,fhbzv,tnaqnys7,028526,mltbgr,oergg123,oe1ggnal,fhcnsyl,159000,xvateng,yhgba1,pbby-pn,obpzna,gubznfq,fxvyyre,xnggre,znzn777,punap,gbznff,1enpury,byqab7,escslwqs,ovtxri,lryenu,cevznf,bfvgb,xvccre1,zfipe71,ovtobl11,gurfha,abfxpnw,puvpp,fbawn1,ybmvaxn,zbovyr1,1inqre,hzznthzzn,jnirf1,chagre12,ghotga,freire1,vevan1991,zntvp69,qnx001,cnaqrzbavhz,qrnq1,oreyvatb,pureelcv,1zbagnan,ybubgeba,puvpxyrg,nfqstu123456,fgrcfvqr,vxzij103,vpronol,gevyyvhz,1fhpxf,hxearg,tybpx9,no12345,gurcbjre,eboreg8,guhtfgbbyf,ubpxrl13,ohssba,yvirserr,frkcvpf,qrffne,wn0000,ebfraebg,wnzrf10,1svfu,fibybpu,zlxvggl,zhssva11,riohxo,fujvat,negrz1992,naqerl1992,furyqba1,cnffcntr,avxvgn99,shone123,inaanfk,rvtug888,znevny,znk2010,rkcerff2,ivbyragw,2lxa5pps,fcnegna11,oeraqn69,wnpxvrpu,nontnvy,ebova2,tenff1,naql76,oryy1,gnvfba,fhcrezr,ivxn1995,kge451,serq20,89032073168,qravf1984,2000wrrc,jrrgnovk,199020,qnkgre,grivba,cnagure8,u9vlzkzp,ovtevt,xnynzohe,gfnyntv,12213443,enprpne02,wrsserl4,angnkn,ovtfnz,chetngbe,nphenpy,gebhgohz,cbgfzbxr,wvzzlm,znahgq1,algvzrf,cherrivy,orneff,pbby22,qentbantr,abqaneo,qoeolh,4frnfbaf,serhqr,ryevp1,jrehyr,ubpxrl14,12758698,pbexvr,lrnuevtug,oynqrzna,gnsxnc,pynir,yvmvxb,ubsare,wrssuneql,ahevpu,ehaar,fgnavfyn,yhpl1,zbax3l,sbemnebzn,revp99,obanver,oynpxjbb,sratfuhv,1dnm0bxz,arjzbarl,cvzcva69,07078,nabalzre,yncgbc1,pureel12,npr111,fnyfn1,jvyohe1,qbbz12,qvnoyb23,wtgkmoue,haqre1,ubaqn01,oernqsna,zrtna2,whnapneybf,fgenghf1,npxone,ybir5683,uncclgvz,ynzoreg1,poywuglew,xbznebi,fcnz69,asugxes,oebjaa,fnezng,vsvxfe,fcvxr69,ubnatra,natrym,rpbabzvn,gnamra,nibtnqeb,1inzcver,fcnaaref,znmqnek,dhrrdhrt,bevnan,urefuvy,fhynpb,wbfrcu11,8frpbaqf,ndhnevh,phzoreyn,urngure9,nagubal8,ohegba12,pelfgny0,znevn3,dnmjfkp,fabj123,abgtbbq,198520,envaqbt,urrunj,pbafhygn,qnfrva,zvyyre01,pguhyuh1,qhxrahxr,vhover,onlgbja,ungroerr,198505,fvfgrz,yran12,jrypbzr01,znenpn,zvqqyrgb,fvaquh,zvgfbh,cubravk5,ibina,qbanyqb,qlynaqbt,qbzbibl,ynhera12,olewhloaw,123yyyy,fgvyyref,fnapuva,ghycna,fznyyivyy,1zzzzz,cnggv1,sbytref,zvxr31,pbygf18,123456eee,awxzewm,cubravk0,ovrar,vebapvgl,xnfcrebx,cnffjbeq22,svgarf,znggurj6,fcbgyvtu,ohwuz123,gbzzlpng,unmry5,thvgne11,145678,ispzes,pbzcnff1,jvyyrr,1onearl,wnpx2000,yvggyrzvatr,furzc,qreerx,kkk12345,yvggyrshpx,fchqf1,xnebyvaxn,pnzarryl,djreglh123,142500,oenaqba00,zhafba15,snypba3,cnffffnc,m3pa2rei,tbnurnq,onttvb10,141592,qranyv1,37xnmbb,pbcreavp,123456789nfq,benatr88,oeninqn,ehfu211,197700,cnoyb123,hcgurnff,fnzfnz1,qrzbzna,zngglynq10,urlqhqr,zvfgre2,jrexra,13467985,znenagm,n22222,s1s2s3s4,sz12za12,trenfvzbin,oheevgb1,fbal1,tyraal,onyqrntyr,ezsvqq,srabzra,ireongv,sbetrgzr,5ryrzrag,jre138,punary1,bbvph812,10293847dc,zvavpbbcre,puvfcn,zlghea,qrvfry,igueruod,oberqobv4h,svyngbin,nanor,cbvhlg1,oneznyrv,llll1,sbhexvqf,anhzraxb,onatoebf,cbeapyho,bxnlxx,rhpyvq90,jneevbe3,xbearg,cnyrib,cngngvan,tbpneg,nagnagn,wrq1054,pybpx1,111111j,qrjnef,znaxvaq1,crhtrbg406,yvgra,gnuven,ubjyva,anhzbi,ezenpvat,pbebar,phagubyr,cnffvg,ebpx69,wnthnekw,ohzfra,197101,fjrrg2,197010,juvgrpng,fnjnqrr,zbarl100,lsuewaoeo,naqlobl,9085603566,genpr1,snttrg,ebobg1,natry20,6lua7hwz,fcrpvnyvafgn,xnerran,arjoybbq,puvatnqn,obbovrf2,ohttre1,fdhnq51,133naqer,pnyy06,nfurf1,vybiryhpl,fhpprff2,xbggba,pninyyn,cuvybh,qrrorr,guronaq,avar09,negrsnpg,196100,xxxxxxx1,avxbynl9,barybi,onfvn,rzvylnaa,fnqzna,sxewhwxoe,grnzbzhpu,qnivq777,cnqevab,zbarl21,sveqnhf,bevba3,puril01,nyongeb,reqspi,2yrtvg,fnenu7,gbebpx,xrivaa,ubyvb,fbybl,raeba714,fgnesyrrg,djre11,arirezna,qbpgbeju,yhpl11,qvab12,gevavgl7,frngyrba,b123456,cvzczna,1nfqstu,fanxrovg,punapub,cebebx,oyrnpure,enzver,qnexfrrq,jneubefr,zvpunry123,1fcnaxl,1ubgqbt,34reqspi,a0gu1at,qvznapur,ercziols,zvpunrywnpxfba,ybtva1,vprdhrra,gbfuveb,fcrezr,enpre2,irtrg,oveguqnl26,qnavry9,yoirxzes,puneyhf,oelna123,jfcnavp,fpuervor,1naqbayl,qtbvaf,xrjryy,ncbyyb12,rtlcg1,sreavr,gvtre21,nn123456789,oybjw,fcnaqnh,ovfdhvg,12345678q,qrnqznh5,serqvr,311420,uncclsnpr,fnznag,tehccn,svyzfgne,naqerj17,onxrfnyr,frkl01,whfgybbx,ponexyrl,cnhy11,oybbqerq,evqrzr,oveqongu,asxopisl,wnkfba,fvevhf1,xevfgbs,ivetbf,avzebq1,uneqp0er,xvyyreorr,1nopqrs,cvgpure1,whfgbapr,iynqn,qnxbgn99,irfchppv,jcnff,bhgfvqr1,chregbev,esioxs,grnzybfv,itsha2,cbeby777,rzcver11,20091989d,wnfbat,jrohvinyvqng,rfpevzn,ynxref08,gevttre2,nqqcnff,342500,zbatvav,qsugloe,ubeaqbtt,cnyrezb1,136900,onoloyh,nyyn98,qnfun2010,wxryyl,xreabj,lsarpm,ebpxubccre,gbrzna,gynybp,fvyire77,qnir01,xrivae,1234567887654321,135642,zr2lbh,8096468644d,erzzhf,fcvqre7,wnzrfn,wvyyl,fnzon1,qebatb,770129wv,fhcrepng,whagnf,grzn1234,rfgur,1234567892000,qerj11,dnmdnm123,orrtrrf,oybzr,enggenpr,ubjuvtu,gnyyobl,ehshf2,fhaal2,fbh812,zvyyre12,vaqvnan7,veaoeh,cngpu123,yrgzrba,jrypbzr5,anovfpb,9ubgcbva,ucigro,ybivavg,fgbezva,nffzbaxr,gevyy,ngynagv,zbarl1234,phofsna,zryyb1,fgnef2,hrcgxz,ntngr,qnaalz88,ybire123,jbeqm,jbeyqarg,whyrznaq,punfre1,f12345678,cvffjbeq,pvarznk,jbbqpuhp,cbvag1,ubgpuxvf,cnpxref2,onananan,xnyraqre,420666,crathva8,njb8ek3jn8g,ubccvr,zrgyvsr,vybirzlsnzvyl,jrvuanpugfonh,chqqvat1,yhpxlfge,fphyyl1,sngobl1,nzvmnqr,qrqunz,wnuoyrff,oynng,fheeraqr,****re,1cnagvrf,ovtnffrf,tuwhusiopa,nffubyr123,qsxgleo,yvxrzr,avpxref,cynfgvx,urxgbe,qrrzna,zhpunpun,preroeb,fnagnan5,grfgqevir,qenphyn1,pnanyp,y1750fd,fninaanu1,zheran,1vafvqr,cbxrzba00,1vvvvvvv,wbeqna20,frkhny1,znvyyvj,pnyvcfb,014702580369,1mmmmmm,1wwwwww,oernx1,15253545,lbznzn1,xngvaxn,xriva11,1ssssss,znegvwa,ffynmvb,qnavry5,cbeab2,abfznf,yrbyvba,wfpevcg,15975312,chaqnv,xryyv1,xxxqqq,bonstxz,zneznevf,yvyznzn,ybaqba123,esusag,rytbeqb,gnyx87,qnavry7,gurfvzf3,444111,ovfuxrx,nsevxn2002,gbol22,1fcrrql,qnvfuv,2puvyqera,nsebzna,ddddjjjj,byqfxbby,unjnv,i55555,flaqvpng,chxvznx,snangvx,gvtre5,cnexre01,oev5xri6,gvzrkk,jnegohet,ybir55,rpbffr,lryran03,znqvavan,uvtujnl1,husqojsts,xnehan,ohuwislom,jnyyvr,46naq2,xunyvs,rhebc,dnm123jfk456,oboolobo,jbysbar,snyybhgobl,znaavat18,fphon10,fpuahss,vungrlbh1,yvaqnz,fnen123,cbcpbe,snyyratha,qvivar1,zbagoynap,djregl8,ebbarl10,ebnqentr,oregvr1,yngvahf,yrkhfvf,eusisawupe,bcrytg,uvgzr,ntngxn,1lnznun,qzskuxwh,vznybfre,zvpuryy1,fo211fg,fvyire22,ybpxrqhc,naqerj9,zbavpn01,fnfflpng,qfbojvpx,gvaebbs,pgeugalw,ohygnpb,eusplwmupe,nnnnffff,14ff88,wbnaar1,zbznaqqnq,nuwxwqs,lryufn,mvcqevir,gryrfpbc,500600,1frkfrk,snpvny1,zbgneb,511647,fgbare1,grzhwva,ryrcunag1,terngzna,ubarl69,xbpvnx,hxdzjuw6,nygrmmn,phzdhng,mvccbf,xbagvxv,123znk,nygrp1,ovovtba,gbagbf,dnmfrj,abcnfnena,zvyvgne,fhcengg,btynyn,xbonlnfu,ntngur,lnjrgnt,qbtf1,psvrxzes,zrtna123,wnzrfqrn,cbebfrabx,gvtre23,oretre1,uryyb11,frrznaa,fghaare1,jnyxre2,vzvffh,wnonev,zvasq,ybyyby12,uwisl,1-bpg,fgwbuaf,2278124d,123456789djre,nyrk1983,tybjjbez,puvpub,znyyneqf,oyhrqrivy,rkcybere1,543211,pnfvgn,1gvzr,ynpurfvf,nyrk1982,nveobea1,qhorfbe,punatn,yvmmvr1,pncgnvax,fbpbby,ovqhyr,znepu23,1861oee,x.ywkes,jngpubhg,sbgmr,1oevna,xrxfn2,nnnn1122,zngevz,cebivqvna,cevinqb,qernzr,zreel1,nertqbar,qnivqg,abhabhe,gjragl2,cynl2jva,negpnfg2,mbagvx,552255,fuvg1,fyhttl,552861,qe8350,oebbmr,nycun69,guhaqre6,xnzryvn2011,pnyro123,zzkkzz,wnzrfu,ysloxwq,125267,125000,124536,oyvff1,qqqfff,vaqbarfv,obo69,123888,gtxokstl,trene,gurznpx,uvwbqrchgn,tbbq4abj,qqq123,pyx430,xnynfu,gbyxvra1,132sberire,oynpxo,jungvf,f1f2f3f4,ybyxva09,lnznune,48a25epp,qwgvrfgb,111222333444555,ovtohyy,oynqr55,pbbyoerr,xryfr,vpujvyy,lnznun12,fnxvp,ororgb,xngbbz,qbaxr,fnune,jnuvar,645202,tbq666,oreav,fgnejbbq,whar15,fbabvb,gvzr123,yyorna,qrnqfbhy,ynmneri,pqgas,xflhfun,znqnepubq,grpuavx,wnzrfl,4fcrrq,grabefnk,yrtfubj,lbfuv1,puevfoy,44r3roqn,gensnytn,urngure7,frensvzn,snibevgr4,unirsha1,jbyir,55555e,wnzrf13,abferqan,obqrna,wyrggvre,obeenpub,zvpxnry,znevahf,oehgh,fjrrg666,xvobet,ebyyebpx,wnpxfba6,znpebff1,bhfbbare,9085084232,gnxrzr,123djnfmk,sverqrcg,isesuwq,wnpxsebf,123456789000,oevnar,pbbxvr11,onol22,obool18,tebzbin,flfgrzbsnqbja,znegva01,fvyire01,cvznbh,qneguznhy,uvwvak,pbzzb,purpu,fxlzna,fhafr,2ieq6,iynqvzvebian,hguislom,avpbyr01,xerxre,obob1,i123456789,rekgto,zrrgbb,qenxpnc,isis12,zvfvrx1,ohgnar,argjbex2,sylref99,evbtenaq,wraalx,r12345,fcvaar,ninyba11,ybirwbar,fghqra,znvag,cbefpur2,djregl100,punzorey,oyhrqbt1,fhatnz,whfg4h,naqerj23,fhzzre22,yhqvp,zhfvpybire,nthvy,orneqbt1,yvoregva,cvccb1,wbfryvg,cngvgb,ovtoregu,qvtyre,flqarr,wbpxfgen,cbbcb,wnf4na,anfgln123,cebsvy,shrffr,qrsnhyg1,gvgna2,zraqbm,xcpbstf,nanzvxn,oevyyb021,obzorezna,thvgne69,yngpuvat,69chffl,oyhrf2,curytr,avawn123,z7a56kb,djregnfq,nyrk1976,phaavatu,rfgeryn,tynqonpu,znevyyvba,zvxr2000,258046,olcbc,zhssvazna,xq5396o,mrenghy,qwxkojs,wbua77,fvtzn2,1yvaqn,fryhe,erccrc,dhnegm1,grra1,serrpyhf,fcbbx1,xhqbf4rire,pyvgevat,frkvarff,oyhzcxva,znpobbx,gvyrzna,pragen,rfpnsybjar,cragnoyr,funag,tenccn,mireri,1nyoreg,ybzzrefr,pbssrr11,777123,cbyxvyb,zhccrg1,nyrk74,yxwutsqfnmk,byrfvpn,ncevy14,on25547,fbhguf,wnfzv,nenfuv,fzvyr2,2401crqeb,zlonor,nyrk111,dhvagnva,cvzc1,gqrve8o2,znxraan,122333444455555,%r2%82%np,gbbgfvr1,cnff111,mndkfj123,txsqslog,pasaopaoes,hfreznar,vybirlbh12,uneq69,bfnfhan,svertbq,neivaq,onobpuxn,xvff123,pbbxvr123,whyvr123,xnznxnmv,qlyna2,223355,gnathl,aougdn,gvttre13,ghool1,znxniry,nfqsyxw,fnzob1,zbababxr,zvpxrlf,tnlthl,jva123,terra33,jpeskgitowl,ovtfznyy,1arjyvsr,pybir,onolsnp,ovtjnirf,znzn1970,fubpxjni,1sevqnl,onffrl,lneqqbt,pbqrerq1,ivpgbel7,ovtevpx,xenpxre,thysfger,puevf200,fhaonaan,oreghmmv,ortrzbgvx,xhbyrzn,cbaqhf,qrfgvarr,123456789mm,novbqha,sybcfl,nznqrhfcgspbe,trebavz,lttqenfv,pbagrk,qnavry6,fhpx1,nqbavf1,zbbern,ry345612,s22encgbe,zbivrohs,enhapul,6043qxs,mkpioaz123456789,revp11,qrnqzbva,engvht,abfyvj,snaavrf,qnaab,888889,oynax1,zvxrl2,thyyvg,gube99,znzvln,byyvro,gubgu,qnttre1,jrofbyhgvbaffh,obaxre,cevir,1346798520,03038,d1234d,zbzzl2,pbagnk,muvcb,tjraqbyv,tbguvp1,1234562000,ybirqvpx,tvofb,qvtvgny2,fcnpr199,o26354,987654123,tbyvir,frevbhf1,cvixbb,orggre1,824358553,794613258,angn1980,ybtbhg,svfucbaq,ohggff,fdhvqyl,tbbq4zr,erqfbk19,wubaal,mfr45eqk,zngevkkk,ubarl12,enzvan,213546879,zbgmneg,snyy99,arjfcncr,xvyyvg,tvzcl,cubgbjvm,byrfwn,gurohf,znepb123,147852963,orqoht,147369258,uryyobhaq,twtwkes,123987456,ybiruheg,svir55,unzzre01,1234554321n,nyvan2011,crccvab,nat238,dhrfgbe,112358132,nyvan1994,nyvan1998,zbarl77,obowbarf,nvtrevz,perffvqn,znqnyran,420fzbxr,gvapunve,enira13,zbbfre,znhevp,ybiroh,nqvqnf69,xelcgba1,1111112,ybiryvar,qviva,ibfubq,zvpunryz,pbpbggr,toxohuoi,76689295,xryylw,eubaqn1,fjrrgh70,fgrnzsbehzf,trrdhr,abgurer,124p41,dhvkbgvp,fgrnz181,1169900,esptgupeod,esioxz,frkfghss,1231230,qwpgiz,ebpxfgne1,shyunzsp,ourpoe,esagls,dhvxfvyi,56836803,wrqvznfgre,cnatvg,tsuwxz777,gbpbby,1237654,fgryyn12,55378008,19216811,cbggr,sraqre12,zbegnyxbzong,onyy1,ahqrtvey,cnynpr22,enggenc,qrorref,yvpxchffl,wvzzl6,abg4h2p,jreg12,ovtwhttf,fnqbznfb,1357924,312znf,ynfre123,nezvavn,oenasbeq,pbnfgvr,zezbwb,19801982,fpbgg11,onanna123,vaterf,300mkgg,ubbgref6,fjrrgvrf,19821983,19831985,19833891,fvaasrva,jrypbzr4,jvaare69,xvyyrezna,gnpulba,gvter1,alzrgf1,xnatby,znegvarg,fbbgl1,19921993,789djr,unefvatu,1597535,gurpbhag,cunagbz3,36985214,yhxnf123,117711,cnxvfgna1,znqznk11,jvyybj01,19932916,shpxre12,syuepv,bcryntvyn,gurjbeq,nfuyrl24,gvttre3,penmlw,encvqr,qrnqsvfu,nyynan,31359092,fnfun1993,fnaqref2,qvfpzna,mnd!2jfk,obvyrezn,zvpxrl69,wnzrft,onolob,wnpxfba9,bevba7,nyvan2010,vaqvra,oerrmr1,ngrnfr,jnefcvgr,onmbatnm,1prygvp,nfthneq,zltny,svgmtren,1frperg,qhxr33,plxybar,qvcnfphp,cbgncbi,1rfpbone2,p0y0enq0,xxv177ux,1yvggyr,znpbaqb,ivpgbevln,crgre7,erq666,jvafgba6,xy?oraunia,zharpn,wnpxzr,wraana,uncclyvsr,nz4u39q8au,obqlohvy,201980,qhgpuvr,ovttnzr,yncb4xn,enhpura,oynpx10,syndhvg,jngre12,31021364,pbzznaq2,ynvagu88,znmqnzk5,glcuba,pbyva123,epsuysp,djnfmk11,t0njnl,enzve,qvrfvenr,unpxrq1,prffan1,jbbqsvfu,ravtzn2,cdae67j5,bqtrm8w3,tevfbh,uvurryf,5tgtvnkz,2580258,bubgavx,genafvgf,dhnpxref,frewvx,znxramvr,zqztngrj,oelnan,fhcrezna12,zryyl,ybxvg,gurtbq,fyvpxbar,sha4nyy,argcnff,craubefr,1pbbcre,aflap,nfqnfq22,bgurefvqr,ubarlqbt,ureovr1,puvcuv,cebtubhfr,y0aq0a,funtt,fryrpg1,sebfg1996,pnfcre123,pbhage,zntvpung,terngmlb,wlbguv,3ornef,gursyl,avxxvgn,stwpawx,avgebf,ubealf,fna123,yvtugfcr,znfybin,xvzore1,arjlbex2,fcnzzz,zvxrwbar,chzcx1a,oehvfre1,onpbaf,ceryhqr9,obbqvr,qentba4,xraargu2,ybir98,cbjre5,lbqhqr,chzon,guvayvar,oyhr30,frkklow,2qhzo2yvir,zngg21,sbefnyr,1pnebyva,vaabin,vyvxrcbea,eotgxwq,n1f2q3s,jh9942,ehsshf,oynpxobb,djregl999,qenpb1,znepryva,uvqrxv,traqnys,geriba,fnenun,pnegzra,lwuoxzpe,gvzr2tb,snapyho,ynqqre1,puvaav,6942987,havgrq99,yvaqnp,dhnqen,cnbyvg,znvafger,ornab002,yvapbya7,oryyraq,nabzvr,8520456,onatnybe,tbbqfghss,pureabi,fgrcnfuxn,thyyn,zvxr007,senffr,uneyrl03,bzavfynfu,8538622,znelwna,fnfun2011,tvarbx,8807031,ubeavre,tbcvangu,cevaprfvg,oqe529,tbqbja,obffynql,unxnbar,1djr2,znqzna1,wbfuhn11,ybirtnzr,onlnzba,wrqv01,fghcvq12,fcbeg123,nnn666,gbal44,pbyyrpg1,puneyvrz,puvznven,pk18xn,geevz777,puhpxq,gurqernz,erqfbk99,tbbqzbeavat,qrygn88,vybirlbh11,arjyvsr2,svtinz,puvpntb3,wnfbax,12djre,9875321,yrfgng1,fngpbz,pbaqvgvb,pncev50,fnlnxn,9933162,gehaxf1,puvatn,fabbpu,nyrknaq1,svaqhf,cbrxvr,psqols,xrivaq,zvxr1969,sver13,yrsgvr,ovtghan,puvaah,fvyrapr1,prybf1,oynpxqen,nyrk24,tstsvs,2obbof,unccl8,rabyntnl,fngnavi1993,gheare1,qlynaf,crhtrb,fnfun1994,ubccry,pbaab,zbbafubg,fnagn234,zrvfgre1,008800,unanxb,gerr123,djrenf,tsvglzes,erttvr31,nhthfg29,fhcreg,wbfuhn10,nxnqrzvn,toywusp,mbeeb123,angunyvn,erqfbk12,uscqwy,zvfuznfu,abxvnr51,allnaxrrf,gh190022,fgebatob,abar1,abg4h2ab,xngvr2,cbcneg,uneyrdhv,fnagna,zvpuny1,1gurebpx,fperjh,pflrxzes,byrzvff1,glerfr,ubbcyr,fhafuva1,phpvan,fgneonfr,gbcfurys,sbfgrk,pnyvsbeavn1,pnfgyr1,flznagrp,cvccbyb,ononer,gheagnoy,1natryn,zbb123,vcigro,tbtbys,nyrk88,plpyr1,znkvr1,cunfr2,fryuhefg,sheavghe,fnzsbk,sebzirezvar,fund34,tngbef96,pncgnva2,qrybatr,gbzngbr,ovfbhf,mkpioazn,tynpvhf,cvarnccyr1,pnaaryyr,tnavony,zxb09vwa,cnenxynfg1974,uboorf12,crggl43,negrzn,whavbe8,zlybire,1234567890q,sngny1gl,cebfgerrg,crehna,10020,anqln,pnhgvba1,znebpnf,punary5,fhzzre08,zrgny123,111ybk,fpencl,gungthl,rqqvr666,jnfuvatgb,lnaavf,zvaarfbgn_uc,yhpxl4,cynlobl6,anhzbin,nmmheeb,cngng,qnyr33,cn55jq,fcrrqfgre,mrznabin,fnenug,arjgb,gbal22,dfprfm,nexnql,1byvire,qrngu6,ixsjk046,nagvsynt,fgnatf,wms7ds2r,oevnac,sbmml,pbql123,fgnegerx1,lbqn123,zhepvryn,genonwb,yioauogqs,pnanevb,syvcre,nqebvg,urael5,tbqhpxf,cncvehf,nyfxqw,fbppre6,88zvxr,tbtrggre,gnarybea,qbaxvat,znexl1,yrrqfh,onqzbsb,ny1916,jrgqbt,nxzneny,cnyyrg,ncevy24,xvyyre00,arfgrebin,ehtol123,pbssrr12,oebjfrhv,enyyvneg,cnvtbj,pnytnel1,nezlzna,igyqgygq,sebqb2,sekgto,vnzovtny,oraab,wnlgrr,2ubg4lbh,nfxne,ovtgrr,oeragjbb,cnyynqva,rqqvr2,ny1916j,ubebfub,ragenqn,vybirgvgf,iragher1,qentba19,wnlqr,puhinx,wnzrfy,sme600,oenaqba8,iwdiou,fabjony,fangpu1,ot6awbxs,chqqre,xnebyva,pnaqbb,cshsyes,fngpury1,znagrpn,xubatovrg,pevggre1,cnegevqt,fxlpynq,ovtqba,tvatre69,oenir1,nagubal4,fcvaanxr,puvanqby,cnffbhg,pbpuvab,avccyrf1,15058,ybcrfx,fvksyntf,yybb999,cnexurnq,oernxqnapr,pvn123,svqbqvqb,lhvger12,sbbrl,negrz1995,tnlnguev,zrqva,abaqevirefvt,y12345,oenib7,unccl13,xnmhln,pnzfgre,nyrk1998,yhpxll,mvcpbqr,qvmmyr,obngvat1,bchfbar,arjcnffj,zbivrf23,xnzvxnmv,mncngb,oneg316,pbjoblf0,pbefnve1,xvatfuvg,ubgqbt12,ebylng,u200fiez,djregl4,obbsre,euglygxz,puevf999,inm21074,fvzsrebcby,cvgobff,ybir3,oevgnavn,gnalfuxn,oenhfr,123djregl123,norvyyr,zbfpbj1,vyxnri,znahg,cebprff1,vargpst,qentba05,sbegxabk,pnfgvyy,elaare,zezvxr,xbnynf,wrrohf,fgbpxcbe,ybatzna,whnacnoy,pnvzna,ebyrcynl,wrerzv,26058,cebqbwb,002200,zntvpny1,oynpx5,oiytnev,qbbtvr1,pougdn,znuvan,n1f2q3s4t5u6,woyceb,hfzp01,ovfzvynu,thvgne01,ncevy9,fnagnan1,1234nn,zbaxrl14,fbebxva,rina1,qbbuna,navznyfrk,csdkglwe,qvzvgel,pngpuzr,puryyb,fvyirepu,tybpx45,qbtyrt,yvgrfcrr,aveinan9,crlgba18,nylqne,jneunzre,vyhizr,fvt229,zvabgnie,ybomvx,wnpx23,ohfujnpx,bayva,sbbgonyy123,wbfuhn5,srqrebi,jvagre2,ovtznk,shsaseuopao,uscyqsauo,1qnxbgn,s56307,puvczbax,4avpx8,cenyvar,iouwu123,xvat11,22gnatb,trzvav12,fgerrg1,77879,qbbqyroh,ubzlnx,165432,puhyhguh,gevkv,xneyvgb,fnybz,ervfra,pqgaxmkwe,cbbxvr11,gerzraqb,funmnnz,jrypbzr0,00000gl,crrjrr51,cvmmyr,tvyrnq,olqnaq,fneine,hcfxveg,yrtraqf1,serrjnl1,grrashpx,enatre9,qnexsver,qslzes,uhag0802,whfgzr1,ohssl1zn,1uneel,671sfn75lg,oheesbbg,ohqfgre,cn437gh,wvzzlc,nyvan2006,znynpba,puneyvmr,ryjnl1,serr12,fhzzre02,tnqvan,znanen,tbzre1,1pnffvr,fnawn,xvfhyln,zbarl3,chwbyf,sbeq50,zvqvynaq,ghetn,benatr6,qrzrgevh,sernxobl,bebfvr1,enqvb123,bcra12,ishscol,zhfgrx,puevf33,navzrf,zrvyvat,agugiwe,wnfzvar9,tsqxwq,byvtneu,znevzne,puvpntb9,.xmves,ohtfftho,fnzhenvk,wnpxvr01,cvzcwhvp,znpqnq,pntvin,ireabfg,jvyylobl,slawlwqs,gnool1,cevirg123,gbeerf9,erglcr,oyhrebbz,enira11,d12jr3,nyrk1989,oevatvgba,evqrerq,xnerygwr,bj8wgpf8g,pvppvn,tbavaref,pbhagelo,24688642,pbivatgb,24861793,orloynqr,ivxva,onqoblm,jynsvtn,jnyfgvo,zvenaq,arrqnwbo,puybrf,onyngba,xocsqgas,serlwn,obaq9007,tnoevry12,fgbezoev,ubyyntr,ybir4rir,srabzrab,qnexavgr,qentfgne,xlyr123,zvysuhagre,zn123123123,fnzvn,tuvfynva,raevdhr1,srevra12,kwl6721,angnyvr2,ertyvffr,jvyfba2,jrfxre,ebfrohq7,nznmba1,eborege,eblxrnar,kgpagu,znzngngn,penmlp,zvxvr,fninanu,oybjwbo69,wnpxvr2,sbegl1,1pbssrr,suolwkes,ohoonu,tbgrnz,unpxrqvg,evfxl1,ybtbss,u397caie,ohpx13,eboreg23,oebap,fg123fg,tbqsyrfu,cbeabt,vnzxvat,pvfpb69,frcgvrzoe,qnyr38,mubatthb,gvoone,cnagure9,ohssn1,ovtwbua1,zlchccl,iruislpe,ncevy16,fuvccb,sver1234,terra15,d123123,thatnqva,fgrirt,byvivre1,puvanfxv,zntabyv,snvgul,fgbez12,gbnqsebt,cnhy99,78791,nhthfg20,nhgbzngv,fdhvegyr,purrml,cbfvgnab,oheoba,ahaln,yyrocznp,xvzzv,ghegyr2,nyna123,cebxhebe,ivbyva1,qherk,chffltny,ivfvbane,gevpx1,puvpxra6,29024,cybjobl,esloerxf,vzohr,fnfun13,jntare1,ivgnybtl,pslzes,gurceb,26028,tbeohabi,qiqpbz,yrgzrva5,qhqre,snfgsha,cebava,yvoen1,pbaare1,uneyrl20,fgvaxre1,20068,20038,nzvgrpu,flbhat,qhtjnl,18068,jrypbzr7,wvzzlcnt,nanfgnpv,xnsxn1,csusarpaus,pngfff,pnzchf100,funzny,anpub1,sver12,ivxvatf2,oenfvy1,enatrebire,zbunzzn,crerfirg,14058,pbpbzb,nyvban,14038,djnfre,ivxrf,poxzqs,fxloyhr1,bh81234,tbbqybir,qsxzygisu,108888,ebnzre,cvaxl2,fgngvp1,mkpi4321,onezra,ebpx22,furyol2,zbetnaf,1whavbe,cnfjbeq1,ybtwnz,svsgl5,auseawuopa,punqql,cuvyyv,arzrfvf2,vatravre,qwxewq,enatre3,nvxzna8,xabgurnq,qnqql69,ybir007,iflguo,sbeq350,gvtre00,eraehg,bjra11,raretl12,znepu14,nyran123,eboreg19,pnevfzn,benatr22,zhecul11,cbqnebx,cebmnx,xstrves,jbys13,ylqvn1,funmmn,cnenfun,nxvzbi,gboovr,cvybgr,urngure4,onfgre,yrbarf,tmaskwe,zrtnzn,987654321t,ohyytbq,obkfgre1,zvaxrl,jbzongf,iretvy,pbyrtvngn,yvapby,fzbbgur,cevqr1,pnejnfu1,yngeryy,objyvat3,slyugd123,cvpxjvpx,rvqre,ohooyrobk,ohaavrf1,ybdhvg,fyvccre1,ahgfnp,chevan,kghgqsus,cybxvwh,1dnmkf,huwclfd,mkpionfqst,rawbl1,1chzcxva,cunagbz7,znzn22,fjbeqfzn,jbaqreoe,qbtqnlf,zvyxre,h23456,fvyina,qsxguoe,fyntryfr,lrnuzna,gjbguerr,obfgba11,jbys100,qnaalt,gebyy1,slawl123,tuopasq,osgrfg,onyyfqrrc,oboolbee,nycunfvt,pppqrzb,sver123,abejrfg,pynver2,nhthfg10,ygu1108,ceboyrznf,fncvgb,nyrk06,1ehfgl,znppbz,tbvevfu1,bulrf,okqhzo,anovyn,obborne1,enoovg69,cevapvc,nyrkfnaqre,geninvy,punagny1,qbtttl,terracrn,qvnoyb69,nyrk2009,oretra09,crggvpbn,pynffr,prvyvqu,iynq2011,xnznxvev,yhpvqvgl,dnm321,puvyrab,prksus,99enatre,zpvgen,rfgbccry,ibyibf60,pnegre80,jrocnff,grzc12,gbhnert,sptouol,ohoon8,fhavgun,200190eh,ovgpu2,funqbj23,vyhivg,avpbyr0,ehora1,avxxv69,ohgggg,fubpxre1,fbhfpurs,ybcbgbx01,xnagbg,pbefnab,psasls,evireng,znxnyh,fjncan,nyy4h9,pqgaxsl,agxgtrcoe,ebanyqb99,gubznfw,ozj540v,puevfj,obbzon,bcra321,m1k2p3i4o5a6z7,tnivbgn,vprzna44,sebfln,puevf100,puevf24,pbfrggr,pyrnejng,zvpnry,obbtlzna,chffl9,pnzhf1,puhzcl,urppeod,xbabcyln,purfgre8,fpbbgre5,tuwtshslys,tvbggb,xbbyxng,mreb000,obavgn1,pxsyeod,w1964,znaqbt,18a28a24n,erabo,urnq1,furetne,evatb123,gnavgn,frk4serr,wbuaal12,unyoreq,erqqrivyf,ovbybt,qvyyvatr,sngo0l,p00cre,ulcreyvg,jnyynpr2,fcrnef1,ivgnzvar,ohurves,fybobqn,nyxnfu,zbbzna,znevba1,nefrany7,fhaqre,abxvn5610,rqvsvre,cvccbar,slsawxzgqok,shwvzb,crcfv12,xhyvxbin,obyng,qhrggb,qnvzba,znqqbt01,gvzbfuxn,rmzbarl,qrfqrzba,purfgref,nvqra,uhthrf,cngevpx5,nvxzna08,eboreg4,ebravpx,alenatre,jevgre1,36169544,sbkzhyqre,118801,xhggre,funfunax,wnzwne,118811,119955,nfcvevan,qvaxhf,1fnvybe,anytrar,19891959,fanes,nyyvr1,penpxl,erfvcfn,45678912,xrzrebib,19841989,argjner1,nyuvzvx,19801984,avpbyr123,19761977,51501984,znynxn1,zbagryyn,crnpushm,wrgueb1,plcerff1,uraxvr,ubyqba,rfzvgu,55443322,1sevraq,dhvdhr,onaqvpbbg,fgngvfgvxn,terng123,qrngu13,hpug36,znfgre4,67899876,obofzvgu,avxxb1,we1234,uvyynel1,78978978,efgheob,ymymqspm,oybbqyhfg,funqbj00,fxntra,onzovan,lhzzvrf,88887777,91328378,znggurj4,vgqbrf,98256518,102938475,nyvan2002,123123789,shonerq,qnaalf,123456321,avxvsbe,fhpx69,arjzrkvpb,fphonzna,euopao,svsasl,chssqnqq,159357852,qgurlkoe,gurzna22,212009164,cebube,fuveyr,awv90bxz,arjzrqvn,tbbfr5,ebzn1995,yrgffrr,vprzna11,nxfnan,jverahg,cvzcqnql,1212312121,gnzcyvre,cryvpna1,qbzbqrqbib,1928374655,svpgvba6,qhpxcbaq,loerpm,gujnpx,bargjb34,thafzvgu,zheculqb,snyybhg1,fcrpger1,wnoorejb,wtwrfd,gheob6,obob12,erqelqre,oynpxchf,ryran1971,qnavybin,nagbva,obob1234,obobo,obooboob,qrna1,222222n,wrfhftbq,zngg23,zhfvpny1,qnexzntr,ybccby,jreerj,wbfrcun,erory12,gbfuxn,tnqsyl,unjxjbbq,nyvan12,qabzlne,frknqqvpg,qnatvg,pbby23,lbpenpx,nepuvzrq,snebhx,ausxmxm,yvaqnybh,111mmmmm,tuwngppwu,jrgurcrbcyr,z123456789,jbjfref,xoxokes,ohyyqbt5,z_ebrfry,fvffvavg,lnzbba6,123rjdnfq,qnatry,zvehibe79,xnlgrr,snypba7,onaqvg11,qbgarg,qnaavv,nefrany9,zvngnzk5,1gebhoyr,fgevc4zr,qbtcvyr,frklerq1,ewqsxgqs,tbbtyr10,fubegzna,pelfgny7,njrfbzr123,pbjqbt,unehxn,oveguqnl28,wvggre,qvnobyvx,obbzre12,qxavtug,oyhrjngr,ubpxrl123,pez0624,oyhroblf,jvyyl123,whzchc,tbbtyr2,pboen777,yynorfno,ivprybeq,ubccre1,treelore,erzznu,w10r5q4,ddddddj,nthfgv,ser_nx8lw,anuyvx,erqebova,fpbgg3,rcfba1,qhzcl,ohaqnb,navbyrx,ubyn123,wretraf,vgfnfrperg,znkfnz,oyhryvtug,zbhagnv1,obatjngre,1ybaqba,crccre14,serrhfr,qrerxf,djrdj,sbeqtg40,esusqsl,envqre12,uhaaloha,pbzcnp,fcyvpre,zrtnzba,ghsstbat,tlzanfg1,ohggre11,zbqnqql,jncoof_1,qnaqryvb,fbppre77,tuwaoqwpawmlog,123klv2,svfurnq,k002gc00,jubqnzna,555nnn,bhffnzn,oehabqbt,grpuavpv,czgtwaoy,dpkqj8el,fpujrqra,erqfbk3,gueboore,pbyyrpgb,wncna10,qoz123qz,uryyubha,grpu1,qrnqmbar,xnuyna,jbys123,qrguxybx,kmfnjd,ovtthl1,ploegup,punaqyr,ohpx01,dd123123,frpergn,jvyyvnzf1,p32649135,qrygn12,synfu33,123wbxre,fcnprwnz,cbybcb,ubylpenc,qnzna1,ghzzlorq,svanapvn,ahfeng,rhebyvar,zntvpbar,wvzxvex,nzrevgrp,qnavry26,friraa,gbcnmm,xvatcvaf,qvzn1991,znpqbt,fcrapre5,bv812,trbsser,zhfvp11,onssyr,123569,hfntv,pnffvbcr,cbyyn,yvypebjr,gurpnxrvfnyvr,iouwaqwugj,igubxvrf,byqznaf,fbcuvr01,tubfgre,craal2,129834,ybphghf1,zrrfun,zntvx,wreel69,qnqqlftvey,vebaqrfx,naqerl12,wnfzvar123,ircfesla,yvxrfqvpx,1nppbeq,wrgobng,tensvk,gbzhpu,fubjvg,cebgbmbn,zbfvnf98,gnohergxn,oynmr420,rfrava,nany69,mui84xi,chvffnag,puneyrf0,nvfujneln,onolyba6,ovggre1,yravan,enyrvtu1,yrpung,npprff01,xnzvyxn,slawl,fcnexcyh,qnvfl3112,pubccr,mbbgfhvg,1234567w,eholebfr,tbevyyn9,avtugfunqr,nygreangvin,ptusqwkloe,fahttyrf1,10121i,ibin1992,yrbaneqb1,qnir2,znggurjq,isusaoe,1986zrgf,abohyy,onpnyy,zrkvpna1,whnawb,znsvn1,obbzre22,fblyrag,rqjneqf1,wbeqna10,oynpxjvq,nyrk86,trzvav13,yhane2,qpgipwpsaz,znynxv,cyhttre,rntyrf11,fansh2,1furyyl,pvagnxh,unaanu22,goveq1,znxf5843,vevfu88,ubzre22,nznebx,sxgepslyuwqs,yvapbya2,nprff,ter69xvx,arrq4fcrrq,uvtugrpu,pber2qhb,oyhag1,hoyuwtwloes,qentba33,1nhgbcnf,nhgbcnf1,jjjj1,15935746,qnavry20,2500nn,znffvz,1ttttttt,96sbeq,uneqpbe1,pboen5,oynpxqentba,ibina_yg,bebpuvzneh,uwyoagxo,djreglhvbc12,gnyyra,cnenqbxf,sebmrasvfu,tuwhusiiopa,treev1,ahttrgg,pnzvyvg,qbevtug,genaf1,freran1,pngpu2,oxzlru,sverfgba,nsuisjgqa,checyr3,svther8,shpxln,fpnzc1,ynenawn,bagurbhgfvqr,ybhvf123,lryybj7,zbbajnyx,zrephel2,gbyxrva,envqr,nzraen,n13579,qenaero,5150iu,unevfu,genpxfgn,frkxvat,bmmzbfvf,xngvrr,nybzne,zngevk19,urnqebbz,wnuybir,evatqvat,ncbyyb8,132546,132613,12345672000,fnerggn,135798,136666,gubznf7,136913,bargjbguerr,ubpxrl33,pnyvqn,arsregvg,ovgjvfr,gnvyubbx,obbc4,xstrpoe,ohwuzohwuz,zrgny69,gurqnex,zrgrbeb,sryvpvn1,ubhfr12,gvahivry,vfgvan,inm2105,cvzc13,gbbysna,avan1,ghrfqnl2,znkzbgvirf,ytxc500,ybpxfyrl,gerrpu,qneyvat1,xhenzn,nzvaxn,enzva,erqurq,qnmmyre,wntre1,fgcvyvbg,pneqzna,esiglz,purrfre,14314314,cnenzbha,fnzpng,cyhzcl,fgvssvr,ifnwlwe,cnangun,ddd777,pne12345,098cbv,nfqmk,xrrtna1,sheryvfr,xnyvsbeavn,iouwpxsq,ornfg123,mpsismxrkvsm,uneel5,1oveqvr,96328v,rfpbyn,rkgen330,urael12,tsuslwdm,14h2ai,znk1234,grzcyne1,1qnir,02588520,pngeva,cnatbyva,zneunon,yngva1,nzbepvgb,qnir22,rfpncr1,nqinapr1,lnfhuveb,tercj,zrrgzr,benatr01,rearf,reqan,mfreta,anhgvpn1,whfgvao,fbhaqjni,zvnfzn,tert78,anqvar1,frkznq,ybironol,cebzb1,rkpry1,onolf,qentbazn,pnzel1,fbaarafpurva,snebbd,jnmmxncevirg,zntny,xngvanf,ryivf99,erqfbk24,ebbarl1,puvrsl,crttlf,nyvri,cvyfhat,zhqura,qbagqbvg,qraavf12,fhcrepny,raretvn,onyyfbhg,shabar,pynhqvh,oebja2,nzbpb,qnoy1125,cuvybf,twqgxoagxz,freirggr,13571113,juvmmre,abyyvr,13467982,hcvgre,12fgevat,oyhrwnl1,fvyxvr,jvyyvnz4,xbfgn1,143333,pbaabe12,fhfgnaba,06068,pbecbeng,ffanxr,ynhevgn,xvat10,gnubrf,nefrany123,fncngb,puneyrff,wrnaznep,yrirag,nytrevr,znevar21,wrggnf,jvafbzr,qpgitocys,1701no,kkkc455j0eq5,yyyyyyy1,bbbbbbb1,zbanyvf,xbhsnk32,nanfgnfln,qrohttre,fnevgn2,wnfba69,hsxkwlwe,twypasqs,1wreel,qnavry10,onyvabe,frkxvggra,qrngu2,djregnfqstmkpio,f9gr949s,irtrgn1,flfzna,znkknz,qvznovyna,zbbbfr,vybirgvg,whar23,vyyrfg,qbrfvg,znzbh,nool12,ybatwhzc,genafnyc,zbqrengb,yvggyrthl,zntevggr,qvyabmn,unjnvvthl,jvaovt,arzvebss,xbxnvar,nqzven,zlrznvy,qernz2,oebjarlrf,qrfgval7,qentbaff,fhpxzr1,nfn123,naqenavx,fhpxrz,syrfuobg,qnaqvr,gvzzlf,fpvgen,gvzqbt,unforra,thrfff,fzryylsr,nenpuar,qrhgfpuy,uneyrl88,oveguqnl27,abobql1,cncnfzhe,ubzr1,wbanff,ohavn3,rcngo1,rzonyz,isirxzes,ncnpre,12345656,rfgerrg,jrvuanpugfonhz,zejuvgr,nqzva12,xevfgvr1,xryrorx,lbqn69,fbpxra,gvzn123,onlrea1,sxgepslygu,gnzvln,99fgeratug,naql01,qravf2011,19qrygn,fgbxrpvg,nbgrnebn,fgnyxre2,avpanp,pbaenq1,cbcrl,nthfgn,objy36,1ovtsvfu,zbfflbnx,1fghaare,trgvaabj,wrffrwnzrf,txsawl,qenxb,1avffna,rtbe123,ubgarff,1unjnvv,mkp123456,pnagfgbc,1crnpurf,znqyra,jrfg1234,wrgre1,znexvf,whqvg,nggnpx1,negrzv,fvyire69,153246,penml2,terra9,lbfuvzv,1irggr,puvrs123,wnfcre2,1fvreen,gjraglba,qefgenat,nfcvenag,lnaavp,wraan123,obatgbxr,fyhecl,1fhtne,pvivp97,ehfgl21,fuvarba,wnzrf19,naan12345,jbaqrejbzna,1xriva,xneby1,xnanovf,jreg21,sxgvs6115,rivy1,xnxnun,54ti768,826248f,glebar1,1jvafgba,fhtne2,snypba01,nqryln,zbcne440,mnfkpq,yrrpure,xvaxlfrk,zreprqr1,genixn,11234567,eroba,trrxobl".split(","),
english_wikipedia:"gur,bs,naq,va,jnf,vf,sbe,nf,ba,jvgu,ol,ur,ng,sebz,uvf,na,jrer,ner,juvpu,qbp,uggcf,nyfb,be,unf,unq,svefg,bar,gurve,vgf,nsgre,arj,jub,gurl,gjb,ure,fur,orra,bgure,jura,gvzr,qhevat,gurer,vagb,fpubby,zber,znl,lrnef,bire,bayl,lrne,zbfg,jbhyq,jbeyq,pvgl,fbzr,jurer,orgjrra,yngre,guerr,fgngr,fhpu,gura,angvbany,hfrq,znqr,xabja,haqre,znal,havirefvgl,havgrq,juvyr,cneg,frnfba,grnz,gurfr,nzrevpna,guna,svyz,frpbaq,obea,fbhgu,orpnzr,fgngrf,jne,guebhtu,orvat,vapyhqvat,obgu,orsber,abegu,uvtu,ubjrire,crbcyr,snzvyl,rneyl,uvfgbel,nyohz,nern,gurz,frevrf,ntnvafg,hagvy,fvapr,qvfgevpg,pbhagl,anzr,jbex,yvsr,tebhc,zhfvp,sbyybjvat,ahzore,pbzcnal,frireny,sbhe,pnyyrq,cynlrq,eryrnfrq,pnerre,yrnthr,tnzr,tbireazrag,ubhfr,rnpu,onfrq,qnl,fnzr,jba,hfr,fgngvba,pyho,vagreangvbany,gbja,ybpngrq,cbchyngvba,trareny,pbyyrtr,rnfg,sbhaq,ntr,znepu,raq,frcgrzore,ortna,ubzr,choyvp,puhepu,yvar,whar,evire,zrzore,flfgrz,cynpr,praghel,onaq,whyl,lbex,wnahnel,bpgbore,fbat,nhthfg,orfg,sbezre,oevgvfu,cnegl,anzrq,uryq,ivyyntr,fubj,ybpny,abirzore,gbbx,freivpr,qrprzore,ohvyg,nabgure,znwbe,jvguva,nybat,zrzoref,svir,fvatyr,qhr,nygubhtu,fznyy,byq,yrsg,svany,ynetr,vapyhqr,ohvyqvat,freirq,cerfvqrag,erprvirq,tnzrf,qrngu,sroehnel,znva,guveq,frg,puvyqera,bja,beqre,fcrpvrf,cnex,ynj,nve,choyvfurq,ebnq,qvrq,obbx,zra,jbzra,nezl,bsgra,nppbeqvat,rqhpngvba,prageny,pbhagel,qvivfvba,ratyvfu,gbc,vapyhqrq,qrirybczrag,serapu,pbzzhavgl,nzbat,jngre,cynl,fvqr,yvfg,gvzrf,arne,yngr,sbez,bevtvany,qvssrerag,pragre,cbjre,yrq,fghqragf,trezna,zbirq,pbheg,fvk,ynaq,pbhapvy,vfynaq,h.f.,erpbeq,zvyyvba,erfrnepu,neg,rfgnoyvfurq,njneq,fgerrg,zvyvgnel,gryrivfvba,tvira,ertvba,fhccbeg,jrfgrea,cebqhpgvba,aba,cbyvgvpny,cbvag,phc,crevbq,ohfvarff,gvgyr,fgnegrq,inevbhf,ryrpgvba,hfvat,ratynaq,ebyr,cebqhprq,orpbzr,cebtenz,jbexf,svryq,gbgny,bssvpr,pynff,jevggra,nffbpvngvba,enqvb,havba,yriry,punzcvbafuvc,qverpgbe,srj,sbepr,perngrq,qrcnegzrag,sbhaqrq,freivprf,zneevrq,gubhtu,cre,a'g,fvgr,bcra,npg,fubeg,fbpvrgl,irefvba,eblny,cerfrag,abegurea,jbexrq,cebsrffvbany,shyy,erghearq,wbvarq,fgbel,senapr,rhebcrna,pheeragyl,ynathntr,fbpvny,pnyvsbeavn,vaqvn,qnlf,qrfvta,fg.,shegure,ebhaq,nhfgenyvn,jebgr,fna,cebwrpg,pbageby,fbhgurea,envyjnl,obneq,cbchyne,pbagvahrq,serr,onggyr,pbafvqrerq,ivqrb,pbzzba,cbfvgvba,yvivat,unys,cynlvat,erpbeqrq,erq,cbfg,qrfpevorq,nirentr,erpbeqf,fcrpvny,zbqrea,nccrnerq,naabhaprq,nernf,ebpx,eryrnfr,ryrpgrq,bguref,rknzcyr,grez,bcrarq,fvzvyne,sbezrq,ebhgr,prafhf,pheerag,fpubbyf,bevtvanyyl,ynxr,qrirybcrq,enpr,uvzfrys,sbeprf,nqqvgvba,vasbezngvba,hcba,cebivapr,zngpu,rirag,fbatf,erfhyg,riragf,jva,rnfgrea,genpx,yrnq,grnzf,fpvrapr,uhzna,pbafgehpgvba,zvavfgre,treznal,njneqf,ninvynoyr,guebhtubhg,genvavat,fglyr,obql,zhfrhz,nhfgenyvna,urnygu,frira,fvtarq,puvrs,riraghnyyl,nccbvagrq,frn,prager,qrohg,gbhe,cbvagf,zrqvn,yvtug,enatr,punenpgre,npebff,srngherf,snzvyvrf,ynetrfg,vaqvna,argjbex,yrff,cresbeznapr,cynlref,ersre,rhebcr,fbyq,srfgviny,hfhnyyl,gnxra,qrfcvgr,qrfvtarq,pbzzvggrr,cebprff,erghea,bssvpvny,rcvfbqr,vafgvghgr,fgntr,sbyybjrq,cresbezrq,wncnarfr,crefbany,guhf,negf,fcnpr,ybj,zbaguf,vapyhqrf,puvan,fghql,zvqqyr,zntnmvar,yrnqvat,wncna,tebhcf,nvepensg,srngherq,srqreny,pvivy,evtugf,zbqry,pbnpu,pnanqvna,obbxf,erznvarq,rvtug,glcr,vaqrcraqrag,pbzcyrgrq,pncvgny,npnqrzl,vafgrnq,xvatqbz,betnavmngvba,pbhagevrf,fghqvrf,pbzcrgvgvba,fcbegf,fvmr,nobir,frpgvba,svavfurq,tbyq,vaibyirq,ercbegrq,znantrzrag,flfgrzf,vaqhfgel,qverpgrq,znexrg,sbhegu,zbirzrag,grpuabybtl,onax,tebhaq,pnzcnvta,onfr,ybjre,frag,engure,nqqrq,cebivqrq,pbnfg,tenaq,uvfgbevp,inyyrl,pbasrerapr,oevqtr,jvaavat,nccebkvzngryl,svyzf,puvarfr,njneqrq,qrterr,ehffvna,fubjf,angvir,srznyr,ercynprq,zhavpvcnyvgl,fdhner,fghqvb,zrqvpny,qngn,nsevpna,fhpprffshy,zvq,onl,nggnpx,cerivbhf,bcrengvbaf,fcnavfu,gurnger,fghqrag,erchoyvp,ortvaavat,cebivqr,fuvc,cevznel,bjarq,jevgvat,gbheanzrag,phygher,vagebqhprq,grknf,eryngrq,angheny,cnegf,tbireabe,ernpurq,verynaq,havgf,fravbe,qrpvqrq,vgnyvna,jubfr,uvture,nsevpn,fgnaqneq,vapbzr,cebsrffbe,cynprq,ertvbany,ybf,ohvyqvatf,punzcvbafuvcf,npgvir,abiry,raretl,trarenyyl,vagrerfg,ivn,rpbabzvp,cerivbhfyl,fgngrq,vgfrys,punaary,orybj,bcrengvba,yrnqre,genqvgvbany,genqr,fgehpgher,yvzvgrq,ehaf,cevbe,erthyne,snzbhf,fnvag,anil,sbervta,yvfgrq,negvfg,pngubyvp,nvecbeg,erfhygf,cneyvnzrag,pbyyrpgvba,havg,bssvpre,tbny,nggraqrq,pbzznaq,fgnss,pbzzvffvba,yvirq,ybpngvba,cynlf,pbzzrepvny,cynprf,sbhaqngvba,fvtavsvpnag,byqre,zrqny,frys,fpberq,pbzcnavrf,uvtujnl,npgvivgvrf,cebtenzf,jvqr,zhfvpny,abgnoyr,yvoenel,ahzrebhf,cnevf,gbjneqf,vaqvivqhny,nyybjrq,cynag,cebcregl,naahny,pbagenpg,jubz,uvturfg,vavgvnyyl,erdhverq,rneyvre,nffrzoyl,negvfgf,eheny,frng,cenpgvpr,qrsrngrq,raqrq,fbivrg,yratgu,fcrag,znantre,cerff,nffbpvngrq,nhgube,vffhrf,nqqvgvbany,punenpgref,ybeq,mrnynaq,cbyvpl,ratvar,gbjafuvc,abgrq,uvfgbevpny,pbzcyrgr,svanapvny,eryvtvbhf,zvffvba,pbagnvaf,avar,erprag,ercerfragrq,craaflyinavn,nqzvavfgengvba,bcravat,frpergnel,yvarf,ercbeg,rkrphgvir,lbhgu,pybfrq,gurbel,jevgre,vgnyl,natryrf,nccrnenapr,srngher,dhrra,ynhapurq,yrtny,grezf,ragrerq,vffhr,rqvgvba,fvatre,terrx,znwbevgl,onpxtebhaq,fbhepr,nagv,phygheny,pbzcyrk,punatrf,erpbeqvat,fgnqvhz,vfynaqf,bcrengrq,cnegvphyneyl,onfxrgonyy,zbagu,hfrf,cbeg,pnfgyr,zbfgyl,anzrf,sbeg,fryrpgrq,vapernfrq,fgnghf,rnegu,fhofrdhragyl,cnpvsvp,pbire,inevrgl,pregnva,tbnyf,erznvaf,hccre,pbaterff,orpbzvat,fghqvrq,vevfu,angher,cnegvphyne,ybff,pnhfrq,puneg,qe.,sbeprq,perngr,ren,ergverq,zngrevny,erivrj,engr,fvatyrf,ersreerq,ynetre,vaqvivqhnyf,fubja,cebivqrf,cebqhpgf,fcrrq,qrzbpengvp,cbynaq,cnevfu,bylzcvpf,pvgvrf,gurzfryirf,grzcyr,jvat,trahf,ubhfrubyqf,freivat,pbfg,jnyrf,fgngvbaf,cnffrq,fhccbegrq,ivrj,pnfrf,sbezf,npgbe,znyr,zngpurf,znyrf,fgnef,genpxf,srznyrf,nqzvavfgengvir,zrqvna,rssrpg,ovbtencul,genva,ratvarrevat,pnzc,bssrerq,punvezna,ubhfrf,znvayl,19gu,fhesnpr,gurersber,arneyl,fpber,napvrag,fhowrpg,cevzr,frnfbaf,pynvzrq,rkcrevrapr,fcrpvsvp,wrjvfu,snvyrq,birenyy,oryvrirq,cybg,gebbcf,terngre,fcnva,pbafvfgf,oebnqpnfg,urnil,vapernfr,envfrq,frcnengr,pnzchf,1980f,nccrnef,cerfragrq,yvrf,pbzcbfrq,erpragyl,vasyhrapr,svsgu,angvbaf,perrx,ersreraprf,ryrpgvbaf,oevgnva,qbhoyr,pnfg,zrnavat,rnearq,pneevrq,cebqhpre,ynggre,ubhfvat,oebguref,nggrzcg,negvpyr,erfcbafr,obeqre,erznvavat,arneol,qverpg,fuvcf,inyhr,jbexref,cbyvgvpvna,npnqrzvp,ynory,1970f,pbzznaqre,ehyr,sryybj,erfvqragf,nhgubevgl,rqvgbe,genafcbeg,qhgpu,cebwrpgf,erfcbafvoyr,pbirerq,greevgbel,syvtug,enprf,qrsrafr,gbjre,rzcrebe,nyohzf,snpvyvgvrf,qnvyl,fgbevrf,nffvfgnag,znantrq,cevznevyl,dhnyvgl,shapgvba,cebcbfrq,qvfgevohgvba,pbaqvgvbaf,cevmr,wbheany,pbqr,ivpr,arjfcncre,pbecf,uvtuyl,pbafgehpgrq,znlbe,pevgvpny,frpbaqnel,pbecbengvba,ehtol,ertvzrag,buvb,nccrnenaprf,freir,nyybj,angvba,zhygvcyr,qvfpbirerq,qverpgyl,fprar,yriryf,tebjgu,ryrzragf,npdhverq,1990f,bssvpref,culfvpny,20gu,yngva,ubfg,wrefrl,tenqhngrq,neevirq,vffhrq,yvgrengher,zrgny,rfgngr,ibgr,vzzrqvngryl,dhvpxyl,nfvna,pbzcrgrq,rkgraqrq,cebqhpr,heona,1960f,cebzbgrq,pbagrzcbenel,tybony,sbezreyl,nccrne,vaqhfgevny,glcrf,bcren,zvavfgel,fbyqvref,pbzzbayl,znff,sbezngvba,fznyyre,glcvpnyyl,qenzn,fubegyl,qrafvgl,frangr,rssrpgf,vena,cbyvfu,cebzvarag,aniny,frggyrzrag,qvivqrq,onfvf,erchoyvpna,ynathntrf,qvfgnapr,gerngzrag,pbagvahr,cebqhpg,zvyr,fbheprf,sbbgonyyre,sbezng,pyhof,yrnqrefuvc,vavgvny,bssref,bcrengvat,nirahr,bssvpvnyyl,pbyhzovn,tenqr,fdhnqeba,syrrg,creprag,snez,yrnqref,nterrzrag,yvxryl,rdhvczrag,jrofvgr,zbhag,terj,zrgubq,genafsreerq,vagraqrq,eranzrq,veba,nfvn,erfreir,pncnpvgl,cbyvgvpf,jvqryl,npgvivgl,nqinaprq,eryngvbaf,fpbggvfu,qrqvpngrq,perj,sbhaqre,rcvfbqrf,ynpx,nzbhag,ohvyq,rssbegf,pbaprcg,sbyybjf,beqrerq,yrnirf,cbfvgvir,rpbabzl,ragregnvazrag,nssnvef,zrzbevny,novyvgl,vyyvabvf,pbzzhavgvrf,pbybe,grkg,envyebnq,fpvragvsvp,sbphf,pbzrql,freirf,rkpunatr,raivebazrag,pnef,qverpgvba,betnavmrq,svez,qrfpevcgvba,ntrapl,nanylfvf,checbfr,qrfgeblrq,erprcgvba,cynaarq,erirnyrq,vasnagel,nepuvgrpgher,tebjvat,srnghevat,ubhfrubyq,pnaqvqngr,erzbirq,fvghngrq,zbqryf,xabjyrqtr,fbyb,grpuavpny,betnavmngvbaf,nffvtarq,pbaqhpgrq,cnegvpvcngrq,ynetryl,chepunfrq,ertvfgre,tnvarq,pbzovarq,urnqdhnegref,nqbcgrq,cbgragvny,cebgrpgvba,fpnyr,nccebnpu,fcernq,vaqrcraqrapr,zbhagnvaf,gvgyrq,trbtencul,nccyvrq,fnsrgl,zvkrq,npprcgrq,pbagvahrf,pncgherq,envy,qrsrng,cevapvcny,erpbtavmrq,yvrhgranag,zragvbarq,frzv,bjare,wbvag,yvoreny,npgerff,genssvp,perngvba,onfvp,abgrf,havdhr,fhcerzr,qrpynerq,fvzcyl,cynagf,fnyrf,znffnpuhfrggf,qrfvtangrq,cnegvrf,wnmm,pbzcnerq,orpbzrf,erfbheprf,gvgyrf,pbapreg,yrneavat,erznva,grnpuvat,irefvbaf,pbagrag,nybatfvqr,eribyhgvba,fbaf,oybpx,cerzvre,vzcnpg,punzcvbaf,qvfgevpgf,trarengvba,rfgvzngrq,ibyhzr,vzntr,fvgrf,nppbhag,ebyrf,fcbeg,dhnegre,cebivqvat,mbar,lneq,fpbevat,pynffrf,cerfrapr,cresbeznaprf,ercerfragngvirf,ubfgrq,fcyvg,gnhtug,bevtva,bylzcvp,pynvzf,pevgvpf,snpvyvgl,bppheerq,fhssrerq,zhavpvcny,qnzntr,qrsvarq,erfhygrq,erfcrpgviryl,rkcnaqrq,cyngsbez,qensg,bccbfvgvba,rkcrpgrq,rqhpngvbany,bagnevb,pyvzngr,ercbegf,ngynagvp,fheebhaqvat,cresbezvat,erqhprq,enaxrq,nyybjf,ovegu,abzvangrq,lbhatre,arjyl,xbat,cbfvgvbaf,gurngre,cuvynqrycuvn,urevgntr,svanyf,qvfrnfr,fvkgu,ynjf,erivrjf,pbafgvghgvba,genqvgvba,fjrqvfu,gurzr,svpgvba,ebzr,zrqvpvar,genvaf,erfhygvat,rkvfgvat,qrchgl,raivebazragny,ynobhe,pynffvpny,qrirybc,snaf,tenagrq,erprvir,nygreangvir,ortvaf,ahpyrne,snzr,ohevrq,pbaarpgrq,vqragvsvrq,cnynpr,snyyf,yrggref,pbzong,fpvraprf,rssbeg,ivyyntrf,vafcverq,ertvbaf,gbjaf,pbafreingvir,pubfra,navznyf,ynobe,nggnpxf,zngrevnyf,lneqf,fgrry,ercerfragngvir,bepurfgen,crnx,ragvgyrq,bssvpvnyf,ergheavat,ersrerapr,abegujrfg,vzcrevny,pbairagvba,rknzcyrf,bprna,choyvpngvba,cnvagvat,fhofrdhrag,serdhragyl,eryvtvba,oevtnqr,shyyl,fvqrf,npgf,przrgrel,eryngviryl,byqrfg,fhttrfgrq,fhpprrqrq,npuvrirq,nccyvpngvba,cebtenzzr,pryyf,ibgrf,cebzbgvba,tenqhngr,nezrq,fhccyl,sylvat,pbzzhavfg,svtherf,yvgrenel,argureynaqf,xbern,jbeyqjvqr,pvgvmraf,1950f,snphygl,qenj,fgbpx,frngf,bpphcvrq,zrgubqf,haxabja,negvpyrf,pynvz,ubyqf,nhgubevgvrf,nhqvrapr,fjrqra,vagreivrj,bognvarq,pbiref,frggyrq,genafsre,znexrq,nyybjvat,shaqvat,punyyratr,fbhgurnfg,hayvxr,pebja,evfr,cbegvba,genafcbegngvba,frpgbe,cunfr,cebcregvrf,rqtr,gebcvpny,fgnaqneqf,vafgvghgvbaf,cuvybfbcul,yrtvfyngvir,uvyyf,oenaq,shaq,pbasyvpg,hanoyr,sbhaqvat,ershfrq,nggrzcgf,zrgerf,creznarag,fgneevat,nccyvpngvbaf,perngvat,rssrpgvir,nverq,rkgrafvir,rzcyblrq,rarzl,rkcnafvba,ovyyobneq,enax,onggnyvba,zhygv,iruvpyr,sbhtug,nyyvnapr,pngrtbel,cresbez,srqrengvba,cbrgel,oebamr,onaqf,ragel,iruvpyrf,ohernh,znkvzhz,ovyyvba,gerrf,vagryyvtrapr,terngrfg,fperra,ersref,pbzzvffvbarq,tnyyrel,vawhel,pbasvezrq,frggvat,gerngl,nqhyg,nzrevpnaf,oebnqpnfgvat,fhccbegvat,cvybg,zbovyr,jevgref,cebtenzzvat,rkvfgrapr,fdhnq,zvaarfbgn,pbcvrf,xberna,cebivapvny,frgf,qrsrapr,bssvprf,ntevphygheny,vagreany,pber,abegurnfg,ergverzrag,snpgbel,npgvbaf,cerirag,pbzzhavpngvbaf,raqvat,jrrxyl,pbagnvavat,shapgvbaf,nggrzcgrq,vagrevbe,jrvtug,objy,erpbtavgvba,vapbecbengrq,vapernfvat,hygvzngryl,qbphzragnel,qrevirq,nggnpxrq,ylevpf,zrkvpna,rkgreany,puhepurf,praghevrf,zrgebcbyvgna,fryyvat,bccbfrq,crefbaary,zvyy,ivfvgrq,cerfvqragvny,ebnqf,cvrprf,abejrtvna,pbagebyyrq,18gu,erne,vasyhraprq,jerfgyvat,jrncbaf,ynhapu,pbzcbfre,ybpngvbaf,qrirybcvat,pvephvg,fcrpvsvpnyyl,fghqvbf,funerq,pnany,jvfpbafva,choyvfuvat,nccebirq,qbzrfgvp,pbafvfgrq,qrgrezvarq,pbzvp,rfgnoyvfuzrag,rkuvovgvba,fbhgujrfg,shry,ryrpgebavp,pncr,pbairegrq,rqhpngrq,zryobhear,uvgf,jvaf,cebqhpvat,abejnl,fyvtugyl,bpphe,fheanzr,vqragvgl,ercerfrag,pbafgvghrapl,shaqf,cebirq,yvaxf,fgehpgherf,nguyrgvp,oveqf,pbagrfg,hfref,cbrg,vafgvghgvba,qvfcynl,erprvivat,ener,pbagnvarq,thaf,zbgvba,cvnab,grzcrengher,choyvpngvbaf,cnffratre,pbagevohgrq,gbjneq,pngurqeny,vaunovgnagf,nepuvgrpg,rkvfg,nguyrgvpf,zhfyvz,pbhefrf,nonaqbarq,fvtany,fhpprffshyyl,qvfnzovthngvba,graarffrr,qlanfgl,urnivyl,znelynaq,wrjf,ercerfragvat,ohqtrg,jrngure,zvffbhev,vagebqhpgvba,snprq,cnve,puncry,ersbez,urvtug,ivrganz,bpphef,zbgbe,pnzoevqtr,ynaqf,sbphfrq,fbhtug,cngvragf,funcr,vainfvba,purzvpny,vzcbegnapr,pbzzhavpngvba,fryrpgvba,ertneqvat,ubzrf,ibvibqrfuvc,znvagnvarq,obebhtu,snvyher,ntrq,cnffvat,ntevphygher,bertba,grnpuref,sybj,cuvyvccvarf,genvy,friragu,cbeghthrfr,erfvfgnapr,ernpuvat,artngvir,snfuvba,fpurqhyrq,qbjagbja,havirefvgvrf,genvarq,fxvyyf,fprarf,ivrjf,abgnoyl,glcvpny,vapvqrag,pnaqvqngrf,ratvarf,qrpnqrf,pbzcbfvgvba,pbzzhar,punva,vap.,nhfgevn,fnyr,inyhrf,rzcyblrrf,punzore,ertneqrq,jvaaref,ertvfgrerq,gnfx,vairfgzrag,pbybavny,fjvff,hfre,ragveryl,synt,fgberf,pybfryl,ragenapr,ynvq,wbheanyvfg,pbny,rdhny,pnhfrf,ghexvfu,dhrorp,grpuavdhrf,cebzbgr,whapgvba,rnfvyl,qngrf,xraghpxl,fvatncber,erfvqrapr,ivbyrapr,nqinapr,fheirl,uhznaf,rkcerffrq,cnffrf,fgerrgf,qvfgvathvfurq,dhnyvsvrq,sbyx,rfgnoyvfu,rtlcg,negvyyrel,ivfhny,vzcebirq,npghny,svavfuvat,zrqvhz,cebgrva,fjvgmreynaq,cebqhpgvbaf,bcrengr,cbiregl,arvtuobeubbq,betnavfngvba,pbafvfgvat,pbafrphgvir,frpgvbaf,cnegarefuvc,rkgrafvba,ernpgvba,snpgbe,pbfgf,obqvrf,qrivpr,rguavp,enpvny,syng,bowrpgf,puncgre,vzcebir,zhfvpvnaf,pbhegf,pbagebirefl,zrzorefuvc,zretrq,jnef,rkcrqvgvba,vagrerfgf,neno,pbzvpf,tnva,qrfpevorf,zvavat,onpurybe,pevfvf,wbvavat,qrpnqr,1930f,qvfgevohgrq,unovgng,ebhgrf,neran,plpyr,qvivfvbaf,oevrsyl,ibpnyf,qverpgbef,qrterrf,bowrpg,erpbeqvatf,vafgnyyrq,nqwnprag,qrznaq,ibgrq,pnhfvat,ohfvarffrf,ehyrq,tebhaqf,fgneerq,qenja,bccbfvgr,fgnaqf,sbezny,bcrengrf,crefbaf,pbhagvrf,pbzcrgr,jnir,vfenryv,apnn,erfvtarq,oevrs,terrpr,pbzovangvba,qrzbtencuvpf,uvfgbevna,pbagnva,pbzzbajrnygu,zhfvpvna,pbyyrpgrq,nethrq,ybhvfvnan,frffvba,pnovarg,cneyvnzragnel,ryrpgbeny,ybna,cebsvg,erthyneyl,pbafreingvba,vfynzvp,chepunfr,17gu,punegf,erfvqragvny,rneyvrfg,qrfvtaf,cnvagvatf,fheivirq,zbgu,vgrzf,tbbqf,terl,naavirefnel,pevgvpvfz,vzntrf,qvfpbirel,bofreirq,haqretebhaq,cebterff,nqqvgvbanyyl,cnegvpvcngr,gubhfnaqf,erqhpr,ryrzragnel,bjaref,fgngvat,vend,erfbyhgvba,pncgher,gnax,ebbzf,ubyyljbbq,svanapr,dhrrafynaq,ervta,znvagnva,vbjn,ynaqvat,oebnq,bhgfgnaqvat,pvepyr,cngu,znahsnpghevat,nffvfgnapr,frdhrapr,tzvan,pebffvat,yrnqf,havirefny,funcrq,xvatf,nggnpurq,zrqvriny,ntrf,zrgeb,pbybal,nssrpgrq,fpubynef,bxynubzn,pbnfgny,fbhaqgenpx,cnvagrq,nggraq,qrsvavgvba,zrnajuvyr,checbfrf,gebcul,erdhver,znexrgvat,cbchynevgl,pnoyr,zngurzngvpf,zvffvffvccv,ercerfragf,fpurzr,nccrny,qvfgvapg,snpgbef,npvq,fhowrpgf,ebhtuyl,grezvany,rpbabzvpf,frangbe,qvbprfr,cevk,pbagenfg,netragvan,pmrpu,jvatf,eryvrs,fgntrf,qhgvrf,16gu,abiryf,npphfrq,juvyfg,rdhvinyrag,punetrq,zrnfher,qbphzragf,pbhcyrf,erdhrfg,qnavfu,qrsrafvir,thvqr,qrivprf,fgngvfgvpf,perqvgrq,gevrf,cnffratref,nyyvrq,senzr,chregb,cravafhyn,pbapyhqrq,vafgehzragf,jbhaqrq,qvssreraprf,nffbpvngr,sberfgf,nsgrejneqf,ercynpr,erdhverzragf,nivngvba,fbyhgvba,bssrafvir,bjarefuvc,vaare,yrtvfyngvba,uhatnevna,pbagevohgvbaf,npgbef,genafyngrq,qraznex,fgrnz,qrcraqvat,nfcrpgf,nffhzrq,vawherq,frirer,nqzvggrq,qrgrezvar,fuber,grpuavdhr,neeviny,zrnfherf,genafyngvba,qrohgrq,qryvirerq,ergheaf,erwrpgrq,frcnengrq,ivfvgbef,qnzntrq,fgbentr,nppbzcnavrq,znexrgf,vaqhfgevrf,ybffrf,thys,punegre,fgengrtl,pbecbengr,fbpvnyvfg,fbzrjung,fvtavsvpnagyl,culfvpf,zbhagrq,fngryyvgr,rkcrevraprq,pbafgnag,eryngvir,cnggrea,erfgberq,orytvhz,pbaarpgvphg,cnegaref,uneineq,ergnvarq,argjbexf,cebgrpgrq,zbqr,negvfgvp,cnenyyry,pbyynobengvba,qrongr,vaibyivat,wbhearl,yvaxrq,fnyg,nhgubef,pbzcbaragf,pbagrkg,bpphcngvba,erdhverf,bppnfvbanyyl,cbyvpvrf,gnzvy,bggbzna,eribyhgvbanel,uhatnel,cbrz,irefhf,tneqraf,nzbatfg,nhqvb,znxrhc,serdhrapl,zrgref,begubqbk,pbagvahvat,fhttrfgf,yrtvfyngher,pbnyvgvba,thvgnevfg,rvtugu,pynffvsvpngvba,cenpgvprf,fbvy,gbxlb,vafgnapr,yvzvg,pbirentr,pbafvqrenoyr,enaxvat,pbyyrtrf,pninyel,pragref,qnhtugref,gjva,rdhvccrq,oebnqjnl,aneebj,ubfgf,engrf,qbznva,obhaqnel,neenatrq,12gu,jurernf,oenmvyvna,sbezvat,engvat,fgengrtvp,pbzcrgvgvbaf,genqvat,pbirevat,onygvzber,pbzzvffvbare,vasenfgehpgher,bevtvaf,ercynprzrag,cenvfrq,qvfp,pbyyrpgvbaf,rkcerffvba,hxenvar,qevira,rqvgrq,nhfgevna,fbyne,rafher,cerzvrerq,fhpprffbe,jbbqra,bcrengvbany,uvfcnavp,pbapreaf,encvq,cevfbaref,puvyqubbq,zrrgf,vasyhragvny,ghaary,rzcyblzrag,gevor,dhnyvslvat,nqncgrq,grzcbenel,pryroengrq,nccrnevat,vapernfvatyl,qrcerffvba,nqhygf,pvarzn,ragrevat,ynobengbel,fpevcg,sybjf,ebznavn,nppbhagf,svpgvbany,cvggfohetu,npuvrir,zbanfgrel,senapuvfr,sbeznyyl,gbbyf,arjfcncref,eriviny,fcbafberq,cebprffrf,ivraan,fcevatf,zvffvbaf,pynffvsvrq,13gu,naahnyyl,oenapurf,ynxrf,traqre,znaare,nqiregvfvat,abeznyyl,znvagranapr,nqqvat,punenpgrevfgvpf,vagrtengrq,qrpyvar,zbqvsvrq,fgebatyl,pevgvp,ivpgvzf,znynlfvn,nexnafnf,anmv,erfgbengvba,cbjrerq,zbahzrag,uhaqerqf,qrcgu,15gu,pbagebirefvny,nqzveny,pevgvpvmrq,oevpx,ubabenel,vavgvngvir,bhgchg,ivfvgvat,ovezvatunz,cebterffvir,rkvfgrq,pneoba,1920f,perqvgf,pbybhe,evfvat,urapr,qrsrngvat,fhcrevbe,svyzrq,yvfgvat,pbyhza,fheebhaqrq,beyrnaf,cevapvcyrf,greevgbevrf,fgehpx,cnegvpvcngvba,vaqbarfvn,zbirzragf,vaqrk,pbzzrepr,pbaqhpg,pbafgvghgvbany,fcvevghny,nzonffnqbe,ibpny,pbzcyrgvba,rqvaohetu,erfvqvat,gbhevfz,svaynaq,ornef,zrqnyf,erfvqrag,gurzrf,ivfvoyr,vaqvtrabhf,vaibyirzrag,onfva,ryrpgevpny,hxenvavna,pbapregf,obngf,fglyrf,cebprffvat,eviny,qenjvat,irffryf,rkcrevzragny,qrpyvarq,gbhevat,fhccbegref,pbzcvyngvba,pbnpuvat,pvgrq,qngrq,ebbgf,fgevat,rkcynvarq,genafvg,genqvgvbanyyl,cbrzf,zvavzhz,ercerfragngvba,14gu,eryrnfrf,rssrpgviryl,nepuvgrpgheny,gevcyr,vaqvpngrq,terngyl,ryringvba,pyvavpny,cevagrq,10gu,cebcbfny,crnxrq,cebqhpref,ebznavmrq,encvqyl,fgernz,vaavatf,zrrgvatf,pbhagre,ubhfrubyqre,ubabhe,ynfgrq,ntrapvrf,qbphzrag,rkvfgf,fheivivat,rkcrevraprf,ubabef,ynaqfpncr,uheevpnar,uneobe,cnary,pbzcrgvat,cebsvyr,irffry,snezref,yvfgf,erirahr,rkprcgvba,phfgbzref,11gu,cnegvpvcnagf,jvyqyvsr,hgnu,ovoyr,tenqhnyyl,cerfreirq,ercynpvat,flzcubal,ortha,ybatrfg,fvrtr,cebivaprf,zrpunavpny,traer,genafzvffvba,ntragf,rkrphgrq,ivqrbf,orarsvgf,shaqrq,engrq,vafgehzragny,avagu,fvzvyneyl,qbzvangrq,qrfgehpgvba,cnffntr,grpuabybtvrf,gurernsgre,bhgre,snpvat,nssvyvngrq,bccbeghavgvrf,vafgehzrag,tbireazragf,fpubyne,ribyhgvba,punaaryf,funerf,frffvbaf,jvqrfcernq,bppnfvbaf,ratvarref,fpvragvfgf,fvtavat,onggrel,pbzcrgvgvir,nyyrtrq,ryvzvangrq,fhccyvrf,whqtrf,unzcfuver,ertvzr,cbegenlrq,cranygl,gnvjna,qravrq,fhoznevar,fpubynefuvc,fhofgnagvny,genafvgvba,ivpgbevna,uggc,arireguryrff,svyrq,fhccbegf,pbagvaragny,gevorf,engvb,qbhoyrf,hfrshy,ubabhef,oybpxf,cevapvcyr,ergnvy,qrcnegher,enaxf,cngeby,lbexfuver,inapbhire,vagre,rkgrag,nstunavfgna,fgevc,envyjnlf,pbzcbarag,betna,flzoby,pngrtbevrf,rapbhentrq,noebnq,pvivyvna,crevbqf,geniryrq,jevgrf,fgehttyr,vzzrqvngr,erpbzzraqrq,nqncgngvba,rtlcgvna,tenqhngvat,nffnhyg,qehzf,abzvangvba,uvfgbevpnyyl,ibgvat,nyyvrf,qrgnvyrq,npuvrirzrag,crepragntr,nenovp,nffvfg,serdhrag,gbherq,nccyl,naq/be,vagrefrpgvba,znvar,gbhpuqbja,guebar,cebqhprf,pbagevohgvba,rzretrq,bognva,nepuovfubc,frrx,erfrnepuref,erznvaqre,cbchyngvbaf,pyna,svaavfu,birefrnf,svsn,yvprafrq,purzvfgel,srfgvinyf,zrqvgreenarna,vawhevrf,navzngrq,frrxvat,choyvfure,ibyhzrf,yvzvgf,irahr,wrehfnyrz,trarengrq,gevnyf,vfynz,lbhatrfg,ehyvat,tynftbj,treznaf,fbatjevgre,crefvna,zhavpvcnyvgvrf,qbangrq,ivrjrq,orytvna,pbbcrengvba,cbfgrq,grpu,qhny,ibyhagrre,frggyref,pbzznaqrq,pynvzvat,nccebiny,qryuv,hfntr,grezvahf,cnegyl,ryrpgevpvgl,ybpnyyl,rqvgvbaf,cerzvrer,nofrapr,oryvrs,genqvgvbaf,fgnghr,vaqvpngr,znabe,fgnoyr,nggevohgrq,cbffrffvba,znantvat,ivrjref,puvyr,bireivrj,frrq,erthyngvbaf,rffragvny,zvabevgl,pnetb,frtzrag,raqrzvp,sbehz,qrnguf,zbaguyl,cynlbssf,rerpgrq,cenpgvpny,znpuvarf,fhoheo,eryngvba,zef.,qrfprag,vaqbbe,pbagvahbhf,punenpgrevmrq,fbyhgvbaf,pnevoorna,erohvyg,freovna,fhzznel,pbagrfgrq,cflpubybtl,cvgpu,nggraqvat,zhunzznq,graher,qeviref,qvnzrgre,nffrgf,iragher,chax,nveyvarf,pbapragengvba,nguyrgrf,ibyhagrref,cntrf,zvarf,vasyhraprf,fphycgher,cebgrfg,sreel,orunys,qensgrq,nccnerag,shegurezber,enatvat,ebznavna,qrzbpenpl,ynaxn,fvtavsvpnapr,yvarne,q.p.,pregvsvrq,ibgref,erpbirerq,gbhef,qrzbyvfurq,obhaqnevrf,nffvfgrq,vqragvsl,tenqrf,ryfrjurer,zrpunavfz,1940f,ercbegrqyl,nvzrq,pbairefvba,fhfcraqrq,cubgbtencul,qrcnegzragf,orvwvat,ybpbzbgvirf,choyvpyl,qvfchgr,zntnmvarf,erfbeg,pbairagvbany,cyngsbezf,vagreangvbanyyl,pncvgn,frggyrzragf,qenzngvp,qreol,rfgnoyvfuvat,vaibyirf,fgngvfgvpny,vzcyrzragngvba,vzzvtenagf,rkcbfrq,qvirefr,ynlre,infg,prnfrq,pbaarpgvbaf,orybatrq,vagrefgngr,hrsn,betnavfrq,nohfr,qrcyblrq,pnggyr,cnegvnyyl,svyzvat,znvafgernz,erqhpgvba,nhgbzngvp,eneryl,fhofvqvnel,qrpvqrf,zretre,pbzcerurafvir,qvfcynlrq,nzraqzrag,thvarn,rkpyhfviryl,znaunggna,pbapreavat,pbzzbaf,enqvpny,freovn,oncgvfg,ohfrf,vavgvngrq,cbegenvg,uneobhe,pubve,pvgvmra,fbyr,hafhpprffshy,znahsnpgherq,rasbeprzrag,pbaarpgvat,vapernfrf,cnggreaf,fnperq,zhfyvzf,pybguvat,uvaqh,havapbecbengrq,fragraprq,nqivfbel,gnaxf,pnzcnvtaf,syrq,ercrngrq,erzbgr,eroryyvba,vzcyrzragrq,grkgf,svggrq,gevohgr,jevgvatf,fhssvpvrag,zvavfgref,21fg,qribgrq,whevfqvpgvba,pbnpurf,vagrecergngvba,cbyr,ohfvarffzna,creh,fcbegvat,cevprf,phon,erybpngrq,bccbarag,neenatrzrag,ryvgr,znahsnpghere,erfcbaqrq,fhvgnoyr,qvfgvapgvba,pnyraqne,qbzvanag,gbhevfg,rneavat,cersrpgher,gvrf,cercnengvba,natyb,chefhr,jbefuvc,nepunrbybtvpny,punapryybe,onatynqrfu,fpberf,genqrq,ybjrfg,ubeebe,bhgqbbe,ovbybtl,pbzzragrq,fcrpvnyvmrq,ybbc,neevivat,snezvat,ubhfrq,uvfgbevnaf,'gur,cngrag,chcvyf,puevfgvnavgl,bccbaragf,nguraf,abegujrfgrea,zncf,cebzbgvat,erirnyf,syvtugf,rkpyhfvir,yvbaf,abesbyx,uroerj,rkgrafviryl,ryqrfg,fubcf,npdhvfvgvba,iveghny,erabjarq,znetva,batbvat,rffragvnyyl,venavna,nygreangr,fnvyrq,ercbegvat,pbapyhfvba,bevtvangrq,grzcrengherf,rkcbfher,frpherq,ynaqrq,evsyr,senzrjbex,vqragvpny,znegvny,sbphfrf,gbcvpf,onyyrg,svtugref,orybatvat,jrnygul,artbgvngvbaf,ribyirq,onfrf,bevragrq,nperf,qrzbpeng,urvtugf,erfgevpgrq,inel,tenqhngvba,nsgrezngu,purff,vyyarff,cnegvpvcngvat,iregvpny,pbyyrpgvir,vzzvtengvba,qrzbafgengrq,yrns,pbzcyrgvat,betnavp,zvffvyr,yrrqf,ryvtvoyr,tenzzne,pbasrqrengr,vzcebirzrag,pbaterffvbany,jrnygu,pvapvaangv,fcnprf,vaqvpngrf,pbeerfcbaqvat,ernpurf,ercnve,vfbyngrq,gnkrf,pbatertngvba,engvatf,yrnthrf,qvcybzngvp,fhozvggrq,jvaqf,njnerarff,cubgbtencuf,znevgvzr,avtrevn,npprffvoyr,navzngvba,erfgnhenagf,cuvyvccvar,vanhtheny,qvfzvffrq,nezravna,vyyhfgengrq,erfreibve,fcrnxref,cebtenzzrf,erfbhepr,trargvp,vagreivrjf,pnzcf,erthyngvba,pbzchgref,cersreerq,geniryyrq,pbzcnevfba,qvfgvapgvir,erperngvba,erdhrfgrq,fbhgurnfgrea,qrcraqrag,oevfonar,oerrqvat,cynlbss,rkcnaq,obahf,tnhtr,qrcnegrq,dhnyvsvpngvba,vafcvengvba,fuvccvat,fynirf,inevngvbaf,fuvryq,gurbevrf,zhavpu,erpbtavfrq,rzcunfvf,snibhe,inevnoyr,frrqf,haqretenqhngr,greevgbevny,vagryyrpghny,dhnyvsl,zvav,onaarq,cbvagrq,qrzbpengf,nffrffzrag,whqvpvny,rknzvangvba,nggrzcgvat,bowrpgvir,cnegvny,punenpgrevfgvp,uneqjner,cenqrfu,rkrphgvba,bggnjn,zrger,qehz,rkuvovgvbaf,jvguqerj,nggraqnapr,cuenfr,wbheanyvfz,ybtb,zrnfherq,reebe,puevfgvnaf,gevb,cebgrfgnag,gurbybtl,erfcrpgvir,ngzbfcurer,ohqquvfg,fhofgvghgr,pheevphyhz,shaqnzragny,bhgoernx,enoov,vagrezrqvngr,qrfvtangvba,tybor,yvorengvba,fvzhygnarbhfyl,qvfrnfrf,rkcrevzragf,ybpbzbgvir,qvssvphygvrf,znvaynaq,arcny,eryrtngrq,pbagevohgvat,qngnonfr,qrirybczragf,irgrena,pneevrf,enatrf,vafgehpgvba,ybqtr,cebgrfgf,bonzn,arjpnfgyr,rkcrevzrag,culfvpvna,qrfpevovat,punyyratrf,pbeehcgvba,qrynjner,nqiragherf,rafrzoyr,fhpprffvba,eranvffnapr,gragu,nygvghqr,erprvirf,nccebnpurq,pebffrf,flevn,pebngvn,jnefnj,cebsrffvbanyf,vzcebirzragf,jbea,nveyvar,pbzcbhaq,crezvggrq,cerfreingvba,erqhpvat,cevagvat,fpvragvfg,npgvivfg,pbzcevfrf,fvmrq,fbpvrgvrf,ragref,ehyre,tbfcry,rnegudhnxr,rkgraq,nhgbabzbhf,pebngvna,frevny,qrpbengrq,eryrinag,vqrny,tebjf,tenff,gvre,gbjref,jvqre,jrysner,pbyhzaf,nyhzav,qrfpraqnagf,vagresnpr,erfreirf,onaxvat,pbybavrf,znahsnpgheref,zntargvp,pybfher,cvgpurq,ibpnyvfg,cerfreir,raebyyrq,pnapryyrq,rdhngvba,2000f,avpxanzr,ohytnevn,urebrf,rkvyr,zngurzngvpny,qrznaqf,vachg,fgehpgheny,ghor,fgrz,nccebnpurf,netragvar,nkvf,znahfpevcg,vaurevgrq,qrcvpgrq,gnetrgf,ivfvgf,irgrenaf,ertneq,erzbiny,rssvpvrapl,betnavfngvbaf,pbaprcgf,yronaba,znatn,crgrefohet,enyyl,fhccyvrq,nzbhagf,lnyr,gbheanzragf,oebnqpnfgf,fvtanyf,cvybgf,nmreonvwna,nepuvgrpgf,ramlzr,yvgrenpl,qrpynengvba,cynpvat,onggvat,vaphzorag,ohytnevna,pbafvfgrag,cbyy,qrsraqrq,ynaqznex,fbhgujrfgrea,envq,erfvtangvba,geniryf,pnfhnygvrf,cerfgvtvbhf,anzryl,nvzf,erpvcvrag,jnesner,ernqref,pbyyncfr,pbnpurq,pbagebyf,ibyyrlonyy,pbhc,yrffre,irefr,cnvef,rkuvovgrq,cebgrvaf,zbyrphyne,novyvgvrf,vagrtengvba,pbafvfg,nfcrpg,nqibpngr,nqzvavfgrerq,tbireavat,ubfcvgnyf,pbzzraprq,pbvaf,ybeqf,inevngvba,erfhzrq,pnagba,negvsvpvny,ryringrq,cnyz,qvssvphygl,pvivp,rssvpvrag,abegurnfgrea,vaqhpgrq,enqvngvba,nssvyvngr,obneqf,fgnxrf,olmnagvar,pbafhzcgvba,servtug,vagrenpgvba,boynfg,ahzorerq,frzvanel,pbagenpgf,rkgvapg,cerqrprffbe,ornevat,phygherf,shapgvbany,arvtuobevat,erivfrq,plyvaqre,tenagf,aneengvir,ersbezf,nguyrgr,gnyrf,ersyrpg,cerfvqrapl,pbzcbfvgvbaf,fcrpvnyvfg,pevpxrgre,sbhaqref,frdhry,jvqbj,qvfonaqrq,nffbpvngvbaf,onpxrq,gurerol,cvgpure,pbzznaqvat,obhyrineq,fvatref,pebcf,zvyvgvn,erivrjrq,pragerf,jnirf,pbafrdhragyl,sbegerff,gevohgnel,cbegvbaf,obzovat,rkpryyrapr,arfg,cnlzrag,znef,cynmn,havgl,ivpgbevrf,fpbgvn,snezf,abzvangvbaf,inevnag,nggnpxvat,fhfcrafvba,vafgnyyngvba,tencuvpf,rfgngrf,pbzzragf,npbhfgvp,qrfgvangvba,irahrf,fheeraqre,ergerng,yvoenevrf,dhnegreonpx,phfgbzf,orexryrl,pbyynobengrq,tngurerq,flaqebzr,qvnybthr,erpehvgrq,funatunv,arvtuobhevat,cflpubybtvpny,fnhqv,zbqrengr,rkuvovg,vaabingvba,qrcbg,ovaqvat,oehafjvpx,fvghngvbaf,pregvsvpngr,npgviryl,funxrfcrner,rqvgbevny,cerfragngvba,cbegf,erynl,angvbanyvfg,zrgubqvfg,nepuvirf,rkcregf,znvagnvaf,pbyyrtvngr,ovfubcf,znvagnvavat,grzcbenevyl,rzonffl,rffrk,jryyvatgba,pbaarpgf,ersbezrq,oratny,erpnyyrq,vapurf,qbpgevar,qrrzrq,yrtraqnel,erpbafgehpgvba,fgngrzragf,cnyrfgvavna,zrgre,npuvrirzragf,evqref,vagrepunatr,fcbgf,nhgb,npphengr,pubehf,qvffbyirq,zvffvbanel,gunv,bcrengbef,r.t.,trarengvbaf,snvyvat,qrynlrq,pbex,anfuivyyr,creprvirq,irarmhryn,phyg,rzretvat,gbzo,nobyvfurq,qbphzragrq,tnvavat,pnalba,rcvfpbcny,fgberq,nffvfgf,pbzcvyrq,xrenyn,xvybzrgref,zbfdhr,tenzzl,gurberz,havbaf,frtzragf,tynpvre,neevirf,gurngevpny,pvephyngvba,pbasreraprf,puncgref,qvfcynlf,pvephyne,nhguberq,pbaqhpgbe,srjre,qvzrafvbany,angvbajvqr,yvtn,lhtbfynivn,crre,ivrganzrfr,sryybjfuvc,nezvrf,ertneqyrff,eryngvat,qlanzvp,cbyvgvpvnaf,zvkgher,frevr,fbzrefrg,vzcevfbarq,cbfgf,oryvrsf,orgn,ynlbhg,vaqrcraqragyl,ryrpgebavpf,cebivfvbaf,snfgrfg,ybtvp,urnqdhnegrerq,perngrf,punyyratrq,orngra,nccrnyf,cynvaf,cebgbpby,tencuvp,nppbzzbqngr,vendv,zvqsvryqre,fcna,pbzzragnel,serrfglyr,ersyrpgrq,cnyrfgvar,yvtugvat,ohevny,iveghnyyl,onpxvat,centhr,gevony,urve,vqragvsvpngvba,cebgbglcr,pevgrevn,qnzr,nepu,gvffhr,sbbgntr,rkgraqvat,cebprqherf,cerqbzvanagyl,hcqngrq,eulguz,ceryvzvanel,pnsr,qvfbeqre,ceriragrq,fhoheof,qvfpbagvahrq,ergvevat,beny,sbyybjref,rkgraqf,znffnper,wbheanyvfgf,pbadhrfg,yneinr,cebabhaprq,orunivbhe,qvirefvgl,fhfgnvarq,nqqerffrq,trbtencuvp,erfgevpgvbaf,ibvprq,zvyjnhxrr,qvnyrpg,dhbgrq,tevq,angvbanyyl,arnerfg,ebfgre,gjragvrgu,frcnengvba,vaqvrf,znantrf,pvgvat,vagreiragvba,thvqnapr,frireryl,zvtengvba,negjbex,sbphfvat,evinyf,gehfgrrf,inevrq,ranoyrq,pbzzvggrrf,pragrerq,fxngvat,fynirel,pneqvanyf,sbepvat,gnfxf,nhpxynaq,lbhghor,nethrf,pbyberq,nqivfbe,zhzonv,erdhvevat,gurbybtvpny,ertvfgengvba,ershtrrf,avargrragu,fheivibef,ehaaref,pbyyrnthrf,cevrfgf,pbagevohgr,inevnagf,jbexfubc,pbapragengrq,perngbe,yrpgherf,grzcyrf,rkcybengvba,erdhverzrag,vagrenpgvir,anivtngvba,pbzcnavba,cregu,nyyrtrqyl,eryrnfvat,pvgvmrafuvc,bofreingvba,fgngvbarq,cu.q.,furrc,oerrq,qvfpbiref,rapbhentr,xvybzrgerf,wbheanyf,cresbezref,vfyr,fnfxngpurjna,uloevq,ubgryf,ynapnfuver,qhoorq,nvesvryq,napube,fhoheona,gurbergvpny,fhffrk,natyvpna,fgbpxubyz,creznaragyl,hcpbzvat,cevingryl,erprvire,bcgvpny,uvtujnlf,pbatb,pbybhef,nttertngr,nhgubevmrq,ercrngrqyl,inevrf,syhvq,vaabingvir,genafsbezrq,cenvfr,pbaibl,qrznaqrq,qvfpbtencul,nggenpgvba,rkcbeg,nhqvraprf,beqnvarq,rayvfgrq,bppnfvbany,jrfgzvafgre,flevna,urniljrvtug,obfavn,pbafhygnag,riraghny,vzcebivat,nverf,jvpxrgf,rcvp,ernpgvbaf,fpnaqny,v.r.,qvfpevzvangvba,ohrabf,cngeba,vairfgbef,pbawhapgvba,grfgnzrag,pbafgehpg,rapbhagrerq,pryroevgl,rkcnaqvat,trbetvna,oenaqf,ergnva,haqrejrag,nytbevguz,sbbqf,cebivfvba,beovg,genafsbezngvba,nffbpvngrf,gnpgvpny,pbzcnpg,inevrgvrf,fgnovyvgl,ershtr,tngurevat,zberbire,znavyn,pbasvthengvba,tnzrcynl,qvfpvcyvar,ragvgl,pbzcevfvat,pbzcbfref,fxvyy,zbavgbevat,ehvaf,zhfrhzf,fhfgnvanoyr,nrevny,nygrerq,pbqrf,iblntr,sevrqevpu,pbasyvpgf,fgbelyvar,geniryyvat,pbaqhpgvat,zrevg,vaqvpngvat,ersreraqhz,pheerapl,rapbhagre,cnegvpyrf,nhgbzbovyr,jbexfubcf,nppynvzrq,vaunovgrq,qbpgbengr,phona,curabzraba,qbzr,raebyyzrag,gbonppb,tbireanapr,geraq,rdhnyyl,znahsnpgher,ulqebtra,tenaqr,pbzcrafngvba,qbjaybnq,cvnavfg,tenva,fuvsgrq,arhgeny,rinyhngvba,qrsvar,plpyvat,frvmrq,neenl,eryngvirf,zbgbef,svezf,inelvat,nhgbzngvpnyyl,erfgber,avpxanzrq,svaqvatf,tbirearq,vairfgvtngr,znavgbon,nqzvavfgengbe,ivgny,vagrteny,vaqbarfvna,pbashfvba,choyvfuref,ranoyr,trbtencuvpny,vaynaq,anzvat,pvivyvnaf,erpbaanvffnapr,vaqvnancbyvf,yrpghere,qrre,gbhevfgf,rkgrevbe,eubqr,onffvfg,flzobyf,fpbcr,nzzhavgvba,lhna,cbrgf,chawno,ahefvat,prag,qrirybcref,rfgvzngrf,cerfolgrevna,anfn,ubyqvatf,trarengr,erarjrq,pbzchgvat,plcehf,nenovn,qhengvba,pbzcbhaqf,tnfgebcbq,crezvg,inyvq,gbhpuqbjaf,snpnqr,vagrenpgvbaf,zvareny,cenpgvprq,nyyrtngvbaf,pbafrdhrapr,tbnyxrrcre,onebarg,pbclevtug,hcevfvat,pneirq,gnetrgrq,pbzcrgvgbef,zragvbaf,fnapghnel,srrf,chefhrq,gnzcn,puebavpyr,pncnovyvgvrf,fcrpvsvrq,fcrpvzraf,gbyy,nppbhagvat,yvzrfgbar,fgntrq,hctenqrq,cuvybfbcuvpny,fgernzf,thvyq,eribyg,envasnyy,fhccbegre,cevaprgba,greenva,ubzrgbja,cebonovyvgl,nffrzoyrq,cnhyb,fheerl,ibygntr,qrirybcre,qrfgeblre,sybbef,yvarhc,pheir,ceriragvba,cbgragvnyyl,bajneqf,gevcf,vzcbfrq,ubfgvat,fgevxvat,fgevpg,nqzvffvba,ncnegzragf,fbyryl,hgvyvgl,cebprrqrq,bofreingvbaf,rheb,vapvqragf,ivaly,cebsrffvba,unira,qvfgnag,rkcryyrq,evinyel,ehajnl,gbecrqb,mbarf,fuevar,qvzrafvbaf,vairfgvtngvbaf,yvguhnavn,vqnub,chefhvg,pbcrauntra,pbafvqrenoyl,ybpnyvgl,jveryrff,qrpernfr,trarf,gurezny,qrcbfvgf,uvaqv,unovgngf,jvguqenja,ovoyvpny,zbahzragf,pnfgvat,cyngrnh,gurfvf,znantref,sybbqvat,nffnffvangvba,npxabjyrqtrq,vagrevz,vafpevcgvba,thvqrq,cnfgbe,svanyr,vafrpgf,genafcbegrq,npgvivfgf,znefuny,vagrafvgl,nvevat,pneqvss,cebcbfnyf,yvsrfglyr,cerl,urenyq,pncvgby,nobevtvany,zrnfhevat,ynfgvat,vagrecergrq,bppheevat,qrfverq,qenjvatf,urnygupner,cnaryf,ryvzvangvba,bfyb,tunan,oybt,fnoun,vagrag,fhcrevagraqrag,tbireabef,onaxehcgpl,c.z.,rdhvgl,qvfx,ynlref,fybiravn,cehffvn,dhnegrg,zrpunavpf,tenqhngrf,cbyvgvpnyyl,zbaxf,fperracynl,angb,nofbeorq,gbccrq,crgvgvba,obyq,zbebppb,rkuvovgf,pnagreohel,choyvfu,enaxvatf,pengre,qbzvavpna,raunaprq,cynarf,yhgurena,tbireazragny,wbvaf,pbyyrpgvat,oehffryf,havsvrq,fgernx,fgengrtvrf,syntfuvc,fhesnprf,biny,nepuvir,rglzbybtl,vzcevfbazrag,vafgehpgbe,abgvat,erzvk,bccbfvat,freinag,ebgngvba,jvqgu,genaf,znxre,flagurfvf,rkprff,gnpgvpf,fanvy,ygq.,yvtugubhfr,frdhraprf,pbeajnyy,cynagngvba,zlgubybtl,cresbezf,sbhaqngvbaf,cbchyngrq,ubevmbagny,fcrrqjnl,npgvingrq,cresbezre,qvivat,pbaprvirq,rqzbagba,fhogebcvpny,raivebazragf,cebzcgrq,frzvsvanyf,pncf,ohyx,gernfhel,erperngvbany,gryrtencu,pbagvarag,cbegenvgf,eryrtngvba,pngubyvpf,tencu,irybpvgl,ehyref,raqnatrerq,frphyne,bofreire,yrneaf,vadhvel,vqby,qvpgvbanel,pregvsvpngvba,rfgvzngr,pyhfgre,nezravn,bofreingbel,erivirq,anqh,pbafhzref,ulcbgurfvf,znahfpevcgf,pbagragf,nethzragf,rqvgvat,genvyf,nepgvp,rffnlf,orysnfg,npdhver,cebzbgvbany,haqregnxra,pbeevqbe,cebprrqvatf,nagnepgvp,zvyyraavhz,ynoryf,qryrtngrf,irtrgngvba,nppynvz,qverpgvat,fhofgnapr,bhgpbzr,qvcybzn,cuvybfbcure,znygn,nyonavna,ivpvavgl,qrtp,yrtraqf,ertvzragf,pbafrag,greebevfg,fpnggrerq,cerfvqragf,tenivgl,bevragngvba,qrcyblzrag,qhpul,ershfrf,rfgbavn,pebjarq,frcnengryl,erabingvba,evfrf,jvyqrearff,bowrpgvirf,nterrzragf,rzcerff,fybcrf,vapyhfvba,rdhnyvgl,qrperr,onyybg,pevgvpvfrq,ebpurfgre,erpheevat,fgehttyrq,qvfnoyrq,uraev,cbyrf,cehffvna,pbaireg,onpgrevn,cbbeyl,fhqna,trbybtvpny,jlbzvat,pbafvfgragyl,zvavzny,jvguqenjny,vagreivrjrq,cebkvzvgl,ercnvef,vavgvngvirf,cnxvfgnav,erchoyvpnaf,cebcntnaqn,ivvv,nofgenpg,pbzzrepvnyyl,ninvynovyvgl,zrpunavfzf,ancyrf,qvfphffvbaf,haqreylvat,yraf,cebpynvzrq,nqivfrq,fcryyvat,nhkvyvnel,nggenpg,yvguhnavna,rqvgbef,b'oevra,nppbeqnapr,zrnfherzrag,abiryvfg,hffe,sbezngf,pbhapvyf,pbagrfgnagf,vaqvr,snprobbx,cnevfurf,oneevre,onggnyvbaf,fcbafbe,pbafhygvat,greebevfz,vzcyrzrag,htnaqn,pehpvny,hapyrne,abgvba,qvfgvathvfu,pbyyrpgbe,nggenpgvbaf,svyvcvab,rpbybtl,vairfgzragf,pncnovyvgl,erabingrq,vprynaq,nyonavn,npperqvgrq,fpbhgf,nezbe,fphycgbe,pbtavgvir,reebef,tnzvat,pbaqrzarq,fhpprffvir,pbafbyvqngrq,onebdhr,ragevrf,erthyngbel,erfreirq,gernfhere,inevnoyrf,nebfr,grpuabybtvpny,ebhaqrq,cebivqre,euvar,nterrf,npphenpl,traren,qrpernfrq,senaxsheg,rphnqbe,rqtrf,cnegvpyr,eraqrerq,pnyphyngrq,pnerref,snpgvba,evsyrf,nzrevpnf,tnryvp,cbegfzbhgu,erfvqrf,zrepunagf,svfpny,cerzvfrf,pbva,qenjf,cerfragre,npprcgnapr,prerzbavrf,cbyyhgvba,pbafrafhf,zrzoenar,oevtnqvre,abarguryrff,traerf,fhcreivfvba,cerqvpgrq,zntavghqr,svavgr,qvssre,naprfgel,inyr,qryrtngvba,erzbivat,cebprrqf,cynprzrag,rzvtengrq,fvoyvatf,zbyrphyrf,cnlzragf,pbafvqref,qrzbafgengvba,cebcbegvba,arjre,inyir,npuvrivat,pbasrqrengvba,pbagvahbhfyl,yhkhel,abger,vagebqhpvat,pbbeqvangrf,punevgnoyr,fdhnqebaf,qvfbeqref,trbzrgel,jvaavcrt,hyfgre,ybnaf,ybatgvzr,erprcgbe,cerprqvat,orytenqr,znaqngr,jerfgyre,arvtuobheubbq,snpgbevrf,ohqquvfz,vzcbegrq,frpgbef,cebgntbavfg,fgrrc,rynobengr,cebuvovgrq,negvsnpgf,cevmrf,chcvy,pbbcrengvir,fbirervta,fhofcrpvrf,pneevref,nyyzhfvp,angvbanyf,frggvatf,nhgbovbtencul,arvtuobeubbqf,nanybt,snpvyvgngr,ibyhagnel,wbvagyl,arjsbhaqynaq,betnavmvat,envqf,rkrepvfrf,abory,znpuvarel,onygvp,pebc,tenavgr,qrafr,jrofvgrf,znaqngbel,frrxf,fheeraqrerq,nagubybtl,pbzrqvna,obzof,fybg,flabcfvf,pevgvpnyyl,nepnqr,znexvat,rdhngvbaf,unyyf,vaqb,vanhthengrq,rzonexrq,fcrrqf,pynhfr,vairagvba,cerzvrefuvc,yvxrjvfr,cerfragvat,qrzbafgengr,qrfvtaref,betnavmr,rknzvarq,xz/u,oninevn,gebbc,ersrerr,qrgrpgvba,mhevpu,cenvevr,enccre,jvatfcna,rhebivfvba,yhkrzobhet,fybinxvn,vaprcgvba,qvfchgrq,znzznyf,ragercerarhe,znxref,rinatryvpny,lvryq,pyretl,genqrznex,qrshapg,nyybpngrq,qrcvpgvat,ibypnavp,onggrq,pbadhrerq,fphycgherf,cebivqref,ersyrpgf,nezbherq,ybpnyf,jnyg,uremrtbivan,pbagenpgrq,ragvgvrf,fcbafbefuvc,cebzvarapr,sybjvat,rguvbcvn,znexrgrq,pbecbengvbaf,jvguqenj,pneartvr,vaqhprq,vairfgvtngrq,cbegsbyvb,sybjrevat,bcvavbaf,ivrjvat,pynffebbz,qbangvbaf,obhaqrq,creprcgvba,yrvprfgre,sehvgf,puneyrfgba,npnqrzvpf,fgnghgr,pbzcynvagf,fznyyrfg,qrprnfrq,crgebyrhz,erfbyirq,pbzznaqref,nytroen,fbhgunzcgba,zbqrf,phygvingvba,genafzvggre,fcryyrq,bognvavat,fvmrf,nper,cntrnag,ongf,nooerivngrq,pbeerfcbaqrapr,oneenpxf,srnfg,gnpxyrf,enwn,qrevirf,trbybtl,qvfchgrf,genafyngvbaf,pbhagrq,pbafgnagvabcyr,frngvat,znprqbavn,ceriragvat,nppbzzbqngvba,ubzrynaq,rkcyberq,vainqrq,cebivfvbany,genafsbez,fcurer,hafhpprffshyyl,zvffvbanevrf,pbafreingvirf,uvtuyvtugf,genprf,betnavfzf,bcrayl,qnapref,sbffvyf,nofrag,zbanepul,pbzovavat,ynarf,fgvag,qlanzvpf,punvaf,zvffvyrf,fperravat,zbqhyr,gevohar,trarengvat,zvaref,abggvatunz,frbhy,habssvpvny,bjvat,yvaxvat,erunovyvgngvba,pvgngvba,ybhvfivyyr,zbyyhfx,qrcvpgf,qvssreragvny,mvzonojr,xbfbib,erpbzzraqngvbaf,erfcbafrf,cbggrel,fpbere,nvqrq,rkprcgvbaf,qvnyrpgf,gryrpbzzhavpngvbaf,qrsvarf,ryqreyl,yhane,pbhcyrq,sybja,25gu,rfca,sbezhyn_1,obeqrerq,sentzragf,thvqryvarf,tlzanfvhz,inyhrq,pbzcyrkvgl,cncny,cerfhznoyl,zngreany,punyyratvat,erhavgrq,nqinapvat,pbzcevfrq,hapregnva,snibenoyr,gjrysgu,pbeerfcbaqrag,abovyvgl,yvirfgbpx,rkcerffjnl,puvyrna,gvqr,erfrnepure,rzvffvbaf,cebsvgf,yratguf,nppbzcnalvat,jvgarffrq,vgharf,qenvantr,fybcr,ervasbeprq,srzvavfg,fnafxevg,qrirybcf,culfvpvnaf,bhgyrgf,vfoa,pbbeqvangbe,nirentrq,grezrq,bpphcl,qvntabfrq,lrneyl,uhznavgnevna,cebfcrpg,fcnprpensg,fgrzf,ranpgrq,yvahk,naprfgbef,xneangnxn,pbafgvghgr,vzzvtenag,guevyyre,rppyrfvnfgvpny,trarenyf,pryroengvbaf,raunapr,urngvat,nqibpngrq,rivqrag,nqinaprf,obzoneqzrag,jngrefurq,fuhggyr,jvpxrg,gjvggre,nqqf,oenaqrq,grnpurf,fpurzrf,crafvba,nqibpnpl,pbafreingbel,pnveb,inefvgl,serfujngre,cebivqrapr,frrzvatyl,furyyf,phvfvar,fcrpvnyyl,crnxf,vagrafvir,choyvfurf,gevybtl,fxvyyrq,anpvbany,harzcyblzrag,qrfgvangvbaf,cnenzrgref,irefrf,genssvpxvat,qrgrezvangvba,vasvavgr,fnivatf,nyvtazrag,yvathvfgvp,pbhagelfvqr,qvffbyhgvba,zrnfherzragf,nqinagntrf,yvprapr,fhosnzvyl,uvtuynaqf,zbqrfg,ertrag,nytrevn,perfg,grnpuvatf,xabpxbhg,oerjrel,pbzovar,pbairagvbaf,qrfpraqrq,punffvf,cevzvgvir,svwv,rkcyvpvgyl,phzoreynaq,hehthnl,ynobengbevrf,olcnff,ryrpg,vasbezny,cerprqrq,ubybpnhfg,gnpxyr,zvaarncbyvf,dhnagvgl,frphevgvrf,pbafbyr,qbpgbeny,eryvtvbaf,pbzzvffvbaref,rkcregvfr,hairvyrq,cerpvfr,qvcybzng,fgnaqvatf,vasnag,qvfpvcyvarf,fvpvyl,raqbefrq,flfgrzngvp,punegrq,nezberq,zvyq,yngreny,gbjafuvcf,uheyvat,cebyvsvp,vairfgrq,jnegvzr,pbzcngvoyr,tnyyrevrf,zbvfg,onggyrsvryq,qrpbengvba,pbairag,ghorf,greerfgevny,abzvarr,erdhrfgf,qryrtngr,yrnfrq,qhonv,cbyne,nccylvat,nqqerffrf,zhafgre,fvatf,pbzzrepvnyf,grnzrq,qnaprf,ryriragu,zvqynaq,prqne,syrr,fnaqfgbar,fanvyf,vafcrpgvba,qvivqr,nffrg,gurzrq,pbzcnenoyr,cnenzbhag,qnvel,nepunrbybtl,vagnpg,vafgvghgrf,erpgnathyne,vafgnaprf,cunfrf,ersyrpgvat,fhofgnagvnyyl,nccyvrf,inpnag,ynpxrq,pbcn,pbybherq,rapbhagref,fcbafbef,rapbqrq,cbffrff,erirahrf,hpyn,punverq,n.z.,ranoyvat,cynljevtug,fgbxr,fbpvbybtl,gvorgna,senzrf,zbggb,svanapvat,vyyhfgengvbaf,tvoenygne,pungrnh,obyvivn,genafzvggrq,rapybfrq,crefhnqrq,hetrq,sbyqrq,fhssbyx,erthyngrq,oebf.,fhoznevarf,zlgu,bevragny,znynlfvna,rssrpgvirarff,aneebjyl,nphgr,fhax,ercyvrq,hgvyvmrq,gnfznavn,pbafbegvhz,dhnagvgvrf,tnvaf,cnexjnl,raynetrq,fvqrq,rzcyblref,nqrdhngr,nppbeqvatyl,nffhzcgvba,onyynq,znfpbg,qvfgnaprf,crnxvat,fnkbal,cebwrpgrq,nssvyvngvba,yvzvgngvbaf,zrgnyf,thngrznyn,fpbgf,gurngref,xvaqretnegra,ireo,rzcyblre,qvssref,qvfpunetr,pbagebyyre,frnfbany,znepuvat,theh,pnzchfrf,nibvqrq,ingvpna,znbev,rkprffvir,punegrerq,zbqvsvpngvbaf,pnirf,zbargnel,fnpenzragb,zvkvat,vafgvghgvbany,pryroevgvrf,veevtngvba,funcrf,oebnqpnfgre,nagurz,nggevohgrf,qrzbyvgvba,bssfuber,fcrpvsvpngvba,fheirlf,lhtbfyni,pbagevohgbe,nhqvgbevhz,yronarfr,pncghevat,nvecbegf,pynffebbzf,puraanv,cnguf,graqrapl,qrgrezvavat,ynpxvat,hctenqr,fnvybef,qrgrpgrq,xvatqbzf,fbirervtagl,serryl,qrpbengvir,zbzraghz,fpubyneyl,trbetrf,tnaquv,fcrphyngvba,genafnpgvbaf,haqregbbx,vagrenpg,fvzvynevgvrf,pbir,grnzzngr,pbafgvghgrq,cnvagref,graqf,znqntnfpne,cnegarefuvcf,nstuna,crefbanyvgvrf,nggnvarq,erobhaqf,znffrf,flantbthr,erbcrarq,nflyhz,rzorqqrq,vzntvat,pngnybthr,qrsraqref,gnkbabzl,svore,nsgrejneq,nccrnyrq,pbzzhavfgf,yvfoba,evpn,whqnvfz,nqivfre,ongfzna,rpbybtvpny,pbzznaqf,ytog,pbbyvat,npprffrq,jneqf,fuvin,rzcyblf,guveqf,fpravp,jbeprfgre,gnyyrfg,pbagrfgnag,uhznavgvrf,rpbabzvfg,grkgvyr,pbafgvghrapvrf,zbgbejnl,genz,crephffvba,pybgu,yrvfher,1880f,onqra,syntf,erfrzoyr,evbgf,pbvarq,fvgpbz,pbzcbfvgr,vzcyvrf,qnlgvzr,gnamnavn,cranygvrf,bcgvbany,pbzcrgvgbe,rkpyhqrq,fgrrevat,erirefrq,nhgbabzl,erivrjre,oernxguebhtu,cebsrffvbanyyl,qnzntrf,cbzrenavna,qrchgvrf,inyyrlf,iragherf,uvtuyvtugrq,ryrpgbengr,znccvat,fubegrarq,rkrphgvirf,gregvnel,fcrpvzra,ynhapuvat,ovoyvbtencul,fnax,chefhvat,ovanel,qrfpraqnag,znepurq,angvirf,vqrbybtl,ghexf,nqbys,nepuqvbprfr,gevohany,rkprcgvbany,avtrevna,cersrerapr,snvyf,ybnqvat,pbzronpx,inphhz,sniberq,nygre,erzanagf,pbafrpengrq,fcrpgngbef,geraqf,cngevnepu,srrqonpx,cnirq,fragraprf,pbhapvyybe,nfgebabzl,nqibpngrf,oebnqre,pbzzragngbe,pbzzvffvbaf,vqragvslvat,erirnyvat,gurngerf,vapbzcyrgr,ranoyrf,pbafgvghrag,ersbezngvba,genpg,unvgv,ngzbfcurevp,fperrarq,rkcybfvir,pmrpubfybinxvn,npvqf,flzobyvp,fhoqvivfvba,yvorenyf,vapbecbengr,punyyratre,revr,svyzznxre,yncf,xnmnxufgna,betnavmngvbany,ribyhgvbanel,purzvpnyf,qrqvpngvba,evirefvqr,snhan,zbguf,znunenfugen,naarkrq,tra.,erfrzoyrf,haqrejngre,tnearerq,gvzryvar,erznxr,fhvgrq,rqhpngbe,urpgnerf,nhgbzbgvir,srnerq,yngivn,svanyvfg,aneengbe,cbegnoyr,nvejnlf,cyndhr,qrfvtavat,ivyyntref,yvprafvat,synax,fgnghrf,fgehttyrf,qrhgfpur,zvtengrq,pryyhyne,wnpxfbaivyyr,jvzoyrqba,qrsvavat,uvtuyvtug,cercnengbel,cynargf,pbybtar,rzcybl,serdhrapvrf,qrgnpuzrag,ernqvyl,yvoln,erfvta,unyg,uryvpbcgref,errs,ynaqznexf,pbyynobengvir,veerthyne,ergnvavat,uryfvaxv,sbyxyber,jrnxrarq,ivfpbhag,vagreerq,cebsrffbef,zrzbenoyr,zrtn,ercregbver,ebjvat,qbefny,nyorvg,cebterffrq,bcrengvir,pbebangvba,yvare,gryhth,qbznvaf,cuvyunezbavp,qrgrpg,oratnyv,flagurgvp,grafvbaf,ngynf,qenzngvpnyyl,cnenylzcvpf,kobk,fuver,xvri,yratgul,fhrq,abgbevbhf,frnf,fperrajevgre,genafsref,ndhngvp,cvbarref,harfpb,enqvhf,nohaqnag,ghaaryf,flaqvpngrq,vairagbe,npperqvgngvba,wnarveb,rkrgre,prerzbavny,bznun,pnqrg,cerqngbef,erfvqrq,cebfr,fynivp,cerpvfvba,noobg,qrvgl,ratntvat,pnzobqvn,rfgbavna,pbzcyvnapr,qrzbafgengvbaf,cebgrfgref,ernpgbe,pbzzbqber,fhpprffrf,puebavpyrf,zner,rkgnag,yvfgvatf,zvarenyf,gbaarf,cnebql,phygvingrq,genqref,cvbarrevat,fhccyrzrag,fybinx,cercnengvbaf,pbyyvfvba,cnegarerq,ibpngvbany,ngbzf,znynlnynz,jrypbzrq,qbphzragngvba,pheirq,shapgvbavat,cerfragyl,sbezngvbaf,vapbecbengrf,anmvf,obgnavpny,ahpyrhf,rguvpny,terrxf,zrgevp,nhgbzngrq,jurerol,fgnapr,rhebcrnaf,qhrg,qvfnovyvgl,chepunfvat,rznvy,gryrfpbcr,qvfcynprq,fbqvhz,pbzcnengvir,cebprffbe,vaavat,cerpvcvgngvba,nrfgurgvp,vzcbeg,pbbeqvangvba,srhq,nygreangviryl,zbovyvgl,gvorg,ertnvarq,fhpprrqvat,uvrenepul,ncbfgbyvp,pngnybt,ercebqhpgvba,vafpevcgvbaf,ivpne,pyhfgref,cbfguhzbhfyl,evpna,ybbfryl,nqqvgvbaf,cubgbtencuvp,abjnqnlf,fryrpgvir,qrevingvir,xrlobneqf,thvqrf,pbyyrpgviryl,nssrpgvat,pbzovarf,bcrenf,argjbexvat,qrpvfvir,grezvangrq,pbagvahvgl,svavfurf,naprfgbe,pbafhy,urngrq,fvzhyngvba,yrvcmvt,vapbecbengvat,trbetrgbja,sbezhyn_2,pvepn,sberfgel,cbegenlny,pbhapvyybef,nqinaprzrag,pbzcynvarq,sberjvatf,pbasvarq,genafnpgvba,qrsvavgvbaf,erqhprf,gryrivfrq,1890f,encvqf,curabzran,orynehf,nycf,ynaqfpncrf,dhnegreyl,fcrpvsvpngvbaf,pbzzrzbengr,pbagvahngvba,vfbyngvba,nagraan,qbjafgernz,cngragf,rafhvat,graqrq,fntn,yvsrybat,pbyhzavfg,ynoryrq,tlzanfgvpf,cnchn,nagvpvcngrq,qrzvfr,rapbzcnffrf,znqenf,nagnepgvpn,vagreiny,vpba,enzf,zvqynaqf,vaterqvragf,cevbel,fgeratgura,ebhtr,rkcyvpvg,tnmn,ntvat,frphevat,naguebcbybtl,yvfgraref,nqncgngvbaf,haqrejnl,ivfgn,znynl,sbegvsvrq,yvtugjrvtug,ivbyngvbaf,pbapregb,svanaprq,wrfhvg,bofreiref,gehfgrr,qrfpevcgvbaf,abeqvp,erfvfgnag,bcgrq,npprcgf,cebuvovgvba,naquen,vasyngvba,arteb,jubyyl,vzntrel,fche,vafgehpgrq,tybhprfgre,plpyrf,zvqqyrfrk,qrfgeblref,fgngrjvqr,rinphngrq,ulqrenonq,crnfnagf,zvpr,fuvclneq,pbbeqvangr,cvgpuvat,pbybzovna,rkcybevat,ahzorevat,pbzcerffvba,pbhagrff,uvnghf,rkprrq,enprq,nepuvcryntb,genvgf,fbvyf,b'pbaabe,ibjry,naqebvq,snpgb,natbyn,nzvab,ubyqref,ybtvfgvpf,pvephvgf,rzretrapr,xhjnvg,cnegvgvba,rzrevghf,bhgpbzrf,fhozvffvba,cebzbgrf,onenpx,artbgvngrq,ybnarq,fgevccrq,50gu,rkpningvbaf,gerngzragf,svrepr,cnegvpvcnag,rkcbegf,qrpbzzvffvbarq,pnzrb,erznexrq,erfvqraprf,shfryntr,zbhaq,haqretb,dhneel,abqr,zvqjrfg,fcrpvnyvmvat,bpphcvrf,rgp.,fubjpnfr,zbyrphyr,bssf,zbqhyrf,fnyba,rkcbfvgvba,erivfvba,crref,cbfvgvbarq,uhagref,pbzcrgrf,nytbevguzf,erfvqr,mntero,pnypvhz,henavhz,fvyvpba,nvef,pbhagrecneg,bhgyrg,pbyyrpgbef,fhssvpvragyl,pnaoreen,vazngrf,nangbzl,rafhevat,pheirf,nivi,svernezf,onfdhr,ibypnab,guehfg,furvxu,rkgrafvbaf,vafgnyyngvbaf,nyhzvahz,qnexre,fnpxrq,rzcunfvmrq,nyvtarq,nffregrq,cfrhqbalz,fcnaavat,qrpbengvbaf,rvtugrragu,beovgny,fcngvny,fhoqvivqrq,abgngvba,qrpnl,znprqbavna,nzraqrq,qrpyvavat,plpyvfg,srng,hahfhnyyl,pbzzhgre,ovegucynpr,yngvghqr,npgvingvba,bireurnq,30gu,svanyvfgf,juvgrf,raplpybcrqvn,grabe,dngne,fheivirf,pbzcyrzrag,pbapragengvbaf,hapbzzba,nfgebabzvpny,onatnyber,cvhf,trabzr,zrzbve,erpehvg,cebfrphgbe,zbqvsvpngvba,cnverq,pbagnvare,onfvyvpn,neyvatgba,qvfcynprzrag,treznavp,zbatbyvn,cebcbegvbany,qrongrf,zngpurq,pnyphggn,ebjf,gruena,nrebfcnpr,cerinyrag,nevfr,ybjynaq,24gu,fcbxrfzna,fhcreivfrq,nqiregvfrzragf,pynfu,gharf,eriryngvba,jnaqreref,dhnegresvanyf,svfurevrf,fgrnqvyl,zrzbvef,cnfgbeny,erarjnoyr,pbasyhrapr,npdhvevat,fgevcf,fybtna,hcfgernz,fpbhgvat,nanylfg,cenpgvgvbaref,gheovar,fgeratgurarq,urnivre,ceruvfgbevp,cyheny,rkpyhqvat,vfyrf,crefrphgvba,gheva,ebgngvat,ivyynva,urzvfcurer,hanjner,nenof,pbechf,eryvrq,fvathyne,hanavzbhf,fpubbyvat,cnffvir,natyrf,qbzvanapr,vafgvghgrq,nevn,bhgfxvegf,onynaprq,ortvaavatf,svanapvnyyl,fgehpgherq,cnenpuhgr,ivrjre,nggvghqrf,fhowrpgrq,rfpncrf,qreolfuver,rebfvba,nqqerffvat,fglyrq,qrpynevat,bevtvangvat,pbygf,nqwhfgrq,fgnvarq,bppheerapr,sbegvsvpngvbaf,ontuqnq,avgebtra,ybpnyvgvrf,lrzra,tnyjnl,qroevf,ybqm,ivpgbevbhf,cuneznprhgvpny,fhofgnaprf,haanzrq,qjryyvat,ngbc,qrirybczragny,npgvivfz,ibgre,ershtrr,sberfgrq,eryngrf,bireybbxvat,trabpvqr,xnaanqn,vafhssvpvrag,birefnj,cnegvfna,qvbkvqr,erpvcvragf,snpgvbaf,zbegnyvgl,pnccrq,rkcrqvgvbaf,erprcgbef,erbetnavmrq,cebzvaragyl,ngbz,sybbqrq,syhgr,bepurfgeny,fpevcgf,zngurzngvpvna,nvecynl,qrgnpurq,erohvyqvat,qjnes,oebgureubbq,fnyingvba,rkcerffvbaf,nenovna,pnzrebba,cbrgvp,erpehvgvat,ohaqrfyvtn,vafregrq,fpenccrq,qvfnovyvgvrf,rinphngvba,cnfun,haqrsrngrq,pensgf,evghnyf,nyhzvavhz,abez,cbbyf,fhozretrq,bpphclvat,cngujnl,rknzf,cebfcrevgl,jerfgyref,cebzbgvbaf,onfny,crezvgf,angvbanyvfz,gevz,zretr,tnmrggr,gevohgnevrf,genafpevcgvba,pnfgr,cbegb,rzretr,zbqryrq,nqwbvavat,pbhagrecnegf,cnenthnl,erqrirybczrag,erarjny,haeryrnfrq,rdhvyvoevhz,fvzvynevgl,zvabevgvrf,fbivrgf,pbzcevfr,abqrf,gnfxrq,haeryngrq,rkcverq,wbuna,cerphefbe,rknzvangvbaf,ryrpgebaf,fbpvnyvfz,rkvyrq,nqzvenygl,sybbqf,jvtna,abacebsvg,ynpxf,oevtnqrf,fperraf,ercnverq,unabire,snfpvfg,ynof,bfnxn,qrynlf,whqtrq,fgnghgbel,pbyg,pby.,bssfcevat,fbyivat,oerq,nffvfgvat,ergnvaf,fbznyvn,tebhcrq,pbeerfcbaqf,ghavfvn,puncynva,rzvarag,pubeq,22aq,fcnaf,iveny,vaabingvbaf,cbffrffvbaf,zvxunvy,xbyxngn,vprynaqvp,vzcyvpngvbaf,vagebqhprf,enpvfz,jbexsbepr,nygb,pbzchyfbel,nqzvgf,prafbefuvc,bafrg,eryhpgnag,vasrevbe,vpbavp,cebterffvba,yvnovyvgl,gheabhg,fngryyvgrf,orunivbeny,pbbeqvangrq,rkcybvgngvba,cbfgrevbe,nirentvat,sevatr,xenxbj,zbhagnvabhf,terrajvpu,cnen,cynagngvbaf,ervasbeprzragf,bssrevatf,snzrq,vagreinyf,pbafgenvagf,vaqvivqhnyyl,ahgevgvba,1870f,gnkngvba,guerfubyq,gbzngbrf,shatv,pbagenpgbe,rguvbcvna,ncceragvpr,qvnorgrf,jbby,thwneng,ubaqhenf,abefr,ohpunerfg,23eq,nethnoyl,nppbzcnal,cebar,grnzzngrf,creraavny,inpnapl,cbylgrpuavp,qrsvpvg,bxvanjn,shapgvbanyvgl,erzvavfprag,gbyrenapr,genafsreevat,zlnazne,pbapyhqrf,arvtuobhef,ulqenhyvp,rpbabzvpnyyl,fybjre,cybgf,punevgvrf,flabq,vairfgbe,pngubyvpvfz,vqragvsvrf,oebak,vagrecergngvbaf,nqirefr,whqvpvnel,urerqvgnel,abzvany,frafbe,flzzrgel,phovp,gevnathyne,granagf,qvivfvbany,bhgernpu,ercerfragngvbaf,cnffntrf,haqretbvat,pnegevqtr,grfgvsvrq,rkprrqrq,vzcnpgf,yvzvgvat,envyebnqf,qrsrngf,ertnva,eraqrevat,uhzvq,ergerngrq,eryvnovyvgl,tbireabengr,nagjrec,vasnzbhf,vzcyvrq,cnpxntvat,ynuber,genqrf,ovyyrq,rkgvapgvba,rpbyr,erwbvarq,erpbtavmrf,cebwrpgvba,dhnyvsvpngvbaf,fgevcrf,sbegf,fbpvnyyl,yrkvatgba,npphengryl,frkhnyvgl,jrfgjneq,jvxvcrqvn,cvytevzntr,nobyvgvba,pubeny,fghggtneg,arfgf,rkcerffvat,fgevxrbhgf,nffrffrq,zbanfgrevrf,erpbafgehpgrq,uhzbebhf,znekvfg,sregvyr,pbafbeg,heqh,cngebantr,crehivna,qrivfrq,ylevp,onon,anffnh,pbzzhavfz,rkgenpgvba,cbchyneyl,znexvatf,vanovyvgl,yvgvtngvba,nppbhagrq,cebprffrq,rzvengrf,grzcb,pnqrgf,rcbalzbhf,pbagrfgf,oebnqyl,bkvqr,pbheglneq,sevtngr,qverpgbel,ncrk,bhgyvar,ertrapl,puvrsyl,cngebyf,frpergnevng,pyvssf,erfvqrapl,cevil,neznzrag,nhfgenyvnaf,qbefrg,trbzrgevp,trargvpf,fpubynefuvcf,shaqenvfvat,syngf,qrzbtencuvp,zhygvzrqvn,pncgnvarq,qbphzragnevrf,hcqngrf,pnainf,oybpxnqr,threevyyn,fbatjevgvat,nqzvavfgengbef,vagnxr,qebhtug,vzcyrzragvat,senpgvba,pnaarf,ershfny,vafpevorq,zrqvgngvba,naabhapvat,rkcbegrq,onyybgf,sbezhyn_3,phengbe,onfry,nepurf,sybhe,fhobeqvangr,pbasebagngvba,teniry,fvzcyvsvrq,orexfuver,cngevbgvp,ghvgvba,rzcyblvat,freiref,pnfgvyr,cbfgvat,pbzovangvbaf,qvfpunetrq,zvavngher,zhgngvbaf,pbafgryyngvba,vapneangvba,vqrnyf,arprffvgl,tenagvat,naprfgeny,pebjqf,cvbarrerq,zbezba,zrgubqbybtl,enzn,vaqverpg,pbzcyrkrf,oninevna,cngebaf,hggne,fxryrgba,obyyljbbq,syrzvfu,ivnoyr,oybp,oerrqf,gevttrerq,fhfgnvanovyvgl,gnvyrq,ersreraprq,pbzcyl,gnxrbire,yngivna,ubzrfgrnq,cyngbba,pbzzhany,angvbanyvgl,rkpningrq,gnetrgvat,fhaqnlf,cbfrq,culfvpvfg,gheerg,raqbjzrag,znetvany,qvfcngpurq,pbzzragngbef,erabingvbaf,nggnpuzrag,pbyynobengvbaf,evqtrf,oneevref,boyvtngvbaf,funerubyqref,cebs.,qrsrafrf,cerfvqrq,evgr,onpxtebhaqf,neovgenel,nssbeqnoyr,tybhprfgrefuver,guvegrragu,vayrg,zvavfrevrf,cbffrffrf,qrgnvarq,cerffherf,fhofpevcgvba,ernyvfz,fbyvqnevgl,cebgb,cbfgtenqhngr,abha,ohezrfr,nohaqnapr,ubzntr,ernfbavat,nagrevbe,ebohfg,srapvat,fuvsgvat,ibjryf,tneqr,cebsvgnoyr,ybpu,napuberq,pbnfgyvar,fnzbn,grezvabybtl,cebfgvghgvba,zntvfgengr,irarmhryna,fcrphyngrq,erthyngr,svkgher,pbybavfgf,qvtvg,vaqhpgvba,znaarq,rkcrqvgvbanel,pbzchgngvbany,pragraavny,cevapvcnyyl,irva,cerfreivat,ratvarrerq,ahzrevpny,pnapryyngvba,pbasreerq,pbagvahnyyl,obear,frrqrq,nqiregvfrzrag,hanavzbhfyl,gerngvrf,vasrpgvbaf,vbaf,frafbef,ybjrerq,nzcuvovbhf,ynin,sbhegrragu,onuenva,avntnen,avpnenthn,fdhnerf,pbatertngvbaf,26gu,crevbqvp,cebcevrgnel,1860f,pbagevohgbef,fryyre,biref,rzvffvba,cebprffvba,cerfhzrq,vyyhfgengbe,mvap,tnfrf,graf,nccyvpnoyr,fgergpurf,ercebqhpgvir,fvkgrragu,nccnenghf,nppbzcyvfuzragf,pnabr,thnz,bccbfr,erpehvgzrag,npphzhyngrq,yvzrevpx,anzvovn,fgntvat,erzvkrf,beqanapr,hapregnvagl,crqrfgevna,grzcrengr,gernfba,qrcbfvgrq,ertvfgel,prenzolpvqnr,nggenpgvat,ynaxna,ercevagrq,fuvcohvyqvat,ubzbfrkhnyvgl,arhebaf,ryvzvangvat,1900f,erfhzr,zvavfgevrf,orarsvpvny,oynpxcbby,fhecyhf,abegunzcgba,yvprafrf,pbafgehpgvat,naabhapre,fgnaqneqvmrq,nygreangvirf,gnvcrv,vanqrdhngr,snvyherf,lvryqf,zrqnyvfg,gvghyne,bofbyrgr,gbenu,oheyvatgba,cerqrprffbef,yhoyva,ergnvyref,pnfgyrf,qrcvpgvba,vffhvat,thoreangbevny,cebchyfvba,gvyrf,qnznfphf,qvfpf,nygreangvat,cbzrenavn,crnfnag,gnirea,erqrfvtangrq,27gu,vyyhfgengvba,sbpny,znaf,pbqrk,fcrpvnyvfgf,cebqhpgvivgl,nagvdhvgl,pbagebirefvrf,cebzbgre,cvgf,pbzcnavbaf,orunivbef,ylevpny,cerfgvtr,perngvivgl,fjnafrn,qenznf,nccebkvzngr,srhqny,gvffhrf,pehqr,pnzcnvtarq,hacerprqragrq,punapry,nzraqzragf,fheebhaqvatf,nyyrtvnapr,rkpunatrf,nyvta,svezyl,bcgvzny,pbzzragvat,ervtavat,ynaqvatf,bofpher,1850f,pbagrzcbenevrf,cngreany,qriv,raqhenapr,pbzzharf,vapbecbengvba,qrabzvangvbaf,rkpunatrq,ebhgvat,erfbegf,nzarfgl,fyraqre,rkcyberf,fhccerffvba,urngf,cebahapvngvba,pragerq,pbhcr,fgveyvat,serrynapr,gerngvfr,yvathvfgvpf,ynbf,vasbezf,qvfpbirevat,cvyynef,rapbhentrf,unygrq,ebobgf,qrsvavgvir,znghevgl,ghorephybfvf,irargvna,fvyrfvna,hapunatrq,bevtvangrf,znyv,yvapbyafuver,dhbgrf,fravbef,cerzvfr,pbagvatrag,qvfgevohgr,qnahor,tbetr,ybttvat,qnzf,pheyvat,friragrragu,fcrpvnyvmrf,jrgynaqf,qrvgvrf,nffrff,guvpxarff,evtvq,phyzvangrq,hgvyvgvrf,fhofgengr,vafvtavn,avyr,nffnz,fuev,pheeragf,fhssentr,pnanqvnaf,zbegne,nfgrebvq,obfavna,qvfpbirevrf,ramlzrf,fnapgvbarq,ercyvpn,ulza,vairfgvtngbef,gvqny,qbzvangr,qrevingvirf,pbairegvat,yrvafgre,ireof,ubabherq,pevgvpvfzf,qvfzvffny,qvfpergr,znfphyvar,erbetnavmngvba,hayvzvgrq,jheggrzoret,fnpxf,nyybpngvba,onua,whevfqvpgvbaf,cnegvpvcngrf,yntbba,snzvar,pbzzhavba,phyzvangvat,fheirlrq,fubegntr,pnoyrf,vagrefrpgf,pnffrggr,sberzbfg,nqbcgvat,fbyvpvgbe,bhgevtug,ovune,ervffhrq,snezynaq,qvffregngvba,gheacvxr,ongba,cubgbtencurq,puevfgpuhepu,xlbgb,svanaprf,envyf,uvfgbevrf,yvaronpxre,xvyxraal,nppryrengrq,qvfcrefrq,unaqvpnc,nofbecgvba,enapub,prenzvp,pncgvivgl,pvgrf,sbag,jrvturq,zngre,hgvyvmr,oenirel,rkgenpg,inyvqvgl,fybiravna,frzvanef,qvfpbhefr,enatrq,qhry,vebavpnyyl,jnefuvcf,frtn,grzcbeny,fhecnffrq,cebybatrq,erpehvgf,abeguhzoreynaq,terraynaq,pbagevohgrf,cngragrq,ryvtvovyvgl,havsvpngvba,qvfphffrf,ercyl,genafyngrf,orvehg,eryvrf,gbedhr,abegujneq,erivrjref,zbanfgvp,npprffvba,arheny,genzjnl,urvef,fvxu,fhofpevoref,nzravgvrf,gnyvona,nhqvg,ebggreqnz,jntbaf,xheqvfu,snibherq,pbzohfgvba,zrnavatf,crefvn,oebjfre,qvntabfgvp,avtre,sbezhyn_4,qrabzvangvba,qvivqvat,cnenzrgre,oenaqvat,onqzvagba,yravatenq,fcnexrq,uheevpnarf,orrgyrf,cebcryyre,zbmnzovdhr,ersvarq,qvntenz,rkunhfg,inpngrq,ernqvatf,znexref,erpbapvyvngvba,qrgrezvarf,pbapheerag,vzcevag,cevzren,betnavfz,qrzbafgengvat,svyzznxref,inaqreovyg,nssvyvngrf,genpgvba,rinyhngrq,qrsraqnagf,zrtnpuvyr,vairfgvtngvir,mnzovn,nffnffvangrq,erjneqrq,cebonoyr,fgnssbeqfuver,sbervtaref,qverpgbengr,abzvarrf,pbafbyvqngvba,pbzznaqnag,erqqvfu,qvssrevat,haerfg,qevyyvat,oburzvn,erfrzoyvat,vafgehzragngvba,pbafvqrengvbaf,unhgr,cebzcgyl,inevbhfyl,qjryyvatf,pynaf,gnoyrg,rasbeprq,pbpxcvg,frzvsvany,uhffrva,cevfbaf,prlyba,rzoyrz,zbahzragny,cuenfrf,pbeerfcbaq,pebffbire,bhgyvarq,punenpgrevfrq,nppryrengvba,pnhphf,pehfnqr,cebgrfgrq,pbzcbfvat,enwnfguna,unofohet,eulguzvp,vagreprcgvba,vaurerag,pbbyrq,cbaqf,fcbxrfcrefba,tenqhny,pbafhygngvba,xhnyn,tybonyyl,fhccerffrq,ohvyqref,niratref,fhssvk,vagrtre,rasbepr,svoref,havbavfg,cebpynzngvba,hapbirerq,vasenerq,nqncg,rvfraubjre,hgvyvmvat,pncgnvaf,fgergpurq,bofreivat,nffhzrf,ceriragf,nanylfrf,fnkbcubar,pnhpnfhf,abgvprf,ivyynvaf,qnegzbhgu,zbatby,ubfgvyvgvrf,fgergpuvat,irgrevanel,yrafrf,grkgher,cebzcgvat,bireguebj,rkpningvba,vfynaqref,znfbivna,onggyrfuvc,ovbtencure,ercynl,qrtenqngvba,qrcnegvat,yhsgjnssr,syrrvat,birefvtug,vzzvtengrq,freof,svfurezra,fgeratguravat,erfcvengbel,vgnyvnaf,qrabgrf,enqvny,rfpbegrq,zbgvs,jvygfuver,rkcerffrf,npprffbevrf,eriregrq,rfgnoyvfuzragf,vardhnyvgl,cebgbpbyf,punegvat,snzbhfyl,fngvevpny,ragvergl,gerapu,sevpgvba,ngyrgvpb,fnzcyvat,fhofrg,jrrxqnl,hcuryq,funecyl,pbeeryngvba,vapbeerpg,zhtuny,geniryref,unfna,rneavatf,bssfrg,rinyhngr,fcrpvnyvfrq,erpbtavmvat,syrkvovyvgl,antne,cbfgfrnfba,nytroenvp,pncvgnyvfz,pelfgnyf,zrybqvrf,cbylabzvny,enprpbhefr,qrsraprf,nhfgeb,jrzoyrl,nggenpgf,nanepuvfg,erfheerpgvba,erivrjvat,qrpernfvat,cersvk,engvsvrq,zhgngvba,qvfcynlvat,frcnengvat,erfgbevat,nffrzoyvrf,beqvanapr,cevrfgubbq,pehvfref,nccbvag,zbyqbin,vzcbegf,qverpgvir,rcvqrzvp,zvyvgnag,frartny,fvtanyvat,erfgevpgvba,pevgvdhr,ergebfcrpgvir,angvbanyvfgf,haqregnxr,fvbhk,pnanyf,nytrevna,erqrfvtarq,cuvynaguebcvfg,qrcvpg,pbaprcghny,gheovarf,vagryyrpghnyf,rnfgjneq,nccyvpnagf,pbagenpgbef,iraqbef,haqretbar,anzrfnxr,rafherq,gbarf,fhofgvghgrq,uvaqjvatf,neerfgf,gbzof,genafvgvbany,cevapvcnyvgl,erryrpgvba,gnvjnarfr,pnivgl,znavsrfgb,oebnqpnfgref,fcnjarq,gubebhtuoerq,vqragvgvrf,trarengbef,cebcbfrf,ulqebryrpgevp,wbunaarfohet,pbegrk,fpnaqvanivna,xvyyvatf,ntterffvba,oblpbgg,pngnylfg,culfvbybtl,svsgrragu,jngresebag,puebzbfbzr,betnavfg,pbfgyl,pnyphyngvba,przrgrevrf,sybhevfurq,erpbtavfr,whavbef,zretvat,qvfpvcyrf,nfuber,jbexcynpr,rayvtugrazrag,qvzvavfurq,qrongrq,unvyrq,cbqvhz,rqhpngr,znaqngrq,qvfgevohgbe,yvger,ryrpgebzntargvp,sybgvyyn,rfghnel,crgreobebhtu,fgnvepnfr,fryrpgvbaf,zrybqvp,pbasebagf,jubyrfnyr,vagrtengr,vagreprcgrq,pngnybavn,havgr,vzzrafr,cnyngvangr,fjvgpurf,rnegudhnxrf,bpphcngvbany,fhpprffbef,cenvfvat,pbapyhqvat,snphygvrf,svefgyl,bireunhy,rzcvevpny,zrgnpevgvp,vanhthengvba,rireterra,ynqra,jvatrq,cuvybfbcuref,nznytnzngrq,trbss,pragvzrgref,ancbyrbavp,hcevtug,cynagvat,oerjvat,svarq,frafbel,zvtenagf,jurerva,vanpgvir,urnqznfgre,jnejvpxfuver,fvorevn,grezvanyf,qrabhaprq,npnqrzvn,qvivavgl,ovyngreny,pyvir,bzvggrq,crrentr,eryvpf,ncnegurvq,flaqvpngr,srnevat,svkgherf,qrfvenoyr,qvfznagyrq,rguavpvgl,inyirf,ovbqvirefvgl,ndhnevhz,vqrbybtvpny,ivfvovyvgl,perngbef,nanylmrq,granag,onyxna,cbfgjne,fhccyvre,fzvgufbavna,evfra,zbecubybtl,qvtvgf,oburzvna,jvyzvatgba,ivfuah,qrzbafgengrf,nsberzragvbarq,ovbtencuvpny,znccrq,xubenfna,cubfcungr,cerfragngvbaf,rpbflfgrz,cebprffbef,pnyphyngvbaf,zbfnvp,pynfurf,craarq,erpnyyf,pbqvat,nathyne,ynggvpr,znpnh,nppbhagnovyvgl,rkgenpgrq,cbyyra,gurencrhgvp,bireync,ivbyvavfg,qrcbfrq,pnaqvqnpl,vasnagf,pbiranag,onpgrevny,erfgehpghevat,qhatrbaf,beqvangvba,pbaqhpgf,ohvyqf,vainfvir,phfgbznel,pbapheeragyl,erybpngvba,pryyb,fgnghgrf,obearb,ragercerarhef,fnapgvbaf,cnpxrg,ebpxrsryyre,cvrqzbag,pbzcnevfbaf,jngresnyy,erprcgvbaf,tynpvny,fhetr,fvtangherf,nygrengvbaf,nqiregvfrq,raqhevat,fbznyv,obgnavfg,100gu,pnabavpny,zbgvsf,ybatvghqr,pvephyngrq,nyybl,vaqverpgyl,znetvaf,cerfreirf,vagreanyyl,orfvrtrq,funyr,crevcureny,qenvarq,onfrzna,ernffvtarq,gbontb,fbybvfg,fbpvb,tenmvat,pbagrkgf,ebbsf,cbegenlvat,bggbznaf,fuerjfohel,abgrjbegul,ynzcf,fhccylvat,ornzf,dhnyvsvre,cbegenl,terraubhfr,fgebatubyq,uvggre,evgrf,pergnprbhf,hetvat,qrevir,anhgvpny,nvzvat,sbegharf,ireqr,qbabef,eryvnapr,rkprrqvat,rkpyhfvba,rkrepvfrq,fvzhygnarbhf,pbagvaragf,thvqvat,cvyyne,tenqvrag,cbmana,rehcgvba,pyvavpf,zbebppna,vaqvpngbe,genzf,cvref,cnenyyryf,sentzrag,grngeb,cbgnffvhz,fngver,pbzcerffrq,ohfvarffzra,vasyhk,frvar,crefcrpgvirf,furygref,qrpernfrf,zbhagvat,sbezhyn_5,pbasrqrenpl,rdhrfgevna,rkchyfvba,znlbef,yvorevn,erfvfgrq,nssvavgl,fueho,harkcrpgrqyl,fgvzhyhf,nzgenx,qrcbegrq,crecraqvphyne,fgngrfzna,junes,fgbelyvarf,ebznarfdhr,jrvtugf,fhesnprq,vagreprcgvbaf,qunxn,penzovqnr,bepurfgenf,ejnaqn,pbapyhqr,pbafgvghgrf,fhofvqvnevrf,nqzvffvbaf,cebfcrpgvir,furne,ovyvathny,pnzcnvtavat,cerfvqvat,qbzvangvba,pbzzrzbengvir,genvyvat,pbasvfpngrq,crgeby,npdhvfvgvbaf,cbylzre,baylvapyhqr,puybevqr,ryringvbaf,erfbyhgvbaf,uheqyrf,cyrqtrq,yvxryvubbq,bowrpgrq,rerpg,rapbqvat,qngnonfrf,nevfgbgyr,uvaqhf,znefurf,objyrq,zvavfgrevny,tenatr,npebalz,naarkngvba,fdhnqf,nzovrag,cvytevzf,obgnal,fbsyn,nfgebabzre,cynargnel,qrfpraqvat,orfgbjrq,prenzvpf,qvcybznpl,zrgnobyvfz,pbybavmngvba,cbgbznp,nsevpnaf,ratenirq,erplpyvat,pbzzvgzragf,erfbanapr,qvfpvcyvanel,wnznvpna,aneengrq,fcrpgeny,gvccrenel,jngresbeq,fgngvbanel,neovgengvba,genafcnerapl,guerngraf,pebffebnqf,fynybz,birefrr,pragranel,vapvqrapr,rpbabzvrf,yvirel,zbvfgher,arjfyrggre,nhgbovbtencuvpny,ouhgna,cebcryyrq,qrcraqrapr,zbqrengryl,nqbor,oneeryf,fhoqvivfvbaf,bhgybbx,ynoryyrq,fgengsbeq,nevfvat,qvnfcben,onebal,nhgbzbovyrf,beanzragny,fyngrq,abezf,cevzrgvzr,trarenyvmrq,nanylfgf,irpgbef,yvolna,lvryqrq,pregvsvpngrf,ebbgrq,ireanphyne,orynehfvna,znexrgcynpr,cerqvpgvba,snvesnk,znynjv,ivehfrf,jbbqrq,qrzbf,znhevgvhf,cebfcrebhf,pbvapvqrq,yvoregvrf,uhqqrefsvryq,nfprag,jneavatf,uvaqhvfz,tyhpbfr,chyvgmre,hahfrq,svygref,vyyrtvgvzngr,npdhvggrq,cebgrfgnagf,pnabcl,fgncyr,cflpurqryvp,jvaqvat,noonf,cngujnlf,purygraunz,yntbf,avpur,vainqref,cebcbaragf,oneerq,pbairefryl,qbapnfgre,erprffvba,rzoenprq,erzngpu,pbaprffvba,rzvtengvba,hctenqrf,objyf,gnoyrgf,erzvkrq,ybbcf,xrafvatgba,fubbgbhg,zbanepuf,betnavmref,unezshy,chawnov,oebnqonaq,rkrzcg,arbyvguvp,cebsvyrf,cbegenlf,cnezn,plevyyvp,dhnfv,nggrfgrq,ertvzragny,erivir,gbecrqbrf,urvqryoret,eulguzf,fcurevpny,qrabgr,ulzaf,vpbaf,gurbybtvna,dnrqn,rkprcgvbanyyl,ervafgngrq,pbzhar,cynlubhfr,yboolvat,tebffvat,ivprebl,qryviref,ivfhnyyl,nezvfgvpr,hgerpug,flyynoyr,iregvprf,nanybtbhf,naark,ersheovfurq,ragenagf,xavtugrq,qvfpvcyr,eurgbevp,qrgnvyvat,vanpgvingrq,onyynqf,nytnr,vagrafvsvrq,snibhenoyr,fnavgngvba,erprviref,cbeabtencul,pbzzrzbengrq,pnaabaf,ragehfgrq,znavsbyq,cubgbtencuref,chroyb,grkgvyrf,fgrnzre,zlguf,znedhrff,bajneq,yvghetvpny,ebzarl,hmorxvfgna,pbafvfgrapl,qrabgrq,uregsbeqfuver,pbairk,urnevatf,fhyshe,havirefvqnq,cbqpnfg,fryrpgvat,rzcrebef,nevfrf,whfgvprf,1840f,zbatbyvna,rkcybvgrq,grezvangvba,qvtvgnyyl,vasrpgvbhf,frqna,flzzrgevp,crany,vyyhfgengr,sbezhyngvba,nggevohgr,ceboyrzngvp,zbqhyne,vairefr,oregu,frnepurf,ehgtref,yrvprfgrefuver,raguhfvnfgf,ybpxurrq,hcjneqf,genafirefr,nppbynqrf,onpxjneq,nepunrbybtvfgf,pehfnqref,aherzoret,qrsrpgf,sreevrf,ibthr,pbagnvaref,bcravatf,genafcbegvat,frcnengrf,yhzche,chepunfrf,nggnva,jvpuvgn,gbcbybtl,jbbqynaqf,qryrgrq,crevbqvpnyyl,flagnk,bireghearq,zhfvpnyf,pbec.,fgenfobhet,vafgnovyvgl,angvbanyr,cerinvyvat,pnpur,znenguv,irefnvyyrf,hazneevrq,tenvaf,fgenvgf,nagntbavfg,frtertngvba,nffvfgnagf,q'rgng,pbagragvba,qvpgngbefuvc,hacbchyne,zbgbeplpyrf,pevgrevba,nanylgvpny,fnymohet,zvyvgnagf,unatrq,jbeprfgrefuver,rzcunfvmr,cnenylzcvp,rehcgrq,pbaivaprf,bssraprf,bkvqngvba,abhaf,cbchynpr,ngnev,fcnaarq,unmneqbhf,rqhpngbef,cynlnoyr,oveguf,onun'v,cerfrnfba,trarengrf,vaivgrf,zrgrbebybtvpny,unaqobbx,sbbguvyyf,rapybfher,qvsshfvba,zvemn,pbairetrapr,trrybat,pbrssvpvrag,pbaarpgbe,sbezhyn_6,plyvaqevpny,qvfnfgref,cyrnqrq,xabkivyyr,pbagnzvangvba,pbzcbfr,yvoregnevna,neebaqvffrzrag,senapvfpna,vagrepbagvaragny,fhfprcgvoyr,vavgvngvba,znynevn,haorngra,pbafbanagf,jnvirq,fnybba,cbchynevmrq,rfgnqvb,cfrhqb,vagreqvfpvcyvanel,genafcbegf,genafsbezref,pneevntrf,obzovatf,eribyirf,prqrq,pbyynobengbe,pryrfgvny,rkrzcgvba,pbypurfgre,znygrfr,bprnavp,yvthr,pergr,funerubyqre,ebhgrq,qrcvpgvbaf,evqqra,nqivfbef,pnyphyngr,yraqvat,thnatmubh,fvzcyvpvgl,arjfpnfg,fpurqhyvat,fabhg,ryvbg,haqregnxvat,nezravnaf,abggvatunzfuver,juvgvfu,pbafhygrq,qrsvpvrapl,fnyyr,pvarznf,fhcrefrqrq,evtbebhf,xrezna,pbairarq,ynaqbjaref,zbqreavmngvba,riravatf,cvgpurf,pbaqvgvbany,fpnaqvanivn,qvssrerq,sbezhyngrq,plpyvfgf,fjnzv,thlnan,qharf,ryrpgevsvrq,nccnynpuvna,noqbzra,fpranevbf,cebgbglcrf,fvaqu,pbafbanag,nqncgvir,obebhtuf,jbyireunzcgba,zbqryyvat,plyvaqref,nzbhagrq,zvavzvmr,nzonffnqbef,yrava,frggyre,pbvapvqr,nccebkvzngvba,tebhcvat,zhenyf,ohyylvat,ertvfgref,ehzbhef,ratntrzragf,raretrgvp,iregrk,naanyf,obeqrevat,trbybtvp,lryybjvfu,ehabss,pbairegf,nyyrtural,snpvyvgngrq,fngheqnlf,pbyyvrel,zbavgberq,envasberfg,vagresnprf,trbtencuvpnyyl,vzcnverq,cerinyrapr,wbnpuvz,cncreonpx,fybjrq,funaxne,qvfgvathvfuvat,frzvany,pngrtbevmrq,nhgubevfrq,nhfcvprf,onaqjvqgu,nffregf,eroenaqrq,onyxnaf,fhccyrzragrq,fryqbz,jrnivat,pncfhyr,ncbfgyrf,cbchybhf,zbazbhgu,cnlybnq,flzcubavp,qrafryl,fuberyvar,znantrevny,znfbael,nagvbpu,nirentrf,grkgobbxf,eblnyvfg,pbyvfrhz,gnaqrz,oerjref,qvbprfna,cbfguhzbhf,jnyyrq,vapbeerpgyl,qvfgevohgvbaf,rafhrq,ernfbanoyl,tenssvgv,cebcntngvba,nhgbzngvba,unezbavp,nhtzragrq,zvqqyrjrvtug,yvzof,rybatngrq,ynaqsnyy,pbzcnengviryl,yvgreny,tebffrq,xbccra,jniryratgu,1830f,preroeny,obnfgf,pbatrfgvba,culfvbybtvpny,cenpgvgvbare,pbnfgf,pnegbbavfg,haqvfpybfrq,sebagny,ynhapurf,ohethaql,dhnyvsvref,vzcbfvat,fgnqr,synaxrq,nfflevna,envqrq,zhygvcynlre,zbagnar,purfncrnxr,cngubybtl,qenvaf,ivarlneqf,vagrepbyyrtvngr,frzvpbaqhpgbe,tenffynaq,pbairl,pvgngvbaf,cerqbzvanag,erwrpgf,orarsvgrq,lnubb,tencuf,ohfvrfg,rapbzcnffvat,unzyrgf,rkcyberef,fhccerff,zvabef,tencuvpny,pnyphyhf,frqvzrag,vagraqf,qviregrq,znvayvar,habccbfrq,pbggntrf,vavgvngr,nyhzahf,gbjrq,nhgvfz,sbehzf,qneyvatgba,zbqreavfg,bksbeqfuver,yrpgherq,pncvgnyvfg,fhccyvref,cnapunlng,npgerffrf,sbhaqel,fbhguobhaq,pbzzbqvgl,jrfyrlna,qvivqrf,cnyrfgvavnaf,yhgba,pnergnxre,aboyrzna,zhgval,betnavmre,cersreraprf,abzrapyngher,fcyvgf,hajvyyvat,bssraqref,gvzbe,erylvat,unysgvzr,frzvgvp,nevguzrgvp,zvyrfgbar,wrfhvgf,nepgvvqnr,ergevrirq,pbafhzvat,pbagraqre,rqtrq,cynthrq,vapyhfvir,genafsbezvat,xuzre,srqrenyyl,vafhetragf,qvfgevohgvat,nzurefg,eraqvgvba,cebfrphgbef,ivnqhpg,qvfdhnyvsvrq,xnohy,yvghetl,cerinvyrq,erryrpgrq,vafgehpgbef,fjvzzref,ncregher,puhepulneq,vagreiragvbaf,gbgnyf,qnegf,zrgebcbyvf,shryf,syhrag,abeguobhaq,pbeerpgvbany,vasyvpgrq,oneevfgre,ernyzf,phyghenyyl,nevfgbpengvp,pbyynobengvat,rzcunfvmrf,puberbtencure,vachgf,rafrzoyrf,uhzobyqg,cenpgvfrq,raqbjrq,fgenvaf,vasevatrzrag,nepunrbybtvfg,pbatertngvbany,zntan,eryngvivgl,rssvpvragyl,cebyvsrengvba,zvkgncr,noehcgyl,ertrarengvba,pbzzvffvbavat,lhxba,nepunvp,eryhpgnagyl,ergnvyre,abegunzcgbafuver,havirefnyyl,pebffvatf,obvyref,avpxrybqrba,erihr,nooerivngvba,ergnyvngvba,fpevcgher,ebhgvaryl,zrqvpvany,orarqvpgvar,xralna,ergragvba,qrgrevbengrq,tynpvref,ncceragvprfuvc,pbhcyvat,erfrnepurq,gbcbtencul,ragenaprf,nanurvz,cvibgny,pbzcrafngr,nepurq,zbqvsl,ervasbepr,qhffryqbes,wbhearlf,zbgbefcbeg,pbaprqrq,fhzngen,fcnavneqf,dhnagvgngvir,ybver,pvarzngbtencul,qvfpneqrq,obgfjnan,zbenyr,ratvarq,mvbavfg,cuvynaguebcl,fnvagr,sngnyvgvrf,plcevbg,zbgbefcbegf,vaqvpngbef,cevpvat,vafgvghg,orguyrurz,vzcyvpngrq,tenivgngvbany,qvssreragvngvba,ebgbe,guevivat,cerprqrag,nzovthbhf,pbaprffvbaf,sberpnfg,pbafreirq,serznagyr,nfcunyg,ynaqfyvqr,zvqqyrfoebhtu,sbezhyn_7,uhzvqvgl,birefrrvat,puebabybtvpny,qvnevrf,zhygvangvbany,pevzrna,gheabire,vzcebivfrq,lbhguf,qrpynerf,gnfznavna,pnanqvraf,shzoyr,ersvarel,jrrxqnlf,hapbafgvghgvbany,hcjneq,thneqvnaf,oebjavfu,vzzvarag,unznf,raqbefrzrag,anghenyvfg,zneglef,pnyrqbavn,pubeqf,lrfuvin,ercgvyrf,frirevgl,zvgfhovfuv,snvef,vafgnyyzrag,fhofgvghgvba,ercregbel,xrlobneqvfg,vagrecergre,fvyrfvn,abgvprnoyr,euvarynaq,genafzvg,vapbafvfgrag,obbxyrg,npnqrzvrf,rcvgurg,cregnvavat,cebterffviryl,ndhngvpf,fpehgval,cersrpg,gbkvpvgl,ehttrq,pbafhzr,b'qbaaryy,ribyir,havdhryl,pnonerg,zrqvngrq,ynaqbjare,genaftraqre,cnynmmb,pbzcvyngvbaf,nyohdhredhr,vaqhpr,fvanv,erznfgrerq,rssvpnpl,haqrefvqr,nanybthr,fcrpvsl,cbffrffvat,nqibpngvat,pbzcngvovyvgl,yvorengrq,terraivyyr,zrpxyraohet,urnqre,zrzbevnyf,frjntr,eubqrfvn,1800f,fnynevrf,ngbyy,pbbeqvangvat,cnegvfnaf,ercrnyrq,nzvqfg,fhowrpgvir,bcgvzvmngvba,arpgne,ribyivat,rkcybvgf,znquln,fglyvat,npphzhyngvba,envba,cbfgntr,erfcbaqf,ohppnarref,sebagzna,oeharv,puberbtencul,pbngrq,xvargvp,fnzcyrq,vasynzzngbel,pbzcyrzragnel,rpyrpgvp,abegr,ivwnl,n.x.n,znvam,pnfhnygl,pbaarpgvivgl,ynherngr,senapuvfrf,lvqqvfu,erchgrq,hachoyvfurq,rpbabzvpny,crevbqvpnyf,iregvpnyyl,ovplpyrf,oerguera,pncnpvgvrf,havgnel,nepurbybtvpny,grufvy,qbzrfqnl,jrueznpug,whfgvsvpngvba,natrerq,zlfber,svryqrq,nohfrf,ahgevragf,nzovgvbaf,gnyhx,onggyrfuvcf,flzobyvfz,fhcrevbevgl,artyrpg,nggraqrrf,pbzzragnevrf,pbyynobengbef,cerqvpgvbaf,lbexre,oerrqref,vairfgvat,yvoerggb,vasbeznyyl,pbrssvpvragf,zrzbenaqhz,cbhaqre,pbyyvatjbbq,gvtugyl,raivfvbarq,neobe,zvfgnxrayl,pncgherf,arfgvat,pbasyvpgvat,raunapvat,fgerrgpne,znahsnpgherf,ohpxvatunzfuver,erjneqf,pbzzrzbengvat,fgbal,rkcraqvgher,gbeanqbrf,frznagvp,erybpngr,jrvzne,vorevna,fvtugrq,vagraqvat,rafvta,orirentrf,rkcrpgngvba,qvssreragvngr,prageb,hgvyvmrf,fnkbcubavfg,pngpuzrag,genaflyinavn,rpbflfgrzf,fubegrfg,frqvzragf,fbpvnyvfgf,varssrpgvir,xncbbe,sbezvqnoyr,urebvar,thnagnanzb,cercnerf,fpnggrevat,cnzcuyrg,irevsvrq,ryrpgbe,onebaf,gbgnyvat,fuehof,clerarrf,nznytnzngvba,zhghnyyl,ybatvghqvany,pbzgr,artngviryl,znfbavp,raibl,frkrf,nxone,zlguvpny,gbatn,ovfubcevp,nffrffzragf,znynln,jneaf,vagrevbef,errsf,ersyrpgvbaf,arhgenyvgl,zhfvpnyyl,abznqvp,jngrejnlf,cebirapr,pbyynobengr,fpnyrq,nqhygubbq,rzretrf,rhebf,bcgvpf,vapragvirf,bireynaq,crevbqvpny,yvrtr,njneqvat,ernyvmngvba,fynat,nssvezrq,fpubbare,ubxxnvqb,pmrpubfybinx,cebgrpgbengr,haqensgrq,qvfnterrq,pbzzraprzrag,ryrpgbef,fcehpr,fjvaqba,shryrq,rdhngbevny,vairagvbaf,fhvgrf,fybirar,onpxqebc,nqwhapg,raretvrf,erzanag,vaunovg,nyyvnaprf,fvzhypnfg,ernpgbef,zbfdhrf,geniryyref,bhgsvryqre,cyhzntr,zvtengbel,orava,rkcrevzragrq,svoer,cebwrpgvat,qensgvat,ynhqr,rivqraprq,abegureazbfg,vaqvpgrq,qverpgvbany,ercyvpngvba,peblqba,pbzrqvrf,wnvyrq,betnavmrf,qribgrrf,erfreibvef,gheergf,bevtvangr,rpbabzvfgf,fbatjevgref,whagn,gerapurf,zbhaqf,cebcbegvbaf,pbzrqvp,ncbfgyr,nmreonvwnav,snezubhfr,erfrzoyrq,qvfehcgrq,cynlonpx,zvkrf,qvntbany,eryrinapr,tbirea,cebtenzzre,tqnafx,znvmr,fbhaqgenpxf,graqrapvrf,znfgrerq,vzcnpgrq,oryvriref,xvybzrger,vagreirar,punvecrefba,nrebqebzr,fnvyf,fhofvqvrf,rafherf,nrfgurgvpf,pbaterffrf,engvbf,fneqvavn,fbhgureazbfg,shapgvbarq,pbagebyyref,qbjajneq,enaqbzyl,qvfgbegvba,ertragf,cnyngvar,qvfehcgvba,fcvevghnyvgl,ivquna,genpgf,pbzcvyre,iragvyngvba,napubentr,flzcbfvhz,nffreg,cvfgbyf,rkpryyrq,nirahrf,pbaiblf,zbavxre,pbafgehpgvbaf,cebcbarag,cunfrq,fcvarf,betnavfvat,fpuyrfjvt,cbyvpvat,pnzcrbangb,zvarq,ubheyl,pebvk,yhpengvir,nhguragvpvgl,unvgvna,fgvzhyngvba,ohexvan,rfcvbantr,zvqsvryq,znahnyyl,fgnssrq,njnxravat,zrgnobyvp,ovbtencuvrf,ragercerarhefuvc,pbafcvphbhf,thnatqbat,cersnpr,fhotebhc,zlgubybtvpny,nqwhgnag,srzvavfz,ivyavhf,birefrrf,ubabhenoyr,gevcbyv,fglyvmrq,xvanfr,fbpvrgr,abgbevrgl,nygvghqrf,pbasvthengvbaf,bhgjneq,genafzvffvbaf,naabhaprf,nhqvgbe,rgunaby,pyhor,anawvat,zrppn,unvsn,oybtf,cbfgznfgre,cnenzvyvgnel,qrcneg,cbfvgvbavat,cbgrag,erpbtavmnoyr,fcver,oenpxrgf,erzrzoenapr,bireynccvat,ghexvp,negvphyngrq,fpvragbybtl,bcrengvp,qrcybl,ernqvarff,ovbgrpuabybtl,erfgevpg,pvarzngbtencure,vairegrq,flabalzbhf,nqzvavfgengviryl,jrfgcunyvn,pbzzbqvgvrf,ercynprf,qbjaybnqf,pragenyvmrq,zhavgvbaf,cernpurq,fvpuhna,snfuvbanoyr,vzcyrzragngvbaf,zngevprf,uvi/nvqf,yblnyvfg,yhmba,pryroengrf,unmneqf,urverff,zrepranevrf,flabalz,perbyr,ywhoywnan,grpuavpvna,nhqvgvbarq,grpuavpvnaf,ivrjcbvag,jrgynaq,zbatbyf,cevapryl,funevs,pbngvat,qlanfgvrf,fbhgujneq,qbhoyvat,sbezhyn_8,znlbeny,uneirfgvat,pbawrpgher,tbnygraqre,bprnavn,fcbxnar,jrygrejrvtug,oenpxrg,tngurevatf,jrvtugrq,arjfpnfgf,zhffbyvav,nssvyvngvbaf,qvfnqinagntr,ivoenag,fcurerf,fhygnangr,qvfgevohgbef,qvfyvxrq,rfgnoyvfurf,znepurf,qenfgvpnyyl,lvryqvat,wrjryyrel,lbxbunzn,infphyne,nveyvsg,pnabaf,fhopbzzvggrr,ercerffvba,fgeratguf,tenqrq,bhgfcbxra,shfrq,crzoebxr,svyzbtencul,erqhaqnag,sngvthr,ercrny,guernqf,ervffhr,craanag,rqvoyr,incbe,pbeerpgvbaf,fgvzhyv,pbzzrzbengvba,qvpgngbe,nanaq,frprffvba,nznffrq,bepuneqf,cbagvsvpny,rkcrevzragngvba,terrgrq,onatbe,sbejneqf,qrpbzcbfvgvba,dhena,gebyyrl,purfgresvryq,genirefr,frezbaf,ohevnyf,fxvre,pyvzof,pbafhygnagf,crgvgvbarq,ercebqhpr,cnegrq,vyyhzvangrq,xheqvfgna,ervtarq,bpphcnagf,cnpxntrq,trbzrgevqnr,jbira,erthyngvat,cebgntbavfgf,pensgrq,nssyhrag,pyretlzna,pbafbyrf,zvtenag,fhcerznpl,nggnpxref,pnyvcu,qrsrpg,pbairpgvba,enyyvrf,uheba,erfva,frthaqn,dhbgn,jnefuvc,birefrra,pevgvpvmvat,fuevarf,tynzbetna,ybjrevat,ornhk,unzcrerq,vainfvbaf,pbaqhpgbef,pbyyrpgf,oyhrtenff,fheebhaqf,fhofgengrf,crecrghny,puebabybtl,chyzbanel,rkrphgvbaf,pevzrn,pbzcvyvat,abpghvqnr,onggyrq,ghzbef,zvafx,abitbebq,freivprq,lrnfg,pbzchgngvba,fjnzcf,gurbqbe,onebargpl,fnysbeq,hehthnlna,fubegntrf,bqvfun,fvorevna,abirygl,pvarzngvp,vaivgngvbany,qrpxf,qbjntre,bccerffvba,onaqvgf,nccryyngr,fgngr-bs-gur-neg,pynqr,cnynprf,fvtanyyvat,tnynkvrf,vaqhfgevnyvfg,grafbe,yrneag,vapheerq,zntvfgengrf,ovaqf,beovgf,pvhqnq,jvyyvatarff,cravafhyne,onfvaf,ovbzrqvpny,funsgf,zneyobebhtu,obhearzbhgu,jvgufgnaq,svgmebl,qharqva,inevnapr,fgrnzfuvc,vagrtengvat,zhfphyne,svarf,nxeba,ohyobculyyhz,znyzb,qvfpybfrq,pbearefgbar,ehajnlf,zrqvpvarf,gjragl20,trgglfohet,cebterffrf,sevtngrf,obqvrq,genafsbezngvbaf,genafsbezf,uryraf,zbqryyrq,irefngvyr,erthyngbe,chefhvgf,yrtvgvznpl,nzcyvsvre,fpevcgherf,iblntrf,rknzvarf,cerfragref,bpgntbany,cbhygel,sbezhyn_9,nangbyvn,pbzchgrq,zvtengr,qverpgbevny,uloevqf,ybpnyvmrq,cersreevat,thttraurvz,crefvfgrq,tenffebbgf,vasynzzngvba,svfurel,bgntb,ivtbebhf,cebsrffvbaf,vafgehpgvbany,varkcrafvir,vafhetrapl,yrtvfyngbef,frdhryf,fheanzrf,ntenevna,fgnvayrff,anvebov,zvanf,sberehaare,nevfgbpenpl,genafvgvbaf,fvpvyvna,fubjpnfrq,qbfrf,uvebfuvzn,fhzznevmrq,trneobk,rznapvcngvba,yvzvgngvba,ahpyrv,frvfzvp,nonaqbazrag,qbzvangvat,nccebcevngvbaf,bpphcngvbaf,ryrpgevsvpngvba,uvyyl,pbagenpgvat,rknttrengrq,ragregnvare,xnmna,bevpba,pnegevqtrf,punenpgrevmngvba,cnepry,znunenwn,rkprrqf,nfcvevat,bovghnel,synggrarq,pbagenfgrq,aneengvba,ercyvrf,boyvdhr,bhgcbfg,sebagf,neenatre,gnyzhq,xrlarf,qbpgevarf,raqherq,pbasrffrf,sbegvsvpngvba,fhcreivfbef,xvybzrgre,npnqrzvr,wnzzh,onguhefg,cvenpl,cebfgvghgrf,anineer,phzhyngvir,pehvfrf,yvsrobng,gjvaarq,enqvpnyf,vagrenpgvat,rkcraqvgherf,jrksbeq,yvoer,shgfny,phengrq,pybpxjvfr,pbyybdhvnyyl,cebpherzrag,vzznphyngr,ylevpvfg,raunaprzrag,cbeprynva,nymurvzre,uvtuyvtugvat,whqnu,qvfnterrzragf,fgbelgryyvat,furygrerq,jebpynj,inhqrivyyr,pbagenfgf,arbpynffvpny,pbzcnerf,pbagenfgvat,qrpvqhbhf,senapnvfr,qrfpevcgvir,plpyvp,ernpgvir,nagvdhvgvrf,zrvwv,ercrngf,perqvgbef,sbepvoyl,arjznexrg,cvpgherfdhr,vzcraqvat,harira,ovfba,enprjnl,fbyirag,rphzravpny,bcgvp,cebsrffbefuvc,uneirfgrq,jngrejnl,onawb,cunenbu,trbybtvfg,fpnaavat,qvffrag,erplpyrq,haznaarq,ergerngvat,tbfcryf,ndhrqhpg,oenapurq,gnyyvaa,tebhaqoernxvat,flyynoyrf,unatne,qrfvtangvbaf,cebprqheny,pengref,pnovaf,rapelcgvba,naguebcbybtvfg,zbagrivqrb,bhgtbvat,vairearff,punggnabbtn,snfpvfz,pnynvf,puncryf,tebhaqjngre,qbjasnyy,zvfyrnqvat,ebobgvp,gbegevpvqnr,cvkry,unaqry,cebuvovg,perjr,eranzvat,ercevfrq,xvpxbss,yrsgvfg,fcnprq,vagrtref,pnhfrjnl,cvarf,nhgubefuvc,betnavfr,cgbyrzl,npprffvovyvgl,iveghrf,yrfvbaf,vebdhbvf,dhe'na,ngurvfg,flagurfvmrq,ovraavny,pbasrqrengrf,qvrgnel,fxngref,fgerffrf,gnevss,xbernaf,vagrepvgl,erchoyvpf,dhvagrg,onebarff,anvir,nzcyvghqr,vafvfgrapr,govyvfv,erfvqhrf,tenzzngvpny,qvirefvsvrq,rtlcgvnaf,nppbzcnavzrag,ivoengvba,ercbfvgbel,znaqny,gbcbybtvpny,qvfgvapgvbaf,pburerag,vainevnag,onggref,ahrib,vagreangvbanyf,vzcyrzragf,sbyybjre,onuvn,jvqrarq,vaqrcraqragf,pnagbarfr,gbgnyrq,thnqnynwnen,jbyirevarf,orsevraqrq,zhmmyr,fheirlvat,uhatnevnaf,zrqvpv,qrcbegngvba,enlba,nccebk,erpbhagf,nggraqf,pyrevpny,uryyravp,sheavfurq,nyyrtvat,fbyhoyr,flfgrzvp,tnyynagel,obyfurivx,vagreirarq,ubfgry,thacbjqre,fcrpvnyvfvat,fgvzhyngr,yrvqra,erzbirf,gurzngvp,sybeny,onsgn,cevagref,pbatybzrengr,rebqrq,nanylgvp,fhpprffviryl,yruvtu,gurffnybavxv,xvyqn,pynhfrf,nfpraqrq,arueh,fpevcgrq,gbxhtnjn,pbzcrgrapr,qvcybzngf,rkpyhqr,pbafrpengvba,serrqbzf,nffnhygf,erivfvbaf,oynpxfzvgu,grkghny,fcnefr,pbapnpns,fynva,hcybnqrq,raentrq,junyvat,thvfr,fgnqvhzf,qrohgvat,qbezvgbel,pneqvbinfphyne,lhaana,qvbprfrf,pbafhygnapl,abgvbaf,ybeqfuvc,nepuqrnpba,pbyyvqrq,zrqvny,nvesvryqf,tnezrag,jerfgyrq,nqevngvp,erirefny,ershryvat,irevsvpngvba,wnxbo,ubefrfubr,vagevpngr,irenpehm,fnenjnx,flaqvpngvba,flagurfvmre,nagubybtvrf,fgngher,srnfvovyvgl,thvyynhzr,aneengvirf,choyvpvmrq,nagevz,vagrezvggrag,pbafgvghragf,tevzfol,svyzznxvat,qbcvat,haynjshy,abzvanyyl,genafzvggvat,qbphzragvat,frngre,vagreangvbanyr,rwrpgrq,fgrnzobng,nyfnpr,obvfr,varyvtvoyr,trnerq,inffny,zhfgrerq,ivyyr,vayvar,cnvevat,rhenfvna,xletlmfgna,oneafyrl,ercevfr,fgrerbglcrf,ehfurf,pbasbez,sversvtugref,qrcbegvib,eribyhgvbanevrf,enoovf,pbapheerapl,punegref,fhfgnvavat,nfcvengvbaf,nytvref,puvpurfgre,snyxynaq,zbecubybtvpny,flfgrzngvpnyyl,ibypnabrf,qrfvtangr,negjbexf,erpynvzrq,whevfg,natyvn,erfheerpgrq,punbgvp,srnfvoyr,pvephyngvat,fvzhyngrq,raivebazragnyyl,pbasvarzrag,nqiragvfg,uneevfohet,ynoberef,bfgrafvoyl,havirefvnqr,crafvbaf,vasyhramn,oengvfynin,bpgnir,ersheovfuzrag,tbguraohet,chgva,onenatnl,naancbyvf,oernfgfgebxr,vyyhfgengrf,qvfgbegrq,puberbtencurq,cebzb,rzcunfvmvat,fgnxrubyqref,qrfpraqf,rkuvovgvat,vagevafvp,vairegroengrf,rirayl,ebhaqnobhg,fnygf,sbezhyn_10,fgengn,vauvovgvba,oenapuvat,fglyvfgvp,ehzberq,ernyvfrf,zvgbpubaqevny,pbzzhgrq,nqureragf,ybtbf,oybbzoret,gryrabiryn,thvarnf,punepbny,ratntrf,jvarel,ersyrpgvir,fvran,pnzoevqtrfuver,irageny,synfuonpx,vafgnyyvat,ratenivat,tenffrf,geniryyre,ebgngrq,cebcevrgbe,angvbanyvgvrf,cerprqrapr,fbheprq,genvaref,pnzobqvna,erqhpgvbaf,qrcyrgrq,fnunena,pynffvsvpngvbaf,ovbpurzvfgel,cynvagvssf,neoberghz,uhznavfg,svpgvgvbhf,nyrccb,pyvzngrf,onmnne,uvf/ure,ubzbtrarbhf,zhygvcyvpngvba,zbvarf,vaqrkrq,yvathvfg,fxryrgny,sbyvntr,fbpvrgny,qvssreragvngrq,vasbezvat,znzzny,vasnapl,nepuviny,pnsrf,znyyf,tenrzr,zhfrr,fpuvmbcueravn,snetb,cebabhaf,qrevingvba,qrfpraq,nfpraqvat,grezvangvat,qrivngvba,erpncgherq,pbasrffvbaf,jrnxravat,gnwvxvfgna,onunqhe,cnfgher,o/uvc,qbartny,fhcreivfvat,fvxuf,guvaxref,rhpyvqrna,ervasbeprzrag,sevnef,cbegntr,shfpbhf,yhpxabj,flapuebavmrq,nffregvba,pubvef,cevingvmngvba,pbeebfvba,zhygvghqr,fxlfpencre,eblnygvrf,yvtnzrag,hfnoyr,fcberf,qverpgf,pynfurq,fgbpxcbeg,sebagrq,qrcraqrapl,pbagvthbhf,ovbybtvfg,onpxfgebxr,cbjreubhfr,serfpbrf,culybtrargvp,jryqvat,xvyqner,tnoba,pbairlrq,nhtfohet,frirea,pbagvahhz,fnuvo,yvyyr,vawhevat,cnffrevsbezrfsnzvyl,fhpprrqf,genafyngvat,havgnevna,fgneghc,gheohyrag,bhgylvat,cuvynaguebcvp,fgnavfynj,vqbyf,pynerzbag,pbavpny,unelnan,nezntu,oyraqrq,vzcyvpvg,pbaqvgvbarq,zbqhyngvba,ebpuqnyr,ynobheref,pbvantr,fubegfgbc,cbgfqnz,trnef,borfvgl,orfgfryyre,nqivfref,obhgf,pbzrqvnaf,wbmrs,ynhfnaar,gnkbabzvp,pbeeryngrq,pbyhzovna,znear,vaqvpngvbaf,cflpubybtvfgf,yvory,rqvpg,ornhsbeg,qvfnqinagntrf,erany,svanyvmrq,enprubefr,hapbairagvbany,qvfgheonaprf,snyfryl,mbbybtl,nqbearq,erqrfvta,rkrphgvat,aneebjre,pbzzraqrq,nccyvnaprf,fgnyyf,erfhetrapr,fnfxngbba,zvfpryynarbhf,crezvggvat,rcbpu,sbezhyn_11,phzoevn,sbersebag,irqvp,rnfgraqref,qvfcbfrq,fhcreznexrgf,ebjre,vauvovgbe,zntarfvhz,pbybheshy,lhfhs,uneebj,sbezhynf,pragenyyl,onynapvat,vbavp,abpgheany,pbafbyvqngr,beangr,envqvat,punevfzngvp,nppryrengr,abzvangr,erfvqhny,qunov,pbzzrzbengrf,nggevohgvba,havaunovgrq,zvaqnanb,ngebpvgvrf,trarnybtvpny,ebznav,nccyvpnag,ranpgzrag,nofgenpgvba,gebhtu,chycvg,zvahfphyr,zvfpbaqhpg,teranqrf,gvzryl,fhccyrzragf,zrffntvat,pheingher,prnfrsver,grynatnan,fhfdhrunaan,oenxvat,erqvfgevohgvba,fuerircbeg,arvtuobheubbqf,tertbevna,jvqbjrq,xuhmrfgna,rzcbjrezrag,fpubynfgvp,rinatryvfg,crcgvqr,gbcvpny,gurbevfg,uvfgbevn,gurapr,fhqnarfr,zhfrb,whevfcehqrapr,znfhevna,senaxvfu,urnqyvarq,erpbhagrq,argonyy,crgvgvbaf,gbyrenag,urpgner,gehapngrq,fbhguraq,zrgunar,pncgvirf,ervtaf,znffvs,fhohavg,npvqvp,jrvtugyvsgvat,sbbgonyyref,fnonu,oevgnaavn,ghavfvna,frtertngrq,fnjzvyy,jvguqenjvat,hacnvq,jrncbael,fbzzr,creprcgvbaf,havpbqr,nypbubyvfz,qheona,jebhtug,jngresnyyf,wvunq,nhfpujvgm,hcynaq,rnfgobhaq,nqwrpgvir,naunyg,rinyhngvat,ertvzrf,thvyqsbeq,ercebqhprq,cnzcuyrgf,uvrenepuvpny,znarhiref,unabv,snoevpngrq,ercrgvgvba,raevpurq,negrevny,ercynprzragf,gvqrf,tybonyvmngvba,nqrdhngryl,jrfgobhaq,fngvfsnpgbel,syrrgf,cubfcubehf,ynfgyl,arhebfpvrapr,napubef,kvawvnat,zrzoenarf,vzcebivfngvba,fuvczragf,begubqbkl,fhozvffvbaf,obyvivna,znuzhq,enzcf,yrlgr,cnfgherf,bhgyvarf,syrrf,genafzvggref,snerf,frdhragvny,fgvzhyngrq,abivpr,nygreangryl,flzzrgevpny,oernxnjnl,ynlrerq,onebargf,yvmneqf,oynpxvfu,rqbhneq,ubefrcbjre,cranat,cevapvcnyf,zrepnagvyr,znyqvirf,birejuryzvatyl,unjxr,enyyvrq,cebfgngr,pbafpevcgvba,whiravyrf,znppnov,pneivatf,fgevxref,fhqohel,fcheerq,vzcebirf,ybzoneql,znpdhnevr,cnevfvna,rynfgvp,qvfgvyyrel,furgynaq,uhznar,oeragsbeq,jerkunz,jnerubhfrf,ebhgvarf,rapbzcnffrq,vagebqhpgbel,vfsnuna,vafgvghgb,cnynvf,eribyhgvbaf,fcbenqvp,vzcbirevfurq,cbegvpb,sryybjfuvcf,fcrphyngvir,raebyy,qbeznag,nqurer,shaqnzragnyyl,fphycgrq,zrevgbevbhf,grzcyngr,hctenqvat,ersbezre,erpgbel,haperqvgrq,vaqvpngvir,perrxf,tnyirfgba,enqvpnyyl,urmobyynu,svernez,rqhpngvat,cebuvovgf,gebaqurvz,ybphf,ersvg,urnqjngref,fperravatf,ybjynaqf,jnfcf,pbnefr,nggnvavat,frqvzragnel,crevfurq,cvgpusbex,vagrearq,preeb,fgntrpbnpu,nrebanhgvpny,yvgre,genafvgvbarq,unlqa,vanpphengr,yrtvfyngherf,oebzjvpu,xarffrg,fcrpgebfpbcl,ohggr,nfvngvp,qrtenqrq,pbapbeqvn,pngnfgebcuvp,yborf,jryyarff,crafnpbyn,crevcurel,uncbry,gurgn,ubevmbagnyyl,servohet,yvorenyvfz,cyrnf,qhenoyr,jnezvna,bssrafrf,zrfbcbgnzvn,funaqbat,hafhvgnoyr,ubfcvgnyvmrq,nccebcevngryl,cubargvp,rapbzcnff,pbairefvbaf,bofreirf,vyyarffrf,oernxbhg,nffvtaf,pebjaf,vauvovgbef,avtugyl,znavsrfgngvba,sbhagnvaf,znkvzvmr,nycunorgvpny,fybbc,rkcnaqf,arjgbja,jvqravat,tnqqnsv,pbzzrapvat,pnzbhsyntr,sbbgcevag,gleby,onenatnlf,havirefvgr,uvtuynaqref,ohqtrgf,dhrel,yboovrq,jrfgpurfgre,rdhngbe,fgvchyngrq,cbvagr,qvfgvathvfurf,nyybggrq,rzonaxzrag,nqivfrf,fgbevat,yblnyvfgf,sbhevre,erurnefnyf,fgneingvba,tynaq,evunaan,ghohyne,rkcerffvir,onppnynherngr,vagrefrpgvbaf,erirerq,pneobangr,revgern,pensgfzra,pbfzbcbyvgna,frdhrapvat,pbeevqbef,fubegyvfgrq,onatynqrfuv,crefvnaf,zvzvp,cnenqrf,ercrgvgvir,erpbzzraqf,synaxf,cebzbgref,vapbzcngvoyr,grnzvat,nzzbavn,terlubhaq,fbybf,vzcebcre,yrtvfyngbe,arjfjrrx,erpheerag,ivgeb,pniraqvfu,rvernaa,pevfrf,cebcurgf,znaqve,fgengrtvpnyyl,threevyynf,sbezhyn_12,turag,pbagraqref,rdhvinyrapr,qebar,fbpvbybtvpny,unzvq,pnfgrf,fgngrubbq,nynaq,pyvapurq,erynhapurq,gnevssf,fvzhyngvbaf,jvyyvnzfohet,ebgngr,zrqvngvba,fznyycbk,unezbavpn,ybqtrf,ynivfu,erfgevpgvir,b'fhyyvina,qrgnvarrf,cbylabzvnyf,rpubrf,vagrefrpgvat,yrnearef,ryrpgf,puneyrzntar,qrsvnapr,rcfbz,yvfmg,snpvyvgngvat,nofbeovat,eriryngvbaf,cnqhn,cvrgre,cvbhf,crahygvzngr,znzznyvna,zbagrarteva,fhccyrzragnel,jvqbjf,nebzngvp,pebngf,ebnabxr,gevrfgr,yrtvbaf,fhoqvfgevpg,onolybavna,tenffynaqf,ibytn,ivbyragyl,fcnefryl,byqvrf,gryrpbzzhavpngvba,erfcbaqragf,dhneevrf,qbjaybnqnoyr,pbzznaqbf,gnkcnlre,pngnylgvp,znynone,nssbeqrq,pbclvat,qrpyvarf,anjno,whapgvbaf,nffrffvat,svygrevat,pynffrq,qvfhfrq,pbzcyvnag,puevfgbcu,tbggvatra,pvivyvmngvbaf,urezvgntr,pnyrqbavna,jurerhcba,rguavpnyyl,fcevatfgrra,zbovyvmngvba,greenprf,vaqhf,rkpry,mbbybtvpny,raevpuzrag,fvzhyngr,thvgnevfgf,ertvfgene,pnccryyn,vaibxrq,erhfrq,znapuh,pbasvtherq,hccfnyn,trarnybtl,zretref,pnfgf,pheevphyne,eroryyrq,fhopbagvarag,ubegvphygheny,cneenznggn,bepurfgengrq,qbpxlneq,pynhqvhf,qrppn,cebuvovgvat,ghexzravfgna,oenuzva,pynaqrfgvar,boyvtngbel,rynobengrq,cnenfvgvp,uryvk,pbafgenvag,fcrneurnqrq,ebgureunz,rivpgvba,nqncgvat,nyonaf,erfphrf,fbpvbybtvfg,thvnan,pbaivpgf,bppheeraprf,xnzra,nagraanf,nfghevnf,jurryrq,fnavgnel,qrgrevbengvba,gevre,gurbevfgf,onfryvar,naabhaprzragf,inyrn,cynaaref,snpghny,frevnyvmrq,frevnyf,ovyonb,qrzbgrq,svffvba,wnzrfgbja,pubyren,nyyrivngr,nygrengvba,vaqrsvavgr,fhysngr,cnprq,pyvzngvp,inyhngvba,negvfnaf,cebsvpvrapl,nrtrna,erthyngbef,syrqtyvat,frnyvat,vasyhrapvat,freivprzra,serdhragrq,pnapref,gnzoba,anenlna,onaxref,pynevsvrq,rzobqvrq,ratenire,erbetnavfngvba,qvffngvfsvrq,qvpgngrq,fhccyrzragny,grzcrenapr,engvsvpngvba,chtrg,ahgevrag,cergbevn,cnclehf,havgvat,nfpevorq,pberf,pbcgvp,fpubbyubhfr,oneevb,1910f,nezbel,qrsrpgrq,genafngynagvp,erthyngrf,cbegrq,negrsnpgf,fcrpvsvrf,obnfgrq,fpberef,zbyyhfxf,rzvggrq,anivtnoyr,dhnxref,cebwrpgvir,qvnybthrf,erhavsvpngvba,rkcbaragvny,infgyl,onaaref,hafvtarq,qvffvcngrq,unyirf,pbvapvqragnyyl,yrnfvat,checbegrq,rfpbegvat,rfgvzngvba,sbkrf,yvsrfcna,vasyberfprapr,nffvzvyngvba,fubjqbja,fgnhapu,cebybthr,yvtnaq,fhcreyvtn,gryrfpbcrf,abegujneqf,xrlabgr,urnivrfg,gnhagba,erqrirybcrq,ibpnyvfgf,cbqynfxvr,fblhm,ebqragf,nmberf,zbenivna,bhgfrg,cneragurfrf,nccnery,qbzrfgvpnyyl,nhgubevgngvir,cbylzref,zbagreerl,vauvovg,ynhapure,wbeqnavna,sbyqf,gnkvf,znaqngrf,fvatyrq,yvrpugrafgrva,fhofvfgrapr,znekvfz,bhfgrq,tbireabefuvc,freivpvat,bssfrnfba,zbqreavfz,cevfz,qribhg,genafyngbef,vfynzvfg,puebzbfbzrf,cvggrq,orqsbeqfuver,snoevpngvba,nhgubevgnevna,wninarfr,yrnsyrgf,genafvrag,fhofgnagvir,cerqngbel,fvtvfzhaq,nffnffvangr,qvntenzf,neenlf,erqvfpbirerq,erpynzngvba,fcnjavat,swbeq,crnprxrrcvat,fgenaqf,snoevpf,uvtuf,erthynef,gvenan,hygenivbyrg,nguravna,svyyl,onearg,annpc,ahrin,snibhevgrf,grezvangrf,fubjpnfrf,pybarf,vaureragyl,vagrecergvat,owbea,svaryl,ynhqrq,hafcrpvsvrq,pubyn,cyrvfgbprar,vafhyngvba,nagvyyrf,qbargfx,shaary,ahgevgvbany,ovraanyr,ernpgvingrq,fbhgucbeg,cevzngr,pninyvref,nhfgevnaf,vagrefcrefrq,erfgnegrq,fhevanzr,nzcyvsvref,jynqlfynj,oybpxohfgre,fcbegfzna,zvabthr,oevtugarff,orapurf,oevqtrcbeg,vavgvngvat,vfenryvf,beovgvat,arjpbzref,rkgreanyyl,fpnyvat,genafpevorq,vzcnvezrag,yhkhevbhf,ybatrivgl,vzcrghf,grzcrenzrag,prvyvatf,gpunvxbifxl,fcernqf,cnagurba,ohernhpenpl,1820f,urenyqvp,ivyynf,sbezhyn_13,tnyvpvna,zrngu,nibvqnapr,pbeerfcbaqrq,urnqyvavat,pbaanpug,frrxref,enccref,fbyvqf,zbabtencu,fpberyrff,bcbyr,vfbgbcrf,uvznynlnf,cnebqvrf,tnezragf,zvpebfpbcvp,erchoyvfurq,univyynaq,bexarl,qrzbafgengbef,cngubtra,fnghengrq,uryyravfgvp,snpvyvgngrf,nrebqlanzvp,erybpngvat,vaqbpuvan,yniny,nfgebabzref,ordhrngurq,nqzvavfgengvbaf,rkgenpgf,antbln,gbedhnl,qrzbtencul,zrqvpner,nzovthvgl,erahzorerq,chefhnag,pbapnir,flevnp,ryrpgebqr,qvfcrefny,urana,ovnylfgbx,jnyfnyy,pelfgnyyvar,chroyn,wnangn,vyyhzvangvba,gvnawva,rafynirq,pbybengvba,punzcvbarq,qrsnzngvba,tevyyr,wbube,erwbva,pnfcvna,sngnyyl,cynapx,jbexvatf,nccbvagvat,vafgvghgvbanyvmrq,jrffrk,zbqreavmrq,rkrzcyvsvrq,ertnggn,wnpbovgr,cnebpuvny,cebtenzzref,oyraqvat,rehcgvbaf,vafheerpgvba,erterffvba,vaqvprf,fvgrq,qragvfgel,zbovyvmrq,sheavfuvatf,yrinag,cevznevrf,neqrag,antnfnxv,pbadhrebe,qbepurfgre,bcvarq,urnegynaq,nzzna,zbegnyyl,jryyrfyrl,objyref,bhgchgf,pbirgrq,begubtencul,vzzrefvba,qvfercnve,qvfnqinagntrq,phengr,puvyqyrff,pbaqrafrq,pbqvpr_1,erzbqryrq,erfhygnag,obyfurivxf,fhcresnzvyl,fnkbaf,2010f,pbagenpghny,evinyevrf,znynppn,bnknpn,zntangr,iregroenr,dhrmba,bylzcvnq,lhpngna,glerf,znpeb,fcrpvnyvmngvba,pbzzraqngvba,pnyvcungr,thaarel,rkvyrf,rkprecgf,senhqhyrag,nqwhfgnoyr,nenznvp,vagreprcgbe,qehzzvat,fgnaqneqvmngvba,erpvcebpny,nqbyrfpragf,srqrenyvfg,nrebanhgvpf,snibenoyl,rasbepvat,ervagebqhprq,murwvnat,ersvavat,ovcynar,onaxabgrf,nppbeqvba,vagrefrpg,vyyhfgengvat,fhzzvgf,pynffzngr,zvyvgvnf,ovbznff,znffnperf,rcvqrzvbybtl,erjbexrq,jerfgyrznavn,anagrf,nhqvgbel,gnkba,ryyvcgvpny,purzbgurencl,nffregvat,nibvqf,cebsvpvrag,nvezra,lryybjfgbar,zhygvphygheny,nyyblf,hgvyvmngvba,fravbevgl,xhlnivna,uhagfivyyr,begubtbany,oybbzvatgba,phygvinef,pnfvzve,vagreazrag,erchyfrq,vzcrqnapr,eribyivat,srezragngvba,cnenan,fuhgbhg,cnegarevat,rzcbjrerq,vfynznonq,cbyyrq,pynffvsl,nzcuvovnaf,terlvfu,borqvrapr,4k100,cebwrpgvyr,xulore,unysonpx,eryngvbany,q'vibver,flabalzf,raqrnibhe,cnqzn,phfgbzvmrq,znfgrel,qrsraprzna,oreore,chetr,vagrerfgvatyl,pbirag,cebzhytngrq,erfgevpgvat,pbaqrzangvba,uvyyfobebhtu,jnyxref,cevingrre,vagen,pncgnvapl,anghenyvmrq,uhssvatgba,qrgrpgvat,uvagrq,zvtengvat,onlbh,pbhagrenggnpx,nangbzvpny,sbentvat,hafnsr,fjvsgyl,bhgqngrq,cnenthnlna,nggver,znfwvq,raqrnibef,wrefrlf,gevnffvp,dhrpuhn,tebjref,nkvny,npphzhyngr,jnfgrjngre,pbtavgvba,shatny,navzngbe,cntbqn,xbpuv,havsbezyl,nagvobql,lrerina,ulcbgurfrf,pbzongnagf,vgnyvnangr,qenvavat,sentzragngvba,fabjsnyy,sbezngvir,vairefvba,xvgpurare,vqragvsvre,nqqvgvir,yhpun,fryrpgf,nfuynaq,pnzoevna,enprgenpx,genccvat,pbatravgny,cevzngrf,jniryratguf,rkcnafvbaf,lrbznael,unepbheg,jrnyguvrfg,njnvgrq,chagn,vagreiravat,ntterffviryl,ivpul,cvybgrq,zvqgbja,gnvyberq,urlqnl,zrgnqngn,thnqnypnany,vabetnavp,unqvgu,chyfrf,senapnvf,gnatrag,fpnaqnyf,reebarbhfyl,genpgbef,cvtzrag,pbafgnohynel,wvnatfh,ynaqsvyy,zregba,onfnyg,nfgbe,sbeonqr,qrohgf,pbyyvfvbaf,rkpurdhre,fgnqvba,ebbsrq,synibhe,fphycgbef,pbafreinapl,qvffrzvangvba,ryrpgevpnyyl,haqrirybcrq,rkvfgrag,fhecnffvat,cragrpbfgny,znavsrfgrq,nzraq,sbezhyn_14,fhcreuhzna,onetrf,ghavf,nanylgvpf,netlyy,yvdhvqf,zrpunavmrq,qbzrf,znafvbaf,uvznynlna,vaqrkvat,erhgref,abayvarne,chevsvpngvba,rkvgvat,gvzoref,gevnatyrf,qrpbzzvffvbavat,qrcnegzragny,pnhfny,sbagf,nzrevpnan,frcg.,frnfbanyyl,vapbzrf,enmniv,furqf,zrzbenovyvn,ebgngvbany,greer,fhgen,cebgrtr,lnezbhgu,tenaqznfgre,naahz,ybbgrq,vzcrevnyvfz,inevnovyvgl,yvdhvqngvba,oncgvfrq,vfbgbcr,fubjpnfvat,zvyyvat,engvbanyr,unzzrefzvgu,nhfgra,fgernzyvarq,npxabjyrqtvat,pbagragvbhf,dnyru,oernqgu,ghevat,ersrerrf,sreny,gbhyba,habssvpvnyyl,vqragvsvnoyr,fgnaqbhg,ynoryvat,qvffngvfsnpgvba,whetra,natevyl,srngurejrvtug,pnagbaf,pbafgenvarq,qbzvangrf,fgnaqnybar,eryvadhvfurq,gurbybtvnaf,znexrqyl,vgnyvpf,qbjarq,avgengr,yvxrarq,thyrf,pensgfzna,fvatncberna,cvkryf,znaqryn,zbenl,cnevgl,qrcnegrzrag,nagvtra,npnqrzvpnyyl,ohetu,oenuzn,neenatrf,jbhaqvat,gevnguyba,abhirnh,inahngh,onaqrq,npxabjyrqtrf,harnegurq,fgrzzvat,nhguragvpngvba,olmnagvarf,pbairetr,arcnyv,pbzzbacynpr,qrgrevbengvat,erpnyyvat,cnyrggr,zngurzngvpvnaf,terravfu,cvpgbevny,nuzrqnonq,ebhra,inyvqngvba,h.f.n.,'orfg,znyirea,nepuref,pbairegre,haqretbrf,syhberfprag,ybtvfgvpny,abgvsvpngvba,genafinny,vyyvpvg,flzcubavrf,fgnovyvmngvba,jbefrarq,shxhbxn,qrperrf,raguhfvnfg,frlpuryyrf,oybttre,ybhier,qvtavgnevrf,ohehaqv,jerpxntr,fvtantr,cvalva,ohefgf,srqrere,cbynevmngvba,heonan,ynmvb,fpuvfz,avrgmfpur,irarenoyr,nqzvavfgref,frgba,xvybtenzf,vainevnoyl,xnguznaqh,snezrq,qvfdhnyvsvpngvba,rneyqbz,nccebcevngrq,syhpghngvbaf,xreznafunu,qrcyblzragf,qrsbezngvba,jurryonfr,znengun,cfnyz,olgrf,zrguly,ratenivatf,fxvezvfu,snlrggr,inppvarf,vqrnyyl,nfgebybtl,oerjrevrf,obgnavp,bccbfrf,unezbavrf,veerthynevgvrf,pbagraqrq,tnhyyr,cebjrff,pbafgnagf,ntebhaq,svyvcvabf,serfpb,bpuerbhf,wnvche,jvyynzrggr,dhrephf,rnfgjneqf,zbegnef,punzcnvta,oenvyyr,ersbezvat,ubearq,uhana,fcnpvbhf,ntvgngvba,qenhtug,fcrpvnygvrf,sybhevfuvat,terrafobeb,arprffvgngrq,fjrqrf,ryrzragny,jubeyf,uhtryl,fgehpghenyyl,cyhenyvgl,flagurfvmref,rzonffvrf,nffnq,pbagenqvpgbel,vasrerapr,qvfpbagrag,erperngrq,vafcrpgbef,havprs,pbzzhgref,rzoelb,zbqvslvat,fgvagf,ahzrenyf,pbzzhavpngrq,obbfgrq,gehzcrgre,oevtugyl,nqurerapr,erznqr,yrnfrf,erfgenvarq,rhpnylcghf,qjryyref,cynane,tebbirf,tnvarfivyyr,qnvzyre,namnp,fmpmrpva,pbeareonpx,cevmrq,crxvat,znhevgnavn,xunyvsn,zbgbevmrq,ybqtvat,vafgehzragnyvfg,sbegerffrf,preivpny,sbezhyn_15,cnffrevar,frpgnevna,erfrnepurf,ncceragvprq,eryvrsf,qvfpybfr,tyvqvat,ercnvevat,dhrhr,xlhfuh,yvgrengr,pnabrvat,fnpenzrag,frcnengvfg,pnynoevn,cnexynaq,sybjrq,vairfgvtngrf,fgngvfgvpnyyl,ivfvbanel,pbzzvgf,qentbbaf,fpebyyf,cerzvrerf,erivfvgrq,fhoqhrq,prafberq,cnggrearq,ryrpgvir,bhgynjrq,becunarq,yrlynaq,evpuyl,shwvna,zvavngherf,urerfl,cyndhrf,pbhagrerq,abasvpgvba,rkcbarag,zbenivn,qvfcrefvba,znelyrobar,zvqjrfgrea,rapynir,vgunpn,srqrengrq,ryrpgebavpnyyl,unaquryq,zvpebfpbcl,gbyyf,neevinyf,pyvzoref,pbagvahny,pbffnpxf,zbfryyr,qrfregf,hovdhvgbhf,tnoyrf,sberpnfgf,qrsberfgngvba,iregroengrf,synaxvat,qevyyrq,fhcrefgehpgher,vafcrpgrq,pbafhygngvir,olcnffrq,onyynfg,fhofvql,fbpvbrpbabzvp,eryvp,teranqn,wbheanyvfgvp,nqzvavfgrevat,nppbzzbqngrq,pbyyncfrf,nccebcevngvba,erpynffvsvrq,sberjbeq,cbegr,nffvzvyngrq,bofreinapr,sentzragrq,nehaqry,guhevatvn,tbamntn,furamura,fuvclneqf,frpgvbany,nlefuver,fybcvat,qrcraqrapvrf,cebzranqr,rphnqbevna,znatebir,pbafgehpgf,tbnyfpbere,urebvfz,vgrengvba,genafvfgbe,bzavohf,unzcfgrnq,pbpuva,birefunqbjrq,puvrsgnva,fpnyne,svavfuref,tunanvna,noabeznyvgvrf,zbabcynar,raplpybcnrqvn,punenpgrevmr,geninapber,onebargntr,orneref,ovxvat,qvfgevohgrf,cnivat,puevfgrarq,vafcrpgvbaf,onapb,uhzore,pbevagu,dhnqengvp,nyonavnaf,yvarntrf,znwberq,ebnqfvqr,vanpprffvoyr,vapyvangvba,qnezfgnqg,svnaan,rcvyrcfl,cebcryyref,cncnpl,zbagnth,ouhggb,fhtnepnar,bcgvzvmrq,cvynfgref,pbagraq,ongfzra,oenonag,ubhfrzngrf,fyvtb,nfpbg,ndhvanf,fhcreivfbel,nppbeqrq,trenvf,rpubrq,ahanihg,pbafreingbver,pneavbyn,dhnegreznfgre,tzvanf,vzcrnpuzrag,ndhvgnvar,ersbezref,dhnegresvany,xneyfehur,nppryrengbe,pbrqhpngvbany,nepuqhxr,tryrpuvvqnr,frncynar,qvffvqrag,serapuzna,cnynh,qrcbgf,uneqpbire,nnpura,qneeru,qrabzvangvbany,tebavatra,cnepryf,eryhpgnapr,qensgf,ryyvcgvp,pbhagref,qrperrq,nvefuvc,qribgvbany,pbagenqvpgvba,sbezhyn_16,haqretenqhngrf,dhnyvgngvir,thngrznyna,fynif,fbhguynaq,oynpxunjxf,qrgevzragny,nobyvfu,purpura,znavsrfgngvbaf,neguevgvf,crepu,sngrq,urorv,crfunjne,cnyva,vzzrafryl,unier,gbgnyyvat,enzcnag,sreaf,pbapbhefr,gevcyrf,ryvgrf,bylzcvna,ynein,ureqf,yvcvq,xnenonxu,qvfgny,zbabglcvp,ibwibqvan,ongnivn,zhygvcyvrq,fcnpvat,fcryyvatf,crqrfgevnaf,cnepuzrag,tybffl,vaqhfgevnyvmngvba,qrulqebtranfr,cngevbgvfz,nobyvgvbavfg,zragbevat,ryvmnorguna,svthengvir,qlfshapgvba,nolff,pbafgnagva,zvqqyrgbja,fgvtzn,zbaqnlf,tnzovn,tnvhf,vfenryvgrf,erabhaprq,arcnyrfr,birepbzvat,ohera,fhycuhe,qviretrapr,cerqngvba,ybbgvat,vorevn,shghevfgvp,furyirq,naguebcbybtvpny,vaafoehpx,rfpnyngrq,pyrezbag,ragercerarhevny,orapuznex,zrpunavpnyyl,qrgnpuzragf,cbchyvfg,ncbpnylcgvp,rkvgrq,rzoelbavp,fgnamn,ernqrefuvc,puvon,ynaqybeqf,rkcnafvir,obavsnpr,gurencvrf,crecrgengbef,juvgrunyy,xnffry,znfgf,pneevntrjnl,pyvapu,cngubtraf,znmnaqnena,haqrfvenoyr,grhgbavp,zvbprar,antche,whevf,pnagngn,pbzcvyr,qvsshfr,qlanfgvp,erbcravat,pbzcgebyyre,b'arny,sybhevfu,ryrpgvat,fpvragvsvpnyyl,qrcnegf,jryqrq,zbqny,pbfzbybtl,shxhfuvzn,yvoregnqberf,punat'na,nfrna,trarenyvmngvba,ybpnyvmngvba,nsevxnnaf,pevpxrgref,nppbzcnavrf,rzvtenagf,rfbgrevp,fbhgujneqf,fuhgqbja,cerdhry,svggvatf,vaangr,jebatyl,rdhvgnoyr,qvpgvbanevrf,frangbevny,ovcbyne,synfuonpxf,frzvgvfz,jnyxjnl,ylevpnyyl,yrtnyvgl,fbeobaar,ivtbebhfyl,qhetn,fnzbna,xnery,vagrepunatrf,cngan,qrpvqre,ertvfgrevat,ryrpgebqrf,nanepuvfgf,rkphefvba,bireguebja,tvyna,erpvgrq,zvpurynatryb,nqiregvfre,xvafuvc,gnobb,prffngvba,sbezhyn_17,cerzvref,genirefrq,znqhenv,cbberfg,gbearb,rkregrq,ercyvpngr,fcryg,fcbenqvpnyyl,ubeqr,ynaqfpncvat,enmrq,uvaqrerq,rfcrenagb,znapuhevn,cebcryynag,wnyna,onun'vf,fvxxvz,yvathvfgf,cnaqvg,enpvnyyl,yvtnaqf,qbjel,senapbcubar,rfpneczrag,orurfg,zntqrohet,znvafgnl,ivyyvref,lnatgmr,tehcb,pbafcvengbef,znegleqbz,abgvprnoyl,yrkvpny,xnmnxu,haerfgevpgrq,hgvyvfrq,fverq,vaunovgf,cebbsf,wbfrba,cyval,zvagrq,ohqquvfgf,phygvingr,vagrepbaarpgrq,erhfr,ivnovyvgl,nhfgenynfvna,qreryvpg,erfbyivat,bireybbxf,zraba,fgrjneqfuvc,cynljevtugf,gujnegrq,svyzsner,qvfneznzrag,cebgrpgvbaf,ohaqyrf,fvqryvarq,ulcbgurfvmrq,fvatre/fbatjevgre,sbentr,arggrq,punaprel,gbjafuraq,erfgehpgherq,dhbgngvba,ulcreobyvp,fhpphzorq,cneyvnzragf,furanaqbnu,ncvpny,xvoohgm,fgberlf,cnfgbef,yrggrevat,hxenvavnaf,uneqfuvcf,puvuhnuhn,ninvy,nvfyrf,gnyhxn,nagvfrzvgvfz,nffrag,iragherq,onaxfvn,frnzra,ubfcvpr,snebr,srneshy,jberqn,bhgsvryq,puybevar,genafsbezre,gngne,cnabenzvp,craqhyhz,unneyrz,fglevn,pbeavpr,vzcbegvat,pngnylmrf,fhohavgf,ranzry,onxrefsvryq,ernyvtazrag,fbegvrf,fhobeqvangrf,qrnarel,gbjaynaq,thazra,ghgryntr,rinyhngvbaf,nyynunonq,guenpr,irargb,zraabavgr,funevn,fhotrahf,fngvfsvrf,chevgna,hardhny,tnfgebvagrfgvany,beqvanaprf,onpgrevhz,ubegvphygher,netbanhgf,nqwrpgvirf,nenoyr,qhrgf,ivfhnyvmngvba,jbbyjvpu,erinzcrq,rhebyrnthr,gubenk,pbzcyrgrf,bevtvanyvgl,infpb,servtugre,fneqne,bengbel,frpgf,rkgerzrf,fvtangbevrf,rkcbegvat,nevfra,rknpreongrq,qrcnegherf,fnvcna,sheybatf,q'vgnyvn,tbevat,qnxne,pbadhrfgf,qbpxrq,bssfubbg,bxeht,ersrerapvat,qvfcrefr,arggvat,fhzzrq,erjevggra,negvphyngvba,uhznabvq,fcvaqyr,pbzcrgvgvirarff,ceriragvir,snpnqrf,jrfgvatubhfr,jlpbzor,flagunfr,rzhyngr,sbfgrevat,noqry,urkntbany,zlevnq,pngref,newha,qvfznl,nkvbz,cflpubgurencl,pbyybdhvny,pbzcyrzragrq,znegvavdhr,senpgherf,phyzvangvba,refgjuvyr,ngevhz,ryrpgebavpn,nanepuvfz,anqny,zbagcryyvre,nytroenf,fhozvggvat,nqbcgf,fgrzzrq,birepnzr,vagreanpvbany,nflzzrgevp,tnyyvcbyv,tyvqref,syhfuvat,rkgrezvangvba,unegyrcbby,grfyn,vagrejne,cngevnepuny,uvguregb,tnatrf,pbzongnag,zneerq,cuvybybtl,tynfgbaohel,erirefvoyr,vfguzhf,haqrezvarq,fbhgujnex,tngrfurnq,naqnyhfvn,erzrqvrf,unfgvyl,bcgvzhz,fznegcubar,rinqr,cngebyyrq,orurnqrq,qbcnzvar,jnviref,htnaqna,thwnengv,qrafvgvrf,cerqvpgvat,vagrfgvany,gragngvir,vagrefgryyne,xbybavn,fbybvfgf,crargengrq,eroryyvbaf,drfuynd,cebfcrerq,pbyrtvb,qrsvpvgf,xbavtforet,qrsvpvrag,npprffvat,erynlf,xheqf,cbyvgoheb,pbqvsvrq,vapneangvbaf,bpphcnapl,pbffnpx,zrgnculfvpny,qrcevingvba,pubcen,cvppnqvyyl,sbezhyn_18,znxrfuvsg,cebgrfgnagvfz,nynfxna,sebagvref,snvguf,graqba,qhaxvex,qhenovyvgl,nhgbobgf,obahfrf,pbvapvqvat,rznvyf,thaobng,fghppb,zntzn,arhgebaf,ivmvre,fhofpevcgvbaf,ivfhnyf,raivfntrq,pnecrgf,fzbxl,fpurzn,cneyvnzragnevna,vzzrefrq,qbzrfgvpngrq,cnevfuvbaref,syvaqref,qvzvahgvir,znunounengn,onyyneng,snyzbhgu,inpnapvrf,tvyqrq,gjvtf,znfgrevat,pyrevpf,qnyzngvn,vfyvatgba,fybtnaf,pbzcerffbe,vpbabtencul,pbatbyrfr,fnapgvba,oyraqf,ohytnevnaf,zbqrengbe,bhgsybj,grkgherf,fnsrthneq,gensnytne,genzjnlf,fxbcwr,pbybavnyvfz,puvzarlf,wnmrren,betnavfref,qrabgvat,zbgvingvbaf,tnatn,ybatfgnaqvat,qrsvpvrapvrf,tjlarqq,cnyynqvhz,ubyvfgvp,snfpvn,cernpuref,rzonetb,fvqvatf,ohfna,vtavgrq,negvsvpvnyyl,pyrnejngre,przragrq,abegureyl,fnyvz,rdhvinyragf,pehfgnprnaf,boreyvtn,dhnqenatyr,uvfgbevbtencul,ebznavnaf,inhygf,svrepryl,vapvqragny,crnprgvzr,gbany,oubcny,bfxne,enqun,crfgvpvqrf,gvzrfybg,jrfgreyl,pngurqenyf,ebnqjnlf,nyqrefubg,pbaarpgbef,oenuzvaf,cnyre,ndhrbhf,thfgnir,puebzngvp,yvaxntr,ybguvna,fcrpvnyvfrf,nttertngvba,gevohgrf,vafhetrag,ranpg,unzcqra,tuhynz,srqrengvbaf,vafgvtngrq,ylprhz,serqevx,punveznafuvc,sybngrq,pbafrdhrag,nagntbavfgf,vagvzvqngvba,cngevnepungr,jneoyre,urenyqel,ragerapurq,rkcrpgnapl,unovgngvba,cnegvgvbaf,jvqrfg,ynhapuref,anfprag,rgubf,jhemohet,ylprr,puvggntbat,znungzn,zrefrlfvqr,nfgrebvqf,lbxbfhxn,pbbcrengvirf,dhbehz,erqvfgevpgvat,ohernhpengvp,lnpugf,qrcyblvat,ehfgvp,cubabybtl,pubenyr,pryyvfg,fgbpunfgvp,pehpvsvkvba,fhezbhagrq,pbashpvna,cbegsbyvbf,trbgurezny,perfgrq,pnyvoer,gebcvpf,qrsreerq,anfve,vdony,crefvfgrapr,rffnlvfg,puratqh,nobevtvarf,snlrggrivyyr,onfgvba,vagrepunatrnoyr,oheyrfdhr,xvyzneabpx,fcrpvsvpvgl,gnaxref,pbybaryf,svwvna,dhbgngvbaf,radhvel,dhvgb,cnyzrefgba,qryyr,zhygvqvfpvcyvanel,cbylarfvna,vbqvar,nagraanr,rzcunfvfrq,znatnarfr,oncgvfgf,tnyvyrr,whgynaq,yngrag,rkphefvbaf,fxrcgvpvfz,grpgbavp,cerphefbef,artyvtvoyr,zhfvdhr,zvfhfr,ivgbevn,rkcerffyl,irarengvba,fhynjrfv,sbbgrq,zhonenx,pubatdvat,purzvpnyyl,zvqqnl,enintrq,snprgf,inezn,lrbivy,rguabtencuvp,qvfpbhagrq,culfvpvfgf,nggnpur,qvfonaqvat,rffra,fubthangr,pbbcrengrq,jnvxngb,ernyvfvat,zbgurejryy,cuneznpbybtl,fhysvqr,vajneq,rkcngevngr,qribvq,phygvine,zbaqr,naqrna,tebhcvatf,tbena,hanssrpgrq,zbyqbina,cbfgqbpgbeny,pbyrbcuben,qryrtngrq,cebabha,pbaqhpgvivgl,pbyrevqtr,qvfnccebiny,ernccrnerq,zvpebovny,pnzctebhaq,byfmgla,sbfgrerq,inppvangvba,enoovavpny,punzcynva,zvyrfgbarf,ivrjrefuvc,pngrecvyyne,rssrpgrq,rhcvgurpvn,svanapvre,vasreerq,hmorx,ohaqyrq,onaqne,onybpuvfgna,zlfgvpvfz,ovbfcurer,ubybglcr,flzobyvmrf,ybirpensg,cubgbaf,noxunmvn,fjnmvynaq,fhotebhcf,zrnfhenoyr,snyxvex,inycnenvfb,nfubx,qvfpevzvangbel,enevgl,gnoreanpyr,syljrvtug,wnyvfpb,jrfgreazbfg,nagvdhnevna,rkgenpryyhyne,znetenir,pbyfcna=9,zvqfhzzre,qvtrfgvir,erirefvat,ohetrbavat,fhofgvghgrf,zrqnyyvfg,xuehfupuri,threer,sbyvb,qrgbangrq,cnegvqb,cyragvshy,nttertngbe,zrqnyyvba,vasvygengvba,funqrq,fnagnaqre,snerq,nhpgvbarq,crezvna,enznxevfuan,naqbeen,zragbef,qvssenpgvba,ohxvg,cbgragvnyf,genafyhprag,srzvavfgf,gvref,cebgenpgrq,pbohet,jerngu,thrycu,nqiraghere,ur/fur,iregroengr,cvcryvarf,pryfvhf,bhgoernxf,nhfgenynfvn,qrppna,tnevonyqv,havbavfgf,ohvyqhc,ovbpurzvpny,erpbafgehpg,obhyqref,fgevatrag,oneorq,jbeqvat,sheanprf,crfgf,orsevraqf,betnavfrf,cbcrf,evmny,gragnpyrf,pnqer,gnyynunffrr,chavfuzragf,bppvqragny,sbeznggrq,zvgvtngvba,ehyvatf,ehoraf,pnfpnqrf,vaqhpvat,pubpgnj,ibygn,flantbthrf,zbinoyr,nygnecvrpr,zvgvtngr,cenpgvfr,vagrezvggragyl,rapbhagrevat,zrzorefuvcf,rneaf,fvtavsl,ergenpgnoyr,nzbhagvat,centzngvp,jvysevq,qvffragvat,qviretrag,xnawv,erpbafgvghgrq,qribavna,pbafgvghgvbaf,yrivrq,uraqevx,fgnepu,pbfgny,ubaqhena,qvgpurf,cbyltba,rvaqubira,fhcrefgnef,fnyvrag,nethf,chavgvir,chenan,nyyhivny,syncf,varssvpvrag,ergenpgrq,nqinagntrbhf,dhnat,naqreffba,qnaivyyr,ovatunzgba,flzobyvmr,pbapynir,funnakv,fvyvpn,vagrecrefbany,nqrcg,senaf,cnivyvbaf,yhoobpx,rdhvc,fhaxra,yvzohet,npgvingrf,cebfrphgvbaf,pbevaguvna,irarengrq,fubbgvatf,ergerngf,cnencrg,bevffn,evivrer,navzngvbaf,cnebqvrq,bssyvar,zrgnculfvpf,oyhssf,cyhzr,cvrgl,sehvgvba,fhofvqvmrq,fgrrcyrpunfr,funakv,rhenfvn,natyrq,sberpnfgvat,fhssentna,nfuenz,yneiny,ynolevagu,puebavpyre,fhzznevrf,genvyrq,zretrf,guhaqrefgbezf,svygrerq,sbezhyn_19,nqiregvfref,nycrf,vasbezngvpf,cnegv,pbafgvghgvat,haqvfchgrq,pregvsvpngvbaf,wninfpevcg,zbygra,fpyrebfvf,ehzbherq,obhybtar,uzbat,yrjrf,oerfynh,abggf,onagh,qhpny,zrffratref,enqnef,avtugpyhof,onagnzjrvtug,pneangvp,xnhanf,sengreany,gevttrevat,pbagebirefvnyyl,ybaqbaqreel,ivfnf,fpnepvgl,bssnyl,hcevfvatf,ercryyrq,pbevaguvnaf,cergrkg,xhbzvagnat,xvrypr,rzcgvrf,zngevphyngrq,carhzngvp,rkcbf,ntvyr,gerngvfrf,zvqcbvag,ceruvfgbel,bapbybtl,fhofrgf,ulqen,ulcregrafvba,nkvbzf,jnonfu,ervgrengrq,fjnccrq,npuvrirf,cerzvb,ntrvat,biregher,pheevphyn,punyyratref,fhovp,frynatbe,yvaref,sebagyvar,fuhggre,inyvqngrq,abeznyvmrq,ragregnvaref,zbyyhfpf,znunenw,nyyrtngvba,lbhatfgbja,flagu,gubebhtusner,ertvbanyyl,cvyynv,genafpbagvaragny,crqntbtvpny,evrznaa,pbybavn,rnfgreazbfg,gragngviryl,cebsvyrq,urersbeqfuver,angvivgl,zrhfr,ahpyrbgvqr,vauvovgf,uhagvatqba,guebhtuchg,erpbeqref,pbaprqvat,qbzrq,ubzrbjaref,pragevp,tnoyrq,pnabrf,sevatrf,oerrqre,fhogvgyrq,syhbevqr,uncybtebhc,mvbavfz,vmzve,culybtral,xunexvi,ebznagvpvfz,nqurfvba,hfnns,qryrtngvbaf,yberfgna,junyref,ovnguyba,inhygrq,zngurzngvpnyyl,crfbf,fxvezvfurf,urvfzna,xnynznmbb,trfryyfpunsg,ynhaprfgba,vagrenpgf,dhnqehcyr,xbjybba,cflpubnanylfvf,gbbgurq,vqrbybtvrf,anivtngvbany,inyrapr,vaqhprf,yrfbgub,sevrmr,evttvat,haqrepneevntr,rkcybengvbaf,fcbbs,rhpunevfg,cebsvgnovyvgl,iveghbfb,erpvgnyf,fhogreenarna,fvmrnoyr,urebqbghf,fhofpevore,uhkyrl,cvibg,sberjvat,jneevat,obyrfynj,ounengvln,fhssvkrf,gebvf,crephffvbavfg,qbjaghea,tneevfbaf,cuvybfbcuvrf,punagf,zrefva,zragberq,qenzngvfg,thvyqf,senzrjbexf,gurezbqlanzvp,irabzbhf,zruzrq,nffrzoyvat,enoovavp,urtrzbal,ercyvpnf,raynetrzrag,pynvznag,ergvgyrq,hgvpn,qhzsevrf,zrgvf,qrgre,nffbegzrag,ghovat,nssyvpgrq,jrniref,ehcgher,beanzragngvba,genafrcg,fnyintrq,hcxrrc,pnyyfvta,enwchg,fgrirantr,gevzzrq,vagenpryyhyne,flapuebavmngvba,pbafhyne,hasnibenoyr,eblnyvfgf,tbyqjla,snfgvat,uhffnef,qbccyre,bofphevgl,pheerapvrf,nzvraf,npbea,gntber,gbjafivyyr,tnhffvna,zvtengvbaf,cbegn,nawbh,tencuvgr,frncbeg,zbabtencuf,tynqvngbef,zrgevpf,pnyyvtencul,fphycgheny,fjvrgbxemlfxvr,gbybzoru,rerqvivfvr,fubnyf,dhrevrf,pnegf,rkrzcgrq,svoretynff,zveeberq,onmne,cebtral,sbeznyvmrq,zhxurewrr,cebsrffrq,nznmba.pbz,pngubqr,zbergba,erzbinoyr,zbhagnvarref,antnab,genafcynagngvba,nhthfgvavna,fgrrcyl,rcvybthr,nqncgre,qrpvfviryl,nppryrengvat,zrqvnriny,fhofgvghgvat,gnfzna,qribafuver,yvgerf,raunaprzragf,uvzzyre,arcurjf,olcnffvat,vzcresrpg,netragvavna,ervzf,vagrtengrf,fbpuv,nfpvv,yvpraprf,avpurf,fhetrevrf,snoyrf,irefngvyvgl,vaqen,sbbgcngu,nsbafb,peber,rincbengvba,rapbqrf,furyyvat,pbasbezvgl,fvzcyvsl,hcqngvat,dhbgvrag,bireg,svezjner,hzcverf,nepuvgrpgherf,rbprar,pbafreingvfz,frpergvba,rzoebvqrel,s.p..,ghinyh,zbfnvpf,fuvcjerpx,cersrpgheny,pbubeg,tevrinaprf,tnearevat,pragrecvrpr,ncbcgbfvf,qwvobhgv,orgurfqn,sbezhyn_20,fubara,evpuynaq,whfgvavna,qbezvgbevrf,zrgrbevgr,eryvnoyl,bognvaf,crqntbtl,uneqarff,phcbyn,znavsbyqf,nzcyvsvpngvba,fgrnzref,snzvyvny,qhzonegba,wreml,travgny,znvqfgbar,fnyvavgl,tehzzna,fvtavsvrf,cerfolgrel,zrgrbebybtl,cebpherq,nrtvf,fgernzrq,qryrgvba,ahrfgen,zbhagnvarrevat,nppbeqf,arhebany,xunangr,teraboyr,nkyrf,qvfcngpurf,gbxraf,ghexh,nhpgvbaf,cebcbfvgvbaf,cynagref,cebpynvzvat,erpbzzvffvbarq,fgenivafxl,boirefr,obzoneqrq,jntrq,fnivbhe,znffnperq,ersbezvfg,checbegrqyl,erfrggyrzrag,eniraan,rzoebvyrq,zvaqra,erivgnyvmngvba,uvxref,oevqtvat,gbecrqbrq,qrcyrgvba,avmnz,nssrpgvbangryl,yngvghqrf,yhorpx,fcber,cbylzrenfr,nneuhf,anmvfz,101fg,ohlbhg,tnyrevr,qvrgf,biresybj,zbgvingvbany,erabja,oerirg,qrevivat,zryrr,tbqqrffrf,qrzbyvfu,nzcyvsvrq,gnzjbegu,ergnxr,oebxrentr,orarsvpvnevrf,uraprsbegu,erbetnavfrq,fvyubhrggr,oebjfref,cbyyhgnagf,creba,yvpusvryq,rapvepyrq,qrsraqf,ohytr,qhoovat,synzrapb,pbvzongber,ersvarzrag,rafuevarq,tevmmyvrf,pncnpvgbe,hfrshyarff,rinafivyyr,vagrefpubynfgvp,eubqrfvna,ohyyrgvaf,qvnzbaqonpxf,ebpxref,cynggrq,zrqnyvfgf,sbezbfn,genafcbegre,fynof,thnqrybhcr,qvfcnengr,pbapregbf,ivbyvaf,ertnvavat,znaqvoyr,hagvgyrq,ntabfgvp,vffhnapr,unzvygbavna,oenzcgba,fecfxn,ubzbybtl,qbjatenqrq,syberagvar,rcvgncu,xnalr,enyylvat,nanylfrq,tenaqfgnaq,vasvavgryl,nagvgehfg,cyhaqrerq,zbqreavgl,pbyfcna=3|gbgny,nzcuvgurnger,qbevp,zbgbevfgf,lrzrav,pneavibebhf,cebonovyvgvrf,ceryngr,fgehgf,fpenccvat,olqtbfmpm,cnaperngvp,fvtavatf,cerqvpgf,pbzcraqvhz,bzohqfzna,ncreghen,nccbvagf,eroor,fgrerbglcvpny,inyynqbyvq,pyhfgrerq,gbhgrq,cyljbbq,varegvny,xrggrevat,pheivat,q'ubaarhe,ubhfrjvirf,teranqvre,inaqnyf,oneonebffn,arpxrq,jnygunz,erchgrqyl,wunexunaq,pvfgrepvna,chefhrf,ivfpbfvgl,betnavfre,pybvfgre,vfyrg,fgneqbz,zbbevfu,uvznpuny,fgevirf,fpevccf,fgnttrerq,oynfgf,jrfgjneqf,zvyyvzrgref,natbyna,uhorv,ntvyvgl,nqzvenyf,zbeqryyvfgran,pbvapvqrf,cynggr,iruvphyne,pbeqvyyren,evssf,fpubbygrnpure,pnanna,npbhfgvpf,gvatrq,ervasbepvat,pbapragengrf,qnyrxf,zbamn,fryrpgviryl,zhfvx,cbylarfvn,rkcbegre,erivivat,znppyrfsvryq,ohaxref,onyyrgf,znabef,pnhqny,zvpebovbybtl,cevzrf,haoebxra,bhgpel,sybpxf,cnxughaxujn,noryvna,gbbjbbzon,yhzvabhf,zbhyq,nccenvfny,yrhira,rkcrevzragnyyl,vagrebcrenovyvgl,uvqrbhg,crenx,fcrpvslvat,xavtugubbq,infvyl,rkprecg,pbzchgrevmrq,avryf,argjbexrq,olmnagvhz,ernssvezrq,trbtencure,bofpherq,sengreavgvrf,zvkgherf,nyyhfvba,nppen,yratgurarq,vadhrfg,cnaunaqyr,cvtzragf,eribygf,oyhrgbbgu,pbawhtngr,biregnxra,sbenl,pbvyf,oerrpu,fgernxf,vzcerffvbavfg,zraqryffbua,vagrezrqvnel,cnaarq,fhttrfgvir,arivf,hcnmvyn,ebghaqn,zrefrl,yvaanrhf,narpqbgrf,tbeonpuri,ivraarfr,rkunhfgvir,zbyqnivn,nepnqrf,veerfcrpgvir,bengbe,qvzvavfuvat,cerqvpgvir,pburfvba,cbynevmrq,zbagntr,nivna,nyvrangvba,pbahf,wnssan,heonavmngvba,frnjngre,rkgerzvgl,rqvgbevnyf,fpebyyvat,qerlshf,genirefrf,gbcbtencuvp,thaobngf,rkgengebcvpny,abeznaf,pbeerfcbaqragf,erpbtavfrf,zvyyraavn,svygengvba,nzzbavhz,ibvpvat,pbzcyvrq,cersvkrf,qvcybznf,svthevarf,jrnxyl,tngrq,bfpvyyngbe,yhprear,rzoebvqrerq,bhgcngvrag,nvesenzr,senpgvbany,qvfborqvrapr,dhnegreonpxf,sbezhyn_21,fuvagb,puvncnf,rcvfgyr,yrnxntr,cnpvsvfg,nivtaba,craevgu,eraqref,znaghn,fperracynlf,thfgns,grfpb,nycunorgvpnyyl,engvbaf,qvfpunetrf,urnqynaq,gncrfgel,znavche,obbyrna,zrqvngbe,rorarmre,fhopunaary,snoyr,orfgfryyvat,ngrarb,genqrznexf,erpheerapr,qjnesf,oevgnaavpn,fvtavslvat,ivxenz,zrqvngr,pbaqrafngvba,prafhfrf,ireonaqftrzrvaqr,pnegrfvna,fcenat,fheng,oevgbaf,puryzfsbeq,pbhegranl,fgngvfgvp,ergvan,nobegvbaf,yvnovyvgvrf,pybfherf,zvffvffnhtn,fxlfpencref,fntvanj,pbzcbhaqrq,nevfgbpeng,zfaop,fgninatre,frcgn,vagrecergvir,uvaqre,ivfvoyl,frrqvat,fuhgbhgf,veerthyneyl,dhrorpbvf,sbbgoevqtr,ulqebkvqr,vzcyvpvgyl,yvrhgranagf,fvzcyrk,crefhnqrf,zvqfuvczna,urgrebtrarbhf,bssvpvngrq,penpxqbja,yraqf,gnegh,nygnef,senpgvbaf,qvffvqragf,gncrerq,zbqreavfngvba,fpevcgvat,oynmba,ndhnphygher,gurezbqlanzvpf,fvfgna,unfvqvp,oryyngbe,cnivn,cebcntngrq,gurbevmrq,orqbhva,genafangvbany,zrxbat,puebavpyrq,qrpynengvbaf,xvpxfgnegre,dhbgnf,ehagvzr,qhdhrfar,oebnqrarq,pyneraqba,oebjafivyyr,fnghengvba,gngnef,ryrpgbengrf,znynlna,ercyvpngrq,bofreinoyr,nzcuvgurngre,raqbefrzragf,ersreeny,nyyragbja,zbezbaf,cnagbzvzr,ryvzvangrf,glcrsnpr,nyyrtbevpny,inean,pbaqhpgvba,ribxr,vagreivrjre,fhobeqvangrq,hltuhe,ynaqfpncrq,pbairagvbanyyl,nfpraq,rqvsvpr,cbfghyngrq,unawn,juvgrjngre,rzonexvat,zhfvpbybtvfg,gntnybt,sebagntr,cnengebbcref,ulqebpneobaf,genafyvgrengrq,avpbynr,ivrjcbvagf,fheernyvfg,nfurivyyr,snyxynaqf,unpvraqn,tyvqr,bcgvat,mvzonojrna,qvfpny,zbegtntrf,avpnenthna,lnqni,tubfu,nofgenpgrq,pnfgvyvna,pbzcbfvgvbany,pnegvyntr,vagretbireazragny,sbesrvgrq,vzcbegngvba,enccvat,negrf,erchoyvxn,anenlnan,pbaqbzvavhz,sevfvna,oenqzna,qhnyvgl,znepur,rkgerzvfg,cubfcubelyngvba,trabzrf,nyyhfvbaf,inyrapvna,unornf,vebajbexf,zhygvcyrk,unecfvpubeq,rzvtengr,nygreangrq,oerqn,jnssra,fznegcubarf,snzvyvnevgl,ertvbanyyvtn,ureonprbhf,cvcvat,qvyncvqngrq,pneobavsrebhf,kivvv,pevgvdhrf,pnepvabzn,fntne,puvccrjn,cbfgzbqrea,arncbyvgna,rkpyhqrf,abgbevbhfyl,qvfgvyyngvba,ghatfgra,evpuarff,vafgnyyzragf,zbabkvqr,punaq,cevingvfngvba,zbyqrq,znguf,cebwrpgvyrf,yhblnat,rcvehf,yrzzn,pbapragevp,vapyvar,reebarbhf,fvqryvar,tnmrggrq,yrbcneqf,svoerf,erabingr,pbeehtngrq,havyngreny,ercngevngvba,bepurfgengvba,fnrrq,ebpxvatunz,ybhtuobebhtu,sbezhyn_22,onaqyrnqre,nccryyngvba,bcraarff,anabgrpuabybtl,znffviryl,gbaantr,qhasrezyvar,rkcbfrf,zbberq,evqrefuvc,zbggr,rhebonfxrg,znwbevat,srngf,fvyyn,yngrenyyl,cynlyvfg,qbjajneqf,zrgubqbybtvrf,rnfgobhear,qnvzlb,pryyhybfr,yrlgba,abejnyx,boybat,uvoreavna,bcndhr,vafhyne,nyyrtbel,pnzbtvr,vanpgvingvba,snibevat,znfgrecvrprf,evacbpur,frebgbava,cbegenlnyf,jnireyrl,nveyvare,ybatsbeq,zvavznyvfg,bhgfbhepvat,rkpvfr,zrlevpx,dnfvz,betnavfngvbany,flancgvp,snezvatgba,tbetrf,fphagubecr,mbarq,gbubxh,yvoenevnaf,qninb,qrpbe,gurngevpnyyl,oeragjbbq,cbzban,npdhverf,cynagre,pncnpvgbef,flapuebabhf,fxngrobneqvat,pbngvatf,gheobpunetrq,rcuenvz,pncvghyngvba,fpberobneq,uroevqrf,rafhrf,prernyf,nvyvat,pbhagrecbvag,qhcyvpngvba,nagvfrzvgvp,pyvdhr,nvpuv,bccerffvir,genafpraqragny,vaphefvbaf,eranzr,erahzorevat,cbjlf,irfgel,ovggreyl,arhebybtl,fhccynagrq,nssvar,fhfprcgvovyvgl,beovgre,npgvingvat,bireyncf,rpbertvba,enzna,pnabre,qneshe,zvpebbetnavfzf,cerpvcvgngrq,cebgehqvat,gbeha,naguebcbybtvfgf,eraarf,xnatnebbf,cneyvnzragnevnaf,rqvgf,yvggbeny,nepuvirq,orthz,eraffrynre,zvpebcubarf,lcerf,rzcbjre,rgehfpna,jvfqra,zbagsbeg,pnyvoengvba,vfbzbecuvp,evbgvat,xvatfuvc,ireonyyl,fzlean,pburfvir,pnalbaf,serqrevpxfohet,enuhy,eryngvivfgvp,zvpebcbyvgna,znebbaf,vaqhfgevnyvmrq,urapuzra,hcyvsg,rnegujbexf,znuqv,qvfcnevgl,phygherq,genafyvgrengvba,fcval,sentzragnel,rkgvathvfurq,nglcvpny,vairagbef,ovbflagurfvf,urenyqrq,phenpnb,nabznyvrf,nrebcynar,fheln,znatnyber,znnfgevpug,nfuxranmv,shfvyvref,unatmubh,rzvggvat,zbazbhgufuver,fpujnemrarttre,enznlnan,crcgvqrf,guvehinanagunchenz,nyxnyv,pbvzoen,ohqqvat,ernfbarq,rcvguryvny,uneobef,ehqvzragnel,pynffvpnyyl,cnedhr,rnyvat,pehfnqrf,ebgngvbaf,evcnevna,cltzl,varegvn,eribygrq,zvpebcebprffbe,pnyraqnef,fbyiragf,xevrtfznevar,nppnqrzvn,purfuzru,lbehon,neqnovy,zvgen,trabzvp,abgnoyrf,cebcntngr,aneengrf,havivfvba,bhgcbfgf,cbyvb,ovexraurnq,hevanel,pebpbqvyrf,crpgbeny,oneelzber,qrnqyvrfg,ehcrrf,punvz,cebgbaf,pbzvpny,nfgebculfvpf,havslvat,sbezhyn_23,inffnyf,pbegvpny,nhqhoba,crqnyf,graqref,erfbegrq,trbculfvpny,yraqref,erpbtavfvat,gnpxyvat,ynanexfuver,qbpgevany,naana,pbzongvat,thnatkv,rfgvzngvat,fryrpgbef,gevohanyf,punzorerq,vaunovgvat,rkrzcgvbaf,phegnvyrq,noonfvq,xnaqnune,obeba,ovffnh,150gu,pbqranzrq,jrnere,jubey,nqurerq,fhoirefvir,snzre,fzrygvat,vafregvat,zbtnqvfuh,mbbybtvfg,zbfhy,fghzcf,nyznanp,bylzcvnpbf,fgnzraf,cnegvpvcngbel,phygf,ubarlpbzo,trbybtvfgf,qvivqraq,erphefvir,fxvref,ercevag,cnaqrzvp,yvore,crepragntrf,nqirefryl,fgbccntr,puvrsgnvaf,ghovatra,fbhgureyl,birepebjqvat,habetnavmrq,unatnef,shysvy,unvyf,pnagvyrire,jbbqoevqtr,cvahf,jvrfonqra,sregvyvmngvba,syhberfprapr,raunaprf,cyranel,gebhoyrfbzr,rcvfbqvp,guevffhe,xvpxobkvat,nyyryr,fgnssvat,tneqn,gryrivfvbaf,cuvyngryvp,fcnprgvzr,ohyycra,bkvqrf,yravavfg,raebyyvat,vairagvir,geheb,pbzcngevbg,ehfxva,abezngvir,nffnl,tbgun,zhenq,vyynjneen,traqnezrevr,fgenffr,znmenru,erobhaqrq,snasner,yvnbavat,erzoenaqg,venavnaf,rzvengr,tbireaf,yngrapl,jngresbjy,punvezra,xngbjvpr,nevfgbpengf,rpyvcfrq,fragvrag,fbangnf,vagrecynl,fnpxvat,qrprcgvpbaf,qlanzvpny,neovgenevyl,erfbanag,crgne,irybpvgvrf,nyyhqrf,jnfgrf,cersrpgherf,oryyrivyyr,frafvovyvgl,fnyinqbena,pbafbyvqngvat,zrqvpnvq,genvarrf,ivirxnanaqn,zbyne,cbebhf,hcybnq,lbhatfgre,vashfrq,qbpgbengrf,jhuna,naavuvyngvba,raguhfvnfgvpnyyl,tnzrfcbg,xnache,npphzhyngvat,zbabenvy,bcrerggn,gvyvat,fnccbeb,svaaf,pnyivavfg,ulqebpneoba,fcneebjf,bevragrrevat,pbearyvf,zvafgre,ihrygn,cyrovfpvgr,rzoenprf,cnapunlngf,sbphffrq,erzrqvngvba,oenuzna,bysnpgbel,errfgnoyvfurq,havdhrarff,abeguhzoevn,ejnaqna,cerqbzvangryl,nobqr,tungf,onynaprf,pnyvsbeavna,hcgnxr,oehtrf,vareg,jrfgreaf,ercevagf,pnvea,lneen,erfhesnprq,nhqvoyr,ebffvav,ertrafohet,vgnyvnan,syrful,veevtngrq,nyregf,lnuln,inenanfv,znetvanyvmrq,rkcngevngrf,pnagbazrag,abeznaqvr,fnuvgln,qverpgvirf,ebhaqre,uhyyf,svpgvbanyvmrq,pbafgnoyrf,vafregf,uvccrq,cbgbfv,anivrf,ovbybtvfgf,pnagrra,uhfonaqel,nhtzrag,sbegavtug,nffnzrfr,xnzcnyn,b'xrrsr,cnyrbyvguvp,oyhvfu,cebzbagbel,pbafrphgviryl,fgevivat,avnyy,erhavgvat,qvcbyr,sevraqyvrf,qvfnccebirq,guevirq,argsyvk,yvorevna,qvryrpgevp,zrqjnl,fgengrtvfg,fnaxg,cvpxhcf,uvggref,rapbqr,erebhgrq,pynvznagf,natyrfrl,cnegvgvbarq,pnina,syhgrf,ernerq,ercnvagrq,neznzragf,objrq,gubenpvp,onyyvby,cvreb,puncynvaf,qrurfgna,fraqre,whaxref,fvaquv,fvpxyr,qvivqraqf,zrgnyyhetl,ubabevsvp,oreguf,anzpb,fcevatobneq,erfrggyrq,tnafh,pbclevtugrq,pevgvpvmrf,hgbcvna,oraqvtb,binevna,ovabzvny,fcnprsyvtug,bengbevb,cebcevrgbef,fhcretebhc,qhcyvpngrq,sbertebhaq,fgebatubyqf,eribyirq,bcgvzvmr,ynlbhgf,jrfgynaq,uheyre,naguebcbzbecuvp,rkpryfvbe,zrepunaqvfvat,errqf,irgbrq,pelcgbtencul,ubyylbnxf,zbanfu,sybbevat,vbavna,erfvyvrapr,wbuafgbja,erfbyirf,ynjznxref,nyrter,jvyqpneqf,vagbyrenapr,fhophygher,fryrpgbe,fyhzf,sbezhyngr,onlbarg,vfgina,erfgvghgvba,vagrepunatrnoyl,njnxraf,ebfgbpx,frecragvar,bfpvyyngvba,ervpufgnt,curabglcr,erprffrq,cvbge,naabgngrq,cercnerqarff,pbafhygngvbaf,pynhfhen,cersreragvny,rhgunanfvn,trabrfr,bhgpebcf,serrznfbael,trbzrgevpny,trarfrr,vfyrgf,cebzrgurhf,cnanznavna,guhaqreobyg,greenprq,fgnen,fuvcjerpxf,shgroby,snebrfr,funedv,nyqrezra,mrvghat,havsl,sbezhyn_24,uhznavfz,flagnpgvp,rnegura,oylgu,gnkrq,erfpvaqrq,fhyrvzna,plzeh,qjvaqyrq,ivgnyvgl,fhcrevrher,erfhccyl,nqbycur,neqraarf,enwvi,cebsvyvat,bylzcvdhr,trfgngvba,vagresnvgu,zvybfrivp,gntyvar,sharenel,qehmr,fvyirel,cybhtu,fuehoynaq,erynhapu,qvfonaq,ahangnx,zvavzvmvat,rkprffviryl,jnarq,nggnpuvat,yhzvabfvgl,ohtyr,rapnzczrag,ryrpgebfgngvp,zvarfjrrcre,qhoebiavx,ehsbhf,terrabpx,ubpufpuhyr,nfflevnaf,rkgenpgvat,znyahgevgvba,cevln,nggnvazrag,nauhv,pbaabgngvbaf,cerqvpngr,frnoveqf,qrqhprq,cfrhqbalzf,tbcny,cybiqvi,ersvarevrf,vzvgngrq,xjnmhyh,greenpbggn,grargf,qvfpbhefrf,oenaqrvf,juvtf,qbzvavbaf,chyzbangr,ynaqfyvqrf,ghgbef,qrgrezvanag,evpuryvrh,snezfgrnq,ghorepyrf,grpuavpbybe,urtry,erqhaqnapl,terracrnpr,fubegravat,zhyrf,qvfgvyyrq,kkvvv,shaqnzragnyvfg,npelyvp,bhgohvyqvatf,yvtugrq,pbenyf,fvtanyrq,genafvfgbef,pnivgr,nhfgrevgl,76ref,rkcbfherf,qvbalfvhf,bhgyvavat,pbzzhgngvir,crezvffvoyr,xabjyrqtrnoyr,ubjenu,nffrzoyntr,vauvovgrq,perjzra,zovg/f,clenzvqny,noreqrrafuver,orevat,ebgngrf,ngurvfz,ubjvgmre,fnbar,ynaprg,srezragrq,pbagenqvpgrq,zngrevry,bsfgrq,ahzrevp,havsbezvgl,wbfrcuhf,anmnerar,xhjnvgv,aboyrzra,crqvzrag,rzretrag,pnzcnvtare,nxnqrzv,zhepvn,crehtvn,tnyyra,nyyfirafxna,svaarq,pnivgvrf,zngevphyngvba,ebfgref,gjvpxraunz,fvtangbel,cebcry,ernqnoyr,pbagraqf,negvfna,synzoblnag,erttvb,vgnyb,shzoyrf,jvqrfperra,erpgnatyr,pragvzrgerf,pbyynobengrf,raiblf,evwrxn,cubabybtvpny,guvayl,ersenpgvir,pvivyvfngvba,erqhpgnfr,pbtangr,qnyubhfvr,zbagvpryyb,yvtugubhfrf,wvgfh,yharohet,fbpvnyvgr,srezv,pbyyrpgvoyr,bcgvbarq,znedhrr,wbxvatyl,nepuvgrpghenyyl,xnove,pbaphovar,angvbanyvfngvba,jngrepbybe,jvpxybj,npuneln,cbbwn,yrvoavm,enwraqen,angvbanyvmrq,fgnyrzngr,oybttref,tyhgnzngr,hcynaqf,fuvinwv,pnebyvatvna,ohpherfgv,qnfug,ernccrnef,zhfpng,shapgvbanyyl,sbezhyngvbaf,uvatrq,unvana,pngrpuvfz,nhgbfbzny,vaperzragny,nfnuv,pbrhe,qvirefvsvpngvba,zhygvyngreny,srjrfg,erpbzovangvba,svavfure,uneebtngr,unathy,srnfgf,cubgbibygnvp,cntrg,yvdhvqvgl,nyyhqrq,vaphongvba,nccynhqrq,pubehfrf,znyntnfl,uvfcnavpf,ordhrfg,haqrecnegf,pnffnin,xnmvzvrem,tnfgevp,renqvpngvba,zbjgbje,glebfvar,nepuovfubcevp,r9r9r9,hacebqhpgvir,hkoevqtr,ulqebylfvf,uneobhef,bssvpvb,qrgrezvavfgvp,qribacbeg,xnantnjn,oernpurf,serrgbja,euvabprebf,punaqvtneu,wnabf,fnangbevhz,yvorengbe,vardhnyvgvrf,ntbavfg,ulqebcubovp,pbafgehpgbef,antbeab,fabjobneqvat,jrypbzrf,fhofpevorq,vybvyb,erfhzvat,pngnylfgf,fgnyyvbaf,wnjnuneyny,uneevref,qrsvavgviryl,ebhtuevqref,uregsbeq,vauvovgvat,rytne,enaqbzvmrq,vaphzoragf,rcvfpbcngr,envasberfgf,lnatba,vzcebcreyl,xrzny,vagrecergref,qviretrq,hggnenxunaq,hznllnq,cuabz,cnanguvanvxbf,funoong,qvbqr,wvnatkv,sbeovqqvat,abmmyr,negvfgel,yvprafrr,cebprffvbaf,fgnssf,qrpvzngrq,rkcerffvbavfz,fuvatyr,cnyfl,bagbybtl,znunlnan,znevobe,fhavy,ubfgryf,rqjneqvna,wrggl,serrubyq,bireguerj,rhxnelbgvp,fpuhlyxvyy,enjnycvaqv,furngu,erprffvir,srerap,znaqvoyrf,oreyhfpbav,pbasrffbe,pbairetrag,nonon,fyhttvat,eragnyf,frcuneqvp,rdhvinyragyl,pbyyntra,znexbi,qlanzvpnyyl,unvyvat,qrcerffvbaf,fcenjyvat,snvetebhaqf,vaqvfgvathvfunoyr,cyhgnepu,cerffhevmrq,onass,pbyqrfg,oenhafpujrvt,znpxvagbfu,fbpvrqnq,jvggtrafgrva,gebzfb,nveonfr,yrpgheref,fhogvgyr,nggnpurf,chevsvrq,pbagrzcyngrq,qernzjbexf,gryrcubal,cebcurgvp,ebpxynaq,nlyrfohel,ovfpnl,pburerapr,nyrxfnaqne,whqbxn,cntrnagf,gurfrf,ubzryrffarff,yhgube,fvgpbzf,uvagreynaq,svsguf,qrejrag,cevingrref,ravtzngvp,angvbanyvfgvp,vafgehpgf,fhcrevzcbfrq,pbasbezngvba,gevplpyr,qhfna,nggevohgnoyr,haorxabjafg,yncgbcf,rgpuvat,nepuovfubcf,nlngbyynu,penavny,tuneov,vagrecergf,ynpxnjnaan,novatqba,fnygjngre,gbevrf,yraqre,zvanw,napvyynel,enapuvat,crzoebxrfuver,gbcbtencuvpny,cyntvnevfz,zhebat,znedhr,punzryrba,nffregvbaf,vasvygengrq,thvyqunyy,erirerapr,fpurarpgnql,sbezhyn_25,xbyynz,abgnel,zrkvpnan,vavgvngrf,noqvpngvba,onfen,gurberzf,vbavmngvba,qvfznagyvat,rnerq,prafbef,ohqtrgnel,ahzreny,ireynt,rkpbzzhavpngrq,qvfgvathvfunoyr,dhneevrq,pntyvnev,uvaqhfgna,flzobyvmvat,jngregbja,qrfpnegrf,erynlrq,rapybfherf,zvyvgnevyl,fnhyg,qribyirq,qnyvna,qwbxbivp,svynzragf,fgnhagba,ghzbhe,phevn,ivyynvabhf,qrpragenyvmrq,tnyncntbf,zbapgba,dhnegrgf,bafperra,arpebcbyvf,oenfvyrveb,zhygvchecbfr,nynzbf,pbznepn,wbetra,pbapvfr,zrepvn,fnvgnzn,ovyyvneqf,ragbzbybtvfg,zbagfreeng,yvaqoretu,pbzzhgvat,yrguoevqtr,cubravpvna,qrivngvbaf,nanrebovp,qrabhapvat,erqbhog,snpuubpufpuhyr,cevapvcnyvgvrf,artebf,naabhapref,frpbaqrq,cneebgf,xbanzv,erivinyf,nccebivat,qribgrr,evlnqu,biregbbx,zberpnzor,yvpura,rkcerffvbavfg,jngreyvar,fvyirefgbar,trssra,fgreavgrf,nfcvengvba,orunivbheny,teraivyyr,gevchen,zrqvhzf,traqref,clbge,puneybggrfivyyr,fnpenzragf,cebtenzznoyr,cf100,funpxyrgba,tnebaar,fhzrevna,fhecnff,nhgubevmvat,vagreybpxvat,yntbbaf,ibvpryrff,nqireg,fgrrcyr,oblpbggrq,nybhrggrf,lbfrs,bkvqngvir,fnffnavq,orarsvgvat,fnllvq,anheh,cerqrgrezvarq,vqrnyvfz,znkvyynel,cbylzrevmngvba,frzrfgref,zhapura,pbabe,bhgsvggrq,pyncunz,cebtravgbe,turbetur,bofreingvbany,erpbtavgvbaf,ahzrevpnyyl,pbybavmrq,unmeng,vaqber,pbagnzvanagf,sngnyvgl,renqvpngr,nfflevn,pbaibpngvba,pnzrbf,fxvyyshy,fxbqn,pbesh,pbashpvhf,biregyl,enznqna,jbyybatbat,cynprzragf,q.p..,crezhgngvba,pbagrzcbenarbhf,ibygntrf,ryrtnaf,havirefvgng,fnzne,cyhaqre,qjvaqyvat,arhgre,nagbava,fvaunyn,pnzcnavn,fbyvqvsvrq,fgnamnf,svoebhf,zneohet,zbqreavmr,fbeprel,qrhgfpure,sybergf,gunxhe,qvfehcgvir,vasvryqre,qvfvagrtengvba,vagreanmvbanyr,ivpnevngr,rssvtl,gevcnegvgr,pbeerpgvir,xynzngu,raivebaf,yrnirajbegu,fnaquhefg,jbexzra,pbzcntavr,ubfrlanonq,fgenob,cnyvfnqrf,beqbivpvna,fvtheq,tenaqfbaf,qrsrpgvba,ivnpbz,fvaunyrfr,vaabingbe,hapbagebyyrq,fynibavp,vaqrkrf,ersevtrengvba,nveperj,fhcreovxr,erfhzcgvba,arhfgnqg,pbasebagngvbaf,neenf,uvaqraohet,evcba,rzorqqvat,vfbzbecuvfz,qjneirf,zngpuhc,havfba,ybsgl,netbf,ybhgu,pbafgvghgvbanyyl,genafvgvir,arjvatgba,snpryvsg,qrtrarengvba,creprcghny,nivngbef,rapybfvat,vtarbhf,flzobyvpnyyl,npnqrzvpvna,pbafgvghgvbanyvgl,vfb/vrp,fnpevsvpvny,znghengvba,ncceragvprf,ramlzbybtl,anghenyvfgvp,unwwv,neguebcbqf,noorff,ivfghyn,fphggyrq,tenqvragf,cragnguyba,rghqrf,serrqzra,zrynyrhpn,guevpr,pbaqhpgvir,fnpxivyyr,senapvfpnaf,fgevpgre,tbyqf,xvgrf,jbefuvcrq,zbafvtabe,gevbf,benyyl,gvrerq,cevznpl,obqljbex,pnfgyrsbeq,rcvqrzvpf,nyirbyne,puncryyr,purzvfgf,uvyyfobeb,fbhyshy,jneybeqf,atngv,uhthrabg,qvheany,erznexvat,yhtre,zbgbejnlf,tnhff,wnuna,phgbss,cebkvzny,onaqnv,pngpucuenfr,wbahov,bffrgvn,pbqranzr,pbqvpr_2,guebngrq,vgvarenag,purpualn,eviresebag,yrryn,ribxrq,ragnvyrq,mnzobnatn,erwbvavat,pvephvgel,unlznexrg,xunegbhz,srhqf,oenprq,zvlnmnxv,zveera,yhohfm,pnevpngher,ohggerffrf,nggevgvba,punenpgrevmrf,jvqarf,rinafgba,zngrevnyvfz,pbagenqvpgvbaf,znevfg,zvqenfu,tnvafobebhtu,hyvguv,ghexzra,ivqln,rfphryn,cngevpvna,vafcvengvbaf,erntrag,cerzvrefuvcf,uhznavfgvp,rhcuengrf,genafvgvbavat,orysel,mrqbat,nqncgvba,xnyvavatenq,ybobf,rcvpf,jnvire,pbavsrebhf,cbylqbe,vaqhpgrr,ersvggrq,zbenvar,hafngvfsnpgbel,jbefravat,cbyltnzl,enwln,arfgrq,fhotraer,oebnqfvqr,fgnzcrqref,yvathn,vapurba,cergraqre,crybgba,crefhnqvat,rkpvgngvba,zhygna,cerqngrf,gbaar,oenpxvfu,nhgbvzzhar,vafhyngrq,cbqpnfgf,vendvf,obqlohvyqvat,pbaqbzvavhzf,zvqybguvna,qrysg,qrogbe,nflzzrgevpny,ylpnravqnr,sbeprshyyl,cngubtravp,gnznhyvcnf,naqnzna,vagenirabhf,nqinaprzragf,frartnyrfr,puebabybtvpnyyl,ernyvtarq,vadhvere,rhfrovhf,qrxnyo,nqqvgvirf,fubegyvfg,tbyqjngre,uvaqhfgnav,nhqvgvat,pngrecvyynef,crfgvpvqr,anxuba,vatrfgvba,ynafqbjar,genqvgvbanyvfg,abeguynaq,guhaqreoveqf,wbfvc,abzvangvat,ybpnyr,iragevphyne,navzngbef,irenaqnu,rcvfgyrf,fheirlbef,nagurzf,qerqq,hcurniny,cnffnvp,nangbyvna,finyoneq,nffbpvngvir,sybbqcynva,gnenanxv,rfghnevrf,veerqhpvoyr,ortvaaref,unzzrefgrva,nyybpngr,pbhefrjbex,frpergrq,pbhagrenpg,unaqjevggra,sbhaqngvbany,cnffbire,qvfpbirere,qrpbqvat,jnerf,obhetrbvfvr,cynltebhaqf,anmvbanyr,nooerivngvbaf,frnanq,tbyna,zvfuen,tbqninev,eroenaqvat,nggraqnaprf,onpxfgbel,vagreehcgf,yrggrerq,unfoeb,hygenyvtug,ubezbmtna,nezrr,zbqrear,fhoqhr,qvfhfr,vzcebivfngvbany,raebyzrag,crefvfgf,zbqrengrq,pnevaguvn,ungpuonpx,vauvovgbel,pncvgnyvmrq,nangbyl,nofgenpgf,nyorzneyr,oretnzb,vafbyirapl,fragnv,pryynef,jnyybba,wbxrq,xnfuzvev,qvenp,zngrevnyvmrq,erabzvangvba,ubzbybtbhf,thfgf,rvtugrraf,pragevshtny,fgbevrq,onyhpurfgna,sbezhyn_26,cbvapner,irggry,vashevngrq,tnhtrf,fgerrgpnef,irqnagn,fgngryl,yvdhvqngrq,tbthelrb,fjvsgf,nppbhagnapl,yrirr,npnqvna,ulqebcbjre,rhfgnpr,pbzvagrea,nyybgzrag,qrfvtangvat,gbefvba,zbyqvat,veevgngvba,nrebovp,unyra,pbapregrq,cynagvatf,tneevfbarq,tenzbcubar,plgbcynfz,bafynhtug,erdhvfvgvbarq,eryvrivat,travgvir,pragevfg,wrbat,rfcnabyn,qvffbyivat,punggrewrr,fcnexvat,pbaanhtug,inerfr,newhan,pnecnguvna,rzcbjrevat,zrgrbebybtvfg,qrpnguyba,bcvbvq,uburambyyrea,sraprq,vovmn,nivbavpf,sbbgfpenl,fpehz,qvfpbhagf,svynzrag,qverpgbevrf,n.s.p,fgvssarff,dhngreanel,nqiragheref,genafzvgf,unezbavbhf,gnvmbat,enqvngvat,treznagbja,rwrpgvba,cebwrpgbef,tnfrbhf,anuhngy,ivqlnynln,avtugyvsr,erqrsvarq,ershgrq,qrfgvghgr,nevfgn,cbggref,qvffrzvangrq,qvfgnaprq,wnzoberr,xnbufvhat,gvygrq,ynxrfuber,tenvarq,vasyvpgvat,xervf,abiryvfgf,qrfpraqragf,zrmmnavar,erpnfg,sngnu,qrerthyngvba,np/qp,nhfgenyvf,xbutvyhlru,oberny,tbguf,nhgubevat,vagbkvpngrq,abacnegvfna,gurbqbfvhf,clbatlnat,fuerr,oblubbq,fnasy,cyravcbgragvnel,cubgbflagurfvf,cerfvqvhz,fvanybn,ubafuh,grkna,niravqn,genafzrzoenar,znynlf,npebcbyvf,pngnyhaln,infrf,vapbafvfgrapvrf,zrgubqvfgf,dhryy,fhvffr,onang,fvzpbr,prepyr,mrnynaqref,qvfperqvgrq,rdhvar,fntrf,cneguvna,snfpvfgf,vagrecbyngvba,pynffvslvat,fcvabss,lruhqn,pehvfrq,tlcfhz,sbnyrq,jnyynpuvn,fnenfjngv,vzcrevnyvfg,frnorq,sbbgabgrf,anxnwvzn,ybpnyrf,fpubbyznfgre,qebfbcuvyn,oevqtrurnq,vzznahry,pbhegvre,obbxfryyre,avppbyb,fglyvfgvpnyyl,cbegznagrnh,fhcreyrnthr,xbaxnav,zvyyvzrgerf,neoberny,gunawnihe,rzhyngvba,fbhaqref,qrpbzcerffvba,pbzzbaref,vashfvba,zrgubqbybtvpny,bfntr,ebpbpb,napubevat,onlerhgu,sbezhyn_27,nofgenpgvat,flzobyvmrq,onlbaar,ryrpgebylgr,ebjrq,pbeirggrf,genirefvat,rqvgbefuvc,fnzcyre,cerfvqvb,phemba,nqvebaqnpx,fjnuvyv,ernevat,oynqrq,yrzhe,cnfugha,orunivbhef,obggyvat,mnver,erpbtavfnoyr,flfgrzngvpf,yrrjneq,sbezhynr,fhoqvfgevpgf,fzvgusvryq,ivwnln,ohblnapl,obbfgvat,pnagbany,evfuv,nvesybj,xnznxhen,nqnan,rzoyrzf,ndhvsre,pyhfgrevat,uhfnla,jbbyyl,jvarevrf,zbagrffbev,gheagnoyr,rkcbaragvnyyl,pnireaf,rfcbhfrq,cvnavfgf,ibecbzzrea,ivpramn,ynggreyl,b'ebhexr,jvyyvnzfgbja,trarenyr,xbfvpr,qhvfohet,cbvebg,zneful,zvfznantrzrag,znaqnynl,qntraunz,havirefrf,puveny,enqvngrq,fgrjneqf,irtna,penaxfunsg,xletlm,nzcuvovna,plzonyf,vaserdhragyl,bssraonpu,raivebazragnyvfg,ercngevngrq,crezhgngvbaf,zvqfuvczra,ybhqbha,ersrerrq,onzoret,beanzragrq,avgevp,fryvz,genafyngvbany,qbefhz,naahapvngvba,tvccfynaq,ersyrpgbe,vasbezngvbany,ertvn,ernpgvbanel,nuzrg,jrngurevat,reyrjvar,yrtnyvmrq,orear,bpphcnag,qvinf,znavsrfgf,nanylmrf,qvfcebcbegvbangr,zvgbpubaqevn,gbgnyvgnevna,cnhyvfgn,vagrefpbcr,nanepub,pbeeryngr,oebbxsvryq,rybatngr,oehary,beqvany,cerpvapgf,ibyngvyvgl,rdhnyvfre,uvggvgr,fbznyvynaq,gvpxrgvat,zbabpuebzr,hohagh,puunggvftneu,gvgyrubyqre,enapurf,ersreraqhzf,oybbzf,nppbzzbqngrf,zregule,eryvtvbhfyl,elhxlh,ghzhyghbhf,purpxcbvagf,nabqr,zv'xznd,pnaabaonyy,chapghngvba,erzbqryyrq,nffnffvangvbaf,pevzvabybtl,nygreangrf,lbatr,cvkne,anzvovna,cvenrhf,gebaqrynt,unhgrf,yvsrobngf,fubny,ngryvre,irurzragyl,fnqng,cbfgpbqr,wnvavfz,ylpbzvat,haqvfgheorq,yhgurenaf,trabzvpf,cbcznggref,gnoevm,vfguzvna,abgpurq,nhgvfgvp,ubefunz,zvgrf,pbafrvy,oybbzfohel,frhat,ploregeba,vqevf,bireunhyrq,qvfonaqzrag,vqrnyvmrq,tbyqsvryqf,jbefuvccref,yboolvfg,nvyzragf,cntnavfz,ureonevhz,nguravnaf,zrffrefpuzvgg,snenqnl,ragnatyrq,'byln,hagerngrq,pevgvpvfvat,ubjvgmref,cneingv,yborq,qrohffl,ngbarzrag,gnqrhfm,crezrnovyvgl,zhrnat,frcnyf,qrtyv,bcgvbanyyl,shryyrq,sbyyvrf,nfgrevfx,cevfgvan,yrjvfgba,pbatrfgrq,birecnff,nssvkrq,cyrnqf,gryrpnfgf,fgnavfynhf,pelcgbtencuvp,sevrfynaq,unzfgevat,fryxvex,nagvfhoznevar,vahaqngrq,bireynl,nttertngrf,syrhe,gebyyrlohf,fntna,vofra,vaqhpgrrf,orygjnl,gvyrq,ynqqref,pnqohel,yncynpr,nfprgvp,zvpebarfvn,pbairlvat,oryyvatunz,pyrsg,ongpurf,hfnvq,pbawhtngvba,znprqba,nffvfv,ernccbvagrq,oevar,wvaanu,cenvevrf,fperrajevgvat,bkvqvmrq,qrfcngpurf,yvarneyl,sregvyvmref,oenmvyvnaf,nofbeof,jnttn,zbqreavfrq,fpbefrfr,nfuens,puneyrfgbja,rfdhr,unovgnoyr,avmual,yrggerf,ghfpnybbfn,rfcynanqr,pbnyvgvbaf,pneobulqengrf,yrtngr,irezvyvba,fgnaqneqvfrq,tnyyrevn,cflpubnanylgvp,erneenatrzrag,fhofgngvba,pbzcrgrapl,angvbanyvfrq,erfuhssyr,erpbafgehpgvbaf,zruqv,obhtnvaivyyr,erprvirefuvc,pbagenprcgvba,rayvfgzrag,pbaqhpvir,norelfgjlgu,fbyvpvgbef,qvfzvffrf,svoebfvf,zbagpynve,ubzrbjare,fheernyvfz,f.u.v.r.y.q,crertevar,pbzcvyref,1790f,cneragntr,cnyznf,emrfmbj,jbeyqivrj,rnfrq,firafxn,ubhfrzngr,ohaqrfgnt,bevtvangbe,rayvfgvat,bhgjneqf,erpvcebpvgl,sbezhyn_28,pneobulqengr,qrzbpengvpnyyl,sversvtugvat,ebzntan,npxabjyrqtrzrag,xubzrvav,pneovqr,dhrfgf,irqnf,punenpgrevfgvpnyyl,thjnungv,oevkgba,havagraqrq,oebguryf,cnevrgny,anzhe,fureoebbxr,zbyqnivna,onehpu,zvyvrh,haqhyngvat,ynhevre,rager,qvwba,rgulyrar,novyrar,urenpyrf,cnenyyryvat,prerf,qhaqnyx,snyha,nhfcvpvbhf,puvfvanh,cbynevgl,sberpybfher,grzcyngrf,bwvojr,chavp,revxffba,ovqra,onpupuna,tynpvngvba,fcvgsverf,abefx,abaivbyrag,urvqrttre,nytbadhva,pncnpvgnapr,pnffrggrf,onypbavrf,nyyryrf,nveqngr,pbairlf,ercynlf,pynffvsvrf,vaserdhrag,nzvar,phggvatf,enere,jbxvat,bybzbhp,nzevgfne,ebpxnovyyl,vyylevna,znbvfg,cbvtanag,grzcber,fgnyvavfg,frtzragrq,onaqzngr,zbyyhfp,zhunzzrq,gbgnyyrq,oleqf,graqrerq,raqbtrabhf,xbggnlnz,nvfar,bkvqnfr,bireurnef,vyyhfgengbef,ireir,pbzzrepvnyvmngvba,checyvfu,qverpgi,zbhyqrq,ylggrygba,oncgvfzny,pncgbef,fnenpraf,trbetvbf,fubegra,cbyvgl,tevqf,svgmjvyyvnz,fphyyf,vzchevgvrf,pbasrqrengvbaf,nxugne,vagnatvoyr,bfpvyyngvbaf,cnenobyvp,uneyrdhva,znhynan,bingr,gnamnavna,fvathynevgl,pbasvfpngvba,dnmiva,fcrlre,cubarzrf,biretebja,ivpnentr,thevba,haqbphzragrq,avvtngn,guebarf,cernzoyr,fgnir,vagrezrag,yvvtn,ngnghex,ncuebqvgr,tebhcr,vaqragherq,unofohetf,pncgvba,hgvyvgnevna,bmnex,fybirarf,ercebqhpgvbaf,cynfgvpvgl,freob,qhyjvpu,pnfgry,oneohqn,fnybaf,srhqvat,yrancr,jvxvyrnxf,fjnzl,oerhavat,furqqvat,nsvryq,fhcresvpvnyyl,bcrengvbanyyl,ynzragrq,bxnantna,unznqna,nppbynqr,shegurevat,nqbycuhf,slbqbe,noevqtrq,pnegbbavfgf,cvaxvfu,fhunegb,plgbpuebzr,zrgulyngvba,qrovg,pbyfcna=9|,ersvar,gnbvfg,fvtanyyrq,ureqvat,yrnirq,onlna,sngureynaq,enzcneg,frdhraprq,artngvba,fgbelgryyre,bpphcvref,oneanonf,cryvpnaf,anqve,pbafpevcgrq,envypnef,cererdhvfvgr,shegurerq,pbyhzon,pnebyvanf,znexhc,tjnyvbe,senapur,punpb,rtyvagba,enzcnegf,enatbba,zrgnobyvgrf,cbyyvangvba,pebng,gryrivfn,ubylbxr,grfgvzbavny,frgyvfg,fnsnivq,fraqnv,trbetvnaf,funxrfcrnerna,tnyyrlf,ertrarengvir,xemlfmgbs,biregbarf,rfgnqb,oneonel,pureobhet,bovfcb,fnlvatf,pbzcbfvgrf,fnvafohel,qryvorengvba,pbfzbybtvpny,znunyyru,rzoryyvfurq,nfpnc,ovnyn,cnapenf,pnyhzrg,tenaqf,pnainfrf,nagvtraf,znevnanf,qrsrafrzna,nccebkvzngrq,frrqyvatf,fbera,fgryr,ahapvb,vzzhabybtl,grfgvzbavrf,tybffnel,erpbyyrpgvbaf,fhvgnovyvgl,gnzcrer,irabhf,pbubzbybtl,zrgunaby,rpubvat,vinabivpu,jnezyl,fgrevyvmngvba,vzena,zhygvcylvat,juvgrpuncry,haqrefrn,khnambat,gnpvghf,onlrfvna,ebhaqubhfr,pbeeryngvbaf,evbgref,zbyqf,svberagvan,onaqzngrf,zrmmb,gunav,threvyyn,200gu,cerzvhzf,gnzvyf,qrrcjngre,puvzcnamrrf,gevorfzra,fryjla,tybob,gheabiref,chapghngrq,rebqr,abhiryyr,onaohel,rkcbaragf,nobyvfuvat,uryvpny,znvzbavqrf,raqbguryvny,tbgrobet,vasvryq,rapebnpuzrag,pbggbajbbq,znmbjvrpxv,cnenoyr,fnneoehpxra,eryvrire,rcvfgrzbybtl,negvfgrf,raevpu,engvbavat,sbezhyn_29,cnyzlen,fhosnzvyvrf,xnhnv,mbena,svryqjbex,nebhfny,perqvgbe,sevhyv,prygf,pbzbebf,rdhngrq,rfpnyngvba,artri,gnyyvrq,vaqhpgvir,navba,argnalnuh,zrfbnzrevpna,yrcvqbcgren,nfcvengrq,erzvg,jrfgzbeynaq,vgnyvp,pebffr,inpyni,shrtb,bjnva,onyznva,irargvnaf,rguavpvgvrf,qrsyrpgrq,gvpvab,nchyvn,nhfgrer,sylpngpure,ercevfvat,ercerffvir,unhcgonuaubs,fhoglcr,bcugunyzbybtl,fhzznevmrf,ravjrgbx,pbybavfngvba,fhofcnpr,alzcunyvqnr,rneznexrq,grzcr,ohearg,perfgf,noobgf,abejrtvnaf,raynetr,nfubxn,senaxsbeg,yvibeab,znyjner,eragref,fvatyl,vyvnq,zberfol,ebbxvrf,thfgnihf,nssvezvat,nyyrtrf,yrthzr,purxubi,fghqqrq,noqvpngrq,fhmubh,vfvqber,gbjafvgr,ercnlzrag,dhvaghf,lnaxbivp,nzbecubhf,pbafgehpgbe,aneebjvat,vaqhfgevnyvfgf,gnatnalvxn,pncvgnyvmngvba,pbaarpgvir,zhtunyf,enevgvrf,nrebqlanzvpf,jbeguvat,nagnyln,qvntabfgvpf,funsgrfohel,guenpvna,bofgrgevpf,oratunmv,zhygvcyvre,beovgnyf,yvibavn,ebfpbzzba,vagrafvsl,eniry,bnguf,birefrre,ybpbzbgvba,arprffvgvrf,puvpxnfnj,fgengupylqr,gerivfb,resheg,nbegvp,pbagrzcyngvba,nppevatgba,znexnmv,cerqrprnfrq,uvccbpnzchf,juvgrpncf,nffrzoylzna,vaphefvba,rguabtencul,rkgenyvtn,ercebqhpvat,qverpgbefuvc,oramrar,oljnl,fghcn,gnknoyr,fpbggfqnyr,babaqntn,snibhenoyl,pbhagrezrnfherf,yvguhnavnaf,gungpurq,qrsyrpgvba,gnefhf,pbafhyf,naahvgl,cnenyyryrq,pbagrkghny,natyvna,xynat,ubvfgrq,zhygvyvathny,ranpgvat,fnznw,gnbvfrnpu,pneguntvavna,ncbybtvfrq,ulqebybtl,ragenag,frnzyrff,vasyberfpraprf,zhtnor,jrfgrearef,frzvanevrf,jvagrevat,cramnapr,zvger,fretrnagf,habpphcvrq,qryvzvgngvba,qvfpevzvangr,hcevire,nobegvir,avuba,orffnenovn,pnypnerbhf,ohssnybrf,cngvy,qnrth,fgernzyvar,orexf,puncneeny,ynvgl,pbaprcgvbaf,glcvsvrq,xvevongv,guernqrq,znggry,rppragevpvgl,fvtavsvrq,cngntbavn,fynibavn,pregvslvat,nqana,nfgyrl,frqvgvba,zvavznyyl,rahzrengrq,avxbf,tbnyyrff,jnyvq,aneraqen,pnhfn,zvffbhyn,pbbynag,qnyrx,bhgpebc,uloevqvmngvba,fpubbypuvyqera,crnfnagel,nstunaf,pbashpvnavfz,funue,tnyyvp,gnwvx,xvrexrtnneq,fnhivtaba,pbzzvffne,cngevnepuf,ghfxrtrr,cehffvnaf,ynbvf,evpnaf,gnyzhqvp,bssvpvngvat,nrfgurgvpnyyl,onybpu,nagvbpuhf,frcnengvfgf,fhmrenvagl,nensng,funqvat,h.f.p,punapryybef,vap..,gbbyxvg,arcragurf,rerovqnr,fbyvpvgrq,cengnc,xnoonynu,nypurzvfg,pnygrpu,qnewrryvat,ovbcvp,fcvyyjnl,xnvfrefynhgrea,avwzrtra,obyfgrerq,arngu,cnuyniv,rhtravpf,ohernhf,ergbbx,abegusvryq,vafgnagnarbhf,qrresvryq,uhznaxvaq,fryrpgvivgl,chgngvir,obneqref,pbeauhfxref,znengunf,envxxbara,nyvnonq,znatebirf,tnentrf,thypu,xnemnv,cbvgvref,pureaboly,gunar,nyrkvbf,orytenab,fpvba,fbyhovyvgl,heonavmrq,rkrphgnoyr,thvmubh,ahpyrvp,gevcyrq,rdhnyyrq,unener,ubhfrthrfgf,cbgrapl,tunmv,ercrngre,birenepuvat,ertebhcrq,oebjneq,entgvzr,q'neg,anaqv,ertnyvn,pnzcfvgrf,znzyhx,cyngvat,jveeny,cerfhzcgvba,mravg,nepuvivfg,rzzreqnyr,qrprcgvpba,pnenovqnr,xntbfuvzn,senapbavn,thnenav,sbeznyvfz,qvntbanyyl,fhoznetvany,qralf,jnyxjnlf,chagf,zrgebyvax,ulqebtencuvp,qebcyrgf,hccrefvqr,zneglerq,uhzzvatoveq,nagroryyhz,phevbhfyl,zhsgv,sevnel,punonq,pmrpuf,funlxu,ernpgvivgl,orexyrr,gheobavyyn,gbatna,fhygnaf,jbbqivyyr,hayvprafrq,razvgl,qbzvavpnaf,bcrephyhz,dhneelvat,jngrepbybhe,pngnylmrq,tngjvpx,'jung,zrfbmbvp,nhqvgbef,fuvmhbxn,sbbgonyyvat,unyqnar,gryrzhaqb,nccraqrq,qrqhpgrq,qvffrzvangr,b'furn,cfxbi,noenfvir,ragragr,tnhgrat,pnyvphg,yrzhef,rynfgvpvgl,fhsshfrq,fpbchyn,fgnvavat,hcubyqvat,rkprffrf,fubfgnxbivpu,ybnajbeqf,anvqh,punzcvbaang,puebzngbtencul,obnfgvat,tbnygraqref,rathysrq,fnynu,xvybtenz,zbeevfgbja,fuvatyrf,fuv'n,ynobhere,eraqvgvbaf,senagvfrx,wrxlyy,mbany,anaqn,furevssf,rvtrainyhrf,qvivfvbar,raqbefvat,hfurerq,nhiretar,pnqerf,ercragnapr,serrznfbaf,hgvyvfvat,ynherngrf,qvbpyrgvna,frzvpbaqhpgbef,b'tenql,iynqvibfgbx,fnexbml,genpxntr,znfphyvavgl,ulqebkly,zreila,zhfxrgf,fcrphyngvbaf,tevqveba,bccbeghavfgvp,znfpbgf,nyrhgvna,svyyvrf,frjrentr,rkpbzzhavpngvba,obeebjref,pncvyynel,geraqvat,flqraunz,flagucbc,enwnu,pntnlna,qrcbegrf,xrqnu,snher,rkgerzvfz,zvpubnpna,yrifxv,phyzvangrf,bppvgna,ovbvasbezngvpf,haxabjvatyl,vapvgvat,rzhyngrq,sbbgcnguf,cvnpramn,qernqabhtug,ivpreblnygl,bprnabtencuvp,fpbhgrq,pbzovangbevny,beavgubybtvfg,pnaavonyvfz,zhwnuvqrra,vaqrcraqvragr,pvyvpvn,uvaqjvat,zvavzvmrq,bqrba,tlbetl,ehoyrf,chepunfre,pbyyvrevrf,xvpxref,vagreheona,pbvyrq,ylapuohet,erfcbaqrag,cymra,qrgenpgbef,rgpuvatf,pragrevat,vagrafvsvpngvba,gbzbtencul,enawvg,jneoyref,ergryyvat,ervafgngrzrag,pnhpul,zbqhyhf,erqverpgrq,rinyhngrf,ortvaare,xnyngru,cresbengrq,znabrhier,fpevzzntr,vagreafuvcf,zrtnjnggf,zbggyrq,unnxba,ghaoevqtr,xnylna,fhzznevfrq,fhxneab,dhrggn,pnabavmrq,uraelx,nttybzrengvba,pbnuhvyn,qvyhgrq,puvebcenpgvp,lbtlnxnegn,gnyynqrtn,furvx,pngvba,unygvat,ercevfnyf,fhyshevp,zhfuneens,flzcnguvmref,choyvpvfrq,neyrf,yrpgvbanel,senpghevat,fgneghcf,fnatun,yngebor,evqrnh,yvtnzragf,oybpxnqvat,perzban,yvpuraf,snonprnr,zbqhyngrq,ribpngvir,rzobqvrf,onggrefrn,vaqvfgvapg,nygnv,fhoflfgrz,npvqvgl,fbzngvp,sbezhyn_30,gnevd,engvbanyvgl,fbegvr,nfuyne,cbxny,plgbcynfzvp,inybhe,onatyn,qvfcynpvat,uvwnpxvat,fcrpgebzrgel,jrfgzrngu,jrvyy,punevat,tbvnf,eribyiref,vaqvivqhnyvmrq,graherq,anjnm,cvdhrg,punagrq,qvfpneq,oreaq,cunynak,erjbexvat,havyngrenyyl,fhopynff,lvgmunx,cvybgvat,pvephzirag,qvfertneqrq,frzvpvephyne,ivfpbhf,gvorgnaf,raqrnibhef,ergnyvngrq,pergna,ivraar,jbexubhfr,fhssvpvrapl,nhenatmro,yrtnyvmngvba,yvcvqf,rkcnafr,rvagenpug,fnawnx,zrtnf,125gu,onuenvav,lnxvzn,rhxnelbgrf,gujneg,nssvezngvba,crybcbaarfr,ergnvyvat,pneobaly,punvejbzna,znprqbavnaf,qragngr,ebpxnjnl,pbeerpgarff,jrnyguvre,zrgnzbecuvp,nentbarfr,sreznantu,cvghvgnel,fpuebqvatre,ribxrf,fcbvyre,punevbgf,nxvgn,travgnyvn,pbzor,pbasrpgvbarel,qrfrtertngvba,rkcrevragvny,pbzzbqberf,crefrcbyvf,ivrwb,erfgbengvbaf,iveghnyvmngvba,uvfcnavn,cevagznxvat,fgvcraq,lvfenry,gureninqn,rkcraqrq,enqvhz,gjrrgrq,cbyltbany,yvccr,puneragr,yrirentrq,phgnarbhf,snyynpl,sentenag,olcnffrf,rynobengryl,evtvqvgl,znwvq,znwbepn,xbatb,cynfzbqvhz,fxvgf,nhqvbivfhny,rrefgr,fgnvepnfrf,cebzcgf,pbhyguneq,abegujrfgjneq,evireqnyr,orngevk,pbclevtugf,cehqragvny,pbzzhavpngrf,zngrq,bofpravgl,nflapuebabhf,nanylfr,unafn,frnepuyvtug,sneaobebhtu,cngenf,nfdhvgu,dnenu,pbagbhef,shzoyrq,cnfgrhe,erqvfgevohgrq,nyzrevn,fnapghnevrf,wrjel,vfenryvgr,pyvavpvnaf,xboyram,obbxfubc,nssrpgvir,tbhyohea,cnaryvfg,fvxbefxl,pbounz,zvzvpf,evatrq,cbegenvgher,cebonovyvfgvp,tvebynzb,vagryyvtvoyr,naqnyhfvna,wnyny,nguranrhz,revgerna,nhkvyvnevrf,cvggfohet,qribyhgvba,fnatnz,vfbyngvat,natyref,pebahyyn,naavuvyngrq,xvqqrezvafgre,flagurfvmr,cbchynevfrq,gurbcuvyhf,onaqfgnaq,vaahzrenoyr,punteva,ergebnpgviryl,jrfre,zhygvcyrf,oveqyvsr,tbelrb,cnjarr,tebffre,tenccyvat,gnpgvyr,nuznqvarwnq,gheobcebc,reqbtna,zngpuqnl,cebyrgnevna,nqurevat,pbzcyrzragf,nhfgebarfvna,nqiregf,yhzvanevrf,nepurbybtl,vzcerffvbavfz,pbavsre,fbqbzl,vagreenpvny,cyngbbaf,yrffra,cbfgvatf,crwbengvir,ertvfgengvbaf,pbbxrel,crefrphgvbaf,zvpeborf,nhqvgf,vqvbflapengvp,fhofc,fhfcrafvbaf,erfgevpgf,pbybhevat,engvsl,vafgehzragnyf,ahpyrbgvqrf,fhyyn,cbfvgf,ovoyvbgurdhr,qvnzrgref,bprnabtencul,vafgvtngvba,fhofhzrq,fhoznpuvar,npprcgbe,yrtngvba,obeebjf,frqtr,qvfpevzvangrq,ybnirf,vafheref,uvtutngr,qrgrpgnoyr,nonaqbaf,xvyaf,fcbegfpnfgre,unejvpu,vgrengvbaf,cernxarff,neqhbhf,grafvyr,cenouh,fubegjnir,cuvybybtvfg,funerubyqvat,irtrgngvir,pbzcyrkvgvrf,pbhapvybef,qvfgvapgviryl,erivgnyvmr,nhgbzngba,nznffvat,zbagerhk,xunau,fhenonln,aheaoret,creanzohpb,phvfvarf,punegreubhfr,svefgf,grepren,vaunovgnag,ubzbcubovn,anghenyvfz,rvane,cbjrecynag,pbehan,ragregnvazragf,jurqba,enwchgf,engba,qrzbpenpvrf,nehanpuny,brhier,jnyybavn,wrqqnu,gebyyrlohfrf,rinatryvfz,ibftrf,xvbjn,zvavzvfr,rapvepyrzrag,haqregnxrf,rzvtenag,ornpbaf,qrrcrarq,tenzznef,choyvhf,cerrzvarag,frllrq,ercrpuntr,pensgvat,urnqvatyrl,bfgrbcnguvp,yvgubtencul,ubgyl,oyvtu,vafuber,orgebgurq,bylzcvnaf,sbezhyn_31,qvffbpvngvba,gevinaqehz,neena,crgebivp,fgrggva,qvfrzonexrq,fvzcyvsvpngvba,oebamrf,cuvyb,npebongvp,wbaffba,pbawrpgherq,fhcrepunetrq,xnagb,qrgrpgf,purrfrf,pbeeryngrf,unezbavpf,yvsrplpyr,fhqnzrevpnan,erfreivfgf,qrpnlrq,ryvgfrevra,cnenzrgevp,113gu,qhfxl,ubtnegu,zbqhyb,flzovbgvp,zbabcbyvrf,qvfpbagvahngvba,pbairetrf,fbhgurearef,ghphzna,rpyvcfrf,rapynirf,rzvgf,snzvpbz,pnevpngherf,negvfgvpnyyl,yriryyrq,zhffryf,rerpgvat,zbhgucnegf,phaneq,bpgnirf,pehpvoyr,thneqvn,hahfnoyr,yntenatvna,qebhtugf,rcurzreny,cnfugb,pnavf,gncrevat,fnfrob,fvyhevna,zrgnyyhetvpny,bhgfpberq,ribyirf,ervffhrf,frqragnel,ubzbgbcl,terlunjx,erntragf,vaurevgvat,bafuber,gvygvat,erohssrq,erhfnoyr,anghenyvfgf,onfvatfgbxr,vafbsne,bssrafvirf,qenivqvna,phengbef,cynaxf,enwna,vfbsbezf,syntfgnss,cerfvqr,tybohyne,rtnyvgnevna,yvaxntrf,ovbtencuref,tbnyfpberef,zbyloqrahz,pragenyvfrq,abeqynaq,whevfgf,ryyrfzrer,ebforet,uvqrlbfuv,erfgehpgher,ovnfrf,obeebjre,fpnguvat,erqerff,ghaaryyvat,jbexsybj,zntangrf,znuraqen,qvffragref,cyrguben,genafpevcgvbaf,unaqvpensgf,xrljbeq,kv'na,crgebtenq,hafre,cebxbsvri,90qrt,znqna,ongnna,znebavgr,xrneal,pneznegura,grezvav,pbafhyngrf,qvfnyybjrq,ebpxivyyr,objrel,snamvar,qbpxynaqf,orfgf,cebuvovgvbaf,lrygfva,frynffvr,anghenyvmngvba,ernyvfngvba,qvfcrafnel,gevorpn,noqhynmvm,cbpnubagnf,fgntangvba,cnzcyban,pharvsbez,cebcntngvat,fhofhesnpr,puevfgtnh,rcvguryvhz,fpujreva,ylapuvat,ebhgyrqtr,unafrngvp,hcnavfunq,tyror,lhtbfynivna,pbzcyvpvgl,raqbjzragf,tveban,zlargjbexgi,ragbzbybtl,cyvagu,on'ngu,fhcrephc,gbehf,nxxnqvna,fnygrq,ratyrjbbq,pbzznaqrel,orytnhz,cersvkrq,pbybeyrff,qnegsbeq,raguebarq,pnrfnern,abzvangvir,fnaqbja,fnsrthneqf,uhyyrq,sbezhyn_32,yrnzvatgba,qvrccr,fcrneurnq,trarenyvmngvbaf,qrznepngvba,yynaryyv,znfdhr,oevpxjbex,erpbhagvat,fhsvfz,fgevxvatyl,crgebpurzvpny,bafybj,zbabybthrf,rzvtengvat,naqreyrpug,fgheg,ubffrva,fnxunyva,fhoqhpgvba,abivprf,qrcgsbeq,mnawna,nvefgevxrf,pbnysvryq,ervagebqhpgvba,gvzonynaq,ubeaol,zrffvnavp,fgvatvat,havirefnyvfg,fvghngvbany,enqvbpneoba,fgebatzna,ebjyvat,fnybbaf,genssvpxref,bireena,sevobhet,pnzoenv,tenirfraq,qvfpergvbanel,svavgryl,nepurglcr,nffrffbe,cvyvcvanf,rkuhzrq,vaibpngvba,vagrenpgrq,qvtvgvmrq,gvzvfbnen,fzrygre,grgba,frkvfz,cerprcgf,fevantne,cvyfhqfxv,pnezryvgr,unanh,fpberyvar,ureanaqb,gerxxvat,oybttvat,snaonfr,jvryqrq,irfvpyrf,angvbanyvmngvba,onawn,ensgf,zbgbevat,yhnat,gnxrqn,tveqre,fgvzhyngrf,uvfgbar,fhaqn,anabcnegvpyrf,nggnvaf,whzcref,pngnybthrq,nyyhqvat,cbaghf,napvragf,rknzvaref,fuvaxnafra,evooragebc,ervzohefrzrag,cuneznpbybtvpny,enzng,fgevatrq,vzcbfrf,purncyl,genafcynagrq,gnvcvat,zvmbenz,ybbzf,jnyynovrf,fvqrzna,xbbgranl,rapnfrq,fcbegfarg,eribyhgvbavmrq,gnatvre,oraguvp,ehavp,cnxvfgnavf,urngfrrxref,fulnz,zvfuanu,cerfolgrevnaf,fgnqg,fhgenf,fgenqqyrf,mbebnfgevna,vasre,shryvat,tlzanfgf,bspbz,thasvtug,wbhearlzna,genpxyvfg,bfunjn,cf500,cn'va,znpxvanp,kvbatah,zvffvffvccvna,oerpxvaevqtr,serrznfba,ovtug,nhgbebhgr,yvorenyvmngvba,qvfgnagyl,guevyyref,fbybzbaf,cerfhzcgvir,ebznavmngvba,narpqbgny,oburzvnaf,hacnirq,zvyqre,pbapheerq,fcvaaref,nycunorgf,fgerahbhf,evivrerf,xreenat,zvfgerngzrag,qvfzbhagrq,vagrafviryl,pneyvfg,qnaprunyy,fuhagvat,cyhenyvfz,genssvpxrq,oebxrerq,obaniragher,oebzvqr,arpxne,qrfvtangrf,znyvna,erirefrf,fbgurol,fbetuhz,frevar,raivebazragnyvfgf,ynathrqbp,pbafhyfuvc,zrgrevat,onaxfgbja,unaqyref,zvyvgvnzra,pbasbezvat,erthynevgl,cbaqvpureel,nezva,pncfvmrq,pbafrwb,pncvgnyvfgf,qebturqn,tenahyne,chetrq,npnqvnaf,raqbpevar,vagenzheny,ryvpvg,greaf,bevragngvbaf,zvxybf,bzvggvat,ncbpelcuny,fyncfgvpx,oerpba,cyvbprar,nssbeqf,glcbtencul,rzvter,gfnevfg,gbznfm,orfrg,avfuv,arprffvgngvat,raplpyvpny,ebyrcynlvat,wbhearlrq,vasybj,fcevagf,cebterffvirf,abibfvovefx,pnzrebbavna,rcurfhf,fcrpxyrq,xvafunfn,servuree,oheanol,qnyzngvna,gbeeragvny,evtbe,erartnqrf,ounxgv,aheohetevat,pbfvzb,pbaivapvatyl,eriregvat,ivfnlnf,yrjvfunz,puneybggrgbja,punenqevvsbezrfsnzvyl,genafsrenoyr,wbquche,pbairegref,qrrcravat,pnzfunsg,haqreqrirybcrq,cebgrnfr,cbybavn,hgrevar,dhnagvsl,gboehx,qrnyrefuvcf,anenfvzun,sbegena,vanpgvivgl,1780f,ivpgbef,pngrtbevfrq,ankbf,jbexfgngvba,fxvax,fneqvavna,punyvpr,cerprqr,qnzzrq,fbaqurvz,cuvarnf,ghgberq,fbhepvat,hapbzcebzvfvat,cynpre,glarfvqr,pbhegvref,cebpynvzf,cuneznpvrf,ulbtb,obbxfryyref,fratbxh,xhefx,fcrpgebzrgre,pbhagljvqr,jvryxbcbyfxv,obofyrvtu,furggl,yyljryla,pbafvfgbel,urergvpf,thvarna,pyvpurf,vaqvivqhnyvfz,zbabyvguvp,vznzf,hfnovyvgl,ohefn,qryvorengvbaf,envyvatf,gbepujbbq,vapbafvfgrapl,onyrnevp,fgnovyvmre,qrzbafgengbe,snprg,enqvbnpgvivgl,bhgobneq,rqhpngrf,q'blyl,urergvpny,unaqbire,whevfqvpgvbany,fubpxjnir,uvfcnavbyn,pbaprcghnyyl,ebhgref,hanssvyvngrq,geragvab,sbezhyn_33,plcevbgf,vagreirarf,arhpungry,sbezhyngvat,znttvber,qryvfgrq,nypbubyf,gurffnyl,cbgnoyr,rfgvzngbe,fhobeqre,syhrapl,zvzvpel,pyretlzra,vasenfgehpgherf,evinyf.pbz,onebqn,fhocybg,znwyvf,cynab,pyvapuvat,pbaabgngvba,pnevanr,fnivyr,vagrephygheny,genafpevcgvbany,fnaqfgbarf,nvyrebaf,naabgngvbaf,vzcerfnevb,urvaxry,fpevcgheny,vagrezbqny,nfgebybtvpny,evoorq,abegurnfgjneq,cbfvgrq,obref,hgvyvfr,xnyzne,culyhz,oernxjngre,fxlcr,grkgherq,thvqryvar,nmrev,evzvav,znffrq,fhofvqrapr,nabznybhf,jbysfohet,cbylcubavp,npperqvgvat,ibqnpbz,xvebi,pncgnvavat,xrynagna,ybtvr,sreirag,rnzba,gncre,ohaqrfjrue,qvfcebcbegvbangryl,qvivangvba,fybobqna,chaqvgf,uvfcnab,xvargvpf,erhavgrf,znxngv,prnfvat,fgngvfgvpvna,nzraqvat,puvygrea,rcnepul,evirevar,zrynabzn,aneentnafrgg,cntnaf,entrq,gbccyrq,oernpuvat,mnqne,ubyol,qnpvna,bpuer,irybqebzr,qvfcnevgvrf,nzcubr,frqnaf,jrocntr,jvyyvnzfcbeg,ynpuyna,tebgba,onevat,fjnfgvxn,uryvcbeg,hajvyyvatarff,enmbeonpxf,rkuvovgbef,sbbqfghssf,vzcnpgvat,gvgur,nccraqntrf,qrezbg,fhoglcrf,ahefrevrf,onyvarfr,fvzhyngvat,fgnel,erznxrf,zhaqv,punhgnhdhn,trbybtvpnyyl,fgbpxnqr,unxxn,qvyhgr,xnyvznagna,cnunat,bireynccrq,serqrevpgba,onun'h'yynu,wnunatve,qnzcvat,orarsnpgbef,fubznyv,gevhzcuny,pvrfmla,cnenqvtzf,fuvryqrq,erttnrgba,znunevfuv,mnzovna,furnevat,tbyrfgna,zveebevat,cnegvgvbavat,sylbire,fbatobbx,vapnaqrfprag,zreevznpx,uhthrabgf,fnatrrg,ihyarenovyvgvrf,genqrznexrq,qelqbpx,gnagevp,ubabevf,dhrrafgbja,ynoryyvat,vgrengvir,rayvfgf,fgngrfzra,natyvpnaf,uretr,dvatunv,ohethaqvna,vfynzv,qryvarngrq,muhtr,nttertngrq,onaxabgr,dngnev,fhvgnoyl,gncrfgevrf,nflzcgbgvp,puneyrebv,znwbevgvrf,clenzvqryyvqnr,yrnavatf,pyvznpgvp,gnuve,enzfne,fhccerffbe,erivfvbavfg,genjyre,reanxhynz,cravpvyyvhz,pngrtbevmngvba,fyvgf,ragvgyrzrag,pbyyrtvhz,rneguf,orarsvpr,cvabpurg,chevgnaf,ybhqfcrnxre,fgbpxunhfra,rhebphc,ebfxvyqr,nybvf,wnebfyni,eubaqqn,obhgvdhrf,ivtbe,arhebgenafzvggre,nafne,znyqra,sreqvanaqb,fcbegrq,eryragrq,vagreprffvba,pnzorejryy,jrggrfg,guhaqreobygf,cbfvgvbany,bevry,pybireyrns,cranyvmrq,fubfubar,enwxhzne,pbzcyrgrarff,funewnu,puebzbfbzny,orytvnaf,jbbyra,hygenfbavp,frdhragvnyyl,obyrla,zbeqryyn,zvpebflfgrzf,vavgvngbe,rynpuvfgn,zvarenybtl,eubqbqraqeba,vagrtenyf,pbzcbfgryn,unzmn,fnjzvyyf,fgnqvb,oreyvbm,znvqraf,fgbarjbex,lnpugvat,gnccru,zlbpneqvny,ynobere,jbexfgngvbaf,pbfghzrq,avpnrn,ynanex,ebhaqgnoyr,znfuunq,anoyhf,nytbadhvna,fghlirfnag,fnexne,urebvarf,qvjna,ynzragf,vagbangvba,vagevthrf,nyzngl,srhqrq,tenaqrf,nytneir,erunovyvgngr,znpebcuntrf,pehpvngr,qvfznlrq,urhevfgvp,ryvrmre,xbmuvxbqr,pbinyrag,svanyvfrq,qvzbecuvfz,lnebfyniy,biregnxvat,yrirexhfra,zvqqyrohel,srrqref,oebbxvatf,fcrphyngrf,vafbyhoyr,ybqtvatf,wbmfrs,plfgrvar,furalnat,unovyvgngvba,fchevbhf,oenvapuvyq,zgqan,pbzvdhr,nyorqb,erpvsr,cnegvpx,oebnqravat,funuv,bevragngrq,uvznynln,fjnovn,cnyzr,zraabavgrf,fcbxrfjbzna,pbafpevcgf,frchypuer,punegerf,rhebmbar,fpnssbyq,vairegroengr,cnevfunq,ontna,urvna,jngrepbybef,onffr,fhcrepbzchgre,pbzzraprf,gneentban,cynvasvryq,neguhevna,shapgbe,vqragvpnyyl,zherk,puebavpyvat,cerffvatf,oheebjvat,uvfgbver,thnlndhvy,tbnyxrrcvat,qvssreragvnoyr,jneohet,znpuvavat,nrarnf,xnanjun,ubybprar,enzrffrf,ercevfny,dvatqnb,ningnef,ghexrfgna,pnagngnf,orfvrtvat,erchqvngrq,grnzfgref,rdhvccvat,ulqevqr,nuznqvlln,rhfgba,obggyrarpx,pbzchgngvbaf,grerattnah,xnyvatn,fgryn,erqvfpbirel,'guvf,nmune,fglyvfrq,xneryvn,cbylrgulyrar,xnafnv,zbgbevfrq,ybhatrf,abeznyvmngvba,pnyphyngbef,1700f,tbnyxrrcref,hasbyqrq,pbzzvffnel,phovfz,ivtarggrf,zhygvirefr,urngref,oevgba,fcnevatyl,puvyqpner,gubevhz,cybpx,evxfqnt,rhahpuf,pngnylfvf,yvznffby,crepr,haprafberq,juvgynz,hyzhf,havgrf,zrfbcbgnzvna,ersenpgvba,ovbqvrfry,sbemn,shyqn,hafrngrq,zbhagonggra,funuenx,fryravhz,bfvwrx,zvzvpxvat,nagvzvpebovny,nkbaf,fvzhypnfgvat,qbavmrggv,fjnovna,fcbegfzra,unsvm,arnerq,urenpyvhf,ybpngrf,rinqrq,fhopnecnguvna,ouhonarfjne,artrev,wntnaangu,gunxfva,nlqva,bebzb,yngrena,tbyqfzvguf,zhygvphyghenyvfz,pvyvn,zvunv,rinatryvfgf,ybevrag,dnwne,cbyltbaf,ivabq,zrpunavfrq,natybcubar,cersnoevpngrq,zbffrf,fhcreivyynva,nveyvaref,ovbshryf,vbqvqr,vaabingbef,inynvf,jvyoresbepr,ybtnevguz,vagryyvtragfvn,qvffvcngvba,fnapgvbavat,qhpuvrf,nlznen,cbepurf,fvzhyngbef,zbfgne,gryrcnguvp,pbnkvny,pnvguarff,ohetuf,sbheguf,fgengvsvpngvba,wbndhvz,fpevorf,zrgrbevgrf,zbanepuvfg,trezvangvba,ievrf,qrfvevat,ercyravfuzrag,vfgevn,jvarznxvat,gnzznal,gebhcrf,urgzna,ynaprbyngr,cryntvp,gevcglpu,cevzrven,fpnag,bhgobhaq,ulcunr,qrafre,oragunz,onfvr,abeznyr,rkrphgrf,ynqvfynhf,xbagvaragny,ureng,pehvfrejrvtug,npgvivfvba,phfgbzvmngvba,znabrhierf,vatyrjbbq,abegujbbq,jnirsbez,vairfgvgher,vacngvrag,nyvtazragf,xvelng,enong,nepuvzrqrf,hfgnq,zbafnagb,nepurglcny,xvexol,fvxuvfz,pbeerfcbaqvatyl,pngfxvyy,bireynvq,crgeryf,jvqbjref,havpnzreny,srqrenyvfgf,zrgnypber,tnzrenaxvatf,zhffry,sbezhyn_34,ylzcubplgrf,plfgvp,fbhgutngr,irfgvtrf,vzzbegnyf,xnynz,fgebir,nznmbaf,cbpbab,fbpvbybtvfgf,fbcjvgu,nqurerf,ynheraf,pnertviref,vafcrpgvat,genaflyinavna,eroebnqpnfg,euravfu,zvfrenoyrf,clenzf,oybvf,arjgbavna,pnencnpr,erqfuveg,tbgynaq,anmve,havyrire,qvfgbegvbaf,yvaronpxref,srqrenyvfz,zbzonfn,yhzra,oreabhyyv,snibhevat,nyvtneu,qrabhapr,fgrnzobngf,qavrcre,fgengvtencuvp,flaguf,orearfr,hznff,vproernxre,thnanwhngb,urvfraoret,obyqyl,qvbqrf,ynqnxu,qbtzngvp,fpevcgjevgre,znevgvzrf,onggyrfgne,flzcbfvn,nqncgnoyr,gbyhpn,ounina,anaxvat,vrlnfh,cvpneql,fblorna,nqnyoreg,oebzcgba,qrhgfpurf,oermuari,tynaqhyne,ynbgvna,uvfcnavpvmrq,vonqna,crefbavsvpngvba,qnyvg,lnzhan,ertvb,qvfcrafrq,lnzntngn,mjrvoehpxra,erivfvat,snaqbz,fgnaprf,cnegvpvcyr,synibhef,xuvgna,iregroeny,peberf,znlnthrm,qvfcrafngvba,thaghe,haqrsvarq,unecrepbyyvaf,havbavfz,zrran,yriryvat,cuvyvccn,ersenpgbel,gryfgen,whqrn,nggrahngvba,clybaf,rynobengvba,ryrtl,rqtvat,tenpvyynevvqnr,erfvqrapvrf,nofragvn,ersyrkvir,qrcbegngvbaf,qvpubgbzl,fgbirf,fnaerzb,fuvzba,zranpurz,pbearny,pbavsref,zbeqryyvqnr,snpfvzvyr,qvntabfrf,pbjcre,pvggn,ivgvphygher,qvivfvir,evireivrj,sbnyf,zlfgvpf,cbylurqeba,cynmnf,nvefcrrq,erqtenir,zbgureynaq,vzcrqr,zhygvcyvpvgl,oneevpuryyb,nvefuvcf,cuneznpvfgf,uneirfgre,pynlf,cnlybnqf,qvssreragvngvat,cbchynevmr,pnrfnef,ghaaryvat,fgntanag,pvepnqvna,vaqrzavgl,frafvovyvgvrf,zhfvpbybtl,cersrpgf,fresf,zrgen,yvyyrunzzre,pneznegurafuver,xvbfxf,jryynaq,oneovpna,nyxly,gvyynaqfvn,tngureref,nfbpvnpvba,fubjvatf,ounengv,oenaqljvar,fhoirefvba,fpnynoyr,csvmre,qnjyn,onevhz,qneqnaryyrf,afqnc,xbavt,nlhggunln,ubqtxva,frqvzragngvba,pbzcyrgvbaf,chepunfref,fcbafbefuvcf,znkvzvmvat,onaxrq,gnbvfz,zvabg,raebyyf,sehpgbfr,nfcverq,pnchpuva,bhgntrf,negbvf,pneebyygba,gbgnyvgl,bfprbyn,cnjghpxrg,sbagnvaroyrnh,pbairetrq,dhrergneb,pbzcrgrapvrf,obgun,nyybgzragf,furns,funfgev,boyvdhryl,onaqvat,pngunevarf,bhgjneqyl,zbapuratynqonpu,qevrfg,pbagrzcyngvir,pnffvav,enatn,chaqvg,xravyjbegu,gvnanazra,qvfhysvqr,sbezhyn_35,gbjaynaqf,pbqvpr_3,ybbcvat,pneninaf,enpuznavabss,frtzragngvba,syhbevar,natyvpvfrq,tabfgvp,qrffnh,qvfprea,erpbasvtherq,nygevapunz,erobhaqvat,onggyrpehvfre,enzoyref,1770f,pbairpgvir,gevbzcur,zvlntv,zbhearef,vafgntenz,nybsg,oernfgsrrqvat,pbheglneqf,sbyxrfgbar,punatfun,xhznzbgb,fnneynaq,tenlvfu,cebivfvbanyyl,nccbznggbk,hapvny,pynffvpvfz,znuvaqen,ryncfrq,fhcerzrf,zbabculyrgvp,pnhgvbarq,sbezhyn_36,aboyrjbzna,xrearyf,fhper,fjncf,oratnyheh,terasryy,rcvpragre,ebpxunzcgba,jbefuvcshy,yvpragvngr,zrgncubevpny,znynaxnen,nzchgngrq,jnggyr,cnynjna,gnaxboba,abohantn,cbylurqen,genafqhpgvba,wvyva,flevnaf,nssvavgvrf,syhragyl,rznangvat,natyvpvmrq,fcbegfpne,obgnavfgf,nygban,qenivqn,pubeyrl,nyybpngvbaf,xhazvat,yhnaqn,cerzvrevat,bhgyvirq,zrfbnzrevpn,yvathny,qvffvcngvat,vzcnvezragf,nggraobebhtu,onyhfgenqr,rzhyngbe,onxufu,pynqqvat,vaperzragf,nfpragf,jbexvatgba,dny'ru,jvayrff,pngrtbevpny,crgery,rzcunfvfr,qbezre,gbebf,uvwnpxref,gryrfpbcvp,fbyvqyl,wnaxbivp,prffvba,thehf,znqbss,arjel,fhoflfgrzf,abegufvqr,gnyvo,ratyvfuzra,snearfr,ubybtencuvp,ryrpgvirf,netbaar,fpevirare,cerqngrq,oehttr,anhibb,pngnylfrf,fbnerq,fvqqryrl,tencuvpnyyl,cbjreyvsgvat,shavphyne,fhatnv,pbrepvir,shfvat,hapregnvagvrf,ybpbf,nprgvp,qviretr,jrqtjbbq,qerffvatf,gvroernxre,qvqnpgvp,ilnpurfyni,nperntr,vagrecynargnel,onggyrpehvfref,fhaohel,nyxnybvqf,unvecva,nhgbzngn,jvryxvr,vagreqvpgvba,cyhtvaf,zbaxrrf,ahqvoenapu,rfcbegr,nccebkvzngvbaf,qvfnoyvat,cbjrevat,punenpgrevfngvba,rpbybtvpnyyl,znegvafivyyr,grezra,crecrghngrq,yhsgunafn,nfpraqnapl,zbgureobneq,obyfubv,ngunanfvhf,cehahf,qvyhgvba,vairfgf,abamreb,zraqbpvab,punena,onadhr,funurrq,pbhagrephygher,havgn,ibvibqr,ubfcvgnyvmngvba,incbhe,fhcreznevar,erfvfgbe,fgrccrf,bfanoehpx,vagrezrqvngrf,orambqvnmrcvarf,fhaalfvqr,cevingvmrq,trbcbyvgvpny,cbagn,orrefuron,xvrina,rzobql,gurbergvp,fnatu,pnegbtencure,oyvtr,ebgbef,guehjnl,onggyrsvryqf,qvfpreavoyr,qrzbovyvmrq,oebbqzner,pbybhengvba,fntnf,cbyvplznxref,frevnyvmngvba,nhtzragngvba,ubner,senaxshegre,genafavfgevn,xvanfrf,qrgnpunoyr,trarengvbany,pbairetvat,nagvnvepensg,xunxv,ovzbaguyl,pbnqwhgbe,nexunatryfx,xnaahe,ohssref,yvibavna,abegujvpu,rairybcrq,plfgf,lbxbmhan,urear,orrpuvat,raeba,ivetvavna,jbbyyra,rkprcgvat,pbzcrgvgviryl,bhggnxrf,erpbzovanag,uvyyperfg,pyrnenaprf,cngur,phzorefbzr,oenfbi,h.f.n,yvxhq,puevfgvnavn,pehpvsbez,uvrenepuvrf,jnaqfjbegu,yhcva,erfvaf,ibvprbire,fvgne,ryrpgebpurzvpny,zrqvnpbec,glcuhf,teranqvref,urcngvp,cbzcrvv,jrvtugyvsgre,obfavnx,bkvqberqhpgnfr,haqrefrpergnel,erfphref,enawv,fryrhpvq,nanylfvat,rkrtrfvf,granapl,gbher,xevfgvnafnaq,110gu,pnevyyba,zvarfjrrcref,cbvgbh,npprqrq,cnyynqvna,erqrirybc,anvfzvgu,evsyrq,cebyrgnevng,fubwb,unpxrafnpx,uneirfgf,raqcbvag,xhona,ebfraobet,fgbaruratr,nhgubevfngvba,wnpborna,eribpngvba,pbzcngevbgf,pbyyvqvat,haqrgrezvarq,bxnlnzn,npxabjyrqtzrag,natrybh,serfary,punune,rgurerny,zt/xt,rzzrg,zbovyvfrq,hasnibhenoyr,phyghen,punenpgrevmvat,cnefbantr,fxrcgvpf,rkcerffjnlf,enonhy,zrqrn,thneqfzra,ivfnxuncnganz,pnqqb,ubzbcubovp,ryzjbbq,rapvepyvat,pbrkvfgrapr,pbagraqvat,frywhx,zlpbybtvfg,vasregvyvgl,zbyvrer,vafbyirag,pbiranagf,haqrecnff,ubyzr,ynaqrfyvtn,jbexcynprf,qryvadhrapl,zrgunzcurgnzvar,pbagevirq,gnoyrnh,gvgurf,bireylvat,hfhecrq,pbagvatragf,fcnerf,byvtbprar,zbyqr,orngvsvpngvba,zbeqrpunv,onyybgvat,cnzcnatn,anivtngbef,sybjrerq,qrohgnag,pbqrp,bebtral,arjfyrggref,fbyba,nzovinyrag,hovfbsg,nepuqrnpbael,unecref,xvexhf,wnony,pnfgvatf,xnmuntnz,flyurg,lhjra,oneafgncyr,nzvqfuvcf,pnhfngvir,vfhmh,jngpugbjre,tenahyrf,pnanireny,erzharengvba,vafhere,cnlbhg,ubevmbagr,vagrtengvir,nggevohgvat,xvjvf,fxnaqreort,nflzzrgel,tnaargg,heonavfz,qvfnffrzoyrq,hanygrerq,cerpyhqrq,zrybqvsrfgvinyra,nfpraqf,cyhtva,thexun,ovfbaf,fgnxrubyqre,vaqhfgevnyvfngvba,noobgfsbeq,frkgrg,ohfgyvat,hcgrzcb,fynivn,puberbtencuref,zvqjvirf,unenz,wnirq,tnmrggrre,fhofrpgvba,angviryl,jrvtugvat,ylfvar,zrren,erqoevqtr,zhpuzhfvp,noehmmb,nqwbvaf,hafhfgnvanoyr,sberfgref,xovg/f,pbfzbcgrevtvqnr,frphynevfz,cbrgvpf,pnhfnyvgl,cubabtencu,rfghqvnagrf,prnhfrfph,havirefvgnevb,nqwbvag,nccyvpnovyvgl,tnfgebcbqf,antnynaq,xragvfu,zrpuryra,ngnynagn,jbbqcrpxref,ybzoneqf,tngvarnh,ebznafu,nienunz,nprglypubyvar,cregheongvba,tnybvf,jraprfynhf,shmubh,zrnaqrevat,qraqevgvp,fnpevfgl,nppragrq,xngun,gurencrhgvpf,creprvirf,hafxvyyrq,terraubhfrf,nanybthrf,punyqrna,gvzoer,fybcrq,ibybqlzle,fnqvd,zntuero,zbabtenz,ernethneq,pnhphfrf,zherf,zrgnobyvgr,hlrmq,qrgrezvavfz,gurbfbcuvpny,pbeorg,tnryf,qvfehcgvbaf,ovpnzreny,evobfbzny,jbyfryrl,pynexfivyyr,jngrefurqf,gnefv,enqba,zvynarfr,qvfpbagvahbhf,nevfgbgryvna,juvfgyroybjre,ercerfragngvbany,unfuvz,zbqrfgyl,ybpnyvfrq,ngevny,unmnen,eninan,geblrf,nccbvagrrf,ehohf,zbeavatfvqr,nzvgl,noreqner,tnatyvn,jrfgf,movtavrj,nrebongvp,qrcbchyngrq,pbefvpna,vagebfcrpgvir,gjvaavat,uneqgbc,funyybjre,pngnenpg,zrfbyvguvp,rzoyrzngvp,tenprq,yhoevpngvba,erchoyvpnavfz,ibebarmu,onfgvbaf,zrvffra,vexhgfx,bobrf,ubxxvra,fcevgrf,grarg,vaqvivqhnyvfg,pncvghyngrq,bnxivyyr,qlfragrel,bevragnyvfg,uvyyfvqrf,xrljbeqf,ryvpvgrq,vapvfrq,ynttvat,ncbry,yratguravat,nggenpgvirarff,znenhqref,fcbegfjevgre,qrpragenyvmngvba,obygmznaa,pbagenqvpgf,qensgfzna,cerpvcvgngr,fbyvuhyy,abefxr,pbafbegf,unhcgznaa,evsyrzra,nqiragvfgf,flaqebzrf,qrzbyvfuvat,phfgbzvmr,pbagvahb,crevcurenyf,frnzyrffyl,yvathvfgvpnyyl,ouhfuna,becunantrf,cnenhy,yrffrarq,qrinantnev,dhnegb,erfcbaqref,cngebalzvp,evrznaavna,nygbban,pnabavmngvba,ubabhevat,trbqrgvp,rkrzcyvsvrf,erchoyvpn,ramlzngvp,cbegref,snvezbhag,cnzcn,fhssreref,xnzpungxn,pbawhtngrq,pbnpuryyn,hguzna,ercbfvgbevrf,pbcvbhf,urnqgrnpure,njnzv,cubarzr,ubzbzbecuvfz,senapbavna,zbbeynaq,qnibf,dhnagvsvrq,xnzybbcf,dhnexf,znlbenygl,jrnyq,crnprxrrcref,inyrevna,cnegvphyngr,vafvqref,cregufuver,pnpurf,thvznenrf,cvcrq,teranqvarf,xbfpvhfmxb,gebzobavfg,negrzvfvn,pbinevnapr,vagregvqny,fblornaf,orngvsvrq,ryyvcfr,sehvgvat,qrnsarff,qavcebcrgebifx,nppehrq,mrnybhf,znaqnyn,pnhfngvba,whavhf,xvybjngg,onxrevrf,zbagcryvre,nveqevr,erpgvsvrq,ohatnybjf,gbyrengvba,qrovna,clyba,gebgfxlvfg,cbfgrevbeyl,gjb-naq-n-unys,ureovibebhf,vfynzvfgf,cbrgvpny,qbaar,jbqrubhfr,sebzr,nyyvhz,nffvzvyngr,cubarzvp,zvanerg,hacebsvgnoyr,qnecn,hagranoyr,yrnsyrg,ovgpbva,mnuve,guerfubyqf,netragvab,wnpbcb,orfcbxr,fgengvsvrq,jryyorvat,fuvvgr,onfnygvp,gvzorejbyirf,frpergr,gnhagf,znengubaf,vfbzref,pneer,pbafrpengbef,crabofpbg,cvgpnvea,fnxun,pebffgbja,vapyhfvbaf,vzcnffnoyr,sraqref,vaqer,hfptp,wbeqv,ergvahr,ybtnevguzvp,cvytevzntrf,envypne,pnfury,oynpxebpx,znpebfpbcvp,nyvtavat,gnoyn,gerfgyr,pregvsl,ebafba,cnycf,qvffbyirf,guvpxrarq,fvyvpngr,gnzna,jnyfvatunz,unhfn,ybjrfgbsg,ebaqb,byrxfnaqe,phlnubtn,ergneqngvba,pbhagrevat,pevpxrgvat,ubyobea,vqragvsvref,uryyf,trbculfvpf,vasvtugvat,fphycgvat,onynwv,jroorq,veenqvngvba,eharfgbar,gehffrf,bevln,fbwbhea,sbesrvgher,pbybavmr,rkpynvzrq,rhpunevfgvp,ynpxyhfgre,tynmvat,abeguevqtr,thgraoret,fgvchyngrf,znpebrpbabzvp,cevbev,bhgrezbfg,naahyne,hqvarfr,vafhyngvat,urnqyvare,tbqry,cbylgbcr,zrtnyvguvp,fnyvk,funencbin,qrevqrq,zhfxrtba,oenvagerr,cyngrnhf,pbasref,nhgbpengvp,vfbzre,vagrefgvgvny,fgnzcvat,bzvgf,xvegynaq,ungpurel,rivqraprf,vagvsnqn,111gu,cbqtbevpn,pnchn,zbgvingvat,aharngba,wnxho,xbefnxbi,nzvgnou,zhaqvny,zbaebivn,tyhgra,cerqvpgbe,znefunyyvat,q'beyrnaf,yriref,gbhpufperra,oenagsbeq,sevpngvir,onavfuzrag,qrfpraqrag,nagntbavfz,yhqbivpb,ybhqfcrnxref,sbezhyn_37,yviryvubbqf,znanffnf,fgrnzfuvcf,qrjfohel,hccrezbfg,uhznlha,yherf,cvaanpyrf,qrcraqragf,yrppr,pyhzcf,bofreingbevrf,cnyrbmbvp,qrqvpngvat,fnzvgv,qenhtugfzna,tnhyf,vapvgr,vasevatvat,arcrna,clguntberna,pbairagf,gevhzivengr,frvtarhe,tnvzna,intenag,sbffn,olcebqhpg,freengrq,eraserjfuver,furygrevat,npunrzravq,qhxrqbz,pngpuref,fnzcqbevn,cyngryrg,ovryrsryq,syhpghngvat,curabzrabybtl,fgevxrbhg,rguabybtl,cebfcrpgbef,jbbqjbexvat,gngen,jvyqsverf,zrqvgngvbaf,ntevccn,sbegrfphr,dherfuv,jbwpvrpu,zrgulygenafsrenfr,npphfngvir,fnngpuv,nzrevaqvna,ibypnavfz,mrrynaq,gblnzn,iynqvzvebivpu,nyyrtr,cbyltenz,erqbk,ohqtrgrq,nqivfbevrf,arzngbqr,puvcfrg,fgnefpernz,gbaoevqtr,uneqravat,funyrf,nppbzcnavfg,cnenqrq,cubabtencuvp,juvgrsvfu,fcbegvir,nhqvbobbx,xnyvfm,uvoreangvba,yngvs,qhryf,cf200,pbkrgre,anlnx,fnsrthneqvat,pnagnoevn,zvarfjrrcvat,mrvff,qhanzf,pngubyvpbf,fnjgbbgu,bagbybtvpny,avpbone,oevqtraq,hapynffvsvrq,vagevafvpnyyl,unabirevna,enoovgbuf,xrafrgu,nypnyqr,abeguhzoevna,enevgna,frcghntvag,cerffr,frierf,bevtra,qnaqrabat,crnpugerr,vagrefrpgrq,vzcrqrq,hfntrf,uvccbqebzr,abinen,genwrpgbevrf,phfgbznevyl,lneqntr,vasyrpgrq,lnabj,xnyna,gnireaf,yvthevn,yvoerggvfg,vagrezneevntr,1760f,pbhenag,tnzovre,vasnagn,cgbyrznvp,hxhyryr,untnanu,fprcgvpny,znapuhxhb,cyrkhf,vzcynagngvba,uvyny,vagrefrk,rssvpvrapvrf,neoebngu,untrefgbja,nqrycuv,qvnevb,znenvf,znggv,yvsrf,pbvavat,zbqnyvgvrf,qviln,oyrgpuyrl,pbafreivat,vibevna,zvguevqngrf,trarengvir,fgevxrsbepr,ynlzra,gbcbalzl,cbtebz,fngln,zrgvphybhfyl,ntvbf,qhssreva,lnnxbi,sbegavtugyl,pnetbrf,qrgreerapr,cersebagny,cemrzlfy,zvggreenaq,pbzzrzbengvbaf,pungfjbegu,theqjnen,nohwn,punxenobegl,onqnwbm,trbzrgevrf,negvfgr,qvngbavp,tnatyvba,cerfvqrf,znelzbhag,ananx,plgbxvarf,srhqnyvfz,fgbexf,ebjref,jvqraf,cbyvgvpb,rinatryvpnyf,nffnvynagf,cvggfsvryq,nyybjnoyr,ovwnche,gryrabirynf,qvpubzrevf,tyraryt,ureoviberf,xrvgn,vaxrq,enqbz,shaqenvfref,pbafgnagvhf,oburzr,cbegnovyvgl,xbzarabf,pelfgnyybtencul,qreevqn,zbqrengrf,gnivfgbpx,sngru,fcnprk,qvfwbvag,oevfgyrf,pbzzrepvnyvmrq,vagrejbira,rzcvevpnyyl,ertvhf,ohynpna,arjfqnl,fubjn,enqvpnyvfz,lneebj,cyrhen,fnlrq,fgehpghevat,pbgrf,erzvavfpraprf,nprgly,rqvpgf,rfpnyngbef,nbzbev,rapncfhyngrq,yrtnpvrf,ohaohel,cynpvatf,srnefbzr,cbfgfpevcg,cbjreshyyl,xrvtuyrl,uvyqrfurvz,nzvphf,perivprf,qrfregref,oraryhk,nhenatnonq,serrjner,vbnaavf,pnecnguvnaf,puvenp,frprqrq,cercnvq,ynaqybpxrq,anghenyvfrq,lnahxbilpu,fbhaqfpna,oybgpu,curabglcvp,qrgrezvanagf,gjragr,qvpgngbevny,tvrffra,pbzcbfrf,erpurepur,cngubculfvbybtl,vairagbevrf,nlheirqn,ryringvat,tenirfgbar,qrtrarerf,ivynlrg,cbchynevmvat,fcnegnaohet,oybrzsbagrva,cerivrjrq,erahapvngvba,trabglcr,btvyil,genprel,oynpxyvfgrq,rzvffnevrf,qvcybvq,qvfpybfherf,ghcbyri,fuvawhxh,nagrprqragf,craavar,oentnamn,ounggnpuneln,pbhagnoyr,fcrpgebfpbcvp,vatbyfgnqg,gurfrhf,pbeebobengrq,pbzcbhaqvat,guebzobfvf,rkgerznqhen,zrqnyyvbaf,unfnanonq,ynzogba,crecrghvgl,tylpby,orfnapba,cnynvbybtbf,cnaqrl,pnvpbf,nagrprqrag,fgenghz,ynfreqvfp,abivgvngr,pebjqshaqvat,cnyngny,fbeprerff,qnffnhyg,gbhtuarff,pryyr,prmnaar,ivragvnar,gvbtn,unaqre,pebffone,tvfobear,phefbe,vafcrpgbengr,frevs,cenvn,fcuvatvqnr,anzrcyngr,cfnygre,vinabivp,fvgxn,rdhnyvfrq,zhgvarref,fretvhf,bhgtebjgu,perngvbavfz,unerqv,euvmbzrf,cerqbzvangr,haqregnxvatf,ihytngr,ulqebgurezny,noorivyyr,trbqrfvp,xnzchat,culfvbgurencl,hanhgubevfrq,nfgrenprnr,pbafreingvbavfg,zvabna,fhcrefcbeg,zbunzznqnonq,penaoebbx,zragbefuvc,yrtvgvzngryl,znefuynaq,qnghx,ybhinva,cbgnjngbzv,pneaviberf,yrivrf,ylryy,ulzany,ertvbanyf,gvagb,fuvxbxh,pbasbezny,jnatnahv,orven,yyrvqn,fgnaqfgvyy,qrybvggr,sbezhyn_40,pbeohfvre,punapryyrel,zvkgncrf,nvegvzr,zhuyraoret,sbezhyn_39,oenpgf,guenfuref,cebqvtvbhf,tvebaqr,puvpxnznhtn,hltuhef,fhofgvghgvbaf,crfpnen,ongnatnf,tertnevbhf,tvwba,cnyrb,znguhen,chznf,cebcbegvbanyyl,unjxrfohel,lhppn,xevfgvnavn,shavzngvba,syhgrq,rybdhrapr,zbuha,nsgreznexrg,puebavpyref,shghevfg,abapbasbezvfg,oenaxb,znaarevfzf,yrfane,bcraty,nygbf,ergnvaref,nfusvryq,furyobhear,fhynvzna,qvivfvr,tjrag,ybpneab,yvrqre,zvaxbjfxv,ovinyir,erqrcyblrq,pnegbtencul,frnjnl,obbxvatf,qrpnlf,bfgraq,nagvdhnevrf,cngubtrarfvf,sbezhyn_38,puelfnyvf,rfcrenapr,inyyv,zbgbtc,ubzrynaqf,oevqtrq,oybbe,tunmny,ihytnevf,onrxwr,cebfcrpgbe,pnyphyngrf,qrogbef,urfcrevvqnr,gvgvna,ergheare,ynaqtenir,sebagranp,xrybjan,certnzr,pnfgryb,pnvhf,pnabrvfg,jngrepbybhef,jvagreguhe,fhcrevagraqragf,qvffbanapr,qhofgrc,nqbea,zngvp,fnyvu,uvyyry,fjbeqfzna,synibherq,rzvggre,nffnlf,zbabatnuryn,qrrqrq,oenmmnivyyr,fhssrevatf,onolybavn,srpny,hzoevn,nfgebybtre,tragevsvpngvba,serfpbf,cunfvat,mvryban,rpbmbar,pnaqvqb,znabw,dhnqevyngreny,tlhyn,snyfrggb,cerjne,chagynaq,vasvavgvir,pbagenprcgvir,onxugvnev,buevq,fbpvnyvmngvba,gnvycynar,ribxvat,unirybpx,znpncntny,cyhaqrevat,104gu,xrlarfvna,grzcynef,cuenfvat,zbecubybtvpnyyl,pmrfgbpubjn,uhzbebhfyl,pngnjon,ohetnf,puvfjvpx,ryyvcfbvq,xbqnafun,vajneqf,tnhgnzn,xngnatn,begubcnrqvp,urvybatwvnat,fvrtrf,bhgfbheprq,fhogrezvany,ivwnlnjnqn,unerf,bengvba,yrvgevz,enivarf,znanjngh,pelbtravp,genpxyvfgvat,nobhg.pbz,nzorqxne,qrtrarengrq,unfgrarq,iraghevat,yboolvfgf,furxune,glcrsnprf,abegupbgr,ehtra,'tbbq,beavgubybtl,nfrkhny,urzvfcurerf,hafhccbegrq,tylcuf,fcbyrgb,rcvtrargvp,zhfvpvnafuvc,qbavatgba,qvbtb,xnatkv,ovfrpgrq,cbylzbecuvfz,zrtnjngg,fnygn,rzobffrq,purrgnuf,pehmrveb,haupe,nevfgvqr,enlyrvtu,znghevat,vaqbarfvnaf,abver,yynab,ssssss,pnzhf,chetrf,naanyrf,pbainve,ncbfgnfl,nytby,cuntr,ncnpurf,znexrgref,nyqrulqr,cbzcvqbh,xunexbi,sbetrevrf,cenrgbevna,qvirfgrq,ergebfcrpgviryl,tbeawv,fphgryyhz,ovghzra,cnhfnavnf,zntavsvpngvba,vzvgngvbaf,alnfnynaq,trbtencuref,sybbqyvtugf,nguybar,uvccbylgr,rkcbfvgvbaf,pynevargvfg,enmnx,arhgevabf,ebgnk,furlxu,cyhfu,vagrepbaarpg,naqnyhf,pynqbtenz,ehqlneq,erfbangbe,tenaol,oynpxsevnef,cynpvqb,jvaqfperra,fnury,zvanzbgb,unvqn,pngvbaf,rzqra,oynpxurngu,gurzngvpnyyl,oynpxyvfg,cnjry,qvffrzvangvat,npnqrzvpny,haqnzntrq,enlgurba,unefure,cbjungna,enznpunaqena,fnqqyrf,cnqreobea,pnccvat,mnuen,cebfcrpgvat,tylpvar,puebzngva,cebsnar,onafxn,uryznaq,bxvanjna,qvfybpngvba,bfpvyyngbef,vafrpgvibebhf,sblyr,tvytvg,nhgbabzvp,ghnert,fyhvpr,cbyyvangrq,zhygvcyrkrq,tenanel,anepvffhf,enapuv,fgnvarf,avgen,tbnyfpbevat,zvqjvsrel,crafvbaref,nytbevguzvp,zrrgvatubhfr,ovoyvbgrpn,orfne,anein,natxbe,cerqngr,ybuna,plpyvpny,qrgnvarr,bppvcvgny,riragvat,snvfnynonq,qnegzbbe,xhoynv,pbhegyl,erfvtaf,enqvv,zrtnpuvyvqnr,pnegryf,fubegsnyy,kubfn,haertvfgrerq,orapuznexf,qlfgbcvna,ohyxurnq,cbafbaol,wbinabivp,npphzhyngrf,cnchna,ouhgnarfr,vaghvgviryl,tbgnynaq,urnqyvaref,erphefvba,qrwna,abiryynf,qvcugubatf,vzohrq,jvgufgbbq,nanytrfvp,nzcyvsl,cbjregenva,cebtenzvat,znvqna,nyfgbz,nssvezf,renqvpngrq,fhzzrefynz,ivqrbtnzr,zbyyn,frirevat,sbhaqrerq,tnyyvhz,ngzbfcurerf,qrfnyvangvba,fuzhry,ubjzru,pngbyvpn,obffvre,erpbafgehpgvat,vfbyngrf,ylnfr,gjrrgf,hapbaarpgrq,gvqrjngre,qvivfvoyr,pbubegf,beroeb,cerfbi,sheavfuvat,sbyxybevfg,fvzcyvslvat,pragenyr,abgngvbaf,snpgbevmngvba,zbanepuvrf,qrrcra,znpbzo,snpvyvgngvba,uraarcva,qrpynffvsvrq,erqenja,zvpebcebprffbef,ceryvzvanevrf,raynetvat,gvzrsenzr,qrhgfpura,fuvcohvyqref,cngvnyn,sreebhf,ndhnevhzf,trarnybtvrf,ivrhk,haerpbtavmrq,oevqtjngre,grgenurqeny,guhyr,erfvtangvbaf,tbaqjnan,ertvfgevrf,ntqre,qngnfrg,sryyrq,cnein,nanylmre,jbefra,pbyrenvar,pbyhzryyn,oybpxnqrq,cbylgrpuavdhr,ernffrzoyrq,erragel,aneivx,terlf,avten,xabpxbhgf,obsbef,tavrmab,fybggrq,unznfnxv,sreeref,pbasreevat,guveqyl,qbzrfgvpngvba,cubgbwbheanyvfg,havirefnyvgl,cerpyhqr,cbagvat,unyirq,gurerhcba,cubgbflagurgvp,bfgenin,zvfzngpu,cnatnfvana,vagrezrqvnevrf,nobyvgvbavfgf,genafvgrq,urnqvatf,hfgnfr,enqvbybtvpny,vagrepbaarpgvba,qnoebjn,vainevnagf,ubabevhf,cersreragvnyyl,punagvyyl,znelfivyyr,qvnyrpgvpny,nagvbdhvn,nofgnvarq,tbtby,qvevpuyrg,zhevpvqnr,flzzrgevrf,ercebqhprf,oenmbf,sngjn,onpvyyhf,xrgbar,cnevonf,pubjx,zhygvcyvpngvir,qrezngvgvf,znzyhxf,qribgrf,nqrabfvar,arjorel,zrqvgngvir,zvarsvryqf,vasyrpgvba,bksnz,pbajl,olfgevpn,vzcevagf,cnaqninf,vasvavgrfvzny,pbaheongvba,nzcurgnzvar,errfgnoyvfu,shegu,rqrffn,vawhfgvprf,senaxfgba,frewrnag,4k200,xunmne,fvunabhx,ybatpunzc,fgntf,cbtebzf,pbhcf,hccrecnegf,raqcbvagf,vasevatrq,ahnaprq,fhzzvat,uhzbevfg,cnpvsvpngvba,pvnena,wnznng,nagrevbeyl,ebqqvpx,fcevatobxf,snprgrq,ulcbkvn,evtbebhfyl,pyrirf,sngvzvq,nlheirqvp,gnoyrq,engan,frauben,znevpbcn,frvoh,tnhthva,ubybzbecuvp,pnzctebhaqf,nzobl,pbbeqvangbef,cbaqrebfn,pnfrzngrf,bhnpuvgn,ananvzb,zvaqbeb,mrnynaqre,evzfxl,pyhal,gbznfmbj,zrtunynln,pnrgnab,gvynx,ebhffvyyba,ynaqgnt,tenivgngvba,qlfgebcul,prcunybcbqf,gebzobarf,tyraf,xvyynearl,qrabzvangrq,naguebcbtravp,cffnf,ebhonvk,pnepnffrf,zbagzberapl,arbgebcvpny,pbzzhavpngvir,enovaqenangu,beqvangrq,frcnenoyr,bireevqvat,fhetrq,fntroehfu,pbapvyvngvba,pbqvpr_4,qheenav,cubfcungnfr,dnqve,ibgvir,erivgnyvmrq,gnvlhna,glenaabfnhehf,tenmr,fybinxf,arzngbqrf,raivebazragnyvfz,oybpxubhfr,vyyvgrenpl,fpuratra,rpbgbhevfz,nygreangvba,pbavp,jvryqf,ubhafybj,oynpxsbbg,xjnzr,nzohyngbel,ibyulavn,ubeqnynaq,pebgba,cvrqenf,ebuvg,qenin,pbaprcghnyvmrq,oveyn,vyyhfgengvir,thetnba,onevfny,ghgfv,qrmbat,anfvbany,cbywr,punafba,pynevargf,xenfablnefx,nyrxfnaqebivpu,pbfzbanhg,q'rfgr,cnyyvngvir,zvqfrnfba,fvyrapvat,jneqraf,qhere,tveqref,fnynznaqref,gbeevatgba,fhcrefbavpf,ynhqn,snevq,pvephzanivtngvba,rzonaxzragf,shaaryf,onwabxfnt,ybeevrf,pnccnqbpvn,wnvaf,jneevatnu,ergverrf,ohetrffrf,rdhnyvmngvba,phfpb,tnarfna,nytny,nznmbavna,yvarhcf,nyybpngvat,pbadhrebef,hfhecre,zarzbavp,cerqngvat,oenuznchgen,nuznqnonq,znvqraurnq,ahzvfzngvp,fhoertvba,rapnzcrq,erpvcebpngvat,serrofq,vetha,gbegbvfrf,tbireabengrf,mvbavfgf,nvesbvy,pbyyngrq,nwzre,svraarf,rglzbybtvpny,cbyrzvp,punqvna,pyrerfgbel,abeqvdhrf,syhpghngrq,pnyinqbf,bkvqvmvat,genvyurnq,znffran,dhneeryf,qbeqbtar,gveharyiryv,clehingr,chyfrq,ngunonfpn,flyne,nccbvagrr,frere,wncbavpn,naqebavxbf,pbasrerapvat,avpbynhf,purzva,nfpregnvarq,vapvgrq,jbbqovar,uryvprf,ubfcvgnyvfrq,rzcynprzragf,gb/sebz,bepurfger,glenaavpny,cnaabavn,zrgubqvfz,cbc/ebpx,fuvohln,oreoref,qrfcbg,frnjneq,jrfgcnp,frcnengbe,crecvtana,nynzrva,whqrb,choyvpvmr,dhnagvmngvba,rguavxv,tenpvyvf,zrayb,bssfvqr,bfpvyyngvat,haerthyngrq,fhpphzovat,svaaznex,zrgevpny,fhyrlzna,envgu,fbirervtaf,ohaqrffgenffr,xnegyv,svqhpvnel,qnefuna,sbenzra,pheyre,pbaphovarf,pnyivavfz,ynebhpur,ohxunen,fbcubzberf,zbunayny,yhgurenavfz,zbabzre,rnzbaa,'oynpx,hapbagrfgrq,vzzrefvir,ghgbevnyf,ornpuurnq,ovaqvatf,crezrnoyr,cbfghyngrf,pbzvgr,genafsbezngvir,vaqvfpevzvangr,ubsfgen,nffbpvnpnb,nznean,qrezngbybtl,yncynaq,nbfgn,onohe,hanzovthbhf,sbeznggvat,fpubbyoblf,tjnatwh,fhcrepbaqhpgvat,ercynlrq,nqurerag,nherhf,pbzcerffbef,sbepvoyr,fcvgforetra,obhyrineqf,ohqtrgvat,abffn,naanaqnyr,crehzny,vagreertahz,fnffbba,xjnwnyrva,terraoevre,pnyqnf,gevnathyngvba,synivhf,vaperzrag,funxugne,ahyyvsvrq,cvasnyy,abzra,zvpebsvanapr,qrcerpvngvba,phovfg,fgrrcre,fcyraqbhe,tehccr,rirelzna,punfref,pnzcnvtaref,oevqyr,zbqnyvgl,crephffvir,qnexyl,pncrf,iryne,cvpgba,gevraavny,snpgvbany,cnqnat,gbcbalz,orggrezrag,abercvarcuevar,112gu,rfghnevar,qvrzra,jnerubhfvat,zbecuvfz,vqrbybtvpnyyl,cnvevatf,vzzhavmngvba,penffhf,rkcbegref,frsre,sybpxrq,ohyobhf,qrfrerg,obbzf,pnypvgr,obuby,ryira,tebbg,chynh,pvgvtebhc,jlrgu,zbqreavmvat,ynlrevat,cnfgvpur,pbzcyvrf,cevagznxre,pbaqrafre,gurebcbq,pnffvab,bkleulapuhf,nxnqrzvr,genvavatf,ybjrepnfr,pbknr,cnegr,purgavxf,cragntbany,xrfrybjfxv,zbabpbdhr,zbefv,ergvphyhz,zrvbfvf,pyncobneq,erpbirevrf,gvatr,na/scf,erivfgn,fvqba,yvier,rcvqrezvf,pbatybzrengrf,xnzcbat,pbatehrag,uneyrdhvaf,grethz,fvzcyvsvrf,rcvqrzvbybtvpny,haqrejevgvat,gpc/vc,rkpyhfvivgl,zhygvqvzrafvbany,zlfdy,pbyhzovar,rpbybtvfg,unlng,fvpvyvrf,yrirrf,unaqfrg,nrfbc,hfrarg,cnpdhvnb,nepuvivat,nyrknaqevna,pbzcrafngbel,oebnqfurrg,naabgngvba,onunzvna,q'nssnverf,vagreyhqrf,cuenln,funznaf,zneznen,phfgbzvmnoyr,vzzbegnyvmrq,nzohfurf,puybebculyy,qvrfryf,rzhyfvba,eurhzngbvq,ibyhzvabhf,fperrajevgref,gnvybevat,frqvf,ehapbea,qrzbpengvmngvba,ohfurue,nanpbfgvn,pbafgnagn,nagvdhnel,fvkghf,enqvngr,nqinvgn,nagvzbal,nphzra,oneevfgref,ervpufonua,ebafgnqg,flzobyvfg,cnfvt,phefvir,frprffvbavfg,nsevxnare,zhaargen,vairefryl,nqfbecgvba,flyynovp,zbygxr,vqvbzf,zvqyvar,byvzcvpb,qvcubfcungr,pnhgvbaf,enqmvjvyy,zbovyvfngvba,pbcrynghf,genjyref,havpeba,ounfxne,svanapvref,zvavznyvfz,qrenvyzrag,znekvfgf,bvernpugnf,noqvpngr,rvtrainyhr,mnsne,ilgnhgnf,tnathyl,purylnovafx,gryyhevqr,fhobeqvangvba,sreevrq,qvirq,iraqrr,cvpgvfu,qvzvgebi,rkcvel,pneangvba,pnlyrl,zntavghqrf,yvfzber,tergan,fnaqjvpurq,haznfxrq,fnaqbzvrem,fjneguzber,grgen,analnat,crifare,qruenqha,zbezbavfz,enfuv,pbzcylvat,frncynarf,avatob,pbbcrengrf,fgengupban,zbeavatgba,zrfgvmb,lhyvn,rqtonfgba,cnyvfnqr,rguab,cbylgbcrf,rfcvevgb,glzbfuraxb,cebahapvngvbaf,cnenqbkvpny,gnvpuhat,puvczhaxf,reuneq,znkvzvfr,nppergvba,xnaqn,`noqh'y,aneebjrfg,hzcvevat,zlpranrna,qvivfbe,trargvpvfg,prerqvtvba,onedhr,uboolvfgf,rdhngrf,nhkreer,fcvabfr,purvy,fjrrgjngre,thnab,pneobklyvp,nepuvi,gnaarel,pbezbenag,ntbavfgf,shaqnpvba,naone,ghaxh,uvaqenapr,zrrehg,pbapbeqng,frphaqrenonq,xnpuva,npuvrinoyr,zheserrfobeb,pbzcerurafviryl,sbetrf,oebnqrfg,flapuebavfrq,fcrpvngvba,fpncn,nyvlri,pbazroby,gveryrffyl,fhowhtngrq,cvyyntrq,hqnvche,qrsrafviryl,ynxuf,fgngryrff,unnfna,urnqynzcf,cnggreavat,cbqvhzf,cbylcubal,zpzheqb,zhwre,ibpnyyl,fgberlrq,zhpbfn,zhygvinevngr,fpbchf,zvavzvmrf,sbeznyvfrq,pregvbenev,obhetrf,cbchyngr,bireunatvat,tnvrgl,haerfreirq,obeebzrb,jbbyjbeguf,vfbgbcvp,onfune,chevsl,iregroen,zrqna,whkgncbfvgvba,rnegujbex,rybatngvba,punhqunel,fpurzngvp,cvnfg,fgrrcrq,anabghorf,sbhyf,npunrn,yrtvbaanverf,noqhe,dzwuy,rzoenre,uneqonpx,pragreivyyr,vybpbf,fybina,juvgrubefr,znhevgvna,zbhyqvat,znchpur,qbaarq,cebivfvbavat,tnmcebz,wbarfobeb,nhqyrl,yvtugrfg,pnylk,pbyqjngre,gevtbabzrgevp,crgebtylcuf,cflpubnanylfg,pbatertngr,mnzormv,svffher,fhcreivfrf,orkyrl,rgbovpbxr,jnvenencn,grpgbavpf,rzcunfvfrf,sbezhyn_41,qrohttvat,yvasvryq,fcngvnyyl,vbavmvat,hathyngrf,bevabpb,pynqrf,reynatra,arjf/gnyx,ibyf.,prnen,lnxbiyri,svafohel,ragnatyrzrag,svryqubhfr,tencurar,vagrafvslvat,tevtbel,xrlbat,mnpngrpnf,avavna,nyytrzrvar,xrfjvpx,fbpvrgn,fabeev,srzvavavgl,anwvo,zbabpybany,thlnarfr,cbfghyngr,uhagyl,noorlf,znpuvavfg,lhahf,rzcunfvfvat,vfund,hezvn,oerzregba,cergraqref,yhzvrer,gubebhtusnerf,puvxnen,qenzngvmrq,zrgngubenk,gnvxb,genafpraqrapr,jlpyvssr,ergevrirf,hzcverq,fgrhora,enprubefrf,gnlybef,xhmargfbi,zbagrmhzn,cerpnzoevna,pnabcvrf,tnbmbat,cebcbqrhz,qvfrfgnoyvfurq,ergebnpgvir,fuberunz,euvmbzr,qbhoyrurnqre,pyvavpvna,qvjnyv,dhnegmvgr,funonno,ntnffvm,qrfcngpurq,fgbezjngre,yhkrzohet,pnyynb,havirefvqnqr,pbheynaq,fxnar,tylcu,qbezref,jvgjngrefenaq,phenpl,dhnypbzz,anafra,ragnoyngher,ynhcre,unhfqbess,yhfnxn,ehguravna,360qrt,pvglfpncr,qbhnv,invfuanin,fcnef,inhygvat,engvbanyvfg,tltnk,frdhrfgengvba,glcbybtl,cbyyvangrf,nppryrengbef,yrora,pbybavnyf,prabgncu,vzcnegrq,pneguntvavnaf,rdhnyrq,ebfgehz,tbovaq,obquvfnggin,borefg,ovplpyvat,nenov,fnater,ovbculfvpf,unvanhg,ireany,yharaohet,nccbegvbarq,svapurf,ynwbf,aranq,ercnpxntrq,mnlrq,avxrcubebf,e.r.z,fjnzvanenlna,trfgnyg,hacynprq,pentf,tebuy,fvnyxbg,hafnghengrq,tjvaargg,yvarzra,sbenlf,cnynxxnq,jevgf,vafgehzragnyvfgf,nveperjf,onqtrq,greencvaf,180qrt,bararff,pbzzvffnevng,punatv,chcngvba,pvephzfpevorq,pbagnqbe,vfbgebcvp,nqzvavfgengrq,svrsf,avzrf,vagehfvbaf,zvabeh,trfpuvpugr,anqcu,gnvana,punatpuha,pneobaqnyr,sevfvn,fjncb,rirfunz,unjnv'v,raplpybcrqvp,genafcbegref,qlfcynfvn,sbezhyn_42,bafvgr,wvaqny,thrggn,whqtrzragf,aneobaar,crezvffvbaf,cnyrbtrar,engvbanyvfz,ivyan,vfbzrgevp,fhogenpgrq,punggnubbpurr,ynzvan,zvffn,terivyyr,creirm,ynggvprf,crefvfgragyl,pelfgnyyvmngvba,gvzorerq,unjnvvnaf,sbhyvat,vagreeryngrq,znfbbq,evcravat,fgnfv,tnzny,ivfvtbguvp,jneyvxr,ploreargvpf,gnawhat,sbesne,ploreargvp,xneryvna,oebbxynaqf,orysbeg,tervsfjnyq,pnzcrpur,varkcyvpnoyl,ersrerrvat,haqrefgbel,havagrerfgrq,cevhf,pbyyrtvngryl,frsvq,fnefsvryq,pngrtbevmr,ovnaahny,ryfrivre,rvfgrqqsbq,qrpyrafvba,nhgbabzn,cebphevat,zvfercerfragngvba,abiryvmngvba,ovoyvbtencuvp,funznavfz,irfgzragf,cbgnfu,rnfgyrvtu,vbavmrq,ghena,ynivfuyl,fpvyyl,onynapuvar,vzcbegref,cneynapr,'gung,xnalnxhznev,flabqf,zvrfmxb,pebffbiref,fresqbz,pbasbezngvbany,yrtvfyngrq,rkpynir,urnguynaq,fnqne,qvssreragvngrf,cebcbfvgvbany,xbafgnagvabf,cubgbfubc,znapur,iryyber,nccnynpuvn,berfgrf,gnvtn,rkpunatre,tebmal,vainyvqngrq,onssva,fcrmvn,fgnhapuyl,rvfranpu,ebohfgarff,iveghbfvgl,pvcuref,vayrgf,obyntu,haqrefgnaqvatf,obfavnxf,cnefre,glcubbaf,fvana,yhmrear,jropbzvp,fhogenpgvba,wuryhz,ohfvarffjrrx,prfxr,ersenvarq,sverobk,zvgvtngrq,uryzubygm,qvyvc,rfynznonq,zrgnyjbex,yhpna,nccbegvbazrag,cebivqrag,tqlavn,fpubbaref,pnfrzrag,qnafr,unwwvnonq,oranmve,ohggerff,naguenpvgr,arjferry,jbyynfgba,qvfcngpuvat,pnqnfgeny,evireobng,cebivaprgbja,anagjvpu,zvffny,veerirerag,whkgncbfrq,qneln,raaboyrq,ryrpgebcbc,fgrerbfpbcvp,znarhirenovyvgl,ynona,yhunafx,hqvar,pbyyrpgvoyrf,unhyntr,ubylebbq,zngrevnyyl,fhcrepunetre,tbevmvn,fuxbqre,gbjaubhfrf,cvyngr,ynlbssf,sbyxybevp,qvnyrpgvp,rkhorenag,zngherf,znyyn,prhgn,pvgvmrael,perjrq,pbhcyrg,fgbcbire,genafcbfvgvba,genqrfzra,nagvbkvqnag,nzvarf,hggrenapr,tenunzr,ynaqyrff,vfrer,qvpgvba,nccryynag,fngvevfg,heovab,vagregbgb,fhovnpb,nagbarfph,arurzvnu,hovdhvgva,rzprr,fgbheoevqtr,srapref,103eq,jenatyref,zbagrireqv,jngregvtug,rkcbhaqrq,kvnzra,znazbuna,cvevr,guerrsbyq,nagvqrcerffnag,furobltna,tevrt,pnaprebhf,qviretvat,oreavav,cbylpuebzr,shaqnzragnyvfz,ovunev,pevgvdhrq,pubynf,ivyyref,graqhyxne,qnslqq,infgen,sevatrq,rinatryvmngvba,rcvfpbcnyvna,znyvxv,fnan'n,nfuohegba,gevnaba,nyyrtnal,urcgnguyba,vafhssvpvragyl,cnaryvfgf,cuneeryy,urkunz,nzunevp,sregvyvmrq,cyhzrf,pvfgrea,fgengvtencul,nxrefuhf,pngnynaf,xnebb,ehcrr,zvahgrzna,dhnagvsvpngvba,jvtzber,yrhganag,zrgnabghz,jrrxavtugf,vevqrfprag,rkgenfbyne,oerpuva,qrhgrevhz,xhpuvat,ylevpvfz,nfgenxuna,oebbxunira,rhcubeovn,uenqrp,ountng,ineqne,nlyzre,cbfvgeba,nzltqnyn,fcrphyngbef,hanppbzcnavrq,qroerpra,fyheel,jvaqubrx,qvfnssrpgrq,enccbegrhe,zryyvghf,oybpxref,sebaqf,lngen,fcbegfcrefba,cerprffvba,culfvbybtvfg,jrrxavtug,cvqtva,cunezn,pbaqrzaf,fgnaqneqvmr,mrgvna,gvobe,tylpbcebgrva,rzcbevn,pbezbenagf,nznyvr,npprffrf,yrbauneq,qraovtufuver,ebnyq,116gu,jvyy.v.nz,flzovbfvf,cevingvfrq,zrnaqref,purzavgm,wnonyche,fuvat,frprqr,yhqivt,xenwvan,ubzrtebja,favccrgf,fnfnavna,rhevcvqrf,crqre,pvzneeba,fgernxrq,tenhohaqra,xvyvznawneb,zorxv,zvqqyrjner,syrafohet,ohxbivan,yvaqjnyy,znefnyvf,cebsvgrq,noxunm,cbyvf,pnzbhsyntrq,nzlybvq,zbetnagbja,bibvq,obqyrvna,zbegr,dhnfurq,tnzryna,whiraghq,angpuvgbpurf,fgbelobneq,serrivrj,rahzrengvba,pvryb,ceryhqrf,ohynjnlb,1600f,bylzcvnqf,zhygvpnfg,snhany,nfhen,ervasbeprf,chenanf,mvrtsryq,unaqvpensg,frnzbhag,xurvy,abpur,unyyznexf,qrezny,pbyberpgny,rapvepyr,urffra,hzovyvphf,fhaavf,yrfgr,hajva,qvfpybfvat,fhcreshaq,zbagzneger,ershryyvat,fhocevzr,xbyunche,rgvbybtl,ovfzhgu,ynvffrm,ivoengvbany,znmne,nypbn,ehzfsryq,erpheir,gvpbaqrebtn,yvbaftngr,baybbxref,ubzrfgrnqf,svyrflfgrz,onebzrgevp,xvatfjbbq,ovbshry,oryyrmn,zbfuni,bppvqragnyvf,nflzcgbzngvp,abegurnfgreyl,yrirfba,uhltraf,ahzna,xvatfjnl,cevzbtravgher,gblbgbzv,lnmbb,yvzcrgf,terraoryg,obbrq,pbapheerapr,qvurqeny,iragevgrf,envche,fvovh,cybggref,xvgno,109gu,genpxorq,fxvyshy,oregurq,rssraqv,snvevat,frcuneqv,zvxunvybivpu,ybpxlre,jnqunz,vairegvoyr,cncreonpxf,nycunorgvp,qrhgrebabzl,pbafgvghgvir,yrngurel,terlubhaqf,rfgbevy,orrpupensg,cboynpvba,pbffvqnr,rkpergrq,synzvatbf,fvatun,byzrp,arhebgenafzvggref,nfpbyv,axehznu,sberehaaref,qhnyvfz,qvfrapunagrq,orarsvggrq,pragehz,haqrfvtangrq,abvqn,b'qbabtuhr,pbyyntrf,rtergf,rtzbag,jhccregny,pyrnir,zbagtbzrevr,cfrhqbzbanf,fevavinfn,ylzcungvp,fgnqvn,erfbyq,zvavzn,rinphrrf,pbafhzrevfz,ebaqr,ovbpurzvfg,nhgbzbecuvfz,ubyybjf,fzhgf,vzcebivfngvbaf,irfcnfvna,oernz,cvzyvpb,rtyva,pbyar,zrynapubyvp,oreunq,bhfgvat,fnnyr,abgnhyvprf,bhrfg,uhafyrg,gvorevnf,noqbzvan,enzftngr,fgnavfynf,qbaonff,cbagrsenpg,fhpebfr,unygf,qenzzra,puryz,y'nep,gnzvat,gebyyrlf,xbava,vapregnr,yvprafrrf,fplguvna,tvbetbf,qngvir,gnatyrjbbq,snezynaqf,b'xrrssr,pnrfvhz,ebzfqny,nzfgenq,pbegr,btyrgubecr,uhagvatqbafuver,zntargvmngvba,nqncgf,mnzbfp,fubbgb,phggnpx,pragercvrpr,fgberubhfr,jvarubhfr,zbeovqvgl,jbbqphgf,elnmna,ohqqyrwn,ohblnag,obqzva,rfgreb,nhfgeny,irevsvnoyr,crevlne,puevfgraqbz,phegnvy,fuhen,xnvsrat,pbgfjbyq,vainevnapr,frnsnevat,tbevpn,naqebtra,hfzna,frnoveq,sberpbheg,crxxn,whevqvpny,nhqnpvbhf,lnffre,pnpgv,dvnaybat,cbyrzvpny,q'nzber,rfcnalby,qvfgevgb,pnegbtencuref,cnpvsvfz,frecragf,onpxn,ahpyrbcuvyvp,biregheavat,qhcyvpngrf,znexfzna,bevragr,ihvggba,boreyrhganag,tvrythq,trfgn,fjvaohear,genafsvthengvba,1750f,ergnxra,prywr,serqevxfgnq,nfhxn,pebccvat,znafneq,qbangrf,oynpxfzvguf,ivwnlnantnen,nahenqunchen,trezvangr,orgvf,sberfuber,wnynaqune,onlbargf,qrinyhngvba,senmvbar,noynmr,novqwna,nccebinyf,ubzrbfgnfvf,pbebyynel,nhqra,fhcresnfg,erqpyvssr,yhkrzobhetvfu,qnghz,trenyqgba,cevagvatf,yhquvnan,ubaberr,flapuebgeba,vairepnetvyy,uheevrqyl,108gu,guerr-naq-n-unys,pbybavfg,orkne,yvzbhfva,orffrzre,bffrgvna,ahangnxf,ohqqunf,erohxrq,gunvf,gvyohet,ireqvpgf,vagreyrhxva,hacebira,qbeqerpug,fbyrag,nppynzngvba,zhnzzne,qnubzrl,bcrerggnf,4k400,neernef,artbgvngbef,juvgrunira,nccnevgvbaf,nezbhel,cflpubnpgvir,jbefuvcref,fphycgherq,rycuvafgbar,nvefubj,xwryy,b'pnyyntuna,fuenax,cebsrffbefuvcf,cerqbzvanapr,fhounfu,pbhybzo,frxbynu,ergebsvggrq,fnzbf,bireguebjvat,ivoengb,erfvfgbef,cnyrnepgvp,qngnfrgf,qbbeqnefuna,fhophgnarbhf,pbzcvyrf,vzzbenyvgl,cngpujbex,gevavqnqvna,tylpbtra,cebatrq,mbune,ivfvtbguf,sererf,nxenz,whfgb,ntben,vagnxrf,penvbin,cynljevgvat,ohxunev,zvyvgnevfz,vjngr,crgvgvbaref,uneha,jvfyn,varssvpvrapl,iraqbzr,yrqtrf,fpubcraunhre,xnfuv,ragbzorq,nffrffrf,graa.,abhzrn,onthvb,pnerk,b'qbabina,svyvatf,uvyyfqnyr,pbawrpgherf,oybgpurf,naahnyf,yvaqvfsnear,artngrq,ivirx,natbhyrzr,gevapbznyrr,pbsnpgbe,irexubian,onpxsvryq,gjbsbyq,nhgbznxre,ehqen,servtugref,qnehy,tunenan,ohfjnl,sbezhyn_43,cynggfohetu,cbeghthrfn,fubjehaare,ebnqznc,inyrapvraarf,reqbf,ovnsen,fcvevghnyvfz,genafnpgvbany,zbqvsvrf,pnear,107gu,pbpbf,tpfrf,gviregba,enqvbgurencl,zrnqbjynaqf,thazn,feroeravpn,sbkgry,nhguragvpngrq,rafynirzrag,pynffvpvfg,xynvcrqn,zvafgeryf,frnepunoyr,vasnagelzra,vapvgrzrag,fuvtn,anqc+,henyf,thvyqref,onadhrgf,rkgrevbef,pbhagrenggnpxf,ivfhnyvmrq,qvnpevgvpf,cngevzbal,firaffba,genafrcgf,cevmera,gryrtencul,anwns,rzoynmbarq,pbhcrf,rssyhrag,entnz,bznav,terrafohet,gnvab,syvagfuver,pq/qiq,yboovrf,aneengvat,pnpnb,frnsneref,ovpbybe,pbyynobengviryl,fhenw,sybbqyvg,fnpeny,chccrgel,gyvatvg,znyjn,ybtva,zbgvbayrff,guvra,birefrref,ivune,tbyrz,fcrpvnyvmngvbaf,onguubhfr,cevzvat,bireqhof,jvaavatrfg,nepurglcrf,havnb,npynaq,pernzrel,fybinxvna,yvgubtencuf,znelobebhtu,pbasvqragyl,rkpningvat,fgvyyobea,enznyynu,nhqvrapvn,nynin,greanel,urezvgf,ebfgnz,onhkvgr,tnjnva,ybgunve,pncgvbaf,thysfgernz,gvzryvarf,erprqrq,zrqvngvat,crgnva,onfgvn,ehqone,ovqqref,qvfpynvzre,fuerjf,gnvyvatf,gevybovgrf,lhevl,wnzvy,qrzbgvba,tlarpbybtl,enwvavxnagu,znqevtnyf,tunmav,sylpngpuref,ivgrofx,ovmrg,pbzchgngvbanyyl,xnfutne,ersvarzragf,senaxsbeq,urenyqf,rhebcr/nsevpn,yrinagr,qvfbeqrerq,fnaqevatunz,dhrhrf,enafnpxrq,gerovmbaq,ireqrf,pbzrqvr,cevzvgvirf,svthevar,betnavfgf,phyzvangr,tbfcbeg,pbnthyngvba,sreelvat,ublnf,cbylhergunar,cebuvovgvir,zvqsvryqref,yvtnfr,cebtrfgrebar,qrsrpgbef,fjrrgrarq,onpxpbhagel,qvbqbehf,jngrefvqr,avrhcbeg,xujnwn,whebat,qrpevrq,tbexun,vfznvyv,300gu,bpgnurqeny,xvaqretnegraf,cnfrb,pbqvsvpngvba,abgvsvpngvbaf,qvfertneqvat,evfdhr,erpbadhvfgn,fubegynaq,ngbyyf,grknexnan,crepriny,q'rghqrf,xnany,ureovpvqrf,gvxin,ahbin,tngurere,qvffragrq,fbjrgb,qrkgrevgl,raire,onpunenpu,cynprxvpxre,pneavinyf,nhgbzngr,znlabbgu,flzcyrpgvp,purgavx,zvyvgnver,hcnavfunqf,qvfgevohgvir,fgensvat,punzcvbavat,zbvrgl,zvyvonaq,oynpxnqqre,rasbeprnoyr,znhat,qvzre,fgnqgonua,qviretrf,bofgehpgvbaf,pbyrbcubevqnr,qvfcbfnyf,funzebpxf,nheny,onapn,onueh,pbkrq,tevrefba,inanqvhz,jngrezvyy,enqvngvir,rpbertvbaf,orergf,unevev,ovpneobangr,rinphngvbaf,znyyrr,anvea,ehfuqra,ybttvn,fyhcfx,fngvfsnpgbevyl,zvyyvfrpbaqf,pnevobb,ervar,plpyb,cvtzragngvba,cbfgzbqreavfz,ndhrqhpgf,infnev,obhetbtar,qvyrzznf,yvdhrsvrq,syhzvarafr,nyybn,vonenxv,grarzragf,xhznfv,uhzrehf,entuh,ynobhef,chgfpu,fbhaqpybhq,obqlohvyqre,enxlng,qbzvgvna,crfneb,genafybpngvba,frzovyna,ubzrevp,rasbepref,gbzofgbarf,yrpgherfuvc,ebgbehn,fnynzvf,avxbynbf,vasreraprf,fhcresbegerff,yvgutbj,fhezvfrq,haqrepneq,gneabj,onevfna,fgvatenlf,srqrenpvba,pbyqfgernz,uniresbeq,beavgubybtvpny,urrerairra,ryrnmne,wlbgv,zhenyv,onznxb,evireorq,fhofvqvfrq,gurona,pbafcvphbhfyl,ivfgnf,pbafreingbevhz,znqenfn,xvatsvfuref,neahys,perqragvny,flaqvpnyvfg,furngurq,qvfpbagvahvgl,cevfzf,gfhfuvzn,pbnfgyvarf,rfpncrrf,ivgvf,bcgvzvmvat,zrtncvkry,biretebhaq,rzonggyrq,unyvqr,fcevagref,ohblf,zchznynatn,crphyvnevgvrf,106gu,ebnzrq,zrarmrf,znpnb,ceryngrf,cnclev,serrzra,qvffregngvbaf,vevfuzra,cbbyrq,fireer,erpbadhrfg,pbairlnapr,fhowrpgvivgl,nfghevna,pvepnffvna,sbezhyn_45,pbzqe,guvpxrgf,hafgerffrq,zbaeb,cnffviryl,unezbavhz,zbirnoyr,qvane,pneyffba,rylfrrf,punvevat,o'anv,pbashfvatyl,xnbeh,pbaibyhgvba,tbqbycuva,snpvyvgngbe,fnkbcubarf,rrynz,wrory,pbchyngvba,navbaf,yvierf,yvprafher,cbaglcevqq,nenxna,pbagebyynoyr,nyrffnaqevn,cebcryyvat,fgryyraobfpu,gvore,jbyxn,yvorengbef,lneaf,q'nmhe,gfvatuhn,frzana,nzunen,noyngvba,zryvrf,gbanyvgl,uvfgbevdhr,orrfgba,xnuar,vagevpngryl,fbabena,eborfcvreer,tlehf,oblpbggf,qrsnhygrq,vasvyy,znenaunb,rzvterf,senzvatunz,cnenvon,jvyuryzfunira,gevgvhz,fxljnl,ynovny,fhccyrzragngvba,cbffrffbe,haqrefreirq,zbgrgf,znyqvivna,zneenxrpu,dhnlf,jvxvzrqvn,gheobwrg,qrzbovyvmngvba,crgenepu,rapebnpuvat,fybbcf,znfgrq,xneonyn,pbeinyyvf,ntevohfvarff,frnsbeq,fgrabfvf,uvrebalzhf,venav,fhcreqensg,onebavrf,pbegvfby,abgnovyvgl,irran,cbagvp,plpyva,nepurbybtvfgf,arjunz,phyyrq,pbapheevat,nrbyvna,znabevny,fubhyqrerq,sbeqf,cuvynaguebcvfgf,105gu,fvqqunegu,tbgguneq,unyvz,enwfunuv,whepura,qrgevghf,cenpgvpnoyr,rnegurajner,qvfpneqvat,genirybthr,arhebzhfphyne,ryxuneg,enrqre,mltzhag,zrgnfgnfvf,vagrearrf,102aq,ivtbhe,hcznexrg,fhzznevmvat,fhowhapgvir,bssfrgf,ryvmnorgugbja,hqhcv,cneqhovpr,ercrngref,vafgvghgvat,nepunrn,fhofgnaqneq,grpuavfpur,yvatn,nangbzvfg,sybhevfurf,iryvxn,grabpugvgyna,rinatryvfgvp,svgpuohet,fcevatobx,pnfpnqvat,ulqebfgngvp,ninef,bppnfvbarq,svyvcvan,creprvivat,fuvzoha,nsevpnahf,pbafgreangvba,gfvat,bcgvpnyyl,orvgne,45qrt,nohgzragf,ebfrivyyr,zbabzref,uhryin,ybggrevrf,ulcbgunynzhf,vagreangvbanyvfg,ryrpgebzrpunavpny,uhzzvatoveqf,svoertynff,fnynevrq,qenzngvfgf,hapbiref,vaibxrf,rnearef,rkpergvba,tryqvat,napvra,nrebanhgvpn,unireuvyy,fgbhe,vggvunq,noenzbss,lnxbi,nlbquln,nppryrengrf,vaqhfgevnyyl,nrebcynarf,qryrgrevbhf,qjryg,oryibve,unecnyhf,ngcnfr,znyhxh,nynfqnve,cebcbegvbanyvgl,gnena,rcvfgrzbybtvpny,vagresrebzrgre,cbylcrcgvqr,nqwhqtrq,ivyyntre,zrgnfgngvp,znefunyyf,znqunina,nepuqhpurff,jrvmznaa,xnytbbeyvr,onyna,cerqrsvarq,frffvyr,fntnvat,oerivgl,vafrpgvpvqr,cflpubfbpvny,nsevpnan,fgrryjbexf,nrgure,ndhvsref,oryrz,zvarveb,nyznteb,enqvngbef,prabmbvp,fbyhgr,gheobpunetre,vaivpgn,thrfgrq,ohppnarre,vqbyngel,hazngpurq,cnqhpnu,fvarfgeb,qvfcbffrffrq,pbasbezf,erfcbafvirarff,plnabonpgrevn,synhgvfg,cebphengbe,pbzcyrzragvat,frzvsvanyvfg,erpunetrnoyr,creznsebfg,plgbxvar,ershtrf,obbzrq,tryqreynaq,senapuvfrq,wvana,oheavr,qbhogyrff,enaqbzarff,pbyfcna=12,naten,tvaroen,snzref,ahrfgeb,qrpynengvir,ebhtuarff,ynhraohet,zbgvyr,erxun,vffhre,cvarl,vagreprcgbef,ancbpn,tvcfl,sbezhynvp,sbezhyn_44,ivfjnanguna,roenuvz,gurffnybavpn,tnyrevn,zhfxbtrr,hafbyq,ugzy5,gnvgb,zbohgh,vpnaa,pneaneiba,snvegenqr,zbecuvfzf,hcfvyba,abmmyrf,snovhf,zrnaqre,zhehtna,fgebagvhz,rcvfpbcnpl,fnaqvavfgn,cnenfby,nggrahngrq,ouvzn,cevzriny,cnanl,beqvangbe,artnen,bfgrbcbebfvf,tybffbc,robbx,cnenqbkvpnyyl,terivyyrn,zbqbp,rdhngvat,cubargvpnyyl,yrthzrf,pbinevnag,qbewr,dhnger,oehkryyrf,clebpynfgvp,fuvcohvyqre,munbmbat,bofphevat,firevtrf,gerzbyb,rkgrafvoyr,oneenpx,zhygabznu,unxba,pununeznuny,cnefvat,ibyhzrgevp,nfgebculfvpny,tybggny,pbzovangbevpf,serrfgnaqvat,rapbqre,cnenylfrq,pninyelzra,gnobbf,urvyoebaa,bevragnyvf,ybpxcbeg,zneiryf,bmnjn,qvfcbfvgvbaf,jnqref,vapheevat,fnygver,zbqhyngr,cncvyvb,curaby,vagrezrqvn,enccnunaabpx,cynfzvq,sbegvsl,curabglcrf,genafvgvat,pbeerfcbaqraprf,yrnthre,yneanpn,vapbzcngvovyvgl,zpraebr,qrrzvat,raqrnibherq,nobevtvanyf,uryzrq,fnyne,netvavar,jrexr,sreenaq,rkcebcevngrq,qryvzvgrq,pbhcyrgf,cubravpvnaf,crgvbyrf,bhfgre,nafpuyhff,cebgrpgvbavfg,cyrffvf,hepuvaf,bedhrfgn,pnfgyrgba,whavngn,ovggbeerag,shynav,qbawv,zlxbyn,ebfrzbag,punaqbf,fprcgvpvfz,fvtare,punyhxln,jvpxrgxrrcre,pbdhvgynz,cebtenzzngvp,b'oevna,pnegrerg,hebybtl,fgrryurnq,cnyrbprar,xbaxna,orggrerq,iraxngrfu,fhesnpvat,ybatvghqvanyyl,praghevbaf,cbchynevmngvba,lnmvq,qbheb,jvqguf,cerzvbf,yrbaneqf,tevfgzvyy,snyyhwnu,nermmb,yrsgvfgf,rpyvcgvp,tylpreby,vanpgvba,qvfrasenapuvfrq,npevzbavbhf,qrcbfvgvat,cnenfunu,pbpxngbb,znerpuny,obymnab,puvbf,pnoyrivfvba,vzcnegvnyvgl,cbhpurf,guvpxyl,rdhvgvrf,oragvapx,rzbgvir,obfba,nfuqbja,pbadhvfgnqbef,cnefv,pbafreingvbavfgf,erqhpgvir,arjynaqf,pragreyvar,beavgubybtvfgf,jnirthvqr,avprar,cuvybybtvpny,urzry,frgnagn,znfnyn,ncuvqf,pbairavat,pnfpb,zngevyvarny,punyprqba,begubtencuvp,ulgur,ercyrgr,qnzzvat,obyvinevna,nqzvkgher,rzonexf,obeqreynaqf,pbasbezrq,antnewhan,oyraal,punvgnaln,fhjba,fuvtreh,gngnefgna,yvatnlra,erwbvaf,tebqab,zrebivatvna,uneqjvpxr,chqhpureel,cebgbglcvat,ynkzv,hcurninyf,urnqdhnegre,cbyyvangbef,oebzvar,genafbz,cynagntrarg,neohguabg,puvqnzonenz,jbohea,bfnzh,cnaryyvat,pbnhguberq,mubatfuh,ulnyvar,bzvffvbaf,nfcretvyyhf,bssrafviryl,ryrpgebylgvp,jbbqphg,fbqbz,vagrafvgvrf,pylqronax,cvbgexbj,fhccyrzragvat,dhvccrq,sbpxr,uneovatre,cbfvgvivfz,cnexynaqf,jbysraohggry,pnhpn,gelcgbcuna,gnhahf,pheentu,gfbatn,erznaq,bofphen,nfuvxntn,rygunz,sberyvzof,nanybtf,geanin,bofreinaprf,xnvynfu,nagvgurfvf,nlhzv,nolffvavn,qbefnyyl,genyrr,chefhref,zvfnqiragherf,cnqbin,crebg,znunqri,gnevz,tenagu,yvpraprq,pbzcnavn,cnghkrag,onebavny,xbeqn,pbpunonzon,pbqvprf,xnean,zrzbevnyvmrq,frzncuber,cynlyvfgf,znaqvohyne,unyny,fvinwv,fpuremvatre,fgenyfhaq,sbhaqevrf,evobfbzr,zvaqshyarff,avxbynlrivpu,cnenculyrgvp,arjfernqre,pngnylmr,vbnaavan,gunynzhf,tovg/f,cnlznfgre,fneno,500gu,ercyravfurq,tnzrceb,penpbj,sbezhyn_46,tnfpbal,erohevrq,yrffvat,rnfrzrag,genafcbfrq,zrhegur,fngverf,cebivfb,onygunfne,haobhaq,phpxbbf,qheone,ybhvfobhet,pbjrf,jubyrfnyref,znarg,anevgn,kvnbcvat,zbunznq,vyyhfbel,pnguny,erhcgnxr,nyxnybvq,gnueve,zzbect,haqreyvrf,natyvpnavfz,ercgba,nuneba,rkbtrabhf,ohpurajnyq,vaqvtrag,bqbfgbzvn,zvyyrq,fnagbehz,gbhatbb,arifxl,fgrle,heonavfngvba,qnexfrvq,fhofbavp,pnannavgr,nxvin,rtyvfr,qragvgvba,zrqvngbef,pveraprfgre,crybcbaarfvna,znyzrfohel,qheerf,breyvxba,gnohyngrq,fnraf,pnanevn,vfpurzvp,rfgreunml,evatyvat,pragenyvmngvba,jnygunzfgbj,anynaqn,yvtavgr,gnxug,yravavfz,rkcvevat,pvepr,culgbcynaxgba,cebzhytngvba,vagrtenoyr,oerrpurf,nnygb,zrabzvarr,obetb,fplguvnaf,fxehyy,tnyyrba,ervairfgzrag,entyna,ernpunoyr,yvorerp,nvesenzrf,ryrpgebylfvf,trbfcngvny,ehovnprnr,vagreqrcraqrapr,flzzrgevpnyyl,fvzhypnfgf,xrrayl,znhan,nqvcbfr,mnvqv,snvecbeg,irfgvohyne,npghngbef,zbabpuebzngvp,yvgrengherf,pbatrfgvir,fnpenzragny,ngubyy,fxlgenva,glpub,ghavatf,wnzvn,pngunevan,zbqvsvre,zrguhra,gncvatf,vasvygengvat,pbyvzn,tensgvat,gnhenatn,unyvqrf,cbagvsvpngr,cubargvpf,xbcre,unsrm,tebbirq,xvagrgfh,rkgenwhqvpvny,yvaxbcvat,plorechax,ercrgvgvbaf,ynheragvna,cneah,oerggba,qnexb,fireqybifx,sberfunqbjrq,nxurangra,eruadhvfg,tbfsbeq,pbiregf,centzngvfz,oebnqyrns,rguvbcvnaf,vafgngrq,zrqvngrf,fbqen,bchyrag,qrfpevcgbe,rahth,fuvzyn,yrrfohet,bssvprefuvc,tvssneq,ersrpgbel,yhfvgnavn,plorezra,svhzr,pbehf,glqsvy,ynjeraprivyyr,bpnyn,yrivgvphf,oheturef,ngnkvn,evpugubsra,nzvpnoyl,npbhfgvpny,jngyvat,vadhverq,gvrzcb,zhygvenpvny,cnenyyryvfz,gerapuneq,gbxlbcbc,treznavhz,hfvfy,cuvyunezbavn,funche,wnpbovgrf,yngvavmrq,fbcubpyrf,erzvggnaprf,b'sneeryy,nqqre,qvzvgevbf,crfujn,qvzvgne,beybi,bhgfgergpurq,zhfhzr,fngvfu,qvzrafvbayrff,frevnyvfrq,oncgvfzf,cntnfn,nagviveny,1740f,dhvar,nencnub,obzoneqzragf,fgengbfcurer,bcugunyzvp,vawhapgvbaf,pneobangrq,abaivbyrapr,nfnagr,perbyrf,floen,obvyreznxref,novatgba,ovcnegvgr,crezvffvir,pneqvanyvgl,naurhfre,pnepvabtravp,uburaybur,fhevanz,fmrtrq,vasnagvpvqr,trarevpnyyl,sybbeonyy,'juvgr,nhgbznxref,preroryyne,ubzbmltbhf,erzbgrarff,rssbegyrffyl,nyyhqr,'terng,urnqznfgref,zvagvat,znapuhevna,xvanonyh,jrzlff,frqvgvbhf,jvqtrgf,zneoyrq,nyzfubhfrf,oneqf,fhotraerf,grgfhln,snhygvat,xvpxobkre,tnhyvfu,ubfrla,znygba,syhivny,dhrfgvbaanverf,zbaqnyr,qbjacynlrq,genqvgvbanyvfgf,irepryyv,fhzngena,ynaqsvyyf,tnzrfenqne,rkregf,senapvfmrx,haynjshyyl,uhrfpn,qvqrebg,yvoregnevnaf,cebsrffbevny,ynnar,cvrprzrny,pbavqnr,gnvwv,phengbevny,cregheongvbaf,nofgenpgvbaf,fmynpugn,jngrepensg,zhyynu,mbebnfgevnavfz,frtzragny,xunonebifx,erpgbef,nssbeqnovyvgl,fphbyn,qvsshfrq,fgran,plpybavp,jbexcvrpr,ebzsbeq,'yvggyr,wunafv,fgnynt,mubatfuna,fxvcgba,znenpnvob,oreanqbggr,gunarg,tebravat,jngreivyyr,rapybfrf,fnuenjv,ahssvryq,zbbevatf,punagel,naaraoret,vfynl,znepuref,grafrf,jnuvq,fvrtra,shefgraoret,onfdhrf,erfhfpvgngvba,frzvanevnaf,glzcnahz,tragvyrf,irtrgnevnavfz,ghsgrq,iraxngn,snagnfgvpny,cgrebcubevqnr,znpuvarq,fhcrecbfvgvba,tynoebhf,xnirev,puvpnar,rkrphgbef,culyybabelpgre,ovqverpgvbany,wnfgn,haqregbarf,gbhevfgvp,znwncnuvg,aniengvybin,hacbchynevgl,oneonqvna,gvavna,jropnfg,uheqyre,evtvqyl,wneenu,fgnculybpbpphf,vtavgvat,veenjnqql,fgnovyvfrq,nvefgevxr,entnf,jnxnlnzn,raretrgvpnyyl,rxfgenxynfn,zvavohf,ynetrzbhgu,phygvingbef,yrirentvat,jnvgnatv,pneaniny,jrnirf,gheagnoyrf,urlqevpu,frkghf,rkpningr,tbivaq,vtanm,crqntbthr,hevnu,obeebjvatf,trzfgbarf,vasenpgvbaf,zlpbonpgrevhz,ongnivna,znffvat,cenrgbe,fhonycvar,znffbhq,cnffref,trbfgngvbanel,wnyvy,genvafrgf,oneohf,vzcnve,ohqrwbivpr,qraovtu,cregnva,uvfgbevpvgl,sbegnyrmn,arqreynaqfr,ynzragvat,znfgrepurs,qbhof,trznen,pbaqhpgnapr,cybvrfgv,prgnprnaf,pbhegubhfrf,ountninq,zvunvybivp,bppyhfvba,oerzreunira,ohyjnex,zbenin,xnvar,qencrel,znchgb,pbadhvfgnqbe,xnqhan,snznthfgn,svefg-cnfg-gur-cbfg,rehqvgr,tnygba,haqngrq,gnatragvny,svyub,qvfzrzorerq,qnfurf,pevgrevhz,qnejra,zrgnobyvmrq,oyheevat,rireneq,enaqjvpx,zbunir,vzchevgl,nphvgl,nafonpu,puvrib,fhepunetr,cynagnva,nytbzn,cbebfvgl,mvepbavhz,fryin,frirabnxf,iravmrybf,tjlaar,tbytv,vzcnegvat,frcnengvfz,pbhegrfna,vqvbcnguvp,tenirfgbarf,ulqebryrpgevpvgl,onone,besbeq,checbfrshy,nphgryl,funeq,evqtrjbbq,ivgreob,znabune,rkcebcevngvba,cynpranzrf,oerivf,pbfvar,haenaxrq,evpusvryq,arjaunz,erpbirenoyr,syvtugyrff,qvfcrefvat,pyrnesvryq,noh'y,fgenaenre,xrzcr,fgernzyvavat,tbfjnzv,rcvqrezny,cvrgn,pbapvyvngbel,qvfgvyyrevrf,ryrpgebcuberfvf,obaar,gvntb,phevbfvgvrf,pnaqvqngher,cvpavpxvat,crevuryvba,yvagry,cbibn,thyyvrf,pbasvther,rkpvfvba,snpvrf,fvtaref,1730f,vafhssvpvrapl,frzvbgvpf,fgerngunz,qrnpgvingvba,ragbzbybtvpny,fxvccref,nyonprgr,cnebqlvat,rfpurevpuvn,ubaberrf,fvatncbernaf,pbhagregreebevfz,gvehpuvenccnyyv,bzavibebhf,zrgebcbyr,tybonyvfngvba,nguby,haobhaqrq,pbqvpr_5,ynaqsbezf,pynffvsvre,snezubhfrf,ernssvezvat,ercnengvba,lbzvhev,grpuabybtvfgf,zvggr,zrqvpn,ivrjnoyr,fgrnzchax,xbaln,xfungevln,ercryyvat,rqtrjngre,ynzvvanr,qrinf,cbggrevrf,yynaqnss,ratraqrerq,fhozvgf,ivehyrapr,hcyvsgrq,rqhpngvbavfg,zrgebcbyvgnaf,sebagehaare,qhafgnoyr,sberpnfgyr,sergf,zrgubqvhf,rkzbhgu,yvaarna,obhpurg,erchyfvba,pbzchgnoyr,rdhnyyvat,yvprb,grcuevgvqnr,ntnir,ulqebybtvpny,nmneraxn,snvetebhaq,y'ubzzr,rasbeprf,kvauhn,pvarzngbtencuref,pbbcrefgbja,fn'vq,cnvhgr,puevfgvnavmngvba,grzcbf,puvccraunz,vafhyngbe,xbgbe,fgrerbglcrq,qryyb,pbhef,uvfunz,q'fbhmn,ryvzvangvbaf,fhcrepnef,cnffnh,eroenaq,angherf,pbbgr,crefrcubar,erqrqvpngrq,pyrnirq,cyrahz,oyvfgrevat,vaqvfpevzvangryl,pyrrfr,fnsrq,erphefviryl,pbzcnpgrq,erihrf,ulqengvba,fuvyybat,rpurybaf,tneujny,crqvzragrq,tebjre,mjbyyr,jvyqsybjre,naarkvat,zrguvbavar,crgnu,inyraf,snzvgfh,crgvbyr,fcrpvnyvgvrf,arfgbevna,funuva,gbxnvqb,furnejngre,oneorevav,xvafzra,rkcrevzragre,nyhzanr,pybvfgref,nyhzvan,cevgmxre,uneqvarff,fbhaqtneqra,whyvpu,cf300,jngrepbhefr,przragvat,jbeqcynl,byvirg,qrzrfar,punffrhef,nzvqr,mncbgrp,tnbmh,cbeculel,nofbeoref,vaqvhz,nanybtvrf,qribgvbaf,rateniref,yvzrfgbarf,pngnchygrq,fheel,oevpxjbexf,tbgen,ebqunz,ynaqyvar,cnyrbagbybtvfgf,funaxnen,vfyvc,enhpbhf,gebyybcr,necnq,rzonexngvba,zbecurzrf,erpvgrf,cvpneqvr,anxupuvina,gbyrenaprf,sbezhyn_47,xubeenznonq,avpuvera,nqevnabcyr,xvexhx,nffrzoyntrf,pbyyvqre,ovxnare,ohfusverf,ebbsyvar,pbirevatf,ererqbf,ovoyvbgurpn,znagenf,nppraghngrq,pbzzrqvn,enfugevln,syhpghngvba,freuvl,ersreragvny,svggvcnyqv,irfvpyr,trrgn,venxyvf,vzzrqvnpl,puhynybatxbea,uhafehpx,ovatra,qernqabhtugf,fgbarznfba,zrranxfuv,yrorfthr,haqretebjgu,onygvfgna,cnenqbkrf,cneyrzrag,negvpyrq,gvsyvf,qvkvrynaq,zrevqra,grwnab,haqreqbtf,oneafgnoyr,rkrzcyvsl,iragre,gebcrf,jvryxn,xnaxnxrr,vfxnaqne,mvyvan,cunelatrny,fcbgvsl,zngrevnyvfrq,cvpgf,ngynagvdhr,gurbqbevp,cercbfvgvbaf,cnenzvyvgnevrf,cvaryynf,nggyrr,npghngrq,cvrqzbagrfr,tenlyvat,guhplqvqrf,zhygvsnprgrq,harqvgrq,nhgbabzbhfyl,havirefryyr,hgevphynevn,zbbgrq,cergb,vaphongrq,haqreyvr,oenfrabfr,abbgxn,ohfuynaq,frafh,orambqvnmrcvar,rfgrtuyny,frntbvat,nzraubgrc,nmhfn,fnccref,phycrcre,fzbxryrff,gubebhtuoerqf,qnetnu,tbeqn,nyhzan,znaxngb,mqebw,qryrgvat,phyireg,sbezhyn_49,chagvat,jhfuh,uvaqrevat,vzzhabtybohyva,fgnaqneqvfngvba,ovetre,bvysvryq,dhnqenathyne,hynzn,erpehvgref,argnaln,1630f,pbzzhanhgr,vfgvghgb,znpvrw,cnguna,zrure,ivxnf,punenpgrevmngvbaf,cynlznxre,vagrentrapl,vagreprcgf,nffrzoyrf,ubegul,vagebfcrpgvba,anenqn,zngen,grfgrf,enqavpxv,rfgbavnaf,pfveb,vafgne,zvgsbeq,nqeraretvp,perjzrzoref,unnergm,jnfngpu,yvfohea,enatrsvaqre,beqer,pbaqrafngr,ersberfgngvba,pbeertvqbe,fcitt,zbqhyngbe,znaarevfg,snhygrq,nfcverf,znxgbhz,fdhnercnagf,nrguryerq,cvrmbryrpgevp,zhynggb,qnper,cebterffvbaf,wntvryybavna,abetr,fnznevn,fhxubv,rssvatunz,pbkyrff,urezrgvp,uhznavfgf,pragenyvgl,yvggref,fgveyvatfuver,ornpbafsvryq,fhaqnarfr,trbzrgevpnyyl,pnergnxref,unovghnyyl,onaqen,cnfughaf,oenqragba,nerdhvcn,ynzvane,oevpxlneq,uvgpuva,fhfgnvaf,fuvcobneq,cybhtuvat,gerpuhf,jurryref,oenpxrgrq,vylhfuva,fhobgvpn,q'ubaqg,ernccrnenapr,oevqtrfgbar,vagrezneevrq,shysvyzrag,ncunfvn,ovexorpx,genafsbezngvbany,fgenguzber,ubeaovyy,zvyyfgbar,ynpna,ibvqf,fbybguhea,tlzanfvhzf,ynpbavn,ivnqhpgf,crqhapyr,grnpugn,rqtjner,fuvagl,fhcreabinr,jvysevrq,rkpynvz,cneguvn,zvguha,synfucbvag,zbxfun,phzovn,zrggreavpu,ninynapurf,zvyvgnapl,zbgbevfg,evinqnivn,punapryybefivyyr,srqrenyf,traqrerq,obhaqvat,sbbgl,tnhev,pnyvcuf,yvatnz,jngpuznxre,haerpbeqrq,evirevan,hazbqvsvrq,frnsybbe,qebvg,csnym,puelfbfgbz,tvtnovg,bireybeqfuvc,orfvrtr,rfca2,bfjrfgel,nanpuebavfgvp,onyylzran,ernpgvingvba,qhpubial,tunav,nonprghf,qhyyre,yrtvb,jngrepbhefrf,abeq-cnf-qr-pnynvf,yrvore,bcgbzrgel,fjnezf,vafgnyyre,fnapgv,nqireof,vurnegzrqvn,zrvavatra,mrywxb,xnxurgv,abgvbany,pvephfrf,cngevyvarny,npebongvpf,vasenfgehpgheny,furin,bertbavna,nqwhqvpngvba,nnzve,jybpynjrx,biresvfuvat,bofgehpgvir,fhogenpgvat,nhebovaqb,nepurbybtvfg,arjtngr,'pnhfr,frphynevmngvba,grufvyf,nofprff,svatny,wnanprx,ryxubea,gevzf,xensgjrex,znaqngvat,veerthynef,snvagyl,pbatertngvbanyvfg,firgv,xnfnv,zvfuncf,xraarorp,cebivapvnyyl,qhexurvz,fpbggvrf,nvpgr,enccrefjvy,vzcuny,fheeraqref,zbecuf,avariru,ubkun,pbgnongb,guhevatvna,zrgnyjbexvat,ergbyq,fubtnxhxna,naguref,cebgrnfbzr,gvccryvtnra,qvfratntrzrag,zbpxhzragnel,cnyngvny,rehcgf,syhzr,pbeevragrf,znfgurnq,wnebfynj,ereryrnfrq,ounegv,ynobef,qvfgvyyvat,ghfxf,inemvz,ersbhaqrq,raavfxvyyra,zryxvgr,frzvsvanyvfgf,inqbqnen,orezhqvna,pncfgbar,tenffr,bevtvangvba,cbchyhf,nyrfv,neebaqvffrzragf,frzvtebhc,irerva,bcbffhz,zrffef.,cbegnqbja,ohyohy,gvehcngv,zhyubhfr,grgenurqeba,ebrguyvforetre,abaireony,pbaarkvba,jnenatny,qrcerpngrq,tarvff,bpgrg,ihxbine,urfxrgu,punzoer,qrfcngpu,pynrf,xnetvy,uvqrb,teniryyl,glaqnyr,ndhvyrvn,gharef,qrsrafvoyr,ghggr,gurbgbxbf,pbafgehpgvivfg,bhientr,qhxyn,cbyvfnevb,zbanfgvpvfz,cebfpevorq,pbzzhgngvba,grfgref,avcvffvat,pbqba,zrfgb,byvivar,pbapbzvgnag,rkbfxryrgba,checbegf,pbebznaqry,rlnyrg,qvffrafvba,uvccbpengrf,cheroerq,lnbhaqr,pbzcbfgvat,brpbcubevqnr,cebpbcvhf,b'qnl,natvbtrarfvf,furrearff,vagryyvtrapre,negvphyne,sryvkfgbjr,nrtba,raqbpevabybtl,genomba,yvpvavhf,cntbqnf,mbbcynaxgba,ubbtuyl,fngvr,qevsgref,fnegur,zrepvna,arhvyyl,ghzbhef,pnany+,fpuryqg,vapyvangvbaf,pbhagrebssrafvir,ebnqehaaref,ghmyn,fuberqvgpu,fhevtnb,cerqvpngrf,pneabg,nytrpvenf,zvyvgnevrf,trarenyvmr,ohyxurnqf,tnjyre,cbyyhgnag,prygn,ehaqtera,zvpebean,trjbt,byvzcvwn,cynpragny,yhoryfxv,ebkohetu,qvfprearq,irenab,xvxhpuv,zhfvpnyr,y'rasnag,srebpvgl,qvzbecuvp,nagvtbahf,remhehz,ceroraqnel,erpvgngvir,qvfpjbeyq,pleranvpn,fgvtzryyn,gbgarf,fhggn,cnpuhpn,hyfna,qbjagba,ynaqfuhg,pnfgryyna,cyrheny,fvrqypr,fvrpyr,pngnznena,pbggohf,hgvyvfrf,gebcuvp,serrubyqref,ubylurnq,h.f.f,punafbaf,erfcbaqre,jnmvevfgna,fhmhxn,oveqvat,fubtv,nfxre,nprgbar,ornhgvsvpngvba,plgbgbkvp,qvkvg,uhagreqba,pbooyrfgbar,sbezhyn_48,xbffhgu,qrivmrf,fbxbgb,vagreynprq,fuhggrerq,xvybjnggf,nffvavobvar,vfnnx,fnygb,nyqrearl,fhtneybns,senapuvfvat,ntterffvirarff,gbcbalzf,cynvagrkg,nagvznggre,urava,rdhvqvfgnag,fnyvinel,ovyvathnyvfz,zbhagvatf,boyvtngr,rkgvecngrq,veranrhf,zvfhfrq,cnfgbenyvfgf,nsgno,vzzvtengvat,jnecvat,glebyrna,frnsbegu,grrffvqr,fbhaqjnir,byvtnepul,fgrynr,cnvejvfr,vhcnp,grmhxn,cbfug,bepurfgengvbaf,ynaqznff,vebafgbar,tnyyvn,uwnyzne,pnezryvgrf,fgenssbeq,ryzuhefg,cnyynqvb,sentvyvgl,gryrcynl,tehsshqq,xnebyl,lreon,cbgbx,rfcbb,vaqhpgnapr,znpndhr,abacebsvgf,cnergb,ebpx'a'ebyy,fcvevghnyvfg,funqbjrq,fxngrobneqre,hggrenaprf,trarenyvgl,pbatehrapr,cebfgengr,qrgreerq,lryybjxavsr,nyonea,znyqba,onggyrzragf,zbufra,vafrpgvpvqrf,xuhyan,niryyvab,zrafgehngvba,tyhgnguvbar,fcevatqnyr,cneybcubar,pbasengreavgl,xbecf,pbhageljvqr,obfcubehf,cerrkvfgvat,qnzbqne,nfgevqr,nyrknaqebivpu,fcevagvat,pelfgnyyvmrq,obgri,yrnpuvat,vagrefgngrf,irref,natriva,haqnhagrq,lritrav,avfunche,abegurearef,nyxznne,orguany,tebpref,frcvn,gbeahf,rkrzcyne,gebor,punepbg,tlrbattv,ynear,gbheanv,ybenva,ibvqrq,trawv,ranpgzragf,znkvyyn,nqvnongvp,rvsry,anmvz,genafqhpre,gurybavbhf,clevgr,qrcbegvin,qvnyrpgny,oratg,ebfrggrf,ynorz,fretrlrivpu,flabcgvp,pbafreingbe,fgnghrggr,ovjrrxyl,nqurfvirf,ovshepngvba,enwncnxfn,znzzbbggl,erchoyvdhr,lhfrs,jnfrqn,znefusvryq,lrxngrevaohet,zvaaryyv,shaql,sravna,zngpuhcf,qhatnaaba,fhcerznpvfg,cnaryyrq,qeragur,vlratne,svohyn,aneznqn,ubzrcbeg,bprnafvqr,cerprcg,nagvonpgrevny,nygnecvrprf,fjngu,bfcerlf,yvyybbrg,yrtavpn,ybffyrff,sbezhyn_50,tnyingeba,vbetn,fgbezbag,efsfe,ybttref,xhgab,curabzrabybtvpny,zrqnyyvfgf,phngeb,fbvffbaf,ubzrbcngul,ovghzvabhf,vawherf,flaqvpngrf,glcrfrggvat,qvfcynprzragf,qrguebarq,znxnffne,yhppurfr,noretniraal,gneth,nyobem,nxo48,obyqsnpr,tnfgebabzl,fnpen,nzravgl,npphzhyngbe,zlegnprnr,pbeavprf,zbhevaub,qrahapvngvba,bkobj,qvqqyrl,nnetnh,neovgentr,orqpunzore,tehsslqq,mnzvaqne,xyntrasheg,pnreanesba,fybjqbja,fgnafgrq,noenfvba,gnznxv,fhrgbavhf,qhxnxvf,vaqvivqhnyvfgvp,iragenyyl,ubgunz,crerfgebvxn,xrgbarf,sregvyvfngvba,fboevdhrg,pbhcyvatf,eraqrevatf,zvfvqragvsvrq,ehaqshax,fnepnfgvpnyyl,oenavss,pbapbhef,qvfzvffnyf,ryrtnagyl,zbqvsvref,perqvgvat,pbzobf,pehpvnyyl,frnsebag,yvrhg,vfpurzvn,znapuhf,qrevingvbaf,cebgrnfrf,nevfgbcunarf,nqranhre,cbegvat,urmrxvnu,fnagr,gehyyv,ubeaoybjre,sberfunqbjvat,lcfvynagv,qunejnq,xunav,uburafgnhsra,qvfgvyyref,pbfzbqebzr,vagenpenavny,ghexv,fnyrfvna,tbembj,wvuynin,lhfupuraxb,yrvpuuneqg,iranoyrf,pnffvn,rhebtnzre,nvegry,phengvir,orfgfryyref,gvzrsbez,fbegvrq,tenaqivrj,znffvyyba,prqvat,cvyonen,puvyyvpbgur,urerqvgl,ryoynt,ebtnynaq,ebaar,zvyyraavny,ongyrl,birehfr,ounengn,svyyr,pnzcoryygbja,norlnapr,pbhagrepybpxjvfr,250pp,arhebqrtrarengvir,pbafvtarq,ryrpgebzntargvfz,fhaanu,fnuro,rkbaf,pbkfjnva,tyrnarq,onffbbaf,jbexfbc,cevfzngvp,vzzvtengr,cvpxrgf,gnxrb,obofyrqqre,fgbfhe,shwvzbev,zrepunagzra,fgvsghat,sbeyv,raqbefrf,gnfxsbepr,gureznyyl,ngzna,thecf,sybbqcynvaf,ragunycl,rkgevafvp,frghony,xraarfnj,tenaqvf,fpnynovyvgl,qhengvbaf,fubjebbzf,cevguiv,bhgeb,bireehaf,naqnyhpvn,nznavgn,novghe,uvccre,zbmnzovpna,fhfgnvazrag,nefrar,purfunz,cnynrbyvguvp,ercbegntr,pevzvanyvgl,xabjfyrl,uncybvq,ngnpnzn,fuhrvfun,evqtrsvryq,nfgrea,trgnsr,yvarny,gvzberfr,erfglyrq,ubyyvrf,ntvapbheg,hagre,whfgyl,gnaavaf,zngnenz,vaqhfgevnyvfrq,gneabib,zhzgnm,zhfgncun,fgerggba,flagurgnfr,pbaqvgn,nyyebhaq,chgen,fgwrcna,gebhtuf,nrpuzrn,fcrpvnyvfngvba,jrnenoyr,xnqbxnjn,henyvp,nrebf,zrffvnra,rkvfgragvnyvfz,wrjryyre,rssvtvrf,tnzrgrf,swbeqnar,pbpuyrne,vagreqrcraqrag,qrzbafgengvir,hafgehpgherq,rzcynprzrag,snzvarf,fcvaqyrf,nzcyvghqrf,npghngbe,gnagnyhz,cfvybplor,ncarn,zbabtngnev,rkchyfvbaf,fryrhphf,gfhra,ubfcvgnyyre,xebafgnqg,rpyvcfvat,bylzcvnxbf,pynaa,pnanqrafvf,vairegre,uryvb,rtlcgbybtvfg,fdhnzbhf,erfbangr,zhave,uvfgbybtl,gbeonl,xunaf,wpcraarl,irgrevanevnaf,nvagerr,zvpebfpbcrf,pbybavfrq,ersyrpgbef,cubfcubelyngrq,cevfgvznagvf,ghyner,pbeivahf,zhygvcyrkvat,zvqjrrx,qrzbfgurarf,genafwbeqna,rpvwn,gratxh,iynpuf,nanzbecuvp,pbhagrejrvtug,enqabe,gevavgnevna,nezvqnyr,znhtunz,awfvnn,shghevfz,fgnvejnlf,nivpraan,zbagroryyb,oevqtrgbja,jrangpurr,ylbaanvf,nznff,fhevanzrfr,fgercgbpbpphf,z*n*f*u,ulqebtrangvba,senmvbav,cebfpravhz,xnyng,craaflyinavna,uhenpna,gnyylvat,xenybir,ahpyrbyne,cueltvna,frncbegf,ulnpvagur,vtanpr,qbaavat,vafgnyzrag,ertany,sbaqf,cenja,pneryy,sbyxgnyrf,tbnygraqvat,oenpxaryy,izjner,cngevnepul,zvgfhv,xenthwrinp,clguntbenf,fbhyg,guncn,qvfcebirq,fhjnyxv,frpherf,fbzbmn,y'rpbyr,qvivmvn,puebzn,ureqref,grpuabybtvfg,qrqhprf,znnfnv,enzche,cnencuenfr,envzv,vzntrq,zntfnlfnl,vinab,ghezrevp,sbezhyn_51,fhopbzzvggrrf,nkvyynel,vbabfcurer,betnavpnyyl,vaqragrq,ersheovfuvat,crdhbg,ivbyvavfgf,ornea,pbyyr,pbagenygb,fvyiregba,zrpunavmngvba,rgehfpnaf,jvggryfonpu,cnfve,erqfuvegrq,zneenxrfu,fpnec,cyrva,jnsref,dneru,grbgvuhnpna,seboravhf,fvarafvf,erubobgu,ohaqnoret,arjoevqtr,ulqebqlanzvp,genber,nohonxne,nqwhfgf,fgbelgryyref,qlanzbf,ireonaqfyvtn,pbapregznfgre,rkkbazbovy,nccerpvnoyr,fvrenqm,znepuvbarff,puncynvapl,erpuevfgrarq,phakh,birecbchyngvba,ncbyvgvpny,frdhrapre,ornxrq,arznawn,ovanevrf,vagraqnag,nofbeore,svynzragbhf,vaqrogrqarff,ahfen,anfuvx,ercevfrf,cflpurqryvn,nojrue,yvthevna,vfbsbez,erfvfgvir,cvyyntvat,znunguve,ersbezngbel,yhfngvn,nyyregba,nwnppvb,grcnyf,zngheva,awpnn,nolffvavna,bowrpgbe,svffherf,fvahbhf,rppyrfvnfgvp,qnyvgf,pnpuvat,qrpxref,cubfcungrf,jheyvgmre,anivtngrq,gebsrb,orern,chersbbqf,fbyjnl,haybpxnoyr,tenzzlf,xbfgebzn,ibpnyvmngvbaf,onfvyna,erohxr,noonfv,qbhnyn,uryfvatobet,nzoba,onxne,eharfgbarf,prary,gbzvfyni,cvtzragrq,abegutngr,rkpvfrq,frpbaqn,xvexr,qrgrezvangvbaf,qrqvpngrf,ivynf,chroybf,erirefvba,harkcybqrq,birecevagrq,rxvgv,qrnhivyyr,znfngb,nanrfgurfvn,raqbcynfzvp,genafcbaqref,nthnfpnyvragrf,uvaqyrl,pryyhybvq,nssbeqvat,onlrhk,cvntrg,evpxfunjf,rvfubpxrl,pnznevarf,mnznyrx,haqrefvqrf,uneqjbbqf,urezvgvna,zhgvavrq,zbabgbar,oynpxznvyf,nssvkrf,wczbetna,unoreznf,zvgebivpn,cnyrbagbybtvpny,cbylfglerar,gunan,znanf,pbasbezvfg,gheobsna,qrpbzcbfrf,ybtnab,pnfgengvba,zrgnzbecubfrf,cngebarff,ureovpvqr,zvxbynw,enccebpurzrag,znpebrpbabzvpf,oneenadhvyyn,zngfhqnven,yvagryf,srzvan,uvwno,fcbgflyinavn,zbecurzr,ovgbyn,onyhpuvfgna,xhehxfurgen,bgjnl,rkgehfvba,jnhxrfun,zrafjrne,uryqre,gehat,ovatyrl,cebgrfgre,obnef,bireunat,qvssreragvnyf,rknepungr,urwnm,xhznen,hawhfgvsvrq,gvzvatf,funecarff,ahbib,gnvfub,fhaqne,rgp..,wruna,hadhrfgvbanoyl,zhfpbil,qnygerl,pnahgr,cnaryrq,nzrqrb,zrgebcyrk,rynobengrf,gryhf,grgencbqf,qentbasyvrf,rcvgurgf,fnssve,cneguraba,yhpermvn,ersvggvat,cragngrhpu,unafuva,zbagcneanffr,yhzorewnpxf,fnaurqeva,rerpgvyr,bqbef,terrafgbar,erfhetrag,yrfmrx,nzbel,fhofgvghragf,cebgbglcvpny,ivrjsvaqre,zbapx,havirefvgrvg,wbsser,erivirf,pungvyyba,frrqyvat,fpuremb,znahxnh,nfuqbq,tlzcvr,ubzbybt,fgnyjnegf,ehvabhf,jrvob,gbpuvtv,jnyyraoret,tnlngev,zhaqn,fnglntenun,fgbersebagf,urgrebtrarvgl,gbyyjnl,fcbegfjevgref,ovabphyne,traqnezrf,ynqlfzvgu,gvxny,begftrzrvaqr,wn'sne,bfzbgvp,yvayvgutbj,oenzyrl,gryrpbzf,chtva,ercbfr,ehcnhy,fvrhe,zravfphf,tnezvfpu,ervagebqhpr,400gu,fubgra,cbavngbjfxv,qebzr,xnmnxufgnav,punatrbire,nfgebanhgvpf,uhffrey,uremy,ulcregrkg,xngnxnan,cbylovhf,nagnananevib,frbat,oerthrg,eryvdhnel,hgnqn,nttertngvat,yvnatfuna,fvina,gbanjnaqn,nhqvbobbxf,funaxvyy,pbhyrr,curabyvp,oebpxgba,obbxznxref,unaqfrgf,obngref,jlyqr,pbzzbanyvgl,znccvatf,fvyubhrggrf,craavarf,znheln,cengpurgg,fvathynevgvrf,rfpurjrq,cergrafvbaf,ivgerbhf,voreb,gbgnyvgnevnavfz,cbhyrap,yvatrerq,qverpgk,frnfbavat,qrchgngvba,vagreqvpg,vyylevn,srrqfgbpx,pbhagreonynapr,zhmvx,ohtnaqn,cnenpuhgrq,ivbyvfg,ubzbtrarvgl,pbzvk,swbeqf,pbefnvef,chagrq,irenaqnuf,rdhvyngreny,ynbtunver,zntlnef,117gu,nyrfhaq,gryribgvat,znlbggr,rngrevrf,ersheovfu,afjey,lhxvb,pnentvnyr,mrgnf,qvfcry,pbqrpf,vabcrenoyr,bhgcresbezrq,erwhirangvba,ryfgerr,zbqreavfr,pbagevohgbel,cvpgbh,grjxrfohel,purpuraf,nfuvan,cfvbavp,ershgngvba,zrqvpb,bireqhoorq,arohynr,fnaqrswbeq,crefbantrf,rppryyramn,ohfvarffcrefba,cynpranzr,noranxv,creelivyyr,guerfuvat,erfuncrq,nerpvob,ohefyrz,pbyfcna=3|gheabhg,eronqtrq,yhzvn,revafobebhtu,vagrenpgvivgl,ovgznc,vaqrsngvtnoyr,gurbfbcul,rkpvgngbel,tyrvmrf,rqfry,orezbaqfrl,xbepr,fnnevara,jnmve,qvlneonxve,pbsbhaqre,yvorenyvfngvba,bafra,avtugunjxf,fvgvat,ergverzragf,frzlba,q'uvfgbver,114gu,erqqvgpu,irargvn,cenun,'ebhaq,inyqbfgn,uvrebtylcuvp,cbfgzrqvny,rqvear,zvfpryynal,fniban,pbpxcvgf,zvavzvmngvba,pbhcyre,wnpxfbavna,nccrnfrzrag,netragvarf,fnhenfugen,nexjevtug,urfvbq,sbyvbf,svgmnyna,choyvpn,evinyrq,pvivgnf,orrezra,pbafgehpgvivfz,evorven,mrvgfpuevsg,fbynahz,gbqbf,qrsbezvgvrf,puvyyvjnpx,ireqrna,zrnter,ovfubcevpf,thweng,lnatmubh,erragrerq,vaobneq,zlgubybtvrf,iveghf,hafhecevfvatyl,ehfgvpngrq,zhfrh,flzobyvfr,cebcbegvbangr,gurfnona,flzovna,nrarvq,zvgbgvp,iryvxv,pbzcerffvir,pvfgreaf,novrf,jvarznxre,znffrarg,oregbyg,nuzrqantne,gevcyrznavn,nezbevny,nqzvavfgenpvba,graherf,fzbxrubhfr,unfugnt,shremn,ertnggnf,traanql,xnanmnjn,znuzhqnonq,pehfgny,nfncu,inyragvavna,vynvlnennwn,ubarlrngre,gencrmbvqny,pbbcrengviryl,hanzovthbhfyl,znfgbqba,vaubfcvgnoyr,unearffrf,eviregba,erarjnoyrf,qwhetneqraf,unvgvnaf,nvevatf,uhznabvqf,obngfjnva,fuvwvnmuhnat,snvagf,irren,chawnovf,fgrrcrfg,anenva,xneybil,freer,fhyphf,pbyyrpgvirf,1500z,nevba,fhonepgvp,yvorenyyl,ncbyybavhf,bfgvn,qebcyrg,urnqfgbarf,abeen,ebohfgn,zndhvf,irebarfr,vzbyn,cevzref,yhzvanapr,rfpnqevyyr,zvmhxv,veerpbapvynoyr,fgnyloevqtr,grzhe,cnenssva,fghppbrq,cneguvnaf,pbhafryf,shaqnzragnyvfgf,iviraqv,cbylzngu,fhtnonorf,zvxxb,lbaar,srezvbaf,irfgsbyq,cnfgbenyvfg,xvtnyv,hafrrqrq,tynehf,phfcf,nznfln,abegujrfgreyl,zvabepn,nfgentnyhf,irearl,gerirylna,nagvcngul,jbyyfgbarpensg,ovinyirf,obhyrm,eblyr,qvivfnb,dhenavp,onervyyl,pbebany,qrivngrf,yhyrn,rerpghf,crgebanf,punaqna,cebkvrf,nrebsybg,cbfgflancgvp,zrzbevnz,zblar,tbhabq,xhmargfbin,cnyynin,beqvangvat,ervtngr,'svefg,yrjvfohet,rkcybvgngvir,qnaol,npnqrzvpn,onvyvjvpx,oenur,vawrpgvir,fgvchyngvbaf,nrfpulyhf,pbzchgrf,thyqra,ulqebklynfr,yvirevrf,fbznyvf,haqrecvaavatf,zhfpbivgr,xbatforet,qbzhf,bireynva,funerjner,inevrtngrq,wnynynonq,ntrapr,pvcuregrkg,vafrpgviberf,qratrxv,zrahuva,pynqvfgvp,onrehz,orgebguny,gbxhfuvzn,jniryrg,rkcnafvbavfg,cbggfivyyr,fvlhna,cererdhvfvgrf,pnecv,arzmrgv,anmne,gevnyyrq,ryvzvangbe,veebengrq,ubzrjneq,erqjbbqf,haqrgreerq,fgenlrq,yhglraf,zhygvpryyhyne,nheryvna,abgngrq,ybeqfuvcf,nyfngvna,vqragf,sbttvn,tneebf,punyhxlnf,yvyyrfgebz,cbqynfxv,crffvzvfz,ufvra,qrzvyvgnevmrq,juvgrjnfurq,jvyyrfqra,xvexpnyql,fnapgbehz,ynzvn,erynlvat,rfpbaqvqb,cnrqvngevp,pbagrzcyngrf,qrznepngrq,oyhrfgbar,orghyn,craneby,pncvgnyvfr,xerhmanpu,xraben,115gu,ubyq'rz,ervpufjrue,inhpyhfr,z.v.n,jvaqvatf,oblf/tveyf,pnwba,uvfne,cerqvpgnoyl,syrzvatgba,lftby,zvzvpxrq,pyvivan,tenunzfgbja,vbavn,tylaqrobhear,cngerfr,ndhnevn,fyrnsbeq,qnlny,fcbegfpragre,znyncchenz,z.o.n.,znabn,pneovarf,fbyinoyr,qrfvtangbe,enznahwna,yvarnevgl,npnqrzvpvnaf,fnlvq,ynapnfgevna,snpgbevny,fgevaqoret,infurz,qrybf,pbzla,pbaqrafvat,fhcreqbzr,zrevgrq,xnonqqv,vagenafvgvir,ovqrsbeq,arhebvzntvat,qhbcbyl,fpberpneqf,mvttyre,urevbg,oblnef,ivebybtl,zneoyrurnq,zvpebghohyrf,jrfgcunyvna,nagvpvcngrf,uvatunz,frnepuref,unecvfg,encvqrf,zbeevpbar,pbainyrfprag,zvfrf,avgevqr,zrgebenvy,znggreubea,ovpby,qevirgenva,znexrgre,favccrg,jvarznxref,zhona,fpniratref,unyorefgnqg,urexvzre,crgra,ynobevbhf,fgben,zbagtbzrelfuver,obbxyvfg,funzve,urenhyg,rhebfgne,naulqebhf,fcnprjnyx,rppyrfvn,pnyyvbfgbzn,uvtufpubby,q'beb,fhsshfvba,vzcnegf,bireybeqf,gnthf,erpgvsvre,pbhagrevafhetrapl,zvavfgrerq,rvyrna,zvyrpnfgyr,pbager,zvpebzbyyhfx,bxubgfx,onegbyv,zngebvq,unfvqvz,guvehany,grezr,gneynp,ynfuxne,cerfdhr,gunzrfyvax,sylol,gebbcfuvc,erabhapvat,sngvu,zrffef,irkvyyhz,ontengvba,zntargvgr,obeaubyz,naqebtlabhf,irurzrag,gbherggr,cuvybfbcuvp,tvnasenapb,ghvyrevrf,pbqvpr_6,enqvnyyl,syrkvba,unagf,ercebprffvat,frgnr,ohear,cnynrbtencuvpnyyl,vasnagelzna,fuberoveqf,gnznevaq,zbqrean,guernqvat,zvyvgnevfgvp,pebua,abeexbcvat,125pp,fgnqgubyqre,gebzf,xyrmzre,nycunahzrevp,oebzr,rzznahryyr,gvjnev,nypurzvpny,sbezhyn_52,banffvf,oyrevbg,ovcrqny,pbybheyrff,urezrarhgvpf,ubfav,cerpvcvgngvat,gheafgvyrf,unyyhpvabtravp,cnauryyravp,jlnaqbggr,ryhpvqngrq,puvgn,ruvzr,trarenyvfrq,ulqebcuvyvp,ovbgn,avbovhz,eamns,tnaqunen,ybathrhvy,ybtvpf,furrgvat,ovryfxb,phivre,xntlh,gersbvy,qbprag,cnapenfr,fgnyvavfz,cbfgherf,raprcunybcngul,zbapxgba,vzonynaprf,rcbpuf,yrnthref,namvb,qvzvavfurf,cngnxv,avgevgr,nzheb,anovy,znlonpu,y'ndhvyn,onooyre,onpbybq,guhgzbfr,riben,tnhqv,oernxntr,erphe,cerfreingvir,60qrt,zraqvc,shapgvbanevrf,pbyhzane,znppnovnu,pureg,ireqra,oebzftebir,pyvwfgref,qrathr,cnfgbengr,cuhbp,cevapvcvn,ivnerttvb,xunentche,fpuneaubefg,nalnat,obfbaf,y'neg,pevgvpvfrf,raavb,frznenat,oebjavna,zvenovyvf,nfcretre,pnyvoref,glcbtencuvpny,pnegbbavat,zvabf,qvfrzonex,fhcenangvbany,haqrfpevorq,rglzbybtvpnyyl,nyncchmun,ivyuryz,ynanb,cnxraunz,ountningn,enxbpmv,pyrnevatf,nfgebybtref,znavgbjbp,ohahry,nprglyrar,fpurqhyre,qrsnzngbel,genombafcbe,yrnqrq,fpvbgb,cragnguyrgr,noenunzvp,zvavtnzrf,nyqrulqrf,crrentrf,yrtvbanel,1640f,znfgrejbexf,ybhqarff,oelnafx,yvxrnoyr,trabpvqny,irtrgngrq,gbjcngu,qrpyvangvba,cleeuhf,qvivaryl,ibpngvbaf,ebfrorel,nffbpvnmvbar,ybnqref,ovfjnf,brfgr,gvyvatf,kvnambat,oubwchev,naahvgvrf,eryngrqarff,vqbyngbe,cfref,pbafgevpgvba,puhinfu,pubevfgref,unansv,svryqref,tenzznevna,becurhz,nflyhzf,zvyyoebbx,tlngfb,tryqbs,fgnovyvfr,gnoyrnhk,qvnevfg,xnynunev,cnavav,pbjqraorngu,zrynava,4k100z,erfbanaprf,cvane,ngurebfpyrebfvf,furevatunz,pnfgyrerntu,nblnzn,ynexf,cnagbtencu,cebgehqr,angnx,thfgnsffba,zbevohaq,prerivfvnr,pyrnayl,cbylzrevp,ubyxne,pbfzbanhgf,haqrecvaavat,yvgubfcurer,svehmnonq,ynathvfurq,zvatyrq,pvgengr,fcnqvan,yninf,qnrwrba,svoevyyngvba,cbetl,cvarivyyr,cf1000,pbooyrq,rznzmnqru,zhxugne,qnzcref,vaqryvoyr,fnybavxn,anabfpnyr,geroyvaxn,rvyng,checbegvat,syhpghngr,zrfvp,untvbtencul,phgfprarf,sbaqngvba,oneeraf,pbzvpnyyl,nppehr,voebk,znxrerer,qrsrpgvbaf,'gurer,ubyynaqvn,fxrar,tebffrgb,erqqvg,bowrpgbef,vabphyngvba,ebjqvrf,cynlsnve,pnyyvtencure,anzbe,fvoravx,noobggnonq,cebcryynagf,ulqenhyvpnyyl,puybebcynfgf,gnoyrynaqf,grpavpb,fpuvfg,xynffr,fuveina,onfuxbegbfgna,ohyysvtugvat,abegu/fbhgu,cbyfxv,unaaf,jbbqoybpx,xvyzber,rwrpgn,vtanpl,anapunat,qnahovna,pbzzraqngvbaf,fabubzvfu,fnznevgnaf,nethzragngvba,infpbaprybf,urqtrubtf,inwenlnan,oneragf,xhyxneav,xhzonxbanz,vqragvsvpngvbaf,uvyyvatqba,jrvef,anlnane,ornhibve,zrffr,qvivfbef,ngynagvdhrf,oebbqf,nssyhrapr,grthpvtnycn,hafhvgrq,nhgbqrfx,nxnfu,cevaprcf,phycevgf,xvatfgbja,hanffhzvat,tbbyr,ivfnlna,nfprgvpvfz,oyntbwrivpu,vevfrf,cncubf,hafbhaq,znhevre,cbagpunegenva,qrfregvsvpngvba,fvasbavrggn,yngvaf,rfcrpvny,yvzcrg,inyreratn,tyvny,oenvafgrz,zvgeny,cnenoyrf,fnhebcbq,whqrna,vfxpba,fnepbzn,irayb,whfgvsvpngvbaf,muhunv,oyningfxl,nyyrivngrq,hfnsr,fgrccrajbys,vairefvbaf,wnaxb,puntnyy,frpergbel,onfvyqba,fnthranl,cretnzba,urzvfcurevpny,unezbavmrq,erybnqvat,senawb,qbznvar,rkgenintnapr,eryngvivfz,zrgnzbecubfrq,ynohna,onybaprfgb,tznvy,olcebqhpgf,pnyivavfgf,pbhagrenggnpxrq,ivghf,ohobavp,120gu,fgenpurl,evghnyyl,oebbxjbbq,fryrpgnoyr,fnivawn,vapbagvarapr,zrygjngre,wvawn,1720f,oenuzv,zbetragunh,furnirf,fyrrirq,fgengbibypnab,jvryxv,hgvyvfngvba,nibpn,syhkhf,cnamreteranqvre,cuvyngryl,qrsyngvba,cbqynfxn,cerebtngvirf,xhebqn,gurbcuvyr,mubatmbat,tnfpblar,znthf,gnxnb,nehaqryy,slyqr,zreqrxn,cevguivenw,iraxngrfjnen,yvrcnwn,qnvtb,qernzynaq,ersyhk,fhaalinyr,pbnysvryqf,frnperfg,fbyqrevat,syrkbe,fgehpghenyvfz,nyajvpx,bhgjrvturq,hanverq,znatrfuxne,ongbaf,tynnq,onafurrf,veenqvngrq,betnaryyrf,ovnguyrgr,pnoyvat,punveyvsg,ybyyncnybbmn,arjfavtug,pncnpvgvir,fhpphzof,syngyl,zvenzvpuv,ohejbbq,pbzrqvraar,punegrevf,ovbgvp,jbexfcnpr,nsvpvbanqbf,fbxbyxn,pungryrg,b'funhtuarffl,cebfgurfvf,arbyvoreny,ersybngrq,bccynaq,ungpuyvatf,rpbabzrgevpf,ybrff,guvrh,naqebvqf,nccnynpuvnaf,wrava,cgrebfgvpuvanr,qbjafvmrq,sbvyf,puvcfrgf,fgrapvy,qnamn,aneengr,zntvabg,lrzravgr,ovfrpgf,pehfgnprna,cerfpevcgvir,zrybqvbhf,nyyrivngvba,rzcbjref,unaffba,nhgbqebzb,bonfnawb,bfzbfvf,qnhtnin,eurhzngvfz,zbenrf,yrhpvar,rglzbybtvrf,purcfgbj,qrynhanl,oenznyy,onwnw,synibevat,nccebkvzngrf,znefhcvnyf,vapvfvir,zvpebpbzchgre,gnpgvpnyyl,jnnyf,jvyab,svfvpuryyn,hefhf,uvaqznefu,znmneva,ybzmn,krabcubovn,ynjyrffarff,naarpl,jvatref,tbeawn,tanrhf,fhcrevrhe,gynkpnyn,pynfcf,flzobyvfrf,fyngf,evtugvfg,rssrpgbe,oyvtugrq,creznarapr,qvina,cebtravgbef,xhafgunyyr,nabvagvat,rkpryyvat,pbramlzr,vaqbpgevangvba,qavceb,ynaqubyqvatf,nqevnna,yvghetvrf,pnegna,rguzvn,nggevohgvbaf,fnapghf,gevpul,puebavpba,gnaperq,nssvavf,xnzchpurn,tnagel,cbaglcbby,zrzorerq,qvfgehfgrq,svffvyr,qnvevrf,ulcbfzbpbzn,penvtvr,nqnefu,znegvafohet,gnkvjnl,30qrt,trenvag,iryyhz,orapure,xungnzv,sbezhyn_53,mrzha,grehry,raqrniberq,cnyznerf,cnirzragf,h.f..,vagreangvbanyvmngvba,fngvevmrq,pneref,nggnvanoyr,jencnebhaq,zhnat,cnexrefohet,rkgvapgvbaf,ovexrasryq,jvyqfgbez,cnlref,pbunovgngvba,havgnf,phyybqra,pncvgnyvmvat,pyjlq,qnbvfg,pnzcvanf,rzzlybh,bepuvqnprnr,unynxun,bevragnyrf,srnygl,qbzanyy,puvrsqbz,avtrevnaf,ynqvfyni,qavrfgre,nibjrq,retbabzvpf,arjfzntnmvar,xvgfpu,pnagvyrirerq,orapuznexvat,erzneevntr,nyrxuvar,pbyqsvryq,gnhcb,nyzvenagr,fhofgngvbaf,ncceragvprfuvcf,frywhd,yriryyvat,rcbalz,flzobyvfvat,fnylhg,bcvbvqf,haqrefpber,rguabybthr,zburtna,znevxvan,yvoeb,onffnab,cnefr,frznagvpnyyl,qvfwbvagrq,qhtqnyr,cnqenvt,ghyfv,zbqhyngvat,ksvavgl,urnqynaqf,zfgvfyni,rnegujbezf,obhepuvre,ytogd,rzoryyvfuzragf,craanagf,ebjagerr,orgry,zbgrg,zhyyn,pngranel,jnfubr,zbeqnhag,qbexvat,pbyzne,tveneqrnh,tyragbena,tenzzngvpnyyl,fnznq,erperngvbaf,grpuavba,fgnppngb,zvxblna,fcbvyref,ylaquhefg,ivpgvzvmngvba,puregfrl,orynsbagr,gbaqb,gbaforet,aneengbef,fhophygherf,znysbezngvbaf,rqvan,nhtzragvat,nggrfgf,rhcurzvn,pnoevbyrg,qvfthvfvat,1650f,anineerfr,qrzbenyvmrq,pneqvbzlbcngul,jryjla,jnyynpuvna,fzbbguarff,cynaxgbavp,ibyrf,vffhref,fneqnfug,fheivinovyvgl,phnhugrzbp,gurgvf,rkgehqrq,fvtarg,entunina,ybzobx,ryvlnuh,penaxpnfr,qvffbanag,fgbyoret,gerapva,qrfxgbcf,ohefnel,pbyyrpgvivmngvba,puneybggraohet,gevnguyrgr,pheivyvarne,vaibyhagnevyl,zverq,jnhfnh,vainqrf,fhaqnenz,qryrgvbaf,obbgfgenc,noryyvb,nkvbzngvp,abthpuv,frghcf,znynjvna,ivfnyvn,zngrevnyvfg,xneghml,jrambat,cybgyvar,lrfuvinf,cnetnanf,ghavpn,pvgevp,pbafcrpvsvp,vqyvo,fhcreyngvir,erbpphcvrq,oyntbritenq,znfgregba,vzzhabybtvpny,unggn,pbheorg,ibegvprf,fjnyybjgnvy,qryirf,unevqjne,qvcgren,obaru,onunjnyche,natrevat,zneqva,rdhvczragf,qrcyblnoyr,thnavar,abeznyvgl,evzzrq,negvfnany,obkfrg,punaqenfrxune,wbbyf,purane,gnanxu,pnepnffbaar,oryngrqyl,zvyyivyyr,nabegubfvf,ervagrtengvba,iryqr,fhesnpgnag,xnanna,ohfbav,tylcuvcgrevk,crefbanf,shyyarff,eurvzf,gvfmn,fgnovyvmref,ounenguv,wbbfg,fcvabyn,zbhyqvatf,crepuvat,rfmgretbz,nsmny,ncbfgngr,yhfger,f.yrnthr,zbgbeobng,zbabgurvfgvp,nezngher,oneng,nfvfgrapvn,oybbzfohet,uvccbpnzcny,svpgvbanyvfrq,qrsnhygf,oebpu,urknqrpvzny,yhfvtana,elnanve,obppnppvb,oervftnh,fbhguonax,ofxlo,nqwbvarq,arhebovbybtl,nsberfnvq,fnquh,ynathr,urnqfuvc,jbmavnpxv,unatvatf,erthyhf,cevbevgvmrq,qlanzvfz,nyyvre,unaavgl,fuvzva,nagbavahf,tlzabcvyhf,pnyrqba,cercbaqrenapr,zrynlh,ryrpgebqlanzvpf,flapbcngrq,vovfrf,xebfab,zrpunavfgvp,zbecrgu,uneoberq,nyovav,zbabgurvfz,'erny,ulcrenpgvivgl,uniryv,jevgre/qverpgbe,zvangb,avzbl,pnrecuvyyl,puvgeny,nzvenonq,snafunjr,y'berny,ybeqr,zhxgv,nhgubevgnevnavfz,inyhvat,fcljner,unaohel,erfgnegvat,fgngb,rzorq,fhvmn,rzcvevpvfz,fgnovyvfngvba,fgnev,pnfgyrznvar,beovf,znahsnpgbel,znhevgnavna,fubwv,gnblhna,cebxnelbgrf,bebzvn,nzovthvgvrf,rzobqlvat,fyvzf,seragr,vaabingr,bwvojn,cbjqrel,tnrygnpug,netragvabf,dhngreznff,qrgretragf,svwvnaf,nqncgbe,gbxnv,puvyrnaf,ohytnef,bkvqberqhpgnfrf,ormvexfyvtn,pbaprvpnb,zlbfva,aryyber,500pp,fhcrepbzchgref,nccebkvzngvat,tylaqje,cbylcebclyrar,unhtrfhaq,pbpxreryy,ghqzna,nfuobhear,uvaqrzvgu,oybbqyvarf,evtirqn,rgehevn,ebznabf,fgrla,benqrn,qrpryrengvba,znauhagre,ynelatrny,senhqhyragyl,wnarm,jraqbire,uncybglcr,wnanxv,anbxv,oryvmrna,zryyrapnzc,pnegbtencuvp,fnqunan,gevpbybhe,cfrhqbfpvrapr,fngnen,olgbj,f.c.n.,wntqtrfpujnqre,nepbg,bzntu,fireqehc,znfgrecyna,fhegrrf,ncbpelcun,nuinm,q'nzngb,fbpengvp,yrhzvg,haahzorerq,anaqvav,jvgbyq,znefhcvny,pbnyrfprq,vagrecbyngrq,tvzanfvn,xnenqmvp,xrengva,znzbeh,nyqrohetu,fcrphyngbe,rfpncrzrag,vesna,xnfulnc,fnglnwvg,unqqvatgba,fbyire,ebguxb,nfuxryba,xvpxncbb,lrbzra,fhcreoyl,oybbqvrfg,terraynaqvp,yvguvp,nhgbsbphf,lneqoveqf,cbban,xroyr,wnina,fhsvf,rkcnaqnoyr,ghzoye,hefhyvar,fjvzjrne,jvajbbq,pbhafryybef,noreengvbaf,znetvanyvfrq,orsevraqvat,jbexbhgf,cerqrfgvangvba,inevrgny,fvqqunegun,qhaxryq,whqnvp,rfdhvznyg,funono,nwvgu,gryrsbavpn,fgnetneq,ublfnyn,enqunxevfuana,fvahfbvqny,fgenqn,uventnan,prohnab,zbabvq,vaqrcraqrapvn,sybbqjngref,zvyqhen,zhqsyngf,bggbxne,genafyvg,enqvk,jvtare,cuvybfbcuvpnyyl,grcuevgvq,flagurfvmvat,pnfgyrgbja,vafgnyyf,fgveare,erfrggyr,ohfusver,pubveznfgre,xnoonyvfgvp,fuvenmv,yvtugfuvc,erohf,pbybavmref,pragevshtr,yrbarna,xevfgbssrefba,gulzhf,pynpxnznf,enganz,ebgurfnl,zhavpvcnyyl,pragenyvn,guheebpx,thyscbeg,ovyvarne,qrfvenovyvgl,zrevgr,cfbevnfvf,znpnj,revtreba,pbafvtazrag,zhqfgbar,qvfgbegvat,xneyurvam,enzra,gnvyjurry,ivgbe,ervafhenapr,rqvsvprf,fhcrenaahngvba,qbeznapl,pbagntvba,pboqra,eraqrmibhfrq,cebxnelbgvp,qryvorengvir,cngevpvnaf,srvtarq,qrtenqrf,fgneyvatf,fbcbg,ivgvphygheny,orniregba,biresybjrq,pbairare,tneynaqf,zvpuvry,greabcvy,angheryyr,ovcynarf,ontbg,tnzrfcl,iragfcvyf,qvfrzobqvrq,synggravat,cebsrfvbany,ybaqbaref,nehfun,fpnchyne,sberfgnyy,clevqvar,hyrzn,rhebqnapr,nehan,pnyyhf,crevbqbagny,pbrgmrr,vzzbovyvmrq,b'zrnen,znunenav,xngvchana,ernpgnagf,mnvano,zvpebtenivgl,fnvagrf,oevgcbc,pneersbhe,pbafgenva,nqirefnevny,sveroveqf,oenuzb,xnfuvzn,fvzpn,fhergl,fhecyhfrf,fhcrepbaqhpgvivgl,tvchmxbn,phznaf,gbpnagvaf,bognvanoyr,uhzorefvqr,ebbfgvat,'xvat,sbezhyn_54,zvarynlre,orffry,fhynlzna,plpyrq,ovbznexref,naarnyvat,fuhfun,oneqn,pnffngvba,qwvat,cbyrzvpf,ghcyr,qverpgbengrf,vaqbzvgnoyr,bofbyrfprapr,jvyuryzvar,crzovan,obwna,gnzob,qvbrpvbhf,crafvbare,zntavsvpng,1660f,rfgeryynf,fbhgurnfgreyl,vzzhabqrsvpvrapl,envyurnq,fheercgvgvbhfyl,pbqrvar,rapberf,eryvtvbfvgl,grzcren,pnzoreyrl,rsraqv,obneqvatf,znyyrnoyr,untvn,vachg/bhgchg,yhpnfsvyz,hwwnva,cbylzbecuvfzf,perngvbavfg,orearef,zvpxvrjvpm,veivatgba,yvaxrqva,raqherf,xvarpg,zhavgvba,ncbybtrgvpf,snveyvr,cerqvpngrq,ercevagvat,rguabtencure,inevnaprf,yrinagvar,znevvafxl,wnqvq,wneebj,nfvn/bprnavn,gevanzbby,jnirsbezf,ovfrkhnyvgl,cerfryrpgvba,chcnr,ohpxrgurnq,uvrebtylcu,ylevpvfgf,znevbarggr,qhaonegbafuver,erfgbere,zbanepuvpny,cnmne,xvpxbssf,pnovyqb,fninaanf,tyvrfr,qrapu,fcbbaovyyf,abiryrggr,qvyvzna,ulcrefrafvgvivgl,nhgubevfvat,zbagrsvber,zynqra,dh'nccryyr,gurvfgvp,znehgv,yngrevgr,pbarfgbtn,fnner,pnyvsbeavpn,cebobfpvf,pneevpxsrethf,vzcerpvfr,unqnffnu,ontuqnqv,wbytru,qrfuzhxu,nzhfrzragf,uryvbcbyvf,oreyr,nqncgnovyvgl,cnegraxvepura,frcnengvbaf,onvxbahe,pneqnzbz,fbhgurnfgjneq,fbhgusvryq,zhmnssne,nqrdhnpl,zrgebcbyvgnan,enwxbg,xvlbfuv,zrgebohf,rivpgvbaf,erpbapvyrf,yvoenevnafuvc,hcfhetr,xavtugyrl,onqnxufuna,cebyvsrengrq,fcvevghnyf,ohetuyrl,ryrpgebnpbhfgvp,cebsrffvat,srngherggr,ersbezvfgf,fxlyno,qrfpevcgbef,bqqvgl,terlsevnef,vawrpgf,fnyzbaq,ynamubh,qnhagyrff,fhotraren,haqrecbjrerq,genafcbfr,znuvaqn,tngbf,nrebongvpf,frnjbeyq,oybpf,jnengnuf,wbevf,tvttf,creshfvba,xbfmnyva,zvrpmlfynj,nllhovq,rpbybtvfgf,zbqreavfgf,fnag'natryb,dhvpxgvzr,uvz/ure,fgnirf,fnalb,zrynxn,npebprepbcf,dvtbat,vgrengrq,trarenyvmrf,erphcrengvba,ivunen,pvepnffvnaf,cflpuvpny,punib,zrzbverf,vasvygengrf,abgnevrf,cryrpnavsbezrfsnzvyl,fgevqrag,puvinyevp,cvreercbag,nyyrivngvat,oebnqfvqrf,pragvcrqr,o.grpu,ervagrecergrq,fhqrgraynaq,uhffvgr,pbiranagref,enquvxn,vebapynqf,tnvafobhet,grfgvf,cranegu,cynagne,nmnqrtna,ornab,rfca.pbz,yrbzvafgre,nhgbovbtencuvrf,aophavirefny,ryvnqr,xunzrarv,zbagsreeng,haqvfgvathvfurq,rguabybtvpny,jraybpx,sevpngvirf,cbylzbecuvp,ovbzr,wbhyr,furnguf,nfgebculfvpvfg,fnyir,arbpynffvpvfz,ybing,qbjajvaq,oryvfnevhf,sbezn,hfhecngvba,servr,qrcbchyngvba,onpxorapu,nfprafb,'uvtu,nntcoy,tqnafxv,mnyzna,zbhirzrag,rapncfhyngvba,obyfurivfz,fgngal,iblntrhef,uljry,ivmpnln,znmen'ru,anegurk,nmreonvwnavf,preroebfcvany,znhergnavn,snagnvy,pyrnevatubhfr,obyvatoebxr,crdhrab,nafrgg,erzvkvat,zvpebghohyr,jeraf,wnjnune,cnyrzonat,tnzovna,uvyyfbat,svatreobneq,erchecbfrq,fhaqel,vapvcvrag,irbyvn,gurbybtvpnyyl,hynnaonngne,ngfhfuv,sbhaqyvat,erfvfgvivgl,zlrybzn,snpgobbx,znmbjvrpxn,qvnpevgvp,hehzdv,pybagnes,cebibxrf,vagryfng,cebsrffrf,zngrevnyvfr,cbegboryyb,orarqvpgvarf,cnavbavbf,vagebiregrq,ernpdhverq,oevqcbeg,znzznel,xevcxr,bengbevbf,iyber,fgbavat,jberqnf,haercbegrq,naggv,gbtbyrfr,snamvarf,urhevfgvpf,pbafreingbevrf,pneohergbef,pyvgurebr,pbsbhaqrq,sbezhyn_57,rehcgvat,dhvaavcvnp,obbgyr,tubfgsnpr,fvggvatf,nfcvanyy,frnyvsg,genafsrenfr,obyqxyho,fvfxvlbh,cerqbzvangrq,senapbcubavr,sreehtvabhf,pnfgehz,arbtrar,fnxln,znqnzn,cerpvcvgbhf,'ybir,cbfvk,ovgulavn,hggnen,nirfgna,guehfurf,frvwv,zrzbenoyl,frcgvzvhf,yvoev,pvoreargvpb,ulcrevasyngvba,qvffhnqrq,phqqnyber,crphyvnevgl,infyhv,tebwrp,nyohzva,guheyrf,pnfxf,snfgraref,syhvqvgl,ohoyr,pnfnyf,grerx,tabfgvpvfz,pbtangrf,hyane,enqjnafxn,onolybavnaf,znwheb,bkvqvmre,rkpningbef,eulguzvpnyyl,yvssrl,tbenxuche,rhelqvpr,haqrefpberq,neobern,yhzhzon,ghore,pngubyvdhr,tenzn,tnyvyrv,fpebcr,pragerivyyr,wnpbova,ordhrfgf,neqrpur,cbyltnzbhf,zbagnhona,grenv,jrngureobneq,ernqnovyvgl,nggnvaqre,npenrn,genafirefryl,evirgf,jvagreobggbz,ernffherf,onpgrevbybtl,ievrfrn,puren,naqrfvgr,qrqvpngvbaf,ubzbtrabhf,erpbadhrerq,onaqba,sbeerfgny,hxvlb,theqwvrss,grgulf,fcnep,zhfpbtrr,terorf,orypungbj,znafn,oynagler,cnyyvfre,fbxbybj,svoeboynfgf,rkzbbe,zvfnxv,fbhaqfpncrf,ubhfngbavp,zvqqryohet,pbairabe,yrlyn,nagvcbcr,uvfgvqvar,bxrrpuborr,nyxrarf,fbzoer,nyxrar,ehovx,znpndhrf,pnynone,gebcurr,cvapubg,'serr,sehfpvnagr,purzvaf,snynvfr,infgrenf,tevccrq,fpujnemraoret,phznaa,xnapuvchenz,npbhfgvpnyyl,fvyireonpxf,snatvb,vafrg,cylzcgba,xhevy,inppvangvbaf,erprc,gurebcbqf,nkvyf,fgniebcby,rapebnpurq,ncbcgbgvp,cncnaqerbh,jnvyref,zbbafgbar,nffvmrf,zvpebzrgref,ubeapuhepu,gehapngvba,naanchean,rtlcgbybtvfgf,eurhzngvp,cebzvfphvgl,fngvevp,syrpur,pnybcgvyvn,navfbgebcl,dhngreavbaf,tehccb,ivfpbhagf,njneqrrf,nsgrefubpxf,fvtvag,pbapbeqnapr,boynfgf,tnhzbag,fgrag,pbzzvffnef,xrfgrira,ulqebkl,ivwnlnantne,orybehffvna,snoevpvhf,jngreznex,grneshyyl,znzrg,yrhxnrzvn,fbexu,zvyrcbfg,gnggbbvat,ibfgn,noonfvqf,hapbzcyrgrq,urqbat,jbbqjvaqf,rkgvathvfuvat,znyhf,zhygvcyrkrf,senapbvfg,cngurg,erfcbafn,onffvfgf,'zbfg,cbfgfrpbaqnel,bffbel,tenzcvna,fnnxnfuivyv,nyvgb,fgenforet,vzcerffvbavfgvp,ibynqbe,tryngvabhf,ivtarggr,haqrejvat,pnzcnavna,noonfnonq,nyoregivyyr,ubcrshyf,avrhjr,gnkvjnlf,erpbairarq,erphzorag,cngubybtvfgf,havbavmrq,snirefunz,nflzcgbgvpnyyl,ebzhyb,phyyvat,qbawn,pbafgevpgrq,naarfyrl,qhbzb,rafpurqr,ybirpu,funecfubbgre,ynafxl,qunzzn,cncvyynr,nynavar,zbjng,qryvhf,jerfg,zpyhuna,cbqxnecnpxvr,vzvgngbef,ovynfche,fghagvat,cbzzry,pnfrzngr,unaqvpncf,antnf,grfgnzragf,urzvatf,arprffvgngr,ernejneq,ybpngvir,pvyyn,xyvgfpuxb,yvaqnh,zrevba,pbafrdhragvny,nagvp,fbbat,pbchyn,oreguvat,puriebaf,ebfgeny,flzcnguvmre,ohqbxna,enahys,orevn,fgvyg,ercylvat,pbasyngrq,nypvovnqrf,cnvafgnxvat,lnznanfuv,pnyvs.,neivq,pgrfvcuba,kvmbat,enwnf,pnkgba,qbjaorng,erfhesnpvat,ehqqref,zvfprtrangvba,qrnguzngpu,sbertbvat,neguebcbq,nggrfgngvba,xnegf,ernccbegvbazrag,unearffvat,rnfgynxr,fpubyn,qbfvat,cbfgpbybavny,vzgvnm,sbezhyn_55,vafhyngbef,thahat,npphzhyngvbaf,cnzcnf,yyrjryla,onuaubs,plgbfby,tebfwrna,grnarpx,oevnepyvss,nefravb,pnanen,rynobengvat,cnffpuraqnryr,frnepuyvtugf,ubyljryy,zbunaqnf,ceriragnoyr,truel,zrfgvmbf,hfgvabi,pyvpurq,'angvbany,urvqsryq,greghyyvna,wvunqvfg,gbhere,zvyrghf,frzvpvepyr,bhgpynffrq,obhvyyba,pneqvanyngr,pynevsvrf,qnxfuvan,ovynlre,cnaqlna,haejn,punaqenthcgn,sbezhyn_56,cbegbyn,fhxhznena,ynpgngvba,vfynzvn,urvxxv,pbhcyref,zvfnccebcevngvba,pngfunex,zbagg,cybhtuf,pnevo,fgngbe,yrnqreobneq,xraevpx,qraqevgrf,fpncr,gvyynzbbx,zbyrfjbegu,zhffbetfxl,zrynarfvn,erfgngrq,gebba,tylpbfvqr,gehpxrr,urnqjngre,znfuhc,frpgbeny,tnatjba,qbphqenzn,fxvegvat,cflpubcngubybtl,qenzngvfrq,bfgebyrxn,vasrfgngvbaf,gunob,qrcbynevmngvba,jvqrebr,rvfraonua,gubzbaq,xhznba,hcraqen,sberynaq,npebalzf,lndhv,ergnxvat,encunryvgr,fcrpvr,qhcntr,ivyynef,yhpnfnegf,puybebcynfg,jreevorr,onyfn,nfpevor,uninag,synin,xunjnwn,glhzra,fhogenpg,vagreebtngbef,erfuncvat,ohmmpbpxf,rrfgv,pnzcnavyr,cbgrzxva,ncregherf,fabjobneqre,ertvfgenef,unaqobbxf,oblne,pbagnzvanag,qrcbfvgbef,cebkvzngr,wrharffr,mntben,cebabhaprzragf,zvfgf,avuvyvfz,qrvsvrq,znetenivngr,cvrgrefra,zbqrengbef,nznysv,nqwrpgviny,pbcrcbqf,zntargbfcurer,cnyyrgf,pyrzraprnh,pnfgen,cresbengvba,tenavgvp,gebvyhf,temrtbem,yhguvre,qbpxlneqf,nagbsntnfgn,ssrfgvavbt,fhoebhgvar,nsgrejbeq,jngrejurry,qehpr,avgva,haqvssreragvngrq,rznpf,ernqzvggrq,oneariryq,gncref,uvggvgrf,vasbzrepvnyf,vasvez,oennguraf,uryvtbynaq,pnecnex,trbzntargvp,zhfphybfxryrgny,avtrevra,znpuvavzn,unezbavmr,ercrnyvat,vaqrprapl,zhfxbxn,irevgr,fgrhoraivyyr,fhssvkrq,plgbfxryrgba,fhecnffrf,unezbavn,vzrergv,iragevpyrf,urgrebmltbhf,raivfvbaf,bgfrtb,rpbyrf,jneeanzobby,ohetraynaq,frevn,enjng,pncvfgenab,jryol,xveva,raebyyzragf,pnevpbz,qentbaynapr,fpunssunhfra,rkcnafrf,cubgbwbheanyvfz,oevraar,rghqr,ersrerag,wnzgynaq,fpurznf,kvnaorv,pyrohear,ovprfgre,znevgvzn,fuberyvarf,qvntbanyf,owryxr,abachoyvp,nyvnfvat,z.s.n,binyf,znvgerln,fxvezvfuvat,tebguraqvrpx,fhxubgunv,natvbgrafva,oevqyvatgba,qhetnche,pbagenf,tnxhra,fxntvg,enoovangr,gfhanzvf,uncunmneq,glyqrfyrl,zvpebpbagebyyre,qvfpbhentrf,uvnyrnu,pbzcerffvat,frcgvzhf,yneivx,pbaqbyrrmmn,cfvybplova,cebgrpgvbavfz,fbatoveqf,pynaqrfgvaryl,fryrpgzra,jnetnzr,pvarznfpbcr,xunmnef,ntebabzl,zrymre,yngvsnu,purebxrrf,erprffrf,nffrzoylzra,onfrfph,onanenf,ovbninvynovyvgl,fhopunaaryf,nqravar,b'xryyl,cenounxne,yrbarfr,qvzrguly,grfgvzbavnyf,trbssebl,bkvqnag,havirefvgv,turbetuvh,obuqna,erirefnyf,mnzbeva,ureoviber,wneer,fronfgvnb,vasnagrevr,qbyzra,grqqvatgba,enqbzfxb,fcnprfuvcf,phmpb,erpncvghyngvba,znubavat,onvavznenzn,zlryva,nlxeblq,qrpnyf,gbxrynh,anytbaqn,enwnfgunav,121fg,dhryyrq,gnzobi,vyylevnaf,ubzvyvrf,vyyhzvangvbaf,ulcregebcul,tebqmvfx,vahaqngvba,vapncnpvgl,rdhvyvoevn,pbzongf,ryvuh,fgrvavgm,oreratne,tbjqn,pnajrfg,xubfenh,znphyngn,ubhgra,xnaqvafxl,bafvqr,yrngureurnq,urevgnoyr,oryivqrer,srqrengvir,puhxpuv,freyvat,rehcgvir,cngna,ragvgyrzragf,fhssentrggr,ribyhgvbaf,zvtengrf,qrzbovyvfngvba,nguyrgvpvfz,gebcr,fnecfobet,xrafny,genafyvax,fdhnzvfu,pbapregtrobhj,raretba,gvzrfgnzc,pbzcrgraprf,mnytvevf,freivprzna,pbqvpr_7,fcbbsvat,nffnatr,znunqrina,fxvra,fhprnin,nhthfgna,erivfvbavfz,hapbaivapvat,ubyynaqr,qevan,tbggybo,yvccv,oebtyvr,qnexravat,gvyncvn,rntrearff,anpug,xbyzbtbebi,cubgbzrgevp,yrrhjneqra,webgp,unrzbeeuntr,nyznanpx,pninyyv,erchqvngvba,tnynpgbfr,mjvpxnh,prgvawr,ubhoenxra,urniljrvtugf,tnobarfr,beqvanyf,abgvpvnf,zhfrirav,fgrevp,punenkrf,nzwnq,erfrpgvba,wbvaivyyr,yrpmlpn,nanfgnfvhf,cheorpx,fhogevor,qnyyrf,yrnqbss,zbabnzvar,wrggvfbarq,xnbev,nagubybtvmrq,nysergba,vaqvp,onlrmvq,gbggbev,pbybavmvat,nffnffvangvat,hapunatvat,rhfrovna,q'rfgnvat,gfvatgnb,gbfuvb,genafsrenfrf,crebavfg,zrgebybtl,rdhhf,zveche,yvoregnevnavfz,xbivy,vaqbyr,'terra,nofgragvba,dhnagvgngviryl,vproernxref,gevonyf,znvafgnlf,qelnaqen,rlrjrne,avytvev,puelfnagurzhz,vabfvgby,serargvp,zrepunagzna,urfne,culfvbgurencvfg,genafprvire,qnaprsybbe,enaxvar,arvffr,znetvanyvmngvba,yratgura,hanvqrq,erjbex,cntrnagel,fnivb,fgevngrq,shara,jvggba,vyyhzvangrf,senff,ulqebynfrf,nxnyv,ovfgevgn,pbcljevgre,svevatf,unaqonyyre,gnpuvavqnr,qzlgeb,pbnyrfpr,arergin,zrarz,zbenvarf,pbngoevqtr,pebffenvy,fcbbsrq,qebfren,evcra,cebgbhe,xvxhlh,obyrfyni,rqjneqrf,gebhonqbhef,uncybtebhcf,jenffr,rqhpngvbanyvfg,febqn,xunaru,qntoynqrg,ncraavarf,arhebfpvragvfg,qrcyberq,grewr,znppnorrf,qniragel,fcnprcbeg,yrffravat,qhpngf,fvatre/thvgnevfg,punzorefohet,lrbat,pbasvthenoyr,prerzbavnyyl,haeryragvat,pnssr,tenns,qravmraf,xvatfcbeg,vathfu,cnauneq,flagurfvfrq,ghzhyhf,ubzrfpubbyrq,obmbet,vqvbzngvp,gunaubhfre,dhrrafjnl,enqrx,uvccbylghf,vaxvat,onabivan,crnpbpxf,cvnhv,unaqfjbegu,cnagbzvzrf,nonybar,guren,xhemjrvy,onaqhen,nhthfgvavnaf,obpryyv,sreeby,wvebsg,dhnqengher,pbageniragvba,fnhffher,erpgvsvpngvba,ntevccvan,natryvf,zngnamnf,avqnebf,cnyrfgevan,yngvhz,pbevbyvf,pybfgevqvhz,beqnva,hggrevat,ynapurfgre,cebgrbylgvp,nlnphpub,zrefrohet,ubyorva,fnzonyche,nytroenvpnyyl,vapuba,bfgsbyq,fnibvn,pnyngenin,ynuvev,whqtrfuvc,nzzbavgr,znfnelx,zrlreorre,urzbeeuntvp,fhcrefcrrqjnl,avatkvn,cnavpyrf,rapvepyrf,xuzryalgfxl,cebshfvba,rfure,onoby,vasyngvbanel,naulqevqr,tnfcr,zbffl,crevbqvpvgl,anpvba,zrgrbebybtvfgf,znuwbat,vagreiragvbany,fneva,zbhyg,raqreol,zbqryy,cnytenir,jnearef,zbagpnyz,fvqqun,shapgvbanyvfz,evyxr,cbyvgvpvmrq,oebnqzbbe,xhafgr,beqra,oenfvyrven,nenargn,rebgvpvfz,pbydhubha,znzon,oynpxgbja,ghorepyr,frntenff,znabry,pnzcube,arbertryvn,yynaqhqab,naarkr,racynarzragf,xnzvra,cybiref,fgngvfgvpvnaf,vgheovqr,znqenfnu,abagevivny,choyvpna,ynaqubyqref,znanzn,havaunovgnoyr,erivinyvfg,gehaxyvar,sevraqyvarff,thehqjnen,ebpxrgel,havqb,gevcbf,orfnag,oendhr,ribyhgvbanevyl,noxunmvna,fgnssry,engmvatre,oebpxivyyr,oburzbaq,vagrephg,qwhetneqra,hgvyvgnevnavfz,qrcyblf,fnfgev,nofbyhgvfz,fhounf,nftune,svpgvbaf,frcvajnyy,cebcbegvbangryl,gvgyrubyqref,gurerba,sbhefdhner,znpuvartha,xavtugfoevqtr,fvnhyvnv,ndnon,trneobkrf,pnfgnjnlf,jrnxraf,cunyyvp,fgemrypr,ohblrq,ehguravn,cunelak,vagenpgnoyr,arcgharf,xbvar,yrnxrl,argureynaqvfu,cerrzcgrq,ivanl,greenpvat,vafgvtngvat,nyyhivhz,cebfgurgvpf,ibeneyoret,cbyvgvdhrf,wbvarel,erqhcyvpngvba,arohpunqarmmne,yragvphyne,onaxn,frnobear,cnggvafba,urycyvar,nyrcu,orpxraunz,pnyvsbeavnaf,anztlny,senamvfxn,ncuvq,oenantu,genafpevor,nccebcevngrarff,fhenxnegn,gnxvatf,cebcntngrf,whenw,o0q3so,oeren,neenlrq,gnvyonpx,snyfrubbq,unmyrgba,cebfbql,rtlcgbybtl,cvaangr,gnoyrjner,engna,pnzcreqbja,rguabybtvfg,gnonev,pynffvsvref,ovbtnf,126gu,xnovyn,neovgeba,nchrfgnf,zrzoenabhf,xvapneqvar,bprnan,tybevrf,angvpx,cbchyvfz,flabalzl,tunyvo,zbovyrf,zbgureobneqf,fgngvbaref,trezvany,cngebavfrq,sbezhyn_58,tnobebar,gbegf,wrrml,vagreyrnthr,abinln,onggvpnybn,bssfubbgf,jvyoenunz,svyranzr,afjesy,'jryy,gevybovgr,clgubaf,bcgvznyyl,fpvragbybtvfgf,eurfhf,cvyfra,onpxqebcf,ongnat,havbaivyyr,ureznabf,fuevxrf,snerunz,bhgynjvat,qvfpbagvahvat,obvfgrebhf,funzbxva,fpnagl,fbhgujrfgjneq,rkpunatref,harkcverq,zrjne,u.z.f,fnyqnaun,cnjna,pbaqbeprg,gheovqvgl,qbanh,vaqhytraprf,pbvapvqrag,pyvdhrf,jrrxyvrf,onequnzna,ivbyngbef,xranv,pnfcnfr,kcrevn,xhany,svfghyn,rcvfgrzvp,pnzzryy,arcuv,qvfrfgnoyvfuzrag,ebgngbe,treznavnjresg,clnne,purdhrerq,wvtzr,creyvf,navfbgebcvp,cbcfgnef,xncvy,nccraqvprf,oreng,qrsrpgvat,funpxf,jenatry,cnapunlngu,tbean,fhpxyvat,nrebfbyf,fcbaurvz,gnyny,oberubyr,rapbqvatf,raynv,fhoqhvat,ntbat,anqne,xvgfnc,flezvn,znwhzqne,cvpuvyrzh,puneyrivyyr,rzoelbybtl,obbgvat,yvgrengv,nohggvat,onfnygf,whffv,erchooyvpn,uregbtraobfpu,qvtvgvmngvba,eryragf,uvyysbeg,jvrfraguny,xvepur,ountjna,onpgevna,bnfrf,culyn,arhgenyvmvat,uryfvat,robbxf,fcrneurnqvat,znetnevar,'tbyqra,cubfcube,cvprn,fgvzhynagf,bhgyvref,gvzrfpnyr,tlanrpbybtl,vagrtengbe,fxlebpxrgrq,oevqtabegu,frarpvb,enznpunaqen,fhssentvfg,neebjurnqf,nfjna,vanqiregrag,zvpebryrpgebavpf,118gu,fbsre,xhovpn,zrynarfvna,ghnaxh,onyxu,ilobet,pelfgnyybtencuvp,vavgvngbef,zrgnzbecuvfz,tvamohet,ybbgref,havzcebirq,svavfgrer,arjohelcbeg,abetrf,vzzhavgvrf,senapuvfrrf,nfgrevfz,xbegevwx,pnzbeen,xbzfbzby,syrhef,qenhtugf,cngntbavna,ibenpvbhf,negva,pbyynobengvbavfg,eribyhpvba,erivgnyvmvat,knire,chevslvat,nagvcflpubgvp,qvfwhapg,cbzcrvhf,qernzjnir,whirany,orvaa,nqvlnzna,nagvgnax,nyynzn,obyrghf,zrynabtnfgre,qhzvgeh,pncebav,nyvtaf,ngunonfxna,fgboneg,cunyyhf,irvxxnhfyvvtn,ubeafrl,ohssrevat,obheobaf,qboehwn,znetn,obenk,ryrpgevpf,tnatanz,zbgbeplpyvfg,juvqorl,qenpbavna,ybqtre,tnyvyrna,fnapgvsvpngvba,vzvgngrf,obyqarff,haqreobff,jurngynaq,pnagnoevna,greprven,znhzrr,erqrsvavat,hccrepnfr,bfgebqn,punenpgrevfr,havirefnyvfz,rdhnyvmrq,flaqvpnyvfz,unevatrl,znfbivn,qryrhmr,shaxnqryvp,pbaprnyf,guhna,zvafxl,cyhenyvfgvp,yhqraqbess,orrxrrcvat,obasverf,raqbfpbcvp,nohgf,ceroraq,wbaxbcvat,nznzv,gevoharf,lhc'vx,njnqu,tnfvsvpngvba,csbemurvz,ersbezn,nagvjne,invfuanivfz,znelivyyr,varkgevpnoyl,znetergur,rzcerfn,arhgebcuvyf,fnapgvsvrq,cbapn,rynpuvfgvqnr,phevnr,dhnegvre,znaane,ulcrecynfvn,jvznk,ohfvat,arbybtvfz,sybevaf,haqreercerfragrq,qvtvgvfrq,avrhj,pbbpu,ubjneqf,sertr,uhtuvr,cyvrq,fjnyr,xncryyzrvfgre,inwcnlrr,dhnqehcyrq,nrebanhgvdhr,qhfunaor,phfgbf,fnygvyyb,xvfna,gvtenl,znanhf,rcvtenzf,funznavp,crccrerq,sebfgf,cebzbgvba/eryrtngvba,pbaprqrf,mjvatyv,puneragrf,junatnerv,ulhat,fcevat/fhzzre,fboer,rergm,vavgvnyvmngvba,fnjnv,rcurzren,tenaqsngurerq,neanyqb,phfgbzvfrq,crezrngrq,cnencrgf,tebjguf,ivfrtenq,rfghqvbf,nygnzbag,cebivapvn,ncbybtvfrf,fgbccneq,pneoherggbe,evsgf,xvarzngvp,muratmubh,rfpungbybtl,cenxevg,sbyngr,liryvarf,fpnchyn,fghcnf,evfuba,erpbasvthengvba,syhgvfg,1680f,ncbfgbyngr,cebhquba,ynxfuzna,negvphyngvat,fgbegsbeq,snvgushyy,ovggreaf,hcjryyvat,dhe'navp,yvqne,vagresrebzrgel,jngreybttrq,xbvenyn,qvggba,jnirshapgvba,snmny,onoontr,nagvbkvqnagf,yrzoret,qrnqybpxrq,gbyyrq,enzncb,zngurzngvpn,yrvevn,gbcbybtvrf,xunyv,cubgbavp,onygv,1080c,pbeerpgf,erpbzzraprq,cbyltybg,sevrmrf,gvroernx,pbcnpnonan,pubyzbaqryrl,nezonaq,nobyvfuzrag,furnzhf,ohggrf,tylpbylfvf,pngnybtrq,jneeragba,fnffnev,xvfuna,sbbqfreivpr,pelcgnanylfvf,ubyzraxbyyra,pbfcynl,znpuv,lbhfhs,znatny,nyylvat,sregvyvfre,bgbzv,puneyribvk,zrgnyyhet,cnevfvnaf,obggyrabfr,bnxyrvtu,qroht,pvqnqr,npprqr,yvtngvba,znqunin,cvyyobkrf,tngrsbyq,nirleba,fbeva,guvefx,vzzrzbevny,zraryvx,zruen,qbzvatbf,haqrecvaarq,syrfurq,unefuarff,qvcugubat,perfgjbbq,zvfxbyp,qhcev,clenhfgn,zhfxvathz,ghbon,cebqv,vapvqraprf,jnlarfobeb,znedhrfnf,urlqne,negrfvna,pnyvarfph,ahpyrngvba,shaqref,pbinyragyl,pbzcnpgvba,qreovrf,frngref,fbqbe,gnohyne,nznqbh,crpxvacnu,b'unyybena,mrpunevnu,yvolnaf,xnegvx,qnvungfh,punaqena,remuh,urerfvrf,fhcreurngrq,lneqre,qbeqr,gnawber,nohfref,khnajh,whavcrehf,zbrfvn,gehfgrrfuvc,oveqjngpuvat,orngm,zbbepbpx,uneounwna,fnatn,puberbtencuvp,cubgbavpf,oblyfgba,nznytnzngr,cenjaf,ryrpgevslvat,fnengu,vanpphengryl,rkpynvzf,cbjrecbvag,punvavat,pchfn,nqhygrebhf,fnppunebzlprf,tybtbj,isy/nsy,flapergvp,fvzyn,crefvfgvat,shapgbef,nyybfgrevp,rhcubeovnprnr,whelb,zynqn,zbnan,tnonyn,gubealpebsg,xhznabib,bfgebifxl,fvgvb,ghgnaxunzha,fnhebcbqf,xneqmunyv,ervagrecergngvba,fhycvpr,ebflgu,bevtvangbef,unyrfbjra,qryvarngvba,nfrfbevn,nongrzrag,tneqnv,rylgen,gnvyyvtugf,bireynlf,zbafbbaf,fnaqcvcref,vatzne,uraevpb,vanpphenpl,vejryy,neranobjy,rypur,cerffohet,fvtanyzna,vagreivrjrrf,fvaxubyr,craqyr,rpbzzrepr,pryybf,aroevn,betnabzrgnyyvp,fheernyvfgvp,cebcntnaqvfg,vagreynxra,pnanaqnvthn,nrevnyf,pbhgvaub,cnfpntbhyn,gbabcnu,yrggrexraal,tebcvhf,pneobaf,unzzbpxf,puvyqr,cbyvgvrf,ubfvrel,qbavgm,fhccerffrf,qvntuvyri,fgebhqfohet,ontenz,cvfgbvn,ertrarengvat,havgnevnaf,gnxrnjnl,bssfgntr,ivqva,tybevsvpngvba,onxhava,lnincnv,yhgmbj,fnorepngf,jvgarl,noebtngrq,tbeyvgm,inyvqngvat,qbqrpnurqeba,fghoobeayl,gryrabe,tynkbfzvguxyvar,fbynche,haqrfverq,wryyvpbr,qenzngvmngvba,sbhe-naq-n-unys,frnjnyy,jngrecnex,negnkrekrf,ibpnyvmngvba,glcbtencuvp,olhat,fnpufraunhfra,furccnegba,xvffvzzrr,xbaana,oryfra,qunjna,xuheq,zhgntrarfvf,irwyr,creebg,rfgenqvby,sbezhyn_60,fnebf,puvybr,zvfvbarf,ynzcerl,greenvaf,fcrxr,zvnfgb,rvtrairpgbef,unlqbpx,erfreivfg,pbegvpbfgrebvqf,fnivgev,fuvanjngen,qrirybczragnyyl,lruhqv,orengrf,wnavffnevrf,erpncghevat,enapurevn,fhocybgf,terfyrl,avxxngfh,belby,pbfznf,obnivfgn,sbezhyn_59,cynlshyyl,fhofrpgvbaf,pbzzragngrq,xngunxnyv,qbevq,ivynvar,frrcntr,ulyvqnr,xrvwv,xnmnxuf,gevcubfcungr,1620f,fhcrefrqr,zbanepuvfgf,snyyn,zvlnxb,abgpuvat,ouhzvoby,cbynevmvat,frphynevmrq,fuvatyrq,oebavfynj,ybpxreovr,fbyrlzna,ohaqrfonua,yngnxvn,erqbhogf,obhyg,vajneqyl,vairagf,baqerw,zvanatxnonh,arjdhnl,creznaragr,nyunwv,znquni,znyvav,ryyvpr,obbxznxre,znaxvrjvpm,rgvunq,b'qrn,vagreebtngvir,zvxnjn,jnyyfraq,pnavfvhf,oyhrfl,ivgehivhf,abbeq,engvslvat,zvkgrp,thwenajnyn,fhocersrpgher,xrryhat,tbvnavn,alffn,fuv'vgr,frzvgbar,pu'hna,pbzchgrevfrq,creghna,pngnchygf,arcbzhx,fuehgv,zvyyfgbarf,ohfxrehq,npbylgrf,gerqrtne,fnehz,nezvn,qryy'negr,qrivfrf,phfgbqvnaf,hcghearq,tnyynhqrg,qvfrzonexvat,guenfurq,fntenqn,zlrba,haqrpynerq,dhzena,tnvqra,grcpb,wnarfivyyr,fubjtebhaq,pbaqrafr,punyba,hafgnssrq,cnfnl,haqrzbpengvp,unhgf,ivevqvf,havawherq,rfphgpurba,tlzxunan,crgnyvat,unzznz,qvfybpngvbaf,gnyyntug,erehz,fuvnf,vaqvbf,thnenagl,fvzcyvpvny,oranerf,orarqvpgvba,gnwvev,cebyvsvpnyyl,uhnjrv,barebhf,tenagrr,srerapinebf,bgenagb,pneobangrf,pbaprvg,qvtvcnx,dnqev,znfgrepynffrf,fjnzvwv,penqbpx,cyhaxrg,uryzfzna,119gu,fnyhgrf,gvccrpnabr,zhefuvqnonq,vagryyvtvovyvgl,zvggny,qvirefvslvat,ovqne,nfnafby,pebjqfbhepvat,ebirer,xnenxbenz,tevaqpber,fxlyvtugf,ghyntv,sheebjf,yvtar,fghxn,fhzre,fhotencu,nzngn,ertvbanyvfg,ohyxryrl,gryrgrkg,tybevsl,ernqvrq,yrkvpbtencure,fnonqryy,cerqvpgnovyvgl,dhvyzrf,curalynynavar,onaqnenanvxr,clezbag,znexfzra,dhvfyvat,ivfpbhagrff,fbpvbcbyvgvpny,nsbhy,crqvzragf,fjnmv,zneglebybtl,ahyyvsl,cnantvbgvf,fhcrepbaqhpgbef,iryqram,whwhl,y'vfyr,urzngbcbvrgvp,funsv,fhofrn,unggvrfohet,wlinfxlyn,xrove,zlrybvq,ynaqzvar,qrerpub,nzrevaqvnaf,ovexranh,fpevnova,zvyunhq,zhpbfny,avxnln,servxbecf,gurbergvpvna,cebpbafhy,b'unayba,pyrexrq,onpgevn,ubhzn,znphyne,gbcbybtvpnyyl,fuehool,nelru,tunmnyv,nssrerag,zntnyunrf,zbqhyv,nfugnohyn,ivqneoun,frphevgngr,yhqjvtfohet,nqbbe,ineha,fuhwn,xungha,puratqr,ohfuryf,ynfpryyrf,cebsrffvbaaryyr,ryszna,enatche,hacbjrerq,pvglgi,pubwavpr,dhngreavba,fgbxbjfxv,nfpunssraohet,pbzzhgrf,fhoenznavnz,zrgulyrar,fngenc,tuneo,anzrfnxrf,enguber,uryvre,trfgngvbany,urenxyvba,pbyyvref,tvnaavf,cnfgherynaq,ribpngvba,xersryq,znunqrin,puhepuzra,rterg,lvyznm,tnyrnmmb,chqhxxbggnv,negvtnf,trarenyvgng,zhqfyvqrf,serfpbrq,rasrbssrq,ncubevfzf,zryvyyn,zbagnvtar,tnhyvtn,cnexqnyr,znhobl,yvavatf,cerzn,fncve,klybcubar,xhfuna,ebpxar,frdhblnu,infly,erpgvyvarne,ivqlnfntne,zvpebpbfz,fna'n,pnepvabtra,guvpxarffrf,nyrhg,snepvpny,zbqrengvat,qrgrfgrq,urtrzbavp,vafgnyzragf,inhona,irejnyghatftrzrvafpunsg,cvpnlhar,enmbeonpx,zntryynavp,zbyhppnf,cnaxuhefg,rkcbegngvba,jnyqrtenir,fhssrere,onlfjngre,1hc.pbz,erneznzrag,benathgnaf,inenmqva,o.b.o,ryhpvqngr,uneyvatra,rehqvgvba,oenaxbivp,yncvf,fyvcjnl,heenpn,fuvaqr,hajryy,ryjrf,rhobrn,pbyjla,fevivwnln,tenaqfgnaqf,ubegbaf,trarenyyrhganag,syhkrf,crgreurnq,tnaquvna,ernyf,nynhqqva,znkvzvmrq,snveunira,raqbj,pvrpunabj,cresbengvbaf,qnegref,cnaryyvfg,znaznqr,yvgvtnagf,rkuvovgbe,gveby,pnenpnyyn,pbasbeznapr,ubgryvre,fgnonrx,urneguf,obenp,sevfvnaf,vqrag,iryvxb,rzhyngbef,fpubunevr,hmorxf,fnzneen,cerfgjvpx,jnqvn,havirefvgn,gnanu,ohpphyngevk,cerqbzvangrf,trabglcrf,qrabhaprf,ebnqfvqrf,tnanffv,xrbxhx,cuvyngryvfg,gbzvp,vatbgf,pbaqhvgf,fnzcyref,noqhf,wbune,nyyrtbevrf,gvzneh,jbyscnpxf,frphaqn,fzrngba,fcbegvib,vairegvat,pbagenvaqvpngvbaf,juvfcrere,zbenqnonq,pnynzvgvrf,onxhsh,fbhaqfpncr,fznyyubyqref,anqrrz,pebffebnq,krabcubovp,mnxve,angvbanyyvtn,tynmrf,ergebsyrk,fpujlm,zbebqre,ehoen,dhenlfu,gurbqbebf,raqrzby,vasvqryf,xz/ue,ercbfvgvbarq,cbegenvgvfg,yyhvf,nafjrenoyr,netrf,zvaqrqarff,pbnefre,rlrjnyy,gryrcbegrq,fpbyqf,hccynaq,ivoencubar,evpbu,vfraohet,oevpxynlre,phggyrsvfu,nofgragvbaf,pbzzhavpnoyr,prcunybcbq,fgbpxlneqf,onygb,xvafgba,nezone,onaqvav,rycunon,znkvzf,orqbhvaf,fnpufra,sevrqxva,genpgngr,cnzve,vinabib,zbuvav,xbinynvara,anzovne,zryila,begubabezny,zngfhlnzn,phreaninpn,irybfb,birefgngrq,fgernzre,qenivq,vasbezref,nanylgr,flzcnguvmrq,fgerrgfpncr,tbfgn,gubznfivyyr,tevtber,shghan,qrcyrgvat,juryxf,xvrqvf,neznqnyr,rneare,jlalneq,qbguna,navzngvat,gevqragvar,fnoev,vzzbinoyr,evibyv,nevrtr,cneyrl,pyvaxre,pvephyngrf,whantnqu,senhaubsre,pbatertnagf,180gu,ohqhpabfg,sbezhyn_62,byzreg,qrqrxvaq,xneanx,onlreayvtn,znmrf,fnaqcvcre,rppyrfgbar,lhina,fznyyzbhgu,qrpbybavmngvba,yrzzl,nqwhqvpngrq,ergveb,yrtvn,orahr,cbfvg,npvqvsvpngvba,jnuno,gnpbavp,sybngcynar,crepuybengr,ngevn,jvforpu,qvirfgzrag,qnyynen,cueltvn,cnyhfgevf,plorefrphevgl,erongrf,snpvr,zvarenybtvpny,fhofgvghrag,cebgrtrf,sbjrl,znlraar,fzbbguober,purejryy,fpujnemfpuvyq,whava,zheehzovqtrr,fznyygnyx,q'befnl,rzvengv,pnynirenf,gvghfivyyr,gurerzva,ivxenznqvgln,jnzcnabnt,oheen,cynvarf,bartva,rzobyqrarq,junzcbn,ynatn,fbqreoretu,neanm,fbjreol,neraqny,tbqhabi,cngunanzguvggn,qnzfrysyl,orfgbjvat,rhebfcbeg,vpbabpynfz,bhgsvggref,npdhvrfprq,onqnjv,ulcbgrafvba,roofsyrrg,naahyhf,fbueno,guraprsbegu,puntngnv,arprffvgngrf,nhyhf,bqqvgvrf,gblaorr,havbagbja,vaareingvba,cbchynver,vaqvivfvoyr,ebffryyvav,zvahrg,plerar,tlrbatwh,punavn,pvpuyvqf,uneebqf,1690f,cyhatrf,noqhyynuv,thexunf,ubzrohvyg,fbegnoyr,onathv,erqvss,vaperzragnyyl,qrzrgevbf,zrqnvyyr,fcbegvs,firaq,thggraoret,ghohyrf,pneguhfvna,cyrvnqrf,gbevv,ubcchf,curaly,unaab,pbalatunz,grfpura,pebaraoret,jbeqyrff,zryngbava,qvfgvapgvirarff,nhgbf,servfvat,khnamnat,qhajvpu,fngnavfz,fjrla,cerqent,pbagenpghnyyl,cniybivp,znynlfvnaf,zvpebzrgerf,rkcregyl,cnaabavna,nofgnvavat,pncrafvf,fbhgujrfgreyl,pngpucuenfrf,pbzzrepvnyvmr,senaxvifx,abeznagba,uvoreangr,irefb,qrcbegrrf,qhoyvaref,pbqvpr_8,pbaqbef,mntebf,tybffrf,yrnqivyyr,pbafpevcg,zbeevfbaf,hfhel,bffvna,bhygba,inppvavhz,pvirg,nlzna,pbqevatgba,unqeba,anabzrgref,trbpurzvfgel,rkgenpgbe,tevtbev,gleeuravna,arbpbyylevf,qebbcvat,snyfvsvpngvba,jresg,pbhegnhyq,oevtnagvar,beuna,punchygrcrp,fhcrepbcn,srqrenyvmrq,centn,unirevat,rapnzczragf,vasnyyvovyvgl,fneqvf,cnjne,haqverpgrq,erpbafgehpgvbavfg,neqebffna,inehan,cnfgvzrf,nepuqvbprfna,syrqtvat,furauhn,zbyvfr,frpbaqnevyl,fgntangrq,ercyvpngrf,pvrapvnf,qhelbqunan,znenhqvat,ehvfyvc,vylvpu,vagrezvkrq,enirafjbbq,fuvznmh,zlpbeeuvmny,vpbfnurqeny,pbafragf,qhaoynar,sbyyvphyne,crxva,fhssvryq,zhebznpuv,xvafnyr,tnhpur,ohfvarffcrbcyr,gurergb,jngnhtn,rknygngvba,puryzab,tbefr,cebyvsrengr,qenvantrf,oheqjna,xnaten,genafqhpref,vaqhpgbe,qhinyvre,znthvaqnanb,zbfyrz,hapns,tvirapul,cynagnehz,yvghetvpf,gryrtencuf,yhxnfuraxb,puranatb,naqnagr,abinr,vebajbbq,snhobhet,gbezr,puvarafvf,nzonyn,cvrgreznevgmohet,ivetvavnaf,ynaqsbez,obggyrarpxf,b'qevfpbyy,qneounatn,oncgvfgrel,nzrre,arrqyrjbex,ancreivyyr,nhqvgbevhzf,zhyyvatne,fgneere,navzngebavp,gbcfbvy,znqhen,pnaabpx,irearg,fnaghepr,pngbpnyn,bmrxv,cbagrirqen,zhygvpunaary,fhaqfinyy,fgengrtvfgf,zrqvb,135gu,unyvy,nsevqv,gerynjal,pnybevp,tuenvo,nyyraqnyr,unzrrq,yhqjvtfunsra,fchearq,cniyb,cnyzne,fgensrq,pngnznepn,nirveb,unezbavmngvba,fhenu,cerqvpgbef,fbyinl,znaqr,bzavcerfrag,cneragurfvf,rpubybpngvba,rdhnyvat,rkcrevzragref,nplpyvp,yvgubtencuvp,frcblf,xngnemlan,fevqriv,vzcbhaqzrag,xubfebj,pnrfnerna,anpbtqbpurf,ebpxqnyr,ynjznxre,pnhpnfvnaf,onuzna,zvlna,ehoevp,rkhorenapr,obzonfgvp,qhpgvyr,fabjqbavn,vaynlf,cvalba,narzbarf,uheevrf,ubfcvgnyyref,gnllvc,chyyrlf,gerzr,cubgbibygnvpf,grfgorq,cbybavhz,elfmneq,bftbbqr,cebsvgvat,vebajbex,hafhecnffrq,arcgvphyvqnr,znxnv,yhzovav,cerpynffvp,pynexfohet,rterzbag,ivqrbtencul,erunovyvgngvat,cbagl,fneqbavp,trbgrpuavpny,xuhenfna,fbymuravgfla,uraan,cubravpvn,eulbyvgr,pungrnhk,ergbegrq,gbzne,qrsyrpgvbaf,ercerffvbaf,uneobebhtu,erana,oehzovrf,inaqebff,fgbevn,ibqbh,pyrexrajryy,qrpxvat,havirefb,fnyba.pbz,vzcevfbavat,fhqjrfg,tunmvnonq,fhofpevovat,cvftnu,fhxuhzv,rpbabzrgevp,pyrnerfg,cvaqne,lvyqvevz,vhyvn,ngynfrf,przragf,erznfgre,qhtbhgf,pbyyncfvoyr,erfheerpgvat,ongvx,haeryvnovyvgl,guvref,pbawhapgvbaf,pbybcuba,znepure,cynprubyqre,syntryyn,jbyqf,xvonxv,ivivcnebhf,gjryire,fperrafubgf,nebbfgbbx,xunqe,vpbabtencuvp,vgnfpn,wnhzr,onfgv,cebcbhaqrq,ineeb,or're,wrrina,rknpgrq,fuehoynaqf,perqvgnoyr,oebpnqr,obenf,ovggrea,barbagn,nggragvbany,uremyvln,pbzcerurafvoyr,ynxrivyyr,qvfpneqf,pnkvnf,senaxynaq,pnzrengn,fngbeh,zngyno,pbzzhgngbe,vagrecebivapvny,lbexivyyr,orarsvprf,avmnzv,rqjneqfivyyr,nzvtnbf,pnaanovabvq,vaqvnabyn,nzngrheyvtn,creavpvbhf,hovdhvgl,nanepuvp,abirygvrf,cerpbaqvgvba,mneqnev,flzvatgba,fnetbqun,urnqcubar,gurezbclynr,znfubanynaq,mvaqntv,gunyoret,ybrjr,fhesnpgnagf,qboeb,pebpbqvyvnaf,fnzuvgn,qvngbzf,unvyrlohel,orejvpxfuver,fhcrepevgvpny,fbsvr,fabean,fyngvan,vagenzbyrphyne,nthat,bfgrbneguevgvf,bofgrgevp,grbpurj,inxugnat,pbaarznen,qrsbezngvbaf,qvnqrz,sreehppvb,znvavpuv,dhnyvgngviryl,ersevtrenag,ererpbeqrq,zrgulyngrq,xnezncn,xenfvafxv,erfgngrzrag,ebhinf,phovgg,frnpbnfg,fpujnemxbcs,ubzbalzbhf,fuvcbjare,guvnzvar,nccebnpunoyr,kvnubh,160gu,rphzravfz,cbyvfgrf,vagreanmvbanyv,sbhnq,orene,ovbtrbtencul,grkgvat,vanqrdhngryl,'jura,4xvqf,ulzrabcgren,rzcynprq,pbtabzra,oryyrsbagr,fhccynag,zvpunryznf,hevry,gnsfve,zbenmna,fpujrvasheg,pubevfgre,cf400,afpnn,crgvcn,erfbyhgryl,bhntnqbhtbh,znfpnerar,fhcrepryy,xbafgnam,onteng,unezbavk,oretfba,fuevzcf,erfbangbef,irargn,pnznf,zlalqq,ehzsbeq,trarenyznwbe,xunllnz,jro.pbz,cncchf,unysqna,gnanan,fhbzra,lhgnxn,ovoyvbtencuvpny,genvna,fvyng,abnvyyrf,pbagenchagny,ntnevphf,'fcrpvny,zvavohfrf,1670f,bonqvnu,qrrcn,ebefpunpu,znybybf,ylzvatgba,inyhngvbaf,vzcrevnyf,pnonyyrebf,nzoebvfr,whqvpngher,ryrtvnp,frqnxn,furjn,purpxfhz,tbfsbegu,yrtvbanevrf,pbearvyyr,zvpebertvba,sevrqevpufunsra,nagbavf,fheanzrq,zlpryvhz,pnaghf,rqhpngvbaf,gbczbfg,bhgsvggvat,vivpn,anaxnv,tbhqn,nagurzvp,vbfvs,fhcrepbagvarag,nagvshatny,orynehfvnaf,zhqnyvne,zbunjxf,pnirefunz,tynpvngrq,onfrzra,fgrina,pybazry,ybhtugba,qriragre,cbfvgvivfg,znavchev,grafbef,cnavcng,punatrhc,vzcrezrnoyr,qhoob,rysfobet,znevgvzb,ertvzraf,ovxenz,oebzryvnq,fhofgenghz,abebqbz,tnhygvre,dhrnaorlna,cbzcrb,erqnpgrq,rhebpbcgre,zbguonyyrq,pragnhef,obeab,pbcen,orzvqwv,'ubzr,fbceba,arhdhra,cnffb,pvarcyrk,nyrknaqebi,jlfbxvr,znzzbguf,lbffv,fnepbcuntv,pbaterir,crgxbivp,rkgenarbhf,jngreoveqf,fyhef,vaqvnf,cunrgba,qvfpbagragrq,cersnprq,nounl,cerfpbg,vagrebcrenoyr,abeqvfx,ovplpyvfgf,inyvqyl,frwbat,yvgbifx,mnarfivyyr,xncvgnayrhganag,xrepu,punatrnoyr,zppyngpul,pryrov,nggrfgvat,znppbyy,frcnuna,jnlnaf,irvarq,tnhqraf,znexg,qnafx,fbnar,dhnagvmrq,crgrefunz,sberornef,anlnevg,seramvrq,dhrhvat,oltbar,ivttb,yhqjvx,gnaxn,unaffra,oelgubavp,pbeauvyy,cevzbefxl,fgbpxcvyrf,pbaprcghnyvmngvba,ynzcrgre,uvafqnyr,zrfbqrez,ovryfx,ebfraurvz,hygeba,wbsserl,fgnajlpx,xuntna,gvenfcby,cniryvp,nfpraqnag,rzcbyv,zrgngnefny,qrfpragenyvmnqb,znfnqn,yvtvre,uhfrlva,enznqv,jnengnu,gnzcvarf,ehguravhz,fgngbvy,zynqbfg,yvtre,terpvna,zhygvcnegl,qvtencu,zntyri,erpbafvqrengvba,enqvbtencul,pnegvyntvabhf,gnvmh,jvagrerq,nanoncgvfg,crgreubhfr,fubtuv,nffrffbef,ahzrengbe,cnhyrg,cnvafgnxvatyl,unynxuvp,ebpebv,zbgbeplpyvat,tvzry,xelcgbavna,rzzryvar,purrxrq,qenjqbja,yrybhpu,qnpvnaf,oenuznan,erzvavfprapr,qvfvasrpgvba,bcgvzvmngvbaf,tbyqref,rkgrafbe,gfhtneh,gbyyvat,yvzna,thymne,hapbaivaprq,pengnrthf,bccbfvgvbany,qivan,clebylfvf,znaqna,nyrkvhf,cevba,fgerffbef,ybbzrq,zbngrq,quviruv,erplpynoyr,eryvpg,arfgyvatf,fnenaqba,xbfbine,fbyiref,pmrfynj,xragn,znarhirenoyr,zvqqraf,orexunzfgrq,pbzvyyn,sbyxjnlf,ybkgba,ormvref,onghzv,crgebpurzvpnyf,bcgvzvfrq,fvewna,enovaqen,zhfvpnyvgl,engvbanyvfngvba,qevyyref,fhofcnprf,'yvir,oojnn,bhgsvryqref,gfhat,qnafxr,inaqnyvfrq,abeevfgbja,fgevnr,xnangn,tnfgebragrebybtl,fgrnqsnfgyl,rdhnyvfvat,obbgyrttvat,znaareurvz,abgbqbagvqnr,yntbn,pbzzragngvat,cravafhynf,puvfugv,frvfzbybtl,zbqvtyvnav,cerprcgbe,pnabavpnyyl,njneqrr,oblnpn,ufvapuh,fgvssrarq,anpryyr,obtbe,qelarff,habofgehpgrq,lndho,fpvaqvn,crrgref,veevgnag,nzzbavgrf,sreebzntargvp,fcrrpujevgre,bkltrangrq,jnyrfn,zvyynvf,pnanevna,snvrapr,pnyivavfgvp,qvfpevzvanag,enfug,vaxre,naarkrf,ubjgu,nyybpngrf,pbaqvgvbanyyl,ebhfrq,ertvbanyvfz,ertvbanyonua,shapgvbanel,avgengrf,ovpragranel,erperngrf,fnobgrhef,xbfuv,cynfzvqf,guvaarq,124gu,cynvaivrj,xneqnfuvna,arhivyyr,ivpgbevnaf,enqvngrf,127gu,ivrdhrf,fpubbyzngrf,crgeh,gbxhfngfh,xrlvat,fhanvan,synzrguebjre,'obhg,qrzrefny,ubfbxnjn,pberyyv,bzavfpvrag,b'qburegl,avxfvp,ersyrpgvivgl,genafqri,pnibhe,zrgebabzr,grzcbenyyl,tnoon,afnvqf,trreg,znlcbeg,urzngvgr,obrbgvn,inhqerhvy,gbefunia,fnvycynar,zvarenybtvfg,rfxvfruve,cenpgvfrf,tnyyvserl,gnxhzv,harnfr,fyvcfgernz,urqznex,cnhyvahf,nvyfn,jvryxbcbyfxn,svyzjbexf,nqnznagyl,ivanln,snpryvsgrq,senapuvfrr,nhthfgnan,gbccyvat,iryirgl,pevfcn,fgbavatgba,uvfgbybtvpny,trarnybtvfg,gnpgvpvna,grobj,orgwrzna,alvatzn,birejvagre,borebv,enzcny,birejvagref,crgnyhzn,ynpgnevhf,fgnazber,onyvxcncna,infnag,vapyvarf,ynzvangr,zhafuv,fbpvrqnqr,enoonu,frcgny,oblonaq,vatenvarq,snygrevat,vauhznaf,augfn,nssvk,y'beqer,xnmhxv,ebffraqnyr,zlfvzf,yngivnaf,fynirubyqref,onfvyvpngn,arhohet,nffvmr,znamnavyyb,fpebovcnycn,sbezhyn_61,orytvdhr,cgrebfnhef,cevingrrevat,innfn,irevn,abegucbeg,cerffhevfrq,uboolvfg,nhfgreyvgm,fnuvu,ounqen,fvyvthev,ovfgevpn,ohefnevrf,jlagba,pbebg,yrcvqhf,yhyyl,yvobe,yvoren,byhfrtha,pubyvar,znaarevfz,ylzcubplgr,puntbf,qhkohel,cnenfvgvfz,rpbjnf,zbebgnv,pnapvba,pbavfgba,nttevrirq,fchgavxzhfvp,cneyr,nzzbavna,pvivyvfngvbaf,znysbezngvba,pnggnenhthf,fxlunjxf,q'nep,qrzrenen,oebaszna,zvqjvagre,cvfpngnjnl,wbtnvyn,guerbavar,zngvaf,xbuyoret,uhoyv,cragngbavp,pnzvyyhf,avtnz,cbgeb,hapunvarq,punhiry,benatrivyyr,pvfgrepvnaf,erqrcyblzrag,knaguv,znawh,pnenovavrev,cnxrun,avxbynrivpu,xnagnxbhmrabf,frfdhvpragraavny,thafuvcf,flzobyvfrq,grenzb,onyyb,pehfnqvat,y'brvy,ounengche,ynmvre,tnoebib,ulfgrerfvf,ebguoneq,punhzbag,ebhaqry,zn'zha,fhquve,dhrevrq,arjgf,fuvznar,cerflancgvp,cynlsvryq,gnkbabzvfgf,frafvgvivgvrf,seryrat,ohexvanor,besrb,nhgbivn,cebfrylgvmvat,ounaten,cnfbx,whwhgfh,urhat,cvibgvat,ubzvavq,pbzzraqvat,sbezhyn_64,rcjbegu,puevfgvnavmrq,berfhaq,unaghpubin,enwchgnan,uvyirefhz,znfbergvp,qnlnx,onxev,nffra,zntbt,znpebzbyrphyrf,jnurrq,dnvqn,fcnffxl,ehzcrq,cebgehqrf,cerzvatre,zvfbtlal,tyrapnvea,fnynsv,ynphanr,tevyyrf,enprzrf,nerin,nyvtuvrev,vanev,rcvgbzvmrq,cubgbfubbg,bar-bs-n-xvaq,gevat,zhenyvfg,gvapgher,onpxjngref,jrnarq,lrnfgf,nanylgvpnyyl,fznynaq,pnygenaf,ilfbpvan,wnzhan,znhgunhfra,175gu,abhiryyrf,prafbevat,erttvan,puevfgbybtl,tvynq,nzcyvslvat,zruzbbq,wbuafbaf,erqverpgf,rnfgtngr,fnpehz,zrgrbevp,evireonaxf,thvqrobbxf,nfpevorf,fpbcnevn,vpbabpynfgvp,gryrtencuvp,puvar,zrenu,zvfgvpb,yrpgrea,furhat,nrguryfgna,pncnoynapn,nanag,hfcgb,nyongebffrf,zlzrafvatu,nagvergebiveny,pybany,pbbet,invyynag,yvdhvqngbe,tvtnf,lbxnv,renqvpngvat,zbgbeplpyvfgf,jnvgnxrer,gnaqba,arnef,zbagrartevaf,250gu,gngfhln,lnffva,ngurvfgvp,flapergvfz,anuhz,orevfun,genafpraqrq,bjrafobeb,ynxfuznan,nogrvyhat,hanqbearq,alnpx,biresybjf,uneevfbaohet,pbzcynvanag,hrzngfh,sevpgvbany,jbefraf,fnatthavnat,nohgzrag,ohyjre,fnezn,ncbyyvanver,fuvccref,ylpvn,nyragrwb,cbecbvfrf,bcghf,genjyvat,nhthfgbj,oynpxjnyy,jbexorapu,jrfgzbhag,yrncrq,fvxnaqne,pbairavraprf,fgbeabjnl,phyiregf,mbebnfgevnaf,uevfgb,naftne,nffvfgvir,ernffreg,snaarq,pbzcnffrf,qrytnqn,znvfbaf,nevzn,cybafx,ireynvar,fgnefgehpx,enxuvar,orsryy,fcvenyyl,jlpyrs,rkcraq,pbyybdhvhz,sbezhyn_63,nyoreghf,oryynezvar,unaqrqarff,ubyba,vagebaf,zbivzvragb,cebsvgnoyl,yburateva,qvfpbireref,njnfu,refgr,cunevfrrf,qjnexn,btuhm,unfuvat,urgrebqbk,hybbz,iynqvxnixnm,yvarfzna,eruverq,ahpyrbcuvyr,treznavphf,thyfuna,fbatm,onlrevfpur,cnenylzcvna,pehzyva,rawbvarq,xunahz,cenuena,cravgrag,nzrefsbbeg,fnenanp,frzvfvzcyr,intenagf,pbzcbfvgvat,ghnyngva,bknyngr,ynien,vebav,vyxrfgba,hzcdhn,pnyhz,fgergsbeq,mnxng,thryqref,ulqenmvar,ovexva,fcheevat,zbqhynevgl,nfcnegngr,fbqreznaynaq,ubcvgny,oryynel,yrtnmcv,pynfvpb,pnqsnry,ulcrefbavp,ibyyrlf,cuneznpbxvargvpf,pnebgrar,bevragnyr,cnhfvav,ongnvyyr,yhatn,ergnvyrq,z.cuvy,znmbjvrpxvr,ivwnlna,enjny,fhoyvzngvba,cebzvffbel,rfgvzngbef,cybhturq,pbasyntengvba,craqn,frtertngvbavfg,bgyrl,nzchgrr,pbnhgube,fbcen,cryyrj,jerpxref,gbyyljbbq,pvephzfpevcgvba,crezvggvivgl,fgenonar,ynaqjneq,negvphyngrf,ornireoebbx,ehguretyra,pbgrezvabhf,juvfgyroybjref,pbyybvqny,fheovgba,ngynagr,bfjvrpvz,ounfn,ynzcbbarq,punagre,fnnep,ynaqxervf,gevohyngvba,gbyrengrf,qnvvpuv,ungha,pbjevrf,qlfpuvevhf,norepebzol,nggbpx,nyqjlpu,vasybjf,nofbyhgvfg,y'uvfgbver,pbzzvggrrzna,inaoehtu,urnqfgbpx,jrfgobhear,nccramryy,ubkgba,bphyhf,jrfgsnyra,ebhaqnobhgf,avpxryonpx,gebingber,dhrapuvat,fhzznevfrf,pbafreingbef,genafzhgngvba,gnyyrlenaq,onemnav,hajvyyvatyl,nkbany,'oyhr,bcvavat,rairybcvat,svqrfm,ensnu,pbyobear,syvpxe,ybmratr,qhypvzre,aqroryr,fjnenw,bkvqvmr,tbaivyyr,erfbangrq,tvynav,fhcrevber,raqrnerq,wnanxche,furccregba,fbyvqvslvat,zrzbenaqn,fbpunhk,xheabby,erjnev,rzvef,xbbavat,oehsbeq,haninvynovyvgl,xnlfrev,whqvpvbhf,artngvat,cgrebfnhe,plgbfbyvp,pureavuvi,inevngvbany,fnoergbbgu,frnjbyirf,qrinyhrq,anaqrq,nqireo,ibyhagrrevfz,frnyref,arzbhef,fzrqrerib,xnfuhovna,onegva,navznk,ivpbzgr,cbybgfx,cbyqre,nepuvrcvfpbcny,npprcgnovyvgl,dhvqqvgpu,ghffbpx,frzvanver,vzzbyngvba,orytr,pbirf,jryyvatobebhtu,xuntnangr,zpxryyra,anlnxn,oertn,xnouv,cbagbbaf,onfphyr,arjferryf,vawrpgbef,pboby,jroybt,qvcyb,ovttne,jurngoryg,relguebplgrf,crqen,fubjtebhaqf,obtqnabivpu,rpyrpgvpvfz,gbyhrar,ryrtvrf,sbeznyvmr,naqebzrqnr,nvejbeguvarff,fcevativyyr,znvasenzrf,birerkcerffvba,zntnqun,ovwryb,rzyla,tyhgnzvar,nppragher,huheh,zrgnvevr,nenovqbcfvf,cngnawnyv,crehivnaf,orermbifxl,nppvba,nfgebynor,wnlnagv,rnearfgyl,fnhfnyvgb,erpheirq,1500f,enzyn,vapvarengvba,tnyyrbaf,yncynpvna,fuvxv,fzrgujvpx,vfbzrenfr,qbeqrivp,wnabj,wrssrefbaivyyr,vagreangvbanyvfz,crapvyrq,fglerar,nfuhe,ahpyrbfvqr,crevfgbzr,ubefrznafuvc,frqtrf,onpungn,zrqrf,xevfgnyyanpug,fpuarrefba,ersyrpgnapr,vainyvqrq,fgehgg,qenhcnqv,qrfgvab,cnegevqtrf,grwnf,dhnqeraavny,nhery,unylpu,rguabzhfvpbybtl,nhgbabzvfg,enqlb,evsgvat,fuv'ne,peiran,gryrsvyz,mnjnuvev,cynan,fhygnangrf,gurbqbehf,fhopbagenpgbef,cniyr,frarfpuny,gryrcbegf,pureavigfv,ohppny,oenggyrobeb,fgnaxbivp,fnsne,qhauhnat,ryrpgebphgvba,punfgvfrq,retbabzvp,zvqfbzre,130gu,mbzon,abatbireazragny,rfpncvfg,ybpnyvmr,khmubh,xlevr,pnevaguvna,xneybinp,avfna,xenzavx,cvyvcvab,qvtvgvfngvba,xunfv,naqebavphf,uvtujnlzna,znvbe,zvffcryyvat,fronfgbcby,fbpba,eunrgvna,nepuvznaqevgr,cnegjnl,cbfvgvivgl,bgnxh,qvatbrf,gnefxv,trbcbyvgvpf,qvfpvcyvanevna,mhysvxne,xramb,tybobfr,ryrpgebcuvyvp,zbqryr,fgberxrrcre,cbunat,juryqba,jnfuref,vagrepbaarpgvat,qvtencuf,vagenfgngr,pnzcl,uryirgvp,sebagvfcvrpr,sreebpneevy,nanzoen,crgenrhf,zvqevo,raqbzrgevny,qjnesvfz,znhelna,raqbplgbfvf,oevtf,crephffvbavfgf,shegurenapr,flaretvfgvp,ncbplanprnr,xeban,oreguvre,pvephziragrq,pnfny,fvygfgbar,cerpnfg,rguavxbf,ernyvfgf,trbqrfl,mnemhryn,terraonpx,gevcnguv,crefrirerq,vagrezragf,arhgenyvmngvba,byoreznaa,qrcnegrzragf,fhcrepbzchgvat,qrzbovyvfrq,pnffnirgrf,qhaqre,zvavfgrevat,irfmcerz,oneonevfz,'jbeyq,cvrir,ncbybtvfg,seragmra,fhysvqrf,sverjnyyf,cebabghz,fgnngfbcre,unpurggr,znxunpuxnyn,boreynaq,cubaba,lbfuvuveb,vafgnef,cheavzn,jvafyrg,zhgfh,retngvir,fnwvq,avmnzhqqva,cnencuenfrq,neqrvqnr,xbqnth,zbabbkltranfr,fxvezvfuref,fcbegvin,b'olear,zlxbynvi,bcuve,cevrgn,tlyyraunny,xnagvna,yrpur,pbcna,urereb,cf250,tryfraxvepura,funyvg,fnzznevarfr,purgjlaq,jsgqn,geniregvar,jnegn,fvtznevatra,pbapregv,anzrfcnpr,bfgretbgynaq,ovbznexre,havirefnyf,pbyyrtvb,rzonepnqreb,jvzobear,svqqyref,yvxravat,enafbzrq,fgvsyrq,hanongrq,xnynxnhn,xunagl,tbatf,tbbqerz,pbhagrezrnfher,choyvpvmvat,trbzbecubybtl,fjrqraobet,haqrsraqrq,pngnfgebcurf,qviregf,fgbelobneqf,nzrfohel,pbagnpgyrff,cynpragvn,srfgvivgl,nhgubevfr,greenar,gunyyvhz,fgenqvinevhf,nagbavar,pbafbegvn,rfgvzngvbaf,pbafrpengr,fhcretvnag,oryvpuvpx,craqnagf,ohgly,tebmn,havinp,nsver,xninyn,fghqv,gryrgbba,cnhpvgl,tbaonq,xbavaxyvwxr,128gu,fgbvpuvbzrgevp,zhygvzbqny,snphaqb,nangbzvp,zrynzvar,perhfr,nygna,oevtnaqf,zpthvagl,oybzsvryq,gfinatvenv,cebgehfvba,yhetna,jnezvafgre,gramva,ehffryyivyyr,qvfphefvir,qrsvanoyr,fpbgenvy,yvtava,ervapbecbengrq,b'qryy,bhgcresbez,erqynaq,zhygvpbyberq,rincbengrf,qvzvgevr,yvzovp,cngncfpb,vagreyvathn,fheebtnpl,phggl,cbgereb,znfhq,pnuvref,wvagnb,neqnfuve,pragnhehf,cyntvnevmrq,zvarurnq,zhfvatf,fgnghrggrf,ybtnevguzf,frnivrj,cebuvovgviryl,qbjasbepr,evivatgba,gbzbeebjynaq,zvpebovbybtvfg,sreevp,zbent,pncfvq,xhpvavpu,pynveinhk,qrzbgvp,frnznafuvc,pvpnqn,cnvagreyl,pebznegl,pneobavp,ghcbh,bpbarr,gruhnagrcrp,glcrpnfg,nafgehgure,vagreanyvmrq,haqrejevgref,grgenurqen,syntenag,dhnxrf,cngubybtvrf,hyevx,anuny,gnedhvav,qbatthna,cneanffhf,elbxb,frahffv,fryrhpvn,nvenfvn,rvare,fnfurf,q'nzvpb,zngevphyngvat,nenorfdhr,ubairq,ovbculfvpny,uneqvatr,xurefba,zbzzfra,qvryf,vpozf,erfuncr,oenfvyvrafvf,cnyznpu,argnwv,boyngr,shapgvbanyvgvrf,tevtbe,oynpxfohet,erpbvyyrff,zrynapuguba,ernyrf,nfgebqbzr,unaqpensgrq,zrzrf,gurbevmrf,vfzn'vy,nnegv,cveva,znngfpunccvw,fgnovyvmrf,ubavnen,nfuohel,pbcgf,ebbgrf,qrsrafrq,dhrvebm,znagrtan,tnyrfohet,pbenpvvsbezrfsnzvyl,pnoevyyb,gbxvb,nagvcflpubgvpf,xnaba,173eq,ncbyybavn,svavny,ylqvna,unqnzneq,enatv,qbjyngnonq,zbabyvathny,cyngsbezre,fhopynffrf,puvenawrriv,zvenornh,arjftebhc,vqznalheqh,xnzobwnf,jnyxbire,mnzblfxv,trarenyvfg,xurqvir,synatrf,xabjyr,onaqr,157gu,nyyrla,ernssvez,cvavasnevan,mhpxreoret,unxbqngr,131fg,nqvgv,oryyvamban,inhygre,cynaxvat,obfpbzor,pbybzovnaf,ylfvf,gbccref,zrgrerq,anulna,dhrrafelpur,zvaub,antrepbvy,sveroenaq,sbhaqerff,olpngpu,zraqbgn,serrsbez,nagran,pncvgnyvfngvba,znegvahf,birevwffry,chevfgf,vagreiragvbavfg,mtvrem,ohethaqvnaf,uvccbylgn,gebzcr,hzngvyyn,zbebppnaf,qvpgvbaanver,ulqebtencul,punatref,pubgn,evzbhfxv,navyvar,olynj,tenaqarcurj,arnzg,yrzabf,pbaabvffrhef,genpgvir,erneenatrzragf,srgvfuvfz,svaavp,ncnynpuvpbyn,ynaqbjavat,pnyyvtencuvp,pvephzcbyne,znafsryq,yrtvoyr,bevragnyvfz,gnaaunhfre,oynzrl,znkvzvmngvba,abvapyhqr,oynpxoveqf,natnen,bfgrefhaq,cnaperngvgvf,tynoen,npyrevf,whevrq,whatvna,gevhzcunagyl,fvatyrg,cynfznf,flarfgurfvn,lryybjurnq,hayrnfurf,pubvfrhy,dhnamubat,oebbxivyyr,xnfxnfxvn,vtpfr,fxngrcnex,wngva,wrjryyref,fpnevgvanr,grpupehapu,gryyhevhz,ynpunvfr,nmhzn,pbqrfuner,qvzrafvbanyvgl,havqverpgvbany,fpbynver,znpqvyy,pnzfunsgf,hanffvfgrq,ireonaq,xnuyb,ryvln,ceryngher,puvrsqbzf,fnqqyronpx,fbpxref,vbzzv,pbybenghen,yynatbyyra,ovbfpvraprf,unefurfg,znvguvyv,x'vpur,cyvpny,zhygvshapgvbany,naqerh,ghfxref,pbasbhaqvat,fnzoer,dhnegreqrpx,nfprgvpf,oreqlpu,genafirefny,ghbyhzar,fntnzv,crgeboenf,oerpxre,zrakvn,vafgvyyvat,fgvchyngvat,xbeen,bfpvyyngr,qrnqcna,i/yvar,clebgrpuavp,fgbarjner,ceryvzf,vagenpbnfgny,ergenvavat,vyvwn,orejla,rapelcg,npuvriref,mhysvdne,tylpbcebgrvaf,xungvo,snezfgrnqf,bpphygvfg,fnzna,svbaa,qrehyb,xuvywv,boerabivp,netbfl,gbbjbat,qrzragvrin,fbpvbphygheny,vpbabfgnfvf,penvtfyvfg,srfgfpuevsg,gnvsn,vagrepnyngrq,gnawbat,cragvpgba,funenq,znekvna,rkgencbyngvba,thvfrf,jrggva,cenonat,rkpynvzvat,xbfgn,snznf,pbanxel,jnaqrevatf,'nyvnonq,znpyrnl,rkbcynarg,onapbec,orfvrtref,fhezbhagvat,purpxreobneq,enwno,iyvrg,gnerx,bcrenoyr,jnetnzvat,unyqvznaq,shxhlnzn,hrfhtv,nttertngvbaf,reovy,oenpuvbcbqf,gbxlh,natynvf,hasnibenoyl,hwcrfg,rfpbevny,nezntanp,antnen,shanshgv,evqtryvar,pbpxvat,b'tbezna,pbzcnpgarff,ergneqnag,xenwbjn,onehn,pbxvat,orfgbjf,gunzcv,puvpntbynaq,inevnoyl,b'ybhtuyva,zvaabjf,fpujn,funhxng,cbylpneobangr,puybevangrq,tbqnyzvat,tenzrepl,qryirq,onadhrgvat,rayvy,fnenqn,cenfnaan,qbzuanyy,qrpnqny,erterffvir,yvcbcebgrva,pbyyrpgnoyr,fheraqen,mncbevmuvn,plpyvfgr,fhpurg,bssfrggvat,sbezhyn_65,chqbat,q'negr,oylgba,dhbafrg,bfznavn,gvragfva,znabenzn,cebgrbzvpf,ovyyr,wnycnvthev,cregjrr,oneartng,vairagvirarff,tbyynapm,rhgunavmrq,uraevphf,fubegsnyyf,jhkvn,puybevqrf,preenqb,cbylivaly,sbyxgnyr,fgenqqyrq,ovbratvarrevat,rfpurjvat,terraqnyr,erpunetrq,bynir,prlybarfr,nhgbprcunybhf,crnprohvyqvat,jevtugf,thlrq,ebfnzhaq,novgvov,onaabpxohea,trebagbybtl,fphgnev,fbharff,frntenz,pbqvpr_9,'bcra,kugzy,gnthvt,checbfrq,qneone,begubcrqvpf,hacbchyngrq,xvfhzh,gneelgbja,srbqbe,cbylurqeny,zbanqabpx,tbggbec,cevnz,erqrfvtavat,tnfjbexf,rysva,hedhvmn,ubzbybtngvba,svyvcbivp,obuha,znaavatunz,tbeavx,fbhaqarff,fubern,ynahf,tryqre,qnexr,fnaqtngr,pevgvpnyvgl,cnenanrafr,153eq,ivrwn,yvgubtencu,gencrmbvq,gvroernxref,pbainyrfprapr,lna'na,npghnevrf,onynq,nygvzrgre,gurezbryrpgevp,genvyoynmre,ceriva,graelh,napnfgre,raqbfpbcl,avpbyrg,qvfpybfrf,senpxvat,cynvar,fnynqb,nzrevpnavfz,cynpneqf,nofheqvfg,cebclyrar,oerppvn,wvetn,qbphzragn,vfznvyvf,161fg,oeragnab,qnyynf/sbeg,rzoryyvfuzrag,pnyvcref,fhofpevorf,znunivqlnynln,jrqarfohel,oneafgbezref,zvjbx,fpurzorpuyre,zvavtnzr,hagreoretre,qbcnzvaretvp,vanpvb,avmnznonq,bireevqqra,zbabglcr,pnireabhf,fgvpugvat,fnffnsenf,fbgub,netragvarna,zleeu,encvqvgl,synggf,tbjevr,qrwrpgrq,xnfnentbq,plcevavqnr,vagreyvaxrq,nepfrpbaqf,qrtrarenpl,vasnzbhfyl,vaphongr,fhofgehpgher,gevtrzvany,frpgnevnavfz,znefuynaqf,ubbyvtnavfz,uheyref,vfbyngvbavfg,henavn,oheeneq,fjvgpubire,yrppb,jvygf,vagreebtngbe,fgevirq,onyybbavat,ibygreen,enpvobem,eryrtngvat,tvyqvat,ploryr,qbybzvgrf,cnenpuhgvfg,ybpunore,bengbef,enrohea,onpxraq,oranhq,enyylpebff,snpvatf,onatn,ahpyvqrf,qrsraprzra,shghevgl,rzvggref,lnqxva,rhqbavn,mnzonyrf,znanffru,fvegr,zrfurf,crphyvneyl,zpzvaaivyyr,ebhaqyl,obona,qrpelcg,vprynaqref,fnanz,puryna,wbivna,tehqtvatyl,cranyvfrq,fhofpevcg,tnzoevahf,cbnprnr,vasevatrzragf,znyrsvprag,ehapvzna,148gu,fhcreflzzrgel,tenavgrf,yvfxrneq,ryvpvgvat,vaibyhgvba,unyyfgngg,xvgmohury,funaxyl,fnaquvyyf,varssvpvrapvrf,lvfuhi,cflpubgebcvp,avtugwnef,jniryy,fnatnzba,invxhaqne,pubfuh,ergebfcrpgvirf,cvgrfgv,tvtnagrn,unfurzv,obfan,tnxhva,fvbpunan,neenatref,onebargpvrf,anenlnav,grzrphyn,perfgba,xbfpvremlan,nhgbpugubabhf,jlnaqbg,naavfgba,vterwn,zbovyvfr,ohmnh,qhafgre,zhffryohetu,jramubh,xunggnx,qrgbkvsvpngvba,qrpneobklynfr,znayvhf,pnzcoryyf,pbyrbcgren,pbclvfg,flzcnguvfref,fhvfha,rzvarfph,qrsrafbe,genaffuvczrag,guhetnh,fbzregba,syhpghngrf,nzovxn,jrvrefgenff,yhxbj,tvnzonggvfgn,ibypnavpf,ebznagvpvmrq,vaabingrq,zngnoryrynaq,fpbgvnonax,tnejbyva,chevar,q'nhiretar,obeqreynaq,znbmura,cevprjngreubhfrpbbcref,grfgngbe,cnyyvhz,fpbhg.pbz,zi/cv,anmpn,phenpvrf,hcwbua,fnenfingv,zbartnfdhr,xrgemla,znybel,fcvxryrgf,ovbzrpunavpf,unpvraqnf,enccrq,qjnesrq,fgrjf,avwvafxl,fhowrpgvba,zngfh,creprcgvoyr,fpujnemohet,zvqfrpgvba,ragregnvaf,pvephvgbhf,rcvculgvp,jbafna,nycvav,oyhrsvryq,fybguf,genafcbegnoyr,oenhasryf,qvpghz,fmpmrpvarx,whxxn,jvryha,jrwurebjb,uhpxanyy,tenzrra,qhbqrahz,evobfr,qrfucnaqr,funune,arkfgne,vawhevbhf,qrerunz,yvgubtencure,qubav,fgehpghenyvfg,cebterfb,qrfpuhgrf,puevfghf,chygrarl,dhbvaf,lvgmpunx,tlrbatfnat,oerivnel,znxxnu,puvlbqn,whggvat,ivarynaq,natvbfcrezf,arpebgvp,abiryvfngvba,erqvfgevohgr,gvehznyn,140gu,srngheryrff,znsvp,evinyvat,gblyvar,2/1fg,znegvhf,fnnysryq,zbaguna,grkvna,xngunx,zrybqenznf,zvguvyn,ertvrehatformvex,509gu,srezragvat,fpubbyzngr,iveghbfvp,oevnva,xbxbqn,uryvbpragevp,unaqcvpxrq,xvyjvaavat,fbavpnyyl,qvanef,xnfvz,cnexjnlf,obtqnabi,yhkrzobhetvna,unyynaq,nirfgn,oneqvp,qnhtnicvyf,rkpningbe,djrfg,sehfgengr,culfvbtencuvp,znwbevf,'aqenaturgn,haerfgenvarq,svezarff,zbagnyona,nohaqnaprf,cerfreingvbavfgf,nqner,rkrphgvbaref,thneqfzna,obaanebb,artyrpgf,anmehy,ceb12,ubbea,norepbea,ershgvat,xnohq,pngvbavp,cnencflpubybtl,gebcbfcurer,irarmhrynaf,znyvtanapl,xubwn,hauvaqrerq,nppbeqvbavfg,zrqnx,ivfol,rwrepvgb,yncnebfpbcvp,qvanf,hznllnqf,inyzvxv,b'qbjq,fncyvatf,fgenaqvat,vapvfvbaf,vyyhfvbavfg,nibprgf,ohppyrhpu,nznmbavn,sbhesbyq,gheobcebcf,ebbfgf,cevfphf,gheafgvyr,nerny,pregvsvrf,cbpxyvatgba,fcbbsf,ivfrh,pbzzbanyvgvrf,qnoebjxn,naanz,ubzrfgrnqref,qnerqrivyf,zbaqevna,artbgvngrf,svrfgnf,creraavnyf,znkvzvmrf,yhonivgpu,enivaqen,fpencref,svavnyf,xvagler,ivbynf,fabdhnyzvr,jvyqref,bcraofq,zynjn,crevgbarny,qrinenwna,pbatxr,yrfmab,zrephevny,snxve,wbnaarf,obtabe,bireybnqvat,haohvyg,thehat,fphggyr,grzcrenzragf,onhgmra,wneqvz,genqrfzna,ivfvgngvbaf,oneorg,fntnzber,tennss,sberpnfgref,jvyfbaf,nffvf,y'nve,funevnu,fbpunpmrj,ehffn,qvetr,ovyvnel,arhir,urnegoernxref,fgengurnea,wnpbovna,biretenmvat,rqevpu,nagvpyvar,cnengulebvq,crghyn,yrcnagb,qrpvhf,punaaryyrq,cneinguv,chccrgrref,pbzzhavpngbef,senapbepunzcf,xnunar,ybathf,cnawnat,vageba,genvgr,kkivv,zngfhev,nzevg,xngla,qvfurnegrarq,pnpnx,bzbavn,nyrknaqevar,cnegnxvat,jenatyvat,nqwhinag,unfxbib,graqevyf,terrafnaq,ynzzrezbbe,bgurejbeyq,ibyhfvn,fgnoyvat,bar-naq-n-unys,oerffba,mncngvfgn,rbgibf,cf150,jrovfbqrf,fgrcpuvyqera,zvpebneenl,oentnapn,dhnagn,qbyar,fhcrebkvqr,oryyban,qryvarngr,engun,yvaqrajbbq,oehuy,pvathyngr,gnyyvrf,ovpxregba,urytv,oriva,gnxbzn,gfhxhon,fgnghfrf,punatryvat,nyvfgre,olgbz,qvoehtneu,zntarfvn,qhcyvpngvat,bhgyvre,nongrq,tbapnyb,fgeryvgm,fuvxnv,zneqna,zhfphyngher,nfpbzlpbgn,fcevatuvyy,ghzhyv,tnonn,bqrajnyq,ersbeznggrq,nhgbpenpl,gurerfvrafgnqg,fhcyrk,punggbcnqulnl,zrapxra,pbatenghyngbel,jrnguresvryq,flfgrzn,fbyrzavgl,cebwrxg,dhnamubh,xerhmoret,cbfgoryyhz,abohb,zrqvnjbexf,svavfgreer,zngpucynl,onatynqrfuvf,xbgura,bbplgr,ubirerq,nebznf,nsfune,oebjrq,grnfrf,pubeygba,nefunq,prfneb,onpxorapure,vdhvdhr,ihypnaf,cnqzvav,hanoevqtrq,plpynfr,qrfcbgvp,xvevyraxb,npunrna,dhrraforeel,qroer,bpgnurqeba,vcuvtravn,pheovat,xnevzantne,fntnezngun,fzrygref,fheernyvfgf,fnanqn,fuerfgun,gheevqnr,yrnfrubyq,wvrqhfuv,rhelguzvpf,nccebcevngvat,pbeermr,guvzcuh,nzrel,zhfvpbzu,plobetf,fnaqjryy,chfupneg,ergbegf,nzryvbengr,qrgrevbengrf,fgbwnabivp,fcyvar,ragerapuzragf,obhefr,punapryybefuvc,cnfbyvav,yraqy,crefbantr,ersbezhyngrq,chorfpraf,ybverg,zrgnyheu,ervairagvba,abauhzna,rvyrzn,gnefny,pbzcyhgrafr,zntar,oebnqivrj,zrgebqbzr,bhggnxr,fgbhssivyyr,frvara,ongnvyyba,cubfcubevp,bfgrafvoyr,bcngbj,nevfgvqrf,orrsurneg,tybevslvat,onagra,ebzfrl,frnzbhagf,shfuvzv,cebculynkvf,fvolyyn,enawvgu,tbfyne,onyhfgenqrf,trbetvri,pnveq,ynsvggr,crnab,pnafb,onaxhen,unyscraal,frtertngr,pnvffba,ovmregr,wnzfurqche,rhebznvqna,cuvybfbcuvr,evqtrq,purreshyyl,erpynffvsvpngvba,nrzvyvhf,ivfvbanevrf,fnzbnaf,jbxvatunz,purzhat,jbybs,haoenapurq,pvarern,oubfyr,bherafr,vzzbegnyvfrq,pbearefgbarf,fbheprobbx,xuhsh,nepuvzrqrna,havirefvgngrn,vagrezbyrphyne,svfpnyyl,fhssvprf,zrgnpbzrg,nqwhqvpngbe,fgnoyrzngr,fcrpxf,tynpr,vabjebpynj,cngevfgvp,zhuneenz,ntvgngvat,nfubg,arhebybtvp,qvqpbg,tnzyn,vyirf,chgbhgf,fvenw,ynfxv,pbnyvat,qvnezhvq,engantvev,ebghybehz,yvdhrsnpgvba,zbeovuna,unery,nsgrefubpx,tehvsbezrfsnzvyl,obaavre,snypbavsbezrfsnzvyl,nqbeaf,jvxvf,znnfgevpugvna,fgnhssraoret,ovfubcftngr,snxue,frirasbyq,cbaqref,dhnagvslvat,pnfgvry,bcnpvgl,qrcerqngvbaf,yragra,tenivgngrq,b'znubal,zbqhyngrf,vahxgvghg,cnfgba,xnlsnor,inthf,yrtnyvfrq,onyxrq,nevnavfz,graqrevat,fvinf,oveguqngr,njynxv,xuinwru,fununo,fnzgtrzrvaqr,oevqtrgba,nznytnzngvbaf,ovbtrarfvf,erpunetvat,gfhxnfn,zlguohfgref,punzsrerq,raguebarzrag,serrynapref,znunenan,pbafgnagvn,fhgvy,zrffvarf,zbaxgba,bxnabtna,ervaivtbengrq,ncbcyrkl,gnanunfuv,arhrf,inyvnagf,unenccna,ehffrf,pneqvat,ibyxbss,shapuny,fgngrubhfr,vzvgngvir,vagercvqvgl,zryybgeba,fnznenf,ghexnan,orfgvat,ybatvghqrf,rknepu,qvneeubrn,genafpraqvat,mibanerin,qnean,enzoyva,qvfpbaarpgvba,137gu,ersbphfrq,qvneznvg,ntevpbyr,on'nguvfg,gheraar,pbagenonff,pbzzhavf,qnivrff,sngvzvqf,sebfvabar,svggvatyl,cbylculyrgvp,dnang,gurbpengvp,cerpyvavpny,nonpun,gbbenx,znexrgcynprf,pbavqvn,frvln,pbagenvaqvpngrq,ergsbeq,ohaqrfnhgbonua,erohvyqf,pyvzngbybtl,frnjbegul,fgnesvtugre,dnzne,pngrtbevn,znynv,uryyvafvn,arjfgrnq,nvejbegul,pngrava,nibazbhgu,neeulguzvnf,nllninmuv,qbjatenqr,nfuoheaunz,rwrpgbe,xvarzngvpf,crgjbegu,efcpn,svyzngvba,nppvcvgevqnr,puungencngv,t/zby,onpnh,ntnzn,evatgbar,lhqublbab,bepurfgengbe,neovgengbef,138gu,cbjrecynagf,phzoreanhyq,nyqreyrl,zvfnzvf,unjnv`v,phnaqb,zrvfgevyvvtn,wrezla,nynaf,crqvterrf,bggnivb,nccebongvba,bzavhz,chehyvn,cevberff,eurvaynaq,ylzcubvq,yhgfx,bfpvyybfpbcr,onyyvan,vyvnp,zbgbeovxrf,zbqreavfvat,hssvmv,culyybkren,xnyrinyn,oratnyvf,nzeningv,flagurfrf,vagreivrjref,vasyrpgvbany,bhgsynax,zneluvyy,hauheg,cebsvyre,anpryyrf,urfrygvar,crefbanyvfrq,thneqn,urecrgbybtvfg,nvecnex,cvtbg,znetnergun,qvabf,cryryvh,oernxorng,xnfgnzbah,funvivfz,qrynzrer,xvatfivyyr,rcvtenz,xuybat,cubfcubyvcvqf,wbhearlvat,yvrghibf,pbatertngrq,qrivnapr,pryrorf,fhofbvy,fgebzn,xivgbin,yhoevpngvat,ynlbss,nyntbnf,bynshe,qbeba,vagrehavirefvgl,enlpbz,ntbabcgrevk,hmvpr,anaan,fcevatinyr,envzhaqb,jerfgrq,chcny,gnyng,fxvaurnqf,irfgvtr,hacnvagrq,unaqna,bqnjnen,nzzne,nggraqrr,ynccrq,zlbgvf,thfgl,pvpbavvsbezrfsnzvyl,genirefny,fhosvryq,ivgncubar,cerafn,unfvqvfz,vajbbq,pnefgnvef,xebcbgxva,ghetrari,qboen,erzvggnapr,chevz,gnaava,nqvtr,gnohyngvba,yrgunyvgl,cnpun,zvpebarfvna,quehin,qrsrafrzra,gvorgb,fvphyhf,enqvbvfbgbcr,fbqregnywr,cuvgfnahybx,rhcubavhz,bklgbpva,bireunatf,fxvaxf,snoevpn,ervagreerq,rzhyngrf,ovbfpvrapr,cnentyvqvat,enrxjba,crevtrr,cynhfvovyvgl,sebyhaqn,reebyy,nmane,ilnfn,nyovahf,gerinyyl,pbasrqrenpvba,grefr,fvkgvrgu,1530f,xraqevln,fxngrobneqref,sebagvrerf,zhnjvlnu,rnfrzragf,furuh,pbafreingviryl,xrlfgbarf,xnfrz,oehgnyvfg,crrxfxvyy,pbjel,bepnf,flyynonel,cnygm,ryvfnorggn,qragvpyrf,unzcrevat,qbyav,rvqbf,nnenh,yrezbagbi,lnaxgba,funuonm,oneentrf,xbatfivatre,errfgnoyvfuzrag,nprglygenafsrenfr,mhyvn,zeanf,fyvatfol,rhpnylcg,rssvpnpvbhf,jrloevqtr,tenqngvba,pvarzngurdhr,znyguhf,onzcgba,pbrkvfgrq,pvffr,unzqv,phcregvab,fnhznerm,puvbabqrf,yvoregvar,sbezref,fnxunebi,cfrhqbalzbhf,iby.1,zpqhpx,tbcnynxevfuana,nzoreyrl,wbeung,tenaqznfgref,ehqvzragf,qjvaqyr,cnenz,ohxvqaba,zranaqre,nzrevpnahf,zhygvcyvref,chynjl,ubzbrebgvp,cvyyobk,pq+qiq,rcvtencu,nyrxfnaqebj,rkgencbyngrq,ubefrfubrf,pbagrzcbenva,natvbtencul,unffryg,funjvavtna,zrzbevmngvba,yrtvgvzvmrq,plpynqrf,bhgfbyq,ebqbycur,xryvf,cbjreonyy,qvwxfgen,nanylmref,vapbzcerffvoyr,fnzone,benatrohet,bfgra,ernhgubevmngvba,nqnznjn,fcuntahz,ulcreznexrg,zvyyvcrqrf,mbebnfgre,znqrn,bffhnel,zheenlsvryq,cebabzvany,tnhgunz,erfryyref,rguref,dhneeryyrq,qbyan,fgenttyref,nfnzv,gnathg,cnffbf,rqhpnpvba,funens,grkry,orevb,orgucntr,ormnyry,znesn,abebaun,36ref,tragrry,nienz,fuvygba,pbzcrafngrf,fjrrgrare,ervafgnyyrq,qvfnoyrf,abrgure,1590f,onynxevfuana,xbgneb,abegunyyregba,pngnpylfz,tubynz,pnapryynen,fpuvcuby,pbzzraqf,ybatvahf,nyovavfz,trznlry,unznzngfh,ibybf,vfynzvfz,fvqrerny,crphavnel,qvttvatf,gbjafdhner,arbfub,yhfuna,puvggbbe,nxuvy,qvfchgngvba,qrfvppngvba,pnzobqvnaf,gujnegvat,qryvorengrq,ryyvcfvf,onuvav,fhfhzh,frcnengbef,xbuaru,cyrorvnaf,xhyghe,btnqra,cvffneeb,gelcrgn,ynghe,yvnbqbat,irggvat,qngbat,fbunvy,nypurzvfgf,yratgujvfr,harirayl,znfgreyl,zvpebpbagebyyref,bpphcvre,qrivngvat,sneevatqba,onppnynherng,gurbpenpl,purolfuri,nepuvivfgf,wnlnenz,varssrpgvirarff,fpnaqvanivnaf,wnpbovaf,rapbzvraqn,anzoh,t/pz3,pngrfol,cnnib,urrqrq,eubqvhz,vqrnyvfrq,10qrt,vasrpgvir,zrplpybgubenk,unyril,furnerq,zvaonev,nhqnk,yhfngvna,erohssf,uvgsvk,snfgrare,fhowhtngr,gneha,ovarg,pbzchfreir,flagurfvfre,xrvfhxr,nznyevp,yvtngherf,gnqnfuv,vtanmvb,noenzbivpu,tebhaqahg,bgbzb,znrir,zbegynxr,bfgebtbguf,nagvyyrna,gbqbe,erpgb,zvyyvzrger,rfcbhfvat,vanhthengr,cnenprgnzby,tnyinavp,unecnyvanr,wrqemrwbj,ernffrffzrag,ynatynaqf,pvivgn,zvxna,fgvxvar,ovwne,vznzngr,vfgnan,xnvfreyvpur,renfghf,srqrenyr,plgbfvar,rkcnafvbavfz,ubzzrf,abeeynaq,fzevgv,fancqentba,thyno,gnyro,ybffl,xunggno,heonavfrq,frfgb,erxbeq,qvsshfre,qrfnz,zbetnangvp,fvygvat,cnpgf,rkgraqre,ornhuneanvf,cheyrl,obhpurf,unyscvcr,qvfpbagvahvgvrf,ubhguv,snezivyyr,navzvfz,ubeav,fnnqv,vagrecergngvir,oybpxnqrf,flzrba,ovbtrbtencuvp,genafpnhpnfvna,wrggvrf,ynaqevrh,nfgebplgrf,pbawhagb,fghzcvatf,jrrivyf,trlfref,erqhk,nepuvat,ebznahf,gnmru,znepryyvahf,pnfrva,bcnin,zvfengn,naner,fnggne,qrpynere,qerhk,bcbegb,iragn,inyyvf,vpbfnurqeba,pbegban,ynpuvar,zbunzzrqna,fnaqarf,mlatn,pyneva,qvbzrqrf,gfhlbfuv,cevoenz,thyonetn,punegvfg,fhcrerggna,obfpnjra,nyghf,fhonat,tngvat,rcvfgbynel,ivmvnantnenz,btqrafohet,cnaan,gulffra,gnexbifxl,qmbtpura,ovbtencu,frerzona,hafpvragvsvp,avtugwne,yrtpb,qrvfz,a.j.n,fhqun,fvfxry,fnffbh,syvagybpx,wbivny,zbagoryvneq,cnyyvqn,sbezhyn_66,genadhvyyvgl,avfrv,nqbeazrag,'crbcyr,lnzuvyy,ubpxrlnyyfirafxna,nqbcgref,nccvna,ybjvpm,uncybglcrf,fhppvapgyl,fgnebtneq,cerfvqrapvrf,xurlenonq,fbovobe,xvarfvbybtl,pbjvpuna,zvyvghz,pebzjryyvna,yrvavatra,cf1.5,pbapbhefrf,qnynean,tbyqsvryq,oemrt,snrprf,ndhnevv,zngpuyrff,uneirfgref,181fg,ahzvfzngvpf,xbesonyy,frpgvbarq,genafcverf,snphygngvir,oenaqvfuvat,xvreba,sbentrf,zranv,tyhgvabhf,qronetr,urngusvryq,1580f,znynat,cubgbryrpgevp,sebbzr,frzvbgvp,nyjne,tenzzbcuba,puvnebfpheb,zragnyvfg,znenzherf,synppb,yvdhbef,nyrhgvnaf,zneiryy,fhgyrw,cnganvx,dnffnz,syvagbss,onlsvryq,unrpxry,fhrab,nivpvv,rkbcynargf,ubfuv,naavonyr,ibwvfyni,ubarlpbzof,pryroenag,eraqfohet,iroyra,dhnvyf,141fg,pneebanqrf,fnine,aneengvbaf,wrrin,bagbybtvrf,urqbavfgvp,znevarggr,tbqbg,zhaan,orffnenovna,bhgevttre,gunzr,teniryf,ubfuvab,snyfvslvat,fgrerbpurzvfgel,anpvbanyvfgn,zrqvnyyl,enqhyn,rwrpgvat,pbafreingbevb,bqvyr,prvon,wnvan,rffbaar,vfbzrgel,nyybcubarf,erpvqvivfz,virpb,tnaqn,tenzznevnaf,wntna,fvtacbfgrq,hapbzcerffrq,snpvyvgngbef,pbafgnapl,qvgxb,cebchyfvir,vzcnyvat,vagreonax,obgbycu,nzynvo,vagretebhc,fbeohf,purxn,qrolr,cenpn,nqbeavat,cerfolgrevrf,qbezvgvba,fgengrtbf,dnenfr,cragrpbfgnyf,orruvirf,unfurzvgr,tbyqhfg,rhebarkg,rterff,necnarg,fbnzrf,whepuraf,fybirafxn,pbcfr,xnmvz,nccenvfnyf,znevfpuny,zvarbyn,funenqn,pnevpnghevfg,fgheyhfba,tnyon,snvmnonq,birejvagrevat,tergr,hlrmqf,qvqfohel,yvoerivyyr,noyrgg,zvpebfgehpgher,nanqbyh,oryrarafrf,rybphgvba,pybnxf,gvzrfybgf,unyqra,enfuvqha,qvfcynprf,flzcngevp,treznahf,ghcyrf,prfxn,rdhnyvmr,qvfnffrzoyl,xenhgebpx,ononatvqn,zrzry,qrvyq,tbcnyn,urzngbybtl,haqrepynff,fnatyv,jnjevaxn,nffhe,gbfunpx,ersenvaf,avpbgvavp,ountnyche,onqnzv,enprgenpxf,cbpngryyb,jnyterraf,anmneonlri,bpphygngvba,fcvaanxre,trarba,wbfvnf,ulqebylmrq,qmbat,pbeertvzvragb,jnvfgpbng,gurezbcynfgvp,fbyqrerq,nagvpnapre,ynpgbonpvyyhf,funsv'v,pnenohf,nqwbheazrag,fpuyhzoretre,gevprengbcf,qrfcbgngr,zraqvpnag,xevfuanzhegv,onunfn,rnegujbez,ynibvfvre,abrgurevna,xnyxv,sreiragyl,ounjna,fnnavpu,pbdhvyyr,tnaarg,zbgnthn,xraaryf,zvarenyvmngvba,svgmureoreg,firva,ovshepngrq,unveqerffvat,sryvf,nobhaqrq,qvzref,sreibhe,uroqb,oyhssgba,nrgan,pbelqba,pyrirqba,pnearveb,fhowrpgviryl,qrhgm,tnfgebcbqn,birefubg,pbapngrangvba,inezna,pnebyyn,znunefuv,zhwvo,varynfgvp,evireurnq,vavgvnyvmrq,fnsnivqf,ebuvav,pnthnf,ohytrf,sbgobyysbeohaq,ursrv,fcvgurnq,jrfgivyyr,znebavgrf,ylgunz,nzrevpb,trqvzvanf,fgrcunahf,punypbyvguvp,uvwen,tah/yvahk,cerqvyrpgvba,ehyrefuvc,fgrevyvgl,unvqne,fpneynggv,fncevffn,fivngbfyni,cbvagrqyl,fhaebbs,thnenagbe,gurine,nvefgevcf,chyghfx,fgher,129gu,qvivavgvrf,qnvmbat,qbyvpubqrehf,pbobhet,znbvfgf,fjbeqfznafuvc,hcengrq,obuzr,gnfuv,ynetf,punaqv,oyhrorneq,ubhfrubyqref,evpuneqfbavna,qercnavqnr,nagvtbavfu,ryonfna,bpphygvfz,znepn,ulcretrbzrgevp,bveng,fgvtyvgm,vtavgrf,qmhatne,zvdhryba,cevgnz,q'nhgbzar,hyvqvvq,avnzrl,inyyrpnab,sbaqb,ovyyvgba,vaphzorapvrf,enprzr,punzorel,pnqryy,oneranxrq,xntnzr,fhzzrefvqr,unhffznaa,ungfurcfhg,ncbgurpnevrf,pevbyyb,srvag,anfnyf,gvzhevq,srygunz,cybgvahf,bkltrangvba,znetvangn,bssvpvanyvf,fnyng,cnegvpvcngvbaf,vfvat,qbjar,vmhzb,hathvqrq,cergrapr,pbhefrq,unehan,ivfpbhagpl,znvafgntr,whfgvpvn,cbjvng,gnxnen,pncvgbyvar,vzcynpnoyr,sneora,fgbcsbeq,pbfzbcgrevk,ghorebhf,xebarpxre,tnyngvnaf,xjryv,qbtznf,rkubegrq,gerovawr,fxnaqn,arjyla,noyngvir,onfvqvn,ouvjnav,rapebnpuzragf,fgenatyref,ertebhcvat,ghony,fubrfgevat,jnjry,navbavp,zrfrapulzny,perngvbavfgf,clebcubfcungr,zbfuv,qrfcbgvfz,cbjreobbx,sngruche,ehcvnu,frter,greangr,wrffber,o.v.t,furineqanqmr,nobhaqf,tyvjvpr,qrafrfg,zrzbevn,fhobeovgny,ivrgpbat,engrcnlref,xnehanavquv,gbbyone,qrfpragf,eulzarl,rkubegngvba,mnurqna,pnepvabznf,ulcreonevp,obgivaavx,ovyyrgf,arhebcflpubybtvpny,gvtenarf,ubneqf,pungre,ovraavnyyl,guvfgyrf,fpbghf,jngneh,sybgvyynf,uhatnzn,zbabcbyvfgvp,cnlbhgf,irgpu,trarenyvffvzb,pnevrf,anhzohet,cvena,oyvmmneqf,rfpnyngrf,ernpgnag,fuvaln,gurbevmr,evmmbyv,genafvgjnl,rppyrfvnr,fgercgbzlprf,pnagny,avfvovf,fhcrepbaqhpgbe,hajbexnoyr,gunyyhf,ebrunzcgba,fpurpxgre,ivpreblf,znxhhpuv,vyxyrl,fhcrefrqvat,gnxhln,xybqmxb,obeoba,enfcoreevrf,bcrenaq,j.n.x.b,fnenonaqr,snpgvbanyvfz,rtnyvgnevnavfz,grznfrx,gbeong,hafpevcgrq,wbezn,jrfgreare,cresrpgvir,ievwr,haqreynva,tbyqsencc,oynranh,wbzba,onegurf,qevirgvzr,onffn,onaabpx,hzntn,sratkvnat,mhyhf,ferravinfna,sneprf,pbqvpr_10,serrubyqre,cbqqrovpr,vzcrevnyvfgf,qrerthyngrq,jvatgvc,b'untna,cvyynerq,biregbar,ubsfgnqgre,149gu,xvgnab,fnloebbx,fgnaqneqvmvat,nyqtngr,fgniryrl,b'synuregl,uhaqerqguf,fgrrenoyr,fbygna,rzcgrq,pehlss,vagenzhebf,gnyhxf,pbgbabh,znenr,xnehe,svthrerf,onejba,yhphyyhf,avbor,mrzyln,yngurf,ubzrcbegrq,punhk,nzlbgebcuvp,bcvarf,rkrzcynef,ounzb,ubzbzbecuvfzf,tnhyrvgre,ynqva,znsvbfv,nveqevrbavnaf,o/fbhy,qrpny,genafpnhpnfvn,fbygv,qrsrpngvba,qrnpbarff,ahzvqvn,fnzcenqnln,abeznyvfrq,jvatyrff,fpujnora,nyahf,pvarenzn,lnxhgfx,xrgpuvxna,beivrgb,harnearq,zbasreengb,ebgrz,nnpfo,ybbat,qrpbqref,fxreevrf,pneqvbgubenpvp,ercbfvgvbavat,cvzcreary,lbunaana,graroevbabvqrn,anetvf,abhiry,pbfgyvrfg,vagreqrabzvangvbany,abvmr,erqverpgvat,mvgure,zbepun,enqvbzrgevp,serdhragvat,veglfu,tontob,punxev,yvgivaraxb,vasbgnvazrag,enirafoehpx,unevgu,pbeoryf,znrtnfuven,wbhfgvat,angna,abihf,snypnb,zvavf,envyrq,qrpvyr,enhzn,enznfjnzl,pnivgngvba,cnenandhr,orepugrftnqra,ernavzngrq,fpubzoret,cbylfnppunevqrf,rkpyhfvbanel,pyrba,nahent,enintvat,qunahfu,zvgpuryyf,tenahyr,pbagrzcghbhf,xrvfrv,ebyyrfgba,ngynagrna,lbexvfg,qnenn,jnccvat,zvpebzrgre,xrrarynaq,pbzcnenoyl,onenawn,benawr,fpuynsyv,lbtvp,qvanwche,havzcerffvir,znfnfuv,erperngvib,nyrznaavp,crgrefsvryq,anbxb,infhqrin,nhgbfcbeg,enwng,zneryyn,ohfxb,jrgurefsvryq,ffevf,fbhypnyvohe,xbonav,jvyqynaq,ebbxrel,ubssraurvz,xnhev,nyvcungvp,onynpynin,sreevgr,choyvpvfr,ivpgbevnf,gurvfz,dhvzcre,puncobbx,shapgvbanyvfg,ebnqorq,hylnabifx,phcra,chechern,pnygubecr,grbsvyb,zbhfniv,pbpuyrn,yvabglcr,qrgzbyq,ryyrefyvr,tnxxnv,gryxbz,fbhgufrn,fhopbagenpgbe,vathvany,cuvyngryvfgf,mrroehttr,cvnir,gebpuvqnr,qrzcb,fcbvyg,fnunenache,zvueno,cnenflzcngurgvp,oneonebhf,punegrevat,nagvdhn,xngfvan,ohtvf,pngrtbevmrf,nygfgnqg,xnaqlna,cnzonafn,birecnffrf,zvgref,nffvzvyngvat,svaynaqvn,harpbabzvp,nz/sz,unecfvpubeqvfg,qerfqare,yhzvarfprapr,nhguragvpnyyl,birecbjref,zntzngvp,pyvsgbaivyyr,bvysvryqf,fxvegrq,oregur,phzna,bnxunz,seryvzb,tybpxrafcvry,pbasrpgvba,fnkbcubavfgf,cvnfrpmab,zhygvyriry,nagvcngre,yrilvat,znygerngzrag,iryub,bcbpmab,uneohet,crqbcuvyvn,hashaqrq,cnyrggrf,cynfgrejbex,oerir,qunezraqen,nhpuvayrpx,abarfhpu,oynpxzha,yvoerggv,enoonav,145gu,unffryorpx,xvaabpx,znyngr,inaqra,pybireqnyr,nfutnong,anerf,enqvnaf,fgrryjbexref,fnobe,cbffhzf,pnggrevpx,urzvfcurevp,bfgen,bhgcnprq,qhatrarff,nyzfubhfr,craela,grkvnaf,1000z,senapuvggv,vaphzorapl,grkpbpb,arjne,genzpnef,gbebvqny,zrvgrgfh,fcryyobhaq,ntebabzvfg,ivavsren,evngn,ohaxb,cvanf,on'ny,tvguho,infvylrivpu,bofbyrfprag,trbqrfvpf,naprfgevrf,ghwhr,pncvgnyvfrq,hanffvtarq,guebat,hacnverq,cflpubzrgevp,fxrtarff,rkbgurezvp,ohssrerq,xevfgvnafhaq,gbathrq,oreratre,onfub,nyvgnyvn,cebybatngvba,nepunrbybtvpnyyl,senpgvbangvba,plcevavq,rpuvabqrezf,ntevphyghenyyl,whfgvpvne,fbanz,vyvhz,onvgf,qnaprnoyr,tenmre,neqnuna,tenffrq,cerrzcgvba,tynffjbexf,unfvan,htevp,hzoen,jnuunov,inaarf,gvaavghf,pncvgnvar,gvxevg,yvfvrhk,fperr,ubezhm,qrfcrafre,wntvryyba,znvfbaarhir,tnaqnxv,fnagnerz,onfvyvpnf,ynapvat,ynaqfxeban,jrvyohet,sverfvqr,rylfvna,vfyrjbegu,xevfuanzhegul,svygba,plaba,grpzb,fhopbfgny,fpnynef,gevtylprevqrf,ulcrecynar,snezvatqnyr,havbar,zrlqna,cvyvatf,zrepbfhe,ernpgvingr,nxvon,srphaqvgl,wngen,angfhzr,mnednjv,cergn,znfnb,cerfolgre,bnxrasbyq,eubqev,sreena,ehvmbat,pyblar,aryinan,rcvcunavhf,obeqr,fphgrf,fgevpgherf,gebhtugba,juvgrfgbar,fubybz,gblnu,fuvatba,xhghmbi,noryneq,cnffnag,yvcab,pnsrgrevnf,erfvqhnyf,nanoncgvfgf,cnengenafvg,pevbyybf,cyrira,enqvngn,qrfgnovyvmvat,unqvguf,onmnnef,znaabfr,gnvlb,pebbxrf,jryorpx,onbqvat,nepurynhf,athrffb,nyoreav,jvatgvcf,uregf,ivnfng,ynaxnaf,rierhk,jvtenz,snffovaqre,elhvpuv,fgbegvat,erqhpvoyr,byrfavpn,mabwzb,ulnaavf,gurbcunarf,syngveba,zhfgrevat,enwnuzhaqel,xnqve,jnlnat,cebzr,yrgunetl,mhova,vyyrtnyvgl,pbanyy,qenzrql,orreobuz,uvccnepuhf,mvneng,elhwv,fuhtb,tyrabepul,zvpebnepuvgrpgher,zbear,yrjvafxl,pnhirel,onggraoret,ulxfbf,jnlnanq,unzvypne,ohunev,oenmb,oengvnah,fbyzf,nxfnenl,rynzvgr,puvypbgva,oybbqfgbpx,fntnen,qbyal,erhavsvrq,hzynhg,cebgrnprnr,pnzobear,pnynoevna,qunaonq,inkwb,pbbxjner,cbgrm,erqvsshfvba,frzvgbarf,ynzragngvbaf,nyytnh,threavpn,fhagbel,cyrngrq,fgngvbavat,hetryy,tnaargf,oregryfznaa,rageljnl,encuvgbzvqnr,nprgnyqrulqr,arcuebybtl,pngrtbevmvat,orvlnat,crezrngr,gbhearl,trbfpvraprf,xunan,znfnlhxv,pehpvf,havirefvgnevn,fynfxvr,xunvznu,svaab,nqinav,nfgbavfuvatyl,ghohyva,inzcvevp,wrbyyn,fbpvnyr,pyrrgubecrf,onqev,zhevqnr,fhmbat,qrongre,qrpvzngvba,xralnaf,zhghnyvfz,cbagvsrk,zvqqyrzra,vafrr,unyriv,ynzragngvba,cflpubcngul,oenffrl,jraqref,xniln,cnenoryyhz,cebynpgva,varfpncnoyr,ncfrf,znyvtanapvrf,evamnv,fgvtzngvmrq,zranurz,pbzbk,ngryvref,jryfucbby,frgvs,pragvzrger,gehgushyarff,qbjasvryq,qehfhf,jbqra,tylpbflyngvba,rznangrq,nthyunf,qnyxrvgu,wnmven,ahpxl,havsvy,wbovz,bcreba,belmbzlf,urebvpnyyl,frnaprf,fhcreahzrenel,onpxubhfr,unfunanu,gngyre,vzntb,vaireg,unlngb,pybpxznxre,xvatfzvyy,fjvrpvr,nanybtbhfyl,tbypbaqn,cbfgr,gnpvgyl,qrpragenyvfrq,tr'rm,qvcybzngvpnyyl,sbffvyvsrebhf,yvafrrq,znuniven,crqrfgnyf,nepucevrfg,olryrpgvba,qbzvpvyrq,wrssrefbavna,obzohf,jvartebjvat,jnhxrtna,haphygvingrq,uniresbeqjrfg,fnhzhe,pbzzhanyyl,qvfohefrq,pyrrir,mrywrmavpne,fcrpvbfn,inpngvbaref,fvthe,invfunyv,myngxb,vsgvxune,pebcynaq,genafxrv,vapbzcyrgrarff,obuen,fhonagnepgvp,fyvrir,culfvbybtvp,fvzvyvf,xyrex,ercynagrq,'evtug,punsrr,ercebqhpvoyr,onloheg,ertvpvqr,zhmnssneche,cyhenyf,unalh,begubybtf,qvbhs,nffnvyrq,xnzhv,gnevx,qbqrpnarfr,tbear,ba/bss,179gu,fuvzbtn,tenanevrf,pneyvfgf,inyne,gevcbyvgnavn,fureqf,fvzzrea,qvffbpvngrq,vfnzoneq,cbylgrpuavpny,lhienw,oenonmba,nagvfrafr,chozrq,tynaf,zvahgryl,znfnnxv,entuniraqen,fnibhel,cbqpnfgvat,gnpuv,ovraivyyr,tbatfha,evqtryl,qrsbez,lhvpuv,ovaqref,pnaan,pneprggv,yyboertng,vzcyberq,oreev,awrtbf,vagrezvatyrq,bssybnq,ngurael,zbgureubhfr,pbecben,xnxvanqn,qnaaroebt,vzcrevb,cersnprf,zhfvpbybtvfgf,nrebfcngvnyr,fuvenv,antncnggvanz,freivhf,pevfgbsbeb,cbzserg,erivyrq,ragroor,fgnar,rnfg/jrfg,gurezbzrgref,zngevnepuny,fvtyb,obqvy,yrtvbaanver,mr'ri,gurbevmvat,fnatrrgun,ubegvphyghevfg,hapbhagnoyr,ybbxnyvxr,nabkvp,vbabfcurevp,trarnybtvfgf,puvpbcrr,vzcevagvat,cbcvfu,perzngbevn,qvnzbaqonpx,plngurn,unamubat,pnzrenzra,unybtnynaq,anxyb,jnpynj,fgberubhfrf,syrkrq,pbzhav,sevgf,tynhpn,avytvevf,pbzcerffrf,anvavgny,pbagvahngvbaf,nyonl,ulcbkvp,fnznwjnqv,qhaxredhr,anagvpbxr,fnejne,vagrepunatrq,whony,pbeon,wnytnba,qreyrgu,qrngufgebxr,zntal,ivaalgfvn,ulcurangrq,evzsver,fnjna,obruare,qvferchgr,abeznyvmr,nebznavna,qhnyvfgvp,nccebkvznag,punzn,xnevznonq,oneanpyrf,fnabx,fgvcraqf,qlsrq,evwxfzhfrhz,erireorengvba,fhapbec,shatvpvqrf,erirevr,fcrpgebtencu,fgrerbcubavp,avnmv,beqbf,nypna,xnenvgr,ynhgerp,gnoyrynaq,ynzryyne,evrgv,ynatzhve,ehffhyn,jrorea,gjrnxf,unjvpx,fbhgureare,zbecul,anghenyvfngvba,ranagvbzre,zvpuvabxh,oneorggrf,eryvrirf,pneoherggbef,erqehgu,boyngrf,ibpnohynevrf,zbtvyri,ontzngv,tnyvhz,ernffregrq,rkgbyyrq,flzba,rhebfprcgvp,vasyrpgvbaf,gvegun,erpbzcrafr,beheb,ebcvat,tbhirearhe,cnerq,lnlbv,jngrezvyyf,ergbbyrq,yrhxbplgrf,whovynag,znmune,avpbynh,znaurvz,gbhenvar,orqfre,unzoyrqba,xbung,cbjreubhfrf,gyrzpra,erhira,flzcngurgvpnyyl,nsevxnaref,vagrerf,unaqpensgf,rgpure,onqqryrl,jbqbatn,nznhel,155gu,ihytnevgl,cbzcnqbhe,nhgbzbecuvfzf,1540f,bccbfvgvbaf,cerxzhewr,qrelav,sbegvslvat,nephngr,znuvyn,obpntr,hgure,abmmr,fynfurf,ngynagvpn,unqvq,euvmbzngbhf,nmrevf,'jvgu,bfzran,yrjvfivyyr,vaareingrq,onaqznfgre,bhgpebccvat,cnenyyrybtenz,qbzvavpnan,gjnat,vathfurgvn,rkgrafvbany,ynqvab,fnfgel,mvabivri,eryngnoyr,abovyvf,porrovrf,uvgyrff,rhyvzn,fcbenatvn,flatr,ybatyvfgrq,pevzvanyvmrq,cravgragvny,jrlqra,ghohyr,ibyla,cevrfgrffrf,tyraoebbx,xvoohgmvz,jvaqfunsg,pnanqnve,snynatr,mfbyg,obaurhe,zrvar,nepunatryf,fnsrthneqrq,wnznvpnaf,znynevny,grnfref,onqtvat,zrefrlenvy,bcrenaqf,chyfnef,tnhpubf,ovbgva,onzonen,arpnkn,rtzbaq,gvyyntr,pbccv,nakvbylgvp,cernu,znhfbyrhzf,cynhghf,srebm,qrohaxrq,187gu,oryrqvlrfcbe,zhwvohe,jnagntr,pneobkly,purggvne,zheanh,inthrarff,enprzvp,onpxfgergpu,pbhegynaq,zhavpvcvb,cnycngvar,qrmshy,ulcreobyn,ferrxhzne,punybaf,nygnl,nencnubr,ghqbef,fncvrun,dhvyba,oheqrafbzr,xnaln,kkivvv,erprafvba,trarevf,fvcuhapyr,ercerffbe,ovgengr,znaqnyf,zvquhefg,qvbkva,qrzbpengvdhr,hcubyqf,ebqrm,pvarzngbtencuvp,rcbdhr,wvacvat,enorynvf,mulgbzle,tyraivrj,erobbgrq,xunyvqv,ergvphyngn,122aq,zbaanvr,cnffrefol,tunmnyf,rhebcnrn,yvccznaa,rneguobhaq,gnqvp,naqbeena,negiva,natryvphz,onaxfl,rcvprager,erfrzoynaprf,fuhggyrq,engunhf,oreag,fgbarznfbaf,onybpuv,fvnat,glarzbhgu,pltav,ovbflagurgvp,cerpvcvgngrf,funerpebccref,q'naahamvb,fbsgonax,fuvwv,ncryqbbea,cbylplpyvp,jraprfynf,jhpunat,fnzavgrf,gnznenpx,fvyznevyyvba,znqvanu,cnynrbagbybtl,xvepuoret,fphycva,ebugnx,ndhnongf,bivcnebhf,gulaar,pnarl,oyvzcf,zvavznyvfgvp,jungpbz,cnyngnyvmngvba,oneqfgbja,qverpg3q,cnenzntargvp,xnzobwn,xunfu,tyborznfgre,yrathn,zngrw,pureavtbi,fjnantr,nefranyf,pnfpnqvn,phaqvanznepn,ghfphyhz,yrniref,betnavpf,jnecynarf,'guerr,rkregvbaf,nezvavhf,tnaqunein,vadhverf,pbzrepvb,xhbcvb,punonune,cybgyvarf,zrefraar,nadhrgvy,cnenylgvp,ohpxzvafgre,nzovg,npebybcuhf,dhnagvsvref,pynpgba,pvyvnel,nafnyqb,sretnan,rtbvfz,guenpvnaf,puvpbhgvzv,abeguoebbx,nanytrfvn,oebgureubbqf,uhamn,nqevnra,syhbevqngvba,fabjsnyyf,fbhaqobneq,snatbevn,pnaavonyvfgvp,begubtbavhf,puhxbgxn,qvaqvthy,znambav,punvam,znpebzrqvn,orygyvar,zhehtn,fpuvfghen,cebinoyr,yvgrk,vavgvb,carhzbavnr,vasbflf,prevhz,obbagba,pnaabaonyyf,q'har,fbyirapl,znaqhenu,ubhguvf,qbyzraf,ncbybtvfgf,enqvbvfbgbcrf,oynkcybvgngvba,cbebfuraxb,fgnjryy,pbbfn,znkvzvyvra,grzcryubs,rfcbhfr,qrpynengbel,unzoeb,knyncn,bhgzbqrq,zvuvry,orarsvggvat,qrfvebhf,nepurcnepul,ercbchyngrq,gryrfpbcvat,pncgbe,znpxnlr,qvfcnentrq,enznanguna,pebjar,ghzoyrq,grpuargvhz,fvygrq,purqv,avrier,ulrba,pnegbbavfu,vagreybpx,vasbpbz,erqvss.pbz,qvbenznf,gvzrxrrcvat,pbapregvan,xhgnvfv,prfxl,yhobzvefxv,hancbybtrgvp,rcvtencuvp,fgnynpgvgrf,farun,ovbsvyz,snypbael,zvensyberf,pngran,'bhgfgnaqvat,cebfcrxg,ncbgurbfvf,b'bqunz,cnprznxref,nenovpn,tnaquvantne,erzvavfprf,vebdhbvna,bearggr,gvyyvat,arbyvorenyvfz,punzryrbaf,cnaqnin,cersbagnvar,unvlna,tarvfranh,hgnzn,onaqb,erpbafgvghgvba,nmnevn,pnabyn,cnengebbcf,nlpxobhea,znavfgrr,fgbhegba,znavsrfgbf,ylzcar,qrabhrzrag,genpgnghf,enxvz,oryysybjre,anabzrgre,fnffnavqf,gheybhtu,cerfolgrevnavfz,inezynaq,20qrt,cubby,alrerer,nyzbunq,znavcny,iynnaqrera,dhvpxarff,erzbinyf,znxbj,pvephzsyrk,rngrel,zbenar,sbaqnmvbar,nyxlyngvba,harasbeprnoyr,tnyyvnab,fvyxjbez,whavbe/fravbe,noqhpgf,cuybk,xbafxvr,ybsbgra,ohhera,tylcubfngr,snverq,anghenr,pbooyrf,gnure,fxehyyf,qbfgbrifxl,jnyxbhg,jntarevna,beovgrq,zrgubqvpnyyl,qramvy,fneng,rkgengreevgbevny,xbuvzn,q'nezbe,oevafyrl,ebfgebcbivpu,sratgvna,pbzvgnghf,nenivaq,zbpur,jenatryy,tvfpneq,inagnn,ivywnaqv,unxbnu,frnorrf,zhfpngvar,onyynqr,pnznanpuq,fbgurea,zhyyvbarq,qhenq,znetenirf,znira,nergr,punaqav,tnevshan,142aq,ernqvat/yvgrengher,guvpxrfg,vagrafvsvrf,geltir,xunyqha,crevangny,nfnan,cbjreyvar,nprglyngvba,aherlri,bzvln,zbagrfdhvrh,evirejnyx,zneyl,pbeeryngvat,vagrezbhagnva,ohytne,unzzreurnqf,haqrefpberf,jvergnccvat,dhngenva,ehvffrnh,arjfntrag,ghgvpbeva,cbyltlal,urzfjbegu,cnegvfnafuvc,onaan,vfgevna,rincbengbe".split(","),
female_names:"znel,cngevpvn,yvaqn,oneonen,ryvmnorgu,wraavsre,znevn,fhfna,znetnerg,qbebgul,yvfn,anapl,xnera,orggl,uryra,fnaqen,qbaan,pneby,ehgu,funeba,zvpuryyr,ynhen,fnenu,xvzoreyl,qrobenu,wrffvpn,fuveyrl,plaguvn,natryn,zryvffn,oeraqn,nzl,naan,erorppn,ivetvavn,xnguyrra,cnzryn,znegun,qroen,nznaqn,fgrcunavr,pnebyla,puevfgvar,znevr,wnarg,pngurevar,senaprf,naa,wblpr,qvnar,nyvpr,whyvr,urngure,grerfn,qbevf,tybevn,riryla,wrna,purely,zvyqerq,xngurevar,wbna,nfuyrl,whqvgu,ebfr,wnavpr,xryyl,avpbyr,whql,puevfgvan,xngul,gurerfn,orireyl,qravfr,gnzzl,verar,wnar,ybev,enpury,znevyla,naqern,xnguela,ybhvfr,fnen,naar,wnpdhryvar,jnaqn,obaavr,whyvn,ehol,ybvf,gvan,culyyvf,abezn,cnhyn,qvnan,naavr,yvyyvna,rzvyl,ebova,crttl,pelfgny,tynqlf,evgn,qnja,pbaavr,syberapr,genpl,rqan,gvssnal,pnezra,ebfn,pvaql,tenpr,jraql,ivpgbevn,rqvgu,xvz,fureel,flyivn,wbfrcuvar,guryzn,funaaba,furvyn,rgury,ryyra,rynvar,znewbevr,pneevr,puneybggr,zbavpn,rfgure,cnhyvar,rzzn,whnavgn,navgn,eubaqn,unmry,nzore,rin,qroovr,ncevy,yrfyvr,pynen,yhpvyyr,wnzvr,wbnaar,ryrnabe,inyrevr,qnavryyr,zrtna,nyvpvn,fhmnaar,zvpuryr,tnvy,oregun,qneyrar,irebavpn,wvyy,reva,trenyqvar,ynhera,pngul,wbnaa,ybeenvar,ylaa,fnyyl,ertvan,revpn,orngevpr,qbyberf,oreavpr,nhqerl,libaar,naarggr,znevba,qnan,fgnpl,nan,erarr,vqn,ivivna,eboregn,ubyyl,oevggnal,zrynavr,yberggn,lbynaqn,wrnarggr,ynhevr,xngvr,xevfgra,inarffn,nyzn,fhr,ryfvr,orgu,wrnaar,ivpxv,pneyn,gnen,ebfrznel,rvyrra,greev,tregehqr,yhpl,gbaln,ryyn,fgnprl,jvyzn,tvan,xevfgva,wrffvr,angnyvr,ntarf,iren,puneyrar,orffvr,qryberf,zryvaqn,crney,neyrar,znherra,pbyyrra,nyyvfba,gnznen,wbl,trbetvn,pbafgnapr,yvyyvr,pynhqvn,wnpxvr,znepvn,gnaln,aryyvr,zvaavr,zneyrar,urvqv,tyraqn,ylqvn,ivbyn,pbhegarl,znevna,fgryyn,pnebyvar,qben,ivpxvr,znggvr,znkvar,vezn,znory,znefun,zlegyr,yran,puevfgl,qrnaan,cngfl,uvyqn,tjraqbyla,wraavr,aben,znetvr,avan,pnffnaqen,yrnu,craal,xnl,cevfpvyyn,anbzv,pnebyr,bytn,ovyyvr,qvnaar,genprl,yrban,wraal,sryvpvn,fbavn,zvevnz,iryzn,orpxl,oboovr,ivbyrg,xevfgvan,gbav,zvfgl,znr,furyyl,qnvfl,enzban,fureev,revxn,xngevan,pynver,yvaqfrl,yvaqfnl,trarin,thnqnyhcr,oryvaqn,znetnevgn,furely,pben,snlr,nqn,fnoevan,vfnory,znethrevgr,unggvr,uneevrg,zbyyl,prpvyvn,xevfgv,oenaqv,oynapur,fnaql,ebfvr,wbnaan,vevf,rhavpr,natvr,varm,ylaqn,znqryvar,nzryvn,nyoregn,trarivrir,zbavdhr,wbqv,wnavr,xnlyn,fbaln,wna,xevfgvar,pnaqnpr,snaavr,znelnaa,bcny,nyvfba,lirggr,zrybql,yhm,fhfvr,byvivn,syben,furyyrl,xevfgl,znzvr,yhyn,ybyn,irean,orhynu,nagbvarggr,pnaqvpr,whnan,wrnaarggr,cnz,xryyv,juvgarl,oevqtrg,xneyn,pryvn,yngbln,cnggl,furyvn,tnlyr,qryyn,ivpxl,ylaar,furev,znevnaar,xnen,wnpdhryla,rezn,oynapn,zlen,yrgvpvn,cng,xevfgn,ebknaar,natryvpn,ebola,nqevraar,ebfnyvr,nyrknaqen,oebbxr,orgunal,fnqvr,oreanqrggr,genpv,wbql,xraqen,avpubyr,enpunry,znoyr,rearfgvar,zhevry,znepryyn,ryran,xelfgny,natryvan,anqvar,xnev,rfgryyr,qvnaan,cnhyrggr,yben,zban,qberra,ebfrznevr,qrfverr,nagbavn,wnavf,orgfl,puevfgvr,serqn,zrerqvgu,ylarggr,grev,pevfgvan,rhyn,yrvtu,zrtuna,fbcuvn,rybvfr,ebpuryyr,tergpura,prpryvn,endhry,uraevrggn,nylffn,wnan,tjra,wraan,gevpvn,ynirear,byvir,gnfun,fvyivn,ryiven,qryvn,xngr,cnggv,yberan,xryyvr,fbawn,yvyn,ynan,qneyn,zvaql,rffvr,znaql,yberar,ryfn,wbfrsvan,wrnaavr,zvenaqn,qvkvr,yhpvn,znegn,snvgu,yryn,wbunaan,funev,pnzvyyr,gnzv,funjan,ryvfn,robal,zryon,ben,arggvr,gnovgun,byyvr,jvavserq,xevfgvr,nyvfun,nvzrr,eran,zlean,zneyn,gnzzvr,yngnfun,obavgn,cngevpr,ebaqn,fureevr,nqqvr,senapvar,qrybevf,fgnpvr,nqevnan,purev,novtnvy,pryrfgr,wrjry,pnen,nqryr,erorxnu,yhpvaqn,qbegul,rssvr,gevan,eron,fnyyvr,nheben,yraben,rggn,ybggvr,xreev,gevfun,avxxv,rfgryyn,senapvfpn,wbfvr,genpvr,znevffn,xneva,oevggarl,wnaryyr,ybheqrf,ynhery,uryrar,srea,ryin,pbevaar,xryfrl,van,orggvr,ryvfnorgu,nvqn,pnvgyva,vatevq,vin,rhtravn,puevfgn,tbyqvr,znhqr,wravsre,gurerfr,qran,ybean,wnarggr,yngbaln,pnaql,pbafhryb,gnzvxn,ebfrggn,qroben,purevr,cbyyl,qvan,wrjryy,snl,wvyyvna,qbebgurn,aryy,gehql,rfcrenamn,cngevpn,xvzoreyrl,funaan,uryran,pyrb,fgrsnavr,ebfnevb,byn,wnavar,zbyyvr,yhcr,nyvfn,ybh,znevory,fhfnaar,orggr,fhfnan,ryvfr,prpvyr,vfnoryyr,yrfyrl,wbpryla,cnvtr,wbav,enpuryyr,yrbyn,qncuar,nygn,rfgre,crgen,tenpvryn,vzbtrar,wbyrar,xrvfun,ynprl,tyraan,tnoevryn,xrev,hefhyn,yvmmvr,xvefgra,funan,nqryvar,znlen,wnlar,wnpyla,tenpvr,fbaqen,pnezryn,znevfn,ebfnyvaq,punevgl,gbavn,orngevm,znevfby,pynevpr,wrnavar,furran,natryvar,sevrqn,yvyl,funhan,zvyyvr,pynhqrggr,pnguyrra,natryvn,tnoevryyr,nhghza,xngunevar,wbqvr,fgnpv,yrn,puevfgv,whfgvar,ryzn,yhryyn,zneterg,qbzvavdhr,fbpbeeb,znegvan,znetb,znivf,pnyyvr,oboov,znevgmn,yhpvyr,yrnaar,wrnaavar,qrnan,nvyrra,ybevr,ynqbaan,jvyyn,znahryn,tnyr,fryzn,qbyyl,flovy,nool,vil,qrr,jvaavr,znepl,yhvfn,wrev,zntqnyran,bsryvn,zrntna,nhqen,zngvyqn,yrvyn,pbearyvn,ovnapn,fvzbar,orgglr,enaqv,ivetvr,yngvfun,oneoen,trbetvan,ryvmn,yrnaa,oevqtrggr,eubqn,unyrl,nqryn,abyn,oreanqvar,sybffvr,vyn,tergn,ehguvr,aryqn,zvarein,yvyyl,greevr,yrgun,uvynel,rfgryn,inynevr,oevnaan,ebfnyla,rneyvar,pngnyvan,nin,zvn,pynevffn,yvqvn,pbeevar,nyrknaqevn,pbaprcpvba,gvn,funeeba,enr,qban,revpxn,wnzv,ryaben,punaqen,yraber,arin,znelybh,zryvfn,gnongun,freran,nivf,nyyvr,fbsvn,wrnavr,bqrffn,anaavr,uneevrgg,ybenvar,crarybcr,zvyntebf,rzvyvn,oravgn,nyylfba,nfuyrr,gnavn,rfzrenyqn,rir,crneyvr,mryzn,znyvaqn,aberra,gnzrxn,fnhaqen,uvyynel,nzvr,nygurn,ebfnyvaqn,yvyvn,nynan,pyner,nyrwnaqen,ryvabe,ybeevr,wreev,qnepl,rnearfgvar,pnezryyn,abrzv,znepvr,yvmn,naanoryyr,ybhvfn,rneyrar,znyybel,pneyrar,avgn,fryran,gnavfun,xngl,whyvnaar,ynxvfun,rqjvan,znevpryn,znetrel,xraln,qbyyvr,ebkvr,ebfyla,xnguevar,anarggr,puneznvar,ynibaar,vyrar,gnzzv,fhmrggr,pbevar,xnlr,puelfgny,yvan,qrnaar,yvyvna,whyvnan,nyvar,yhnaa,xnfrl,znelnaar,rinatryvar,pbyrggr,zryin,ynjnaqn,lrfravn,anqvn,znqtr,xnguvr,bcuryvn,inyrevn,aban,zvgmv,znev,trbetrggr,pynhqvar,sena,nyvffn,ebfrnaa,ynxrvfun,fhfnaan,erin,qrvqer,punfvgl,furerr,ryivn,nylpr,qrveqer,tran,oevnan,nenpryv,xngryla,ebfnaar,jraqv,grffn,oregn,znein,vzryqn,znevrggn,znepv,yrbabe,neyvar,fnfun,znqryla,wnaan,whyvrggr,qrran,nheryvn,wbfrsn,nhthfgn,yvyvnan,yrffvr,nznyvn,fninaanu,nanfgnfvn,ivyzn,angnyvn,ebfryyn,ylaarggr,pbevan,nyserqn,yrnaan,nzcneb,pbyrra,gnzen,nvfun,jvyqn,xnela,znhen,znv,rinatryvan,ebfnaan,unyyvr,rean,ravq,znevnan,ynpl,whyvrg,wnpxyla,servqn,znqryrvar,znen,pnguela,yryvn,pnfnaqen,oevqtrgg,natryvgn,wnaavr,qvbaar,naaznevr,xngvan,orely,zvyyvprag,xngurela,qvnaa,pnevffn,znelryyra,yvm,ynhev,urytn,tvyqn,eurn,znedhvgn,ubyyvr,gvfun,gnzren,natryvdhr,senaprfpn,xnvgyva,ybyvgn,sybevar,ebjran,erlan,gjvyn,snaal,wnaryy,varf,pbaprggn,oregvr,nyon,oevtvggr,nylfba,ibaqn,cnafl,ryon,abryyr,yrgvgvn,qrnaa,oenaqvr,ybhryyn,yrgn,sryrpvn,funeyrar,yrfn,orireyrl,vfnoryyn,urezvavn,green,pryvan,gbev,bpgnivn,wnqr,qravpr,treznvar,zvpuryy,pbegarl,aryyl,qbergun,qrvqen,zbavxn,ynfubaqn,whqv,puryfrl,nagvbarggr,znetbg,nqrynvqr,yrrnaa,ryvfun,qrffvr,yvool,xnguv,tnlyn,yngnaln,zvan,zryyvfn,xvzoreyrr,wnfzva,eranr,mryqn,ryqn,whfgvan,thffvr,rzvyvr,pnzvyyn,noovr,ebpvb,xnvgyla,rqlgur,nfuyrvtu,fryvan,ynxrfun,trev,nyyrar,cnznyn,zvpunryn,qnlan,pnela,ebfnyvn,wnpdhyvar,erorpn,znelorgu,xelfgyr,vbyn,qbggvr,oryyr,tevfryqn,rearfgvan,ryvqn,nqevnaar,qrzrgevn,qryzn,wndhryvar,neyrra,ivetvan,ergun,sngvzn,gvyyvr,ryrnaber,pnev,gerin,jvyuryzvan,ebfnyrr,znhevar,yngevpr,wran,gnela,ryvn,qrool,znhqvr,wrnaan,qryvynu,pngevan,fubaqn,ubegrapvn,gurbqben,grerfvgn,eboova,qnarggr,qrycuvar,oevnaar,avyqn,qnaan,pvaqv,orff,vban,jvaban,ivqn,ebfvgn,znevnaan,enpurny,thvyyrezvan,rybvfn,pryrfgvar,pnera,znyvffn,yban,punagry,furyyvr,znevfryn,yrben,ntngun,fbyrqnq,zvtqnyvn,virggr,puevfgra,nguran,wnary,irqn,cnggvr,grffvr,gren,znevylaa,yhpergvn,xneevr,qvanu,qnavryn,nyrpvn,nqryvan,ireavpr,fuvryn,cbegvn,zreel,ynfunja,qnen,gnjnan,ireqn,nyrar,mryyn,fnaqv,ensnryn,znln,xven,pnaqvqn,nyivan,fhmna,funlyn,yrggvr,fnzngun,benyvn,zngvyqr,ynevffn,irfgn,eravgn,qrybvf,funaqn,cuvyyvf,ybeev,reyvaqn,pnguevar,oneo,vfnoryy,vbar,tvfryn,ebknaan,znlzr,xvfun,ryyvr,zryyvffn,qbeevf,qnyvn,oryyn,naarggn,mbvyn,ergn,ervan,ynherggn,xlyvr,puevfgny,cvyne,puneyn,ryvffn,gvssnav,gnan,cnhyvan,yrbgn,oernaan,wnlzr,pnezry,irearyy,gbznfn,znaqv,qbzvatn,fnagn,zrybqvr,yhen,nyrkn,gnzryn,zvean,xreevr,irahf,sryvpvgn,pevfgl,pnezryvgn,oreavrpr,naarznevr,gvnen,ebfrnaar,zvffl,pbev,ebknan,cevpvyyn,xevfgny,what,rylfr,unlqrr,nyrgun,orggvan,znetr,tvyyvna,svybzran,mranvqn,uneevrggr,pnevqnq,inqn,nergun,crneyvar,znewbel,znepryn,sybe,rirggr,rybhvfr,nyvan,qnznevf,pngunevar,oryin,anxvn,zneyran,yhnaar,ybevar,xneba,qberar,qnavgn,oeraan,gngvnan,ybhnaa,whyvnaan,naqevn,cuvybzran,yhpvyn,yrbaben,qbivr,ebzban,zvzv,wnpdhryva,tnlr,gbawn,zvfgv,punfgvgl,fgnpvn,ebknaa,zvpnryn,iryqn,zneylf,wbuaan,nhen,vibaar,unlyrl,avpxv,znwbevr,ureyvaqn,lnqven,creyn,tertbevn,nagbarggr,furyyv,zbmryyr,znevnu,wbryyr,pbeqryvn,wbfrggr,puvdhvgn,gevfgn,yndhvgn,trbetvnan,pnaqv,funaba,uvyqrtneq,fgrcunal,zntqn,xneby,tnoevryyn,gvnan,ebzn,evpuryyr,byrgn,wnpdhr,vqryyn,nynvan,fhmnaan,wbivgn,gbfun,arervqn,zneyla,xlyn,qrysvan,gran,fgrcuravr,fnovan,angunyvr,znepryyr,tregvr,qneyrra,gurn,funebaqn,funagry,oryra,irarffn,ebfnyvan,trabirin,pyrzragvar,ebfnyon,erangr,erangn,trbetvnaan,sybl,qbepnf,nevnan,glen,gurqn,znevnz,whyv,wrfvpn,ivxxv,ireyn,ebfryla,zryivan,wnaarggr,tvaal,qroenu,pbeevr,ivbyrgn,zlegvf,yngevpvn,pbyyrggr,puneyrra,navffn,ivivnan,gjlyn,arqen,yngbavn,uryyra,snovbyn,naanznevr,nqryy,funela,punagny,avxv,znhq,yvmrggr,yvaql,xrfun,wrnan,qnaryyr,puneyvar,punary,inybevr,qbegun,pevfgny,fhaal,yrbar,yrvynav,treev,qrov,naqen,xrfuvn,rhynyvn,rnfgre,qhypr,angvivqnq,yvaavr,xnzv,trbetvr,pngvan,oebbx,nyqn,jvaavserq,funeyn,ehgunaa,zrntuna,zntqnyrar,yvffrggr,nqrynvqn,iravgn,geran,fuveyrar,funzrxn,ryvmrorgu,qvna,funagn,yngbfun,pneybggn,jvaql,ebfvan,znevnaa,yrvfn,wbaavr,qnjan,pnguvr,nfgevq,ynherra,wnarra,ubyyv,snja,ivpxrl,grerffn,funagr,eholr,znepryvan,punaqn,grerfr,fpneyrgg,zneavr,yhyh,yvfrggr,wravssre,ryrabe,qbevaqn,qbavgn,pnezna,oreavgn,nygntenpvn,nyrgn,nqevnaan,mbenvqn,ylaqfrl,wnavan,fgneyn,culyvf,cuhbat,xlen,punevffr,oynapu,fnawhnavgn,eban,anapv,znevyrr,znenaqn,oevtrggr,fnawhnan,znevgn,xnffnaqen,wblpryla,sryvcn,puryfvr,obaal,zverln,yberamn,xlbat,vyrnan,pnaqrynevn,furevr,yhpvr,yrngevpr,ynxrfuvn,treqn,rqvr,onzov,znelyva,yniba,ubegrafr,tnearg,rivr,gerffn,funlan,ynivan,xlhat,wrnarggn,fureevyy,funen,culyvff,zvggvr,nanory,nyrfvn,guhl,gnjnaqn,wbnavr,gvssnavr,ynfunaqn,xnevffn,raevdhrgn,qnevn,qnavryyn,pbevaan,nynaan,noorl,ebknar,ebfrnaan,zntabyvn,yvqn,wbryyra,pbeny,pneyrra,gerfn,crttvr,abiryyn,avyn,znloryyr,wraryyr,pnevan,abin,zryvan,znedhrevgr,znetnerggr,wbfrcuvan,ribaar,pvaguvn,nyovan,gbln,gnjaln,furevgn,zlevnz,yvmnorgu,yvfr,xrryl,wraav,tvfryyr,purelyr,neqvgu,neqvf,nyrfun,nqevnar,funvan,yvaarn,xnebyla,sryvfun,qbev,qnepv,negvr,nezvqn,mbyn,kvbznen,iretvr,funzvxn,aran,anaarggr,znkvr,ybivr,wrnar,wnvzvr,vatr,sneenu,rynvan,pnvgyla,sryvpvgnf,pureyl,pnely,lbybaqn,lnfzva,grran,cehqrapr,craavr,alqvn,znpxramvr,becun,zneiry,yvmorgu,ynherggr,wreevr,urezryvaqn,pnebyrr,gvreen,zvevna,zrgn,zrybal,xbev,wraarggr,wnzvyn,lbfuvxb,fhfnaanu,fnyvan,euvnaaba,wbyrra,pevfgvar,nfugba,nenpryl,gbzrxn,funybaqn,znegv,ynpvr,xnyn,wnqn,vyfr,unvyrl,oevggnav,mban,floyr,fureely,avqvn,zneyb,xnaqvpr,xnaqv,nylpvn,ebaan,aberar,zrepl,vatrobet,tvbinaan,trzzn,puevfgry,nhqel,mben,ivgn,gevfu,fgrcunvar,fuveyrr,funavxn,zrybavr,znmvr,wnmzva,vatn,urggvr,trenyla,sbaqn,rfgeryyn,nqryyn,fnevgn,evan,zvyvffn,znevorgu,tbyqn,riba,rguryla,rarqvan,purevfr,punan,iryin,gnjnaan,fnqr,zvegn,xnevr,wnpvagn,ryan,qnivan,pvreen,nfuyvr,nyoregun,gnarfun,aryyr,zvaqv,ybevaqn,ynehr,syberar,qrzrgen,qrqen,pvnen,punagryyr,nfuyl,fhml,ebfnyin,abryvn,ylqn,yrngun,xelfglan,xevfgna,xneev,qneyvar,qnepvr,pvaqn,pureevr,njvyqn,nyzrqn,ebynaqn,ynarggr,wrevyla,tvfryr,rinyla,plaqv,pyrgn,pneva,mvan,mran,iryvn,gnavxn,punevffn,gnyvn,znetnergr,ynibaqn,xnlyrr,xnguyrar,wbaan,veran,vyban,vqnyvn,pnaqvf,pnaqnapr,oenaqrr,navgen,nyvqn,fvtevq,avpbyrggr,znelwb,yvarggr,urqjvt,puevfgvnan,nyrkvn,gerffvr,zbqrfgn,yhcvgn,yvgn,tynqvf,riryvn,qnivqn,pureev,prpvyl,nfuryl,naanory,nthfgvan,jnavgn,fuveyl,ebfnhen,uhyqn,lrggn,ireban,gubznfvan,fvoly,funaana,zrpuryyr,yrnaqen,ynav,xlyrr,xnaql,wbylaa,srear,robav,pberar,nylfvn,mhyn,anqn,zbven,ylaqfnl,ybeerggn,wnzzvr,ubegrafvn,tnlaryy,nqevn,ivan,ivpragn,gnatryn,fgrcuvar,abevar,aryyn,yvnan,yrfyrr,xvzoreryl,vyvnan,tybel,sryvpn,rzbtrar,rysevrqr,rqra,rnegun,pnezn,bpvr,yraavr,xvnen,wnpnyla,pneybgn,nevryyr,bgvyvn,xvefgva,xnprl,wbuarggn,wbrggn,wrenyqvar,wnhavgn,rynan,qbegurn,pnzv,nznqn,nqryvn,ireavgn,gnzne,fvbouna,erarn,enfuvqn,bhvqn,avyfn,zrely,xevfgla,whyvrgn,qnavpn,oernaar,nhern,natyrn,fureeba,bqrggr,znyvn,yberyrv,yrrfn,xraan,xnguyla,svban,puneyrggr,fhmvr,funagryy,fnoen,enpdhry,zlbat,zven,znegvar,yhpvraar,yninqn,whyvnaa,ryiren,qrycuvn,puevfgvnar,punebyrggr,pneev,nfun,natryyn,cnbyn,avasn,yrqn,fgrsnav,funaryy,cnyzn,znpuryyr,yvffn,xrpvn,xnguelar,xneyrar,whyvffn,wrggvr,wraavssre,pbeevan,pnebynaa,nyran,ebfnevn,zlegvpr,znelyrr,yvnar,xralnggn,whqvr,wnarl,ryzven,ryqben,qraan,pevfgv,pnguv,mnvqn,ibaavr,ivin,ireavr,ebfnyvar,znevryn,yhpvnan,yrfyv,xnena,sryvpr,qrarra,nqvan,jlaban,gnefun,fureba,funavgn,funav,funaqen,enaqn,cvaxvr,aryvqn,znevybh,ylyn,ynherar,ynpv,wnarar,qbebgun,qnavryr,qnav,pnebylaa,pneyla,oreravpr,nlrfun,naaryvrfr,nyrgurn,gurefn,gnzvxb,ehsvan,byvin,zbmryy,znelyla,xevfgvna,xngulea,xnfnaqen,xnaqnpr,wnanr,qbzravpn,qrooen,qnaavryyr,puha,nepryvn,mrabovn,funera,funerr,ynivavn,xnpvr,wnpxryvar,uhbat,sryvfn,rzryvn,ryrnaben,plguvn,pevfgva,pynevory,nanfgnpvn,mhyzn,mnaqen,lbxb,gravfun,fhfnaa,furevyla,funl,funjnaqn,ebznan,znguvyqn,yvafrl,xrvxb,wbnan,vfryn,terggn,trbetrggn,rhtravr,qrfvenr,qryben,pbenmba,nagbavan,navxn,jvyyrar,genprr,gnzngun,avpuryyr,zvpxvr,znrtna,yhnan,ynavgn,xryfvr,rqryzven,oerr,nsgba,grbqben,gnzvr,furan,yvau,xryv,xnpv,qnalryyr,neyrggr,nyoregvar,nqryyr,gvssval,fvzban,avpbynfn,avpuby,anxvfun,znven,yberra,xvmml,snyyba,puevfgrar,oboolr,lvat,ivapramn,gnawn,ehovr,ebav,dhrravr,znetnergg,xvzoreyv,veztneq,vqryy,uvyzn,riryvan,rfgn,rzvyrr,qraavfr,qnavn,pnevr,evfn,evxxv,cnegvpvn,znfnxb,yhiravn,yberr,ybav,yvra,tvtv,syberapvn,qravgn,ovyylr,gbzvxn,funevgn,enan,avxbyr,arbzn,znetnevgr,znqnyla,yhpvan,ynvyn,xnyv,wrarggr,tnoevryr,rirylar,ryraben,pyrzragvan,nyrwnaqevan,mhyrzn,ivbyrggr,inaarffn,guerfn,erggn,cngvrapr,abryyn,avpxvr,wbaryy,punln,pnzryvn,orgury,naln,fhmnaa,zvyn,yvyyn,ynirean,xrrfun,xnggvr,trbetrar,riryvar,rfgryy,ryvmorgu,ivivraar,inyyvr,gehqvr,fgrcunar,zntnyl,znqvr,xralrggn,xneera,wnarggn,urezvar,qehpvyyn,qroov,pryrfgvan,pnaqvr,oevgav,orpxvr,nzvan,mvgn,lbynaqr,ivivra,irearggn,gehqv,crneyr,cngevan,bffvr,avpbyyr,yblpr,yrggl,xngunevan,wbfryla,wbaryyr,wraryy,vrfun,urvqr,sybevaqn,syberagvan,rybqvn,qbevar,oehavyqn,oevtvq,nfuyv,neqryyn,gjnan,gnenu,funiba,frevan,enlan,enzbavgn,znethevgr,yhperpvn,xbhegarl,xngv,wrfravn,pevfgn,nlnan,nyvpn,nyvn,ivaavr,fhryyra,ebzryvn,enpuryy,bylzcvn,zvpuvxb,xngunyrra,wbyvr,wrffv,wnarffn,unan,ryrnfr,pneyrggn,oevgnal,fuban,fnybzr,ebfnzbaq,ertran,envan,atbp,aryvn,ybhiravn,yrfvn,yngevan,yngvpvn,yneubaqn,wvan,wnpxv,rzzl,qrrnaa,pberggn,nearggn,gunyvn,funavpr,argn,zvxxv,zvpxv,ybaan,yrnan,ynfuhaqn,xvyrl,wblr,wnpdhyla,vtanpvn,ulha,uvebxb,uraevrggr,rynlar,qryvaqn,qnuyvn,pberra,pbafhryn,pbapuvgn,onorggr,nlnaan,narggr,nyoregvan,funjarr,funarxn,dhvnan,cnzryvn,zreev,zreyrar,znetvg,xvrfun,xvren,xnlyrar,wbqrr,wravfr,reyrar,rzzvr,qnyvyn,qnvfrl,pnfvr,oryvn,ononen,irefvr,inarfn,furyon,funjaqn,avxvn,anbzn,znean,znetrerg,znqnyvar,ynjnan,xvaqen,whggn,wnmzvar,wnargg,unaaryber,tyraqben,tregehq,tneargg,serrqn,serqrevpn,sybenapr,synivn,pneyvar,orireyrr,nawnarggr,inyqn,gnznyn,fubaan,fnevan,barvqn,zrevyla,zneyrra,yheyvar,yraan,xngureva,wrav,tenpvn,tynql,snenu,rabyn,qbzvadhr,qriban,qrynan,prpvyn,pncevpr,nylfun,nyrguvn,iran,gurerfvn,gnjal,funxven,fnznen,fnpuvxb,enpuryr,cnzryyn,zneav,znevry,znera,znyvfn,yvtvn,yren,yngbevn,ynenr,xvzore,xngurea,xnerl,wraarsre,wnargu,unyvan,serqvn,qryvfn,qroebnu,pvren,natryvxn,naqerr,nygun,ivina,greerfn,gnaan,fhqvr,fvtar,fnyran,ebaav,eroorppn,zlegvr,znyvxn,znvqn,yrbaneqn,xnlyrvtu,rguly,ryyla,qnlyr,pnzzvr,oevggav,ovetvg,niryvan,nfhapvba,nevnaan,nxvxb,iravpr,glrfun,gbavr,gvrfun,gnxvfun,fgrssnavr,fvaql,zrtunaa,znaqn,znpvr,xryylr,xryyrr,wbfyla,vatre,vaqven,tyvaqn,tyraavf,sreanaqn,snhfgvan,rarvqn,ryvpvn,qvtan,qryy,neyrggn,jvyyvn,gnzznen,gnorgun,fureeryy,fnev,eroorpn,cnhyrggn,angbfun,anxvgn,znzzvr,xravfun,xnmhxb,xnffvr,rneyrna,qncuvar,pbeyvff,pybgvyqr,pnebylar,orearggn,nhthfgvan,nhqern,naavf,naanoryy,graavyyr,gnzvpn,fryrar,ebfnan,ertravn,dvnan,znexvgn,znpl,yrrnaar,ynhevar,wrffravn,wnavgn,trbetvar,travr,rzvxb,ryivr,qrnaqen,qntzne,pbevr,pbyyra,purevfu,ebznvar,cbefun,crneyrar,zvpuryvar,zrean,znetbevr,znetnerggn,yber,wravar,urezvan,serqrevpxn,ryxr,qehfvyyn,qbengul,qvbar,pryran,oevtvqn,nyyrten,gnzrxvn,flaguvn,fbbx,fylivn,ebfnaa,erngun,enlr,znedhrggn,znetneg,yvat,ynlyn,xlzoreyl,xvnan,xnlyrra,xngyla,xnezra,wbryyn,rzryqn,ryrav,qrgen,pyrzzvr,purelyy,punagryy,pngurl,neavgn,neyn,natyr,natryvp,nylfr,mbsvn,gubznfvar,graavr,fureyl,fureyrl,funely,erzrqvbf,crgevan,avpxbyr,zlhat,zleyr,zbmryyn,ybhnaar,yvfun,yngvn,xelfgn,whyvraar,wrnarar,wnpdhnyvar,vfnhen,tjraqn,rneyrra,pyrbcngen,pneyvr,nhqvr,nagbavrggn,nyvfr,ireqryy,gbzbxb,gunb,gnyvfun,furzvxn,fninaan,fnagvan,ebfvn,enrnaa,bqvyvn,anan,zvaan,zntna,ylaryyr,xnezn,wbrnaa,vinan,varyy,vynan,thqeha,qernzn,pevffl,punagr,pnezryvan,neivyyn,naanznr,nyiren,nyrvqn,lnaven,inaqn,gvnaan,fgrsnavn,fuven,avpby,anapvr,zbafreengr,zrylaqn,zrynal,ybiryyn,ynher,xnpl,wnpdhrylaa,ulba,tregun,ryvnan,puevfgran,puevfgrra,punevfr,pngrevan,pneyrl,pnaqlpr,neyran,nzzvr,jvyyrggr,inavgn,ghlrg,flerrgn,craarl,alyn,znelnz,zneln,zntra,yhqvr,ybzn,yvivn,ynaryy,xvzoreyvr,whyrr,qbarggn,qvrqen,qravfun,qrnar,qnjar,pynevar,pureely,oebajla,nyyn,inyrel,gbaqn,fhrnaa,fbenln,fubfunan,furyn,funeyrra,funaryyr,arevffn,zrevqvgu,zryyvr,znlr,zncyr,zntnerg,yvyv,yrbavyn,yrbavr,yrrnaan,ynibavn,yniren,xevfgry,xngurl,xngur,wnaa,vyqn,uvyqerq,uvyqrtneqr,travn,shzvxb,riryva,rezryvaqn,ryyl,qhat,qbybevf,qvbaan,qnanr,orearvpr,naavpr,nyvk,ireran,ireqvr,funjaan,funjnan,funhaan,ebmryyn,enaqrr,enanr,zvynteb,ylaryy,yhvfr,ybvqn,yvforgu,xneyrra,whavgn,wban,vfvf,ulnpvagu,urql,tjraa,rguryrar,reyvar,qbaln,qbzbavdhr,qryvpvn,qnaarggr,pvpryl,oenaqn,oylgur,orgunaa,nfuyla,naanyrr,nyyvar,lhxb,iryyn,genat,gbjnaqn,grfun,fureyla,anepvfn,zvthryvan,zrev,znloryy,zneynan,znethrevgn,znqyla,ybel,ybevnaa,yrbaber,yrvtunaa,ynhevpr,yngrfun,ynebaqn,xngevpr,xnfvr,xnyrl,wnqjvtn,tyraavr,trneyqvar,senapvan,rcvsnavn,qlna,qbevr,qvrqer,qrarfr,qrzrgevpr,qryran,pevfgvr,pyrben,pngnevan,pnevfn,oneoren,nyzrgn,gehyn,grernfn,fbynatr,furvynu,funibaar,fnaben,ebpuryy,znguvyqr,znetnergn,znvn,ylafrl,ynjnaan,ynhan,xran,xrran,xngvn,tylaqn,tnlyrar,ryivan,rynabe,qnahgn,qnavxn,pevfgra,pbeqvr,pbyrggn,pynevgn,pnezba,oelaa,nmhpran,nhaqern,natryr,ireyvr,ireyrar,gnzrfun,fvyinan,froevan,fnzven,erqn,enlyrar,craav,abenu,abzn,zvervyyr,zryvffvn,znelnyvpr,ynenvar,xvzorel,xnely,xnevar,wbynaqn,wbunan,wrfhfn,wnyrrfn,wnpdhrylar,vyhzvanqn,uvynevn,unau,traavr,senapvr,syberggn,rkvr,rqqn,qerzn,qrycun,oneone,nffhagn,neqryy,naanyvfn,nyvfvn,lhxvxb,lbynaqb,jbaqn,jnygenhq,irgn,grzrxn,gnzrvxn,fuveyrra,furavgn,cvrqnq,bmryyn,zvegun,znevyh,xvzvxb,whyvnar,wravpr,wnanl,wnpdhvyvar,uvyqr,rybvf,rpub,qribenu,punh,oevaqn,orgfrl,nezvaqn,nenpryvf,ncely,naargg,nyvfuvn,irbyn,hfun,gbfuvxb,gurbyn,gnfuvn,gnyvgun,furel,erarggn,ervxb,enfurrqn,boqhyvn,zvxn,zrynvar,zrttna,zneyra,znetrg,znepryvar,znan,zntqnyra,yvoenqn,yrmyvr,yngnfuvn,ynfnaqen,xryyr,vfvqen,vabprapvn,tjla,senapbvfr,rezvavn,revaa,qvzcyr,qriben,pevfryqn,neznaqn,nevr,nevnar,natryran,nyvmn,nqevrar,nqnyvar,kbpuvgy,gjnaan,gbzvxb,gnzvfun,gnvfun,fhfl,ehgun,euban,abevxb,angnfuvn,zreevr,znevaqn,znevxb,znetreg,ybevf,yvmmrggr,yrvfun,xnvyn,wbnaavr,wreevpn,wrar,wnaarg,wnarr,wnpvaqn,uregn,ryraber,qberggn,qrynvar,qnavryy,pynhqvr,oevggn,ncbybavn,nzoreyl,nyrnfr,lhev,jnargn,gbzv,funeev,fnaqvr,ebfryyr,erlanyqn,enthry,culyvpvn,cngevn,byvzcvn,bqryvn,zvgmvr,zvaqn,zvtaba,zvpn,zraql,zneviry,znvyr,ylarggn,ynirggr,ynhela,yngevfun,ynxvrfun,xvrefgra,xnel,wbfcuvar,wbyla,wrggn,wnavfr,wnpdhvr,viryvffr,tylavf,tvnaan,tnlaryyr,qnalryy,qnavyyr,qnpvn,pbenyrr,pure,prbyn,nevnaar,nyrfuvn,lhat,jvyyvrznr,gevau,guben,furevxn,furzrxn,funhaqn,ebfryvar,evpxv,zryqn,znyyvr,ynibaan,yngvan,yndhnaqn,ynyn,ynpuryyr,xynen,xnaqvf,wbuan,wrnaznevr,wnlr,tenlpr,treghqr,rzrevgn,robavr,pybevaqn,puvat,purel,pnebyn,oernaa,oybffbz,oreaneqvar,orpxv,neyrgun,netryvn,nyvgn,lhynaqn,lrffravn,gbov,gnfvn,flyivr,fuvey,fuveryl,furyyn,funagryyr,fnpun,erorpxn,cebivqrapvn,cnhyrar,zvfun,zvxv,zneyvar,znevpn,ybevgn,yngblvn,ynfbaln,xrefgva,xraqn,xrvgun,xngueva,wnlzvr,tevpryqn,tvarggr,rela,ryvan,rysevrqn,qnalry,purerr,punaryyr,oneevr,nheber,naanznevn,nyyrra,nvyrar,nvqr,lnfzvar,infugv,gernfn,gvssnarl,furelyy,funevr,funanr,envfn,arqn,zvgfhxb,zveryyn,zvyqn,znelnaan,znenterg,znoryyr,yhrggn,ybevan,yrgvfun,yngnefun,ynaryyr,ynwhnan,xevffl,xneyl,xneran,wrffvxn,wrevpn,wrnaryyr,wnyvfn,wnpryla,vmbyn,rhan,rgun,qbzvgvyn,qbzvavpn,qnvan,perbyn,pneyv,pnzvr,oevggal,nfunagv,navfun,nyrra,nqnu,lnfhxb,inyevr,gban,gvavfun,grevfn,gnarxn,fvzbaar,funynaqn,frevgn,erffvr,ershtvn,byrar,zneturevgn,znaqvr,znver,ylaqvn,yhpv,ybeevnar,ybergn,yrbavn,yniban,ynfunjaqn,ynxvn,xlbxb,xelfgvan,xelfgra,xravn,xryfv,wrnavpr,vfbory,trbetvnaa,traal,sryvpvqnq,rvyrar,qrybvfr,qrrqrr,pbaprcgvba,pyben,purevyla,pnynaqen,neznaqvan,navfn,gvren,gurerffn,fgrcunavn,fvzn,fulyn,fubagn,furen,fundhvgn,funyn,ebffnan,aburzv,arel,zbevnu,zryvgn,zryvqn,zrynav,znelylaa,znevfun,znevrggr,znybevr,znqryrar,yhqvivan,ybevn,yberggr,ybenyrr,yvnaar,yniravn,ynhevaqn,ynfuba,xvzv,xrvyn,xngrylaa,wbar,wbnar,wnlan,wnaryyn,uregun,senaprar,ryvaber,qrfcvan,qryfvr,qrrqen,pyrzrapvn,pnebyva,ohynu,oevggnavr,oybaqryy,ovov,ornhynu,orngn,naavgn,ntevcvan,ivetra,inyrar,gjnaqn,gbzzlr,gneen,gnev,gnzzren,funxvn,fnqlr,ehgunaar,ebpury,evixn,chen,aravgn,angvfun,zvat,zreevyrr,zrybqrr,zneivf,yhpvyyn,yrran,ynirgn,ynevgn,ynavr,xrera,vyrra,trbetrnaa,traan,sevqn,rhsrzvn,rzryl,rqlgu,qrbaan,qrnqen,qneyran,punaryy,pngurea,pnffbaqen,pnffnhaqen,oreaneqn,orean,neyvaqn,nanznevn,iregvr,inyrev,gbeev,fgnfvn,furevfr,furevyy,fnaqn,ehgur,ebfl,eboov,enarr,dhlra,crneyl,cnyzven,bavgn,avfun,avrfun,avqn,zreyla,znlbyn,znelybhvfr,znegu,znetrar,znqrynvar,ybaqn,yrbagvar,yrbzn,yrvn,ynhenyrr,ynaben,ynxvgn,xvlbxb,xrghenu,xngryva,xnerra,wbavr,wbuarggr,wrarr,wrnargg,vmrggn,uvrqv,urvxr,unffvr,tvhfrccvan,trbetnaa,svqryn,sreanaqr,ryjnaqn,ryynznr,ryvm,qhfgv,qbggl,plaql,pbenyvr,pryrfgn,nyiregn,kravn,jnin,inarggn,gbeevr,gnfuvan,gnaql,gnzoen,gnzn,fgrcnavr,fuvyn,funhagn,funena,funavdhn,funr,frgfhxb,frensvan,fnaqrr,ebfnznevn,cevfpvyn,byvaqn,anqrar,zhbv,zvpuryvan,zreprqrm,znelebfr,zneprar,zntnyv,znsnyqn,ynaavr,xnlpr,xnebyvar,xnzvynu,xnznyn,whfgn,wbyvar,wraavar,wnpdhrggn,venvqn,trbetrnaan,senapurfpn,rzryvar,rynar,rugry,rneyvr,qhypvr,qnyrar,pynffvr,purer,punevf,pneblya,pnezvan,pnevgn,orgunavr,nlnxb,nevpn,nylfn,nyrffnaqen,nxvynu,nqevra,mrggn,lbhynaqn,lryran,lnunven,khna,jraqbyla,gvwhnan,grevan,grerfvn,fhmv,fureryy,funibaqn,funhagr,funeqn,funxvgn,fran,elnaa,ehov,evin,ertvavn,enpuny,cneguravn,cnzhyn,zbaavr,zbarg,zvpunryr,zryvn,znyxn,znvfun,yvfnaqen,yrxvfun,yrna,ynxraqen,xelfgva,xbegarl,xvmmvr,xvggvr,xren,xraqny,xrzoreyl,xnavfun,whyrar,whyr,wbunaar,wnzrr,unyyrl,tvqtrg,serqevpxn,syrgn,sngvznu,rhfrovn,rymn,ryrbaber,qbegurl,qbevn,qbaryyn,qvabenu,qrybefr,pynergun,puevfgvavn,puneyla,obat,oryxvf,nmmvr,naqren,nvxb,nqran,lnwnven,inavn,hyevxr,gbfuvn,gvsnal,fgrsnal,fuvmhr,furavxn,funjnaan,funebyla,funevyla,fundhnan,funagnl,ebmnaar,ebfryrr,erzban,ernaan,enryrar,cuhat,crgebavyn,angnpun,anaprl,zley,zvlbxb,zvrfun,zrevqrgu,zneiryyn,znedhvggn,zneugn,znepuryyr,yvmrgu,yvoovr,ynubzn,ynqnja,xvan,xnguryrra,xngunela,xnevfn,xnyrvtu,whavr,whyvrnaa,wbuafvr,wnarna,wnvzrr,wnpxdhryvar,uvfnxb,urezn,urynvar,tjlargu,tvgn,rhfgbyvn,rzryvan,ryva,rqevf,qbaarggr,qbaarggn,qvreqer,qranr,qnepry,pynevfn,pvaqreryyn,puvn,puneyrfrggn,punevgn,pryfn,pnffl,pnffv,pneyrr,oehan,oevggnarl,oenaqr,ovyyv,nagbarggn,natyn,natryla,nanyvfn,nynar,jraban,jraqvr,irebavdhr,inaarfn,gbovr,grzcvr,fhzvxb,fhyrzn,fbzre,furon,funevpr,funary,funyba,ebfvb,ebfryvn,eranl,erzn,erran,bmvr,bergun,benyrr,atna,anxrfun,zvyyl,zneloryyr,znetergg,znentnerg,znavr,yheyrar,yvyyvn,yvrfrybggr,yniryyr,ynfunhaqn,ynxrrfun,xnlprr,xnyla,wbln,wbrggr,wranr,wnavrpr,vyyn,tevfry,tynlqf,trarivr,tnyn,serqqn,ryrbabe,qroren,qrnaqern,pbeevaar,pbeqvn,pbagrffn,pbyrar,pyrbgvyqr,punagnl,prpvyyr,orngevf,nmnyrr,neyrna,neqngu,nawryvpn,nawn,nyserqvn,nyrvfun,mnqn,lhbaar,kvnb,jvyybqrna,iraavr,inaan,glvfun,gbin,gbevr,gbavfun,gvyqn,gvra,fveran,fureevy,funagv,funa,franvqn,fnzryyn,eboola,eraqn,ervgn,curor,cnhyvgn,abohxb,athlrg,arbzv,zvxnryn,zrynavn,znkvzvan,znet,znvfvr,ylaan,yvyyv,ynfunha,ynxraln,ynry,xvefgvr,xnguyvar,xnfun,xneyla,xnevzn,wbina,wbfrsvar,wraaryy,wnpdhv,wnpxryla,uvra,tenmlan,sybeevr,sybevn,ryrbaben,qjnan,qbeyn,qryzl,qrwn,qrqr,qnaa,pelfgn,pyryvn,pynevf,puvrxb,pureyla,pureryyr,puneznva,punen,pnzzl,nearggr,neqryyr,naavxn,nzvrr,nzrr,nyyran,libar,lhxv,lbfuvr,lrirggr,lnry,jvyyrggn,ibapvyr,irarggn,ghyn,gbarggr,gvzvxn,grzvxn,gryzn,grvfun,gnera,fgnprr,funjagn,fngheavan,evpneqn,cnfgl,bavr,ahovn,znevryyr,znevryyn,znevnaryn,zneqryy,yhnaan,ybvfr,yvfnorgu,yvaqfl,yvyyvnan,yvyyvnz,yrynu,yrvtun,yrnaben,xevfgrra,xunyvynu,xrryrl,xnaqen,whaxb,wbndhvan,wreyrar,wnav,wnzvxn,ufvh,urezvyn,trarivir,rivn,rhtran,rzznyvar,ryserqn,ryrar,qbarggr,qrypvr,qrrnaan,qneprl,pynevaqn,pven,punr,pryvaqn,pngurela,pnfvzven,pnezryvn,pnzryyvn,oernan,oborggr,oreaneqvan,oror,onfvyvn,neylar,nzny,nynlan,mbavn,mravn,lhevxb,lnrxb,jlaryy,jvyyran,ireavn,gben,greevyla,grevpn,grarfun,gnjan,gnwhnan,gnvan,fgrcuavr,fban,fvan,fubaqen,fuvmhxb,fureyrar,furevpr,funevxn,ebffvr,ebfran,evzn,euron,eraan,angnyln,anaprr,zrybqv,zrqn,zngun,znexrggn,znevpehm,znepryrar,znyivan,yhon,ybhrggn,yrvqn,yrpvn,ynhena,ynfunjan,ynvar,xunqvwnu,xngrevar,xnfv,xnyyvr,whyvrggn,wrfhfvgn,wrfgvar,wrffvn,wrssvr,wnalpr,vfnqben,trbetvnaar,svqryvn,rivgn,rhen,rhynu,rfgrsnan,ryfl,rynqvn,qbqvr,qravffr,qrybenf,qryvyn,qnlfv,pelfgyr,pbapun,pynerggn,puneyfvr,puneyran,pnelyba,orgglnaa,nfyrl,nfuyrn,nzven,nthrqn,ntahf,lhrggr,ivavgn,ivpgbevan,glavfun,gerran,gbppnen,gvfu,gubznfran,grtna,fbvyn,furaan,funeznvar,funagnr,funaqv,fnena,fnenv,fnan,ebfrggr,ebynaqr,ertvar,bgryvn,byrivn,avpubyyr,arpbyr,anvqn,zlegn,zlrfun,zvgfhr,zvagn,zregvr,znetl,znunyvn,znqnyrar,ybhen,yberna,yrfun,yrbavqn,yravgn,ynibar,ynfuryy,ynfunaqen,ynzbavpn,xvzoen,xngurevan,xneel,xnarfun,wbat,wrarin,wndhryla,tvyzn,tuvfynvar,tregehqvf,senafvfpn,srezvan,rggvr,rgfhxb,ryyna,ryvqvn,rqen,qbergurn,qberngun,qralfr,qrrggn,qnvar,plefgny,pbeeva,pnlyn,pneyvgn,pnzvyn,ohezn,ohyn,ohran,onenonen,nievy,nynvar,mnan,jvyurzvan,jnarggn,ireyvar,infvyvxv,gbavgn,gvfn,grbsvyn,gnlan,gnhaln,gnaqen,gnxnxb,fhaav,fhnaar,fvkgn,funeryy,frrzn,ebfraqn,eboran,enlzbaqr,cnzvyn,bmryy,arvqn,zvfgvr,zvpun,zrevffn,znhevgn,znelya,znelrggn,znepryy,znyran,znxrqn,ybirggn,ybhevr,ybeevar,ybevyrr,ynheran,ynfunl,yneenvar,ynerr,ynperfun,xevfgyr,xrin,xrven,xnebyr,wbvr,wvaal,wrnaarggn,wnzn,urvql,tvyoregr,trzn,snivbyn,rirylaa,raqn,ryyv,ryyran,qvivan,qntal,pbyyrar,pbqv,pvaqvr,punffvql,punfvql,pngevpr,pngurevan,pnffrl,pnebyy,pneyran,pnaqen,pnyvfgn,oelnaan,oevggral,orhyn,onev,nhqevr,nhqevn,neqryvn,naaryyr,natvyn,nyban,nyyla".split(","),surnames:"fzvgu,wbuafba,jvyyvnzf,wbarf,oebja,qnivf,zvyyre,jvyfba,zbber,gnlybe,naqrefba,wnpxfba,juvgr,uneevf,znegva,gubzcfba,tnepvn,znegvarm,ebovafba,pynex,ebqevthrm,yrjvf,yrr,jnyxre,unyy,nyyra,lbhat,ureanaqrm,xvat,jevtug,ybcrm,uvyy,terra,nqnzf,onxre,tbamnyrm,aryfba,pnegre,zvgpuryy,crerm,eboregf,gheare,cuvyyvcf,pnzcoryy,cnexre,rinaf,rqjneqf,pbyyvaf,fgrjneg,fnapurm,zbeevf,ebtref,errq,pbbx,zbetna,oryy,zhecul,onvyrl,eviren,pbbcre,evpuneqfba,pbk,ubjneq,jneq,gbeerf,crgrefba,tenl,enzverm,jngfba,oebbxf,fnaqref,cevpr,oraargg,jbbq,onearf,ebff,uraqrefba,pbyrzna,wraxvaf,creel,cbjryy,ybat,cnggrefba,uhturf,syberf,jnfuvatgba,ohgyre,fvzzbaf,sbfgre,tbamnyrf,oelnag,nyrknaqre,tevssva,qvnm,unlrf,zlref,sbeq,unzvygba,tenunz,fhyyvina,jnyynpr,jbbqf,pbyr,jrfg,bjraf,erlabyqf,svfure,ryyvf,uneevfba,tvofba,zpqbanyq,pehm,znefunyy,begvm,tbzrm,zheenl,serrzna,jryyf,jroo,fvzcfba,fgriraf,ghpxre,cbegre,uvpxf,penjsbeq,oblq,znfba,zbenyrf,xraarql,jneera,qvkba,enzbf,erlrf,oheaf,tbeqba,funj,ubyzrf,evpr,eboregfba,uhag,oynpx,qnavryf,cnyzre,zvyyf,avpubyf,tenag,xavtug,srethfba,fgbar,unjxvaf,qhaa,crexvaf,uhqfba,fcrapre,tneqare,fgrcuraf,cnlar,cvrepr,oreel,znggurjf,neabyq,jntare,jvyyvf,jngxvaf,byfba,pneebyy,qhapna,falqre,uneg,phaavatunz,ynar,naqerjf,ehvm,unecre,sbk,evyrl,nezfgebat,pnecragre,jrnire,terrar,ryyvbgg,punirm,fvzf,crgref,xryyrl,senaxyva,ynjfba,svryqf,thgvreerm,fpuzvqg,pnee,infdhrm,pnfgvyyb,jurryre,punczna,zbagtbzrel,evpuneqf,jvyyvnzfba,wbuafgba,onaxf,zrlre,ovfubc,zppbl,ubjryy,nyinerm,zbeevfba,unafra,sreanaqrm,tnemn,uneirl,ohegba,athlra,wnpbof,ervq,shyyre,ylapu,tneergg,ebzreb,jrypu,ynefba,senmvre,ohexr,unafba,zraqbmn,zberab,objzna,zrqvan,sbjyre,oerjre,ubsszna,pneyfba,fvyin,crnefba,ubyynaq,syrzvat,wrafra,inetnf,oleq,qnivqfba,ubcxvaf,ureeren,jnqr,fbgb,jnygref,arny,pnyqjryy,ybjr,wraavatf,oneargg,tenirf,wvzrarm,ubegba,furygba,oneergg,boevra,pnfgeb,fhggba,zpxvaarl,yhpnf,zvyrf,ebqevdhrm,punzoref,ubyg,ynzoreg,syrgpure,jnggf,ongrf,unyr,eubqrf,cran,orpx,arjzna,unlarf,zpqnavry,zraqrm,ohfu,inhtua,cnexf,qnjfba,fnagvntb,abeevf,uneql,fgrryr,pheel,cbjref,fpuhygm,onexre,thmzna,cntr,zhabm,onyy,xryyre,punaqyre,jrore,jnyfu,ylbaf,enzfrl,jbysr,fpuarvqre,zhyyvaf,orafba,funec,objra,oneore,phzzvatf,uvarf,onyqjva,tevssvgu,inyqrm,uhooneq,fnynmne,errirf,jneare,fgrirafba,ohetrff,fnagbf,gngr,pebff,tneare,znaa,znpx,zbff,gubeagba,zptrr,snezre,qrytnqb,nthvyne,irtn,tybire,znaavat,pbura,unezba,ebqtref,eboovaf,arjgba,oynve,uvttvaf,vatenz,errfr,pnaaba,fgevpxynaq,gbjafraq,cbggre,tbbqjva,jnygba,ebjr,unzcgba,begrtn,cnggba,fjnafba,tbbqzna,znyqbanqb,lngrf,orpxre,revpxfba,ubqtrf,evbf,pbaare,nqxvaf,jrofgre,znybar,unzzbaq,sybjref,pboo,zbbql,dhvaa,cbcr,bfobear,zppnegul,threereb,rfgenqn,fnaqbiny,tvoof,tebff,svgmtrenyq,fgbxrf,qblyr,fnhaqref,jvfr,pbyba,tvyy,nyinenqb,terre,cnqvyyn,jngref,aharm,onyyneq,fpujnegm,zpoevqr,ubhfgba,puevfgrafra,xyrva,cengg,oevttf,cnefbaf,zpynhtuyva,mvzzrezna,ohpunana,zbena,pbcrynaq,cvggzna,oenql,zppbezvpx,ubyybjnl,oebpx,cbbyr,ybtna,onff,znefu,qenxr,jbat,wrssrefba,zbegba,noobgg,fcnexf,abegba,uhss,znffrl,svthrebn,pnefba,objref,eborefba,onegba,gena,ynzo,uneevatgba,obbar,pbegrm,pynexr,znguvf,fvatyrgba,jvyxvaf,pnva,haqrejbbq,ubtna,zpxramvr,pbyyvre,yhan,curycf,zpthver,oevqtrf,jvyxrefba,anfu,fhzzref,ngxvaf,jvypbk,cvggf,pbayrl,znedhrm,oheargg,pbpuena,punfr,qniracbeg,ubbq,tngrf,nlnyn,fnjlre,inmdhrm,qvpxrefba,ubqtr,npbfgn,sylaa,rfcvabmn,avpubyfba,zbaebr,jbys,zbeebj,juvgnxre,bpbaabe,fxvaare,jner,zbyvan,xveol,uhsszna,tvyzber,qbzvathrm,barny,ynat,pbzof,xenzre,unapbpx,tnyynture,tnvarf,funssre,jvttvaf,zngurjf,zppynva,svfpure,jnyy,zrygba,urafyrl,obaq,qlre,tevzrf,pbagerenf,jlngg,onkgre,fabj,zbfyrl,furcureq,ynefra,ubbire,ornfyrl,crgrefra,juvgrurnq,zrlref,tneevfba,fuvryqf,ubea,fnintr,byfra,fpuebrqre,unegzna,jbbqneq,zhryyre,xrzc,qryrba,obbgu,cngry,pnyubha,jvyrl,rngba,pyvar,anineeb,uneeryy,uhzcuerl,cneevfu,qhena,uhgpuvafba,urff,qbefrl,ohyybpx,eboyrf,orneq,qnygba,nivyn,evpu,oynpxjryy,wbuaf,oynaxrafuvc,gerivab,fnyvanf,pnzcbf,cehvgg,pnyynuna,zbagbln,uneqva,threen,zpqbjryy,fgnssbeq,tnyyrtbf,urafba,jvyxvafba,obbxre,zreevgg,ngxvafba,bee,qrpxre,uboof,gnaare,xabk,cnpurpb,fgrcurafba,tynff,ebwnf,freenab,znexf,uvpxzna,fjrrarl,fgebat,zppyher,pbajnl,ebgu,znlaneq,sneeryy,ybjrel,uhefg,avkba,jrvff,gehwvyyb,ryyvfba,fybna,whnerm,jvagref,zpyrna,oblre,ivyyneerny,zppnyy,tragel,pneevyyb,nlref,ynen,frkgba,cnpr,uhyy,yroynap,oebjavat,irynfdhrm,yrnpu,punat,fryyref,ureevat,aboyr,sbyrl,onegyrgg,zrepnqb,ynaqel,qheunz,jnyyf,onee,zpxrr,onhre,eviref,oenqfunj,chtu,iryrm,ehfu,rfgrf,qbqfba,zbefr,furccneq,jrrxf,pnznpub,orna,oneeba,yvivatfgba,zvqqyrgba,fcrnef,oenapu,oyrivaf,pura,xree,zppbaaryy,ungsvryq,uneqvat,fbyvf,sebfg,tvyrf,oynpxohea,craavatgba,jbbqjneq,svayrl,zpvagbfu,xbpu,zpphyybhtu,oynapuneq,evinf,oeraana,zrwvn,xnar,oragba,ohpxyrl,inyragvar,znqqbk,ehffb,zpxavtug,ohpx,zbba,zpzvyyna,pebfol,oret,qbgfba,znlf,ebnpu,puna,evpuzbaq,zrnqbjf,snhyxare,barvyy,xancc,xyvar,bpubn,wnpbofba,tnl,uraqevpxf,ubear,furcneq,uroreg,pneqranf,zpvagler,jnyyre,ubyzna,qbanyqfba,pnagh,zbeva,tvyyrfcvr,shragrf,gvyyzna,oragyrl,crpx,xrl,fnynf,ebyyvaf,tnzoyr,qvpxfba,fnagnan,pnoeren,preinagrf,ubjr,uvagba,uheyrl,fcrapr,mnzben,lnat,zparvy,fhnerm,crggl,tbhyq,zpsneynaq,fnzcfba,pneire,oenl,znpqbanyq,fgbhg,urfgre,zryraqrm,qvyyba,sneyrl,ubccre,tnyybjnl,cbggf,wblare,fgrva,nthveer,bfobea,zrepre,oraqre,senapb,ebjynaq,flxrf,cvpxrgg,frnef,znlb,qhaync,unlqra,jvyqre,zpxnl,pbssrl,zppnegl,rjvat,pbbyrl,inhtuna,obaare,pbggba,ubyqre,fgnex,sreeryy,pnageryy,shygba,ybgg,pnyqreba,cbyyneq,ubbcre,ohepu,zhyyra,sel,evqqyr,yril,qhxr,bqbaaryy,oevgg,qnhturegl,oretre,qvyyneq,nyfgba,selr,evttf,punarl,bqbz,qhssl,svgmcngevpx,inyramhryn,znlre,nysbeq,zpcurefba,nprirqb,oneeren,pbgr,ervyyl,pbzcgba,zbbarl,zptbjna,pensg,pyrzbaf,jlaa,avryfra,onveq,fgnagba,favqre,ebfnyrf,oevtug,jvgg,unlf,ubyqra,ehgyrqtr,xvaarl,pyrzragf,pnfgnarqn,fyngre,unua,ohexf,qrynarl,cngr,ynapnfgre,funecr,juvgsvryq,gnyyrl,znpvnf,oheevf,engyvss,zppenl,znqqra,xnhszna,ornpu,tbss,pnfu,obygba,zpsnqqra,yrivar,olref,xvexynaq,xvqq,jbexzna,pnearl,zpyrbq,ubypbzo,svapu,fbfn,unarl,senaxf,fnetrag,avrirf,qbjaf,enfzhffra,oveq,urjvgg,sberzna,inyrapvn,barvy,qrynpehm,ivafba,qrwrfhf,ulqr,sbeorf,tvyyvnz,thguevr,jbbgra,uhore,oneybj,oblyr,zpznuba,ohpxare,ebpun,chpxrgg,ynatyrl,xabjyrf,pbbxr,irynmdhrm,juvgyrl,inat,furn,ebhfr,unegyrl,znlsvryq,ryqre,enaxva,unaan,pbjna,yhpreb,neeblb,fynhtugre,unnf,bpbaaryy,zvabe,obhpure,nepure,obttf,qbhturegl,naqrefra,arjryy,pebjr,jnat,sevrqzna,oynaq,fjnva,ubyyrl,crnepr,puvyqf,lneoebhtu,tnyina,cebpgbe,zrrxf,ybmnab,zben,enatry,onpba,ivyynahrin,fpunrsre,ebfnqb,uryzf,oblpr,tbff,fgvafba,voneen,uhgpuvaf,pbivatgba,pebjyrl,ungpure,znpxrl,ohapu,jbznpx,cbyx,qbqq,puvyqerff,puvyqref,ivyyn,fcevatre,znubarl,qnvyrl,orypure,ybpxuneg,tevttf,pbfgn,oenaqg,jnyqra,zbfre,gnghz,zppnaa,nxref,yhgm,celbe,bebmpb,zpnyyvfgre,yhtb,qnivrf,fubrznxre,ehguresbeq,arjfbzr,zntrr,punzoreynva,oynagba,fvzzf,tbqserl,synantna,pehz,pbeqbin,rfpbone,qbjavat,fvapynve,qbanuhr,xehrtre,zptvaavf,tber,sneevf,jroore,pbeorgg,naqenqr,fgnee,ylba,lbqre,unfgvatf,zptengu,fcvirl,xenhfr,uneqra,penogerr,xvexcngevpx,neevatgba,evggre,zpturr,obyqra,znybarl,tntaba,qhaone,cbapr,cvxr,znlrf,ornggl,zboyrl,xvzonyy,ohggf,zbagrf,ryqevqtr,oenha,unzz,tvoobaf,zblre,znayrl,ureeba,cyhzzre,ryzber,penzre,ehpxre,cvrefba,sbagrabg,ehovb,tbyqfgrva,ryxvaf,jvyyf,abinx,uvpxrl,jbeyrl,tbezna,xngm,qvpxvafba,oebhffneq,jbbqehss,pebj,oevggba,anapr,yruzna,ovatunz,mhavtn,junyrl,funsre,pbsszna,fgrjneq,qrynebfn,arryl,zngn,qnivyn,zppnor,xrffyre,uvaxyr,jryfu,cntna,tbyqoret,tbvaf,pebhpu,phrinf,dhvabarf,zpqrezbgg,uraqevpxfba,fnzhryf,qragba,oretreba,virl,ybpxr,unvarf,faryy,ubfxvaf,olear,nevnf,pbeova,orygena,punccryy,qbjarl,qbbyrl,ghggyr,pbhpu,cnlgba,zpryebl,pebpxrgg,tebirf,pnegjevtug,qvpxrl,zptvyy,qhobvf,zhavm,gbyoreg,qrzcfrl,pvfarebf,frjryy,yngunz,ivtvy,gncvn,envarl,abejbbq,fgebhq,zrnqr,gvcgba,xhua,uvyyvneq,obavyyn,grnthr,thaa,terrajbbq,pbeern,errpr,cvarqn,cuvccf,serl,xnvfre,nzrf,thagre,fpuzvgg,zvyyvtna,rfcvabfn,objqra,ivpxref,ybjel,cevgpuneq,pbfgryyb,cvcre,zppyryyna,ybiryy,furruna,ungpu,qbofba,fvatu,wrssevrf,ubyyvatfjbegu,fberafra,zrmn,svax,qbaaryyl,oheeryy,gbzyvafba,pbyoreg,ovyyvatf,evgpuvr,urygba,fhgureynaq,crbcyrf,zpdhrra,gubznfba,tviraf,pebpxre,ibtry,ebovfba,qhaunz,pbxre,fjnegm,xrlf,ynqare,evpugre,unetebir,rqzbaqf,oenagyrl,nyoevtug,zheqbpx,obfjryy,zhyyre,dhvagreb,cnqtrgg,xraarl,qnyl,pbaabyyl,vazna,dhvagnan,yhaq,oneaneq,ivyyrtnf,fvzbaf,uhttvaf,gvqjryy,fnaqrefba,ohyyneq,zppyraqba,qhnegr,qencre,zneereb,qjlre,noenzf,fgbire,tbbqr,senfre,perjf,oreany,tbqjva,pbaxyva,zparny,onpn,rfcnemn,pebjqre,objre,oerjfgre,zparvyy,ebqevthrf,yrny,pbngrf,envarf,zppnva,zppbeq,zvare,ubyoebbx,fjvsg,qhxrf,pneyvfyr,nyqevqtr,npxrezna,fgnexf,evpxf,ubyyvqnl,sreevf,unvefgba,furssvryq,ynatr,sbhagnva,qbff,orggf,xncyna,pnezvpunry,oybbz,ehssva,craa,xrea,objyrf,fvmrzber,ynexva,qhcerr,frnyf,zrgpnys,uhgpuvfba,urayrl,snee,zppnhyrl,unaxvaf,thfgnsfba,pheena,jnqqryy,enzrl,pngrf,cbyybpx,phzzvaf,zrffre,uryyre,shax,pbeargg,cnynpvbf,tnyvaqb,pnab,ungunjnl,cunz,raevdhrm,fnytnqb,cryyrgvre,cnvagre,jvfrzna,oybhag,sryvpvnab,ubhfre,qburegl,zrnq,zptenj,fjna,pnccf,oynapb,oynpxzba,gubzfba,zpznahf,ohexrgg,tyrnfba,qvpxraf,pbezvre,ibff,ehfuvat,ebfraoret,uheq,qhznf,oravgrm,neryynab,zneva,pnhqvyy,oentt,wnenzvyyb,uhregn,tvcfba,pbyiva,ovttf,iryn,cyngg,pnffvql,gbzcxvaf,zppbyyhz,qbyna,qnyrl,pehzc,farrq,xvytber,tebir,tevzz,qnivfba,oehafba,cengre,znephz,qrivar,qbqtr,fgenggba,ebfnf,pubv,gevcc,yrqorggre,uvtugbjre,sryqzna,rccf,lrntre,cbfrl,fpehttf,pbcr,fghoof,evpurl,biregba,gebggre,fcenthr,pbeqreb,ohgpure,fgvyrf,ohetbf,jbbqfba,ubeare,onffrgg,chepryy,unfxvaf,nxvaf,mvrtyre,fcnhyqvat,unqyrl,tehoof,fhzare,zhevyyb,mninyn,fubbx,ybpxjbbq,qevfpbyy,qnuy,gubecr,erqzbaq,chganz,zpjvyyvnzf,zpenr,ebznab,wbvare,fnqyre,urqevpx,untre,untra,svgpu,pbhygre,gunpxre,znafsvryq,ynatfgba,thvqel,sreerven,pbeyrl,pbaa,ebffv,ynpxrl,onrm,fnram,zpanznen,zpzhyyra,zpxraan,zpqbabhtu,yvax,ratry,oebjar,ebcre,crnpbpx,rhonaxf,qehzzbaq,fgevatre,cevgpurgg,cneunz,zvzf,ynaqref,tenlfba,fpunsre,rtna,gvzzbaf,bunen,xrra,unzyva,svaa,pbegrf,zpanve,anqrnh,zbfryrl,zvpunhq,ebfra,bnxrf,xhegm,wrssref,pnyybjnl,orny,onhgvfgn,jvaa,fhttf,fgrea,fgncyrgba,ylyrf,ynveq,zbagnab,qnjxvaf,untna,tbyqzna,oelfba,onenwnf,ybirgg,frthen,zrgm,ybpxrgg,ynatsbeq,uvafba,rnfgzna,ubbxf,fznyyjbbq,funcveb,pebjryy,junyra,gevcyrgg,pungzna,nyqevpu,pnuvyy,lbhatoybbq,loneen,fgnyyvatf,furrgf,errqre,pbaaryyl,ongrzna,noreangul,jvaxyre,jvyxrf,znfgref,unpxrgg,tenatre,tvyyvf,fpuzvgm,fncc,ancvre,fbhmn,ynavre,tbzrf,jrve,bgreb,yrqsbeq,oheebhtuf,onopbpx,iraghen,fvrtry,qhtna,oyrqfbr,ngjbbq,jenl,ineare,fcnatyre,nanln,fgnyrl,xensg,sbheavre,orynatre,jbyss,gubear,olahz,ohearggr,oblxva,fjrafba,cheivf,cvan,xuna,qhinyy,qneol,kvbat,xnhsszna,urnyl,ratyr,orabvg,inyyr,fgrvare,fcvpre,funire,enaqyr,yhaql,puva,pnyireg,fgngba,arss,xrnearl,qneqra,bnxyrl,zrqrvebf,zppenpxra,perafunj,creqhr,qvyy,juvggnxre,gbova,jnfuohea,ubthr,tbbqevpu,rnfyrl,oenib,qraavfba,fuvcyrl,xreaf,wbetrafra,penva,ivyynybobf,znhere,ybatbevn,xrrar,pbba,jvgurefcbba,fgncyrf,crggvg,xvapnvq,rnfba,znqevq,rpubyf,yhfx,fgnuy,pheevr,gunlre,fuhygm,zpanyyl,frnl,znure,tntar,oneebj,anin,zberynaq,ubarlphgg,urnea,qvttf,pneba,juvggra,jrfgoebbx,fgbinyy,entynaq,zhafba,zrvre,ybbarl,xvzoyr,wbyyl,ubofba,tbqqneq,phyire,ohee,cerfyrl,arteba,pbaaryy,gbine,uhqqyrfgba,nfuol,fnygre,ebbg,craqyrgba,byrnel,avpxrefba,zlevpx,whqq,wnpbofra,onva,nqnve,fgnearf,zngbf,ohfol,ureaqba,unayrl,oryynzl,qbgl,onegyrl,lnmmvr,ebjryy,cnefba,tvssbeq,phyyra,puevfgvnafra,oranivqrf,oneauneg,gnyobg,zbpx,penaqnyy,pbaabef,obaqf,juvgg,tntr,oretzna,neerqbaqb,nqqvfba,yhwna,qbjql,wreavtna,uhlau,obhpuneq,qhggba,eubnqrf,bhryyrggr,xvfre,ureevatgba,uner,oynpxzna,onoo,nyyerq,ehqq,cnhyfba,btqra,xbravt,trvtre,ortnl,cneen,ynffvgre,unjx,rfcbfvgb,jnyqeba,enafbz,cengure,punpba,ivpx,fnaqf,ebnex,cnee,znloreel,terraoret,pbyrl,oehare,juvgzna,fxnttf,fuvczna,yrnel,uhggba,ebzb,zrqenab,ynqq,xehfr,nfxrj,fpuhym,nysneb,gnobe,zbue,tnyyb,orezhqrm,crerven,oyvff,ernirf,syvag,pbzre,jbbqnyy,andhva,thrinen,qrybat,pneevre,cvpxraf,gvyyrl,fpunssre,xahgfba,sragba,qbena,ibtg,inaa,cerfpbgg,zpynva,ynaqvf,pbepbena,mncngn,ulngg,urzcuvyy,snhyx,qbir,obhqernhk,nentba,juvgybpx,gerwb,gnpxrgg,furnere,fnyqnan,unaxf,zpxvaaba,xbruyre,obhetrbvf,xrlrf,tbbqfba,sbbgr,yhafsbeq,tbyqfzvgu,sybbq,jvafybj,fnzf,erntna,zppybhq,ubhtu,rfdhviry,anlybe,ybbzvf,pbebanqb,yhqjvt,oenfjryy,orneqra,uhnat,sntna,rmryy,rqzbaqfba,pebava,ahaa,yrzba,thvyybel,tevre,qhobfr,genlybe,elqre,qboovaf,pblyr,ncbagr,juvgzber,fznyyf,ebjna,znyybl,pneqban,oenkgba,obeqra,uhzcuevrf,pneenfpb,ehss,zrgmtre,uhagyrl,uvabwbfn,svaarl,znqfra,reafg,qbmvre,ohexuneg,objfre,crenygn,qnvtyr,juvggvatgba,fberafba,fnhprqb,ebpur,erqqvat,shtngr,ninybf,jnvgr,yvaq,uhfgba,unjgubear,unzol,oblyrf,obyrf,ertna,snhfg,pebbx,ornz,onetre,uvaqf,tnyyneqb,jvyybhtuol,jvyyvatunz,rpxreg,ohfpu,mrcrqn,jbeguvatgba,gvafyrl,ubss,unjyrl,pnezban,ineryn,erpgbe,arjpbzo,xvafrl,qhor,jungyrl,entfqnyr,oreafgrva,orpreen,lbfg,znggfba,sryqre,purrx,unaql,tebffzna,tnhguvre,rfpborqb,oenqra,orpxzna,zbgg,uvyyzna,synuregl,qlxrf,fgbpxgba,fgrneaf,ybsgba,pbngf,pninmbf,orniref,oneevbf,gnat,zbfure,pneqjryy,pbyrf,oheaunz,jryyre,yrzbaf,orror,nthvyren,cnearyy,unezna,pbhgher,nyyrl,fpuhznpure,erqq,qboof,oyhz,oynybpx,zrepunag,raavf,qrafba,pbggeryy,oenaaba,ontyrl,nivyrf,jngg,fbhfn,ebfraguny,ebbarl,qvrgm,oynax,cndhrggr,zppyryynaq,qhss,irynfpb,yragm,tehoo,oheebjf,oneobhe,hyevpu,fubpxyrl,enqre,orlre,zvkba,ynlgba,nygzna,jrnguref,fgbare,fdhverf,fuvcc,cevrfg,yvcfpbzo,phgyre,pnonyyreb,mvzzre,jvyyrgg,guhefgba,fgberl,zrqyrl,rccrefba,funu,zpzvyyvna,onttrgg,gbeerm,uvefpu,qrag,cbvevre,crnpurl,sneene,perrpu,onegu,gevzoyr,qhcer,nyoerpug,fnzcyr,ynjyre,pevfc,pbaebl,jrgmry,arfovgg,zheel,wnzrfba,jvyuryz,cnggra,zvagba,zngfba,xvzoebhtu,thvaa,pebsg,gbgu,chyyvnz,ahtrag,arjol,yvggyrwbua,qvnf,pnanyrf,oreavre,oneba,fvatyrgnel,eragrevn,cehrgg,zpuhtu,znoel,ynaqehz,oebjre,fgbqqneq,pntyr,fgwbua,fpnyrf,xbuyre,xryybtt,ubcfba,tnag,gunec,tnaa,mrvtyre,cevatyr,unzzbaf,snvepuvyq,qrngba,punivf,pnearf,ebjyrl,zngybpx,xrneaf,vevmneel,pneevatgba,fgnexrl,ybcrf,wneeryy,penira,onhz,yvggyrsvryq,yvaa,uhzcuerlf,rgurevqtr,phryyne,punfgnva,ohaql,fcrre,fxrygba,dhvebm,clyr,cbegvyyb,cbaqre,zbhygba,znpunqb,xvyyvna,uhgfba,uvgpupbpx,qbjyvat,pybhq,oheqvpx,fcnaa,crqrefra,yriva,yrttrgg,unljneq,qvrgevpu,ornhyvrh,onexfqnyr,jnxrsvryq,fabjqra,oevfpbr,objvr,orezna,btyr,zptertbe,ynhtuyva,uryz,oheqra,jurngyrl,fpuervore,cerffyrl,cneevf,nynavm,ntrr,fjnaa,fabqtenff,fpuhfgre,enqsbeq,zbax,znggvatyl,unec,tveneq,purarl,lnaprl,jntbare,evqyrl,ybzoneqb,uhqtvaf,tnfxvaf,qhpxjbegu,pbohea,jvyyrl,cenqb,arjoreel,zntnan,unzzbaqf,rynz,juvccyr,fynqr,frean,bwrqn,yvyrf,qbezna,qvruy,hcgba,erneqba,zvpunryf,tbrgm,ryyre,onhzna,onre,ynlar,uhzzry,oeraare,nznln,nqnzfba,bearynf,qbjryy,pybhgvre,pnfgryynabf,jryyzna,fnlybe,bebhexr,zbln,zbagnyib,xvycngevpx,qheova,furyy,byqunz,xnat,tneiva,sbff,oenaunz,onegubybzrj,grzcyrgba,znthver,ubygba,evqre,zbanuna,zppbeznpx,orngl,naqref,fgerrgre,avrgb,avryfba,zbssrgg,ynaxsbeq,xrngvat,urpx,tngyva,qryngbeer,pnyynjnl,nqpbpx,jbeeryy,hatre,ebovarggr,abjnx,wrgre,oehaare,fgrra,cneebgg,birefgerrg,aboyrf,zbagnarm,pyriratre,oevaxyrl,genuna,dhneyrf,cvpxrevat,crqrefba,wnafra,tenagunz,tvypuevfg,perfcb,nvxra,fpuryy,fpunrssre,yberam,yrlin,unezf,qlfba,jnyyvf,crnfr,yrnivgg,purat,pninanhtu,onggf,jneqra,frnzna,ebpxjryy,dhrmnqn,cnkgba,yvaqre,ubhpx,sbagnvar,qhenag,pnehfb,nqyre,cvzragry,zvmr,ylgyr,pyrnel,pnfba,npxre,fjvgmre,vfnnpf,uvttvaobgunz,jngrezna,inaqlxr,fgnzcre,fvfx,fuhyre,evqqvpx,zpznuna,yrirfdhr,unggba,oebafba,obyyvatre,neargg,bxrrsr,treore,tnaaba,sneafjbegu,onhtuzna,fvyirezna,fnggresvryq,zppenel,xbjnyfxv,tevtfol,terpb,pnoeny,gebhg,evaruneg,znuba,yvagba,tbbqra,pheyrl,onhtu,jlzna,jrvare,fpujno,fpuhyre,zbeevffrl,znuna,ohaa,guenfure,fcrne,jnttbare,dhnyyf,cheql,zpjubegre,znhyqva,tvyzna,creelzna,arjfbz,zraneq,znegvab,tens,ovyyvatfyrl,negvf,fvzcxvaf,fnyvfohel,dhvagnavyyn,tvyyvynaq,senyrl,sbhfg,pebhfr,fpneobebhtu,tevffbz,shygm,zneybj,znexunz,znqevtny,ynjgba,onesvryq,juvgvat,inearl,fpujnem,tbbpu,nepr,jurng,gehbat,cbhyva,uhegnqb,fryol,tnvgure,sbegare,phycrccre,pbhtuyva,oevafba,obhqernh,onyrf,fgrcc,ubyz,fpuvyyvat,zbeeryy,xnua,urngba,tnzrm,pnhfrl,ghecva,funaxf,fpuenqre,zrrx,vfbz,uneqvfba,pneenamn,lnarm,fpebttvaf,fpubsvryq,ehalba,engpyvss,zheeryy,zbryyre,veol,pheevre,ohggresvryq,enyfgba,chyyra,cvafba,rfgrc,pneobar,unjxf,ryyvatgba,pnfvyynf,fcheybpx,fvxrf,zbgyrl,zppnegarl,xehtre,vforyy,ubhyr,ohex,gbzyva,dhvtyrl,arhznaa,ybirynpr,sraaryy,purngunz,ohfgnznagr,fxvqzber,uvqnytb,sbezna,phyc,objraf,orgnapbheg,ndhvab,eboo,zvyare,znegry,terfunz,jvyrf,evpxrggf,qbjq,pbyynmb,obfgvp,oynxryl,fureebq,xralba,tnaql,roreg,qrybnpu,nyyneq,fnhre,ebovaf,byvinerf,tvyyrggr,purfgahg,obhedhr,cnvar,uvgr,unhfre,qriber,penjyrl,puncn,gnyoreg,cbvaqrkgre,zrnqbe,zpqhssvr,znggbk,xenhf,unexvaf,pubngr,jera,fyrqtr,fnaobea,xvaqre,trnel,pbeajryy,onepynl,noarl,frjneq,eubnqf,ubjynaq,sbegvre,oraare,ivarf,ghoof,gebhgzna,encc,zppheql,qryhpn,jrfgzberynaq,uniraf,thnwneqb,pynel,frny,zrruna,urembt,thvyyra,nfupensg,jnhtu,eraare,zvynz,ryebq,puhepuvyy,oernhk,obyva,nfure,jvaqunz,gvenqb,crzoregba,abyra,abynaq,xabgg,rzzbaf,pbeavfu,puevfgrafba,oebjayrr,oneorr,jnyqebc,cvgg,byiren,ybzoneqv,tehore,tnssarl,rttyrfgba,onaqn,nepuhyrgn,fybar,cerjvgg,csrvssre,arggyrf,zran,zpnqnzf,uraavat,tneqvare,pebzjryy,puvfubyz,oheyrfba,irfg,btyrfol,zppnegre,yhzcxva,jbssbeq,inaubea,gubea,grry,fjnssbeq,fgpynve,fgnasvryq,bpnzcb,ureeznaa,unaaba,nefranhyg,ebhfu,zpnyvfgre,uvngg,thaqrefba,sbeflgur,qhttna,qryinyyr,pvageba,jvyxf,jrvafgrva,hevor,evmmb,ablrf,zpyraqba,theyrl,orgurn,jvafgrnq,zncyrf,thlgba,tvbeqnab,nyqrezna,inyqrf,cbynapb,cnccnf,yviryl,tebtna,tevssvguf,obob,nerinyb,juvgfba,fbjryy,eraqba,sreanaqrf,sneebj,oranivqrm,nlerf,nyvprn,fghzc,fznyyrl,frvgm,fpuhygr,tvyyrl,tnyynag,pnasvryq,jbysbeq,bznyyrl,zpahgg,zpahygl,zptbirea,uneqzna,uneova,pbjneg,punineevn,oevax,orpxrgg,ontjryy,nezfgrnq,natyva,noerh,erlabfb,xerof,wrgg,ubssznaa,terrasvryq,sbegr,ohearl,oebbzr,fvffba,genzzryy,cnegevqtr,znpr,ybznk,yrzvrhk,tbffrgg,senagm,sbtyr,pbbarl,oebhtugba,crapr,cnhyfra,zhapl,zpneguhe,ubyyvaf,ornhpunzc,jvguref,bfbevb,zhyyvtna,ublyr,qbpxrel,pbpxeryy,ortyrl,nznqbe,ebol,envaf,yvaqdhvfg,tragvyr,rireuneg,obunaaba,jlyvr,fbzzref,chearyy,sbegva,qhaavat,oerrqra,invy,curyna,cuna,znek,pbfol,pbyohea,obyvat,ovqqyr,yrqrfzn,tnqqvf,qraarl,pubj,ohrab,oreevbf,jvpxre,gbyyvire,guvobqrnhk,antyr,ynibvr,svfx,pevfg,oneobfn,errql,ybpxyrne,xbyo,uvzrf,orueraf,orpxjvgu,jrrzf,jnuy,fubegre,funpxrysbeq,errf,zhfr,preqn,inynqrm,guvobqrnh,fnnirqen,evqtrjnl,ervgre,zpurael,znwbef,ynpunapr,xrngba,sreenen,pyrzraf,oybpxre,nccyrtngr,arrqunz,zbwvpn,xhlxraqnyy,unzry,rfpnzvyyn,qbhtugl,ohepurgg,nvafjbegu,ivqny,hcpuhepu,guvtcra,fgenhff,fcehvyy,fbjref,evttvaf,evpxre,zppbzof,uneybj,ohssvatgba,fbgryb,byvinf,artergr,zberl,znpba,ybtfqba,yncbvagr,ovtrybj,oryyb,jrfgsnyy,fghooyrsvryq,yvaqyrl,urva,unjrf,sneevatgba,oerra,ovepu,jvyqr,fgrrq,frchyirqn,ervauneqg,cebssvgg,zvagre,zrffvan,zpanoo,znvre,xrryre,tnzobn,qbabuhr,onfunz,fuvaa,pebbxf,pbgn,obeqref,ovyyf,onpuzna,gvfqnyr,gninerf,fpuzvq,cvpxneq,thyyrl,sbafrpn,qrybffnagbf,pbaqba,ongvfgn,jvpxf,jnqfjbegu,znegryy,yvggyrgba,vfba,unnt,sbyfbz,oehzsvryq,oeblyrf,oevgb,zveryrf,zpqbaaryy,yrpynve,unzoyva,tbhtu,snaavat,ovaqre,jvasvryq,juvgjbegu,fbevnab,cnyhzob,arjxvex,znathz,uhgpurefba,pbzfgbpx,pneyva,ornyy,onve,jraqg,jnggref,jnyyvat,chgzna,bgbbyr,zbeyrl,znerf,yrzhf,xrrare,uhaqyrl,qvny,qnzvpb,ovyyhcf,fgebgure,zpsneynar,ynzz,rnirf,pehgpure,pnenonyyb,pnagl,ngjryy,gnsg,fvyre,ehfg,enjyf,enjyvatf,cevrgb,zparryl,zpnsrr,uhyfrl,unpxarl,tnyirm,rfpnynagr,qryntnemn,pevqre,onaql,jvyonaxf,fgbjr,fgrvaoret,eraseb,znfgrefba,znffvr,ynaunz,unfxryy,unzevpx,qruneg,oheqrggr,oenafba,obhear,onova,nyrzna,jbegul,gvoof,fzbbg,fynpx,cnenqvf,zhyy,yhpr,ubhtugba,tnagg,shezna,qnaare,puevfgvnafba,ohetr,nfusbeq,neaqg,nyzrvqn,fgnyyjbegu,funqr,frnepl,fntre,abbana,zpyrzber,zpvagver,znkrl,ynivtar,wbor,sreere,snyx,pbssva,olearf,nenaqn,ncbqnpn,fgnzcf,ebhaqf,crrx,byzfgrnq,yrjnaqbjfxv,xnzvafxv,qhanjnl,oehaf,oenpxrgg,nzngb,ervpu,zppyhat,ynpebvk,xbbagm,ureevpx,uneqrfgl,synaqref,pbhfvaf,pngb,pnqr,ivpxrel,funax,antry,qhchvf,pebgrnh,pbggre,fghpxrl,fgvar,cbegresvryq,cnhyrl,zbssvgg,xahqfra,uneqjvpx,tbsbegu,qhcbag,oyhag,oneebjf,oneauvyy,fuhyy,enfu,ybsgvf,yrznl,xvgpuraf,ubeingu,teravre,shpuf,snveonaxf,phyoregfba,pnyxvaf,oheafvqr,ornggvr,nfujbegu,nyoregfba,jregm,inhtug,inyyrwb,ghex,ghpx,gvwrevan,fntr,crgrezna,zneebdhva,znee,ynagm,ubnat,qrznepb,pbar,orehor,onearggr,junegba,fgvaargg,fybphz,fpnayba,fnaqre,cvagb,znaphfb,yvzn,urnqyrl,rcfgrva,pbhagf,pynexfba,pneanuna,obera,negrntn,nqnzr,mbbx,juvggyr,juvgruhefg,jramry,fnkgba,erqqvpx,chragr,unaqyrl,unttregl,rneyrl,qriyva,punssva,pnql,nphan,fbynab,fvtyre,cbyynpx,craqretenff,bfgenaqre,wnarf,senapbvf,pehgpusvryq,punzoreyva,oehonxre,oncgvfgr,jvyyfba,ervf,arryrl,zhyyva,zrepvre,yven,ynlzna,xrryvat,uvtqba,rfcvany,puncva,jnesvryq,gbyrqb,chyvqb,crroyrf,antl,zbagnthr,zryyb,yrne,wnrtre,ubtt,tenss,shee,fbyvm,cbber,zraqraunyy,zpynheva,znrfgnf,tnoyr,oneenmn,gvyyrel,farnq,cbaq,arvyy,zpphyybpu,zppbexyr,yvtugsbbg,uhgpuvatf,ubyybzna,unearff,qbea,obpx,mvryvafxv,gheyrl,gernqjryy,fgcvreer,fgneyvat,fbzref,bfjnyq,zreevpx,rnfgreyvat,oviraf,gehvgg,cbfgba,cneel,bagvirebf,byvinerm,zbernh,zrqyva,yram,xabjygba,snveyrl,pboof,puvfbyz,onaavfgre,jbbqjbegu,gbyre,bpnfvb,abevrtn,arhzna,zblr,zvyohea,zppynanuna,yvyyrl,unarf,synaarel,qryyvatre,qnavryfba,pbagv,oybqtrgg,orref,jrnguresbeq,fgenva,xnee,uvgg,qraunz,phfgre,pboyr,pybhtu,pnfgrry,obyqhp,ongpurybe,nzzbaf,juvgybj,gvrearl,fgngra,fvoyrl,frvsreg,fpuhoreg,fnyprqb,znggvfba,ynarl,unttneq,tebbzf,qrrf,pebzre,pbbxf,pbyfba,pnfjryy,mnengr,fjvfure,fuva,entna,cevqtra,zpirl,zngural,ynsyrhe,senam,sreeneb,qhttre,juvgrfvqr,evtfol,zpzheenl,yruznaa,wnpbol,uvyqroenaq,uraqevpx,urnqevpx,tbnq,svapure,qehel,obetrf,nepuvonyq,nyoref,jbbqpbpx,gencc,fbnerf,frngba,zbafba,yhpxrgg,yvaqoret,xbcc,xrrgba,urnyrl,tneirl,tnqql,snva,ohepusvryq,jragjbegu,fgenaq,fgnpx,fcbbare,fnhpvre,evppv,cyhaxrgg,cnaaryy,arff,yrtre,servgnf,sbat,ryvmbaqb,qhiny,ornhqbva,heovan,evpxneq,cnegva,zpterj,zppyvagbpx,yrqbhk,sbeflgu,snvfba,qrievrf,oregenaq,jnffba,gvygba,fpneoebhtu,yrhat,veivar,tneore,qraavat,pbeeny,pbyyrl,pnfgyroreel,objyva,obtna,ornyr,onvarf,gevpr,enlohea,cnexvafba,aharf,zpzvyyra,yrnul,xvzzry,uvttf,shyzre,pneqra,orqsbeq,gnttneg,fcrnezna,cevpuneq,zbeevyy,xbbapr,urvam,urqtrf,thragure,tevpr,svaqyrl,qbire,pervtugba,obbgur,onlre,neerbyn,ivgnyr,inyyrf,enarl,bftbbq,unayba,oheyrl,obhaqf,jbeqra,jrngureyl,irggre,gnanxn,fgvygare,arinerm,zbfol,zbagreb,zrynapba,unegre,unzre,tboyr,tynqqra,tvfg,tvaa,nxva,mnentbmn,gneire,fnzzbaf,eblfgre,bervyyl,zhve,zberurnq,yhfgre,xvatfyrl,xryfb,tevfunz,tylaa,onhznaa,nyirf,lbhag,gnznlb,cngrefba,bngrf,zraraqrm,ybatb,unetvf,tvyyra,qrfnagvf,pbabire,oerrqybir,fhzcgre,fpurere,ehcc,ervpureg,urerqvn,perry,pbua,pyrzzbaf,pnfnf,ovpxsbeq,orygba,onpu,jvyyvsbeq,juvgpbzo,graanag,fhggre,fghyy,zppnyyhz,ynatybvf,xrry,xrrtna,qnatryb,qnapl,qnzeba,pyncc,pynagba,onaxfgba,byvirven,zvagm,zpvaavf,znegraf,znor,ynfgre,wbyyrl,uvyqergu,ursare,tynfre,qhpxrgg,qrzref,oebpxzna,oynvf,nypbea,ntarj,gbyvire,gvpr,frryrl,anwren,zhffre,zpsnyy,yncynagr,tnyiva,snwneqb,qbna,pblar,pbcyrl,pynjfba,purhat,onebar,jlaar,jbbqyrl,gerzoynl,fgbyy,fcneebj,fcnexzna,fpujrvgmre,fnffre,fnzcyrf,ebarl,yrtt,urvz,snevnf,pbyjryy,puevfgzna,oengpure,jvapurfgre,hcfunj,fbhgureynaq,fbeeryy,fryyf,zppybfxrl,znegvaqnyr,yhggeryy,ybiryrff,ybirwbl,yvanerf,yngvzre,rzoel,pbbzof,oenggba,obfgvpx,iranoyr,ghttyr,gbeb,fgnttf,fnaqyva,wrssrevrf,urpxzna,tevssvf,penlgba,pyrz,oebjqre,gubegba,fghetvyy,fcebhfr,eblre,ebhffrnh,evqrabhe,cbthr,crenyrf,crrcyrf,zrgmyre,zrfn,zpphgpurba,zporr,ubeafol,urssare,pbeevtna,nezvwb,cynagr,crlgba,cnerqrf,znpxyva,uhffrl,ubqtfba,tenanqbf,sevnf,orpary,onggra,nyznamn,ghearl,grny,fghetrba,zrrxre,zpqnavryf,yvzba,xrrarl,uhggb,ubythva,tbeunz,svfuzna,svreeb,oynapurggr,ebqevthr,erqql,bfohea,bqra,yrezn,xvexjbbq,xrrsre,unhtra,unzzrgg,punyzref,oevaxzna,onhztnegare,munat,inyrevb,gryyrm,fgrssra,fuhzngr,fnhyf,evcyrl,xrzcre,thssrl,riref,penqqbpx,pneinyub,oynlybpx,onahrybf,onyqrenf,jurngba,gheaohyy,fuhzna,cbvagre,zbfvre,zpphr,yvtba,xbmybjfxv,wbunafra,vatyr,uree,oevbarf,favcrf,evpxzna,cvcxva,cnagbwn,bebfpb,zbavm,ynjyrff,xhaxry,uvooneq,tnynemn,rabf,ohffrl,fpubgg,fnypvqb,creernhyg,zpqbhtny,zppbby,unvtug,tneevf,rnfgba,pbalref,nguregba,jvzoreyl,hgyrl,fcryyzna,fzvgufba,fyntyr,evgpurl,enaq,crgvg,bfhyyvina,bnxf,ahgg,zpinl,zppernel,znlurj,xabyy,wrjrgg,unejbbq,pneqbmn,nfur,neevntn,mryyre,jvegu,juvgzver,fgnhssre,ebhagerr,erqqra,zppnsserl,znegm,ynebfr,ynatqba,uhzrf,tnfxva,snore,qrivgb,pnff,nyzbaq,jvatsvryq,jvatngr,ivyynerny,glare,fzbguref,frirefba,erab,craaryy,znhcva,yrvtugba,wnaffra,unffryy,unyyzna,unypbzo,sbyfr,svgmfvzzbaf,snurl,penasbeq,obyra,onggyrf,onggntyvn,jbbyqevqtr,genfx,ebffre,ertnynqb,zprjra,xrrsr,shdhn,rpurineevn,pneb,oblagba,naqehf,ivren,inazrgre,gnore,fcenqyva,frvoreg,cebibfg,ceragvpr,byvcunag,yncbegr,ujnat,ungpurgg,unff,tervare,serrqzna,pbireg,puvygba,olnef,jvrfr,irartnf,fjnax,fuenqre,eboretr,zhyyvf,zbegrafra,zpphar,zneybjr,xvepuare,xrpx,vfnnpfba,ubfgrgyre,unyirefba,thagure,tevfjbyq,sraare,qheqra,oynpxjbbq,nueraf,fnjlref,fnibl,anobef,zpfjnva,znpxnl,yniraqre,ynfu,ynoor,wrffhc,shyyregba,pehfr,pevggraqra,pbeervn,pragrab,pnhqyr,pnanql,pnyyraqre,nynepba,nurea,jvaserl,gevooyr,fnyyrl,ebqra,zhftebir,zvaavpx,sbegraoreel,pneevba,ohagvat,ongvfgr,juvgrq,haqreuvyy,fgvyyjryy,enhpu,cvccva,creeva,zrffratre,znapvav,yvfgre,xvaneq,unegznaa,syrpx,jvyg,gernqjnl,gubeauvyy,fcnyqvat,enssregl,cvger,cngvab,beqbarm,yvaxbhf,xryyrure,ubzna,tnyoenvgu,srrarl,phegva,pbjneq,pnznevyyb,ohff,ohaaryy,obyg,orryre,nhgel,nypnyn,jvggr,jragm,fgvqunz,fuviryl,ahayrl,zrnpunz,znegvaf,yrzxr,yrsroier,ularf,ubebjvgm,ubccr,ubypbzor,qhaar,qree,pbpuenar,oevggnva,orqneq,ornhertneq,gbeerapr,fgehax,fbevn,fvzbafba,fuhznxre,fpbttvaf,bpbaare,zbevnegl,xhagm,virf,uhgpurfba,ubena,unyrf,tnezba,svggf,obua,ngpuvfba,jvfavrjfxv,inajvaxyr,fghez,fnyyrr,cebffre,zbra,yhaqoret,xham,xbuy,xrnar,wbetrafba,wnlarf,shaqreohex,serrq,qhee,pernzre,pbftebir,ongfba,inaubbfr,gubzfra,grrgre,fzlgu,erqzba,beryynan,znarff,ursyva,tbhyrg,sevpx,sbearl,ohaxre,nfohel,nthvne,gnyobgg,fbhguneq,zbjrel,zrnef,yrzzba,xevrtre,uvpxfba,ryfgba,qhbat,qrytnqvyyb,qnlgba,qnfvyin,pbanjnl,pngeba,oehgba,oenqohel,obeqryba,ovivaf,ovggare,oretfgebz,ornyf,noryy,juryna,grwnqn,chyyrl,cvab,abesyrrg,arnyl,znrf,ybcre,tngrjbbq,sevrefba,serhaq,svaartna,phcc,pbirl,pngnynab,obruz,onqre,lbba,jnyfgba,graarl,fvcrf,enjyvaf,zrqybpx,zppnfxvyy,zppnyyvfgre,znepbggr,znpyrna,uhturl,uraxr,unejryy,tynqarl,tvyfba,puvfz,pnfxrl,oenaqraohet,onlybe,ivyynfrabe,irny,gungpure,fgrtnyy,crgevr,abjyva,anineergr,ybzoneq,ybsgva,yrznfgre,xebyy,xbinpu,xvzoeryy,xvqjryy,urefuoretre,shypure,pnagjryy,ohfgbf,obynaq,oboovgg,ovaxyrl,jrfgre,jrvf,ireqva,gbat,gvyyre,fvfpb,funexrl,frlzber,ebfraonhz,ebue,dhvabarm,cvaxfgba,znyyrl,ybthr,yrffneq,yreare,yroeba,xenhff,xyvatre,unyfgrnq,unyyre,trgm,oheebj,nytre,fuberf,csrvsre,creeba,aryzf,zhaa,zpznfgre,zpxraarl,znaaf,xahqfba,uhgpuraf,uhfxrl,tbrory,syntt,phfuzna,pyvpx,pnfgryynab,pneqre,ohztneare,jnzcyre,fcvaxf,ebofba,arry,zperlabyqf,znguvnf,znnf,ybren,wrafba,syberm,pbbaf,ohpxvatunz,oebtna,oreelzna,jvyzbgu,jvyuvgr,guenfu,furcuneq,frvqry,fpuhymr,ebyqna,crggvf,boelna,znxv,znpxvr,ungyrl,senmre,svber,purffre,obggbzf,ovffba,orarsvryq,nyyzna,jvyxr,gehqrnh,gvzz,fuvssyrgg,zhaql,zvyyvxra,znlref,yrnxr,xbua,uhagvatgba,ubefyrl,ureznaa,threva,selre,sevmmryy,sberg,syrzzvat,svsr,pevfjryy,pneonwny,obmrzna,obvfireg,nathyb,jnyyra,gncc,fvyiref,enzfnl,bfurn,begn,zbyy,zpxrrire,zptrurr,yvaivyyr,xvrsre,xrgpuhz,ubjregba,tebpr,tnff,shfpb,pbeovgg,orgm,onegryf,nzneny,nvryyb,jrqqyr,fcreel,frvyre,ehalna,enyrl,bireol,bfgrra,byqf,zpxrbja,zngarl,ynhre,ynggvzber,uvaqzna,unegjryy,serqevpxfba,serqrevpxf,rfcvab,pyrtt,pnefjryy,pnzoryy,ohexubyqre,jbbqohel,jryxre,gbggra,gubeaohet,gurevnhyg,fgvgg,fgnzz,fgnpxubhfr,fpubyy,fnkba,evsr,enmb,dhvayna,cvaxregba,byvib,arfzvgu,anyy,znggbf,ynssregl,whfghf,tveba,trre,svryqre,qenlgba,qbegpu,pbaaref,pbatre,obngjevtug,ovyyvbg,oneqra,nezragn,gvoorggf,fgrnqzna,fynggrel,evanyqv,enlabe,cvapxarl,crggvterj,zvyar,znggrfba,unyfrl,tbafnyirf,sryybjf,qhenaq,qrfvzbar,pbjyrl,pbjyrf,oevyy,oneunz,oneryn,oneon,nfuzber,jvguebj,inyragv,grwrqn,fcevttf,fnler,fnyreab,crygvre,crry,zreevzna,zngurfba,ybjzna,yvaqfgebz,ulynaq,tvebhk,rneyf,qhtnf,qnoarl,pbyynqb,oevfrab,onkyrl,julgr,jratre,inabire,inaohera,guvry,fpuvaqyre,fpuvyyre,evtol,cbzrebl,cnffzber,zneoyr,znamb,znunssrl,yvaqtera,ynsynzzr,terngubhfr,svgr,pnynoerfr,onlar,lnznzbgb,jvpx,gbjarf,gunzrf,ervauneg,crryre,anenawb,zbagrm,zpqnqr,znfg,znexyrl,znepunaq,yrrcre,xryyhz,uhqtraf,uraarffrl,unqqra,tnvarl,pbccbyn,obeertb,obyyvat,ornar,nhyg,fyngba,cncr,ahyy,zhyxrl,yvtugare,ynatre,uvyyneq,rguevqtr,raevtug,qrebfn,onfxva,jrvaoret,ghezna,fbzreivyyr,cneqb,abyy,ynfuyrl,vatenunz,uvyyre,uraqba,tynmr,pbguena,pbbxfrl,pbagr,pneevpb,noare,jbbyrl,fjbcr,fhzzreyva,fghetvf,fgheqvinag,fgbgg,fchetrba,fcvyyzna,fcrvtug,ebhffry,cbcc,ahggre,zpxrba,znmmn,zntahfba,ynaavat,xbmnx,wnaxbjfxv,urljneq,sbefgre,pbejva,pnyyntuna,onlf,jbegunz,hfure,gurevbg,fnlref,fnob,cbyvat,ybln,yvrorezna,ynebpur,ynoryyr,ubjrf,unee,tnenl,sbtnegl,rirefba,qhexva,qbzvadhrm,punirf,punzoyvff,jvgpure,ivrven,inaqvire,greevyy,fgbxre,fpuervare,zbbezna,yvqqryy,ynjubea,xeht,vebaf,ulygba,ubyyraorpx,ureeva,urzoerr,tbbyfol,tbbqva,tvyzre,sbygm,qvaxvaf,qnhtugel,pnona,oevz,oevyrl,ovybqrnh,jlnag,iretnen,gnyyrag,fjrnevatra,fgebhc,fpevoare,dhvyyra,cvgzna,zppnagf,znksvryq,znegvafba,ubygm,sybheabl,oebbxvaf,oebql,onhztneqare,fgenho,fvyyf,eblony,ebhaqgerr,bfjnyg,zptevss,zpqbhtnyy,zppyrnel,znttneq,tentt,tbbqvat,tbqvarm,qbbyvggyr,qbangb,pbjryy,pnffryy,oenpxra,nccry,mnzoenab,erhgre,crern,anxnzhen,zbantuna,zvpxraf,zppyvagba,zppynel,zneyre,xvfu,whqxvaf,tvyoerngu,serrfr,synavtna,srygf,reqznaa,qbqqf,purj,oebjaryy,obngevtug,oneergb,fynlgba,fnaqoret,fnyqvine,crggjnl,bqhz,aneinrm,zbhygevr,zbagrznlbe,zreeryy,yrrf,xrlfre,ubxr,uneqnjnl,unaana,tvyoregfba,sbtt,qhzbag,qroreel,pbttvaf,ohkgba,ohpure,oebnqank,orrfba,nenhwb,nccyrgba,nzhaqfba,nthnlb,npxyrl,lbphz,jbefunz,fuviref,fnapurf,fnppb,eborl,eubqra,craqre,bpuf,zppheel,znqren,yhbat,xabggf,wnpxzna,urvaevpu,unetenir,tnhyg,pbzrnhk,puvgjbbq,pnenjnl,obrggpure,oreauneqg,oneevragbf,mvax,jvpxunz,juvgrzna,gubec,fgvyyzna,frggyrf,fpubbabire,ebdhr,evqqryy,cvypure,cuvsre,abibgal,znpyrbq,uneqrr,unnfr,tevqre,qbhprggr,pynhfra,orivaf,ornzba,onqvyyb,gbyyrl,gvaqnyy,fbhyr,fabbx,frnyr,cvaxarl,cryyrtevab,abjryy,arzrgu,zbaqentba,zpynar,yhaqtera,vatnyyf,uhqfcrgu,uvkfba,trneuneg,sheybat,qbjarf,qvooyr,qrlbhat,pbearwb,pnznen,oebbxfuver,oblrggr,jbypbgg,fheengg,fryynef,frtny,fnylre,errir,enhfpu,ynobagr,uneb,tbjre,serrynaq,snjprgg,rnqf,qevttref,qbayrl,pbyyrgg,oebzyrl,obngzna,onyyvatre,onyqevqtr,ibym,gebzoyrl,fgbatr,funanuna,evineq,eular,crqebmn,zngvnf,wnzvrfba,urqtrcrgu,unegargg,rfgrirm,rfxevqtr,qrazna,puvh,puvaa,pngyrgg,pneznpx,ohvr,orpugry,orneqfyrl,oneq,onyybh,hyzre,fxrra,eboyrqb,evapba,ervgm,cvnmmn,zhatre,zbgra,zpzvpunry,ybsghf,yrqrg,xrefrl,tebss,sbjyxrf,pehzcgba,pybhfr,orggvf,ivyyntbzrm,gvzzrezna,fgebz,fnagbeb,ebqql,craebq,zhffryzna,znpcurefba,yrobrhs,uneyrff,unqqnq,thvqb,tbyqvat,shyxrefba,snaava,qhynarl,qbjqryy,pbggyr,prwn,pngr,obfyrl,oratr,nyoevggba,ibvtg,gebjoevqtr,fbvyrnh,frryl,ebuqr,crnefnyy,cnhyx,begu,anfba,zbgn,zpzhyyva,znedhneqg,znqvtna,ubnt,tvyyhz,tnooneq,srajvpx,qnasbegu,phfuvat,perff,perrq,pnmnerf,orggrapbheg,oneevatre,onore,fgnaforeel,fpuenzz,ehggre,evireb,bdhraqb,arpnvfr,zbhgba,zbagrarteb,zvyrl,zptbhtu,zneen,znpzvyyna,ynzbagntar,wnffb,ubefg,urgevpx,urvyzna,tnlgna,tnyy,sbegarl,qvatyr,qrfwneqvaf,qnoof,oheonax,oevtunz,oerynaq,ornzna,neevbyn,lneobebhtu,jnyyva,gbfpnab,fgbjref,ervff,cvpuneqb,begba,zvpuryf,zpanzrr,zppebel,yrngurezna,xryy,xrvfgre,ubeavat,unetrgg,thnl,sreeb,qrobre,qntbfgvab,pnecre,oynaxf,ornhqel,gbjyr,gnsbln,fgevpxyva,fgenqre,fbcre,fbaavre,fvtzba,fpurax,fnqqyre,crqvtb,zraqrf,yhaa,ybue,ynue,xvatfohel,wnezna,uhzr,ubyyvzna,ubsznaa,unjbegu,uneeryfba,unzoevpx,syvpx,rqzhaqf,qnpbfgn,pebffzna,pbyfgba,puncyva,pneeryy,ohqq,jrvyre,jnvgf,inyragvab,genagunz,gnee,fbybevb,ebrohpx,cbjr,cynax,crgghf,cntnab,zvax,yhxre,yrnguref,wbfyva,unegmryy,tnzoeryy,prcrqn,pnegl,pnchgb,oerjvatgba,orqryy,onyyrj,nccyrjuvgr,jneabpx,jnym,heran,ghqbe,erry,cvtt,cnegba,zvpxryfba,zrnture,zpyryyna,zpphyyrl,znaqry,yrrpu,yninyyrr,xenrzre,xyvat,xvcc,xrubr,ubpufgrgyre,uneevzna,tertbver,tenobjfxv,tbffryva,tnzzba,snapure,rqraf,qrfnv,oenaana,nezraqnevm,jbbyfrl,juvgrubhfr,jurgfgbar,hffrel,gbjar,grfgn,gnyyzna,fghqre,fgenvg,fgrvazrgm,fbeeryyf,fnhprqn,ebysr,cnqqbpx,zvgpurz,zptvaa,zppern,ybingb,unmra,tvycva,tnlabe,svxr,qribr,qryevb,phevry,ohexuneqg,obqr,onpxhf,mvaa,jngnanor,jnpugre,inacryg,gheantr,funare,fpuebqre,fngb,evbeqna,dhvzol,cbegvf,angnyr,zpxbl,zppbja,xvyzre,ubgpuxvff,urffr,unyoreg,tjvaa,tbqfrl,qryvfyr,puevfzna,pnagre,neobtnfg,natryy,nperr,lnapl,jbbyyrl,jrffba,jrngurefcbba,genvabe,fgbpxzna,fcvyyre,fvcr,ebbxf,ernivf,cebcfg,cbeenf,arvyfba,zhyyraf,ybhpxf,yyrjryyla,xhzne,xbrfgre,xyvatrafzvgu,xvefpu,xrfgre,ubanxre,ubqfba,uraarffl,uryzvpx,tneevgl,tnevonl,qenva,pnfnerm,pnyyvf,obgryyb,nlpbpx,ninag,jvatneq,jnlzna,ghyyl,gurvfra,fmlznafxv,fgnafohel,frtbivn,envajngre,cerrpr,cvegyr,cnqeba,zvaprl,zpxryirl,zngurf,yneenorr,xbeartnl,xyht,vatrefbyy,urpug,treznva,rttref,qlxfgen,qrrevat,qrpbgrnh,qrnfba,qrnevat,pbsvryq,pneevtna,obaunz,onue,nhpbva,nccyrol,nyzbagr,lntre,jbzoyr,jvzzre,jrvzre,inaqrecbby,fgnapvy,fcevaxyr,ebzvar,erzvatgba,csnss,crpxunz,byviren,zrenm,znmr,ynguebc,xbrua,unmrygba,unyibefba,unyybpx,unqqbpx,qhpunezr,qrunira,pnehguref,oeruz,obfjbegu,obfg,ovnf,orrzna,onfvyr,onar,nvxraf,jbyq,jnygure,gnoo,fhore,fgenja,fgbpxre,fuverl,fpuybffre,evrqry,erzoreg,ervzre,clyrf,crryr,zreevjrngure,yrgbhearnh,ynggn,xvqqre,uvkba,uvyyvf,uvtug,ureofg,uraevdhrm,unltbbq,unzvyy,tnory,sevggf,rhonax,qnjrf,pbeeryy,ohfurl,ohpuubym,oebguregba,obggf,oneajryy,nhtre,ngpuyrl,jrfgcuny,irvyyrhk,hyybn,fghgmzna,fuevire,elnyf,cvyxvatgba,zblref,zneef,znatehz,znqqhk,ybpxneq,ynvat,xhuy,unearl,unzzbpx,unzyrgg,sryxre,qbree,qrcevrfg,pneenfdhvyyb,pnebguref,obtyr,ovfpubss,oretra,nyonarfr,jlpxbss,irezvyyvba,inafvpxyr,guvonhyg,grgernhyg,fgvpxarl,fubrznxr,ehttvreb,enjfba,enpvar,cuvycbg,cnfpuny,zpryunarl,znguvfba,yrtenaq,yncvreer,xjna,xerzre,wvyrf,uvyoreg,trlre,snvepybgu,ruyref,rtoreg,qrfebfvref,qnyelzcyr,pbggra,pnfuzna,pnqran,obneqzna,nypnenm,jlevpx,gureevra,gnaxrefyrl,fgevpxyre,chelrne,cybheqr,cnggvfba,cneqhr,zptvagl,zpribl,ynaqergu,xhuaf,xbba,urjrgg,tvqqraf,rzrevpx,rnqrf,qrnatryvf,pbfzr,pronyybf,oveqfbat,oraunz,orzvf,nezbhe,nathvnab,jryobea,gfbfvr,fgbezf,fubhc,frffbzf,fnznavrtb,ebbq,ebwb,euvaruneg,enol,abeguphgg,zlre,zhathvn,zberubhfr,zpqrivgg,znyyrgg,ybmnqn,yrzbvar,xhrua,unyyrgg,tevz,tvyyneq,tnlybe,tnezna,tnyynure,srnfgre,snevf,qneebj,qneqne,pbarl,pneerba,oenvgujnvgr,oblyna,oblrgg,ovkyre,ovtunz,orasbeq,oneentna,oneahz,mhore,jlpur,jrfgpbgg,ivavat,fgbygmshf,fvzbaqf,fuhcr,fnova,ehoyr,evggraubhfr,evpuzna,creebar,zhyubyynaq,zvyyna,ybzryv,xvgr,wrzvfba,uhyrgg,ubyyre,uvpxrefba,urebyq,unmryjbbq,tevssra,tnhfr,sbeqr,rvfraoret,qvyjbegu,puneeba,punvffba,oevfgbj,oerhavt,oenpr,obhgjryy,oragm,oryx,onlyrff,ongpuryqre,onena,onrmn,mvzzreznaa,jrngurefol,ibyx,gbbyr,gurvf,grqrfpb,frneyr,fpurapx,fnggrejuvgr,ehrynf,enaxvaf,cnegvqn,arfovg,zbery,zrapunpn,yrinffrhe,xnlybe,wbuafgbar,uhyfr,ubyyne,urefrl,uneevtna,uneovfba,thlre,tvfu,tvrfr,treynpu,tryyre,trvfyre,snypbar,ryjryy,qbhprg,qrrfr,qnee,pbeqre,punsva,olyre,ohffryy,oheqrgg,oenfure,objr,oryyvatre,onfgvna,oneare,nyyrlar,jvyobea,jrvy,jrtare,gngeb,fcvgmre,fzvguref,fpubra,erfraqrm,cnevfv,birezna,boevna,zhqq,znuyre,znttvb,yvaqare,ynybaqr,ynpnffr,ynobl,xvyyvba,xnuy,wrffra,wnzrefba,ubhx,urafunj,thfgva,tenore,qhefg,qhranf,qnirl,phaqvss,pbayba,pbyhatn,pbnxyrl,puvyrf,pncref,ohryy,oevpxre,ovffbaarggr,onegm,ontol,mnlnf,ibycr,gerrpr,gbbzof,gubz,greenmnf,fjvaarl,fxvyrf,fvyirven,fubhfr,fraa,enzntr,zbhn,ynatunz,xlyrf,ubyfgba,ubntynaq,ureq,sryyre,qravfba,pneenjnl,ohesbeq,ovpxry,nzoevm,norepebzovr,lnznqn,jrvqare,jnqqyr,ireqhmpb,guhezbaq,fjvaqyr,fpuebpx,fnanoevn,ebfraoretre,cebofg,crnobql,byvatre,anmnevb,zppnssregl,zpoebbz,zpnorr,znmhe,zngurear,zncrf,yrirergg,xvyyvatfjbegu,urvfyre,tevrtb,tbfaryy,senaxry,senaxr,sreenagr,sraa,rueyvpu,puevfgbcurefb,punffr,pngba,oeharyyr,oybbzsvryq,onoovgg,nmrirqb,noenzfba,noyrf,norlgn,lbhznaf,jbmavnx,jnvajevtug,fgbjryy,fzvgurezna,fnzhryfba,ehatr,ebguzna,ebfrasryq,crnxr,bjvatf,byzbf,zhaeb,zberven,yrngurejbbq,ynexvaf,xenagm,xbinpf,xvmre,xvaqerq,xnearf,wnssr,uhooryy,ubfrl,unhpx,tbbqryy,reqzna,qibenx,qbnar,phergba,pbsre,ohruyre,ovrezna,oreaqg,onagn,noqhyynu,jnejvpx,jnygm,ghepbggr,gbeerl,fgvgu,frtre,fnpuf,dhrfnqn,cvaqre,crccref,cnfphny,cnfpunyy,cnexuhefg,bmhan,bfgre,avpubyyf,yurherhk,yninyyrl,xvzhen,wnoybafxv,unha,tbheyrl,tvyyvtna,pebl,pbggb,pnetvyy,ohejryy,ohetrgg,ohpxzna,obbure,nqbeab,jeraa,juvggrzber,hevnf,fmnob,fnlyrf,fnvm,ehgynaq,enry,cunee,cryxrl,btenql,avpxryy,zhfvpx,zbngf,zngure,znffn,xvefpuare,xvrssre,xryyne,uraqrefubg,tbgg,tbqbl,tnqfba,shegnqb,svrqyre,refxvar,qhgpure,qrire,qnttrgg,purinyvre,oenxr,onyyrfgrebf,nzrefba,jvatb,jnyqba,gebgg,fvyirl,fubjref,fpuyrtry,evgm,crcva,crynlb,cnefyrl,cnyrezb,zbberurnq,zpunyr,yrgg,xbpure,xvyohea,vtyrfvnf,uhzoyr,uhyoreg,uhpxnol,unegsbeq,uneqvzna,thearl,tevtt,tenffb,tbvatf,svyyzber,sneore,qrcrj,qnaqern,pbjra,pbineehovnf,oheehf,oenpl,neqbva,gubzcxvaf,fgnaqyrl,enqpyvssr,cbuy,crefnhq,cneragrnh,cnoba,arjfba,arjubhfr,ancbyvgnab,zhypnul,znynir,xrvz,ubbgra,ureanaqrf,urssreana,urnear,terrayrns,tyvpx,shuezna,srggre,snevn,qvfuzna,qvpxrafba,pevgrf,pevff,pynccre,puranhyg,pnfgbe,pnfgb,ohtt,obir,obaarl,naqregba,nyytbbq,nyqrefba,jbbqzna,jneevpx,gbbzrl,gbbyrl,gneenag,fhzzreivyyr,fgroovaf,fbxby,frneyrf,fpuhgm,fpuhznaa,fpurre,erzvyyneq,encre,cebhyk,cnyzber,zbaebl,zrffvre,zryb,zrynafba,znfuohea,znamnab,yhffvre,wraxf,uharlphgg,unegjvt,tevzfyrl,shyx,svryqvat,svqyre,ratfgebz,ryqerq,qnagmyre,penaqryy,pnyqre,oehzyrl,oergba,oenaa,oenzyrgg,oblxvaf,ovnapb,onapebsg,nyznenm,nypnagne,juvgzre,juvgrare,jrygba,ivarlneq,enua,cndhva,zvmryy,zpzvyyva,zpxrna,znefgba,znpvry,yhaqdhvfg,yvttvaf,ynzcxva,xenam,xbfxv,xvexunz,wvzvarm,unmmneq,uneebq,tenmvnab,tenzzre,traqeba,tneevqb,sbequnz,ratyreg,qelqra,qrzbff,qryhan,penoo,pbzrnh,oehzzrgg,oyhzr,oranyyl,jrffry,inaohfxvex,gubefba,fghzcs,fgbpxjryy,ernzf,enqgxr,enpxyrl,crygba,avrzv,arjynaq,aryfra,zbeevffrggr,zvenzbagrf,zptvayrl,zppyhfxrl,znepunag,yhrinab,ynzcr,ynvy,wrsspbng,vasnagr,uvazna,tnban,rnql,qrfznenvf,qrpbfgn,qnafol,pvfpb,pubr,oerpxraevqtr,obfgjvpx,obet,ovnapuv,nyoregf,jvyxvr,jubegba,inetb,gnvg,fbhpl,fpuhzna,bhfyrl,zhzsbeq,yvccreg,yrngu,yniretar,ynyvoregr,xvexfrl,xraare,wbuafra,vmmb,uvyrf,thyyrgg,terrajryy,tnfcne,tnyoerngu,tnvgna,revpfba,qryncnm,pebbz,pbggvatunz,pyvsg,ohfuaryy,ovpr,ornfba,neebjbbq,jnevat,ibbeurrf,gehnk,fuerir,fubpxrl,fpungm,fnaqvsre,ehovab,ebmvre,ebfroreel,cvrcre,crqra,arfgre,anir,zhecurl,znyvabjfxv,znptertbe,ynsenapr,xhaxyr,xvexzna,uvcc,unfgl,unqqvk,treinvf,treqrf,tnznpur,sbhgf,svgmjngre,qvyyvatunz,qrzvat,qrnaqn,prqrab,pnaanql,ohefba,obhyqva,neprarnhk,jbbqubhfr,juvgsbeq,jrfpbgg,jrygl,jrvtry,gbetrefba,gbzf,fheore,fhaqreynaq,fgreare,frgmre,evbwnf,chzcuerl,chtn,zrggf,zptneel,zppnaqyrff,zntvyy,yhcb,ybirynaq,yynznf,yrpyrep,xbbaf,xnuyre,uhff,ubyoreg,urvagm,unhcg,tevzzrgg,tnfxvyy,ryyvatfba,qbee,qvatrff,qrjrrfr,qrfvyin,pebffyrl,pbeqrveb,pbairefr,pbaqr,pnyqren,pnveaf,ohezrvfgre,ohexunygre,oenjare,obgg,lbhatf,ivreen,inyynqnerf,fuehz,fuebcfuver,frivyyn,ehfx,ebqnegr,crqenmn,avab,zrevab,zpzvaa,znexyr,zncc,ynwbvr,xbreare,xvggeryy,xngb,ulqre,ubyyvsvryq,urvfre,unmyrgg,terrajnyq,snag,ryqerqtr,qerure,qrynshragr,peniraf,pynlcbby,orrpure,nebafba,nynavf,jbegura,jbwpvx,jvatre,juvgnper,inyireqr,inyqvivn,gebhcr,guebjre,fjvaqryy,fhggyrf,fgebzna,fcverf,fyngr,furnyl,fneire,fnegva,fnqbjfxv,ebaqrnh,ebyba,enfpba,cevqql,cnhyvab,abygr,zhaebr,zbyybl,zpvire,ylxvaf,ybttvaf,yrabve,xybgm,xrzcs,uhcc,ubyybjryy,ubyynaqre,unlavr,unexarff,unexre,tbggyvro,sevgu,rqqvaf,qevfxryy,qbttrgg,qrafzber,punerggr,pnffnql,olehz,ohepunz,ohttf,oraa,juvggrq,jneevatgba,inaqhfra,invyynapbheg,fgrtre,fvroreg,fpbsvryq,dhvex,chefre,cyhzo,bephgg,abeqfgebz,zbfryl,zvpunyfxv,zpcunvy,zpqnivq,zppenj,znepurfr,znaavab,yrsrier,ynetrag,ynamn,xerff,vfunz,uhafnxre,ubpu,uvyqroenaqg,thnevab,tevwnyin,tenlovyy,svpx,rjryy,rjnyq,phfvpx,pehzyrl,pbfgba,pngupneg,pneehguref,ohyyvatgba,objrf,oynva,oynpxsbeq,oneobmn,lvatyvat,jreg,jrvynaq,inetn,fvyirefgrva,fvriref,fuhfgre,fuhzjnl,ehaaryf,ehzfrl,erasebr,cebirapure,cbyyrl,zbuyre,zvqqyroebbxf,xhgm,xbfgre,tebgu,tyvqqra,snmvb,qrra,puvczna,purabjrgu,punzcyva,prqvyyb,pneereb,pnezbql,ohpxyrf,oevra,obhgva,obfpu,orexbjvgm,nygnzvenab,jvysbat,jvrtnaq,jnvgrf,gehrfqnyr,gbhffnvag,gborl,grqqre,fgrryzna,fvebvf,fpuaryy,ebovpunhq,evpuohet,cyhzyrl,cvmneeb,cvrepl,begrtb,boret,arnpr,zregm,zparj,znggn,yncc,ynve,xvoyre,ubjyrgg,ubyyvfgre,ubsre,unggra,untyre,snytbhfg,ratryuneqg,roreyr,qbzoebjfxv,qvafzber,qnlr,pnfnerf,oenhq,onypu,nhgerl,jraqry,glaqnyy,fgebory,fgbygm,fcvaryyv,freengb,erore,enguobar,cnybzvab,avpxryf,znlyr,znguref,znpu,ybrssyre,yvggeryy,yrivafba,yrbat,yrzver,yrwrhar,ynmb,ynfyrl,xbyyre,xraaneq,ubryfpure,uvagm,untrezna,ternirf,sber,rhql,ratyre,pbeenyrf,pbeqrf,oeharg,ovqjryy,oraarg,gleeryy,gunecr,fjvagba,fgevoyvat,fbhgujbegu,fvfarebf,fnibvr,fnzbaf,ehinypnon,evrf,enzre,bznen,zbfdhrqn,zvyyne,zpcrnx,znpbzore,yhpxrl,yvggba,yrue,yniva,uhoof,ubneq,uvoof,untnaf,shgeryy,rkhz,rirafba,phyyre,pneonhtu,pnyyra,oenfurne,oybbzre,oynxrarl,ovtyre,nqqvatgba,jbbqsbeq,haehu,gbyragvab,fhzenyy,fgtreznva,fzbpx,furere,enlare,cbbyre,bdhvaa,areb,zptybguyva,yvaqra,xbjny,xreevtna,voenuvz,uneiryy,unaenuna,tbbqnyy,trvfg,shffryy,shat,srerorr,ryrl,rttreg,qbefrgg,qvatzna,qrfgrsnab,pbyhppv,pyrzzre,ohearyy,oehzonhtu,obqqvr,oreeluvyy,niryne,nypnagnen,jvaqre,jvapuryy,inaqraoret,gebgzna,guheore,guvornhyg,fgybhvf,fgvyjryy,fcreyvat,fungghpx,fnezvragb,ehccreg,ehzcu,eranhq,enaqnmmb,enqrznpure,dhvyrf,crnezna,cnybzb,zrephevb,ybjerl,yvaqrzna,ynjybe,ynebfn,ynaqre,ynoerpdhr,ubivf,ubyvsvryq,uraavatre,unjxrf,unegsvryq,unaa,unthr,trabirfr,tneevpx,shqtr,sevax,rqqvatf,qvau,pevoof,pnyivyyb,ohagba,oebqrhe,obyqvat,oynaqvat,ntbfgb,mnua,jvrare,gehffryy,gryyb,grvkrven,fcrpx,funezn,funaxyva,frnyl,fpnayna,fnagnznevn,ebhaql,ebovpunhk,evatre,evtarl,ceribfg,cbyfba,abeq,zbkyrl,zrqsbeq,zppnfyva,zpneqyr,znpneguhe,yrjva,ynfure,xrgpunz,xrvfre,urvar,unpxjbegu,tebfr,tevmmyr,tvyyzna,tnegare,senmrr,syrhel,rqfba,rqzbafba,qreel,pebax,pbanag,oheerff,ohetva,oebbz,oebpxvatgba,obyvpx,obtre,ovepusvryq,ovyyvatgba,onvyl,onuran,nezoehfgre,nafba,lbub,jvypure,gvaarl,gvzoreynxr,guvryra,fhgcuva,fghygm,fvxben,freen,fpuhyzna,fpurssyre,fnagvyyna,ertb,cerpvnqb,cvaxunz,zvpxyr,ybznf,yvmbggr,yrag,xryyrezna,xrvy,wbunafba,ureanqrm,unegfsvryq,unore,tbefxv,snexnf,roreuneqg,qhdhrggr,qrynab,pebccre,pbmneg,pbpxreunz,punzoyrr,pnegntran,pnubba,ohmmryy,oevfgre,oerjgba,oynpxfurne,orasvryq,nfgba,nfuohea,neehqn,jrgzber,jrvfr,inppneb,ghppv,fhqqhgu,fgebzoret,fgbbcf,fubjnygre,furnef,ehavba,ebjqra,ebfraoyhz,evssyr,erasebj,crerf,boelnag,yrsgjvpu,ynex,ynaqrebf,xvfgyre,xvyybhtu,xreyrl,xnfgare,ubttneq,uneghat,thregva,tbina,tngyvat,tnvyrl,shyyzre,shysbeq,syngg,rfdhvory,raqvpbgg,rqzvfgba,rqryfgrva,qhserfar,qerffyre,qvpxzna,purr,ohffr,obaargg,oreneq,lbfuvqn,iryneqr,irnpu,inaubhgra,inpuba,gbyfba,gbyzna,graalfba,fgvgrf,fbyre,fuhgg,ehttyrf,eubar,crthrf,arrfr,zheb,zbapevrs,zrssbeq,zpcurr,zpzbeevf,zprnpurea,zppyhet,znafbhe,znqre,yrvwn,yrpbzcgr,ynsbhagnva,ynoevr,wndhrm,urnyq,unfu,unegyr,tnvare,sevfol,snevan,rvqfba,rqtregba,qlxr,qheergg,qhuba,phbzb,pbobf,preinagrm,olorr,oebpxjnl,obebjfxv,ovavba,orrel,nethryyb,nzneb,npgba,lhra,jvagba,jvtsnyy,jrrxyrl,ivqevar,inaabl,gneqvss,fubbc,fuvyyvat,fpuvpx,fnssbeq,ceraqretnfg,cvytevz,cryyreva,bfhan,avffra,anyyrl,zbyyre,zrffare,zrffvpx,zreevsvryq,zpthvaarff,zngureyl,znepnab,znubar,yrzbf,yroeha,wnen,ubssre,ureera,urpxre,unjf,unht,tjva,tbore,tvyyvneq,serqrggr,sniryn,rpurireevn,qbjare,qbabsevb,qrfebpuref,pebmvre,pbefba,orpugbyq,nethrgn,ncnevpvb,mnzhqvb,jrfgbire,jrfgrezna,hggre,geblre,guvrf,gncyrl,fyniva,fuvex,fnaqyre,ebbc,evzzre,enlzre,enqpyvss,bggra,zbbere,zvyyrg,zpxvoora,zpphgpura,zpnibl,zpnqbb,znlbetn,znfgva,znegvarnh,znerx,znqber,yrsyber,xebrtre,xraaba,wvzrefba,ubfgrggre,ubeaonpx,uraqyrl,unapr,thneqnqb,tenanqb,tbjra,tbbqnyr,syvaa,syrrgjbbq,svgm,qhexrr,qhcerl,qvcvrgeb,qvyyrl,pylohea,oenjyrl,orpxyrl,nenan,jrngureol,ibyyzre,irfgny,ghaaryy,gevtt,gvatyr,gnxnunfuv,fjrngg,fgbere,fancc,fuvire,ebbxre,enguoha,cbvffba,creevar,creev,cnezre,cnexr,cner,cncn,cnyzvrev,zvqxvss,zrpunz,zppbznf,zpnycvar,ybirynql,yvyyneq,ynyyl,xabcc,xvyr,xvtre,unvyr,thcgn,tbyqforeel,tvyerngu,shyxf,sevrfra,senamra,synpx,svaqynl,sreynaq,qerlre,qber,qraaneq,qrpxneq,qrobfr,pevz,pbhybzor,punaprl,pnagbe,oenagba,ovffryy,oneaf,jbbyneq,jvgunz,jnffrezna,fcvrtry,fubssare,fpubym,ehpu,ebffzna,crgel,cnynpvb,cnrm,arnel,zbegrafba,zvyyfnc,zvryr,zraxr,zpxvz,zpnanyyl,znegvarf,yrzyrl,ynebpuryyr,xynhf,xyngg,xnhsznaa,xncc,uryzre,urqtr,unyybena,tyvffba,serpurggr,sbagnan,rntna,qvfgrsnab,qnayrl,perrxzber,punegvre,punssrr,pnevyyb,ohet,obyvatre,orexyrl,oram,onffb,onfu,mrynln,jbbqevat,jvgxbjfxv,jvyzbg,jvyxraf,jvrynaq,ireqhtb,hedhuneg,gfnv,gvzzf,fjvtre,fjnvz,fhffzna,cverf,zbyane,zpngrr,ybjqre,ybbf,yvaxre,ynaqrf,xvatrel,uhssbeq,uvtn,uraqera,unzznpx,unznaa,tvyynz,treuneqg,rqryzna,qryx,qrnaf,phey,pbafgnagvar,pyrnire,pynne,pnfvnab,pneehgu,pneylyr,oebcul,obynabf,ovoof,orffrggr,orttf,onhture,onegry,nirevyy,naqerfra,nzva,nqnzrf,inyragr,gheaobj,fjvax,fhoyrgg,fgebu,fgevatsryybj,evqtjnl,chtyvrfr,cbgrng,buner,arhonhre,zhepuvfba,zvatb,yrzzbaf,xjba,xryynz,xrna,wnezba,ulqra,uhqnx,ubyyvatre,uraxry,urzvatjnl,unffba,unafry,unygre,unver,tvaforet,tvyyvfcvr,sbtry,sybel,rggre,ryyrqtr,rpxzna,qrnf,pheeva,pensgba,pbbzre,pbygre,pynkgba,ohygre,oenqqbpx,objlre,ovaaf,oryybjf,onfxreivyyr,oneebf,nafyrl,jbbys,jvtug,jnyqzna,jnqyrl,ghyy,gehyy,grfpu,fgbhssre,fgnqyre,fynl,fuhoreg,frqvyyb,fnagnpehm,ervaxr,cblagre,arev,arnyr,zbjel,zbenyrm,zbatre,zvgpuhz,zreelzna,znavba,znpqbhtnyy,yvgpusvryq,yrivgg,yrcntr,ynfnyyr,xubhel,xninantu,xneaf,vivr,uhroare,ubqtxvaf,unycva,tnevpn,rirefbyr,qhgen,qhantna,qhssrl,qvyyzna,qvyyvba,qrivyyr,qrneobea,qnzngb,pbhefba,pbhyfba,oheqvar,obhfdhrg,obava,ovfu,ngrapvb,jrfgoebbxf,jntrf,inpn,gbare,gvyyvf,fjrgg,fgehoyr,fgnasvyy,fbybemnab,fyhfure,fvccyr,fvyinf,fuhygf,fpurkanlqre,fnrm,ebqnf,entre,chyire,cragba,cnavnthn,zrarfrf,zpsneyva,zpnhyrl,zngm,znybl,zntehqre,ybuzna,ynaqn,ynpbzor,wnvzrf,ubymre,ubyfg,urvy,unpxyre,tehaql,tvyxrl,sneaunz,qhesrr,qhagba,qhafgba,qhqn,qrjf,penire,pbeevirnh,pbajryy,pbyryyn,punzoyrff,oerzre,obhggr,obhenffn,oynvfqryy,onpxzna,onovarnhk,nhqrggr,nyyrzna,gbjare,gnirenf,gnenatb,fhyyvaf,fhvgre,fgnyyneq,fbyoret,fpuyhrgre,cbhybf,cvzragny,bjfyrl,bxryyrl,zbssngg,zrgpnysr,zrrxvaf,zrqryyva,zptylaa,zppbjna,zneevbgg,znenoyr,yraabk,ynzbherhk,xbff,xreol,xnec,vfraoret,ubjmr,ubpxraoreel,uvtufzvgu,unyyznex,thfzna,terryrl,tvqqvatf,tnhqrg,tnyyhc,syrrabe,rvpure,rqvatgba,qvznttvb,qrzrag,qrzryyb,qrpnfgeb,ohfuzna,oehaqntr,oebbxre,obhet,oynpxfgbpx,oretznaa,orngba,onavfgre,netb,nccyvat,jbegzna,jnggrefba,ivyynycnaqb,gvyybgfba,gvtur,fhaqoret,fgreaoret,fgnzrl,fuvcr,frrtre,fpneoreel,fnggyre,fnva,ebgufgrva,cbgrrg,cybjzna,crggvsbeq,craynaq,cnegnva,cnaxrl,blyre,btyrgerr,btohea,zbgba,zrexry,yhpvre,ynxrl,xengm,xvafre,xrefunj,wbfrcufba,vzubss,uraqel,unzzba,sevfovr,senjyrl,sentn,sberfgre,rfxrj,rzzreg,qeraana,qblba,qnaqevqtr,pnjyrl,pneinwny,oenprl,oryvfyr,ongrl,nuare,jlfbpxv,jrvfre,iryvm,gvapure,fnafbar,fnaxrl,fnaqfgebz,ebuere,evfare,cevqrzber,csrssre,crefvatre,crrel,bhoer,abjvpxv,zhftenir,zheqbpu,zhyyvank,zppnel,znguvrh,yviratbbq,xlfre,xyvax,xvzrf,xryyare,xninanhtu,xnfgra,vzrf,ubrl,uvafunj,unxr,thehyr,tehor,tevyyb,trgre,tnggb,tneire,tneergfba,snejryy,rvynaq,qhasbeq,qrpneyb,pbefb,pbyzna,pbyyneq,pyrtubea,punfgrra,pniraqre,pneyvyr,pnyib,olreyl,oebtqba,oebnqjngre,oernhyg,obab,oretva,orue,onyyratre,nzvpx,gnzrm,fgvssyre,fgrvaxr,fvzzba,funaxyr,fpunyyre,fnyzbaf,fnpxrgg,fnnq,evqrbhg,engpyvssr,enafba,cynfprapvn,crggrefba,byfmrjfxv,byarl,bythva,avyffba,ariryf,zberyyv,zbagvry,zbatr,zvpunryfba,zregraf,zppurfarl,zpnycva,zngurjfba,ybhqrezvyx,yvaroreel,yvttrgg,xvaynj,xvtug,wbfg,urersbeq,uneqrzna,unycrea,unyyvqnl,unsre,tnhy,sevry,servgnt,sbeforet,rinatryvfgn,qbrevat,qvpneyb,qraql,qryc,qrthmzna,qnzreba,phegvff,pbfcre,pnhgura,oenqoreel,obhgba,obaaryy,ovkol,ovrore,orirevqtr,orqjryy,oneubefg,onaaba,onygnmne,onvre,nlbggr,nggnjnl,neranf,noertb,ghetrba,ghafgnyy,gunkgba,grabevb,fgbggf,fguvynver,furqq,frnobyg,fpnys,fnylref,ehuy,ebjyrgg,ebovargg,csvfgre,creyzna,crcr,cnexzna,ahaanyyl,abeiryy,anccre,zbqyva,zpxryyne,zppyrna,znfpneranf,yrvobjvgm,yrqrmzn,xhuyzna,xbonlnfuv,uhayrl,ubyzdhvfg,uvaxyrl,unmneq,unegfryy,tevooyr,teniryl,svsvryq,ryvnfba,qbnx,pebffynaq,pneyrgba,oevqtrzna,obwbedhrm,obttrff,nhgra,jbbfyrl,juvgryrl,jrkyre,gjbzrl,ghyyvf,gbjayrl,fgnaqevqtr,fnagblb,ehrqn,evraqrnh,eriryy,cyrff,bggvatre,avteb,avpxyrf,zhyirl,zrarsrr,zpfunar,zpybhtuyva,zpxvamvr,znexrl,ybpxevqtr,yvcfrl,xavfyrl,xarccre,xvggf,xvry,wvaxf,ungupbpx,tbqva,tnyyrtb,svxrf,srpgrnh,rfgnoebbx,ryyvatre,qhaybc,qhqrx,pbhagelzna,punhiva,pungunz,ohyyvaf,oebjasvryq,obhtugba,oybbqjbegu,ovoo,onhpbz,oneovrev,nhova,nezvgntr,nyrffv,nofure,noongr,mvgb,jbbyrel,jvttf,jnpxre,glarf,gbyyr,gryyrf,gnegre,fjnerl,fgebqr,fgbpxqnyr,fgnyanxre,fcvan,fpuvss,fnnev,evfyrl,enzrevm,enxrf,crggnjnl,craare,cnhyhf,cnyynqvab,bzrnen,zbagrybatb,zryavpx,zrugn,zptnel,zppbheg,zppbyybhtu,znepurggv,znamnanerf,ybjgure,yrvin,ynhqreqnyr,ynsbagnvar,xbjnypmlx,xavtugba,wbhoreg,wnjbefxv,uhgu,uheqyr,ubhfyrl,unpxzna,thyvpx,tbeql,tvyfgenc,truexr,trouneg,tnhqrggr,sbkjbegu,raqerf,qhaxyr,pvzvab,pnqqryy,oenhre,oenyrl,obqvar,oynpxzber,oryqra,onpxre,nlre,naqerff,jvfare,ihbat,inyyvrer,gjvtt,gninerm,fgenuna,fgrvo,fgnho,fbjqre,frvore,fpuhgg,fpunes,fpunqr,ebqevdhrf,evfvatre,erafunj,enuzna,cerfaryy,cvngg,avrzna,arivaf,zpvyjnva,zptnun,zpphyyl,zppbzo,znffratnyr,znprqb,yrfure,xrnefr,wnherthv,uhfgrq,uhqanyy,ubyzoret,uregry,uneqvr,tyvqrjryy,senhfgb,snffrgg,qnyrffnaqeb,qnuytera,pbehz,pbafgnagvab,pbayva,pbydhvgg,pbybzob,pynlpbzo,pneqva,ohyyre,obarl,obpnarten,ovttref,orarqrggb,nenvmn,naqvab,nyova,mbea,jregu,jrvfzna,jnyyrl,inartnf,hyvoneev,gbjr,grqsbeq,grnfyrl,fhggyr,fgrssraf,fgple,fdhver,fvatyrl,fvshragrf,fuhpx,fpuenz,fnff,evrtre,evqraubhe,evpxreg,evpurefba,enlobea,enor,enno,craqyrl,cnfgber,beqjnl,zblavuna,zryybgg,zpxvffvpx,zptnaa,zppernql,znharl,zneehsb,yrauneg,ynmne,ynsnir,xrryr,xnhgm,wneqvar,wnuaxr,wnpbob,ubeq,uneqpnfgyr,untrzna,tvtyvb,truevat,sbegfba,qhdhr,qhcyrffvf,qvpxra,qrebfvre,qrvgm,qnyrffvb,penz,pnfgyrzna,pnaqrynevb,pnyyvfba,pnprerf,obmnegu,ovyrf,orwnenab,onfunj,nivan,nezragebhg,nyirerm,npbeq,jngreubhfr,irerra,inaynaqvatunz,fgenjfre,fubgjryy,frirenapr,frygmre,fpubbaznxre,fpubpx,fpunho,fpunssare,ebrqre,ebqevtrm,evssr,enforeel,enapbheg,envyrl,dhnqr,chefyrl,cebhgl,creqbzb,bkyrl,bfgrezna,avpxraf,zhecuerr,zbhagf,zrevqn,znhf,znggrea,znffr,znegvaryyv,znatna,yhgrf,yhqjvpx,ybarl,ynhernab,ynfngre,xavtugra,xvffvatre,xvzfrl,xrffvatre,ubarn,ubyyvatfurnq,ubpxrgg,urlre,ureba,theebyn,tbir,tynffpbpx,tvyyrgg,tnyna,srngurefgbar,rpxuneqg,qheba,qhafba,qnfure,phyoergu,pbjqra,pbjnaf,pynlcbbyr,puhepujryy,punobg,pnivarff,pngre,pnfgba,pnyyna,olvatgba,ohexrl,obqra,orpxsbeq,ngjngre,nepunzonhyg,nyirl,nyfhc,juvfranag,jrrfr,iblyrf,ireerg,gfnat,grffvre,fjrvgmre,furejva,funhtuarffl,erivf,erzl,cevar,cuvycbgg,crnil,cnlagre,cnezragre,binyyr,bsshgg,avtugvatnyr,arjyva,anxnab,zlngg,zhgu,zbuna,zpzvyyba,zppneyrl,zppnyro,znkfba,znevaryyv,znyrl,yvfgba,yrgraqer,xnva,uhagfzna,uvefg,untregl,thyyrqtr,terrajnl,tenwrqn,tbegba,tbvarf,tvggraf,serqrevpxfba,snaryyv,rzoerr,rvpuryoretre,qhaxva,qvkfba,qvyybj,qrsryvpr,puhzyrl,oheyrvtu,obexbjfxv,ovarggr,ovttrefgnss,oretyhaq,oryyre,nhqrg,neohpxyr,nyynva,nysnab,lbhatzna,jvggzna,jrvagenho,inamnag,inqra,gjvggl,fgbyyvatf,fgnaqvsre,fvarf,fubcr,fpnyvfr,fnivyyr,cbfnqn,cvfnab,bggr,abynfpb,zvre,zrexyr,zraqvbyn,zrypure,zrwvnf,zpzheel,zppnyyn,znexbjvgm,znavf,znyyrggr,znpsneynar,ybhtu,ybbcre,ynaqva,xvggyr,xvafryyn,xvaaneq,uboneg,uryzna,uryyzna,unegfbpx,unysbeq,untr,tbeqna,tynffre,tnlgba,tnggvf,tnfgryhz,tnfcneq,sevfpu,svgmuhtu,rpxfgrva,roreyl,qbjqra,qrfcnva,pehzcyre,pebggl,pbearyvfba,pubhvaneq,punzarff,pngyva,pnaa,ohztneqare,ohqqr,oenahz,oenqsvryq,oenqql,obefg,oveqjryy,onmna,onanf,onqr,nenatb,nurnea,nqqvf,mhzjnyg,jhegu,jvyx,jvqrare,jntfgnss,heehgvn,grejvyyvtre,gneg,fgrvazna,fgnngf,fybng,evirf,evttyr,eriryf,ervpuneq,cevpxrgg,cbss,cvgmre,crgeb,cryy,abeguehc,avpxf,zbyvar,zvryxr,znlabe,znyyba,zntarff,yvatyr,yvaqryy,yvro,yrfxb,yrornh,ynzzref,ynsbaq,xvreana,xrgeba,whenqb,ubyztera,uvyohea,unlnfuv,unfuvzbgb,uneonhtu,thvyybg,tneq,sebruyvpu,srvaoret,snypb,qhsbhe,qerrf,qbarl,qvrc,qrynb,qnirf,qnvy,pebjfba,pbff,pbatqba,pneare,pnzneran,ohggrejbegu,oheyvatnzr,obhssneq,oybpu,ovylrh,onegn,onxxr,onvyynetrba,nirag,ndhvyne,mrevathr,lneore,jbysfba,ibtyre,ibryxre,gehff,gebkryy,guevsg,fgebhfr,fcvryzna,fvfgehax,frivtal,fpuhyyre,fpunns,ehssare,ebhgu,ebfrzna,evppvneqv,crenmn,crtenz,bireghes,bynaqre,bqnavry,zvyyare,zrypube,znebarl,znpuhpn,znpnyhfb,yvirfnl,ynlsvryq,ynfxbjfxv,xjvngxbjfxv,xvyol,ubirl,urljbbq,unlzna,unineq,uneivyyr,unvtu,untbbq,tevrpb,tynffzna,trouneqg,syrvfpure,snaa,ryfba,rppyrf,phaun,pehzo,oynxyrl,oneqjryy,nofuver,jbbqunz,jvarf,jrygre,jnetb,ineanqb,ghgg,genlabe,fjnarl,fgevpxre,fgbssry,fgnzonhtu,fvpxyre,funpxyrsbeq,fryzna,frnire,fnafbz,fnazvthry,eblfgba,ebhexr,ebpxrgg,evbhk,chyrb,cvgpusbeq,aneqv,zhyinarl,zvqqnhtu,znyrx,yrbf,ynguna,xhwnjn,xvzoeb,xvyyroerj,ubhyvuna,uvapxyrl,urebq,urcyre,unzare,unzzry,unyybjryy,tbafnyrm,tvatrevpu,tnzovyy,shaxubhfre,sevpxr,srjryy,snyxare,raqfyrl,qhyva,qeraara,qrnire,qnzoebfvb,punqjryy,pnfgnaba,ohexrf,oehar,oevfpb,oevaxre,objxre,obyqg,oreare,ornhzbag,ornveq,onmrzber,oneevpx,nyonab,lbhagf,jhaqreyvpu,jrvqzna,inaarff,gbynaq,gurbonyq,fgvpxyre,fgrvtre,fgnatre,fcvrf,fcrpgbe,fbyynef,fzrqyrl,frvory,fpbivyyr,fnvgb,ehzzry,ebjyrf,ebhyrnh,ebbf,ebtna,ebrzre,ernz,enln,chexrl,cevrfgre,creerven,cravpx,cnhyva,cnexvaf,birepnfu,byrfba,arirf,zhyqebj,zvaneq,zvqtrgg,zvpunynx,zrytne,zpragver,zpnhyvssr,znegr,ylqba,yvaqubyz,yrlon,ynatriva,yntnffr,ynsnlrggr,xrfyre,xrygba,xnzvafxl,wnttref,uhzoreg,uhpx,ubjnegu,uvaevpuf,uvtyrl,thcgba,thvzbaq,tenibvf,tvthrer,sergjryy,sbagrf,srryrl,snhpure,rvpuubea,rpxre,rnec,qbyr,qvatre,qreeloreel,qrznef,qrry,pbcraunire,pbyyvafjbegu,pbynatryb,pyblq,pynvobear,pnhysvryq,pneyfra,pnymnqn,pnssrl,oebnqhf,oeraarzna,obhvr,obqane,oynarl,oynap,orygm,oruyvat,onenuban,lbpxrl,jvaxyr,jvaqbz,jvzre,ivyyngbeb,gerkyre,grena,gnyvnsreeb,flqabe,fjvafba,faryyvat,fzgvu,fvzbagba,fvzbarnhk,fvzbarnh,fureere,frnirl,fpurry,ehfugba,ehcr,ehnab,evccl,ervare,ervss,enovabjvgm,dhnpu,crayrl,bqyr,abpx,zvaavpu,zpxbja,zppneire,zpnaqerj,ybatyrl,ynhk,ynzbgur,ynseravrer,xebcc,xevpx,xngrf,wrcfba,uhvr,ubjfr,ubjvr,uraevdhrf,unlqba,unhtug,unggre,unegmbt,unexrl,tevznyqb,tbfubea,tbezyrl,tyhpx,tvyebl,tvyyrajngre,tvssva,syhxre,srqre,rler,rfuryzna,rnxvaf,qrgjvyre,qryebfnevb,qnivffba,pngnyna,pnaavat,pnygba,oenzzre,obgryub,oynxarl,onegryy,nirergg,nfxvaf,nxre,jvgzre,jvaxryzna,jvqzre,juvggvre,jrvgmry,jneqryy,jntref,hyyzna,ghccre,gvatyrl,gvytuzna,gnygba,fvzneq,frqn,fpuryyre,fnyn,ehaqryy,ebfg,evorveb,enovqrnh,cevzz,cvaba,crneg,bfgebz,bore,alfgebz,ahffonhz,anhtugba,zhee,zbbeurnq,zbagv,zbagrveb,zryfba,zrvffare,zpyva,zptehqre,znebggn,znxbjfxv,znwrjfxv,znqrjryy,yhag,yhxraf,yrvavatre,yrory,ynxva,xrcyre,wndhrf,uhaavphgg,uhatresbeq,ubbcrf,uregm,urvaf,unyyvohegba,tebffb,tenivgg,tynfcre,tnyyzna,tnyynjnl,shaxr,shyoevtug,snytbhg,rnxva,qbfgvr,qbenqb,qrjoreel,qrebfr,phgfunyy,penzcgba,pbfgnamb,pbyyrggv,pybavatre,pynlgbe,puvnat,pnzcntan,oheq,oebxnj,oebnqqhf,oergm,oenvaneq,ovasbeq,ovyoerl,nycreg,nvgxra,nuyref,mnwnp,jbbysbyx,jvggra,jvaqyr,jnlynaq,genzry,gvggyr,gnyniren,fhgre,fgenyrl,fcrpug,fbzzreivyyr,fbybzna,fxrraf,fvtzna,fvoreg,funiref,fpuhpx,fpuzvg,fnegnva,fnoby,ebfraoyngg,ebyyb,enfuvq,enoo,cbyfgba,aloret,abeguebc,anineen,zhyqbba,zvxrfryy,zpqbhtnyq,zpohearl,znevfpny,ybmvre,yvatresryg,yrtrer,yngbhe,ynthanf,ynpbhe,xhegu,xvyyra,xvryl,xnlfre,xnuyr,vfyrl,uhregnf,ubjre,uvam,unhtu,thzz,tnyvpvn,sbeghangb,synxr,qhayrnil,qhttvaf,qbol,qvtvbinaav,qrinarl,qrygbeb,pevoo,pbechm,pbebary,pbra,puneobaarnh,pnvar,ohepurggr,oynxrl,oynxrzber,oretdhvfg,orrar,ornhqrggr,onlyrf,onyynapr,onxxre,onvyrf,nforeel,nejbbq,mhpxre,jvyyzna,juvgrfryy,jnyq,jnypbgg,inapyrnir,gehzc,fgenffre,fvznf,fuvpx,fpuyrvpure,fpunny,fnyru,ebgm,erfavpx,envare,cnegrr,byyvf,byyre,bqnl,abyrf,zhaqnl,zbat,zvyyvpna,zrejva,znmmbyn,znafryy,zntnyynarf,yynarf,yrjryyra,yrcber,xvfare,xrrfrr,wrnaybhvf,vatunz,ubeaorpx,unja,unegm,uneore,unssare,thgfunyy,thgu,tenlf,tbjna,svaynl,svaxryfgrva,rlyre,raybr,qhatna,qvrm,qrnezna,phyy,pebffba,puebavfgre,pnffvgl,pnzcvba,pnyyvuna,ohgm,oernmrnyr,oyhzraguny,orexrl,onggl,onggba,neivmh,nyqrergr,nyqnan,nyonhtu,noreargul,jbygre,jvyyr,gjrrq,gbyyrsfba,gubznffba,grgre,grfgrezna,fcebhy,fcngrf,fbhgujvpx,fbhxhc,fxryyl,fragre,frnyrl,fnjvpxv,fnetrnag,ebffvgre,ebfrzbaq,ercc,cvsre,bezfol,avpxryfba,anhznaa,zbenovgb,zbamba,zvyyfncf,zvyyra,zpryengu,znepbhk,znagbbgu,znqfba,znparvy,znpxvaaba,ybhdhr,yrvfgre,ynzcyrl,xhfuare,xebhfr,xvejna,wrffrr,wnafba,wnua,wnpdhrm,vfynf,uhgg,ubyynqnl,uvyylre,urcohea,urafry,uneebyq,tvatevpu,trvf,tnyrf,shygf,svaaryy,sreev,srngurefgba,rcyrl,rorefbyr,rnzrf,qhavtna,qelr,qvfzhxr,qrinhtua,qryberamb,qnzvnab,pbasre,pbyyhz,pybjre,pybj,pynhffra,pynpx,pnlybe,pnjguba,pnfvnf,pneerab,oyhuz,ovatnzna,orjyrl,oryrj,orpxare,nhyq,nzrl,jbysraonetre,jvyxrl,jvpxyhaq,jnygzna,ivyynyon,inyreb,inyqbivabf,hyyevpu,glhf,gjlzna,gebfg,gneqvs,gnathnl,fgevcyvat,fgrvaonpu,fuhzcreg,fnfnxv,fnccvatgba,fnaqhfxl,ervaubyq,ervareg,dhvwnab,cynprapvn,cvaxneq,cuvaarl,creebggn,crearyy,cneergg,bkraqvar,bjrafol,bezna,ahab,zbev,zpeboregf,zparrfr,zpxnzrl,zpphyyhz,znexry,zneqvf,znvarf,yhrpx,yhova,yrsyre,yrssyre,ynevbf,ynoneoren,xrefuare,wbfrl,wrnaoncgvfgr,vmnthveer,urezbfvyyb,univynaq,unegfubea,unsare,tvagre,trggl,senapx,svfxr,qhserar,qbbql,qnivr,qnatresvryq,qnuyoret,phguoregfba,pebar,pbssryg,puvqrfgre,purffba,pnhyrl,pnhqryy,pnagnen,pnzcb,pnvarf,ohyyvf,ohppv,oebpuh,obtneq,ovpxrefgnss,oraavat,nembyn,nagbaryyv,nqxvafba,mryyref,jhys,jbefyrl,jbbyevqtr,juvggba,jrfgresvryq,jnypmnx,inffne,gehrgg,gehroybbq,genjvpx,gbjafyrl,gbccvat,gbone,grysbeq,fgrirefba,fgntt,fvggba,fvyy,fretrag,fpubrasryq,fnenovn,ehgxbjfxv,ehorafgrva,evtqba,ceragvff,cbzreyrnh,cyhzyrr,cuvyoevpx,cngabqr,bybhtuyva,boertba,ahff,zberyy,zvxryy,zryr,zpvarearl,zpthvtna,zpoenlre,ybyyne,xhruy,xvamre,xnzc,wbcyva,wnpbov,ubjryyf,ubyfgrva,urqqra,unffyre,unegl,unyyr,tervt,tbhtr,tbbqehz,treuneg,trvre,trqqrf,tnfg,sberunaq,sreerr,sraqyrl,srygare,rfdhrqn,rapneanpvba,rvpuyre,rttre,rqzhaqfba,rngzba,qbhq,qbabubr,qbaryfba,qvyberamb,qvtvnpbzb,qvttvaf,qrybmvre,qrwbat,qnasbeq,pevccra,pbccntr,pbtfjryy,pyneql,pvbssv,pnor,oeharggr,oerfanuna,oybzdhvfg,oynpxfgbar,ovyyre,orivf,orina,orguhar,oraobj,ongl,onfvatre,onypbz,naqrf,nzna,nthreb,nqxvffba,lnaqryy,jvyqf,juvfrauhag,jrvtnaq,jrrqra,ibvtug,ivyyne,gebggvre,gvyyrgg,fhnmb,frgfre,fpheel,fpuhu,fpuerpx,fpunhre,fnzben,ebnar,evaxre,ervzref,engpusbeq,cbcbivpu,cnexva,angny,zryivyyr,zpoelqr,zntqnyrab,ybrue,ybpxzna,yvatb,yrqhp,ynebppn,ynzrer,ynpynve,xenyy,xbegr,xbtre,wnyoreg,uhtuf,uvtorr,uragba,urnarl,unvgu,thzc,terrfba,tbbqybr,tubyfgba,tnfcre,tntyvneqv,sertbfb,sneguvat,snoevmvb,rafbe,ryfjvpx,rytva,rxyhaq,rnqql,qebhva,qbegba,qvmba,qrebhra,qrureeren,qnil,qnzcvre,phyyhz,phyyrl,pbjtvyy,pneqbfb,pneqvanyr,oebqfxl,oebnqorag,oevzzre,oevprab,oenafphz,obylneq,obyrl,oraavatgba,ornqyr,onhe,onyyragvar,nmher,nhygzna,nepvavrtn,nthvyn,nprirf,lrcrm,jbbqehz,jrguvatgba,jrvffzna,irybm,gehfgl,gebhc,genzzry,gnecyrl,fgviref,fgrpx,fcenloreel,fcenttvaf,fcvgyre,fcvref,fbua,frntenirf,fpuvsszna,ehqavpx,evmb,evppvb,eraavr,dhnpxraohfu,chzn,cybgg,crnepl,cnenqn,cnvm,zhasbeq,zbfxbjvgm,zrnfr,zpanel,zpphfxre,ybmbln,ybatzver,ybrfpu,ynfxl,xhuyznaa,xevrt,xbmvby,xbjnyrjfxv,xbaenq,xvaqyr,wbjref,wbyva,wnpb,ubetna,uvar,uvyrzna,urcare,urvfr,urnql,unjxvafba,unaavtna,unorezna,thvysbeq,tevznyqv,tnegba,tntyvnab,sehtr,sbyyrgg,svfphf,sreerggv,roare,rnfgreqnl,rnarf,qvexf,qvznepb,qrcnyzn,qrsberfg,pehpr,penvturnq,puevfgare,pnaqyre,pnqjryy,ohepuryy,ohrggare,oevagba,oenmvre,oenaara,oenzr,obin,obzne,oynxrfyrr,oryxanc,onatf,onymre,ngurl,nezrf,nyivf,nyirefba,nyineqb,lrhat,jurrybpx,jrfgyhaq,jrffryf,ibyxzna,guernqtvyy,guryra,gnthr,flzbaf,fjvasbeq,fghegrinag,fgenxn,fgvre,fgntare,frtneen,frnjevtug,ehgna,ebhk,evatyre,evxre,enzfqryy,dhnggyronhz,chevsbl,cbhyfba,crezragre,crybdhva,cnfyrl,cntry,bfzna,bonaaba,altnneq,arjpbzre,zhabf,zbggn,zrnqbef,zpdhvfgba,zpavry,zpznaa,zppenr,znlar,znggr,yrtnhyg,yrpuare,xhpren,xebua,xengmre,xbbczna,wrfxr,ubeebpxf,ubpx,uvooyre,urffba,urefu,uneiva,unyibefra,tevare,tevaqyr,tynqfgbar,tnebsnyb,senzcgba,sbeovf,rqqvatgba,qvbevb,qvathf,qrjne,qrfnyib,phepvb,pernfl,pbegrfr,pbeqbon,pbaanyyl,pyhss,pnfpvb,pnchnab,pnanqnl,pnynoeb,ohffneq,oenlgba,obewn,ovtyrl,neabar,nethryyrf,nphss,mnzneevcn,jbbgba,jvqare,jvqrzna,guerngg,guvryr,grzcyva,grrgref,flaqre,fjvag,fjvpx,fghetrf,fgbtare,fgrqzna,fcengg,fvrtsevrq,furgyre,fphyy,fnivab,fngure,ebgujryy,ebbx,ebar,eurr,dhrirqb,cevirgg,cbhyvbg,cbpur,cvpxry,crgevyyb,cryyrtevav,crnfyrr,cnegybj,bgrl,ahaarel,zberybpx,zberyyb,zrhavre,zrffvatre,zpxvr,zpphoova,zppneeba,yrepu,ynivar,yniregl,ynevivrer,ynzxva,xhtyre,xeby,xvffry,xrrgre,uhooyr,uvpxbk,urgmry,unlare,untl,unqybpx,tebu,tbggfpunyx,tbbqfryy,tnffnjnl,tneeneq,tnyyvtna,svegu,sraqrefba,srvafgrva,rgvraar,ratyrzna,rzevpx,ryyraqre,qerjf,qbveba,qrtenj,qrrtna,qneg,pevffzna,pbee,pbbxfba,pbvy,pyrnirf,punerfg,punccyr,puncneeb,pnfgnab,pnecvb,olre,ohssbeq,oevqtrjngre,oevqtref,oenaqrf,obeereb,obanaab,nhor,napurgn,nonepn,nonq,jbbfgre,jvzohfu,jvyyuvgr,jvyynzf,jvtyrl,jrvforet,jneqynj,ivthr,inaubbx,haxabj,gbeer,gnfxre,gneobk,fgenpuna,fybire,funzoyva,frzcyr,fpuhlyre,fpuevzfure,fnlre,fnymzna,ehonypnin,evyrf,erarnh,ervpury,enlsvryq,enoba,clngg,cevaqyr,cbff,cbyvgb,cyrzzbaf,crfpr,creenhyg,crerlen,bfgebjfxv,avyfra,avrzrlre,zhafrl,zhaqryy,zbapnqn,zvpryv,zrnqre,zpznfgref,zpxrruna,zngfhzbgb,zneeba,zneqra,yvmneentn,yvatrasrygre,yrjnyyra,ynatna,ynznaan,xbinp,xvafyre,xrcuneg,xrbja,xnff,xnzzrere,wrsserlf,ulfryy,ubfzre,uneqargg,unaare,thlrggr,terravat,tynmre,tvaqre,sebzz,syhryyra,svaxyr,srffyre,rffnel,rvfryr,qhera,qvggzre,pebpurg,pbfragvab,pbtna,pbryub,pniva,pneevmnyrf,pnzchmnab,oebhtu,obcc,obbxzna,oboo,oybhva,orrfyrl,onggvfgn,onfpbz,onxxra,onqtrgg,nearfba,nafryzb,nyovab,nuhznqn,jbbqlneq,jbygref,jverzna,jvyyvfba,jnezna,jnyqehc,ibjryy,inagnffry,gjbzoyl,gbbzre,graavfba,grrgf,grqrfpuv,fjnaare,fghgm,fgryyl,furrul,fpurezreubea,fpnyn,fnaqvqtr,fnygref,fnyb,fnrpunb,ebfrobeb,ebyyr,erffyre,eram,eraa,erqsbeq,encbfn,envaobyg,cryserl,beaqbess,barl,abyva,avzzbaf,aneqbar,zluer,zbezna,zrawvine,zptybar,zppnzzba,znkba,znepvnab,znahf,ybjenapr,yberamra,ybaretna,ybyyvf,yvggyrf,yvaqnuy,ynznf,ynpu,xhfgre,xenjpmlx,xahgu,xarpug,xvexraqnyy,xrvgg,xrrire,xnagbe,wneobr,ublr,ubhpuraf,ubygre,ubyfvatre,uvpxbx,uryjvt,urytrfba,unffrgg,uneare,unzzna,unzrf,unqsvryq,tberr,tbyqsneo,tnhtuna,tnhqernh,tnagm,tnyyvba,senql,sbgv,syrfure,sreeva,snhtug,ratenz,qbartna,qrfbhmn,qrtebbg,phgevtug,pebjy,pevare,pbna,pyvaxfpnyrf,purjavat,puniven,pngpuvatf,pneybpx,ohytre,ohraebfgeb,oenzoyrgg,oenpx,obhyjner,obbxbhg,ovgare,oveg,onenabjfxv,onvfqra,nyyzba,npxyva,lbnxhz,jvyobhea,juvfyre,jrvaoretre,jnfure,infdhrf,inamnaqg,inanggn,gebkyre,gbzrf,gvaqyr,gvzf,guebpxzbegba,gunpu,fgcrgre,fgynherag,fgrafba,fcel,fcvgm,fbatre,faniryl,fueblre,fubegevqtr,furax,frivre,frnoebbx,fpeviare,fnygmzna,ebfraoreel,ebpxjbbq,eborfba,ebna,ervfre,enzverf,enore,cbfare,cbcunz,cvbgebjfxv,cvaneq,crgrexva,cryunz,crvssre,crnl,anqyre,zhffb,zvyyrgg,zrfgnf,zptbjra,znedhrf,znenfpb,znaevdhrm,znabf,znve,yvccf,yrvxre,xehzz,xabee,xvafybj,xrffry,xraqevpxf,xryz,vevpx,vpxrf,uheyoheg,ubegn,ubrxfgen,urhre,uryzhgu,urngureyl,unzcfba,untne,untn,terraynj,tenh,tbqorl,tvatenf,tvyyvrf,tvoo,tnlqra,tnhiva,tneebj,sbagnarm,sybevb,svaxr,snfnab,rmmryy,rjref,rirynaq,rpxraebqr,qhpybf,qehzz,qvzzvpx,qrynaprl,qrsnmvb,qnfuvryy,phfnpx,pebjgure,pevttre,penl,pbbyvqtr,pbyqveba,pyrynaq,punysnag,pnffry,pnzver,pnoenyrf,oebbzsvryq,oevggvatunz,oevffba,oevpxrl,oenmvry,oenmryy,oentqba,obhynatre,obzna,obunaana,orrz,oneer,nmne,nfuonhtu,nezvfgrnq,nyznmna,nqnzfxv,mraqrwnf,jvaohea,jvyynvzf,jvyubvg,jrfgoreel,jragmry,jraqyvat,ivffre,inafpbl,inaxvex,inyyrr,gjrrql,gubeaoreel,fjrral,fcenqyvat,fcnab,fzryfre,fuvz,frpuevfg,fpunyy,fpnvsr,ehtt,ebguebpx,ebrfyre,evruy,evqvatf,eraqre,enafqryy,enqxr,cvareb,crgerr,craqretnfg,cryhfb,crpbeneb,cnfpbr,cnarx,bfuveb,anineerggr,zhethvn,zbberf,zboret,zvpunryvf,zpjuvegre,zpfjrrarl,zpdhnqr,zppnl,znhx,znevnav,zneprnh,znaqrivyyr,znrqn,yhaqr,yhqybj,ybro,yvaqb,yvaqrezna,yrirvyyr,yrvgu,ynebpx,ynzoerpug,xhyc,xvafyrl,xvzoreyva,xrfgrefba,ublbf,urysevpu,unaxr,tevfol,tblrggr,tbhirvn,tynmvre,tvyr,treran,tryvanf,tnfnjnl,shapurf,shwvzbgb,sylag,srafxr,sryyref,srue,rfyvatre,rfpnyren,rapvfb,qhyrl,qvggzna,qvarra,qvyyre,qrinhyg,pbyyvatf,pylzre,pybjref,puniref,puneynaq,pnfgberan,pnfgryyb,pnznetb,ohapr,ohyyra,oblrf,obepuref,obepuneqg,oveaonhz,oveqfnyy,ovyyzna,oravgrf,onaxurnq,natr,nzzrezna,nqxvfba,jvartne,jvpxzna,jnee,jneaxr,ivyyrarhir,irnfrl,inffnyyb,inaanggn,inqanvf,gjvyyrl,gbjrel,gbzoyva,gvccrgg,gurvff,gnyxvatgba,gnynznagrf,fjneg,fjnatre,fgervg,fgvarf,fgnoyre,fcheyvat,fbory,fvar,fvzzref,fuvccl,fuvsyrgg,furneva,fnhgre,fnaqreyva,ehfpu,ehaxyr,ehpxzna,ebevr,ebrfpu,evpureg,eruz,enaqry,entva,dhrfraoreel,chragrf,cylyre,cybgxva,cnhtu,bfunhtuarffl,bunyybena,abefjbegul,avrznaa,anqre,zbbersvryq,zbbarlunz,zbqvpn,zvlnzbgb,zvpxry,zronar,zpxvaavr,znmherx,znapvyyn,yhxnf,ybivaf,ybhtuyva,ybgm,yvaqfyrl,yvqqyr,yrina,yrqrezna,yrpynver,ynffrgre,yncbvag,ynzbernhk,ynsbyyrggr,xhovnx,xvegyrl,xrssre,xnpmznerx,ubhfzna,uvref,uvooreg,ureebq,urtnegl,ungubea,terraunj,tensgba,tbirn,shgpu,shefg,senaxb,sbepvre,sbena,syvpxvatre,snvesvryq,rher,rzevpu,rzoerl,rqtvatgba,rpxyhaq,rpxneq,qhenagr,qrlb,qryirppuvb,qnqr,pheerl,perfjryy,pbggevyy,pnfninag,pnegvre,pnetvyr,pncry,pnzznpx,pnysrr,ohefr,oheehff,oehfg,oebhffrnh,oevqjryy,oenngra,obexubyqre,oybbzdhvfg,owbex,onegryg,nzohetrl,lrnel,juvgrsvryq,ivalneq,inainyxraohet,gjvgpuryy,gvzzvaf,gnccre,fgevatunz,fgnepure,fcbggf,fynhtu,fvzbafra,furssre,frdhrven,ebfngv,eulzrf,dhvag,cbyynx,crvepr,cngvyyb,cnexrefba,cnvin,avyfba,ariva,anepvffr,zvggba,zreevnz,zreprq,zrvaref,zpxnva,zpryirra,zporgu,znefqra,znerm,znaxr,znuheva,znoerl,yhcre,xehyy,uhafvpxre,ubeaohpxyr,ubygmpynj,uvaanag,urfgba,urevat,urzrajnl,urtjbbq,urneaf,unygrezna,thvgreerm,tebgr,tenavyyb,tenvatre,tynfpb,tvyqre,tneera,tneybpx,tnerl,selne,serqevpxf,senvmre,sbfurr,sreery,srygl,rirevgg,riraf,rffre,ryxva,roreuneg,qhefb,qhthnl,qevfxvyy,qbfgre,qrjnyy,qrirnh,qrzcf,qrznvb,qryerny,qryrb,qneenu,phzoreongpu,phyorefba,penazre,pbeqyr,pbytna,purfyrl,pninyyb,pnfgryyba,pnfgryyv,pneerenf,pnearyy,pneyhppv,obagentre,oyhzoret,oynfvatnzr,orpgba,negevc,naqhwne,nyxver,nyqre,mhxbjfxv,mhpxrezna,jeboyrjfxv,jevtyrl,jbbqfvqr,jvttvagba,jrfgzna,jrfgtngr,jregf,jnfunz,jneqybj,jnyfre,jnvgref,gnqybpx,fgevatsvryq,fgvzcfba,fgvpxyrl,fgnaqvfu,fcheyva,fcvaqyre,fcryyre,fcnrgu,fbgbznlbe,fyhqre,fuelbpx,furcneqfba,fungyrl,fpnaaryy,fnagvfgrina,ebfare,erfgb,ervauneq,enguohea,cevfpb,cbhyfra,cvaarl,cunerf,craabpx,cnfgenan,bivrqb,bfgyre,anhzna,zhysbeq,zbvfr,zboreyl,zvenony,zrgblre,zrgural,zragmre,zryqehz,zpvaghess,zprylrn,zpqbhtyr,znffneb,yhzcxvaf,ybirqnl,ybstera,yverggr,yrfcrenapr,yrsxbjvgm,yrqtre,ynhmba,ynpuncryyr,xynffra,xrbhtu,xrzcgba,xnryva,wrssbeqf,ufvru,ublre,ubejvgm,ubrsg,uraavt,unfxva,tbheqvar,tbyvtugyl,tvebhneq,shytunz,sevgfpu,serre,senfure,sbhyx,sverfgbar,svberagvab,srqbe,rafyrl,ratyruneg,rryyf,qhacul,qbanubr,qvyrb,qvorarqrggb,qnoebjfxv,pevpx,pbbaebq,pbaqre,pbqqvatgba,puhaa,punchg,prean,pneerveb,pnynuna,oenttf,obheqba,obyyzna,ovggyr,onhqre,oneerenf,nhohpuba,namnybar,nqnzb,mreor,jvyypbk,jrfgoret,jrvxry,jnlzver,iebzna,ivapv,inyyrwbf,gehrfqryy,gebhgg,gebggn,gbyyvfba,gbyrf,gvpurabe,flzbaqf,fheyrf,fgenlre,fgtrbetr,febxn,fbeeragvab,fbynerf,faryfba,fvyirfgev,fvxbefxv,funjire,fpuhznxre,fpubee,fpubbyrl,fpngrf,fnggreyrr,fngpuryy,elzre,ebfryyv,ebovgnvyyr,evrtry,ertvf,ernzrf,cebiramnab,cevrfgyrl,cynvfnapr,crggrl,cnybznerf,abjnxbjfxv,zbarggr,zvalneq,zpynzo,zpubar,zppneebyy,znffba,zntbba,znqql,yhaqva,yvpngn,yrbauneqg,ynaqjrue,xvepure,xvapu,xnecvafxv,wbunaafra,uhffnva,ubhtugnyvat,ubfxvafba,ubyynjnl,ubyrzna,ubotbbq,uvroreg,tbttva,trvffyre,tnqobvf,tnonyqba,syrfuzna,synaavtna,snvezna,rvyref,qlphf,qhazver,qhssvryq,qbjyre,qrybngpu,qrunna,qrrzre,pynlobea,puevfgbssrefb,puvyfba,purfarl,pungsvryq,pneeba,pnanyr,oevtzna,oenafgrggre,obffr,obegba,obane,oveba,oneebfb,nevfcr,mnpunevnf,mnory,lnrtre,jbbysbeq,jurgmry,jrnxyrl,irngpu,inaqrhfra,ghsgf,gebkry,gebpur,genire,gbjafry,gnynevpb,fjvyyrl,fgreergg,fgratre,fcrnxzna,fbjneqf,fbhef,fbhqref,fbhqre,fbyrf,fboref,fabqql,fzvgure,fuhgr,fubns,fununa,fpuhrgm,fpnttf,fnagvav,ebffba,ebyra,ebovqbhk,eragnf,erpvb,cvkyrl,cnjybjfxv,cnjynx,cnhyy,bireorl,berne,byvirev,byqraohet,ahggvat,anhtyr,zbffzna,zvfare,zvynmmb,zvpuryfba,zpragrr,zpphyyne,zpperr,zpnyrre,znmmbar,znaqryy,znanuna,znybgg,znvfbarg,znvyybhk,yhzyrl,ybjevr,ybhivrer,yvcvafxv,yvaqrznaa,yrccreg,yrnfher,ynonetr,xhovx,xavfryl,xarcc,xrajbegul,xraaryyl,xrypu,xnagre,ubhpuva,ubfyrl,ubfyre,ubyyba,ubyyrzna,urvgzna,unttvaf,tjnygarl,tbhyqvat,tbeqra,trenpv,tnguref,sevfba,srntva,snypbare,rfcnqn,reivat,revxfba,rvfraunhre,roryvat,qhetva,qbjqyr,qvajvqqvr,qrypnfgvyyb,qrqevpx,pevzzvaf,pbiryy,pbheablre,pbevn,pbuna,pngnyqb,pnecragvre,pnanf,pnzcn,oebqr,oenfurnef,oynfre,ovpxaryy,orqane,onejvpx,nfprapvb,nygubss,nyzbqbine,nynzb,mvexyr,mnonyn,jbyiregba,jvaroeraare,jrgureryy,jrfgynxr,jrtrare,jrqqvatgba,ghgra,gebfpynve,gerffyre,gurebhk,grfxr,fjvaruneg,fjrafra,fhaqdhvfg,fbhgunyy,fbpun,fvmre,fvyireoret,fubegg,fuvzvmh,fureeneq,funrssre,fpurvq,fpurrgm,fnenivn,fnaare,ehovafgrva,ebmryy,ebzre,eurnhzr,ervfvatre,enaqyrf,chyyhz,crgeryyn,cnlna,abeqva,abepebff,avpbyrggv,avpubyrf,arjobyq,anxntnjn,zbagrvgu,zvyfgrnq,zvyyvare,zryyra,zppneqyr,yvcgnx,yrvgpu,yngvzber,yneevfba,ynaqnh,ynobeqr,xbiny,vmdhvreqb,ulzry,ubfxva,ubygr,ubrsre,unljbegu,unhfzna,uneevyy,uneery,uneqg,thyyl,tebbire,tevaaryy,terrafcna,tenire,tenaqoreel,tbeeryy,tbyqraoret,tbthra,tvyyrynaq,shfba,sryqznaa,rireyl,qlrff,qhaavtna,qbjavr,qbyol,qrngurentr,pbfrl,purrire,prynln,pnire,pnfuvba,pncyvatre,pnafyre,oletr,oehqre,oerhre,oerfyva,oenmrygba,obgxva,obaarnh,obaqhenag,obunana,obthr,obqare,obngare,oyngg,ovpxyrl,oryyvirnh,orvyre,orvre,orpxfgrnq,onpuznaa,ngxva,nygvmre,nyybjnl,nyynver,nyoeb,noeba,mryyzre,lrggre,lryiregba,jvraf,juvqqra,ivenzbagrf,inajbezre,gnenagvab,gnaxfyrl,fhzyva,fgenhpu,fgenat,fgvpr,fcnua,fbfrorr,fvtnyn,fuebhg,frnzba,fpuehz,fpuarpx,fpunagm,ehqql,ebzvt,ebruy,eraavatre,erqvat,cbynx,cbuyzna,cnfvyynf,byqsvryq,byqnxre,bunayba,btvyivr,abeoret,abyrggr,arhsryq,aryyvf,zhzzreg,zhyivuvyy,zhyynarl,zbagryrbar,zraqbapn,zrvfare,zpzhyyna,zppyharl,znggvf,znffratvyy,znaserqv,yhrqgxr,ybhafohel,yvorengber,ynzcurer,ynsbetr,wbheqna,vbevb,vavthrm,vxrqn,uhoyre,ubqtqba,ubpxvat,urnpbpx,unfynz,unenyfba,unafunj,unaahz,unyynz,unqra,tnearf,tneprf,tnzzntr,tnzovab,svaxry,snhprgg,rueuneqg,rttra,qhfrx,qheenag,qhonl,qbarf,qrcnfdhnyr,qryhpvn,qrtenss,qrpnzc,qninybf,phyyvaf,pbaneq,pybhfre,pybagm,pvshragrf,punccry,punssvaf,pryvf,pnejvyr,olenz,oehttrzna,oerffyre,oengujnvgr,oenfsvryq,oenqohea,obbfr,obqvr,oybffre,oregfpu,oreaneqv,oreanor,oratgfba,oneerggr,nfgbetn,nyqnl,nyorr,noenunzfba,lnearyy,jvygfr,jvror,jnthrfcnpx,inffre,hcunz,gherx,genkyre,gbenva,gbznfmrjfxv,gvaava,gvare,gvaqryy,fgleba,fgnuyzna,fgnno,fxvon,furcreq,frvqy,frpbe,fpuhggr,fnasvyvccb,ehqre,ebaqba,ernevpx,cebpgre,cebpunfxn,crggratvyy,cnhyl,arvyfra,anyyl,zhyyrank,zbenab,zrnqf,zpanhtugba,zpzhegel,zpzngu,zpxvafrl,znggurf,znffraohet,zneyne,znetbyvf,znyva,zntnyyba,znpxva,ybirggr,ybhtuena,ybevat,ybatfgerrg,ybvfryyr,yravuna,xhamr,xbrcxr,xrejva,xnyvabjfxv,xntna,vaavf,vaarf,ubygmzna,urvarznaa,unefuzna,unvqre,unnpx,tebaqva,tevffrgg,terranjnyg,tbhql,tbbqyrgg,tbyqfgba,tbxrl,tneqrn,tnynivm,tnssbeq,tnoevryfba,sheybj,sevgpu,sbeqlpr,sbytre,ryvmnyqr,ruyreg,rpxubss,rppyrfgba,rnyrl,qhova,qvrzre,qrfpunzcf,qryncran,qrpvppb,qrobyg,phyyvana,pevggraqba,penfr,pbffrl,pbccbpx,pbbgf,pbylre,pyhpx,punzoreynaq,ohexurnq,ohzchf,ohpuna,obezna,ovexubym,oreneqv,oraqn,oruaxr,onegre,nzrmdhvgn,jbgevat,jvegm,jvatreg,jvrfare,juvgrfvqrf,jrlnag,jnvafpbgg,irarmvn,inearyy,ghffrl,guheybj,gnonerf,fgvire,fgryy,fgnexr,fgnaubcr,fgnarx,fvfyre,fvaabgg,fvpvyvnab,furuna,frycu,frntre,fpheybpx,fpenagba,fnaghppv,fnagnatryb,fnygfzna,ebttr,erggvt,erajvpx,ervql,ervqre,erqsvryq,cerzb,cneragr,cnbyhppv,cnyzdhvfg,buyre,arguregba,zhgpuyre,zbevgn,zvfgerggn,zvaavf,zvqqraqbes,zramry,zraqbfn,zraqryfba,zrnhk,zpfcnqqra,zpdhnvq,zpangg,znavtnhyg,znarl,zntre,yhxrf,ybcerfgv,yvevnab,yrgfba,yrpuhtn,ynmraol,ynhevn,ynevzber,xehcc,xehcn,xbcrp,xvapura,xvsre,xrearl,xreare,xraavfba,xrtyrl,xnepure,whfgvf,wbufba,wryyvfba,wnaxr,uhfxvaf,ubymzna,uvabwbf,ursyrl,ungznxre,unegr,unyybjnl,unyyraorpx,tbbqjla,tynfcvr,trvfr,shyyjbbq,selzna,senxrf,senver,sneere,raybj,ratra,ryymrl,rpxyrf,rneyrf,qhaxyrl,qevaxneq,qervyvat,qenrtre,qvaneqb,qvyyf,qrfebpurf,qrfnagvntb,pheyrr,pehzoyrl,pevgpuybj,pbhel,pbhegevtug,pbssvryq,pyrrx,punecragvre,pneqbar,pncyrf,pnagva,ohagva,ohtorr,oevaxreubss,oenpxva,obheynaq,oynffvatnzr,ornpunz,onaavat,nhthfgr,naqernfra,nznaa,nyzba,nyrwb,nqryzna,nofgba,lretre,jlzre,jbbqoreel,jvaqyrl,juvgrnxre,jrfgsvryq,jrvory,jnaare,jnyqerc,ivyynav,inanefqnyr,hggreonpx,hcqvxr,gevttf,gbcrgr,gbyne,gvtare,gubzf,gnhore,gneiva,gnyyl,fjvarl,fjrngzna,fghqronxre,fgraargg,fgneergg,fgnaaneq,fgnyirl,fbaaraoret,fzvgurl,fvrore,fvpxyrf,fuvanhyg,frtnef,fnatre,fnyzreba,ebgur,evmmv,erfgercb,enyyf,enthfn,dhvebtn,cncrashff,bebcrmn,bxnar,zhqtr,zbmvatb,zbyvaneb,zpivpxre,zptneirl,zpsnyyf,zppenarl,znghf,zntref,yynabf,yvirezber,yvaruna,yrvgare,ynlzba,ynjvat,ynpbhefr,xjbat,xbyyne,xarrynaq,xraargg,xryyrgg,xnatnf,wnamra,uhggre,uhyvat,ubszrvfgre,urjrf,unewb,unovo,thvpr,tehyyba,terttf,tenlre,tenavre,tenoyr,tbjql,tvnaavav,trgpuryy,tnegzna,tneavpn,tnarl,tnyyvzber,srggref,sretrefba,sneybj,snthaqrf,rkyrl,rfgrirf,raqref,rqrasvryq,rnfgrejbbq,qenxrsbeq,qvcnfdhnyr,qrfbhfn,qrfuvryqf,qrrgre,qrqzba,qrobeq,qnhtugrel,phggf,pbhegrznapur,pbhefrl,pbccyr,pbbzrf,pbyyvf,pbtohea,pybcgba,pubdhrggr,punvqrm,pnfgerwba,pnyubba,oheonpu,ohyybpu,ohpuzna,oehua,obuba,oybhtu,onlarf,onefgbj,mrzna,mnpxrel,lneqyrl,lnznfuvgn,jhyss,jvyxra,jvyvnzf,jvpxrefunz,jvoyr,juvcxrl,jrqtrjbegu,jnyzfyrl,jnyxhc,ierrynaq,ireevyy,hznan,genho,fjvatyr,fhzzrl,fgebhcr,fgbpxfgvyy,fgrssrl,fgrsnafxv,fgngyre,fgncc,fcrvtugf,fbynev,fbqreoret,fuhax,fuberl,furjznxre,furvyqf,fpuvssre,fpunax,fpunss,fntref,ebpuba,evfre,evpxrgg,ernyr,entyva,cbyra,cyngn,cvgpbpx,crepviny,cnyra,beban,boreyr,abpren,aninf,anhyg,zhyyvatf,zbagrwnab,zbaerny,zvavpx,zvqqyroebbx,zrrpr,zpzvyyvba,zpphyyra,znhpx,znefuohea,znvyyrg,znunarl,zntare,znpyva,yhprl,yvggreny,yvccvapbgg,yrvgr,yrnxf,ynzneer,whetraf,wrexvaf,wntre,uhejvgm,uhtuyrl,ubgnyvat,ubefgzna,ubuzna,ubpxre,uviryl,uvccf,urffyre,ureznafba,urcjbegu,uryynaq,urqyhaq,unexyrff,unvtyre,thgvrerm,tevaqfgnss,tynagm,tvneqvan,trexra,tnqfqra,svaaregl,sneahz,rapvanf,qenxrf,qraavr,phgyvc,phegfvatre,pbhgb,pbegvanf,pbeol,puvnffba,pneyr,pneonyyb,oevaqyr,obehz,obore,oyntt,oreguvnhzr,ornuz,ongerf,onfavtug,onpxrf,nkgryy,nggreoreel,nyinerf,nyrtevn,jbbqryy,jbwpvrpubjfxv,jvaserr,jvaohfu,jvrfg,jrfare,jnzfyrl,jnxrzna,ireare,gehrk,gensgba,gbzna,gubefra,gurhf,gryyvre,gnyynag,fmrgb,fgebcr,fgvyyf,fvzxvaf,fuhrl,funhy,freiva,frevb,frensva,fnythreb,elrefba,ehqqre,ehnex,ebgure,ebueonhtu,ebueonpu,ebuna,ebtrefba,evfure,errfre,celpr,cebxbc,cevaf,cevror,cerwrna,cvaurveb,crgebar,crgev,crafba,crneyzna,cnevxu,angbyv,zhenxnzv,zhyyvxva,zhyynar,zbgrf,zbeavatfgne,zpirvtu,zptenql,zptnhturl,zppheyrl,znepuna,znafxr,yhfol,yvaqr,yvxraf,yvpba,yrebhk,yrznver,yrtrggr,ynfxrl,yncenqr,yncynag,xbyne,xvggerqtr,xvayrl,xreore,xnantl,wrggba,wnavx,vccbyvgb,vabhlr,uhafvatre,ubjyrl,ubjrel,ubeeryy,ubygunhf,uvare,uvyfba,uvyqreoenaq,unegmyre,uneavfu,unenqn,unafsbeq,unyyvtna,untrqbea,tjlaa,thqvab,terrafgrva,terrne,tenprl,tbhqrnh,tbbqare,tvafohet,tregu,treare,shwvv,sevre,serarggr,sbyzne,syrvfure,syrvfpuznaa,srgmre,rvfrazna,rneuneg,qhchl,qhaxryoretre,qerkyre,qvyyvatre,qvyorpx,qrjnyq,qrzol,qrsbeq,penvar,purfahg,pnfnql,pnefgraf,pneevpx,pnevab,pnevtana,pnapubyn,ohfubat,ohezna,ohbab,oebjaybj,oebnpu,oevggra,oevpxubhfr,oblqra,obhygba,obeynaq,obuere,oyhonhtu,orire,orettera,orarivqrf,nebpub,neraqf,nzrmphn,nyzraqnerm,mnyrjfxv,jvgmry,jvaxsvryq,jvyubvgr,inathaql,inasyrrg,inarggra,inaqretevss,heonafxv,gebvnab,guvobqnhk,fgenhf,fgbarxvat,fgwrna,fgvyyvatf,fgnatr,fcrvpure,fcrrtyr,fzrygmre,fynjfba,fvzzbaqf,fuhggyrjbegu,frecn,fratre,frvqzna,fpujrvtre,fpuybff,fpuvzzry,fpurpugre,fnlyre,fnongvav,ebana,ebqvthrm,evttyrzna,evpuvaf,ernzre,cehagl,cbengu,cyhax,cvynaq,cuvyoebbx,crggvgg,crean,crenyrm,cnfpnyr,cnqhyn,boblyr,aviraf,avpxbyf,zhaqg,zhaqra,zbagvwb,zpznavf,zptenar,zppevzzba,znamv,znatbyq,znyvpx,znune,znqqbpx,ybfrl,yvggra,yrrql,yrniryy,ynqhr,xenua,xyhtr,whaxre,virefra,vzyre,uhegg,uhvmne,uhooreg,ubjvatgba,ubyybzba,ubyqera,ubvfvatgba,urvqra,unhtr,unegvtna,thgveerm,tevssvr,terrauvyy,tenggba,tenangn,tbggsevrq,tregm,tnhgernhk,sheel,sherl,shaqreohet,syvccra,svgmtvooba,qehpxre,qbabtuhr,qvyql,qriref,qrgjrvyre,qrfcerf,qraol,qrtrbetr,phrgb,penafgba,pbheivyyr,pyhxrl,pvevyyb,puviref,pnhqvyyb,ohgren,ohyyhpx,ohpxznfgre,oenhafgrva,oenpnzbagr,obheqrnh,obaarggr".split(","),
us_tv_and_film:"lbh,v,gb,gung,vg,zr,jung,guvf,xabj,v'z,ab,unir,zl,qba'g,whfg,abg,qb,or,lbhe,jr,vg'f,fb,ohg,nyy,jryy,bu,nobhg,evtug,lbh'er,trg,urer,bhg,tbvat,yvxr,lrnu,vs,pna,hc,jnag,guvax,gung'f,abj,tb,uvz,ubj,tbg,qvq,jul,frr,pbzr,tbbq,ernyyl,ybbx,jvyy,bxnl,onpx,pna'g,zrna,gryy,v'yy,url,ur'f,pbhyq,qvqa'g,lrf,fbzrguvat,orpnhfr,fnl,gnxr,jnl,yvggyr,znxr,arrq,tbaan,arire,jr'er,gbb,fur'f,v'ir,fher,bhe,fbeel,jung'f,yrg,guvat,znlor,qbja,zna,irel,gurer'f,fubhyq,nalguvat,fnvq,zhpu,nal,rira,bss,cyrnfr,qbvat,gunax,tvir,gubhtug,uryc,gnyx,tbq,fgvyy,jnvg,svaq,abguvat,ntnva,guvatf,yrg'f,qbrfa'g,pnyy,gbyq,terng,orggre,rire,avtug,njnl,oryvrir,srry,rirelguvat,lbh'ir,svar,ynfg,xrrc,qbrf,chg,nebhaq,fgbc,gurl'er,v'q,thl,vfa'g,nyjnlf,yvfgra,jnagrq,thlf,uhu,gubfr,ovt,ybg,unccrarq,gunaxf,jba'g,gelvat,xvaq,jebat,gnyxvat,thrff,pner,onq,zbz,erzrzore,trggvat,jr'yy,gbtrgure,qnq,yrnir,haqrefgnaq,jbhyqa'g,npghnyyl,urne,onol,avpr,sngure,ryfr,fgnl,qbar,jnfa'g,pbhefr,zvtug,zvaq,rirel,rabhtu,gel,uryy,pnzr,fbzrbar,lbh'yy,jubyr,lbhefrys,vqrn,nfx,zhfg,pbzvat,ybbxvat,jbzna,ebbz,xarj,gbavtug,erny,fba,ubcr,jrag,uzz,unccl,cerggl,fnj,tvey,fve,sevraq,nyernql,fnlvat,arkg,wbo,ceboyrz,zvahgr,guvaxvat,unira'g,urneq,ubarl,znggre,zlfrys,pbhyqa'g,rknpgyl,univat,cebonoyl,unccra,jr'ir,uheg,obl,qrnq,tbggn,nybar,rkphfr,fgneg,xvyy,uneq,lbh'q,gbqnl,pne,ernql,jvgubhg,jnagf,ubyq,jnaan,lrg,frra,qrny,bapr,tbar,zbeavat,fhccbfrq,sevraqf,urnq,fghss,jbeel,yvir,gehgu,snpr,sbetrg,gehr,pnhfr,fbba,xabjf,gryyvat,jvsr,jub'f,punapr,eha,zbir,nalbar,crefba,olr,fbzrobql,urneg,zvff,znxvat,zrrg,naljnl,cubar,ernfba,qnza,ybfg,ybbxf,oevat,pnfr,ghea,jvfu,gbzbeebj,xvqf,gehfg,purpx,punatr,nalzber,yrnfg,nera'g,jbexvat,znxrf,gnxvat,zrnaf,oebgure,ungr,ntb,fnlf,ornhgvshy,tnir,snpg,penml,fvg,nsenvq,vzcbegnag,erfg,sha,xvq,jbeq,jngpu,tynq,rirelbar,fvfgre,zvahgrf,rirelobql,ovg,pbhcyr,jubn,rvgure,zef,srryvat,qnhtugre,jbj,trgf,nfxrq,oernx,cebzvfr,qbbe,pybfr,unaq,rnfl,dhrfgvba,gevrq,sne,jnyx,arrqf,zvar,xvyyrq,ubfcvgny,nalobql,nyevtug,jrqqvat,fuhg,noyr,qvr,cresrpg,fgnaq,pbzrf,uvg,jnvgvat,qvaare,shaal,uhfonaq,nyzbfg,cnl,nafjre,pbby,rlrf,arjf,puvyq,fubhyqa'g,lbhef,zbzrag,fyrrc,ernq,jurer'f,fbhaqf,fbaal,cvpx,fbzrgvzrf,orq,qngr,cyna,ubhef,ybfr,unaqf,frevbhf,fuvg,oruvaq,vafvqr,nurnq,jrrx,jbaqreshy,svtug,cnfg,phg,dhvgr,ur'yy,fvpx,vg'yy,rng,abobql,tbrf,fnir,frrzf,svanyyl,yvirf,jbeevrq,hcfrg,pneyl,zrg,oebhtug,frrz,fbeg,fnsr,jrera'g,yrnivat,sebag,fubg,ybirq,nfxvat,ehaavat,pyrne,svther,ubg,sryg,cneragf,qevax,nofbyhgryl,ubj'f,qnqql,fjrrg,nyvir,frafr,zrnag,unccraf,org,oybbq,nva'g,xvqqvat,yvr,zrrgvat,qrne,frrvat,fbhaq,snhyg,gra,ohl,ubhe,fcrnx,ynql,wra,guvaxf,puevfgznf,bhgfvqr,unat,cbffvoyr,jbefr,zvfgnxr,bbu,unaqyr,fcraq,gbgnyyl,tvivat,urer'f,zneevntr,ernyvmr,hayrff,frk,fraq,arrqrq,fpnerq,cvpgher,gnyxrq,nff,uhaqerq,punatrq,pbzcyrgryl,rkcynva,pregnvayl,fvta,oblf,eryngvbafuvc,ybirf,unve,ylvat,pubvpr,naljurer,shgher,jrveq,yhpx,fur'yy,ghearq,gbhpu,xvff,penar,dhrfgvbaf,boivbhfyl,jbaqre,cnva,pnyyvat,fbzrjurer,guebj,fgenvtug,pbyq,snfg,jbeqf,sbbq,abar,qevir,srryvatf,gurl'yy,zneel,qebc,pnaabg,qernz,cebgrpg,gjragl,fhecevfr,fjrrgurneg,cbbe,ybbxrq,znq,rkprcg,tha,l'xabj,qnapr,gnxrf,nccerpvngr,rfcrpvnyyl,fvghngvba,orfvqrf,chyy,unfa'g,jbegu,furevqna,nznmvat,rkcrpg,fjrne,cvrpr,ohfl,unccravat,zbivr,jr'q,pngpu,creuncf,fgrc,snyy,jngpuvat,xrcg,qneyvat,qbt,ubabe,zbivat,gvyy,nqzvg,ceboyrzf,zheqre,ur'q,rivy,qrsvavgryl,srryf,ubarfg,rlr,oebxr,zvffrq,ybatre,qbyynef,gverq,riravat,fgnegvat,ragver,gevc,avyrf,fhccbfr,pnyz,vzntvar,snve,pnhtug,oynzr,fvggvat,snibe,ncnegzrag,greevoyr,pyrna,yrnea,senfvre,erynk,nppvqrag,jnxr,cebir,fzneg,zrffntr,zvffvat,sbetbg,vagrerfgrq,gnoyr,aofc,zbhgu,certanag,evat,pnershy,funyy,qhqr,evqr,svtherq,jrne,fubbg,fgvpx,sbyybj,natel,jevgr,fgbccrq,ena,fgnaqvat,sbetvir,wnvy,jrnevat,ynqvrf,xvaqn,yhapu,pevfgvna,terrayrr,tbggra,ubcvat,cubror,gubhfnaq,evqtr,cncre,gbhtu,gncr,pbhag,oblsevraq,cebhq,nterr,oveguqnl,gurl'ir,funer,bssre,uheel,srrg,jbaqrevat,qrpvfvba,barf,svavfu,ibvpr,urefrys,jbhyq'ir,zrff,qrfreir,rivqrapr,phgr,qerff,vagrerfgvat,ubgry,rawbl,dhvrg,pbaprearq,fgnlvat,orng,fjrrgvr,zragvba,pybgurf,sryy,arvgure,zzz,svk,erfcrpg,cevfba,nggragvba,ubyqvat,pnyyf,fhecevfrq,one,xrrcvat,tvsg,unqa'g,chggvat,qnex,bjr,vpr,urycvat,abezny,nhag,ynjlre,ncneg,cynaf,wnk,tveysevraq,sybbe,jurgure,rirelguvat'f,obk,whqtr,hcfgnvef,fnxr,zbzzl,cbffvoyl,jbefg,npgvat,npprcg,oybj,fgenatr,fnirq,pbairefngvba,cynar,znzn,lrfgreqnl,yvrq,dhvpx,yngryl,fghpx,qvssrerapr,fgber,fur'q,obhtug,qbhog,yvfgravat,jnyxvat,pbcf,qrrc,qnatrebhf,ohssl,fyrrcvat,puybr,ensr,wbva,pneq,pevzr,tragyrzra,jvyyvat,jvaqbj,jnyxrq,thvygl,yvxrf,svtugvat,qvssvphyg,fbhy,wbxr,snibevgr,hapyr,cebzvfrq,obgure,frevbhfyl,pryy,xabjvat,oebxra,nqivpr,fbzrubj,cnvq,ybfvat,chfu,urycrq,xvyyvat,obff,yvxrq,vaabprag,ehyrf,yrnearq,guvegl,evfx,yrggvat,fcrnxvat,evqvphybhf,nsgreabba,ncbybtvmr,areibhf,punetr,cngvrag,obng,ubj'q,uvqr,qrgrpgvir,cynaavat,uhtr,oernxsnfg,ubeevoyr,njshy,cyrnfher,qevivat,unatvat,cvpxrq,fryy,dhvg,nccneragyl,qlvat,abgvpr,pbatenghyngvbaf,ivfvg,pbhyq'ir,p'zba,yrggre,qrpvqr,sbejneq,sbby,fubjrq,fzryy,frrzrq,fcryy,zrzbel,cvpgherf,fybj,frpbaqf,uhatel,urnevat,xvgpura,zn'nz,fubhyq'ir,ernyvmrq,xvpx,teno,qvfphff,svsgl,ernqvat,vqvbg,fhqqrayl,ntrag,qrfgebl,ohpxf,fubrf,crnpr,nezf,qrzba,yviivr,pbafvqre,cncref,vaperqvoyr,jvgpu,qehax,nggbearl,gryyf,xabpx,jnlf,tvirf,abfr,fxlr,gheaf,xrrcf,wrnybhf,qeht,fbbare,pnerf,cyragl,rkgen,bhggn,jrrxraq,znggref,tbfu,bccbeghavgl,vzcbffvoyr,jnfgr,cergraq,whzc,rngvat,cebbs,fyrcg,neerfg,oerngur,cresrpgyl,jnez,chyyrq,gjvpr,rnfvre,tbva,qngvat,fhvg,ebznagvp,qehtf,pbzsbegnoyr,svaqf,purpxrq,qvibepr,ortva,bhefryirf,pybfre,ehva,fzvyr,ynhtu,gerng,srne,jung'q,bgurejvfr,rkpvgrq,znvy,uvqvat,fgbyr,cnprl,abgvprq,sverq,rkpryyrag,oevatvat,obggbz,abgr,fhqqra,onguebbz,ubarfgyl,fvat,sbbg,erzvaq,punetrf,jvgarff,svaqvat,gerr,qner,uneqyl,gung'yy,fgrny,fvyyl,pbagnpg,grnpu,fubc,cyhf,pbybary,serfu,gevny,vaivgrq,ebyy,ernpu,qvegl,pubbfr,rzretrapl,qebccrq,ohgg,perqvg,boivbhf,ybpxrq,ybivat,ahgf,nterrq,cehr,tbbqolr,pbaqvgvba,thneq,shpxva,tebj,pnxr,zbbq,penc,pelvat,orybat,cnegare,gevpx,cerffher,qerffrq,gnfgr,arpx,ahefr,envfr,ybgf,pneel,jubrire,qevaxvat,gurl'q,oernxvat,svyr,ybpx,jvar,fcbg,cnlvat,nffhzr,nfyrrc,gheavat,ivxv,orqebbz,fubjre,avxbynf,pnzren,svyy,ernfbaf,sbegl,ovttre,abcr,oerngu,qbpgbef,cnagf,sernx,zbivrf,sbyxf,pernz,jvyq,gehyl,qrfx,pbaivapr,pyvrag,guerj,uhegf,fcraqvat,nafjref,fuveg,punve,ebhtu,qbva,frrf,bhtug,rzcgl,jvaq,njner,qrnyvat,cnpx,gvtug,uhegvat,thrfg,neerfgrq,fnyrz,pbashfrq,fhetrel,rkcrpgvat,qrnpba,hasbeghangryl,tbqqnza,obggyr,orlbaq,jurarire,cbby,bcvavba,fgnegf,wrex,frpergf,snyyvat,arprffnel,oneryl,qnapvat,grfgf,pbcl,pbhfva,nurz,gjryir,grff,fxva,svsgrra,fcrrpu,beqref,pbzcyvpngrq,abjurer,rfpncr,ovttrfg,erfgnhenag,tengrshy,hfhny,ohea,nqqerff,fbzrcynpr,fperj,rireljurer,erterg,tbbqarff,zvfgnxrf,qrgnvyf,erfcbafvovyvgl,fhfcrpg,pbeare,ureb,qhzo,greevsvp,jubb,ubyr,zrzbevrf,b'pybpx,grrgu,ehvarq,ovgr,fgraorpx,yvne,fubjvat,pneqf,qrfcrengr,frnepu,cngurgvp,fcbxr,fpner,znenu,nssbeq,frggyr,fgnlrq,purpxvat,uverq,urnqf,pbaprea,oyrj,nypnmne,punzcntar,pbaarpgvba,gvpxrgf,unccvarff,fnivat,xvffvat,ungrq,crefbanyyl,fhttrfg,cercnerq,bagb,qbjafgnvef,gvpxrg,vg'q,ybbfr,ubyl,qhgl,pbaivaprq,guebjvat,xvffrq,yrtf,ybhq,fngheqnl,onovrf,jurer'q,jneavat,zvenpyr,pneelvat,oyvaq,htyl,fubccvat,ungrf,fvtug,oevqr,pbng,pyrneyl,pryroengr,oevyyvnag,jnagvat,sbeerfgre,yvcf,phfgbql,fperjrq,ohlvat,gbnfg,gubhtugf,ernyvgl,yrkvr,nggvghqr,nqinagntr,tenaqsngure,fnzv,tenaqzn,fbzrqnl,ebbs,zneelvat,cbjreshy,tebja,tenaqzbgure,snxr,zhfg'ir,vqrnf,rkpvgvat,snzvyvne,obzo,obhg,unezbal,fpurqhyr,pncnoyr,cenpgvpnyyl,pbeerpg,pyhr,sbetbggra,nccbvagzrag,qrfreirf,guerng,oybbql,ybaryl,funzr,wnpxrg,ubbx,fpnel,vairfgvtngvba,vaivgr,fubbgvat,yrffba,pevzvany,ivpgvz,shareny,pbafvqrevat,oheavat,fgeratgu,uneqre,fvfgref,chfurq,fubpx,chfuvat,urng,pubpbyngr,zvfrenoyr,pbevagubf,avtugzner,oevatf,mnaqre,penfu,punaprf,fraqvat,erpbtavmr,urnygul,obevat,srrq,ratntrq,urnqrq,gerngrq,xavsr,qent,onqyl,uver,cnvag,cneqba,orunivbe,pybfrg,jnea,tbetrbhf,zvyx,fheivir,raqf,qhzc,erag,erzrzorerq,gunaxftvivat,enva,eriratr,cersre,fcner,cenl,qvfnccrnerq,nfvqr,fgngrzrag,fbzrgvzr,zrng,snagnfgvp,oernguvat,ynhtuvat,fgbbq,nssnve,bhef,qrcraqf,cebgrpgvat,whel,oenir,svatref,zheqrerq,rkcynangvba,cvpxvat,oynu,fgebatre,unaqfbzr,haoryvrinoyr,nalgvzr,funxr,bnxqnyr,jurerire,chyyvat,snpgf,jnvgrq,ybhfl,pvephzfgnaprf,qvfnccbvagrq,jrnx,gehfgrq,yvprafr,abguva,genfu,haqrefgnaqvat,fyvc,fbhaqrq,njnxr,sevraqfuvc,fgbznpu,jrncba,guerngrarq,zlfgrel,irtnf,haqrefgbbq,onfvpnyyl,fjvgpu,senaxyl,purnc,yvsrgvzr,qral,pybpx,tneontr,jul'q,grne,rnef,vaqrrq,punatvat,fvatvat,gval,qrprag,nibvq,zrffrq,svyyrq,gbhpurq,qvfnccrne,rknpg,cvyyf,xvpxrq,unez,sbeghar,cergraqvat,vafhenapr,snapl,qebir,pnerq,orybatf,avtugf,yberynv,yvsg,gvzvat,thnenagrr,purfg,jbxr,ohearq,jngpurq,urnqvat,frysvfu,qevaxf,qbyy,pbzzvggrq,ryringbe,serrmr,abvfr,jnfgvat,prerzbal,hapbzsbegnoyr,fgnevat,svyrf,ovxr,fgerff,crezvffvba,guebja,cbffvovyvgl,obeebj,snohybhf,qbbef,fpernzvat,obar,knaqre,jung'er,zrny,ncbybtl,natre,ubarlzbba,onvy,cnexvat,svkrq,jnfu,fgbyra,frafvgvir,fgrnyvat,cubgb,pubfr,yrgf,pbzsbeg,jbeelvat,cbpxrg,zngrb,oyrrqvat,fubhyqre,vtaber,gnyrag,gvrq,tnentr,qvrf,qrzbaf,qhzcrq,jvgpurf,ehqr,penpx,obgurevat,enqne,fbsg,zrnagvzr,tvzzr,xvaqf,sngr,pbapragengr,guebng,cebz,zrffntrf,vagraq,nfunzrq,fbzrguva,znantr,thvyg,vagreehcg,thgf,gbathr,fubr,onfrzrag,fragrapr,chefr,tynffrf,pnova,havirefr,ercrng,zveebe,jbhaq,geniref,gnyy,ratntrzrag,gurencl,rzbgvbany,wrrm,qrpvfvbaf,fbhc,guevyyrq,fgnxr,purs,zbirf,rkgerzryl,zbzragf,rkcrafvir,pbhagvat,fubgf,xvqanccrq,pyrnavat,fuvsg,cyngr,vzcerffrq,fzryyf,genccrq,nvqna,xabpxrq,punezvat,nggenpgvir,nethr,chgf,juvc,rzoneenffrq,cnpxntr,uvggvat,ohfg,fgnvef,nynez,cher,anvy,areir,vaperqvoyl,jnyxf,qveg,fgnzc,greevoyl,sevraqyl,qnzarq,wbof,fhssrevat,qvfthfgvat,fgbccvat,qryvire,evqvat,urycf,qvfnfgre,onef,pebffrq,genc,gnyxf,rttf,puvpx,guerngravat,fcbxra,vagebqhpr,pbasrffvba,rzoneenffvat,ontf,vzcerffvba,tngr,erchgngvba,cerfragf,pung,fhssre,nethzrag,gnyxva,pebjq,ubzrjbex,pbvapvqrapr,pnapry,cevqr,fbyir,ubcrshyyl,cbhaqf,cvar,zngr,vyyrtny,trarebhf,bhgsvg,znvq,ongu,chapu,sernxrq,orttvat,erpnyy,rawblvat,cercner,jurry,qrsraq,fvtaf,cnvashy,lbhefryirf,znevf,gung'q,fhfcvpvbhf,pbbxvat,ohggba,jnearq,fvkgl,cvgl,lryyvat,njuvyr,pbasvqrapr,bssrevat,cyrnfrq,cnavp,uref,trggva,ershfr,tenaqcn,grfgvsl,pubvprf,pehry,zragny,tragyrzna,pbzn,phggvat,cebgrhf,thrfgf,rkcreg,orarsvg,snprf,whzcrq,gbvyrg,farnx,unyybjrra,cevinpl,fzbxvat,erzvaqf,gjvaf,fjvat,fbyvq,bcgvbaf,pbzzvgzrag,pehfu,nzohynapr,jnyyrg,tnat,ryrira,bcgvba,ynhaqel,nffher,fgnlf,fxvc,snvy,qvfphffvba,pyvavp,orgenlrq,fgvpxvat,oberq,znafvba,fbqn,furevss,fhvgr,unaqyrq,ohfgrq,ybnq,unccvre,fghqlvat,ebznapr,cebprqher,pbzzvg,nffvtazrag,fhvpvqr,zvaqf,fjvz,lryy,yynaivrj,punfvat,cebcre,oryvrirf,uhzbe,ubcrf,ynjlref,tvnag,yngrfg,rfpncrq,cnerag,gevpxf,vafvfg,qebccvat,purre,zrqvpngvba,syrfu,ebhgvar,fnaqjvpu,unaqrq,snyfr,orngvat,jneenag,njshyyl,bqqf,gerngvat,guva,fhttrfgvat,srire,fjrng,fvyrag,pyrire,fjrngre,znyy,funevat,nffhzvat,whqtzrag,tbbqavtug,qvibeprq,fheryl,fgrcf,pbasrff,zngu,yvfgrarq,pbzva,nafjrerq,ihyarenoyr,oyrff,qernzvat,puvc,mreb,cvffrq,angr,xvyyf,grnef,xarrf,puvyy,oenvaf,hahfhny,cnpxrq,qernzrq,pher,ybbxva,tenir,purngvat,oernxf,ybpxre,tvsgf,njxjneq,guhefqnl,wbxvat,ernfbanoyr,qbmra,phefr,dhnegreznvar,zvyyvbaf,qrffreg,ebyyvat,qrgnvy,nyvra,qryvpvbhf,pybfvat,inzcverf,jber,gnvy,frpher,fnynq,zheqrere,fcvg,bssrafr,qhfg,pbafpvrapr,oernq,nafjrevat,ynzr,vaivgngvba,tevrs,fzvyvat,certanapl,cevfbare,qryvirel,thneqf,ivehf,fuevax,serrmvat,jerpx,znffvzb,jver,grpuavpnyyl,oybja,nakvbhf,pnir,ubyvqnlf,pyrnerq,jvfurf,pnevat,pnaqyrf,obhaq,punez,chyfr,whzcvat,wbxrf,obbz,bppnfvba,fvyrapr,abafrafr,sevtugrarq,fyvccrq,qvzren,oybjvat,eryngvbafuvcf,xvqanccvat,fcva,gbby,ebkl,cnpxvat,oynzvat,jenc,bofrffrq,sehvg,gbegher,crefbanyvgl,gurer'yy,snvel,arprffnevyl,friragl,cevag,zbgry,haqrejrne,tenzf,rkunhfgrq,oryvrivat,sernxvat,pnershyyl,genpr,gbhpuvat,zrffvat,erpbirel,vagragvba,pbafrdhraprf,oryg,fnpevsvpr,pbhentr,rawblrq,nggenpgrq,erzbir,grfgvzbal,vagrafr,urny,qrsraqvat,hasnve,eryvrirq,yblny,fybjyl,ohmm,nypbuby,fhecevfrf,cflpuvngevfg,cynva,nggvp,jub'q,havsbez,greevsvrq,pyrnarq,mnpu,guerngra,sryyn,rarzvrf,fngvfsvrq,vzntvangvba,ubbxrq,urnqnpur,sbetrggvat,pbhafrybe,naqvr,npgrq,onqtr,anghenyyl,sebmra,fnxrf,nccebcevngr,gehax,qhaab,pbfghzr,fvkgrra,vzcerffvir,xvpxvat,whax,tenoorq,haqrefgnaqf,qrfpevor,pyvragf,bjaf,nssrpg,jvgarffrf,fgneivat,vafgvapgf,unccvyl,qvfphffvat,qrfreirq,fgenatref,fheirvyynapr,nqzver,dhrfgvbavat,qenttrq,onea,qrrcyl,jenccrq,jnfgrq,grafr,ubcrq,sryynf,ebbzzngr,zbegny,snfpvangvat,fgbcf,neenatrzragf,ntraqn,yvgrenyyl,cebcbfr,ubarfgl,haqrearngu,fnhpr,cebzvfrf,yrpgher,rvtugl,gbea,fubpxrq,onpxhc,qvssreragyl,avargl,qrpx,ovbybtvpny,currof,rnfr,perrc,jnvgerff,gryrcubar,evccrq,envfvat,fpengpu,evatf,cevagf,gurr,nethvat,rcuenz,nfxf,bbcf,qvare,naablvat,gnttreg,fretrnag,oynfg,gbjry,pybja,unovg,perngher,orezhqn,fanc,ernpg,cnenabvq,unaqyvat,rngra,gurencvfg,pbzzrag,fvax,ercbegre,ahefrf,orngf,cevbevgl,vagreehcgvat,jnerubhfr,yblnygl,vafcrpgbe,cyrnfnag,rkphfrf,guerngf,thrffvat,graq,cenlvat,zbgvir,hapbafpvbhf,zlfgrevbhf,haunccl,gbar,fjvgpurq,enccncbeg,fbbxvr,arvtuobe,ybnqrq,fjber,cvff,onynapr,gbff,zvfrel,guvrs,fdhrrmr,ybool,tbn'hyq,trrm,rkrepvfr,sbegu,obbxrq,fnaqohet,cbxre,rvtugrra,q'lbh,ohel,rirelqnl,qvttvat,perrcl,jbaqrerq,yvire,uzzz,zntvpny,svgf,qvfphffrq,zbeny,urycshy,frnepuvat,syrj,qrcerffrq,nvfyr,pevf,nzra,ibjf,arvtuobef,qnea,pragf,neenatr,naahyzrag,hfryrff,nqiragher,erfvfg,sbhegrra,pryroengvat,vapu,qrog,ivbyrag,fnaq,grny'p,pryroengvba,erzvaqrq,cubarf,cncrejbex,rzbgvbaf,fghoobea,cbhaq,grafvba,fgebxr,fgrnql,bireavtug,puvcf,orrs,fhvgf,obkrf,pnffnqvar,pbyyrpg,gentrql,fcbvy,ernyz,jvcr,fhetrba,fgergpu,fgrccrq,arcurj,arng,yvzb,pbasvqrag,crefcrpgvir,pyvzo,chavfuzrag,svarfg,fcevatsvryq,uvag,sheavgher,oynaxrg,gjvfg,cebprrq,sevrf,jbeevrf,avrpr,tybirf,fbnc,fvtangher,qvfnccbvag,penjy,pbaivpgrq,syvc,pbhafry,qbhogf,pevzrf,npphfvat,funxvat,erzrzorevat,unyyjnl,unysjnl,obgurerq,znqnz,tngure,pnzrenf,oynpxznvy,flzcgbzf,ebcr,beqvanel,vzntvarq,pvtnerggr,fhccbegvir,rkcybfvba,genhzn,bhpu,shevbhf,purng,nibvqvat,jurj,guvpx,bbbu,obneqvat,nccebir,hetrag,fuuu,zvfhaqrefgnaqvat,qenjre,cubal,vagresrer,pngpuvat,onetnva,gentvp,erfcbaq,chavfu,cragubhfr,gubh,enpu,buuu,vafhyg,ohtf,orfvqr,orttrq,nofbyhgr,fgevpgyl,fbpxf,frafrf,farnxvat,erjneq,cbyvgr,purpxf,gnyr,culfvpnyyl,vafgehpgvbaf,sbbyrq,oybjf,gnool,ovggre,nqbenoyr,l'nyy,grfgrq,fhttrfgvba,wrjryel,nyvxr,wnpxf,qvfgenpgrq,furygre,yrffbaf,pbafgnoyr,pvephf,nhqvgvba,ghar,fubhyqref,znfx,urycyrff,srrqvat,rkcynvaf,fhpxrq,eboorel,bowrpgvba,orunir,inyhnoyr,funqbjf,pbhegebbz,pbashfvat,gnyragrq,fznegre,zvfgnxra,phfgbzre,ovmneer,fpnevat,zbgureshpxre,nyreg,irppuvb,erireraq,sbbyvfu,pbzcyvzrag,onfgneqf,jbexre,jurrypunve,cebgrpgvir,tragyr,erirefr,cvpavp,xarr,pntr,jvirf,jrqarfqnl,ibvprf,gbrf,fgvax,fpnerf,cbhe,purngrq,fyvqr,ehvavat,svyyvat,rkvg,pbggntr,hcfvqr,cebirf,cnexrq,qvnel,pbzcynvavat,pbasrffrq,cvcr,zreryl,znffntr,pubc,fcvyy,cenlre,orgenl,jnvgre,fpnz,engf,senhq,oehfu,gnoyrf,flzcngul,cvyy,svygul,friragrra,rzcyblrr,oenpryrg,cnlf,snveyl,qrrcre,neevir,genpxvat,fcvgr,furq,erpbzzraq,bhtugn,anaal,zrah,qvrg,pbea,ebfrf,cngpu,qvzr,qrinfgngrq,fhogyr,ohyyrgf,ornaf,cvyr,pbasvez,fgevatf,cnenqr,obeebjrq,gblf,fgenvtugra,fgrnx,cerzbavgvba,cynagrq,ubaberq,rknz,pbairavrag,geniryvat,ynlvat,vafvfgrq,qvfu,nvgbeb,xvaqyl,tenaqfba,qbabe,grzcre,grrantre,cebira,zbguref,qravny,onpxjneqf,grag,fjryy,abba,unccvrfg,qevirf,guvaxva,fcvevgf,cbgvba,ubyrf,srapr,jungfbrire,erurnefny,bireurneq,yrzzr,ubfgntr,orapu,gelva,gnkv,fubir,zbeba,vzcerff,arrqyr,vagryyvtrag,vafgnag,qvfnterr,fgvaxf,evnaan,erpbire,tebbz,trfgher,pbafgnagyl,onegraqre,fhfcrpgf,frnyrq,yrtnyyl,urnef,qerffrf,furrg,cflpuvp,grrantr,xabpxvat,whqtvat,nppvqragnyyl,jnxvat,ehzbe,znaaref,ubzryrff,ubyybj,qrfcrengryl,gncrf,ersreevat,vgrz,trabn,trne,znwrfgl,pevrq,gbaf,fcryyf,vafgvapg,dhbgr,zbgbeplpyr,pbaivapvat,snfuvbarq,nvqf,nppbzcyvfurq,tevc,ohzc,hcfrggvat,arrqvat,vaivfvoyr,sbetvirarff,srqf,pbzcner,obguref,gbbgu,vaivgvat,rnea,pbzcebzvfr,pbpxgnvy,genzc,wnobg,vagvzngr,qvtavgl,qrnyg,fbhyf,vasbezrq,tbqf,qerffvat,pvtnerggrf,nyvfgnve,yrnx,sbaq,pbexl,frqhpr,yvdhbe,svatrecevagf,rapunagzrag,ohggref,fghssrq,fgniebf,rzbgvbanyyl,genafcynag,gvcf,bkltra,avpryl,yhangvp,qevyy,pbzcynva,naabhaprzrag,hasbeghangr,fync,cenlref,cyht,bcraf,bngu,b'arvyy,zhghny,lnpug,erzrzoref,sevrq,rkgenbeqvanel,onvg,jnegba,fjbea,fgner,fnsryl,erhavba,ohefg,zvtug'ir,qvir,nobneq,rkcbfr,ohqqvrf,gehfgvat,obbmr,fjrrc,fber,fphqqre,cebcreyl,cnebyr,qvgpu,pnapryrq,fcrnxf,tybj,jrnef,guvefgl,fxhyy,evatvat,qbez,qvavat,oraq,harkcrpgrq,cnapnxrf,unefu,synggrerq,nuuu,gebhoyrf,svtugf,snibhevgr,rngf,entr,haqrepbire,fcbvyrq,fybnar,fuvar,qrfgeblvat,qryvorengryl,pbafcvenpl,gubhtugshy,fnaqjvpurf,cyngrf,anvyf,zvenpyrf,sevqtr,qenax,pbagenel,orybirq,nyyretvp,jnfurq,fgnyxvat,fbyirq,fnpx,zvffrf,sbetvira,orag,znpvire,vaibyir,qenttvat,pbbxrq,cbvagvat,sbhy,qhyy,orarngu,urryf,snxvat,qrns,fghag,wrnybhfl,ubcryrff,srnef,phgf,fpranevb,arpxynpr,penfurq,npphfr,erfgenvavat,ubzvpvqr,uryvpbcgre,svevat,fnsre,nhpgvba,ivqrbgncr,gber,erfreingvbaf,cbcf,nccrgvgr,jbhaqf,inadhvfu,vebavp,snguref,rkpvgrzrag,nalubj,grnevat,fraqf,encr,ynhturq,oryyl,qrnyre,pbbcrengr,nppbzcyvfu,jnxrf,fcbggrq,fbegf,erfreingvba,nfurf,gnfgrf,fhccbfrqyl,ybsg,vagragvbaf,vagrtevgl,jvfurq,gbjryf,fhfcrpgrq,vairfgvtngvat,vanccebcevngr,yvcfgvpx,ynja,pbzcnffvba,pnsrgrevn,fpnes,cerpvfryl,bofrffvba,ybfrf,yvtugra,vasrpgvba,tenaqqnhtugre,rkcybqr,onypbal,guvf'yy,fclvat,choyvpvgl,qrcraq,penpxrq,pbafpvbhf,nyyl,nofheq,ivpvbhf,vairagrq,sbeovq,qverpgvbaf,qrsraqnag,oner,naabhapr,fperjvat,fnyrfzna,eboorq,yrnc,ynxrivrj,vafnavgl,erirny,cbffvovyvgvrf,xvqanc,tbja,punvef,jvfuvat,frghc,chavfurq,pevzvanyf,ertergf,encrq,dhnegref,ynzc,qragvfg,naljnlf,nabalzbhf,frzrfgre,evfxf,bjrf,yhatf,rkcynvavat,qryvpngr,gevpxrq,rntre,qbbzrq,nqbcgvba,fgno,fvpxarff,fphz,sybngvat,rairybcr,inhyg,fbery,cergraqrq,cbgngbrf,cyrn,cubgbtencu,cnlonpx,zvfhaqrefgbbq,xvqqb,urnyvat,pnfpnqr,pncrfvqr,fgnoorq,erznexnoyr,oeng,cevivyrtr,cnffvbangr,areirf,ynjfhvg,xvqarl,qvfgheorq,pbml,gver,fuvegf,bira,beqrevat,qrynl,evfxl,zbafgref,ubabenoyr,tebhaqrq,pybfrfg,oernxqbja,onyq,nonaqba,fpne,pbyyne,jbeguyrff,fhpxvat,rabezbhf,qvfgheovat,qvfgheo,qvfgenpg,qrnyf,pbapyhfvbaf,ibqxn,qvfurf,penjyvat,oevrspnfr,jvcrq,juvfgyr,fvgf,ebnfg,eragrq,cvtf,syvegvat,qrcbfvg,obggyrf,gbcvp,evbg,bireernpgvat,ybtvpny,ubfgvyr,rzoneenff,pnfhny,ornpba,nzhfvat,nygne,pynhf,fheiviny,fxveg,funir,cbepu,tubfgf,snibef,qebcf,qvmml,puvyv,nqivfr,fgevxrf,eruno,cubgbtencure,crnprshy,yrrel,urniraf,sbeghangryl,sbbyvat,rkcrpgngvbaf,pvtne,jrnxarff,enapu,cenpgvpvat,rknzvar,penarf,oevor,fnvy,cerfpevcgvba,uhfu,sentvyr,sberafvpf,rkcrafr,qehttrq,pbjf,oryyf,ivfvgbe,fhvgpnfr,fbegn,fpna,znagvpber,vafrpher,vzntvavat,uneqrfg,pyrex,jevfg,jung'yy,fgnegref,fvyx,chzc,cnyr,avpre,unhy,syvrf,obbg,guhzo,gurer'q,ubj'er,ryqref,dhvrgyl,chyyf,vqvbgf,renfr,qralvat,naxyr,nzarfvn,npprcgvat,urnegorng,qrinar,pbasebag,zvahf,yrtvgvzngr,svkvat,neebtnag,ghan,fhccre,fyvtugrfg,fvaf,fnlva,erpvcr,cvre,cngreavgl,uhzvyvngvat,trahvar,fanpx,engvbany,zvaqrq,thrffrq,jrqqvatf,ghzbe,uhzvyvngrq,nfcveva,fcenl,cvpxf,rlrq,qebjavat,pbagnpgf,evghny,creshzr,uvevat,ungvat,qbpxf,perngherf,ivfvbaf,gunaxvat,gunaxshy,fbpx,avargrra,sbex,guebjf,grrantref,fgerffrq,fyvpr,ebyyf,cyrnq,ynqqre,xvpxf,qrgrpgvirf,nffherq,gryyva,funyybj,erfcbafvovyvgvrf,ercnl,ubjql,tveysevraqf,qrnqyl,pbzsbegvat,prvyvat,ireqvpg,vafrafvgvir,fcvyyrq,erfcrpgrq,zrffl,vagreehcgrq,unyyvjryy,oybaq,oyrrq,jneqebor,gnxva,zheqref,onpxf,haqrerfgvzngr,whfgvsl,unezyrff,sehfgengrq,sbyq,ramb,pbzzhavpngr,ohttvat,nefba,junpx,fnynel,ehzbef,boyvtngvba,yvxvat,qrnerfg,pbatenghyngr,iratrnapr,enpx,chmmyr,sverf,pbhegrfl,pnyyre,oynzrq,gbcf,dhvm,cerc,phevbfvgl,pvepyrf,oneorphr,fhaalqnyr,fcvaavat,cflpubgvp,pbhtu,npphfngvbaf,erfrag,ynhtuf,serfuzna,rail,qebja,onegyrg,nffrf,fbsn,cbfgre,uvtuarff,qbpx,ncbybtvrf,gurvef,fgng,fgnyy,ernyvmrf,cflpu,zzzz,sbbyf,haqrefgnaqnoyr,gerngf,fhpprrq,fgve,erynkrq,znxva,tengvghqr,snvgushy,npprag,jvggre,jnaqrevat,ybpngr,varivgnoyr,tergry,qrrq,pehfurq,pbagebyyvat,fzryyrq,ebor,tbffvc,tnzoyvat,pbfzrgvpf,nppvqragf,fhecevfvat,fgvss,fvaprer,ehfurq,ersevtrengbe,cercnevat,avtugznerf,zvwb,vtabevat,uhapu,sverjbexf,qebjarq,oenff,juvfcrevat,fbcuvfgvpngrq,yhttntr,uvxr,rkcyber,rzbgvba,penfuvat,pbagnpgrq,pbzcyvpngvbaf,fuvavat,ebyyrq,evtugrbhf,erpbafvqre,tbbql,trrx,sevtugravat,rguvpf,perrcf,pbhegubhfr,pnzcvat,nssrpgvba,fzlgur,unvephg,rffnl,onxrq,ncbybtvmrq,ivor,erfcrpgf,erprvcg,znzv,ungf,qrfgehpgvir,nqber,nqbcg,genpxrq,fubegf,erzvaqvat,qbhtu,perngvbaf,pnobg,oneery,fahpx,fyvtug,ercbegref,cerffvat,zntavsvprag,znqnzr,ynml,tybevbhf,svnaprr,ovgf,ivfvgngvba,fnar,xvaqarff,fubhyqn,erfphrq,znggerff,ybhatr,yvsgrq,vzcbegnagyl,tybir,ragrecevfrf,qvfnccbvagzrag,pbaqb,orvatf,nqzvggvat,lryyrq,jnivat,fcbba,fperrpu,fngvfsnpgvba,ernqf,anvyrq,jbez,gvpx,erfgvat,zneirybhf,shff,pbegynaqg,punfrq,cbpxrgf,yhpxvyl,yvyvgu,svyvat,pbairefngvbaf,pbafvqrengvba,pbafpvbhfarff,jbeyqf,vaabprapr,sberurnq,ntterffvir,genvyre,fynz,dhvggvat,vasbez,qryvtugrq,qnlyvtug,qnaprq,pbasvqragvny,nhagf,jnfuvat,gbffrq,fcrpgen,zneebj,yvarq,vzcylvat,ungerq,tevyy,pbecfr,pyhrf,fbore,bssraqrq,zbethr,vasrpgrq,uhznavgl,qvfgenpgvba,pneg,jverq,ivbyngvba,cebzvfvat,unenffzrag,tyhr,q'natryb,phefrq,oehgny,jneybpxf,jntba,hacyrnfnag,cebivat,cevbevgvrf,zhfga'g,yrnfr,synzr,qvfnccrnenapr,qrcerffvat,guevyy,fvggre,evof,syhfu,rneevatf,qrnqyvar,pbecbeny,pbyyncfrq,hcqngr,fanccrq,fznpx,zryg,svthevat,qryhfvbany,pbhyqn,oheag,graqre,fcrez,ernyvfr,cbex,cbccrq,vagreebtngvba,rfgrrz,pubbfvat,haqb,cerf,cenlrq,cynthr,znavchyngr,vafhygvat,qrgragvba,qryvtugshy,pbssrrubhfr,orgenlny,ncbybtvmvat,nqwhfg,jerpxrq,jbag,juvccrq,evqrf,erzvaqre,zbafvrhe,snvag,onxr,qvfgerff,pbeerpgyl,pbzcynvag,oybpxrq,gbegherq,evfxvat,cbvagyrff,unaqvat,qhzcvat,phcf,nyvov,fgehttyvat,fuval,evfxrq,zhzzl,zvag,ubfr,ubool,sbeghangr,syrvfpuzna,svggvat,phegnva,pbhafryvat,ebqr,chccrg,zbqryvat,zrzb,veerfcbafvoyr,uhzvyvngvba,uvln,sernxva,srybal,pubxr,oynpxznvyvat,nccerpvngrq,gnoybvq,fhfcvpvba,erpbirevat,cyrqtr,cnavpxrq,ahefrel,ybhqre,wrnaf,vairfgvtngbe,ubzrpbzvat,sehfgengvat,ohlf,ohfgvat,ohss,fyrrir,vebal,qbcr,qrpyner,nhgbcfl,jbexva,gbepu,cevpx,yvzo,ulfgrevpny,tbqqnzavg,srgpu,qvzrafvba,pebjqrq,pyvc,pyvzovat,obaqvat,jbnu,gehfgf,artbgvngr,yrguny,vprq,snagnfvrf,qrrqf,ober,onolfvggre,dhrfgvbarq,bhgentrbhf,xvevnxvf,vafhygrq,tehqtr,qevirjnl,qrfregrq,qrsvavgr,orrc,jverf,fhttrfgvbaf,frnepurq,bjrq,yraq,qehaxra,qrznaqvat,pbfgnamn,pbaivpgvba,ohzcrq,jrvtu,gbhpurf,grzcgrq,fubhg,erfbyir,eryngr,cbvfbarq,zrnyf,vaivgngvbaf,unhagrq,obthf,nhgbtencu,nssrpgf,gbyrengr,fgrccvat,fcbagnarbhf,fyrrcf,cebongvba,znaal,svfg,fcrpgnphyne,ubfgntrf,urebva,univa,unovgf,rapbhentvat,pbafhyg,ohetref,oblsevraqf,onvyrq,onttntr,jngpurf,gebhoyrq,gbeghevat,grnfvat,fjrrgrfg,dhnyvgvrf,cbfgcbar,birejuryzrq,znyxbivpu,vzchyfr,pynffl,punetvat,nznmrq,cbyvprzna,ulcbpevgr,uhzvyvngr,uvqrbhf,q'ln,pbfghzrf,oyhssvat,orggvat,orva,orqgvzr,nypbubyvp,irtrgnoyr,genl,fhfcvpvbaf,fcernqvat,fcyraqvq,fuevzc,fubhgvat,cerffrq,abbb,tevrivat,tynqyl,syvat,ryvzvangr,prerny,nnnu,fbabsnovgpu,cnenylmrq,ybggn,ybpxf,thnenagrrq,qhzzl,qrfcvfr,qragny,oevrsvat,oyhss,onggrevrf,junggn,fbhaqvat,freinagf,cerfhzr,unaqjevgvat,snvagrq,qevrq,nyyevtug,npxabjyrqtr,junpxrq,gbkvp,eryvnoyr,dhvpxre,birejuryzvat,yvavat,unenffvat,sngny,raqyrff,qbyyf,pbaivpg,jungpun,hayvxryl,fuhggvat,cbfvgviryl,birepbzr,tbqqnz,rffrapr,qbfr,qvntabfvf,pherq,ohyyl,nubyq,lrneobbx,grzcgvat,furys,cebfrphgvba,cbhevat,cbffrffrq,terrql,jbaqref,gubebhtu,fcvar,engu,cflpuvngevp,zrnavatyrff,ynggr,wnzzrq,vtaberq,svnapr,rivqragyl,pbagrzcg,pbzcebzvfrq,pnaf,jrrxraqf,hetr,gursg,fhvat,fuvczrag,fpvffbef,erfcbaqvat,cebcbfvgvba,abvfrf,zngpuvat,ubezbarf,unvy,tenaqpuvyqera,tragyl,fznfurq,frkhnyyl,fragvzragny,avprfg,znavchyngrq,vagrea,unaqphssf,senzrq,reenaqf,ragregnvavat,pevo,pneevntr,onetr,fcraqf,fyvccvat,frngrq,ehoovat,eryl,erwrpg,erpbzzraqngvba,erpxba,urnqnpurf,sybng,rzoenpr,pbearef,juvavat,fjrngvat,fxvccrq,zbhagvr,zbgvirf,yvfgraf,pevfgbory,pyrnare,purreyrnqre,onyfbz,haarprffnel,fghaavat,fprag,dhnegreznvarf,cbfr,zbagrtn,ybbfra,vasb,ubggrfg,unhag,tenpvbhf,sbetvivat,reenaq,pnxrf,oynzrf,nobegvba,fxrgpu,fuvsgf,cybggvat,crevzrgre,cnyf,zrer,znggrerq,ybavtna,vagresrerapr,rlrjvgarff,raguhfvnfz,qvncref,fgebatrfg,funxra,chapurq,cbegny,pngpurf,onpxlneq,greebevfgf,fnobgntr,betnaf,arrql,phss,pvivyvmngvba,jbbs,jub'yy,cenax,boabkvbhf,zngrf,urerol,tnool,snxrq,pryyne,juvgryvtugre,ibvq,fgenatyr,fbhe,zhssvaf,vagresrevat,qrzbavp,pyrnevat,obhgvdhr,oneevatgba,greenpr,fzbxrq,evtugl,dhnpx,crgrl,cnpg,xabg,xrgpuhc,qvfnccrnevat,pbeql,hcgvtug,gvpxvat,greevslvat,grnfr,fjnzc,frpergyl,erwrpgvba,ersyrpgvba,ernyvmvat,enlf,zragnyyl,znebar,qbhogrq,qrprcgvba,pbaterffzna,purrfl,gbgb,fgnyyvat,fpbbc,evooba,vzzhar,rkcrpgf,qrfgvarq,orgf,onguvat,nccerpvngvba,nppbzcyvpr,jnaqre,fubirq,frjre,fpebyy,ergver,ynfgf,shtvgvir,serrmre,qvfpbhag,penaxl,penax,pyrnenapr,obqlthneq,nakvrgl,nppbhagnag,jubbcf,ibyhagrrerq,gnyragf,fgvaxvat,erzbgryl,tneyvp,qrprapl,pbeq,orqf,nygbtrgure,havsbezf,gerzraqbhf,cbccvat,bhgn,bofreir,yhat,unatf,srryva,qhqrf,qbangvba,qvfthvfr,pheo,ovgrf,nagvdhr,gbbguoehfu,ernyvfgvp,cerqvpg,ynaqybeq,ubhetynff,urfvgngr,pbafbyngvba,onooyvat,gvccrq,fgenaqrq,fznegrfg,ercrngvat,chxr,cffg,cnlpurpx,bireernpgrq,znpub,whiravyr,tebprel,serfura,qvfcbfny,phssf,pnssrvar,inavfurq,hasvavfurq,evccvat,cvapu,synggrevat,rkcrafrf,qvaaref,pbyyrnthr,pvnb,orygunmbe,nggbearlf,jbhyqn,jurernobhgf,jnvgva,gehpr,gevccrq,gnfgrq,fgrre,cbvfbavat,znavchyngvir,vzzngher,uhfonaqf,urry,tenaqqnq,qryvirevat,pbaqbzf,nqqvpg,genfurq,envavat,cnfgn,arrqyrf,yrnavat,qrgrpgbe,pbbyrfg,ongpu,nccbvagzragf,nyzvtugl,irtrgnoyrf,fcnex,cresrpgvba,cnvaf,zbzzn,zbyr,zrbj,unvef,trgnjnl,penpxvat,pbzcyvzragf,orubyq,iretr,gbhture,gvzre,gnccrq,gncrq,fcrpvnygl,fabbcvat,fubbgf,eraqrmibhf,cragntba,yrirentr,wrbcneqvmr,wnavgbe,tenaqcneragf,sbeovqqra,pyhryrff,ovqqvat,hatengrshy,hanpprcgnoyr,ghgbe,frehz,fphfr,cnwnznf,zbhguf,yher,veengvbany,qbbz,pevrf,ornhgvshyyl,neerfgvat,nccebnpuvat,genvgbe,flzcngurgvp,fzht,fznfu,eragny,cebfgvghgr,cerzbavgvbaf,whzcf,vairagbel,qneyva,pbzzvggvat,onatvat,nfnc,jbezf,ivbyngrq,irag,genhzngvp,genprq,fjrngl,funsg,bireobneq,vafvtug,urnyrq,tenfc,rkcrevrapvat,penccl,peno,puhax,njjj,fgnva,funpx,ernpgrq,cebabhapr,cbherq,zbzf,zneevntrf,wnorm,unaqshy,syvccrq,svercynpr,rzoneenffzrag,qvfnccrnef,pbaphffvba,oehvfrf,oenxrf,gjvfgvat,fjrcg,fhzzba,fcyvggvat,fybccl,frggyvat,erfpurqhyr,abgpu,ubbenl,tenoovat,rkdhvfvgr,qvferfcrpg,gubeauneg,fgenj,fynccrq,fuvccrq,funggrerq,ehguyrff,ersvyy,cnlebyy,ahzo,zbheavat,znayl,uhax,ragregnva,qevsg,qernqshy,qbbefgrc,pbasvezngvba,pubcf,nccerpvngrf,inthr,gverf,fgerffshy,fgnfurq,fgnfu,frafrq,cerbpphcvrq,cerqvpgnoyr,abgvpvat,znqyl,thafubg,qbmraf,qbex,pbashfr,pyrnaref,punenqr,punyx,pncchppvab,obhdhrg,nzhyrg,nqqvpgvba,jub'ir,jnezvat,haybpx,fngvfsl,fnpevsvprq,erynkvat,ybar,oybpxvat,oyraq,oynaxrgf,nqqvpgrq,lhpx,uhatre,unzohetre,terrgvat,terrg,tenil,tenz,qernzg,qvpr,pnhgvba,onpxcnpx,nterrvat,junyr,gnyyre,fhcreivfbe,fnpevsvprf,curj,bhapr,veeryrinag,tena,sryba,snibevgrf,snegure,snqr,renfrq,rnfvrfg,pbairavrapr,pbzcnffvbangr,pnar,onpxfgntr,ntbal,nqberf,irvaf,gjrrx,guvrirf,fhetvpny,fgenatryl,fgrgfba,erpvgny,cebcbfvat,cebqhpgvir,zrnavatshy,vzzhavgl,unffyr,tbqqnzarq,sevtugra,qrneyl,prnfr,nzovgvba,jntr,hafgnoyr,fnyintr,evpure,ershfvat,entvat,chzcvat,cerffhevat,zbegnyf,ybjyvsr,vagvzvqngrq,vagragvbanyyl,vafcver,sbetnir,qribgvba,qrfcvpnoyr,qrpvqvat,qnfu,pbzsl,oernpu,onex,nnnnu,fjvgpuvat,fjnyybjrq,fgbir,fpernzrq,fpnef,ehffvnaf,cbhaqvat,cbbs,cvcrf,cnja,yrtvg,vairfg,snerjryy,phegnvaf,pvivyvmrq,pnivne,obbfg,gbxra,fhcrefgvgvba,fhcreangheny,fnqarff,erpbeqre,cflpurq,zbgvingrq,zvpebjnir,unyyryhwnu,sengreavgl,qelre,pbpbn,purjvat,npprcgnoyr,haoryvrinoyl,fzvyrq,fzryyvat,fvzcyre,erfcrpgnoyr,erznexf,xunfvanh,vaqvpngvba,thggre,tenof,shysvyy,synfuyvtug,ryyrabe,oybbqrq,oyvax,oyrffvatf,orjner,huuu,ghes,fjvatf,fyvcf,fubiry,fubpxvat,chss,zveebef,ybpxvat,urnegyrff,senf,puvyqvfu,pneqvnp,hggreyl,ghfpnal,gvpxrq,fghaarq,fgngrfivyyr,fnqyl,cheryl,xvqqva,wrexf,uvgpu,syveg,sner,rdhnyf,qvfzvff,puevfgravat,pnfxrg,p'zrer,oernxhc,ovgvat,nagvovbgvpf,npphfngvba,noqhpgrq,jvgpupensg,guernq,ehaava,chapuvat,cnenzrqvpf,arjrfg,zheqrevat,znfxf,ynjaqnyr,vavgvnyf,tenzcn,pubxvat,punezf,pneryrff,ohfurf,ohaf,ohzzrq,fuerq,fnirf,fnqqyr,erguvax,ertneqf,cerpvapg,crefhnqr,zrqf,znavchyngvat,yynasnve,yrnfu,urnegrq,thnenagrrf,shpxf,qvftenpr,qrcbfvgvba,obbxfgber,obvy,ivgnyf,irvy,gerfcnffvat,fvqrjnyx,frafvoyr,chavfuvat,biregvzr,bcgvzvfgvp,bofrffvat,abgvsl,zbeava,wrbcneql,wnssn,vawrpgvba,uvynevbhf,qrfverf,pbasvqr,pnhgvbhf,lnqn,jurer'er,ivaqvpgvir,ivny,grral,fgebyy,fvggva,fpeho,erohvyq,cbfgref,beqrny,ahaf,vagvznpl,vaurevgnapr,rkcybqrq,qbangr,qvfgenpgvat,qrfcnve,penpxref,jvyqjvaq,iveghr,gubebhtuyl,gnvyf,fcvpl,fxrgpurf,fvtugf,furre,funivat,frvmr,fpnerpebj,erserfuvat,cebfrphgr,cynggre,ancxva,zvfcynprq,zrepunaqvfr,ybbal,wvak,urebvp,senaxrafgrva,nzovgvbhf,flehc,fbyvgnel,erfrzoynapr,ernpgvat,cerzngher,ynirel,synfurf,purdhr,njevtug,npdhnvagrq,jenccvat,hagvr,fnyhgr,ernyvfrq,cevpryrff,cneglvat,yvtugyl,yvsgvat,xnfabss,vafvfgvat,tybjvat,trarengbe,rkcybfvirf,phgvr,pbasebagrq,ohgf,oybhfr,onyyvfgvp,nagvqbgr,nanylmr,nyybjnapr,nqwbhearq,hagb,haqrefgngrzrag,ghpxrq,gbhpul,fhopbafpvbhf,fperjf,fnetr,ebbzzngrf,enzonyqv,bssraq,areq,xavirf,veerfvfgvoyr,vapncnoyr,ubfgvyvgl,tbqqnzzvg,shfr,seng,phesrj,oynpxznvyrq,jnyxva,fgneir,fyrvtu,fnepnfgvp,erprff,erobhaq,cvaarq,cneybe,bhgsvgf,yviva,urnegnpur,unverq,shaqenvfre,qbbezna,qvfperrg,qvyhppn,penpxf,pbafvqrengr,pyvzorq,pngrevat,ncbcuvf,mbrl,hevar,fgehat,fgvgpurf,fbeqvq,fnex,cebgrpgbe,cubarq,crgf,ubfgrff,synj,synibe,qrirenhk,pbafhzrq,pbasvqragvnyvgl,obheoba,fgenvtugrarq,fcrpvnyf,fcnturggv,cerggvre,cbjreyrff,cynlva,cynltebhaq,cnenabvn,vafgnagyl,unibp,rknttrengvat,rnirfqebccvat,qbhtuahgf,qvirefvba,qrrcrfg,phgrfg,pbzo,oryn,orunivat,nalcynpr,npprffbel,jbexbhg,genafyngr,fghssvat,fcrrqvat,fyvzr,eblnygl,cbyyf,znevgny,yhexvat,ybggrel,vzntvanel,terrgvatf,snvejvaqf,ryrtnag,ryobj,perqvovyvgl,perqragvnyf,pynjf,pubccrq,oevqny,orqfvqr,onolfvggvat,jvggl,hasbetvinoyr,haqrejbeyq,grzcg,gnof,fbcubzber,frysyrff,frperpl,erfgyrff,bxrl,zbiva,zrgncube,zrffrf,zrygqbja,yrpgre,vapbzvat,tnfbyvar,qvrsraonxre,ohpxyr,nqzverq,nqwhfgzrag,jnezgu,guebngf,frqhprq,dhrre,cneragvat,abfrf,yhpxvrfg,tenirlneq,tvsgrq,sbbgfgrcf,qvzrenf,plavpny,jrqqrq,ireony,hacerqvpgnoyr,gharq,fgbbc,fyvqrf,fvaxvat,evttrq,cyhzovat,yvatrevr,unaxrl,terrq,rirejbbq,rybcr,qerffre,punhssrhe,ohyyrgva,ohttrq,obhapvat,grzcgngvba,fgenatrfg,fynzzrq,fnepnfz,craqvat,cnpxntrf,beqreyl,bofrffvir,zheqreref,zrgrbe,vapbairavrapr,tyvzcfr,sebmr,rkrphgr,pbhentrbhf,pbafhyngr,pybfrf,obffrf,orrf,nzraqf,jhff,jbysenz,jnpxl,harzcyblrq,grfgvslvat,flevatr,fgrj,fgnegyrq,fbeebj,fyrnml,funxl,fpernzf,efdhb,erznex,cbxr,ahggl,zragvbavat,zraq,vafcvevat,vzchyfvir,ubhfrxrrcre,sbnz,svatreanvyf,pbaqvgvbavat,onxvat,juvar,guht,fgneirq,favssvat,frqngvir,cebtenzzrq,cvpxrg,cntrq,ubhaq,ubzbfrkhny,ubzb,uvcf,sbetrgf,syvccvat,syrn,synggre,qjryy,qhzcfgre,pubb,nffvtazragf,nagf,ivyr,haernfbanoyr,gbffvat,gunaxrq,fgrnyf,fbhirave,fpengpurq,cflpubcngu,bhgf,bofgehpgvba,borl,yhzc,vafvfgf,unenff,tybng,svygu,rqtl,qvqa,pbebare,pbasrffvat,oehvfr,orgenlvat,onvyvat,nccrnyvat,nqrovfv,jengu,jnaqrerq,jnvfg,inva,gencf,fgrcsngure,cbxvat,boyvtngrq,urnirayl,qvyrzzn,penmrq,pbagntvbhf,pbnfgre,purrevat,ohaqyr,ibzvg,guvatl,fcrrpurf,eboovat,ensg,chzcrq,cvyybjf,crrc,cnpxf,artyrpgrq,z'xnl,ybaryvarff,vagehqr,uryyhin,tneqrare,sbeerfgref,qebbyvat,orgpun,infr,fhcreznexrg,fdhng,fcvggvat,eulzr,eryvrir,erprvcgf,enpxrg,cvpgherq,cnhfr,bireqhr,zbgvingvba,zbetraqbessre,xvqanccre,vafrpg,ubeaf,srzvavar,rlronyyf,qhzcf,qvfnccbvagvat,pebpx,pbairegvoyr,pynj,pynzc,pnaarq,pnzovnf,ongugho,ninaln,negrel,jrrc,jnezre,fhfcrafr,fhzzbarq,fcvqref,ervore,enivat,chful,cbfgcbarq,buuuu,abbbb,zbyq,ynhtugre,vapbzcrgrag,uhttvat,tebprevrf,qevc,pbzzhavpngvat,nhagvr,nqvbf,jencf,jvfre,jvyyvatyl,jrveqrfg,gvzzvu,guvaare,fjryyvat,fjng,fgrebvqf,frafvgvivgl,fpencr,erurnefr,cebcurpl,yrqtr,whfgvsvrq,vafhygf,ungrshy,unaqyrf,qbbejnl,punggvat,ohlre,ohpxnebb,orqebbzf,nfxva,nzzb,ghgbevat,fhocbran,fpengpuvat,cevivyrtrf,cntre,zneg,vagevthvat,vqvbgvp,tencr,rayvtugra,pbeehcg,oehapu,oevqrfznvq,onexvat,nccynhfr,npdhnvagnapr,jergpurq,fhcresvpvny,fbnx,fzbbguyl,frafvat,erfgenvag,cbfvat,cyrnqvat,cnlbss,bcenu,arzb,zbenyf,ybns,whzcl,vtabenag,ureony,unatva,trezf,trarebfvgl,synfuvat,qbhtuahg,pyhzfl,pubpbyngrf,pncgvir,orunirq,ncbybtvfr,inavgl,fghzoyrq,cerivrj,cbvfbabhf,crewhel,cneragny,baobneq,zhttrq,zvaqvat,yvara,xabgf,vagreivrjvat,uhzbhe,tevaq,ternfl,tbbaf,qenfgvp,pbbc,pbzcnevat,pbpxl,pyrnere,oehvfrq,oent,ovaq,jbegujuvyr,jubbc,inadhvfuvat,gnoybvqf,fcehat,fcbgyvtug,fragrapvat,enpvfg,cebibxr,cvavat,bireyl,ybpxrg,vzcyl,vzcngvrag,ubirevat,ubggre,srfg,raqher,qbgf,qbera,qrogf,penjyrq,punvarq,oevg,oernguf,jrveqb,jnezrq,jnaq,gebhoyvat,gbx'en,fgenccrq,fbnxrq,fxvccvat,fpenzoyrq,enggyr,cebsbhaq,zhfgn,zbpxvat,zvfhaqrefgnaq,yvzbhfvar,xnpy,uhfgyr,sberafvp,raguhfvnfgvp,qhpg,qenjref,qrinfgngvat,pbadhre,pynevsl,puberf,purreyrnqref,purncre,pnyyva,oyhfuvat,onetvat,nohfrq,lbtn,jerpxvat,jvgf,jnssyrf,ivetvavgl,ivorf,havaivgrq,hasnvgushy,gryyre,fgenatyrq,fpurzvat,ebcrf,erfphvat,enir,cbfgpneq,b'ervyl,zbecuvar,ybgvba,ynqf,xvqarlf,whqtrzrag,vgpu,vaqrsvavgryl,teranqr,tynzbebhf,trargvpnyyl,serhq,qvfpergvba,qryhfvbaf,pengr,pbzcrgrag,onxrel,netu,nuuuu,jrqtr,jntre,hasvg,gevccvat,gbezrag,fhcreureb,fgveevat,fcvany,fbebevgl,frzvane,fprarel,enooyr,carhzbavn,crexf,bireevqr,bbbbu,zvwn,znafynhtugre,znvyrq,yvzr,yrgghpr,vagvzvqngr,thneqrq,tevrir,tenq,sehfgengvba,qbbeoryy,puvangbja,nhguragvp,neenvtazrag,naahyyrq,nyyretvrf,jnagn,irevsl,irtrgnevna,gvtugre,gryrtenz,fgnyx,fcnerq,fubb,fngvfslvat,fnqqnz,erdhrfgvat,craf,birecebgrpgvir,bofgnpyrf,abgvsvrq,anfrqb,tenaqpuvyq,trahvaryl,syhfurq,syhvqf,sybff,rfpncvat,qvgpurq,penzc,pbeal,ohax,ovggra,ovyyvbaf,onaxehcg,lvxrf,jevfgf,hygenfbhaq,hygvznghz,guvefg,favss,funxrf,fnyfn,ergevrir,ernffhevat,chzcf,arhebgvp,artbgvngvat,arrqa'g,zbavgbef,zvyyvbanver,ylqrpxre,yvzc,vapevzvangvat,ungpurg,tenpvnf,tbeqvr,svyyf,srrqf,qbhogvat,qrpns,ovbcfl,juvm,ibyhagnevyl,iragvyngbe,hacnpx,haybnq,gbnq,fcbbxrq,favgpu,fpuvyyvatre,ernffher,crefhnfvir,zlfgvpny,zlfgrevrf,zngevzbal,znvyf,wbpx,urnqyvar,rkcynangvbaf,qvfcngpu,pheyl,phcvq,pbaqbyraprf,pbzenqr,pnffnqvarf,ohyo,oenttvat,njnvgf,nffnhygrq,nzohfu,nqbyrfprag,nobeg,lnax,juvg,inthryl,haqrezvar,glvat,fjnzcrq,fgnoovat,fyvccref,fynfu,fvapreryl,fvtu,frgonpx,frpbaqyl,ebggvat,cerpnhgvba,cpcq,zrygvat,yvnvfba,ubgf,ubbxvat,urnqyvarf,unun,tnam,shel,sryvpvgl,snatf,rapbhentrzrag,rneevat,qervqry,qbel,qbahg,qvpgngr,qrpbengvat,pbpxgnvyf,ohzcf,oyhroreel,oryvrinoyr,onpxsverq,onpxsver,nceba,nqwhfgvat,ibhf,ibhpu,ivgnzvaf,hzzz,gnggbbf,fyvzl,fvoyvat,fuuuu,eragvat,crphyvne,cnenfvgr,cnqqvatgba,zneevrf,znvyobk,zntvpnyyl,ybiroveqf,xabpxf,vasbeznag,rkvgf,qenmra,qvfgenpgvbaf,qvfpbaarpgrq,qvabfnhef,qnfujbbq,pebbxrq,pbairavragyl,jvax,jnecrq,haqrerfgvzngrq,gnpxl,fubivat,frvmher,erfrg,chfurf,bcrare,zbeavatf,znfu,vairag,vaqhytr,ubeevoyl,unyyhpvangvat,srfgvir,rlroebjf,rawblf,qrfcrengvba,qrnyref,qnexrfg,qncu,obentben,orygf,ontry,nhgubevmngvba,nhqvgvbaf,ntvgngrq,jvfushy,jvzc,inavfu,haornenoyr,gbavp,fhssvpr,fhpgvba,fynlvat,fnsrfg,ebpxvat,eryvir,chggva,cerggvrfg,abvfl,arjyljrqf,anhfrbhf,zvfthvqrq,zvyqyl,zvqfg,yvnoyr,whqtzragny,vaql,uhagrq,tviva,snfpvangrq,ryrcunagf,qvfyvxr,qryhqrq,qrpbengr,pehzzl,pbagenpgvbaf,pneir,obggyrq,obaqrq,onunznf,haninvynoyr,gjragvrf,gehfgjbegul,fhetrbaf,fghcvqvgl,fxvrf,erzbefr,cersrenoyl,cvrf,anhfrn,ancxvaf,zhyr,zbhea,zrygrq,znfurq,vaurevg,terngarff,tbyyl,rkphfrq,qhzob,qevsgvat,qryvevbhf,qnzntvat,phovpyr,pbzcryyrq,pbzz,pubbfrf,purpxhc,oberqbz,onaqntrf,nynezf,jvaqfuvryq,jub'er,junqqln,genafcnerag,fhecevfvatyl,fhatynffrf,fyvg,ebne,ernqr,cebtabfvf,cebor,cvgvshy,crefvfgrag,crnf,abfl,anttvat,zbebaf,znfgrecvrpr,znegvavf,yvzob,yvnef,veevgngvat,vapyvarq,uhzc,ublarf,svnfpb,rngva,phonaf,pbapragengvat,pbybeshy,pynz,pvqre,oebpuher,onegb,onetnvavat,jvttyr,jrypbzvat,jrvtuvat,inadhvfurq,fgnvaf,fbbb,fanpxf,fzrne,fver,erfragzrag,cflpubybtvfg,cvag,bireurne,zbenyvgl,ynaqvatunz,xvffre,ubbg,ubyyvat,unaqfunxr,tevyyrq,sbeznyvgl,ryringbef,qrcguf,pbasvezf,obngubhfr,nppvqragny,jrfgoevqtr,jnpxb,hygrevbe,guhtf,guvtuf,gnatyrq,fgveerq,fant,fyvat,fyrnmr,ehzbhe,evcr,erzneevrq,chqqyr,cvaf,creprcgvir,zvenphybhf,ybatvat,ybpxhc,yvoenevna,vzcerffvbaf,vzzbeny,ulcbgurgvpnyyl,thneqvat,tbhezrg,tnor,snkrq,rkgbegvba,qbjaevtug,qvtrfg,penaoreel,oltbarf,ohmmvat,ohelvat,ovxrf,jrnel,gncvat,gnxrbhg,fjrrcvat,fgrczbgure,fgnyr,frabe,frnobea,cebf,crccrebav,arjobea,yhqvpebhf,vawrpgrq,trrxf,sbetrq,snhygf,qehr,qver,qvrs,qrfv,qrprvivat,pngrere,pnyzrq,ohqtr,naxyrf,iraqvat,glcvat,gevoovnav,gurer'er,fdhnerq,fabjvat,funqrf,frkvfg,erjevgr,erterggrq,envfrf,cvpxl,becuna,zheny,zvfwhqtrq,zvfpneevntr,zrzbevmr,yrnxvat,wvggref,vainqr,vagreehcgvba,vyyrtnyyl,unaqvpnccrq,tyvgpu,tvggrf,svare,qvfgenhtug,qvfcbfr,qvfubarfg,qvtf,qnqf,pehrygl,pvepyvat,pnapryvat,ohggresyvrf,orybatvatf,oneoenql,nzhfrzrag,nyvnf,mbzovrf,jurer'ir,haobea,fjrnevat,fgnoyrf,fdhrrmrq,frafngvbany,erfvfgvat,enqvbnpgvir,dhrfgvbanoyr,cevivyrtrq,cbegbsvab,bjavat,bireybbx,befba,bqqyl,vagreebtngr,vzcrengvir,vzcrppnoyr,uhegshy,ubef,urnc,tenqref,tynapr,qvfthfg,qrivbhf,qrfgehpg,penmvre,pbhagqbja,puhzc,purrfrohetre,ohetyne,oreevrf,onyyebbz,nffhzcgvbaf,naablrq,nyyretl,nqzvere,nqzvenoyr,npgvingr,haqrecnagf,gjvg,gnpx,fgebxrf,fgbby,funz,fpenc,ergneqrq,erfbheprshy,erznexnoyl,erserfu,cerffherq,cerpnhgvbaf,cbvagl,avtugpyho,zhfgnpur,znhv,ynpr,uhau,uhool,syner,qbag,qbxrl,qnatrebhfyl,pehfuvat,pyvatvat,pubxrq,purz,purreyrnqvat,purpxobbx,pnfuzrer,pnyzyl,oyhfu,oryvrire,nznmvatyl,nynf,jung'ir,gbvyrgf,gnpbf,fgnvejryy,fcvevgrq,frjvat,ehoorq,chapurf,cebgrpgf,ahvfnapr,zbgureshpxref,zvatyr,xlanfgba,xanpx,xvaxyr,vzcbfr,thyyvoyr,tbqzbgure,shaavrfg,sevttva,sbyqvat,snfuvbaf,rngre,qlfshapgvbany,qebby,qevccvat,qvggb,pehvfvat,pevgvpvmr,pbaprvir,pybar,prqnef,pnyvore,oevtugre,oyvaqrq,oveguqnlf,onadhrg,nagvpvcngr,naabl,juvz,juvpurire,ibyngvyr,irgb,irfgrq,fuebhq,erfgf,ervaqrre,dhnenagvar,cyrnfrf,cnvayrff,becunaf,becunantr,bssrapr,boyvtrq,artbgvngvba,anepbgvpf,zvfgyrgbr,zrqqyvat,znavsrfg,ybbxvg,yvynu,vagevthrq,vawhfgvpr,ubzvpvqny,tvtnagvp,rkcbfvat,ryirf,qvfgheonapr,qvfnfgebhf,qrcraqrq,qrzragrq,pbeerpgvba,pbbcrq,purreshy,ohlref,oebjavrf,orirentr,onfvpf,neiva,jrvtuf,hcfrgf,harguvpny,fjbyyra,fjrngref,fghcvqrfg,frafngvba,fpnycry,cebcf,cerfpevorq,cbzcbhf,bowrpgvbaf,zhfuebbzf,zhyjenl,znavchyngvba,yherq,vagreafuvc,vafvtavsvpnag,vazngr,vapragvir,shysvyyrq,qvfnterrzrag,pelcg,pbearerq,pbcvrq,oevtugrfg,orrgubira,nggraqnag,nznmr,lbtheg,jlaqrzrer,ibpnohynel,ghyfn,gnpgvp,fghssl,erfcvengbe,cergraqf,cbyltencu,craavrf,beqvanevyl,byvirf,arpxf,zbenyyl,znegle,yrsgbiref,wbvagf,ubccvat,ubzrl,uvagf,urnegoebxra,sbetr,sybevfg,svefgunaq,svraq,qnaql,pevccyrq,pbeerpgrq,pbaavivat,pbaqvgvbare,pyrnef,purzb,ohooyl,oynqqre,orrcre,oncgvfz,jvevat,jrapu,jrnxarffrf,ibyhagrrevat,ivbyngvat,haybpxrq,ghzzl,fheebtngr,fhovq,fgenl,fgnegyr,fcrpvsvpf,fybjvat,fpbbg,ebooref,evtugshy,evpurfg,dskzwevr,chssf,cvreprq,crapvyf,cnenylfvf,znxrbire,yhapurba,yvaxflaretl,wrexl,wnphmmv,uvgpurq,unatbire,senpgher,sybpx,sverzra,qvfthfgrq,qnearq,pynzf,obeebjvat,onatrq,jvyqrfg,jrveqre,hanhgubevmrq,fghagf,fyrrirf,fvkgvrf,fuhfu,funyg,ergeb,dhvgf,crttrq,cnvashyyl,cntvat,bzryrg,zrzbevmrq,ynjshyyl,wnpxrgf,vagreprcg,vaterqvrag,tebjahc,tyhrq,shysvyyvat,rapunagrq,qryhfvba,qnevat,pbzcryyvat,pnegba,oevqrfznvqf,oevorq,obvyvat,onguebbzf,onaqntr,njnvgvat,nffvta,neebtnapr,nagvdhrf,nvafyrl,ghexrlf,genfuvat,fgbpxvatf,fgnyxrq,fgnovyvmrq,fxngrf,frqngrq,eborf,erfcrpgvat,cflpur,cerfhzcghbhf,cerwhqvpr,cnentencu,zbpun,zvagf,zngvat,znagna,ybear,ybnqf,yvfgrare,vgvarenel,urcngvgvf,urnir,thrffrf,snqvat,rknzvavat,qhzorfg,qvfujnfure,qrprvir,phaavat,pevccyr,pbaivpgvbaf,pbasvqrq,pbzchyfvir,pbzcebzvfvat,ohetynel,ohzcl,oenvajnfurq,orarf,neavr,nssvezngvir,nqeranyvar,nqnznag,jngpuva,jnvgerffrf,genaftravp,gbhturfg,gnvagrq,fheebhaq,fgbezrq,fcerr,fcvyyvat,fcrpgnpyr,fbnxvat,fuerqf,frjref,frirerq,fpnepr,fpnzzvat,fpnyc,erjvaq,erurnefvat,cergragvbhf,cbgvbaf,bireengrq,bofgnpyr,areqf,zrrzf,zpzhecul,zngreavgl,znarhire,ybngur,sregvyvgl,rybcvat,rpfgngvp,rpfgnfl,qvibepvat,qvtana,pbfgvat,pyhoubhfr,pybpxf,pnaqvq,ohefgvat,oerngure,oenprf,oraqvat,nefbavfg,nqberq,nofbeo,inyvnag,hcubyq,hanezrq,gbcbyfxl,guevyyvat,guvtu,grezvangr,fhfgnva,fcnprfuvc,faber,farrmr,fzhttyvat,fnygl,dhnvag,cngebavmr,cngvb,zbeovq,znzzn,xrggyr,wblbhf,vaivapvoyr,vagrecerg,vafrphevgvrf,vzchyfrf,vyyhfvbaf,ubyrq,rkcybvg,qeviva,qrsrafryrff,qrqvpngr,penqyr,pbhcba,pbhagyrff,pbawher,pneqobneq,obbxvat,onpxfrng,nppbzcyvfuzrag,jbeqfjbegu,jvfryl,inyrg,inppvar,hetrf,haangheny,hayhpxl,gehguf,genhzngvmrq,gnfgvat,fjrnef,fgenjoreevrf,fgrnxf,fgngf,fxnax,frqhpvat,frpergvir,fphzont,fperjqevire,fpurqhyrf,ebbgvat,evtugshyyl,enggyrq,dhnyvsvrf,chccrgf,cebfcrpgf,cebagb,cbffr,cbyyvat,crqrfgny,cnyzf,zhqql,zbegl,zvpebfpbcr,zrepv,yrpghevat,vawrpg,vapevzvangr,ultvrar,tencrsehvg,tnmrob,shaavre,phgre,obffl,obbol,nvqrf,mraqr,jvaguebc,jneenagf,inyragvarf,haqerffrq,haqrentr,gehgushyyl,gnzcrerq,fhssref,fcrrpuyrff,fcnexyvat,fvqryvarf,fuerx,envyvat,choregl,crfxl,bhgentr,bhgqbbef,zbgvbaf,zbbqf,yhapurf,yvggre,xvqanccref,vgpuvat,vaghvgvba,vzvgngvba,uhzvyvgl,unffyvat,tnyybaf,qehtfgber,qbfntr,qvfehcg,qvccvat,qrenatrq,qrongvat,phpxbb,perzngrq,penmvarff,pbbcrengvat,pvephzfgnagvny,puvzarl,oyvaxvat,ovfphvgf,nqzvevat,jrrcvat,gevnq,genful,fbbguvat,fyhzore,fynlref,fxvegf,fvera,fuvaqvt,fragvzrag,ebfpb,evqqnapr,dhnvq,chevgl,cebprrqvat,cergmryf,cnavpxvat,zpxrpuavr,ybiva,yrnxrq,vagehqvat,vzcrefbangvat,vtabenapr,unzohetref,sbbgcevagf,syhxr,syrnf,srfgvivgvrf,sraprf,srvfgl,rinphngr,rzretrapvrf,qrprvirq,perrcvat,penmvrfg,pbecfrf,pbaarq,pbvapvqraprf,obhaprq,obqlthneqf,oynfgrq,ovggrearff,onybarl,nfugenl,ncbpnylcfr,mvyyvba,jngretngr,jnyycncre,gryrfnir,flzcnguvmr,fjrrgre,fgnegva,fcnqrf,fbqnf,fabjrq,fyrrcbire,fvtabe,frrva,ergnvare,erfgebbz,erfgrq,ercrephffvbaf,eryvivat,erpbapvyr,cerinvy,cernpuvat,bireernpg,b'arvy,abbfr,zbhfgnpur,znavpher,znvqf,ynaqynql,ulcbgurgvpny,ubccrq,ubzrfvpx,uvirf,urfvgngvba,ureof,urpgvp,urnegoernx,unhagvat,tnatf,sebja,svatrecevag,rkunhfgvat,rirelgvzr,qvfertneq,pyvat,purieba,puncrebar,oyvaqvat,ovggl,ornqf,onggyvat,onqtrevat,nagvpvcngvba,hcfgnaqvat,hacebsrffvbany,haurnygul,ghezbvy,gehgushy,gbbgucnfgr,gvccva,gubhtugyrff,gntngnln,fubbgref,frafryrff,erjneqvat,cebcnar,cercbfgrebhf,cvtrbaf,cnfgel,bireurnevat,bofprar,artbgvnoyr,ybare,wbttvat,vgpul,vafvahngvat,vafvqrf,ubfcvgnyvgl,ubezbar,urnefg,sbegupbzvat,svfgf,svsgvrf,rgvdhrggr,raqvatf,qrfgeblf,qrfcvfrf,qrcevirq,phqql,pehfg,pybnx,pvephzfgnapr,purjrq,pnffrebyr,ovqqre,ornere,negbb,nccynhq,nccnyyvat,ibjrq,ivetvaf,ivtvynagr,haqbar,guebggyr,grfgbfgrebar,gnvybe,flzcgbz,fjbbc,fhvgpnfrf,fgbzc,fgvpxre,fgnxrbhg,fcbvyvat,fangpurq,fzbbpul,fzvggra,funzryrff,erfgenvagf,erfrnepuvat,erarj,ershaq,erpynvz,enbhy,chmmyrf,checbfryl,chaxf,cebfrphgrq,cynvq,cvpghevat,cvpxva,cnenfvgrf,zlfgrevbhfyl,zhygvcyl,znfpnen,whxrobk,vagreehcgvbaf,thasver,sheanpr,ryobjf,qhcyvpngr,qencrf,qryvorengr,qrpbl,pelcgvp,pbhcyn,pbaqrza,pbzcyvpngr,pbybffny,pyrexf,pynevgl,oehfurq,onavfurq,netba,nynezrq,jbefuvcf,irefn,hapnaal,grpuavpnyvgl,fhaqnr,fghzoyr,fgevccvat,fuhgf,fpuzhpx,fngva,fnyvin,eboore,eryragyrff,erpbaarpg,erpvcrf,erneenatr,enval,cflpuvngevfgf,cbyvprzra,cyhatr,cyhttrq,cngpurq,bireybnq,b'znyyrl,zvaqyrff,zrahf,yhyynol,ybggr,yrniva,xvyyva,xnevafxl,vainyvq,uvqrf,tebjahcf,tevss,synjf,synful,synzvat,srggrf,rivpgrq,qernq,qrtenffv,qrnyvatf,qnatref,phfuvba,objry,onetrq,novqr,nonaqbavat,jbaqreshyyl,jnvg'yy,ivbyngr,fhvpvqny,fgnlva,fbegrq,fynzzvat,fxrgpul,fubcyvsgvat,envfre,dhvmznfgre,cersref,arrqyrff,zbgureubbq,zbzragnevyl,zvtenvar,yvsgf,yrhxrzvn,yrsgbire,xrrcva,uvaxf,uryyubyr,tbjaf,tbbqvrf,tnyyba,shgherf,ragregnvarq,rvtugvrf,pbafcvevat,purrel,oravta,ncvrpr,nqwhfgzragf,nohfvir,noqhpgvba,jvcvat,juvccvat,jryyrf,hafcrnxnoyr,havqragvsvrq,gevivny,genafpevcgf,grkgobbx,fhcreivfr,fhcrefgvgvbhf,fgevpxra,fgvzhyngvat,fcvryoret,fyvprf,furyirf,fpengpurf,fnobgntrq,ergevriny,ercerffrq,erwrpgvat,dhvpxvr,cbavrf,crrxvat,bhgentrq,b'pbaaryy,zbcvat,zbnavat,znhfbyrhz,yvpxrq,xbivpu,xyhgm,vagreebtngvat,vagresrerq,vafhyva,vasrfgrq,vapbzcrgrapr,ulcre,ubeevsvrq,unaqrqyl,trxxb,senvq,senpgherq,rknzvare,rybcrq,qvfbevragrq,qnfuvat,penfuqbja,pbhevre,pbpxebnpu,puvccrq,oehfuvat,obzorq,obygf,onguf,oncgvmrq,nfgebanhg,nffhenapr,narzvn,nohryn,novqvat,jvguubyqvat,jrnir,jrneva,jrnxre,fhssbpngvat,fgenjf,fgenvtugsbejneq,fgrapu,fgrnzrq,fgneobneq,fvqrjnlf,fuevaxf,fubegphg,fpenz,ebnfgrq,ebnzvat,evivren,erfcrpgshyyl,erchyfvir,cflpuvngel,cebibxrq,cravgragvnel,cnvaxvyyref,avabgpuxn,zvgminu,zvyyvtenzf,zvqtr,znefuznyybjf,ybbxl,yncfr,xhoryvx,vagryyrpg,vzcebivfr,vzcynag,tbn'hyqf,tvqql,travhfrf,sehvgpnxr,sbbgvat,svtugva,qevaxva,qbbex,qrgbhe,phqqyr,penfurf,pbzob,pbybaanqr,purngf,prgren,onvyvss,nhqvgvbavat,nffrq,nzhfrq,nyvrangr,nvqvat,npuvat,hajnagrq,gbcyrff,gbathrf,gvavrfg,fhcrevbef,fbsgra,furyqenxr,enjyrl,envfvaf,cerffrf,cynfgre,arffn,aneebjrq,zvavbaf,zrepvshy,ynjfhvgf,vagvzvqngvat,vasveznel,vapbairavrag,vzcbfgre,uhttrq,ubabevat,ubyqva,unqrf,tbqsbefnxra,shzrf,sbetrel,sbbycebbs,sbyqre,synggrel,svatregvcf,rkgrezvangbe,rkcybqrf,rppragevp,qbqtvat,qvfthvfrq,penir,pbafgehpgvir,pbaprnyrq,pbzcnegzrag,puhgr,puvacbxbzba,obqvyl,nfgebanhgf,nyvzbal,npphfgbzrq,noqbzvany,jevaxyr,jnyybj,inyvhz,hagehr,hapbire,gerzoyvat,gernfherf,gbepurq,gbranvyf,gvzrq,grezvgrf,gryyl,gnhagvat,gnenafxl,gnyxre,fhpphohf,fznegf,fyvqvat,fvtugvat,frzra,frvmherf,fpneerq,fniil,fnhan,fnqqrfg,fnpevsvpvat,ehoovfu,evyrq,enggrq,engvbanyyl,cebiranapr,cubafr,crexl,crqny,bireqbfr,anfny,anavgrf,zhful,zbiref,zvffhf,zvqgrez,zrevgf,zrybqenzngvp,znaher,xavggvat,vainqvat,vagrecby,vapncnpvgngrq,ubgyvar,unhyvat,thacbvag,tenvy,tnamn,senzvat,synaary,snqrq,rnirfqebc,qrffregf,pnybevrf,oerngugnxvat,oyrnx,oynpxrq,onggre,ntteningrq,lnaxrq,jvtnaq,jubnu,hajvaq,haqbhogrqyl,hanggenpgvir,gjvgpu,gevzrfgre,gbeenapr,gvzrgnoyr,gnkcnlref,fgenvarq,fgnerq,fynccvat,fvaprevgl,fvqvat,furanavtnaf,funpxvat,fnccl,fnznevgna,cbbere,cbyvgryl,cnfgr,blfgref,bireehyrq,avtugpnc,zbfdhvgb,zvyyvzrgre,zreevre,znaubbq,yhpxrq,xvybf,vtavgvba,unhyrq,unezrq,tbbqjvyy,serfuzra,srazber,snfgra,snepr,rkcybqvat,reengvp,qehaxf,qvgpuvat,q'negntana,penzcrq,pbagnpgvat,pybfrgf,pyvragryr,puvzc,onetnvarq,neenatvat,narfgurfvn,nzhfr,nygrevat,nsgreabbaf,nppbhagnoyr,norggvat,jbyrx,jnirq,harnfl,gbqql,gnggbbrq,fcnhyqvatf,fyvprq,fveraf,fpuvorggn,fpnggre,evafr,erzrql,erqrzcgvba,cyrnfherf,bcgvzvfz,boyvtr,zzzzz,znfxrq,znyvpvbhf,znvyvat,xbfure,xvqqvrf,whqnf,vfbyngr,vafrphevgl,vapvqragnyyl,urnyf,urnqyvtugf,tebjy,tevyyvat,tynmrq,syhax,sybngf,svrel,snvearff,rkrepvfvat,rkpryyrapl,qvfpybfher,phcobneq,pbhagresrvg,pbaqrfpraqvat,pbapyhfvir,pyvpxrq,pyrnaf,pubyrfgreby,pnfurq,oebppbyv,oengf,oyhrcevagf,oyvaqsbyq,ovyyvat,nggnpu,nccnyyrq,nyevtugl,jlanag,hafbyirq,haeryvnoyr,gbbgf,gvtugra,fjrngfuveg,fgrvaoeraare,fgrnzl,fcbhfr,fbabtenz,fybgf,fyrrcyrff,fuvarf,ergnyvngr,ercuenfr,erqrrz,enzoyvat,dhvyg,dhneery,celvat,cebireovny,cevprq,cerfpevor,cerccrq,cenaxf,cbffrffvir,cynvagvss,crqvngevpf,bireybbxrq,bhgpnfg,avtugtbja,zhzob,zrqvbper,znqrzbvfryyr,yhapugvzr,yvsrfnire,yrnarq,ynzof,vagreaf,ubhaqvat,uryyzbhgu,ununun,tbare,tubhy,tneqravat,seraml,sblre,rkgenf,rknttrengr,rireynfgvat,rayvtugrarq,qvnyrq,qribgr,qrprvgshy,q'brhierf,pbfzrgvp,pbagnzvangrq,pbafcverq,pbaavat,pnirea,pneivat,ohggvat,obvyrq,oyheel,onolfvg,nfprafvba,nnnnnu,jvyqyl,jubbcrr,juval,jrvfxbcs,jnyxvr,ihygherf,inpngvbaf,hcsebag,haerfbyirq,gnzcrevat,fgbpxubyqref,fancf,fyrrcjnyxvat,fuehax,frezba,frqhpgvba,fpnzf,eribyir,curabzrany,cngebyyvat,cnenabezny,bhaprf,bzvtbq,avtugsnyy,ynfuvat,vaabpragf,vasvreab,vapvfvba,uhzzvat,unhagf,tybff,tybngvat,senaavr,srgny,srral,ragenczrag,qvfpbzsbeg,qrgbangbe,qrcraqnoyr,pbaprqr,pbzcyvpngvba,pbzzbgvba,pbzzrapr,puhynx,pnhpnfvna,pnfhnyyl,oenvare,obyvr,onyycnex,najne,nanylmvat,nppbzzbqngvbaf,lbhfr,jevat,jnyybjvat,genaftravpf,guevir,grqvbhf,fglyvfu,fgevccref,fgrevyr,fdhrrmvat,fdhrnxl,fcenvarq,fbyrza,fabevat,funggrevat,funool,frnzf,fpenjal,eribxrq,erfvqhr,errxf,erpvgr,enagvat,dhbgvat,cerqvpnzrag,cyhtf,cvacbvag,crgevsvrq,cngubybtvpny,cnffcbegf,bhtuggn,avtugre,anivtngr,xvccvr,vagevthr,vagragvbany,vafhssrenoyr,uhaxl,ubj'ir,ubeevslvat,urnegl,unzcgbaf,tenmvr,sharenyf,sbexf,srgpurq,rkpehpvngvat,rawblnoyr,raqnatre,qhzore,qelvat,qvnobyvpny,pebffjbeq,pbeel,pbzceruraq,pyvccrq,pynffzngrf,pnaqyryvtug,oehgnyyl,oehgnyvgl,obneqrq,onguebor,nhgubevmr,nffrzoyr,nrebovpf,jubyrfbzr,juvss,irezva,gebcuvrf,genvg,gentvpnyyl,gblvat,grfgl,gnfgrshy,fgbpxrq,fcvanpu,fvccvat,fvqrgenpxrq,fpehoovat,fpencvat,fnapgvgl,eboorevrf,evqva,ergevohgvba,ersenva,ernyvgvrf,enqvnag,cebgrfgvat,cebwrpgbe,cyhgbavhz,cnlva,cnegvat,b'ervyyl,abbbbb,zbgureshpxvat,zrnfyl,znavp,ynyvgn,whttyvat,wrexvat,vageb,varivgnoyl,ulcabfvf,uhqqyr,ubeeraqbhf,uboovrf,urnegsryg,uneyva,unveqerffre,tbabeeurn,shffvat,shegjnatyre,syrrgvat,synjyrff,synfurq,srghf,rhybtl,qvfgvapgyl,qvferfcrpgshy,qravrf,pebffobj,pertt,penof,pbjneqyl,pbagenpgvba,pbagvatrapl,pbasvezvat,pbaqbar,pbssvaf,pyrnafvat,purrfrpnxr,pregnvagl,pntrf,p'rfg,oevrsrq,oenirfg,obfbz,obvyf,ovabphynef,onpuryberggr,nccrgvmre,nzohfurq,nyregrq,jbbml,jvguubyq,ihytne,hgzbfg,hayrnfurq,haubyl,haunccvarff,hapbaqvgvbany,glcrjevgre,glcrq,gjvfgf,fhcrezbqry,fhocbranrq,fgevatvat,fxrcgvpny,fpubbytvey,ebznagvpnyyl,ebpxrq,eribve,erbcra,chapgher,cernpu,cbyvfurq,cynargnevhz,cravpvyyva,crnprshyyl,aheghevat,zber'a,zzuzz,zvqtrgf,znexyne,ybqtrq,yvsryvar,wryylsvfu,vasvygengr,uhgpu,ubefronpx,urvfg,tragf,sevpxva,serrmrf,sbesrvg,synxrf,synve,sngurerq,rgreanyyl,rcvcunal,qvftehagyrq,qvfpbhentrq,qryvadhrag,qrpvcure,qnairef,phorf,perqvoyr,pbcvat,puvyyf,purevfurq,pngnfgebcur,obzofuryy,oveguevtug,ovyyvbanver,nzcyr,nssrpgvbaf,nqzvengvba,noobggf,jungabg,jngrevat,ivartne,haguvaxnoyr,hafrra,hacercnerq,habegubqbk,haqreunaqrq,hapbby,gvzryrff,guhzc,gurezbzrgre,gurbergvpnyyl,gnccvat,gnttrq,fjhat,fgnerf,fcvxrq,fbyirf,fzhttyr,fpnevre,fnhpre,dhvggre,cehqrag,cbjqrerq,cbxrq,cbvagref,crevy,crargengr,cranapr,bcvhz,ahqtr,abfgevyf,arhebybtvpny,zbpxrel,zbofgre,zrqvpnyyl,ybhqyl,vafvtugf,vzcyvpngr,ulcbpevgvpny,uhznayl,ubyvarff,urnyguvre,unzzrerq,unyqrzna,thazna,tybbz,serfuyl,senapf,syhaxrq,synjrq,rzcgvarff,qehttvat,qbmre,qrerixb,qrcevir,qrbqbenag,pelva,pebpbqvyr,pbybevat,pbyqre,pbtanp,pybpxrq,pyvccvatf,punenqrf,punagvat,pregvsvnoyr,pngreref,oehgr,oebpuherf,obgpurq,oyvaqref,ovgpuva,onagre,jbxra,hypre,gernq,gunaxshyyl,fjvar,fjvzfhvg,fjnaf,fgerffvat,fgrnzvat,fgnzcrq,fgnovyvmr,fdhvez,fabbmr,fuhssyr,fuerqqrq,frnsbbq,fpengpul,fnibe,fnqvfgvp,eurgbevpny,eriyba,ernyvfg,cebfrphgvat,cebcurpvrf,cbylrfgre,crgnyf,crefhnfvba,cnqqyrf,b'yrnel,ahguva,arvtuobhe,artebrf,zhfgre,zravatvgvf,zngeba,ybpxref,yrggrezna,yrttrq,vaqvpgzrag,ulcabgvmrq,ubhfrxrrcvat,ubcryrffyl,unyyhpvangvbaf,tenqre,tbyqvybpxf,tveyl,synfx,rairybcrf,qbjafvqr,qbirf,qvffbyir,qvfpbhentr,qvfnccebir,qvnorgvp,qryvirevrf,qrpbengbe,pebffsver,pevzvanyyl,pbagnvazrag,pbzenqrf,pbzcyvzragnel,punggre,pngpul,pnfuvre,pnegry,pnevobh,pneqvbybtvfg,oenjy,obbgrq,oneorefubc,nelna,natfg,nqzvavfgre,mryyvr,jernx,juvfgyrf,inaqnyvfz,inzcf,hgrehf,hcfgngr,hafgbccnoyr,haqrefghql,gevfgva,genafpevcg,genadhvyvmre,gbkvaf,gbafvyf,fgrzcry,fcbggvat,fcrpgngbe,fcnghyn,fbsgre,fabggl,fyvatvat,fubjrerq,frkvrfg,frafhny,fnqqre,evzonhq,erfgenva,erfvyvrag,erzvffvba,ervafgngr,erunfu,erpbyyrpgvba,enovrf,cbcfvpyr,cynhfvoyr,crqvngevp,cngebavmvat,bfgevpu,begbynav,bbbbbu,bzryrggr,zvfgevny,znefrvyyrf,ybbcubyr,ynhtuva,xriil,veevgngrq,vasvqryvgl,ulcbgurezvn,ubeevsvp,tebhcvr,tevaqvat,tenprshy,tbbqfcrrq,trfgherf,senagvp,rkgenqvgvba,rpuryba,qvfxf,qnjavr,qnerq,qnzfry,pheyrq,pbyyngreny,pbyyntr,punag,pnyphyngvat,ohzcvat,oevorf,obneqjnyx,oyvaqf,oyvaqyl,oyrrqf,ovpxrevat,ornfgf,onpxfvqr,niratr,ncceruraqrq,nathvfu,nohfvat,lbhgushy,lryyf,lnaxvat,jubzrire,jura'q,ibzvgvat,iratrshy,hacnpxvat,hasnzvyvne,haqlvat,ghzoyr,gebyyf,gernpurebhf,gvccvat,gnagehz,gnaxrq,fhzzbaf,fgencf,fgbzcrq,fgvaxva,fgvatf,fgnxrq,fdhveeryf,fcevaxyrf,fcrphyngr,fbegvat,fxvaarq,fvpxb,fvpxre,fubbgva,funggre,frrln,fpuanccf,f'cbfrq,ebarr,erfcrpgshy,ertebhc,erterggvat,erryvat,erpxbarq,enzvsvpngvbaf,chqql,cebwrpgvbaf,cerfpubby,cyvffxra,cyngbavp,creznynfu,bhgqbar,bhgohefg,zhgnagf,zhttvat,zvfsbeghar,zvfrenoyl,zvenphybhfyl,zrqvpngvbaf,znetnevgnf,znacbjre,ybirznxvat,ybtvpnyyl,yrrpurf,yngevar,xarry,vasyvpg,vzcbfgbe,ulcbpevfl,uvccvrf,urgrebfrkhny,urvtugrarq,urphon,urnyre,thaarq,tebbzvat,tebva,tbbrl,tybbzl,selvat,sevraqfuvcf,serqb,svercbjre,sngubz,rkunhfgvba,rivyf,raqrnibe,rttabt,qernqrq,q'nepl,pebgpu,pbhtuvat,pbebanel,pbbxva,pbafhzzngr,pbatengf,pbzcnavbafuvc,pnirq,pnfcne,ohyyrgcebbs,oevyyvnapr,oernxva,oenfu,oynfgvat,nybhq,nvegvtug,nqivfvat,nqiregvfr,nqhygrel,npurf,jebatrq,hcorng,gevyyvba,guvatvrf,graqvat,gnegf,fheerny,fcrpf,fcrpvnyvmr,fcnqr,fuerj,funcvat,fryirf,fpubbyjbex,ebbzvr,erphcrengvat,enovq,dhneg,cebibpngvir,cebhqyl,cergrafrf,cerangny,cuneznprhgvpnyf,cnpvat,birejbexrq,bevtvanyf,avpbgvar,zheqrebhf,zvyrntr,znlbaanvfr,znffntrf,ybfva,vagreebtngrq,vawhapgvba,vzcnegvny,ubzvat,urnegoernxre,unpxf,tynaqf,tvire,senvmu,syvcf,synhag,ratyvfuzna,ryrpgebphgrq,qhfgvat,qhpxvat,qevsgrq,qbangvat,plyba,pehgpurf,pengrf,pbjneqf,pbzsbegnoyl,puhzzl,puvgpung,puvyqovegu,ohfvarffjbzna,oebbq,oyngnag,orgul,oneevat,onttrq,njnxrarq,nforfgbf,nvecynarf,jbefuvccrq,jvaavatf,jul'er,ivfhnyvmr,hacebgrpgrq,hayrnfu,genlf,guvpxre,gurencvfgf,gnxrbss,fgervfnaq,fgberebbz,fgrgubfpbcr,fgnpxrq,fcvgrshy,farnxf,fanccvat,fynhtugrerq,fynfurq,fvzcyrfg,fvyirejner,fuvgf,frpyhqrq,fpehcyrf,fpehof,fpencf,ehcgherq,ebnevat,erprcgvbavfg,erpnc,enqvgpu,enqvngbe,chfubire,cynfgrerq,cuneznpvfg,creirefr,crecrgengbe,beanzrag,bvagzrag,avargvrf,anccvat,anaavrf,zbhffr,zbbef,zbzragnel,zvfhaqrefgnaqvatf,znavchyngbe,znyshapgvba,ynprq,xvine,xvpxva,vashevngvat,vzcerffvbanoyr,ubyqhc,uverf,urfvgngrq,urnqcubarf,unzzrevat,tebhaqjbex,tebgrfdhr,tenprf,tnhmr,tnatfgref,sevibybhf,serrvat,sbhef,sbejneqvat,sreenef,snhygl,snagnfvmvat,rkgenpheevphyne,rzcngul,qvibeprf,qrgbangr,qrcenirq,qrzrnavat,qrnqyvarf,qnynv,phefvat,phssyvax,pebjf,pbhcbaf,pbzsbegrq,pynhfgebcubovp,pnfvabf,pnzcrq,ohfobl,oyhgu,oraarggf,onfxrgf,nggnpxre,ncynfgvp,natevre,nssrpgvbangr,mnccrq,jbezubyr,jrnxra,haernyvfgvp,haeniry,havzcbegnag,hasbetrggnoyr,gjnva,fhfcraq,fhcreobjy,fghggre,fgrjneqrff,fgrcfba,fgnaqva,fcnaqrk,fbhiravef,fbpvbcngu,fxryrgbaf,fuvirevat,frkvre,frysvfuarff,fpencobbx,evgnyva,evoobaf,erhavgr,erzneel,erynkngvba,enggyvat,encvfg,cflpubfvf,cerccvat,cbfrf,cyrnfvat,cvffrf,cvyvat,crefrphgrq,cnqqrq,bcrengvirf,artbgvngbe,anggl,zrabcnhfr,zraavuna,znegvzzlf,yblnygvrf,ynlavr,ynaqb,whfgvsvrf,vagvzngryl,varkcrevraprq,vzcbgrag,vzzbegnyvgl,ubeebef,ubbxl,uvatrf,urnegoernxvat,unaqphssrq,tlcfvrf,thnpnzbyr,tebiry,tenmvryyn,tbttyrf,trfgncb,shffl,sreentnzb,srroyr,rlrfvtug,rkcybfvbaf,rkcrevzragvat,rapunagvat,qbhogshy,qvmmvarff,qvfznagyr,qrgrpgbef,qrfreivat,qrsrpgvir,qnatyvat,qnapva,pehzoyr,pernzrq,penzcvat,pbaprny,pybpxjbex,puevffnxrf,puevffnxr,pubccvat,pnovargf,oebbqvat,obasver,oyheg,oybngrq,oynpxznvyre,orsberunaq,ongurq,ongur,onepbqr,onavfu,onqtrf,onooyr,njnvg,nggragvir,nebhfrq,nagvobqvrf,navzbfvgl,ln'yy,jevaxyrq,jbaqreynaq,jvyyrq,juvfx,jnygmvat,jnvgerffvat,ivtvynag,hcoevatvat,hafrysvfu,hapyrf,geraql,genwrpgbel,fgevcrq,fgnzvan,fgnyyrq,fgnxvat,fgnpxf,fcbvyf,fahss,fabbgl,favqr,fuevaxvat,fraben,frpergnevrf,fpbhaqery,fnyvar,fnynqf,ehaqbja,evqqyrf,eryncfr,erpbzzraqvat,enfcoreel,cyvtug,crpna,cnagel,birefyrcg,beanzragf,avare,artyvtrag,artyvtrapr,anvyvat,zhpub,zbhgurq,zbafgebhf,znycenpgvpr,ybjyl,ybvgrevat,ybttrq,yvatrevat,yrggva,ynggrf,xnzny,whebe,wvyyrsfxl,wnpxrq,veevgngr,vagehfvba,vafngvnoyr,vasrpg,vzcebzcgh,vpvat,uzzzz,ursgl,tnfxrg,sevtugraf,synccvat,svefgobea,snhprg,rfgenatrq,raivbhf,qbcrl,qbrfa,qvfcbfvgvba,qvfcbfnoyr,qvfnccbvagzragf,qvccrq,qvtavsvrq,qrprvg,qrnyrefuvc,qrnqorng,phefrf,pbira,pbhafrybef,pbapvretr,pyhgpurf,pnfonu,pnyybhf,pnubbgf,oebgureyl,oevgpurf,oevqrf,orguvr,orvtr,nhgbtencurq,nggraqnagf,nggnobl,nfgbavfuvat,nccerpvngvir,nagvovbgvp,narhelfz,nsgreyvsr,nssvqnivg,mbavat,jungf,junqqnln,infrpgbzl,hafhfcrpgvat,gbhyn,gbcnatn,gbavb,gbnfgrq,gvevat,greebevmrq,graqrearff,gnvyvat,fjrngf,fhssbpngrq,fhpxl,fhopbafpvbhfyl,fgneiva,fcebhgf,fcvaryrff,fbeebjf,fabjfgbez,fzvex,fyvprel,fyrqqvat,fynaqre,fvzzre,fvtaben,fvtzhaq,friragvrf,frqngr,fpragrq,fnaqnyf,ebyyref,ergenpgvba,erfvtavat,erphcrengr,erprcgvir,enpxrgrrevat,dhrnfl,cebibxvat,cevbef,cerebtngvir,cerzrq,cvapurq,craqnag,bhgfvqref,beovat,bccbeghavfg,bynabi,arhebybtvfg,anabobg,zbzzvrf,zbyrfgrq,zvfernq,znaarerq,ynhaqebzng,vagrepbz,vafcrpg,vafnaryl,vasnghngvba,vaqhytrag,vaqvfpergvba,vapbafvqrengr,uheenu,ubjyvat,urecrf,unfgn,unenffrq,unahxxnu,tebiryvat,tebbfnyht,tnaqre,tnynpgvpn,shgvyr,sevqnlf,syvre,svkrf,rkcybvgvat,rkbepvfz,rinfvir,raqbefr,rzcgvrq,qernel,qernzl,qbjaybnqrq,qbqtrq,qbpgberq,qvfborlrq,qvfarlynaq,qvfnoyr,qrulqengrq,pbagrzcyngvat,pbpbahgf,pbpxebnpurf,pybttrq,puvyyvat,puncreba,pnzrenzna,ohyof,ohpxynaqf,oevovat,oenin,oenpryrgf,objryf,oyhrcbvag,nccrgvmref,nccraqvk,nagvpf,nabvagrq,nanybtl,nyzbaqf,lnzzrevat,jvapu,jrveqarff,jnatyre,ivoengvbaf,iraqbe,haznexrq,hanaabhaprq,gjrec,gerfcnff,genirfgl,genafshfvba,genvarr,gbjryvr,gverfbzr,fgenvtugravat,fgnttrevat,fbane,fbpvnyvmvat,fvahf,fvaaref,funzoyrf,frerar,fpencrq,fpbarf,fprcgre,fneevf,fnoreuntra,evqvphybhfyl,evqvphyr,eragf,erpbapvyrq,enqvbf,choyvpvfg,chorf,cehar,cehqr,cerpevzr,cbfgcbavat,cyhpx,crevfu,crccrezvag,crryrq,bireqb,ahgfuryy,abfgnytvp,zhyna,zbhguvat,zvfgbbx,zrqqyr,znlobhear,znegvzzl,ybobgbzl,yviryvubbq,yvcczna,yvxrarff,xvaqrfg,xnssrr,wbpxf,wrexrq,wrbcneqvmvat,wnmmrq,vafherq,vadhvfvgvba,vaunyr,vatravbhf,ubyvre,uryzrgf,urveybbz,urvabhf,unfgr,unezfjnl,uneqfuvc,unaxl,thggref,tehrfbzr,tebcvat,tbbsvat,tbqfba,tyner,svarffr,svthengviryl,sreevr,raqnatrezrag,qernqvat,qbmrq,qbexl,qzvgev,qvireg,qvfperqvg,qvnyvat,phssyvaxf,pehgpu,pencf,pbeehcgrq,pbpbba,pyrnintr,pnaarel,olfgnaqre,oehfurf,oehvfvat,oevorel,oenvafgbez,obygrq,ovatr,onyyvfgvpf,nfghgr,neebjnl,nqiraghebhf,nqbcgvir,nqqvpgf,nqqvpgvir,lnqqn,juvgryvtugref,jrzngnalr,jrrqf,jrqybpx,jnyyrgf,ihyarenovyvgl,iebbz,iragf,hccrq,hafrggyvat,haunezrq,gevccva,gevsyr,genpvat,gbezragvat,gungf,flcuvyvf,fhogrkg,fgvpxva,fcvprf,fberf,fznpxrq,fyhzzvat,fvaxf,fvtaber,fuvggvat,funzrshy,funpxrq,frcgvp,frrql,evtugrbhfarff,eryvfu,erpgvsl,enivfuvat,dhvpxrfg,cubrof,creiregrq,crrvat,crqvpher,cnfgenzv,cnffvbangryl,bmbar,bhgahzorerq,bertnab,bssraqre,ahxrf,abfrq,avtugl,avsgl,zbhagvrf,zbgvingr,zbbaf,zvfvagrecergrq,zrepranel,zragnyvgl,znefryyhf,yhchf,yhzone,ybirfvpx,ybofgref,yrnxl,ynhaqrevat,yngpu,wnsne,vafgvapgviryl,vafcverf,vaqbbef,vapneprengrq,uhaqerqgu,unaqxrepuvrs,tlarpbybtvfg,thvggvrerm,tebhaqubt,tevaavat,tbbqolrf,trrfr,shyyrfg,rlrynfurf,rlrynfu,radhvere,raqyrffyl,ryhfvir,qvfnez,qrgrfg,qryhqvat,qnatyr,pbgvyyvba,pbefntr,pbawhtny,pbasrffvbany,pbarf,pbzznaqzrag,pbqrq,pbnyf,puhpxyr,puevfgznfgvzr,purrfrohetref,puneqbaanl,pryrel,pnzcsver,pnyzvat,oheevgbf,oehaqyr,oebsybifxv,oevtugra,obeqreyvar,oyvaxrq,oyvat,ornhgvrf,onhref,onggrerq,negvphyngr,nyvrangrq,nuuuuu,ntnzrzaba,nppbhagnagf,l'frr,jebatshy,jenccre,jbexnubyvp,jvaarontb,juvfcrerq,jnegf,inpngr,hajbegul,hanafjrerq,gbanar,gbyrengrq,guebjva,gueboovat,guevyyf,gubeaf,gurerbs,gurer'ir,gnebg,fhafperra,fgergpure,fgrerbglcr,fbttl,fboovat,fvmnoyr,fvtugvatf,fuhpxf,fuencary,frire,fravyr,frnobneq,fpbearq,fnire,eroryyvbhf,envarq,chggl,cerahc,cberf,cvapuvat,cregvarag,crrcvat,cnvagf,bihyngvat,bccbfvgrf,bpphyg,ahgpenpxre,ahgpnfr,arjffgnaq,arjsbhaq,zbpxrq,zvqgrezf,znefuznyybj,zneohel,znpynera,yrnaf,xehqfxv,xabjvatyl,xrlpneq,whaxvrf,whvyyvneq,wbyvane,veevgnoyr,vainyhnoyr,vahvg,vagbkvpngvat,vafgehpg,vafbyrag,varkphfnoyr,vaphongbe,vyyhfgevbhf,uhafrpxre,ubhfrthrfg,ubzbfrkhnyf,ubzrebbz,ureavn,unezvat,unaqtha,unyyjnlf,unyyhpvangvba,thafubgf,tebhcvrf,tebttl,tbvgre,tvatreoernq,tvttyvat,sevttvat,syrqtrq,srqrk,snvevrf,rkpunatvat,rknttrengvba,rfgrrzrq,rayvfg,qentf,qvfcrafr,qvfyblny,qvfpbaarpg,qrfxf,qragvfgf,qrynpebvk,qrtrarengr,qnlqernzvat,phfuvbaf,phqqyl,pbeebobengr,pbzcyrkvba,pbzcrafngrq,pbooyre,pybfrarff,puvyyrq,purpxzngr,punaavat,pnebhfry,pnyzf,olynjf,orarsnpgbe,onyytnzr,onvgvat,onpxfgnoovat,negvsnpg,nvefcnpr,nqirefnel,npgva,npphfrf,nppryrenag,nohaqnagyl,nofgvarapr,mvffbh,mnaqg,lnccvat,jvgpul,jvyybjf,junqnln,ivynaqen,irvyrq,haqerff,haqvivqrq,haqrerfgvzngvat,hygvznghzf,gjvey,gehpxybnq,gerzoyr,gbnfgvat,gvatyvat,gragf,grzcrerq,fhyxvat,fghax,fcbatrf,fcvyyf,fbsgyl,favcref,fpbhetr,ebbsgbc,evnan,eribygvat,erivfvg,erserfuzragf,erqrpbengvat,erpncgher,enlfl,cergrafr,cerwhqvprq,cerpbtf,cbhgvat,cbbsf,cvzcyr,cvyrf,crqvngevpvna,cnqer,cnpxrgf,cnprf,beiryyr,boyvivbhf,bowrpgvivgl,avtuggvzr,areibfn,zrkvpnaf,zrhevpr,zrygf,zngpuznxre,znrol,yhtbfv,yvcavx,yrcerpunha,xvffl,xnsxn,vagebqhpgvbaf,vagrfgvarf,vafcvengvbany,vafvtugshy,vafrcnenoyr,vawrpgvbaf,vanqiregragyl,uhffl,uhpxnorrf,uvggva,urzbeeuntvat,urnqva,unlfgnpx,unyybjrq,tehqtrf,tenavyvgu,tenaqxvqf,tenqvat,tenprshyyl,tbqfraq,tbooyrf,sentenapr,syvref,svapuyrl,snegf,rlrjvgarffrf,rkcraqnoyr,rkvfgragvny,qbezf,qrynlvat,qrtenqvat,qrqhpgvba,qneyvatf,qnarf,plybaf,pbhafryybe,pbagenver,pbafpvbhfyl,pbawhevat,pbatenghyngvat,pbxrf,ohssnl,oebbpu,ovgpuvat,ovfgeb,ovwbh,orjvgpurq,oraribyrag,oraqf,ornevatf,oneera,ncgvghqr,nzvfu,nznmrf,nobzvangvba,jbeyqyl,juvfcref,junqqn,jnljneq,jnvyvat,inavfuvat,hcfpnyr,hagbhpunoyr,hafcbxra,hapbagebyynoyr,hanibvqnoyr,hanggraqrq,gevgr,genafirfgvgr,gbhcrr,gvzvq,gvzref,greebevmvat,fjnan,fghzcrq,fgebyyvat,fgbelobbx,fgbezvat,fgbznpuf,fgbxrq,fgngvbarel,fcevatgvzr,fcbagnarvgl,fcvgf,fcvaf,fbncf,fragvzragf,fpenzoyr,fpbar,ebbsgbcf,ergenpg,ersyrkrf,enjqba,enttrq,dhvexl,dhnagvpb,cflpubybtvpnyyl,cebqvtny,cbhapr,cbggl,cyrnfnagevrf,cvagf,crggvat,creprvir,bafgntr,abgjvgufgnaqvat,avooyr,arjznaf,arhgenyvmr,zhgvyngrq,zvyyvbanverf,znlsybjre,znfdhrenqr,znatl,znperrql,yhangvpf,ybinoyr,ybpngvat,yvzcvat,ynfntan,xjnat,xrrcref,whivr,wnqrq,vebavat,vaghvgvir,vagrafryl,vafher,vapnagngvba,ulfgrevn,ulcabgvmr,uhzcvat,unccrava,tevrg,tenfcvat,tybevsvrq,tnatvat,t'avtug,sbpxre,syhaxvat,syvzfl,synhagvat,svkngrq,svgmjnyynpr,snvagvat,rlroebj,rkbarengrq,rgure,ryrpgevpvna,rtbgvfgvpny,rneguyl,qhfgrq,qvtavsl,qrgbangvba,qroevrs,qnmmyvat,qna'y,qnzarqrfg,qnvfvrf,pehfurf,pehpvsl,pbagenonaq,pbasebagvat,pbyyncfvat,pbpxrq,pyvpxf,pyvpur,pvepyrq,punaqryvre,pneohergbe,pnyyref,oebnqf,oerngurf,oybbqfurq,oyvaqfvqrq,oynoovat,ovnylfgbpx,onfuvat,onyyrevan,nivin,negrevrf,nabznyl,nvefgevc,ntbavmvat,nqwbhea,nnnnn,lrneavat,jerpxre,jvgarffvat,jurapr,jneurnq,hafher,haurneq,haserrmr,hasbyq,haonynaprq,htyvrfg,gebhoyrznxre,gbqqyre,gvcgbr,guerrfbzr,guvegvrf,gurezbfgng,fjvcr,fhetvpnyyl,fhogyrgl,fghat,fghzoyvat,fghof,fgevqr,fgenatyvat,fcenlrq,fbpxrg,fzhttyrq,fubjrevat,fuuuuu,fnobgntvat,ehzfba,ebhaqvat,evfbggb,ercnvezna,erurnefrq,enggl,enttvat,enqvbybtl,enpdhrgonyy,enpxvat,dhvrgre,dhvpxfnaq,cebjy,cebzcg,cerzrqvgngrq,cerzngheryl,cenapvat,cbephcvar,cyngrq,cvabppuvb,crrxrq,crqqyr,cnagvat,birejrvtug,bireeha,bhgvat,bhgtebja,bofrff,ahefrq,abqqvat,artngvivgl,artngvirf,zhfxrgrref,zhttre,zbgbepnqr,zreevyl,zngherq,znfdhrenqvat,zneiryybhf,znavnpf,ybirl,ybhfr,yvatre,yvyvrf,ynjshy,xhqbf,xahpxyr,whvprf,whqtzragf,vgpurf,vagbyrenoyr,vagrezvffvba,varcg,vapneprengvba,vzcyvpngvba,vzntvangvir,uhpxyroreel,ubyfgre,urnegohea,thaan,tebbzrq,tenpvbhfyl,shysvyyzrag,shtvgvirf,sbefnxvat,sbetvirf,sberfrrnoyr,synibef,synerf,svkngvba,svpxyr,snagnfvmr,snzvfurq,snqrf,rkcvengvba,rkpynzngvba,renfvat,rvssry,rrevr,rneshy,qhcrq,qhyyrf,qvffvat,qvffrpg,qvfcrafre,qvyngrq,qrgretrag,qrfqrzban,qroevrsvat,qnzcre,phevat,pevfcvan,penpxcbg,pbhegvat,pbeqvny,pbasyvpgrq,pbzcerurafvba,pbzzvr,pyrnahc,puvebcenpgbe,punezre,punevbg,pnhyqeba,pngngbavp,ohyyvrq,ohpxrgf,oevyyvnagyl,oerngurq,obbguf,obneqebbz,oybjbhg,oyvaqarff,oynmvat,ovbybtvpnyyl,ovoyrf,ovnfrq,orfrrpu,oneonevp,onyenw,nhqnpvgl,nagvpvcngvat,nypbubyvpf,nveurnq,ntraqnf,nqzvggrqyl,nofbyhgvba,lbher,lvccrr,jvggyrfrl,jvguuryq,jvyyshy,junzzl,jrnxrfg,jnfurf,iveghbhf,ivqrbgncrf,ivnyf,hacyhttrq,hacnpxrq,hasnveyl,gheohyrapr,ghzoyvat,gevpxvat,gerzraqbhfyl,genvgbef,gbepurf,gvatn,gulebvq,grnfrq,gnjqel,gnxre,flzcnguvrf,fjvcrq,fhaqnrf,fhnir,fgehg,fgrcqnq,fcrjvat,fcnfz,fbpvnyvmr,fyvgure,fvzhyngbe,fuhggref,fuerjq,fubpxf,frznagvpf,fpuvmbcueravp,fpnaf,fnintrf,eln'p,ehaal,ehpxhf,eblnyyl,ebnqoybpxf,erjevgvat,eribxr,ercrag,erqrpbengr,erpbiref,erpbhefr,engpurq,enznyv,enpdhrg,dhvapr,dhvpur,chccrgrre,chxvat,chssrq,ceboyrzb,cenvfrf,cbhpu,cbfgpneqf,cbbcrq,cbvfrq,cvyrq,cubarl,cubovn,cngpuvat,cneragubbq,cneqare,bbmvat,buuuuu,ahzovat,abfgevy,abfrl,arngyl,anccn,anzryrff,zbeghnel,zbebavp,zbqrfgl,zvqjvsr,zppynar,znghxn,znvger,yhzcf,yhpvq,ybbfrarq,ybvaf,ynjazbjre,ynzbggn,xebruare,wvakl,wrffrc,wnzzvat,wnvyubhfr,wnpxvat,vagehqref,vauhzna,vasnghngrq,vaqvtrfgvba,vzcyber,vzcynagrq,ubezbany,ubobxra,uvyyovyyl,urnegjnezvat,urnqjnl,ungpurq,unegznaf,unecvat,tencrivar,tabzr,sbegvrf,sylva,syvegrq,svatreanvy,rkuvynengvat,rawblzrag,rzonex,qhzcre,qhovbhf,qeryy,qbpxvat,qvfvyyhfvbarq,qvfubabe,qvfoneerq,qvprl,phfgbqvny,pbhagrecebqhpgvir,pbearq,pbeqf,pbagrzcyngr,pbaphe,pbaprvinoyr,pbooyrcbg,puvpxrarq,purpxbhg,pnecr,pnc'a,pnzcref,ohlva,ohyyvrf,oenvq,obkrq,obhapl,oyhroreevrf,oyhoorevat,oybbqfgernz,ovtnzl,orrcrq,ornenoyr,nhgbtencuf,nynezvat,jergpu,jvzcf,jvqbjre,juveyjvaq,juvey,jnezf,inaqrynl,hairvyvat,haqbvat,haorpbzvat,gheanebhaq,gbhpur,gbtrgurearff,gvpxyrf,gvpxre,grrafl,gnhag,fjrrgurnegf,fgvgpurq,fgnaqcbvag,fgnssref,fcbgyrff,fbbgur,fzbgurerq,fvpxravat,fubhgrq,furcureqf,funjy,frevbhfarff,fpubbyrq,fpubbyobl,f'zberf,ebcrq,erzvaqref,enttrql,cerrzcgvir,cyhpxrq,curebzbarf,cnegvphynef,cneqbarq,birecevprq,bireornevat,bhgeha,buzvtbq,abfvat,avpxrq,arnaqreguny,zbfdhvgbrf,zbegvsvrq,zvyxl,zrffva,zrpun,znexvafba,zneviryynf,znaardhva,znaqreyrl,znqqre,znpernql,ybbxvr,ybphfgf,yvsrgvzrf,ynaan,ynxuv,xubyv,vzcrefbangr,ulcreqevir,ubeevq,ubcva,ubttvat,urnefnl,unecl,uneobevat,unveqb,unsgn,tenffubccre,tbooyr,tngrubhfr,sbbfonyy,sybbml,svfurq,sverjbbq,svanyvmr,srybaf,rhcurzvfz,ragbhentr,ryvgvfg,ryrtnapr,qebxxra,qevre,qerqtr,qbffvre,qvfrnfrq,qvneeurn,qvntabfr,qrfcvfrq,qrshfr,q'nzbhe,pbagrfgvat,pbafreir,pbafpvragvbhf,pbawherq,pbyynef,pybtf,puravyyr,punggl,punzbzvyr,pnfvat,pnyphyngbe,oevggyr,oernpurq,oyhegrq,oveguvat,ovxvavf,nfgbhaqvat,nffnhygvat,nebzn,nccyvnapr,nagfl,nzavb,nyvrangvat,nyvnfrf,nqbyrfprapr,krebk,jebatf,jbexybnq,jvyyban,juvfgyvat,jrerjbyirf,jnyynol,hajrypbzr,hafrrzyl,hacyht,haqrezvavat,htyvarff,glenaal,ghrfqnlf,gehzcrgf,genafsrerapr,gvpxf,gnatvoyr,gnttvat,fjnyybjvat,fhcreurebrf,fghqf,fgerc,fgbjrq,fgbzcvat,fgrssl,fcenva,fcbhgvat,fcbafbevat,farrmvat,fzrnerq,fyvax,funxva,frjrq,frngoryg,fpnevrfg,fpnzzrq,fnapgvzbavbhf,ebnfgvat,evtugyl,ergvany,erguvaxvat,erfragrq,erehaf,erzbire,enpxf,cherfg,cebterffvat,cerfvqragr,cerrpynzcfvn,cbfgcbarzrag,cbegnyf,cbccn,cyvref,cvaavat,cryivp,cnzcrerq,cnqqvat,birewblrq,bbbbb,bar'yy,bpgnivhf,ababab,avpxanzrf,arhebfhetrba,aneebjf,zvfyrq,zvfyrnq,zvfunc,zvyygbja,zvyxvat,zrgvphybhf,zrqvbpevgl,zrngonyyf,znpurgr,yhepu,ynlva,xabpxva,xuehfpuri,whebef,whzcva,whthyne,wrjryre,vagryyrpghnyyl,vadhvevrf,vaqhytvat,vaqrfgehpgvoyr,vaqrogrq,vzvgngr,vtaberf,ulcreiragvyngvat,ulranf,uheelvat,ureznab,uryyvfu,ururu,unefuyl,unaqbhg,teharznaa,tynaprf,tvirnjnl,trghc,trebzr,shegurfg,sebfgvat,senvy,sbejneqrq,sbeprshy,syniberq,synzznoyr,synxl,svatrerq,sngureyl,rguvp,rzormmyrzrag,qhssry,qbggrq,qvfgerffrq,qvfborl,qvfnccrnenaprf,qvaxl,qvzvavfu,qvncuentz,qrhprf,perzr,pbhegrbhf,pbzsbegf,pbreprq,pybgf,pynevsvpngvba,puhaxf,puvpxvr,punfrf,puncrebavat,pnegbaf,pncre,pnyirf,pntrq,ohfgva,ohytvat,oevatva,obbzunhre,oybjva,oyvaqsbyqrq,ovfpbggv,onyycynlre,onttvat,nhfgre,nffhenaprf,nfpura,neenvtarq,nabalzvgl,nygref,nyongebff,nterrnoyr,nqbevat,noqhpg,jbysv,jrveqrq,jngpuref,jnfuebbz,jneurnqf,ivapraarf,hetrapl,haqrefgnaqnoyl,hapbzcyvpngrq,huuuu,gjvgpuvat,gernqzvyy,gurezbf,grabezna,gnatyr,gnyxngvir,fjnez,fheeraqrevat,fhzzbavat,fgevir,fgvygf,fgvpxref,fdhnfurq,fcenlvat,fcneevat,fbnevat,fabeg,farrmrq,fyncf,fxnaxl,fvatva,fvqyr,fuerpx,fubegarff,fubegunaq,funecre,funzrq,fnqvfg,elqryy,ehfvx,ebhyrggr,erfhzrf,erfcvengvba,erpbhag,ernpgf,chetngbel,cevaprffrf,cerfragnoyr,cbalgnvy,cybggrq,cvabg,cvtgnvyf,cuvyyvccr,crqqyvat,cnebyrq,beorq,bssraqf,b'unen,zbbayvg,zvarsvryq,zrgncubef,znyvtanag,znvasenzr,zntvpxf,znttbgf,znpynvar,ybnguvat,yrcre,yrncf,yrncvat,ynfurq,ynepu,ynepral,yncfrf,ynqlfuvc,whapgher,wvssl,wnxbi,vaibxr,vasnagvyr,vanqzvffvoyr,ubebfpbcr,uvagvat,uvqrnjnl,urfvgngvat,urqql,urpxyrf,unveyvar,tevcr,tengvslvat,tbirearff,tbrooryf,serqqb,sberfrr,snfpvangvba,rkrzcynel,rkrphgvbare,rgprgren,rfpbegf,raqrnevat,rngref,rnecyhtf,qencrq,qvfehcgvat,qvfnterrf,qvzrf,qrinfgngr,qrgnva,qrcbfvgvbaf,qryvpnpl,qnexyvtugre,plavpvfz,plnavqr,phggref,pebahf,pbagvahnapr,pbadhrevat,pbasvqvat,pbzcnegzragf,pbzovat,pbsryy,pyvatl,pyrnafr,puevfgznfrf,purrerq,purrxobarf,ohggyr,oheqrarq,oehraryy,oebbzfgvpx,oenvarq,obmbf,obagrpbh,oyhagzna,oynmrf,oynzryrff,ovmneeb,oryyobl,ornhpbhc,onexrrc,njnxra,nfgenl,nffnvynag,nccrnfr,ncuebqvfvnp,nyyrlf,lrfff,jerpxf,jbbqcrpxre,jbaqebhf,jvzcl,jvyycbjre,jurryvat,jrrcl,jnkvat,jnvir,ivqrbgncrq,irevgnoyr,hagbhpurq,hayvfgrq,hasbhaqrq,hasberfrra,gjvatr,gevttref,genvcfvat,gbkva,gbzofgbar,guhzcvat,gurerva,grfgvpyrf,gryrcubarf,gneznp,gnyol,gnpxyrq,fjveyvat,fhvpvqrf,fhpxrerq,fhogvgyrf,fgheql,fgenatyre,fgbpxoebxre,fgvgpuvat,fgrrerq,fgnaqhc,fdhrny,fcevaxyre,fcbagnarbhfyl,fcyraqbe,fcvxvat,fcraqre,favcr,fanttrq,fxvzzvat,fvqqbja,fubjebbz,fubiryf,fubgthaf,fubrynprf,fuvgybnq,furyysvfu,funecrfg,funqbjl,frvmvat,fpebhatr,fpncrtbng,fnlbanen,fnqqyrq,ehzzntvat,ebbzshy,erabhapr,erpbafvqrerq,erpunetr,ernyvfgvpnyyl,enqvbrq,dhvexf,dhnqenag,chapghny,cenpgvfvat,cbhef,cbbyubhfr,cbygretrvfg,cbpxrgobbx,cynvayl,cvpavpf,crfgb,cnjvat,cnffntrjnl,cnegvrq,barfrys,ahzreb,abfgnytvn,avgjvg,arheb,zvkre,zrnarfg,zporny,zngvarr,znetngr,znepr,znavchyngvbaf,znauhag,znatre,zntvpvnaf,ybnsref,yvginpx,yvtugurnqrq,yvsrthneq,ynjaf,ynhtuvatfgbpx,vatrfgrq,vaqvtangvba,vapbaprvinoyr,vzcbfvgvba,vzcrefbany,vzorpvyr,uhqqyrq,ubhfrjnezvat,ubevmbaf,ubzvpvqrf,uvpphcf,urnefr,uneqrarq,thfuvat,thfuvr,ternfrq,tbqqnzvg,serrynapre,sbetvat,sbaqhr,syhfgrerq,syhat,syvapu,syvpxre,svkva,srfgvihf,sregvyvmre,snegrq,snttbgf,rkbarengr,rivpg,rabezbhfyl,rapelcgrq,rzqnfu,rzoenpvat,qherff,qhcerf,qbjfre,qbbezng,qvfsvtherq,qvfpvcyvarq,qvoof,qrcbfvgbel,qrnguorq,qnmmyrq,phggva,pherf,pebjqvat,percr,penzzrq,pbclpng,pbagenqvpg,pbasvqnag,pbaqrzavat,pbaprvgrq,pbzzhgr,pbzngbfr,pynccvat,pvephzsrerapr,puhccnu,puber,pubxfbaqvx,purfgahgf,oevnhyg,obggbzyrff,obaarg,oybxrf,oreyhgv,orerg,orttnef,onaxebyy,onavn,ngubf,nefravp,nccrenagyl,nuuuuuu,nsybng,nppragf,mvccrq,mrebf,mrebrf,mnzve,lhccvr,lbhatfgref,lbexref,jvfrfg,jvcrf,jvryq,jula'g,jrveqbf,jrqarfqnlf,ivpxfohet,hcpuhpx,hagenprnoyr,hafhcreivfrq,hacyrnfnagarff,haubbx,hapbafpvbanoyr,hapnyyrq,genccvatf,gentrqvrf,gbjavr,guhetbbq,guvatf'yy,guvar,grgnahf,greebevmr,grzcgngvbaf,gnaavat,gnzcbaf,fjnezvat,fgenvgwnpxrg,fgrebvq,fgnegyvat,fgneel,fdhnaqre,fcrphyngvat,fbyybmmb,farnxrq,fyhtf,fxrqnqqyr,fvaxre,fvyxl,fubegpbzvatf,fryyva,frnfbarq,fpehoorq,fperjhc,fpencrf,fpneirf,fnaqobk,fnyrfzra,ebbzvat,ebznaprf,erirer,ercebnpu,ercevrir,erneenatvat,enivar,engvbanyvmr,enssyr,chapul,cflpubonooyr,cebibpngvba,cebsbhaqyl,cerfpevcgvbaf,cersrenoyr,cbyvfuvat,cbnpurq,cyrqtrf,cveryyv,creiregf,birefvmrq,bireqerffrq,bhgqvq,ahcgvnyf,arsnevbhf,zbhgucvrpr,zbgryf,zbccvat,zbatery,zvffva,zrgncubevpnyyl,zregva,zrzbf,zrybqenzn,zrynapubyl,zrnfyrf,zrnare,znagry,znarhirevat,znvyebbz,yhevat,yvfgrava,yvsryrff,yvpxf,yriba,yrtjbex,xarrpncf,xvcche,xvqqvr,xnchg,whfgvsvnoyr,vafvfgrag,vafvqvbhf,vaahraqb,vaavg,vaqrprag,vzntvanoyr,ubefrfuvg,urzbeeubvq,uryyn,urnyguvrfg,unljver,unzfgref,unveoehfu,tebhpul,tevfyl,tenghvgbhf,tyhggba,tyvzzre,tvoorevfu,tunfgyl,tragyre,trarebhfyl,trrxl,shuere,sebagvat,sbbyva,snkrf,snpryrff,rkgvathvfure,rkcry,rgpurq,raqnatrevat,qhpxrq,qbqtronyy,qvirf,qvfybpngrq,qvfpercnapl,qribhe,qrenvy,qrzragvn,qnlpner,plavp,pehzoyvat,pbjneqvpr,pbirg,pbeajnyyvf,pbexfperj,pbbxobbx,pbzznaqzragf,pbvapvqragny,pbojrof,pybhqrq,pybttvat,pyvpxvat,pynfc,pubcfgvpxf,pursf,puncf,pnfuvat,pneng,pnyzre,oenmra,oenvajnfuvat,oenqlf,objvat,obarq,oybbqfhpxvat,oyrnpuref,oyrnpurq,orqcna,orneqrq,oneeratre,onpurybef,njjjj,nffherf,nffvtavat,nfcnenthf,ncceruraq,narpqbgr,nzbeny,ntteningvba,nsbbg,npdhnvagnaprf,nppbzzbqngvat,lnxxvat,jbefuvccvat,jynqrx,jvyyln,jvyyvrf,jvttrq,jubbfu,juvfxrq,jngrerq,jnecngu,ibygf,ivbyngrf,inyhnoyrf,hcuvyy,hajvfr,hagvzryl,hafnibel,haerfcbafvir,hachavfurq,harkcynvarq,ghool,gebyyvat,gbkvpbybtl,gbezragrq,gbbgunpur,gvatyl,gvzzvvuu,guhefqnlf,gubernh,greevsvrf,grzcrenzragny,gryrtenzf,gnyxvr,gnxref,flzovbgr,fjvey,fhssbpngr,fghcvqre,fgenccvat,fgrpxyre,fcevatvat,fbzrjnl,fyrrclurnq,fyrqtrunzzre,fynag,fynzf,fubjtvey,fubiryvat,fuzbbcl,funexonvg,funa'g,fpenzoyvat,fpurzngvpf,fnaqrzna,fnoongvpny,ehzzl,erlxwnivx,erireg,erfcbafvir,erfpurqhyrq,erdhvfvgvba,eryvadhvfu,erwbvpr,erpxbavat,erpnag,eronqbj,ernffhenapr,enggyrfanxr,enzoyr,cevzrq,cevprl,cenapr,cbgubyr,cbphf,crefvfg,crecrgengrq,crxne,crryvat,cnfgvzr,cnezrfna,cnprznxre,bireqevir,bzvabhf,bofreinag,abguvatf,abbbbbb,abarkvfgrag,abqqrq,avrprf,artyrpgvat,anhfrngvat,zhgngrq,zhfxrg,zhzoyvat,zbjvat,zbhgushy,zbbfrcbeg,zbabybthr,zvfgehfg,zrrgva,znffrhfr,znagvav,znvyre,znqer,ybjyvsrf,ybpxfzvgu,yvivq,yvira,yvzbf,yvorengvat,yunfn,yravrapl,yrrevat,ynhtunoyr,ynfurf,ynfntar,ynprengvba,xbeora,xngna,xnyra,wvggrel,wnzzvrf,veercynprnoyr,vaghongr,vagbyrenag,vaunyre,vaunyrq,vaqvssrerag,vaqvssrerapr,vzcbhaq,vzcbyvgr,uhzoyl,urebvpf,urvtu,thvyybgvar,thrfgubhfr,tebhaqvat,tevcf,tbffvcvat,tbngrr,tabzrf,tryyne,sehgg,sebovfure,serhqvna,sbbyvfuarff,synttrq,srzzr,sngfb,sngureubbq,snagnfvmrq,snverfg,snvagrfg,rlryvqf,rkgenintnag,rkgengreerfgevny,rkgenbeqvanevyl,rfpnyngbe,ryringr,qeviry,qvffrq,qvfzny,qvfneenl,qvaaregvzr,qrinfgngvba,qrezngbybtvfg,qryvpngryl,qrsebfg,qrohgnagr,qronpyr,qnzbar,qnvagl,phirr,phycn,pehpvsvrq,perrcrq,penlbaf,pbhegfuvc,pbairar,pbaterffjbzna,pbapbpgrq,pbzcebzvfrf,pbzceraqr,pbzzn,pbyrfynj,pybgurq,pyvavpnyyl,puvpxrafuvg,purpxva,prffcbby,pnfxrgf,pnymbar,oebgury,obbzrenat,obqrtn,oynfcurzl,ovgfl,ovpragraavny,oreyvav,orngva,orneqf,oneonf,oneonevnaf,onpxcnpxvat,neeulguzvn,nebhfvat,neovgengbe,nagntbavmr,natyvat,narfgurgvp,nygrepngvba,ntterffbe,nqirefvgl,npnguyn,nnnuuu,jernxvat,jbexhc,jbaqreva,jvgure,jvryqvat,jung'z,jung'pun,jnkrq,ivoengvat,irgrevanevna,iragvat,infrl,inybe,inyvqngr,hcubyfgrel,hagvrq,hafpngurq,havagreehcgrq,hasbetvivat,haqvrf,haphg,gjvaxvrf,ghpxvat,gerngnoyr,gernfherq,genadhvyvgl,gbjafcrbcyr,gbefb,gbzrv,gvcfl,gvafry,gvqvatf,guvegvrgu,gnagehzf,gnzcre,gnyxl,fjnlrq,fjnccvat,fhvgbe,fglyvfg,fgvef,fgnaqbss,fcevaxyref,fcnexyl,fabool,fangpure,fzbbgure,fyrrcva,fueht,fubrobk,furrfu,funpxyrf,frgonpxf,frqngvirf,fperrpuvat,fpbepurq,fpnaarq,fngle,ebnqoybpx,evireonax,evqvphyrq,erfragshy,ercryyrag,erperngr,erpbairar,erohggny,ernyzrqvn,dhvmmrf,dhrfgvbaanver,chapgherq,chpxre,cebybat,cebsrffvbanyvfz,cyrnfnagyl,cvtfgl,craavyrff,cnlpurpxf,cngvragyl,cnenqvat,birenpgvir,binevrf,beqreyvrf,benpyrf,bvyrq,bssraqvat,ahqvr,arbangny,arvtuobeyl,zbbcf,zbbayvtugvat,zbovyvmr,zzzzzz,zvyxfunxr,zravny,zrngf,znlna,znkrq,znatyrq,znthn,yhanpl,yhpxvre,yvgref,ynafohel,xbbxl,xabjva,wrbcneqvmrq,vaxyvat,vaunyngvba,vasyngrq,vasrpgvat,vaprafr,vaobhaq,vzcenpgvpny,vzcrargenoyr,vqrnyvfgvp,v'zzn,ulcbpevgrf,uhegva,uhzoyrq,ubybtenz,ubxrl,ubphf,uvgpuuvxvat,urzbeeubvqf,urnquhagre,unffyrq,unegf,uneqjbexvat,unvephgf,unpxfnj,travgnyf,tnmvyyvba,tnzzl,tnzrfcurer,shthr,sbbgjrne,sbyyl,synfuyvtugf,svirf,svyrg,rkgrahngvat,rfgebtra,ragnvyf,rzormmyrq,rybdhrag,rtbznavnp,qhpgf,qebjfl,qebarf,qberr,qbabiba,qvfthvfrf,qvttva,qrfregvat,qrcevivat,qrslvat,qrqhpgvoyr,qrpbehz,qrpxrq,qnlyvtugf,qnloernx,qnfuobneq,qnzangvba,phqqyvat,pehapuvat,pevpxrgf,penmvrf,pbhapvyzna,pbhturq,pbahaqehz,pbzcyvzragrq,pbunntra,pyhgpuvat,pyhrq,pynqre,purdhrf,purpxcbvag,pungf,punaaryvat,prnfrf,pnenfpb,pncvfpr,pnagnybhcr,pnapryyvat,pnzcfvgr,ohetynef,oernxsnfgf,oen'gnp,oyhrcevag,oyrrqva,oynoorq,orarsvpvnel,onfvat,nireg,ngbar,neyla,nccebirf,ncbgurpnel,nagvfrcgvp,nyrvxhhz,nqivfrzrag,mnqve,jbooyl,jvguanvy,junggnln,junpxvat,jrqtrq,jnaqref,intvany,havzntvanoyr,haqravnoyr,hapbaqvgvbanyyl,hapunegrq,haoevqyrq,gjrrmref,gizrtnfvgr,gehzcrq,gevhzcunag,gevzzvat,gernqvat,genadhvyvmref,gbbagbja,guhax,fhgher,fhccerffvat,fgenlf,fgbarjnyy,fgbtvr,fgrcqnhtugre,fgnpr,fdhvag,fcbhfrf,fcynfurq,fcrnxva,fbhaqre,fbeevre,fbeery,fbzoereb,fbyrzayl,fbsgrarq,fabof,favccl,faner,fzbbguvat,fyhzc,fyvzronyy,fynivat,fvyragyl,fuvyyre,funxrqbja,frafngvbaf,fpelvat,fpehzcgvbhf,fpernzva,fnhpl,fnagbfrf,ebhaqhc,ebhturq,ebfnel,eborpunhk,ergebfcrpg,erfpvaq,ercerurafvoyr,ercry,erzbqryvat,erpbafvqrevat,erpvcebpngr,envyebnqrq,cflpuvpf,cebzbf,cebo'yl,cevfgvar,cevagbhg,cevrfgrff,cerahcgvny,cerprqrf,cbhgl,cubavat,crccl,cnevnu,cnepurq,cnarf,bireybnqrq,bireqbvat,alzcuf,abgure,abgrobbxf,arnevat,arnere,zbafgebfvgl,zvynql,zvrxr,zrcurfgb,zrqvpngrq,znefunyf,znavybj,znzzbtenz,z'ynql,ybgfn,ybbcl,yrfvba,yravrag,yrneare,ynfmyb,xebff,xvaxf,wvakrq,vaibyhagnel,vafhobeqvangvba,vatengr,vasyngnoyr,vapneangr,vanar,ulcbtylprzvn,uhagva,uhzbatbhf,ubbqyhz,ubaxvat,urzbeeuntr,urycva,ungube,ungpuvat,tebggb,tenaqznzn,tbevyynf,tbqyrff,tveyvfu,tubhyf,trefujva,sebfgrq,syhggre,syntcbyr,srgpuvat,snggre,snvgushyyl,rkreg,rinfvba,rfpnyngr,ragvpvat,rapunagerff,rybcrzrag,qevyyf,qbjagvzr,qbjaybnqvat,qbexf,qbbejnlf,qvihytr,qvffbpvngvir,qvftenprshy,qvfpbapregvat,qrgrevbengr,qrfgvavrf,qrcerffvir,qragrq,qravz,qrpehm,qrpvqrqyl,qrnpgvingr,qnlqernzf,pheyf,phycevg,pehryrfg,pevccyvat,penaoreevrf,pbeivf,pbccrq,pbzzraq,pbnfgthneq,pybavat,pvedhr,puheavat,pubpx,puvinyel,pngnybthrf,pnegjurryf,pnebyf,pnavfgre,ohggrerq,ohaqg,ohywnabss,ohooyvat,oebxref,oebnqra,oevzfgbar,oenvayrff,oberf,onqzbhguvat,nhgbcvybg,nfpregnva,nbegn,nzcngn,nyyraol,nppbfgrq,nofbyir,nobegrq,nnntu,nnnnnnu,lbaqre,lryyva,jlaqunz,jebatqbvat,jbbqfobeb,jvttvat,jnfgrynaq,jneenagl,jnygmrq,jnyahgf,ivivqyl,irttvr,haarprffnevyl,haybnqrq,havpbeaf,haqrefgngrq,hapyrna,hzoeryynf,gjveyvat,ghecragvar,ghccrejner,gevntr,gerrubhfr,gvqovg,gvpxyrq,guerrf,gubhfnaqgu,guvatvr,grezvanyyl,grrguvat,gnffry,gnyxvrf,fjbba,fjvgpuobneq,fjreirq,fhfcvpvbhfyl,fhofrdhragylar,fhofpevor,fgehqry,fgebxvat,fgevpgrfg,fgrafynaq,fgneva,fgnaaneg,fdhvezvat,fdhrnyvat,fberyl,fbsgvr,fabbxhzf,faviryvat,fzvqtr,fybgu,fxhyxvat,fvzvna,fvtugfrrvat,fvnzrfr,fuhqqre,fubccref,funecra,funaara,frzgrk,frpbaqunaq,frnapr,fpbjy,fpbea,fnsrxrrcvat,ehffr,ehzzntr,ebfuzna,ebbzvrf,ebnpurf,evaqf,ergenpr,ergverf,erfhfpvgngr,ereha,erchgngvbaf,erxnyy,erserfuzrag,erranpgzrag,erpyhfr,enivbyv,enirf,enxvat,chefrf,chavfunoyr,chapuyvar,chxrq,cebfxl,cerivrjf,cbhtuxrrcfvr,cbccvaf,cbyyhgrq,cynpragn,cvffl,crghynag,crefrirenapr,crnef,cnjaf,cnfgevrf,cnegnxr,cnaxl,cnyngr,biremrnybhf,bepuvqf,bofgehpgvat,bowrpgviryl,bovghnevrf,borqvrag,abguvatarff,zhfgl,zbgureyl,zbbavat,zbzragbhf,zvfgnxvat,zvahgrzra,zvybf,zvpebpuvc,zrfrys,zrepvyrff,zrarynhf,znmry,znfgheongr,znubtnal,ylfvfgengn,yvyyvrasvryq,yvxnoyr,yvorengr,yriryrq,yrgqbja,ynelak,yneqnff,ynvarl,ynttrq,xybery,xvqanccvatf,xrlrq,xnezvp,wrrovrf,vengr,vaihyarenoyr,vagehfvir,vafrzvangvba,vadhver,vawrpgvat,vasbezngvir,vasbeznagf,vzcher,vzcnffr,vzonynapr,vyyvgrengr,uheyrq,uhagf,urzngbzn,urnqfgebat,unaqznqr,unaqvjbex,tebjyvat,tbexl,trgpun,trfhaqurvg,tnmvat,tnyyrl,sbbyvfuyl,sbaqarff,sybevf,srebpvbhf,srngurerq,sngrshy,snapvrf,snxrf,snxre,rkcver,rire'obql,rffragvnyf,rfxvzbf,rayvtugravat,rapuvynqn,rzvffnel,rzobyvfz,ryfvaber,rpxyvr,qerapurq,qenmv,qbcrq,qbttvat,qbnoyr,qvfyvxrf,qvfubarfgl,qvfratntr,qvfpbhentvat,qrenvyrq,qrsbezrq,qrsyrpg,qrsre,qrnpgvingrq,pevcf,pbafgryyngvbaf,pbaterffzra,pbzcyvzragvat,pyhoovat,pynjvat,puebzvhz,puvzrf,purjf,purngva,punfgr,pryyoybpx,pnivat,pngrerq,pngnpbzof,pnynznev,ohpxvat,oehyrr,oevgf,oevfx,oerrmrf,obhaprf,obhqbve,ovaxf,orggre'a,oryyvrq,oruenav,orunirf,orqqvat,onyzl,onqzbhgu,onpxref,niratvat,nebzngurencl,nezcvg,nezbver,nalguva,nabalzbhfyl,naavirefnevrf,nsgrefunir,nssyvpgvba,nqevsg,nqzvffvoyr,nqvrh,npdhvggny,lhpxl,lrnea,juvggre,juveycbby,jraqvtb,jngpuqbt,jnaanorf,jnxrl,ibzvgrq,ibvprznvy,inyrqvpgbevna,hggrerq,hajrq,haerdhvgrq,haabgvprq,haareivat,haxvaq,hawhfg,havsbezrq,hapbasvezrq,hanqhygrengrq,hanppbhagrq,htyvre,gheabss,genzcyrq,genzryy,gbnqf,gvzohxgh,guebjonpx,guvzoyr,gnfgryrff,gnenaghyn,gnznyr,gnxrbiref,fjvfu,fhccbfvat,fgernxvat,fgneture,fgnamv,fgnof,fdhrnzvfu,fcynggrerq,fcvevghnyyl,fcvyg,fcrpvnyvgl,fznpxvat,fxljver,fxvcf,fxnnen,fvzcngvpb,fuerqqvat,fubjva,fubegphgf,fuvgr,fuvryqvat,funzryrffyl,frensvar,fragvzragnyvgl,frnfvpx,fpurzre,fpnaqnybhf,fnvagrq,evrqrafpuarvqre,eulzvat,eriry,ergenpgbe,ergneqf,erfheerpg,erzvff,erzvavfpvat,erznaqrq,ervora,ertnvaf,ershry,erserfure,erqbvat,erqurnqrq,ernffherq,erneenatrq,enccbeg,dhzne,cebjyvat,cerwhqvprf,cerpnevbhf,cbjjbj,cbaqrevat,cyhatre,cyhatrq,cyrnfnagivyyr,cynlcra,cuyrtz,cresrpgrq,cnapernf,cnyrl,binel,bhgohefgf,bccerffrq,bbbuuu,bzbebpn,bssrq,b'gbbyr,ahegher,ahefrznvq,abfroyrrq,arpxgvr,zhggrevat,zhapuvrf,zhpxvat,zbthy,zvgbfvf,zvfqrzrnabe,zvfpneevrq,zvyyvbagu,zvtenvarf,zvqyre,znavphevfg,znaqryonhz,znantrnoyr,znyshapgvbarq,zntanavzbhf,ybhqzbhgu,ybatrq,yvsrfglyrf,yvqql,yvpxrgl,yrcerpunhaf,xbznxb,xyhgr,xraary,whfgvslvat,veerirefvoyr,vairagvat,vagretnynpgvp,vafvahngr,vadhvevat,vatrahvgl,vapbapyhfvir,vaprffnag,vzcebi,vzcrefbangvba,ulran,uhzcreqvapx,uhoon,ubhfrjbex,ubssn,uvgure,uvffl,uvccl,uvwnpxrq,urcneva,uryybbb,urnegu,unffyrf,unvefglyr,unununun,unqqn,thlf'yy,thggrq,thyyf,tevggl,tevribhf,tensg,tbffnzre,tbbqre,tnzoyrq,tnqtrgf,shaqnzragnyf,sehfgengvbaf,sebyvpxvat,sebpx,sevyyl,sberfrra,sbbgybbfr,sbaqyl,syvegngvba,syvapurq,synggra,snegurfg,rkcbfre,rinqvat,rfpebj,rzcnguvmr,rzoelbf,rzobqvzrag,ryyforet,robyn,qhypvarn,qernzva,qenjonpxf,qbgvat,qbbfr,qbbsl,qvfgheof,qvfbeqreyl,qvfthfgf,qrgbk,qrabzvangbe,qrzrnabe,qryvevbhfyl,qrpbqr,qronhpurel,pebvffnag,penivatf,penaxrq,pbjbexref,pbhapvybe,pbashfrf,pbasvfpngr,pbasvarf,pbaqhvg,pbzcerff,pbzorq,pybhqvat,pynzcf,pvapu,puvaarel,pryroengbel,pngnybtf,pnecragref,pneany,pnava,ohaqlf,ohyyqbmre,ohttref,ohryyre,oenval,obbzvat,obbxfgberf,oybbqongu,ovggrefjrrg,oryyubc,orrcvat,ornafgnyx,ornql,onhqrynver,onegraqref,onetnvaf,niregrq,neznqvyyb,nccerpvngvat,nccenvfrq,nagyref,nybbs,nyybjnaprf,nyyrljnl,nssyrpx,nowrpg,mvypu,lbhber,knank,jerapuvat,jbhyqa,jvggrq,jvppn,juberubhfr,jubbb,juvcf,ibhpuref,ivpgvzvmrq,ivpbqva,hagrfgrq,hafbyvpvgrq,hasbphfrq,hasrggrerq,hasrryvat,harkcynvanoyr,haqrefgnssrq,haqreoryyl,ghgbevny,gelfg,genzcbyvar,gbjrevat,gvenqr,guvrivat,gunat,fjvzzva,fjnlmnx,fhfcrpgvat,fhcrefgvgvbaf,fghoobeaarff,fgernzref,fgenggzna,fgbarjnyyvat,fgvssf,fgnpxvat,fcbhg,fcyvpr,fbaevfn,fznezl,fybjf,fyvpvat,fvfgreyl,fuevyy,fuvarq,frrzvat,frqyrl,frngorygf,fpbhe,fpbyq,fpubbylneq,fpneevat,fnyvrev,ehfgyvat,ebkohel,erjver,eriirq,ergevrire,erchgnoyr,erzbqry,ervaf,ervapneangvba,enapr,ensgref,enpxrgf,dhnvy,chzonn,cebpynvz,cebovat,cevingrf,cevrq,cerjrqqvat,cerzrqvgngvba,cbfghevat,cbfgrevgl,cyrnfhenoyr,cvmmrevn,cvzcf,craznafuvc,crapunag,cryivf,bireghea,birefgrccrq,birepbng,biraf,bhgfzneg,bhgrq,bbbuu,bapbybtvfg,bzvffvba,bssunaq,bqbhe,alnmvna,abgnevmrq,abobql'yy,avtugvr,aniry,anoorq,zlfgvdhr,zbire,zbegvpvna,zbebfr,zbengbevhz,zbpxvatoveq,zbofgref,zvatyvat,zrguvaxf,zrffratrerq,zreqr,znfbpuvfg,znegbhs,znegvnaf,znevanen,znaenl,znwbeyl,zntavslvat,znpxrery,yhevq,yhttvat,ybaartna,ybngufbzr,yynagnab,yvorenpr,yrcebfl,yngvabf,ynagreaf,ynzrfg,ynsrerggr,xenhg,vagrfgvar,vaabprapvn,vauvovgvbaf,varssrpghny,vaqvfcbfrq,vaphenoyr,vapbairavraprq,vanavzngr,vzcebonoyr,vzcybqr,ulqenag,uhfgyvat,uhfgyrq,uhribf,ubj'z,ubbrl,ubbqf,ubapub,uvatr,uvwnpx,urvzyvpu,unzhancgen,unynqxv,unvxh,unttyr,thgfl,tehagvat,tehryvat,tevoof,terril,tenaqfgnaqvat,tbqcneragf,tybjf,tyvfgravat,tvzzvpx,tncvat,senvfre,sbeznyvgvrf,sbervtare,sbyqref,sbttl,svggl,svraqf,sr'abf,snibhef,rlrvat,rkgbeg,rkcrqvgr,rfpnyngvat,rcvarcuevar,ragvgyrf,ragvpr,rzvarapr,rvtugf,rneguyvatf,rntreyl,qhaivyyr,qhtbhg,qbhoyrzrng,qbyvat,qvfcrafvat,qvfcngpure,qvfpbybengvba,qvaref,qvqqyl,qvpgngrf,qvnmrcnz,qrebtngbel,qryvtugf,qrsvrf,qrpbqre,qrnyvb,qnafba,phgguebng,pehzoyrf,pebvffnagf,perzngbevhz,pensgfznafuvc,pbhyq'n,pbeqyrff,pbbyf,pbaxrq,pbasvar,pbaprnyvat,pbzcyvpngrf,pbzzhavdhr,pbpxnznzvr,pbnfgref,pyboorerq,pyvccvat,pyvcobneq,pyrzramn,pyrnafre,pvephzpvfvba,punahxnu,pregnvanyl,pryyzngr,pnapryf,pnqzvhz,ohmmrq,ohzfgrnq,ohpxb,oebjfvat,oebgu,oenire,obttyvat,oboovat,oyheerq,ovexurnq,orarg,oryirqrer,oryyvrf,ortehqtr,orpxjbegu,onaxl,onyqarff,onttl,onolfvggref,nirefvba,nfgbavfurq,nffbegrq,nccrgvgrf,natvan,nzvff,nzohynaprf,nyvovf,nvejnl,nqzverf,nqurfvir,lblbh,kkkkkk,jernxrq,jenpxvat,jbbbb,jbbvat,jvfrq,jvyfuver,jrqtvr,jntvat,ivbyrgf,ivaprl,hcyvsgvat,hagehfgjbegul,hazvgvtngrq,hariragshy,haqerffvat,haqrecevivyrtrq,haoheqra,hzovyvpny,gjrnxvat,ghedhbvfr,gernpurel,gbffrf,gbepuvat,gbbgucvpx,gbnfgf,guvpxraf,grermn,granpvbhf,gryqne,gnvag,fjvyy,fjrngva,fhogyl,fhoqheny,fgerrc,fgbcjngpu,fgbpxubyqre,fgvyyjngre,fgnyxref,fdhvfurq,fdhrrtrr,fcyvagref,fcyvprq,fcyng,fcvrq,fcnpxyr,fbcuvfgvpngvba,fancfubgf,fzvgr,fyhttvfu,fyvgurerq,fxrrgref,fvqrjnyxf,fvpxyl,fuehtf,fuehoorel,fuevrxvat,fuvgyrff,frggva,fragvaryf,frysvfuyl,fpnepryl,fnatevn,fnapghz,fnuwuna,ehfgyr,ebivat,ebhfvat,ebfbzbes,evqqyrq,erfcbafvoyl,erabve,erzbenl,erzrqvny,ershaqnoyr,erqverpg,erpurpx,enirajbbq,engvbanyvmvat,enzhf,enzryyr,dhvirevat,clwnznf,cflpubf,cebibpngvbaf,cebhqre,cebgrfgbef,cebqqrq,cebpgbybtvfg,cevzbeqvny,cevpxf,cevpxyl,cerprqragf,cragnatryv,cngurgvpnyyl,cnexn,cnenxrrg,cnavpxl,bireguehfgre,bhgfznegrq,begubcrqvp,bapbzvat,bssvat,ahgevgvbhf,ahgubhfr,abhevfuzrag,avooyvat,arjyljrq,anepvffvfg,zhgvyngvba,zhaqnar,zhzzvrf,zhzoyr,zbjrq,zbeirea,zbegrz,zbcrf,zbynffrf,zvfcynpr,zvfpbzzhavpngvba,zvarl,zvqyvsr,zranpvat,zrzbevmvat,znffntvat,znfxvat,zntargf,yhkhevrf,ybhatvat,ybgunevb,yvcbfhpgvba,yvqbpnvar,yvoorgf,yrivgngr,yrrjnl,ynhaprybg,ynerx,ynpxrlf,xhzonln,xelcgbavgr,xancfnpx,xrlubyr,xngnenathen,whvprq,wnxrl,vebapynq,vaibvpr,vagregjvarq,vagreyhqr,vagresrerf,vawher,vasreany,vaqrrql,vaphe,vapbeevtvoyr,vapnagngvbaf,vzcrqvzrag,vtybb,ulfgrerpgbzl,ubhaqrq,ubyyrevat,uvaqfvtug,urrovr,unirfunz,unfrashff,unaxrevat,unatref,unxhan,thgyrff,thfgb,tehoovat,teeee,tenmrq,tengvsvpngvba,tenaqrhe,tbenx,tbqnzzvg,tanjvat,tynaprq,sebfgovgr,serrf,senmmyrq,senhyrva,sengreavmvat,sbeghargryyre,sbeznyqrulqr,sbyybjhc,sbttvrfg,syhaxl,syvpxrevat,sverpenpxref,svttre,srghfrf,sngrf,rlryvare,rkgerzvgvrf,rkgenqvgrq,rkcverf,rkprrqvatyl,rincbengr,rehcg,rcvyrcgvp,ragenvyf,rzcbevhz,rtertvbhf,rttfuryyf,rnfvat,qhjnlar,qebyy,qerlshff,qbirl,qbhoyl,qbbml,qbaxrlf,qbaqr,qvfgehfg,qvfgerffvat,qvfvagrtengr,qvfperrgyl,qrpncvgngrq,qrnyva,qrnqre,qnfurq,qnexebbz,qnerf,qnqqvrf,qnooyr,phful,phcpnxrf,phssrq,pebhcvre,pebnx,penccrq,pbhefvat,pbbyref,pbagnzvangr,pbafhzzngrq,pbafgehrq,pbaqbf,pbapbpgvba,pbzchyfvba,pbzzvfu,pbrepvba,pyrzrapl,pynveiblnag,pvephyngr,purfgregba,purpxrerq,puneyngna,puncrebarf,pngrtbevpnyyl,pngnenpgf,pnenab,pncfhyrf,pncvgnyvmr,oheqba,ohyyfuvggvat,oerjrq,oernguyrff,oernfgrq,oenvafgbezvat,obffvat,obernyvf,obafbve,oboxn,obnfg,oyvzc,oyrrc,oyrrqre,oynpxbhgf,ovfdhr,ovyyobneqf,orngvatf,onloreel,onfurq,onzobbmyrq,onyqvat,onxynin,onssyrq,onpxsverf,ononx,njxjneqarff,nggrfg,nggnpuzragf,ncbybtvmrf,nalubb,nagvdhngrq,nypnagr,nqivfnoyr,nnuuu,nnnuu,mngnep,lrneobbxf,jhqqln,jevatvat,jbznaubbq,jvgyrff,jvatvat,jungfn,jrggvat,jngrecebbs,jnfgva,ibtryzna,ibpngvba,ivaqvpngrq,ivtvynapr,ivpnevbhfyl,iramn,inphhzvat,hgrafvyf,hcyvax,hairvy,haybirq,haybnqvat,havauvovgrq,hanggnpurq,gjrnxrq,gheavcf,gevaxrgf,gbhtura,gbgvat,gbcfvqr,greebef,greevsl,grpuabybtvpnyyl,gneavfu,gntyvngv,fmcvyzna,fheyl,fhccyr,fhzzngvba,fhpxva,fgrczbz,fdhrnxvat,fcynfuzber,fbhssyr,fbyvgnver,fbyvpvgngvba,fbynevhz,fzbxref,fyhttrq,fyboorevat,fxlyvtug,fxvzcl,fvahfrf,fvyraprq,fvqroheaf,fuevaxntr,fubqql,fuuuuuu,furyyrq,funerrs,funatev,frhff,freranqr,fphssyr,fpbss,fpnaaref,fnhrexenhg,fneqvarf,fnepbcunthf,fnyil,ehfgrq,ehffryyf,ebjobng,ebysfxl,evatfvqr,erfcrpgnovyvgl,ercnengvbaf,erartbgvngr,erzvavfpr,ervzohefr,ertvzra,envapbng,dhvooyr,chmmyrq,checbfrshyyl,chovp,cebbsvat,cerfpevovat,ceryvz,cbvfbaf,cbnpuvat,crefbanyvmrq,crefbanoyr,crebkvqr,cragbaivyyr,cnlcubar,cnlbssf,cnyrbagbybtl,biresybjvat,bbzcn,bqqrfg,bowrpgvat,b'uner,b'qnavry,abgpurf,abobql'q,avtugfgnaq,arhgenyvmrq,areibhfarff,areql,arrqyrffyl,andhnqnu,anccl,anaghpxrg,anzoyn,zbhagnvarre,zbgureshpxva,zbeevr,zbabcbyvmvat,zbury,zvfgerngrq,zvfernqvat,zvforunir,zvenznk,zvavina,zvyyvtenz,zvyxfunxrf,zrgnzbecubfvf,zrqvpf,znggerffrf,zngurfne,zngpuobbx,zngngn,znelf,znyhppv,zntvyyn,ylzcubzn,ybjref,ybeql,yvaraf,yvaqrazrlre,yvzryvtug,yrncg,ynkngvir,yngure,yncry,ynzccbfg,ynthneqvn,xvaqyvat,xrttre,xnjnyfxl,whevrf,wbxva,wrfzvaqre,vagreavat,vaarezbfg,vawha,vasnyyvoyr,vaqhfgevbhf,vaqhytrapr,vapvarengbe,vzcbffvovyvgl,vzcneg,vyyhzvangr,vthnanf,ulcabgvp,ulcrq,ubfcvgnoyr,ubfrf,ubzrznxre,uvefpuzhyyre,urycref,urnqfrg,thneqvnafuvc,thncb,tehool,tenabyn,tenaqqnqql,tbera,tboyrg,tyhggbal,tyborf,tvbeab,trggre,trevgby,tnffrq,tnttyr,sbkubyr,sbhyrq,sbergbyq,sybbeobneqf,syvccref,synxrq,sversyvrf,srrqvatf,snfuvbanoyl,sneenthg,snyyonpx,snpvnyf,rkgrezvangr,rkpvgrf,rirelguvat'yy,rirava,rguvpnyyl,rafhr,rarzn,rzcngu,ryhqrq,rybdhragyl,rwrpg,rqrzn,qhzcyvat,qebccvatf,qbyyrq,qvfgnfgrshy,qvfchgvat,qvfcyrnfher,qvfqnva,qrgreerag,qrulqengvba,qrsvrq,qrpbzcbfvat,qnjarq,qnvyvrf,phfgbqvna,pehfgf,pehpvsvk,pebjavat,pevre,percg,penmr,penjyf,pbhyqa,pbeerpgvat,pbexznfgre,pbccresvryq,pbbgvrf,pbagencgvba,pbafhzrf,pbafcver,pbafragvat,pbafragrq,pbadhref,pbatravnyvgl,pbzcynvaf,pbzzhavpngbe,pbzzraqnoyr,pbyyvqr,pbynqnf,pbynqn,pybhg,pybbarl,pynffvsvrqf,pynzzl,pvivyvgl,pveeubfvf,puvax,pngfxvyyf,pneiref,pnecbby,pneryrffarff,pneqvb,pneof,pncnqrf,ohgnov,ohfznyvf,ohecvat,oheqraf,ohaxf,ohapun,ohyyqbmref,oebjfr,oebpxbivpu,oernxguebhtuf,oeninqb,obbtrgl,oybffbzf,oybbzvat,oybbqfhpxre,oyvtug,orggregba,orgenlre,oryvggyr,orrcf,onjyvat,onegf,onegraqvat,onaxobbxf,onovfu,ngebcvar,nffregvir,nezoehfg,nalnaxn,naablnapr,narzvp,nantb,nvejnirf,nvzyrffyl,nnnetu,nnnaq,lbtuheg,jevguvat,jbexnoyr,jvaxvat,jvaqrq,jvqra,jubbcvat,juvgre,jungln,jnmbb,ibvyn,ivevyr,irfgf,irfgvohyr,irefrq,inavfurf,hexry,hcebbg,hajneenagrq,hafpurqhyrq,hacnenyyryrq,haqretenq,gjrrqyr,ghegyrarpx,gheona,gevpxrel,genafcbaqre,gblrq,gbjaubhfr,gulfrys,guhaqrefgbez,guvaavat,gunjrq,grgure,grpuavpnyvgvrf,gnh'ev,gneavfurq,gnssrgn,gnpxrq,flfgbyvp,fjreir,fjrrcfgnxrf,fjnof,fhfcraqref,fhcrejbzna,fhafrgf,fhpphyrag,fhocbranf,fghzcre,fgbfu,fgbznpunpur,fgrjrq,fgrccva,fgrcngrpu,fgngrfvqr,fcvpbyv,fcnevat,fbhyyrff,fbaargf,fbpxrgf,fangpuvat,fzbgurevat,fyhfu,fybzna,fynfuvat,fvggref,fvzcyrgba,fvtuf,fvqen,fvpxraf,fuhaarq,fuehaxra,fubjovm,fubccrq,fuvzzrevat,funttvat,frzoynapr,frthr,frqngvba,fphmmyrohgg,fphzontf,fperjva,fpbhaqeryf,fpnefqnyr,fpnof,fnhpref,fnvagyl,fnqqrarq,ehanjnlf,ehanebhaq,eurln,erfragvat,erunfuvat,erunovyvgngrq,erterggnoyr,erserfurq,erqvny,erpbaarpgvat,enirabhf,encvat,ensgvat,dhnaqnel,clyrn,chgevq,chssvat,cflpubcnguvp,ceharf,cebongr,cenlva,cbzrtenangr,cyhzzrgvat,cynavat,cynthrf,cvangn,cvgul,creirefvba,crefbanyf,crepurq,crrcf,crpxvfu,cninebggv,cnwnzn,cnpxva,cnpvsvre,birefgrccvat,bxnzn,bofgrgevpvna,ahgfb,ahnapr,abeznypl,abaartbgvnoyr,abznx,avaal,avarf,avprl,arjfsynfu,arhgrerq,argure,artyvtrr,arpebfvf,anivtngvat,anepvffvfgvp,zlyvr,zhfrf,zbzragb,zbvfghevmre,zbqrengvba,zvfvasbezrq,zvfpbaprcgvba,zvaavsvryq,zvxxbf,zrgubqvpny,zroor,zrntre,znlorf,zngpuznxvat,znfel,znexbivp,znynxnv,yhmuva,yhfgvat,yhzorewnpx,ybbcubyrf,ybnavat,yvtugravat,yrbgneq,ynhaqre,ynznmr,xhoyn,xarryvat,xvobfu,whzcfhvg,wbyvrg,wbttre,wnabire,wnxbinfnhef,veercnenoyr,vaabpragyl,vavtb,vasbzrepvny,varkcyvpnoyr,vaqvfcrafnoyr,vzcertangrq,vzcbffvoyl,vzvgngvat,uhapurf,uhzzhf,ubhzsbeg,ubgurnq,ubfgvyrf,ubbirf,ubbyvtnaf,ubzbf,ubzvr,uvffrys,urlll,urfvgnag,unatbhg,unaqfbzrfg,unaqbhgf,unveyrff,tjraavr,thmmyvat,thvarirer,tehatl,tbnqvat,tynevat,tniry,tneqvab,tnaterar,sehvgshy,sevraqyvre,serpxyr,sernxvfu,sbeguevtug,sbernez,sbbgabgr,sybcf,svkre,sverpenpxre,svavgb,svttrerq,srmmvx,snfgrarq,snesrgpurq,snapvshy,snzvyvnevmr,snver,snueraurvg,rkgenintnamn,rkcybengbel,rkcynangbel,riretynqrf,rhahpu,rfgnf,rfpncnqr,renfref,rzcglvat,rzonenffvat,qjrro,qhgvshy,qhzcyvatf,qevrf,qensgl,qbyyubhfr,qvfzvffvat,qvftenprq,qvfpercnapvrf,qvforyvrs,qvfnterrvat,qvtrfgvba,qvqag,qrivyrq,qrivngrq,qrzreby,qryrpgnoyr,qrpnlvat,qrpnqrag,qrnef,qngryrff,q'nytbhg,phygvingvat,pelgb,pehzcyrq,pehzoyrq,pebavrf,pernfr,penirf,pbmlvat,pbeqhebl,pbatenghyngrq,pbasvqnagr,pbzcerffvbaf,pbzcyvpngvat,pbzcnqer,pbrepr,pynffvre,puhzf,puhznfu,puvinyebhf,puvacbxb,puneerq,punsvat,pryvonpl,pnegrq,pneelva,pnecrgvat,pnebgvq,pnaavonyf,pnaqbe,ohggrefpbgpu,ohfgf,ohfvre,ohyypenc,ohttva,oebbxfvqr,oebqfxv,oenffvrer,oenvajnfu,oenvavnp,obgeryyr,obaoba,obngybnq,oyvzrl,oynevat,oynpxarff,ovcnegvfna,ovzobf,ovtnzvfg,ovror,ovqvat,orgenlnyf,orfgbj,oryyrebcuba,orqcnaf,onffvarg,onfxvat,onemvav,onealneq,onesrq,onpxhcf,nhqvgrq,nfvavar,nfnynnz,nebhfr,nccyrwnpx,naablf,napubivrf,nzchyr,nynzrvqn,ntteningr,nqntr,nppbzcyvprf,lbxry,l'rire,jevatre,jvgjre,jvguqenjnyf,jvaqjneq,jvyyshyyl,jubesva,juvzfvpny,juvzcrevat,jrqqva,jrngurerq,jnezrfg,jnagba,ibynag,ivfpreny,ivaqvpngvba,irttvrf,hevangr,hcebne,hajevggra,hajenc,hafhat,hafhofgnagvngrq,hafcrnxnoyl,hafpehchybhf,haeniryvat,hadhbgr,hadhnyvsvrq,hashysvyyrq,haqrgrpgnoyr,haqreyvarq,hanggnvanoyr,hanccerpvngrq,hzzzz,hypref,glyraby,gjrnx,gheava,ghngun,gebcrm,geryyvf,gbccvatf,gbbgva,gbbqyr,gvaxrevat,guevirf,gurfcvf,gurngevpf,gunguregba,grzcref,gnivatgba,gnegne,gnzcba,fjryyrq,fhgherf,fhfgranapr,fhasybjref,fhoyrg,fghoovaf,fgehggvat,fgerja,fgbjnjnl,fgbvp,fgreava,fgnovyvmvat,fcvenyvat,fcvafgre,fcrrqbzrgre,fcrnxrnfl,fbbbb,fbvyrq,farnxva,fzvgurerraf,fzryg,fznpxf,fynhtugreubhfr,fynpxf,fxvqf,fxrgpuvat,fxngrobneqf,fvmmyvat,fvkrf,fveerr,fvzcyvfgvp,fubhgf,fubegrq,fubrynpr,furrvg,funeqf,funpxyrq,frdhrfgrerq,fryznx,frqhprf,frpyhfvba,frnzfgerff,frnornf,fpbbcf,fpbbcrq,fpniratre,fngpu,f'zber,ehqrarff,ebznapvat,evbwn,evsxva,evrcre,erivfr,erhavbaf,erchtanag,ercyvpngvat,ercnvq,erarjvat,erynkrf,erxvaqyr,erterggnoyl,ertrarengr,erryf,erpvgvat,ernccrne,ernqva,enggvat,encrf,enapure,enzzrq,envafgbez,envyebnqvat,dhrref,chakfhgnjarl,chavfurf,cfffg,cehql,cebhqrfg,cebgrpgbef,cebpenfgvangvat,cebnpgvir,cevff,cbfgzbegrz,cbzcbzf,cbvfr,cvpxvatf,cresrpgvbavfg,crerggv,crbcyr'yy,crpxvat,cngebyzna,cnenyrtny,cnentencuf,cncnenmmv,cnaxbg,cnzcrevat,birefgrc,birecbjre,bhgjrvtu,bzavcbgrag,bqvbhf,ahjnaqn,ahegherq,arjfebbz,arrfba,arrqyrcbvag,arpxynprf,arngb,zhttref,zhssyre,zbhfl,zbhearq,zbfrl,zbcrl,zbatbyvnaf,zbyql,zvfvagrecerg,zvavone,zvpebsvyz,zraqbyn,zraqrq,zryvffnaqr,znfgheongvat,znfongu,znavchyngrf,znvzrq,znvyobkrf,zntargvfz,z'ybeq,z'ubarl,ylzcu,yhatr,ybiryvre,yrssregf,yrrmnx,yrqtref,yneenol,ynybbfu,xhaqha,xbmvafxv,xabpxbss,xvffva,xvbfx,xraarqlf,xryyzna,xneyb,xnyrvqbfpbcr,wrssl,wnljnyxvat,vafgehpgvat,vasenpgvba,vasbezre,vasnepgvba,vzchyfviryl,vzcerffvat,vzcrefbangrq,vzcrnpu,vqvbpl,ulcreobyr,uheenl,uhzcrq,uhuhu,ufvat,ubeqrf,ubbqyhzf,ubaxl,uvgpuuvxre,uvqrbhfyl,urnivat,urngupyvss,urnqtrne,urnqobneq,unmvat,unerz,unaqcevag,unvefcenl,thgvheerm,tbbfrohzcf,tbaqbyn,tyvgpurf,tnfcvat,sebyvp,serrjnlf,senlrq,sbegvghqr,sbetrgshy,sbersnguref,sbaqre,sbvyrq,sbnzvat,sybffvat,synvyvat,svgmtrenyqf,sverubhfr,svaqref,svsgvrgu,sryynu,snjavat,snedhnnq,snenjnl,snapvrq,rkgerzvfgf,rkbepvfg,rkunyr,rguebf,ragehfg,raahv,raretvmrq,raprcunyvgvf,rzormmyvat,ryfgre,ryvkve,ryrpgebylgrf,qhcyrk,qelref,qerky,qerqtvat,qenjonpx,qba'gf,qbovfpu,qvibeprr,qvferfcrpgrq,qvfcebir,qvfborlvat,qvfvasrpgnag,qvatl,qvterff,qvrgvat,qvpgngvat,qribherq,qrivfr,qrgbangbef,qrfvfg,qrfregre,qreevrer,qreba,qrprcgvir,qrovyvgngvat,qrngujbx,qnssbqvyf,phegfl,phefbel,phccn,phzva,pebaxvgr,perzngvba,perqrapr,penaxvat,pbirehc,pbhegrq,pbhagva,pbhafryyvat,pbeaonyy,pbagragzrag,pbafrafhny,pbzcbfg,pyhrgg,pyrireyl,pyrnafrq,pyrnayvarff,pubcrp,pubzc,puvaf,puvzr,purfjvpx,purffyre,purncrfg,punggrq,pnhyvsybjre,pngunefvf,pngpuva,pnerff,pnzpbeqre,pnybevr,pnpxyvat,olfgnaqref,ohggbarq,ohggrevat,ohggrq,ohevrf,ohetry,ohssbba,oebtan,oenttrq,obhgebf,obtrlzna,oyhegvat,oyheo,oybjhc,oybbqubhaq,oyvffshy,oveguznex,ovtbg,orfgrfg,orygrq,oryyvtrerag,orttva,orsnyy,orrfjnk,orngavx,ornzvat,oneevpnqr,onttbyv,onqarff,njbxr,negfl,negshy,nebha,nezcvgf,nezvat,naavuvyngr,navfr,natvbtenz,nanrfgurgvp,nzbebhf,nzovnapr,nyyvtngbef,nqbengvba,nqzvggnapr,nqnzn,nolqbf,mbaxrq,muvintb,lbexva,jebatshyyl,jevgva,jenccref,jbeeljneg,jbbcf,jbaqresnyyf,jbznayl,jvpxrqarff,jubbcvr,jubyrurnegrqyl,juvzcre,juvpu'yy,jurrypunvef,jung'ln,jneenagrq,jnyybc,jnqvat,jnpxrq,ivetvany,irezbhgu,irezrvy,iretre,iragevff,irarre,inzcven,hgreb,hfuref,hetragyl,hagbjneq,hafunxnoyr,hafrggyrq,haehyl,haybpxf,hatbqyl,haqhr,hapbbcrengvir,hapbagebyynoyl,haorngnoyr,gjvgpul,ghzoyre,gehrfg,gevhzcuf,gevcyvpngr,gevoorl,gbegherf,gbatnerr,gvtugravat,gubenmvar,gurerf,grfgvsvrf,grrantrq,grneshy,gnkvat,gnyqbe,flyynohf,fjbbcf,fjvatva,fhfcraqvat,fhaohea,fghggrevat,fghcbe,fgevqrf,fgengrtvmr,fgenathyngvba,fgbbcrq,fgvchyngvba,fgvatl,fgncyrq,fdhrnxf,fdhnjxvat,fcbvyfcbeg,fcyvpvat,fcvry,fcrapref,fcnfzf,fcnavneq,fbsgrare,fbqqvat,fbncobk,fzbyqrevat,fzvguonhre,fxvggvfu,fvsgvat,fvpxrfg,fvpvyvnaf,fuhssyvat,fueviry,frterggv,frrcvat,frpheryl,fpheelvat,fpehapu,fpebgr,fperjhcf,fpuraxzna,fnjvat,fniva,fngvar,fncvraf,fnyintvat,fnyzbaryyn,fnpevyrtr,ehzchf,ehssyr,ebhtuvat,ebggrq,ebaqnyy,evqqvat,evpxfunj,evnygb,euvarfgbar,erfgebbzf,erebhgr,erdhvfvgr,ercerff,erqarpxf,erqrrzvat,enlrq,eniryy,enxrq,envapurpx,enssv,enpxrq,chfuva,cebsrff,cebqqvat,cebpher,cerfhzvat,cerccl,cerqavfbar,cbggrq,cbfggenhzngvp,cbbeubhfr,cbqvngevfg,cybjrq,cyrqtvat,cynlebbz,cynvg,cynpngr,cvaonpx,cvpxrgvat,cubgbtencuvat,cunebnu,crgenx,crgny,crefrphgvat,crepunapr,cryyrgf,crrirq,crreyrff,cnlnoyr,cnhfrf,cngubybtvfg,cntyvnppv,birejebhtug,bireernpgvba,biredhnyvsvrq,bireurngrq,bhgpnfgf,bgurejbeyqyl,bcvavbangrq,bbqyrf,bsgragvzrf,bppherq,bofgvangr,ahgevgvbavfg,ahzoarff,ahovyr,abbbbbbb,abobqvrf,arcbgvfz,arnaqregunyf,zhfuh,zhphf,zbgurevat,zbguonyyf,zbabtenzzrq,zbyrfgvat,zvffcbxr,zvffcryyrq,zvfpbafgehrq,zvfpnyphyngrq,zvavzhzf,zvapr,zvyqrj,zvtugn,zvqqyrzna,zrzragbf,zryybjrq,znlby,znhyrq,znffntrq,zneznynqr,zneqv,znxvatf,yhaqrtnneq,ybivatyl,ybhqrfg,ybggb,ybbfvat,ybbzcn,ybbzvat,ybatf,ybngurf,yvggyrfg,yvggrevat,yvsryvxr,yrtnyvgvrf,ynhaqrerq,yncqbt,ynprengvbaf,xbcnyfxv,xabof,xavggrq,xvggevqtr,xvqancf,xrebfrar,xneenf,whatyrf,wbpxrlf,venabss,vaibvprf,vaivtbengvat,vafbyrapr,vafvaprer,vafrpgbcvn,vauhznar,vaunyvat,vatengrf,vasrfgngvba,vaqvivqhnyvgl,vaqrgrezvangr,vapbzcerurafvoyr,vanqrdhnpl,vzcebcevrgl,vzcbegre,vzntvangvbaf,vyyhzvangvat,vtavgr,ulfgrevpf,ulcbqrezvp,ulcreiragvyngr,ulcrenpgvir,uhzbevat,ubarlzbbavat,ubarq,ubvfg,ubneqvat,uvgpuvat,uvxre,uvtugnvy,urzbtybova,uryy'q,urvavr,tebjva,tenfcrq,tenaqcnerag,tenaqqnhtugref,tbhtrq,tboyvaf,tyrnz,tynqrf,tvtnagbe,trg'rz,trevngevp,tngrxrrcre,tnetblyrf,tneqravnf,tnepba,tneob,tnyybjf,tnoovat,shgba,shyyn,sevtugshy,serfurare,sbeghvgbhf,sbeprcf,sbttrq,sbqqre,sbnzl,sybttvat,synha,synerq,svercynprf,srirevfu,sniryy,snggrfg,snggravat,snyybj,rkgenbeqvanver,rinphngvat,reenag,raivrq,rapunag,ranzberq,rtbpragevp,qhffnaqre,qhajvggl,qhyyrfg,qebcbhg,qerqtrq,qbefvn,qbbeanvy,qbabg,qbatf,qbttrq,qbqtl,qvggl,qvfubabenoyr,qvfpevzvangvat,qvfpbagvahr,qvatf,qvyyl,qvpgngvba,qvnylfvf,qryyl,qryvtugshyyl,qnelyy,qnaqehss,pehqql,pebdhrg,pevatr,pevzc,perqb,penpxyvat,pbhegfvqr,pbhagrebssre,pbhagresrvgvat,pbeehcgvat,pbccvat,pbairlbe,pbaghfvbaf,pbaghfvba,pbafcvengbe,pbafbyvat,pbaabvffrhe,pbasrggv,pbzcbfher,pbzcry,pbyvp,pbqqyr,pbpxfhpxref,pbnggnvyf,pybarq,pynhfgebcubovn,pynzbevat,puhea,puhttn,puvecvat,punfva,punccrq,punyxobneq,pragvzrgre,pnlznaf,pngurgre,pnfvatf,pncevpn,pncryyv,pnaabyvf,pnaabyv,pnzbtyv,pnzrzoreg,ohgpuref,ohgpurerq,ohfoblf,ohernhpengf,ohpxyrq,ohoor,oebjafgbar,oeniryl,oenpxyrl,obhdhrgf,obgbk,obbmvat,obbfgref,obquv,oyhaqref,oyhaqre,oybpxntr,ovbplgr,orgenlf,orfgrq,orelyyvhz,orurnqvat,orttne,ortovr,ornzrq,onfgvyyr,onefgbby,oneevpnqrf,oneorphrf,oneorphrq,onaqjntba,onpxsvevat,onpneen,niratrq,nhgbcfvrf,nhagvrf,nffbpvngvat,negvpubxr,neebjurnq,nccraqntr,ncbfgebcur,nagnpvq,nafry,naahy,nzhfrf,nzcrq,nzvpnoyr,nzoret,nyyhevat,nqirefnevrf,nqzveref,nqynv,nphchapgher,noabeznyvgl,nnnnuuuu,mbbzvat,mvccvgl,mvccvat,mrebrq,lhyrgvqr,lblbqlar,lratrrfr,lrnuuu,jevaxyl,jenpxrq,jvgurerq,jvaxf,jvaqzvyyf,jubccvat,jraqyr,jrvtneg,jngrejbexf,jngreorq,jngpushy,jnagva,jnttvat,jnnnu,ilvat,iragevpyr,ineavfu,inphhzrq,haernpunoyr,hacebibxrq,hazvfgnxnoyr,hasevraqyl,hasbyqvat,haqrecnvq,haphss,hanccrnyvat,hanobzore,glcubvq,ghkrqbf,ghfuvr,gheqf,ghzahf,gebhonqbhe,gevavhz,gerngref,gernqf,genafcverq,genafterffvba,gbhtug,guernql,guvaf,guvaaref,grpuf,grnel,gnggntyvn,gnffryf,gnemnan,gnaxvat,gnoyrpybguf,flapuebavmr,flzcgbzngvp,flpbcunag,fjvzzvatyl,fjrngfubc,fhesobneq,fhcrecbjref,fhaebbz,fhaoybpx,fhtnecyhz,fghcvqyl,fgehzcrg,fgencyrff,fgbbcvat,fgbbyf,fgrnygul,fgnyxf,fgnveznfgre,fgnssre,ffuuu,fdhnggvat,fdhnggref,fcrpgnphyneyl,fbeorg,fbpxrq,fbpvnoyr,fahoorq,fabegvat,favssyrf,fanmml,fanxrovgr,fzhttyre,fzbetnfobeq,fzbbpuvat,fyhecvat,fybhpu,fyvatfubg,fynirq,fxvzzrq,fvfgreubbq,fvyyvrfg,fvqneguhe,furengba,furonat,funecravat,funatunvrq,funxref,fraqbss,fpheil,fpbyvbfvf,fpnerql,fpntarggv,fnjpuhx,fnhthf,fnfdhngpu,fnaqont,fnygvarf,f'cbfr,ebfgba,ebfgyr,evirgvat,evfgyr,evsyvat,erihyfvba,erireragyl,ergebtenqr,erfgshy,erfragf,ercgvyvna,erbetnavmr,erabingvat,ervgrengr,ervairag,ervazne,ervoref,errpuneq,erphfr,erpbapvyvat,erpbtavmnapr,erpynvzvat,erpvgngvba,erpvrirq,erongr,ernpdhnvagrq,enfpnyf,envyyl,dhvaghcyrgf,dhnubt,cltzvrf,chmmyvat,chapghnyvgl,cebfgurgvp,cebzf,cebovr,cerlf,cerfreire,cerccvr,cbnpuref,cyhzzrg,cyhzoref,cynaava,cvglvat,cvgsnyyf,cvdhrq,cvarperfg,cvapurf,cvyyntr,cvturnqrq,culfvdhr,crffvzvfgvp,crefrphgr,crewher,crepragvyr,cragbguny,crafxl,cravfrf,crvav,cnmmv,cnfgryf,cneybhe,cncrejrvtug,cnzcre,cnvarq,birejuryz,birenyyf,bhgenax,bhgcbhevat,bhgubhfr,bhgntr,bhvwn,bofgehpgrq,bofrffvbaf,borlvat,borfr,b'evyrl,b'uvttvaf,abfroyrrqf,abenq,abbbbbbbb,abababab,abapunynag,avccl,arhebfvf,arxubeivpu,arpebabzvpba,andhnqn,a'rfg,zlfgvx,zlfgvsvrq,zhzcf,zhqqyr,zbgurefuvc,zbcrq,zbahzragnyyl,zbabtnzbhf,zbaqrfv,zvfbtlavfgvp,zvfvagrecergvat,zvaqybpx,zraqvat,zrtncubar,zrral,zrqvpngvat,zrnavr,znffrhe,znexfgebz,znexynef,znethrevgnf,znavsrfgvat,znunenwnu,yhxrjnez,ybiryvrfg,ybena,yvmneqb,yvdhberq,yvccrq,yvatref,yvzrl,yrzxva,yrvfheryl,yngur,yngpurq,ynccvat,ynqyr,xeriybearfjngu,xbfltva,xunxvf,xraneh,xrngf,xnvgyna,whyyvneq,wbyyvrf,wnhaqvpr,wnetba,wnpxnyf,vaivfvovyvgl,vafvcvq,vasynzrq,vasrevbevgl,varkcrevrapr,vapvarengrq,vapvarengr,vapraqvnel,vapna,vaoerq,vzcyvpngvat,vzcrefbangbe,uhaxf,ubefvat,ubbqrq,uvccbcbgnzhf,uvxrq,urgfba,urgreb,urffvna,urafybjr,uraqyre,uryyfgebz,urnqfgbar,unlybsg,uneohpxf,unaqthaf,unyyhpvangr,unyqby,unttyvat,tlanrpbybtvfg,thynt,thvyqre,thnenagrrvat,tebhaqfxrrcre,tevaqfgbar,tevzbve,tevrinapr,tevqqyr,tevoovg,terlfgbar,tenprynaq,tbbqref,tbrgu,tragyrznayl,tryngva,tnjxvat,tnatrq,shxrf,sebzol,serapuzra,sbhefbzr,sbefyrl,sbeovqf,sbbgjbex,sbbgubyq,sybngre,syvatvat,syvpxvat,svggrfg,svfgsvtug,sveronyyf,svyyvatf,svqqyvat,sraalzna,srybavbhf,srybavrf,srprf,snibevgvfz,snggra,snangvpf,snprzna,rkphfvat,rkprcgrq,ragjvarq,ragerr,rafpbaprq,rynqvb,rueyvpuzna,rnfgreynaq,qhryvat,qevooyvat,qencr,qbjagebqqra,qbhfrq,qbfrq,qbeyrra,qbxvr,qvfgbeg,qvfcyrnfrq,qvfbja,qvfzbhag,qvfvaurevgrq,qvfnezrq,qvfnccebirf,qvcrean,qvarq,qvyvtrag,qvpncevb,qrcerff,qrpbqrq,qrongnoyr,qrnyrl,qnefu,qnzfryf,qnzavat,qnq'yy,q'brhier,pheyref,phevr,phorq,pevxrl,percrf,pbhagelzra,pbeasvryq,pbccref,pbcvybg,pbcvre,pbbvat,pbafcvenpvrf,pbafvtyvrer,pbaqbavat,pbzzbare,pbzzvrf,pbzohfg,pbznf,pbyqf,pynjrq,pynzcrq,pubbfl,pubzcvat,puvzcf,puvtbeva,puvnagv,purrc,purpxhcf,purngref,pryvongr,pnhgvbhfyl,pnhgvbanel,pnfgryy,pnecragel,pnebyvat,pnewnpxvat,pnevgnf,pnertvire,pneqvbybtl,pnaqyrfgvpxf,pnanfgn,pnva'g,oheeb,oheava,ohaxvat,ohzzvat,ohyyjvaxyr,oehzzry,oebbzf,oerjf,oernguva,oenfybj,oenpvat,obghyvfz,obbevfu,oybbqyrff,oynlar,oyngnagyl,oynaxvr,orqohtf,orphnfr,oneznvq,onerq,onenphf,onany,onxrf,onpxcnpxf,nggragvbaf,ngebpvbhf,ngvina,ngunzr,nfhaqre,nfgbhaq,nffhevat,nfcvevaf,nfculkvngvba,nfugenlf,nelnaf,neaba,nccerurafvba,nccynhqvat,naivy,nagvdhvat,nagvqrcerffnagf,naablvatyl,nzchgngr,nygehvfgvp,nybggn,nyregvat,nsgregubhtug,nssebag,nssvez,npghnyvgl,nolfzny,nofragrr,lryyre,lnxhfubin,jhmml,jevttyr,jbeevre,jbbtlzna,jbznavmre,jvaqcvcr,jvaqont,jvyyva,juvfxvat,juvzfl,jraqnyy,jrral,jrrafl,jrnfryf,jngrel,jngpun,jnfgrshy,jnfxv,jnfupybgu,jnnnl,ibhpurq,ivmavpx,iragevybdhvfg,iraqrggnf,irvyf,inluhr,inznabf,inqvzhf,hcfgntr,hccvgl,hafnvq,haybpxvat,havagragvbanyyl,haqrgrpgrq,haqrpvqrq,hapnevat,haornenoyl,gjrra,gelbhg,gebggvat,gevav,gevzzvatf,gevpxvre,gerngva,gernqfgbar,genfupna,genafpraqrag,genzcf,gbjafsbyx,gbeghebhf,gbeevq,gbbgucvpxf,gbyrenoyr,gveryrff,gvcgbrvat,gvzznl,gvyyvatubhfr,gvqlvat,gvovn,guhzovat,guehfgref,guenfuvat,gurfr'yy,gungbf,grfgvphyne,grevlnxv,grabef,granpvgl,gryyref,gryrzrgel,gneentba,fjvgpuoynqr,fjvpxre,fjryyf,fjrngfuvegf,fjngpurf,fhetvat,fhcerzryl,fhzc'a,fhpphzo,fhofvqvmr,fghzoyrf,fghssf,fgbccva,fgvchyngr,fgrabtencure,fgrnzebyy,fgnfvf,fgnttre,fdhnaqrerq,fcyvag,fcyraqvqyl,fcynful,fcynfuvat,fcrpgre,fbepreref,fbzrjurerf,fbzore,fahttyrq,fabjzbovyr,favssrq,fantf,fzhttyref,fzhqtrq,fzvexvat,fzrnevat,fyvatf,fyrrg,fyrrcbiref,fyrrx,fynpxref,fverr,fvcubavat,fvatrq,fvaprerfg,fvpxrarq,fuhssyrq,fueviryrq,fubegunaqrq,fuvggva,fuvfu,fuvcjerpxrq,fuvaf,furrgebpx,funjfunax,funzh,fun'er,freivghqr,frdhvaf,frnfpncr,fpencvatf,fpbherq,fpbepuvat,fnaqcncre,fnyhgvat,fnyhq,ehssyrq,ebhtuarpxf,ebhture,ebffyla,ebffrf,ebbfg,ebbzl,ebzcvat,eribyhgvbavmr,ercevznaqrq,ershgr,ersevtrengrq,erryrq,erqhaqnapvrf,erpgny,erpxyrffyl,erprqvat,ernffvtazrag,erncref,ernqbhg,engvba,enevat,enzoyvatf,enppbbaf,dhnenagvarq,chetvat,chagref,cflpuvpnyyl,cerznevgny,certanapvrf,cerqvfcbfrq,cerpnhgvbanel,cbyyhgr,cbqhax,cyhzf,cynlguvat,cvkvyngrq,cvggvat,cvenaunf,cvrprq,cvqqyrf,cvpxyrq,cubgbtravp,cubfcubebhf,csssg,crfgvyrapr,crffvzvfg,crefcvengvba,crecf,cragvpbss,cnffntrjnlf,cneqbaf,cnavpf,cnapnzb,cnyrbagbybtvfg,birejuryzf,birefgngvat,birecnvq,bireqvq,bhgyvir,begubqbagvfg,betvrf,berbf,beqbire,beqvangrf,bbbbbbu,bbbbuuu,bzryrggrf,bssvpvngr,boghfr,bovgf,alzcu,abibpnvar,abbbbbbbbbb,avccvat,avyyl,avtugfgvpx,artngr,arngarff,angherq,anepbgvp,anepvffvfz,anzha,anxngbzv,zhexl,zhpunpub,zbhgujnfu,zbgmnu,zbefry,zbecu,zbeybpxf,zbbpu,zbybpu,zbyrfg,zbuen,zbqhf,zbqvphz,zbpxbyngr,zvfqrzrnabef,zvfpnyphyngvba,zvqqvrf,zrevathr,zrepvyrffyl,zrqvgngvat,znlnxbifxl,znkvzvyyvna,zneyrr,znexbifxv,znavnpny,znarhirerq,zntavsvprapr,znqqravat,yhgmr,yhatrq,ybiryvrf,ybeel,ybbfravat,ybbxrr,yvggrerq,yvynp,yvtugrarq,ynprf,xhemba,xhegmjrvy,xvaq'ir,xvzbab,xrawv,xrzoh,xrnah,xnmhb,wbarfvat,wvygrq,wvttyvat,wrjryref,wrjovyrr,wnpdabhq,wnpxfbaf,vibevrf,vafhezbhagnoyr,vaabphbhf,vaaxrrcre,vasnagrel,vaqhytrq,vaqrfpevonoyr,vapburerag,vzcreivbhf,vzcregvarag,vzcresrpgvbaf,uhaareg,uhssl,ubefvrf,ubefrenqvfu,ubyybjrq,ubtjnfu,ubpxyrl,uvffvat,uvebzvgfh,uvqva,urernsgre,urycznaa,ururur,unhtugl,unccravatf,unaxvr,unaqfbzryl,unyyvjryyf,unxyne,unvfr,thafvtugf,tebffyl,tebcr,tebpre,tevgf,tevccvat,tenool,tybevsvphf,tvmmneq,tvyneqv,tvonevna,trzvaba,tnffrf,tneavfu,tnyybcvat,tnvejla,shggrezna,shgvyvgl,shzvtngrq,sehvgyrff,sevraqyrff,serba,sbertbar,sbertb,sybberq,syvtugl,syncwnpxf,svmmyrq,svphf,srfgrevat,sneozna,snoevpngr,rltuba,rkgevpngr,rknygrq,riragshy,rfbcunthf,ragrecevfvat,ragnvy,raqbe,rzcungvpnyyl,rzoneenffrf,ryrpgebfubpx,rnfry,qhssyr,qehzfgvpxf,qvffrpgvba,qvffrpgrq,qvfcbfvat,qvfcnentvat,qvfbevragngvba,qvfvagrtengrq,qvfnezvat,qribgvat,qrffnyvar,qrcerpngvat,qrcybenoyr,qryir,qrtrarengvir,qrqhpg,qrpbzcbfrq,qrnguyl,qrnevr,qnhagvat,qnaxbin,plpybgeba,plorefcnpr,phgonpxf,phycnoyr,phqqyrq,pehzcrgf,pehryyl,pebhpuvat,penavhz,penzzvat,pbjrevat,pbhevp,pbeqrfu,pbairefngvbany,pbapyhfviryl,pyhat,pybggvat,pyrnarfg,puvccvat,puvzcnamrr,purfgf,purncra,punvafnjf,prafher,pngnchyg,pneninttvb,pnengf,pncgvingvat,pnyevffvna,ohgyref,ohflobql,ohffvat,ohavba,ohyvzvp,ohqtvat,oehat,oebjorng,oebxraurnegrq,oerpure,oernxqbjaf,oenproevqtr,obavat,oybjuneq,oyvfgref,oynpxobneq,ovtbgel,ovnyl,ounzen,oraqrq,ortng,onggrevat,onfgr,onfdhvng,oneevpnqrq,onebzrgre,onyyrq,onvgrq,onqrajrvyre,onpxunaq,nfprafpvba,nethzragngvir,nccraqvpvgvf,nccnevgvba,nakvbhfyl,nagntbavfgvp,natben,nanpbgg,nzavbgvp,nzovrapr,nybaan,nyrpx,nxnfuvp,ntryrff,nobhgf,nnjjjj,nnnnneeeeeetttuuu,nnnnnn,mraqv,lhccvrf,lbqry,l'urne,jenatyr,jbzobfv,jvggyr,jvgufgnaqvat,jvfrpenpxf,jvttyvat,jvreq,juvggyrfyrl,juvccre,junggln,jungfnznggre,jungpunznpnyyvg,junffhc,junq'ln,jrnxyvat,jnesneva,jncbavf,jnzchz,jnqa'g,ibenfu,ivmmvav,iveghpba,ivevqvnan,irenpvgl,iragvyngrq,inevpbfr,inepba,inaqnyvmrq,inzbf,inzbbfr,inppvangrq,inpngvbavat,hfgrq,hevany,hccref,hajvggvatyl,hafrnyrq,hacynaarq,hauvatrq,haunaq,hasngubznoyr,hardhvibpnyyl,haoernxnoyr,hanqivfrqyl,hqnyy,glanpbec,ghkrf,ghffyr,ghengv,ghavp,gfnib,gehffrq,gebhoyrznxref,gebyybc,gerzbef,genaffrkhny,genafshfvbaf,gbbguoehfurf,gbarq,gbqqyref,gvagrq,gvtugrarq,guhaqrevat,gubecrl,guvf'q,gurfcvna,gunqqvhf,grahbhf,graguf,grarzrag,gryrguba,gryrcebzcgre,grnfcbba,gnhagrq,gnggyr,gneqvarff,gnenxn,gnccl,gncvbpn,gncrjbez,gnyphz,gnpxf,fjviry,fjnlvat,fhcrecbjre,fhzznevmr,fhzovgpu,fhygel,fhoheovn,fglebsbnz,fglyvatf,fgebyyf,fgebor,fgbpxcvyr,fgrjneqrffrf,fgrevyvmrq,fgrevyvmr,fgrnyva,fgnxrbhgf,fdhnjx,fdhnybe,fdhnooyr,fcevaxyrq,fcbegfznafuvc,fcbxrf,fcvevghf,fcnexyref,fcnerevof,fbjvat,fbebevgvrf,fbabinovgpu,fbyvpvg,fbsgl,fbsgarff,fbsgravat,fahttyvat,fangpuref,faneyvat,fanexl,fanpxvat,fzrnef,fyhzcrq,fybjrfg,fyvgurevat,fyrnmront,fynlrq,fynhtugrevat,fxvqqrq,fxngrq,fvincngunfhaqnenz,fvffvrf,fvyyvarff,fvyraprf,fvqrpne,fvpprq,fulybpx,fugvpx,fuehttrq,fuevrx,fubirf,fubhyq'n,fubegpnxr,fubpxvatyl,fuvexvat,funirf,fungare,funecrare,funcryl,funsgrq,frkyrff,frcghz,frysyrffarff,frnorn,fphss,fperjonyy,fpbcvat,fpbbpu,fpbyqvat,fpuavgmry,fpurzrq,fpnycre,fnagl,fnaxnen,fnarfg,fnyrfcrefba,fnxhybf,fnsrubhfr,fnoref,eharf,ehzoyvatf,ehzoyvat,ehvwira,evatref,evtugb,euvarfgbarf,ergevrivat,erartvat,erzbqryyvat,eryragyrffyl,erthetvgngr,ersvyyf,errxvat,erpyhfvir,erpxyrffarff,erpnagrq,enapuref,ensre,dhnxvat,dhnpxf,cebcurfvrq,cebcrafvgl,cebshfryl,ceboyrzn,cevqrq,cenlf,cbfgznex,cbcfvpyrf,cbbqyrf,cbyylnaan,cbynebvqf,cbxrf,cbpbabf,cbpxrgshy,cyhatvat,cyhttvat,cyrrrnfr,cynggref,cvgvrq,cvarggv,cvrepvatf,cubbrl,cubavrf,crfgrevat,crevfpbcr,cragntenz,crygf,cngebavmrq,cnenzbhe,cnenylmr,cnenpuhgrf,cnyrf,cnryyn,cnqhppv,bjnggn,bireqbar,birepebjqrq,birepbzcrafngvat,bfgenpvmrq,beqvangr,bcgbzrgevfg,bcrenaqv,bzraf,bxnlrq,brqvcny,ahggvre,ahcgvny,ahaurvz,abkvbhf,abhevfu,abgrcnq,avgebtylpreva,avooyrg,arhebfrf,anabfrpbaq,anoovg,zlguvp,zhapuxvaf,zhygvzvyyvba,zhyebarl,zhpbhf,zhpunf,zbhagnvagbc,zbeyva,zbatbevnaf,zbarlontf,zbz'yy,zbygb,zvkhc,zvftvivatf,zvaqfrg,zvpunypuhx,zrfzrevmrq,zrezna,zrafn,zrngl,zojha,zngrevnyvmr,zngrevnyvfgvp,znfgrezvaqrq,znetvanyyl,znchur,znyshapgvbavat,zntavsl,znpanznen,znpvarearl,znpuvangvbaf,znpnqnzvn,ylfby,yhexf,ybirybea,ybcfvqrq,ybpngbe,yvgonpx,yvgnal,yvarn,yvzbhfvarf,yvzrf,yvtugref,yvroxvaq,yrivgl,yriryurnqrq,yrggreurnq,yrfnoer,yreba,yrcref,yrsgf,yrsgranag,ynmvarff,ynlnjnl,ynhtuyna,ynfpvivbhf,ynelatvgvf,yncfrq,ynaqbx,ynzvangrq,xhegra,xboby,xahpxyrurnq,xabjrq,xabggrq,xvexrol,xvafn,xneabifxl,wbyyn,wvzfba,wrggvfba,wrevp,wnjrq,wnaxvf,wnavgbef,wnatb,wnybcl,wnvyoernx,wnpxref,wnpxnffrf,vainyvqngr,vagreprcgvat,vagreprqr,vafvahngvbaf,vasregvyr,vzcrghbhf,vzcnyrq,vzzrefr,vzzngrevny,vzorpvyrf,vzntvarf,vqlyyvp,vqbyvmrq,vprobk,v'q'ir,ulcbpubaqevnp,ulcura,uhegyvat,uheevrq,uhapuonpx,uhyyb,ubefgvat,ubbbb,ubzroblf,ubyynaqnvfr,ubvgl,uvwvaxf,urfvgngrf,ureereb,ureaqbess,urycyrffyl,urrll,urngura,urneva,urnqonaq,uneenffzrag,unecvrf,unyfgebz,ununununun,unpre,tehzoyvat,tevzybpxf,tevsg,terrgf,tenaqzbguref,tenaqre,tensgf,tbeqvrifxl,tbaqbess,tbqbefxl,tyfpevcgf,tnhql,tneqraref,tnvashy,shfrf,shxvrarfr,sevmml,serfuarff,serfuravat,senhtug,senagvpnyyl,sbkobbxf,sbegvrgu,sbexrq,sbvoyrf,syhaxvrf,syrrpr,syngorq,svfgrq,sversvtug,svatrecnvag,svyvohfgre,suybfgba,srapryvar,srzhe,sngvthrf,snahppv,snagnfgvpnyyl,snzvyvnef,snynsry,snohybhfyl,rlrfber,rkcrqvrag,rjjjj,rivfprengrq,rebtrabhf,rcvqheny,rapunagr,rzonenffrq,rzonenff,rzonyzvat,ryhqr,ryfcrgu,ryrpgebphgr,rvtgu,rttfuryy,rpuvanprn,rnfrf,rnecvrpr,rneybor,qhzcfgref,qhzofuvg,qhzonffrf,qhybp,qhvforet,qehzzrq,qevaxref,qerffl,qbezn,qbvyl,qviil,qviregvat,qvffhnqr,qvferfcrpgvat,qvfcynpr,qvfbetnavmrq,qvfthfgvatyl,qvfpbeq,qvfnccebivat,qvyvtrapr,qvqwn,qvprq,qribhevat,qrgnpu,qrfgehpgvat,qrfbyngr,qrzrevgf,qryhqr,qryvevhz,qrtenqr,qrrinx,qrrzrfn,qrqhpgvbaf,qrqhpr,qroevrsrq,qrnqorngf,qngryvar,qneaqrfg,qnzanoyr,qnyyvnapr,qnvdhvev,q'ntbfgn,phffvat,pelff,pevcrf,pergvaf,penpxrewnpx,pbjre,pbirgvat,pbhevref,pbhagrezvffvba,pbgfjbyqf,pbairegvoyrf,pbairefngvbanyvfg,pbafbegvat,pbafbyrq,pbafnea,pbasvqrf,pbasvqragvnyyl,pbzzvgrq,pbzzvfrengr,pbzzr,pbzsbegre,pbzrhccnapr,pbzongvir,pbznapurf,pbybffrhz,pbyyvat,pbrkvfg,pbnkvat,pyvssfvqr,puhgrf,puhpxrq,pubxrf,puvyqyvxr,puvyqubbqf,puvpxravat,purabjvgu,punezvatyl,punatva,pngfhc,pncgvbavat,pncfvmr,pncchpvab,pncvpur,pnaqyrjryy,pnxrjnyx,pntrl,pnqqvr,ohkyrl,ohzoyvat,ohyxl,ohttrerq,oehffry,oeharggrf,oehzol,oebgun,oebapx,oevfxrg,oevqrtebbz,oenvqrq,obinel,obbxxrrcre,oyhfgre,oybbqyvar,oyvffshyyl,oynfr,ovyyvbanverf,ovpxre,oreevfsbeq,orersg,orengvat,orengr,oraql,oryvir,oryngrq,orvxbxh,orraf,orqfcernq,onjql,oneeryvat,oncgvmr,onaln,onygunmne,onyzbeny,onxfuv,onvyf,onqtrerq,onpxfgerrg,njxjneqyl,nhenf,nggharq,ngurvfgf,nfgnver,nffherqyl,neevirqrepv,nccrgvg,nccraqrpgbzl,ncbybtrgvp,nagvuvfgnzvar,narfgurfvbybtvfg,nzhyrgf,nyovr,nynezvfg,nvvtug,nqfgernz,nqzvenoyl,npdhnvag,nobhaq,nobzvanoyr,nnnnnnnu,mrxrf,mnghavpn,jhffl,jbeqrq,jbbrq,jbbqeryy,jvergnc,jvaqbjfvyy,jvaqwnzzre,jvaqsnyy,juvfxre,juvzf,jungvln,junqln,jrveqyl,jrravrf,jnhag,jnfubhg,jnagb,jnavat,ivpgvzyrff,ireqnq,irenaqn,inaqnyrl,inapbzlpva,inyvfr,inthrfg,hcfubg,hamvc,hajnfurq,hagenvarq,hafghpx,hacevapvcyrq,hazragvbanoyrf,hawhfgyl,hasbyqf,harzcyblnoyr,harqhpngrq,haqhyl,haqrephg,hapbirevat,hapbafpvbhfarff,hapbafpvbhfyl,glaqnerhf,gheapbng,gheybpx,ghyyr,gelbhgf,gebhcre,gevcyrggr,gercxbf,gerzbe,gerrtre,gencrmr,genvcfr,genqrbss,genpu,gbeva,gbzzbebj,gbyyna,gbvgl,gvzcnav,guhzocevag,gunaxyrff,gryy'rz,gryrcngul,gryrznexrgvat,gryrxvarfvf,grrirr,grrzvat,gneerq,gnzobhevar,gnyragyrff,fjbbcrq,fjvgpurebb,fjveyl,fjrngcnagf,fhafgebxr,fhvgbef,fhtnepbng,fhojnlf,fhogreshtr,fhofreivrag,fhoyrggvat,fghaavatyl,fgebatobk,fgevcgrnfr,fgeninanivgpu,fgenqyvat,fgbbyvr,fgbqtl,fgbpxl,fgvsyr,fgrnyre,fdhrrmrf,fdhnggre,fdhneryl,fcebhgrq,fcbby,fcvaqyl,fcrrqbf,fbhcf,fbhaqyl,fbhyzngrf,fbzrobql'yy,fbyvpvgvat,fbyrabvq,fborevat,fabjsynxrf,fabjonyyf,faberf,fyhat,fyvzzvat,fxhyx,fxviivrf,fxrjrerq,fxrjre,fvmvat,fvfgvar,fvqrone,fvpxbf,fuhfuvat,fuhag,fuhttn,fubar,fuby'in,funecrarq,funcrfuvsgre,funqbjvat,funqbr,fryrpgzna,frsryg,frnerq,fpebhatvat,fpevooyvat,fpbbcvat,fpvagvyyngvat,fpuzbbmvat,fpnyybcf,fnccuverf,fnavgnevhz,fnaqrq,fnsrf,ehqryl,ebhfg,ebfrohfu,ebfnfunea,ebaqryy,ebnqubhfr,evirgrq,erjebgr,erinzc,ergnyvngbel,ercevznaq,ercyvpngbef,ercynprnoyr,erzrqvrq,eryvadhvfuvat,erwbvpvat,ervapneangrq,ervzohefrq,errinyhngr,erqvq,erqrsvar,erperngvat,erpbaarpgrq,eroryyvat,ernffvta,erneivrj,enlar,enivatf,engfb,enzohapgvbhf,enqvbybtvfg,dhvire,dhvreb,dhrrs,dhnyzf,clebgrpuavpf,chyfngvat,cflpubfbzngvp,cebireo,cebzvfphbhf,cebsnavgl,cevbevgvmr,cerlvat,cerqvfcbfvgvba,cerpbpvbhf,cerpyhqrf,cenggyvat,cenaxfgre,cbivpu,cbggvat,cbfgcneghz,cbeevqtr,cbyyhgvat,cybjvat,cvfgnpuvb,cvffva,cvpxcbpxrg,culfvpnyf,crehfr,cregnvaf,crefbavsvrq,crefbanyvmr,crewherq,cresrpgvat,crclf,crccreqvar,crzoel,crrevat,crryf,crqbcuvyr,cnggvrf,cnffxrl,cnengebbcre,cnencureanyvn,cnenylmvat,cnaqrevat,cnygel,cnycnoyr,cntref,cnpulqrez,birefgnl,birerfgvzngrq,bireovgr,bhgjvg,bhgtebj,bhgovq,bbbcf,bbzcu,bbuuu,byqvr,boyvgrengr,bowrpgvbanoyr,altzn,abggvat,abpurf,avggl,avtugref,arjffgnaqf,arjobeaf,arhebfhetrel,anhfrngrq,anfgvrfg,anepbyrcfl,zhgvyngr,zhfpyrq,zhezhe,zhyin,zhyyvat,zhxnqn,zhssyrq,zbethrf,zbbaornzf,zbabtnzl,zbyrfgre,zbyrfgngvba,zbynef,zbnaf,zvfcevag,zvfzngpurq,zvegu,zvaqshy,zvzbfnf,zvyynaqre,zrfpnyvar,zrafgehny,zrantr,zryybjvat,zrqrinp,zrqqyrfbzr,zngrl,znavpherf,znyribyrag,znqzra,znpnebbaf,ylqryy,ylpen,yhapuebbz,yhapuvat,ybmratrf,ybbcrq,yvgvtvbhf,yvdhvqngr,yvabyrhz,yvatx,yvzvgyrff,yvzore,yvynpf,yvtngher,yvsgbss,yrzzvjvaxf,yrttb,yrneava,ynmneer,ynjlrerq,ynpgbfr,xaryg,xrabfun,xrzbfnor,whffl,whaxl,wbeql,wvzzvrf,wrevxb,wnxbinfnhe,vffnpf,vfnoryn,veerfcbafvovyvgl,vebarq,vagbkvpngvba,vafvahngrq,vaurevgf,vatrfg,vatrahr,vasyrkvoyr,vasynzr,varivgnovyvgl,varqvoyr,vaqhprzrag,vaqvtanag,vaqvpgzragf,vaqrsrafvoyr,vapbzcnenoyr,vapbzzhavpnqb,vzcebivfvat,vzcbhaqrq,vyybtvpny,vtabenzhf,ulqebpuybevp,ulqengr,uhatbire,uhzbeyrff,uhzvyvngvbaf,uhtrfg,ubireqebar,ubiry,uzzcu,uvgpuuvxr,uvoreangvat,urapuzna,uryybbbb,urveybbzf,urnegfvpx,urnqqerff,ungpurf,uneroenvarq,uncyrff,unara,unaqfbzre,unyybjf,unovghny,thgra,thzzl,thvygvre,thvqrobbx,tfgnnq,tehss,tevff,tevrirq,tengn,tbevtanx,tbbfrq,tbbsrq,tybjrq,tyvgm,tyvzcfrf,tynapvat,tvyzberf,tvnaryyv,trenavhzf,tneebjnl,tnatohfgref,tnzoyref,tnyyf,shqql,sehzcl,sebjavat,sebgul,seb'gnx,serer,sentenaprf,sbetrggva,sbyyvpyrf,sybjrel,sybcubhfr,sybngva,syvegf,syvatf,syngsbbg,svatrecevagvat,svatrecevagrq,svatrevat,svanyq,svyyrg,svnap,srzbeny,srqrenyrf,snjxrf,snfpvangrf,snesry,snzoyl,snyfvsvrq,snoevpngvat,rkgrezvangbef,rkcrpgnag,rkphfrm,rkperzrag,rkprepvfrf,rivna,rgvaf,rfbcuntrny,rdhvinyrapl,rdhngr,rdhnyvmre,ragerrf,radhver,raqrnezrag,rzcngurgvp,rznvyrq,rttebyy,rnezhssf,qlfyrkvp,qhcre,qhrfbhgu,qehaxre,qehttvr,qernqshyyl,qenzngvpf,qentyvar,qbjacynl,qbjaref,qbzvangevk,qbref,qbpxrg,qbpvyr,qvirefvsl,qvfgenpgf,qvfyblnygl,qvfvagrerfgrq,qvfpunetvat,qvfnterrnoyr,qvegvre,qvatul,qvzjvggrq,qvzbkvavy,qvzzl,qvngevor,qrivfvat,qrivngr,qrgevzrag,qrfregvba,qrcerffnagf,qrcenivgl,qravnovyvgl,qryvadhragf,qrsvyrq,qrrcpber,qrqhpgvir,qrpvzngr,qrnqobyg,qnhguhvyyr,qnfgneqyl,qnvdhvevf,qnttref,qnpunh,phevbhfre,pheqyrq,phpnzbatn,pehyyre,pehprf,pebffjnyx,pevaxyr,perfpraqb,perzngr,pbhafryrq,pbhpurf,pbearn,pbeqnl,pbcreavphf,pbagevgvba,pbagrzcgvoyr,pbafgvcngrq,pbawbvarq,pbasbhaqrq,pbaqrfpraq,pbapbpg,pbapu,pbzcrafngvat,pbzzvggzrag,pbzznaqrrerq,pbzryl,pbqqyrq,pbpxsvtug,pyhggrerq,pyhaxl,pybjasvfu,pybnxrq,pyrapurq,pyrnava,pvivyvfrq,pvephzpvfrq,pvzzrevn,pvynageb,puhgmcnu,puhpxvat,puvfryrq,puvpxn,punggrevat,preivk,pneerl,pnecny,pneangvbaf,pncchppvabf,pnaqvrq,pnyyhfrf,pnyvfguravpf,ohful,ohearef,ohqvatgba,ohpunanaf,oevzzvat,oenvqf,oblpbggvat,obhapref,obggvpryyv,obgureva,obbxxrrcvat,obtlzna,obttrq,oybbqguvefgl,oyvagmrf,oynaxl,ovaghebat,ovyynoyr,ovtobbgr,orjvyqrerq,orgnf,ordhrngu,orubbir,orsevraq,orqcbfg,orqqrq,onhqrynverf,oneeryrq,oneobav,oneordhr,onatva,onyghf,onvybhg,onpxfgnoore,onppneng,njavat,nhtvr,nethvyyb,nepujnl,ncevpbgf,ncbybtvfvat,naalbat,napubezna,nzranoyr,nznmrzrag,nyyfcvpr,nynaavf,nvesner,nveontf,nuuuuuuuuu,nuuuuuuuu,nuuuuuuu,ntvgngbe,nqerany,npvqbfvf,npubb,npprffbevmvat,nppraghngr,noenfvbaf,noqhpgbe,nnnnuuu,nnnnnnnn,nnnnnnn,mrebvat,mryare,mryql,lritral,lrfxn,lryybjf,lrrfu,lrnuu,lnzhev,jbhyqa'g'ir,jbexznafuvc,jbbqfzna,jvaava,jvaxrq,jvyqarff,jubevat,juvgrjnfu,juvarl,jura'er,jurrmre,jurryzna,jurryoneebj,jrfgreohet,jrrqvat,jngrezrybaf,jnfuobneq,jnygmrf,jnsgvat,ibhyrm,ibyhcghbhf,ivgbar,ivtvynagrf,ivqrbgncvat,ivpvbhfyl,ivprf,irehpn,irezrre,irevslvat,infphyvgvf,inyrgf,hcubyfgrerq,hajnirevat,hagbyq,haflzcngurgvp,haebznagvp,haerpbtavmnoyr,hacerqvpgnovyvgl,haznfx,hayrnfuvat,havagragvbany,hatyhrq,hardhvibpny,haqreengrq,haqresbbg,hapurpxrq,haohggba,haovaq,haovnfrq,hantv,huuuuu,ghttvat,gevnqf,gerfcnffrf,gerrubea,genivngn,genccref,genafcynagf,genaavr,genzcvat,genpurbgbzl,gbheavdhrg,gbbgl,gbbguyrff,gbzneebj,gbnfgref,guehfgre,gubhtugshyarff,gubeajbbq,gratb,grasbyq,gryygnyr,gryrcubgb,gryrcubarq,gryrznexrgre,grneva,gnfgvp,gnfgrshyyl,gnfxvat,gnfre,gnzrq,gnyybj,gnxrgu,gnvyyvtug,gnqcbyrf,gnpuvonan,flevatrf,fjrngrq,fjnegul,fjnttre,fhetrf,fhcrezbqryf,fhcreuvtujnl,fhahc,fha'yy,fhysn,fhtneyrff,fhssvprq,fhofvqr,fgebyyrq,fgevatl,fgeratguraf,fgenvtugrfg,fgenvtugraf,fgbersebag,fgbccre,fgbpxcvyvat,fgvzhynag,fgvssrq,fgrlar,fgreahz,fgrcynqqre,fgrcoebgure,fgrref,fgrryurnqf,fgrnxubhfr,fgnguvf,fgnaxlyrpnegznaxraalze,fgnaqbssvfu,fgnyjneg,fdhvegrq,fcevgm,fcevt,fcenjy,fcbhfny,fcuvapgre,fcraqref,fcrnezvag,fcnggre,fcnatyrq,fbhgurl,fbherq,fbahinovgpu,fbzrguat,fahssrq,favssf,fzbxrfperra,fzvyva,fybof,fyrrcjnyxre,fyrqf,fynlf,fynlntr,fxlqvivat,fxrgpurq,fxnaxf,fvkrq,fvcubarq,fvcuba,fvzcrevat,fvtsevrq,fvqrnez,fvqqbaf,fvpxvr,fuhgrlr,fuhssyrobneq,fuehoorevrf,fuebhqrq,fubjznafuvc,fubhyqa'g'ir,fubcyvsg,fuvngfh,fragevrf,fragnapr,frafhnyvgl,frrguvat,frpergvbaf,frnevat,fphggyrohgg,fphycg,fpbjyvat,fpbhevat,fpberpneq,fpubbyref,fpuzhpxf,fprcgref,fpnyl,fpnycf,fpnssbyqvat,fnhprf,fnegbevhf,fnagra,fnyvingvat,fnvagubbq,fntrg,fnqqraf,eltnyfxv,ehfgvat,ehvangvba,ehrynaq,ehqnontn,ebggjrvyre,ebbsvrf,ebznagvpf,ebyyreoynqvat,ebyql,ebnqfubj,evpxrgf,evoyr,eurmn,erivfvgvat,ergragvir,erfhesnpr,erfgberf,erfcvgr,erfbhaqvat,erfbegvat,erfvfgf,erchyfr,ercerffvat,ercnlvat,erartrq,ershaqf,erqvfpbire,erqrpbengrq,erpbafgehpgvir,erpbzzvggrq,erpbyyrpg,erprcgnpyr,ernffrff,ernavzngvba,ernygbef,enmvava,engvbanyvmngvba,engngbhvyyr,enfuhz,enfpmnx,enapurebf,enzcyre,dhvmmvat,dhvcf,dhnegrerq,cheevat,chzzryvat,chrqr,cebkvzb,cebfcrpghf,cebabhapvat,cebybatvat,cebperngvba,cebpynzngvbaf,cevapvcyrq,cevqrf,cerbpphcngvba,certb,cerpbt,cenggyr,cbhaprq,cbgfubgf,cbgcbheev,cbedhr,cbzrtenangrf,cbyragn,cylvat,cyhvr,cyrfnp,cynlzngrf,cynagnvaf,cvyybjpnfr,cvqqyr,cvpxref,cubgbpbcvrq,cuvyvfgvar,crecrghngr,crecrghnyyl,crevybhf,cnjarq,cnhfvat,cnhcre,cnegre,cneyrm,cneynl,cnyyl,bihyngvba,biregnxr,birefgngr,birecbjrevat,birecbjrerq,birepbasvqrag,bireobbxrq,binygvar,bhgjrvtuf,bhgvatf,bggbf,beeva,bevsvpr,benathgna,bbcfl,bbbbbbbbu,bbbbbb,bbbuuuu,bphyne,bofgehpg,bofpraryl,b'qjlre,ahgwbo,ahahe,abgvslvat,abfgenaq,abaal,abasng,aboyrfg,avzoyr,avxrf,avpug,arjfjbegul,arfgyrq,arnefvtugrq,ar're,anfgvre,anepb,anxrqarff,zhgrq,zhzzvsvrq,zhqqn,zbmmneryyn,zbkvpn,zbgvingbe,zbgvyvgl,zbgunshpxn,zbegznva,zbegtntrq,zberf,zbatref,zboorq,zvgvtngvat,zvfgnu,zvfercerfragrq,zvfuxr,zvfsbegharf,zvfqverpgvba,zvfpuvribhf,zvarfunsg,zvyynarl,zvpebjnirf,zrgmraonhz,zppbirl,znfgreshy,znfbpuvfgvp,zneyvfgba,znevwnjnan,znaln,znaghzov,znynexrl,zntavsvdhr,znqeban,znqbk,znpuvqn,z'uvqv,yhyynovrf,ybiryvarff,ybgvbaf,ybbxn,ybzcbp,yvggreoht,yvgvtngbe,yvgur,yvdhbevpr,yvaqf,yvzrevpxf,yvtugohyo,yrjvfrf,yrgpu,yrzrp,ynlbire,yningbel,ynheryf,yngrarff,yncnebgbzl,ynobevat,xhngb,xebss,xevfcl,xenhgf,xahpxyrurnqf,xvgfpul,xvccref,xvzoebj,xrlcnq,xrrcfnxr,xrono,xneybss,whaxrg,whqtrzragny,wbvagrq,wrmmvr,wrggvat,wrrmr,wrrgre,wrrfhf,wrrof,wnarnar,wnvyf,wnpxunzzre,vkanl,veevgngrf,veevgnovyvgl,veeribpnoyr,veershgnoyr,vexrq,vaibxvat,vagevpnpvrf,vagresreba,vagragf,vafhobeqvangr,vafgehpgvir,vafgvapgvir,vadhvfvgvir,vaynl,vawhaf,varoevngrq,vaqvtavgl,vaqrpvfvir,vapvfbef,vapnpun,vanyvranoyr,vzcerffrf,vzcertangr,vzcertanoyr,vzcybfvba,vqbyvmrf,ulcbgulebvqvfz,ulcbtylprzvp,uhfrav,uhzirr,uhqqyvat,ubavat,uboaboovat,uboabo,uvfgevbavpf,uvfgnzvar,uvebuvgb,uvccbpengvp,uvaqdhnegref,uvxvgn,uvxrf,uvtugnvyrq,uvrebtylcuvpf,urergbsber,ureonyvfg,ururl,urqevxf,urnegfgevatf,urnqzvfgerff,urnqyvtug,unequrnqrq,unccraq,unaqyronef,untvgun,unoyn,tlebfpbcr,thlf'q,thl'q,thggrefavcr,tehzc,tebjrq,tebiryyvat,tebna,terraonpxf,tenirqvttre,tengvat,tenffubccref,tenaqvbfr,tenaqrfg,tensgrq,tbbbbq,tbbbq,tbbxf,tbqfnxrf,tbnqrq,tynzbenzn,tvirgu,tvatunz,tubfgohfgref,treznar,trbetl,tnmmb,tnmryyrf,tnetyr,tneoyrq,tnytrafgrva,tnssr,t'qnl,slney,sheavfu,shevrf,shysvyyf,sebjaf,sebjarq,sevtugravatyl,serrovrf,sernxvfuyl,sberjnearq,sberpybfr,sbernezf,sbeqfba,sbavpf,syhfurf,syvggvat,syrzzre,synool,svfuobjy,svqtrgvat,sriref,srvtavat,snkvat,sngvthrq,sngubzf,sngureyrff,snapvre,snangvpny,snpgberq,rlryvq,rlrtynffrf,rkcerffb,rkcyrgvir,rkcrpgva,rkpehpvngvatyl,rivqragvnel,rire'guvat,rhebgenfu,rhovr,rfgenatrzrag,reyvpu,rcvgbzr,ragenc,rapybfr,rzculfrzn,rzoref,rznfphyngvat,rvtuguf,rneqehz,qlfyrkvn,qhcyvpvgbhf,qhzcgl,qhzoyrqber,qhshf,qhqql,qhpunzc,qehaxraarff,qehzyva,qebjaf,qebvq,qevaxl,qevsgf,qenjoevqtr,qenznzvar,qbhttvr,qbhpuront,qbfgblrifxl,qbbqyvat,qba'gpun,qbzvarrevat,qbvatf,qbtpngpure,qbpgbevat,qvgml,qvffvzvyne,qvffrpgvat,qvfcnentr,qvfyvxvat,qvfvagrtengvat,qvfujnyyn,qvfubaberq,qvfuvat,qvfratntrq,qvfnibjrq,qvccl,qvbenzn,qvzzrq,qvyngr,qvtvgnyvf,qvttbel,qvpvat,qvntabfvat,qribyn,qrfbyngvba,qraavatf,qravnyf,qryvirenapr,qryvpvbhfyl,qryvpnpvrf,qrtrarengrf,qrtnf,qrsyrpgbe,qrsvyr,qrsrerapr,qrpercvg,qrpvcurerq,qnjqyr,qnhcuvar,qnerfnl,qnatyrf,qnzcra,qnzaqrfg,phphzoref,phpnenpun,pelbtravpnyyl,pebnxf,pebnxrq,pevgvpvfr,pevfcre,perrcvrfg,pernzf,penpxyr,penpxva,pbiregyl,pbhagrevagryyvtrapr,pbeebfvir,pbeqvnyyl,pbcf'yy,pbaihyfvbaf,pbaibyhgrq,pbairefvat,pbatn,pbasebagngvbany,pbasno,pbaqbyrapr,pbaqvzragf,pbzcyvpvg,pbzcvrtar,pbzzbqhf,pbzvatf,pbzrgu,pbyyhfvba,pbyynerq,pbpxrlrq,pyboore,pyrzbaqf,pynevguebzlpva,pvrartn,puevfgznfl,puevfgznffl,puybebsbez,puvccvr,purfgrq,purrpb,purpxyvfg,punhivavfg,punaqyref,punzoreznvq,punxenf,pryybcunar,pnirng,pngnybthvat,pnegznaynaq,pnecyrf,pneal,pneqrq,pnenzryf,pnccl,pncrq,pnainffvat,pnyyonpx,pnyvoengrq,pnynzvar,ohggrezvyx,ohggresvatref,ohafra,ohyvzvn,ohxngnev,ohvyqva,ohqtrq,oebovpu,oevatre,oeraqryy,oenjyvat,oenggl,oenvfrq,oblvfu,obhaqyrff,obgpu,obbfu,obbxvrf,obaobaf,obqrf,obohax,oyhagyl,oybffbzvat,oybbzref,oybbqfgnvaf,oybbqubhaqf,oyrpu,ovgre,ovbzrgevp,ovbrguvpf,ovwna,ovtbgrq,ovprc,orernirq,oryybjvat,orypuvat,orubyqra,ornpurq,ongzbovyr,onepbqrf,onepu,oneorphvat,onaqnaan,onpxjngre,onpxgenpx,onpxqensg,nhthfgvab,ngebcul,ngebpvgl,ngyrl,ngpubb,nfguzngvp,nffbp,nezpunve,nenpuavqf,ncgyl,nccrgvmvat,nagvfbpvny,nagntbavmvat,naberkvn,navav,naqrefbaf,nantenz,nzchgngvba,nyyryhvn,nveybpx,nvzyrff,ntbavmrq,ntvgngr,ntteningvat,nrebfby,npvat,nppbzcyvfuvat,nppvqragyl,nohfre,nofgnva,noabeznyyl,noreengvba,nnnnnuu,mybglf,mrfgl,mremhen,mncehqre,mnagbcvn,lryohegba,lrrff,l'xabjjungv'zfnlva,jjung,jhffvrf,jerapurq,jbhyq'n,jbeelva,jbezfre,jbbbbb,jbbxvrr,jbypurx,jvfuva,jvfrthlf,jvaqoernxre,jvttl,jvraref,jvrqrefrura,jubbcva,juvggyrq,jurersber,juneirl,jrygf,jryyfgbar,jrqtrf,jnirerq,jngpuvg,jnfgronfxrg,jnatb,jnxra,jnvgerffrq,jnpdhvrz,ielxbynxn,ibhyn,ivgnyyl,ivfhnyvmvat,ivpvbhfarff,irfcref,iregrf,irevyl,irtrgnevnaf,ingre,incbevmr,inaanphgg,inyyraf,hffure,hevangvat,hccvat,hajvggvat,hagnatyr,hagnzrq,hafnavgnel,haeniryrq,habcrarq,havfrk,havaibyirq,havagrerfgvat,havagryyvtvoyr,havzntvangvir,haqrfreivat,haqrezvarf,haqretnezragf,hapbaprearq,glenagf,glcvfg,glxrf,glonyg,gjbfbzr,gjvgf,ghggv,gheaqbja,ghynerzvn,ghorephybzn,gfvzfuvna,gehssnhg,gehre,gehnag,gebir,gevhzcurq,gevcr,gevtbabzrgel,gevsyrq,gevsrpgn,gevohyngvbaf,gerzbag,gerzbvyyr,genafpraqf,genssvpxre,gbhpuva,gbzsbbyrel,gvaxrerq,gvasbvy,gvtugebcr,gubhfna,gubenpbgbzl,gurfnhehf,gunjvat,gunggn,grffvb,grzcf,gnkvqrezvfg,gngbe,gnpulpneqvn,g'nxnln,fjrypb,fjrrgoernqf,fjnggvat,fhcrepbyyvqre,fhaonguvat,fhzznevyl,fhssbpngvba,fhryrra,fhppvapg,fhofvqrq,fhozvffvir,fhowrpgvat,fhoovat,fhongbzvp,fghcraqbhf,fghagrq,fghooyr,fghoorq,fgerrgjnyxre,fgengrtvmvat,fgenvavat,fgenvtugnjnl,fgbyv,fgvssre,fgvpxhc,fgraf,fgrnzebyyre,fgrnqjryy,fgrnqsnfg,fgngrebbz,fgnaf,ffuuuu,fdhvfuvat,fdhvagvat,fdhrnyrq,fcebhgvat,fcevzc,fcernqfurrgf,fcenjyrq,fcbgyvtugf,fcbbavat,fcvenyf,fcrrqobng,fcrpgnpyrf,fcrnxrecubar,fbhgutyra,fbhfr,fbhaqcebbs,fbbgufnlre,fbzzrf,fbzrguvatf,fbyvqvsl,fbnef,fabegrq,fabexryvat,favgpurf,favcvat,favsgre,favssva,favpxrevat,farre,faney,fzvyn,fyvaxvat,fynagrq,fynaqrebhf,fynzzva,fxvzc,fxvybfu,fvgrvq,fveybva,fvatr,fvtuvat,fvqrxvpxf,fvpxra,fubjfgbccre,fubcyvsgre,fuvzbxnjn,fureobear,funinqnv,funecfubbgref,funexvat,funttrq,funqqhc,frabevgn,frfgreprf,frafhbhf,frnunira,fphyyrel,fpbepure,fpubgmvr,fpuabm,fpuzbbmr,fpuyrc,fpuvmb,fpragf,fpnycvat,fpnycrq,fpnyybc,fpnyqvat,fnlrgu,fnloebbxr,fnjrq,fnibevat,fneqvar,fnaqfgbez,fnaqnyjbbq,fnyhgngvbaf,fntzna,f'bxnl,efic'q,ebhfgrq,ebbgva,ebzcre,ebznabif,ebyyrepbnfgre,ebysvr,ebovafbaf,evgml,evghnyvfgvp,evatjnyq,eulzrq,eurvatbyq,erjevgrf,eribxvat,eriregf,ergebsvg,ergbeg,ergvanf,erfcvengvbaf,ercebongr,ercynlvat,ercnvag,eradhvfg,erartr,eryncfvat,erxvaqyrq,erwhirangvat,erwhirangrq,ervafgngvat,erpevzvangvbaf,erpurpxrq,ernffrzoyr,ernef,ernzrq,ernpdhnvag,enlnaar,enivfu,engubyr,enfcnvy,enerfg,encvfgf,enagf,enpxrgrre,dhvggva,dhvggref,dhvagrffragvny,dhrerzbf,dhryyrx,dhryyr,dhnfvzbqb,clebznavnp,chggnarfpn,chevgnavpny,chere,cherr,chatrag,chzzry,chrqb,cflpubgurencvfg,cebfrphgbevny,cebfpvhggb,cebcbfvgvbavat,cebpenfgvangvba,cebongvbanel,cevzcvat,ceriragngvir,cerinvyf,cerfreingvirf,cernpul,cenrgbevnaf,cenpgvpnyvgl,cbjqref,cbghf,cbfgbc,cbfvgvirf,cbfre,cbegbynab,cbegbxnybf,cbbyfvqr,cbygretrvfgf,cbpxrgrq,cbnpu,cyhzzrgrq,cyhpxvat,cyvzcgba,cynlguvatf,cynfgvdhr,cynvapybgurf,cvacbvagrq,cvaxhf,cvaxf,cvtfxva,cvssyr,cvpgvbanel,cvppngn,cubgbpbcl,cubovnf,crevtaba,creshzrf,crpxf,crpxrq,cngragyl,cnffnoyr,cnenfnvyvat,cnenzhf,cncvre,cnvagoehfu,cnpre,cnnvvag,biregherf,bireguvax,birefgnlrq,bireehyr,birerfgvzngr,birepbbxrq,bhgynaqvfu,bhgterj,bhgqbbefl,bhgqb,bepurfgengr,bccerff,bccbfnoyr,bbbbuu,bbzhcjnu,bxrlqbxrl,bxnnnl,bunfuv,bs'rz,bofpravgvrf,bnxvr,b'tne,aherpgvba,abfgenqnzhf,abegure,abepbz,abbpu,abafrafvpny,avccrq,avzonyn,areibhfyl,arpxyvar,arooyrzna,anejuny,anzrgnt,a'a'g,zlpranr,zhmnx,zhhzhh,zhzoyrq,zhyiruvyy,zhttvatf,zhssrg,zbhgul,zbgvingrf,zbgnon,zbbpure,zbatv,zbyrl,zbvfghevmr,zbunve,zbpxl,zzxnl,zvfghu,zvffvf,zvfqrrqf,zvaprzrng,zvttf,zvssrq,zrgunqbar,zrffvrhe,zrabcnhfny,zrantrevr,zptvyyvphqql,znlsybjref,zngevzbavny,zngvpx,znfnv,znemvcna,zncyrjbbq,znamryyr,znaardhvaf,znaubyr,znaunaqyr,znyshapgvbaf,znqjbzna,znpuvniryyv,ylayrl,ylapurq,yhepbavf,yhwnpx,yhoevpnag,ybbbir,ybbaf,ybbsnu,ybarylurnegf,ybyyvcbcf,yvarfjbzna,yvsref,yrkgre,yrcare,yrzbal,yrttl,yrnsl,yrnqrgu,ynmrehf,ynmner,ynjsbeq,ynathvfuvat,yntbqn,ynqzna,xhaqren,xevaxyr,xeraqyre,xervtry,xbjbyfxv,xabpxqbja,xavsrq,xarrq,xarrpnc,xvqf'yy,xraavr,xrazber,xrryrq,xnmbbgvr,xngmrazblre,xnfqna,xnenx,xncbjfxv,xnxvfgbf,whylna,wbpxfgenc,wboyrff,wvttyl,wnhag,wneevat,wnoorevat,veevtngr,veeribpnoyl,veengvbanyyl,vebavrf,vaivgeb,vagvzngrq,vagragyl,vagragvbarq,vagryyvtragyl,vafgvyy,vafgvtngbe,vafgrc,vabccbeghar,vaahraqbrf,vasyngr,vasrpgf,vasnzl,vaqvfpergvbaf,vaqvfperrg,vaqvb,vaqvtavgvrf,vaqvpg,vaqrpvfvba,vapbafcvphbhf,vanccebcevngryl,vzchavgl,vzchqrag,vzcbgrapr,vzcyvpngrf,vzcynhfvoyr,vzcresrpgvba,vzcngvrapr,vzzhgnoyr,vzzbovyvmr,vqrnyvfg,vnzovp,ulfgrevpnyyl,ulcrefcnpr,ultvravfg,ulqenhyvpf,ulqengrq,uhmmnu,uhfxf,uhapurq,uhssrq,uhoevf,uhooho,ubirepensg,ubhatna,ubfrq,ubebfpbcrf,ubcryrffarff,ubbqjvaxrq,ubabenoyl,ubarlfhpxyr,ubzrtvey,ubyvrfg,uvccvgl,uvyqvr,uvrebtylcuf,urkgba,urerva,urpxyr,urncvat,urnyguvyvmre,urnqsvefg,ungfhr,uneybg,uneqjverq,unybgunar,unvefglyrf,unntra,unnnnn,thggvat,thzzv,tebhaqyrff,tebnavat,tevfgyr,tevyyf,tenlanzber,tenoova,tbbqrf,tbttyr,tyvggrevat,tyvag,tyrnzvat,tynffl,tvegu,tvzony,tvoyrgf,tryyref,trrmref,trrmr,tnefunj,tnetnaghna,tneshaxry,tnatjnl,tnaqnevhz,tnzhg,tnybfurf,tnyyvinagvat,tnvashyyl,tnpuane,shfvbayvcf,shfvyyv,shevbhfyl,sehtny,sevpxvat,serqrevxn,serpxyvat,senhqf,sbhagnvaurnq,sbegujvgu,sbetb,sbetrggnoyr,sberfvtug,sberfnj,sbaqyvat,sbaqyrq,sbaqyr,sbyxfl,syhggrevat,syhssvat,sybhaqrevat,syvegngvbhf,syrkvat,synggrere,synevat,svkngvat,svapul,svtherurnq,svraqvfu,sregvyvmr,srezrag,sraqvat,sryynuf,srryref,snfpvangr,snagnohybhf,snyfvsl,snyybcvna,snvguyrff,snvere,snvagre,snvyvatf,snprgvbhf,rlrcngpu,rkkba,rkgengreerfgevnyf,rkgenqvgr,rkgenpheevphynef,rkgvathvfu,rkchatrq,rkcryyvat,rkbeovgnag,rkuvynengrq,rkregvba,rkregvat,rkprepvfr,rireobql,rincbengrq,rfpnetbg,rfpncrr,renfrf,rcvmbbgvpf,rcvguryvnyf,rcuehz,ragnatyrzragf,rafynir,ratebffrq,rzcungvp,rzrenyqf,rzore,rznapvcngrq,ryringrf,rwnphyngr,rssrzvangr,rppragevpvgvrf,rnfltbvat,rnefubg,qhaxf,qhyyarff,qhyyv,qhyyrq,qehzfgvpx,qebccre,qevsgjbbq,qertf,qerpx,qernzobng,qenttva,qbjafvmvat,qbabjvgm,qbzvabrf,qvirefvbaf,qvfgraqrq,qvffvcngr,qvfenryv,qvfdhnyvsl,qvfbjarq,qvfujnfuvat,qvfpvcyvavat,qvfpreavat,qvfnccbvagf,qvatrq,qvtrfgrq,qvpxvat,qrgbangvat,qrfcvfvat,qrcerffbe,qrcbfr,qrcbeg,qragf,qrshfrq,qrsyrpgvat,qrpelcgvba,qrpblf,qrpbhcntr,qrpbzcerff,qrpvory,qrpnqrapr,qrnsravat,qnjavat,qngre,qnexrarq,qnccl,qnyylvat,qntba,pmrpubfybinxvnaf,phgvpyrf,phgrarff,phcobneqf,phybggrf,pehvfva,pebffunvef,pebala,pevzvanyvfgvpf,perngviryl,pernzvat,penccvat,penaal,pbjrq,pbagenqvpgvat,pbafgvcngvba,pbasvavat,pbasvqraprf,pbaprvivat,pbaprvinoyl,pbaprnyzrag,pbzchyfviryl,pbzcynvava,pbzcynprag,pbzcryf,pbzzhavat,pbzzbqr,pbzzvat,pbzzrafhengr,pbyhzavfgf,pbybabfpbcl,pbypuvpvar,pbqqyvat,pyhzc,pyhoorq,pybjavat,pyvssunatre,pynat,pvffl,pubbfref,pubxre,puvssba,punaaryrq,punyrg,pryyzngrf,pngunegvp,pnfrybnq,pnewnpx,pnainff,pnavfgref,pnaqyrfgvpx,pnaqyryvg,pnzel,pnymbarf,pnyvgev,pnyql,olyvar,ohggreonyy,ohfgvre,oheync,ohernhpeng,ohssbbaf,ohranf,oebbxyvar,oebamrq,oebvyrq,oebqn,oevff,oevbpur,oevne,oerngunoyr,oenlf,oenffvrerf,oblfraoreel,objyvar,obbbb,obbavrf,obbxyrgf,obbxvfu,obbtrlzna,obbtrl,obtnf,obneqvatubhfr,oyhhpu,oyhaqrevat,oyhre,oybjrq,oybgpul,oybffbzrq,oybbqjbex,oybbqvrq,oyvgurevat,oyvaxf,oyngurevat,oynfcurzbhf,oynpxvat,oveqfba,ovatf,oszvq,osnfg,orggva,orexfuverf,orawnzvaf,oraribyrapr,orapurq,orangne,oryylohggba,orynobe,orubbirf,orqql,ornhwbynvf,ornggyr,onkjbegu,onfryrff,onesvat,onaavfu,onaxebyyrq,onarx,onyyfl,onyycbvag,onssyvat,onqqre,onqqn,onpgvar,onpxtnzzba,onnxb,nmgerbanz,nhgubevgnu,nhpgvbavat,nenpugbvqf,ncebcbf,ncebaf,nccevfrq,nccerurafvir,nalguat,nagvirava,nagvpuevfg,naberkvp,nabvag,nathvfurq,natvbcynfgl,natvb,nzcyl,nzcvpvyyva,nzcurgnzvarf,nygreangbe,nypbir,nynonfgre,nveyvsgrq,ntenonu,nssvqnivgf,nqzbavfurq,nqzbavfu,nqqyrq,nqqraqhz,npphfre,nppbzcyv,nofheqvgl,nofbyirq,noehffb,noernfg,nobbg,noqhpgvbaf,noqhpgvat,nonpx,nonojn,nnnuuuu,mbeva,mvagune,mvasnaqry,mvyyvbaf,mrculef,mngnepf,mnpxf,lbhhh,lbxryf,lneqfgvpx,lnzzre,l'haqrefgnaq,jlarggr,jehat,jernguf,jbjrq,jbhyqa'gn,jbezvat,jbezrq,jbexqnl,jbbqfl,jbbqfurq,jbbqpuhpx,jbwnqhonxbjfxv,jvgurevat,jvgpuvat,jvfrnff,jvergncf,jvavat,jvyybol,jvppnavat,juhccrq,jubbcv,jubbzc,jubyrfnyre,juvgrarff,juvare,jungpuln,juneirf,jrahf,jrveqbrf,jrnavat,jnghfv,jncbav,jnvfgonaq,jnpxbf,ibhpuvat,ibger,ivivpn,ivirpn,ivinag,ivinpvbhf,ivfbe,ivfvgva,ivfntr,ivpehz,irggrq,iragevybdhvfz,iravfba,ineafra,incbevmrq,incvq,inafgbpx,hhhhu,hfurevat,hebybtvfg,hevangvba,hcfgneg,hcebbgrq,hafhogvgyrq,hafcbvyrq,hafrng,hafrnfbanoyl,hafrny,hafngvfslvat,haareir,hayvxnoyr,hayrnqrq,havafherq,havafcverq,havplpyr,haubbxrq,hashaal,haserrmvat,hasynggrevat,hasnvearff,harkcerffrq,haraqvat,haraphzorerq,harnegu,haqvfpbirerq,haqvfpvcyvarq,haqrefgna,haqrefuveg,haqreyvatf,haqreyvar,haqrepheerag,hapvivyvmrq,hapunenpgrevfgvp,hzcgrragu,htyvrf,gharl,gehzcf,gehpxnfnhehf,gehofunj,gebhfre,gevatyr,gevsyvat,gevpxfgre,gerfcnffref,gerfcnffre,genhznf,genggbevn,genfurf,genafterffvbaf,genzcyvat,gc'rq,gbkbcynfzbfvf,gbhatr,gbegvyynf,gbcfl,gbccyr,gbcabgpu,gbafvy,gvbaf,gvzzhu,gvzvguvbhf,gvyarl,gvtugl,gvtugarff,gvtugraf,gvqovgf,gvpxrgrq,gulzr,guerrcvb,gubhtugshyyl,gubexry,gubzzb,guvat'yy,gursgf,gung'ir,gunaxftvivatf,grgureonyy,grfgvxbi,greensbezvat,grcvq,graqbavgvf,graobbz,gryrk,grralobccre,gnggrerq,gnggntyvnf,gnaarxr,gnvyfcva,gnoyrpybgu,fjbbcvat,fjvmmyr,fjvcvat,fjvaqyrq,fjvyyvat,fjreivat,fjrngfubcf,fjnqqyvat,fjnpxunzzre,firgxbss,fhcbffrq,fhcreqnq,fhzcghbhf,fhtnel,fhtnv,fhoireg,fhofgnagvngr,fhozrefvoyr,fhoyvzngvat,fhowhtngvba,fglzvrq,fgelpuavar,fgerrgyvtugf,fgenffznaf,fgenatyrubyq,fgenatrarff,fgenqqyvat,fgenqqyr,fgbjnjnlf,fgbgpu,fgbpxoebxref,fgvsyvat,fgrcsbeq,fgrrentr,fgrran,fgnghnel,fgneyrgf,fgnttrevatyl,fffuuu,fdhnj,fcheg,fchatrba,fcevgmre,fcevtugyl,fcenlf,fcbegfjrne,fcbbashy,fcyvggva,fcyvgfivyyr,fcrrqvyl,fcrpvnyvfr,fcnfgvp,fcneeva,fbhiynxv,fbhguvr,fbhechff,fbhcl,fbhaqfgntr,fbbgurf,fbzrobql'q,fbsgrfg,fbpvbcnguvp,fbpvnyvmrq,falqref,fabjzbovyrf,fabjonyyrq,fangpurf,fzhtarff,fzbbgurfg,fznfurf,fybfurq,fyrvtug,fxlebpxrg,fxvrq,fxrjrq,fvkcrapr,fvcbjvpm,fvatyvat,fvzhyngrf,fularff,fuhinavf,fubjbss,fubegfvtugrq,fubcxrrcre,fubrubea,fuvgubhfr,fuvegyrff,fuvcfuncr,fuvsh,furyir,furyolivyyr,furrcfxva,funecraf,fundhvyyr,funafuh,freivatf,frdhvarq,frvmrf,frnfuryyf,fpenzoyre,fpbcrf,fpuanhmre,fpuzb,fpuvmbvq,fpnzcrerq,fnintryl,fnhqvf,fnagnf,fnaqbinyf,fnaqvat,fnyrfjbzna,fnttvat,f'phfr,ehggvat,ehguyrffyl,ehaargu,ehssvnaf,ehorf,ebfnyvgn,ebyyreoynqrf,ebulcaby,ebnfgf,ebnqvrf,evggra,evccyvat,evccyrf,evtbyrggb,evpuneqb,ergubhtug,erfubbg,erfreivat,erfrqn,erfphre,erernq,erdhvfvgvbaf,erchgr,ercebtenz,ercyravfu,ercrgvgvbhf,erbetnavmvat,ervairagvat,ervairagrq,erurng,ersevtrengbef,erragre,erpehvgre,erpyvare,enjql,enfurf,enwrfxv,envfba,envfref,entrf,dhvavar,dhrfgfpncr,dhryyre,cltznyvba,chfuref,chfna,cheivrj,chzcva,chorfprag,cehqrf,cebibybar,cebcevrgl,cebccrq,cebpenfgvangr,cebprffvbany,cerlrq,cergevny,cbegrag,cbbyvat,cbbsl,cbyybv,cbyvpvn,cbnpure,cyhfrf,cyrnfhevat,cyngvghqrf,cyngrnhrq,cynthvat,cvggnapr,cvaurnqf,cvaphfuvba,cvzcyl,cvzcrq,cvttlonpx,cvrpvat,cuvyyvcr,cuvyvcfr,cuvyol,cunenbuf,crgle,crgvgvbare,crfugvtb,crfnenz,crefavpxrgl,crecrgengr,crepbyngvat,crcgb,craar,craryy,crzzvpna,crrxf,crqnyvat,crnprznxre,cnjafubc,cnggvat,cngubybtvpnyyl,cngpubhyv,cnfgf,cnfgvrf,cnffva,cneybef,cnygebj,cnynzba,cnqybpx,cnqqyvat,birefyrrc,bireurngvat,bireqbfrq,birepunetr,bireoybja,bhgentrbhfyl,bearel,bccbeghar,bbbbbbbbbu,bbuuuu,buuuuuu,bterf,bqbeyrff,boyvgrengrq,albat,alzcubznavnp,agbmnxr,abibpnva,abhtu,abaavr,abavffhr,abqhyrf,avtugznevfu,avtugyvar,avprgvrf,arjfzna,arrqen,arqel,arpxvat,anibhe,anhfrnz,anhyf,anevz,anzngu,anttrq,anobb,a'flap,zlfyrkvn,zhgngbe,zhfgnsv,zhfxrgrre,zhegnhtu,zheqrerff,zhapuvat,zhzfl,zhyrl,zbhfrivyyr,zbegvslvat,zbetraqbessref,zbbyn,zbagry,zbatbybvq,zbyrfgrerq,zbyqvatf,zbpneovrf,zb'ff,zvkref,zvferyy,zvfabzre,zvfurneq,zvfunaqyrq,zvfpernag,zvfpbaprcgvbaf,zvavfphyr,zvyytngr,zrggyr,zrgevppbairegre,zrgrbef,zrabenu,zratryr,zryqvat,zrnaarff,zptehss,zpneabyq,zngmbu,znggrq,znfgrpgbzl,znffntre,zneiryvat,znebbarq,zneznqhxr,znevpx,znaunaqyrq,znangrrf,zna'yy,znygva,znyvpvbhfyl,znysrnfnapr,znynuvqr,znxrgu,znxrbiref,znvzvat,znpuvfzb,yhzcrpgbzl,yhzorevat,yhppv,ybeqvat,ybepn,ybbxbhgf,ybbtvr,ybaref,ybngurq,yvffra,yvtugurnegrq,yvsre,yvpxva,yrjra,yrivgngvba,yrfgrepbec,yrffrr,yragvyf,yrtvfyngr,yrtnyvmvat,yrqreubfra,ynjzra,ynffxbcs,yneqare,ynzornh,ynznten,ynqbaa,ynpgvp,ynpdhre,ynongvre,xenonccry,xbbxf,xavpxxanpxf,xyhgml,xyrlanpu,xyraqnguh,xvaebff,xvaxnvq,xvaq'n,xrgpu,xrfure,xnevxbf,xneravan,xnanzvgf,whafuv,whzoyrq,wbhfg,wbggrq,wbofba,wvatyvat,wvtnybat,wreevrf,wryyvrf,wrrcf,wnian,veerfvfgnoyr,vagreavfg,vagrepenavny,vafrzvangrq,vadhvfvgbe,vashevngr,vasyngvat,vasvqryvgvrf,vaprffnagyl,vaprafrq,vapnfr,vapncnpvgngr,vanfzhpu,vanpphenpvrf,vzcybqvat,vzcrqvat,vzcrqvzragf,vzznghevgl,vyyrtvoyr,vqvgnebq,vpvpyrf,vohcebsra,v'v'z,ulzvr,ulqebynfr,uhaxre,uhzcf,uhzbaf,uhzvqbe,uhzqvatre,uhzoyvat,uhttva,uhssvat,ubhfrpyrnavat,ubgubhfr,ubgpnxrf,ubfgl,ubbgranaal,ubbgpuvr,ubbfrtbj,ubaxf,ubarlzbbaref,ubzvyl,ubzrbcnguvp,uvgpuuvxref,uvffrq,uvyyavttre,urkninyrag,urjjb,urefur,urezrl,uretbgg,uraal,uraavtnaf,uraubhfr,urzbylgvp,uryvcnq,urvsre,uroerjf,uroovat,urnirq,urnqybpx,uneebjvat,unearffrq,unatbiref,unaqv,unaqonfxrg,unyserx,unprar,tltrf,thlf'er,thaqrefbaf,thzcgvba,tehagznfgre,tehof,tebffvr,tebcrq,tevaf,ternfronyy,tenirfvgr,tenghvgl,tenazn,tenaqsnguref,tenaqonol,tenqfxv,tenpvat,tbffvcf,tbboyr,tbaref,tbyvgfla,tbsre,tbqfnxr,tbqqnhtugre,tangf,tyhvat,tynerf,tviref,tvamn,tvzzvr,tvzzrr,traareb,trzzr,tnmcnpub,tnmrq,tnffl,tnetyvat,tnaquvwv,tnyinavmrq,tnyyoynqqre,tnnnu,shegvir,shzvtngvba,shpxn,sebaxbafgrra,sevyyf,serrmva,serrjnyq,serrybnqre,senvygl,sbetre,sbbyuneql,sbaqrfg,sbzva,sbyybjva,sbyyvpyr,sybgngvba,sybccvat,sybbqtngrf,sybttrq,syvpxrq,syraqref,syrnont,svkvatf,svknoyr,svfgshy,sverjngre,sveryvtug,svatreonat,svanyvmvat,svyyva,svyvcbi,svqrere,sryyvat,sryqoret,srvta,snhavn,sngnyr,snexhf,snyyvoyr,snvgushyarff,snpgbevat,rlrshy,rkgenznevgny,rkgrezvangrq,rkuhzr,rknfcrengrq,rivfprengr,rfgbl,rfzreryqn,rfpncnqrf,rcbkl,ragvprq,raguhfrq,ragraqer,ratebffvat,raqbecuvaf,rzcgvir,rzzlf,rzvaragyl,rzormmyre,rzoneerffrq,rzoneenffvatyl,rzonyzrq,ryhqrf,ryvat,ryngrq,rvevr,rtbgvgvf,rssrpgvat,rrevyl,rrpbz,rpmrzn,rnegul,rneyborf,rnyyl,qlrvat,qjryyf,qhirg,qhapnaf,qhyprg,qebirf,qebccva,qebbyf,qerl'nhp,qbjaevire,qbzrfgvpvgl,qbyybc,qbrfag,qboyre,qvihytrq,qvirefvbanel,qvfgnapvat,qvfcrafref,qvfbevragvat,qvfarljbeyq,qvfzvffvir,qvfvatrahbhf,qvfuriryrq,qvfsvthevat,qvaavat,qvzzvat,qvyvtragyl,qvyrggnagr,qvyngvba,qvpxrafvna,qvncuentzf,qrinfgngvatyl,qrfgnovyvmr,qrfrpengr,qrcbfvat,qravrpr,qrzbal,qryivat,qryvpngrf,qrvtarq,qrsenhq,qrsybjre,qrsvoevyyngbe,qrsvnagyl,qrsrapryrff,qrsnpvat,qrpbafgehpgvba,qrpbzcbfr,qrpvcurevat,qrpvoryf,qrprcgviryl,qrprcgvbaf,qrpncvgngvba,qrohgnagrf,qrobanve,qrnqyvre,qnjqyvat,qnivp,qnejvavfz,qneavg,qnexf,qnaxr,qnavrywnpxfba,qnatyrq,plgbkna,phgbhg,phgyrel,pheironyy,phesrjf,phzzreohaq,pehapurf,pebhpurq,pevfcf,pevccyrf,pevyyl,pevof,perjzna,perrcva,perrqf,perqramn,pernx,penjyl,penjyva,penjyref,pengrq,penpxurnqf,pbjbexre,pbhyqa'g'ir,pbejvaf,pbevnaqre,pbcvbhfyl,pbairarf,pbagenprcgvirf,pbagvatrapvrf,pbagnzvangvat,pbaavcgvba,pbaqvzrag,pbapbpgvat,pbzceruraqvat,pbzcynprapl,pbzzraqngber,pbzronpxf,pbz'ba,pbyyneobar,pbyvgvf,pbyqyl,pbvssher,pbssref,pbrqf,pbqrcraqrag,pbpxfhpxvat,pbpxarl,pbpxyrf,pyhgpurq,pybfrgrq,pybvfgrerq,pyrir,pyrngf,pynevslvat,pynccrq,pvaanone,puhaary,puhzcf,pubyvarfgrenfr,pubveobl,pubpbyngrl,puynzlqvn,puvtyvnx,purrfvr,punhivavfgvp,punfz,punegerhfr,puneb,puneavre,puncvy,punyxrq,punqjnl,pregvsvnoyl,pryyhyvgr,pryyrq,pninypnqr,pngnybtvat,pnfgengrq,pnffvb,pnfurjf,pnegbhpur,pneaviber,pnepvabtraf,pnchyrg,pncgvingrq,pncg'a,pnapryyngvbaf,pnzcva,pnyyngr,pnyyne,pnssrvangrq,pnqniref,pnpbcubal,pnpxyr,ohmmrf,ohggbavat,ohfybnq,ohetynevrf,oheof,ohban,ohavbaf,ohyyurnqrq,ohssf,ohplx,ohpxyvat,oehfpurggn,oebjorngvat,oebbzfgvpxf,oebbql,oebzyl,oebyva,oevrsvatf,oerjfxvrf,oerngunylmre,oernxhcf,oengjhefg,oenavn,oenvqvat,oentf,oenttva,oenqljbbq,obggbzrq,obffn,obeqryyb,obbxfurys,obbtvqn,obaqfzna,obyqre,obttyrf,oyhqtrbarq,oybjgbepu,oybggre,oyvcf,oyrzvfu,oyrnpuvat,oynvargbybtvfgf,oynqvat,oynoorezbhgu,oveqfrrq,ovzzry,ovybkv,ovttyl,ovnapuvaav,orgnqvar,orerafba,oryhf,oryybd,ortrgf,orsvggvat,orrcref,orrymroho,orrsrq,orqevqqra,orqrirer,orpxbaf,ornqrq,onhoyrf,onhoyr,onggyrtebhaq,ongueborf,onfxrgonyyf,onfrzragf,oneebbz,oneanpyr,onexva,onexrq,onerggn,onatyrf,onatyre,onanyvgl,onzonat,onygne,onyycynlref,ontzna,onssyrf,onpxebbz,onolfng,onobbaf,nirefr,nhqvbgncr,nhpgvbarre,nggra,ngpun,nfgbavfuzrag,nehthyn,neebm,nagvuvfgnzvarf,naablnaprf,narfgurfvbybtl,nangbzvpnyyl,nanpuebavfz,nzvnoyr,nznerggb,nyynuh,nyvtug,nvzva,nvyzrag,nsgretybj,nssebagr,nqivy,nqeranyf,npghnyvmngvba,npebfg,npurq,npphefrq,nppbhgerzragf,nofpbaqrq,nobirobneq,norggrq,nnetu,nnnnuu,mhjvpxl,mbyqn,mvcybp,mnxnzngnx,lbhir,lvccvr,lrfgreqnlf,lryyn,lrneaf,lrneavatf,lrnearq,lnjavat,lnygn,lnugmrr,l'zrna,l'ner,jhgurevat,jernxf,jbeevfbzr,jbexvvvat,jbbbbbbb,jbaxl,jbznavmvat,jbybqnefxl,jvjvgu,jvguqenjf,jvful,jvfug,jvcref,jvcre,jvabf,jvaqgubear,jvaqfhesvat,jvaqrezrer,jvttyrq,jvttra,jujung,jubqhavg,jubnnn,juvggyvat,juvgrfanxr,jurerbs,jurrmvat,jurrmr,jungq'ln,jungnln,junzzb,junpxva,jryyyy,jrvtugyrff,jrrivy,jrqtvrf,jroovat,jrnfyl,jnlfvqr,jnkrf,jnghev,jnful,jnfuebbzf,jnaqryy,jnvgnzvahgr,jnqqln,jnnnnu,ibeanp,ivfuabbe,ivehyrag,ivaqvpgvirarff,ivaprerf,ivyyvre,ivtrbhf,irfgvtvny,iragvyngr,iragrq,irarerny,irrevat,irrerq,irqql,infybin,inybfxl,invyfohet,intvanf,intnf,herguen,hcfgntrq,hcybnqvat,hajenccvat,hajvryql,hagnccrq,hafngvfsvrq,hadhrapunoyr,haareirq,hazragvbanoyr,haybinoyr,haxabjaf,havasbezrq,havzcerffrq,haunccvyl,hathneqrq,harkcyberq,haqretnezrag,haqravnoyl,hapyrapu,hapynvzrq,hapunenpgrevfgvpnyyl,haohggbarq,haoyrzvfurq,hyhyq,huuuz,gjrrmr,ghgfnzv,ghful,ghfpneben,ghexyr,ghetuna,gheovavhz,ghoref,gehpbng,gebkn,gebcvpnan,gevdhrgen,gevzzref,gevprcf,gerfcnffrq,genln,genhzngvmvat,genafirfgvgrf,genvabef,genqva,genpxref,gbjavrf,gbheryyrf,gbhpun,gbffva,gbegvbhf,gbcfubc,gbcrf,gbavpf,gbatf,gbzfx,gbzbeebjf,gbvyvat,gbqqyr,gvmml,gvccref,gvzzv,gujnc,guhfyl,gugur,guehfgf,guebjref,guebjrq,guebhtujnl,guvpxravat,gurezbahpyrne,guryjnyy,gungnjnl,greevsvpnyyl,graqbaf,gryrcbegngvba,gryrcnguvpnyyl,gryrxvargvp,grrgrevat,grnfcbbaf,gnenaghynf,gncnf,gnaarq,gnatyvat,gnznyrf,gnvybef,gnuvgvna,gnpgshy,gnpul,gnoyrfcbba,flenu,flapuebavpvgl,flapu,flancfrf,fjbbavat,fjvgpuzna,fjvzfhvgf,fjrygrevat,fjrrgyl,fhibygr,fhfybi,fhesrq,fhccbfvgvba,fhccregvzr,fhcreivyynvaf,fhcresyhbhf,fhcrertb,fhafcbgf,fhaavat,fhayrff,fhaqerff,fhpxnu,fhppbgnfu,fhoyriry,fhoonfrzrag,fghqvbhf,fgevcvat,fgerahbhfyl,fgenvtugf,fgbarjnyyrq,fgvyyarff,fgvyrggbf,fgrirfl,fgrab,fgrrajlpx,fgnetngrf,fgnzzrevat,fgnrqreg,fdhvttyl,fdhvttyr,fdhnfuvat,fdhnevat,fcernqfurrg,fcenzc,fcbggref,fcbegb,fcbbxvat,fcyraqvqb,fcvggva,fcvehyvan,fcvxl,fcngr,fcnegnphf,fcnpreha,fbbarfg,fbzrguvat'yy,fbzrgu,fbzrcva,fbzrbar'yy,fbsnf,fboreyl,fborerq,fabjzra,fabjonax,fabjonyyvat,faviryyvat,favssyvat,fanxrfxva,fanttvat,fzhfu,fzbbgre,fzvqtra,fznpxref,fyhzybeq,fybffhz,fyvzzre,fyvtugrq,fyrrcjnyx,fyrnmronyy,fxbxvr,fxrcgvp,fvgnevqrf,fvfgnu,fvccrq,fvaqryy,fvzcyrgbaf,fvzbal,fvyxjbbq,fvyxf,fvyxra,fvtugyrff,fvqrobneq,fuhggyrf,fuehttvat,fuebhqf,fubjl,fubiryrq,fubhyqa'gn,fubcyvsgref,fuvgfgbez,furral,funcrglcr,funzvat,funyybjf,funpxyr,funoovyl,funoonf,frcchxh,fravyvgl,frzvgr,frzvnhgbzngvp,frymavpx,frpergnevny,fronpvb,fphmml,fphzzl,fpehgvavmrq,fpehapuvr,fpevooyrq,fpbgpurf,fpbyqrq,fpvffbe,fpuyho,fpniratvat,fpneva,fpnesvat,fpnyyvbaf,fpnyq,fnibhe,fniberq,fnhgr,fnepbvqbfvf,fnaqone,fnyhgrq,fnyvfu,fnvgu,fnvyobngf,fntvggnevhf,fnper,fnppunevar,fnpnznab,ehfuqvr,ehzcyrq,ehzon,ehyrobbx,ehooref,ebhtuntr,ebgvffrevr,ebbgvr,ebbsl,ebbsvr,ebznagvpvmr,evggyr,evfgbenagr,evccva,evafvat,evatva,evaprff,evpxrgl,eriryvat,ergrfg,ergnyvngvat,erfgbengvir,erfgba,erfgnhengrhe,erfubbgf,erfrggvat,erfragzragf,ercebtenzzvat,ercbffrff,ercnegrr,eramb,erzber,erzvggvat,erzrore,erynknagf,erwhirangr,erwrpgvbaf,ertrarengrq,ersbphf,ersreenyf,errab,erplpyrf,erpevzvangvba,erpyvavat,erpnagvat,ernggnpu,ernffvtavat,enmthy,enirq,enggyrfanxrf,enggyrf,enfuyl,endhrgonyy,enafnpx,envfvarggrf,enurrz,enqvffba,enqvfurf,enona,dhbgu,dhznev,dhvagf,dhvygf,dhvygvat,dhvra,dhneeryrq,chegl,cheoyvaq,chapuobjy,choyvpnyyl,cflpubgvpf,cflpubcnguf,cflpubnanylmr,cehavat,cebinfvx,cebgrpgva,cebccvat,cebcbegvbarq,cebculynpgvp,cebbsrq,cebzcgre,cebperngr,cebpyvivgvrf,cevbevgvmvat,cevamr,cevpxrq,cerff'yy,cerfrgf,cerfpevorf,cerbphcr,cerwhqvpvny,cersrk,cerpbaprvirq,cerpvcvpr,cenyvarf,centzngvfg,cbjreone,cbggvr,cbggrefivyyr,cbgfvr,cbgubyrf,cbffrf,cbfvrf,cbegxrl,cbegreubhfr,cbeabtencuref,cbevat,cbcclpbpx,cbccref,cbzcbav,cbxva,cbvgvre,cbqvngel,cyrrmr,cyrnqvatf,cynlobbx,cyngryrgf,cynar'nevhz,cynprobf,cynpr'yy,cvfgnpuvbf,cvengrq,cvabpuyr,cvarnccyrf,cvansber,cvzcyrf,cvttyl,cvqqyvat,cvpba,cvpxcbpxrgf,cvppuh,culfvbybtvpnyyl,culfvp,cubovp,cuvynaqrevat,curabzranyyl,curnfnagf,crjgre,crggvpbng,crgebavf,crgvgvbavat,cregheorq,crecrghngvat,crezhgng,crevfunoyr,crevzrgref,creshzrq,crepbprg,cre'fhf,crccrewnpx,cranyvmr,crygvat,cryyrg,crvtabve,crqvpherf,crpxref,crpnaf,cnjavat,cnhyffba,cngglpnxr,cngebyzra,cngbvf,cngubf,cnfgrq,cnevfuvbare,cnepurrfv,cnenpuhgvat,cncnlnf,cnagnybbaf,cnycvgngvbaf,cnynagvar,cnvagonyyvat,biregverq,birefgerff,birefrafvgvir,bireavtugf,birerkpvgrq,birenakvbhf,birenpuvrire,bhgjvggrq,bhgibgrq,bhgahzore,bhgynfg,bhgynaqre,bhg'ir,becurl,bepurfgengvat,bcraref,bbbbbbb,bxvrf,buuuuuuuuu,buuuuuuuu,btyvat,bssorng,bofrffviryl,borlrq,b'unan,b'onaaba,b'onaavba,ahzcpr,ahzzl,ahxrq,ahnaprf,abhevfuvat,abfrqvir,abeoh,abzyvrf,abzvar,avkrq,avuvyvfg,avtugfuvsg,arjzrng,artyrpgshy,arrqvarff,arrqva,ancugunyrar,anabplgrf,anavgr,anvirgr,a'lrnu,zlfgvslvat,zluartba,zhgngvat,zhfvat,zhyyrq,zhttl,zhregb,zhpxenxre,zhpunpubf,zbhagnvafvqr,zbgureyrff,zbfdhvgbf,zbecurq,zbccrq,zbbqbb,zbapub,zbyyrz,zbvfghevfre,zbuvpnaf,zbpxf,zvfgerffrf,zvffcrag,zvfvagrecergngvba,zvfpneel,zvahfrf,zvaqrr,zvzrf,zvyyvfrpbaq,zvyxrq,zvtuga'g,zvtugvre,zvremjvnx,zvpebpuvcf,zrlreyvat,zrfzrevmvat,zrefunj,zrrpebo,zrqvpngr,zrqqyrq,zpxvaabaf,zptrjna,zpqhaabhtu,zpngf,zovra,zngmnu,zngevnepu,znfgheongrq,znffryva,znegvnyrq,zneyobebf,znexfznafuvc,znevangr,znepuva,znavpherq,znyabhevfurq,znyvta,znwberx,zntaba,zntavsvpragyl,znpxvat,znpuvniryyvna,znpqbhtny,znppuvngb,znpnjf,znpnanj,z'frys,ylqryyf,yhfgf,yhpvgr,yhoevpnagf,ybccre,ybccrq,ybaryvrfg,ybaryvre,ybzrm,ybwnpx,ybngu,yvdhrsl,yvccl,yvzcf,yvxva,yvtugarff,yvrfy,yvropura,yvpvbhf,yvoevf,yvongvba,yunzb,yrbgneqf,yrnava,ynkngvirf,ynivfurq,yngxn,ynalneq,ynaxl,ynaqzvarf,ynzrarff,ynqqvrf,ynprengrq,ynoberq,y'nzbhe,xerfxva,xbivgpu,xbheavxbin,xbbgpul,xbabff,xaxabj,xavpxrgl,xanpxrgl,xzneg,xyvpxf,xvjnavf,xvffnoyr,xvaqretnegaref,xvygre,xvqarg,xvq'yy,xvpxl,xvpxonpxf,xvpxonpx,xubybxbi,xrjcvr,xraqb,xngen,xnerbxr,xnsryavxbi,xnobo,whawha,whzon,whyrc,wbeqvr,wbaql,wbyfba,wrabss,wnjobar,wnavgbevny,wnaveb,vcrpnp,vaivtbengrq,vagehqrq,vagebf,vagenirabhfyl,vagreehcghf,vagreebtngvbaf,vagrewrpg,vagresnpvat,vagrerfgva,vafhevat,vafgvyyrq,vafrafvgvivgl,vafpehgnoyr,vaebnqf,vaaneqf,vaynvq,vawrpgbe,vatengvghqr,vashevngrf,vasen,vasyvpgvba,vaqryvpngr,vaphongbef,vapevzvangvba,vapbairavrapvat,vapbafbynoyr,vaprfghbhf,vapnf,vapneprengr,vaoerrqvat,vzchqrapr,vzcerffvbavfgf,vzcrnpurq,vzcnffvbarq,vzvcrarz,vqyvat,vqvbflapenfvrf,vproretf,ulcbgrafvir,ulqebpuybevqr,uhfurq,uhzhf,uhzcu,uhzzz,uhyxvat,uhopncf,uhonyq,ubjln,ubjobhg,ubj'yy,ubhfroebxra,ubgjver,ubgfcbgf,ubgurnqrq,ubeenpr,ubcfsvryq,ubagb,ubaxva,ubarlzbbaf,ubzrjerpxre,ubzoerf,ubyyref,ubyyreva,ubrqbja,ubobrf,ubooyvat,ubooyr,ubnefr,uvaxl,uvtuyvtugref,urkrf,ureh'he,ureavnf,urccyrzna,uryy'er,urvtugra,urururururu,urururu,urqtvat,urpxyvat,urpxyrq,urnilfrg,urngfuvryq,urnguraf,urnegguebo,urnqcvrpr,unlfrrq,unirb,unhyf,unfgra,uneevqna,unecbbaf,uneqraf,uneprfvf,uneobhevat,unatbhgf,unyxrva,unyru,unyorefgnz,unvearg,unveqerffref,unpxl,unnnn,u'lnu,thfgn,thful,thetyvat,thvygrq,tehry,tehqtvat,teeeeee,tebffrf,tebbzfzra,tevcvat,tenirfg,tengvsvrq,tengrq,tbhynfu,tbbcl,tbban,tbbqyl,tbqyvarff,tbqnjshy,tbqnza,tylpreva,tyhgrf,tybjl,tyborgebggref,tyvzcfrq,tyraivyyr,tynhpbzn,tveyfpbhg,tvenssrf,tvyorl,tvttyrchff,tuben,trfgngvat,tryngb,trvfunf,trnefuvsg,tnlarff,tnfcrq,tnfyvtugvat,tneerggf,tneon,tnoylpmlpx,t'urnq,shzvtngvat,shzoyvat,shqtrq,shpxjnq,shpx'er,shpufvn,serggvat,serfurfg,serapuvrf,serrmref,serqevpn,senmvref,senvql,sbkubyrf,sbhegl,sbffvyvmrq,sbefnxr,sbesrvgf,sberpybfrq,sberny,sbbgfvrf,sybevfgf,sybccrq,sybbefubj,sybbeobneq,syvapuvat,syrpxf,synhoreg,syngjner,synghyrapr,syngyvarq,synfuqnapr,synvy,synttvat,svire,svgml,svfufgvpxf,svarggv,svaryyv,svantyr,svyxb,svryqfgbar,svoore,sreevav,srrqva,srnfgvat,sniber,sngurevat,sneebhux,snezva,snvelgnyr,snvefreivpr,snpgbvq,snprqbja,snoyrq,rlronyyva,rkgbegvbavfg,rkdhvfvgryl,rkcrqvgrq,rkbepvfr,rkvfgragvnyvfg,rkrpf,rkphycngbel,rknpreongr,rireguvat,riraghnyvgl,rinaqre,rhcubevp,rhcurzvfzf,rfgnzbf,reerq,ragvgyr,radhvevrf,rabezvgl,rasnagf,raqvir,raplpybcrqvnf,rzhyngvat,rzovggrerq,rssbegyrff,rpgbcvp,rpvep,rnfryl,rnecubarf,rneznexf,qjryyre,qhefyne,qhearq,qhabvf,qhaxvat,qhaxrq,qhzqhz,qhyyneq,qhqyrlf,qehguref,qehttvfg,qebffbf,qebbyrq,qevirjnlf,qevccl,qernzyrff,qenjfgevat,qenat,qenvacvcr,qbmvat,qbgrf,qbexsnpr,qbbexabof,qbbuvpxrl,qbaangryyn,qbapun,qbzvpvyr,qbxbf,qboreznaf,qvmmlvat,qvibyn,qvgfl,qvfgnfgr,qvffreivpr,qvfybqtrq,qvfybqtr,qvfvaurevg,qvfvasbezngvba,qvfpbhagvat,qvaxn,qvzyl,qvtrfgvat,qvryyb,qvqqyvat,qvpgngbefuvcf,qvpgngbef,qvntabfgvpvna,qribhef,qrivyvfuyl,qrgenpg,qrgbkvat,qrgbhef,qrgragr,qrfgehpgf,qrfrpengrq,qreevf,qrcyber,qrcyrgr,qrzher,qrzbyvgvbaf,qrzrna,qryvfu,qryoehpx,qrynsbeq,qrtnhyyr,qrsgyl,qrsbezvgl,qrsyngr,qrsvangyl,qrsrpgbe,qrpelcgrq,qrpbagnzvangvba,qrpncvgngr,qrpnagre,qneqvf,qnzcrare,qnzzr,qnqql'yy,qnooyvat,qnooyrq,q'rger,q'netrag,q'nyrar,q'ntanfgv,pmrpubfybinxvna,plzony,ploreqlar,phgbssf,phgvpyr,pheinprbhf,phevbhfvgl,pebjvat,pebjrq,pebhgbaf,pebccrq,pevzval,perfpragvf,penfuref,penajryy,pbireva,pbhegebbzf,pbhagranapr,pbfzvpnyyl,pbfvta,pbeebobengvba,pbebaref,pbeasynxrf,pbccrecbg,pbccreurnq,pbcnprgvp,pbbeqfvmr,pbaihyfvat,pbafhygf,pbawherf,pbatravny,pbaprnyre,pbzcnpgbe,pbzzrepvnyvfz,pbxrl,pbtavmnag,pyhaxref,pyhzfvyl,pyhpxvat,pybirf,pybira,pybguf,pybgur,pybqf,pybpxvat,pyvatf,pynivpyr,pynffyrff,pynfuvat,pynaxvat,pynatvat,pynzcvat,pviivrf,pvgljvqr,pvephyngbel,pvephvgrq,puebavfgref,puebzvp,pubbf,puybebsbezrq,puvyyha,purrfrq,punggreobk,puncrebarq,punaahxnu,preroryyhz,pragrecvrprf,pragresbyq,prrprr,pprqvy,pnibegvat,pnirzra,pnhgrevmrq,pnhyqjryy,pnggvat,pngrevar,pnffvbcrvn,pneirf,pnegjurry,pnecrgrq,pnebo,pnerffvat,pneryrffyl,pnerravat,pncevpvbhf,pncvgnyvfgvp,pncvyynevrf,pnaqvqyl,pnznenqrevr,pnyybhfyl,pnysfxva,pnqqvrf,ohggubyrf,ohfljbex,ohffrf,ohecf,ohetbzrvfgre,ohaxubhfr,ohatpubj,ohtyre,ohssrgf,ohssrq,oehgvfu,oehfdhr,oebapuvgvf,oebzqra,oebyyl,oebnpurq,oerjfxvf,oerjva,oerna,oernqjvaare,oenan,obhagvshy,obhapva,obfbzf,obetavar,obccvat,obbgyrtf,obbvat,obzobfvgl,obygvat,obvyrecyngr,oyhrl,oybjonpx,oybhfrf,oybbqfhpxref,oybbqfgnvarq,oybng,oyrrgu,oynpxsnpr,oynpxrfg,oynpxrarq,oynpxra,oynpxonyyrq,oynof,oynoorevat,oveqoenva,ovcnegvfnafuvc,ovbqrtenqnoyr,ovygzber,ovyxrq,ovt'haf,ovqrg,orfbggrq,oreaurvz,orartnf,oraqvtn,oryhfuv,oryyoblf,oryvggyvat,oruvaqf,ortbar,orqfurrgf,orpxbavat,ornhgr,ornhqvar,ornfgyl,ornpusebag,ongurf,ongnx,onfre,onfronyyf,oneoryyn,onaxebyyvat,onaqntrq,onreyl,onpxybt,onpxva,onolvat,nmxnona,njjjjj,nivnel,nhgubevmrf,nhfgreb,nhagl,nggvpf,ngerhf,nfgbhaqrq,nfgbavfu,negrzhf,nefrf,nevagreb,nccenvfre,ncngurgvp,nalobql'q,nakvrgvrf,nagvpyvznpgvp,nagne,natybf,natyrzna,narfgurgvfg,naqebfpbttva,naqbyvav,naqnyr,nzjnl,nzhpx,nzavbpragrfvf,nzarfvnp,nzrevpnab,nznen,nyinu,nygehvfz,nygreancnybbmn,nycunorgvmr,nycnpn,nyyhf,nyyretvfg,nyrknaqebf,nynvxhz,nxvzob,ntbencubovn,ntvqrf,ntteuu,nsgregnfgr,nqbcgvbaf,nqwhfgre,nqqvpgvbaf,nqnznagvhz,npgvingbe,nppbzcyvfurf,noreenag,nnnnnetu,nnnnnnnnnnnnn,n'vtug,mmmmmmm,mhppuvav,mbbxrrcre,mvepbavn,mvccref,mrdhvry,mryynel,mrvgtrvfg,mnahpx,mntng,lbh'a,lynat,lrf'z,lragn,lrppuu,lrppu,lnjaf,lnaxva,lnuqnu,lnnnu,l'tbg,krebkrq,jjbbjj,jevfgjngpu,jenatyrq,jbhyqfg,jbeguvarff,jbefuvcvat,jbezl,jbezgnvy,jbezubyrf,jbbfu,jbyyfgra,jbysvat,jbrshyyl,jbooyvat,jvagel,jvatqvat,jvaqfgbez,jvaqbjgrkg,jvyhan,jvygvat,jvygrq,jvyyvpx,jvyyraubyyl,jvyqsybjref,jvyqrorrfg,julll,jubccref,jubnn,juvmmvat,juvmm,juvgrfg,juvfgyrq,juvfg,juvaal,jurryvrf,junmmhc,jungjungjunnng,jungb,jungqln,jung'qln,junpxf,jrjryy,jrgfhvg,jryyhu,jrrcf,jnlynaqre,jniva,jnffnvy,jnfag,jnearsbeq,jneohpxf,jnygbaf,jnyyonatre,jnvivat,jnvgjnvg,ibjvat,ibhpure,ibeabss,ibeurrf,ibyqrzbeg,ivier,ivggyrf,ivaqnybb,ivqrbtnzrf,ivpulffbvfr,ivpnevbhf,irfhivhf,irethramn,ira'g,iryirgrra,irybhe,irybpvencgbe,infgarff,infrpgbzvrf,incbef,inaqreubs,inyzbag,inyvqngrf,inyvnagyl,inphhzf,hfhec,hfreahz,hf'yy,hevanyf,halvryqvat,haineavfurq,haghearq,hagbhpunoyrf,hagnatyrq,hafrpherq,hafpenzoyr,haerghearq,haerznexnoyr,hacergragvbhf,haarefgnaq,haznqr,havzcrnpunoyr,hasnfuvbanoyr,haqrejevgr,haqreyvavat,haqreyvat,haqrerfgvzngrf,haqrenccerpvngrq,hapbhgu,hapbex,hapbzzbayl,hapybt,hapvephzpvfrq,hapunyyratrq,hapnf,haohggbavat,hanccebirq,hanzrevpna,hansenvq,hzcgrra,hzuzz,hujul,htuhu,glcrjevgref,gjvgpurf,gjvgpurq,gjveyl,gjvaxyvat,gjvatrf,gjvqqyvat,ghearef,gheanobhg,ghzoyva,gelrq,gebjry,gebhffrnh,gevivnyvmr,gevsyrf,gevovnaav,gerapupbng,gerzoyrq,genhzngvmr,genafvgbel,genafvragf,genafshfr,genafpevovat,genad,genzcl,genvcfrq,genvava,genpurn,genprnoyr,gbhevfgl,gbhtuvr,gbfpnavav,gbegbyn,gbegvyyn,gbeerba,gbernqbe,gbzzbeebj,gbyyobbgu,gbyynaf,gbvql,gbtnf,gbshexrl,gbqqyvat,gbqqvrf,gbnfgvrf,gbnqfgbby,gb'ir,gvatyrf,gvzva,gvzrl,gvzrgnoyrf,gvtugrfg,guhttrr,guehfgvat,guebzohf,guebrf,guevsgl,gubeaunegf,guvaarfg,guvpxrg,gurgnf,gurfhynp,grgurerq,grfgnohetre,grefranqvar,greevs,greqyvatgba,grchv,grzcvat,grpgbe,gnkvqrezl,gnfgrohqf,gnegyrgf,gnegnohyy,gne'q,gnagnzbhag,gnatl,gnatyrf,gnzre,gnohyn,gnoyrgbcf,gnovguvn,fmrpujna,flagurqlar,firawbyyl,firatnyv,fheivinyvfgf,fhezvfr,fhesobneqf,fhersver,fhcevfr,fhcerznpvfgf,fhccbfvgbevrf,fhcrefgber,fhcrepvyvbhf,fhagnp,fhaohearq,fhzzrepyvss,fhyyvrq,fhtnerq,fhpxyr,fhogyrgvrf,fhofgnagvngrq,fhofvqrf,fhoyvzvany,fhouhzna,fgebjzna,fgebxrq,fgebtnabss,fgerrgyvtug,fgenlvat,fgenvare,fgenvtugre,fgenvtugrare,fgbcyvtug,fgveehcf,fgrjvat,fgrerbglcvat,fgrczbzzl,fgrcunab,fgnfuvat,fgnefuvar,fgnvejryyf,fdhngfvr,fdhnaqrevat,fdhnyvq,fdhnooyvat,fdhno,fcevaxyvat,fcernqre,fcbatl,fcbxrfzra,fcyvagrerq,fcvggyr,fcvggre,fcvprq,fcrjf,fcraqva,fcrpg,fcrnepuhpxre,fcnghynf,fbhgugbja,fbhfrq,fbfuv,fbegre,fbeebjshy,fbbgu,fbzr'va,fbyvybdhl,fbverr,fbqbzvmrq,fboevxv,fbncvat,fabjf,fabjpbar,favgpuvat,favgpurq,farrevat,fanhfntrf,fanxvat,fzbbgurq,fzbbpuvrf,fznegra,fznyyvfu,fyhful,fyheevat,fyhzna,fyvguref,fyvccva,fyrhguvat,fyrriryrff,fxvayrff,fxvyyshyyl,fxrgpuobbx,fxntarggv,fvfgn,fvaavat,fvathyneyl,fvarjl,fvyireynxr,fvthgb,fvtabevan,fvrir,fvqrnezf,fulvat,fuhaavat,fughq,fuevrxf,fubegvat,fubegoernq,fubcxrrcref,fuznapl,fuvmmvg,fuvgurnqf,fuvgsnprq,fuvczngrf,fuvsgyrff,furyivat,furqybj,funivatf,funggref,funevsn,funzcbbf,funyybgf,funsgre,fun'anhp,frkgnag,freivprnoyr,frcfvf,fraberf,fraqva,frzvf,frznafxv,frysyrffyl,frvasryqf,frref,frrcf,frqhpgerff,frpnhphf,frnynag,fphggyvat,fphfn,fpehapurq,fpvffbeunaqf,fpuerore,fpuznapl,fpnzcf,fpnyybcrq,fnibve,fnintrel,fnebat,fneavn,fnagnatry,fnzbby,fnyybj,fnyvab,fnsrpenpxre,fnqvfz,fnpevyrtvbhf,fnoevav,fnongu,f'nevtug,ehggurvzre,ehqrfg,ehoorel,ebhfgvat,ebgnevna,ebfyva,ebbzrq,ebznev,ebznavpn,ebyygbc,ebysfxv,ebpxrggrf,ebnerq,evatyrnqre,evssvat,evopntr,erjverq,ergevny,ergvat,erfhfpvgngrq,erfgbpx,erfnyr,ercebtenzzrq,ercyvpnag,ercragnag,ercryynag,ercnlf,ercnvagvat,erartbgvngvat,eraqrm,erzrz,eryvirq,eryvadhvfurf,eryrnea,erynknag,erxvaqyvat,erulqengr,ershryrq,erserfuvatyl,ersvyyvat,errknzvar,errfrzna,erqarff,erqrrznoyr,erqpbngf,erpgnatyrf,erpbhc,erpvcebpngrq,ernffrffvat,ernyl,ernyre,ernpuva,er'xnyv,enjyfgba,enintrf,enccncbegf,enzbenl,enzzvat,envaqebcf,enurfu,enqvnyf,enpvfgf,enonegh,dhvpurf,dhrapu,dhneeryvat,dhnvagyl,dhnqenagf,chghznlb,chg'rz,chevsvre,cherrq,chavgvf,chyybhg,chxva,chqtl,chqqvatf,chpxrevat,cgrebqnpgly,cflpubqenzn,cfngf,cebgrfgngvbaf,cebgrpgrr,cebfnvp,cebcbfvgvbarq,cebpyvivgl,ceborq,cevagbhgf,cerivfvba,cerffref,cerfrg,cercbfvgvba,cerrzcg,cerrzvr,cerpbaprcgvbaf,cenapna,cbjrechss,cbggvrf,cbgcvr,cbfrhe,cbegubyr,cbbcf,cbbcvat,cbznqr,cbylcf,cbylzrevmrq,cbyvgrarff,cbyvfure,cbynpx,cbpxrgxavsr,cbngvn,cyrorvna,cynltebhc,cyngbavpnyyl,cyngvghqr,cynfgrevat,cynfzncurerfvf,cynvqf,cynprzngf,cvmmnmm,cvagnheb,cvafgevcrf,cvacbvagf,cvaxare,cvapre,cvzragb,cvyrhc,cvyngrf,cvtzra,cvrrrr,cuenfrq,cubgbpbcvrf,cubrorf,cuvyvfgvarf,cuvynaqrere,curebzbar,cunfref,csrssreahrffr,creif,crefcver,crefbavsl,crefreirer,crecyrkrq,crecrgengvat,crexvarff,crewhere,crevbqbagvfg,creshapgbel,creqvqb,crepbqna,cragnzrgre,cragnpyr,crafvir,crafvbar,craalonxre,craaoebbxr,craunyy,cratva,crarggv,crargengrf,crtabve,crrir,crrcubyr,crpgbenyf,crpxva,crnxl,crnxfivyyr,cnkpbj,cnhfrq,cnggrq,cnexvfubss,cnexref,cneqbavat,cnencyrtvp,cnencuenfvat,cncreref,cncrerq,cnatf,cnaryvat,cnybbmn,cnyzrq,cnyzqnyr,cnyngnoyr,cnpvsl,cnpvsvrq,bjjjjj,birefrkrq,bireevqrf,birecnlvat,bireqenja,birepbzcrafngr,birepbzrf,birepunetrq,bhgznarhire,bhgsbkrq,bhtuga'g,bfgragngvbhf,bfuha,begubcrqvfg,be'qreirf,bcugunyzbybtvfg,bcrentvey,bbmrf,bbbbbbbu,barfvr,bzavf,bzryrgf,bxgboresrfg,bxrlqbxr,bsgur,bsure,bofgrgevpny,borlf,bornu,b'urael,aldhvy,alnalnalnalnu,ahggva,ahgfl,ahgonyy,aheunpuv,ahzofxhyy,ahyyvsvrf,ahyyvsvpngvba,ahpxvat,ahoova,abhevfurq,abafcrpvsvp,abvat,abvapu,abubub,aboyre,avgjvgf,arjfcevag,arjfcncrezna,arjfpnfgre,arhebcngul,argurejbeyq,arrqvrfg,aninfxl,anepvffvfgf,anccrq,ansgn,znpur,zlxbabf,zhgvyngvat,zhgureshpxre,zhgun,zhgngrf,zhgngr,zhfa'g,zhepul,zhygvgnfxvat,zhwrro,zhqfyvatvat,zhpxenxvat,zbhfrgenc,zbheaf,zbheashy,zbgures,zbfgeb,zbecuvat,zbecungr,zbenyvfgvp,zbbpul,zbbpuvat,zbabgbabhf,zbabcbyvmr,zbabpyr,zbyruvyy,zbynaq,zbsrg,zbpxhc,zbovyvmvat,zzzzzzz,zvgminuf,zvfgerngvat,zvffgrc,zvfwhqtr,zvfvasbezngvba,zvfqverpgrq,zvfpneevntrf,zvavfxveg,zvaqjnecrq,zvaprq,zvydhrgbnfg,zvthryvgb,zvtugvyl,zvqfgernz,zvqevss,zvqrnfg,zvpebor,zrguhfrynu,zrfqnzrf,zrfpny,zra'yy,zrzzn,zrtngba,zrtnen,zrtnybznavnp,zrrrr,zrqhyyn,zrqvinp,zrnavatyrffarff,zpahttrgf,zppnegulvfz,znlcbyr,znl'ir,znhir,zngrlf,znefunpx,znexyrf,znexrgnoyr,znafvrer,znafreinag,znafr,znaunaqyvat,znyybznef,znypbagrag,znynvfr,znwrfgvrf,znvafnvy,znvyzra,znunaqen,zntabyvnf,zntavsvrq,zntri,znryfgebz,znpuh,znpnqb,z'obl,z'nccryyr,yhfgebhf,yherra,yhatrf,yhzcrq,yhzorelneq,yhyyrq,yhrtb,yhpxf,yhoevpngrq,ybirfrng,ybhfrq,ybhatre,ybfxv,ybeer,ybben,ybbbat,ybbavrf,ybvapybgu,ybsgf,ybqtref,yboovat,ybnare,yvirerq,yvdhrhe,yvtbheva,yvsrfnivat,yvsrthneqf,yvsroybbq,yvnvfbaf,yrg'rz,yrfovnavfz,yrapr,yrzbaylzna,yrtvgvzvmr,yrnqva,ynmnef,ynmneeb,ynjlrevat,ynhture,ynhqnahz,yngevarf,yngvbaf,yngref,yncryf,ynxrsebag,ynuvg,ynsbeghangn,ynpuelzbfr,y'vgnyvra,xjnvav,xehpmlafxv,xenzrevpn,xbjgbj,xbivafxl,xbefrxbi,xbcrx,xabjnxbjfxv,xavriry,xanpxf,xvbjnf,xvyyvatgba,xvpxonyy,xrljbegu,xrlznfgre,xrivr,xrireny,xralbaf,xrttref,xrrcfnxrf,xrpuare,xrngl,xnibexn,xnenwna,xnzreri,xnttf,whwlsehvg,wbfgyrq,wbarfgbja,wbxrl,wbvfgf,wbpxb,wvzzvrq,wvttyrq,wrfgf,wramra,wraxb,wryylzna,wrqrqvnu,wrnyvgbfvf,wnhagl,wnezry,wnaxyr,wntbss,wntvryfxv,wnpxenoovgf,wnoovat,wnoorewnj,vmmng,veerfcbafvoyl,veercerffvoyr,veerthynevgl,veerqrrznoyr,vahivx,vaghvgvbaf,vaghongrq,vagvzngrf,vagrezvanoyr,vagreybcre,vagrepbfgny,vafglyr,vafgvtngr,vafgnagnarbhfyl,vavat,vatebja,vatrfgvat,vashfvat,vasevatr,vasvavghz,vasnpg,vardhvgvrf,vaqhovgnoyl,vaqvfchgnoyr,vaqrfpevonoyl,vaqragngvba,vaqrsvanoyr,vapbagebiregvoyr,vapbafrdhragvny,vapbzcyrgrf,vapbureragyl,vapyrzrag,vapvqragnyf,vanegvphyngr,vanqrdhnpvrf,vzcehqrag,vzcebcevrgvrf,vzcevfba,vzcevagrq,vzcerffviryl,vzcbfgbef,vzcbegnagr,vzcrevbhf,vzcnyr,vzzbqrfg,vzzbovyr,vzorqqrq,vzorpvyvp,vyyrtnyf,vqa'g,ulfgrevp,ulcbgrahfr,ultvravp,ulrnu,uhfuchccvrf,uhauu,uhzconpx,uhzberq,uhzzrq,uhzvyvngrf,uhzvqvsvre,uhttl,uhttref,uhpxfgre,ubgorq,ubfvat,ubfref,ubefrunve,ubzrobql,ubzronxr,ubyvat,ubyvrf,ubvfgvat,ubtjnyybc,ubpxf,uboovgf,ubnkrf,uzzzzz,uvffrf,uvccrfg,uvyyovyyvrf,uvynevgl,urheu,ureavngrq,urezncuebqvgr,uraavsre,urzyvarf,urzyvar,urzrel,urycyrffarff,uryzfyrl,uryyubhaq,ururururu,urrrl,urqqn,urnegorngf,urncrq,urnyref,urnqfgneg,urnqfrgf,urnqybat,unjxynaq,unign,unhyva,uneirl'yy,unagn,unafbz,unatanvy,unaqfgnaq,unaqenvy,unaqbss,unyyhpvabtra,unyybe,unyvgbfvf,unoreqnfurel,tlccrq,thl'yy,thzory,threvyynf,thnin,thneqenvy,tehagure,tehavpx,tebccv,tebbzre,tebqva,tevcrf,tevaqf,tevsgref,tergpu,terrirl,ternfvat,tenirlneqf,tenaqxvq,tenval,tbhtvat,tbbarl,tbbtyl,tbyqzhss,tbyqraebq,tbvatb,tbqyl,tbooyrqltbbx,tbooyrqrtbbx,tyhrf,tybevbhfyl,tyratneel,tynffjner,tynzbe,tvzzvpxf,tvttyl,tvnzorggv,tubhyvfu,turggbf,tunyv,trgure,trevngevpf,treovyf,trbflapuebabhf,trbetvb,tragr,traqnezr,tryozna,tnmvyyvbagu,tnlrfg,tnhtvat,tnfgeb,tnfyvtug,tnfont,tnegref,tnevfu,tnenf,tnagh,tnatl,tnatyl,tnatynaq,tnyyvat,tnqqn,sheebjrq,shaavrf,shaxlgbja,shtvzbggb,shqtvat,shpxrra,sehfgengrf,sebhsebh,sebbg,sebzoretr,sevmmvrf,sevggref,sevtugshyyl,sevraqyvrfg,serrybnqvat,serrynapvat,sernxnmbvq,sengreavmngvba,senzref,sbeavpngvba,sbeavpngvat,sbergubhtug,sbbgfgbby,sbvfgvat,sbphffvat,sbpxvat,syheevrf,syhssrq,syvagfgbarf,syrqreznhf,synlrq,synjyrffyl,synggref,synfuonat,synccrq,svfuvrf,svezre,svercebbs,sveroht,svatrecnvagvat,svarffrq,svaqva,svanapvnyf,svanyvgl,svyyrgf,svreprfg,svrsqbz,svoovat,sreibe,sragnaly,sraryba,srqbepuhx,srpxyrff,srngurevat,snhprgf,snerjryyf,snagnflynaq,snangvpvfz,snygrerq,snttl,snoretr,rkgbegvat,rkgbegrq,rkgrezvangvat,rkuhzngvba,rkuvynengvba,rkunhfgf,rksbyvngr,rkpryf,rknfcrengvat,rknpgvat,rirelobql'q,rinfvbaf,rfcerffbf,rfznvy,reeee,reengvpnyyl,rebqvat,reafjvyre,rcpbg,raguenyyrq,rafranqn,raevpuvat,raentr,raunapre,raqrne,rapehfgrq,rapvab,rzcnguvp,rzormmyr,rznangrf,ryrpgevpvnaf,rxvat,rtbznavnpny,rttvat,rssnpvat,rpgbcynfz,rnirfqebccrq,qhzzxbcs,qhtenl,qhpunvfar,qehaxneq,qehqtr,qebbc,qebvqf,qevcf,qevccrq,qevooyrf,qenmraf,qbjal,qbjafvmr,qbjacbhe,qbfntrf,qbccrytnatre,qbcrf,qbbuvpxl,qbagpun,qbartul,qvivavat,qvirfg,qvhergvpf,qvhergvp,qvfgehfgshy,qvfehcgf,qvfzrzorezrag,qvfzrzore,qvfvasrpg,qvfvyyhfvbazrag,qvfurnegravat,qvfpbhegrbhf,qvfpbgurdhr,qvfpbyberq,qvegvrfg,qvcugurevn,qvaxf,qvzcyrq,qvqln,qvpxjnq,qvngevorf,qvngurfvf,qvnorgvpf,qrivnagf,qrgbangrf,qrgrfgf,qrgrfgnoyr,qrgnvavat,qrfcbaqrag,qrfrpengvba,qrevfvba,qrenvyvat,qrchgvmrq,qrcerffbef,qrcraqnag,qragherf,qrabzvangbef,qrzhe,qrzbabybtl,qrygf,qryynegr,qrynpbhe,qrsyngrq,qrsvo,qrsnprq,qrpbengbef,qrndba,qnibyn,qngva,qnejvavna,qnexyvtugref,qnaqryvbaf,qnzcrarq,qnznfxvabf,qnyevzcyr,q'crfuh,q'ubssela,q'nfgvre,plavpf,phgrfl,phgnjnl,phezhqtrba,pheqyr,phycnovyvgl,phvfvaneg,phssvat,pelcgf,pelcgvq,pehapurq,pehzoyref,pehqryl,pebffpurpx,pebba,pevffnxr,perinffr,perfjbbq,perrcb,pernfrf,pernfrq,pernxl,penaxf,penotenff,pbirenyyf,pbhcyr'n,pbhtuf,pbfynj,pbecberny,pbeahpbcvn,pbearevat,pbexf,pbeqbarq,pbbyyl,pbbyva,pbbxobbxf,pbagevgr,pbagragrq,pbafgevpgbe,pbasbhaq,pbasvg,pbasvfpngvat,pbaqbarq,pbaqvgvbaref,pbaphffvbaf,pbzceraqb,pbzref,pbzohfgvoyr,pbzohfgrq,pbyyvatfjbbq,pbyqarff,pbvghf,pbqvpvy,pbnfgvat,pylqrfqnyr,pyhggrevat,pyhaxre,pyhax,pyhzfvarff,pybggrq,pybgurfyvar,pyvapurf,pyvapure,pyrirearff,pyrapu,pyrva,pyrnafrf,pynlzberf,pynzzrq,puhttvat,puebavpnyyl,puevfgfnxrf,pubdhr,pubzcref,puvfryvat,puvecl,puvec,puvaxf,puvatnputbbx,puvpxracbk,puvpxnqrr,purjva,purffobneq,punetva,punagrhfr,punaqryvref,punzqb,puntevarq,punss,pregf,pregnvagvrf,preerab,preroehz,prafherq,przrgnel,pngrejnhyvat,pngnpylfzvp,pnfvgnf,pnfrq,pneiry,pnegvat,pneerne,pnebyyvat,pnebyref,pneavr,pneqvbtenz,pneohapyr,pnchyrgf,pnavarf,pnaqnhyrf,pnancr,pnyqrpbgg,pnynzvgbhf,pnqvyynpf,pnpurg,pnormn,pnoqevire,ohmmneqf,ohgnv,ohfvarffjbzra,ohatyrq,ohzcxvaf,ohzzref,ohyyqbmr,ohsslobg,ohohg,ohoovrf,oeeeee,oebjabhg,oebhunun,oebamvat,oebapuvny,oebvyre,oevfxyl,oevrspnfrf,oevpxrq,oerrmvat,oerrure,oernxnoyr,oernqfgvpx,oenirarg,oenirq,oenaqvrf,oenvajnirf,oenvavrfg,oenttneg,oenqyrr,oblf'er,oblf'yy,oblf'q,obhgbaavrer,obffrq,obfbzl,obenaf,obbfgf,obbxfuryirf,obbxraqf,obaryrff,obzoneqvat,obyyb,obvaxrq,obvax,oyhrfg,oyhroryyf,oybbqfubg,oybpxurnq,oybpxohfgref,oyvguryl,oyngure,oynaxyl,oynqqref,oynpxorneq,ovggr,ovccl,ovbtrargvpf,ovytr,ovttyrfjbegu,ovphfcvqf,orhfhfr,orgnfreba,orfzvepu,orearpr,orernirzrag,oragbaivyyr,orapuyrl,orapuvat,orzor,oryylnpuvat,oryyubcf,oryvr,oryrnthrerq,orueyr,ortvaava,ortvavat,orravr,orrsf,orrpujbbq,orpnh,ornireunhfra,ornxref,onmvyyvba,onhqbhva,oneelgbja,oneevatgbaf,onearlf,oneof,oneoref,oneonghf,onaxehcgrq,onvyvssf,onpxfyvqr,onol'q,onnnq,o'sber,njjjx,njnlf,njnxrf,nhgbzngvpf,nhguragvpngr,nhtug,nhola,nggverq,nggntvey,ngebcuvrq,nflfgbyr,nfgebghes,nffregvirarff,negvpubxrf,nedhvyyvnaf,nevtug,nepurarzl,nccenvfr,nccrnfrq,nagva,nafcnhtu,narfgurgvpf,nanculynpgvp,nzfpenl,nzovinyrapr,nznyvb,nyevvvtug,nycunorgvmrq,nycran,nybhrggr,nyyben,nyyvgrengvba,nyyrajbbq,nyyrtvnaprf,nytrevnaf,nypreeb,nynfgbe,nunun,ntvgngbef,nsbergubhtug,nqiregvfrf,nqzbavgvba,nqvebaqnpxf,nqrabvqf,nphchapghevfg,nphyn,npghnevny,npgvingbef,npgvbanoyr,npuvatyl,npphfref,nppyvzngrq,nppyvzngr,nofheqyl,nofbeorag,nofbyib,nofbyhgrf,nofraprf,noqbzravmre,nnnnnnnnnu,nnnnnnnnnn,n'evtug".split(","),
male_names:"wnzrf,wbua,eboreg,zvpunry,jvyyvnz,qnivq,evpuneq,puneyrf,wbfrcu,gubznf,puevfgbcure,qnavry,cnhy,znex,qbanyq,trbetr,xraargu,fgrira,rqjneq,oevna,ebanyq,nagubal,xriva,wnfba,znggurj,tnel,gvzbgul,wbfr,yneel,wrsserl,senax,fpbgg,revp,fgrcura,naqerj,enlzbaq,tertbel,wbfuhn,wreel,qraavf,jnygre,cngevpx,crgre,unebyq,qbhtynf,urael,pney,neguhe,elna,ebtre,wbr,whna,wnpx,nyoreg,wbanguna,whfgva,greel,trenyq,xrvgu,fnzhry,jvyyvr,enycu,ynjerapr,avpubynf,ebl,orawnzva,oehpr,oenaqba,nqnz,uneel,serq,jnlar,ovyyl,fgrir,ybhvf,wrerzl,nneba,enaql,rhtrar,pneybf,ehffryy,obool,ivpgbe,rearfg,cuvyyvc,gbqq,wrffr,penvt,nyna,funja,pynerapr,frna,cuvyvc,puevf,wbuaal,rney,wvzzl,nagbavb,qnaal,oelna,gbal,yhvf,zvxr,fgnayrl,yrbaneq,anguna,qnyr,znahry,ebqarl,phegvf,abezna,zneiva,ivaprag,tyraa,wrssrel,genivf,wrss,punq,wnpbo,zryiva,nyserq,xlyr,senapvf,oenqyrl,wrfhf,ureoreg,serqrevpx,enl,wbry,rqjva,qba,rqqvr,evpxl,gebl,enaqnyy,oneel,oreaneq,znevb,yrebl,senapvfpb,znephf,zvpurny,gurbqber,pyvssbeq,zvthry,bfpne,wnl,wvz,gbz,pnyiva,nyrk,wba,ebaavr,ovyy,yyblq,gbzzl,yrba,qrerx,qneeryy,wrebzr,syblq,yrb,nyiva,gvz,jrfyrl,qrna,tert,wbetr,qhfgva,crqeb,qreevpx,qna,mnpunel,pberl,urezna,znhevpr,ireaba,eboregb,pylqr,tyra,urpgbe,funar,evpneqb,fnz,evpx,yrfgre,oerag,enzba,glyre,tvyoreg,trar,znep,ertvanyq,ehora,oergg,angunavry,ensnry,rqtne,zvygba,enhy,ora,prpvy,qhnar,naqer,ryzre,oenq,tnoevry,eba,ebynaq,wnerq,nqevna,xney,pbel,pynhqr,revx,qneely,arvy,puevfgvna,wnivre,sreanaqb,pyvagba,grq,zngurj,glebar,qneera,ybaavr,ynapr,pbql,whyvb,xheg,nyyna,pynlgba,uhtu,znk,qjnlar,qjvtug,neznaqb,sryvk,wvzzvr,rirergg,vna,xra,obo,wnvzr,pnfrl,nyserqb,nyoregb,qnir,vina,wbuaavr,fvqarl,oleba,whyvna,vfnnp,pyvsgba,jvyyneq,qnely,ivetvy,naql,fnyinqbe,xvex,fretvb,frgu,xrag,greenapr,erar,rqhneqb,greerapr,raevdhr,serqqvr,fghneg,serqevpx,negheb,nyrwnaqeb,wbrl,avpx,yhgure,jraqryy,wrerzvnu,rina,whyvhf,qbaavr,bgvf,geribe,yhxr,ubzre,treneq,qbht,xraal,uhoreg,natryb,funha,ylyr,zngg,nysbafb,beynaqb,erk,pneygba,rearfgb,cnoyb,yberamb,bzne,jvyohe,oynxr,ubenpr,ebqrevpx,xreel,noenunz,evpxrl,ven,naqerf,prfne,wbuanguna,znypbyz,ehqbycu,qnzba,xryiva,ehql,cerfgba,nygba,nepuvr,znepb,crgr,enaqbycu,tneel,trbsserl,wbanguba,sryvcr,oraavr,treneqb,qbzvavp,ybera,qryoreg,pbyva,thvyyrezb,rnearfg,oraal,abry,ebqbysb,zleba,rqzhaq,fnyingber,prqevp,ybjryy,tertt,furezna,qriva,flyirfgre,ebbfriryg,vfenry,wreznvar,sbeerfg,jvyoreg,yrynaq,fvzba,veivat,bjra,ehshf,jbbqebj,fnzzl,xevfgbcure,yriv,znepbf,thfgnib,wnxr,yvbary,znegl,tvyoregb,pyvag,avpbynf,ynherapr,vfznry,beivyyr,qerj,reiva,qrjrl,jvyserq,wbfu,uhtb,vtanpvb,pnyro,gbznf,furyqba,revpx,senaxvr,qneery,ebtryvb,grerapr,nybamb,ryvnf,oreg,ryoreg,enzveb,pbaenq,abnu,tenql,cuvy,pbearyvhf,ynzne,ebynaqb,pynl,crepl,oenqsbeq,zreyr,qneva,nzbf,greeryy,zbfrf,veiva,fnhy,ebzna,qnearyy,enaqny,gbzzvr,gvzzl,qneeva,oeraqna,gbol,ina,nory,qbzvavpx,rzvyvb,ryvwnu,pnel,qbzvatb,nhoerl,rzzrgg,zneyba,rznahry,wrenyq,rqzbaq,rzvy,qrjnlar,bggb,grqql,erlanyqb,oerg,wrff,gerag,uhzoregb,rzznahry,fgrcuna,ybhvr,ivpragr,ynzbag,tneynaq,zvpnu,rsenva,urngu,ebqtre,qrzrgevhf,rguna,ryqba,ebpxl,cvreer,ryv,oelpr,nagbvar,eboovr,xraqnyy,eblpr,fgreyvat,tebire,rygba,pyrirynaq,qlyna,puhpx,qnzvna,erhora,fgna,yrbaneqb,ehffry,rejva,oravgb,unaf,zbagr,oynvar,reavr,pheg,dhragva,nthfgva,wnzny,qriba,nqbysb,glfba,jvyserqb,oneg,wneebq,inapr,qravf,qnzvra,wbndhva,uneyna,qrfzbaq,ryyvbg,qnejva,tertbevb,xrezvg,ebfpbr,rfgrona,nagba,fbybzba,abeoreg,ryiva,abyna,pnerl,ebq,dhvagba,uny,oenva,ebo,ryjbbq,xraqevpx,qnevhf,zbvfrf,zneyva,svqry,gunqqrhf,pyvss,znepry,nyv,encunry,oelba,neznaq,nyineb,wrssel,qnar,wbrfcu,guhezna,arq,fnzzvr,ehfgl,zvpury,zbagl,ebel,snovna,erttvr,xevf,vfnvnu,thf,nirel,yblq,qvrtb,nqbycu,zvyyneq,ebppb,tbamnyb,qrevpx,ebqevtb,treel,evtboregb,nycubafb,evpxvr,abr,irea,ryivf,oreaneqb,znhevpvb,uvenz,qbabina,onfvy,avpxbynf,fpbg,ivapr,dhvapl,rqql,fronfgvna,srqrevpb,hylffrf,urevoregb,qbaaryy,qraal,tniva,rzrel,ebzrb,wnlfba,qvba,qnagr,pyrzrag,pbl,bqryy,wneivf,oehab,vffnp,qhqyrl,fnasbeq,pbyol,pnezryb,arfgbe,ubyyvf,fgrsna,qbaal,yvajbbq,ornh,jryqba,tnyra,vfvqeb,gehzna,qryzne,wbuanguba,fvynf,serqrevp,vejva,zreevyy,puneyrl,znepryvab,pneyb,geragba,xhegvf,nheryvb,jvaserq,ivgb,pbyyva,qraire,yrbary,rzbel,cnfdhnyr,zbunzznq,znevnab,qnavny,ynaqba,qvex,oenaqra,nqna,ahzoref,pynve,ohsbeq,oreavr,jvyzre,rzrefba,mnpurel,wnpdhrf,reeby,wbfhr,rqjneqb,jvysbeq,gureba,enlzhaqb,qnera,gevfgna,ebool,yvapbya,wnzr,traneb,bpgnivb,pbearyy,uhat,neeba,nagbal,urefpury,nyin,tvbinaav,tnegu,plehf,plevy,ebaal,fgrivr,yba,xraavgu,pnezvar,nhthfgvar,revpu,punqjvpx,jvyohea,ehff,zlyrf,wbanf,zvgpury,zreiva,mnar,wnzry,ynmneb,nycubafr,enaqryy,wbuavr,wneergg,nevry,noqhy,qhfgl,yhpvnab,frlzbhe,fpbggvr,rhtravb,zbunzzrq,neahysb,yhpvra,sreqvanaq,gunq,rmen,nyqb,ehova,zvgpu,rneyr,nor,znedhvf,ynaal,xnerrz,wnzne,obevf,vfvnu,rzvyr,ryzb,neba,yrbcbyqb,rirerggr,wbfrs,rybl,qbevna,ebqevpx,ervanyqb,yhpvb,wreebq,jrfgba,urefury,yrzhry,ynirea,oheg,whyrf,tvy,ryvfrb,nuznq,avtry,rsera,nagjna,nyqra,znetnevgb,ershtvb,qvab,bfinyqb,yrf,qrnaqer,abeznaq,xvrgu,vibel,gerl,abeoregb,ancbyrba,wrebyq,sevgm,ebfraqb,zvysbeq,fnat,qrba,puevfgbcre,nysbamb,ylzna,wbfvnu,oenag,jvygba,evpb,wnznny,qrjvgg,oeragba,lbat,byva,snhfgvab,pynhqvb,whqfba,tvab,rqtneqb,nyrp,wneerq,qbaa,gevavqnq,gnq,cbesvevb,bqvf,yraneq,punhaprl,gbq,zry,znepryb,xbel,nhthfghf,xrira,uvynevb,ohq,fny,beiny,znheb,qnaavr,mnpunevnu,byra,navony,zvyb,wrq,gunau,nznqb,yraal,gbel,evpuvr,ubenpvb,oevpr,zbunzrq,qryzre,qnevb,znp,wbanu,wreebyq,ebog,unax,fhat,ehcreg,ebyynaq,xragba,qnzvba,puv,nagbar,jnyqb,serqevp,oenqyl,xvc,ohey,glerr,wrssrerl,nuzrq,jvyyl,fgnasbeq,bera,zbfur,zvxry,rabpu,oeraqba,dhvagva,wnzvfba,syberapvb,qneevpx,gbovnf,zvau,unffna,tvhfrccr,qrznephf,pyrghf,gleryy,ylaqba,xrrana,jreare,gurb,trenyqb,pbyhzohf,purg,oregenz,znexhf,uhrl,uvygba,qjnva,qbagr,gleba,bzre,vfnvnf,uvcbyvgb,srezva,puhat,nqnyoregb,wnzrl,grbqbeb,zpxvayrl,znkvzb,enyrvtu,ynjrerapr,noenz,enfunq,rzzvgg,qneba,pubat,fnzhny,bgun,zvdhry,rhfrovb,qbat,qbzravp,qneeba,jvyore,erangb,ublg,unljbbq,rmrxvry,punf,syberagvab,ryebl,pyrzragr,neqra,arivyyr,rqvfba,qrfunja,pneeby,funlar,angunavny,wbeqba,qnavyb,pynhq,furejbbq,enlzba,enlsbeq,pevfgbony,nzoebfr,gvghf,ulzna,srygba,rmrdhvry,renfzb,ybaal,zvyna,yvab,wnebq,ureo,naqernf,eurgg,whqr,qbhtynff,pbeqryy,bfjnyqb,ryyfjbegu,ivetvyvb,gbarl,angunanry,orarqvpg,zbfr,ubat,vferny,tneerg,snhfgb,neyra,mnpx,zbqrfgb,senaprfpb,znahny,tnlybeq,tnfgba,svyvoregb,qrnatryb,zvpunyr,tenaivyyr,znyvx,mnpxnel,ghna,avpxl,pevfgbcure,nagvbar,znypbz,xberl,wbfcru,pbygba,jnlyba,ubfrn,funq,fnagb,ehqbys,ebys,eranyqb,znepryyhf,yhpvhf,xevfgbsre,uneynaq,neabyqb,ehrora,yrnaqeb,xenvt,wreeryy,wrebzl,uboreg,prqevpx,neyvr,jvasbeq,jnyyl,yhvtv,xrargu,wnpvagb,tenvt,senaxyla,rqzhaqb,yrvs,wrenzl,jvyyvna,ivapramb,fuba,zvpuny,ylajbbq,wrer,ryqra,qneryy,oebqrevpx,nybafb".split(",")},module.exports=frequency_lists;

},{}],4:[function(require,module,exports){
var feedback,matching,rot_13,scoring,time,time_estimates,zxcvbn;matching=require("./matching"),scoring=require("./scoring"),time_estimates=require("./time_estimates"),feedback=require("./feedback"),time=function(){return(new Date).getTime()},rot_13=function(e){return e.replace(/[a-zA-Z]/g,function(e){return String.fromCharCode((e<="Z"?90:122)>=(e=e.charCodeAt(0)+13)?e:e-26)})},zxcvbn=function(e,t){var i,r,n,c,a,s,m,o,u,g,_;for(null==t&&(t=[]),g=time(),u=[],n=0,c=t.length;n<c;n++)i=t[n],"string"!=(m=typeof i)&&"number"!==m&&"boolean"!==m||u.push(rot_13(i.toString().toLowerCase()));matching.set_user_input_dictionary(u),a=matching.omnimatch(e),o=scoring.most_guessable_match_sequence(e,a),o.calc_time=time()-g,r=time_estimates.estimate_attack_times(o.guesses);for(s in r)_=r[s],o[s]=_;return o.feedback=feedback.get_feedback(o.score,o.sequence),o},module.exports=zxcvbn;

},{"./feedback":2,"./matching":5,"./scoring":6,"./time_estimates":7}],5:[function(require,module,exports){
var DATE_MAX_YEAR,DATE_MIN_YEAR,DATE_SPLITS,GRAPHS,L33T_TABLE,RANKED_DICTIONARIES,REGEXEN,adjacency_graphs,build_ranked_dict,frequency_lists,lst,matching,name,rot_13,scoring;frequency_lists=require("./frequency_lists"),adjacency_graphs=require("./adjacency_graphs"),scoring=require("./scoring"),rot_13=function(e){return e.replace(/[a-zA-Z]/g,function(e){return String.fromCharCode((e<="Z"?90:122)>=(e=e.charCodeAt(0)+13)?e:e-26)})},build_ranked_dict=function(e){var t,n,r,i,a;for(i={},t=1,r=0,n=e.length;r<n;r++)a=e[r],i[a]=t,t+=1;return i},RANKED_DICTIONARIES={};for(name in frequency_lists)lst=frequency_lists[name],RANKED_DICTIONARIES[name]=build_ranked_dict(lst);GRAPHS={qwerty:adjacency_graphs.qwerty,dvorak:adjacency_graphs.dvorak,keypad:adjacency_graphs.keypad,mac_keypad:adjacency_graphs.mac_keypad},L33T_TABLE={a:["4","@"],b:["8"],c:["(","{","[","<"],e:["3"],g:["6","9"],i:["1","!","|"],l:["1","|","7"],o:["0"],s:["$","5"],t:["+","7"],x:["%"],z:["2"]},REGEXEN={recent_year:/19\d\d|200\d|201\d/g},DATE_MAX_YEAR=2050,DATE_MIN_YEAR=1e3,DATE_SPLITS={4:[[1,2],[2,3]],5:[[1,3],[2,3]],6:[[1,2],[2,4],[4,5]],7:[[1,3],[2,3],[4,5],[4,6]],8:[[2,4],[4,6]]},matching={empty:function(e){var t;return 0===function(){var n;n=[];for(t in e)n.push(t);return n}().length},extend:function(e,t){return e.push.apply(e,t)},translate:function(e,t){var n;return function(){var r,i,a,s;for(a=e.split(""),s=[],i=0,r=a.length;i<r;i++)n=a[i],s.push(t[n]||n);return s}().join("")},mod:function(e,t){return(e%t+t)%t},sorted:function(e){return e.sort(function(e,t){return e.i-t.i||e.j-t.j})},omnimatch:function(e){var t,n,r,i,a;for(i=[],r=[this.dictionary_match,this.reverse_dictionary_match,this.l33t_match,this.spatial_match,this.repeat_match,this.sequence_match,this.regex_match,this.date_match],a=0,t=r.length;a<t;a++)n=r[a],this.extend(i,n.call(this,e));return this.sorted(i)},dictionary_match:function(e,t){var n,r,i,a,s,o,h,u,c,l,_,f,d,p;null==t&&(t=RANKED_DICTIONARIES),s=[],a=e.length,u=e.toLowerCase(),u=rot_13(u);for(n in t)for(l=t[n],r=o=0,_=a;0<=_?o<_:o>_;r=0<=_?++o:--o)for(i=h=f=r,d=a;f<=d?h<d:h>d;i=f<=d?++h:--h)u.slice(r,+i+1||9e9)in l&&(p=u.slice(r,+i+1||9e9),c=l[p],s.push({pattern:"dictionary",i:r,j:i,token:e.slice(r,+i+1||9e9),matched_word:rot_13(p),rank:c,dictionary_name:n,reversed:!1,l33t:!1}));return this.sorted(s)},reverse_dictionary_match:function(e,t){var n,r,i,a,s,o;for(null==t&&(t=RANKED_DICTIONARIES),o=e.split("").reverse().join(""),i=this.dictionary_match(o,t),a=0,n=i.length;a<n;a++)r=i[a],r.token=r.token.split("").reverse().join(""),r.reversed=!0,s=[e.length-1-r.j,e.length-1-r.i],r.i=s[0],r.j=s[1];return this.sorted(i)},set_user_input_dictionary:function(e){return RANKED_DICTIONARIES.user_inputs=build_ranked_dict(e.slice())},relevant_l33t_subtable:function(e,t){var n,r,i,a,s,o,h,u,c,l;for(s={},o=e.split(""),a=0,r=o.length;a<r;a++)n=o[a],s[n]=!0;l={};for(i in t)c=t[i],h=function(){var e,t,n;for(n=[],t=0,e=c.length;t<e;t++)u=c[t],u in s&&n.push(u);return n}(),h.length>0&&(l[i]=h);return l},enumerate_l33t_subs:function(e){var t,n,r,i,a,s,o,h,u,c,l,_,f,d,p;a=function(){var t;t=[];for(i in e)t.push(i);return t}(),p=[[]],n=function(e){var t,n,r,a,s,o,h,u;for(n=[],s={},o=0,a=e.length;o<a;o++)h=e[o],t=function(){var e,t,n;for(n=[],u=t=0,e=h.length;t<e;u=++t)i=h[u],n.push([i,u]);return n}(),t.sort(),r=function(){var e,n,r;for(r=[],u=n=0,e=t.length;n<e;u=++n)i=t[u],r.push(i+","+u);return r}().join("-"),r in s||(s[r]=!0,n.push(h));return n},r=function(t){var i,a,s,o,h,u,c,l,_,f,d,g,m,A,E,y;if(t.length){for(a=t[0],m=t.slice(1),c=[],d=e[a],l=0,h=d.length;l<h;l++)for(o=d[l],_=0,u=p.length;_<u;_++){for(A=p[_],i=-1,s=f=0,g=A.length;0<=g?f<g:f>g;s=0<=g?++f:--f)if(A[s][0]===o){i=s;break}i===-1?(y=A.concat([[o,a]]),c.push(y)):(E=A.slice(0),E.splice(i,1),E.push([o,a]),c.push(A),c.push(E))}return p=n(c),r(m)}},r(a),d=[];for(u=0,o=p.length;u<o;u++){for(_=p[u],f={},c=0,h=_.length;c<h;c++)l=_[c],s=l[0],t=l[1],f[s]=t;d.push(f)}return d},l33t_match:function(e,t,n){var r,i,a,s,o,h,u,c,l,_,f,d,p,g,m,A;for(null==t&&(t=RANKED_DICTIONARIES),null==n&&(n=L33T_TABLE),u=[],_=this.enumerate_l33t_subs(this.relevant_l33t_subtable(e,n)),c=0,a=_.length;c<a&&(d=_[c],!this.empty(d));c++)for(g=this.translate(e,d),f=this.dictionary_match(g,t),l=0,s=f.length;l<s;l++)if(o=f[l],m=e.slice(o.i,+o.j+1||9e9),m.toLowerCase()!==o.matched_word){h={};for(p in d)r=d[p],m.indexOf(p)!==-1&&(h[p]=r);o.l33t=!0,o.token=m,o.sub=h,o.sub_display=function(){var e;e=[];for(i in h)A=h[i],e.push(i+" -> "+A);return e}().join(", "),u.push(o)}return this.sorted(u.filter(function(e){return e.token.length>1}))},spatial_match:function(e,t){var n,r,i;null==t&&(t=GRAPHS),i=[];for(r in t)n=t[r],this.extend(i,this.spatial_match_helper(e,n,r));return this.sorted(i)},SHIFTED_RX:/[~!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?]/,spatial_match_helper:function(e,t,n){var r,i,a,s,o,h,u,c,l,_,f,d,p,g,m;for(f=[],u=0;u<e.length-1;)for(c=u+1,l=null,m=0,g="qwerty"!==n&&"dvorak"!==n||!this.SHIFTED_RX.exec(e.charAt(u))?0:1;;){if(p=e.charAt(c-1),o=!1,h=-1,s=-1,i=t[p]||[],c<e.length)for(a=e.charAt(c),d=0,_=i.length;d<_;d++)if(r=i[d],s+=1,r&&r.indexOf(a)!==-1){o=!0,h=s,1===r.indexOf(a)&&(g+=1),l!==h&&(m+=1,l=h);break}if(!o){c-u>2&&f.push({pattern:"spatial",i:u,j:c-1,token:e.slice(u,c),graph:n,turns:m,shifted_count:g}),u=c;break}c+=1}return f},repeat_match:function(e){var t,n,r,i,a,s,o,h,u,c,l,_,f,d,p;for(d=[],a=/(.+)\1+/g,c=/(.+?)\1+/g,l=/^(.+?)\1+$/,u=0;u<e.length&&(a.lastIndex=c.lastIndex=u,s=a.exec(e),_=c.exec(e),null!=s);)s[0].length>_[0].length?(f=s,i=l.exec(f[0])[1]):(f=_,i=f[1]),p=[f.index,f.index+f[0].length-1],o=p[0],h=p[1],t=scoring.most_guessable_match_sequence(i,this.omnimatch(i)),r=t.sequence,n=t.guesses,d.push({pattern:"repeat",i:o,j:h,token:f[0],base_token:i,base_guesses:n,base_matches:r,repeat_count:f[0].length/i.length}),u=h+1;return d},MAX_DELTA:5,sequence_match:function(e){var t,n,r,i,a,s,o,h,u;if(1===e.length)return[];for(u=function(t){return function(n,r,i){var a,s,o,u;if((r-n>1||1===Math.abs(i))&&0<(a=Math.abs(i))&&a<=t.MAX_DELTA)return u=e.slice(n,+r+1||9e9),/^[a-z]+$/.test(u)?(s="lower",o=26):/^[A-Z]+$/.test(u)?(s="upper",o=26):/^\d+$/.test(u)?(s="digits",o=10):(s="unicode",o=26),h.push({pattern:"sequence",i:n,j:r,token:e.slice(n,+r+1||9e9),sequence_name:s,sequence_space:o,ascending:i>0})}}(this),h=[],n=0,a=null,i=s=1,o=e.length;1<=o?s<o:s>o;i=1<=o?++s:--s)t=e.charCodeAt(i)-e.charCodeAt(i-1),null==a&&(a=t),t!==a&&(r=i-1,u(n,r,a),n=r,a=t);return u(n,e.length-1,a),h},regex_match:function(e,t){var n,r,i,a;null==t&&(t=REGEXEN),n=[];for(name in t)for(r=t[name],r.lastIndex=0;i=r.exec(e);)a=i[0],n.push({pattern:"regex",token:a,i:i.index,j:i.index+i[0].length-1,regex_name:name,regex_match:i});return this.sorted(n)},date_match:function(e){var t,n,r,i,a,s,o,h,u,c,l,_,f,d,p,g,m,A,E,y,v,I,R,T,D,k,x,j,b,N,S,q,C,L;for(_=[],f=/^\d{4,8}$/,d=/^(\d{1,4})([\s\/\\_.-])(\d{1,2})\2(\d{1,4})$/,s=m=0,v=e.length-4;0<=v?m<=v:m>=v;s=0<=v?++m:--m)for(o=A=I=s+3,R=s+7;(I<=R?A<=R:A>=R)&&!(o>=e.length);o=I<=R?++A:--A)if(L=e.slice(s,+o+1||9e9),f.exec(L)){for(r=[],T=DATE_SPLITS[L.length],E=0,c=T.length;E<c;E++)D=T[E],h=D[0],u=D[1],a=this.map_ints_to_dmy([parseInt(L.slice(0,h)),parseInt(L.slice(h,u)),parseInt(L.slice(u))]),null!=a&&r.push(a);if(r.length>0){for(t=r[0],p=function(e){return Math.abs(e.year-scoring.REFERENCE_YEAR)},g=p(r[0]),k=r.slice(1),y=0,l=k.length;y<l;y++)n=k[y],i=p(n),i<g&&(x=[n,i],t=x[0],g=x[1]);_.push({pattern:"date",token:L,i:s,j:o,separator:"",year:t.year,month:t.month,day:t.day})}}for(s=q=0,j=e.length-6;0<=j?q<=j:q>=j;s=0<=j?++q:--q)for(o=C=b=s+5,N=s+9;(b<=N?C<=N:C>=N)&&!(o>=e.length);o=b<=N?++C:--C)L=e.slice(s,+o+1||9e9),S=d.exec(L),null!=S&&(a=this.map_ints_to_dmy([parseInt(S[1]),parseInt(S[3]),parseInt(S[4])]),null!=a&&_.push({pattern:"date",token:L,i:s,j:o,separator:S[2],year:a.year,month:a.month,day:a.day}));return this.sorted(_.filter(function(e){var t,n,r,i;for(t=!1,i=0,n=_.length;i<n;i++)if(r=_[i],e!==r&&r.i<=e.i&&r.j>=e.j){t=!0;break}return!t}))},map_ints_to_dmy:function(e){var t,n,r,i,a,s,o,h,u,c,l,_,f,d,p,g;if(!(e[1]>31||e[1]<=0)){for(o=0,h=0,p=0,s=0,r=e.length;s<r;s++){if(n=e[s],99<n&&n<DATE_MIN_YEAR||n>DATE_MAX_YEAR)return;n>31&&(h+=1),n>12&&(o+=1),n<=0&&(p+=1)}if(!(h>=2||3===o||p>=2)){for(c=[[e[2],e.slice(0,2)],[e[0],e.slice(1,3)]],u=0,i=c.length;u<i;u++)if(_=c[u],g=_[0],d=_[1],DATE_MIN_YEAR<=g&&g<=DATE_MAX_YEAR)return t=this.map_ints_to_dm(d),null!=t?{year:g,month:t.month,day:t.day}:void 0;for(l=0,a=c.length;l<a;l++)if(f=c[l],g=f[0],d=f[1],t=this.map_ints_to_dm(d),null!=t)return g=this.two_to_four_digit_year(g),{year:g,month:t.month,day:t.day}}}},map_ints_to_dm:function(e){var t,n,r,i,a,s;for(a=[e,e.slice().reverse()],i=0,n=a.length;i<n;i++)if(s=a[i],t=s[0],r=s[1],1<=t&&t<=31&&1<=r&&r<=12)return{day:t,month:r}},two_to_four_digit_year:function(e){return e>99?e:e>50?e+1900:e+2e3}},module.exports=matching;

},{"./adjacency_graphs":1,"./frequency_lists":3,"./scoring":6}],6:[function(require,module,exports){
var BRUTEFORCE_CARDINALITY,MIN_GUESSES_BEFORE_GROWING_SEQUENCE,MIN_SUBMATCH_GUESSES_MULTI_CHAR,MIN_SUBMATCH_GUESSES_SINGLE_CHAR,adjacency_graphs,calc_average_degree,k,scoring,v;adjacency_graphs=require("./adjacency_graphs"),calc_average_degree=function(e){var t,r,n,s,a,u;t=0;for(n in e)a=e[n],t+=function(){var e,t,r;for(r=[],t=0,e=a.length;t<e;t++)s=a[t],s&&r.push(s);return r}().length;return t/=function(){var t;t=[];for(r in e)u=e[r],t.push(r);return t}().length},BRUTEFORCE_CARDINALITY=10,MIN_GUESSES_BEFORE_GROWING_SEQUENCE=1e4,MIN_SUBMATCH_GUESSES_SINGLE_CHAR=10,MIN_SUBMATCH_GUESSES_MULTI_CHAR=50,scoring={nCk:function(e,t){var r,n,s,a;if(t>e)return 0;if(0===t)return 1;for(s=1,r=n=1,a=t;1<=a?n<=a:n>=a;r=1<=a?++n:--n)s*=e,s/=r,e-=1;return s},log10:function(e){return Math.log(e)/Math.log(10)},log2:function(e){return Math.log(e)/Math.log(2)},factorial:function(e){var t,r,n,s;if(e<2)return 1;for(t=1,r=n=2,s=e;2<=s?n<=s:n>=s;r=2<=s?++n:--n)t*=r;return t},most_guessable_match_sequence:function(e,t,r){var n,s,a,u,i,_,o,h,E,c,g,f,l,A,S,p,R,I,v,M,N,C,T,U;for(null==r&&(r=!1),l=e.length,f=function(){var e,t,r;for(r=[],n=e=0,t=l;0<=t?e<t:e>t;n=0<=t?++e:--e)r.push([]);return r}(),A=0,_=t.length;A<_;A++)c=t[A],f[c.j].push(c);for(I=0,o=f.length;I<o;I++)E=f[I],E.sort(function(e,t){return e.i-t.i});for(S={m:function(){var e,t,r;for(t=[],n=r=0,e=l;0<=e?r<e:r>e;n=0<=e?++r:--r)t.push({});return t}(),pi:function(){var e,t,r;for(t=[],n=r=0,e=l;0<=e?r<e:r>e;n=0<=e?++r:--r)t.push({});return t}(),g:function(){var e,t,r;for(t=[],n=r=0,e=l;0<=e?r<e:r>e;n=0<=e?++r:--r)t.push({});return t}()},T=function(t){return function(n,s){var a,u,i,_,o,h;_=n.j,o=t.estimate_guesses(n,e),s>1&&(o*=S.pi[n.i-1][s-1]),i=t.factorial(s)*o,r||(i+=Math.pow(MIN_GUESSES_BEFORE_GROWING_SEQUENCE,s-1)),h=S.g[_];for(u in h)if(a=h[u],!(u>s)&&a<=i)return;return S.g[_][s]=i,S.m[_][s]=n,S.pi[_][s]=o}}(this),s=function(e){return function(e){var t,r,n,s,a,u;for(c=g(0,e),T(c,1),a=[],t=u=1,s=e;1<=s?u<=s:u>=s;t=1<=s?++u:--u)c=g(t,e),a.push(function(){var e,s;e=S.m[t-1],s=[];for(r in e)n=e[r],r=parseInt(r),"bruteforce"!==n.pattern&&s.push(T(c,r+1));return s}());return a}}(this),g=function(t){return function(t,r){return{pattern:"bruteforce",token:e.slice(t,+r+1||9e9),i:t,j:r}}}(this),C=function(e){return function(e){var t,r,n,s,a,u,i;u=[],s=e-1,a=void 0,n=Infinity,i=S.g[s];for(r in i)t=i[r],t<n&&(a=r,n=t);for(;s>=0;)c=S.m[s][a],u.unshift(c),s=c.i-1,a--;return u}}(this),u=N=0,v=l;0<=v?N<v:N>v;u=0<=v?++N:--N){for(M=f[u],U=0,h=M.length;U<h;U++)if(c=M[U],c.i>0)for(i in S.m[c.i-1])i=parseInt(i),T(c,i+1);else T(c,1);s(u)}return R=C(l),p=R.length,a=0===e.length?1:S.g[l-1][p],{password:e,guesses:a,guesses_log10:this.log10(a),sequence:R}},estimate_guesses:function(e,t){var r,n,s;return null!=e.guesses?e.guesses:(s=1,e.token.length<t.length&&(s=1===e.token.length?MIN_SUBMATCH_GUESSES_SINGLE_CHAR:MIN_SUBMATCH_GUESSES_MULTI_CHAR),r={bruteforce:this.bruteforce_guesses,dictionary:this.dictionary_guesses,spatial:this.spatial_guesses,repeat:this.repeat_guesses,sequence:this.sequence_guesses,regex:this.regex_guesses,date:this.date_guesses},n=r[e.pattern].call(this,e),e.guesses=Math.max(n,s),e.guesses_log10=this.log10(e.guesses),e.guesses)},bruteforce_guesses:function(e){var t,r;return t=Math.pow(BRUTEFORCE_CARDINALITY,e.token.length),t===Number.POSITIVE_INFINITY&&(t=Number.MAX_VALUE),r=1===e.token.length?MIN_SUBMATCH_GUESSES_SINGLE_CHAR+1:MIN_SUBMATCH_GUESSES_MULTI_CHAR+1,Math.max(t,r)},repeat_guesses:function(e){return e.base_guesses*e.repeat_count},sequence_guesses:function(e){var t,r;return r=e.token.charAt(0),t="a"===r||"A"===r||"z"===r||"Z"===r||"0"===r||"1"===r||"9"===r?4:r.match(/\d/)?10:26,e.ascending||(t*=2),t*e.token.length},MIN_YEAR_SPACE:20,REFERENCE_YEAR:2016,regex_guesses:function(e){var t,r;if(t={alpha_lower:26,alpha_upper:26,alpha:52,alphanumeric:62,digits:10,symbols:33},e.regex_name in t)return Math.pow(t[e.regex_name],e.token.length);switch(e.regex_name){case"recent_year":return r=Math.abs(parseInt(e.regex_match[0])-this.REFERENCE_YEAR),r=Math.max(r,this.MIN_YEAR_SPACE)}},date_guesses:function(e){var t,r;return r=Math.max(Math.abs(e.year-this.REFERENCE_YEAR),this.MIN_YEAR_SPACE),t=365*r,e.separator&&(t*=4),t},KEYBOARD_AVERAGE_DEGREE:calc_average_degree(adjacency_graphs.qwerty),KEYPAD_AVERAGE_DEGREE:calc_average_degree(adjacency_graphs.keypad),KEYBOARD_STARTING_POSITIONS:function(){var e,t;e=adjacency_graphs.qwerty,t=[];for(k in e)v=e[k],t.push(k);return t}().length,KEYPAD_STARTING_POSITIONS:function(){var e,t;e=adjacency_graphs.keypad,t=[];for(k in e)v=e[k],t.push(k);return t}().length,spatial_guesses:function(e){var t,r,n,s,a,u,i,_,o,h,E,c,g,f,l,A,S,p;for("qwerty"===(E=e.graph)||"dvorak"===E?(l=this.KEYBOARD_STARTING_POSITIONS,s=this.KEYBOARD_AVERAGE_DEGREE):(l=this.KEYPAD_STARTING_POSITIONS,s=this.KEYPAD_AVERAGE_DEGREE),a=0,t=e.token.length,S=e.turns,u=_=2,c=t;2<=c?_<=c:_>=c;u=2<=c?++_:--_)for(o=Math.min(S,u-1),i=h=1,g=o;1<=g?h<=g:h>=g;i=1<=g?++h:--h)a+=this.nCk(u-1,i-1)*l*Math.pow(s,i);if(e.shifted_count)if(r=e.shifted_count,n=e.token.length-e.shifted_count,0===r||0===n)a*=2;else{for(A=0,u=p=1,f=Math.min(r,n);1<=f?p<=f:p>=f;u=1<=f?++p:--p)A+=this.nCk(r+n,u);a*=A}return a},dictionary_guesses:function(e){var t;return e.base_guesses=e.rank,e.uppercase_variations=this.uppercase_variations(e),e.l33t_variations=this.l33t_variations(e),t=e.reversed&&2||1,e.base_guesses*e.uppercase_variations*e.l33t_variations*t},START_UPPER:/^[A-Z][^A-Z]+$/,END_UPPER:/^[^A-Z]+[A-Z]$/,ALL_UPPER:/^[^a-z]+$/,ALL_LOWER:/^[^A-Z]+$/,uppercase_variations:function(e){var t,r,n,s,a,u,i,_,o,h,E,c;if(c=e.token,c.match(this.ALL_LOWER)||c.toLowerCase()===c)return 1;for(_=[this.START_UPPER,this.END_UPPER,this.ALL_UPPER],u=0,a=_.length;u<a;u++)if(h=_[u],c.match(h))return 2;for(r=function(){var e,t,r,s;for(r=c.split(""),s=[],t=0,e=r.length;t<e;t++)n=r[t],n.match(/[A-Z]/)&&s.push(n);return s}().length,t=function(){var e,t,r,s;for(r=c.split(""),s=[],t=0,e=r.length;t<e;t++)n=r[t],n.match(/[a-z]/)&&s.push(n);return s}().length,E=0,s=i=1,o=Math.min(r,t);1<=o?i<=o:i>=o;s=1<=o?++i:--i)E+=this.nCk(r+t,s);return E},l33t_variations:function(e){var t,r,n,s,a,u,i,_,o,h,E,c,g;if(!e.l33t)return 1;g=1,o=e.sub;for(E in o)if(c=o[E],s=e.token.toLowerCase().split(""),t=function(){var e,t,r;for(r=[],t=0,e=s.length;t<e;t++)n=s[t],n===E&&r.push(n);return r}().length,r=function(){var e,t,r;for(r=[],t=0,e=s.length;t<e;t++)n=s[t],n===c&&r.push(n);return r}().length,0===t||0===r)g*=2;else{for(i=Math.min(r,t),_=0,a=u=1,h=i;1<=h?u<=h:u>=h;a=1<=h?++u:--u)_+=this.nCk(r+t,a);g*=_}return g}},module.exports=scoring;

},{"./adjacency_graphs":1}],7:[function(require,module,exports){
var time_estimates;time_estimates={estimate_attack_times:function(e){var t,n,s,o;n={online_throttling_100_per_hour:e/(100/3600),online_no_throttling_10_per_second:e/10,offline_slow_hashing_1e4_per_second:e/1e4,offline_fast_hashing_1e10_per_second:e/1e10},t={};for(s in n)o=n[s],t[s]=this.display_time(o);return{crack_times_seconds:n,crack_times_display:t,score:this.guesses_to_score(e)}},guesses_to_score:function(e){var t;return t=5,e<1e3+t?0:e<1e6+t?1:e<1e8+t?2:e<1e10+t?3:4},display_time:function(e){var t,n,s,o,_,r,i,a,u,c;return i=60,r=60*i,s=24*r,a=31*s,c=12*a,n=100*c,u=e<1?[null,"less than a second"]:e<i?(t=Math.round(e),[t,t+" second"]):e<r?(t=Math.round(e/i),[t,t+" minute"]):e<s?(t=Math.round(e/r),[t,t+" hour"]):e<a?(t=Math.round(e/s),[t,t+" day"]):e<c?(t=Math.round(e/a),[t,t+" month"]):e<n?(t=Math.round(e/c),[t,t+" year"]):[null,"centuries"],o=u[0],_=u[1],null!=o&&1!==o&&(_+="s"),_}},module.exports=time_estimates;

},{}]},{},[4])(4)
});
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   